summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-18 15:59:29 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-18 15:59:29 +0100
commit5a267de99f19bdab857429a81ffcfbb4d06f5bbd (patch)
tree1425ce2404af0e2542e1be0dca3821600f5b82a8
parent3bb681a344beb911d92b48469afbd0ccc51db1dd (diff)
parent99ebfb7335c333a77910b1059b7b41fb34ff0899 (diff)
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts: starmath/source/symbol.cxx sw/source/core/doc/docnew.cxx sw/source/core/doc/docnum.cxx sw/source/core/draw/dview.cxx sw/source/core/fields/docufld.cxx sw/source/core/layout/calcmove.cxx sw/source/filter/html/swhtml.cxx sw/source/filter/rtf/rtftbl.cxx sw/source/ui/config/modcfg.cxx sw/source/ui/dialog/docstdlg.cxx sw/source/ui/dialog/docstdlg.src sw/source/ui/fldui/flddb.cxx sw/source/ui/fldui/flddinf.cxx sw/source/ui/fldui/flddok.cxx sw/source/ui/fldui/fldfunc.cxx sw/source/ui/fldui/fldmgr.cxx sw/source/ui/fldui/fldpage.hxx sw/source/ui/fldui/fldref.cxx sw/source/ui/fldui/fldvar.cxx sw/source/ui/fldui/fldvar.hxx sw/source/ui/fldui/fldwrap.cxx sw/source/ui/fldui/xfldui.cxx sw/source/ui/inc/docstdlg.hxx sw/source/ui/shells/langhelper.cxx sw/source/ui/shells/txtattr.cxx sw/source/ui/shells/txtcrsr.cxx sw/source/ui/table/tabledlg.cxx
-rw-r--r--starmath/inc/applicat.hxx31
-rw-r--r--starmath/inc/config.hxx2
-rw-r--r--starmath/inc/cursor.hxx2
-rwxr-xr-x[-rw-r--r--]starmath/inc/dialog.hxx47
-rwxr-xr-x[-rw-r--r--]starmath/inc/document.hxx51
-rw-r--r--starmath/inc/edit.hxx4
-rw-r--r--starmath/inc/format.hxx32
-rw-r--r--starmath/inc/helpids.h326
-rw-r--r--starmath/inc/node.hxx107
-rwxr-xr-x[-rw-r--r--]starmath/inc/parse.hxx91
-rw-r--r--starmath/inc/rect.hxx12
-rw-r--r--starmath/inc/smcommands.h68
-rw-r--r--starmath/inc/smdll.hxx2
-rw-r--r--starmath/inc/smmod.hxx11
-rwxr-xr-x[-rw-r--r--]starmath/inc/starmath.hrc319
-rw-r--r--starmath/inc/symbol.hxx10
-rw-r--r--starmath/inc/toolbox.hxx18
-rw-r--r--starmath/inc/unomodel.hxx2
-rw-r--r--starmath/inc/utility.hxx36
-rw-r--r--starmath/inc/view.hxx32
-rw-r--r--starmath/prj/build.lst4
-rw-r--r--starmath/prj/d.lst2
-rw-r--r--starmath/qa/cppunit/makefile.mk45
-rw-r--r--starmath/qa/unoapi/knownissues.xcl3
-rwxr-xr-x[-rw-r--r--]starmath/sdi/smath.sdi4
-rwxr-xr-x[-rw-r--r--]starmath/sdi/smslots.sdi2
-rw-r--r--starmath/source/accessibility.cxx102
-rw-r--r--starmath/source/accessibility.hxx60
-rw-r--r--starmath/source/cfgitem.cxx221
-rw-r--r--starmath/source/cfgitem.hxx31
-rwxr-xr-x[-rw-r--r--]starmath/source/config.cxx25
-rw-r--r--starmath/source/cursor.cxx36
-rw-r--r--starmath/source/detreg.cxx23
-rwxr-xr-x[-rw-r--r--]starmath/source/dialog.cxx244
-rwxr-xr-x[-rw-r--r--]starmath/source/dialog.hrc9
-rwxr-xr-x[-rw-r--r--]starmath/source/document.cxx104
-rw-r--r--starmath/source/edit.cxx22
-rw-r--r--starmath/source/format.cxx18
-rwxr-xr-x[-rw-r--r--]starmath/source/makefile.mk20
-rwxr-xr-x[-rw-r--r--]starmath/source/mathmlexport.cxx30
-rwxr-xr-x[-rw-r--r--]starmath/source/mathmlimport.cxx128
-rwxr-xr-x[-rw-r--r--]starmath/source/mathmlimport.hxx14
-rw-r--r--starmath/source/mathtype.cxx46
-rw-r--r--starmath/source/mathtype.hxx4
-rw-r--r--starmath/source/menu_tmpl.src160
-rw-r--r--starmath/source/node.cxx255
-rw-r--r--starmath/source/parse.cxx995
-rw-r--r--starmath/source/rect.cxx6
-rw-r--r--starmath/source/register.cxx86
-rw-r--r--starmath/source/smdetect.cxx28
-rwxr-xr-x[-rw-r--r--]starmath/source/smmod.cxx39
-rw-r--r--starmath/source/smres.src1904
-rw-r--r--starmath/source/symbol.cxx15
-rw-r--r--starmath/source/toolbox.cxx123
-rwxr-xr-x[-rw-r--r--]starmath/source/toolbox.hrc14
-rwxr-xr-xstarmath/source/toolbox.src1777
-rw-r--r--starmath/source/unomodel.cxx79
-rw-r--r--starmath/source/utility.cxx20
-rw-r--r--starmath/source/view.cxx127
-rw-r--r--starmath/source/visitors.cxx14
-rwxr-xr-x[-rw-r--r--]starmath/uiconfig/smath/menubar/menubar.xml2
-rw-r--r--starmath/util/hidother.src3
-rw-r--r--starmath/util/makefile.mk17
-rw-r--r--starmath/util/sm.component61
-rw-r--r--starmath/util/smd.component34
-rw-r--r--sw/AllLangResTarget_sw.mk186
-rwxr-xr-xsw/JunitTest_sw_complex.mk57
-rwxr-xr-x[-rw-r--r--]sw/JunitTest_sw_unoapi.mk (renamed from sw/source/core/SwNumberTree/makefile.mk)41
-rw-r--r--sw/Library_msword.mk122
-rw-r--r--sw/Library_sw.mk742
-rw-r--r--sw/Library_swd.mk (renamed from sw/qa/complex/accessibility/makefile.mk)65
-rw-r--r--sw/Library_swui.mk168
-rw-r--r--sw/Library_vbaswobj.mk147
-rw-r--r--sw/Makefile (renamed from sw/inc/sw.mk)19
-rw-r--r--sw/Module_sw.mk (renamed from sw/source/ui/inc/makefile.mk)37
-rw-r--r--sw/Package_misc.mk (renamed from sw/source/core/inc/makefile.mk)6
-rw-r--r--sw/Package_uiconfig.mk261
-rw-r--r--sw/Package_xml.mk (renamed from sw/source/filter/inc/makefile.mk)5
-rw-r--r--sw/inc/EnhancedPDFExportHelper.hxx2
-rw-r--r--sw/inc/IDocumentDeviceAccess.hxx2
-rw-r--r--sw/inc/IDocumentFieldsAccess.hxx14
-rw-r--r--sw/inc/IDocumentLinksAdministration.hxx2
-rw-r--r--sw/inc/IDocumentRedlineAccess.hxx14
-rw-r--r--sw/inc/IDocumentSettingAccess.hxx9
-rw-r--r--sw/inc/IDocumentUndoRedo.hxx253
-rw-r--r--sw/inc/IShellCursorSupplier.hxx (renamed from sw/source/ui/fmtui/fmtui.src)70
-rw-r--r--sw/inc/PostItMgr.hxx8
-rw-r--r--sw/inc/SidebarWin.hxx10
-rw-r--r--sw/inc/SwAppletImpl.hxx6
-rw-r--r--sw/inc/SwGetPoolIdFromName.hxx2
-rw-r--r--sw/inc/SwRewriter.hxx5
-rw-r--r--sw/inc/SwUndoField.hxx36
-rw-r--r--sw/inc/access.hrc15
-rw-r--r--sw/inc/accessibilityoptions.hxx24
-rw-r--r--sw/inc/acmplwrd.hxx16
-rw-r--r--sw/inc/authfld.hxx54
-rw-r--r--sw/inc/authratr.hxx6
-rw-r--r--sw/inc/bparr.hxx45
-rw-r--r--sw/inc/breakit.hxx4
-rw-r--r--sw/inc/calbck.hxx40
-rw-r--r--sw/inc/calc.hxx22
-rw-r--r--sw/inc/ccoll.hxx14
-rw-r--r--sw/inc/cellatr.hxx22
-rw-r--r--sw/inc/cellfml.hxx14
-rw-r--r--sw/inc/charatr.hxx132
-rw-r--r--sw/inc/charfmt.hxx4
-rw-r--r--sw/inc/chpfld.hxx31
-rw-r--r--sw/inc/cmdid.h8
-rw-r--r--sw/inc/colwd.hxx2
-rw-r--r--sw/inc/crsrsh.hxx424
-rw-r--r--sw/inc/crsskip.hxx6
-rw-r--r--sw/inc/crstate.hxx104
-rw-r--r--sw/inc/cshtyp.hxx8
-rw-r--r--sw/inc/dbfld.hxx106
-rw-r--r--sw/inc/dbgoutsw.hxx2
-rw-r--r--sw/inc/dbmgr.hxx107
-rw-r--r--sw/inc/dcontact.hxx6
-rw-r--r--sw/inc/ddefld.hxx37
-rw-r--r--sw/inc/doc.hxx300
-rw-r--r--sw/inc/docary.hxx33
-rw-r--r--sw/inc/docsh.hxx72
-rw-r--r--sw/inc/docstat.hxx20
-rw-r--r--sw/inc/docstyle.hxx64
-rw-r--r--sw/inc/docufld.hxx201
-rw-r--r--sw/inc/dpage.hxx6
-rw-r--r--sw/inc/edglbldc.hxx6
-rw-r--r--sw/inc/edimp.hxx18
-rw-r--r--sw/inc/editsh.hxx375
-rw-r--r--sw/inc/errhdl.hxx76
-rw-r--r--sw/inc/expfld.hxx184
-rw-r--r--sw/inc/extinput.hxx10
-rw-r--r--sw/inc/fchrfmt.hxx6
-rw-r--r--sw/inc/fesh.hxx343
-rw-r--r--sw/inc/fldbas.hxx92
-rw-r--r--sw/inc/flddat.hxx32
-rw-r--r--sw/inc/flddropdown.hxx51
-rw-r--r--sw/inc/flypos.hxx10
-rw-r--r--sw/inc/fmtanchr.hxx18
-rw-r--r--sw/inc/fmtautofmt.hxx6
-rw-r--r--sw/inc/fmtclbl.hxx6
-rw-r--r--sw/inc/fmtclds.hxx82
-rw-r--r--sw/inc/fmtcnct.hxx6
-rw-r--r--sw/inc/fmtcntnt.hxx4
-rw-r--r--sw/inc/fmtcol.hxx52
-rw-r--r--sw/inc/fmteiro.hxx8
-rw-r--r--sw/inc/fmtfld.hxx6
-rw-r--r--sw/inc/fmtfollowtextflow.hxx6
-rw-r--r--sw/inc/fmtfordr.hxx6
-rw-r--r--sw/inc/fmtfsize.hxx20
-rw-r--r--sw/inc/fmtftn.hxx8
-rw-r--r--sw/inc/fmtftntx.hxx26
-rw-r--r--sw/inc/fmthdft.hxx24
-rw-r--r--sw/inc/fmtinfmt.hxx20
-rw-r--r--sw/inc/fmtline.hxx18
-rw-r--r--sw/inc/fmtlsplt.hxx6
-rw-r--r--sw/inc/fmtmeta.hxx6
-rw-r--r--sw/inc/fmtornt.hxx30
-rw-r--r--sw/inc/fmtpdsc.hxx22
-rw-r--r--sw/inc/fmtrowsplt.hxx6
-rw-r--r--sw/inc/fmtruby.hxx22
-rw-r--r--sw/inc/fmtsrnd.hxx30
-rw-r--r--sw/inc/fmturl.hxx14
-rw-r--r--sw/inc/fmtwrapinfluenceonobjpos.hxx8
-rw-r--r--sw/inc/format.hxx292
-rw-r--r--sw/inc/frmatr.hxx52
-rw-r--r--sw/inc/frmfmt.hxx29
-rw-r--r--sw/inc/ftnidx.hxx6
-rw-r--r--sw/inc/ftninfo.hxx6
-rw-r--r--sw/inc/grfatr.hxx84
-rw-r--r--sw/inc/helpid.h1885
-rw-r--r--sw/inc/hfspacingitem.hxx8
-rw-r--r--sw/inc/hhcwrp.hxx8
-rw-r--r--sw/inc/hintids.hxx52
-rw-r--r--sw/inc/hints.hxx22
-rw-r--r--sw/inc/htmltbl.hxx326
-rw-r--r--sw/inc/index.hxx34
-rw-r--r--sw/inc/inetfld.hxx19
-rw-r--r--sw/inc/io.hxx2
-rw-r--r--sw/inc/iodetect.hxx16
-rw-r--r--sw/inc/itabenum.hxx16
-rw-r--r--sw/inc/lineinfo.hxx44
-rw-r--r--sw/inc/list.hxx2
-rw-r--r--sw/inc/makefile.mk49
-rw-r--r--sw/inc/mdiexp.hxx16
-rw-r--r--sw/inc/modcfg.hxx108
-rw-r--r--sw/inc/ndarr.hxx85
-rw-r--r--sw/inc/ndgrf.hxx66
-rw-r--r--sw/inc/ndhints.hxx34
-rw-r--r--sw/inc/ndindex.hxx131
-rw-r--r--sw/inc/ndnotxt.hxx30
-rw-r--r--sw/inc/ndole.hxx24
-rw-r--r--sw/inc/ndtxt.hxx126
-rw-r--r--sw/inc/ndtyp.hxx24
-rw-r--r--sw/inc/newhdl.hxx6
-rw-r--r--sw/inc/node.hxx168
-rw-r--r--sw/inc/numrule.hxx88
-rw-r--r--sw/inc/pagedesc.hxx66
-rw-r--r--sw/inc/pageiter.hxx8
-rw-r--r--sw/inc/pam.hxx56
-rw-r--r--sw/inc/paratr.hxx110
-rwxr-xr-x[-rw-r--r--]sw/inc/pch/precompiled_sw.hxx9
-rw-r--r--sw/inc/poolfmt.awk31
-rw-r--r--sw/inc/poolfmt.hrc9
-rw-r--r--sw/inc/poolfmt.hxx42
-rw-r--r--sw/inc/postithelper.hxx2
-rw-r--r--sw/inc/printdata.hxx31
-rw-r--r--sw/inc/prtopt.hxx (renamed from sw/source/ui/inc/prtopt.hxx)0
-rw-r--r--sw/inc/pvprtdat.hxx44
-rw-r--r--sw/inc/redline.hxx78
-rw-r--r--sw/inc/redlnaut.hxx2
-rw-r--r--sw/inc/reffld.hxx35
-rw-r--r--sw/inc/section.hxx14
-rw-r--r--sw/inc/shellio.hxx235
-rw-r--r--sw/inc/shellres.hxx2
-rw-r--r--sw/inc/sortopt.hxx12
-rw-r--r--sw/inc/swabstdlg.hxx106
-rw-r--r--sw/inc/swacorr.hxx4
-rw-r--r--sw/inc/swatrset.hxx244
-rw-r--r--sw/inc/swbaslnk.hxx30
-rw-r--r--sw/inc/swcalwrp.hxx4
-rw-r--r--sw/inc/swcli.hxx10
-rw-r--r--sw/inc/swcommands.h437
-rw-r--r--sw/inc/swcrsr.hxx176
-rw-r--r--sw/inc/swdbdata.hxx4
-rw-r--r--sw/inc/swdbtoolsclient.hxx2
-rw-r--r--sw/inc/swddetbl.hxx4
-rw-r--r--sw/inc/swerror.h4
-rw-r--r--sw/inc/swevent.hxx2
-rw-r--r--sw/inc/swgstr.hxx40
-rw-r--r--sw/inc/swmodule.hxx10
-rw-r--r--sw/inc/swpre.mk46
-rw-r--r--sw/inc/swprtopt.hxx98
-rw-r--r--sw/inc/swrect.hxx34
-rw-r--r--sw/inc/swregion.hxx8
-rw-r--r--sw/inc/swserv.hxx8
-rw-r--r--sw/inc/swtable.hxx150
-rw-r--r--sw/inc/swtypes.hxx16
-rw-r--r--sw/inc/swundo.hxx32
-rw-r--r--sw/inc/swunohelper.hxx16
-rw-r--r--sw/inc/swurl.hxx2
-rw-r--r--sw/inc/swwait.hxx4
-rw-r--r--sw/inc/tabcol.hxx28
-rw-r--r--sw/inc/tblafmt.hxx66
-rw-r--r--sw/inc/tblenum.hxx2
-rw-r--r--sw/inc/tblsel.hxx30
-rw-r--r--sw/inc/tgrditem.hxx50
-rw-r--r--sw/inc/tox.hxx178
-rw-r--r--sw/inc/toxwrap.hxx2
-rw-r--r--sw/inc/txatbase.hxx4
-rw-r--r--sw/inc/txatritr.hxx4
-rw-r--r--sw/inc/txtatr.hxx10
-rw-r--r--sw/inc/txtfld.hxx3
-rw-r--r--sw/inc/txtftn.hxx12
-rw-r--r--sw/inc/txtinet.hxx4
-rw-r--r--sw/inc/undobj.hxx1701
-rw-r--r--sw/inc/unoatxt.hxx10
-rw-r--r--sw/inc/unochart.hxx2
-rw-r--r--sw/inc/unocrsr.hxx24
-rw-r--r--sw/inc/unocrsrhelper.hxx4
-rw-r--r--sw/inc/unoevtlstnr.hxx2
-rw-r--r--sw/inc/unofield.hxx2
-rw-r--r--sw/inc/unoflatpara.hxx6
-rw-r--r--sw/inc/unomailmerge.hxx8
-rw-r--r--sw/inc/unomap.hxx6
-rw-r--r--sw/inc/unoprnms.hxx8
-rw-r--r--sw/inc/unoredline.hxx2
-rw-r--r--sw/inc/unoredlines.hxx4
-rw-r--r--sw/inc/unostyle.hxx2
-rw-r--r--sw/inc/unotbl.hxx2
-rw-r--r--sw/inc/unotextrange.hxx2
-rw-r--r--sw/inc/unotxdoc.hxx3
-rw-r--r--sw/inc/usrfld.hxx57
-rw-r--r--sw/inc/viewopt.hxx432
-rw-r--r--sw/inc/viewsh.hxx25
-rw-r--r--sw/inc/viscrs.hxx28
-rw-r--r--sw/inc/wdocsh.hxx6
-rw-r--r--[-rwxr-xr-x]sw/prj/build.lst79
-rw-r--r--sw/prj/d.lst59
-rw-r--r--sw/prj/makefile.mk (renamed from sw/uiconfig/layout/makefile.mk)24
-rw-r--r--sw/qa/complex/accessibility/AccessibleRelationSet.java173
-rw-r--r--sw/qa/complex/checkColor/CheckChangeColor.java119
-rw-r--r--sw/qa/complex/checkColor/makefile.mk75
-rw-r--r--sw/qa/complex/indeterminateState/CheckIndeterminateState.java133
-rw-r--r--sw/qa/complex/indeterminateState/makefile.mk82
-rw-r--r--sw/qa/complex/writer/CheckBookmarks.java127
-rw-r--r--sw/qa/complex/writer/CheckCrossReferences.java334
-rw-r--r--sw/qa/complex/writer/CheckFlies.java219
-rw-r--r--sw/qa/complex/writer/CheckIndexedPropertyValues.java184
-rw-r--r--sw/qa/complex/writer/CheckNamedPropertyValues.java200
-rw-r--r--sw/qa/complex/writer/LoadSaveTest.java254
-rw-r--r--sw/qa/complex/writer/TestDocument.java39
-rw-r--r--sw/qa/complex/writer/TextPortionEnumerationTest.java645
-rw-r--r--sw/qa/complex/writer/makefile.mk108
-rw-r--r--sw/qa/core/Test-BigPtrArray.cxx86
-rw-r--r--sw/qa/core/bigpointerarray-new.cxx14
-rw-r--r--sw/qa/core/bigpointerarray-new.hxx20
-rw-r--r--sw/qa/core/filters-test.cxx2
-rw-r--r--sw/qa/core/makefile.mk217
-rw-r--r--sw/qa/core/swdoc-test.cxx2
-rw-r--r--sw/qa/unoapi/Test.java5
-rw-r--r--sw/qa/unoapi/knownissues.xcl14
-rw-r--r--sw/qa/unoapi/lastCheck.txt1
-rw-r--r--sw/qa/unoapi/makefile.mk48
-rw-r--r--sw/qa/unoapi/sw.sce6
-rw-r--r--sw/sdi/_annotsh.sdi6
-rw-r--r--sw/sdi/_docsh.sdi5
-rw-r--r--sw/sdi/_textsh.sdi8
-rw-r--r--sw/sdi/makefile.mk107
-rw-r--r--sw/sdi/swriter.sdi27
-rw-r--r--sw/source/core/SwNumberTree/SwNodeNum.cxx2
-rw-r--r--sw/source/core/access/accdoc.cxx2
-rw-r--r--sw/source/core/access/accmap.cxx2
-rw-r--r--sw/source/core/access/accpara.cxx50
-rw-r--r--sw/source/core/access/accpara.hxx2
-rw-r--r--sw/source/core/access/accportions.cxx48
-rw-r--r--sw/source/core/access/accportions.hxx24
-rw-r--r--sw/source/core/access/acctable.cxx2
-rw-r--r--sw/source/core/access/makefile.mk97
-rw-r--r--sw/source/core/access/parachangetrackinginfo.cxx2
-rw-r--r--sw/source/core/access/textmarkuphelper.cxx10
-rw-r--r--sw/source/core/attr/calbck.cxx40
-rw-r--r--sw/source/core/attr/cellatr.cxx12
-rw-r--r--sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx4
-rw-r--r--sw/source/core/attr/format.cxx96
-rw-r--r--sw/source/core/attr/hints.cxx40
-rw-r--r--sw/source/core/attr/makefile.mk58
-rw-r--r--sw/source/core/attr/swatrset.cxx38
-rw-r--r--sw/source/core/bastyp/bparr.cxx92
-rw-r--r--sw/source/core/bastyp/breakit.cxx12
-rw-r--r--sw/source/core/bastyp/calc.cxx148
-rw-r--r--sw/source/core/bastyp/index.cxx10
-rw-r--r--sw/source/core/bastyp/init.cxx86
-rw-r--r--sw/source/core/bastyp/makefile.mk79
-rw-r--r--sw/source/core/bastyp/swcache.cxx42
-rw-r--r--sw/source/core/bastyp/swrect.cxx18
-rw-r--r--sw/source/core/bastyp/swregion.cxx32
-rw-r--r--sw/source/core/bastyp/swtypes.cxx3
-rw-r--r--sw/source/core/bastyp/tabcol.cxx20
-rw-r--r--sw/source/core/crsr/bookmrk.cxx18
-rw-r--r--sw/source/core/crsr/callnk.cxx14
-rw-r--r--sw/source/core/crsr/callnk.hxx10
-rw-r--r--sw/source/core/crsr/crsrsh.cxx505
-rw-r--r--sw/source/core/crsr/crstrvl.cxx322
-rw-r--r--sw/source/core/crsr/crstrvl1.cxx30
-rw-r--r--sw/source/core/crsr/findattr.cxx243
-rw-r--r--sw/source/core/crsr/findcoll.cxx31
-rw-r--r--sw/source/core/crsr/findfmt.cxx14
-rw-r--r--sw/source/core/crsr/findtxt.cxx94
-rw-r--r--sw/source/core/crsr/makefile.mk80
-rw-r--r--sw/source/core/crsr/pam.cxx220
-rw-r--r--sw/source/core/crsr/paminit.cxx14
-rw-r--r--sw/source/core/crsr/swcrsr.cxx454
-rw-r--r--sw/source/core/crsr/trvlcol.cxx8
-rw-r--r--sw/source/core/crsr/trvlfnfl.cxx60
-rw-r--r--sw/source/core/crsr/trvlreg.cxx74
-rw-r--r--sw/source/core/crsr/trvltbl.cxx124
-rw-r--r--sw/source/core/crsr/unocrsr.cxx32
-rw-r--r--sw/source/core/crsr/viscrs.cxx52
-rw-r--r--sw/source/core/doc/SwStyleNameMapper.cxx8
-rw-r--r--sw/source/core/doc/acmplwrd.cxx60
-rw-r--r--sw/source/core/doc/dbgoutsw.cxx105
-rw-r--r--sw/source/core/doc/doc.cxx480
-rw-r--r--sw/source/core/doc/docbasic.cxx30
-rw-r--r--sw/source/core/doc/docbm.cxx105
-rw-r--r--sw/source/core/doc/docchart.cxx12
-rw-r--r--sw/source/core/doc/doccomp.cxx335
-rw-r--r--sw/source/core/doc/doccorr.cxx243
-rw-r--r--sw/source/core/doc/docdde.cxx42
-rw-r--r--sw/source/core/doc/docdesc.cxx150
-rw-r--r--sw/source/core/doc/docdraw.cxx98
-rw-r--r--sw/source/core/doc/docedt.cxx242
-rw-r--r--sw/source/core/doc/docfld.cxx350
-rw-r--r--sw/source/core/doc/docfly.cxx205
-rw-r--r--sw/source/core/doc/docfmt.cxx395
-rw-r--r--sw/source/core/doc/docftn.cxx74
-rw-r--r--sw/source/core/doc/docglbl.cxx67
-rw-r--r--sw/source/core/doc/docglos.cxx26
-rw-r--r--sw/source/core/doc/doclay.cxx290
-rw-r--r--sw/source/core/doc/docnew.cxx165
-rw-r--r--sw/source/core/doc/docnum.cxx507
-rw-r--r--sw/source/core/doc/docredln.cxx536
-rw-r--r--sw/source/core/doc/docruby.cxx49
-rw-r--r--sw/source/core/doc/docsort.cxx196
-rw-r--r--sw/source/core/doc/docstat.cxx4
-rw-r--r--sw/source/core/doc/doctxm.cxx272
-rw-r--r--sw/source/core/doc/extinput.cxx32
-rw-r--r--sw/source/core/doc/fmtcol.cxx94
-rw-r--r--sw/source/core/doc/ftnidx.cxx68
-rw-r--r--sw/source/core/doc/gctable.cxx128
-rw-r--r--sw/source/core/doc/htmltbl.cxx480
-rw-r--r--sw/source/core/doc/lineinfo.cxx10
-rw-r--r--sw/source/core/doc/list.cxx8
-rw-r--r--sw/source/core/doc/makefile.mk92
-rw-r--r--sw/source/core/doc/notxtfrm.cxx102
-rw-r--r--sw/source/core/doc/number.cxx130
-rw-r--r--sw/source/core/doc/poolfmt.cxx419
-rw-r--r--sw/source/core/doc/sortopt.cxx10
-rw-r--r--sw/source/core/doc/swserv.cxx38
-rw-r--r--sw/source/core/doc/tblafmt.cxx220
-rw-r--r--sw/source/core/doc/tblcpy.cxx213
-rw-r--r--sw/source/core/doc/tblrwcl.cxx1005
-rw-r--r--sw/source/core/doc/visiturl.cxx16
-rw-r--r--sw/source/core/docnode/makefile.mk73
-rw-r--r--sw/source/core/docnode/ndcopy.cxx246
-rw-r--r--sw/source/core/docnode/ndindex.cxx6
-rw-r--r--sw/source/core/docnode/ndnotxt.cxx64
-rw-r--r--sw/source/core/docnode/ndnum.cxx18
-rw-r--r--sw/source/core/docnode/ndsect.cxx212
-rw-r--r--sw/source/core/docnode/ndtbl.cxx1065
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx348
-rw-r--r--sw/source/core/docnode/node.cxx258
-rw-r--r--sw/source/core/docnode/node2lay.cxx54
-rw-r--r--sw/source/core/docnode/nodes.cxx335
-rw-r--r--sw/source/core/docnode/section.cxx171
-rw-r--r--sw/source/core/docnode/swbaslnk.cxx88
-rw-r--r--sw/source/core/draw/dcontact.cxx58
-rw-r--r--sw/source/core/draw/dflyobj.cxx76
-rw-r--r--sw/source/core/draw/dpage.cxx12
-rw-r--r--sw/source/core/draw/drawdoc.cxx16
-rw-r--r--sw/source/core/draw/dview.cxx110
-rw-r--r--sw/source/core/draw/makefile.mk58
-rw-r--r--sw/source/core/edit/acorrect.cxx88
-rw-r--r--sw/source/core/edit/autofmt.cxx502
-rw-r--r--sw/source/core/edit/edatmisc.cxx38
-rw-r--r--sw/source/core/edit/edattr.cxx108
-rw-r--r--sw/source/core/edit/eddel.cxx52
-rw-r--r--sw/source/core/edit/edfcol.cxx23
-rw-r--r--sw/source/core/edit/edfld.cxx97
-rw-r--r--sw/source/core/edit/edfldexp.cxx16
-rw-r--r--sw/source/core/edit/edfmt.cxx22
-rw-r--r--sw/source/core/edit/edglbldc.cxx92
-rw-r--r--sw/source/core/edit/edglss.cxx48
-rw-r--r--sw/source/core/edit/editsh.cxx138
-rw-r--r--sw/source/core/edit/edlingu.cxx55
-rw-r--r--sw/source/core/edit/ednumber.cxx172
-rw-r--r--sw/source/core/edit/edredln.cxx26
-rw-r--r--sw/source/core/edit/edsect.cxx45
-rw-r--r--sw/source/core/edit/edtab.cxx99
-rw-r--r--sw/source/core/edit/edtox.cxx96
-rw-r--r--sw/source/core/edit/edundo.cxx212
-rw-r--r--sw/source/core/edit/edws.cxx56
-rw-r--r--sw/source/core/edit/makefile.mk71
-rw-r--r--sw/source/core/except/dbgloop.cxx168
-rw-r--r--sw/source/core/except/errhdl.cxx136
-rw-r--r--sw/source/core/fields/authfld.cxx79
-rw-r--r--sw/source/core/fields/cellfml.cxx76
-rw-r--r--sw/source/core/fields/chpfld.cxx14
-rw-r--r--sw/source/core/fields/dbfld.cxx129
-rw-r--r--sw/source/core/fields/ddefld.cxx36
-rw-r--r--sw/source/core/fields/ddetbl.cxx18
-rw-r--r--sw/source/core/fields/docufld.cxx143
-rw-r--r--sw/source/core/fields/expfld.cxx210
-rw-r--r--sw/source/core/fields/fldbas.cxx109
-rw-r--r--sw/source/core/fields/flddat.cxx20
-rw-r--r--sw/source/core/fields/flddropdown.cxx6
-rw-r--r--sw/source/core/fields/fldlst.cxx28
-rw-r--r--sw/source/core/fields/macrofld.cxx37
-rw-r--r--sw/source/core/fields/makefile.mk92
-rw-r--r--sw/source/core/fields/reffld.cxx87
-rw-r--r--sw/source/core/fields/scrptfld.cxx6
-rw-r--r--sw/source/core/fields/tblcalc.cxx60
-rw-r--r--sw/source/core/fields/usrfld.cxx41
-rw-r--r--sw/source/core/frmedt/fecopy.cxx191
-rw-r--r--sw/source/core/frmedt/fedesc.cxx46
-rw-r--r--sw/source/core/frmedt/fefly1.cxx166
-rw-r--r--sw/source/core/frmedt/feflyole.cxx12
-rw-r--r--sw/source/core/frmedt/feshview.cxx323
-rw-r--r--sw/source/core/frmedt/fetab.cxx312
-rw-r--r--sw/source/core/frmedt/fews.cxx270
-rw-r--r--sw/source/core/frmedt/makefile.mk76
-rw-r--r--sw/source/core/frmedt/tblsel.cxx402
-rw-r--r--sw/source/core/graphic/grfatr.cxx48
-rw-r--r--sw/source/core/graphic/makefile.mk53
-rw-r--r--sw/source/core/graphic/ndgrf.cxx112
-rw-r--r--sw/source/core/inc/GetMetricVal.hxx6
-rw-r--r--sw/source/core/inc/SwPortionHandler.hxx10
-rw-r--r--sw/source/core/inc/SwUndoFmt.hxx (renamed from sw/inc/SwUndoFmt.hxx)43
-rw-r--r--sw/source/core/inc/SwUndoPageDesc.hxx (renamed from sw/inc/SwUndoPageDesc.hxx)25
-rw-r--r--sw/source/core/inc/SwUndoTOXChange.hxx (renamed from sw/inc/SwUndoTOXChange.hxx)14
-rw-r--r--sw/source/core/inc/SwXMLTextBlocks.hxx58
-rw-r--r--sw/source/core/inc/UndoAttribute.hxx288
-rw-r--r--sw/source/core/inc/UndoBookmark.hxx83
-rw-r--r--sw/source/core/inc/UndoCore.hxx263
-rw-r--r--sw/source/core/inc/UndoDelete.hxx115
-rw-r--r--sw/source/core/inc/UndoDraw.hxx150
-rw-r--r--sw/source/core/inc/UndoInsert.hxx235
-rw-r--r--sw/source/core/inc/UndoManager.hxx124
-rw-r--r--sw/source/core/inc/UndoNumbering.hxx150
-rw-r--r--sw/source/core/inc/UndoOverwrite.hxx105
-rw-r--r--sw/source/core/inc/UndoRedline.hxx145
-rw-r--r--sw/source/core/inc/UndoSection.hxx82
-rw-r--r--sw/source/core/inc/UndoSort.hxx97
-rw-r--r--sw/source/core/inc/UndoSplitMove.hxx96
-rw-r--r--sw/source/core/inc/UndoTable.hxx391
-rw-r--r--sw/source/core/inc/acorrect.hxx36
-rw-r--r--sw/source/core/inc/anchoredobjectposition.hxx58
-rw-r--r--sw/source/core/inc/blink.hxx16
-rw-r--r--sw/source/core/inc/bodyfrm.hxx2
-rw-r--r--sw/source/core/inc/cellfrm.hxx11
-rw-r--r--sw/source/core/inc/cntfrm.hxx44
-rw-r--r--sw/source/core/inc/dbg_lay.hxx20
-rw-r--r--sw/source/core/inc/dbgloop.hxx (renamed from sw/source/ui/ribbar/tblctrl.src)93
-rw-r--r--sw/source/core/inc/dflyobj.hxx16
-rw-r--r--sw/source/core/inc/docfld.hxx32
-rw-r--r--sw/source/core/inc/docsort.hxx60
-rw-r--r--sw/source/core/inc/doctxm.hxx10
-rw-r--r--sw/source/core/inc/drawdev.hxx28
-rw-r--r--sw/source/core/inc/drawfont.hxx154
-rw-r--r--sw/source/core/inc/dview.hxx8
-rw-r--r--sw/source/core/inc/flowfrm.hxx94
-rw-r--r--sw/source/core/inc/flyfrm.hxx129
-rw-r--r--sw/source/core/inc/flyfrms.hxx18
-rw-r--r--sw/source/core/inc/fntcache.hxx46
-rw-r--r--sw/source/core/inc/frame.hxx434
-rw-r--r--sw/source/core/inc/frminf.hxx12
-rw-r--r--sw/source/core/inc/frmtool.hxx152
-rw-r--r--sw/source/core/inc/ftnboss.hxx12
-rw-r--r--sw/source/core/inc/ftnfrm.hxx22
-rw-r--r--sw/source/core/inc/hffrm.hxx8
-rw-r--r--sw/source/core/inc/layact.hxx148
-rw-r--r--sw/source/core/inc/laycache.hxx4
-rw-r--r--sw/source/core/inc/layfrm.hxx47
-rw-r--r--sw/source/core/inc/layouter.hxx10
-rw-r--r--sw/source/core/inc/mvsave.hxx54
-rw-r--r--sw/source/core/inc/node2lay.hxx6
-rw-r--r--sw/source/core/inc/noteurl.hxx6
-rw-r--r--sw/source/core/inc/notxtfrm.hxx19
-rw-r--r--sw/source/core/inc/pagefrm.hxx122
-rw-r--r--sw/source/core/inc/pamtyp.hxx50
-rw-r--r--sw/source/core/inc/rolbck.hxx (renamed from sw/inc/rolbck.hxx)106
-rw-r--r--sw/source/core/inc/rootfrm.hxx116
-rw-r--r--sw/source/core/inc/rowfrm.hxx24
-rw-r--r--sw/source/core/inc/scriptinfo.hxx109
-rw-r--r--sw/source/core/inc/sectfrm.hxx60
-rw-r--r--sw/source/core/inc/swblocks.hxx70
-rw-r--r--sw/source/core/inc/swcache.hxx68
-rw-r--r--sw/source/core/inc/swfont.hxx354
-rw-r--r--sw/source/core/inc/tabfrm.hxx91
-rw-r--r--sw/source/core/inc/tblrwcl.hxx92
-rw-r--r--sw/source/core/inc/toxhlp.hxx2
-rw-r--r--sw/source/core/inc/txmsrt.hxx110
-rw-r--r--sw/source/core/inc/txtfrm.hxx56
-rw-r--r--sw/source/core/inc/txttypes.hxx4
-rw-r--r--sw/source/core/inc/undoflystrattr.hxx11
-rw-r--r--sw/source/core/inc/unometa.hxx2
-rw-r--r--sw/source/core/inc/viewimp.hxx55
-rw-r--r--sw/source/core/inc/wrong.hxx28
-rw-r--r--sw/source/core/layout/anchoreddrawobject.cxx2
-rw-r--r--sw/source/core/layout/atrfrm.cxx101
-rw-r--r--sw/source/core/layout/calcmove.cxx291
-rw-r--r--sw/source/core/layout/colfrm.cxx77
-rw-r--r--sw/source/core/layout/dbg_lay.cxx131
-rw-r--r--sw/source/core/layout/findfrm.cxx85
-rw-r--r--sw/source/core/layout/flowfrm.cxx326
-rw-r--r--sw/source/core/layout/fly.cxx205
-rw-r--r--sw/source/core/layout/flycnt.cxx273
-rw-r--r--sw/source/core/layout/flyincnt.cxx30
-rw-r--r--sw/source/core/layout/flylay.cxx80
-rw-r--r--sw/source/core/layout/flypos.cxx14
-rw-r--r--sw/source/core/layout/frmtool.cxx274
-rw-r--r--sw/source/core/layout/ftnfrm.cxx286
-rw-r--r--sw/source/core/layout/hffrm.cxx38
-rw-r--r--sw/source/core/layout/layact.cxx386
-rw-r--r--sw/source/core/layout/laycache.cxx223
-rw-r--r--sw/source/core/layout/layhelp.hxx86
-rw-r--r--sw/source/core/layout/layouter.cxx36
-rw-r--r--sw/source/core/layout/makefile.mk105
-rw-r--r--sw/source/core/layout/newfrm.cxx92
-rw-r--r--sw/source/core/layout/objectformatter.cxx4
-rw-r--r--sw/source/core/layout/pagechg.cxx216
-rw-r--r--sw/source/core/layout/pagedesc.cxx22
-rw-r--r--sw/source/core/layout/paintfrm.cxx415
-rw-r--r--sw/source/core/layout/sectfrm.cxx332
-rw-r--r--sw/source/core/layout/softpagebreak.cxx4
-rw-r--r--sw/source/core/layout/ssfrm.cxx102
-rw-r--r--sw/source/core/layout/tabfrm.cxx488
-rw-r--r--sw/source/core/layout/trvlfrm.cxx324
-rw-r--r--sw/source/core/layout/unusedf.cxx30
-rw-r--r--sw/source/core/layout/virtoutp.cxx24
-rw-r--r--sw/source/core/layout/virtoutp.hxx8
-rw-r--r--sw/source/core/layout/wsfrm.cxx312
-rw-r--r--sw/source/core/makefile.mk99
-rw-r--r--sw/source/core/objectpositioning/anchoredobjectposition.cxx101
-rw-r--r--sw/source/core/objectpositioning/makefile.mk62
-rw-r--r--sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx123
-rw-r--r--sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx12
-rw-r--r--sw/source/core/ole/makefile.mk55
-rw-r--r--sw/source/core/ole/ndole.cxx92
-rw-r--r--sw/source/core/para/makefile.mk57
-rw-r--r--sw/source/core/para/paratr.cxx8
-rw-r--r--sw/source/core/sw3io/makefile.mk52
-rw-r--r--sw/source/core/sw3io/sw3convert.cxx30
-rw-r--r--sw/source/core/sw3io/swacorr.cxx12
-rw-r--r--sw/source/core/swg/SwXMLBlockListContext.cxx4
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks.cxx125
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks1.cxx34
-rw-r--r--sw/source/core/swg/makefile.mk55
-rw-r--r--sw/source/core/swg/swblocks.cxx180
-rw-r--r--sw/source/core/table/makefile.mk48
-rw-r--r--sw/source/core/table/swnewtable.cxx362
-rw-r--r--sw/source/core/table/swtable.cxx399
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx52
-rw-r--r--sw/source/core/text/atrhndl.hxx24
-rw-r--r--sw/source/core/text/atrstck.cxx64
-rw-r--r--sw/source/core/text/blink.cxx2
-rw-r--r--sw/source/core/text/frmcrsr.cxx37
-rw-r--r--sw/source/core/text/frmform.cxx24
-rw-r--r--sw/source/core/text/frmpaint.cxx8
-rw-r--r--sw/source/core/text/guess.cxx18
-rw-r--r--sw/source/core/text/inftxt.cxx110
-rw-r--r--sw/source/core/text/inftxt.hxx42
-rw-r--r--sw/source/core/text/itradj.cxx28
-rw-r--r--sw/source/core/text/itratr.cxx42
-rw-r--r--sw/source/core/text/itratr.hxx6
-rw-r--r--sw/source/core/text/itrcrsr.cxx48
-rw-r--r--sw/source/core/text/itrform2.cxx56
-rw-r--r--sw/source/core/text/itrform2.hxx4
-rw-r--r--sw/source/core/text/itrpaint.cxx22
-rw-r--r--sw/source/core/text/itrtxt.cxx22
-rw-r--r--sw/source/core/text/itrtxt.hxx4
-rw-r--r--sw/source/core/text/makefile.mk104
-rw-r--r--sw/source/core/text/pordrop.hxx6
-rw-r--r--sw/source/core/text/porexp.hxx8
-rw-r--r--sw/source/core/text/porfld.cxx62
-rw-r--r--sw/source/core/text/porfld.hxx12
-rw-r--r--sw/source/core/text/porfly.cxx12
-rw-r--r--sw/source/core/text/porftn.hxx4
-rw-r--r--sw/source/core/text/porglue.cxx2
-rw-r--r--sw/source/core/text/porlay.cxx198
-rw-r--r--sw/source/core/text/porlay.hxx8
-rw-r--r--sw/source/core/text/porlin.cxx16
-rw-r--r--sw/source/core/text/porlin.hxx2
-rw-r--r--sw/source/core/text/pormulti.cxx174
-rw-r--r--sw/source/core/text/pormulti.hxx24
-rw-r--r--sw/source/core/text/porrst.cxx4
-rw-r--r--sw/source/core/text/porrst.hxx4
-rw-r--r--sw/source/core/text/portab.hxx6
-rw-r--r--sw/source/core/text/portxt.cxx18
-rw-r--r--sw/source/core/text/portxt.hxx2
-rw-r--r--sw/source/core/text/redlnitr.cxx6
-rw-r--r--sw/source/core/text/redlnitr.hxx2
-rw-r--r--sw/source/core/text/txtdrop.cxx30
-rw-r--r--sw/source/core/text/txtfld.cxx94
-rw-r--r--sw/source/core/text/txtfly.cxx24
-rw-r--r--sw/source/core/text/txtfly.hxx2
-rw-r--r--sw/source/core/text/txtfrm.cxx125
-rw-r--r--sw/source/core/text/txtftn.cxx26
-rw-r--r--sw/source/core/text/txthyph.cxx2
-rw-r--r--sw/source/core/text/txtio.cxx8
-rw-r--r--sw/source/core/text/txttab.cxx19
-rw-r--r--sw/source/core/text/widorp.cxx12
-rw-r--r--sw/source/core/text/wrong.cxx14
-rw-r--r--sw/source/core/text/xmldump.cxx18
-rw-r--r--sw/source/core/tox/makefile.mk56
-rw-r--r--sw/source/core/tox/tox.cxx130
-rw-r--r--sw/source/core/tox/toxhlp.cxx2
-rw-r--r--sw/source/core/tox/txmsrt.cxx123
-rw-r--r--sw/source/core/txtnode/atrfld.cxx21
-rw-r--r--sw/source/core/txtnode/atrflyin.cxx20
-rw-r--r--sw/source/core/txtnode/atrftn.cxx40
-rw-r--r--sw/source/core/txtnode/atrtox.cxx4
-rw-r--r--sw/source/core/txtnode/fmtatr2.cxx44
-rw-r--r--sw/source/core/txtnode/fntcache.cxx198
-rw-r--r--sw/source/core/txtnode/fntcap.cxx60
-rw-r--r--sw/source/core/txtnode/makefile.mk77
-rw-r--r--sw/source/core/txtnode/ndhints.cxx58
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx430
-rw-r--r--sw/source/core/txtnode/swfntcch.cxx8
-rw-r--r--sw/source/core/txtnode/swfont.cxx170
-rw-r--r--sw/source/core/txtnode/thints.cxx245
-rw-r--r--sw/source/core/txtnode/txatritr.cxx14
-rw-r--r--sw/source/core/txtnode/txtatr2.cxx38
-rw-r--r--sw/source/core/txtnode/txtedt.cxx239
-rw-r--r--sw/source/core/undo/SwUndoField.cxx41
-rw-r--r--sw/source/core/undo/SwUndoFmt.cxx123
-rw-r--r--sw/source/core/undo/SwUndoPageDesc.cxx96
-rw-r--r--sw/source/core/undo/SwUndoTOXChange.cxx15
-rw-r--r--sw/source/core/undo/docundo.cxx1128
-rw-r--r--sw/source/core/undo/makefile.mk81
-rw-r--r--sw/source/core/undo/rolbck.cxx164
-rw-r--r--sw/source/core/undo/unattr.cxx332
-rw-r--r--sw/source/core/undo/unbkmk.cxx18
-rw-r--r--sw/source/core/undo/undel.cxx160
-rw-r--r--sw/source/core/undo/undo.src2
-rw-r--r--sw/source/core/undo/undobj.cxx373
-rw-r--r--sw/source/core/undo/undobj1.cxx185
-rw-r--r--sw/source/core/undo/undoflystrattr.cxx9
-rw-r--r--sw/source/core/undo/undraw.cxx109
-rw-r--r--sw/source/core/undo/unfmco.cxx42
-rw-r--r--sw/source/core/undo/unins.cxx348
-rw-r--r--sw/source/core/undo/unmove.cxx49
-rw-r--r--sw/source/core/undo/unnum.cxx208
-rw-r--r--sw/source/core/undo/unoutl.cxx28
-rw-r--r--sw/source/core/undo/unovwr.cxx126
-rw-r--r--sw/source/core/undo/unredln.cxx188
-rw-r--r--sw/source/core/undo/unsect.cxx72
-rw-r--r--sw/source/core/undo/unsort.cxx106
-rw-r--r--sw/source/core/undo/unspnd.cxx56
-rw-r--r--sw/source/core/undo/untbl.cxx695
-rw-r--r--sw/source/core/undo/untblk.cxx90
-rw-r--r--sw/source/core/unocore/makefile.mk122
-rw-r--r--sw/source/core/unocore/swunohelper.cxx52
-rw-r--r--sw/source/core/unocore/unobkm.cxx9
-rw-r--r--sw/source/core/unocore/unochart.cxx12
-rw-r--r--sw/source/core/unocore/unocoll.cxx6
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx36
-rw-r--r--sw/source/core/unocore/unodraw.cxx19
-rw-r--r--sw/source/core/unocore/unoevent.cxx4
-rw-r--r--sw/source/core/unocore/unofield.cxx65
-rw-r--r--sw/source/core/unocore/unoflatpara.cxx18
-rw-r--r--sw/source/core/unocore/unoframe.cxx54
-rw-r--r--sw/source/core/unocore/unoidx.cxx12
-rw-r--r--sw/source/core/unocore/unomap.cxx3
-rw-r--r--sw/source/core/unocore/unoobj.cxx73
-rw-r--r--sw/source/core/unocore/unoobj2.cxx47
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx12
-rw-r--r--sw/source/core/unocore/unoport.cxx8
-rw-r--r--sw/source/core/unocore/unoportenum.cxx54
-rw-r--r--sw/source/core/unocore/unoprnms.cxx6
-rw-r--r--sw/source/core/unocore/unoredline.cxx10
-rw-r--r--sw/source/core/unocore/unoredlines.cxx4
-rw-r--r--sw/source/core/unocore/unorefmk.cxx2
-rw-r--r--sw/source/core/unocore/unosect.cxx15
-rw-r--r--sw/source/core/unocore/unosett.cxx58
-rw-r--r--sw/source/core/unocore/unosrch.cxx64
-rw-r--r--sw/source/core/unocore/unostyle.cxx55
-rw-r--r--sw/source/core/unocore/unotbl.cxx123
-rw-r--r--sw/source/core/unocore/unotext.cxx68
-rw-r--r--sw/source/core/unocore/unotextmarkup.cxx12
-rw-r--r--sw/source/core/view/makefile.mk61
-rw-r--r--sw/source/core/view/pagepreviewlayout.cxx9
-rw-r--r--sw/source/core/view/printdata.cxx198
-rw-r--r--sw/source/core/view/vdraw.cxx30
-rw-r--r--sw/source/core/view/viewimp.cxx28
-rw-r--r--sw/source/core/view/viewpg.cxx6
-rw-r--r--sw/source/core/view/viewsh.cxx281
-rw-r--r--sw/source/core/view/vnew.cxx26
-rw-r--r--sw/source/core/view/vprint.cxx215
-rw-r--r--sw/source/filter/ascii/ascatr.cxx20
-rw-r--r--sw/source/filter/ascii/makefile.mk57
-rw-r--r--sw/source/filter/ascii/parasc.cxx46
-rw-r--r--sw/source/filter/ascii/wrtasc.cxx22
-rw-r--r--sw/source/filter/ascii/wrtasc.hxx2
-rw-r--r--sw/source/filter/basflt/fltini.cxx660
-rw-r--r--sw/source/filter/basflt/iodetect.cxx76
-rw-r--r--sw/source/filter/basflt/makefile.mk57
-rw-r--r--sw/source/filter/basflt/shellio.cxx168
-rw-r--r--sw/source/filter/html/SwAppletImpl.cxx8
-rw-r--r--sw/source/filter/html/css1atr.cxx330
-rw-r--r--sw/source/filter/html/htmlatr.cxx478
-rw-r--r--sw/source/filter/html/htmlbas.cxx30
-rw-r--r--sw/source/filter/html/htmlcss1.cxx412
-rw-r--r--sw/source/filter/html/htmlctxt.cxx108
-rw-r--r--sw/source/filter/html/htmldraw.cxx6
-rw-r--r--sw/source/filter/html/htmlfld.cxx88
-rw-r--r--sw/source/filter/html/htmlfldw.cxx56
-rw-r--r--sw/source/filter/html/htmlfly.cxx262
-rw-r--r--sw/source/filter/html/htmlfly.hxx38
-rw-r--r--sw/source/filter/html/htmlflyt.cxx12
-rw-r--r--sw/source/filter/html/htmlform.cxx24
-rw-r--r--sw/source/filter/html/htmlforw.cxx2
-rw-r--r--sw/source/filter/html/htmlftn.cxx70
-rw-r--r--sw/source/filter/html/htmlgrin.cxx203
-rw-r--r--sw/source/filter/html/htmlnum.cxx8
-rw-r--r--sw/source/filter/html/htmlplug.cxx114
-rw-r--r--sw/source/filter/html/htmlsect.cxx18
-rw-r--r--sw/source/filter/html/htmltab.cxx29
-rw-r--r--sw/source/filter/html/htmltabw.cxx17
-rw-r--r--sw/source/filter/html/makefile.mk79
-rw-r--r--sw/source/filter/html/parcss1.cxx154
-rw-r--r--sw/source/filter/html/svxcss1.cxx642
-rw-r--r--sw/source/filter/html/swcss1.hxx94
-rw-r--r--sw/source/filter/html/swhtml.cxx602
-rw-r--r--sw/source/filter/html/swhtml.hxx8
-rw-r--r--sw/source/filter/html/wrthtml.cxx16
-rw-r--r--sw/source/filter/html/wrthtml.hxx6
-rw-r--r--sw/source/filter/inc/fltbase.hxx26
-rw-r--r--sw/source/filter/inc/fltglbls.hxx46
-rw-r--r--sw/source/filter/inc/fltini.hxx12
-rw-r--r--sw/source/filter/inc/fltshell.hxx240
-rw-r--r--sw/source/filter/inc/msfilter.hxx12
-rw-r--r--sw/source/filter/inc/rtf.hxx70
-rw-r--r--sw/source/filter/inc/wrt_fn.hxx2
-rw-r--r--sw/source/filter/inc/wrtswtbl.hxx172
-rw-r--r--sw/source/filter/makefile.mk67
-rw-r--r--sw/source/filter/rtf/makefile.mk60
-rw-r--r--sw/source/filter/rtf/rtffld.cxx58
-rw-r--r--sw/source/filter/rtf/rtffly.cxx182
-rw-r--r--sw/source/filter/rtf/rtfnum.cxx137
-rw-r--r--sw/source/filter/rtf/rtftbl.cxx143
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx465
-rw-r--r--sw/source/filter/rtf/swparrtf.hxx61
-rw-r--r--sw/source/filter/writer/makefile.mk58
-rw-r--r--sw/source/filter/writer/writer.cxx86
-rw-r--r--sw/source/filter/writer/wrt_fn.cxx10
-rw-r--r--sw/source/filter/writer/wrtswtbl.cxx220
-rw-r--r--sw/source/filter/ww1/fltshell.cxx383
-rw-r--r--sw/source/filter/ww1/makefile.mk93
-rw-r--r--sw/source/filter/ww1/w1class.cxx354
-rw-r--r--sw/source/filter/ww1/w1class.hxx612
-rw-r--r--sw/source/filter/ww1/w1filter.cxx206
-rw-r--r--sw/source/filter/ww1/w1par.cxx16
-rw-r--r--sw/source/filter/ww1/w1par.hxx2
-rw-r--r--sw/source/filter/ww1/w1sprm.cxx139
-rw-r--r--sw/source/filter/ww1/w1struct.hxx516
-rw-r--r--sw/source/filter/ww8/README-rtf.txt31
-rw-r--r--sw/source/filter/ww8/WW8FFData.cxx2
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.cxx2
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.hxx6
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx6
-rw-r--r--sw/source/filter/ww8/attributeoutputbase.hxx46
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx121
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx42
-rw-r--r--sw/source/filter/ww8/docxexport.cxx21
-rw-r--r--sw/source/filter/ww8/docxexport.hxx14
-rw-r--r--sw/source/filter/ww8/docxexportfilter.cxx125
-rw-r--r--sw/source/filter/ww8/docxexportfilter.hxx7
-rw-r--r--sw/source/filter/ww8/docxfootnotes.hxx1
-rw-r--r--sw/source/filter/ww8/escher.hxx32
-rw-r--r--sw/source/filter/ww8/makefile.mk91
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx112
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.hxx48
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx145
-rw-r--r--sw/source/filter/ww8/rtfexport.hxx37
-rw-r--r--sw/source/filter/ww8/rtfexportfilter.cxx9
-rw-r--r--sw/source/filter/ww8/rtfexportfilter.hxx9
-rw-r--r--sw/source/filter/ww8/rtfimportfilter.cxx10
-rw-r--r--sw/source/filter/ww8/rtfimportfilter.hxx7
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.cxx13
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.hxx9
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx40
-rw-r--r--sw/source/filter/ww8/writerhelper.hxx8
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx18
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx193
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx114
-rw-r--r--sw/source/filter/ww8/wrtw8num.cxx137
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx277
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx466
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx364
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx78
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx374
-rw-r--r--sw/source/filter/ww8/ww8attributeoutput.hxx50
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx20
-rw-r--r--sw/source/filter/ww8/ww8glsy.hxx10
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx296
-rw-r--r--sw/source/filter/ww8/ww8graf.hxx26
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx58
-rw-r--r--sw/source/filter/ww8/ww8par.cxx497
-rw-r--r--sw/source/filter/ww8/ww8par.hxx402
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx332
-rw-r--r--sw/source/filter/ww8/ww8par2.hxx68
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx74
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx50
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx142
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx466
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx636
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx940
-rw-r--r--sw/source/filter/ww8/ww8struc.hxx300
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx6
-rw-r--r--sw/source/filter/xml/makefile.mk76
-rw-r--r--sw/source/filter/xml/swxml.cxx28
-rw-r--r--sw/source/filter/xml/wrtxml.cxx6
-rw-r--r--sw/source/filter/xml/wrtxml.hxx6
-rw-r--r--sw/source/filter/xml/xmlexp.cxx4
-rw-r--r--sw/source/filter/xml/xmlexp.hxx2
-rw-r--r--sw/source/filter/xml/xmlfonte.cxx6
-rw-r--r--sw/source/filter/xml/xmlimp.cxx8
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx30
-rw-r--r--sw/source/filter/xml/xmlimpit.hxx8
-rw-r--r--sw/source/filter/xml/xmlitem.cxx6
-rw-r--r--sw/source/filter/xml/xmlitem.hxx6
-rw-r--r--sw/source/filter/xml/xmliteme.cxx2
-rw-r--r--sw/source/filter/xml/xmlitemi.cxx2
-rw-r--r--sw/source/filter/xml/xmlitmpr.cxx4
-rw-r--r--sw/source/filter/xml/xmlmeta.cxx4
-rw-r--r--sw/source/filter/xml/xmltble.cxx38
-rw-r--r--sw/source/filter/xml/xmltbli.cxx16
-rw-r--r--sw/source/filter/xml/xmltbli.hxx6
-rw-r--r--sw/source/filter/xml/xmltexte.cxx6
-rw-r--r--sw/source/ui/app/appenv.cxx78
-rw-r--r--sw/source/ui/app/apphdl.cxx44
-rw-r--r--sw/source/ui/app/applab.cxx2
-rw-r--r--sw/source/ui/app/appopt.cxx114
-rw-r--r--sw/source/ui/app/docsh.cxx211
-rw-r--r--sw/source/ui/app/docsh2.cxx305
-rw-r--r--sw/source/ui/app/docshini.cxx89
-rw-r--r--sw/source/ui/app/docst.cxx155
-rw-r--r--sw/source/ui/app/docstyle.cxx430
-rw-r--r--sw/source/ui/app/mainwn.cxx12
-rw-r--r--sw/source/ui/app/makefile.mk95
-rw-r--r--sw/source/ui/app/mn.src506
-rw-r--r--sw/source/ui/app/swmodul1.cxx20
-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/makefile.mk59
-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.cxx45
-rw-r--r--sw/source/ui/chrdlg/ccoll.cxx12
-rw-r--r--sw/source/ui/chrdlg/ccoll.src5
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx30
-rw-r--r--sw/source/ui/chrdlg/chardlg.src8
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx142
-rw-r--r--sw/source/ui/chrdlg/drpcps.src7
-rw-r--r--sw/source/ui/chrdlg/makefile.mk72
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx66
-rw-r--r--sw/source/ui/chrdlg/numpara.src8
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx26
-rw-r--r--sw/source/ui/chrdlg/swbreak.src8
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx48
-rw-r--r--sw/source/ui/config/barcfg.cxx4
-rw-r--r--sw/source/ui/config/caption.cxx8
-rw-r--r--sw/source/ui/config/cfgitems.cxx38
-rw-r--r--sw/source/ui/config/fontcfg.cxx16
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx4
-rw-r--r--sw/source/ui/config/mailconfigpage.src22
-rw-r--r--sw/source/ui/config/makefile.mk87
-rw-r--r--sw/source/ui/config/modcfg.cxx44
-rw-r--r--sw/source/ui/config/optcomp.cxx82
-rw-r--r--sw/source/ui/config/optcomp.src3
-rw-r--r--sw/source/ui/config/optdlg.hrc15
-rw-r--r--sw/source/ui/config/optdlg.src107
-rw-r--r--sw/source/ui/config/optload.cxx112
-rw-r--r--sw/source/ui/config/optload.src18
-rw-r--r--sw/source/ui/config/optpage.cxx481
-rw-r--r--sw/source/ui/config/prtopt.cxx5
-rw-r--r--sw/source/ui/config/redlopt.src8
-rw-r--r--sw/source/ui/config/uinums.cxx114
-rw-r--r--sw/source/ui/config/usrpref.cxx186
-rw-r--r--sw/source/ui/config/viewopt.cxx44
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx10
-rw-r--r--sw/source/ui/dbui/addresslistdialog.src5
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx18
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.src13
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.cxx16
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.src7
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx210
-rw-r--r--sw/source/ui/dbui/dbinsdlg.src21
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx347
-rw-r--r--sw/source/ui/dbui/dbtree.cxx34
-rw-r--r--sw/source/ui/dbui/dbui.src1
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.cxx6
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.src1
-rw-r--r--sw/source/ui/dbui/mailmergehelper.cxx8
-rw-r--r--sw/source/ui/dbui/mailmergewizard.src1
-rw-r--r--sw/source/ui/dbui/makefile.mk108
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx87
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hxx2
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.src23
-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/mmdocselectpage.src8
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx20
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.src6
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx20
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.src6
-rw-r--r--sw/source/ui/dbui/mmmergepage.src6
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx63
-rw-r--r--sw/source/ui/dbui/mmoutputpage.src27
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.src2
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.src7
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx4
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.src1
-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/abstract.src2
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx68
-rw-r--r--sw/source/ui/dialog/ascfldlg.src6
-rw-r--r--sw/source/ui/dialog/docstdlg.cxx34
-rw-r--r--sw/source/ui/dialog/docstdlg.hrc4
-rw-r--r--sw/source/ui/dialog/docstdlg.src1
-rw-r--r--sw/source/ui/dialog/macassgn.cxx16
-rw-r--r--sw/source/ui/dialog/makefile.mk99
-rw-r--r--sw/source/ui/dialog/regionsw.cxx44
-rw-r--r--sw/source/ui/dialog/regionsw.src44
-rw-r--r--sw/source/ui/dialog/swabstdlg.cxx5
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx122
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx117
-rw-r--r--sw/source/ui/dialog/swwrtshitem.cxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx378
-rw-r--r--sw/source/ui/dochdl/gloshdl.cxx182
-rw-r--r--sw/source/ui/dochdl/makefile.mk65
-rw-r--r--sw/source/ui/dochdl/selglos.src3
-rw-r--r--sw/source/ui/dochdl/swdtflvr.cxx392
-rw-r--r--sw/source/ui/docvw/AnnotationMenuButton.cxx21
-rw-r--r--sw/source/ui/docvw/AnnotationWin.cxx17
-rw-r--r--sw/source/ui/docvw/PostItMgr.cxx15
-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.cxx27
-rw-r--r--sw/source/ui/docvw/access.src19
-rw-r--r--sw/source/ui/docvw/docvw.src22
-rw-r--r--sw/source/ui/docvw/edtdd.cxx84
-rw-r--r--sw/source/ui/docvw/edtwin.cxx884
-rw-r--r--sw/source/ui/docvw/edtwin2.cxx43
-rw-r--r--sw/source/ui/docvw/edtwin3.cxx24
-rw-r--r--sw/source/ui/docvw/extedit.cxx2
-rw-r--r--sw/source/ui/docvw/makefile.mk70
-rw-r--r--sw/source/ui/docvw/romenu.cxx80
-rw-r--r--sw/source/ui/docvw/romenu.hxx8
-rw-r--r--sw/source/ui/docvw/srcedtw.cxx127
-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/envfmt.src9
-rw-r--r--sw/source/ui/envelp/envimg.cxx14
-rw-r--r--sw/source/ui/envelp/envlop.src7
-rw-r--r--sw/source/ui/envelp/envlop1.cxx52
-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/envprt.src17
-rw-r--r--sw/source/ui/envelp/label.src44
-rw-r--r--sw/source/ui/envelp/label1.cxx20
-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/labfmt.src11
-rw-r--r--sw/source/ui/envelp/labimg.cxx6
-rw-r--r--sw/source/ui/envelp/labprt.cxx18
-rw-r--r--sw/source/ui/envelp/labprt.hxx6
-rw-r--r--sw/source/ui/envelp/labprt.src6
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx51
-rw-r--r--sw/source/ui/envelp/mailmrge.src29
-rw-r--r--sw/source/ui/envelp/makefile.mk79
-rw-r--r--sw/source/ui/envelp/swuilabimp.hxx7
-rw-r--r--sw/source/ui/envelp/syncbtn.cxx2
-rw-r--r--sw/source/ui/fldui/DropDownFieldDialog.cxx10
-rw-r--r--sw/source/ui/fldui/DropDownFieldDialog.src3
-rw-r--r--sw/source/ui/fldui/changedb.cxx20
-rw-r--r--sw/source/ui/fldui/changedb.src2
-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/flddb.src8
-rw-r--r--sw/source/ui/fldui/flddinf.cxx100
-rw-r--r--sw/source/ui/fldui/flddinf.hxx10
-rw-r--r--sw/source/ui/fldui/flddinf.src3
-rw-r--r--sw/source/ui/fldui/flddok.cxx128
-rw-r--r--sw/source/ui/fldui/flddok.hxx12
-rw-r--r--sw/source/ui/fldui/flddok.src8
-rw-r--r--sw/source/ui/fldui/fldedt.cxx39
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx142
-rw-r--r--sw/source/ui/fldui/fldfunc.hxx6
-rw-r--r--sw/source/ui/fldui/fldfunc.src15
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx292
-rw-r--r--sw/source/ui/fldui/fldpage.cxx40
-rw-r--r--sw/source/ui/fldui/fldpage.hxx44
-rw-r--r--sw/source/ui/fldui/fldref.cxx146
-rw-r--r--sw/source/ui/fldui/fldref.hxx6
-rw-r--r--sw/source/ui/fldui/fldref.src5
-rw-r--r--sw/source/ui/fldui/fldtdlg.cxx28
-rw-r--r--sw/source/ui/fldui/fldvar.cxx246
-rw-r--r--sw/source/ui/fldui/fldvar.hxx16
-rw-r--r--sw/source/ui/fldui/fldvar.src9
-rw-r--r--sw/source/ui/fldui/fldwrap.cxx28
-rw-r--r--sw/source/ui/fldui/inpdlg.cxx22
-rw-r--r--sw/source/ui/fldui/inpdlg.src3
-rw-r--r--sw/source/ui/fldui/javaedit.cxx14
-rw-r--r--sw/source/ui/fldui/javaedit.src9
-rw-r--r--sw/source/ui/fldui/makefile.mk90
-rw-r--r--sw/source/ui/fldui/xfldui.cxx10
-rw-r--r--sw/source/ui/fmtui/makefile.mk54
-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.cxx253
-rw-r--r--sw/source/ui/frmdlg/column.hrc1
-rw-r--r--sw/source/ui/frmdlg/column.src27
-rw-r--r--sw/source/ui/frmdlg/cption.cxx8
-rw-r--r--sw/source/ui/frmdlg/cption.src13
-rw-r--r--sw/source/ui/frmdlg/frmdlg.cxx19
-rw-r--r--sw/source/ui/frmdlg/frmmgr.cxx64
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx575
-rw-r--r--sw/source/ui/frmdlg/frmpage.src44
-rw-r--r--sw/source/ui/frmdlg/makefile.mk78
-rw-r--r--sw/source/ui/frmdlg/uiborder.cxx2
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx90
-rw-r--r--sw/source/ui/frmdlg/wrap.src14
-rw-r--r--sw/source/ui/globdoc/makefile.mk54
-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
-rw-r--r--sw/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.hxx12
-rw-r--r--sw/source/ui/inc/break.hxx12
-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.hxx48
-rw-r--r--sw/source/ui/inc/column.hxx44
-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.hxx21
-rw-r--r--sw/source/ui/inc/drawbase.hxx26
-rw-r--r--sw/source/ui/inc/drpcps.hxx16
-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.hxx8
-rw-r--r--sw/source/ui/inc/fldedt.hxx6
-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.hxx19
-rw-r--r--sw/source/ui/inc/frmmgr.hxx23
-rw-r--r--sw/source/ui/inc/frmpage.hxx104
-rw-r--r--sw/source/ui/inc/glosbib.hxx9
-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.hxx33
-rw-r--r--sw/source/ui/inc/insfnote.hxx14
-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.hxx12
-rw-r--r--sw/source/ui/inc/label.hxx8
-rw-r--r--sw/source/ui/inc/langhelper.hxx8
-rw-r--r--sw/source/ui/inc/linenum.hxx8
-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/navmgr.hxx4
-rw-r--r--sw/source/ui/inc/num.hxx24
-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.hxx10
-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.hxx70
-rw-r--r--sw/source/ui/inc/outline.hxx20
-rw-r--r--sw/source/ui/inc/pgfnote.hxx8
-rw-r--r--sw/source/ui/inc/pggrid.hxx4
-rw-r--r--sw/source/ui/inc/prcntfld.hxx10
-rw-r--r--sw/source/ui/inc/pview.hxx57
-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/ribbar.hrc3
-rw-r--r--sw/source/ui/inc/rowht.hxx2
-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.hxx10
-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.hxx8
-rw-r--r--sw/source/ui/inc/swcont.hxx16
-rw-r--r--sw/source/ui/inc/swdtflvr.hxx68
-rw-r--r--sw/source/ui/inc/swlbox.hxx34
-rw-r--r--sw/source/ui/inc/swmn_tmpl.hrc386
-rw-r--r--sw/source/ui/inc/swmodalredlineacceptdlg.hxx2
-rw-r--r--sw/source/ui/inc/swrenamexnameddlg.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.hxx66
-rw-r--r--sw/source/ui/inc/swuiidxmrk.hxx12
-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.hxx14
-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/titlepage.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/toolbox.hrc (renamed from sw/source/ui/inc/toolbox_tmpl.hrc)0
-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.hxx20
-rw-r--r--sw/source/ui/inc/uivwimp.hxx9
-rw-r--r--sw/source/ui/inc/unotools.hxx2
-rw-r--r--sw/source/ui/inc/unotxvw.hxx14
-rw-r--r--sw/source/ui/inc/usrpref.hxx31
-rw-r--r--sw/source/ui/inc/view.hxx220
-rw-r--r--sw/source/ui/inc/viewlayoutctrl.hxx6
-rw-r--r--sw/source/ui/inc/workctrl.hxx30
-rw-r--r--sw/source/ui/inc/wrap.hxx32
-rw-r--r--sw/source/ui/inc/wrtsh.hxx382
-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.cxx137
-rw-r--r--sw/source/ui/index/cnttab.hrc1
-rw-r--r--sw/source/ui/index/cnttab.src78
-rw-r--r--sw/source/ui/index/idxmrk.src13
-rw-r--r--sw/source/ui/index/makefile.mk67
-rw-r--r--sw/source/ui/index/multmrk.cxx4
-rw-r--r--sw/source/ui/index/multmrk.src3
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx61
-rw-r--r--sw/source/ui/index/toxmgr.cxx68
-rw-r--r--sw/source/ui/lingu/hhcwrp.cxx6
-rw-r--r--sw/source/ui/lingu/makefile.mk56
-rw-r--r--sw/source/ui/lingu/olmenu.cxx61
-rw-r--r--sw/source/ui/makefile.mk101
-rw-r--r--sw/source/ui/misc/bookmark.cxx45
-rw-r--r--sw/source/ui/misc/bookmark.src4
-rw-r--r--sw/source/ui/misc/docfnote.cxx65
-rw-r--r--sw/source/ui/misc/docfnote.src26
-rw-r--r--sw/source/ui/misc/glosbib.cxx97
-rw-r--r--sw/source/ui/misc/glosbib.src5
-rw-r--r--sw/source/ui/misc/glosdoc.cxx14
-rw-r--r--sw/source/ui/misc/glossary.cxx35
-rw-r--r--sw/source/ui/misc/glossary.src23
-rw-r--r--sw/source/ui/misc/glshell.cxx30
-rw-r--r--sw/source/ui/misc/impfnote.hxx16
-rw-r--r--sw/source/ui/misc/insfnote.cxx56
-rw-r--r--sw/source/ui/misc/insfnote.hrc4
-rw-r--r--sw/source/ui/misc/insfnote.src15
-rw-r--r--sw/source/ui/misc/insrule.cxx8
-rw-r--r--sw/source/ui/misc/linenum.cxx41
-rw-r--r--sw/source/ui/misc/linenum.src11
-rw-r--r--sw/source/ui/misc/makefile.mk93
-rw-r--r--sw/source/ui/misc/num.cxx169
-rw-r--r--sw/source/ui/misc/num.src12
-rw-r--r--sw/source/ui/misc/numberingtypelistbox.cxx20
-rw-r--r--sw/source/ui/misc/outline.cxx219
-rw-r--r--sw/source/ui/misc/outline.src10
-rw-r--r--sw/source/ui/misc/pgfnote.cxx56
-rw-r--r--sw/source/ui/misc/pgfnote.src8
-rw-r--r--sw/source/ui/misc/pggrid.cxx18
-rw-r--r--sw/source/ui/misc/pggrid.src13
-rw-r--r--sw/source/ui/misc/redlndlg.cxx227
-rw-r--r--sw/source/ui/misc/srtdlg.cxx126
-rw-r--r--sw/source/ui/misc/srtdlg.src25
-rw-r--r--sw/source/ui/misc/swmodalredlineacceptdlg.cxx16
-rw-r--r--sw/source/ui/misc/titlepage.cxx48
-rw-r--r--sw/source/ui/ribbar/conarc.cxx16
-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.cxx143
-rw-r--r--sw/source/ui/ribbar/dselect.cxx18
-rwxr-xr-x[-rw-r--r--]sw/source/ui/ribbar/inputwin.cxx165
-rw-r--r--sw/source/ui/ribbar/inputwin.src12
-rw-r--r--sw/source/ui/ribbar/makefile.mk69
-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.cxx110
-rw-r--r--sw/source/ui/ribbar/workctrl.src145
-rw-r--r--sw/source/ui/shells/annotsh.cxx124
-rw-r--r--sw/source/ui/shells/basesh.cxx377
-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.cxx107
-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.cxx116
-rw-r--r--sw/source/ui/shells/grfsh.cxx68
-rw-r--r--sw/source/ui/shells/grfshex.cxx1
-rwxr-xr-x[-rw-r--r--]sw/source/ui/shells/langhelper.cxx44
-rw-r--r--sw/source/ui/shells/listsh.cxx28
-rw-r--r--sw/source/ui/shells/makefile.mk84
-rw-r--r--sw/source/ui/shells/mediash.cxx12
-rw-r--r--sw/source/ui/shells/navsh.cxx14
-rw-r--r--sw/source/ui/shells/shells.src834
-rw-r--r--sw/source/ui/shells/tabsh.cxx233
-rw-r--r--sw/source/ui/shells/textdrw.cxx2
-rw-r--r--sw/source/ui/shells/textfld.cxx148
-rw-r--r--sw/source/ui/shells/textglos.cxx24
-rw-r--r--sw/source/ui/shells/textidx.cxx26
-rw-r--r--sw/source/ui/shells/textsh.cxx200
-rw-r--r--sw/source/ui/shells/textsh1.cxx202
-rw-r--r--sw/source/ui/shells/textsh2.cxx22
-rw-r--r--sw/source/ui/shells/txtattr.cxx74
-rw-r--r--sw/source/ui/shells/txtcrsr.cxx84
-rw-r--r--sw/source/ui/shells/txtnum.cxx30
-rw-r--r--sw/source/ui/smartmenu/makefile.mk53
-rw-r--r--sw/source/ui/smartmenu/stmenu.cxx14
-rw-r--r--sw/source/ui/table/chartins.cxx8
-rw-r--r--sw/source/ui/table/chartins.src6
-rw-r--r--sw/source/ui/table/colwd.cxx14
-rw-r--r--sw/source/ui/table/colwd.src4
-rw-r--r--sw/source/ui/table/convert.cxx26
-rw-r--r--sw/source/ui/table/convert.hrc3
-rw-r--r--sw/source/ui/table/convert.src20
-rw-r--r--sw/source/ui/table/instable.cxx16
-rw-r--r--sw/source/ui/table/instable.src11
-rw-r--r--sw/source/ui/table/makefile.mk81
-rw-r--r--sw/source/ui/table/mergetbl.cxx2
-rw-r--r--sw/source/ui/table/mergetbl.src4
-rw-r--r--sw/source/ui/table/rowht.cxx2
-rw-r--r--sw/source/ui/table/rowht.src4
-rw-r--r--sw/source/ui/table/splittbl.src6
-rw-r--r--sw/source/ui/table/swtablerep.cxx34
-rw-r--r--sw/source/ui/table/tabledlg.cxx385
-rw-r--r--sw/source/ui/table/tabledlg.hrc1
-rw-r--r--sw/source/ui/table/tabledlg.src41
-rw-r--r--sw/source/ui/table/tablemgr.cxx48
-rw-r--r--sw/source/ui/table/tablepg.hxx45
-rw-r--r--sw/source/ui/table/tautofmt.cxx118
-rw-r--r--sw/source/ui/table/tautofmt.src11
-rw-r--r--sw/source/ui/uiview/formatclipboard.cxx54
-rw-r--r--sw/source/ui/uiview/makefile.mk77
-rw-r--r--sw/source/ui/uiview/pview.cxx273
-rw-r--r--sw/source/ui/uiview/pview.src91
-rw-r--r--sw/source/ui/uiview/scroll.cxx26
-rw-r--r--sw/source/ui/uiview/srcview.cxx128
-rw-r--r--sw/source/ui/uiview/swcli.cxx23
-rw-r--r--sw/source/ui/uiview/uivwimp.cxx16
-rw-r--r--sw/source/ui/uiview/view.cxx111
-rwxr-xr-x[-rw-r--r--]sw/source/ui/uiview/view.hrc0
-rw-r--r--sw/source/ui/uiview/view.src154
-rw-r--r--sw/source/ui/uiview/view0.cxx24
-rw-r--r--sw/source/ui/uiview/view1.cxx20
-rw-r--r--sw/source/ui/uiview/view2.cxx307
-rw-r--r--sw/source/ui/uiview/viewcoll.cxx6
-rw-r--r--sw/source/ui/uiview/viewdlg.cxx12
-rw-r--r--sw/source/ui/uiview/viewdlg2.cxx24
-rw-r--r--sw/source/ui/uiview/viewdraw.cxx8
-rw-r--r--sw/source/ui/uiview/viewfunc.hxx12
-rw-r--r--sw/source/ui/uiview/viewling.cxx6
-rw-r--r--sw/source/ui/uiview/viewmdi.cxx80
-rw-r--r--sw/source/ui/uiview/viewport.cxx244
-rw-r--r--sw/source/ui/uiview/viewprt.cxx76
-rw-r--r--sw/source/ui/uiview/viewsrch.cxx129
-rw-r--r--sw/source/ui/uiview/viewstat.cxx13
-rw-r--r--sw/source/ui/uiview/viewtab.cxx395
-rw-r--r--sw/source/ui/uno/SwXDocumentSettings.cxx34
-rw-r--r--sw/source/ui/uno/SwXPrintPreviewSettings.cxx370
-rw-r--r--sw/source/ui/uno/SwXPrintPreviewSettings.hxx90
-rw-r--r--sw/source/ui/uno/detreg.cxx24
-rw-r--r--sw/source/ui/uno/makefile.mk82
-rw-r--r--sw/source/ui/uno/swdet2.cxx6
-rw-r--r--sw/source/ui/uno/swdetect.cxx31
-rw-r--r--sw/source/ui/uno/swdetect.hxx4
-rw-r--r--sw/source/ui/uno/unoatxt.cxx16
-rw-r--r--sw/source/ui/uno/unofreg.cxx95
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx42
-rw-r--r--sw/source/ui/uno/unomod.cxx64
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx223
-rw-r--r--sw/source/ui/uno/unotxvw.cxx33
-rw-r--r--sw/source/ui/utlui/attrdesc.cxx36
-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.cxx31
-rw-r--r--sw/source/ui/utlui/glbltree.cxx224
-rw-r--r--sw/source/ui/utlui/gloslst.cxx76
-rw-r--r--sw/source/ui/utlui/gloslst.src1
-rw-r--r--sw/source/ui/utlui/initui.cxx18
-rw-r--r--sw/source/ui/utlui/makefile.mk79
-rw-r--r--sw/source/ui/utlui/navicfg.cxx4
-rw-r--r--sw/source/ui/utlui/navipi.cxx201
-rw-r--r--sw/source/ui/utlui/navipi.hrc1
-rw-r--r--sw/source/ui/utlui/navipi.src13
-rw-r--r--sw/source/ui/utlui/numfmtlb.cxx78
-rw-r--r--sw/source/ui/utlui/poolfmt.src23
-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/swrenamexnameddlg.cxx4
-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.cxx20
-rw-r--r--sw/source/ui/utlui/uitool.cxx108
-rw-r--r--sw/source/ui/utlui/unotools.cxx8
-rw-r--r--sw/source/ui/utlui/unotools.src1
-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/makefile.mk140
-rw-r--r--sw/source/ui/vba/service.cxx14
-rw-r--r--sw/source/ui/vba/vbadocumentproperties.cxx2
-rw-r--r--sw/source/ui/vba/vbadocuments.cxx25
-rw-r--r--sw/source/ui/vba/vbadocuments.hxx5
-rw-r--r--sw/source/ui/vba/vbaeventshelper.cxx5
-rw-r--r--sw/source/ui/vba/vbaeventshelper.hxx1
-rw-r--r--sw/source/ui/vba/vbafield.cxx10
-rw-r--r--sw/source/ui/vba/vbaselection.cxx2
-rw-r--r--sw/source/ui/vba/vbatablehelper.cxx18
-rw-r--r--sw/source/ui/vba/vbatablehelper.hxx6
-rw-r--r--sw/source/ui/web/makefile.mk62
-rw-r--r--sw/source/ui/web/web.src262
-rw-r--r--sw/source/ui/web/wtextsh.cxx2
-rw-r--r--sw/source/ui/web/wview.cxx29
-rw-r--r--sw/source/ui/wrtsh/delete.cxx36
-rw-r--r--sw/source/ui/wrtsh/makefile.mk62
-rw-r--r--sw/source/ui/wrtsh/move.cxx202
-rw-r--r--sw/source/ui/wrtsh/navmgr.cxx4
-rw-r--r--sw/source/ui/wrtsh/select.cxx238
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx209
-rw-r--r--sw/source/ui/wrtsh/wrtsh2.cxx91
-rw-r--r--sw/source/ui/wrtsh/wrtsh3.cxx16
-rw-r--r--sw/source/ui/wrtsh/wrtsh4.cxx56
-rw-r--r--sw/source/ui/wrtsh/wrtundo.cxx72
-rw-r--r--sw/util/hidother.src18
-rw-r--r--sw/util/makefile.mk390
-rw-r--r--sw/util/msword.component37
-rw-r--r--sw/util/msword.map14
-rw-r--r--sw/util/sw.component104
-rw-r--r--sw/util/sw.flt136
-rw-r--r--sw/util/swd.component36
-rw-r--r--sw/util/swui.map6
-rw-r--r--sw/util/vbaswobj.component43
1433 files changed, 56824 insertions, 59693 deletions
diff --git a/starmath/inc/applicat.hxx b/starmath/inc/applicat.hxx
index 1b896164099f..d708d3d76c2d 100644
--- a/starmath/inc/applicat.hxx
+++ b/starmath/inc/applicat.hxx
@@ -38,10 +38,6 @@ class SvxErrorHandler;
#define APPLICATIONNAME "smath3"
-#ifdef WIN
-#define RELEASE "WIN304"
-#endif
-
#ifdef PM2
#define RELEASE "PM304"
#endif
@@ -58,7 +54,7 @@ class SvxErrorHandler;
class SmResId : public ResId
{
public:
- SmResId(USHORT nId) :
+ SmResId(sal_uInt16 nId) :
ResId(nId)
{
}
@@ -67,31 +63,6 @@ public:
#endif
-#ifndef _DLL_
-class SmDLL;
-
-class SmApplicat: public SfxApplication
-{
-protected:
- SvxErrorHandler *pSvxErrorHandler;
-
- virtual void OpenClients();
-
- // initialization / deinitialization
- virtual void Init();
- virtual void Exit();
-
-public:
- void Main();
-
- SmApplicat() :
- SfxApplication("iso")
- {
- }
-
-};
-
-#endif
#endif
diff --git a/starmath/inc/config.hxx b/starmath/inc/config.hxx
index 9d87ba0abd2b..9fc397eca0cc 100644
--- a/starmath/inc/config.hxx
+++ b/starmath/inc/config.hxx
@@ -48,7 +48,7 @@ public:
SmConfig();
virtual ~SmConfig();
- SmFontPickList & GetFontPickList(USHORT nIdent) { return vFontPickList[nIdent]; }
+ SmFontPickList & GetFontPickList(sal_uInt16 nIdent) { return vFontPickList[nIdent]; }
void ItemSetToConfig(const SfxItemSet &rSet);
void ConfigToItemSet(SfxItemSet &rSet) const;
diff --git a/starmath/inc/cursor.hxx b/starmath/inc/cursor.hxx
index b5fbd13e28cb..0de8931673d9 100644
--- a/starmath/inc/cursor.hxx
+++ b/starmath/inc/cursor.hxx
@@ -145,7 +145,7 @@ public:
void InsertElement(SmFormulaElement element);
/** Insert a command specified in commands.src*/
- void InsertCommand(USHORT nCommand);
+ void InsertCommand(sal_uInt16 nCommand);
/** Insert command text translated into line entries at position
*
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index ea548a9ee528..316d1fb7ca62 100644..100755
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -70,10 +70,11 @@ class SmPrintOptionsTabPage : public SfxTabPage
MetricField aZoom;
FixedLine aFixedLine3;
CheckBox aNoRightSpaces;
+ CheckBox aSaveOnlyUsedSymbols;
DECL_LINK(SizeButtonClickHdl, Button *);
- virtual BOOL FillItemSet(SfxItemSet& rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet& rSet);
virtual void Reset(const SfxItemSet& rSet);
public:
@@ -201,22 +202,22 @@ class SmCategoryDesc : public Resource
XubString Name;
XubString *Strings[4];
Bitmap *Graphics[4]; /* regular bitmaps */
- USHORT Minimum[4];
- USHORT Maximum[4];
- USHORT Value[4];
+ sal_uInt16 Minimum[4];
+ sal_uInt16 Maximum[4];
+ sal_uInt16 Value[4];
public:
- SmCategoryDesc(const ResId &rResId, USHORT nCategoryIdx);
+ SmCategoryDesc(const ResId &rResId, sal_uInt16 nCategoryIdx);
~SmCategoryDesc();
const XubString & GetName() const { return Name; }
- const XubString * GetString(USHORT Index) const { return Strings[Index]; }
- USHORT GetMinimum(USHORT Index) { return Minimum[Index]; }
- USHORT GetMaximum(USHORT Index) { return Maximum[Index]; }
- USHORT GetValue(USHORT Index) const { return Value[Index]; }
- void SetValue(USHORT Index, USHORT nVal) { Value[Index] = nVal;}
+ const XubString * GetString(sal_uInt16 Index) const { return Strings[Index]; }
+ sal_uInt16 GetMinimum(sal_uInt16 Index) { return Minimum[Index]; }
+ sal_uInt16 GetMaximum(sal_uInt16 Index) { return Maximum[Index]; }
+ sal_uInt16 GetValue(sal_uInt16 Index) const { return Value[Index]; }
+ void SetValue(sal_uInt16 Index, sal_uInt16 nVal) { Value[Index] = nVal;}
- const Bitmap * GetGraphic(USHORT Index) const
+ const Bitmap * GetGraphic(sal_uInt16 Index) const
{
return Graphics[Index];
}
@@ -242,7 +243,7 @@ class SmDistanceDialog : public ModalDialog
FixedLine aFixedLine;
SmCategoryDesc *Categories[NOCATEGORIES];
- USHORT nActiveCategory;
+ sal_uInt16 nActiveCategory;
bool bScaleAllBrackets;
DECL_LINK(GetFocusHdl, Control *);
@@ -251,8 +252,8 @@ class SmDistanceDialog : public ModalDialog
DECL_LINK(CheckBoxClickHdl, CheckBox *);
using Window::SetHelpId;
- void SetHelpId(MetricField &rField, ULONG nHelpId);
- void SetCategory(USHORT Category);
+ void SetHelpId(MetricField &rField, const rtl::OString& sHelpId);
+ void SetCategory(sal_uInt16 Category);
public:
SmDistanceDialog(Window *pParent, bool bFreeRes = true);
@@ -297,9 +298,9 @@ class SmShowSymbolSet : public Control
Size aOutputSize;
Link aSelectHdlLink;
Link aDblClickHdlLink;
- USHORT nLen;
- USHORT nRows, nColumns;
- USHORT nSelectSymbol;
+ sal_uInt16 nLen;
+ sal_uInt16 nRows, nColumns;
+ sal_uInt16 nSelectSymbol;
virtual void Paint(const Rectangle&);
virtual void MouseButtonDown(const MouseEvent& rMEvt);
@@ -312,8 +313,8 @@ public:
void SetSymbolSet(const SymbolPtrVec_t& rSymbolSet);
- void SelectSymbol(USHORT nSymbol);
- USHORT GetSelectSymbol() const { return nSelectSymbol; }
+ void SelectSymbol(sal_uInt16 nSymbol);
+ sal_uInt16 GetSelectSymbol() const { return nSelectSymbol; }
void SetSelectHdl(const Link& rLink) { aSelectHdlLink = rLink; }
void SetDblClickHdl(const Link& rLink) { aDblClickHdlLink = rLink; }
@@ -379,8 +380,8 @@ public:
virtual ~SmSymbolDialog();
bool SelectSymbolSet(const XubString &rSymbolSetName);
- void SelectSymbol(USHORT nSymbolPos);
- USHORT GetSelectedSymbol() const { return aSymbolSetDisplay.GetSelectSymbol(); }
+ void SelectSymbol(sal_uInt16 nSymbolPos);
+ sal_uInt16 GetSelectedSymbol() const { return aSymbolSetDisplay.GetSelectSymbol(); }
};
////////////////////////////////////////////////////////////////////////////////
@@ -395,8 +396,8 @@ public:
{
}
- void SetChar(xub_Unicode aChar);
- void SetFont(const Font &rFont);
+ void SetSymbol( const SmSym *pSym );
+ void SetSymbol( sal_UCS4 cChar, const Font &rFont );
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index 21b47a1f318c..97753d9446e1 100644..100755
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -31,19 +31,21 @@
#define SMDLL 1
-#include <sot/storage.hxx>
-#include <sot/sotref.hxx>
+#include <rtl/ustring.hxx>
+#include <sfx2/docfac.hxx>
#include <sfx2/objsh.hxx>
+#include <sot/sotref.hxx>
+#include <sot/storage.hxx>
#include <svl/lstner.hxx>
-#include <sfx2/docfac.hxx>
+#include <vcl/jobset.hxx>
#include <vcl/virdev.hxx>
+#include <set>
+
#include "format.hxx"
#include "parse.hxx"
#include "smmod.hxx"
-#include <vcl/jobset.hxx>
-
class SmNode;
class SfxMenuBarManager;
class SfxPrinter;
@@ -52,15 +54,15 @@ class SmCursor;
#define HINT_DATACHANGED 1004
-#define SM30BIDENT ((ULONG)0x534D3033L)
-#define SM30IDENT ((ULONG)0x30334d53L)
-#define SM304AIDENT ((ULONG)0x34303330L)
-#define SM30VERSION ((ULONG)0x00010000L)
+#define SM30BIDENT ((sal_uLong)0x534D3033L)
+#define SM30IDENT ((sal_uLong)0x30334d53L)
+#define SM304AIDENT ((sal_uLong)0x34303330L)
+#define SM30VERSION ((sal_uLong)0x00010000L)
#define SM50VERSION ((ULONG)0x00010001L) //Difference to SM30VERSION is
//the new border in the format.
-#define FRMIDENT ((ULONG)0x03031963L)
-#define FRMVERSION ((ULONG)0x00010001L)
+#define FRMIDENT ((sal_uLong)0x03031963L)
+#define FRMVERSION ((sal_uLong)0x00010001L)
#define STAROFFICE_XML "StarOffice XML (Math)"
#define MATHML_XML "MathML XML (Math)"
@@ -124,9 +126,10 @@ class SmDocShell : public SfxObjectShell, public SfxListener
nRightBorder,
nTopBorder,
nBottomBorder;
- USHORT nModifyCount;
+ sal_uInt16 nModifyCount;
bool bIsFormulaArranged;
SmCursor *pCursor;
+ std::set< rtl::OUString > aUsedSymbols; // to export used symbols only when saving
@@ -137,7 +140,7 @@ class SmDocShell : public SfxObjectShell, public SfxListener
virtual void Draw(OutputDevice *pDevice,
const JobSetup & rSetup,
- USHORT nAspect = ASPECT_CONTENT);
+ sal_uInt16 nAspect = ASPECT_CONTENT);
virtual void FillClass(SvGlobalName* pClassName,
sal_uInt32* pFormat,
@@ -147,16 +150,16 @@ class SmDocShell : public SfxObjectShell, public SfxListener
sal_Int32 nFileFormat,
sal_Bool bTemplate = sal_False ) const;
- virtual BOOL SetData( const String& rData );
- virtual ULONG GetMiscStatus() const;
+ virtual sal_Bool SetData( const String& rData );
+ virtual sal_uLong GetMiscStatus() const;
virtual void OnDocumentPrinterChanged( Printer * );
virtual sal_Bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
- virtual BOOL Load( SfxMedium& rMedium );
+ virtual sal_Bool Load( SfxMedium& rMedium );
void ImplSave( SvStorageStreamRef xStrm );
- virtual BOOL Save();
- virtual BOOL SaveAs( SfxMedium& rMedium );
- virtual BOOL ConvertTo( SfxMedium &rMedium );
- virtual BOOL SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
+ virtual sal_Bool Save();
+ virtual sal_Bool SaveAs( SfxMedium& rMedium );
+ virtual sal_Bool ConvertTo( SfxMedium &rMedium );
+ virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
Printer *GetPrt();
OutputDevice* GetRefDev();
@@ -164,7 +167,7 @@ class SmDocShell : public SfxObjectShell, public SfxListener
bool IsFormulaArranged() const { return bIsFormulaArranged; }
void SetFormulaArranged(bool bVal) { bIsFormulaArranged = bVal; }
- virtual BOOL ConvertFrom(SfxMedium &rMedium);
+ virtual sal_Bool ConvertFrom(SfxMedium &rMedium);
/** Called whenever the formula is changed
* Deletes the current cursor
@@ -208,6 +211,8 @@ public:
const SmNode * GetFormulaTree() const { return pTree; }
void SetFormulaTree(SmNode *&rTree) { pTree = rTree; }
+ const std::set< rtl::OUString > & GetUsedSymbols() const { return aUsedSymbols; }
+
String GetAccessibleText();
EditEngine & GetEditEngine();
@@ -218,7 +223,7 @@ public:
void Repaint();
- virtual SfxUndoManager *GetUndoManager ();
+ virtual ::svl::IUndoManager *GetUndoManager ();
virtual SfxItemPool& GetPool() const;
@@ -226,7 +231,7 @@ public:
void GetState(SfxItemSet &);
virtual void SetVisArea (const Rectangle & rVisArea);
- virtual void SetModified(BOOL bModified);
+ virtual void SetModified(sal_Bool bModified);
/** Get a cursor for modifying this document
* @remarks Don't store this reference, a new cursor may be made...
diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx
index 7525cd8e8586..454877dcaa7e 100644
--- a/starmath/inc/edit.hxx
+++ b/starmath/inc/edit.hxx
@@ -50,7 +50,7 @@ class CommandEvent;
/**************************************************************************/
void SmGetLeftSelectionPart(const ESelection &rSelection,
- USHORT &nPara, USHORT &nPos);
+ sal_uInt16 &nPara, sal_uInt16 &nPos);
/**************************************************************************/
@@ -123,7 +123,7 @@ public:
void Delete();
void SelectAll();
void InsertText(const String &rText);
- void InsertCommand(USHORT nCommand);
+ void InsertCommand(sal_uInt16 nCommand);
void MarkError(const Point &rPos);
void SelNextMark();
void SelPrevMark();
diff --git a/starmath/inc/format.hxx b/starmath/inc/format.hxx
index 55899b9d0c9f..98c34c4f4dc2 100644
--- a/starmath/inc/format.hxx
+++ b/starmath/inc/format.hxx
@@ -35,7 +35,7 @@
#include <types.hxx>
-#define SM_FMT_VERSION_51 ((BYTE) 0x01)
+#define SM_FMT_VERSION_51 ((sal_uInt8) 0x01)
#define SM_FMT_VERSION_NOW SM_FMT_VERSION_51
#define FNTNAME_TIMES "Times New Roman"
@@ -99,7 +99,7 @@
enum SmHorAlign { AlignLeft, AlignCenter, AlignRight };
-String GetDefaultFontName( LanguageType nLang, USHORT nIdent );
+String GetDefaultFontName( LanguageType nLang, sal_uInt16 nIdent );
class SmFormat : public SfxBroadcaster
{
@@ -107,10 +107,10 @@ class SmFormat : public SfxBroadcaster
bool bDefaultFont[FNT_END + 1];
Size aBaseSize;
long nVersion;
- USHORT vSize[SIZ_END + 1];
- USHORT vDist[DIS_END + 1];
+ sal_uInt16 vSize[SIZ_END + 1];
+ sal_uInt16 vDist[DIS_END + 1];
SmHorAlign eHorAlign;
- INT16 nGreekCharStyle;
+ sal_Int16 nGreekCharStyle;
bool bIsTextmode,
bScaleNormalBrackets;
@@ -121,18 +121,18 @@ public:
const Size & GetBaseSize() const { return aBaseSize; }
void SetBaseSize(const Size &rSize) { aBaseSize = rSize; }
- const SmFace & GetFont(USHORT nIdent) const { return vFont[nIdent]; }
- void SetFont(USHORT nIdent, const SmFace &rFont, bool bDefault = false);
- void SetFontSize(USHORT nIdent, const Size &rSize) { vFont[nIdent].SetSize( rSize ); }
+ const SmFace & GetFont(sal_uInt16 nIdent) const { return vFont[nIdent]; }
+ void SetFont(sal_uInt16 nIdent, const SmFace &rFont, bool bDefault = false);
+ void SetFontSize(sal_uInt16 nIdent, const Size &rSize) { vFont[nIdent].SetSize( rSize ); }
- void SetDefaultFont(USHORT nIdent, bool bVal) { bDefaultFont[nIdent] = bVal; }
- bool IsDefaultFont(USHORT nIdent) const { return bDefaultFont[nIdent]; }
+ void SetDefaultFont(sal_uInt16 nIdent, bool bVal) { bDefaultFont[nIdent] = bVal; }
+ bool IsDefaultFont(sal_uInt16 nIdent) const { return bDefaultFont[nIdent]; }
- USHORT GetRelSize(USHORT nIdent) const { return vSize[nIdent]; }
- void SetRelSize(USHORT nIdent, USHORT nVal) { vSize[nIdent] = nVal;}
+ sal_uInt16 GetRelSize(sal_uInt16 nIdent) const { return vSize[nIdent]; }
+ void SetRelSize(sal_uInt16 nIdent, sal_uInt16 nVal) { vSize[nIdent] = nVal;}
- USHORT GetDistance(USHORT nIdent) const { return vDist[nIdent]; }
- void SetDistance(USHORT nIdent, USHORT nVal) { vDist[nIdent] = nVal; }
+ sal_uInt16 GetDistance(sal_uInt16 nIdent) const { return vDist[nIdent]; }
+ void SetDistance(sal_uInt16 nIdent, sal_uInt16 nVal) { vDist[nIdent] = nVal; }
SmHorAlign GetHorAlign() const { return eHorAlign; }
void SetHorAlign(SmHorAlign eAlign) { eHorAlign = eAlign; }
@@ -140,8 +140,8 @@ public:
bool IsTextmode() const { return bIsTextmode; }
void SetTextmode(bool bVal) { bIsTextmode = bVal; }
- INT16 GetGreekCharStyle() const { return nGreekCharStyle; }
- void SetGreekCharStyle(INT16 nVal) { nGreekCharStyle = nVal; }
+ sal_Int16 GetGreekCharStyle() const { return nGreekCharStyle; }
+ void SetGreekCharStyle(sal_Int16 nVal) { nGreekCharStyle = nVal; }
bool IsScaleNormalBrackets() const { return bScaleNormalBrackets; }
void SetScaleNormalBrackets(bool bVal) { bScaleNormalBrackets = bVal; }
diff --git a/starmath/inc/helpids.h b/starmath/inc/helpids.h
new file mode 100644
index 000000000000..f27b47edcdf3
--- /dev/null
+++ b/starmath/inc/helpids.h
@@ -0,0 +1,326 @@
+/*************************************************************************
+ *
+ * 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 STARMATH_HELPIDS_H
+#define STARMATH_HELPIDS_H
+
+#define HID_SMA_OPTIONSDIALOG "STARMATH_HID_SMA_OPTIONSDIALOG"
+#define HID_SMA_FONTDIALOG "STARMATH_HID_SMA_FONTDIALOG"
+#define HID_SMA_FONTSIZEDIALOG "STARMATH_HID_SMA_FONTSIZEDIALOG"
+#define HID_SMA_FONTTYPEDIALOG "STARMATH_HID_SMA_FONTTYPEDIALOG"
+#define HID_SMA_DISTANCEDIALOG "STARMATH_HID_SMA_DISTANCEDIALOG"
+#define HID_SMA_ALIGNDIALOG "STARMATH_HID_SMA_ALIGNDIALOG"
+#define HID_SMA_PRINTOPTIONPAGE "STARMATH_HID_SMA_PRINTOPTIONPAGE"
+#define HID_SMA_SYMBOLDIALOG "STARMATH_HID_SMA_SYMBOLDIALOG"
+#define HID_SMA_SYMDEFINEDIALOG "STARMATH_HID_SMA_SYMDEFINEDIALOG"
+#define HID_SMA_EXTRAOPTIONPAGE "STARMATH_HID_SMA_EXTRAOPTIONPAGE"
+#define HID_SMA_DOCSAVEQUERY "STARMATH_HID_SMA_DOCSAVEQUERY"
+#define HID_SMA_OBJECTSAVEQUERY "STARMATH_HID_SMA_OBJECTSAVEQUERY"
+#define HID_SMA_DEFAULTSAVEQUERY "STARMATH_HID_SMA_DEFAULTSAVEQUERY"
+#define HID_SMA_ILLEGALOBJECTERROR "STARMATH_HID_SMA_ILLEGALOBJECTERROR"
+#define HID_SMA_ILLEGALFILEERROR "STARMATH_HID_SMA_ILLEGALFILEERROR"
+#define HID_SMA_WRITESYMBOLERROR "STARMATH_HID_SMA_WRITESYMBOLERROR"
+#define HID_SMA_READSYMBOLERROR "STARMATH_HID_SMA_READSYMBOLERROR"
+#define HID_SMA_NOMATHTYPEFACEWARNING "STARMATH_HID_SMA_NOMATHTYPEFACEWARNING"
+#define HID_SMA_OBJECTNAME "STARMATH_HID_SMA_OBJECTNAME"
+#define HID_SMA_VIEWNAME "STARMATH_HID_SMA_VIEWNAME"
+#define HID_SMA_UNDOEDITNAME "STARMATH_HID_SMA_UNDOEDITNAME"
+#define HID_SMA_UNDOFORMATNAME "STARMATH_HID_SMA_UNDOFORMATNAME"
+#define HID_SMA_APPICO "STARMATH_HID_SMA_APPICO"
+#define HID_SMA_DOCICO "STARMATH_HID_SMA_DOCICO"
+#define HID_SMA_TMPICO "STARMATH_HID_SMA_TMPICO"
+#define HID_SMA_COMMANDMENU "STARMATH_HID_SMA_COMMANDMENU"
+#define HID_SMA_VIEWMENU "STARMATH_HID_SMA_VIEWMENU"
+#define HID_SMA_DISTANCEMENU "STARMATH_HID_SMA_DISTANCEMENU"
+#define HID_SMA_FONTMENU "STARMATH_HID_SMA_FONTMENU"
+#define HID_SMA_STARTUPWINDOW "STARMATH_HID_SMA_STARTUPWINDOW"
+#define HID_SMA_TOOLBOXWINDOW "STARMATH_HID_SMA_TOOLBOXWINDOW"
+#define HID_SMA_CMDBOXWINDOW "STARMATH_HID_SMA_CMDBOXWINDOW"
+#define HID_SMA_UPDATEOBJECT "STARMATH_HID_SMA_UPDATEOBJECT"
+#define HID_SMA_FONTREGULAR "STARMATH_HID_SMA_FONTREGULAR"
+#define HID_SMA_FONTITALIC "STARMATH_HID_SMA_FONTITALIC"
+#define HID_SMA_FONTBOLD "STARMATH_HID_SMA_FONTBOLD"
+#define HID_SMA_PRINTOPTION "STARMATH_HID_SMA_PRINTOPTION"
+#define HID_SMA_DOCUMENTSTR "STARMATH_HID_SMA_DOCUMENTSTR"
+#define HID_SMA_SYMBOLFILESSTR "STARMATH_HID_SMA_SYMBOLFILESSTR"
+#define HID_SMA_ALLFILESSTR "STARMATH_HID_SMA_ALLFILESSTR"
+#define HID_SMA_CREATORSTR "STARMATH_HID_SMA_CREATORSTR"
+#define HID_SMA_FILESMFTYP "STARMATH_HID_SMA_FILESMFTYP"
+#define HID_SMA_FILESYMTYP "STARMATH_HID_SMA_FILESYMTYP"
+#define HID_SMA_WIN_DOCUMENT "STARMATH_HID_SMA_WIN_DOCUMENT"
+#define HID_SMA_COMMAND_WIN_EDIT "STARMATH_HID_SMA_COMMAND_WIN_EDIT"
+
+#define HID_SMA_PLUSX "STARMATH_HID_SMA_PLUSX"
+#define HID_SMA_MINUSX "STARMATH_HID_SMA_MINUSX"
+#define HID_SMA_PLUSMINUSX "STARMATH_HID_SMA_PLUSMINUSX"
+#define HID_SMA_MINUSPLUSX "STARMATH_HID_SMA_MINUSPLUSX"
+#define HID_SMA_NEGX "STARMATH_HID_SMA_NEGX"
+#define HID_SMA_XPLUSY "STARMATH_HID_SMA_XPLUSY"
+#define HID_SMA_XMINUSY "STARMATH_HID_SMA_XMINUSY"
+#define HID_SMA_XCDOTY "STARMATH_HID_SMA_XCDOTY"
+#define HID_SMA_XTIMESY "STARMATH_HID_SMA_XTIMESY"
+#define HID_SMA_XSYMTIMESY "STARMATH_HID_SMA_XSYMTIMESY"
+#define HID_SMA_XSYMDIVIDEY "STARMATH_HID_SMA_XSYMDIVIDEY"
+#define HID_SMA_XDIVY "STARMATH_HID_SMA_XDIVY"
+#define HID_SMA_XOVERY "STARMATH_HID_SMA_XOVERY"
+#define HID_SMA_XODIVIDEY "STARMATH_HID_SMA_XODIVIDEY"
+#define HID_SMA_XODOTY "STARMATH_HID_SMA_XODOTY"
+#define HID_SMA_XOMINUSY "STARMATH_HID_SMA_XOMINUSY"
+#define HID_SMA_XOPLUSY "STARMATH_HID_SMA_XOPLUSY"
+#define HID_SMA_XOTIMESY "STARMATH_HID_SMA_XOTIMESY"
+#define HID_SMA_XANDY "STARMATH_HID_SMA_XANDY"
+#define HID_SMA_XORY "STARMATH_HID_SMA_XORY"
+#define HID_SMA_XEQY "STARMATH_HID_SMA_XEQY"
+#define HID_SMA_XNEQY "STARMATH_HID_SMA_XNEQY"
+#define HID_SMA_XLTY "STARMATH_HID_SMA_XLTY"
+#define HID_SMA_XGTY "STARMATH_HID_SMA_XGTY"
+#define HID_SMA_XLEY "STARMATH_HID_SMA_XLEY"
+#define HID_SMA_XGEY "STARMATH_HID_SMA_XGEY"
+#define HID_SMA_XLESLANTY "STARMATH_HID_SMA_XLESLANTY"
+#define HID_SMA_XGESLANTY "STARMATH_HID_SMA_XGESLANTY"
+#define HID_SMA_XLLY "STARMATH_HID_SMA_XLLY"
+#define HID_SMA_XGGY "STARMATH_HID_SMA_XGGY"
+#define HID_SMA_XDEFY "STARMATH_HID_SMA_XDEFY"
+#define HID_SMA_XEQUIVY "STARMATH_HID_SMA_XEQUIVY"
+#define HID_SMA_XAPPROXY "STARMATH_HID_SMA_XAPPROXY"
+#define HID_SMA_XSIMY "STARMATH_HID_SMA_XSIMY"
+#define HID_SMA_XSIMEQY "STARMATH_HID_SMA_XSIMEQY"
+#define HID_SMA_XPROPY "STARMATH_HID_SMA_XPROPY"
+#define HID_SMA_XORTHOY "STARMATH_HID_SMA_XORTHOY"
+#define HID_SMA_XPARALLELY "STARMATH_HID_SMA_XPARALLELY"
+#define HID_SMA_XTOWARDY "STARMATH_HID_SMA_XTOWARDY"
+#define HID_SMA_XTRANSLY "STARMATH_HID_SMA_XTRANSLY"
+#define HID_SMA_XTRANSRY "STARMATH_HID_SMA_XTRANSRY"
+#define HID_SMA_XINY "STARMATH_HID_SMA_XINY"
+#define HID_SMA_XNOTINY "STARMATH_HID_SMA_XNOTINY"
+#define HID_SMA_XOWNSY "STARMATH_HID_SMA_XOWNSY"
+#define HID_SMA_XUNIONY "STARMATH_HID_SMA_XUNIONY"
+#define HID_SMA_XINTERSECTIONY "STARMATH_HID_SMA_XINTERSECTIONY"
+#define HID_SMA_XSETMINUSY "STARMATH_HID_SMA_XSETMINUSY"
+#define HID_SMA_XSLASHY "STARMATH_HID_SMA_XSLASHY"
+#define HID_SMA_XSUBSETY "STARMATH_HID_SMA_XSUBSETY"
+#define HID_SMA_XSUBSETEQY "STARMATH_HID_SMA_XSUBSETEQY"
+#define HID_SMA_XSUPSETY "STARMATH_HID_SMA_XSUPSETY"
+#define HID_SMA_XSUPSETEQY "STARMATH_HID_SMA_XSUPSETEQY"
+#define HID_SMA_XNSUBSETY "STARMATH_HID_SMA_XNSUBSETY"
+#define HID_SMA_XNSUBSETEQY "STARMATH_HID_SMA_XNSUBSETEQY"
+#define HID_SMA_XNSUPSETY "STARMATH_HID_SMA_XNSUPSETY"
+#define HID_SMA_XNSUPSETEQY "STARMATH_HID_SMA_XNSUPSETEQY"
+#define HID_SMA_ABSX "STARMATH_HID_SMA_ABSX"
+#define HID_SMA_FACTX "STARMATH_HID_SMA_FACTX"
+#define HID_SMA_SQRTX "STARMATH_HID_SMA_SQRTX"
+#define HID_SMA_NROOTXY "STARMATH_HID_SMA_NROOTXY"
+#define HID_SMA_EX "STARMATH_HID_SMA_EX"
+#define HID_SMA_EXPX "STARMATH_HID_SMA_EXPX"
+#define HID_SMA_LNX "STARMATH_HID_SMA_LNX"
+#define HID_SMA_LOGX "STARMATH_HID_SMA_LOGX"
+#define HID_SMA_SINX "STARMATH_HID_SMA_SINX"
+#define HID_SMA_COSX "STARMATH_HID_SMA_COSX"
+#define HID_SMA_TANX "STARMATH_HID_SMA_TANX"
+#define HID_SMA_COTX "STARMATH_HID_SMA_COTX"
+#define HID_SMA_ARCSINX "STARMATH_HID_SMA_ARCSINX"
+#define HID_SMA_ARCCOSX "STARMATH_HID_SMA_ARCCOSX"
+#define HID_SMA_ARCTANX "STARMATH_HID_SMA_ARCTANX"
+#define HID_SMA_ARCCOTX "STARMATH_HID_SMA_ARCCOTX"
+#define HID_SMA_SINHX "STARMATH_HID_SMA_SINHX"
+#define HID_SMA_COSHX "STARMATH_HID_SMA_COSHX"
+#define HID_SMA_TANHX "STARMATH_HID_SMA_TANHX"
+#define HID_SMA_COTHX "STARMATH_HID_SMA_COTHX"
+#define HID_SMA_ARSINHX "STARMATH_HID_SMA_ARSINHX"
+#define HID_SMA_ARCOSHX "STARMATH_HID_SMA_ARCOSHX"
+#define HID_SMA_ARTANHX "STARMATH_HID_SMA_ARTANHX"
+#define HID_SMA_ARCOTHX "STARMATH_HID_SMA_ARCOTHX"
+#define HID_SMA_SUMX "STARMATH_HID_SMA_SUMX"
+#define HID_SMA_PRODX "STARMATH_HID_SMA_PRODX"
+#define HID_SMA_COPRODX "STARMATH_HID_SMA_COPRODX"
+#define HID_SMA_LIMX "STARMATH_HID_SMA_LIMX"
+#define HID_SMA_LIMINFX "STARMATH_HID_SMA_LIMINFX"
+#define HID_SMA_LIMSUPX "STARMATH_HID_SMA_LIMSUPX"
+#define HID_SMA_EXISTS "STARMATH_HID_SMA_EXISTS"
+#define HID_SMA_FORALL "STARMATH_HID_SMA_FORALL"
+#define HID_SMA_NABLA "STARMATH_HID_SMA_NABLA"
+#define HID_SMA_INTX "STARMATH_HID_SMA_INTX"
+#define HID_SMA_IINTX "STARMATH_HID_SMA_IINTX"
+#define HID_SMA_IIINTX "STARMATH_HID_SMA_IIINTX"
+#define HID_SMA_LINTX "STARMATH_HID_SMA_LINTX"
+#define HID_SMA_LLINTX "STARMATH_HID_SMA_LLINTX"
+#define HID_SMA_LLLINTX "STARMATH_HID_SMA_LLLINTX"
+#define HID_SMA_FROMX "STARMATH_HID_SMA_FROMX"
+#define HID_SMA_TOX "STARMATH_HID_SMA_TOX"
+#define HID_SMA_FROMXTOY "STARMATH_HID_SMA_FROMXTOY"
+#define HID_SMA_XCIRCY "STARMATH_HID_SMA_XCIRCY"
+#define HID_SMA_XDIVIDESY "STARMATH_HID_SMA_XDIVIDESY"
+#define HID_SMA_XNDIVIDESY "STARMATH_HID_SMA_XNDIVIDESY"
+#define HID_SMA_DLARROW "STARMATH_HID_SMA_DLARROW"
+#define HID_SMA_DLRARROW "STARMATH_HID_SMA_DLRARROW"
+#define HID_SMA_DRARROW "STARMATH_HID_SMA_DRARROW"
+
+#define HID_SMA_MISC_CAT "STARMATH_HID_SMA_MISC_CAT"
+#define HID_SMA_UNBINOPS_CAT "STARMATH_HID_SMA_UNBINOPS_CAT"
+#define HID_SMA_RELATIONS_CAT "STARMATH_HID_SMA_RELATIONS_CAT"
+#define HID_SMA_SETOPERATIONS_CAT "STARMATH_HID_SMA_SETOPERATIONS_CAT"
+#define HID_SMA_FUNCTIONS_CAT "STARMATH_HID_SMA_FUNCTIONS_CAT"
+#define HID_SMA_OPERATORS_CAT "STARMATH_HID_SMA_OPERATORS_CAT"
+#define HID_SMA_ATTRIBUTES_CAT "STARMATH_HID_SMA_ATTRIBUTES_CAT"
+#define HID_SMA_BRACKETS_CAT "STARMATH_HID_SMA_BRACKETS_CAT"
+#define HID_SMA_FORMAT_CAT "STARMATH_HID_SMA_FORMAT_CAT"
+
+#define HID_SMA_OPERATOR_WIN "STARMATH_HID_SMA_OPERATOR_WIN"
+#define HID_SMA_UNBINOPS_TBX "STARMATH_HID_SMA_UNBINOPS_TBX"
+#define HID_SMA_RELATIONS_TBX "STARMATH_HID_SMA_RELATIONS_TBX"
+#define HID_SMA_SETOPERATIONS_TBX "STARMATH_HID_SMA_SETOPERATIONS_TBX"
+#define HID_SMA_FUNCTIONS_TBX "STARMATH_HID_SMA_FUNCTIONS_TBX"
+#define HID_SMA_OPERATORS_TBX "STARMATH_HID_SMA_OPERATORS_TBX"
+#define HID_SMA_ATTRIBUTES_TBX "STARMATH_HID_SMA_ATTRIBUTES_TBX"
+#define HID_SMA_BRACKETS_TBX "STARMATH_HID_SMA_BRACKETS_TBX"
+#define HID_SMA_FORMAT_TBX "STARMATH_HID_SMA_FORMAT_TBX"
+#define HID_SMA_SELECTION_TBX "STARMATH_HID_SMA_SELECTION_TBX"
+#define HID_SMA_COMMAND_WIN "STARMATH_HID_SMA_COMMAND_WIN"
+#define HID_SMA_MISC_MENU "STARMATH_HID_SMA_MISC_MENU"
+#define HID_SMA_FUNCTIONSOTHER1_MENU "STARMATH_HID_SMA_FUNCTIONSOTHER1_MENU"
+
+#define HID_SMA_ACUTEX "STARMATH_HID_SMA_ACUTEX"
+#define HID_SMA_BARX "STARMATH_HID_SMA_BARX"
+#define HID_SMA_BREVEX "STARMATH_HID_SMA_BREVEX"
+#define HID_SMA_CHECKX "STARMATH_HID_SMA_CHECKX"
+#define HID_SMA_CIRCLEX "STARMATH_HID_SMA_CIRCLEX"
+#define HID_SMA_DOTX "STARMATH_HID_SMA_DOTX"
+#define HID_SMA_DDOTX "STARMATH_HID_SMA_DDOTX"
+#define HID_SMA_DDDOTX "STARMATH_HID_SMA_DDDOTX"
+#define HID_SMA_GRAVEX "STARMATH_HID_SMA_GRAVEX"
+#define HID_SMA_HATX "STARMATH_HID_SMA_HATX"
+#define HID_SMA_TILDEX "STARMATH_HID_SMA_TILDEX"
+#define HID_SMA_VECX "STARMATH_HID_SMA_VECX"
+#define HID_SMA_UNDERLINEX "STARMATH_HID_SMA_UNDERLINEX"
+#define HID_SMA_OVERLINEX "STARMATH_HID_SMA_OVERLINEX"
+#define HID_SMA_OVERSTRIKEX "STARMATH_HID_SMA_OVERSTRIKEX"
+#define HID_SMA_PHANTOMX "STARMATH_HID_SMA_PHANTOMX"
+#define HID_SMA_BOLDX "STARMATH_HID_SMA_BOLDX"
+#define HID_SMA_ITALX "STARMATH_HID_SMA_ITALX"
+#define HID_SMA_SIZEXY "STARMATH_HID_SMA_SIZEXY"
+#define HID_SMA_FONTXY "STARMATH_HID_SMA_FONTXY"
+#define HID_SMA_COLORX "STARMATH_HID_SMA_COLORX"
+#define HID_SMA_LRGROUPX "STARMATH_HID_SMA_LRGROUPX"
+#define HID_SMA_LRPARENTX "STARMATH_HID_SMA_LRPARENTX"
+#define HID_SMA_LRBRACKETX "STARMATH_HID_SMA_LRBRACKETX"
+#define HID_SMA_LRBRACEX "STARMATH_HID_SMA_LRBRACEX"
+#define HID_SMA_LRANGLEX "STARMATH_HID_SMA_LRANGLEX"
+#define HID_SMA_LRCEILX "STARMATH_HID_SMA_LRCEILX"
+#define HID_SMA_LRFLOORX "STARMATH_HID_SMA_LRFLOORX"
+#define HID_SMA_LRLINEX "STARMATH_HID_SMA_LRLINEX"
+#define HID_SMA_LRDLINEX "STARMATH_HID_SMA_LRDLINEX"
+#define HID_SMA_SLRPARENTX "STARMATH_HID_SMA_SLRPARENTX"
+#define HID_SMA_SLRBRACKETX "STARMATH_HID_SMA_SLRBRACKETX"
+#define HID_SMA_SLRBRACEX "STARMATH_HID_SMA_SLRBRACEX"
+#define HID_SMA_SLRANGLEX "STARMATH_HID_SMA_SLRANGLEX"
+#define HID_SMA_SLRCEILX "STARMATH_HID_SMA_SLRCEILX"
+#define HID_SMA_SLRFLOORX "STARMATH_HID_SMA_SLRFLOORX"
+#define HID_SMA_SLRLINEX "STARMATH_HID_SMA_SLRLINEX"
+#define HID_SMA_SLRDLINEX "STARMATH_HID_SMA_SLRDLINEX"
+#define HID_SMA_RSUBX "STARMATH_HID_SMA_RSUBX"
+#define HID_SMA_RSUPX "STARMATH_HID_SMA_RSUPX"
+#define HID_SMA_LSUBX "STARMATH_HID_SMA_LSUBX"
+#define HID_SMA_LSUPX "STARMATH_HID_SMA_LSUPX"
+#define HID_SMA_SBLANK "STARMATH_HID_SMA_SBLANK"
+#define HID_SMA_BLANK "STARMATH_HID_SMA_BLANK"
+#define HID_SMA_NEWLINE "STARMATH_HID_SMA_NEWLINE"
+#define HID_SMA_BINOMXY "STARMATH_HID_SMA_BINOMXY"
+#define HID_SMA_STACK "STARMATH_HID_SMA_STACK"
+#define HID_SMA_MATRIX "STARMATH_HID_SMA_MATRIX"
+#define HID_SMA_ALIGNLX "STARMATH_HID_SMA_ALIGNLX"
+#define HID_SMA_ALIGNCX "STARMATH_HID_SMA_ALIGNCX"
+#define HID_SMA_ALIGNRX "STARMATH_HID_SMA_ALIGNRX"
+#define HID_SMA_ALEPH "STARMATH_HID_SMA_ALEPH"
+#define HID_SMA_EMPTYSET "STARMATH_HID_SMA_EMPTYSET"
+#define HID_SMA_RE "STARMATH_HID_SMA_RE"
+#define HID_SMA_IM "STARMATH_HID_SMA_IM"
+#define HID_SMA_INFINITY "STARMATH_HID_SMA_INFINITY"
+#define HID_SMA_PARTIAL "STARMATH_HID_SMA_PARTIAL"
+#define HID_SMA_WP "STARMATH_HID_SMA_WP"
+#define HID_SMA_DOTSAXIS "STARMATH_HID_SMA_DOTSAXIS"
+#define HID_SMA_DOTSUP "STARMATH_HID_SMA_DOTSUP"
+#define HID_SMA_DOTSDOWN "STARMATH_HID_SMA_DOTSDOWN"
+#define HID_SMA_DOTSLOW "STARMATH_HID_SMA_DOTSLOW"
+#define HID_SMA_DOTSVERT "STARMATH_HID_SMA_DOTSVERT"
+
+#define HID_SMA_SETN "STARMATH_HID_SMA_SETN"
+#define HID_SMA_SETZ "STARMATH_HID_SMA_SETZ"
+#define HID_SMA_SETQ "STARMATH_HID_SMA_SETQ"
+#define HID_SMA_SETR "STARMATH_HID_SMA_SETR"
+#define HID_SMA_SETC "STARMATH_HID_SMA_SETC"
+#define HID_SMA_WIDEHATX "STARMATH_HID_SMA_WIDEHATX"
+#define HID_SMA_WIDETILDEX "STARMATH_HID_SMA_WIDETILDEX"
+#define HID_SMA_WIDEVECX "STARMATH_HID_SMA_WIDEVECX"
+#define HID_SMA_CSUBX "STARMATH_HID_SMA_CSUBX"
+#define HID_SMA_CSUPX "STARMATH_HID_SMA_CSUPX"
+#define HID_SMA_HBAR "STARMATH_HID_SMA_HBAR"
+#define HID_SMA_LAMBDABAR "STARMATH_HID_SMA_LAMBDABAR"
+#define HID_SMA_LEFTARROW "STARMATH_HID_SMA_LEFTARROW"
+#define HID_SMA_RIGHTARROW "STARMATH_HID_SMA_RIGHTARROW"
+#define HID_SMA_UPARROW "STARMATH_HID_SMA_UPARROW"
+#define HID_SMA_DOWNARROW "STARMATH_HID_SMA_DOWNARROW"
+
+#define HID_SMA_DEFAULT_DIST "STARMATH_HID_SMA_DEFAULT_DIST"
+#define HID_SMA_LINE_DIST "STARMATH_HID_SMA_LINE_DIST"
+#define HID_SMA_ROOT_DIST "STARMATH_HID_SMA_ROOT_DIST"
+#define HID_SMA_SUP_DIST "STARMATH_HID_SMA_SUP_DIST"
+#define HID_SMA_SUB_DIST "STARMATH_HID_SMA_SUB_DIST"
+#define HID_SMA_NUMERATOR_DIST "STARMATH_HID_SMA_NUMERATOR_DIST"
+#define HID_SMA_DENOMINATOR_DIST "STARMATH_HID_SMA_DENOMINATOR_DIST"
+#define HID_SMA_FRACLINE_EXCWIDTH "STARMATH_HID_SMA_FRACLINE_EXCWIDTH"
+#define HID_SMA_FRACLINE_LINEWIDTH "STARMATH_HID_SMA_FRACLINE_LINEWIDTH"
+#define HID_SMA_UPPERLIMIT_DIST "STARMATH_HID_SMA_UPPERLIMIT_DIST"
+#define HID_SMA_LOWERLIMIT_DIST "STARMATH_HID_SMA_LOWERLIMIT_DIST"
+#define HID_SMA_BRACKET_EXCHEIGHT "STARMATH_HID_SMA_BRACKET_EXCHEIGHT"
+#define HID_SMA_BRACKET_DIST "STARMATH_HID_SMA_BRACKET_DIST"
+#define HID_SMA_MATRIXROW_DIST "STARMATH_HID_SMA_MATRIXROW_DIST"
+#define HID_SMA_MATRIXCOL_DIST "STARMATH_HID_SMA_MATRIXCOL_DIST"
+#define HID_SMA_ATTRIBUT_DIST "STARMATH_HID_SMA_ATTRIBUT_DIST"
+#define HID_SMA_INTERATTRIBUT_DIST "STARMATH_HID_SMA_INTERATTRIBUT_DIST"
+#define HID_SMA_OPERATOR_EXCHEIGHT "STARMATH_HID_SMA_OPERATOR_EXCHEIGHT"
+#define HID_SMA_OPERATOR_DIST "STARMATH_HID_SMA_OPERATOR_DIST"
+#define HID_SMA_LEFTBORDER_DIST "STARMATH_HID_SMA_LEFTBORDER_DIST"
+#define HID_SMA_RIGHTBORDER_DIST "STARMATH_HID_SMA_RIGHTBORDER_DIST"
+#define HID_SMA_UPPERBORDER_DIST "STARMATH_HID_SMA_UPPERBORDER_DIST"
+#define HID_SMA_LOWERBORDER_DIST "STARMATH_HID_SMA_LOWERBORDER_DIST"
+#define HID_SMA_SCALE_ALL_BRACKETS "STARMATH_HID_SMA_SCALE_ALL_BRACKETS"
+#define HID_SMA_BRACKET_EXCHEIGHT2 "STARMATH_HID_SMA_BRACKET_EXCHEIGHT2"
+#define HID_SMA_LMRANGLEXY "STARMATH_HID_SMA_LMRANGLEXY"
+#define HID_SMA_SLMRANGLEXY "STARMATH_HID_SMA_SLMRANGLEXY"
+#define HID_SMA_XWIDESLASHY "STARMATH_HID_SMA_XWIDESLASHY"
+#define HID_SMA_XWIDEBSLASHY "STARMATH_HID_SMA_XWIDEBSLASHY"
+#define HID_SMA_XOVERBRACEY "STARMATH_HID_SMA_XOVERBRACEY"
+#define HID_SMA_XUNDERBRACEY "STARMATH_HID_SMA_XUNDERBRACEY"
+#define HID_SMA_LRDBRACKETX "STARMATH_HID_SMA_LRDBRACKETX"
+#define HID_SMA_SLRDBRACKETX "STARMATH_HID_SMA_SLRDBRACKETX"
+
+#define HID_SMA_CONTROL_SYMBOLSET_VIEW "STARMATH_HID_SMA_CONTROL_SYMBOLSET_VIEW"
+#define HID_SMA_CONTROL_FONTCHAR_VIEW "STARMATH_HID_SMA_CONTROL_FONTCHAR_VIEW"
+
+#define HID_SMA_NOSPACE "STARMATH_HID_SMA_NOSPACE"
+
+#endif
+
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index dc631c564a3e..45589683c39f 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -99,7 +99,7 @@ class SmNode : public SmRect
SmNodeType eType;
SmScaleMode eScaleMode;
RectHorAlign eRectHorAlign;
- USHORT nFlags,
+ sal_uInt16 nFlags,
nAttributes;
bool bIsPhantom,
bIsDebug;
@@ -117,9 +117,9 @@ public:
virtual bool IsVisible() const;
- virtual USHORT GetNumSubNodes() const;
- virtual SmNode * GetSubNode(USHORT nIndex);
- const SmNode * GetSubNode(USHORT nIndex) const
+ virtual sal_uInt16 GetNumSubNodes() const;
+ virtual SmNode * GetSubNode(sal_uInt16 nIndex);
+ const SmNode * GetSubNode(sal_uInt16 nIndex) const
{
return ((SmNode *) this)->GetSubNode(nIndex);
}
@@ -130,22 +130,22 @@ public:
return ((SmNode *) this)->GetLeftMost();
}
- USHORT & Flags() { return nFlags; }
- USHORT & Attributes() { return nAttributes; }
+ sal_uInt16 & Flags() { return nFlags; }
+ sal_uInt16 & Attributes() { return nAttributes; }
bool IsDebug() const { return bIsDebug; }
bool IsPhantom() const { return bIsPhantom; }
void SetPhantom(bool bIsPhantom);
void SetColor(const Color &rColor);
- void SetAttribut(USHORT nAttrib);
- void ClearAttribut(USHORT nAttrib);
+ void SetAttribut(sal_uInt16 nAttrib);
+ void ClearAttribut(sal_uInt16 nAttrib);
const SmFace & GetFont() const { return aFace; };
SmFace & GetFont() { return aFace; };
void SetFont(const SmFace &rFace);
- void SetFontSize(const Fraction &rRelSize, USHORT nType);
+ void SetFontSize(const Fraction &rRelSize, sal_uInt16 nType);
void SetSize(const Fraction &rScale);
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
@@ -170,21 +170,23 @@ public:
sal_Int32 GetAccessibleIndex() const { return nAccIndex; }
const SmNode * FindNodeWithAccessibleIndex(xub_StrLen nAccIndex) const;
- USHORT GetRow() const { return (USHORT)aNodeToken.nRow; }
- USHORT GetColumn() const { return (USHORT)aNodeToken.nCol; }
+ sal_uInt16 GetRow() const { return (sal_uInt16)aNodeToken.nRow; }
+ sal_uInt16 GetColumn() const { return (sal_uInt16)aNodeToken.nCol; }
SmScaleMode GetScaleMode() const { return eScaleMode; }
void SetScaleMode(SmScaleMode eMode) { eScaleMode = eMode; }
- virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth);
- virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight);
+ virtual void AdaptToX(const OutputDevice &rDev, sal_uLong nWidth);
+ virtual void AdaptToY(const OutputDevice &rDev, sal_uLong nHeight);
SmNodeType GetType() const { return eType; }
const SmToken & GetToken() const { return aNodeToken; }
- const SmNode * FindTokenAt(USHORT nRow, USHORT nCol) const;
+ const SmNode * FindTokenAt(sal_uInt16 nRow, sal_uInt16 nCol) const;
const SmNode * FindRectClosestTo(const Point &rPoint) const;
+ virtual long GetFormulaBaseline() const;
+
/** Accept a visitor
* Calls the method for this class on the visitor
*/
@@ -216,8 +218,8 @@ public:
* Returns -1, if pSubNode isn't a subnode of this.
*/
int IndexOfSubNode(SmNode* pSubNode){
- USHORT nSize = GetNumSubNodes();
- for(USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for(sal_uInt16 i = 0; i < nSize; i++)
if(pSubNode == GetSubNode(i))
return i;
return -1;
@@ -230,8 +232,8 @@ protected:
/** Sets parent on children of this node */
void ClaimPaternity(){
SmNode* pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetParent((SmStructureNode*)this); //Cast is valid if we have children
}
@@ -292,9 +294,9 @@ private:
/** Node whos children we're iterating over */
SmNode* pNode;
/** Size of the node */
- USHORT nSize;
+ sal_uInt16 nSize;
/** Current index in the node */
- USHORT nIndex;
+ sal_uInt16 nIndex;
/** Move reverse */
bool bIsReverse;
};
@@ -321,11 +323,11 @@ public:
virtual bool IsVisible() const;
- virtual USHORT GetNumSubNodes() const;
- void SetNumSubNodes(USHORT nSize) { aSubNodes.resize(nSize); }
+ virtual sal_uInt16 GetNumSubNodes() const;
+ void SetNumSubNodes(sal_uInt16 nSize) { aSubNodes.resize(nSize); }
using SmNode::GetSubNode;
- virtual SmNode * GetSubNode(USHORT nIndex);
+ virtual SmNode * GetSubNode(sal_uInt16 nIndex);
void SetSubNodes(SmNode *pFirst, SmNode *pSecond, SmNode *pThird = NULL);
void SetSubNodes(const SmNodeArray &rNodeArray);
@@ -367,9 +369,9 @@ protected:
public:
virtual bool IsVisible() const;
- virtual USHORT GetNumSubNodes() const;
+ virtual sal_uInt16 GetNumSubNodes() const;
using SmNode::GetSubNode;
- virtual SmNode * GetSubNode(USHORT nIndex);
+ virtual SmNode * GetSubNode(sal_uInt16 nIndex);
};
@@ -404,8 +406,8 @@ public:
: SmGraphicNode(NRECTANGLE, rNodeToken)
{}
- virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth);
- virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight);
+ virtual void AdaptToX(const OutputDevice &rDev, sal_uLong nWidth);
+ virtual void AdaptToY(const OutputDevice &rDev, sal_uLong nHeight);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
@@ -433,8 +435,8 @@ public:
Size GetToSize() const { return aToSize; }
Polygon &GetPolygon() { return aPoly; }
- virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth);
- virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight);
+ virtual void AdaptToX(const OutputDevice &rDev, sal_uLong nWidth);
+ virtual void AdaptToY(const OutputDevice &rDev, sal_uLong nHeight);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
@@ -451,7 +453,7 @@ public:
class SmTextNode : public SmVisibleNode
{
XubString aText;
- USHORT nFontDesc;
+ sal_uInt16 nFontDesc;
/** Index within text where the selection starts
* @remarks Only valid if SmNode::IsSelected() is true
*/
@@ -462,12 +464,12 @@ class SmTextNode : public SmVisibleNode
xub_StrLen nSelectionEnd;
protected:
- SmTextNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT nFontDescP );
+ SmTextNode(SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 nFontDescP );
public:
- SmTextNode(const SmToken &rNodeToken, USHORT nFontDescP );
+ SmTextNode(const SmToken &rNodeToken, sal_uInt16 nFontDescP );
- USHORT GetFontDesc() const { return nFontDesc; }
+ sal_uInt16 GetFontDesc() const { return nFontDesc; }
void SetText(const XubString &rText) { aText = rText; }
const XubString & GetText() const { return aText; }
/** Change the text of this node, including the underlying token */
@@ -516,7 +518,7 @@ class SmSpecialNode : public SmTextNode
bool bIsFromGreekSymbolSet;
protected:
- SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT _nFontDesc);
+ SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 _nFontDesc);
public:
SmSpecialNode(const SmToken &rNodeToken);
@@ -571,8 +573,8 @@ protected:
public:
SmMathSymbolNode(const SmToken &rNodeToken);
- virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth);
- virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight);
+ virtual void AdaptToX(const OutputDevice &rDev, sal_uLong nWidth);
+ virtual void AdaptToY(const OutputDevice &rDev, sal_uLong nHeight);
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
@@ -591,16 +593,16 @@ public:
*/
class SmRootSymbolNode : public SmMathSymbolNode
{
- ULONG nBodyWidth; // width of body (argument) of root sign
+ sal_uLong nBodyWidth; // width of body (argument) of root sign
public:
SmRootSymbolNode(const SmToken &rNodeToken)
: SmMathSymbolNode(NROOTSYMBOL, rNodeToken)
{}
- ULONG GetBodyWidth() const {return nBodyWidth;};
- virtual void AdaptToX(const OutputDevice &rDev, ULONG nWidth);
- virtual void AdaptToY(const OutputDevice &rDev, ULONG nHeight);
+ sal_uLong GetBodyWidth() const {return nBodyWidth;};
+ virtual void AdaptToX(const OutputDevice &rDev, sal_uLong nHeight);
+ virtual void AdaptToY(const OutputDevice &rDev, sal_uLong nHeight);
void Accept(SmVisitor* pVisitor);
};
@@ -662,6 +664,7 @@ public:
*/
class SmTableNode : public SmStructureNode
{
+ long nFormulaBaseline;
public:
SmTableNode(const SmToken &rNodeToken)
: SmStructureNode(NTABLE, rNodeToken)
@@ -671,6 +674,8 @@ public:
virtual SmNode * GetLeftMost();
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
+ virtual long GetFormulaBaseline() const;
+
void Accept(SmVisitor* pVisitor);
};
@@ -941,7 +946,7 @@ public:
/** Get super- or subscript
* @remarks this method may return NULL.
*/
- SmNode * GetSubSup(SmSubSup eSubSup) { return GetSubNode( sal::static_int_cast< USHORT >(1 + eSubSup) ); };
+ SmNode * GetSubSup(SmSubSup eSubSup) { return GetSubNode( sal::static_int_cast< sal_uInt16 >(1 + eSubSup) ); };
/** Set the body */
void SetBody(SmNode* pBody) { SetSubNode(0, pBody); }
@@ -1134,7 +1139,7 @@ public:
*/
class SmFontNode : public SmStructureNode
{
- USHORT nSizeType;
+ sal_uInt16 nSizeType;
Fraction aFontSize;
public:
@@ -1145,9 +1150,9 @@ public:
aFontSize = Fraction(1L);
}
- void SetSizeParameter(const Fraction &rValue, USHORT nType);
+ void SetSizeParameter(const Fraction &rValue, sal_uInt16 nType);
const Fraction & GetSizeParameter() const {return aFontSize;}
- const USHORT& GetSizeType() const {return nSizeType;}
+ const sal_uInt16& GetSizeType() const {return nSizeType;}
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
@@ -1165,7 +1170,7 @@ public:
*/
class SmMatrixNode : public SmStructureNode
{
- USHORT nNumRows,
+ sal_uInt16 nNumRows,
nNumCols;
public:
@@ -1175,9 +1180,9 @@ public:
nNumRows = nNumCols = 0;
}
- USHORT GetNumRows() const {return nNumRows;}
- USHORT GetNumCols() const {return nNumCols;}
- void SetRowCol(USHORT nMatrixRows, USHORT nMatrixCols);
+ sal_uInt16 GetNumRows() const {return nNumRows;}
+ sal_uInt16 GetNumCols() const {return nNumCols;}
+ void SetRowCol(sal_uInt16 nMatrixRows, sal_uInt16 nMatrixCols);
using SmNode::GetLeftMost;
virtual SmNode * GetLeftMost();
@@ -1196,7 +1201,7 @@ public:
*/
class SmBlankNode : public SmGraphicNode
{
- USHORT nNum;
+ sal_uInt16 nNum;
public:
SmBlankNode(const SmToken &rNodeToken)
@@ -1207,8 +1212,8 @@ public:
void IncreaseBy(const SmToken &rToken);
void Clear() { nNum = 0; }
- USHORT GetBlankNum() const { return nNum; }
- void SetBlankNum(USHORT nNumber) { nNum = nNumber; }
+ sal_uInt16 GetBlankNum() const { return nNum; }
+ void SetBlankNum(sal_uInt16 nNumber) { nNum = nNumber; }
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index bff93f5cfccc..cc17e951df28 100644..100755
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -33,6 +33,10 @@
#include <tools/stack.hxx>
#include <tools/string.hxx>
+#include <set>
+#include <stack>
+#include <list>
+
#include "types.hxx"
#include <vector>
@@ -40,6 +44,7 @@
class SmNode;
class SmDocShell;
+//////////////////////////////////////////////////////////////////////
// TokenGroups
#define TGOPER 0x00000001
@@ -115,24 +120,25 @@ enum SmTokenType
struct SmToken
{
- // token text
- String aText;
- // token info
- SmTokenType eType;
+
+ String aText; // token text
+ SmTokenType eType; // token info
sal_Unicode cMathChar;
+
// parse-help info
- ULONG nGroup;
- USHORT nLevel;
+ sal_uLong nGroup;
+ sal_uInt16 nLevel;
+
// token position
- USHORT nRow;
- xub_StrLen nCol;
+ sal_uInt16 nRow;
+ xub_StrLen nCol;
SmToken();
SmToken(SmTokenType eTokenType,
sal_Unicode cMath,
const sal_Char* pText,
- ULONG nTokenGroup = 0,
- USHORT nTokenLevel = 0);
+ sal_uLong nTokenGroup = 0,
+ sal_uInt16 nTokenLevel = 0);
};
@@ -159,6 +165,7 @@ struct SmErrorDesc
String Text;
};
+
DECLARE_STACK(SmNodeStack, SmNode *)
typedef ::std::vector< SmErrorDesc* > SmErrDescList;
@@ -179,25 +186,28 @@ struct SmTokenTableEntry
const sal_Char* pIdent;
SmTokenType eType;
sal_Unicode cMathChar;
- ULONG nGroup;
- USHORT nLevel;
+ sal_uLong nGroup;
+ sal_uInt16 nLevel;
};
class SmParser
{
- String BufferString;
- SmToken CurToken;
- SmNodeStack NodeStack;
- SmErrDescList ErrDescList;
- int CurError;
- LanguageType nLang;
- xub_StrLen BufferIndex,
- nTokenIndex;
- USHORT Row,
- ColOff;
- SmConvert eConversion;
+ String m_aBufferString;
+ SmToken m_aCurToken;
+ SmNodeStack m_aNodeStack;
+ SmErrDescList m_aErrDescList;
+ int m_nCurError;
+ LanguageType m_nLang;
+ xub_StrLen m_nBufferIndex,
+ m_nTokenIndex;
+ sal_uInt16 m_Row,
+ m_nColOff;
+ SmConvert m_eConversion;
bool bImportSymNames,
- bExportSymNames;
+ m_bExportSymNames;
+
+ // map of used symbols (used to reduce file size by exporting only actually used symbols)
+ std::set< rtl::OUString > m_aUsedSymbols;
// declare copy-constructor and assignment-operator private
SmParser(const SmParser &);
@@ -208,11 +218,11 @@ protected:
bool IsDelimiter( const String &rTxt, xub_StrLen nPos );
#endif
void NextToken();
- xub_StrLen GetTokenIndex() const { return nTokenIndex; }
- void Insert(const String &rText, USHORT nPos);
- void Replace( USHORT nPos, USHORT nLen, const String &rText );
+ xub_StrLen GetTokenIndex() const { return m_nTokenIndex; }
+ void Insert(const String &rText, sal_uInt16 nPos);
+ void Replace( sal_uInt16 nPos, sal_uInt16 nLen, const String &rText );
- inline bool TokenInGroup(ULONG nGroup);
+ inline bool TokenInGroup( sal_uLong nGroup );
// grammar
void Table();
@@ -221,7 +231,7 @@ protected:
void Relation();
void Sum();
void Product();
- void SubSup(ULONG nActiveGroup);
+ void SubSup(sal_uLong nActiveGroup);
void OpSubSup();
void Power();
void Blank();
@@ -246,11 +256,14 @@ protected:
void GlyphSpecial();
// end of grammar
- LanguageType GetLanguage() const { return nLang; }
- void SetLanguage( LanguageType nNewLang ) { nLang = nNewLang; }
+ LanguageType GetLanguage() const { return m_nLang; }
+ void SetLanguage( LanguageType nNewLang ) { m_nLang = nNewLang; }
void Error(SmParseError Error);
+ void ClearUsedSymbols() { m_aUsedSymbols.clear(); }
+ void AddToUsedSymbols( const String &rSymbolName ) { m_aUsedSymbols.insert( rSymbolName ); }
+
public:
SmParser();
@@ -259,27 +272,29 @@ public:
/** Parse rBuffer to formula subtree that constitutes an expression */
SmNode *ParseExpression(const String &rBuffer);
- const String & GetText() const { return BufferString; };
+ const String & GetText() const { return m_aBufferString; };
- SmConvert GetConversion() const { return eConversion; }
- void SetConversion(SmConvert eConv) { eConversion = eConv; }
+ SmConvert GetConversion() const { return m_eConversion; }
+ void SetConversion(SmConvert eConv) { m_eConversion = eConv; }
bool IsImportSymbolNames() const { return bImportSymNames; }
void SetImportSymbolNames(bool bVal) { bImportSymNames = bVal; }
- bool IsExportSymbolNames() const { return bExportSymNames; }
- void SetExportSymbolNames(bool bVal) { bExportSymNames = bVal; }
+ bool IsExportSymbolNames() const { return m_bExportSymNames; }
+ void SetExportSymbolNames(bool bVal) { m_bExportSymNames = bVal; }
size_t AddError(SmParseError Type, SmNode *pNode);
const SmErrorDesc* NextError();
const SmErrorDesc* PrevError();
const SmErrorDesc* GetError(size_t i = size_t(-1) );
static const SmTokenTableEntry* GetTokenTableEntry( const String &rName );
+ bool IsUsedSymbol( const String &rSymbolName ) const { return m_aUsedSymbols.find( rSymbolName ) != m_aUsedSymbols.end(); }
+ std::set< rtl::OUString > GetUsedSymbols() const { return m_aUsedSymbols; }
};
-inline bool SmParser::TokenInGroup(ULONG nGroup)
+inline bool SmParser::TokenInGroup( sal_uLong nGroup)
{
- return (CurToken.nGroup & nGroup) ? true : false;
+ return (m_aCurToken.nGroup & nGroup) ? true : false;
}
diff --git a/starmath/inc/rect.hxx b/starmath/inc/rect.hxx
index 053fc3add921..e486b1f7c7d5 100644
--- a/starmath/inc/rect.hxx
+++ b/starmath/inc/rect.hxx
@@ -104,15 +104,15 @@ class SmRect
nItalicRightSpace,
nLoAttrFence,
nHiAttrFence;
- USHORT nBorderWidth;
+ sal_uInt16 nBorderWidth;
bool bHasBaseline,
bHasAlignInfo;
protected:
void BuildRect (const OutputDevice &rDev, const SmFormat *pFormat,
- const XubString &rText, USHORT nBorderWidth);
+ const XubString &rText, sal_uInt16 nBorderWidth);
void Init(const OutputDevice &rDev, const SmFormat *pFormat,
- const XubString &rText, USHORT nBorderWidth);
+ const XubString &rText, sal_uInt16 nBorderWidth);
void ClearBaseline() { bHasBaseline = false; };
inline void CopyMBL(const SmRect& rRect);
@@ -128,12 +128,12 @@ public:
SmRect(const SmRect &rRect);
- USHORT GetBorderWidth() const { return nBorderWidth; }
+ sal_uInt16 GetBorderWidth() const { return nBorderWidth; }
void SetItalicSpaces(long nLeftSpace, long nRightSpace);
- void SetWidth(ULONG nWidth) { aSize.Width() = nWidth; }
- void SetHeight(ULONG nHeight) { aSize.Height() = nHeight; }
+ void SetWidth(sal_uLong nWidth) { aSize.Width() = nWidth; }
+ void SetHeight(sal_uLong nHeight) { aSize.Height() = nHeight; }
void SetLeft(long nLeft);
void SetRight(long nRight);
diff --git a/starmath/inc/smcommands.h b/starmath/inc/smcommands.h
new file mode 100644
index 000000000000..d2f08c55f4c4
--- /dev/null
+++ b/starmath/inc/smcommands.h
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * 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 SM_SNCOMMANDS_HRC
+#define SM_SMCOMMANDS_HRC
+
+#define CMD_SID_ADJUST ".uno:Adjust"
+#define CMD_SID_ALIGN ".uno:ChangeAlignment"
+#define CMD_SID_DISTANCE ".uno:ChangeDistance"
+#define CMD_SID_FONT ".uno:ChangeFont"
+#define CMD_SID_FONTSIZE ".uno:ChangeFontSize"
+#define CMD_SID_CMDBOXWINDOW ".uno:CommandWindow"
+#define CMD_SID_PREFERENCES ".uno:Preferences"
+#define CMD_SID_TEXT ".uno:ConfigName"
+#define CMD_SID_COPYOBJECT ".uno:CopyObject"
+#define CMD_SID_DRAW ".uno:Draw"
+#define CMD_SID_FITINWINDOW ".uno:FitInWindow"
+#define CMD_SID_FORMULACURSOR ".uno:FormelCursor"
+#define CMD_SID_GAPHIC_SM ".uno:Graphic"
+#define CMD_SID_INSERTCOMMAND ".uno:InsertCommand"
+#define CMD_SID_INSERTTEXT ".uno:InsertConfigName"
+#define CMD_SID_INSERT_FORMULA ".uno:InsertFormula"
+#define CMD_SID_LOADSYMBOLS ".uno:LoadSymbols"
+#define CMD_SID_MODIFYSTATUS ".uno:ModifyStatus"
+#define CMD_SID_NEXTERR ".uno:NextError"
+#define CMD_SID_NEXTMARK ".uno:NextMark"
+#define CMD_SID_PASTEOBJECT ".uno:PasteObject"
+#define CMD_SID_PREVERR ".uno:PrevError"
+#define CMD_SID_PREVMARK ".uno:PrevMark"
+#define CMD_SID_AUTO_REDRAW ".uno:RedrawAutomatic"
+#define CMD_SID_SAVESYMBOLS ".uno:SaveSymbols"
+#define CMD_SID_GETEDITTEXT ".uno:SetPaperSize"
+#define CMD_SID_SYMBOLS_CATALOGUE ".uno:SymbolCatalogue"
+#define CMD_SID_SYMBOLS ".uno:Symbols"
+#define CMD_SID_TEXTMODE ".uno:Textmode"
+#define CMD_SID_TEXTSTATUS ".uno:TextStatus"
+#define CMD_SID_TOOLBOXWINDOW ".uno:ToolBowWindow"
+#define CMD_SID_TOOLBOX ".uno:ToolBox"
+#define CMD_SID_VIEW100 ".uno:View100"
+#define CMD_SID_VIEW200 ".uno:View200"
+#define CMD_SID_VIEW050 ".uno:View50"
+#define CMD_SID_ZOOMIN ".uno:ZoomIn"
+#define CMD_SID_ZOOMOUT ".uno:ZoomOut"
+
+#endif
diff --git a/starmath/inc/smdll.hxx b/starmath/inc/smdll.hxx
index d7d86238bc84..3894c67e144d 100644
--- a/starmath/inc/smdll.hxx
+++ b/starmath/inc/smdll.hxx
@@ -43,7 +43,7 @@ public:
static void Init();
static void Exit();
- static ULONG DetectFilter( SfxMedium& rMedium, const SfxFilter **ppFilter,
+ static sal_uLong DetectFilter( SfxMedium& rMedium, const SfxFilter **ppFilter,
SfxFilterFlags nMust, SfxFilterFlags nDont );
};
diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx
index 20ce49801332..a75aee02c0a5 100644
--- a/starmath/inc/smmod.hxx
+++ b/starmath/inc/smmod.hxx
@@ -66,7 +66,7 @@ class VirtualDevice;
class SmResId : public ResId
{
public:
- SmResId(USHORT nId);
+ SmResId(sal_uInt16 nId);
};
class SmNamesArray : public Resource
@@ -77,7 +77,7 @@ class SmNamesArray : public Resource
public:
SmNamesArray( LanguageType nLang, int nRID ) :
Resource( SmResId(RID_LOCALIZED_NAMES) ),
- aNamesAry (SmResId( static_cast < USHORT > ( nRID ))),
+ aNamesAry (SmResId( static_cast < sal_uInt16 > ( nRID ))),
nLanguage (nLang)
{
FreeResource();
@@ -128,7 +128,6 @@ class SmModule : public SfxModule, utl::ConfigurationListener
SvtSysLocale *pSysLocale;
VirtualDevice *pVirtualDev;
- virtual void FillStatusBar(StatusBar &rBar);
void _CreateSysLocale() const;
void _CreateVirtualDev() const;
@@ -167,9 +166,9 @@ public:
}
//virtual methods for options dialog
- virtual SfxItemSet* CreateItemSet( USHORT nId );
- virtual void ApplyItemSet( USHORT nId, const SfxItemSet& rSet );
- virtual SfxTabPage* CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet );
+ virtual SfxItemSet* CreateItemSet( sal_uInt16 nId );
+ virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet );
+ virtual SfxTabPage* CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet );
};
#define SM_MOD() ( *(SmModule**) GetAppData(SHL_SM) )
diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc
index 9b9766d8b1e0..f7aa0f21f03f 100644..100755
--- a/starmath/inc/starmath.hrc
+++ b/starmath/inc/starmath.hrc
@@ -30,33 +30,34 @@
#include <svl/solar.hrc>
#include <sfx2/sfxsids.hrc>
#include <editeng/memberids.hrc>
+#include "helpids.h"
#define SID_NEXTERR (SID_SMA_START + 1)
#define SID_PREVERR (SID_SMA_START + 2)
#define SID_NEXTMARK (SID_SMA_START + 3)
#define SID_PREVMARK (SID_SMA_START + 4)
-#define SID_SYMBOLS_CATALOGUE (SID_SMA_START + 5)
+#define SID_SYMBOLS_CATALOGUE (SID_SMA_START + 5)
#define SID_PREFERENCES (SID_SMA_START + 6)
#define SID_VIEW050 (SID_SMA_START + 7)
#define SID_VIEW100 (SID_SMA_START + 8)
#define SID_VIEW200 (SID_SMA_START + 9)
-#define SID_ZOOMIN (SID_SMA_START + 10)
+#define SID_ZOOMIN (SID_SMA_START + 10)
#define SID_ZOOMOUT (SID_SMA_START + 11)
-#define SID_DRAW (SID_SMA_START + 12)
-#define SID_ADJUST (SID_SMA_START + 13)
+#define SID_DRAW (SID_SMA_START + 12)
+#define SID_ADJUST (SID_SMA_START + 13)
#define SID_TOOLBOX (SID_SMA_START + 14)
#define SID_FORMULACURSOR (SID_SMA_START + 15)
-#define SID_FONT (SID_SMA_START + 50)
+#define SID_FONT (SID_SMA_START + 50)
#define SID_FONTSIZE (SID_SMA_START + 51)
#define SID_DISTANCE (SID_SMA_START + 52)
-#define SID_ALIGN (SID_SMA_START + 53)
+#define SID_ALIGN (SID_SMA_START + 53)
#define SID_AUTO_REDRAW (SID_SMA_START + 55)
#define SID_SYMBOLS (SID_SMA_START + 56) // Has to be picked up again for now!
#define SID_TEXTMODE (SID_SMA_START + 57)
-#define SID_INSERT_FORMULA (SID_SMA_START + 58)
-#define SID_TEXT (SID_SMA_START + 100)
-#define SID_GAPHIC_SM (SID_SMA_START + 101)
+#define SID_IMPORT_FORMULA (SID_SMA_START + 58)
+#define SID_TEXT (SID_SMA_START + 100)
+#define SID_GAPHIC_SM (SID_SMA_START + 101)
#define SID_FITINWINDOW (SID_SMA_START + 103)
/** Command for inserting a symbol specified by a string (Inserts an SmSpecialNode) */
#define SID_INSERTSYMBOL (SID_SMA_START + 104)
@@ -83,10 +84,9 @@
#define SID_CMDBOXWINDOW (SID_SMA_START + 122)
#define SID_TOOLBOXWINDOW (SID_SMA_START + 123)
#define SID_NO_RIGHT_SPACES (SID_SMA_START + 124)
-#define SID_DUMMY (SID_SMA_START + 254)
+#define SID_SAVE_ONLY_USED_SYMBOLS (SID_SMA_START + 125)
+#define SID_DUMMY (SID_SMA_START + 254)
-//#define GID_FORMEL (RID_GROUPS_OFFSET + 1)
-//#define GID_ERROR (RID_GROUPS_OFFSET + 2)
//#define RID_OPTIONSDIALOG (RID_APP_START + 1)
#define RID_FONTDIALOG (RID_APP_START + 2)
@@ -101,7 +101,6 @@
#define RID_PRINTUIOPTIONS (RID_APP_START + 11)
#define RID_MATH_TOOLBOX (RID_APP_START + 50)
-//#define RID_DRAW_OBJECTBAR (RID_APP_START + 51)
#define RID_DEFAULTSAVEQUERY (RID_APP_START + 102)
#define RID_WRITESYMBOLERROR (RID_APP_START + 202)
@@ -447,300 +446,6 @@
#define MN_SUB_SENDTO (RID_APP_START + 3120)
-#define HID_SMA_OPTIONSDIALOG (HID_SMA_START + 1)
-#define HID_SMA_FONTDIALOG (HID_SMA_START + 2)
-#define HID_SMA_FONTSIZEDIALOG (HID_SMA_START + 3)
-#define HID_SMA_FONTTYPEDIALOG (HID_SMA_START + 4)
-#define HID_SMA_DISTANCEDIALOG (HID_SMA_START + 5)
-#define HID_SMA_ALIGNDIALOG (HID_SMA_START + 6)
-#define HID_SMA_PRINTOPTIONPAGE (HID_SMA_START + 7)
-#define HID_SMA_SYMBOLDIALOG (HID_SMA_START + 8)
-#define HID_SMA_SYMDEFINEDIALOG (HID_SMA_START + 9)
-#define HID_SMA_EXTRAOPTIONPAGE (HID_SMA_START + 10)
-#define HID_SMA_DOCSAVEQUERY (HID_SMA_START + 11)
-#define HID_SMA_OBJECTSAVEQUERY (HID_SMA_START + 12)
-#define HID_SMA_DEFAULTSAVEQUERY (HID_SMA_START + 13)
-#define HID_SMA_ILLEGALOBJECTERROR (HID_SMA_START + 14)
-#define HID_SMA_ILLEGALFILEERROR (HID_SMA_START + 15)
-#define HID_SMA_WRITESYMBOLERROR (HID_SMA_START + 16)
-#define HID_SMA_READSYMBOLERROR (HID_SMA_START + 17)
-#define HID_SMA_NOMATHTYPEFACEWARNING (HID_SMA_START + 18)
-#define HID_SMA_OBJECTNAME (HID_SMA_START + 19)
-#define HID_SMA_VIEWNAME (HID_SMA_START + 20)
-#define HID_SMA_UNDOEDITNAME (HID_SMA_START + 21)
-#define HID_SMA_UNDOFORMATNAME (HID_SMA_START + 22)
-#define HID_SMA_APPICO (HID_SMA_START + 23)
-#define HID_SMA_DOCICO (HID_SMA_START + 24)
-#define HID_SMA_TMPICO (HID_SMA_START + 25)
-#define HID_SMA_COMMANDMENU (HID_SMA_START + 26)
-#define HID_SMA_VIEWMENU (HID_SMA_START + 27)
-#define HID_SMA_DISTANCEMENU (HID_SMA_START + 28)
-#define HID_SMA_FONTMENU (HID_SMA_START + 29)
-#define HID_SMA_STARTUPWINDOW (HID_SMA_START + 30)
-#define HID_SMA_TOOLBOXWINDOW (HID_SMA_START + 31)
-#define HID_SMA_CMDBOXWINDOW (HID_SMA_START + 32)
-#define HID_SMA_UPDATEOBJECT (HID_SMA_START + 33)
-#define HID_SMA_FONTREGULAR (HID_SMA_START + 34)
-#define HID_SMA_FONTITALIC (HID_SMA_START + 35)
-#define HID_SMA_FONTBOLD (HID_SMA_START + 36)
-#define HID_SMA_PRINTOPTION (HID_SMA_START + 37)
-#define HID_SMA_DOCUMENTSTR (HID_SMA_START + 38)
-#define HID_SMA_SYMBOLFILESSTR (HID_SMA_START + 39)
-#define HID_SMA_ALLFILESSTR (HID_SMA_START + 40)
-#define HID_SMA_CREATORSTR (HID_SMA_START + 41)
-#define HID_SMA_FILESMFTYP (HID_SMA_START + 42)
-#define HID_SMA_FILESYMTYP (HID_SMA_START + 43)
-#define HID_SMA_WIN_DOCUMENT (HID_SMA_START + 44)
-#define HID_SMA_COMMAND_WIN_EDIT (HID_SMA_START + 45)
-
-#define HID_SMA_PLUSX (HID_SMA_START + 50)
-#define HID_SMA_MINUSX (HID_SMA_START + 51)
-#define HID_SMA_PLUSMINUSX (HID_SMA_START + 52)
-#define HID_SMA_MINUSPLUSX (HID_SMA_START + 53)
-#define HID_SMA_NEGX (HID_SMA_START + 54)
-#define HID_SMA_XPLUSY (HID_SMA_START + 55)
-#define HID_SMA_XMINUSY (HID_SMA_START + 56)
-#define HID_SMA_XCDOTY (HID_SMA_START + 57)
-#define HID_SMA_XTIMESY (HID_SMA_START + 58)
-#define HID_SMA_XSYMTIMESY (HID_SMA_START + 59)
-#define HID_SMA_XSYMDIVIDEY (HID_SMA_START + 60)
-#define HID_SMA_XDIVY (HID_SMA_START + 61)
-#define HID_SMA_XOVERY (HID_SMA_START + 62)
-#define HID_SMA_XODIVIDEY (HID_SMA_START + 63)
-#define HID_SMA_XODOTY (HID_SMA_START + 64)
-#define HID_SMA_XOMINUSY (HID_SMA_START + 65)
-#define HID_SMA_XOPLUSY (HID_SMA_START + 66)
-#define HID_SMA_XOTIMESY (HID_SMA_START + 67)
-#define HID_SMA_XANDY (HID_SMA_START + 68)
-#define HID_SMA_XORY (HID_SMA_START + 69)
-#define HID_SMA_XEQY (HID_SMA_START + 70)
-#define HID_SMA_XNEQY (HID_SMA_START + 71)
-#define HID_SMA_XLTY (HID_SMA_START + 72)
-#define HID_SMA_XGTY (HID_SMA_START + 73)
-#define HID_SMA_XLEY (HID_SMA_START + 74)
-#define HID_SMA_XGEY (HID_SMA_START + 75)
-#define HID_SMA_XLESLANTY (HID_SMA_START + 76)
-#define HID_SMA_XGESLANTY (HID_SMA_START + 77)
-#define HID_SMA_XLLY (HID_SMA_START + 78)
-#define HID_SMA_XGGY (HID_SMA_START + 79)
-#define HID_SMA_XDEFY (HID_SMA_START + 80)
-#define HID_SMA_XEQUIVY (HID_SMA_START + 81)
-#define HID_SMA_XAPPROXY (HID_SMA_START + 82)
-#define HID_SMA_XSIMY (HID_SMA_START + 83)
-#define HID_SMA_XSIMEQY (HID_SMA_START + 84)
-#define HID_SMA_XPROPY (HID_SMA_START + 85)
-#define HID_SMA_XORTHOY (HID_SMA_START + 86)
-#define HID_SMA_XPARALLELY (HID_SMA_START + 87)
-#define HID_SMA_XTOWARDY (HID_SMA_START + 88)
-#define HID_SMA_XTRANSLY (HID_SMA_START + 89)
-#define HID_SMA_XTRANSRY (HID_SMA_START + 90)
-#define HID_SMA_XINY (HID_SMA_START + 91)
-#define HID_SMA_XNOTINY (HID_SMA_START + 92)
-#define HID_SMA_XOWNSY (HID_SMA_START + 93)
-#define HID_SMA_XUNIONY (HID_SMA_START + 94)
-#define HID_SMA_XINTERSECTIONY (HID_SMA_START + 95)
-#define HID_SMA_XSETMINUSY (HID_SMA_START + 96)
-#define HID_SMA_XSLASHY (HID_SMA_START + 97)
-#define HID_SMA_XSUBSETY (HID_SMA_START + 98)
-#define HID_SMA_XSUBSETEQY (HID_SMA_START + 99)
-#define HID_SMA_XSUPSETY (HID_SMA_START + 100)
-#define HID_SMA_XSUPSETEQY (HID_SMA_START + 101)
-#define HID_SMA_XNSUBSETY (HID_SMA_START + 102)
-#define HID_SMA_XNSUBSETEQY (HID_SMA_START + 103)
-#define HID_SMA_XNSUPSETY (HID_SMA_START + 104)
-#define HID_SMA_XNSUPSETEQY (HID_SMA_START + 105)
-#define HID_SMA_ABSX (HID_SMA_START + 106)
-#define HID_SMA_FACTX (HID_SMA_START + 107)
-#define HID_SMA_SQRTX (HID_SMA_START + 108)
-#define HID_SMA_NROOTXY (HID_SMA_START + 109)
-#define HID_SMA_EX (HID_SMA_START + 110)
-#define HID_SMA_EXPX (HID_SMA_START + 111)
-#define HID_SMA_LNX (HID_SMA_START + 112)
-#define HID_SMA_LOGX (HID_SMA_START + 113)
-#define HID_SMA_SINX (HID_SMA_START + 114)
-#define HID_SMA_COSX (HID_SMA_START + 115)
-#define HID_SMA_TANX (HID_SMA_START + 116)
-#define HID_SMA_COTX (HID_SMA_START + 117)
-#define HID_SMA_ARCSINX (HID_SMA_START + 118)
-#define HID_SMA_ARCCOSX (HID_SMA_START + 119)
-#define HID_SMA_ARCTANX (HID_SMA_START + 120)
-#define HID_SMA_ARCCOTX (HID_SMA_START + 121)
-#define HID_SMA_SINHX (HID_SMA_START + 122)
-#define HID_SMA_COSHX (HID_SMA_START + 123)
-#define HID_SMA_TANHX (HID_SMA_START + 124)
-#define HID_SMA_COTHX (HID_SMA_START + 125)
-#define HID_SMA_ARSINHX (HID_SMA_START + 126)
-#define HID_SMA_ARCOSHX (HID_SMA_START + 127)
-#define HID_SMA_ARTANHX (HID_SMA_START + 128)
-#define HID_SMA_ARCOTHX (HID_SMA_START + 129)
-#define HID_SMA_SUMX (HID_SMA_START + 130)
-#define HID_SMA_PRODX (HID_SMA_START + 131)
-#define HID_SMA_COPRODX (HID_SMA_START + 132)
-#define HID_SMA_LIMX (HID_SMA_START + 133)
-#define HID_SMA_LIMINFX (HID_SMA_START + 134)
-#define HID_SMA_LIMSUPX (HID_SMA_START + 135)
-#define HID_SMA_EXISTS (HID_SMA_START + 136)
-#define HID_SMA_FORALL (HID_SMA_START + 137)
-#define HID_SMA_NABLA (HID_SMA_START + 138)
-#define HID_SMA_INTX (HID_SMA_START + 139)
-#define HID_SMA_IINTX (HID_SMA_START + 140)
-#define HID_SMA_IIINTX (HID_SMA_START + 141)
-#define HID_SMA_LINTX (HID_SMA_START + 142)
-#define HID_SMA_LLINTX (HID_SMA_START + 143)
-#define HID_SMA_LLLINTX (HID_SMA_START + 144)
-#define HID_SMA_FROMX (HID_SMA_START + 145)
-#define HID_SMA_TOX (HID_SMA_START + 146)
-#define HID_SMA_FROMXTOY (HID_SMA_START + 147)
-#define HID_SMA_XCIRCY (HID_SMA_START + 148)
-#define HID_SMA_XDIVIDESY (HID_SMA_START + 149)
-#define HID_SMA_XNDIVIDESY (HID_SMA_START + 150)
-#define HID_SMA_DLARROW (HID_SMA_START + 151)
-#define HID_SMA_DLRARROW (HID_SMA_START + 152)
-#define HID_SMA_DRARROW (HID_SMA_START + 153)
-
-#define HID_SMA_MISC_CAT (HID_SMA_START + 154)
-#define HID_SMA_UNBINOPS_CAT (HID_SMA_START + 155)
-#define HID_SMA_RELATIONS_CAT (HID_SMA_START + 156)
-#define HID_SMA_SETOPERATIONS_CAT (HID_SMA_START + 157)
-#define HID_SMA_FUNCTIONS_CAT (HID_SMA_START + 158)
-#define HID_SMA_OPERATORS_CAT (HID_SMA_START + 159)
-#define HID_SMA_ATTRIBUTES_CAT (HID_SMA_START + 160)
-#define HID_SMA_BRACKETS_CAT (HID_SMA_START + 161)
-#define HID_SMA_FORMAT_CAT (HID_SMA_START + 162)
-
-#define HID_SMA_OPERATOR_WIN (HID_SMA_START + 163)
-#define HID_SMA_UNBINOPS_TBX (HID_SMA_START + 164)
-#define HID_SMA_RELATIONS_TBX (HID_SMA_START + 165)
-#define HID_SMA_SETOPERATIONS_TBX (HID_SMA_START + 166)
-#define HID_SMA_FUNCTIONS_TBX (HID_SMA_START + 167)
-#define HID_SMA_OPERATORS_TBX (HID_SMA_START + 168)
-#define HID_SMA_ATTRIBUTES_TBX (HID_SMA_START + 169)
-#define HID_SMA_BRACKETS_TBX (HID_SMA_START + 170)
-#define HID_SMA_FORMAT_TBX (HID_SMA_START + 171)
-#define HID_SMA_SELECTION_TBX (HID_SMA_START + 172)
-#define HID_SMA_COMMAND_WIN (HID_SMA_START + 173)
-#define HID_SMA_MISC_MENU (HID_SMA_START + 174)
-#define HID_SMA_FUNCTIONSOTHER1_MENU (HID_SMA_START + 175)
-
-#define HID_SMA_ACUTEX (HID_SMA_START + 180)
-#define HID_SMA_BARX (HID_SMA_START + 181)
-#define HID_SMA_BREVEX (HID_SMA_START + 182)
-#define HID_SMA_CHECKX (HID_SMA_START + 183)
-#define HID_SMA_CIRCLEX (HID_SMA_START + 184)
-#define HID_SMA_DOTX (HID_SMA_START + 185)
-#define HID_SMA_DDOTX (HID_SMA_START + 186)
-#define HID_SMA_DDDOTX (HID_SMA_START + 187)
-#define HID_SMA_GRAVEX (HID_SMA_START + 188)
-#define HID_SMA_HATX (HID_SMA_START + 189)
-#define HID_SMA_TILDEX (HID_SMA_START + 190)
-#define HID_SMA_VECX (HID_SMA_START + 191)
-#define HID_SMA_UNDERLINEX (HID_SMA_START + 192)
-#define HID_SMA_OVERLINEX (HID_SMA_START + 193)
-#define HID_SMA_OVERSTRIKEX (HID_SMA_START + 194)
-#define HID_SMA_PHANTOMX (HID_SMA_START + 195)
-#define HID_SMA_BOLDX (HID_SMA_START + 196)
-#define HID_SMA_ITALX (HID_SMA_START + 197)
-#define HID_SMA_SIZEXY (HID_SMA_START + 198)
-#define HID_SMA_FONTXY (HID_SMA_START + 199)
-#define HID_SMA_COLORX (HID_SMA_START + 200)
-#define HID_SMA_LRGROUPX (HID_SMA_START + 201)
-#define HID_SMA_LRPARENTX (HID_SMA_START + 202)
-#define HID_SMA_LRBRACKETX (HID_SMA_START + 203)
-#define HID_SMA_LRBRACEX (HID_SMA_START + 204)
-#define HID_SMA_LRANGLEX (HID_SMA_START + 205)
-#define HID_SMA_LRCEILX (HID_SMA_START + 206)
-#define HID_SMA_LRFLOORX (HID_SMA_START + 207)
-#define HID_SMA_LRLINEX (HID_SMA_START + 208)
-#define HID_SMA_LRDLINEX (HID_SMA_START + 209)
-#define HID_SMA_SLRPARENTX (HID_SMA_START + 210)
-#define HID_SMA_SLRBRACKETX (HID_SMA_START + 211)
-#define HID_SMA_SLRBRACEX (HID_SMA_START + 212)
-#define HID_SMA_SLRANGLEX (HID_SMA_START + 213)
-#define HID_SMA_SLRCEILX (HID_SMA_START + 214)
-#define HID_SMA_SLRFLOORX (HID_SMA_START + 215)
-#define HID_SMA_SLRLINEX (HID_SMA_START + 216)
-#define HID_SMA_SLRDLINEX (HID_SMA_START + 217)
-#define HID_SMA_RSUBX (HID_SMA_START + 218)
-#define HID_SMA_RSUPX (HID_SMA_START + 219)
-#define HID_SMA_LSUBX (HID_SMA_START + 220)
-#define HID_SMA_LSUPX (HID_SMA_START + 221)
-#define HID_SMA_SBLANK (HID_SMA_START + 222)
-#define HID_SMA_BLANK (HID_SMA_START + 223)
-#define HID_SMA_NEWLINE (HID_SMA_START + 224)
-#define HID_SMA_BINOMXY (HID_SMA_START + 225)
-#define HID_SMA_STACK (HID_SMA_START + 226)
-#define HID_SMA_MATRIX (HID_SMA_START + 227)
-#define HID_SMA_ALIGNLX (HID_SMA_START + 228)
-#define HID_SMA_ALIGNCX (HID_SMA_START + 229)
-#define HID_SMA_ALIGNRX (HID_SMA_START + 230)
-#define HID_SMA_ALEPH (HID_SMA_START + 231)
-#define HID_SMA_EMPTYSET (HID_SMA_START + 232)
-#define HID_SMA_RE (HID_SMA_START + 233)
-#define HID_SMA_IM (HID_SMA_START + 234)
-#define HID_SMA_INFINITY (HID_SMA_START + 235)
-#define HID_SMA_PARTIAL (HID_SMA_START + 236)
-#define HID_SMA_WP (HID_SMA_START + 237)
-#define HID_SMA_DOTSAXIS (HID_SMA_START + 238)
-#define HID_SMA_DOTSUP (HID_SMA_START + 239)
-#define HID_SMA_DOTSDOWN (HID_SMA_START + 240)
-#define HID_SMA_DOTSLOW (HID_SMA_START + 241)
-#define HID_SMA_DOTSVERT (HID_SMA_START + 242)
-#define HID_SMA_NOSPACE (HID_SMA_START + 243)
-
-#define HID_SMA_SETN (HID_SMA2_START + 1)
-#define HID_SMA_SETZ (HID_SMA2_START + 2)
-#define HID_SMA_SETQ (HID_SMA2_START + 3)
-#define HID_SMA_SETR (HID_SMA2_START + 4)
-#define HID_SMA_SETC (HID_SMA2_START + 5)
-#define HID_SMA_WIDEHATX (HID_SMA2_START + 6)
-#define HID_SMA_WIDETILDEX (HID_SMA2_START + 7)
-#define HID_SMA_WIDEVECX (HID_SMA2_START + 8)
-#define HID_SMA_CSUBX (HID_SMA2_START + 9)
-#define HID_SMA_CSUPX (HID_SMA2_START + 10)
-#define HID_SMA_HBAR (HID_SMA2_START + 11)
-#define HID_SMA_LAMBDABAR (HID_SMA2_START + 12)
-#define HID_SMA_LEFTARROW (HID_SMA2_START + 13)
-#define HID_SMA_RIGHTARROW (HID_SMA2_START + 14)
-#define HID_SMA_UPARROW (HID_SMA2_START + 15)
-#define HID_SMA_DOWNARROW (HID_SMA2_START + 16)
-
-#define HID_SMA_DEFAULT_DIST (HID_SMA2_START + 17)
-#define HID_SMA_LINE_DIST (HID_SMA2_START + 18)
-#define HID_SMA_ROOT_DIST (HID_SMA2_START + 19)
-#define HID_SMA_SUP_DIST (HID_SMA2_START + 20)
-#define HID_SMA_SUB_DIST (HID_SMA2_START + 21)
-#define HID_SMA_NUMERATOR_DIST (HID_SMA2_START + 22)
-#define HID_SMA_DENOMINATOR_DIST (HID_SMA2_START + 23)
-#define HID_SMA_FRACLINE_EXCWIDTH (HID_SMA2_START + 24)
-#define HID_SMA_FRACLINE_LINEWIDTH (HID_SMA2_START + 25)
-#define HID_SMA_UPPERLIMIT_DIST (HID_SMA2_START + 26)
-#define HID_SMA_LOWERLIMIT_DIST (HID_SMA2_START + 27)
-#define HID_SMA_BRACKET_EXCHEIGHT (HID_SMA2_START + 28)
-#define HID_SMA_BRACKET_DIST (HID_SMA2_START + 29)
-#define HID_SMA_MATRIXROW_DIST (HID_SMA2_START + 30)
-#define HID_SMA_MATRIXCOL_DIST (HID_SMA2_START + 31)
-#define HID_SMA_ATTRIBUT_DIST (HID_SMA2_START + 32)
-#define HID_SMA_INTERATTRIBUT_DIST (HID_SMA2_START + 33)
-#define HID_SMA_OPERATOR_EXCHEIGHT (HID_SMA2_START + 34)
-#define HID_SMA_OPERATOR_DIST (HID_SMA2_START + 35)
-#define HID_SMA_LEFTBORDER_DIST (HID_SMA2_START + 36)
-#define HID_SMA_RIGHTBORDER_DIST (HID_SMA2_START + 37)
-#define HID_SMA_UPPERBORDER_DIST (HID_SMA2_START + 38)
-#define HID_SMA_LOWERBORDER_DIST (HID_SMA2_START + 39)
-#define HID_SMA_SCALE_ALL_BRACKETS (HID_SMA2_START + 40)
-#define HID_SMA_BRACKET_EXCHEIGHT2 (HID_SMA2_START + 41)
-#define HID_SMA_LMRANGLEXY (HID_SMA2_START + 42)
-#define HID_SMA_SLMRANGLEXY (HID_SMA2_START + 43)
-#define HID_SMA_XWIDESLASHY (HID_SMA2_START + 44)
-#define HID_SMA_XWIDEBSLASHY (HID_SMA2_START + 45)
-#define HID_SMA_XOVERBRACEY (HID_SMA2_START + 46)
-#define HID_SMA_XUNDERBRACEY (HID_SMA2_START + 47)
-#define HID_SMA_LRDBRACKETX (HID_SMA2_START + 48)
-#define HID_SMA_SLRDBRACKETX (HID_SMA2_START + 49)
-
-#define HID_SMA_CONTROL_SYMBOLSET_VIEW (HID_SMA2_START + 50)
-#define HID_SMA_CONTROL_FONTCHAR_VIEW (HID_SMA2_START + 51)
-
#define BMP_ARROW_RIGHT 1
#define MN_WIN 60
diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx
index 0fcaa032ff36..aa6264989bcd 100644
--- a/starmath/inc/symbol.hxx
+++ b/starmath/inc/symbol.hxx
@@ -83,24 +83,24 @@ private:
String m_aName;
String m_aExportName;
String m_aSetName;
- sal_Unicode m_cChar;
+ sal_UCS4 m_cChar;
bool m_bPredefined;
bool m_bDocSymbol;
public:
SmSym();
- SmSym(const String& rName, const Font& rFont, sal_Unicode cChar,
+ SmSym(const String& rName, const Font& rFont, sal_UCS4 cChar,
const String& rSet, bool bIsPredefined = false);
SmSym(const SmSym& rSymbol);
SmSym& operator = (const SmSym& rSymbol);
const Font& GetFace() const { return m_aFace; }
- sal_Unicode GetCharacter() const { return m_cChar; }
+ sal_UCS4 GetCharacter() const { return m_cChar; }
const String& GetName() const { return m_aName; }
void SetFace( const Font& rFont ) { m_aFace = rFont; }
- void SetCharacter( sal_Unicode cChar ) { m_cChar = cChar; }
+ void SetCharacter( sal_UCS4 cChar ) { m_cChar = cChar; }
//! since the symbol name is also used as key in the map it should not be possible to change the name
//! because ten the key would not be the same as its supposed copy here
@@ -169,7 +169,7 @@ public:
std::set< String > GetSymbolSetNames() const;
const SymbolPtrVec_t GetSymbolSet( const String& rSymbolSetName );
- USHORT GetSymbolCount() const { return static_cast< USHORT >(m_aSymbols.size()); }
+ sal_uInt16 GetSymbolCount() const { return static_cast< sal_uInt16 >(m_aSymbols.size()); }
const SymbolPtrVec_t GetSymbols() const;
bool AddOrReplaceSymbol( const SmSym & rSymbol, bool bForceChange = false );
void RemoveSymbol( const String & rSymbolName );
diff --git a/starmath/inc/toolbox.hxx b/starmath/inc/toolbox.hxx
index 516a265731a4..4242867f3130 100644
--- a/starmath/inc/toolbox.hxx
+++ b/starmath/inc/toolbox.hxx
@@ -32,12 +32,10 @@
#include <sfx2/basedlgs.hxx>
#include <sfx2/childwin.hxx>
#include <vcl/toolbox.hxx>
+
#include "smmod.hxx"
#include "config.hxx"
-
-#include "dialog.hrc"
-
-#define NUM_TBX_CATEGORIES 9
+#include "toolbox.hrc"
class SmToolBoxWindow : public SfxFloatingWindow
{
@@ -48,18 +46,18 @@ protected:
ToolBox *pToolBoxCmd;
ToolBox *vToolBoxCategories[NUM_TBX_CATEGORIES];
ImageList *aImageLists [NUM_TBX_CATEGORIES + 1]; /* regular */
- USHORT nActiveCategoryRID;
+ sal_uInt16 nActiveCategoryRID;
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual void GetFocus();
- void ApplyImageLists( USHORT nCategoryRID );
+ void ApplyImageLists( sal_uInt16 nCategoryRID );
DECL_LINK( CategoryClickHdl, ToolBox* );
DECL_LINK( CmdSelectHdl, ToolBox* );
SmViewShell * GetView();
- const ImageList * GetImageList( USHORT nResId );
+ const ImageList * GetImageList( sal_uInt16 nResId );
public:
SmToolBoxWindow(SfxBindings *pBindings,
@@ -72,7 +70,7 @@ public:
virtual void DataChanged( const DataChangedEvent &rEvt );
void AdjustPosSize( bool bSetPos );
- void SetCategory(USHORT nCategory);
+ void SetCategory(sal_uInt16 nCategory);
};
/**************************************************************************/
@@ -83,7 +81,7 @@ class SmToolBoxWrapper : public SfxChildWindow
protected:
SmToolBoxWrapper(Window *pParentWindow,
- USHORT, SfxBindings*, SfxChildWinInfo*);
+ sal_uInt16, SfxBindings*, SfxChildWinInfo*);
};
#endif
diff --git a/starmath/inc/unomodel.hxx b/starmath/inc/unomodel.hxx
index ba84bd08cc70..693ea3bc9b2e 100644
--- a/starmath/inc/unomodel.hxx
+++ b/starmath/inc/unomodel.hxx
@@ -95,7 +95,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 );
virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xParent ) throw( ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException );
diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx
index 3dca4c91c7d8..a4e70e1b648d 100644
--- a/starmath/inc/utility.hxx
+++ b/starmath/inc/utility.hxx
@@ -41,10 +41,6 @@ class String;
#define C2S(cChar) String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(cChar))
-/////////////////////////////////////////////////////////////////
-
-const ByteString ExportString( const String& rString );
-const String ImportString( const ByteString& rByteString );
/////////////////////////////////////////////////////////////////
@@ -141,7 +137,7 @@ SmFace & operator *= (SmFace &rFace, const Fraction &rFrac);
class SmPickList : public SfxPtrArr
{
protected:
- USHORT nSize;
+ sal_uInt16 nSize;
virtual void *CreateItem(const String& rString) = 0;
virtual void *CreateItem(const void *pItem) = 0;
@@ -151,18 +147,18 @@ protected:
virtual String GetStringItem(void *pItem) = 0;
- void *GetPtr(USHORT nPos) const { return SfxPtrArr::GetObject(nPos); }
- void *&GetPtr(USHORT nPos) { return SfxPtrArr::GetObject(nPos); }
- void InsertPtr(USHORT nPos, void *pItem) { SfxPtrArr::Insert(nPos, pItem); }
- void RemovePtr(USHORT nPos, USHORT nCount = 1) { SfxPtrArr::Remove(nPos, nCount); }
+ void *GetPtr(sal_uInt16 nPos) const { return SfxPtrArr::GetObject(nPos); }
+ void *&GetPtr(sal_uInt16 nPos) { return SfxPtrArr::GetObject(nPos); }
+ void InsertPtr(sal_uInt16 nPos, void *pItem) { SfxPtrArr::Insert(nPos, pItem); }
+ void RemovePtr(sal_uInt16 nPos, sal_uInt16 nCount = 1) { SfxPtrArr::Remove(nPos, nCount); }
public:
- SmPickList(USHORT nInitSize = 0, USHORT nMaxSize = 5);
+ SmPickList(sal_uInt16 nInitSize = 0, sal_uInt16 nMaxSize = 5);
virtual ~SmPickList();
SmPickList& operator = (const SmPickList& rList);
- void *Get(USHORT nPos = 0) const { return GetPtr(nPos); }
+ void *Get(sal_uInt16 nPos = 0) const { return GetPtr(nPos); }
using SfxPtrArr::Insert;
void Insert(const void* pItem);
void Update(const void* pItem, const void *pNewItem);
@@ -170,10 +166,10 @@ public:
void Remove(const void* pItem);
using SfxPtrArr::operator [];
- void *operator [] (USHORT nPos) const { return GetPtr(nPos); }
+ void *operator [] (sal_uInt16 nPos) const { return GetPtr(nPos); }
- USHORT GetSize() const { return nSize; }
- USHORT Count() const { return SfxPtrArr::Count(); }
+ sal_uInt16 GetSize() const { return nSize; }
+ sal_uInt16 Count() const { return SfxPtrArr::Count(); }
void Clear();
};
@@ -200,7 +196,7 @@ protected:
public:
SmFontPickList()
: SmPickList(0, 5) {}
- SmFontPickList(USHORT nInitSize, USHORT nMaxSize)
+ SmFontPickList(sal_uInt16 nInitSize, sal_uInt16 nMaxSize)
: SmPickList(nInitSize, nMaxSize) {}
SmFontPickList(const SmPickList& rOrig )
: SmPickList(rOrig) {}
@@ -215,11 +211,11 @@ public:
using SmPickList::Contains;
inline bool Contains(const Font &rFont) const;
- inline Font Get(USHORT nPos = 0) const;
+ inline Font Get(sal_uInt16 nPos = 0) const;
inline SmFontPickList& operator = (const SmFontPickList& rList);
using SfxPtrArr::operator [];
- inline Font operator [] (USHORT nPos) const;
+ inline Font operator [] (sal_uInt16 nPos) const;
void ReadFrom(const SmFontDialog& rDialog);
void WriteTo(SmFontDialog& rDialog) const;
@@ -230,12 +226,12 @@ inline SmFontPickList& SmFontPickList::operator = (const SmFontPickList& rList)
*(SmPickList *)this = *(SmPickList *)&rList; return *this;
}
-inline Font SmFontPickList::operator [] (USHORT nPos) const
+inline Font SmFontPickList::operator [] (sal_uInt16 nPos) const
{
return *((Font *)SmPickList::operator[](nPos));
}
-inline Font SmFontPickList::Get(USHORT nPos) const
+inline Font SmFontPickList::Get(sal_uInt16 nPos) const
{
return nPos < Count() ? *((Font *)SmPickList::Get(nPos)) : Font();
}
@@ -257,7 +253,7 @@ protected:
DECL_LINK(SelectHdl, ListBox *);
public:
- SmFontPickListBox(Window* pParent, const ResId& rResId, USHORT nMax = 4);
+ SmFontPickListBox(Window* pParent, const ResId& rResId, sal_uInt16 nMax = 4);
SmFontPickListBox& operator = (const SmFontPickList& rList);
diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index 081dc2388f8c..d1d9e7e99b1d 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -64,7 +64,7 @@ public:
void ShowCursor(bool bShow);
bool IsLineVisible() const { return bIsLineVisible; }
void ShowLine(bool bShow);
- const SmNode * SetCursorPos(USHORT nRow, USHORT nCol);
+ const SmNode * SetCursorPos(sal_uInt16 nRow, sal_uInt16 nCol);
protected:
void SetIsCursorVisible(bool bVis) { bIsCursorVisible = bVis; }
using Window::SetCursor;
@@ -78,7 +78,7 @@ private:
SmGraphicAccessible * pAccessible;
SmViewShell *pViewShell;
- USHORT nZoom;
+ sal_uInt16 nZoom;
short nModifyCount;
protected:
@@ -109,9 +109,9 @@ public:
SmViewShell * GetView() { return pViewShell; }
using Window::SetZoom;
- void SetZoom(USHORT Factor);
+ void SetZoom(sal_uInt16 Factor);
using Window::GetZoom;
- USHORT GetZoom() const { return nZoom; }
+ sal_uInt16 GetZoom() const { return nZoom; }
const Point & GetFormulaDrawPos() const { return aFormulaDrawPos; }
@@ -135,8 +135,8 @@ class SmGraphicController: public SfxControllerItem
protected:
SmGraphicWindow &rGraphic;
public:
- SmGraphicController(SmGraphicWindow &, USHORT, SfxBindings & );
- virtual void StateChanged(USHORT nSID,
+ SmGraphicController(SmGraphicWindow &, sal_uInt16, SfxBindings & );
+ virtual void StateChanged(sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState);
};
@@ -149,12 +149,12 @@ protected:
SmEditWindow &rEdit;
public:
- SmEditController(SmEditWindow &, USHORT, SfxBindings & );
+ SmEditController(SmEditWindow &, sal_uInt16, SfxBindings & );
#if OSL_DEBUG_LEVEL > 1
virtual ~SmEditController();
#endif
- virtual void StateChanged(USHORT nSID,
+ virtual void StateChanged(sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState);
};
@@ -206,7 +206,7 @@ class SmCmdBoxWrapper : public SfxChildWindow
protected:
SmCmdBoxWrapper(Window *pParentWindow,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings *pBindings,
SfxChildWinInfo *pInfo);
@@ -264,20 +264,20 @@ protected:
void DrawText(OutputDevice& rDevice,
const Point& rPosition,
const String& rText,
- USHORT MaxWidth);
+ sal_uInt16 MaxWidth);
- virtual USHORT Print(SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pPrintDialog = 0);
- virtual SfxPrinter *GetPrinter(BOOL bCreate = FALSE);
- virtual USHORT SetPrinter(SfxPrinter *pNewPrinter,
- USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false);
+ virtual sal_uInt16 Print(SfxProgress &rProgress, sal_Bool bIsAPI);
+ virtual SfxPrinter *GetPrinter(sal_Bool bCreate = sal_False);
+ virtual sal_uInt16 SetPrinter(SfxPrinter *pNewPrinter,
+ sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false);
bool Insert( SfxMedium& rMedium );
bool InsertFrom(SfxMedium &rMedium);
virtual SfxTabPage *CreatePrintOptionsPage(Window *pParent,
const SfxItemSet &rOptions);
- virtual void Deactivate(BOOL IsMDIActivate);
- virtual void Activate(BOOL IsMDIActivate);
+ virtual void Deactivate(sal_Bool IsMDIActivate);
+ virtual void Activate(sal_Bool IsMDIActivate);
virtual Size GetOptimalSizePixel() const;
virtual void AdjustPosSizePixel(const Point &rPos, const Size &rSize);
virtual void InnerResizePixel(const Point &rOfs, const Size &rSize);
diff --git a/starmath/prj/build.lst b/starmath/prj/build.lst
index 1eb4c2334f25..fa97e3c8c2d6 100644
--- a/starmath/prj/build.lst
+++ b/starmath/prj/build.lst
@@ -1,4 +1,4 @@
-sm starmath : l10n svx dtrans NULL
+sm starmath : LIBXSLT:libxslt L10N:l10n svx NULL
sm starmath usr1 - all sm_mkout NULL
sm starmath\inc nmake - all sm_inc NULL
sm starmath\prj get - all sm_prj NULL
@@ -7,4 +7,4 @@ sm starmath\sdi nmake - all sm_sdi NULL
sm starmath\source nmake - all sm_sorce sm_sdi sm_inc NULL
sm starmath\util nmake - all sm_util sm_sorce NULL
sm starmath\qa\unoapi nmake - all sm_qa_unoapi NULL
-sm starmath\qa\cppunit nmake - all sm_qa_cppunit sm_util NULL
+# sm starmath\qa\cppunit nmake - all sm_qa_cppunit sm_util NULL
diff --git a/starmath/prj/d.lst b/starmath/prj/d.lst
index bc48875e81e6..78bae57498ea 100644
--- a/starmath/prj/d.lst
+++ b/starmath/prj/d.lst
@@ -19,3 +19,5 @@ mkdir: %_DEST%\inc%_EXT%\starmath
..\uiconfig\smath\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\smath\menubar\*.xml
..\uiconfig\smath\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\smath\toolbar\*.xml
..\uiconfig\smath\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\smath\statusbar\*.xml
+..\%__SRC%\misc\sm.component %_DEST%\xml%_EXT%\sm.component
+..\%__SRC%\misc\smd.component %_DEST%\xml%_EXT%\smd.component
diff --git a/starmath/qa/cppunit/makefile.mk b/starmath/qa/cppunit/makefile.mk
index cd31ef6d4042..99a371a3b2c0 100644
--- a/starmath/qa/cppunit/makefile.mk
+++ b/starmath/qa/cppunit/makefile.mk
@@ -100,22 +100,35 @@ $(MISC)/$(TARGET)/udkapi.rdb .ERRREMOVE : $(SOLARBINDIR)$/udkapi.rdb
$(MKDIRHIER) $(@:d)
$(GNUCOPY) $? $@
-#Make a services.rdb with the services we know we need to get up and running
-$(MISC)/$(TARGET)/services.rdb .ERRREMOVE : $(MISC)/$(TARGET)/udkapi.rdb makefile.mk
- $(MKDIRHIER) $(@:d)
- $(REGCOMP) -register -br $(MISC)/$(TARGET)/udkapi.rdb -r $@ -wop \
- -c $(DLLPRE)fwk$(DLLPOSTFIX)$(DLLPOST) \
- -c $(DLLPRE)tk$(DLLPOSTFIX)$(DLLPOST) \
- -c $(DLLPRE)sfx$(DLLPOSTFIX)$(DLLPOST) \
- -c $(DLLPRE)vcl$(DLLPOSTFIX)$(DLLPOST) \
- -c $(DLLPRE)mcnttype$(DLLPOST) \
- -c i18npool.uno$(DLLPOST)
+ure_components = \
+ stocservices
+test_components = $(ure_components)
+test_components += \
+ component/framework/util/fwk \
+ component/toolkit/util/tk \
+ component/sfx2/util/sfx \
+ configmgr \
+ vcl \
+ mcnttype \
+ i18npool
.IF "$(OS)" == "WNT"
- $(REGCOMP) -register -br $(MISC)/$(TARGET)/udkapi.rdb -r $@ -wop \
- -c $(DLLPRE)sysdtrans$(DLLPOST) \
- -c $(DLLPRE)ftransl$(DLLPOST)
+test_components += \
+ sysdtrans \
+ ftransl
.ENDIF
+# Make a services.rdb with the services we know we need to get up and running
+$(MISC)/services.input : makefile.mk
+ $(MKDIRHIER) $(@:d)
+ echo \
+ '<list>$(test_components:^"<filename>":+".component</filename>")</list>' \
+ > $@
+
+$(MISC)/$(TARGET)/services.rdb .ERRREMOVE : makefile.mk $(MISC)/services.input
+ $(MKDIRHIER) $(@:d)
+ $(XSLTPROC) --nonet --stringparam prefix $(SOLARXMLDIR)/ -o $@.tmp \
+ $(SOLARENV)/bin/packcomponents.xslt $(MISC)/services.input
+ cat $(MISC)/$@.tmp | sed 's|/program/|/|g' > $@
#Tweak things so that we use the .res files in the solver
STAR_RESOURCEPATH:=$(PWD)/$(BIN)$(PATH_SEPERATOR)$(SOLARBINDIR)
@@ -125,9 +138,9 @@ test .PHONY: $(SHL1TARGETN) $(MISC)/$(TARGET)/services.rdb $(MISC)$/$(TARGET)$/t
@echo ----------------------------------------------------------
@echo - start unit test \#1 on library $(SHL1TARGETN)
@echo ----------------------------------------------------------
- $(CPPUNITTESTER) $(SHL1TARGETN) -headless -invisible \
- -env:UNO_SERVICES=$(my_file)$(PWD)/$(MISC)/$(TARGET)/services.rdb \
+ STAR_RESOURCEPATH="$(my_file)$(OUTDIR)/bin" $(CPPUNITTESTER) $(SHL1TARGETN) -headless -invisible \
+ -env:UNO_SERVICES="$(my_file)$(PWD)/$(MISC)/$(TARGET)/services.rdb" \
-env:UNO_TYPES="$(my_file)$(PWD)/$(MISC)/$(TARGET)/types.rdb $(my_file)$(PWD)/$(MISC)/$(TARGET)/udkapi.rdb" \
- -env:OOO_BASE_DIR="$(my_file)$(PWD)/$(MISC)/$(TARGET)" \
+ -env:OOO_BASE_DIR="$(my_file)$(OUTDIR)/lib" \
-env:BRAND_BASE_DIR="$(my_file)$(PWD)/$(MISC)/$(TARGET)" \
-env:UNO_USER_PACKAGES_CACHE="$(my_file)$(PWD)/$(MISC)/$(TARGET)"
diff --git a/starmath/qa/unoapi/knownissues.xcl b/starmath/qa/unoapi/knownissues.xcl
index e11895ef3fe4..f82014a51a33 100644
--- a/starmath/qa/unoapi/knownissues.xcl
+++ b/starmath/qa/unoapi/knownissues.xcl
@@ -16,3 +16,6 @@ sm.SmGraphicAccessible::com::sun::star::accessibility::XAccessibleText
### i111220 ###
sm.XMLMetaExporter::com::sun::star::document::XFilter
+
+### i112743 ###
+sm.XMLSettingsExporter::com::sun::star::document::XFilter
diff --git a/starmath/sdi/smath.sdi b/starmath/sdi/smath.sdi
index 99399c8396e3..8779706b08e2 100644..100755
--- a/starmath/sdi/smath.sdi
+++ b/starmath/sdi/smath.sdi
@@ -403,8 +403,8 @@ SfxVoidItem InsertConfigName SID_INSERTSYMBOL
]
//--------------------------------------------------------------------------
-SfxBoolItem InsertFormula SID_INSERT_FORMULA
-(SfxStringItem Name SID_INSERT_FORMULA,SfxStringItem Filter FN_PARAM_1)
+SfxBoolItem ImportFormula SID_IMPORT_FORMULA
+(SfxStringItem Name SID_IMPORT_FORMULA,SfxStringItem Filter FN_PARAM_1)
[
/* flags: */
AutoUpdate = FALSE,
diff --git a/starmath/sdi/smslots.sdi b/starmath/sdi/smslots.sdi
index f96690b5c1f0..cc259af5d117 100644..100755
--- a/starmath/sdi/smslots.sdi
+++ b/starmath/sdi/smslots.sdi
@@ -275,7 +275,7 @@ interface FormulaView
ExecMethod = Execute ;
StateMethod = GetState ;
]
- SID_INSERT_FORMULA //idlpp ole : no , status : no
+ SID_IMPORT_FORMULA //idlpp ole : no , status : no
[
ExecMethod = Execute ;
StateMethod = GetState ;
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index c53319e2cfe1..590d3fa5eb68 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -338,8 +338,8 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getAccessibleIndexInParent()
Window *pAccParent = pWin ? pWin->GetAccessibleParentWindow() : 0;
if (pAccParent)
{
- USHORT nCnt = pAccParent->GetAccessibleChildWindowCount();
- for (USHORT i = 0; i < nCnt && nIdx == -1; ++i)
+ sal_uInt16 nCnt = pAccParent->GetAccessibleChildWindowCount();
+ for (sal_uInt16 i = 0; i < nCnt && nIdx == -1; ++i)
if (pAccParent->GetAccessibleChildWindow( i ) == pWin)
nIdx = i;
}
@@ -487,7 +487,7 @@ Sequence< beans::PropertyValue > SAL_CALL SmGraphicAccessible::getCharacterAttri
throw (IndexOutOfBoundsException, RuntimeException)
{
SolarMutexGuard aGuard;
- INT32 nLen = GetAccessibleText_Impl().Len();
+ sal_Int32 nLen = GetAccessibleText_Impl().Len();
if (!(0 <= nIndex && nIndex < nLen))
throw IndexOutOfBoundsException();
return Sequence< beans::PropertyValue >();
@@ -667,11 +667,11 @@ sal_Bool SAL_CALL SmGraphicAccessible::setSelection(
throw (IndexOutOfBoundsException, RuntimeException)
{
SolarMutexGuard aGuard;
- INT32 nLen = GetAccessibleText_Impl().Len();
+ sal_Int32 nLen = GetAccessibleText_Impl().Len();
if (!(0 <= nStartIndex && nStartIndex < nLen) ||
!(0 <= nEndIndex && nEndIndex < nLen))
throw IndexOutOfBoundsException();
- return FALSE;
+ return sal_False;
}
OUString SAL_CALL SmGraphicAccessible::getText()
@@ -895,7 +895,7 @@ SmViewForwarder::~SmViewForwarder()
{
}
-BOOL SmViewForwarder::IsValid() const
+sal_Bool SmViewForwarder::IsValid() const
{
return rEditAcc.GetEditView() != 0;
}
@@ -992,13 +992,13 @@ IMPL_LINK(SmTextForwarder, NotifyHdl, EENotify*, aNotify)
return 0;
}
-USHORT SmTextForwarder::GetParagraphCount() const
+sal_uInt16 SmTextForwarder::GetParagraphCount() const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetParagraphCount() : 0;
}
-USHORT SmTextForwarder::GetTextLen( USHORT nParagraph ) const
+sal_uInt16 SmTextForwarder::GetTextLen( sal_uInt16 nParagraph ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetTextLen( nParagraph ) : 0;
@@ -1014,7 +1014,7 @@ String SmTextForwarder::GetText( const ESelection& rSel ) const
return aRet;
}
-SfxItemSet SmTextForwarder::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib ) const
+SfxItemSet SmTextForwarder::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
OSL_ENSURE( pEditEngine, "EditEngine missing" );
@@ -1044,17 +1044,17 @@ SfxItemSet SmTextForwarder::GetAttribs( const ESelection& rSel, BOOL bOnlyHardAt
}
}
-SfxItemSet SmTextForwarder::GetParaAttribs( USHORT nPara ) const
+SfxItemSet SmTextForwarder::GetParaAttribs( sal_uInt16 nPara ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
OSL_ENSURE( pEditEngine, "EditEngine missing" );
SfxItemSet aSet( pEditEngine->GetParaAttribs( nPara ) );
- USHORT nWhich = EE_PARA_START;
+ sal_uInt16 nWhich = EE_PARA_START;
while( nWhich <= EE_PARA_END )
{
- if( aSet.GetItemState( nWhich, TRUE ) != SFX_ITEM_ON )
+ if( aSet.GetItemState( nWhich, sal_True ) != SFX_ITEM_ON )
{
if( pEditEngine->HasParaAttrib( nPara, nWhich ) )
aSet.Put( pEditEngine->GetParaAttrib( nPara, nWhich ) );
@@ -1065,7 +1065,7 @@ SfxItemSet SmTextForwarder::GetParaAttribs( USHORT nPara ) const
return aSet;
}
-void SmTextForwarder::SetParaAttribs( USHORT nPara, const SfxItemSet& rSet )
+void SmTextForwarder::SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet )
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
@@ -1085,7 +1085,7 @@ void SmTextForwarder::RemoveAttribs( const ESelection& rSelection, sal_Bool bRem
pEditEngine->RemoveAttribs( rSelection, bRemoveParaAttribs, nWhich );
}
-void SmTextForwarder::GetPortions( USHORT nPara, SvUShorts& rList ) const
+void SmTextForwarder::GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
@@ -1120,15 +1120,15 @@ void SmTextForwarder::QuickSetAttribs( const SfxItemSet& rSet, const ESelection&
pEditEngine->QuickSetAttribs( rSet, rSel );
}
-BOOL SmTextForwarder::IsValid() const
+sal_Bool SmTextForwarder::IsValid() const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
// cannot reliably query EditEngine state
// while in the middle of an update
- return pEditEngine ? pEditEngine->GetUpdateMode() : FALSE;
+ return pEditEngine ? pEditEngine->GetUpdateMode() : sal_False;
}
-XubString SmTextForwarder::CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor )
+XubString SmTextForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor )
{
XubString aTxt;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1137,11 +1137,11 @@ XubString SmTextForwarder::CalcFieldValue( const SvxFieldItem& rField, USHORT nP
return aTxt;
}
-void SmTextForwarder::FieldClicked(const SvxFieldItem&, USHORT, USHORT)
+void SmTextForwarder::FieldClicked(const SvxFieldItem&, sal_uInt16, sal_uInt16)
{
}
-USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, USHORT nWhich )
+sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, sal_uInt16 nWhich )
{
EECharAttribArray aAttribs;
@@ -1150,16 +1150,16 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe
SfxItemState eState = SFX_ITEM_DEFAULT;
// check all paragraphs inside the selection
- for( USHORT nPara = rSel.nStartPara; nPara <= rSel.nEndPara; nPara++ )
+ for( sal_uInt16 nPara = rSel.nStartPara; nPara <= rSel.nEndPara; nPara++ )
{
SfxItemState eParaState = SFX_ITEM_DEFAULT;
// calculate start and endpos for this paragraph
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if( rSel.nStartPara == nPara )
nPos = rSel.nStartPos;
- USHORT nEndPos = rSel.nEndPos;
+ sal_uInt16 nEndPos = rSel.nEndPos;
if( rSel.nEndPara != nPara )
nEndPos = rEditEngine.GetTextLen( nPara );
@@ -1169,11 +1169,11 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe
bool bEmpty = true; // we found no item inside the selektion of this paragraph
bool bGaps = false; // we found items but theire gaps between them
- USHORT nLastEnd = nPos;
+ sal_uInt16 nLastEnd = nPos;
const SfxPoolItem* pParaItem = NULL;
- for( USHORT nAttrib = 0; nAttrib < aAttribs.Count(); nAttrib++ )
+ for( sal_uInt16 nAttrib = 0; nAttrib < aAttribs.Count(); nAttrib++ )
{
struct EECharAttrib aAttrib = aAttribs.GetObject( nAttrib );
OSL_ENSURE( aAttrib.pAttr, "GetCharAttribs gives corrupt data" );
@@ -1234,18 +1234,18 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe
return eState;
}
-USHORT SmTextForwarder::GetItemState( const ESelection& rSel, USHORT nWhich ) const
+sal_uInt16 SmTextForwarder::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const
{
- USHORT nState = SFX_ITEM_DISABLED;
+ sal_uInt16 nState = SFX_ITEM_DISABLED;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
nState = GetSvxEditEngineItemState( *pEditEngine, rSel, nWhich );
return nState;
}
-USHORT SmTextForwarder::GetItemState( USHORT nPara, USHORT nWhich ) const
+sal_uInt16 SmTextForwarder::GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const
{
- USHORT nState = SFX_ITEM_DISABLED;
+ sal_uInt16 nState = SFX_ITEM_DISABLED;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
{
@@ -1255,30 +1255,30 @@ USHORT SmTextForwarder::GetItemState( USHORT nPara, USHORT nWhich ) const
return nState;
}
-LanguageType SmTextForwarder::GetLanguage( USHORT nPara, USHORT nIndex ) const
+LanguageType SmTextForwarder::GetLanguage( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetLanguage(nPara, nIndex) : LANGUAGE_NONE;
}
-USHORT SmTextForwarder::GetFieldCount( USHORT nPara ) const
+sal_uInt16 SmTextForwarder::GetFieldCount( sal_uInt16 nPara ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetFieldCount(nPara) : 0;
}
-EFieldInfo SmTextForwarder::GetFieldInfo( USHORT nPara, USHORT nField ) const
+EFieldInfo SmTextForwarder::GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetFieldInfo( nPara, nField ) : EFieldInfo();
}
-EBulletInfo SmTextForwarder::GetBulletInfo( USHORT /*nPara*/ ) const
+EBulletInfo SmTextForwarder::GetBulletInfo( sal_uInt16 /*nPara*/ ) const
{
return EBulletInfo();
}
-Rectangle SmTextForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) const
+Rectangle SmTextForwarder::GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
Rectangle aRect(0,0,0,0);
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1302,7 +1302,7 @@ Rectangle SmTextForwarder::GetCharBounds( USHORT nPara, USHORT nIndex ) const
return aRect;
}
-Rectangle SmTextForwarder::GetParaBounds( USHORT nPara ) const
+Rectangle SmTextForwarder::GetParaBounds( sal_uInt16 nPara ) const
{
Rectangle aRect(0,0,0,0);
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1310,8 +1310,8 @@ Rectangle SmTextForwarder::GetParaBounds( USHORT nPara ) const
if (pEditEngine)
{
const Point aPnt = pEditEngine->GetDocPosTopLeft( nPara );
- const ULONG nWidth = pEditEngine->CalcTextWidth();
- const ULONG nHeight = pEditEngine->GetTextHeight( nPara );
+ const sal_uLong nWidth = pEditEngine->CalcTextWidth();
+ const sal_uLong nHeight = pEditEngine->GetTextHeight( nPara );
aRect = Rectangle( aPnt.X(), aPnt.Y(), aPnt.X() + nWidth, aPnt.Y() + nHeight );
}
@@ -1330,7 +1330,7 @@ OutputDevice* SmTextForwarder::GetRefDevice() const
return pEditEngine ? pEditEngine->GetRefDevice() : 0;
}
-sal_Bool SmTextForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPara, USHORT& nIndex ) const
+sal_Bool SmTextForwarder::GetIndexAtPoint( const Point& rPos, sal_uInt16& nPara, sal_uInt16& nIndex ) const
{
sal_Bool bRes = sal_False;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1344,7 +1344,7 @@ sal_Bool SmTextForwarder::GetIndexAtPoint( const Point& rPos, USHORT& nPara, USH
return bRes;
}
-sal_Bool SmTextForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const
+sal_Bool SmTextForwarder::GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const
{
sal_Bool bRes = sal_False;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1365,7 +1365,7 @@ sal_Bool SmTextForwarder::GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& n
return bRes;
}
-sal_Bool SmTextForwarder::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const
+sal_Bool SmTextForwarder::GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ?
@@ -1373,31 +1373,31 @@ sal_Bool SmTextForwarder::GetAttributeRun( USHORT& nStartIndex, USHORT& nEndInde
: sal_False;
}
-USHORT SmTextForwarder::GetLineCount( USHORT nPara ) const
+sal_uInt16 SmTextForwarder::GetLineCount( sal_uInt16 nPara ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetLineCount(nPara) : 0;
}
-USHORT SmTextForwarder::GetLineLen( USHORT nPara, USHORT nLine ) const
+sal_uInt16 SmTextForwarder::GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetLineLen(nPara, nLine) : 0;
}
-void SmTextForwarder::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nPara, USHORT nLine ) const
+void SmTextForwarder::GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nPara, sal_uInt16 nLine ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
pEditEngine->GetLineBoundaries(rStart, rEnd, nPara, nLine);
}
-USHORT SmTextForwarder::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const
+sal_uInt16 SmTextForwarder::GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
return pEditEngine ? pEditEngine->GetLineNumberAtIndex(nPara, nIndex) : 0;
}
-sal_Bool SmTextForwarder::QuickFormatDoc( BOOL /*bFull*/ )
+sal_Bool SmTextForwarder::QuickFormatDoc( sal_Bool /*bFull*/ )
{
sal_Bool bRes = sal_False;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1409,13 +1409,13 @@ sal_Bool SmTextForwarder::QuickFormatDoc( BOOL /*bFull*/ )
return bRes;
}
-sal_Int16 SmTextForwarder::GetDepth( USHORT /*nPara*/ ) const
+sal_Int16 SmTextForwarder::GetDepth( sal_uInt16 /*nPara*/ ) const
{
// math has no outliner...
return -1;
}
-sal_Bool SmTextForwarder::SetDepth( USHORT /*nPara*/, sal_Int16 nNewDepth )
+sal_Bool SmTextForwarder::SetDepth( sal_uInt16 /*nPara*/, sal_Int16 nNewDepth )
{
// math has no outliner...
return -1 == nNewDepth; // is it the value from 'GetDepth' ?
@@ -1464,12 +1464,12 @@ void SmTextForwarder::AppendParagraph()
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
{
- USHORT nParaCount = pEditEngine->GetParagraphCount();
+ sal_uInt16 nParaCount = pEditEngine->GetParagraphCount();
pEditEngine->InsertParagraph( nParaCount, String() );
}
}
-xub_StrLen SmTextForwarder::AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet )
+xub_StrLen SmTextForwarder::AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet )
{
xub_StrLen nRes = 0;
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
@@ -1513,7 +1513,7 @@ SmEditViewForwarder::~SmEditViewForwarder()
{
}
-BOOL SmEditViewForwarder::IsValid() const
+sal_Bool SmEditViewForwarder::IsValid() const
{
return rEditAcc.GetEditView() != 0;
}
@@ -1860,8 +1860,8 @@ sal_Int32 SAL_CALL SmEditAccessible::getAccessibleIndexInParent( )
Window *pAccParent = pWin ? pWin->GetAccessibleParentWindow() : 0;
if (pAccParent)
{
- USHORT nCnt = pAccParent->GetAccessibleChildWindowCount();
- for (USHORT i = 0; i < nCnt && nIdx == -1; ++i)
+ sal_uInt16 nCnt = pAccParent->GetAccessibleChildWindowCount();
+ for (sal_uInt16 i = 0; i < nCnt && nIdx == -1; ++i)
if (pAccParent->GetAccessibleChildWindow( i ) == pWin)
nIdx = i;
}
diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx
index a0cb663d0839..a6b682b706fb 100644
--- a/starmath/source/accessibility.hxx
+++ b/starmath/source/accessibility.hxx
@@ -188,7 +188,7 @@ public:
SmViewForwarder( SmEditAccessible &rAcc );
virtual ~SmViewForwarder();
- virtual BOOL IsValid() const;
+ virtual sal_Bool IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const;
@@ -211,17 +211,17 @@ public:
SmTextForwarder( SmEditAccessible& rAcc, SmEditSource & rSource );
virtual ~SmTextForwarder();
- virtual USHORT GetParagraphCount() const;
- virtual USHORT GetTextLen( USHORT nParagraph ) const;
+ virtual sal_uInt16 GetParagraphCount() const;
+ virtual sal_uInt16 GetTextLen( sal_uInt16 nParagraph ) const;
virtual String GetText( const ESelection& rSel ) const;
- virtual SfxItemSet GetAttribs( const ESelection& rSel, BOOL bOnlyHardAttrib = EditEngineAttribs_All ) const;
- virtual SfxItemSet GetParaAttribs( USHORT nPara ) const;
- virtual void SetParaAttribs( USHORT nPara, const SfxItemSet& rSet );
+ virtual SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All ) const;
+ virtual SfxItemSet GetParaAttribs( sal_uInt16 nPara ) const;
+ virtual void SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet );
virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
- virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const;
+ virtual void GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const;
- virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const;
- virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const;
+ virtual sal_uInt16 GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const;
+ virtual sal_uInt16 GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const;
virtual void QuickInsertText( const String& rText, const ESelection& rSel );
virtual void QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel );
@@ -230,36 +230,36 @@ public:
virtual SfxItemPool* GetPool() const;
- virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor );
- virtual void FieldClicked(const SvxFieldItem&, USHORT, USHORT);
- virtual BOOL IsValid() const;
+ virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor );
+ virtual void FieldClicked(const SvxFieldItem&, sal_uInt16, sal_uInt16);
+ virtual sal_Bool IsValid() const;
- virtual LanguageType GetLanguage( USHORT, USHORT ) const;
- virtual USHORT GetFieldCount( USHORT nPara ) const;
- virtual EFieldInfo GetFieldInfo( USHORT nPara, USHORT nField ) const;
- virtual EBulletInfo GetBulletInfo( USHORT nPara ) const;
- virtual Rectangle GetCharBounds( USHORT nPara, USHORT nIndex ) const;
- virtual Rectangle GetParaBounds( USHORT nPara ) const;
+ virtual LanguageType GetLanguage( sal_uInt16, sal_uInt16 ) const;
+ virtual sal_uInt16 GetFieldCount( sal_uInt16 nPara ) const;
+ virtual EFieldInfo GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const;
+ virtual EBulletInfo GetBulletInfo( sal_uInt16 nPara ) const;
+ virtual Rectangle GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const;
+ virtual Rectangle GetParaBounds( sal_uInt16 nPara ) const;
virtual MapMode GetMapMode() const;
virtual OutputDevice* GetRefDevice() const;
- virtual sal_Bool GetIndexAtPoint( const Point&, USHORT& nPara, USHORT& nIndex ) const;
- virtual sal_Bool GetWordIndices( USHORT nPara, USHORT nIndex, USHORT& nStart, USHORT& nEnd ) const;
- virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const;
- virtual USHORT GetLineCount( USHORT nPara ) const;
- virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const;
- virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const;
- virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nLine ) const;
+ virtual sal_Bool GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const;
+ virtual sal_Bool GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
+ virtual sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const;
+ virtual sal_uInt16 GetLineCount( sal_uInt16 nPara ) const;
+ virtual sal_uInt16 GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const;
+ virtual void GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
+ virtual sal_uInt16 GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nLine ) const;
virtual sal_Bool Delete( const ESelection& );
virtual sal_Bool InsertText( const String&, const ESelection& );
- virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE );
+ virtual sal_Bool QuickFormatDoc( sal_Bool bFull=sal_False );
- virtual sal_Int16 GetDepth( USHORT nPara ) const;
- virtual sal_Bool SetDepth( USHORT nPara, sal_Int16 nNewDepth );
+ virtual sal_Int16 GetDepth( sal_uInt16 nPara ) const;
+ virtual sal_Bool SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth );
virtual const SfxItemSet* GetEmptyItemSetPtr();
// implementation functions for XParagraphAppend and XTextPortionAppend
virtual void AppendParagraph();
- virtual xub_StrLen AppendTextPortion( USHORT nPara, const String &rText, const SfxItemSet &rSet );
+ virtual xub_StrLen AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet );
virtual void CopyText(const SvxTextForwarder& rSource);
};
@@ -278,7 +278,7 @@ public:
SmEditViewForwarder( SmEditAccessible& rAcc );
virtual ~SmEditViewForwarder();
- virtual BOOL IsValid() const;
+ virtual sal_Bool IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index d019a98118e9..89c42aa68731 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -50,8 +50,6 @@ static const char* aRootName = "Office.Math";
#define SYMBOL_LIST "SymbolList"
#define FONT_FORMAT_LIST "FontFormatList"
-SV_IMPL_OBJARR( SmFntFmtListEntryArr, SmFntFmtListEntry );
-
/////////////////////////////////////////////////////////////////
@@ -72,7 +70,7 @@ static Sequence< OUString > lcl_GetFontPropertyNames()
Sequence< OUString > aNames( 6 );
OUString *pNames = aNames.getArray();
- for( INT32 i = 0; *ppPropName; ++i, ++ppPropName )
+ for( sal_Int32 i = 0; *ppPropName; ++i, ++ppPropName )
{
pNames[i] = A2OU( *ppPropName );
}
@@ -97,7 +95,7 @@ static Sequence< OUString > lcl_GetSymbolPropertyNames()
Sequence< OUString > aNames( 4 );
OUString *pNames = aNames.getArray();
- for( INT32 i = 0; *ppPropName; ++i, ++ppPropName )
+ for( sal_Int32 i = 0; *ppPropName; ++i, ++ppPropName )
{
pNames[i] = A2OU( *ppPropName );
}
@@ -113,6 +111,8 @@ static const char * aMathPropNames[] =
"Print/Frame",
"Print/Size",
"Print/ZoomFactor",
+ "LoadSave/IsSaveOnlyUsedSymbols",
+ //"Misc/NoSymbolsWarning", @deprecated
"Misc/IgnoreSpacesRight",
"View/ToolboxVisible",
"View/AutoRedraw",
@@ -169,14 +169,14 @@ static const char * aFormatPropNames[] =
static Sequence< OUString > lcl_GetPropertyNames(
- const char * aPropNames[], USHORT nCount )
+ const char * aPropNames[], sal_uInt16 nCount )
{
const char** ppPropName = aPropNames;
Sequence< OUString > aNames( nCount );
OUString *pNames = aNames.getArray();
- for (INT32 i = 0; i < nCount; ++i, ++ppPropName)
+ for (sal_Int32 i = 0; i < nCount; ++i, ++ppPropName)
{
pNames[i] = A2OU( *ppPropName );
}
@@ -186,14 +186,14 @@ static Sequence< OUString > lcl_GetPropertyNames(
static Sequence< OUString > GetFormatPropertyNames()
{
- USHORT nCnt = SAL_N_ELEMENTS(aFormatPropNames);
+ sal_uInt16 nCnt = SAL_N_ELEMENTS(aFormatPropNames);
return lcl_GetPropertyNames( aFormatPropNames, nCnt );
}
static Sequence< OUString > GetOtherPropertyNames()
{
- USHORT nCnt = SAL_N_ELEMENTS(aMathPropNames);
+ sal_uInt16 nCnt = SAL_N_ELEMENTS(aMathPropNames);
return lcl_GetPropertyNames( aMathPropNames, nCnt );
}
@@ -202,14 +202,16 @@ static Sequence< OUString > GetOtherPropertyNames()
struct SmCfgOther
{
SmPrintSize ePrintSize;
- USHORT nPrintZoomFactor;
+ sal_uInt16 nPrintZoomFactor;
bool bPrintTitle;
bool bPrintFormulaText;
bool bPrintFrame;
+ bool bIsSaveOnlyUsedSymbols;
bool bIgnoreSpacesRight;
bool bToolboxVisible;
bool bAutoRedraw;
bool bFormulaCursor;
+ //sal_Bool bNoSymbolsWarning;
SmCfgOther();
};
@@ -222,7 +224,7 @@ SmCfgOther::SmCfgOther()
bPrintTitle = bPrintFormulaText =
bPrintFrame = bIgnoreSpacesRight =
bToolboxVisible = bAutoRedraw =
- bFormulaCursor = true;
+ bFormulaCursor = bIsSaveOnlyUsedSymbols = true;
}
/////////////////////////////////////////////////////////////////
@@ -242,11 +244,11 @@ SmFontFormat::SmFontFormat()
SmFontFormat::SmFontFormat( const Font &rFont )
{
aName = rFont.GetName();
- nCharSet = (INT16) rFont.GetCharSet();
- nFamily = (INT16) rFont.GetFamily();
- nPitch = (INT16) rFont.GetPitch();
- nWeight = (INT16) rFont.GetWeight();
- nItalic = (INT16) rFont.GetItalic();
+ nCharSet = (sal_Int16) rFont.GetCharSet();
+ nFamily = (sal_Int16) rFont.GetFamily();
+ nPitch = (sal_Int16) rFont.GetPitch();
+ nWeight = (sal_Int16) rFont.GetWeight();
+ nItalic = (sal_Int16) rFont.GetItalic();
}
@@ -291,10 +293,9 @@ SmFontFormatList::SmFontFormatList()
void SmFontFormatList::Clear()
{
- USHORT nCnt = aEntries.Count();
- if (nCnt)
+ if (!aEntries.empty())
{
- aEntries.Remove( 0, nCnt );
+ aEntries.clear();
SetModified( true );
}
}
@@ -308,7 +309,7 @@ void SmFontFormatList::AddFontFormat( const String &rFntFmtId,
if (!pFntFmt)
{
SmFntFmtListEntry aEntry( rFntFmtId, rFntFmt );
- aEntries.Insert( aEntry, aEntries.Count() );
+ aEntries.push_back( aEntry );
SetModified( true );
}
}
@@ -316,35 +317,32 @@ void SmFontFormatList::AddFontFormat( const String &rFntFmtId,
void SmFontFormatList::RemoveFontFormat( const String &rFntFmtId )
{
- USHORT nPos = 0xFFFF;
// search for entry
- USHORT nCnt = aEntries.Count();
- for (USHORT i = 0; i < nCnt && nPos == 0xFFFF; ++i)
+ for (size_t i = 0; i < aEntries.size(); ++i)
{
if (aEntries[i].aId == rFntFmtId)
- nPos = i;
- }
-
- // remove entry if found
- if (nPos != 0xFFFF)
- {
- aEntries.Remove( nPos );
- SetModified( true );
+ {
+ // remove entry if found
+ aEntries.erase( aEntries.begin() + i );
+ SetModified( true );
+ break;
+ }
}
}
const SmFontFormat * SmFontFormatList::GetFontFormat( const String &rFntFmtId ) const
{
- SmFontFormat *pRes = 0;
+ const SmFontFormat *pRes = 0;
- USHORT nCnt = aEntries.Count();
- USHORT i;
- for (i = 0; i < nCnt && !pRes; ++i)
+ for (size_t i = 0; i < aEntries.size(); ++i)
{
if (aEntries[i].aId == rFntFmtId)
+ {
pRes = &aEntries[i].aFntFmt;
+ break;
+ }
}
return pRes;
@@ -352,11 +350,11 @@ const SmFontFormat * SmFontFormatList::GetFontFormat( const String &rFntFmtId )
-const SmFontFormat * SmFontFormatList::GetFontFormat( USHORT nPos ) const
+const SmFontFormat * SmFontFormatList::GetFontFormat( size_t nPos ) const
{
- SmFontFormat *pRes = 0;
- if (nPos < aEntries.Count())
- pRes = &aEntries[ nPos ].aFntFmt;
+ const SmFontFormat *pRes = 0;
+ if (nPos < aEntries.size())
+ pRes = &aEntries[nPos].aFntFmt;
return pRes;
}
@@ -365,12 +363,13 @@ const String SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt ) co
{
String aRes;
- USHORT nCnt = aEntries.Count();
- USHORT i;
- for (i = 0; i < nCnt && 0 == aRes.Len(); ++i)
+ for (size_t i = 0; i < aEntries.size(); ++i)
{
if (aEntries[i].aFntFmt == rFntFmt)
+ {
aRes = aEntries[i].aId;
+ break;
+ }
}
return aRes;
@@ -389,10 +388,10 @@ const String SmFontFormatList::GetFontFormatId( const SmFontFormat &rFntFmt, boo
}
-const String SmFontFormatList::GetFontFormatId( USHORT nPos ) const
+const String SmFontFormatList::GetFontFormatId( size_t nPos ) const
{
String aRes;
- if (nPos < aEntries.Count())
+ if (nPos < aEntries.size())
aRes = aEntries[nPos].aId;
return aRes;
}
@@ -405,13 +404,16 @@ const String SmFontFormatList::GetNewFontFormatId() const
String aRes;
String aPrefix( RTL_CONSTASCII_USTRINGPARAM( "Id" ) );
- INT32 nCnt = GetCount();
- for (INT32 i = 1; i <= nCnt + 1 && 0 == aRes.Len(); ++i)
+ sal_Int32 nCnt = GetCount();
+ for (sal_Int32 i = 1; i <= nCnt + 1; ++i)
{
String aTmpId( aPrefix );
aTmpId += String::CreateFromInt32( i );
if (!GetFontFormat( aTmpId ))
+ {
aRes = aTmpId;
+ break;
+ }
}
OSL_ENSURE( 0 != aRes.Len(), "failed to create new FontFormatId" );
@@ -466,11 +468,11 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
const rtl::OUString &rBaseNode ) const
{
Sequence< OUString > aNames = lcl_GetSymbolPropertyNames();
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
OUString aDelim( OUString::valueOf( (sal_Unicode) '/' ) );
OUString *pName = aNames.getArray();
- for (INT32 i = 0; i < nProps; ++i)
+ for (sal_Int32 i = 0; i < nProps; ++i)
{
OUString &rName = pName[i];
OUString aTmp( rName );
@@ -487,17 +489,17 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
{
const Any * pValue = aValues.getConstArray();
Font aFont;
- sal_Unicode cChar = '\0';
+ sal_UCS4 cChar = '\0';
String aSet;
bool bPredefined = false;
OUString aTmpStr;
- INT32 nTmp32 = 0;
+ sal_Int32 nTmp32 = 0;
bool bTmp = false;
bool bOK = true;
if (pValue->hasValue() && (*pValue >>= nTmp32))
- cChar = (sal_Unicode) nTmp32;
+ cChar = static_cast< sal_UCS4 >( nTmp32 );
else
bOK = false;
++pValue;
@@ -580,7 +582,7 @@ void SmMathConfig::GetSymbols( std::vector< SmSym > &rSymbols ) const
{
Sequence< OUString > aNodes( ((SmMathConfig*) this)->GetNodeNames( A2OU( SYMBOL_LIST ) ) );
const OUString *pNode = aNodes.getConstArray();
- INT32 nNodes = aNodes.getLength();
+ sal_Int32 nNodes = aNodes.getLength();
rSymbols.resize( nNodes );
std::vector< SmSym >::iterator aIt( rSymbols.begin() );
@@ -598,7 +600,7 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols )
Sequence< OUString > aNames = lcl_GetSymbolPropertyNames();
const OUString *pNames = aNames.getConstArray();
- sal_uIntPtr nSymbolProps = sal::static_int_cast< UINT32 >(aNames.getLength());
+ sal_uIntPtr nSymbolProps = sal::static_int_cast< sal_uInt32 >(aNames.getLength());
Sequence< PropertyValue > aValues( nCount * nSymbolProps );
PropertyValue *pValues = aValues.getArray();
@@ -620,7 +622,7 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols )
// Char
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT32) rSymbol.GetCharacter();
+ pVal->Value <<= static_cast< sal_UCS4 >( rSymbol.GetCharacter() );
pVal++;
// Set
pVal->Name = aNodeNameDelim;
@@ -633,7 +635,7 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols )
// Predefined
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (BOOL) rSymbol.IsPredefined();
+ pVal->Value <<= (sal_Bool) rSymbol.IsPredefined();
pVal++;
// FontFormatId
SmFontFormat aFntFmt( rSymbol.GetFace() );
@@ -671,9 +673,9 @@ void SmMathConfig::LoadFontFormatList()
Sequence< OUString > aNodes( GetNodeNames( A2OU( FONT_FORMAT_LIST ) ) );
const OUString *pNode = aNodes.getConstArray();
- INT32 nNodes = aNodes.getLength();
+ sal_Int32 nNodes = aNodes.getLength();
- for (INT32 i = 0; i < nNodes; ++i)
+ for (sal_Int32 i = 0; i < nNodes; ++i)
{
SmFontFormat aFntFmt;
ReadFontFormat( aFntFmt, pNode[i], A2OU( FONT_FORMAT_LIST ) );
@@ -692,11 +694,11 @@ void SmMathConfig::ReadFontFormat( SmFontFormat &rFontFormat,
const OUString &rSymbolName, const OUString &rBaseNode ) const
{
Sequence< OUString > aNames = lcl_GetFontPropertyNames();
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
OUString aDelim( OUString::valueOf( (sal_Unicode) '/' ) );
OUString *pName = aNames.getArray();
- for (INT32 i = 0; i < nProps; ++i)
+ for (sal_Int32 i = 0; i < nProps; ++i)
{
OUString &rName = pName[i];
OUString aTmp( rName );
@@ -714,7 +716,7 @@ void SmMathConfig::ReadFontFormat( SmFontFormat &rFontFormat,
const Any * pValue = aValues.getConstArray();
OUString aTmpStr;
- INT16 nTmp16 = 0;
+ sal_Int16 nTmp16 = 0;
bool bOK = true;
if (pValue->hasValue() && (*pValue >>= aTmpStr))
@@ -762,16 +764,16 @@ void SmMathConfig::SaveFontFormatList()
return;
Sequence< OUString > aNames = lcl_GetFontPropertyNames();
- INT32 nSymbolProps = aNames.getLength();
+ sal_Int32 nSymbolProps = aNames.getLength();
- USHORT nCount = rFntFmtList.GetCount();
+ size_t nCount = rFntFmtList.GetCount();
Sequence< PropertyValue > aValues( nCount * nSymbolProps );
PropertyValue *pValues = aValues.getArray();
PropertyValue *pVal = pValues;
OUString aDelim( OUString::valueOf( (sal_Unicode) '/' ) );
- for (USHORT i = 0; i < nCount; ++i)
+ for (size_t i = 0; i < nCount; ++i)
{
String aFntFmtId( rFntFmtList.GetFontFormatId( i ) );
const SmFontFormat aFntFmt( *rFntFmtList.GetFontFormat( aFntFmtId ) );
@@ -791,27 +793,27 @@ void SmMathConfig::SaveFontFormatList()
// CharSet
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT16) aFntFmt.nCharSet; // 6.0 file-format GetSOStoreTextEncoding not needed
+ pVal->Value <<= (sal_Int16) aFntFmt.nCharSet; // 6.0 file-format GetSOStoreTextEncoding not needed
pVal++;
// Family
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT16) aFntFmt.nFamily;
+ pVal->Value <<= (sal_Int16) aFntFmt.nFamily;
pVal++;
// Pitch
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT16) aFntFmt.nPitch;
+ pVal->Value <<= (sal_Int16) aFntFmt.nPitch;
pVal++;
// Weight
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT16) aFntFmt.nWeight;
+ pVal->Value <<= (sal_Int16) aFntFmt.nWeight;
pVal++;
// Italic
pVal->Name = aNodeNameDelim;
pVal->Name += *pName++;
- pVal->Value <<= (INT16) aFntFmt.nItalic;
+ pVal->Value <<= (sal_Int16) aFntFmt.nItalic;
pVal++;
}
OSL_ENSURE( pVal - pValues == nCount * nSymbolProps, "properties missing" );
@@ -823,13 +825,12 @@ void SmMathConfig::SaveFontFormatList()
void SmMathConfig::StripFontFormatList( const std::vector< SmSym > &rSymbols )
{
- size_t nCount = rSymbols.size();
- USHORT i;
+ size_t i;
// build list of used font-formats only
//!! font-format IDs may be different !!
SmFontFormatList aUsedList;
- for (i = 0; i < nCount; ++i)
+ for (i = 0; i < rSymbols.size(); ++i)
{
OSL_ENSURE( rSymbols[i].GetName().Len() > 0, "non named symbol" );
aUsedList.GetFontFormatId( SmFontFormat( rSymbols[i].GetFace() ) , true );
@@ -842,14 +843,14 @@ void SmMathConfig::StripFontFormatList( const std::vector< SmSym > &rSymbols )
// remove unused font-formats from list
SmFontFormatList &rFntFmtList = GetFontFormatList();
- USHORT nCnt = rFntFmtList.GetCount();
+ size_t nCnt = rFntFmtList.GetCount();
SmFontFormat *pTmpFormat = new SmFontFormat[ nCnt ];
String *pId = new String [ nCnt ];
- INT32 k;
+ size_t k;
for (k = 0; k < nCnt; ++k)
{
- pTmpFormat[k] = *rFntFmtList.GetFontFormat( (USHORT) k );
- pId[k] = rFntFmtList.GetFontFormatId( (USHORT) k );
+ pTmpFormat[k] = *rFntFmtList.GetFontFormat( k );
+ pId[k] = rFntFmtList.GetFontFormatId( k );
}
for (k = 0; k < nCnt; ++k)
{
@@ -869,7 +870,7 @@ void SmMathConfig::LoadOther()
pOther = new SmCfgOther;
Sequence< OUString > aNames( GetOtherPropertyNames() );
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
Sequence< Any > aValues( GetProperties( aNames ) );
if (nProps && aValues.getLength() == nProps)
@@ -877,7 +878,7 @@ void SmMathConfig::LoadOther()
const Any *pValues = aValues.getConstArray();
const Any *pVal = pValues;
- INT16 nTmp16 = 0;
+ sal_Int16 nTmp16 = 0;
bool bTmp = false;
// Print/Title
@@ -900,6 +901,10 @@ void SmMathConfig::LoadOther()
if (pVal->hasValue() && (*pVal >>= nTmp16))
pOther->nPrintZoomFactor = nTmp16;
++pVal;
+ // LoadSave/IsSaveOnlyUsedSymbols
+ if (pVal->hasValue() && (*pVal >>= bTmp))
+ pOther->bIsSaveOnlyUsedSymbols = bTmp;
+ ++pVal;
// Misc/IgnoreSpacesRight
if (pVal->hasValue() && (*pVal >>= bTmp))
pOther->bIgnoreSpacesRight = bTmp;
@@ -929,30 +934,32 @@ void SmMathConfig::SaveOther()
return;
const Sequence< OUString > aNames( GetOtherPropertyNames() );
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
Sequence< Any > aValues( nProps );
Any *pValues = aValues.getArray();
Any *pValue = pValues;
// Print/Title
- *pValue++ <<= (BOOL) pOther->bPrintTitle;
+ *pValue++ <<= (sal_Bool) pOther->bPrintTitle;
// Print/FormulaText
- *pValue++ <<= (BOOL) pOther->bPrintFormulaText;
+ *pValue++ <<= (sal_Bool) pOther->bPrintFormulaText;
// Print/Frame
- *pValue++ <<= (BOOL) pOther->bPrintFrame;
+ *pValue++ <<= (sal_Bool) pOther->bPrintFrame;
// Print/Size
- *pValue++ <<= (INT16) pOther->ePrintSize;
+ *pValue++ <<= (sal_Int16) pOther->ePrintSize;
// Print/ZoomFactor
- *pValue++ <<= (INT16) pOther->nPrintZoomFactor;
+ *pValue++ <<= (sal_Int16) pOther->nPrintZoomFactor;
+ // LoadSave/IsSaveOnlyUsedSymbols
+ *pValue++ <<= (sal_Bool) pOther->bIsSaveOnlyUsedSymbols;
// Misc/IgnoreSpacesRight
- *pValue++ <<= (BOOL) pOther->bIgnoreSpacesRight;
+ *pValue++ <<= (sal_Bool) pOther->bIgnoreSpacesRight;
// View/ToolboxVisible
- *pValue++ <<= (BOOL) pOther->bToolboxVisible;
+ *pValue++ <<= (sal_Bool) pOther->bToolboxVisible;
// View/AutoRedraw
- *pValue++ <<= (BOOL) pOther->bAutoRedraw;
+ *pValue++ <<= (sal_Bool) pOther->bAutoRedraw;
// View/FormulaCursor
- *pValue++ <<= (BOOL) pOther->bFormulaCursor;
+ *pValue++ <<= (sal_Bool) pOther->bFormulaCursor;
OSL_ENSURE( pValue - pValues == nProps, "property mismatch" );
PutProperties( aNames , aValues );
@@ -967,7 +974,7 @@ void SmMathConfig::LoadFormat()
Sequence< OUString > aNames( GetFormatPropertyNames() );
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
Sequence< Any > aValues( GetProperties( aNames ) );
if (nProps && aValues.getLength() == nProps)
@@ -976,7 +983,7 @@ void SmMathConfig::LoadFormat()
const Any *pVal = pValues;
OUString aTmpStr;
- INT16 nTmp16 = 0;
+ sal_Int16 nTmp16 = 0;
bool bTmp = false;
// StandardFormat/Textmode
@@ -1000,7 +1007,7 @@ void SmMathConfig::LoadFormat()
pFormat->SetBaseSize( Size(0, SmPtsTo100th_mm( nTmp16 )) );
++pVal;
- USHORT i;
+ sal_uInt16 i;
for (i = SIZ_BEGIN; i <= SIZ_END; ++i)
{
if (pVal->hasValue() && (*pVal >>= nTmp16))
@@ -1054,30 +1061,30 @@ void SmMathConfig::SaveFormat()
return;
const Sequence< OUString > aNames( GetFormatPropertyNames() );
- INT32 nProps = aNames.getLength();
+ sal_Int32 nProps = aNames.getLength();
Sequence< Any > aValues( nProps );
Any *pValues = aValues.getArray();
Any *pValue = pValues;
// StandardFormat/Textmode
- *pValue++ <<= (BOOL) pFormat->IsTextmode();
+ *pValue++ <<= (sal_Bool) pFormat->IsTextmode();
// StandardFormat/GreekCharStyle
- *pValue++ <<= (INT16) pFormat->GetGreekCharStyle();
+ *pValue++ <<= (sal_Int16) pFormat->GetGreekCharStyle();
// StandardFormat/ScaleNormalBracket
- *pValue++ <<= (BOOL) pFormat->IsScaleNormalBrackets();
+ *pValue++ <<= (sal_Bool) pFormat->IsScaleNormalBrackets();
// StandardFormat/HorizontalAlignment
- *pValue++ <<= (INT16) pFormat->GetHorAlign();
+ *pValue++ <<= (sal_Int16) pFormat->GetHorAlign();
// StandardFormat/BaseSize
- *pValue++ <<= (INT16) SmRoundFraction( Sm100th_mmToPts(
+ *pValue++ <<= (sal_Int16) SmRoundFraction( Sm100th_mmToPts(
pFormat->GetBaseSize().Height() ) );
- USHORT i;
+ sal_uInt16 i;
for (i = SIZ_BEGIN; i <= SIZ_END; ++i)
- *pValue++ <<= (INT16) pFormat->GetRelSize( i );
+ *pValue++ <<= (sal_Int16) pFormat->GetRelSize( i );
for (i = DIS_BEGIN; i <= DIS_END; ++i)
- *pValue++ <<= (INT16) pFormat->GetDistance( i );
+ *pValue++ <<= (sal_Int16) pFormat->GetDistance( i );
for (i = FNT_BEGIN; i < FNT_END; ++i)
{
@@ -1148,7 +1155,7 @@ void SmMathConfig::SetPrintSize( SmPrintSize eSize )
}
-USHORT SmMathConfig::GetPrintZoomFactor() const
+sal_uInt16 SmMathConfig::GetPrintZoomFactor() const
{
if (!pOther)
((SmMathConfig *) this)->LoadOther();
@@ -1156,7 +1163,7 @@ USHORT SmMathConfig::GetPrintZoomFactor() const
}
-void SmMathConfig::SetPrintZoomFactor( USHORT nVal )
+void SmMathConfig::SetPrintZoomFactor( sal_uInt16 nVal )
{
if (!pOther)
LoadOther();
@@ -1209,6 +1216,12 @@ void SmMathConfig::SetPrintFormulaText( bool bVal )
SetOtherIfNotEqual( pOther->bPrintFormulaText, bVal );
}
+bool SmMathConfig::IsSaveOnlyUsedSymbols() const
+{
+ if (!pOther)
+ ((SmMathConfig *) this)->LoadOther();
+ return pOther->bIsSaveOnlyUsedSymbols;
+}
bool SmMathConfig::IsPrintFrame() const
{
@@ -1226,6 +1239,14 @@ void SmMathConfig::SetPrintFrame( bool bVal )
}
+void SmMathConfig::SetSaveOnlyUsedSymbols( bool bVal )
+{
+ if (!pOther)
+ LoadOther();
+ SetOtherIfNotEqual( pOther->bIsSaveOnlyUsedSymbols, bVal );
+}
+
+
bool SmMathConfig::IsIgnoreSpacesRight() const
{
if (!pOther)
diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx
index 3762d15fc6bc..e3fb818d4c4c 100644
--- a/starmath/source/cfgitem.hxx
+++ b/starmath/source/cfgitem.hxx
@@ -33,6 +33,7 @@
#ifndef _MATH_CFGITEM_HXX_
#define _MATH_CFGITEM_HXX_
+#include <deque>
#include <vector>
#include <com/sun/star/beans/PropertyValues.hpp>
@@ -42,7 +43,6 @@
#include <tools/solar.h>
#include <rtl/ustring.hxx>
#include <unotools/configitem.hxx>
-#include <svl/svarray.hxx>
#include <vcl/timer.hxx>
#include <symbol.hxx>
@@ -61,11 +61,11 @@ struct SmCfgOther;
struct SmFontFormat
{
String aName;
- INT16 nCharSet;
- INT16 nFamily;
- INT16 nPitch;
- INT16 nWeight;
- INT16 nItalic;
+ sal_Int16 nCharSet;
+ sal_Int16 nFamily;
+ sal_Int16 nPitch;
+ sal_Int16 nWeight;
+ sal_Int16 nItalic;
SmFontFormat();
SmFontFormat( const Font &rFont );
@@ -83,13 +83,9 @@ struct SmFntFmtListEntry
SmFntFmtListEntry( const String &rId, const SmFontFormat &rFntFmt );
};
-
-SV_DECL_OBJARR( SmFntFmtListEntryArr, SmFntFmtListEntry, 8, 8 )
-
-
class SmFontFormatList
{
- SmFntFmtListEntryArr aEntries;
+ std::deque<SmFntFmtListEntry> aEntries;
bool bModified;
// disallow copy-constructor and assignment-operator for now
@@ -104,12 +100,12 @@ public:
void RemoveFontFormat( const String &rFntFmtId );
const SmFontFormat * GetFontFormat( const String &rFntFmtId ) const;
- const SmFontFormat * GetFontFormat( USHORT nPos ) const;
+ const SmFontFormat * GetFontFormat( size_t nPos ) const;
const String GetFontFormatId( const SmFontFormat &rFntFmt ) const;
const String GetFontFormatId( const SmFontFormat &rFntFmt, bool bAdd );
- const String GetFontFormatId( USHORT nPos ) const;
+ const String GetFontFormatId( size_t nPos ) const;
const String GetNewFontFormatId() const;
- USHORT GetCount() const { return aEntries.Count(); }
+ size_t GetCount() const { return aEntries.size(); }
bool IsModified() const { return bModified; }
void SetModified( bool bVal ) { bModified = bVal; }
@@ -190,15 +186,18 @@ public:
void SetPrintFrame( bool bVal );
SmPrintSize GetPrintSize() const;
void SetPrintSize( SmPrintSize eSize );
- USHORT GetPrintZoomFactor() const;
- void SetPrintZoomFactor( USHORT nVal );
+ sal_uInt16 GetPrintZoomFactor() const;
+ void SetPrintZoomFactor( sal_uInt16 nVal );
+ bool IsSaveOnlyUsedSymbols() const;
+ void SetSaveOnlyUsedSymbols( bool bVal );
bool IsIgnoreSpacesRight() const;
void SetIgnoreSpacesRight( bool bVal );
bool IsAutoRedraw() const;
void SetAutoRedraw( bool bVal );
bool IsShowFormulaCursor() const;
void SetShowFormulaCursor( bool bVal );
+ void SetAutoRedraw( sal_Bool bVal );
};
/////////////////////////////////////////////////////////////////
diff --git a/starmath/source/config.cxx b/starmath/source/config.cxx
index c9e36a93b51d..2bcfb43a0d1f 100644..100755
--- a/starmath/source/config.cxx
+++ b/starmath/source/config.cxx
@@ -63,33 +63,33 @@ void SmConfig::ItemSetToConfig(const SfxItemSet &rSet)
{
const SfxPoolItem *pItem = NULL;
- UINT16 nU16;
+ sal_uInt16 nU16;
bool bVal;
- if (rSet.GetItemState(SID_PRINTSIZE, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_PRINTSIZE, sal_True, &pItem) == SFX_ITEM_SET)
{ nU16 = ((const SfxUInt16Item *) pItem)->GetValue();
SetPrintSize( (SmPrintSize) nU16 );
}
- if (rSet.GetItemState(SID_PRINTZOOM, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_PRINTZOOM, sal_True, &pItem) == SFX_ITEM_SET)
{ nU16 = ((const SfxUInt16Item *) pItem)->GetValue();
SetPrintZoomFactor( nU16 );
}
- if (rSet.GetItemState(SID_PRINTTITLE, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_PRINTTITLE, sal_True, &pItem) == SFX_ITEM_SET)
{ bVal = ((const SfxBoolItem *) pItem)->GetValue();
SetPrintTitle( bVal );
}
- if (rSet.GetItemState(SID_PRINTTEXT, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_PRINTTEXT, sal_True, &pItem) == SFX_ITEM_SET)
{ bVal = ((const SfxBoolItem *) pItem)->GetValue();
SetPrintFormulaText( bVal );
}
- if (rSet.GetItemState(SID_PRINTFRAME, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_PRINTFRAME, sal_True, &pItem) == SFX_ITEM_SET)
{ bVal = ((const SfxBoolItem *) pItem)->GetValue();
SetPrintFrame( bVal );
}
- if (rSet.GetItemState(SID_AUTOREDRAW, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_AUTOREDRAW, sal_True, &pItem) == SFX_ITEM_SET)
{ bVal = ((const SfxBoolItem *) pItem)->GetValue();
SetAutoRedraw( bVal );
}
- if (rSet.GetItemState(SID_NO_RIGHT_SPACES, TRUE, &pItem) == SFX_ITEM_SET)
+ if (rSet.GetItemState(SID_NO_RIGHT_SPACES, sal_True, &pItem) == SFX_ITEM_SET)
{ bVal = ((const SfxBoolItem *) pItem)->GetValue();
if (IsIgnoreSpacesRight() != bVal)
{
@@ -100,6 +100,10 @@ void SmConfig::ItemSetToConfig(const SfxItemSet &rSet)
Broadcast(SfxSimpleHint(HINT_FORMATCHANGED));
}
}
+ if (rSet.GetItemState(SID_SAVE_ONLY_USED_SYMBOLS, sal_True, &pItem) == SFX_ITEM_SET)
+ { bVal = ((const SfxBoolItem *) pItem)->GetValue();
+ SetSaveOnlyUsedSymbols( bVal );
+ }
SaveOther();
}
@@ -110,15 +114,16 @@ void SmConfig::ConfigToItemSet(SfxItemSet &rSet) const
const SfxItemPool *pPool = rSet.GetPool();
rSet.Put(SfxUInt16Item(pPool->GetWhich(SID_PRINTSIZE),
- (UINT16) GetPrintSize()));
+ (sal_uInt16) GetPrintSize()));
rSet.Put(SfxUInt16Item(pPool->GetWhich(SID_PRINTZOOM),
- (UINT16) GetPrintZoomFactor()));
+ (sal_uInt16) GetPrintZoomFactor()));
rSet.Put(SfxBoolItem(pPool->GetWhich(SID_PRINTTITLE), IsPrintTitle()));
rSet.Put(SfxBoolItem(pPool->GetWhich(SID_PRINTTEXT), IsPrintFormulaText()));
rSet.Put(SfxBoolItem(pPool->GetWhich(SID_PRINTFRAME), IsPrintFrame()));
rSet.Put(SfxBoolItem(pPool->GetWhich(SID_AUTOREDRAW), IsAutoRedraw()));
rSet.Put(SfxBoolItem(pPool->GetWhich(SID_NO_RIGHT_SPACES), IsIgnoreSpacesRight()));
+ rSet.Put(SfxBoolItem(pPool->GetWhich(SID_SAVE_ONLY_USED_SYMBOLS), IsSaveOnlyUsedSymbols()));
}
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index e9eb20048869..558d305ab4d4 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -458,7 +458,7 @@ SmNodeList::iterator SmCursor::TakeSelectedNodesFromList(SmNodeList *pLineList,
len2 = start3 - start2,
len3 = aText.Len() - start3;
SmToken aToken = pText->GetToken();
- USHORT eFontDesc = pText->GetFontDesc();
+ sal_uInt16 eFontDesc = pText->GetFontDesc();
//If we need make segment 1
if(len1 > 0) {
int start1 = 0;
@@ -507,9 +507,9 @@ void SmCursor::InsertSubSup(SmSubSup eSubSup) {
if(HasSelection()) {
SmNode *pSNode = FindSelectedNode(pTree);
j_assert(pSNode != NULL, "There must be a selected node when HasSelection is true!");
- pLine = FindTopMostNodeInLine(pSNode, TRUE);
+ pLine = FindTopMostNodeInLine(pSNode, sal_True);
} else
- pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, FALSE);
+ pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, sal_False);
//Find Parent and offset in parent
SmStructureNode *pLineParent = pLine->GetParent();
@@ -610,7 +610,7 @@ bool SmCursor::InsertLimit(SmSubSup eSubSup, bool bMoveCaret) {
pSubject = (SmOperNode*)position->CaretPos.pSelectedNode;
else {
//If not, check if parent of the current line is a SmOperNode
- SmNode *pLineNode = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, FALSE);
+ SmNode *pLineNode = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, sal_False);
if(pLineNode->GetParent() && pLineNode->GetParent()->GetType() == NOPER)
pSubject = (SmOperNode*)pLineNode->GetParent();
}
@@ -678,9 +678,9 @@ void SmCursor::InsertBrackets(SmBracketType eBracketType) {
if(HasSelection()) {
SmNode *pSNode = FindSelectedNode(pTree);
j_assert(pSNode != NULL, "There must be a selected node if HasSelection()");
- pLine = FindTopMostNodeInLine(pSNode, TRUE);
+ pLine = FindTopMostNodeInLine(pSNode, sal_True);
} else
- pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, FALSE);
+ pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, sal_False);
//Find parent and offset in parent
SmStructureNode *pLineParent = pLine->GetParent();
@@ -814,9 +814,9 @@ bool SmCursor::InsertRow() {
if(HasSelection()) {
SmNode *pSNode = FindSelectedNode(pTree);
j_assert(pSNode != NULL, "There must be a selected node if HasSelection()");
- pLine = FindTopMostNodeInLine(pSNode, TRUE);
+ pLine = FindTopMostNodeInLine(pSNode, sal_True);
} else
- pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, FALSE);
+ pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, sal_False);
//Find parent and offset in parent
SmStructureNode *pLineParent = pLine->GetParent();
@@ -841,7 +841,7 @@ bool SmCursor::InsertRow() {
if(pLineParent->GetType() == NMATRIX)
pMatrix = (SmMatrixNode*)pLineParent;
- //If we're not in a context that supports InsertRow, return FALSE
+ //If we're not in a context that supports InsertRow, return sal_False
if(!pTable && !pMatrix)
return false;
@@ -903,8 +903,8 @@ bool SmCursor::InsertRow() {
//Find position after insert and patch the list
PosAfterInsert = PatchLineList(pLineList, it);
//Move other children
- USHORT rows = pMatrix->GetNumRows();
- USHORT cols = pMatrix->GetNumCols();
+ sal_uInt16 rows = pMatrix->GetNumRows();
+ sal_uInt16 cols = pMatrix->GetNumCols();
int nRowStart = (nParentIndex - nParentIndex % cols) + cols;
for( int i = pMatrix->GetNumSubNodes() + cols - 1; i >= nRowStart + cols; i--)
pMatrix->SetSubNode(i, pMatrix->GetSubNode(i - cols));
@@ -916,7 +916,7 @@ bool SmCursor::InsertRow() {
}
pMatrix->SetRowCol(rows + 1, cols);
} else
- j_assert(FALSE, "We must be either the context of a table or matrix!");
+ j_assert(sal_False, "We must be either the context of a table or matrix!");
//Finish editing
FinishEdit(pLineList, pLineParent, nParentIndex, PosAfterInsert);
@@ -934,9 +934,9 @@ void SmCursor::InsertFraction() {
if(HasSelection()) {
SmNode *pSNode = FindSelectedNode(pTree);
j_assert(pSNode != NULL, "There must be a selected node when HasSelection is true!");
- pLine = FindTopMostNodeInLine(pSNode, TRUE);
+ pLine = FindTopMostNodeInLine(pSNode, sal_True);
} else
- pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, FALSE);
+ pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, sal_False);
//Find Parent and offset in parent
SmStructureNode *pLineParent = pLine->GetParent();
@@ -1134,7 +1134,7 @@ void SmCursor::InsertSpecial(XubString aString) {
EndEdit();
}
-void SmCursor::InsertCommand(USHORT nCommand) {
+void SmCursor::InsertCommand(sal_uInt16 nCommand) {
switch(nCommand){
case RID_NEWLINE:
InsertRow();
@@ -1429,13 +1429,13 @@ void SmCursor::BeginEdit(){
bIsEnabledSetModifiedSmDocShell = pDocShell->IsEnableSetModified();
if( bIsEnabledSetModifiedSmDocShell )
- pDocShell->EnableSetModified( FALSE );
+ pDocShell->EnableSetModified( sal_False );
}
void SmCursor::EndEdit(){
if(--nEditSections > 0) return;
- pDocShell->SetFormulaArranged(FALSE);
+ pDocShell->SetFormulaArranged(sal_False);
//Okay, I don't know what this does... :)
//It's used in SmDocShell::SetText and with places where everything is modified.
//I think it does some magic, with sfx, but everything is totally undocumented so
@@ -1443,7 +1443,7 @@ void SmCursor::EndEdit(){
if ( bIsEnabledSetModifiedSmDocShell )
pDocShell->EnableSetModified( bIsEnabledSetModifiedSmDocShell );
//I think this notifies people around us that we've modified this document...
- pDocShell->SetModified(TRUE);
+ pDocShell->SetModified(sal_True);
//I think SmDocShell uses this value when it sends an update graphics event
//Anyway comments elsewhere suggests it need to be updated...
pDocShell->nModifyCount++;
diff --git a/starmath/source/detreg.cxx b/starmath/source/detreg.cxx
index d3800b09e9ac..f5725275e6cf 100644
--- a/starmath/source/detreg.cxx
+++ b/starmath/source/detreg.cxx
@@ -49,29 +49,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
-sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/,
- void* pRegistryKey )
-{
- Reference< ::registry::XRegistryKey >
- xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ;
-
- OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") );
- OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") );
-
- // Eigentliche Implementierung und ihre Services registrieren
- sal_Int32 i;
- Reference< ::registry::XRegistryKey > xNewKey;
-
- xNewKey = xKey->createKey( aDelimiter + SmFilterDetect::impl_getStaticImplementationName() +
- aUnoServices );
-
- Sequence< OUString > aServices = SmFilterDetect::impl_getStaticSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- return sal_True;
-}
-
void* SAL_CALL component_getFactory( const sal_Char* pImplementationName,
void* pServiceManager,
void* /*pRegistryKey*/ )
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index b167a545dbb8..0daecc2054dd 100644..100755
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -51,15 +51,18 @@
#include <svx/ucsubset.hxx>
-#include "config.hxx"
#include "dialog.hxx"
#include "starmath.hrc"
-
+#include "config.hxx"
#include "dialog.hrc"
#include "smmod.hxx"
#include "symbol.hxx"
#include "view.hxx"
#include "document.hxx"
+#include "unomodel.hxx"
+
+
+using ::rtl::OUString;
////////////////////////////////////////
//
@@ -79,9 +82,9 @@ class SmFontStyles
public:
SmFontStyles();
- USHORT GetCount() const { return 4; }
+ sal_uInt16 GetCount() const { return 4; }
const String & GetStyleName( const Font &rFont ) const;
- const String & GetStyleName( USHORT nIdx ) const;
+ const String & GetStyleName( sal_uInt16 nIdx ) const;
};
@@ -114,7 +117,7 @@ const String & SmFontStyles::GetStyleName( const Font &rFont ) const
}
-const String & SmFontStyles::GetStyleName( USHORT nIdx ) const
+const String & SmFontStyles::GetStyleName( sal_uInt16 nIdx ) const
{
// 0 = "normal", 1 = "italic",
// 2 = "bold", 3 = "bold italic"
@@ -145,10 +148,10 @@ void SetFontStyle(const XubString &rStyleName, Font &rFont)
{
// finden des Index passend zum StyleName fuer den leeren StyleName wird
// 0 (nicht bold nicht italic) angenommen.
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
if (rStyleName.Len())
{
- USHORT i;
+ sal_uInt16 i;
const SmFontStyles &rStyles = GetFontStyles();
for (i = 0; i < rStyles.GetCount(); i++)
if (rStyleName.CompareTo( rStyles.GetStyleName(i) ) == COMPARE_EQUAL)
@@ -185,8 +188,9 @@ SmPrintOptionsTabPage::SmPrintOptionsTabPage(Window *pParent, const SfxItemSet &
aSizeScaled (this, SmResId( RB_FIT_TO_PAGE )),
aSizeZoomed (this, SmResId( RB_ZOOM )),
aZoom (this, SmResId( MF_ZOOM )),
- aFixedLine3 (this, SmResId( FL_MISC_OPTIONS )),
- aNoRightSpaces (this, SmResId( CB_IGNORE_SPACING ))
+ aFixedLine3 (this, SmResId( FL_MISC_OPTIONS )),
+ aNoRightSpaces (this, SmResId( CB_IGNORE_SPACING )),
+ aSaveOnlyUsedSymbols (this, SmResId( CB_SAVE_ONLY_USED_SYMBOLS ))
{
FreeResource();
@@ -198,9 +202,9 @@ SmPrintOptionsTabPage::SmPrintOptionsTabPage(Window *pParent, const SfxItemSet &
}
-BOOL SmPrintOptionsTabPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SmPrintOptionsTabPage::FillItemSet(SfxItemSet& rSet)
{
- UINT16 nPrintSize;
+ sal_uInt16 nPrintSize;
if (aSizeNormal.IsChecked())
nPrintSize = PRINT_SIZE_NORMAL;
else if (aSizeScaled.IsChecked())
@@ -208,12 +212,13 @@ BOOL SmPrintOptionsTabPage::FillItemSet(SfxItemSet& rSet)
else
nPrintSize = PRINT_SIZE_ZOOMED;
- rSet.Put(SfxUInt16Item(GetWhich(SID_PRINTSIZE), (UINT16) nPrintSize));
- rSet.Put(SfxUInt16Item(GetWhich(SID_PRINTZOOM), (UINT16) aZoom.GetValue()));
+ rSet.Put(SfxUInt16Item(GetWhich(SID_PRINTSIZE), (sal_uInt16) nPrintSize));
+ rSet.Put(SfxUInt16Item(GetWhich(SID_PRINTZOOM), (sal_uInt16) aZoom.GetValue()));
rSet.Put(SfxBoolItem(GetWhich(SID_PRINTTITLE), aTitle.IsChecked()));
rSet.Put(SfxBoolItem(GetWhich(SID_PRINTTEXT), aText.IsChecked()));
rSet.Put(SfxBoolItem(GetWhich(SID_PRINTFRAME), aFrame.IsChecked()));
rSet.Put(SfxBoolItem(GetWhich(SID_NO_RIGHT_SPACES), aNoRightSpaces.IsChecked()));
+ rSet.Put(SfxBoolItem(GetWhich(SID_SAVE_ONLY_USED_SYMBOLS), aSaveOnlyUsedSymbols.IsChecked()));
return true;
}
@@ -235,6 +240,7 @@ void SmPrintOptionsTabPage::Reset(const SfxItemSet& rSet)
aText.Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_PRINTTEXT))).GetValue());
aFrame.Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_PRINTFRAME))).GetValue());
aNoRightSpaces.Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_NO_RIGHT_SPACES))).GetValue());
+ aSaveOnlyUsedSymbols.Check(((const SfxBoolItem &)rSet.Get(GetWhich(SID_SAVE_ONLY_USED_SYMBOLS))).GetValue());
}
@@ -285,7 +291,7 @@ IMPL_LINK_INLINE_END( SmFontDialog, FontSelectHdl, ComboBox *, pComboBox )
IMPL_LINK( SmFontDialog, FontModifyHdl, ComboBox *, pComboBox )
{
// if font is available in list then use it
- USHORT nPos = pComboBox->GetEntryPos( pComboBox->GetText() );
+ sal_uInt16 nPos = pComboBox->GetEntryPos( pComboBox->GetText() );
if (COMBOBOX_ENTRY_NOTFOUND != nPos)
{
FontSelectHdl( pComboBox );
@@ -343,8 +349,8 @@ SmFontDialog::SmFontDialog(Window * pParent,
FontList aFontList( pFntListDevice );
- USHORT nCount = aFontList.GetFontNameCount();
- for (USHORT i = 0; i < nCount; i++)
+ sal_uInt16 nCount = aFontList.GetFontNameCount();
+ for (sal_uInt16 i = 0; i < nCount; i++)
aFontBox.InsertEntry( aFontList.GetFontName(i).GetName() );
Face.SetSize(Size(0, 24));
@@ -479,14 +485,14 @@ void SmFontSizeDialog::WriteTo(SmFormat &rFormat) const
{
rFormat.SetBaseSize( Size(0, SmPtsTo100th_mm( static_cast< long >(aBaseSize.GetValue()))) );
- rFormat.SetRelSize(SIZ_TEXT, (USHORT) aTextSize .GetValue());
- rFormat.SetRelSize(SIZ_INDEX, (USHORT) aIndexSize .GetValue());
- rFormat.SetRelSize(SIZ_FUNCTION, (USHORT) aFunctionSize.GetValue());
- rFormat.SetRelSize(SIZ_OPERATOR, (USHORT) aOperatorSize.GetValue());
- rFormat.SetRelSize(SIZ_LIMITS, (USHORT) aBorderSize .GetValue());
+ rFormat.SetRelSize(SIZ_TEXT, (sal_uInt16) aTextSize .GetValue());
+ rFormat.SetRelSize(SIZ_INDEX, (sal_uInt16) aIndexSize .GetValue());
+ rFormat.SetRelSize(SIZ_FUNCTION, (sal_uInt16) aFunctionSize.GetValue());
+ rFormat.SetRelSize(SIZ_OPERATOR, (sal_uInt16) aOperatorSize.GetValue());
+ rFormat.SetRelSize(SIZ_LIMITS, (sal_uInt16) aBorderSize .GetValue());
const Size aTmp (rFormat.GetBaseSize());
- for (USHORT i = FNT_BEGIN; i <= FNT_END; i++)
+ for (sal_uInt16 i = FNT_BEGIN; i <= FNT_END; i++)
rFormat.SetFontSize(i, aTmp);
rFormat.RequestApplyChanges();
@@ -624,7 +630,7 @@ void SmFontTypeDialog::WriteTo(SmFormat &rFormat) const
struct FieldMinMax
{
- USHORT nMin, nMax;
+ sal_uInt16 nMin, nMax;
};
// Data for min and max values of the 4 metric fields
@@ -653,7 +659,7 @@ static const FieldMinMax pMinMaxData[10][4] =
{{ 0, 10000 }, { 0, 10000 }, { 0, 10000 }, { 0, 10000 }}
};
-SmCategoryDesc::SmCategoryDesc(const ResId& rResId, USHORT nCategoryIdx) :
+SmCategoryDesc::SmCategoryDesc(const ResId& rResId, sal_uInt16 nCategoryIdx) :
Resource(rResId)
{
if (IsAvailableRes(ResId(1,*rResId.GetResMgr()).SetRT(RSC_STRING)))
@@ -704,7 +710,7 @@ IMPL_LINK( SmDistanceDialog, GetFocusHdl, Control *, pControl )
{
if (Categories[nActiveCategory])
{
- USHORT i;
+ sal_uInt16 i;
if (pControl == &aMetricField1)
i = 0;
@@ -758,7 +764,7 @@ IMPL_LINK( SmDistanceDialog, CheckBoxClickHdl, CheckBox *, pCheckBox )
}
-void SmDistanceDialog::SetHelpId(MetricField &rField, ULONG nHelpId)
+void SmDistanceDialog::SetHelpId(MetricField &rField, const rtl::OString& sHelpId)
{
//! HelpID's die auf diese Weise explizit gesetzt werden, muessen im
//! util Verzeichnis im File "hidother.src" mit Hilfe von "hidspecial"
@@ -769,7 +775,7 @@ void SmDistanceDialog::SetHelpId(MetricField &rField, ULONG nHelpId)
OSL_ENSURE(aEmptyText.Len() == 0, "Sm: Ooops...");
#endif
- rField.SetHelpId(nHelpId);
+ rField.SetHelpId(sHelpId);
rField.SetHelpText(aEmptyText);
// since MetricField inherits from SpinField which has a sub Edit field
@@ -777,13 +783,14 @@ void SmDistanceDialog::SetHelpId(MetricField &rField, ULONG nHelpId)
// for it too.
Edit *pSubEdit = rField.GetSubEdit();
if (pSubEdit)
- { pSubEdit->SetHelpId(nHelpId);
+ {
+ pSubEdit->SetHelpId(sHelpId);
pSubEdit->SetHelpText(aEmptyText);
}
}
-void SmDistanceDialog::SetCategory(USHORT nCategory)
+void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
{
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE(/*0 <= nCategory &&*/ nCategory < NOCATEGORIES,
@@ -795,7 +802,7 @@ void SmDistanceDialog::SetCategory(USHORT nCategory)
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE(NOCATEGORIES == 10, "Sm : array doesn't fit into the number of categories");
#endif
- ULONG const aCatMf2Hid[10][4] =
+ static const char * aCatMf2Hid[10][4] =
{
{ HID_SMA_DEFAULT_DIST, HID_SMA_LINE_DIST, HID_SMA_ROOT_DIST, 0 },
{ HID_SMA_SUP_DIST, HID_SMA_SUB_DIST , 0, 0 },
@@ -825,10 +832,10 @@ void SmDistanceDialog::SetCategory(USHORT nCategory)
if (nActiveCategory != CATEGORY_NONE)
{
pCat = Categories[nActiveCategory];
- pCat->SetValue(0, (USHORT) aMetricField1.GetValue());
- pCat->SetValue(1, (USHORT) aMetricField2.GetValue());
- pCat->SetValue(2, (USHORT) aMetricField3.GetValue());
- pCat->SetValue(3, (USHORT) aMetricField4.GetValue());
+ pCat->SetValue(0, (sal_uInt16) aMetricField1.GetValue());
+ pCat->SetValue(1, (sal_uInt16) aMetricField2.GetValue());
+ pCat->SetValue(2, (sal_uInt16) aMetricField3.GetValue());
+ pCat->SetValue(3, (sal_uInt16) aMetricField4.GetValue());
if (nActiveCategory == 5)
bScaleAllBrackets = aCheckBox1.IsChecked();
@@ -839,7 +846,7 @@ void SmDistanceDialog::SetCategory(USHORT nCategory)
// aktivieren/deaktivieren der zugehoerigen Controls in Abhaengigkeit von der
// gewaehlten Kategorie.
bool bActive;
- for (USHORT i = 0; i < 4; i++)
+ for (sal_uInt16 i = 0; i < 4; i++)
{
FixedText *pFT = (FixedText * const) aWin[i][0];
MetricField *pMF = (MetricField * const) aWin[i][1];
@@ -855,7 +862,7 @@ void SmDistanceDialog::SetCategory(USHORT nCategory)
// setzen von Masseinheit und Anzahl der Nachkommastellen
FieldUnit eUnit;
- USHORT nDigits;
+ sal_uInt16 nDigits;
if (nCategory < 9)
{
eUnit = FUNIT_CUSTOM;
@@ -925,7 +932,7 @@ SmDistanceDialog::SmDistanceDialog(Window *pParent, bool bFreeRes)
aBitmap (this, SmResId(1)),
aFixedLine (this, SmResId(1))
{
- for (USHORT i = 0; i < NOCATEGORIES; i++)
+ for (sal_uInt16 i = 0; i < NOCATEGORIES; i++)
Categories[i] = new SmCategoryDesc(SmResId(i + 1), i);
nActiveCategory = CATEGORY_NONE;
bScaleAllBrackets = false;
@@ -1117,11 +1124,11 @@ void SmShowSymbolSet::Paint(const Rectangle&)
// MapUnit einstellen fuer die 'nLen' berechnet wurde
SetMapMode(MapMode(MAP_PIXEL));
- USHORT v = sal::static_int_cast< USHORT >((aVScrollBar.GetThumbPos() * nColumns));
+ sal_uInt16 v = sal::static_int_cast< sal_uInt16 >((aVScrollBar.GetThumbPos() * nColumns));
size_t nSymbols = aSymbolSet.size();
Color aTxtColor( GetTextColor() );
- for (USHORT i = v; i < nSymbols ; i++)
+ for (sal_uInt16 i = v; i < nSymbols ; i++)
{
SmSym aSymbol (*aSymbolSet[i]);
Font aFont (aSymbol.GetFace());
@@ -1135,11 +1142,13 @@ void SmShowSymbolSet::Paint(const Rectangle&)
SetTextColor( aTxtColor );
int nIV = i - v;
- Size aSize(GetTextWidth(aSymbol.GetCharacter()), GetTextHeight());
+ sal_UCS4 cChar = aSymbol.GetCharacter();
+ String aText( OUString( &cChar, 1 ) );
+ Size aSize( GetTextWidth( aText ), GetTextHeight());
DrawText(Point((nIV % nColumns) * nLen + (nLen - aSize.Width()) / 2,
(nIV / nColumns) * nLen + (nLen - aSize.Height()) / 2),
- aSymbol.GetCharacter());
+ aText);
}
if (nSelectSymbol != SYMBOL_NONE)
@@ -1161,7 +1170,7 @@ void SmShowSymbolSet::MouseButtonDown(const MouseEvent& rMEvt)
{
long nPos = (rMEvt.GetPosPixel().Y() / nLen) * nColumns + (rMEvt.GetPosPixel().X() / nLen) +
aVScrollBar.GetThumbPos() * nColumns;
- SelectSymbol( sal::static_int_cast< USHORT >(nPos) );
+ SelectSymbol( sal::static_int_cast< sal_uInt16 >(nPos) );
aSelectHdlLink.Call(this);
@@ -1173,7 +1182,7 @@ void SmShowSymbolSet::MouseButtonDown(const MouseEvent& rMEvt)
void SmShowSymbolSet::KeyInput(const KeyEvent& rKEvt)
{
- USHORT n = nSelectSymbol;
+ sal_uInt16 n = nSelectSymbol;
if (n != SYMBOL_NONE)
{
@@ -1184,7 +1193,7 @@ void SmShowSymbolSet::KeyInput(const KeyEvent& rKEvt)
case KEY_LEFT: n -= 1; break;
case KEY_RIGHT: n += 1; break;
case KEY_HOME: n = 0; break;
- case KEY_END: n = static_cast< USHORT >(aSymbolSet.size() - 1); break;
+ case KEY_END: n = static_cast< sal_uInt16 >(aSymbolSet.size() - 1); break;
case KEY_PAGEUP: n -= nColumns * nRows; break;
case KEY_PAGEDOWN: n += nColumns * nRows; break;
@@ -1200,8 +1209,8 @@ void SmShowSymbolSet::KeyInput(const KeyEvent& rKEvt)
n = nSelectSymbol;
// adjust scrollbar
- if ((n < (USHORT) (aVScrollBar.GetThumbPos() * nColumns)) ||
- (n >= (USHORT) ((aVScrollBar.GetThumbPos() + nRows) * nColumns)))
+ if ((n < (sal_uInt16) (aVScrollBar.GetThumbPos() * nColumns)) ||
+ (n >= (sal_uInt16) ((aVScrollBar.GetThumbPos() + nRows) * nColumns)))
{
aVScrollBar.SetThumbPos(n / nColumns);
Invalidate();
@@ -1224,12 +1233,12 @@ SmShowSymbolSet::SmShowSymbolSet(Window *pParent, const ResId& rResId) :
nUseableWidth = aOutputSize.Width() - nScrollBarWidth;
// Hoehe von 16pt in Pixeln (passend zu 'aOutputSize')
- nLen = (USHORT) LogicToPixel(Size(0, 16), MapMode(MAP_POINT)).Height();
+ nLen = (sal_uInt16) LogicToPixel(Size(0, 16), MapMode(MAP_POINT)).Height();
- nColumns = sal::static_int_cast< USHORT >(nUseableWidth / nLen);
+ nColumns = sal::static_int_cast< sal_uInt16 >(nUseableWidth / nLen);
if (nColumns > 2 && nColumns % 2 != 0)
nColumns--;
- nRows = sal::static_int_cast< USHORT >(aOutputSize.Height() / nLen);
+ nRows = sal::static_int_cast< sal_uInt16 >(aOutputSize.Height() / nLen);
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE(nColumns > 0, "Sm : no columns");
OSL_ENSURE(nRows > 0, "Sm : no rows");
@@ -1256,7 +1265,7 @@ void SmShowSymbolSet::SetSymbolSet(const SymbolPtrVec_t& rSymbolSet)
{
aSymbolSet = rSymbolSet;
- if (static_cast< USHORT >(aSymbolSet.size()) > (nColumns * nRows))
+ if (static_cast< sal_uInt16 >(aSymbolSet.size()) > (nColumns * nRows))
{
aVScrollBar.SetRange(Range(0, ((aSymbolSet.size() + (nColumns - 1)) / nColumns) - nRows));
aVScrollBar.Enable(true);
@@ -1271,7 +1280,7 @@ void SmShowSymbolSet::SetSymbolSet(const SymbolPtrVec_t& rSymbolSet)
}
-void SmShowSymbolSet::SelectSymbol(USHORT nSymbol)
+void SmShowSymbolSet::SelectSymbol(sal_uInt16 nSymbol)
{
int v = (int) (aVScrollBar.GetThumbPos() * nColumns);
@@ -1311,7 +1320,7 @@ void SmShowSymbol::Paint(const Rectangle &rRect)
Size aTextSize(GetTextWidth(rText), GetTextHeight());
DrawText(Point((GetOutputSize().Width() - aTextSize.Width()) / 2,
- (GetOutputSize().Height() - aTextSize.Height()) / 2), rText);
+ (GetOutputSize().Height() * 7/10)), rText);
}
@@ -1328,17 +1337,14 @@ void SmShowSymbol::SetSymbol(const SmSym *pSymbol)
{
if (pSymbol)
{
- Color aTxtColor( GetTextColor() );
-
Font aFont (pSymbol->GetFace());
aFont.SetSize(Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3));
- aFont.SetAlign(ALIGN_TOP);
+ aFont.SetAlign(ALIGN_BASELINE);
SetFont(aFont);
- // keep old text color (font may have different color set)
- SetTextColor(aTxtColor);
-
- SetText(XubString(pSymbol->GetCharacter()));
+ sal_UCS4 cChar = pSymbol->GetCharacter();
+ String aText( OUString( &cChar, 1 ) );
+ SetText( aText );
}
// 'Invalidate' fuellt den background mit der background-Farbe.
@@ -1408,7 +1414,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
// altes SymbolSet merken
XubString aOldSymbolSet (aSymbolSets.GetSelectEntry());
- USHORT nSymPos = GetSelectedSymbol();
+ sal_uInt16 nSymPos = GetSelectedSymbol();
// Dialog an evtl geaenderte Daten des SymbolSet Manager anpassen
if (pDialog->Execute() == RET_OK && rSymbolMgr.IsModified())
@@ -1430,7 +1436,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
}
if (nSymPos >= aSymbolSet.size())
- nSymPos = static_cast< USHORT >(aSymbolSet.size()) - 1;
+ nSymPos = static_cast< sal_uInt16 >(aSymbolSet.size()) - 1;
SelectSymbol( nSymPos );
delete pDialog;
@@ -1461,7 +1467,7 @@ IMPL_LINK( SmSymbolDialog, GetClickHdl, Button *, EMPTYARG pButton )
const SmSym *pSym = GetSymbol();
if (pSym)
{
- XubString aText ('%');
+ String aText ('%');
aText += pSym->GetName();
aText += (sal_Unicode)' ';
@@ -1568,7 +1574,7 @@ void SmSymbolDialog::DataChanged( const DataChangedEvent& rDCEvt )
bool SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
{
bool bRet = false;
- USHORT nPos = aSymbolSets.GetEntryPos(rSymbolSetName);
+ sal_uInt16 nPos = aSymbolSets.GetEntryPos(rSymbolSetName);
aSymbolSetName = String();
aSymbolSet.clear();
@@ -1595,10 +1601,10 @@ bool SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName)
}
-void SmSymbolDialog::SelectSymbol(USHORT nSymbolNo)
+void SmSymbolDialog::SelectSymbol(sal_uInt16 nSymbolNo)
{
const SmSym *pSym = NULL;
- if (aSymbolSetName.Len() > 0 && nSymbolNo < static_cast< USHORT >(aSymbolSet.size()))
+ if (aSymbolSetName.Len() > 0 && nSymbolNo < static_cast< sal_uInt16 >(aSymbolSet.size()))
pSym = aSymbolSet[ nSymbolNo ];
aSymbolSetDisplay.SelectSymbol(nSymbolNo);
@@ -1609,8 +1615,8 @@ void SmSymbolDialog::SelectSymbol(USHORT nSymbolNo)
const SmSym * SmSymbolDialog::GetSymbol() const
{
- USHORT nSymbolNo = aSymbolSetDisplay.GetSelectSymbol();
- bool bValid = aSymbolSetName.Len() > 0 && nSymbolNo < static_cast< USHORT >(aSymbolSet.size());
+ sal_uInt16 nSymbolNo = aSymbolSetDisplay.GetSelectSymbol();
+ bool bValid = aSymbolSetName.Len() > 0 && nSymbolNo < static_cast< sal_uInt16 >(aSymbolSet.size());
return bValid ? aSymbolSet[ nSymbolNo ] : NULL;
}
@@ -1622,42 +1628,44 @@ void SmShowChar::Paint(const Rectangle &rRect)
{
Control::Paint( rRect );
- XubString Text (GetText ());
- if (Text.Len() > 0)
+ OUString aText( GetText() );
+ if (aText.getLength() > 0)
{
- Size aTextSize(GetTextWidth(Text), GetTextHeight());
+#if OSL_DEBUG_LEVEL > 1
+ sal_Int32 nPos = 0;
+ sal_UCS4 cChar = aText.iterateCodePoints( &nPos );
+ (void) cChar;
+#endif
+ Size aTextSize(GetTextWidth(aText), GetTextHeight());
DrawText(Point((GetOutputSize().Width() - aTextSize.Width()) / 2,
- (GetOutputSize().Height() - aTextSize.Height()) / 2), Text);
+ (GetOutputSize().Height() * 7/10)), aText);
}
}
-void SmShowChar::SetChar(xub_Unicode aChar)
+void SmShowChar::SetSymbol( const SmSym *pSym )
{
- SetText(XubString(aChar));
- Invalidate();
+ if (pSym)
+ SetSymbol( pSym->GetCharacter(), pSym->GetFace() );
}
-void SmShowChar::SetFont(const Font &rFont)
+void SmShowChar::SetSymbol( sal_UCS4 cChar, const Font &rFont )
{
- Color aTxtColor( GetTextColor() );
-
- Font aFont (rFont);
- Size aSize (Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3));
-
- aFont.SetSize(aSize);
- aFont.SetAlign(ALIGN_TOP);
+ Font aFont( rFont );
+ aFont.SetSize( Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3) );
+ aFont.SetAlign(ALIGN_BASELINE);
+ SetFont(aFont);
aFont.SetTransparent(true);
- Control::SetFont(aFont);
- // keep text color (new font may have different one)
- SetTextColor( aTxtColor );
+ String aText( OUString( &cChar, 1) );
+ SetText( aText );
Invalidate();
}
+
////////////////////////////////////////////////////////////////////////////////
void SmSymDefineDialog::FillSymbols(ComboBox &rComboBox, bool bDeleteText)
@@ -1707,8 +1715,8 @@ void SmSymDefineDialog::FillFonts(bool bDelete)
// ueber die 'FontStyleBox' gewaehlt und nicht auch noch hier)
if (pFontList)
{
- USHORT nCount = pFontList->GetFontNameCount();
- for (USHORT i = 0; i < nCount; i++)
+ sal_uInt16 nCount = pFontList->GetFontNameCount();
+ for (sal_uInt16 i = 0; i < nCount; i++)
aFonts.InsertEntry( pFontList->GetFontName(i).GetName() );
}
}
@@ -1725,7 +1733,7 @@ void SmSymDefineDialog::FillStyles(bool bDeleteText)
{
// eigene StyleName's verwenden
const SmFontStyles &rStyles = GetFontStyles();
- for (USHORT i = 0; i < rStyles.GetCount(); i++)
+ for (sal_uInt16 i = 0; i < rStyles.GetCount(); i++)
aStyles.InsertEntry( rStyles.GetStyleName(i) );
#if OSL_DEBUG_LEVEL > 1
@@ -1816,7 +1824,7 @@ IMPL_LINK( SmSymDefineDialog, FontChangeHdl, ListBox *, EMPTYARG pListBox )
IMPL_LINK( SmSymDefineDialog, SubsetChangeHdl, ListBox *, EMPTYARG pListBox )
{
(void) pListBox;
- USHORT nPos = aFontsSubsetLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aFontsSubsetLB.GetSelectEntryPos();
if (LISTBOX_ENTRY_NOTFOUND != nPos)
{
const Subset* pSubset = reinterpret_cast<const Subset*> (aFontsSubsetLB.GetEntryData( nPos ));
@@ -1843,7 +1851,7 @@ IMPL_LINK( SmSymDefineDialog, StyleChangeHdl, ComboBox *, EMPTYARG pComboBox )
IMPL_LINK( SmSymDefineDialog, CharHighlightHdl, Control *, EMPTYARG )
{
- sal_UCS4 cChar = aCharsetDisplay.GetSelectCharacter();
+ sal_UCS4 cChar = aCharsetDisplay.GetSelectCharacter();
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE( pSubsetMap, "SubsetMap missing" );
@@ -1857,9 +1865,18 @@ IMPL_LINK( SmSymDefineDialog, CharHighlightHdl, Control *, EMPTYARG )
aFontsSubsetLB.SetNoSelection();
}
- // TO_DO_UCS4 (#i74049): get rid of cast without loosing UCS4 functionality
- aSymbolDisplay.SetChar( sal::static_int_cast< sal_Unicode >(cChar) );
+ aSymbolDisplay.SetSymbol( cChar, aCharsetDisplay.GetFont() );
+
UpdateButtons();
+
+ // display Unicode position as symbol name while iterating over characters
+ const String aHex( String::CreateFromInt64( cChar, 16 ).ToUpperAscii() );
+ const String aPattern( A2OU( aHex.Len() > 4 ? "Ux000000" : "Ux0000" ) );
+ String aUnicodePos( aPattern.Copy( 0, aPattern.Len() - aHex.Len() ) );
+ aUnicodePos += aHex;
+ aSymbols.SetText( aUnicodePos );
+ aSymbolName.SetText( aUnicodePos );
+
return 0;
}
@@ -1873,16 +1890,13 @@ IMPL_LINK( SmSymDefineDialog, AddClickHdl, Button *, EMPTYARG pButton )
#endif
// add symbol
- // TO_DO_UCS4 (#i74049): get rid of cast without loosing UCS4 functionality
const SmSym aNewSymbol( aSymbols.GetText(), aCharsetDisplay.GetFont(),
- sal::static_int_cast< sal_Unicode >( aCharsetDisplay.GetSelectCharacter() ),
- aSymbolSets.GetText() );
+ aCharsetDisplay.GetSelectCharacter(), aSymbolSets.GetText() );
//OSL_ENSURE( aSymbolMgrCopy.GetSymbolByName(aTmpSymbolName) == NULL, "symbol already exists" );
aSymbolMgrCopy.AddOrReplaceSymbol( aNewSymbol );
// update display of new symbol
- aSymbolDisplay.SetChar( aNewSymbol.GetCharacter() );
- aSymbolDisplay.SetFont( aNewSymbol.GetFace() );
+ aSymbolDisplay.SetSymbol( &aNewSymbol );
aSymbolName.SetText( aNewSymbol.GetName() );
aSymbolSetName.SetText( aNewSymbol.GetSymbolSetName() );
@@ -1909,10 +1923,8 @@ IMPL_LINK( SmSymDefineDialog, ChangeClickHdl, Button *, EMPTYARG pButton )
// get new Sybol to use
//! get font from symbol-disp lay since charset-display does not keep
//! the bold attribut.
- // TO_DO_UCS4 (#i74049): get rid of cast without loosing UCS4 functionality
const SmSym aNewSymbol( aSymbols.GetText(), aCharsetDisplay.GetFont(),
- sal::static_int_cast< sal_Unicode >( aCharsetDisplay.GetSelectCharacter() ),
- aSymbolSets.GetText() );
+ aCharsetDisplay.GetSelectCharacter(), aSymbolSets.GetText() );
// remove old symbol if the name was changed then add new one
const bool bNameChanged = aOldSymbols.GetText() != aSymbols.GetText();
@@ -1925,8 +1937,7 @@ IMPL_LINK( SmSymDefineDialog, ChangeClickHdl, Button *, EMPTYARG pButton )
SetOrigSymbol(NULL, XubString());
// update display of new symbol
- aSymbolDisplay.SetChar( aNewSymbol.GetCharacter() );
- aSymbolDisplay.SetFont( aNewSymbol.GetFace() );
+ aSymbolDisplay.SetSymbol( &aNewSymbol );
aSymbolName.SetText( aNewSymbol.GetName() );
aSymbolSetName.SetText( aNewSymbol.GetSymbolSetName() );
@@ -2182,7 +2193,7 @@ bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
rComboBox.SetText(aNormName);
bool bRet = false;
- USHORT nPos = rComboBox.GetEntryPos(aNormName);
+ sal_uInt16 nPos = rComboBox.GetEntryPos(aNormName);
if (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
@@ -2235,8 +2246,7 @@ void SmSymDefineDialog::SetOrigSymbol(const SmSym *pSymbol,
aSymName = pSymbol->GetName();
aSymSetName = rSymbolSetName;
- aOldSymbolDisplay.SetFont(pSymbol->GetFace());
- aOldSymbolDisplay.SetChar(pSymbol->GetCharacter());
+ aOldSymbolDisplay.SetSymbol( pSymbol );
}
else
{ // loeschen des angezeigten Symbols
@@ -2263,7 +2273,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
rComboBox.SetText(aNormName);
bool bRet = false;
- USHORT nPos = rComboBox.GetEntryPos(aNormName);
+ sal_uInt16 nPos = rComboBox.GetEntryPos(aNormName);
bool bIsOld = &rComboBox == &aOldSymbols;
@@ -2290,6 +2300,10 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
// das zugehoerige Zeichen auswaehlen
SelectChar(pSymbol->GetCharacter());
+
+ // since SelectChar will also set the unicode point as text in the
+ // symbols box, we have to set the symbol name again to get that one displayed
+ aSymbols.SetText( pSymbol->GetName() );
}
}
@@ -2342,11 +2356,11 @@ void SmSymDefineDialog::SetFont(const XubString &rFontName, const XubString &rSt
const Subset* pSubset;
while( NULL != (pSubset = pSubsetMap->GetNextSubset( bFirst )) )
{
- USHORT nPos = aFontsSubsetLB.InsertEntry( pSubset->GetName());
+ sal_uInt16 nPos = aFontsSubsetLB.InsertEntry( pSubset->GetName());
aFontsSubsetLB.SetEntryData( nPos, (void *) pSubset );
// subset must live at least as long as the selected font !!!
if( bFirst )
- aFontsSubsetLB.SelectEntryPos( nPos );
+ aFontsSubsetLB.SelectEntryPos( nPos );
bFirst = false;
}
if( bFirst )
@@ -2358,7 +2372,7 @@ void SmSymDefineDialog::SetFont(const XubString &rFontName, const XubString &rSt
bool SmSymDefineDialog::SelectFont(const XubString &rFontName, bool bApplyFont)
{
bool bRet = false;
- USHORT nPos = aFonts.GetEntryPos(rFontName);
+ sal_uInt16 nPos = aFonts.GetEntryPos(rFontName);
if (nPos != LISTBOX_ENTRY_NOTFOUND)
{
@@ -2366,8 +2380,12 @@ bool SmSymDefineDialog::SelectFont(const XubString &rFontName, bool bApplyFont)
if (aStyles.GetEntryCount() > 0)
SelectStyle(aStyles.GetEntry(0));
if (bApplyFont)
+ {
SetFont(aFonts.GetSelectEntry(), aStyles.GetText());
bRet = true;
+ aSymbolDisplay.SetSymbol( aCharsetDisplay.GetSelectCharacter(), aCharsetDisplay.GetFont() );
+ }
+ bRet = sal_True;
}
else
aFonts.SetNoSelection();
@@ -2382,7 +2400,7 @@ bool SmSymDefineDialog::SelectFont(const XubString &rFontName, bool bApplyFont)
bool SmSymDefineDialog::SelectStyle(const XubString &rStyleName, bool bApplyFont)
{
bool bRet = false;
- USHORT nPos = aStyles.GetEntryPos(rStyleName);
+ sal_uInt16 nPos = aStyles.GetEntryPos(rStyleName);
// falls der Style nicht zur Auswahl steht nehmen wir den erst moeglichen
// (sofern vorhanden)
@@ -2393,8 +2411,12 @@ bool SmSymDefineDialog::SelectStyle(const XubString &rStyleName, bool bApplyFont
{
aStyles.SetText(aStyles.GetEntry(nPos));
if (bApplyFont)
+ {
SetFont(aFonts.GetSelectEntry(), aStyles.GetText());
bRet = true;
+ aSymbolDisplay.SetSymbol( aCharsetDisplay.GetSelectCharacter(), aCharsetDisplay.GetFont() );
+ }
+ bRet = sal_True;
}
else
aStyles.SetText(XubString());
@@ -2408,7 +2430,7 @@ bool SmSymDefineDialog::SelectStyle(const XubString &rStyleName, bool bApplyFont
void SmSymDefineDialog::SelectChar(xub_Unicode cChar)
{
aCharsetDisplay.SelectCharacter( cChar );
- aSymbolDisplay.SetChar( cChar );
+ aSymbolDisplay.SetSymbol( cChar, aCharsetDisplay.GetFont() );
UpdateButtons();
}
diff --git a/starmath/source/dialog.hrc b/starmath/source/dialog.hrc
index 29d87ba1d287..9e3e58493ab3 100644..100755
--- a/starmath/source/dialog.hrc
+++ b/starmath/source/dialog.hrc
@@ -31,17 +31,18 @@
#define FL_PRINTOPTIONS 10
#define CB_TITLEROW 11
-#define CB_EQUATION_TEXT 12
+#define CB_EQUATION_TEXT 12
#define CB_FRAME 13
#define FL_PRINT_FORMAT 20
-#define RB_ORIGINAL_SIZE 21
-#define RB_FIT_TO_PAGE 22
+#define RB_ORIGINAL_SIZE 21
+#define RB_FIT_TO_PAGE 22
#define RB_ZOOM 23
#define MF_ZOOM 24
#define FL_MISC_OPTIONS 30
-#define CB_IGNORE_SPACING 31
+#define CB_IGNORE_SPACING 31
+#define CB_SAVE_ONLY_USED_SYMBOLS 32
#define FT_FONTS_SUBSET 110
#define LB_FONTS_SUBSET 111
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 1e8e4f9e05e9..337e038df69e 100644..100755
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -39,6 +39,8 @@
#include <comphelper/storagehelper.hxx>
#include <rtl/logfile.hxx>
#include <rtl/ustring.hxx>
+#include <unotools/eventcfg.hxx>
+#include <sfx2/event.hxx>
#include <sfx2/app.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/docfile.hxx>
@@ -77,7 +79,7 @@
#include <editeng/unolingu.hxx>
#include <ucbhelper/content.hxx>
#include <vcl/mapmod.hxx>
-#include <vcl/mapunit.hxx>
+#include <tools/mapunit.hxx>
#include <vcl/msgbox.hxx>
#include <sfx2/sfx.hrc>
#include <document.hxx>
@@ -98,6 +100,7 @@
#include <sfx2/sfxsids.hrc>
#include <svx/svxids.hrc>
#include "cursor.hxx"
+#include <tools/diagnose_ex.h>
#include "visitors.hxx"
#include "accessibility.hxx"
@@ -108,7 +111,7 @@ using namespace ::com::sun::star::ucb;
using namespace ::com::sun::star::uno;
-#define DOCUMENT_BUFFER_SIZE (USHORT)32768
+#define DOCUMENT_BUFFER_SIZE (sal_uInt16)32768
static const char pStarMathDoc[] = "StarMathDocument";
@@ -183,7 +186,14 @@ void SmDocShell::SetText(const String& rBuffer)
{
pViewSh->GetViewFrame()->GetBindings().Invalidate(SID_TEXT);
if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() )
+ {
+ // have SwOleClient::FormatChanged() to align the modified formula properly
+ // even if the vis area does not change (e.g. when formula text changes from
+ // "{a over b + c} over d" to "d over {a over b + c}"
+ SFX_APP()->NotifyEvent(SfxEventHint( SFX_EVENT_VISAREACHANGED, GlobalEventConfig::GetEventName(STR_EVENT_VISAREACHANGED), this));
+
Repaint();
+ }
else
pViewSh->GetGraphicWindow().Invalidate();
}
@@ -255,6 +265,7 @@ void SmDocShell::Parse()
nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState
SetFormulaArranged( false );
InvalidateCursor();
+ aUsedSymbols = aInterpreter.GetUsedSymbols();
}
@@ -297,9 +308,9 @@ void SmDocShell::ArrangeFormula()
// format/draw formulas always from left to right,
// and numbers should not be converted
- ULONG nLayoutMode = pOutDev->GetLayoutMode();
+ sal_uLong nLayoutMode = pOutDev->GetLayoutMode();
pOutDev->SetLayoutMode( TEXT_LAYOUT_BIDI_LTR );
- INT16 nDigitLang = pOutDev->GetDigitLanguage();
+ sal_Int16 nDigitLang = pOutDev->GetDigitLanguage();
pOutDev->SetDigitLanguage( LANGUAGE_ENGLISH );
//
pTree->Arrange(*pOutDev, rFormat);
@@ -325,10 +336,10 @@ void SetEditEngineDefaultFonts(
SvtLinguConfig().GetOptions( aOpt );
//
struct FontDta {
- INT16 nFallbackLang;
- INT16 nLang;
- USHORT nFontType;
- USHORT nFontInfoId;
+ sal_Int16 nFallbackLang;
+ sal_Int16 nLang;
+ sal_uInt16 nFontType;
+ sal_uInt16 nFontInfoId;
} aTable[3] =
{
// info to get western font to be used
@@ -388,7 +399,7 @@ EditEngine& SmDocShell::GetEditEngine()
pEditEngine = new EditEngine( pEditEngineItemPool );
pEditEngine->EnableUndo( true );
- pEditEngine->SetDefTab( USHORT(
+ pEditEngine->SetDefTab( sal_uInt16(
Application::GetDefaultDevice()->GetTextWidth( C2S("XXXX") ) ) );
pEditEngine->SetControlWord(
@@ -451,7 +462,7 @@ void SmDocShell::DrawFormula(OutputDevice &rDev, Point &rPosition, bool bDrawSel
//! the draw mode needs to be set to default, because when imbedding
//! Math for example in Calc in "a over b" the fraction bar may not
//! be visible else. More generally: the FillColor may have been changed.
- ULONG nOldDrawMode = DRAWMODE_DEFAULT;
+ sal_uLong nOldDrawMode = DRAWMODE_DEFAULT;
bool bRestoreDrawMode = false;
if (OUTDEV_WINDOW == rDev.GetOutDevType() &&
((Window &) rDev).GetSettings().GetStyleSettings().GetHighContrastMode())
@@ -463,9 +474,9 @@ void SmDocShell::DrawFormula(OutputDevice &rDev, Point &rPosition, bool bDrawSel
// format/draw formulas always from left to right
// and numbers should not be converted
- ULONG nLayoutMode = rDev.GetLayoutMode();
+ sal_uLong nLayoutMode = rDev.GetLayoutMode();
rDev.SetLayoutMode( TEXT_LAYOUT_BIDI_LTR );
- INT16 nDigitLang = rDev.GetDigitLanguage();
+ sal_Int16 nDigitLang = rDev.GetDigitLanguage();
rDev.SetDigitLanguage( LANGUAGE_ENGLISH );
//Set selection if any
@@ -737,7 +748,7 @@ SmDocShell::~SmDocShell()
}
-BOOL SmDocShell::SetData( const String& rData )
+sal_Bool SmDocShell::SetData( const String& rData )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetData" );
@@ -746,7 +757,7 @@ BOOL SmDocShell::SetData( const String& rData )
}
-BOOL SmDocShell::ConvertFrom(SfxMedium &rMedium)
+sal_Bool SmDocShell::ConvertFrom(SfxMedium &rMedium)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ConvertFrom" );
@@ -797,7 +808,7 @@ BOOL SmDocShell::ConvertFrom(SfxMedium &rMedium)
}
-BOOL SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage )
+sal_Bool SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::InitNew" );
@@ -811,7 +822,7 @@ BOOL SmDocShell::InitNew( const uno::Reference < embed::XStorage >& xStorage )
}
-BOOL SmDocShell::Load( SfxMedium& rMedium )
+sal_Bool SmDocShell::Load( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Load" );
@@ -834,7 +845,7 @@ BOOL SmDocShell::Load( SfxMedium& rMedium )
// is this a fabulous math package ?
Reference<com::sun::star::frame::XModel> xModel(GetModel());
SmXMLImportWrapper aEquation(xModel);
- ULONG nError = aEquation.Import(rMedium);
+ sal_uLong nError = aEquation.Import(rMedium);
bRet = 0 == nError;
SetError( nError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
}
@@ -852,7 +863,7 @@ BOOL SmDocShell::Load( SfxMedium& rMedium )
//------------------------------------------------------------------
-BOOL SmDocShell::Save()
+sal_Bool SmDocShell::Save()
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Save" );
@@ -923,7 +934,7 @@ void SmDocShell::UpdateText()
}
-BOOL SmDocShell::SaveAs( SfxMedium& rMedium )
+sal_Bool SmDocShell::SaveAs( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveAs" );
@@ -947,7 +958,7 @@ BOOL SmDocShell::SaveAs( SfxMedium& rMedium )
return bRet;
}
-BOOL SmDocShell::ConvertTo( SfxMedium &rMedium )
+sal_Bool SmDocShell::ConvertTo( SfxMedium &rMedium )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::ConvertTo" );
@@ -981,7 +992,7 @@ BOOL SmDocShell::ConvertTo( SfxMedium &rMedium )
return bRet;
}
-BOOL SmDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage )
+sal_Bool SmDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SaveCompleted" );
@@ -1004,7 +1015,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
SmFormat aNewFormat( aOldFormat );
aNewFormat.SetTextmode(!aOldFormat.IsTextmode());
- SfxUndoManager *pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
if (pTmpUndoMgr)
pTmpUndoMgr->AddUndoAction(
new SmFormatAction(this, aOldFormat, aNewFormat));
@@ -1047,7 +1058,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
SmFormat aNewFormat( aOldFormat );
pFontTypeDialog->WriteTo(aNewFormat);
- SfxUndoManager *pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
if (pTmpUndoMgr)
pTmpUndoMgr->AddUndoAction(
new SmFormatAction(this, aOldFormat, aNewFormat));
@@ -1071,7 +1082,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
pFontSizeDialog->WriteTo(aNewFormat);
- SfxUndoManager *pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
if (pTmpUndoMgr)
pTmpUndoMgr->AddUndoAction(
new SmFormatAction(this, aOldFormat, aNewFormat));
@@ -1095,7 +1106,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
pDistanceDialog->WriteTo(aNewFormat);
- SfxUndoManager *pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
if (pTmpUndoMgr)
pTmpUndoMgr->AddUndoAction(
new SmFormatAction(this, aOldFormat, aNewFormat));
@@ -1124,7 +1135,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
pAlignDialog->WriteTo( aFmt );
pp->GetConfig()->SetStandardFormat( aFmt );
- SfxUndoManager *pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager *pTmpUndoMgr = GetUndoManager();
if (pTmpUndoMgr)
pTmpUndoMgr->AddUndoAction(
new SmFormatAction(this, aOldFormat, aNewFormat));
@@ -1147,31 +1158,38 @@ void SmDocShell::Execute(SfxRequest& rReq)
case SID_UNDO:
case SID_REDO:
{
- SfxUndoManager* pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager* pTmpUndoMgr = GetUndoManager();
if( pTmpUndoMgr )
{
- 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 ))
nCnt = ((SfxUInt16Item*)pItem)->GetValue();
- BOOL (SfxUndoManager:: *fnDo)( USHORT );
+ sal_Bool (::svl::IUndoManager:: *fnDo)();
sal_uInt16 nCount;
if( SID_UNDO == rReq.GetSlot() )
{
nCount = pTmpUndoMgr->GetUndoActionCount();
- fnDo = &SfxUndoManager::Undo;
+ fnDo = &::svl::IUndoManager::Undo;
}
else
{
nCount = pTmpUndoMgr->GetRedoActionCount();
- fnDo = &SfxUndoManager::Redo;
+ fnDo = &::svl::IUndoManager::Redo;
}
- for( ; nCnt && nCount; --nCnt, --nCount )
- (pTmpUndoMgr->*fnDo)( 0 );
+ try
+ {
+ for( ; nCnt && nCount; --nCnt, --nCount )
+ (pTmpUndoMgr->*fnDo)();
+ }
+ catch( const Exception& e )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
Repaint();
UpdateText();
@@ -1199,7 +1217,7 @@ void SmDocShell::GetState(SfxItemSet &rSet)
SfxWhichIter aIter(rSet);
- for (USHORT nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich())
+ for (sal_uInt16 nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich())
{
switch (nWh)
{
@@ -1255,27 +1273,27 @@ void SmDocShell::GetState(SfxItemSet &rSet)
case SID_GETUNDOSTRINGS:
case SID_GETREDOSTRINGS:
{
- SfxUndoManager* pTmpUndoMgr = GetUndoManager();
+ ::svl::IUndoManager* pTmpUndoMgr = GetUndoManager();
if( pTmpUndoMgr )
{
- UniString(SfxUndoManager:: *fnGetComment)( USHORT ) const;
+ UniString(::svl::IUndoManager:: *fnGetComment)( size_t, bool const ) const;
sal_uInt16 nCount;
if( SID_GETUNDOSTRINGS == nWh )
{
nCount = pTmpUndoMgr->GetUndoActionCount();
- fnGetComment = &SfxUndoManager::GetUndoActionComment;
+ fnGetComment = &::svl::IUndoManager::GetUndoActionComment;
}
else
{
nCount = pTmpUndoMgr->GetRedoActionCount();
- fnGetComment = &SfxUndoManager::GetRedoActionComment;
+ fnGetComment = &::svl::IUndoManager::GetRedoActionComment;
}
if( nCount )
{
String sList;
for( sal_uInt16 n = 0; n < nCount; ++n )
- ( sList += (pTmpUndoMgr->*fnGetComment)( n ) )
+ ( sList += (pTmpUndoMgr->*fnGetComment)( n, ::svl::IUndoManager::TopLevel ) )
+= '\n';
SfxStringListItem aItem( nWh );
@@ -1292,7 +1310,7 @@ void SmDocShell::GetState(SfxItemSet &rSet)
}
-SfxUndoManager *SmDocShell::GetUndoManager()
+::svl::IUndoManager *SmDocShell::GetUndoManager()
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::GetUndoManager" );
@@ -1313,7 +1331,7 @@ void SmDocShell::SaveSymbols()
void SmDocShell::Draw(OutputDevice *pDevice,
const JobSetup &,
- USHORT /*nAspect*/)
+ sal_uInt16 /*nAspect*/)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::Draw" );
@@ -1390,13 +1408,13 @@ void SmDocShell::FillClass(SvGlobalName* pClassName,
}
}
-ULONG SmDocShell::GetMiscStatus() const
+sal_uLong SmDocShell::GetMiscStatus() const
{
return SfxObjectShell::GetMiscStatus() | SVOBJ_MISCSTATUS_NOTRESIZEABLE
| SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE;
}
-void SmDocShell::SetModified(BOOL bModified)
+void SmDocShell::SetModified(sal_Bool bModified)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetModified" );
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 5423bb937b0f..bfc0309ebe71 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -82,7 +82,7 @@ using namespace com::sun::star::uno;
void SmGetLeftSelectionPart(const ESelection &rSel,
- USHORT &nPara, USHORT &nPos)
+ sal_uInt16 &nPara, sal_uInt16 &nPos)
// returns paragraph number and position of the selections left part
{
// compare start and end of selection and use the one that comes first
@@ -248,7 +248,7 @@ void SmEditWindow::DataChanged( const DataChangedEvent& )
//! see also SmDocShell::GetEditEngine() !
//!
- pEditEngine->SetDefTab( USHORT( GetTextWidth( C2S("XXXX") ) ) );
+ pEditEngine->SetDefTab( sal_uInt16( GetTextWidth( C2S("XXXX") ) ) );
SetEditEngineDefaultFonts( *pEditEngine, *pEditEngineItemPool );
@@ -289,7 +289,7 @@ IMPL_LINK(SmEditWindow, CursorMoveTimerHdl, Timer *, EMPTYARG /*pTimer*/)
if (pView)
{
// get row and column to look for
- USHORT nRow, nCol;
+ sal_uInt16 nRow, nCol;
SmGetLeftSelectionPart(aNewSelection, nRow, nCol);
nRow++;
nCol++;
@@ -701,7 +701,7 @@ bool SmEditWindow::IsAllSelected() const
if (pEditEngine && pEditView)
{
ESelection eSelection( pEditView->GetSelection() );
- INT32 nParaCnt = pEditEngine->GetParagraphCount();
+ sal_Int32 nParaCnt = pEditEngine->GetParagraphCount();
if (!(nParaCnt - 1))
{
String Text( pEditEngine->GetText( LINEEND_LF ) );
@@ -725,7 +725,7 @@ void SmEditWindow::SelectAll()
}
}
-void SmEditWindow::InsertCommand(USHORT nCommand)
+void SmEditWindow::InsertCommand(sal_uInt16 nCommand)
{
OSL_ENSURE( pEditView, "EditView missing" );
if (pEditView)
@@ -764,7 +764,7 @@ void SmEditWindow::MarkError(const Point &rPos)
if (pEditView)
{
const xub_StrLen nCol = sal::static_int_cast< xub_StrLen >(rPos.X());
- const USHORT nRow = sal::static_int_cast< USHORT >(rPos.Y() - 1);
+ const sal_uInt16 nRow = sal::static_int_cast< sal_uInt16 >(rPos.Y() - 1);
pEditView->SetSelection(ESelection(nRow, nCol - 1, nRow, nCol));
GrabFocus();
@@ -779,10 +779,10 @@ void SmEditWindow::SelNextMark()
if (pEditEngine && pEditView)
{
ESelection eSelection = pEditView->GetSelection();
- USHORT Pos = eSelection.nEndPos;
+ sal_uInt16 Pos = eSelection.nEndPos;
String aMark (C2S("<?>"));
String aText;
- USHORT nCounts = pEditEngine->GetParagraphCount();
+ sal_uInt16 nCounts = pEditEngine->GetParagraphCount();
while (eSelection.nEndPara < nCounts)
{
@@ -809,15 +809,15 @@ void SmEditWindow::SelPrevMark()
if (pEditEngine && pEditView)
{
ESelection eSelection = pEditView->GetSelection();
- USHORT Pos = STRING_NOTFOUND;
+ sal_uInt16 Pos = STRING_NOTFOUND;
xub_StrLen Max = eSelection.nStartPos;
String Text( pEditEngine->GetText( eSelection.nStartPara ) );
String aMark (C2S("<?>"));
- USHORT nCounts = pEditEngine->GetParagraphCount();
+ sal_uInt16 nCounts = pEditEngine->GetParagraphCount();
do
{
- USHORT Fnd = Text.Search(aMark, 0);
+ sal_uInt16 Fnd = Text.Search(aMark, 0);
while ((Fnd < Max) && (Fnd != STRING_NOTFOUND))
{
diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx
index 77d543d61e76..0e612126b00f 100644
--- a/starmath/source/format.cxx
+++ b/starmath/source/format.cxx
@@ -38,7 +38,7 @@
/////////////////////////////////////////////////////////////////
// Latin default-fonts
-static const USHORT aLatinDefFnts[FNT_END] =
+static const sal_uInt16 aLatinDefFnts[FNT_END] =
{
DEFAULTFONT_SERIF, // FNT_VARIABLE
DEFAULTFONT_SERIF, // FNT_FUNCTION
@@ -54,7 +54,7 @@ static const USHORT aLatinDefFnts[FNT_END] =
//! we use non-asian fonts for variables, functions and numbers since they
//! look better and even in asia only latin letters will be used for those.
//! At least that's what I was told...
-static const USHORT aCJKDefFnts[FNT_END] =
+static const sal_uInt16 aCJKDefFnts[FNT_END] =
{
DEFAULTFONT_SERIF, // FNT_VARIABLE
DEFAULTFONT_SERIF, // FNT_FUNCTION
@@ -67,7 +67,7 @@ static const USHORT aCJKDefFnts[FNT_END] =
};
// CTL default-fonts
-static const USHORT aCTLDefFnts[FNT_END] =
+static const sal_uInt16 aCTLDefFnts[FNT_END] =
{
DEFAULTFONT_CTL_TEXT, // FNT_VARIABLE
DEFAULTFONT_CTL_TEXT, // FNT_FUNCTION
@@ -80,7 +80,7 @@ static const USHORT aCTLDefFnts[FNT_END] =
};
-String GetDefaultFontName( LanguageType nLang, USHORT nIdent )
+String GetDefaultFontName( LanguageType nLang, sal_uInt16 nIdent )
{
OSL_ENSURE( /*FNT_BEGIN <= nIdent &&*/ nIdent <= FNT_END,
"index out opd range" );
@@ -89,7 +89,7 @@ String GetDefaultFontName( LanguageType nLang, USHORT nIdent )
return String::CreateFromAscii( FNTNAME_MATH );
else
{
- const USHORT *pTable;
+ const sal_uInt16 *pTable;
switch ( SvtLanguageOptions::GetScriptTypeOfLanguage( nLang ) )
{
case SCRIPTTYPE_LATIN : pTable = aLatinDefFnts; break;
@@ -167,7 +167,7 @@ SmFormat::SmFormat()
vFont[FNT_SANS] .SetItalic(ITALIC_NONE);
vFont[FNT_FIXED] .SetItalic(ITALIC_NONE);
- for ( USHORT i = FNT_BEGIN; i <= FNT_END; i++ )
+ for ( sal_uInt16 i = FNT_BEGIN; i <= FNT_END; i++ )
{
SmFace &rFace = vFont[i];
rFace.SetTransparent( true );
@@ -178,7 +178,7 @@ SmFormat::SmFormat()
}
-void SmFormat::SetFont(USHORT nIdent, const SmFace &rFont, bool bDefault )
+void SmFormat::SetFont(sal_uInt16 nIdent, const SmFace &rFont, bool bDefault )
{
vFont[nIdent] = rFont;
vFont[nIdent].SetTransparent( true );
@@ -196,7 +196,7 @@ SmFormat & SmFormat::operator = (const SmFormat &rFormat)
SetGreekCharStyle(rFormat.GetGreekCharStyle());
SetScaleNormalBrackets(rFormat.IsScaleNormalBrackets());
- USHORT i;
+ sal_uInt16 i;
for (i = FNT_BEGIN; i <= FNT_END; i++)
{
SetFont(i, rFormat.GetFont(i));
@@ -219,7 +219,7 @@ bool SmFormat::operator == (const SmFormat &rFormat) const
bIsTextmode == rFormat.bIsTextmode &&
bScaleNormalBrackets == rFormat.bScaleNormalBrackets;
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i <= SIZ_END && bRes; ++i)
{
if (vSize[i] != rFormat.vSize[i])
diff --git a/starmath/source/makefile.mk b/starmath/source/makefile.mk
index b91691754ac8..520708b5552d 100644..100755
--- a/starmath/source/makefile.mk
+++ b/starmath/source/makefile.mk
@@ -45,10 +45,13 @@ SMDLL=TRUE
SRS2NAME =smres
SRC2FILES = smres.src \
symbol.src \
+ toolbox.src \
commands.src
SLO1FILES = \
$(SLO)$/accessibility.obj \
+ $(SLO)$/caret.obj \
+ $(SLO)$/cursor.obj \
$(SLO)$/edit.obj \
$(SLO)$/eqnolefilehdr.obj \
$(SLO)$/mathmlexport.obj \
@@ -62,21 +65,19 @@ SLO1FILES = \
$(SLO)$/dialog.obj \
$(SLO)$/document.obj \
$(SLO)$/format.obj \
- $(SLO)$/mathtype.obj \
- $(SLO)$/node.obj \
- $(SLO)$/visitors.obj \
- $(SLO)$/caret.obj \
- $(SLO)$/cursor.obj \
- $(SLO)$/parse.obj \
+ $(SLO)$/mathtype.obj \
+ $(SLO)$/node.obj \
+ $(SLO)$/parse.obj \
$(SLO)$/register.obj \
$(SLO)$/smdll.obj \
$(SLO)$/toolbox.obj \
$(SLO)$/typemap.obj \
$(SLO)$/smmod.obj \
- $(SLO)$/utility.obj \
+ $(SLO)$/utility.obj \
$(SLO)$/rect.obj \
$(SLO)$/unomodel.obj \
- $(SLO)$/view.obj
+ $(SLO)$/view.obj \
+ $(SLO)$/visitors.obj
SLO2FILES = \
$(SLO)$/register.obj \
@@ -95,9 +96,6 @@ LIB1OBJFILES = \
# --- Targets -------------------------------------------------------
-LOCALIZE_ME = menu_tmpl.src
-
-
.INCLUDE : target.mk
$(INCCOM)$/dllname.hxx: makefile.mk
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index e38b0eb4bc81..d23fef88c7f0 100644..100755
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -80,6 +80,7 @@
#include <unomodel.hxx>
#include <document.hxx>
#include <utility.hxx>
+#include <config.hxx>
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
@@ -726,6 +727,9 @@ void SmXMLExport::GetConfigurationSettings( Sequence < PropertyValue > & rProps)
PropertyValue* pProps = rProps.getArray();
if (pProps)
{
+ SmConfig *pConfig = SM_MOD()->GetConfig();
+ const bool bUsedSymbolsOnly = pConfig ? pConfig->IsSaveOnlyUsedSymbols() : false;
+
const OUString sFormula ( RTL_CONSTASCII_USTRINGPARAM ( "Formula" ) );
const OUString sBasicLibraries ( RTL_CONSTASCII_USTRINGPARAM ( "BasicLibraries" ) );
const OUString sDialogLibraries ( RTL_CONSTASCII_USTRINGPARAM ( "DialogLibraries" ) );
@@ -739,7 +743,14 @@ void SmXMLExport::GetConfigurationSettings( Sequence < PropertyValue > & rProps)
rPropName != sRuntimeUID)
{
pProps->Name = rPropName;
- pProps->Value = xProps->getPropertyValue(rPropName);
+
+ rtl::OUString aActualName( rPropName );
+
+ // handle 'save used symbols only'
+ if (bUsedSymbolsOnly && rPropName.equalsAscii("Symbols"))
+ aActualName = OUString( RTL_CONSTASCII_USTRINGPARAM ( "UserDefinedSymbolsInUse" ) );
+
+ pProps->Value = xProps->getPropertyValue( aActualName );
}
}
}
@@ -766,12 +777,13 @@ void SmXMLExport::ExportUnaryHorizontal(const SmNode *pNode, int nLevel)
void SmXMLExport::ExportExpression(const SmNode *pNode, int nLevel)
{
SvXMLElementExport *pRow=0;
- ULONG nSize = pNode->GetNumSubNodes();
+ sal_uLong nSize = pNode->GetNumSubNodes();
- if (nSize > 1)
+ // #i115443: nodes of type expression always need to be grouped with mrow statement
+ if (nSize > 1 || (pNode && pNode->GetType() == NEXPRESSION))
pRow = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MROW, sal_True, sal_True);
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (const SmNode *pTemp = pNode->GetSubNode(i))
ExportNodes(pTemp, nLevel+1);
@@ -790,7 +802,7 @@ void SmXMLExport::ExportTable(const SmNode *pNode, int nLevel)
{
SvXMLElementExport *pTable=0;
- USHORT nSize = pNode->GetNumSubNodes();
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
//If the list ends in newline then the last entry has
//no subnodes, the newline is superfulous so we just drop
@@ -804,7 +816,7 @@ void SmXMLExport::ExportTable(const SmNode *pNode, int nLevel)
if (nLevel || (nSize >1))
pTable = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MTABLE, sal_True, sal_True);
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (const SmNode *pTemp = pNode->GetSubNode(i))
{
SvXMLElementExport *pRow=0;
@@ -1370,11 +1382,11 @@ void SmXMLExport::ExportMatrix(const SmNode *pNode, int nLevel)
{
SvXMLElementExport aTable(*this, XML_NAMESPACE_MATH, XML_MTABLE, sal_True, sal_True);
const SmMatrixNode *pMatrix = static_cast<const SmMatrixNode *>(pNode);
- USHORT i=0;
- for (ULONG y = 0; y < pMatrix->GetNumRows(); y++)
+ sal_uInt16 i=0;
+ for (sal_uLong y = 0; y < pMatrix->GetNumRows(); y++)
{
SvXMLElementExport aRow(*this, XML_NAMESPACE_MATH, XML_MTR, sal_True, sal_True);
- for (ULONG x = 0; x < pMatrix->GetNumCols(); x++)
+ for (sal_uLong x = 0; x < pMatrix->GetNumCols(); x++)
if (const SmNode *pTemp = pNode->GetSubNode(i++))
{
SvXMLElementExport aCell(*this, XML_NAMESPACE_MATH, XML_MTD, sal_True, sal_True);
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index b1b99d75817d..e3308e59cc62 100644..100755
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -94,9 +94,9 @@ using ::rtl::OUStringBuffer;
////////////////////////////////////////////////////////////
-ULONG SmXMLImportWrapper::Import(SfxMedium &rMedium)
+sal_uLong SmXMLImportWrapper::Import(SfxMedium &rMedium)
{
- ULONG nError = ERRCODE_SFX_DOLOADFAILED;
+ sal_uLong nError = ERRCODE_SFX_DOLOADFAILED;
uno::Reference<lang::XMultiServiceFactory> xServiceFactory(
utl::getProcessServiceFactory());
@@ -201,7 +201,7 @@ ULONG SmXMLImportWrapper::Import(SfxMedium &rMedium)
if (xStatusIndicator.is())
xStatusIndicator->setValue(nSteps++);
- ULONG nWarn = ReadThroughComponent(
+ sal_uLong nWarn = ReadThroughComponent(
rMedium.GetStorage(), xModelComp, "meta.xml", "Meta.xml",
xServiceFactory, xInfoSet,
(bOASIS ? "com.sun.star.comp.Math.XMLOasisMetaImporter"
@@ -252,7 +252,7 @@ ULONG SmXMLImportWrapper::Import(SfxMedium &rMedium)
/// read a component (file + filter version)
-ULONG SmXMLImportWrapper::ReadThroughComponent(
+sal_uLong SmXMLImportWrapper::ReadThroughComponent(
Reference<io::XInputStream> xInputStream,
Reference<XComponent> xModelComponent,
Reference<lang::XMultiServiceFactory> & rFactory,
@@ -260,7 +260,7 @@ ULONG SmXMLImportWrapper::ReadThroughComponent(
const sal_Char* pFilterName,
sal_Bool bEncrypted )
{
- ULONG nError = ERRCODE_SFX_DOLOADFAILED;
+ sal_uLong nError = ERRCODE_SFX_DOLOADFAILED;
OSL_ENSURE(xInputStream.is(), "input stream missing");
OSL_ENSURE(xModelComponent.is(), "document missing");
OSL_ENSURE(rFactory.is(), "factory missing");
@@ -356,7 +356,7 @@ ULONG SmXMLImportWrapper::ReadThroughComponent(
}
-ULONG SmXMLImportWrapper::ReadThroughComponent(
+sal_uLong SmXMLImportWrapper::ReadThroughComponent(
const uno::Reference< embed::XStorage >& xStorage,
Reference<XComponent> xModelComponent,
const sal_Char* pStreamName,
@@ -845,7 +845,7 @@ public:
class SmXMLRowContext_Impl : public SmXMLDocContext_Impl
{
protected:
- ULONG nElementCount;
+ sal_uLong nElementCount;
public:
SmXMLRowContext_Impl(SmXMLImport &rImport,sal_uInt16 nPrefix,
@@ -1069,7 +1069,7 @@ void SmXMLFencedContext_Impl::EndElement()
aToken.aText = ',';
aToken.eType = TIDENT;
- ULONG i = rNodeStack.Count() - nElementCount;
+ sal_uLong i = rNodeStack.Count() - nElementCount;
if (rNodeStack.Count() - nElementCount > 1)
i += rNodeStack.Count() - 1 - nElementCount;
aRelationArray.resize(i);
@@ -1461,8 +1461,11 @@ public:
void SmXMLSubContext_Impl::GenericEndElement(SmTokenType eType, SmSubSup eSubSup)
{
/*The <msub> element requires exactly 2 arguments.*/
- OSL_ENSURE(GetSmImport().GetNodeStack().Count() - nElementCount == 2,
- "Sub has not two arguments");
+ const bool bNodeCheck = GetSmImport().GetNodeStack().Count() - nElementCount == 2;
+ OSL_ENSURE( bNodeCheck, "Sub has not two arguments" );
+ if (!bNodeCheck)
+ return;
+
SmToken aToken;
aToken.cMathChar = '\0';
aToken.nGroup = 0;
@@ -1474,7 +1477,7 @@ void SmXMLSubContext_Impl::GenericEndElement(SmTokenType eType, SmSubSup eSubSup
// initialize subnodes array
SmNodeArray aSubNodes;
aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- for (ULONG i = 1; i < aSubNodes.size(); i++)
+ for (sal_uLong i = 1; i < aSubNodes.size(); i++)
aSubNodes[i] = NULL;
aSubNodes[eSubSup+1] = rNodeStack.Pop();
@@ -1520,8 +1523,10 @@ void SmXMLSubSupContext_Impl::GenericEndElement(SmTokenType eType,
SmSubSup aSub,SmSubSup aSup)
{
/*The <msub> element requires exactly 3 arguments.*/
- OSL_ENSURE(GetSmImport().GetNodeStack().Count() - nElementCount == 3,
- "SubSup has not three arguments");
+ const bool bNodeCheck = GetSmImport().GetNodeStack().Count() - nElementCount == 3;
+ OSL_ENSURE( bNodeCheck, "SubSup has not three arguments" );
+ if (!bNodeCheck)
+ return;
SmToken aToken;
aToken.cMathChar = '\0';
@@ -1534,7 +1539,7 @@ void SmXMLSubSupContext_Impl::GenericEndElement(SmTokenType eType,
// initialize subnodes array
SmNodeArray aSubNodes;
aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- for (ULONG i = 1; i < aSubNodes.size(); i++)
+ for (sal_uLong i = 1; i < aSubNodes.size(); i++)
aSubNodes[i] = NULL;
aSubNodes[aSup+1] = rNodeStack.Pop();
@@ -1569,8 +1574,10 @@ void SmXMLUnderContext_Impl::StartElement(const uno::Reference<
void SmXMLUnderContext_Impl::HandleAccent()
{
- OSL_ENSURE(GetSmImport().GetNodeStack().Count() - nElementCount == 2,
- "Sub has not two arguments");
+ const bool bNodeCheck = GetSmImport().GetNodeStack().Count() - nElementCount == 2;
+ OSL_ENSURE( bNodeCheck, "Sub has not two arguments" );
+ if (!bNodeCheck)
+ return;
/*Just one special case for the underline thing*/
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
@@ -1645,8 +1652,11 @@ void SmXMLOverContext_Impl::EndElement()
void SmXMLOverContext_Impl::HandleAccent()
{
- OSL_ENSURE(GetSmImport().GetNodeStack().Count() - nElementCount == 2,
- "Sub has not two arguments");
+ const bool bNodeCheck = GetSmImport().GetNodeStack().Count() - nElementCount == 2;
+ OSL_ENSURE (bNodeCheck, "Sub has not two arguments");
+ if (!bNodeCheck)
+ return;
+
SmToken aToken;
aToken.cMathChar = '\0';
aToken.nGroup = 0;
@@ -1853,17 +1863,17 @@ class SmXMLFlatDocContext_Impl
{
public:
SmXMLFlatDocContext_Impl( SmXMLImport& i_rImport,
- USHORT i_nPrefix, const OUString & i_rLName,
+ sal_uInt16 i_nPrefix, const OUString & i_rLName,
const uno::Reference<document::XDocumentProperties>& i_xDocProps,
const uno::Reference<xml::sax::XDocumentHandler>& i_xDocBuilder);
virtual ~SmXMLFlatDocContext_Impl();
- virtual SvXMLImportContext *CreateChildContext(USHORT i_nPrefix, const OUString& i_rLocalName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList);
+ virtual SvXMLImportContext *CreateChildContext(sal_uInt16 i_nPrefix, const OUString& i_rLocalName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList);
};
SmXMLFlatDocContext_Impl::SmXMLFlatDocContext_Impl( SmXMLImport& i_rImport,
- USHORT i_nPrefix, const OUString & i_rLName,
+ sal_uInt16 i_nPrefix, const OUString & i_rLName,
const uno::Reference<document::XDocumentProperties>& i_xDocProps,
const uno::Reference<xml::sax::XDocumentHandler>& i_xDocBuilder) :
SvXMLImportContext(i_rImport, i_nPrefix, i_rLName),
@@ -1878,7 +1888,7 @@ SmXMLFlatDocContext_Impl::~SmXMLFlatDocContext_Impl()
}
SvXMLImportContext *SmXMLFlatDocContext_Impl::CreateChildContext(
- USHORT i_nPrefix, const OUString& i_rLocalName,
+ sal_uInt16 i_nPrefix, const OUString& i_rLocalName,
const uno::Reference<xml::sax::XAttributeList>& i_xAttrList)
{
// behave like meta base class iff we encounter office:meta
@@ -2172,7 +2182,7 @@ void SmXMLDocContext_Impl::EndElement()
ContextArray.resize(1);
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- for (ULONG i=0;i< 1;i++)
+ for (sal_uLong i=0;i< 1;i++)
ContextArray[i] = rNodeStack.Pop();
SmToken aDummy;
@@ -2181,9 +2191,9 @@ void SmXMLDocContext_Impl::EndElement()
rNodeStack.Push(pSNode);
SmNodeArray LineArray;
- ULONG n = rNodeStack.Count();
+ sal_uLong n = rNodeStack.Count();
LineArray.resize(n);
- for (ULONG j = 0; j < n; j++)
+ for (sal_uLong j = 0; j < n; j++)
LineArray[n - (j + 1)] = rNodeStack.Pop();
SmStructureNode *pSNode2 = new SmTableNode(aDummy);
pSNode2->SetSubNodes(LineArray);
@@ -2192,6 +2202,12 @@ void SmXMLDocContext_Impl::EndElement()
void SmXMLFracContext_Impl::EndElement()
{
+ SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
+ const bool bNodeCheck = rNodeStack.Count() - nElementCount == 2;
+ OSL_ENSURE( bNodeCheck, "Fraction (mfrac) tag is missing component" );
+ if (!bNodeCheck)
+ return;
+
SmToken aToken;
aToken.cMathChar = '\0';
aToken.nGroup = 0;
@@ -2199,23 +2215,19 @@ void SmXMLFracContext_Impl::EndElement()
aToken.eType = TOVER;
SmStructureNode *pSNode = new SmBinVerNode(aToken);
SmNode *pOper = new SmRectangleNode(aToken);
- SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- OSL_ENSURE(rNodeStack.Count() - nElementCount == 2,
- "Fraction (mfrac) tag is missing component");
- if (rNodeStack.Count() - nElementCount == 2)
- {
- SmNode *pSecond = rNodeStack.Pop();
- SmNode *pFirst = rNodeStack.Pop();
- pSNode->SetSubNodes(pFirst,pOper,pSecond);
- rNodeStack.Push(pSNode);
- }
+ SmNode *pSecond = rNodeStack.Pop();
+ SmNode *pFirst = rNodeStack.Pop();
+ pSNode->SetSubNodes(pFirst,pOper,pSecond);
+ rNodeStack.Push(pSNode);
}
void SmXMLRootContext_Impl::EndElement()
{
/*The <mroot> element requires exactly 2 arguments.*/
- OSL_ENSURE(GetSmImport().GetNodeStack().Count() - nElementCount == 2,
- "Root tag is missing component");
+ const bool bNodeCheck = GetSmImport().GetNodeStack().Count() - nElementCount == 2;
+ OSL_ENSURE( bNodeCheck, "Root tag is missing component");
+ if (!bNodeCheck)
+ return;
SmToken aToken;
aToken.cMathChar = MS_SQRT; //Temporary: alert, based on StarSymbol font
@@ -2257,12 +2269,12 @@ void SmXMLRowContext_Impl::EndElement()
{
SmNodeArray aRelationArray;
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- ULONG nSize = rNodeStack.Count()-nElementCount;
+ sal_uLong nSize = rNodeStack.Count()-nElementCount;
if (nSize > 0)
{
aRelationArray.resize(nSize);
- for (ULONG j=rNodeStack.Count()-nElementCount;j > 0;j--)
+ for (sal_uLong j=rNodeStack.Count()-nElementCount;j > 0;j--)
aRelationArray[j-1] = rNodeStack.Pop();
@@ -2452,8 +2464,9 @@ void SmXMLMultiScriptsContext_Impl::MiddleElement()
{
bHasPrescripts=true;
- OSL_ENSURE(GetSmImport().GetNodeStack().Count() - nElementCount > 0,
- "Sub has no arguments");
+ OSL_ENSURE( GetSmImport().GetNodeStack().Count() - nElementCount > 0,
+ "Sub has no arguments");
+
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
if (rNodeStack.Count()-nElementCount > 1)
{
@@ -2462,7 +2475,7 @@ void SmXMLMultiScriptsContext_Impl::MiddleElement()
aToken.nGroup = 0;
aToken.nLevel = 0;
aToken.eType = TRSUB;
- ULONG nFinalCount = rNodeStack.Count()-nElementCount-1;
+ sal_uLong nFinalCount = rNodeStack.Count()-nElementCount-1;
SmNodeStack aReverseStack;
while (rNodeStack.Count()-nElementCount)
@@ -2471,14 +2484,14 @@ void SmXMLMultiScriptsContext_Impl::MiddleElement()
aReverseStack.Push(pThing);
}
- for (ULONG nCount=0;nCount < nFinalCount;nCount+=2)
+ for (sal_uLong nCount=0;nCount < nFinalCount;nCount+=2)
{
SmSubSupNode *pNode = new SmSubSupNode(aToken);
// initialize subnodes array
SmNodeArray aSubNodes;
aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- for (ULONG i = 1; i < aSubNodes.size(); i++)
+ for (sal_uLong i = 1; i < aSubNodes.size(); i++)
aSubNodes[i] = NULL;
/*On each loop the base and its sub sup pair becomes the
@@ -2511,11 +2524,11 @@ void SmXMLTableContext_Impl::EndElement()
SmNodeStack aReverseStack;
aExpressionArray.resize(rNodeStack.Count()-nElementCount);
- ULONG nRows = rNodeStack.Count()-nElementCount;
- USHORT nCols = 0;
+ sal_uLong nRows = rNodeStack.Count()-nElementCount;
+ sal_uInt16 nCols = 0;
SmStructureNode *pArray;
- for (ULONG i=rNodeStack.Count()-nElementCount;i > 0;i--)
+ for (sal_uLong i=rNodeStack.Count()-nElementCount;i > 0;i--)
{
pArray = (SmStructureNode *)rNodeStack.Pop();
if (pArray->GetNumSubNodes() == 0)
@@ -2541,11 +2554,11 @@ void SmXMLTableContext_Impl::EndElement()
aReverseStack.Push(pArray);
}
aExpressionArray.resize(nCols*nRows);
- ULONG j=0;
+ sal_uLong j=0;
while (aReverseStack.Count())
{
pArray = (SmStructureNode *)aReverseStack.Pop();
- for (USHORT i=0;i<pArray->GetNumSubNodes();i++)
+ for (sal_uInt16 i=0;i<pArray->GetNumSubNodes();i++)
aExpressionArray[j++] = pArray->GetSubNode(i);
}
@@ -2556,7 +2569,7 @@ void SmXMLTableContext_Impl::EndElement()
aToken.eType = TMATRIX;
SmMatrixNode *pSNode = new SmMatrixNode(aToken);
pSNode->SetSubNodes(aExpressionArray);
- pSNode->SetRowCol(static_cast<USHORT>(nRows),nCols);
+ pSNode->SetRowCol(static_cast<sal_uInt16>(nRows),nCols);
rNodeStack.Push(pSNode);
}
@@ -2619,19 +2632,19 @@ void SmXMLMultiScriptsContext_Impl::EndElement()
aToken.nGroup = 0;
aToken.nLevel = 0;
aToken.eType = TLSUB;
- ULONG nFinalCount = rNodeStack.Count()-nElementCount-1;
+ sal_uLong nFinalCount = rNodeStack.Count()-nElementCount-1;
SmNodeStack aReverseStack;
while (rNodeStack.Count()-nElementCount)
aReverseStack.Push(rNodeStack.Pop());
- for (ULONG nCount=0;nCount < nFinalCount;nCount+=2)
+ for (sal_uLong nCount=0;nCount < nFinalCount;nCount+=2)
{
SmSubSupNode *pNode = new SmSubSupNode(aToken);
// initialize subnodes array
SmNodeArray aSubNodes;
aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- for (ULONG i = 1; i < aSubNodes.size(); i++)
+ for (sal_uLong i = 1; i < aSubNodes.size(); i++)
aSubNodes[i] = NULL;
/*On each loop the base and its sub sup pair becomes the
@@ -2661,7 +2674,7 @@ void SmXMLActionContext_Impl::EndElement()
first pushed one*/
SmNodeStack &rNodeStack = GetSmImport().GetNodeStack();
- for (ULONG i=rNodeStack.Count()-nElementCount;i > 1;i--)
+ for (sal_uLong i=rNodeStack.Count()-nElementCount;i > 1;i--)
{
delete rNodeStack.Pop();
}
@@ -3005,7 +3018,12 @@ void SmXMLImport::SetConfigurationSettings(const Sequence<PropertyValue>& aConfP
if ( xInfo->hasPropertyByName( pValues->Name ) )
xProps->setPropertyValue( pValues->Name, pValues->Value );
}
- catch( Exception& )
+ catch (beans::PropertyVetoException &e)
+ {
+ (void) e;
+ // dealing with read-only properties here. Nothing to do...
+ }
+ catch( Exception& e)
{
OSL_FAIL( "SmXMLImport::SetConfigurationSettings: Exception!" );
}
diff --git a/starmath/source/mathmlimport.hxx b/starmath/source/mathmlimport.hxx
index 41824f0ee6af..db44e4a336ea 100644..100755
--- a/starmath/source/mathmlimport.hxx
+++ b/starmath/source/mathmlimport.hxx
@@ -55,9 +55,9 @@ public:
SmXMLImportWrapper(com::sun::star::uno::Reference<com::sun::star::frame::XModel> &rRef)
: xModel(rRef) {}
- ULONG Import(SfxMedium &rMedium);
+ sal_uLong Import(SfxMedium &rMedium);
- ULONG ReadThroughComponent(
+ sal_uLong ReadThroughComponent(
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > xInputStream,
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xModelComponent,
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rFactory,
@@ -66,7 +66,7 @@ public:
const sal_Char* pFilterName,
sal_Bool bEncrypted );
- ULONG ReadThroughComponent(
+ sal_uLong ReadThroughComponent(
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xModelComponent,
const sal_Char* pStreamName,
@@ -251,10 +251,10 @@ public:
const SvXMLTokenMap &GetPresTableElemTokenMap();
const SvXMLTokenMap &GetColorTokenMap();
- SmNodeStack & GetNodeStack() {return aNodeStack;}
- SmNode *GetTree() { return aNodeStack.Pop();}
- sal_Bool GetSuccess() { return bSuccess; }
- String &GetText() { return aText;}
+ SmNodeStack & GetNodeStack() { return aNodeStack; }
+ SmNode *GetTree() { return aNodeStack.Pop(); }
+ sal_Bool GetSuccess() { return bSuccess; }
+ String &GetText() { return aText; }
virtual void SetViewSettings(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aViewProps);
virtual void SetConfigurationSettings(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aViewProps);
diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx
index 82ba98f72c33..c30f95e369db 100644
--- a/starmath/source/mathtype.cxx
+++ b/starmath/source/mathtype.cxx
@@ -107,8 +107,8 @@ void MathType::Init()
/*ToDo replace with table rather than switch, returns
- TRUE in the case that the char is just a char, and
- FALSE if the character is an operator which must not be
+ sal_True in the case that the char is just a char, and
+ sal_False if the character is an operator which must not be
placed inside the quote sequence designed to protect
against being parsed as a keyword
@@ -615,7 +615,7 @@ int MathType::Parse(SotStorage *pStor)
//sigh, theres no point! MathType (in some bizarre subvarient) pads
//the end of the formula with ENDs (0)'s
- ULONG nEnd = pS->Tell();
+ sal_uLong nEnd = pS->Tell();
OSL_ENSURE(nEnd == pS->Seek(STREAM_SEEK_TO_END),
"Possibly unfully parsed formula");
# endif
@@ -2026,8 +2026,8 @@ sal_uInt8 MathType::HandleNodes(SmNode *pNode,int nLevel)
break;
case NEXPRESSION:
{
- USHORT nSize = pNode->GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
HandleNodes(pTemp,nLevel+1);
}
@@ -2043,8 +2043,8 @@ sal_uInt8 MathType::HandleNodes(SmNode *pNode,int nLevel)
{
*pS << sal_uInt8(0x0a);
*pS << sal_uInt8(LINE);
- USHORT nSize = pNode->GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
HandleNodes(pTemp,nLevel+1);
*pS << sal_uInt8(END);
@@ -2063,8 +2063,8 @@ sal_uInt8 MathType::HandleNodes(SmNode *pNode,int nLevel)
break;
default:
{
- USHORT nSize = pNode->GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
HandleNodes(pTemp,nLevel+1);
}
@@ -2110,15 +2110,15 @@ void MathType::HandleSmMatrix(SmMatrixNode *pMatrix,int nLevel)
int nBytes=(pMatrix->GetNumRows()+1)*2/8;
if (((pMatrix->GetNumRows()+1)*2)%8)
nBytes++;
- for (USHORT j = 0; j < nBytes; j++)
+ for (sal_uInt16 j = 0; j < nBytes; j++)
*pS << sal_uInt8(0x00); //row_parts
nBytes=(pMatrix->GetNumCols()+1)*2/8;
if (((pMatrix->GetNumCols()+1)*2)%8)
nBytes++;
- for (USHORT k = 0; k < nBytes; k++)
+ for (sal_uInt16 k = 0; k < nBytes; k++)
*pS << sal_uInt8(0x00); //col_parts
- USHORT nSize = pMatrix->GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = pMatrix->GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pMatrix->GetSubNode(i))
{
*pS << sal_uInt8(LINE); //line
@@ -2132,7 +2132,7 @@ void MathType::HandleSmMatrix(SmMatrixNode *pMatrix,int nLevel)
//Root Node, PILE equivalent, i.e. vertical stack
void MathType::HandleTable(SmNode *pNode,int nLevel)
{
- USHORT nSize = pNode->GetNumSubNodes();
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
//The root of the starmath is a table, if
//we convert this them each iteration of
//conversion from starmath to mathtype will
@@ -2150,7 +2150,7 @@ void MathType::HandleTable(SmNode *pNode,int nLevel)
*pS << sal_uInt8(0x01); //hAlign
}
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
{
*pS << sal_uInt8(LINE);
@@ -2195,7 +2195,7 @@ void MathType::HandleRoot(SmNode *pNode,int nLevel)
}
sal_uInt8 MathType::HandleCScript(SmNode *pNode,SmNode *pContent,int nLevel,
- ULONG *pPos,sal_Bool bTest)
+ sal_uLong *pPos,sal_Bool bTest)
{
sal_uInt8 nVariation2=0xff;
@@ -2385,7 +2385,7 @@ void MathType::HandleBrace(SmNode *pNode,int nLevel)
*pS << sal_uInt8(TMPL); //Template
bIsReInterpBrace=0;
sal_uInt8 nBSpec=0x10;
- ULONG nLoc = pS->Tell();
+ sal_uLong nLoc = pS->Tell();
if (pLeft)
{
switch (pLeft->GetToken().eType)
@@ -2443,7 +2443,7 @@ void MathType::HandleBrace(SmNode *pNode,int nLevel)
HandleNodes(pLeft,nLevel+1);
if (bIsReInterpBrace)
{
- ULONG nLoc2 = pS->Tell();
+ sal_uLong nLoc2 = pS->Tell();
pS->Seek(nLoc);
*pS << sal_uInt8(0x2D);
pS->Seek(nLoc2);
@@ -2491,7 +2491,7 @@ void MathType::HandleOperator(SmNode *pNode,int nLevel)
if (HandleLim(pNode,nLevel))
return;
- ULONG nPos;
+ sal_uLong nPos;
sal_uInt8 nVariation;
switch (pNode->GetToken().eType)
@@ -2513,7 +2513,7 @@ void MathType::HandleOperator(SmNode *pNode,int nLevel)
sal_uInt8 nOldVariation=nVariation;
sal_uInt8 nIntVariation=nVariation;
- ULONG nPos2=0;
+ sal_uLong nPos2=0;
if (nVariation != 0xff)
{
nPos2 = pS->Tell();
@@ -3078,8 +3078,8 @@ void MathType::HandleMAlign(SmNode *pNode,int nLevel)
nHAlign=1;
break;
}
- USHORT nSize = pNode->GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = pNode->GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (SmNode *pTemp = pNode->GetSubNode(i))
HandleNodes(pTemp,nLevel+1);
nHAlign=nPushedHAlign;
@@ -3261,7 +3261,7 @@ void MathType::HandleAttributes(SmNode *pNode,int nLevel)
{
if ((nInsertion != 0) && NULL != (pTemp = pNode->GetSubNode(0)))
{
- ULONG nPos = pS->Tell();
+ sal_uLong nPos = pS->Tell();
nInsertion--;
pS->Seek(nInsertion);
switch(pTemp->GetToken().eType)
diff --git a/starmath/source/mathtype.hxx b/starmath/source/mathtype.hxx
index 3dbcdc6c5c2b..cfacad560290 100644
--- a/starmath/source/mathtype.hxx
+++ b/starmath/source/mathtype.hxx
@@ -123,7 +123,7 @@ private:
void HandleRoot(SmNode *pNode,int nLevel);
void HandleSubSupScript(SmNode *pNode,int nLevel);
sal_uInt8 HandleCScript(SmNode *pNode,SmNode *pContent,int nLevel,
- ULONG *pPos=NULL,sal_Bool bTest=TRUE);
+ sal_uLong *pPos=NULL,sal_Bool bTest=sal_True);
void HandleFractions(SmNode *pNode,int nLevel);
void HandleBrace(SmNode *pNode,int nLevel);
void HandleVerticalBrace(SmNode *pNode,int nLevel);
@@ -142,7 +142,7 @@ private:
sal_uInt8 nVAlign;
int nPendingAttributes;
- ULONG nInsertion;
+ sal_uLong nInsertion;
sal_Int16 aSizeTable[7];
sal_Int16 nDefaultSize;
diff --git a/starmath/source/menu_tmpl.src b/starmath/source/menu_tmpl.src
deleted file mode 100644
index c6eeeb60b7cd..000000000000
--- a/starmath/source/menu_tmpl.src
+++ /dev/null
@@ -1,160 +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 _SFX_HRC //autogen
-#include <sfx2/sfx.hrc>
-#endif
-#ifndef _GLOBLMN_HRC //autogen
-#include <svx/globlmn.hrc>
-#endif
-#ifndef _GLOBALACC_SRC //autogen
-#include <svx/globlac.hrc>
-#endif
-#ifndef _SVX_SVXIDS_HRC //autogen
-#include <svx/svxids.hrc>
-#endif
-
-#ifndef _STARMATH_HRC
-#include "starmath.hrc"
-#endif
-
-#ifndef MN_HELP
-#define MN_HELP
-#endif
-
-/////////////////////////////////////////////////////////////////
-
-/*
-
-The application menu bar resource has become obsolete. You can now find the menu bar definition at:
-<project>/smath/menubar/menubar.xml.
-
-*/
-
-/////////////////////////////////////////////////////////////////
-
-Accelerator RID_SMACCEL
-{
- ItemList =
- {
- AI_UNDO
- AI_REDO
- AcceleratorItem
- {
- Identifier = SID_SELECT ;
- Key = KeyCode
- {
- Code = KEY_A ;
- Modifier1 = TRUE ;
- };
- };
- AcceleratorItem
- {
- Identifier = SID_NEXTMARK ;
- Key = KeyCode
- {
- Code = KEY_F4 ;
- };
- };
- AcceleratorItem
- {
- Identifier = SID_PREVMARK ;
- Key = KeyCode
- {
- Code = KEY_F4 ;
- Shift = TRUE ;
- };
- };
- AcceleratorItem
- {
- Identifier = SID_NEXTERR ;
- Key = KeyCode
- {
- Code = KEY_F3 ;
- };
- };
- AcceleratorItem
- {
- Identifier = SID_PREVERR ;
- Key = KeyCode
- {
- Code = KEY_F3 ;
- Shift = TRUE ;
- };
- };
- AcceleratorItem
- {
- Identifier = SID_DRAW ;
- Key = KeyCode
- {
- Code = KEY_F9 ;
- };
- };
- };
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 2affb7012372..07dfa8e26e40 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -50,8 +50,13 @@
#include <math.h>
#include <float.h>
+
#define APPEND(str,ascii) str.AppendAscii(RTL_CONSTASCII_STRINGPARAM(ascii))
+
+using ::rtl::OUString;
+
+
////////////////////////////////////////
// SmTmpDevice
// Allows for font and color changes. The original settings will be restored
@@ -157,13 +162,13 @@ bool SmNode::IsVisible() const
}
-USHORT SmNode::GetNumSubNodes() const
+sal_uInt16 SmNode::GetNumSubNodes() const
{
return 0;
}
-SmNode * SmNode::GetSubNode(USHORT /*nIndex*/)
+SmNode * SmNode::GetSubNode(sal_uInt16 /*nIndex*/)
{
return NULL;
}
@@ -187,8 +192,8 @@ void SmNode::SetPhantom(bool bIsPhantomP)
bIsPhantom = bIsPhantomP;
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetPhantom(bIsPhantom);
}
@@ -200,14 +205,14 @@ void SmNode::SetColor(const Color& rColor)
GetFont().SetColor(rColor);
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetColor(rColor);
}
-void SmNode::SetAttribut(USHORT nAttrib)
+void SmNode::SetAttribut(sal_uInt16 nAttrib)
{
if (
(nAttrib == ATTR_BOLD && !(Flags() & FLG_BOLD)) ||
@@ -218,14 +223,14 @@ void SmNode::SetAttribut(USHORT nAttrib)
}
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetAttribut(nAttrib);
}
-void SmNode::ClearAttribut(USHORT nAttrib)
+void SmNode::ClearAttribut(sal_uInt16 nAttrib)
{
if (
(nAttrib == ATTR_BOLD && !(Flags() & FLG_BOLD)) ||
@@ -236,8 +241,8 @@ void SmNode::ClearAttribut(USHORT nAttrib)
}
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->ClearAttribut(nAttrib);
}
@@ -249,14 +254,14 @@ void SmNode::SetFont(const SmFace &rFace)
GetFont() = rFace;
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetFont(rFace);
}
-void SmNode::SetFontSize(const Fraction &rSize, USHORT nType)
+void SmNode::SetFontSize(const Fraction &rSize, sal_uInt16 nType)
//! 'rSize' is in units of pts
{
Size aFntSize;
@@ -304,8 +309,8 @@ void SmNode::SetFontSize(const Fraction &rSize, USHORT nType)
}
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetFontSize(rSize, nType);
}
@@ -316,8 +321,8 @@ void SmNode::SetSize(const Fraction &rSize)
GetFont() *= rSize;
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetSize(rSize);
}
@@ -331,8 +336,8 @@ void SmNode::SetRectHorAlign(RectHorAlign eHorAlign, bool bApplyToSubTree )
if (bApplyToSubTree)
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->SetRectHorAlign(eHorAlign);
}
@@ -370,8 +375,8 @@ void SmNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
GetFont().SetItalic(ITALIC_NONE);
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->Prepare(rFormat, rDocShell);
}
@@ -386,8 +391,8 @@ void SmNode::ToggleDebug() const
pThis->bIsDebug = bIsDebug ? false : true;
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = pThis->GetSubNode(i)))
pNode->ToggleDebug();
}
@@ -402,8 +407,8 @@ void SmNode::Move(const Point& rPosition)
SmRect::Move(rPosition);
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->Move(rPosition);
}
@@ -412,8 +417,8 @@ void SmNode::Move(const Point& rPosition)
void SmNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- for (USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->Arrange(rDev, rFormat);
}
@@ -421,10 +426,10 @@ void SmNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
void SmNode::CreateTextFromNode(String &rText)
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
+ sal_uInt16 nSize = GetNumSubNodes();
if (nSize > 1)
rText.Append('{');
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->CreateTextFromNode(rText);
if (nSize > 1)
@@ -435,17 +440,17 @@ void SmNode::CreateTextFromNode(String &rText)
}
-void SmNode::AdaptToX(const OutputDevice &/*rDev*/, ULONG /*nWidth*/)
+void SmNode::AdaptToX(const OutputDevice &/*rDev*/, sal_uLong /*nWidth*/)
{
}
-void SmNode::AdaptToY(const OutputDevice &/*rDev*/, ULONG /*nHeight*/)
+void SmNode::AdaptToY(const OutputDevice &/*rDev*/, sal_uLong /*nHeight*/)
{
}
-const SmNode * SmNode::FindTokenAt(USHORT nRow, USHORT nCol) const
+const SmNode * SmNode::FindTokenAt(sal_uInt16 nRow, sal_uInt16 nCol) const
// returns (first) ** visible ** (sub)node with the tokens text at
// position 'nRow', 'nCol'.
//! (there should be exactly one such node if any)
@@ -456,8 +461,8 @@ const SmNode * SmNode::FindTokenAt(USHORT nRow, USHORT nCol) const
return this;
else
{
- USHORT nNumSubNodes = GetNumSubNodes();
- for (USHORT i = 0; i < nNumSubNodes; i++)
+ sal_uInt16 nNumSubNodes = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nNumSubNodes; i++)
{ const SmNode *pNode = GetSubNode(i);
if (!pNode)
@@ -482,8 +487,8 @@ const SmNode * SmNode::FindRectClosestTo(const Point &rPoint) const
pResult = this;
else
{
- USHORT nNumSubNodes = GetNumSubNodes();
- for (USHORT i = 0; i < nNumSubNodes; i++)
+ sal_uInt16 nNumSubNodes = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nNumSubNodes; i++)
{ const SmNode *pNode = GetSubNode(i);
if (!pNode)
@@ -529,8 +534,8 @@ const SmNode * SmNode::FindNodeWithAccessibleIndex(xub_StrLen nAccIdx) const
pResult = this;
else
{
- USHORT nNumSubNodes = GetNumSubNodes();
- for (USHORT i = 0; i < nNumSubNodes; i++)
+ sal_uInt16 nNumSubNodes = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nNumSubNodes; i++)
{
const SmNode *pNode = GetSubNode(i);
if (!pNode)
@@ -639,17 +644,23 @@ void SmNode::DumpAsDot(std::ostream &out, String* label, int number, int& id, in
}
#endif /* DEBUG_ENABLE_DUMPASDOT */
+long SmNode::GetFormulaBaseline() const
+{
+ DBG_ASSERT( 0, "This dummy implementation should not have been called." );
+ return 0;
+}
+
///////////////////////////////////////////////////////////////////////////
SmStructureNode::SmStructureNode( const SmStructureNode &rNode ) :
SmNode( rNode.GetType(), rNode.GetToken() )
{
- ULONG i;
+ sal_uLong i;
for (i = 0; i < aSubNodes.size(); i++)
delete aSubNodes[i];
aSubNodes.resize(0);
- ULONG nSize = rNode.aSubNodes.size();
+ sal_uLong nSize = rNode.aSubNodes.size();
aSubNodes.resize( nSize );
for (i = 0; i < nSize; ++i)
{
@@ -664,7 +675,7 @@ SmStructureNode::~SmStructureNode()
{
SmNode *pNode;
- for (USHORT i = 0; i < GetNumSubNodes(); i++)
+ for (sal_uInt16 i = 0; i < GetNumSubNodes(); i++)
if (NULL != (pNode = GetSubNode(i)))
delete pNode;
}
@@ -674,12 +685,12 @@ SmStructureNode & SmStructureNode::operator = ( const SmStructureNode &rNode )
{
SmNode::operator = ( rNode );
- ULONG i;
+ sal_uLong i;
for (i = 0; i < aSubNodes.size(); i++)
delete aSubNodes[i];
aSubNodes.resize(0);
- ULONG nSize = rNode.aSubNodes.size();
+ sal_uLong nSize = rNode.aSubNodes.size();
aSubNodes.resize( nSize );
for (i = 0; i < nSize; ++i)
{
@@ -721,13 +732,13 @@ bool SmStructureNode::IsVisible() const
}
-USHORT SmStructureNode::GetNumSubNodes() const
+sal_uInt16 SmStructureNode::GetNumSubNodes() const
{
- return (USHORT) aSubNodes.size();
+ return (sal_uInt16) aSubNodes.size();
}
-SmNode * SmStructureNode::GetSubNode(USHORT nIndex)
+SmNode * SmStructureNode::GetSubNode(sal_uInt16 nIndex)
{
return aSubNodes[nIndex];
}
@@ -735,8 +746,8 @@ SmNode * SmStructureNode::GetSubNode(USHORT nIndex)
void SmStructureNode::GetAccessibleText( String &rText ) const
{
- USHORT nNodes = GetNumSubNodes();
- for (USHORT i = 0; i < nNodes; ++i)
+ sal_uInt16 nNodes = GetNumSubNodes();
+ for (sal_uInt16 i = 0; i < nNodes; ++i)
{
const SmNode *pNode = ((SmStructureNode *) this)->GetSubNode(i);
if (pNode)
@@ -757,13 +768,13 @@ bool SmVisibleNode::IsVisible() const
}
-USHORT SmVisibleNode::GetNumSubNodes() const
+sal_uInt16 SmVisibleNode::GetNumSubNodes() const
{
return 0;
}
-SmNode * SmVisibleNode::GetSubNode(USHORT /*nIndex*/)
+SmNode * SmVisibleNode::GetSubNode(sal_uInt16 /*nIndex*/)
{
return NULL;
}
@@ -782,10 +793,10 @@ void SmGraphicNode::GetAccessibleText( String &rText ) const
void SmExpressionNode::CreateTextFromNode(String &rText)
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
+ sal_uInt16 nSize = GetNumSubNodes();
if (nSize > 1)
rText.Append('{');
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
{
pNode->CreateTextFromNode(rText);
@@ -812,7 +823,7 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
Point rPosition;
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
+ sal_uInt16 nSize = GetNumSubNodes();
// make distance depend on font size
long nDist = +(rFormat.GetDistance(DIS_VERTICAL)
@@ -824,7 +835,7 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
// arrange subnodes and get maximum width of them
long nMaxWidth = 0,
nTmp;
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
{ pNode->Arrange(rDev, rFormat);
@@ -833,7 +844,7 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
}
Point aPos;
- SmRect::operator = (SmRect(nMaxWidth, 0));
+ SmRect::operator = (SmRect(nMaxWidth, 1));
for (i = 0; i < nSize; i++)
{ if (NULL != (pNode = GetSubNode(i)))
{ const SmRect &rNodeRect = pNode->GetRect();
@@ -848,6 +859,22 @@ void SmTableNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
ExtendBy(rNodeRect, nSize > 1 ? RCP_NONE : RCP_ARG);
}
}
+ // --> 4.7.2010 #i972#
+ if (HasBaseline())
+ nFormulaBaseline = GetBaseline();
+ else
+ {
+ SmTmpDevice aTmpDev ((OutputDevice &) rDev, sal_True);
+ aTmpDev.SetFont(GetFont());
+
+ SmRect aRect = (SmRect(aTmpDev, &rFormat, C2S("a"),
+ GetFont().GetBorderWidth()));
+ nFormulaBaseline = GetAlignM();
+ // move from middle position by constant - distance
+ // between middle and baseline for single letter
+ nFormulaBaseline += aRect.GetBaseline() - aRect.GetAlignM();
+ }
+ // <--
}
@@ -857,6 +884,12 @@ SmNode * SmTableNode::GetLeftMost()
}
+long SmTableNode::GetFormulaBaseline() const
+{
+ return nFormulaBaseline;
+}
+
+
/**************************************************************************/
@@ -878,8 +911,8 @@ void SmLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
// arranges all subnodes in one row with some extra space between
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
- USHORT i;
+ sal_uInt16 nSize = GetNumSubNodes();
+ sal_uInt16 i;
for (i = 0; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
pNode->Arrange(rDev, rFormat);
@@ -887,20 +920,21 @@ void SmLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
- // provide an empty rectangle with alignment parameters for the "current"
- // font (in order to make "a^1 {}_2^3 a_4" work correct, that is, have the
- // same sub-/supscript positions.)
- //! be sure to use a character that has explicitly defined HiAttribut
- //! line in rect.cxx such as 'a' in order to make 'vec a' look same to
- //! 'vec {a}'.
- SmRect::operator = (SmRect(aTmpDev, &rFormat, C2S("a"),
- GetFont().GetBorderWidth()));
- // make sure that the rectangle occupies (almost) no space
- SetWidth(1);
- SetItalicSpaces(0, 0);
-
if (nSize < 1)
+ {
+ // provide an empty rectangle with alignment parameters for the "current"
+ // font (in order to make "a^1 {}_2^3 a_4" work correct, that is, have the
+ // same sub-/supscript positions.)
+ //! be sure to use a character that has explicitly defined HiAttribut
+ //! line in rect.cxx such as 'a' in order to make 'vec a' look same to
+ //! 'vec {a}'.
+ SmRect::operator = (SmRect(aTmpDev, &rFormat, C2S("a"),
+ GetFont().GetBorderWidth()));
+ // make sure that the rectangle occupies (almost) no space
+ SetWidth(1);
+ SetItalicSpaces(0, 0);
return;
+ }
// make distance depend on font size
long nDist = (rFormat.GetDistance(DIS_HORIZONTAL) * GetFont().GetSize().Height()) / 100L;
@@ -908,14 +942,17 @@ void SmLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
nDist = 0;
Point aPos;
- for (i = 0; i < nSize; i++)
+ // copy the first node into LineNode and extend by the others
+ if (NULL != (pNode = GetSubNode(0)))
+ SmRect::operator = (pNode->GetRect());
+
+ for (i = 1; i < nSize; i++)
if (NULL != (pNode = GetSubNode(i)))
{
aPos = pNode->AlignTo(*this, RP_RIGHT, RHA_CENTER, RVA_BASELINE);
- // no horizontal space before first node
- if (i)
- aPos.X() += nDist;
+ // add horizontal space to the left for each but the first sub node
+ aPos.X() += nDist;
pNode->MoveTo(aPos);
ExtendBy( *pNode, RCP_XOR );
@@ -1227,14 +1264,14 @@ bool IsPointInLine(const Point &rPoint1,
}
-USHORT GetLineIntersectionPoint(Point &rResult,
+sal_uInt16 GetLineIntersectionPoint(Point &rResult,
const Point& rPoint1, const Point &rHeading1,
const Point& rPoint2, const Point &rHeading2)
{
OSL_ENSURE(rHeading1 != Point(), "Sm : 0 vector");
OSL_ENSURE(rHeading2 != Point(), "Sm : 0 vector");
- USHORT nRes = 1;
+ sal_uInt16 nRes = 1;
const double eps = 5.0 * DBL_EPSILON;
// sind die Richtumgsvektoren linear abhaengig ?
@@ -1506,7 +1543,7 @@ void SmSubSupNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
// (as would be in "a_{1_{2_{3_4}}}")
if (GetFont().GetSize().Height() > rFormat.GetBaseSize().Height() / 3)
{
- USHORT nIndex = (eSubSup == CSUB || eSubSup == CSUP) ?
+ sal_uInt16 nIndex = (eSubSup == CSUB || eSubSup == CSUP) ?
SIZ_LIMITS : SIZ_INDEX;
Fraction aFraction ( rFormat.GetRelSize(nIndex), 100 );
pSubSup->SetSize(aFraction);
@@ -1688,10 +1725,10 @@ void SmBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
long nFaceHeight = GetFont().GetSize().Height();
// Uebergroesse in % ermitteln
- USHORT nPerc = 0;
+ sal_uInt16 nPerc = 0;
if (!bIsABS && bScale)
{ // im Fall von Klammern mit Uebergroesse...
- USHORT nIndex = GetScaleMode() == SCALE_HEIGHT ?
+ sal_uInt16 nIndex = GetScaleMode() == SCALE_HEIGHT ?
DIS_BRACKETSIZE : DIS_NORMALBRACKETSIZE;
nPerc = rFormat.GetDistance(nIndex);
}
@@ -1762,12 +1799,12 @@ void SmBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
void SmBracebodyNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
- USHORT nNumSubNodes = GetNumSubNodes();
+ sal_uInt16 nNumSubNodes = GetNumSubNodes();
if (nNumSubNodes == 0)
return;
// arrange arguments
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i < nNumSubNodes; i += 2)
GetSubNode(i)->Arrange(rDev, rFormat);
@@ -1786,9 +1823,9 @@ void SmBracebodyNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
// scale separators to required height and arrange them
bool bScale = GetScaleMode() == SCALE_HEIGHT || rFormat.IsScaleNormalBrackets();
long nHeight = bScale ? aRefRect.GetHeight() : GetFont().GetSize().Height();
- USHORT nIndex = GetScaleMode() == SCALE_HEIGHT ?
+ sal_uInt16 nIndex = GetScaleMode() == SCALE_HEIGHT ?
DIS_BRACKETSIZE : DIS_NORMALBRACKETSIZE;
- USHORT nPerc = rFormat.GetDistance(nIndex);
+ sal_uInt16 nPerc = rFormat.GetDistance(nIndex);
if (bScale)
nHeight += 2 * (nHeight * nPerc / 100L);
for (i = 1; i < nNumSubNodes; i += 2)
@@ -2130,7 +2167,7 @@ void SmFontNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
break;
}
if (nFnt != -1)
- { GetFont() = rFormat.GetFont( sal::static_int_cast< USHORT >(nFnt) );
+ { GetFont() = rFormat.GetFont( sal::static_int_cast< sal_uInt16 >(nFnt) );
SetFont(GetFont());
}
@@ -2181,7 +2218,7 @@ void SmFontNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
}
-void SmFontNode::SetSizeParameter(const Fraction& rValue, USHORT Type)
+void SmFontNode::SetSizeParameter(const Fraction& rValue, sal_uInt16 Type)
{
nSizeType = Type;
aFontSize = rValue;
@@ -2199,13 +2236,13 @@ SmPolyLineNode::SmPolyLineNode(const SmToken &rNodeToken)
}
-void SmPolyLineNode::AdaptToX(const OutputDevice &/*rDev*/, ULONG nNewWidth)
+void SmPolyLineNode::AdaptToX(const OutputDevice &/*rDev*/, sal_uLong nNewWidth)
{
aToSize.Width() = nNewWidth;
}
-void SmPolyLineNode::AdaptToY(const OutputDevice &/*rDev*/, ULONG nNewHeight)
+void SmPolyLineNode::AdaptToY(const OutputDevice &/*rDev*/, sal_uLong nNewHeight)
{
GetFont().FreezeBorderWidth();
aToSize.Height() = nNewHeight;
@@ -2255,13 +2292,13 @@ void SmPolyLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
/**************************************************************************/
-void SmRootSymbolNode::AdaptToX(const OutputDevice &/*rDev*/, ULONG nWidth)
+void SmRootSymbolNode::AdaptToX(const OutputDevice &/*rDev*/, sal_uLong nWidth)
{
nBodyWidth = nWidth;
}
-void SmRootSymbolNode::AdaptToY(const OutputDevice &rDev, ULONG nHeight)
+void SmRootSymbolNode::AdaptToY(const OutputDevice &rDev, sal_uLong nHeight)
{
// etwas extra Laenge damit der horizontale Balken spaeter ueber dem
// Argument positioniert ist
@@ -2272,13 +2309,13 @@ void SmRootSymbolNode::AdaptToY(const OutputDevice &rDev, ULONG nHeight)
/**************************************************************************/
-void SmRectangleNode::AdaptToX(const OutputDevice &/*rDev*/, ULONG nWidth)
+void SmRectangleNode::AdaptToX(const OutputDevice &/*rDev*/, sal_uLong nWidth)
{
aToSize.Width() = nWidth;
}
-void SmRectangleNode::AdaptToY(const OutputDevice &/*rDev*/, ULONG nHeight)
+void SmRectangleNode::AdaptToY(const OutputDevice &/*rDev*/, sal_uLong nHeight)
{
GetFont().FreezeBorderWidth();
aToSize.Height() = nHeight;
@@ -2299,7 +2336,7 @@ void SmRectangleNode::Arrange(const OutputDevice &rDev, const SmFormat &/*rForma
aTmpDev.SetFont(GetFont());
// add some borderspace
- ULONG nTmpBorderWidth = GetFont().GetBorderWidth();
+ sal_uLong nTmpBorderWidth = GetFont().GetBorderWidth();
nHeight += 2 * nTmpBorderWidth;
//! use this method in order to have 'SmRect::HasAlignInfo() == true'
@@ -2311,14 +2348,14 @@ void SmRectangleNode::Arrange(const OutputDevice &rDev, const SmFormat &/*rForma
/**************************************************************************/
-SmTextNode::SmTextNode( SmNodeType eNodeType, const SmToken &rNodeToken, USHORT nFontDescP ) :
+SmTextNode::SmTextNode( SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 nFontDescP ) :
SmVisibleNode(eNodeType, rNodeToken)
{
nFontDesc = nFontDescP;
}
-SmTextNode::SmTextNode( const SmToken &rNodeToken, USHORT nFontDescP ) :
+SmTextNode::SmTextNode( const SmToken &rNodeToken, sal_uInt16 nFontDescP ) :
SmVisibleNode(NTEXT, rNodeToken)
{
nFontDesc = nFontDescP;
@@ -2355,7 +2392,7 @@ void SmTextNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
PrepareAttributes();
- USHORT nSizeDesc = GetFontDesc() == FNT_FUNCTION ?
+ sal_uInt16 nSizeDesc = GetFontDesc() == FNT_FUNCTION ?
SIZ_FUNCTION : SIZ_TEXT;
GetFont() *= Fraction (rFormat.GetRelSize(nSizeDesc), 100);
@@ -2458,9 +2495,9 @@ void SmTextNode::AdjustFontDesc()
void SmMatrixNode::CreateTextFromNode(String &rText)
{
APPEND(rText,"matrix {");
- for (USHORT i = 0; i < nNumRows; i++)
+ for (sal_uInt16 i = 0; i < nNumRows; i++)
{
- for (USHORT j = 0; j < nNumCols; j++)
+ for (sal_uInt16 j = 0; j < nNumCols; j++)
{
SmNode *pNode = GetSubNode(i * nNumCols + j);
pNode->CreateTextFromNode(rText);
@@ -2480,7 +2517,7 @@ void SmMatrixNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
Point aPosition,
aOffset;
SmNode *pNode;
- USHORT i, j;
+ sal_uInt16 i, j;
// initialize array that is to hold the maximum widhts of all
// elements (subnodes) in that column.
@@ -2489,10 +2526,10 @@ void SmMatrixNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
pColWidth[j] = 0;
// arrange subnodes and calculate the aboves arrays contents
- USHORT nNodes = GetNumSubNodes();
+ sal_uInt16 nNodes = GetNumSubNodes();
for (i = 0; i < nNodes; i++)
{
- USHORT nIdx = nNodes - 1 - i;
+ sal_uInt16 nIdx = nNodes - 1 - i;
if (NULL != (pNode = GetSubNode(nIdx)))
{
pNode->Arrange(rDev, rFormat);
@@ -2576,7 +2613,7 @@ void SmMatrixNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
}
-void SmMatrixNode::SetRowCol(USHORT nMatrixRows, USHORT nMatrixCols)
+void SmMatrixNode::SetRowCol(sal_uInt16 nMatrixRows, sal_uInt16 nMatrixCols)
{
nNumRows = nMatrixRows;
nNumCols = nMatrixCols;
@@ -2600,7 +2637,7 @@ SmMathSymbolNode::SmMathSymbolNode(const SmToken &rNodeToken)
SetText( cChar );
}
-void SmMathSymbolNode::AdaptToX(const OutputDevice &rDev, ULONG nWidth)
+void SmMathSymbolNode::AdaptToX(const OutputDevice &rDev, sal_uLong nWidth)
{
// Since there is no function to do this, we try to approximate it:
Size aFntSize (GetFont().GetSize());
@@ -2623,7 +2660,7 @@ void SmMathSymbolNode::AdaptToX(const OutputDevice &rDev, ULONG nWidth)
GetFont().SetSize(aFntSize);
}
-void SmMathSymbolNode::AdaptToY(const OutputDevice &rDev, ULONG nHeight)
+void SmMathSymbolNode::AdaptToY(const OutputDevice &rDev, sal_uLong nHeight)
{
GetFont().FreezeBorderWidth();
Size aFntSize (GetFont().GetSize());
@@ -2723,7 +2760,7 @@ void SmRectangleNode::CreateTextFromNode(String &rText)
void SmAttributNode::CreateTextFromNode(String &rText)
{
SmNode *pNode;
- USHORT nSize = GetNumSubNodes();
+ sal_uInt16 nSize = GetNumSubNodes();
OSL_ENSURE(nSize == 2, "Node missing members");
rText.Append('{');
sal_Unicode nLast=0;
@@ -2793,7 +2830,7 @@ bool lcl_IsFromGreekSymbolSet( const String &rTokenText )
}
-SmSpecialNode::SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT _nFontDesc) :
+SmSpecialNode::SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 _nFontDesc) :
SmTextNode(eNodeType, rNodeToken, _nFontDesc)
{
bIsFromGreekSymbolSet = lcl_IsFromGreekSymbolSet( rNodeToken.aText );
@@ -2817,7 +2854,9 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell
String aName( GetToken().aText.Copy(1) );
if (NULL != (pSym = pp->GetSymbolManager().GetSymbolByName( aName )))
{
- SetText( pSym->GetCharacter() );
+ sal_UCS4 cChar = pSym->GetCharacter();
+ String aTmp( OUString( &cChar, 1 ) );
+ SetText( aTmp );
GetFont() = pSym->GetFace();
}
else
@@ -2846,7 +2885,7 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell
{
OSL_ENSURE( GetText().Len() == 1, "a symbol should only consist of 1 char!" );
bool bItalic = false;
- INT16 nStyle = rFormat.GetGreekCharStyle();
+ sal_Int16 nStyle = rFormat.GetGreekCharStyle();
OSL_ENSURE( nStyle >= 0 && nStyle <= 2, "unexpected value for GreekCharStyle" );
if (nStyle == 1)
bItalic = true;
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index e72f322c1a98..23c0040a108b 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -85,8 +85,8 @@ SmToken::SmToken() :
SmToken::SmToken(SmTokenType eTokenType,
sal_Unicode cMath,
const sal_Char* pText,
- ULONG nTokenGroup,
- USHORT nTokenLevel) {
+ sal_uLong nTokenGroup,
+ sal_uInt16 nTokenLevel) {
eType = eTokenType;
cMathChar = cMath;
aText.AssignAscii(pText);
@@ -315,8 +315,8 @@ const SmTokenTableEntry * SmParser::GetTokenTableEntry( const String &rName )
const SmTokenTableEntry * pRes = 0;
if (rName.Len())
{
- INT32 nEntries = SAL_N_ELEMENTS(aTokenTable);
- for (INT32 i = 0; i < nEntries; ++i)
+ sal_Int32 nEntries = SAL_N_ELEMENTS(aTokenTable);
+ for (sal_Int32 i = 0; i < nEntries; ++i)
{
if (rName.EqualsIgnoreCaseAscii( aTokenTable[i].pIdent ))
{
@@ -351,7 +351,7 @@ bool SmParser::IsDelimiter( const String &rTxt, xub_StrLen nPos )
break;
- INT16 nTypJp = SM_MOD()->GetSysLocale().GetCharClass().getType( rTxt, nPos );
+ sal_Int16 nTypJp = SM_MOD()->GetSysLocale().GetCharClass().getType( rTxt, nPos );
bool bIsDelim = (*pDelim != 0 ||
nTypJp == com::sun::star::i18n::UnicodeType::SPACE_SEPARATOR ||
nTypJp == com::sun::star::i18n::UnicodeType::CONTROL);
@@ -361,24 +361,24 @@ bool SmParser::IsDelimiter( const String &rTxt, xub_StrLen nPos )
#endif
-void SmParser::Insert(const String &rText, USHORT nPos)
+void SmParser::Insert(const String &rText, sal_uInt16 nPos)
{
- BufferString.Insert(rText, nPos);
+ m_aBufferString.Insert(rText, nPos);
xub_StrLen nLen = rText.Len();
- BufferIndex = BufferIndex + nLen;
- nTokenIndex = nTokenIndex + nLen;
+ m_nBufferIndex = m_nBufferIndex + nLen;
+ m_nTokenIndex = m_nTokenIndex + nLen;
}
-void SmParser::Replace( USHORT nPos, USHORT nLen, const String &rText )
+void SmParser::Replace( sal_uInt16 nPos, sal_uInt16 nLen, const String &rText )
{
- OSL_ENSURE( nPos + nLen <= BufferString.Len(), "argument mismatch" );
+ OSL_ENSURE( nPos + nLen <= m_aBufferString.Len(), "argument mismatch" );
- BufferString.Replace( nPos, nLen, rText );
- INT16 nChg = rText.Len() - nLen;
- BufferIndex = BufferIndex + nChg;
- nTokenIndex = nTokenIndex + nChg;
+ m_aBufferString.Replace( nPos, nLen, rText );
+ sal_Int16 nChg = rText.Len() - nLen;
+ m_nBufferIndex = m_nBufferIndex + nChg;
+ m_nTokenIndex = m_nTokenIndex + nChg;
}
@@ -405,7 +405,7 @@ void SmParser::NextToken()
{
static const String aEmptyStr;
- xub_StrLen nBufLen = BufferString.Len();
+ xub_StrLen nBufLen = m_aBufferString.Len();
ParseResult aRes;
xub_StrLen nRealStart;
bool bCont;
@@ -415,13 +415,13 @@ void SmParser::NextToken()
{
// skip white spaces
while (UnicodeType::SPACE_SEPARATOR ==
- aCC.getType( BufferString, BufferIndex ))
- ++BufferIndex;
+ aCC.getType( m_aBufferString, m_nBufferIndex ))
+ ++m_nBufferIndex;
sal_Int32 nStartFlags = coStartFlags;
sal_Int32 nContFlags = coContFlags;
- sal_Unicode cFirstChar = BufferString.GetChar( BufferIndex );
- aRes = aCC.parseAnyToken( BufferString, BufferIndex,
+ sal_Unicode cFirstChar = m_aBufferString.GetChar( m_nBufferIndex );
+ aRes = aCC.parseAnyToken( m_aBufferString, m_nBufferIndex,
nStartFlags, aEmptyStr,
nContFlags, aEmptyStr );
@@ -438,7 +438,7 @@ void SmParser::NextToken()
aCC.setLocale( aDotLoc );
aTmpRes = aCC.parsePredefinedToken(
KParseType::ASC_NUMBER,
- BufferString, BufferIndex,
+ m_aBufferString, m_nBufferIndex,
KParseTokens::ASC_DIGIT, aEmptyStr,
KParseTokens::ASC_DIGIT | KParseTokens::ASC_DOT, aEmptyStr );
aCC.setLocale( aOldLoc );
@@ -446,29 +446,29 @@ void SmParser::NextToken()
aRes.TokenType = aTmpRes.TokenType;
}
- nRealStart = BufferIndex + sal::static_int_cast< xub_StrLen >(aRes.LeadingWhiteSpace);
- BufferIndex = nRealStart;
+ nRealStart = m_nBufferIndex + sal::static_int_cast< xub_StrLen >(aRes.LeadingWhiteSpace);
+ m_nBufferIndex = nRealStart;
bCont = false;
if ( aRes.TokenType == 0 &&
nRealStart < nBufLen &&
- '\n' == BufferString.GetChar( nRealStart ) )
+ '\n' == m_aBufferString.GetChar( nRealStart ) )
{
// keep data needed for tokens row and col entry up to date
- ++Row;
- BufferIndex = ColOff = nRealStart + 1;
+ ++m_Row;
+ m_nBufferIndex = m_nColOff = nRealStart + 1;
bCont = true;
}
else if (aRes.TokenType & KParseType::ONE_SINGLE_CHAR)
{
- String aName( BufferString.Copy( nRealStart, 2 ));
+ String aName( m_aBufferString.Copy( nRealStart, 2 ));
if ( aName.EqualsAscii( "%%" ))
{
//SkipComment
- BufferIndex = nRealStart + 2;
- while (BufferIndex < nBufLen &&
- '\n' != BufferString.GetChar( BufferIndex ))
- ++BufferIndex;
+ m_nBufferIndex = nRealStart + 2;
+ while (m_nBufferIndex < nBufLen &&
+ '\n' != m_aBufferString.GetChar( m_nBufferIndex ))
+ ++m_nBufferIndex;
bCont = true;
}
}
@@ -476,33 +476,33 @@ void SmParser::NextToken()
} while (bCont);
// set index of current token
- nTokenIndex = BufferIndex;
+ m_nTokenIndex = m_nBufferIndex;
- CurToken.nRow = Row;
- CurToken.nCol = nRealStart - ColOff + 1;
+ m_aCurToken.nRow = m_Row;
+ m_aCurToken.nCol = nRealStart - m_nColOff + 1;
bool bHandled = true;
if (nRealStart >= nBufLen)
{
- CurToken.eType = TEND;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 0;
- CurToken.aText.Erase();
+ m_aCurToken.eType = TEND;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.Erase();
}
else if ((aRes.TokenType & (KParseType::ASC_NUMBER | KParseType::UNI_NUMBER))
|| (bNumStart && (aRes.TokenType & KParseType::IDENTNAME)))
{
- INT32 n = aRes.EndPos - nRealStart;
+ sal_Int32 n = aRes.EndPos - nRealStart;
OSL_ENSURE( n >= 0, "length < 0" );
- CurToken.eType = TNUMBER;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText = BufferString.Copy( nRealStart, sal::static_int_cast< xub_StrLen >(n) );
+ m_aCurToken.eType = TNUMBER;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText = m_aBufferString.Copy( nRealStart, sal::static_int_cast< xub_StrLen >(n) );
#if OSL_DEBUG_LEVEL > 1
- if (!IsDelimiter( BufferString, static_cast< xub_StrLen >(aRes.EndPos) ))
+ if (!IsDelimiter( m_aBufferString, static_cast< xub_StrLen >(aRes.EndPos) ))
{
DBG_WARNING( "identifier really finished? (compatibility!)" );
}
@@ -510,59 +510,59 @@ void SmParser::NextToken()
}
else if (aRes.TokenType & KParseType::DOUBLE_QUOTE_STRING)
{
- CurToken.eType = TTEXT;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText = aRes.DequotedNameOrString;
- CurToken.nRow = Row;
- CurToken.nCol = nRealStart - ColOff + 2;
+ m_aCurToken.eType = TTEXT;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText = aRes.DequotedNameOrString;
+ m_aCurToken.nRow = m_Row;
+ m_aCurToken.nCol = nRealStart - m_nColOff + 2;
}
else if (aRes.TokenType & KParseType::IDENTNAME)
{
- INT32 n = aRes.EndPos - nRealStart;
+ sal_Int32 n = aRes.EndPos - nRealStart;
OSL_ENSURE( n >= 0, "length < 0" );
- String aName( BufferString.Copy( nRealStart, sal::static_int_cast< xub_StrLen >(n) ) );
+ String aName( m_aBufferString.Copy( nRealStart, sal::static_int_cast< xub_StrLen >(n) ) );
const SmTokenTableEntry *pEntry = GetTokenTableEntry( aName );
if (pEntry)
{
- CurToken.eType = pEntry->eType;
- CurToken.cMathChar = pEntry->cMathChar;
- CurToken.nGroup = pEntry->nGroup;
- CurToken.nLevel = pEntry->nLevel;
- CurToken.aText.AssignAscii( pEntry->pIdent );
+ m_aCurToken.eType = pEntry->eType;
+ m_aCurToken.cMathChar = pEntry->cMathChar;
+ m_aCurToken.nGroup = pEntry->nGroup;
+ m_aCurToken.nLevel = pEntry->nLevel;
+ m_aCurToken.aText.AssignAscii( pEntry->pIdent );
}
else
{
- CurToken.eType = TIDENT;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText = aName;
+ m_aCurToken.eType = TIDENT;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText = aName;
#if OSL_DEBUG_LEVEL > 1
- if (!IsDelimiter( BufferString, static_cast< xub_StrLen >(aRes.EndPos) ))
+ if (!IsDelimiter( m_aBufferString, static_cast< xub_StrLen >(aRes.EndPos) ))
{
DBG_WARNING( "identifier really finished? (compatibility!)" );
}
#endif
}
}
- else if (aRes.TokenType == 0 && '_' == BufferString.GetChar( nRealStart ))
+ else if (aRes.TokenType == 0 && '_' == m_aBufferString.GetChar( nRealStart ))
{
- CurToken.eType = TRSUB;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = TGPOWER;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "_" );
+ m_aCurToken.eType = TRSUB;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = TGPOWER;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "_" );
aRes.EndPos = nRealStart + 1;
}
else if (aRes.TokenType & KParseType::BOOLEAN)
{
sal_Int32 &rnEndPos = aRes.EndPos;
- String aName( BufferString.Copy( nRealStart,
+ String aName( m_aBufferString.Copy( nRealStart,
sal::static_int_cast< xub_StrLen >(rnEndPos - nRealStart) ));
if (2 >= aName.Len())
{
@@ -571,91 +571,91 @@ void SmParser::NextToken()
{
case '<':
{
- if (BufferString.Copy( nRealStart, 2 ).
+ if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( "<<" ))
{
- CurToken.eType = TLL;
- CurToken.cMathChar = MS_LL;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "<<" );
+ m_aCurToken.eType = TLL;
+ m_aCurToken.cMathChar = MS_LL;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "<<" );
rnEndPos = nRealStart + 2;
}
- else if (BufferString.Copy( nRealStart, 2 ).
+ else if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( "<=" ))
{
- CurToken.eType = TLE;
- CurToken.cMathChar = MS_LE;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "<=" );
+ m_aCurToken.eType = TLE;
+ m_aCurToken.cMathChar = MS_LE;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "<=" );
rnEndPos = nRealStart + 2;
}
- else if (BufferString.Copy( nRealStart, 2 ).
+ else if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( "<>" ))
{
- CurToken.eType = TNEQ;
- CurToken.cMathChar = MS_NEQ;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "<>" );
+ m_aCurToken.eType = TNEQ;
+ m_aCurToken.cMathChar = MS_NEQ;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "<>" );
rnEndPos = nRealStart + 2;
}
- else if (BufferString.Copy( nRealStart, 3 ).
+ else if (m_aBufferString.Copy( nRealStart, 3 ).
EqualsAscii( "<?>" ))
{
- CurToken.eType = TPLACE;
- CurToken.cMathChar = MS_PLACE;
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "<?>" );
+ m_aCurToken.eType = TPLACE;
+ m_aCurToken.cMathChar = MS_PLACE;
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "<?>" );
rnEndPos = nRealStart + 3;
}
else
{
- CurToken.eType = TLT;
- CurToken.cMathChar = MS_LT;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "<" );
+ m_aCurToken.eType = TLT;
+ m_aCurToken.cMathChar = MS_LT;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "<" );
}
}
break;
case '>':
{
- if (BufferString.Copy( nRealStart, 2 ).
+ if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( ">=" ))
{
- CurToken.eType = TGE;
- CurToken.cMathChar = MS_GE;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( ">=" );
+ m_aCurToken.eType = TGE;
+ m_aCurToken.cMathChar = MS_GE;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( ">=" );
rnEndPos = nRealStart + 2;
}
- else if (BufferString.Copy( nRealStart, 2 ).
+ else if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( ">>" ))
{
- CurToken.eType = TGG;
- CurToken.cMathChar = MS_GG;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( ">>" );
+ m_aCurToken.eType = TGG;
+ m_aCurToken.cMathChar = MS_GG;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( ">>" );
rnEndPos = nRealStart + 2;
}
else
{
- CurToken.eType = TGT;
- CurToken.cMathChar = MS_GT;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( ">" );
+ m_aCurToken.eType = TGT;
+ m_aCurToken.cMathChar = MS_GT;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( ">" );
}
}
break;
@@ -667,7 +667,7 @@ void SmParser::NextToken()
else if (aRes.TokenType & KParseType::ONE_SINGLE_CHAR)
{
sal_Int32 &rnEndPos = aRes.EndPos;
- String aName( BufferString.Copy( nRealStart,
+ String aName( m_aBufferString.Copy( nRealStart,
sal::static_int_cast< xub_StrLen >(rnEndPos - nRealStart) ) );
if (1 == aName.Len())
@@ -680,12 +680,12 @@ void SmParser::NextToken()
//! modifies aRes.EndPos
OSL_ENSURE( rnEndPos >= nBufLen ||
- '%' != BufferString.GetChar( sal::static_int_cast< xub_StrLen >(rnEndPos) ),
+ '%' != m_aBufferString.GetChar( sal::static_int_cast< xub_StrLen >(rnEndPos) ),
"unexpected comment start" );
// get identifier of user-defined character
ParseResult aTmpRes = aCC.parseAnyToken(
- BufferString, rnEndPos,
+ m_aBufferString, rnEndPos,
KParseTokens::ANY_LETTER,
aEmptyStr,
coContFlags,
@@ -697,20 +697,20 @@ void SmParser::NextToken()
// default setting for the case that no identifier
// i.e. a valid symbol-name is following the '%'
// character
- CurToken.eType = TTEXT;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText = String();
- CurToken.nRow = sal::static_int_cast< xub_StrLen >(Row);
- CurToken.nCol = nTmpStart - ColOff;
+ m_aCurToken.eType = TTEXT;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText = String();
+ m_aCurToken.nRow = sal::static_int_cast< xub_StrLen >(m_Row);
+ m_aCurToken.nCol = nTmpStart - m_nColOff;
if (aTmpRes.TokenType & KParseType::IDENTNAME)
{
xub_StrLen n = sal::static_int_cast< xub_StrLen >(aTmpRes.EndPos - nTmpStart);
- CurToken.eType = TSPECIAL;
- CurToken.aText = BufferString.Copy( sal::static_int_cast< xub_StrLen >(nTmpStart-1), n+1 );
+ m_aCurToken.eType = TSPECIAL;
+ m_aCurToken.aText = m_aBufferString.Copy( sal::static_int_cast< xub_StrLen >(nTmpStart-1), n+1 );
OSL_ENSURE( aTmpRes.EndPos > rnEndPos,
"empty identifier" );
@@ -727,187 +727,187 @@ void SmParser::NextToken()
break;
case '[':
{
- CurToken.eType = TLBRACKET;
- CurToken.cMathChar = MS_LBRACKET;
- CurToken.nGroup = TGLBRACES;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "[" );
+ m_aCurToken.eType = TLBRACKET;
+ m_aCurToken.cMathChar = MS_LBRACKET;
+ m_aCurToken.nGroup = TGLBRACES;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "[" );
}
break;
case '\\':
{
- CurToken.eType = TESCAPE;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "\\" );
+ m_aCurToken.eType = TESCAPE;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "\\" );
}
break;
case ']':
{
- CurToken.eType = TRBRACKET;
- CurToken.cMathChar = MS_RBRACKET;
- CurToken.nGroup = TGRBRACES;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "]" );
+ m_aCurToken.eType = TRBRACKET;
+ m_aCurToken.cMathChar = MS_RBRACKET;
+ m_aCurToken.nGroup = TGRBRACES;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "]" );
}
break;
case '^':
{
- CurToken.eType = TRSUP;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = TGPOWER;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "^" );
+ m_aCurToken.eType = TRSUP;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = TGPOWER;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "^" );
}
break;
case '`':
{
- CurToken.eType = TSBLANK;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = TGBLANK;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "`" );
+ m_aCurToken.eType = TSBLANK;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = TGBLANK;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "`" );
}
break;
case '{':
{
- CurToken.eType = TLGROUP;
- CurToken.cMathChar = MS_LBRACE;
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "{" );
+ m_aCurToken.eType = TLGROUP;
+ m_aCurToken.cMathChar = MS_LBRACE;
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "{" );
}
break;
case '|':
{
- CurToken.eType = TOR;
- CurToken.cMathChar = MS_OR;
- CurToken.nGroup = TGSUM;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "|" );
+ m_aCurToken.eType = TOR;
+ m_aCurToken.cMathChar = MS_OR;
+ m_aCurToken.nGroup = TGSUM;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "|" );
}
break;
case '}':
{
- CurToken.eType = TRGROUP;
- CurToken.cMathChar = MS_RBRACE;
- CurToken.nGroup = 0;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "}" );
+ m_aCurToken.eType = TRGROUP;
+ m_aCurToken.cMathChar = MS_RBRACE;
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "}" );
}
break;
case '~':
{
- CurToken.eType = TBLANK;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = TGBLANK;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "~" );
+ m_aCurToken.eType = TBLANK;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = TGBLANK;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "~" );
}
break;
case '#':
{
- if (BufferString.Copy( nRealStart, 2 ).
+ if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( "##" ))
{
- CurToken.eType = TDPOUND;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "##" );
+ m_aCurToken.eType = TDPOUND;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "##" );
rnEndPos = nRealStart + 2;
}
else
{
- CurToken.eType = TPOUND;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "#" );
+ m_aCurToken.eType = TPOUND;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "#" );
}
}
break;
case '&':
{
- CurToken.eType = TAND;
- CurToken.cMathChar = MS_AND;
- CurToken.nGroup = TGPRODUCT;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "&" );
+ m_aCurToken.eType = TAND;
+ m_aCurToken.cMathChar = MS_AND;
+ m_aCurToken.nGroup = TGPRODUCT;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "&" );
}
break;
case '(':
{
- CurToken.eType = TLPARENT;
- CurToken.cMathChar = MS_LPARENT;
- CurToken.nGroup = TGLBRACES;
- CurToken.nLevel = 5; //! 0 to continue expression
- CurToken.aText.AssignAscii( "(" );
+ m_aCurToken.eType = TLPARENT;
+ m_aCurToken.cMathChar = MS_LPARENT;
+ m_aCurToken.nGroup = TGLBRACES;
+ m_aCurToken.nLevel = 5; //! 0 to continue expression
+ m_aCurToken.aText.AssignAscii( "(" );
}
break;
case ')':
{
- CurToken.eType = TRPARENT;
- CurToken.cMathChar = MS_RPARENT;
- CurToken.nGroup = TGRBRACES;
- CurToken.nLevel = 0; //! 0 to terminate expression
- CurToken.aText.AssignAscii( ")" );
+ m_aCurToken.eType = TRPARENT;
+ m_aCurToken.cMathChar = MS_RPARENT;
+ m_aCurToken.nGroup = TGRBRACES;
+ m_aCurToken.nLevel = 0; //! 0 to terminate expression
+ m_aCurToken.aText.AssignAscii( ")" );
}
break;
case '*':
{
- CurToken.eType = TMULTIPLY;
- CurToken.cMathChar = MS_MULTIPLY;
- CurToken.nGroup = TGPRODUCT;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "*" );
+ m_aCurToken.eType = TMULTIPLY;
+ m_aCurToken.cMathChar = MS_MULTIPLY;
+ m_aCurToken.nGroup = TGPRODUCT;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "*" );
}
break;
case '+':
{
- if (BufferString.Copy( nRealStart, 2 ).
+ if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( "+-" ))
{
- CurToken.eType = TPLUSMINUS;
- CurToken.cMathChar = MS_PLUSMINUS;
- CurToken.nGroup = TGUNOPER | TGSUM;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "+-" );
+ m_aCurToken.eType = TPLUSMINUS;
+ m_aCurToken.cMathChar = MS_PLUSMINUS;
+ m_aCurToken.nGroup = TGUNOPER | TGSUM;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "+-" );
rnEndPos = nRealStart + 2;
}
else
{
- CurToken.eType = TPLUS;
- CurToken.cMathChar = MS_PLUS;
- CurToken.nGroup = TGUNOPER | TGSUM;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "+" );
+ m_aCurToken.eType = TPLUS;
+ m_aCurToken.cMathChar = MS_PLUS;
+ m_aCurToken.nGroup = TGUNOPER | TGSUM;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "+" );
}
}
break;
case '-':
{
- if (BufferString.Copy( nRealStart, 2 ).
+ if (m_aBufferString.Copy( nRealStart, 2 ).
EqualsAscii( "-+" ))
{
- CurToken.eType = TMINUSPLUS;
- CurToken.cMathChar = MS_MINUSPLUS;
- CurToken.nGroup = TGUNOPER | TGSUM;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "-+" );
+ m_aCurToken.eType = TMINUSPLUS;
+ m_aCurToken.cMathChar = MS_MINUSPLUS;
+ m_aCurToken.nGroup = TGUNOPER | TGSUM;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "-+" );
rnEndPos = nRealStart + 2;
}
else
{
- CurToken.eType = TMINUS;
- CurToken.cMathChar = MS_MINUS;
- CurToken.nGroup = TGUNOPER | TGSUM;
- CurToken.nLevel = 5;
- CurToken.aText.AssignAscii( "-" );
+ m_aCurToken.eType = TMINUS;
+ m_aCurToken.cMathChar = MS_MINUS;
+ m_aCurToken.nGroup = TGUNOPER | TGSUM;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText.AssignAscii( "-" );
}
}
break;
@@ -916,40 +916,40 @@ void SmParser::NextToken()
// for compatibility with SO5.2
// texts like .34 ...56 ... h ...78..90
// will be treated as numbers
- CurToken.eType = TNUMBER;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
+ m_aCurToken.eType = TNUMBER;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
- xub_StrLen nTxtStart = BufferIndex;
+ xub_StrLen nTxtStart = m_nBufferIndex;
sal_Unicode cChar;
do
{
- cChar = BufferString.GetChar( ++BufferIndex );
+ cChar = m_aBufferString.GetChar( ++m_nBufferIndex );
}
while ( cChar == '.' || IsDigit( cChar ) );
- CurToken.aText = BufferString.Copy( sal::static_int_cast< xub_StrLen >(nTxtStart),
- sal::static_int_cast< xub_StrLen >(BufferIndex - nTxtStart) );
- aRes.EndPos = BufferIndex;
+ m_aCurToken.aText = m_aBufferString.Copy( sal::static_int_cast< xub_StrLen >(nTxtStart),
+ sal::static_int_cast< xub_StrLen >(m_nBufferIndex - nTxtStart) );
+ aRes.EndPos = m_nBufferIndex;
}
break;
case '/':
{
- CurToken.eType = TDIVIDEBY;
- CurToken.cMathChar = MS_SLASH;
- CurToken.nGroup = TGPRODUCT;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "/" );
+ m_aCurToken.eType = TDIVIDEBY;
+ m_aCurToken.cMathChar = MS_SLASH;
+ m_aCurToken.nGroup = TGPRODUCT;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "/" );
}
break;
case '=':
{
- CurToken.eType = TASSIGN;
- CurToken.cMathChar = MS_ASSIGN;
- CurToken.nGroup = TGRELATION;
- CurToken.nLevel = 0;
- CurToken.aText.AssignAscii( "=" );
+ m_aCurToken.eType = TASSIGN;
+ m_aCurToken.cMathChar = MS_ASSIGN;
+ m_aCurToken.nGroup = TGRELATION;
+ m_aCurToken.nLevel = 0;
+ m_aCurToken.aText.AssignAscii( "=" );
}
break;
default:
@@ -962,17 +962,17 @@ void SmParser::NextToken()
if (!bHandled)
{
- CurToken.eType = TCHARACTER;
- CurToken.cMathChar = '\0';
- CurToken.nGroup = 0;
- CurToken.nLevel = 5;
- CurToken.aText = BufferString.Copy( nRealStart, 1 );
+ m_aCurToken.eType = TCHARACTER;
+ m_aCurToken.cMathChar = '\0';
+ m_aCurToken.nGroup = 0;
+ m_aCurToken.nLevel = 5;
+ m_aCurToken.aText = m_aBufferString.Copy( nRealStart, 1 );
aRes.EndPos = nRealStart + 1;
}
- if (TEND != CurToken.eType)
- BufferIndex = sal::static_int_cast< xub_StrLen >(aRes.EndPos);
+ if (TEND != m_aCurToken.eType)
+ m_nBufferIndex = sal::static_int_cast< xub_StrLen >(aRes.EndPos);
}
@@ -986,25 +986,25 @@ void SmParser::Table()
SmNodeArray LineArray;
Line();
- while (CurToken.eType == TNEWLINE)
+ while (m_aCurToken.eType == TNEWLINE)
{
NextToken();
Line();
}
- if (CurToken.eType != TEND)
+ if (m_aCurToken.eType != TEND)
Error(PE_UNEXPECTED_CHAR);
- ULONG n = NodeStack.Count();
+ sal_uLong n = m_aNodeStack.Count();
LineArray.resize(n);
- for (ULONG i = 0; i < n; i++)
- LineArray[n - (i + 1)] = NodeStack.Pop();
+ for (sal_uLong i = 0; i < n; i++)
+ LineArray[n - (i + 1)] = m_aNodeStack.Pop();
- SmStructureNode *pSNode = new SmTableNode(CurToken);
+ SmStructureNode *pSNode = new SmTableNode(m_aCurToken);
pSNode->SetSubNodes(LineArray);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
@@ -1026,19 +1026,21 @@ void SmParser::Align()
// (the dominant one in 4.0) and erase all others (especially old
// discarded tokens) from command string.
while (TokenInGroup(TGALIGN))
- { if (TokenInGroup(TGDISCARDED) || pSNode)
- { BufferIndex = GetTokenIndex();
- BufferString.Erase(BufferIndex, CurToken.aText.Len());
+ {
+ if (TokenInGroup(TGDISCARDED) || pSNode)
+ {
+ m_nBufferIndex = GetTokenIndex();
+ m_aBufferString.Erase(m_nBufferIndex, m_aCurToken.aText.Len());
}
else
- pSNode = new SmAlignNode(CurToken);
+ pSNode = new SmAlignNode(m_aCurToken);
NextToken();
}
}
else
{
- pSNode = new SmAlignNode(CurToken);
+ pSNode = new SmAlignNode(m_aCurToken);
NextToken();
@@ -1056,15 +1058,15 @@ void SmParser::Align()
Insert('}', GetTokenIndex());
if (pSNode)
- { pSNode->SetSubNodes(NodeStack.Pop(), 0);
- NodeStack.Push(pSNode);
+ { pSNode->SetSubNodes(m_aNodeStack.Pop(), 0);
+ m_aNodeStack.Push(pSNode);
}
}
void SmParser::Line()
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
SmNodeArray ExpressionArray;
ExpressionArray.resize(n);
@@ -1072,19 +1074,19 @@ void SmParser::Line()
// start with single expression that may have an alignment statement
// (and go on with expressions that must not have alignment
// statements in 'while' loop below. See also 'Expression()'.)
- if (CurToken.eType != TEND && CurToken.eType != TNEWLINE)
+ if (m_aCurToken.eType != TEND && m_aCurToken.eType != TNEWLINE)
{ Align();
ExpressionArray.resize(++n);
- ExpressionArray[n - 1] = NodeStack.Pop();
+ ExpressionArray[n - 1] = m_aNodeStack.Pop();
}
- while (CurToken.eType != TEND && CurToken.eType != TNEWLINE)
+ while (m_aCurToken.eType != TEND && m_aCurToken.eType != TNEWLINE)
{ if (CONVERT_40_TO_50 != GetConversion())
Expression();
else
Align();
ExpressionArray.resize(++n);
- ExpressionArray[n - 1] = NodeStack.Pop();
+ ExpressionArray[n - 1] = m_aNodeStack.Pop();
}
//If there's no expression, add an empty one.
@@ -1093,44 +1095,43 @@ void SmParser::Line()
if(ExpressionArray.size() == 0)
ExpressionArray.push_back(new SmExpressionNode(SmToken()));
-
- SmStructureNode *pSNode = new SmLineNode(CurToken);
+ SmStructureNode *pSNode = new SmLineNode(m_aCurToken);
pSNode->SetSubNodes(ExpressionArray);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
void SmParser::Expression()
{
bool bUseExtraSpaces = true;
- SmNode *pNode = NodeStack.Pop();
+ SmNode *pNode = m_aNodeStack.Pop();
if (pNode)
{
if (pNode->GetToken().eType == TNOSPACE)
bUseExtraSpaces = false;
else
- NodeStack.Push(pNode); // push the node from above again (now to be used as argument to this current 'nospace' node)
+ m_aNodeStack.Push(pNode); // push the node from above again (now to be used as argument to this current 'nospace' node)
}
- USHORT n = 0;
+ sal_uInt16 n = 0;
SmNodeArray RelationArray;
RelationArray.resize(n);
Relation();
RelationArray.resize(++n);
- RelationArray[n - 1] = NodeStack.Pop();
+ RelationArray[n - 1] = m_aNodeStack.Pop();
- while (CurToken.nLevel >= 4)
+ while (m_aCurToken.nLevel >= 4)
{ Relation();
RelationArray.resize(++n);
- RelationArray[n - 1] = NodeStack.Pop();
+ RelationArray[n - 1] = m_aNodeStack.Pop();
}
- SmExpressionNode *pSNode = new SmExpressionNode(CurToken);
+ SmExpressionNode *pSNode = new SmExpressionNode(m_aCurToken);
pSNode->SetSubNodes(RelationArray);
pSNode->SetUseExtraSpaces(bUseExtraSpaces);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
@@ -1139,16 +1140,16 @@ void SmParser::Relation()
Sum();
while (TokenInGroup(TGRELATION))
{
- SmStructureNode *pSNode = new SmBinHorNode(CurToken);
- SmNode *pFirst = NodeStack.Pop();
+ SmStructureNode *pSNode = new SmBinHorNode(m_aCurToken);
+ SmNode *pFirst = m_aNodeStack.Pop();
OpSubSup();
- SmNode *pSecond = NodeStack.Pop();
+ SmNode *pSecond = m_aNodeStack.Pop();
Sum();
- pSNode->SetSubNodes(pFirst, pSecond, NodeStack.Pop());
- NodeStack.Push(pSNode);
+ pSNode->SetSubNodes(pFirst, pSecond, m_aNodeStack.Pop());
+ m_aNodeStack.Push(pSNode);
}
}
@@ -1158,16 +1159,16 @@ void SmParser::Sum()
Product();
while (TokenInGroup(TGSUM))
{
- SmStructureNode *pSNode = new SmBinHorNode(CurToken);
- SmNode *pFirst = NodeStack.Pop();
+ SmStructureNode *pSNode = new SmBinHorNode(m_aCurToken);
+ SmNode *pFirst = m_aNodeStack.Pop();
OpSubSup();
- SmNode *pSecond = NodeStack.Pop();
+ SmNode *pSecond = m_aNodeStack.Pop();
Product();
- pSNode->SetSubNodes(pFirst, pSecond, NodeStack.Pop());
- NodeStack.Push(pSNode);
+ pSNode->SetSubNodes(pFirst, pSecond, m_aNodeStack.Pop());
+ m_aNodeStack.Push(pSNode);
}
}
@@ -1178,36 +1179,36 @@ void SmParser::Product()
while (TokenInGroup(TGPRODUCT))
{ SmStructureNode *pSNode;
- SmNode *pFirst = NodeStack.Pop(),
+ SmNode *pFirst = m_aNodeStack.Pop(),
*pOper;
bool bSwitchArgs = false;
- SmTokenType eType = CurToken.eType;
+ SmTokenType eType = m_aCurToken.eType;
switch (eType)
{
case TOVER:
- pSNode = new SmBinVerNode(CurToken);
- pOper = new SmRectangleNode(CurToken);
+ pSNode = new SmBinVerNode(m_aCurToken);
+ pOper = new SmRectangleNode(m_aCurToken);
NextToken();
break;
case TBOPER:
- pSNode = new SmBinHorNode(CurToken);
+ pSNode = new SmBinHorNode(m_aCurToken);
NextToken();
//Let the glyph node know it's a binary operation
- CurToken.eType = TBOPER;
- CurToken.nGroup = TGPRODUCT;
+ m_aCurToken.eType = TBOPER;
+ m_aCurToken.nGroup = TGPRODUCT;
GlyphSpecial();
- pOper = NodeStack.Pop();
+ pOper = m_aNodeStack.Pop();
break;
case TOVERBRACE :
case TUNDERBRACE :
- pSNode = new SmVerticalBraceNode(CurToken);
- pOper = new SmMathSymbolNode(CurToken);
+ pSNode = new SmVerticalBraceNode(m_aCurToken);
+ pOper = new SmMathSymbolNode(m_aCurToken);
NextToken();
break;
@@ -1215,11 +1216,11 @@ void SmParser::Product()
case TWIDEBACKSLASH:
case TWIDESLASH:
{
- SmBinDiagonalNode *pSTmp = new SmBinDiagonalNode(CurToken);
+ SmBinDiagonalNode *pSTmp = new SmBinDiagonalNode(m_aCurToken);
pSTmp->SetAscending(eType == TWIDESLASH);
pSNode = pSTmp;
- pOper = new SmPolyLineNode(CurToken);
+ pOper = new SmPolyLineNode(m_aCurToken);
NextToken();
bSwitchArgs = true;
@@ -1227,25 +1228,25 @@ void SmParser::Product()
}
default:
- pSNode = new SmBinHorNode(CurToken);
+ pSNode = new SmBinHorNode(m_aCurToken);
OpSubSup();
- pOper = NodeStack.Pop();
+ pOper = m_aNodeStack.Pop();
}
Power();
if (bSwitchArgs)
//! vgl siehe SmBinDiagonalNode::Arrange
- pSNode->SetSubNodes(pFirst, NodeStack.Pop(), pOper);
+ pSNode->SetSubNodes(pFirst, m_aNodeStack.Pop(), pOper);
else
- pSNode->SetSubNodes(pFirst, pOper, NodeStack.Pop());
- NodeStack.Push(pSNode);
+ pSNode->SetSubNodes(pFirst, pOper, m_aNodeStack.Pop());
+ m_aNodeStack.Push(pSNode);
}
}
-void SmParser::SubSup(ULONG nActiveGroup)
+void SmParser::SubSup(sal_uLong nActiveGroup)
{
OSL_ENSURE(nActiveGroup == TGPOWER || nActiveGroup == TGLIMIT,
"Sm: wrong token group");
@@ -1254,8 +1255,8 @@ void SmParser::SubSup(ULONG nActiveGroup)
// already finish
return;
- SmSubSupNode *pNode = new SmSubSupNode(CurToken);
- //! Of course 'CurToken' is just the first sub-/supscript token.
+ SmSubSupNode *pNode = new SmSubSupNode(m_aCurToken);
+ //! Of course 'm_aCurToken' is just the first sub-/supscript token.
//! It should be of no further interest. The positions of the
//! sub-/supscripts will be identified by the corresponding subnodes
//! index in the 'aSubNodes' array (enum value from 'SmSubSup').
@@ -1265,14 +1266,14 @@ void SmParser::SubSup(ULONG nActiveGroup)
// initialize subnodes array
SmNodeArray aSubNodes;
aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES);
- aSubNodes[0] = NodeStack.Pop();
- for (USHORT i = 1; i < aSubNodes.size(); i++)
+ aSubNodes[0] = m_aNodeStack.Pop();
+ for (sal_uInt16 i = 1; i < aSubNodes.size(); i++)
aSubNodes[i] = NULL;
// process all sub-/supscripts
int nIndex = 0;
while (TokenInGroup(nActiveGroup))
- { SmTokenType eType (CurToken.eType);
+ { SmTokenType eType (m_aCurToken.eType);
// skip sub-/supscript token
NextToken();
@@ -1305,18 +1306,18 @@ void SmParser::SubSup(ULONG nActiveGroup)
// set sub-/supscript if not already done
if (aSubNodes[nIndex] != NULL)
Error(PE_DOUBLE_SUBSUPSCRIPT);
- aSubNodes[nIndex] = NodeStack.Pop();
+ aSubNodes[nIndex] = m_aNodeStack.Pop();
}
pNode->SetSubNodes(aSubNodes);
- NodeStack.Push(pNode);
+ m_aNodeStack.Push(pNode);
}
void SmParser::OpSubSup()
{
// push operator symbol
- NodeStack.Push(new SmMathSymbolNode(CurToken));
+ m_aNodeStack.Push(new SmMathSymbolNode(m_aCurToken));
// skip operator token
NextToken();
// get sub- supscripts if any
@@ -1337,28 +1338,28 @@ void SmParser::Power()
void SmParser::Blank()
{
OSL_ENSURE(TokenInGroup(TGBLANK), "Sm : wrong token");
- SmBlankNode *pBlankNode = new SmBlankNode(CurToken);
+ SmBlankNode *pBlankNode = new SmBlankNode(m_aCurToken);
while (TokenInGroup(TGBLANK))
{
- pBlankNode->IncreaseBy(CurToken);
+ pBlankNode->IncreaseBy(m_aCurToken);
NextToken();
}
// Blanks am Zeilenende ignorieren wenn die entsprechende Option gesetzt ist
- if ( CurToken.eType == TNEWLINE ||
- (CurToken.eType == TEND && SM_MOD()->GetConfig()->IsIgnoreSpacesRight()) )
+ if ( m_aCurToken.eType == TNEWLINE ||
+ (m_aCurToken.eType == TEND && SM_MOD()->GetConfig()->IsIgnoreSpacesRight()) )
{
pBlankNode->Clear();
}
- NodeStack.Push(pBlankNode);
+ m_aNodeStack.Push(pBlankNode);
}
void SmParser::Term()
{
- switch (CurToken.eType)
+ switch (m_aCurToken.eType)
{
case TESCAPE :
Escape();
@@ -1367,15 +1368,15 @@ void SmParser::Term()
case TNOSPACE :
case TLGROUP :
{
- bool bNoSpace = CurToken.eType == TNOSPACE;
+ bool bNoSpace = m_aCurToken.eType == TNOSPACE;
if (bNoSpace) // push 'no space' node and continue to parse expression
{
- NodeStack.Push(new SmExpressionNode(CurToken));
+ m_aNodeStack.Push(new SmExpressionNode(m_aCurToken));
NextToken();
}
- if (CurToken.eType != TLGROUP)
+ if (m_aCurToken.eType != TLGROUP)
{
- NodeStack.Pop(); // get rid of the 'no space' node pushed above
+ m_aNodeStack.Pop(); // get rid of the 'no space' node pushed above
Term();
}
else
@@ -1383,20 +1384,20 @@ void SmParser::Term()
NextToken();
// allow for empty group
- if (CurToken.eType == TRGROUP)
+ if (m_aCurToken.eType == TRGROUP)
{
if (bNoSpace) // get rid of the 'no space' node pushed above
- NodeStack.Pop();
- SmStructureNode *pSNode = new SmExpressionNode(CurToken);
+ m_aNodeStack.Pop();
+ SmStructureNode *pSNode = new SmExpressionNode(m_aCurToken);
pSNode->SetSubNodes(NULL, NULL);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
NextToken();
}
else // go as usual
{
Align();
- if (CurToken.eType != TRGROUP)
+ if (m_aCurToken.eType != TRGROUP)
Error(PE_RGROUP_EXPECTED);
else
NextToken();
@@ -1415,16 +1416,16 @@ void SmParser::Term()
break;
case TTEXT :
- NodeStack.Push(new SmTextNode(CurToken, FNT_TEXT));
+ m_aNodeStack.Push(new SmTextNode(m_aCurToken, FNT_TEXT));
NextToken();
break;
case TIDENT :
case TCHARACTER :
- NodeStack.Push(new SmTextNode(CurToken, FNT_VARIABLE));
+ m_aNodeStack.Push(new SmTextNode(m_aCurToken, FNT_VARIABLE));
NextToken();
break;
case TNUMBER :
- NodeStack.Push(new SmTextNode(CurToken, FNT_NUMBER));
+ m_aNodeStack.Push(new SmTextNode(m_aCurToken, FNT_NUMBER));
NextToken();
break;
@@ -1461,12 +1462,12 @@ void SmParser::Term()
case TDOTSLOW :
case TDOTSUP :
case TDOTSVERT :
- NodeStack.Push(new SmMathSymbolNode(CurToken));
+ m_aNodeStack.Push(new SmMathSymbolNode(m_aCurToken));
NextToken();
break;
case TPLACE:
- NodeStack.Push(new SmPlaceNode(CurToken));
+ m_aNodeStack.Push(new SmPlaceNode(m_aCurToken));
NextToken();
break;
@@ -1501,7 +1502,7 @@ void SmParser::Term()
{ SmStructureNodeArray aArray;
bool bIsAttr;
- USHORT n = 0;
+ sal_uInt16 n = 0;
while (true == (bIsAttr = TokenInGroup(TGATTRIBUT))
|| TokenInGroup(TGFONTATTR))
{ aArray.resize(n + 1);
@@ -1514,19 +1515,19 @@ void SmParser::Term()
// check if casting in following line is ok
OSL_ENSURE(!NodeStack.Top()->IsVisible(), "Sm : Ooops...");
- aArray[n] = (SmStructureNode *) NodeStack.Pop();
+ aArray[n] = (SmStructureNode *) m_aNodeStack.Pop();
n++;
}
Power();
- SmNode *pFirstNode = NodeStack.Pop();
+ SmNode *pFirstNode = m_aNodeStack.Pop();
while (n > 0)
{ aArray[n - 1]->SetSubNodes(0, pFirstNode);
pFirstNode = aArray[n - 1];
n--;
}
- NodeStack.Push(pFirstNode);
+ m_aNodeStack.Push(pFirstNode);
}
else if (TokenInGroup(TGFUNCTION))
{ if (CONVERT_40_TO_50 != GetConversion())
@@ -1542,9 +1543,9 @@ void SmParser::Term()
//
Function();
- SmNode *pFunc = NodeStack.Pop();
+ SmNode *pFunc = m_aNodeStack.Pop();
- if (CurToken.eType == TLPARENT)
+ if (m_aCurToken.eType == TLPARENT)
{ Term();
}
else
@@ -1555,8 +1556,8 @@ void SmParser::Term()
Insert('}', GetTokenIndex());
SmStructureNode *pSNode = new SmExpressionNode(pFunc->GetToken());
- pSNode->SetSubNodes(pFunc, NodeStack.Pop());
- NodeStack.Push(pSNode);
+ pSNode->SetSubNodes(pFunc, m_aNodeStack.Pop());
+ m_aNodeStack.Push(pSNode);
}
}
else
@@ -1569,7 +1570,7 @@ void SmParser::Escape()
{
NextToken();
- switch (CurToken.eType)
+ switch (m_aCurToken.eType)
{
case TLPARENT :
case TRPARENT :
@@ -1596,8 +1597,8 @@ void SmParser::Escape()
Error(PE_UNEXPECTED_TOKEN);
}
- SmNode *pNode = new SmMathSymbolNode(CurToken);
- NodeStack.Push(pNode);
+ SmNode *pNode = new SmMathSymbolNode(m_aCurToken);
+ m_aNodeStack.Push(pNode);
NextToken();
}
@@ -1606,27 +1607,27 @@ void SmParser::Escape()
void SmParser::Operator()
{
if (TokenInGroup(TGOPER))
- { SmStructureNode *pSNode = new SmOperNode(CurToken);
+ { SmStructureNode *pSNode = new SmOperNode(m_aCurToken);
// put operator on top of stack
Oper();
if (TokenInGroup(TGLIMIT) || TokenInGroup(TGPOWER))
- SubSup(CurToken.nGroup);
- SmNode *pOperator = NodeStack.Pop();
+ SubSup(m_aCurToken.nGroup);
+ SmNode *pOperator = m_aNodeStack.Pop();
// get argument
Power();
- pSNode->SetSubNodes(pOperator, NodeStack.Pop());
- NodeStack.Push(pSNode);
+ pSNode->SetSubNodes(pOperator, m_aNodeStack.Pop());
+ m_aNodeStack.Push(pSNode);
}
}
void SmParser::Oper()
{
- SmTokenType eType (CurToken.eType);
+ SmTokenType eType (m_aCurToken.eType);
SmNode *pNode = NULL;
switch (eType)
@@ -1640,7 +1641,7 @@ void SmParser::Oper()
case TLINT :
case TLLINT :
case TLLLINT :
- pNode = new SmMathSymbolNode(CurToken);
+ pNode = new SmMathSymbolNode(m_aCurToken);
break;
case TLIM :
@@ -1657,27 +1658,27 @@ void SmParser::Oper()
break;
}
if( pLim )
- CurToken.aText.AssignAscii( pLim );
- pNode = new SmTextNode(CurToken, FNT_TEXT);
+ m_aCurToken.aText.AssignAscii( pLim );
+ pNode = new SmTextNode(m_aCurToken, FNT_TEXT);
}
break;
case TOVERBRACE :
case TUNDERBRACE :
- pNode = new SmMathSymbolNode(CurToken);
+ pNode = new SmMathSymbolNode(m_aCurToken);
break;
case TOPER :
NextToken();
OSL_ENSURE(CurToken.eType == TSPECIAL, "Sm: wrong token");
- pNode = new SmGlyphSpecialNode(CurToken);
+ pNode = new SmGlyphSpecialNode(m_aCurToken);
break;
default :
OSL_FAIL("Sm: unknown case");
}
- NodeStack.Push(pNode);
+ m_aNodeStack.Push(pNode);
NextToken();
}
@@ -1687,8 +1688,8 @@ void SmParser::UnOper()
{
OSL_ENSURE(TokenInGroup(TGUNOPER), "Sm: wrong token");
- SmToken aNodeToken = CurToken;
- SmTokenType eType = CurToken.eType;
+ SmToken aNodeToken = m_aCurToken;
+ SmTokenType eType = m_aCurToken.eType;
bool bIsPostfix = eType == TFACT;
SmStructureNode *pSNode;
@@ -1706,16 +1707,16 @@ void SmParser::UnOper()
case TNROOT :
NextToken();
Power();
- pExtra = NodeStack.Pop();
+ pExtra = m_aNodeStack.Pop();
break;
case TUOPER :
NextToken();
//Let the glyph know what it is...
- CurToken.eType = TUOPER;
- CurToken.nGroup = TGUNOPER;
+ m_aCurToken.eType = TUOPER;
+ m_aCurToken.nGroup = TGUNOPER;
GlyphSpecial();
- pOper = NodeStack.Pop();
+ pOper = m_aNodeStack.Pop();
break;
case TPLUS :
@@ -1725,7 +1726,7 @@ void SmParser::UnOper()
case TNEG :
case TFACT :
OpSubSup();
- pOper = NodeStack.Pop();
+ pOper = m_aNodeStack.Pop();
break;
default :
@@ -1734,7 +1735,7 @@ void SmParser::UnOper()
// get argument
Power();
- pArg = NodeStack.Pop();
+ pArg = m_aNodeStack.Pop();
if (eType == TABS)
{ pSNode = new SmBraceNode(aNodeToken);
@@ -1768,7 +1769,7 @@ void SmParser::UnOper()
pSNode->SetSubNodes(pOper, pArg);
}
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
@@ -1776,35 +1777,35 @@ void SmParser::Attribut()
{
OSL_ENSURE(TokenInGroup(TGATTRIBUT), "Sm: wrong token group");
- SmStructureNode *pSNode = new SmAttributNode(CurToken);
+ SmStructureNode *pSNode = new SmAttributNode(m_aCurToken);
SmNode *pAttr;
SmScaleMode eScaleMode = SCALE_NONE;
// get appropriate node for the attribut itself
- switch (CurToken.eType)
+ switch (m_aCurToken.eType)
{ case TUNDERLINE :
case TOVERLINE :
case TOVERSTRIKE :
- pAttr = new SmRectangleNode(CurToken);
+ pAttr = new SmRectangleNode(m_aCurToken);
eScaleMode = SCALE_WIDTH;
break;
case TWIDEVEC :
case TWIDEHAT :
case TWIDETILDE :
- pAttr = new SmMathSymbolNode(CurToken);
+ pAttr = new SmMathSymbolNode(m_aCurToken);
eScaleMode = SCALE_WIDTH;
break;
default :
- pAttr = new SmMathSymbolNode(CurToken);
+ pAttr = new SmMathSymbolNode(m_aCurToken);
}
NextToken();
pSNode->SetSubNodes(pAttr, 0);
pSNode->SetScaleMode(eScaleMode);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
@@ -1812,14 +1813,14 @@ void SmParser::FontAttribut()
{
OSL_ENSURE(TokenInGroup(TGFONTATTR), "Sm: wrong token group");
- switch (CurToken.eType)
+ switch (m_aCurToken.eType)
{
case TITALIC :
case TNITALIC :
case TBOLD :
case TNBOLD :
case TPHANTOM :
- NodeStack.Push(new SmFontNode(CurToken));
+ m_aNodeStack.Push(new SmFontNode(m_aCurToken));
NextToken();
break;
@@ -1851,14 +1852,14 @@ void SmParser::Color()
{ NextToken();
if (TokenInGroup(TGCOLOR))
- { aToken = CurToken;
+ { aToken = m_aCurToken;
NextToken();
}
else
Error(PE_COLOR_EXPECTED);
- } while (CurToken.eType == TCOLOR);
+ } while (m_aCurToken.eType == TCOLOR);
- NodeStack.Push(new SmFontNode(aToken));
+ m_aNodeStack.Push(new SmFontNode(aToken));
}
@@ -1872,14 +1873,14 @@ void SmParser::Font()
{ NextToken();
if (TokenInGroup(TGFONT))
- { aToken = CurToken;
+ { aToken = m_aCurToken;
NextToken();
}
else
Error(PE_FONT_EXPECTED);
- } while (CurToken.eType == TFONT);
+ } while (m_aCurToken.eType == TFONT);
- NodeStack.Push(new SmFontNode(aToken));
+ m_aNodeStack.Push(new SmFontNode(aToken));
}
@@ -1909,12 +1910,12 @@ void SmParser::FontSize()
{
OSL_ENSURE(CurToken.eType == TSIZE, "Sm : Ooops...");
- USHORT Type;
- SmFontNode *pFontNode = new SmFontNode(CurToken);
+ sal_uInt16 Type;
+ SmFontNode *pFontNode = new SmFontNode(m_aCurToken);
NextToken();
- switch (CurToken.eType)
+ switch (m_aCurToken.eType)
{
case TNUMBER: Type = FNTSIZ_ABSOLUT; break;
case TPLUS: Type = FNTSIZ_PLUS; break;
@@ -1931,7 +1932,7 @@ void SmParser::FontSize()
if (Type != FNTSIZ_ABSOLUT)
{
NextToken();
- if (CurToken.eType != TNUMBER)
+ if (m_aCurToken.eType != TNUMBER)
{
delete pFontNode;
Error(PE_SIZE_EXPECTED);
@@ -1941,10 +1942,10 @@ void SmParser::FontSize()
// get number argument
Fraction aValue( 1L );
- if (lcl_IsNumber( CurToken.aText ))
+ if (lcl_IsNumber( m_aCurToken.aText ))
{
double fTmp;
- if ((fTmp = CurToken.aText.ToDouble()) != 0.0)
+ if ((fTmp = m_aCurToken.aText.ToDouble()) != 0.0)
{
aValue = fTmp;
@@ -1970,7 +1971,7 @@ void SmParser::FontSize()
NextToken();
pFontNode->SetSizeParameter(aValue, Type);
- NodeStack.Push(pFontNode);
+ m_aNodeStack.Push(pFontNode);
}
@@ -1979,14 +1980,14 @@ void SmParser::Brace()
OSL_ENSURE(CurToken.eType == TLEFT || TokenInGroup(TGLBRACES),
"Sm: kein Klammer Ausdruck");
- SmStructureNode *pSNode = new SmBraceNode(CurToken);
+ SmStructureNode *pSNode = new SmBraceNode(m_aCurToken);
SmNode *pBody = 0,
*pLeft = 0,
*pRight = 0;
SmScaleMode eScaleMode = SCALE_NONE;
SmParseError eError = PE_NONE;
- if (CurToken.eType == TLEFT)
+ if (m_aCurToken.eType == TLEFT)
{ NextToken();
eScaleMode = SCALE_HEIGHT;
@@ -1994,19 +1995,19 @@ void SmParser::Brace()
// check for left bracket
if (TokenInGroup(TGLBRACES) || TokenInGroup(TGRBRACES))
{
- pLeft = new SmMathSymbolNode(CurToken);
+ pLeft = new SmMathSymbolNode(m_aCurToken);
NextToken();
Bracebody(true);
- pBody = NodeStack.Pop();
+ pBody = m_aNodeStack.Pop();
- if (CurToken.eType == TRIGHT)
+ if (m_aCurToken.eType == TRIGHT)
{ NextToken();
// check for right bracket
if (TokenInGroup(TGLBRACES) || TokenInGroup(TGRBRACES))
{
- pRight = new SmMathSymbolNode(CurToken);
+ pRight = new SmMathSymbolNode(m_aCurToken);
NextToken();
}
else
@@ -2022,11 +2023,11 @@ void SmParser::Brace()
{
if (TokenInGroup(TGLBRACES))
{
- pLeft = new SmMathSymbolNode(CurToken);
+ pLeft = new SmMathSymbolNode(m_aCurToken);
NextToken();
Bracebody(false);
- pBody = NodeStack.Pop();
+ pBody = m_aNodeStack.Pop();
SmTokenType eExpectedType = TUNKNOWN;
switch (pLeft->GetToken().eType)
@@ -2043,9 +2044,9 @@ void SmParser::Brace()
OSL_FAIL("Sm: unknown case");
}
- if (CurToken.eType == eExpectedType)
+ if (m_aCurToken.eType == eExpectedType)
{
- pRight = new SmMathSymbolNode(CurToken);
+ pRight = new SmMathSymbolNode(m_aCurToken);
NextToken();
}
else
@@ -2060,7 +2061,7 @@ void SmParser::Brace()
OSL_ENSURE(pRight, "Sm: NULL pointer");
pSNode->SetSubNodes(pLeft, pBody, pRight);
pSNode->SetScaleMode(eScaleMode);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
else
{ delete pSNode;
@@ -2075,37 +2076,37 @@ void SmParser::Brace()
void SmParser::Bracebody(bool bIsLeftRight)
{
- SmStructureNode *pBody = new SmBracebodyNode(CurToken);
+ SmStructureNode *pBody = new SmBracebodyNode(m_aCurToken);
SmNodeArray aNodes;
- USHORT nNum = 0;
+ sal_uInt16 nNum = 0;
// get body if any
if (bIsLeftRight)
{
do
{
- if (CurToken.eType == TMLINE)
+ if (m_aCurToken.eType == TMLINE)
{
- NodeStack.Push(new SmMathSymbolNode(CurToken));
+ m_aNodeStack.Push(new SmMathSymbolNode(m_aCurToken));
NextToken();
nNum++;
}
- else if (CurToken.eType != TRIGHT)
+ else if (m_aCurToken.eType != TRIGHT)
{ Align();
nNum++;
- if (CurToken.eType != TMLINE && CurToken.eType != TRIGHT)
+ if (m_aCurToken.eType != TMLINE && m_aCurToken.eType != TRIGHT)
Error(PE_RIGHT_EXPECTED);
}
- } while (CurToken.eType != TEND && CurToken.eType != TRIGHT);
+ } while (m_aCurToken.eType != TEND && m_aCurToken.eType != TRIGHT);
}
else
{
do
{
- if (CurToken.eType == TMLINE)
+ if (m_aCurToken.eType == TMLINE)
{
- NodeStack.Push(new SmMathSymbolNode(CurToken));
+ m_aNodeStack.Push(new SmMathSymbolNode(m_aCurToken));
NextToken();
nNum++;
}
@@ -2113,26 +2114,26 @@ void SmParser::Bracebody(bool bIsLeftRight)
{ Align();
nNum++;
- if (CurToken.eType != TMLINE && !TokenInGroup(TGRBRACES))
+ if (m_aCurToken.eType != TMLINE && !TokenInGroup(TGRBRACES))
Error(PE_RBRACE_EXPECTED);
}
- } while (CurToken.eType != TEND && !TokenInGroup(TGRBRACES));
+ } while (m_aCurToken.eType != TEND && !TokenInGroup(TGRBRACES));
}
// build argument vector in parsing order
aNodes.resize(nNum);
- for (USHORT i = 0; i < nNum; i++)
- aNodes[nNum - 1 - i] = NodeStack.Pop();
+ for (sal_uInt16 i = 0; i < nNum; i++)
+ aNodes[nNum - 1 - i] = m_aNodeStack.Pop();
pBody->SetSubNodes(aNodes);
pBody->SetScaleMode(bIsLeftRight ? SCALE_HEIGHT : SCALE_NONE);
- NodeStack.Push(pBody);
+ m_aNodeStack.Push(pBody);
}
void SmParser::Function()
{
- switch (CurToken.eType)
+ switch (m_aCurToken.eType)
{
case TFUNC:
NextToken(); // skip "FUNC"-statement
@@ -2157,7 +2158,7 @@ void SmParser::Function()
case TLN :
case TLOG :
case TEXP :
- NodeStack.Push(new SmTextNode(CurToken, FNT_FUNCTION));
+ m_aNodeStack.Push(new SmTextNode(m_aCurToken, FNT_FUNCTION));
NextToken();
break;
@@ -2170,7 +2171,7 @@ void SmParser::Function()
void SmParser::Binom()
{
SmNodeArray ExpressionArray;
- SmStructureNode *pSNode = new SmTableNode(CurToken);
+ SmStructureNode *pSNode = new SmTableNode(m_aCurToken);
NextToken();
@@ -2180,10 +2181,10 @@ void SmParser::Binom()
ExpressionArray.resize(2);
for (int i = 0; i < 2; i++)
- ExpressionArray[2 - (i + 1)] = NodeStack.Pop();
+ ExpressionArray[2 - (i + 1)] = m_aNodeStack.Pop();
pSNode->SetSubNodes(ExpressionArray);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
@@ -2191,9 +2192,9 @@ void SmParser::Stack()
{
SmNodeArray ExpressionArray;
NextToken();
- if (CurToken.eType == TLGROUP)
+ if (m_aCurToken.eType == TLGROUP)
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
do
{
@@ -2201,25 +2202,25 @@ void SmParser::Stack()
Align();
n++;
}
- while (CurToken.eType == TPOUND);
+ while (m_aCurToken.eType == TPOUND);
ExpressionArray.resize(n);
- for (USHORT i = 0; i < n; i++)
- ExpressionArray[n - (i + 1)] = NodeStack.Pop();
+ for (sal_uInt16 i = 0; i < n; i++)
+ ExpressionArray[n - (i + 1)] = m_aNodeStack.Pop();
- if (CurToken.eType != TRGROUP)
+ if (m_aCurToken.eType != TRGROUP)
Error(PE_RGROUP_EXPECTED);
NextToken();
//We need to let the table node know it context
//it's used in SmNodeToTextVisitor
- SmToken aTok = CurToken;
+ SmToken aTok = m_aCurToken;
aTok.eType = TSTACK;
SmStructureNode *pSNode = new SmTableNode(aTok);
pSNode->SetSubNodes(ExpressionArray);
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
}
else
Error(PE_LGROUP_EXPECTED);
@@ -2231,9 +2232,9 @@ void SmParser::Matrix()
SmNodeArray ExpressionArray;
NextToken();
- if (CurToken.eType == TLGROUP)
+ if (m_aCurToken.eType == TLGROUP)
{
- USHORT c = 0;
+ sal_uInt16 c = 0;
do
{
@@ -2241,19 +2242,19 @@ void SmParser::Matrix()
Align();
c++;
}
- while (CurToken.eType == TPOUND);
+ while (m_aCurToken.eType == TPOUND);
- USHORT r = 1;
+ sal_uInt16 r = 1;
- while (CurToken.eType == TDPOUND)
+ while (m_aCurToken.eType == TDPOUND)
{
NextToken();
- for (USHORT i = 0; i < c; i++)
+ for (sal_uInt16 i = 0; i < c; i++)
{
Align();
if (i < (c - 1))
{
- if (CurToken.eType == TPOUND)
+ if (m_aCurToken.eType == TPOUND)
{
NextToken();
}
@@ -2269,18 +2270,18 @@ void SmParser::Matrix()
ExpressionArray.resize(nRC);
- for (USHORT i = 0; i < (nRC); i++)
- ExpressionArray[(nRC) - (i + 1)] = NodeStack.Pop();
+ for (sal_uInt16 i = 0; i < (nRC); i++)
+ ExpressionArray[(nRC) - (i + 1)] = m_aNodeStack.Pop();
- if (CurToken.eType != TRGROUP)
+ if (m_aCurToken.eType != TRGROUP)
Error(PE_RGROUP_EXPECTED);
NextToken();
- SmMatrixNode *pMNode = new SmMatrixNode(CurToken);
+ SmMatrixNode *pMNode = new SmMatrixNode(m_aCurToken);
pMNode->SetSubNodes(ExpressionArray);
pMNode->SetRowCol(r, c);
- NodeStack.Push(pMNode);
+ m_aNodeStack.Push(pMNode);
}
else
Error(PE_LGROUP_EXPECTED);
@@ -2290,7 +2291,7 @@ void SmParser::Matrix()
void SmParser::Special()
{
bool bReplace = false;
- String &rName = CurToken.aText;
+ String &rName = m_aCurToken.aText;
String aNewName;
if (CONVERT_NONE == GetConversion())
@@ -2336,8 +2337,8 @@ void SmParser::Special()
{
OSL_ENSURE( pFrom->Count() == pTo->Count(),
"array length mismatch" );
- USHORT nCount = sal::static_int_cast< USHORT >(pFrom->Count());
- for (USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = sal::static_int_cast< sal_uInt16 >(pFrom->Count());
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
if (pFrom->GetString(i) == rName)
{
@@ -2357,28 +2358,33 @@ void SmParser::Special()
rName = aNewName;
}
- NodeStack.Push(new SmSpecialNode(CurToken));
+ // add symbol name to list of used symbols
+ const String aSymbolName( m_aCurToken.aText.Copy( 1 ) );
+ if (aSymbolName.Len() > 0 )
+ AddToUsedSymbols( aSymbolName );
+
+ m_aNodeStack.Push(new SmSpecialNode(m_aCurToken));
NextToken();
}
void SmParser::GlyphSpecial()
{
- NodeStack.Push(new SmGlyphSpecialNode(CurToken));
+ m_aNodeStack.Push(new SmGlyphSpecialNode(m_aCurToken));
NextToken();
}
void SmParser::Error(SmParseError eError)
{
- SmStructureNode *pSNode = new SmExpressionNode(CurToken);
- SmErrorNode *pErr = new SmErrorNode(eError, CurToken);
+ SmStructureNode *pSNode = new SmExpressionNode(m_aCurToken);
+ SmErrorNode *pErr = new SmErrorNode(eError, m_aCurToken);
pSNode->SetSubNodes(pErr, 0);
//! put a structure node on the stack (instead of the error node itself)
//! because sometimes such a node is expected in order to attach some
//! subnodes
- NodeStack.Push(pSNode);
+ m_aNodeStack.Push(pSNode);
AddError(eError, pSNode);
@@ -2391,56 +2397,57 @@ void SmParser::Error(SmParseError eError)
SmParser::SmParser()
{
- eConversion = CONVERT_NONE;
- bImportSymNames = bExportSymNames = false;
- nLang = Application::GetSettings().GetUILanguage();
+ m_eConversion = CONVERT_NONE;
+ bImportSymNames = m_bExportSymNames = false;
+ m_nLang = Application::GetSettings().GetUILanguage();
}
-
SmNode *SmParser::Parse(const String &rBuffer)
{
- BufferString = rBuffer;
- BufferString.ConvertLineEnd( LINEEND_LF );
- BufferIndex = 0;
- nTokenIndex = 0;
- Row = 1;
- ColOff = 0;
- CurError = -1;
+ ClearUsedSymbols();
+
+ m_aBufferString = rBuffer;
+ m_aBufferString.ConvertLineEnd( LINEEND_LF );
+ m_nBufferIndex = 0;
+ m_nTokenIndex = 0;
+ m_Row = 1;
+ m_nColOff = 0;
+ m_nCurError = -1;
- for ( size_t i = 0, n = ErrDescList.size(); i < n; ++i )
- delete ErrDescList[ i ];
- ErrDescList.clear();
+ for ( size_t i = 0, n = m_aErrDescList.size(); i < n; ++i )
+ delete m_aErrDescList[ i ];
+ m_aErrDescList.clear();
- NodeStack.Clear();
+ m_aNodeStack.Clear();
SetLanguage( Application::GetSettings().GetUILanguage() );
NextToken();
Table();
- return NodeStack.Pop();
+ return m_aNodeStack.Pop();
}
SmNode *SmParser::ParseExpression(const String &rBuffer)
{
- BufferString = rBuffer;
- BufferString.ConvertLineEnd( LINEEND_LF );
- BufferIndex = 0;
- nTokenIndex = 0;
- Row = 1;
- ColOff = 0;
- CurError = -1;
+ m_aBufferString = rBuffer;
+ m_aBufferString.ConvertLineEnd( LINEEND_LF );
+ m_nBufferIndex = 0;
+ m_nTokenIndex = 0;
+ m_Row = 1;
+ m_nColOff = 0;
+ m_nCurError = -1;
- for ( size_t i = 0, n = ErrDescList.size(); i < n; ++i )
- delete ErrDescList[ i ];
- ErrDescList.clear();
+ for ( size_t i = 0, n = m_aErrDescList.size(); i < n; ++i )
+ delete m_aErrDescList[ i ];
+ m_aErrDescList.clear();
- NodeStack.Clear();
+ m_aNodeStack.Clear();
SetLanguage( Application::GetSettings().GetUILanguage() );
NextToken();
Expression();
- return NodeStack.Pop();
+ return m_aNodeStack.Pop();
}
@@ -2452,7 +2459,7 @@ size_t SmParser::AddError(SmParseError Type, SmNode *pNode)
pErrDesc->pNode = pNode;
pErrDesc->Text = String(SmResId(RID_ERR_IDENT));
- USHORT nRID;
+ sal_uInt16 nRID;
switch (Type)
{
case PE_UNEXPECTED_CHAR: nRID = RID_ERR_UNEXPECTEDCHARACTER; break;
@@ -2474,20 +2481,20 @@ size_t SmParser::AddError(SmParseError Type, SmNode *pNode)
}
pErrDesc->Text += SmResId(nRID);
- ErrDescList.push_back( pErrDesc );
+ m_aErrDescList.push_back( pErrDesc );
- return ErrDescList.size()-1;
+ return m_aErrDescList.size()-1;
}
const SmErrorDesc *SmParser::NextError()
{
- if ( !ErrDescList.empty() )
- if (CurError > 0) return ErrDescList[ --CurError ];
+ if ( !m_aErrDescList.empty() )
+ if (m_nCurError > 0) return m_aErrDescList[ --m_nCurError ];
else
{
- CurError = 0;
- return ErrDescList[ CurError ];
+ m_nCurError = 0;
+ return m_aErrDescList[ m_nCurError ];
}
else return NULL;
}
@@ -2495,12 +2502,12 @@ const SmErrorDesc *SmParser::NextError()
const SmErrorDesc *SmParser::PrevError()
{
- if ( !ErrDescList.empty() )
- if (CurError < (int) (ErrDescList.size() - 1)) return ErrDescList[ ++CurError ];
+ if ( !m_aErrDescList.empty() )
+ if (m_nCurError < (int) (m_aErrDescList.size() - 1)) return m_aErrDescList[ ++m_nCurError ];
else
{
- CurError = (int) (ErrDescList.size() - 1);
- return ErrDescList[ CurError ];
+ m_nCurError = (int) (m_aErrDescList.size() - 1);
+ return m_aErrDescList[ m_nCurError ];
}
else return NULL;
}
@@ -2508,9 +2515,9 @@ const SmErrorDesc *SmParser::PrevError()
const SmErrorDesc *SmParser::GetError(size_t i)
{
- return ( i < ErrDescList.size() )
- ? ErrDescList[ i ]
- : ErrDescList[ CurError ];
+ return ( i < m_aErrDescList.size() )
+ ? m_aErrDescList[ i ]
+ : m_aErrDescList[ m_nCurError ];
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index 2735e3e7c140..b69abbd455c6 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -140,7 +140,7 @@ void SmRect::CopyAlignInfo(const SmRect &rRect)
void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
- const XubString &rText, USHORT nBorder)
+ const XubString &rText, sal_uInt16 nBorder)
{
OSL_ENSURE(aTopLeft == Point(0, 0), "Sm: Ooops...");
@@ -235,7 +235,7 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
void SmRect::Init(const OutputDevice &rDev, const SmFormat *pFormat,
- const XubString &rText, USHORT nEBorderWidth)
+ const XubString &rText, sal_uInt16 nEBorderWidth)
// get rectangle fitting for drawing 'rText' on OutputDevice 'rDev'
{
BuildRect(rDev, pFormat, rText, nEBorderWidth);
@@ -248,7 +248,7 @@ SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat,
OSL_ENSURE( nEBorderWidth >= 0, "BorderWidth is negative" );
if (nEBorderWidth < 0)
nEBorderWidth = 0;
- Init(rDev, pFormat, rText, (USHORT) nEBorderWidth);
+ Init(rDev, pFormat, rText, (sal_uInt16) nEBorderWidth);
}
diff --git a/starmath/source/register.cxx b/starmath/source/register.cxx
index 3171c320f127..5d68f35e9f16 100644
--- a/starmath/source/register.cxx
+++ b/starmath/source/register.cxx
@@ -119,92 +119,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
-sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/,
- void* pRegistryKey )
-{
- Reference< registry::XRegistryKey >
- xKey( reinterpret_cast< registry::XRegistryKey* >( pRegistryKey ) ) ;
-
- OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") );
- OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") );
-
- // Actual implementation and register its services
- sal_Int32 i;
- Reference< registry::XRegistryKey > xNewKey;
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLImport_getImplementationName() +
- aUnoServices );
-
- Sequence< OUString > aServices = SmXMLImport_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLExport_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLExport_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLImportMeta_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLImportMeta_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLExportMetaOOO_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLExportMetaOOO_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLExportMeta_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLExportMeta_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLImportSettings_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLImportSettings_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLExportSettingsOOO_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLExportSettingsOOO_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLExportSettings_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLExportSettings_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmXMLExportContent_getImplementationName() +
- aUnoServices );
-
- aServices = SmXMLExportContent_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- xNewKey = xKey->createKey( aDelimiter + SmDocument_getImplementationName() +
- aUnoServices );
-
- aServices = SmDocument_getSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- return sal_True;
-}
-
void* SAL_CALL component_getFactory( const sal_Char* pImplementationName,
void* pServiceManager,
void* /*pRegistryKey*/ )
diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx
index c497e393f513..4c8e0075a4ef 100644
--- a/starmath/source/smdetect.cxx
+++ b/starmath/source/smdetect.cxx
@@ -31,7 +31,7 @@
#include "smdetect.hxx"
-#include <framework/interaction.hxx>
+//#include <framework/interaction.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/frame/XFrame.hpp>
@@ -170,7 +170,7 @@ SmFilterDetect::~SmFilterDetect()
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();
@@ -191,7 +191,7 @@ SmFilterDetect::~SmFilterDetect()
else
{
// ctor of SfxMedium uses owner transition of ItemSet
- SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, FALSE, NULL, pSet );
+ SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, sal_False, NULL, pSet );
aMedium.UseInteractionHandler( true );
bool bIsStorage = aMedium.IsStorage();
@@ -243,7 +243,7 @@ SmFilterDetect::~SmFilterDetect()
String aTmpFilterName;
if ( pFilter )
aTmpFilterName = pFilter->GetName();
- aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsAllowedAsTemplate() : FALSE, &aTmpFilterName );
+ aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsAllowedAsTemplate() : sal_False, &aTmpFilterName );
}
catch( lang::WrappedTargetException& aWrap )
{
@@ -263,20 +263,16 @@ SmFilterDetect::~SmFilterDetect()
if ( !bRepairPackage )
{
// ask the user whether he wants to try to repair
- RequestPackageReparation* pRequest = new RequestPackageReparation( aDocumentTitle );
- uno::Reference< task::XInteractionRequest > xRequest ( pRequest );
-
- xInteraction->handle( xRequest );
-
- bRepairAllowed = pRequest->isApproved();
+ RequestPackageReparation aRequest( aDocumentTitle );
+ xInteraction->handle( aRequest.GetRequest() );
+ bRepairAllowed = aRequest.isApproved();
}
if ( !bRepairAllowed )
{
// repair either not allowed or not successful
- NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocumentTitle );
- uno::Reference< task::XInteractionRequest > xRequest ( pNotifyRequest );
- xInteraction->handle( xRequest );
+ NotifyBrokenPackage aNotifyRequest( aDocumentTitle );
+ xInteraction->handle( aNotifyRequest.GetRequest() );
}
}
@@ -311,7 +307,7 @@ SmFilterDetect::~SmFilterDetect()
aTypeName.Erase();
if (pStrm && !pStrm->GetError())
{
- SotStorageRef aStorage = new SotStorage ( pStrm, FALSE );
+ SotStorageRef aStorage = new SotStorage ( pStrm, sal_False );
if ( !aStorage->GetError() )
{
if ( aStorage->IsStream( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Equation Native" ) ) ) )
@@ -323,11 +319,11 @@ SmFilterDetect::~SmFilterDetect()
}
else
{
- const USHORT nSize = 5;
+ const sal_uInt16 nSize = 5;
sal_Char aBuffer[nSize+1];
aBuffer[nSize] = 0;
pStrm->Seek( STREAM_SEEK_TO_BEGIN );
- ULONG nBytesRead = pStrm->Read( aBuffer, nSize );
+ sal_uLong nBytesRead = pStrm->Read( aBuffer, nSize );
if (nBytesRead == nSize)
{
if (0 == strncmp( "<?xml",aBuffer,nSize))
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index 904394d01735..669a26ab39ef 100644..100755
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -63,7 +63,7 @@ TYPEINIT1( SmModule, SfxModule );
-SmResId::SmResId( USHORT nId )
+SmResId::SmResId( sal_uInt16 nId )
: ResId(nId, *SM_MOD()->GetResMgr())
{
}
@@ -99,8 +99,8 @@ const String SmLocalizedSymbolData::GetUiSymbolName( const String &rExportName )
const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray &rUiNames = rData.GetUiSymbolNamesArray();
const ResStringArray &rExportNames = rData.GetExportSymbolNamesArray();
- USHORT nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count());
- for (USHORT i = 0; i < nCount && !aRes.Len(); ++i)
+ sal_uInt16 nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count());
+ for (sal_uInt16 i = 0; i < nCount && !aRes.Len(); ++i)
{
if (rExportName == rExportNames.GetString(i))
{
@@ -120,8 +120,8 @@ const String SmLocalizedSymbolData::GetExportSymbolName( const String &rUiName )
const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray &rUiNames = rData.GetUiSymbolNamesArray();
const ResStringArray &rExportNames = rData.GetExportSymbolNamesArray();
- USHORT nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count());
- for (USHORT i = 0; i < nCount && !aRes.Len(); ++i)
+ sal_uInt16 nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count());
+ for (sal_uInt16 i = 0; i < nCount && !aRes.Len(); ++i)
{
if (rUiName == rUiNames.GetString(i))
{
@@ -141,8 +141,8 @@ const String SmLocalizedSymbolData::GetUiSymbolSetName( const String &rExportNam
const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray &rUiNames = rData.GetUiSymbolSetNamesArray();
const ResStringArray &rExportNames = rData.GetExportSymbolSetNamesArray();
- USHORT nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count());
- for (USHORT i = 0; i < nCount && !aRes.Len(); ++i)
+ sal_uInt16 nCount = sal::static_int_cast< xub_StrLen >(rExportNames.Count());
+ for (sal_uInt16 i = 0; i < nCount && !aRes.Len(); ++i)
{
if (rExportName == rExportNames.GetString(i))
{
@@ -162,8 +162,8 @@ const String SmLocalizedSymbolData::GetExportSymbolSetName( const String &rUiNam
const SmLocalizedSymbolData &rData = SM_MOD()->GetLocSymbolData();
const ResStringArray &rUiNames = rData.GetUiSymbolSetNamesArray();
const ResStringArray &rExportNames = rData.GetExportSymbolSetNamesArray();
- USHORT nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count());
- for (USHORT i = 0; i < nCount && !aRes.Len(); ++i)
+ sal_uInt16 nCount = sal::static_int_cast< xub_StrLen >(rUiNames.Count());
+ for (sal_uInt16 i = 0; i < nCount && !aRes.Len(); ++i)
{
if (rUiName == rUiNames.GetString(i))
{
@@ -232,7 +232,7 @@ SFX_IMPL_INTERFACE(SmModule, SfxModule, SmResId(RID_APPLICATION))
SmModule::SmModule(SfxObjectFactory* pObjFact) :
- SfxModule(SfxApplication::CreateResManager("sm"), FALSE, pObjFact, NULL),
+ SfxModule(SfxApplication::CreateResManager("sm"), sal_False, pObjFact, NULL),
pColorConfig( 0 ),
pConfig( 0 ),
pLocSymbolData( 0 ),
@@ -327,7 +327,7 @@ void SmModule::GetState(SfxItemSet &rSet)
{
SfxWhichIter aIter(rSet);
- for (USHORT nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich())
+ for (sal_uInt16 nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich())
switch (nWh)
{
case SID_CONFIGEVENT :
@@ -336,17 +336,7 @@ void SmModule::GetState(SfxItemSet &rSet)
}
}
-void SmModule::FillStatusBar(StatusBar &rBar)
-{
- rBar.InsertItem(SID_TEXTSTATUS, 300, SIB_LEFT | SIB_IN);
- rBar.InsertItem(SID_ATTR_ZOOM, rBar.GetTextWidth(C2S(" 100% ")));
- rBar.InsertItem(SID_MODIFYSTATUS, rBar.GetTextWidth(C2S(" * ")));
- rBar.InsertItem( SID_SIGNATURE, XmlSecStatusBarControl::GetDefItemWidth( rBar ), SIB_USERDRAW );
- rBar.SetHelpId(SID_SIGNATURE, SID_SIGNATURE);
-
-}
-
-SfxItemSet* SmModule::CreateItemSet( USHORT nId )
+SfxItemSet* SmModule::CreateItemSet( sal_uInt16 nId )
{
SfxItemSet* pRet = 0;
if(nId == SID_SM_EDITOPTIONS)
@@ -359,20 +349,21 @@ SfxItemSet* SmModule::CreateItemSet( USHORT nId )
SID_PRINTTEXT, SID_PRINTTEXT,
SID_PRINTFRAME, SID_PRINTFRAME,
SID_NO_RIGHT_SPACES, SID_NO_RIGHT_SPACES,
+ SID_SAVE_ONLY_USED_SYMBOLS, SID_SAVE_ONLY_USED_SYMBOLS,
0 );
GetConfig()->ConfigToItemSet(*pRet);
}
return pRet;
}
-void SmModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
+void SmModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
{
if(nId == SID_SM_EDITOPTIONS)
{
GetConfig()->ItemSetToConfig(rSet);
}
}
-SfxTabPage* SmModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet )
+SfxTabPage* SmModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet )
{
SfxTabPage* pRet = 0;
if(nId == SID_SM_TP_PRINTOPTIONS)
diff --git a/starmath/source/smres.src b/starmath/source/smres.src
index 14a4fce6bd52..dd616848f277 100644
--- a/starmath/source/smres.src
+++ b/starmath/source/smres.src
@@ -31,6 +31,7 @@
#include "starmath.hrc"
#include "dialog.hrc"
#include "toolbox.hrc"
+#include "smcommands.h"
#define IMAGE_STDBTN_COLOR Color { Red = 0xff00; Green = 0x0000; Blue = 0xff00; }
#define MN_SUB_TOOLBAR 32
@@ -40,6 +41,7 @@
ModalDialog RID_FONTDIALOG
{
+ HelpID = "starmath:ModalDialog:RID_FONTDIALOG";
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
@@ -54,6 +56,7 @@ ModalDialog RID_FONTDIALOG
};
ComboBox 1
{
+ HelpID = "starmath:ComboBox:RID_FONTDIALOG:1";
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 111 , 60 ) ;
TabStop = TRUE ;
@@ -62,6 +65,7 @@ ModalDialog RID_FONTDIALOG
};
CheckBox 1
{
+ HelpID = "starmath:CheckBox:RID_FONTDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 60 , 84 ) ;
Size = MAP_APPFONT ( 33 , 10 ) ;
@@ -69,6 +73,7 @@ ModalDialog RID_FONTDIALOG
};
CheckBox 2
{
+ HelpID = "starmath:CheckBox:RID_FONTDIALOG:2";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 60 , 97 ) ;
Size = MAP_APPFONT ( 33 , 10 ) ;
@@ -107,7 +112,7 @@ ModalDialog RID_FONTSIZEDIALOG
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
- HelpID = SID_FONTSIZE ;
+ HelpId = CMD_SID_FONTSIZE ;
Size = MAP_APPFONT ( 171 , 120 ) ;
Text [ en-US ] = "Font Sizes" ;
FixedText 1
@@ -119,6 +124,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
MetricField 1
{
+ HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:1";
Border = TRUE ;
Pos = MAP_APPFONT ( 57 , 6 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -139,6 +145,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
MetricField 4
{
+ HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:4";
Border = TRUE ;
Pos = MAP_APPFONT ( 57 , 36 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -160,6 +167,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
MetricField 5
{
+ HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:5";
Border = TRUE ;
Pos = MAP_APPFONT ( 57 , 51 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -181,6 +189,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
MetricField 6
{
+ HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:6";
Border = TRUE ;
Pos = MAP_APPFONT ( 57 , 66 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -202,6 +211,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
MetricField 7
{
+ HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:7";
Border = TRUE ;
Pos = MAP_APPFONT ( 57 , 81 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -223,6 +233,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
MetricField 8
{
+ HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:8";
Border = TRUE ;
Pos = MAP_APPFONT ( 57 , 96 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -256,6 +267,7 @@ ModalDialog RID_FONTSIZEDIALOG
};
PushButton 1
{
+ HelpID = "starmath:PushButton:RID_FONTSIZEDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 114 , 45 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -267,7 +279,7 @@ ModalDialog RID_FONTTYPEDIALOG
{
OutputSize = TRUE ;
SVLook = TRUE ;
- HelpID = SID_FONT ;
+ HelpId = CMD_SID_FONT ;
Size = MAP_APPFONT ( 282 , 153 ) ;
Text [ en-US ] = "Fonts" ;
Moveable = TRUE ;
@@ -292,6 +304,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 1
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:1";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 18 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -307,6 +320,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 2
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:2";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 33 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -322,6 +336,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 3
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:3";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 48 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -337,6 +352,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 4
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:4";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 63 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -352,6 +368,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 5
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:5";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 96 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -367,6 +384,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 6
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:6";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 111 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -382,6 +400,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
ListBox 7
{
+ HelpID = "starmath:ListBox:RID_FONTTYPEDIALOG:7";
Border = TRUE ;
Pos = MAP_APPFONT ( 54 , 126 ) ;
Size = MAP_APPFONT ( 150 , 69 ) ;
@@ -403,6 +422,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
MenuButton 1
{
+ HelpID = "starmath:MenuButton:RID_FONTTYPEDIALOG:1";
TabStop = TRUE ;
ButtonMenu = Menu , RID_FONTMENU ;
Pos = MAP_APPFONT ( 225 , 48 ) ;
@@ -411,6 +431,7 @@ ModalDialog RID_FONTTYPEDIALOG
};
PushButton 2
{
+ HelpID = "starmath:PushButton:RID_FONTTYPEDIALOG:2";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 225 , 66 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -423,7 +444,7 @@ ModalDialog RID_DISTANCEDIALOG
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
- HelpID = SID_DISTANCE ;
+ HelpId = CMD_SID_DISTANCE ;
Size = MAP_APPFONT ( 240 , 90 ) ;
Text [ en-US ] = "Spacing" ;
FixedText 1
@@ -434,6 +455,7 @@ ModalDialog RID_DISTANCEDIALOG
};
MetricField 1
{
+ HelpID = "starmath:MetricField:RID_DISTANCEDIALOG:1";
Border = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
@@ -454,6 +476,7 @@ ModalDialog RID_DISTANCEDIALOG
};
MetricField 2
{
+ HelpID = "starmath:MetricField:RID_DISTANCEDIALOG:2";
Border = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
@@ -466,6 +489,7 @@ ModalDialog RID_DISTANCEDIALOG
};
CheckBox 1
{
+ HelpID = "starmath:CheckBox:RID_DISTANCEDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 55 ) ;
Size = MAP_APPFONT ( 110 , 12 ) ;
@@ -481,6 +505,7 @@ ModalDialog RID_DISTANCEDIALOG
};
MetricField 3
{
+ HelpID = "starmath:MetricField:RID_DISTANCEDIALOG:3";
Border = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
@@ -501,6 +526,7 @@ ModalDialog RID_DISTANCEDIALOG
};
MetricField 4
{
+ HelpID = "starmath:MetricField:RID_DISTANCEDIALOG:4";
Border = TRUE ;
TabStop = TRUE ;
Left = TRUE ;
@@ -526,6 +552,7 @@ ModalDialog RID_DISTANCEDIALOG
};
PushButton 1
{
+ HelpID = "starmath:PushButton:RID_DISTANCEDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 184 , 69 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -533,6 +560,7 @@ ModalDialog RID_DISTANCEDIALOG
};
MenuButton 1
{
+ HelpID = "starmath:MenuButton:RID_DISTANCEDIALOG:1";
TabStop = TRUE ;
ButtonMenu = Menu , RID_DISTANCEMENU ;
Pos = MAP_APPFONT ( 184 , 51 ) ;
@@ -821,11 +849,12 @@ ModalDialog RID_ALIGNDIALOG
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
- HelpID = SID_ALIGN ;
+ HelpId = CMD_SID_ALIGN ;
Size = MAP_APPFONT ( 139 , 66 ) ;
Text [ en-US ] = "Alignment" ;
RadioButton 1
{
+ HelpID = "starmath:RadioButton:RID_ALIGNDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 17 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
@@ -833,6 +862,7 @@ ModalDialog RID_ALIGNDIALOG
};
RadioButton 2
{
+ HelpID = "starmath:RadioButton:RID_ALIGNDIALOG:2";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 31 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
@@ -840,6 +870,7 @@ ModalDialog RID_ALIGNDIALOG
};
RadioButton 3
{
+ HelpID = "starmath:RadioButton:RID_ALIGNDIALOG:3";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 44 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
@@ -866,6 +897,7 @@ ModalDialog RID_ALIGNDIALOG
};
PushButton 1
{
+ HelpID = "starmath:PushButton:RID_ALIGNDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 83 , 46 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -875,6 +907,7 @@ ModalDialog RID_ALIGNDIALOG
TabPage RID_PRINTOPTIONPAGE
{
+ HelpID = "starmath:TabPage:RID_PRINTOPTIONPAGE";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 260 , 185 ) ;
@@ -887,6 +920,7 @@ TabPage RID_PRINTOPTIONPAGE
};
CheckBox CB_TITLEROW
{
+ HelpID = "starmath:CheckBox:RID_PRINTOPTIONPAGE:CB_TITLEROW";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
@@ -894,6 +928,7 @@ TabPage RID_PRINTOPTIONPAGE
};
CheckBox CB_EQUATION_TEXT
{
+ HelpID = "starmath:CheckBox:RID_PRINTOPTIONPAGE:CB_EQUATION_TEXT";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
@@ -901,6 +936,7 @@ TabPage RID_PRINTOPTIONPAGE
};
CheckBox CB_FRAME
{
+ HelpID = "starmath:CheckBox:RID_PRINTOPTIONPAGE:CB_FRAME";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
@@ -914,6 +950,7 @@ TabPage RID_PRINTOPTIONPAGE
};
RadioButton RB_ORIGINAL_SIZE
{
+ HelpID = "starmath:RadioButton:RID_PRINTOPTIONPAGE:RB_ORIGINAL_SIZE";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 69 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
@@ -921,6 +958,7 @@ TabPage RID_PRINTOPTIONPAGE
};
RadioButton RB_FIT_TO_PAGE
{
+ HelpID = "starmath:RadioButton:RID_PRINTOPTIONPAGE:RB_FIT_TO_PAGE";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 83 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
@@ -928,6 +966,7 @@ TabPage RID_PRINTOPTIONPAGE
};
RadioButton RB_ZOOM
{
+ HelpID = "starmath:RadioButton:RID_PRINTOPTIONPAGE:RB_ZOOM";
Pos = MAP_APPFONT ( 12 , 97 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Text [ en-US ] = "~Scaling" ;
@@ -935,6 +974,7 @@ TabPage RID_PRINTOPTIONPAGE
};
MetricField MF_ZOOM
{
+ HelpID = "starmath:MetricField:RID_PRINTOPTIONPAGE:MF_ZOOM";
Border = TRUE ;
Pos = MAP_APPFONT ( 18 , 111 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
@@ -955,15 +995,24 @@ TabPage RID_PRINTOPTIONPAGE
};
CheckBox CB_IGNORE_SPACING
{
+ HelpID = "starmath:CheckBox:RID_PRINTOPTIONPAGE:CB_IGNORE_SPACING";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 140 ) ;
Size = MAP_APPFONT ( 236 , 10 ) ;
Text [ en-US ] = "Ig~nore ~~ and ` at the end of the line";
};
+ CheckBox CB_SAVE_ONLY_USED_SYMBOLS
+ {
+ TabStop = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 154 ) ;
+ Size = MAP_APPFONT ( 236 , 10 ) ;
+ Text [ en-US ] = "Embed only used symbols (smaller file size)";
+ };
};
ModalDialog RID_SYMBOLDIALOG
{
+ HelpID = "starmath:ModalDialog:RID_SYMBOLDIALOG";
OutputSize = TRUE ;
SVLook = TRUE ;
Closeable = TRUE; // Close Button in Window Leiste explizit einbauen
@@ -979,6 +1028,7 @@ ModalDialog RID_SYMBOLDIALOG
};
ListBox 1
{
+ HelpID = "starmath:ListBox:RID_SYMBOLDIALOG:1";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 92, 57 ) ;
@@ -1010,6 +1060,7 @@ ModalDialog RID_SYMBOLDIALOG
};
PushButton 2
{
+ HelpID = "starmath:PushButton:RID_SYMBOLDIALOG:2";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 177 , 6 ) ;
Size = MAP_APPFONT ( 56 , 14 ) ;
@@ -1018,6 +1069,7 @@ ModalDialog RID_SYMBOLDIALOG
};
PushButton 3
{
+ HelpID = "starmath:PushButton:RID_SYMBOLDIALOG:3";
Pos = MAP_APPFONT ( 177 , 24 ) ;
Size = MAP_APPFONT ( 56 , 14 ) ;
TabStop = TRUE ;
@@ -1025,6 +1077,7 @@ ModalDialog RID_SYMBOLDIALOG
};
PushButton 1
{
+ HelpID = "starmath:PushButton:RID_SYMBOLDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 177 , 42 ) ;
Size = MAP_APPFONT ( 56 , 14 ) ;
@@ -1034,6 +1087,7 @@ ModalDialog RID_SYMBOLDIALOG
ModalDialog RID_SYMDEFINEDIALOG
{
+ HelpID = "starmath:ModalDialog:RID_SYMDEFINEDIALOG";
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
@@ -1048,8 +1102,9 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ComboBox 1
{
+ HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:1";
Pos = MAP_APPFONT ( 59 , 6 ) ;
- Size = MAP_APPFONT ( 80 , 50 ) ;
+ Size = MAP_APPFONT ( 80 , 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
Sort = TRUE ;
@@ -1063,8 +1118,9 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ComboBox 2
{
+ HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:2";
Pos = MAP_APPFONT ( 210 , 6 ) ;
- Size = MAP_APPFONT ( 80 , 50 ) ;
+ Size = MAP_APPFONT ( 80 , 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
Sort = TRUE ;
@@ -1087,8 +1143,9 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ComboBox 4
{
+ HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:4";
Pos = MAP_APPFONT ( 80 , 115 ) ;
- Size = MAP_APPFONT ( 100 , 80 ) ;
+ Size = MAP_APPFONT ( 100 , 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
Sort = TRUE ;
@@ -1102,8 +1159,9 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ComboBox 5
{
+ HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:5";
Pos = MAP_APPFONT ( 80 , 130 ) ;
- Size = MAP_APPFONT ( 100 , 50 ) ;
+ Size = MAP_APPFONT ( 100 , 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
Sort = TRUE ;
@@ -1117,9 +1175,10 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ListBox 1
{
+ HelpID = "starmath:ListBox:RID_SYMDEFINEDIALOG:1";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 , 145 ) ;
- Size = MAP_APPFONT ( 100 , 50 ) ;
+ Size = MAP_APPFONT ( 100 , 100 ) ;
TabStop = TRUE ;
Sort = TRUE ;
DropDown = TRUE ;
@@ -1133,9 +1192,10 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ListBox LB_FONTS_SUBSET
{
+ HelpID = "starmath:ListBox:RID_SYMDEFINEDIALOG:LB_FONTS_SUBSET";
Border = TRUE ;
Pos = MAP_APPFONT ( 80 , 160 ) ;
- Size = MAP_APPFONT ( 100 , 50 ) ;
+ Size = MAP_APPFONT ( 100 , 100 ) ;
TabStop = TRUE ;
Sort = FALSE ;
DropDown = TRUE ;
@@ -1149,9 +1209,10 @@ ModalDialog RID_SYMDEFINEDIALOG
};
ComboBox 3
{
+ HelpID = "starmath:ComboBox:RID_SYMDEFINEDIALOG:3";
Border = TRUE;
Pos = MAP_APPFONT ( 80 , 175 ) ;
- Size = MAP_APPFONT ( 100 , 50 ) ;
+ Size = MAP_APPFONT ( 100 , 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
Sort = FALSE ;
@@ -1210,6 +1271,7 @@ ModalDialog RID_SYMDEFINEDIALOG
};
PushButton 1
{
+ HelpID = "starmath:PushButton:RID_SYMDEFINEDIALOG:1";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 305 , 195 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -1217,6 +1279,7 @@ ModalDialog RID_SYMDEFINEDIALOG
};
PushButton 2
{
+ HelpID = "starmath:PushButton:RID_SYMDEFINEDIALOG:2";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 245 , 195 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -1224,6 +1287,7 @@ ModalDialog RID_SYMDEFINEDIALOG
};
PushButton 3
{
+ HelpID = "starmath:PushButton:RID_SYMDEFINEDIALOG:3";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 185 , 195 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -1295,37 +1359,37 @@ Menu RID_VIEWMENU
MenuItem
{
Identifier = SID_VIEW050 ;
- HelpID = SID_VIEW050 ;
+ HelpId = CMD_SID_VIEW050 ;
Text [ en-US ] = "~View 50%" ;
};
MenuItem
{
Identifier = SID_VIEW100 ;
- HelpID = SID_VIEW100 ;
+ HelpId = CMD_SID_VIEW100 ;
Text [ en-US ] = "View ~100%" ;
};
MenuItem
{
Identifier = SID_VIEW200 ;
- HelpID = SID_VIEW200 ;
+ HelpId = CMD_SID_VIEW200 ;
Text [ en-US ] = "View ~200%" ;
};
MenuItem
{
Identifier = SID_ZOOMIN ;
- HelpID = SID_ZOOMIN ;
+ HelpId = CMD_SID_ZOOMIN ;
Text [ en-US ] = "~Zoom In" ;
};
MenuItem
{
Identifier = SID_ZOOMOUT ;
- HelpID = SID_ZOOMOUT ;
+ HelpId = CMD_SID_ZOOMOUT ;
Text [ en-US ] = "Zoom ~Out" ;
};
MenuItem
{
Identifier = SID_ADJUST ;
- HelpID = SID_ADJUST ;
+ HelpId = CMD_SID_ADJUST ;
Text [ en-US ] = "~Display All" ;
};
MenuItem
@@ -1335,7 +1399,7 @@ Menu RID_VIEWMENU
MenuItem
{
Identifier = SID_DRAW ;
- HelpID = SID_DRAW ;
+ HelpId = CMD_SID_DRAW ;
Text [ en-US ] = "U~pdate" ;
};
};
@@ -1439,1419 +1503,6 @@ Menu RID_FONTMENU
};
};
-FloatingWindow RID_TOOLBOXWINDOW
-{
- HelpId = HID_SMA_OPERATOR_WIN ;
- Border = TRUE ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Hide = TRUE ;
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 0 , 0 ) ;
- Text [ en-US ] = "Elements" ;
-
- ToolBox 1
- {
- // unary/binary operators
- HelpId = HID_SMA_UNBINOPS_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 4 ;
-
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_PLUSX ;
- HelpId = HID_SMA_PLUSX ;
- Text [ en-US ] = "+ Sign" ;
- };
- ToolBoxItem
- {
- Identifier = RID_MINUSX ;
- HelpId = HID_SMA_MINUSX ;
- Text [ en-US ] = "- Sign" ;
- };
- ToolBoxItem
- {
- Identifier = RID_PLUSMINUSX ;
- HelpId = HID_SMA_PLUSMINUSX ;
- Text [ en-US ] = "+- Sign" ;
- };
- ToolBoxItem
- {
- Identifier = RID_MINUSPLUSX ;
- HelpId = HID_SMA_MINUSPLUSX ;
- Text [ en-US ] = "-+ Sign" ;
- };
- ToolBoxItem
- {
- Identifier = RID_NEGX ;
- HelpId = HID_SMA_NEGX ;
- Text [ en-US ] = "Boolean NOT" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XPLUSY ;
- HelpId = HID_SMA_XPLUSY ;
- Text [ en-US ] = "Addition +" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XCDOTY ;
- HelpId = HID_SMA_XCDOTY ;
- Text [ en-US ] = "Multiplication (Dot )" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XTIMESY ;
- HelpId = HID_SMA_XTIMESY ;
- Text [ en-US ] = "Multiplication (x)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSYMTIMESY ;
- HelpId = HID_SMA_XSYMTIMESY ;
- Text [ en-US ] = "Multiplication (*)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XANDY ;
- HelpId = HID_SMA_XANDY ;
- Text [ en-US ] = "Boolean AND" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XMINUSY ;
- HelpId = HID_SMA_XMINUSY ;
- Text [ en-US ] = "Subtraction -" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XOVERY ;
- HelpId = HID_SMA_XOVERY ;
- Text [ en-US ] = "Division (Fraction)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XDIVY ;
- HelpId = HID_SMA_XDIVY ;
- Text [ en-US ] = "Division (÷)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSYMDIVIDEY ;
- HelpId = HID_SMA_XSYMDIVIDEY ;
- Text [ en-US ] = "Division (Slash)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XORY ;
- HelpId = HID_SMA_XORY ;
- Text [ en-US ] = "Boolean OR" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XCIRCY ;
- HelpId = HID_SMA_XCIRCY ;
- Text [ en-US ] = "Concatenate";
- };
- };
- };
- ToolBox 2
- {
- // relations
- HelpId = HID_SMA_RELATIONS_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 5 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_XEQY ;
- HelpId = HID_SMA_XEQY ;
- Text [ en-US ] = "Is Equal" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XNEQY ;
- HelpId = HID_SMA_XNEQY ;
- Text [ en-US ] = "Is Not Equal" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XAPPROXY ;
- HelpId = HID_SMA_XAPPROXY ;
- Text [ en-US ] = "Is Approximately Equal" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XDIVIDESY ;
- HelpId = HID_SMA_XDIVIDESY ;
- Text [ en-US ] = "Divides";
- };
- ToolBoxItem
- {
- Identifier = RID_XNDIVIDESY ;
- HelpId = HID_SMA_XNDIVIDESY ;
- Text [ en-US ] = "Does Not Divide";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XLTY ;
- HelpId = HID_SMA_XLTY ;
- Text [ en-US ] = "Is Less Than" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XGTY ;
- HelpId = HID_SMA_XGTY ;
- Text [ en-US ] = "Is Greater Than" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSIMEQY ;
- HelpId = HID_SMA_XSIMEQY ;
- Text [ en-US ] = "Is Similar Or Equal" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XPARALLELY ;
- HelpId = HID_SMA_XPARALLELY ;
- Text [ en-US ] = "Is Parallel To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XORTHOY ;
- HelpId = HID_SMA_XORTHOY ;
- Text [ en-US ] = "Is Orthogonal To" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XLESLANTY ;
- HelpId = HID_SMA_XLESLANTY ;
- Text [ en-US ] = "Is Less Than Or Equal To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XGESLANTY ;
- HelpId = HID_SMA_XGESLANTY ;
- Text [ en-US ] = "Is Greater Than Or Equal To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSIMY ;
- HelpId = HID_SMA_XSIMY ;
- Text [ en-US ] = "Is Similar To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XEQUIVY ;
- HelpId = HID_SMA_XEQUIVY ;
- Text [ en-US ] = "Is Congruent To" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XLEY ;
- HelpId = HID_SMA_XLEY ;
- Text [ en-US ] = "Is Less Than Or Equal To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XGEY ;
- HelpId = HID_SMA_XGEY ;
- Text [ en-US ] = "Is Greater Than Or Equal To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XPROPY ;
- HelpId = HID_SMA_XPROPY ;
- Text [ en-US ] = "Is Proportional To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XTOWARDY ;
- HelpId = HID_SMA_XTOWARDY ;
- Text [ en-US ] = "Toward" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_DLARROW ;
- HelpId = HID_SMA_DLARROW ;
- Text [ en-US ] = "Double Arrow Left";
- };
- ToolBoxItem
- {
- Identifier = RID_DLRARROW ;
- HelpId = HID_SMA_DLRARROW ;
- Text [ en-US ] = "Double Arrow Left And Right";
- };
- ToolBoxItem
- {
- Identifier = RID_DRARROW ;
- HelpId = HID_SMA_DRARROW ;
- Text [ en-US ] = "Double Arrow Right";
- };
- };
- };
- ToolBox 3
- {
- // set operations
- HelpId = HID_SMA_SETOPERATIONS_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 5 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_XINY ;
- HelpId = HID_SMA_XINY ;
- Text [ en-US ] = "Is In" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XNOTINY ;
- HelpId = HID_SMA_XNOTINY ;
- Text [ en-US ] = "Is Not In" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XOWNSY ;
- HelpId = HID_SMA_XOWNSY ;
- Text [ en-US ] = "Owns" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_EMPTYSET ;
- HelpId = HID_SMA_EMPTYSET ;
- Text [ en-US ] = "Empty Set";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XINTERSECTIONY ;
- HelpId = HID_SMA_XINTERSECTIONY ;
- Text [ en-US ] = "Intersection" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XUNIONY ;
- HelpId = HID_SMA_XUNIONY ;
- Text [ en-US ] = "Union" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSETMINUSY ;
- HelpId = HID_SMA_XSETMINUSY ;
- Text [ en-US ] = "Difference" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSLASHY ;
- HelpId = HID_SMA_XSLASHY ;
- Text [ en-US ] = "Quotient Set" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ALEPH ;
- HelpId = HID_SMA_ALEPH ;
- Text [ en-US ] = "Aleph";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSUBSETY ;
- HelpId = HID_SMA_XSUBSETY ;
- Text [ en-US ] = "Subset" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSUBSETEQY ;
- HelpId = HID_SMA_XSUBSETEQY ;
- Text [ en-US ] = "Subset Or Equal To" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSUPSETY ;
- HelpId = HID_SMA_XSUPSETY ;
- Text [ en-US ] = "Superset" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XSUPSETEQY ;
- HelpId = HID_SMA_XSUPSETEQY ;
- Text [ en-US ] = "Superset Or Equal To" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XNSUBSETY ;
- HelpId = HID_SMA_XNSUBSETY ;
- Text [ en-US ] = "Not Subset" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XNSUBSETEQY ;
- HelpId = HID_SMA_XNSUBSETEQY ;
- Text [ en-US ] = "Not Subset Or Equal" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XNSUPSETY ;
- HelpId = HID_SMA_XNSUPSETY ;
- Text [ en-US ] = "Not Superset" ;
- };
- ToolBoxItem
- {
- Identifier = RID_XNSUPSETEQY ;
- HelpId = HID_SMA_XNSUPSETEQY ;
- Text [ en-US ] = "Not Superset Or Equal" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_SETN ;
- HelpId = HID_SMA_SETN ;
- Text [ en-US ] = "Natural Numbers Set";
- };
- ToolBoxItem
- {
- Identifier = RID_SETZ ;
- HelpId = HID_SMA_SETZ ;
- Text [ en-US ] = "Integers Set";
- };
- ToolBoxItem
- {
- Identifier = RID_SETQ ;
- HelpId = HID_SMA_SETQ ;
- Text [ en-US ] = "Set of Rational Numbers";
- };
- ToolBoxItem
- {
- Identifier = RID_SETR ;
- HelpId = HID_SMA_SETR ;
- Text [ en-US ] = "Real Numbers Set";
- };
- ToolBoxItem
- {
- Identifier = RID_SETC ;
- HelpId = HID_SMA_SETC ;
- Text [ en-US ] = "Complex Numbers Set";
- };
- };
- };
- ToolBox 4
- {
- // functions
- HelpId = HID_SMA_FUNCTIONS_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 5 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_EX ;
- HelpId = HID_SMA_EX ;
- Text [ en-US ] = "Exponential Function" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LNX ;
- HelpId = HID_SMA_LNX ;
- Text [ en-US ] = "Natural Logarithm" ;
- };
- ToolBoxItem
- {
- Identifier = RID_EXPX ;
- HelpId = HID_SMA_EXPX ;
- Text [ en-US ] = "Exponential Function" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LOGX ;
- HelpId = HID_SMA_LOGX ;
- Text [ en-US ] = "Logarithm" ;
- };
- ToolBoxItem
- {
- Identifier = RID_RSUPX ;
- HelpId = HID_SMA_RSUPX ;
- Text [ en-US ] = "Power";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_SINX ;
- HelpId = HID_SMA_SINX ;
- Text [ en-US ] = "Sine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_COSX ;
- HelpId = HID_SMA_COSX ;
- Text [ en-US ] = "Cosine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_TANX ;
- HelpId = HID_SMA_TANX ;
- Text [ en-US ] = "Tangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_COTX ;
- HelpId = HID_SMA_COTX ;
- Text [ en-US ] = "Cotangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SQRTX ;
- HelpId = HID_SMA_SQRTX ;
- Text [ en-US ] = "Square Root" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARCSINX ;
- HelpId = HID_SMA_ARCSINX ;
- Text [ en-US ] = "Arcsine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARCCOSX ;
- HelpId = HID_SMA_ARCCOSX ;
- Text [ en-US ] = "Arccosine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARCTANX ;
- HelpId = HID_SMA_ARCTANX ;
- Text [ en-US ] = "Arctangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARCCOTX ;
- HelpId = HID_SMA_ARCCOTX ;
- Text [ en-US ] = "Arccotangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_NROOTXY ;
- HelpId = HID_SMA_NROOTXY ;
- Text [ en-US ] = "N-th Root" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_SINHX ;
- HelpId = HID_SMA_SINHX ;
- Text [ en-US ] = "Hyperbolic Sine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_COSHX ;
- HelpId = HID_SMA_COSHX ;
- Text [ en-US ] = "Hyperbolic Cosine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_TANHX ;
- HelpId = HID_SMA_TANHX ;
- Text [ en-US ] = "Hyperbolic Tangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_COTHX ;
- HelpId = HID_SMA_COTHX ;
- Text [ en-US ] = "Hyperbolic Cotangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ABSX ;
- HelpId = HID_SMA_ABSX ;
- Text [ en-US ] = "Absolute Value" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARSINHX ;
- HelpId = HID_SMA_ARSINHX ;
- Text [ en-US ] = "Area Hyperbolic Sine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARCOSHX ;
- HelpId = HID_SMA_ARCOSHX ;
- Text [ en-US ] = "Area Hyperbolic Cosine" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARTANHX ;
- HelpId = HID_SMA_ARTANHX ;
- Text [ en-US ] = "Area Hyperbolic Tangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ARCOTHX ;
- HelpId = HID_SMA_ARCOTHX ;
- Text [ en-US ] = "Area Hyperbolic Cotangent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_FACTX ;
- HelpId = HID_SMA_FACTX ;
- Text [ en-US ] = "Factorial" ;
- };
- };
- };
- ToolBox 5
- {
- // operators
- HelpId = HID_SMA_OPERATORS_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 3 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_LIMX ;
- HelpId = HID_SMA_LIMX ;
- Text [ en-US ] = "Limes" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SUMX ;
- HelpId = HID_SMA_SUMX ;
- Text [ en-US ] = "Sum" ;
- };
- ToolBoxItem
- {
- Identifier = RID_PRODX ;
- HelpId = HID_SMA_PRODX ;
- Text [ en-US ] = "Product" ;
- };
- ToolBoxItem
- {
- Identifier = RID_COPRODX ;
- HelpId = HID_SMA_COPRODX ;
- Text [ en-US ] = "Coproduct" ;
- };
- ToolBoxItem
- {
- Identifier = RID_FROMXTOY ;
- HelpId = HID_SMA_FROMXTOY ;
- Text [ en-US ] = "Upper And Lower Limit" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_INTX ;
- HelpId = HID_SMA_INTX ;
- Text [ en-US ] = "Integral" ;
- };
- ToolBoxItem
- {
- Identifier = RID_IINTX ;
- HelpId = HID_SMA_IINTX ;
- Text [ en-US ] = "Double Integral" ;
- };
- ToolBoxItem
- {
- Identifier = RID_IIINTX ;
- HelpId = HID_SMA_IIINTX ;
- Text [ en-US ] = "Triple Integral" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_FROMX ;
- HelpId = HID_SMA_FROMX ;
- Text [ en-US ] = "Lower Limit" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_LINTX ;
- HelpId = HID_SMA_LINTX ;
- Text [ en-US ] = "Curve Integral" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LLINTX ;
- HelpId = HID_SMA_LLINTX ;
- Text [ en-US ] = "Double Curve Integral" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LLLINTX ;
- HelpId = HID_SMA_LLLINTX ;
- Text [ en-US ] = "Triple Curve Integral" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_TOX ;
- HelpId = HID_SMA_TOX ;
- Text [ en-US ] = "Upper Limit" ;
- };
- };
- };
- ToolBox 6
- {
- // attributs
- HelpId = HID_SMA_ATTRIBUTES_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 5 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_ACUTEX ;
- HelpId = HID_SMA_ACUTEX ;
- Text [ en-US ] = "Acute Accent";
- };
- ToolBoxItem
- {
- Identifier = RID_GRAVEX ;
- HelpId = HID_SMA_GRAVEX ;
- Text [ en-US ] = "Grave Accent";
- };
- ToolBoxItem
- {
- Identifier = RID_CHECKX ;
- HelpId = HID_SMA_CHECKX ;
- Text [ en-US ] = "Reverse Circumflex" ;
- };
- ToolBoxItem
- {
- Identifier = RID_BREVEX ;
- HelpId = HID_SMA_BREVEX ;
- Text [ en-US ] = "Breve" ;
- };
- ToolBoxItem
- {
- Identifier = RID_CIRCLEX ;
- HelpId = HID_SMA_CIRCLEX ;
- Text [ en-US ] = "Circle" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_VECX ;
- HelpId = HID_SMA_VECX ;
- Text [ en-US ] = "Vector Arrow" ;
- };
- ToolBoxItem
- {
- Identifier = RID_TILDEX ;
- HelpId = HID_SMA_TILDEX ;
- Text [ en-US ] = "Tilde" ;
- };
- ToolBoxItem
- {
- Identifier = RID_HATX ;
- HelpId = HID_SMA_HATX ;
- Text [ en-US ] = "Circumflex" ;
- };
- ToolBoxItem
- {
- Identifier = RID_BARX ;
- HelpId = HID_SMA_BARX ;
- Text [ en-US ] = "Line Above" ;
- };
- ToolBoxItem
- {
- Identifier = RID_DOTX ;
- HelpId = HID_SMA_DOTX ;
- Text [ en-US ] = "Dot" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_WIDEVECX ;
- HelpId = HID_SMA_WIDEVECX ;
- Text [ en-US ] = "Large Vector Arrow";
- };
- ToolBoxItem
- {
- Identifier = RID_WIDETILDEX ;
- HelpId = HID_SMA_WIDETILDEX ;
- Text [ en-US ] = "Large Tilde";
- };
- ToolBoxItem
- {
- Identifier = RID_WIDEHATX ;
- HelpId = HID_SMA_WIDEHATX ;
- Text [ en-US ] = "Large Circumflex";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_DDOTX ;
- HelpId = HID_SMA_DDOTX ;
- Text [ en-US ] = "Double Dot" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_OVERLINEX ;
- HelpId = HID_SMA_OVERLINEX ;
- Text [ en-US ] = "Line Over" ;
- };
- ToolBoxItem
- {
- Identifier = RID_UNDERLINEX ;
- HelpId = HID_SMA_UNDERLINEX ;
- Text [ en-US ] = "Line Below" ;
- };
- ToolBoxItem
- {
- Identifier = RID_OVERSTRIKEX ;
- HelpId = HID_SMA_OVERSTRIKEX ;
- Text [ en-US ] = "Line Through" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_DDDOTX ;
- HelpId = HID_SMA_DDDOTX ;
- Text [ en-US ] = "Triple Dot" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_PHANTOMX ;
- HelpId = HID_SMA_PHANTOMX ;
- Text [ en-US ] = "Transparent" ;
- };
- ToolBoxItem
- {
- Identifier = RID_BOLDX ;
- HelpId = HID_SMA_BOLDX ;
- Text [ en-US ] = "Bold Font" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ITALX ;
- HelpId = HID_SMA_ITALX ;
- Text [ en-US ] = "Italic Font" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SIZEXY ;
- HelpId = HID_SMA_SIZEXY ;
- Text [ en-US ] = "Resize" ;
- };
- ToolBoxItem
- {
- Identifier = RID_FONTXY ;
- HelpId = HID_SMA_FONTXY ;
- Text [ en-US ] = "Change Font" ;
- };
- };
- };
- ToolBox 7
- {
- // parentheses
- HelpId = HID_SMA_BRACKETS_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 5 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_LRPARENTX ;
- HelpId = HID_SMA_LRPARENTX ;
- Text [ en-US ] = "Round Brackets" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LRBRACKETX ;
- HelpId = HID_SMA_LRBRACKETX ;
- Text [ en-US ] = "Square Brackets" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LRDBRACKETX ;
- HelpId = HID_SMA_LRDBRACKETX ;
- Text [ en-US ] = "Double Square Brackets";
- };
- ToolBoxItem
- {
- Identifier = RID_LRLINEX ;
- HelpId = HID_SMA_LRLINEX ;
- Text [ en-US ] = "Single Lines" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LRDLINEX ;
- HelpId = HID_SMA_LRDLINEX ;
- Text [ en-US ] = "Double Lines" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_LRBRACEX ;
- HelpId = HID_SMA_LRBRACEX ;
- Text [ en-US ] = "Braces" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LRANGLEX ;
- HelpId = HID_SMA_LRANGLEX ;
- Text [ en-US ] = "Angle Brackets" ;
- };
- ToolBoxItem
- {
- Identifier = RID_LMRANGLEXY ;
- HelpId = HID_SMA_LMRANGLEXY ;
- Text [ en-US ] = "Operator Brackets";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_LRGROUPX ;
- HelpId = HID_SMA_LRGROUPX ;
- Text [ en-US ] = "Group Brackets" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLRPARENTX ;
- HelpId = HID_SMA_SLRPARENTX ;
- Text [ en-US ] = "Round Brackets (Scalable)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLRBRACKETX ;
- HelpId = HID_SMA_SLRBRACKETX ;
- Text [ en-US ] = "Square Brackets (Scalable)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLRDBRACKETX ;
- HelpId = HID_SMA_SLRDBRACKETX ;
- Text [ en-US ] = "Double Square Brackets (Scalable)";
- };
- ToolBoxItem
- {
- Identifier = RID_SLRLINEX ;
- HelpId = HID_SMA_SLRLINEX ;
- Text [ en-US ] = "Single Lines (Scalable)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLRDLINEX ;
- HelpId = HID_SMA_SLRDLINEX ;
- Text [ en-US ] = "Double Lines (Scalable)" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLRBRACEX ;
- HelpId = HID_SMA_SLRBRACEX ;
- Text [ en-US ] = "Braces (Scalable)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLRANGLEX ;
- HelpId = HID_SMA_SLRANGLEX ;
- Text [ en-US ] = "Angle Brackets (Scalable)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SLMRANGLEXY ;
- HelpId = HID_SMA_SLMRANGLEXY ;
- Text [ en-US ] = "Operator Brackets (Scalable)";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_XOVERBRACEY ;
- HelpId = HID_SMA_XOVERBRACEY ;
- Text [ en-US ] = "Braces Top (Scalable)";
- };
- ToolBoxItem
- {
- Identifier = RID_XUNDERBRACEY ;
- HelpId = HID_SMA_XUNDERBRACEY ;
- Text [ en-US ] = "Braces Bottom (Scalable)";
- };
- };
- };
- ToolBox 8
- {
- // format
- HelpId = HID_SMA_FORMAT_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 3 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_LSUPX ;
- HelpId = HID_SMA_LSUPX ;
- Text [ en-US ] = "Superscript Left" ;
- };
- ToolBoxItem
- {
- Identifier = RID_CSUPX ;
- HelpId = HID_SMA_CSUPX ;
- Text [ en-US ] = "Superscript Top";
- };
- ToolBoxItem
- {
- Identifier = RID_RSUPX ;
- HelpId = HID_SMA_RSUPX ;
- Text [ en-US ] = "Superscript Right" ;
- };
- ToolBoxItem
- {
- Identifier = RID_BINOMXY ;
- HelpId = HID_SMA_BINOMXY ;
- Text [ en-US ] = "Vertical Stack (2 Elements)" ;
- };
- ToolBoxItem
- {
- Identifier = RID_NEWLINE ;
- HelpId = HID_SMA_NEWLINE ;
- Text [ en-US ] = "New Line" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_LSUBX ;
- HelpId = HID_SMA_LSUBX ;
- Text [ en-US ] = "Subscript Left" ;
- };
- ToolBoxItem
- {
- Identifier = RID_CSUBX ;
- HelpId = HID_SMA_CSUBX ;
- Text [ en-US ] = "Subscript Bottom";
- };
- ToolBoxItem
- {
- Identifier = RID_RSUBX ;
- HelpId = HID_SMA_RSUBX ;
- Text [ en-US ] = "Subscript Right" ;
- };
- ToolBoxItem
- {
- Identifier = RID_STACK ;
- HelpId = HID_SMA_STACK ;
- Text [ en-US ] = "Vertical Stack" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SBLANK ;
- HelpId = HID_SMA_SBLANK ;
- Text [ en-US ] = "Small Gap" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_ALIGNLX ;
- HelpId = HID_SMA_ALIGNLX ;
- Text [ en-US ] = "Align Left" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ALIGNCX ;
- HelpId = HID_SMA_ALIGNCX ;
- Text [ en-US ] = "Align Center" ;
- };
- ToolBoxItem
- {
- Identifier = RID_ALIGNRX ;
- HelpId = HID_SMA_ALIGNRX ;
- Text [ en-US ] = "Align Right" ;
- };
- ToolBoxItem
- {
- Identifier = RID_MATRIX ;
- HelpId = HID_SMA_MATRIX ;
- Text [ en-US ] = "Matrix Stack" ;
- };
- ToolBoxItem
- {
- Identifier = RID_BLANK ;
- HelpId = HID_SMA_BLANK ;
- Text [ en-US ] = "Gap" ;
- };
- };
- };
- ToolBox 9
- {
- // misc
- HelpId = HID_SMA_FORMAT_TBX ;
- Pos = MAP_APPFONT ( 0 , 45 ) ;
- Size = MAP_APPFONT ( 65 , 95 ) ;
- SVLook = TRUE ;
- Hide = TRUE ;
- LineCount = 4 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_INFINITY ;
- HelpId = HID_SMA_INFINITY ;
- Text [ en-US ] = "infinite";
- };
- ToolBoxItem
- {
- Identifier = RID_PARTIAL ;
- HelpId = HID_SMA_PARTIAL ;
- Text [ en-US ] = "Partial";
- };
- ToolBoxItem
- {
- Identifier = RID_NABLA ;
- HelpId = HID_SMA_NABLA ;
- Text [ en-US ] = "Nabla";
- };
- ToolBoxItem
- {
- Identifier = RID_EXISTS ;
- HelpId = HID_SMA_EXISTS ;
- Text [ en-US ] = "There Exists";
- };
- ToolBoxItem
- {
- Identifier = RID_FORALL ;
- HelpId = HID_SMA_FORALL ;
- Text [ en-US ] = "For All";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_HBAR ;
- HelpId = HID_SMA_HBAR ;
- Text [ en-US ] = "h Bar";
- };
- ToolBoxItem
- {
- Identifier = RID_LAMBDABAR ;
- HelpId = HID_SMA_LAMBDABAR ;
- Text [ en-US ] = "Lambda Bar";
- };
- ToolBoxItem
- {
- Identifier = RID_RE ;
- HelpId = HID_SMA_RE ;
- Text [ en-US ] = "Real Part";
- };
- ToolBoxItem
- {
- Identifier = RID_IM ;
- HelpId = HID_SMA_IM ;
- Text [ en-US ] = "Imaginary Part";
- };
- ToolBoxItem
- {
- Identifier = RID_WP ;
- HelpId = HID_SMA_WP ;
- Text [ en-US ] = "Weierstrass p";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_LEFTARROW ;
- HelpId = HID_SMA_LEFTARROW ;
- Text [ en-US ] = "Left Arrow";
- };
- ToolBoxItem
- {
- Identifier = RID_RIGHTARROW ;
- HelpId = HID_SMA_RIGHTARROW ;
- Text [ en-US ] = "Right Arrow";
- };
- ToolBoxItem
- {
- Identifier = RID_UPARROW ;
- HelpId = HID_SMA_UPARROW ;
- Text [ en-US ] = "Up Arrow";
- };
- ToolBoxItem
- {
- Identifier = RID_DOWNARROW ;
- HelpId = HID_SMA_DOWNARROW ;
- Text [ en-US ] = "Down Arrow";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_DOTSLOW ;
- HelpId = HID_SMA_DOTSLOW ;
- Text [ en-US ] = "Dots At Bottom";
- };
- ToolBoxItem
- {
- Identifier = RID_DOTSAXIS ;
- HelpId = HID_SMA_DOTSAXIS ;
- Text [ en-US ] = "Dots In Middle";
- };
- ToolBoxItem
- {
- Identifier = RID_DOTSVERT ;
- HelpId = HID_SMA_DOTSVERT ;
- Text [ en-US ] = "Dots Vertically";
- };
- ToolBoxItem
- {
- Identifier = RID_DOTSUP ;
- HelpId = HID_SMA_DOTSUP ;
- Text [ en-US ] = "Dots To Top";
- };
- ToolBoxItem
- {
- Identifier = RID_DOTSDOWN ;
- HelpId = HID_SMA_DOTSDOWN ;
- Text [ en-US ] = "Dots to Bottom";
- };
- };
- };
- ToolBox 10
- {
- // main menu of selection-window
- HelpId = HID_SMA_SELECTION_TBX ;
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( 65 , 38 ) ;
- SVLook = TRUE ;
- LineCount = 2 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = RID_UNBINOPS_CAT ;
- HelpId = HID_SMA_UNBINOPS_CAT ;
- Text [ en-US ] = "Unary/Binary Operators" ;
- };
- ToolBoxItem
- {
- Identifier = RID_RELATIONS_CAT ;
- HelpId = HID_SMA_RELATIONS_CAT ;
- Text [ en-US ] = "Relations" ;
- };
- ToolBoxItem
- {
- Identifier = RID_SETOPERATIONS_CAT ;
- HelpId = HID_SMA_SETOPERATIONS_CAT ;
- Text [ en-US ] = "Set Operations" ;
- };
- ToolBoxItem
- {
- Identifier = RID_FUNCTIONS_CAT ;
- HelpId = HID_SMA_FUNCTIONS_CAT ;
- Text [ en-US ] = "Functions" ;
- };
- ToolBoxItem
- {
- Identifier = RID_OPERATORS_CAT ;
- HelpId = HID_SMA_OPERATORS_CAT ;
- Text [ en-US ] = "Operators" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = RID_ATTRIBUTES_CAT ;
- HelpId = HID_SMA_ATTRIBUTES_CAT ;
- Text [ en-US ] = "Attributes" ;
- };
- ToolBoxItem
- {
- Identifier = RID_MISC_CAT ;
- HelpId = HID_SMA_MISC_CAT ;
- Text [ en-US ] = "Others";
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = RID_BRACKETS_CAT ;
- HelpId = HID_SMA_BRACKETS_CAT ;
- Text [ en-US ] = "Brackets" ;
- };
- ToolBoxItem
- {
- Identifier = RID_FORMAT_CAT ;
- HelpId = HID_SMA_FORMAT_CAT ;
- Text [ en-US ] = "Formats" ;
- };
- };
- };
- FixedLine FL_TOOLBOX_CAT_DELIM
- {
- Pos = MAP_APPFONT ( 0 , 44 ) ;
- Size = MAP_APPFONT ( 65 , 4 ) ;
- };
-};
-
#define CMDBOXWINDOW_TEXT \
Text [ en-US ] = "Commands" ; \
@@ -2870,318 +1521,6 @@ DockingWindow RID_CMDBOXWINDOW\
};
-#define UNBINOPS_IDLIST \
- IdList = \
- { \
- RID_PLUSX ; \
- RID_MINUSX ; \
- RID_PLUSMINUSX ; \
- RID_MINUSPLUSX ; \
- RID_XPLUSY ; \
- RID_XCDOTY ; \
- RID_XTIMESY ; \
- RID_XSYMTIMESY ; \
- RID_XMINUSY ; \
- RID_XOVERY ; \
- RID_XDIVY ; \
- RID_XSYMDIVIDEY ; \
- RID_NEGX ; \
- RID_XANDY ; \
- RID_XORY ; \
- RID_XCIRCY ; \
- }; \
- IdCount = { 16 ; };
-
- ImageList RID_IL_UNBINOPS
- {
- Prefix = "un";
- MaskColor = IMAGE_STDBTN_COLOR ;
- UNBINOPS_IDLIST
- };
-
-#define RELATIONS_IDLIST \
- IdList = \
- { \
- RID_XEQY ; \
- RID_XNEQY ; \
- RID_XEQUIVY ; \
- RID_XORTHOY ; \
- RID_XLTY ; \
- RID_XGTY ; \
- RID_XAPPROXY ; \
- RID_XPARALLELY ; \
- RID_XLESLANTY ; \
- RID_XGESLANTY ; \
- RID_XSIMEQY ; \
- RID_XPROPY ; \
- RID_XLEY ; \
- RID_XGEY ; \
- RID_XSIMY ; \
- RID_XTOWARDY ; \
- RID_XDIVIDESY ; \
- RID_XNDIVIDESY; \
- RID_DLARROW ; \
- RID_DLRARROW ; \
- RID_DRARROW ; \
- }; \
- IdCount ={ 21 ; };
-
- ImageList RID_IL_RELATIONS
- {
- Prefix = "bi";
- MaskColor = IMAGE_STDBTN_COLOR ;
- RELATIONS_IDLIST
- };
-
-#define SETOPERATIONS_IDLIST \
- IdList = \
- { \
- RID_XINY ; \
- RID_XNOTINY ; \
- RID_XOWNSY ; \
- RID_XINTERSECTIONY ; \
- RID_XUNIONY ; \
- RID_XSETMINUSY ; \
- RID_XSLASHY ; \
- RID_XSUBSETY ; \
- RID_XSUBSETEQY ; \
- RID_XSUPSETY ; \
- RID_XSUPSETEQY ; \
- RID_XNSUBSETY ; \
- RID_XNSUBSETEQY ; \
- RID_XNSUPSETY ; \
- RID_XNSUPSETEQY ; \
- RID_EMPTYSET ; \
- RID_ALEPH ; \
- RID_SETN ; \
- RID_SETZ ; \
- RID_SETQ ; \
- RID_SETR ; \
- RID_SETC ; \
- }; \
- IdCount = { 22 ; };
-
- ImageList RID_IL_SETOPERATIONS
- {
- Prefix = "op";
- MaskColor = IMAGE_STDBTN_COLOR ;
- SETOPERATIONS_IDLIST
- };
-
-#define FUNCTIONS_IDLIST \
- IdList = \
- { \
- RID_ABSX ; \
- RID_FACTX ; \
- RID_SQRTX ; \
- RID_NROOTXY ; \
- RID_EX ; \
- RID_LNX ; \
- RID_EXPX ; \
- RID_LOGX ; \
- RID_SINX ; \
- RID_COSX ; \
- RID_TANX ; \
- RID_COTX ; \
- RID_SINHX ; \
- RID_COSHX ; \
- RID_TANHX ; \
- RID_COTHX ; \
- RID_ARCSINX ; \
- RID_ARCCOSX ; \
- RID_ARCTANX ; \
- RID_ARCCOTX ; \
- RID_ARSINHX ; \
- RID_ARCOSHX ; \
- RID_ARTANHX ; \
- RID_ARCOTHX ; \
- RID_RSUPX ; \
- }; \
- IdCount = { 25 ; };
-
- ImageList RID_IL_FUNCTIONS
- {
- Prefix = "fu";
- MaskColor = IMAGE_STDBTN_COLOR ;
- FUNCTIONS_IDLIST
- };
-
-#define OPERATORS_IDLIST \
- IdList = \
- { \
- RID_LIMX ; \
- RID_SUMX ; \
- RID_PRODX ; \
- RID_COPRODX ; \
- RID_INTX ; \
- RID_IINTX ; \
- RID_IIINTX ; \
- RID_LINTX ; \
- RID_LLINTX ; \
- RID_LLLINTX ; \
- RID_FROMXTOY ; \
- RID_FROMX ; \
- RID_TOX ; \
- }; \
- IdCount = { 13 ; };
-
- ImageList RID_IL_OPERATORS
- {
- Prefix = "fo";
- MaskColor = IMAGE_STDBTN_COLOR ;
- OPERATORS_IDLIST
- };
-
-#define ATTRIBUTES_IDLIST \
- IdList = \
- { \
- RID_ACUTEX ; \
- RID_GRAVEX ; \
- RID_CHECKX ; \
- RID_BREVEX ; \
- RID_BARX ; \
- RID_VECX ; \
- RID_HATX ; \
- RID_TILDEX ; \
- RID_CIRCLEX ; \
- RID_DOTX ; \
- RID_DDOTX ; \
- RID_DDDOTX ; \
- RID_OVERLINEX ; \
- RID_UNDERLINEX ; \
- RID_OVERSTRIKEX ; \
- RID_PHANTOMX ; \
- RID_BOLDX ; \
- RID_ITALX ; \
- RID_SIZEXY ; \
- RID_FONTXY ; \
- RID_WIDEHATX ; \
- RID_WIDETILDEX ; \
- RID_WIDEVECX ; \
- }; \
- IdCount = { 23 ; };
-
- ImageList RID_IL_ATTRIBUTES
- {
- Prefix = "at";
- MaskColor = IMAGE_STDBTN_COLOR ;
- ATTRIBUTES_IDLIST
- };
-
-#define BRACKETS_IDLIST \
- IdList = \
- { \
- RID_LRPARENTX ; \
- RID_LRBRACKETX ; \
- RID_LRANGLEX ; \
- RID_LRBRACEX ; \
- RID_LRLINEX ; \
- RID_LRDLINEX ; \
- RID_LMRANGLEXY ; \
- RID_LRGROUPX ; \
- RID_SLRPARENTX ; \
- RID_SLRBRACKETX ; \
- RID_SLRANGLEX ; \
- RID_SLRBRACEX ; \
- RID_SLRLINEX ; \
- RID_SLRDLINEX ; \
- RID_SLMRANGLEXY ; \
- RID_LRDBRACKETX ; \
- RID_SLRDBRACKETX ; \
- RID_XOVERBRACEY ; \
- RID_XUNDERBRACEY ; \
- }; \
- IdCount = { 19 ; };
-
- ImageList RID_IL_BRACKETS
- {
- Prefix = "al";
- MaskColor = IMAGE_STDBTN_COLOR ;
- BRACKETS_IDLIST
- };
-
-#define FORMAT_IDLIST \
- IdList = \
- { \
- RID_NEWLINE ; \
- RID_SBLANK ; \
- RID_BLANK ; \
- RID_BINOMXY ; \
- RID_STACK ; \
- RID_MATRIX ; \
- RID_ALIGNLX ; \
- RID_ALIGNCX ; \
- RID_ALIGNRX ; \
- RID_RSUBX ; \
- RID_RSUPX ; \
- RID_LSUBX ; \
- RID_LSUPX ; \
- RID_CSUBX ; \
- RID_CSUPX ; \
- }; \
- IdCount = { 15 ; };
-
- ImageList RID_IL_FORMAT
- {
- Prefix = "co";
- MaskColor = IMAGE_STDBTN_COLOR ;
- FORMAT_IDLIST
- };
-
-#define MISC_IDLIST \
- IdList = \
- { \
- RID_INFINITY ; \
- RID_PARTIAL ; \
- RID_NABLA ; \
- RID_EXISTS ; \
- RID_FORALL ; \
- RID_HBAR; \
- RID_LAMBDABAR ; \
- RID_RE ; \
- RID_IM ; \
- RID_WP ; \
- RID_LEFTARROW ; \
- RID_RIGHTARROW ; \
- RID_UPARROW ; \
- RID_DOWNARROW ; \
- RID_DOTSLOW ; \
- RID_DOTSAXIS ; \
- RID_DOTSVERT ; \
- RID_DOTSUP ; \
- RID_DOTSDOWN ; \
- }; \
- IdCount = { 19 ; };
-
- ImageList RID_IL_MISC
- {
- Prefix = "mi";
- MaskColor = IMAGE_STDBTN_COLOR ;
- MISC_IDLIST
- };
-
-#define CATALOG_IDLIST \
- IdList = \
- { \
- RID_UNBINOPS_CAT ; \
- RID_RELATIONS_CAT ; \
- RID_SETOPERATIONS_CAT ; \
- RID_FUNCTIONS_CAT ; \
- RID_OPERATORS_CAT ; \
- RID_ATTRIBUTES_CAT ; \
- RID_MISC_CAT ; \
- RID_BRACKETS_CAT ; \
- RID_FORMAT_CAT ; \
- }; \
- IdCount = { 9 ; };
-
- ImageList RID_IL_CATALOG
- {
- Prefix = "im";
- MaskColor = IMAGE_STDBTN_COLOR ;
- CATALOG_IDLIST
- };
-
String STR_CMDBOXWINDOW
{
CMDBOXWINDOW_TEXT
@@ -3308,76 +1647,6 @@ String RID_ERR_RIGHTEXPECTED
Text [ en-US ] = "'RIGHT' expected" ;
};
-#include "menu.src"
-
-ToolBox RID_MATH_TOOLBOX
-{
- HelpId = RID_MATH_TOOLBOX ;
- Customize = TRUE ;
- LineSpacing = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Scroll = TRUE ;
- HideWhenDeactivate = TRUE ;
- Border = TRUE ;
- SVLook = TRUE ;
- Align = BOXALIGN_LEFT ;
- Size = MAP_APPFONT ( 0 , 0 ) ;
- MenuStrings = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_ZOOMIN ;
- HelpID = SID_ZOOMIN ;
- Text [ en-US ] = "Zoom In" ;
- };
- ToolBoxItem
- {
- Identifier = SID_ZOOMOUT ;
- HelpID = SID_ZOOMOUT ;
- Text [ en-US ] = "Zoom Out" ;
- };
- ToolBoxItem
- {
- Identifier = SID_VIEW100 ;
- HelpID = SID_VIEW100 ;
- Text [ en-US ] = "Zoom 100%" ;
- };
- ToolBoxItem
- {
- Identifier = SID_ADJUST ;
- HelpID = SID_ADJUST ;
- Text [ en-US ] = "Entire Formula" ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_DRAW ;
- HelpID = SID_DRAW ;
- Text [ en-US ] = "Refresh" ;
- };
- ToolBoxItem
- {
- Identifier = SID_FORMULACURSOR ;
- HelpID = SID_FORMULACURSOR ;
- Text [ en-US ] = "Formula Cursor";
- };
- ToolBoxItem
- {
- Identifier = SID_SYMBOLS_CATALOGUE ;
- HelpID = SID_SYMBOLS_CATALOGUE ;
- Text [ en-US ] = "Symbols" ;
- };
- };
-};
-
String RID_MATH_TOOLBOX
{
Text [ en-US ] = "Main Toolbar" ;
@@ -3390,21 +1659,12 @@ StringArray RID_PRINTUIOPTIONS
< "%PRODUCTNAME %s"; >;
< "Contents"; >;
< "~Title"; >;
- < "Specifies whether you want the name of the document to be included in the printout"; >;
< "~Formula text"; >;
- < "Specifies whether to include the contents of the 'Commands' window at the bottom of the printout."; >;
< "B~orders"; >;
- < "Applies a thin border to the formula area in the printout."; >;
< "Size"; >;
< "O~riginal size"; >;
- < "Prints the formula without adjusting the current font size."; >;
< "Fit to ~page"; >;
- < "Adjusts the formula to the page format used in the printout."; >;
< "~Scaling"; >;
- < "Reduces or enlarges the size of the printed formula by a specified enlargement factor."; >;
- < "Miscellaneous options"; >;
- < "Ig~nore ~~ and ` at the end of the line"; >;
- < "Specfies that these space wildcards will be removed if they are at the end of a line."; >;
};
};
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index fb87c31521d5..b0deeb4d93fe 100644
--- a/starmath/source/symbol.cxx
+++ b/starmath/source/symbol.cxx
@@ -78,7 +78,7 @@ SmSym::SmSym(const SmSym& rSymbol)
}
-SmSym::SmSym(const String& rName, const Font& rFont, sal_Unicode cChar,
+SmSym::SmSym(const String& rName, const Font& rFont, sal_UCS4 cChar,
const String& rSet, bool bIsPredefined)
{
m_aName = m_aExportName = rName;
@@ -207,14 +207,19 @@ bool SmSymbolManager::AddOrReplaceSymbol( const SmSym &rSymbol, bool bForceChang
}
else if (pFound && !bForceChange && bSymbolConflict)
{
- // TODO: but what ...
+ // TODO: to solve this a document owned symbol manager would be required ...
OSL_FAIL( "symbol conflict, different symbol with same name found!" );
+ // symbols in all formulas. A copy of the global one would be needed here
+ // and then the new symbol has to be forcefully applied. This would keep
+ // the current formula intact but will leave the set of symbols in the
+ // global symbol manager somewhat to chance.
}
- }
OSL_ENSURE( bAdded, "failed to add symbol" );
- if (bAdded)
- m_bModified = true;
+ if (bAdded)
+ m_bModified = true;
+ DBG_ASSERT( bAdded || (pFound && !bSymbolConflict), "AddOrReplaceSymbol: unresolved symbol conflict" );
+ }
return bAdded;
}
diff --git a/starmath/source/toolbox.cxx b/starmath/source/toolbox.cxx
index a7645cb9b703..e398e6313114 100644
--- a/starmath/source/toolbox.cxx
+++ b/starmath/source/toolbox.cxx
@@ -46,9 +46,9 @@
////////////////////////////////////////////////////////////
-static USHORT GetImageListRID( USHORT nCategoryRID )
+static sal_uInt16 GetImageListRID( sal_uInt16 nCategoryRID )
{
- USHORT nRes = 0xFFFF;
+ sal_uInt16 nRes = 0xFFFF;
switch (nCategoryRID)
{
case RID_UNBINOPS_CAT : nRes = RID_IL_UNBINOPS; break;
@@ -67,7 +67,7 @@ static USHORT GetImageListRID( USHORT nCategoryRID )
}
-static sal_Int16 GetToolBoxCategoriesIndex( USHORT nCategoryRID )
+static sal_Int16 GetToolBoxCategoriesIndex( sal_uInt16 nCategoryRID )
{
sal_Int16 nIdx = -1;
switch (nCategoryRID)
@@ -88,9 +88,9 @@ static sal_Int16 GetToolBoxCategoriesIndex( USHORT nCategoryRID )
}
-static USHORT GetCategoryRID( USHORT nResId )
+static sal_uInt16 GetCategoryRID( sal_uInt16 nResId )
{
- USHORT nRes = 0xFFFF;
+ sal_uInt16 nRes = 0xFFFF;
switch (nResId)
{
case RID_IL_UNBINOPS : nRes = RID_UNBINOPS_CAT; break;
@@ -121,7 +121,7 @@ SmToolBoxWindow::SmToolBoxWindow(SfxBindings *pTmpBindings,
SfxChildWindow *pChildWindow,
Window *pParent) :
SfxFloatingWindow(pTmpBindings, pChildWindow, pParent, SmResId(RID_TOOLBOXWINDOW)),
- aToolBoxCat(this, SmResId(NUM_TBX_CATEGORIES + 1)),
+ aToolBoxCat(this, SmResId(TOOLBOX_CATALOG)),
aToolBoxCat_Delim(this, SmResId( FL_TOOLBOX_CAT_DELIM ))
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmToolBoxWindow::SmToolBoxWindow" );
@@ -129,14 +129,14 @@ SmToolBoxWindow::SmToolBoxWindow(SfxBindings *pTmpBindings,
// allow for cursor travelling between toolbox and sub-categories
SetStyle( GetStyle() | WB_DIALOGCONTROL );
- nActiveCategoryRID = sal::static_int_cast< USHORT >(-1);
+ nActiveCategoryRID = USHRT_MAX;
aToolBoxCat.SetClickHdl(LINK(this, SmToolBoxWindow, CategoryClickHdl));
- USHORT i;
- for (i = 0; i < NUM_TBX_CATEGORIES; i++)
+ sal_uInt16 i;
+ for (i = 0; i < NUM_TBX_CATEGORIES; ++i)
{
- ToolBox *pBox = new ToolBox(this, SmResId (i+1));
+ ToolBox *pBox = new ToolBox(this, SmResId( TOOLBOX_CAT_A + i ));
vToolBoxCategories[i] = pBox;
pBox->SetSelectHdl(LINK(this, SmToolBoxWindow, CmdSelectHdl));
}
@@ -146,15 +146,12 @@ SmToolBoxWindow::SmToolBoxWindow(SfxBindings *pTmpBindings,
aImageLists [i] = 0;
FreeResource();
-
- ApplyImageLists( RID_UNBINOPS_CAT );
- SetCategory( RID_UNBINOPS_CAT );
}
SmToolBoxWindow::~SmToolBoxWindow()
{
int i;
- for (i = 0; i < NUM_TBX_CATEGORIES; i++)
+ for (i = 0; i < NUM_TBX_CATEGORIES; ++i)
{
ToolBox *pBox = vToolBoxCategories[i];
delete pBox;
@@ -171,7 +168,7 @@ SmViewShell * SmToolBoxWindow::GetView()
}
-const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId )
+const ImageList * SmToolBoxWindow::GetImageList( sal_uInt16 nResId )
{
// creates the image list via its resource id and stores that
// list for later use in the respective array.
@@ -179,7 +176,7 @@ const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId )
const ImageList *pIL = 0;
// get index to use
- USHORT nCategoryRID = GetCategoryRID( nResId );
+ sal_uInt16 nCategoryRID = GetCategoryRID( nResId );
sal_Int16 nIndex = GetToolBoxCategoriesIndex( nCategoryRID );
if (nIndex == -1 && (nResId == RID_IL_CATALOG))
nIndex = NUM_TBX_CATEGORIES;
@@ -197,7 +194,7 @@ const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId )
}
-void SmToolBoxWindow::ApplyImageLists( USHORT nCategoryRID )
+void SmToolBoxWindow::ApplyImageLists( sal_uInt16 nCategoryRID )
{
// set image list for toolbox 'catalog'
const ImageList *pImageList = GetImageList( RID_IL_CATALOG );
@@ -207,7 +204,7 @@ void SmToolBoxWindow::ApplyImageLists( USHORT nCategoryRID )
// set image list for active (visible) category of 'catalog'
sal_Int16 nIdx = GetToolBoxCategoriesIndex( nCategoryRID );
- USHORT nResId = GetImageListRID( nCategoryRID );
+ sal_uInt16 nResId = GetImageListRID( nCategoryRID );
pImageList = GetImageList( nResId );
OSL_ENSURE( pImageList && nIdx >= 0, "image list or index missing" );
if (pImageList && nIdx >= 0)
@@ -227,11 +224,11 @@ void SmToolBoxWindow::StateChanged( StateChangedType nStateChange )
static bool bSetPosition = true;
if (STATE_CHANGE_INITSHOW == nStateChange)
{
+ SetCategory( nActiveCategoryRID == USHRT_MAX ? RID_UNBINOPS_CAT : nActiveCategoryRID );
+
// calculate initial position to be used after creation of the window...
AdjustPosSize( bSetPosition );
bSetPosition = false;
-
- SetCategory(RID_UNBINOPS_CAT);
}
//... otherwise the base class will remember the last position of the window
SfxFloatingWindow::StateChanged( nStateChange );
@@ -241,7 +238,7 @@ void SmToolBoxWindow::StateChanged( StateChangedType nStateChange )
void SmToolBoxWindow::AdjustPosSize( bool bSetPos )
{
Size aCatSize( aToolBoxCat.CalcWindowSizePixel( 2 ) );
- Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( 5 ) );
+ Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( 4 /* see nLines in SetCategory*/ ) );
OSL_ENSURE( aCatSize.Width() == aCmdSize.Width(), "width mismatch" );
// catalog settings
@@ -249,14 +246,12 @@ void SmToolBoxWindow::AdjustPosSize( bool bSetPos )
aToolBoxCat.SetSizePixel( aCatSize );
// settings for catalog / category delimiter
Point aP( aToolBoxCat_Delim.GetPosPixel() );
- aP.X() += 5;
+ aP.X() = 0;
aToolBoxCat_Delim.SetPosPixel( aP );
- Size aS( aCatSize.Width() - 10, 10 );
- aToolBoxCat_Delim.SetSizePixel( aS );
+ aToolBoxCat_Delim.SetSizePixel( Size( aCatSize.Width(), aToolBoxCat_Delim.GetSizePixel().Height() ) );
// category settings
- aP.X() = 0;
aP.Y() += aToolBoxCat_Delim.GetSizePixel().Height();
- for (int i = 0; i < NUM_TBX_CATEGORIES; i++)
+ for (int i = 0; i < NUM_TBX_CATEGORIES; ++i)
{
vToolBoxCategories[i]->SetPosPixel( aP );
vToolBoxCategories[i]->SetSizePixel( aCmdSize );
@@ -285,7 +280,7 @@ void SmToolBoxWindow::AdjustPosSize( bool bSetPos )
}
-BOOL SmToolBoxWindow::Close()
+sal_Bool SmToolBoxWindow::Close()
{
SmViewShell *pViewSh = GetView();
if (pViewSh)
@@ -302,66 +297,63 @@ void SmToolBoxWindow::GetFocus()
aToolBoxCat.GrabFocus();
}
-void SmToolBoxWindow::SetCategory(USHORT nCategoryRID)
+void SmToolBoxWindow::SetCategory(sal_uInt16 nCategoryRID)
{
if (nCategoryRID != nActiveCategoryRID)
- {
ApplyImageLists( nCategoryRID );
- USHORT nLines;
- // check for valid resource id
- switch (nCategoryRID)
- {
- case RID_UNBINOPS_CAT : nLines = 4; break;
- case RID_RELATIONS_CAT: nLines = 5; break;
- case RID_SETOPERATIONS_CAT: nLines = 5; break;
- case RID_FUNCTIONS_CAT: nLines = 5; break;
- case RID_OPERATORS_CAT: nLines = 3; break;
- case RID_ATTRIBUTES_CAT: nLines = 5; break;
- case RID_MISC_CAT: nLines = 4; break;
- case RID_BRACKETS_CAT: nLines = 5; break;
- case RID_FORMAT_CAT: nLines = 3; break;
- default:
- // nothing to be done
- return;
- }
+ sal_uInt16 nLines;
+ // check for valid resource id
+ switch (nCategoryRID)
+ {
+ case RID_UNBINOPS_CAT : nLines = 4; break;
+ case RID_RELATIONS_CAT: nLines = 4; break;
+ case RID_SETOPERATIONS_CAT: nLines = 4; break;
+ case RID_FUNCTIONS_CAT: nLines = 4; break;
+ case RID_OPERATORS_CAT: nLines = 3; break;
+ case RID_ATTRIBUTES_CAT: nLines = 4; break;
+ case RID_MISC_CAT: nLines = 4; break;
+ case RID_BRACKETS_CAT: nLines = 4; break;
+ case RID_FORMAT_CAT: nLines = 3; break;
+ default:
+ // nothing to be done
+ return;
+ }
- pToolBoxCmd->Hide();
+ pToolBoxCmd->Hide();
- sal_Int16 nIdx = GetToolBoxCategoriesIndex( nCategoryRID );
+ sal_Int16 nIdx = GetToolBoxCategoriesIndex( nCategoryRID );
OSL_ENSURE( nIdx >= 0, "unkown category" );
- if (nIdx >= 0)
- pToolBoxCmd = vToolBoxCategories[nIdx];
+ if (nIdx >= 0)
+ pToolBoxCmd = vToolBoxCategories[nIdx];
- // calculate actual size of window to use
- Size aCatSize( aToolBoxCat.CalcWindowSizePixel( 2 ) );
- Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( nLines ) );
+ // calculate actual size of window to use
+ Size aCatSize( aToolBoxCat.CalcWindowSizePixel( 2 ) );
+ Size aCmdSize( pToolBoxCmd->CalcWindowSizePixel( nLines ) );
OSL_ENSURE( aCatSize.Width() == aCmdSize.Width(), "width mismatch" );
- // main window settings
- Size aWndSize ( aCatSize.Width(), pToolBoxCmd->GetPosPixel().Y() + aCmdSize.Height() + 3);
- SetOutputSizePixel( aWndSize );
+ // main window settings
+ Size aWndSize ( aCatSize.Width(), pToolBoxCmd->GetPosPixel().Y() + aCmdSize.Height() + 3);
+ SetOutputSizePixel( aWndSize );
- if (nActiveCategoryRID)
+ if (nActiveCategoryRID)
aToolBoxCat.CheckItem(nActiveCategoryRID, false);
- nActiveCategoryRID = nCategoryRID;
+ nActiveCategoryRID = nCategoryRID;
aToolBoxCat.CheckItem(nActiveCategoryRID, true);
- pToolBoxCmd->Show();
- }
+ pToolBoxCmd->Show();
}
-IMPL_LINK_INLINE_START( SmToolBoxWindow, CategoryClickHdl, ToolBox*, pToolBox)
+IMPL_LINK( SmToolBoxWindow, CategoryClickHdl, ToolBox*, pToolBox)
{
int nItemId = pToolBox->GetCurItemId();
if (nItemId != 0)
- SetCategory( sal::static_int_cast< USHORT >(nItemId) );
+ SetCategory( sal::static_int_cast< sal_uInt16 >(nItemId) );
return 0;
}
-IMPL_LINK_INLINE_END( SmToolBoxWindow, CategoryClickHdl, ToolBox*, pToolBox)
-IMPL_LINK_INLINE_START( SmToolBoxWindow, CmdSelectHdl, ToolBox*, pToolBox)
+IMPL_LINK( SmToolBoxWindow, CmdSelectHdl, ToolBox*, pToolBox)
{
SmViewShell *pViewSh = GetView();
if (pViewSh)
@@ -370,7 +362,6 @@ IMPL_LINK_INLINE_START( SmToolBoxWindow, CmdSelectHdl, ToolBox*, pToolBox)
new SfxInt16Item(SID_INSERTCOMMAND, pToolBox->GetCurItemId()), 0L);
return 0;
}
-IMPL_LINK_INLINE_END( SmToolBoxWindow, CmdSelectHdl, ToolBox*, pToolBox)
/**************************************************************************/
@@ -378,7 +369,7 @@ IMPL_LINK_INLINE_END( SmToolBoxWindow, CmdSelectHdl, ToolBox*, pToolBox)
SFX_IMPL_FLOATINGWINDOW(SmToolBoxWrapper, SID_TOOLBOXWINDOW);
SmToolBoxWrapper::SmToolBoxWrapper(Window *pParentWindow,
- USHORT nId, SfxBindings* pBindings,
+ sal_uInt16 nId, SfxBindings* pBindings,
SfxChildWinInfo *pInfo) :
SfxChildWindow(pParentWindow, nId)
{
diff --git a/starmath/source/toolbox.hrc b/starmath/source/toolbox.hrc
index 687521d76a32..29adff303a3e 100644..100755
--- a/starmath/source/toolbox.hrc
+++ b/starmath/source/toolbox.hrc
@@ -28,7 +28,19 @@
#ifndef _TOOLBOX_HRC_
#define _TOOLBOX_HRC_
-#define FL_TOOLBOX_CAT_DELIM 21
+#define FL_TOOLBOX_CAT_DELIM 1
+#define TOOLBOX_CATALOG 10
+#define TOOLBOX_CAT_A 11
+#define TOOLBOX_CAT_B 12
+#define TOOLBOX_CAT_C 13
+#define TOOLBOX_CAT_D 14
+#define TOOLBOX_CAT_E 15
+#define TOOLBOX_CAT_F 16
+#define TOOLBOX_CAT_G 17
+#define TOOLBOX_CAT_H 18
+#define TOOLBOX_CAT_I 19
+
+#define NUM_TBX_CATEGORIES (TOOLBOX_CAT_I - TOOLBOX_CAT_A + 1)
#endif
diff --git a/starmath/source/toolbox.src b/starmath/source/toolbox.src
new file mode 100755
index 000000000000..07e728f1e6cb
--- /dev/null
+++ b/starmath/source/toolbox.src
@@ -0,0 +1,1777 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#include <sfx2/sfx.hrc>
+#include <svx/globlmn.hrc>
+#include "starmath.hrc"
+#include "toolbox.hrc"
+
+#define IMAGE_STDBTN_COLOR Color { Red = 0xff00; Green = 0x0000; Blue = 0xff00; }
+#define IMAGE_STDBTN_COLOR_HC IMAGE_STDBTN_COLOR
+
+
+FloatingWindow RID_TOOLBOXWINDOW
+{
+ HelpId = HID_SMA_OPERATOR_WIN ;
+ Border = TRUE ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ Hide = TRUE ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 0 , 0 ) ; // to be calculated programmatically
+ Text [ en-US ] = "Elements" ;
+
+ ToolBox TOOLBOX_CATALOG
+ {
+ // main menu of selection-window
+ HelpId = HID_SMA_SELECTION_TBX ;
+ Pos = MAP_APPFONT ( 0 , 0 ) ;
+ Size = MAP_APPFONT ( 65 , 38 ) ;
+ SVLook = TRUE ;
+ LineCount = 2 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_UNBINOPS_CAT ;
+ HelpId = HID_SMA_UNBINOPS_CAT ;
+ Text [ en-US ] = "Unary/Binary Operators" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_RELATIONS_CAT ;
+ HelpId = HID_SMA_RELATIONS_CAT ;
+ Text [ en-US ] = "Relations" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SETOPERATIONS_CAT ;
+ HelpId = HID_SMA_SETOPERATIONS_CAT ;
+ Text [ en-US ] = "Set Operations" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FUNCTIONS_CAT ;
+ HelpId = HID_SMA_FUNCTIONS_CAT ;
+ Text [ en-US ] = "Functions" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_OPERATORS_CAT ;
+ HelpId = HID_SMA_OPERATORS_CAT ;
+ Text [ en-US ] = "Operators" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ATTRIBUTES_CAT ;
+ HelpId = HID_SMA_ATTRIBUTES_CAT ;
+ Text [ en-US ] = "Attributes" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_MISC_CAT ;
+ HelpId = HID_SMA_MISC_CAT ;
+ Text [ en-US ] = "Others";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_BRACKETS_CAT ;
+ HelpId = HID_SMA_BRACKETS_CAT ;
+ Text [ en-US ] = "Brackets" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FORMAT_CAT ;
+ HelpId = HID_SMA_FORMAT_CAT ;
+ Text [ en-US ] = "Formats" ;
+ };
+ };
+ };
+
+ FixedLine FL_TOOLBOX_CAT_DELIM
+ {
+ Pos = MAP_APPFONT ( 0 , 44 ) ;
+ Size = MAP_APPFONT ( 65 , 8 ) ;
+ };
+
+ ToolBox TOOLBOX_CAT_A
+ {
+ // unary/binary operators
+ HelpId = HID_SMA_UNBINOPS_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 4 ;
+
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_PLUSX ;
+ HelpId = HID_SMA_PLUSX ;
+ Text [ en-US ] = "+ Sign" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_MINUSX ;
+ HelpId = HID_SMA_MINUSX ;
+ Text [ en-US ] = "- Sign" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_PLUSMINUSX ;
+ HelpId = HID_SMA_PLUSMINUSX ;
+ Text [ en-US ] = "+- Sign" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_MINUSPLUSX ;
+ HelpId = HID_SMA_MINUSPLUSX ;
+ Text [ en-US ] = "-+ Sign" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_NEGX ;
+ HelpId = HID_SMA_NEGX ;
+ Text [ en-US ] = "Boolean NOT" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XPLUSY ;
+ HelpId = HID_SMA_XPLUSY ;
+ Text [ en-US ] = "Addition +" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XCDOTY ;
+ HelpId = HID_SMA_XCDOTY ;
+ Text [ en-US ] = "Multiplication (Dot )" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XTIMESY ;
+ HelpId = HID_SMA_XTIMESY ;
+ Text [ en-US ] = "Multiplication (x)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSYMTIMESY ;
+ HelpId = HID_SMA_XSYMTIMESY ;
+ Text [ en-US ] = "Multiplication (*)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XANDY ;
+ HelpId = HID_SMA_XANDY ;
+ Text [ en-US ] = "Boolean AND" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XMINUSY ;
+ HelpId = HID_SMA_XMINUSY ;
+ Text [ en-US ] = "Subtraction -" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XOVERY ;
+ HelpId = HID_SMA_XOVERY ;
+ Text [ en-US ] = "Division (Fraction)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XDIVY ;
+ HelpId = HID_SMA_XDIVY ;
+ Text [ en-US ] = "Division (÷)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSYMDIVIDEY ;
+ HelpId = HID_SMA_XSYMDIVIDEY ;
+ Text [ en-US ] = "Division (Slash)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XORY ;
+ HelpId = HID_SMA_XORY ;
+ Text [ en-US ] = "Boolean OR" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XCIRCY ;
+ HelpId = HID_SMA_XCIRCY ;
+ Text [ en-US ] = "Concatenate";
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_B
+ {
+ // relations
+ HelpId = HID_SMA_RELATIONS_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 5 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_XEQY ;
+ HelpId = HID_SMA_XEQY ;
+ Text [ en-US ] = "Is Equal" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNEQY ;
+ HelpId = HID_SMA_XNEQY ;
+ Text [ en-US ] = "Is Not Equal" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XAPPROXY ;
+ HelpId = HID_SMA_XAPPROXY ;
+ Text [ en-US ] = "Is Approximately Equal" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XDIVIDESY ;
+ HelpId = HID_SMA_XDIVIDESY ;
+ Text [ en-US ] = "Divides";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNDIVIDESY ;
+ HelpId = HID_SMA_XNDIVIDESY ;
+ Text [ en-US ] = "Does Not Divide";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XLTY ;
+ HelpId = HID_SMA_XLTY ;
+ Text [ en-US ] = "Is Less Than" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XGTY ;
+ HelpId = HID_SMA_XGTY ;
+ Text [ en-US ] = "Is Greater Than" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSIMEQY ;
+ HelpId = HID_SMA_XSIMEQY ;
+ /* ### ACHTUNG: Neuer Text in Resource? ist �hnlich oder gleich : ist �hnlich oder glech */
+ Text [ en-US ] = "Is Similar Or Equal" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XPARALLELY ;
+ HelpId = HID_SMA_XPARALLELY ;
+ Text [ en-US ] = "Is Parallel To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XORTHOY ;
+ HelpId = HID_SMA_XORTHOY ;
+ Text [ en-US ] = "Is Orthogonal To" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XLESLANTY ;
+ HelpId = HID_SMA_XLESLANTY ;
+ Text [ en-US ] = "Is Less Than Or Equal To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XGESLANTY ;
+ HelpId = HID_SMA_XGESLANTY ;
+ Text [ en-US ] = "Is Greater Than Or Equal To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSIMY ;
+ HelpId = HID_SMA_XSIMY ;
+ Text [ en-US ] = "Is Similar To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XEQUIVY ;
+ HelpId = HID_SMA_XEQUIVY ;
+ Text [ en-US ] = "Is Congruent To" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XLEY ;
+ HelpId = HID_SMA_XLEY ;
+ Text [ en-US ] = "Is Less Than Or Equal To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XGEY ;
+ HelpId = HID_SMA_XGEY ;
+ Text [ en-US ] = "Is Greater Than Or Equal To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XPROPY ;
+ HelpId = HID_SMA_XPROPY ;
+ Text [ en-US ] = "Is Proportional To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XTOWARDY ;
+ HelpId = HID_SMA_XTOWARDY ;
+ Text [ en-US ] = "Toward" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DLARROW ;
+ HelpId = HID_SMA_DLARROW ;
+ Text [ en-US ] = "Double Arrow Left";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DLRARROW ;
+ HelpId = HID_SMA_DLRARROW ;
+ Text [ en-US ] = "Double Arrow Left And Right";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DRARROW ;
+ HelpId = HID_SMA_DRARROW ;
+ Text [ en-US ] = "Double Arrow Right";
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_C
+ {
+ // set operations
+ HelpId = HID_SMA_SETOPERATIONS_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 5 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_XINY ;
+ HelpId = HID_SMA_XINY ;
+ Text [ en-US ] = "Is In" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNOTINY ;
+ HelpId = HID_SMA_XNOTINY ;
+ Text [ en-US ] = "Is Not In" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XOWNSY ;
+ HelpId = HID_SMA_XOWNSY ;
+ Text [ en-US ] = "Owns" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_EMPTYSET ;
+ HelpId = HID_SMA_EMPTYSET ;
+ Text [ en-US ] = "Empty Set";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XINTERSECTIONY ;
+ HelpId = HID_SMA_XINTERSECTIONY ;
+ Text [ en-US ] = "Intersection" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XUNIONY ;
+ HelpId = HID_SMA_XUNIONY ;
+ Text [ en-US ] = "Union" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSETMINUSY ;
+ HelpId = HID_SMA_XSETMINUSY ;
+ Text [ en-US ] = "Difference" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSLASHY ;
+ HelpId = HID_SMA_XSLASHY ;
+ Text [ en-US ] = "Quotient Set" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ALEPH ;
+ HelpId = HID_SMA_ALEPH ;
+ Text [ en-US ] = "Aleph";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSUBSETY ;
+ HelpId = HID_SMA_XSUBSETY ;
+ Text [ en-US ] = "Subset" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSUBSETEQY ;
+ HelpId = HID_SMA_XSUBSETEQY ;
+ Text [ en-US ] = "Subset Or Equal To" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSUPSETY ;
+ HelpId = HID_SMA_XSUPSETY ;
+ Text [ en-US ] = "Superset" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XSUPSETEQY ;
+ HelpId = HID_SMA_XSUPSETEQY ;
+ Text [ en-US ] = "Superset Or Equal To" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNSUBSETY ;
+ HelpId = HID_SMA_XNSUBSETY ;
+ Text [ en-US ] = "Not Subset" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNSUBSETEQY ;
+ HelpId = HID_SMA_XNSUBSETEQY ;
+ Text [ en-US ] = "Not Subset Or Equal" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNSUPSETY ;
+ HelpId = HID_SMA_XNSUPSETY ;
+ Text [ en-US ] = "Not Superset" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XNSUPSETEQY ;
+ HelpId = HID_SMA_XNSUPSETEQY ;
+ Text [ en-US ] = "Not Superset Or Equal" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SETN ;
+ HelpId = HID_SMA_SETN ;
+ Text [ en-US ] = "Natural Numbers Set";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SETZ ;
+ HelpId = HID_SMA_SETZ ;
+ Text [ en-US ] = "Integers Set";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SETQ ;
+ HelpId = HID_SMA_SETQ ;
+ Text [ en-US ] = "Set of Rational Numbers";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SETR ;
+ HelpId = HID_SMA_SETR ;
+ Text [ en-US ] = "Real Numbers Set";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SETC ;
+ HelpId = HID_SMA_SETC ;
+ Text [ en-US ] = "Complex Numbers Set";
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_D
+ {
+ // functions
+ HelpId = HID_SMA_FUNCTIONS_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 5 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_EX ;
+ HelpId = HID_SMA_EX ;
+ Text [ en-US ] = "Exponential Function" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LNX ;
+ HelpId = HID_SMA_LNX ;
+ Text [ en-US ] = "Natural Logarithm" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_EXPX ;
+ HelpId = HID_SMA_EXPX ;
+ Text [ en-US ] = "Exponential Function" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LOGX ;
+ HelpId = HID_SMA_LOGX ;
+ Text [ en-US ] = "Logarithm" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_RSUPX ;
+ HelpId = HID_SMA_RSUPX ;
+ Text [ en-US ] = "Power";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SINX ;
+ HelpId = HID_SMA_SINX ;
+ Text [ en-US ] = "Sine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_COSX ;
+ HelpId = HID_SMA_COSX ;
+ Text [ en-US ] = "Cosine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_TANX ;
+ HelpId = HID_SMA_TANX ;
+ Text [ en-US ] = "Tangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_COTX ;
+ HelpId = HID_SMA_COTX ;
+ Text [ en-US ] = "Cotangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SQRTX ;
+ HelpId = HID_SMA_SQRTX ;
+ Text [ en-US ] = "Square Root" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARCSINX ;
+ HelpId = HID_SMA_ARCSINX ;
+ Text [ en-US ] = "Arcsine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARCCOSX ;
+ HelpId = HID_SMA_ARCCOSX ;
+ Text [ en-US ] = "Arccosine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARCTANX ;
+ HelpId = HID_SMA_ARCTANX ;
+ Text [ en-US ] = "Arctangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARCCOTX ;
+ HelpId = HID_SMA_ARCCOTX ;
+ Text [ en-US ] = "Arccotangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_NROOTXY ;
+ HelpId = HID_SMA_NROOTXY ;
+ Text [ en-US ] = "N-th Root" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SINHX ;
+ HelpId = HID_SMA_SINHX ;
+ Text [ en-US ] = "Hyperbolic Sine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_COSHX ;
+ HelpId = HID_SMA_COSHX ;
+ Text [ en-US ] = "Hyperbolic Cosine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_TANHX ;
+ HelpId = HID_SMA_TANHX ;
+ Text [ en-US ] = "Hyperbolic Tangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_COTHX ;
+ HelpId = HID_SMA_COTHX ;
+ Text [ en-US ] = "Hyperbolic Cotangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ABSX ;
+ HelpId = HID_SMA_ABSX ;
+ Text [ en-US ] = "Absolute Value" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARSINHX ;
+ HelpId = HID_SMA_ARSINHX ;
+ Text [ en-US ] = "Area Hyperbolic Sine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARCOSHX ;
+ HelpId = HID_SMA_ARCOSHX ;
+ Text [ en-US ] = "Area Hyperbolic Cosine" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARTANHX ;
+ HelpId = HID_SMA_ARTANHX ;
+ Text [ en-US ] = "Area Hyperbolic Tangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ARCOTHX ;
+ HelpId = HID_SMA_ARCOTHX ;
+ Text [ en-US ] = "Area Hyperbolic Cotangent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FACTX ;
+ HelpId = HID_SMA_FACTX ;
+ Text [ en-US ] = "Factorial" ;
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_E
+ {
+ // operators
+ HelpId = HID_SMA_OPERATORS_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 3 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_LIMX ;
+ HelpId = HID_SMA_LIMX ;
+ Text [ en-US ] = "Limes" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SUMX ;
+ HelpId = HID_SMA_SUMX ;
+ Text [ en-US ] = "Sum" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_PRODX ;
+ HelpId = HID_SMA_PRODX ;
+ Text [ en-US ] = "Product" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_COPRODX ;
+ HelpId = HID_SMA_COPRODX ;
+ Text [ en-US ] = "Coproduct" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FROMXTOY ;
+ HelpId = HID_SMA_FROMXTOY ;
+ Text [ en-US ] = "Upper And Lower Limit" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_INTX ;
+ HelpId = HID_SMA_INTX ;
+ Text [ en-US ] = "Integral" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_IINTX ;
+ HelpId = HID_SMA_IINTX ;
+ Text [ en-US ] = "Double Integral" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_IIINTX ;
+ HelpId = HID_SMA_IIINTX ;
+ Text [ en-US ] = "Triple Integral" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FROMX ;
+ HelpId = HID_SMA_FROMX ;
+ Text [ en-US ] = "Lower Limit" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LINTX ;
+ HelpId = HID_SMA_LINTX ;
+ Text [ en-US ] = "Curve Integral" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LLINTX ;
+ HelpId = HID_SMA_LLINTX ;
+ Text [ en-US ] = "Double Curve Integral" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LLLINTX ;
+ HelpId = HID_SMA_LLLINTX ;
+ Text [ en-US ] = "Triple Curve Integral" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_TOX ;
+ HelpId = HID_SMA_TOX ;
+ Text [ en-US ] = "Upper Limit" ;
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_F
+ {
+ // attributs
+ HelpId = HID_SMA_ATTRIBUTES_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 5 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_ACUTEX ;
+ HelpId = HID_SMA_ACUTEX ;
+ Text [ en-US ] = "Acute Accent";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_GRAVEX ;
+ HelpId = HID_SMA_GRAVEX ;
+ Text [ en-US ] = "Grave Accent";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_CHECKX ;
+ HelpId = HID_SMA_CHECKX ;
+ Text [ en-US ] = "Reverse Circumflex" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_BREVEX ;
+ HelpId = HID_SMA_BREVEX ;
+ Text [ en-US ] = "Breve" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_CIRCLEX ;
+ HelpId = HID_SMA_CIRCLEX ;
+ Text [ en-US ] = "Circle" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_VECX ;
+ HelpId = HID_SMA_VECX ;
+ Text [ en-US ] = "Vector Arrow" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_TILDEX ;
+ HelpId = HID_SMA_TILDEX ;
+ Text [ en-US ] = "Tilde" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_HATX ;
+ HelpId = HID_SMA_HATX ;
+ Text [ en-US ] = "Circumflex" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_BARX ;
+ HelpId = HID_SMA_BARX ;
+ Text [ en-US ] = "Line Above" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOTX ;
+ HelpId = HID_SMA_DOTX ;
+ Text [ en-US ] = "Dot" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_WIDEVECX ;
+ HelpId = HID_SMA_WIDEVECX ;
+ Text [ en-US ] = "Large Vector Arrow";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_WIDETILDEX ;
+ HelpId = HID_SMA_WIDETILDEX ;
+ Text [ en-US ] = "Large Tilde";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_WIDEHATX ;
+ HelpId = HID_SMA_WIDEHATX ;
+ Text [ en-US ] = "Large Circumflex";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DDOTX ;
+ HelpId = HID_SMA_DDOTX ;
+ Text [ en-US ] = "Double Dot" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_OVERLINEX ;
+ HelpId = HID_SMA_OVERLINEX ;
+ Text [ en-US ] = "Line Over" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_UNDERLINEX ;
+ HelpId = HID_SMA_UNDERLINEX ;
+ Text [ en-US ] = "Line Below" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_OVERSTRIKEX ;
+ HelpId = HID_SMA_OVERSTRIKEX ;
+ Text [ en-US ] = "Line Through" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DDDOTX ;
+ HelpId = HID_SMA_DDDOTX ;
+ Text [ en-US ] = "Triple Dot" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_PHANTOMX ;
+ HelpId = HID_SMA_PHANTOMX ;
+ Text [ en-US ] = "Transparent" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_BOLDX ;
+ HelpId = HID_SMA_BOLDX ;
+ Text [ en-US ] = "Bold Font" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ITALX ;
+ HelpId = HID_SMA_ITALX ;
+ Text [ en-US ] = "Italic Font" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SIZEXY ;
+ HelpId = HID_SMA_SIZEXY ;
+ Text [ en-US ] = "Resize" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FONTXY ;
+ HelpId = HID_SMA_FONTXY ;
+ Text [ en-US ] = "Change Font" ;
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_G
+ {
+ // parentheses
+ HelpId = HID_SMA_BRACKETS_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 5 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_LRPARENTX ;
+ HelpId = HID_SMA_LRPARENTX ;
+ Text [ en-US ] = "Round Brackets" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRBRACKETX ;
+ HelpId = HID_SMA_LRBRACKETX ;
+ Text [ en-US ] = "Square Brackets" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRDBRACKETX ;
+ HelpId = HID_SMA_LRDBRACKETX ;
+ Text [ en-US ] = "Double Square Brackets";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRLINEX ;
+ HelpId = HID_SMA_LRLINEX ;
+ Text [ en-US ] = "Single Lines" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRDLINEX ;
+ HelpId = HID_SMA_LRDLINEX ;
+ Text [ en-US ] = "Double Lines" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRBRACEX ;
+ HelpId = HID_SMA_LRBRACEX ;
+ Text [ en-US ] = "Braces" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRANGLEX ;
+ HelpId = HID_SMA_LRANGLEX ;
+ Text [ en-US ] = "Angle Brackets" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LMRANGLEXY ;
+ HelpId = HID_SMA_LMRANGLEXY ;
+ Text [ en-US ] = "Operator Brackets";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LRGROUPX ;
+ HelpId = HID_SMA_LRGROUPX ;
+ Text [ en-US ] = "Group Brackets" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRPARENTX ;
+ HelpId = HID_SMA_SLRPARENTX ;
+ Text [ en-US ] = "Round Brackets (Scalable)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRBRACKETX ;
+ HelpId = HID_SMA_SLRBRACKETX ;
+ Text [ en-US ] = "Square Brackets (Scalable)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRDBRACKETX ;
+ HelpId = HID_SMA_SLRDBRACKETX ;
+ Text [ en-US ] = "Double Square Brackets (Scalable)";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRLINEX ;
+ HelpId = HID_SMA_SLRLINEX ;
+ Text [ en-US ] = "Single Lines (Scalable)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRDLINEX ;
+ HelpId = HID_SMA_SLRDLINEX ;
+ Text [ en-US ] = "Double Lines (Scalable)" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRBRACEX ;
+ HelpId = HID_SMA_SLRBRACEX ;
+ Text [ en-US ] = "Braces (Scalable)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLRANGLEX ;
+ HelpId = HID_SMA_SLRANGLEX ;
+ Text [ en-US ] = "Angle Brackets (Scalable)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SLMRANGLEXY ;
+ HelpId = HID_SMA_SLMRANGLEXY ;
+ Text [ en-US ] = "Operator Brackets (Scalable)";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XOVERBRACEY ;
+ HelpId = HID_SMA_XOVERBRACEY ;
+ Text [ en-US ] = "Braces Top (Scalable)";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_XUNDERBRACEY ;
+ HelpId = HID_SMA_XUNDERBRACEY ;
+ Text [ en-US ] = "Braces Bottom (Scalable)";
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_H
+ {
+ // format
+ HelpId = HID_SMA_FORMAT_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 3 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_LSUPX ;
+ HelpId = HID_SMA_LSUPX ;
+ Text [ en-US ] = "Superscript Left" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_CSUPX ;
+ HelpId = HID_SMA_CSUPX ;
+ Text [ en-US ] = "Superscript Top";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_RSUPX ;
+ HelpId = HID_SMA_RSUPX ;
+ Text [ en-US ] = "Superscript Right" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_BINOMXY ;
+ HelpId = HID_SMA_BINOMXY ;
+ Text [ en-US ] = "Vertical Stack (2 Elements)" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_NEWLINE ;
+ HelpId = HID_SMA_NEWLINE ;
+ Text [ en-US ] = "New Line" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LSUBX ;
+ HelpId = HID_SMA_LSUBX ;
+ Text [ en-US ] = "Subscript Left" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_CSUBX ;
+ HelpId = HID_SMA_CSUBX ;
+ Text [ en-US ] = "Subscript Bottom";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_RSUBX ;
+ HelpId = HID_SMA_RSUBX ;
+ Text [ en-US ] = "Subscript Right" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_STACK ;
+ HelpId = HID_SMA_STACK ;
+ Text [ en-US ] = "Vertical Stack" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_SBLANK ;
+ HelpId = HID_SMA_SBLANK ;
+ Text [ en-US ] = "Small Gap" ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ALIGNLX ;
+ HelpId = HID_SMA_ALIGNLX ;
+ Text [ en-US ] = "Align Left" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ALIGNCX ;
+ HelpId = HID_SMA_ALIGNCX ;
+ Text [ en-US ] = "Align Center" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_ALIGNRX ;
+ HelpId = HID_SMA_ALIGNRX ;
+ Text [ en-US ] = "Align Right" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_MATRIX ;
+ HelpId = HID_SMA_MATRIX ;
+ Text [ en-US ] = "Matrix Stack" ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_BLANK ;
+ HelpId = HID_SMA_BLANK ;
+ Text [ en-US ] = "Gap" ;
+ };
+ };
+ };
+
+ ToolBox TOOLBOX_CAT_I
+ {
+ // misc
+ HelpId = HID_SMA_FORMAT_TBX ;
+ Pos = MAP_APPFONT ( 0 , 45 ) ;
+ Size = MAP_APPFONT ( 65 , 95 ) ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ LineCount = 4 ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = RID_INFINITY ;
+ HelpId = HID_SMA_INFINITY ;
+ Text [ en-US ] = "infinite";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_PARTIAL ;
+ HelpId = HID_SMA_PARTIAL ;
+ Text [ en-US ] = "Partial";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_NABLA ;
+ HelpId = HID_SMA_NABLA ;
+ Text [ en-US ] = "Nabla";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_EXISTS ;
+ HelpId = HID_SMA_EXISTS ;
+ Text [ en-US ] = "There Exists";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_FORALL ;
+ HelpId = HID_SMA_FORALL ;
+ Text [ en-US ] = "For All";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_HBAR ;
+ HelpId = HID_SMA_HBAR ;
+ Text [ en-US ] = "h Bar";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LAMBDABAR ;
+ HelpId = HID_SMA_LAMBDABAR ;
+ Text [ en-US ] = "Lambda Bar";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_RE ;
+ HelpId = HID_SMA_RE ;
+ Text [ en-US ] = "Real Part";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_IM ;
+ HelpId = HID_SMA_IM ;
+ Text [ en-US ] = "Imaginary Part";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_WP ;
+ HelpId = HID_SMA_WP ;
+ Text [ en-US ] = "Weierstrass p";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_LEFTARROW ;
+ HelpId = HID_SMA_LEFTARROW ;
+ Text [ en-US ] = "Left Arrow";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_RIGHTARROW ;
+ HelpId = HID_SMA_RIGHTARROW ;
+ Text [ en-US ] = "Right Arrow";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_UPARROW ;
+ HelpId = HID_SMA_UPARROW ;
+ Text [ en-US ] = "Up Arrow";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOWNARROW ;
+ HelpId = HID_SMA_DOWNARROW ;
+ Text [ en-US ] = "Down Arrow";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SPACE ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_BREAK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOTSLOW ;
+ HelpId = HID_SMA_DOTSLOW ;
+ Text [ en-US ] = "Dots At Bottom";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOTSAXIS ;
+ HelpId = HID_SMA_DOTSAXIS ;
+ Text [ en-US ] = "Dots In Middle";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOTSVERT ;
+ HelpId = HID_SMA_DOTSVERT ;
+ Text [ en-US ] = "Dots Vertically";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOTSUP ;
+ HelpId = HID_SMA_DOTSUP ;
+ Text [ en-US ] = "Dots To Top";
+ };
+ ToolBoxItem
+ {
+ Identifier = RID_DOTSDOWN ;
+ HelpId = HID_SMA_DOTSDOWN ;
+ Text [ en-US ] = "Dots to Bottom";
+ };
+ };
+ };
+};
+
+
+
+#define UNBINOPS_IDLIST \
+ IdList = \
+ { \
+ RID_PLUSX ; \
+ RID_MINUSX ; \
+ RID_PLUSMINUSX ; \
+ RID_MINUSPLUSX ; \
+ RID_XPLUSY ; \
+ RID_XCDOTY ; \
+ RID_XTIMESY ; \
+ RID_XSYMTIMESY ; \
+ RID_XMINUSY ; \
+ RID_XOVERY ; \
+ RID_XDIVY ; \
+ RID_XSYMDIVIDEY ; \
+ RID_NEGX ; \
+ RID_XANDY ; \
+ RID_XORY ; \
+ RID_XCIRCY ; \
+ }; \
+ IdCount = { 16 ; };
+
+ ImageList RID_IL_UNBINOPS
+ {
+ Prefix = "un";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ UNBINOPS_IDLIST
+ };
+
+#define RELATIONS_IDLIST \
+ IdList = \
+ { \
+ RID_XEQY ; \
+ RID_XNEQY ; \
+ RID_XEQUIVY ; \
+ RID_XORTHOY ; \
+ RID_XLTY ; \
+ RID_XGTY ; \
+ RID_XAPPROXY ; \
+ RID_XPARALLELY ; \
+ RID_XLESLANTY ; \
+ RID_XGESLANTY ; \
+ RID_XSIMEQY ; \
+ RID_XPROPY ; \
+ RID_XLEY ; \
+ RID_XGEY ; \
+ RID_XSIMY ; \
+ RID_XTOWARDY ; \
+ RID_XDIVIDESY ; \
+ RID_XNDIVIDESY; \
+ RID_DLARROW ; \
+ RID_DLRARROW ; \
+ RID_DRARROW ; \
+ }; \
+ IdCount ={ 21 ; };
+
+ ImageList RID_IL_RELATIONS
+ {
+ Prefix = "bi";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ RELATIONS_IDLIST
+ };
+
+#define SETOPERATIONS_IDLIST \
+ IdList = \
+ { \
+ RID_XINY ; \
+ RID_XNOTINY ; \
+ RID_XOWNSY ; \
+ RID_XINTERSECTIONY ; \
+ RID_XUNIONY ; \
+ RID_XSETMINUSY ; \
+ RID_XSLASHY ; \
+ RID_XSUBSETY ; \
+ RID_XSUBSETEQY ; \
+ RID_XSUPSETY ; \
+ RID_XSUPSETEQY ; \
+ RID_XNSUBSETY ; \
+ RID_XNSUBSETEQY ; \
+ RID_XNSUPSETY ; \
+ RID_XNSUPSETEQY ; \
+ RID_EMPTYSET ; \
+ RID_ALEPH ; \
+ RID_SETN ; \
+ RID_SETZ ; \
+ RID_SETQ ; \
+ RID_SETR ; \
+ RID_SETC ; \
+ }; \
+ IdCount = { 22 ; };
+
+ ImageList RID_IL_SETOPERATIONS
+ {
+ Prefix = "op";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ SETOPERATIONS_IDLIST
+ };
+
+#define FUNCTIONS_IDLIST \
+ IdList = \
+ { \
+ RID_ABSX ; \
+ RID_FACTX ; \
+ RID_SQRTX ; \
+ RID_NROOTXY ; \
+ RID_EX ; \
+ RID_LNX ; \
+ RID_EXPX ; \
+ RID_LOGX ; \
+ RID_SINX ; \
+ RID_COSX ; \
+ RID_TANX ; \
+ RID_COTX ; \
+ RID_SINHX ; \
+ RID_COSHX ; \
+ RID_TANHX ; \
+ RID_COTHX ; \
+ RID_ARCSINX ; \
+ RID_ARCCOSX ; \
+ RID_ARCTANX ; \
+ RID_ARCCOTX ; \
+ RID_ARSINHX ; \
+ RID_ARCOSHX ; \
+ RID_ARTANHX ; \
+ RID_ARCOTHX ; \
+ RID_RSUPX ; \
+ }; \
+ IdCount = { 25 ; };
+
+ ImageList RID_IL_FUNCTIONS
+ {
+ Prefix = "fu";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ FUNCTIONS_IDLIST
+ };
+
+#define OPERATORS_IDLIST \
+ IdList = \
+ { \
+ RID_LIMX ; \
+ RID_SUMX ; \
+ RID_PRODX ; \
+ RID_COPRODX ; \
+ RID_INTX ; \
+ RID_IINTX ; \
+ RID_IIINTX ; \
+ RID_LINTX ; \
+ RID_LLINTX ; \
+ RID_LLLINTX ; \
+ RID_FROMXTOY ; \
+ RID_FROMX ; \
+ RID_TOX ; \
+ }; \
+ IdCount = { 13 ; };
+
+ ImageList RID_IL_OPERATORS
+ {
+ Prefix = "fo";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ OPERATORS_IDLIST
+ };
+
+#define ATTRIBUTES_IDLIST \
+ IdList = \
+ { \
+ RID_ACUTEX ; \
+ RID_GRAVEX ; \
+ RID_CHECKX ; \
+ RID_BREVEX ; \
+ RID_BARX ; \
+ RID_VECX ; \
+ RID_HATX ; \
+ RID_TILDEX ; \
+ RID_CIRCLEX ; \
+ RID_DOTX ; \
+ RID_DDOTX ; \
+ RID_DDDOTX ; \
+ RID_OVERLINEX ; \
+ RID_UNDERLINEX ; \
+ RID_OVERSTRIKEX ; \
+ RID_PHANTOMX ; \
+ RID_BOLDX ; \
+ RID_ITALX ; \
+ RID_SIZEXY ; \
+ RID_FONTXY ; \
+ RID_WIDEHATX ; \
+ RID_WIDETILDEX ; \
+ RID_WIDEVECX ; \
+ }; \
+ IdCount = { 23 ; };
+
+ ImageList RID_IL_ATTRIBUTES
+ {
+ Prefix = "at";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ ATTRIBUTES_IDLIST
+ };
+
+#define BRACKETS_IDLIST \
+ IdList = \
+ { \
+ RID_LRPARENTX ; \
+ RID_LRBRACKETX ; \
+ RID_LRANGLEX ; \
+ RID_LRBRACEX ; \
+ RID_LRLINEX ; \
+ RID_LRDLINEX ; \
+ RID_LMRANGLEXY ; \
+ RID_LRGROUPX ; \
+ RID_SLRPARENTX ; \
+ RID_SLRBRACKETX ; \
+ RID_SLRANGLEX ; \
+ RID_SLRBRACEX ; \
+ RID_SLRLINEX ; \
+ RID_SLRDLINEX ; \
+ RID_SLMRANGLEXY ; \
+ RID_LRDBRACKETX ; \
+ RID_SLRDBRACKETX ; \
+ RID_XOVERBRACEY ; \
+ RID_XUNDERBRACEY ; \
+ }; \
+ IdCount = { 19 ; };
+
+ ImageList RID_IL_BRACKETS
+ {
+ Prefix = "al";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ BRACKETS_IDLIST
+ };
+
+#define FORMAT_IDLIST \
+ IdList = \
+ { \
+ RID_NEWLINE ; \
+ RID_SBLANK ; \
+ RID_BLANK ; \
+ RID_BINOMXY ; \
+ RID_STACK ; \
+ RID_MATRIX ; \
+ RID_ALIGNLX ; \
+ RID_ALIGNCX ; \
+ RID_ALIGNRX ; \
+ RID_RSUBX ; \
+ RID_RSUPX ; \
+ RID_LSUBX ; \
+ RID_LSUPX ; \
+ RID_CSUBX ; \
+ RID_CSUPX ; \
+ }; \
+ IdCount = { 15 ; };
+
+ ImageList RID_IL_FORMAT
+ {
+ Prefix = "co";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ FORMAT_IDLIST
+ };
+
+#define MISC_IDLIST \
+ IdList = \
+ { \
+ RID_INFINITY ; \
+ RID_PARTIAL ; \
+ RID_NABLA ; \
+ RID_EXISTS ; \
+ RID_FORALL ; \
+ RID_HBAR; \
+ RID_LAMBDABAR ; \
+ RID_RE ; \
+ RID_IM ; \
+ RID_WP ; \
+ RID_LEFTARROW ; \
+ RID_RIGHTARROW ; \
+ RID_UPARROW ; \
+ RID_DOWNARROW ; \
+ RID_DOTSLOW ; \
+ RID_DOTSAXIS ; \
+ RID_DOTSVERT ; \
+ RID_DOTSUP ; \
+ RID_DOTSDOWN ; \
+ }; \
+ IdCount = { 19 ; };
+
+ ImageList RID_IL_MISC
+ {
+ Prefix = "mi";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ MISC_IDLIST
+ };
+
+#define CATALOG_IDLIST \
+ IdList = \
+ { \
+ RID_UNBINOPS_CAT ; \
+ RID_RELATIONS_CAT ; \
+ RID_SETOPERATIONS_CAT ; \
+ RID_FUNCTIONS_CAT ; \
+ RID_OPERATORS_CAT ; \
+ RID_ATTRIBUTES_CAT ; \
+ RID_MISC_CAT ; \
+ RID_BRACKETS_CAT ; \
+ RID_FORMAT_CAT ; \
+ }; \
+ IdCount = { 9 ; };
+
+ ImageList RID_IL_CATALOG
+ {
+ Prefix = "im";
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ CATALOG_IDLIST
+ };
+
+
+
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index 06833f901a6c..d3d41c36ee40 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -82,7 +82,7 @@ SmPrintUIOptions::SmPrintUIOptions()
{
ResStringArray aLocalizedStrings( SmResId( RID_PRINTUIOPTIONS ) );
OSL_ENSURE( aLocalizedStrings.Count() >= 18, "resource incomplete" );
- if( aLocalizedStrings.Count() < 18 ) // bad resource ?
+ if( aLocalizedStrings.Count() < 9 ) // bad resource ?
return;
SmModule *pp = SM_MOD();
@@ -100,42 +100,42 @@ SmPrintUIOptions::SmPrintUIOptions()
String aAppGroupname( aLocalizedStrings.GetString( 0 ) );
aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ),
aOpt.GetModuleName( SvtModuleOptions::E_SMATH ) );
- m_aUIProperties[0].Value = getGroupControlOpt( aAppGroupname, rtl::OUString() );
+ m_aUIProperties[0].Value = getGroupControlOpt( aAppGroupname, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:TabPage:AppPage" ) ) );
// create subgroup for print options
m_aUIProperties[1].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 1 ), rtl::OUString() );
// create a bool option for title row (matches to SID_PRINTTITLE)
m_aUIProperties[2].Value = getBoolControlOpt( aLocalizedStrings.GetString( 2 ),
- aLocalizedStrings.GetString( 3 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:TitleRow:CheckBox" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_TITLE_ROW ) ),
pConfig->IsPrintTitle() );
// create a bool option for formula text (matches to SID_PRINTTEXT)
- m_aUIProperties[3].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ),
- aLocalizedStrings.GetString( 5 ),
+ m_aUIProperties[3].Value = getBoolControlOpt( aLocalizedStrings.GetString( 3 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:FormulaText:CheckBox" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_FORMULA_TEXT ) ),
pConfig->IsPrintFormulaText() );
// create a bool option for border (matches to SID_PRINTFRAME)
- m_aUIProperties[4].Value = getBoolControlOpt( aLocalizedStrings.GetString( 6 ),
- aLocalizedStrings.GetString( 7 ),
+ m_aUIProperties[4].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:Border:CheckBox" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_BORDER ) ),
pConfig->IsPrintFrame() );
// create subgroup for print format
- m_aUIProperties[5].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 8 ), rtl::OUString() );
+ m_aUIProperties[5].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 5 ), rtl::OUString() );
// create a radio button group for print format (matches to SID_PRINTSIZE)
Sequence< rtl::OUString > aChoices( 3 );
- aChoices[0] = aLocalizedStrings.GetString( 9 );
- aChoices[1] = aLocalizedStrings.GetString( 11 );
- aChoices[2] = aLocalizedStrings.GetString( 13 );
- Sequence< rtl::OUString > aHelpTexts( 3 );
- aHelpTexts[0] = aLocalizedStrings.GetString( 10 );
- aHelpTexts[1] = aLocalizedStrings.GetString( 12 );
- aHelpTexts[2] = aLocalizedStrings.GetString( 14 );
+ aChoices[0] = aLocalizedStrings.GetString( 6 );
+ aChoices[1] = aLocalizedStrings.GetString( 7 );
+ aChoices[2] = aLocalizedStrings.GetString( 8 );
+ Sequence< rtl::OUString > aHelpIds( 3 );
+ aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:0" ) );
+ aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:1" ) );
+ aHelpIds[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:2" ) );
OUString aPrintFormatProp( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_PRINT_FORMAT ) );
m_aUIProperties[6].Value = getChoiceControlOpt( rtl::OUString(),
- aHelpTexts,
+ aHelpIds,
aPrintFormatProp,
aChoices, static_cast< sal_Int32 >(pConfig->GetPrintSize())
);
@@ -143,7 +143,7 @@ SmPrintUIOptions::SmPrintUIOptions()
// create a numeric box for scale dependent on PrintFormat = "Scaling" (matches to SID_PRINTZOOM)
vcl::PrinterOptionsHelper::UIControlOptions aRangeOpt( aPrintFormatProp, 2, sal_True );
m_aUIProperties[ 7 ].Value = getRangeControlOpt( rtl::OUString(),
- aLocalizedStrings.GetString( 14 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintScale:NumericField" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_PRINT_SCALE ) ),
pConfig->GetPrintZoomFactor(), // initial value
10, // min value
@@ -162,7 +162,11 @@ SmPrintUIOptions::SmPrintUIOptions()
//
// class SmModel
//
-#define PROPERTY_NONE 0
+
+// values from com/sun/star/beans/PropertyAttribute
+#define PROPERTY_NONE 0
+#define PROPERTY_READONLY 16
+
enum SmModelPropertyHandles
{
HANDLE_FORMULA,
@@ -224,10 +228,12 @@ enum SmModelPropertyHandles
HANDLE_PRINTER_NAME,
HANDLE_PRINTER_SETUP,
HANDLE_SYMBOLS,
+ HANDLE_USED_SYMBOLS,
HANDLE_BASIC_LIBRARIES,
HANDLE_RUNTIME_UID,
- HANDLE_LOAD_READONLY, // Security Options
- HANDLE_DIALOG_LIBRARIES // #i73329#
+ HANDLE_LOAD_READONLY, // Security Options
+ HANDLE_DIALOG_LIBRARIES, // #i73329#
+ HANDLE_BASELINE
};
PropertySetInfo * lcl_createModelPropertyInfo ()
@@ -295,10 +301,14 @@ PropertySetInfo * lcl_createModelPropertyInfo ()
{ RTL_CONSTASCII_STRINGPARAM( "RightMargin" ), HANDLE_RIGHT_MARGIN , &::getCppuType((const sal_Int16*)0), PROPERTY_NONE, DIS_RIGHTSPACE },
{ RTL_CONSTASCII_STRINGPARAM( "RuntimeUID" ), HANDLE_RUNTIME_UID , &::getCppuType(static_cast< const rtl::OUString * >(0)), PropertyAttribute::READONLY, 0 },
{ RTL_CONSTASCII_STRINGPARAM( "Symbols" ), HANDLE_SYMBOLS , &::getCppuType((const Sequence < SymbolDescriptor > *)0), PROPERTY_NONE, 0 },
+ { RTL_CONSTASCII_STRINGPARAM( "UserDefinedSymbolsInUse" ), HANDLE_USED_SYMBOLS , &::getCppuType((const Sequence < SymbolDescriptor > *)0), PropertyAttribute::READONLY, 0 },
{ RTL_CONSTASCII_STRINGPARAM( "TopMargin" ), HANDLE_TOP_MARGIN , &::getCppuType((const sal_Int16*)0), PROPERTY_NONE, DIS_TOPSPACE },
// --> PB 2004-08-25 #i33095# Security Options
{ RTL_CONSTASCII_STRINGPARAM( "LoadReadonly" ), HANDLE_LOAD_READONLY, &::getBooleanCppuType(), PROPERTY_NONE, 0 },
// <--
+ // --> 3.7.2010 #i972#
+ { RTL_CONSTASCII_STRINGPARAM( "BaseLine"), HANDLE_BASELINE, &::getCppuType((const sal_Int16*)0), PROPERTY_NONE, 0},
+ // <--
{ NULL, 0, 0, NULL, 0, 0 }
};
PropertySetInfo *pInfo = new PropertySetInfo ( aModelPropertyInfoMap );
@@ -534,7 +544,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
// apply base size to fonts
const Size aTmp( aFormat.GetBaseSize() );
- for (USHORT i = FNT_BEGIN; i <= FNT_END; i++)
+ for (sal_uInt16 i = FNT_BEGIN; i <= FNT_END; i++)
aFormat.SetFontSize(i, aTmp);
}
break;
@@ -691,7 +701,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
SmSym aSymbol ( pDescriptor->sName, aFont, static_cast < sal_Unicode > (pDescriptor->nCharacter),
pDescriptor->sSymbolSet );
aSymbol.SetExportName ( pDescriptor->sExportName );
- aSymbol.SetDocSymbol( TRUE );
+ aSymbol.SetDocSymbol( sal_True );
rManager.AddOrReplaceSymbol ( aSymbol );
}
}
@@ -704,7 +714,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
{
if ( (*pValues).getValueType() != ::getBooleanCppuType() )
throw IllegalArgumentException();
- sal_Bool bReadonly = FALSE;
+ sal_Bool bReadonly = sal_False;
if ( *pValues >>= bReadonly )
pDocSh->SetLoadReadonly( bReadonly );
break;
@@ -863,7 +873,11 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
}
break;
case HANDLE_SYMBOLS:
+ case HANDLE_USED_SYMBOLS:
{
+ const bool bUsedSymbolsOnly = (*ppEntries)->mnHandle == HANDLE_USED_SYMBOLS;
+ const std::set< rtl::OUString > &rUsedSymbols = pDocSh->GetUsedSymbols();
+
// this is get
SmModule *pp = SM_MOD();
const SmSymbolManager &rManager = pp->GetSymbolManager();
@@ -874,7 +888,9 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
for (size_t i = 0; i < aSymbols.size(); ++i)
{
const SmSym * pSymbol = aSymbols[ i ];
- if (pSymbol && !pSymbol->IsPredefined () )
+ const bool bIsUsedSymbol = rUsedSymbols.find( pSymbol->GetName() ) != rUsedSymbols.end();
+ if (pSymbol && !pSymbol->IsPredefined() &&
+ (!bUsedSymbolsOnly || bIsUsedSymbol))
{
aVector.push_back ( pSymbol );
nCount++;
@@ -918,6 +934,21 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu
break;
}
// <--
+ // --> 3.7.2010 #i972#
+ case HANDLE_BASELINE:
+ {
+ if ( !pDocSh->pTree )
+ pDocSh->Parse();
+ if ( pDocSh->pTree )
+ {
+ if ( !pDocSh->IsFormulaArranged() )
+ pDocSh->ArrangeFormula();
+
+ *pValue <<= static_cast<sal_Int32>( pDocSh->pTree->GetFormulaBaseline() );
+ }
+ }
+ break;
+ // <--
}
}
}
diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx
index 389d7d059d93..a5e4cc3d6ccd 100644
--- a/starmath/source/utility.cxx
+++ b/starmath/source/utility.cxx
@@ -46,6 +46,8 @@
#include "smdll.hxx"
+////////////////////////////////////////////////////////////
+
// return pointer to active SmViewShell, if this is not possible
// return 0 instead.
//!! Since this method is based on the current focus it is somewhat
@@ -62,8 +64,8 @@ SmViewShell * SmGetActiveView()
/**************************************************************************/
-SmPickList::SmPickList(USHORT nInitSize, USHORT nMaxSize) :
- SfxPtrArr((BYTE) nInitSize, 1)
+SmPickList::SmPickList(sal_uInt16 nInitSize, sal_uInt16 nMaxSize) :
+ SfxPtrArr((sal_uInt8) nInitSize, 1)
{
nSize = nMaxSize;
}
@@ -77,7 +79,7 @@ SmPickList::~SmPickList()
SmPickList& SmPickList::operator=(const SmPickList& rList)
{
- USHORT nPos;
+ sal_uInt16 nPos;
Clear();
nSize = rList.nSize;
@@ -103,7 +105,7 @@ void SmPickList::Insert(const void *pItem)
void SmPickList::Update(const void *pItem, const void *pNewItem)
{
- USHORT nPos;
+ sal_uInt16 nPos;
for (nPos = 0; nPos < Count(); nPos++)
if (CompareItem(GetPtr(nPos), pItem))
@@ -116,7 +118,7 @@ void SmPickList::Update(const void *pItem, const void *pNewItem)
void SmPickList::Remove(const void *pItem)
{
- USHORT nPos;
+ sal_uInt16 nPos;
for (nPos = 0; nPos < Count(); nPos++)
if (CompareItem(GetPtr(nPos), pItem))
@@ -129,7 +131,7 @@ void SmPickList::Remove(const void *pItem)
void SmPickList::Clear()
{
- USHORT nPos;
+ sal_uInt16 nPos;
for (nPos = 0; nPos < Count(); nPos++)
DestroyItem(GetPtr(nPos));
@@ -228,7 +230,7 @@ void SmFontPickList::WriteTo(SmFontDialog& rDialog) const
IMPL_LINK( SmFontPickListBox, SelectHdl, ListBox *, /*pListBox*/ )
{
- USHORT nPos;
+ sal_uInt16 nPos;
String aString;
nPos = GetSelectEntryPos();
@@ -247,7 +249,7 @@ IMPL_LINK( SmFontPickListBox, SelectHdl, ListBox *, /*pListBox*/ )
}
-SmFontPickListBox::SmFontPickListBox(Window* pParent, const ResId& rResId, USHORT nMax) :
+SmFontPickListBox::SmFontPickListBox(Window* pParent, const ResId& rResId, sal_uInt16 nMax) :
SmFontPickList(nMax, nMax),
ListBox(pParent, rResId)
{
@@ -257,7 +259,7 @@ SmFontPickListBox::SmFontPickListBox(Window* pParent, const ResId& rResId, USHOR
SmFontPickListBox& SmFontPickListBox::operator=(const SmFontPickList& rList)
{
- USHORT nPos;
+ sal_uInt16 nPos;
*(SmFontPickList *)this = rList;
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 1c06970f7d79..9d0a0249a31a 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -35,6 +35,9 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/XDesktop.hpp>
+#include <com/sun/star/frame/XFramesSupplier.hpp>
+#include <com/sun/star/container/XChild.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
@@ -198,7 +201,7 @@ void SmGraphicWindow::MouseButtonDown(const MouseEvent& rMEvt)
ESelection aSel (aToken.nRow - 1, aToken.nCol - 1);
if (rMEvt.GetClicks() != 1 || aToken.eType == TPLACE)
- aSel.nEndPos = aSel.nEndPos + sal::static_int_cast< USHORT >(aToken.aText.Len());
+ aSel.nEndPos = aSel.nEndPos + sal::static_int_cast< sal_uInt16 >(aToken.aText.Len());
pEdit->SetSelection(aSel);
SetCursor(pNode);
@@ -342,7 +345,7 @@ void SmGraphicWindow::SetCursor(const Rectangle &rRect)
ShowCursor(true); // draw new cursor
}
-const SmNode * SmGraphicWindow::SetCursorPos(USHORT nRow, USHORT nCol)
+const SmNode * SmGraphicWindow::SetCursorPos(sal_uInt16 nRow, sal_uInt16 nCol)
// looks for a VISIBLE node in the formula tree with it's token at
// (or around) the position 'nRow', 'nCol' in the edit window
// (row and column numbering starts with 1 there!).
@@ -387,7 +390,7 @@ void SmGraphicWindow::Paint(const Rectangle&)
const SmEditWindow *pEdit = pViewShell->GetEditWindow();
if (pEdit)
{ // get new position for formula-cursor (for possible altered formula)
- USHORT nRow, nCol;
+ sal_uInt16 nRow, nCol;
SmGetLeftSelectionPart(pEdit->GetSelection(), nRow, nCol);
nRow++;
nCol++;
@@ -416,7 +419,7 @@ void SmGraphicWindow::KeyInput(const KeyEvent& rKEvt)
ScrollableWindow::KeyInput(rKEvt);
return;
}
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
SmCursor& rCursor = pViewShell->GetDoc()->GetCursor();
switch(nCode)
{
@@ -565,7 +568,7 @@ void SmGraphicWindow::Command(const CommandEvent& rCEvt)
const CommandWheelData* pWData = rCEvt.GetWheelData();
if ( pWData && COMMAND_WHEEL_ZOOM == pWData->GetMode() )
{
- USHORT nTmpZoom = GetZoom();
+ sal_uInt16 nTmpZoom = GetZoom();
if( 0L > pWData->GetDelta() )
nTmpZoom -= 10;
else
@@ -592,9 +595,9 @@ IMPL_LINK_INLINE_START( SmGraphicWindow, MenuSelectHdl, Menu *, pMenu )
IMPL_LINK_INLINE_END( SmGraphicWindow, MenuSelectHdl, Menu *, pMenu )
-void SmGraphicWindow::SetZoom(USHORT Factor)
+void SmGraphicWindow::SetZoom(sal_uInt16 Factor)
{
- nZoom = Min(Max((USHORT) Factor, (USHORT) MINZOOM), (USHORT) MAXZOOM);
+ nZoom = Min(Max((sal_uInt16) Factor, (sal_uInt16) MINZOOM), (sal_uInt16) MAXZOOM);
Fraction aFraction (nZoom, 100);
SetMapMode( MapMode(MAP_100TH_MM, Point(), aFraction, aFraction) );
SetTotalSize();
@@ -619,7 +622,7 @@ void SmGraphicWindow::ZoomToFitInWindow()
{
long nVal = Min ((85 * aWindowSize.Width()) / aSize.Width(),
(85 * aWindowSize.Height()) / aSize.Height());
- SetZoom ( sal::static_int_cast< USHORT >(nVal) );
+ SetZoom ( sal::static_int_cast< sal_uInt16 >(nVal) );
}
}
@@ -637,7 +640,7 @@ uno::Reference< XAccessible > SmGraphicWindow::CreateAccessible()
SmGraphicController::SmGraphicController(SmGraphicWindow &rSmGraphic,
- USHORT nId_,
+ sal_uInt16 nId_,
SfxBindings &rBindings) :
SfxControllerItem(nId_, rBindings),
rGraphic(rSmGraphic)
@@ -645,7 +648,7 @@ SmGraphicController::SmGraphicController(SmGraphicWindow &rSmGraphic,
}
-void SmGraphicController::StateChanged(USHORT nSID, SfxItemState eState, const SfxPoolItem* pState)
+void SmGraphicController::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState)
{
rGraphic.SetTotalSize();
rGraphic.Invalidate();
@@ -657,7 +660,7 @@ void SmGraphicController::StateChanged(USHORT nSID, SfxItemState eState, const S
SmEditController::SmEditController(SmEditWindow &rSmEdit,
- USHORT nId_,
+ sal_uInt16 nId_,
SfxBindings &rBindings) :
SfxControllerItem(nId_, rBindings),
rEdit(rSmEdit)
@@ -672,7 +675,7 @@ SmEditController::~SmEditController()
#endif
-void SmEditController::StateChanged(USHORT nSID, SfxItemState eState, const SfxPoolItem* pState)
+void SmEditController::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState)
{
const SfxStringItem *pItem = PTR_CAST(SfxStringItem, pState);
@@ -832,7 +835,51 @@ void SmCmdBoxWindow::StateChanged( StateChangedType nStateChange )
IMPL_LINK( SmCmdBoxWindow, InitialFocusTimerHdl, Timer *, EMPTYARG /*pTimer*/ )
{
- aEdit.GrabFocus();
+ // We want to have the focus in the edit window once Math has been opened
+ // to allow for immediate typing.
+ // Problem: There is no proper way to do this
+ // Thus: this timer based soultion has been implemented (see GrabFocus below)
+ //
+ // Follow-up problem (#i114910): grabing the focus may bust the help system since
+ // it relies on getting the current frame which conflicts with grabbing the focus.
+ // Thus aside from the 'GrabFocus' call everything else is to get the
+ // help reliably working despite using 'GrabFocus'.
+
+ try
+ {
+ uno::Reference< frame::XDesktop > xDesktop;
+ uno::Reference< lang::XMultiServiceFactory > xSMGR( comphelper::getProcessServiceFactory() );
+ if (xSMGR.is())
+ {
+ xDesktop = uno::Reference< frame::XDesktop >(
+ xSMGR->createInstance( rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" )), uno::UNO_QUERY_THROW );
+ }
+
+ aEdit.GrabFocus();
+
+ if (xDesktop.is())
+ {
+ bool bInPlace = GetView()->GetViewFrame()->GetFrame().IsInPlace();
+ uno::Reference< frame::XFrame > xFrame( GetBindings().GetDispatcher()->GetFrame()->GetFrame().GetFrameInterface());
+ if ( bInPlace )
+ {
+ uno::Reference< container::XChild > xModel( GetView()->GetDoc()->GetModel(), uno::UNO_QUERY_THROW );
+ uno::Reference< frame::XModel > xParent( xModel->getParent(), uno::UNO_QUERY_THROW );
+ uno::Reference< frame::XController > xParentCtrler( xParent->getCurrentController() );
+ uno::Reference< frame::XFramesSupplier > xParentFrame( xParentCtrler->getFrame(), uno::UNO_QUERY_THROW );
+ xParentFrame->setActiveFrame( xFrame );
+ }
+ else
+ {
+ uno::Reference< frame::XFramesSupplier > xFramesSupplier( xDesktop, uno::UNO_QUERY );
+ xFramesSupplier->setActiveFrame( xFrame );
+ }
+ }
+ }
+ catch (uno::Exception &)
+ {
+ DBG_ASSERT( 0, "failed to properly set initial focus to edit window" );
+ }
return 0;
}
@@ -872,7 +919,7 @@ void SmCmdBoxWindow::GetFocus()
SFX_IMPL_DOCKINGWINDOW(SmCmdBoxWrapper, SID_CMDBOXWINDOW);
-SmCmdBoxWrapper::SmCmdBoxWrapper(Window *pParentWindow, USHORT nId,
+SmCmdBoxWrapper::SmCmdBoxWrapper(Window *pParentWindow, sal_uInt16 nId,
SfxBindings *pBindings,
SfxChildWinInfo *pInfo) :
SfxChildWindow(pParentWindow, nId)
@@ -992,7 +1039,7 @@ void SmViewShell::SetZoomFactor( const Fraction &rX, const Fraction &rY )
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::SetZoomFactor" );
const Fraction &rFrac = rX < rY ? rX : rY;
- GetGraphicWindow().SetZoom( (USHORT) long(rFrac * Fraction( 100, 1 )) );
+ GetGraphicWindow().SetZoom( (sal_uInt16) long(rFrac * Fraction( 100, 1 )) );
//To avoid rounding errors base class regulates crooked values too
//if necessary
@@ -1006,7 +1053,7 @@ Size SmViewShell::GetTextLineSize(OutputDevice& rDevice, const String& rLine)
String aText;
Size aSize(rDevice.GetTextWidth(rLine), rDevice.GetTextHeight());
- USHORT nTabs = rLine.GetTokenCount('\t');
+ sal_uInt16 nTabs = rLine.GetTokenCount('\t');
if (nTabs > 0)
{
@@ -1014,7 +1061,7 @@ Size SmViewShell::GetTextLineSize(OutputDevice& rDevice, const String& rLine)
aSize.Width() = 0;
- for (USHORT i = 0; i < nTabs; i++)
+ for (sal_uInt16 i = 0; i < nTabs; i++)
{
if (i > 0)
aSize.Width() = ((aSize.Width() / TabPos) + 1) * TabPos;
@@ -1038,9 +1085,9 @@ Size SmViewShell::GetTextSize(OutputDevice& rDevice, const String& rText, long M
String aLine;
Size TextSize;
String aText;
- USHORT nLines = rText.GetTokenCount('\n');
+ sal_uInt16 nLines = rText.GetTokenCount('\n');
- for (USHORT i = 0; i < nLines; i++)
+ for (sal_uInt16 i = 0; i < nLines; i++)
{
aLine = rText.GetToken(i, '\n');
aLine.EraseAllChars('\r');
@@ -1098,13 +1145,13 @@ void SmViewShell::DrawTextLine(OutputDevice& rDevice, const Point& rPosition, co
String aText;
Point aPoint (rPosition);
- USHORT nTabs = rLine.GetTokenCount('\t');
+ sal_uInt16 nTabs = rLine.GetTokenCount('\t');
if (nTabs > 0)
{
long TabPos = rDevice.GetTextWidth('n') * 8;
- for (USHORT i = 0; i < nTabs; i++)
+ for (sal_uInt16 i = 0; i < nTabs; i++)
{
if (i > 0)
aPoint.X() = ((aPoint.X() / TabPos) + 1) * TabPos;
@@ -1121,17 +1168,17 @@ void SmViewShell::DrawTextLine(OutputDevice& rDevice, const Point& rPosition, co
}
-void SmViewShell::DrawText(OutputDevice& rDevice, const Point& rPosition, const String& rText, USHORT MaxWidth)
+void SmViewShell::DrawText(OutputDevice& rDevice, const Point& rPosition, const String& rText, sal_uInt16 MaxWidth)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::DrawText" );
- USHORT nLines = rText.GetTokenCount('\n');
+ sal_uInt16 nLines = rText.GetTokenCount('\n');
Point aPoint (rPosition);
Size aSize;
String aLine;
String aText;
- for (USHORT i = 0; i < nLines; i++)
+ for (sal_uInt16 i = 0; i < nLines; i++)
{
aLine = rText.GetToken(i, '\n');
aLine.EraseAllChars('\r');
@@ -1195,7 +1242,7 @@ void SmViewShell::Impl_Print(
const bool bIsPrintFrame = rPrintUIOptions.getBoolValue( PRTUIOPT_BORDER, sal_True );
const bool bIsPrintFormulaText = rPrintUIOptions.getBoolValue( PRTUIOPT_FORMULA_TEXT, sal_True );
SmPrintSize ePrintSize( static_cast< SmPrintSize >( rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_FORMAT, PRINT_SIZE_NORMAL ) ));
- const USHORT nZoomFactor = static_cast< USHORT >(rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_SCALE, 100 ));
+ const sal_uInt16 nZoomFactor = static_cast< sal_uInt16 >(rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_SCALE, 100 ));
rOutDev.Push();
rOutDev.SetLineColor( Color(COL_BLACK) );
@@ -1233,7 +1280,7 @@ void SmViewShell::Impl_Print(
Point aPoint(aOutRect.Left() + (aOutRect.GetWidth() - aTitleSize.Width()) / 2,
aOutRect.Top());
DrawText(rOutDev, aPoint, GetDoc()->GetTitle(),
- sal::static_int_cast< USHORT >(aOutRect.GetWidth() - 200));
+ sal::static_int_cast< sal_uInt16 >(aOutRect.GetWidth() - 200));
aOutRect.Top() += aTitleSize.Height() + 200;
// output description
@@ -1243,7 +1290,7 @@ void SmViewShell::Impl_Print(
aPoint.X() = aOutRect.Left() + (aOutRect.GetWidth() - aDescSize.Width()) / 2;
aPoint.Y() = aOutRect.Top();
DrawText(rOutDev, aPoint, GetDoc()->GetComment(),
- sal::static_int_cast< USHORT >(aOutRect.GetWidth() - 200));
+ sal::static_int_cast< sal_uInt16 >(aOutRect.GetWidth() - 200));
aOutRect.Top() += aDescSize.Height() + 300;
}
@@ -1268,7 +1315,7 @@ void SmViewShell::Impl_Print(
Point aPoint (aOutRect.Left() + (aOutRect.GetWidth() - aSize.Width()) / 2,
aOutRect.Bottom() + 300);
DrawText(rOutDev, aPoint, GetDoc()->GetText(),
- sal::static_int_cast< USHORT >(aOutRect.GetWidth() - 200));
+ sal::static_int_cast< sal_uInt16 >(aOutRect.GetWidth() - 200));
aOutRect.Bottom() -= 200;
}
@@ -1298,9 +1345,9 @@ void SmViewShell::Impl_Print(
Size OutputSize (rOutDev.LogicToPixel(Size(aOutRect.GetWidth(),
aOutRect.GetHeight()), MapMode(MAP_100TH_MM)));
Size GraphicSize (rOutDev.LogicToPixel(aSize, MapMode(MAP_100TH_MM)));
- USHORT nZ = (USHORT) Min((long)Fraction(OutputSize.Width() * 100L, GraphicSize.Width()),
+ sal_uInt16 nZ = (sal_uInt16) Min((long)Fraction(OutputSize.Width() * 100L, GraphicSize.Width()),
(long)Fraction(OutputSize.Height() * 100L, GraphicSize.Height()));
- Fraction aFraction ((USHORT) Max ((USHORT) MINZOOM, Min((USHORT) MAXZOOM, (USHORT) (nZ - 10))), (USHORT) 100);
+ Fraction aFraction ((sal_uInt16) Max ((sal_uInt16) MINZOOM, Min((sal_uInt16) MAXZOOM, (sal_uInt16) (nZ - 10))), (sal_uInt16) 100);
OutputMapMode = MapMode(MAP_100TH_MM, aZeroPoint, aFraction, aFraction);
}
@@ -1336,7 +1383,7 @@ void SmViewShell::Impl_Print(
rOutDev.Pop();
}
-USHORT SmViewShell::Print(SfxProgress & /*rProgress*/, BOOL /*bIsAPI*/, PrintDialog * /*pPrintDialog*/)
+sal_uInt16 SmViewShell::Print(SfxProgress & /*rProgress*/, sal_Bool /*bIsAPI*/)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Print" );
OSL_FAIL( "SmViewShell::Print: no longer used with new UI print dialog. Should be removed!!" );
@@ -1344,7 +1391,7 @@ USHORT SmViewShell::Print(SfxProgress & /*rProgress*/, BOOL /*bIsAPI*/, PrintDia
}
-SfxPrinter* SmViewShell::GetPrinter(BOOL bCreate)
+SfxPrinter* SmViewShell::GetPrinter(sal_Bool bCreate)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::GetPrinter" );
@@ -1355,7 +1402,7 @@ SfxPrinter* SmViewShell::GetPrinter(BOOL bCreate)
}
-USHORT SmViewShell::SetPrinter(SfxPrinter *pNewPrinter, USHORT nDiffFlags, bool )
+sal_uInt16 SmViewShell::SetPrinter(SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags, bool )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::SetPrinter" );
SfxPrinter *pOld = GetDoc()->GetPrinter();
@@ -1599,7 +1646,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
break;
case SID_ZOOMOUT:
- OSL_ENSURE(aGraphic.GetZoom() >= 25, "Sm: incorrect USHORT argument");
+ OSL_ENSURE(aGraphic.GetZoom() >= 25, "Sm: incorrect sal_uInt16 argument");
aGraphic.SetZoom(aGraphic.GetZoom() - 25);
break;
@@ -1730,7 +1777,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
break;
}
- case SID_INSERT_FORMULA:
+ case SID_IMPORT_FORMULA:
{
delete pImpl->pRequest;
pImpl->pRequest = new SfxRequest( rReq );
@@ -1813,7 +1860,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
switch( rZoom.GetType() )
{
case SVX_ZOOM_PERCENT:
- aGraphic.SetZoom((USHORT)rZoom.GetValue ());
+ aGraphic.SetZoom((sal_uInt16)rZoom.GetValue ());
break;
case SVX_ZOOM_OPTIMAL:
@@ -1830,7 +1877,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
Size OutputSize(pPrinter->LogicToPixel(Size(OutputRect.GetWidth(),
OutputRect.GetHeight()), aMap));
Size GraphicSize(pPrinter->LogicToPixel(GetDoc()->GetSize(), aMap));
- USHORT nZ = (USHORT) Min((long)Fraction(OutputSize.Width() * 100L, GraphicSize.Width()),
+ sal_uInt16 nZ = (sal_uInt16) Min((long)Fraction(OutputSize.Width() * 100L, GraphicSize.Width()),
(long)Fraction(OutputSize.Height() * 100L, GraphicSize.Height()));
aGraphic.SetZoom (nZ);
break;
@@ -1876,7 +1923,7 @@ void SmViewShell::GetState(SfxItemSet &rSet)
SfxWhichIter aIter(rSet);
SmEditWindow *pEditWin = GetEditWindow();
- for (USHORT nWh = aIter.FirstWhich(); nWh != 0; nWh = aIter.NextWhich())
+ for (sal_uInt16 nWh = aIter.FirstWhich(); nWh != 0; nWh = aIter.NextWhich())
{
switch (nWh)
{
@@ -1986,7 +2033,7 @@ SmViewShell::~SmViewShell()
delete pImpl;
}
-void SmViewShell::Deactivate( BOOL bIsMDIActivate )
+void SmViewShell::Deactivate( sal_Bool bIsMDIActivate )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Deactivate" );
@@ -1998,7 +2045,7 @@ void SmViewShell::Deactivate( BOOL bIsMDIActivate )
}
-void SmViewShell::Activate( BOOL bIsMDIActivate )
+void SmViewShell::Activate( sal_Bool bIsMDIActivate )
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::Activate" );
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index d89abb8a7955..4a69d851622b 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -718,7 +718,7 @@ void SmDrawingVisitor::Visit( SmRectangleNode* pNode )
rDev.SetLineColor( );
aTmpDev.SetFont( pNode->GetFont( ) );
- ULONG nTmpBorderWidth = pNode->GetFont( ).GetBorderWidth( );
+ sal_uLong nTmpBorderWidth = pNode->GetFont( ).GetBorderWidth( );
// get rectangle and remove borderspace
Rectangle aTmp ( pNode->AsRectangle( ) + Position - pNode->GetTopLeft( ) );
@@ -1288,9 +1288,9 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmMatrixNode* pNode )
SmCaretPosGraphEntry *left = pRightMost,
*right = pGraph->Add( SmCaretPos( pNode, 1 ) );
- for ( USHORT i = 0; i < pNode->GetNumRows( ); i++ ) {
+ for ( sal_uInt16 i = 0; i < pNode->GetNumRows( ); i++ ) {
SmCaretPosGraphEntry* r = left;
- for ( USHORT j = 0; j < pNode->GetNumCols( ); j++ ){
+ for ( sal_uInt16 j = 0; j < pNode->GetNumCols( ); j++ ){
SmNode* pSubNode = pNode->GetSubNode( i * pNode->GetNumCols( ) + j );
pRightMost = pGraph->Add( SmCaretPos( pSubNode, 0 ), r );
@@ -1819,12 +1819,12 @@ void SmCloningVisitor::CloneKids( SmStructureNode* pSource, SmStructureNode* pTa
SmNode* pCurrResult = pResult;
//Create array for holding clones
- USHORT nSize = pSource->GetNumSubNodes( );
+ sal_uInt16 nSize = pSource->GetNumSubNodes( );
SmNodeArray aNodes( nSize );
//Clone children
SmNode* pKid;
- for( USHORT i = 0; i < nSize; i++ ){
+ for( sal_uInt16 i = 0; i < nSize; i++ ){
if( NULL != ( pKid = pSource->GetSubNode( i ) ) )
pKid->Accept( this );
else
@@ -2421,8 +2421,8 @@ void SmNodeToTextVisitor::Visit( SmSubSupNode* pNode )
void SmNodeToTextVisitor::Visit( SmMatrixNode* pNode )
{
Append( "matrix{" );
- for ( USHORT i = 0; i < pNode->GetNumRows( ); i++ ) {
- for ( USHORT j = 0; j < pNode->GetNumCols( ); j++ ) {
+ for ( sal_uInt16 i = 0; i < pNode->GetNumRows( ); i++ ) {
+ for ( sal_uInt16 j = 0; j < pNode->GetNumCols( ); j++ ) {
SmNode* pSubNode = pNode->GetSubNode( i * pNode->GetNumCols( ) + j );
Separate( );
pSubNode->Accept( this );
diff --git a/starmath/uiconfig/smath/menubar/menubar.xml b/starmath/uiconfig/smath/menubar/menubar.xml
index 5b01e9beda24..dcb68e740718 100644..100755
--- a/starmath/uiconfig/smath/menubar/menubar.xml
+++ b/starmath/uiconfig/smath/menubar/menubar.xml
@@ -83,7 +83,7 @@
<menu:menu menu:id=".uno:ToolsMenu">
<menu:menupopup>
<menu:menuitem menu:id=".uno:SymbolCatalogue"/>
- <menu:menuitem menu:id=".uno:InsertFormula"/>
+ <menu:menuitem menu:id=".uno:ImportFormula"/>
<menu:menuseparator/>
<menu:menu menu:id=".uno:MacrosMenu">
<menu:menupopup>
diff --git a/starmath/util/hidother.src b/starmath/util/hidother.src
index e55a97852b62..23a4aab1eb76 100644
--- a/starmath/util/hidother.src
+++ b/starmath/util/hidother.src
@@ -24,7 +24,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#include "../inc/starmath.hrc"
+#include "../inc/helpids.h"
hidspecial HID_SMA_OPTIONSDIALOG { HelpId = HID_SMA_OPTIONSDIALOG; };
hidspecial HID_SMA_FONTDIALOG { HelpId = HID_SMA_FONTDIALOG; };
@@ -70,7 +70,6 @@ hidspecial HID_SMA_CREATORSTR { HelpId = HID_SMA_CREATORSTR; };
hidspecial HID_SMA_FILESMFTYP { HelpId = HID_SMA_FILESMFTYP; };
hidspecial HID_SMA_FILESYMTYP { HelpId = HID_SMA_FILESYMTYP; };
hidspecial HID_SMA_WIN_DOCUMENT { HelpId = HID_SMA_WIN_DOCUMENT; };
-hidspecial HID_SMA_VIEWSHELL_DOCUMENT { HelpId = HID_SMA_VIEWSHELL_DOCUMENT; };
hidspecial HID_SMA_COMMAND_WIN_EDIT { HelpId = HID_SMA_COMMAND_WIN_EDIT; };
hidspecial HID_SMA_DEFAULT_DIST { HelpId = HID_SMA_DEFAULT_DIST; };
diff --git a/starmath/util/makefile.mk b/starmath/util/makefile.mk
index 1ba52411d721..09fedb57fb2c 100644
--- a/starmath/util/makefile.mk
+++ b/starmath/util/makefile.mk
@@ -42,8 +42,7 @@ GEN_HID_OTHER=TRUE
RESLIB1NAME=sm
RESLIB1IMAGES=$(PRJ)$/res
RESLIB1SRSFILES=\
- $(SRS)$/smres.srs \
- $(SOLARCOMMONRESDIR)$/sfx.srs
+ $(SRS)$/smres.srs
SHL1TARGET= sm$(DLLPOSTFIX)
SHL1IMPLIB= smimp
@@ -112,3 +111,17 @@ SHL1RES= $(RCTARGET)
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/sm.component $(MISC)/smd.component
+
+$(MISC)/sm.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ sm.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt sm.component
+
+$(MISC)/smd.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ smd.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt smd.component
diff --git a/starmath/util/sm.component b/starmath/util/sm.component
new file mode 100644
index 000000000000..8047662e2915
--- /dev/null
+++ b/starmath/util/sm.component
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* 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.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.Math.FormulaDocument">
+ <service name="com.sun.star.formula.FormulaProperties"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Math.XMLContentExporter">
+ <service name="com.sun.star.xml.XMLExportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Math.XMLExporter">
+ <service name="com.sun.star.xml.XMLExportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Math.XMLImporter">
+ <service name="com.sun.star.xml.XMLImportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Math.XMLMetaExporter">
+ <service name="com.sun.star.xml.XMLExportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Math.XMLOasisMetaExporter">
+ <service name="com.sun.star.xml.XMLExportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Math.XMLOasisMetaImporter">
+ <service name="com.sun.star.xml.XMLImportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Math.XMLOasisSettingsExporter">
+ <service name="com.sun.star.xml.XMLExportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Math.XMLOasisSettingsImporter">
+ <service name="com.sun.star.xml.XMLImportFilter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Math.XMLSettingsExporter">
+ <service name="com.sun.star.xml.XMLExportFilter"/>
+ </implementation>
+</component>
diff --git a/starmath/util/smd.component b/starmath/util/smd.component
new file mode 100644
index 000000000000..9f566864482e
--- /dev/null
+++ b/starmath/util/smd.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* 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.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.math.FormatDetector">
+ <service name="com.sun.star.frame.ExtendedTypeDetection"/>
+ </implementation>
+</component>
diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk
new file mode 100644
index 000000000000..2ea8bfc0b332
--- /dev/null
+++ b/sw/AllLangResTarget_sw.mk
@@ -0,0 +1,186 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 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.
+#
+#*************************************************************************
+
+$(eval $(call gb_AllLangResTarget_AllLangResTarget,sw))
+
+$(eval $(call gb_AllLangResTarget_add_srs,sw,\
+ sw/res \
+))
+
+$(eval $(call gb_SrsTarget_SrsTarget,sw/res))
+
+$(eval $(call gb_SrsTarget_set_include,sw/res,\
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc \
+ -I$(WORKDIR)/inc/sw \
+ -I$(SRCDIR)/sw/inc \
+ -I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/source/core/undo \
+ -I$(SRCDIR)/sw/source/core/unocore \
+ -I$(SRCDIR)/sw/source/ui/chrdlg \
+ -I$(SRCDIR)/sw/source/ui/config \
+ -I$(SRCDIR)/sw/source/ui/dbui \
+ -I$(SRCDIR)/sw/source/ui/dialog \
+ -I$(SRCDIR)/sw/source/ui/docvw \
+ -I$(SRCDIR)/sw/source/ui/envelp \
+ -I$(SRCDIR)/sw/source/ui/fldui \
+ -I$(SRCDIR)/sw/source/ui/fmtui \
+ -I$(SRCDIR)/sw/source/ui/frmdlg \
+ -I$(SRCDIR)/sw/source/ui/globdoc \
+ -I$(SRCDIR)/sw/source/ui/inc \
+ -I$(SRCDIR)/sw/source/ui/index \
+ -I$(SRCDIR)/sw/source/ui/lingu \
+ -I$(SRCDIR)/sw/source/ui/misc \
+ -I$(SRCDIR)/sw/source/ui/ribbar \
+ -I$(SRCDIR)/sw/source/ui/shells \
+ -I$(SRCDIR)/sw/source/ui/smartmenu \
+ -I$(SRCDIR)/sw/source/ui/table \
+ -I$(SRCDIR)/sw/source/ui/uiview \
+ -I$(SRCDIR)/sw/source/ui/utlui \
+ -I$(SRCDIR)/sw/source/ui/web \
+ -I$(SRCDIR)/sw/source/ui/wrtsh \
+))
+
+$(eval $(call gb_SrsTarget_add_files,sw/res,\
+ sw/source/core/layout/pagefrm.src \
+ sw/source/core/undo/undo.src \
+ sw/source/core/unocore/unocore.src \
+ sw/source/ui/app/app.src \
+ sw/source/ui/app/error.src \
+ sw/source/ui/app/mn.src \
+ sw/source/ui/chrdlg/ccoll.src \
+ sw/source/ui/chrdlg/chardlg.src \
+ sw/source/ui/chrdlg/chrdlg.src \
+ sw/source/ui/chrdlg/drpcps.src \
+ sw/source/ui/chrdlg/numpara.src \
+ sw/source/ui/chrdlg/paradlg.src \
+ sw/source/ui/chrdlg/swbreak.src \
+ sw/source/ui/config/mailconfigpage.src \
+ sw/source/ui/config/optcomp.src \
+ sw/source/ui/config/optdlg.src \
+ sw/source/ui/config/optload.src \
+ sw/source/ui/config/redlopt.src \
+ sw/source/ui/dbui/addresslistdialog.src \
+ sw/source/ui/dbui/createaddresslistdialog.src \
+ sw/source/ui/dbui/customizeaddresslistdialog.src \
+ sw/source/ui/dbui/dbinsdlg.src \
+ sw/source/ui/dbui/dbtablepreviewdialog.src \
+ sw/source/ui/dbui/dbui.src \
+ sw/source/ui/dbui/mailmergechildwindow.src \
+ sw/source/ui/dbui/mailmergewizard.src \
+ sw/source/ui/dbui/mmaddressblockpage.src \
+ sw/source/ui/dbui/mmdocselectpage.src \
+ sw/source/ui/dbui/mmgreetingspage.src \
+ sw/source/ui/dbui/mmlayoutpage.src \
+ sw/source/ui/dbui/mmmergepage.src \
+ sw/source/ui/dbui/mmoutputpage.src \
+ sw/source/ui/dbui/mmoutputtypepage.src \
+ sw/source/ui/dbui/mmpreparemergepage.src \
+ sw/source/ui/dbui/selectdbtabledialog.src \
+ sw/source/ui/dialog/abstract.src \
+ sw/source/ui/dialog/ascfldlg.src \
+ sw/source/ui/dialog/dialog.src \
+ sw/source/ui/dialog/docstdlg.src \
+ sw/source/ui/dialog/regionsw.src \
+ sw/source/ui/dialog/wordcountdialog.src \
+ sw/source/ui/dochdl/dochdl.src \
+ sw/source/ui/dochdl/selglos.src \
+ sw/source/ui/docvw/access.src \
+ sw/source/ui/docvw/docvw.src \
+ sw/source/ui/envelp/envelp.src \
+ sw/source/ui/envelp/envfmt.src \
+ sw/source/ui/envelp/envlop.src \
+ sw/source/ui/envelp/envprt.src \
+ sw/source/ui/envelp/label.src \
+ sw/source/ui/envelp/labfmt.src \
+ sw/source/ui/envelp/labprt.src \
+ sw/source/ui/envelp/mailmrge.src \
+ sw/source/ui/fldui/DropDownFieldDialog.src \
+ sw/source/ui/fldui/changedb.src \
+ sw/source/ui/fldui/flddb.src \
+ sw/source/ui/fldui/flddinf.src \
+ sw/source/ui/fldui/flddok.src \
+ sw/source/ui/fldui/fldfunc.src \
+ sw/source/ui/fldui/fldref.src \
+ sw/source/ui/fldui/fldtdlg.src \
+ sw/source/ui/fldui/fldui.src \
+ sw/source/ui/fldui/fldvar.src \
+ sw/source/ui/fldui/inpdlg.src \
+ sw/source/ui/fldui/javaedit.src \
+ sw/source/ui/fmtui/tmpdlg.src \
+ sw/source/ui/frmdlg/column.src \
+ sw/source/ui/frmdlg/cption.src \
+ sw/source/ui/frmdlg/frmpage.src \
+ sw/source/ui/frmdlg/frmui.src \
+ sw/source/ui/frmdlg/wrap.src \
+ sw/source/ui/globdoc/globdoc.src \
+ sw/source/ui/index/cnttab.src \
+ sw/source/ui/index/idxmrk.src \
+ sw/source/ui/index/multmrk.src \
+ sw/source/ui/lingu/olmenu.src \
+ sw/source/ui/misc/autocorr.src \
+ sw/source/ui/misc/bookmark.src \
+ sw/source/ui/misc/docfnote.src \
+ sw/source/ui/misc/glosbib.src \
+ sw/source/ui/misc/glossary.src \
+ sw/source/ui/misc/insfnote.src \
+ sw/source/ui/misc/insrule.src \
+ sw/source/ui/misc/linenum.src \
+ sw/source/ui/misc/num.src \
+ sw/source/ui/misc/numberingtypelistbox.src \
+ sw/source/ui/misc/outline.src \
+ sw/source/ui/misc/pgfnote.src \
+ sw/source/ui/misc/pggrid.src \
+ sw/source/ui/misc/redlndlg.src \
+ sw/source/ui/misc/srtdlg.src \
+ sw/source/ui/ribbar/inputwin.src \
+ sw/source/ui/ribbar/tbxanchr.src \
+ sw/source/ui/ribbar/workctrl.src \
+ sw/source/ui/shells/shells.src \
+ sw/source/ui/smartmenu/stmenu.src \
+ sw/source/ui/table/chartins.src \
+ sw/source/ui/table/colwd.src \
+ sw/source/ui/table/convert.src \
+ sw/source/ui/table/instable.src \
+ sw/source/ui/table/mergetbl.src \
+ sw/source/ui/table/rowht.src \
+ sw/source/ui/table/splittbl.src \
+ sw/source/ui/table/table.src \
+ sw/source/ui/table/tabledlg.src \
+ sw/source/ui/table/tautofmt.src \
+ sw/source/ui/uiview/pview.src \
+ sw/source/ui/uiview/view.src \
+ sw/source/ui/utlui/attrdesc.src \
+ sw/source/ui/utlui/gloslst.src \
+ sw/source/ui/utlui/initui.src \
+ sw/source/ui/utlui/navipi.src \
+ sw/source/ui/utlui/poolfmt.src \
+ sw/source/ui/utlui/unotools.src \
+ sw/source/ui/utlui/utlui.src \
+ sw/source/ui/web/web.src \
+ sw/source/ui/wrtsh/wrtsh.src \
+))
diff --git a/sw/JunitTest_sw_complex.mk b/sw/JunitTest_sw_complex.mk
new file mode 100755
index 000000000000..4eb0dc405264
--- /dev/null
+++ b/sw/JunitTest_sw_complex.mk
@@ -0,0 +1,57 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 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.
+#
+#*************************************************************************
+
+$(eval $(call gb_JunitTest_JunitTest,sw_complex))
+
+$(eval $(call gb_JunitTest_add_sourcefiles,sw_complex,\
+ sw/qa/complex/checkColor/CheckChangeColor \
+ sw/qa/complex/indeterminateState/CheckIndeterminateState \
+ sw/qa/complex/writer/CheckCrossReferences \
+ sw/qa/complex/writer/LoadSaveTest \
+ sw/qa/complex/writer/CheckNamedPropertyValues \
+ sw/qa/complex/writer/CheckIndexedPropertyValues \
+ sw/qa/complex/writer/TestDocument \
+ sw/qa/complex/writer/CheckBookmarks \
+ sw/qa/complex/writer/CheckFlies \
+ sw/qa/complex/writer/TextPortionEnumerationTest \
+ sw/qa/complex/accessibility/AccessibleRelationSet \
+))
+
+$(eval $(call gb_JunitTest_add_jars,sw_complex,\
+ $(OUTDIR)/bin/OOoRunner.jar \
+ $(OUTDIR)/bin/ridl.jar \
+ $(OUTDIR)/bin/test.jar \
+ $(OUTDIR)/bin/unoil.jar \
+ $(OUTDIR)/bin/jurt.jar \
+))
+
+$(eval $(call gb_JunitTest_add_classes,sw_complex,\
+ complex.accessibility.AccessibleRelationSet \
+ complex.checkColor.CheckChangeColor \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/source/core/SwNumberTree/makefile.mk b/sw/JunitTest_sw_unoapi.mk
index a7cfff9cecd2..d41ebcd2e839 100644..100755
--- a/sw/source/core/SwNumberTree/makefile.mk
+++ b/sw/JunitTest_sw_unoapi.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -24,27 +24,30 @@
# for a copy of the LGPLv3 License.
#
#*************************************************************************
-PRJ=..$/..$/..
-PRJNAME=sw
-TARGET=SwNumberTree
+$(eval $(call gb_JunitTest_JunitTest,sw_unoapi))
-# --- Settings -----------------------------------------------------
+$(eval $(call gb_JunitTest_set_defs,sw_unoapi,\
+ $$(DEFS) \
+ -Dorg.openoffice.test.arg.sce=$(SRCDIR)/sw/qa/unoapi/sw.sce \
+ -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/sw/qa/unoapi/knownissues.xcl \
+ -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sw/qa/unoapi/testdocuments \
+))
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
+$(eval $(call gb_JunitTest_add_jars,sw_unoapi,\
+ $(OUTDIR)/bin/OOoRunner.jar \
+ $(OUTDIR)/bin/ridl.jar \
+ $(OUTDIR)/bin/test.jar \
+ $(OUTDIR)/bin/unoil.jar \
+ $(OUTDIR)/bin/jurt.jar \
+))
-# --- Files --------------------------------------------------------
+$(eval $(call gb_JunitTest_add_sourcefiles,sw_unoapi,\
+ sw/qa/unoapi/Test \
+))
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-EXCEPTIONSFILES = \
- $(SLO)$/SwNodeNum.obj \
- $(SLO)$/SwNumberTree.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
+$(eval $(call gb_JunitTest_add_classes,sw_unoapi,\
+ org.openoffice.sw.qa.unoapi.Test \
+))
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Library_msword.mk b/sw/Library_msword.mk
new file mode 100644
index 000000000000..a05b6932beb6
--- /dev/null
+++ b/sw/Library_msword.mk
@@ -0,0 +1,122 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 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.
+#
+#*************************************************************************
+
+$(eval $(call gb_Library_Library,msword))
+
+$(eval $(call gb_Library_set_componentfile,msword,sw/util/msword))
+
+$(eval $(call gb_Library_set_include,msword,\
+ -I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/source/ui/inc \
+ -I$(SRCDIR)/sw/source/filter/inc \
+ -I$(SRCDIR)/sw/inc/pch \
+ -I$(SRCDIR)/sw/inc \
+ -I$(WORKDIR)/inc/sw/sdi \
+ -I$(WORKDIR)/Misc/sw/ \
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc/offuh \
+ -I$(OUTDIR)/inc/sw \
+))
+
+$(eval $(call gb_Library_set_defs,msword,\
+ $$(DEFS) \
+))
+
+$(eval $(call gb_Library_add_linked_libs,msword,\
+ basegfx \
+ comphelper \
+ cppu \
+ cppuhelper \
+ editeng \
+ i18nisolang1 \
+ i18nutil \
+ icuuc \
+ msfilter \
+ sal \
+ sax \
+ sb \
+ oox \
+ sfx \
+ sot \
+ svl \
+ svt \
+ svx \
+ svx \
+ svxcore \
+ sw \
+ tk \
+ tl \
+ ucbhelper \
+ utl \
+ vcl \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Library_add_exception_objects,msword,\
+ sw/source/filter/rtf/rtffld \
+ sw/source/filter/rtf/rtffly \
+ sw/source/filter/rtf/rtfnum \
+ sw/source/filter/rtf/rtftbl \
+ sw/source/filter/rtf/swparrtf \
+ sw/source/filter/ww8/docxattributeoutput \
+ sw/source/filter/ww8/docxexport \
+ sw/source/filter/ww8/docxexportfilter \
+ sw/source/filter/ww8/rtfattributeoutput \
+ sw/source/filter/ww8/rtfexport \
+ sw/source/filter/ww8/rtfexportfilter \
+ sw/source/filter/ww8/rtfimportfilter \
+ sw/source/filter/ww8/rtfsdrexport \
+ sw/source/filter/ww8/WW8FFData \
+ sw/source/filter/ww8/WW8FibData \
+ sw/source/filter/ww8/WW8Sttbf \
+ sw/source/filter/ww8/WW8TableInfo \
+ sw/source/filter/ww8/fields \
+ sw/source/filter/ww8/styles \
+ sw/source/filter/ww8/tracer \
+ sw/source/filter/ww8/writerhelper \
+ sw/source/filter/ww8/writerwordglue \
+ sw/source/filter/ww8/wrtw8esh \
+ sw/source/filter/ww8/wrtw8nds \
+ sw/source/filter/ww8/wrtw8num \
+ sw/source/filter/ww8/wrtw8sty \
+ sw/source/filter/ww8/wrtww8 \
+ sw/source/filter/ww8/wrtww8gr \
+ sw/source/filter/ww8/ww8atr \
+ sw/source/filter/ww8/ww8glsy \
+ sw/source/filter/ww8/ww8graf \
+ sw/source/filter/ww8/ww8graf2 \
+ sw/source/filter/ww8/ww8par \
+ sw/source/filter/ww8/ww8par2 \
+ sw/source/filter/ww8/ww8par3 \
+ sw/source/filter/ww8/ww8par4 \
+ sw/source/filter/ww8/ww8par5 \
+ sw/source/filter/ww8/ww8par6 \
+ sw/source/filter/ww8/ww8scan \
+ sw/source/filter/ww8/ww8toolbar \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
new file mode 100644
index 000000000000..6bcc9da5935a
--- /dev/null
+++ b/sw/Library_sw.mk
@@ -0,0 +1,742 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 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.
+#
+#*************************************************************************
+
+$(eval $(call gb_Library_Library,sw))
+
+$(eval $(call gb_Library_add_sdi_headers,sw,sw/sdi/swslots))
+
+$(eval $(call gb_Library_add_precompiled_header,sw,$(SRCDIR)/sw/inc/pch/precompiled_sw))
+
+$(eval $(call gb_Library_set_componentfile,sw,sw/util/sw))
+
+$(eval $(call gb_Library_set_include,sw,\
+ -I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/source/filter/inc \
+ -I$(SRCDIR)/sw/source/ui/inc \
+ -I$(SRCDIR)/sw/inc/pch \
+ -I$(SRCDIR)/sw/inc \
+ -I$(WORKDIR)/SdiTarget/sw/sdi \
+ -I$(WORKDIR)/Misc/sw/ \
+ $$(INCLUDE) \
+ $(if $(filter YES,$(SYSTEM_LIBXML)),$(LIBXML_CFLAGS)) \
+ -I$(OUTDIR)/inc/offuh \
+ -I$(OUTDIR)/inc \
+))
+
+$(eval $(call gb_Library_set_defs,sw,\
+ $$(DEFS) \
+ -DSW_DLLIMPLEMENTATION \
+))
+
+$(eval $(call gb_Library_add_linked_libs,sw,\
+ avmedia \
+ basegfx \
+ comphelper \
+ cppu \
+ cppuhelper \
+ drawinglayer \
+ editeng \
+ i18nisolang1 \
+ i18nutil \
+ icuuc \
+ lng \
+ sal \
+ salhelper \
+ sb \
+ sfx \
+ sot \
+ svl \
+ svt \
+ svx \
+ svxcore \
+ tk \
+ tl \
+ ucbhelper \
+ utl \
+ vbahelper \
+ vcl \
+ xo \
+ xml2 \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Library_add_exception_objects,sw,\
+ sw/source/core/SwNumberTree/SwNodeNum \
+ sw/source/core/SwNumberTree/SwNumberTree \
+ sw/source/core/access/acccell \
+ sw/source/core/access/acccontext \
+ sw/source/core/access/accdoc \
+ sw/source/core/access/accembedded \
+ sw/source/core/access/accfootnote \
+ sw/source/core/access/accframe \
+ sw/source/core/access/accframebase\
+ sw/source/core/access/accfrmobj \
+ sw/source/core/access/accfrmobjmap \
+ sw/source/core/access/accfrmobjslist \
+ sw/source/core/access/accgraphic \
+ sw/source/core/access/accheaderfooter \
+ sw/source/core/access/acchyperlink \
+ sw/source/core/access/acchypertextdata \
+ sw/source/core/access/accmap \
+ sw/source/core/access/accnotextframe \
+ sw/source/core/access/accpage \
+ sw/source/core/access/accpara \
+ sw/source/core/access/accportions \
+ sw/source/core/access/accpreview \
+ sw/source/core/access/accselectionhelper \
+ sw/source/core/access/acctable \
+ sw/source/core/access/acctextframe \
+ sw/source/core/access/parachangetrackinginfo \
+ sw/source/core/access/textmarkuphelper \
+ sw/source/core/attr/calbck \
+ sw/source/core/attr/cellatr \
+ sw/source/core/attr/fmtfollowtextflow \
+ sw/source/core/attr/fmtwrapinfluenceonobjpos \
+ sw/source/core/attr/format \
+ sw/source/core/attr/hints \
+ sw/source/core/attr/swatrset \
+ sw/source/core/bastyp/SwSmartTagMgr \
+ sw/source/core/bastyp/bparr \
+ sw/source/core/bastyp/breakit \
+ sw/source/core/bastyp/calc \
+ sw/source/core/bastyp/checkit \
+ sw/source/core/bastyp/index \
+ sw/source/core/bastyp/init \
+ sw/source/core/bastyp/ring \
+ sw/source/core/bastyp/swcache \
+ sw/source/core/bastyp/swrect \
+ sw/source/core/bastyp/swregion \
+ sw/source/core/bastyp/swtypes \
+ sw/source/core/bastyp/tabcol \
+ sw/source/core/crsr/BlockCursor \
+ sw/source/core/crsr/bookmrk \
+ sw/source/core/crsr/callnk \
+ sw/source/core/crsr/crbm \
+ sw/source/core/crsr/crossrefbookmark \
+ sw/source/core/crsr/crsrsh \
+ sw/source/core/crsr/crstrvl \
+ sw/source/core/crsr/crstrvl1 \
+ sw/source/core/crsr/findattr \
+ sw/source/core/crsr/findcoll \
+ sw/source/core/crsr/findfmt \
+ sw/source/core/crsr/findtxt \
+ sw/source/core/crsr/pam \
+ sw/source/core/crsr/paminit \
+ sw/source/core/crsr/swcrsr \
+ sw/source/core/crsr/trvlcol \
+ sw/source/core/crsr/trvlfnfl \
+ sw/source/core/crsr/trvlreg \
+ sw/source/core/crsr/trvltbl \
+ sw/source/core/crsr/unocrsr \
+ sw/source/core/crsr/viscrs \
+ sw/source/core/doc/SwStyleNameMapper \
+ sw/source/core/doc/acmplwrd \
+ sw/source/core/doc/dbgoutsw \
+ sw/source/core/doc/doc \
+ sw/source/core/doc/docbasic \
+ sw/source/core/doc/docbm \
+ sw/source/core/doc/docchart \
+ sw/source/core/doc/doccomp \
+ sw/source/core/doc/doccorr \
+ sw/source/core/doc/docdde \
+ sw/source/core/doc/docdesc \
+ sw/source/core/doc/docdraw \
+ sw/source/core/doc/docedt \
+ sw/source/core/doc/docfld \
+ sw/source/core/doc/docfly \
+ sw/source/core/doc/docfmt \
+ sw/source/core/doc/docftn \
+ sw/source/core/doc/docglbl \
+ sw/source/core/doc/docglos \
+ sw/source/core/doc/doclay \
+ sw/source/core/doc/docnew \
+ sw/source/core/doc/docnum \
+ sw/source/core/doc/docredln \
+ sw/source/core/doc/docruby \
+ sw/source/core/doc/docsort \
+ sw/source/core/doc/docstat \
+ sw/source/core/doc/doctxm \
+ sw/source/core/doc/docxforms \
+ sw/source/core/doc/extinput \
+ sw/source/core/doc/fmtcol \
+ sw/source/core/doc/ftnidx \
+ sw/source/core/doc/gctable \
+ sw/source/core/doc/htmltbl \
+ sw/source/core/doc/lineinfo \
+ sw/source/core/doc/list \
+ sw/source/core/doc/notxtfrm \
+ sw/source/core/doc/number \
+ sw/source/core/doc/poolfmt \
+ sw/source/core/doc/sortopt \
+ sw/source/core/doc/swserv \
+ sw/source/core/doc/swstylemanager \
+ sw/source/core/doc/tblafmt \
+ sw/source/core/doc/tblcpy \
+ sw/source/core/doc/tblrwcl \
+ sw/source/core/doc/visiturl \
+ sw/source/core/docnode/cancellablejob \
+ sw/source/core/docnode/finalthreadmanager \
+ sw/source/core/docnode/ndcopy \
+ sw/source/core/docnode/ndindex \
+ sw/source/core/docnode/ndnotxt \
+ sw/source/core/docnode/ndnum \
+ sw/source/core/docnode/ndsect \
+ sw/source/core/docnode/ndtbl \
+ sw/source/core/docnode/ndtbl1 \
+ sw/source/core/docnode/node \
+ sw/source/core/docnode/node2lay \
+ sw/source/core/docnode/nodes \
+ sw/source/core/docnode/observablethread \
+ sw/source/core/docnode/pausethreadstarting \
+ sw/source/core/docnode/retrievedinputstreamdata \
+ sw/source/core/docnode/retrieveinputstream \
+ sw/source/core/docnode/retrieveinputstreamconsumer \
+ sw/source/core/docnode/section \
+ sw/source/core/docnode/swbaslnk \
+ sw/source/core/docnode/swthreadjoiner \
+ sw/source/core/docnode/swthreadmanager \
+ sw/source/core/docnode/threadlistener \
+ sw/source/core/docnode/threadmanager \
+ sw/source/core/draw/dcontact \
+ sw/source/core/draw/dflyobj \
+ sw/source/core/draw/dobjfac \
+ sw/source/core/draw/dpage \
+ sw/source/core/draw/drawdoc \
+ sw/source/core/draw/dview \
+ sw/source/core/edit/acorrect \
+ sw/source/core/edit/autofmt \
+ sw/source/core/edit/edatmisc \
+ sw/source/core/edit/edattr \
+ sw/source/core/edit/eddel \
+ sw/source/core/edit/edfcol \
+ sw/source/core/edit/edfld \
+ sw/source/core/edit/edfldexp \
+ sw/source/core/edit/edfmt \
+ sw/source/core/edit/edglbldc \
+ sw/source/core/edit/edglss \
+ sw/source/core/edit/editsh \
+ sw/source/core/edit/edlingu \
+ sw/source/core/edit/ednumber \
+ sw/source/core/edit/edredln \
+ sw/source/core/edit/edsect \
+ sw/source/core/edit/edtab \
+ sw/source/core/edit/edtox \
+ sw/source/core/edit/edundo \
+ sw/source/core/edit/edws \
+ sw/source/core/except/dbgloop \
+ sw/source/core/except/errhdl \
+ sw/source/core/fields/authfld \
+ sw/source/core/fields/cellfml \
+ sw/source/core/fields/chpfld \
+ sw/source/core/fields/dbfld \
+ sw/source/core/fields/ddefld \
+ sw/source/core/fields/ddetbl \
+ sw/source/core/fields/docufld \
+ sw/source/core/fields/expfld \
+ sw/source/core/fields/fldbas \
+ sw/source/core/fields/flddat \
+ sw/source/core/fields/flddropdown \
+ sw/source/core/fields/fldlst \
+ sw/source/core/fields/macrofld \
+ sw/source/core/fields/postithelper \
+ sw/source/core/fields/reffld \
+ sw/source/core/fields/scrptfld \
+ sw/source/core/fields/tblcalc \
+ sw/source/core/fields/textapi \
+ sw/source/core/fields/usrfld \
+ sw/source/core/frmedt/fecopy \
+ sw/source/core/frmedt/fedesc \
+ sw/source/core/frmedt/fefly1 \
+ sw/source/core/frmedt/feflyole \
+ sw/source/core/frmedt/feshview \
+ sw/source/core/frmedt/fetab \
+ sw/source/core/frmedt/fews \
+ sw/source/core/frmedt/tblsel \
+ sw/source/core/graphic/grfatr \
+ sw/source/core/graphic/ndgrf \
+ sw/source/core/layout/anchoreddrawobject \
+ sw/source/core/layout/anchoredobject \
+ sw/source/core/layout/atrfrm \
+ sw/source/core/layout/calcmove \
+ sw/source/core/layout/colfrm \
+ sw/source/core/layout/dbg_lay \
+ sw/source/core/layout/findfrm \
+ sw/source/core/layout/flowfrm \
+ sw/source/core/layout/fly \
+ sw/source/core/layout/flycnt \
+ sw/source/core/layout/flyincnt \
+ sw/source/core/layout/flylay \
+ sw/source/core/layout/flypos \
+ sw/source/core/layout/frmtool \
+ sw/source/core/layout/ftnfrm \
+ sw/source/core/layout/hffrm \
+ sw/source/core/layout/layact \
+ sw/source/core/layout/laycache \
+ sw/source/core/layout/layouter \
+ sw/source/core/layout/movedfwdfrmsbyobjpos \
+ sw/source/core/layout/newfrm \
+ sw/source/core/layout/objectformatter \
+ sw/source/core/layout/objectformatterlayfrm \
+ sw/source/core/layout/objectformattertxtfrm \
+ sw/source/core/layout/objstmpconsiderwrapinfl \
+ sw/source/core/layout/pagechg \
+ sw/source/core/layout/pagedesc \
+ sw/source/core/layout/paintfrm \
+ sw/source/core/layout/sectfrm \
+ sw/source/core/layout/softpagebreak \
+ sw/source/core/layout/sortedobjs \
+ sw/source/core/layout/sortedobjsimpl \
+ sw/source/core/layout/ssfrm \
+ sw/source/core/layout/swselectionlist \
+ sw/source/core/layout/tabfrm \
+ sw/source/core/layout/trvlfrm \
+ sw/source/core/layout/unusedf \
+ sw/source/core/layout/virtoutp \
+ sw/source/core/layout/wsfrm \
+ sw/source/core/objectpositioning/anchoredobjectposition \
+ sw/source/core/objectpositioning/ascharanchoredobjectposition \
+ sw/source/core/objectpositioning/environmentofanchoredobject \
+ sw/source/core/objectpositioning/tocntntanchoredobjectposition \
+ sw/source/core/objectpositioning/tolayoutanchoredobjectposition \
+ sw/source/core/ole/ndole \
+ sw/source/core/para/paratr \
+ sw/source/core/sw3io/sw3convert \
+ sw/source/core/sw3io/swacorr \
+ sw/source/core/swg/SwXMLBlockExport \
+ sw/source/core/swg/SwXMLBlockImport \
+ sw/source/core/swg/SwXMLBlockListContext \
+ sw/source/core/swg/SwXMLSectionList \
+ sw/source/core/swg/SwXMLTextBlocks \
+ sw/source/core/swg/SwXMLTextBlocks1 \
+ sw/source/core/swg/swblocks \
+ sw/source/core/table/swnewtable \
+ sw/source/core/table/swtable \
+ sw/source/core/text/EnhancedPDFExportHelper \
+ sw/source/core/text/SwGrammarMarkUp \
+ sw/source/core/text/atrstck \
+ sw/source/core/text/blink \
+ sw/source/core/text/frmcrsr \
+ sw/source/core/text/frmform \
+ sw/source/core/text/frminf \
+ sw/source/core/text/frmpaint \
+ sw/source/core/text/guess \
+ sw/source/core/text/inftxt \
+ sw/source/core/text/itradj \
+ sw/source/core/text/itratr \
+ sw/source/core/text/itrcrsr \
+ sw/source/core/text/itrform2 \
+ sw/source/core/text/itrpaint \
+ sw/source/core/text/itrtxt \
+ sw/source/core/text/noteurl \
+ sw/source/core/text/porexp \
+ sw/source/core/text/porfld \
+ sw/source/core/text/porfly \
+ sw/source/core/text/porglue \
+ sw/source/core/text/porlay \
+ sw/source/core/text/porlin \
+ sw/source/core/text/pormulti \
+ sw/source/core/text/porref \
+ sw/source/core/text/porrst \
+ sw/source/core/text/portox \
+ sw/source/core/text/portxt \
+ sw/source/core/text/redlnitr \
+ sw/source/core/text/txtcache \
+ sw/source/core/text/txtdrop \
+ sw/source/core/text/txtfld \
+ sw/source/core/text/txtfly \
+ sw/source/core/text/txtfrm \
+ sw/source/core/text/txtftn \
+ sw/source/core/text/txthyph \
+ sw/source/core/text/txtinit \
+ sw/source/core/text/txtio \
+ sw/source/core/text/txtpaint \
+ sw/source/core/text/txttab \
+ sw/source/core/text/widorp \
+ sw/source/core/text/wrong \
+ sw/source/core/text/xmldump \
+ sw/source/core/tox/tox \
+ sw/source/core/tox/toxhlp \
+ sw/source/core/tox/txmsrt \
+ sw/source/core/txtnode/SwGrammarContact \
+ sw/source/core/txtnode/atrfld \
+ sw/source/core/txtnode/atrflyin \
+ sw/source/core/txtnode/atrftn \
+ sw/source/core/txtnode/atrref \
+ sw/source/core/txtnode/atrtox \
+ sw/source/core/txtnode/chrfmt \
+ sw/source/core/txtnode/fmtatr2 \
+ sw/source/core/txtnode/fntcache \
+ sw/source/core/txtnode/fntcap \
+ sw/source/core/txtnode/modeltoviewhelper \
+ sw/source/core/txtnode/ndhints \
+ sw/source/core/txtnode/ndtxt \
+ sw/source/core/txtnode/swfntcch \
+ sw/source/core/txtnode/swfont \
+ sw/source/core/txtnode/thints \
+ sw/source/core/txtnode/txatbase \
+ sw/source/core/txtnode/txatritr \
+ sw/source/core/txtnode/txtatr2 \
+ sw/source/core/txtnode/txtedt \
+ sw/source/core/undo/SwRewriter \
+ sw/source/core/undo/SwUndoField \
+ sw/source/core/undo/SwUndoFmt \
+ sw/source/core/undo/SwUndoPageDesc \
+ sw/source/core/undo/SwUndoTOXChange \
+ sw/source/core/undo/docundo \
+ sw/source/core/undo/rolbck \
+ sw/source/core/undo/unattr \
+ sw/source/core/undo/unbkmk \
+ sw/source/core/undo/undel \
+ sw/source/core/undo/undobj \
+ sw/source/core/undo/undobj1 \
+ sw/source/core/undo/undoflystrattr \
+ sw/source/core/undo/undraw \
+ sw/source/core/undo/unfmco \
+ sw/source/core/undo/unins \
+ sw/source/core/undo/unmove \
+ sw/source/core/undo/unnum \
+ sw/source/core/undo/unoutl \
+ sw/source/core/undo/unovwr \
+ sw/source/core/undo/unredln \
+ sw/source/core/undo/unsect \
+ sw/source/core/undo/unsort \
+ sw/source/core/undo/unspnd \
+ sw/source/core/undo/untbl \
+ sw/source/core/undo/untblk \
+ sw/source/core/unocore/SwXTextDefaults \
+ sw/source/core/unocore/TextCursorHelper \
+ sw/source/core/unocore/XMLRangeHelper \
+ sw/source/core/unocore/swunohelper \
+ sw/source/core/unocore/unobkm \
+ sw/source/core/unocore/unochart \
+ sw/source/core/unocore/unocoll \
+ sw/source/core/unocore/unocrsrhelper \
+ sw/source/core/unocore/unodraw \
+ sw/source/core/unocore/unoevent \
+ sw/source/core/unocore/unoevtlstnr \
+ sw/source/core/unocore/unofield \
+ sw/source/core/unocore/unoflatpara \
+ sw/source/core/unocore/unoframe \
+ sw/source/core/unocore/unoftn \
+ sw/source/core/unocore/unoidx \
+ sw/source/core/unocore/unomap \
+ sw/source/core/unocore/unoobj \
+ sw/source/core/unocore/unoobj2 \
+ sw/source/core/unocore/unoparagraph \
+ sw/source/core/unocore/unoport \
+ sw/source/core/unocore/unoportenum \
+ sw/source/core/unocore/unoprnms \
+ sw/source/core/unocore/unoredline \
+ sw/source/core/unocore/unoredlines \
+ sw/source/core/unocore/unorefmk \
+ sw/source/core/unocore/unosect \
+ sw/source/core/unocore/unosett \
+ sw/source/core/unocore/unosrch \
+ sw/source/core/unocore/unostyle \
+ sw/source/core/unocore/unotbl \
+ sw/source/core/unocore/unotext \
+ sw/source/core/unocore/unotextmarkup \
+ sw/source/core/view/pagepreviewlayout \
+ sw/source/core/view/printdata \
+ sw/source/core/view/vdraw \
+ sw/source/core/view/viewimp \
+ sw/source/core/view/viewpg \
+ sw/source/core/view/viewsh \
+ sw/source/core/view/vnew \
+ sw/source/core/view/vprint \
+ sw/source/filter/ascii/ascatr \
+ sw/source/filter/ascii/parasc \
+ sw/source/filter/ascii/wrtasc \
+ sw/source/filter/basflt/docfact \
+ sw/source/filter/basflt/fltini \
+ sw/source/filter/basflt/iodetect \
+ sw/source/filter/basflt/shellio \
+ sw/source/filter/html/SwAppletImpl \
+ sw/source/filter/html/css1atr \
+ sw/source/filter/html/css1kywd \
+ sw/source/filter/html/htmlatr \
+ sw/source/filter/html/htmlbas \
+ sw/source/filter/html/htmlcss1 \
+ sw/source/filter/html/htmlctxt \
+ sw/source/filter/html/htmldraw \
+ sw/source/filter/html/htmlfld \
+ sw/source/filter/html/htmlfldw \
+ sw/source/filter/html/htmlfly \
+ sw/source/filter/html/htmlflyt \
+ sw/source/filter/html/htmlform \
+ sw/source/filter/html/htmlforw \
+ sw/source/filter/html/htmlftn \
+ sw/source/filter/html/htmlgrin \
+ sw/source/filter/html/htmlnum \
+ sw/source/filter/html/htmlplug \
+ sw/source/filter/html/htmlsect \
+ sw/source/filter/html/htmltab \
+ sw/source/filter/html/htmltabw \
+ sw/source/filter/html/parcss1 \
+ sw/source/filter/html/svxcss1 \
+ sw/source/filter/html/swhtml \
+ sw/source/filter/html/wrthtml \
+ sw/source/filter/writer/writer \
+ sw/source/filter/writer/wrt_fn \
+ sw/source/filter/writer/wrtswtbl \
+ sw/source/filter/ww1/fltshell \
+ sw/source/filter/ww1/w1class \
+ sw/source/filter/ww1/w1filter \
+ sw/source/filter/ww1/w1par \
+ sw/source/filter/ww1/w1sprm \
+ sw/source/filter/xml/XMLRedlineImportHelper \
+ sw/source/filter/xml/swxml \
+ sw/source/filter/xml/wrtxml \
+ sw/source/filter/xml/xmlbrsh \
+ sw/source/filter/xml/xmlexp \
+ sw/source/filter/xml/xmlexpit \
+ sw/source/filter/xml/xmlfmt \
+ sw/source/filter/xml/xmlfmte \
+ sw/source/filter/xml/xmlfonte \
+ sw/source/filter/xml/xmlimp \
+ sw/source/filter/xml/xmlimpit \
+ sw/source/filter/xml/xmlitem \
+ sw/source/filter/xml/xmliteme \
+ sw/source/filter/xml/xmlitemi \
+ sw/source/filter/xml/xmlitemm \
+ sw/source/filter/xml/xmlithlp \
+ sw/source/filter/xml/xmlitmpr \
+ sw/source/filter/xml/xmlmeta \
+ sw/source/filter/xml/xmlscript \
+ sw/source/filter/xml/xmltble \
+ sw/source/filter/xml/xmltbli \
+ sw/source/filter/xml/xmltext \
+ sw/source/filter/xml/xmltexte \
+ sw/source/filter/xml/xmltexti \
+ sw/source/ui/app/appenv \
+ sw/source/ui/app/apphdl \
+ sw/source/ui/app/applab \
+ sw/source/ui/app/appopt \
+ sw/source/ui/app/docsh \
+ sw/source/ui/app/docsh2 \
+ sw/source/ui/app/docshdrw \
+ sw/source/ui/app/docshini \
+ sw/source/ui/app/docst \
+ sw/source/ui/app/docstyle \
+ sw/source/ui/app/mainwn \
+ sw/source/ui/app/swdll \
+ sw/source/ui/app/swmodul1 \
+ sw/source/ui/app/swmodule \
+ sw/source/ui/app/swwait \
+ sw/source/ui/cctrl/actctrl \
+ sw/source/ui/cctrl/popbox \
+ sw/source/ui/cctrl/swlbox \
+ sw/source/ui/chrdlg/ccoll \
+ sw/source/ui/config/barcfg \
+ sw/source/ui/config/caption \
+ sw/source/ui/config/cfgitems \
+ sw/source/ui/config/dbconfig \
+ sw/source/ui/config/fontcfg \
+ sw/source/ui/config/modcfg \
+ sw/source/ui/config/prtopt \
+ sw/source/ui/config/uinums \
+ sw/source/ui/config/usrpref \
+ sw/source/ui/config/viewopt \
+ sw/source/ui/dbui/dbmgr \
+ sw/source/ui/dbui/dbtree \
+ sw/source/ui/dbui/dbui \
+ sw/source/ui/dbui/maildispatcher \
+ sw/source/ui/dbui/mailmergechildwindow \
+ sw/source/ui/dbui/mailmergehelper \
+ sw/source/ui/dbui/mmconfigitem \
+ sw/source/ui/dbui/swdbtoolsclient \
+ sw/source/ui/dialog/SwSpellDialogChildWindow \
+ sw/source/ui/dialog/regionsw \
+ sw/source/ui/dialog/swabstdlg \
+ sw/source/ui/dialog/swwrtshitem \
+ sw/source/ui/dochdl/gloshdl \
+ sw/source/ui/dochdl/swdtflvr \
+ sw/source/ui/docvw/AnchorOverlayObject \
+ sw/source/ui/docvw/AnnotationMenuButton \
+ sw/source/ui/docvw/AnnotationWin \
+ sw/source/ui/docvw/PostItMgr \
+ sw/source/ui/docvw/ShadowOverlayObject \
+ sw/source/ui/docvw/SidebarTxtControl \
+ sw/source/ui/docvw/SidebarTxtControlAcc \
+ sw/source/ui/docvw/SidebarWin \
+ sw/source/ui/docvw/SidebarWinAcc \
+ sw/source/ui/docvw/edtdd \
+ sw/source/ui/docvw/edtwin \
+ sw/source/ui/docvw/edtwin2 \
+ sw/source/ui/docvw/edtwin3 \
+ sw/source/ui/docvw/extedit \
+ sw/source/ui/docvw/frmsidebarwincontainer \
+ sw/source/ui/docvw/romenu \
+ sw/source/ui/docvw/srcedtw \
+ sw/source/ui/envelp/envimg \
+ sw/source/ui/envelp/labelcfg \
+ sw/source/ui/envelp/labimg \
+ sw/source/ui/envelp/syncbtn \
+ sw/source/ui/fldui/fldmgr \
+ sw/source/ui/fldui/fldwrap \
+ sw/source/ui/fldui/xfldui \
+ sw/source/ui/frmdlg/colex \
+ sw/source/ui/frmdlg/colmgr \
+ sw/source/ui/frmdlg/frmmgr \
+ sw/source/ui/globdoc/globdoc \
+ sw/source/ui/index/idxmrk \
+ sw/source/ui/index/toxmgr \
+ sw/source/ui/lingu/hhcwrp \
+ sw/source/ui/lingu/hyp \
+ sw/source/ui/lingu/olmenu \
+ sw/source/ui/lingu/sdrhhcwrap \
+ sw/source/ui/misc/glosdoc \
+ sw/source/ui/misc/glshell \
+ sw/source/ui/misc/numberingtypelistbox \
+ sw/source/ui/misc/redlndlg \
+ sw/source/ui/ribbar/conarc \
+ sw/source/ui/ribbar/concustomshape \
+ sw/source/ui/ribbar/conform \
+ sw/source/ui/ribbar/conpoly \
+ sw/source/ui/ribbar/conrect \
+ sw/source/ui/ribbar/drawbase \
+ sw/source/ui/ribbar/dselect \
+ sw/source/ui/ribbar/inputwin \
+ sw/source/ui/ribbar/tblctrl \
+ sw/source/ui/ribbar/tbxanchr \
+ sw/source/ui/ribbar/workctrl \
+ sw/source/ui/shells/annotsh \
+ sw/source/ui/shells/basesh \
+ sw/source/ui/shells/beziersh \
+ sw/source/ui/shells/drawdlg \
+ sw/source/ui/shells/drawsh \
+ sw/source/ui/shells/drformsh \
+ sw/source/ui/shells/drwbassh \
+ sw/source/ui/shells/drwtxtex \
+ sw/source/ui/shells/drwtxtsh \
+ sw/source/ui/shells/frmsh \
+ sw/source/ui/shells/grfsh \
+ sw/source/ui/shells/grfshex \
+ sw/source/ui/shells/langhelper \
+ sw/source/ui/shells/listsh \
+ sw/source/ui/shells/mediash \
+ sw/source/ui/shells/navsh \
+ sw/source/ui/shells/olesh \
+ sw/source/ui/shells/slotadd \
+ sw/source/ui/shells/tabsh \
+ sw/source/ui/shells/textdrw \
+ sw/source/ui/shells/textfld \
+ sw/source/ui/shells/textglos \
+ sw/source/ui/shells/textidx \
+ sw/source/ui/shells/textsh \
+ sw/source/ui/shells/textsh1 \
+ sw/source/ui/shells/textsh2 \
+ sw/source/ui/shells/txtattr \
+ sw/source/ui/shells/txtcrsr \
+ sw/source/ui/shells/txtnum \
+ sw/source/ui/smartmenu/stmenu \
+ sw/source/ui/table/chartins \
+ sw/source/ui/table/swtablerep \
+ sw/source/ui/table/tablemgr \
+ sw/source/ui/uiview/formatclipboard \
+ sw/source/ui/uiview/pview \
+ sw/source/ui/uiview/scroll \
+ sw/source/ui/uiview/srcview \
+ sw/source/ui/uiview/swcli \
+ sw/source/ui/uiview/uivwimp \
+ sw/source/ui/uiview/view \
+ sw/source/ui/uiview/view0 \
+ sw/source/ui/uiview/view1 \
+ sw/source/ui/uiview/view2 \
+ sw/source/ui/uiview/viewcoll \
+ sw/source/ui/uiview/viewdlg \
+ sw/source/ui/uiview/viewdlg2 \
+ sw/source/ui/uiview/viewdraw \
+ sw/source/ui/uiview/viewling \
+ sw/source/ui/uiview/viewmdi \
+ sw/source/ui/uiview/viewport \
+ sw/source/ui/uiview/viewprt \
+ sw/source/ui/uiview/viewsrch \
+ sw/source/ui/uiview/viewstat \
+ sw/source/ui/uiview/viewtab \
+ sw/source/ui/uno/RefreshListenerContainer \
+ sw/source/ui/uno/SwXDocumentSettings \
+ sw/source/ui/uno/SwXFilterOptions \
+ sw/source/ui/uno/dlelstnr \
+ sw/source/ui/uno/unoatxt \
+ sw/source/ui/uno/unodefaults \
+ sw/source/ui/uno/unodispatch \
+ sw/source/ui/uno/unodoc \
+ sw/source/ui/uno/unofreg \
+ sw/source/ui/uno/unomailmerge \
+ sw/source/ui/uno/unomod \
+ sw/source/ui/uno/unomodule \
+ sw/source/ui/uno/unotxdoc \
+ sw/source/ui/uno/unotxvw \
+ sw/source/ui/utlui/attrdesc \
+ sw/source/ui/utlui/bookctrl \
+ sw/source/ui/utlui/condedit \
+ sw/source/ui/utlui/content \
+ sw/source/ui/utlui/glbltree \
+ sw/source/ui/utlui/gloslst \
+ sw/source/ui/utlui/initui \
+ sw/source/ui/utlui/navicfg \
+ sw/source/ui/utlui/navipi \
+ sw/source/ui/utlui/numfmtlb \
+ sw/source/ui/utlui/prcntfld \
+ sw/source/ui/utlui/shdwcrsr \
+ sw/source/ui/utlui/textcontrolcombo \
+ sw/source/ui/utlui/tmplctrl \
+ sw/source/ui/utlui/uiitems \
+ sw/source/ui/utlui/uitool \
+ sw/source/ui/utlui/unotools \
+ sw/source/ui/utlui/viewlayoutctrl \
+ sw/source/ui/utlui/zoomctrl \
+ sw/source/ui/web/wdocsh \
+ sw/source/ui/web/wformsh \
+ sw/source/ui/web/wfrmsh \
+ sw/source/ui/web/wgrfsh \
+ sw/source/ui/web/wlistsh \
+ sw/source/ui/web/wolesh \
+ sw/source/ui/web/wtabsh \
+ sw/source/ui/web/wtextsh \
+ sw/source/ui/web/wview \
+ sw/source/ui/wrtsh/delete \
+ sw/source/ui/wrtsh/move \
+ sw/source/ui/wrtsh/navmgr \
+ sw/source/ui/wrtsh/select \
+ sw/source/ui/wrtsh/wrtsh1 \
+ sw/source/ui/wrtsh/wrtsh2 \
+ sw/source/ui/wrtsh/wrtsh3 \
+ sw/source/ui/wrtsh/wrtsh4 \
+ sw/source/ui/wrtsh/wrtundo \
+))
+
+$(eval $(call gb_SdiTarget_SdiTarget,sw/sdi/swslots,sw/sdi/swriter))
+
+$(eval $(call gb_SdiTarget_set_include,sw/sdi/swslots,\
+ -I$(SRCDIR)/sw/inc \
+ -I$(SRCDIR)/sw/sdi \
+ $$(INCLUDE) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/qa/complex/accessibility/makefile.mk b/sw/Library_swd.mk
index 937f023ed04d..a0dcfaf29c3a 100644
--- a/sw/qa/complex/accessibility/makefile.mk
+++ b/sw/Library_swd.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -25,33 +25,48 @@
#
#*************************************************************************
-PRJ = ..$/..$/..
-TARGET = AccessibleRelationSet
-PRJNAME = sw
-PACKAGE = complex$/accessibility
+$(eval $(call gb_Library_Library,swd))
-# --- Settings -----------------------------------------------------
+$(eval $(call gb_Library_set_componentfile,swd,sw/util/swd))
-.INCLUDE: settings.mk
+$(eval $(call gb_Library_set_include,swd,\
+ $$(INCLUDE) \
+ -I$(WORKDIR)/inc/sw/sdi \
+ -I$(WORKDIR)/inc/sw \
+ -I$(SRCDIR)/sw/inc \
+ -I$(SRCDIR)/sw/inc/pch \
+ -I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/source/filter/inc \
+ -I$(SRCDIR)/sw/source/ui/inc \
+ -I$(OUTDIR)/inc/offuh \
+))
-#----- compile .java files -----------------------------------------
+$(eval $(call gb_Library_set_defs,swd,\
+ $$(DEFS) \
+))
-JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-JAVAFILES = AccessibleRelationSet.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+$(eval $(call gb_Library_add_linked_libs,swd,\
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ sfx \
+ sot \
+ svl \
+ svt \
+ tl \
+ ucbhelper \
+ utl \
+ vcl \
+ $(gb_STDLIBS) \
+))
-#----- make a jar from compiled files ------------------------------
+$(eval $(call gb_Library_add_exception_objects,swd,\
+ sw/source/core/except/errhdl \
+ sw/source/filter/basflt/iodetect \
+ sw/source/ui/uno/detreg \
+ sw/source/ui/uno/swdet2 \
+ sw/source/ui/uno/swdetect \
+))
-MAXLINELENGTH = 100000
-
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-
-run:
- +java -cp $(CLASSPATH) org.openoffice.Runner -TimeOut 0 -tb java_complex -o $(PACKAGE:s#$/#.#).$(JAVAFILES:b)
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk
new file mode 100644
index 000000000000..10233944ba9c
--- /dev/null
+++ b/sw/Library_swui.mk
@@ -0,0 +1,168 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 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.
+#
+#*************************************************************************
+
+$(eval $(call gb_Library_Library,swui))
+
+$(eval $(call gb_Library_set_include,swui,\
+ -I$(SRCDIR)/sw/inc \
+ -I$(SRCDIR)/sw/inc/pch \
+ -I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/source/filter/inc \
+ -I$(SRCDIR)/sw/source/ui/inc \
+ -I$(WORKDIR)/SdiTarget/sw/sdi \
+ -I$(WORKDIR)/Misc/sw \
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc/offuh \
+))
+
+$(eval $(call gb_Library_set_defs,swui,\
+ $$(DEFS) \
+))
+
+$(eval $(call gb_Library_add_linked_libs,swui,\
+ comphelper \
+ cppu \
+ cppuhelper \
+ editeng \
+ i18nisolang1 \
+ msfilter \
+ sal \
+ sfx \
+ sot \
+ svl \
+ svt \
+ svx \
+ svx \
+ svxcore \
+ sw \
+ tk \
+ tl \
+ ucbhelper \
+ utl \
+ vcl \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Library_add_exception_objects,swui,\
+ sw/source/core/undo/SwRewriter \
+ sw/source/ui/chrdlg/break \
+ sw/source/ui/chrdlg/chardlg \
+ sw/source/ui/chrdlg/drpcps \
+ sw/source/ui/chrdlg/numpara \
+ sw/source/ui/chrdlg/pardlg \
+ sw/source/ui/chrdlg/swuiccoll \
+ sw/source/ui/chrdlg/tblnumfm \
+ sw/source/ui/config/mailconfigpage \
+ sw/source/ui/config/optcomp \
+ sw/source/ui/config/optload \
+ sw/source/ui/config/optpage \
+ sw/source/ui/dbui/addresslistdialog \
+ sw/source/ui/dbui/createaddresslistdialog \
+ sw/source/ui/dbui/customizeaddresslistdialog \
+ sw/source/ui/dbui/dbinsdlg \
+ sw/source/ui/dbui/dbtablepreviewdialog \
+ sw/source/ui/dbui/mailmergewizard \
+ sw/source/ui/dbui/mmaddressblockpage \
+ sw/source/ui/dbui/mmdocselectpage \
+ sw/source/ui/dbui/mmgreetingspage \
+ sw/source/ui/dbui/mmlayoutpage \
+ sw/source/ui/dbui/mmmergepage \
+ sw/source/ui/dbui/mmoutputpage \
+ sw/source/ui/dbui/mmoutputtypepage \
+ sw/source/ui/dbui/mmpreparemergepage \
+ sw/source/ui/dbui/selectdbtabledialog \
+ sw/source/ui/dialog/abstract \
+ sw/source/ui/dialog/addrdlg \
+ sw/source/ui/dialog/ascfldlg \
+ sw/source/ui/dialog/docstdlg \
+ sw/source/ui/dialog/macassgn \
+ sw/source/ui/dialog/swdialmgr \
+ sw/source/ui/dialog/swdlgfact \
+ sw/source/ui/dialog/swuiexp \
+ sw/source/ui/dialog/uiregionsw \
+ sw/source/ui/dialog/wordcountdialog \
+ sw/source/ui/dochdl/selglos \
+ sw/source/ui/envelp/envfmt \
+ sw/source/ui/envelp/envlop1 \
+ sw/source/ui/envelp/envprt \
+ sw/source/ui/envelp/label1 \
+ sw/source/ui/envelp/labelexp \
+ sw/source/ui/envelp/labfmt \
+ sw/source/ui/envelp/labprt \
+ sw/source/ui/envelp/mailmrge \
+ sw/source/ui/fldui/DropDownFieldDialog \
+ sw/source/ui/fldui/FldRefTreeListBox \
+ sw/source/ui/fldui/changedb \
+ sw/source/ui/fldui/flddb \
+ sw/source/ui/fldui/flddinf \
+ sw/source/ui/fldui/flddok \
+ sw/source/ui/fldui/fldedt \
+ sw/source/ui/fldui/fldfunc \
+ sw/source/ui/fldui/fldpage \
+ sw/source/ui/fldui/fldref \
+ sw/source/ui/fldui/fldtdlg \
+ sw/source/ui/fldui/fldvar \
+ sw/source/ui/fldui/inpdlg \
+ sw/source/ui/fldui/javaedit \
+ sw/source/ui/fmtui/tmpdlg \
+ sw/source/ui/frmdlg/column \
+ sw/source/ui/frmdlg/cption \
+ sw/source/ui/frmdlg/frmdlg \
+ sw/source/ui/frmdlg/frmpage \
+ sw/source/ui/frmdlg/pattern \
+ sw/source/ui/frmdlg/uiborder \
+ sw/source/ui/frmdlg/wrap \
+ sw/source/ui/index/cntex \
+ sw/source/ui/index/cnttab \
+ sw/source/ui/index/multmrk \
+ sw/source/ui/index/swuiidxmrk \
+ sw/source/ui/misc/bookmark \
+ sw/source/ui/misc/docfnote \
+ sw/source/ui/misc/glosbib \
+ sw/source/ui/misc/glossary \
+ sw/source/ui/misc/insfnote \
+ sw/source/ui/misc/insrule \
+ sw/source/ui/misc/linenum \
+ sw/source/ui/misc/num \
+ sw/source/ui/misc/outline \
+ sw/source/ui/misc/pgfnote \
+ sw/source/ui/misc/pggrid \
+ sw/source/ui/misc/srtdlg \
+ sw/source/ui/misc/swmodalredlineacceptdlg \
+ sw/source/ui/misc/titlepage \
+ sw/source/ui/table/colwd \
+ sw/source/ui/table/convert \
+ sw/source/ui/table/instable \
+ sw/source/ui/table/mergetbl \
+ sw/source/ui/table/rowht \
+ sw/source/ui/table/splittbl \
+ sw/source/ui/table/tabledlg \
+ sw/source/ui/table/tautofmt \
+ sw/source/ui/utlui/swrenamexnameddlg \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Library_vbaswobj.mk b/sw/Library_vbaswobj.mk
new file mode 100644
index 000000000000..eccaa8ef0497
--- /dev/null
+++ b/sw/Library_vbaswobj.mk
@@ -0,0 +1,147 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 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.
+#
+#*************************************************************************
+
+$(eval $(call gb_Library_Library,vbaswobj))
+
+$(eval $(call gb_Library_set_componentfile,vbaswobj,sw/util/vbaswobj))
+
+$(eval $(call gb_Library_set_include,vbaswobj,\
+ -I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/source/filter/inc \
+ -I$(SRCDIR)/sw/source/ui/inc \
+ -I$(SRCDIR)/sw/inc/pch \
+ -I$(SRCDIR)/sw/inc \
+ -I$(WORKDIR)/Misc/sw/ \
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc/offuh \
+ -I$(OUTDIR)/inc/ \
+))
+
+$(eval $(call gb_Library_add_linked_libs,vbaswobj,\
+ comphelper \
+ cppu \
+ cppuhelper \
+ editeng \
+ i18nisolang1 \
+ sal \
+ sb \
+ sfx \
+ svl \
+ svt \
+ svx \
+ svxcore \
+ sw \
+ tk \
+ tl \
+ utl \
+ vbahelper \
+ vcl \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Library_add_exception_objects,vbaswobj,\
+ sw/source/ui/vba/service \
+ sw/source/ui/vba/vbarange \
+ sw/source/ui/vba/vbacell \
+ sw/source/ui/vba/vbacells \
+ sw/source/ui/vba/vbacolumn \
+ sw/source/ui/vba/vbacolumns \
+ sw/source/ui/vba/vbaframe \
+ sw/source/ui/vba/vbaframes \
+ sw/source/ui/vba/vbalistformat \
+ sw/source/ui/vba/vbalistgallery \
+ sw/source/ui/vba/vbalistgalleries \
+ sw/source/ui/vba/vbalisthelper \
+ sw/source/ui/vba/vbalistlevel \
+ sw/source/ui/vba/vbalistlevels \
+ sw/source/ui/vba/vbalisttemplate \
+ sw/source/ui/vba/vbalisttemplates \
+ sw/source/ui/vba/vbarevision \
+ sw/source/ui/vba/vbarevisions \
+ sw/source/ui/vba/vbarow \
+ sw/source/ui/vba/vbarows \
+ sw/source/ui/vba/vbadocument \
+ sw/source/ui/vba/vbasections \
+ sw/source/ui/vba/vbadialog \
+ sw/source/ui/vba/vbawrapformat \
+ sw/source/ui/vba/vbafont \
+ sw/source/ui/vba/vbarangehelper \
+ sw/source/ui/vba/vbaaddin \
+ sw/source/ui/vba/vbaautotextentry \
+ sw/source/ui/vba/vbadocumentproperties \
+ sw/source/ui/vba/vbaeventshelper \
+ sw/source/ui/vba/vbastyle \
+ sw/source/ui/vba/vbapane \
+ sw/source/ui/vba/vbaglobals \
+ sw/source/ui/vba/vbatemplate \
+ sw/source/ui/vba/vbaaddins \
+ sw/source/ui/vba/vbaview \
+ sw/source/ui/vba/vbaheaderfooter \
+ sw/source/ui/vba/vbaheadersfooters \
+ sw/source/ui/vba/vbaheaderfooterhelper \
+ sw/source/ui/vba/vbabookmarks \
+ sw/source/ui/vba/vbaoptions \
+ sw/source/ui/vba/vbadialogs \
+ sw/source/ui/vba/vbapalette \
+ sw/source/ui/vba/vbaparagraph \
+ sw/source/ui/vba/vbafind \
+ sw/source/ui/vba/vbasection \
+ sw/source/ui/vba/vbabookmark \
+ sw/source/ui/vba/vbaapplication \
+ sw/source/ui/vba/vbawindow \
+ sw/source/ui/vba/vbareplacement \
+ sw/source/ui/vba/vbatable \
+ sw/source/ui/vba/vbatablehelper \
+ sw/source/ui/vba/vbatabstop \
+ sw/source/ui/vba/vbatabstops \
+ sw/source/ui/vba/vbaselection \
+ sw/source/ui/vba/vbasystem \
+ sw/source/ui/vba/vbainformationhelper \
+ sw/source/ui/vba/vbapagesetup \
+ sw/source/ui/vba/vbafield \
+ sw/source/ui/vba/vbatables \
+ sw/source/ui/vba/vbatableofcontents \
+ sw/source/ui/vba/vbatablesofcontents \
+ sw/source/ui/vba/vbavariable \
+ sw/source/ui/vba/vbadocuments \
+ sw/source/ui/vba/vbaparagraphformat \
+ sw/source/ui/vba/vbaborders \
+ sw/source/ui/vba/vbavariables \
+ sw/source/ui/vba/vbastyles \
+ sw/source/ui/vba/vbapanes \
+ sw/source/ui/vba/wordvbahelper \
+))
+
+ifeq ($(OS),LINUX)
+$(eval $(call gb_Library_set_ldflags,vbaswobj,\
+ $$(LDFLAGS) \
+ -Wl$(COMMA)-O1 \
+ -Wl$(COMMA)-z$(COMMA)noexecstack \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/inc/sw.mk b/sw/Makefile
index c7ba1233d708..a79aff831024 100644
--- a/sw/inc/sw.mk
+++ b/sw/Makefile
@@ -25,17 +25,14 @@
#
#*************************************************************************
-# Bereiche aktivieren
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
-CDEFS+=-DACCESSIBLE_LAYOUT
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
-# define SW_DLLIMPLEMENTATION (see @ swdllapi.h)
-.IF "$(MAKING_LIBMSWORD)" != "TRUE"
-CDEFS += -DSW_DLLIMPLEMENTATION
-.ENDIF
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
-VISIBILITY_HIDDEN=TRUE
-
-.IF "$(DBG_LEVEL)">="2"
-CFLAGS += $(LIBXML_CFLAGS)
-.ENDIF
+# vim: set noet sw=4 ts=4:
diff --git a/sw/source/ui/inc/makefile.mk b/sw/Module_sw.mk
index cb9b968dcc06..c6257e22fc93 100644
--- a/sw/source/ui/inc/makefile.mk
+++ b/sw/Module_sw.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -25,18 +25,23 @@
#
#*************************************************************************
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=uiinc
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-LOCALIZE_ME=swmn_tmpl.hrc toolbox_tmpl.hrc
-
-.INCLUDE : target.mk
-
+$(eval $(call gb_Module_Module,sw))
+
+$(eval $(call gb_Module_add_targets,sw,\
+ AllLangResTarget_sw \
+ Library_msword \
+ Library_sw \
+ Library_swd \
+ Library_swui \
+ Library_vbaswobj \
+ Package_misc \
+ Package_uiconfig \
+ Package_xml \
+))
+
+$(eval $(call gb_Module_add_subsequentcheck_targets,sw,\
+ JunitTest_sw_complex \
+ JunitTest_sw_unoapi \
+))
+
+# vim: set noet ts=4 sw=4:
diff --git a/sw/source/core/inc/makefile.mk b/sw/Package_misc.mk
index 1b35ca49549d..60f721be4322 100644
--- a/sw/source/core/inc/makefile.mk
+++ b/sw/Package_misc.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -24,3 +24,7 @@
# for a copy of the LGPLv3 License.
#
#*************************************************************************
+
+$(eval $(call gb_Package_Package,sw_misc,$(SRCDIR)/sw/misc))
+# TODO:
+#COPY sw/unxlngx6.pro/misc/swslots_sid.hid unxlngx6.pro/bin/hid/swslots_sid.hid
diff --git a/sw/Package_uiconfig.mk b/sw/Package_uiconfig.mk
new file mode 100644
index 000000000000..2cad9784eb92
--- /dev/null
+++ b/sw/Package_uiconfig.mk
@@ -0,0 +1,261 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 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.
+#
+#*************************************************************************
+
+$(eval $(call gb_Package_Package,sw_uiconfig,$(SRCDIR)/sw/uiconfig))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/menubar/menubar.xml,sglobal/menubar/menubar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/statusbar/statusbar.xml,sglobal/statusbar/statusbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/alignmentbar.xml,sglobal/toolbar/alignmentbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/arrowshapes.xml,sglobal/toolbar/arrowshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/basicshapes.xml,sglobal/toolbar/basicshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/bezierobjectbar.xml,sglobal/toolbar/bezierobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/calloutshapes.xml,sglobal/toolbar/calloutshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/colorbar.xml,sglobal/toolbar/colorbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/drawbar.xml,sglobal/toolbar/drawbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/drawingobjectbar.xml,sglobal/toolbar/drawingobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/drawtextobjectbar.xml,sglobal/toolbar/drawtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/extrusionobjectbar.xml,sglobal/toolbar/extrusionobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/findbar.xml,sglobal/toolbar/findbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/flowchartshapes.xml,sglobal/toolbar/flowchartshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/fontworkobjectbar.xml,sglobal/toolbar/fontworkobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/fontworkshapetype.xml,sglobal/toolbar/fontworkshapetype.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/formcontrols.xml,sglobal/toolbar/formcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/formdesign.xml,sglobal/toolbar/formdesign.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/formsfilterbar.xml,sglobal/toolbar/formsfilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/formsnavigationbar.xml,sglobal/toolbar/formsnavigationbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/formtextobjectbar.xml,sglobal/toolbar/formtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/frameobjectbar.xml,sglobal/toolbar/frameobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/fullscreenbar.xml,sglobal/toolbar/fullscreenbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/graffilterbar.xml,sglobal/toolbar/graffilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/graphicobjectbar.xml,sglobal/toolbar/graphicobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/insertbar.xml,sglobal/toolbar/insertbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/insertobjectbar.xml,sglobal/toolbar/insertobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/mediaobjectbar.xml,sglobal/toolbar/mediaobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/moreformcontrols.xml,sglobal/toolbar/moreformcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/numobjectbar.xml,sglobal/toolbar/numobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/oleobjectbar.xml,sglobal/toolbar/oleobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/optimizetablebar.xml,sglobal/toolbar/optimizetablebar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/previewobjectbar.xml,sglobal/toolbar/previewobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/standardbar.xml,sglobal/toolbar/standardbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/starshapes.xml,sglobal/toolbar/starshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/symbolshapes.xml,sglobal/toolbar/symbolshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/tableobjectbar.xml,sglobal/toolbar/tableobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/textobjectbar.xml,sglobal/toolbar/textobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/toolbar.xml,sglobal/toolbar/toolbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sglobal/toolbar/viewerbar.xml,sglobal/toolbar/viewerbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/menubar/menubar.xml,sweb/menubar/menubar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/statusbar/statusbar.xml,sweb/statusbar/statusbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/arrowshapes.xml,sweb/toolbar/arrowshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/basicshapes.xml,sweb/toolbar/basicshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/bezierobjectbar.xml,sweb/toolbar/bezierobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/calloutshapes.xml,sweb/toolbar/calloutshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/colorbar.xml,sweb/toolbar/colorbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/drawingobjectbar.xml,sweb/toolbar/drawingobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/drawtextobjectbar.xml,sweb/toolbar/drawtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/extrusionobjectbar.xml,sweb/toolbar/extrusionobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/findbar.xml,sweb/toolbar/findbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/flowchartshapes.xml,sweb/toolbar/flowchartshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/fontworkobjectbar.xml,sweb/toolbar/fontworkobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/fontworkshapetype.xml,sweb/toolbar/fontworkshapetype.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/formcontrols.xml,sweb/toolbar/formcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/formdesign.xml,sweb/toolbar/formdesign.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/formsfilterbar.xml,sweb/toolbar/formsfilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/formsnavigationbar.xml,sweb/toolbar/formsnavigationbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/formtextobjectbar.xml,sweb/toolbar/formtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/frameobjectbar.xml,sweb/toolbar/frameobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/fullscreenbar.xml,sweb/toolbar/fullscreenbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/graffilterbar.xml,sweb/toolbar/graffilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/graphicobjectbar.xml,sweb/toolbar/graphicobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/insertbar.xml,sweb/toolbar/insertbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/mediaobjectbar.xml,sweb/toolbar/mediaobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/numobjectbar.xml,sweb/toolbar/numobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/oleobjectbar.xml,sweb/toolbar/oleobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/optimizetablebar.xml,sweb/toolbar/optimizetablebar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/previewobjectbar.xml,sweb/toolbar/previewobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/standardbar.xml,sweb/toolbar/standardbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/starshapes.xml,sweb/toolbar/starshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/symbolshapes.xml,sweb/toolbar/symbolshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/tableobjectbar.xml,sweb/toolbar/tableobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/textobjectbar.xml,sweb/toolbar/textobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/toolbar.xml,sweb/toolbar/toolbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/sweb/toolbar/viewerbar.xml,sweb/toolbar/viewerbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/menubar/menubar.xml,swform/menubar/menubar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/statusbar/statusbar.xml,swform/statusbar/statusbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/alignmentbar.xml,swform/toolbar/alignmentbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/arrowshapes.xml,swform/toolbar/arrowshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/basicshapes.xml,swform/toolbar/basicshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/bezierobjectbar.xml,swform/toolbar/bezierobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/calloutshapes.xml,swform/toolbar/calloutshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/colorbar.xml,swform/toolbar/colorbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/drawbar.xml,swform/toolbar/drawbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/drawingobjectbar.xml,swform/toolbar/drawingobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/drawtextobjectbar.xml,swform/toolbar/drawtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/extrusionobjectbar.xml,swform/toolbar/extrusionobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/flowchartshapes.xml,swform/toolbar/flowchartshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/fontworkobjectbar.xml,swform/toolbar/fontworkobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/fontworkshapetype.xml,swform/toolbar/fontworkshapetype.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/formcontrols.xml,swform/toolbar/formcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/formdesign.xml,swform/toolbar/formdesign.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/formsfilterbar.xml,swform/toolbar/formsfilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/formsnavigationbar.xml,swform/toolbar/formsnavigationbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/formtextobjectbar.xml,swform/toolbar/formtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/frameobjectbar.xml,swform/toolbar/frameobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/fullscreenbar.xml,swform/toolbar/fullscreenbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/graffilterbar.xml,swform/toolbar/graffilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/graphicobjectbar.xml,swform/toolbar/graphicobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/insertbar.xml,swform/toolbar/insertbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/insertobjectbar.xml,swform/toolbar/insertobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/mediaobjectbar.xml,swform/toolbar/mediaobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/moreformcontrols.xml,swform/toolbar/moreformcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/numobjectbar.xml,swform/toolbar/numobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/oleobjectbar.xml,swform/toolbar/oleobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/optimizetablebar.xml,swform/toolbar/optimizetablebar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/previewobjectbar.xml,swform/toolbar/previewobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/standardbar.xml,swform/toolbar/standardbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/starshapes.xml,swform/toolbar/starshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/symbolshapes.xml,swform/toolbar/symbolshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/tableobjectbar.xml,swform/toolbar/tableobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/textobjectbar.xml,swform/toolbar/textobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/toolbar.xml,swform/toolbar/toolbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swform/toolbar/viewerbar.xml,swform/toolbar/viewerbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/menubar/menubar.xml,swreport/menubar/menubar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/statusbar/statusbar.xml,swreport/statusbar/statusbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/alignmentbar.xml,swreport/toolbar/alignmentbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/arrowshapes.xml,swreport/toolbar/arrowshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/basicshapes.xml,swreport/toolbar/basicshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/bezierobjectbar.xml,swreport/toolbar/bezierobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/calloutshapes.xml,swreport/toolbar/calloutshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/colorbar.xml,swreport/toolbar/colorbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/drawbar.xml,swreport/toolbar/drawbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/drawingobjectbar.xml,swreport/toolbar/drawingobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/drawtextobjectbar.xml,swreport/toolbar/drawtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/extrusionobjectbar.xml,swreport/toolbar/extrusionobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/flowchartshapes.xml,swreport/toolbar/flowchartshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/fontworkobjectbar.xml,swreport/toolbar/fontworkobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/fontworkshapetype.xml,swreport/toolbar/fontworkshapetype.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/formcontrols.xml,swreport/toolbar/formcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/formdesign.xml,swreport/toolbar/formdesign.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/formsfilterbar.xml,swreport/toolbar/formsfilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/formsnavigationbar.xml,swreport/toolbar/formsnavigationbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/formtextobjectbar.xml,swreport/toolbar/formtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/frameobjectbar.xml,swreport/toolbar/frameobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/fullscreenbar.xml,swreport/toolbar/fullscreenbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/graffilterbar.xml,swreport/toolbar/graffilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/graphicobjectbar.xml,swreport/toolbar/graphicobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/insertbar.xml,swreport/toolbar/insertbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/insertobjectbar.xml,swreport/toolbar/insertobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/mediaobjectbar.xml,swreport/toolbar/mediaobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/moreformcontrols.xml,swreport/toolbar/moreformcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/numobjectbar.xml,swreport/toolbar/numobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/oleobjectbar.xml,swreport/toolbar/oleobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/optimizetablebar.xml,swreport/toolbar/optimizetablebar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/previewobjectbar.xml,swreport/toolbar/previewobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/standardbar.xml,swreport/toolbar/standardbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/starshapes.xml,swreport/toolbar/starshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/symbolshapes.xml,swreport/toolbar/symbolshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/tableobjectbar.xml,swreport/toolbar/tableobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/textobjectbar.xml,swreport/toolbar/textobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/toolbar.xml,swreport/toolbar/toolbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swreport/toolbar/viewerbar.xml,swreport/toolbar/viewerbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/menubar/menubar.xml,swriter/menubar/menubar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/statusbar/statusbar.xml,swriter/statusbar/statusbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/alignmentbar.xml,swriter/toolbar/alignmentbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/arrowshapes.xml,swriter/toolbar/arrowshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/basicshapes.xml,swriter/toolbar/basicshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/bezierobjectbar.xml,swriter/toolbar/bezierobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/calloutshapes.xml,swriter/toolbar/calloutshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/colorbar.xml,swriter/toolbar/colorbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/drawbar.xml,swriter/toolbar/drawbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/drawingobjectbar.xml,swriter/toolbar/drawingobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/drawtextobjectbar.xml,swriter/toolbar/drawtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/extrusionobjectbar.xml,swriter/toolbar/extrusionobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/findbar.xml,swriter/toolbar/findbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/flowchartshapes.xml,swriter/toolbar/flowchartshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/fontworkobjectbar.xml,swriter/toolbar/fontworkobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/fontworkshapetype.xml,swriter/toolbar/fontworkshapetype.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/formcontrols.xml,swriter/toolbar/formcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/formdesign.xml,swriter/toolbar/formdesign.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/formsfilterbar.xml,swriter/toolbar/formsfilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/formsnavigationbar.xml,swriter/toolbar/formsnavigationbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/formtextobjectbar.xml,swriter/toolbar/formtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/frameobjectbar.xml,swriter/toolbar/frameobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/fullscreenbar.xml,swriter/toolbar/fullscreenbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/graffilterbar.xml,swriter/toolbar/graffilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/graphicobjectbar.xml,swriter/toolbar/graphicobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/insertbar.xml,swriter/toolbar/insertbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/mediaobjectbar.xml,swriter/toolbar/mediaobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/moreformcontrols.xml,swriter/toolbar/moreformcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/numobjectbar.xml,swriter/toolbar/numobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/oleobjectbar.xml,swriter/toolbar/oleobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/optimizetablebar.xml,swriter/toolbar/optimizetablebar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/previewobjectbar.xml,swriter/toolbar/previewobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/standardbar.xml,swriter/toolbar/standardbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/starshapes.xml,swriter/toolbar/starshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/symbolshapes.xml,swriter/toolbar/symbolshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/tableobjectbar.xml,swriter/toolbar/tableobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/textobjectbar.xml,swriter/toolbar/textobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/toolbar.xml,swriter/toolbar/toolbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swriter/toolbar/viewerbar.xml,swriter/toolbar/viewerbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/menubar/menubar.xml,swxform/menubar/menubar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/statusbar/statusbar.xml,swxform/statusbar/statusbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/alignmentbar.xml,swxform/toolbar/alignmentbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/arrowshapes.xml,swxform/toolbar/arrowshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/basicshapes.xml,swxform/toolbar/basicshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/bezierobjectbar.xml,swxform/toolbar/bezierobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/calloutshapes.xml,swxform/toolbar/calloutshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/colorbar.xml,swxform/toolbar/colorbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/drawbar.xml,swxform/toolbar/drawbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/drawingobjectbar.xml,swxform/toolbar/drawingobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/drawtextobjectbar.xml,swxform/toolbar/drawtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/extrusionobjectbar.xml,swxform/toolbar/extrusionobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/findbar.xml,swxform/toolbar/findbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/flowchartshapes.xml,swxform/toolbar/flowchartshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/fontworkobjectbar.xml,swxform/toolbar/fontworkobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/fontworkshapetype.xml,swxform/toolbar/fontworkshapetype.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/formcontrols.xml,swxform/toolbar/formcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/formdesign.xml,swxform/toolbar/formdesign.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/formsfilterbar.xml,swxform/toolbar/formsfilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/formsnavigationbar.xml,swxform/toolbar/formsnavigationbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/formtextobjectbar.xml,swxform/toolbar/formtextobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/frameobjectbar.xml,swxform/toolbar/frameobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/fullscreenbar.xml,swxform/toolbar/fullscreenbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/graffilterbar.xml,swxform/toolbar/graffilterbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/graphicobjectbar.xml,swxform/toolbar/graphicobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/insertbar.xml,swxform/toolbar/insertbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/insertobjectbar.xml,swxform/toolbar/insertobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/mediaobjectbar.xml,swxform/toolbar/mediaobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/moreformcontrols.xml,swxform/toolbar/moreformcontrols.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/numobjectbar.xml,swxform/toolbar/numobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/oleobjectbar.xml,swxform/toolbar/oleobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/optimizetablebar.xml,swxform/toolbar/optimizetablebar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/previewobjectbar.xml,swxform/toolbar/previewobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/standardbar.xml,swxform/toolbar/standardbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/starshapes.xml,swxform/toolbar/starshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/symbolshapes.xml,swxform/toolbar/symbolshapes.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/tableobjectbar.xml,swxform/toolbar/tableobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/textobjectbar.xml,swxform/toolbar/textobjectbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/toolbar.xml,swxform/toolbar/toolbar.xml))
+$(eval $(call gb_Package_add_file,sw_uiconfig,xml/uiconfig/modules/swxform/toolbar/viewerbar.xml,swxform/toolbar/viewerbar.xml))
diff --git a/sw/source/filter/inc/makefile.mk b/sw/Package_xml.mk
index 1b35ca49549d..dee52fdd97f3 100644
--- a/sw/source/filter/inc/makefile.mk
+++ b/sw/Package_xml.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -24,3 +24,6 @@
# for a copy of the LGPLv3 License.
#
#*************************************************************************
+
+$(eval $(call gb_Package_Package,sw_xml,$(SRCDIR)/sw/xml))
+$(eval $(call gb_Package_add_file,sw_xml,xml/writer.xml,writer.xml))
diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx
index 7c4e522daf3b..e8befb722fc0 100644
--- a/sw/inc/EnhancedPDFExportHelper.hxx
+++ b/sw/inc/EnhancedPDFExportHelper.hxx
@@ -149,7 +149,7 @@ class SwTaggedPDFHelper
// This will be incremented for each BeginTag() call.
// It denotes the number of tags to close during EndStructureElements();
- BYTE nEndStructureElement;
+ sal_uInt8 nEndStructureElement;
// If an already existing tag is reopened for follows of flow frames,
// this value stores the tag id which has to be restored.
diff --git a/sw/inc/IDocumentDeviceAccess.hxx b/sw/inc/IDocumentDeviceAccess.hxx
index 6b1a30b8d06f..40c680bb597f 100644
--- a/sw/inc/IDocumentDeviceAccess.hxx
+++ b/sw/inc/IDocumentDeviceAccess.hxx
@@ -130,7 +130,7 @@
@returns
the current PrintData
*/
- virtual SwPrintData* getPrintData() const = 0;
+ virtual const SwPrintData & getPrintData() const = 0;
/** Sets the PrintData
diff --git a/sw/inc/IDocumentFieldsAccess.hxx b/sw/inc/IDocumentFieldsAccess.hxx
index 1f28006ad5a2..4cc0318cd852 100644
--- a/sw/inc/IDocumentFieldsAccess.hxx
+++ b/sw/inc/IDocumentFieldsAccess.hxx
@@ -77,10 +77,10 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; } }
@param rVal the value
@param nMId
- @retval TRUE putting of value was successful
- @retval FALSE else
+ @retval sal_True putting of value was successful
+ @retval sal_False else
*/
- virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, USHORT nWhich) = 0;
+ virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich) = 0;
// Call update of expression fields. All expressions are re-evaluated.
@@ -91,8 +91,8 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; } }
@param pMsgHnt
@param bUpdateTblFlds TRUE: update table fields, too.
- @retval TRUE update was successful
- @retval FALSE else
+ @retval sal_True update was successful
+ @retval sal_False else
*/
virtual bool UpdateFld(SwTxtFld * rDstFmtFld, SwField & rSrcFld, SwMsgPoolItem * pMsgHnt, bool bUpdateTblFlds) = 0;
@@ -118,7 +118,7 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; } }
SwNode (see parameter pChk) is (?) part of the private
data structure of SwDoc and should not be exposed
*/
- virtual bool SetFieldsDirty(bool b, const SwNode* pChk, ULONG nLen) = 0;
+ virtual bool SetFieldsDirty(bool b, const SwNode* pChk, sal_uLong nLen) = 0;
virtual void SetFixFields(bool bOnlyTimeDate, const DateTime* pNewDateTime) = 0;
@@ -127,7 +127,7 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; } }
// (Node [ + ::com::sun::star::ucb::Content]).
// A generated list of all fields may be passed along too
// (if the addreess != 0 and the pointer == 0 a new list will be returned).
- virtual void FldsToCalc(SwCalc& rCalc, ULONG nLastNd, sal_uInt16 nLastCnt) = 0;
+ virtual void FldsToCalc(SwCalc& rCalc, sal_uLong nLastNd, sal_uInt16 nLastCnt) = 0;
virtual void FldsToCalc(SwCalc& rCalc, const _SetGetExpFld& rToThisFld) = 0;
diff --git a/sw/inc/IDocumentLinksAdministration.hxx b/sw/inc/IDocumentLinksAdministration.hxx
index 66a2e4ae0e67..fb3d3c8c89e0 100644
--- a/sw/inc/IDocumentLinksAdministration.hxx
+++ b/sw/inc/IDocumentLinksAdministration.hxx
@@ -53,7 +53,7 @@ namespace sfx2 { class SvLinkSource; class LinkManager; }
/** #i42634# Moved common code of SwReader::Read() and
SwDocShell::UpdateLinks() to new SwDoc::UpdateLinks():
*/
- virtual void UpdateLinks(BOOL bUI) = 0;
+ virtual void UpdateLinks(sal_Bool bUI) = 0;
/** SS fuers Linken von Dokumentteilen / ?? for linking of parts of documents.
*/
diff --git a/sw/inc/IDocumentRedlineAccess.hxx b/sw/inc/IDocumentRedlineAccess.hxx
index 52517e495dfc..ffa24645181b 100644
--- a/sw/inc/IDocumentRedlineAccess.hxx
+++ b/sw/inc/IDocumentRedlineAccess.hxx
@@ -50,7 +50,7 @@
class SwNode;
class String;
-typedef USHORT RedlineMode_t;
+typedef sal_uInt16 RedlineMode_t;
namespace nsRedlineMode_t
{
const RedlineMode_t REDLINE_NONE = 0; // no RedlineMode
@@ -71,7 +71,7 @@ namespace nsRedlineMode_t
const RedlineMode_t REDLINE_DONTCOMBINE_REDLINES = 0x400;
}
-typedef USHORT RedlineType_t;
+typedef sal_uInt16 RedlineType_t;
namespace nsRedlineType_t
{
// Range of RedlineTypes is 0 to 127.
@@ -93,16 +93,16 @@ class IDocumentRedlineAccess
{
// Static helper functions
public:
- static bool IsShowChanges(const USHORT eM)
+ static bool IsShowChanges(const sal_uInt16 eM)
{ return (nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE) == (eM & nsRedlineMode_t::REDLINE_SHOW_MASK); }
- static bool IsHideChanges(const USHORT eM)
+ static bool IsHideChanges(const sal_uInt16 eM)
{ return nsRedlineMode_t::REDLINE_SHOW_INSERT == (eM & nsRedlineMode_t::REDLINE_SHOW_MASK); }
- static bool IsShowOriginal(const USHORT eM)
+ static bool IsShowOriginal(const sal_uInt16 eM)
{ return nsRedlineMode_t::REDLINE_SHOW_DELETE == (eM & nsRedlineMode_t::REDLINE_SHOW_MASK); }
- static bool IsRedlineOn(const USHORT eM)
+ static bool IsRedlineOn(const sal_uInt16 eM)
{ return nsRedlineMode_t::REDLINE_ON == (eM & (nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_IGNORE )); }
public:
@@ -135,7 +135,7 @@ public:
/** Query if redlining is on.
@returns
- </TRUE> if redlining is on </FALSE> otherwise
+ <TRUE/> if redlining is on <FALSE/> otherwise
*/
virtual bool IsRedlineOn() const = 0;
diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx
index 931c2266536d..76e3d977d447 100644
--- a/sw/inc/IDocumentSettingAccess.hxx
+++ b/sw/inc/IDocumentSettingAccess.hxx
@@ -89,7 +89,8 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd
GLOBAL_DOCUMENT_SAVE_LINKS,
LABEL_DOCUMENT,
PURGE_OLE,
- KERN_ASIAN_PUNCTUATION
+ KERN_ASIAN_PUNCTUATION,
+ MATH_BASELINE_ALIGNMENT
};
public:
@@ -128,7 +129,7 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd
a list of forbidden characters.
*/
virtual const com::sun::star::i18n::ForbiddenCharacters*
- getForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ bool bLocaleData ) const = 0;
+ getForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ bool bLocaleData ) const = 0;
/** Set the forbidden characters.
@@ -138,7 +139,7 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd
@param rForbiddenCharacters
[in] the new list of forbidden characters for language lang.
*/
- virtual void setForbiddenCharacters(/*[in]*/ USHORT nLang,
+ virtual void setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang,
/*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters ) = 0;
/** Get the forbidden character table and creates one if necessary.
@@ -209,6 +210,6 @@ protected:
virtual ~IDocumentSettingAccess() {};
};
- #endif // IDOCUMENTSETTINGACCESS_HXX_INCLUDED
+#endif // IDOCUMENTSETTINGACCESS_HXX_INCLUDED
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/IDocumentUndoRedo.hxx b/sw/inc/IDocumentUndoRedo.hxx
index 38e558668858..33ae7efb8e64 100644
--- a/sw/inc/IDocumentUndoRedo.hxx
+++ b/sw/inc/IDocumentUndoRedo.hxx
@@ -30,51 +30,87 @@
#define IDOCUMENTUNDOREDO_HXX_INCLUDED
#include <sal/types.h>
+
#include <swundo.hxx>
-class SwUndoIter;
class SwRewriter;
-class String;
-class SwUndoIds;
class SwNodes;
class SwUndo;
+namespace sw {
+ class RepeatContext;
+}
+
-typedef sal_uInt16 SwUndoNoModifiedPosition;
/** IDocumentUndoRedo
*/
class IDocumentUndoRedo
{
public:
- virtual void SetUndoNoResetModified() = 0;
- virtual bool IsUndoNoResetModified() const = 0;
-
- /** Care for UndoHistory of document.
- UndoHistory is reset at Save, SaveAs, Create ???
+ /** Enable/Disable Undo.
*/
- virtual void DoUndo(bool bUn) = 0;
+ virtual void DoUndo(bool const bDoUndo) = 0;
+ /** Is Undo enabled?
+ */
virtual bool DoesUndo() const = 0;
- /** Concatenate continuous Insert/Delete/Overwrite of characters.
- Default is ::com::sun::star::sdbcx::Group-Undo.
+ /** Enable/Disable Group Undo.
+ This determines whether successive Insert/Delete/Overwrite
+ actions are combined.
*/
- virtual void DoGroupUndo(bool bUn) = 0;
+ virtual void DoGroupUndo(bool const bDoUndo) = 0;
+ /** Is Group Undo enabled?
+ */
virtual bool DoesGroupUndo() const = 0;
- /* Undo:
- 0 last action, else actions until start of parenthesis nUndoId.
- Restored range is set in rUndoRange.
+ /** Enable/Disable Undo for Drawing objects.
+ */
+ virtual void DoDrawUndo(bool const bDoUndo) = 0;
+
+ /** Is Undo for Drawing objects enabled?
+ for Draw-Undo: writer wants to handle actions on Flys on its own.
+ */
+ virtual bool DoesDrawUndo() const = 0;
+
+ /** Set the position at which the document is in the "unmodified" state
+ to the current position in the Undo stack.
+ */
+ virtual void SetUndoNoModifiedPosition() = 0;
+
+ /** Prevent updates to the "unmodified" state position
+ via SetUndoNoResetModified().
+ */
+ virtual void LockUndoNoModifiedPosition() = 0;
+
+ /** Allow updates to the "unmodified" state position
+ via SetUndoNoResetModified().
*/
- virtual bool Undo( SwUndoIter& ) = 0;
+ virtual void UnLockUndoNoModifiedPosition() = 0;
+
+ /** Disable (re)setting the document modified flag on Undo/Redo.
+ */
+ virtual void SetUndoNoResetModified() = 0;
+
+ /** Is setting the document modified flag on Undo/Redo disabled?
+ */
+ virtual bool IsUndoNoResetModified() const = 0;
+
+ /** Execute Undo.
+
+ @return true if executing the last Undo action was successful.
+ */
+ virtual sal_Bool Undo() = 0;
/** Opens undo block.
- @param nUndoId undo ID for the start object
+ @remark StartUndo() and EndUndo() do nothing if !DoesUndo().
+
+ @param nUndoId undo ID for the list action
@param pRewriter rewriter for comments @see SwUndo::GetComment
If the given nUndoId is equal to zero an undo object with ID
@@ -82,95 +118,168 @@ public:
@return the undo ID of the created object
*/
- virtual SwUndoId StartUndo( SwUndoId eUndoId, const SwRewriter * pRewriter) = 0;
+ virtual SwUndoId StartUndo(SwUndoId const eUndoId,
+ SwRewriter const*const pRewriter) = 0;
/**
Closes undo block.
- @param nUndoId undo ID for the closure object
- @param pRewriter rewriter for comments @see SwUndo::GetComment
+ @remark StartUndo() and EndUndo() do nothing if !DoesUndo().
- If the given nUndoId is equal to zero an undo object with ID
- UNDO_START will be generated.
+ @param nUndoId undo ID for the list action
+ @param pRewriter rewriter for comments @see SwUndo::GetComment
- If pRewriter is not equal to zero the given rewriter will be
- set for the generated closure object and the corresponding
- start object. Otherwise an existent rewriter in theIDocumentRedlineAccess
- corresponding start object will be propagated to the generated
- closure object.
+ If the given nUndoId is not UNDO_EMPTY or UNDO_END, the comment of
+ the resulting list action will be set via the nUndoId, applying the
+ given pRewriter (if not 0). Otherwise the comment of the resulting
+ list action is unchanged if it has an UndoId that is not UNDO_START
+ set by StartUndo, and in case the UndoId is UNDO_START the comment
+ of the list action defaults to the comment of the last action
+ contained in the list action.
*/
- virtual SwUndoId EndUndo( SwUndoId eUndoId, const SwRewriter * pRewriter) = 0;
+ virtual SwUndoId EndUndo(SwUndoId const eUndoId,
+ SwRewriter const*const pRewriter) = 0;
/**
- Deletes all UndoObjects (for methods that do something with the Nodes Array
- without corresponding Undo!)
+ Delete all Undo actions.
+ Of course Undo will be disabled during deletion.
*/
virtual void DelAllUndoObj() = 0;
- /** Returns the ID of the last action that can be undone.
- Alternatively USHRT_MAX is filling VARARR with ::com::sun::star::sdbcx::User-UndoIdDs
+ /** Get Id and comment of last Undo action.
+ @param o_pStr if not 0, receives comment of last Undo action.
+ @param o_pId if not 0, receives Id of last Undo action.
+ @return true if there is a Undo action, false if none
+ */
+ virtual bool GetLastUndoInfo(::rtl::OUString *const o_pStr,
+ SwUndoId *const o_pId) const = 0;
+
+ /** Get comments of Undo actions.
+ @return comments of all top-level Undo actions.
*/
- virtual SwUndoId GetUndoIds(String* pStr, SwUndoIds *pUndoIds) const = 0;
+ virtual SwUndoComments_t GetUndoComments() const = 0;
- virtual String GetUndoIdsStr(String* pStr, SwUndoIds *pUndoIds) const = 0;
+ /** Execute Redo.
- /** Are there parentheses with this ID?
+ @return true if executing the first Redo action was successful.
*/
- virtual bool HasUndoId(SwUndoId eId) const = 0;
+ virtual sal_Bool Redo() = 0;
- /* @@@MAINTAINABILITY-HORROR@@@
- Implementation details made public.
- The following three methods are required only for Undo.
- They should not be called otherwise.
+ /** Get comment of first Redo action.
+ @param o_pStr if not 0, receives comment of first Redo action.
+ @return true if there is a Redo action, false if none
*/
- virtual const SwNodes* GetUndoNds() const = 0;
+ virtual bool GetFirstRedoInfo(::rtl::OUString *const o_pStr) const = 0;
- virtual SwUndo* RemoveLastUndo(SwUndoId eUndoId) = 0;
+ /** Get comments of Redo actions.
+ @return comments of all top-level Redo actions.
+ */
+ virtual SwUndoComments_t GetRedoComments() const = 0;
- /** To prevent an undo array overflow when
- doing nested undos, undo may have to be disabled. Undo-intensive
- actions (like auto-format) should check this manually.
+ /** Repeat the last Undo action.
+ @return true if repeating the last Undo Redo action was attempted.
*/
- virtual bool HasTooManyUndos() const = 0;
+ virtual bool Repeat(::sw::RepeatContext & rContext,
+ sal_uInt16 const nRepeatCnt) = 0;
+
+ /** Get Id and comment of last Undo action, if it is Repeat capable.
+ @param o_pStr if not 0, receives comment of last Undo action
+ if it is Repeat capable.
+ @return Id of last Undo action if it is Repeat capable,
+ or UNDO_EMPTY if there is none or it is not Repeat capable.
+ */
+ virtual SwUndoId GetRepeatInfo(::rtl::OUString *const o_pStr) const = 0;
- virtual bool Redo( SwUndoIter& ) = 0;
+ /** Add new Undo action.
+ Takes over ownership of pUndo.
+ @remark calls ClearRedo(), except for UNDO_START/UNDO_END.
+ @remark does nothing if !DoesUndo().
+ */
+ virtual void AppendUndo(SwUndo *const pUndo) = 0;
- /** Return the ID of the last undoable action.
- Fills VARARR with RedoIds if required.
+ /** Delete all Redo actions.
*/
- virtual SwUndoId GetRedoIds( String* pStr, SwUndoIds *pRedoIds) const = 0;
+ virtual void ClearRedo() = 0;
- virtual String GetRedoIdsStr( String* pStr, SwUndoIds *pRedoIds) const = 0;
+ /* Is the given nodes array the Undo nodes array?
+ */
+ virtual bool IsUndoNodes(SwNodes const& rNodes) const = 0;
- virtual bool Repeat( SwUndoIter&, sal_uInt16 nRepeatCnt) = 0;
+protected:
+ virtual ~IDocumentUndoRedo() {};
+};
- /** Return the ID of the last repeatable action.
- Fills VARARR mit RedoIds if required.
- */
- virtual SwUndoId GetRepeatIds( String* pStr, SwUndoIds *pRedoIds) const = 0;
- virtual String GetRepeatIdsStr( String* pStr, SwUndoIds *pRedoIds) const = 0;
+namespace sw {
- /** Internal shortcut for Insert at end.
- */
- virtual void AppendUndo(SwUndo*) = 0;
+class UndoGuard
+{
+public:
- /** Delete all UndoObjects of nUndoPos until the end of the Undo-Array.
- */
- virtual void ClearRedo() = 0;
+ UndoGuard(IDocumentUndoRedo & rUndoRedo)
+ : m_rUndoRedo(rUndoRedo)
+ , m_bUndoWasEnabled(rUndoRedo.DoesUndo())
+ {
+ m_rUndoRedo.DoUndo(false);
+ }
+ ~UndoGuard()
+ {
+ m_rUndoRedo.DoUndo(m_bUndoWasEnabled);
+ }
+
+ bool UndoWasEnabled() const
+ {
+ return m_bUndoWasEnabled;
+ }
+
+private:
+ IDocumentUndoRedo & m_rUndoRedo;
+ bool const m_bUndoWasEnabled;
+};
- /** Manipulates the position of the undo stack which reset the modified flag
- */
- virtual void setUndoNoModifiedPosition( SwUndoNoModifiedPosition ) = 0;
+class GroupUndoGuard
+{
+public:
- /** Gets the position of the undo stack which reset the modified flag
- */
- virtual SwUndoNoModifiedPosition getUndoNoModifiedPosition() const = 0;
+ GroupUndoGuard(IDocumentUndoRedo & rUndoRedo)
+ : m_rUndoRedo(rUndoRedo)
+ , m_bGroupUndoWasEnabled(rUndoRedo.DoesGroupUndo())
+ {
+ m_rUndoRedo.DoGroupUndo(false);
+ }
+ ~GroupUndoGuard()
+ {
+ m_rUndoRedo.DoGroupUndo(m_bGroupUndoWasEnabled);
+ }
+
+private:
+ IDocumentUndoRedo & m_rUndoRedo;
+ bool const m_bGroupUndoWasEnabled;
+};
-protected:
- virtual ~IDocumentUndoRedo() {};
+class DrawUndoGuard
+{
+public:
+
+ DrawUndoGuard(IDocumentUndoRedo & rUndoRedo)
+ : m_rUndoRedo(rUndoRedo)
+ , m_bDrawUndoWasEnabled(rUndoRedo.DoesDrawUndo())
+ {
+ m_rUndoRedo.DoDrawUndo(false);
+ }
+ ~DrawUndoGuard()
+ {
+ m_rUndoRedo.DoDrawUndo(m_bDrawUndoWasEnabled);
+ }
+
+private:
+ IDocumentUndoRedo & m_rUndoRedo;
+ bool const m_bDrawUndoWasEnabled;
};
+
+} // namespace sw
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fmtui/fmtui.src b/sw/inc/IShellCursorSupplier.hxx
index 162959f5992d..a160f43d40dd 100644
--- a/sw/source/ui/fmtui/fmtui.src
+++ b/sw/inc/IShellCursorSupplier.hxx
@@ -24,64 +24,28 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#include "fmtui.hrc"
-#include "globals.hrc"
-
-String STR_FMT_STD
-{
- Text [ en-US ] = "(none)" ;
-};
-String STR_TEMPLATE_WILDCARD
-{
- TEXT = "*.vor" ;
-};
- //String STR_NONAME //!! VB
- //{
- // TEXT = "Unbenannt ";
- // TEXT [English] = "Noname ";
- // TEXT [norwegian] = "Noname ";
- // TEXT [italian] = "Senza nome";
- // TEXT [portuguese_brazilian] = "Semnome ";
- // TEXT [portuguese] = "Semnome ";
- // TEXT [finnish] = "Nimetön ";
- // TEXT [danish] = "Intet navn";
- // TEXT [french] = "Sansnom ";
- // TEXT [swedish] = "Namnlös";
- // TEXT [dutch] = "Naamloos";
- // TEXT [spanish] = "Sin nombre ";
- // TEXT [english_us] = "Noname ";
- //};
-String STR_OVERWRITE
-{
- Text [ en-US ] = "\nAre you sure you want to delete this template?" ;
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+#ifndef ISHELLCURSORSUPPLIER_HXX
+#define ISHELLCURSORSUPPLIER_HXX
+class SwPaM;
+namespace sw {
+/** The Undo actions need to create new Shell cursors.
+ Just creating new SwPaMs in the Undo actions is not sufficient,
+ because only Shell cursors are corrected by doccorr.cxx.
+ */
+class IShellCursorSupplier
+{
+public:
+ virtual ~IShellCursorSupplier() { }
+ virtual SwPaM & CreateNewShellCursor() = 0;
+ virtual SwPaM & GetCurrentShellCursor() = 0;
+};
+} // namespace sw
+#endif // ISHELLCURSORSUPPLIER_HXX
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index 2a3b6d956e13..96c5d74a319e 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -151,7 +151,7 @@ class SwPostItMgr: public SfxListener
SwEditWin* mpEditWin;
std::list< SwSidebarItem*> mvPostItFlds;
std::vector<SwPostItPageItem*> mPages;
- ULONG mnEventId;
+ sal_uLong mnEventId;
bool mbWaitingForCalcRects;
sw::sidebarwindows::SwSidebarWin* mpActivePostIt;
bool mbLayout;
@@ -178,7 +178,7 @@ class SwPostItMgr: public SfxListener
const Rectangle aBorder,
long lNeededHeight);
void CheckForRemovedPostIts();
- bool ArrowEnabled(USHORT aDirection,unsigned long aPage) const;
+ bool ArrowEnabled(sal_uInt16 aDirection,unsigned long aPage) const;
bool BorderOverPageBorder(unsigned long aPage) const;
bool HasScrollbars() const;
void Focus(SfxBroadcaster& rBC);
@@ -238,11 +238,11 @@ class SwPostItMgr: public SfxListener
Rectangle GetTopScrollRect(const unsigned long aPage) const;
bool IsHit(const Point &aPointPixel);
- Color GetArrowColor(USHORT aDirection,unsigned long aPage) const;
+ Color GetArrowColor(sal_uInt16 aDirection,unsigned long aPage) const;
sw::annotation::SwAnnotationWin* GetAnnotationWin(const SwPostItField* pFld) const;
- sw::sidebarwindows::SwSidebarWin* GetNextPostIt( USHORT aDirection,
+ sw::sidebarwindows::SwSidebarWin* GetNextPostIt( sal_uInt16 aDirection,
sw::sidebarwindows::SwSidebarWin* aPostIt);
long GetNextBorder();
diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx
index 83389d6f0442..24f3fd11cc30 100644
--- a/sw/inc/SidebarWin.hxx
+++ b/sw/inc/SidebarWin.hxx
@@ -98,7 +98,7 @@ class SwSidebarWin : public Window
long GetPostItTextHeight();
- void SwitchToPostIt(USHORT aDirection);
+ void SwitchToPostIt(sal_uInt16 aDirection);
virtual void SwitchToFieldPos();
virtual sal_uInt32 MoveCaret() = 0;
@@ -112,7 +112,7 @@ class SwSidebarWin : public Window
virtual Date GetDate() = 0;
virtual Time GetTime() = 0;
- void ExecuteCommand(USHORT nSlot);
+ void ExecuteCommand(sal_uInt16 nSlot);
void InitControls();
void HidePostIt();
void DoResize();
@@ -130,8 +130,8 @@ class SwSidebarWin : public Window
void ResetAttributes();
void SetSidebarPosition(sw::sidebarwindows::SidebarPosition eSidebarPosition);
- void SetReadonly(BOOL bSet);
- BOOL IsReadOnly() { return mbReadonly;}
+ void SetReadonly(sal_Bool bSet);
+ sal_Bool IsReadOnly() { return mbReadonly;}
bool IsPreview() { return nFlags & PB_Preview;}
void SetColor(Color aColorDark,Color aColorLight, Color aColorAnchor);
@@ -201,7 +201,7 @@ class SwSidebarWin : public Window
SwView& mrView;
const SwPostItBits nFlags;
- ULONG mnEventId;
+ sal_uLong mnEventId;
OutlinerView* mpOutlinerView;
Outliner* mpOutliner;
diff --git a/sw/inc/SwAppletImpl.hxx b/sw/inc/SwAppletImpl.hxx
index dcd6d2fad7b7..3c936b3a14f9 100644
--- a/sw/inc/SwAppletImpl.hxx
+++ b/sw/inc/SwAppletImpl.hxx
@@ -58,12 +58,12 @@ class SwApplet_Impl
String sAlt;
public:
- static USHORT GetOptionType( const String& rName, BOOL bApplet );
- SwApplet_Impl( SfxItemPool& rPool, USHORT nWhich1, USHORT nWhich2 );
+ static sal_uInt16 GetOptionType( const String& rName, sal_Bool bApplet );
+ SwApplet_Impl( SfxItemPool& rPool, sal_uInt16 nWhich1, sal_uInt16 nWhich2 );
SwApplet_Impl( SfxItemSet& rSet ): aItemSet ( rSet) {}
~SwApplet_Impl();
void CreateApplet( const String& rCode, const String& rName,
- BOOL bMayScript, const String& rCodeBase,
+ sal_Bool bMayScript, const String& rCodeBase,
const String& rBaseURL );
#ifdef SOLAR_JAVA
sal_Bool CreateApplet( const String& rBaseURL );
diff --git a/sw/inc/SwGetPoolIdFromName.hxx b/sw/inc/SwGetPoolIdFromName.hxx
index 25e1a4181755..f1f91524530e 100644
--- a/sw/inc/SwGetPoolIdFromName.hxx
+++ b/sw/inc/SwGetPoolIdFromName.hxx
@@ -31,7 +31,7 @@
/* When using the NameMapper to translate pool ids to UI or programmatic
* names, this enum is used to define which family is required */
-typedef USHORT SwGetPoolIdFromName;
+typedef sal_uInt16 SwGetPoolIdFromName;
namespace nsSwGetPoolIdFromName
{
diff --git a/sw/inc/SwRewriter.hxx b/sw/inc/SwRewriter.hxx
index 8de178aac4bb..7e581cfcc854 100644
--- a/sw/inc/SwRewriter.hxx
+++ b/sw/inc/SwRewriter.hxx
@@ -31,6 +31,11 @@
#include <vector>
#include <tools/string.hxx>
+#include <swdllapi.h>
+
+extern SW_DLLPUBLIC String const UNDO_ARG1;
+extern SW_DLLPUBLIC String const UNDO_ARG2;
+extern SW_DLLPUBLIC String const UNDO_ARG3;
typedef std::pair<String, String> SwRewriteRule;
diff --git a/sw/inc/SwUndoField.hxx b/sw/inc/SwUndoField.hxx
index b2d8671a8a8b..dceb43a16c69 100644
--- a/sw/inc/SwUndoField.hxx
+++ b/sw/inc/SwUndoField.hxx
@@ -25,18 +25,21 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _SW_UNDO_FIELD_HXX
-#define _SW_UNDO_FIELD_HXX
+#ifndef SW_UNDO_FIELD_HXX
+#define SW_UNDO_FIELD_HXX
#include <undobj.hxx>
+#include <com/sun/star/uno/Any.h>
+
+
class SwDoc;
class SwField;
class SwMsgPoolItem;
class SwUndoField : public SwUndo
{
- ULONG nNodeIndex;
+ sal_uLong nNodeIndex;
xub_StrLen nOffset;
protected:
@@ -52,37 +55,42 @@ class SwUndoFieldFromDoc : public SwUndoField
{
SwField * pOldField, * pNewField;
SwMsgPoolItem * pHnt;
- BOOL bUpdate;
+ sal_Bool bUpdate;
+
+ void DoImpl();
public:
SwUndoFieldFromDoc(const SwPosition & rPos, const SwField & aOldField,
const SwField & aNewField,
- SwMsgPoolItem * pHnt, BOOL bUpdate,
+ SwMsgPoolItem * pHnt, sal_Bool bUpdate,
SwUndoId nId = UNDO_FIELD );
+
virtual ~SwUndoFieldFromDoc();
- virtual void Undo(SwUndoIter & rIt);
- virtual void Redo(SwUndoIter & rIt);
- virtual void Repeat(SwUndoIter & rIt);
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
};
class SwUndoFieldFromAPI : public SwUndoField
{
com::sun::star::uno::Any aOldVal, aNewVal;
- USHORT nWhich;
+ sal_uInt16 nWhich;
+
+ void DoImpl();
public:
SwUndoFieldFromAPI(const SwPosition & rPos,
const com::sun::star::uno::Any & rOldVal,
const com::sun::star::uno::Any & rNewVal,
- USHORT nWhich);
+ sal_uInt16 nWhich);
virtual ~SwUndoFieldFromAPI();
- virtual void Undo(SwUndoIter & rIt);
- virtual void Redo(SwUndoIter & rIt);
- virtual void Repeat(SwUndoIter & rIt);
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
};
-#endif // _SW_UNDO_FIELD_HXX
+#endif // SW_UNDO_FIELD_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/access.hrc b/sw/inc/access.hrc
index b6c6bb30086e..b33b19b814c7 100644
--- a/sw/inc/access.hrc
+++ b/sw/inc/access.hrc
@@ -52,7 +52,20 @@
#define STR_ACCESS_ANNOTATION_BUTTON_NAME (RC_ACCESS_BEGIN + 20)
#define STR_ACCESS_ANNOTATION_BUTTON_DESC (RC_ACCESS_BEGIN + 21)
-#define ACCESS_ACT_END STR_ACCESS_ANNOTATION_BUTTON_DESC
+//IAccessibility2 Implementation 2009-----
+#define STR_ACCESS_PREVIEW_DOC_NAME (RC_ACCESS_BEGIN + 22)
+//#define STR_ACCESS_PREVIEW_DOC_DESC (RC_ACCESS_BEGIN + 23)
+#define STR_ACCESS_PREVIEW_DOC_SUFFIX (RC_ACCESS_BEGIN + 24)
+#define STR_ACCESS_DOC_WORDPROCESSING (RC_ACCESS_BEGIN + 25)
+#define STR_ACCESS_DOC_WORDPROCESSING_READONLY (RC_ACCESS_BEGIN + 26)
+#define STR_ACCESS_COLUMN_WIDTH (RC_ACCESS_BEGIN + 27)
+#define STR_ACCESS_PAGESETUP_SPACING (RC_ACCESS_BEGIN + 28)
+#define STR_ACCESS_SW_CATEGORY (RC_ACCESS_BEGIN + 29)
+#define STR_ACCESS_TL_GLOBAL (RC_ACCESS_BEGIN + 30)
+#define STR_ACCESS_TL_CONTENT (RC_ACCESS_BEGIN + 31)
+//-----IAccessibility2 Implementation 2009
+
+#define ACCESS_ACT_END STR_ACCESS_TL_CONTENT
#if ACCESS_ACT_END > RC_ACCESS_END
#error Resource-Id Ueberlauf in #file, #line
diff --git a/sw/inc/accessibilityoptions.hxx b/sw/inc/accessibilityoptions.hxx
index 445d0c401e00..ff5c934a89da 100644
--- a/sw/inc/accessibilityoptions.hxx
+++ b/sw/inc/accessibilityoptions.hxx
@@ -32,23 +32,23 @@
struct SwAccessibilityOptions
{
- BOOL bIsAlwaysAutoColor :1;
- BOOL bIsStopAnimatedText :1;
- BOOL bIsStopAnimatedGraphics :1;
+ sal_Bool bIsAlwaysAutoColor :1;
+ sal_Bool bIsStopAnimatedText :1;
+ sal_Bool bIsStopAnimatedGraphics :1;
SwAccessibilityOptions() :
- bIsAlwaysAutoColor(FALSE),
- bIsStopAnimatedText(FALSE),
- bIsStopAnimatedGraphics(FALSE) {}
+ bIsAlwaysAutoColor(sal_False),
+ bIsStopAnimatedText(sal_False),
+ bIsStopAnimatedGraphics(sal_False) {}
- inline BOOL IsAlwaysAutoColor() const { return bIsAlwaysAutoColor; }
- inline void SetAlwaysAutoColor( BOOL b ) { bIsAlwaysAutoColor = b; }
+ inline sal_Bool IsAlwaysAutoColor() const { return bIsAlwaysAutoColor; }
+ inline void SetAlwaysAutoColor( sal_Bool b ) { bIsAlwaysAutoColor = b; }
- inline BOOL IsStopAnimatedGraphics() const { return bIsStopAnimatedText;}
- inline void SetStopAnimatedGraphics( BOOL b ) { bIsStopAnimatedText = b; }
+ inline sal_Bool IsStopAnimatedGraphics() const { return bIsStopAnimatedText;}
+ inline void SetStopAnimatedGraphics( sal_Bool b ) { bIsStopAnimatedText = b; }
- inline BOOL IsStopAnimatedText() const { return bIsStopAnimatedGraphics; }
- inline void SetStopAnimatedText( BOOL b ) { bIsStopAnimatedGraphics = b;}
+ inline sal_Bool IsStopAnimatedText() const { return bIsStopAnimatedGraphics; }
+ inline void SetStopAnimatedText( sal_Bool b ) { bIsStopAnimatedGraphics = b;}
};
#endif
diff --git a/sw/inc/acmplwrd.hxx b/sw/inc/acmplwrd.hxx
index 476e72f8ec81..ad7a0de42414 100644
--- a/sw/inc/acmplwrd.hxx
+++ b/sw/inc/acmplwrd.hxx
@@ -44,27 +44,27 @@ class SwAutoCompleteWord
SvPtrarr aLRULst;
SwAutoCompleteWord_Impl* pImpl;
- USHORT nMaxCount, nMinWrdLen;
+ sal_uInt16 nMaxCount, nMinWrdLen;
bool bLockWordLst;
void DocumentDying(const SwDoc& rDoc);
public:
- SwAutoCompleteWord( USHORT nWords = 500, USHORT nMWrdLen = 10 );
+ SwAutoCompleteWord( sal_uInt16 nWords = 500, sal_uInt16 nMWrdLen = 10 );
~SwAutoCompleteWord();
- BOOL InsertWord( const String& rWord, SwDoc& rDoc );
+ sal_Bool InsertWord( const String& rWord, SwDoc& rDoc );
- BOOL GetRange( const String& rWord, USHORT& rStt, USHORT& rEnd ) const;
+ sal_Bool GetRange( const String& rWord, sal_uInt16& rStt, sal_uInt16& rEnd ) const;
- const String& operator[]( USHORT n ) const { return *aWordLst[ n ]; }
+ const String& operator[]( sal_uInt16 n ) const { return *aWordLst[ n ]; }
bool IsLockWordLstLocked() const { return bLockWordLst; }
void SetLockWordLstLocked( bool bFlag ) { bLockWordLst = bFlag; }
- void SetMaxCount( USHORT n );
+ void SetMaxCount( sal_uInt16 n );
- USHORT GetMinWordLen() const { return nMinWrdLen; }
- void SetMinWordLen( USHORT n );
+ sal_uInt16 GetMinWordLen() const { return nMinWrdLen; }
+ void SetMinWordLen( sal_uInt16 n );
const SvStringsISortDtor& GetWordList() const { return aWordLst; }
void CheckChangedList( const SvStringsISortDtor& rNewLst );
diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx
index 4f95403864d5..ebac43554a44 100644
--- a/sw/inc/authfld.hxx
+++ b/sw/inc/authfld.hxx
@@ -25,8 +25,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _AUTHFLD_HXX
-#define _AUTHFLD_HXX
+#ifndef SW_AUTHFLD_HXX
+#define SW_AUTHFLD_HXX
#include "swdllapi.h"
#include <fldbas.hxx>
@@ -38,11 +38,11 @@ class SwAuthDataArr;
class SwAuthEntry
{
String aAuthFields[AUTH_FIELD_END];
- USHORT nRefCount;
+ sal_uInt16 nRefCount;
public:
SwAuthEntry() : nRefCount(0){}
SwAuthEntry( const SwAuthEntry& rCopy );
- BOOL operator==(const SwAuthEntry& rComp);
+ sal_Bool operator==(const SwAuthEntry& rComp);
inline const String& GetAuthorField(ToxAuthorityField ePos)const;
inline void SetAuthorField(ToxAuthorityField ePos,
@@ -50,16 +50,16 @@ public:
void AddRef() { ++nRefCount; }
void RemoveRef() { --nRefCount; }
- USHORT GetRefCount() { return nRefCount; }
+ sal_uInt16 GetRefCount() { return nRefCount; }
};
struct SwTOXSortKey
{
ToxAuthorityField eField;
- BOOL bSortAscending;
+ sal_Bool bSortAscending;
SwTOXSortKey() :
eField(AUTH_FIELD_END),
- bSortAscending(TRUE){}
+ bSortAscending(sal_True){}
};
class SwAuthorityField;
@@ -73,8 +73,8 @@ class SW_DLLPUBLIC SwAuthorityFieldType : public SwFieldType
SortKeyArr* m_pSortKeyArr;
sal_Unicode m_cPrefix;
sal_Unicode m_cSuffix;
- BOOL m_bIsSequence :1;
- BOOL m_bSortByDocument :1;
+ sal_Bool m_bIsSequence :1;
+ sal_Bool m_bSortByDocument :1;
LanguageType m_eLanguage;
String m_sSortAlgorithm;
@@ -89,14 +89,14 @@ public:
virtual SwFieldType* Copy() const;
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
inline void SetDoc(SwDoc* pNewDoc) { m_pDoc = pNewDoc; }
SwDoc* GetDoc(){ return m_pDoc; }
void RemoveField(long nHandle);
long AddField(const String& rFieldContents);
- BOOL AddField(long nHandle);
+ sal_Bool AddField(long nHandle);
void DelSequenceArray()
{
m_SequArr.clear();
@@ -109,13 +109,13 @@ public:
bool ChangeEntryContent(const SwAuthEntry* pNewEntry);
// import interface
- USHORT AppendField(const SwAuthEntry& rInsert);
- long GetHandle(USHORT nPos);
+ sal_uInt16 AppendField(const SwAuthEntry& rInsert);
+ long GetHandle(sal_uInt16 nPos);
- USHORT GetSequencePos(long nHandle);
+ sal_uInt16 GetSequencePos(long nHandle);
- BOOL IsSequence() const {return m_bIsSequence;}
- void SetSequence(BOOL bSet)
+ sal_Bool IsSequence() const {return m_bIsSequence;}
+ void SetSequence(sal_Bool bSet)
{
DelSequenceArray();
m_bIsSequence = bSet;
@@ -129,16 +129,16 @@ public:
sal_Unicode GetPrefix() const { return m_cPrefix;}
sal_Unicode GetSuffix() const { return m_cSuffix;}
- BOOL IsSortByDocument() const {return m_bSortByDocument;}
- void SetSortByDocument(BOOL bSet)
+ sal_Bool IsSortByDocument() const {return m_bSortByDocument;}
+ void SetSortByDocument(sal_Bool bSet)
{
DelSequenceArray();
m_bSortByDocument = bSet;
}
- USHORT GetSortKeyCount() const ;
- const SwTOXSortKey* GetSortKey(USHORT nIdx) const ;
- void SetSortKeys(USHORT nKeyCount, SwTOXSortKey nKeys[]);
+ sal_uInt16 GetSortKeyCount() const ;
+ const SwTOXSortKey* GetSortKey(sal_uInt16 nIdx) const ;
+ void SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey nKeys[]);
//initui.cxx
static const String& GetAuthFieldName(ToxAuthorityField eType);
@@ -156,6 +156,10 @@ class SwAuthorityField : public SwField
{
long m_nHandle;
mutable long m_nTempSequencePos;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
public:
SwAuthorityField(SwAuthorityFieldType* pType, const String& rFieldContents);
SwAuthorityField(SwAuthorityFieldType* pType, long nHandle);
@@ -163,13 +167,11 @@ public:
const String& GetFieldText(ToxAuthorityField eField) const;
- virtual String Expand() const;
- virtual SwField* Copy() const;
virtual void SetPar1(const String& rStr);
virtual SwFieldType* ChgTyp( SwFieldType* );
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
long GetHandle() const { return m_nHandle; }
diff --git a/sw/inc/authratr.hxx b/sw/inc/authratr.hxx
index 7c369a6acecc..b4a3e0dde9b4 100644
--- a/sw/inc/authratr.hxx
+++ b/sw/inc/authratr.hxx
@@ -38,13 +38,13 @@
class SW_DLLPUBLIC AuthorCharAttr
{
public:
- USHORT nItemId;
- USHORT nAttr;
+ sal_uInt16 nItemId;
+ sal_uInt16 nAttr;
ColorData nColor;
AuthorCharAttr();
- inline BOOL operator == ( const AuthorCharAttr& rAttr ) const
+ inline sal_Bool operator == ( const AuthorCharAttr& rAttr ) const
{
return nItemId == rAttr.nItemId && nAttr == rAttr.nAttr &&
nColor == rAttr.nColor;
diff --git a/sw/inc/bparr.hxx b/sw/inc/bparr.hxx
index 32f4e751b5e3..236cc46fc1d0 100644
--- a/sw/inc/bparr.hxx
+++ b/sw/inc/bparr.hxx
@@ -40,19 +40,19 @@ class BigPtrEntry
{
friend class BigPtrArray;
BlockInfo* pBlock;
- USHORT nOffset;
+ sal_uInt16 nOffset;
public:
virtual ~BigPtrEntry() {}
protected:
BigPtrEntry() : pBlock(0), nOffset(0) {}
- inline ULONG GetPos() const;
+ inline sal_uLong GetPos() const;
inline BigPtrArray& GetArray() const;
};
typedef BigPtrEntry* ElementPtr;
-typedef BOOL (*FnForEach)( const ElementPtr&, void* pArgs );
+typedef sal_Bool (*FnForEach)( const ElementPtr&, void* pArgs );
// 1000 entries per Block = a bit less then 4K
#define MAXENTRY 1000
@@ -67,52 +67,51 @@ typedef BOOL (*FnForEach)( const ElementPtr&, void* pArgs );
struct BlockInfo { // block info:
BigPtrArray* pBigArr; // in this array the block is located
ElementPtr* pData; // data block
- ULONG nStart, nEnd; // start- and end index
- USHORT nElem; // number of elements
+ sal_uLong nStart, nEnd; // start- and end index
+ sal_uInt16 nElem; // number of elements
};
class SW_DLLPUBLIC BigPtrArray
{
BlockInfo** ppInf; // block info
- ULONG nSize; // number of elements
- USHORT nMaxBlock; // current max. number of blocks
- USHORT nBlock; // number of blocks
- USHORT nCur; // last block
+ sal_uLong nSize; // number of elements
+ sal_uInt16 nMaxBlock; // current max. number of blocks
+ sal_uInt16 nBlock; // number of blocks
+ sal_uInt16 nCur; // last block
- USHORT Index2Block( ULONG ) const; // block search
- BlockInfo* InsBlock( USHORT ); // insert block
- void BlockDel( USHORT ); // some blocks were deleted
- void UpdIndex( USHORT ); // recalculate indices
+ sal_uInt16 Index2Block( sal_uLong ) const; // block search
+ BlockInfo* InsBlock( sal_uInt16 ); // insert block
+ void BlockDel( sal_uInt16 ); // some blocks were deleted
+ void UpdIndex( sal_uInt16 ); // recalculate indices
protected:
// fill all blocks
// the short parameter specifies in percent, how full the blocks should be
// made
- // the return value specifies that something was done
- USHORT Compress( short = COMPRESSLVL );
+ sal_uInt16 Compress( short = COMPRESSLVL );
public:
BigPtrArray();
~BigPtrArray();
- ULONG Count() const { return nSize; }
+ sal_uLong Count() const { return nSize; }
- void Insert( const ElementPtr& r, ULONG pos );
- void Remove( ULONG pos, ULONG n = 1 );
- void Move( ULONG from, ULONG to );
- void Replace( ULONG pos, const ElementPtr& r);
+ void Insert( const ElementPtr& r, sal_uLong pos );
+ void Remove( sal_uLong pos, sal_uLong n = 1 );
+ void Move( sal_uLong from, sal_uLong to );
+ void Replace( sal_uLong pos, const ElementPtr& r);
- ElementPtr operator[]( ULONG ) const;
+ ElementPtr operator[]( sal_uLong ) const;
void ForEach( FnForEach fn, void* pArgs = NULL )
{
ForEach( 0, nSize, fn, pArgs );
}
- void ForEach( ULONG nStart, ULONG nEnd, FnForEach fn, void* pArgs = NULL );
+ void ForEach( sal_uLong nStart, sal_uLong nEnd, FnForEach fn, void* pArgs = NULL );
};
-inline ULONG BigPtrEntry::GetPos() const
+inline sal_uLong BigPtrEntry::GetPos() const
{
DBG_ASSERT( this == pBlock->pData[ nOffset ], "element not in the block" );
return pBlock->nStart + nOffset;
diff --git a/sw/inc/breakit.hxx b/sw/inc/breakit.hxx
index ac95208423e1..ae05468aa16b 100644
--- a/sw/inc/breakit.hxx
+++ b/sw/inc/breakit.hxx
@@ -109,8 +109,8 @@ public:
return *m_pForbidden;
}
- USHORT GetRealScriptOfText( const String& rTxt, xub_StrLen nPos ) const;
- USHORT GetAllScriptsOfText( const String& rTxt ) const;
+ sal_uInt16 GetRealScriptOfText( const String& rTxt, xub_StrLen nPos ) const;
+ sal_uInt16 GetAllScriptsOfText( const String& rTxt ) const;
};
#define SW_BREAKITER() SwBreakIt::Get()
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index cf39c2518b81..e778e0366007 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -62,16 +62,16 @@ class SW_DLLPUBLIC SwClient
friend class SwClientIter;
SwClient *pLeft, *pRight; // for AVL sorting
- BOOL bModifyLocked : 1; // used in SwModify::Modify,
+ sal_Bool bModifyLocked : 1; // used in SwModify::Modify,
// is really a member of SwModify
// but here for lack of space
- BOOL bInModify : 1; // is in a modify. (Debug!!!)
- BOOL bInDocDTOR : 1; // Doc gets destroyed,
+ sal_Bool bInModify : 1; // is in a modify. (Debug!!!)
+ sal_Bool bInDocDTOR : 1; // Doc gets destroyed,
// do not "unsubscribe"
- BOOL bInCache : 1; // is in BorderAttrCache of the layout,
+ sal_Bool bInCache : 1; // is in BorderAttrCache of the layout,
// unsubscribes itself then in Modify!
- BOOL bInSwFntCache : 1; // is in SwFont cache of the formatting
+ sal_Bool bInSwFntCache : 1; // is in SwFont cache of the formatting
protected:
SwModify *pRegisteredIn;
@@ -90,17 +90,17 @@ public:
//casted typesafely via the dependency list of a Modify
TYPEINFO();
- void LockModify() { bModifyLocked = TRUE; }
- void UnlockModify() { bModifyLocked = FALSE; }
- void SetInCache( BOOL bNew ) { bInCache = bNew; }
- void SetInSwFntCache( BOOL bNew ) { bInSwFntCache = bNew; }
- BOOL IsModifyLocked() const { return bModifyLocked; }
- BOOL IsInDocDTOR() const { return bInDocDTOR; }
- BOOL IsInCache() const { return bInCache; }
- BOOL IsInSwFntCache() const { return bInSwFntCache; }
+ void LockModify() { bModifyLocked = sal_True; }
+ void UnlockModify() { bModifyLocked = sal_False; }
+ void SetInCache( sal_Bool bNew ) { bInCache = bNew; }
+ void SetInSwFntCache( sal_Bool bNew ) { bInSwFntCache = bNew; }
+ sal_Bool IsModifyLocked() const { return bModifyLocked; }
+ sal_Bool IsInDocDTOR() const { return bInDocDTOR; }
+ sal_Bool IsInCache() const { return bInCache; }
+ sal_Bool IsInSwFntCache() const { return bInSwFntCache; }
// get client Information
- virtual BOOL GetInfo( SfxPoolItem& ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
private:
SwClient( const SwClient& );
@@ -109,7 +109,7 @@ private:
inline SwClient::SwClient() :
pLeft(0), pRight(0), pRegisteredIn(0)
-{ bModifyLocked = bInModify = bInDocDTOR = bInCache = bInSwFntCache = FALSE; }
+{ bModifyLocked = bInModify = bInDocDTOR = bInCache = bInSwFntCache = sal_False; }
// ----------
@@ -142,13 +142,13 @@ public:
const SwClient* GetDepends() const { return pRoot; }
// get client information
- virtual BOOL GetInfo( SfxPoolItem& ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
- void SetInDocDTOR() { bInDocDTOR = TRUE; }
+ void SetInDocDTOR() { bInDocDTOR = sal_True; }
- void CheckCaching( const USHORT nWhich );
+ void CheckCaching( const sal_uInt16 nWhich );
- BOOL IsLastDepend() const
+ sal_Bool IsLastDepend() const
{ return pRoot && !pRoot->pLeft && !pRoot->pRight; }
private:
@@ -183,7 +183,7 @@ public:
virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue );
// get Client information
- virtual BOOL GetInfo( SfxPoolItem & ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem & ) const;
private:
// forbidden and not implemented (see @ SwClient).
diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
index 0e13c010d418..69ab36a84e38 100644
--- a/sw/inc/calc.hxx
+++ b/sw/inc/calc.hxx
@@ -131,7 +131,7 @@ public:
virtual ~SwSbxValue();
- BOOL GetBool() const;
+ sal_Bool GetBool() const;
double GetDouble() const;
SwSbxValue& MakeDouble();
@@ -160,9 +160,9 @@ struct SwCalcExp : public SwHash
};
SwHash* Find( const String& rSrch, SwHash** ppTable,
- USHORT nTblSize, USHORT* pPos = 0 );
+ sal_uInt16 nTblSize, sal_uInt16* pPos = 0 );
-void DeleteHashTable( SwHash** ppTable, USHORT nTblSize );
+void DeleteHashTable( SwHash** ppTable, sal_uInt16 nTblSize );
// if _CalcOp != 0, this is a valid operator
struct _CalcOp;
@@ -187,7 +187,7 @@ class SwCalc
const LocaleDataWrapper* pLclData;
CharClass* pCharClass;
- USHORT nListPor;
+ sal_uInt16 nListPor;
SwCalcOper eCurrOper;
SwCalcOper eCurrListOper;
SwCalcError eError;
@@ -198,7 +198,7 @@ class SwCalc
SwSbxValue Term();
SwSbxValue Prim();
- BOOL ParseTime( USHORT*, USHORT*, USHORT* );
+ sal_Bool ParseTime( sal_uInt16*, sal_uInt16*, sal_uInt16* );
String GetColumnName( const String& rName );
String GetDBName( const String& rName );
@@ -212,20 +212,20 @@ public:
~SwCalc();
SwSbxValue Calculate( const String &rStr );
- String GetStrResult( const SwSbxValue& rValue, BOOL bRound = TRUE );
- String GetStrResult( double, BOOL bRound = TRUE );
+ String GetStrResult( const SwSbxValue& rValue, sal_Bool bRound = sal_True );
+ String GetStrResult( double, sal_Bool bRound = sal_True );
SwCalcExp* VarInsert( const String& r );
- SwCalcExp* VarLook( const String &rStr, USHORT ins = 0 );
+ SwCalcExp* VarLook( const String &rStr, sal_uInt16 ins = 0 );
void VarChange( const String& rStr, const SwSbxValue& rValue );
void VarChange( const String& rStr, double );
SwHash** GetVarTable() { return VarTable; }
- BOOL Push( const VoidPtr pPtr );
+ sal_Bool Push( const VoidPtr pPtr );
void Pop( const VoidPtr pPtr );
void SetCalcError( SwCalcError eErr ) { eError = eErr; }
- BOOL IsCalcError() const { return 0 != eError; }
+ sal_Bool IsCalcError() const { return 0 != eError; }
static bool Str2Double( const String& rStr, xub_StrLen& rPos,
double& rVal,
@@ -233,7 +233,7 @@ public:
static bool Str2Double( const String& rStr, xub_StrLen& rPos,
double& rVal, SwDoc *const pDoc );
- SW_DLLPUBLIC static BOOL IsValidVarName( const String& rStr,
+ SW_DLLPUBLIC static sal_Bool IsValidVarName( const String& rStr,
String* pValidName = 0 );
};
diff --git a/sw/inc/ccoll.hxx b/sw/inc/ccoll.hxx
index 5a44c3a2bc5e..35ea265e13d1 100644
--- a/sw/inc/ccoll.hxx
+++ b/sw/inc/ccoll.hxx
@@ -47,8 +47,8 @@
//***********************************************************
struct CollName {
- ULONG nCnd;
- ULONG nSubCond;
+ sal_uLong nCnd;
+ sal_uLong nSubCond;
};
//***********************************************************
@@ -57,8 +57,8 @@ struct CollName {
struct CommandStruct
{
- ULONG nCnd;
- ULONG nSubCond;
+ sal_uLong nCnd;
+ sal_uLong nSubCond;
};
//***********************************************************
@@ -75,7 +75,7 @@ class SW_DLLPUBLIC SwCondCollItem : public SfxPoolItem
String sStyles[COND_COMMAND_COUNT];
public:
- SwCondCollItem(USHORT nWhich = FN_COND_COLL);
+ SwCondCollItem(sal_uInt16 nWhich = FN_COND_COLL);
~SwCondCollItem();
TYPEINFO();
@@ -85,8 +85,8 @@ public:
static const CommandStruct* GetCmds();
- const String& GetStyle(USHORT nPos) const;
- void SetStyle( const String* pStyle, USHORT nPos);
+ const String& GetStyle(sal_uInt16 nPos) const;
+ void SetStyle( const String* pStyle, sal_uInt16 nPos);
};
diff --git a/sw/inc/cellatr.hxx b/sw/inc/cellatr.hxx
index b899c2573780..e081375a5495 100644
--- a/sw/inc/cellatr.hxx
+++ b/sw/inc/cellatr.hxx
@@ -37,10 +37,10 @@
class SW_DLLPUBLIC SwTblBoxNumFormat : public SfxUInt32Item
{
- BOOL bAuto; // automatically given flag
+ sal_Bool bAuto; // automatically given flag
public:
- SwTblBoxNumFormat( UINT32 nFormat = NUMBERFORMAT_TEXT,
- BOOL bAuto = FALSE );
+ SwTblBoxNumFormat( sal_uInt32 nFormat = NUMBERFORMAT_TEXT,
+ sal_Bool bAuto = sal_False );
// "pure virtual methods" of SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
@@ -53,8 +53,8 @@ public:
return *this;
}
- BOOL GetAutoFlag() const { return bAuto; }
- void SetAutoFlag( BOOL bFlag = TRUE ) { bAuto = bFlag; }
+ sal_Bool GetAutoFlag() const { return bAuto; }
+ void SetAutoFlag( sal_Bool bFlag = sal_True ) { bAuto = bFlag; }
};
class SwTblBoxFormula : public SfxPoolItem, public SwTableFormula
@@ -107,20 +107,20 @@ public:
//***************************************************************************
-inline const SwTblBoxNumFormat &SwAttrSet::GetTblBoxNumFmt(BOOL bInP) const
+inline const SwTblBoxNumFormat &SwAttrSet::GetTblBoxNumFmt(sal_Bool bInP) const
{ return (const SwTblBoxNumFormat&)Get( RES_BOXATR_FORMAT,bInP); }
-inline const SwTblBoxFormula &SwAttrSet::GetTblBoxFormula(BOOL bInP) const
+inline const SwTblBoxFormula &SwAttrSet::GetTblBoxFormula(sal_Bool bInP) const
{ return (const SwTblBoxFormula&)Get( RES_BOXATR_FORMULA,bInP); }
-inline const SwTblBoxValue &SwAttrSet::GetTblBoxValue(BOOL bInP) const
+inline const SwTblBoxValue &SwAttrSet::GetTblBoxValue(sal_Bool bInP) const
{ return (const SwTblBoxValue&)Get( RES_BOXATR_VALUE, bInP); }
//***************************************************************************
-inline const SwTblBoxNumFormat &SwFmt::GetTblBoxNumFmt(BOOL bInP) const
+inline const SwTblBoxNumFormat &SwFmt::GetTblBoxNumFmt(sal_Bool bInP) const
{ return aSet.GetTblBoxNumFmt(bInP); }
-inline const SwTblBoxFormula &SwFmt::GetTblBoxFormula(BOOL bInP) const
+inline const SwTblBoxFormula &SwFmt::GetTblBoxFormula(sal_Bool bInP) const
{ return aSet.GetTblBoxFormula(bInP); }
-inline const SwTblBoxValue &SwFmt::GetTblBoxValue(BOOL bInP) const
+inline const SwTblBoxValue &SwFmt::GetTblBoxValue(sal_Bool bInP) const
{ return aSet.GetTblBoxValue(bInP); }
#endif
diff --git a/sw/inc/cellfml.hxx b/sw/inc/cellfml.hxx
index e806e215d5d4..3a8566f14ecc 100644
--- a/sw/inc/cellfml.hxx
+++ b/sw/inc/cellfml.hxx
@@ -44,7 +44,7 @@ class String;
class SwTblCalcPara
{
const SwTableBox* pLastTblBox;
- USHORT nStackCnt, nMaxSize;
+ sal_uInt16 nStackCnt, nMaxSize;
public:
SwTableSortBoxes *pBoxStk; // stack for recognizing recursion
@@ -54,9 +54,9 @@ public:
SwTblCalcPara( SwCalc& rCalculator, const SwTable& rTable );
~SwTblCalcPara();
- bool CalcWithStackOverflow();
- bool IsStackOverFlow() const { return nMaxSize == nStackCnt; }
- bool IncStackCnt() { return nMaxSize == ++nStackCnt; }
+ sal_Bool CalcWithStackOverflow();
+ sal_Bool IsStackOverFlow() const { return nMaxSize == nStackCnt; }
+ sal_Bool IncStackCnt() { return nMaxSize == ++nStackCnt; }
void DecStackCnt() { if( nStackCnt ) --nStackCnt; }
void SetLastTblBox( const SwTableBox* pBox ) { pLastTblBox = pBox; }
};
@@ -99,7 +99,7 @@ protected:
String sFormel; // current formula
NameType eNmType; // current display method
- bool bValidValue; // TRUE: recalculate formula
+ sal_Bool bValidValue; // sal_True: recalculate formula
// find the node in which the formula is located
// TextFeld -> TextNode,
@@ -115,7 +115,7 @@ protected:
*rCalcPara.pTbl, &rCalcPara );
}
- static USHORT GetLnPosInTbl( const SwTable& rTbl, const SwTableBox* pBox );
+ static sal_uInt16 GetLnPosInTbl( const SwTable& rTbl, const SwTableBox* pBox );
public:
@@ -152,7 +152,7 @@ public:
eNmType = EXTRNL_NAME;
}
- USHORT GetBoxesOfFormula( const SwTable& rTbl, SwSelBoxes& rBoxes );
+ sal_uInt16 GetBoxesOfFormula( const SwTable& rTbl, SwSelBoxes& rBoxes );
// are all boxes valid which this formula relies on?
bool HasValidBoxes() const;
};
diff --git a/sw/inc/charatr.hxx b/sw/inc/charatr.hxx
index 5e4a397ea648..ed45ed922c46 100644
--- a/sw/inc/charatr.hxx
+++ b/sw/inc/charatr.hxx
@@ -34,140 +34,140 @@
// implementation of the character attribute methods of SwAttrSet
-inline const SvxPostureItem &SwAttrSet::GetPosture(BOOL bInP) const
+inline const SvxPostureItem &SwAttrSet::GetPosture(sal_Bool bInP) const
{ return (const SvxPostureItem&)Get( RES_CHRATR_POSTURE,bInP); }
-inline const SvxPostureItem &SwAttrSet::GetCJKPosture(BOOL bInP) const
+inline const SvxPostureItem &SwAttrSet::GetCJKPosture(sal_Bool bInP) const
{ return (const SvxPostureItem&)Get( RES_CHRATR_CJK_POSTURE,bInP); }
-inline const SvxPostureItem &SwAttrSet::GetCTLPosture(BOOL bInP) const
+inline const SvxPostureItem &SwAttrSet::GetCTLPosture(sal_Bool bInP) const
{ return (const SvxPostureItem&)Get( RES_CHRATR_CTL_POSTURE,bInP); }
-inline const SvxWeightItem &SwAttrSet::GetWeight(BOOL bInP) const
+inline const SvxWeightItem &SwAttrSet::GetWeight(sal_Bool bInP) const
{ return (const SvxWeightItem&)Get( RES_CHRATR_WEIGHT,bInP); }
-inline const SvxWeightItem &SwAttrSet::GetCJKWeight(BOOL bInP) const
+inline const SvxWeightItem &SwAttrSet::GetCJKWeight(sal_Bool bInP) const
{ return (const SvxWeightItem&)Get( RES_CHRATR_CJK_WEIGHT,bInP); }
-inline const SvxWeightItem &SwAttrSet::GetCTLWeight(BOOL bInP) const
+inline const SvxWeightItem &SwAttrSet::GetCTLWeight(sal_Bool bInP) const
{ return (const SvxWeightItem&)Get( RES_CHRATR_CTL_WEIGHT,bInP); }
-inline const SvxShadowedItem &SwAttrSet::GetShadowed(BOOL bInP) const
+inline const SvxShadowedItem &SwAttrSet::GetShadowed(sal_Bool bInP) const
{ return (const SvxShadowedItem&)Get( RES_CHRATR_SHADOWED,bInP); }
-inline const SvxAutoKernItem &SwAttrSet::GetAutoKern(BOOL bInP) const
+inline const SvxAutoKernItem &SwAttrSet::GetAutoKern(sal_Bool bInP) const
{ return (const SvxAutoKernItem&)Get( RES_CHRATR_AUTOKERN,bInP); }
-inline const SvxWordLineModeItem &SwAttrSet::GetWordLineMode(BOOL bInP) const
+inline const SvxWordLineModeItem &SwAttrSet::GetWordLineMode(sal_Bool bInP) const
{ return (const SvxWordLineModeItem&)Get( RES_CHRATR_WORDLINEMODE,bInP); }
-inline const SvxContourItem &SwAttrSet::GetContour(BOOL bInP) const
+inline const SvxContourItem &SwAttrSet::GetContour(sal_Bool bInP) const
{ return (const SvxContourItem&)Get( RES_CHRATR_CONTOUR,bInP); }
-inline const SvxKerningItem &SwAttrSet::GetKerning(BOOL bInP) const
+inline const SvxKerningItem &SwAttrSet::GetKerning(sal_Bool bInP) const
{ return (const SvxKerningItem&)Get( RES_CHRATR_KERNING,bInP); }
-inline const SvxUnderlineItem &SwAttrSet::GetUnderline(BOOL bInP) const
+inline const SvxUnderlineItem &SwAttrSet::GetUnderline(sal_Bool bInP) const
{ return (const SvxUnderlineItem&)Get( RES_CHRATR_UNDERLINE,bInP); }
-inline const SvxOverlineItem &SwAttrSet::GetOverline(BOOL bInP) const
+inline const SvxOverlineItem &SwAttrSet::GetOverline(sal_Bool bInP) const
{ return (const SvxOverlineItem&)Get( RES_CHRATR_OVERLINE,bInP); }
-inline const SvxCrossedOutItem &SwAttrSet::GetCrossedOut(BOOL bInP) const
+inline const SvxCrossedOutItem &SwAttrSet::GetCrossedOut(sal_Bool bInP) const
{ return (const SvxCrossedOutItem&)Get( RES_CHRATR_CROSSEDOUT,bInP); }
-inline const SvxFontHeightItem &SwAttrSet::GetSize(BOOL bInP) const
+inline const SvxFontHeightItem &SwAttrSet::GetSize(sal_Bool bInP) const
{ return (const SvxFontHeightItem&)Get( RES_CHRATR_FONTSIZE,bInP); }
-inline const SvxFontHeightItem &SwAttrSet::GetCJKSize(BOOL bInP) const
+inline const SvxFontHeightItem &SwAttrSet::GetCJKSize(sal_Bool bInP) const
{ return (const SvxFontHeightItem&)Get( RES_CHRATR_CJK_FONTSIZE,bInP); }
-inline const SvxFontHeightItem &SwAttrSet::GetCTLSize(BOOL bInP) const
+inline const SvxFontHeightItem &SwAttrSet::GetCTLSize(sal_Bool bInP) const
{ return (const SvxFontHeightItem&)Get( RES_CHRATR_CTL_FONTSIZE,bInP); }
-inline const SvxPropSizeItem &SwAttrSet::GetPropSize(BOOL bInP) const
+inline const SvxPropSizeItem &SwAttrSet::GetPropSize(sal_Bool bInP) const
{ return (const SvxPropSizeItem&)Get( RES_CHRATR_PROPORTIONALFONTSIZE,bInP); }
-inline const SvxFontItem &SwAttrSet::GetFont(BOOL bInP) const
+inline const SvxFontItem &SwAttrSet::GetFont(sal_Bool bInP) const
{ return (const SvxFontItem&)Get( RES_CHRATR_FONT,bInP); }
-inline const SvxFontItem &SwAttrSet::GetCJKFont(BOOL bInP) const
+inline const SvxFontItem &SwAttrSet::GetCJKFont(sal_Bool bInP) const
{ return (const SvxFontItem&)Get( RES_CHRATR_CJK_FONT,bInP); }
-inline const SvxFontItem &SwAttrSet::GetCTLFont(BOOL bInP) const
+inline const SvxFontItem &SwAttrSet::GetCTLFont(sal_Bool bInP) const
{ return (const SvxFontItem&)Get( RES_CHRATR_CTL_FONT,bInP); }
-inline const SvxColorItem &SwAttrSet::GetColor(BOOL bInP) const
+inline const SvxColorItem &SwAttrSet::GetColor(sal_Bool bInP) const
{ return (const SvxColorItem&)Get( RES_CHRATR_COLOR,bInP); }
-inline const SvxCharSetColorItem &SwAttrSet::GetCharSetColor(BOOL bInP) const
+inline const SvxCharSetColorItem &SwAttrSet::GetCharSetColor(sal_Bool bInP) const
{ return (const SvxCharSetColorItem&)Get( RES_CHRATR_CHARSETCOLOR,bInP); }
-inline const SvxLanguageItem &SwAttrSet::GetLanguage(BOOL bInP) const
+inline const SvxLanguageItem &SwAttrSet::GetLanguage(sal_Bool bInP) const
{ return (const SvxLanguageItem&)Get( RES_CHRATR_LANGUAGE,bInP); }
-inline const SvxLanguageItem &SwAttrSet::GetCJKLanguage(BOOL bInP) const
+inline const SvxLanguageItem &SwAttrSet::GetCJKLanguage(sal_Bool bInP) const
{ return (const SvxLanguageItem&)Get( RES_CHRATR_CJK_LANGUAGE,bInP); }
-inline const SvxLanguageItem &SwAttrSet::GetCTLLanguage(BOOL bInP) const
+inline const SvxLanguageItem &SwAttrSet::GetCTLLanguage(sal_Bool bInP) const
{ return (const SvxLanguageItem&)Get( RES_CHRATR_CTL_LANGUAGE,bInP); }
-inline const SvxEscapementItem &SwAttrSet::GetEscapement(BOOL bInP) const
+inline const SvxEscapementItem &SwAttrSet::GetEscapement(sal_Bool bInP) const
{ return (const SvxEscapementItem&)Get( RES_CHRATR_ESCAPEMENT,bInP); }
-inline const SvxCaseMapItem &SwAttrSet::GetCaseMap(BOOL bInP) const
+inline const SvxCaseMapItem &SwAttrSet::GetCaseMap(sal_Bool bInP) const
{ return (const SvxCaseMapItem&)Get( RES_CHRATR_CASEMAP,bInP); }
-inline const SvxNoHyphenItem &SwAttrSet::GetNoHyphenHere(BOOL bInP) const
+inline const SvxNoHyphenItem &SwAttrSet::GetNoHyphenHere(sal_Bool bInP) const
{ return (const SvxNoHyphenItem&)Get( RES_CHRATR_NOHYPHEN,bInP); }
-inline const SvxBlinkItem &SwAttrSet::GetBlink(BOOL bInP) const
+inline const SvxBlinkItem &SwAttrSet::GetBlink(sal_Bool bInP) const
{ return (const SvxBlinkItem&)Get( RES_CHRATR_BLINK,bInP); }
-inline const SvxBrushItem &SwAttrSet::GetChrBackground( BOOL bInP ) const
+inline const SvxBrushItem &SwAttrSet::GetChrBackground( sal_Bool bInP ) const
{ return (const SvxBrushItem&)Get( RES_CHRATR_BACKGROUND, bInP ); }
-inline const SvxEmphasisMarkItem &SwAttrSet::GetEmphasisMark( BOOL bInP ) const
+inline const SvxEmphasisMarkItem &SwAttrSet::GetEmphasisMark( sal_Bool bInP ) const
{ return (const SvxEmphasisMarkItem&)Get( RES_CHRATR_EMPHASIS_MARK, bInP ); }
-inline const SvxTwoLinesItem &SwAttrSet::Get2Lines( BOOL bInP ) const
+inline const SvxTwoLinesItem &SwAttrSet::Get2Lines( sal_Bool bInP ) const
{ return (const SvxTwoLinesItem&)Get( RES_CHRATR_TWO_LINES, bInP ); }
-inline const SvxCharScaleWidthItem &SwAttrSet::GetCharScaleW( BOOL bInP ) const
+inline const SvxCharScaleWidthItem &SwAttrSet::GetCharScaleW( sal_Bool bInP ) const
{ return (const SvxCharScaleWidthItem&)Get( RES_CHRATR_SCALEW, bInP ); }
-inline const SvxCharRotateItem &SwAttrSet::GetCharRotate( BOOL bInP ) const
+inline const SvxCharRotateItem &SwAttrSet::GetCharRotate( sal_Bool bInP ) const
{ return (const SvxCharRotateItem&)Get( RES_CHRATR_ROTATE, bInP ); }
-inline const SvxCharReliefItem &SwAttrSet::GetCharRelief( BOOL bInP ) const
+inline const SvxCharReliefItem &SwAttrSet::GetCharRelief( sal_Bool bInP ) const
{ return (const SvxCharReliefItem&)Get( RES_CHRATR_RELIEF, bInP ); }
-inline const SvxCharHiddenItem &SwAttrSet::GetCharHidden( BOOL bInP ) const
+inline const SvxCharHiddenItem &SwAttrSet::GetCharHidden( sal_Bool bInP ) const
{ return (const SvxCharHiddenItem&)Get( RES_CHRATR_HIDDEN, bInP ); }
// implementation of the character attribute methods of SwFmt
-inline const SvxPostureItem &SwFmt::GetPosture(BOOL bInP) const
+inline const SvxPostureItem &SwFmt::GetPosture(sal_Bool bInP) const
{ return aSet.GetPosture(bInP); }
-inline const SvxWeightItem &SwFmt::GetWeight(BOOL bInP) const
+inline const SvxWeightItem &SwFmt::GetWeight(sal_Bool bInP) const
{ return aSet.GetWeight(bInP); }
-inline const SvxShadowedItem &SwFmt::GetShadowed(BOOL bInP) const
+inline const SvxShadowedItem &SwFmt::GetShadowed(sal_Bool bInP) const
{ return aSet.GetShadowed(bInP); }
-inline const SvxAutoKernItem &SwFmt::GetAutoKern(BOOL bInP) const
+inline const SvxAutoKernItem &SwFmt::GetAutoKern(sal_Bool bInP) const
{ return aSet.GetAutoKern(bInP); }
-inline const SvxWordLineModeItem &SwFmt::GetWordLineMode(BOOL bInP) const
+inline const SvxWordLineModeItem &SwFmt::GetWordLineMode(sal_Bool bInP) const
{ return aSet.GetWordLineMode(bInP); }
-inline const SvxContourItem &SwFmt::GetContour(BOOL bInP) const
+inline const SvxContourItem &SwFmt::GetContour(sal_Bool bInP) const
{ return aSet.GetContour(bInP); }
-inline const SvxKerningItem &SwFmt::GetKerning(BOOL bInP) const
+inline const SvxKerningItem &SwFmt::GetKerning(sal_Bool bInP) const
{ return aSet.GetKerning(bInP); }
-inline const SvxUnderlineItem &SwFmt::GetUnderline(BOOL bInP) const
+inline const SvxUnderlineItem &SwFmt::GetUnderline(sal_Bool bInP) const
{ return aSet.GetUnderline(bInP); }
-inline const SvxOverlineItem &SwFmt::GetOverline(BOOL bInP) const
+inline const SvxOverlineItem &SwFmt::GetOverline(sal_Bool bInP) const
{ return aSet.GetOverline(bInP); }
-inline const SvxCrossedOutItem &SwFmt::GetCrossedOut(BOOL bInP) const
+inline const SvxCrossedOutItem &SwFmt::GetCrossedOut(sal_Bool bInP) const
{ return aSet.GetCrossedOut(bInP); }
-inline const SvxFontHeightItem &SwFmt::GetSize(BOOL bInP) const
+inline const SvxFontHeightItem &SwFmt::GetSize(sal_Bool bInP) const
{ return aSet.GetSize(bInP); }
-inline const SvxPropSizeItem &SwFmt::GetPropSize(BOOL bInP) const
+inline const SvxPropSizeItem &SwFmt::GetPropSize(sal_Bool bInP) const
{ return aSet.GetPropSize(bInP); }
-inline const SvxFontItem &SwFmt::GetFont(BOOL bInP) const
+inline const SvxFontItem &SwFmt::GetFont(sal_Bool bInP) const
{ return aSet.GetFont(bInP); }
-inline const SvxFontItem &SwFmt::GetCJKFont(BOOL bInP) const
+inline const SvxFontItem &SwFmt::GetCJKFont(sal_Bool bInP) const
{ return aSet.GetCJKFont(bInP); }
-inline const SvxFontItem &SwFmt::GetCTLFont(BOOL bInP) const
+inline const SvxFontItem &SwFmt::GetCTLFont(sal_Bool bInP) const
{ return aSet.GetCTLFont(bInP); }
-inline const SvxColorItem &SwFmt::GetColor(BOOL bInP) const
+inline const SvxColorItem &SwFmt::GetColor(sal_Bool bInP) const
{ return aSet.GetColor(bInP); }
- inline const SvxCharSetColorItem &SwFmt::GetCharSetColor(BOOL bInP) const
+ inline const SvxCharSetColorItem &SwFmt::GetCharSetColor(sal_Bool bInP) const
{ return aSet.GetCharSetColor(bInP); }
-inline const SvxLanguageItem &SwFmt::GetLanguage(BOOL bInP) const
+inline const SvxLanguageItem &SwFmt::GetLanguage(sal_Bool bInP) const
{ return aSet.GetLanguage(bInP); }
-inline const SvxEscapementItem &SwFmt::GetEscapement(BOOL bInP) const
+inline const SvxEscapementItem &SwFmt::GetEscapement(sal_Bool bInP) const
{ return aSet.GetEscapement(bInP); }
-inline const SvxCaseMapItem &SwFmt::GetCaseMap(BOOL bInP) const
+inline const SvxCaseMapItem &SwFmt::GetCaseMap(sal_Bool bInP) const
{ return aSet.GetCaseMap(bInP); }
-inline const SvxNoHyphenItem &SwFmt::GetNoHyphenHere(BOOL bInP) const
+inline const SvxNoHyphenItem &SwFmt::GetNoHyphenHere(sal_Bool bInP) const
{ return aSet.GetNoHyphenHere(bInP); }
-inline const SvxBlinkItem &SwFmt::GetBlink(BOOL bInP) const
+inline const SvxBlinkItem &SwFmt::GetBlink(sal_Bool bInP) const
{ return aSet.GetBlink(bInP); }
-inline const SvxBrushItem &SwFmt::GetChrBackground(BOOL bInP) const
+inline const SvxBrushItem &SwFmt::GetChrBackground(sal_Bool bInP) const
{ return aSet.GetChrBackground(bInP); }
-inline const SvxEmphasisMarkItem &SwFmt::GetEmphasisMark( BOOL bInP ) const
+inline const SvxEmphasisMarkItem &SwFmt::GetEmphasisMark( sal_Bool bInP ) const
{ return aSet.GetEmphasisMark(bInP); }
-inline const SvxTwoLinesItem &SwFmt::Get2Lines( BOOL bInP ) const
+inline const SvxTwoLinesItem &SwFmt::Get2Lines( sal_Bool bInP ) const
{ return aSet.Get2Lines(bInP); }
-inline const SvxCharScaleWidthItem &SwFmt::GetCharScaleW( BOOL bInP ) const
+inline const SvxCharScaleWidthItem &SwFmt::GetCharScaleW( sal_Bool bInP ) const
{ return aSet.GetCharScaleW(bInP); }
-inline const SvxCharRotateItem &SwFmt::GetCharRotate( BOOL bInP ) const
+inline const SvxCharRotateItem &SwFmt::GetCharRotate( sal_Bool bInP ) const
{ return aSet.GetCharRotate(bInP); }
-inline const SvxCharReliefItem &SwFmt::GetCharRelief( BOOL bInP ) const
+inline const SvxCharReliefItem &SwFmt::GetCharRelief( sal_Bool bInP ) const
{ return aSet.GetCharRelief(bInP); }
-inline const SvxCharHiddenItem &SwFmt::GetCharHidden( BOOL bInP ) const
+inline const SvxCharHiddenItem &SwFmt::GetCharHidden( sal_Bool bInP ) const
{ return aSet.GetCharHidden(bInP); }
#endif
diff --git a/sw/inc/charfmt.hxx b/sw/inc/charfmt.hxx
index 2708b1770cae..f40029d7290b 100644
--- a/sw/inc/charfmt.hxx
+++ b/sw/inc/charfmt.hxx
@@ -52,8 +52,8 @@ public:
namespace CharFmt
{
extern const SfxItemSet* GetItemSet( const SfxPoolItem& rAttr );
- extern const SfxPoolItem* GetItem( const SwTxtAttr& rAttr, USHORT nWhich );
- extern BOOL IsItemIncluded( const USHORT nWhich, const SwTxtAttr *pAttr );
+ extern const SfxPoolItem* GetItem( const SwTxtAttr& rAttr, sal_uInt16 nWhich );
+ extern sal_Bool IsItemIncluded( const sal_uInt16 nWhich, const SwTxtAttr *pAttr );
}
#endif
diff --git a/sw/inc/chpfld.hxx b/sw/inc/chpfld.hxx
index d4f0c2a7bb76..cf45a3412569 100644
--- a/sw/inc/chpfld.hxx
+++ b/sw/inc/chpfld.hxx
@@ -25,8 +25,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _CHPFLD_HXX
-#define _CHPFLD_HXX
+#ifndef SW_CHPFLD_HXX
+#define SW_CHPFLD_HXX
#include "fldbas.hxx"
@@ -59,34 +59,35 @@ public:
class SW_DLLPUBLIC SwChapterField : public SwField
{
friend class SwChapterFieldType;
- BYTE nLevel;
+ sal_uInt8 nLevel;
String sTitle, sNumber, sPre, sPost;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
public:
SwChapterField(SwChapterFieldType*, sal_uInt32 nFmt = 0);
// #i53420#
void ChangeExpansion( const SwFrm*,
const SwCntntNode*,
- BOOL bSrchNum = FALSE);
- void ChangeExpansion(const SwTxtNode &rNd, BOOL bSrchNum);
-
- virtual String Expand() const;
- virtual SwField* Copy() const;
+ sal_Bool bSrchNum = sal_False);
+ void ChangeExpansion(const SwTxtNode &rNd, sal_Bool bSrchNum);
- inline BYTE GetLevel() const;
- inline void SetLevel(BYTE);
+ inline sal_uInt8 GetLevel() const;
+ inline void SetLevel(sal_uInt8);
inline const String& GetNumber() const;
inline const String& GetTitle() const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
-inline BYTE SwChapterField::GetLevel() const { return nLevel; }
-inline void SwChapterField::SetLevel(BYTE nLev) { nLevel = nLev; }
+inline sal_uInt8 SwChapterField::GetLevel() const { return nLevel; }
+inline void SwChapterField::SetLevel(sal_uInt8 nLev) { nLevel = nLev; }
inline const String& SwChapterField::GetNumber() const { return sNumber; }
inline const String& SwChapterField::GetTitle() const { return sTitle; }
-#endif // _CHPFLD_HXX
+#endif // SW_CHPFLD_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index b88f7c63a424..5c5ab9a71505 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -866,6 +866,12 @@ included in c-context files, so c++ style stuff will cause problems.
#define FN_NAVIGATION_FORWARD (FN_EXTRA2 + 116)
+// #i972: bool items to be passed to SwFrmPage for evaluation
+#define FN_OLE_IS_MATH (FN_EXTRA2 + 114)
+#define FN_MATH_BASELINE_ALIGNMENT (FN_EXTRA2 + 115)
+
+#define FN_EMBEDDED_OBJECT (FN_EXTRA2 + 116)
+
/*------------------------------------------------ --------------------
Area: Help
-------------------------------------------------- ------------------*/
@@ -997,7 +1003,7 @@ included in c-context files, so c++ style stuff will cause problems.
#define FN_ENVELOP (FN_ENVELP )
-#define FN_DELETE_NOTE (FN_NOTES+0)
+
#define FN_DELETE_NOTE_AUTHOR (FN_NOTES+1)
#define FN_DELETE_ALL_NOTES (FN_NOTES+2)
#define FN_HIDE_NOTE (FN_NOTES+3)
diff --git a/sw/inc/colwd.hxx b/sw/inc/colwd.hxx
index 26b6f54d79e3..f42fe3c2b695 100644
--- a/sw/inc/colwd.hxx
+++ b/sw/inc/colwd.hxx
@@ -40,11 +40,11 @@ class SwTableFUNC;
class SwTableWidthDlg : public SvxStandardDialog
{
+ FixedLine aWidthFL;
FixedText aColFT;
NumericField aColEdit;
FixedText aWidthFT;
MetricField aWidthEdit;
- FixedLine aWidthFL;
OKButton aOKBtn;
CancelButton aCancelBtn;
HelpButton aHelpBtn;
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 93ecfc9ae3b1..2a91682b5dc4 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -25,14 +25,16 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _CRSRSH_HXX
-#define _CRSRSH_HXX
+#ifndef SW_CRSRSH_HXX
+#define SW_CRSRSH_HXX
#include <com/sun/star/i18n/WordType.hpp>
#include <tools/string.hxx>
#include <tools/link.hxx>
#include <tools/rtti.hxx>
+
+#include <IShellCursorSupplier.hxx>
#include "swdllapi.h"
#include <swtypes.hxx> // for SWPOSDOC
#include <viewsh.hxx> // for ViewShell
@@ -136,7 +138,7 @@ struct SwContentAtPos
nDist = 0; // #i23726#
}
- BOOL IsInProtectSect() const;
+ sal_Bool IsInProtectSect() const;
bool IsInRTLText()const;
};
@@ -148,7 +150,10 @@ const int CRSR_POSOLD = 0x01, // cursor stays at old position
String *ReplaceBackReferences( const com::sun::star::util::SearchOptions& rSearchOpt, SwPaM* pPam );
-class SW_DLLPUBLIC SwCrsrShell : public ViewShell, public SwModify
+class SW_DLLPUBLIC SwCrsrShell
+ : public ViewShell
+ , public SwModify
+ , public ::sw::IShellCursorSupplier
{
friend class SwCallLink;
friend class SwVisCrsr;
@@ -156,7 +161,7 @@ class SW_DLLPUBLIC SwCrsrShell : public ViewShell, public SwModify
friend class SwChgLinkFlag;
// requires the Crsr as InternalCrsr
- friend BOOL GetAutoSumSel( const SwCrsrShell&, SwCellFrms& );
+ friend sal_Bool GetAutoSumSel( const SwCrsrShell&, SwCellFrms& );
public:
@@ -197,9 +202,9 @@ private:
long nUpDownX; // try to move the cursor on up/down always
// in the same column
long nLeftFrmPos;
- ULONG nAktNode; // save CursorPos at Start-Action
+ sal_uLong nAktNode; // save CursorPos at Start-Action
xub_StrLen nAktCntnt;
- USHORT nAktNdTyp;
+ sal_uInt16 nAktNdTyp;
bool bAktSelection;
/*
@@ -208,40 +213,40 @@ private:
* current Cursor gets no update. This way, "complicated" cursor movements
* (via Find()) can be realised.
*/
- USHORT nCrsrMove;
- USHORT nBasicActionCnt; // Actions which are parenthesized by Basic
+ sal_uInt16 nCrsrMove;
+ sal_uInt16 nBasicActionCnt; // Actions which are parenthesized by Basic
CrsrMoveState eMvState; // Status for Crsr-Travelling - GetCrsrOfst
String sMarkedListId;
int nMarkedListLevel;
- BOOL bHasFocus : 1; // Shell is "active" in a window
- BOOL bSVCrsrVis : 1; // SV-Cursor visible/invisible
- BOOL bChgCallFlag : 1; // attribute change inside Start- and EndAction
- BOOL bVisPortChgd : 1; // in VisPortChg-Call
+ sal_Bool bHasFocus : 1; // Shell is "active" in a window
+ sal_Bool bSVCrsrVis : 1; // SV-Cursor visible/invisible
+ sal_Bool bChgCallFlag : 1; // attribute change inside Start- and EndAction
+ sal_Bool bVisPortChgd : 1; // in VisPortChg-Call
// (used in Invalidate by the Cursor)
- BOOL bCallChgLnk : 1; // flag for derived classes
+ sal_Bool bCallChgLnk : 1; // flag for derived classes
// TRUE -> call ChgLnk
// access only via SwChgLinkFlag
- BOOL bAllProtect : 1; // Flag for areas
+ sal_Bool bAllProtect : 1; // Flag for areas
// TRUE -> everything protected / hidden
- BOOL bInCMvVisportChgd : 1; // Flag for CrsrMoves
+ sal_Bool bInCMvVisportChgd : 1; // Flag for CrsrMoves
// TRUE -> view was moved
- BOOL bGCAttr : 1; // TRUE -> non expanded attributes exist.
- BOOL bIgnoreReadonly : 1; // TRUE -> make the cursor visible on next
+ sal_Bool bGCAttr : 1; // TRUE -> non expanded attributes exist.
+ sal_Bool bIgnoreReadonly : 1; // TRUE -> make the cursor visible on next
// EndAction in spite of Readonly
- BOOL bSelTblCells : 1; // TRUE -> select cells over the InputWin
- BOOL bAutoUpdateCells : 1; // TRUE -> autoformat cells
- BOOL bBasicHideCrsr : 1; // TRUE -> HideCrsr from Basic
- BOOL bSetCrsrInReadOnly : 1;// TRUE -> Cursor is allowed in ReadOnly-Areas
- BOOL bOverwriteCrsr : 1; // TRUE -> show Overwrite Crsr
+ sal_Bool bSelTblCells : 1; // TRUE -> select cells over the InputWin
+ sal_Bool bAutoUpdateCells : 1; // TRUE -> autoformat cells
+ sal_Bool bBasicHideCrsr : 1; // TRUE -> HideCrsr from Basic
+ sal_Bool bSetCrsrInReadOnly : 1;// TRUE -> Cursor is allowed in ReadOnly-Areas
+ sal_Bool bOverwriteCrsr : 1; // sal_True -> show Overwrite Crsr
bool mbMacroExecAllowed : 1;
- SW_DLLPRIVATE void UpdateCrsr( USHORT eFlags
+ SW_DLLPRIVATE void UpdateCrsr( sal_uInt16 eFlags
=SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE,
- BOOL bIdleEnd = FALSE );
+ sal_Bool bIdleEnd = sal_False );
SW_DLLPRIVATE void _ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing );
@@ -258,21 +263,21 @@ private:
const int nLevel );
// private method(s) accessed from public inline method(s) must be exported.
- BOOL LeftRight( BOOL, USHORT, USHORT, BOOL );
- SW_DLLPRIVATE BOOL UpDown( BOOL, USHORT );
- SW_DLLPRIVATE BOOL LRMargin( BOOL, BOOL bAPI = FALSE );
- SW_DLLPRIVATE BOOL IsAtLRMargin( BOOL, BOOL bAPI = FALSE ) const;
+ sal_Bool LeftRight( sal_Bool, sal_uInt16, sal_uInt16, sal_Bool );
+ SW_DLLPRIVATE sal_Bool UpDown( sal_Bool, sal_uInt16 );
+ SW_DLLPRIVATE sal_Bool LRMargin( sal_Bool, sal_Bool bAPI = sal_False );
+ SW_DLLPRIVATE sal_Bool IsAtLRMargin( sal_Bool, sal_Bool bAPI = sal_False ) const;
SW_DLLPRIVATE short GetTextDirection( const Point* pPt = 0 ) const;
-typedef BOOL (SwCursor:: *FNCrsr)();
- SW_DLLPRIVATE BOOL CallCrsrFN( FNCrsr );
+typedef sal_Bool (SwCursor:: *FNCrsr)();
+ SW_DLLPRIVATE sal_Bool CallCrsrFN( FNCrsr );
- SW_DLLPRIVATE const SwRedline* _GotoRedline( USHORT nArrPos, BOOL bSelect );
+ SW_DLLPRIVATE const SwRedline* _GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect );
protected:
- inline SwMoveFnCollection* MakeFindRange( USHORT, USHORT, SwPaM* ) const;
+ inline SwMoveFnCollection* MakeFindRange( sal_uInt16, sal_uInt16, SwPaM* ) const;
/*
* Compare-Methode for the StackCursor and the current Cursor.
@@ -293,9 +298,9 @@ protected:
void PaMCorrAbs(const SwNodeIndex &rOldNode, const SwPosition &rNewPos,
const xub_StrLen nOffset = 0 );
- BOOL _SelTblRowOrCol( bool bRow, bool bRowSimple = false );
+ sal_Bool _SelTblRowOrCol( bool bRow, bool bRowSimple = false );
- bool SetInFrontOfLabel( BOOL bNew );
+ bool SetInFrontOfLabel( sal_Bool bNew );
void RefreshBlockCursor();
@@ -313,9 +318,12 @@ public:
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
// create new cursor and append the old one
+ virtual SwPaM & CreateNewShellCursor();
+ virtual SwPaM & GetCurrentShellCursor();
+
SwPaM * CreateCrsr();
// delete the current cursor and make the following into the current
- BOOL DestroyCrsr();
+ sal_Bool DestroyCrsr();
// transform TableCursor to normal cursor, nullify Tablemode
void TblCrsrToCursor();
// enter block mode, change normal cursor into block cursor
@@ -328,8 +336,8 @@ public:
// only for usage in special cases allowed!
void ExtendedSelectAll();
- SwPaM* GetCrsr( BOOL bMakeTblCrsr = TRUE ) const;
- inline SwCursor* GetSwCrsr( BOOL bMakeTblCrsr = TRUE ) const;
+ SwPaM* GetCrsr( sal_Bool bMakeTblCrsr = sal_True ) const;
+ inline SwCursor* GetSwCrsr( sal_Bool bMakeTblCrsr = sal_True ) const;
// return only the current cursor
SwShellCrsr* _GetCrsr() { return pCurCrsr; }
const SwShellCrsr* _GetCrsr() const { return pCurCrsr; }
@@ -347,42 +355,42 @@ public:
// start parenthesing, hide SV-Cursor and selected areas
void StartAction();
// end parenthesing, show SV-Cursor and selected areas
- void EndAction( const BOOL bIdleEnd = FALSE );
+ void EndAction( const sal_Bool bIdleEnd = sal_False );
// basic cursor travelling
long GetUpDownX() const { return nUpDownX; }
- BOOL Left( USHORT nCnt, USHORT nMode, BOOL bAllowVisual = FALSE )
- { return LeftRight( TRUE, nCnt, nMode, bAllowVisual ); }
- BOOL Right( USHORT nCnt, USHORT nMode, BOOL bAllowVisual = FALSE )
- { return LeftRight( FALSE, nCnt, nMode, bAllowVisual ); }
- BOOL Up( USHORT nCnt = 1 ) { return UpDown( TRUE, nCnt ); }
- BOOL Down( USHORT nCnt = 1 ) { return UpDown( FALSE, nCnt ); }
- BOOL LeftMargin() { return LRMargin( TRUE ); }
- BOOL RightMargin(BOOL bAPI = FALSE) { return LRMargin( FALSE, bAPI ); }
- BOOL SttEndDoc( BOOL bStt );
-
- BOOL MovePage( SwWhichPage, SwPosPage );
- BOOL MovePara( SwWhichPara, SwPosPara );
- BOOL MoveSection( SwWhichSection, SwPosSection );
- BOOL MoveTable( SwWhichTable, SwPosTable );
- BOOL MoveColumn( SwWhichColumn, SwPosColumn );
- BOOL MoveRegion( SwWhichRegion, SwPosRegion );
-
- ULONG Find( const com::sun::star::util::SearchOptions& rSearchOpt,
- BOOL bSearchInNotes,
+ sal_Bool Left( sal_uInt16 nCnt, sal_uInt16 nMode, sal_Bool bAllowVisual = sal_False )
+ { return LeftRight( sal_True, nCnt, nMode, bAllowVisual ); }
+ sal_Bool Right( sal_uInt16 nCnt, sal_uInt16 nMode, sal_Bool bAllowVisual = sal_False )
+ { return LeftRight( sal_False, nCnt, nMode, bAllowVisual ); }
+ sal_Bool Up( sal_uInt16 nCnt = 1 ) { return UpDown( sal_True, nCnt ); }
+ sal_Bool Down( sal_uInt16 nCnt = 1 ) { return UpDown( sal_False, nCnt ); }
+ sal_Bool LeftMargin() { return LRMargin( sal_True ); }
+ sal_Bool RightMargin(sal_Bool bAPI = sal_False) { return LRMargin( sal_False, bAPI ); }
+ sal_Bool SttEndDoc( sal_Bool bStt );
+
+ sal_Bool MovePage( SwWhichPage, SwPosPage );
+ sal_Bool MovePara( SwWhichPara, SwPosPara );
+ sal_Bool MoveSection( SwWhichSection, SwPosSection );
+ sal_Bool MoveTable( SwWhichTable, SwPosTable );
+ sal_Bool MoveColumn( SwWhichColumn, SwPosColumn );
+ sal_Bool MoveRegion( SwWhichRegion, SwPosRegion );
+
+ sal_uLong Find( const com::sun::star::util::SearchOptions& rSearchOpt,
+ sal_Bool bSearchInNotes,
SwDocPositions eStart, SwDocPositions eEnde,
- BOOL& bCancel,
- FindRanges eRng, int bReplace = FALSE );
+ sal_Bool& bCancel,
+ FindRanges eRng, int bReplace = sal_False );
- ULONG Find( const SwTxtFmtColl& rFmtColl,
+ sal_uLong Find( const SwTxtFmtColl& rFmtColl,
SwDocPositions eStart, SwDocPositions eEnde,
- BOOL& bCancel,
+ sal_Bool& bCancel,
FindRanges eRng, const SwTxtFmtColl* pReplFmt = 0 );
- ULONG Find( const SfxItemSet& rSet, BOOL bNoCollections,
+ sal_uLong Find( const SfxItemSet& rSet, sal_Bool bNoCollections,
SwDocPositions eStart, SwDocPositions eEnde,
- BOOL& bCancel,
+ sal_Bool& bCancel,
FindRanges eRng,
const com::sun::star::util::SearchOptions* pSearchOpt = 0,
const SfxItemSet* rReplSet = 0 );
@@ -391,7 +399,7 @@ public:
// return values:
// CRSR_POSCHG: when cursor was corrected from SPoint by the layout
// CRSR_POSOLD: when the cursor was not changed
- int SetCrsr( const Point &rPt, BOOL bOnlyText = FALSE, bool bBlock = true );
+ int SetCrsr( const Point &rPt, sal_Bool bOnlyText = sal_False, bool bBlock = true );
/*
* Notification that the visible area was changed. aVisArea is reset, then
@@ -407,7 +415,7 @@ public:
// Areas
inline void SetMark();
- inline BOOL HasMark();
+ inline sal_Bool HasMark();
void ClearMark();
@@ -418,12 +426,12 @@ public:
swap the PaM. FALSE: If the mark is behind the point then swap
the PaM.
*/
- void NormalizePam(BOOL bPointFirst = TRUE);
+ void NormalizePam(sal_Bool bPointFirst = sal_True);
void SwapPam();
- BOOL ChgCurrPam( const Point & rPt,
- BOOL bTstOnly = TRUE, // test only, don't set
- BOOL bTstHit = FALSE ); // only exact matches
+ sal_Bool ChgCurrPam( const Point & rPt,
+ sal_Bool bTstOnly = sal_True, // test only, don't set
+ sal_Bool bTstHit = sal_False ); // only exact matches
void KillPams();
// story a copy of the cursor in the stack
@@ -435,7 +443,7 @@ public:
* stack
* Return: whether there was one left one the stack
*/
- BOOL Pop( BOOL bOldCrsr = TRUE );
+ sal_Bool Pop( sal_Bool bOldCrsr = sal_True );
/*
* Combine 2 Cursors.
* Delete the topmost from the stack and move its Mark into the current.
@@ -444,10 +452,10 @@ public:
#if OSL_DEBUG_LEVEL > 1
void SttCrsrMove();
- void EndCrsrMove( const BOOL bIdleEnd = FALSE );
+ void EndCrsrMove( const sal_Bool bIdleEnd = sal_False );
#else
void SttCrsrMove() { ++nCrsrMove; StartAction(); }
- void EndCrsrMove( const BOOL bIdleEnd = FALSE )
+ void EndCrsrMove( const sal_Bool bIdleEnd = sal_False )
{ EndAction( bIdleEnd ); --nCrsrMove; }
#endif
@@ -456,35 +464,35 @@ public:
* On the other hand, on receiving the focus all selected ranges are displayed again
* (ranges must be recalculated!).
*/
- BOOL HasShFcs() const { return bHasFocus; }
+ sal_Bool HasShFcs() const { return bHasFocus; }
void ShLooseFcs();
- void ShGetFcs( BOOL bUpdate = TRUE );
+ void ShGetFcs( sal_Bool bUpdate = sal_True );
// Methods for displaying or hiding the visible text cursor.
void ShowCrsr();
void HideCrsr();
// Methods for displaying or hiding the selected ranges with visible cursor.
- void ShowCrsrs( BOOL bCrsrVis );
+ void ShowCrsrs( sal_Bool bCrsrVis );
void HideCrsrs();
- BOOL IsOverwriteCrsr() const { return bOverwriteCrsr; }
- void SetOverwriteCrsr( BOOL bFlag ) { bOverwriteCrsr = bFlag; }
+ sal_Bool IsOverwriteCrsr() const { return bOverwriteCrsr; }
+ void SetOverwriteCrsr( sal_Bool bFlag ) { bOverwriteCrsr = bFlag; }
// Return current frame in which the cursor is placed.
- SwCntntFrm *GetCurrFrm( const BOOL bCalcFrm = TRUE ) const;
+ SwCntntFrm *GetCurrFrm( const sal_Bool bCalcFrm = sal_True ) const;
//TRUE if cursor is hidden because of readonly.
//FALSE if it is working despite readonly.
- BOOL IsCrsrReadonly() const;
+ sal_Bool IsCrsrReadonly() const;
// Cursor is placed in something that is protected or selection contains
// something that is protected.
- BOOL HasReadonlySel() const;
+ sal_Bool HasReadonlySel() const;
// Can the cursor be set to read only ranges?
- BOOL IsReadOnlyAvailable() const { return bSetCrsrInReadOnly; }
- void SetReadOnlyAvailable( BOOL bFlag );
- BOOL IsOverReadOnlyPos( const Point& rPt ) const;
+ sal_Bool IsReadOnlyAvailable() const { return bSetCrsrInReadOnly; }
+ void SetReadOnlyAvailable( sal_Bool bFlag );
+ sal_Bool IsOverReadOnlyPos( const Point& rPt ) const;
// Methods for aFlyMacroLnk.
void SetFlyMacroLnk( const Link& rLnk ) { aFlyMacroLnk = rLnk; }
@@ -503,21 +511,23 @@ public:
// Check if the current cursor contains a selection, i.e.
// if Mark is set and SPoint and Mark are different.
- BOOL HasSelection() const;
+ sal_Bool HasSelection() const;
// Check if a selection exists, i.e. if the current cursor comprises a selection.
- inline BOOL IsSelection() const;
+ inline sal_Bool IsSelection() const;
// returns if multiple cursors are available
- inline BOOL IsMultiSelection() const;
+ inline sal_Bool IsMultiSelection() const;
// Check if a complete paragraph was selected.
- BOOL IsSelFullPara() const;
+ sal_Bool IsSelFullPara() const;
// Check if selection is within one paragraph.
- inline BOOL IsSelOnePara() const;
//Should WaitPtr be activated for Clipboard.
- BOOL ShouldWait() const;
+ sal_Bool ShouldWait() const;
+
+ // Check if selection is within one paragraph.
+ inline sal_Bool IsSelOnePara() const;
/*
* Returns SRectangle, at which the cursor is located.
@@ -526,25 +536,25 @@ public:
/*
* Returns if cursor is wholly or partly within visible range.
*/
- BOOL IsCrsrVisible() const { return VisArea().IsOver( GetCharRect() ); }
+ sal_Bool IsCrsrVisible() const { return VisArea().IsOver( GetCharRect() ); }
// Return current page number:
// TRUE: in which cursor is located.
// FALSE: which is visible at the upper margin.
- void GetPageNum( USHORT &rnPhyNum, USHORT &rnVirtNum,
- BOOL bAtCrsrPos = TRUE, const BOOL bCalcFrm = TRUE );
+ void GetPageNum( sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum,
+ sal_Bool bAtCrsrPos = sal_True, const sal_Bool bCalcFrm = sal_True );
// Determine how "empty pages" are handled
// (used in PhyPage).
- USHORT GetNextPrevPageNum( BOOL bNext = TRUE );
+ sal_uInt16 GetNextPrevPageNum( sal_Bool bNext = sal_True );
// Move cursor at the bginning of page "nPage".
- BOOL GotoPage( USHORT nPage );
+ sal_Bool GotoPage( sal_uInt16 nPage );
- USHORT GetPageCnt();
+ sal_uInt16 GetPageCnt();
- BOOL GoNextCrsr();
+ sal_Bool GoNextCrsr();
- BOOL GoPrevCrsr();
+ sal_Bool GoPrevCrsr();
// at CurCrsr.SPoint
::sw::mark::IMark* SetBookmark(
@@ -575,47 +585,47 @@ public:
String GetText() const;
// Check of SPoint or Mark of current cursor are placed within a table.
- inline const SwTableNode* IsCrsrInTbl( BOOL bIsPtInTbl = TRUE ) const;
+ inline const SwTableNode* IsCrsrInTbl( sal_Bool bIsPtInTbl = sal_True ) const;
- inline Point& GetCrsrDocPos( BOOL bPoint = TRUE ) const;
- inline BOOL IsCrsrPtAtEnd() const;
+ inline Point& GetCrsrDocPos( sal_Bool bPoint = sal_True ) const;
+ inline sal_Bool IsCrsrPtAtEnd() const;
inline const SwPaM* GetTblCrs() const;
inline SwPaM* GetTblCrs();
- BOOL IsTblComplex() const;
- BOOL IsTblComplexForChart();
+ sal_Bool IsTblComplex() const;
+ sal_Bool IsTblComplexForChart();
// get current table selection as text
String GetBoxNms() const;
// set Crsr to the next/previous cell
- BOOL GoNextCell( BOOL bAppendLine = TRUE );
- BOOL GoPrevCell();
+ sal_Bool GoNextCell( sal_Bool bAppendLine = sal_True );
+ sal_Bool GoPrevCell();
// go to this box (if available and inside of table)
- BOOL GotoTable( const String& rName );
+ sal_Bool GotoTable( const String& rName );
// select a table row, column or box (based on the current cursor)
- BOOL SelTblRow() { return _SelTblRowOrCol( true ); }
- BOOL SelTblCol() { return _SelTblRowOrCol( false ); }
- BOOL SelTblBox();
+ sal_Bool SelTblRow() { return _SelTblRowOrCol( true ); }
+ sal_Bool SelTblCol() { return _SelTblRowOrCol( false ); }
+ sal_Bool SelTblBox();
- BOOL SelTbl();
+ sal_Bool SelTbl();
- BOOL GotoNextNum();
- BOOL GotoPrevNum();
+ sal_Bool GotoNextNum();
+ sal_Bool GotoPrevNum();
- BOOL GotoOutline( const String& rName );
+ sal_Bool GotoOutline( const String& rName );
// to the next/previous or the given OutlineNode
- void GotoOutline( USHORT nIdx );
+ void GotoOutline( sal_uInt16 nIdx );
// find the "outline position" in the nodes array of the current chapter
- USHORT GetOutlinePos( BYTE nLevel = UCHAR_MAX );
+ sal_uInt16 GetOutlinePos( sal_uInt8 nLevel = UCHAR_MAX );
// select the given range of OutlineNodes. Optionally including the children
- // the USHORTs are the positions in OutlineNodes-Array (EditShell)
- BOOL MakeOutlineSel( USHORT nSttPos, USHORT nEndPos,
- BOOL bWithChilds = FALSE );
+ // the sal_uInt16s are the positions in OutlineNodes-Array (EditShell)
+ sal_Bool MakeOutlineSel( sal_uInt16 nSttPos, sal_uInt16 nEndPos,
+ sal_Bool bWithChilds = sal_False );
- BOOL GotoNextOutline();
- BOOL GotoPrevOutline();
+ sal_Bool GotoNextOutline();
+ sal_Bool GotoPrevOutline();
/** Delivers the current shell cursor
@@ -640,125 +650,125 @@ public:
IBlockCursor* GetBlockCrsr() { return pBlockCrsr; }
// is the Crsr in a table and is the selection over 2 columns
- BOOL IsTableMode() const { return 0 != pTblCrsr; }
+ sal_Bool IsTableMode() const { return 0 != pTblCrsr; }
const SwShellTableCrsr* GetTableCrsr() const { return pTblCrsr; }
SwShellTableCrsr* GetTableCrsr() { return pTblCrsr; }
- USHORT UpdateTblSelBoxes();
+ sal_uInt16 UpdateTblSelBoxes();
- BOOL GotoFtnTxt(); // jump from content to footnote
- BOOL GotoFtnAnchor(); // jump from footnote to anchor
- BOOL GotoPrevFtnAnchor();
- BOOL GotoNextFtnAnchor();
+ sal_Bool GotoFtnTxt(); // jump from content to footnote
+ sal_Bool GotoFtnAnchor(); // jump from footnote to anchor
+ sal_Bool GotoPrevFtnAnchor();
+ sal_Bool GotoNextFtnAnchor();
- BOOL GotoFlyAnchor(); // jump from the frame to the anchor
- BOOL GotoHeaderTxt(); // jump from the content to the header
- BOOL GotoFooterTxt(); // jump from the content to the footer
+ sal_Bool GotoFlyAnchor(); // jump from the frame to the anchor
+ sal_Bool GotoHeaderTxt(); // jump from the content to the header
+ sal_Bool GotoFooterTxt(); // jump from the content to the footer
// jump to the header/footer of the given or current PageDesc
- BOOL SetCrsrInHdFt( USHORT nDescNo = USHRT_MAX,
- BOOL bInHeader = TRUE );
- // is point of cursor in header/footer. pbInHeader return TRUE if it is
+ sal_Bool SetCrsrInHdFt( sal_uInt16 nDescNo = USHRT_MAX,
+ sal_Bool bInHeader = sal_True );
+ // is point of cursor in header/footer. pbInHeader return sal_True if it is
// in a headerframe otherwise in a footerframe
- BOOL IsInHeaderFooter( BOOL* pbInHeader = 0 ) const;
+ sal_Bool IsInHeaderFooter( sal_Bool* pbInHeader = 0 ) const;
- BOOL GotoNextTOXBase( const String* = 0 );
- BOOL GotoPrevTOXBase( const String* = 0 );
- BOOL GotoTOXMarkBase();
+ sal_Bool GotoNextTOXBase( const String* = 0 );
+ sal_Bool GotoPrevTOXBase( const String* = 0 );
+ sal_Bool GotoTOXMarkBase();
// jump to the next or previous index entry
- BOOL GotoNxtPrvTOXMark( BOOL bNext = TRUE );
+ sal_Bool GotoNxtPrvTOXMark( sal_Bool bNext = sal_True );
// jump to the next/previous index mark of this type
const SwTOXMark& GotoTOXMark( const SwTOXMark& rStart, SwTOXSearch eDir );
// jump to the next or previous table formula
// optionally only to broken formulas
- BOOL GotoNxtPrvTblFormula( BOOL bNext = TRUE,
- BOOL bOnlyErrors = FALSE );
+ sal_Bool GotoNxtPrvTblFormula( sal_Bool bNext = sal_True,
+ sal_Bool bOnlyErrors = sal_False );
// jump to the next / previous hyperlink - inside text and also
// on graphics
- BOOL SelectNxtPrvHyperlink( BOOL bNext = TRUE );
+ sal_Bool SelectNxtPrvHyperlink( sal_Bool bNext = sal_True );
- BOOL GotoRefMark( const String& rRefMark, USHORT nSubType = 0,
- USHORT nSeqNo = 0 );
+ sal_Bool GotoRefMark( const String& rRefMark, sal_uInt16 nSubType = 0,
+ sal_uInt16 nSeqNo = 0 );
// get the nth character from the start or end of the current selection
- sal_Unicode GetChar( BOOL bEnd = TRUE, long nOffset = 0 );
- BOOL ExtendSelection( BOOL bEnd = TRUE, xub_StrLen nCount = 1 );
+ sal_Unicode GetChar( sal_Bool bEnd = sal_True, long nOffset = 0 );
+ sal_Bool ExtendSelection( sal_Bool bEnd = sal_True, xub_StrLen nCount = 1 );
// Place only the visible cursor at the given position in the document.
// Return FALSE if SPoint was corrected by layout.
// (This is needed for displaying the Drag&Drop/Copy-Cursor.)
- BOOL SetVisCrsr( const Point &rPt );
+ sal_Bool SetVisCrsr( const Point &rPt );
inline void UnSetVisCrsr();
// jump to the next or previous field of the corresponding type
- BOOL MoveFldType( const SwFieldType* pFldType, BOOL bNext,
- USHORT nSubType = USHRT_MAX,
- USHORT nResType = USHRT_MAX );
- BOOL GotoFld( const SwFmtFld& rFld );
+ sal_Bool MoveFldType( const SwFieldType* pFldType, sal_Bool bNext,
+ sal_uInt16 nSubType = USHRT_MAX,
+ sal_uInt16 nResType = USHRT_MAX );
+ sal_Bool GotoFld( const SwFmtFld& rFld );
// Return number of cursors in ring (The flag indicates whether
// only cursors containing selections are requested).
- USHORT GetCrsrCnt( BOOL bAll = TRUE ) const;
+ sal_uInt16 GetCrsrCnt( sal_Bool bAll = sal_True ) const;
// Char Travelling - methods (in crstrvl1.cxx)
- BOOL GoStartWord();
- BOOL GoEndWord();
- BOOL GoNextWord();
- BOOL GoPrevWord();
- BOOL GoNextSentence();
- BOOL GoPrevSentence();
- BOOL GoStartSentence();
- BOOL GoEndSentence();
- BOOL SelectWord( const Point* pPt = 0 );
- BOOL ExpandToSentenceBorders();
+ sal_Bool GoStartWord();
+ sal_Bool GoEndWord();
+ sal_Bool GoNextWord();
+ sal_Bool GoPrevWord();
+ sal_Bool GoNextSentence();
+ sal_Bool GoPrevSentence();
+ sal_Bool GoStartSentence();
+ sal_Bool GoEndSentence();
+ sal_Bool SelectWord( const Point* pPt = 0 );
+ sal_Bool ExpandToSentenceBorders();
// get position from current cursor
- BOOL IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES )const;
- BOOL IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
- BOOL IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
- BOOL IsStartSentence() const;
- BOOL IsEndSentence() const;
- BOOL IsSttPara() const;
- BOOL IsEndPara() const;
- BOOL IsStartOfDoc() const;
- BOOL IsEndOfDoc() const;
- BOOL IsInFrontOfLabel() const;
- BOOL IsAtLeftMargin() const { return IsAtLRMargin( TRUE ); }
- BOOL IsAtRightMargin(BOOL bAPI = FALSE) const { return IsAtLRMargin( FALSE, bAPI ); }
+ sal_Bool IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES )const;
+ sal_Bool IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ sal_Bool IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ sal_Bool IsStartSentence() const;
+ sal_Bool IsEndSentence() const;
+ sal_Bool IsSttPara() const;
+ sal_Bool IsEndPara() const;
+ sal_Bool IsStartOfDoc() const;
+ sal_Bool IsEndOfDoc() const;
+ sal_Bool IsInFrontOfLabel() const;
+ sal_Bool IsAtLeftMargin() const { return IsAtLRMargin( sal_True ); }
+ sal_Bool IsAtRightMargin(sal_Bool bAPI = sal_False) const { return IsAtLRMargin( sal_False, bAPI ); }
// delete all created cursors, set the table cursor and the last cursor to
// its TextNode (or StartNode?)
// They all get created on the next ::GetCrsr again
// Used for Drag&Drop/Clipboard-Paste in tables
- BOOL ParkTblCrsr();
+ sal_Bool ParkTblCrsr();
// Non expanded attributes?
- BOOL IsGCAttr() const { return bGCAttr; }
- void ClearGCAttr() { bGCAttr = FALSE; }
- void UpdateAttr() { bGCAttr = TRUE; }
+ sal_Bool IsGCAttr() const { return bGCAttr; }
+ void ClearGCAttr() { bGCAttr = sal_False; }
+ void UpdateAttr() { bGCAttr = sal_True; }
// is the whole document protected/hidden (for UI...)
- BOOL IsAllProtect() const { return bAllProtect; }
+ sal_Bool IsAllProtect() const { return bAllProtect; }
#ifdef SW_CRSR_TIMER
// Set flag at VisCrsr. Is it triggered by Timer (TRUE) or directly (FALSE).
// Default is triggert by Timer.
- BOOL ChgCrsrTimerFlag( BOOL bTimerOn = TRUE );
+ sal_Bool ChgCrsrTimerFlag( sal_Bool bTimerOn = sal_True );
#endif
- BOOL BasicActionPend() const { return nBasicActionCnt != nStartAction; }
+ sal_Bool BasicActionPend() const { return nBasicActionCnt != nStartAction; }
- BOOL GotoRegion( const String& rName );
+ sal_Bool GotoRegion( const String& rName );
// show the current selection
virtual void MakeSelVisible();
// set the cursor to a NOT protected/hidden node
- BOOL FindValidCntntNode( BOOL bOnlyText = FALSE );
+ sal_Bool FindValidCntntNode( sal_Bool bOnlyText = sal_False );
- BOOL GetContentAtPos( const Point& rPt,
+ sal_Bool GetContentAtPos( const Point& rPt,
SwContentAtPos& rCntntAtPos,
- BOOL bSetCrsr = FALSE,
+ sal_Bool bSetCrsr = sal_False,
SwRect* pFldRect = 0 );
const SwPostItField* GetPostItFieldAtCursor() const;
@@ -775,39 +785,39 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::container::XStringKeyMap > >& rStringKeyMaps,
::com::sun::star::uno::Reference<com::sun::star::text::XTextRange>& rRange ) const;
- BOOL IsPageAtPos( const Point &rPt ) const;
+ sal_Bool IsPageAtPos( const Point &rPt ) const;
- BOOL SelectTxtAttr( USHORT nWhich, BOOL bExpand, const SwTxtAttr* pAttr = 0 );
- BOOL GotoINetAttr( const SwTxtINetFmt& rAttr );
+ sal_Bool SelectTxtAttr( sal_uInt16 nWhich, sal_Bool bExpand, const SwTxtAttr* pAttr = 0 );
+ sal_Bool GotoINetAttr( const SwTxtINetFmt& rAttr );
const SwFmtINetFmt* FindINetAttr( const String& rName ) const;
- BOOL CheckTblBoxCntnt( const SwPosition* pPos = 0 );
+ sal_Bool CheckTblBoxCntnt( const SwPosition* pPos = 0 );
void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
void ClearTblBoxCntnt();
- BOOL EndAllTblBoxEdit();
+ sal_Bool EndAllTblBoxEdit();
// gets called when a table selection gets created in UpdateCrsr without
// the UI knowing of it
virtual void NewCoreSelection();
- void SetSelTblCells( BOOL bFlag ) { bSelTblCells = bFlag; }
- BOOL IsSelTblCells() const { return bSelTblCells; }
+ void SetSelTblCells( sal_Bool bFlag ) { bSelTblCells = bFlag; }
+ sal_Bool IsSelTblCells() const { return bSelTblCells; }
- BOOL IsAutoUpdateCells() const { return bAutoUpdateCells; }
- void SetAutoUpdateCells( BOOL bFlag ) { bAutoUpdateCells = bFlag; }
+ sal_Bool IsAutoUpdateCells() const { return bAutoUpdateCells; }
+ void SetAutoUpdateCells( sal_Bool bFlag ) { bAutoUpdateCells = bFlag; }
- BOOL GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode,
+ sal_Bool GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode,
SwRect& rRect, short& rOrient );
- BOOL SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode );
+ sal_Bool SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode );
const SwRedline* SelNextRedline();
const SwRedline* SelPrevRedline();
- const SwRedline* GotoRedline( USHORT nArrPos, BOOL bSelect = FALSE );
+ const SwRedline* GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect = sal_False );
// is cursor or the point in/over a vertical formatted text?
- BOOL IsInVerticalText( const Point* pPt = 0 ) const;
+ sal_Bool IsInVerticalText( const Point* pPt = 0 ) const;
// is cursor or the point in/over a right to left formatted text?
- BOOL IsInRightToLeftText( const Point* pPt = 0 ) const;
+ sal_Bool IsInRightToLeftText( const Point* pPt = 0 ) const;
// If the current cursor position is inside a hidden range, the hidden range
// is selected and true is returned:
@@ -841,12 +851,12 @@ public:
// Cursor Inlines:
inline SwMoveFnCollection* SwCrsrShell::MakeFindRange(
- USHORT nStt, USHORT nEnd, SwPaM* pPam ) const
+ sal_uInt16 nStt, sal_uInt16 nEnd, SwPaM* pPam ) const
{
return pCurCrsr->MakeFindRange( (SwDocPositions)nStt, (SwDocPositions)nEnd, pPam );
}
-inline SwCursor* SwCrsrShell::GetSwCrsr( BOOL bMakeTblCrsr ) const
+inline SwCursor* SwCrsrShell::GetSwCrsr( sal_Bool bMakeTblCrsr ) const
{
return (SwCursor*)GetCrsr( bMakeTblCrsr );
}
@@ -855,35 +865,35 @@ inline SwPaM* SwCrsrShell::GetStkCrsr() const { return pCrsrStk; }
inline void SwCrsrShell::SetMark() { pCurCrsr->SetMark(); }
-inline BOOL SwCrsrShell::HasMark() { return( pCurCrsr->HasMark() ); }
+inline sal_Bool SwCrsrShell::HasMark() { return( pCurCrsr->HasMark() ); }
-inline BOOL SwCrsrShell::IsSelection() const
+inline sal_Bool SwCrsrShell::IsSelection() const
{
return IsTableMode() || pCurCrsr->HasMark() ||
pCurCrsr->GetNext() != pCurCrsr;
}
-inline BOOL SwCrsrShell::IsMultiSelection() const
+inline sal_Bool SwCrsrShell::IsMultiSelection() const
{
return pCurCrsr->GetNext() != pCurCrsr;
}
-inline BOOL SwCrsrShell::IsSelOnePara() const
+inline sal_Bool SwCrsrShell::IsSelOnePara() const
{
return pCurCrsr == pCurCrsr->GetNext() &&
pCurCrsr->GetPoint()->nNode == pCurCrsr->GetMark()->nNode;
}
-inline const SwTableNode* SwCrsrShell::IsCrsrInTbl( BOOL bIsPtInTbl ) const
+inline const SwTableNode* SwCrsrShell::IsCrsrInTbl( sal_Bool bIsPtInTbl ) const
{
return pCurCrsr->GetNode( bIsPtInTbl )->FindTableNode();
}
-inline BOOL SwCrsrShell::IsCrsrPtAtEnd() const
+inline sal_Bool SwCrsrShell::IsCrsrPtAtEnd() const
{
return pCurCrsr->End() == pCurCrsr->GetPoint();
}
-inline Point& SwCrsrShell::GetCrsrDocPos( BOOL bPoint ) const
+inline Point& SwCrsrShell::GetCrsrDocPos( sal_Bool bPoint ) const
{
return bPoint ? pCurCrsr->GetPtPos() : pCurCrsr->GetMkPos();
}
@@ -901,7 +911,7 @@ inline SwPaM* SwCrsrShell::GetTblCrs()
inline void SwCrsrShell::UnSetVisCrsr()
{
pVisCrsr->Hide();
- pVisCrsr->SetDragCrsr( FALSE );
+ pVisCrsr->SetDragCrsr( sal_False );
}
#endif // _CRSRSH_HXX
diff --git a/sw/inc/crsskip.hxx b/sw/inc/crsskip.hxx
index 0066b28e2aca..8393174b7837 100644
--- a/sw/inc/crsskip.hxx
+++ b/sw/inc/crsskip.hxx
@@ -36,9 +36,9 @@
// the same, but in complex text cell skip over legatures and char skip
// into it.
// These defines exist only to cut off the dependicies to I18N project.
-const USHORT CRSR_SKIP_CHARS = 0;
-const USHORT CRSR_SKIP_CELLS = 1;
-const USHORT CRSR_SKIP_HIDDEN = 2;
+const sal_uInt16 CRSR_SKIP_CHARS = 0;
+const sal_uInt16 CRSR_SKIP_CELLS = 1;
+const sal_uInt16 CRSR_SKIP_HIDDEN = 2;
#endif
diff --git a/sw/inc/crstate.hxx b/sw/inc/crstate.hxx
index 00595afbcb8c..53a449e7e804 100644
--- a/sw/inc/crstate.hxx
+++ b/sw/inc/crstate.hxx
@@ -45,11 +45,11 @@ enum SwFillMode
struct SwFillCrsrPos
{
SwRect aCrsr; // position and size of the ShadowCursor
- USHORT nParaCnt; // number of paragraphs to insert
- USHORT nTabCnt; // number of tabs respectively size of indentation
- USHORT nSpaceCnt; // number of spaces to insert
- USHORT nColumnCnt; // number of necessary column breaks
- sal_Int16 eOrient; // paragraph alignment
+ sal_uInt16 nParaCnt; // number of paragraphs to insert
+ sal_uInt16 nTabCnt; // number of tabs respectively size of indentation
+ sal_uInt16 nSpaceCnt; // number of spaces to insert
+ sal_uInt16 nColumnCnt; // number of necessary column breaks
+ sal_Int16 eOrient; // paragraph alignment
SwFillMode eMode; // desired fill-up rule
SwFillCrsrPos( SwFillMode eMd = FILL_TAB ) :
nParaCnt( 0 ), nTabCnt( 0 ), nSpaceCnt( 0 ), nColumnCnt( 0 ),
@@ -70,7 +70,7 @@ struct Sw2LinesPos
SwRect aLine; // Position and size of the line
SwRect aPortion; // Position and size of the multi portion
SwRect aPortion2; // needed for nested multi portions
- BYTE nMultiType; // Multiportion type
+ sal_uInt8 nMultiType; // Multiportion type
};
/**
@@ -111,8 +111,8 @@ struct Sw2LinesPos
struct SwSpecialPos
{
xub_StrLen nCharOfst;
- USHORT nLineOfst;
- BYTE nExtendRange;
+ sal_uInt16 nLineOfst;
+ sal_uInt8 nExtendRange;
// #i27615#
SwSpecialPos() : nCharOfst(0), nLineOfst(0),
@@ -139,31 +139,31 @@ struct SwCrsrMoveState
SwSpecialPos* pSpecialPos; // for positions inside fields
Point aRealHeight; // contains then the position/height of the cursor
CrsrMoveState eState;
- BYTE nCursorBidiLevel;
- BOOL bStop :1;
- BOOL bRealHeight :1; // should the real height be calculated?
- BOOL bFieldInfo :1; // should be fields recognized?
- BOOL bPosCorr :1; // Point had to be corrected
- BOOL bFtnNoInfo :1; // recognized footnote numbering
- BOOL bExactOnly :1; // let GetCrsrOfst look for exact matches only,
+ sal_uInt8 nCursorBidiLevel;
+ sal_Bool bStop :1;
+ sal_Bool bRealHeight :1; // should the real height be calculated?
+ sal_Bool bFieldInfo :1; // should be fields recognized?
+ sal_Bool bPosCorr :1; // Point had to be corrected
+ sal_Bool bFtnNoInfo :1; // recognized footnote numbering
+ sal_Bool bExactOnly :1; // let GetCrsrOfst look for exact matches only,
// i.e. never let it run into GetCntntPos
- BOOL bFillRet :1; // only used temporary in FillMode
- BOOL bSetInReadOnly :1; // ReadOnly areas may be entered
- BOOL bRealWidth :1; // Calculation of the width required
- BOOL b2Lines :1; // Check 2line portions and fill p2Lines
- BOOL bNoScroll :1; // No scrolling of undersized textframes
- BOOL bPosMatchesBounds :1; // GetCrsrOfst should not return the next
+ sal_Bool bFillRet :1; // only used temporary in FillMode
+ sal_Bool bSetInReadOnly :1; // ReadOnly areas may be entered
+ sal_Bool bRealWidth :1; // Calculation of the width required
+ sal_Bool b2Lines :1; // Check 2line portions and fill p2Lines
+ sal_Bool bNoScroll :1; // No scrolling of undersized textframes
+ sal_Bool bPosMatchesBounds :1; // GetCrsrOfst should not return the next
// position if screen position is inside second
// have of bound rect
- BOOL bCntntCheck :1; // --> FME 2005-05-13 #i43742# Cursor position over content? <--
+ sal_Bool bCntntCheck :1; // --> FME 2005-05-13 #i43742# Cursor position over content? <--
// #i27615#
/**
cursor in front of label
*/
- BOOL bInFrontOfLabel :1;
- BOOL bInNumPortion :1; // point is in number portion #i23726#
+ sal_Bool bInFrontOfLabel :1;
+ sal_Bool bInNumPortion :1; // point is in number portion #i23726#
int nInNumPostionOffset; // distance from number portion's start
SwCrsrMoveState( CrsrMoveState eSt = MV_NONE ) :
@@ -172,20 +172,20 @@ struct SwCrsrMoveState
pSpecialPos( NULL ),
eState( eSt ),
nCursorBidiLevel( 0 ),
- bStop( FALSE ),
- bRealHeight( FALSE ),
- bFieldInfo( FALSE ),
- bPosCorr( FALSE ),
- bFtnNoInfo( FALSE ),
- bExactOnly( FALSE ),
- bSetInReadOnly( FALSE ),
- bRealWidth( FALSE ),
- b2Lines( FALSE ),
- bNoScroll( FALSE ),
- bPosMatchesBounds( FALSE ),
- bCntntCheck( FALSE ), // #i43742#
- bInFrontOfLabel( FALSE ), // #i27615#
- bInNumPortion(FALSE), // #i26726#
+ bStop( sal_False ),
+ bRealHeight( sal_False ),
+ bFieldInfo( sal_False ),
+ bPosCorr( sal_False ),
+ bFtnNoInfo( sal_False ),
+ bExactOnly( sal_False ),
+ bSetInReadOnly( sal_False ),
+ bRealWidth( sal_False ),
+ b2Lines( sal_False ),
+ bNoScroll( sal_False ),
+ bPosMatchesBounds( sal_False ),
+ bCntntCheck( sal_False ), // #i43742#
+ bInFrontOfLabel( sal_False ), // #i27615#
+ bInNumPortion(sal_False), // #i26726#
nInNumPostionOffset(0) // #i26726#
{}
SwCrsrMoveState( SwFillCrsrPos *pInitFill ) :
@@ -193,20 +193,20 @@ struct SwCrsrMoveState
pSpecialPos( NULL ),
eState( MV_SETONLYTEXT ),
nCursorBidiLevel( 0 ),
- bStop( FALSE ),
- bRealHeight( FALSE ),
- bFieldInfo( FALSE ),
- bPosCorr( FALSE ),
- bFtnNoInfo( FALSE ),
- bExactOnly( FALSE ),
- bSetInReadOnly( FALSE ),
- bRealWidth( FALSE ),
- b2Lines( FALSE ),
- bNoScroll( FALSE ),
- bPosMatchesBounds( FALSE ),
- bCntntCheck( FALSE ), // #i43742#
- bInFrontOfLabel( FALSE ), // #i27615#
- bInNumPortion(FALSE), // #i23726#
+ bStop( sal_False ),
+ bRealHeight( sal_False ),
+ bFieldInfo( sal_False ),
+ bPosCorr( sal_False ),
+ bFtnNoInfo( sal_False ),
+ bExactOnly( sal_False ),
+ bSetInReadOnly( sal_False ),
+ bRealWidth( sal_False ),
+ b2Lines( sal_False ),
+ bNoScroll( sal_False ),
+ bPosMatchesBounds( sal_False ),
+ bCntntCheck( sal_False ), // #i43742#
+ bInFrontOfLabel( sal_False ), // #i27615#
+ bInNumPortion(sal_False), // #i23726#
nInNumPostionOffset(0) // #i23726#
{}
};
diff --git a/sw/inc/cshtyp.hxx b/sw/inc/cshtyp.hxx
index f06d77fee4d6..a28f146123a0 100644
--- a/sw/inc/cshtyp.hxx
+++ b/sw/inc/cshtyp.hxx
@@ -49,19 +49,19 @@ extern SwPosPage fnPageStart, fnPageEnd;
// Direction-parameter for MovePara (initialized in SwCntntFrm).
typedef SwMoveFnCollection* SwPosPara;
-typedef BOOL (*SwWhichPara)( SwPaM&, SwPosPara );
+typedef sal_Bool (*SwWhichPara)( SwPaM&, SwPosPara );
extern SwWhichPara fnParaPrev, fnParaCurr, fnParaNext;
extern SwPosPara fnParaStart, fnParaEnd;
// Direction-parameter for MoveSection.
typedef SwMoveFnCollection* SwPosSection;
-typedef BOOL (*SwWhichSection)( SwPaM&, SwPosSection );
+typedef sal_Bool (*SwWhichSection)( SwPaM&, SwPosSection );
extern SwWhichSection fnSectionPrev, fnSectionCurr, fnSectionNext;
extern SwPosSection fnSectionStart, fnSectionEnd;
// Direction-parameter for MoveTable
typedef SwMoveFnCollection* SwPosTable;
-typedef BOOL (*SwWhichTable)( SwPaM&, SwPosTable, BOOL bInReadOnly );
+typedef sal_Bool (*SwWhichTable)( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
extern SwWhichTable fnTablePrev, fnTableCurr, fnTableNext;
extern SwPosTable fnTableStart, fnTableEnd;
@@ -73,7 +73,7 @@ extern SwPosColumn fnColumnStart, fnColumnEnd;
// Direction-parameter for MoveRegion (ranges!)
typedef SwMoveFnCollection* SwPosRegion;
-typedef BOOL (*SwWhichRegion)( SwPaM&, SwPosRegion, BOOL bInReadOnly );
+typedef sal_Bool (*SwWhichRegion)( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
extern SwWhichRegion fnRegionPrev, fnRegionCurr, fnRegionNext, fnRegionCurrAndSkip;
extern SwPosRegion fnRegionStart, fnRegionEnd;
diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx
index 9b2795f9149b..8273b39ce119 100644
--- a/sw/inc/dbfld.hxx
+++ b/sw/inc/dbfld.hxx
@@ -25,8 +25,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _DBFLD_HXX
-#define _DBFLD_HXX
+#ifndef SW_DBFLD_HXX
+#define SW_DBFLD_HXX
#include "swdllapi.h"
#include "fldbas.hxx"
@@ -61,8 +61,8 @@ public:
const String& GetColumnName() const {return sColumn;}
const SwDBData& GetDBData() const {return aDBData;}
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -74,30 +74,30 @@ class SW_DLLPUBLIC SwDBField : public SwValueField
{
String aContent;
String sFieldCode; // contains Word's field code
- USHORT nSubType;
- BOOL bIsInBodyTxt : 1;
- BOOL bValidValue : 1;
- BOOL bInitialized : 1;
+ sal_uInt16 nSubType;
+ sal_Bool bIsInBodyTxt : 1;
+ sal_Bool bValidValue : 1;
+ sal_Bool bInitialized : 1;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
public:
- SwDBField(SwDBFieldType*, ULONG nFmt = 0);
+ SwDBField(SwDBFieldType*, sal_uLong nFmt = 0);
virtual ~SwDBField();
virtual SwFieldType* ChgTyp( SwFieldType* );
// Current text.
inline void SetExpansion(const String& rStr);
- virtual String Expand() const;
- virtual SwField* Copy() const;
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT nType);
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nType);
- // Name or content.
- virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String GetFieldName() const;
// For calculations in expressions.
- void ChgValue( double d, BOOL bVal );
+ void ChgValue( double d, sal_Bool bVal );
// Get the evaluation via DBMgr string.
void Evaluate();
@@ -107,11 +107,11 @@ public:
void InitContent();
void InitContent(const String& rExpansion);
- inline void ChgBodyTxtFlag( BOOL bIsInBody );
+ inline void ChgBodyTxtFlag( sal_Bool bIsInBody );
- inline BOOL IsInitialized() const { return bInitialized; }
- inline void ClearInitialized() { bInitialized = FALSE; }
- inline void SetInitialized() { bInitialized = TRUE; }
+ inline sal_Bool IsInitialized() const { return bInitialized; }
+ inline void ClearInitialized() { bInitialized = sal_False; }
+ inline void SetInitialized() { bInitialized = sal_True; }
// Get name.
virtual const String& GetPar1() const;
@@ -124,15 +124,15 @@ public:
// DBName
inline const SwDBData& GetDBData() const { return ((SwDBFieldType*)GetTyp())->GetDBData(); }
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
inline void SwDBField::SetExpansion(const String& rStr)
{ aContent = rStr; }
// set from UpdateExpFlds (the Node-Position is known there)
-inline void SwDBField::ChgBodyTxtFlag( BOOL bIsInBody )
+inline void SwDBField::ChgBodyTxtFlag( sal_Bool bIsInBody )
{ bIsInBodyTxt = bIsInBody; }
/*--------------------------------------------------------------------
@@ -142,13 +142,13 @@ inline void SwDBField::ChgBodyTxtFlag( BOOL bIsInBody )
class SW_DLLPUBLIC SwDBNameInfField : public SwField
{
SwDBData aDBData;
- USHORT nSubType;
+ sal_uInt16 nSubType;
protected:
const SwDBData& GetDBData() const {return aDBData;}
SwDBData& GetDBData() {return aDBData;}
- SwDBNameInfField(SwFieldType* pTyp, const SwDBData& rDBData, ULONG nFmt = 0);
+ SwDBNameInfField(SwFieldType* pTyp, const SwDBData& rDBData, sal_uLong nFmt = 0);
public:
// DBName
@@ -157,12 +157,12 @@ public:
SwDBData GetDBData(SwDoc* pDoc);
void SetDBData(const SwDBData& rDBData);
- // Name or content.
- virtual String GetCntnt(BOOL bName = FALSE) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT nType);
+ virtual String GetFieldName() const;
+
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nType);
};
/*--------------------------------------------------------------------
@@ -184,7 +184,7 @@ public:
class SW_DLLPUBLIC SwDBNextSetField : public SwDBNameInfField
{
String aCond;
- BOOL bCondValid;
+ sal_Bool bCondValid;
public:
SwDBNextSetField( SwDBNextSetFieldType*,
@@ -194,20 +194,20 @@ public:
virtual SwField* Copy() const;
void Evaluate(SwDoc*);
- inline void SetCondValid(BOOL bCond);
- inline BOOL IsCondValid() const;
+ inline void SetCondValid(sal_Bool bCond);
+ inline sal_Bool IsCondValid() const;
// Condition
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
-inline BOOL SwDBNextSetField::IsCondValid() const
+inline sal_Bool SwDBNextSetField::IsCondValid() const
{ return bCondValid; }
-inline void SwDBNextSetField::SetCondValid(BOOL bCond)
+inline void SwDBNextSetField::SetCondValid(sal_Bool bCond)
{ bCondValid = bCond; }
/*--------------------------------------------------------------------
@@ -231,7 +231,7 @@ class SwDBNumSetField : public SwDBNameInfField
{
String aCond;
String aPar2;
- BOOL bCondValid;
+ sal_Bool bCondValid;
public:
SwDBNumSetField(SwDBNumSetFieldType*, const String& rCond, const String& rDBNum, const SwDBData& rDBData);
@@ -239,8 +239,8 @@ public:
virtual String Expand() const;
virtual SwField* Copy() const;
- inline BOOL IsCondValid() const;
- inline void SetCondValid(BOOL bCond);
+ inline sal_Bool IsCondValid() const;
+ inline void SetCondValid(sal_Bool bCond);
void Evaluate(SwDoc*);
// Condition
@@ -252,14 +252,14 @@ public:
virtual void SetPar2(const String& rStr);
// Number of data record is in nFormat!!
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
-inline BOOL SwDBNumSetField::IsCondValid() const
+inline sal_Bool SwDBNumSetField::IsCondValid() const
{ return bCondValid; }
-inline void SwDBNumSetField::SetCondValid(BOOL bCond)
+inline void SwDBNumSetField::SetCondValid(sal_Bool bCond)
{ bCondValid = bCond; }
/*--------------------------------------------------------------------
@@ -272,7 +272,7 @@ class SwDBNameFieldType : public SwFieldType
public:
SwDBNameFieldType(SwDoc*);
- String Expand(ULONG) const;
+ String Expand(sal_uLong) const;
virtual SwFieldType* Copy() const;
};
@@ -283,12 +283,12 @@ public:
class SW_DLLPUBLIC SwDBNameField : public SwDBNameInfField
{
public:
- SwDBNameField(SwDBNameFieldType*, const SwDBData& rDBData, ULONG nFmt = 0);
+ SwDBNameField(SwDBNameFieldType*, const SwDBData& rDBData, sal_uLong nFmt = 0);
virtual String Expand() const;
virtual SwField* Copy() const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -312,7 +312,7 @@ class SW_DLLPUBLIC SwDBSetNumberField : public SwDBNameInfField
long nNumber;
public:
- SwDBSetNumberField(SwDBSetNumberFieldType*, const SwDBData& rDBData, ULONG nFmt = 0);
+ SwDBSetNumberField(SwDBSetNumberFieldType*, const SwDBData& rDBData, sal_uLong nFmt = 0);
virtual String Expand() const;
virtual SwField* Copy() const;
@@ -320,8 +320,8 @@ public:
inline long GetSetNumber() const;
inline void SetSetNumber(long nNum);
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
inline long SwDBSetNumberField::GetSetNumber() const
@@ -330,6 +330,6 @@ inline long SwDBSetNumberField::GetSetNumber() const
inline void SwDBSetNumberField::SetSetNumber(long nNum)
{ nNumber = nNum; }
-#endif // _DBFLD_HXX
+#endif // SW_DBFLD_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/dbgoutsw.hxx b/sw/inc/dbgoutsw.hxx
index 11a30f4e026f..fdedacbb5232 100644
--- a/sw/inc/dbgoutsw.hxx
+++ b/sw/inc/dbgoutsw.hxx
@@ -48,7 +48,6 @@ struct SwPosition;
class SwPaM;
class SwNodeNum;
class SwUndo;
-class SwUndos;
class SwRect;
class SwFrmFmt;
class SwFrmFmts;
@@ -87,7 +86,6 @@ SW_DLLPUBLIC const char * dbg_out(const SwPosition & rPos);
SW_DLLPUBLIC const char * dbg_out(const SwPaM & rPam);
SW_DLLPUBLIC const char * dbg_out(const SwNodeNum & rNum);
SW_DLLPUBLIC const char * dbg_out(const SwUndo & rUndo);
-SW_DLLPUBLIC const char * dbg_out(const SwUndos & rUndos);
SW_DLLPUBLIC const char * dbg_out(const SwRewriter & rRewriter);
SW_DLLPUBLIC const char * dbg_out(const SwNumRule & rRule);
SW_DLLPUBLIC const char * dbg_out(const SwTxtFmtColl & rFmt);
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 0b47de63a758..3c16000c5f89 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -74,7 +74,6 @@ struct SwDBFormatData
class SwView;
class SwWrtShell;
-class SwPrtOptions;
class SfxProgress;
class ListBox;
class Button;
@@ -114,16 +113,16 @@ struct SwDSParam : public SwDBData
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XStatement> xStatement;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xResultSet;
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aSelection;
- BOOL bScrollable;
- BOOL bEndOfDB;
- BOOL bAfterSelection;
+ sal_Bool bScrollable;
+ sal_Bool bEndOfDB;
+ sal_Bool bAfterSelection;
long nSelectionIndex;
SwDSParam(const SwDBData& rData) :
SwDBData(rData),
- bScrollable(FALSE),
- bEndOfDB(FALSE),
- bAfterSelection(FALSE),
+ bScrollable(sal_False),
+ bEndOfDB(sal_False),
+ bAfterSelection(sal_False),
nSelectionIndex(0)
{}
@@ -133,16 +132,16 @@ struct SwDSParam : public SwDBData
SwDBData(rData),
xResultSet(xResSet),
aSelection(rSelection),
- bScrollable(TRUE),
- bEndOfDB(FALSE),
- bAfterSelection(FALSE),
+ bScrollable(sal_True),
+ bEndOfDB(sal_False),
+ bAfterSelection(sal_False),
nSelectionIndex(0)
{}
void CheckEndOfDB()
{
if(bEndOfDB)
- bAfterSelection = TRUE;
+ bAfterSelection = sal_True;
}
};
typedef SwDSParam* SwDSParamPtr;
@@ -150,7 +149,7 @@ SV_DECL_PTRARR_DEL(SwDSParamArr, SwDSParamPtr, 0, 5)
struct SwMergeDescriptor
{
- USHORT nMergeType;
+ sal_uInt16 nMergeType;
SwWrtShell& rSh;
const ::svx::ODataAccessDescriptor& rDescriptor;
String sSaveToFilter; //export filter to save resulting files
@@ -176,7 +175,7 @@ struct SwMergeDescriptor
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aPrintOptions;
- SwMergeDescriptor( USHORT nType, SwWrtShell& rShell, ::svx::ODataAccessDescriptor& rDesc ) :
+ SwMergeDescriptor( sal_uInt16 nType, SwWrtShell& rShell, ::svx::ODataAccessDescriptor& rDesc ) :
nMergeType(nType),
rSh(rShell),
rDescriptor(rDesc),
@@ -202,21 +201,21 @@ friend class SwConnectionDisposedListener_Impl;
String sEMailAddrFld; // Mailing: Column name of email address.
String sSubject; // Mailing: Subject
String sAttached; // Mailing: Attached Files.
- USHORT nMergeType;
- BOOL bInitDBFields : 1;
- BOOL bSingleJobs : 1; // Printing job when called from Basic.
- BOOL bCancel : 1; // Mail merge save canceled.
-
- BOOL bInMerge : 1; //merge process active
- BOOL bMergeSilent : 1; // suppress display of dialogs/boxes (used when called over API)
- BOOL bMergeLock : 1; // prevent update of database fields while document is
+ sal_uInt16 nMergeType;
+ sal_Bool bInitDBFields : 1;
+ sal_Bool bSingleJobs : 1; // Printing job when called from Basic.
+ sal_Bool bCancel : 1; // Mail merge save canceled.
+
+ sal_Bool bInMerge : 1; //merge process active
+ sal_Bool bMergeSilent : 1; // suppress display of dialogs/boxes (used when called over API)
+ sal_Bool bMergeLock : 1; // prevent update of database fields while document is
// actually printed at the ViewShell
SwDSParamArr aDataSourceParams;
SwNewDBMgr_Impl* pImpl;
const SwXMailMerge* pMergeEvtSrc; // != 0 if mail merge events are to be send
- SW_DLLPRIVATE SwDSParam* FindDSData(const SwDBData& rData, BOOL bCreate);
- SW_DLLPRIVATE SwDSParam* FindDSConnection(const ::rtl::OUString& rSource, BOOL bCreate);
+ SW_DLLPRIVATE SwDSParam* FindDSData(const SwDBData& rData, sal_Bool bCreate);
+ SW_DLLPRIVATE SwDSParam* FindDSConnection(const ::rtl::OUString& rSource, sal_Bool bCreate);
SW_DLLPRIVATE DECL_LINK( PrtCancelHdl, Button * );
@@ -228,36 +227,36 @@ friend class SwConnectionDisposedListener_Impl;
SW_DLLPRIVATE void ImportDBEntry(SwWrtShell* pSh);
// merge to file _and_ merge to e-Mail
- SW_DLLPRIVATE BOOL MergeMailFiles(SwWrtShell* pSh,
+ SW_DLLPRIVATE sal_Bool MergeMailFiles(SwWrtShell* pSh,
const SwMergeDescriptor& rMergeDescriptor );
- SW_DLLPRIVATE BOOL ToNextRecord(SwDSParam* pParam);
+ SW_DLLPRIVATE sal_Bool ToNextRecord(SwDSParam* pParam);
public:
SwNewDBMgr();
~SwNewDBMgr();
// Current merge type. Cf. DBMgrOptions-enum.
- inline USHORT GetMergeType() const { return nMergeType; }
- inline void SetMergeType( USHORT nTyp ) { nMergeType = nTyp; }
+ inline sal_uInt16 GetMergeType() const { return nMergeType; }
+ inline void SetMergeType( sal_uInt16 nTyp ) { nMergeType = nTyp; }
// MailMergeEvent source
const SwXMailMerge * GetMailMergeEvtSrc() const { return pMergeEvtSrc; }
void SetMailMergeEvtSrc( const SwXMailMerge *pSrc ) { pMergeEvtSrc = pSrc; }
- inline BOOL IsMergeSilent() const { return bMergeSilent != 0; }
- inline void SetMergeSilent( BOOL bVal ) { bMergeSilent = bVal; }
+ inline sal_Bool IsMergeSilent() const { return bMergeSilent != 0; }
+ inline void SetMergeSilent( sal_Bool bVal ) { bMergeSilent = bVal; }
// Merging of data records into fields.
- BOOL MergeNew( const SwMergeDescriptor& rMergeDesc );
- BOOL Merge(SwWrtShell* pSh);
+ sal_Bool MergeNew( const SwMergeDescriptor& rMergeDesc );
+ sal_Bool Merge(SwWrtShell* pSh);
// Initialize data fields that lack name of database.
- inline BOOL IsInitDBFields() const { return bInitDBFields; }
- inline void SetInitDBFields(BOOL b) { bInitDBFields = b; }
+ inline sal_Bool IsInitDBFields() const { return bInitDBFields; }
+ inline void SetInitDBFields(sal_Bool b) { bInitDBFields = b; }
// Print / Save mail merge one by one or all together.
- inline BOOL IsSingleJobs() const { return bSingleJobs; }
- inline void SetSingleJobs(BOOL b) { bSingleJobs = b; }
+ inline sal_Bool IsSingleJobs() const { return bSingleJobs; }
+ inline void SetSingleJobs(sal_Bool b) { bSingleJobs = b; }
// Mailing: Set email data.
inline void SetEMailColumn(const String& sColName) { sEMailAddrFld = sColName; }
@@ -266,22 +265,22 @@ public:
// Fill listbox with all table names of a database.
- BOOL GetTableNames(ListBox* pListBox, const String& rDBName );
+ sal_Bool GetTableNames(ListBox* pListBox, const String& rDBName );
// Fill listbox with all column names of a database table.
- BOOL GetColumnNames(ListBox* pListBox,
- const String& rDBName, const String& rTableName, BOOL bAppend = FALSE);
- BOOL GetColumnNames(ListBox* pListBox,
+ sal_Bool GetColumnNames(ListBox* pListBox,
+ const String& rDBName, const String& rTableName, sal_Bool bAppend = sal_False);
+ sal_Bool GetColumnNames(ListBox* pListBox,
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> xConnection,
- const String& rTableName, BOOL bAppend = FALSE);
+ const String& rTableName, sal_Bool bAppend = sal_False);
- ULONG GetColumnFmt( ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> xSource,
+ sal_uLong GetColumnFmt( ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> xSource,
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> xConnection,
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xColumn,
SvNumberFormatter* pNFmtr,
long nLanguage );
- ULONG GetColumnFmt( const String& rDBName,
+ sal_uLong GetColumnFmt( const String& rDBName,
const String& rTableName,
const String& rColNm,
SvNumberFormatter* pNFmtr,
@@ -290,25 +289,25 @@ public:
const String& rTableName,
const String& rColNm );
- inline BOOL IsInMerge() const { return bInMerge; }
+ inline sal_Bool IsInMerge() const { return bInMerge; }
void EndMerge();
void ExecuteFormLetter(SwWrtShell& rSh,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties,
- BOOL bWithDataSourceBrowser = FALSE);
+ sal_Bool bWithDataSourceBrowser = sal_False);
void InsertText(SwWrtShell& rSh,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties);
// check if a data source is open
- BOOL IsDataSourceOpen(const String& rDataSource,
+ sal_Bool IsDataSourceOpen(const String& rDataSource,
const String& rTableOrQuery, sal_Bool bMergeOnly);
// open the source while fields are updated - for the calculator only!
- BOOL OpenDataSource(const String& rDataSource, const String& rTableOrQuery,
+ sal_Bool OpenDataSource(const String& rDataSource, const String& rTableOrQuery,
sal_Int32 nCommandType = -1, bool bCreate = false);
sal_uInt32 GetSelectedRecordId(const String& rDataSource, const String& rTableOrQuery, sal_Int32 nCommandType = -1);
- BOOL GetColumnCnt(const String& rSourceName, const String& rTableName,
+ sal_Bool GetColumnCnt(const String& rSourceName, const String& rTableName,
const String& rColumnName, sal_uInt32 nAbsRecordId, long nLanguage,
String& rResult, double* pNumber);
//create and store or find an already stored connection to a data source for use
@@ -317,19 +316,19 @@ public:
RegisterConnection(::rtl::OUString& rSource);
const SwDSParam* CreateDSData(const SwDBData& rData)
- {return FindDSData(rData, TRUE);}
+ {return FindDSData(rData, sal_True);}
const SwDSParamArr& GetDSParamArray() const {return aDataSourceParams;}
//close all data sources - after fields were updated
- void CloseAll(BOOL bIncludingMerge = TRUE);
+ void CloseAll(sal_Bool bIncludingMerge = sal_True);
- BOOL GetMergeColumnCnt(const String& rColumnName, USHORT nLanguage,
+ sal_Bool GetMergeColumnCnt(const String& rColumnName, sal_uInt16 nLanguage,
String &rResult, double *pNumber, sal_uInt32 *pFormat);
- BOOL ToNextMergeRecord();
- BOOL ToNextRecord(const String& rDataSource, const String& rTableOrQuery, sal_Int32 nCommandType = -1);
+ sal_Bool ToNextMergeRecord();
+ sal_Bool ToNextRecord(const String& rDataSource, const String& rTableOrQuery, sal_Int32 nCommandType = -1);
- BOOL ExistsNextRecord()const;
+ sal_Bool ExistsNextRecord()const;
sal_uInt32 GetSelectedRecordId();
sal_Bool ToRecordId(sal_Int32 nSet);
@@ -347,7 +346,7 @@ public:
static ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier>
GetColumnSupplier(::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>,
const String& rTableOrQuery,
- BYTE eTableOrQuery = SW_DB_SELECT_UNKNOWN);
+ sal_uInt8 eTableOrQuery = SW_DB_SELECT_UNKNOWN);
static ::com::sun::star::uno::Sequence<rtl::OUString> GetExistingDatabaseNames();
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index 4509c1e60cf8..07044bce0182 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -76,7 +76,7 @@ SwRect GetBoundRectOfAnchoredObj( const SdrObject* pObj );
SwContact* GetUserCall( const SdrObject* );
// Returns TRUE if the SrdObject is a Marquee object.
-BOOL IsMarqueeTextObj( const SdrObject& rObj );
+sal_Bool IsMarqueeTextObj( const SdrObject& rObj );
// Base class for the following contact objects (frame + draw objects).
class SwContact : public SdrObjUserCall, public SwClient
@@ -306,7 +306,7 @@ class SwDrawVirtObj : public SdrVirtObj
virtual ::basegfx::B2DPolyPolygon TakeXorPoly() const;
virtual ::basegfx::B2DPolyPolygon TakeContour() const;
virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const;
- virtual SdrHdl* GetPlusHdl(const SdrHdl& rHdl, USHORT nPlNum) const;
+ virtual SdrHdl* GetPlusHdl(const SdrHdl& rHdl, sal_uInt16 nPlNum) const;
virtual void NbcMove(const Size& rSiz);
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs);
@@ -373,7 +373,7 @@ class SwDrawContact : public SwContact
// method <_Changed(..)>
bool mbUserCallActive : 1;
// event type, which is handled for <mpSdrObjHandledByCurrentUserCall>.
- // Note: value only valid, if <mbUserCallActive> is TRUE.
+ // Note: value only valid, if <mbUserCallActive> is sal_True.
SdrUserCallType meEventTypeOfCurrentUserCall;
friend class NestedUserCallHdl;
diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx
index 1d87806fd238..877377ab3d74 100644
--- a/sw/inc/ddefld.hxx
+++ b/sw/inc/ddefld.hxx
@@ -25,8 +25,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _DDEFLD_HXX
-#define _DDEFLD_HXX
+#ifndef SW_DDEFLD_HXX
+#define SW_DDEFLD_HXX
#include <sfx2/lnkbase.hxx>
#include "swdllapi.h"
@@ -46,35 +46,35 @@ class SW_DLLPUBLIC SwDDEFieldType : public SwFieldType
::sfx2::SvBaseLinkRef refLink;
SwDoc* pDoc;
- USHORT nRefCnt;
- BOOL bCRLFFlag : 1;
- BOOL bDeleted : 1;
+ sal_uInt16 nRefCnt;
+ sal_Bool bCRLFFlag : 1;
+ sal_Bool bDeleted : 1;
SW_DLLPRIVATE void _RefCntChgd();
public:
SwDDEFieldType( const String& rName, const String& rCmd,
- USHORT = sfx2::LINKUPDATE_ONCALL );
+ sal_uInt16 = sfx2::LINKUPDATE_ONCALL );
~SwDDEFieldType();
const String& GetExpansion() const { return aExpansion; }
void SetExpansion( const String& rStr ) { aExpansion = rStr,
- bCRLFFlag = FALSE; }
+ bCRLFFlag = sal_False; }
virtual SwFieldType* Copy() const;
virtual const String& GetName() const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
String GetCmd() const;
void SetCmd( const String& rStr );
- USHORT GetType() const { return refLink->GetUpdateMode(); }
- void SetType( USHORT nType ) { refLink->SetUpdateMode( nType ); }
+ sal_uInt16 GetType() const { return refLink->GetUpdateMode(); }
+ void SetType( sal_uInt16 nType ) { refLink->SetUpdateMode( nType ); }
- BOOL IsDeleted() const { return bDeleted; }
- void SetDeleted( BOOL b ) { bDeleted = b; }
+ sal_Bool IsDeleted() const { return bDeleted; }
+ void SetDeleted( sal_Bool b ) { bDeleted = b; }
void UpdateNow() { refLink->Update(); }
void Disconnect() { refLink->Disconnect(); }
@@ -89,7 +89,7 @@ public:
void IncRefCnt() { if( !nRefCnt++ && pDoc ) _RefCntChgd(); }
void DecRefCnt() { if( !--nRefCnt && pDoc ) _RefCntChgd(); }
- void SetCRLFDelFlag( BOOL bFlag = TRUE ) { bCRLFFlag = bFlag; }
+ void SetCRLFDelFlag( sal_Bool bFlag = sal_True ) { bCRLFFlag = bFlag; }
};
/*--------------------------------------------------------------------
@@ -98,13 +98,14 @@ public:
class SwDDEField : public SwField
{
+private:
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
public:
SwDDEField(SwDDEFieldType*);
~SwDDEField();
- virtual String Expand() const;
- virtual SwField* Copy() const;
-
// Get parameter via types.
// Name cannot be changed.
virtual const String& GetPar1() const;
@@ -115,6 +116,6 @@ public:
};
-#endif // _DDEFLD_HXX
+#endif // SW_DDEFLD_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 604c4bfdbfdd..44480a7012b7 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -25,8 +25,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _DOC_HXX
-#define _DOC_HXX
+#ifndef SW_DOC_HXX
+#define SW_DOC_HXX
/** SwDoc interfaces */
@@ -35,7 +35,6 @@
#include <IDocumentDeviceAccess.hxx>
#include <IDocumentMarkAccess.hxx>
#include <IDocumentRedlineAccess.hxx>
-#include <IDocumentUndoRedo.hxx>
#include <IDocumentLinksAdministration.hxx>
#include <IDocumentFieldsAccess.hxx>
#include <IDocumentContentOperations.hxx>
@@ -62,7 +61,6 @@ class SwList;
#include <sal/macros.h>
#include "swdllapi.h"
#include <swtypes.hxx>
-#include <ndarr.hxx>
#include <swatrset.hxx>
#include <toxe.hxx> // enums
#include <flyenum.hxx>
@@ -73,6 +71,7 @@ class SwList;
#include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
#include <rtl/ref.hxx>
#include <svx/svdtypes.hxx>
+#include <sfx2/objsh.hxx>
#include <svl/style.hxx>
#include <editeng/numitem.hxx>
#include "comphelper/implementationreference.hxx"
@@ -91,8 +90,6 @@ class SwList;
#include <boost/scoped_ptr.hpp>
-class SfxObjectShell;
-class SfxObjectShellRef;
class SvxForbiddenCharactersTable;
class SwExtTextInput;
class DateTime;
@@ -152,6 +149,7 @@ class SwNewDBMgr;
class SwNoTxtNode;
class SwNodeIndex;
class SwNodeRange;
+class SwNodes;
class SwNumRule;
class SwNumRuleTbl;
class SwPageDesc;
@@ -185,10 +183,6 @@ class SwTextBlocks;
class SwTxtFmtColl;
class SwTxtFmtColls;
class SwURLStateChanged;
-class SwUndo;
-class SwUndoIds;
-class SwUndoIter;
-class SwUndos;
class SwUnoCrsr;
class SwUnoCrsrTbl;
class ViewShell;
@@ -218,12 +212,15 @@ class SwPrintData;
class SwRenderData;
class SwPageFrm;
class SwViewOption;
+class IDocumentUndoRedo;
namespace sw { namespace mark {
class MarkManager;
}}
namespace sw {
class MetaFieldManager;
+ class UndoManager;
+ class IShellCursorSupplier;
}
namespace com { namespace sun { namespace star {
@@ -259,7 +256,6 @@ class SW_DLLPUBLIC SwDoc :
public IDocumentSettingAccess,
public IDocumentDeviceAccess,
public IDocumentRedlineAccess,
- public IDocumentUndoRedo,
public IDocumentLinksAdministration,
public IDocumentFieldsAccess,
public IDocumentContentOperations,
@@ -283,9 +279,8 @@ class SW_DLLPUBLIC SwDoc :
//---------------- private Member --------------------------------
// -------------------------------------------------------------------
- SwNodes aNodes; // document content
- SwNodes aUndoNodes; // content for undo
- SwAttrPool* mpAttrPool; // attribute pool
+ ::boost::scoped_ptr<SwNodes> m_pNodes; /// document content (Nodes Array)
+ SwAttrPool* mpAttrPool; // der Attribut Pool
SwPageDescs aPageDescs; // PageDescriptors
Link aOle2Link; // OLE 2.0-notification
/* @@@MAINTAINABILITY-HORROR@@@
@@ -303,6 +298,7 @@ class SW_DLLPUBLIC SwDoc :
const ::boost::scoped_ptr< ::sw::mark::MarkManager> pMarkManager;
const ::boost::scoped_ptr< ::sw::MetaFieldManager > m_pMetaFieldManager;
+ const ::boost::scoped_ptr< ::sw::UndoManager > m_pUndoManager;
// -------------------------------------------------------------------
// Pointer
@@ -328,8 +324,6 @@ class SW_DLLPUBLIC SwDoc :
SwRootFrm *pLayout; // Rootframe of the specific layout.
SdrModel *pDrawModel; // StarView Drawing
- SwUndos *pUndos; // Undo/Redo History
-
SwDocUpdtFld *pUpdtFlds; // Struct for updating fields
SwFldTypes *pFldTypes;
SwNewDBMgr *pNewDBMgr; // Pointer to the new DBMgr for
@@ -350,8 +344,8 @@ class SW_DLLPUBLIC SwDoc :
SvxMacroTableDtor *pMacroTable; // table of macros.
SwDocShell *pDocShell; // Ptr to SfxDocShell of Doc.
- SfxObjectShellRef* pDocShRef; // For copying OLE-nodes. (If no DocShell
- // is set, this Ref-Pointer must be set!!).
+ SfxObjectShellLock xTmpDocShell; // A temporary shell that is used to copy OLE-Nodes
+
sfx2::LinkManager *pLinkMgr; // List of linked stuff (graphics/DDE/OLE).
@@ -412,9 +406,6 @@ private:
// -------------------------------------------------------------------
// other
- sal_uInt16 nUndoPos; // act. Undo-InsertPosition (for Redo!).
- sal_uInt16 nUndoSavePos; // Position in Undo-Array, at which document.
- // is regarded as not modified.
sal_uInt16 nUndoCnt; // Count of Undo Actions.
sal_uInt16 nUndoSttEnd; // != 0 -> within parentheses.
@@ -449,15 +440,12 @@ private:
// and unfortunately temorarily also in
// SwSwgReader::InLayout() when flawed
// frames need deletion.
- bool mbUndo : 1; // TRUE: Undo switched on.
- bool mbGroupUndo : 1; // TRUE: Undos are grouped.
bool mbPageNums : 1; // TRUE: There are virtual page numbers.
bool mbLoaded : 1; // TRUE: Doc loaded.
bool mbUpdateExpFld : 1; // TRUE: Update expression fields.
bool mbNewDoc : 1; // TRUE: new Doc.
bool mbNewFldLst : 1; // TRUE: Rebuild field-list.
bool mbCopyIsMove : 1; // TRUE: Copy is a hidden Move.
- bool mbNoDrawUndoObj : 1; // TRUE: Do not save DrawUndoObjects.
bool mbVisibleLinks : 1; // TRUE: Links are inserted visibly.
bool mbBrowseMode : 1; // TRUE: Show document in browser mode.
bool mbInReading : 1; // TRUE: Document is in the process of being read.
@@ -477,9 +465,9 @@ private:
bool mbIsRedlineMove : 1; // True: Redlines are moved into to / out of the section.
bool mbInsOnlyTxtGlssry : 1; // True: insert 'only text' glossary into doc
bool mbContains_MSVBasic : 1; // True: MS-VBasic exist is in our storage
- bool mbPurgeOLE : 1; // TRUE: Purge OLE-Objects.
- bool mbKernAsianPunctuation : 1; // TRUE: kerning also for ASIAN punctuation.
- bool mbReadlineChecked : 1; // TRUE: if the query was already shown.
+ bool mbPurgeOLE : 1; // sal_True: Purge OLE-Objects
+ bool mbKernAsianPunctuation : 1; // sal_True: kerning also for ASIAN punctuation
+ bool mbReadlineChecked : 1; // sal_True: if the query was already shown
bool mbLinksUpdated : 1; // #i38810#
// flag indicating, that the links have been updated.
bool mbClipBoard : 1; // TRUE: this document represents the clipboard
@@ -487,7 +475,7 @@ private:
// (clipboard docs only)
#if OSL_DEBUG_LEVEL > 1
- bool mbXMLExport : 1; // TRUE: during XML export
+ bool mbXMLExport : 1; // sal_True: during XML export
#endif
// Document flag to trigger conversion, which applys the workaround for documents,
@@ -504,59 +492,59 @@ private:
// HISTORY OF THE COMPATIBILITY FLAGS:
//
// SO5:
- // mbParaSpaceMax def = FALSE, TRUE since SO8
- // mbParaSpaceMaxAtPages def = FALSE, TRUE since SO8
+ // mbParaSpaceMax def = sal_False, sal_True since SO8
+ // mbParaSpaceMaxAtPages def = sal_False, sal_True since SO8
//
// SO6:
- // mbTabCompat def = FALSE, TRUE since SO8
+ // mbTabCompat def = sal_False, sal_True since SO8
//
// SO7:
- // mbUseVirtualDevice def = TRUE
- // mbAddFlyOffsets def = FALSE, hidden
+ // mbUseVirtualDevice def = sal_True
+ // mbAddFlyOffsets def = sal_False, hidden
//
// SO7pp1:
- // bOldNumbering def = FALSE, hidden
+ // bOldNumbering def = sal_False, hidden
//
// SO8:
- // mbAddExternalLeading def = TRUE
- // mbUseHiResolutionVirtualDevice def = TRUE, hidden
- // mbOldLineSpacing def = FALSE
- // mbAddParaSpacingToTableCells def = TRUE
- // mbUseFormerObjectPos def = FALSE
- // mbUseFormerTextWrapping def = FALSE
- // mbConsiderWrapOnObjPos def = FALSE
+ // mbAddExternalLeading def = sal_True
+ // mbUseHiResolutionVirtualDevice def = sal_True, hidden
+ // mbOldLineSpacing def = sal_False
+ // mbAddParaSpacingToTableCells def = sal_True
+ // mbUseFormerObjectPos def = sal_False
+ // mbUseFormerTextWrapping def = sal_False
+ // mbConsiderWrapOnObjPos def = sal_False
//
// SO8pp1:
- // mbIgnoreFirstLineIndentInNumbering def = FALSE, hidden
- // mbDoNotJustifyLinesWithManualBreak def = FALSE, hidden
- // mbDoNotResetParaAttrsForNumFont def = FALSE, hidden
+ // mbIgnoreFirstLineIndentInNumbering def = sal_False, hidden
+ // mbDoNotJustifyLinesWithManualBreak def = sal_False, hidden
+ // mbDoNotResetParaAttrsForNumFont def = sal_False, hidden
//
// SO8pp3
- // mbDoNotCaptureDrawObjsOnPage def = FALSE, hidden
+ // mbDoNotCaptureDrawObjsOnPage def = sal_False, hidden
// - Relevant for drawing objects, which don't follow the text flow, but
// whose position is outside the page area:
- // FALSE: Such drawing objects are captured on the page area of its anchor.
- // TRUE: Such drawing objects can leave the page area, they aren't captured.
- // mbTableRowKeep def = FALSE, hidden
- // mbIgnoreTabsAndBlanksForLineCalculation def = FALSE, hidden
- // mbClipAsCharacterAnchoredWriterFlyFrame def = FALSE, hidden
+ // sal_False: Such drawing objects are captured on the page area of its anchor.
+ // sal_True: Such drawing objects can leave the page area, they aren't captured.
+ // mbTableRowKeep def = sal_False, hidden
+ // mbIgnoreTabsAndBlanksForLineCalculation def = sal_False, hidden
+ // mbClipAsCharacterAnchoredWriterFlyFrame def = sal_False, hidden
// - Introduced in order to re-activate clipping of as-character anchored
// Writer fly frames in method <SwFlyInCntFrm::MakeAll()> for documents,
// which are created with version prior SO8/OOo 2.0
//
// SO8pp4
- // mbUnixForceZeroExtLeading def = FALSE, hidden
+ // mbUnixForceZeroExtLeading def = sal_False, hidden
//
// SO8pu8
- // mbOldPrinterMetrics def = FALSE, hidden
+ // mbOldPrinterMetrics def = sal_False, hidden
//
// SO9
// #i24363# tab stops relative to indent
- // mbTabRelativeToIndent def = TRUE, hidden
+ // mbTabRelativeToIndent def = sal_True, hidden
// #i89181# suppress tab stop at left indent for paragraphs in lists, whose
// list level position and space mode equals LABEL_ALIGNMENT and whose list
// label is followed by a tab character.
- // mbTabAtLeftIndentForParagraphsInList def = FALSE, hidden
+ // mbTabAtLeftIndentForParagraphsInList def = sal_False, hidden
bool mbParaSpaceMax : 1;
bool mbParaSpaceMaxAtPages : 1;
@@ -570,10 +558,10 @@ private:
bool mbUseFormerObjectPos : 1; // #i11860#
bool mbUseFormerTextWrapping : 1;
bool mbConsiderWrapOnObjPos : 1; // #i28701#
- // TRUE: object positioning algorithm has
- // to consider the wrapping style of
+ // sal_True: object positioning algorithm has consider the wrapping style of // the floating screen objects as given by its attribute 'WrapInfluenceOnObjPos'
// floating screen objects as given by its
// attribute 'WrapInfluenceOnObjPos'.
+ bool mbMathBaselineAlignment : 1; // TL 2010-10-29 #i972#
// non-ui-compatibility flags:
bool mbOldNumbering : 1;
@@ -602,13 +590,10 @@ private:
sal_Bool mbStartIdleTimer; // idle timer mode start/stop
static SwAutoCompleteWord *pACmpltWords; // List of all words for AutoComplete
- static sal_uInt16 nUndoActions; // Count of Undo ::com::sun::star::chaos::Action
//---------------- private methods ------------------------------
void checkRedlining(RedlineMode_t& _rReadlineMode);
- sal_Bool DelUndoObj( sal_uInt16 nEnde ); // Deletes all UndoObjects from the beginning
- // up to the indicated point.
DECL_LINK( AddDrawUndo, SdrUndoAction * );
// DrawModel
@@ -636,7 +621,7 @@ private:
const bool bCopyFlyAtFly = false ) const;
sal_Int8 SetFlyFrmAnchor( SwFrmFmt& rFlyFmt, SfxItemSet& rSet, sal_Bool bNewFrms );
- typedef SwFmt* (SwDoc:: *FNCopyFmt)( const String&, SwFmt*, BOOL, BOOL );
+ typedef SwFmt* (SwDoc:: *FNCopyFmt)( const String&, SwFmt*, sal_Bool, sal_Bool );
SwFmt* CopyFmt( const SwFmt& rFmt, const SvPtrarr& rFmtArr,
FNCopyFmt fnCopyFmt, const SwFmt& rDfltFmt );
void CopyFmtArr( const SvPtrarr& rSourceArr, SvPtrarr& rDestArr,
@@ -688,8 +673,8 @@ private:
// Update charts of given table.
void _UpdateCharts( const SwTable& rTbl, ViewShell& rVSh ) const;
- BOOL _SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rRubyEntry,
- USHORT nMode );
+ sal_Bool _SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rRubyEntry,
+ sal_uInt16 nMode );
// Our own 'IdleTimer' calls the following method
DECL_LINK( DoIdleJobs, Timer * );
@@ -697,9 +682,9 @@ private:
DECL_LINK( DoUpdateAllCharts, Timer * );
DECL_LINK( DoUpdateModifiedOLE, Timer * );
- SwFmt *_MakeCharFmt(const String &, SwFmt *, BOOL, BOOL );
- SwFmt *_MakeFrmFmt(const String &, SwFmt *, BOOL, BOOL );
- SwFmt *_MakeTxtFmtColl(const String &, SwFmt *, BOOL, BOOL );
+ SwFmt *_MakeCharFmt(const String &, SwFmt *, sal_Bool, sal_Bool );
+ SwFmt *_MakeFrmFmt(const String &, SwFmt *, sal_Bool, sal_Bool );
+ SwFmt *_MakeTxtFmtColl(const String &, SwFmt *, sal_Bool, sal_Bool );
void InitTOXTypes();
void Paste( const SwDoc& );
@@ -721,8 +706,8 @@ public:
/* @@@MAINTAINABILITY-HORROR@@@
Implementation details made public.
*/
- SwNodes& GetNodes() { return aNodes; }
- const SwNodes& GetNodes() const { return aNodes; }
+ SwNodes & GetNodes() { return *m_pNodes; }
+ SwNodes const& GetNodes() const { return *m_pNodes; }
/** IInterface
*/
@@ -734,8 +719,8 @@ public:
*/
virtual bool get(/*[in]*/ DocumentSettingId id) const;
virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value);
- virtual const com::sun::star::i18n::ForbiddenCharacters* getForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ bool bLocaleData ) const;
- virtual void setForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters );
+ virtual const com::sun::star::i18n::ForbiddenCharacters* getForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ bool bLocaleData ) const;
+ virtual void setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters );
virtual rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable();
virtual const rtl::Reference<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const;
virtual sal_uInt16 getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const;
@@ -755,7 +740,7 @@ public:
virtual void setReferenceDeviceType(/*[in]*/ bool bNewVirtual,/*[in]*/ bool bNewHiRes );
virtual const JobSetup* getJobsetup() const;
virtual void setJobsetup(/*[in]*/ const JobSetup& rJobSetup );
- virtual SwPrintData* getPrintData() const;
+ virtual const SwPrintData & getPrintData() const;
virtual void setPrintData(/*[in]*/ const SwPrintData& rPrtData);
/** IDocumentMarkAccess
@@ -796,36 +781,8 @@ public:
/** IDocumentUndoRedo
*/
- virtual void SetUndoNoResetModified();
- virtual bool IsUndoNoResetModified() const;
- virtual void DoUndo(bool bUn);
- virtual bool DoesUndo() const;
- virtual void DoGroupUndo(bool bUn);
- virtual bool DoesGroupUndo() const;
- virtual bool Undo(SwUndoIter& );
- virtual SwUndoId StartUndo(SwUndoId eUndoId, const SwRewriter * pRewriter);
- virtual SwUndoId EndUndo(SwUndoId eUndoId, const SwRewriter * pRewriter);
- virtual void DelAllUndoObj();
- virtual SwUndoId GetUndoIds(String* pStr, SwUndoIds *pUndoIds) const;
- virtual String GetUndoIdsStr(String* pStr, SwUndoIds *pUndoIds) const;
- virtual bool HasUndoId(SwUndoId eId) const;
- virtual const SwNodes* GetUndoNds() const;
- virtual SwUndo* RemoveLastUndo(SwUndoId eUndoId);
- virtual bool HasTooManyUndos() const;
- virtual bool Redo(SwUndoIter&);
- virtual SwUndoId GetRedoIds(String* pStr, SwUndoIds *pRedoIds) const;
- virtual String GetRedoIdsStr(String* pStr, SwUndoIds *pRedoIds) const;
- virtual bool Repeat(SwUndoIter&, sal_uInt16 nRepeatCnt);
- virtual SwUndoId GetRepeatIds(String* pStr, SwUndoIds *pRedoIds) const;
- virtual String GetRepeatIdsStr(String* pStr, SwUndoIds *pRedoIds) const;
- virtual void AppendUndo(SwUndo*);
- virtual void ClearRedo();
- virtual void setUndoNoModifiedPosition( SwUndoNoModifiedPosition );
- virtual SwUndoNoModifiedPosition getUndoNoModifiedPosition() const;
-
- /** Query / set count of Undo-Actions. */
- static sal_uInt16 GetUndoActionCount();
- static void SetUndoActionCount(sal_uInt16 nNew);
+ IDocumentUndoRedo & GetIDocumentUndoRedo();
+ IDocumentUndoRedo const& GetIDocumentUndoRedo() const;
/** IDocumentLinksAdministration
*/
@@ -833,7 +790,7 @@ public:
virtual void SetVisibleLinks(bool bFlag);
virtual sfx2::LinkManager& GetLinkManager();
virtual const sfx2::LinkManager& GetLinkManager() const;
- virtual void UpdateLinks(BOOL bUI);
+ virtual void UpdateLinks(sal_Bool bUI);
virtual bool GetData(const String& rItem, const String& rMimeType, ::com::sun::star::uno::Any& rValue) const;
virtual bool SetData(const String& rItem, const String& rMimeType, const ::com::sun::star::uno::Any& rValue);
virtual ::sfx2::SvLinkSource* CreateLinkSource(const String& rItem);
@@ -850,7 +807,7 @@ public:
virtual void RemoveFldType(sal_uInt16 nFld);
virtual void UpdateFlds( SfxPoolItem* pNewHt, bool bCloseDB);
virtual void InsDeletedFldType(SwFieldType &);
- virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, USHORT nWhich);
+ virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich);
virtual bool UpdateFld(SwTxtFld * rDstFmtFld, SwField & rSrcFld, SwMsgPoolItem * pMsgHnt, bool bUpdateTblFlds);
virtual void UpdateRefFlds(SfxPoolItem* pHt);
virtual void UpdateTblFlds(SfxPoolItem* pHt);
@@ -861,9 +818,9 @@ public:
virtual void UnlockExpFlds();
virtual bool IsExpFldsLocked() const;
virtual SwDocUpdtFld& GetUpdtFlds() const;
- virtual bool SetFieldsDirty(bool b, const SwNode* pChk, ULONG nLen);
+ virtual bool SetFieldsDirty(bool b, const SwNode* pChk, sal_uLong nLen);
virtual void SetFixFields(bool bOnlyTimeDate, const DateTime* pNewDateTime);
- virtual void FldsToCalc(SwCalc& rCalc, ULONG nLastNd, sal_uInt16 nLastCnt);
+ virtual void FldsToCalc(SwCalc& rCalc, sal_uLong nLastNd, sal_uInt16 nLastCnt);
virtual void FldsToCalc(SwCalc& rCalc, const _SetGetExpFld& rToThisFld);
virtual void FldsToExpand(SwHash**& ppTbl, sal_uInt16& rTblSize, const _SetGetExpFld& rToThisFld);
virtual bool IsNewFldLst() const;
@@ -1073,18 +1030,18 @@ public:
// in FlySet/FrmFmt.
/* new parameter bCalledFromShell
- TRUE: An existing adjust item at pAnchorPos is propagated to
+ sal_True: An existing adjust item at pAnchorPos is propagated to
the content node of the new fly section. That propagation only
takes place if there is no adjust item in the paragraph style
for the new fly section.
- FALSE: no propagation
+ sal_False: no propagation
*/
SwFlyFrmFmt* MakeFlySection( RndStdIds eAnchorType,
const SwPosition* pAnchorPos,
const SfxItemSet* pSet = 0,
SwFrmFmt *pParent = 0,
- BOOL bCalledFromShell = FALSE );
+ sal_Bool bCalledFromShell = sal_False );
SwFlyFrmFmt* MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet,
const SwSelBoxes* pSelBoxes = 0,
SwFrmFmt *pParent = 0 );
@@ -1190,7 +1147,7 @@ public:
sal_Bool bTxtAttr = sal_True,
const SvUShortsSort* = 0,
const bool bSendDataChangedEvents = true );
- void RstTxtAttrs(const SwPaM &rRg, BOOL bInclRefToxMark = FALSE );
+ void RstTxtAttrs(const SwPaM &rRg, sal_Bool bInclRefToxMark = sal_False );
// Set attribute in given format.
// If Undo is activated, the old one is listed in Undo-History.
@@ -1198,7 +1155,7 @@ public:
void SetAttr( const SfxItemSet&, SwFmt& );
// method to reset a certain attribute at the given format
- void ResetAttrAtFormat( const USHORT nWhichId,
+ void ResetAttrAtFormat( const sal_uInt16 nWhichId,
SwFmt& rChangedFormat );
// Set attribute as new default attribute in current document.
@@ -1237,16 +1194,16 @@ public:
void RemoveAllFmtLanguageDependencies();
SwFrmFmt *MakeFrmFmt(const String &rFmtName, SwFrmFmt *pDerivedFrom,
- BOOL bBroadcast = FALSE, BOOL bAuto = TRUE);
- void DelFrmFmt( SwFrmFmt *pFmt, BOOL bBroadcast = FALSE );
+ sal_Bool bBroadcast = sal_False, sal_Bool bAuto = sal_True);
+ void DelFrmFmt( SwFrmFmt *pFmt, sal_Bool bBroadcast = sal_False );
SwFrmFmt* FindFrmFmtByName( const String& rName ) const
{ return (SwFrmFmt*)FindFmtByName( (SvPtrarr&)*pFrmFmtTbl, rName ); }
SwCharFmt *MakeCharFmt(const String &rFmtName, SwCharFmt *pDerivedFrom,
- BOOL bBroadcast = FALSE,
- BOOL bAuto = TRUE );
- void DelCharFmt(sal_uInt16 nFmt, BOOL bBroadcast = FALSE);
- void DelCharFmt(SwCharFmt* pFmt, BOOL bBroadcast = FALSE);
+ sal_Bool bBroadcast = sal_False,
+ sal_Bool bAuto = sal_True );
+ void DelCharFmt(sal_uInt16 nFmt, sal_Bool bBroadcast = sal_False);
+ void DelCharFmt(SwCharFmt* pFmt, sal_Bool bBroadcast = sal_False);
SwCharFmt* FindCharFmtByName( const String& rName ) const
{ return (SwCharFmt*)FindFmtByName( (SvPtrarr&)*pCharFmtTbl, rName ); }
@@ -1256,13 +1213,13 @@ public:
const SwTxtFmtColls *GetTxtFmtColls() const { return pTxtFmtCollTbl; }
SwTxtFmtColl *MakeTxtFmtColl( const String &rFmtName,
SwTxtFmtColl *pDerivedFrom,
- BOOL bBroadcast = FALSE,
- BOOL bAuto = TRUE );
+ sal_Bool bBroadcast = sal_False,
+ sal_Bool bAuto = sal_True );
SwConditionTxtFmtColl* MakeCondTxtFmtColl( const String &rFmtName,
SwTxtFmtColl *pDerivedFrom,
- BOOL bBroadcast = FALSE);
- void DelTxtFmtColl(sal_uInt16 nFmt, BOOL bBroadcast = FALSE);
- void DelTxtFmtColl( SwTxtFmtColl* pColl, BOOL bBroadcast = FALSE );
+ sal_Bool bBroadcast = sal_False);
+ void DelTxtFmtColl(sal_uInt16 nFmt, sal_Bool bBroadcast = sal_False);
+ void DelTxtFmtColl( SwTxtFmtColl* pColl, sal_Bool bBroadcast = sal_False );
// Add 4th optional parameter <bResetListAttrs>.
// 'side effect' of <SetTxtFmtColl> with <bReset = true> is that the hard
// attributes of the affected text nodes are cleared, except the break
@@ -1368,15 +1325,15 @@ public:
SwPageDesc& _GetPageDesc( sal_uInt16 i ) const { return *aPageDescs[i]; }
void ChgPageDesc( const String & rName, const SwPageDesc& );
void ChgPageDesc( sal_uInt16 i, const SwPageDesc& );
- BOOL FindPageDesc( const String & rName, sal_uInt16 * pFound );
- void DelPageDesc( const String & rName, BOOL bBroadcast = FALSE);
- void DelPageDesc( sal_uInt16 i, BOOL bBroadcast = FALSE );
+ sal_Bool FindPageDesc( const String & rName, sal_uInt16 * pFound );
+ void DelPageDesc( const String & rName, sal_Bool bBroadcast = sal_False);
+ void DelPageDesc( sal_uInt16 i, sal_Bool bBroadcast = sal_False );
void PreDelPageDesc(SwPageDesc * pDel);
sal_uInt16 MakePageDesc( const String &rName, const SwPageDesc* pCpy = 0,
- BOOL bRegardLanguage = TRUE,
- BOOL bBroadcast = FALSE);
+ sal_Bool bRegardLanguage = sal_True,
+ sal_Bool bBroadcast = sal_False);
void BroadcastStyleOperation(String rName, SfxStyleFamily eFamily,
- USHORT nOp);
+ sal_uInt16 nOp);
// The html import sometimes overwrites the
// page sizes set in the page descriptions. This function is used to
@@ -1395,7 +1352,7 @@ public:
const SwTOXBase& rTOX,
const SfxItemSet* pSet = 0,
sal_Bool bExpand = sal_False );
- const SwTOXBaseSection* InsertTableOf( ULONG nSttNd, ULONG nEndNd,
+ const SwTOXBaseSection* InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd,
const SwTOXBase& rTOX,
const SfxItemSet* pSet = 0 );
const SwTOXBase* GetCurTOX( const SwPosition& rPos ) const;
@@ -1484,7 +1441,7 @@ public:
// Accept changes of outline styles for OUtlineRule.
// re-use unused 3rd parameter
- // Add optional parameter <bResetIndentAttrs> - default value FALSE.
+ // Add optional parameter <bResetIndentAttrs> - default value sal_False.
// If <bResetIndentAttrs> equals true, the indent attributes "before text"
// and "first line indent" are additionally reset at the provided PaM, if
// the list style makes use of the new list level attributes.
@@ -1518,7 +1475,7 @@ public:
// add optional parameter <eDefaultNumberFormatPositionAndSpaceMode>
sal_uInt16 MakeNumRule( const String &rName,
const SwNumRule* pCpy = 0,
- BOOL bBroadcast = FALSE,
+ sal_Bool bBroadcast = sal_False,
const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode =
SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
sal_uInt16 FindNumRule( const String& rName ) const;
@@ -1526,8 +1483,8 @@ public:
// Deletion only possible if ::com::sun::star::chaos::Rule is not used!
sal_Bool RenameNumRule(const String & aOldName, const String & aNewName,
- BOOL bBroadcast = FALSE);
- sal_Bool DelNumRule( const String& rName, BOOL bBroadCast = FALSE );
+ sal_Bool bBroadcast = sal_False);
+ sal_Bool DelNumRule( const String& rName, sal_Bool bBroadCast = sal_False );
String GetUniqueNumRuleName( const String* pChkStr = 0, sal_Bool bAutoNum = sal_True ) const;
void UpdateNumRule(); // Update all invalids.
@@ -1547,12 +1504,12 @@ public:
add output parameter <sListId>
\param rPos position to start search
- \param bForward - TRUE: search forward
- - FALSE: search backward
- \param bNum - TRUE: search for enumeration
- - FALSE: search for itemize
- \param bOutline - TRUE: search for outline numbering rule
- - FALSE: search for non-outline numbering rule
+ \param bForward - sal_True: search forward
+ - sal_False: search backward
+ \param bNum - sal_True: search for enumeration
+ - sal_False: search for itemize
+ \param bOutline - sal_True: search for outline numbering rule
+ - sal_False: search for non-outline numbering rule
\param nNonEmptyAllowed number of non-empty paragraphs allowed between
rPos and found paragraph
@@ -1596,20 +1553,20 @@ public:
// The array holds the positions of the columns (not their widths).
/* new parameter bCalledFromShell:
- TRUE: called from shell -> propagate existing adjust item at
+ sal_True: called from shell -> propagate existing adjust item at
rPos to every new cell. A existing adjust item in the table
heading or table contents paragraph style prevent that
propagation.
- FALSE: do not propagate
+ sal_False: do not propagate
*/
const SwTable* InsertTable( const SwInsertTableOptions& rInsTblOpts, // HEADLINE_NO_BORDER
const SwPosition& rPos, sal_uInt16 nRows,
sal_uInt16 nCols, short eAdjust,
const SwTableAutoFmt* pTAFmt = 0,
const SvUShorts* pColArr = 0,
- BOOL bCalledFromShell = FALSE,
- BOOL bNewModel = TRUE );
+ sal_Bool bCalledFromShell = sal_False,
+ sal_Bool bNewModel = sal_True );
// If index is in a table, return TableNode, else 0.
SwTableNode* IsIdxInTbl( const SwNodeIndex& rIdx );
@@ -1659,14 +1616,14 @@ public:
const SwCursor* pCrsr, const SwCellFrm* pBoxFrm = 0 );
void GetTabRows( SwTabCols &rFill, const SwCursor* pCrsr,
const SwCellFrm* pBoxFrm = 0 ) const;
- void SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const SwCursor* pCrsr,
+ void SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const SwCursor* pCrsr,
const SwCellFrm* pBoxFrm = 0 );
// Direct access for UNO.
void SetTabCols(SwTable& rTab, const SwTabCols &rNew, const SwTabCols &rOld,
const SwTableBox *pStart, sal_Bool bCurRowOnly);
- void SetRowsToRepeat( SwTable &rTable, USHORT nSet );
+ void SetRowsToRepeat( SwTable &rTable, sal_uInt16 nSet );
// AutoFormat for table/table selection.
sal_Bool SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNew );
@@ -1674,8 +1631,7 @@ public:
// Query attributes.
sal_Bool GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet );
- // Set up InsertDB as table Undo:
- void AppendUndoForInsertFromDB( const SwPaM& rPam, BOOL bIsTable );
+ void AppendUndoForInsertFromDB( const SwPaM& rPam, sal_Bool bIsTable );
sal_Bool SetColRowWidthHeight( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff );
@@ -1730,7 +1686,7 @@ public:
// Insert label. If a FlyFormat is created, return it.
SwFlyFrmFmt* InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator,
const String& rNumberingSeparator,
- const sal_Bool bBefore, const sal_uInt16 nId, const ULONG nIdx,
+ const sal_Bool bBefore, const sal_uInt16 nId, const sal_uLong nIdx,
const String& rCharacterStyle,
const sal_Bool bCpyBrd = sal_True );
SwFlyFrmFmt* InsertDrawLabel(
@@ -1743,6 +1699,7 @@ public:
// Search an EditShell or, if appropriate, a ViewShell via layout.
SwEditShell* GetEditShell( ViewShell** ppSh = 0 ) const;
+ ::sw::IShellCursorSupplier * GetIShellCursorSupplier();
// OLE 2.0-notification.
inline void SetOle2Link(const Link& rLink) {aOle2Link = rLink;}
@@ -1773,10 +1730,10 @@ public:
const SwDocShell* GetDocShell() const { return pDocShell; }
void SetDocShell( SwDocShell* pDSh );
- // If a DocShell has to be created during copying of OLE-Nodes
- // the Ref-Pointer MUST be set!
- SfxObjectShellRef* GetRefForDocShell() { return pDocShRef; }
- void SetRefForDocShell( SfxObjectShellRef* p ) { pDocShRef = p; }
+ // in case during copying of embedded object a new shell is created,
+ // it should be set here and cleaned later
+ void SetTmpDocShell( SfxObjectShellLock rLock ) { xTmpDocShell = rLock; }
+ SfxObjectShellLock GetTmpDocShell() { return xTmpDocShell; }
// For Autotexts? (Textbausteine) They have only one SVPersist at their disposal.
SfxObjectShell* GetPersist() const;
@@ -1795,9 +1752,6 @@ public:
bool IsCopyIsMove() const { return mbCopyIsMove; }
void SetCopyIsMove( bool bFlag ) { mbCopyIsMove = bFlag; }
- // For Draw-Undo: actions on Flys we want to handle ourselves.
- bool IsNoDrawUndoObj() const { return mbNoDrawUndoObj; }
- void SetNoDrawUndoObj( bool bFlag ) { mbNoDrawUndoObj = bFlag; }
SwDrawContact* GroupSelection( SdrView& );
void UnGroupSelection( SdrView& );
sal_Bool DeleteSelection( SwDrawView& );
@@ -1838,15 +1792,13 @@ public:
inline SvNumberFormatter* GetNumberFormatter( sal_Bool bCreate = sal_True );
inline const SvNumberFormatter* GetNumberFormatter( sal_Bool bCreate = sal_True ) const;
- // Delete non-visible ::com::sun::star::ucb::Content from document, e.g.
- // hidden ranges, hidden paragraphes.
- sal_Bool RemoveInvisibleContent();
-
- //restore the invisible content if it's available on the undo stack
- sal_Bool RestoreInvisibleContent();
+ bool HasInvisibleContent() const;
+ /// delete invisible content, like hidden sections and paragraphs
+ bool RemoveInvisibleContent();
+ /// restore the invisible content if it's available on the undo stack
+ bool RestoreInvisibleContent();
- // Replace fields by text - mailmerge support.
- BOOL ConvertFieldsToText();
+ sal_Bool ConvertFieldsToText();
// Create sub-documents according to given collection.
// If no collection is given, use chapter styles for 1st level.
@@ -1946,10 +1898,10 @@ public:
void SetContainsMSVBasic( bool bFlag ) { mbContains_MSVBasic = bFlag; }
// Interface for the list of Ruby - texts/attributes
- USHORT FillRubyList( const SwPaM& rPam, SwRubyList& rList,
- USHORT nMode );
- USHORT SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
- USHORT nMode );
+ sal_uInt16 FillRubyList( const SwPaM& rPam, SwRubyList& rList,
+ sal_uInt16 nMode );
+ sal_uInt16 SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
+ sal_uInt16 nMode );
void ReadLayoutCache( SvStream& rStream );
void WriteLayoutCache( SvStream& rStream );
@@ -1972,12 +1924,12 @@ public:
@param sListId list Id of the list whose level has to be marked/unmarked
@param nListLevel level to mark
- @param bValue - TRUE mark the level
- - FALSE unmark the level
+ @param bValue - sal_True mark the level
+ - sal_False unmark the level
*/
void MarkListLevel( const String& sListId,
const int nListLevel,
- const BOOL bValue );
+ const sal_Bool bValue );
/** Marks/Unmarks a list level of a certain list
@@ -1985,18 +1937,18 @@ public:
@param rList list whose level has to be marked/unmarked
@param nListLevel level to mark
- @param bValue - TRUE mark the level
- - FALSE unmark the level
+ @param bValue - sal_True mark the level
+ - sal_False unmark the level
*/
void MarkListLevel( SwList& rList,
const int nListLevel,
- const BOOL bValue );
+ const sal_Bool bValue );
// Change a format undoable.
void ChgFmt(SwFmt & rFmt, const SfxItemSet & rSet);
void RenameFmt(SwFmt & rFmt, const String & sNewName,
- BOOL bBroadcast = FALSE);
+ sal_Bool bBroadcast = sal_False);
// Change a TOX undoable.
void ChgTOX(SwTOXBase & rTOX, const SwTOXBase & rNew);
@@ -2020,7 +1972,7 @@ public:
*/
String GetPaMDescr(const SwPaM & rPaM) const;
- BOOL IsFirstOfNumRule(SwPosition & rPos);
+ sal_Bool IsFirstOfNumRule(SwPosition & rPos);
// access methods for XForms model(s)
@@ -2068,6 +2020,8 @@ public:
com::sun::star::uno::Reference< com::sun::star::container::XNameContainer > GetVBATemplateToProjectCache() { return m_xTemplateToProjectCache; };
::sfx2::IXmlIdRegistry& GetXmlIdRegistry();
::sw::MetaFieldManager & GetMetaFieldManager();
+ ::sw::UndoManager & GetUndoManager();
+ ::sw::UndoManager const& GetUndoManager() const;
SfxObjectShell* CreateCopy(bool bCallInitNew) const;
};
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
index 144c8e87ef30..52c2fe08df5e 100644
--- a/sw/inc/docary.hxx
+++ b/sw/inc/docary.hxx
@@ -70,14 +70,7 @@ SV_DECL_PTRARR_DEL( SwFldTypes, SwFldTypePtr, INIT_FLDTYPES, GROW_FLDTYPES )
typedef SwTOXType* SwTOXTypePtr;
SV_DECL_PTRARR_DEL( SwTOXTypes, SwTOXTypePtr, 0, 1 )
-// Undo
-#define INIT_UNDOS 5
-#define GROW_UNDOS 5
-
// Array of Undo-history.
-typedef SwUndo* SwUndoPtr;
-SV_DECL_PTRARR_DEL( SwUndos, SwUndoPtr, INIT_UNDOS, GROW_UNDOS )
-
typedef SwSectionFmt* SwSectionFmtPtr;
SV_DECL_PTRARR_DEL(SwSectionFmts,SwSectionFmtPtr,0,4)
@@ -91,28 +84,28 @@ SV_DECL_PTRARR_SORT_DEL( _SwRedlineTbl, SwRedlinePtr, 0, 16 )
class SwRedlineTbl : private _SwRedlineTbl
{
public:
- SwRedlineTbl( BYTE nSize = 0, BYTE nG = 16 )
+ SwRedlineTbl( sal_uInt8 nSize = 0, sal_uInt8 nG = 16 )
: _SwRedlineTbl( nSize, nG ) {}
~SwRedlineTbl() {}
- BOOL SavePtrInArr( SwRedlinePtr p ) { return _SwRedlineTbl::Insert( p ); }
+ sal_Bool SavePtrInArr( SwRedlinePtr p ) { return _SwRedlineTbl::Insert( p ); }
- BOOL Insert( SwRedlinePtr& p, BOOL bIns = TRUE );
- BOOL Insert( SwRedlinePtr& p, USHORT& rInsPos, BOOL bIns = TRUE );
- BOOL InsertWithValidRanges( SwRedlinePtr& p, USHORT* pInsPos = 0 );
+ sal_Bool Insert( SwRedlinePtr& p, sal_Bool bIns = sal_True );
+ sal_Bool Insert( SwRedlinePtr& p, sal_uInt16& rInsPos, sal_Bool bIns = sal_True );
+ sal_Bool InsertWithValidRanges( SwRedlinePtr& p, sal_uInt16* pInsPos = 0 );
- void Remove( USHORT nP, USHORT nL = 1 );
- void DeleteAndDestroy( USHORT nP, USHORT nL=1 );
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1 );
+ void DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL=1 );
// Search next or previous Redline with the same Seq. No.
// Search can be restricted via Lookahaed.
// Using 0 or USHRT_MAX makes search the whole array.
- USHORT FindNextOfSeqNo( USHORT nSttPos, USHORT nLookahead = 20 ) const;
- USHORT FindPrevOfSeqNo( USHORT nSttPos, USHORT nLookahead = 20 ) const;
- USHORT FindNextSeqNo( USHORT nSeqNo, USHORT nSttPos,
- USHORT nLookahead = 20 ) const;
- USHORT FindPrevSeqNo( USHORT nSeqNo, USHORT nSttPos,
- USHORT nLookahead = 20 ) const;
+ sal_uInt16 FindNextOfSeqNo( sal_uInt16 nSttPos, sal_uInt16 nLookahead = 20 ) const;
+ sal_uInt16 FindPrevOfSeqNo( sal_uInt16 nSttPos, sal_uInt16 nLookahead = 20 ) const;
+ sal_uInt16 FindNextSeqNo( sal_uInt16 nSeqNo, sal_uInt16 nSttPos,
+ sal_uInt16 nLookahead = 20 ) const;
+ sal_uInt16 FindPrevSeqNo( sal_uInt16 nSeqNo, sal_uInt16 nSttPos,
+ sal_uInt16 nLookahead = 20 ) const;
using _SwRedlineTbl::Count;
using _SwRedlineTbl::operator[];
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index d42d7eb423e6..a20d9d54f7a4 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -100,28 +100,28 @@ class SW_DLLPUBLIC SwDocShell: public SfxObjectShell, public SfxListener
SW_DLLPRIVATE virtual sal_Bool SaveAs( SfxMedium& rMedium );
SW_DLLPRIVATE virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
- SW_DLLPRIVATE virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
+ SW_DLLPRIVATE virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False );
// Make DocInfo known to the Doc.
SW_DLLPRIVATE virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog(
Window *pParent, const SfxItemSet &);
// OLE-stuff
- SW_DLLPRIVATE virtual void Draw( OutputDevice*, const JobSetup&, USHORT);
+ SW_DLLPRIVATE virtual void Draw( OutputDevice*, const JobSetup&, sal_uInt16);
// Methods for StyleSheets
- SW_DLLPRIVATE USHORT Edit( const String &rName, const String& rParent, USHORT nFamily,
- USHORT nMask, BOOL bNew,
- BOOL bColumn = FALSE,
+ SW_DLLPRIVATE sal_uInt16 Edit( const String &rName, const String& rParent, sal_uInt16 nFamily,
+ sal_uInt16 nMask, sal_Bool bNew,
+ sal_Bool bColumn = sal_False,
SwWrtShell* pActShell = 0,
- BOOL bBasic = FALSE );
- SW_DLLPRIVATE USHORT Delete(const String &rName, USHORT nFamily);
- SW_DLLPRIVATE USHORT ApplyStyles(const String &rName, USHORT nFamily, SwWrtShell* pShell = 0,
- USHORT nMode = 0 );
- SW_DLLPRIVATE USHORT DoWaterCan( const String &rName, USHORT nFamily);
- SW_DLLPRIVATE USHORT UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell* pShell = 0);
- SW_DLLPRIVATE USHORT MakeByExample(const String &rName,
- USHORT nFamily, USHORT nMask, SwWrtShell* pShell = 0);
+ sal_Bool bBasic = sal_False );
+ SW_DLLPRIVATE sal_uInt16 Delete(const String &rName, sal_uInt16 nFamily);
+ SW_DLLPRIVATE sal_uInt16 ApplyStyles(const String &rName, sal_uInt16 nFamily, SwWrtShell* pShell = 0,
+ sal_uInt16 nMode = 0 );
+ SW_DLLPRIVATE sal_uInt16 DoWaterCan( const String &rName, sal_uInt16 nFamily);
+ SW_DLLPRIVATE sal_uInt16 UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWrtShell* pShell = 0);
+ SW_DLLPRIVATE sal_uInt16 MakeByExample(const String &rName,
+ sal_uInt16 nFamily, sal_uInt16 nMask, SwWrtShell* pShell = 0);
SW_DLLPRIVATE void InitDraw();
SW_DLLPRIVATE void SubInitNew(); // for InitNew and HtmlSourceMode.
@@ -163,14 +163,14 @@ public:
// OLE-stuff.
virtual void SetVisArea( const Rectangle &rRect );
- virtual Rectangle GetVisArea( USHORT nAspect ) const;
+ virtual Rectangle GetVisArea( sal_uInt16 nAspect ) const;
virtual Printer *GetDocumentPrinter();
virtual OutputDevice* GetDocumentRefDev();
virtual void OnDocumentPrinterChanged( Printer * pNewPrinter );
- virtual ULONG GetMiscStatus() const;
+ virtual sal_uLong GetMiscStatus() const;
virtual void PrepareReload();
- virtual void SetModified( BOOL = TRUE );
+ virtual void SetModified( sal_Bool = sal_True );
// Dispatcher
void Execute(SfxRequest &);
@@ -193,24 +193,24 @@ public:
void UpdateChildWindows();
// global IO.
- virtual BOOL Save();
+ virtual sal_Bool Save();
// For Style PI.
virtual SfxStyleSheetBasePool* GetStyleSheetPool();
// For Organizer.
- virtual BOOL Insert(SfxObjectShell &rSource,
- USHORT nSourceIdx1,
- USHORT nSourceIdx2,
- USHORT nSourceIdx3,
- USHORT& nIdx1,
- USHORT& nIdx2,
- USHORT& nIdx3,
- USHORT& nRemovedIdx);
-
- virtual BOOL Remove(USHORT nIdx1,
- USHORT nIdx2 = INDEX_IGNORE,
- USHORT nIdx3 = INDEX_IGNORE);
+ virtual sal_Bool Insert(SfxObjectShell &rSource,
+ sal_uInt16 nSourceIdx1,
+ sal_uInt16 nSourceIdx2,
+ sal_uInt16 nSourceIdx3,
+ sal_uInt16& nIdx1,
+ sal_uInt16& nIdx2,
+ sal_uInt16& nIdx3,
+ sal_uInt16& nRemovedIdx);
+
+ virtual sal_Bool Remove(sal_uInt16 nIdx1,
+ sal_uInt16 nIdx2 = INDEX_IGNORE,
+ sal_uInt16 nIdx3 = INDEX_IGNORE);
virtual Bitmap GetStyleFamilyBitmap( SfxStyleFamily eFamily );
@@ -250,11 +250,11 @@ public:
virtual void LoadStyles( SfxObjectShell& rSource );
- void _LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocument );
+ void _LoadStyles( SfxObjectShell& rSource, sal_Bool bPreserveCurrentDocument );
// Display dialog for page style. If required display column page.
void FormatPage( const String& rPage,
- BOOL bColumn = FALSE,
+ sal_Bool bColumn = sal_False,
SwWrtShell* pActShell = 0 );
// #i59688#
@@ -275,13 +275,13 @@ public:
//Activate wait cursor for all windows of this document
//Optionally all dispatcher could be Locked
//Usually locking should be done using the class: SwWaitObject!
- void EnterWait( BOOL bLockDispatcher );
- void LeaveWait( BOOL bLockDispatcher );
+ void EnterWait( sal_Bool bLockDispatcher );
+ void LeaveWait( sal_Bool bLockDispatcher );
- void ToggleBrowserMode(BOOL bOn, SwView* pView = 0);
+ void ToggleBrowserMode(sal_Bool bOn, SwView* pView = 0);
- ULONG LoadStylesFromFile( const String& rURL, SwgReaderOption& rOpt,
- BOOL bUnoCall );
+ sal_uLong LoadStylesFromFile( const String& rURL, SwgReaderOption& rOpt,
+ sal_Bool bUnoCall );
void InvalidateModel();
void ReactivateModel();
diff --git a/sw/inc/docstat.hxx b/sw/inc/docstat.hxx
index 9c36ed834779..554d506be414 100644
--- a/sw/inc/docstat.hxx
+++ b/sw/inc/docstat.hxx
@@ -34,18 +34,18 @@
struct SW_DLLPUBLIC SwDocStat
{
- USHORT nTbl;
- USHORT nGrf;
- USHORT nOLE;
- ULONG nPage;
+ sal_uInt16 nTbl;
+ sal_uInt16 nGrf;
+ sal_uInt16 nOLE;
+ sal_uLong nPage;
/// paragraphs for document statistic: non-empty and non-hidden ones
- ULONG nPara;
+ sal_uLong nPara;
/// all paragraphs, including empty/hidden ones
- ULONG nAllPara;
- ULONG nWord;
- ULONG nChar;
- ULONG nCharExcludingSpaces;
- BOOL bModified;
+ sal_uLong nAllPara;
+ sal_uLong nWord;
+ sal_uLong nChar;
+ sal_uLong nCharExcludingSpaces;
+ sal_Bool bModified;
SwDocStat();
void Reset();
diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx
index 6dded2703ca6..620074a7efbb 100644
--- a/sw/inc/docstyle.hxx
+++ b/sw/inc/docstyle.hxx
@@ -75,7 +75,7 @@ class SW_DLLPUBLIC SwDocStyleSheet : public SfxStyleSheetBase
SwDoc& rDoc;
SfxItemSet aCoreSet;
- BOOL bPhysical;
+ sal_Bool bPhysical;
// Make empty shell a real StyleSheet (Core).
@@ -88,7 +88,7 @@ class SW_DLLPUBLIC SwDocStyleSheet : public SfxStyleSheetBase
FillPhysical
};
- SW_DLLPRIVATE BOOL FillStyleSheet( FillStyleType eFType );
+ SW_DLLPRIVATE sal_Bool FillStyleSheet( FillStyleType eFType );
protected:
virtual ~SwDocStyleSheet();
@@ -98,19 +98,19 @@ public:
const String& rName,
SwDocStyleSheetPool& rPool,
SfxStyleFamily eFam,
- USHORT nMask);
+ sal_uInt16 nMask);
SwDocStyleSheet( const SwDocStyleSheet& );
void Reset();
- void SetMask(USHORT nMsk) { nMask = nMsk; }
+ void SetMask(sal_uInt16 nMsk) { nMask = nMsk; }
void SetFamily(SfxStyleFamily eFam) { nFamily = eFam; }
- BOOL IsPhysical() const { return bPhysical; }
- void SetPhysical(BOOL bPhys);
+ sal_Bool IsPhysical() const { return bPhysical; }
+ void SetPhysical(sal_Bool bPhys);
- // add optional parameter <bResetIndentAttrsAtParagraphStyle>, default value FALSE,
+ // add optional parameter <bResetIndentAttrsAtParagraphStyle>, default value sal_False,
// which indicates that the indent attributes at a paragraph style should
// be reset in case that a list style is applied to the paragraph style and
// no indent attributes are applied.
@@ -124,8 +124,8 @@ public:
virtual const String& GetParent() const;
virtual const String& GetFollow() const;
- virtual ULONG GetHelpId( String& rFile );
- virtual void SetHelpId( const String& r, ULONG nId );
+ virtual sal_uLong GetHelpId( String& rFile );
+ virtual void SetHelpId( const String& r, sal_uLong nId );
// Preset the members without physical access.
// Used by StyleSheetPool.
@@ -134,13 +134,13 @@ public:
void PresetParent(const String& rName){ aParent = rName; }
void PresetFollow(const String& rName){ aFollow = rName; }
- virtual BOOL SetName( const String& rStr);
- virtual BOOL SetParent( const String& rStr);
- virtual BOOL SetFollow( const String& rStr);
+ virtual sal_Bool SetName( const String& rStr);
+ virtual sal_Bool SetParent( const String& rStr);
+ virtual sal_Bool SetFollow( const String& rStr);
- virtual BOOL HasFollowSupport() const;
- virtual BOOL HasParentSupport() const;
- virtual BOOL HasClearParentSupport() const;
+ virtual sal_Bool HasFollowSupport() const;
+ virtual sal_Bool HasParentSupport() const;
+ virtual sal_Bool HasClearParentSupport() const;
virtual String GetDescription();
virtual String GetDescription(SfxMapUnit eUnit);
@@ -151,7 +151,7 @@ public:
const SwNumRule* GetNumRule();
void SetNumRule(const SwNumRule& rRule);
- virtual BOOL IsUsed() const;
+ virtual sal_Bool IsUsed() const;
};
/*--------------------------------------------------------------------
@@ -163,21 +163,21 @@ class SwStyleSheetIterator : public SfxStyleSheetIterator, public SfxListener
rtl::Reference< SwDocStyleSheet > mxIterSheet;
rtl::Reference< SwDocStyleSheet > mxStyleSheet;
SwPoolFmtList aLst;
- USHORT nLastPos;
- BOOL bFirstCalled;
+ sal_uInt16 nLastPos;
+ sal_Bool bFirstCalled;
void AppendStyleList(const SvStringsDtor& rLst,
- BOOL bUsed,
- USHORT nSection,
+ sal_Bool bUsed,
+ sal_uInt16 nSection,
char cType);
public:
SwStyleSheetIterator( SwDocStyleSheetPool* pBase,
- SfxStyleFamily eFam, USHORT n=0xFFFF );
+ SfxStyleFamily eFam, sal_uInt16 n=0xFFFF );
virtual ~SwStyleSheetIterator();
- virtual USHORT Count();
- virtual SfxStyleSheetBase *operator[](USHORT nIdx);
+ virtual sal_uInt16 Count();
+ virtual SfxStyleSheetBase *operator[](sal_uInt16 nIdx);
virtual SfxStyleSheetBase* First();
virtual SfxStyleSheetBase* Next();
virtual SfxStyleSheetBase* Find(const UniString& rStr);
@@ -190,34 +190,34 @@ class SwDocStyleSheetPool : public SfxStyleSheetBasePool
{
rtl::Reference< SwDocStyleSheet > mxStyleSheet;
SwDoc& rDoc;
- BOOL bOrganizer : 1; // TRUE: for Organizer.
+ sal_Bool bOrganizer : 1; // Organizer
- virtual SfxStyleSheetBase* Create( const String&, SfxStyleFamily, USHORT nMask);
+ virtual SfxStyleSheetBase* Create( const String&, SfxStyleFamily, sal_uInt16 nMask);
virtual SfxStyleSheetBase* Create( const SfxStyleSheetBase& );
using SfxStyleSheetBasePool::Find;
public:
- SwDocStyleSheetPool( SwDoc&, BOOL bOrganizer = FALSE );
+ SwDocStyleSheetPool( SwDoc&, sal_Bool bOrganizer = sal_False );
virtual void Replace( SfxStyleSheetBase& rSource,
SfxStyleSheetBase& rTarget );
- virtual SfxStyleSheetBase& Make(const String&, SfxStyleFamily, USHORT nMask, USHORT nPos = 0xffff);
+ virtual SfxStyleSheetBase& Make(const String&, SfxStyleFamily, sal_uInt16 nMask, sal_uInt16 nPos = 0xffff);
virtual SfxStyleSheetBase* Find( const String&, SfxStyleFamily eFam,
- USHORT n=0xFFFF );
+ sal_uInt16 n=0xFFFF );
- virtual BOOL SetParent( SfxStyleFamily eFam, const String &rStyle,
+ virtual sal_Bool SetParent( SfxStyleFamily eFam, const String &rStyle,
const String &rParent );
virtual void Remove( SfxStyleSheetBase* pStyle);
- void SetOrganizerMode( BOOL bMode ) { bOrganizer = bMode; }
- BOOL IsOrganizerMode() const { return bOrganizer; }
+ void SetOrganizerMode( sal_Bool bMode ) { bOrganizer = bMode; }
+ sal_Bool IsOrganizerMode() const { return bOrganizer; }
virtual SfxStyleSheetIterator* CreateIterator( SfxStyleFamily,
- USHORT nMask );
+ sal_uInt16 nMask );
SwDoc& GetDoc() const { return rDoc; }
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index 2114e7c0ee83..177229930bdb 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -25,8 +25,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _DOCUFLD_HXX
-#define _DOCUFLD_HXX
+#ifndef SW_DOCUFLD_HXX
+#define SW_DOCUFLD_HXX
#include <tools/date.hxx>
@@ -151,15 +151,15 @@ enum SwJumpEditFormat
class SwPageNumberFieldType : public SwFieldType
{
sal_Int16 nNumberingType;
- USHORT nNum, nMax;
- BOOL bVirtuell;
+ sal_uInt16 nNum, nMax;
+ sal_Bool bVirtuell;
public:
SwPageNumberFieldType();
String& Expand( sal_uInt32 nFmt, short nOff, const String&, String& rRet ) const;
- void ChangeExpansion( SwDoc* pDoc, USHORT nNum, USHORT nMax,
- BOOL bVirtPageNum, const sal_Int16* pNumFmt = 0 );
+ void ChangeExpansion( SwDoc* pDoc, sal_uInt16 nNum, sal_uInt16 nMax,
+ sal_Bool bVirtPageNum, const sal_Int16* pNumFmt = 0 );
virtual SwFieldType* Copy() const;
};
@@ -170,11 +170,11 @@ public:
class SW_DLLPUBLIC SwPageNumberField : public SwField
{
String sUserStr;
- USHORT nSubType;
+ sal_uInt16 nSubType;
short nOffset;
public:
- SwPageNumberField(SwPageNumberFieldType*, USHORT nSub = PG_RANDOM,
+ SwPageNumberField(SwPageNumberFieldType*, sal_uInt16 nSub = PG_RANDOM,
sal_uInt32 nFmt = 0, short nOff = 0);
virtual String Expand() const;
@@ -183,9 +183,9 @@ public:
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- virtual USHORT GetSubType() const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_uInt16 GetSubType() const;
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
const String& GetUserString() const { return sUserStr; }
void SetUserString( const String& rS ) { sUserStr = rS; }
@@ -200,7 +200,7 @@ class SwAuthorFieldType : public SwFieldType
public:
SwAuthorFieldType();
- String Expand(ULONG) const;
+ String Expand(sal_uLong) const;
virtual SwFieldType* Copy() const;
};
@@ -221,8 +221,8 @@ public:
inline void SetExpansion(const String& rStr) { aContent = rStr; }
inline const String& GetContent() const { return aContent; }
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -235,7 +235,7 @@ class SwFileNameFieldType : public SwFieldType
public:
SwFileNameFieldType(SwDoc*);
- String Expand(ULONG) const;
+ String Expand(sal_uLong) const;
virtual SwFieldType* Copy() const;
};
@@ -256,8 +256,8 @@ public:
inline void SetExpansion(const String& rStr) { aContent = rStr; }
inline const String& GetContent() const { return aContent; }
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -270,7 +270,7 @@ class SwTemplNameFieldType : public SwFieldType
public:
SwTemplNameFieldType(SwDoc*);
- String Expand(ULONG) const;
+ String Expand(sal_uLong) const;
virtual SwFieldType* Copy() const;
};
@@ -285,8 +285,8 @@ public:
virtual String Expand() const;
virtual SwField* Copy() const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
@@ -301,7 +301,7 @@ class SwDocStatFieldType : public SwFieldType
public:
SwDocStatFieldType(SwDoc*);
- String Expand(USHORT nSubType, sal_uInt32 nFmt) const;
+ String Expand(sal_uInt16 nSubType, sal_uInt32 nFmt) const;
virtual SwFieldType* Copy() const;
inline void SetNumFormat( sal_Int16 eFmt ) { nNumberingType = eFmt; }
@@ -313,21 +313,21 @@ public:
class SW_DLLPUBLIC SwDocStatField : public SwField
{
- USHORT nSubType;
+ sal_uInt16 nSubType;
public:
SwDocStatField( SwDocStatFieldType*,
- USHORT nSubType = 0, sal_uInt32 nFmt = 0);
+ sal_uInt16 nSubType = 0, sal_uInt32 nFmt = 0);
void ChangeExpansion( const SwFrm* pFrm );
virtual String Expand() const;
virtual SwField* Copy() const;
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT nSub);
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nSub);
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -336,14 +336,14 @@ public:
class SwHiddenTxtFieldType : public SwFieldType
{
- BOOL bHidden;
+ sal_Bool bHidden;
public:
- SwHiddenTxtFieldType(BOOL bSetHidden = TRUE);
+ SwHiddenTxtFieldType(sal_Bool bSetHidden = sal_True);
virtual SwFieldType* Copy() const;
- void SetHiddenFlag( BOOL bSetHidden = TRUE );
- inline BOOL GetHiddenFlag() const { return bHidden; }
+ void SetHiddenFlag( sal_Bool bSetHidden = sal_True );
+ inline sal_Bool GetHiddenFlag() const { return bHidden; }
};
/*--------------------------------------------------------------------
@@ -352,38 +352,39 @@ public:
class SwHiddenTxtField : public SwField
{
- String aTRUETxt; // Text wenn Bedingung TRUE
+ String aTRUETxt; // Text wenn Bedingung sal_True
String aFALSETxt; // Wenn Bedingung falsch
String aContent; // Ausgewerteter DB-Text
String aCond; // Bedingung
- USHORT nSubType;
+ sal_uInt16 nSubType;
- BOOL bCanToggle : 1; // kann das Feld einzeln getoggelt werden?
- BOOL bIsHidden : 1; // ist es nicht sichtbar?
- BOOL bValid : 1; // DB-Feld evaluiert?
+ sal_Bool bCanToggle : 1; // kann das Feld einzeln getoggelt werden?
+ sal_Bool bIsHidden : 1; // ist es nicht sichtbar?
+ sal_Bool bValid : 1; // DB-Feld evaluiert?
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
public:
SwHiddenTxtField( SwHiddenTxtFieldType*,
- BOOL bConditional,
+ sal_Bool bConditional,
const String& rCond,
const String& rTxt,
- BOOL bHidden = FALSE,
- USHORT nSubType = TYP_HIDDENTXTFLD);
+ sal_Bool bHidden = sal_False,
+ sal_uInt16 nSubType = TYP_HIDDENTXTFLD);
SwHiddenTxtField( SwHiddenTxtFieldType*,
const String& rCond,
const String& rTrue,
const String& rFalse,
- USHORT nSubType = TYP_HIDDENTXTFLD);
+ sal_uInt16 nSubType = TYP_HIDDENTXTFLD);
- virtual String GetCntnt(BOOL bName = FALSE) const;
- virtual String Expand() const;
- virtual SwField* Copy() const;
+ virtual String GetFieldName() const;
void Evaluate(SwDoc*);
- inline void SetValue(BOOL bHidden) { bIsHidden = bHidden; }
+ inline void SetValue(sal_Bool bHidden) { bIsHidden = bHidden; }
String GetColumnName(const String& rName);
String GetDBName(const String& rName, SwDoc *pDoc);
@@ -396,10 +397,10 @@ public:
virtual String GetPar2() const;
- virtual USHORT GetSubType() const;
+ virtual sal_uInt16 GetSubType() const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -421,7 +422,7 @@ public:
class SwHiddenParaField : public SwField
{
String aCond;
- BOOL bIsHidden:1;
+ sal_Bool bIsHidden:1;
public:
// Direct input, delete old value.
SwHiddenParaField(SwHiddenParaFieldType*, const String& rCond);
@@ -429,14 +430,14 @@ public:
virtual String Expand() const;
virtual SwField* Copy() const;
- void SetHidden(BOOL bHidden) { bIsHidden = bHidden; }
- BOOL IsHidden() const { return bIsHidden; }
+ void SetHidden(sal_Bool bHidden) { bIsHidden = bHidden; }
+ sal_Bool IsHidden() const { return bIsHidden; }
//Query, set condition.
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -461,7 +462,10 @@ class SW_DLLPUBLIC SwMacroField : public SwField
{
String aMacro;
String aText;
- BOOL bIsScriptURL;
+ sal_Bool bIsScriptURL;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
public:
// Direct input, delete old value.
@@ -473,9 +477,7 @@ public:
String GetMacroName() const;
SvxMacro GetSvxMacro() const;
- virtual String GetCntnt(BOOL bName = FALSE) const;
- virtual String Expand() const;
- virtual SwField* Copy() const;
+ virtual String GetFieldName() const;
// Library and FileName
virtual const String& GetPar1() const;
@@ -484,14 +486,14 @@ public:
// Macrotext
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
static void CreateMacroString( String& rMacro,
const String& rMacroName,
const String& rLibraryName );
- static BOOL isScriptURL( const String& str );
+ static sal_Bool isScriptURL( const String& str );
};
@@ -547,8 +549,8 @@ public:
sal_uInt32 GetNumberOfParagraphs() const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
virtual String GetDescription() const;
};
@@ -561,31 +563,32 @@ class SwDocInfoFieldType : public SwValueFieldType
public:
SwDocInfoFieldType(SwDoc* pDc);
- String Expand(USHORT nSubType, sal_uInt32 nFormat, USHORT nLang, const String& rName) const;
+ String Expand(sal_uInt16 nSubType, sal_uInt32 nFormat, sal_uInt16 nLang, const String& rName) const;
virtual SwFieldType* Copy() const;
};
class SW_DLLPUBLIC SwDocInfoField : public SwValueField
{
- USHORT nSubType;
+ sal_uInt16 nSubType;
String aContent;
String aName;
-public:
- SwDocInfoField(SwDocInfoFieldType*, USHORT nSub, const String& rName, sal_uInt32 nFmt=0);
- SwDocInfoField(SwDocInfoFieldType*, USHORT nSub, const String& rName, const String& rValue, sal_uInt32 nFmt=0);
-
- virtual void SetSubType(USHORT);
- virtual USHORT GetSubType() const;
- virtual void SetLanguage(USHORT nLng);
virtual String Expand() const;
- virtual String GetCntnt(BOOL bName = FALSE) const;
virtual SwField* Copy() const;
+
+public:
+ SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const String& rName, sal_uInt32 nFmt=0);
+ SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const String& rName, const String& rValue, sal_uInt32 nFmt=0);
+
+ virtual void SetSubType(sal_uInt16);
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetLanguage(sal_uInt16 nLng);
+ virtual String GetFieldName() const;
String GetName() const { return aName; }
void SetName( const String& rName ) { aName = rName; }
inline void SetExpansion(const String& rStr) { aContent = rStr; }
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -601,28 +604,28 @@ public:
inline void SetData(const String& rStr) { aData = rStr; }
- String Expand(USHORT nSubType, sal_uInt32 nFormat) const;
+ String Expand(sal_uInt16 nSubType, sal_uInt32 nFormat) const;
virtual SwFieldType* Copy() const;
};
class SwExtUserField : public SwField
{
String aContent;
- USHORT nType;
+ sal_uInt16 nType;
public:
- SwExtUserField(SwExtUserFieldType*, USHORT nSub, sal_uInt32 nFmt=0);
+ SwExtUserField(SwExtUserFieldType*, sal_uInt16 nSub, sal_uInt32 nFmt=0);
virtual String Expand() const;
virtual SwField* Copy() const;
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT nSub);
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nSub);
inline void SetExpansion(const String& rStr) { aContent = rStr; }
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
@@ -647,11 +650,11 @@ public:
class SwRefPageSetField : public SwField
{
short nOffset;
- BOOL bOn;
+ sal_Bool bOn;
public:
SwRefPageSetField( SwRefPageSetFieldType*, short nOff = 0,
- BOOL bOn = TRUE );
+ sal_Bool bOn = sal_True );
virtual String Expand() const;
virtual SwField* Copy() const;
@@ -659,12 +662,12 @@ public:
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- BOOL IsOn() const { return bOn; }
+ sal_Bool IsOn() const { return bOn; }
short GetOffset() const { return nOffset; }
void SetOffset( short nOff ) { nOffset = nOff; }
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -684,7 +687,7 @@ public:
// Overlay in order to update all RefPageGet-fields.
virtual void Modify( SfxPoolItem *, SfxPoolItem * );
- USHORT MakeSetList( _SetGetExpFlds& rTmpLst );
+ sal_uInt16 MakeSetList( _SetGetExpFlds& rTmpLst );
SwDoc* GetDoc() const { return pDoc; }
};
@@ -705,8 +708,8 @@ public:
void SetText( const String& rTxt ) { sTxt = rTxt; }
void ChangeExpansion( const SwFrm* pFrm, const SwTxtFld* pFld );
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -745,8 +748,8 @@ public:
SwCharFmt* GetCharFmt() const
{ return ((SwJumpEditFieldType*)GetTyp())->GetCharFmt(); }
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -772,11 +775,11 @@ class SwScriptField : public SwField
String sCode; // Code as text.
// Code as JavaCode ?
- BOOL bCodeURL; // Code contains URL of a script.
+ sal_Bool bCodeURL; // Code contains URL of a script.
public:
SwScriptField( SwScriptFieldType*, const String& rType,
- const String& rCode, BOOL bURL=FALSE );
+ const String& rCode, sal_Bool bURL=sal_False );
virtual String GetDescription() const;
@@ -790,10 +793,10 @@ public:
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- BOOL IsCodeURL() const { return bCodeURL; }
- void SetCodeURL( BOOL bURL ) { bCodeURL = bURL; }
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ sal_Bool IsCodeURL() const { return bCodeURL; }
+ void SetCodeURL( sal_Bool bURL ) { bCodeURL = bURL; }
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -828,11 +831,11 @@ public:
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
-#endif // _DOCUFLD_HXX
+#endif // SW_DOCUFLD_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/dpage.hxx b/sw/inc/dpage.hxx
index a5f1e451a434..6c25476e1293 100644
--- a/sw/inc/dpage.hxx
+++ b/sw/inc/dpage.hxx
@@ -41,18 +41,18 @@ class SwDPage : public FmFormPage, public SdrObjUserCall
SwDoc& rDoc;
public:
- SwDPage(SwDrawDocument& rNewModel, BOOL bMasterPage=FALSE);
+ SwDPage(SwDrawDocument& rNewModel, sal_Bool bMasterPage=sal_False);
~SwDPage();
// #i3694#
// This GetOffset() method is not needed anymore, it even leads to errors.
// virtual Point GetOffset() const;
- virtual SdrObject* ReplaceObject( SdrObject* pNewObj, ULONG nObjNum );
+ virtual SdrObject* ReplaceObject( SdrObject* pNewObj, sal_uLong nObjNum );
virtual const SdrPageGridFrameList* GetGridFrameList(const SdrPageView* pPV,
const Rectangle *pRect) const;
- BOOL RequestHelp( Window* pWindow, SdrView* pView, const HelpEvent& rEvt );
+ sal_Bool RequestHelp( Window* pWindow, SdrView* pView, const HelpEvent& rEvt );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoPage();
};
diff --git a/sw/inc/edglbldc.hxx b/sw/inc/edglbldc.hxx
index d2075b01547e..ef46ae19bb42 100644
--- a/sw/inc/edglbldc.hxx
+++ b/sw/inc/edglbldc.hxx
@@ -43,14 +43,14 @@ enum GlobalDocContentType {
class SwGlblDocContent
{
GlobalDocContentType eType;
- ULONG nDocPos;
+ sal_uLong nDocPos;
union {
const SwTOXBase* pTOX;
const SwSection* pSect;
} PTR;
public:
- SwGlblDocContent( ULONG nPos );
+ SwGlblDocContent( sal_uLong nPos );
SwGlblDocContent( const SwTOXBaseSection* pTOX );
SwGlblDocContent( const SwSection* pSect );
@@ -60,7 +60,7 @@ public:
{ return GLBLDOC_SECTION == eType ? PTR.pSect : 0; }
const SwTOXBase* GetTOX() const
{ return GLBLDOC_TOXBASE == eType ? PTR.pTOX : 0; }
- ULONG GetDocPos() const { return nDocPos; }
+ sal_uLong GetDocPos() const { return nDocPos; }
// For sorting.
inline int operator==( const SwGlblDocContent& rCmp ) const
diff --git a/sw/inc/edimp.hxx b/sw/inc/edimp.hxx
index c7e6aab8a544..8fc4f8fe2f20 100644
--- a/sw/inc/edimp.hxx
+++ b/sw/inc/edimp.hxx
@@ -51,15 +51,15 @@ class SwNodeIndex;
struct SwPamRange
{
- ULONG nStart, nEnd;
+ sal_uLong nStart, nEnd;
SwPamRange() : nStart( 0 ), nEnd( 0 ) {}
- SwPamRange( ULONG nS, ULONG nE ) : nStart( nS ), nEnd( nE ) {}
+ SwPamRange( sal_uLong nS, sal_uLong nE ) : nStart( nS ), nEnd( nE ) {}
- BOOL operator==( const SwPamRange& rRg )
- { return nStart == rRg.nStart ? TRUE : FALSE; }
- BOOL operator<( const SwPamRange& rRg )
- { return nStart < rRg.nStart ? TRUE : FALSE; }
+ sal_Bool operator==( const SwPamRange& rRg )
+ { return nStart == rRg.nStart ? sal_True : sal_False; }
+ sal_Bool operator<( const SwPamRange& rRg )
+ { return nStart < rRg.nStart ? sal_True : sal_False; }
};
SV_DECL_VARARR_SORT( _SwPamRanges, SwPamRange, 0, 1 )
@@ -70,11 +70,11 @@ public:
SwPamRanges( const SwPaM& rRing );
void Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 );
- SwPaM& SetPam( USHORT nArrPos, SwPaM& rPam );
+ SwPaM& SetPam( sal_uInt16 nArrPos, SwPaM& rPam );
- USHORT Count() const
+ sal_uInt16 Count() const
{ return _SwPamRanges::Count(); }
- SwPamRange operator[]( USHORT nPos ) const
+ SwPamRange operator[]( sal_uInt16 nPos ) const
{ return _SwPamRanges::operator[](nPos); }
};
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 71a438c27ddb..b9c747b22ffd 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -73,7 +73,6 @@ class SwFmtRefMark;
class SwNumRule;
-class SwUndoIds;
class SwTxtFmtColl;
class SwGrfNode;
class SwFlyFrmFmt;
@@ -123,6 +122,10 @@ namespace sfx2{
class LinkManager;
}
+namespace sw {
+ class UndoRedoContext;
+}
+
#define GETSELTXT_PARABRK_TO_BLANK 0
#define GETSELTXT_PARABRK_KEEP 1
#define GETSELTXT_PARABRK_TO_ONLYCR 2
@@ -167,7 +170,7 @@ class SW_DLLPUBLIC SwEditShell: public SwCrsrShell
// that will be used by GetGraphic() and GetGraphicSize().
SW_DLLPRIVATE SwGrfNode *_GetGrfNode() const ;
- SW_DLLPRIVATE void DeleteSel( SwPaM& rPam, BOOL* pUndo = 0 );
+ SW_DLLPRIVATE void DeleteSel( SwPaM& rPam, sal_Bool* pUndo = 0 );
SW_DLLPRIVATE void _SetSectionAttr( SwSectionFmt& rSectFmt, const SfxItemSet& rSet );
@@ -176,7 +179,7 @@ class SW_DLLPUBLIC SwEditShell: public SwCrsrShell
public:
// Edit (all selected ranges).
- void Insert( sal_Unicode, BOOL bOnlyCurrCrsr = FALSE );
+ void Insert( sal_Unicode, sal_Bool bOnlyCurrCrsr = sal_False );
void Insert2( const String &, const bool bForceExpandHints = false );
void Overwrite( const String & );
@@ -185,14 +188,14 @@ public:
// bRegExpRplc - replace tabs (\\t) and insert found string (not \&).
// E.g.: Fnd: "zzz", Repl: "xx\t\\t..&..\&"
// --> "xx\t<Tab>..zzz..&"
- BOOL Replace( const String& rNewStr, BOOL bRegExpRplc = FALSE );
+ sal_Bool Replace( const String& rNewStr, sal_Bool bRegExpRplc = sal_False );
// Delete content of all ranges.
// If whole nodes are selected, these nodes get deleted.
long Delete();
// Remove a complete paragraph.
- BOOL DelFullPara();
+ sal_Bool DelFullPara();
// Change text to Upper/Lower/Hiragana/Katagana/...
void TransliterateText( sal_uInt32 nType );
@@ -202,17 +205,17 @@ public:
// Delete non-visible content in the document.
// E.g. hidden ranges, hidden paragraphs.
- BOOL RemoveInvisibleContent();
+ sal_Bool RemoveInvisibleContent();
// Replace fields by text - mailmerge support.
- BOOL ConvertFieldsToText();
+ sal_Bool ConvertFieldsToText();
// Set all numbering start points to a fixed value - mailmerge support.
void SetNumberingRestart();
// Embedds all local links (ranges/graphics).
- USHORT GetLinkUpdMode(BOOL bDocSettings = FALSE) const;
- void SetLinkUpdMode( USHORT nMode );
+ sal_uInt16 GetLinkUpdMode(sal_Bool bDocSettings = sal_False) const;
+ void SetLinkUpdMode( sal_uInt16 nMode );
// Copy content of all ranges at current position of cursor to given Shell.
long Copy( SwEditShell* pDestShell = 0 );
@@ -221,59 +224,59 @@ public:
// If table is copied into table, move all cursors away from it.
// Copy and Paste must be in FEShell because of FlyFrames!
// Copy all selections and the document.
- BOOL _CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pNdInsPos = 0 );
+ sal_Bool _CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pNdInsPos = 0 );
- long SplitNode( BOOL bAutoFormat = FALSE, BOOL bCheckTableStart = TRUE );
+ long SplitNode( sal_Bool bAutoFormat = sal_False, sal_Bool bCheckTableStart = sal_True );
sal_Bool AppendTxtNode();
void AutoFmtBySplitNode();
// If cursor is in a INetAttribute it will be deleted completely
// including the descriptive text (needed at drag & drop).
- BOOL DelINetAttrWithText();
+ sal_Bool DelINetAttrWithText();
// If Cursor is at the end of a character style in which the DontExpand-flag
// is not yet set, the latter will be set (==> return TRUE).
- BOOL DontExpandFmt();
+ sal_Bool DontExpandFmt();
// Apply / remove attributes.
// Returns attributs in required AttributeSet.
// When not unambiguous the set has a DONT_CARE !!
// 2nd optional parameter <bMergeIndentValuesOfNumRule>.
- // If <bMergeIndentValuesOfNumRule> == TRUE, the indent attributes of
+ // If <bMergeIndentValuesOfNumRule> == sal_True, the indent attributes of
// the corresponding list level of an applied list style is merged into
// the requested item set as a LR-SPACE item, if corresponding node has not
// its own indent attributes and the position-and-space mode of the list
// level is SvxNumberFormat::LABEL_ALIGNMENT.
- BOOL GetCurAttr( SfxItemSet& ,
+ sal_Bool GetCurAttr( SfxItemSet& ,
const bool bMergeIndentValuesOfNumRule = false ) const;
- void SetAttr( const SfxPoolItem&, USHORT nFlags = 0 );
- void SetAttr( const SfxItemSet&, USHORT nFlags = 0 );
+ void SetAttr( const SfxPoolItem&, sal_uInt16 nFlags = 0 );
+ void SetAttr( const SfxItemSet&, sal_uInt16 nFlags = 0 );
// Set attribute as new default attribute in document.
void SetDefault( const SfxPoolItem& );
// Query default attribute of document.
- const SfxPoolItem& GetDefault( USHORT nFmtHint ) const;
+ const SfxPoolItem& GetDefault( sal_uInt16 nFmtHint ) const;
void ResetAttr( const SvUShortsSort* pAttrs = 0 );
void GCAttr();
// Returns the scripttpye of the selection.
- USHORT GetScriptType() const;
+ sal_uInt16 GetScriptType() const;
// Returns the language at current cursor position.
- USHORT GetCurLang() const;
+ sal_uInt16 GetCurLang() const;
// TABLE
- USHORT GetTblFrmFmtCount( BOOL bUsed = FALSE ) const;
- SwFrmFmt& GetTblFrmFmt(USHORT nFmt, BOOL bUsed = FALSE ) const;
+ sal_uInt16 GetTblFrmFmtCount( sal_Bool bUsed = sal_False ) const;
+ SwFrmFmt& GetTblFrmFmt(sal_uInt16 nFmt, sal_Bool bUsed = sal_False ) const;
String GetUniqueTblName() const;
// CHAR
- USHORT GetCharFmtCount() const;
- SwCharFmt& GetCharFmt(USHORT nFmt) const;
+ sal_uInt16 GetCharFmtCount() const;
+ SwCharFmt& GetCharFmt(sal_uInt16 nFmt) const;
SwCharFmt* GetCurCharFmt() const;
- void FillByEx(SwCharFmt*, BOOL bReset = FALSE);
+ void FillByEx(SwCharFmt*, sal_Bool bReset = sal_False);
SwCharFmt* MakeCharFmt( const String& rName, SwCharFmt* pDerivedFrom = 0 );
SwCharFmt* FindCharFmtByName( const String& rName ) const;
@@ -290,8 +293,8 @@ public:
// TXT
SwTxtFmtColl& GetDfltTxtFmtColl() const;
- USHORT GetTxtFmtCollCount() const;
- SwTxtFmtColl& GetTxtFmtColl( USHORT nTxtFmtColl) const;
+ sal_uInt16 GetTxtFmtCollCount() const;
+ SwTxtFmtColl& GetTxtFmtColl( sal_uInt16 nTxtFmtColl) const;
SwTxtFmtColl* GetCurTxtFmtColl() const;
// #i62675#
@@ -300,25 +303,25 @@ public:
bool bResetListAttrs = false );
SwTxtFmtColl *MakeTxtFmtColl(const String &rFmtCollName,
SwTxtFmtColl *pDerivedFrom = 0);
- void FillByEx(SwTxtFmtColl*, BOOL bReset = FALSE);
+ void FillByEx(SwTxtFmtColl*, sal_Bool bReset = sal_False);
SwTxtFmtColl* FindTxtFmtCollByName( const String& rName ) const;
// Return "Auto-Collection" with given Id. If it does not exist create it.
- SwTxtFmtColl* GetTxtCollFromPool( USHORT nId );
+ SwTxtFmtColl* GetTxtCollFromPool( sal_uInt16 nId );
// Return required automatic format base class.
- SwFmt* GetFmtFromPool( USHORT nId );
+ SwFmt* GetFmtFromPool( sal_uInt16 nId );
// Return required automatic page style.
- SwPageDesc* GetPageDescFromPool( USHORT nId );
+ SwPageDesc* GetPageDescFromPool( sal_uInt16 nId );
// Query if the paragraph-/character-/frame-/page-style is used.
- BOOL IsUsed( const SwModify& ) const;
+ sal_Bool IsUsed( const SwModify& ) const;
// Return required automatic format.
- SwFrmFmt* GetFrmFmtFromPool( USHORT nId )
+ SwFrmFmt* GetFrmFmtFromPool( sal_uInt16 nId )
{ return (SwFrmFmt*)SwEditShell::GetFmtFromPool( nId ); }
- SwCharFmt* GetCharFmtFromPool( USHORT nId )
+ SwCharFmt* GetCharFmtFromPool( sal_uInt16 nId )
{ return (SwCharFmt*)SwEditShell::GetFmtFromPool( nId ); }
void Insert2(SwField&, const bool bForceExpandHints = false);
@@ -326,12 +329,12 @@ public:
void UpdateFlds( SwField & ); // One single field.
- USHORT GetFldTypeCount(USHORT nResId = USHRT_MAX, BOOL bUsed = FALSE) const;
- SwFieldType* GetFldType(USHORT nId, USHORT nResId = USHRT_MAX, BOOL bUsed = FALSE) const;
- SwFieldType* GetFldType(USHORT nResId, const String& rName) const;
+ sal_uInt16 GetFldTypeCount(sal_uInt16 nResId = USHRT_MAX, sal_Bool bUsed = sal_False) const;
+ SwFieldType* GetFldType(sal_uInt16 nId, sal_uInt16 nResId = USHRT_MAX, sal_Bool bUsed = sal_False) const;
+ SwFieldType* GetFldType(sal_uInt16 nResId, const String& rName) const;
- void RemoveFldType(USHORT nId, USHORT nResId = USHRT_MAX);
- void RemoveFldType(USHORT nResId, const String& rName);
+ void RemoveFldType(sal_uInt16 nId, sal_uInt16 nResId = USHRT_MAX);
+ void RemoveFldType(sal_uInt16 nResId, const String& rName);
void FieldToText( SwFieldType* pType );
@@ -346,17 +349,17 @@ public:
void GetAllUsedDB( SvStringsDtor& rDBNameList,
SvStringsDtor* pAllDBNames = 0 );
- BOOL IsAnyDatabaseFieldInDoc()const;
+ sal_Bool IsAnyDatabaseFieldInDoc()const;
// Check whether DB fields point to an available data source and returns it.
- BOOL IsFieldDataSourceAvailable(String& rUsedDataSource) const;
- void UpdateExpFlds(BOOL bCloseDB = FALSE);// nur alle ExpressionFelder updaten
- void SetFixFields( BOOL bOnlyTimeDate = FALSE,
+ sal_Bool IsFieldDataSourceAvailable(String& rUsedDataSource) const;
+ void UpdateExpFlds(sal_Bool bCloseDB = sal_False);// nur alle ExpressionFelder updaten
+ void SetFixFields( sal_Bool bOnlyTimeDate = sal_False,
const DateTime* pNewDateTime = 0 );
void LockExpFlds();
void UnlockExpFlds();
- SwFldUpdateFlags GetFldUpdateFlags(BOOL bDocSettings = FALSE) const;
+ SwFldUpdateFlags GetFldUpdateFlags(sal_Bool bDocSettings = sal_False) const;
void SetFldUpdateFlags( SwFldUpdateFlags eFlags );
// For evaluation of DB fields (new DB-manager).
@@ -365,7 +368,7 @@ public:
SwFieldType* InsertFldType(const SwFieldType &);
// Changes in document?
- BOOL IsModified() const;
+ sal_Bool IsModified() const;
void SetModified();
void ResetModified();
void SetUndoNoResetModified();
@@ -378,31 +381,31 @@ public:
void DeleteTOXMark(SwTOXMark* pMark);
// Get all marks at current SPoint.
- USHORT GetCurTOXMarks(SwTOXMarks& rMarks) const ;
+ sal_uInt16 GetCurTOXMarks(SwTOXMarks& rMarks) const ;
// Insert content table. Renew if required.
void InsertTableOf(const SwTOXBase& rTOX,
const SfxItemSet* pSet = 0);
- BOOL UpdateTableOf(const SwTOXBase& rTOX,
+ sal_Bool UpdateTableOf(const SwTOXBase& rTOX,
const SfxItemSet* pSet = 0);
const SwTOXBase* GetCurTOX() const;
- const SwTOXBase* GetDefaultTOXBase( TOXTypes eTyp, BOOL bCreate = FALSE );
+ const SwTOXBase* GetDefaultTOXBase( TOXTypes eTyp, sal_Bool bCreate = sal_False );
void SetDefaultTOXBase(const SwTOXBase& rBase);
- BOOL IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const;
- void SetTOXBaseReadonly(const SwTOXBase& rTOXBase, BOOL bReadonly);
+ sal_Bool IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const;
+ void SetTOXBaseReadonly(const SwTOXBase& rTOXBase, sal_Bool bReadonly);
- USHORT GetTOXCount() const;
- const SwTOXBase* GetTOX( USHORT nPos ) const;
- BOOL DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes = FALSE );
+ sal_uInt16 GetTOXCount() const;
+ const SwTOXBase* GetTOX( sal_uInt16 nPos ) const;
+ sal_Bool DeleteTOX( const SwTOXBase& rTOXBase, sal_Bool bDelNodes = sal_False );
// After reading file update all content tables.
- void SetUpdateTOX( BOOL bFlag = TRUE );
- BOOL IsUpdateTOX() const;
+ void SetUpdateTOX( sal_Bool bFlag = sal_True );
+ sal_Bool IsUpdateTOX() const;
// Manage types of content tables.
- USHORT GetTOXTypeCount(TOXTypes eTyp) const;
- const SwTOXType* GetTOXType(TOXTypes eTyp, USHORT nId) const;
+ sal_uInt16 GetTOXTypeCount(TOXTypes eTyp) const;
+ const SwTOXType* GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const;
void InsertTOXType(const SwTOXType& rTyp);
// AutoMark file
@@ -411,30 +414,30 @@ public:
void ApplyAutoMark();
// Key for managing index.
- USHORT GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const;
+ sal_uInt16 GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const;
void SetOutlineNumRule(const SwNumRule&);
const SwNumRule* GetOutlineNumRule() const;
- BOOL OutlineUpDown( short nOffset = 1 );
+ sal_Bool OutlineUpDown( short nOffset = 1 );
- BOOL MoveOutlinePara( short nOffset = 1);
+ sal_Bool MoveOutlinePara( short nOffset = 1);
- BOOL IsProtectedOutlinePara() const;
+ sal_Bool IsProtectedOutlinePara() const;
// Returns numbering rulse pf current enumeration list (else FALSE).
const SwNumRule* GetCurNumRule() const;
// If there is not already a numbering, set one, else change.
// Works with old and new rules. Update only differences.
- // Add optional parameter <bResetIndentAttrs> (default value FALSE).
+ // Add optional parameter <bResetIndentAttrs> (default value sal_False).
// If <bResetIndentAttrs> equals true, the indent attributes "before text"
// and "first line indent" are additionally reset at the current selection,
// if the list style makes use of the new list level attributes.
// introduce parameters <bCreateNewList> and <sContinuedListId>
// <bCreateNewList> indicates, if a new list is created by applying the
// given list style.
- // If <bCreateNewList> equals FALSE, <sContinuedListId> may contain the
+ // If <bCreateNewList> equals sal_False, <sContinuedListId> may contain the
// list Id of a list, which has to be continued by applying the given list style.
void SetCurNumRule( const SwNumRule&,
const bool bCreateNewList /*= false*/,
@@ -442,18 +445,18 @@ public:
const bool bResetIndentAttrs = false );
// Paragraphs without enumeration but with indents.
- BOOL NoNum();
+ sal_Bool NoNum();
// Delete, split enumeration list.
void DelNumRules();
- BOOL NumUpDown( BOOL bDown = TRUE );
+ sal_Bool NumUpDown( sal_Bool bDown = sal_True );
- BOOL MoveParagraph( long nOffset = 1);
- BOOL MoveNumParas( BOOL bUpperLower, BOOL bUpperLeft );
+ sal_Bool MoveParagraph( long nOffset = 1);
+ sal_Bool MoveNumParas( sal_Bool bUpperLower, sal_Bool bUpperLeft );
// Switch on/off of numbering via Delete/Backspace.
- BOOL NumOrNoNum( BOOL bDelete = FALSE, BOOL bChkStart = TRUE);
+ sal_Bool NumOrNoNum( sal_Bool bDelete = sal_False, sal_Bool bChkStart = sal_True);
// #i23726#
// #i90078#
@@ -462,15 +465,15 @@ public:
void ChangeIndentOfAllListLevels( short nDiff );
// Adjust method name
void SetIndent(short nIndent, const SwPosition & rPos);
- BOOL IsFirstOfNumRule() const;
- BOOL IsFirstOfNumRule(const SwPaM & rPaM) const;
+ sal_Bool IsFirstOfNumRule() const;
+ sal_Bool IsFirstOfNumRule(const SwPaM & rPaM) const;
- BOOL IsNoNum( BOOL bChkStart = TRUE ) const;
+ sal_Bool IsNoNum( sal_Bool bChkStart = sal_True ) const;
// Return Num-Level of the node in which point of cursor is.
// Return values can be: NO_NUMBERING,
// 0..MAXLEVEL-1, NO_NUMLEVEL .. NO_NUMLEVEL|MAXLEVEL-1
- BYTE GetNumLevel() const;
+ sal_uInt8 GetNumLevel() const;
// Detect highest and lowest level to check moving of outline levels.
void GetCurrentOutlineLevels( sal_uInt8& rUpper, sal_uInt8& rLower );
@@ -480,20 +483,20 @@ public:
int GetCurrentParaOutlineLevel( ) const;// #outlinelevel add by zhaojianwei
// i29560
- BOOL HasNumber() const;
- BOOL HasBullet() const;
+ sal_Bool HasNumber() const;
+ sal_Bool HasBullet() const;
- String GetUniqueNumRuleName( const String* pChkStr = 0, BOOL bAutoNum = TRUE ) const;
+ String GetUniqueNumRuleName( const String* pChkStr = 0, sal_Bool bAutoNum = sal_True ) const;
void ChgNumRuleFmts( const SwNumRule& rRule );
// Set (and query if) a numbering with StartFlag starts at current PointPos.
- void SetNumRuleStart( BOOL bFlag = TRUE );
- BOOL IsNumRuleStart() const;
- void SetNodeNumStart( USHORT nStt );
+ void SetNumRuleStart( sal_Bool bFlag = sal_True );
+ sal_Bool IsNumRuleStart() const;
+ void SetNodeNumStart( sal_uInt16 nStt );
- USHORT GetNodeNumStart() const;
+ sal_uInt16 GetNodeNumStart() const;
- BOOL ReplaceNumRule( const String& rOldRule, const String& rNewRule );
+ sal_Bool ReplaceNumRule( const String& rOldRule, const String& rNewRule );
// Searches for a text node with a numbering rule.
// in case a list style is found, <sListId> holds the list id, to which the
@@ -507,10 +510,10 @@ public:
// Undo.
// Maintain UndoHistory in Document.
// Reset UndoHistory at Save, SaveAs, Create ???
- void DoUndo( BOOL bOn = TRUE );
- BOOL DoesUndo() const;
- void DoGroupUndo( BOOL bUn = TRUE );
- BOOL DoesGroupUndo() const;
+ void DoUndo( sal_Bool bOn = sal_True );
+ sal_Bool DoesUndo() const;
+ void DoGroupUndo( sal_Bool bUn = sal_True );
+ sal_Bool DoesGroupUndo() const;
void DelAllUndoObj();
// Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
@@ -519,35 +522,21 @@ public:
// Closes parenthesis of nUndoId, not used by UI.
SwUndoId EndUndo( SwUndoId eUndoId = UNDO_EMPTY, const SwRewriter * pRewriter = 0 );
- // Returns Id of last undo-able action. Fills VARARR with User-UndoIds if required.
- SwUndoId GetUndoIds( String* pUndoStr = 0, SwUndoIds *pUndoIds = 0) const;
- String GetUndoIdsStr( String* pUndoStr = 0, SwUndoIds *pUndoIds = 0) const;
-
- // Get count of possible undo-actions.
- static USHORT GetUndoActionCount();
-
- // Query count of possible undo-actions.
- static void SetUndoActionCount( USHORT nNew );
-
- // Redo.
- // Returns Id of las undo-able action. Fills VARARR with RedoIds if required.
- SwUndoId GetRedoIds( String* pRedoStr = 0, SwUndoIds *pRedoIds = 0) const;
- String GetRedoIdsStr( String* pRedoStr = 0, SwUndoIds *pRedoIds = 0) const;
+ bool GetLastUndoInfo(::rtl::OUString *const o_pStr,
+ SwUndoId *const o_pId) const;
+ bool GetFirstRedoInfo(::rtl::OUString *const o_pStr) const;
+ SwUndoId GetRepeatInfo(::rtl::OUString *const o_pStr) const;
- // Repeat.
- // Returns Id of last repeatable action. Fills VARARR with RedoIds if required.
- SwUndoId GetRepeatIds( String* pRepeatStr = 0, SwUndoIds *pRedoIds = 0) const;
- String GetRepeatIdsStr( String* pRepeatStr = 0,
- SwUndoIds *pRedoIds = 0) const;
+ /// is it forbidden to modify cursors via API calls?
+ bool CursorsLocked() const;
+ /// set selections to those contained in the UndoRedoContext
+ /// should only be called by sw::UndoManager!
+ void HandleUndoRedoContext(::sw::UndoRedoContext & rContext);
+ bool Undo(sal_uInt16 const nCount = 1);
+ bool Redo(sal_uInt16 const nCount = 1);
+ bool Repeat(sal_uInt16 const nCount);
- // 0 if last action, else actions until start of parenthesis nUndoId
- // with KillPaMs, ClearMark.
- BOOL Undo(SwUndoId nUndoId = UNDO_EMPTY, USHORT nCnt = 1 );
-
- USHORT Repeat( USHORT nCount );
-
- USHORT Redo( USHORT nCnt = 1 );
// For all views of this document.
void StartAllAction();
@@ -557,10 +546,10 @@ public:
void CalcLayout();
// Determine form of content. Return Type at CurCrsr->SPoint.
- USHORT GetCntType() const;
+ sal_uInt16 GetCntType() const;
// Are there frames, footnotes, etc.
- BOOL HasOtherCnt() const;
+ sal_Bool HasOtherCnt() const;
// Apply ViewOptions with Start-/EndAction.
inline void ApplyViewOptions( const SwViewOption &rOpt );
@@ -568,17 +557,17 @@ public:
// Query text within selection.
// Returns FALSE, if selected range is too large to be copied
// into string buffer or if other errors occur.
- BOOL GetSelectedText( String &rBuf,
+ sal_Bool GetSelectedText( String &rBuf,
int nHndlParaBreak = GETSELTXT_PARABRK_TO_BLANK );
// Returns graphic, if CurCrsr->Point() points to a SwGrfNode
// (and mark is not set or points to the same graphic).
- const Graphic* GetGraphic( BOOL bWait = TRUE ) const;
+ const Graphic* GetGraphic( sal_Bool bWait = sal_True ) const;
const GraphicObject* GetGraphicObj() const;
- BOOL IsGrfSwapOut( BOOL bOnlyLinked = FALSE ) const;
- USHORT GetGraphicType() const;
+ sal_Bool IsGrfSwapOut( sal_Bool bOnlyLinked = sal_False ) const;
+ sal_uInt16 GetGraphicType() const;
const PolyPolygon *GetGraphicPolygon() const;
void SetGraphicPolygon( const PolyPolygon *pPoly );
@@ -588,7 +577,7 @@ public:
void ClearAutomaticContour();
// Returns the size of a graphic in Twips if cursor is in a graphic.
- BOOL GetGrfSize(Size&) const;
+ sal_Bool GetGrfSize(Size&) const;
// Returns name and filter of a graphic if the cursor is in a graphic,
// else give a rap on the knuckles!
@@ -607,8 +596,7 @@ public:
// #i73788#
// Remove default parameter, because method always called this default value.
Graphic GetIMapGraphic() const; // Returns a graphic for all Flys!
-
- const SwFlyFrmFmt* FindFlyByName( const String& rName, BYTE nNdTyp = 0 ) const;
+ const SwFlyFrmFmt* FindFlyByName( const String& rName, sal_uInt8 nNdTyp = 0 ) const;
// Returns a ClientObject, if CurCrsr->Point() points to a SwOLENode
// (and mark is neither set not pointint to same ClientObject)
@@ -616,7 +604,7 @@ public:
svt::EmbeddedObjectRef& GetOLEObject() const;
// Is there an OLEObject with this name (SwFmt)?
- BOOL HasOLEObj( const String &rName ) const;
+ sal_Bool HasOLEObj( const String &rName ) const;
// Returns pointer to the data of the chart in which Cursr is.
void SetChartName( const String &rName );
@@ -632,15 +620,15 @@ public:
// Make current selection glossary and insert into glossary document
// including styles.
- USHORT MakeGlossary( SwTextBlocks& rToFill, const String& rName,
- const String& rShortName, BOOL bSaveRelFile = FALSE,
+ sal_uInt16 MakeGlossary( SwTextBlocks& rToFill, const String& rName,
+ const String& rShortName, sal_Bool bSaveRelFile = sal_False,
const String* pOnlyTxt=0 );
// Save complete content of doc as glossary.
- USHORT SaveGlossaryDoc( SwTextBlocks& rGlossary, const String& rName,
+ sal_uInt16 SaveGlossaryDoc( SwTextBlocks& rGlossary, const String& rName,
const String& rShortName,
- BOOL bSaveRelFile = FALSE,
- BOOL bOnlyTxt = FALSE );
+ sal_Bool bSaveRelFile = sal_False,
+ sal_Bool bOnlyTxt = sal_False );
// Linguistics...
// Save selections.
@@ -649,7 +637,7 @@ public:
// restore selections.
void HyphEnd();
com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>
- HyphContinue( USHORT* pPageCnt, USHORT* pPageSt );
+ HyphContinue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt );
void HyphIgnore();
@@ -657,47 +645,47 @@ public:
void InsertSoftHyph( const xub_StrLen nHyphPos );
const SwTable& InsertTable( const SwInsertTableOptions& rInsTblOpts, // ALL_TBL_INS_ATTR
- USHORT nRows, USHORT nCols,
+ sal_uInt16 nRows, sal_uInt16 nCols,
sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL,
const SwTableAutoFmt* pTAFmt = 0 );
void InsertDDETable( const SwInsertTableOptions& rInsTblOpts, // HEADLINE_NO_BORDER
SwDDEFieldType* pDDEType,
- USHORT nRows, USHORT nCols,
+ sal_uInt16 nRows, sal_uInt16 nCols,
sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL );
void UpdateTable();
void SetTableName( SwFrmFmt& rTblFmt, const String &rNewName );
SwFrmFmt *GetTableFmt();
- BOOL TextToTable( const SwInsertTableOptions& rInsTblOpts, //ALL_TBL_INS_ATTR
+ sal_Bool TextToTable( const SwInsertTableOptions& rInsTblOpts, //ALL_TBL_INS_ATTR
sal_Unicode cCh,
sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL,
const SwTableAutoFmt* pTAFmt = 0 );
- BOOL TableToText( sal_Unicode cCh );
- BOOL IsTextToTableAvailable() const;
+ sal_Bool TableToText( sal_Unicode cCh );
+ sal_Bool IsTextToTableAvailable() const;
- BOOL GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const;
+ sal_Bool GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const;
void SetTblBoxFormulaAttrs( const SfxItemSet& rSet );
- BOOL IsTableBoxTextFormat() const;
+ sal_Bool IsTableBoxTextFormat() const;
String GetTableBoxText() const;
TblChgMode GetTblChgMode() const;
void SetTblChgMode( TblChgMode eMode );
// Split table at cursor position.
- BOOL SplitTable( USHORT eMode );
+ sal_Bool SplitTable( sal_uInt16 eMode );
// Merge tables.
// Can Merge checks if Prev or Next are possible.
// If pointer pChkNxtPrv is passed possible direction is given.
- BOOL CanMergeTable( BOOL bWithPrev = TRUE, BOOL* pChkNxtPrv = 0 ) const;
- BOOL MergeTable( BOOL bWithPrev = TRUE, USHORT nMode = 0 );
+ sal_Bool CanMergeTable( sal_Bool bWithPrev = sal_True, sal_Bool* pChkNxtPrv = 0 ) const;
+ sal_Bool MergeTable( sal_Bool bWithPrev = sal_True, sal_uInt16 nMode = 0 );
// Set up InsertDB as table Undo.
- void AppendUndoForInsertFromDB( BOOL bIsTable );
+ void AppendUndoForInsertFromDB( sal_Bool bIsTable );
// Functions used for spell checking and text conversion.
@@ -708,7 +696,7 @@ public:
// Restore selections.
void SpellEnd( SwConversionArgs *pConvArgs = 0, bool bRestoreSelection = true );
::com::sun::star::uno::Any SpellContinue(
- USHORT* pPageCnt, USHORT* pPageSt,
+ sal_uInt16* pPageCnt, sal_uInt16* pPageSt,
SwConversionArgs *pConvArgs = 0 );
// Spells on a sentence basis - the SpellPortions are needed
@@ -728,10 +716,10 @@ public:
bool HasLastSentenceGotGrammarChecked() const;
// Is text conversion active somewhere else?
- BOOL HasConvIter() const;
+ sal_Bool HasConvIter() const;
// Is hyphenation active somewhere else?
- BOOL HasHyphIter() const;
+ sal_Bool HasHyphIter() const;
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XSpellAlternatives >
@@ -752,12 +740,12 @@ public:
// Return names of all references set in document.
// If ArrayPointer == 0 then return only whether a RefMark is set in document.
- USHORT GetRefMarks( SvStringsDtor* = 0 ) const;
+ sal_uInt16 GetRefMarks( SvStringsDtor* = 0 ) const;
// Call AutoCorrect
- void AutoCorrect( SvxAutoCorrect& rACorr, BOOL bInsertMode = TRUE,
+ void AutoCorrect( SvxAutoCorrect& rACorr, sal_Bool bInsertMode = sal_True,
sal_Unicode cChar = ' ' );
- BOOL GetPrevAutoCorrWord( SvxAutoCorrect& rACorr, String& rWord );
+ sal_Bool GetPrevAutoCorrWord( SvxAutoCorrect& rACorr, String& rWord );
// Set our styles according to the respective rules.
void AutoFormat( const SvxSwAutoFmtFlags* pAFlags = 0 );
@@ -768,33 +756,31 @@ public:
// Calculates selection.
String Calculate();
- BOOL InsertURL( const SwFmtINetFmt& rFmt, const String& rStr,
- BOOL bKeepSelection = FALSE );
- USHORT GetINetAttrs( SwGetINetAttrs& rArr );
+ sal_Bool InsertURL( const SwFmtINetFmt& rFmt, const String& rStr,
+ sal_Bool bKeepSelection = sal_False );
+ sal_uInt16 GetINetAttrs( SwGetINetAttrs& rArr );
- String GetDropTxt( const USHORT nChars ) const;
+ String GetDropTxt( const sal_uInt16 nChars ) const;
void ReplaceDropTxt( const String &rStr );
// May an outline be moved or copied?
// Check whether it's in text body, not in table, and not read-only (move).
- BOOL IsOutlineMovable( USHORT nIdx ) const;
- BOOL IsOutlineCopyable( USHORT nIdx ) const;
+ sal_Bool IsOutlineMovable( sal_uInt16 nIdx ) const;
+ sal_Bool IsOutlineCopyable( sal_uInt16 nIdx ) const;
- USHORT GetLineCount( BOOL bActPos = TRUE );
+ sal_uInt16 GetLineCount( sal_Bool bActPos = sal_True );
// Query and set footnote-text/number. Set.. to current SSelection!
- BOOL GetCurFtn( SwFmtFtn* pToFillFtn = 0 );
+ sal_Bool GetCurFtn( SwFmtFtn* pToFillFtn = 0 );
bool SetCurFtn( const SwFmtFtn& rFillFtn );
bool HasFtns( bool bEndNotes = false ) const;
- // USHORT GetFtnCnt( BOOL bEndNotes = FALSE ) const; //Currently not required.
-
+ sal_uInt16 GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes = false );
// Return list of all footnotes and their first portions of text.
- USHORT GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes = false );
SwSection const* InsertSection(
SwSectionData & rNewData, SfxItemSet const*const = 0 );
- BOOL IsInsRegionAvailable() const;
+ sal_Bool IsInsRegionAvailable() const;
const SwSection* GetCurrSection() const;
// Returns current range like Cet CurrSection(). But this function iterates
@@ -802,17 +788,17 @@ public:
// a footnote the reference of which is in a columned range.
// If bOutOfTab is set, the range comprising the table is searched
// and not an inner one.
- const SwSection* GetAnySection( BOOL bOutOfTab = FALSE, const Point* pPt = 0 ) const;
+ const SwSection* GetAnySection( sal_Bool bOutOfTab = sal_False, const Point* pPt = 0 ) const;
- USHORT GetSectionFmtCount() const;
- USHORT GetSectionFmtPos( const SwSectionFmt& ) const;
- const SwSectionFmt& GetSectionFmt(USHORT nFmt) const;
- void DelSectionFmt( USHORT nFmt );
+ sal_uInt16 GetSectionFmtCount() const;
+ sal_uInt16 GetSectionFmtPos( const SwSectionFmt& ) const;
+ const SwSectionFmt& GetSectionFmt(sal_uInt16 nFmt) const;
+ void DelSectionFmt( sal_uInt16 nFmt );
void UpdateSection(sal_uInt16 const nSect, SwSectionData &,
SfxItemSet const*const = 0);
- BOOL IsAnySectionInDoc( BOOL bChkReadOnly = FALSE,
- BOOL bChkHidden = FALSE,
- BOOL BChkTOX = FALSE ) const;
+ sal_Bool IsAnySectionInDoc( sal_Bool bChkReadOnly = sal_False,
+ sal_Bool bChkHidden = sal_False,
+ sal_Bool BChkTOX = sal_False ) const;
String GetUniqueSectionName( const String* pChkStr = 0 ) const;
@@ -822,7 +808,7 @@ public:
// Search inside the cursor selection for full selected sections.
// if any part of section in the selection return 0.
// if more than one in the selection return the count.
- USHORT GetFullSelectedSectionCount() const;
+ sal_uInt16 GetFullSelectedSectionCount() const;
// Special insert: Insert a new text node just before or after a section or
// table, if the cursor is positioned at the start/end of said
@@ -833,16 +819,16 @@ public:
bool CanSpecialInsert() const;
// Optimizing UI.
- void SetNewDoc(BOOL bNew = TRUE);
+ void SetNewDoc(sal_Bool bNew = sal_True);
sfx2::LinkManager& GetLinkManager();
inline const sfx2::LinkManager& GetLinkManager() const;
// linken Rand ueber Objectleiste einstellen (aenhlich dem Stufen von
// Numerierungen), optional kann man "um" den Offset stufen oder "auf"
- // die Position gestuft werden (bModulus = TRUE)
- BOOL IsMoveLeftMargin( BOOL bRight = TRUE, BOOL bModulus = TRUE ) const;
- void MoveLeftMargin( BOOL bRight = TRUE, BOOL bModulus = TRUE );
+ // die Position gestuft werden (bModulus = sal_True)
+ sal_Bool IsMoveLeftMargin( sal_Bool bRight = sal_True, sal_Bool bModulus = sal_True ) const;
+ void MoveLeftMargin( sal_Bool bRight = sal_True, sal_Bool bModulus = sal_True );
// Query NumberFormater from document.
SvNumberFormatter* GetNumberFormatter();
@@ -850,38 +836,39 @@ public:
{ return ((SwEditShell*)this)->GetNumberFormatter(); }
// Interfaces for GlobalDocument.
- BOOL IsGlobalDoc() const;
- void SetGlblDocSaveLinks( BOOL bFlag = TRUE );
- BOOL IsGlblDocSaveLinks() const;
- USHORT GetGlobalDocContent( SwGlblDocContents& rArr ) const;
- BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos,
+ sal_Bool IsGlobalDoc() const;
+ void SetGlblDocSaveLinks( sal_Bool bFlag = sal_True );
+ sal_Bool IsGlblDocSaveLinks() const;
+ sal_uInt16 GetGlobalDocContent( SwGlblDocContents& rArr ) const;
+ sal_Bool InsertGlobalDocContent( const SwGlblDocContent& rPos,
SwSectionData & rNew );
- BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos,
+ sal_Bool InsertGlobalDocContent( const SwGlblDocContent& rPos,
const SwTOXBase& rTOX );
- BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos );
- BOOL DeleteGlobalDocContent( const SwGlblDocContents& rArr,
- USHORT nPos );
- BOOL MoveGlobalDocContent( const SwGlblDocContents& rArr ,
- USHORT nFromPos, USHORT nToPos,
- USHORT nNewPos );
- BOOL GotoGlobalDocContent( const SwGlblDocContent& rPos );
+ sal_Bool InsertGlobalDocContent( const SwGlblDocContent& rPos );
+ sal_Bool DeleteGlobalDocContent( const SwGlblDocContents& rArr,
+ sal_uInt16 nPos );
+ sal_Bool MoveGlobalDocContent( const SwGlblDocContents& rArr ,
+ sal_uInt16 nFromPos, sal_uInt16 nToPos,
+ sal_uInt16 nNewPos );
+ sal_Bool GotoGlobalDocContent( const SwGlblDocContent& rPos );
// For Redlining.
- USHORT GetRedlineMode() const;
- void SetRedlineMode( USHORT eMode );
- BOOL IsRedlineOn() const;
- USHORT GetRedlineCount() const;
- const SwRedline& GetRedline( USHORT nPos ) const;
- BOOL AcceptRedline( USHORT nPos );
- BOOL RejectRedline( USHORT nPos );
+ sal_uInt16 GetRedlineMode() const;
+ void SetRedlineMode( sal_uInt16 eMode );
+ sal_Bool IsRedlineOn() const;
+ sal_uInt16 GetRedlineCount() const;
+ const SwRedline& GetRedline( sal_uInt16 nPos ) const;
+ sal_Bool AcceptRedline( sal_uInt16 nPos );
+ sal_Bool RejectRedline( sal_uInt16 nPos );
// Search Redline for this Data and return position in array.
// If not found, return USHRT_MAX.
- USHORT FindRedlineOfData( const SwRedlineData& ) const;
+ sal_uInt16 FindRedlineOfData( const SwRedlineData& ) const;
+
// Set comment to Redline at position.
- BOOL SetRedlineComment( const String& rS );
+ sal_Bool SetRedlineComment( const String& rS );
const SwRedline* GetCurrRedline() const;
// Redline attributes have been changed. Updated views.
@@ -903,12 +890,12 @@ public:
void SetLineNumberInfo( const SwLineNumberInfo& rInfo);
// Labels: Synchronize ranges.
- void SetLabelDoc( BOOL bFlag = TRUE );
- BOOL IsLabelDoc() const;
+ void SetLabelDoc( sal_Bool bFlag = sal_True );
+ sal_Bool IsLabelDoc() const;
// Interface for TextInputData - (for input of Japanese/Chinese chars.)
SwExtTextInput* CreateExtTextInput(LanguageType eInputLanguage);
- String DeleteExtTextInput( SwExtTextInput* pDel = 0, BOOL bInsText = TRUE);
+ String DeleteExtTextInput( SwExtTextInput* pDel = 0, sal_Bool bInsText = sal_True);
void SetExtTextInputData( const CommandExtTextInputData& );
// Interface for access to AutoComplete-list.
@@ -916,7 +903,7 @@ public:
// Returns a scaling factor of selected text. Used for the rotated
// character attribut dialog.
- USHORT GetScalingOfSelectedText() const;
+ sal_uInt16 GetScalingOfSelectedText() const;
// Ctor/Dtor.
SwEditShell( SwDoc&, Window*, const SwViewOption *pOpt = 0 );
diff --git a/sw/inc/errhdl.hxx b/sw/inc/errhdl.hxx
new file mode 100644
index 000000000000..31002c1875c8
--- /dev/null
+++ b/sw/inc/errhdl.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * 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 _ERRHDL_HXX
+#define _ERRHDL_HXX
+
+#ifdef DBG_UTIL
+
+#include <tools/solar.h>
+#include <sal/types.h>
+#include "swdllapi.h"
+
+extern sal_Bool bAssert; // sal_True, wenn eine ASSERT-Box hochkam
+
+
+// -----------------------------------------------------------------------
+// Ausgabe einer Fehlermeldung inkl. Dateiname und Zeilennummer
+// wo der Fehler auftrat.
+// Die Funktion darf nicht direkt benutzt werden!
+// -----------------------------------------------------------------------
+SW_DLLPUBLIC void AssertFail( const sal_Char*, const sal_Char*, sal_uInt16 );
+SW_DLLPUBLIC void AssertFail( sal_uInt16, const sal_Char*, sal_uInt16 );
+
+#define ASSERT( cond, message ) \
+ if( !(cond) ) { \
+ const char *_pErrorText = #message; \
+ const char *_pFileName = __FILE__; \
+ ::AssertFail( _pErrorText, _pFileName, __LINE__ ); \
+ }
+
+// -----------------------------------------------------------------------
+// Prueft ob die angegebene Bedingung wahr ist, wenn nicht wird eine
+// Fehlermeldung die ueber die ID Identifiziert wird, ausgegeben.
+// -----------------------------------------------------------------------
+#define ASSERT_ID( cond, id ) \
+ if( !(cond) ) { \
+ const char *_pFileName = __FILE__; \
+ ::AssertFail( (sal_uInt16)id, _pFileName, __LINE__ ); \
+ }
+
+
+// -----------------------------------------------------------------------
+// Beim Bilden der Produktversion werden alle Debug-Utilities automatisch
+// ignoriert
+// -----------------------------------------------------------------------
+#else
+#define ASSERT( cond, message ) ;
+#define ASSERT_ID( cond, id ) ;
+#endif // PRODUCT
+
+
+
+#endif
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index 4a2e654f131a..e80b2c264578 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -25,8 +25,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _EXPFLD_HXX
-#define _EXPFLD_HXX
+#ifndef SW_EXPFLD_HXX
+#define SW_EXPFLD_HXX
#include <svl/svarray.hxx>
#include "swdllapi.h"
@@ -47,14 +47,14 @@ class SwEditShell;
const SwTxtNode* GetBodyTxtNode( const SwDoc& pDoc, SwPosition& rPos,
const SwFrm& rFrm );
-void ReplacePoint(String& sTmpName, BOOL bWithCommandType = FALSE);
+void ReplacePoint(String& sTmpName, sal_Bool bWithCommandType = sal_False);
struct _SeqFldLstElem
{
String sDlgEntry;
- USHORT nSeqNo;
+ sal_uInt16 nSeqNo;
- _SeqFldLstElem( const String& rStr, USHORT nNo )
+ _SeqFldLstElem( const String& rStr, sal_uInt16 nNo )
: sDlgEntry( rStr ), nSeqNo( nNo )
{}
};
@@ -65,8 +65,8 @@ class SW_DLLPUBLIC SwSeqFldList : public _SwSeqFldList
public:
SwSeqFldList() : _SwSeqFldList( 10, 10 ) {}
- BOOL InsertSort( _SeqFldLstElem* );
- BOOL SeekEntry( const _SeqFldLstElem& , USHORT* pPos = 0 );
+ sal_Bool InsertSort( _SeqFldLstElem* );
+ sal_Bool SeekEntry( const _SeqFldLstElem& , sal_uInt16* pPos = 0 );
};
class SwGetExpFieldType : public SwValueFieldType
@@ -84,46 +84,46 @@ public:
class SW_DLLPUBLIC SwGetExpField : public SwFormulaField
{
String sExpand;
- BOOL bIsInBodyTxt;
- USHORT nSubType;
+ sal_Bool bIsInBodyTxt;
+ sal_uInt16 nSubType;
bool bLateInitialization; // #i82544#
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
public:
SwGetExpField( SwGetExpFieldType*, const String& rFormel,
- USHORT nSubType = nsSwGetSetExpType::GSE_EXPR, ULONG nFmt = 0);
+ sal_uInt16 nSubType = nsSwGetSetExpType::GSE_EXPR, sal_uLong nFmt = 0);
virtual void SetValue( const double& rVal );
- virtual void SetLanguage(USHORT nLng);
-
- virtual String Expand() const;
- virtual SwField* Copy() const;
+ virtual void SetLanguage(sal_uInt16 nLng);
inline const String& GetExpStr() const;
inline void ChgExpStr(const String& rExpand);
// Called by formating.
- inline BOOL IsInBodyTxt() const;
+ inline sal_Bool IsInBodyTxt() const;
// Set by UpdateExpFlds where node position is known.
- inline void ChgBodyTxtFlag( BOOL bIsInBody );
+ inline void ChgBodyTxtFlag( sal_Bool bIsInBody );
// For fields in header/footer/footnotes/flys:
// Only called by formating!!
void ChangeExpansion( const SwFrm&, const SwTxtFld& );
- virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String GetFieldName() const;
// Change formula.
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT nType);
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nType);
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
- static USHORT GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc);
+ static sal_uInt16 GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc);
// #i82544#
void SetLateInitialization() { bLateInitialization = true;}
};
@@ -135,11 +135,11 @@ inline const String& SwGetExpField::GetExpStr() const
{ return sExpand; }
// Called by formating.
-inline BOOL SwGetExpField::IsInBodyTxt() const
+inline sal_Bool SwGetExpField::IsInBodyTxt() const
{ return bIsInBodyTxt; }
// Set by UpdateExpFlds where node position is known.
-inline void SwGetExpField::ChgBodyTxtFlag( BOOL bIsInBody )
+inline void SwGetExpField::ChgBodyTxtFlag( sal_Bool bIsInBody )
{ bIsInBodyTxt = bIsInBody; }
class SwSetExpField;
@@ -149,39 +149,39 @@ class SW_DLLPUBLIC SwSetExpFieldType : public SwValueFieldType
String sName;
const SwNode* pOutlChgNd;
String sDelim;
- USHORT nType;
- BYTE nLevel;
- BOOL bDeleted;
+ sal_uInt16 nType;
+ sal_uInt8 nLevel;
+ sal_Bool bDeleted;
public:
SwSetExpFieldType( SwDoc* pDoc, const String& rName,
- USHORT nType = nsSwGetSetExpType::GSE_EXPR );
+ sal_uInt16 nType = nsSwGetSetExpType::GSE_EXPR );
virtual SwFieldType* Copy() const;
virtual const String& GetName() const;
- inline void SetType(USHORT nTyp);
- inline USHORT GetType() const;
+ inline void SetType(sal_uInt16 nTyp);
+ inline sal_uInt16 GetType() const;
- void SetSeqFormat(ULONG nFormat);
- ULONG GetSeqFormat();
+ void SetSeqFormat(sal_uLong nFormat);
+ sal_uLong GetSeqFormat();
- BOOL IsDeleted() const { return bDeleted; }
- void SetDeleted( BOOL b ) { bDeleted = b; }
+ sal_Bool IsDeleted() const { return bDeleted; }
+ void SetDeleted( sal_Bool b ) { bDeleted = b; }
// Overlay, because set-field takes care for its being updated by itself.
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
inline const String& GetSetRefName() const;
- USHORT SetSeqRefNo( SwSetExpField& rFld );
+ sal_uInt16 SetSeqRefNo( SwSetExpField& rFld );
- USHORT GetSeqFldList( SwSeqFldList& rList );
- String MakeSeqName( USHORT nSeqNo );
+ sal_uInt16 GetSeqFldList( SwSeqFldList& rList );
+ String MakeSeqName( sal_uInt16 nSeqNo );
// Number sequence fields chapterwise if required.
const String& GetDelimiter() const { return sDelim; }
void SetDelimiter( const String& s ) { sDelim = s; }
- BYTE GetOutlineLvl() const { return nLevel; }
- void SetOutlineLvl( BYTE n ) { nLevel = n; }
+ sal_uInt8 GetOutlineLvl() const { return nLevel; }
+ void SetOutlineLvl( sal_uInt8 n ) { nLevel = n; }
void SetChapter( SwSetExpField& rFld, const SwNode& rNd );
// Member only for SwDoc::UpdateExpFld.
@@ -189,17 +189,17 @@ public:
const SwNode* GetOutlineChgNd() const { return pOutlChgNd; }
void SetOutlineChgNd( const SwNode* p ) { pOutlChgNd = p; }
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
-inline void SwSetExpFieldType::SetType( USHORT nTyp )
+inline void SwSetExpFieldType::SetType( sal_uInt16 nTyp )
{
nType = nTyp;
EnableFormat( !(nType & (nsSwGetSetExpType::GSE_SEQ|nsSwGetSetExpType::GSE_STRING)));
}
-inline USHORT SwSetExpFieldType::GetType() const
+inline sal_uInt16 SwSetExpFieldType::GetType() const
{ return nType; }
inline const String& SwSetExpFieldType::GetSetRefName() const
@@ -211,18 +211,18 @@ class SW_DLLPUBLIC SwSetExpField : public SwFormulaField
String sExpand;
String aPText;
String aSeqText;
- BOOL bInput;
- USHORT nSeqNo;
- USHORT nSubType;
+ sal_Bool bInput;
+ sal_uInt16 nSeqNo;
+ sal_uInt16 nSubType;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
public:
- SwSetExpField(SwSetExpFieldType*, const String& rFormel, ULONG nFmt = 0);
+ SwSetExpField(SwSetExpFieldType*, const String& rFormel, sal_uLong nFmt = 0);
virtual void SetValue( const double& rVal );
- virtual String Expand() const;
- virtual SwField* Copy() const;
-
inline const String& GetExpStr() const;
inline void ChgExpStr( const String& rExpand );
@@ -230,18 +230,19 @@ public:
inline void SetPromptText(const String& rStr);
inline const String& GetPromptText() const;
- inline void SetInputFlag(BOOL bInp);
- inline BOOL GetInputFlag() const;
+ inline void SetInputFlag(sal_Bool bInp);
+ inline sal_Bool GetInputFlag() const;
+
+ virtual String GetFieldName() const;
- virtual String GetCntnt(BOOL bName = FALSE) const;
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT nType);
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nType);
- inline BOOL IsSequenceFld() const;
+ inline sal_Bool IsSequenceFld() const;
// Logical number, sequence fields.
- inline void SetSeqNumber( USHORT n ) { nSeqNo = n; }
- inline USHORT GetSeqNumber() const { return nSeqNo; }
+ inline void SetSeqNumber( sal_uInt16 n ) { nSeqNo = n; }
+ inline sal_uInt16 GetSeqNumber() const { return nSeqNo; }
// Query name only.
virtual const String& GetPar1() const;
@@ -249,8 +250,8 @@ public:
// Query formula.
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
inline const String& SwSetExpField::GetExpStr() const
@@ -265,13 +266,13 @@ inline void SwSetExpField::SetPromptText(const String& rStr)
inline const String& SwSetExpField::GetPromptText() const
{ return aPText; }
-inline void SwSetExpField::SetInputFlag(BOOL bInp)
+inline void SwSetExpField::SetInputFlag(sal_Bool bInp)
{ bInput = bInp; }
-inline BOOL SwSetExpField::GetInputFlag() const
+inline sal_Bool SwSetExpField::GetInputFlag() const
{ return bInput; }
-inline BOOL SwSetExpField::IsSequenceFld() const
+inline sal_Bool SwSetExpField::IsSequenceFld() const
{ return 0 != (nsSwGetSetExpType::GSE_SEQ & ((SwSetExpFieldType*)GetTyp())->GetType()); }
@@ -293,16 +294,18 @@ class SW_DLLPUBLIC SwInputField : public SwField
String aPText;
String aHelp;
String aToolTip;
- USHORT nSubType;
+ sal_uInt16 nSubType;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
public:
// Direct input via dialog; delete old value.
SwInputField(SwInputFieldType*, const String& rContent ,
- const String& rPrompt, USHORT nSubType = 0,
- ULONG nFmt = 0);
+ const String& rPrompt, sal_uInt16 nSubType = 0,
+ sal_uLong nFmt = 0);
- virtual String GetCntnt(BOOL bName = FALSE) const;
- virtual String Expand() const;
- virtual SwField* Copy() const;
+ virtual String GetFieldName() const;
// Content
virtual const String& GetPar1() const;
@@ -318,12 +321,12 @@ public:
virtual String GetToolTip() const;
virtual void SetToolTip(const String & rStr);
- virtual BOOL isFormField() const;
+ virtual sal_Bool isFormField() const;
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT nSub);
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nSub);
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
/*--------------------------------------------------------------------
@@ -333,20 +336,20 @@ public:
class SwInputFieldList
{
public:
- SwInputFieldList( SwEditShell* pShell, BOOL bBuildTmpLst = FALSE );
+ SwInputFieldList( SwEditShell* pShell, sal_Bool bBuildTmpLst = sal_False );
~SwInputFieldList();
- USHORT Count() const;
- SwField* GetField(USHORT nId);
+ sal_uInt16 Count() const;
+ SwField* GetField(sal_uInt16 nId);
- void GotoFieldPos(USHORT nId);
+ void GotoFieldPos(sal_uInt16 nId);
void PushCrsr();
void PopCrsr();
// Put all that are new into SortLst for updating. Returns count.
// (For Glossary: only update its input-fields).
// Compare TmpLst with current fields.
- USHORT BuildSortLst();
+ sal_uInt16 BuildSortLst();
void RemoveUnselectedFlds();
@@ -368,36 +371,39 @@ public:
class SwTblField : public SwValueField, public SwTableFormula
{
String sExpand;
- USHORT nSubType;
+ sal_uInt16 nSubType;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
// Search TextNode containing the field.
virtual const SwNode* GetNodeOfFormula() const;
+ String GetCommand();
+
public:
SwTblField( SwTblFieldType*, const String& rFormel,
- USHORT nSubType = 0, ULONG nFmt = 0);
+ sal_uInt16 nSubType = 0, sal_uLong nFmt = 0);
virtual void SetValue( const double& rVal );
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT nType);
- virtual String Expand() const;
- virtual SwField* Copy() const;
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nType);
const String& GetExpStr() const { return sExpand; }
void ChgExpStr(const String& rStr) { sExpand = rStr; }
void CalcField( SwTblCalcPara& rCalcPara );
- virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String GetFieldName() const;
// The formula.
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
};
-#endif // _EXPFLD_HXX
+#endif // SW_EXPFLD_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/extinput.hxx b/sw/inc/extinput.hxx
index d3fe1ffe32cd..9ce347e37902 100644
--- a/sw/inc/extinput.hxx
+++ b/sw/inc/extinput.hxx
@@ -41,8 +41,8 @@ class SwExtTextInput : public SwPaM
{
SvUShorts aAttrs;
String sOverwriteText;
- BOOL bInsText : 1;
- BOOL bIsOverwriteCursor : 1;
+ sal_Bool bInsText : 1;
+ sal_Bool bIsOverwriteCursor : 1;
LanguageType eInputLanguage;
public:
SwExtTextInput( const SwPaM& rPam, Ring* pRing = 0 );
@@ -50,9 +50,9 @@ public:
void SetInputData( const CommandExtTextInputData& rData );
const SvUShorts& GetAttrs() const { return aAttrs; }
- void SetInsText( BOOL bFlag ) { bInsText = bFlag; }
- BOOL IsOverwriteCursor() const { return bIsOverwriteCursor; }
- void SetOverwriteCursor( BOOL bFlag );
+ void SetInsText( sal_Bool bFlag ) { bInsText = bFlag; }
+ sal_Bool IsOverwriteCursor() const { return bIsOverwriteCursor; }
+ void SetOverwriteCursor( sal_Bool bFlag );
void SetLanguage(LanguageType eSet) { eInputLanguage = eSet;}
};
diff --git a/sw/inc/fchrfmt.hxx b/sw/inc/fchrfmt.hxx
index 0a95a246d380..48c7590dec11 100644
--- a/sw/inc/fchrfmt.hxx
+++ b/sw/inc/fchrfmt.hxx
@@ -70,12 +70,12 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
// Pass to SwTxtCharFmt (from SwClient).
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
- virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
void SetCharFmt( SwFmt* pFmt ) { pFmt->Add(this); }
SwCharFmt* GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); }
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index d4c9b960498b..d7b646c678b6 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -30,6 +30,7 @@
#include <com/sun/star/text/RelOrientation.hpp>
#include <com/sun/star/embed/XClassifiedObject.hpp>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <svx/svdobj.hxx>
#include "swdllapi.h"
@@ -71,41 +72,41 @@ namespace svx
// return values for GetFrmType() und GetSelFrmType().
//! values can be combined via logival or
-#define FRMTYPE_NONE (USHORT) 0
-#define FRMTYPE_PAGE (USHORT) 1
-#define FRMTYPE_HEADER (USHORT) 2
-#define FRMTYPE_FOOTER (USHORT) 4
-#define FRMTYPE_BODY (USHORT) 8
-#define FRMTYPE_COLUMN (USHORT) 16
-#define FRMTYPE_TABLE (USHORT) 32
-#define FRMTYPE_FLY_FREE (USHORT) 64
-#define FRMTYPE_FLY_ATCNT (USHORT) 128
-#define FRMTYPE_FLY_INCNT (USHORT) 256
-#define FRMTYPE_FOOTNOTE (USHORT) 512
-#define FRMTYPE_FTNPAGE (USHORT) 1024
-#define FRMTYPE_FLY_ANY (USHORT) 2048
-#define FRMTYPE_DRAWOBJ (USHORT) 4096
-#define FRMTYPE_COLSECT (USHORT) 8192
-#define FRMTYPE_COLSECTOUTTAB (USHORT) 16384
+#define FRMTYPE_NONE (sal_uInt16) 0
+#define FRMTYPE_PAGE (sal_uInt16) 1
+#define FRMTYPE_HEADER (sal_uInt16) 2
+#define FRMTYPE_FOOTER (sal_uInt16) 4
+#define FRMTYPE_BODY (sal_uInt16) 8
+#define FRMTYPE_COLUMN (sal_uInt16) 16
+#define FRMTYPE_TABLE (sal_uInt16) 32
+#define FRMTYPE_FLY_FREE (sal_uInt16) 64
+#define FRMTYPE_FLY_ATCNT (sal_uInt16) 128
+#define FRMTYPE_FLY_INCNT (sal_uInt16) 256
+#define FRMTYPE_FOOTNOTE (sal_uInt16) 512
+#define FRMTYPE_FTNPAGE (sal_uInt16) 1024
+#define FRMTYPE_FLY_ANY (sal_uInt16) 2048
+#define FRMTYPE_DRAWOBJ (sal_uInt16) 4096
+#define FRMTYPE_COLSECT (sal_uInt16) 8192
+#define FRMTYPE_COLSECTOUTTAB (sal_uInt16) 16384
#define FRMTYPE_ANYCOLSECT ( FRMTYPE_COLSECT | FRMTYPE_COLSECTOUTTAB )
//! values can be combined via logival or
-#define GOTOOBJ_DRAW_CONTROL (USHORT) 1
-#define GOTOOBJ_DRAW_SIMPLE (USHORT) 2
-#define GOTOOBJ_DRAW_ANY (USHORT) 3
-#define GOTOOBJ_FLY_FRM (USHORT) 4
-#define GOTOOBJ_FLY_GRF (USHORT) 8
-#define GOTOOBJ_FLY_OLE (USHORT) 16
-#define GOTOOBJ_FLY_ANY (USHORT) 28
-#define GOTOOBJ_GOTO_ANY (USHORT) 31
+#define GOTOOBJ_DRAW_CONTROL (sal_uInt16) 1
+#define GOTOOBJ_DRAW_SIMPLE (sal_uInt16) 2
+#define GOTOOBJ_DRAW_ANY (sal_uInt16) 3
+#define GOTOOBJ_FLY_FRM (sal_uInt16) 4
+#define GOTOOBJ_FLY_GRF (sal_uInt16) 8
+#define GOTOOBJ_FLY_OLE (sal_uInt16) 16
+#define GOTOOBJ_FLY_ANY (sal_uInt16) 28
+#define GOTOOBJ_GOTO_ANY (sal_uInt16) 31
//! values can be combined via logival or
-#define FLYPROTECT_CONTENT (USHORT) 1
-#define FLYPROTECT_SIZE (USHORT) 2
-#define FLYPROTECT_POS (USHORT) 4
-#define FLYPROTECT_PARENT (USHORT) 8 // Check only parents.
-#define FLYPROTECT_FIXED (USHORT) 16 // Only protection that cannot be withdrawn
+#define FLYPROTECT_CONTENT (sal_uInt16) 1
+#define FLYPROTECT_SIZE (sal_uInt16) 2
+#define FLYPROTECT_POS (sal_uInt16) 4
+#define FLYPROTECT_PARENT (sal_uInt16) 8 // Check only parents.
+#define FLYPROTECT_FIXED (sal_uInt16) 16 // Only protection that cannot be withdrawn
// e.g. by OLE-server; also relevant for dialog.
// For figuring out contents by position (D&D)
@@ -182,7 +183,7 @@ class SdrDropMarkerOverlay;
class SW_DLLPUBLIC SwFEShell : public SwEditShell
{
SdrDropMarkerOverlay *pChainFrom, *pChainTo;
- BOOL bCheckForOLEInCaption;
+ sal_Bool bCheckForOLEInCaption;
SW_DLLPRIVATE SwFlyFrm *FindFlyFrm() const;
SW_DLLPRIVATE SwFlyFrm *FindFlyFrm( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ) const;
@@ -199,26 +200,26 @@ class SW_DLLPUBLIC SwFEShell : public SwEditShell
SW_DLLPRIVATE const SwFrm *GetBox( const Point &rPt, bool* pbRow = 0, bool* pbCol = 0 ) const;
// 0 == not in any column.
- SW_DLLPRIVATE USHORT _GetCurColNum( const SwFrm *pFrm,
+ SW_DLLPRIVATE sal_uInt16 _GetCurColNum( const SwFrm *pFrm,
SwGetCurColNumPara* pPara ) const;
SW_DLLPRIVATE void _GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const;
SW_DLLPRIVATE void _GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const;
- SW_DLLPRIVATE BOOL ImpEndCreate();
+ SW_DLLPRIVATE sal_Bool ImpEndCreate();
SW_DLLPRIVATE ObjCntType GetObjCntType( const SdrObject& rObj ) const;
// Methods for copying of draw objects.
- SW_DLLPRIVATE BOOL CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
- const Point& rInsPt, BOOL bIsMove,
- BOOL bSelectInsert );
+ SW_DLLPRIVATE sal_Bool CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
+ const Point& rInsPt, sal_Bool bIsMove,
+ sal_Bool bSelectInsert );
// Get list of marked SdrObjects;
// helper method for GetSelFrmType, IsSelContainsControl.
SW_DLLPRIVATE const SdrMarkList* _GetMarkList() const;
- SW_DLLPRIVATE BOOL CheckHeadline( bool bRepeat ) const;
+ SW_DLLPRIVATE sal_Bool CheckHeadline( bool bRepeat ) const;
using SwEditShell::Copy;
@@ -232,17 +233,17 @@ public:
virtual ~SwFEShell();
// Copy and Paste methods for internal clipboard.
- BOOL Copy( SwDoc* pClpDoc, const String* pNewClpTxt = 0 );
- BOOL Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames = sal_False);
+ sal_Bool Copy( SwDoc* pClpDoc, const String* pNewClpTxt = 0 );
+ sal_Bool Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames = sal_False);
//Paste some pages into another doc - used in mailmerge.
- BOOL PastePages( SwFEShell& rToFill, USHORT nStartPage, USHORT nEndPage);
+ sal_Bool PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage);
// Copy-Method for Drag&Drop
- BOOL Copy( SwFEShell*, const Point& rSttPt, const Point& rInsPt,
- BOOL bIsMove = FALSE, BOOL bSelectInsert = TRUE );
+ sal_Bool Copy( SwFEShell*, const Point& rSttPt, const Point& rInsPt,
+ sal_Bool bIsMove = sal_False, sal_Bool bSelectInsert = sal_True );
- void SelectFlyFrm( SwFlyFrm& rFrm, BOOL bNew = FALSE );
+ void SelectFlyFrm( SwFlyFrm& rFrm, sal_Bool bNew = sal_False );
// Is selected frame within another frame?
const SwFrmFmt* IsFlyInFly();
@@ -250,14 +251,14 @@ public:
// If an object as been given, exactly this object is selected
// (instead of searching over position).
- BOOL SelectObj( const Point& rSelPt, BYTE nFlag = 0, SdrObject *pObj = 0 );
+ sal_Bool SelectObj( const Point& rSelPt, sal_uInt8 nFlag = 0, SdrObject *pObj = 0 );
void DelSelectedObj();
// Move selection upwards or downwards (Z-Order).
// TRUE = to top or bottom.
// FALSE = run past one other.
- void SelectionToTop ( BOOL bTop = TRUE );
- void SelectionToBottom( BOOL bBottom = TRUE );
+ void SelectionToTop ( sal_Bool bTop = sal_True );
+ void SelectionToBottom( sal_Bool bBottom = sal_True );
short GetLayerId() const; // 1 Heaven, 0 Hell, -1 Ambiguous.
void SelectionToHeaven(); // Above document.
@@ -273,7 +274,7 @@ public:
// the draw object.
sal_Bool ShouldObjectBeSelected(const Point& rPt);
- sal_Bool MoveAnchor( USHORT nDir );
+ sal_Bool MoveAnchor( sal_uInt16 nDir );
// Returns if Upper of frame at current position is section frame
// Currently only used by the rules. To be replaced by something more
@@ -284,8 +285,8 @@ public:
// pPt: Cursr or DocPos respectively; bStopAtFly: Stop at flys or continue over anchor.
// Although (0,TRUE) is kind of a standard, the parameters are not defaulted here
// in order to force more conscious use especially of bStopAtFly.
- USHORT GetFrmType( const Point *pPt, BOOL bStopAtFly ) const;
- USHORT GetSelFrmType() const; //Selektion (Drawing)
+ sal_uInt16 GetFrmType( const Point *pPt, sal_Bool bStopAtFly ) const;
+ sal_uInt16 GetSelFrmType() const; //Selektion (Drawing)
/** check whether selected frame contains a control;
* companion method to GetSelFrmType, used for preventing
@@ -317,9 +318,9 @@ public:
// Set size of draw objects.
void SetObjRect( const SwRect& rRect );
- long BeginDrag( const Point *pPt, BOOL bProp );
- long Drag ( const Point *pPt, BOOL bProp );
- long EndDrag ( const Point *pPt, BOOL bProp );
+ long BeginDrag( const Point *pPt, sal_Bool bProp );
+ long Drag ( const Point *pPt, sal_Bool bProp );
+ long EndDrag ( const Point *pPt, sal_Bool bProp );
void BreakDrag();
//Methods for status line.
@@ -342,13 +343,13 @@ public:
const SwFrmFmt* GetFmtFromAnyObj( const Point& rPt ) const;
// Which Protection is set at selected object?
- //!! Returns several flags in BYTE.
- BYTE IsSelObjProtected( USHORT /*FLYPROTECT_...*/ eType ) const;
+ //!! returns several flags in sal_uInt8
+ sal_uInt8 IsSelObjProtected( sal_uInt16 /*FLYPROTECT_...*/ eType ) const;
// Deliver graphic in rName besides graphic name. If graphic is
// linked give name with path. rbLink is TRUE if graphic is linked.
const Graphic *GetGrfAtPos( const Point &rDocPos,
- String &rName, BOOL &rbLink ) const;
+ String &rName, sal_Bool &rbLink ) const;
const String GetObjTitle() const;
void SetObjTitle( const String& rTitle );
@@ -356,34 +357,36 @@ public:
void SetObjDescription( const String& rDescription );
- BOOL IsFrmSelected() const;
- BOOL GetFlyFrmAttr( SfxItemSet &rSet ) const;
- BOOL SetFlyFrmAttr( SfxItemSet &rSet );
- BOOL ResetFlyFrmAttr( USHORT nWhich, const SfxItemSet* pSet = 0 );
- const SwFrmFmt *NewFlyFrm( const SfxItemSet &rSet, BOOL bAnchValid = FALSE,
+ sal_Bool IsFrmSelected() const;
+ sal_Bool GetFlyFrmAttr( SfxItemSet &rSet ) const;
+ sal_Bool SetFlyFrmAttr( SfxItemSet &rSet );
+ sal_Bool ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet = 0 );
+ const SwFrmFmt *NewFlyFrm( const SfxItemSet &rSet, sal_Bool bAnchValid = sal_False,
SwFrmFmt *pParent = 0 );
void SetFlyPos( const Point &rAbsPos);
- Point FindAnchorPos( const Point &rAbsPos, BOOL bMoveIt = FALSE );
+ Point FindAnchorPos( const Point &rAbsPos, sal_Bool bMoveIt = sal_False );
// Determines whether a frame or its environment is vertically formatted and right-to-left.
- BOOL IsFrmVertical(BOOL bEnvironment, BOOL& bRightToLeft) const;
+ // also determines, if frame or its environmane is in mongolianlayout (vertical left-to-right)
+ // - add output parameter <bVertL2R>
+ sal_Bool IsFrmVertical(const sal_Bool bEnvironment, sal_Bool& bRightToLeft, sal_Bool& bVertL2R) const;
SwFrmFmt* GetCurFrmFmt() const; //If frame then frame style, else 0.
- void SetFrmFmt( SwFrmFmt *pFmt, BOOL bKeepOrient = FALSE, Point* pDocPos = 0 ); //If frame then set frame style.
+ void SetFrmFmt( SwFrmFmt *pFmt, sal_Bool bKeepOrient = sal_False, Point* pDocPos = 0 ); //If frame then set frame style.
const SwFlyFrm *GetCurrFlyFrm() const { return FindFlyFrm(); }
// Find/delete fly containing the cursor.
SwFrmFmt* WizzardGetFly();
// Independent selecting of flys.
- BOOL GotoNextFly( USHORT /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY )
- { return GotoObj( TRUE, eType ); }
- BOOL GotoPrevFly( USHORT /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY)
- { return GotoObj( FALSE, eType); }
+ sal_Bool GotoNextFly( sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY )
+ { return GotoObj( sal_True, eType ); }
+ sal_Bool GotoPrevFly( sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY)
+ { return GotoObj( sal_False, eType); }
// Iterate over flys - for Basic-collections.
- USHORT GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL ) const;
- const SwFrmFmt* GetFlyNum(USHORT nIdx, FlyCntType eType = FLYCNTTYPE_ALL) const;
+ sal_uInt16 GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL ) const;
+ const SwFrmFmt* GetFlyNum(sal_uInt16 nIdx, FlyCntType eType = FLYCNTTYPE_ALL) const;
// If a fly is selected, it draws cursor into the first CntntFrm.
const SwFrmFmt* SelFlyGrabCrsr();
@@ -419,21 +422,24 @@ public:
void MakeObjVisible( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ) const;
// Check resize of OLE-Object.
- BOOL IsCheckForOLEInCaption() const { return bCheckForOLEInCaption; }
- void SetCheckForOLEInCaption( BOOL bFlag ) { bCheckForOLEInCaption = bFlag; }
+ sal_Bool IsCheckForOLEInCaption() const { return bCheckForOLEInCaption; }
+ void SetCheckForOLEInCaption( sal_Bool bFlag ) { bCheckForOLEInCaption = bFlag; }
// Set name at selected FlyFrame.
void SetFlyName( const String& rName );
const String& GetFlyName() const;
+ // get reference to OLE object (if there is one) for selected FlyFrame
+ const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef() const;
+
// Created unique name for frame.
String GetUniqueGrfName() const;
String GetUniqueOLEName() const;
String GetUniqueFrameName() const;
// Jump to named Fly (graphic/OLE).
- BOOL GotoFly( const String& rName, FlyCntType eType = FLYCNTTYPE_ALL,
- BOOL bSelFrame = TRUE );
+ sal_Bool GotoFly( const String& rName, FlyCntType eType = FLYCNTTYPE_ALL,
+ sal_Bool bSelFrame = sal_True );
// Position is a graphic with URL?
const SwFrmFmt* IsURLGrfAtPos( const Point& rPt, String* pURL = 0,
@@ -455,16 +461,16 @@ public:
void CheckUnboundObjects();
// Attention: Ambiguities if multiple selections.
- BOOL GetObjAttr( SfxItemSet &rSet ) const;
- BOOL SetObjAttr( const SfxItemSet &rSet );
+ sal_Bool GetObjAttr( SfxItemSet &rSet ) const;
+ sal_Bool SetObjAttr( const SfxItemSet &rSet );
- const SdrObject* GetBestObject( BOOL bNext, USHORT eType = GOTOOBJ_DRAW_ANY, BOOL bFlat = TRUE, const ::svx::ISdrObjectFilter* pFilter = NULL );
- BOOL GotoObj( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType = GOTOOBJ_DRAW_ANY);
+ const SdrObject* GetBestObject( sal_Bool bNext, sal_uInt16 eType = GOTOOBJ_DRAW_ANY, sal_Bool bFlat = sal_True, const ::svx::ISdrObjectFilter* pFilter = NULL );
+ sal_Bool GotoObj( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType = GOTOOBJ_DRAW_ANY);
// Set DragMode (e.g. Rotae), but do nothing when frame is selected.
- void SetDragMode( UINT16 eSdrDragMode );
+ void SetDragMode( sal_uInt16 eSdrDragMode );
- USHORT IsObjSelected() const; // Returns object count, but doesn't count the objects in groups.
+ sal_uInt16 IsObjSelected() const; // Returns object count, but doesn't count the objects in groups.
sal_Bool IsObjSelected( const SdrObject& rObj ) const;
void EndTextEdit(); // Deletes object if required.
@@ -478,47 +484,47 @@ public:
// or SDRCREATE_NEXTPOINT for a polygon may be relevant.
// After RESTRAINTEND the object is created and selected.
// BreakCreate interrupts the process. In this case no object is selected.
- BOOL BeginCreate( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos );
- BOOL BeginCreate( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, UINT32 eObjInventor, const Point &);
+ sal_Bool BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos );
+ sal_Bool BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, sal_uInt32 eObjInventor, const Point &);
void MoveCreate ( const Point &rPos );
- BOOL EndCreate ( UINT16 eSdrCreateCmd );
+ sal_Bool EndCreate ( sal_uInt16 eSdrCreateCmd );
void BreakCreate();
- BOOL IsDrawCreate() const;
- void CreateDefaultShape( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect, USHORT nSlotId);
+ sal_Bool IsDrawCreate() const;
+ void CreateDefaultShape( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect, sal_uInt16 nSlotId);
// Functions for Rubberbox, ti select Draw-Objects
- BOOL BeginMark( const Point &rPos );
+ sal_Bool BeginMark( const Point &rPos );
void MoveMark ( const Point &rPos );
- BOOL EndMark ();
+ sal_Bool EndMark ();
void BreakMark();
// Create and destroy group, don't when frame is selected.
- BOOL IsGroupSelected(); // Can be a mixed selection!
+ sal_Bool IsGroupSelected(); // Can be a mixed selection!
void GroupSelection(); // Afterwards the group is selected.
void UnGroupSelection(); // The individual objects are selected, but
// it is possible that there are groups included.
bool IsGroupAllowed() const;
- void MirrorSelection( BOOL bHorizontal ); //Vertical if FALSE.
+ void MirrorSelection( sal_Bool bHorizontal ); //Vertical if FALSE.
// frmatr.hxx. Here no enum because of dependencies.
- // BOOL value only for internal use! Anchor is newly set according
+ // bool value only for internal use! Anchor is newly set according
// to current document position. Anchor is not re-set.
- void ChgAnchor( int eAnchorId, BOOL bSameOnly = FALSE,
- BOOL bPosCorr = TRUE );
+ void ChgAnchor( int eAnchorId, sal_Bool bSameOnly = sal_False,
+ sal_Bool bPosCorr = sal_True );
- BOOL SetDrawingAttr( SfxItemSet &rSet );
+ sal_Bool SetDrawingAttr( SfxItemSet &rSet );
// Get selected DrawObj as graphics (MetaFile/Bitmap).
// Return value indicates if it was converted.
- BOOL GetDrawObjGraphic( ULONG nFmt, Graphic& rGrf ) const;
+ sal_Bool GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const;
- void Paste( SvStream& rStm, USHORT nAction, const Point* pPt = 0 );
- BOOL Paste( const Graphic &rGrf );
- BOOL Paste( SotDataObject& rObj, const Point& rPt );
+ void Paste( SvStream& rStm, sal_uInt16 nAction, const Point* pPt = 0 );
+ sal_Bool Paste( const Graphic &rGrf );
+ sal_Bool Paste( SotDataObject& rObj, const Point& rPt );
- BOOL IsAlignPossible() const;
+ sal_Bool IsAlignPossible() const;
void SetCalcFieldValueHdl(Outliner* pOutliner);
void Insert(const String& rGrfName,
@@ -532,32 +538,41 @@ public:
void InsertDrawObj( SdrObject& rDrawObj,
const Point& rInsertPosition );
- BOOL ReplaceSdrObj( const String& rGrfName, const String& rFltName,
+ sal_Bool ReplaceSdrObj( const String& rGrfName, const String& rFltName,
const Graphic* pGrf = 0 );
+ // --> #i972#
+ // for starmath formulas anchored 'as char' it alignes it baseline to baseline
+ // changing the previous vertical orientation
+ void AlignFormulaToBaseline( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& xObj, SwFlyFrm * pFly = 0 );
+
+ // aligns all formulas with anchor 'as char' to baseline
+ void AlignAllFormulasToBaseline();
+ // <--
+
// Provide information about content situated closes to given Point.
- Point GetCntntPos( const Point& rPoint, BOOL bNext ) const;
+ Point GetCntntPos( const Point& rPoint, sal_Bool bNext ) const;
// Convert document position into position relative to the current page.
Point GetRelativePagePosition(const Point& rDocPos);
// Hide or show layout-selection and pass call to CrsrSh.
void ShLooseFcs();
- void ShGetFcs( BOOL bUpdate = TRUE );
+ void ShGetFcs( sal_Bool bUpdate = sal_True );
// PageDescriptor-interface
void ChgCurPageDesc( const SwPageDesc& );
- USHORT GetCurPageDesc( const BOOL bCalcFrm = TRUE ) const;
- USHORT GetMousePageDesc( const Point &rPt ) const;
- USHORT GetPageDescCnt() const;
+ sal_uInt16 GetCurPageDesc( const sal_Bool bCalcFrm = sal_True ) const;
+ sal_uInt16 GetMousePageDesc( const Point &rPt ) const;
+ sal_uInt16 GetPageDescCnt() const;
SwPageDesc* FindPageDescByName( const String& rName,
- BOOL bGetFromPool = FALSE,
- USHORT* pPos = 0 );
+ sal_Bool bGetFromPool = sal_False,
+ sal_uInt16* pPos = 0 );
- const SwPageDesc& GetPageDesc( USHORT i ) const;
- void ChgPageDesc( USHORT i, const SwPageDesc& );
+ const SwPageDesc& GetPageDesc( sal_uInt16 i ) const;
+ void ChgPageDesc( sal_uInt16 i, const SwPageDesc& );
// if inside all selection only one PageDesc, return this.
// Otherwise return 0 pointer
const SwPageDesc* GetSelectedPageDescs() const;
@@ -569,36 +584,36 @@ public:
// Page number of the page containing Point, O if no page.
- USHORT GetPageNumber( const Point &rPoint ) const;
- BOOL GetPageNumber( long nYPos, BOOL bAtCrsrPos, USHORT& rPhyNum, USHORT& rVirtNum, String &rDisplay ) const;
+ sal_uInt16 GetPageNumber( const Point &rPoint ) const;
+ sal_Bool GetPageNumber( long nYPos, sal_Bool bAtCrsrPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, String &rDisplay ) const;
SwFlyFrmFmt* InsertObject( const svt::EmbeddedObjectRef&,
const SfxItemSet* pFlyAttrSet = 0,
const SfxItemSet* pGrfAttrSet = 0,
SwFrmFmt* = 0 );
- BOOL FinishOLEObj(); //Shutdown server.
+ sal_Bool FinishOLEObj(); //Shutdown server.
void GetTblAttr( SfxItemSet & ) const;
void SetTblAttr( const SfxItemSet & );
- BOOL HasWholeTabSelection() const;
+ sal_Bool HasWholeTabSelection() const;
// Is content of a table cell or at least a table cell completely selected?
- BOOL HasBoxSelection() const;
+ sal_Bool HasBoxSelection() const;
- BOOL InsertRow( USHORT nCnt, BOOL bBehind );
- BOOL InsertCol( USHORT nCnt, BOOL bBehind ); // 0 == at the end.
- BOOL DeleteCol();
- BOOL DeleteRow();
+ sal_Bool InsertRow( sal_uInt16 nCnt, sal_Bool bBehind );
+ sal_Bool InsertCol( sal_uInt16 nCnt, sal_Bool bBehind ); // 0 == at the end.
+ sal_Bool DeleteCol();
+ sal_Bool DeleteRow();
- BOOL DeleteTblSel(); // Current selection, may be whole table.
+ sal_Bool DeleteTblSel(); // Current selection, may be whole table.
- USHORT MergeTab(); // Merge selected parts of table.
+ sal_uInt16 MergeTab(); // Merge selected parts of table.
// Return error via enum.
// Split cell vertically or horizontally.
- BOOL SplitTab( BOOL nVert = TRUE, USHORT nCnt = 1, BOOL bSameHeight = FALSE );
- BOOL Sort(const SwSortOptions&);
+ sal_Bool SplitTab( sal_Bool nVert = sal_True, sal_uInt16 nCnt = 1, sal_Bool bSameHeight = sal_False );
+ sal_Bool Sort(const SwSortOptions&); //Sortieren.
void SetRowHeight( const SwFmtFrmSize &rSz );
@@ -608,115 +623,115 @@ public:
void SetRowSplit( const SwFmtRowSplit &rSz );
void GetRowSplit( SwFmtRowSplit *&rpSz ) const;
- void SetBoxAlign( USHORT nOrient );
- USHORT GetBoxAlign() const; // USHRT_MAX if ambiguous.
+ void SetBoxAlign( sal_uInt16 nOrient );
+ sal_uInt16 GetBoxAlign() const; // USHRT_MAX if ambiguous.
// Adjustment of Rowheights. Determine via bTstOnly if more than one row is selected.
- BOOL BalanceRowHeight( BOOL bTstOnly );
+ sal_Bool BalanceRowHeight( sal_Bool bTstOnly );
void SetTabBorders( const SfxItemSet& rSet );
void GetTabBorders( SfxItemSet& rSet) const;
- void SetTabLineStyle(const Color* pColor, BOOL bSetLine = FALSE, const SvxBorderLine* pBorderLine = NULL);
+ void SetTabLineStyle(const Color* pColor, sal_Bool bSetLine = sal_False, const SvxBorderLine* pBorderLine = NULL);
void SetTabBackground( const SvxBrushItem &rNew );
void GetTabBackground( SvxBrushItem &rToFill ) const;
void SetBoxBackground( const SvxBrushItem &rNew );
- BOOL GetBoxBackground( SvxBrushItem &rToFill ) const; //FALSE ambiguous.
+ sal_Bool GetBoxBackground( SvxBrushItem &rToFill ) const; //FALSE ambiguous.
void SetBoxDirection( const SvxFrameDirectionItem& rNew );
- BOOL GetBoxDirection( SvxFrameDirectionItem& rToFill ) const; //FALSE ambiguous.
+ sal_Bool GetBoxDirection( SvxFrameDirectionItem& rToFill ) const; //FALSE ambiguous.
void SetRowBackground( const SvxBrushItem &rNew );
- BOOL GetRowBackground( SvxBrushItem &rToFill ) const; //FALSE ambiguous.
+ sal_Bool GetRowBackground( SvxBrushItem &rToFill ) const; //FALSE ambiguous.
- BYTE WhichMouseTabCol( const Point &rPt ) const;
+ sal_uInt8 WhichMouseTabCol( const Point &rPt ) const;
void GetTabCols( SwTabCols &rToFill ) const; // Info about columns and margins.
- void SetTabCols( const SwTabCols &rNew, BOOL bCurRowOnly = TRUE );
+ void SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly = sal_True );
void GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const;
- void SetMouseTabCols( const SwTabCols &rNew, BOOL bCurRowOnly,
+ void SetMouseTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly,
const Point &rPt );
// pEnd will be used during MouseMove
bool SelTblRowCol( const Point& rPt, const Point* pEnd = 0, bool bRowDrag = false );
void GetTabRows( SwTabCols &rToFill ) const;
- void SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly );
+ void SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly );
void GetMouseTabRows( SwTabCols &rToFill, const Point &rPt ) const;
- void SetMouseTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const Point &rPt );
+ void SetMouseTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const Point &rPt );
void ProtectCells(); // If a table selection exists it is destroyed in case
// cursor is not allowed in readonly.
void UnProtectCells(); // Refers to table selection.
void UnProtectTbls(); // Unprotect all tables in selection.
- BOOL HasTblAnyProtection( const String* pTblName = 0,
- BOOL* pFullTblProtection = 0 );
- BOOL CanUnProtectCells() const;
+ sal_Bool HasTblAnyProtection( const String* pTblName = 0,
+ sal_Bool* pFullTblProtection = 0 );
+ sal_Bool CanUnProtectCells() const;
- USHORT GetRowsToRepeat() const;
- void SetRowsToRepeat( USHORT nNumOfRows );
- USHORT GetVirtPageNum( const BOOL bCalcFrm = TRUE );
+ sal_uInt16 GetRowsToRepeat() const;
+ void SetRowsToRepeat( sal_uInt16 nNumOfRows );
+ sal_uInt16 GetVirtPageNum( const sal_Bool bCalcFrm = sal_True );
//Returns the number of table rows currently selected
//if the selection start at the top of the table.
- USHORT GetRowSelectionFromTop() const;
+ sal_uInt16 GetRowSelectionFromTop() const;
- BOOL IsInRepeatedHeadline() const { return CheckHeadline( true ); }
- BOOL IsInHeadline() const { return CheckHeadline( false ); }
+ sal_Bool IsInRepeatedHeadline() const { return CheckHeadline( true ); }
+ sal_Bool IsInHeadline() const { return CheckHeadline( false ); }
// Adjusts cell widths in such a way, that their content
// does not need to be wrapped (if possible).
// bBalance provides for adjustment of selected columns.
- void AdjustCellWidth( BOOL bBalance = FALSE );
+ void AdjustCellWidth( sal_Bool bBalance = sal_False );
// Not allowed if only empty cells are selected.
- BOOL IsAdjustCellWidthAllowed( BOOL bBalance = FALSE ) const;
+ sal_Bool IsAdjustCellWidthAllowed( sal_Bool bBalance = sal_False ) const;
// Adjustment of cell-widths; determine via bTstOnly if more than one cell is selected.
- BOOL BalanceCellWidth( BOOL bTstOnly );
+ sal_Bool BalanceCellWidth( sal_Bool bTstOnly );
// AutoFormat for table/ table selection.
- BOOL SetTableAutoFmt( const SwTableAutoFmt& rNew );
+ sal_Bool SetTableAutoFmt( const SwTableAutoFmt& rNew );
- BOOL GetTableAutoFmt( SwTableAutoFmt& rGet );
+ sal_Bool GetTableAutoFmt( SwTableAutoFmt& rGet );
- BOOL SetColRowWidthHeight( USHORT eType, USHORT nDiff = 283 );
+ sal_Bool SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff = 283 );
- BOOL GetAutoSum( String& rFml ) const;
+ sal_Bool GetAutoSum( String& rFml ) const;
// Phy: real page count.
// Virt: consider offset that may have been set by user.
- USHORT GetPhyPageNum();
+ sal_uInt16 GetPhyPageNum();
- void SetNewPageOffset( USHORT nOffset );
- void SetPageOffset( USHORT nOffset ); //Changes last page offset.
- USHORT GetPageOffset() const; //Returns last page offset.
+ void SetNewPageOffset( sal_uInt16 nOffset );
+ void SetPageOffset( sal_uInt16 nOffset ); //Changes last page offset.
+ sal_uInt16 GetPageOffset() const; //Returns last page offset.
void InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator,
const String& rNumberSeparator,
- const BOOL bBefore, const USHORT nId,
+ const sal_Bool bBefore, const sal_uInt16 nId,
const String& rCharacterStyle,
- const BOOL bCpyBrd = TRUE );
+ const sal_Bool bCpyBrd = sal_True );
// The ruler needs some information too.
- USHORT GetCurColNum( SwGetCurColNumPara* pPara = 0 ) const; //0 == not in any column.
- USHORT GetCurMouseColNum( const Point &rPt,
+ sal_uInt16 GetCurColNum( SwGetCurColNumPara* pPara = 0 ) const; //0 == not in any column.
+ sal_uInt16 GetCurMouseColNum( const Point &rPt,
SwGetCurColNumPara* pPara = 0 ) const;
- USHORT GetCurTabColNum() const; //0 == not in any table.
- USHORT GetCurMouseTabColNum( const Point &rPt ) const;
- USHORT GetCurOutColNum( SwGetCurColNumPara* pPara = 0 ) const; // Current outer column.
+ sal_uInt16 GetCurTabColNum() const; //0 == not in any table.
+ sal_uInt16 GetCurMouseTabColNum( const Point &rPt ) const;
+ sal_uInt16 GetCurOutColNum( SwGetCurColNumPara* pPara = 0 ) const; // Current outer column.
- BOOL IsTableRightToLeft() const;
- BOOL IsMouseTableRightToLeft( const Point &rPt ) const;
- BOOL IsTableVertical() const;
+ sal_Bool IsTableRightToLeft() const;
+ sal_Bool IsMouseTableRightToLeft( const Point &rPt ) const;
+ sal_Bool IsTableVertical() const;
- BOOL IsLastCellInRow() const;
+ sal_Bool IsLastCellInRow() const;
// Width of current range for column-dialog.
long GetSectionWidth( SwFmt& rFmt ) const;
void GetConnectableFrmFmts
- (SwFrmFmt & rFmt, const String & rReference, BOOL bSuccessors,
+ (SwFrmFmt & rFmt, const String & rReference, sal_Bool bSuccessors,
::std::vector< String > & aPrevPageVec,
::std::vector< String > & aThisPageVec,
::std::vector< String > & aNextPageVec,
@@ -752,7 +767,7 @@ public:
void ParkCursorInTab();
SwTxtNode * GetNumRuleNodeAtPos(const Point &rPot);
- BOOL IsNumLabel( const Point &rPt, int nMaxOffset = -1 );
+ sal_Bool IsNumLabel( const Point &rPt, int nMaxOffset = -1 );
bool IsVerticalModeAtNdAndPos( const SwTxtNode& _rTxtNode,
const Point& _rDocPos ) const;
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index 23695335ade0..8c6c925d5bdf 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -25,10 +25,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _FLDBAS_HXX
-#define _FLDBAS_HXX
-
-#ifndef FIELDIDS_ONLY // SWG-Testreader!!
+#ifndef SW_FLDBAS_HXX
+#define SW_FLDBAS_HXX
#include <i18npool/lang.h>
#include <tools/debug.hxx>
@@ -41,7 +39,6 @@ class SwDoc;
class SvStringsDtor;
class SvNumberFormatter;
-#endif // FIELDIDS_ONLY
enum RES_FIELDS
{
@@ -190,7 +187,7 @@ enum SwVarFormat
};
-typedef USHORT SwGetSetExpType;
+typedef sal_uInt16 SwGetSetExpType;
namespace nsSwGetSetExpType
{
const SwGetSetExpType GSE_STRING = 0x0001; // String
@@ -200,7 +197,7 @@ namespace nsSwGetSetExpType
const SwGetSetExpType GSE_FORMULA = 0x0010; // Formula
}
-typedef USHORT SwExtendedSubType;
+typedef sal_uInt16 SwExtendedSubType;
namespace nsSwExtendedSubType
{
const SwExtendedSubType SUB_CMD = 0x0100; // Show command.
@@ -229,15 +226,13 @@ enum SwDateTimeSubType
TIMEFLD = 4
};
-#ifndef FIELDIDS_ONLY // SWG-Testreader!!
-
-extern USHORT aTypeTab[];
+extern sal_uInt16 aTypeTab[];
// General tools.
-String GetResult(double nVal, sal_uInt32 nNumFmt, USHORT nLang = LANGUAGE_SYSTEM);
+String GetResult(double nVal, sal_uInt32 nNumFmt, sal_uInt16 nLang = LANGUAGE_SYSTEM);
void SetErrorStr(const String& rStr);
-String FormatNumber(USHORT nNum, sal_uInt32 nFormat);
+String FormatNumber(sal_uInt16 nNum, sal_uInt32 nFormat);
// Instances of SwFields and those derived from it occur 0 to n times.
// For each class there is one instance of the associated type class.
@@ -246,7 +241,7 @@ DBG_NAMEEX(SwFieldType)
class SW_DLLPUBLIC SwFieldType : public SwModify
{
- USHORT nWhich;
+ sal_uInt16 nWhich;
friend void _FinitUI(); // In order to delete pointer!
static SvStringsDtor* pFldNames;
@@ -255,22 +250,22 @@ class SW_DLLPUBLIC SwFieldType : public SwModify
protected:
// Single argument ctors shall be explicit.
- explicit SwFieldType( USHORT nWhichId );
+ explicit SwFieldType( sal_uInt16 nWhichId );
public:
#if OSL_DEBUG_LEVEL > 1
virtual ~SwFieldType();
#endif
- static const String& GetTypeStr( USHORT nTypeId );
+ static const String& GetTypeStr( sal_uInt16 nTypeId );
// Only in derived classes.
virtual const String& GetName() const;
virtual SwFieldType* Copy() const = 0;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich );
- USHORT Which() const { return nWhich; }
+ sal_uInt16 Which() const { return nWhich; }
inline void UpdateFlds() const;
};
@@ -287,8 +282,8 @@ class SW_DLLPUBLIC SwField
{
private:
mutable String m_Cache; // Cached expansion (for clipboard).
- USHORT nLang; // Always change via SetLanguage!
- BOOL bIsAutomaticLanguage;
+ sal_uInt16 nLang; // Always change via SetLanguage!
+ sal_Bool bIsAutomaticLanguage;
sal_uInt32 nFormat;
SwFieldType* pType;
@@ -299,7 +294,7 @@ private:
protected:
void SetFormat(sal_uInt32 nSet) {nFormat = nSet;}
- SwField(SwFieldType* pTyp, sal_uInt32 nFmt = 0, USHORT nLang = LANGUAGE_SYSTEM);
+ SwField(SwFieldType* pTyp, sal_uInt32 nFmt = 0, sal_uInt16 nLang = LANGUAGE_SYSTEM);
public:
virtual ~SwField();
@@ -310,18 +305,22 @@ public:
virtual SwFieldType* ChgTyp( SwFieldType* );
/** expand the field.
- @param bInClipboard field is in clipboard document?
+ @param bCached return cached field value.
+ @remark most callers should use the cached field value.
+ this is because various fields need special handing
+ (ChangeExpansion()) to return correct values, and only
+ SwTxtFormatter::NewFldPortion() sets things up properly.
@return the generated text (suitable for display)
*/
- String ExpandField(bool const bInClipboard) const;
+ String ExpandField(bool const bCached) const;
// Returns name or content.
- virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String GetFieldName() const;
SwField * CopyField() const;
// ResId
- USHORT Which() const
+ sal_uInt16 Which() const
#if OSL_DEBUG_LEVEL > 1
; // implemented in fldbas.cxx
#else
@@ -329,13 +328,13 @@ public:
#endif
// TYP_ID
- USHORT GetTypeId() const;
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT);
+ sal_uInt16 GetTypeId() const;
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16);
// Language at field position.
- inline USHORT GetLanguage() const;
- virtual void SetLanguage(USHORT nLng);
+ inline sal_uInt16 GetLanguage() const;
+ virtual void SetLanguage(sal_uInt16 nLng);
// Query parameters for dialog and for BASIC.
inline sal_uInt32 GetFormat() const;
@@ -348,15 +347,15 @@ public:
virtual void SetPar1(const String& rStr);
virtual void SetPar2(const String& rStr);
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
// Does the field possess an action on its ClickHandler? (e.g. INetFields, ...).
- BOOL HasClickHdl() const;
- BOOL IsFixed() const;
+ sal_Bool HasClickHdl() const;
+ sal_Bool IsFixed() const;
- BOOL IsAutomaticLanguage() const { return bIsAutomaticLanguage;}
- void SetAutomaticLanguage(BOOL bSet){bIsAutomaticLanguage = bSet;}
+ sal_Bool IsAutomaticLanguage() const { return bIsAutomaticLanguage;}
+ void SetAutomaticLanguage(sal_Bool bSet){bIsAutomaticLanguage = bSet;}
virtual String GetDescription() const;
};
@@ -367,7 +366,7 @@ inline SwFieldType* SwField::GetTyp() const
inline sal_uInt32 SwField::GetFormat() const
{ return nFormat; }
-inline USHORT SwField::GetLanguage() const
+inline sal_uInt16 SwField::GetLanguage() const
{ return nLang; }
@@ -375,20 +374,20 @@ inline USHORT SwField::GetLanguage() const
class SwValueFieldType : public SwFieldType
{
SwDoc* pDoc;
- BOOL bUseFormat; // Use number formatter.
+ sal_Bool bUseFormat; // Use number formatter.
protected:
- SwValueFieldType( SwDoc* pDocPtr, USHORT nWhichId );
+ SwValueFieldType( SwDoc* pDocPtr, sal_uInt16 nWhichId );
SwValueFieldType( const SwValueFieldType& rTyp );
public:
inline SwDoc* GetDoc() const { return pDoc; }
inline void SetDoc(SwDoc* pNewDoc) { pDoc = pNewDoc; }
- inline BOOL UseFormat() const { return bUseFormat; }
- inline void EnableFormat(BOOL bFormat = TRUE) { bUseFormat = bFormat; }
+ inline sal_Bool UseFormat() const { return bUseFormat; }
+ inline void EnableFormat(sal_Bool bFormat = sal_True) { bUseFormat = bFormat; }
- String ExpandValue(const double& rVal, sal_uInt32 nFmt, USHORT nLng=0) const;
+ String ExpandValue(const double& rVal, sal_uInt32 nFmt, sal_uInt16 nLng=0) const;
void DoubleToString(String &rValue, const double &rVal, LanguageType eLng) const;
void DoubleToString(String &rValue, const double &rVal, sal_uInt32 nFmt) const;
};
@@ -398,21 +397,21 @@ class SW_DLLPUBLIC SwValueField : public SwField
double fValue;
protected:
- SwValueField( SwValueFieldType* pFldType, sal_uInt32 nFmt = 0, USHORT nLang = LANGUAGE_SYSTEM, const double fVal = 0.0 );
+ SwValueField( SwValueFieldType* pFldType, sal_uInt32 nFmt = 0, sal_uInt16 nLang = LANGUAGE_SYSTEM, const double fVal = 0.0 );
SwValueField( const SwValueField& rFld );
public:
virtual ~SwValueField();
virtual SwFieldType* ChgTyp( SwFieldType* );
- virtual void SetLanguage(USHORT nLng);
+ virtual void SetLanguage(sal_uInt16 nLng);
inline SwDoc* GetDoc() const { return ((SwValueFieldType*)GetTyp())->GetDoc(); }
virtual double GetValue() const;
virtual void SetValue( const double& rVal );
- inline String ExpandValue(const double& rVal, sal_uInt32 nFmt, USHORT nLng=0) const
+ inline String ExpandValue(const double& rVal, sal_uInt32 nFmt, sal_uInt16 nLng=0) const
{ return ((SwValueFieldType*)GetTyp())->ExpandValue(rVal, nFmt, nLng); }
static sal_uInt32 GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt32 nFmt);
@@ -434,7 +433,6 @@ public:
String GetExpandedFormula() const;
};
-#endif // FIELDIDS_ONLY
-#endif // _FLDBAS_HXX
+#endif // SW_FLDBAS_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/flddat.hxx b/sw/inc/flddat.hxx
index 9a2a535a4ee8..7ef3ce69d87c 100644
--- a/sw/inc/flddat.hxx
+++ b/sw/inc/flddat.hxx
@@ -26,8 +26,8 @@
*
************************************************************************/
-#ifndef _FLDDAT_HXX
-#define _FLDDAT_HXX
+#ifndef SW_FLDDAT_HXX
+#define SW_FLDDAT_HXX
#include <tools/string.hxx>
@@ -104,39 +104,39 @@ public:
class SW_DLLPUBLIC SwDateTimeField : public SwValueField
{
- USHORT nSubType;
+ sal_uInt16 nSubType;
long nOffset; // Offset in minutes.
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
public:
- SwDateTimeField(SwDateTimeFieldType* pType, USHORT nSubType = DATEFLD,
- ULONG nFmt = 0, USHORT nLng = 0);
+ SwDateTimeField(SwDateTimeFieldType* pType, sal_uInt16 nSubType = DATEFLD,
+ sal_uLong nFmt = 0, sal_uInt16 nLng = 0);
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT nSub);
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nSub);
virtual double GetValue() const;
virtual void SetPar2(const String& rStr);
virtual String GetPar2() const;
- inline BOOL IsDate() const
+ inline sal_Bool IsDate() const
{ return (nSubType & DATEFLD) != 0; }
inline void SetOffset(long nMinutes) { nOffset = nMinutes; }
inline long GetOffset() const { return nOffset; }
- Date GetDate(BOOL bUseOffset = FALSE) const;
- Time GetTime(BOOL bUseOffset = FALSE) const;
+ Date GetDate(sal_Bool bUseOffset = sal_False) const;
+ Time GetTime(sal_Bool bUseOffset = sal_False) const;
void SetDateTime(const DateTime& rDT);
static double GetDateTime(SwDoc* pDoc, const DateTime& rDT);
- virtual String Expand() const;
- virtual SwField* Copy() const;
-
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nMId ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nMId );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nMId ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nMId );
};
-#endif // _FLDDAT_HXX
+#endif // SW_FLDDAT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/flddropdown.hxx b/sw/inc/flddropdown.hxx
index 6ad316a1281e..c0c9113566af 100644
--- a/sw/inc/flddropdown.hxx
+++ b/sw/inc/flddropdown.hxx
@@ -25,17 +25,14 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _FLDDROPDOWN_HXX
-#define _FLDDROPDOWN_HXX
+#ifndef SW_FLDDROPDOWN_HXX
+#define SW_FLDDROPDOWN_HXX
#include "com/sun/star/uno/Sequence.hxx"
#include "swdllapi.h"
#include "fldbas.hxx"
-#ifndef INCLUDED_VECTOR
#include <vector>
-#define INCLUDED_VECTOR
-#endif
/**
Field type for dropdown boxes.
@@ -94,6 +91,23 @@ class SW_DLLPUBLIC SwDropDownField : public SwField
*/
String aToolTip;
+ /**
+ Expands the field.
+
+ The expanded value of the field is the value of the selected
+ item. If no item is selected, an empty string is returned.
+
+ @return the expanded value of the field
+ */
+ virtual String Expand() const;
+
+ /**
+ Creates a copy of this field.
+
+ @return the copy of this field
+ */
+ virtual SwField * Copy() const;
+
public:
/**
Constructor
@@ -115,23 +129,6 @@ public:
virtual ~SwDropDownField();
/**
- Expands the field.
-
- The expanded value of the field is the value of the selected
- item. If no item is selected, an empty string is returned.
-
- @return the expanded value of the field
- */
- virtual String Expand() const;
-
- /**
- Creates a copy of this field.
-
- @return the copy of this field
- */
- virtual SwField * Copy() const;
-
- /**
Returns the selected value.
@see Expand
@@ -224,10 +221,10 @@ public:
@param rItem the item to be set
- @retval TRUE the selected item was successfully set
- @retval TRUE failure (empty selection)
+ @retval sal_True the selected item was successfully set
+ @retval sal_True failure (empty selection)
*/
- BOOL SetSelectedItem(const String & rItem);
+ sal_Bool SetSelectedItem(const String & rItem);
/**
Sets the name of the field.
@@ -260,7 +257,7 @@ public:
- FIELD_PROP_PAR3 Get the help text of the field.
- FIELD_PROP_PAR4 Get the tool tip of the field.
*/
- virtual bool QueryValue(com::sun::star::uno::Any &rVal, USHORT nWhichId) const;
+ virtual bool QueryValue(com::sun::star::uno::Any &rVal, sal_uInt16 nWhichId) const;
/**
API: Sets a property value on the dropdown field.
@@ -272,7 +269,7 @@ public:
- FIELD_PROP_PAR3 Set the help text of the field.
- FIELD_PROP_PAR4 Set the tool tip of the field.
*/
- virtual bool PutValue(const com::sun::star::uno::Any &rVal, USHORT nWhichId);
+ virtual bool PutValue(const com::sun::star::uno::Any &rVal, sal_uInt16 nWhichId);
};
#endif
diff --git a/sw/inc/flypos.hxx b/sw/inc/flypos.hxx
index 315f72b4be35..9640afb8a675 100644
--- a/sw/inc/flypos.hxx
+++ b/sw/inc/flypos.hxx
@@ -41,18 +41,18 @@ class SW_DLLPUBLIC SwPosFlyFrm
{
const SwFrmFmt* pFrmFmt; // FlyFrmFmt
SwNodeIndex* pNdIdx; // Index for node is sufficient.
- UINT32 nOrdNum;
+ sal_uInt32 nOrdNum;
public:
- SwPosFlyFrm( const SwNodeIndex& , const SwFrmFmt*, USHORT nArrPos );
+ SwPosFlyFrm( const SwNodeIndex& , const SwFrmFmt*, sal_uInt16 nArrPos );
virtual ~SwPosFlyFrm(); // Virtual for Writer (DLL !!)
// Operators for sort array.
- BOOL operator==( const SwPosFlyFrm& );
- BOOL operator<( const SwPosFlyFrm& );
+ sal_Bool operator==( const SwPosFlyFrm& );
+ sal_Bool operator<( const SwPosFlyFrm& );
const SwFrmFmt& GetFmt() const { return *pFrmFmt; }
const SwNodeIndex& GetNdIndex() const { return *pNdIdx; }
- UINT32 GetOrdNum() const { return nOrdNum; }
+ sal_uInt32 GetOrdNum() const { return nOrdNum; }
};
typedef SwPosFlyFrm* SwPosFlyFrmPtr;
diff --git a/sw/inc/fmtanchr.hxx b/sw/inc/fmtanchr.hxx
index 8e84dd87bbac..6595991eda1d 100644
--- a/sw/inc/fmtanchr.hxx
+++ b/sw/inc/fmtanchr.hxx
@@ -36,7 +36,7 @@
struct SwPosition;
class IntlWrapper;
-#define IVER_FMTANCHOR_LONGIDX ((USHORT)1)
+#define IVER_FMTANCHOR_LONGIDX ((sal_uInt16)1)
// FlyAnchors
class SW_DLLPUBLIC SwFmtAnchor: public SfxPoolItem
@@ -45,14 +45,14 @@ class SW_DLLPUBLIC SwFmtAnchor: public SfxPoolItem
// Index for paragraph-bound frames.
// Position for character-bound frames.
RndStdIds nAnchorId;
- USHORT nPageNum; // Page number for page-bound frames.
+ sal_uInt16 nPageNum; // Page number for page-bound frames.
// #i28701# - getting anchor positions ordered
sal_uInt32 mnOrder;
static sal_uInt32 mnOrderCounter;
public:
- SwFmtAnchor( RndStdIds eRnd = FLY_AT_PAGE, USHORT nPageNum = 0 );
+ SwFmtAnchor( RndStdIds eRnd = FLY_AT_PAGE, sal_uInt16 nPageNum = 0 );
SwFmtAnchor( const SwFmtAnchor &rCpy );
~SwFmtAnchor();
@@ -67,24 +67,24 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
RndStdIds GetAnchorId() const { return nAnchorId; }
- USHORT GetPageNum() const { return nPageNum; }
+ sal_uInt16 GetPageNum() const { return nPageNum; }
const SwPosition *GetCntntAnchor() const { return pCntntAnchor; }
// #i28701#
sal_uInt32 GetOrder() const;
void SetType( RndStdIds nRndId ) { nAnchorId = nRndId; }
- void SetPageNum( USHORT nNew ) { nPageNum = nNew; }
+ void SetPageNum( sal_uInt16 nNew ) { nPageNum = nNew; }
void SetAnchor( const SwPosition *pPos );
};
-inline const SwFmtAnchor &SwAttrSet::GetAnchor(BOOL bInP) const
+inline const SwFmtAnchor &SwAttrSet::GetAnchor(sal_Bool bInP) const
{ return static_cast<const SwFmtAnchor&>(Get(RES_ANCHOR, bInP)); }
- inline const SwFmtAnchor &SwFmt::GetAnchor(BOOL bInP) const
+ inline const SwFmtAnchor &SwFmt::GetAnchor(sal_Bool bInP) const
{ return aSet.GetAnchor(bInP); }
#endif
diff --git a/sw/inc/fmtautofmt.hxx b/sw/inc/fmtautofmt.hxx
index ad80534c3c47..ddcd2505735e 100644
--- a/sw/inc/fmtautofmt.hxx
+++ b/sw/inc/fmtautofmt.hxx
@@ -41,7 +41,7 @@ class SwFmtAutoFmt: public SfxPoolItem
boost::shared_ptr<SfxItemSet> mpHandle;
public:
- SwFmtAutoFmt( USHORT nWhich = RES_TXTATR_AUTOFMT );
+ SwFmtAutoFmt( sal_uInt16 nWhich = RES_TXTATR_AUTOFMT );
// single argument ctors shall be explicit.
virtual ~SwFmtAutoFmt();
@@ -64,8 +64,8 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
void SetStyleHandle( boost::shared_ptr<SfxItemSet> pHandle ) { mpHandle = pHandle; }
const boost::shared_ptr<SfxItemSet> GetStyleHandle() const { return mpHandle; }
diff --git a/sw/inc/fmtclbl.hxx b/sw/inc/fmtclbl.hxx
index ba97935d3c92..aacb8a50562b 100644
--- a/sw/inc/fmtclbl.hxx
+++ b/sw/inc/fmtclbl.hxx
@@ -37,7 +37,7 @@
class SW_DLLPUBLIC SwFmtNoBalancedColumns : public SfxBoolItem
{
public:
- SwFmtNoBalancedColumns( BOOL bFlag = FALSE )
+ SwFmtNoBalancedColumns( sal_Bool bFlag = sal_False )
: SfxBoolItem( RES_COLUMNBALANCE, bFlag ) {}
// "pure virtual methods" of SfxPoolItem
@@ -45,10 +45,10 @@ public:
};
-inline const SwFmtNoBalancedColumns &SwAttrSet::GetBalancedColumns(BOOL bInP) const
+inline const SwFmtNoBalancedColumns &SwAttrSet::GetBalancedColumns(sal_Bool bInP) const
{ return (const SwFmtNoBalancedColumns&)Get( RES_COLUMNBALANCE, bInP ); }
-inline const SwFmtNoBalancedColumns &SwFmt::GetBalancedColumns(BOOL bInP) const
+inline const SwFmtNoBalancedColumns &SwFmt::GetBalancedColumns(sal_Bool bInP) const
{ return aSet.GetBalancedColumns( bInP ); }
#endif
diff --git a/sw/inc/fmtclds.hxx b/sw/inc/fmtclds.hxx
index 4ae400485e46..2ab58323b7c8 100644
--- a/sw/inc/fmtclds.hxx
+++ b/sw/inc/fmtclds.hxx
@@ -37,31 +37,31 @@
// ColumnDescriptor
class SwColumn
{
- USHORT nWish; // Desired width, borders included.
+ sal_uInt16 nWish; // Desired width, borders included.
// It is inversely proportional to the ratio of
// desired width environment / current width column.
- USHORT nUpper; // Top border.
- USHORT nLower; // Bottom border.
- USHORT nLeft; // Left border.
- USHORT nRight; // Right border.
+ sal_uInt16 nUpper; // Top border.
+ sal_uInt16 nLower; // Bottom border.
+ sal_uInt16 nLeft; // Left border.
+ sal_uInt16 nRight; // Right border.
public:
SwColumn();
- BOOL operator==( const SwColumn & );
+ sal_Bool operator==( const SwColumn & );
- void SetWishWidth( USHORT nNew ) { nWish = nNew; }
- void SetUpper( USHORT nNew ) { nUpper = nNew; }
- void SetLower( USHORT nNew ) { nLower = nNew; }
- void SetLeft ( USHORT nNew ) { nLeft = nNew; }
- void SetRight( USHORT nNew ) { nRight = nNew; }
+ void SetWishWidth( sal_uInt16 nNew ) { nWish = nNew; }
+ void SetUpper( sal_uInt16 nNew ) { nUpper = nNew; }
+ void SetLower( sal_uInt16 nNew ) { nLower = nNew; }
+ void SetLeft ( sal_uInt16 nNew ) { nLeft = nNew; }
+ void SetRight( sal_uInt16 nNew ) { nRight = nNew; }
- USHORT GetWishWidth() const { return nWish; }
- USHORT GetUpper() const { return nUpper; }
- USHORT GetLower() const { return nLower; }
- USHORT GetLeft () const { return nLeft; }
- USHORT GetRight() const { return nRight; }
+ sal_uInt16 GetWishWidth() const { return nWish; }
+ sal_uInt16 GetUpper() const { return nUpper; }
+ sal_uInt16 GetLower() const { return nLower; }
+ sal_uInt16 GetLeft () const { return nLeft; }
+ sal_uInt16 GetRight() const { return nRight; }
};
typedef SwColumn* SwColumnPtr;
@@ -77,24 +77,24 @@ enum SwColLineAdj
class SW_DLLPUBLIC SwFmtCol : public SfxPoolItem
{
- ULONG nLineWidth; // Width of the separator line.
- Color aLineColor; // Color of the separator line.
+ sal_uLong nLineWidth; // Width of the separator line.
+ Color aLineColor; //color of the separator line
- BYTE nLineHeight; // Percentile height of lines.
+ sal_uInt16 nLineHeight; // Percentile height of lines.
// (Based on height of columns including UL).
SwColLineAdj eAdj; // Line will be adjusted top, centered or bottom.
SwColumns aColumns; // Information concerning the columns.
- USHORT nWidth; // Total desired width of all columns.
+ sal_uInt16 nWidth; // Total desired width of all columns.
- BOOL bOrtho; // Only if this flag is set, the setting of GutterWidth will
+ sal_Bool bOrtho; // Only if this flag is set, the setting of GutterWidth will
// be accompanied by a "visual rearrangement".
// The flag must be reset if widths of columns or borders are changed.
// When it is set (again) the visual arrangement is recalculated.
// The flag is initially set.
- SW_DLLPRIVATE void Calc( USHORT nGutterWidth, USHORT nAct );
+ SW_DLLPRIVATE void Calc( sal_uInt16 nGutterWidth, sal_uInt16 nAct );
public:
SwFmtCol();
@@ -112,63 +112,63 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
const SwColumns &GetColumns() const { return aColumns; }
SwColumns &GetColumns() { return aColumns; }
- USHORT GetNumCols() const { return aColumns.Count(); }
+ sal_uInt16 GetNumCols() const { return aColumns.Count(); }
- ULONG GetLineWidth() const { return nLineWidth;}
+ sal_uLong GetLineWidth() const { return nLineWidth;}
const Color& GetLineColor() const { return aLineColor;}
SwColLineAdj GetLineAdj() const { return eAdj; }
- BOOL IsOrtho() const { return bOrtho; }
- USHORT GetWishWidth() const { return nWidth; }
- BYTE GetLineHeight()const { return nLineHeight; }
+ sal_Bool IsOrtho() const { return bOrtho; }
+ sal_uInt16 GetWishWidth() const { return nWidth; }
+ sal_uInt8 GetLineHeight()const { return nLineHeight; }
// Return USHRT_MAX if ambiguous.
// Return smallest width if bMin is true.
- USHORT GetGutterWidth( BOOL bMin = FALSE ) const;
+ sal_uInt16 GetGutterWidth( sal_Bool bMin = sal_False ) const;
- void SetLineWidth(ULONG nLWidth) { nLineWidth = nLWidth;}
+ void SetLineWidth(sal_uLong nLWidth) { nLineWidth = nLWidth;}
void SetLineColor(const Color& rCol ) { aLineColor = rCol;}
- void SetLineHeight( BYTE nNew ) { nLineHeight = nNew; }
+ void SetLineHeight( sal_uInt8 nNew ) { nLineHeight = nNew; }
void SetLineAdj( SwColLineAdj eNew ){ eAdj = eNew; }
- void SetWishWidth( USHORT nNew ) { nWidth = nNew; }
+ void SetWishWidth( sal_uInt16 nNew ) { nWidth = nNew; }
// This function allows to (repeatedly) initialize the columns.
// The Ortho flag is set automatically.
- void Init( USHORT nNumCols, USHORT nGutterWidth, USHORT nAct );
+ void Init( sal_uInt16 nNumCols, sal_uInt16 nGutterWidth, sal_uInt16 nAct );
// Adjusts borders for columns in aColumns.
// If flag bOrtho is set, columns are visually re-arranged.
// If the flag is not set, columns widths are not changed and
// borders are adjusted.
- void SetGutterWidth( USHORT nNew, USHORT nAct );
+ void SetGutterWidth( sal_uInt16 nNew, sal_uInt16 nAct );
// This too re-arranges columns automatically if flag is set.
// Only in this case the second parameter is needed and evaluated.
- void SetOrtho( BOOL bNew, USHORT nGutterWidth, USHORT nAct );
+ void SetOrtho( sal_Bool bNew, sal_uInt16 nGutterWidth, sal_uInt16 nAct );
//For the reader
- void _SetOrtho( BOOL bNew ) { bOrtho = bNew; }
+ void _SetOrtho( sal_Bool bNew ) { bOrtho = bNew; }
// Calculates current width of column nCol.
// The ratio of desired width of this column to return value is
// proportional to ratio of total desired value to nAct.
- USHORT CalcColWidth( USHORT nCol, USHORT nAct ) const;
+ sal_uInt16 CalcColWidth( sal_uInt16 nCol, sal_uInt16 nAct ) const;
// As above except that it returns the width of PrtArea -
// that corresponds to what constitutes the column for the user.
- USHORT CalcPrtColWidth( USHORT nCol, USHORT nAct ) const;
+ sal_uInt16 CalcPrtColWidth( sal_uInt16 nCol, sal_uInt16 nAct ) const;
};
-inline const SwFmtCol &SwAttrSet::GetCol(BOOL bInP) const
+inline const SwFmtCol &SwAttrSet::GetCol(sal_Bool bInP) const
{ return (const SwFmtCol&)Get( RES_COL,bInP); }
-inline const SwFmtCol &SwFmt::GetCol(BOOL bInP) const
+inline const SwFmtCol &SwFmt::GetCol(sal_Bool bInP) const
{ return aSet.GetCol(bInP); }
#endif
diff --git a/sw/inc/fmtcnct.hxx b/sw/inc/fmtcnct.hxx
index 1e492cf37b3a..e7f526d8bca7 100644
--- a/sw/inc/fmtcnct.hxx
+++ b/sw/inc/fmtcnct.hxx
@@ -59,7 +59,7 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
SwFlyFrmFmt* GetPrev() const { return (SwFlyFrmFmt*)aPrev.GetRegisteredIn(); }
SwFlyFrmFmt* GetNext() const { return (SwFlyFrmFmt*)aNext.GetRegisteredIn(); }
@@ -77,10 +77,10 @@ SwFmtChain &SwFmtChain::operator=( const SwFmtChain &rCpy )
}
-inline const SwFmtChain &SwAttrSet::GetChain(BOOL bInP) const
+inline const SwFmtChain &SwAttrSet::GetChain(sal_Bool bInP) const
{ return (const SwFmtChain&)Get( RES_CHAIN,bInP); }
-inline const SwFmtChain &SwFmt::GetChain(BOOL bInP) const
+inline const SwFmtChain &SwFmt::GetChain(sal_Bool bInP) const
{ return aSet.GetChain(bInP); }
#endif
diff --git a/sw/inc/fmtcntnt.hxx b/sw/inc/fmtcntnt.hxx
index cba626baa102..501da07db0e3 100644
--- a/sw/inc/fmtcntnt.hxx
+++ b/sw/inc/fmtcntnt.hxx
@@ -56,10 +56,10 @@ public:
void SetNewCntntIdx( const SwNodeIndex *pIdx );
};
-inline const SwFmtCntnt &SwAttrSet::GetCntnt(BOOL bInP) const
+inline const SwFmtCntnt &SwAttrSet::GetCntnt(sal_Bool bInP) const
{ return (const SwFmtCntnt&)Get( RES_CNTNT,bInP); }
-inline const SwFmtCntnt &SwFmt::GetCntnt(BOOL bInP) const
+inline const SwFmtCntnt &SwFmt::GetCntnt(sal_Bool bInP) const
{ return aSet.GetCntnt(bInP); }
#endif
diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx
index 46fbec471cb4..4f941e084132 100644
--- a/sw/inc/fmtcol.hxx
+++ b/sw/inc/fmtcol.hxx
@@ -39,16 +39,16 @@ class SwFmtColl : public SwFmt
{
protected:
SwFmtColl( SwAttrPool& rPool, const sal_Char* pFmtName,
- const USHORT* pWhichRanges, SwFmtColl* pDerFrom,
- USHORT nFmtWhich )
+ const sal_uInt16* pWhichRanges, SwFmtColl* pDerFrom,
+ sal_uInt16 nFmtWhich )
: SwFmt( rPool, pFmtName, pWhichRanges, pDerFrom, nFmtWhich )
- { SetAuto( FALSE ); }
+ { SetAuto( sal_False ); }
SwFmtColl( SwAttrPool& rPool, const String &rFmtName,
- const USHORT* pWhichRanges, SwFmtColl* pDerFrom,
- USHORT nFmtWhich )
+ const sal_uInt16* pWhichRanges, SwFmtColl* pDerFrom,
+ sal_uInt16 nFmtWhich )
: SwFmt( rPool, rFmtName, pWhichRanges, pDerFrom, nFmtWhich )
- { SetAuto( FALSE ); }
+ { SetAuto( sal_False ); }
private:
@@ -73,7 +73,7 @@ protected:
SwTxtFmtColl( SwAttrPool& rPool, const sal_Char* pFmtCollName,
SwTxtFmtColl* pDerFrom = 0,
- USHORT nFmtWh = RES_TXTFMTCOLL )
+ sal_uInt16 nFmtWh = RES_TXTFMTCOLL )
: SwFmtColl( rPool, pFmtCollName, aTxtFmtCollSetRange,
pDerFrom, nFmtWh ),
mbStayAssignedToListLevelOfOutlineStyle( false ),
@@ -83,7 +83,7 @@ protected:
SwTxtFmtColl( SwAttrPool& rPool, const String &rFmtCollName,
SwTxtFmtColl* pDerFrom = 0,
- USHORT nFmtWh = RES_TXTFMTCOLL )
+ sal_uInt16 nFmtWh = RES_TXTFMTCOLL )
: SwFmtColl( rPool, rFmtCollName, aTxtFmtCollSetRange,
pDerFrom, nFmtWh ),
@@ -101,7 +101,7 @@ public:
inline void SetNextTxtFmtColl(SwTxtFmtColl& rNext);
SwTxtFmtColl& GetNextTxtFmtColl() const { return *pNextTxtFmtColl; }
- BOOL IsAtDocNodeSet() const;
+ sal_Bool IsAtDocNodeSet() const;
void SetAttrOutlineLevel( int );
int GetAttrOutlineLevel() const;
@@ -115,12 +115,12 @@ public:
// Override to recognize changes on the <SwNumRuleItem> and register/unregister
// the paragragh style at the corresponding <SwNumRule> instance.
- virtual BOOL SetFmtAttr( const SfxPoolItem& rAttr );
- virtual BOOL SetFmtAttr( const SfxItemSet& rSet );
- virtual BOOL ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 = 0 );
+ virtual sal_Bool SetFmtAttr( const SfxPoolItem& rAttr );
+ virtual sal_Bool SetFmtAttr( const SfxItemSet& rSet );
+ virtual sal_Bool ResetFmtAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );
// Override <ResetAllFmtAttr()> to stay assigned to list level of outline style.
- virtual USHORT ResetAllFmtAttr();
+ virtual sal_uInt16 ResetAllFmtAttr();
inline bool StayAssignedToListLevelOfOutlineStyle() const
{
@@ -135,15 +135,15 @@ public:
in TextNode and here in TxtCollection in order to make both
the inheritance of and the access to set attributes function correctly!
- virtual BOOL SetDerivedFrom( SwFmtColl* pDerFrom = 0 );
+ virtual sal_Bool SetDerivedFrom( SwFmtColl* pDerFrom = 0 );
inline SwCharFmt* GetCharFmt() const;
- inline BOOL IsCharFmtSet() const;
+ inline sal_Bool IsCharFmtSet() const;
void SetCharFmt(SwCharFmt *);
void ResetCharFmt();
- inline BOOL SwTxtFmtColl::IsCharFmtSet() const
+ inline sal_Bool SwTxtFmtColl::IsCharFmtSet() const
{
- return aCharDepend.GetRegisteredIn() ? TRUE : FALSE;
+ return aCharDepend.GetRegisteredIn() ? sal_True : sal_False;
}
inline SwCharFmt* SwTxtFmtColl::GetCharFmt() const
{
@@ -198,19 +198,19 @@ enum Master_CollConditions
class SW_DLLPUBLIC SwCollCondition : public SwClient
{
- ULONG nCondition;
+ sal_uLong nCondition;
union
{
- ULONG nSubCondition;
+ sal_uLong nSubCondition;
String* pFldExpression;
} aSubCondition;
public:
TYPEINFO(); // Already in base class Client.
- SwCollCondition( SwTxtFmtColl* pColl, ULONG nMasterCond,
- ULONG nSubCond = 0 );
- SwCollCondition( SwTxtFmtColl* pColl, ULONG nMasterCond,
+ SwCollCondition( SwTxtFmtColl* pColl, sal_uLong nMasterCond,
+ sal_uLong nSubCond = 0 );
+ SwCollCondition( SwTxtFmtColl* pColl, sal_uLong nMasterCond,
const String& rSubExp );
virtual ~SwCollCondition();
@@ -225,12 +225,12 @@ public:
int operator!=( const SwCollCondition& rCmp ) const
{ return ! (*this == rCmp); }
- ULONG GetCondition() const { return nCondition; }
- ULONG GetSubCondition() const { return aSubCondition.nSubCondition; }
+ sal_uLong GetCondition() const { return nCondition; }
+ sal_uLong GetSubCondition() const { return aSubCondition.nSubCondition; }
const String* GetFldExpression() const
{ return aSubCondition.pFldExpression; }
- void SetCondition( ULONG nCond, ULONG nSubCond );
+ void SetCondition( sal_uLong nCond, sal_uLong nSubCond );
SwTxtFmtColl* GetTxtFmtColl() const { return (SwTxtFmtColl*)GetRegisteredIn(); }
};
@@ -260,7 +260,7 @@ public:
const SwCollCondition* HasCondition( const SwCollCondition& rCond ) const;
const SwFmtCollConditions& GetCondColls() const { return aCondColls; }
void InsertCondition( const SwCollCondition& rCond );
- BOOL RemoveCondition( const SwCollCondition& rCond );
+ sal_Bool RemoveCondition( const SwCollCondition& rCond );
void SetConditions( const SwFmtCollConditions& );
};
diff --git a/sw/inc/fmteiro.hxx b/sw/inc/fmteiro.hxx
index 5880557e0704..dd56f0cf7b4b 100644
--- a/sw/inc/fmteiro.hxx
+++ b/sw/inc/fmteiro.hxx
@@ -39,8 +39,8 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFmtEditInReadonly : public SfxBoolItem
{
public:
- SwFmtEditInReadonly( USHORT nId = RES_EDIT_IN_READONLY,
- BOOL bPrt = FALSE ) : SfxBoolItem( nId, bPrt ) {}
+ SwFmtEditInReadonly( sal_uInt16 nId = RES_EDIT_IN_READONLY,
+ sal_Bool bPrt = sal_False ) : SfxBoolItem( nId, bPrt ) {}
// "pure virtual methos" of SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -51,10 +51,10 @@ public:
const IntlWrapper* pIntl = 0 ) const;
};
-inline const SwFmtEditInReadonly &SwAttrSet::GetEditInReadonly(BOOL bInP) const
+inline const SwFmtEditInReadonly &SwAttrSet::GetEditInReadonly(sal_Bool bInP) const
{ return (const SwFmtEditInReadonly&)Get( RES_EDIT_IN_READONLY,bInP); }
-inline const SwFmtEditInReadonly &SwFmt::GetEditInReadonly(BOOL bInP) const
+inline const SwFmtEditInReadonly &SwFmt::GetEditInReadonly(sal_Bool bInP) const
{ return aSet.GetEditInReadonly(bInP); }
#endif
diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx
index 9ec54b325913..c6edb55fe82f 100644
--- a/sw/inc/fmtfld.hxx
+++ b/sw/inc/fmtfld.hxx
@@ -70,7 +70,7 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
- virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
const SwField *GetFld() const { return pField; }
SwField *GetFld() { return pField; }
@@ -87,8 +87,8 @@ public:
const SwTxtFld *GetTxtFld() const { return pTxtAttr; }
SwTxtFld *GetTxtFld() { return pTxtAttr; }
- BOOL IsFldInDoc() const;
- BOOL IsProtect() const;
+ sal_Bool IsFldInDoc() const;
+ sal_Bool IsProtect() const;
};
class SW_DLLPUBLIC SwFmtFldHint : public SfxHint
diff --git a/sw/inc/fmtfollowtextflow.hxx b/sw/inc/fmtfollowtextflow.hxx
index ab0bc99a46b0..7f079d3ca9b2 100644
--- a/sw/inc/fmtfollowtextflow.hxx
+++ b/sw/inc/fmtfollowtextflow.hxx
@@ -39,7 +39,7 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFmtFollowTextFlow : public SfxBoolItem
{
public:
- SwFmtFollowTextFlow( BOOL bFlag = FALSE )
+ SwFmtFollowTextFlow( sal_Bool bFlag = sal_False )
: SfxBoolItem( RES_FOLLOW_TEXT_FLOW, bFlag ) {}
TYPEINFO();
@@ -56,10 +56,10 @@ public:
#if !(defined(MACOSX) && ( __GNUC__ < 3 ))
// GrP moved to gcc_outl.cxx; revisit with gcc3
-inline const SwFmtFollowTextFlow &SwAttrSet::GetFollowTextFlow(BOOL bInP) const
+inline const SwFmtFollowTextFlow &SwAttrSet::GetFollowTextFlow(sal_Bool bInP) const
{ return (const SwFmtFollowTextFlow&)Get( RES_FOLLOW_TEXT_FLOW, bInP ); }
-inline const SwFmtFollowTextFlow &SwFmt::GetFollowTextFlow(BOOL bInP) const
+inline const SwFmtFollowTextFlow &SwFmt::GetFollowTextFlow(sal_Bool bInP) const
{ return aSet.GetFollowTextFlow( bInP ); }
#endif
diff --git a/sw/inc/fmtfordr.hxx b/sw/inc/fmtfordr.hxx
index fc8bdead2bb7..9e8a05dd95cf 100644
--- a/sw/inc/fmtfordr.hxx
+++ b/sw/inc/fmtfordr.hxx
@@ -51,7 +51,7 @@ public:
// "Pure virtual methods" of SfxPoolItem.
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual USHORT GetValueCount() const;
+ virtual sal_uInt16 GetValueCount() const;
SwFillOrder GetFillOrder() const { return SwFillOrder(GetValue()); }
};
@@ -62,10 +62,10 @@ inline SwFmtFillOrder &SwFmtFillOrder::operator=( const SwFmtFillOrder &rCpy )
return *this;
}
-inline const SwFmtFillOrder &SwAttrSet::GetFillOrder(BOOL bInP) const
+inline const SwFmtFillOrder &SwAttrSet::GetFillOrder(sal_Bool bInP) const
{ return (const SwFmtFillOrder&)Get( RES_FILL_ORDER,bInP); }
-inline const SwFmtFillOrder &SwFmt::GetFillOrder(BOOL bInP) const
+inline const SwFmtFillOrder &SwFmt::GetFillOrder(sal_Bool bInP) const
{ return aSet.GetFillOrder(bInP); }
#endif
diff --git a/sw/inc/fmtfsize.hxx b/sw/inc/fmtfsize.hxx
index ea89fa44e059..e3ef199d66cf 100644
--- a/sw/inc/fmtfsize.hxx
+++ b/sw/inc/fmtfsize.hxx
@@ -52,8 +52,8 @@ class SW_DLLPUBLIC SwFmtFrmSize: public SfxPoolItem
Size aSize;
SwFrmSize eFrmHeightType;
SwFrmSize eFrmWidthType;
- BYTE nWidthPercent;
- BYTE nHeightPercent;
+ sal_uInt8 nWidthPercent; //Fuer Tabellen kann die Breite in Prozent
+ sal_uInt8 nHeightPercent; //angegeben sein.
// For tables: width can be given in percent.
@@ -81,8 +81,8 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
SwFrmSize GetHeightSizeType() const { return eFrmHeightType; }
void SetHeightSizeType( SwFrmSize eSize ) { eFrmHeightType = eSize; }
@@ -98,16 +98,16 @@ public:
void SetHeight( const SwTwips nNew ) { aSize.Height() = nNew; }
void SetWidth ( const SwTwips nNew ) { aSize.Width() = nNew; }
- BYTE GetHeightPercent() const{ return nHeightPercent; }
- BYTE GetWidthPercent() const { return nWidthPercent; }
- void SetHeightPercent( BYTE n ) { nHeightPercent = n; }
- void SetWidthPercent ( BYTE n ) { nWidthPercent = n; }
+ sal_uInt8 GetHeightPercent() const{ return nHeightPercent; }
+ sal_uInt8 GetWidthPercent() const { return nWidthPercent; }
+ void SetHeightPercent( sal_uInt8 n ) { nHeightPercent = n; }
+ void SetWidthPercent ( sal_uInt8 n ) { nWidthPercent = n; }
};
-inline const SwFmtFrmSize &SwAttrSet::GetFrmSize(BOOL bInP) const
+inline const SwFmtFrmSize &SwAttrSet::GetFrmSize(sal_Bool bInP) const
{ return (const SwFmtFrmSize&)Get( RES_FRM_SIZE,bInP); }
-inline const SwFmtFrmSize &SwFmt::GetFrmSize(BOOL bInP) const
+inline const SwFmtFrmSize &SwFmt::GetFrmSize(sal_Bool bInP) const
{ return aSet.GetFrmSize(bInP); }
#endif
diff --git a/sw/inc/fmtftn.hxx b/sw/inc/fmtftn.hxx
index 432bffa927a2..8c1315f8efb0 100644
--- a/sw/inc/fmtftn.hxx
+++ b/sw/inc/fmtftn.hxx
@@ -42,7 +42,7 @@ class SW_DLLPUBLIC SwFmtFtn: public SfxPoolItem
friend class SwTxtFtn;
SwTxtFtn* pTxtAttr; // My TextAttribute.
String aNumber; // User-defined 'Number'.
- USHORT nNumber; // Automatic numbering.
+ sal_uInt16 nNumber; //Automatische Nummerierung
bool m_bEndNote; // Is it an End note?
// Protected CopyCtor.
@@ -58,11 +58,11 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
const String &GetNumStr() const { return aNumber; }
- const USHORT &GetNumber() const { return nNumber; }
+ const sal_uInt16 &GetNumber() const { return nNumber; }
bool IsEndNote() const { return m_bEndNote;}
void SetNumStr( const String& rStr ) { aNumber = rStr; }
- void SetNumber( USHORT nNo ) { nNumber = nNo; }
+ void SetNumber( sal_uInt16 nNo ) { nNumber = nNo; }
void SetEndNote( bool b );
void SetNumber( const SwFmtFtn& rFtn )
@@ -74,7 +74,7 @@ public:
void GetFtnText( String& rStr ) const;
// Returns string to be displayed of footnote / endnote.
- String GetViewNumStr( const SwDoc& rDoc, BOOL bInclStrs = FALSE ) const;
+ String GetViewNumStr( const SwDoc& rDoc, sal_Bool bInclStrs = sal_False ) const;
};
diff --git a/sw/inc/fmtftntx.hxx b/sw/inc/fmtftntx.hxx
index ec99243cbe8d..4f27387b0434 100644
--- a/sw/inc/fmtftntx.hxx
+++ b/sw/inc/fmtftntx.hxx
@@ -49,11 +49,11 @@ class SW_DLLPUBLIC SwFmtFtnEndAtTxtEnd : public SfxEnumItem
String sPrefix;
String sSuffix;
SvxNumberType aFmt;
- USHORT nOffset;
+ sal_uInt16 nOffset;
protected:
- SwFmtFtnEndAtTxtEnd( USHORT nWhichL, SwFtnEndPosEnum ePos )
- : SfxEnumItem( nWhichL, sal::static_int_cast< USHORT >(ePos) ), nOffset( 0 )
+ SwFmtFtnEndAtTxtEnd( sal_uInt16 nWhichL, SwFtnEndPosEnum ePos )
+ : SfxEnumItem( nWhichL, sal::static_int_cast< sal_uInt16 >(ePos) ), nOffset( 0 )
{}
SwFmtFtnEndAtTxtEnd( const SwFmtFtnEndAtTxtEnd& rAttr )
: SfxEnumItem( rAttr ), sPrefix( rAttr.sPrefix ),
@@ -62,12 +62,12 @@ protected:
{}
public:
- virtual USHORT GetValueCount() const;
+ virtual sal_uInt16 GetValueCount() const;
virtual int operator==( const SfxPoolItem& ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -75,7 +75,7 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- inline BOOL IsAtEnd() const { return FTNEND_ATPGORDOCEND != GetValue(); }
+ inline sal_Bool IsAtEnd() const { return FTNEND_ATPGORDOCEND != GetValue(); }
SwFmtFtnEndAtTxtEnd & operator=( const SwFmtFtnEndAtTxtEnd & rAttr );
@@ -84,8 +84,8 @@ public:
const SvxNumberType& GetSwNumType() const { return aFmt; }
- USHORT GetOffset() const { return nOffset; }
- void SetOffset( USHORT nOff ) { nOffset = nOff; }
+ sal_uInt16 GetOffset() const { return nOffset; }
+ void SetOffset( sal_uInt16 nOff ) { nOffset = nOff; }
const String& GetPrefix() const { return sPrefix; }
void SetPrefix(const String& rSet) { sPrefix = rSet; }
@@ -116,15 +116,15 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
};
-inline const SwFmtFtnAtTxtEnd &SwAttrSet::GetFtnAtTxtEnd(BOOL bInP) const
+inline const SwFmtFtnAtTxtEnd &SwAttrSet::GetFtnAtTxtEnd(sal_Bool bInP) const
{ return (const SwFmtFtnAtTxtEnd&)Get( RES_FTN_AT_TXTEND, bInP); }
-inline const SwFmtEndAtTxtEnd &SwAttrSet::GetEndAtTxtEnd(BOOL bInP) const
+inline const SwFmtEndAtTxtEnd &SwAttrSet::GetEndAtTxtEnd(sal_Bool bInP) const
{ return (const SwFmtEndAtTxtEnd&)Get( RES_END_AT_TXTEND, bInP); }
-inline const SwFmtFtnAtTxtEnd &SwFmt::GetFtnAtTxtEnd(BOOL bInP) const
+inline const SwFmtFtnAtTxtEnd &SwFmt::GetFtnAtTxtEnd(sal_Bool bInP) const
{ return aSet.GetFtnAtTxtEnd(bInP); }
-inline const SwFmtEndAtTxtEnd &SwFmt::GetEndAtTxtEnd(BOOL bInP) const
+inline const SwFmtEndAtTxtEnd &SwFmt::GetEndAtTxtEnd(sal_Bool bInP) const
{ return aSet.GetEndAtTxtEnd(bInP); }
#endif
diff --git a/sw/inc/fmthdft.hxx b/sw/inc/fmthdft.hxx
index cb3bb057926b..67134aabd75d 100644
--- a/sw/inc/fmthdft.hxx
+++ b/sw/inc/fmthdft.hxx
@@ -42,10 +42,10 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFmtHeader: public SfxPoolItem, public SwClient
{
- BOOL bActive; // Only for controlling (creation of content).
+ sal_Bool bActive; // Only for controlling (creation of content).
public:
- SwFmtHeader( BOOL bOn = FALSE );
+ SwFmtHeader( sal_Bool bOn = sal_False );
SwFmtHeader( SwFrmFmt *pHeaderFmt );
SwFmtHeader( const SwFmtHeader &rCpy );
~SwFmtHeader();
@@ -65,8 +65,8 @@ public:
const SwFrmFmt *GetHeaderFmt() const { return (SwFrmFmt*)pRegisteredIn; }
SwFrmFmt *GetHeaderFmt() { return (SwFrmFmt*)pRegisteredIn; }
- BOOL IsActive() const { return bActive; }
- void SetActive( BOOL bNew = TRUE ) { bActive = bNew; }
+ sal_Bool IsActive() const { return bActive; }
+ void SetActive( sal_Bool bNew = sal_True ) { bActive = bNew; }
};
//Footer, for pageformats
@@ -74,10 +74,10 @@ public:
class SW_DLLPUBLIC SwFmtFooter: public SfxPoolItem, public SwClient
{
- BOOL bActive; // Only for controlling (creation of content).
+ sal_Bool bActive; // Only for controlling (creation of content).
public:
- SwFmtFooter( BOOL bOn = FALSE );
+ SwFmtFooter( sal_Bool bOn = sal_False );
SwFmtFooter( SwFrmFmt *pFooterFmt );
SwFmtFooter( const SwFmtFooter &rCpy );
~SwFmtFooter();
@@ -97,18 +97,18 @@ public:
const SwFrmFmt *GetFooterFmt() const { return (SwFrmFmt*)pRegisteredIn; }
SwFrmFmt *GetFooterFmt() { return (SwFrmFmt*)pRegisteredIn; }
- BOOL IsActive() const { return bActive; }
- void SetActive( BOOL bNew = TRUE ) { bActive = bNew; }
+ sal_Bool IsActive() const { return bActive; }
+ void SetActive( sal_Bool bNew = sal_True ) { bActive = bNew; }
};
-inline const SwFmtHeader &SwAttrSet::GetHeader(BOOL bInP) const
+inline const SwFmtHeader &SwAttrSet::GetHeader(sal_Bool bInP) const
{ return (const SwFmtHeader&)Get( RES_HEADER,bInP); }
-inline const SwFmtFooter &SwAttrSet::GetFooter(BOOL bInP) const
+inline const SwFmtFooter &SwAttrSet::GetFooter(sal_Bool bInP) const
{ return (const SwFmtFooter&)Get( RES_FOOTER,bInP); }
-inline const SwFmtHeader &SwFmt::GetHeader(BOOL bInP) const
+inline const SwFmtHeader &SwFmt::GetHeader(sal_Bool bInP) const
{ return aSet.GetHeader(bInP); }
-inline const SwFmtFooter &SwFmt::GetFooter(BOOL bInP) const
+inline const SwFmtFooter &SwFmt::GetFooter(sal_Bool bInP) const
{ return aSet.GetFooter(bInP); }
#endif
diff --git a/sw/inc/fmtinfmt.hxx b/sw/inc/fmtinfmt.hxx
index 6ffc653557dc..ae33b2ab492c 100644
--- a/sw/inc/fmtinfmt.hxx
+++ b/sw/inc/fmtinfmt.hxx
@@ -50,8 +50,8 @@ class SW_DLLPUBLIC SwFmtINetFmt: public SfxPoolItem
String aName; // Name of the link.
SvxMacroTableDtor* pMacroTbl;
SwTxtINetFmt* pTxtAttr; // My TextAttribute.
- USHORT nINetId;
- USHORT nVisitedId;
+ sal_uInt16 nINetId;
+ sal_uInt16 nVisitedId;
public:
SwFmtINetFmt( const String& rURL, const String& rTarget );
SwFmtINetFmt( const SwFmtINetFmt& rAttr );
@@ -70,9 +70,9 @@ public:
const IntlWrapper* pIntl = 0 ) const;
virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ sal_uInt8 nMemberId = 0 );
const SwTxtINetFmt* GetTxtINetFmt() const { return pTxtAttr; }
@@ -91,19 +91,19 @@ public:
const String& GetVisitedFmt() const { return aVisitedFmt; }
void SetVisitedFmt( const String& rNm ) { aVisitedFmt = rNm; }
- USHORT GetINetFmtId() const { return nINetId; }
- void SetINetFmtId( USHORT nNew ) { nINetId = nNew; }
+ sal_uInt16 GetINetFmtId() const { return nINetId; }
+ void SetINetFmtId( sal_uInt16 nNew ) { nINetId = nNew; }
- USHORT GetVisitedFmtId() const { return nVisitedId; }
- void SetVisitedFmtId( USHORT nNew ) { nVisitedId = nNew; }
+ sal_uInt16 GetVisitedFmtId() const { return nVisitedId; }
+ void SetVisitedFmtId( sal_uInt16 nNew ) { nVisitedId = nNew; }
// Set a new MacroTable or clear the current one.
void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 );
const SvxMacroTableDtor* GetMacroTbl() const { return pMacroTbl; }
// Macro getter and setter.
- void SetMacro( USHORT nEvent, const SvxMacro& rMacro );
- const SvxMacro* GetMacro( USHORT nEvent ) const;
+ void SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro );
+ const SvxMacro* GetMacro( sal_uInt16 nEvent ) const;
};
diff --git a/sw/inc/fmtline.hxx b/sw/inc/fmtline.hxx
index d6ab919672ab..a98e90b8732d 100644
--- a/sw/inc/fmtline.hxx
+++ b/sw/inc/fmtline.hxx
@@ -38,8 +38,8 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFmtLineNumber: public SfxPoolItem
{
- ULONG nStartValue :24; // Starting value for the paragraph. 0 == no starting value.
- ULONG bCountLines :1; // Also count lines of paragraph.
+ sal_uLong nStartValue :24; // Starting value for the paragraph. 0 == no starting value.
+ sal_uLong bCountLines :1; // Also count lines of paragraph.
public:
SwFmtLineNumber();
@@ -55,17 +55,17 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
- ULONG GetStartValue() const { return nStartValue; }
- BOOL IsCount() const { return bCountLines != 0; }
+ sal_uLong GetStartValue() const { return nStartValue; }
+ sal_Bool IsCount() const { return bCountLines != 0; }
- void SetStartValue( ULONG nNew ) { nStartValue = nNew; }
- void SetCountLines( BOOL b ) { bCountLines = b; }
+ void SetStartValue( sal_uLong nNew ) { nStartValue = nNew; }
+ void SetCountLines( sal_Bool b ) { bCountLines = b; }
};
-inline const SwFmtLineNumber &SwAttrSet::GetLineNumber(BOOL bInP) const
+inline const SwFmtLineNumber &SwAttrSet::GetLineNumber(sal_Bool bInP) const
{ return (const SwFmtLineNumber&)Get( RES_LINENUMBER,bInP); }
#endif
diff --git a/sw/inc/fmtlsplt.hxx b/sw/inc/fmtlsplt.hxx
index 99126a0ba2eb..23914d3b067b 100644
--- a/sw/inc/fmtlsplt.hxx
+++ b/sw/inc/fmtlsplt.hxx
@@ -38,7 +38,7 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFmtLayoutSplit : public SfxBoolItem
{
public:
- SwFmtLayoutSplit( BOOL bSplit = TRUE ) : SfxBoolItem( RES_LAYOUT_SPLIT, bSplit ) {}
+ SwFmtLayoutSplit( sal_Bool bSplit = sal_True ) : SfxBoolItem( RES_LAYOUT_SPLIT, bSplit ) {}
// "pure virtual methods" of SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -49,10 +49,10 @@ public:
const IntlWrapper* pIntl = 0 ) const;
};
-inline const SwFmtLayoutSplit &SwAttrSet::GetLayoutSplit(BOOL bInP) const
+inline const SwFmtLayoutSplit &SwAttrSet::GetLayoutSplit(sal_Bool bInP) const
{ return (const SwFmtLayoutSplit&)Get( RES_LAYOUT_SPLIT,bInP); }
-inline const SwFmtLayoutSplit &SwFmt::GetLayoutSplit(BOOL bInP) const
+inline const SwFmtLayoutSplit &SwFmt::GetLayoutSplit(sal_Bool bInP) const
{ return aSet.GetLayoutSplit(bInP); }
#endif
diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx
index 8cf7d4c0b45d..459220c6007f 100644
--- a/sw/inc/fmtmeta.hxx
+++ b/sw/inc/fmtmeta.hxx
@@ -109,12 +109,12 @@ private:
SwTxtMeta * GetTxtAttr() { return m_pTxtAttr; }
void SetTxtAttr(SwTxtMeta * const i_pTxtAttr);
- explicit SwFmtMeta( const USHORT i_nWhich );
+ explicit SwFmtMeta( const sal_uInt16 i_nWhich );
public:
// takes ownership
explicit SwFmtMeta( ::boost::shared_ptr< ::sw::Meta > const & i_pMeta,
- const USHORT i_nWhich );
+ const sal_uInt16 i_nWhich );
virtual ~SwFmtMeta();
// SfxPoolItem
@@ -123,7 +123,7 @@ public:
/// notify clients registered at m_pMeta that this meta is being (re-)moved
void NotifyChangeTxtNode(SwTxtNode *const pTxtNode);
- static SwFmtMeta * CreatePoolDefault( const USHORT i_nWhich );
+ static SwFmtMeta * CreatePoolDefault( const sal_uInt16 i_nWhich );
::sw::Meta * GetMeta() { return m_pMeta.get(); }
/// this method <em>must</em> be called when the hint is actually copied
void DoCopy( SwFmtMeta & rOriginalMeta );
diff --git a/sw/inc/fmtornt.hxx b/sw/inc/fmtornt.hxx
index 4bde0fb62860..ac196412fba5 100644
--- a/sw/inc/fmtornt.hxx
+++ b/sw/inc/fmtornt.hxx
@@ -40,7 +40,7 @@
class IntlWrapper;
-#define IVER_VERTORIENT_REL ((USHORT)0x0001)
+#define IVER_VERTORIENT_REL ((sal_uInt16)0x0001)
class SW_DLLPUBLIC SwFmtVertOrient: public SfxPoolItem
{
@@ -61,8 +61,8 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
sal_Int16 GetVertOrient() const { return eOrient; }
sal_Int16 GetRelationOrient() const { return eRelation; }
@@ -75,19 +75,19 @@ public:
// SwFmtHoriOrient; how and towards what does the FlyFrm orient itself horizontally?
-#define IVER_HORIORIENT_TOGGLE ((USHORT)0x0001)
-#define IVER_HORIORIENT_REL ((USHORT)0x0002)
+#define IVER_HORIORIENT_TOGGLE ((sal_uInt16)0x0001)
+#define IVER_HORIORIENT_REL ((sal_uInt16)0x0002)
class SW_DLLPUBLIC SwFmtHoriOrient: public SfxPoolItem
{
SwTwips nXPos; // Contains *always* the current RelPos.
sal_Int16 eOrient;
sal_Int16 eRelation;
- BOOL bPosToggle : 1; // Flip position on even pages.
+ sal_Bool bPosToggle : 1; // Flip position on even pages.
public:
TYPEINFO();
SwFmtHoriOrient( SwTwips nX = 0, sal_Int16 eHori = com::sun::star::text::HoriOrientation::NONE,
- sal_Int16 eRel = com::sun::star::text::RelOrientation::PRINT_AREA, BOOL bPos = FALSE );
+ sal_Int16 eRel = com::sun::star::text::RelOrientation::PRINT_AREA, sal_Bool bPos = sal_False );
inline SwFmtHoriOrient &operator=( const SwFmtHoriOrient &rCpy );
// "Pure virtual methods" of SfxPoolItem.
@@ -98,8 +98,8 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
sal_Int16 GetHoriOrient() const { return eOrient; }
sal_Int16 GetRelationOrient() const { return eRelation; }
@@ -109,8 +109,8 @@ public:
SwTwips GetPos() const { return nXPos; }
void SetPos( SwTwips nNew ) { nXPos = nNew; }
- BOOL IsPosToggle() const { return bPosToggle; }
- void SetPosToggle( BOOL bNew ) { bPosToggle = bNew; }
+ sal_Bool IsPosToggle() const { return bPosToggle; }
+ void SetPosToggle( sal_Bool bNew ) { bPosToggle = bNew; }
};
inline SwFmtVertOrient &SwFmtVertOrient::operator=( const SwFmtVertOrient &rCpy )
@@ -129,14 +129,14 @@ inline SwFmtHoriOrient &SwFmtHoriOrient::operator=( const SwFmtHoriOrient &rCpy
return *this;
}
-inline const SwFmtVertOrient &SwAttrSet::GetVertOrient(BOOL bInP) const
+inline const SwFmtVertOrient &SwAttrSet::GetVertOrient(sal_Bool bInP) const
{ return (const SwFmtVertOrient&)Get( RES_VERT_ORIENT,bInP); }
-inline const SwFmtHoriOrient &SwAttrSet::GetHoriOrient(BOOL bInP) const
+inline const SwFmtHoriOrient &SwAttrSet::GetHoriOrient(sal_Bool bInP) const
{ return (const SwFmtHoriOrient&)Get( RES_HORI_ORIENT,bInP); }
-inline const SwFmtVertOrient &SwFmt::GetVertOrient(BOOL bInP) const
+inline const SwFmtVertOrient &SwFmt::GetVertOrient(sal_Bool bInP) const
{ return aSet.GetVertOrient(bInP); }
-inline const SwFmtHoriOrient &SwFmt::GetHoriOrient(BOOL bInP) const
+inline const SwFmtHoriOrient &SwFmt::GetHoriOrient(sal_Bool bInP) const
{ return aSet.GetHoriOrient(bInP); }
#endif
diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx
index b52ac1cd6074..307fcb6576ab 100644
--- a/sw/inc/fmtpdsc.hxx
+++ b/sw/inc/fmtpdsc.hxx
@@ -43,17 +43,17 @@ class IntlWrapper;
// Pagedescriptor
// Client of SwPageDesc that is "described" by the attribute.
-#define IVER_FMTPAGEDESC_NOAUTO ((USHORT)0x0001)
-#define IVER_FMTPAGEDESC_LONGPAGE ((USHORT)0x0002)
+#define IVER_FMTPAGEDESC_NOAUTO ((sal_uInt16)0x0001)
+#define IVER_FMTPAGEDESC_LONGPAGE ((sal_uInt16)0x0002)
class SW_DLLPUBLIC SwFmtPageDesc : public SfxPoolItem, public SwClient
{
// This "Doc"-function is made friend in order to be able
// to set the auto-flag after copying!!
- friend BOOL InsAttr( SwDoc*, const SwPaM &, const SfxItemSet&, USHORT,
+ friend sal_Bool InsAttr( SwDoc*, const SwPaM &, const SfxItemSet&, sal_uInt16,
SwHistory* );
- USHORT nNumOffset; // Offset page number.
- USHORT nDescNameIdx; // SW3-Reader: stringpool-index of style name.
+ sal_uInt16 nNumOffset; // Offset page number.
+ sal_uInt16 nDescNameIdx; // SW3-Reader: stringpool-index of style name.
SwModify* pDefinedIn; // Points to the object in which the
// attribute was set (CntntNode/Format).
@@ -73,16 +73,16 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
SwPageDesc *GetPageDesc() { return (SwPageDesc*)GetRegisteredIn(); }
const SwPageDesc *GetPageDesc() const { return (SwPageDesc*)GetRegisteredIn(); }
- USHORT GetNumOffset() const { return nNumOffset; }
- void SetNumOffset( USHORT nNum ) { nNumOffset = nNum; }
+ sal_uInt16 GetNumOffset() const { return nNumOffset; }
+ void SetNumOffset( sal_uInt16 nNum ) { nNumOffset = nNum; }
// Query / set where attribute is anchored.
inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
@@ -90,10 +90,10 @@ public:
};
-inline const SwFmtPageDesc &SwAttrSet::GetPageDesc(BOOL bInP) const
+inline const SwFmtPageDesc &SwAttrSet::GetPageDesc(sal_Bool bInP) const
{ return (const SwFmtPageDesc&)Get( RES_PAGEDESC,bInP); }
-inline const SwFmtPageDesc &SwFmt::GetPageDesc(BOOL bInP) const
+inline const SwFmtPageDesc &SwFmt::GetPageDesc(sal_Bool bInP) const
{ return aSet.GetPageDesc(bInP); }
#endif
diff --git a/sw/inc/fmtrowsplt.hxx b/sw/inc/fmtrowsplt.hxx
index 3ac1b2a2e527..4d6cdfe8f47f 100644
--- a/sw/inc/fmtrowsplt.hxx
+++ b/sw/inc/fmtrowsplt.hxx
@@ -38,7 +38,7 @@ class IntlWrapper;
class SW_DLLPUBLIC SwFmtRowSplit : public SfxBoolItem
{
public:
- SwFmtRowSplit( BOOL bSplit = TRUE ) : SfxBoolItem( RES_ROW_SPLIT, bSplit ) {}
+ SwFmtRowSplit( sal_Bool bSplit = sal_True ) : SfxBoolItem( RES_ROW_SPLIT, bSplit ) {}
// "pure virtual methods" of SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -49,10 +49,10 @@ public:
const IntlWrapper* pIntl = 0 ) const;
};
-inline const SwFmtRowSplit &SwAttrSet::GetRowSplit(BOOL bInP) const
+inline const SwFmtRowSplit &SwAttrSet::GetRowSplit(sal_Bool bInP) const
{ return (const SwFmtRowSplit&)Get( RES_ROW_SPLIT,bInP); }
-inline const SwFmtRowSplit &SwFmt::GetRowSplit(BOOL bInP) const
+inline const SwFmtRowSplit &SwFmt::GetRowSplit(sal_Bool bInP) const
{ return aSet.GetRowSplit(bInP); }
#endif
diff --git a/sw/inc/fmtruby.hxx b/sw/inc/fmtruby.hxx
index 0e2b39fb2e5c..bee5b6a3137b 100644
--- a/sw/inc/fmtruby.hxx
+++ b/sw/inc/fmtruby.hxx
@@ -41,9 +41,9 @@ class SW_DLLPUBLIC SwFmtRuby : public SfxPoolItem
String sRubyTxt; // The ruby txt.
String sCharFmtName; // Name of the charformat.
SwTxtRuby* pTxtAttr; // The TextAttribute.
- USHORT nCharFmtId; // PoolId of the charformat.
- USHORT nPosition; // Position of the Ruby-character.
- USHORT nAdjustment; // Specific adjustment of the Ruby-ch.
+ sal_uInt16 nCharFmtId; // PoolId of the charformat.
+ sal_uInt16 nPosition; // Position of the Ruby-character.
+ sal_uInt16 nAdjustment; // Specific adjustment of the Ruby-ch.
public:
SwFmtRuby( const String& rRubyTxt );
@@ -63,9 +63,9 @@ public:
const IntlWrapper* pIntl = 0 ) const;
virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ sal_uInt8 nMemberId = 0 );
const SwTxtRuby* GetTxtRuby() const { return pTxtAttr; }
@@ -77,14 +77,14 @@ public:
const String& GetCharFmtName() const { return sCharFmtName; }
void SetCharFmtName( const String& rNm ) { sCharFmtName = rNm; }
- USHORT GetCharFmtId() const { return nCharFmtId; }
- void SetCharFmtId( USHORT nNew ) { nCharFmtId = nNew; }
+ sal_uInt16 GetCharFmtId() const { return nCharFmtId; }
+ void SetCharFmtId( sal_uInt16 nNew ) { nCharFmtId = nNew; }
- USHORT GetPosition() const { return nPosition; }
- void SetPosition( USHORT nNew ) { nPosition = nNew; }
+ sal_uInt16 GetPosition() const { return nPosition; }
+ void SetPosition( sal_uInt16 nNew ) { nPosition = nNew; }
- USHORT GetAdjustment() const { return nAdjustment; }
- void SetAdjustment( USHORT nNew ) { nAdjustment = nNew; }
+ sal_uInt16 GetAdjustment() const { return nAdjustment; }
+ void SetAdjustment( sal_uInt16 nNew ) { nAdjustment = nNew; }
};
diff --git a/sw/inc/fmtsrnd.hxx b/sw/inc/fmtsrnd.hxx
index 0bedda9c181e..b8edae5a58c8 100644
--- a/sw/inc/fmtsrnd.hxx
+++ b/sw/inc/fmtsrnd.hxx
@@ -39,9 +39,9 @@ class IntlWrapper;
// SwFmtSurround: How document content under the frame shall behave.
class SW_DLLPUBLIC SwFmtSurround: public SfxEnumItem
{
- BOOL bAnchorOnly :1;
- BOOL bContour :1;
- BOOL bOutside :1;
+ sal_Bool bAnchorOnly :1;
+ sal_Bool bContour :1;
+ sal_Bool bOutside :1;
public:
SwFmtSurround( SwSurround eNew = SURROUND_PARALLEL );
SwFmtSurround( const SwFmtSurround & );
@@ -50,24 +50,24 @@ public:
// "Pure virtual Methods" of SfxPoolItem.
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- virtual USHORT GetValueCount() const;
+ virtual sal_uInt16 GetValueCount() const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
SwSurround GetSurround()const { return SwSurround( GetValue() ); }
- BOOL IsAnchorOnly() const { return bAnchorOnly; }
- BOOL IsContour() const { return bContour; }
- BOOL IsOutside() const { return bOutside; }
- void SetSurround ( SwSurround eNew ){ SfxEnumItem::SetValue( USHORT( eNew ) ); }
- void SetAnchorOnly( BOOL bNew ) { bAnchorOnly = bNew; }
- void SetContour( BOOL bNew ) { bContour = bNew; }
- void SetOutside( BOOL bNew ) { bOutside = bNew; }
+ sal_Bool IsAnchorOnly() const { return bAnchorOnly; }
+ sal_Bool IsContour() const { return bContour; }
+ sal_Bool IsOutside() const { return bOutside; }
+ void SetSurround ( SwSurround eNew ){ SfxEnumItem::SetValue( sal_uInt16( eNew ) ); }
+ void SetAnchorOnly( sal_Bool bNew ) { bAnchorOnly = bNew; }
+ void SetContour( sal_Bool bNew ) { bContour = bNew; }
+ void SetOutside( sal_Bool bNew ) { bOutside = bNew; }
};
inline SwFmtSurround &SwFmtSurround::operator=( const SwFmtSurround &rCpy )
@@ -79,10 +79,10 @@ inline SwFmtSurround &SwFmtSurround::operator=( const SwFmtSurround &rCpy )
return *this;
}
-inline const SwFmtSurround &SwAttrSet::GetSurround(BOOL bInP) const
+inline const SwFmtSurround &SwAttrSet::GetSurround(sal_Bool bInP) const
{ return (const SwFmtSurround&)Get( RES_SURROUND,bInP); }
-inline const SwFmtSurround &SwFmt::GetSurround(BOOL bInP) const
+inline const SwFmtSurround &SwFmt::GetSurround(sal_Bool bInP) const
{ return aSet.GetSurround(bInP); }
#endif
diff --git a/sw/inc/fmturl.hxx b/sw/inc/fmturl.hxx
index 639a2667f5b4..667f0f1d8cac 100644
--- a/sw/inc/fmturl.hxx
+++ b/sw/inc/fmturl.hxx
@@ -45,7 +45,7 @@ class SW_DLLPUBLIC SwFmtURL: public SfxPoolItem
String sName; // Name of the anchor.
ImageMap *pMap; // ClientSide images.
- BOOL bIsServerMap; // A ServerSideImageMap with the URL.
+ sal_Bool bIsServerMap; // A ServerSideImageMap with the URL.
SwFmtURL& operator=( const SwFmtURL& );
@@ -65,16 +65,16 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
void SetTargetFrameName( const String& rStr ) { sTargetFrameName = rStr; }
- void SetURL( const String &rURL, BOOL bServerMap );
+ void SetURL( const String &rURL, sal_Bool bServerMap );
void SetMap( const ImageMap *pM ); // Pointer will be copied.
const String &GetTargetFrameName()const { return sTargetFrameName; }
const String &GetURL() const { return sURL; }
- BOOL IsServerMap() const { return bIsServerMap; }
+ sal_Bool IsServerMap() const { return bIsServerMap; }
const ImageMap *GetMap() const { return pMap; }
ImageMap *GetMap() { return pMap; }
@@ -83,10 +83,10 @@ public:
};
-inline const SwFmtURL &SwAttrSet::GetURL(BOOL bInP) const
+inline const SwFmtURL &SwAttrSet::GetURL(sal_Bool bInP) const
{ return (const SwFmtURL&)Get( RES_URL,bInP); }
-inline const SwFmtURL &SwFmt::GetURL(BOOL bInP) const
+inline const SwFmtURL &SwFmt::GetURL(sal_Bool bInP) const
{ return aSet.GetURL(bInP); }
#endif
diff --git a/sw/inc/fmtwrapinfluenceonobjpos.hxx b/sw/inc/fmtwrapinfluenceonobjpos.hxx
index e7e0bc22eb58..91418b49e24d 100644
--- a/sw/inc/fmtwrapinfluenceonobjpos.hxx
+++ b/sw/inc/fmtwrapinfluenceonobjpos.hxx
@@ -56,8 +56,8 @@ public:
virtual int operator==( const SfxPoolItem& _rAttr ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
// direct accessors to data
void SetWrapInfluenceOnObjPos( sal_Int16 _nWrapInfluenceOnPosition );
@@ -67,10 +67,10 @@ public:
const bool _bIterativeAsOnceConcurrent = false ) const;
};
-inline const SwFmtWrapInfluenceOnObjPos& SwAttrSet::GetWrapInfluenceOnObjPos(BOOL bInP) const
+inline const SwFmtWrapInfluenceOnObjPos& SwAttrSet::GetWrapInfluenceOnObjPos(sal_Bool bInP) const
{ return (const SwFmtWrapInfluenceOnObjPos&)Get( RES_WRAP_INFLUENCE_ON_OBJPOS,bInP); }
- inline const SwFmtWrapInfluenceOnObjPos& SwFmt::GetWrapInfluenceOnObjPos(BOOL bInP) const
+ inline const SwFmtWrapInfluenceOnObjPos& SwFmt::GetWrapInfluenceOnObjPos(sal_Bool bInP) const
{ return aSet.GetWrapInfluenceOnObjPos(bInP); }
#endif
diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx
index 253552688031..6f7e9b84f428 100644
--- a/sw/inc/format.hxx
+++ b/sw/inc/format.hxx
@@ -48,25 +48,25 @@ class SW_DLLPUBLIC SwFmt : public SwModify
String aFmtName;
SwAttrSet aSet;
- USHORT nWhichId;
- USHORT nFmtId; // Format-ID for reading / writing.
- USHORT nPoolFmtId; // Id for "automatically" created formats.
+ sal_uInt16 nWhichId;
+ sal_uInt16 nFmtId; // Format-ID for reading / writing.
+ sal_uInt16 nPoolFmtId; // Id for "automatically" created formats.
// (is not hard attribution!!!)
- USHORT nPoolHelpId; // HelpId for this Pool-style.
- BYTE nPoolHlpFileId; // FilePos to Doc to these style helps.
- BOOL bWritten : 1; // TRUE: already written.
- BOOL bAutoFmt : 1; // FALSE: it is a template.
+ sal_uInt16 nPoolHelpId; // HelpId for this Pool-style.
+ sal_uInt8 nPoolHlpFileId; // FilePos to Doc to these style helps.
+ sal_Bool bWritten : 1; // TRUE: already written.
+ sal_Bool bAutoFmt : 1; // FALSE: it is a template.
// default is true!
- BOOL bFmtInDTOR : 1; // TRUE: Format becomes deleted. In order to be able
+ sal_Bool bFmtInDTOR : 1; // TRUE: Format becomes deleted. In order to be able
// to recognize this in FmtChg-message!!
- BOOL bAutoUpdateFmt : 1;// TRUE: Set attributes of a whole paragraph
+ sal_Bool bAutoUpdateFmt : 1;// TRUE: Set attributes of a whole paragraph
// at format (UI-side!).
protected:
SwFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
- const USHORT* pWhichRanges, SwFmt *pDrvdFrm, USHORT nFmtWhich );
- SwFmt( SwAttrPool& rPool, const String &rFmtNm, const USHORT* pWhichRanges,
- SwFmt *pDrvdFrm, USHORT nFmtWhich );
+ const sal_uInt16* pWhichRanges, SwFmt *pDrvdFrm, sal_uInt16 nFmtWhich );
+ SwFmt( SwAttrPool& rPool, const String &rFmtNm, const sal_uInt16* pWhichRanges,
+ SwFmt *pDrvdFrm, sal_uInt16 nFmtWhich );
SwFmt( const SwFmt& rFmt );
public:
@@ -76,38 +76,38 @@ public:
SwFmt &operator=(const SwFmt&);
// for Querying of Writer-functions.
- USHORT Which() const { return nWhichId; }
+ sal_uInt16 Which() const { return nWhichId; }
virtual void Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue );
// Query format information.
- virtual BOOL GetInfo( SfxPoolItem& ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
// Copy attributes even among documents.
- void CopyAttrs( const SwFmt&, BOOL bReplace=TRUE );
+ void CopyAttrs( const SwFmt&, sal_Bool bReplace=sal_True );
// Delete all attributes that are not in rFmt.
void DelDiffs( const SfxItemSet& rSet );
void DelDiffs( const SwFmt& rFmt ) { DelDiffs( rFmt.GetAttrSet() ); }
// 0 is Default.
- BOOL SetDerivedFrom(SwFmt *pDerivedFrom = 0);
+ sal_Bool SetDerivedFrom(SwFmt *pDerivedFrom = 0);
// If bInParents is FALSE, search only in this format for attribute.
- inline const SfxPoolItem& GetFmtAttr( USHORT nWhich,
- BOOL bInParents = TRUE ) const;
- inline SfxItemState GetItemState( USHORT nWhich, BOOL bSrchInParent = TRUE,
+ inline const SfxPoolItem& GetFmtAttr( sal_uInt16 nWhich,
+ sal_Bool bInParents = sal_True ) const;
+ inline SfxItemState GetItemState( sal_uInt16 nWhich, sal_Bool bSrchInParent = sal_True,
const SfxPoolItem **ppItem = 0 ) const;
- virtual BOOL SetFmtAttr( const SfxPoolItem& rAttr );
- virtual BOOL SetFmtAttr( const SfxItemSet& rSet );
- virtual BOOL ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 = 0 );
+ virtual sal_Bool SetFmtAttr( const SfxPoolItem& rAttr );
+ virtual sal_Bool SetFmtAttr( const SfxItemSet& rSet );
+ virtual sal_Bool ResetFmtAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );
// Takes all hints from Delta-Array,
// returns count of deleted hints.
- virtual USHORT ResetAllFmtAttr();
+ virtual sal_uInt16 ResetAllFmtAttr();
inline SwFmt* DerivedFrom() const { return (SwFmt*)pRegisteredIn; }
- inline BOOL IsDefault() const { return DerivedFrom() == 0; }
+ inline sal_Bool IsDefault() const { return DerivedFrom() == 0; }
inline const String& GetName() const { return aFmtName; }
void SetName( const String& rNewName, sal_Bool bBroadcast=sal_False );
@@ -143,14 +143,14 @@ public:
IDocumentChartDataProviderAccess* getIDocumentChartDataProviderAccess();
// Get and set Pool style IDs.
- USHORT GetPoolFmtId() const { return nPoolFmtId; }
- void SetPoolFmtId( USHORT nId ) { nPoolFmtId = nId; }
+ sal_uInt16 GetPoolFmtId() const { return nPoolFmtId; }
+ void SetPoolFmtId( sal_uInt16 nId ) { nPoolFmtId = nId; }
// Get and set Help-IDs for document templates.
- USHORT GetPoolHelpId() const { return nPoolHelpId; }
- void SetPoolHelpId( USHORT nId ) { nPoolHelpId = nId; }
- BYTE GetPoolHlpFileId() const { return nPoolHlpFileId; }
- void SetPoolHlpFileId( BYTE nId ) { nPoolHlpFileId = nId; }
+ sal_uInt16 GetPoolHelpId() const { return nPoolHelpId; }
+ void SetPoolHelpId( sal_uInt16 nId ) { nPoolHelpId = nId; }
+ sal_uInt8 GetPoolHlpFileId() const { return nPoolHlpFileId; }
+ void SetPoolHlpFileId( sal_uInt8 nId ) { nPoolHlpFileId = nId; }
// Get attribute-description. Returns passed string.
void GetPresentation( SfxItemPresentation ePres,
@@ -158,140 +158,140 @@ public:
{ aSet.GetPresentation( ePres, eCoreMetric, ePresMetric, rText ); }
// Format-ID for reading/writing:
- void ResetWritten() { bWritten = FALSE; }
+ void ResetWritten() { bWritten = sal_False; }
// Query / set AutoFmt-flag.
- BOOL IsAuto() const { return bAutoFmt; }
- void SetAuto( BOOL bNew = FALSE ) { bAutoFmt = bNew; }
+ sal_Bool IsAuto() const { return bAutoFmt; }
+ void SetAuto( sal_Bool bNew = sal_False ) { bAutoFmt = bNew; }
// Query / set bAutoUpdateFmt-flag.
- BOOL IsAutoUpdateFmt() const { return bAutoUpdateFmt; }
- void SetAutoUpdateFmt( BOOL bNew = TRUE ) { bAutoUpdateFmt = bNew; }
+ sal_Bool IsAutoUpdateFmt() const { return bAutoUpdateFmt; }
+ void SetAutoUpdateFmt( sal_Bool bNew = sal_True ) { bAutoUpdateFmt = bNew; }
- BOOL IsFmtInDTOR() const { return bFmtInDTOR; }
+ sal_Bool IsFmtInDTOR() const { return bFmtInDTOR; }
// GetMethods: Bool indicates whether to search only in Set (FALSE)
// or also in Parents.
// If nothing is found the defaulted attribute is returned.
// Character-attributes - implemented in charatr.hxx
- inline const SvxPostureItem &GetPosture( BOOL = TRUE ) const;
- inline const SvxWeightItem &GetWeight( BOOL = TRUE ) const;
- inline const SvxShadowedItem &GetShadowed( BOOL = TRUE ) const;
- inline const SvxAutoKernItem &GetAutoKern( BOOL = TRUE ) const;
- inline const SvxWordLineModeItem &GetWordLineMode( BOOL = TRUE ) const;
- inline const SvxContourItem &GetContour( BOOL = TRUE ) const;
- inline const SvxKerningItem &GetKerning( BOOL = TRUE ) const;
- inline const SvxUnderlineItem &GetUnderline( BOOL = TRUE ) const;
- inline const SvxOverlineItem &GetOverline( BOOL = TRUE ) const;
- inline const SvxCrossedOutItem &GetCrossedOut( BOOL = TRUE ) const;
- inline const SvxFontHeightItem &GetSize( BOOL = TRUE ) const;
- inline const SvxPropSizeItem &GetPropSize( BOOL = TRUE ) const;
- inline const SvxFontItem &GetFont( BOOL = TRUE ) const;
- inline const SvxColorItem &GetColor( BOOL = TRUE ) const;
- inline const SvxCharSetColorItem &GetCharSetColor( BOOL = TRUE ) const;
- inline const SvxLanguageItem &GetLanguage( BOOL = TRUE ) const;
- inline const SvxEscapementItem &GetEscapement( BOOL = TRUE ) const;
- inline const SvxCaseMapItem &GetCaseMap( BOOL = TRUE ) const;
- inline const SvxNoHyphenItem &GetNoHyphenHere( BOOL = TRUE ) const;
- inline const SvxBlinkItem &GetBlink( BOOL = TRUE ) const;
- inline const SvxBrushItem &GetChrBackground( BOOL = TRUE ) const;
-
- inline const SvxFontItem &GetCJKFont( BOOL = TRUE ) const;
- inline const SvxFontHeightItem &GetCJKSize( BOOL = TRUE ) const;
- inline const SvxLanguageItem &GetCJKLanguage( BOOL = TRUE ) const;
- inline const SvxPostureItem &GetCJKPosture( BOOL = TRUE ) const;
- inline const SvxWeightItem &GetCJKWeight( BOOL = TRUE ) const;
- inline const SvxFontItem &GetCTLFont( BOOL = TRUE ) const;
- inline const SvxFontHeightItem &GetCTLSize( BOOL = TRUE ) const;
- inline const SvxLanguageItem &GetCTLLanguage( BOOL = TRUE ) const;
- inline const SvxPostureItem &GetCTLPosture( BOOL = TRUE ) const;
- inline const SvxWeightItem &GetCTLWeight( BOOL = TRUE ) const;
- inline const SfxBoolItem &GetWritingDirection( BOOL = TRUE ) const;
- inline const SvxEmphasisMarkItem &GetEmphasisMark( BOOL = TRUE ) const;
- inline const SvxTwoLinesItem &Get2Lines( BOOL = TRUE ) const;
- inline const SvxCharScaleWidthItem &GetCharScaleW( BOOL = TRUE ) const;
- inline const SvxCharRotateItem &GetCharRotate( BOOL = TRUE ) const;
- inline const SvxCharReliefItem &GetCharRelief( BOOL = TRUE ) const;
- inline const SvxCharHiddenItem &GetCharHidden( BOOL = TRUE ) const;
+ inline const SvxPostureItem &GetPosture( sal_Bool = sal_True ) const;
+ inline const SvxWeightItem &GetWeight( sal_Bool = sal_True ) const;
+ inline const SvxShadowedItem &GetShadowed( sal_Bool = sal_True ) const;
+ inline const SvxAutoKernItem &GetAutoKern( sal_Bool = sal_True ) const;
+ inline const SvxWordLineModeItem &GetWordLineMode( sal_Bool = sal_True ) const;
+ inline const SvxContourItem &GetContour( sal_Bool = sal_True ) const;
+ inline const SvxKerningItem &GetKerning( sal_Bool = sal_True ) const;
+ inline const SvxUnderlineItem &GetUnderline( sal_Bool = sal_True ) const;
+ inline const SvxOverlineItem &GetOverline( sal_Bool = sal_True ) const;
+ inline const SvxCrossedOutItem &GetCrossedOut( sal_Bool = sal_True ) const;
+ inline const SvxFontHeightItem &GetSize( sal_Bool = sal_True ) const;
+ inline const SvxPropSizeItem &GetPropSize( sal_Bool = sal_True ) const;
+ inline const SvxFontItem &GetFont( sal_Bool = sal_True ) const;
+ inline const SvxColorItem &GetColor( sal_Bool = sal_True ) const;
+ inline const SvxCharSetColorItem &GetCharSetColor( sal_Bool = sal_True ) const;
+ inline const SvxLanguageItem &GetLanguage( sal_Bool = sal_True ) const;
+ inline const SvxEscapementItem &GetEscapement( sal_Bool = sal_True ) const;
+ inline const SvxCaseMapItem &GetCaseMap( sal_Bool = sal_True ) const;
+ inline const SvxNoHyphenItem &GetNoHyphenHere( sal_Bool = sal_True ) const;
+ inline const SvxBlinkItem &GetBlink( sal_Bool = sal_True ) const;
+ inline const SvxBrushItem &GetChrBackground( sal_Bool = sal_True ) const;
+
+ inline const SvxFontItem &GetCJKFont( sal_Bool = sal_True ) const;
+ inline const SvxFontHeightItem &GetCJKSize( sal_Bool = sal_True ) const;
+ inline const SvxLanguageItem &GetCJKLanguage( sal_Bool = sal_True ) const;
+ inline const SvxPostureItem &GetCJKPosture( sal_Bool = sal_True ) const;
+ inline const SvxWeightItem &GetCJKWeight( sal_Bool = sal_True ) const;
+ inline const SvxFontItem &GetCTLFont( sal_Bool = sal_True ) const;
+ inline const SvxFontHeightItem &GetCTLSize( sal_Bool = sal_True ) const;
+ inline const SvxLanguageItem &GetCTLLanguage( sal_Bool = sal_True ) const;
+ inline const SvxPostureItem &GetCTLPosture( sal_Bool = sal_True ) const;
+ inline const SvxWeightItem &GetCTLWeight( sal_Bool = sal_True ) const;
+ inline const SfxBoolItem &GetWritingDirection( sal_Bool = sal_True ) const;
+ inline const SvxEmphasisMarkItem &GetEmphasisMark( sal_Bool = sal_True ) const;
+ inline const SvxTwoLinesItem &Get2Lines( sal_Bool = sal_True ) const;
+ inline const SvxCharScaleWidthItem &GetCharScaleW( sal_Bool = sal_True ) const;
+ inline const SvxCharRotateItem &GetCharRotate( sal_Bool = sal_True ) const;
+ inline const SvxCharReliefItem &GetCharRelief( sal_Bool = sal_True ) const;
+ inline const SvxCharHiddenItem &GetCharHidden( sal_Bool = sal_True ) const;
// Frame-attributes - implemented in frmatr.hxx.
- inline const SwFmtFillOrder &GetFillOrder( BOOL = TRUE ) const;
- inline const SwFmtFrmSize &GetFrmSize( BOOL = TRUE ) const;
- inline const SwFmtHeader &GetHeader( BOOL = TRUE ) const;
- inline const SwFmtFooter &GetFooter( BOOL = TRUE ) const;
- inline const SwFmtSurround &GetSurround( BOOL = TRUE ) const;
- inline const SwFmtHoriOrient &GetHoriOrient( BOOL = TRUE ) const;
- inline const SwFmtAnchor &GetAnchor( BOOL = TRUE ) const;
- inline const SwFmtCol &GetCol( BOOL = TRUE ) const;
- inline const SvxPaperBinItem &GetPaperBin( BOOL = TRUE ) const;
- inline const SvxLRSpaceItem &GetLRSpace( BOOL = TRUE ) const;
- inline const SvxULSpaceItem &GetULSpace( BOOL = TRUE ) const;
- inline const SwFmtCntnt &GetCntnt( BOOL = TRUE ) const;
- inline const SvxPrintItem &GetPrint( BOOL = TRUE ) const;
- inline const SvxOpaqueItem &GetOpaque( BOOL = TRUE ) const;
- inline const SvxProtectItem &GetProtect( BOOL = TRUE ) const;
- inline const SwFmtVertOrient &GetVertOrient( BOOL = TRUE ) const;
- inline const SvxBoxItem &GetBox( BOOL = TRUE ) const;
- inline const SvxFmtKeepItem &GetKeep( BOOL = TRUE ) const;
- inline const SvxBrushItem &GetBackground( BOOL = TRUE ) const;
- inline const SvxShadowItem &GetShadow( BOOL = TRUE ) const;
- inline const SwFmtPageDesc &GetPageDesc( BOOL = TRUE ) const;
- inline const SvxFmtBreakItem &GetBreak( BOOL = TRUE ) const;
- inline const SvxMacroItem &GetMacro( BOOL = TRUE ) const;
- inline const SwFmtURL &GetURL( BOOL = TRUE ) const;
- inline const SwFmtEditInReadonly &GetEditInReadonly( BOOL = TRUE ) const;
- inline const SwFmtLayoutSplit &GetLayoutSplit( BOOL = TRUE ) const;
- inline const SwFmtRowSplit &GetRowSplit( BOOL = TRUE ) const;
- inline const SwFmtChain &GetChain( BOOL = TRUE ) const;
- inline const SwFmtLineNumber &GetLineNumber( BOOL = TRUE ) const;
- inline const SwFmtFtnAtTxtEnd &GetFtnAtTxtEnd( BOOL = TRUE ) const;
- inline const SwFmtEndAtTxtEnd &GetEndAtTxtEnd( BOOL = TRUE ) const;
- inline const SwFmtNoBalancedColumns &GetBalancedColumns( BOOL = TRUE ) const;
- inline const SvxFrameDirectionItem &GetFrmDir( BOOL = TRUE ) const;
- inline const SwTextGridItem &GetTextGrid( BOOL = TRUE ) const;
- inline const SwHeaderAndFooterEatSpacingItem &GetHeaderAndFooterEatSpacing( BOOL = TRUE ) const;
+ inline const SwFmtFillOrder &GetFillOrder( sal_Bool = sal_True ) const;
+ inline const SwFmtFrmSize &GetFrmSize( sal_Bool = sal_True ) const;
+ inline const SwFmtHeader &GetHeader( sal_Bool = sal_True ) const;
+ inline const SwFmtFooter &GetFooter( sal_Bool = sal_True ) const;
+ inline const SwFmtSurround &GetSurround( sal_Bool = sal_True ) const;
+ inline const SwFmtHoriOrient &GetHoriOrient( sal_Bool = sal_True ) const;
+ inline const SwFmtAnchor &GetAnchor( sal_Bool = sal_True ) const;
+ inline const SwFmtCol &GetCol( sal_Bool = sal_True ) const;
+ inline const SvxPaperBinItem &GetPaperBin( sal_Bool = sal_True ) const;
+ inline const SvxLRSpaceItem &GetLRSpace( sal_Bool = sal_True ) const;
+ inline const SvxULSpaceItem &GetULSpace( sal_Bool = sal_True ) const;
+ inline const SwFmtCntnt &GetCntnt( sal_Bool = sal_True ) const;
+ inline const SvxPrintItem &GetPrint( sal_Bool = sal_True ) const;
+ inline const SvxOpaqueItem &GetOpaque( sal_Bool = sal_True ) const;
+ inline const SvxProtectItem &GetProtect( sal_Bool = sal_True ) const;
+ inline const SwFmtVertOrient &GetVertOrient( sal_Bool = sal_True ) const;
+ inline const SvxBoxItem &GetBox( sal_Bool = sal_True ) const;
+ inline const SvxFmtKeepItem &GetKeep( sal_Bool = sal_True ) const;
+ inline const SvxBrushItem &GetBackground( sal_Bool = sal_True ) const;
+ inline const SvxShadowItem &GetShadow( sal_Bool = sal_True ) const;
+ inline const SwFmtPageDesc &GetPageDesc( sal_Bool = sal_True ) const;
+ inline const SvxFmtBreakItem &GetBreak( sal_Bool = sal_True ) const;
+ inline const SvxMacroItem &GetMacro( sal_Bool = sal_True ) const;
+ inline const SwFmtURL &GetURL( sal_Bool = sal_True ) const;
+ inline const SwFmtEditInReadonly &GetEditInReadonly( sal_Bool = sal_True ) const;
+ inline const SwFmtLayoutSplit &GetLayoutSplit( sal_Bool = sal_True ) const;
+ inline const SwFmtRowSplit &GetRowSplit( sal_Bool = sal_True ) const;
+ inline const SwFmtChain &GetChain( sal_Bool = sal_True ) const;
+ inline const SwFmtLineNumber &GetLineNumber( sal_Bool = sal_True ) const;
+ inline const SwFmtFtnAtTxtEnd &GetFtnAtTxtEnd( sal_Bool = sal_True ) const;
+ inline const SwFmtEndAtTxtEnd &GetEndAtTxtEnd( sal_Bool = sal_True ) const;
+ inline const SwFmtNoBalancedColumns &GetBalancedColumns( sal_Bool = sal_True ) const;
+ inline const SvxFrameDirectionItem &GetFrmDir( sal_Bool = sal_True ) const;
+ inline const SwTextGridItem &GetTextGrid( sal_Bool = sal_True ) const;
+ inline const SwHeaderAndFooterEatSpacingItem &GetHeaderAndFooterEatSpacing( sal_Bool = sal_True ) const;
// #i18732#
- inline const SwFmtFollowTextFlow &GetFollowTextFlow(BOOL = TRUE) const;
+ inline const SwFmtFollowTextFlow &GetFollowTextFlow(sal_Bool = sal_True) const;
// #i28701#
- inline const SwFmtWrapInfluenceOnObjPos& GetWrapInfluenceOnObjPos(BOOL = TRUE) const;
+ inline const SwFmtWrapInfluenceOnObjPos& GetWrapInfluenceOnObjPos(sal_Bool = sal_True) const;
// Graphics-attributes - implemented in grfatr.hxx
- inline const SwMirrorGrf &GetMirrorGrf( BOOL = TRUE ) const;
- inline const SwCropGrf &GetCropGrf( BOOL = TRUE ) const;
- inline const SwRotationGrf &GetRotationGrf(BOOL = TRUE ) const;
- inline const SwLuminanceGrf &GetLuminanceGrf(BOOL = TRUE ) const;
- inline const SwContrastGrf &GetContrastGrf(BOOL = TRUE ) const;
- inline const SwChannelRGrf &GetChannelRGrf(BOOL = TRUE ) const;
- inline const SwChannelGGrf &GetChannelGGrf(BOOL = TRUE ) const;
- inline const SwChannelBGrf &GetChannelBGrf(BOOL = TRUE ) const;
- inline const SwGammaGrf &GetGammaGrf(BOOL = TRUE ) const;
- inline const SwInvertGrf &GetInvertGrf(BOOL = TRUE ) const;
- inline const SwTransparencyGrf &GetTransparencyGrf(BOOL = TRUE ) const;
- inline const SwDrawModeGrf &GetDrawModeGrf(BOOL = TRUE ) const;
+ inline const SwMirrorGrf &GetMirrorGrf( sal_Bool = sal_True ) const;
+ inline const SwCropGrf &GetCropGrf( sal_Bool = sal_True ) const;
+ inline const SwRotationGrf &GetRotationGrf(sal_Bool = sal_True ) const;
+ inline const SwLuminanceGrf &GetLuminanceGrf(sal_Bool = sal_True ) const;
+ inline const SwContrastGrf &GetContrastGrf(sal_Bool = sal_True ) const;
+ inline const SwChannelRGrf &GetChannelRGrf(sal_Bool = sal_True ) const;
+ inline const SwChannelGGrf &GetChannelGGrf(sal_Bool = sal_True ) const;
+ inline const SwChannelBGrf &GetChannelBGrf(sal_Bool = sal_True ) const;
+ inline const SwGammaGrf &GetGammaGrf(sal_Bool = sal_True ) const;
+ inline const SwInvertGrf &GetInvertGrf(sal_Bool = sal_True ) const;
+ inline const SwTransparencyGrf &GetTransparencyGrf(sal_Bool = sal_True ) const;
+ inline const SwDrawModeGrf &GetDrawModeGrf(sal_Bool = sal_True ) const;
// Paragraph-attributes - implemented in paratr.hxx.
- inline const SvxLineSpacingItem &GetLineSpacing( BOOL = TRUE ) const;
- inline const SvxAdjustItem &GetAdjust( BOOL = TRUE ) const;
- inline const SvxFmtSplitItem &GetSplit( BOOL = TRUE ) const;
- inline const SwRegisterItem &GetRegister( BOOL = TRUE ) const;
- inline const SwNumRuleItem &GetNumRule( BOOL = TRUE ) const;
- inline const SvxWidowsItem &GetWidows( BOOL = TRUE ) const;
- inline const SvxOrphansItem &GetOrphans( BOOL = TRUE ) const;
- inline const SvxTabStopItem &GetTabStops( BOOL = TRUE ) const;
- inline const SvxHyphenZoneItem &GetHyphenZone( BOOL = TRUE ) const;
- inline const SwFmtDrop &GetDrop( BOOL = TRUE ) const;
- inline const SvxScriptSpaceItem &GetScriptSpace(BOOL = TRUE) const;
- inline const SvxHangingPunctuationItem &GetHangingPunctuation(BOOL = TRUE) const;
- inline const SvxForbiddenRuleItem &GetForbiddenRule(BOOL = TRUE) const;
- inline const SvxParaVertAlignItem &GetParaVertAlign(BOOL = TRUE) const;
- inline const SvxParaGridItem &GetParaGrid(BOOL = TRUE) const;
- inline const SwParaConnectBorderItem &GetParaConnectBorder(BOOL = TRUE ) const;
+ inline const SvxLineSpacingItem &GetLineSpacing( sal_Bool = sal_True ) const;
+ inline const SvxAdjustItem &GetAdjust( sal_Bool = sal_True ) const;
+ inline const SvxFmtSplitItem &GetSplit( sal_Bool = sal_True ) const;
+ inline const SwRegisterItem &GetRegister( sal_Bool = sal_True ) const;
+ inline const SwNumRuleItem &GetNumRule( sal_Bool = sal_True ) const;
+ inline const SvxWidowsItem &GetWidows( sal_Bool = sal_True ) const;
+ inline const SvxOrphansItem &GetOrphans( sal_Bool = sal_True ) const;
+ inline const SvxTabStopItem &GetTabStops( sal_Bool = sal_True ) const;
+ inline const SvxHyphenZoneItem &GetHyphenZone( sal_Bool = sal_True ) const;
+ inline const SwFmtDrop &GetDrop( sal_Bool = sal_True ) const;
+ inline const SvxScriptSpaceItem &GetScriptSpace(sal_Bool = sal_True) const;
+ inline const SvxHangingPunctuationItem &GetHangingPunctuation(sal_Bool = sal_True) const;
+ inline const SvxForbiddenRuleItem &GetForbiddenRule(sal_Bool = sal_True) const;
+ inline const SvxParaVertAlignItem &GetParaVertAlign(sal_Bool = sal_True) const;
+ inline const SvxParaGridItem &GetParaGrid(sal_Bool = sal_True) const;
+ inline const SwParaConnectBorderItem &GetParaConnectBorder(sal_Bool = sal_True ) const;
// TableBox attributes - implemented in cellatr.hxx.
- inline const SwTblBoxNumFormat &GetTblBoxNumFmt( BOOL = TRUE ) const;
- inline const SwTblBoxFormula &GetTblBoxFormula( BOOL = TRUE ) const;
- inline const SwTblBoxValue &GetTblBoxValue( BOOL = TRUE ) const;
+ inline const SwTblBoxNumFormat &GetTblBoxNumFmt( sal_Bool = sal_True ) const;
+ inline const SwTblBoxFormula &GetTblBoxFormula( sal_Bool = sal_True ) const;
+ inline const SwTblBoxValue &GetTblBoxValue( sal_Bool = sal_True ) const;
/** SwFmt::IsBackgroundTransparent
@@ -320,8 +320,8 @@ public:
// --------------- inline Implementations ------------------------
-inline const SfxPoolItem& SwFmt::GetFmtAttr( USHORT nWhich,
- BOOL bInParents ) const
+inline const SfxPoolItem& SwFmt::GetFmtAttr( sal_uInt16 nWhich,
+ sal_Bool bInParents ) const
{
return aSet.Get( nWhich, bInParents );
}
@@ -333,7 +333,7 @@ inline void SwFmt::SetName( const sal_Char* pNewName,
SetName( aTmp, bBroadcast );
}
-inline SfxItemState SwFmt::GetItemState( USHORT nWhich, BOOL bSrchInParent,
+inline SfxItemState SwFmt::GetItemState( sal_uInt16 nWhich, sal_Bool bSrchInParent,
const SfxPoolItem **ppItem ) const
{
return aSet.GetItemState( nWhich, bSrchInParent, ppItem );
diff --git a/sw/inc/frmatr.hxx b/sw/inc/frmatr.hxx
index 87c7759e5bff..b0f5afd28c4b 100644
--- a/sw/inc/frmatr.hxx
+++ b/sw/inc/frmatr.hxx
@@ -35,60 +35,60 @@
// Implementation of FrameAttribute methods of SwAttrSet.
-inline const SvxPaperBinItem &SwAttrSet::GetPaperBin(BOOL bInP) const
+inline const SvxPaperBinItem &SwAttrSet::GetPaperBin(sal_Bool bInP) const
{ return (const SvxPaperBinItem&)Get( RES_PAPER_BIN,bInP); }
-inline const SvxLRSpaceItem &SwAttrSet::GetLRSpace(BOOL bInP) const
+inline const SvxLRSpaceItem &SwAttrSet::GetLRSpace(sal_Bool bInP) const
{ return (const SvxLRSpaceItem&)Get( RES_LR_SPACE,bInP); }
-inline const SvxULSpaceItem &SwAttrSet::GetULSpace(BOOL bInP) const
+inline const SvxULSpaceItem &SwAttrSet::GetULSpace(sal_Bool bInP) const
{ return (const SvxULSpaceItem&)Get( RES_UL_SPACE,bInP); }
-inline const SvxPrintItem &SwAttrSet::GetPrint(BOOL bInP) const
+inline const SvxPrintItem &SwAttrSet::GetPrint(sal_Bool bInP) const
{ return (const SvxPrintItem&)Get( RES_PRINT,bInP); }
-inline const SvxOpaqueItem &SwAttrSet::GetOpaque(BOOL bInP) const
+inline const SvxOpaqueItem &SwAttrSet::GetOpaque(sal_Bool bInP) const
{ return (const SvxOpaqueItem&)Get( RES_OPAQUE,bInP); }
-inline const SvxProtectItem &SwAttrSet::GetProtect(BOOL bInP) const
+inline const SvxProtectItem &SwAttrSet::GetProtect(sal_Bool bInP) const
{ return (const SvxProtectItem&)Get( RES_PROTECT,bInP); }
-inline const SvxBoxItem &SwAttrSet::GetBox(BOOL bInP) const
+inline const SvxBoxItem &SwAttrSet::GetBox(sal_Bool bInP) const
{ return (const SvxBoxItem&)Get( RES_BOX,bInP); }
-inline const SvxFmtKeepItem &SwAttrSet::GetKeep(BOOL bInP) const
+inline const SvxFmtKeepItem &SwAttrSet::GetKeep(sal_Bool bInP) const
{ return (const SvxFmtKeepItem&)Get( RES_KEEP,bInP); }
-inline const SvxBrushItem &SwAttrSet::GetBackground(BOOL bInP) const
+inline const SvxBrushItem &SwAttrSet::GetBackground(sal_Bool bInP) const
{ return (const SvxBrushItem&)Get( RES_BACKGROUND,bInP); }
-inline const SvxShadowItem &SwAttrSet::GetShadow(BOOL bInP) const
+inline const SvxShadowItem &SwAttrSet::GetShadow(sal_Bool bInP) const
{ return (const SvxShadowItem&)Get( RES_SHADOW,bInP); }
-inline const SvxFmtBreakItem &SwAttrSet::GetBreak(BOOL bInP) const
+inline const SvxFmtBreakItem &SwAttrSet::GetBreak(sal_Bool bInP) const
{ return (const SvxFmtBreakItem&)Get( RES_BREAK,bInP); }
-inline const SvxMacroItem &SwAttrSet::GetMacro(BOOL bInP) const
+inline const SvxMacroItem &SwAttrSet::GetMacro(sal_Bool bInP) const
{ return (const SvxMacroItem&)Get( RES_FRMMACRO,bInP); }
-inline const SvxFrameDirectionItem &SwAttrSet::GetFrmDir(BOOL bInP) const
+inline const SvxFrameDirectionItem &SwAttrSet::GetFrmDir(sal_Bool bInP) const
{ return (const SvxFrameDirectionItem&)Get( RES_FRAMEDIR,bInP); }
// Implementation of FrameAttribute methods of SwFmt.
-inline const SvxPaperBinItem &SwFmt::GetPaperBin(BOOL bInP) const
+inline const SvxPaperBinItem &SwFmt::GetPaperBin(sal_Bool bInP) const
{ return aSet.GetPaperBin(bInP); }
-inline const SvxLRSpaceItem &SwFmt::GetLRSpace(BOOL bInP) const
+inline const SvxLRSpaceItem &SwFmt::GetLRSpace(sal_Bool bInP) const
{ return aSet.GetLRSpace(bInP); }
-inline const SvxULSpaceItem &SwFmt::GetULSpace(BOOL bInP) const
+inline const SvxULSpaceItem &SwFmt::GetULSpace(sal_Bool bInP) const
{ return aSet.GetULSpace(bInP); }
-inline const SvxPrintItem &SwFmt::GetPrint(BOOL bInP) const
+inline const SvxPrintItem &SwFmt::GetPrint(sal_Bool bInP) const
{ return aSet.GetPrint(bInP); }
-inline const SvxOpaqueItem &SwFmt::GetOpaque(BOOL bInP) const
+inline const SvxOpaqueItem &SwFmt::GetOpaque(sal_Bool bInP) const
{ return aSet.GetOpaque(bInP); }
-inline const SvxProtectItem &SwFmt::GetProtect(BOOL bInP) const
+inline const SvxProtectItem &SwFmt::GetProtect(sal_Bool bInP) const
{ return aSet.GetProtect(bInP); }
-inline const SvxBoxItem &SwFmt::GetBox(BOOL bInP) const
+inline const SvxBoxItem &SwFmt::GetBox(sal_Bool bInP) const
{ return aSet.GetBox(bInP); }
-inline const SvxFmtKeepItem &SwFmt::GetKeep(BOOL bInP) const
+inline const SvxFmtKeepItem &SwFmt::GetKeep(sal_Bool bInP) const
{ return aSet.GetKeep(bInP); }
-inline const SvxBrushItem &SwFmt::GetBackground(BOOL bInP) const
+inline const SvxBrushItem &SwFmt::GetBackground(sal_Bool bInP) const
{ return aSet.GetBackground(bInP); }
-inline const SvxShadowItem &SwFmt::GetShadow(BOOL bInP) const
+inline const SvxShadowItem &SwFmt::GetShadow(sal_Bool bInP) const
{ return aSet.GetShadow(bInP); }
-inline const SvxFmtBreakItem &SwFmt::GetBreak(BOOL bInP) const
+inline const SvxFmtBreakItem &SwFmt::GetBreak(sal_Bool bInP) const
{ return aSet.GetBreak(bInP); }
-inline const SvxMacroItem &SwFmt::GetMacro(BOOL bInP) const
+inline const SvxMacroItem &SwFmt::GetMacro(sal_Bool bInP) const
{ return aSet.GetMacro(bInP); }
-inline const SvxFrameDirectionItem &SwFmt::GetFrmDir(BOOL bInP) const
+inline const SvxFrameDirectionItem &SwFmt::GetFrmDir(sal_Bool bInP) const
{ return aSet.GetFrmDir(bInP); }
#endif //_FRMATR_HXX
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 0366cf1fb6e9..229d482b34e1 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -31,6 +31,7 @@
#include <com/sun/star/text/PositionLayoutDir.hpp>
#include <cppuhelper/weakref.hxx>
+#include <tools/gen.hxx>
#include <format.hxx>
@@ -56,15 +57,15 @@ class SW_DLLPUBLIC SwFrmFmt: public SwFmt
protected:
SwFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
- SwFrmFmt *pDrvdFrm, USHORT nFmtWhich = RES_FRMFMT,
- const USHORT* pWhichRange = 0 )
+ SwFrmFmt *pDrvdFrm, sal_uInt16 nFmtWhich = RES_FRMFMT,
+ const sal_uInt16* pWhichRange = 0 )
: SwFmt( rPool, pFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange),
pDrvdFrm, nFmtWhich )
{}
SwFrmFmt( SwAttrPool& rPool, const String &rFmtNm,
- SwFrmFmt *pDrvdFrm, USHORT nFmtWhich = RES_FRMFMT,
- const USHORT* pWhichRange = 0 )
+ SwFrmFmt *pDrvdFrm, sal_uInt16 nFmtWhich = RES_FRMFMT,
+ const sal_uInt16* pWhichRange = 0 )
: SwFmt( rPool, rFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange),
pDrvdFrm, nFmtWhich )
{}
@@ -93,9 +94,9 @@ public:
// Returns the real size of the frame - or an empty rectangle
// if no layout exists.
// If pPoint is given, look for the frame closest to it.
- SwRect FindLayoutRect( const BOOL bPrtArea = FALSE,
+ SwRect FindLayoutRect( const sal_Bool bPrtArea = sal_False,
const Point* pPoint = 0,
- const BOOL bCalcFrm = FALSE ) const;
+ const sal_Bool bCalcFrm = sal_False ) const;
// Searches SdrObject. SdrObjUserCall is client of the format.
// The UserCall knows its SdrObject.
@@ -115,7 +116,7 @@ public:
const SdrObject *FindRealSdrObject() const
{ return ((SwFrmFmt*)this)->FindRealSdrObject(); }
- BOOL IsLowerOf( const SwFrmFmt& rFmt ) const;
+ sal_Bool IsLowerOf( const SwFrmFmt& rFmt ) const;
enum tLayoutDir
{
@@ -150,6 +151,11 @@ class SW_DLLPUBLIC SwFlyFrmFmt: public SwFrmFmt
friend class SwDoc;
// Both not existent.
+ // it stores the previous position of Prt rectangle from RequestObjectResize
+ // so it can be used to move frames of non-resizable objects to align them correctly
+ // when they get borders (this is done in SwWrtShell::CalcAndGetScale)
+ Point m_aLastFlyFrmPrtRectPos;
+
SwFlyFrmFmt( const SwFlyFrmFmt &rCpy );
SwFlyFrmFmt &operator=( const SwFlyFrmFmt &rCpy );
@@ -171,14 +177,14 @@ public:
virtual void MakeFrms();
SwFlyFrm* GetFrm( const Point* pDocPos = 0,
- const BOOL bCalcFrm = FALSE ) const;
+ const sal_Bool bCalcFrm = sal_False ) const;
SwAnchoredObject* GetAnchoredObj( const Point* pDocPos = 0,
- const BOOL bCalcFrm = FALSE ) const;
+ const sal_Bool bCalcFrm = sal_False ) const;
virtual Graphic MakeGraphic( ImageMap* pMap = NULL );
- virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
const String GetObjTitle() const;
void SetObjTitle( const String& rTitle,
@@ -213,6 +219,9 @@ public:
*/
sal_Bool IsBackgroundBrushInherited() const;
+ const Point & GetLastFlyFrmPrtRectPos() const { return m_aLastFlyFrmPrtRectPos; }
+ void SetLastFlyFrmPrtRectPos( const Point &rPoint ) { m_aLastFlyFrmPrtRectPos = rPoint; }
+
DECL_FIXEDMEMPOOL_NEWDEL(SwFlyFrmFmt)
};
diff --git a/sw/inc/ftnidx.hxx b/sw/inc/ftnidx.hxx
index 783f349363ca..e2d6fcfd1138 100644
--- a/sw/inc/ftnidx.hxx
+++ b/sw/inc/ftnidx.hxx
@@ -53,7 +53,7 @@ public:
void UpdateFtn( const SwNodeIndex& rStt ); // Update all from pos.
void UpdateAllFtn(); // Update all footnotes.
- SwTxtFtn* SeekEntry( const SwNodeIndex& rIdx, USHORT* pPos = 0 ) const;
+ SwTxtFtn* SeekEntry( const SwNodeIndex& rIdx, sal_uInt16* pPos = 0 ) const;
};
@@ -70,8 +70,8 @@ public:
static const SwSectionNode* FindSectNdWithEndAttr(
const SwTxtFtn& rTxtFtn );
- USHORT GetNumber( const SwTxtFtn& rTxtFtn, const SwSectionNode& rNd );
- USHORT ChkNumber( const SwTxtFtn& rTxtFtn );
+ sal_uInt16 GetNumber( const SwTxtFtn& rTxtFtn, const SwSectionNode& rNd );
+ sal_uInt16 ChkNumber( const SwTxtFtn& rTxtFtn );
};
diff --git a/sw/inc/ftninfo.hxx b/sw/inc/ftninfo.hxx
index 1376fb75c102..adfeda9975d2 100644
--- a/sw/inc/ftninfo.hxx
+++ b/sw/inc/ftninfo.hxx
@@ -48,7 +48,7 @@ protected:
bool m_bEndNote;
public:
SvxNumberType aFmt;
- USHORT nFtnOffset;
+ sal_uInt16 nFtnOffset;
void ChgPageDesc( SwPageDesc *pDesc );
SwPageDesc *GetPageDesc( SwDoc &rDoc ) const;
@@ -68,7 +68,7 @@ public:
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
SwEndNoteInfo & operator=(const SwEndNoteInfo&);
- BOOL operator==( const SwEndNoteInfo &rInf ) const;
+ sal_Bool operator==( const SwEndNoteInfo &rInf ) const;
SwEndNoteInfo( SwTxtFmtColl *pTxtColl = 0);
SwEndNoteInfo(const SwEndNoteInfo&);
@@ -105,7 +105,7 @@ public:
SwFtnInfo& operator=(const SwFtnInfo&);
- BOOL operator==( const SwFtnInfo &rInf ) const;
+ sal_Bool operator==( const SwFtnInfo &rInf ) const;
SwFtnInfo(SwTxtFmtColl* pTxtColl = 0);
SwFtnInfo(const SwFtnInfo&);
diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx
index dc15444fd377..4626b1839001 100644
--- a/sw/inc/grfatr.hxx
+++ b/sw/inc/grfatr.hxx
@@ -53,11 +53,11 @@ RES_MIRROR_GRAPH_END
class SW_DLLPUBLIC SwMirrorGrf : public SfxEnumItem
{
- BOOL bGrfToggle; // Flip graphics on even pages.
+ sal_Bool bGrfToggle; // Flip graphics on even pages.
public:
SwMirrorGrf( MirrorGraph eMiro = RES_MIRROR_GRAPH_DONT )
- : SfxEnumItem( RES_GRFATR_MIRRORGRF, static_cast< USHORT >(eMiro) ), bGrfToggle( sal_False )
+ : SfxEnumItem( RES_GRFATR_MIRRORGRF, static_cast< sal_uInt16 >(eMiro) ), bGrfToggle( sal_False )
{}
SwMirrorGrf( const SwMirrorGrf &rMirrorGrf )
: SfxEnumItem( RES_GRFATR_MIRRORGRF, rMirrorGrf.GetValue()),
@@ -68,7 +68,7 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
// pure virtual methods of SfxEnumItem
- virtual USHORT GetValueCount() const;
+ virtual sal_uInt16 GetValueCount() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -77,9 +77,9 @@ public:
const IntlWrapper* pIntl = 0 ) const;
virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ sal_uInt8 nMemberId = 0 );
inline SwMirrorGrf& operator=( const SwMirrorGrf& rMirrorGrf )
{
@@ -88,8 +88,8 @@ public:
return *this;
}
- inline BOOL IsGrfToggle() const { return bGrfToggle; }
- inline void SetGrfToggle( BOOL bNew ) { bGrfToggle = bNew; }
+ inline sal_Bool IsGrfToggle() const { return bGrfToggle; }
+ inline void SetGrfToggle( sal_Bool bNew ) { bGrfToggle = bNew; }
};
@@ -129,9 +129,9 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ sal_uInt8 nMemberId = 0 );
void SetUnrotatedSize( const Size& rSz ) { aUnrotatedSize = rSz; }
const Size& GetUnrotatedSize() const { return aUnrotatedSize; }
@@ -172,7 +172,7 @@ public:
class SwChannelGrf : public SfxInt16Item
{
protected:
- SwChannelGrf( sal_Int16 nVal, USHORT nWhichL )
+ SwChannelGrf( sal_Int16 nVal, sal_uInt16 nWhichL )
: SfxInt16Item( nWhichL, nVal )
{}
@@ -238,9 +238,9 @@ public:
const IntlWrapper* pIntl = 0 ) const;
virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ sal_uInt8 nMemberId = 0 );
const double& GetValue() const { return nValue; }
@@ -278,15 +278,15 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ sal_uInt8 nMemberId = 0 );
};
class SW_DLLPUBLIC SwDrawModeGrf : public SfxEnumItem
{
public:
- SwDrawModeGrf( USHORT nMode = 0 )
+ SwDrawModeGrf( sal_uInt16 nMode = 0 )
: SfxEnumItem( RES_GRFATR_DRAWMODE, nMode )
{}
@@ -294,7 +294,7 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
// pure virtual methods of SfxEnumItem
- virtual USHORT GetValueCount() const;
+ virtual sal_uInt16 GetValueCount() const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
SfxMapUnit ePresMetric,
@@ -302,9 +302,9 @@ public:
const IntlWrapper* pIntl = 0 ) const;
virtual bool QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ sal_uInt8 nMemberId = 0 );
};
@@ -313,58 +313,58 @@ public:
* Implementation of graphics attributes methods of SwAttr
******************************************************************************/
-inline const SwMirrorGrf &SwAttrSet::GetMirrorGrf(BOOL bInP) const
+inline const SwMirrorGrf &SwAttrSet::GetMirrorGrf(sal_Bool bInP) const
{ return (const SwMirrorGrf&)Get( RES_GRFATR_MIRRORGRF,bInP); }
-inline const SwCropGrf &SwAttrSet::GetCropGrf(BOOL bInP) const
+inline const SwCropGrf &SwAttrSet::GetCropGrf(sal_Bool bInP) const
{ return (const SwCropGrf&)Get( RES_GRFATR_CROPGRF,bInP); }
-inline const SwRotationGrf &SwAttrSet::GetRotationGrf(BOOL bInP) const
+inline const SwRotationGrf &SwAttrSet::GetRotationGrf(sal_Bool bInP) const
{ return (const SwRotationGrf&)Get( RES_GRFATR_ROTATION,bInP); }
-inline const SwLuminanceGrf &SwAttrSet::GetLuminanceGrf(BOOL bInP) const
+inline const SwLuminanceGrf &SwAttrSet::GetLuminanceGrf(sal_Bool bInP) const
{ return (const SwLuminanceGrf&)Get( RES_GRFATR_LUMINANCE,bInP); }
-inline const SwContrastGrf &SwAttrSet::GetContrastGrf(BOOL bInP) const
+inline const SwContrastGrf &SwAttrSet::GetContrastGrf(sal_Bool bInP) const
{ return (const SwContrastGrf&)Get( RES_GRFATR_CONTRAST,bInP); }
-inline const SwChannelRGrf &SwAttrSet::GetChannelRGrf(BOOL bInP) const
+inline const SwChannelRGrf &SwAttrSet::GetChannelRGrf(sal_Bool bInP) const
{ return (const SwChannelRGrf&)Get( RES_GRFATR_CHANNELR,bInP); }
-inline const SwChannelGGrf &SwAttrSet::GetChannelGGrf(BOOL bInP) const
+inline const SwChannelGGrf &SwAttrSet::GetChannelGGrf(sal_Bool bInP) const
{ return (const SwChannelGGrf&)Get( RES_GRFATR_CHANNELG,bInP); }
-inline const SwChannelBGrf &SwAttrSet::GetChannelBGrf(BOOL bInP) const
+inline const SwChannelBGrf &SwAttrSet::GetChannelBGrf(sal_Bool bInP) const
{ return (const SwChannelBGrf&)Get( RES_GRFATR_CHANNELB,bInP); }
-inline const SwGammaGrf &SwAttrSet::GetGammaGrf(BOOL bInP) const
+inline const SwGammaGrf &SwAttrSet::GetGammaGrf(sal_Bool bInP) const
{ return (const SwGammaGrf&)Get( RES_GRFATR_GAMMA,bInP); }
-inline const SwInvertGrf &SwAttrSet::GetInvertGrf(BOOL bInP) const
+inline const SwInvertGrf &SwAttrSet::GetInvertGrf(sal_Bool bInP) const
{ return (const SwInvertGrf&)Get( RES_GRFATR_INVERT,bInP); }
-inline const SwTransparencyGrf &SwAttrSet::GetTransparencyGrf(BOOL bInP) const
+inline const SwTransparencyGrf &SwAttrSet::GetTransparencyGrf(sal_Bool bInP) const
{ return (const SwTransparencyGrf&)Get( RES_GRFATR_TRANSPARENCY,bInP); }
-inline const SwDrawModeGrf &SwAttrSet::GetDrawModeGrf(BOOL bInP) const
+inline const SwDrawModeGrf &SwAttrSet::GetDrawModeGrf(sal_Bool bInP) const
{ return (const SwDrawModeGrf&)Get( RES_GRFATR_DRAWMODE,bInP); }
/******************************************************************************
* Implementation of graphics attributes methods of SwFmt
******************************************************************************/
-inline const SwMirrorGrf &SwFmt::GetMirrorGrf(BOOL bInP) const
+inline const SwMirrorGrf &SwFmt::GetMirrorGrf(sal_Bool bInP) const
{ return aSet.GetMirrorGrf(bInP); }
-inline const SwCropGrf &SwFmt::GetCropGrf(BOOL bInP) const
+inline const SwCropGrf &SwFmt::GetCropGrf(sal_Bool bInP) const
{ return aSet.GetCropGrf(bInP); }
-inline const SwRotationGrf &SwFmt::GetRotationGrf(BOOL bInP) const
+inline const SwRotationGrf &SwFmt::GetRotationGrf(sal_Bool bInP) const
{ return aSet.GetRotationGrf(bInP); }
-inline const SwLuminanceGrf &SwFmt::GetLuminanceGrf(BOOL bInP) const
+inline const SwLuminanceGrf &SwFmt::GetLuminanceGrf(sal_Bool bInP) const
{ return aSet.GetLuminanceGrf( bInP); }
-inline const SwContrastGrf &SwFmt::GetContrastGrf(BOOL bInP) const
+inline const SwContrastGrf &SwFmt::GetContrastGrf(sal_Bool bInP) const
{ return aSet.GetContrastGrf( bInP); }
-inline const SwChannelRGrf &SwFmt::GetChannelRGrf(BOOL bInP) const
+inline const SwChannelRGrf &SwFmt::GetChannelRGrf(sal_Bool bInP) const
{ return aSet.GetChannelRGrf( bInP); }
-inline const SwChannelGGrf &SwFmt::GetChannelGGrf(BOOL bInP) const
+inline const SwChannelGGrf &SwFmt::GetChannelGGrf(sal_Bool bInP) const
{ return aSet.GetChannelGGrf( bInP); }
-inline const SwChannelBGrf &SwFmt::GetChannelBGrf(BOOL bInP) const
+inline const SwChannelBGrf &SwFmt::GetChannelBGrf(sal_Bool bInP) const
{ return aSet.GetChannelBGrf( bInP); }
-inline const SwGammaGrf &SwFmt::GetGammaGrf(BOOL bInP) const
+inline const SwGammaGrf &SwFmt::GetGammaGrf(sal_Bool bInP) const
{ return aSet.GetGammaGrf( bInP); }
-inline const SwInvertGrf &SwFmt::GetInvertGrf(BOOL bInP) const
+inline const SwInvertGrf &SwFmt::GetInvertGrf(sal_Bool bInP) const
{ return aSet.GetInvertGrf( bInP); }
-inline const SwTransparencyGrf &SwFmt::GetTransparencyGrf(BOOL bInP) const
+inline const SwTransparencyGrf &SwFmt::GetTransparencyGrf(sal_Bool bInP) const
{ return aSet.GetTransparencyGrf( bInP); }
-inline const SwDrawModeGrf &SwFmt::GetDrawModeGrf(BOOL bInP) const
+inline const SwDrawModeGrf &SwFmt::GetDrawModeGrf(sal_Bool bInP) const
{ return aSet.GetDrawModeGrf(bInP); }
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index e74011e74548..90fa81818f9f 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -25,962 +25,971 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _SOLAR_HRC
-#include <svl/solar.hrc>
-#endif
-
-#define HID_BASE HID_APP_START
-
-#define HID_BIB_BASE (HID_BASE + 1)
-#define HID_DBSEL (HID_BASE + 2)
-#define HID_DBEDIT (HID_BASE + 3)
-#define HID_PRINT_OPTION (HID_BASE + 4)
-#define HID_MERGE_PRINTMONITOR (HID_BASE + 5)
-#define HID_FLD_INPUT (HID_BASE + 6)
-#define HID_CONFIG_MISC (HID_BASE + 7)
-#define HID_CONFIG_PATH (HID_BASE + 8)
-#define HID_CONFIG_TB (HID_BASE + 9)
-#define HID_PG_FOOTNOTE (HID_BASE + 10)
-#define HID_FORMAT_GRAPHIC (HID_BASE + 11)
-#define HID_FILTERSTATUS (HID_BASE + 12)
-#define HID_DOCINFO_EDT (HID_BASE + 13)
-#define HID_DBLOGON (HID_BASE + 14)
-#define HID_MAC_ASSIGN (HID_BASE + 15)
-#define HID_CONFIG_MN (HID_BASE + 16)
-#define HID_PAPERSIZE (HID_BASE + 17)
-#define HID_PASSWD (HID_BASE + 18)
-#define HID_SPELLING_OPTIONS (HID_BASE + 19)
-#define HID_HYPHENATE_OPTIONS (HID_BASE + 20)
-#define HID_FORMAT_COLUMN (HID_BASE + 21)
-#define HID_CONFIG_SAVE (HID_BASE + 22)
-#define HID_NUM_NAMES (HID_BASE + 23)
-#define HID_SYMBOL_SELECT (HID_BASE + 24)
-#define HID_CONFIG_KY (HID_BASE + 25)
-#define HID_LINKEDIT (HID_BASE + 26)
-#define HID_GRAPHIC_PREVIEW (HID_BASE + 28)
-#define HID_DICTIONARY (HID_BASE + 29)
-#define HID_SET_STYLE (HID_BASE + 30)
-#define HID_RIBBONBAR (HID_BASE + 31)
-#define HID_STATUSLINE (HID_BASE + 32)
-#define HID_DOCBAR (HID_BASE + 33)
-#define HID_VRULER (HID_BASE + 34)
-#define HID_MAKRO_WINDOW (HID_BASE + 35)
-#define HID_ENVELOP_FORMAT (HID_BASE + 37)
-#define HID_ENVELOP_PRINTER (HID_BASE + 38)
-
-#define HID_HEADER_FOOTER_DLG (HID_BASE + 39)
-#define HID_GRID_DLG (HID_BASE + 40)
-#define HID_USER_ADDRESS_DLG (HID_BASE + 41)
-#define HID_SELECT_FAX_DLG (HID_BASE + 42)
-
-#define HID_LABEL_FORMAT (HID_BASE + 43)
-#define HID_BRSORT (HID_BASE + 44)
-#define HID_BRSEEK (HID_BASE + 45)
-#define HID_BRCFG (HID_BASE + 46)
-
-#define HID_FORMEDT_CONTENT (HID_BASE + 47)
-#define HID_FORMEDT_USER (HID_BASE + 48)
-#define HID_FORMEDT_INDEX (HID_BASE + 49)
-
-#define HID_SCRL_PAGEUP (HID_BASE + 50)
-#define HID_SCRL_PAGEDOWN (HID_BASE + 51)
-
-#define HID_DRAW_WIN (HID_BASE + 52)
-#define HID_EDIT_WIN (HID_BASE + 53)
-
-#define HID_INSERT_CTRL (HID_BASE + 54) // Insert TbxControl.
-#define HID_INSERT_OBJ_CTRL (HID_BASE + 55)
-#define HID_INSERT_FIELD_CTRL (HID_BASE + 56)
-
-#define HID_SOURCEVIEW (HID_BASE + 57)
-#define HID_TBL_OPT_CTRL (HID_BASE + 58)
-#define HID_AUTOFORMAT_CLB (HID_BASE + 59)
-
-#define HID_SCRL_NAVI (HID_BASE + 60)
-#define HID_NAVI_DRAG_HYP (HID_BASE + 61)
-#define HID_NAVI_DRAG_LINK (HID_BASE + 62)
-#define HID_NAVI_DRAG_COPY (HID_BASE + 63)
-#define HID_NAVI_OUTLINES (HID_BASE + 64)
-
-#define HID_AUTOFORMAT_EXEC (HID_BASE + 65)
-#define HID_AUTOFORMAT_CLOSE (HID_BASE + 66)
-
-#define HID_PAGEPREVIEW (HID_BASE + 67)
-#define HID_SOURCE_EDITWIN (HID_BASE + 68)
+#include "swcommands.h"
+#include <svx/svxcommands.h>
+#include <sfx2/sfxcommands.h>
+
+#define HID_BIB_BASE "SW_HID_BIB_BASE"
+#define HID_DBSEL "SW_HID_DBSEL"
+#define HID_DBEDIT "SW_HID_DBEDIT"
+#define HID_PRINT_OPTION "SW_HID_PRINT_OPTION"
+#define HID_MERGE_PRINTMONITOR "SW_HID_MERGE_PRINTMONITOR"
+#define HID_FLD_INPUT "SW_HID_FLD_INPUT"
+#define HID_CONFIG_MISC "SW_HID_CONFIG_MISC"
+#define HID_CONFIG_PATH "SW_HID_CONFIG_PATH"
+#define HID_CONFIG_TB "SW_HID_CONFIG_TB"
+#define HID_PG_FOOTNOTE "SW_HID_PG_FOOTNOTE"
+#define HID_FORMAT_GRAPHIC "SW_HID_FORMAT_GRAPHIC"
+#define HID_FILTERSTATUS "SW_HID_FILTERSTATUS"
+#define HID_DOCINFO_EDT "SW_HID_DOCINFO_EDT"
+#define HID_DBLOGON "SW_HID_DBLOGON"
+#define HID_MAC_ASSIGN "SW_HID_MAC_ASSIGN"
+#define HID_CONFIG_MN "SW_HID_CONFIG_MN"
+#define HID_PAPERSIZE "SW_HID_PAPERSIZE"
+#define HID_PASSWD "SW_HID_PASSWD"
+#define HID_SPELLING_OPTIONS "SW_HID_SPELLING_OPTIONS"
+#define HID_HYPHENATE_OPTIONS "SW_HID_HYPHENATE_OPTIONS"
+#define HID_FORMAT_COLUMN "SW_HID_FORMAT_COLUMN"
+#define HID_CONFIG_SAVE "SW_HID_CONFIG_SAVE"
+#define HID_NUM_NAMES "SW_HID_NUM_NAMES"
+#define HID_SYMBOL_SELECT "SW_HID_SYMBOL_SELECT"
+#define HID_CONFIG_KY "SW_HID_CONFIG_KY"
+#define HID_LINKEDIT "SW_HID_LINKEDIT"
+#define HID_GRAPHIC_PREVIEW "SW_HID_GRAPHIC_PREVIEW"
+#define HID_DICTIONARY "SW_HID_DICTIONARY"
+#define HID_SET_STYLE "SW_HID_SET_STYLE"
+#define HID_RIBBONBAR "SW_HID_RIBBONBAR"
+#define HID_STATUSLINE "SW_HID_STATUSLINE"
+#define HID_DOCBAR "SW_HID_DOCBAR"
+#define HID_VRULER "SW_HID_VRULER"
+#define HID_MAKRO_WINDOW "SW_HID_MAKRO_WINDOW"
+#define HID_ENVELOP_FORMAT "SW_HID_ENVELOP_FORMAT"
+#define HID_ENVELOP_PRINTER "SW_HID_ENVELOP_PRINTER"
+
+#define HID_HEADER_FOOTER_DLG "SW_HID_HEADER_FOOTER_DLG"
+#define HID_GRID_DLG "SW_HID_GRID_DLG"
+#define HID_USER_ADDRESS_DLG "SW_HID_USER_ADDRESS_DLG"
+#define HID_SELECT_FAX_DLG "SW_HID_SELECT_FAX_DLG"
+
+#define HID_LABEL_FORMAT "SW_HID_LABEL_FORMAT"
+#define HID_BRSORT "SW_HID_BRSORT"
+#define HID_BRSEEK "SW_HID_BRSEEK"
+#define HID_BRCFG "SW_HID_BRCFG"
+
+#define HID_FORMEDT_CONTENT "SW_HID_FORMEDT_CONTENT"
+#define HID_FORMEDT_USER "SW_HID_FORMEDT_USER"
+#define HID_FORMEDT_INDEX "SW_HID_FORMEDT_INDEX"
+
+#define HID_SCRL_PAGEUP "SW_HID_SCRL_PAGEUP"
+#define HID_SCRL_PAGEDOWN "SW_HID_SCRL_PAGEDOWN"
+
+#define HID_DRAW_WIN "SW_HID_DRAW_WIN"
+#define HID_EDIT_WIN "SW_HID_EDIT_WIN"
+
+#define HID_INSERT_CTRL "SW_HID_INSERT_CTRL" // TbxControl Einfuegen
+#define HID_INSERT_OBJ_CTRL "SW_HID_INSERT_OBJ_CTRL"
+#define HID_INSERT_FIELD_CTRL "SW_HID_INSERT_FIELD_CTRL"
+
+#define HID_SOURCEVIEW "SW_HID_SOURCEVIEW"
+#define HID_TBL_OPT_CTRL "SW_HID_TBL_OPT_CTRL"
+#define HID_AUTOFORMAT_CLB "SW_HID_AUTOFORMAT_CLB"
+
+#define HID_SCRL_NAVI "SW_HID_SCRL_NAVI"
+#define HID_NAVI_DRAG_HYP "SW_HID_NAVI_DRAG_HYP"
+#define HID_NAVI_DRAG_LINK "SW_HID_NAVI_DRAG_LINK"
+#define HID_NAVI_DRAG_COPY "SW_HID_NAVI_DRAG_COPY"
+#define HID_NAVI_OUTLINES "SW_HID_NAVI_OUTLINES"
+
+#define HID_AUTOFORMAT_EXEC "SW_HID_AUTOFORMAT_EXEC"
+#define HID_AUTOFORMAT_CLOSE "SW_HID_AUTOFORMAT_CLOSE"
+
+#define HID_PAGEPREVIEW "SW_HID_PAGEPREVIEW"
+#define HID_SOURCE_EDITWIN "SW_HID_SOURCE_EDITWIN"
// Dialog Help-IDs
-#define HID_CONVERT_FROM (HID_BASE + 200)
-#define HID_CONVERT_TO (HID_BASE + 201)
-#define HID_EDIT_POSTIT (HID_BASE + 202)
-#define HID_INSERT_CHART (HID_BASE + 203)
-#define HID_PAGE_PREVIEW (HID_BASE + 204)
-#define HID_INSERT_HYPERLINK (HID_BASE + 205)
-#define HID_NAVIGATOR_TREELIST (HID_BASE + 206)
-#define HID_DLG_CAPTION (HID_BASE + 207)
-#define HID_DLG_GLOSS_DECIDE (HID_BASE + 208)
-#define HID_NAVIGATOR_TOOLBOX (HID_BASE + 209)
-#define HID_NAVIGATOR_LISTBOX (HID_BASE + 210)
-#define HID_NUM_BULLET_DLG (HID_BASE + 211)
-#define HID_VS_SINGLENUM (HID_BASE + 212)
-#define HID_VS_NUM (HID_BASE + 213)
-#define HID_VS_BULLET (HID_BASE + 214)
-#define HID_VS_NUMBMP (HID_BASE + 215)
-#define HID_VS_RULER (HID_BASE + 216)
-#define HID_RULER_DIALOG (HID_BASE + 217)
-#define HID_INSERT_ABSTRACT (HID_BASE + 218)
-#define HID_NAVI_TBX1 (HID_BASE + 219)
-#define HID_NAVI_TBX2 (HID_BASE + 220)
-#define HID_NAVI_TBX3 (HID_BASE + 221)
-#define HID_NAVI_TBX4 (HID_BASE + 222)
-#define HID_NAVI_TBX5 (HID_BASE + 223)
-#define HID_NAVI_TBX6 (HID_BASE + 224)
-#define HID_NAVI_TBX7 (HID_BASE + 225)
-#define HID_NAVI_TBX8 (HID_BASE + 226)
-#define HID_NAVI_TBX9 (HID_BASE + 227)
-#define HID_NAVI_TBX10 (HID_BASE + 228)
-#define HID_NAVI_TBX11 (HID_BASE + 229)
-#define HID_NAVI_TBX12 (HID_BASE + 230)
-#define HID_NAVI_TBX13 (HID_BASE + 231)
-#define HID_NAVI_TBX14 (HID_BASE + 232)
-#define HID_NAVI_TBX15 (HID_BASE + 233)
-#define HID_NAVI_VS (HID_BASE + 234)
-#define HID_NUM_FORMAT_BTN (HID_BASE + 235)
-#define HID_PPREV_ZOOM (HID_BASE + 236)
-#define HID_NAVI_TBX16 (HID_BASE + 237)
-#define HID_LTEMPL_TEXT (HID_BASE + 238)
-#define HID_LTEMPL_FRAME (HID_BASE + 239)
-#define HID_LTEMPL_PAGE (HID_BASE + 240)
-#define HID_LTEMPL_OVERRIDE (HID_BASE + 241)
-#define HID_LTEMPL_TEMPLATES (HID_BASE + 242)
-#define HID_NAVI_TBX17 (HID_BASE + 243)
-#define HID_NAVI_TBX18 (HID_BASE + 244)
-#define HID_NAVI_TBX19 (HID_BASE + 245)
-#define HID_NAVI_TBX20 (HID_BASE + 246)
-#define HID_NAVI_TBX21 (HID_BASE + 247)
-#define HID_NAVI_TBX22 (HID_BASE + 248)
-#define HID_NAVI_TBX23 (HID_BASE + 249)
-#define HID_NAVI_TBX24 (HID_BASE + 250)
-#define HID_NAVIGATOR_GLOBAL_TOOLBOX (HID_BASE + 251)
-#define HID_NAVIGATOR_GLOB_TREELIST (HID_BASE + 252)
-#define HID_GLOS_GROUP_TREE (HID_BASE + 253)
-#define HID_GLBLTREE_UPDATE (HID_BASE + 254)
-#define HID_GLBLTREE_INSERT (HID_BASE + 255)
-#define HID_GLBLTREE_EDIT (HID_BASE + 256)
-#define HID_GLBLTREE_DEL (HID_BASE + 257)
-#define HID_GLBLTREE_INS_IDX (HID_BASE + 258)
-#define HID_GLBLTREE_INS_CNTIDX (HID_BASE + 259)
-#define HID_GLBLTREE_INS_USRIDX (HID_BASE + 260)
-#define HID_GLBLTREE_INS_FILE (HID_BASE + 261)
-#define HID_GLBLTREE_INS_NEW_FILE (HID_BASE + 262)
-#define HID_GLBLTREE_INS_TEXT (HID_BASE + 263)
-#define HID_GLBLTREE_UPD_SEL (HID_BASE + 264)
-#define HID_GLBLTREE_UPD_IDX (HID_BASE + 265)
-#define HID_GLBLTREE_UPD_LINK (HID_BASE + 266)
-#define HID_GLBLTREEUPD_ALL (HID_BASE + 267)
-#define HID_NUM_OUTL_NAMED_NUMS (HID_BASE + 268)
-#define HID_NUM_OUTL_NUM_SAVEAS (HID_BASE + 269)
-#define HID_NUM_NAMED_NUMS (HID_BASE + 270)
-#define HID_NUM_NUM_SAVEAS (HID_BASE + 271)
-#define HID_NUM_STD_NUMBER (HID_BASE + 272)
-#define HID_NUM_DEL_NUMBER (HID_BASE + 273)
-#define HID_NUM_STD_BULLET (HID_BASE + 274)
-#define HID_NUM_DEL_BULLET (HID_BASE + 275)
-#define HID_NAVI_CONTENT (HID_BASE + 276)
-#define HID_NAVI_GLOBAL (HID_BASE + 277)
-#define HID_LTEMPL_NUMBERING (HID_BASE + 278)
-#define HID_FLDVAR_APPLY (HID_BASE + 279)
-#define HID_FLDVAR_DELETE (HID_BASE + 280)
-#define HID_FLDEDT_ADDRESS (HID_BASE + 281)
-#define HID_SORT_ACTION (HID_BASE + 282)
-#define HID_SORT_AUTHOR (HID_BASE + 283)
-#define HID_SORT_DATE (HID_BASE + 284)
-#define HID_SORT_COMMENT (HID_BASE + 285)
-#define HID_SW_SORT_POSITION (HID_BASE + 286)
-#define HID_SYNC_BTN (HID_BASE + 287)
-#define HID_EDIT_COMMENT (HID_BASE + 288)
-#define HID_SEL_TEMPLATE (HID_BASE + 289)
-#define HID_DLG_SEQUENCE_OPTION (HID_BASE + 290)
-#define HID_DLG_FLDEDT_NEXT (HID_BASE + 291)
-#define HID_DLG_FLDEDT_PREV (HID_BASE + 292)
-#define HID_DLG_FLDEDT_ADDRESS (HID_BASE + 293)
-#define HID_DLG_PRV_PRT_OPTIONS (HID_BASE + 294)
-
-#define HID_FILEDLG_CHARDLG (HID_BASE + 295)
-#define HID_FILEDLG_LOADTEMPLATE (HID_BASE + 296)
-#define HID_FILEDLG_ROMENU (HID_BASE + 297)
-#define HID_FILEDLG_MAILMRGE1 (HID_BASE + 298)
-#define HID_FILEDLG_MAILMRGE2 (HID_BASE + 299)
-#define HID_FILEDLG_FRMPAGE (HID_BASE + 300)
-#define HID_FILEDLG_SRCVIEW (HID_BASE + 301)
-#define HID_FILEDLG_WIZDOKU (HID_BASE + 302)
-#define HID_PREVIEW_ZOOM (HID_BASE + 303)
-
-#define HID_REDLINE_AUTOFMT_ACCEPT (HID_BASE + 304)
-#define HID_MULTI_TOX_DLG (HID_BASE + 305)
-#define HID_ASCII_FILTER (HID_BASE + 306)
-#define HID_GLBLTREE_EDIT_LINK (HID_BASE + 307)
-#define HID_FORMAT_NAME_OBJECT_NAME (HID_BASE + 308)
-#define HID_REFSELECTION_TOOLTIP (HID_BASE + 309) // #i83479#
+#define HID_CONVERT_FROM "SW_HID_CONVERT_FROM"
+#define HID_CONVERT_TO "SW_HID_CONVERT_TO"
+#define HID_EDIT_POSTIT "SW_HID_EDIT_POSTIT"
+#define HID_INSERT_CHART "SW_HID_INSERT_CHART"
+#define HID_PAGE_PREVIEW "SW_HID_PAGE_PREVIEW"
+#define HID_INSERT_HYPERLINK "SW_HID_INSERT_HYPERLINK"
+#define HID_NAVIGATOR_TREELIST "SW_HID_NAVIGATOR_TREELIST"
+#define HID_DLG_CAPTION "SW_HID_DLG_CAPTION"
+#define HID_DLG_GLOSS_DECIDE "SW_HID_DLG_GLOSS_DECIDE"
+#define HID_NAVIGATOR_TOOLBOX "SW_HID_NAVIGATOR_TOOLBOX"
+#define HID_NAVIGATOR_LISTBOX "SW_HID_NAVIGATOR_LISTBOX"
+#define HID_NUM_BULLET_DLG "SW_HID_NUM_BULLET_DLG"
+#define HID_VS_SINGLENUM "SW_HID_VS_SINGLENUM"
+#define HID_VS_NUM "SW_HID_VS_NUM"
+#define HID_VS_BULLET "SW_HID_VS_BULLET"
+#define HID_VS_NUMBMP "SW_HID_VS_NUMBMP"
+#define HID_VS_RULER "SW_HID_VS_RULER"
+#define HID_RULER_DIALOG "SW_HID_RULER_DIALOG"
+#define HID_INSERT_ABSTRACT "SW_HID_INSERT_ABSTRACT"
+#define HID_NAVI_TBX1 "SW_HID_NAVI_TBX1"
+#define HID_NAVI_TBX2 "SW_HID_NAVI_TBX2"
+#define HID_NAVI_TBX3 "SW_HID_NAVI_TBX3"
+#define HID_NAVI_TBX4 "SW_HID_NAVI_TBX4"
+#define HID_NAVI_TBX5 "SW_HID_NAVI_TBX5"
+#define HID_NAVI_TBX6 "SW_HID_NAVI_TBX6"
+#define HID_NAVI_TBX7 "SW_HID_NAVI_TBX7"
+#define HID_NAVI_TBX8 "SW_HID_NAVI_TBX8"
+#define HID_NAVI_TBX9 "SW_HID_NAVI_TBX9"
+#define HID_NAVI_TBX10 "SW_HID_NAVI_TBX10"
+#define HID_NAVI_TBX11 "SW_HID_NAVI_TBX11"
+#define HID_NAVI_TBX12 "SW_HID_NAVI_TBX12"
+#define HID_NAVI_TBX13 "SW_HID_NAVI_TBX13"
+#define HID_NAVI_TBX14 "SW_HID_NAVI_TBX14"
+#define HID_NAVI_TBX15 "SW_HID_NAVI_TBX15"
+#define HID_NAVI_VS "SW_HID_NAVI_VS"
+#define HID_NUM_FORMAT_BTN "SW_HID_NUM_FORMAT_BTN"
+#define HID_PPREV_ZOOM "SW_HID_PPREV_ZOOM"
+#define HID_NAVI_TBX16 "SW_HID_NAVI_TBX16"
+#define HID_LTEMPL_TEXT "SW_HID_LTEMPL_TEXT"
+#define HID_LTEMPL_FRAME "SW_HID_LTEMPL_FRAME"
+#define HID_LTEMPL_PAGE "SW_HID_LTEMPL_PAGE"
+#define HID_LTEMPL_OVERRIDE "SW_HID_LTEMPL_OVERRIDE"
+#define HID_LTEMPL_TEMPLATES "SW_HID_LTEMPL_TEMPLATES"
+#define HID_NAVI_TBX17 "SW_HID_NAVI_TBX17"
+#define HID_NAVI_TBX18 "SW_HID_NAVI_TBX18"
+#define HID_NAVI_TBX19 "SW_HID_NAVI_TBX19"
+#define HID_NAVI_TBX20 "SW_HID_NAVI_TBX20"
+#define HID_NAVI_TBX21 "SW_HID_NAVI_TBX21"
+#define HID_NAVI_TBX22 "SW_HID_NAVI_TBX22"
+#define HID_NAVI_TBX23 "SW_HID_NAVI_TBX23"
+#define HID_NAVI_TBX24 "SW_HID_NAVI_TBX24"
+#define HID_NAVIGATOR_GLOBAL_TOOLBOX "SW_HID_NAVIGATOR_GLOBAL_TOOLBOX"
+#define HID_NAVIGATOR_GLOB_TREELIST "SW_HID_NAVIGATOR_GLOB_TREELIST"
+#define HID_GLOS_GROUP_TREE "SW_HID_GLOS_GROUP_TREE"
+#define HID_GLBLTREE_UPDATE "SW_HID_GLBLTREE_UPDATE"
+#define HID_GLBLTREE_INSERT "SW_HID_GLBLTREE_INSERT"
+#define HID_GLBLTREE_EDIT "SW_HID_GLBLTREE_EDIT"
+#define HID_GLBLTREE_DEL "SW_HID_GLBLTREE_DEL"
+#define HID_GLBLTREE_INS_IDX "SW_HID_GLBLTREE_INS_IDX"
+#define HID_GLBLTREE_INS_CNTIDX "SW_HID_GLBLTREE_INS_CNTIDX"
+#define HID_GLBLTREE_INS_USRIDX "SW_HID_GLBLTREE_INS_USRIDX"
+#define HID_GLBLTREE_INS_FILE "SW_HID_GLBLTREE_INS_FILE"
+#define HID_GLBLTREE_INS_NEW_FILE "SW_HID_GLBLTREE_INS_NEW_FILE"
+#define HID_GLBLTREE_INS_TEXT "SW_HID_GLBLTREE_INS_TEXT"
+#define HID_GLBLTREE_UPD_SEL "SW_HID_GLBLTREE_UPD_SEL"
+#define HID_GLBLTREE_UPD_IDX "SW_HID_GLBLTREE_UPD_IDX"
+#define HID_GLBLTREE_UPD_LINK "SW_HID_GLBLTREE_UPD_LINK"
+#define HID_GLBLTREEUPD_ALL "SW_HID_GLBLTREEUPD_ALL"
+#define HID_NUM_OUTL_NAMED_NUMS "SW_HID_NUM_OUTL_NAMED_NUMS"
+#define HID_NUM_OUTL_NUM_SAVEAS "SW_HID_NUM_OUTL_NUM_SAVEAS"
+#define HID_NUM_NAMED_NUMS "SW_HID_NUM_NAMED_NUMS"
+#define HID_NUM_NUM_SAVEAS "SW_HID_NUM_NUM_SAVEAS"
+#define HID_NUM_STD_NUMBER "SW_HID_NUM_STD_NUMBER"
+#define HID_NUM_DEL_NUMBER "SW_HID_NUM_DEL_NUMBER"
+#define HID_NUM_STD_BULLET "SW_HID_NUM_STD_BULLET"
+#define HID_NUM_DEL_BULLET "SW_HID_NUM_DEL_BULLET"
+#define HID_NAVI_CONTENT "SW_HID_NAVI_CONTENT"
+#define HID_NAVI_GLOBAL "SW_HID_NAVI_GLOBAL"
+#define HID_LTEMPL_NUMBERING "SW_HID_LTEMPL_NUMBERING"
+#define HID_FLDVAR_APPLY "SW_HID_FLDVAR_APPLY"
+#define HID_FLDVAR_DELETE "SW_HID_FLDVAR_DELETE"
+#define HID_FLDEDT_ADDRESS "SW_HID_FLDEDT_ADDRESS"
+#define HID_SORT_ACTION "SW_HID_SORT_ACTION"
+#define HID_SORT_AUTHOR "SW_HID_SORT_AUTHOR"
+#define HID_SORT_DATE "SW_HID_SORT_DATE"
+#define HID_SORT_COMMENT "SW_HID_SORT_COMMENT"
+#define HID_SW_SORT_POSITION "SW_HID_SW_SORT_POSITION"
+#define HID_SYNC_BTN "SW_HID_SYNC_BTN"
+#define HID_EDIT_COMMENT "SW_HID_EDIT_COMMENT"
+#define HID_SEL_TEMPLATE "SW_HID_SEL_TEMPLATE"
+#define HID_DLG_SEQUENCE_OPTION "SW_HID_DLG_SEQUENCE_OPTION"
+#define HID_DLG_FLDEDT_NEXT "SW_HID_DLG_FLDEDT_NEXT"
+#define HID_DLG_FLDEDT_PREV "SW_HID_DLG_FLDEDT_PREV"
+#define HID_DLG_FLDEDT_ADDRESS "SW_HID_DLG_FLDEDT_ADDRESS"
+#define HID_DLG_PRV_PRT_OPTIONS "SW_HID_DLG_PRV_PRT_OPTIONS"
+
+#define HID_FILEDLG_CHARDLG "SW_HID_FILEDLG_CHARDLG"
+#define HID_FILEDLG_LOADTEMPLATE "SW_HID_FILEDLG_LOADTEMPLATE"
+#define HID_FILEDLG_ROMENU "SW_HID_FILEDLG_ROMENU"
+#define HID_FILEDLG_MAILMRGE1 "SW_HID_FILEDLG_MAILMRGE1"
+#define HID_FILEDLG_MAILMRGE2 "SW_HID_FILEDLG_MAILMRGE2"
+#define HID_FILEDLG_FRMPAGE "SW_HID_FILEDLG_FRMPAGE"
+#define HID_FILEDLG_SRCVIEW "SW_HID_FILEDLG_SRCVIEW"
+#define HID_FILEDLG_WIZDOKU "SW_HID_FILEDLG_WIZDOKU"
+#define HID_PREVIEW_ZOOM "SW_HID_PREVIEW_ZOOM"
+
+#define HID_REDLINE_AUTOFMT_ACCEPT "SW_HID_REDLINE_AUTOFMT_ACCEPT"
+#define HID_MULTI_TOX_DLG "SW_HID_MULTI_TOX_DLG"
+#define HID_ASCII_FILTER "SW_HID_ASCII_FILTER"
+#define HID_GLBLTREE_EDIT_LINK "SW_HID_GLBLTREE_EDIT_LINK"
+#define HID_FORMAT_NAME_OBJECT_NAME "SW_HID_FORMAT_NAME_OBJECT_NAME"
+#define HID_REFSELECTION_TOOLTIP "SW_HID_REFSELECTION_TOOLTIP" // #i83479#
// TabPage Help-IDs
-#define HID_DROPCAPS (HID_BASE + 400)
-#define HID_FRM_EXT (HID_BASE + 401)
-#define HID_FRM_STD (HID_BASE + 402)
-#define HID_GRF_EXT (HID_BASE + 403)
-#define HID_COLUMN (HID_BASE + 404)
-#define HID_DOC_STAT (HID_BASE + 405)
-#define HID_MACROASSIGN (HID_BASE + 406)
-#define HID_FOOTNOTE_PAGE (HID_BASE + 407)
-#define HID_OPTDOCDISP_PAGE (HID_BASE + 408)
-#define HID_OPTGRID_PAGE (HID_BASE + 409)
-#define HID_OPTTEST_PAGE (HID_BASE + 410)
-#define HID_OPTPRINT_PAGE (HID_BASE + 411)
-#define HID_FORMAT_TABLE (HID_BASE + 412)
-#define HID_TABLE_COLUMN (HID_BASE + 413)
-#define HID_LAB_LAB (HID_BASE + 414)
-#define HID_LAB_PRT (HID_BASE + 415)
-#define HID_ENV_PRT (HID_BASE + 416)
-#define HID_LAB_FMT (HID_BASE + 417)
-#define HID_ENV_ENV (HID_BASE + 418)
-#define HID_ENV_FMT (HID_BASE + 419)
-#define HID_FRM_URL (HID_BASE + 421)
-#define HID_CHAR_URL (HID_BASE + 422)
-#define HID_CONTENT_OPT (HID_BASE + 423)
-#define HID_LAYOUT_OPT (HID_BASE + 424)
-#define HID_STD_FONT (HID_BASE + 425)
-#define HID_COND_COLL (HID_BASE + 426)
-#define HID_FRM_ADD (HID_BASE + 427)
-#define HID_TABLE_TEXTFLOW (HID_BASE + 428)
-#define HID_AUTOFMT_BY_INPUT (HID_BASE + 429)
-#define HID_AUTOFMT_APPLY (HID_BASE + 430)
-#define HID_OPTTABLE_PAGE (HID_BASE + 431)
-#define HID_PICK_SINGLE_NUM (HID_BASE + 432)
-#define HID_PICK_BULLET (HID_BASE + 433)
-#define HID_PICK_NUM (HID_BASE + 434)
-#define HID_PICK_BMP (HID_BASE + 435)
-
-#define HID_FLD_DB (HID_BASE + 437)
-#define HID_FLD_DOKINF (HID_BASE + 438)
-#define HID_FLD_VAR (HID_BASE + 439)
-#define HID_FLD_DOK (HID_BASE + 440)
-#define HID_FLD_FUNC (HID_BASE + 441)
-#define HID_FLD_REF (HID_BASE + 442)
-#define HID_OPTSHDWCRSR (HID_BASE + 443)
-#define HID_NUM_OPTIONS (HID_BASE + 444)
-#define HID_NUM_POSITION (HID_BASE + 445)
-#define HID_NUMPARA (HID_BASE + 446)
-#define HID_FOOTNOTE_OPTIONS (HID_BASE + 447)
-#define HID_ENDNOTE_OPTIONS (HID_BASE + 448)
-#define HID_REDLINE_OPT (HID_BASE + 449)
-#define HID_LINENUMBERING (HID_BASE + 450)
-#define HID_REDLINE_ACCEPT (HID_BASE + 451)
-#define HID_EDIT_FLD_DB (HID_BASE + 452)
-#define HID_EDIT_FLD_DOKINF (HID_BASE + 453)
-#define HID_EDIT_FLD_VAR (HID_BASE + 454)
-#define HID_EDIT_FLD_DOK (HID_BASE + 455)
-#define HID_EDIT_FLD_FUNC (HID_BASE + 456)
-#define HID_EDIT_FLD_REF (HID_BASE + 457)
-#define HID_REDLINE_CTRL (HID_BASE + 458)
-#define HID_TP_OUTLINE_NUM (HID_BASE + 459)
-#define HID_OPTINSERT_PAGE (HID_BASE + 460)
-#define HID_OPTCAPTION_PAGE (HID_BASE + 461)
-#define HID_OPTLOAD_PAGE (HID_BASE + 462)
-#define HID_INSERT_TOX_PAGE (HID_BASE + 463)
-#define HID_TOX_FORM_ENTRY_PAGE (HID_BASE + 464)
-#define HID_TOX_FORM_STYLES_PAGE (HID_BASE + 465)
-#define HID_INSERT_TOX_TABDLG (HID_BASE + 466)
-#define HID_INSERT_SECTION_PAGE (HID_BASE + 467)
-#define HID_INSERT_SECTION_DLG (HID_BASE + 468)
-#define HID_SECTION_PROPERTIES_DLG (HID_BASE + 469)
-#define HID_RENAME_XNAMED (HID_BASE + 470)
-#define HID_TP_TOX_SELECT (HID_BASE + 471)
-#define HID_TP_TOX_ENTRY (HID_BASE + 472)
-#define HID_TOX_STYLES_PAGE (HID_BASE + 473)
-#define HID_TP_VISITING_CARDS (HID_BASE + 474)
-#define HID_DLG_ADD_IDX_STYLES (HID_BASE + 475)
-#define HID_ADD_STYLES_TLB (HID_BASE + 476)
-#define HID_OLE_CHECKLB (HID_BASE + 477)
-#define HID_DLG_CREATE_AUTH_ENTRY (HID_BASE + 478)
-#define HID_TP_PRIVATE_DATA (HID_BASE + 479)
-
-#define HID_TP_BUSINESS_DATA (HID_BASE + 480)
-#define HID_SECTION_FTNENDNOTES_PAGE (HID_BASE + 481)
-#define HID_TEXTGRID_PAGE (HID_BASE + 482)
-#define HID_OPTCOMPATIBILITY_PAGE (HID_BASE + 483)
-#define HID_COMPATIBILITY_OPTIONS_BOX (HID_BASE + 484)
+#define HID_DROPCAPS "SW_HID_DROPCAPS"
+#define HID_FRM_EXT "SW_HID_FRM_EXT"
+#define HID_FRM_STD "SW_HID_FRM_STD"
+#define HID_GRF_EXT "SW_HID_GRF_EXT"
+#define HID_COLUMN "SW_HID_COLUMN"
+#define HID_DOC_STAT "SW_HID_DOC_STAT"
+#define HID_MACROASSIGN "SW_HID_MACROASSIGN"
+#define HID_FOOTNOTE_PAGE "SW_HID_FOOTNOTE_PAGE"
+#define HID_OPTDOCDISP_PAGE "SW_HID_OPTDOCDISP_PAGE"
+#define HID_OPTGRID_PAGE "SW_HID_OPTGRID_PAGE"
+#define HID_OPTTEST_PAGE "SW_HID_OPTTEST_PAGE"
+#define HID_OPTPRINT_PAGE "SW_HID_OPTPRINT_PAGE"
+#define HID_FORMAT_TABLE "SW_HID_FORMAT_TABLE"
+#define HID_TABLE_COLUMN "SW_HID_TABLE_COLUMN"
+#define HID_LAB_LAB "SW_HID_LAB_LAB"
+#define HID_LAB_PRT "SW_HID_LAB_PRT"
+#define HID_ENV_PRT "SW_HID_ENV_PRT"
+#define HID_LAB_FMT "SW_HID_LAB_FMT"
+#define HID_ENV_ENV "SW_HID_ENV_ENV"
+#define HID_ENV_FMT "SW_HID_ENV_FMT"
+#define HID_FRM_URL "SW_HID_FRM_URL"
+#define HID_CHAR_URL "SW_HID_CHAR_URL"
+#define HID_CONTENT_OPT "SW_HID_CONTENT_OPT"
+#define HID_LAYOUT_OPT "SW_HID_LAYOUT_OPT"
+#define HID_STD_FONT "SW_HID_STD_FONT"
+#define HID_COND_COLL "SW_HID_COND_COLL"
+#define HID_FRM_ADD "SW_HID_FRM_ADD"
+#define HID_TABLE_TEXTFLOW "SW_HID_TABLE_TEXTFLOW"
+#define HID_AUTOFMT_BY_INPUT "SW_HID_AUTOFMT_BY_INPUT"
+#define HID_AUTOFMT_APPLY "SW_HID_AUTOFMT_APPLY"
+#define HID_OPTTABLE_PAGE "SW_HID_OPTTABLE_PAGE"
+#define HID_PICK_SINGLE_NUM "SW_HID_PICK_SINGLE_NUM"
+#define HID_PICK_BULLET "SW_HID_PICK_BULLET"
+#define HID_PICK_NUM "SW_HID_PICK_NUM"
+#define HID_PICK_BMP "SW_HID_PICK_BMP"
+
+#define HID_FLD_DB "SW_HID_FLD_DB"
+#define HID_FLD_DOKINF "SW_HID_FLD_DOKINF"
+#define HID_FLD_VAR "SW_HID_FLD_VAR"
+#define HID_FLD_DOK "SW_HID_FLD_DOK"
+#define HID_FLD_FUNC "SW_HID_FLD_FUNC"
+#define HID_FLD_REF "SW_HID_FLD_REF"
+#define HID_OPTSHDWCRSR "SW_HID_OPTSHDWCRSR"
+#define HID_NUM_OPTIONS "SW_HID_NUM_OPTIONS"
+#define HID_NUM_POSITION "SW_HID_NUM_POSITION"
+#define HID_NUMPARA "SW_HID_NUMPARA"
+#define HID_FOOTNOTE_OPTIONS "SW_HID_FOOTNOTE_OPTIONS"
+#define HID_ENDNOTE_OPTIONS "SW_HID_ENDNOTE_OPTIONS"
+#define HID_REDLINE_OPT "SW_HID_REDLINE_OPT"
+#define HID_LINENUMBERING "SW_HID_LINENUMBERING"
+#define HID_REDLINE_ACCEPT "SW_HID_REDLINE_ACCEPT"
+#define HID_EDIT_FLD_DB "SW_HID_EDIT_FLD_DB"
+#define HID_EDIT_FLD_DOKINF "SW_HID_EDIT_FLD_DOKINF"
+#define HID_EDIT_FLD_VAR "SW_HID_EDIT_FLD_VAR"
+#define HID_EDIT_FLD_DOK "SW_HID_EDIT_FLD_DOK"
+#define HID_EDIT_FLD_FUNC "SW_HID_EDIT_FLD_FUNC"
+#define HID_EDIT_FLD_REF "SW_HID_EDIT_FLD_REF"
+#define HID_REDLINE_CTRL "SW_HID_REDLINE_CTRL"
+#define HID_TP_OUTLINE_NUM "SW_HID_TP_OUTLINE_NUM"
+#define HID_OPTINSERT_PAGE "SW_HID_OPTINSERT_PAGE"
+#define HID_OPTCAPTION_PAGE "SW_HID_OPTCAPTION_PAGE"
+#define HID_OPTLOAD_PAGE "SW_HID_OPTLOAD_PAGE"
+#define HID_INSERT_TOX_PAGE "SW_HID_INSERT_TOX_PAGE"
+#define HID_TOX_FORM_ENTRY_PAGE "SW_HID_TOX_FORM_ENTRY_PAGE"
+#define HID_TOX_FORM_STYLES_PAGE "SW_HID_TOX_FORM_STYLES_PAGE"
+#define HID_INSERT_TOX_TABDLG "SW_HID_INSERT_TOX_TABDLG"
+#define HID_INSERT_SECTION_PAGE "SW_HID_INSERT_SECTION_PAGE"
+#define HID_INSERT_SECTION_DLG "SW_HID_INSERT_SECTION_DLG"
+#define HID_SECTION_PROPERTIES_DLG "SW_HID_SECTION_PROPERTIES_DLG"
+#define HID_RENAME_XNAMED "SW_HID_RENAME_XNAMED"
+#define HID_TP_TOX_SELECT "SW_HID_TP_TOX_SELECT"
+#define HID_TP_TOX_ENTRY "SW_HID_TP_TOX_ENTRY"
+#define HID_TOX_STYLES_PAGE "SW_HID_TOX_STYLES_PAGE"
+#define HID_TP_VISITING_CARDS "SW_HID_TP_VISITING_CARDS"
+#define HID_DLG_ADD_IDX_STYLES "SW_HID_DLG_ADD_IDX_STYLES"
+#define HID_ADD_STYLES_TLB "SW_HID_ADD_STYLES_TLB"
+#define HID_OLE_CHECKLB "SW_HID_OLE_CHECKLB"
+#define HID_DLG_CREATE_AUTH_ENTRY "SW_HID_DLG_CREATE_AUTH_ENTRY"
+#define HID_TP_PRIVATE_DATA "SW_HID_TP_PRIVATE_DATA"
+
+#define HID_TP_BUSINESS_DATA "SW_HID_TP_BUSINESS_DATA"
+#define HID_SECTION_FTNENDNOTES_PAGE "SW_HID_SECTION_FTNENDNOTES_PAGE"
+#define HID_TEXTGRID_PAGE "SW_HID_TEXTGRID_PAGE"
+#define HID_OPTCOMPATIBILITY_PAGE "SW_HID_OPTCOMPATIBILITY_PAGE"
+#define HID_COMPATIBILITY_OPTIONS_BOX "SW_HID_COMPATIBILITY_OPTIONS_BOX"
// AutoPilot Help-IDs
-#define HID_LETTER_PAGE1 (HID_BASE + 501)
-#define HID_LETTER_PAGE2 (HID_BASE + 502)
-#define HID_LETTER_PAGE3 (HID_BASE + 503)
-#define HID_LETTER_PAGE4 (HID_BASE + 504)
-#define HID_LETTER_PAGE5 (HID_BASE + 505)
-#define HID_LETTER_PAGE6 (HID_BASE + 506)
-#define HID_LETTER_PAGE7 (HID_BASE + 507)
-#define HID_LETTER_PAGE8 (HID_BASE + 508)
-#define HID_LETTER_PAGE9 (HID_BASE + 509)
-
-#define HID_FAX_PAGE1 (HID_BASE + 511)
-#define HID_FAX_PAGE2 (HID_BASE + 512)
-#define HID_FAX_PAGE3 (HID_BASE + 513)
-#define HID_FAX_PAGE4 (HID_BASE + 514)
-#define HID_FAX_PAGE5 (HID_BASE + 515)
-#define HID_FAX_PAGE6 (HID_BASE + 516)
-#define HID_FAX_PAGE7 (HID_BASE + 517)
-#define HID_FAX_PAGE8 (HID_BASE + 518)
-
-#define HID_MEMO_PAGE1 (HID_BASE + 521)
-#define HID_MEMO_PAGE2 (HID_BASE + 522)
-#define HID_MEMO_PAGE3 (HID_BASE + 523)
-#define HID_MEMO_PAGE4 (HID_BASE + 524)
-#define HID_MEMO_PAGE5 (HID_BASE + 525)
-
-#define HID_AGENDA_PAGE1 (HID_BASE + 531)
-#define HID_AGENDA_PAGE2 (HID_BASE + 532)
-#define HID_AGENDA_PAGE3 (HID_BASE + 533)
-#define HID_AGENDA_PAGE4 (HID_BASE + 534)
-#define HID_AGENDA_PAGE5 (HID_BASE + 535)
-#define HID_AGENDA_PAGE6 (HID_BASE + 536)
-
-#define HID_AUTOPILOT_NEXT (HID_BASE + 537)
-#define HID_AUTOPILOT_PREV (HID_BASE + 538)
-#define HID_AUTOPILOT_OK (HID_BASE + 539)
+#define HID_LETTER_PAGE1 "SW_HID_LETTER_PAGE1"
+#define HID_LETTER_PAGE2 "SW_HID_LETTER_PAGE2"
+#define HID_LETTER_PAGE3 "SW_HID_LETTER_PAGE3"
+#define HID_LETTER_PAGE4 "SW_HID_LETTER_PAGE4"
+#define HID_LETTER_PAGE5 "SW_HID_LETTER_PAGE5"
+#define HID_LETTER_PAGE6 "SW_HID_LETTER_PAGE6"
+#define HID_LETTER_PAGE7 "SW_HID_LETTER_PAGE7"
+#define HID_LETTER_PAGE8 "SW_HID_LETTER_PAGE8"
+#define HID_LETTER_PAGE9 "SW_HID_LETTER_PAGE9"
+
+#define HID_FAX_PAGE1 "SW_HID_FAX_PAGE1"
+#define HID_FAX_PAGE2 "SW_HID_FAX_PAGE2"
+#define HID_FAX_PAGE3 "SW_HID_FAX_PAGE3"
+#define HID_FAX_PAGE4 "SW_HID_FAX_PAGE4"
+#define HID_FAX_PAGE5 "SW_HID_FAX_PAGE5"
+#define HID_FAX_PAGE6 "SW_HID_FAX_PAGE6"
+#define HID_FAX_PAGE7 "SW_HID_FAX_PAGE7"
+#define HID_FAX_PAGE8 "SW_HID_FAX_PAGE8"
+
+#define HID_MEMO_PAGE1 "SW_HID_MEMO_PAGE1"
+#define HID_MEMO_PAGE2 "SW_HID_MEMO_PAGE2"
+#define HID_MEMO_PAGE3 "SW_HID_MEMO_PAGE3"
+#define HID_MEMO_PAGE4 "SW_HID_MEMO_PAGE4"
+#define HID_MEMO_PAGE5 "SW_HID_MEMO_PAGE5"
+
+#define HID_AGENDA_PAGE1 "SW_HID_AGENDA_PAGE1"
+#define HID_AGENDA_PAGE2 "SW_HID_AGENDA_PAGE2"
+#define HID_AGENDA_PAGE3 "SW_HID_AGENDA_PAGE3"
+#define HID_AGENDA_PAGE4 "SW_HID_AGENDA_PAGE4"
+#define HID_AGENDA_PAGE5 "SW_HID_AGENDA_PAGE5"
+#define HID_AGENDA_PAGE6 "SW_HID_AGENDA_PAGE6"
+
+#define HID_AUTOPILOT_NEXT "SW_HID_AUTOPILOT_NEXT"
+#define HID_AUTOPILOT_PREV "SW_HID_AUTOPILOT_PREV"
+#define HID_AUTOPILOT_OK "SW_HID_AUTOPILOT_OK"
// HelpIds for Menu
-#define HID_MN_SUB_TBLROW (HID_BASE + 600)
-#define HID_MN_SUB_TBLCOL (HID_BASE + 601)
-#define HID_MN_SUB_AUTOFORMAT (HID_BASE + 602)
-#define HID_MN_SUB_TOOLBAR (HID_BASE + 603)
-#define HID_MN_SUB_FIELD (HID_BASE + 604)
-#define HID_MN_SUB_GRAPHIC (HID_BASE + 605)
-#define HID_MN_SUB_TEMPLATES (HID_BASE + 606)
-#define HID_MN_SUB_ARRANGE (HID_BASE + 607)
-#define HID_MN_SUB_SPELLING (HID_BASE + 608)
-#define HID_MN_SUB_UPDATE (HID_BASE + 609)
-#define HID_MN_SUB_MIRROR (HID_BASE + 610)
-#define HID_MN_SUB_ALIGN (HID_BASE + 611)
-#define HID_MN_SUB_OPTIONS (HID_BASE + 612)
-
-#define HID_MN_CALC_PHD (HID_BASE + 613)
-#define HID_MN_CALC_SQRT (HID_BASE + 614)
-#define HID_MN_CALC_OR (HID_BASE + 615)
-#define HID_MN_CALC_XOR (HID_BASE + 616)
-#define HID_MN_CALC_AND (HID_BASE + 617)
-#define HID_MN_CALC_NOT (HID_BASE + 618)
-#define HID_MN_CALC_EQ (HID_BASE + 619)
-#define HID_MN_CALC_NEQ (HID_BASE + 620)
-#define HID_MN_CALC_LEQ (HID_BASE + 621)
-#define HID_MN_CALC_GEQ (HID_BASE + 622)
-#define HID_MN_CALC_LES (HID_BASE + 623)
-#define HID_MN_CALC_GRE (HID_BASE + 624)
-#define HID_MN_CALC_SUM (HID_BASE + 625)
-#define HID_MN_CALC_MEAN (HID_BASE + 626)
-#define HID_MN_CALC_MIN (HID_BASE + 627)
-#define HID_MN_CALC_MAX (HID_BASE + 628)
-#define HID_MN_CALC_SIN (HID_BASE + 629)
-#define HID_MN_CALC_COS (HID_BASE + 630)
-#define HID_MN_CALC_TAN (HID_BASE + 631)
-#define HID_MN_CALC_ASIN (HID_BASE + 632)
-#define HID_MN_CALC_ACOS (HID_BASE + 633)
-#define HID_MN_CALC_ATAN (HID_BASE + 634)
-#define HID_MN_CALC_POW (HID_BASE + 635)
-#define HID_MN_CALC_LISTSEP (HID_BASE + 636)
-#define HID_MN_POP_OPS (HID_BASE + 637)
-#define HID_MN_POP_STATISTICS (HID_BASE + 638)
-#define HID_MN_POP_FUNC (HID_BASE + 639)
-#define HID_MN_RSC_END (HID_BASE + 640)
-#define HID_MN_CALC_ROUND (HID_BASE + 641)
-#define HID_MN_SUB_MACRO (HID_BASE + 642)
-
-#define HID_MN_READONLY_SAVEGRAPHIC (HID_BASE + 645)
-#define HID_MN_READONLY_GRAPHICTOGALLERY (HID_BASE + 646)
-#define HID_MN_READONLY_TOGALLERYLINK (HID_BASE + 647)
-#define HID_MN_READONLY_TOGALLERYCOPY (HID_BASE + 648)
-#define HID_MN_READONLY_SAVEBACKGROUND (HID_BASE + 649)
-#define HID_MN_READONLY_BACKGROUNDTOGALLERY (HID_BASE + 650)
-#define HID_MN_READONLY_COPYLINK (HID_BASE + 651)
-#define HID_MN_READONLY_COPYGRAPHIC (HID_BASE + 652)
-#define HID_MN_READONLY_LOADGRAPHIC (HID_BASE + 653)
-#define HID_MN_READONLY_GRAPHICOFF (HID_BASE + 654)
-#define HID_MN_READONLY_PLUGINOFF (HID_BASE + 655)
-
-#define HID_MD_GLOS_DEFINE (HID_BASE + 656)
-#define HID_MD_GLOS_REPLACE (HID_BASE + 657)
-#define HID_MD_GLOS_RENAME (HID_BASE + 658)
-#define HID_MD_GLOS_DELETE (HID_BASE + 659)
-#define HID_MD_GLOS_EDIT (HID_BASE + 660)
-#define HID_MD_GLOS_MACRO (HID_BASE + 661)
-#define HID_LINGU_ADD_WORD (HID_BASE + 662)
-#define HID_LINGU_IGNORE_WORD (HID_BASE + 663)
-#define HID_LINGU_SPELLING_DLG (HID_BASE + 664)
-#define HID_LINGU_AUTOCORR (HID_BASE + 665)
-#define HID_LINGU_REPLACE (HID_BASE + 666)
-#define HID_MD_GLOS_CATEGORY (HID_BASE + 667)
-#define HID_REGION_TREE (HID_BASE + 668)
-#define HID_LINGU_WORD_LANGUAGE (HID_BASE + 669)
-#define HID_LINGU_PARA_LANGUAGE (HID_BASE + 670)
-#define HID_MD_GLOS_DEFINE_TEXT (HID_BASE + 671)
-#define HID_DLG_PASSWD_SECTION (HID_BASE + 672)
-#define HID_MD_COPY_TO_CLIPBOARD (HID_BASE + 673)
-#define HID_MD_GLOS_IMPORT (HID_BASE + 674)
-#define HID_SMARTTAG_MAIN (HID_BASE + 675) // SMARTTAGS
-#define HID_LINGU_IGNORE_SELECTION (HID_BASE + 676) // grammar check context menu
+#define HID_MN_SUB_TBLROW "SW_HID_MN_SUB_TBLROW"
+#define HID_MN_SUB_TBLCOL "SW_HID_MN_SUB_TBLCOL"
+#define HID_MN_SUB_AUTOFORMAT "SW_HID_MN_SUB_AUTOFORMAT"
+#define HID_MN_SUB_TOOLBAR "SW_HID_MN_SUB_TOOLBAR"
+#define HID_MN_SUB_FIELD "SW_HID_MN_SUB_FIELD"
+#define HID_MN_SUB_GRAPHIC "SW_HID_MN_SUB_GRAPHIC"
+#define HID_MN_SUB_TEMPLATES "SW_HID_MN_SUB_TEMPLATES"
+#define HID_MN_SUB_ARRANGE "SW_HID_MN_SUB_ARRANGE"
+#define HID_MN_SUB_SPELLING "SW_HID_MN_SUB_SPELLING"
+#define HID_MN_SUB_UPDATE "SW_HID_MN_SUB_UPDATE"
+#define HID_MN_SUB_MIRROR "SW_HID_MN_SUB_MIRROR"
+#define HID_MN_SUB_ALIGN "SW_HID_MN_SUB_ALIGN"
+#define HID_MN_SUB_OPTIONS "SW_HID_MN_SUB_OPTIONS"
+
+#define HID_MN_CALC_PHD "SW_HID_MN_CALC_PHD"
+#define HID_MN_CALC_SQRT "SW_HID_MN_CALC_SQRT"
+#define HID_MN_CALC_OR "SW_HID_MN_CALC_OR"
+#define HID_MN_CALC_XOR "SW_HID_MN_CALC_XOR"
+#define HID_MN_CALC_AND "SW_HID_MN_CALC_AND"
+#define HID_MN_CALC_NOT "SW_HID_MN_CALC_NOT"
+#define HID_MN_CALC_EQ "SW_HID_MN_CALC_EQ"
+#define HID_MN_CALC_NEQ "SW_HID_MN_CALC_NEQ"
+#define HID_MN_CALC_LEQ "SW_HID_MN_CALC_LEQ"
+#define HID_MN_CALC_GEQ "SW_HID_MN_CALC_GEQ"
+#define HID_MN_CALC_LES "SW_HID_MN_CALC_LES"
+#define HID_MN_CALC_GRE "SW_HID_MN_CALC_GRE"
+#define HID_MN_CALC_SUM "SW_HID_MN_CALC_SUM"
+#define HID_MN_CALC_MEAN "SW_HID_MN_CALC_MEAN"
+#define HID_MN_CALC_MIN "SW_HID_MN_CALC_MIN"
+#define HID_MN_CALC_MAX "SW_HID_MN_CALC_MAX"
+#define HID_MN_CALC_SIN "SW_HID_MN_CALC_SIN"
+#define HID_MN_CALC_COS "SW_HID_MN_CALC_COS"
+#define HID_MN_CALC_TAN "SW_HID_MN_CALC_TAN"
+#define HID_MN_CALC_ASIN "SW_HID_MN_CALC_ASIN"
+#define HID_MN_CALC_ACOS "SW_HID_MN_CALC_ACOS"
+#define HID_MN_CALC_ATAN "SW_HID_MN_CALC_ATAN"
+#define HID_MN_CALC_POW "SW_HID_MN_CALC_POW"
+#define HID_MN_CALC_LISTSEP "SW_HID_MN_CALC_LISTSEP"
+#define HID_MN_POP_OPS "SW_HID_MN_POP_OPS"
+#define HID_MN_POP_STATISTICS "SW_HID_MN_POP_STATISTICS"
+#define HID_MN_POP_FUNC "SW_HID_MN_POP_FUNC"
+#define HID_MN_RSC_END "SW_HID_MN_RSC_END"
+#define HID_MN_CALC_ROUND "SW_HID_MN_CALC_ROUND"
+#define HID_MN_SUB_MACRO "SW_HID_MN_SUB_MACRO"
+
+#define HID_MN_READONLY_SAVEGRAPHIC "SW_HID_MN_READONLY_SAVEGRAPHIC"
+#define HID_MN_READONLY_GRAPHICTOGALLERY "SW_HID_MN_READONLY_GRAPHICTOGALLERY"
+#define HID_MN_READONLY_TOGALLERYLINK "SW_HID_MN_READONLY_TOGALLERYLINK"
+#define HID_MN_READONLY_TOGALLERYCOPY "SW_HID_MN_READONLY_TOGALLERYCOPY"
+#define HID_MN_READONLY_SAVEBACKGROUND "SW_HID_MN_READONLY_SAVEBACKGROUND"
+#define HID_MN_READONLY_BACKGROUNDTOGALLERY "SW_HID_MN_READONLY_BACKGROUNDTOGALLERY"
+#define HID_MN_READONLY_COPYLINK "SW_HID_MN_READONLY_COPYLINK"
+#define HID_MN_READONLY_COPYGRAPHIC "SW_HID_MN_READONLY_COPYGRAPHIC"
+#define HID_MN_READONLY_LOADGRAPHIC "SW_HID_MN_READONLY_LOADGRAPHIC"
+#define HID_MN_READONLY_GRAPHICOFF "SW_HID_MN_READONLY_GRAPHICOFF"
+#define HID_MN_READONLY_PLUGINOFF "SW_HID_MN_READONLY_PLUGINOFF"
+
+#define HID_MD_GLOS_DEFINE "SW_HID_MD_GLOS_DEFINE"
+#define HID_MD_GLOS_REPLACE "SW_HID_MD_GLOS_REPLACE"
+#define HID_MD_GLOS_RENAME "SW_HID_MD_GLOS_RENAME"
+#define HID_MD_GLOS_DELETE "SW_HID_MD_GLOS_DELETE"
+#define HID_MD_GLOS_EDIT "SW_HID_MD_GLOS_EDIT"
+#define HID_MD_GLOS_MACRO "SW_HID_MD_GLOS_MACRO"
+#define HID_LINGU_ADD_WORD "SW_HID_LINGU_ADD_WORD"
+#define HID_LINGU_IGNORE_WORD "SW_HID_LINGU_IGNORE_WORD"
+#define HID_LINGU_SPELLING_DLG "SW_HID_LINGU_SPELLING_DLG"
+#define HID_LINGU_AUTOCORR "SW_HID_LINGU_AUTOCORR"
+#define HID_LINGU_REPLACE "SW_HID_LINGU_REPLACE"
+#define HID_MD_GLOS_CATEGORY "SW_HID_MD_GLOS_CATEGORY"
+#define HID_REGION_TREE "SW_HID_REGION_TREE"
+#define HID_LINGU_WORD_LANGUAGE "SW_HID_LINGU_WORD_LANGUAGE"
+#define HID_LINGU_PARA_LANGUAGE "SW_HID_LINGU_PARA_LANGUAGE"
+#define HID_MD_GLOS_DEFINE_TEXT "SW_HID_MD_GLOS_DEFINE_TEXT"
+#define HID_DLG_PASSWD_SECTION "SW_HID_DLG_PASSWD_SECTION"
+#define HID_MD_COPY_TO_CLIPBOARD "SW_HID_MD_COPY_TO_CLIPBOARD"
+#define HID_MD_GLOS_IMPORT "SW_HID_MD_GLOS_IMPORT"
+#define HID_SMARTTAG_MAIN "SW_HID_SMARTTAG_MAIN" // SMARTTAGS
+#define HID_LINGU_IGNORE_SELECTION "SW_HID_LINGU_IGNORE_SELECTION" // grammar check context menu
// More Help-IDs
-#define HID_CLOSE_FILE (HID_BASE + 1001)
-#define HID_LAUNCH_REGISTRY (HID_BASE + 1002)
-#define HID_MERGE_FILE (HID_BASE + 1003)
-#define HID_MERGE_FILE_DLG (HID_BASE + 1004)
-#define HID_NEW_FILE (HID_BASE + 1005)
-#define HID_OPEN_FILE (HID_BASE + 1007)
-#define HID_OPEN_LASTVERSION (HID_BASE + 1009)
-#define HID_PRINT_FILE (HID_BASE + 1010)
-#define HID_PRINT_FILE_OPTIONS (HID_BASE + 1011)
-#define HID_SAVE_FILE_AS (HID_BASE + 1012)
-#define HID_SAVE_FILE (HID_BASE + 1013)
-#define HID_SETUP_PRINTER_DLG (HID_BASE + 1015)
-#define HID_EXIT (HID_BASE + 1017)
-#define HID_CREATE_DOCUMENT (HID_BASE + 1019)
-#define HID_DOCSTAT_DLG (HID_BASE + 1020)
-#define HID_LOAD_TEMPLATE_DLG (HID_BASE + 1021)
-#define HID_SAVE_ALL (HID_BASE + 1023)
-#define HID_NEW_FILE_DEFAULT (HID_BASE + 1024)
-#define HID_PRINT_FILE_DEFAULT (HID_BASE + 1025)
-#define HID_FAX (HID_BASE + 1028)
-#define HID_SELECT_DATABASE (HID_BASE + 1030)
-#define HID_DOC_INFO_DLG (HID_BASE + 1031)
-#define HID_DOC_MGR_DLG (HID_BASE + 1032)
-#define HID_OPTCAPTION_CLB (HID_BASE + 1033)
-
-#define HID_COPY (HID_BASE + 1102)
-#define HID_CUT (HID_BASE + 1103)
-#define HID_EDIT_FIELD (HID_BASE + 1104)
-#define HID_EDIT_FILE_INFO_DLG (HID_BASE + 1107)
-#define HID_EDIT_LINK_DLG (HID_BASE + 1109)
-#define HID_EDIT_OBJECT (HID_BASE + 1110)
-#define HID_GOTO (HID_BASE + 1111)
-#define HID_SET_FIELD_VALUE (HID_BASE + 1112)
-#define HID_PASTE (HID_BASE + 1113)
-#define HID_REDO (HID_BASE + 1116)
-#define HID_SEARCH (HID_BASE + 1117)
-#define HID_REPLACE (HID_BASE + 1118)
-#define HID_SELECT_ALL (HID_BASE + 1119)
-#define HID_UNDO (HID_BASE + 1120)
-#define HID_REPEAT (HID_BASE + 1122)
-#define HID_BUFFER_UPDATE (HID_BASE + 1124)
-#define HID_UPDATE_FIELDS (HID_BASE + 1126)
-#define HID_EXECUTE_MACROFIELD (HID_BASE + 1127)
-#define HID_EDIT_FORMULA (HID_BASE + 1128)
-#define HID_CALC_TABLE (HID_BASE + 1129)
-#define HID_NUM_BULLET_DOWN (HID_BASE + 1130)
-#define HID_NUM_BULLET_UP (HID_BASE + 1131)
-#define HID_NUM_BULLET_PREV (HID_BASE + 1132)
-#define HID_NUM_BULLET_NEXT (HID_BASE + 1133)
-#define HID_NUM_BULLET_MOVEUP (HID_BASE + 1134)
-#define HID_NUM_BULLET_MOVEDOWN (HID_BASE + 1135)
-#define HID_NUM_BULLET_NONUM (HID_BASE + 1136)
-#define HID_NUM_BULLET_OFF (HID_BASE + 1137)
-#define HID_NUM_BULLET_ON (HID_BASE + 1138)
-#define HID_NUM_BULLET_OUTLINE_DOWN (HID_BASE + 1139)
-#define HID_NUM_BULLET_OUTLINE_UP (HID_BASE + 1140)
-#define HID_NUM_BULLET_OUTLINE_MOVEUP (HID_BASE + 1141)
-#define HID_NUM_BULLET_OUTLINE_MOVEDOWN (HID_BASE + 1142)
-#define HID_UPDATE_INPUTFIELDS (HID_BASE + 1143)
-#define HID_NUM_NUMBERING_ON (HID_BASE + 1144)
-#define HID_REPEAT_SEARCH (HID_BASE + 1150)
-#define HID_REPAGINATE (HID_BASE + 1161)
-
-#define HID_REFRESH_VIEW (HID_BASE + 1201)
-#define HID_RIBBON (HID_BASE + 1210)
-#define HID_RULER (HID_BASE + 1211)
-#define HID_STATUSBAR (HID_BASE + 1212)
-#define HID_TOOLBOX (HID_BASE + 1213)
-#define HID_VIEW_BOUNDS (HID_BASE + 1214)
-#define HID_VIEW_FIELDS (HID_BASE + 1215)
-#define HID_VLINEAL (HID_BASE + 1216)
-#define HID_VSCROLLBAR (HID_BASE + 1217)
-#define HID_HSCROLLBAR (HID_BASE + 1218)
-#define HID_VIEW_META_CHARS (HID_BASE + 1224)
-#define HID_VIEW_MARKS (HID_BASE + 1225)
-#define HID_VIEW_FIELDNAME (HID_BASE + 1226)
-#define HID_VIEW_TABLEGRID (HID_BASE + 1227)
-#define HID_ZOOM (HID_BASE + 1231)
-
-#define HID_DELETE_BOOKMARK (HID_BASE + 1301)
-#define HID_INSERT_BREAK (HID_BASE + 1303)
-#define HID_INSERT_COLUMN_BREAK (HID_BASE + 1305)
-#define HID_INSERT_FILE (HID_BASE + 1309)
-#define HID_INSERT_FOOTNOTE (HID_BASE + 1311)
-#define HID_INSERT_GRAFIC (HID_BASE + 1315)
-#define HID_INSERT_LINEBREAK (HID_BASE + 1318)
-#define HID_INSERT_MERGEFIELD_DLG (HID_BASE + 1320)
-#define HID_INSERT_OBJECT_DLG (HID_BASE + 1322)
-#define HID_INSERT_PAGEBREAK (HID_BASE + 1323)
-#define HID_INSERT_RECORD (HID_BASE + 1326)
-#define HID_MERGE_RECORD (HID_BASE + 1327)
-#define HID_INSERT_SYMBOL (HID_BASE + 1328)
-#define HID_INSERT_STRING (HID_BASE + 1331)
-#define HID_INSERT_COLS (HID_BASE + 1332)
-#define HID_INSERT_FRAME_INTERACT (HID_BASE + 1333)
-#define HID_INSERT_FRAME (HID_BASE + 1334)
-#define HID_INSERT_IDX_ENTRY (HID_BASE + 1340)
-#define HID_INSERT_USERIDX_ENTRY (HID_BASE + 1341)
-#define HID_INSERT_CNTNTIDX_ENTRY (HID_BASE + 1342)
-#define HID_INSERT_SOFT_HYPHEN (HID_BASE + 1350)
-#define HID_INSERT_HARD_SPACE (HID_BASE + 1351)
-
-#define HID_SET_FONT (HID_BASE + 1401)
-#define HID_SET_FONT_SIZE (HID_BASE + 1402)
-#define HID_GROW_FONT_SIZE (HID_BASE + 1403)
-#define HID_SHRINK_FONT_SIZE (HID_BASE + 1404)
-#define HID_SET_BOLD (HID_BASE + 1405)
-#define HID_SET_ITALIC (HID_BASE + 1406)
-#define HID_SET_SHADOW (HID_BASE + 1407)
-#define HID_SET_OUTLINE (HID_BASE + 1408)
-#define HID_SET_UNDERLINE (HID_BASE + 1409)
-#define HID_SET_STRIKEOUT (HID_BASE + 1410)
-#define HID_SET_SUPER_SCRIPT (HID_BASE + 1411)
-#define HID_SET_SUB_SCRIPT (HID_BASE + 1412)
-#define HID_SET_COLOR (HID_BASE + 1413)
-#define HID_SET_CASEMAP (HID_BASE + 1414)
-#define HID_SET_LANGUAGE (HID_BASE + 1415)
-#define HID_SET_KERNING (HID_BASE + 1416)
-#define HID_INDENT_TO_TABSTOP (HID_BASE + 1417)
-#define HID_SET_LEFT_PARA (HID_BASE + 1418)
-#define HID_SET_RIGHT_PARA (HID_BASE + 1419)
-#define HID_SET_CENTER_PARA (HID_BASE + 1420)
-#define HID_SET_JUSTIFY_PARA (HID_BASE + 1421)
-#define HID_SET_LINE_SPACE_1 (HID_BASE + 1422)
-#define HID_SET_LINE_SPACE_15 (HID_BASE + 1423)
-#define HID_SET_LINE_SPACE_2 (HID_BASE + 1424)
-#define HID_FLIP_HORZ_GRAFIC (HID_BASE + 1425)
-#define HID_FLIP_VERT_GRAFIC (HID_BASE + 1426)
-#define HID_SET_ADJUST (HID_BASE + 1428)
-#define HID_SET_LRMARGIN (HID_BASE + 1429)
-#define HID_SET_ULMARGIN (HID_BASE + 1430)
-#define HID_UNINDENT_TO_TABSTOP (HID_BASE + 1431)
-#define HID_SET_HYPHEN_ZONE (HID_BASE + 1432)
-#define HID_SET_PAGE_BREAK (HID_BASE + 1433)
-#define HID_SET_KEEP_TOGETHER (HID_BASE + 1434)
-#define HID_SET_WIDOW (HID_BASE + 1436)
-#define HID_SET_ORPHAN (HID_BASE + 1437)
-#define HID_FORMAT_SHADOW (HID_BASE + 1438)
-#define HID_FORMAT_BORDER (HID_BASE + 1439)
-#define HID_FORMAT_CHAR_DLG (HID_BASE + 1441)
-#define HID_FORMAT_PARA_DLG (HID_BASE + 1443)
-#define HID_FORMAT_TAB (HID_BASE + 1444)
-#define HID_FORMAT_TAB_DLG (HID_BASE + 1445)
-#define HID_FORMAT_BORDER_DLG (HID_BASE + 1447)
-#define HID_FORMAT_BACKGROUND (HID_BASE + 1448)
-#define HID_FORMAT_BACKGROUND_DLG (HID_BASE + 1450)
-#define HID_FORMAT_PAGE (HID_BASE + 1451)
-#define HID_FORMAT_PAGE_DLG (HID_BASE + 1452)
-#define HID_FORMAT_DROPCAPS (HID_BASE + 1454)
-#define HID_FORMAT_FRAME_DLG (HID_BASE + 1456)
-#define HID_FORMAT_GRAFIC_DLG (HID_BASE + 1458)
-#define HID_FORMAT_TABLE_DLG (HID_BASE + 1460)
-#define HID_NEW_STYLE_BY_EXAMPLE (HID_BASE + 1462)
-#define HID_UPDATE_STYLE_BY_EXAMPLE (HID_BASE + 1463)
-#define HID_STYLE_SHEET_FRAME_DLG (HID_BASE + 1464)
-#define HID_STYLE_SHEET_DOC_DLG (HID_BASE + 1465)
-#define HID_FORMAT_RESET (HID_BASE + 1469)
-#define HID_FRAME_TO_TOP (HID_BASE + 1470)
-#define HID_FRAME_TO_BOTTOM (HID_BASE + 1471)
-#define HID_FRAME_NOWRAP (HID_BASE + 1472)
-#define HID_FRAME_WRAP (HID_BASE + 1473)
-#define HID_FRAME_WRAPTHRU (HID_BASE + 1474)
-#define HID_FRAME_ALIGN_HORZ_LEFT (HID_BASE + 1475)
-#define HID_FRAME_ALIGN_HORZ_RIGHT (HID_BASE + 1476)
-#define HID_FRAME_ALIGN_HORZ_CENTER (HID_BASE + 1477)
-#define HID_FRAME_ALIGN_VERT_TOP (HID_BASE + 1478)
-#define HID_FRAME_ALIGN_VERT_BOTTOM (HID_BASE + 1479)
-#define HID_FRAME_ALIGN_VERT_CENTER (HID_BASE + 1480)
-#define HID_SET_FRM_SIZE (HID_BASE + 1481)
-#define HID_SET_FRM_POSITION (HID_BASE + 1482)
-#define HID_SET_FRM_ANCHOR (HID_BASE + 1483)
-#define HID_SET_FRM_WRAP (HID_BASE + 1484)
-#define HID_SET_FRM_DIST (HID_BASE + 1485)
-#define HID_SET_FRM_OPTIONS (HID_BASE + 1486)
-#define HID_SET_GRF_MIRROR (HID_BASE + 1488)
-#define HID_SET_TABLE_WIDTH (HID_BASE + 1489)
-#define HID_SET_TABLE_ALIGN (HID_BASE + 1490)
-#define HID_SET_CHAR_STYLE (HID_BASE + 1491)
-#define HID_SET_PARA_STYLE (HID_BASE + 1492)
-#define HID_SET_PAGE_STYLE (HID_BASE + 1493)
-#define HID_SET_FRM_MACRO (HID_BASE + 1494)
-#define HID_SET_FRM_COLUMNS (HID_BASE + 1495)
-#define HID_SET_FRM_COLUMN_WIDTH (HID_BASE + 1496)
-#define HID_UPDATE_STYLES_DIRECT (HID_BASE + 1497)
-
-#define HID_TABLE_INSERT_ROW (HID_BASE + 1501)
-#define HID_TABLE_DELETE_ROW (HID_BASE + 1503)
-#define HID_TABLE_DELETE_COL (HID_BASE + 1504)
-#define HID_TABLE_MERGE_CELLS (HID_BASE + 1506)
-#define HID_AUTOFMT_TABLE (HID_BASE + 1507)
-#define HID_SWDLG_STRINPUT (HID_BASE + 1508)
-#define HID_TABLE_SET_ULSPACE (HID_BASE + 1509)
-#define HID_TABLE_SET_GRID (HID_BASE + 1510)
-#define HID_TABLE_SET_SHADOW (HID_BASE + 1511)
-#define HID_TABLE_SELECT_ROW (HID_BASE + 1513)
-#define HID_TABLE_SELECT_COL (HID_BASE + 1514)
-#define HID_TABLE_SELECT_ALL (HID_BASE + 1515)
-#define HID_TABLE_SET_READ_ONLY_CELLS (HID_BASE + 1517)
-#define HID_TABLE_UNSET_READ_ONLY_CELLS (HID_BASE + 1519)
-#define HID_PAGE_STYLE_SET_COLS (HID_BASE + 1538)
-#define HID_SET_PROP_LINE_SPACE (HID_BASE + 1540)
-#define HID_SET_ABS_LINE_SPACE (HID_BASE + 1541)
-
-#define HID_SPELLING_DLG (HID_BASE + 1601)
-#define HID_THESAURUS_DLG (HID_BASE + 1604)
-#define HID_HYPHENATE_OPT_DLG (HID_BASE + 1607)
-#define HID_SORTING (HID_BASE + 1613)
-#define HID_SORTING_DLG (HID_BASE + 1614)
-#define HID_CALCULATE (HID_BASE + 1615)
-#define HID_RECORD_MACRO_DLG (HID_BASE + 1622)
-#define HID_PLAY_MACRO_DLG (HID_BASE + 1624)
-#define HID_CONFIG_DLG (HID_BASE + 1627)
-#define HID_EXPAND_GLOSSARY (HID_BASE + 1628)
-#define HID_RENAME_GLOSSARY (HID_BASE + 1629)
-#define HID_CONFIG_MENU (HID_BASE + 1630)
-#define HID_CONFIG_KEY (HID_BASE + 1631)
-#define HID_ASSIGN_LOCAL_MACRO_DLG (HID_BASE + 1632)
-#define HID_COMPILE_MACRO (HID_BASE + 1633)
-#define HID_CONFIG_VIEWOPTIONS (HID_BASE + 1635)
-#define HID_CONFIG_COLORS (HID_BASE + 1636)
-#define HID_INSERT_GLOSSARY (HID_BASE + 1640)
-#define HID_AUTO_CORRECT (HID_BASE + 1649)
-#define HID_AUTO_CORRECT_DLG (HID_BASE + 1650)
-#define HID_HELP_PI (HID_BASE + 1655)
-#define HID_NAVIGATION_PI (HID_BASE + 1656)
-#define HID_TEMPLATE_PI (HID_BASE + 1657)
-#define HID_ADDR_PI (HID_BASE + 1658)
-#define HID_NAVIGATION_PI_GOTO_PAGE (HID_BASE + 1659)
-#define HID_LETTER_WIZZARD (HID_BASE + 1660)
-#define HID_FAX_WIZZARD (HID_BASE + 1661)
-#define HID_MEMO_WIZZARD (HID_BASE + 1662)
-#define HID_AGENDA_WIZZARD (HID_BASE + 1663)
-
-#define HID_NEW_WINDOW (HID_BASE + 1701)
-#define HID_ARRANGE_ALL_WIN (HID_BASE + 1702)
-#define HID_ARRANGE_CASCADE_WIN (HID_BASE + 1703)
-#define HID_ARRANGE_HORZ_WIN (HID_BASE + 1704)
-#define HID_ARRANGE_VERT_WIN (HID_BASE + 1705)
-
-#define HID_SHOW_HELP_INDEX (HID_BASE + 1802)
-#define HID_SHOW_KEYBOARD_HELP (HID_BASE + 1803)
-#define HID_SHOW_HELP_MANUAL (HID_BASE + 1804)
-#define HID_SHOW_UPDATE_HELP (HID_BASE + 1805)
-
-#define HID_CHAR_LEFT (HID_BASE + 1901)
-#define HID_CHAR_RIGHT (HID_BASE + 1902)
-#define HID_LINE_UP (HID_BASE + 1903)
-#define HID_LINE_DOWN (HID_BASE + 1904)
-#define HID_START_OF_LINE (HID_BASE + 1905)
-#define HID_END_OF_LINE (HID_BASE + 1906)
-#define HID_START_OF_DOCUMENT (HID_BASE + 1907)
-#define HID_END_OF_DOCUMENT (HID_BASE + 1908)
-#define HID_START_OF_NEXT_PAGE (HID_BASE + 1909)
-#define HID_END_OF_NEXT_PAGE (HID_BASE + 1910)
-#define HID_START_OF_PREV_PAGE (HID_BASE + 1911)
-#define HID_END_OF_PREV_PAGE (HID_BASE + 1912)
-#define HID_START_OF_PAGE (HID_BASE + 1913)
-#define HID_END_OF_PAGE (HID_BASE + 1914)
-#define HID_START_OF_COLUMN (HID_BASE + 1917)
-#define HID_END_OF_COLUMN (HID_BASE + 1918)
-#define HID_START_OF_PARA (HID_BASE + 1919)
-#define HID_END_OF_PARA (HID_BASE + 1920)
-#define HID_NEXT_WORD (HID_BASE + 1921)
-#define HID_PREV_WORD (HID_BASE + 1922)
-#define HID_NEXT_SENT (HID_BASE + 1923)
-#define HID_PREV_SENT (HID_BASE + 1924)
-#define HID_DELETE (HID_BASE + 1925)
-#define HID_BACKSPACE (HID_BASE + 1926)
-#define HID_DELETE_SENT (HID_BASE + 1927)
-#define HID_DELETE_BACK_SENT (HID_BASE + 1928)
-#define HID_DELETE_WORD (HID_BASE + 1929)
-#define HID_DELETE_BACK_WORD (HID_BASE + 1930)
-#define HID_DELETE_LINE (HID_BASE + 1931)
-#define HID_DELETE_BACK_LINE (HID_BASE + 1932)
-#define HID_DELETE_PARA (HID_BASE + 1933)
-#define HID_DELETE_BACK_PARA (HID_BASE + 1934)
-#define HID_DELETE_WHOLE_LINE (HID_BASE + 1935)
-#define HID_SET_INS_MODE (HID_BASE + 1936)
-#define HID_PAGEUP (HID_BASE + 1937)
-#define HID_PAGEDOWN (HID_BASE + 1938)
-#define HID_SET_ADD_MODE (HID_BASE + 1939)
-#define HID_SET_EXT_MODE (HID_BASE + 1940)
-#define HID_ESCAPE (HID_BASE + 1941)
-#define HID_SELECT_WORD (HID_BASE + 1943)
-#define HID_START_TABLE (HID_BASE + 1947)
-#define HID_END_TABLE (HID_BASE + 1948)
-#define HID_NEXT_TABLE (HID_BASE + 1949)
-#define HID_PREV_TABLE (HID_BASE + 1950)
-#define HID_START_OF_NEXT_COLUMN (HID_BASE + 1951)
-#define HID_END_OF_NEXT_COLUMN (HID_BASE + 1952)
-#define HID_START_OF_PREV_COLUMN (HID_BASE + 1953)
-#define HID_END_OF_PREV_COLUMN (HID_BASE + 1954)
-#define HID_FOOTNOTE_TO_ANCHOR (HID_BASE + 1955)
-#define HID_NEXT_FOOTNOTE (HID_BASE + 1956)
-#define HID_PREV_FOOTNOTE (HID_BASE + 1957)
-#define HID_CNTNT_TO_NEXT_FRAME (HID_BASE + 1958)
-#define HID_FRAME_TO_ANCHOR (HID_BASE + 1959)
-#define HID_TO_HEADER (HID_BASE + 1960)
-#define HID_TO_FOOTER (HID_BASE + 1961)
-#define HID_IDX_MARK_TO_IDX (HID_BASE + 1962)
-
-#define HID_ENVELOP (HID_BASE + 2050)
-#define HID_LABEL (HID_BASE + 2051)
-#define HID_ENVELOP_PRINT (HID_BASE + 2052)
-
-#define HID_NAVIGATION_IMGBTN (HID_BASE + 2054)
-#define HID_ENVELOP_INSERT (HID_BASE + 2055)
-
-#define HID_WEBTOOLS_TOOLBOX (HID_BASE + 2056)
-#define HID_WEBTEXT_TOOLBOX (HID_BASE + 2057)
-#define HID_WEBFRAME_TOOLBOX (HID_BASE + 2058)
-#define HID_TEXT_TOOLBOX (HID_BASE + 2059)
-#define HID_TABLE_TOOLBOX (HID_BASE + 2060)
-#define HID_FRAME_TOOLBOX (HID_BASE + 2061)
-#define HID_GRAFIK_TOOLBOX (HID_BASE + 2062)
-#define HID_OLE_TOOLBOX (HID_BASE + 2063)
-#define HID_DRAW_TOOLBOX (HID_BASE + 2064)
-#define HID_BEZIER_TOOLBOX (HID_BASE + 2066)
-#define HID_DRAW_TEXT_TOOLBOX (HID_BASE + 2067)
-#define HID_NUM_TOOLBOX (HID_BASE + 2068)
-#define HID_TOOLS_TOOLBOX (HID_BASE + 2069)
-#define HID_SRCVIEW_TOOLBOX (HID_BASE + 2070)
-
-#define HID_LABEL_INSERT (HID_BASE + 2071)
-#define HID_CALC_TOOLBOX (HID_BASE + 2072)
-#define HID_PVIEW_TOOLBOX (HID_BASE + 2073)
-
-#define HID_FIELD_INSERT (HID_BASE + 2074)
-#define HID_FIELD_CLOSE (HID_BASE + 2075)
-
-#define HID_COND_COLL_TABLIST (HID_BASE + 2076)
-
-#define HID_DB_SELECTION_TLB (HID_BASE + 2077)
-#define HID_FIELD_DINF_TYPE (HID_BASE + 2078)
-
-#define HID_DRAWFORM_TOOLBOX (HID_BASE + 2079)
-#define HID_SELECT_TEMPLATE (HID_BASE + 2080)
-
-#define HID_AP_INSERT_DB_SEL (HID_BASE + 2081)
-#define HID_WEBGRAPHIC_TOOLBOX (HID_BASE + 2082)
-#define HID_OUTLINE_FORM (HID_BASE + 2083)
-#define HID_NUM_RESET (HID_BASE + 2084)
-
-#define HID_AUTOFORMAT_REJECT (HID_BASE + 2085)
-#define HID_AUTOFORMAT_ACCEPT (HID_BASE + 2086)
-#define HID_AUTOFORMAT_EDIT_CHG (HID_BASE + 2087)
+#define HID_CLOSE_FILE "SW_HID_CLOSE_FILE"
+#define HID_LAUNCH_REGISTRY "SW_HID_LAUNCH_REGISTRY"
+#define HID_MERGE_FILE "SW_HID_MERGE_FILE"
+#define HID_MERGE_FILE_DLG "SW_HID_MERGE_FILE_DLG"
+#define HID_NEW_FILE "SW_HID_NEW_FILE"
+#define HID_OPEN_FILE "SW_HID_OPEN_FILE"
+#define HID_OPEN_LASTVERSION "SW_HID_OPEN_LASTVERSION"
+#define HID_PRINT_FILE "SW_HID_PRINT_FILE"
+#define HID_PRINT_FILE_OPTIONS "SW_HID_PRINT_FILE_OPTIONS"
+#define HID_SAVE_FILE_AS "SW_HID_SAVE_FILE_AS"
+#define HID_SAVE_FILE "SW_HID_SAVE_FILE"
+#define HID_SETUP_PRINTER_DLG "SW_HID_SETUP_PRINTER_DLG"
+#define HID_EXIT "SW_HID_EXIT"
+#define HID_CREATE_DOCUMENT "SW_HID_CREATE_DOCUMENT"
+#define HID_DOCSTAT_DLG "SW_HID_DOCSTAT_DLG"
+#define HID_LOAD_TEMPLATE_DLG "SW_HID_LOAD_TEMPLATE_DLG"
+#define HID_SAVE_ALL "SW_HID_SAVE_ALL"
+#define HID_NEW_FILE_DEFAULT "SW_HID_NEW_FILE_DEFAULT"
+#define HID_PRINT_FILE_DEFAULT "SW_HID_PRINT_FILE_DEFAULT"
+#define HID_FAX "SW_HID_FAX"
+#define HID_SELECT_DATABASE "SW_HID_SELECT_DATABASE"
+#define HID_DOC_INFO_DLG "SW_HID_DOC_INFO_DLG"
+#define HID_DOC_MGR_DLG "SW_HID_DOC_MGR_DLG"
+#define HID_OPTCAPTION_CLB "SW_HID_OPTCAPTION_CLB"
+
+#define HID_COPY "SW_HID_COPY"
+#define HID_CUT "SW_HID_CUT"
+#define HID_EDIT_FIELD "SW_HID_EDIT_FIELD"
+#define HID_EDIT_FILE_INFO_DLG "SW_HID_EDIT_FILE_INFO_DLG"
+#define HID_EDIT_LINK_DLG "SW_HID_EDIT_LINK_DLG"
+#define HID_EDIT_OBJECT "SW_HID_EDIT_OBJECT"
+#define HID_GOTO "SW_HID_GOTO"
+#define HID_SET_FIELD_VALUE "SW_HID_SET_FIELD_VALUE"
+#define HID_PASTE "SW_HID_PASTE"
+#define HID_REDO "SW_HID_REDO"
+#define HID_SEARCH "SW_HID_SEARCH"
+#define HID_REPLACE "SW_HID_REPLACE"
+#define HID_SELECT_ALL "SW_HID_SELECT_ALL"
+#define HID_UNDO "SW_HID_UNDO"
+#define HID_REPEAT "SW_HID_REPEAT"
+#define HID_BUFFER_UPDATE "SW_HID_BUFFER_UPDATE"
+#define HID_UPDATE_FIELDS "SW_HID_UPDATE_FIELDS"
+#define HID_EXECUTE_MACROFIELD "SW_HID_EXECUTE_MACROFIELD"
+#define HID_EDIT_FORMULA "SW_HID_EDIT_FORMULA"
+#define HID_CALC_TABLE "SW_HID_CALC_TABLE"
+#define HID_NUM_BULLET_DOWN "SW_HID_NUM_BULLET_DOWN"
+#define HID_NUM_BULLET_UP "SW_HID_NUM_BULLET_UP"
+#define HID_NUM_BULLET_PREV "SW_HID_NUM_BULLET_PREV"
+#define HID_NUM_BULLET_NEXT "SW_HID_NUM_BULLET_NEXT"
+#define HID_NUM_BULLET_MOVEUP "SW_HID_NUM_BULLET_MOVEUP"
+#define HID_NUM_BULLET_MOVEDOWN "SW_HID_NUM_BULLET_MOVEDOWN"
+#define HID_NUM_BULLET_NONUM "SW_HID_NUM_BULLET_NONUM"
+#define HID_NUM_BULLET_OFF "SW_HID_NUM_BULLET_OFF"
+#define HID_NUM_BULLET_ON "SW_HID_NUM_BULLET_ON"
+#define HID_NUM_BULLET_OUTLINE_DOWN "SW_HID_NUM_BULLET_OUTLINE_DOWN"
+#define HID_NUM_BULLET_OUTLINE_UP "SW_HID_NUM_BULLET_OUTLINE_UP"
+#define HID_NUM_BULLET_OUTLINE_MOVEUP "SW_HID_NUM_BULLET_OUTLINE_MOVEUP"
+#define HID_NUM_BULLET_OUTLINE_MOVEDOWN "SW_HID_NUM_BULLET_OUTLINE_MOVEDOWN"
+#define HID_UPDATE_INPUTFIELDS "SW_HID_UPDATE_INPUTFIELDS"
+#define HID_NUM_NUMBERING_ON "SW_HID_NUM_NUMBERING_ON"
+#define HID_REPEAT_SEARCH "SW_HID_REPEAT_SEARCH"
+#define HID_REPAGINATE "SW_HID_REPAGINATE"
+
+#define HID_REFRESH_VIEW "SW_HID_REFRESH_VIEW"
+#define HID_RIBBON "SW_HID_RIBBON"
+#define HID_RULER "SW_HID_RULER"
+#define HID_STATUSBAR "SW_HID_STATUSBAR"
+#define HID_TOOLBOX "SW_HID_TOOLBOX"
+#define HID_VIEW_BOUNDS "SW_HID_VIEW_BOUNDS"
+#define HID_VIEW_FIELDS "SW_HID_VIEW_FIELDS"
+#define HID_VLINEAL "SW_HID_VLINEAL"
+#define HID_VSCROLLBAR "SW_HID_VSCROLLBAR"
+#define HID_HSCROLLBAR "SW_HID_HSCROLLBAR"
+#define HID_VIEW_META_CHARS "SW_HID_VIEW_META_CHARS"
+#define HID_VIEW_MARKS "SW_HID_VIEW_MARKS"
+#define HID_VIEW_FIELDNAME "SW_HID_VIEW_FIELDNAME"
+#define HID_VIEW_TABLEGRID "SW_HID_VIEW_TABLEGRID"
+#define HID_ZOOM "SW_HID_ZOOM"
+
+#define HID_DELETE_BOOKMARK "SW_HID_DELETE_BOOKMARK"
+#define HID_INSERT_BREAK "SW_HID_INSERT_BREAK"
+#define HID_INSERT_COLUMN_BREAK "SW_HID_INSERT_COLUMN_BREAK"
+#define HID_INSERT_FILE "SW_HID_INSERT_FILE"
+#define HID_INSERT_FOOTNOTE "SW_HID_INSERT_FOOTNOTE"
+#define HID_INSERT_GRAFIC "SW_HID_INSERT_GRAFIC"
+#define HID_INSERT_LINEBREAK "SW_HID_INSERT_LINEBREAK"
+#define HID_INSERT_MERGEFIELD_DLG "SW_HID_INSERT_MERGEFIELD_DLG"
+#define HID_INSERT_OBJECT_DLG "SW_HID_INSERT_OBJECT_DLG"
+#define HID_INSERT_PAGEBREAK "SW_HID_INSERT_PAGEBREAK"
+#define HID_INSERT_RECORD "SW_HID_INSERT_RECORD"
+#define HID_MERGE_RECORD "SW_HID_MERGE_RECORD"
+#define HID_INSERT_SYMBOL "SW_HID_INSERT_SYMBOL"
+#define HID_INSERT_STRING "SW_HID_INSERT_STRING"
+#define HID_INSERT_COLS "SW_HID_INSERT_COLS"
+#define HID_INSERT_FRAME_INTERACT "SW_HID_INSERT_FRAME_INTERACT"
+#define HID_INSERT_FRAME "SW_HID_INSERT_FRAME"
+#define HID_INSERT_IDX_ENTRY "SW_HID_INSERT_IDX_ENTRY"
+#define HID_INSERT_USERIDX_ENTRY "SW_HID_INSERT_USERIDX_ENTRY"
+#define HID_INSERT_CNTNTIDX_ENTRY "SW_HID_INSERT_CNTNTIDX_ENTRY"
+#define HID_INSERT_SOFT_HYPHEN "SW_HID_INSERT_SOFT_HYPHEN"
+#define HID_INSERT_HARD_SPACE "SW_HID_INSERT_HARD_SPACE"
+
+#define HID_SET_FONT "SW_HID_SET_FONT"
+#define HID_SET_FONT_SIZE "SW_HID_SET_FONT_SIZE"
+#define HID_GROW_FONT_SIZE "SW_HID_GROW_FONT_SIZE"
+#define HID_SHRINK_FONT_SIZE "SW_HID_SHRINK_FONT_SIZE"
+#define HID_SET_BOLD "SW_HID_SET_BOLD"
+#define HID_SET_ITALIC "SW_HID_SET_ITALIC"
+#define HID_SET_SHADOW "SW_HID_SET_SHADOW"
+#define HID_SET_OUTLINE "SW_HID_SET_OUTLINE"
+#define HID_SET_UNDERLINE "SW_HID_SET_UNDERLINE"
+#define HID_SET_STRIKEOUT "SW_HID_SET_STRIKEOUT"
+#define HID_SET_SUPER_SCRIPT "SW_HID_SET_SUPER_SCRIPT"
+#define HID_SET_SUB_SCRIPT "SW_HID_SET_SUB_SCRIPT"
+#define HID_SET_COLOR "SW_HID_SET_COLOR"
+#define HID_SET_CASEMAP "SW_HID_SET_CASEMAP"
+#define HID_SET_LANGUAGE "SW_HID_SET_LANGUAGE"
+#define HID_SET_KERNING "SW_HID_SET_KERNING"
+#define HID_INDENT_TO_TABSTOP "SW_HID_INDENT_TO_TABSTOP"
+#define HID_SET_LEFT_PARA "SW_HID_SET_LEFT_PARA"
+#define HID_SET_RIGHT_PARA "SW_HID_SET_RIGHT_PARA"
+#define HID_SET_CENTER_PARA "SW_HID_SET_CENTER_PARA"
+#define HID_SET_JUSTIFY_PARA "SW_HID_SET_JUSTIFY_PARA"
+#define HID_SET_LINE_SPACE_1 "SW_HID_SET_LINE_SPACE_1"
+#define HID_SET_LINE_SPACE_15 "SW_HID_SET_LINE_SPACE_15"
+#define HID_SET_LINE_SPACE_2 "SW_HID_SET_LINE_SPACE_2"
+#define HID_FLIP_HORZ_GRAFIC "SW_HID_FLIP_HORZ_GRAFIC"
+#define HID_FLIP_VERT_GRAFIC "SW_HID_FLIP_VERT_GRAFIC"
+#define HID_SET_ADJUST "SW_HID_SET_ADJUST"
+#define HID_SET_LRMARGIN "SW_HID_SET_LRMARGIN"
+#define HID_SET_ULMARGIN "SW_HID_SET_ULMARGIN"
+#define HID_UNINDENT_TO_TABSTOP "SW_HID_UNINDENT_TO_TABSTOP"
+#define HID_SET_HYPHEN_ZONE "SW_HID_SET_HYPHEN_ZONE"
+#define HID_SET_PAGE_BREAK "SW_HID_SET_PAGE_BREAK"
+#define HID_SET_KEEP_TOGETHER "SW_HID_SET_KEEP_TOGETHER"
+#define HID_SET_WIDOW "SW_HID_SET_WIDOW"
+#define HID_SET_ORPHAN "SW_HID_SET_ORPHAN"
+#define HID_FORMAT_SHADOW "SW_HID_FORMAT_SHADOW"
+#define HID_FORMAT_BORDER "SW_HID_FORMAT_BORDER"
+#define HID_FORMAT_CHAR_DLG "SW_HID_FORMAT_CHAR_DLG"
+#define HID_FORMAT_PARA_DLG "SW_HID_FORMAT_PARA_DLG"
+#define HID_FORMAT_TAB "SW_HID_FORMAT_TAB"
+#define HID_FORMAT_TAB_DLG "SW_HID_FORMAT_TAB_DLG"
+#define HID_FORMAT_BORDER_DLG "SW_HID_FORMAT_BORDER_DLG"
+#define HID_FORMAT_BACKGROUND "SW_HID_FORMAT_BACKGROUND"
+#define HID_FORMAT_BACKGROUND_DLG "SW_HID_FORMAT_BACKGROUND_DLG"
+#define HID_FORMAT_PAGE "SW_HID_FORMAT_PAGE"
+#define HID_FORMAT_PAGE_DLG "SW_HID_FORMAT_PAGE_DLG"
+#define HID_FORMAT_DROPCAPS "SW_HID_FORMAT_DROPCAPS"
+#define HID_FORMAT_FRAME_DLG "SW_HID_FORMAT_FRAME_DLG"
+#define HID_FORMAT_GRAFIC_DLG "SW_HID_FORMAT_GRAFIC_DLG"
+#define HID_FORMAT_TABLE_DLG "SW_HID_FORMAT_TABLE_DLG"
+#define HID_NEW_STYLE_BY_EXAMPLE "SW_HID_NEW_STYLE_BY_EXAMPLE"
+#define HID_UPDATE_STYLE_BY_EXAMPLE "SW_HID_UPDATE_STYLE_BY_EXAMPLE"
+#define HID_STYLE_SHEET_FRAME_DLG "SW_HID_STYLE_SHEET_FRAME_DLG"
+#define HID_STYLE_SHEET_DOC_DLG "SW_HID_STYLE_SHEET_DOC_DLG"
+#define HID_FORMAT_RESET "SW_HID_FORMAT_RESET"
+#define HID_FRAME_TO_TOP "SW_HID_FRAME_TO_TOP"
+#define HID_FRAME_TO_BOTTOM "SW_HID_FRAME_TO_BOTTOM"
+#define HID_FRAME_NOWRAP "SW_HID_FRAME_NOWRAP"
+#define HID_FRAME_WRAP "SW_HID_FRAME_WRAP"
+#define HID_FRAME_WRAPTHRU "SW_HID_FRAME_WRAPTHRU"
+#define HID_FRAME_ALIGN_HORZ_LEFT "SW_HID_FRAME_ALIGN_HORZ_LEFT"
+#define HID_FRAME_ALIGN_HORZ_RIGHT "SW_HID_FRAME_ALIGN_HORZ_RIGHT"
+#define HID_FRAME_ALIGN_HORZ_CENTER "SW_HID_FRAME_ALIGN_HORZ_CENTER"
+#define HID_FRAME_ALIGN_VERT_TOP "SW_HID_FRAME_ALIGN_VERT_TOP"
+#define HID_FRAME_ALIGN_VERT_BOTTOM "SW_HID_FRAME_ALIGN_VERT_BOTTOM"
+#define HID_FRAME_ALIGN_VERT_CENTER "SW_HID_FRAME_ALIGN_VERT_CENTER"
+#define HID_SET_FRM_SIZE "SW_HID_SET_FRM_SIZE"
+#define HID_SET_FRM_POSITION "SW_HID_SET_FRM_POSITION"
+#define HID_SET_FRM_ANCHOR "SW_HID_SET_FRM_ANCHOR"
+#define HID_SET_FRM_WRAP "SW_HID_SET_FRM_WRAP"
+#define HID_SET_FRM_DIST "SW_HID_SET_FRM_DIST"
+#define HID_SET_FRM_OPTIONS "SW_HID_SET_FRM_OPTIONS"
+#define HID_SET_GRF_MIRROR "SW_HID_SET_GRF_MIRROR"
+#define HID_SET_TABLE_WIDTH "SW_HID_SET_TABLE_WIDTH"
+#define HID_SET_TABLE_ALIGN "SW_HID_SET_TABLE_ALIGN"
+#define HID_SET_CHAR_STYLE "SW_HID_SET_CHAR_STYLE"
+#define HID_SET_PARA_STYLE "SW_HID_SET_PARA_STYLE"
+#define HID_SET_PAGE_STYLE "SW_HID_SET_PAGE_STYLE"
+#define HID_SET_FRM_MACRO "SW_HID_SET_FRM_MACRO"
+#define HID_SET_FRM_COLUMNS "SW_HID_SET_FRM_COLUMNS"
+#define HID_SET_FRM_COLUMN_WIDTH "SW_HID_SET_FRM_COLUMN_WIDTH"
+#define HID_UPDATE_STYLES_DIRECT "SW_HID_UPDATE_STYLES_DIRECT"
+
+#define HID_TABLE_INSERT_ROW "SW_HID_TABLE_INSERT_ROW"
+#define HID_TABLE_DELETE_ROW "SW_HID_TABLE_DELETE_ROW"
+#define HID_TABLE_DELETE_COL "SW_HID_TABLE_DELETE_COL"
+#define HID_TABLE_MERGE_CELLS "SW_HID_TABLE_MERGE_CELLS"
+#define HID_AUTOFMT_TABLE "SW_HID_AUTOFMT_TABLE"
+#define HID_SWDLG_STRINPUT "SW_HID_SWDLG_STRINPUT"
+#define HID_TABLE_SET_ULSPACE "SW_HID_TABLE_SET_ULSPACE"
+#define HID_TABLE_SET_GRID "SW_HID_TABLE_SET_GRID"
+#define HID_TABLE_SET_SHADOW "SW_HID_TABLE_SET_SHADOW"
+#define HID_TABLE_SELECT_ROW "SW_HID_TABLE_SELECT_ROW"
+#define HID_TABLE_SELECT_COL "SW_HID_TABLE_SELECT_COL"
+#define HID_TABLE_SELECT_ALL "SW_HID_TABLE_SELECT_ALL"
+#define HID_TABLE_SET_READ_ONLY_CELLS "SW_HID_TABLE_SET_READ_ONLY_CELLS"
+#define HID_TABLE_UNSET_READ_ONLY_CELLS "SW_HID_TABLE_UNSET_READ_ONLY_CELLS"
+#define HID_PAGE_STYLE_SET_COLS "SW_HID_PAGE_STYLE_SET_COLS"
+#define HID_SET_PROP_LINE_SPACE "SW_HID_SET_PROP_LINE_SPACE"
+#define HID_SET_ABS_LINE_SPACE "SW_HID_SET_ABS_LINE_SPACE"
+
+#define HID_SPELLING_DLG "SW_HID_SPELLING_DLG"
+#define HID_THESAURUS_DLG "SW_HID_THESAURUS_DLG"
+#define HID_HYPHENATE_OPT_DLG "SW_HID_HYPHENATE_OPT_DLG"
+#define HID_SORTING "SW_HID_SORTING"
+#define HID_SORTING_DLG "SW_HID_SORTING_DLG"
+#define HID_CALCULATE "SW_HID_CALCULATE"
+#define HID_RECORD_MACRO_DLG "SW_HID_RECORD_MACRO_DLG"
+#define HID_PLAY_MACRO_DLG "SW_HID_PLAY_MACRO_DLG"
+#define HID_CONFIG_DLG "SW_HID_CONFIG_DLG"
+#define HID_EXPAND_GLOSSARY "SW_HID_EXPAND_GLOSSARY"
+#define HID_RENAME_GLOSSARY "SW_HID_RENAME_GLOSSARY"
+#define HID_CONFIG_MENU "SW_HID_CONFIG_MENU"
+#define HID_CONFIG_KEY "SW_HID_CONFIG_KEY"
+#define HID_ASSIGN_LOCAL_MACRO_DLG "SW_HID_ASSIGN_LOCAL_MACRO_DLG"
+#define HID_COMPILE_MACRO "SW_HID_COMPILE_MACRO"
+#define HID_CONFIG_VIEWOPTIONS "SW_HID_CONFIG_VIEWOPTIONS"
+#define HID_CONFIG_COLORS "SW_HID_CONFIG_COLORS"
+#define HID_INSERT_GLOSSARY "SW_HID_INSERT_GLOSSARY"
+#define HID_AUTO_CORRECT "SW_HID_AUTO_CORRECT"
+#define HID_AUTO_CORRECT_DLG "SW_HID_AUTO_CORRECT_DLG"
+#define HID_HELP_PI "SW_HID_HELP_PI"
+#define HID_NAVIGATION_PI "SW_HID_NAVIGATION_PI"
+#define HID_TEMPLATE_PI "SW_HID_TEMPLATE_PI"
+#define HID_ADDR_PI "SW_HID_ADDR_PI"
+#define HID_NAVIGATION_PI_GOTO_PAGE "SW_HID_NAVIGATION_PI_GOTO_PAGE"
+#define HID_LETTER_WIZZARD "SW_HID_LETTER_WIZZARD"
+#define HID_FAX_WIZZARD "SW_HID_FAX_WIZZARD"
+#define HID_MEMO_WIZZARD "SW_HID_MEMO_WIZZARD"
+#define HID_AGENDA_WIZZARD "SW_HID_AGENDA_WIZZARD"
+
+#define HID_NEW_WINDOW "SW_HID_NEW_WINDOW"
+#define HID_ARRANGE_ALL_WIN "SW_HID_ARRANGE_ALL_WIN"
+#define HID_ARRANGE_CASCADE_WIN "SW_HID_ARRANGE_CASCADE_WIN"
+#define HID_ARRANGE_HORZ_WIN "SW_HID_ARRANGE_HORZ_WIN"
+#define HID_ARRANGE_VERT_WIN "SW_HID_ARRANGE_VERT_WIN"
+
+#define HID_SHOW_HELP_INDEX "SW_HID_SHOW_HELP_INDEX"
+#define HID_SHOW_KEYBOARD_HELP "SW_HID_SHOW_KEYBOARD_HELP"
+#define HID_SHOW_HELP_MANUAL "SW_HID_SHOW_HELP_MANUAL"
+#define HID_SHOW_UPDATE_HELP "SW_HID_SHOW_UPDATE_HELP"
+
+#define HID_CHAR_LEFT "SW_HID_CHAR_LEFT"
+#define HID_CHAR_RIGHT "SW_HID_CHAR_RIGHT"
+#define HID_LINE_UP "SW_HID_LINE_UP"
+#define HID_LINE_DOWN "SW_HID_LINE_DOWN"
+#define HID_START_OF_LINE "SW_HID_START_OF_LINE"
+#define HID_END_OF_LINE "SW_HID_END_OF_LINE"
+#define HID_START_OF_DOCUMENT "SW_HID_START_OF_DOCUMENT"
+#define HID_END_OF_DOCUMENT "SW_HID_END_OF_DOCUMENT"
+#define HID_START_OF_NEXT_PAGE "SW_HID_START_OF_NEXT_PAGE"
+#define HID_END_OF_NEXT_PAGE "SW_HID_END_OF_NEXT_PAGE"
+#define HID_START_OF_PREV_PAGE "SW_HID_START_OF_PREV_PAGE"
+#define HID_END_OF_PREV_PAGE "SW_HID_END_OF_PREV_PAGE"
+#define HID_START_OF_PAGE "SW_HID_START_OF_PAGE"
+#define HID_END_OF_PAGE "SW_HID_END_OF_PAGE"
+#define HID_START_OF_COLUMN "SW_HID_START_OF_COLUMN"
+#define HID_END_OF_COLUMN "SW_HID_END_OF_COLUMN"
+#define HID_START_OF_PARA "SW_HID_START_OF_PARA"
+#define HID_END_OF_PARA "SW_HID_END_OF_PARA"
+#define HID_NEXT_WORD "SW_HID_NEXT_WORD"
+#define HID_PREV_WORD "SW_HID_PREV_WORD"
+#define HID_NEXT_SENT "SW_HID_NEXT_SENT"
+#define HID_PREV_SENT "SW_HID_PREV_SENT"
+#define HID_DELETE "SW_HID_DELETE"
+#define HID_BACKSPACE "SW_HID_BACKSPACE"
+#define HID_DELETE_SENT "SW_HID_DELETE_SENT"
+#define HID_DELETE_BACK_SENT "SW_HID_DELETE_BACK_SENT"
+#define HID_DELETE_WORD "SW_HID_DELETE_WORD"
+#define HID_DELETE_BACK_WORD "SW_HID_DELETE_BACK_WORD"
+#define HID_DELETE_LINE "SW_HID_DELETE_LINE"
+#define HID_DELETE_BACK_LINE "SW_HID_DELETE_BACK_LINE"
+#define HID_DELETE_PARA "SW_HID_DELETE_PARA"
+#define HID_DELETE_BACK_PARA "SW_HID_DELETE_BACK_PARA"
+#define HID_DELETE_WHOLE_LINE "SW_HID_DELETE_WHOLE_LINE"
+#define HID_SET_INS_MODE "SW_HID_SET_INS_MODE"
+#define HID_PAGEUP "SW_HID_PAGEUP"
+#define HID_PAGEDOWN "SW_HID_PAGEDOWN"
+#define HID_SET_ADD_MODE "SW_HID_SET_ADD_MODE"
+#define HID_SET_EXT_MODE "SW_HID_SET_EXT_MODE"
+#define HID_ESCAPE "SW_HID_ESCAPE"
+#define HID_SELECT_WORD "SW_HID_SELECT_WORD"
+#define HID_START_TABLE "SW_HID_START_TABLE"
+#define HID_END_TABLE "SW_HID_END_TABLE"
+#define HID_NEXT_TABLE "SW_HID_NEXT_TABLE"
+#define HID_PREV_TABLE "SW_HID_PREV_TABLE"
+#define HID_START_OF_NEXT_COLUMN "SW_HID_START_OF_NEXT_COLUMN"
+#define HID_END_OF_NEXT_COLUMN "SW_HID_END_OF_NEXT_COLUMN"
+#define HID_START_OF_PREV_COLUMN "SW_HID_START_OF_PREV_COLUMN"
+#define HID_END_OF_PREV_COLUMN "SW_HID_END_OF_PREV_COLUMN"
+#define HID_FOOTNOTE_TO_ANCHOR "SW_HID_FOOTNOTE_TO_ANCHOR"
+#define HID_NEXT_FOOTNOTE "SW_HID_NEXT_FOOTNOTE"
+#define HID_PREV_FOOTNOTE "SW_HID_PREV_FOOTNOTE"
+#define HID_CNTNT_TO_NEXT_FRAME "SW_HID_CNTNT_TO_NEXT_FRAME"
+#define HID_FRAME_TO_ANCHOR "SW_HID_FRAME_TO_ANCHOR"
+#define HID_TO_HEADER "SW_HID_TO_HEADER"
+#define HID_TO_FOOTER "SW_HID_TO_FOOTER"
+#define HID_IDX_MARK_TO_IDX "SW_HID_IDX_MARK_TO_IDX"
+
+#define HID_ENVELOP "SW_HID_ENVELOP"
+#define HID_LABEL "SW_HID_LABEL"
+#define HID_ENVELOP_PRINT "SW_HID_ENVELOP_PRINT"
+
+#define HID_NAVIGATION_IMGBTN "SW_HID_NAVIGATION_IMGBTN"
+#define HID_ENVELOP_INSERT "SW_HID_ENVELOP_INSERT"
+
+#define HID_WEBTOOLS_TOOLBOX "SW_HID_WEBTOOLS_TOOLBOX"
+#define HID_WEBTEXT_TOOLBOX "SW_HID_WEBTEXT_TOOLBOX"
+#define HID_WEBFRAME_TOOLBOX "SW_HID_WEBFRAME_TOOLBOX"
+#define HID_TEXT_TOOLBOX "SW_HID_TEXT_TOOLBOX"
+#define HID_TABLE_TOOLBOX "SW_HID_TABLE_TOOLBOX"
+#define HID_FRAME_TOOLBOX "SW_HID_FRAME_TOOLBOX"
+#define HID_GRAFIK_TOOLBOX "SW_HID_GRAFIK_TOOLBOX"
+#define HID_OLE_TOOLBOX "SW_HID_OLE_TOOLBOX"
+#define HID_DRAW_TOOLBOX "SW_HID_DRAW_TOOLBOX"
+#define HID_BEZIER_TOOLBOX "SW_HID_BEZIER_TOOLBOX"
+#define HID_DRAW_TEXT_TOOLBOX "SW_HID_DRAW_TEXT_TOOLBOX"
+#define HID_NUM_TOOLBOX "SW_HID_NUM_TOOLBOX"
+#define HID_TOOLS_TOOLBOX "SW_HID_TOOLS_TOOLBOX"
+#define HID_SRCVIEW_TOOLBOX "SW_HID_SRCVIEW_TOOLBOX"
+
+#define HID_LABEL_INSERT "SW_HID_LABEL_INSERT"
+#define HID_CALC_TOOLBOX "SW_HID_CALC_TOOLBOX"
+#define HID_PVIEW_TOOLBOX "SW_HID_PVIEW_TOOLBOX"
+
+#define HID_FIELD_INSERT "SW_HID_FIELD_INSERT"
+#define HID_FIELD_CLOSE "SW_HID_FIELD_CLOSE"
+
+#define HID_COND_COLL_TABLIST "SW_HID_COND_COLL_TABLIST"
+
+#define HID_DB_SELECTION_TLB "SW_HID_DB_SELECTION_TLB"
+#define HID_FIELD_DINF_TYPE "SW_HID_FIELD_DINF_TYPE"
+
+#define HID_DRAWFORM_TOOLBOX "SW_HID_DRAWFORM_TOOLBOX"
+#define HID_SELECT_TEMPLATE "SW_HID_SELECT_TEMPLATE"
+
+#define HID_AP_INSERT_DB_SEL "SW_HID_AP_INSERT_DB_SEL"
+#define HID_WEBGRAPHIC_TOOLBOX "SW_HID_WEBGRAPHIC_TOOLBOX"
+#define HID_OUTLINE_FORM "SW_HID_OUTLINE_FORM"
+#define HID_NUM_RESET "SW_HID_NUM_RESET"
+
+#define HID_AUTOFORMAT_REJECT "SW_HID_AUTOFORMAT_REJECT"
+#define HID_AUTOFORMAT_ACCEPT "SW_HID_AUTOFORMAT_ACCEPT"
+#define HID_AUTOFORMAT_EDIT_CHG "SW_HID_AUTOFORMAT_EDIT_CHG"
//insert index/entries/Pattern buttons and edits
-#define HID_TOX_ENTRY_BUTTON (HID_BASE + 2088)
-#define HID_TOX_ENTRY_EDIT (HID_BASE + 2089)
-
-#define HID_DLG_NEW_USER_IDX (HID_BASE + 2090)
-#define HID_INSERT_IDX_MRK_OK (HID_BASE + 2091)
-#define HID_INSERT_IDX_MRK_CLOSE (HID_BASE + 2092)
-#define HID_INSERT_AUTH_MRK_OK (HID_BASE + 2093)
-#define HID_INSERT_AUTH_MRK_CLOSE (HID_BASE + 2094)
-#define HID_INSERT_IDX_MRK_DELETE (HID_BASE + 2095)
-#define HID_INSERT_IDX_MRK_NEW (HID_BASE + 2096)
-#define HID_INSERT_IDX_MRK_PREV (HID_BASE + 2097)
-#define HID_INSERT_IDX_MRK_PREV_SAME (HID_BASE + 2098)
-#define HID_INSERT_IDX_MRK_NEXT (HID_BASE + 2099)
-#define HID_INSERT_IDX_MRK_NEXT_SAME (HID_BASE + 2100)
-#define HID_INSERT_IDX_MRK_TYPE (HID_BASE + 2101)
-#define HID_INSERT_IDX_MRK_ENTRY (HID_BASE + 2102)
-#define HID_INSERT_IDX_MRK_PRIM_KEY (HID_BASE + 2103)
-#define HID_INSERT_IDX_MRK_SEC_KEY (HID_BASE + 2104)
-#define HID_INSERT_IDX_MRK_LEVEL (HID_BASE + 2105)
-#define HID_INSERT_IDX_MRK_MAIN_ENTRY (HID_BASE + 2106)
-#define HID_INSERT_IDX_MRK_APPLY_ALL (HID_BASE + 2107)
-#define HID_INSERT_AUTH_MRK_ENTRY (HID_BASE + 2108)
-#define HID_INSERT_AUTH_MRK_CREATE_ENTRY (HID_BASE + 2109)
-#define HID_INSERT_AUTH_MRK_EDIT_ENTRY (HID_BASE + 2110)
-#define HID_TOKEN_WINDOW (HID_BASE + 2111)
-
-#define HID_AUTH_FIELD_IDENTIFIER (HID_BASE + 2112 )
-#define HID_AUTH_FIELD_AUTHORITY_TYPE (HID_BASE + 2113 )
-#define HID_AUTH_FIELD_ADDRESS (HID_BASE + 2114 )
-#define HID_AUTH_FIELD_ANNOTE (HID_BASE + 2115 )
-#define HID_AUTH_FIELD_AUTHOR (HID_BASE + 2116 )
-#define HID_AUTH_FIELD_BOOKTITLE (HID_BASE + 2117 )
-#define HID_AUTH_FIELD_CHAPTER (HID_BASE + 2118 )
-#define HID_AUTH_FIELD_EDITION (HID_BASE + 2119 )
-#define HID_AUTH_FIELD_EDITOR (HID_BASE + 2120 )
-#define HID_AUTH_FIELD_HOWPUBLISHED (HID_BASE + 2121 )
-#define HID_AUTH_FIELD_INSTITUTION (HID_BASE + 2122 )
-#define HID_AUTH_FIELD_JOURNAL (HID_BASE + 2123 )
-#define HID_AUTH_FIELD_MONTH (HID_BASE + 2124 )
-#define HID_AUTH_FIELD_NOTE (HID_BASE + 2125 )
-#define HID_AUTH_FIELD_NUMBER (HID_BASE + 2126 )
-#define HID_AUTH_FIELD_ORGANIZATIONS (HID_BASE + 2127 )
-#define HID_AUTH_FIELD_PAGES (HID_BASE + 2128 )
-#define HID_AUTH_FIELD_PUBLISHER (HID_BASE + 2129 )
-#define HID_AUTH_FIELD_SCHOOL (HID_BASE + 2130 )
-#define HID_AUTH_FIELD_SERIES (HID_BASE + 2131 )
-#define HID_AUTH_FIELD_TITLE (HID_BASE + 2132 )
-#define HID_AUTH_FIELD_REPORT_TYPE (HID_BASE + 2133 )
-#define HID_AUTH_FIELD_VOLUME (HID_BASE + 2134 )
-#define HID_AUTH_FIELD_YEAR (HID_BASE + 2135 )
-#define HID_AUTH_FIELD_URL (HID_BASE + 2136 )
-#define HID_AUTH_FIELD_CUSTOM1 (HID_BASE + 2137 )
-#define HID_AUTH_FIELD_CUSTOM2 (HID_BASE + 2138 )
-#define HID_AUTH_FIELD_CUSTOM3 (HID_BASE + 2139 )
-#define HID_AUTH_FIELD_CUSTOM4 (HID_BASE + 2140 )
-#define HID_AUTH_FIELD_CUSTOM5 (HID_BASE + 2141 )
-#define HID_AUTH_FIELD_ISBN (HID_BASE + 2142 )
-
-#define HID_AUTH_MARK_DLG_FROM_COMP_RB (HID_BASE + 2143 )
-#define HID_AUTH_MARK_DLG_FROM_DOC_RB (HID_BASE + 2144 )
-#define HID_AUTH_MARK_DLG_ID_LISTBOX (HID_BASE + 2145 )
-
-#define HID_INSERT_INDEX_ENTRY_LEVEL_LB (HID_BASE + 2146 )
-#define HID_INSERT_IDX_MRK_SRCH_CASESENSITIVE (HID_BASE + 2147 )
-#define HID_INSERT_IDX_MRK_SRCH_WORDONLY (HID_BASE + 2148 )
-#define HID_DLG_CREATE_AUTOMARK (HID_BASE + 2149 )
-#define HID_BUSINESS_CARD_CONTENT (HID_BASE + 2150 )
-#define HID_SAVE_LABEL_DLG (HID_BASE + 2151 )
-#define HID_BUSINESS_FMT_PAGE (HID_BASE + 2152 )
-#define HID_BUSINESS_FMT_PAGE_CONT (HID_BASE + 2153 )
-#define HID_BUSINESS_FMT_PAGE_SHEET (HID_BASE + 2154 )
-#define HID_BUSINESS_FMT_PAGE_BRAND (HID_BASE + 2155 )
-#define HID_BUSINESS_FMT_PAGE_TYPE (HID_BASE + 2156 )
-#define HID_SEND_MASTER_DIALOG (HID_BASE + 2157 )
-#define HID_SEND_MASTER_CTRL_PUSHBUTTON_OK (HID_BASE + 2158 )
-#define HID_SEND_MASTER_CTRL_PUSHBUTTON_CANCEL (HID_BASE + 2159 )
-#define HID_SEND_MASTER_CTRL_LISTBOX_FILTER (HID_BASE + 2160 )
-#define HID_SEND_MASTER_CTRL_CONTROL_FILEVIEW (HID_BASE + 2161 )
-#define HID_SEND_MASTER_CTRL_EDIT_FILEURL (HID_BASE + 2162 )
-#define HID_SEND_MASTER_CTRL_CHECKBOX_AUTOEXTENSION (HID_BASE + 2163 )
-#define HID_SEND_MASTER_CTRL_LISTBOX_TEMPLATE (HID_BASE + 2164 )
-#define HID_SEND_MASTER_CTRL_DUMMY (HID_BASE + 2165 )
-
-#define HID_SEND_HTML_DIALOG (HID_BASE + 2166 )
-#define HID_SEND_HTML_CTRL_PUSHBUTTON_OK (HID_BASE + 2167 )
-#define HID_SEND_HTML_CTRL_PUSHBUTTON_CANCEL (HID_BASE + 2168 )
-#define HID_SEND_HTML_CTRL_LISTBOX_FILTER (HID_BASE + 2169 )
-#define HID_SEND_HTML_CTRL_CONTROL_FILEVIEW (HID_BASE + 2170 )
-#define HID_SEND_HTML_CTRL_EDIT_FILEURL (HID_BASE + 2171 )
-#define HID_SEND_HTML_CTRL_CHECKBOX_AUTOEXTENSION (HID_BASE + 2172 )
-#define HID_SEND_HTML_CTRL_LISTBOX_TEMPLATE (HID_BASE + 2173 )
-#define HID_SEND_HTML_CTRL_DUMMY (HID_BASE + 2174 )
-
-#define HID_INSERT_IDX_MRK_PHONETIC_READING (HID_BASE + 2175 )
-#define HID_COLUMN_VALUESET (HID_BASE + 2176 )
-#define HID_PVIEW_ZOOM_LB (HID_BASE + 2177 )
-#define HID_MAIL_MERGE_SELECT (HID_BASE + 2178 )
-#define HID_MAIL_MERGE_CREATE_FROM (HID_BASE + 2179 )
-#define HID_MAIL_MERGE_INSERT_FIELDS (HID_BASE + 2180 )
-#define HID_PRINT_AS_MERGE (HID_BASE + 2181 )
-#define HID_MERGE_SOURCE_UNAVAILABLE (HID_BASE + 2182 )
-#define HID_DATA_SOURCES_UNAVAILABLE (HID_BASE + 2183 )
-#define HID_MODULE_TOOLBOX (HID_BASE + 2184 )
-#define HID_SECTION_INDENTS_PAGE (HID_BASE + 2185 )
-
-#define HID_FLD_DROPDOWN (HID_BASE + 2186 )
-#define HID_MM_DOCSELECTPAGE (HID_BASE + 2187 )
-#define HID_MM_OUTPUTTYPEPAGE (HID_BASE + 2188 )
-#define HID_MM_ADDRESSBLOCKPAGE (HID_BASE + 2189 )
-#define HID_MM_GREETINGSPAGE (HID_BASE + 2190 )
-#define HID_MM_PREPAREMERGEPAGE (HID_BASE + 2191 )
-#define HID_MM_MERGEPAGE (HID_BASE + 2192 )
-#define HID_MM_OUTPUTPAGE (HID_BASE + 2193 )
-#define HID_MM_ADDRESSLISTDIALOG (HID_BASE + 2194 )
-#define HID_MM_SELECTDBTABLEDDIALOG (HID_BASE + 2195 )
-#define HID_MM_SELECTDBTABLEDDIALOG_LISTBOX (HID_BASE + 2196 )
-#define HID_MM_DBTABLEPREVIEWDIALOG (HID_BASE + 2197 )
-#define HID_MM_CREATEADDRESSLIST (HID_BASE + 2198 )
-#define HID_MM_FIND_ENTRY (HID_BASE + 2199 )
-#define HID_MM_ADD_RENAME_ENTRY (HID_BASE + 2200 )
-#define HID_MM_CUSTOMIZE_ADDRESS_LIST (HID_BASE + 2201 )
-#define HID_MM_CUSTOMIZEADDRESSBLOCK (HID_BASE + 2202 )
-#define HID_MM_SELECTADDRESSBLOCK (HID_BASE + 2203 )
-#define HID_MM_ASSIGNFIELDS (HID_BASE + 2204 )
-#define HID_MM_MAILNOTINSTALLED (HID_BASE + 2205 )
-#define HID_MM_LAYOUT_PAGE (HID_BASE + 2206 )
-#define HID_MM_COPYTO (HID_BASE + 2207 )
-#define HID_MM_ADDRESSLIST_HB (HID_BASE + 2208 )
-#define HID_MM_ADDRESSLIST_TLB (HID_BASE + 2209 )
-#define HID_TP_MAILCONFIG (HID_BASE + 2210 )
-#define HID_MM_TESTACCOUNTSETTINGS (HID_BASE + 2211 )
-#define HID_MM_TESTACCOUNTSETTINGS_TLB (HID_BASE + 2212 )
-#define HID_MM_TESTACCOUNTSETTINGS_HB (HID_BASE + 2213 )
-#define HID_MM_MAILBODY (HID_BASE + 2214 )
-#define HID_MM_SENDMAILS (HID_BASE + 2215 )
-#define HID_MM_SENDMAILS_STATUSLB (HID_BASE + 2216 )
-#define HID_MAILMERGECHILD (HID_BASE + 2217 )
-#define HID_MM_CUSTOMFIELDS (HID_BASE + 2218 )
-#define HID_DLG_WORDCOUNT (HID_BASE + 2219 )
-#define HID_MM_MAILSTATUS_TLB (HID_BASE + 2220 )
-#define HID_RETURN_TO_MAILMERGE (HID_BASE + 2221 )
-#define HID_MM_SAVEWARNING (HID_BASE + 2222 )
-#define HID_MM_QUERY (HID_BASE + 2223 )
-#define HID_MM_SENDWARNING (HID_BASE + 2224 )
-#define HID_MM_SERVERAUTHENTICATION (HID_BASE + 2225 )
-
-#define HID_MEDIA_TOOLBOX (HID_BASE + 2227)
-#define HID_NID_TBL (HID_BASE + 2228)
-#define HID_NID_FRM (HID_BASE + 2229)
-#define HID_NID_GRF (HID_BASE + 2230)
-#define HID_NID_OLE (HID_BASE + 2231)
-#define HID_NID_PGE (HID_BASE + 2232)
-#define HID_NID_OUTL (HID_BASE + 2233)
-#define HID_NID_MARK (HID_BASE + 2234)
-#define HID_NID_DRW (HID_BASE + 2235)
-#define HID_NID_CTRL (HID_BASE + 2236)
-#define HID_NID_PREV (HID_BASE + 2237)
-#define HID_NID_REG (HID_BASE + 2238)
-#define HID_NID_BKM (HID_BASE + 2239)
-#define HID_NID_SEL (HID_BASE + 2240)
-#define HID_NID_FTN (HID_BASE + 2241)
-#define HID_NID_POSTIT (HID_BASE + 2242)
-#define HID_NID_SRCH_REP (HID_BASE + 2243)
-#define HID_NID_INDEX_ENTRY (HID_BASE + 2244)
-#define HID_NID_TABLE_FORMULA (HID_BASE + 2245)
-#define HID_NID_TABLE_FORMULA_ERROR (HID_BASE + 2246)
-#define HID_NID_NEXT (HID_BASE + 2247)
-#define HID_MM_NEXT_PAGE (HID_BASE + 2248)
-#define HID_MM_PREV_PAGE (HID_BASE + 2249)
-#define HID_MM_GREETINGS_CB_PERSONALIZED (HID_BASE + 2250)
-#define HID_MM_GREETINGS_LB_FEMALE (HID_BASE + 2251)
-#define HID_MM_GREETINGS_PB_FEMALE (HID_BASE + 2252)
-#define HID_MM_GREETINGS_LB_MALE (HID_BASE + 2253)
-#define HID_MM_GREETINGS_PB_MALE (HID_BASE + 2254)
-#define HID_MM_GREETINGS_LB_FEMALECOLUMN (HID_BASE + 2255)
-#define HID_MM_GREETINGS_CB_FEMALEFIELD (HID_BASE + 2256)
-#define HID_MM_GREETINGS_CB_NEUTRAL (HID_BASE + 2257)
-#define HID_MM_BODY_CB_PERSONALIZED (HID_BASE + 2258)
-#define HID_MM_BODY_LB_FEMALE (HID_BASE + 2259)
-#define HID_MM_BODY_PB_FEMALE (HID_BASE + 2260)
-#define HID_MM_BODY_LB_MALE (HID_BASE + 2261)
-#define HID_MM_BODY_PB_MALE (HID_BASE + 2262)
-#define HID_MM_BODY_LB_FEMALECOLUMN (HID_BASE + 2263)
-#define HID_MM_BODY_CB_FEMALEFIELD (HID_BASE + 2264)
-#define HID_MM_BODY_CB_NEUTRAL (HID_BASE + 2265)
-#define HID_MM_ASSIGN_FIELDS (HID_BASE + 2266)
-#define HID_MM_HEADER_0 (HID_BASE + 2267)
-#define HID_MM_HEADER_1 (HID_BASE + 2268)
-#define HID_MM_HEADER_2 (HID_BASE + 2269)
-#define HID_MM_HEADER_3 (HID_BASE + 2270)
-#define HID_MM_HEADER_4 (HID_BASE + 2271)
-#define HID_MM_HEADER_5 (HID_BASE + 2272)
-#define HID_MM_HEADER_6 (HID_BASE + 2273)
-#define HID_MM_HEADER_7 (HID_BASE + 2274)
-#define HID_MM_HEADER_8 (HID_BASE + 2275)
-#define HID_MM_HEADER_9 (HID_BASE + 2276)
-#define HID_MM_HEADER_10 (HID_BASE + 2277)
-#define HID_MM_HEADER_11 (HID_BASE + 2278)
-#define HID_MM_HEADER_12 (HID_BASE + 2279)
-#define HID_MM_HEADER_13 (HID_BASE + 2280)
+#define HID_TOX_ENTRY_BUTTON "SW_HID_TOX_ENTRY_BUTTON"
+#define HID_TOX_ENTRY_EDIT "SW_HID_TOX_ENTRY_EDIT"
+
+#define HID_DLG_NEW_USER_IDX "SW_HID_DLG_NEW_USER_IDX"
+#define HID_INSERT_IDX_MRK_OK "SW_HID_INSERT_IDX_MRK_OK"
+#define HID_INSERT_IDX_MRK_CLOSE "SW_HID_INSERT_IDX_MRK_CLOSE"
+#define HID_INSERT_AUTH_MRK_OK "SW_HID_INSERT_AUTH_MRK_OK"
+#define HID_INSERT_AUTH_MRK_CLOSE "SW_HID_INSERT_AUTH_MRK_CLOSE"
+#define HID_INSERT_IDX_MRK_DELETE "SW_HID_INSERT_IDX_MRK_DELETE"
+#define HID_INSERT_IDX_MRK_NEW "SW_HID_INSERT_IDX_MRK_NEW"
+#define HID_INSERT_IDX_MRK_PREV "SW_HID_INSERT_IDX_MRK_PREV"
+#define HID_INSERT_IDX_MRK_PREV_SAME "SW_HID_INSERT_IDX_MRK_PREV_SAME"
+#define HID_INSERT_IDX_MRK_NEXT "SW_HID_INSERT_IDX_MRK_NEXT"
+#define HID_INSERT_IDX_MRK_NEXT_SAME "SW_HID_INSERT_IDX_MRK_NEXT_SAME"
+#define HID_INSERT_IDX_MRK_TYPE "SW_HID_INSERT_IDX_MRK_TYPE"
+#define HID_INSERT_IDX_MRK_ENTRY "SW_HID_INSERT_IDX_MRK_ENTRY"
+#define HID_INSERT_IDX_MRK_PRIM_KEY "SW_HID_INSERT_IDX_MRK_PRIM_KEY"
+#define HID_INSERT_IDX_MRK_SEC_KEY "SW_HID_INSERT_IDX_MRK_SEC_KEY"
+#define HID_INSERT_IDX_MRK_LEVEL "SW_HID_INSERT_IDX_MRK_LEVEL"
+#define HID_INSERT_IDX_MRK_MAIN_ENTRY "SW_HID_INSERT_IDX_MRK_MAIN_ENTRY"
+#define HID_INSERT_IDX_MRK_APPLY_ALL "SW_HID_INSERT_IDX_MRK_APPLY_ALL"
+#define HID_INSERT_AUTH_MRK_ENTRY "SW_HID_INSERT_AUTH_MRK_ENTRY"
+#define HID_INSERT_AUTH_MRK_CREATE_ENTRY "SW_HID_INSERT_AUTH_MRK_CREATE_ENTRY"
+#define HID_INSERT_AUTH_MRK_EDIT_ENTRY "SW_HID_INSERT_AUTH_MRK_EDIT_ENTRY"
+#define HID_TOKEN_WINDOW "SW_HID_TOKEN_WINDOW"
+
+#define HID_AUTH_FIELD_IDENTIFIER "SW_HID_AUTH_FIELD_IDENTIFIER"
+#define HID_AUTH_FIELD_AUTHORITY_TYPE "SW_HID_AUTH_FIELD_AUTHORITY_TYPE"
+#define HID_AUTH_FIELD_ADDRESS "SW_HID_AUTH_FIELD_ADDRESS"
+#define HID_AUTH_FIELD_ANNOTE "SW_HID_AUTH_FIELD_ANNOTE"
+#define HID_AUTH_FIELD_AUTHOR "SW_HID_AUTH_FIELD_AUTHOR"
+#define HID_AUTH_FIELD_BOOKTITLE "SW_HID_AUTH_FIELD_BOOKTITLE"
+#define HID_AUTH_FIELD_CHAPTER "SW_HID_AUTH_FIELD_CHAPTER"
+#define HID_AUTH_FIELD_EDITION "SW_HID_AUTH_FIELD_EDITION"
+#define HID_AUTH_FIELD_EDITOR "SW_HID_AUTH_FIELD_EDITOR"
+#define HID_AUTH_FIELD_HOWPUBLISHED "SW_HID_AUTH_FIELD_HOWPUBLISHED"
+#define HID_AUTH_FIELD_INSTITUTION "SW_HID_AUTH_FIELD_INSTITUTION"
+#define HID_AUTH_FIELD_JOURNAL "SW_HID_AUTH_FIELD_JOURNAL"
+#define HID_AUTH_FIELD_MONTH "SW_HID_AUTH_FIELD_MONTH"
+#define HID_AUTH_FIELD_NOTE "SW_HID_AUTH_FIELD_NOTE"
+#define HID_AUTH_FIELD_NUMBER "SW_HID_AUTH_FIELD_NUMBER"
+#define HID_AUTH_FIELD_ORGANIZATIONS "SW_HID_AUTH_FIELD_ORGANIZATIONS"
+#define HID_AUTH_FIELD_PAGES "SW_HID_AUTH_FIELD_PAGES"
+#define HID_AUTH_FIELD_PUBLISHER "SW_HID_AUTH_FIELD_PUBLISHER"
+#define HID_AUTH_FIELD_SCHOOL "SW_HID_AUTH_FIELD_SCHOOL"
+#define HID_AUTH_FIELD_SERIES "SW_HID_AUTH_FIELD_SERIES"
+#define HID_AUTH_FIELD_TITLE "SW_HID_AUTH_FIELD_TITLE"
+#define HID_AUTH_FIELD_REPORT_TYPE "SW_HID_AUTH_FIELD_REPORT_TYPE"
+#define HID_AUTH_FIELD_VOLUME "SW_HID_AUTH_FIELD_VOLUME"
+#define HID_AUTH_FIELD_YEAR "SW_HID_AUTH_FIELD_YEAR"
+#define HID_AUTH_FIELD_URL "SW_HID_AUTH_FIELD_URL"
+#define HID_AUTH_FIELD_CUSTOM1 "SW_HID_AUTH_FIELD_CUSTOM1"
+#define HID_AUTH_FIELD_CUSTOM2 "SW_HID_AUTH_FIELD_CUSTOM2"
+#define HID_AUTH_FIELD_CUSTOM3 "SW_HID_AUTH_FIELD_CUSTOM3"
+#define HID_AUTH_FIELD_CUSTOM4 "SW_HID_AUTH_FIELD_CUSTOM4"
+#define HID_AUTH_FIELD_CUSTOM5 "SW_HID_AUTH_FIELD_CUSTOM5"
+#define HID_AUTH_FIELD_ISBN "SW_HID_AUTH_FIELD_ISBN"
+
+#define HID_AUTH_MARK_DLG_FROM_COMP_RB "SW_HID_AUTH_MARK_DLG_FROM_COMP_RB"
+#define HID_AUTH_MARK_DLG_FROM_DOC_RB "SW_HID_AUTH_MARK_DLG_FROM_DOC_RB"
+#define HID_AUTH_MARK_DLG_ID_LISTBOX "SW_HID_AUTH_MARK_DLG_ID_LISTBOX"
+
+#define HID_INSERT_INDEX_ENTRY_LEVEL_LB "SW_HID_INSERT_INDEX_ENTRY_LEVEL_LB"
+#define HID_INSERT_IDX_MRK_SRCH_CASESENSITIVE "SW_HID_INSERT_IDX_MRK_SRCH_CASESENSITIVE"
+#define HID_INSERT_IDX_MRK_SRCH_WORDONLY "SW_HID_INSERT_IDX_MRK_SRCH_WORDONLY"
+#define HID_DLG_CREATE_AUTOMARK "SW_HID_DLG_CREATE_AUTOMARK"
+#define HID_BUSINESS_CARD_CONTENT "SW_HID_BUSINESS_CARD_CONTENT"
+#define HID_SAVE_LABEL_DLG "SW_HID_SAVE_LABEL_DLG"
+#define HID_BUSINESS_FMT_PAGE "SW_HID_BUSINESS_FMT_PAGE"
+#define HID_BUSINESS_FMT_PAGE_CONT "SW_HID_BUSINESS_FMT_PAGE_CONT"
+#define HID_BUSINESS_FMT_PAGE_SHEET "SW_HID_BUSINESS_FMT_PAGE_SHEET"
+#define HID_BUSINESS_FMT_PAGE_BRAND "SW_HID_BUSINESS_FMT_PAGE_BRAND"
+#define HID_BUSINESS_FMT_PAGE_TYPE "SW_HID_BUSINESS_FMT_PAGE_TYPE"
+#define HID_SEND_MASTER_DIALOG "SW_HID_SEND_MASTER_DIALOG"
+#define HID_SEND_MASTER_CTRL_PUSHBUTTON_OK "SW_HID_SEND_MASTER_CTRL_PUSHBUTTON_OK"
+#define HID_SEND_MASTER_CTRL_PUSHBUTTON_CANCEL "SW_HID_SEND_MASTER_CTRL_PUSHBUTTON_CANCEL"
+#define HID_SEND_MASTER_CTRL_LISTBOX_FILTER "SW_HID_SEND_MASTER_CTRL_LISTBOX_FILTER"
+#define HID_SEND_MASTER_CTRL_CONTROL_FILEVIEW "SW_HID_SEND_MASTER_CTRL_CONTROL_FILEVIEW"
+#define HID_SEND_MASTER_CTRL_EDIT_FILEURL "SW_HID_SEND_MASTER_CTRL_EDIT_FILEURL"
+#define HID_SEND_MASTER_CTRL_CHECKBOX_AUTOEXTENSION "SW_HID_SEND_MASTER_CTRL_CHECKBOX_AUTOEXTENSION"
+#define HID_SEND_MASTER_CTRL_LISTBOX_TEMPLATE "SW_HID_SEND_MASTER_CTRL_LISTBOX_TEMPLATE"
+#define HID_SEND_MASTER_CTRL_DUMMY "SW_HID_SEND_MASTER_CTRL_DUMMY"
+
+#define HID_SEND_HTML_DIALOG "SW_HID_SEND_HTML_DIALOG"
+#define HID_SEND_HTML_CTRL_PUSHBUTTON_OK "SW_HID_SEND_HTML_CTRL_PUSHBUTTON_OK"
+#define HID_SEND_HTML_CTRL_PUSHBUTTON_CANCEL "SW_HID_SEND_HTML_CTRL_PUSHBUTTON_CANCEL"
+#define HID_SEND_HTML_CTRL_LISTBOX_FILTER "SW_HID_SEND_HTML_CTRL_LISTBOX_FILTER"
+#define HID_SEND_HTML_CTRL_CONTROL_FILEVIEW "SW_HID_SEND_HTML_CTRL_CONTROL_FILEVIEW"
+#define HID_SEND_HTML_CTRL_EDIT_FILEURL "SW_HID_SEND_HTML_CTRL_EDIT_FILEURL"
+#define HID_SEND_HTML_CTRL_CHECKBOX_AUTOEXTENSION "SW_HID_SEND_HTML_CTRL_CHECKBOX_AUTOEXTENSION"
+#define HID_SEND_HTML_CTRL_LISTBOX_TEMPLATE "SW_HID_SEND_HTML_CTRL_LISTBOX_TEMPLATE"
+#define HID_SEND_HTML_CTRL_DUMMY "SW_HID_SEND_HTML_CTRL_DUMMY"
+
+#define HID_INSERT_IDX_MRK_PHONETIC_READING "SW_HID_INSERT_IDX_MRK_PHONETIC_READING"
+#define HID_COLUMN_VALUESET "SW_HID_COLUMN_VALUESET"
+#define HID_PVIEW_ZOOM_LB "SW_HID_PVIEW_ZOOM_LB"
+#define HID_MAIL_MERGE_SELECT "SW_HID_MAIL_MERGE_SELECT"
+#define HID_MAIL_MERGE_CREATE_FROM "SW_HID_MAIL_MERGE_CREATE_FROM"
+#define HID_MAIL_MERGE_INSERT_FIELDS "SW_HID_MAIL_MERGE_INSERT_FIELDS"
+#define HID_PRINT_AS_MERGE "SW_HID_PRINT_AS_MERGE"
+#define HID_MERGE_SOURCE_UNAVAILABLE "SW_HID_MERGE_SOURCE_UNAVAILABLE"
+#define HID_DATA_SOURCES_UNAVAILABLE "SW_HID_DATA_SOURCES_UNAVAILABLE"
+#define HID_MODULE_TOOLBOX "SW_HID_MODULE_TOOLBOX"
+#define HID_SECTION_INDENTS_PAGE "SW_HID_SECTION_INDENTS_PAGE"
+
+#define HID_FLD_DROPDOWN "SW_HID_FLD_DROPDOWN"
+#define HID_MM_DOCSELECTPAGE "SW_HID_MM_DOCSELECTPAGE"
+#define HID_MM_OUTPUTTYPEPAGE "SW_HID_MM_OUTPUTTYPEPAGE"
+#define HID_MM_ADDRESSBLOCKPAGE "SW_HID_MM_ADDRESSBLOCKPAGE"
+#define HID_MM_GREETINGSPAGE "SW_HID_MM_GREETINGSPAGE"
+#define HID_MM_PREPAREMERGEPAGE "SW_HID_MM_PREPAREMERGEPAGE"
+#define HID_MM_MERGEPAGE "SW_HID_MM_MERGEPAGE"
+#define HID_MM_OUTPUTPAGE "SW_HID_MM_OUTPUTPAGE"
+#define HID_MM_ADDRESSLISTDIALOG "SW_HID_MM_ADDRESSLISTDIALOG"
+#define HID_MM_SELECTDBTABLEDDIALOG "SW_HID_MM_SELECTDBTABLEDDIALOG"
+#define HID_MM_SELECTDBTABLEDDIALOG_LISTBOX "SW_HID_MM_SELECTDBTABLEDDIALOG_LISTBOX"
+#define HID_MM_DBTABLEPREVIEWDIALOG "SW_HID_MM_DBTABLEPREVIEWDIALOG"
+#define HID_MM_CREATEADDRESSLIST "SW_HID_MM_CREATEADDRESSLIST"
+#define HID_MM_FIND_ENTRY "SW_HID_MM_FIND_ENTRY"
+#define HID_MM_ADD_RENAME_ENTRY "SW_HID_MM_ADD_RENAME_ENTRY"
+#define HID_MM_CUSTOMIZE_ADDRESS_LIST "SW_HID_MM_CUSTOMIZE_ADDRESS_LIST"
+#define HID_MM_CUSTOMIZEADDRESSBLOCK "SW_HID_MM_CUSTOMIZEADDRESSBLOCK"
+#define HID_MM_SELECTADDRESSBLOCK "SW_HID_MM_SELECTADDRESSBLOCK"
+#define HID_MM_ASSIGNFIELDS "SW_HID_MM_ASSIGNFIELDS"
+#define HID_MM_MAILNOTINSTALLED "SW_HID_MM_MAILNOTINSTALLED"
+#define HID_MM_LAYOUT_PAGE "SW_HID_MM_LAYOUT_PAGE"
+#define HID_MM_COPYTO "SW_HID_MM_COPYTO"
+#define HID_MM_ADDRESSLIST_HB "SW_HID_MM_ADDRESSLIST_HB"
+#define HID_MM_ADDRESSLIST_TLB "SW_HID_MM_ADDRESSLIST_TLB"
+#define HID_TP_MAILCONFIG "SW_HID_TP_MAILCONFIG"
+#define HID_MM_TESTACCOUNTSETTINGS "SW_HID_MM_TESTACCOUNTSETTINGS"
+#define HID_MM_TESTACCOUNTSETTINGS_TLB "SW_HID_MM_TESTACCOUNTSETTINGS_TLB"
+#define HID_MM_TESTACCOUNTSETTINGS_HB "SW_HID_MM_TESTACCOUNTSETTINGS_HB"
+#define HID_MM_MAILBODY "SW_HID_MM_MAILBODY"
+#define HID_MM_SENDMAILS "SW_HID_MM_SENDMAILS"
+#define HID_MM_SENDMAILS_STATUSLB "SW_HID_MM_SENDMAILS_STATUSLB"
+#define HID_MAILMERGECHILD "SW_HID_MAILMERGECHILD"
+#define HID_MM_CUSTOMFIELDS "SW_HID_MM_CUSTOMFIELDS"
+#define HID_DLG_WORDCOUNT "SW_HID_DLG_WORDCOUNT"
+#define HID_MM_MAILSTATUS_TLB "SW_HID_MM_MAILSTATUS_TLB"
+#define HID_RETURN_TO_MAILMERGE "SW_HID_RETURN_TO_MAILMERGE"
+#define HID_MM_SAVEWARNING "SW_HID_MM_SAVEWARNING"
+#define HID_MM_QUERY "SW_HID_MM_QUERY"
+#define HID_MM_SENDWARNING "SW_HID_MM_SENDWARNING"
+#define HID_MM_SERVERAUTHENTICATION "SW_HID_MM_SERVERAUTHENTICATION"
+
+#define HID_MEDIA_TOOLBOX "SW_HID_MEDIA_TOOLBOX"
+#define HID_NID_TBL "SW_HID_NID_TBL"
+#define HID_NID_FRM "SW_HID_NID_FRM"
+#define HID_NID_GRF "SW_HID_NID_GRF"
+#define HID_NID_OLE "SW_HID_NID_OLE"
+#define HID_NID_PGE "SW_HID_NID_PGE"
+#define HID_NID_OUTL "SW_HID_NID_OUTL"
+#define HID_NID_MARK "SW_HID_NID_MARK"
+#define HID_NID_DRW "SW_HID_NID_DRW"
+#define HID_NID_CTRL "SW_HID_NID_CTRL"
+#define HID_NID_PREV "SW_HID_NID_PREV"
+#define HID_NID_REG "SW_HID_NID_REG"
+#define HID_NID_BKM "SW_HID_NID_BKM"
+#define HID_NID_SEL "SW_HID_NID_SEL"
+#define HID_NID_FTN "SW_HID_NID_FTN"
+#define HID_NID_POSTIT "SW_HID_NID_POSTIT"
+#define HID_NID_SRCH_REP "SW_HID_NID_SRCH_REP"
+#define HID_NID_INDEX_ENTRY "SW_HID_NID_INDEX_ENTRY"
+#define HID_NID_TABLE_FORMULA "SW_HID_NID_TABLE_FORMULA"
+#define HID_NID_TABLE_FORMULA_ERROR "SW_HID_NID_TABLE_FORMULA_ERROR"
+#define HID_NID_NEXT "SW_HID_NID_NEXT"
+#define HID_MM_NEXT_PAGE "SW_HID_MM_NEXT_PAGE"
+#define HID_MM_PREV_PAGE "SW_HID_MM_PREV_PAGE"
+#define HID_MM_GREETINGS_CB_PERSONALIZED "SW_HID_MM_GREETINGS_CB_PERSONALIZED"
+#define HID_MM_GREETINGS_LB_FEMALE "SW_HID_MM_GREETINGS_LB_FEMALE"
+#define HID_MM_GREETINGS_PB_FEMALE "SW_HID_MM_GREETINGS_PB_FEMALE"
+#define HID_MM_GREETINGS_LB_MALE "SW_HID_MM_GREETINGS_LB_MALE"
+#define HID_MM_GREETINGS_PB_MALE "SW_HID_MM_GREETINGS_PB_MALE"
+#define HID_MM_GREETINGS_LB_FEMALECOLUMN "SW_HID_MM_GREETINGS_LB_FEMALECOLUMN"
+#define HID_MM_GREETINGS_CB_FEMALEFIELD "SW_HID_MM_GREETINGS_CB_FEMALEFIELD"
+#define HID_MM_GREETINGS_CB_NEUTRAL "SW_HID_MM_GREETINGS_CB_NEUTRAL"
+#define HID_MM_BODY_CB_PERSONALIZED "SW_HID_MM_BODY_CB_PERSONALIZED"
+#define HID_MM_BODY_LB_FEMALE "SW_HID_MM_BODY_LB_FEMALE"
+#define HID_MM_BODY_PB_FEMALE "SW_HID_MM_BODY_PB_FEMALE"
+#define HID_MM_BODY_LB_MALE "SW_HID_MM_BODY_LB_MALE"
+#define HID_MM_BODY_PB_MALE "SW_HID_MM_BODY_PB_MALE"
+#define HID_MM_BODY_LB_FEMALECOLUMN "SW_HID_MM_BODY_LB_FEMALECOLUMN"
+#define HID_MM_BODY_CB_FEMALEFIELD "SW_HID_MM_BODY_CB_FEMALEFIELD"
+#define HID_MM_BODY_CB_NEUTRAL "SW_HID_MM_BODY_CB_NEUTRAL"
+#define HID_MM_ASSIGN_FIELDS "SW_HID_MM_ASSIGN_FIELDS"
+#define HID_MM_HEADER_0 "SW_HID_MM_HEADER_0"
+#define HID_MM_HEADER_1 "SW_HID_MM_HEADER_1"
+#define HID_MM_HEADER_2 "SW_HID_MM_HEADER_2"
+#define HID_MM_HEADER_3 "SW_HID_MM_HEADER_3"
+#define HID_MM_HEADER_4 "SW_HID_MM_HEADER_4"
+#define HID_MM_HEADER_5 "SW_HID_MM_HEADER_5"
+#define HID_MM_HEADER_6 "SW_HID_MM_HEADER_6"
+#define HID_MM_HEADER_7 "SW_HID_MM_HEADER_7"
+#define HID_MM_HEADER_8 "SW_HID_MM_HEADER_8"
+#define HID_MM_HEADER_9 "SW_HID_MM_HEADER_9"
+#define HID_MM_HEADER_10 "SW_HID_MM_HEADER_10"
+#define HID_MM_HEADER_11 "SW_HID_MM_HEADER_11"
+#define HID_MM_HEADER_12 "SW_HID_MM_HEADER_12"
+#define HID_MM_HEADER_13 "SW_HID_MM_HEADER_13"
+
+#define HID_ITM_HOR_LEFT "SW_HID_ITM_HOR_LEFT"
+#define HID_ITM_HOR_CNTR "SW_HID_ITM_HOR_CNTR"
+#define HID_ITM_HOR_RGHT "SW_HID_ITM_HOR_RGHT"
+#define HID_ITM_VER_LEFT "SW_HID_ITM_VER_LEFT"
+#define HID_ITM_VER_CNTR "SW_HID_ITM_VER_CNTR"
+#define HID_ITM_VER_RGHT "SW_HID_ITM_VER_RGHT"
+
+#define HID_TBX_FORMULA_CALC "SW_HID_TBX_FORMULA_CALC"
+#define HID_TBX_FORMULA_CANCEL "SW_HID_TBX_FORMULA_CANCEL"
+#define HID_TBX_FORMULA_APPLY "SW_HID_TBX_FORMULA_APPLY"
#define HID_TITLEPAGE (HID_BASE + 2281)
diff --git a/sw/inc/hfspacingitem.hxx b/sw/inc/hfspacingitem.hxx
index 6dd5efbde153..116335cbb74e 100644
--- a/sw/inc/hfspacingitem.hxx
+++ b/sw/inc/hfspacingitem.hxx
@@ -38,8 +38,8 @@ class IntlWrapper;
class SW_DLLPUBLIC SwHeaderAndFooterEatSpacingItem : public SfxBoolItem
{
public:
- SwHeaderAndFooterEatSpacingItem( USHORT nId = RES_HEADER_FOOTER_EAT_SPACING,
- BOOL bPrt = FALSE ) : SfxBoolItem( nId, bPrt ) {}
+ SwHeaderAndFooterEatSpacingItem( sal_uInt16 nId = RES_HEADER_FOOTER_EAT_SPACING,
+ sal_Bool bPrt = sal_False ) : SfxBoolItem( nId, bPrt ) {}
// "pure virtual methods" of SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -50,10 +50,10 @@ public:
const IntlWrapper* pIntl = 0 ) const;
};
-inline const SwHeaderAndFooterEatSpacingItem &SwAttrSet::GetHeaderAndFooterEatSpacing(BOOL bInP) const
+inline const SwHeaderAndFooterEatSpacingItem &SwAttrSet::GetHeaderAndFooterEatSpacing(sal_Bool bInP) const
{ return (const SwHeaderAndFooterEatSpacingItem&)Get( RES_HEADER_FOOTER_EAT_SPACING,bInP); }
-inline const SwHeaderAndFooterEatSpacingItem &SwFmt::GetHeaderAndFooterEatSpacing(BOOL bInP) const
+inline const SwHeaderAndFooterEatSpacingItem &SwFmt::GetHeaderAndFooterEatSpacing(sal_Bool bInP) const
{ return aSet.GetHeaderAndFooterEatSpacing(bInP); }
#endif
diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx
index 961ae8be2c6b..1b2e682d4df4 100644
--- a/sw/inc/hhcwrp.hxx
+++ b/sw/inc/hhcwrp.hxx
@@ -52,8 +52,8 @@ class SwHHCWrapper : public editeng::HangulHanjaConversion
// SwPaM or SwPosition by replace operations!)
sal_Int32 nUnitOffset;
- USHORT nPageCount; // page count for progress bar
- USHORT nPageStart; // first checked page
+ sal_uInt16 nPageCount; // page count for progress bar
+ sal_uInt16 nPageStart; // first checked page
sal_Bool bIsDrawObj;
sal_Bool bIsStart;
@@ -83,8 +83,8 @@ class SwHHCWrapper : public editeng::HangulHanjaConversion
SwPaM *pCrsr );
void ChangeText_impl( const String &rNewText, sal_Bool bKeepAttributes );
- inline BOOL IsDrawObj() { return bIsDrawObj; }
- inline void SetDrawObj( BOOL bNew ) { bIsDrawObj = bNew; }
+ inline sal_Bool IsDrawObj() { return bIsDrawObj; }
+ inline void SetDrawObj( sal_Bool bNew ) { bIsDrawObj = bNew; }
protected:
virtual void GetNextPortion( ::rtl::OUString& rNextPortion,
diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx
index 03af76475b2e..afd57f3bfb4a 100644
--- a/sw/inc/hintids.hxx
+++ b/sw/inc/hintids.hxx
@@ -369,48 +369,48 @@ RES_FLTRATTR_END
#define RES_WHICHHINT_END HINT_END
-inline bool isATR(const USHORT nWhich)
+inline bool isATR(const sal_uInt16 nWhich)
{
return (RES_CHRATR_BEGIN <= nWhich) && (RES_UNKNOWNATR_END > nWhich);
}
-inline bool isCHRATR(const USHORT nWhich)
+inline bool isCHRATR(const sal_uInt16 nWhich)
{
return (RES_CHRATR_BEGIN <= nWhich) && (RES_CHRATR_END > nWhich);
}
-inline bool isTXTATR_WITHEND(const USHORT nWhich)
+inline bool isTXTATR_WITHEND(const sal_uInt16 nWhich)
{
return (RES_TXTATR_WITHEND_BEGIN <= nWhich)
&& (RES_TXTATR_WITHEND_END > nWhich);
}
-inline bool isTXTATR_NOEND(const USHORT nWhich)
+inline bool isTXTATR_NOEND(const sal_uInt16 nWhich)
{
return (RES_TXTATR_NOEND_BEGIN <= nWhich)
&& (RES_TXTATR_NOEND_END > nWhich);
}
-inline bool isTXTATR(const USHORT nWhich)
+inline bool isTXTATR(const sal_uInt16 nWhich)
{
return (RES_TXTATR_BEGIN <= nWhich) && (RES_TXTATR_END > nWhich);
}
-inline bool isPARATR(const USHORT nWhich)
+inline bool isPARATR(const sal_uInt16 nWhich)
{
return (RES_PARATR_BEGIN <= nWhich) && (RES_PARATR_END > nWhich);
}
-inline bool isPARATR_LIST(const USHORT nWhich)
+inline bool isPARATR_LIST(const sal_uInt16 nWhich)
{
return (RES_PARATR_LIST_BEGIN <= nWhich) && (RES_PARATR_LIST_END > nWhich); }
-inline bool isFRMATR(const USHORT nWhich)
+inline bool isFRMATR(const sal_uInt16 nWhich)
{
return (RES_FRMATR_BEGIN <= nWhich) && (RES_FRMATR_END > nWhich);
}
-inline bool isGRFATR(const USHORT nWhich)
+inline bool isGRFATR(const sal_uInt16 nWhich)
{
return (RES_GRFATR_BEGIN <= nWhich) && (RES_GRFATR_END > nWhich);
}
-inline bool isBOXATR(const USHORT nWhich)
+inline bool isBOXATR(const sal_uInt16 nWhich)
{
return (RES_BOXATR_BEGIN <= nWhich) && (RES_BOXATR_END > nWhich);
}
-inline bool isUNKNOWNATR(const USHORT nWhich)
+inline bool isUNKNOWNATR(const sal_uInt16 nWhich)
{
return (RES_UNKNOWNATR_BEGIN <= nWhich) && (RES_UNKNOWNATR_END > nWhich);
}
@@ -429,9 +429,9 @@ typedef SfxPoolItem* SwDfltAttrTab[ POOLATTR_END - POOLATTR_BEGIN ];
extern SwDfltAttrTab aAttrTab;
extern SfxItemInfo aSlotTab[];
-SW_DLLPUBLIC const SfxPoolItem* GetDfltAttr( USHORT nWhich );
+SW_DLLPUBLIC const SfxPoolItem* GetDfltAttr( sal_uInt16 nWhich );
-SW_DLLPUBLIC USHORT GetWhichOfScript( USHORT nWhich, USHORT nScript );
+SW_DLLPUBLIC sal_uInt16 GetWhichOfScript( sal_uInt16 nWhich, sal_uInt16 nScript );
// return for the given TextAttribute without an end the correct character.
// This function returns
@@ -443,32 +443,32 @@ sal_Unicode GetCharOfTxtAttr( const SwTxtAttr& rAttr );
// all Sets defined in init.cxx
// AttrSet-Range for the 3 Break-Attribute
-extern USHORT aBreakSetRange[];
+extern sal_uInt16 aBreakSetRange[];
// AttrSet-Range for TxtFmtColl
-extern USHORT aTxtFmtCollSetRange[];
+extern sal_uInt16 aTxtFmtCollSetRange[];
// AttrSet-Range for GrfFmtColl
-extern USHORT aGrfFmtCollSetRange[];
+extern sal_uInt16 aGrfFmtCollSetRange[];
// AttrSet-Range for TextNode
-SW_DLLPUBLIC extern USHORT aTxtNodeSetRange[];
+SW_DLLPUBLIC extern sal_uInt16 aTxtNodeSetRange[];
// AttrSet-Range for NoTxtNode
-extern USHORT aNoTxtNodeSetRange[];
+extern sal_uInt16 aNoTxtNodeSetRange[];
// AttrSet-Range for SwTable
-extern USHORT aTableSetRange[];
+extern sal_uInt16 aTableSetRange[];
// AttrSet-Range for SwTableLine
-extern USHORT aTableLineSetRange[];
+extern sal_uInt16 aTableLineSetRange[];
// AttrSet-Range for SwTableBox
-extern USHORT aTableBoxSetRange[];
+extern sal_uInt16 aTableBoxSetRange[];
// AttrSet-Range for SwFrmFmt
-SW_DLLPUBLIC extern USHORT aFrmFmtSetRange[];
+SW_DLLPUBLIC extern sal_uInt16 aFrmFmtSetRange[];
// AttrSet-Range for SwCharFmt
-extern USHORT aCharFmtSetRange[];
+extern sal_uInt16 aCharFmtSetRange[];
// AttrSet-Range for the autostyles
-extern USHORT aCharAutoFmtSetRange[];
+extern sal_uInt16 aCharAutoFmtSetRange[];
// AttrSet-Range for SwPageDescFmt
-extern USHORT aPgFrmFmtSetRange[];
+extern sal_uInt16 aPgFrmFmtSetRange[];
// check if ID is InRange of AttrSet-Ids
-BOOL IsInRange( const USHORT* pRange, const USHORT nId );
+sal_Bool IsInRange( const sal_uInt16* pRange, const sal_uInt16 nId );
#endif
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index 9381893d4de9..fb064c19a468 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -47,7 +47,7 @@ class SwHistory;
class SwMsgPoolItem : public SfxPoolItem
{
public:
- SwMsgPoolItem( USHORT nWhich );
+ SwMsgPoolItem( sal_uInt16 nWhich );
// "Overhead" of SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
@@ -64,7 +64,7 @@ class SwPtrMsgPoolItem : public SwMsgPoolItem
public:
void * pObject;
- SwPtrMsgPoolItem( USHORT nId, void * pObj )
+ SwPtrMsgPoolItem( sal_uInt16 nId, void * pObj )
: SwMsgPoolItem( nId ), pObject( pObj )
{}
};
@@ -114,8 +114,8 @@ class SwUpdateAttr: public SwMsgPoolItem
public:
xub_StrLen nStart;
xub_StrLen nEnd;
- USHORT nWhichAttr;
- SwUpdateAttr( xub_StrLen nS, xub_StrLen nE, USHORT nW );
+ sal_uInt16 nWhichAttr;
+ SwUpdateAttr( xub_StrLen nS, xub_StrLen nE, sal_uInt16 nW );
};
@@ -155,10 +155,10 @@ public:
const String* pNewTblNm; // Split: the name of the new table
} DATA;
SwHistory* pHistory;
- USHORT nSplitLine; // Split: from this BaseLine on will be splitted
+ sal_uInt16 nSplitLine; // Split: from this BaseLine on will be splitted
TableFmlUpdtFlags eFlags;
- BOOL bModified : 1;
- BOOL bBehindSplitLine : 1;
+ sal_Bool bModified : 1;
+ sal_Bool bBehindSplitLine : 1;
SwTableFmlUpdate( const SwTable* );
};
@@ -179,7 +179,7 @@ public:
*/
class SwAttrSetChg: public SwMsgPoolItem
{
- BOOL bDelSet;
+ sal_Bool bDelSet;
SwAttrSet* pChgSet; // what has changed
const SwAttrSet* pTheChgdSet; // is only used to compare
public:
@@ -194,8 +194,8 @@ public:
// Where it has changed
const SwAttrSet* GetTheChgdSet() const { return pTheChgdSet; }
- USHORT Count() const { return pChgSet->Count(); }
- void ClearItem( USHORT nWhichL = 0 )
+ sal_uInt16 Count() const { return pChgSet->Count(); }
+ void ClearItem( sal_uInt16 nWhichL = 0 )
#if OSL_DEBUG_LEVEL > 1
;
#else
@@ -244,7 +244,7 @@ public:
const String& GetString() const { return sStr; }
- SwStringMsgPoolItem( USHORT nId, const String& rStr )
+ SwStringMsgPoolItem( sal_uInt16 nId, const String& rStr )
: SwMsgPoolItem( nId ), sStr( rStr )
{}
};
diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx
index 6802fa7eb1af..4016dba7f833 100644
--- a/sw/inc/htmltbl.hxx
+++ b/sw/inc/htmltbl.hxx
@@ -61,15 +61,15 @@ class SwHTMLTableLayoutCnts
// done for this content. Therefore they are compared against
// a reference value. If 255 is reached the continue with 0.
// This avoids reinitialization on every resize.
- BYTE nPass1Done; // How many times has Pass 1 been called?
- BYTE nWidthSet; // How many times has the width been set?
+ sal_uInt8 nPass1Done; // How many times has Pass 1 been called?
+ sal_uInt8 nWidthSet; // How many times has the width been set?
- BOOL bNoBreakTag; // <NOBR>-Tag over complete content.
+ sal_Bool bNoBreakTag; // <NOBR>-Tag over complete content.
public:
SwHTMLTableLayoutCnts( const SwStartNode* pSttNd, SwHTMLTableLayout* pTab,
- BOOL bNoBreakTag, SwHTMLTableLayoutCnts* pNxt );
+ sal_Bool bNoBreakTag, SwHTMLTableLayoutCnts* pNxt );
~SwHTMLTableLayoutCnts();
@@ -83,32 +83,32 @@ public:
// Calculation of next node.
SwHTMLTableLayoutCnts *GetNext() const { return pNext; }
- void SetWidthSet( BYTE nRef ) { nWidthSet = nRef; }
- BOOL IsWidthSet( BYTE nRef ) const { return nRef==nWidthSet; }
+ void SetWidthSet( sal_uInt8 nRef ) { nWidthSet = nRef; }
+ sal_Bool IsWidthSet( sal_uInt8 nRef ) const { return nRef==nWidthSet; }
- void SetPass1Done( BYTE nRef ) { nPass1Done = nRef; }
- BOOL IsPass1Done( BYTE nRef ) const { return nRef==nPass1Done; }
+ void SetPass1Done( sal_uInt8 nRef ) { nPass1Done = nRef; }
+ sal_Bool IsPass1Done( sal_uInt8 nRef ) const { return nRef==nPass1Done; }
- BOOL HasNoBreakTag() const { return bNoBreakTag; }
+ sal_Bool HasNoBreakTag() const { return bNoBreakTag; }
};
class SwHTMLTableLayoutCell
{
SwHTMLTableLayoutCnts *pContents; // Content of cell.
- USHORT nRowSpan; // ROWSPAN of cell.
- USHORT nColSpan; // COLSPAN of cell.
- USHORT nWidthOption;// Given width of cell in Twip or %.
+ sal_uInt16 nRowSpan; // ROWSPAN of cell.
+ sal_uInt16 nColSpan; // COLSPAN of cell.
+ sal_uInt16 nWidthOption;// Given width of cell in Twip or %.
- BOOL bPrcWidthOption : 1;// nWidth is %-value.
- BOOL bNoWrapOption : 1; // NOWRAP-option.
+ sal_Bool bPrcWidthOption : 1;// nWidth is %-value.
+ sal_Bool bNoWrapOption : 1; // NOWRAP-option.
public:
SwHTMLTableLayoutCell( SwHTMLTableLayoutCnts *pCnts,
- USHORT nRSpan, USHORT nCSpan,
- USHORT nWidthOpt, BOOL bPrcWdthOpt,
- BOOL nNWrapOpt );
+ sal_uInt16 nRSpan, sal_uInt16 nCSpan,
+ sal_uInt16 nWidthOpt, sal_Bool bPrcWdthOpt,
+ sal_Bool nNWrapOpt );
~SwHTMLTableLayoutCell();
@@ -119,67 +119,67 @@ public:
inline void SetProtected();
// Set or get ROWSPAN/COLSPAN of cell.
- void SetRowSpan( USHORT nRSpan ) { nRowSpan = nRSpan; }
- USHORT GetRowSpan() const { return nRowSpan; }
- USHORT GetColSpan() const { return nColSpan; }
+ void SetRowSpan( sal_uInt16 nRSpan ) { nRowSpan = nRSpan; }
+ sal_uInt16 GetRowSpan() const { return nRowSpan; }
+ sal_uInt16 GetColSpan() const { return nColSpan; }
- USHORT GetWidthOption() const { return nWidthOption; }
- BOOL IsPrcWidthOption() const { return bPrcWidthOption; }
+ sal_uInt16 GetWidthOption() const { return nWidthOption; }
+ sal_Bool IsPrcWidthOption() const { return bPrcWidthOption; }
- BOOL HasNoWrapOption() const { return bNoWrapOption; }
+ sal_Bool HasNoWrapOption() const { return bNoWrapOption; }
};
class SwHTMLTableLayoutColumn
{
// Interim values of AutoLayoutPass1,
- ULONG nMinNoAlign, nMaxNoAlign, nAbsMinNoAlign;
+ sal_uLong nMinNoAlign, nMaxNoAlign, nAbsMinNoAlign;
// Results of AutoLayoutPass1
- ULONG nMin, nMax;
+ sal_uLong nMin, nMax;
// Results of Pass 2.
- USHORT nAbsColWidth; // In Twips.
- USHORT nRelColWidth; // In Twips or relative to USHRT_MAX.
+ sal_uInt16 nAbsColWidth; // In Twips.
+ sal_uInt16 nRelColWidth; // In Twips or relative to USHRT_MAX.
- USHORT nWidthOption; // Options of <COL> or <TD>/<TH>.
+ sal_uInt16 nWidthOption; // Options of <COL> or <TD>/<TH>.
- BOOL bRelWidthOption : 1;
- BOOL bLeftBorder : 1;
+ sal_Bool bRelWidthOption : 1;
+ sal_Bool bLeftBorder : 1;
public:
- SwHTMLTableLayoutColumn( USHORT nColWidthOpt, BOOL bRelColWidthOpt,
- BOOL bLBorder );
+ SwHTMLTableLayoutColumn( sal_uInt16 nColWidthOpt, sal_Bool bRelColWidthOpt,
+ sal_Bool bLBorder );
~SwHTMLTableLayoutColumn() {}
- inline void MergeCellWidthOption( USHORT nWidth, BOOL bPrc );
- inline void SetWidthOption( USHORT nWidth, BOOL bRelWidth, BOOL bTest );
+ inline void MergeCellWidthOption( sal_uInt16 nWidth, sal_Bool bPrc );
+ inline void SetWidthOption( sal_uInt16 nWidth, sal_Bool bRelWidth, sal_Bool bTest );
- USHORT GetWidthOption() const { return nWidthOption; }
- BOOL IsRelWidthOption() const { return bRelWidthOption; }
+ sal_uInt16 GetWidthOption() const { return nWidthOption; }
+ sal_Bool IsRelWidthOption() const { return bRelWidthOption; }
- inline void MergeMinMaxNoAlign( ULONG nMin, ULONG nMax, ULONG nAbsMin );
- ULONG GetMinNoAlign() const { return nMinNoAlign; }
- ULONG GetMaxNoAlign() const { return nMaxNoAlign; }
- ULONG GetAbsMinNoAlign() const { return nAbsMinNoAlign; }
- inline void ClearPass1Info( BOOL bWidthOpt );
+ inline void MergeMinMaxNoAlign( sal_uLong nMin, sal_uLong nMax, sal_uLong nAbsMin );
+ sal_uLong GetMinNoAlign() const { return nMinNoAlign; }
+ sal_uLong GetMaxNoAlign() const { return nMaxNoAlign; }
+ sal_uLong GetAbsMinNoAlign() const { return nAbsMinNoAlign; }
+ inline void ClearPass1Info( sal_Bool bWidthOpt );
- inline void SetMinMax( ULONG nMin, ULONG nMax );
- void SetMax( ULONG nVal ) { nMax = nVal; }
- void AddToMin( ULONG nVal ) { nMin += nVal; }
- void AddToMax( ULONG nVal ) { nMax += nVal; }
- ULONG GetMin() const { return nMin; }
- ULONG GetMax() const { return nMax; }
+ inline void SetMinMax( sal_uLong nMin, sal_uLong nMax );
+ void SetMax( sal_uLong nVal ) { nMax = nVal; }
+ void AddToMin( sal_uLong nVal ) { nMin += nVal; }
+ void AddToMax( sal_uLong nVal ) { nMax += nVal; }
+ sal_uLong GetMin() const { return nMin; }
+ sal_uLong GetMax() const { return nMax; }
- void SetAbsColWidth( USHORT nWidth ) { nAbsColWidth = nWidth; }
- USHORT GetAbsColWidth() const { return nAbsColWidth; }
+ void SetAbsColWidth( sal_uInt16 nWidth ) { nAbsColWidth = nWidth; }
+ sal_uInt16 GetAbsColWidth() const { return nAbsColWidth; }
- void SetRelColWidth( USHORT nWidth ) { nRelColWidth = nWidth; }
- USHORT GetRelColWidth() const { return nRelColWidth; }
+ void SetRelColWidth( sal_uInt16 nWidth ) { nRelColWidth = nWidth; }
+ sal_uInt16 GetRelColWidth() const { return nRelColWidth; }
- BOOL HasLeftBorder() const { return bLeftBorder; }
+ sal_Bool HasLeftBorder() const { return bLeftBorder; }
};
class SwHTMLTableLayout
@@ -193,61 +193,61 @@ class SwHTMLTableLayout
SwTableBox *pLeftFillerBox; // Left filler-box (table in table only).
SwTableBox *pRightFillerBox; // Right filler-box (table in Table only).
- ULONG nMin; // Minimal width of table (Twips).
- ULONG nMax; // Maximal width of table (Twips).
+ sal_uLong nMin; // Minimal width of table (Twips).
+ sal_uLong nMax; // Maximal width of table (Twips).
- USHORT nRows; // Row count.
- USHORT nCols; // Column count.
+ sal_uInt16 nRows; // Row count.
+ sal_uInt16 nCols; // Column count.
- USHORT nLeftMargin; // Space to left margin (from paragraph).
- USHORT nRightMargin; // Space to left margin (from paragraph).
+ sal_uInt16 nLeftMargin; // Space to left margin (from paragraph).
+ sal_uInt16 nRightMargin; // Space to left margin (from paragraph).
- USHORT nInhAbsLeftSpace; // Space inherited from surrounding box
- USHORT nInhAbsRightSpace; // that was added to boxes.
+ sal_uInt16 nInhAbsLeftSpace; // Space inherited from surrounding box
+ sal_uInt16 nInhAbsRightSpace; // that was added to boxes.
- USHORT nRelLeftFill; // Width of boxes relative to alignment
- USHORT nRelRightFill; // of tables in tables.
+ sal_uInt16 nRelLeftFill; // Width of boxes relative to alignment
+ sal_uInt16 nRelRightFill; // of tables in tables.
- USHORT nRelTabWidth; // Relative width of table.
+ sal_uInt16 nRelTabWidth; // Relative width of table.
- USHORT nWidthOption; // Width of table (in Twips oder %).
- USHORT nCellPadding; // Space to contents (in Twips).
- USHORT nCellSpacing; // Cell spacing (in Twips).
- USHORT nBorder; // Line strength of outer border, or rather the
+ sal_uInt16 nWidthOption; // Width of table (in Twips oder %).
+ sal_uInt16 nCellPadding; // Space to contents (in Twips).
+ sal_uInt16 nCellSpacing; // Cell spacing (in Twips).
+ sal_uInt16 nBorder; // Line strength of outer border, or rather the
// space needed for it as calculated by Netscape.
- USHORT nLeftBorderWidth;
- USHORT nRightBorderWidth;
- USHORT nInhLeftBorderWidth;
- USHORT nInhRightBorderWidth;
- USHORT nBorderWidth;
+ sal_uInt16 nLeftBorderWidth;
+ sal_uInt16 nRightBorderWidth;
+ sal_uInt16 nInhLeftBorderWidth;
+ sal_uInt16 nInhRightBorderWidth;
+ sal_uInt16 nBorderWidth;
- USHORT nDelayedResizeAbsAvail; // Param for delayed Resize.
- USHORT nLastResizeAbsAvail;
+ sal_uInt16 nDelayedResizeAbsAvail; // Param for delayed Resize.
+ sal_uInt16 nLastResizeAbsAvail;
- BYTE nPass1Done; // Reference-values for
- BYTE nWidthSet; // the runs through loop.
+ sal_uInt8 nPass1Done; // Reference-values for
+ sal_uInt8 nWidthSet; // the runs through loop.
SvxAdjust eTableAdjust; // Alignment of table.
- BOOL bColsOption : 1; // Table has a COLS-option.
- BOOL bColTags : 1; // Tabelle has COL/COLGRP-tags.
- BOOL bPrcWidthOption : 1; // Width is given in percent.
- BOOL bUseRelWidth : 1; // SwTable gets relative width.
+ sal_Bool bColsOption : 1; // Table has a COLS-option.
+ sal_Bool bColTags : 1; // Tabelle has COL/COLGRP-tags.
+ sal_Bool bPrcWidthOption : 1; // Width is given in percent.
+ sal_Bool bUseRelWidth : 1; // SwTable gets relative width.
- BOOL bMustResize : 1; // Table width must be defined.
- BOOL bExportable : 1; // Layout may be used for export.
- BOOL bBordersChanged : 1; // Borders have been changed.
- BOOL bMayBeInFlyFrame : 1; // Table could be within frame.
+ sal_Bool bMustResize : 1; // Table width must be defined.
+ sal_Bool bExportable : 1; // Layout may be used for export.
+ sal_Bool bBordersChanged : 1; // Borders have been changed.
+ sal_Bool bMayBeInFlyFrame : 1; // Table could be within frame.
- BOOL bDelayedResizeRecalc : 1; // Param for delayed Resize.
- BOOL bMustNotResize : 1; // Table may not be resized.
- BOOL bMustNotRecalc : 1; // Table may not be adapted to its contents.
+ sal_Bool bDelayedResizeRecalc : 1; // Param for delayed Resize.
+ sal_Bool bMustNotResize : 1; // Table may not be resized.
+ sal_Bool bMustNotRecalc : 1; // Table may not be adapted to its contents.
- void AddBorderWidth( ULONG &rMin, ULONG &rMax, ULONG& rAbsMin,
- USHORT nCol, USHORT nColSpan,
- BOOL bSwBorders=TRUE ) const;
- void SetBoxWidth( SwTableBox *pBox, USHORT nCol, USHORT nColSpan ) const;
+ void AddBorderWidth( sal_uLong &rMin, sal_uLong &rMax, sal_uLong& rAbsMin,
+ sal_uInt16 nCol, sal_uInt16 nColSpan,
+ sal_Bool bSwBorders=sal_True ) const;
+ void SetBoxWidth( SwTableBox *pBox, sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
const SwStartNode *GetAnyBoxStartNode() const;
SwFrmFmt *FindFlyFrmFmt() const;
@@ -255,68 +255,68 @@ class SwHTMLTableLayout
void ClearPass1Info() { nMin = nMax = 0; }
- void _Resize( USHORT nAbsAvail, BOOL bRecalc=FALSE );
+ void _Resize( sal_uInt16 nAbsAvail, sal_Bool bRecalc=sal_False );
DECL_STATIC_LINK( SwHTMLTableLayout, DelayedResize_Impl, void* );
- static USHORT GetBrowseWidthByVisArea( const SwDoc& rDoc );
+ static sal_uInt16 GetBrowseWidthByVisArea( const SwDoc& rDoc );
public:
SwHTMLTableLayout( const SwTable *pSwTbl,
- USHORT nRows, USHORT nCols, BOOL bColsOpt, BOOL ColTgs,
- USHORT nWidth, BOOL bPrcWidth, USHORT nBorderOpt,
- USHORT nCellPad, USHORT nCellSp, SvxAdjust eAdjust,
- USHORT nLMargin, USHORT nRMargin, USHORT nBWidth,
- USHORT nLeftBWidth, USHORT nRightBWidth,
- USHORT nInhLeftBWidth, USHORT nInhRightBWidth );
+ sal_uInt16 nRows, sal_uInt16 nCols, sal_Bool bColsOpt, sal_Bool ColTgs,
+ sal_uInt16 nWidth, sal_Bool bPrcWidth, sal_uInt16 nBorderOpt,
+ sal_uInt16 nCellPad, sal_uInt16 nCellSp, SvxAdjust eAdjust,
+ sal_uInt16 nLMargin, sal_uInt16 nRMargin, sal_uInt16 nBWidth,
+ sal_uInt16 nLeftBWidth, sal_uInt16 nRightBWidth,
+ sal_uInt16 nInhLeftBWidth, sal_uInt16 nInhRightBWidth );
~SwHTMLTableLayout();
- USHORT GetLeftCellSpace( USHORT nCol, USHORT nColSpan,
- BOOL bSwBorders=TRUE ) const;
- USHORT GetRightCellSpace( USHORT nCol, USHORT nColSpan,
- BOOL bSwBorders=TRUE ) const;
- inline USHORT GetInhCellSpace( USHORT nCol, USHORT nColSpan ) const;
+ sal_uInt16 GetLeftCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan,
+ sal_Bool bSwBorders=sal_True ) const;
+ sal_uInt16 GetRightCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan,
+ sal_Bool bSwBorders=sal_True ) const;
+ inline sal_uInt16 GetInhCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
- inline void SetInhBorderWidths( USHORT nLeft, USHORT nRight );
+ inline void SetInhBorderWidths( sal_uInt16 nLeft, sal_uInt16 nRight );
- void GetAvail( USHORT nCol, USHORT nColSpan, USHORT& rAbsAvail,
- USHORT& rRelAvail ) const;
+ void GetAvail( sal_uInt16 nCol, sal_uInt16 nColSpan, sal_uInt16& rAbsAvail,
+ sal_uInt16& rRelAvail ) const;
void AutoLayoutPass1();
- void AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
- USHORT nAbsLeftSpace, USHORT nAbsRightSpace,
- USHORT nParentInhSpace );
- void SetWidths( BOOL bCallPass2=FALSE, USHORT nAbsAvail=0,
- USHORT nRelAvail=0, USHORT nAbsLeftSpace=0,
- USHORT nAbsRightSpace=0,
- USHORT nParentInhSpace=0 );
+ void AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAvail,
+ sal_uInt16 nAbsLeftSpace, sal_uInt16 nAbsRightSpace,
+ sal_uInt16 nParentInhSpace );
+ void SetWidths( sal_Bool bCallPass2=sal_False, sal_uInt16 nAbsAvail=0,
+ sal_uInt16 nRelAvail=0, sal_uInt16 nAbsLeftSpace=0,
+ sal_uInt16 nAbsRightSpace=0,
+ sal_uInt16 nParentInhSpace=0 );
- inline SwHTMLTableLayoutColumn *GetColumn( USHORT nCol ) const;
- inline void SetColumn( SwHTMLTableLayoutColumn *pCol, USHORT nCol );
+ inline SwHTMLTableLayoutColumn *GetColumn( sal_uInt16 nCol ) const;
+ inline void SetColumn( SwHTMLTableLayoutColumn *pCol, sal_uInt16 nCol );
- inline SwHTMLTableLayoutCell *GetCell( USHORT nRow, USHORT nCol ) const;
- inline void SetCell( SwHTMLTableLayoutCell *pCell, USHORT nRow, USHORT nCol );
+ inline SwHTMLTableLayoutCell *GetCell( sal_uInt16 nRow, sal_uInt16 nCol ) const;
+ inline void SetCell( SwHTMLTableLayoutCell *pCell, sal_uInt16 nRow, sal_uInt16 nCol );
void SetLeftFillerBox( SwTableBox *pBox ) { pLeftFillerBox = pBox; }
void SetRightFillerBox( SwTableBox *pBox ) { pRightFillerBox = pBox; }
- ULONG GetMin() const { return nMin; }
- ULONG GetMax() const { return nMax; }
- USHORT GetRelLeftFill() const { return nRelLeftFill; }
- USHORT GetRelRightFill() const { return nRelRightFill; }
+ sal_uLong GetMin() const { return nMin; }
+ sal_uLong GetMax() const { return nMax; }
+ sal_uInt16 GetRelLeftFill() const { return nRelLeftFill; }
+ sal_uInt16 GetRelRightFill() const { return nRelRightFill; }
inline long GetBrowseWidthMin() const;
- BOOL HasColsOption() const { return bColsOption; }
- BOOL HasColTags() const { return bColTags; }
+ sal_Bool HasColsOption() const { return bColsOption; }
+ sal_Bool HasColTags() const { return bColTags; }
- BOOL IsTopTable() const { return pSwTable != 0; }
+ sal_Bool IsTopTable() const { return pSwTable != 0; }
- void SetMustResize( BOOL bSet ) { bMustResize = bSet; }
- void SetMustNotResize( BOOL bSet ) { bMustNotResize = bSet; }
- void SetMustNotRecalc( BOOL bSet ) { bMustNotRecalc = bSet; }
+ void SetMustResize( sal_Bool bSet ) { bMustResize = bSet; }
+ void SetMustNotResize( sal_Bool bSet ) { bMustNotResize = bSet; }
+ void SetMustNotRecalc( sal_Bool bSet ) { bMustNotRecalc = bSet; }
// Recalculation of table widths for available width that has been passed.
// - If bRecalc is set, contents of boxes are included into calculation.
@@ -328,41 +328,41 @@ public:
// - If nDelay == HTMLTABLE_RESIZE_NOW, resize immediately and do not
// consider any resize-calls that might possibly be in order.
// - The return value indicates whether the table has been changed.
- BOOL Resize( USHORT nAbsAvail, BOOL bRecalc=FALSE, BOOL bForce=FALSE,
- ULONG nDelay=0 );
+ sal_Bool Resize( sal_uInt16 nAbsAvail, sal_Bool bRecalc=sal_False, sal_Bool bForce=sal_False,
+ sal_uLong nDelay=0 );
- void BordersChanged( USHORT nAbsAvail, BOOL bRecalc=FALSE );
+ void BordersChanged( sal_uInt16 nAbsAvail, sal_Bool bRecalc=sal_False );
// Calculate available width. This works only if a layout or a
// ViewShell exists. Otherwise returns 0.
// This is needed by HTML-filter because it doesn't have access to the layout.)
- static USHORT GetBrowseWidth( const SwDoc& rDoc );
+ static sal_uInt16 GetBrowseWidth( const SwDoc& rDoc );
// Calculates available width by table-frame.
- USHORT GetBrowseWidthByTabFrm( const SwTabFrm& rTabFrm ) const;
+ sal_uInt16 GetBrowseWidthByTabFrm( const SwTabFrm& rTabFrm ) const;
// Calculates available width by the table-frame or
// static GetBrowseWidth if no layout exists.
- USHORT GetBrowseWidthByTable( const SwDoc& rDoc ) const;
+ sal_uInt16 GetBrowseWidthByTable( const SwDoc& rDoc ) const;
// For Export.
- USHORT GetWidthOption() const { return nWidthOption; }
- BOOL HasPrcWidthOption() const { return bPrcWidthOption; }
+ sal_uInt16 GetWidthOption() const { return nWidthOption; }
+ sal_Bool HasPrcWidthOption() const { return bPrcWidthOption; }
- USHORT GetCellPadding() const { return nCellPadding; }
- USHORT GetCellSpacing() const { return nCellSpacing; }
- USHORT GetBorder() const { return nBorder; }
+ sal_uInt16 GetCellPadding() const { return nCellPadding; }
+ sal_uInt16 GetCellSpacing() const { return nCellSpacing; }
+ sal_uInt16 GetBorder() const { return nBorder; }
- USHORT GetRowCount() const { return nRows; }
- USHORT GetColCount() const { return nCols; }
+ sal_uInt16 GetRowCount() const { return nRows; }
+ sal_uInt16 GetColCount() const { return nCols; }
- void SetExportable( BOOL bSet ) { bExportable = bSet; }
- BOOL IsExportable() const { return bExportable; }
+ void SetExportable( sal_Bool bSet ) { bExportable = bSet; }
+ sal_Bool IsExportable() const { return bExportable; }
- BOOL HaveBordersChanged() const { return bBordersChanged; }
+ sal_Bool HaveBordersChanged() const { return bBordersChanged; }
- void SetMayBeInFlyFrame( BOOL bSet ) { bMayBeInFlyFrame = bSet; }
- BOOL MayBeInFlyFrame() const { return bMayBeInFlyFrame; }
+ void SetMayBeInFlyFrame( sal_Bool bSet ) { bMayBeInFlyFrame = bSet; }
+ sal_Bool MayBeInFlyFrame() const { return bMayBeInFlyFrame; }
};
inline void SwHTMLTableLayoutCell::SetProtected()
@@ -373,8 +373,8 @@ inline void SwHTMLTableLayoutCell::SetProtected()
pContents = 0;
}
-inline void SwHTMLTableLayoutColumn::MergeMinMaxNoAlign( ULONG nCMin,
- ULONG nCMax, ULONG nAbsMin )
+inline void SwHTMLTableLayoutColumn::MergeMinMaxNoAlign( sal_uLong nCMin,
+ sal_uLong nCMax, sal_uLong nAbsMin )
{
if( nCMin > nMinNoAlign )
nMinNoAlign = nCMin;
@@ -384,19 +384,19 @@ inline void SwHTMLTableLayoutColumn::MergeMinMaxNoAlign( ULONG nCMin,
nAbsMinNoAlign = nAbsMin;
}
-inline void SwHTMLTableLayoutColumn::ClearPass1Info( BOOL bWidthOpt )
+inline void SwHTMLTableLayoutColumn::ClearPass1Info( sal_Bool bWidthOpt )
{
nMinNoAlign = nMaxNoAlign = nAbsMinNoAlign = MINLAY;
nMin = nMax = 0;
if( bWidthOpt )
{
nWidthOption = 0;
- bRelWidthOption = FALSE;
+ bRelWidthOption = sal_False;
}
}
inline void SwHTMLTableLayoutColumn::MergeCellWidthOption(
- USHORT nWidth, BOOL bRel )
+ sal_uInt16 nWidth, sal_Bool bRel )
{
if( !nWidthOption ||
(bRel==bRelWidthOption && nWidthOption < nWidth) )
@@ -406,31 +406,31 @@ inline void SwHTMLTableLayoutColumn::MergeCellWidthOption(
}
}
-inline void SwHTMLTableLayoutColumn::SetMinMax( ULONG nMn, ULONG nMx )
+inline void SwHTMLTableLayoutColumn::SetMinMax( sal_uLong nMn, sal_uLong nMx )
{
nMin = nMn;
nMax = nMx;
}
-inline USHORT SwHTMLTableLayout::GetInhCellSpace( USHORT nCol,
- USHORT nColSpan ) const
+inline sal_uInt16 SwHTMLTableLayout::GetInhCellSpace( sal_uInt16 nCol,
+ sal_uInt16 nColSpan ) const
{
- USHORT nSpace = 0;
+ sal_uInt16 nSpace = 0;
if( nCol==0 )
- nSpace = nSpace + sal::static_int_cast< USHORT >(nInhAbsLeftSpace);
+ nSpace = nSpace + sal::static_int_cast< sal_uInt16 >(nInhAbsLeftSpace);
if( nCol+nColSpan==nCols )
- nSpace = nSpace + sal::static_int_cast< USHORT >(nInhAbsRightSpace);
+ nSpace = nSpace + sal::static_int_cast< sal_uInt16 >(nInhAbsRightSpace);
return nSpace;
}
-inline SwHTMLTableLayoutColumn *SwHTMLTableLayout::GetColumn( USHORT nCol ) const
+inline SwHTMLTableLayoutColumn *SwHTMLTableLayout::GetColumn( sal_uInt16 nCol ) const
{
return aColumns[nCol];
}
inline void SwHTMLTableLayoutColumn::SetWidthOption(
- USHORT nWidth, BOOL bRelWidth, BOOL bTest )
+ sal_uInt16 nWidth, sal_Bool bRelWidth, sal_Bool bTest )
{
if( bTest && bRelWidthOption==bRelWidth )
{
@@ -442,18 +442,18 @@ inline void SwHTMLTableLayoutColumn::SetWidthOption(
bRelWidthOption = bRelWidth;
}
-inline void SwHTMLTableLayout::SetColumn( SwHTMLTableLayoutColumn *pCol, USHORT nCol )
+inline void SwHTMLTableLayout::SetColumn( SwHTMLTableLayoutColumn *pCol, sal_uInt16 nCol )
{
aColumns[nCol] = pCol;
}
-inline SwHTMLTableLayoutCell *SwHTMLTableLayout::GetCell( USHORT nRow, USHORT nCol ) const
+inline SwHTMLTableLayoutCell *SwHTMLTableLayout::GetCell( sal_uInt16 nRow, sal_uInt16 nCol ) const
{
return aCells[nRow*nCols+nCol];
}
inline void SwHTMLTableLayout::SetCell( SwHTMLTableLayoutCell *pCell,
- USHORT nRow, USHORT nCol )
+ sal_uInt16 nRow, sal_uInt16 nCol )
{
aCells[nRow*nCols+nCol] = pCell;
}
@@ -463,7 +463,7 @@ inline long SwHTMLTableLayout::GetBrowseWidthMin() const
return (long)( (!nWidthOption || bPrcWidthOption) ? nMin : nRelTabWidth );
}
-void SwHTMLTableLayout::SetInhBorderWidths( USHORT nLeft, USHORT nRight )
+void SwHTMLTableLayout::SetInhBorderWidths( sal_uInt16 nLeft, sal_uInt16 nRight )
{
nInhLeftBorderWidth = nLeft;
nInhRightBorderWidth = nRight;
diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx
index a04d550180b7..551e31df3af8 100644
--- a/sw/inc/index.hxx
+++ b/sw/inc/index.hxx
@@ -79,22 +79,22 @@ public:
INLINE xub_StrLen operator+=( const SwIndex& );
INLINE xub_StrLen operator-=( const SwIndex& );
- INLINE BOOL operator<( const SwIndex& ) const;
- INLINE BOOL operator<=( const SwIndex& ) const;
- INLINE BOOL operator>( const SwIndex& ) const;
- INLINE BOOL operator>=( const SwIndex& ) const;
- BOOL operator==( const SwIndex& rSwIndex ) const
+ INLINE sal_Bool operator<( const SwIndex& ) const;
+ INLINE sal_Bool operator<=( const SwIndex& ) const;
+ INLINE sal_Bool operator>( const SwIndex& ) const;
+ INLINE sal_Bool operator>=( const SwIndex& ) const;
+ sal_Bool operator==( const SwIndex& rSwIndex ) const
{ return (nIndex == rSwIndex.nIndex) && (pArray == rSwIndex.pArray); }
- BOOL operator!=( const SwIndex& rSwIndex ) const
+ sal_Bool operator!=( const SwIndex& rSwIndex ) const
{ return (nIndex != rSwIndex.nIndex) || (pArray != rSwIndex.pArray); }
- BOOL operator<( xub_StrLen nWert ) const { return nIndex < nWert; }
- BOOL operator<=( xub_StrLen nWert ) const { return nIndex <= nWert; }
- BOOL operator>( xub_StrLen nWert ) const { return nIndex > nWert; }
- BOOL operator>=( xub_StrLen nWert ) const { return nIndex >= nWert; }
- BOOL operator==( xub_StrLen nWert ) const { return nIndex == nWert; }
- BOOL operator!=( xub_StrLen nWert ) const { return nIndex != nWert; }
+ sal_Bool operator<( xub_StrLen nWert ) const { return nIndex < nWert; }
+ sal_Bool operator<=( xub_StrLen nWert ) const { return nIndex <= nWert; }
+ sal_Bool operator>( xub_StrLen nWert ) const { return nIndex > nWert; }
+ sal_Bool operator>=( xub_StrLen nWert ) const { return nIndex >= nWert; }
+ sal_Bool operator==( xub_StrLen nWert ) const { return nIndex == nWert; }
+ sal_Bool operator!=( xub_StrLen nWert ) const { return nIndex != nWert; }
INLINE SwIndex& operator=( xub_StrLen );
SwIndex& operator=( const SwIndex & );
@@ -129,7 +129,7 @@ protected:
void ChkArr();
- BOOL HasAnyIndex() const { return 0 != pFirst; }
+ sal_Bool HasAnyIndex() const { return 0 != pFirst; }
public:
SwIndexReg();
@@ -182,19 +182,19 @@ inline xub_StrLen SwIndex::operator-=( const SwIndex& rIndex )
return ChgValue( *this, nIndex - rIndex.nIndex ).nIndex;
}
-inline BOOL SwIndex::operator<( const SwIndex& rIndex ) const
+inline sal_Bool SwIndex::operator<( const SwIndex& rIndex ) const
{
return nIndex < rIndex.nIndex;
}
-inline BOOL SwIndex::operator<=( const SwIndex& rIndex ) const
+inline sal_Bool SwIndex::operator<=( const SwIndex& rIndex ) const
{
return nIndex <= rIndex.nIndex;
}
-inline BOOL SwIndex::operator>( const SwIndex& rIndex ) const
+inline sal_Bool SwIndex::operator>( const SwIndex& rIndex ) const
{
return nIndex > rIndex.nIndex;
}
-inline BOOL SwIndex::operator>=( const SwIndex& rIndex ) const
+inline sal_Bool SwIndex::operator>=( const SwIndex& rIndex ) const
{
return nIndex >= rIndex.nIndex;
}
diff --git a/sw/inc/inetfld.hxx b/sw/inc/inetfld.hxx
index e7206e2c8a33..8cb71f655f6b 100644
--- a/sw/inc/inetfld.hxx
+++ b/sw/inc/inetfld.hxx
@@ -25,8 +25,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _INETFLD_HXX
-#define _INETFLD_HXX
+#ifndef SW_INETFLD_HXX
+#define SW_INETFLD_HXX
#include "fldbas.hxx"
@@ -67,15 +67,16 @@ class SwINetField : public SwField
String sText;
SvxMacroTableDtor* pMacroTbl;
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
public:
// Direct input, delete old value.
- SwINetField( SwINetFieldType* pTyp, USHORT nFmt,
+ SwINetField( SwINetFieldType* pTyp, sal_uInt16 nFmt,
const String& rURL, const String& rText );
virtual ~SwINetField();
- virtual String GetCntnt(BOOL bName = FALSE) const;
- virtual String Expand() const;
- virtual SwField* Copy() const;
+ virtual String GetFieldName() const;
// URL
virtual const String& GetPar1() const;
@@ -97,11 +98,11 @@ public:
void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 );
const SvxMacroTableDtor* GetMacroTbl() const { return pMacroTbl; }
- void SetMacro( USHORT nEvent, const SvxMacro& rMacro );
- const SvxMacro* GetMacro( USHORT nEvent ) const;
+ void SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro );
+ const SvxMacro* GetMacro( sal_uInt16 nEvent ) const;
};
-#endif // _INETFLD_HXX
+#endif // SW_INETFLD_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/io.hxx b/sw/inc/io.hxx
index 7d1665c4f72b..832bd946b165 100644
--- a/sw/inc/io.hxx
+++ b/sw/inc/io.hxx
@@ -148,7 +148,7 @@ public:
return aStr;
}
- BOOL Ok();
+ sal_Bool Ok();
};
diff --git a/sw/inc/iodetect.hxx b/sw/inc/iodetect.hxx
index 5ae24dc3041a..b16560ae9c9c 100644
--- a/sw/inc/iodetect.hxx
+++ b/sw/inc/iodetect.hxx
@@ -56,9 +56,9 @@
struct SwIoDetect
{
const sal_Char* pName;
- USHORT nLen;
+ sal_uInt16 nLen;
- inline SwIoDetect( const sal_Char *pN, USHORT nL )
+ inline SwIoDetect( const sal_Char *pN, sal_uInt16 nL )
: pName( pN ), nLen( nL )
{}
@@ -67,7 +67,7 @@ struct SwIoDetect
return pName && rNm.EqualsAscii( pName, 0, nLen );
}
- const sal_Char* IsReader( const sal_Char* pHeader, ULONG nLen_,
+ const sal_Char* IsReader( const sal_Char* pHeader, sal_uLong nLen_,
const String &rFileName, const String& rUserData ) const;
};
@@ -109,16 +109,16 @@ public:
// Detect whether the given file is in the given format.
// For now, only our own filters are supported!
- static BOOL IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
+ static sal_Bool IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
const SfxFilter** ppFlt = 0 );
- static BOOL IsValidStgFilter( SotStorage& , const SfxFilter& );
- static BOOL IsValidStgFilter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const SfxFilter& rFilter);
+ static sal_Bool IsValidStgFilter( SotStorage& , const SfxFilter& );
+ static sal_Bool IsValidStgFilter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const SfxFilter& rFilter);
- static bool IsDetectableText( const sal_Char* pBuf, ULONG &rLen,
+ static bool IsDetectableText( const sal_Char* pBuf, sal_uLong &rLen,
CharSet *pCharSet=0, bool *pSwap=0, LineEnd *pLineEnd=0, bool bEncodedFilter = false );
- static const SfxFilter* GetTextFilter( const sal_Char* pBuf, ULONG nLen );
+ static const SfxFilter* GetTextFilter( const sal_Char* pBuf, sal_uLong nLen );
static const String GetSubStorageName( const SfxFilter& rFltr );
};
diff --git a/sw/inc/itabenum.hxx b/sw/inc/itabenum.hxx
index a260659b2626..4c7af27a13f3 100644
--- a/sw/inc/itabenum.hxx
+++ b/sw/inc/itabenum.hxx
@@ -32,19 +32,19 @@
namespace tabopts
{
- const USHORT DEFAULT_BORDER = 0x01;
- const USHORT HEADLINE = 0x02;
- const USHORT SPLIT_LAYOUT = 0x08;
- const USHORT HEADLINE_NO_BORDER = HEADLINE | SPLIT_LAYOUT;
- const USHORT ALL_TBL_INS_ATTR = DEFAULT_BORDER | HEADLINE | SPLIT_LAYOUT;
+ const sal_uInt16 DEFAULT_BORDER = 0x01;
+ const sal_uInt16 HEADLINE = 0x02;
+ const sal_uInt16 SPLIT_LAYOUT = 0x08;
+ const sal_uInt16 HEADLINE_NO_BORDER = HEADLINE | SPLIT_LAYOUT;
+ const sal_uInt16 ALL_TBL_INS_ATTR = DEFAULT_BORDER | HEADLINE | SPLIT_LAYOUT;
}
struct SwInsertTableOptions
{
- USHORT mnInsMode;
- USHORT mnRowsToRepeat;
+ sal_uInt16 mnInsMode;
+ sal_uInt16 mnRowsToRepeat;
- SwInsertTableOptions( USHORT nInsMode, USHORT nRowsToRepeat ) :
+ SwInsertTableOptions( sal_uInt16 nInsMode, sal_uInt16 nRowsToRepeat ) :
mnInsMode( nInsMode ), mnRowsToRepeat( nRowsToRepeat ) {};
};
diff --git a/sw/inc/lineinfo.hxx b/sw/inc/lineinfo.hxx
index 3aaca94d8b35..17f78e950ce5 100644
--- a/sw/inc/lineinfo.hxx
+++ b/sw/inc/lineinfo.hxx
@@ -48,15 +48,15 @@ class SW_DLLPUBLIC SwLineNumberInfo : public SwClient //purpose of derivation fr
{
SvxNumberType aType; //e.g. roman linenumbers
String aDivider; //String for aditional interval (vert. lines user defined)
- USHORT nPosFromLeft; //Position for paint
- USHORT nCountBy; //Paint only for every n line
- USHORT nDividerCountBy; //Interval for display of an user defined
+ sal_uInt16 nPosFromLeft; //Position for paint
+ sal_uInt16 nCountBy; //Paint only for every n line
+ sal_uInt16 nDividerCountBy; //Interval for display of an user defined
//string every n lines
LineNumberPosition ePos; //Where should the display occur (number and divicer)
- BOOL bPaintLineNumbers; //Should anything be displayed?
- BOOL bCountBlankLines; //Count empty lines?
- BOOL bCountInFlys; //Count also within FlyFrames?
- BOOL bRestartEachPage; //Restart counting at the first paragraph of each page
+ sal_Bool bPaintLineNumbers; //Should anything be displayed?
+ sal_Bool bCountBlankLines; //Count empty lines?
+ sal_Bool bCountInFlys; //Count also within FlyFrames?
+ sal_Bool bRestartEachPage; //Restart counting at the first paragraph of each page
//(even on follows when paragraphs are splitted)
public:
@@ -64,7 +64,7 @@ public:
SwLineNumberInfo(const SwLineNumberInfo&);
SwLineNumberInfo& operator=(const SwLineNumberInfo&);
- BOOL operator==( const SwLineNumberInfo& rInf ) const;
+ sal_Bool operator==( const SwLineNumberInfo& rInf ) const;
SwCharFmt *GetCharFmt( IDocumentStylePoolAccess& rIDSPA ) const;
void SetCharFmt( SwCharFmt* );
@@ -74,29 +74,29 @@ public:
const String &GetDivider() const { return aDivider; }
void SetDivider( const String &r ) { aDivider = r; }
- USHORT GetDividerCountBy() const { return nDividerCountBy; }
- void SetDividerCountBy( USHORT n ) { nDividerCountBy = n; }
+ sal_uInt16 GetDividerCountBy() const { return nDividerCountBy; }
+ void SetDividerCountBy( sal_uInt16 n ) { nDividerCountBy = n; }
- USHORT GetPosFromLeft() const { return nPosFromLeft; }
- void SetPosFromLeft( USHORT n) { nPosFromLeft = n; }
+ sal_uInt16 GetPosFromLeft() const { return nPosFromLeft; }
+ void SetPosFromLeft( sal_uInt16 n) { nPosFromLeft = n; }
- USHORT GetCountBy() const { return nCountBy; }
- void SetCountBy( USHORT n) { nCountBy = n; }
+ sal_uInt16 GetCountBy() const { return nCountBy; }
+ void SetCountBy( sal_uInt16 n) { nCountBy = n; }
LineNumberPosition GetPos() const { return ePos; }
void SetPos( LineNumberPosition eP ){ ePos = eP; }
- BOOL IsPaintLineNumbers() const { return bPaintLineNumbers; }
- void SetPaintLineNumbers( BOOL b ){ bPaintLineNumbers = b; }
+ sal_Bool IsPaintLineNumbers() const { return bPaintLineNumbers; }
+ void SetPaintLineNumbers( sal_Bool b ){ bPaintLineNumbers = b; }
- BOOL IsCountBlankLines() const { return bCountBlankLines; }
- void SetCountBlankLines( BOOL b ) { bCountBlankLines = b; }
+ sal_Bool IsCountBlankLines() const { return bCountBlankLines; }
+ void SetCountBlankLines( sal_Bool b ) { bCountBlankLines = b; }
- BOOL IsCountInFlys() const { return bCountInFlys; }
- void SetCountInFlys( BOOL b ) { bCountInFlys = b; }
+ sal_Bool IsCountInFlys() const { return bCountInFlys; }
+ void SetCountInFlys( sal_Bool b ) { bCountInFlys = b; }
- BOOL IsRestartEachPage() const { return bRestartEachPage; }
- void SetRestartEachPage( BOOL b ) { bRestartEachPage = b; }
+ sal_Bool IsRestartEachPage() const { return bRestartEachPage; }
+ void SetRestartEachPage( sal_Bool b ) { bRestartEachPage = b; }
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
};
diff --git a/sw/inc/list.hxx b/sw/inc/list.hxx
index 659d9c119242..5629540126ee 100644
--- a/sw/inc/list.hxx
+++ b/sw/inc/list.hxx
@@ -57,7 +57,7 @@ class SwList
void ValidateListTree();
void MarkListLevel( const int nListLevel,
- const BOOL bValue );
+ const sal_Bool bValue );
bool IsListLevelMarked( const int nListLevel ) const;
diff --git a/sw/inc/makefile.mk b/sw/inc/makefile.mk
deleted file mode 100644
index b5efd14c8164..000000000000
--- a/sw/inc/makefile.mk
+++ /dev/null
@@ -1,49 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..
-
-PRJNAME=sw
-TARGET=inc
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.IF "$(ENABLE_PCH)"!="" # && ( "$(PRJNAME)"!="sw" || "$(BUILD_SPECIAL)"!="TRUE" )
-ALLTAR : \
- $(SLO)$/precompiled.pch \
- $(SLO)$/precompiled_ex.pch
-
-.ENDIF # "$(ENABLE_PCH)"!=""
-
diff --git a/sw/inc/mdiexp.hxx b/sw/inc/mdiexp.hxx
index 3a4132f77ad7..e7af13ecdf54 100644
--- a/sw/inc/mdiexp.hxx
+++ b/sw/inc/mdiexp.hxx
@@ -41,26 +41,26 @@ class ViewShell;
class SwDoc;
class SwDocShell;
-extern void ScrollMDI(ViewShell* pVwSh, const SwRect &, USHORT nRangeX, USHORT nRangeY);
-extern BOOL IsScrollMDI(ViewShell* pVwSh, const SwRect &);
+extern void ScrollMDI(ViewShell* pVwSh, const SwRect &, sal_uInt16 nRangeX, sal_uInt16 nRangeY);
+extern sal_Bool IsScrollMDI(ViewShell* pVwSh, const SwRect &);
extern void SizeNotify(ViewShell* pVwSh, const Size &);
// Update of status bar during an action.
extern void PageNumNotify( ViewShell* pVwSh,
- USHORT nPhyNum,
- USHORT nVirtNum,
+ sal_uInt16 nPhyNum,
+ sal_uInt16 nVirtNum,
const UniString& rPg );
enum FlyMode { FLY_DRAG_START, FLY_DRAG, FLY_DRAG_END };
extern void FrameNotify( ViewShell* pVwSh, FlyMode eMode = FLY_DRAG );
-SW_DLLPUBLIC void StartProgress ( USHORT nMessId, long nStartVal, long nEndVal, SwDocShell *pDocSh = 0 );
+SW_DLLPUBLIC void StartProgress ( sal_uInt16 nMessId, long nStartVal, long nEndVal, SwDocShell *pDocSh = 0 );
SW_DLLPUBLIC void EndProgress ( SwDocShell *pDocSh = 0 );
SW_DLLPUBLIC void SetProgressState ( long nPosition, SwDocShell *pDocShell );
-void SetProgressText ( USHORT nMessId, SwDocShell *pDocShell );
+void SetProgressText ( sal_uInt16 nMessId, SwDocShell *pDocShell );
void RescheduleProgress( SwDocShell *pDocShell );
-void EnableCmdInterface(BOOL bEnable = TRUE);
+void EnableCmdInterface(sal_Bool bEnable = sal_True);
LAYOUT_NS Dialog* GetSearchDialog();
@@ -73,7 +73,7 @@ void DelAllGrfCacheEntries( SwDoc* pDoc );
// Read ChgMode for tables from configuration.
TblChgMode GetTblChgDefaultMode();
-BOOL JumpToSwMark( ViewShell* pVwSh, const UniString& rMark );
+sal_Bool JumpToSwMark( ViewShell* pVwSh, const UniString& rMark );
#endif
diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx
index 5081d3ad76e2..e45a3e39657f 100644
--- a/sw/inc/modcfg.hxx
+++ b/sw/inc/modcfg.hxx
@@ -29,7 +29,7 @@
#define _MODOPT_HXX
#include <tools/string.hxx>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include <vcl/field.hxx>
#include <svl/svarray.hxx>
#include <unotools/configitem.hxx>
@@ -63,7 +63,7 @@ class SwRevisionConfig : public utl::ConfigItem
//Revision/TextDisplay/Delete/Color
AuthorCharAttr aFormatAttr; //Revision/TextDisplay/ChangeAttribute/Attribute
//Revision/TextDisplay/ChangeAttribute/Color
- USHORT nMarkAlign; //Revision/LinesChanged/Mark
+ sal_uInt16 nMarkAlign; //Revision/LinesChanged/Mark
Color aMarkColor; //Revision/LinesChanged/Color
const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames();
@@ -107,10 +107,10 @@ class SwTableConfig : public utl::ConfigItem
{
friend class SwModuleOptions;
- USHORT nTblHMove; //int Table/Shift/Row
- USHORT nTblVMove; //int Table/Shift/Column
- USHORT nTblHInsert; //int Table/Insert/Row
- USHORT nTblVInsert; //int Table/Insert/Column
+ sal_uInt16 nTblHMove; //int Table/Shift/Row
+ sal_uInt16 nTblVMove; //int Table/Shift/Column
+ sal_uInt16 nTblHInsert; //int Table/Insert/Row
+ sal_uInt16 nTblVInsert; //int Table/Insert/Column
TblChgMode eTblChgMode; //int Table/Change/Effect
sal_Bool bInsTblFormatNum; // Table/Input/NumberRecognition // Automatic recognition of numbers.
@@ -133,13 +133,13 @@ class SwMiscConfig : public utl::ConfigItem
friend class SwModuleOptions;
String sWordDelimiter; // Statistics/WordNumber/Delimiter
- BOOL bDefaultFontsInCurrDocOnly; // DefaultFont/Document
- BOOL bShowIndexPreview ; // Index/ShowPreview
- BOOL bGrfToGalleryAsLnk; // Misc/GraphicToGalleryAsLink
- BOOL bNumAlignSize; // Numbering/Graphic/KeepRatio
- BOOL bSinglePrintJob; // FormLetter/PrintOutput/SinglePrintJobs
- BOOL bIsNameFromColumn; // FormLetter/FileOutput/FileName/Generation
- BOOL bAskForMailMergeInPrint; // Ask if documents containing fields should be 'mailmerged'
+ sal_Bool bDefaultFontsInCurrDocOnly; // DefaultFont/Document
+ sal_Bool bShowIndexPreview ; // Index/ShowPreview
+ sal_Bool bGrfToGalleryAsLnk; // Misc/GraphicToGalleryAsLink
+ sal_Bool bNumAlignSize; // Numbering/Graphic/KeepRatio
+ sal_Bool bSinglePrintJob; // FormLetter/PrintOutput/SinglePrintJobs
+ sal_Bool bIsNameFromColumn; // FormLetter/FileOutput/FileName/Generation
+ sal_Bool bAskForMailMergeInPrint; // Ask if documents containing fields should be 'mailmerged'
sal_Int16 nMailingFormats; // FormLetter/MailingOutput/Formats
String sNameFromColumn; // FormLetter/FileOutput/FileName/FromDatabaseField (string!)
String sMailingPath; // FormLetter/FileOutput/Path
@@ -168,7 +168,7 @@ class SW_DLLPUBLIC SwModuleOptions
SwMiscConfig aMiscConfig;
//fiscus: don't show tips of text fields - it's not part of the configuration!
- BOOL bHideFieldTips : 1;
+ sal_Bool bHideFieldTips : 1;
public:
SwModuleOptions();
@@ -177,20 +177,20 @@ public:
void SetTblMode( TblChgMode eSet ) { aTableConfig.eTblChgMode = eSet;
aTableConfig.SetModified();}
- USHORT GetTblHMove() const { return aTableConfig.nTblHMove;}
- void SetTblHMove( USHORT nSet ) { aTableConfig.nTblHMove = nSet;
+ sal_uInt16 GetTblHMove() const { return aTableConfig.nTblHMove;}
+ void SetTblHMove( sal_uInt16 nSet ) { aTableConfig.nTblHMove = nSet;
aTableConfig.SetModified();}
- USHORT GetTblVMove() const { return aTableConfig.nTblVMove;}
- void SetTblVMove( USHORT nSet ) { aTableConfig.nTblVMove = nSet;
+ sal_uInt16 GetTblVMove() const { return aTableConfig.nTblVMove;}
+ void SetTblVMove( sal_uInt16 nSet ) { aTableConfig.nTblVMove = nSet;
aTableConfig.SetModified();}
- USHORT GetTblHInsert() const {return aTableConfig.nTblHInsert;}
- void SetTblHInsert( USHORT nSet ) { aTableConfig.nTblHInsert = nSet;
+ sal_uInt16 GetTblHInsert() const {return aTableConfig.nTblHInsert;}
+ void SetTblHInsert( sal_uInt16 nSet ) { aTableConfig.nTblHInsert = nSet;
aTableConfig.SetModified();}
- USHORT GetTblVInsert() const {return aTableConfig.nTblVInsert;}
- void SetTblVInsert( USHORT nSet ) { aTableConfig.nTblVInsert = nSet;
+ sal_uInt16 GetTblVInsert() const {return aTableConfig.nTblVInsert;}
+ void SetTblVInsert( sal_uInt16 nSet ) { aTableConfig.nTblVInsert = nSet;
aTableConfig.SetModified();}
const AuthorCharAttr &GetInsertAuthorAttr() const { return aRevisionConfig.aInsertAttr; }
@@ -205,17 +205,17 @@ public:
void SetFormatAuthorAttr( AuthorCharAttr &rAttr ) { aRevisionConfig.aFormatAttr = rAttr;
aRevisionConfig.SetModified();}
- USHORT GetMarkAlignMode() const { return aRevisionConfig.nMarkAlign; }
- void SetMarkAlignMode(USHORT nMode) { aRevisionConfig.nMarkAlign = nMode;
+ sal_uInt16 GetMarkAlignMode() const { return aRevisionConfig.nMarkAlign; }
+ void SetMarkAlignMode(sal_uInt16 nMode) { aRevisionConfig.nMarkAlign = nMode;
aRevisionConfig.SetModified();}
const Color& GetMarkAlignColor() const { return aRevisionConfig.aMarkColor; }
void SetMarkAlignColor(const Color &rColor) { aRevisionConfig.aMarkColor = rColor;
aRevisionConfig.SetModified();}
- BOOL IsInsWithCaption(BOOL bHTML) const
- { return bHTML ? FALSE : aInsertConfig.bInsWithCaption; }
- void SetInsWithCaption( BOOL bHTML, BOOL b )
+ sal_Bool IsInsWithCaption(sal_Bool bHTML) const
+ { return bHTML ? sal_False : aInsertConfig.bInsWithCaption; }
+ void SetInsWithCaption( sal_Bool bHTML, sal_Bool b )
{ if(!bHTML)
aInsertConfig.bInsWithCaption = b;
aInsertConfig.SetModified();}
@@ -230,60 +230,60 @@ public:
}
}
- BOOL IsInsTblFormatNum(BOOL bHTML) const
+ sal_Bool IsInsTblFormatNum(sal_Bool bHTML) const
{ return bHTML ? aWebTableConfig.bInsTblFormatNum : aTableConfig.bInsTblFormatNum; }
- void SetInsTblFormatNum( BOOL bHTML, BOOL b )
+ void SetInsTblFormatNum( sal_Bool bHTML, sal_Bool b )
{ bHTML ? (aWebTableConfig.bInsTblFormatNum = b) : (aTableConfig.bInsTblFormatNum = b);
bHTML ? aWebTableConfig.SetModified() : aTableConfig.SetModified();}
- BOOL IsInsTblChangeNumFormat(BOOL bHTML) const
+ sal_Bool IsInsTblChangeNumFormat(sal_Bool bHTML) const
{ return bHTML ? aWebTableConfig.bInsTblChangeNumFormat : aTableConfig.bInsTblChangeNumFormat; }
- void SetInsTblChangeNumFormat( BOOL bHTML, BOOL b )
+ void SetInsTblChangeNumFormat( sal_Bool bHTML, sal_Bool b )
{ bHTML ? (aWebTableConfig.bInsTblChangeNumFormat = b) : (aTableConfig.bInsTblChangeNumFormat = b);
bHTML ? aWebTableConfig.SetModified() : aTableConfig.SetModified();}
- BOOL IsInsTblAlignNum(BOOL bHTML) const
+ sal_Bool IsInsTblAlignNum(sal_Bool bHTML) const
{ return bHTML ? aWebTableConfig.bInsTblAlignNum : aTableConfig.bInsTblAlignNum; }
- void SetInsTblAlignNum( BOOL bHTML, BOOL b )
+ void SetInsTblAlignNum( sal_Bool bHTML, sal_Bool b )
{ bHTML ? (aWebTableConfig.bInsTblAlignNum = b) : (aTableConfig.bInsTblAlignNum = b);
bHTML ? aWebTableConfig.SetModified() : aTableConfig.SetModified();;}
- SwInsertTableOptions GetInsTblFlags(BOOL bHTML) const
+ SwInsertTableOptions GetInsTblFlags(sal_Bool bHTML) const
{ return bHTML ? aWebInsertConfig.aInsTblOpts : aInsertConfig.aInsTblOpts;}
- void SetInsTblFlags( BOOL bHTML, const SwInsertTableOptions& rOpts ) {
+ void SetInsTblFlags( sal_Bool bHTML, const SwInsertTableOptions& rOpts ) {
bHTML ? (aWebInsertConfig.aInsTblOpts = rOpts) : (aInsertConfig.aInsTblOpts = rOpts);
bHTML ? aWebInsertConfig.SetModified() : aInsertConfig.SetModified();}
- const InsCaptionOpt* GetCapOption(BOOL bHTML, const SwCapObjType eType, const SvGlobalName *pOleId);
- BOOL SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt);
+ const InsCaptionOpt* GetCapOption(sal_Bool bHTML, const SwCapObjType eType, const SvGlobalName *pOleId);
+ sal_Bool SetCapOption(sal_Bool bHTML, const InsCaptionOpt* pOpt);
- BOOL IsGrfToGalleryAsLnk() const { return aMiscConfig.bGrfToGalleryAsLnk; }
- void SetGrfToGalleryAsLnk( BOOL b ) { aMiscConfig.bGrfToGalleryAsLnk = b;
+ sal_Bool IsGrfToGalleryAsLnk() const { return aMiscConfig.bGrfToGalleryAsLnk; }
+ void SetGrfToGalleryAsLnk( sal_Bool b ) { aMiscConfig.bGrfToGalleryAsLnk = b;
aMiscConfig.SetModified();}
sal_Int16 GetMailingFormats() const { return aMiscConfig.nMailingFormats;}
void SetMailingFormats( sal_Int16 nSet ) { aMiscConfig.nMailingFormats = nSet;
aMiscConfig.SetModified();}
- BOOL IsSinglePrintJob() const { return aMiscConfig.bSinglePrintJob; }
- void SetSinglePrintJob( BOOL b ) { aMiscConfig.bSinglePrintJob = b;
+ sal_Bool IsSinglePrintJob() const { return aMiscConfig.bSinglePrintJob; }
+ void SetSinglePrintJob( sal_Bool b ) { aMiscConfig.bSinglePrintJob = b;
aMiscConfig.SetModified();}
- BOOL IsNumAlignSize() const { return aMiscConfig.bNumAlignSize; }
- void SetNumAlignSize( BOOL b ) { aMiscConfig.bNumAlignSize = b;
+ sal_Bool IsNumAlignSize() const { return aMiscConfig.bNumAlignSize; }
+ void SetNumAlignSize( sal_Bool b ) { aMiscConfig.bNumAlignSize = b;
aMiscConfig.SetModified();}
- BOOL IsNameFromColumn() const { return aMiscConfig.bIsNameFromColumn; }
- void SetIsNameFromColumn( BOOL bSet )
+ sal_Bool IsNameFromColumn() const { return aMiscConfig.bIsNameFromColumn; }
+ void SetIsNameFromColumn( sal_Bool bSet )
{
aMiscConfig.SetModified();
aMiscConfig.bIsNameFromColumn = bSet;
}
- BOOL IsAskForMailMerge() const { return aMiscConfig.bAskForMailMergeInPrint;}
- void SetAskForMailMerge(BOOL bSet)
+ sal_Bool IsAskForMailMerge() const { return aMiscConfig.bAskForMailMergeInPrint;}
+ void SetAskForMailMerge(sal_Bool bSet)
{
aMiscConfig.SetModified();
aMiscConfig.bAskForMailMergeInPrint = bSet;
@@ -307,22 +307,22 @@ public:
aMiscConfig.SetModified();}
//convert word delimiter from or to user interface
- static String ConvertWordDelimiter(const String& rDelim, BOOL bFromUI);
+ static String ConvertWordDelimiter(const String& rDelim, sal_Bool bFromUI);
- BOOL IsShowIndexPreview() const {return aMiscConfig.bShowIndexPreview;}
- void SetShowIndexPreview(BOOL bSet)
+ sal_Bool IsShowIndexPreview() const {return aMiscConfig.bShowIndexPreview;}
+ void SetShowIndexPreview(sal_Bool bSet)
{aMiscConfig.bShowIndexPreview = bSet;
aMiscConfig.SetModified();}
- BOOL IsDefaultFontInCurrDocOnly() const { return aMiscConfig.bDefaultFontsInCurrDocOnly;}
- void SetDefaultFontInCurrDocOnly(BOOL bSet)
+ sal_Bool IsDefaultFontInCurrDocOnly() const { return aMiscConfig.bDefaultFontsInCurrDocOnly;}
+ void SetDefaultFontInCurrDocOnly(sal_Bool bSet)
{
aMiscConfig.bDefaultFontsInCurrDocOnly = bSet;
aMiscConfig.SetModified();
}
- BOOL IsHideFieldTips() const {return bHideFieldTips;}
- void SetHideFieldTips(BOOL bSet) {bHideFieldTips = bSet;}
+ sal_Bool IsHideFieldTips() const {return bHideFieldTips;}
+ void SetHideFieldTips(sal_Bool bSet) {bHideFieldTips = bSet;}
};
#endif
diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx
index a2f24ff53506..71c447ab7c0b 100644
--- a/sw/inc/ndarr.hxx
+++ b/sw/inc/ndarr.hxx
@@ -31,6 +31,8 @@
#include <vector>
+#include <boost/utility.hpp>
+
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <svl/svarray.hxx>
@@ -77,11 +79,13 @@ struct SwPosition;
// --------------------
typedef SwNode * SwNodePtr;
-typedef BOOL (*FnForEach_SwNodes)( const SwNodePtr&, void* pArgs );
+typedef sal_Bool (*FnForEach_SwNodes)( const SwNodePtr&, void* pArgs );
SV_DECL_PTRARR_SORT( SwOutlineNodes, SwNodePtr, 0, 10 )
-class SW_DLLPUBLIC SwNodes: private BigPtrArray
+class SW_DLLPUBLIC SwNodes
+ : private BigPtrArray
+ , private ::boost::noncopyable
{
friend class SwDoc;
friend class SwNode;
@@ -92,7 +96,7 @@ class SW_DLLPUBLIC SwNodes: private BigPtrArray
void InsertNode( const SwNodePtr pNode,
const SwNodeIndex& rPos );
void InsertNode( const SwNodePtr pNode,
- ULONG nPos );
+ sal_uLong nPos );
SwDoc* pMyDoc; // This Doc contains the nodes-array.
@@ -102,27 +106,27 @@ class SW_DLLPUBLIC SwNodes: private BigPtrArray
mutable SwOutlineNodes* pOutlineNds; // Array of all outline nodes.
- BOOL bInNodesDel : 1; // In Case of recursive calling.
+ sal_Bool bInNodesDel : 1; // In Case of recursive calling.
// Do not update Num/Outline.
- BOOL bInDelUpdOutl : 1; // Flag for updating of Outline.
- BOOL bInDelUpdNum : 1; // Flag for updating of Outline.
+ sal_Bool bInDelUpdOutl : 1; // Flag for updating of Outline.
+ sal_Bool bInDelUpdNum : 1; // Flag for updating of Outline.
// For administering indices.
void RegisterIndex( SwNodeIndex& rIdx );
void DeRegisterIndex( SwNodeIndex& rIdx );
- void RemoveNode( ULONG nDelPos, ULONG nLen, BOOL bDel );
+ void RemoveNode( sal_uLong nDelPos, sal_uLong nLen, sal_Bool bDel );
// Actions on the nodes.
void SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & aEnd );
- void DelNodes( const SwNodeIndex& rStart, ULONG nCnt = 1 );
+ void DelNodes( const SwNodeIndex& rStart, sal_uLong nCnt = 1 );
- void ChgNode( SwNodeIndex& rDelPos, ULONG nSize,
- SwNodeIndex& rInsPos, BOOL bNewFrms );
+ void ChgNode( SwNodeIndex& rDelPos, sal_uLong nSize,
+ SwNodeIndex& rInsPos, sal_Bool bNewFrms );
void UpdtOutlineIdx( const SwNode& ); // Update all OutlineNodes starting from Node.
void _CopyNodes( const SwNodeRange&, const SwNodeIndex&,
- BOOL bNewFrms = TRUE, BOOL bTblInsDummyNode = FALSE ) const;
+ sal_Bool bNewFrms = sal_True, sal_Bool bTblInsDummyNode = sal_False ) const;
void _DelDummyNodes( const SwNodeRange& rRg );
protected:
@@ -134,20 +138,16 @@ public:
typedef ::std::vector<SwNodeRange> NodeRanges_t;
typedef ::std::vector<NodeRanges_t> TableRanges_t;
- SwNodePtr operator[]( ULONG n ) const
+ SwNodePtr operator[]( sal_uLong n ) const
{ return (SwNodePtr)BigPtrArray::operator[] ( n ); }
- // Implementaition in ndindex.hxx - it should be adapted to the
- // new interface as soon as possible.
- inline SwNodePtr operator[]( const SwNodeIndex& rIdx ) const;
-
- ULONG Count() const { return BigPtrArray::Count(); }
+ sal_uLong Count() const { return BigPtrArray::Count(); }
void ForEach( FnForEach_SwNodes fnForEach, void* pArgs = 0 )
{
BigPtrArray::ForEach( 0, BigPtrArray::Count(),
(FnForEach) fnForEach, pArgs );
}
- void ForEach( ULONG nStt, ULONG nEnd, FnForEach_SwNodes fnForEach, void* pArgs = 0 )
+ void ForEach( sal_uLong nStt, sal_uLong nEnd, FnForEach_SwNodes fnForEach, void* pArgs = 0 )
{
BigPtrArray::ForEach( nStt, nEnd, (FnForEach) fnForEach, pArgs );
}
@@ -170,23 +170,23 @@ public:
// Is the NodesArray the regular one of Doc? (and not the UndoNds, ...)
// Implementation in doc.hxx (because one needs to know Doc for it) !
- BOOL IsDocNodes() const;
+ sal_Bool IsDocNodes() const;
- USHORT GetSectionLevel(const SwNodeIndex &rIndex) const;
- void Delete(const SwNodeIndex &rPos, ULONG nNodes = 1);
+ sal_uInt16 GetSectionLevel(const SwNodeIndex &rIndex) const;
+ void Delete(const SwNodeIndex &rPos, sal_uLong nNodes = 1);
- BOOL _MoveNodes( const SwNodeRange&, SwNodes& rNodes, const SwNodeIndex&,
- BOOL bNewFrms = TRUE );
+ sal_Bool _MoveNodes( const SwNodeRange&, SwNodes& rNodes, const SwNodeIndex&,
+ sal_Bool bNewFrms = sal_True );
void MoveRange( SwPaM&, SwPosition&, SwNodes& rNodes );
void _Copy( const SwNodeRange& rRg, const SwNodeIndex& rInsPos,
- BOOL bNewFrms = TRUE ) const
+ sal_Bool bNewFrms = sal_True ) const
{ _CopyNodes( rRg, rInsPos, bNewFrms ); }
void SectionUp( SwNodeRange *);
void SectionDown( SwNodeRange *pRange, SwStartNodeType = SwNormalStartNode );
- BOOL CheckNodesRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd ) const;
+ sal_Bool CheckNodesRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd ) const;
void GoStartOfSection(SwNodeIndex *) const;
void GoEndOfSection(SwNodeIndex *) const;
@@ -201,10 +201,10 @@ public:
// Go to next content-node that is not protected or hidden
// (Both set FALSE ==> GoNext/GoPrevious!!!).
- SwCntntNode* GoNextSection( SwNodeIndex *, int bSkipHidden = TRUE,
- int bSkipProtect = TRUE ) const;
- SwCntntNode* GoPrevSection( SwNodeIndex *, int bSkipHidden = TRUE,
- int bSkipProtect = TRUE ) const;
+ SwCntntNode* GoNextSection( SwNodeIndex *, int bSkipHidden = sal_True,
+ int bSkipProtect = sal_True ) const;
+ SwCntntNode* GoPrevSection( SwNodeIndex *, int bSkipHidden = sal_True,
+ int bSkipProtect = sal_True ) const;
// Create an empty section of Start- and EndNote. It may be called
// only if a new section with content is to be created,
@@ -227,7 +227,7 @@ public:
const Graphic* pGraphic,
SwGrfFmtColl *pColl,
SwAttrSet* pAutoAttr = 0,
- BOOL bDelayed = FALSE ); // in ndgrf.cxx
+ sal_Bool bDelayed = sal_False ); // in ndgrf.cxx
SwGrfNode *MakeGrfNode( const SwNodeIndex & rWhere,
const GraphicObject& rGrfObj,
@@ -247,7 +247,7 @@ public:
// Array of all OutlineNodes.
const SwOutlineNodes& GetOutLineNds() const;
- // void UpdateOutlineNode( const SwNode&, BYTE nOldLevel, BYTE nNewLevel );//#outline level,removed by zhaojianwei
+ //void UpdateOutlineNode( const SwNode&, sal_uInt8 nOldLevel, sal_uInt8 nNewLevel );//#outline level,removed by zhaojianwei
// Update all Nodes - Rule/Format-Change.
void UpdateOutlineNode(SwNode & rNd);
@@ -261,8 +261,8 @@ public:
// overrides the item in pAttrSet.
SwTableNode* InsertTable( const SwNodeIndex& rNdIdx,
- USHORT nBoxes, SwTxtFmtColl* pCntntTxtColl,
- USHORT nLines = 0, USHORT nRepeat = 0,
+ sal_uInt16 nBoxes, SwTxtFmtColl* pCntntTxtColl,
+ sal_uInt16 nLines = 0, sal_uInt16 nRepeat = 0,
SwTxtFmtColl* pHeadlineTxtColl = 0,
const SwAttrSet * pAttrSet = 0);
@@ -286,30 +286,30 @@ public:
// Create regular text from what was table.
- BOOL TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
+ sal_Bool TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
SwUndoTblToTxt* = 0 );
// Is in untbl.cxx and may called only by Undo-object.
- SwTableNode* UndoTableToText( ULONG nStt, ULONG nEnd,
+ SwTableNode* UndoTableToText( sal_uLong nStt, sal_uLong nEnd,
const SwTblToTxtSaves& rSavedData );
// Insert a new box in the line before InsPos. Its format
// is taken from the following one (or from the previous one if we are
// at the end). In the line there must be a box already.
- BOOL InsBoxen( SwTableNode*, SwTableLine*, SwTableBoxFmt*,
+ sal_Bool InsBoxen( SwTableNode*, SwTableLine*, SwTableBoxFmt*,
// Formats for TextNode of box.
SwTxtFmtColl*, const SfxItemSet* pAutoAttr,
- USHORT nInsPos, USHORT nCnt = 1 );
+ sal_uInt16 nInsPos, sal_uInt16 nCnt = 1 );
// Splits a table at the base-line which contains the index.
// All base lines behind it are moved to a new table/ -node.
// Is the flag bCalcNewSize set to TRUE, the new SSize for both
// tables is calculated from the Maximum of the boxes, provided
// SSize is set "absolute" (LONG_MAX).
// (Momentarily this is needed only for the RTF-parser.)
- SwTableNode* SplitTable( const SwNodeIndex& rPos, BOOL bAfter = TRUE,
- BOOL bCalcNewSize = FALSE );
+ SwTableNode* SplitTable( const SwNodeIndex& rPos, sal_Bool bAfter = sal_True,
+ sal_Bool bCalcNewSize = sal_False );
// Two Tables that are following one another are merged.
- BOOL MergeTable( const SwNodeIndex& rPos, BOOL bWithPrev = TRUE,
- USHORT nMode = 0, SwHistory* pHistory = 0 );
+ sal_Bool MergeTable( const SwNodeIndex& rPos, sal_Bool bWithPrev = sal_True,
+ sal_uInt16 nMode = 0, SwHistory* pHistory = 0 );
// Insert a new SwSection.
SwSectionNode* InsertTextSection(SwNodeIndex const& rNdIdx,
@@ -333,9 +333,6 @@ public:
SwNode * DocumentSectionStartNode(SwNode * pNode) const;
SwNode * DocumentSectionEndNode(SwNode * pNode) const;
-private:
- // Private constructor because copying is never allowed!!
- SwNodes( const SwNodes & rNodes );
};
#endif
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index a50a8b8434ba..2dbcdea62697 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -51,15 +51,15 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode
String aNewStrmName; // SW3/XML: new stream name (either SW3 stream
// name or package url)
String aLowResGrf; // HTML: LowRes graphics (substitute until regular HighRes graphics is loaded).
- BOOL bTransparentFlagValid :1;
- BOOL bInSwapIn :1;
+ sal_Bool bTransparentFlagValid :1;
+ sal_Bool bInSwapIn :1;
- BOOL bGrafikArrived :1;
- BOOL bChgTwipSize :1;
- BOOL bChgTwipSizeFromPixel :1;
- BOOL bLoadLowResGrf :1;
- BOOL bFrameInPaint :1; // To avoid Start-/EndActions in Paint via SwapIn.
- BOOL bScaleImageMap :1; // Scale image map in SetTwipSize.
+ sal_Bool bGrafikArrived :1;
+ sal_Bool bChgTwipSize :1;
+ sal_Bool bChgTwipSizeFromPixel :1;
+ sal_Bool bLoadLowResGrf :1;
+ sal_Bool bFrameInPaint :1; // To avoid Start-/EndActions in Paint via SwapIn.
+ sal_Bool bScaleImageMap :1; // Scale image map in SetTwipSize.
boost::shared_ptr< SwAsyncRetrieveInputStreamThreadConsumer > mpThreadConsumer;
bool mbLinkedInputStreamReady;
@@ -82,8 +82,8 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode
SwAttrSet* pAutoAttr = 0 );
void InsertLink( const String& rGrfName, const String& rFltName );
- BOOL ImportGraphic( SvStream& rStrm );
- BOOL HasStreamName() const { return aGrfObj.HasUserData(); }
+ sal_Bool ImportGraphic( SvStream& rStrm );
+ sal_Bool HasStreamName() const { return aGrfObj.HasUserData(); }
// adjust return type and rename method to
// indicate that its an private one.
@@ -145,22 +145,22 @@ public:
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
void SetTwipSize( const Size& rSz );
- BOOL IsTransparent() const;
+ sal_Bool IsTransparent() const;
- inline BOOL IsAnimated() const { return aGrfObj.IsAnimated(); }
+ inline sal_Bool IsAnimated() const { return aGrfObj.IsAnimated(); }
- inline BOOL IsChgTwipSize() const { return bChgTwipSize; }
- inline BOOL IsChgTwipSizeFromPixel() const { return bChgTwipSizeFromPixel; }
- inline void SetChgTwipSize( BOOL b, BOOL bFromPx=FALSE ) { bChgTwipSize = b; bChgTwipSizeFromPixel = bFromPx; }
+ inline sal_Bool IsChgTwipSize() const { return bChgTwipSize; }
+ inline sal_Bool IsChgTwipSizeFromPixel() const { return bChgTwipSizeFromPixel; }
+ inline void SetChgTwipSize( sal_Bool b, sal_Bool bFromPx=sal_False ) { bChgTwipSize = b; bChgTwipSizeFromPixel = bFromPx; }
- inline BOOL IsGrafikArrived() const { return bGrafikArrived; }
- inline void SetGrafikArrived( BOOL b ) { bGrafikArrived = b; }
+ inline sal_Bool IsGrafikArrived() const { return bGrafikArrived; }
+ inline void SetGrafikArrived( sal_Bool b ) { bGrafikArrived = b; }
- inline BOOL IsFrameInPaint() const { return bFrameInPaint; }
- inline void SetFrameInPaint( BOOL b ) { bFrameInPaint = b; }
+ inline sal_Bool IsFrameInPaint() const { return bFrameInPaint; }
+ inline void SetFrameInPaint( sal_Bool b ) { bFrameInPaint = b; }
- inline BOOL IsScaleImageMap() const { return bScaleImageMap; }
- inline void SetScaleImageMap( BOOL b ) { bScaleImageMap = b; }
+ inline sal_Bool IsScaleImageMap() const { return bScaleImageMap; }
+ inline void SetScaleImageMap( sal_Bool b ) { bScaleImageMap = b; }
#endif
// in ndcopy.cxx
virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
@@ -168,33 +168,33 @@ public:
// Re-read in case graphic was not OK. The current one
// gets replaced by the new one.
- BOOL ReRead( const String& rGrfName, const String& rFltName,
+ sal_Bool ReRead( const String& rGrfName, const String& rFltName,
const Graphic* pGraphic = 0,
const GraphicObject* pGrfObj = 0,
- BOOL bModify = TRUE );
+ sal_Bool bModify = sal_True );
// Loading of graphic immediately before displaying.
- short SwapIn( BOOL bWaitForData = FALSE );
+ short SwapIn( sal_Bool bWaitForData = sal_False );
// Remove graphic in order to free memory.
short SwapOut();
// Access to storage stream-name.
void SetStreamName( const String& r ) { aGrfObj.SetUserData( r ); }
void SetNewStreamName( const String& r ) { aNewStrmName = r; }
// Is this node selected by any shell?
- BOOL IsSelected() const;
+ sal_Bool IsSelected() const;
#endif
// Communicate to graphic that node is in Undo-range.
- virtual BOOL SavePersistentData();
- virtual BOOL RestorePersistentData();
+ virtual sal_Bool SavePersistentData();
+ virtual sal_Bool RestorePersistentData();
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
// Query link-data.
- BOOL IsGrfLink() const { return refLink.Is(); }
- inline BOOL IsLinkedFile() const;
- inline BOOL IsLinkedDDE() const;
+ sal_Bool IsGrfLink() const { return refLink.Is(); }
+ inline sal_Bool IsLinkedFile() const;
+ inline sal_Bool IsLinkedDDE() const;
::sfx2::SvBaseLinkRef GetLink() const { return refLink; }
- BOOL GetFileFilterNms( String* pFileNm, String* pFilterNm ) const;
+ sal_Bool GetFileFilterNms( String* pFileNm, String* pFilterNm ) const;
void ReleaseLink();
// Scale an image-map: the image-map becomes zoomed in / out by
@@ -227,11 +227,11 @@ inline const SwGrfNode *SwNode::GetGrfNode() const
}
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
-inline BOOL SwGrfNode::IsLinkedFile() const
+inline sal_Bool SwGrfNode::IsLinkedFile() const
{
return refLink.Is() && OBJECT_CLIENT_GRF == refLink->GetObjType();
}
-inline BOOL SwGrfNode::IsLinkedDDE() const
+inline sal_Bool SwGrfNode::IsLinkedDDE() const
{
return refLink.Is() && OBJECT_CLIENT_DDE == refLink->GetObjType();
}
diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx
index bd47ced1eba8..58aa4c2d3037 100644
--- a/sw/inc/ndhints.hxx
+++ b/sw/inc/ndhints.hxx
@@ -82,31 +82,31 @@ protected:
//FIXME: why are the non-const methods public?
public:
void Insert( const SwTxtAttr *pHt );
- void DeleteAtPos( const USHORT nPosInStart );
+ void DeleteAtPos( const sal_uInt16 nPosInStart );
bool Resort();
- SwTxtAttr * Cut( const USHORT nPosInStart );
+ SwTxtAttr * Cut( const sal_uInt16 nPosInStart );
- inline const SwTxtAttr * GetStart( const USHORT nPos ) const
+ inline const SwTxtAttr * GetStart( const sal_uInt16 nPos ) const
{ return m_HintStarts[nPos]; }
- inline const SwTxtAttr * GetEnd ( const USHORT nPos ) const
+ inline const SwTxtAttr * GetEnd ( const sal_uInt16 nPos ) const
{ return m_HintEnds [nPos]; }
- inline SwTxtAttr * GetStart( const USHORT nPos )
+ inline SwTxtAttr * GetStart( const sal_uInt16 nPos )
{ return m_HintStarts[nPos]; }
- inline SwTxtAttr * GetEnd ( const USHORT nPos )
+ inline SwTxtAttr * GetEnd ( const sal_uInt16 nPos )
{ return m_HintEnds [nPos]; }
- inline USHORT GetEndCount() const { return m_HintEnds .Count(); }
- inline USHORT GetStartCount() const { return m_HintStarts.Count(); }
+ inline sal_uInt16 GetEndCount() const { return m_HintEnds .Count(); }
+ inline sal_uInt16 GetStartCount() const { return m_HintStarts.Count(); }
- inline USHORT GetStartOf( const SwTxtAttr *pHt ) const;
- inline USHORT GetPos( const SwTxtAttr *pHt ) const
+ inline sal_uInt16 GetStartOf( const SwTxtAttr *pHt ) const;
+ inline sal_uInt16 GetPos( const SwTxtAttr *pHt ) const
{ return m_HintStarts.GetPos( pHt ); }
- inline SwTxtAttr * GetTextHint( const USHORT nIdx )
+ inline SwTxtAttr * GetTextHint( const sal_uInt16 nIdx )
{ return GetStart(nIdx); }
- inline const SwTxtAttr * operator[]( const USHORT nIdx ) const
+ inline const SwTxtAttr * operator[]( const sal_uInt16 nIdx ) const
{ return m_HintStarts[nIdx]; }
- inline USHORT Count() const { return m_HintStarts.Count(); }
+ inline sal_uInt16 Count() const { return m_HintStarts.Count(); }
#if OSL_DEBUG_LEVEL > 1
bool Check() const;
@@ -141,7 +141,7 @@ private:
// Because the TextNode also guarantees removal of the Character for
// attributes without an end.
friend class SwTxtNode;
- void DeleteAtPos( const USHORT nPos );
+ void DeleteAtPos( const sal_uInt16 nPos );
// Delete the given Hint. The Hint must actually be in the array!
void Delete( SwTxtAttr* pTxtHt );
@@ -196,9 +196,9 @@ SvStream &operator<<(SvStream &aS, const SwpHints &rHints); //$ ostream
// Inline Implementations
-inline USHORT SwpHintsArray::GetStartOf( const SwTxtAttr *pHt ) const
+inline sal_uInt16 SwpHintsArray::GetStartOf( const SwTxtAttr *pHt ) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
if ( !m_HintStarts.Seek_Entry( pHt, &nPos ) )
{
nPos = USHRT_MAX;
@@ -206,7 +206,7 @@ inline USHORT SwpHintsArray::GetStartOf( const SwTxtAttr *pHt ) const
return nPos;
}
-inline SwTxtAttr *SwpHintsArray::Cut( const USHORT nPosInStart )
+inline SwTxtAttr *SwpHintsArray::Cut( const sal_uInt16 nPosInStart )
{
SwTxtAttr *pHt = GetTextHint(nPosInStart);
DeleteAtPos( nPosInStart );
diff --git a/sw/inc/ndindex.hxx b/sw/inc/ndindex.hxx
index cde04d8a79a7..15bbfe57f55f 100644
--- a/sw/inc/ndindex.hxx
+++ b/sw/inc/ndindex.hxx
@@ -25,14 +25,15 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _NDINDEX_HXX
-#define _NDINDEX_HXX
+#ifndef SW_NDINDEX_HXX
+#define SW_NDINDEX_HXX
#include <limits.h>
+
#include <tools/solar.h>
-#include "node.hxx"
-#include "ndarr.hxx"
+#include <node.hxx>
+
class SwNode;
class SwNodes;
@@ -41,7 +42,7 @@ class SW_DLLPUBLIC SwNodeIndex
{
friend void SwNodes::RegisterIndex( SwNodeIndex& );
friend void SwNodes::DeRegisterIndex( SwNodeIndex& );
- friend void SwNodes::RemoveNode( ULONG, ULONG, BOOL );
+ friend void SwNodes::RemoveNode( sal_uLong, sal_uLong, sal_Bool );
#if OSL_DEBUG_LEVEL > 1
static int nSerial;
@@ -54,48 +55,48 @@ class SW_DLLPUBLIC SwNodeIndex
void Remove();
// These are not allowed!
- SwNodeIndex( SwNodes& rNds, USHORT nIdx );
+ SwNodeIndex( SwNodes& rNds, sal_uInt16 nIdx );
SwNodeIndex( SwNodes& rNds, int nIdx );
public:
- SwNodeIndex( SwNodes& rNds, ULONG nIdx = 0 );
+ SwNodeIndex( SwNodes& rNds, sal_uLong nIdx = 0 );
SwNodeIndex( const SwNodeIndex &, long nDiff = 0 );
SwNodeIndex( const SwNode&, long nDiff = 0 );
~SwNodeIndex() { Remove(); }
- inline ULONG operator++();
- inline ULONG operator--();
- inline ULONG operator++(int);
- inline ULONG operator--(int);
-
- inline ULONG operator+=( ULONG );
- inline ULONG operator-=( ULONG );
- inline ULONG operator+=( const SwNodeIndex& );
- inline ULONG operator-=( const SwNodeIndex& );
-
- inline BOOL operator< ( const SwNodeIndex& ) const;
- inline BOOL operator<=( const SwNodeIndex& ) const;
- inline BOOL operator> ( const SwNodeIndex& ) const;
- inline BOOL operator>=( const SwNodeIndex& ) const;
- inline BOOL operator==( const SwNodeIndex& ) const;
- inline BOOL operator!=( const SwNodeIndex& ) const;
-
- inline BOOL operator< ( ULONG nWert ) const;
- inline BOOL operator<=( ULONG nWert ) const;
- inline BOOL operator> ( ULONG nWert ) const;
- inline BOOL operator>=( ULONG nWert ) const;
- inline BOOL operator==( ULONG nWert ) const;
- inline BOOL operator!=( ULONG nWert ) const;
-
- inline SwNodeIndex& operator=( ULONG );
+ inline sal_uLong operator++();
+ inline sal_uLong operator--();
+ inline sal_uLong operator++(int);
+ inline sal_uLong operator--(int);
+
+ inline sal_uLong operator+=( sal_uLong );
+ inline sal_uLong operator-=( sal_uLong );
+ inline sal_uLong operator+=( const SwNodeIndex& );
+ inline sal_uLong operator-=( const SwNodeIndex& );
+
+ inline sal_Bool operator< ( const SwNodeIndex& ) const;
+ inline sal_Bool operator<=( const SwNodeIndex& ) const;
+ inline sal_Bool operator> ( const SwNodeIndex& ) const;
+ inline sal_Bool operator>=( const SwNodeIndex& ) const;
+ inline sal_Bool operator==( const SwNodeIndex& ) const;
+ inline sal_Bool operator!=( const SwNodeIndex& ) const;
+
+ inline sal_Bool operator< ( sal_uLong nWert ) const;
+ inline sal_Bool operator<=( sal_uLong nWert ) const;
+ inline sal_Bool operator> ( sal_uLong nWert ) const;
+ inline sal_Bool operator>=( sal_uLong nWert ) const;
+ inline sal_Bool operator==( sal_uLong nWert ) const;
+ inline sal_Bool operator!=( sal_uLong nWert ) const;
+
+ inline SwNodeIndex& operator=( sal_uLong );
SwNodeIndex& operator=( const SwNodeIndex& );
SwNodeIndex& operator=( const SwNode& );
- // Return value of index as ULONG.
- inline ULONG GetIndex() const;
+ // Return value of index as sal_uLong.
+ inline sal_uLong GetIndex() const;
// Enables assignments without creation of a temporary object.
- SwNodeIndex& Assign( SwNodes& rNds, ULONG );
+ SwNodeIndex& Assign( SwNodes& rNds, sal_uLong );
SwNodeIndex& Assign( const SwNode& rNd, long nOffset = 0 );
// Gets pointer on NodesArray.
@@ -116,7 +117,7 @@ public:
SwNodeRange( const SwNodeIndex &rS, const SwNodeIndex &rE );
SwNodeRange( const SwNodeRange &rRange );
- SwNodeRange( SwNodes& rArr, ULONG nSttIdx = 0, ULONG nEndIdx = 0 );
+ SwNodeRange( SwNodes& rArr, sal_uLong nSttIdx = 0, sal_uLong nEndIdx = 0 );
SwNodeRange( const SwNodeIndex& rS, long nSttDiff,
const SwNodeIndex& rE, long nEndDiff = 0 );
SwNodeRange( const SwNode& rS, long nSttDiff,
@@ -129,7 +130,7 @@ public:
// For inlines node.hxx is needed which in turn needs this one.
// Therefore all inlines accessing pNd are implemented here.
-inline ULONG SwNodeIndex::GetIndex() const
+inline sal_uLong SwNodeIndex::GetIndex() const
{
return pNd->GetIndex();
}
@@ -141,109 +142,99 @@ inline SwNodes& SwNodeIndex::GetNodes()
{
return pNd->GetNodes();
}
-inline BOOL SwNodeIndex::operator< ( ULONG nWert ) const
+inline sal_Bool SwNodeIndex::operator< ( sal_uLong nWert ) const
{
return pNd->GetIndex() < nWert;
}
-inline BOOL SwNodeIndex::operator<=( ULONG nWert ) const
+inline sal_Bool SwNodeIndex::operator<=( sal_uLong nWert ) const
{
return pNd->GetIndex() <= nWert;
}
-inline BOOL SwNodeIndex::operator> ( ULONG nWert ) const
+inline sal_Bool SwNodeIndex::operator> ( sal_uLong nWert ) const
{
return pNd->GetIndex() > nWert;
}
-inline BOOL SwNodeIndex::operator>=( ULONG nWert ) const
+inline sal_Bool SwNodeIndex::operator>=( sal_uLong nWert ) const
{
return pNd->GetIndex() >= nWert;
}
-inline BOOL SwNodeIndex::operator==( ULONG nWert ) const
+inline sal_Bool SwNodeIndex::operator==( sal_uLong nWert ) const
{
return pNd->GetIndex() == nWert;
}
-inline BOOL SwNodeIndex::operator!=( ULONG nWert ) const
+inline sal_Bool SwNodeIndex::operator!=( sal_uLong nWert ) const
{
return pNd->GetIndex() != nWert;
}
-inline BOOL SwNodeIndex::operator<( const SwNodeIndex& rIndex ) const
+inline sal_Bool SwNodeIndex::operator<( const SwNodeIndex& rIndex ) const
{
return pNd->GetIndex() < rIndex.GetIndex();
}
-inline BOOL SwNodeIndex::operator<=( const SwNodeIndex& rIndex ) const
+inline sal_Bool SwNodeIndex::operator<=( const SwNodeIndex& rIndex ) const
{
return pNd->GetIndex() <= rIndex.GetIndex();
}
-inline BOOL SwNodeIndex::operator>( const SwNodeIndex& rIndex ) const
+inline sal_Bool SwNodeIndex::operator>( const SwNodeIndex& rIndex ) const
{
return pNd->GetIndex() > rIndex.GetIndex();
}
-inline BOOL SwNodeIndex::operator>=( const SwNodeIndex& rIndex ) const
+inline sal_Bool SwNodeIndex::operator>=( const SwNodeIndex& rIndex ) const
{
return pNd->GetIndex() >= rIndex.GetIndex();
}
-inline BOOL SwNodeIndex::operator==( const SwNodeIndex& rIdx ) const
+inline sal_Bool SwNodeIndex::operator==( const SwNodeIndex& rIdx ) const
{
return pNd == rIdx.pNd;
}
-inline BOOL SwNodeIndex::operator!=( const SwNodeIndex& rIdx ) const
+inline sal_Bool SwNodeIndex::operator!=( const SwNodeIndex& rIdx ) const
{
return pNd != rIdx.pNd;
}
-inline ULONG SwNodeIndex::operator++()
+inline sal_uLong SwNodeIndex::operator++()
{
return ( pNd = GetNodes()[ pNd->GetIndex()+1 ] )->GetIndex();
}
-inline ULONG SwNodeIndex::operator--()
+inline sal_uLong SwNodeIndex::operator--()
{
return ( pNd = GetNodes()[ pNd->GetIndex()-1 ] )->GetIndex();
}
-inline ULONG SwNodeIndex::operator++(int)
+inline sal_uLong SwNodeIndex::operator++(int)
{
- ULONG nOldIndex = pNd->GetIndex();
+ sal_uLong nOldIndex = pNd->GetIndex();
pNd = GetNodes()[ nOldIndex + 1 ];
return nOldIndex;
}
-inline ULONG SwNodeIndex::operator--(int)
+inline sal_uLong SwNodeIndex::operator--(int)
{
- ULONG nOldIndex = pNd->GetIndex();
+ sal_uLong nOldIndex = pNd->GetIndex();
pNd = GetNodes()[ nOldIndex - 1 ];
return nOldIndex;
}
-inline ULONG SwNodeIndex::operator+=( ULONG nWert )
+inline sal_uLong SwNodeIndex::operator+=( sal_uLong nWert )
{
return ( pNd = GetNodes()[ pNd->GetIndex() + nWert ] )->GetIndex();
}
-inline ULONG SwNodeIndex::operator-=( ULONG nWert )
+inline sal_uLong SwNodeIndex::operator-=( sal_uLong nWert )
{
return ( pNd = GetNodes()[ pNd->GetIndex() - nWert ] )->GetIndex();
}
-inline ULONG SwNodeIndex::operator+=( const SwNodeIndex& rIndex )
+inline sal_uLong SwNodeIndex::operator+=( const SwNodeIndex& rIndex )
{
return ( pNd = GetNodes()[ pNd->GetIndex() + rIndex.GetIndex() ] )->GetIndex();
}
-inline ULONG SwNodeIndex::operator-=( const SwNodeIndex& rIndex )
+inline sal_uLong SwNodeIndex::operator-=( const SwNodeIndex& rIndex )
{
return ( pNd = GetNodes()[ pNd->GetIndex() - rIndex.GetIndex() ] )->GetIndex();
}
-inline SwNodeIndex& SwNodeIndex::operator=( ULONG nWert )
+inline SwNodeIndex& SwNodeIndex::operator=( sal_uLong nWert )
{
pNd = GetNodes()[ nWert ];
return *this;
}
-
-
-// Implementation in ndindex.hxx - should be adapted to the
-// new interface as soon as possible.
-inline SwNode* SwNodes::operator[]( const SwNodeIndex& rIdx ) const
-{
- return &rIdx.GetNode();
-}
-
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx
index b245cd8b09f1..70081fcac7ee 100644
--- a/sw/inc/ndnotxt.hxx
+++ b/sw/inc/ndnotxt.hxx
@@ -40,11 +40,11 @@ class SW_DLLPUBLIC SwNoTxtNode : public SwCntntNode
friend class SwNoTxtFrm;
PolyPolygon *pContour;
- BOOL bAutomaticContour : 1; // automatic contour polygon, not manipulated
- BOOL bContourMapModeValid : 1; // contour map mode is not the graphics's
+ sal_Bool bAutomaticContour : 1; // automatic contour polygon, not manipulated
+ sal_Bool bContourMapModeValid : 1; // contour map mode is not the graphics's
// prefered map mode, but either
// MM100 or or pixel
- BOOL bPixelContour : 1; // contour map mode is invalid and pixel.
+ sal_Bool bPixelContour : 1; // contour map mode is invalid and pixel.
// Creates for all derivations an AttrSet with ranges for frame- and
// graphics-attributes (only called by SwCntntNode).
@@ -54,7 +54,7 @@ class SW_DLLPUBLIC SwNoTxtNode : public SwCntntNode
SwNoTxtNode &operator=( const SwNoTxtNode& ); // Not allowed.
protected:
- SwNoTxtNode( const SwNodeIndex &rWhere, const BYTE nNdType,
+ SwNoTxtNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType,
SwGrfFmtColl *pGrColl, SwAttrSet* pAutoAttr = 0 );
public:
@@ -66,8 +66,8 @@ public:
virtual Size GetTwipSize() const = 0;
- virtual BOOL SavePersistentData();
- virtual BOOL RestorePersistentData();
+ virtual sal_Bool SavePersistentData();
+ virtual sal_Bool RestorePersistentData();
const String GetTitle() const;
void SetTitle( const String& rTitle,
@@ -77,25 +77,25 @@ public:
bool bBroadcast = false );
void SetContour( const PolyPolygon *pPoly,
- BOOL bAutomatic = FALSE );
+ sal_Bool bAutomatic = sal_False );
const PolyPolygon *HasContour() const;
- BOOL _HasContour() const { return pContour!=0; };
+ sal_Bool _HasContour() const { return pContour!=0; };
void GetContour( PolyPolygon &rPoly ) const;
void CreateContour();
- void SetAutomaticContour( BOOL bSet ) { bAutomaticContour = bSet; }
- BOOL HasAutomaticContour() const { return bAutomaticContour; }
+ void SetAutomaticContour( sal_Bool bSet ) { bAutomaticContour = bSet; }
+ sal_Bool HasAutomaticContour() const { return bAutomaticContour; }
// set either a MM100 or pixel contour
void SetContourAPI( const PolyPolygon *pPoly );
- // get either a MM100 or pixel contour, return FALSE if no contour is set.
- BOOL GetContourAPI( PolyPolygon &rPoly ) const;
+ // get either a MM100 or pixel contour, return sal_False if no contour is set.
+ sal_Bool GetContourAPI( PolyPolygon &rPoly ) const;
- void SetPixelContour( BOOL bSet ) { bPixelContour = bSet; }
- BOOL IsPixelContour() const;
+ void SetPixelContour( sal_Bool bSet ) { bPixelContour = bSet; }
+ sal_Bool IsPixelContour() const;
- BOOL IsContourMapModeValid() const { return bContourMapModeValid; }
+ sal_Bool IsContourMapModeValid() const { return bContourMapModeValid; }
// Obtains the graphic with SwapIn for GrfNode via GetData for OLE.
Graphic GetGraphic() const;
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
index 511a14de64be..5291a6ae8757 100644
--- a/sw/inc/ndole.hxx
+++ b/sw/inc/ndole.hxx
@@ -60,18 +60,18 @@ public:
SwOLEObj( const String &rName, sal_Int64 nAspect );
~SwOLEObj();
- BOOL UnloadObject();
- static BOOL UnloadObject( ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > xObj,
+ sal_Bool UnloadObject();
+ static sal_Bool UnloadObject( ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > xObj,
const SwDoc* pDoc,
sal_Int64 nAspect );
String GetDescription();
#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
- com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef();
+ const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef();
svt::EmbeddedObjectRef& GetObject();
const String& GetCurrentPersistName() const { return aName; }
- BOOL IsOleRef() const; // To avoid unneccessary loading of object.
+ sal_Bool IsOleRef() const; // To avoid unneccessary loading of object.
#endif
};
@@ -85,7 +85,7 @@ class SW_DLLPUBLIC SwOLENode: public SwNoTxtNode
mutable SwOLEObj aOLEObj;
Graphic* pGraphic;
String sChartTblName; // with chart objects: name of referenced table.
- BOOL bOLESizeInvalid; // Should be considered at SwDoc::PrtOLENotify
+ sal_Bool bOLESizeInvalid; // Should be considered at SwDoc::PrtOLENotify
// (e.g. copied). Is not persistent.
SwEmbedObjectLink* mpObjectLink;
@@ -123,14 +123,14 @@ public:
void GetNewReplacement();
- virtual BOOL SavePersistentData();
- virtual BOOL RestorePersistentData();
+ virtual sal_Bool SavePersistentData();
+ virtual sal_Bool RestorePersistentData();
- BOOL IsInGlobalDocSection() const;
- BOOL IsOLEObjectDeleted() const;
+ sal_Bool IsInGlobalDocSection() const;
+ sal_Bool IsOLEObjectDeleted() const;
- BOOL IsOLESizeInvalid() const { return bOLESizeInvalid; }
- void SetOLESizeInvalid( BOOL b ){ bOLESizeInvalid = b; }
+ sal_Bool IsOLESizeInvalid() const { return bOLESizeInvalid; }
+ void SetOLESizeInvalid( sal_Bool b ){ bOLESizeInvalid = b; }
sal_Int64 GetAspect() const { return aOLEObj.GetObject().GetViewAspect(); }
void SetAspect( sal_Int64 nAspect) { aOLEObj.GetObject().SetViewAspect( nAspect ); }
@@ -168,4 +168,4 @@ inline const SwOLENode *SwNode::GetOLENode() const
#endif // _NDOLE_HXX
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 937f1a8a4f47..61838cf20a15 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -109,7 +109,7 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
mutable bool m_bLastOutlineState : 1;
bool m_bNotifiable;
- // BYTE nOutlineLevel; //#outline level, removed by zhaojianwei.
+ // sal_uInt8 nOutlineLevel; //#outline level, removed by zhaojianwei.
bool mbEmptyListStyleSetDueToSetOutlineLevelAttr;
// boolean, indicating that a <SetAttr(..)> or <ResetAttr(..)> or
@@ -131,8 +131,8 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
// Copies the attributes at nStart to pDest.
SW_DLLPRIVATE void CopyAttr( SwTxtNode *pDest, const xub_StrLen nStart, const xub_StrLen nOldPos);
- SW_DLLPRIVATE SwTxtNode* _MakeNewTxtNode( const SwNodeIndex&, BOOL bNext = TRUE,
- BOOL bChgFollow = TRUE );
+ SW_DLLPRIVATE SwTxtNode* _MakeNewTxtNode( const SwNodeIndex&, sal_Bool bNext = sal_True,
+ sal_Bool bChgFollow = sal_True );
SW_DLLPRIVATE void CutImpl(
SwTxtNode * const pDest, const SwIndex & rDestStart,
@@ -146,7 +146,7 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
SW_DLLPRIVATE virtual void NewAttrSet( SwAttrPool& );
SW_DLLPRIVATE void Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt,
- xub_StrLen nEndPos, BOOL bExpandFlds ) const;
+ xub_StrLen nEndPos, sal_Bool bExpandFlds ) const;
// Optimization: Asking for information about hidden characters at SwScriptInfo
// updates these flags.
@@ -161,21 +161,21 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
SW_DLLPRIVATE void CalcHiddenCharFlags() const;
- SW_DLLPRIVATE SwNumRule * _GetNumRule(BOOL bInParent = TRUE) const;
+ SW_DLLPRIVATE SwNumRule * _GetNumRule(sal_Bool bInParent = sal_True) const;
SW_DLLPRIVATE void SetLanguageAndFont( const SwPaM &rPaM,
- LanguageType nLang, USHORT nLangWhichId,
- const Font *pFont, USHORT nFontWhichId );
+ LanguageType nLang, sal_uInt16 nLangWhichId,
+ const Font *pFont, sal_uInt16 nFontWhichId );
//
// Start: Data collected during idle time
//
- SW_DLLPRIVATE void SetParaNumberOfWords( ULONG nTmpWords ) const;
- SW_DLLPRIVATE ULONG GetParaNumberOfWords() const;
- SW_DLLPRIVATE void SetParaNumberOfChars( ULONG nTmpChars ) const;
- SW_DLLPRIVATE ULONG GetParaNumberOfChars() const;
- SW_DLLPRIVATE void SetParaNumberOfCharsExcludingSpaces( ULONG nTmpChars ) const;
- SW_DLLPRIVATE ULONG GetParaNumberOfCharsExcludingSpaces() const;
+ SW_DLLPRIVATE void SetParaNumberOfWords( sal_uLong nTmpWords ) const;
+ SW_DLLPRIVATE sal_uLong GetParaNumberOfWords() const;
+ SW_DLLPRIVATE void SetParaNumberOfChars( sal_uLong nTmpChars ) const;
+ SW_DLLPRIVATE sal_uLong GetParaNumberOfChars() const;
+ SW_DLLPRIVATE void SetParaNumberOfCharsExcludingSpaces( sal_uLong nTmpChars ) const;
+ SW_DLLPRIVATE sal_uLong GetParaNumberOfCharsExcludingSpaces() const;
SW_DLLPRIVATE void InitSwParaStatistics( bool bNew );
/** create number for this text node, if not already existing
@@ -230,15 +230,15 @@ public:
virtual xub_StrLen Len() const;
// Is in itratr.
- void GetMinMaxSize( ULONG nIndex, ULONG& rMin, ULONG &rMax, ULONG &rAbs,
+ void GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMax, sal_uLong &rAbs,
OutputDevice* pOut = 0 ) const;
// overriding to handle change of certain paragraph attributes
- virtual BOOL SetAttr( const SfxPoolItem& );
- virtual BOOL SetAttr( const SfxItemSet& rSet );
- virtual BOOL ResetAttr( USHORT nWhich1, USHORT nWhich2 = 0 );
- virtual BOOL ResetAttr( const SvUShorts& rWhichArr );
- virtual USHORT ResetAllAttr();
+ virtual sal_Bool SetAttr( const SfxPoolItem& );
+ virtual sal_Bool SetAttr( const SfxItemSet& rSet );
+ virtual sal_Bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );
+ virtual sal_Bool ResetAttr( const SvUShorts& rWhichArr );
+ virtual sal_uInt16 ResetAllAttr();
/// insert text content
void InsertText( const XubString & rStr, const SwIndex & rIdx,
@@ -264,8 +264,8 @@ public:
refmarks, toxmarks, and metas will be ignored unless this is true
ATTENTION: setting bInclRefToxMark is only allowed from UNDO!
*/
- void RstAttr( const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich = 0,
- const SfxItemSet* pSet = 0, BOOL bInclRefToxMark = FALSE );
+ void RstAttr( const SwIndex &rIdx, xub_StrLen nLen, sal_uInt16 nWhich = 0,
+ const SfxItemSet* pSet = 0, sal_Bool bInclRefToxMark = sal_False );
void GCAttr();
// Delete text attribute (needs to be deregistered at Pool!)
@@ -285,26 +285,26 @@ public:
// Set these attributes at TextNode. If the whole range is comprised
// set them only in AutoAttrSet (SwCntntNode::SetAttr).
- BOOL SetAttr( const SfxItemSet& rSet,
+ sal_Bool SetAttr( const SfxItemSet& rSet,
xub_StrLen nStt, xub_StrLen nEnd,
const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
// Query the attributes of textnode over the range.
// Introduce 4th optional parameter <bMergeIndentValuesOfNumRule>.
- // If <bMergeIndentValuesOfNumRule> == TRUE, the indent attributes of
+ // If <bMergeIndentValuesOfNumRule> == sal_True, the indent attributes of
// the corresponding list level of an applied list style is merged into
- // the requested item set as a LR-SPACE item, if <bOnlyTxtAttr> == FALSE,
+ // the requested item set as a LR-SPACE item, if <bOnlyTxtAttr> == sal_False,
// corresponding node has not its own indent attributes and the
// position-and-space mode of the list level is SvxNumberFormat::LABEL_ALIGNMENT.
- BOOL GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
- BOOL bOnlyTxtAttr = FALSE,
- BOOL bGetFromChrFmt = TRUE,
+ sal_Bool GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
+ sal_Bool bOnlyTxtAttr = sal_False,
+ sal_Bool bGetFromChrFmt = sal_True,
const bool bMergeIndentValuesOfNumRule = false ) const;
// Convey attributes of an AttrSet (AutoFmt) to SwpHintsArray.
void FmtToTxtAttr( SwTxtNode* pNd );
/// delete all attributes of type nWhich at nStart (opt. end nEnd)
- void DeleteAttributes( const USHORT nWhich,
+ void DeleteAttributes( const sal_uInt16 nWhich,
const xub_StrLen nStart, const xub_StrLen nEnd = 0 );
/// delete the attribute pTxtAttr
void DeleteAttribute ( SwTxtAttr * const pTxtAttr );
@@ -341,8 +341,8 @@ public:
SwCntntNode *AppendNode( const SwPosition & );
// When appropriate set DontExpand-flag at INet or character styles respectively.
- BOOL DontExpandFmt( const SwIndex& rIdx, bool bFlag = true,
- BOOL bFmtToTxtAttributes = TRUE );
+ sal_Bool DontExpandFmt( const SwIndex& rIdx, bool bFlag = true,
+ sal_Bool bFmtToTxtAttributes = sal_True );
enum GetTxtAttrMode {
DEFAULT, /// DEFAULT: (Start < nIndex <= End)
@@ -380,8 +380,8 @@ public:
const RES_TXTATR nWhich = RES_TXTATR_END ) const;
XubString GetCurWord(xub_StrLen) const;
- USHORT Spell(SwSpellArgs*);
- USHORT Convert( SwConversionArgs & );
+ sal_uInt16 Spell(SwSpellArgs*);
+ sal_uInt16 Convert( SwConversionArgs & );
inline SwTxtFmtColl *GetTxtColl() const;
virtual SwFmtColl *ChgFmtColl( SwFmtColl* );
@@ -406,7 +406,7 @@ public:
@return numbering rule of this text node or NULL if none is set
*/
- SwNumRule *GetNumRule(BOOL bInParent = TRUE) const;
+ SwNumRule *GetNumRule(sal_Bool bInParent = sal_True) const;
inline const SwNodeNum* GetNum() const
{
@@ -434,10 +434,10 @@ public:
- it has a SwNodeNum and it has a numbering rule and the according
SwNumFmt defines a numbering type that is an enumeration.
- @retval TRUE this text node may be numbered
- @retval FALSE else
+ @retval sal_True this text node may be numbered
+ @retval sal_False else
*/
- //BOOL MayBeNumbered() const;
+ //sal_Bool MayBeNumbered() const;
/**
Notify this textnode that its numbering rule has changed.
@@ -467,7 +467,7 @@ public:
@return additional indents
*/
- long GetLeftMarginWithNum( BOOL bTxtLeft = FALSE ) const;
+ long GetLeftMarginWithNum( sal_Bool bTxtLeft = sal_False ) const;
/**
Returns the combined first line indent of this text node and
@@ -476,10 +476,10 @@ public:
@param the first line indent of this text node taking the
numbering into account (return parameter)
- @retval TRUE this node has SwNodeNum and has numbering rule
- @retval FALSE else
+ @retval sal_True this node has SwNodeNum and has numbering rule
+ @retval sal_False else
*/
- BOOL GetFirstLineOfsWithNum( short& rFirstOffset ) const;
+ sal_Bool GetFirstLineOfsWithNum( short& rFirstOffset ) const;
SwTwips GetAdditionalIndentForStartingNewList() const;
@@ -500,10 +500,10 @@ public:
numbering rule and the numbering format specified for the
level of the SwNodeNum is of an enumeration type.
- @retval TRUE This text node has a number.
- @retval FALSE else
+ @retval sal_True This text node has a number.
+ @retval sal_False else
*/
- BOOL HasNumber() const;
+ sal_Bool HasNumber() const;
/** Returns if this text node has a bullet.
@@ -511,23 +511,23 @@ public:
numbering rule and the numbering format specified for the
level of the SwNodeNum is of a bullet type.
- @retval TRUE This text node has a bullet.
- @retval FALSE else
+ @retval sal_True This text node has a bullet.
+ @retval sal_False else
*/
- BOOL HasBullet() const;
+ sal_Bool HasBullet() const;
/** Returns is this text node is numbered.
This node is numbered if it has a SwNodeNum and it has a
numbering rule and has not a hidden SwNodeNum.
- ATTENTION: Returns TRUE even if the SwNumFmt has type
+ ATTENTION: Returns sal_True even if the SwNumFmt has type
SVX_NUM_NUMBER_NONE.
- @retval TRUE This node is numbered.
- @retval FALSE else
+ @retval sal_True This node is numbered.
+ @retval sal_False else
*/
- BOOL IsNumbered() const;
+ sal_Bool IsNumbered() const;
/** Returns if this text node has a marked label.
@@ -605,7 +605,7 @@ public:
@return the width of the leading whitespace
*/
- USHORT GetWidthOfLeadingTabs() const;
+ sal_uInt16 GetWidthOfLeadingTabs() const;
/**
Returns if the paragraph has a visible numbering or bullet.
@@ -613,7 +613,7 @@ public:
Note: This function returns false, if the numbering format is
SVX_NUM_NUMBER_NONE or if the numbering/bullet has been deleted.
- @return TRUE if the paragraph has a visible numbering/bullet/outline
+ @return sal_True if the paragraph has a visible numbering/bullet/outline
*/
bool HasVisibleNumberingOrBullet() const;
@@ -665,15 +665,15 @@ public:
void fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const;
- USHORT GetLang( const xub_StrLen nBegin, const xub_StrLen nLen = 0,
- USHORT nScript = 0 ) const;
+ sal_uInt16 GetLang( const xub_StrLen nBegin, const xub_StrLen nLen = 0,
+ sal_uInt16 nScript = 0 ) const;
// in ndcopy.cxx
- BOOL IsSymbol( const xub_StrLen nBegin ) const; // In itratr.cxx.
+ sal_Bool IsSymbol( const xub_StrLen nBegin ) const; // In itratr.cxx.
virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
// Interactive hyphenation: we find TxtFrm and call its CalcHyph.
- BOOL Hyphenate( SwInterHyphInfo &rHyphInf );
+ sal_Bool Hyphenate( SwInterHyphInfo &rHyphInf );
void DelSoftHyph( const xub_StrLen nStart, const xub_StrLen nEnd );
// add 4th optional parameter <bAddSpaceAfterListLabelStr> indicating,
@@ -687,22 +687,22 @@ public:
const bool bWithNum = false,
const bool bAddSpaceAfterListLabelStr = false,
const bool bWithSpacesForLevel = false ) const;
- BOOL GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx = 0,
+ sal_Bool GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx = 0,
xub_StrLen nIdx = 0, xub_StrLen nLen = STRING_LEN,
- BOOL bWithNum = FALSE, BOOL bWithFtn = TRUE,
- BOOL bReplaceTabsWithSpaces = FALSE ) const;
+ sal_Bool bWithNum = sal_False, sal_Bool bWithFtn = sal_True,
+ sal_Bool bReplaceTabsWithSpaces = sal_False ) const;
const ModelToViewHelper::ConversionMap*
BuildConversionMap( rtl::OUString& rExpandText ) const;
XubString GetRedlineTxt( xub_StrLen nIdx = 0,
xub_StrLen nLen = STRING_LEN,
- BOOL bExpandFlds = FALSE,
- BOOL bWithNum = FALSE ) const;
+ sal_Bool bExpandFlds = sal_False,
+ sal_Bool bWithNum = sal_False ) const;
// Returns actual count of initial chars for initial-function.
// If nWishLen == 0 that of first word.
- USHORT GetDropLen( USHORT nWishLen) const;
+ sal_uInt16 GetDropLen( sal_uInt16 nWishLen) const;
// Passes back info needed on the dropcap dimensions
bool GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescent) const;
@@ -780,7 +780,7 @@ public:
bool IsFirstOfNumRule() const;
- USHORT GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd ) const;
+ sal_uInt16 GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd ) const;
SW_DLLPRIVATE ::com::sun::star::uno::WeakReference<
::com::sun::star::text::XTextContent> const& GetXParagraph() const
diff --git a/sw/inc/ndtyp.hxx b/sw/inc/ndtyp.hxx
index b4b9cd1d8d34..9b37b350afa5 100644
--- a/sw/inc/ndtyp.hxx
+++ b/sw/inc/ndtyp.hxx
@@ -33,19 +33,19 @@
// IDs for different nodes. The member indicating the type of node is
// in base class.
-const BYTE ND_ENDNODE = 0x01;
-const BYTE ND_STARTNODE = 0x02;
-const BYTE ND_TABLENODE = 0x06;
-const BYTE ND_TEXTNODE = 0x08;
-const BYTE ND_GRFNODE = 0x10;
-const BYTE ND_OLENODE = 0x20;
+const sal_uInt8 ND_ENDNODE = 0x01;
+const sal_uInt8 ND_STARTNODE = 0x02;
+const sal_uInt8 ND_TABLENODE = 0x06;
+const sal_uInt8 ND_TEXTNODE = 0x08;
+const sal_uInt8 ND_GRFNODE = 0x10;
+const sal_uInt8 ND_OLENODE = 0x20;
-const BYTE ND_CONTENTNODE = 0x38; // ContentNode (one of the 3 bits).
-const BYTE ND_NOTXTNODE = 0x30; // NoTxtNode (one of the 2 bits).
+const sal_uInt8 ND_CONTENTNODE = 0x38; // ContentNode (one of the 3 bits).
+const sal_uInt8 ND_NOTXTNODE = 0x30; // NoTxtNode (one of the 2 bits).
-const BYTE ND_SECTIONNODE = 0x42;
+const sal_uInt8 ND_SECTIONNODE = 0x42;
// For internal use only!!
-const BYTE ND_SECTIONDUMMY = 0x40; //(ND_SECTIONNODE & ~ND_STARTNODE);
+const sal_uInt8 ND_SECTIONDUMMY = 0x40; //(ND_SECTIONNODE & ~ND_STARTNODE);
// Special types of StartNodes that are not derivations but keep
// "sections" together.
@@ -62,8 +62,8 @@ enum SwStartNodeType
// is the node the first and/or last node of a section?
// This information is used for the export filters. Our layout never have a
// distance before or after if the node is the first or last in a section.
-const BYTE ND_HAS_PREV_LAYNODE = 0x01;
-const BYTE ND_HAS_NEXT_LAYNODE = 0x02;
+const sal_uInt8 ND_HAS_PREV_LAYNODE = 0x01;
+const sal_uInt8 ND_HAS_NEXT_LAYNODE = 0x02;
diff --git a/sw/inc/newhdl.hxx b/sw/inc/newhdl.hxx
index f44813d64b36..8391f9a31f21 100644
--- a/sw/inc/newhdl.hxx
+++ b/sw/inc/newhdl.hxx
@@ -46,10 +46,10 @@ public:
void SetWarnLnk( const Link &rLink );
void SetErrLnk( const Link &rLink );
- BOOL TryWarnMem();
+ sal_Bool TryWarnMem();
- BOOL Flush_WarnMem();
- BOOL Flush_ExceptMem();
+ sal_Bool Flush_WarnMem();
+ sal_Bool Flush_ExceptMem();
SwNewHdl();
~SwNewHdl();
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index a3369bec2533..f666b70d7536 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -96,20 +96,20 @@ class SW_DLLPUBLIC SwNode : private /* public*/ BigPtrEntry
long nMySerial;
#endif
- BYTE nNodeType;
+ sal_uInt8 nNodeType;
// For text nodes: level of auto format. Was put here because we had still free bits.
- BYTE nAFmtNumLvl : 3;
- BOOL bSetNumLSpace : 1; // For numbering: TRUE: set indent.
- BOOL bIgnoreDontExpand : 1; // for Text Attributes - ignore the flag
+ sal_uInt8 nAFmtNumLvl : 3;
+ sal_Bool bSetNumLSpace : 1; // For numbering: TRUE: set indent.
+ sal_Bool bIgnoreDontExpand : 1; // for Text Attributes - ignore the flag
protected:
SwStartNode* pStartOfSection;
- SwNode( const SwNodeIndex &rWhere, const BYTE nNodeId );
+ SwNode( const SwNodeIndex &rWhere, const sal_uInt8 nNodeId );
// for the initial StartNode
- SwNode( SwNodes& rNodes, ULONG nPos, const BYTE nNodeId );
+ SwNode( SwNodes& rNodes, sal_uLong nPos, const sal_uInt8 nNodeId );
public:
virtual ~SwNode();
@@ -118,26 +118,26 @@ public:
long int GetSerial() const { return nMySerial; }
#endif
- USHORT GetSectionLevel() const;
+ sal_uInt16 GetSectionLevel() const;
- inline ULONG StartOfSectionIndex() const;
+ inline sal_uLong StartOfSectionIndex() const;
inline const SwStartNode* StartOfSectionNode() const { return pStartOfSection; }
inline SwStartNode* StartOfSectionNode() { return pStartOfSection; }
- inline ULONG EndOfSectionIndex() const;
+ inline sal_uLong EndOfSectionIndex() const;
inline const SwEndNode* EndOfSectionNode() const;
inline SwEndNode* EndOfSectionNode();
- inline BYTE GetAutoFmtLvl() const { return nAFmtNumLvl; }
- inline void SetAutoFmtLvl( BYTE nVal ) { nAFmtNumLvl = nVal; }
+ inline sal_uInt8 GetAutoFmtLvl() const { return nAFmtNumLvl; }
+ inline void SetAutoFmtLvl( sal_uInt8 nVal ) { nAFmtNumLvl = nVal; }
- inline BOOL IsSetNumLSpace() const { return bSetNumLSpace; }
- inline void SetNumLSpace( BOOL bFlag ) { bSetNumLSpace = bFlag; }
+ inline sal_Bool IsSetNumLSpace() const { return bSetNumLSpace; }
+ inline void SetNumLSpace( sal_Bool bFlag ) { bSetNumLSpace = bFlag; }
- inline BOOL IsIgnoreDontExpand() const { return bIgnoreDontExpand; }
- inline void SetIgnoreDontExpand( BOOL bNew ) { bIgnoreDontExpand = bNew; }
+ inline sal_Bool IsIgnoreDontExpand() const { return bIgnoreDontExpand; }
+ inline void SetIgnoreDontExpand( sal_Bool bNew ) { bIgnoreDontExpand = bNew; }
- BYTE GetNodeType() const { return nNodeType; }
+ sal_uInt8 GetNodeType() const { return nNodeType; }
inline SwStartNode *GetStartNode();
inline const SwStartNode *GetStartNode() const;
@@ -165,23 +165,23 @@ public:
inline SwSectionNode *GetSectionNode();
inline const SwSectionNode *GetSectionNode() const;
- inline BOOL IsStartNode() const;
- inline BOOL IsCntntNode() const;
- inline BOOL IsEndNode() const;
- inline BOOL IsTxtNode() const;
- inline BOOL IsTableNode() const;
- inline BOOL IsSectionNode() const;
- inline BOOL IsOLENode() const;
- inline BOOL IsNoTxtNode() const;
- inline BOOL IsGrfNode() const;
+ inline sal_Bool IsStartNode() const;
+ inline sal_Bool IsCntntNode() const;
+ inline sal_Bool IsEndNode() const;
+ inline sal_Bool IsTxtNode() const;
+ inline sal_Bool IsTableNode() const;
+ inline sal_Bool IsSectionNode() const;
+ inline sal_Bool IsOLENode() const;
+ inline sal_Bool IsNoTxtNode() const;
+ inline sal_Bool IsGrfNode() const;
/**
Checks if this node is in redlines.
- @retval TRUE this node is in redlines
- @retval FALSE else
+ @retval sal_True this node is in redlines
+ @retval sal_False else
*/
- BOOL IsInRedlines() const;
+ sal_Bool IsInRedlines() const;
// Search table node, in which it is. If it is in no table
// return 0.
@@ -271,18 +271,17 @@ public:
IDocumentListItems& getIDocumentListItems();
// Is node in the visible area of the Shell?
- BOOL IsInVisibleArea( ViewShell* pSh = 0 ) const;
+ sal_Bool IsInVisibleArea( ViewShell* pSh = 0 ) const;
// Is node in an protected area?
- BOOL IsInProtectSect() const;
+ sal_Bool IsInProtectSect() const;
// Is node in something that is protected (range, frame,
// table cells ... including anchor in case of frames or footnotes)?
- BOOL IsProtect() const;
+ sal_Bool IsProtect() const;
// Search PageDesc with which this node is formated. If layout is existent
// search over layout, else only the hard way is left: search over the nodes
// to the front!!
-
- const SwPageDesc* FindPageDesc( BOOL bCalcLay, sal_uInt32* pPgDescNdIdx = 0 ) const;
+ const SwPageDesc* FindPageDesc( sal_Bool bCalcLay, sal_uInt32* pPgDescNdIdx = 0 ) const;
// If node is in a fly return the respective format.
SwFrmFmt* GetFlyFmt() const;
@@ -290,11 +289,11 @@ public:
// If node is in a table return the respective table box.
SwTableBox* GetTblBox() const;
- inline ULONG GetIndex() const { return GetPos(); }
+ inline sal_uLong GetIndex() const { return GetPos(); }
- const SwTxtNode* FindOutlineNodeOfLevel( BYTE nLvl ) const;
+ const SwTxtNode* FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const;
- BYTE HasPrevNextLayNode() const;
+ sal_uInt8 HasPrevNextLayNode() const;
private:
// Private constructor because copying is never allowed!!
@@ -315,11 +314,11 @@ class SwStartNode: public SwNode
SwStartNodeType eSttNdTyp;
// for the initial StartNode
- SwStartNode( SwNodes& rNodes, ULONG nPos );
+ SwStartNode( SwNodes& rNodes, sal_uLong nPos );
protected:
SwStartNode( const SwNodeIndex &rWhere,
- const BYTE nNodeType = ND_STARTNODE,
+ const sal_uInt8 nNodeType = ND_STARTNODE,
SwStartNodeType = SwNormalStartNode );
public:
DECL_FIXEDMEMPOOL_NEWDEL(SwStartNode)
@@ -346,7 +345,7 @@ class SwEndNode : public SwNode
friend class SwSectionNode; // To enable creation of its EndNote.
// for the initial StartNode
- SwEndNode( SwNodes& rNodes, ULONG nPos, SwStartNode& rSttNd );
+ SwEndNode( SwNodes& rNodes, sal_uLong nPos, SwStartNode& rSttNd );
protected:
SwEndNode( const SwNodeIndex &rWhere, SwStartNode& rSttNd );
@@ -372,7 +371,7 @@ class SW_DLLPUBLIC SwCntntNode: public SwModify, public SwNode, public SwIndexRe
mutable bool mbSetModifyAtAttr;
protected:
- SwCntntNode( const SwNodeIndex &rWhere, const BYTE nNodeType,
+ SwCntntNode( const SwNodeIndex &rWhere, const sal_uInt8 nNodeType,
SwFmtColl *pFmtColl );
virtual ~SwCntntNode();
@@ -385,7 +384,7 @@ protected:
// There some functions that like to remove items from the internal
// SwAttrSet (handle):
- USHORT ClearItemsFromAttrSet( const std::vector<USHORT>& rWhichIds );
+ sal_uInt16 ClearItemsFromAttrSet( const std::vector<sal_uInt16>& rWhichIds );
public:
TYPEINFO(); //Already contained in base class Client.
@@ -404,20 +403,20 @@ public:
void MakeStartIndex( SwIndex * pIdx ) { pIdx->Assign( this, 0 ); }
void MakeEndIndex( SwIndex * pIdx ) { pIdx->Assign( this, Len() ); }
- BOOL GoNext(SwIndex *, USHORT nMode ) const;
- BOOL GoPrevious(SwIndex *, USHORT nMode ) const;
+ sal_Bool GoNext(SwIndex *, sal_uInt16 nMode ) const;
+ sal_Bool GoPrevious(SwIndex *, sal_uInt16 nMode ) const;
SwCntntFrm *GetFrm( const Point* pDocPos = 0,
const SwPosition *pPos = 0,
- const BOOL bCalcFrm = TRUE ) const;
+ const sal_Bool bCalcFrm = sal_True ) const;
// Returns the real size of the frame or an empty rectangle if
// no layout exists. Needed for export filters.
- SwRect FindLayoutRect( const BOOL bPrtArea = FALSE,
+ SwRect FindLayoutRect( const sal_Bool bPrtArea = sal_False,
const Point* pPoint = 0,
- const BOOL bCalcFrm = FALSE ) const;
- SwRect FindPageFrmRect( const BOOL bPrtArea = FALSE,
+ const sal_Bool bCalcFrm = sal_False ) const;
+ SwRect FindPageFrmRect( const sal_Bool bPrtArea = sal_False,
const Point* pPoint = 0,
- const BOOL bCalcFrm = FALSE ) const;
+ const sal_Bool bCalcFrm = sal_False ) const;
// Method creates all views of document for given node. The content
// frames that are created are put in the respective layout.
@@ -434,28 +433,28 @@ public:
virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const = 0;
// Get information from Client.
- virtual BOOL GetInfo( SfxPoolItem& ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
// SS for PoolItems: hard attributation.
// If bInParent is FALSE search for attribute only in this node.
- const SfxPoolItem& GetAttr( USHORT nWhich, BOOL bInParent=TRUE ) const;
- BOOL GetAttr( SfxItemSet& rSet, BOOL bInParent=TRUE ) const;
+ const SfxPoolItem& GetAttr( sal_uInt16 nWhich, sal_Bool bInParent=sal_True ) const;
+ sal_Bool GetAttr( SfxItemSet& rSet, sal_Bool bInParent=sal_True ) const;
// made virtual
- virtual BOOL SetAttr( const SfxPoolItem& );
- virtual BOOL SetAttr( const SfxItemSet& rSet );
- virtual BOOL ResetAttr( USHORT nWhich1, USHORT nWhich2 = 0 );
- virtual BOOL ResetAttr( const SvUShorts& rWhichArr );
- virtual USHORT ResetAllAttr();
+ virtual sal_Bool SetAttr( const SfxPoolItem& );
+ virtual sal_Bool SetAttr( const SfxItemSet& rSet );
+ virtual sal_Bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );
+ virtual sal_Bool ResetAttr( const SvUShorts& rWhichArr );
+ virtual sal_uInt16 ResetAllAttr();
// Obtains attribute that is not delivered via conditional style!
- const SfxPoolItem* GetNoCondAttr( USHORT nWhich, BOOL bInParents ) const;
+ const SfxPoolItem* GetNoCondAttr( sal_uInt16 nWhich, sal_Bool bInParents ) const;
// Does node has already its own auto-attributes?
// Access to SwAttrSet.
inline const SwAttrSet &GetSwAttrSet() const;
inline const SwAttrSet *GetpSwAttrSet() const { return static_cast<const SwAttrSet*>(mpAttrSet.get()); }
- inline BOOL HasSwAttrSet() const { return mpAttrSet ? TRUE : FALSE; }
+ inline sal_Bool HasSwAttrSet() const { return mpAttrSet ? sal_True : sal_False; }
virtual SwFmtColl* ChgFmtColl( SwFmtColl* );
SwFmtColl* GetFmtColl() const { return (SwFmtColl*)GetRegisteredIn(); }
@@ -465,13 +464,13 @@ public:
void SetCondFmtColl( SwFmtColl* );
inline SwFmtColl* GetCondFmtColl() const;
- BOOL IsAnyCondition( SwCollCondition& rTmp ) const;
+ sal_Bool IsAnyCondition( SwCollCondition& rTmp ) const;
void ChkCondColl();
//FEATURE::CONDCOLL
// Invalidates NumRule at the node. NumRule is updated
// on EndAction of a Shell at the latest.
- BOOL InvalidateNumRule();
+ sal_Bool InvalidateNumRule();
// determines the text direction for a certain
// position. Return -1, if text direction could *not* be determined.
@@ -519,7 +518,7 @@ public:
void MakeFrms( const SwNodeIndex & rIdx );
SwTableNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
- void SetNewTable( SwTable* , BOOL bNewFrames=TRUE );
+ void SetNewTable( SwTable* , sal_Bool bNewFrames=sal_True );
private:
// Private constructor because copying is never allowed!!
@@ -575,7 +574,8 @@ public:
// _nicht_ in einem versteckten (Unter-)Bereich liegt
// Check for not hidden areas whether there is content that is not in
// a hidden sub-area.
- BOOL IsCntntHidden() const;
+ sal_Bool IsCntntHidden() const;
+
};
@@ -623,41 +623,41 @@ inline const SwCntntNode *SwNode::GetCntntNode() const
}
-inline BOOL SwNode::IsStartNode() const
+inline sal_Bool SwNode::IsStartNode() const
{
- return ND_STARTNODE & nNodeType ? TRUE : FALSE;
+ return ND_STARTNODE & nNodeType ? sal_True : sal_False;
}
-inline BOOL SwNode::IsCntntNode() const
+inline sal_Bool SwNode::IsCntntNode() const
{
- return ND_CONTENTNODE & nNodeType ? TRUE : FALSE;
+ return ND_CONTENTNODE & nNodeType ? sal_True : sal_False;
}
-inline BOOL SwNode::IsEndNode() const
+inline sal_Bool SwNode::IsEndNode() const
{
- return ND_ENDNODE == nNodeType ? TRUE : FALSE;
+ return ND_ENDNODE == nNodeType ? sal_True : sal_False;
}
-inline BOOL SwNode::IsTxtNode() const
+inline sal_Bool SwNode::IsTxtNode() const
{
- return ND_TEXTNODE == nNodeType ? TRUE : FALSE;
+ return ND_TEXTNODE == nNodeType ? sal_True : sal_False;
}
-inline BOOL SwNode::IsTableNode() const
+inline sal_Bool SwNode::IsTableNode() const
{
- return ND_TABLENODE == nNodeType ? TRUE : FALSE;
+ return ND_TABLENODE == nNodeType ? sal_True : sal_False;
}
-inline BOOL SwNode::IsSectionNode() const
+inline sal_Bool SwNode::IsSectionNode() const
{
- return ND_SECTIONNODE == nNodeType ? TRUE : FALSE;
+ return ND_SECTIONNODE == nNodeType ? sal_True : sal_False;
}
-inline BOOL SwNode::IsNoTxtNode() const
+inline sal_Bool SwNode::IsNoTxtNode() const
{
- return ND_NOTXTNODE & nNodeType ? TRUE : FALSE;
+ return ND_NOTXTNODE & nNodeType ? sal_True : sal_False;
}
-inline BOOL SwNode::IsOLENode() const
+inline sal_Bool SwNode::IsOLENode() const
{
- return ND_OLENODE == nNodeType ? TRUE : FALSE;
+ return ND_OLENODE == nNodeType ? sal_True : sal_False;
}
-inline BOOL SwNode::IsGrfNode() const
+inline sal_Bool SwNode::IsGrfNode() const
{
- return ND_GRFNODE == nNodeType ? TRUE : FALSE;
+ return ND_GRFNODE == nNodeType ? sal_True : sal_False;
}
inline const SwStartNode* SwNode::FindSttNodeByType( SwStartNodeType eTyp ) const
@@ -672,11 +672,11 @@ inline const SwSectionNode* SwNode::FindSectionNode() const
{
return ((SwNode*)this)->FindSectionNode();
}
-inline ULONG SwNode::StartOfSectionIndex() const
+inline sal_uLong SwNode::StartOfSectionIndex() const
{
return pStartOfSection->GetIndex();
}
-inline ULONG SwNode::EndOfSectionIndex() const
+inline sal_uLong SwNode::EndOfSectionIndex() const
{
const SwStartNode* pStNd = IsStartNode() ? (SwStartNode*)this : pStartOfSection;
return pStNd->pEndOfSection->GetIndex();
@@ -730,8 +730,8 @@ inline const SwAttrSet& SwCntntNode::GetSwAttrSet() const
//FEATURE::CONDCOLL
-inline const SfxPoolItem& SwCntntNode::GetAttr( USHORT nWhich,
- BOOL bInParents ) const
+inline const SfxPoolItem& SwCntntNode::GetAttr( sal_uInt16 nWhich,
+ sal_Bool bInParents ) const
{
return GetSwAttrSet().Get( nWhich, bInParents );
}
diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
index f5ec01325d11..beb6b1fe8e5c 100644
--- a/sw/inc/numrule.hxx
+++ b/sw/inc/numrule.hxx
@@ -74,8 +74,8 @@ public:
SwNumFmt& operator=( const SwNumFmt& );
- BOOL operator==( const SwNumFmt& ) const;
- BOOL operator!=( const SwNumFmt& r ) const { return !(*this == r); }
+ sal_Bool operator==( const SwNumFmt& ) const;
+ sal_Bool operator!=( const SwNumFmt& r ) const { return !(*this == r); }
SwCharFmt* GetCharFmt() const { return (SwCharFmt*)pRegisteredIn; }
void SetCharFmt( SwCharFmt* );
@@ -90,8 +90,8 @@ public:
virtual sal_Int16 GetVertOrient() const;
const SwFmtVertOrient* GetGraphicOrientation() const;
- BOOL IsEnumeration() const;
- BOOL IsItemize() const;
+ sal_Bool IsEnumeration() const; // #i22362#
+ sal_Bool IsItemize() const; // #i29560#
};
class SwPaM;
@@ -111,10 +111,10 @@ private:
#endif
static SwNumFmt* aBaseFmts [ RULE_END ][ MAXLEVEL ];
- static USHORT aDefNumIndents[ MAXLEVEL ];
+ static sal_uInt16 aDefNumIndents[ MAXLEVEL ];
// default list level properties for position-and-space mode LABEL_ALIGNMENT
static SwNumFmt* aLabelAlignmentBaseFmts [ RULE_END ][ MAXLEVEL ];
- static USHORT nRefCount;
+ static sal_uInt16 nRefCount;
static char* pDefOutlineName;
SwNumFmt* aFmts[ MAXLEVEL ];
@@ -130,13 +130,13 @@ private:
String sName;
SwNumRuleType eRuleType;
- USHORT nPoolFmtId; // Id-for NumRules created "automatically"
- USHORT nPoolHelpId; // HelpId for this Pool-style.
- BYTE nPoolHlpFileId; // FilePos at Doc on style helps.
- BOOL bAutoRuleFlag : 1;
- BOOL bInvalidRuleFlag : 1;
- BOOL bContinusNum : 1; // Continuous numbering without levels.
- BOOL bAbsSpaces : 1; // Levels represent absolute indents.
+ sal_uInt16 nPoolFmtId; // Id-for NumRules created "automatically"
+ sal_uInt16 nPoolHelpId; // HelpId for this Pool-style.
+ sal_uInt8 nPoolHlpFileId; // FilePos at Doc on style helps.
+ sal_Bool bAutoRuleFlag : 1;
+ sal_Bool bInvalidRuleFlag : 1;
+ sal_Bool bContinusNum : 1; // Continuous numbering without levels.
+ sal_Bool bAbsSpaces : 1; // Levels represent absolute indents.
bool mbCountPhantoms;
const SvxNumberFormat::SvxNumPositionAndSpaceMode meDefaultNumberFormatPositionAndSpaceMode;
@@ -150,27 +150,27 @@ public:
SwNumRule( const String& rNm,
const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode,
SwNumRuleType = NUM_RULE,
- BOOL bAutoFlg = TRUE );
+ sal_Bool bAutoFlg = sal_True );
SwNumRule( const SwNumRule& );
~SwNumRule();
SwNumRule& operator=( const SwNumRule& );
- BOOL operator==( const SwNumRule& ) const;
- BOOL operator!=( const SwNumRule& r ) const { return !(*this == r); }
+ sal_Bool operator==( const SwNumRule& ) const;
+ sal_Bool operator!=( const SwNumRule& r ) const { return !(*this == r); }
- const SwNumFmt* GetNumFmt( USHORT i ) const;
- const SwNumFmt& Get( USHORT i ) const;
+ const SwNumFmt* GetNumFmt( sal_uInt16 i ) const;
+ const SwNumFmt& Get( sal_uInt16 i ) const;
- void Set( USHORT i, const SwNumFmt* );
- void Set( USHORT i, const SwNumFmt& );
- String MakeNumString( const SwNodeNum&, BOOL bInclStrings = TRUE,
- BOOL bOnlyArabic = FALSE ) const;
+ void Set( sal_uInt16 i, const SwNumFmt* );
+ void Set( sal_uInt16 i, const SwNumFmt& );
+ String MakeNumString( const SwNodeNum&, sal_Bool bInclStrings = sal_True,
+ sal_Bool bOnlyArabic = sal_False ) const;
// - add optional parameter <_nRestrictToThisLevel> in order to
// restrict returned string to this level.
String MakeNumString( const SwNumberTree::tNumberVector & rNumVector,
- const BOOL bInclStrings = TRUE,
- const BOOL bOnlyArabic = FALSE,
+ const sal_Bool bInclStrings = sal_True,
+ const sal_Bool bOnlyArabic = sal_False,
const unsigned int _nRestrictToThisLevel = MAXLEVEL ) const;
String MakeRefNumString( const SwNodeNum& rNodeNum,
const bool bInclSuperiorNumLabels = false,
@@ -208,12 +208,12 @@ public:
static char* GetOutlineRuleName() { return pDefOutlineName; }
- static USHORT GetNumIndent( BYTE nLvl );
- static USHORT GetBullIndent( BYTE nLvl );
+ static sal_uInt16 GetNumIndent( sal_uInt8 nLvl );
+ static sal_uInt16 GetBullIndent( sal_uInt8 nLvl );
SwNumRuleType GetRuleType() const { return eRuleType; }
void SetRuleType( SwNumRuleType eNew ) { eRuleType = eNew;
- bInvalidRuleFlag = TRUE; }
+ bInvalidRuleFlag = sal_True; }
// A kind of copy-constructor to make sure the num formats are
// attached to the correctCharFormats of a document!!
@@ -229,32 +229,32 @@ public:
void SetName( const String& rNm,
IDocumentListsAccess& rDocListAccess );
- BOOL IsAutoRule() const { return bAutoRuleFlag; }
- void SetAutoRule( BOOL bFlag ) { bAutoRuleFlag = bFlag; }
+ sal_Bool IsAutoRule() const { return bAutoRuleFlag; }
+ void SetAutoRule( sal_Bool bFlag ) { bAutoRuleFlag = bFlag; }
- BOOL IsInvalidRule() const { return bInvalidRuleFlag; }
- void SetInvalidRule( BOOL bFlag );
+ sal_Bool IsInvalidRule() const { return bInvalidRuleFlag; }
+ void SetInvalidRule( sal_Bool bFlag );
- BOOL IsContinusNum() const { return bContinusNum; }
- void SetContinusNum( BOOL bFlag ) { bContinusNum = bFlag; }
+ sal_Bool IsContinusNum() const { return bContinusNum; }
+ void SetContinusNum( sal_Bool bFlag ) { bContinusNum = bFlag; }
- BOOL IsAbsSpaces() const { return bAbsSpaces; }
- void SetAbsSpaces( BOOL bFlag ) { bAbsSpaces = bFlag; }
+ sal_Bool IsAbsSpaces() const { return bAbsSpaces; }
+ void SetAbsSpaces( sal_Bool bFlag ) { bAbsSpaces = bFlag; }
- BOOL IsOutlineRule() const { return eRuleType == OUTLINE_RULE; }
+ sal_Bool IsOutlineRule() const { return eRuleType == OUTLINE_RULE; }
bool IsCountPhantoms() const;
void SetCountPhantoms(bool bCountPhantoms);
// Query and set PoolFormat IDs.
- USHORT GetPoolFmtId() const { return nPoolFmtId; }
- void SetPoolFmtId( USHORT nId ) { nPoolFmtId = nId; }
+ sal_uInt16 GetPoolFmtId() const { return nPoolFmtId; }
+ void SetPoolFmtId( sal_uInt16 nId ) { nPoolFmtId = nId; }
// Query and set Help-IDs for document styles.
- USHORT GetPoolHelpId() const { return nPoolHelpId; }
- void SetPoolHelpId( USHORT nId ) { nPoolHelpId = nId; }
- BYTE GetPoolHlpFileId() const { return nPoolHlpFileId; }
- void SetPoolHlpFileId( BYTE nId ) { nPoolHlpFileId = nId; }
+ sal_uInt16 GetPoolHelpId() const { return nPoolHelpId; }
+ void SetPoolHelpId( sal_uInt16 nId ) { nPoolHelpId = nId; }
+ sal_uInt8 GetPoolHlpFileId() const { return nPoolHlpFileId; }
+ void SetPoolHlpFileId( sal_uInt8 nId ) { nPoolHlpFileId = nId; }
void SetSvxRule(const SvxNumRule&, SwDoc* pDoc);
SvxNumRule MakeSvxNumRule() const;
@@ -263,7 +263,7 @@ public:
void ChangeIndent( const short nDiff );
// set indent of certain list level to given value
void SetIndent( const short nNewIndent,
- const USHORT nListLevel );
+ const sal_uInt16 nListLevel );
// set indent of first list level to given value and change other list level's
// indents accordingly
void SetIndentOfFirstListLevelAndChangeOthers( const short nNewIndent );
@@ -298,7 +298,7 @@ namespace numfunc
@author OD
*/
- sal_Unicode GetBulletChar( BYTE nLevel );
+ sal_Unicode GetBulletChar( sal_uInt8 nLevel );
/** configuration, if at first position of the first list item the <TAB>-key
increased the indent of the complete list or only demotes this list item.
diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index eb857b36dd55..0690a3d1b7ed 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -52,7 +52,7 @@ enum SwFtnAdj
class SW_DLLPUBLIC SwPageFtnInfo
{
SwTwips nMaxHeight; // Maximum height of the footnote area.
- ULONG nLineWidth; // Width of separator line.
+ sal_uLong nLineWidth; // Width of separator line.
Color aLineColor; // Color of the separator line.
Fraction aWidth; // Percentage width of the separator line.
SwFtnAdj eAdj; // Line adjustment.
@@ -61,7 +61,7 @@ class SW_DLLPUBLIC SwPageFtnInfo
public:
SwTwips GetHeight() const { return nMaxHeight; }
- ULONG GetLineWidth() const { return nLineWidth; }
+ sal_uLong GetLineWidth() const { return nLineWidth; }
const Color& GetLineColor() const { return aLineColor;}
const Fraction& GetWidth() const { return aWidth; }
SwFtnAdj GetAdj() const { return eAdj; }
@@ -69,7 +69,7 @@ public:
SwTwips GetBottomDist() const { return nBottomDist; }
void SetHeight( SwTwips nNew ) { nMaxHeight = nNew; }
- void SetLineWidth(ULONG nSet ) { nLineWidth = nSet; }
+ void SetLineWidth(sal_uLong nSet ) { nLineWidth = nSet; }
void SetLineColor(const Color& rCol ) { aLineColor = rCol;}
void SetWidth( const Fraction &rNew){ aWidth = rNew; }
void SetAdj ( SwFtnAdj eNew ) { eAdj = eNew; }
@@ -80,7 +80,7 @@ public:
SwPageFtnInfo( const SwPageFtnInfo& );
SwPageFtnInfo& operator=( const SwPageFtnInfo& );
- BOOL operator ==( const SwPageFtnInfo& ) const;
+ sal_Bool operator ==( const SwPageFtnInfo& ) const;
};
/*
@@ -117,7 +117,7 @@ public:
* document (contents are created or removed according to SHARE-information).
*/
-typedef USHORT UseOnPage;
+typedef sal_uInt16 UseOnPage;
namespace nsUseOnPage
{
const UseOnPage PD_NONE = 0x0000; // For internal use only.
@@ -142,10 +142,10 @@ class SW_DLLPUBLIC SwPageDesc : public SwModify
SwFrmFmt aLeft;
SwDepend aDepend; // Because of grid alignment (Registerhaltigkeit).
SwPageDesc *pFollow;
- USHORT nRegHeight; // Sentence spacing and fontascent of style.
- USHORT nRegAscent; // For grid alignment (Registerhaltigkeit).
+ sal_uInt16 nRegHeight; // Sentence spacing and fontascent of style.
+ sal_uInt16 nRegAscent; // For grid alignment (Registerhaltigkeit).
UseOnPage eUse;
- BOOL bLandscape;
+ sal_Bool bLandscape;
// Footnote information.
SwPageFtnInfo aFtnInfo;
@@ -162,8 +162,8 @@ public:
const String &GetName() const { return aDescName; }
void SetName( const String& rNewName ) { aDescName = rNewName; }
- BOOL GetLandscape() const { return bLandscape; }
- void SetLandscape( BOOL bNew ) { bLandscape = bNew; }
+ sal_Bool GetLandscape() const { return bLandscape; }
+ void SetLandscape( sal_Bool bNew ) { bLandscape = bNew; }
const SvxNumberType &GetNumType() const { return aNumType; }
void SetNumType( const SvxNumberType& rNew ) { aNumType = rNew; }
@@ -172,10 +172,10 @@ public:
SwPageFtnInfo &GetFtnInfo() { return aFtnInfo; }
void SetFtnInfo( const SwPageFtnInfo &rNew ) { aFtnInfo = rNew; }
- inline BOOL IsHeaderShared() const;
- inline BOOL IsFooterShared() const;
- inline void ChgHeaderShare( BOOL bNew );
- inline void ChgFooterShare( BOOL bNew );
+ inline sal_Bool IsHeaderShared() const;
+ inline sal_Bool IsFooterShared() const;
+ inline void ChgHeaderShare( sal_Bool bNew );
+ inline void ChgFooterShare( sal_Bool bNew );
inline void SetUseOn( UseOnPage eNew );
inline UseOnPage GetUseOn() const;
@@ -200,10 +200,10 @@ public:
inline SwFrmFmt *GetLeftFmt();
inline const SwFrmFmt *GetLeftFmt() const;
- USHORT GetRegHeight() const { return nRegHeight; }
- USHORT GetRegAscent() const { return nRegAscent; }
- void SetRegHeight( USHORT nNew ){ nRegHeight = nNew; }
- void SetRegAscent( USHORT nNew ){ nRegAscent = nNew; }
+ sal_uInt16 GetRegHeight() const { return nRegHeight; }
+ sal_uInt16 GetRegAscent() const { return nRegAscent; }
+ void SetRegHeight( sal_uInt16 nNew ){ nRegHeight = nNew; }
+ void SetRegAscent( sal_uInt16 nNew ){ nRegAscent = nNew; }
inline void SetFollow( const SwPageDesc* pNew );
const SwPageDesc* GetFollow() const { return pFollow; }
@@ -215,19 +215,19 @@ public:
void RegisterChange();
// Query and set PoolFormat-Id.
- USHORT GetPoolFmtId() const { return aMaster.GetPoolFmtId(); }
- void SetPoolFmtId( USHORT nId ) { aMaster.SetPoolFmtId( nId ); }
- USHORT GetPoolHelpId() const { return aMaster.GetPoolHelpId(); }
- void SetPoolHelpId( USHORT nId ) { aMaster.SetPoolHelpId( nId ); }
- BYTE GetPoolHlpFileId() const { return aMaster.GetPoolHlpFileId(); }
- void SetPoolHlpFileId( BYTE nId ) { aMaster.SetPoolHlpFileId( nId ); }
+ sal_uInt16 GetPoolFmtId() const { return aMaster.GetPoolFmtId(); }
+ void SetPoolFmtId( sal_uInt16 nId ) { aMaster.SetPoolFmtId( nId ); }
+ sal_uInt16 GetPoolHelpId() const { return aMaster.GetPoolHelpId(); }
+ void SetPoolHelpId( sal_uInt16 nId ) { aMaster.SetPoolHelpId( nId ); }
+ sal_uInt8 GetPoolHlpFileId() const { return aMaster.GetPoolHlpFileId(); }
+ void SetPoolHlpFileId( sal_uInt8 nId ) { aMaster.SetPoolHlpFileId( nId ); }
// Query information from Client.
- virtual BOOL GetInfo( SfxPoolItem& ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
const SwFrmFmt* GetPageFmtOfNode( const SwNode& rNd,
- BOOL bCheckForThisPgDc = TRUE ) const;
- BOOL IsFollowNextPageOfNode( const SwNode& rNd ) const;
+ sal_Bool bCheckForThisPgDc = sal_True ) const;
+ sal_Bool IsFollowNextPageOfNode( const SwNode& rNd ) const;
//Given a SwNode return the pagedesc in use at that location.
static const SwPageDesc* GetPageDescOfNode(const SwNode& rNd);
@@ -243,22 +243,22 @@ inline void SwPageDesc::SetFollow( const SwPageDesc* pNew )
pFollow = pNew ? (SwPageDesc*)pNew : this;
}
-inline BOOL SwPageDesc::IsHeaderShared() const
+inline sal_Bool SwPageDesc::IsHeaderShared() const
{
- return eUse & nsUseOnPage::PD_HEADERSHARE ? TRUE : FALSE;
+ return eUse & nsUseOnPage::PD_HEADERSHARE ? sal_True : sal_False;
}
-inline BOOL SwPageDesc::IsFooterShared() const
+inline sal_Bool SwPageDesc::IsFooterShared() const
{
- return eUse & nsUseOnPage::PD_FOOTERSHARE ? TRUE : FALSE;
+ return eUse & nsUseOnPage::PD_FOOTERSHARE ? sal_True : sal_False;
}
-inline void SwPageDesc::ChgHeaderShare( BOOL bNew )
+inline void SwPageDesc::ChgHeaderShare( sal_Bool bNew )
{
if ( bNew )
eUse = (UseOnPage) (eUse | nsUseOnPage::PD_HEADERSHARE);
else
eUse = (UseOnPage) (eUse & nsUseOnPage::PD_NOHEADERSHARE);
}
-inline void SwPageDesc::ChgFooterShare( BOOL bNew )
+inline void SwPageDesc::ChgFooterShare( sal_Bool bNew )
{
if ( bNew )
eUse = (UseOnPage) (eUse | nsUseOnPage::PD_FOOTERSHARE);
diff --git a/sw/inc/pageiter.hxx b/sw/inc/pageiter.hxx
index 86b4c8e6cfd1..c0c6b6576b7c 100644
--- a/sw/inc/pageiter.hxx
+++ b/sw/inc/pageiter.hxx
@@ -42,11 +42,11 @@ class SwPageIter {
public:
SwPageIter( const SwDoc &rDoc, const SwPosition &rStartPos );
- BOOL IsEnd() const { return 0 == pPage; }
- BOOL NextPage();
+ sal_Bool IsEnd() const { return 0 == pPage; }
+ sal_Bool NextPage();
const SwPageDesc* GetPageDesc() const;
- BOOL Seek( const SwPosition &rPos );
- BOOL GetPosition( SwPosition &rPos ) const;
+ sal_Bool Seek( const SwPosition &rPos );
+ sal_Bool GetPosition( SwPosition &rPos ) const;
};
diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx
index 8b78fc7cc398..9d839475dbd5 100644
--- a/sw/inc/pam.hxx
+++ b/sw/inc/pam.hxx
@@ -73,12 +73,12 @@ struct SW_DLLPUBLIC SwPosition
*/
SwDoc * GetDoc() const;
- BOOL operator < (const SwPosition &) const;
- BOOL operator > (const SwPosition &) const;
- BOOL operator <=(const SwPosition &) const;
- BOOL operator >=(const SwPosition &) const;
- BOOL operator ==(const SwPosition &) const;
- BOOL operator !=(const SwPosition &) const;
+ sal_Bool operator < (const SwPosition &) const;
+ sal_Bool operator > (const SwPosition &) const;
+ sal_Bool operator <=(const SwPosition &) const;
+ sal_Bool operator >=(const SwPosition &) const;
+ sal_Bool operator ==(const SwPosition &) const;
+ sal_Bool operator !=(const SwPosition &) const;
};
@@ -109,7 +109,7 @@ typedef SwMoveFnCollection* SwMoveFn;
SW_DLLPUBLIC extern SwMoveFn fnMoveForward; // SwPam::Move()/Find() default argument.
SW_DLLPUBLIC extern SwMoveFn fnMoveBackward;
-typedef BOOL (*SwGoInDoc)( SwPaM& rPam, SwMoveFn fnMove );
+typedef sal_Bool (*SwGoInDoc)( SwPaM& rPam, SwMoveFn fnMove );
SW_DLLPUBLIC extern SwGoInDoc fnGoDoc;
extern SwGoInDoc fnGoSection;
SW_DLLPUBLIC extern SwGoInDoc fnGoNode;
@@ -151,27 +151,27 @@ public:
SwPaM& operator=( const SwPaM & );
// Movement of cursor.
- BOOL Move( SwMoveFn fnMove = fnMoveForward,
+ sal_Bool Move( SwMoveFn fnMove = fnMoveForward,
SwGoInDoc fnGo = fnGoCntnt );
// Search.
- BYTE Find( const com::sun::star::util::SearchOptions& rSearchOpt,
- BOOL bSearchInNotes,
+ sal_uInt8 Find( const com::sun::star::util::SearchOptions& rSearchOpt,
+ sal_Bool bSearchInNotes,
utl::TextSearch& rSTxt,
SwMoveFn fnMove = fnMoveForward,
- const SwPaM *pPam =0, BOOL bInReadOnly = FALSE);
- BOOL Find( const SwFmt& rFmt,
+ const SwPaM *pPam =0, sal_Bool bInReadOnly = sal_False);
+ sal_Bool Find( const SwFmt& rFmt,
SwMoveFn fnMove = fnMoveForward,
- const SwPaM *pPam =0, BOOL bInReadOnly = FALSE);
- BOOL Find( const SfxPoolItem& rAttr, BOOL bValue = TRUE,
+ const SwPaM *pPam =0, sal_Bool bInReadOnly = sal_False);
+ sal_Bool Find( const SfxPoolItem& rAttr, sal_Bool bValue = sal_True,
SwMoveFn fnMove = fnMoveForward,
- const SwPaM *pPam =0, BOOL bInReadOnly = FALSE );
- BOOL Find( const SfxItemSet& rAttr, BOOL bNoColls,
+ const SwPaM *pPam =0, sal_Bool bInReadOnly = sal_False );
+ sal_Bool Find( const SfxItemSet& rAttr, sal_Bool bNoColls,
SwMoveFn fnMove,
- const SwPaM *pPam, BOOL bInReadOnly, BOOL bMoveFirst );
+ const SwPaM *pPam, sal_Bool bInReadOnly, sal_Bool bMoveFirst );
bool DoSearch( const com::sun::star::util::SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
- SwMoveFn fnMove, BOOL bSrchForward, BOOL bRegSearch, BOOL bChkEmptyPara, BOOL bChkParaEnd,
+ SwMoveFn fnMove, sal_Bool bSrchForward, sal_Bool bRegSearch, sal_Bool bChkEmptyPara, sal_Bool bChkParaEnd,
xub_StrLen &nStart, xub_StrLen &nEnde,xub_StrLen nTxtLen,SwNode* pNode, SwPaM* pPam);
inline bool IsInFrontOfLabel() const { return m_bIsInFrontOfLabel; }
@@ -239,10 +239,10 @@ public:
/**
Normalizes PaM, i.e. sort point and mark.
- @param bPointFirst TRUE: If the point is behind the mark then swap.
- FALSE: If the mark is behind the point then swap.
+ @param bPointFirst sal_True: If the point is behind the mark then swap.
+ sal_False: If the mark is behind the point then swap.
*/
- SwPaM & Normalize(BOOL bPointFirst = TRUE);
+ SwPaM & Normalize(sal_Bool bPointFirst = sal_True);
/// @return the document (SwDoc) at which the PaM is registered
SwDoc* GetDoc() const { return m_pPoint->nNode.GetNode().GetDoc(); }
@@ -253,18 +253,18 @@ public:
{ return bOne ? m_Bound1 : m_Bound2; }
// Get number of page which contains cursor.
- USHORT GetPageNum( BOOL bAtPoint = TRUE, const Point* pLayPos = 0 );
+ sal_uInt16 GetPageNum( sal_Bool bAtPoint = sal_True, const Point* pLayPos = 0 );
// Is in something protected (readonly) or selection contains
// something protected.
- BOOL HasReadonlySel( bool bFormView ) const;
+ sal_Bool HasReadonlySel( bool bFormView ) const;
- BOOL ContainsPosition(const SwPosition & rPos)
+ sal_Bool ContainsPosition(const SwPosition & rPos)
{ return *Start() <= rPos && rPos <= *End(); }
- static BOOL Overlap(const SwPaM & a, const SwPaM & b);
+ static sal_Bool Overlap(const SwPaM & a, const SwPaM & b);
- static BOOL LessThan(const SwPaM & a, const SwPaM & b);
+ static sal_Bool LessThan(const SwPaM & a, const SwPaM & b);
DECL_FIXEDMEMPOOL_NEWDEL(SwPaM);
@@ -273,8 +273,8 @@ public:
};
-BOOL CheckNodesRange( const SwNodeIndex&, const SwNodeIndex&, BOOL );
-BOOL GoInCntnt( SwPaM & rPam, SwMoveFn fnMove );
+sal_Bool CheckNodesRange( const SwNodeIndex&, const SwNodeIndex&, sal_Bool );
+sal_Bool GoInCntnt( SwPaM & rPam, SwMoveFn fnMove );
#endif // _PAM_HXX
diff --git a/sw/inc/paratr.hxx b/sw/inc/paratr.hxx
index a07fe93974b0..54eff6a7cd26 100644
--- a/sw/inc/paratr.hxx
+++ b/sw/inc/paratr.hxx
@@ -39,7 +39,7 @@
class SwCharFmt;
class IntlWrapper;
-#define DROP_WHOLEWORD ((USHORT)0x0001)
+#define DROP_WHOLEWORD ((sal_uInt16)0x0001)
// If SwFmtDrop is a Client, it is the CharFmt that describes the font for the
// DropCaps. If it is not a Client, formating uses the CharFmt of the paragraph.
@@ -49,11 +49,11 @@ class SW_DLLPUBLIC SwFmtDrop: public SfxPoolItem, public SwClient
{
SwModify* pDefinedIn; // Modify-Object, that contains DropCaps.
// Can only be TxtFmtCollection/TxtNode.
- USHORT nDistance; // Distance to beginning of text.
- USHORT nReadFmt; // For Sw3-Reader: CharFormat-Id (load Pool!).
- BYTE nLines; // Line count.
- BYTE nChars; // Character count.
- BOOL bWholeWord; // First word with initials.
+ sal_uInt16 nDistance; // Distance to beginning of text.
+ sal_uInt16 nReadFmt; // For Sw3-Reader: CharFormat-Id (load Pool!).
+ sal_uInt8 nLines; // Line count.
+ sal_uInt8 nChars; // Character count.
+ sal_Bool bWholeWord; // First word with initials.
public:
TYPEINFO(); // Already in base class SwClient.
@@ -75,27 +75,27 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 0) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
- inline BYTE GetLines() const { return nLines; }
- inline BYTE &GetLines() { return nLines; }
+ inline sal_uInt8 GetLines() const { return nLines; }
+ inline sal_uInt8 &GetLines() { return nLines; }
- inline BYTE GetChars() const { return nChars; }
- inline BYTE &GetChars() { return nChars; }
+ inline sal_uInt8 GetChars() const { return nChars; }
+ inline sal_uInt8 &GetChars() { return nChars; }
- inline BOOL GetWholeWord() const { return bWholeWord; }
- inline BYTE &GetWholeWord() { return bWholeWord; }
+ inline sal_Bool GetWholeWord() const { return bWholeWord; }
+ inline sal_uInt8 &GetWholeWord() { return bWholeWord; }
- inline USHORT GetDistance() const { return nDistance; }
- inline USHORT &GetDistance() { return nDistance; }
+ inline sal_uInt16 GetDistance() const { return nDistance; }
+ inline sal_uInt16 &GetDistance() { return nDistance; }
inline const SwCharFmt *GetCharFmt() const { return (SwCharFmt*)pRegisteredIn; }
inline SwCharFmt *GetCharFmt() { return (SwCharFmt*)pRegisteredIn; }
void SetCharFmt( SwCharFmt *pNew );
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
// Get information from Client.
- virtual BOOL GetInfo( SfxPoolItem& ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
// Get and set Modify pointer.
inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
@@ -108,7 +108,7 @@ class SwRegisterItem : public SfxBoolItem
public:
TYPEINFO();
- inline SwRegisterItem( const BOOL bRegister = FALSE );
+ inline SwRegisterItem( const sal_Bool bRegister = sal_False );
// @@@ public copy assignment, but no copy ctor?
inline SwRegisterItem& operator=( const SwRegisterItem& rRegister );
@@ -122,7 +122,7 @@ public:
const IntlWrapper* pIntl = 0 ) const;
};
-inline SwRegisterItem::SwRegisterItem( const BOOL bRegister ) :
+inline SwRegisterItem::SwRegisterItem( const sal_Bool bRegister ) :
SfxBoolItem( RES_PARATR_REGISTER, bRegister )
{}
@@ -159,8 +159,8 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId );
};
class SwParaConnectBorderItem : public SfxBoolItem
@@ -168,7 +168,7 @@ class SwParaConnectBorderItem : public SfxBoolItem
public:
TYPEINFO();
- inline SwParaConnectBorderItem( const BOOL bConnect = TRUE );
+ inline SwParaConnectBorderItem( const sal_Bool bConnect = sal_True );
// @@@ public copy assignment, but no copy ctor?
inline SwParaConnectBorderItem& operator=( const SwParaConnectBorderItem& rConnect );
@@ -182,7 +182,7 @@ public:
const IntlWrapper* pIntl = 0 ) const;
};
-inline SwParaConnectBorderItem::SwParaConnectBorderItem( const BOOL bConnect ) :
+inline SwParaConnectBorderItem::SwParaConnectBorderItem( const sal_Bool bConnect ) :
SfxBoolItem( RES_PARATR_CONNECT_BORDER, bConnect )
{}
@@ -199,74 +199,74 @@ inline SwParaConnectBorderItem& SwParaConnectBorderItem::operator=(
* Implementation of paragraph-attributes methods of SwAttrSet
******************************************************************************/
-inline const SvxLineSpacingItem &SwAttrSet::GetLineSpacing(BOOL bInP) const
+inline const SvxLineSpacingItem &SwAttrSet::GetLineSpacing(sal_Bool bInP) const
{ return (const SvxLineSpacingItem&)Get( RES_PARATR_LINESPACING,bInP); }
-inline const SvxAdjustItem &SwAttrSet::GetAdjust(BOOL bInP) const
+inline const SvxAdjustItem &SwAttrSet::GetAdjust(sal_Bool bInP) const
{ return (const SvxAdjustItem&)Get( RES_PARATR_ADJUST,bInP); }
-inline const SvxFmtSplitItem &SwAttrSet::GetSplit(BOOL bInP) const
+inline const SvxFmtSplitItem &SwAttrSet::GetSplit(sal_Bool bInP) const
{ return (const SvxFmtSplitItem&)Get( RES_PARATR_SPLIT,bInP); }
-inline const SwRegisterItem &SwAttrSet::GetRegister(BOOL bInP) const
+inline const SwRegisterItem &SwAttrSet::GetRegister(sal_Bool bInP) const
{ return (const SwRegisterItem&)Get( RES_PARATR_REGISTER,bInP); }
-inline const SvxWidowsItem &SwAttrSet::GetWidows(BOOL bInP) const
+inline const SvxWidowsItem &SwAttrSet::GetWidows(sal_Bool bInP) const
{ return (const SvxWidowsItem&)Get( RES_PARATR_WIDOWS,bInP); }
-inline const SvxOrphansItem &SwAttrSet::GetOrphans(BOOL bInP) const
+inline const SvxOrphansItem &SwAttrSet::GetOrphans(sal_Bool bInP) const
{ return (const SvxOrphansItem&)Get( RES_PARATR_ORPHANS,bInP); }
-inline const SvxTabStopItem &SwAttrSet::GetTabStops(BOOL bInP) const
+inline const SvxTabStopItem &SwAttrSet::GetTabStops(sal_Bool bInP) const
{ return (const SvxTabStopItem&)Get( RES_PARATR_TABSTOP,bInP); }
-inline const SvxHyphenZoneItem &SwAttrSet::GetHyphenZone(BOOL bInP) const
+inline const SvxHyphenZoneItem &SwAttrSet::GetHyphenZone(sal_Bool bInP) const
{ return (const SvxHyphenZoneItem&)Get(RES_PARATR_HYPHENZONE,bInP); }
-inline const SwFmtDrop &SwAttrSet::GetDrop(BOOL bInP) const
+inline const SwFmtDrop &SwAttrSet::GetDrop(sal_Bool bInP) const
{ return (const SwFmtDrop&)Get(RES_PARATR_DROP,bInP); }
-inline const SwNumRuleItem &SwAttrSet::GetNumRule(BOOL bInP) const
+inline const SwNumRuleItem &SwAttrSet::GetNumRule(sal_Bool bInP) const
{ return (const SwNumRuleItem&)Get(RES_PARATR_NUMRULE,bInP); }
-inline const SvxScriptSpaceItem& SwAttrSet::GetScriptSpace(BOOL bInP) const
+inline const SvxScriptSpaceItem& SwAttrSet::GetScriptSpace(sal_Bool bInP) const
{ return (const SvxScriptSpaceItem&)Get(RES_PARATR_SCRIPTSPACE,bInP); }
-inline const SvxHangingPunctuationItem &SwAttrSet::GetHangingPunctuation(BOOL bInP) const
+inline const SvxHangingPunctuationItem &SwAttrSet::GetHangingPunctuation(sal_Bool bInP) const
{ return (const SvxHangingPunctuationItem&)Get(RES_PARATR_HANGINGPUNCTUATION,bInP); }
-inline const SvxForbiddenRuleItem &SwAttrSet::GetForbiddenRule(BOOL bInP) const
+inline const SvxForbiddenRuleItem &SwAttrSet::GetForbiddenRule(sal_Bool bInP) const
{ return (const SvxForbiddenRuleItem&)Get(RES_PARATR_FORBIDDEN_RULES, bInP); }
-inline const SvxParaVertAlignItem &SwAttrSet::GetParaVertAlign(BOOL bInP) const
+inline const SvxParaVertAlignItem &SwAttrSet::GetParaVertAlign(sal_Bool bInP) const
{ return (const SvxParaVertAlignItem&)Get( RES_PARATR_VERTALIGN, bInP ); }
-inline const SvxParaGridItem &SwAttrSet::GetParaGrid(BOOL bInP) const
+inline const SvxParaGridItem &SwAttrSet::GetParaGrid(sal_Bool bInP) const
{ return (const SvxParaGridItem&)Get( RES_PARATR_SNAPTOGRID, bInP ); }
-inline const SwParaConnectBorderItem &SwAttrSet::GetParaConnectBorder(BOOL bInP) const
+inline const SwParaConnectBorderItem &SwAttrSet::GetParaConnectBorder(sal_Bool bInP) const
{ return (const SwParaConnectBorderItem&)Get( RES_PARATR_CONNECT_BORDER, bInP ); }
/******************************************************************************
* Implementation of paragraph-attributes methods of SwFmt
******************************************************************************/
-inline const SvxLineSpacingItem &SwFmt::GetLineSpacing(BOOL bInP) const
+inline const SvxLineSpacingItem &SwFmt::GetLineSpacing(sal_Bool bInP) const
{ return aSet.GetLineSpacing(bInP); }
-inline const SvxAdjustItem &SwFmt::GetAdjust(BOOL bInP) const
+inline const SvxAdjustItem &SwFmt::GetAdjust(sal_Bool bInP) const
{ return aSet.GetAdjust(bInP); }
-inline const SvxFmtSplitItem &SwFmt::GetSplit(BOOL bInP) const
+inline const SvxFmtSplitItem &SwFmt::GetSplit(sal_Bool bInP) const
{ return aSet.GetSplit(bInP); }
-inline const SwRegisterItem &SwFmt::GetRegister(BOOL bInP) const
+inline const SwRegisterItem &SwFmt::GetRegister(sal_Bool bInP) const
{ return aSet.GetRegister(bInP); }
-inline const SvxWidowsItem &SwFmt::GetWidows(BOOL bInP) const
+inline const SvxWidowsItem &SwFmt::GetWidows(sal_Bool bInP) const
{ return aSet.GetWidows(bInP); }
-inline const SvxOrphansItem &SwFmt::GetOrphans(BOOL bInP) const
+inline const SvxOrphansItem &SwFmt::GetOrphans(sal_Bool bInP) const
{ return aSet.GetOrphans(bInP); }
-inline const SvxTabStopItem &SwFmt::GetTabStops(BOOL bInP) const
+inline const SvxTabStopItem &SwFmt::GetTabStops(sal_Bool bInP) const
{ return aSet.GetTabStops(bInP); }
-inline const SvxHyphenZoneItem &SwFmt::GetHyphenZone(BOOL bInP) const
+inline const SvxHyphenZoneItem &SwFmt::GetHyphenZone(sal_Bool bInP) const
{ return aSet.GetHyphenZone(bInP); }
-inline const SwFmtDrop &SwFmt::GetDrop(BOOL bInP) const
+inline const SwFmtDrop &SwFmt::GetDrop(sal_Bool bInP) const
{ return aSet.GetDrop(bInP); }
-inline const SwNumRuleItem &SwFmt::GetNumRule(BOOL bInP) const
+inline const SwNumRuleItem &SwFmt::GetNumRule(sal_Bool bInP) const
{ return aSet.GetNumRule(bInP); }
-inline const SvxScriptSpaceItem& SwFmt::GetScriptSpace(BOOL bInP) const
+inline const SvxScriptSpaceItem& SwFmt::GetScriptSpace(sal_Bool bInP) const
{ return aSet.GetScriptSpace(bInP) ; }
-inline const SvxHangingPunctuationItem &SwFmt::GetHangingPunctuation(BOOL bInP) const
+inline const SvxHangingPunctuationItem &SwFmt::GetHangingPunctuation(sal_Bool bInP) const
{ return aSet.GetHangingPunctuation(bInP) ; }
-inline const SvxForbiddenRuleItem &SwFmt::GetForbiddenRule(BOOL bInP) const
+inline const SvxForbiddenRuleItem &SwFmt::GetForbiddenRule(sal_Bool bInP) const
{ return (const SvxForbiddenRuleItem&)aSet.Get(RES_PARATR_FORBIDDEN_RULES, bInP); }
-inline const SvxParaVertAlignItem &SwFmt::GetParaVertAlign(BOOL bInP) const
+inline const SvxParaVertAlignItem &SwFmt::GetParaVertAlign(sal_Bool bInP) const
{ return (const SvxParaVertAlignItem&)aSet.Get( RES_PARATR_VERTALIGN, bInP ); }
-inline const SvxParaGridItem &SwFmt::GetParaGrid(BOOL bInP) const
+inline const SvxParaGridItem &SwFmt::GetParaGrid(sal_Bool bInP) const
{ return (const SvxParaGridItem&)aSet.Get( RES_PARATR_SNAPTOGRID, bInP ); }
-inline const SwParaConnectBorderItem &SwFmt::GetParaConnectBorder(BOOL bInP) const
+inline const SwParaConnectBorderItem &SwFmt::GetParaConnectBorder(sal_Bool bInP) const
{ return (const SwParaConnectBorderItem&)aSet.Get( RES_PARATR_CONNECT_BORDER, bInP ); }
#endif
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index f77bb6a62f9d..63fef819d135 100644..100755
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -660,7 +660,6 @@
#include "unotools/pathoptions.hxx"
#include "svl/poolitem.hxx"
#include "svtools/prgsbar.hxx"
-#include "svtools/printdlg.hxx"
#include "svtools/prnsetup.hxx"
#include "svl/ptitem.hxx"
#include "svl/rectitem.hxx"
@@ -748,7 +747,7 @@
#include "svx/globlmn.hrc"
#include "svx/grafctrl.hxx"
#include "editeng/hangulhanja.hxx"
-#include "svx/hdft2.hxx"
+#include "svx/hdft.hxx"
#include "svtools/htmlcfg.hxx"
#include "svx/htmlmode.hxx"
#include "svx/hyperdlg.hxx"
@@ -910,14 +909,14 @@
#include "vcl/event.hxx"
#include "vcl/field.hxx"
#include "vcl/fixed.hxx"
-#include "vcl/fldunit.hxx"
+#include "tools/fldunit.hxx"
#include "vcl/font.hxx"
#include "unotools/fontcvt.hxx"
#include "vcl/graph.hxx"
#include "vcl/group.hxx"
#include "vcl/help.hxx"
#include "vcl/image.hxx"
-#include "vcl/imagebtn.hxx"
+#include "vcl/button.hxx"
#include "vcl/inputctx.hxx"
#include "vcl/jobset.hxx"
#include "vcl/keycod.hxx"
@@ -947,7 +946,7 @@
#include "vcl/virdev.hxx"
#include "vcl/waitobj.hxx"
#include "vcl/window.hxx"
-#include "vcl/wintypes.hxx"
+#include "tools/wintypes.hxx"
#include "vcl/wrkwin.hxx"
#include "rtl/ref.hxx"
diff --git a/sw/inc/poolfmt.awk b/sw/inc/poolfmt.awk
index e9e333097020..42e31bab981e 100644
--- a/sw/inc/poolfmt.awk
+++ b/sw/inc/poolfmt.awk
@@ -1,11 +1,28 @@
#*************************************************************************
-#*
-#* $Workfile: dbgxtor.awk
-#*
-#* $Logfile: T:/sw/inc/poolfmt.awv $
-#*
-#* Copyright (c) 1990-1996, STAR DIVISION
-#*
+#
+# 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.
+#
#*************************************************************************
#
diff --git a/sw/inc/poolfmt.hrc b/sw/inc/poolfmt.hrc
index f191f0fac78c..e68de680c243 100644
--- a/sw/inc/poolfmt.hrc
+++ b/sw/inc/poolfmt.hrc
@@ -268,7 +268,14 @@
#define STR_POOLNUMRULE_BUL3 (RC_POOLNUMRULE_BEGIN+ 7)
#define STR_POOLNUMRULE_BUL4 (RC_POOLNUMRULE_BEGIN+ 8)
#define STR_POOLNUMRULE_BUL5 (RC_POOLNUMRULE_BEGIN+ 9)
-
+//IAccessibility2 Impplementaton 2009-----
+//Solution:Define column item's accessible name ID.
+#define STR_COLUMN_VALUESET_ITEM0 (RC_POOLNUMRULE_BEGIN + 10 )
+#define STR_COLUMN_VALUESET_ITEM1 (RC_POOLNUMRULE_BEGIN + 11 )
+#define STR_COLUMN_VALUESET_ITEM2 (RC_POOLNUMRULE_BEGIN + 12 )
+#define STR_COLUMN_VALUESET_ITEM3 (RC_POOLNUMRULE_BEGIN + 13 )
+#define STR_COLUMN_VALUESET_ITEM4 (RC_POOLNUMRULE_BEGIN + 14 )
+//-----IAccessibility2 Impplementaton 2009
//-----------------
// Paragraph styles
//-----------------
diff --git a/sw/inc/poolfmt.hxx b/sw/inc/poolfmt.hxx
index e235cf1ee504..d222cf3c2234 100644
--- a/sw/inc/poolfmt.hxx
+++ b/sw/inc/poolfmt.hxx
@@ -54,7 +54,7 @@
// 3 - Absatzformate (?)
// 4 - Grafikformate (?)
-// Fr alle IDs gilt:
+// F�r alle IDs gilt:
// Herkunft: 0 -Pool
// 1 -Benutzer
// Offset: innerhalb der Gruppe
@@ -70,37 +70,37 @@
// Maske fuer Erkennung von COLLPOOL-Ids:
-const USHORT POOLGRP_NOCOLLID = (1 << 10);
+const sal_uInt16 POOLGRP_NOCOLLID = (1 << 10);
// POLLCOLL-Gruppen:
-const USHORT USER_FMT = (1 << 15);
-const USHORT POOL_FMT = (0 << 15);
+const sal_uInt16 USER_FMT = (1 << 15);
+const sal_uInt16 POOL_FMT = (0 << 15);
-const USHORT COLL_TEXT_BITS = (1 << 11);
-const USHORT COLL_LISTS_BITS = (2 << 11);
-const USHORT COLL_EXTRA_BITS = (3 << 11);
-const USHORT COLL_REGISTER_BITS = (4 << 11);
-const USHORT COLL_DOC_BITS = (5 << 11);
-const USHORT COLL_HTML_BITS = (6 << 11);
-const USHORT COLL_GET_RANGE_BITS = (15 << 11);
+const sal_uInt16 COLL_TEXT_BITS = (1 << 11);
+const sal_uInt16 COLL_LISTS_BITS = (2 << 11);
+const sal_uInt16 COLL_EXTRA_BITS = (3 << 11);
+const sal_uInt16 COLL_REGISTER_BITS = (4 << 11);
+const sal_uInt16 COLL_DOC_BITS = (5 << 11);
+const sal_uInt16 COLL_HTML_BITS = (6 << 11);
+const sal_uInt16 COLL_GET_RANGE_BITS = (15 << 11);
// Sonstige Gruppen:
-const USHORT POOLGRP_CHARFMT = (0 << 11) + POOLGRP_NOCOLLID;
-const USHORT POOLGRP_FRAMEFMT = (1 << 11) + POOLGRP_NOCOLLID;
-const USHORT POOLGRP_PAGEDESC = (2 << 11) + POOLGRP_NOCOLLID;
-const USHORT POOLGRP_NUMRULE = (3 << 11) + POOLGRP_NOCOLLID;
+const sal_uInt16 POOLGRP_CHARFMT = (0 << 11) + POOLGRP_NOCOLLID;
+const sal_uInt16 POOLGRP_FRAMEFMT = (1 << 11) + POOLGRP_NOCOLLID;
+const sal_uInt16 POOLGRP_PAGEDESC = (2 << 11) + POOLGRP_NOCOLLID;
+const sal_uInt16 POOLGRP_NUMRULE = (3 << 11) + POOLGRP_NOCOLLID;
// fuer Erkennung ob Benutzer-Vorlage oder nicht:
-const USHORT POOL_IDUSER_FMT =
+const sal_uInt16 POOL_IDUSER_FMT =
USHRT_MAX & ~(COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID);
-inline BOOL IsPoolUserFmt( USHORT nId )
+inline sal_Bool IsPoolUserFmt( sal_uInt16 nId )
{
return POOL_IDUSER_FMT ==
(nId & ~(COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID))
- ? TRUE : FALSE;
+ ? sal_True : sal_False;
}
@@ -423,11 +423,11 @@ RES_POOLCOLL_HTML_END
// returnt: 0 -> Standard
// USHRT_MAX -> kein Parent
// sonst -> den Parent
-USHORT GetPoolParent( USHORT nId );
+sal_uInt16 GetPoolParent( sal_uInt16 nId );
-SvxFrameDirection GetDefaultFrameDirection(ULONG nLanguage);
+SvxFrameDirection GetDefaultFrameDirection(sal_uLong nLanguage);
-inline BOOL IsConditionalByPoolId(USHORT nId)
+inline sal_Bool IsConditionalByPoolId(sal_uInt16 nId)
{
return RES_POOLCOLL_TEXT == nId;
}
diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx
index 9884a140b312..6552a5680a9e 100644
--- a/sw/inc/postithelper.hxx
+++ b/sw/inc/postithelper.hxx
@@ -58,7 +58,7 @@ struct SwLayoutInfo
SwRect mPagePrtArea;
unsigned long mnPageNumber;
sw::sidebarwindows::SidebarPosition meSidebarPosition;
- USHORT mRedlineAuthor;
+ sal_uInt16 mRedlineAuthor;
SwLayoutInfo()
: mpAnchorFrm(0)
diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx
index ba71f976ceb6..a93ff9957695 100644
--- a/sw/inc/printdata.hxx
+++ b/sw/inc/printdata.hxx
@@ -25,8 +25,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _SW_PRINTDATA_HXX
-#define _SW_PRINTDATA_HXX
+#ifndef SW_PRINTDATA_HXX
+#define SW_PRINTDATA_HXX
#include <sal/types.h>
@@ -46,7 +46,6 @@ class _SetGetExpFlds;
class SwViewOption;
class OutputDevice;
class SwViewOptionAdjust_Impl;
-class SwPrtOptions;
class SwWrtShell;
class SfxViewShell;
@@ -249,7 +248,7 @@ class SwRenderData
// the view options to be applied for printing
SwViewOptionAdjust_Impl * m_pViewOptionAdjust;
- SwPrtOptions * m_pPrtOptions;
+ SwPrintData * m_pPrtOptions;
public:
@@ -270,14 +269,14 @@ public:
bool IsViewOptionAdjust() const { return m_pViewOptionAdjust != 0; }
bool NeedNewViewOptionAdjust( const SwWrtShell& ) const;
void ViewOptionAdjustStart( SwWrtShell &rSh, const SwViewOption &rViewOptions );
- void ViewOptionAdjust( const SwPrtOptions *pPrtOptions );
+ void ViewOptionAdjust( SwPrintData const*const pPrtOptions );
void ViewOptionAdjustStop();
bool HasSwPrtOptions() const { return m_pPrtOptions != 0; }
- void SetSwPrtOptions( SwPrtOptions * pOpt ) { m_pPrtOptions = pOpt; }
- const SwPrtOptions * GetSwPrtOptions() const { return m_pPrtOptions; }
- SwPrtOptions & GetSwPrtOptionsRef() { return *m_pPrtOptions; }
- void MakeSwPrtOptions( SwPrtOptions &rOptions, const SwDocShell *pDocShell,
+ void SetSwPrtOptions(SwPrintData *const pOpt) { m_pPrtOptions = pOpt; }
+ SwPrintData const* GetSwPrtOptions() const { return m_pPrtOptions; }
+ SwPrintData & GetSwPrtOptionsRef() { return *m_pPrtOptions; }
+ void MakeSwPrtOptions( SwPrintData & rOptions, const SwDocShell *pDocShell,
const SwPrintUIOptions *pOpt, const SwRenderData *pData, bool bIsPDFExport );
@@ -321,6 +320,18 @@ public:
////////////////////////////////////////////////////////////
-#endif //_SW_PRINTDATA_HXX
+// last remnants of swprtopt.hxx:
+#define POSTITS_NONE 0
+#define POSTITS_ONLY 1
+#define POSTITS_ENDDOC 2
+#define POSTITS_ENDPAGE 3
+
+namespace sw {
+
+void InitPrintOptionsFromApplication(SwPrintData & o_rData, bool const bWeb);
+
+} // namespace sw
+
+#endif // SW_PRINTDATA_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/prtopt.hxx b/sw/inc/prtopt.hxx
index a2c47fd47066..a2c47fd47066 100644
--- a/sw/source/ui/inc/prtopt.hxx
+++ b/sw/inc/prtopt.hxx
diff --git a/sw/inc/pvprtdat.hxx b/sw/inc/pvprtdat.hxx
index 8c1b2bb5f8bc..99f1e7ef52cc 100644
--- a/sw/inc/pvprtdat.hxx
+++ b/sw/inc/pvprtdat.hxx
@@ -34,11 +34,11 @@
class SwPagePreViewPrtData
{
- ULONG nLeftSpace, nRightSpace, nTopSpace, nBottomSpace,
+ sal_uLong nLeftSpace, nRightSpace, nTopSpace, nBottomSpace,
nHorzSpace, nVertSpace;
- BYTE nRow, nCol;
- BOOL bLandscape : 1;
- BOOL bStretch : 1;
+ sal_uInt8 nRow, nCol;
+ sal_Bool bLandscape : 1;
+ sal_Bool bStretch : 1;
public:
SwPagePreViewPrtData()
: nLeftSpace(0), nRightSpace(0), nTopSpace(0), nBottomSpace(0),
@@ -46,32 +46,32 @@ public:
bLandscape(0),bStretch(0)
{}
- ULONG GetLeftSpace() const { return nLeftSpace; }
- void SetLeftSpace( ULONG n ) { nLeftSpace = n; }
+ sal_uLong GetLeftSpace() const { return nLeftSpace; }
+ void SetLeftSpace( sal_uLong n ) { nLeftSpace = n; }
- ULONG GetRightSpace() const { return nRightSpace; }
- void SetRightSpace( ULONG n ) { nRightSpace = n; }
+ sal_uLong GetRightSpace() const { return nRightSpace; }
+ void SetRightSpace( sal_uLong n ) { nRightSpace = n; }
- ULONG GetTopSpace() const { return nTopSpace; }
- void SetTopSpace( ULONG n ) { nTopSpace = n; }
+ sal_uLong GetTopSpace() const { return nTopSpace; }
+ void SetTopSpace( sal_uLong n ) { nTopSpace = n; }
- ULONG GetBottomSpace() const { return nBottomSpace; }
- void SetBottomSpace( ULONG n ) { nBottomSpace = n; }
+ sal_uLong GetBottomSpace() const { return nBottomSpace; }
+ void SetBottomSpace( sal_uLong n ) { nBottomSpace = n; }
- ULONG GetHorzSpace() const { return nHorzSpace; }
- void SetHorzSpace( ULONG n ) { nHorzSpace = n; }
+ sal_uLong GetHorzSpace() const { return nHorzSpace; }
+ void SetHorzSpace( sal_uLong n ) { nHorzSpace = n; }
- ULONG GetVertSpace() const { return nVertSpace; }
- void SetVertSpace( ULONG n ) { nVertSpace = n; }
+ sal_uLong GetVertSpace() const { return nVertSpace; }
+ void SetVertSpace( sal_uLong n ) { nVertSpace = n; }
- BYTE GetRow() const { return nRow; }
- void SetRow(BYTE n ) { nRow = n; }
+ sal_uInt8 GetRow() const { return nRow; }
+ void SetRow(sal_uInt8 n ) { nRow = n; }
- BYTE GetCol() const { return nCol; }
- void SetCol( BYTE n ) { nCol = n; }
+ sal_uInt8 GetCol() const { return nCol; }
+ void SetCol( sal_uInt8 n ) { nCol = n; }
- BOOL GetLandscape() const { return bLandscape; }
- void SetLandscape( BOOL b ) { bLandscape = b; }
+ sal_Bool GetLandscape() const { return bLandscape; }
+ void SetLandscape( sal_Bool b ) { bLandscape = b; }
};
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index 39f3c62a2385..ac1140820877 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -63,9 +63,9 @@ class SwRedlineExtraData_FmtColl : public SwRedlineExtraData
{
String sFmtNm;
SfxItemSet* pSet;
- USHORT nPoolId;
+ sal_uInt16 nPoolId;
public:
- SwRedlineExtraData_FmtColl( const String& rColl, USHORT nPoolFmtId,
+ SwRedlineExtraData_FmtColl( const String& rColl, sal_uInt16 nPoolFmtId,
const SfxItemSet* pSet = 0 );
virtual ~SwRedlineExtraData_FmtColl();
virtual SwRedlineExtraData* CreateNew() const;
@@ -99,14 +99,14 @@ class SW_DLLPUBLIC SwRedlineData
String sComment;
DateTime aStamp;
RedlineType_t eType;
- USHORT nAuthor, nSeqNo;
+ sal_uInt16 nAuthor, nSeqNo;
public:
- SwRedlineData( RedlineType_t eT, USHORT nAut );
- SwRedlineData( const SwRedlineData& rCpy, BOOL bCpyNext = TRUE );
+ SwRedlineData( RedlineType_t eT, sal_uInt16 nAut );
+ SwRedlineData( const SwRedlineData& rCpy, sal_Bool bCpyNext = sal_True );
// fuer sw3io: pNext/pExtraData gehen in eigenen Besitz ueber!
- SwRedlineData( RedlineType_t eT, USHORT nAut, const DateTime& rDT,
+ SwRedlineData( RedlineType_t eT, sal_uInt16 nAut, const DateTime& rDT,
const String& rCmnt, SwRedlineData* pNxt,
SwRedlineExtraData* pExtraData = 0 );
@@ -129,7 +129,7 @@ public:
RedlineType_t GetType() const
{ return ((RedlineType_t)(eType & nsRedlineType_t::REDLINE_NO_FLAG_MASK)); }
RedlineType_t GetRealType() const { return eType; }
- USHORT GetAuthor() const { return nAuthor; }
+ sal_uInt16 GetAuthor() const { return nAuthor; }
const String& GetComment() const { return sComment; }
const DateTime& GetTimeStamp() const { return aStamp; }
inline const SwRedlineData* Next() const{ return pNext; }
@@ -161,8 +161,8 @@ public:
// fuers UI-seitige zusammenfassen von Redline-Actionen. Wird z.Z. nur
// fuers Autoformat mit Redline benoetigt. Der Wert != 0 bedeutet dabei,
// das es noch weitere geben kann!
- USHORT GetSeqNo() const { return nSeqNo; }
- void SetSeqNo( USHORT nNo ) { nSeqNo = nNo; }
+ sal_uInt16 GetSeqNo() const { return nSeqNo; }
+ void SetSeqNo( sal_uInt16 nNo ) { nSeqNo = nNo; }
String GetDescr() const;
};
@@ -172,9 +172,9 @@ class SW_DLLPUBLIC SwRedline : public SwPaM
{
SwRedlineData* pRedlineData;
SwNodeIndex* pCntntSect;
- BOOL bDelLastPara : 1;
- BOOL bIsLastParaDelete : 1;
- BOOL bIsVisible : 1;
+ sal_Bool bDelLastPara : 1;
+ sal_Bool bIsLastParaDelete : 1;
+ sal_Bool bIsVisible : 1;
void MoveToSection();
void CopyToSection();
@@ -186,8 +186,8 @@ public:
SwRedline( const SwRedlineData& rData, const SwPaM& rPam );
SwRedline( const SwRedlineData& rData, const SwPosition& rPos );
// fuer sw3io: pData geht in eigenen Besitz ueber!
- SwRedline(SwRedlineData* pData, const SwPosition& rPos, BOOL bVsbl,
- BOOL bDelLP, BOOL bIsPD) :
+ SwRedline(SwRedlineData* pData, const SwPosition& rPos, sal_Bool bVsbl,
+ sal_Bool bDelLP, sal_Bool bIsPD) :
SwPaM( rPos ), pRedlineData( pData ), pCntntSect( 0 ),
bDelLastPara( bDelLP ), bIsLastParaDelete( bIsPD ), bIsVisible( bVsbl )
{}
@@ -198,11 +198,11 @@ public:
// fuers Undo
void SetContentIdx( const SwNodeIndex* );
- BOOL IsVisible() const { return bIsVisible; }
- BOOL IsDelLastPara() const { return bDelLastPara; }
+ sal_Bool IsVisible() const { return bIsVisible; }
+ sal_Bool IsDelLastPara() const { return bDelLastPara; }
- // das BOOL besagt, ob nach dem setzen der Pos kein Bereich mehr
- // aufgespannt ist. -> TRUE, ansonten Bereich und FALSE
+ // das sal_Bool besagt, ob nach dem setzen der Pos kein Bereich mehr
+ // aufgespannt ist. -> sal_True, ansonten Bereich und sal_False
void SetStart( const SwPosition& rPos, SwPosition* pSttPtr = 0 )
{
if( !pSttPtr ) pSttPtr = Start();
@@ -214,23 +214,23 @@ public:
*pEndPtr = rPos;
}
// liegt eine gueltige Selektion vor?
- BOOL HasValidRange() const;
+ sal_Bool HasValidRange() const;
- const SwRedlineData& GetRedlineData(USHORT nPos = 0) const;
+ const SwRedlineData& GetRedlineData(sal_uInt16 nPos = 0) const;
int operator==( const SwRedlineData& rCmp ) const
{ return *pRedlineData == rCmp; }
int operator!=( const SwRedlineData& rCmp ) const
{ return *pRedlineData != rCmp; }
void SetAutoFmtFlag() { pRedlineData->SetAutoFmtFlag(); }
- USHORT GetStackCount() const;
- USHORT GetAuthor( USHORT nPos = 0) const;
- const String& GetAuthorString( USHORT nPos = 0 ) const;
- const DateTime& GetTimeStamp( USHORT nPos = 0) const;
- RedlineType_t GetRealType( USHORT nPos = 0 ) const;
- RedlineType_t GetType( USHORT nPos = 0) const
+ sal_uInt16 GetStackCount() const;
+ sal_uInt16 GetAuthor( sal_uInt16 nPos = 0) const;
+ const String& GetAuthorString( sal_uInt16 nPos = 0 ) const;
+ const DateTime& GetTimeStamp( sal_uInt16 nPos = 0) const;
+ RedlineType_t GetRealType( sal_uInt16 nPos = 0 ) const;
+ RedlineType_t GetType( sal_uInt16 nPos = 0) const
{ return ( (RedlineType_t)(GetRealType( nPos ) & nsRedlineType_t::REDLINE_NO_FLAG_MASK)); }
- const String& GetComment( USHORT nPos = 0 ) const;
+ const String& GetComment( sal_uInt16 nPos = 0 ) const;
void SetComment( const String& rS ) { pRedlineData->SetComment( rS ); }
@@ -244,29 +244,29 @@ public:
// fuers UI-seitige zusammenfassen von Redline-Actionen. Wird z.Z. nur
// fuers Autoformat mit Redline benoetigt. Der Wert != 0 bedeutet dabei,
// das es noch weitere geben kann!
- USHORT GetSeqNo() const { return pRedlineData->GetSeqNo(); }
- void SetSeqNo( USHORT nNo ) { pRedlineData->SetSeqNo( nNo ); }
+ sal_uInt16 GetSeqNo() const { return pRedlineData->GetSeqNo(); }
+ void SetSeqNo( sal_uInt16 nNo ) { pRedlineData->SetSeqNo( nNo ); }
// Beim Hide/ShowOriginal wird 2 mal ueber die Liste gelaufen, damit
// die Del-Redlines per Copy und Delete versteckt werden. Beim Move
// wird sonst die Attributierung falsch behandelt.
// Alle anderen Aufrufer muessen immer 0 angeben.
- void CallDisplayFunc( USHORT nLoop = 0 );
- void Show( USHORT nLoop = 0 );
- void Hide( USHORT nLoop = 0 );
- void ShowOriginal( USHORT nLoop = 0 );
+ void CallDisplayFunc( sal_uInt16 nLoop = 0 );
+ void Show( sal_uInt16 nLoop = 0 );
+ void Hide( sal_uInt16 nLoop = 0 );
+ void ShowOriginal( sal_uInt16 nLoop = 0 );
// calculates the intersection with text node number nNdIdx
- void CalcStartEnd( ULONG nNdIdx, USHORT& nStart, USHORT& nEnd ) const;
+ void CalcStartEnd( sal_uLong nNdIdx, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
void InvalidateRange(); // das Layout anstossen
- BOOL IsOwnRedline( const SwRedline& rRedl ) const
+ sal_Bool IsOwnRedline( const SwRedline& rRedl ) const
{ return GetAuthor() == rRedl.GetAuthor(); }
- BOOL CanCombine( const SwRedline& rRedl ) const;
+ sal_Bool CanCombine( const SwRedline& rRedl ) const;
- void PushData( const SwRedline& rRedl, BOOL bOwnAsNext = TRUE );
- BOOL PopData();
+ void PushData( const SwRedline& rRedl, sal_Bool bOwnAsNext = sal_True );
+ sal_Bool PopData();
/**
Returns textual description of this a redline data element of
@@ -279,7 +279,7 @@ public:
@return textual description of the selected redline data element
*/
- String GetDescr(USHORT nPos = 0);
+ String GetDescr(sal_uInt16 nPos = 0);
int operator==( const SwRedline& ) const;
int operator<( const SwRedline& ) const;
diff --git a/sw/inc/redlnaut.hxx b/sw/inc/redlnaut.hxx
index 7d07ca479be8..1764333b5d5d 100644
--- a/sw/inc/redlnaut.hxx
+++ b/sw/inc/redlnaut.hxx
@@ -42,7 +42,7 @@ class SwRedlineAuthor
Color aChgLineColor;
SfxItemSet *pInsAttrSet, *pDelAttrSet, *pFmtAttrSet;
short eChgLineOrient;
- BYTE cDelChar;
+ sal_uInt8 cDelChar;
public:
SwRedlineAuthor( SwAttrPool& rPool, const String& );
SwRedlineAuthor( const SwRedlineAuthor& );
diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx
index 6233dfb6372f..06b897576279 100644
--- a/sw/inc/reffld.hxx
+++ b/sw/inc/reffld.hxx
@@ -25,8 +25,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _REFFLD_HXX
-#define _REFFLD_HXX
+#ifndef SW_REFFLD_HXX
+#define SW_REFFLD_HXX
#include <fldbas.hxx>
@@ -84,8 +84,8 @@ public:
void MergeWithOtherDoc( SwDoc& rDestDoc );
static SwTxtNode* FindAnchor( SwDoc* pDoc, const String& rRefMark,
- USHORT nSubType, USHORT nSeqNo,
- USHORT* pStt, USHORT* pEnd = 0 );
+ sal_uInt16 nSubType, sal_uInt16 nSeqNo,
+ sal_uInt16* pStt, sal_uInt16* pEnd = 0 );
};
/*--------------------------------------------------------------------
@@ -97,8 +97,11 @@ class SW_DLLPUBLIC SwGetRefField : public SwField
private:
String sSetRefName;
String sTxt;
- USHORT nSubType;
- USHORT nSeqNo;
+ sal_uInt16 nSubType;
+ sal_uInt16 nSeqNo;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
// #i81002#
String MakeRefNumStr( const SwTxtNode& rTxtNodeOfField,
@@ -107,13 +110,11 @@ private:
public:
SwGetRefField( SwGetRefFieldType*, const String& rSetRef,
- USHORT nSubType, USHORT nSeqNo, ULONG nFmt );
+ sal_uInt16 nSubType, sal_uInt16 nSeqNo, sal_uLong nFmt );
virtual ~SwGetRefField();
- virtual String GetCntnt(BOOL bName = FALSE) const;
- virtual String Expand() const;
- virtual SwField* Copy() const;
+ virtual String GetFieldName() const;
const String& GetSetRefName() const { return sSetRefName; }
@@ -129,8 +130,8 @@ public:
void SetExpand( const String& rStr ) { sTxt = rStr; }
// SubType erfragen/setzen
- virtual USHORT GetSubType() const;
- virtual void SetSubType( USHORT n );
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType( sal_uInt16 n );
// --> #i81002#
bool IsRefToHeadingCrossRefBookmark() const;
@@ -142,16 +143,16 @@ public:
// SequenceNo erfragen/setzen (nur fuer REF_SEQUENCEFLD interressant)
- USHORT GetSeqNo() const { return nSeqNo; }
- void SetSeqNo( USHORT n ) { nSeqNo = n; }
+ sal_uInt16 GetSeqNo() const { return nSeqNo; }
+ void SetSeqNo( sal_uInt16 n ) { nSeqNo = n; }
// Name der Referenz
virtual const String& GetPar1() const;
virtual void SetPar1(const String& rStr);
virtual String GetPar2() const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
void ConvertProgrammaticToUIName();
@@ -159,6 +160,6 @@ public:
};
-#endif // _REFFLD_HXX
+#endif // SW_REFFLD_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
index 1fb47417f285..5a30cc0b502d 100644
--- a/sw/inc/section.hxx
+++ b/sw/inc/section.hxx
@@ -209,7 +209,7 @@ public:
void SetCondHidden(bool const bFlag = true);
bool IsCondHidden() const { return m_Data.IsCondHidden(); }
// erfrage (auch ueber die Parents), ob diese Section versteckt sein soll.
- BOOL CalcHiddenFlag() const;
+ sal_Bool CalcHiddenFlag() const;
inline SwSection* GetParent() const;
@@ -238,8 +238,8 @@ public:
bool IsServer() const { return m_RefObj.Is(); }
// Methoden fuer gelinkte Bereiche
- USHORT GetUpdateType() const { return m_RefLink->GetUpdateMode(); }
- void SetUpdateType(USHORT const nType )
+ sal_uInt16 GetUpdateType() const { return m_RefLink->GetUpdateMode(); }
+ void SetUpdateType(sal_uInt16 const nType )
{ m_RefLink->SetUpdateMode(nType); }
bool IsConnected() const { return m_RefLink.Is(); }
@@ -300,7 +300,7 @@ public:
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
// erfrage vom Format Informationen
- virtual BOOL GetInfo( SfxPoolItem& ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
SwSection* GetSection() const;
inline SwSectionFmt* GetParent() const;
@@ -309,13 +309,13 @@ public:
// alle Sections, die von dieser abgeleitet sind
// - sortiert nach : Name oder Position oder unsortiert
// - alle oder nur die, die sich im normalten Nodes-Array befinden
- USHORT GetChildSections( SwSections& rArr,
+ sal_uInt16 GetChildSections( SwSections& rArr,
SectionSort eSort = SORTSECT_NOT,
- BOOL bAllSections = TRUE ) const;
+ sal_Bool bAllSections = sal_True ) const;
// erfrage, ob sich die Section im Nodes-Array oder UndoNodes-Array
// befindet.
- BOOL IsInNodesArr() const;
+ sal_Bool IsInNodesArr() const;
SwSectionNode* GetSectionNode(bool const bEvenIfInUndo = false);
const SwSectionNode* GetSectionNode(bool const bEvenIfInUndo = false) const
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 399905623a5c..d87d1b2ca4ad 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -77,7 +77,7 @@ class SW_DLLPUBLIC SwAsciiOptions
{
String sFont;
rtl_TextEncoding eCharSet;
- USHORT nLanguage;
+ sal_uInt16 nLanguage;
LineEnd eCRLF_Flag;
public:
@@ -88,8 +88,8 @@ public:
rtl_TextEncoding GetCharSet() const { return eCharSet; }
void SetCharSet( rtl_TextEncoding nVal ) { eCharSet = nVal; }
- USHORT GetLanguage() const { return nLanguage; }
- void SetLanguage( USHORT nVal ) { nLanguage = nVal; }
+ sal_uInt16 GetLanguage() const { return nLanguage; }
+ void SetLanguage( sal_uInt16 nVal ) { nLanguage = nVal; }
LineEnd GetParaFlags() const { return eCRLF_Flag; }
void SetParaFlags( LineEnd eVal ) { eCRLF_Flag = eVal; }
@@ -121,35 +121,35 @@ class SwgReaderOption
SwAsciiOptions aASCIIOpts;
union
{
- BOOL bFmtsOnly;
+ sal_Bool bFmtsOnly;
struct
{
- BOOL bFrmFmts: 1;
- BOOL bPageDescs: 1;
- BOOL bTxtFmts: 1;
- BOOL bNumRules: 1;
- BOOL bMerge:1;
+ sal_Bool bFrmFmts: 1;
+ sal_Bool bPageDescs: 1;
+ sal_Bool bTxtFmts: 1;
+ sal_Bool bNumRules: 1;
+ sal_Bool bMerge:1;
} Fmts;
} What;
public:
void ResetAllFmtsOnly() { What.bFmtsOnly = 0; }
- BOOL IsFmtsOnly() const { return What.bFmtsOnly; }
+ sal_Bool IsFmtsOnly() const { return What.bFmtsOnly; }
- BOOL IsFrmFmts() const { return What.Fmts.bFrmFmts; }
- void SetFrmFmts( const BOOL bNew) { What.Fmts.bFrmFmts = bNew; }
+ sal_Bool IsFrmFmts() const { return What.Fmts.bFrmFmts; }
+ void SetFrmFmts( const sal_Bool bNew) { What.Fmts.bFrmFmts = bNew; }
- BOOL IsPageDescs() const { return What.Fmts.bPageDescs; }
- void SetPageDescs( const BOOL bNew) { What.Fmts.bPageDescs = bNew; }
+ sal_Bool IsPageDescs() const { return What.Fmts.bPageDescs; }
+ void SetPageDescs( const sal_Bool bNew) { What.Fmts.bPageDescs = bNew; }
- BOOL IsTxtFmts() const { return What.Fmts.bTxtFmts; }
- void SetTxtFmts( const BOOL bNew) { What.Fmts.bTxtFmts = bNew; }
+ sal_Bool IsTxtFmts() const { return What.Fmts.bTxtFmts; }
+ void SetTxtFmts( const sal_Bool bNew) { What.Fmts.bTxtFmts = bNew; }
- BOOL IsNumRules() const { return What.Fmts.bNumRules; }
- void SetNumRules( const BOOL bNew) { What.Fmts.bNumRules = bNew; }
+ sal_Bool IsNumRules() const { return What.Fmts.bNumRules; }
+ void SetNumRules( const sal_Bool bNew) { What.Fmts.bNumRules = bNew; }
- BOOL IsMerge() const { return What.Fmts.bMerge; }
- void SetMerge( const BOOL bNew ) { What.Fmts.bMerge = bNew; }
+ sal_Bool IsMerge() const { return What.Fmts.bMerge; }
+ void SetMerge( const sal_Bool bNew ) { What.Fmts.bMerge = bNew; }
const SwAsciiOptions& GetASCIIOpts() const { return aASCIIOpts; }
void SetASCIIOpts( const SwAsciiOptions& rOpts ) { aASCIIOpts = rOpts; }
@@ -188,13 +188,13 @@ public:
/*
* Nur SwReader::Read(...) ist die Export-Schnittstelle!!!
*/
- BOOL NeedsPasswd( const Reader& );
- BOOL CheckPasswd( const String&, const Reader& );
- ULONG Read( const Reader& );
+ sal_Bool NeedsPasswd( const Reader& );
+ sal_Bool CheckPasswd( const String&, const Reader& );
+ sal_uLong Read( const Reader& );
// ask for glossaries
- BOOL HasGlossaries( const Reader& );
- BOOL ReadGlossaries( const Reader&, SwTextBlocks&, BOOL bSaveRelFiles );
+ sal_Bool HasGlossaries( const Reader& );
+ sal_Bool ReadGlossaries( const Reader&, SwTextBlocks&, sal_Bool bSaveRelFiles );
const String& GetBaseURL() const { return sBaseURL;}
@@ -227,13 +227,13 @@ protected:
SfxMedium* pMedium; // wer ein Medium haben will (W4W)
SwgReaderOption aOpt;
- BOOL bInsertMode : 1;
- BOOL bTmplBrowseMode : 1;
- BOOL bReadUTF8: 1; // Stream als UTF-8 interpretieren
- BOOL bBlockMode: 1;
- BOOL bOrganizerMode : 1;
- BOOL bHasAskTemplateName : 1;
- BOOL bIgnoreHTMLComments : 1;
+ sal_Bool bInsertMode : 1;
+ sal_Bool bTmplBrowseMode : 1;
+ sal_Bool bReadUTF8: 1; // Stream als UTF-8 interpretieren
+ sal_Bool bBlockMode: 1;
+ sal_Bool bOrganizerMode : 1;
+ sal_Bool bHasAskTemplateName : 1;
+ sal_Bool bIgnoreHTMLComments : 1;
virtual String GetTemplateName() const;
@@ -256,35 +256,35 @@ public:
// Die Filter-Vorlage laden, setzen und wieder freigeben
SwDoc* GetTemplateDoc();
- BOOL SetTemplate( SwDoc& rDoc );
+ sal_Bool SetTemplate( SwDoc& rDoc );
void ClearTemplate();
void SetTemplateName( const String& rDir );
void MakeHTMLDummyTemplateDoc();
- BOOL IsReadUTF8() const { return bReadUTF8; }
- void SetReadUTF8( BOOL bSet ) { bReadUTF8 = bSet; }
+ sal_Bool IsReadUTF8() const { return bReadUTF8; }
+ void SetReadUTF8( sal_Bool bSet ) { bReadUTF8 = bSet; }
- BOOL IsBlockMode() const { return bBlockMode; }
- void SetBlockMode( BOOL bSet ) { bBlockMode = bSet; }
+ sal_Bool IsBlockMode() const { return bBlockMode; }
+ void SetBlockMode( sal_Bool bSet ) { bBlockMode = bSet; }
- BOOL IsOrganizerMode() const { return bOrganizerMode; }
- void SetOrganizerMode( BOOL bSet ) { bOrganizerMode = bSet; }
+ sal_Bool IsOrganizerMode() const { return bOrganizerMode; }
+ void SetOrganizerMode( sal_Bool bSet ) { bOrganizerMode = bSet; }
- void SetIgnoreHTMLComments( BOOL bSet ) { bIgnoreHTMLComments = bSet; }
+ void SetIgnoreHTMLComments( sal_Bool bSet ) { bIgnoreHTMLComments = bSet; }
- virtual BOOL HasGlossaries() const;
- virtual BOOL ReadGlossaries( SwTextBlocks&, BOOL bSaveRelFiles ) const;
+ virtual sal_Bool HasGlossaries() const;
+ virtual sal_Bool ReadGlossaries( SwTextBlocks&, sal_Bool bSaveRelFiles ) const;
// read the sections of the document, which is equal to the medium.
// returns the count of it
- virtual USHORT GetSectionList( SfxMedium& rMedium,
+ virtual sal_uInt16 GetSectionList( SfxMedium& rMedium,
SvStrings& rStrings ) const;
SotStorageRef getSotStorageRef() { return pStg; };
void setSotStorageRef(SotStorageRef pStgRef) { pStg = pStgRef; };
private:
- virtual ULONG Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &)=0;
+ virtual sal_uLong Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &)=0;
// alle die die Streams / Storages nicht geoeffnet brauchen,
// muessen die Methode ueberladen (W4W!!)
@@ -294,7 +294,7 @@ private:
class AsciiReader: public Reader
{
friend class SwReader;
- virtual ULONG Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+ virtual sal_uLong Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
public:
AsciiReader(): Reader() {}
};
@@ -302,6 +302,9 @@ public:
class SW_DLLPUBLIC StgReader : public Reader
{
String aFltName;
+
+protected:
+ sal_uLong OpenMainStream( SotStorageStreamRef& rRef, sal_uInt16& rBuffSize );
public:
virtual int GetReaderType();
const String& GetFltName() { return aFltName; }
@@ -320,7 +323,7 @@ class SwImpBlocks;
class SW_DLLPUBLIC SwTextBlocks
{
SwImpBlocks* pImp;
- ULONG nErr;
+ sal_uLong nErr;
public:
SwTextBlocks( const String& );
@@ -332,43 +335,43 @@ public:
void ClearDoc(); // Doc-Inhalt loeschen
const String& GetName();
void SetName( const String& );
- ULONG GetError() const { return nErr; }
+ sal_uLong GetError() const { return nErr; }
String GetBaseURL() const;
void SetBaseURL( const String& rURL );
- BOOL IsOld() const;
- ULONG ConvertToNew(); // Textbausteine konvertieren
+ sal_Bool IsOld() const;
+ sal_uLong ConvertToNew(); // Textbausteine konvertieren
- USHORT GetCount() const; // Anzahl Textbausteine ermitteln
- USHORT GetIndex( const String& ) const; // Index fuer Kurznamen ermitteln
- USHORT GetLongIndex( const String& ) const; //Index fuer Langnamen ermitteln
- const String& GetShortName( USHORT ) const; // Kurzname fuer Index zurueck
- const String& GetLongName( USHORT ) const; // Langname fuer Index zurueck
+ sal_uInt16 GetCount() const; // Anzahl Textbausteine ermitteln
+ sal_uInt16 GetIndex( const String& ) const; // Index fuer Kurznamen ermitteln
+ sal_uInt16 GetLongIndex( const String& ) const; //Index fuer Langnamen ermitteln
+ const String& GetShortName( sal_uInt16 ) const; // Kurzname fuer Index zurueck
+ const String& GetLongName( sal_uInt16 ) const; // Langname fuer Index zurueck
- BOOL Delete( USHORT ); // Loeschen
- USHORT Rename( USHORT, const String*, const String* ); // Umbenennen
- ULONG CopyBlock( SwTextBlocks& rSource, String& rSrcShort,
+ sal_Bool Delete( sal_uInt16 ); // Loeschen
+ sal_uInt16 Rename( sal_uInt16, const String*, const String* ); // Umbenennen
+ sal_uLong CopyBlock( SwTextBlocks& rSource, String& rSrcShort,
const String& rLong ); // Block kopieren
- BOOL BeginGetDoc( USHORT ); // Textbaustein einlesen
+ sal_Bool BeginGetDoc( sal_uInt16 ); // Textbaustein einlesen
void EndGetDoc(); // Textbaustein wieder loslassen
- BOOL BeginPutDoc( const String&, const String& ); // Speichern Beginn
- USHORT PutDoc(); // Speichern Ende
+ sal_Bool BeginPutDoc( const String&, const String& ); // Speichern Beginn
+ sal_uInt16 PutDoc(); // Speichern Ende
- USHORT PutText( const String&, const String&, const String& ); // Speichern( Kurzn., Text)
+ sal_uInt16 PutText( const String&, const String&, const String& ); // Speichern( Kurzn., Text)
- BOOL IsOnlyTextBlock( USHORT ) const;
- BOOL IsOnlyTextBlock( const String& rShort ) const;
+ sal_Bool IsOnlyTextBlock( sal_uInt16 ) const;
+ sal_Bool IsOnlyTextBlock( const String& rShort ) const;
const String& GetFileName() const; // Dateiname von pImp
- BOOL IsReadOnly() const; // ReadOnly-Flag von pImp
+ sal_Bool IsReadOnly() const; // ReadOnly-Flag von pImp
- BOOL GetMacroTable( USHORT nIdx, SvxMacroTableDtor& rMacroTbl );
- BOOL SetMacroTable( USHORT nIdx, const SvxMacroTableDtor& rMacroTbl );
+ sal_Bool GetMacroTable( sal_uInt16 nIdx, SvxMacroTableDtor& rMacroTbl );
+ sal_Bool SetMacroTable( sal_uInt16 nIdx, const SvxMacroTableDtor& rMacroTbl );
- BOOL StartPutMuchBlockEntries();
+ sal_Bool StartPutMuchBlockEntries();
void EndPutMuchBlockEntries();
};
@@ -384,7 +387,7 @@ SW_DLLPUBLIC SwRead SwGetReaderXML();
// END source/filter/basflt/fltini.cxx
-extern BOOL SetHTMLTemplate( SwDoc &rDoc ); //Fuer Vorlagen aus HTML.vor laden shellio.cxx
+extern sal_Bool SetHTMLTemplate( SwDoc &rDoc ); //Fuer Vorlagen aus HTML.vor laden shellio.cxx
/////////////////////////////////////////////////////////////////////////////
@@ -407,7 +410,7 @@ class SW_DLLPUBLIC Writer
String sBaseURL;
void _AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont );
- void _AddFontItems( SfxItemPool& rPool, USHORT nWhichId );
+ void _AddFontItems( SfxItemPool& rPool, sal_uInt16 nWhichId );
::std::auto_ptr<Writer_Impl> m_pImpl;
@@ -417,13 +420,13 @@ protected:
const String* pOrigFileName;
void ResetWriter();
- BOOL CopyNextPam( SwPaM ** );
+ sal_Bool CopyNextPam( SwPaM ** );
void PutNumFmtFontsInAttrPool();
- void PutEditEngFontsInAttrPool( BOOL bIncl_CJK_CTL = TRUE );
+ void PutEditEngFontsInAttrPool( sal_Bool bIncl_CJK_CTL = sal_True );
void PutCJKandCTLFontsInAttrPool();
- virtual ULONG WriteStream() = 0;
+ virtual sal_uLong WriteStream() = 0;
void SetBaseURL( const String& rURL ) { sBaseURL = rURL; }
IDocumentSettingAccess* getIDocumentSettingAccess();
@@ -435,32 +438,32 @@ protected:
public:
SwDoc* pDoc;
SwPaM* pCurPam;
- BOOL bWriteAll : 1;
- BOOL bShowProgress : 1;
- BOOL bWriteClipboardDoc : 1;
- BOOL bWriteOnlyFirstTable : 1;
- BOOL bASCII_ParaAsCR : 1;
- BOOL bASCII_ParaAsBlanc : 1;
- BOOL bASCII_NoLastLineEnd : 1;
- BOOL bUCS2_WithStartChar : 1;
- BOOL bExportPargraphNumbering : 1;
-
- BOOL bBlock : 1;
- BOOL bOrganizerMode : 1;
+ sal_Bool bWriteAll : 1;
+ sal_Bool bShowProgress : 1;
+ sal_Bool bWriteClipboardDoc : 1;
+ sal_Bool bWriteOnlyFirstTable : 1;
+ sal_Bool bASCII_ParaAsCR : 1;
+ sal_Bool bASCII_ParaAsBlanc : 1;
+ sal_Bool bASCII_NoLastLineEnd : 1;
+ sal_Bool bUCS2_WithStartChar : 1;
+ sal_Bool bExportPargraphNumbering : 1;
+
+ sal_Bool bBlock : 1;
+ sal_Bool bOrganizerMode : 1;
Writer();
virtual ~Writer();
- virtual ULONG Write( SwPaM&, SfxMedium&, const String* = 0 );
- ULONG Write( SwPaM&, SvStream&, const String* = 0 );
- virtual ULONG Write( SwPaM&, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String* = 0, SfxMedium* = 0 );
- virtual ULONG Write( SwPaM&, SotStorage&, const String* = 0 );
+ virtual sal_uLong Write( SwPaM&, SfxMedium&, const String* = 0 );
+ sal_uLong Write( SwPaM&, SvStream&, const String* = 0 );
+ virtual sal_uLong Write( SwPaM&, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String* = 0, SfxMedium* = 0 );
+ virtual sal_uLong Write( SwPaM&, SotStorage&, const String* = 0 );
virtual void SetPasswd( const String& );
virtual void SetVersion( const String&, long );
- virtual BOOL IsStgWriter() const;
+ virtual sal_Bool IsStgWriter() const;
- void SetShowProgress( BOOL bFlag = FALSE ) { bShowProgress = bFlag; }
+ void SetShowProgress( sal_Bool bFlag = sal_False ) { bShowProgress = bFlag; }
const String* GetOrigFileName() const { return pOrigFileName; }
@@ -475,38 +478,38 @@ public:
// OtherPos of the bookmarks also inserted.
void CreateBookmarkTbl();
// search alle Bookmarks in the range and return it in the Array
- USHORT GetBookmarks( const SwCntntNode& rNd,
+ sal_uInt16 GetBookmarks( const SwCntntNode& rNd,
xub_StrLen nStt, xub_StrLen nEnd,
SvPtrarr& rArr );
// lege einen neuen PaM an der Position an
- static SwPaM* NewSwPaM( SwDoc & rDoc, ULONG nStartIdx, ULONG nEndIdx,
- BOOL bNodesArray = TRUE );
+ static SwPaM * NewSwPaM(SwDoc & rDoc,
+ sal_uLong const nStartIdx, sal_uLong const nEndIdx);
// kopiere ggfs. eine lokale Datei ins Internet
- BOOL CopyLocalFileToINet( String& rFileNm );
+ sal_Bool CopyLocalFileToINet( String& rFileNm );
// Stream-spezifische Routinen, im Storage-Writer NICHT VERWENDEN!
// Optimierung der Ausgabe auf den Stream.
SvStream& OutLong( SvStream& rStrm, long nVal );
- SvStream& OutULong( SvStream& rStrm, ULONG nVal );
+ SvStream& OutULong( SvStream& rStrm, sal_uLong nVal );
// Hex-Zahl ausgeben, default ist 2.stellige Zahl
- SvStream& OutHex( SvStream& rStrm, ULONG nHex, BYTE nLen = 2 );
+ SvStream& OutHex( SvStream& rStrm, sal_uLong nHex, sal_uInt8 nLen = 2 );
// 4-st. Hex-Zahl ausgeben
- inline SvStream& OutHex4( SvStream& rStrm, USHORT nHex )
+ inline SvStream& OutHex4( SvStream& rStrm, sal_uInt16 nHex )
{ return OutHex( rStrm, nHex, 4 ); }
- inline SvStream& OutHex( USHORT nHex, BYTE nLen = 2 ) { return OutHex( Strm(), nHex, nLen ); }
- inline SvStream& OutHex4( USHORT nHex ) { return OutHex( Strm(), nHex, 4 ); }
+ inline SvStream& OutHex( sal_uInt16 nHex, sal_uInt8 nLen = 2 ) { return OutHex( Strm(), nHex, nLen ); }
+ inline SvStream& OutHex4( sal_uInt16 nHex ) { return OutHex( Strm(), nHex, 4 ); }
inline SvStream& OutLong( long nVal ) { return OutLong( Strm(), nVal ); }
- inline SvStream& OutULong( ULONG nVal ) { return OutULong( Strm(), nVal ); }
+ inline SvStream& OutULong( sal_uLong nVal ) { return OutULong( Strm(), nVal ); }
void SetStream(SvStream *const pStream);
SvStream& Strm();
- void SetOrganizerMode( BOOL bSet ) { bOrganizerMode = bSet; }
+ void SetOrganizerMode( sal_Bool bSet ) { bOrganizerMode = bSet; }
};
#ifndef SW_DECL_WRITER_DEFINED
@@ -524,19 +527,19 @@ protected:
com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg;
// Fehler beim Aufruf erzeugen
- virtual ULONG WriteStream();
- virtual ULONG WriteStorage() = 0;
- virtual ULONG WriteMedium( SfxMedium& ) = 0;
+ virtual sal_uLong WriteStream();
+ virtual sal_uLong WriteStorage() = 0;
+ virtual sal_uLong WriteMedium( SfxMedium& ) = 0;
using Writer::Write;
public:
StgWriter() : Writer() {}
- virtual BOOL IsStgWriter() const;
+ virtual sal_Bool IsStgWriter() const;
- virtual ULONG Write( SwPaM&, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String* = 0, SfxMedium* = 0 );
- virtual ULONG Write( SwPaM&, SotStorage&, const String* = 0 );
+ virtual sal_uLong Write( SwPaM&, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String* = 0, SfxMedium* = 0 );
+ virtual sal_uLong Write( SwPaM&, SotStorage&, const String* = 0 );
SotStorage& GetStorage() const { return *pStg; }
};
@@ -555,18 +558,18 @@ class SwWriter
SwCrsrShell *pShell;
SwDoc &rDoc;
- BOOL bWriteAll;
+ sal_Bool bWriteAll;
public:
- ULONG Write( WriterRef& rxWriter, const String* = 0);
+ sal_uLong Write( WriterRef& rxWriter, const String* = 0);
- SwWriter( SvStream&, SwCrsrShell &,BOOL bWriteAll = FALSE );
+ SwWriter( SvStream&, SwCrsrShell &,sal_Bool bWriteAll = sal_False );
SwWriter( SvStream&, SwDoc & );
- SwWriter( SvStream&, SwPaM &, BOOL bWriteAll = FALSE );
+ SwWriter( SvStream&, SwPaM &, sal_Bool bWriteAll = sal_False );
SwWriter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, SwDoc& );
- SwWriter( SfxMedium&, SwCrsrShell &,BOOL bWriteAll = FALSE );
+ SwWriter( SfxMedium&, SwCrsrShell &,sal_Bool bWriteAll = sal_False );
SwWriter( SfxMedium&, SwDoc & );
};
@@ -575,17 +578,17 @@ public:
typedef Reader* (*FnGetReader)();
typedef void (*FnGetWriter)(const String&, const String& rBaseURL, WriterRef&);
-ULONG SaveOrDelMSVBAStorage( SfxObjectShell&, SotStorage&, BOOL, const String& );
-ULONG GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS );
+sal_uLong SaveOrDelMSVBAStorage( SfxObjectShell&, SotStorage&, sal_Bool, const String& );
+sal_uLong GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS );
struct SwReaderWriterEntry
{
Reader* pReader;
FnGetReader fnGetReader;
FnGetWriter fnGetWriter;
- BOOL bDelReader;
+ sal_Bool bDelReader;
- SwReaderWriterEntry( const FnGetReader fnReader, const FnGetWriter fnWriter, BOOL bDel )
+ SwReaderWriterEntry( const FnGetReader fnReader, const FnGetWriter fnWriter, sal_Bool bDel )
: pReader( NULL ), fnGetReader( fnReader ), fnGetWriter( fnWriter ), bDelReader( bDel )
{}
diff --git a/sw/inc/shellres.hxx b/sw/inc/shellres.hxx
index 1589fff584d4..4af688fd89f0 100644
--- a/sw/inc/shellres.hxx
+++ b/sw/inc/shellres.hxx
@@ -94,7 +94,7 @@ struct SW_DLLPUBLIC ShellResource : public Resource
// returns for the specific filter the new names of pagedescs
// This method is for the old code of the specific filters with
// now localized names
- String GetPageDescName( USHORT nNo, PageNameMode eMode );
+ String GetPageDescName( sal_uInt16 nNo, PageNameMode eMode );
ShellResource();
~ShellResource();
diff --git a/sw/inc/sortopt.hxx b/sw/inc/sortopt.hxx
index 5355f9dccaaf..128ba771881b 100644
--- a/sw/inc/sortopt.hxx
+++ b/sw/inc/sortopt.hxx
@@ -42,13 +42,13 @@ enum SwSortDirection { SRT_COLUMNS, SRT_ROWS };
struct SW_DLLPUBLIC SwSortKey
{
SwSortKey();
- SwSortKey( USHORT nId, const String& rSrtType, SwSortOrder eOrder );
+ SwSortKey( sal_uInt16 nId, const String& rSrtType, SwSortOrder eOrder );
SwSortKey( const SwSortKey& rOld );
String sSortType;
SwSortOrder eSortOrder;
- USHORT nColumnId;
- BOOL bIsNumeric;
+ sal_uInt16 nColumnId;
+ sal_Bool bIsNumeric;
};
SV_DECL_PTRARR(SwSortKeys, SwSortKey*, 3, 1)
@@ -62,9 +62,9 @@ struct SW_DLLPUBLIC SwSortOptions
SwSortKeys aKeys;
SwSortDirection eDirection;
sal_Unicode cDeli;
- USHORT nLanguage;
- BOOL bTable;
- BOOL bIgnoreCase;
+ sal_uInt16 nLanguage;
+ sal_Bool bTable;
+ sal_Bool bIgnoreCase;
};
#endif // _SORTOPT_HXX
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 4ca28425849a..d5219da395ba 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -116,17 +116,17 @@ class AbstractFldInputDlg : public VclAbstractDialog //add for SwFldInputDlg
public:
//from class SalFrame
virtual void SetWindowState( const ByteString& rStr ) = 0;
- virtual ByteString GetWindowState( ULONG nMask = WINDOWSTATE_MASK_ALL ) const = 0;
+ virtual ByteString GetWindowState( sal_uLong nMask = WINDOWSTATE_MASK_ALL ) const = 0;
};
class AbstractInsFootNoteDlg : public VclAbstractDialog //add for SwInsFootNoteDlg
{
public:
virtual String GetFontName() = 0;
- virtual BOOL IsEndNote() = 0;
+ virtual sal_Bool IsEndNote() = 0;
virtual String GetStr() = 0;
//from class Window
- virtual void SetHelpId( ULONG nHelpId ) = 0;
+ virtual void SetHelpId( const rtl::OString& sHelpId ) = 0;
virtual void SetText( const XubString& rStr ) = 0;
};
@@ -134,14 +134,14 @@ class AbstractInsertGrfRulerDlg : public VclAbstractDialog //add for SwInsertGr
{
public:
virtual String GetGraphicName() = 0;
- virtual BOOL IsSimpleLine() = 0;
- virtual BOOL HasImages() const = 0;
+ virtual sal_Bool IsSimpleLine() = 0;
+ virtual sal_Bool HasImages() const = 0;
};
class AbstractInsTableDlg : public VclAbstractDialog //add for SwInsTableDlg
{
public:
- virtual void GetValues( String& rName, USHORT& rRow, USHORT& rCol,
+ virtual void GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol,
SwInsertTableOptions& rInsTblFlags, String& rTableAutoFmtName,
SwTableAutoFmt *& prTAFmt ) = 0;
};
@@ -151,15 +151,15 @@ class AbstractJavaEditDialog : public VclAbstractDialog //add for SwJavaEditDia
public:
virtual String GetText() = 0;
virtual String GetType() = 0;
- virtual BOOL IsUrl() = 0;
- virtual BOOL IsNew() = 0;
- virtual BOOL IsUpdate() = 0;
+ virtual sal_Bool IsUrl() = 0;
+ virtual sal_Bool IsNew() = 0;
+ virtual sal_Bool IsUpdate() = 0;
};
class AbstractMailMergeDlg : public VclAbstractDialog //add for SwMailMergeDlg
{
public:
- virtual USHORT GetMergeType() = 0;
+ virtual sal_uInt16 GetMergeType() = 0;
virtual const ::rtl::OUString& GetSaveFilter() const = 0;
virtual const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const = 0;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const = 0;
@@ -167,12 +167,12 @@ public:
class AbstractMailMergeCreateFromDlg : public VclAbstractDialog //add for SwMailMergeCreateFromDlg
{
public:
- virtual BOOL IsThisDocument() const = 0;
+ virtual sal_Bool IsThisDocument() const = 0;
};
class AbstractMailMergeFieldConnectionsDlg : public VclAbstractDialog //add for SwMailMergeFieldConnectionsDlg
{
public:
- virtual BOOL IsUseExistingConnections() const = 0;
+ virtual sal_Bool IsUseExistingConnections() const = 0;
};
class AbstractMultiTOXTabDialog : public VclAbstractDialog //add for SwMultiTOXTabDialog
@@ -205,8 +205,8 @@ public:
class AbstractSwInsertAbstractDlg : public VclAbstractDialog // add for SwInsertAbstractDlg
{
public:
- virtual BYTE GetLevel() const = 0;
- virtual BYTE GetPara() const = 0;
+ virtual sal_uInt8 GetLevel() const = 0;
+ virtual sal_uInt8 GetPara() const = 0;
};
class AbstractSwAsciiFilterDlg : public VclAbstractDialog // add for SwAsciiFilterDlg
@@ -220,8 +220,8 @@ class AbstractSwBreakDlg : public VclAbstractDialog // add for SwBreakDlg
{
public:
virtual String GetTemplateName() = 0;
- virtual USHORT GetKind() = 0;
- virtual USHORT GetPageNumber() = 0;
+ virtual sal_uInt16 GetKind() = 0;
+ virtual sal_uInt16 GetPageNumber() = 0;
};
@@ -252,7 +252,7 @@ public:
class AbstractDropDownFieldDialog : public VclAbstractDialog //add for DropDownFieldDialog
{
public:
- virtual ByteString GetWindowState( ULONG nMask = WINDOWSTATE_MASK_ALL ) const = 0; //this method inherit from SystemWindow
+ virtual ByteString GetWindowState( sal_uLong nMask = WINDOWSTATE_MASK_ALL ) const = 0; //this method inherit from SystemWindow
virtual void SetWindowState( const ByteString& rStr ) =0;//this method inherit from SystemWindow
};
@@ -267,15 +267,15 @@ class AbstractSwSelGlossaryDlg : public VclAbstractDialog //add for SwSelGlossar
{
public:
virtual void InsertGlos(const String &rRegion, const String &rGlosName) = 0; // inline
- virtual USHORT GetSelectedIdx() const = 0; // inline
- virtual void SelectEntryPos(USHORT nIdx) = 0; // inline
+ virtual sal_uInt16 GetSelectedIdx() const = 0; // inline
+ virtual void SelectEntryPos(sal_uInt16 nIdx) = 0; // inline
};
class AbstractSwSplitTableDlg :public VclAbstractDialog //add for SwSplitTableDlg
{
public:
- virtual BOOL IsHorizontal() const = 0;
- virtual BOOL IsProportional() const = 0;
+ virtual sal_Bool IsHorizontal() const = 0;
+ virtual sal_Bool IsProportional() const = 0;
virtual long GetCount() const = 0;
};
@@ -288,11 +288,11 @@ public:
class AbstractSwFldDlg : public SfxAbstractTabDialog //add for SwFldDlg
{
public:
- virtual void Start( BOOL bShow = TRUE ) = 0; //this method from sfxtabdialog
+ virtual void Start( sal_Bool bShow = sal_True ) = 0; //this method from sfxtabdialog
virtual void Initialize(SfxChildWinInfo *pInfo) = 0;
virtual void ReInitDlg() = 0;
virtual void ActivateDatabasePage() = 0;
- virtual void ShowPage( USHORT nId ) = 0;// this method from SfxTabDialog
+ virtual void ShowPage( sal_uInt16 nId ) = 0;// this method from SfxTabDialog
virtual Window * GetWindow() = 0; //this method is added for return a Window type pointer
};
@@ -308,7 +308,7 @@ public:
class AbstractSwModalRedlineAcceptDlg : public VclAbstractDialog //add for SwModalRedlineAcceptDlg
{
public:
- virtual void AcceptAll( BOOL bAccept ) = 0;
+ virtual void AcceptAll( sal_Bool bAccept ) = 0;
};
class AbstractMarkFloatDlg : public VclAbstractDialog //add for SwIndexMarkFloatDlg & SwAuthMarkFloatDlg
@@ -332,7 +332,7 @@ class AbstractMailMergeWizard : public VclAbstractDialog2
public:
virtual void SetReloadDocument(const String& rURL) = 0;
virtual const String& GetReloadDocument() const = 0;
- virtual BOOL ShowPage( USHORT nLevel ) = 0;
+ virtual sal_Bool ShowPage( sal_uInt16 nLevel ) = 0;
virtual sal_uInt16 GetRestartPage() const = 0;
};
@@ -357,7 +357,7 @@ public:
virtual AbstractSwBreakDlg * CreateSwBreakDlg( Window *pParent, SwWrtShell &rSh,int nResId ) = 0; // add for SwBreakDlg
virtual VclAbstractDialog * CreateSwChangeDBDlg( SwView& rVw, int nResId ) = 0; //add for SwChangeDBDlg
virtual SfxAbstractTabDialog * CreateSwCharDlg( Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, int nResId, // add for SwCharDlg
- const String* pFmtStr = 0, BOOL bIsDrwTxtDlg = FALSE) = 0;
+ const String* pFmtStr = 0, sal_Bool bIsDrwTxtDlg = sal_False) = 0;
virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg ( SwView& rView , int nResId, bool bToTable) = 0; //add for SwConvertTableDlg
virtual VclAbstractDialog * CreateSwCaptionDialog ( Window *pParent, SwView &rV,int nResId) = 0; //add for SwCaptionDialog
@@ -368,23 +368,23 @@ public:
virtual SfxAbstractTabDialog * CreateSwFootNoteOptionDlg( Window *pParent, SwWrtShell &rSh,int nResId) = 0;//add for SwFootNoteOptionDlg
virtual AbstractDropDownFieldDialog * CreateDropDownFieldDialog ( Window *pParent, SwWrtShell &rSh, //add for DropDownFieldDialog
- SwField* pField,int nResId, BOOL bNextButton = FALSE ) = 0;
- virtual SfxAbstractTabDialog* CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, BOOL bInsert,int nResId ) = 0; //add for SwEnvDlg
+ SwField* pField,int nResId, sal_Bool bNextButton = sal_False ) = 0;
+ virtual SfxAbstractTabDialog* CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert,int nResId ) = 0; //add for SwEnvDlg
virtual AbstractSwLabDlg* CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg
- SwNewDBMgr* pNewDBMgr, BOOL bLabel,int nResId ) = 0;
+ SwNewDBMgr* pNewDBMgr, sal_Bool bLabel,int nResId ) = 0;
virtual SwLabDlgMethod GetSwLabDlgStaticMethod () =0;//add for SwLabDlg
virtual SfxAbstractTabDialog* CreateSwParaDlg ( Window *pParent, //add for SwParaDlg
SwView& rVw,
const SfxItemSet& rCoreSet,
- BYTE nDialogMode,
+ sal_uInt8 nDialogMode,
int nResId,
const String *pCollName = 0,
- BOOL bDraw = FALSE,
- UINT16 nDefPage = 0) = 0;
+ sal_Bool bDraw = sal_False,
+ sal_uInt16 nDefPage = 0) = 0;
virtual AbstractSwSelGlossaryDlg * CreateSwSelGlossaryDlg ( Window * pParent, const String &rShortName, int nResId ) = 0; //add for SwSelGlossaryDlg
@@ -393,10 +393,10 @@ public:
virtual AbstractSwAutoFormatDlg * CreateSwAutoFormatDlg( Window* pParent, SwWrtShell* pShell, //add for SwAutoFormatDlg
int nResId,
- BOOL bSetAutoFmt = TRUE,
+ sal_Bool bSetAutoFmt = sal_True,
const SwTableAutoFmt* pSelFmt = 0 ) = 0;
- virtual SfxAbstractDialog * CreateSwBorderDlg ( Window* pParent, SfxItemSet& rSet, USHORT nType, int nResId ) = 0;//add for SwBorderDlg
- virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode, int nResId ) = 0; //add for SwWrapDlg
+ virtual SfxAbstractDialog * CreateSwBorderDlg ( Window* pParent, SfxItemSet& rSet, sal_uInt16 nType, int nResId ) = 0;//add for SwBorderDlg
+ virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode, int nResId ) = 0; //add for SwWrapDlg
virtual VclAbstractDialog * CreateSwTableWidthDlg ( Window *pParent, SwTableFUNC &rFnc , int nResId ) = 0; //add for SwTableWidthDlg
virtual SfxAbstractTabDialog* CreateSwTableTabDlg( Window* pParent, SfxItemPool& Pool,
@@ -409,34 +409,34 @@ public:
STAR_REFERENCE( container::XNameAccess ) & xNameAccess, int nResId ) = 0;
virtual AbstractSwModalRedlineAcceptDlg * CreateSwModalRedlineAcceptDlg ( Window *pParent, int nResId ) = 0; //add for SwModalRedlineAcceptDlg
- virtual VclAbstractDialog* CreateSwVclDialog( int nResId, Window* pParent, BOOL& rWithPrev ) = 0; //add for SwMergeTblDlg
+ virtual VclAbstractDialog* CreateSwVclDialog( int nResId, Window* pParent, sal_Bool& rWithPrev ) = 0; //add for SwMergeTblDlg
virtual SfxAbstractTabDialog* CreateFrmTabDialog( int nResId,
SfxViewFrame *pFrame, Window *pParent,
const SfxItemSet& rCoreSet,
- BOOL bNewFrm = TRUE,
- USHORT nResType = DLG_FRM_STD,
- BOOL bFmt = FALSE,
- UINT16 nDefPage = 0,
+ sal_Bool bNewFrm = sal_True,
+ sal_uInt16 nResType = DLG_FRM_STD,
+ sal_Bool bFmt = sal_False,
+ sal_uInt16 nDefPage = 0,
const String* pFmtStr = 0) = 0; //add for SwFrmDlg
virtual SfxAbstractTabDialog* CreateTemplateDialog( int nResId,
Window* pParent,
SfxStyleSheetBase& rBase,
- USHORT nRegion,
- BOOL bColumn = FALSE,
+ sal_uInt16 nRegion,
+ sal_Bool bColumn = sal_False,
SwWrtShell* pActShell = 0,
- BOOL bNew = FALSE ) = 0; //add for SwTemplateDlg
+ sal_Bool bNew = sal_False ) = 0; //add for SwTemplateDlg
virtual AbstractGlossaryDlg* CreateGlossaryDlg( int nResId,
SfxViewFrame* pViewFrame,
SwGlossaryHdl* pGlosHdl,
SwWrtShell *pWrtShell) = 0; //add for SwGlossaryDlg
virtual AbstractFldInputDlg* CreateFldInputDlg( int nResId,
Window *pParent, SwWrtShell &rSh,
- SwField* pField, BOOL bNextButton = FALSE ) = 0; //add for SwFldInputDlg
+ SwField* pField, sal_Bool bNextButton = sal_False ) = 0; //add for SwFldInputDlg
virtual AbstractInsFootNoteDlg* CreateInsFootNoteDlg( int nResId,
- Window * pParent, SwWrtShell &rSh, BOOL bEd = FALSE) = 0; //add for SwInsFootNoteDlg
+ Window * pParent, SwWrtShell &rSh, sal_Bool bEd = sal_False) = 0; //add for SwInsFootNoteDlg
virtual VclAbstractDialog* CreateTitlePageDlg ( Window * pParent ) = 0;
virtual VclAbstractDialog * CreateVclSwViewDialog( int nResId,
- SwView& rView, BOOL bCol = FALSE ) = 0; //add for SwInsRowColDlg, SwLineNumberingDlg
+ SwView& rView, sal_Bool bCol = sal_False ) = 0; //add for SwInsRowColDlg, SwLineNumberingDlg
virtual AbstractInsertGrfRulerDlg* CreateInsertGrfRulerDlg( int nResId,
Window * pParent ) = 0; //add for SwInsertGrfRulerDlg
virtual AbstractInsTableDlg* CreateInsTableDlg( int nResId,
@@ -463,8 +463,8 @@ public:
virtual AbstractMultiTOXTabDialog* CreateMultiTOXTabDialog( int nResId,
Window* pParent, const SfxItemSet& rSet,
SwWrtShell &rShell,
- SwTOXBase* pCurTOX, USHORT nToxType = USHRT_MAX,
- BOOL bGlobal = FALSE) = 0; //add for SwMultiTOXTabDialog
+ SwTOXBase* pCurTOX, sal_uInt16 nToxType = USHRT_MAX,
+ sal_Bool bGlobal = sal_False) = 0; //add for SwMultiTOXTabDialog
virtual AbstractEditRegionDlg* CreateEditRegionDlg( int nResId,
Window* pParent, SwWrtShell& rWrtSh ) = 0; //add for SwEditRegionDlg
virtual AbstractInsertSectionTabDialog* CreateInsertSectionTabDialog( int nResId,
@@ -487,13 +487,13 @@ public:
virtual AbstractMailMergeWizard* CreateMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rConfigItem) = 0;
//add for static func in SwGlossaryDlg
- virtual GlossaryGetCurrGroup GetGlossaryCurrGroupFunc( USHORT nId ) = 0;
- virtual GlossarySetActGroup SetGlossaryActGroupFunc( USHORT nId ) = 0;
+ virtual GlossaryGetCurrGroup GetGlossaryCurrGroupFunc( sal_uInt16 nId ) = 0;
+ virtual GlossarySetActGroup SetGlossaryActGroupFunc( sal_uInt16 nId ) = 0;
// for tabpage
- virtual CreateTabPage GetTabPageCreatorFunc( USHORT nId ) = 0;
- virtual GetTabPageRanges GetTabPageRangesFunc( USHORT nId ) = 0;
+ virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ) = 0;
+ virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId ) = 0;
};
-#endif
+#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swacorr.hxx b/sw/inc/swacorr.hxx
index a3b29bfc39e6..f3086864ae7c 100644
--- a/sw/inc/swacorr.hxx
+++ b/sw/inc/swacorr.hxx
@@ -41,11 +41,11 @@ protected:
// - return den Ersetzungstext (nur fuer SWG-Format, alle anderen
// koennen aus der Wortliste herausgeholt werden!)
// rShort ist der Stream-Name - gecryptet!
- virtual BOOL GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& , const String& rFileName, const String& rShort, String& rLong );
+ virtual sal_Bool GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& , const String& rFileName, const String& rShort, String& rLong );
// - Text mit Attributierung (kann nur der SWG - SWG-Format!)
// rShort ist der Stream-Name - gecryptet!
- virtual BOOL PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String& rFileName, const String& rShort, SfxObjectShell& ,
+ virtual sal_Bool PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String& rFileName, const String& rShort, SfxObjectShell& ,
String& );
public:
diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx
index 6544f2623bba..3bce308ee1d4 100644
--- a/sw/inc/swatrset.hxx
+++ b/sw/inc/swatrset.hxx
@@ -145,14 +145,14 @@ class SwAttrPool : public SfxItemPool
{
friend void _InitCore(); // fuers anlegen/zerstoeren der
friend void _FinitCore(); // Versionsmaps
- static USHORT* pVersionMap1;
- static USHORT* pVersionMap2;
- static USHORT* pVersionMap3;
- static USHORT* pVersionMap4;
+ static sal_uInt16* pVersionMap1;
+ static sal_uInt16* pVersionMap2;
+ static sal_uInt16* pVersionMap3;
+ static sal_uInt16* pVersionMap4;
// due to extension of attribute set a new version
// map for binary filter is necessary (version map 5).
- static USHORT* pVersionMap5;
- static USHORT* pVersionMap6;
+ static sal_uInt16* pVersionMap5;
+ static sal_uInt16* pVersionMap6;
SwDoc* pDoc;
@@ -165,10 +165,10 @@ public:
SwDoc* GetDoc() { return pDoc; }
const SwDoc* GetDoc() const { return pDoc; }
- static USHORT* GetVersionMap1() { return pVersionMap1; }
- static USHORT* GetVersionMap2() { return pVersionMap2; }
- static USHORT* GetVersionMap3() { return pVersionMap3; }
- static USHORT* GetVersionMap6() { return pVersionMap4; }
+ static sal_uInt16* GetVersionMap1() { return pVersionMap1; }
+ static sal_uInt16* GetVersionMap2() { return pVersionMap2; }
+ static sal_uInt16* GetVersionMap3() { return pVersionMap3; }
+ static sal_uInt16* GetVersionMap6() { return pVersionMap4; }
};
@@ -182,18 +182,18 @@ class SW_DLLPUBLIC SwAttrSet : public SfxItemSet
void PutChgd( const SfxPoolItem& rI ) { SfxItemSet::PutDirect( rI ); }
public:
- SwAttrSet( SwAttrPool&, USHORT nWhich1, USHORT nWhich2 );
- SwAttrSet( SwAttrPool&, const USHORT* nWhichPairTable );
+ SwAttrSet( SwAttrPool&, sal_uInt16 nWhich1, sal_uInt16 nWhich2 );
+ SwAttrSet( SwAttrPool&, const sal_uInt16* nWhichPairTable );
SwAttrSet( const SwAttrSet& );
- virtual SfxItemSet* Clone(BOOL bItems = TRUE, SfxItemPool *pToPool = 0) const;
+ virtual SfxItemSet* Clone(sal_Bool bItems = sal_True, SfxItemPool *pToPool = 0) const;
int Put_BC( const SfxPoolItem& rAttr, SwAttrSet* pOld, SwAttrSet* pNew );
int Put_BC( const SfxItemSet& rSet, SwAttrSet* pOld, SwAttrSet* pNew );
// ein Item oder einen Bereich loeschen
- USHORT ClearItem_BC( USHORT nWhich, SwAttrSet* pOld, SwAttrSet* pNew );
- USHORT ClearItem_BC( USHORT nWhich1, USHORT nWhich2,
+ sal_uInt16 ClearItem_BC( sal_uInt16 nWhich, SwAttrSet* pOld, SwAttrSet* pNew );
+ sal_uInt16 ClearItem_BC( sal_uInt16 nWhich1, sal_uInt16 nWhich2,
SwAttrSet* pOld = 0, SwAttrSet* pNew = 0 );
int Intersect_BC( const SfxItemSet& rSet, SwAttrSet* pOld, SwAttrSet* pNew );
@@ -220,124 +220,124 @@ public:
const SwDoc *GetDoc() const { return GetPool()->GetDoc(); }
SwDoc *GetDoc() { return GetPool()->GetDoc(); }
- // GetMethoden: das Bool gibt an, ob nur im Set (FALSE) oder auch in
+ // GetMethoden: das Bool gibt an, ob nur im Set (sal_False) oder auch in
// den Parents gesucht werden soll. Wird nichts gefunden,
// wird das deflt. Attribut returnt.
// Charakter-Attribute - impl. steht im charatr.hxx
- inline const SvxPostureItem &GetPosture( BOOL = TRUE ) const;
- inline const SvxWeightItem &GetWeight( BOOL = TRUE ) const;
- inline const SvxShadowedItem &GetShadowed( BOOL = TRUE ) const;
- inline const SvxAutoKernItem &GetAutoKern( BOOL = TRUE ) const;
- inline const SvxWordLineModeItem &GetWordLineMode( BOOL = TRUE ) const;
- inline const SvxContourItem &GetContour( BOOL = TRUE ) const;
- inline const SvxKerningItem &GetKerning( BOOL = TRUE ) const;
- inline const SvxUnderlineItem &GetUnderline( BOOL = TRUE ) const;
- inline const SvxOverlineItem &GetOverline( BOOL = TRUE ) const;
- inline const SvxCrossedOutItem &GetCrossedOut( BOOL = TRUE ) const;
- inline const SvxFontHeightItem &GetSize( BOOL = TRUE ) const;
- inline const SvxPropSizeItem &GetPropSize( BOOL = TRUE ) const;
- inline const SvxFontItem &GetFont( BOOL = TRUE ) const;
- inline const SvxColorItem &GetColor( BOOL = TRUE ) const;
- inline const SvxCharSetColorItem &GetCharSetColor( BOOL = TRUE ) const;
- inline const SvxLanguageItem &GetLanguage( BOOL = TRUE ) const;
- inline const SvxEscapementItem &GetEscapement( BOOL = TRUE ) const;
- inline const SvxCaseMapItem &GetCaseMap( BOOL = TRUE ) const;
- inline const SvxNoHyphenItem &GetNoHyphenHere( BOOL = TRUE ) const;
- inline const SvxBlinkItem &GetBlink( BOOL = TRUE ) const;
- inline const SvxBrushItem &GetChrBackground( BOOL = TRUE ) const;
- inline const SvxFontItem &GetCJKFont( BOOL = TRUE ) const;
- inline const SvxFontHeightItem &GetCJKSize( BOOL = TRUE ) const;
- inline const SvxLanguageItem &GetCJKLanguage( BOOL = TRUE ) const;
- inline const SvxPostureItem &GetCJKPosture( BOOL = TRUE ) const;
- inline const SvxWeightItem &GetCJKWeight( BOOL = TRUE ) const;
- inline const SvxFontItem &GetCTLFont( BOOL = TRUE ) const;
- inline const SvxFontHeightItem &GetCTLSize( BOOL = TRUE ) const;
- inline const SvxLanguageItem &GetCTLLanguage( BOOL = TRUE ) const;
- inline const SvxPostureItem &GetCTLPosture( BOOL = TRUE ) const;
- inline const SvxWeightItem &GetCTLWeight( BOOL = TRUE ) const;
- inline const SfxBoolItem &GetWritingDirection( BOOL = TRUE ) const;
- inline const SvxEmphasisMarkItem &GetEmphasisMark( BOOL = TRUE ) const;
- inline const SvxTwoLinesItem &Get2Lines( BOOL = TRUE ) const;
- inline const SvxCharScaleWidthItem &GetCharScaleW( BOOL = TRUE ) const;
- inline const SvxCharRotateItem &GetCharRotate( BOOL = TRUE ) const;
- inline const SvxCharReliefItem &GetCharRelief( BOOL = TRUE ) const;
- inline const SvxCharHiddenItem &GetCharHidden( BOOL = TRUE ) const;
+ inline const SvxPostureItem &GetPosture( sal_Bool = sal_True ) const;
+ inline const SvxWeightItem &GetWeight( sal_Bool = sal_True ) const;
+ inline const SvxShadowedItem &GetShadowed( sal_Bool = sal_True ) const;
+ inline const SvxAutoKernItem &GetAutoKern( sal_Bool = sal_True ) const;
+ inline const SvxWordLineModeItem &GetWordLineMode( sal_Bool = sal_True ) const;
+ inline const SvxContourItem &GetContour( sal_Bool = sal_True ) const;
+ inline const SvxKerningItem &GetKerning( sal_Bool = sal_True ) const;
+ inline const SvxUnderlineItem &GetUnderline( sal_Bool = sal_True ) const;
+ inline const SvxOverlineItem &GetOverline( sal_Bool = sal_True ) const;
+ inline const SvxCrossedOutItem &GetCrossedOut( sal_Bool = sal_True ) const;
+ inline const SvxFontHeightItem &GetSize( sal_Bool = sal_True ) const;
+ inline const SvxPropSizeItem &GetPropSize( sal_Bool = sal_True ) const;
+ inline const SvxFontItem &GetFont( sal_Bool = sal_True ) const;
+ inline const SvxColorItem &GetColor( sal_Bool = sal_True ) const;
+ inline const SvxCharSetColorItem &GetCharSetColor( sal_Bool = sal_True ) const;
+ inline const SvxLanguageItem &GetLanguage( sal_Bool = sal_True ) const;
+ inline const SvxEscapementItem &GetEscapement( sal_Bool = sal_True ) const;
+ inline const SvxCaseMapItem &GetCaseMap( sal_Bool = sal_True ) const;
+ inline const SvxNoHyphenItem &GetNoHyphenHere( sal_Bool = sal_True ) const;
+ inline const SvxBlinkItem &GetBlink( sal_Bool = sal_True ) const;
+ inline const SvxBrushItem &GetChrBackground( sal_Bool = sal_True ) const;
+ inline const SvxFontItem &GetCJKFont( sal_Bool = sal_True ) const;
+ inline const SvxFontHeightItem &GetCJKSize( sal_Bool = sal_True ) const;
+ inline const SvxLanguageItem &GetCJKLanguage( sal_Bool = sal_True ) const;
+ inline const SvxPostureItem &GetCJKPosture( sal_Bool = sal_True ) const;
+ inline const SvxWeightItem &GetCJKWeight( sal_Bool = sal_True ) const;
+ inline const SvxFontItem &GetCTLFont( sal_Bool = sal_True ) const;
+ inline const SvxFontHeightItem &GetCTLSize( sal_Bool = sal_True ) const;
+ inline const SvxLanguageItem &GetCTLLanguage( sal_Bool = sal_True ) const;
+ inline const SvxPostureItem &GetCTLPosture( sal_Bool = sal_True ) const;
+ inline const SvxWeightItem &GetCTLWeight( sal_Bool = sal_True ) const;
+ inline const SfxBoolItem &GetWritingDirection( sal_Bool = sal_True ) const;
+ inline const SvxEmphasisMarkItem &GetEmphasisMark( sal_Bool = sal_True ) const;
+ inline const SvxTwoLinesItem &Get2Lines( sal_Bool = sal_True ) const;
+ inline const SvxCharScaleWidthItem &GetCharScaleW( sal_Bool = sal_True ) const;
+ inline const SvxCharRotateItem &GetCharRotate( sal_Bool = sal_True ) const;
+ inline const SvxCharReliefItem &GetCharRelief( sal_Bool = sal_True ) const;
+ inline const SvxCharHiddenItem &GetCharHidden( sal_Bool = sal_True ) const;
// Frame-Attribute - impl. steht im frmatr.hxx
- inline const SwFmtFillOrder &GetFillOrder( BOOL = TRUE ) const;
- inline const SwFmtFrmSize &GetFrmSize( BOOL = TRUE ) const;
- inline const SvxPaperBinItem &GetPaperBin( BOOL = TRUE ) const;
- inline const SvxLRSpaceItem &GetLRSpace( BOOL = TRUE ) const;
- inline const SvxULSpaceItem &GetULSpace( BOOL = TRUE ) const;
- inline const SwFmtCntnt &GetCntnt( BOOL = TRUE ) const;
- inline const SwFmtHeader &GetHeader( BOOL = TRUE ) const;
- inline const SwFmtFooter &GetFooter( BOOL = TRUE ) const;
- inline const SvxPrintItem &GetPrint( BOOL = TRUE ) const;
- inline const SvxOpaqueItem &GetOpaque( BOOL = TRUE ) const;
- inline const SvxProtectItem &GetProtect( BOOL = TRUE ) const;
- inline const SwFmtSurround &GetSurround( BOOL = TRUE ) const;
- inline const SwFmtVertOrient &GetVertOrient( BOOL = TRUE ) const;
- inline const SwFmtHoriOrient &GetHoriOrient( BOOL = TRUE ) const;
- inline const SwFmtAnchor &GetAnchor( BOOL = TRUE ) const;
- inline const SvxBoxItem &GetBox( BOOL = TRUE ) const;
- inline const SvxFmtKeepItem &GetKeep( BOOL = TRUE ) const;
- inline const SvxBrushItem &GetBackground( BOOL = TRUE ) const;
- inline const SvxShadowItem &GetShadow( BOOL = TRUE ) const;
- inline const SwFmtPageDesc &GetPageDesc( BOOL = TRUE ) const;
- inline const SvxFmtBreakItem &GetBreak( BOOL = TRUE ) const;
- inline const SwFmtCol &GetCol( BOOL = TRUE ) const;
- inline const SvxMacroItem &GetMacro( BOOL = TRUE ) const;
- inline const SwFmtURL &GetURL( BOOL = TRUE ) const;
- inline const SwFmtEditInReadonly &GetEditInReadonly( BOOL = TRUE ) const;
- inline const SwFmtLayoutSplit &GetLayoutSplit( BOOL = TRUE ) const;
- inline const SwFmtRowSplit &GetRowSplit( BOOL = TRUE ) const;
- inline const SwFmtChain &GetChain( BOOL = TRUE ) const;
- inline const SwFmtLineNumber &GetLineNumber( BOOL = TRUE ) const;
- inline const SwFmtFtnAtTxtEnd &GetFtnAtTxtEnd( BOOL = TRUE ) const;
- inline const SwFmtEndAtTxtEnd &GetEndAtTxtEnd( BOOL = TRUE ) const;
- inline const SwFmtNoBalancedColumns &GetBalancedColumns( BOOL = TRUE ) const;
- inline const SvxFrameDirectionItem &GetFrmDir( BOOL = TRUE ) const;
- inline const SwTextGridItem &GetTextGrid( BOOL = TRUE ) const;
- inline const SwHeaderAndFooterEatSpacingItem &GetHeaderAndFooterEatSpacing( BOOL = TRUE ) const;
- inline const SwFmtFollowTextFlow &GetFollowTextFlow(BOOL = TRUE) const;
- inline const SwFmtWrapInfluenceOnObjPos& GetWrapInfluenceOnObjPos(BOOL = TRUE) const;
+ inline const SwFmtFillOrder &GetFillOrder( sal_Bool = sal_True ) const;
+ inline const SwFmtFrmSize &GetFrmSize( sal_Bool = sal_True ) const;
+ inline const SvxPaperBinItem &GetPaperBin( sal_Bool = sal_True ) const;
+ inline const SvxLRSpaceItem &GetLRSpace( sal_Bool = sal_True ) const;
+ inline const SvxULSpaceItem &GetULSpace( sal_Bool = sal_True ) const;
+ inline const SwFmtCntnt &GetCntnt( sal_Bool = sal_True ) const;
+ inline const SwFmtHeader &GetHeader( sal_Bool = sal_True ) const;
+ inline const SwFmtFooter &GetFooter( sal_Bool = sal_True ) const;
+ inline const SvxPrintItem &GetPrint( sal_Bool = sal_True ) const;
+ inline const SvxOpaqueItem &GetOpaque( sal_Bool = sal_True ) const;
+ inline const SvxProtectItem &GetProtect( sal_Bool = sal_True ) const;
+ inline const SwFmtSurround &GetSurround( sal_Bool = sal_True ) const;
+ inline const SwFmtVertOrient &GetVertOrient( sal_Bool = sal_True ) const;
+ inline const SwFmtHoriOrient &GetHoriOrient( sal_Bool = sal_True ) const;
+ inline const SwFmtAnchor &GetAnchor( sal_Bool = sal_True ) const;
+ inline const SvxBoxItem &GetBox( sal_Bool = sal_True ) const;
+ inline const SvxFmtKeepItem &GetKeep( sal_Bool = sal_True ) const;
+ inline const SvxBrushItem &GetBackground( sal_Bool = sal_True ) const;
+ inline const SvxShadowItem &GetShadow( sal_Bool = sal_True ) const;
+ inline const SwFmtPageDesc &GetPageDesc( sal_Bool = sal_True ) const;
+ inline const SvxFmtBreakItem &GetBreak( sal_Bool = sal_True ) const;
+ inline const SwFmtCol &GetCol( sal_Bool = sal_True ) const;
+ inline const SvxMacroItem &GetMacro( sal_Bool = sal_True ) const;
+ inline const SwFmtURL &GetURL( sal_Bool = sal_True ) const;
+ inline const SwFmtEditInReadonly &GetEditInReadonly( sal_Bool = sal_True ) const;
+ inline const SwFmtLayoutSplit &GetLayoutSplit( sal_Bool = sal_True ) const;
+ inline const SwFmtRowSplit &GetRowSplit( sal_Bool = sal_True ) const;
+ inline const SwFmtChain &GetChain( sal_Bool = sal_True ) const;
+ inline const SwFmtLineNumber &GetLineNumber( sal_Bool = sal_True ) const;
+ inline const SwFmtFtnAtTxtEnd &GetFtnAtTxtEnd( sal_Bool = sal_True ) const;
+ inline const SwFmtEndAtTxtEnd &GetEndAtTxtEnd( sal_Bool = sal_True ) const;
+ inline const SwFmtNoBalancedColumns &GetBalancedColumns( sal_Bool = sal_True ) const;
+ inline const SvxFrameDirectionItem &GetFrmDir( sal_Bool = sal_True ) const;
+ inline const SwTextGridItem &GetTextGrid( sal_Bool = sal_True ) const;
+ inline const SwHeaderAndFooterEatSpacingItem &GetHeaderAndFooterEatSpacing( sal_Bool = sal_True ) const;
+ inline const SwFmtFollowTextFlow &GetFollowTextFlow(sal_Bool = sal_True) const;
+ inline const SwFmtWrapInfluenceOnObjPos& GetWrapInfluenceOnObjPos(sal_Bool = sal_True) const;
// Graphic attributes - implementation in grfatr.hxx
- inline const SwMirrorGrf &GetMirrorGrf( BOOL = TRUE ) const;
- inline const SwCropGrf &GetCropGrf( BOOL = TRUE ) const;
- inline const SwRotationGrf &GetRotationGrf(BOOL = TRUE ) const;
- inline const SwLuminanceGrf &GetLuminanceGrf(BOOL = TRUE ) const;
- inline const SwContrastGrf &GetContrastGrf(BOOL = TRUE ) const;
- inline const SwChannelRGrf &GetChannelRGrf(BOOL = TRUE ) const;
- inline const SwChannelGGrf &GetChannelGGrf(BOOL = TRUE ) const;
- inline const SwChannelBGrf &GetChannelBGrf(BOOL = TRUE ) const;
- inline const SwGammaGrf &GetGammaGrf(BOOL = TRUE ) const;
- inline const SwInvertGrf &GetInvertGrf(BOOL = TRUE ) const;
- inline const SwTransparencyGrf &GetTransparencyGrf(BOOL = TRUE ) const;
- inline const SwDrawModeGrf &GetDrawModeGrf(BOOL = TRUE ) const;
+ inline const SwMirrorGrf &GetMirrorGrf( sal_Bool = sal_True ) const;
+ inline const SwCropGrf &GetCropGrf( sal_Bool = sal_True ) const;
+ inline const SwRotationGrf &GetRotationGrf(sal_Bool = sal_True ) const;
+ inline const SwLuminanceGrf &GetLuminanceGrf(sal_Bool = sal_True ) const;
+ inline const SwContrastGrf &GetContrastGrf(sal_Bool = sal_True ) const;
+ inline const SwChannelRGrf &GetChannelRGrf(sal_Bool = sal_True ) const;
+ inline const SwChannelGGrf &GetChannelGGrf(sal_Bool = sal_True ) const;
+ inline const SwChannelBGrf &GetChannelBGrf(sal_Bool = sal_True ) const;
+ inline const SwGammaGrf &GetGammaGrf(sal_Bool = sal_True ) const;
+ inline const SwInvertGrf &GetInvertGrf(sal_Bool = sal_True ) const;
+ inline const SwTransparencyGrf &GetTransparencyGrf(sal_Bool = sal_True ) const;
+ inline const SwDrawModeGrf &GetDrawModeGrf(sal_Bool = sal_True ) const;
// Paragraph attributes - implementation in paratr.hxx
- inline const SvxLineSpacingItem &GetLineSpacing( BOOL = TRUE ) const;
- inline const SvxAdjustItem &GetAdjust( BOOL = TRUE ) const;
- inline const SvxFmtSplitItem &GetSplit( BOOL = TRUE ) const;
- inline const SwRegisterItem &GetRegister( BOOL = TRUE ) const;
- inline const SwNumRuleItem &GetNumRule( BOOL = TRUE ) const;
- inline const SvxWidowsItem &GetWidows( BOOL = TRUE ) const;
- inline const SvxOrphansItem &GetOrphans( BOOL = TRUE ) const;
- inline const SvxTabStopItem &GetTabStops( BOOL = TRUE ) const;
- inline const SvxHyphenZoneItem &GetHyphenZone( BOOL = TRUE ) const;
- inline const SwFmtDrop &GetDrop( BOOL = TRUE ) const;
- inline const SvxScriptSpaceItem &GetScriptSpace(BOOL = TRUE) const;
- inline const SvxHangingPunctuationItem &GetHangingPunctuation(BOOL = TRUE) const;
- inline const SvxForbiddenRuleItem &GetForbiddenRule(BOOL = TRUE) const;
- inline const SvxParaVertAlignItem &GetParaVertAlign(BOOL = TRUE) const;
- inline const SvxParaGridItem &GetParaGrid(BOOL = TRUE) const;
- inline const SwParaConnectBorderItem &GetParaConnectBorder(BOOL = TRUE ) const;
+ inline const SvxLineSpacingItem &GetLineSpacing( sal_Bool = sal_True ) const;
+ inline const SvxAdjustItem &GetAdjust( sal_Bool = sal_True ) const;
+ inline const SvxFmtSplitItem &GetSplit( sal_Bool = sal_True ) const;
+ inline const SwRegisterItem &GetRegister( sal_Bool = sal_True ) const;
+ inline const SwNumRuleItem &GetNumRule( sal_Bool = sal_True ) const;
+ inline const SvxWidowsItem &GetWidows( sal_Bool = sal_True ) const;
+ inline const SvxOrphansItem &GetOrphans( sal_Bool = sal_True ) const;
+ inline const SvxTabStopItem &GetTabStops( sal_Bool = sal_True ) const;
+ inline const SvxHyphenZoneItem &GetHyphenZone( sal_Bool = sal_True ) const;
+ inline const SwFmtDrop &GetDrop( sal_Bool = sal_True ) const;
+ inline const SvxScriptSpaceItem &GetScriptSpace(sal_Bool = sal_True) const;
+ inline const SvxHangingPunctuationItem &GetHangingPunctuation(sal_Bool = sal_True) const;
+ inline const SvxForbiddenRuleItem &GetForbiddenRule(sal_Bool = sal_True) const;
+ inline const SvxParaVertAlignItem &GetParaVertAlign(sal_Bool = sal_True) const;
+ inline const SvxParaGridItem &GetParaGrid(sal_Bool = sal_True) const;
+ inline const SwParaConnectBorderItem &GetParaConnectBorder(sal_Bool = sal_True ) const;
// Tablebox attributes - implementation in cellatr.hxx
- inline const SwTblBoxNumFormat &GetTblBoxNumFmt( BOOL = TRUE ) const;
- inline const SwTblBoxFormula &GetTblBoxFormula( BOOL = TRUE ) const;
- inline const SwTblBoxValue &GetTblBoxValue( BOOL = TRUE ) const;
+ inline const SwTblBoxNumFormat &GetTblBoxNumFmt( sal_Bool = sal_True ) const;
+ inline const SwTblBoxFormula &GetTblBoxFormula( sal_Bool = sal_True ) const;
+ inline const SwTblBoxValue &GetTblBoxValue( sal_Bool = sal_True ) const;
DECL_FIXEDMEMPOOL_NEWDEL(SwAttrSet)
};
diff --git a/sw/inc/swbaslnk.hxx b/sw/inc/swbaslnk.hxx
index b3d5258863ee..b558aa19ca9f 100644
--- a/sw/inc/swbaslnk.hxx
+++ b/sw/inc/swbaslnk.hxx
@@ -40,27 +40,27 @@ class SwBaseLink : public ::sfx2::SvBaseLink
friend long GrfNodeChanged( void* pLink, void* pCaller );
SwCntntNode* pCntntNode;
- BOOL bSwapIn : 1;
- BOOL bNoDataFlag : 1;
- BOOL bIgnoreDataChanged : 1;
+ sal_Bool bSwapIn : 1;
+ sal_Bool bNoDataFlag : 1;
+ sal_Bool bIgnoreDataChanged : 1;
ReReadThread* m_pReReadThread;
protected:
SwBaseLink(): m_pReReadThread(0) {}
- SwBaseLink( const String& rNm, USHORT nObjectType, ::sfx2::SvLinkSource* pObj,
+ SwBaseLink( const String& rNm, sal_uInt16 nObjectType, ::sfx2::SvLinkSource* pObj,
SwCntntNode* pNode = 0 )
: ::sfx2::SvBaseLink( rNm, nObjectType, pObj ), pCntntNode( pNode ),
- bSwapIn( FALSE ), bNoDataFlag( FALSE ), bIgnoreDataChanged( FALSE ),
+ bSwapIn( sal_False ), bNoDataFlag( sal_False ), bIgnoreDataChanged( sal_False ),
m_pReReadThread(0)
{}
public:
TYPEINFO();
- SwBaseLink( USHORT nMode, USHORT nFormat, SwCntntNode* pNode = 0 )
+ SwBaseLink( sal_uInt16 nMode, sal_uInt16 nFormat, SwCntntNode* pNode = 0 )
: ::sfx2::SvBaseLink( nMode, nFormat ), pCntntNode( pNode ),
- bSwapIn( FALSE ), bNoDataFlag( FALSE ), bIgnoreDataChanged( FALSE ),
+ bSwapIn( sal_False ), bNoDataFlag( sal_False ), bIgnoreDataChanged( sal_False ),
m_pReReadThread(0)
{}
virtual ~SwBaseLink();
@@ -75,20 +75,20 @@ public:
SwCntntNode *GetCntntNode() { return pCntntNode; }
// nur fuer Grafiken
- BOOL SwapIn( BOOL bWaitForData = FALSE, BOOL bNativFormat = FALSE );
+ sal_Bool SwapIn( sal_Bool bWaitForData = sal_False, sal_Bool bNativFormat = sal_False );
- BOOL Connect() { return 0 != SvBaseLink::GetRealObject(); }
+ sal_Bool Connect() { return 0 != SvBaseLink::GetRealObject(); }
// nur fuer Grafik-Links ( zum Umschalten zwischen DDE / Grf-Link)
- void SetObjType( USHORT nType ) { SvBaseLink::SetObjType( nType ); }
+ void SetObjType( sal_uInt16 nType ) { SvBaseLink::SetObjType( nType ); }
- BOOL IsRecursion( const SwBaseLink* pChkLnk ) const;
- virtual BOOL IsInRange( ULONG nSttNd, ULONG nEndNd, xub_StrLen nStt = 0,
+ sal_Bool IsRecursion( const SwBaseLink* pChkLnk ) const;
+ virtual sal_Bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, xub_StrLen nStt = 0,
xub_StrLen nEnd = STRING_NOTFOUND ) const;
- void SetNoDataFlag() { bNoDataFlag = TRUE; }
- BOOL ChkNoDataFlag() { BOOL bRet = bNoDataFlag; bNoDataFlag = FALSE; return bRet; }
- BOOL IsNoDataFlag() const { return bNoDataFlag; }
+ void SetNoDataFlag() { bNoDataFlag = sal_True; }
+ sal_Bool ChkNoDataFlag() { sal_Bool bRet = bNoDataFlag; bNoDataFlag = sal_False; return bRet; }
+ sal_Bool IsNoDataFlag() const { return bNoDataFlag; }
};
diff --git a/sw/inc/swcalwrp.hxx b/sw/inc/swcalwrp.hxx
index d6df4e36f512..0adf78ebf2fa 100644
--- a/sw/inc/swcalwrp.hxx
+++ b/sw/inc/swcalwrp.hxx
@@ -37,7 +37,7 @@
class SwCalendarWrapper : public CalendarWrapper
{
String sUniqueId;
- USHORT nLang;
+ sal_uInt16 nLang;
public:
SwCalendarWrapper( const ::com::sun::star::uno::Reference<
@@ -45,7 +45,7 @@ public:
: CalendarWrapper( xMSF ), nLang( LANGUAGE_SYSTEM )
{}
- void LoadDefaultCalendar( USHORT nLang );
+ void LoadDefaultCalendar( sal_uInt16 nLang );
};
diff --git a/sw/inc/swcli.hxx b/sw/inc/swcli.hxx
index 130f74125e3e..f0a186047907 100644
--- a/sw/inc/swcli.hxx
+++ b/sw/inc/swcli.hxx
@@ -38,8 +38,8 @@ class SwEditWin;
class SwOleClient : public SfxInPlaceClient
{
- BOOL bInDoVerb;
- BOOL bOldCheckForOLEInCaption;
+ sal_Bool bInDoVerb;
+ sal_Bool bOldCheckForOLEInCaption;
virtual void ObjectAreaChanged();
virtual void RequestNewObjectArea( Rectangle& );
@@ -49,9 +49,11 @@ class SwOleClient : public SfxInPlaceClient
public:
SwOleClient( SwView *pView, SwEditWin *pWin, const svt::EmbeddedObjectRef& );
- void SetInDoVerb( BOOL bFlag ) { bInDoVerb = bFlag; }
+ void SetInDoVerb( sal_Bool bFlag ) { bInDoVerb = bFlag; }
- BOOL IsCheckForOLEInCaption() const { return bOldCheckForOLEInCaption; }
+ sal_Bool IsCheckForOLEInCaption() const { return bOldCheckForOLEInCaption; }
+
+ virtual void FormatChanged();
};
#endif
diff --git a/sw/inc/swcommands.h b/sw/inc/swcommands.h
new file mode 100644
index 000000000000..77b30ca59f7a
--- /dev/null
+++ b/sw/inc/swcommands.h
@@ -0,0 +1,437 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef SW_SWCOMMANDS_HRC
+#define SW_SWCOMMANDS_HRC
+
+#define CMD_SID_CREATE_SW_DRAWVIEW ".uno:CreateSWDrawView"
+#define CMD_FN_REDLINE_ACCEPT ".uno:AcceptTrackedChanges"
+#define CMD_FN_REDLINE_ON ".uno:TrackChanges"
+#define CMD_FN_ADD_UNKNOWN ".uno:AddAllUnknownWords"
+#define CMD_FN_FRAME_ALIGN_VERT_BOTTOM ".uno:AlignBottom"
+#define CMD_FN_FRAME_ALIGN_VERT_CHAR_BOTTOM ".uno:AlignCharBottom"
+#define CMD_FN_FRAME_ALIGN_VERT_CHAR_TOP ".uno:AlignCharTop"
+#define CMD_FN_FRAME_ALIGN_HORZ_CENTER ".uno:AlignHorizontalCenter"
+#define CMD_FN_FRAME_ALIGN_HORZ_LEFT ".uno:AlignLeft"
+#define CMD_FN_FRAME_ALIGN_HORZ_RIGHT ".uno:AlignRight"
+#define CMD_FN_FRAME_ALIGN_VERT_ROW_BOTTOM ".uno:AlignRowBottom"
+#define CMD_FN_FRAME_ALIGN_VERT_ROW_TOP ".uno:AlignRowTop"
+#define CMD_FN_FRAME_ALIGN_VERT_TOP ".uno:AlignTop"
+#define CMD_FN_FRAME_ALIGN_VERT_CENTER ".uno:AlignVerticalCenter"
+#define CMD_FN_FRAME_ALIGN_VERT_CHAR_CENTER ".uno:AlignVerticalCharCenter"
+#define CMD_FN_FRAME_ALIGN_VERT_ROW_CENTER ".uno:AlignVerticalRowCenter"
+#define CMD_FN_EDIT_AUTH_ENTRY_DLG ".uno:AuthoritiesEntryDialog"
+#define CMD_FN_AUTOFORMAT_APPLY ".uno:AutoFormatApply"
+#define CMD_FN_AUTOFORMAT_REDLINE_APPLY ".uno:AutoFormatRedlineApply"
+#define CMD_FN_TABLE_AUTOSUM ".uno:AutoSum"
+#define CMD_SID_ATTR_CHAR_COLOR_BACKGROUND ".uno:BackColor"
+#define CMD_FN_FORMAT_BACKGROUND_DLG ".uno:BackgroundDialog"
+#define CMD_FN_BACKSPACE ".uno:SwBackspace"
+#define CMD_FN_FORMAT_BORDER_DLG ".uno:BorderDialog"
+#define CMD_FN_NUMBER_BULLETS ".uno:BulletsAndNumberingDialog"
+#define CMD_FN_CALC_TABLE ".uno:Calc"
+#define CMD_FN_CALCULATE ".uno:CalculateSel"
+#define CMD_FN_TABLE_VERT_BOTTOM ".uno:CellVertBottom"
+#define CMD_FN_TABLE_VERT_CENTER ".uno:CellVertCenter"
+#define CMD_FN_TABLE_VERT_NONE ".uno:CellVertTop"
+#define CMD_FN_FRAME_CHAIN ".uno:ChainFrames"
+#define CMD_FN_CHANGE_DBFIELD ".uno:ChangeDatabaseField"
+#define CMD_FN_NUMBERING_OUTLINE_DLG ".uno:ChapterNumberingDialog"
+#define CMD_SID_ATTR_CHAR_COLOR_BACKGROUND_EXT ".uno:CharBackgroundExt"
+#define CMD_SID_ATTR_CHAR_COLOR_EXT ".uno:CharColorExt"
+#define CMD_FN_CHAR_LEFT_SEL ".uno:CharLeftSel"
+#define CMD_FN_CHAR_RIGHT_SEL ".uno:CharRightSel"
+#define CMD_FN_CLOSE_PAGEPREVIEW ".uno:ClosePreview"
+#define CMD_FN_REDLINE_COMMENT ".uno:CommentChangeTracking"
+#define CMD_FN_VIEW_META_CHARS ".uno:ControlCodes"
+#define CMD_FN_CONVERT_TEXT_TABLE ".uno:ConvertTableText"
+#define CMD_FN_ABSTRACT_NEWDOC ".uno:CreateAbstract"
+#define CMD_FN_DEC_INDENT_OFFSET ".uno:DecrementIndentValue"
+#define CMD_FN_NUM_BULLET_DOWN ".uno:DecrementLevel"
+#define CMD_FN_NUM_BULLET_OUTLINE_DOWN ".uno:DecrementSubLevels"
+#define CMD_FN_TABLE_DELETE_COL ".uno:DeleteColumns"
+#define CMD_FN_TABLE_DELETE_ROW ".uno:DeleteRows"
+#define CMD_FN_DELETE_WHOLE_LINE ".uno:DelLine"
+#define CMD_FN_DELETE_LINE ".uno:DelToEndOfLine"
+#define CMD_FN_DELETE_PARA ".uno:DelToEndOfPara"
+#define CMD_FN_DELETE_SENT ".uno:DelToEndOfSentence"
+#define CMD_FN_DELETE_WORD ".uno:DelToEndOfWord"
+#define CMD_FN_DELETE_BACK_LINE ".uno:DelToStartOfLine"
+#define CMD_FN_DELETE_BACK_PARA ".uno:DelToStartOfPara"
+#define CMD_FN_DELETE_BACK_SENT ".uno:DelToStartOfSentence"
+#define CMD_FN_DELETE_BACK_WORD ".uno:DelToStartOfWord"
+#define CMD_FN_TABLE_BALANCE_CELLS ".uno:DistributeColumns"
+#define CMD_FN_TABLE_BALANCE_ROWS ".uno:DistributeRows"
+#define CMD_FN_EDIT_CURRENT_TOX ".uno:EditCurIndex"
+#define CMD_FN_GLOSSARY_DLG ".uno:EditGlossary"
+#define CMD_FN_EDIT_HYPERLINK ".uno:EditHyperlink"
+#define CMD_FN_EDIT_REGION ".uno:EditRegion"
+#define CMD_FN_END_OF_DOCUMENT_SEL ".uno:EndOfDocumentSel"
+#define CMD_FN_END_OF_LINE_SEL ".uno:EndOfLineSel"
+#define CMD_FN_END_OF_PARA_SEL ".uno:EndOfParaSel"
+#define CMD_FN_TABLE_SELECT_COL ".uno:EntireColumn"
+#define CMD_FN_TABLE_SELECT_ROW ".uno:EntireRow"
+#define CMD_FN_ESCAPE ".uno:Escape"
+#define CMD_FN_EXECUTE_MACROFIELD ".uno:ExecuteMacroField"
+#define CMD_FN_EXPAND_GLOSSARY ".uno:ExpandGlossary"
+#define CMD_FN_EDIT_FIELD ".uno:FieldDialog"
+#define CMD_FN_VIEW_FIELDNAME ".uno:Fieldnames"
+#define CMD_FN_VIEW_FIELDS ".uno:Fields"
+#define CMD_FN_FLIP_HORZ_GRAFIC ".uno:FlipHorizontal"
+#define CMD_FN_FLIP_VERT_GRAFIC ".uno:FlipVertical"
+#define CMD_SID_ATTR_CHAR_COLOR2 ".uno:FontColor"
+#define CMD_FN_FORMAT_FOOTNOTE_DLG ".uno:FootnoteDialog"
+#define CMD_FN_EDIT_FOOTNOTE ".uno:EditFootnote"
+#define CMD_FN_FORMAT_COLUMN ".uno:FormatColumns"
+#define CMD_FN_FORMAT_DROPCAPS ".uno:FormatDropcap"
+#define CMD_FN_FORMAT_FRAME_DLG ".uno:FrameDialog"
+#define CMD_FN_LINE_DOWN ".uno:GoDown"
+#define CMD_FN_CHAR_LEFT ".uno:GoLeft"
+#define CMD_FN_CHAR_RIGHT ".uno:GoRight"
+#define CMD_FN_FRAME_TO_ANCHOR ".uno:GoToAnchor"
+#define CMD_FN_END_TABLE ".uno:GoToEnd"
+#define CMD_FN_END_OF_COLUMN ".uno:GoToEndOfColumn"
+#define CMD_FN_END_OF_DOCUMENT ".uno:GoToEndOfDoc"
+#define CMD_FN_END_OF_LINE ".uno:GoToEndOfLine"
+#define CMD_FN_END_OF_NEXT_COLUMN ".uno:GoToEndOfNextColumn"
+#define CMD_FN_END_OF_NEXT_PAGE ".uno:GoToEndOfNextPage"
+#define CMD_FN_END_OF_NEXT_PAGE_SEL ".uno:GoToEndOfNextPageSel"
+#define CMD_FN_END_OF_PAGE ".uno:GoToEndOfPage"
+#define CMD_FN_END_OF_PAGE_SEL ".uno:GoToEndOfPageSel"
+#define CMD_FN_END_OF_PARA ".uno:GoToEndOfPara"
+#define CMD_FN_END_OF_PREV_COLUMN ".uno:GoToEndOfPrevColumn"
+#define CMD_FN_END_OF_PREV_PAGE ".uno:GoToEndOfPrevPage"
+#define CMD_FN_END_OF_PREV_PAGE_SEL ".uno:GoToEndOfPrevPageSel"
+#define CMD_FN_NEXT_TOXMARK ".uno:GotoNextIndexMark"
+#define CMD_FN_GOTO_NEXT_INPUTFLD ".uno:GotoNextInputField"
+#define CMD_FN_GOTO_NEXT_OBJ ".uno:GotoNextObject"
+#define CMD_FN_NEXT_PARA ".uno:GoToNextPara"
+#define CMD_FN_GOTO_NEXT_MARK ".uno:GotoNextPlacemarker"
+#define CMD_FN_NEXT_SENT ".uno:GoToNextSentence"
+#define CMD_FN_NEXT_SENT_SEL ".uno:GotoNextSentenceSel"
+#define CMD_FN_NEXT_TBLFML ".uno:GotoNextTableFormula"
+#define CMD_FN_NEXT_WORD ".uno:GoToNextWord"
+#define CMD_FN_NEXT_TBLFML_ERR ".uno:GotoNextWrongTableFormula"
+#define CMD_FN_NAVIGATION_PI_GOTO_PAGE ".uno:GotoPage"
+#define CMD_FN_PREV_TOXMARK ".uno:GotoPrevIndexMark"
+#define CMD_FN_GOTO_PREV_INPUTFLD ".uno:GotoPrevInputField"
+#define CMD_FN_GOTO_PREV_OBJ ".uno:GotoPrevObject"
+#define CMD_FN_PREV_PARA ".uno:GoToPrevPara"
+#define CMD_FN_GOTO_PREV_MARK ".uno:GotoPrevPlacemarker"
+#define CMD_FN_PREV_SENT ".uno:GoToPrevSentence"
+#define CMD_FN_PREV_SENT_SEL ".uno:GotoPrevSentenceSel"
+#define CMD_FN_PREV_TBLFML ".uno:GotoPrevTableFormula"
+#define CMD_FN_PREV_WORD ".uno:GoToPrevWord"
+#define CMD_FN_PREV_TBLFML_ERR ".uno:GotoPrevWrongTableFormula"
+#define CMD_FN_START_TABLE ".uno:GoToStartOfTable"
+#define CMD_FN_START_OF_COLUMN ".uno:GoToStartOfColumn"
+#define CMD_FN_START_OF_DOCUMENT ".uno:GoToStartOfDoc"
+#define CMD_FN_START_OF_LINE ".uno:GoToStartOfLine"
+#define CMD_FN_START_OF_NEXT_COLUMN ".uno:GoToStartOfNextColumn"
+#define CMD_FN_START_OF_NEXT_PAGE ".uno:GoToStartOfNextPage"
+#define CMD_FN_START_OF_NEXT_PAGE_SEL ".uno:GoToStartOfNextPageSel"
+#define CMD_FN_START_OF_PAGE ".uno:GoToStartOfPage"
+#define CMD_FN_START_OF_PAGE_SEL ".uno:GoToStartOfPageSel"
+#define CMD_FN_START_OF_PARA ".uno:GoToStartOfPara"
+#define CMD_FN_START_OF_PREV_COLUMN ".uno:GoToStartOfPrevColumn"
+#define CMD_FN_START_OF_PREV_PAGE ".uno:GoToStartOfPrevPage"
+#define CMD_FN_START_OF_PREV_PAGE_SEL ".uno:GoToStartOfPrevPageSel"
+#define CMD_FN_LINE_UP ".uno:GoUp"
+#define CMD_FN_VIEW_GRAPHIC ".uno:Graphic"
+#define CMD_FN_FORMAT_GRAFIC_DLG ".uno:GraphicDialog"
+#define CMD_FN_SAVE_GRAPHIC ".uno:SaveGraphic"
+#define CMD_FN_EXTERNAL_EDIT ".uno:ExternalEdit"
+#define CMD_FN_EXPORT_OLE_AS_PDF ".uno:ExportOleAsPDF"
+#define CMD_FN_EXPORT_OLE_AS_GRAPHIC ".uno:ExportOleAsGraphic"
+#define CMD_FN_GROW_FONT_SIZE ".uno:Grow"
+#define CMD_FN_HSCROLLBAR ".uno:HScroll"
+#define CMD_SID_HTML_MODE ".uno:HtmlMode"
+#define CMD_FN_HYPHENATE_OPT_DLG ".uno:Hyphenate"
+#define CMD_FN_INC_INDENT_OFFSET ".uno:IncrementIndentValue"
+#define CMD_FN_NUM_BULLET_UP ".uno:IncrementLevel"
+#define CMD_FN_NUM_BULLET_OUTLINE_UP ".uno:IncrementSubLevels"
+#define CMD_FN_EDIT_IDX_ENTRY_DLG ".uno:IndexEntryDialog"
+#define CMD_FN_IDX_MARK_TO_IDX ".uno:IndexMarkToIndex"
+#define CMD_FN_POSTIT ".uno:InsertAnnotation"
+#define CMD_FN_INSERT_FLD_AUTHOR ".uno:InsertAuthorField"
+#define CMD_FN_INSERT_AUTH_ENTRY_DLG ".uno:InsertAuthoritiesEntry"
+#define CMD_FN_INSERT_BOOKMARK ".uno:InsertBookmark"
+#define CMD_FN_INSERT_BREAK_DLG ".uno:InsertBreak"
+#define CMD_FN_INSERT_CAPTION ".uno:InsertCaptionDialog"
+#define CMD_FN_INSERT_COLUMN_BREAK ".uno:InsertColumnBreak"
+#define CMD_FN_TABLE_INSERT_COL_DLG ".uno:InsertColumnDialog"
+#define CMD_FN_TABLE_INSERT_COL ".uno:InsertColumns"
+#define CMD_FN_INSERT_REGION ".uno:InsertSection"
+#define CMD_FN_INSERT_CTRL ".uno:InsertCtrl"
+#define CMD_FN_INSERT_FLD_DATE ".uno:InsertDateField"
+#define CMD_FN_INSERT_ENDNOTE ".uno:InsertEndnote"
+#define CMD_FN_ENVELOP ".uno:InsertEnvelope"
+#define CMD_FN_INSERT_FIELD ".uno:InsertField"
+#define CMD_FN_INSERT_FIELD_CTRL ".uno:InsertFieldCtrl"
+#define CMD_FN_INSERT_FOOTNOTE_DLG ".uno:InsertFootnoteDialog"
+#define CMD_FN_INSERT_FOOTNOTE ".uno:InsertFootnote"
+#define CMD_FN_EDIT_FORMULA ".uno:InsertFormula"
+#define CMD_FN_INSERT_FRAME ".uno:InsertFrame"
+#define CMD_FN_INSERT_FRAME_INTERACT ".uno:InsertFrameInteract"
+#define CMD_FN_INSERT_FRAME_INTERACT_NOCOL ".uno:InsertFrameInteractNoColumns"
+#define CMD_FN_INSERT_HRULER ".uno:InsertGraphicRuler"
+#define CMD_FN_INSERT_HYPERLINK ".uno:InsertHyperlinkDlg"
+#define CMD_FN_INSERT_IDX_ENTRY_DLG ".uno:InsertIndexesEntry"
+#define CMD_FN_INSERT_LINEBREAK ".uno:InsertLinebreak"
+#define CMD_FN_INSERT_MULTI_TOX ".uno:InsertMultiIndex"
+#define CMD_FN_NUM_BULLET_NONUM ".uno:InsertNeutralParagraph"
+#define CMD_FN_INSERT_OBJ_CTRL ".uno:InsertObjCtrl"
+#define CMD_FN_INSERT_OBJECT_DLG ".uno:InsertObjectDialog"
+#define CMD_FN_INSERT_SMA ".uno:InsertObjectStarMath"
+#define CMD_FN_INSERT_PAGEBREAK ".uno:InsertPagebreak"
+#define CMD_FN_INSERT_FLD_PGCOUNT ".uno:InsertPageCountField"
+#define CMD_FN_INSERT_PAGEFOOTER ".uno:InsertPageFooter"
+#define CMD_FN_INSERT_PAGEHEADER ".uno:InsertPageHeader"
+#define CMD_FN_INSERT_FLD_PGNUMBER ".uno:InsertPageNumberField"
+#define CMD_FN_INSERT_BREAK ".uno:InsertPara"
+#define CMD_FN_INSERT_REF_FIELD ".uno:InsertReferenceField"
+#define CMD_FN_TABLE_INSERT_ROW_DLG ".uno:InsertRowDialog"
+#define CMD_FN_TABLE_INSERT_ROW ".uno:InsertRows"
+#define CMD_FN_JAVAEDIT ".uno:InsertScript"
+#define CMD_FN_INSERT_TABLE ".uno:InsertTable"
+#define CMD_FN_INSERT_FLD_TIME ".uno:InsertTimeField"
+#define CMD_FN_INSERT_FLD_TITLE ".uno:InsertTitleField"
+#define CMD_FN_INSERT_FLD_TOPIC ".uno:InsertTopicField"
+#define CMD_FN_NUM_BULLET_NEXT ".uno:JumpDownThisLevel"
+#define CMD_FN_END_DOC_DIRECT ".uno:JumpToEndOfDoc"
+#define CMD_FN_TO_FOOTER ".uno:JumpToFooter"
+#define CMD_FN_FOOTNOTE_TO_ANCHOR ".uno:JumpToFootnoteOrAnchor"
+#define CMD_FN_TO_HEADER ".uno:JumpToHeader"
+#define CMD_FN_NEXT_BOOKMARK ".uno:JumpToNextBookmark"
+#define CMD_FN_NEXT_FOOTNOTE ".uno:JumpToNextFootnote"
+#define CMD_FN_CNTNT_TO_NEXT_FRAME ".uno:JumpToNextFrame"
+#define CMD_FN_GOTO_NEXT_REGION ".uno:JumpToNextRegion"
+#define CMD_FN_NEXT_TABLE ".uno:JumpToNextTable"
+#define CMD_FN_PREV_BOOKMARK ".uno:JumpToPrevBookmark"
+#define CMD_FN_PREV_FOOTNOTE ".uno:JumpToPrevFootnote"
+#define CMD_FN_GOTO_PREV_REGION ".uno:JumpToPrevRegion"
+#define CMD_FN_PREV_TABLE ".uno:JumpToPrevTable"
+#define CMD_FN_GOTO_REFERENCE ".uno:JumpToReference"
+#define CMD_FN_START_DOC_DIRECT ".uno:JumpToStartOfDoc"
+#define CMD_FN_NUM_BULLET_PREV ".uno:JumpUpThisLevel"
+#define CMD_FN_LINE_DOWN_SEL ".uno:LineDownSel"
+#define CMD_FN_LINE_NUMBERING_DLG ".uno:LineNumberingDialog"
+#define CMD_FN_LINE_UP_SEL ".uno:LineUpSel"
+#define CMD_FN_EDIT_LINK_DLG ".uno:LinkDialog"
+#define CMD_SID_TEMPLATE_LOAD ".uno:LoadStyles"
+#define CMD_FN_VIEW_MARKS ".uno:Marks"
+#define CMD_FN_TABLE_MERGE_CELLS ".uno:MergeCells"
+#define CMD_FN_QRY_MERGE ".uno:MergeDialog"
+#define CMD_FN_MAILMERGE_WIZARD ".uno:MailMergeWizard"
+#define CMD_FN_TABLE_MERGE_TABLE ".uno:MergeTable"
+#define CMD_FN_FORMAT_APPLY_HEAD1 ".uno:ApplyStyleHead1"
+#define CMD_FN_FORMAT_APPLY_HEAD2 ".uno:ApplyStyleHead2"
+#define CMD_FN_FORMAT_APPLY_HEAD3 ".uno:ApplyStyleHead3"
+#define CMD_FN_FORMAT_APPLY_DEFAULT ".uno:ApplyStyleDefault"
+#define CMD_FN_FORMAT_APPLY_TEXTBODY ".uno:ApplyStyleTextbody"
+#define CMD_FN_GRAPHIC_MIRROR_ON_EVEN_PAGES ".uno:MirrorGraphicOnEvenPages"
+#define CMD_FN_FRAME_MIRROR_ON_EVEN_PAGES ".uno:MirrorOnEvenPages"
+#define CMD_FN_NUM_BULLET_MOVEDOWN ".uno:MoveDown"
+#define CMD_FN_NUM_BULLET_OUTLINE_MOVEDOWN ".uno:MoveDownSubItems"
+#define CMD_FN_NUM_BULLET_MOVEUP ".uno:MoveUp"
+#define CMD_FN_NUM_BULLET_OUTLINE_MOVEUP ".uno:MoveUpSubItems"
+#define CMD_FN_TITLE_DESCRIPTION_SHAPE ".uno:ObjectTitleDescription"
+#define CMD_FN_NAME_SHAPE ".uno:NameGroup"
+#define CMD_FN_NEW_GLOBAL_DOC ".uno:NewGlobalDoc"
+#define CMD_FN_NEW_HTML_DOC ".uno:NewHtmlDoc"
+#define CMD_FN_NUMBER_FORMAT ".uno:NumberFormat"
+#define CMD_FN_NUMBER_CURRENCY ".uno:NumberFormatCurrency"
+#define CMD_FN_NUMBER_DATE ".uno:NumberFormatDate"
+#define CMD_FN_NUMBER_TWODEC ".uno:NumberFormatDecimal"
+#define CMD_FN_NUMBER_PERCENT ".uno:NumberFormatPercent"
+#define CMD_FN_NUMBER_SCIENTIFIC ".uno:NumberFormatScientific"
+#define CMD_FN_NUMBER_STANDARD ".uno:NumberFormatStandard"
+#define CMD_FN_NUMBER_TIME ".uno:NumberFormatTime"
+#define CMD_FN_NUMBER_NEWSTART ".uno:NumberingStart"
+#define CMD_FN_NUM_OR_NONUM ".uno:NumberOrNoNumber"
+#define CMD_FN_FRAME_DOWN ".uno:ObjectBackOne"
+#define CMD_FN_FRAME_UP ".uno:ObjectForwardOne"
+#define CMD_FN_AUTOFORMAT_AUTO ".uno:OnlineAutoFormat"
+#define CMD_FN_OPTIMIZE_TABLE ".uno:OptimizeTable"
+#define CMD_FN_FORMAT_PAGE_COLUMN_DLG ".uno:PageColumnDialog"
+#define CMD_FN_FORMAT_PAGE_DLG ".uno:PageDialog"
+#define CMD_FN_PAGEDOWN ".uno:PageDown"
+#define CMD_FN_PAGEDOWN_SEL ".uno:PageDownSel"
+#define CMD_FN_CHANGE_PAGENUM ".uno:PageOffset"
+#define CMD_FN_SET_PAGE_STYLE ".uno:PageStyleApply"
+#define CMD_FN_STAT_TEMPLATE ".uno:PageStyleName"
+#define CMD_FN_PAGEUP ".uno:PageUp"
+#define CMD_FN_PAGEUP_SEL ".uno:PageUpSel"
+#define CMD_FN_PREVIEW_ZOOM ".uno:PreviewZoom"
+#define CMD_FN_PRINT_LAYOUT ".uno:PrintLayout"
+#define CMD_FN_PRINT_PAGEPREVIEW ".uno:PrintPagePreView"
+#define CMD_FN_TABLE_SET_READ_ONLY_CELLS ".uno:Protect"
+#define CMD_FN_REDLINE_PROTECT ".uno:ProtectTraceChangeMode"
+#define CMD_FN_REFRESH_VIEW ".uno:RefreshView"
+#define CMD_FN_NUM_BULLET_OFF ".uno:RemoveBullets"
+#define CMD_FN_REMOVE_CUR_TOX ".uno:RemoveTableOf"
+#define CMD_FN_REPAGINATE ".uno:Repaginate"
+#define CMD_FN_REPEAT_SEARCH ".uno:RepeatSearch"
+#define CMD_FN_FORMAT_RESET ".uno:ResetAttributes"
+#define CMD_FN_TABLE_UNSET_READ_ONLY ".uno:ResetTableProtection"
+#define CMD_FN_RULER ".uno:Ruler"
+#define CMD_FN_QRY_INSERT ".uno:SbaInsert"
+#define CMD_FN_QRY_INSERT_FIELD ".uno:SbaInsertField"
+#define CMD_FN_QRY_MERGE_FIELD ".uno:SbaMerge"
+#define CMD_FN_SCROLL_NAVIGATION ".uno:ScrollNavigation"
+#define CMD_FN_SCROLL_NEXT_PREV ".uno:ScrollNextPrev"
+#define CMD_FN_TABLE_SELECT_ALL ".uno:SelectTable"
+#define CMD_FN_STAT_SELMODE ".uno:SelectionMode"
+#define CMD_FN_SELECT_PARA ".uno:SelectText"
+#define CMD_FN_SELECT_WORD ".uno:SelectWord"
+#define CMD_FN_ABSTRACT_STARIMPRESS ".uno:SendAbstractToStarImpress"
+#define CMD_FN_OUTLINE_TO_CLIPBOARD ".uno:SendOutlineToClipboard"
+#define CMD_FN_OUTLINE_TO_IMPRESS ".uno:SendOutlineToStarImpress"
+#define CMD_FN_TOOL_ANKER_AT_CHAR ".uno:SetAnchorAtChar"
+#define CMD_FN_TOOL_ANKER_CHAR ".uno:SetAnchorToChar"
+#define CMD_FN_TOOL_ANKER_FRAME ".uno:SetAnchorToFrame"
+#define CMD_FN_TOOL_ANKER_PAGE ".uno:SetAnchorToPage"
+#define CMD_FN_TOOL_ANKER_PARAGRAPH ".uno:SetAnchorToPara"
+#define CMD_FN_TABLE_SET_COL_WIDTH ".uno:SetColumnWidth"
+#define CMD_FN_SET_EXT_MODE ".uno:SetExtSelection"
+#define CMD_FN_SET_ADD_MODE ".uno:SetMultiSelection"
+#define CMD_FN_TABLE_ADJUST_CELLS ".uno:SetOptimalColumnWidth"
+#define CMD_FN_TABLE_OPTIMAL_HEIGHT ".uno:SetOptimalRowHeight"
+#define CMD_FN_TABLE_SET_ROW_HEIGHT ".uno:SetRowHeight"
+#define CMD_FN_SHADOWCURSOR ".uno:ShadowCursor"
+#define CMD_FN_SHIFT_BACKSPACE ".uno:ShiftBackspace"
+#define CMD_FN_SHOW_MULTIPLE_PAGES ".uno:ShowMultiplePages"
+#define CMD_FN_VIEW_NOTES ".uno:ShowAnnotations"
+#define CMD_FN_VIEW_HIDDEN_PARA ".uno:ShowHiddenParagraphs"
+#define CMD_FN_REDLINE_SHOW ".uno:ShowTrackedChanges"
+#define CMD_FN_SHOW_TWO_PAGES ".uno:ShowTwoPages"
+#define CMD_FN_SHOW_BOOKVIEW ".uno:ShowBookview"
+#define CMD_FN_SHRINK_FONT_SIZE ".uno:Shrink"
+#define CMD_FN_SORTING_DLG ".uno:SortDialog"
+#define CMD_FN_TABLE_SPLIT_CELLS ".uno:SplitCell"
+#define CMD_FN_TABLE_SPLIT_TABLE ".uno:SplitTable"
+#define CMD_FN_AUTO_CORRECT ".uno:StartAutoCorrect"
+#define CMD_FN_START_OF_DOCUMENT_SEL ".uno:StartOfDocumentSel"
+#define CMD_FN_START_OF_LINE_SEL ".uno:StartOfLineSel"
+#define CMD_FN_START_OF_PARA_SEL ".uno:StartOfParaSel"
+#define CMD_FN_STAT_BOOKMARK ".uno:StateBookmark"
+#define CMD_FN_STAT_PAGE ".uno:StatePageNumber"
+#define CMD_FN_STAT_ZOOM ".uno:StateZoom"
+#define CMD_FN_SET_SUB_SCRIPT ".uno:SubScript"
+#define CMD_FN_SET_SUPER_SCRIPT ".uno:SuperScript"
+#define CMD_FN_SBA_BRW_INSERT ".uno:SwBrwInsert"
+#define CMD_FN_SBA_BRW_MERGE ".uno:SwMailMerge"
+#define CMD_FN_SBA_BRW_UPDATE ".uno:SwUpdate"
+#define CMD_FN_SYNC_LABELS ".uno:SynchronizeLabelsDlg"
+#define CMD_FN_VIEW_TABLEGRID ".uno:TableBoundaries"
+#define CMD_FN_FORMAT_TABLE_DLG ".uno:TableDialog"
+#define CMD_FN_TABLE_MODE_FIX ".uno:TableModeFix"
+#define CMD_FN_TABLE_MODE_FIX_PROP ".uno:TableModeFixProp"
+#define CMD_FN_TABLE_MODE_VARIABLE ".uno:TableModeVariable"
+#define CMD_FN_NUM_FORMAT_TABLE_DLG ".uno:TableNumberFormatDialog"
+#define CMD_FN_SET_MODOPT_TBLNUMFMT ".uno:TableNumberRecognition"
+#define CMD_FN_DRAWTEXT_ATTR_DLG ".uno:TextAttributes"
+#define CMD_FN_DRAW_WRAP_DLG ".uno:TextWrap"
+#define CMD_FN_THESAURUS_DLG ".uno:ThesaurusDialog"
+#define CMD_FN_TOOL_ANKER ".uno:ToggleAnchorType"
+#define CMD_FN_TOOL_HIERARCHIE ".uno:ToggleObjectLayer"
+#define CMD_FN_UNDERLINE_DOUBLE ".uno:UnderlineDouble"
+#define CMD_FN_FRAME_UNCHAIN ".uno:UnhainFrames"
+#define CMD_FN_TABLE_UNSET_READ_ONLY_CELLS ".uno:UnsetCellsReadOnly"
+#define CMD_FN_UPDATE_ALL ".uno:UpdateAll"
+#define CMD_FN_UPDATE_TOX ".uno:UpdateAllIndexes"
+#define CMD_FN_UPDATE_ALL_LINKS ".uno:UpdateAllLinks"
+#define CMD_FN_UPDATE_CHARTS ".uno:UpdateCharts"
+#define CMD_FN_UPDATE_CUR_TOX ".uno:UpdateCurIndex"
+#define CMD_FN_UPDATE_FIELDS ".uno:UpdateFields"
+#define CMD_FN_UPDATE_INPUTFIELDS ".uno:UpdateInputFields"
+#define CMD_FN_VIEW_BOUNDS ".uno:ViewBounds"
+#define CMD_FN_VLINEAL ".uno:VRuler"
+#define CMD_FN_VSCROLLBAR ".uno:VScroll"
+#define CMD_FN_PREV_WORD_SEL ".uno:WordLeftSel"
+#define CMD_FN_NEXT_WORD_SEL ".uno:WordRightSel"
+#define CMD_FN_WRAP_ANCHOR_ONLY ".uno:WrapAnchorOnly"
+#define CMD_FN_FRAME_WRAP_CONTOUR ".uno:WrapContour"
+#define CMD_FN_FRAME_WRAP_IDEAL ".uno:WrapIdeal"
+#define CMD_FN_FRAME_WRAP_LEFT ".uno:WrapLeft"
+#define CMD_FN_FRAME_NOWRAP ".uno:WrapOff"
+#define CMD_FN_FRAME_WRAP ".uno:WrapOn"
+#define CMD_FN_FRAME_WRAP_RIGHT ".uno:WrapRight"
+#define CMD_FN_FRAME_WRAPTHRU ".uno:WrapThrough"
+#define CMD_FN_FRAME_WRAPTHRU_TRANSP ".uno:WrapThroughTransparent"
+#define CMD_FN_INSERT_STRING ".uno:InsertText"
+#define CMD_SID_ATTR_PARA_NUMRULE ".uno:NumRule"
+#define CMD_SID_ATTR_PARA_OUTLINE_LEVEL ".uno:OutlineLevel"
+#define CMD_FN_NUMBER_NEWSTART_AT ".uno:NumNewStartAt"
+#define CMD_FN_FORMAT_LINENUMBER ".uno:LineNumber"
+#define CMD_SID_ATTR_PARA_PAGENUM ".uno:PageNumber"
+#define CMD_SID_ATTR_PARA_REGISTER ".uno:RegisterTrue"
+#define CMD_FN_TO_FOOTNOTE_AREA ".uno:JumpToFootnoteArea"
+#define CMD_FN_TXTATR_INET ".uno:HyperlinkAttributes"
+#define CMD_FN_INSERT_GLOSSARY ".uno:InsertGlossary"
+#define CMD_FN_NEW_GLOSSARY ".uno:NewGlossary"
+#define CMD_FN_SET_ACT_GLOSSARY ".uno:SetActGlossaryGroup"
+#define CMD_FN_DELETE_BOOKMARK ".uno:DeleteBookmark"
+#define CMD_FN_DROP_TEXT ".uno:SetDropCapText"
+#define CMD_FN_DROP_CHAR_STYLE_NAME ".uno:SetDropCapCharStyleName"
+#define CMD_FN_READONLY_SELECTION_MODE ".uno:SelectTextMode"
+#define CMD_FN_INSERT_DBFIELD ".uno:InsertDBField"
+#define CMD_FN_GOTO_NEXT_CELL ".uno:JumpToNextCell"
+#define CMD_FN_GOTO_PREV_CELL ".uno:JumpToPrevCell"
+#define CMD_FN_INSERT_FIELD_DATA_ONLY ".uno:InsertFieldDataOnly"
+#define CMD_SID_ATTR_BRUSH_ROW ".uno:TableRowBackground"
+#define CMD_SID_ATTR_BRUSH_TABLE ".uno:TableBackground"
+#define CMD_FN_TABLE_ROW_SPLIT ".uno:RowSplit"
+#define CMD_FN_MAILMERGE_CHILDWINDOW ".uno:MailmergeChildWindow"
+#define CMD_FN_WORDCOUNT_DIALOG ".uno:WordCountDialog"
+#define CMD_FN_MAILMERGE_SENDMAIL_CHILDWINDOW ".uno:SendMailChildWindow"
+#define CMD_FN_TABLE_DELETE_TABLE ".uno:DeleteTable"
+#define CMD_FN_TABLE_SELECT_CELL ".uno:EntireCell"
+#define CMD_FN_CONVERT_TABLE_TO_TEXT ".uno:ConvertTableToText"
+#define CMD_FN_CONVERT_TEXT_TO_TABLE ".uno:ConvertTextToTable"
+#define CMD_FN_TABLE_HEADLINE_REPEAT ".uno:HeadingRowsRepeat"
+#define CMD_FN_TABLE_SORT_DIALOG ".uno:TableSort"
+#define CMD_FN_XFORMS_DESIGN_MODE ".uno:SwitchXFormsDesignMode"
+#define CMD_FN_REMOVE_DIRECT_CHAR_FORMATS ".uno:RemoveDirectCharFormats"
+#define CMD_FN_NUM_CONTINUE ".uno:ContinueNumbering"
+#define CMD_FN_SELECTION_MODE_DEFAULT ".uno:SelectionModeDefault"
+#define CMD_FN_DELETE_NOTE ".uno:DeleteNote"
+#define CMD_FN_REPLY ".uno:ReplyNote"
+#define CMD_FN_DELETE_COMMENT ".uno:DeleteComment"
+#define CMD_FN_DELETE_NOTE_AUTHOR ".uno:DeleteAuthor"
+#define CMD_FN_DELETE_ALL_NOTES ".uno:DeleteAllNotes"
+#define CMD_FN_HIDE_NOTE ".uno:HideNote"
+#define CMD_FN_HIDE_NOTE_AUTHOR ".uno:HideAuthor"
+#define CMD_SID_ATTR_VIEWLAYOUT ".uno:ViewLayout"
+#define CMD_FN_HIDE_ALL_NOTES ".uno:HideAllNotes"
+#define CMD_FN_SELECTION_MODE_BLOCK ".uno:SelectionModeBlock"
+#define CMD_FN_SPELL_GRAMMAR_DIALOG ".uno:SpellingAndGrammarDialog"
+#define CMD_FN_REDLINE_ACCEPT_DIRECT ".uno:AcceptTracedChange"
+#define CMD_FN_REDLINE_REJECT_DIRECT ".uno:RejectTracedChange"
+#define CMD_FN_REMOVE_HYPERLINK ".uno:RemoveHyperlink"
+#define CMD_FN_COPY_HYPERLINK_LOCATION ".uno:CopyHyperlinkLocation"
+
+#endif
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
index bbd51c90436d..57c41714e75a 100644
--- a/sw/inc/swcrsr.hxx
+++ b/sw/inc/swcrsr.hxx
@@ -50,11 +50,11 @@ const int FIND_NO_RING = 2;
struct SwFindParas
{
- virtual int Find( SwPaM*, SwMoveFn, const SwPaM*, BOOL ) = 0;
+ virtual int Find( SwPaM*, SwMoveFn, const SwPaM*, sal_Bool ) = 0;
virtual int IsReplaceMode() const = 0;
};
-typedef USHORT SwCursorSelOverFlags;
+typedef sal_uInt16 SwCursorSelOverFlags;
namespace nsSwCursorSelOverFlags
{
const SwCursorSelOverFlags SELOVER_NONE = 0x00;
@@ -70,10 +70,10 @@ class SwCursor : public SwPaM
_SwCursor_SavePos* pSavePos;
long mnRowSpanOffset; // required for travelling in tabs with rowspans
- BYTE nCursorBidiLevel; // bidi level of the cursor
+ sal_uInt8 nCursorBidiLevel; // bidi level of the cursor
bool mbColumnSelection; // true: cursor is aprt of a column selection
- ULONG FindAll( SwFindParas& , SwDocPositions, SwDocPositions, FindRanges, BOOL& bCancel );
+ sal_uLong FindAll( SwFindParas& , SwDocPositions, SwDocPositions, FindRanges, sal_Bool& bCancel );
using SwPaM::Find;
@@ -85,7 +85,7 @@ protected:
const _SwCursor_SavePos* GetSavePos() const { return pSavePos; }
virtual const SwCntntFrm* DoSetBidiLevelLeftRight(
- BOOL & io_rbLeft, BOOL bVisualAllowed, BOOL bInsertCrsr);
+ sal_Bool & io_rbLeft, sal_Bool bVisualAllowed, sal_Bool bInsertCrsr);
virtual void DoSetBidiLevelUpDown();
virtual bool IsSelOvrCheck(int eFlags);
@@ -113,45 +113,45 @@ public:
SwPaM* ) const;
- ULONG Find( const com::sun::star::util::SearchOptions& rSearchOpt,
- BOOL bSearchInNotes,
+ sal_uLong Find( const com::sun::star::util::SearchOptions& rSearchOpt,
+ sal_Bool bSearchInNotes,
SwDocPositions nStart, SwDocPositions nEnde,
- BOOL& bCancel,
+ sal_Bool& bCancel,
FindRanges = FND_IN_BODY,
- int bReplace = FALSE );
- ULONG Find( const SwTxtFmtColl& rFmtColl,
+ int bReplace = sal_False );
+ sal_uLong Find( const SwTxtFmtColl& rFmtColl,
SwDocPositions nStart, SwDocPositions nEnde,
- BOOL& bCancel,
+ sal_Bool& bCancel,
FindRanges = FND_IN_BODY,
const SwTxtFmtColl* pReplFmt = 0 );
- ULONG Find( const SfxItemSet& rSet, BOOL bNoCollections,
+ sal_uLong Find( const SfxItemSet& rSet, sal_Bool bNoCollections,
SwDocPositions nStart, SwDocPositions nEnde,
- BOOL& bCancel,
+ sal_Bool& bCancel,
FindRanges = FND_IN_BODY,
const com::sun::star::util::SearchOptions* pSearchOpt = 0,
const SfxItemSet* rReplSet = 0 );
// UI versions
- BOOL IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
- BOOL IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
- BOOL IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
- BOOL IsStartEndSentence( bool bEnd ) const;
- BOOL GoStartWord();
- BOOL GoEndWord();
- BOOL GoNextWord();
- BOOL GoPrevWord();
- BOOL SelectWord( const Point* pPt = 0 );
+ sal_Bool IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ sal_Bool IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ sal_Bool IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ sal_Bool IsStartEndSentence( bool bEnd ) const;
+ sal_Bool GoStartWord();
+ sal_Bool GoEndWord();
+ sal_Bool GoNextWord();
+ sal_Bool GoPrevWord();
+ sal_Bool SelectWord( const Point* pPt = 0 );
// API versions of above functions (will be used with a different
// WordType for the break iterator)
- BOOL IsStartWordWT( sal_Int16 nWordType ) const;
- BOOL IsEndWordWT( sal_Int16 nWordType ) const;
- BOOL IsInWordWT( sal_Int16 nWordType ) const;
- BOOL GoStartWordWT( sal_Int16 nWordType );
- BOOL GoEndWordWT( sal_Int16 nWordType );
- BOOL GoNextWordWT( sal_Int16 nWordType );
- BOOL GoPrevWordWT( sal_Int16 nWordType );
- BOOL SelectWordWT( sal_Int16 nWordType, const Point* pPt = 0 );
+ sal_Bool IsStartWordWT( sal_Int16 nWordType ) const;
+ sal_Bool IsEndWordWT( sal_Int16 nWordType ) const;
+ sal_Bool IsInWordWT( sal_Int16 nWordType ) const;
+ sal_Bool GoStartWordWT( sal_Int16 nWordType );
+ sal_Bool GoEndWordWT( sal_Int16 nWordType );
+ sal_Bool GoNextWordWT( sal_Int16 nWordType );
+ sal_Bool GoPrevWordWT( sal_Int16 nWordType );
+ sal_Bool SelectWordWT( sal_Int16 nWordType, const Point* pPt = 0 );
enum SentenceMoveType
{
@@ -160,67 +160,67 @@ public:
START_SENT,
END_SENT
};
- BOOL GoSentence(SentenceMoveType eMoveType);
- BOOL GoNextSentence(){return GoSentence(NEXT_SENT);}
- BOOL GoEndSentence(){return GoSentence(END_SENT);}
- BOOL GoPrevSentence(){return GoSentence(PREV_SENT);}
- BOOL GoStartSentence(){return GoSentence(START_SENT);}
- BOOL ExpandToSentenceBorders();
-
- virtual BOOL LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
- BOOL bAllowVisual, BOOL bSkipHidden, BOOL bInsertCrsr );
- BOOL UpDown( BOOL bUp, USHORT nCnt, Point* pPt, long nUpDownX );
- BOOL LeftRightMargin( BOOL bLeftMargin, BOOL bAPI = FALSE );
- BOOL IsAtLeftRightMargin( BOOL bLeftMargin, BOOL bAPI = FALSE ) const;
- BOOL SttEndDoc( BOOL bSttDoc );
- BOOL GoPrevNextCell( BOOL bNext, USHORT nCnt );
-
- BOOL Left( USHORT nCnt, USHORT nMode, BOOL bAllowVisual, BOOL bSkipHidden )
- { return LeftRight( TRUE, nCnt, nMode, bAllowVisual, bSkipHidden, FALSE ); }
- BOOL Right( USHORT nCnt, USHORT nMode, BOOL bAllowVisual, BOOL bSkipHidden )
- { return LeftRight( FALSE, nCnt, nMode, bAllowVisual, bSkipHidden, FALSE ); }
- BOOL GoNextCell( USHORT nCnt = 1 ) { return GoPrevNextCell( TRUE, nCnt ); }
- BOOL GoPrevCell( USHORT nCnt = 1 ) { return GoPrevNextCell( FALSE, nCnt ); }
- virtual BOOL GotoTable( const String& rName );
- BOOL GotoTblBox( const String& rName );
- BOOL GotoRegion( const String& rName );
- BOOL GotoFtnAnchor();
- BOOL GotoFtnTxt();
- BOOL GotoNextFtnAnchor();
- BOOL GotoPrevFtnAnchor();
- BOOL GotoNextFtnCntnt();
- BOOL GotoPrevFtnCntnt();
-
- BOOL MovePara( SwWhichPara, SwPosPara );
- BOOL MoveSection( SwWhichSection, SwPosSection );
- BOOL MoveTable( SwWhichTable, SwPosTable );
- BOOL MoveRegion( SwWhichRegion, SwPosRegion );
+ sal_Bool GoSentence(SentenceMoveType eMoveType);
+ sal_Bool GoNextSentence(){return GoSentence(NEXT_SENT);}
+ sal_Bool GoEndSentence(){return GoSentence(END_SENT);}
+ sal_Bool GoPrevSentence(){return GoSentence(PREV_SENT);}
+ sal_Bool GoStartSentence(){return GoSentence(START_SENT);}
+ sal_Bool ExpandToSentenceBorders();
+
+ virtual sal_Bool LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
+ sal_Bool bAllowVisual, sal_Bool bSkipHidden, sal_Bool bInsertCrsr );
+ sal_Bool UpDown( sal_Bool bUp, sal_uInt16 nCnt, Point* pPt, long nUpDownX );
+ sal_Bool LeftRightMargin( sal_Bool bLeftMargin, sal_Bool bAPI = sal_False );
+ sal_Bool IsAtLeftRightMargin( sal_Bool bLeftMargin, sal_Bool bAPI = sal_False ) const;
+ sal_Bool SttEndDoc( sal_Bool bSttDoc );
+ sal_Bool GoPrevNextCell( sal_Bool bNext, sal_uInt16 nCnt );
+
+ sal_Bool Left( sal_uInt16 nCnt, sal_uInt16 nMode, sal_Bool bAllowVisual, sal_Bool bSkipHidden )
+ { return LeftRight( sal_True, nCnt, nMode, bAllowVisual, bSkipHidden, sal_False ); }
+ sal_Bool Right( sal_uInt16 nCnt, sal_uInt16 nMode, sal_Bool bAllowVisual, sal_Bool bSkipHidden )
+ { return LeftRight( sal_False, nCnt, nMode, bAllowVisual, bSkipHidden, sal_False ); }
+ sal_Bool GoNextCell( sal_uInt16 nCnt = 1 ) { return GoPrevNextCell( sal_True, nCnt ); }
+ sal_Bool GoPrevCell( sal_uInt16 nCnt = 1 ) { return GoPrevNextCell( sal_False, nCnt ); }
+ virtual sal_Bool GotoTable( const String& rName );
+ sal_Bool GotoTblBox( const String& rName );
+ sal_Bool GotoRegion( const String& rName );
+ sal_Bool GotoFtnAnchor();
+ sal_Bool GotoFtnTxt();
+ sal_Bool GotoNextFtnAnchor();
+ sal_Bool GotoPrevFtnAnchor();
+ sal_Bool GotoNextFtnCntnt();
+ sal_Bool GotoPrevFtnCntnt();
+
+ sal_Bool MovePara( SwWhichPara, SwPosPara );
+ sal_Bool MoveSection( SwWhichSection, SwPosSection );
+ sal_Bool MoveTable( SwWhichTable, SwPosTable );
+ sal_Bool MoveRegion( SwWhichRegion, SwPosRegion );
// gibt es eine Selection vom Content in die Tabelle
// Return Wert gibt an, ob der Crsr auf der alten Position verbleibt
- virtual BOOL IsSelOvr( int eFlags =
+ virtual sal_Bool IsSelOvr( int eFlags =
( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
- virtual BOOL IsInProtectTable( BOOL bMove = FALSE,
- BOOL bChgCrsr = TRUE );
- BOOL IsNoCntnt() const;
+ virtual sal_Bool IsInProtectTable( sal_Bool bMove = sal_False,
+ sal_Bool bChgCrsr = sal_True );
+ sal_Bool IsNoCntnt() const;
/** Restore cursor state to the one saved by SwCrsrSaveState **/
void RestoreSavePos();
- // TRUE: an die Position kann der Cursor gesetzt werden
- virtual BOOL IsAtValidPos( BOOL bPoint = TRUE ) const;
+ // sal_True: an die Position kann der Cursor gesetzt werden
+ virtual sal_Bool IsAtValidPos( sal_Bool bPoint = sal_True ) const;
// darf der Cursor in ReadOnlyBereiche?
virtual bool IsReadOnlyAvailable() const;
- virtual BOOL IsSkipOverProtectSections() const;
- virtual BOOL IsSkipOverHiddenSections() const;
+ virtual sal_Bool IsSkipOverProtectSections() const;
+ virtual sal_Bool IsSkipOverHiddenSections() const;
- BYTE GetCrsrBidiLevel() const { return nCursorBidiLevel; }
- void SetCrsrBidiLevel( BYTE nNewLevel ) { nCursorBidiLevel = nNewLevel; }
+ sal_uInt8 GetCrsrBidiLevel() const { return nCursorBidiLevel; }
+ void SetCrsrBidiLevel( sal_uInt8 nNewLevel ) { nCursorBidiLevel = nNewLevel; }
bool IsColumnSelection() const { return mbColumnSelection; }
void SetColumnSelection( bool bNew ) { mbColumnSelection = bNew; }
@@ -250,7 +250,7 @@ public:
// internal, used by SwCursor::SaveState() etc.
struct _SwCursor_SavePos
{
- ULONG nNode;
+ sal_uLong nNode;
xub_StrLen nCntnt;
_SwCursor_SavePos* pNext;
@@ -270,11 +270,11 @@ class SwTableCursor : public virtual SwCursor
{
protected:
- ULONG nTblPtNd, nTblMkNd;
+ sal_uLong nTblPtNd, nTblMkNd;
xub_StrLen nTblPtCnt, nTblMkCnt;
SwSelBoxes aSelBoxes;
- BOOL bChg : 1;
- BOOL bParked : 1; // Tabellen-Cursor wurde geparkt
+ sal_Bool bChg : 1;
+ sal_Bool bParked : 1; // Tabellen-Cursor wurde geparkt
virtual bool IsSelOvrCheck(int eFlags);
@@ -283,25 +283,25 @@ public:
SwTableCursor( SwTableCursor& );
virtual ~SwTableCursor();
- virtual BOOL LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
- BOOL bAllowVisual, BOOL bSkipHidden, BOOL bInsertCrsr );
- virtual BOOL GotoTable( const String& rName );
+ virtual sal_Bool LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
+ sal_Bool bAllowVisual, sal_Bool bSkipHidden, sal_Bool bInsertCrsr );
+ virtual sal_Bool GotoTable( const String& rName );
void InsertBox( const SwTableBox& rTblBox );
- void DeleteBox( USHORT nPos ) { aSelBoxes.Remove( nPos ); bChg = TRUE; }
- USHORT GetBoxesCount() const { return aSelBoxes.Count(); }
+ void DeleteBox( sal_uInt16 nPos ) { aSelBoxes.Remove( nPos ); bChg = sal_True; }
+ sal_uInt16 GetBoxesCount() const { return aSelBoxes.Count(); }
const SwSelBoxes& GetBoxes() const { return aSelBoxes; }
// Baut fuer alle Boxen die Cursor auf
SwCursor* MakeBoxSels( SwCursor* pAktCrsr );
// sind irgendwelche Boxen mit einem Schutz versehen?
- BOOL HasReadOnlyBoxSel() const;
+ sal_Bool HasReadOnlyBoxSel() const;
// wurde der TabelleCursor veraendert ? Wenn ja speicher gleich
// die neuen Werte.
- BOOL IsCrsrMovedUpdt();
+ sal_Bool IsCrsrMovedUpdt();
// wurde der TabelleCursor veraendert ?
- BOOL IsCrsrMoved() const
+ sal_Bool IsCrsrMoved() const
{
return nTblMkNd != GetMark()->nNode.GetIndex() ||
nTblPtNd != GetPoint()->nNode.GetIndex() ||
@@ -309,7 +309,7 @@ public:
nTblPtCnt != GetPoint()->nContent.GetIndex();
}
- BOOL IsChgd() const { return bChg; }
+ sal_Bool IsChgd() const { return bChg; }
// Parke den Tabellen-Cursor auf dem StartNode der Boxen.
void ParkCrsr();
diff --git a/sw/inc/swdbdata.hxx b/sw/inc/swdbdata.hxx
index 5b270b76837b..82b2c645eb78 100644
--- a/sw/inc/swdbdata.hxx
+++ b/sw/inc/swdbdata.hxx
@@ -40,9 +40,9 @@ struct SwDBData
SwDBData() :
nCommandType(0){}
- BOOL operator !=(const SwDBData& rCmp) const
+ sal_Bool operator !=(const SwDBData& rCmp) const
{return rCmp.sDataSource != sDataSource || rCmp.sCommand != sCommand || rCmp.nCommandType != nCommandType;}
- BOOL operator ==(const SwDBData& rCmp) const
+ sal_Bool operator ==(const SwDBData& rCmp) const
{return rCmp.sDataSource == sDataSource && rCmp.sCommand == sCommand && rCmp.nCommandType == nCommandType;}
};
diff --git a/sw/inc/swdbtoolsclient.hxx b/sw/inc/swdbtoolsclient.hxx
index 11bdcee9dc58..0174125cec5f 100644
--- a/sw/inc/swdbtoolsclient.hxx
+++ b/sw/inc/swdbtoolsclient.hxx
@@ -65,7 +65,7 @@ public:
const ::com::sun::star::lang::Locale& _rLocale
);
- ::rtl::OUString getValue(
+ ::rtl::OUString getFormattedValue(
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxColumn,
const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter>& _rxFormatter,
const ::com::sun::star::lang::Locale& _rLocale,
diff --git a/sw/inc/swddetbl.hxx b/sw/inc/swddetbl.hxx
index 6d1a11ec0044..57e000a998c5 100644
--- a/sw/inc/swddetbl.hxx
+++ b/sw/inc/swddetbl.hxx
@@ -40,12 +40,12 @@ public:
// Constructor movet alle Lines/Boxen aus der SwTable zu sich.
// Die SwTable ist danach Leer und muss geloescht werden.
SwDDETable( SwTable& rTable, SwDDEFieldType* pDDEType,
- BOOL bUpdate = TRUE );
+ sal_Bool bUpdate = sal_True );
~SwDDETable();
void Modify( SfxPoolItem*, SfxPoolItem* );
void ChangeContent();
- BOOL NoDDETable();
+ sal_Bool NoDDETable();
SwDDEFieldType* GetDDEFldType();
inline const SwDDEFieldType* GetDDEFldType() const;
diff --git a/sw/inc/swerror.h b/sw/inc/swerror.h
index 6fe24e7db9b5..5453c32cc74b 100644
--- a/sw/inc/swerror.h
+++ b/sw/inc/swerror.h
@@ -96,12 +96,12 @@
#ifndef __RSC
-inline bool IsWarning( ULONG nErr )
+inline bool IsWarning( sal_uLong nErr )
{
return 0 != ( nErr & ERRCODE_WARNING_MASK & nErr );
}
-inline bool IsError( ULONG nErr )
+inline bool IsError( sal_uLong nErr )
{
return nErr && 0 == ( ERRCODE_WARNING_MASK & nErr );
}
diff --git a/sw/inc/swevent.hxx b/sw/inc/swevent.hxx
index 8d8f69309e67..5ab89f70dc9b 100644
--- a/sw/inc/swevent.hxx
+++ b/sw/inc/swevent.hxx
@@ -120,7 +120,7 @@ struct SwCallMouseEvent
void Clear()
{ eType = EVENT_OBJECT_NONE; PTR.pFmt = 0; PTR.IMAP.pIMapObj = 0; }
- BOOL HasEvent() const { return EVENT_OBJECT_NONE != eType; }
+ sal_Bool HasEvent() const { return EVENT_OBJECT_NONE != eType; }
};
diff --git a/sw/inc/swgstr.hxx b/sw/inc/swgstr.hxx
index 9191e121e0f7..8f3fb8ea4464 100644
--- a/sw/inc/swgstr.hxx
+++ b/sw/inc/swgstr.hxx
@@ -42,11 +42,11 @@ typedef long long3; // Zur Dokumentation: 3-byte-Longs
class swcrypter {
protected:
sal_Char cPasswd[ PASSWDLEN ]; // Passwort-Puffer
- BOOL bPasswd; // TRUE wenn mit Passwort
- void encode( sal_Char*, USHORT ); // Puffer codieren/decodieren
+ sal_Bool bPasswd; // sal_True wenn mit Passwort
+ void encode( sal_Char*, sal_uInt16 ); // Puffer codieren/decodieren
public:
swcrypter();
- BOOL setpasswd( const String& ); // Passwort setzen
+ sal_Bool setpasswd( const String& ); // Passwort setzen
void copypasswd( const sal_Char* ); // Passwort direkt setzen
const sal_Char* getpasswd() { return cPasswd; }
};
@@ -58,10 +58,10 @@ class swstreambase : public swcrypter {
protected:
SvStream* pStrm; // eigentlicher Stream
sal_Char* pBuf; // Zwischenpuffer
- USHORT nBuflen; // Laenge des Zwischenpuffers
+ sal_uInt16 nBuflen; // Laenge des Zwischenpuffers
short nLong; // Long-Laenge (3 oder 4)
- BOOL bTempStrm; // TRUE: Stream loeschen
- void checkbuf( USHORT ); // Testen der Pufferlaenge
+ sal_Bool bTempStrm; // sal_True: Stream loeschen
+ void checkbuf( sal_uInt16 ); // Testen der Pufferlaenge
swstreambase( SvStream& );
@@ -88,15 +88,15 @@ public:
int operator!() { return ( pStrm->GetError() != SVSTREAM_OK ); }
int eof() { return pStrm->IsEof(); }
- BYTE get();
- void get( void* p, USHORT n ) { pStrm->Read( (sal_Char*) p, n ); }
+ sal_uInt8 get();
+ void get( void* p, sal_uInt16 n ) { pStrm->Read( (sal_Char*) p, n ); }
inline swstreambase& operator>>( sal_Char& );
- inline swstreambase& operator>>( BYTE& );
+ inline swstreambase& operator>>( sal_uInt8& );
inline swstreambase& operator>>( short& );
- inline swstreambase& operator>>( USHORT& );
+ inline swstreambase& operator>>( sal_uInt16& );
swstreambase& operator>>( long& );
- inline swstreambase& operator>>( ULONG& );
+ inline swstreambase& operator>>( sal_uLong& );
};
inline swstreambase& swstreambase::operator>>( sal_Char& c )
@@ -104,7 +104,7 @@ inline swstreambase& swstreambase::operator>>( sal_Char& c )
*pStrm >> c; return *this;
}
-inline swstreambase& swstreambase::operator>>( BYTE& c )
+inline swstreambase& swstreambase::operator>>( sal_uInt8& c )
{
*pStrm >> c; return *this;
}
@@ -114,26 +114,26 @@ inline swstreambase& swstreambase::operator>>( short& c )
*pStrm >> c; return *this;
}
-inline swstreambase& swstreambase::operator>>( USHORT& c )
+inline swstreambase& swstreambase::operator>>( sal_uInt16& c )
{
*pStrm >> c; return *this;
}
-inline swstreambase& swstreambase::operator>>( ULONG& c )
+inline swstreambase& swstreambase::operator>>( sal_uLong& c )
{
return *this >> (long&) c;
}
class swistream : public swstreambase {
- BYTE cType; // Record-Typ
- ULONG nOffset; // Record-Offset-Portion
+ sal_uInt8 cType; // Record-Typ
+ sal_uLong nOffset; // Record-Offset-Portion
public:
swistream( SvStream& );
- BYTE peek(); // 1 Byte testen
- BYTE next(); // Blockstart
- BYTE cur() { return cType; } // aktueller Block
- BYTE skipnext(); // Record ueberspringen
+ sal_uInt8 peek(); // 1 Byte testen
+ sal_uInt8 next(); // Blockstart
+ sal_uInt8 cur() { return cType; } // aktueller Block
+ sal_uInt8 skipnext(); // Record ueberspringen
void undonext(); // next() rueckgaengig machen
long getskip() { return nOffset; }
void skip( long = -1L ); // Block ueberspringen
diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx
index a59473b0889b..c30c33d47889 100644
--- a/sw/inc/swmodule.hxx
+++ b/sw/inc/swmodule.hxx
@@ -29,7 +29,7 @@
#define _SWMODULE_HXX
#include <tools/link.hxx>
#include <tools/string.hxx>
-#include <vcl/fldunit.hxx>
+#include <tools/fldunit.hxx>
#include <svl/lstner.hxx>
#include <unotools/options.hxx>
#include <sfx2/module.hxx>
@@ -161,15 +161,15 @@ public:
const SwViewOption* GetViewOption(sal_Bool bWeb);
void ApplyUsrPref(const SwViewOption &, SwView*,
sal_uInt16 nDest = VIEWOPT_DEST_VIEW );
- void ApplyUserMetric( FieldUnit eMetric, BOOL bWeb );
- void ApplyRulerMetric( FieldUnit eMetric, BOOL bHorizontal, BOOL bWeb );
+ void ApplyUserMetric( FieldUnit eMetric, sal_Bool bWeb );
+ void ApplyRulerMetric( FieldUnit eMetric, sal_Bool bHorizontal, sal_Bool bWeb );
void ApplyFldUpdateFlags(SwFldUpdateFlags eFldFlags);
void ApplyLinkMode(sal_Int32 nNewLinkMode);
//default page mode for text grid
void ApplyDefaultPageMode(sal_Bool bIsSquaredPageMode);
- void ApplyUserCharUnit(BOOL bApplyChar, BOOL bWeb); // apply_char_unit
+ void ApplyUserCharUnit(sal_Bool bApplyChar, sal_Bool bWeb); // apply_char_unit
// ConfigItems erzeugen
SwModuleOptions* GetModuleConfig() { return pModuleConfig;}
@@ -193,7 +193,7 @@ public:
sal_Bool IsEmbeddedLoadSave() const { return bEmbeddedLoadSave; }
void SetEmbeddedLoadSave( sal_Bool bFlag ) { bEmbeddedLoadSave = bFlag; }
- void ShowDBObj( SwView& rView, const SwDBData& rData, BOOL bOnlyIfAvailable = FALSE);
+ void ShowDBObj( SwView& rView, const SwDBData& rData, sal_Bool bOnlyIfAvailable = sal_False);
// Tabellenmodi
sal_Bool IsInsTblFormatNum(sal_Bool bHTML) const;
diff --git a/sw/inc/swpre.mk b/sw/inc/swpre.mk
deleted file mode 100644
index b19440a01a55..000000000000
--- a/sw/inc/swpre.mk
+++ /dev/null
@@ -1,46 +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.
-#
-#*************************************************************************
-
-
-#======================================================================
-# standardmaessig mit Optimierung, muss explizit mit nopt=t ausgeschaltet
-# werden, wenn nicht gewuenscht
-#----------------------------------------------------------------------
-
-.IF "$(nopt)"!="" || "$(NOPT)"!=""
-nopt=true
-NOPT=TRUE
-optimize=
-OPTIMIZE=
-.ELSE
-.IF "$(debug)$(DEBUG)"==""
-optimize=true
-OPTIMIZE=TRUE
-.ENDIF
-.ENDIF
-
-
diff --git a/sw/inc/swprtopt.hxx b/sw/inc/swprtopt.hxx
deleted file mode 100644
index 91194691f284..000000000000
--- a/sw/inc/swprtopt.hxx
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SWPRTOPT_HXX
-#define _SWPRTOPT_HXX
-
-#include <tools/multisel.hxx>
-#include <printdata.hxx>
-
-#include <set>
-#include <map>
-#include <vector>
-#include <utility>
-
-#define POSTITS_NONE 0
-#define POSTITS_ONLY 1
-#define POSTITS_ENDDOC 2
-#define POSTITS_ENDPAGE 3
-
-
-class PrintDialog;
-class SfxPrinter;
-
-
-////////////////////////////////////////////////////////////
-
-
-class SwPrtOptions : public SwPrintData
-{
- USHORT nJobNo;
- String sJobName;
-
-public:
- MultiSelection aMulti;
- Point aOffset;
- ULONG nMergeCnt; // Anzahl der Serienbriefe
- ULONG nMergeAct; // Aktueller Serienbriefnr.
- USHORT nCopyCount;
-
- BOOL bCollate,
- bPrintSelection, // Markierung drucken
- bJobStartet;
-
- SwPrtOptions( const String& rJobName ) :
- nJobNo( 1 ),
- sJobName( rJobName ),
- aOffset( Point(0,0) ),
- nMergeCnt( 0 ),
- nMergeAct( 0 ),
- bCollate(FALSE),
- bPrintSelection (FALSE),
- bJobStartet(FALSE)
- {}
-
- const String& MakeNextJobName(); // steht in vprint.cxx
- const String& GetJobName() const { return sJobName; }
-
- SwPrtOptions& operator=(const SwPrintData& rData)
- {
- SwPrintData::operator=(rData);
- return *this;
- }
-
- // get print options
- void MakeOptions( BOOL bWeb );
-};
-
-
-////////////////////////////////////////////////////////////
-
-#endif //_SWPRTOPT_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx
index 6447554d7b0b..1209a200a6d4 100644
--- a/sw/inc/swrect.hxx
+++ b/sw/inc/swrect.hxx
@@ -85,18 +85,18 @@ public:
SwRect &_Intersection( const SwRect &rRect );
inline SwRect GetIntersection( const SwRect& rRect ) const;
- BOOL IsInside( const Point& rPOINT ) const;
- BOOL IsNear(const Point& rPoint, long nTolerance ) const;
- BOOL IsInside( const SwRect& rRect ) const;
- BOOL IsOver( const SwRect& rRect ) const;
- inline BOOL HasArea() const;
- inline BOOL IsEmpty() const;
+ sal_Bool IsInside( const Point& rPOINT ) const;
+ sal_Bool IsNear(const Point& rPoint, long nTolerance ) const;
+ sal_Bool IsInside( const SwRect& rRect ) const;
+ sal_Bool IsOver( const SwRect& rRect ) const;
+ inline sal_Bool HasArea() const;
+ inline sal_Bool IsEmpty() const;
inline void Clear();
inline SwRect &operator = ( const SwRect &rRect );
- inline BOOL operator == ( const SwRect& rRect ) const;
- inline BOOL operator != ( const SwRect& rRect ) const;
+ inline sal_Bool operator == ( const SwRect& rRect ) const;
+ inline sal_Bool operator != ( const SwRect& rRect ) const;
inline SwRect &operator+=( const Point &rPt );
inline SwRect &operator-=( const Point &rPt );
@@ -148,10 +148,10 @@ public:
long GetBottomDistance( long ) const;
long GetRightDistance( long ) const;
long GetTopDistance( long ) const;
- BOOL OverStepLeft( long ) const;
- BOOL OverStepBottom( long ) const;
- BOOL OverStepTop( long ) const;
- BOOL OverStepRight( long ) const;
+ sal_Bool OverStepLeft( long ) const;
+ sal_Bool OverStepBottom( long ) const;
+ sal_Bool OverStepTop( long ) const;
+ sal_Bool OverStepRight( long ) const;
};
// Implementation in swrect.cxx
@@ -161,7 +161,7 @@ typedef void (SwRect:: *SwRectSet)( const long nNew );
typedef long (SwRect:: *SwRectGet)() const;
typedef const Point (SwRect:: *SwRectPoint)() const;
typedef const Size (SwRect:: *SwRectSize)() const;
-typedef BOOL (SwRect:: *SwRectMax)( long ) const;
+typedef sal_Bool (SwRect:: *SwRectMax)( long ) const;
typedef long (SwRect:: *SwRectDist)( long ) const;
typedef void (SwRect:: *SwRectSetTwice)( long, long );
typedef void (SwRect:: *SwRectSetPos)( const Point& );
@@ -266,11 +266,11 @@ inline SwRect &SwRect::operator = ( const SwRect &rRect )
m_Size = rRect.m_Size;
return *this;
}
-inline BOOL SwRect::operator == ( const SwRect& rRect ) const
+inline sal_Bool SwRect::operator == ( const SwRect& rRect ) const
{
return (m_Point == rRect.m_Point && m_Size == rRect.m_Size);
}
-inline BOOL SwRect::operator != ( const SwRect& rRect ) const
+inline sal_Bool SwRect::operator != ( const SwRect& rRect ) const
{
return (m_Point != rRect.m_Point || m_Size != rRect.m_Size);
}
@@ -314,11 +314,11 @@ inline SwRect SwRect::GetIntersection( const SwRect& rRect ) const
return SwRect( *this ).Intersection( rRect );
}
-inline BOOL SwRect::HasArea() const
+inline sal_Bool SwRect::HasArea() const
{
return !IsEmpty();
}
-inline BOOL SwRect::IsEmpty() const
+inline sal_Bool SwRect::IsEmpty() const
{
return !(m_Size.getHeight() && m_Size.getWidth());
}
diff --git a/sw/inc/swregion.hxx b/sw/inc/swregion.hxx
index df15d51d8225..981391e0f61a 100644
--- a/sw/inc/swregion.hxx
+++ b/sw/inc/swregion.hxx
@@ -38,18 +38,18 @@ class SwRegionRects : public SwRects
{
SwRect aOrigin; // die Kopie des StartRects
- inline void InsertRect( const SwRect &rRect, const USHORT nPos, BOOL &rDel);
+ inline void InsertRect( const SwRect &rRect, const sal_uInt16 nPos, sal_Bool &rDel);
public:
- SwRegionRects( const SwRect& rStartRect, USHORT nInit = 20,
- USHORT nGrow = 8 );
+ SwRegionRects( const SwRect& rStartRect, sal_uInt16 nInit = 20,
+ sal_uInt16 nGrow = 8 );
// Zum Ausstanzen aus aOrigin.
void operator-=( const SwRect& rRect );
// Aus Loechern werden Flaechen, aus Flaechen werden Loecher.
void Invert();
// Benachbarte Rechtecke zusammenfassen.
- void Compress( BOOL bFuzzy = TRUE );
+ void Compress( sal_Bool bFuzzy = sal_True );
inline const SwRect &GetOrigin() const { return aOrigin; }
inline void ChangeOrigin( const SwRect &rRect ) { aOrigin = rRect; }
diff --git a/sw/inc/swserv.hxx b/sw/inc/swserv.hxx
index 2e9c64083271..d9fd298fab02 100644
--- a/sw/inc/swserv.hxx
+++ b/sw/inc/swserv.hxx
@@ -69,17 +69,17 @@ public:
}
virtual ~SwServerObject();
- virtual BOOL GetData( ::com::sun::star::uno::Any & rData,
+ virtual sal_Bool GetData( ::com::sun::star::uno::Any & rData,
const String & rMimeType,
- BOOL bSynchron = FALSE );
+ sal_Bool bSynchron = sal_False );
- BOOL SetData( const String & rMimeType,
+ sal_Bool SetData( const String & rMimeType,
const ::com::sun::star::uno::Any& rData );
virtual void SendDataChanged( const SwPosition& rPos );
virtual void SendDataChanged( const SwPaM& rRange );
- BOOL IsLinkInServer( const SwBaseLink* ) const;
+ sal_Bool IsLinkInServer( const SwBaseLink* ) const;
void SetNoServer();
void SetDdeBookmark( ::sw::mark::IMark& rBookmark);
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index d6581a60d56b..7df49e2cd355 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -104,17 +104,17 @@ protected:
//SOLL das fuer jede Tabelle einstellbar sein?
TblChgMode eTblChgMode;
- USHORT nGrfsThatResize; // Anzahl der Grfs, die beim HTML-Import
+ sal_uInt16 nGrfsThatResize; // Anzahl der Grfs, die beim HTML-Import
// noch ein Resize der Tbl. anstossen
- USHORT nRowsToRepeat; // number of rows to repeat on every page
+ sal_uInt16 nRowsToRepeat; // number of rows to repeat on every page
- BOOL bModifyLocked :1;
- BOOL bNewModel :1; // FALSE: old SubTableModel; TRUE: new RowSpanModel
+ sal_Bool bModifyLocked :1;
+ sal_Bool bNewModel :1; // sal_False: old SubTableModel; sal_True: new RowSpanModel
#if OSL_DEBUG_LEVEL > 1
bool bDontChangeModel; // This is set by functions (like Merge()) to forbid a laet model change
#endif
- BOOL IsModifyLocked(){ return bModifyLocked;}
+ sal_Bool IsModifyLocked(){ return bModifyLocked;}
public:
enum SearchType
@@ -137,19 +137,19 @@ private:
SwTable & operator= (const SwTable &);
// no default ctor.
SwTable();
- BOOL OldMerge( SwDoc*, const SwSelBoxes&, SwTableBox*, SwUndoTblMerge* );
- BOOL OldSplitRow( SwDoc*, const SwSelBoxes&, USHORT, BOOL );
- BOOL NewMerge( SwDoc*, const SwSelBoxes&, const SwSelBoxes& rMerged,
+ sal_Bool OldMerge( SwDoc*, const SwSelBoxes&, SwTableBox*, SwUndoTblMerge* );
+ sal_Bool OldSplitRow( SwDoc*, const SwSelBoxes&, sal_uInt16, sal_Bool );
+ sal_Bool NewMerge( SwDoc*, const SwSelBoxes&, const SwSelBoxes& rMerged,
SwTableBox*, SwUndoTblMerge* );
- BOOL NewSplitRow( SwDoc*, const SwSelBoxes&, USHORT, BOOL );
+ sal_Bool NewSplitRow( SwDoc*, const SwSelBoxes&, sal_uInt16, sal_Bool );
SwBoxSelection* CollectBoxSelection( const SwPaM& rPam ) const;
- void InsertSpannedRow( SwDoc* pDoc, USHORT nIdx, USHORT nCnt );
- BOOL _InsertRow( SwDoc*, const SwSelBoxes&, USHORT nCnt, BOOL bBehind );
- BOOL NewInsertCol( SwDoc*, const SwSelBoxes& rBoxes, USHORT nCnt, BOOL );
+ void InsertSpannedRow( SwDoc* pDoc, sal_uInt16 nIdx, sal_uInt16 nCnt );
+ sal_Bool _InsertRow( SwDoc*, const SwSelBoxes&, sal_uInt16 nCnt, sal_Bool bBehind );
+ sal_Bool NewInsertCol( SwDoc*, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool );
void _FindSuperfluousRows( SwSelBoxes& rBoxes, SwTableLine*, SwTableLine* );
void AdjustWidths( const long nOld, const long nNew );
void NewSetTabCols( Parm &rP, const SwTabCols &rNew, const SwTabCols &rOld,
- const SwTableBox *pStart, BOOL bCurRowOnly );
+ const SwTableBox *pStart, sal_Bool bCurRowOnly );
public:
@@ -157,18 +157,18 @@ public:
const SwHTMLTableLayout *GetHTMLTableLayout() const { return pHTMLLayout; }
void SetHTMLTableLayout( SwHTMLTableLayout *p ); //Eigentumsuebergang!
- USHORT IncGrfsThatResize() { return ++nGrfsThatResize; }
- USHORT DecGrfsThatResize() { return nGrfsThatResize ? --nGrfsThatResize : 0; }
+ sal_uInt16 IncGrfsThatResize() { return ++nGrfsThatResize; }
+ sal_uInt16 DecGrfsThatResize() { return nGrfsThatResize ? --nGrfsThatResize : 0; }
- void LockModify() { bModifyLocked = TRUE; } //Muessen _immer_ paarig
- void UnlockModify() { bModifyLocked = FALSE;} //benutzt werden!
+ void LockModify() { bModifyLocked = sal_True; } //Muessen _immer_ paarig
+ void UnlockModify() { bModifyLocked = sal_False;} //benutzt werden!
- void SetTableModel( BOOL bNew ){ bNewModel = bNew; }
- BOOL IsNewModel() const { return bNewModel; }
+ void SetTableModel( sal_Bool bNew ){ bNewModel = bNew; }
+ sal_Bool IsNewModel() const { return bNewModel; }
- USHORT GetRowsToRepeat() const { return Min( GetTabLines().Count(), nRowsToRepeat ); }
- USHORT _GetRowsToRepeat() const { return nRowsToRepeat; }
- void SetRowsToRepeat( USHORT nNumOfRows ) { nRowsToRepeat = nNumOfRows; }
+ sal_uInt16 GetRowsToRepeat() const { return Min( GetTabLines().Count(), nRowsToRepeat ); }
+ sal_uInt16 _GetRowsToRepeat() const { return nRowsToRepeat; }
+ void SetRowsToRepeat( sal_uInt16 nNumOfRows ) { nRowsToRepeat = nNumOfRows; }
bool IsHeadline( const SwTableLine& rLine ) const;
@@ -181,9 +181,9 @@ public:
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
void GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
- BOOL bHidden = FALSE, BOOL bCurRowOnly = FALSE ) const;
+ sal_Bool bHidden = sal_False, sal_Bool bCurRowOnly = sal_False ) const;
void SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
- const SwTableBox *pStart, BOOL bCurRowOnly );
+ const SwTableBox *pStart, sal_Bool bCurRowOnly );
// The following functions are for new table model only...
void CreateSelection( const SwPaM& rPam, SwSelBoxes& rBoxes,
@@ -196,17 +196,17 @@ public:
// SwSavRowSpan is the structure needed by Undo to undo the split operation
// CleanUpRowSpan corrects the (top of the) second table and delviers the structure
// for Undo
- SwSaveRowSpan* CleanUpTopRowSpan( USHORT nSplitLine );
+ SwSaveRowSpan* CleanUpTopRowSpan( sal_uInt16 nSplitLine );
// RestoreRowSpan is called by Undo to restore the old row span values
void RestoreRowSpan( const SwSaveRowSpan& );
// CleanUpBottomRowSpan corrects the overhanging row spans at the end of the first table
- void CleanUpBottomRowSpan( USHORT nDelLines );
+ void CleanUpBottomRowSpan( sal_uInt16 nDelLines );
// The following functions are "pseudo-virtual", i.e. they are different for old and new table model
// It's not allowed to change the table model after the first call of one of these functions.
- BOOL Merge( SwDoc* pDoc, const SwSelBoxes& rBoxes, const SwSelBoxes& rMerged,
+ sal_Bool Merge( SwDoc* pDoc, const SwSelBoxes& rBoxes, const SwSelBoxes& rMerged,
SwTableBox* pMergeBox, SwUndoTblMerge* pUndo = 0 )
{
#if OSL_DEBUG_LEVEL > 1
@@ -215,8 +215,8 @@ public:
return bNewModel ? NewMerge( pDoc, rBoxes, rMerged, pMergeBox, pUndo ) :
OldMerge( pDoc, rBoxes, pMergeBox, pUndo );
}
- BOOL SplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt=1,
- BOOL bSameHeight = FALSE )
+ sal_Bool SplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt=1,
+ sal_Bool bSameHeight = sal_False )
{
#if OSL_DEBUG_LEVEL > 1
bDontChangeModel = true;
@@ -229,16 +229,16 @@ public:
void ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax ) const;
void PrepareDeleteCol( long nMin, long nMax );
- BOOL InsertCol( SwDoc*, const SwSelBoxes& rBoxes,
- USHORT nCnt = 1, BOOL bBehind = TRUE );
- BOOL InsertRow( SwDoc*, const SwSelBoxes& rBoxes,
- USHORT nCnt = 1, BOOL bBehind = TRUE );
- BOOL AppendRow( SwDoc* pDoc, USHORT nCnt = 1 );
+ sal_Bool InsertCol( SwDoc*, const SwSelBoxes& rBoxes,
+ sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
+ sal_Bool InsertRow( SwDoc*, const SwSelBoxes& rBoxes,
+ sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
+ sal_Bool AppendRow( SwDoc* pDoc, sal_uInt16 nCnt = 1 );
void PrepareDelBoxes( const SwSelBoxes& rBoxes );
- BOOL DeleteSel( SwDoc*, const SwSelBoxes& rBoxes, const SwSelBoxes* pMerged,
- SwUndo* pUndo, const BOOL bDelMakeFrms, const BOOL bCorrBorder );
- BOOL SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt=1 );
- BOOL Merge( const SwSelBoxes& rBoxes,
+ sal_Bool DeleteSel( SwDoc*, const SwSelBoxes& rBoxes, const SwSelBoxes* pMerged,
+ SwUndo* pUndo, const sal_Bool bDelMakeFrms, const sal_Bool bCorrBorder );
+ sal_Bool SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt=1 );
+ sal_Bool Merge( const SwSelBoxes& rBoxes,
SwTableBox* pMergeBox, SwUndoTblMerge* = 0 );
void FindSuperfluousRows( SwSelBoxes& rBoxes )
@@ -252,8 +252,8 @@ public:
// (wird von GetTblBox und SwTblFld benutzt)
// #i80314#
// add 3rd parameter in order to control validation check on <rStr>
- static USHORT _GetBoxNum( String& rStr,
- BOOL bFirst = FALSE,
+ static sal_uInt16 _GetBoxNum( String& rStr,
+ sal_Bool bFirst = sal_False,
const bool bPerformValidCheck = false );
// suche die Inhaltstragende Box mit dem Namen
// #i80314#
@@ -262,38 +262,38 @@ public:
const SwTableBox* GetTblBox( const String& rName,
const bool bPerformValidCheck = false ) const;
// kopiere die selektierten Boxen in ein anderes Dokument.
- BOOL MakeCopy( SwDoc*, const SwPosition&, const SwSelBoxes&,
- BOOL bCpyNds = TRUE, BOOL bCpyName = FALSE ) const;
+ sal_Bool MakeCopy( SwDoc*, const SwPosition&, const SwSelBoxes&,
+ sal_Bool bCpyNds = sal_True, sal_Bool bCpyName = sal_False ) const;
// kopiere die Tabelle in diese. (die Logik steht im TBLRWCL.CXX)
- BOOL InsTable( const SwTable& rCpyTbl, const SwNodeIndex&,
+ sal_Bool InsTable( const SwTable& rCpyTbl, const SwNodeIndex&,
SwUndoTblCpyTbl* pUndo = 0 );
- BOOL InsTable( const SwTable& rCpyTbl, const SwSelBoxes&,
+ sal_Bool InsTable( const SwTable& rCpyTbl, const SwSelBoxes&,
SwUndoTblCpyTbl* pUndo = 0 );
- BOOL InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes&,
+ sal_Bool InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes&,
SwUndoTblCpyTbl* pUndo );
// kopiere die Headline (mit Inhalt!) der Tabelle in eine andere
- BOOL CopyHeadlineIntoTable( SwTableNode& rTblNd );
+ sal_Bool CopyHeadlineIntoTable( SwTableNode& rTblNd );
// erfrage die Box, dessen Start-Index auf nBoxStt steht
- SwTableBox* GetTblBox( ULONG nSttIdx );
- const SwTableBox* GetTblBox( ULONG nSttIdx ) const
+ SwTableBox* GetTblBox( sal_uLong nSttIdx );
+ const SwTableBox* GetTblBox( sal_uLong nSttIdx ) const
{ return ((SwTable*)this)->GetTblBox( nSttIdx ); }
- // returnt TRUE wenn sich in der Tabelle Verschachtelungen befinden
- BOOL IsTblComplex() const;
+ // returnt sal_True wenn sich in der Tabelle Verschachtelungen befinden
+ sal_Bool IsTblComplex() const;
- //returnt TRUE wenn die Tabelle oder Selektion ausgeglichen ist
- BOOL IsTblComplexForChart( const String& rSel,
+ //returnt sal_True wenn die Tabelle oder Selektion ausgeglichen ist
+ sal_Bool IsTblComplexForChart( const String& rSel,
SwChartLines* pGetCLines = 0 ) const;
// suche alle Inhaltstragenden-Boxen der Grundline in der diese Box
// steht. rBoxes auch als Return-Wert, um es gleich weiter zu benutzen
- //JP 31.01.97: bToTop = TRUE -> hoch bis zur Grundline,
- // FALSE-> sonst nur die Line der Box
+ //JP 31.01.97: bToTop = sal_True -> hoch bis zur Grundline,
+ // sal_False-> sonst nur die Line der Box
SwSelBoxes& SelLineFromBox( const SwTableBox* pBox,
- SwSelBoxes& rBoxes, BOOL bToTop = TRUE ) const;
+ SwSelBoxes& rBoxes, sal_Bool bToTop = sal_True ) const;
// erfrage vom Client Informationen
- virtual BOOL GetInfo( SfxPoolItem& ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
// suche im Format nach der angemeldeten Tabelle
static SwTable * FindTable( SwFrmFmt const*const pFmt );
@@ -316,9 +316,9 @@ public:
TblChgMode GetTblChgMode() const { return eTblChgMode; }
void SetTblChgMode( TblChgMode eMode ) { eTblChgMode = eMode; }
- BOOL SetColWidth( SwTableBox& rAktBox, USHORT eType,
+ sal_Bool SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
- BOOL SetRowHeight( SwTableBox& rAktBox, USHORT eType,
+ sal_Bool SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
#if OSL_DEBUG_LEVEL > 1
void CheckConsistency() const;
@@ -335,7 +335,7 @@ public:
SwTableLine() : pUpper(0) {}
- SwTableLine( SwTableLineFmt*, USHORT nBoxes, SwTableBox *pUp );
+ SwTableLine( SwTableLineFmt*, sal_uInt16 nBoxes, SwTableBox *pUp );
virtual ~SwTableLine();
SwTableBoxes &GetTabBoxes() { return aBoxes; }
@@ -355,9 +355,9 @@ public:
// suche nach der naechsten/vorherigen Box mit Inhalt
SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =0,
- BOOL bOvrTblLns=TRUE ) const;
+ sal_Bool bOvrTblLns=sal_True ) const;
SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =0,
- BOOL bOvrTblLns=TRUE ) const;
+ sal_Bool bOvrTblLns=sal_True ) const;
SwTwips GetTableLineHeight( bool& bLayoutAvailable ) const;
@@ -388,7 +388,7 @@ public:
SwTableBox() : pSttNd(0), pUpper(0), pImpl(0) {}
- SwTableBox( SwTableBoxFmt*, USHORT nLines, SwTableLine *pUp = 0 );
+ SwTableBox( SwTableBoxFmt*, sal_uInt16 nLines, SwTableLine *pUp = 0 );
SwTableBox( SwTableBoxFmt*, const SwStartNode&, SwTableLine *pUp = 0 );
SwTableBox( SwTableBoxFmt*, const SwNodeIndex&, SwTableLine *pUp = 0 );
virtual ~SwTableBox();
@@ -408,7 +408,7 @@ public:
void ChgFrmFmt( SwTableBoxFmt *pNewFmt );
const SwStartNode *GetSttNd() const { return pSttNd; }
- ULONG GetSttIdx() const
+ sal_uLong GetSttIdx() const
#if OSL_DEBUG_LEVEL > 1
;
#else
@@ -417,29 +417,29 @@ public:
// suche nach der naechsten/vorherigen Box mit Inhalt
SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =0,
- BOOL bOvrTblLns=TRUE ) const;
+ sal_Bool bOvrTblLns=sal_True ) const;
SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =0,
- BOOL bOvrTblLns=TRUE ) const;
+ sal_Bool bOvrTblLns=sal_True ) const;
// gebe den Namen dieser Box zurueck. Dieser wird dynamisch bestimmt
// und ergibt sich aus der Position in den Lines/Boxen/Tabelle
String GetName() const;
// gebe den "Wert" der Box zurueck (fuers rechnen in der Tabelle)
double GetValue( SwTblCalcPara& rPara ) const;
- BOOL IsInHeadline( const SwTable* pTbl = 0 ) const;
+ sal_Bool IsInHeadline( const SwTable* pTbl = 0 ) const;
// enthaelt die Box Inhalt, der als Nummer formatiert werden kann?
- BOOL HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
- BOOL& rIsEmptyTxtNd ) const;
- ULONG IsValidNumTxtNd( BOOL bCheckAttr = TRUE ) const;
+ sal_Bool HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
+ sal_Bool& rIsEmptyTxtNd ) const;
+ sal_uLong IsValidNumTxtNd( sal_Bool bCheckAttr = sal_True ) const;
// teste ob der BoxInhalt mit der Nummer uebereinstimmt, wenn eine
// Tabellenformel gesetzt ist. (fuers Redo des Change vom NumFormat!)
- BOOL IsNumberChanged() const;
+ sal_Bool IsNumberChanged() const;
// ist das eine FormelBox oder eine Box mit numerischen Inhalt (AutoSum)
// Was es ist, besagt der ReturnWert - die WhichId des Attributes
// Leere Boxen haben den ReturnWert USHRT_MAX !!
- USHORT IsFormulaOrValueBox() const;
+ sal_uInt16 IsFormulaOrValueBox() const;
// Loading of a document requires an actualisation of cells with values
void ActualiseValueBox();
@@ -457,14 +457,14 @@ public:
bool getDummyFlag() const;
void setDummyFlag( bool bDummy );
- SwTableBox& FindStartOfRowSpan( const SwTable&, USHORT nMaxStep = USHRT_MAX );
+ SwTableBox& FindStartOfRowSpan( const SwTable&, sal_uInt16 nMaxStep = USHRT_MAX );
const SwTableBox& FindStartOfRowSpan( const SwTable& rTable,
- USHORT nMaxStep = USHRT_MAX ) const
+ sal_uInt16 nMaxStep = USHRT_MAX ) const
{ return const_cast<SwTableBox*>(this)->FindStartOfRowSpan( rTable, nMaxStep ); }
- SwTableBox& FindEndOfRowSpan( const SwTable&, USHORT nMaxStep = USHRT_MAX );
+ SwTableBox& FindEndOfRowSpan( const SwTable&, sal_uInt16 nMaxStep = USHRT_MAX );
const SwTableBox& FindEndOfRowSpan( const SwTable& rTable,
- USHORT nMaxStep = USHRT_MAX ) const
+ sal_uInt16 nMaxStep = USHRT_MAX ) const
{ return const_cast<SwTableBox*>(this)->FindEndOfRowSpan( rTable, nMaxStep ); }
};
diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx
index 3c77dd0ad3ca..87399c808ef6 100644
--- a/sw/inc/swtypes.hxx
+++ b/sw/inc/swtypes.hxx
@@ -115,13 +115,13 @@ enum SwLabelType
};
-const BYTE OLD_MAXLEVEL = 5;
-const BYTE MAXLEVEL = 10; //Ehemals numrule.hxx
-const BYTE NO_NUM = 200; //Ehemals numrule.hxx
+const sal_uInt8 OLD_MAXLEVEL = 5;
+const sal_uInt8 MAXLEVEL = 10; //Ehemals numrule.hxx
+const sal_uInt8 NO_NUM = 200; //Ehemals numrule.hxx
// fuer Absaetze mit NO_NUM aber auf unterschiedlichen Leveln
// DAMIT entfaellt das NO_NUM !!!!
-const BYTE NO_NUMLEVEL = 0x20; // wird mit den Levels verodert
+const sal_uInt8 NO_NUMLEVEL = 0x20; // wird mit den Levels verodert
/*
@@ -141,9 +141,9 @@ extern SwPathFinder *pPathFinder;
// (fuer die weiteren Ebenen sind die Werte mit den Ebenen+1 zu
// multiplizieren; Ebenen 0..4 !!!)
-const USHORT lBullIndent = 1440/4;
+const sal_uInt16 lBullIndent = 1440/4;
const short lBullFirstLineOffset = -lBullIndent;
-const USHORT lNumIndent = 1440/4;
+const sal_uInt16 lNumIndent = 1440/4;
const short lNumFirstLineOffset = -lNumIndent;
const short lOutlineMinTextDistance = 216; // 0.15 inch = 0.38 cm
@@ -207,7 +207,7 @@ extern const sal_Char* pMarkToOLE;
#endif
-typedef USHORT SetAttrMode;
+typedef sal_uInt16 SetAttrMode;
namespace nsSetAttrMode
{
@@ -295,7 +295,7 @@ enum PrepareHint
PREP_FTN, //Fussnoten-Invalidierung
PREP_POS_CHGD, //Position des Frm hat sich verandert
//(Zum Fly-Umbruch pruefen). Im void* des Prepare()
- //wird ein BOOL& uebergeben, dieser zeigt mit TRUE,
+ //wird ein sal_Bool& uebergeben, dieser zeigt mit sal_True,
//dass ein Format ausgefuehrt wurde.
PREP_UL_SPACE, //UL-Space hat sich veraendert, TxtFrms muessen
//den Zeilenabstand neu kalkulieren.
diff --git a/sw/inc/swundo.hxx b/sw/inc/swundo.hxx
index ae89b213e222..f2785d32cb26 100644
--- a/sw/inc/swundo.hxx
+++ b/sw/inc/swundo.hxx
@@ -25,10 +25,16 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _SWUNDO_HXX
-#define _SWUNDO_HXX
+#ifndef SWUNDO_HXX
+#define SWUNDO_HXX
+
+#include <vector>
+
+#include <rtl/ustring.hxx>
+
+
+typedef ::std::vector< ::rtl::OUString > SwUndoComments_t;
-#include <svl/svarray.hxx>
// die Ids fuer StdAktionen
enum SwUndoId
@@ -176,26 +182,6 @@ enum SwUndoId
};
-#define INIT_UNDOIDS 20
-#define GROW_UNDOIDS 32
-// Das Array der verwendeten Undo-Ids
-class String;
-class SwUndoIdAndName
-{
- SwUndoId eUndoId;
- String* pUndoStr;
-
-public:
- SwUndoIdAndName() : eUndoId( UNDO_EMPTY ), pUndoStr( 0 ) {}
- SwUndoIdAndName( SwUndoId nId, const String* pStr = 0 );
- ~SwUndoIdAndName();
-
- SwUndoId GetUndoId() const { return eUndoId; }
- const String* GetUndoStr() const { return pUndoStr; }
-};
-typedef SwUndoIdAndName* SwUndoIdAndNamePtr;
-SV_DECL_PTRARR_DEL( SwUndoIds, SwUndoIdAndNamePtr, INIT_UNDOIDS, GROW_UNDOIDS )
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/swunohelper.hxx b/sw/inc/swunohelper.hxx
index 0551ccfb8c87..9f7b05ba8b13 100644
--- a/sw/inc/swunohelper.hxx
+++ b/sw/inc/swunohelper.hxx
@@ -51,32 +51,32 @@ sal_Int32 GetEnumAsInt32( const com::sun::star::uno::Any& rVal );
// methods for UCB actions:
// delete the file under this URL
-SW_DLLPUBLIC BOOL UCB_DeleteFile( const String& rURL );
+SW_DLLPUBLIC sal_Bool UCB_DeleteFile( const String& rURL );
// copy/move the file to a new location
-BOOL UCB_CopyFile( const String& rURL, const String& rNewURL,
- BOOL bCopyIsMove = FALSE );
+sal_Bool UCB_CopyFile( const String& rURL, const String& rNewURL,
+ sal_Bool bCopyIsMove = sal_False );
// is the URL on the current system case sentive?
-SW_DLLPUBLIC BOOL UCB_IsCaseSensitiveFileName( const String& rURL );
+SW_DLLPUBLIC sal_Bool UCB_IsCaseSensitiveFileName( const String& rURL );
// is the URL readonly?
-SW_DLLPUBLIC BOOL UCB_IsReadOnlyFileName( const String& rURL );
+SW_DLLPUBLIC sal_Bool UCB_IsReadOnlyFileName( const String& rURL );
// get a list of files from the folder of the URL
// options: pExtension = 0 -> all, else this specific extension
// pDateTime != 0 -> returns also the modified date/time of
// the files in a SvPtrarr -->
// !! objects must be deleted from the caller!!
-BOOL UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList,
+sal_Bool UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList,
const String* pExtension = 0,
SvPtrarr* pDateTimeList = 0 );
// is the URL an existing file?
-SW_DLLPUBLIC BOOL UCB_IsFile( const String& rURL );
+SW_DLLPUBLIC sal_Bool UCB_IsFile( const String& rURL );
// is the URL a existing directory?
-BOOL UCB_IsDirectory( const String& rURL );
+sal_Bool UCB_IsDirectory( const String& rURL );
}
#endif
diff --git a/sw/inc/swurl.hxx b/sw/inc/swurl.hxx
index 73c1ce94029f..550e0850ba4e 100644
--- a/sw/inc/swurl.hxx
+++ b/sw/inc/swurl.hxx
@@ -39,7 +39,7 @@ class ViewShell;
void LoadURL( const UniString& rName, ViewShell* pSh,
- USHORT nFilter = URLLOAD_NOFILTER,
+ sal_uInt16 nFilter = URLLOAD_NOFILTER,
const UniString *pTargetFrameName = 0 );
diff --git a/sw/inc/swwait.hxx b/sw/inc/swwait.hxx
index ad54933e9c7d..f2890c092c67 100644
--- a/sw/inc/swwait.hxx
+++ b/sw/inc/swwait.hxx
@@ -36,9 +36,9 @@ class SwDocShell;
class SW_DLLPUBLIC SwWait
{
SwDocShell &rDoc;
- BOOL bLock;
+ sal_Bool bLock;
public:
- SwWait( SwDocShell &rDocShell, BOOL bLockDispatcher );
+ SwWait( SwDocShell &rDocShell, sal_Bool bLockDispatcher );
~SwWait();
};
diff --git a/sw/inc/tabcol.hxx b/sw/inc/tabcol.hxx
index a98f2875638e..0de1142165aa 100644
--- a/sw/inc/tabcol.hxx
+++ b/sw/inc/tabcol.hxx
@@ -41,8 +41,8 @@ struct SwTabColsEntry
long nPos;
long nMin;
long nMax;
- BOOL bHidden; //Fuer jeden Eintrag ein Flag, Hidden oder nicht.
- //Wenn das Flag Hidden TRUE ist liegt der Spalten-
+ sal_Bool bHidden; //Fuer jeden Eintrag ein Flag, Hidden oder nicht.
+ //Wenn das Flag Hidden sal_True ist liegt der Spalten-
//trenner nicht in der aktuellen Zeile; er muss
//mit gepflegt werden, darf aber nicht angezeigt
//werden.
@@ -69,23 +69,23 @@ class SW_DLLPUBLIC SwTabCols
const SwTabColsEntries& GetData() const { return aData; }
public:
- SwTabCols( USHORT nSize = 0 );
+ SwTabCols( sal_uInt16 nSize = 0 );
SwTabCols( const SwTabCols& );
SwTabCols &operator=( const SwTabCols& );
- BOOL operator==( const SwTabCols& rCmp ) const;
- long& operator[]( USHORT nPos ) { return aData[nPos].nPos; }
- long operator[]( USHORT nPos ) const { return aData[nPos].nPos; }
- USHORT Count() const { return sal::static_int_cast< USHORT >(aData.size()); }
+ sal_Bool operator==( const SwTabCols& rCmp ) const;
+ long& operator[]( sal_uInt16 nPos ) { return aData[nPos].nPos; }
+ long operator[]( sal_uInt16 nPos ) const { return aData[nPos].nPos; }
+ sal_uInt16 Count() const { return sal::static_int_cast< sal_uInt16 >(aData.size()); }
- BOOL IsHidden( USHORT nPos ) const { return aData[nPos].bHidden; }
- void SetHidden( USHORT nPos, BOOL bValue ) { aData[nPos].bHidden = bValue; }
+ sal_Bool IsHidden( sal_uInt16 nPos ) const { return aData[nPos].bHidden; }
+ void SetHidden( sal_uInt16 nPos, sal_Bool bValue ) { aData[nPos].bHidden = bValue; }
- void Insert( long nValue, BOOL bValue, USHORT nPos );
- void Insert( long nValue, long nMin, long nMax, BOOL bValue, USHORT nPos );
- void Remove( USHORT nPos, USHORT nAnz = 1 );
+ void Insert( long nValue, sal_Bool bValue, sal_uInt16 nPos );
+ void Insert( long nValue, long nMin, long nMax, sal_Bool bValue, sal_uInt16 nPos );
+ void Remove( sal_uInt16 nPos, sal_uInt16 nAnz = 1 );
- const SwTabColsEntry& GetEntry( USHORT nPos ) const { return aData[nPos]; }
- SwTabColsEntry& GetEntry( USHORT nPos ) { return aData[nPos]; }
+ const SwTabColsEntry& GetEntry( sal_uInt16 nPos ) const { return aData[nPos]; }
+ SwTabColsEntry& GetEntry( sal_uInt16 nPos ) { return aData[nPos]; }
long GetLeftMin() const { return nLeftMin; }
long GetLeft() const { return nLeft; }
diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx
index 58610145cb2c..a6c8b9fed177 100644
--- a/sw/inc/tblafmt.hxx
+++ b/sw/inc/tblafmt.hxx
@@ -181,13 +181,13 @@ public:
void SetValueFormat( const String& rFmt, LanguageType eLng, LanguageType eSys )
{ sNumFmtString = rFmt; eNumFmtLanguage = eLng; eSysLanguage = eSys; }
- BOOL Load( SvStream& rStream, const SwAfVersions& rVersions, USHORT nVer );
- BOOL Save( SvStream& rStream ) const;
- BOOL SaveVerionNo( SvStream& rStream ) const;
+ sal_Bool Load( SvStream& rStream, const SwAfVersions& rVersions, sal_uInt16 nVer );
+ sal_Bool Save( SvStream& rStream ) const;
+ sal_Bool SaveVerionNo( SvStream& rStream ) const;
#ifdef READ_OLDVERS
// lade alte Version
- BOOL LoadOld( SvStream& rStream, USHORT aLoadVer[] );
+ sal_Bool LoadOld( SvStream& rStream, sal_uInt16 aLoadVer[] );
#endif
};
@@ -197,17 +197,17 @@ class SW_DLLPUBLIC SwTableAutoFmt
static SwBoxAutoFmt* pDfltBoxAutoFmt;
String aName;
- USHORT nStrResId;
+ sal_uInt16 nStrResId;
// common flags of Calc and Writer
- BOOL bInclFont : 1;
- BOOL bInclJustify : 1;
- BOOL bInclFrame : 1;
- BOOL bInclBackground : 1;
- BOOL bInclValueFormat : 1;
+ sal_Bool bInclFont : 1;
+ sal_Bool bInclJustify : 1;
+ sal_Bool bInclFrame : 1;
+ sal_Bool bInclBackground : 1;
+ sal_Bool bInclValueFormat : 1;
// Calc specific flags
- BOOL bInclWidthHeight : 1;
+ sal_Bool bInclWidthHeight : 1;
SwBoxAutoFmt* aBoxAutoFmt[ 16 ];
@@ -218,37 +218,37 @@ public:
SwTableAutoFmt& operator=( const SwTableAutoFmt& rNew );
- void SetBoxFmt( const SwBoxAutoFmt& rNew, BYTE nPos );
- const SwBoxAutoFmt& GetBoxFmt( BYTE nPos ) const;
+ void SetBoxFmt( const SwBoxAutoFmt& rNew, sal_uInt8 nPos );
+ const SwBoxAutoFmt& GetBoxFmt( sal_uInt8 nPos ) const;
void SetName( const String& rNew ) { aName = rNew; nStrResId = USHRT_MAX; }
const String& GetName() const { return aName; }
enum UpdateFlags { UPDATE_CHAR = 1, UPDATE_BOX = 2, UPDATE_ALL = 3 };
- SwBoxAutoFmt& UpdateFromSet( BYTE nPos, const SfxItemSet& rSet,
+ SwBoxAutoFmt& UpdateFromSet( sal_uInt8 nPos, const SfxItemSet& rSet,
UpdateFlags eFlags, SvNumberFormatter* );
- void UpdateToSet( BYTE nPos, SfxItemSet& rSet, UpdateFlags eFlags,
+ void UpdateToSet( sal_uInt8 nPos, SfxItemSet& rSet, UpdateFlags eFlags,
SvNumberFormatter* ) const ;
- BOOL IsFont() const { return bInclFont; }
- BOOL IsJustify() const { return bInclJustify; }
- BOOL IsFrame() const { return bInclFrame; }
- BOOL IsBackground() const { return bInclBackground; }
- BOOL IsValueFormat() const { return bInclValueFormat; }
+ sal_Bool IsFont() const { return bInclFont; }
+ sal_Bool IsJustify() const { return bInclJustify; }
+ sal_Bool IsFrame() const { return bInclFrame; }
+ sal_Bool IsBackground() const { return bInclBackground; }
+ sal_Bool IsValueFormat() const { return bInclValueFormat; }
- void SetFont( const BOOL bNew ) { bInclFont = bNew; }
- void SetJustify( const BOOL bNew ) { bInclJustify = bNew; }
- void SetFrame( const BOOL bNew ) { bInclFrame = bNew; }
- void SetBackground( const BOOL bNew ) { bInclBackground = bNew; }
- void SetValueFormat( const BOOL bNew ) { bInclValueFormat = bNew; }
- void SetWidthHeight( const BOOL bNew ) { bInclWidthHeight = bNew; }
+ void SetFont( const sal_Bool bNew ) { bInclFont = bNew; }
+ void SetJustify( const sal_Bool bNew ) { bInclJustify = bNew; }
+ void SetFrame( const sal_Bool bNew ) { bInclFrame = bNew; }
+ void SetBackground( const sal_Bool bNew ) { bInclBackground = bNew; }
+ void SetValueFormat( const sal_Bool bNew ) { bInclValueFormat = bNew; }
+ void SetWidthHeight( const sal_Bool bNew ) { bInclWidthHeight = bNew; }
- BOOL Load( SvStream& rStream, const SwAfVersions& );
- BOOL Save( SvStream& rStream ) const;
+ sal_Bool Load( SvStream& rStream, const SwAfVersions& );
+ sal_Bool Save( SvStream& rStream ) const;
#ifdef READ_OLDVERS
// load old versions
- BOOL LoadOld( SvStream& rStream, USHORT aLoadVer[] );
+ sal_Bool LoadOld( SvStream& rStream, sal_uInt16 aLoadVer[] );
#endif
};
@@ -257,14 +257,14 @@ SV_DECL_PTRARR_DEL( _SwTableAutoFmtTbl, SwTableAutoFmtPtr, 1, 5 )
class SW_DLLPUBLIC SwTableAutoFmtTbl : public _SwTableAutoFmtTbl
{
- SW_DLLPRIVATE BOOL Load( SvStream& rStream );
- SW_DLLPRIVATE BOOL Save( SvStream& rStream ) const;
+ SW_DLLPRIVATE sal_Bool Load( SvStream& rStream );
+ SW_DLLPRIVATE sal_Bool Save( SvStream& rStream ) const;
public:
SwTableAutoFmtTbl();
- BOOL Load();
- BOOL Save() const;
+ sal_Bool Load();
+ sal_Bool Save() const;
};
#endif
diff --git a/sw/inc/tblenum.hxx b/sw/inc/tblenum.hxx
index 030857b2f1fe..5c7bc06808c3 100644
--- a/sw/inc/tblenum.hxx
+++ b/sw/inc/tblenum.hxx
@@ -29,7 +29,7 @@
#define _TBLENUM_HXX
//fuers aendern der Tabellen/Spalten/Zeilen Breiten/Hoehen
-typedef USHORT TblChgWidthHeightType;
+typedef sal_uInt16 TblChgWidthHeightType;
namespace nsTblChgWidthHeightType
{
diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx
index 9c17d1cb0987..bdab7f0ad805 100644
--- a/sw/inc/tblsel.hxx
+++ b/sw/inc/tblsel.hxx
@@ -56,7 +56,7 @@ SV_DECL_PTRARR_SORT( SwSelBoxes, SwTableBoxPtr, 10, 20 )
//erweitert.
//Die Boxen werden ueber das Layout zusammengsucht, es wird auch bei
//aufgespaltenen Tabellen korrekt gearbeitet (siehe: MakeSelUnions()).
-typedef USHORT SwTblSearchType;
+typedef sal_uInt16 SwTblSearchType;
namespace nsSwTblSearchType
{
const SwTblSearchType TBLSEARCH_NONE = 0x1; // keine Erweiterung
@@ -85,22 +85,22 @@ void GetTblSelCrs( const SwCrsrShell& rShell, SwSelBoxes& rBoxes );
void GetTblSelCrs( const SwTableCursor& rTblCrsr, SwSelBoxes& rBoxes );
// suche fuer eine AutoSumme die beteiligten Boxen zusammen
-BOOL GetAutoSumSel( const SwCrsrShell&, SwCellFrms& );
+sal_Bool GetAutoSumSel( const SwCrsrShell&, SwCellFrms& );
// check if the SelBoxes contains protected Boxes
-BOOL HasProtectedCells( const SwSelBoxes& rBoxes );
+sal_Bool HasProtectedCells( const SwSelBoxes& rBoxes );
// teste, ob die Selektion ausgeglichen ist
SV_DECL_PTRARR( SwChartBoxes, SwTableBoxPtr, 16, 16)
SV_DECL_PTRARR_DEL( SwChartLines, SwChartBoxes*, 25, 50)
-BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
+sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
SwChartLines* pGetCLines = 0 );
// teste ob die Celle in die SSelection gehoert
// (wurde eine Funktion, damit GetTblSel() und MakeTblCrsr() immer
// das "gleiche Verstaendnis" fuer die Selektion haben)
-BOOL IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell );
+sal_Bool IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell );
// bestimme die Boxen, die zusammen gefasst werden sollen.
// Dabei wird auf Layout Basis das Rechteck "angepasst". D.H. es
@@ -111,16 +111,16 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
SwTableBox** ppMergeBox, SwUndoTblMerge* pUndo = 0 );
// teste ob die selektierten Boxen ein gueltiges Merge erlauben
-USHORT CheckMergeSel( const SwPaM& rPam );
-USHORT CheckMergeSel( const SwSelBoxes& rBoxes );
+sal_uInt16 CheckMergeSel( const SwPaM& rPam );
+sal_uInt16 CheckMergeSel( const SwSelBoxes& rBoxes );
-BOOL IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam );
+sal_Bool IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam );
// teste ob ein Split oder InsertCol dazu fuehrt, das eine Box
// kleiner als MINLAY wird.
-BOOL CheckSplitCells( const SwCrsrShell& rShell, USHORT nDiv,
+sal_Bool CheckSplitCells( const SwCrsrShell& rShell, sal_uInt16 nDiv,
const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE );
-BOOL CheckSplitCells( const SwCursor& rCrsr, USHORT nDiv,
+sal_Bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv,
const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE );
//Fuer das Arbeiten auf TabSelektion auch fuer aufgespaltene Tabellen.
@@ -184,9 +184,9 @@ public:
void SetTableLines( const SwTable &rTable );
void DelFrms ( SwTable &rTable );
void MakeFrms( SwTable &rTable );
- void MakeNewFrms( SwTable &rTable, const USHORT nNumber,
- const BOOL bBehind );
- BOOL AreLinesToRestore( const SwTable &rTable ) const;
+ void MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber,
+ const sal_Bool bBehind );
+ sal_Bool AreLinesToRestore( const SwTable &rTable ) const;
void ClearLineBehind() { pLineBehind = 0; }
};
@@ -224,8 +224,8 @@ struct _FndPara
: rBoxes(rPara.rBoxes), pFndLine(pFL), pFndBox(rPara.pFndBox) {}
};
-BOOL _FndBoxCopyCol( const SwTableBox*& rpBox, void* pPara );
-SW_DLLPUBLIC BOOL _FndLineCopyCol( const SwTableLine*& rpLine, void* pPara );
+sal_Bool _FndBoxCopyCol( const SwTableBox*& rpBox, void* pPara );
+SW_DLLPUBLIC sal_Bool _FndLineCopyCol( const SwTableLine*& rpLine, void* pPara );
#endif // _TBLSEL_HXX
diff --git a/sw/inc/tgrditem.hxx b/sw/inc/tgrditem.hxx
index 8178cdc47746..0c6b9da9e243 100644
--- a/sw/inc/tgrditem.hxx
+++ b/sw/inc/tgrditem.hxx
@@ -44,14 +44,14 @@ class SW_DLLPUBLIC SwTextGridItem : public SfxPoolItem
sal_uInt16 nLines;
sal_uInt16 nBaseHeight, nRubyHeight;
SwTextGrid eGridType;
- BOOL bRubyTextBelow;
- BOOL bPrintGrid;
- BOOL bDisplayGrid;
+ sal_Bool bRubyTextBelow;
+ sal_Bool bPrintGrid;
+ sal_Bool bDisplayGrid;
//for textgrid enhancement
sal_uInt16 nBaseWidth;
- BOOL bSnapToChars;
- BOOL bSquaredMode;
+ sal_Bool bSnapToChars;
+ sal_Bool bSquaredMode;
public:
SwTextGridItem();
virtual ~SwTextGridItem();
@@ -64,8 +64,8 @@ public:
SfxMapUnit ePresMetric,
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
SwTextGridItem& operator=( const SwTextGridItem& );
@@ -84,37 +84,37 @@ public:
SwTextGrid GetGridType() const { return eGridType; }
void SetGridType( SwTextGrid eNew ) { eGridType = eNew; }
- BOOL IsRubyTextBelow() const { return bRubyTextBelow; }
- BOOL GetRubyTextBelow() const { return bRubyTextBelow; }
- void SetRubyTextBelow( BOOL bNew ) { bRubyTextBelow = bNew; }
+ sal_Bool IsRubyTextBelow() const { return bRubyTextBelow; }
+ sal_Bool GetRubyTextBelow() const { return bRubyTextBelow; }
+ void SetRubyTextBelow( sal_Bool bNew ) { bRubyTextBelow = bNew; }
- BOOL IsPrintGrid() const { return bPrintGrid; }
- BOOL GetPrintGrid() const { return bPrintGrid; }
- void SetPrintGrid( BOOL bNew ) { bPrintGrid = bNew; }
+ sal_Bool IsPrintGrid() const { return bPrintGrid; }
+ sal_Bool GetPrintGrid() const { return bPrintGrid; }
+ void SetPrintGrid( sal_Bool bNew ) { bPrintGrid = bNew; }
- BOOL IsDisplayGrid() const { return bDisplayGrid; }
- BOOL GetDisplayGrid() const { return bDisplayGrid; }
- void SetDisplayGrid( BOOL bNew ) { bDisplayGrid = bNew; }
+ sal_Bool IsDisplayGrid() const { return bDisplayGrid; }
+ sal_Bool GetDisplayGrid() const { return bDisplayGrid; }
+ void SetDisplayGrid( sal_Bool bNew ) { bDisplayGrid = bNew; }
//for textgrid enhancement
sal_uInt16 GetBaseWidth() const { return nBaseWidth;}
void SetBaseWidth( sal_uInt16 nNew ) { nBaseWidth = nNew; }
- BOOL IsSnapToChars() const { return bSnapToChars; }
- BOOL GetSnapToChars() const { return bSnapToChars; }
- void SetSnapToChars( BOOL bNew ) { bSnapToChars = bNew; }
+ sal_Bool IsSnapToChars() const { return bSnapToChars; }
+ sal_Bool GetSnapToChars() const { return bSnapToChars; }
+ void SetSnapToChars( sal_Bool bNew ) { bSnapToChars = bNew; }
- BOOL IsSquaredMode() const { return bSquaredMode; }
- BOOL GetSquaredMode() const { return bSquaredMode; }
- void SetSquaredMode( BOOL bNew ) { bSquaredMode = bNew; }
- void SwitchPaperMode(BOOL bNew );
+ sal_Bool IsSquaredMode() const { return bSquaredMode; }
+ sal_Bool GetSquaredMode() const { return bSquaredMode; }
+ void SetSquaredMode( sal_Bool bNew ) { bSquaredMode = bNew; }
+ void SwitchPaperMode(sal_Bool bNew );
void Init();
};
-inline const SwTextGridItem &SwAttrSet::GetTextGrid(BOOL bInP) const
+inline const SwTextGridItem &SwAttrSet::GetTextGrid(sal_Bool bInP) const
{ return (const SwTextGridItem&)Get( RES_TEXTGRID, bInP ); }
-inline const SwTextGridItem &SwFmt::GetTextGrid(BOOL bInP) const
+inline const SwTextGridItem &SwFmt::GetTextGrid(sal_Bool bInP) const
{ return (const SwTextGridItem&)aSet.Get( RES_TEXTGRID, bInP ); }
#endif
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index 40fa7dd63774..1f5bf0530f9b 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -63,8 +63,8 @@ SV_DECL_PTRARR(SwTOXMarks, SwTOXMark*, 0, 10)
Description: Entry of content index, alphabetical index or user defined index
--------------------------------------------------------------------*/
-#define IVER_TOXMARK_STRPOOL ((USHORT)1)
-#define IVER_TOXMARK_NEWTOX ((USHORT)2)
+#define IVER_TOXMARK_STRPOOL ((sal_uInt16)1)
+#define IVER_TOXMARK_NEWTOX ((sal_uInt16)2)
class SW_DLLPUBLIC SwTOXMark
: public SfxPoolItem
@@ -83,9 +83,9 @@ class SW_DLLPUBLIC SwTOXMark
SwTxtTOXMark* pTxtAttr;
- USHORT nLevel;
- BOOL bAutoGenerated : 1; // generated using a concordance file
- BOOL bMainEntry : 1; // main entry emphasized by character style
+ sal_uInt16 nLevel;
+ sal_Bool bAutoGenerated : 1; // generated using a concordance file
+ sal_Bool bMainEntry : 1; // main entry emphasized by character style
::com::sun::star::uno::WeakReference<
::com::sun::star::text::XDocumentIndexMark> m_wXDocumentIndexMark;
@@ -113,14 +113,14 @@ public:
String GetText() const;
- inline BOOL IsAlternativeText() const;
+ inline sal_Bool IsAlternativeText() const;
inline const String& GetAlternativeText() const;
inline void SetAlternativeText( const String& rAlt );
// content or user defined index
- inline void SetLevel(USHORT nLevel);
- inline USHORT GetLevel() const;
+ inline void SetLevel(sal_uInt16 nLevel);
+ inline sal_uInt16 GetLevel() const;
// for alphabetical index only
inline void SetPrimaryKey(const String& rStr );
@@ -135,11 +135,11 @@ public:
inline const String& GetPrimaryKeyReading() const;
inline const String& GetSecondaryKeyReading() const;
- BOOL IsAutoGenerated() const {return bAutoGenerated;}
- void SetAutoGenerated(BOOL bSet) {bAutoGenerated = bSet;}
+ sal_Bool IsAutoGenerated() const {return bAutoGenerated;}
+ void SetAutoGenerated(sal_Bool bSet) {bAutoGenerated = bSet;}
- BOOL IsMainEntry() const {return bMainEntry;}
- void SetMainEntry(BOOL bSet) { bMainEntry = bSet;}
+ sal_Bool IsMainEntry() const {return bMainEntry;}
+ void SetMainEntry(sal_Bool bSet) { bMainEntry = bSet;}
inline const SwTOXType* GetTOXType() const;
@@ -225,13 +225,13 @@ struct SW_DLLPUBLIC SwFormToken
String sCharStyleName;
SwTwips nTabStopPosition;
FormTokenType eTokenType;
- USHORT nPoolId;
+ sal_uInt16 nPoolId;
SvxTabAdjust eTabAlign;
- USHORT nChapterFormat; //SwChapterFormat;
- USHORT nOutlineLevel;//the maximum permitted outline level in numbering
- USHORT nAuthorityField; //enum ToxAuthorityField
+ sal_uInt16 nChapterFormat; //SwChapterFormat;
+ sal_uInt16 nOutlineLevel;//the maximum permitted outline level in numbering
+ sal_uInt16 nAuthorityField; //enum ToxAuthorityField
sal_Unicode cTabFillChar;
- sal_Bool bWithTab; // TRUE: do generate tab
+ sal_Bool bWithTab; // sal_True: do generate tab
// character only the tab stop
// #i21237#
@@ -351,11 +351,11 @@ class SW_DLLPUBLIC SwForm
String aTemplate[ AUTH_TYPE_END + 1 ];
TOXTypes eType;
- USHORT nFormMaxLevel;
+ sal_uInt16 nFormMaxLevel;
- BOOL bGenerateTabPos : 1;
- BOOL bIsRelTabPos : 1;
- BOOL bCommaSeparated : 1;
+ sal_Bool bGenerateTabPos : 1;
+ sal_Bool bIsRelTabPos : 1;
+ sal_Bool bCommaSeparated : 1;
public:
SwForm( TOXTypes eTOXType = TOX_CONTENT );
@@ -363,57 +363,57 @@ public:
SwForm& operator=( const SwForm& rForm );
- inline void SetTemplate(USHORT nLevel, const String& rName);
- inline const String& GetTemplate(USHORT nLevel) const;
+ inline void SetTemplate(sal_uInt16 nLevel, const String& rName);
+ inline const String& GetTemplate(sal_uInt16 nLevel) const;
// #i21237#
- void SetPattern(USHORT nLevel, const SwFormTokens& rName);
- void SetPattern(USHORT nLevel, const String& rStr);
- const SwFormTokens& GetPattern(USHORT nLevel) const;
+ void SetPattern(sal_uInt16 nLevel, const SwFormTokens& rName);
+ void SetPattern(sal_uInt16 nLevel, const String& rStr);
+ const SwFormTokens& GetPattern(sal_uInt16 nLevel) const;
// fill tab stop positions from template to pattern
// #i21237#
void AdjustTabStops(SwDoc& rDoc,
- BOOL bInsertNewTabStops = FALSE);
+ sal_Bool bInsertNewTabStops = sal_False);
inline TOXTypes GetTOXType() const;
- inline USHORT GetFormMax() const;
+ inline sal_uInt16 GetFormMax() const;
- BOOL IsRelTabPos() const { return bIsRelTabPos; }
- void SetRelTabPos( BOOL b ) { bIsRelTabPos = b; }
+ sal_Bool IsRelTabPos() const { return bIsRelTabPos; }
+ void SetRelTabPos( sal_Bool b ) { bIsRelTabPos = b; }
- BOOL IsCommaSeparated() const { return bCommaSeparated;}
- void SetCommaSeparated( BOOL b) { bCommaSeparated = b;}
+ sal_Bool IsCommaSeparated() const { return bCommaSeparated;}
+ void SetCommaSeparated( sal_Bool b) { bCommaSeparated = b;}
- static USHORT GetFormMaxLevel( TOXTypes eType );
+ static sal_uInt16 GetFormMaxLevel( TOXTypes eType );
static const sal_Char* aFormEntry; // <E>
- static BYTE nFormEntryLen; // 3 characters
+ static sal_uInt8 nFormEntryLen; // 3 characters
static const sal_Char* aFormTab; // <T>
- static BYTE nFormTabLen; // 3 characters
+ static sal_uInt8 nFormTabLen; // 3 characters
static const sal_Char* aFormPageNums; // <P>
- static BYTE nFormPageNumsLen; // 3 characters
+ static sal_uInt8 nFormPageNumsLen; // 3 characters
static const sal_Char* aFormLinkStt; // <LS>
- static BYTE nFormLinkSttLen; // 4 characters
+ static sal_uInt8 nFormLinkSttLen; // 4 characters
static const sal_Char* aFormLinkEnd; // <LE>
- static BYTE nFormLinkEndLen; // 4 characters
+ static sal_uInt8 nFormLinkEndLen; // 4 characters
static const sal_Char* aFormEntryNum; // <E#>
- static BYTE nFormEntryNumLen; // 4 characters
+ static sal_uInt8 nFormEntryNumLen; // 4 characters
static const sal_Char* aFormEntryTxt; // <ET>
- static BYTE nFormEntryTxtLen; // 4 characters
+ static sal_uInt8 nFormEntryTxtLen; // 4 characters
static const sal_Char* aFormChapterMark; // <C>
- static BYTE nFormChapterMarkLen; // 3 characters
+ static sal_uInt8 nFormChapterMarkLen; // 3 characters
static const sal_Char* aFormText; // <TX>
- static BYTE nFormTextLen; // 4 characters
+ static sal_uInt8 nFormTextLen; // 4 characters
static const sal_Char* aFormAuth; // <Axx> xx - decimal enum value
- static BYTE nFormAuthLen; // 3 characters
+ static sal_uInt8 nFormAuthLen; // 3 characters
};
/*--------------------------------------------------------------------
Description: Content to create indexes of
--------------------------------------------------------------------*/
-typedef USHORT SwTOXElement;
+typedef sal_uInt16 SwTOXElement;
namespace nsSwTOXElement
{
const SwTOXElement TOX_MARK = 1;
@@ -426,7 +426,7 @@ namespace nsSwTOXElement
const SwTOXElement TOX_SEQUENCE = 128;
}
-typedef USHORT SwTOIOptions;
+typedef sal_uInt16 SwTOIOptions;
namespace nsSwTOIOptions
{
const SwTOIOptions TOI_SAME_ENTRY = 1;
@@ -446,7 +446,7 @@ enum SwCaptionDisplay
CAPTION_TEXT
};
-typedef USHORT SwTOOElements;
+typedef sal_uInt16 SwTOOElements;
namespace nsSwTOOElements
{
const SwTOOElements TOO_MATH = 0x01;
@@ -477,25 +477,25 @@ class SW_DLLPUBLIC SwTOXBase : public SwClient
String sSortAlgorithm;
union {
- USHORT nLevel; // consider outline levels
- USHORT nOptions; // options of alphabetical index
+ sal_uInt16 nLevel; // consider outline levels
+ sal_uInt16 nOptions; // options of alphabetical index
} aData;
- USHORT nCreateType; // sources to create the index from
- USHORT nOLEOptions; // OLE sources
+ sal_uInt16 nCreateType; // sources to create the index from
+ sal_uInt16 nOLEOptions; // OLE sources
SwCaptionDisplay eCaptionDisplay; //
- BOOL bProtected : 1; // index protected ?
- BOOL bFromChapter : 1; // create from chapter or document
- BOOL bFromObjectNames : 1; // create a table or object index
+ sal_Bool bProtected : 1; // index protected ?
+ sal_Bool bFromChapter : 1; // create from chapter or document
+ sal_Bool bFromObjectNames : 1; // create a table or object index
// from the names rather than the caption
- BOOL bLevelFromChapter : 1; // User index: get the level from the source chapter
+ sal_Bool bLevelFromChapter : 1; // User index: get the level from the source chapter
public:
SwTOXBase( const SwTOXType* pTyp, const SwForm& rForm,
- USHORT nCreaType, const String& rTitle );
+ sal_uInt16 nCreaType, const String& rTitle );
SwTOXBase( const SwTOXBase& rCopy, SwDoc* pDoc = 0 );
virtual ~SwTOXBase();
- virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
// a kind of CopyCtor - check if the TOXBase is at TOXType of the doc.
// If not, so create it an copy all other used things. The return is this
@@ -503,7 +503,7 @@ public:
const SwTOXType* GetTOXType() const; //
- USHORT GetCreateType() const; // creation types
+ sal_uInt16 GetCreateType() const; // creation types
const String& GetTOXName() const {return aName;}
void SetTOXName(const String& rSet) {aName = rSet;}
@@ -512,7 +512,7 @@ public:
const String& GetTypeName() const; // Name
const SwForm& GetTOXForm() const; // description of the lines
- void SetCreate(USHORT);
+ void SetCreate(sal_uInt16);
void SetTitle(const String& rTitle);
void SetTOXForm(const SwForm& rForm);
@@ -522,43 +522,43 @@ public:
void SetMainEntryCharStyle(const String& rSet) {sMainEntryCharStyle = rSet;}
// content index only
- inline void SetLevel(USHORT); // consider outline level
- inline USHORT GetLevel() const;
+ inline void SetLevel(sal_uInt16); // consider outline level
+ inline sal_uInt16 GetLevel() const;
// alphabetical index only
- inline USHORT GetOptions() const; // alphabetical index options
- inline void SetOptions(USHORT nOpt);
+ inline sal_uInt16 GetOptions() const; // alphabetical index options
+ inline void SetOptions(sal_uInt16 nOpt);
// index of objects
- USHORT GetOLEOptions() const {return nOLEOptions;}
- void SetOLEOptions(USHORT nOpt) {nOLEOptions = nOpt;}
+ sal_uInt16 GetOLEOptions() const {return nOLEOptions;}
+ void SetOLEOptions(sal_uInt16 nOpt) {nOLEOptions = nOpt;}
// index of objects
// user defined index only
inline void SetTemplateName(const String& rName); // Absatzlayout beachten
- const String& GetStyleNames(USHORT nLevel) const
+ const String& GetStyleNames(sal_uInt16 nLevel) const
{
DBG_ASSERT( nLevel < MAXLEVEL, "Which level?");
return aStyleNames[nLevel];
}
- void SetStyleNames(const String& rSet, USHORT nLevel)
+ void SetStyleNames(const String& rSet, sal_uInt16 nLevel)
{
DBG_ASSERT( nLevel < MAXLEVEL, "Which level?");
aStyleNames[nLevel] = rSet;
}
- BOOL IsFromChapter() const { return bFromChapter;}
- void SetFromChapter(BOOL bSet) { bFromChapter = bSet;}
+ sal_Bool IsFromChapter() const { return bFromChapter;}
+ void SetFromChapter(sal_Bool bSet) { bFromChapter = bSet;}
- BOOL IsFromObjectNames() const {return bFromObjectNames;}
- void SetFromObjectNames(BOOL bSet) {bFromObjectNames = bSet;}
+ sal_Bool IsFromObjectNames() const {return bFromObjectNames;}
+ void SetFromObjectNames(sal_Bool bSet) {bFromObjectNames = bSet;}
- BOOL IsLevelFromChapter() const {return bLevelFromChapter;}
- void SetLevelFromChapter(BOOL bSet) {bLevelFromChapter = bSet;}
+ sal_Bool IsLevelFromChapter() const {return bLevelFromChapter;}
+ void SetLevelFromChapter(sal_Bool bSet) {bLevelFromChapter = bSet;}
- BOOL IsProtected() const { return bProtected; }
- void SetProtected(BOOL bSet) { bProtected = bSet; }
+ sal_Bool IsProtected() const { return bProtected; }
+ void SetProtected(sal_Bool bSet) { bProtected = bSet; }
const String& GetSequenceName() const {return sSequenceName;}
void SetSequenceName(const String& rSet) {sSequenceName = rSet;}
@@ -566,7 +566,7 @@ public:
SwCaptionDisplay GetCaptionDisplay() const { return eCaptionDisplay;}
void SetCaptionDisplay(SwCaptionDisplay eSet) {eCaptionDisplay = eSet;}
- BOOL IsTOXBaseInReadonly() const;
+ sal_Bool IsTOXBaseInReadonly() const;
const SfxItemSet* GetAttrSet() const;
void SetAttrSet( const SfxItemSet& );
@@ -577,7 +577,7 @@ public:
const String& GetSortAlgorithm()const {return sSortAlgorithm;}
void SetSortAlgorithm(const String& rSet) {sSortAlgorithm = rSet;}
// #i21237#
- void AdjustTabStops(SwDoc & rDoc, BOOL bDefaultRightTabStop);
+ void AdjustTabStops(SwDoc & rDoc, sal_Bool bDefaultRightTabStop);
SwTOXBase& operator=(const SwTOXBase& rSource);
};
@@ -595,7 +595,7 @@ inline const String& SwTOXMark::GetAlternativeText() const
inline const SwTOXType* SwTOXMark::GetTOXType() const
{ return (SwTOXType*)GetRegisteredIn(); }
-inline BOOL SwTOXMark::IsAlternativeText() const
+inline sal_Bool SwTOXMark::IsAlternativeText() const
{ return aAltText.Len() > 0; }
inline void SwTOXMark::SetAlternativeText(const String& rAlt)
@@ -603,7 +603,7 @@ inline void SwTOXMark::SetAlternativeText(const String& rAlt)
aAltText = rAlt;
}
-inline void SwTOXMark::SetLevel( USHORT nLvl )
+inline void SwTOXMark::SetLevel( sal_uInt16 nLvl )
{
OSL_ENSURE( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
nLevel = nLvl;
@@ -639,7 +639,7 @@ inline void SwTOXMark::SetSecondaryKeyReading( const String& rKey )
aSecondaryKeyReading = rKey;
}
-inline USHORT SwTOXMark::GetLevel() const
+inline sal_uInt16 SwTOXMark::GetLevel() const
{
OSL_ENSURE( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
return nLevel;
@@ -678,13 +678,13 @@ inline const String& SwTOXMark::GetSecondaryKeyReading() const
//
//SwForm
//
-inline void SwForm::SetTemplate(USHORT nLevel, const String& rTemplate)
+inline void SwForm::SetTemplate(sal_uInt16 nLevel, const String& rTemplate)
{
OSL_ENSURE(nLevel < GetFormMax(), "Index >= FORM_MAX");
aTemplate[nLevel] = rTemplate;
}
-inline const String& SwForm::GetTemplate(USHORT nLevel) const
+inline const String& SwForm::GetTemplate(sal_uInt16 nLevel) const
{
OSL_ENSURE(nLevel < GetFormMax(), "Index >= FORM_MAX");
return aTemplate[nLevel];
@@ -695,7 +695,7 @@ inline TOXTypes SwForm::GetTOXType() const
return eType;
}
-inline USHORT SwForm::GetFormMax() const
+inline sal_uInt16 SwForm::GetFormMax() const
{
return nFormMaxLevel;
}
@@ -716,7 +716,7 @@ inline TOXTypes SwTOXType::GetType() const
inline const SwTOXType* SwTOXBase::GetTOXType() const
{ return (SwTOXType*)GetRegisteredIn(); }
-inline USHORT SwTOXBase::GetCreateType() const
+inline sal_uInt16 SwTOXBase::GetCreateType() const
{ return nCreateType; }
inline const String& SwTOXBase::GetTitle() const
@@ -728,12 +728,12 @@ inline const String& SwTOXBase::GetTypeName() const
inline const SwForm& SwTOXBase::GetTOXForm() const
{ return aForm; }
-inline void SwTOXBase::AdjustTabStops(SwDoc & rDoc, BOOL bDefaultRightTabStop)
+inline void SwTOXBase::AdjustTabStops(SwDoc & rDoc, sal_Bool bDefaultRightTabStop)
{
aForm.AdjustTabStops(rDoc, bDefaultRightTabStop);
}
-inline void SwTOXBase::SetCreate(USHORT nCreate)
+inline void SwTOXBase::SetCreate(sal_uInt16 nCreate)
{ nCreateType = nCreate; }
inline void SwTOXBase::SetTOXForm(const SwForm& rForm)
@@ -742,13 +742,13 @@ inline void SwTOXBase::SetTOXForm(const SwForm& rForm)
inline TOXTypes SwTOXBase::GetType() const
{ return GetTOXType()->GetType(); }
-inline void SwTOXBase::SetLevel(USHORT nLev)
+inline void SwTOXBase::SetLevel(sal_uInt16 nLev)
{
OSL_ENSURE(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
aData.nLevel = nLev;
}
-inline USHORT SwTOXBase::GetLevel() const
+inline sal_uInt16 SwTOXBase::GetLevel() const
{
OSL_ENSURE(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
return aData.nLevel;
@@ -760,13 +760,13 @@ inline void SwTOXBase::SetTemplateName(const String& rName)
aStyleNames[0] = rName;
}
-inline USHORT SwTOXBase::GetOptions() const
+inline sal_uInt16 SwTOXBase::GetOptions() const
{
OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
return aData.nOptions;
}
-inline void SwTOXBase::SetOptions(USHORT nOpt)
+inline void SwTOXBase::SetOptions(sal_uInt16 nOpt)
{
OSL_ENSURE(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
aData.nOptions = nOpt;
diff --git a/sw/inc/toxwrap.hxx b/sw/inc/toxwrap.hxx
index facead6132b1..9d641c4a01f0 100644
--- a/sw/inc/toxwrap.hxx
+++ b/sw/inc/toxwrap.hxx
@@ -61,7 +61,7 @@ public:
String GetIndexKey( const String& rTxt, const String& rTxtReading,
const STAR_NMSPC::lang::Locale& rLocale ) const;
- String GetFollowingText( BOOL bMorePages ) const;
+ String GetFollowingText( sal_Bool bMorePages ) const;
STAR_NMSPC::uno::Sequence< ::rtl::OUString >
GetAlgorithmList( const STAR_NMSPC::lang::Locale& rLcl ) const;
diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx
index 6ab8922f361c..9ea9b8376295 100644
--- a/sw/inc/txatbase.hxx
+++ b/sw/inc/txatbase.hxx
@@ -106,7 +106,7 @@ public:
inline const SfxPoolItem& GetAttr() const;
inline SfxPoolItem& GetAttr();
- inline USHORT Which() const { return GetAttr().Which(); }
+ inline sal_uInt16 Which() const { return GetAttr().Which(); }
virtual int operator==( const SwTxtAttr& ) const;
@@ -129,7 +129,7 @@ protected:
xub_StrLen m_nEnd;
public:
- SwTxtAttrEnd( SfxPoolItem& rAttr, USHORT nStart, USHORT nEnd );
+ SwTxtAttrEnd( SfxPoolItem& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
using SwTxtAttr::GetEnd;
virtual xub_StrLen* GetEnd();
diff --git a/sw/inc/txatritr.hxx b/sw/inc/txatritr.hxx
index 13af67950275..ada4c2fc1097 100644
--- a/sw/inc/txatritr.hxx
+++ b/sw/inc/txatritr.hxx
@@ -73,7 +73,7 @@ class SwTxtAttrIterator
void SearchNextChg();
public:
- SwTxtAttrIterator( const SwTxtNode& rTxtNd, USHORT nWhichId,
+ SwTxtAttrIterator( const SwTxtNode& rTxtNd, sal_uInt16 nWhichId,
xub_StrLen nStart = 0, sal_Bool bUseGetWhichOfScript = sal_True );
sal_Bool Next();
@@ -87,7 +87,7 @@ class SwLanguageIterator : public SwTxtAttrIterator
{
public:
SwLanguageIterator( const SwTxtNode& rTxtNode, xub_StrLen nStart = 0,
- USHORT nWhich = RES_CHRATR_LANGUAGE,
+ sal_uInt16 nWhich = RES_CHRATR_LANGUAGE,
sal_Bool bUseGetWhichOfScript = sal_True )
: SwTxtAttrIterator( rTxtNode, nWhich, nStart, bUseGetWhichOfScript )
{}
diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx
index 2e14cf50377e..c3b816cc0d88 100644
--- a/sw/inc/txtatr.hxx
+++ b/sw/inc/txtatr.hxx
@@ -40,7 +40,7 @@ class SwCharFmt;
class SwTxtCharFmt : public SwTxtAttrEnd
{
SwTxtNode * m_pTxtNode;
- USHORT m_nSortNumber;
+ sal_uInt16 m_nSortNumber;
public:
SwTxtCharFmt( SwFmtCharFmt& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
@@ -48,13 +48,13 @@ public:
// werden vom SwFmtCharFmt hierher weitergeleitet
virtual void Modify( SfxPoolItem*, SfxPoolItem* ); // SwClient
- virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
// get and set TxtNode pointer
void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
- void SetSortNumber( USHORT nSortNumber ) { m_nSortNumber = nSortNumber; }
- USHORT GetSortNumber() const { return m_nSortNumber; }
+ void SetSortNumber( sal_uInt16 nSortNumber ) { m_nSortNumber = nSortNumber; }
+ sal_uInt16 GetSortNumber() const { return m_nSortNumber; }
};
@@ -96,7 +96,7 @@ public:
TYPEINFO();
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
- virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
/// get and set TxtNode pointer
const SwTxtNode* GetpTxtNode() const { return m_pTxtNode; }
diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx
index f5748117bf93..3ecabb8889bc 100644
--- a/sw/inc/txtfld.hxx
+++ b/sw/inc/txtfld.hxx
@@ -42,8 +42,7 @@ class SwTxtFld : public SwTxtAttr
SwTxtNode * m_pTxtNode;
public:
- SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStart,
- bool const bInClipboard);
+ SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStart);
virtual ~SwTxtFld();
void CopyFld( SwTxtFld *pDest ) const;
diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx
index 55eaa777b3c7..36fbfb0ee269 100644
--- a/sw/inc/txtftn.hxx
+++ b/sw/inc/txtftn.hxx
@@ -41,15 +41,15 @@ class SW_DLLPUBLIC SwTxtFtn : public SwTxtAttr
{
SwNodeIndex * m_pStartNode;
SwTxtNode * m_pTxtNode;
- USHORT m_nSeqNo;
+ sal_uInt16 m_nSeqNo;
public:
SwTxtFtn( SwFmtFtn& rAttr, xub_StrLen nStart );
virtual ~SwTxtFtn();
inline SwNodeIndex *GetStartNode() const { return m_pStartNode; }
- void SetStartNode( const SwNodeIndex *pNode, BOOL bDelNodes = TRUE );
- void SetNumber( const USHORT nNumber, const String* = 0 );
+ void SetStartNode( const SwNodeIndex *pNode, sal_Bool bDelNodes = sal_True );
+ void SetNumber( const sal_uInt16 nNumber, const String* = 0 );
void CopyFtn(SwTxtFtn & rDest, SwTxtNode & rDestNode) const;
// get and set TxtNode pointer
@@ -65,9 +65,9 @@ public:
void CheckCondColl();
// fuer die Querverweise auf Fussnoten
- USHORT SetSeqRefNo();
- void SetSeqNo( USHORT n ) { m_nSeqNo = n; } // for Readers
- USHORT GetSeqRefNo() const { return m_nSeqNo; }
+ sal_uInt16 SetSeqRefNo();
+ void SetSeqNo( sal_uInt16 n ) { m_nSeqNo = n; } // for Readers
+ sal_uInt16 GetSeqRefNo() const { return m_nSeqNo; }
static void SetUniqueSeqRefNo( SwDoc& rDoc );
};
diff --git a/sw/inc/txtinet.hxx b/sw/inc/txtinet.hxx
index 48096c4f5cb3..d09792c915cf 100644
--- a/sw/inc/txtinet.hxx
+++ b/sw/inc/txtinet.hxx
@@ -52,7 +52,7 @@ public:
TYPEINFO();
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
- virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
// get and set TxtNode pointer
const SwTxtNode* GetpTxtNode() const { return m_pTxtNode; }
@@ -69,7 +69,7 @@ public:
bool IsVisitedValid() const { return m_bVisitedValid; }
void SetVisitedValid( bool bNew ) { m_bVisitedValid = bNew; }
- BOOL IsProtect() const;
+ sal_Bool IsProtect() const;
};
inline const SwTxtNode& SwTxtINetFmt::GetTxtNode() const
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index c60c3a16e415..dda46d6ef8b5 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -29,114 +29,48 @@
#define SW_UNDOBJ_HXX
#include <vector>
-#include <memory>
#include <boost/shared_ptr.hpp>
-#include <com/sun/star/uno/Sequence.h>
+#include <svl/undo.hxx>
-#include <tools/mempool.hxx>
-#ifndef _SVSTDARR_HXX
-#define _SVSTDARR_USHORTS
-#define _SVSTDARR_ULONGS
-#define _SVSTDARR_USHORTSSORT
-#include <svl/svstdarr.hxx>
-#endif
-#include <svl/itemset.hxx>
-
-#include <svx/svdundo.hxx>
-
-#include <numrule.hxx>
-#include <itabenum.hxx>
-#include <format.hxx>
#include <SwRewriter.hxx>
#include <swundo.hxx>
-#include <IMark.hxx>
-#include <IDocumentContentOperations.hxx>
-class SwUndoIter;
class SwHistory;
class SwIndex;
class SwPaM;
struct SwPosition;
class SwDoc;
-class SwFmt;
-class SwFmtColl;
class SwTxtFmtColl;
-class SwTxtNode;
-class SwTableNode;
-class SwTable;
-class SwTableBox;
-struct SwSortOptions;
class SwFrmFmt;
-class SwHistoryBookmark;
-class SwSectionData;
-class SwSectionFmt;
-class SwTOXBase;
-class SvxTabStopItem;
-class SwDDEFieldType;
-class Graphic;
-class SwGrfNode;
-class SwUndos;
-class SwFtnInfo;
-class SwEndNoteInfo;
class SwNodeIndex;
class SwNodeRange;
-class SwFmtAnchor;
-struct SwUndoGroupObjImpl;
-class SdrMark;
-class SdrMarkList;
-class SdrObject;
-class SdrObjGroup;
-class SdrUndoAction;
-class SwDrawFrmFmt;
-class _SaveTable;
-class SwTableAutoFmt;
-class SwSelBoxes;
-class SwTableSortBoxes;
-class SwUndoSaveSections;
-class SwUndoMoves;
-class SwStartNode;
-class _SaveFlyArr;
-class SwTblToTxtSaves;
class SwRedlineData;
-class SwRedlineSaveData;
-class SwRedline;
-struct SwSaveRowSpan;
-
-namespace sfx2 {
- class MetadatableUndo;
-}
+class SwRedlineSaveDatas;
-namespace utl {
- class TransliterationWrapper;
+namespace sw {
+ class UndoRedoContext;
+ class RepeatContext;
}
-SW_DLLPUBLIC extern const String UNDO_ARG1;
-SW_DLLPUBLIC extern const String UNDO_ARG2;
-SW_DLLPUBLIC extern const String UNDO_ARG3;
-
-typedef SwRedlineSaveData* SwRedlineSaveDataPtr;
-SV_DECL_PTRARR_DEL( SwRedlineSaveDatas, SwRedlineSaveDataPtr, 8, 8 )
-
class SwUndo
+ : public SfxUndoAction
{
- SwUndoId nId;
- USHORT nOrigRedlineMode;
+ SwUndoId const m_nId;
+ sal_uInt16 nOrigRedlineMode;
protected:
bool bCacheComment;
mutable String * pComment;
- void RemoveIdxFromSection( SwDoc&, ULONG nSttIdx, ULONG* pEndIdx = 0 );
- void RemoveIdxFromRange( SwPaM& rPam, BOOL bMoveNext );
- void RemoveIdxRel( ULONG, const SwPosition& );
+ void RemoveIdxFromSection( SwDoc&, sal_uLong nSttIdx, sal_uLong* pEndIdx = 0 );
+ void RemoveIdxFromRange( SwPaM& rPam, sal_Bool bMoveNext );
+ void RemoveIdxRel( sal_uLong, const SwPosition& );
- void SetId( SwUndoId nNew ) { nId = nNew; }
-
- static BOOL CanRedlineGroup( SwRedlineSaveDatas& rCurr,
+ static sal_Bool CanRedlineGroup( SwRedlineSaveDatas& rCurr,
const SwRedlineSaveDatas& rCheck,
- BOOL bCurrIsEnd );
+ sal_Bool bCurrIsEnd );
/**
Returns the rewriter for this object.
@@ -144,16 +78,31 @@ protected:
@return the rewriter for this object
*/
virtual SwRewriter GetRewriter() const;
+
+ // return type is sal_uInt16 because this overrides SfxUndoAction::GetId()
+ virtual sal_uInt16 GetId() const { return static_cast<sal_uInt16>(m_nId); }
+
+ // the 4 methods that derived classes have to override
+ // base implementation does nothing
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+ virtual bool CanRepeatImpl( ::sw::RepeatContext & ) const;
+public: // should not be public, but ran into trouble in untbl.cxx
+ virtual void UndoImpl( ::sw::UndoRedoContext & ) = 0;
+ virtual void RedoImpl( ::sw::UndoRedoContext & ) = 0;
+
+private:
+ // SfxUndoAction
+ virtual void Undo();
+ virtual void Redo();
+ virtual void UndoWithContext(SfxUndoContext &);
+ virtual void RedoWithContext(SfxUndoContext &);
+ virtual void Repeat(SfxRepeatTarget &);
+ virtual sal_Bool CanRepeat(SfxRepeatTarget &) const;
+
public:
- SwUndo( SwUndoId nI );
+ SwUndo(SwUndoId const nId);
virtual ~SwUndo();
- SwUndoId GetId() const { return nId; }
- virtual SwUndoId GetEffectiveId() const;
- virtual void Undo( SwUndoIter& ) = 0;
- virtual void Redo( SwUndoIter& ) = 0;
- virtual void Repeat( SwUndoIter& );
-
/**
Returns textual comment for this undo object.
@@ -167,20 +116,20 @@ public:
// das UndoObject merkt sich, welcher Mode eingeschaltet war.
// In Undo/Redo/Repeat wird dann immer auf diesen zurueck geschaltet
- USHORT GetRedlineMode() const { return nOrigRedlineMode; }
- void SetRedlineMode( USHORT eMode ) { nOrigRedlineMode = eMode; }
+ sal_uInt16 GetRedlineMode() const { return nOrigRedlineMode; }
+ void SetRedlineMode( sal_uInt16 eMode ) { nOrigRedlineMode = eMode; }
bool IsDelBox() const;
// sicher und setze die RedlineDaten
- static BOOL FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData,
- BOOL bDelRange = TRUE, BOOL bCopyNext = TRUE );
- static BOOL FillSaveDataForFmt( const SwPaM& , SwRedlineSaveDatas& );
+ static sal_Bool FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData,
+ sal_Bool bDelRange = sal_True, sal_Bool bCopyNext = sal_True );
+ static sal_Bool FillSaveDataForFmt( const SwPaM& , SwRedlineSaveDatas& );
static void SetSaveData( SwDoc& rDoc, const SwRedlineSaveDatas& rSData );
- static BOOL HasHiddenRedlines( const SwRedlineSaveDatas& rSData );
+ static sal_Bool HasHiddenRedlines( const SwRedlineSaveDatas& rSData );
};
-typedef USHORT DelCntntType;
+typedef sal_uInt16 DelCntntType;
namespace nsDelCntntType
{
const DelCntntType DELCNT_FTN = 0x01;
@@ -212,17 +161,17 @@ protected:
// MoveFrom.. verschiebt aus dem UndoNodesArray in das NodesArray
void MoveToUndoNds( SwPaM& rPam,
SwNodeIndex* pNodeIdx = 0, SwIndex* pCntIdx = 0,
- ULONG* pEndNdIdx = 0, xub_StrLen * pEndCntIdx = 0 );
- void MoveFromUndoNds( SwDoc& rDoc, ULONG nNodeIdx, xub_StrLen nCntntIdx,
+ sal_uLong* pEndNdIdx = 0, xub_StrLen * pEndCntIdx = 0 );
+ void MoveFromUndoNds( SwDoc& rDoc, sal_uLong nNodeIdx, xub_StrLen nCntntIdx,
SwPosition& rInsPos,
- ULONG* pEndNdIdx = 0, xub_StrLen * pEndCntIdx = 0 );
+ sal_uLong* pEndNdIdx = 0, xub_StrLen * pEndCntIdx = 0 );
// diese beiden Methoden bewegen den SPoint vom Pam zurueck/vor. Damit
// kann fuer ein Undo/Redo ein Bereich aufgespannt werden. (Der
// SPoint liegt dann vor dem manipuliertem Bereich !!)
// Das Flag gibt an, ob noch vorm SPoint Inhalt steht.
- BOOL MovePtBackward( SwPaM& rPam );
- void MovePtForward( SwPaM& rPam, BOOL bMvBkwrd );
+ sal_Bool MovePtBackward( SwPaM& rPam );
+ void MovePtForward( SwPaM& rPam, sal_Bool bMvBkwrd );
// vor dem Move ins UndoNodes-Array muss dafuer gesorgt werden, das
// die Inhaltstragenden Attribute aus dem Nodes-Array entfernt werden.
@@ -239,12 +188,12 @@ class SwUndoSaveSection : private SwUndoSaveCntnt
{
SwNodeIndex *pMvStt;
SwRedlineSaveDatas* pRedlSaveData;
- ULONG nMvLen; // Index ins UndoNodes-Array
- ULONG nStartPos;
+ sal_uLong nMvLen; // Index ins UndoNodes-Array
+ sal_uLong nStartPos;
protected:
SwNodeIndex* GetMvSttIdx() const { return pMvStt; }
- ULONG GetMvNodeCnt() const { return nMvLen; }
+ sal_uLong GetMvNodeCnt() const { return nMvLen; }
public:
SwUndoSaveSection();
@@ -252,496 +201,57 @@ public:
void SaveSection( SwDoc* pDoc, const SwNodeIndex& rSttIdx );
void SaveSection( SwDoc* pDoc, const SwNodeRange& rRange );
- void RestoreSection( SwDoc* pDoc, SwNodeIndex* pIdx, USHORT nSectType );
+ void RestoreSection( SwDoc* pDoc, SwNodeIndex* pIdx, sal_uInt16 nSectType );
void RestoreSection( SwDoc* pDoc, const SwNodeIndex& rInsPos );
const SwHistory* GetHistory() const { return pHistory; }
SwHistory* GetHistory() { return pHistory; }
};
-// Diese Klasse speichert den Pam als USHORT's und kann diese wieder zu
+// Diese Klasse speichert den Pam als sal_uInt16's und kann diese wieder zu
// einem PaM zusammensetzen
class SwUndRng
{
public:
- ULONG nSttNode, nEndNode;
+ sal_uLong nSttNode, nEndNode;
xub_StrLen nSttCntnt, nEndCntnt;
SwUndRng();
SwUndRng( const SwPaM& );
void SetValues( const SwPaM& rPam );
- void SetPaM( SwPaM&, BOOL bCorrToCntnt = FALSE ) const;
- void SetPaM( SwUndoIter&, BOOL bCorrToCntnt = FALSE ) const;
-};
-
-class SwUndoStart: public SwUndo
-{
- // Um innerhalb von Undo zuerkennen, wann ein Start vorliegt, gibt
- // GetId() immer die UNDO_START zurueck. Die UserId kann ueber
- // GetUserId() erfragt werden.
- SwUndoId nUserId;
- // fuer die "Verpointerung" von Start- und End-Undos
- USHORT nEndOffset;
-
- SwRewriter mRewriter;
-
-public:
- SwUndoStart( SwUndoId nId );
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-
- virtual String GetComment() const;
- void SetRewriter(const SwRewriter & rRewriter);
- virtual SwRewriter GetRewriter() const;
-
- virtual SwUndoId GetEffectiveId() const;
- SwUndoId GetUserId() const { return nUserId; }
- // Setzen vom End-Undo-Offset geschieht im Doc::EndUndo
- USHORT GetEndOffset() const { return nEndOffset; }
- void SetEndOffset( USHORT n ) { nEndOffset = n; }
-};
-
-class SwUndoEnd: public SwUndo
-{
- // Um innerhalb von Undo zuerkennen, wann ein Ende vorliegt, gibt
- // GetId() immer die UNDO_END zurueck. Die UserId kann ueber
- // GetUserId() erfragt werden.
- SwUndoId nUserId;
- // fuer die "Verpointerung" von Start- und End-Undos
- USHORT nSttOffset;
-
- SwRewriter mRewriter;
-
-public:
- SwUndoEnd( SwUndoId nId );
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-
- virtual String GetComment() const;
- void SetRewriter(const SwRewriter & rRewriter);
- virtual SwRewriter GetRewriter() const;
-
- virtual SwUndoId GetEffectiveId() const;
- SwUndoId GetUserId() const { return nUserId; }
-
- // Setzen vom Start-Undo-Offset geschieht im Doc::EndUndo
- void SetSttOffset(USHORT _nSttOffSet) { nSttOffset = _nSttOffSet; }
- USHORT GetSttOffset() const { return nSttOffset; }
-};
-
-class SwUndoInsert: public SwUndo, private SwUndoSaveCntnt
-{
- SwPosition *pPos; // Inhalt fuers Redo
- String *pTxt, *pUndoTxt;
- SwRedlineData* pRedlData;
- ULONG nNode;
- xub_StrLen nCntnt, nLen;
- BOOL bIsWordDelim : 1;
- BOOL bIsAppend : 1;
-
- const IDocumentContentOperations::InsertFlags m_nInsertFlags;
-
- friend class SwDoc; // eigentlich nur SwDoc::Insert( String )
- BOOL CanGrouping( sal_Unicode cIns );
- BOOL CanGrouping( const SwPosition& rPos );
-
- SwDoc * pDoc;
-
- void Init(const SwNodeIndex & rNode);
- String * GetTxtFromDoc() const;
-
-public:
- SwUndoInsert( const SwNodeIndex& rNode, xub_StrLen nCntnt, xub_StrLen nLen,
- const IDocumentContentOperations::InsertFlags nInsertFlags,
- BOOL bWDelim = TRUE );
- SwUndoInsert( const SwNodeIndex& rNode );
- virtual ~SwUndoInsert();
-
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-
- /**
- Returns rewriter for this undo object.
-
- The returned rewriter has the following rule:
-
- $1 -> '<inserted text>'
-
- <inserted text> is shortened to a length of nUndoStringLength.
-
- @return rewriter for this undo object
- */
- virtual SwRewriter GetRewriter() const;
-
- DECL_FIXEDMEMPOOL_NEWDEL(SwUndoInsert)
-};
-
-class SwUndoDelete: public SwUndo, private SwUndRng, private SwUndoSaveCntnt
-{
- SwNodeIndex* pMvStt; // Position der Nodes im UndoNodes-Array
- String *pSttStr, *pEndStr;
- SwRedlineData* pRedlData;
- SwRedlineSaveDatas* pRedlSaveData;
- ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoStart;
- ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoEnd;
-
- String sTableName;
-
- ULONG nNode;
- ULONG nNdDiff; // Differenz von Nodes vor-nach Delete
- ULONG nSectDiff; // Diff. von Nodes vor/nach Move mit SectionNodes
- ULONG nReplaceDummy; // Diff. to a temporary dummy object
- USHORT nSetPos;
-
- BOOL bGroup : 1; // TRUE: ist schon eine Gruppe; wird in CanGrouping() ausgwertet !!
- BOOL bBackSp : 1; // TRUE: wenn Gruppierung und der Inhalt davor geloescht wird
- BOOL bJoinNext: 1; // TRUE: wenn der Bereich von Oben nach unten geht
- BOOL bTblDelLastNd : 1; // TRUE: TextNode hinter der Tabelle einf./loeschen
- BOOL bDelFullPara : 1; // TRUE: gesamte Nodes wurden geloescht
- BOOL bResetPgDesc : 1; // TRUE: am nachfolgenden Node das PgDsc zuruecksetzen
- BOOL bResetPgBrk : 1; // TRUE: am nachfolgenden Node das PgBreak zuruecksetzen
- BOOL bFromTableCopy : 1; // TRUE: called by SwUndoTblCpyTbl
-
- BOOL SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd,
- SwTxtNode* pSttTxtNd, SwTxtNode* pEndTxtNd );
-public:
- SwUndoDelete( SwPaM&, BOOL bFullPara = FALSE, BOOL bCalledByTblCpy = FALSE );
- virtual ~SwUndoDelete();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-
- /**
- Returns rewriter for this undo object.
-
- The rewriter consists of the following rule:
-
- $1 -> '<deleted text>'
-
- <deleted text> is shortened to nUndoStringLength characters.
-
- @return rewriter for this undo object
- */
- virtual SwRewriter GetRewriter() const;
-
- BOOL CanGrouping( SwDoc*, const SwPaM& );
-
- void SetTblDelLastNd() { bTblDelLastNd = TRUE; }
-
- // for PageDesc/PageBreak Attribute of a table
- void SetPgBrkFlags( BOOL bPageBreak, BOOL bPageDesc )
- { bResetPgDesc = bPageDesc; bResetPgBrk = bPageBreak; }
-
- void SetTableName(const String & rName);
-
- // SwUndoTblCpyTbl needs this information:
- long NodeDiff() const { return nSttNode - nEndNode; }
- xub_StrLen ContentStart() const { return nSttCntnt; }
- BOOL IsDelFullPara() const { return bDelFullPara; }
-
- DECL_FIXEDMEMPOOL_NEWDEL(SwUndoDelete)
-};
-
-class SwUndoOverwrite: public SwUndo, private SwUndoSaveCntnt
-{
- String aDelStr, aInsStr;
- SwRedlineSaveDatas* pRedlSaveData;
- ULONG nSttNode;
- xub_StrLen nSttCntnt;
- BOOL bInsChar : 1; // no more OverWrite; use Insert
- BOOL bGroup : 1; // TRUE: ist schon eine Gruppe; wird in
- // CanGrouping() ausgwertet !!
-public:
- SwUndoOverwrite( SwDoc*, SwPosition&, sal_Unicode cIns );
- virtual ~SwUndoOverwrite();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-
- /**
- Returns the rewriter of this undo object.
-
- The rewriter contains the following rule:
-
- $1 -> '<overwritten text>'
-
- <overwritten text> is shortened to nUndoStringLength characters.
-
- @return the rewriter of this undo object
- */
- virtual SwRewriter GetRewriter() const;
-
- BOOL CanGrouping( SwDoc*, SwPosition&, sal_Unicode cIns );
-};
-
-class SwUndoSplitNode: public SwUndo
-{
- SwHistory* pHistory;
- SwRedlineData* pRedlData;
- ULONG nNode;
- xub_StrLen nCntnt;
- BOOL bTblFlag : 1;
- BOOL bChkTblStt : 1;
-public:
- SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos, BOOL bChkTbl );
- virtual ~SwUndoSplitNode();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
- void SetTblFlag() { bTblFlag = TRUE; }
-};
-
-class SwUndoMove : public SwUndo, private SwUndRng, private SwUndoSaveCntnt
-{
- // nDest.. - Bereich, in den verschoben wurde (nach dem Move!)
- // nIns.. - Position, von der verschoben wurde und wieder die neue InsPos. ist
- // nMv.. Position auf die verschoben wird (vor dem Move!) ; fuers REDO
- ULONG nDestSttNode, nDestEndNode, nInsPosNode, nMvDestNode;
- xub_StrLen nDestSttCntnt, nDestEndCntnt, nInsPosCntnt, nMvDestCntnt;
-
- USHORT nFtnStt; // StartPos der Fussnoten in der History
-
- BOOL bJoinNext : 1,
- bJoinPrev : 1,
- bMoveRange : 1;
-
- bool bMoveRedlines; // use DOC_MOVEREDLINES when calling SwDoc::Move
-
- void DelFtn( const SwPaM& );
-public:
- SwUndoMove( const SwPaM&, const SwPosition& );
- SwUndoMove( SwDoc* pDoc, const SwNodeRange&, const SwNodeIndex& );
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- // setze den Destination-Bereich nach dem Verschieben.
- void SetDestRange( const SwPaM&, const SwPosition&, BOOL, BOOL );
- void SetDestRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd,
- const SwNodeIndex& rInsPos );
-
- BOOL IsMoveRange() const { return bMoveRange; }
- ULONG GetEndNode() const { return nEndNode; }
- ULONG GetDestSttNode() const { return nDestSttNode; }
- xub_StrLen GetDestSttCntnt() const { return nDestSttCntnt; }
-
- void SetMoveRedlines( bool b ) { bMoveRedlines = b; }
-
-};
-
-class SwUndoAttr : public SwUndo, private SwUndRng
-{
- SfxItemSet m_AttrSet; // attributes for Redo
- const ::std::auto_ptr<SwHistory> m_pHistory; // History for Undo
- ::std::auto_ptr<SwRedlineData> m_pRedlineData; // Redlining
- ::std::auto_ptr<SwRedlineSaveDatas> m_pRedlineSaveData;
- ULONG m_nNodeIndex; // Offset: for Redlining
- const SetAttrMode m_nInsertFlags; // insert flags
-
- void RemoveIdx( SwDoc& rDoc );
-
-public:
- SwUndoAttr( const SwPaM&, const SfxItemSet &, const SetAttrMode nFlags );
- SwUndoAttr( const SwPaM&, const SfxPoolItem&, const SetAttrMode nFlags );
- virtual ~SwUndoAttr();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
- void SaveRedlineData( const SwPaM& rPam, BOOL bInsCntnt );
-
- SwHistory& GetHistory() { return *m_pHistory; }
-
-};
-
-class SwUndoResetAttr : public SwUndo, private SwUndRng
-{
- const ::std::auto_ptr<SwHistory> m_pHistory;
- SvUShortsSort m_Ids;
- const USHORT m_nFormatId; // Format-Id for Redo
-
-public:
- SwUndoResetAttr( const SwPaM&, USHORT nFmtId );
- SwUndoResetAttr( const SwPosition&, USHORT nFmtId );
- virtual ~SwUndoResetAttr();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
- void SetAttrs( const SvUShortsSort& rArr );
-
- SwHistory& GetHistory() { return *m_pHistory; }
-
-};
-
-class SwUndoFmtAttr : public SwUndo
-{
- friend class SwUndoDefaultAttr;
- SwFmt * m_pFmt;
- ::std::auto_ptr<SfxItemSet> m_pOldSet; // old attributes
- ULONG m_nNodeIndex;
- const USHORT m_nFmtWhich;
- const bool m_bSaveDrawPt;
-
- bool IsFmtInDoc( SwDoc* ); //is the attribute format still in the Doc?
- void SaveFlyAnchor( bool bSaveDrawPt = false );
- // Return value indicates, if anchor attribute is restored.
- // Notes: - If anchor attribute is restored, all other existing attributes
- // are also restored.
- // - Anchor attribute isn't restored successfully, if it contains
- // an invalid anchor position and all other existing attributes
- // aren't restored.
- // This situation occurs for undo of styles.
- bool RestoreFlyAnchor( SwUndoIter& rIter );
-
- void Init();
-
-public:
- // register at the Format and save old attributes
- SwUndoFmtAttr( const SfxItemSet& rOldSet,
- SwFmt& rFmt,
- bool bSaveDrawPt = true );
- SwUndoFmtAttr( const SfxPoolItem& rItem,
- SwFmt& rFmt,
- bool bSaveDrawPt = true );
- virtual ~SwUndoFmtAttr();
- virtual void Undo( SwUndoIter& );
-
- virtual void Redo( SwUndoIter& );
-
- virtual void Repeat( SwUndoIter& );
- virtual SwRewriter GetRewriter() const;
-
- void PutAttr( const SfxPoolItem& rItem );
- SwFmt* GetFmt( SwDoc& rDoc ); // checks if it is still in the Doc!
-};
-
-class SwUndoFmtResetAttr : public SwUndo
-{
- public:
- SwUndoFmtResetAttr( SwFmt& rChangedFormat,
- const USHORT nWhichId );
- ~SwUndoFmtResetAttr();
-
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-
- private:
- // format at which a certain attribute is reset.
- SwFmt * const m_pChangedFormat;
- // which ID of the reset attribute
- const USHORT m_nWhichId;
- // old attribute which has been reset - needed for undo.
- ::std::auto_ptr<SfxPoolItem> m_pOldItem;
-};
-
-class SwUndoDontExpandFmt : public SwUndo
-{
- const ULONG m_nNodeIndex;
- const xub_StrLen m_nContentIndex;
-
-public:
- SwUndoDontExpandFmt( const SwPosition& rPos );
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
+ void SetPaM( SwPaM&, sal_Bool bCorrToCntnt = sal_False ) const;
+ SwPaM & AddUndoRedoPaM(
+ ::sw::UndoRedoContext &, bool const bCorrToCntnt = false) const;
};
-// helper class to receive changed attribute sets
-class SwUndoFmtAttrHelper : public SwClient
-{
- ::std::auto_ptr<SwUndoFmtAttr> m_pUndo;
- const bool m_bSaveDrawPt;
-
-public:
- SwUndoFmtAttrHelper( SwFmt& rFmt, bool bSaveDrawPt = true );
-
- virtual void Modify( SfxPoolItem*, SfxPoolItem* );
-
- SwUndoFmtAttr* GetUndo() const { return m_pUndo.get(); }
- // release the undo object (so it is not deleted here), and return it
- SwUndoFmtAttr* ReleaseUndo() { return m_pUndo.release(); }
-};
-
-class SwUndoFmtColl : public SwUndo, private SwUndRng
-{
- String aFmtName;
- SwHistory* pHistory;
- SwFmtColl* pFmtColl;
- // boolean, which indicates that the attributes are reseted at the nodes
- // before the format has been applied.
- const bool mbReset;
- // boolean, which indicates that the list attributes had been reseted at
- // the nodes before the format has been applied.
- const bool mbResetListAttrs;
-public:
-
- SwUndoFmtColl( const SwPaM&, SwFmtColl*,
- const bool bReset,
- const bool bResetListAttrs );
- virtual ~SwUndoFmtColl();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-
- /**
- Returns the rewriter for this undo object.
- The rewriter contains one rule:
+class SwUndoInsLayFmt;
- $1 -> <name of format collection>
-
- <name of format collection> is the name of the format
- collection that is applied by the action recorded by this undo
- object.
-
- @return the rewriter for this undo object
- */
- virtual SwRewriter GetRewriter() const;
-
- SwHistory* GetHistory() { return pHistory; }
-
-};
-
-class SwUndoMoveLeftMargin : public SwUndo, private SwUndRng
-{
- const ::std::auto_ptr<SwHistory> m_pHistory;
- const bool m_bModulus;
-
-public:
- SwUndoMoveLeftMargin( const SwPaM&, BOOL bRight, BOOL bModulus );
- virtual ~SwUndoMoveLeftMargin();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-
- SwHistory& GetHistory() { return *m_pHistory; }
-
-};
-
-// Basis-Klasse fuer Insert von Dokument, Glossaries und Kopieren
+// base class for insertion of Document, Glossaries and Copy
class SwUndoInserts : public SwUndo, public SwUndRng, private SwUndoSaveCntnt
{
SwTxtFmtColl *pTxtFmtColl, *pLastNdColl;
SvPtrarr* pFrmFmts;
- SwUndos* pFlyUndos;
+ ::std::vector< ::boost::shared_ptr<SwUndoInsLayFmt> > m_FlyUndos;
SwRedlineData* pRedlData;
- BOOL bSttWasTxtNd;
+ sal_Bool bSttWasTxtNd;
protected:
- ULONG nNdDiff;
+ sal_uLong nNdDiff;
SwPosition *pPos; // Inhalt fuers Redo
- USHORT nSetPos; // Start in der History-Liste
+ sal_uInt16 nSetPos; // Start in der History-Liste
SwUndoInserts( SwUndoId nUndoId, const SwPaM& );
public:
virtual ~SwUndoInserts();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
// setze den Destination-Bereich nach dem Einlesen.
- void SetInsertRange( const SwPaM&, BOOL bScanFlys = TRUE,
- BOOL bSttWasTxtNd = TRUE );
+ void SetInsertRange( const SwPaM&, sal_Bool bScanFlys = sal_True,
+ sal_Bool bSttWasTxtNd = sal_True );
};
class SwUndoInsDoc : public SwUndoInserts
@@ -756,416 +266,42 @@ public:
SwUndoCpyDoc( const SwPaM& );
};
-class SwUndoInsTbl : public SwUndo
-{
- String sTblNm;
- SwInsertTableOptions aInsTblOpts;
- SwDDEFieldType* pDDEFldType;
- SvUShorts* pColWidth;
- SwRedlineData* pRedlData;
- SwTableAutoFmt* pAutoFmt;
- ULONG nSttNode;
- USHORT nRows, nCols;
- USHORT nAdjust;
-
-public:
- SwUndoInsTbl( const SwPosition&, USHORT nCols, USHORT nRows,
- USHORT eAdjust, const SwInsertTableOptions& rInsTblOpts,
- const SwTableAutoFmt* pTAFmt, const SvUShorts* pColArr,
- const String & rName);
- virtual ~SwUndoInsTbl();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-
- virtual SwRewriter GetRewriter() const;
-
-};
-
-class SwUndoTxtToTbl : public SwUndo, public SwUndRng
-{
- String sTblNm;
- SwInsertTableOptions aInsTblOpts;
- SvULongs* pDelBoxes;
- SwTableAutoFmt* pAutoFmt;
- SwHistory* pHistory;
- sal_Unicode cTrenner;
- USHORT nAdjust;
- BOOL bSplitEnd : 1;
-
-public:
- SwUndoTxtToTbl( const SwPaM&, const SwInsertTableOptions&, sal_Unicode , USHORT,
- const SwTableAutoFmt* pAFmt );
- virtual ~SwUndoTxtToTbl();
-
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-
- SwHistory& GetHistory(); // wird ggfs. angelegt
- void AddFillBox( const SwTableBox& rBox );
-};
-
-class SwUndoTblToTxt : public SwUndo
-{
- String sTblNm;
- SwDDEFieldType* pDDEFldType;
- _SaveTable* pTblSave;
- SwTblToTxtSaves* pBoxSaves;
- SwHistory* pHistory;
- ULONG nSttNd, nEndNd;
- USHORT nAdjust;
- sal_Unicode cTrenner;
- USHORT nHdlnRpt;
- BOOL bCheckNumFmt : 1;
-
-public:
- SwUndoTblToTxt( const SwTable& rTbl, sal_Unicode cCh );
- virtual ~SwUndoTblToTxt();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-
- void SetRange( const SwNodeRange& );
- void AddBoxPos( SwDoc& rDoc, ULONG nNdIdx, ULONG nEndIdx,
- xub_StrLen nCntntIdx = STRING_MAXLEN);
-};
-
-class SwUndoAttrTbl : public SwUndo
-{
- ULONG nSttNode;
- _SaveTable* pSaveTbl;
- BOOL bClearTabCol : 1;
-public:
- SwUndoAttrTbl( const SwTableNode& rTblNd, BOOL bClearTabCols = FALSE );
- virtual ~SwUndoAttrTbl();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-};
-
-class SwUndoTblAutoFmt : public SwUndo
-{
- ULONG nSttNode;
- _SaveTable* pSaveTbl;
- SwUndos* pUndos;
- BOOL bSaveCntntAttr;
-
- void UndoRedo( BOOL bUndo, SwUndoIter& rUndoIter );
-
-public:
- SwUndoTblAutoFmt( const SwTableNode& rTblNd, const SwTableAutoFmt& );
- virtual ~SwUndoTblAutoFmt();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- void SaveBoxCntnt( const SwTableBox& rBox );
-};
-
-class SwUndoTblNdsChg : public SwUndo
-{
- _SaveTable* pSaveTbl;
- SvULongs aBoxes;
-
- union {
- SvULongs* pNewSttNds;
- SwUndoSaveSections* pDelSects;
- } Ptrs;
- std::vector<bool> aMvBoxes; // fuers SplitRow (aufgeteilte Nodes einer Box)
- long nMin, nMax; // for redo of delete column
- ULONG nSttNode, nCurrBox;
- USHORT nCount, nRelDiff, nAbsDiff, nSetColType;
- BOOL bFlag;
- BOOL bSameHeight; // only used for SplitRow
-public:
- SwUndoTblNdsChg( SwUndoId UndoId,
- const SwSelBoxes& rBoxes,
- const SwTableNode& rTblNd,
- long nMn, long nMx,
- USHORT nCnt, BOOL bFlg, BOOL bSameHeight );
-
- // fuer SetColWidth
- SwUndoTblNdsChg( SwUndoId UndoId, const SwSelBoxes& rBoxes,
- const SwTableNode& rTblNd );
-
- virtual ~SwUndoTblNdsChg();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-
- void SaveNewBoxes( const SwTableNode& rTblNd, const SwTableSortBoxes& rOld );
- void SaveNewBoxes( const SwTableNode& rTblNd, const SwTableSortBoxes& rOld,
- const SwSelBoxes& rBoxes, const SvULongs& rNodeCnts );
- void SaveSection( SwStartNode* pSttNd );
- void ReNewBoxes( const SwSelBoxes& rBoxes );
-
- void SetColWidthParam( ULONG nBoxIdx, USHORT nMode, USHORT nType,
- SwTwips nAbsDif, SwTwips nRelDif )
- {
- nCurrBox = nBoxIdx;
- nCount = nMode;
- nSetColType = nType;
- nAbsDiff = (USHORT)nAbsDif;
- nRelDiff = (USHORT)nRelDif;
- }
-
-};
-
-class SwUndoTblMerge : public SwUndo, private SwUndRng
-{
- ULONG nTblNode;
- _SaveTable* pSaveTbl;
- SvULongs aBoxes, aNewSttNds;
- SwUndoMoves* pMoves;
- SwHistory* pHistory;
-
-public:
- SwUndoTblMerge( const SwPaM& rTblSel );
- virtual ~SwUndoTblMerge();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-
- void MoveBoxCntnt( SwDoc* pDoc, SwNodeRange& rRg, SwNodeIndex& rPos );
-
- void SetSelBoxes( const SwSelBoxes& rBoxes );
-
- void AddNewBox( ULONG nSttNdIdx )
- { aNewSttNds.Insert( nSttNdIdx, aNewSttNds.Count() ); }
-
- void SaveCollection( const SwTableBox& rBox );
-
-};
-
-class SwUndoTblNumFmt : public SwUndo
-{
- SfxItemSet *pBoxSet;
- SwHistory* pHistory;
- String aStr, aNewFml;
-
- ULONG nFmtIdx, nNewFmtIdx;
- double fNum, fNewNum;
- ULONG nNode;
- ULONG nNdPos;
-
- BOOL bNewFmt : 1;
- BOOL bNewFml : 1;
- BOOL bNewValue : 1;
-
-public:
- SwUndoTblNumFmt( const SwTableBox& rBox, const SfxItemSet* pNewSet = 0 );
- virtual ~SwUndoTblNumFmt();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-
- void SetNumFmt( ULONG nNewNumFmtIdx, const double& rNewNumber )
- { nFmtIdx = nNewNumFmtIdx; fNum = rNewNumber; }
- void SetBox( const SwTableBox& rBox );
-};
-
-class _UndoTblCpyTbl_Entries;
-
-class SwUndoTblCpyTbl : public SwUndo
-{
- _UndoTblCpyTbl_Entries* pArr;
- SwUndoTblNdsChg* pInsRowUndo;
-
- //b6341295: When redlining is active, PrepareRedline has to create the redlining attributes
- //for the new and the old table cell content
- SwUndo* PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox, const SwPosition& rPos,
- bool& rJoin, bool bRedo );
-public:
- SwUndoTblCpyTbl();
- virtual ~SwUndoTblCpyTbl();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-
- void AddBoxBefore( const SwTableBox& rBox, BOOL bDelCntnt );
- void AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex& rIdx, BOOL bDelCntnt );
-
- BOOL IsEmpty() const;
- BOOL InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes, USHORT nCnt );
-};
-
-class SwUndoCpyTbl : public SwUndo
-{
- SwUndoDelete* pDel;
- ULONG nTblNode;
-public:
- SwUndoCpyTbl();
- virtual ~SwUndoCpyTbl();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-
- void SetTableSttIdx( ULONG nIdx ) { nTblNode = nIdx; }
-};
-
-class SwUndoSplitTbl : public SwUndo
-{
- ULONG nTblNode, nOffset;
- SwSaveRowSpan* mpSaveRowSpan; // stores the row span values at the splitting row
- _SaveTable* pSavTbl;
- SwHistory* pHistory;
- USHORT nMode, nFmlEnd;
- BOOL bCalcNewSize;
-public:
- SwUndoSplitTbl( const SwTableNode& rTblNd, SwSaveRowSpan* pRowSp, USHORT nMode, BOOL bCalcNewSize );
- virtual ~SwUndoSplitTbl();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-
- void SetTblNodeOffset( ULONG nIdx ) { nOffset = nIdx - nTblNode; }
- SwHistory* GetHistory() { return pHistory; }
- void SaveFormula( SwHistory& rHistory );
-};
-
-class SwUndoMergeTbl : public SwUndo
-{
- String aName;
- ULONG nTblNode;
- _SaveTable* pSavTbl, *pSavHdl;
- SwHistory* pHistory;
- USHORT nMode;
- BOOL bWithPrev;
-public:
- SwUndoMergeTbl( const SwTableNode& rTblNd, const SwTableNode& rDelTblNd,
- BOOL bWithPrev, USHORT nMode );
- virtual ~SwUndoMergeTbl();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-
- void SaveFormula( SwHistory& rHistory );
-};
-
-class SwUndoBookmark : public SwUndo
-{
- const ::std::auto_ptr<SwHistoryBookmark> m_pHistoryBookmark;
-
-protected:
- SwUndoBookmark( SwUndoId nUndoId, const ::sw::mark::IMark& );
-
- void SetInDoc( SwDoc* );
- void ResetInDoc( SwDoc* );
-
-public:
- virtual ~SwUndoBookmark();
-
- /**
- Returns the rewriter for this undo object.
-
- The rewriter contains the following rule:
-
- $1 -> <name of bookmark>
-
- <name of bookmark> is the name of the bookmark whose
- insertion/deletion is recorded by this undo object.
-
- @return the rewriter for this undo object
- */
- virtual SwRewriter GetRewriter() const;
-};
-
-class SwUndoInsBookmark : public SwUndoBookmark
-{
-public:
- SwUndoInsBookmark( const ::sw::mark::IMark& );
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-};
-
-/*--------------------------------------------------------------------
- Beschreibung: Undo auf Sorting
- --------------------------------------------------------------------*/
-
-struct SwSortUndoElement
-{
- union {
- struct {
- ULONG nKenn;
- ULONG nSource, nTarget;
- } TXT;
- struct {
- String *pSource, *pTarget;
- } TBL;
- } SORT_TXT_TBL;
-
- SwSortUndoElement( const String& aS, const String& aT )
- {
- SORT_TXT_TBL.TBL.pSource = new String( aS );
- SORT_TXT_TBL.TBL.pTarget = new String( aT );
- }
- SwSortUndoElement( ULONG nS, ULONG nT )
- {
- SORT_TXT_TBL.TXT.nSource = nS;
- SORT_TXT_TBL.TXT.nTarget = nT;
- SORT_TXT_TBL.TXT.nKenn = 0xffffffff;
- }
- ~SwSortUndoElement();
-};
-
-SV_DECL_PTRARR_DEL(SwSortList, SwSortUndoElement*, 10,30)
-SV_DECL_PTRARR(SwUndoSortList, SwNodeIndex*, 10,30)
-
-class SwUndoSort : public SwUndo, private SwUndRng
-{
- SwSortOptions* pSortOpt; // die Optionen mit den Sortier-Kriterien
- SwSortList aSortList;
- SwUndoAttrTbl* pUndoTblAttr;
- SwRedlineData* pRedlData;
- ULONG nTblNd;
-
- void RemoveIdx( SwPaM& rPam );
-public:
- SwUndoSort( const SwPaM&, const SwSortOptions& );
- SwUndoSort( ULONG nStt, ULONG nEnd, const SwTableNode&,
- const SwSortOptions&, BOOL bSaveTable );
- virtual ~SwUndoSort();
-
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-
- void Insert( const String& rOrgPos, const String& rNewPos );
- void Insert( ULONG nOrgPos, ULONG nNewPos );
-
-};
-
//--------------------------------------------------------------------
class SwUndoFlyBase : public SwUndo, private SwUndoSaveSection
{
protected:
SwFrmFmt* pFrmFmt; // das gespeicherte FlyFormat
- ULONG nNdPgPos;
+ sal_uLong nNdPgPos;
xub_StrLen nCntPos; // Seite/am Absatz/im Absatz
- USHORT nRndId;
- BOOL bDelFmt; // loesche das gespeicherte Format
+ sal_uInt16 nRndId;
+ sal_Bool bDelFmt; // loesche das gespeicherte Format
- void InsFly( SwUndoIter&, BOOL bShowSel = TRUE );
+ void InsFly(::sw::UndoRedoContext & rContext, bool bShowSel = true);
void DelFly( SwDoc* );
SwUndoFlyBase( SwFrmFmt* pFormat, SwUndoId nUndoId );
SwNodeIndex* GetMvSttIdx() const { return SwUndoSaveSection::GetMvSttIdx(); }
- ULONG GetMvNodeCnt() const { return SwUndoSaveSection::GetMvNodeCnt(); }
+ sal_uLong GetMvNodeCnt() const { return SwUndoSaveSection::GetMvNodeCnt(); }
public:
virtual ~SwUndoFlyBase();
- virtual void Undo( SwUndoIter& ) = 0;
- virtual void Redo( SwUndoIter& ) = 0;
-
};
class SwUndoInsLayFmt : public SwUndoFlyBase
{
- ULONG mnCrsrSaveIndexPara; // Cursor position
+ sal_uLong mnCrsrSaveIndexPara; // Cursor position
xub_StrLen mnCrsrSaveIndexPos; // for undo
public:
- SwUndoInsLayFmt( SwFrmFmt* pFormat, ULONG nNodeIdx, xub_StrLen nCntIdx );
- ~SwUndoInsLayFmt();
+ SwUndoInsLayFmt( SwFrmFmt* pFormat, sal_uLong nNodeIdx, xub_StrLen nCntIdx );
+
+ virtual ~SwUndoInsLayFmt();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
String GetComment() const;
@@ -1173,688 +309,21 @@ public:
class SwUndoDelLayFmt : public SwUndoFlyBase
{
- BOOL bShowSelFrm;
+ sal_Bool bShowSelFrm;
public:
SwUndoDelLayFmt( SwFrmFmt* pFormat );
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- void Redo(); // Schnittstelle fuers Rollback
-
- void ChgShowSel( BOOL bNew ) { bShowSelFrm = bNew; }
-
- virtual SwRewriter GetRewriter() const;
-
-};
-
-class SwUndoSetFlyFmt : public SwUndo, public SwClient
-{
- SwFrmFmt* pFrmFmt; // das gespeicherte FlyFormat
- SwFrmFmt* pOldFmt; // die alte Fly Vorlage
- SwFrmFmt* pNewFmt; // die neue Fly Vorlage
- SfxItemSet* pItemSet; // die zurueck-/ gesetzten Attribute
- ULONG nOldNode, nNewNode;
- xub_StrLen nOldCntnt, nNewCntnt;
- USHORT nOldAnchorTyp, nNewAnchorTyp;
- BOOL bAnchorChgd;
-
- void PutAttr( USHORT nWhich, const SfxPoolItem* pItem );
- void Modify( SfxPoolItem*, SfxPoolItem* );
- void GetAnchor( SwFmtAnchor& rAnhor, ULONG nNode, xub_StrLen nCntnt );
-
-public:
- SwUndoSetFlyFmt( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFrmFmt );
- virtual ~SwUndoSetFlyFmt();
-
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-
- virtual SwRewriter GetRewriter() const;
-};
-
-//--------------------------------------------------------------------
-
-class _UnReplaceData;
-SV_DECL_PTRARR_DEL( _UnReplaceDatas, _UnReplaceData*, 10, 25 )
-
-class SwUndoReplace : public SwUndo
-{
- friend class SwDoc;
-
- BOOL bOldIterFlag; // Status vom Undo-Iter vorm 1. Aufruf
- USHORT nAktPos; // fuer GetUndoRange und Undo/Redo
- _UnReplaceDatas aArr;
- SwRedlineData* pRedlData;
-
-public:
- SwUndoReplace();
- virtual ~SwUndoReplace();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-
- /**
- Returns the rewriter of this undo object.
-
- If this undo object represents several replacements the
- rewriter contains the following rules:
-
- $1 -> <number of replacements>
- $2 -> occurrences of
- $3 -> <replaced text>
-
- If this undo object represents one replacement the rewriter
- contains these rules:
-
- $1 -> <replaced text>
- $2 -> "->" (STR_YIELDS)
- $3 -> <replacing text>
-
- @return the rewriter of this undo object
- */
- virtual SwRewriter GetRewriter() const;
-
- void AddEntry( const SwPaM& rPam, const String& rInsert, BOOL bRegExp );
- void SetEntryEnd( const SwPaM& rPam );
-
- BOOL IsFull() const
- { return ((USHRT_MAX / sizeof( void* )) - 50 ) < aArr.Count(); }
-
-};
-
-//--------------------------------------------------------------------
-
-class SwUndoTblHeadline : public SwUndo
-{
- ULONG nTblNd;
- USHORT nOldHeadline;
- USHORT nNewHeadline;
-public:
- SwUndoTblHeadline( const SwTable&, USHORT nOldHdl, USHORT nNewHdl );
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-};
-
-//------------ Undo of Insert-/Delete-Sections ----------------------
-
-class SwUndoInsSection : public SwUndo, private SwUndRng
-{
-private:
- const ::std::auto_ptr<SwSectionData> m_pSectionData;
- const ::std::auto_ptr<SwTOXBase> m_pTOXBase; /// set iff section is TOX
- const ::std::auto_ptr<SfxItemSet> m_pAttrSet;
- ::std::auto_ptr<SwHistory> m_pHistory;
- ::std::auto_ptr<SwRedlineData> m_pRedlData;
- ULONG m_nSectionNodePos;
- bool m_bSplitAtStart : 1;
- bool m_bSplitAtEnd : 1;
- bool m_bUpdateFtn : 1;
-
- void Join( SwDoc& rDoc, ULONG nNode );
-
-public:
- SwUndoInsSection(SwPaM const&, SwSectionData const&,
- SfxItemSet const*const pSet, SwTOXBase const*const pTOXBase);
- virtual ~SwUndoInsSection();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-
- void SetSectNdPos(ULONG const nPos) { m_nSectionNodePos = nPos; }
- void SaveSplitNode(SwTxtNode *const pTxtNd, bool const bAtStart);
- void SetUpdtFtnFlag(bool const bFlag) { m_bUpdateFtn = bFlag; }
-};
-
-SW_DLLPRIVATE SwUndo * MakeUndoDelSection(SwSectionFmt const&);
-
-SW_DLLPRIVATE SwUndo * MakeUndoUpdateSection(SwSectionFmt const&, bool const);
-
-//------------ Undo von verschieben/stufen von Gliederung ----------------
-
-class SwUndoOutlineLeftRight : public SwUndo, private SwUndRng
-{
- short nOffset;
-public:
- SwUndoOutlineLeftRight( const SwPaM& rPam, short nOffset );
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-};
-
-//--------------------------------------------------------------------
-
-class SwUndoDefaultAttr : public SwUndo
-{
- ::std::auto_ptr<SfxItemSet> m_pOldSet; // the old attributes
- ::std::auto_ptr<SvxTabStopItem> m_pTabStop;
-
-public:
- // registers at the format and saves old attributes
- SwUndoDefaultAttr( const SfxItemSet& rOldSet );
- virtual ~SwUndoDefaultAttr();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-};
-
-//--------------------------------------------------------------------
-// ---------- Undo for Numbering ----------------------------------
-
-class SwUndoInsNum : public SwUndo, private SwUndRng
-{
- SwNumRule aNumRule;
- SwHistory* pHistory;
- ULONG nSttSet;
- SwNumRule* pOldNumRule;
- String sReplaceRule;
- USHORT nLRSavePos;
-public:
- SwUndoInsNum( const SwPaM& rPam, const SwNumRule& rRule );
- SwUndoInsNum( const SwNumRule& rOldRule, const SwNumRule& rNewRule,
- SwUndoId nUndoId = UNDO_INSFMTATTR );
- SwUndoInsNum( const SwPosition& rPos, const SwNumRule& rRule,
- const String& rReplaceRule );
- virtual ~SwUndoInsNum();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
- virtual SwRewriter GetRewriter() const;
-
- SwHistory* GetHistory(); // wird ggfs. neu angelegt!
- void SetSttNum( ULONG nNdIdx ) { nSttSet = nNdIdx; }
- void SaveOldNumRule( const SwNumRule& rOld );
-
- void SetLRSpaceEndPos();
-
-};
-
-class SwUndoDelNum : public SwUndo, private SwUndRng
-{
- struct NodeLevel
- {
- ULONG index;
- int level;
- inline NodeLevel(ULONG idx, int lvl) : index(idx), level(lvl) {};
- };
- std::vector<NodeLevel> aNodes;
- SwHistory* pHistory;
-public:
- SwUndoDelNum( const SwPaM& rPam );
- virtual ~SwUndoDelNum();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-
- void AddNode( const SwTxtNode& rNd, BOOL bResetLRSpace );
- SwHistory* GetHistory() { return pHistory; }
-
-};
-
-class SwUndoMoveNum : public SwUndo, private SwUndRng
-{
- ULONG nNewStt;
- long nOffset;
-public:
- SwUndoMoveNum( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv = FALSE );
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
- void SetStartNode( ULONG nValue ) { nNewStt = nValue; }
-};
-
-class SwUndoNumUpDown : public SwUndo, private SwUndRng
-{
- short nOffset;
-public:
- SwUndoNumUpDown( const SwPaM& rPam, short nOffset );
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-};
-
-class SwUndoNumOrNoNum : public SwUndo
-{
- ULONG nIdx;
- BOOL mbNewNum, mbOldNum;
-
-public:
- SwUndoNumOrNoNum( const SwNodeIndex& rIdx, BOOL mbOldNum,
- BOOL mbNewNum );
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-};
-
-class SwUndoNumRuleStart : public SwUndo
-{
- ULONG nIdx;
- USHORT nOldStt, nNewStt;
- BOOL bSetSttValue : 1;
- BOOL bFlag : 1;
-public:
- SwUndoNumRuleStart( const SwPosition& rPos, BOOL bDelete );
- SwUndoNumRuleStart( const SwPosition& rPos, USHORT nStt );
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-};
-
-//--------------------------------------------------------------------
-// ---------- Undo for DrawObjecte ----------------------------------
-
-class SwSdrUndo : public SwUndo
-{
- SdrUndoAction* pSdrUndo;
- SdrMarkList* pMarkList; // MarkList for all selected SdrObjects
-public:
- SwSdrUndo( SdrUndoAction* , const SdrMarkList* pMarkList );
- virtual ~SwSdrUndo();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-
- String GetComment() const;
-};
-
-class SwUndoDrawGroup : public SwUndo
-{
- SwUndoGroupObjImpl* pObjArr;
- USHORT nSize;
- BOOL bDelFmt;
-
-public:
- SwUndoDrawGroup( USHORT nCnt );
- virtual ~SwUndoDrawGroup();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-
- void AddObj( USHORT nPos, SwDrawFrmFmt*, SdrObject* );
- void SetGroupFmt( SwDrawFrmFmt* );
-};
-
-// Action "ungroup drawing object" is now splitted into three parts - see
-// method <SwDoc::UnGroupSelection(..)>:
-// - creation for <SwDrawFrmFmt> instances for the group members of the
-// selected group objects
-// - intrinsic ungroup of the selected group objects
-// - creation of <SwDrawContact> instances for the former group members and
-// connection to the Writer layout.
-// Thus, two undo actions (instances of <SwUndo>) are needed:
-// - Existing class <SwUndoDrawUnGroup> takes over the part for the formats.
-// - New class <SwUndoDrawUnGroupConnectToLayout> takes over the part for
-// contact object.
-class SwUndoDrawUnGroup : public SwUndo
-{
- SwUndoGroupObjImpl* pObjArr;
- USHORT nSize;
- BOOL bDelFmt;
-
-public:
- SwUndoDrawUnGroup( SdrObjGroup* );
- virtual ~SwUndoDrawUnGroup();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-
- void AddObj( USHORT nPos, SwDrawFrmFmt* );
-};
-
-class SwUndoDrawUnGroupConnectToLayout : public SwUndo
-{
- private:
- std::vector< std::pair< SwDrawFrmFmt*, SdrObject* > > aDrawFmtsAndObjs;
-
- public:
- SwUndoDrawUnGroupConnectToLayout();
- virtual ~SwUndoDrawUnGroupConnectToLayout();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-
- void AddFmtAndObj( SwDrawFrmFmt* pDrawFrmFmt,
- SdrObject* pDrawObject );
-};
-
-class SwUndoDrawDelete : public SwUndo
-{
- SwUndoGroupObjImpl* pObjArr;
- SdrMarkList* pMarkLst; // MarkList for all selected SdrObjects
- USHORT nSize;
- BOOL bDelFmt;
-
-public:
- SwUndoDrawDelete( USHORT nCnt );
- virtual ~SwUndoDrawDelete();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-
- void AddObj( USHORT nPos, SwDrawFrmFmt*, const SdrMark& );
-};
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
-//--------------------------------------------------------------------
-
-class SwUndoReRead : public SwUndo
-{
- Graphic *pGrf;
- String *pNm, *pFltr;
- ULONG nPos;
- USHORT nMirr;
-
- void SaveGraphicData( const SwGrfNode& );
- void SetAndSave( SwUndoIter& );
-
-public:
- SwUndoReRead( const SwPaM& rPam, const SwGrfNode& pGrfNd );
- virtual ~SwUndoReRead();
-
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-};
-
-//--------------------------------------------------------------------
-
-class SwUndoInsertLabel : public SwUndo
-{
- union {
- struct {
- // for NoTxtFrms
- SwUndoInsLayFmt* pUndoFly;
- SwUndoFmtAttr* pUndoAttr;
- } OBJECT;
- struct {
- // for Tables/TextBoxes
- SwUndoDelete* pUndoInsNd;
- ULONG nNode;
- } NODE;
- };
-
- String sText;
- String sSeparator;
- String sNumberSeparator;
- String sCharacterStyle;
- USHORT nFldId;
- SwLabelType eType;
- BYTE nLayerId; // fuer Zeichen-Objekte
- BOOL bBefore :1;
- BOOL bUndoKeep :1;
- BOOL bCpyBrd :1;
-
-public:
- SwUndoInsertLabel( const SwLabelType eTyp, const String &rText,
- const String& rSeparator,
- const String& rNumberSeparator,
- const BOOL bBefore, const USHORT nId,
- const String& rCharacterStyle,
- const BOOL bCpyBrd );
- virtual ~SwUndoInsertLabel();
-
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-
- /**
- Returns the rewriter of this undo object.
+ void RedoForRollback();
- The rewriter contains this rule:
+ void ChgShowSel( sal_Bool bNew ) { bShowSelFrm = bNew; }
- $1 -> '<text of inserted label>'
-
- <text of inserted label> is shortened to nUndoStringLength
- characters.
-
- @return the rewriter of this undo object
- */
virtual SwRewriter GetRewriter() const;
- void SetNodePos( ULONG nNd )
- { if( LTYPE_OBJECT != eType ) NODE.nNode = nNd; }
-
- void SetUndoKeep() { bUndoKeep = TRUE; }
- void SetFlys( SwFrmFmt& rOldFly, SfxItemSet& rChgSet, SwFrmFmt& rNewFly );
- void SetDrawObj( BYTE nLayerId );
-};
-
-//--------------------------------------------------------------------
-
-class SwUndoChangeFootNote : public SwUndo, private SwUndRng
-{
- const ::std::auto_ptr<SwHistory> m_pHistory;
- const String m_Text;
- const USHORT m_nNumber;
- const bool m_bEndNote;
-
-public:
- SwUndoChangeFootNote( const SwPaM& rRange, const String& rTxt,
- USHORT nNum, bool bIsEndNote );
- virtual ~SwUndoChangeFootNote();
-
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
- virtual void Repeat( SwUndoIter& );
-
- SwHistory& GetHistory() { return *m_pHistory; }
-};
-
-class SwUndoFootNoteInfo : public SwUndo
-{
- ::std::auto_ptr<SwFtnInfo> m_pFootNoteInfo;
-
-public:
- SwUndoFootNoteInfo( const SwFtnInfo &rInfo );
- virtual ~SwUndoFootNoteInfo();
-
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-};
-
-class SwUndoEndNoteInfo : public SwUndo
-{
- ::std::auto_ptr<SwEndNoteInfo> m_pEndNoteInfo;
-
-public:
- SwUndoEndNoteInfo( const SwEndNoteInfo &rInfo );
- virtual ~SwUndoEndNoteInfo();
-
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
};
-//--------------------------------------------------------------------
-
-struct _UndoTransliterate_Data;
-class SwUndoTransliterate : public SwUndo, public SwUndRng
-{
- std::vector< _UndoTransliterate_Data * > aChanges;
- sal_uInt32 nType;
-
-public:
- SwUndoTransliterate( const SwPaM& rPam,
- const utl::TransliterationWrapper& rTrans );
- virtual ~SwUndoTransliterate();
-
- virtual void Undo( SwUndoIter& rUndoIter );
- virtual void Redo( SwUndoIter& rUndoIter );
- virtual void Repeat( SwUndoIter& rUndoIter );
-
- void AddChanges( SwTxtNode& rTNd, xub_StrLen nStart, xub_StrLen nLen,
- ::com::sun::star::uno::Sequence <sal_Int32>& rOffsets );
- BOOL HasData() const { return aChanges.size() > 0; }
-};
-
-//--------------------------------------------------------------------
-
-class SwUndoRedline : public SwUndo, public SwUndRng
-{
-protected:
- SwRedlineData* pRedlData;
- SwRedlineSaveDatas* pRedlSaveData;
- SwUndoId nUserId;
- BOOL bHiddenRedlines;
-
- virtual void _Undo( SwUndoIter& );
- virtual void _Redo( SwUndoIter& );
-
-public:
- SwUndoRedline( SwUndoId nUserId, const SwPaM& rRange );
- virtual ~SwUndoRedline();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-
- SwUndoId GetUserId() const { return nUserId; }
- USHORT GetRedlSaveCount() const
- { return pRedlSaveData ? pRedlSaveData->Count() : 0; }
-};
-
-class SwUndoRedlineDelete : public SwUndoRedline
-{
- BOOL bCanGroup : 1;
- BOOL bIsDelim : 1;
- BOOL bIsBackspace : 1;
-
- virtual void _Undo( SwUndoIter& );
- virtual void _Redo( SwUndoIter& );
-
-public:
- SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUserId = UNDO_EMPTY );
-
- BOOL CanGrouping( const SwUndoRedlineDelete& rPrev );
-};
-
-class SwUndoRedlineSort : public SwUndoRedline
-{
- SwSortOptions* pOpt;
- ULONG nSaveEndNode, nOffset;
- xub_StrLen nSaveEndCntnt;
-
- virtual void _Undo( SwUndoIter& );
- virtual void _Redo( SwUndoIter& );
-
-public:
- SwUndoRedlineSort( const SwPaM& rRange, const SwSortOptions& rOpt );
- virtual ~SwUndoRedlineSort();
- virtual void Repeat( SwUndoIter& );
-
- void SetSaveRange( const SwPaM& rRange );
- void SetOffset( const SwNodeIndex& rIdx );
-};
-
-class SwUndoAcceptRedline : public SwUndoRedline
-{
- virtual void _Redo( SwUndoIter& );
-public:
- SwUndoAcceptRedline( const SwPaM& rRange );
- virtual void Repeat( SwUndoIter& );
-};
-
-class SwUndoRejectRedline : public SwUndoRedline
-{
- virtual void _Redo( SwUndoIter& );
-public:
- SwUndoRejectRedline( const SwPaM& rRange );
- virtual void Repeat( SwUndoIter& );
-};
-
-//--------------------------------------------------------------------
-
-class SwUndoCompDoc : public SwUndo, public SwUndRng
-{
- SwRedlineData* pRedlData;
- SwUndoDelete* pUnDel, *pUnDel2;
- SwRedlineSaveDatas* pRedlSaveData;
- BOOL bInsert;
-public:
- SwUndoCompDoc( const SwPaM& rRg, BOOL bIns );
- SwUndoCompDoc( const SwRedline& rRedl );
-
- virtual ~SwUndoCompDoc();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-};
-
-//--------------------------------------------------------------------
-
-// Object der als Iterator durch die Undo-Liste laeuft, bis die
-// letze oder die angegebene Klammerung/Id erreicht ist.
-
-class SwUndoIter
-{
- friend class SwDoc; // um im SwDoc::Undo bWeiter zu stezen
- friend void SwUndoEnd::Undo( SwUndoIter& );
- friend void SwUndoStart::Undo( SwUndoIter& );
- friend void SwUndoEnd::Redo( SwUndoIter& );
- friend void SwUndoStart::Redo( SwUndoIter& );
- friend void SwUndoEnd::Repeat( SwUndoIter& );
- friend void SwUndoStart::Repeat( SwUndoIter& );
- friend void SwUndoReplace::Undo( SwUndoIter& );
- friend void SwUndoReplace::Redo( SwUndoIter& );
-
- SwUndoId nUndoId;
- USHORT nEndCnt;
- BOOL bWeiter : 1;
- BOOL bUpdateAttr : 1; // Setze das GCAttr an der CursorShell
-
-public:
- SwPaM * pAktPam; // Member fuer das Undo
- SwUndo* pLastUndoObj; // fuers Redo, das vorherige UndoObj.
- SwFrmFmt* pSelFmt; // ggfs. das Format Rahmen/Object-Selektionen
- SdrMarkList* pMarkList; // MarkList for all selected SdrObjects
-
- SwUndoIter( SwPaM * pPam, SwUndoId nId = UNDO_EMPTY );
-
- BOOL IsNextUndo() const { return bWeiter; }
- BOOL IsUpdateAttr() const { return bUpdateAttr; }
- void SetUpdateAttr( BOOL bNew ) { bUpdateAttr = bNew; }
-
- inline SwDoc& GetDoc() const;
- SwUndoId GetId() const { return nUndoId; }
- SwUndoId GetLastUndoId() const
- { return pLastUndoObj ? pLastUndoObj->GetId() : UNDO_EMPTY ; }
- void ClearSelections() { pSelFmt = 0; pMarkList = 0; }
-};
-
-const int nUndoStringLength = 20;
-
-/**
- Shortens a string to a maximum length.
-
- @param rStr the string to be shortened
- @param nLength the maximum length for rStr
- @param rFillStr string to replace cut out characters with
-
- If rStr has less than nLength characters it will be returned unaltered.
-
- If rStr has more than nLength characters the following algorithm
- generates the shortened string:
-
- frontLength = (nLength - length(rFillStr)) / 2
- rearLength = nLength - length(rFillStr) - frontLength
- shortenedString = concat(<first frontLength characters of rStr,
- rFillStr,
- <last rearLength characters of rStr>)
-
- Preconditions:
- - nLength - length(rFillStr) >= 2
-
- @return the shortened string
- */
-String ShortenString(const String & rStr, xub_StrLen nLength, const String & rFillStr);
-
-/**
- Denotes special characters in a string.
-
- The rStr is split into parts containing special characters and
- parts not containing special characters. In a part containing
- special characters all characters are equal. These parts are
- maximal.
-
- @param rStr the string to denote in
-
- The resulting string is generated by concatenating the found
- parts. The parts without special characters are surrounded by
- "'". The parts containing special characters are denoted as "n x",
- where n is the length of the part and x is the representation of
- the special character (i. e. "tab(s)").
-
- @return the denoted string
-*/
-String DenoteSpecialCharacters(const String & rStr);
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unoatxt.hxx b/sw/inc/unoatxt.hxx
index 16de110daa0a..b0d73c249132 100644
--- a/sw/inc/unoatxt.hxx
+++ b/sw/inc/unoatxt.hxx
@@ -229,9 +229,9 @@ public:
//XText
virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL insertString(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const rtl::OUString& aString, BOOL bAbsorb) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL insertControlCharacter(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, sal_Int16 nControlCharacter, BOOL bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL insertTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent, BOOL bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL insertString(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const rtl::OUString& aString, sal_Bool bAbsorb) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL insertControlCharacter(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, sal_Int16 nControlCharacter, sal_Bool bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL insertTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent, sal_Bool bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL removeTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
//XTextRange
@@ -280,7 +280,7 @@ public:
protected:
virtual void replaceByName(
- const USHORT nEvent, /// item ID of event
+ const sal_uInt16 nEvent, /// item ID of event
const SvxMacro& rMacro) /// event (will be copied)
throw(
::com::sun::star::lang::IllegalArgumentException,
@@ -290,7 +290,7 @@ protected:
virtual void getByName(
SvxMacro& rMacro, /// macro to be filled
- const USHORT nEvent ) /// item ID of event
+ const sal_uInt16 nEvent ) /// item ID of event
throw(
::com::sun::star::container::NoSuchElementException,
::com::sun::star::lang::WrappedTargetException,
diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx
index 86c2df6bad22..c88d62be1d9e 100644
--- a/sw/inc/unochart.hxx
+++ b/sw/inc/unochart.hxx
@@ -213,7 +213,7 @@ public:
void DisposeAllDataSequences( const SwTable *pTable );
// functionality needed to get notified about new added rows/cols
- void AddRowCols( const SwTable &rTable, const SwSelBoxes& rBoxes, USHORT nLines, BOOL bBehind );
+ void AddRowCols( const SwTable &rTable, const SwSelBoxes& rBoxes, sal_uInt16 nLines, sal_Bool bBehind );
};
//////////////////////////////////////////////////////////////////////
diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx
index 0b1f93e9b057..0fc9b61b557a 100644
--- a/sw/inc/unocrsr.hxx
+++ b/sw/inc/unocrsr.hxx
@@ -33,9 +33,9 @@
class SwUnoCrsr : public virtual SwCursor, public SwModify
{
- BOOL bRemainInSection : 1;
- BOOL bSkipOverHiddenSections : 1;
- BOOL bSkipOverProtectSections : 1;
+ sal_Bool bRemainInSection : 1;
+ sal_Bool bSkipOverHiddenSections : 1;
+ sal_Bool bSkipOverProtectSections : 1;
public:
SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing = 0 );
@@ -49,31 +49,31 @@ private:
protected:
virtual const SwCntntFrm* DoSetBidiLevelLeftRight(
- BOOL & io_rbLeft, BOOL bVisualAllowed, BOOL bInsertCrsr);
+ sal_Bool & io_rbLeft, sal_Bool bVisualAllowed, sal_Bool bInsertCrsr);
virtual void DoSetBidiLevelUpDown();
public:
// gibt es eine Selection vom Content in die Tabelle
// Return Wert gibt an, ob der Crsr auf der alten Position verbleibt
- virtual BOOL IsSelOvr( int eFlags =
+ virtual sal_Bool IsSelOvr( int eFlags =
( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
virtual bool IsReadOnlyAvailable() const;
- BOOL IsRemainInSection() const { return bRemainInSection; }
- void SetRemainInSection( BOOL bFlag ) { bRemainInSection = bFlag; }
+ sal_Bool IsRemainInSection() const { return bRemainInSection; }
+ void SetRemainInSection( sal_Bool bFlag ) { bRemainInSection = bFlag; }
- virtual BOOL IsSkipOverProtectSections() const
+ virtual sal_Bool IsSkipOverProtectSections() const
{ return bSkipOverProtectSections; }
- void SetSkipOverProtectSections( BOOL bFlag )
+ void SetSkipOverProtectSections( sal_Bool bFlag )
{ bSkipOverProtectSections = bFlag; }
- virtual BOOL IsSkipOverHiddenSections() const
+ virtual sal_Bool IsSkipOverHiddenSections() const
{ return bSkipOverHiddenSections; }
- void SetSkipOverHiddenSections( BOOL bFlag )
+ void SetSkipOverHiddenSections( sal_Bool bFlag )
{ bSkipOverHiddenSections = bFlag; }
// make copy of cursor
@@ -99,7 +99,7 @@ public:
// gibt es eine Selection vom Content in die Tabelle
// Return Wert gibt an, ob der Crsr auf der alten Position verbleibt
- virtual BOOL IsSelOvr( int eFlags =
+ virtual sal_Bool IsSelOvr( int eFlags =
( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx
index befe97aac662..efbc46173350 100644
--- a/sw/inc/unocrsrhelper.hxx
+++ b/sw/inc/unocrsrhelper.hxx
@@ -78,8 +78,8 @@ namespace SwUnoCursorHelper
public:
~SwAnyMapHelper();
- void SetValue( USHORT nWhichId, USHORT nMemberId, const com::sun::star::uno::Any& rAny );
- bool FillValue( USHORT nWhichId, USHORT nMemberId, const com::sun::star::uno::Any*& pAny );
+ void SetValue( sal_uInt16 nWhichId, sal_uInt16 nMemberId, const com::sun::star::uno::Any& rAny );
+ bool FillValue( sal_uInt16 nWhichId, sal_uInt16 nMemberId, const com::sun::star::uno::Any*& pAny );
};
::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >
diff --git a/sw/inc/unoevtlstnr.hxx b/sw/inc/unoevtlstnr.hxx
index fb9387e40dcb..86c8918f571b 100644
--- a/sw/inc/unoevtlstnr.hxx
+++ b/sw/inc/unoevtlstnr.hxx
@@ -53,7 +53,7 @@ class SwEventListenerContainer
~SwEventListenerContainer();
void AddListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & rxListener);
- BOOL RemoveListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & rxListener);
+ sal_Bool RemoveListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & rxListener);
void Disposing();
};
#endif
diff --git a/sw/inc/unofield.hxx b/sw/inc/unofield.hxx
index 39cc6f0e9271..ed36b278a652 100644
--- a/sw/inc/unofield.hxx
+++ b/sw/inc/unofield.hxx
@@ -298,7 +298,7 @@ public:
SwXFieldEnumeration(SwDoc* pDoc);
//XEnumeration
- virtual BOOL SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Any SAL_CALL nextElement(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
//XServiceInfo
diff --git a/sw/inc/unoflatpara.hxx b/sw/inc/unoflatpara.hxx
index ff18c5c3b543..9eb36c20c1b3 100644
--- a/sw/inc/unoflatpara.hxx
+++ b/sw/inc/unoflatpara.hxx
@@ -137,9 +137,9 @@ private:
const sal_Int32 mnType;
const sal_Bool mbAutomatic;
- ULONG mnCurrentNode; // used for non-automatic mode
- ULONG mnStartNode; // used for non-automatic mode
- ULONG mnEndNode; // used for non-automatic mode
+ sal_uLong mnCurrentNode; // used for non-automatic mode
+ sal_uLong mnStartNode; // used for non-automatic mode
+ sal_uLong mnEndNode; // used for non-automatic mode
sal_Bool mbWrapped; // used for non-automatic mode
};
diff --git a/sw/inc/unomailmerge.hxx b/sw/inc/unomailmerge.hxx
index 11a15cfc91a2..b81056e21307 100644
--- a/sw/inc/unomailmerge.hxx
+++ b/sw/inc/unomailmerge.hxx
@@ -42,7 +42,7 @@
#include <com/sun/star/beans/PropertyChangeEvent.hpp>
#include <com/sun/star/text/XMailMergeBroadcaster.hpp>
#include <svl/itemprop.hxx>
-#include <sfx2/objsh.hxx> // SfxObjectShellRef
+#include <sfx2/objsh.hxx>
namespace com { namespace sun { namespace star {
@@ -78,14 +78,14 @@ namespace rtl {
// helper function call class
struct PropHashType_Impl
{
- size_t operator()(const INT32 &s) const { return s; }
+ size_t operator()(const sal_Int32 &s) const { return s; }
};
typedef cppu::OMultiTypeInterfaceContainerHelperVar
<
- INT32,
+ sal_Int32,
PropHashType_Impl,
- std::equal_to< INT32 >
+ std::equal_to< sal_Int32 >
> OPropertyListenerContainerHelper;
////////////////////////////////////////////////////////////
diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx
index 7e29591c91fb..cfc373e9887b 100644
--- a/sw/inc/unomap.hxx
+++ b/sw/inc/unomap.hxx
@@ -130,8 +130,10 @@
#define PROPERTY_MAP_PARA_AUTO_STYLE 96
#define PROPERTY_MAP_FLDTYP_DOCINFO_CUSTOM 97
#define PROPERTY_MAP_METAFIELD 98
-
-#define PROPERTY_MAP_END 99
+//IAccessibility2 Implementation 2009-----
+#define PROPERTY_MAP_ACCESSIBILITY_TEXT_ATTRIBUTE 99
+//-----IAccessibility2 Implementation 2009
+#define PROPERTY_MAP_END 100
//S&E
#define WID_WORDS 0
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 54bde1ecd1d6..e9a2deb5e8c9 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -800,7 +800,9 @@ enum SwPropNameIds
/* 0736 */ UNO_NAME_OUTLINE_LEVEL,
/* 0737 */ UNO_NAME_DESCRIPTION,
+/* 0740 */ UNO_NAME_EMBEDDED_OBJECT,
+// FIXME: these number comments cannot be right post merge - fix them up ...
/* 0738 */ UNO_NAME_META,
/* 0739 */ UNO_NAME_IS_TEMPLATE,
/* 0740 */ UNO_NAME_VBA_DOCOBJ,
@@ -811,7 +813,7 @@ enum SwPropNameIds
struct SwPropNameLen
{
const char* pName;
- USHORT nNameLen;
+ sal_uInt16 nNameLen;
operator const char*() const { return pName; }
};
@@ -821,8 +823,8 @@ extern const SwPropNameTab aPropNameTab;
// !!! function must not(!) be inline because it is called via the below !!!
// !!! listed macros from the swui DLL and that can not access the !!!
// !!! array aPropNameTab which is located in a different DLL. !!!
-SW_DLLPUBLIC const SwPropNameLen& GetPropName( USHORT nId );
-SW_DLLPUBLIC const SwPropNameLen& SwGetPropName( USHORT nId );
+SW_DLLPUBLIC const SwPropNameLen& GetPropName( sal_uInt16 nId );
+SW_DLLPUBLIC const SwPropNameLen& SwGetPropName( sal_uInt16 nId );
#define SW_PROP_NAME(nId) \
GetPropName( nId ).pName, GetPropName( nId ).nNameLen
diff --git a/sw/inc/unoredline.hxx b/sw/inc/unoredline.hxx
index b059647d5f8d..bf0a0173808f 100644
--- a/sw/inc/unoredline.hxx
+++ b/sw/inc/unoredline.hxx
@@ -81,7 +81,7 @@ public:
SwXRedlinePortion( const SwRedline* pRed,
const SwUnoCrsr* pPortionCrsr,
::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent,
- BOOL bIsStart);
+ sal_Bool bIsStart);
~SwXRedlinePortion();
diff --git a/sw/inc/unoredlines.hxx b/sw/inc/unoredlines.hxx
index 737a5211fbe2..56ba53446922 100644
--- a/sw/inc/unoredlines.hxx
+++ b/sw/inc/unoredlines.hxx
@@ -79,7 +79,7 @@ class SwXRedlineEnumeration
, public SwClient
{
SwDoc* pDoc;
- USHORT nCurrentIndex;
+ sal_uInt16 nCurrentIndex;
protected:
virtual ~SwXRedlineEnumeration();
public:
@@ -87,7 +87,7 @@ public:
//XEnumeration
- virtual BOOL SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Any SAL_CALL nextElement(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
//XServiceInfo
diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx
index 9e90e2b9bd7e..919c930f1fe6 100644
--- a/sw/inc/unostyle.hxx
+++ b/sw/inc/unostyle.hxx
@@ -202,7 +202,7 @@ protected:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
public:
- SwXStyle(SwDoc* pDoc, SfxStyleFamily eFam = SFX_STYLE_FAMILY_PARA, BOOL bConditional = FALSE);
+ SwXStyle(SwDoc* pDoc, SfxStyleFamily eFam = SFX_STYLE_FAMILY_PARA, sal_Bool bConditional = sal_False);
SwXStyle(SfxStyleSheetBasePool& rPool, SfxStyleFamily eFam,
SwDoc* pDoc,
const String& rStyleName);
diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx
index ce118946d1a0..72c5c6a76865 100644
--- a/sw/inc/unotbl.hxx
+++ b/sw/inc/unotbl.hxx
@@ -87,7 +87,7 @@ class SwXCell : public SwXCellBaseClass,
public SwClient
{
friend void lcl_setString( SwXCell &rCell, const rtl::OUString &rTxt,
- BOOL bKeepNumberFmt = FALSE );
+ sal_Bool bKeepNumberFmt = sal_False );
friend double lcl_getValue( SwXCell &rCell );
friend void lcl_setValue( SwXCell &rCell, double nVal );
diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx
index eab9d4591f85..feeb227a3d65 100644
--- a/sw/inc/unotextrange.hxx
+++ b/sw/inc/unotextrange.hxx
@@ -79,7 +79,7 @@ namespace sw {
CreateParentXText(SwDoc & rDoc, const SwPosition& rPos);
bool GetDefaultTextContentValue(::com::sun::star::uno::Any& rAny,
- const ::rtl::OUString& rPropertyName, USHORT nWID = 0);
+ const ::rtl::OUString& rPropertyName, sal_uInt16 nWID = 0);
} // namespace sw
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index 8e4e20063648..82512aa9af5e 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -130,7 +130,6 @@ class SfxViewFrame;
class SwPrintUIOptions;
class SwPrintData;
class SwRenderData;
-class SwPrtOptions;
class SwWrtShell;
@@ -595,7 +594,7 @@ public:
SwViewOptionAdjust_Impl( SwWrtShell& rSh, const SwViewOption &rViewOptions );
~SwViewOptionAdjust_Impl();
- void AdjustViewOptions( const SwPrtOptions *pPrtOptions );
+ void AdjustViewOptions( SwPrintData const*const pPrtOptions );
bool checkShell( const SwWrtShell& rCompare ) const
{ return &rCompare == &m_rShell; }
diff --git a/sw/inc/usrfld.hxx b/sw/inc/usrfld.hxx
index 8ad0112ecd50..5b041e620d9a 100644
--- a/sw/inc/usrfld.hxx
+++ b/sw/inc/usrfld.hxx
@@ -25,8 +25,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _USRFLD_HXX
-#define _USRFLD_HXX
+#ifndef SW_USRFLD_HXX
+#define SW_USRFLD_HXX
#include "swdllapi.h"
#include "fldbas.hxx"
@@ -41,12 +41,12 @@ class SwDoc;
class SW_DLLPUBLIC SwUserFieldType : public SwValueFieldType
{
- BOOL bValidValue : 1;
- BOOL bDeleted : 1;
+ sal_Bool bValidValue : 1;
+ sal_Bool bDeleted : 1;
double nValue;
String aName;
String aContent;
- USHORT nType;
+ sal_uInt16 nType;
public:
SwUserFieldType( SwDoc* pDocPtr, const String& );
@@ -54,13 +54,13 @@ public:
virtual const String& GetName() const;
virtual SwFieldType* Copy() const;
- String Expand(sal_uInt32 nFmt, USHORT nSubType, USHORT nLng);
+ String Expand(sal_uInt32 nFmt, sal_uInt16 nSubType, sal_uInt16 nLng);
String GetContent( sal_uInt32 nFmt = 0 );
void SetContent( const String& rStr, sal_uInt32 nFmt = 0 );
- inline BOOL IsValid() const;
- inline void ChgValid( BOOL bNew );
+ inline sal_Bool IsValid() const;
+ inline void ChgValid( sal_Bool bNew );
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
@@ -68,20 +68,20 @@ public:
inline double GetValue() const;
inline void SetValue(const double nVal);
- inline USHORT GetType() const;
- inline void SetType(USHORT);
+ inline sal_uInt16 GetType() const;
+ inline void SetType(sal_uInt16);
- BOOL IsDeleted() const { return bDeleted; }
- void SetDeleted( BOOL b ) { bDeleted = b; }
+ sal_Bool IsDeleted() const { return bDeleted; }
+ void SetDeleted( sal_Bool b ) { bDeleted = b; }
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nMId ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nMId );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nMId ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nMId );
};
-inline BOOL SwUserFieldType::IsValid() const
+inline sal_Bool SwUserFieldType::IsValid() const
{ return bValidValue; }
-inline void SwUserFieldType::ChgValid( BOOL bNew )
+inline void SwUserFieldType::ChgValid( sal_Bool bNew )
{ bValidValue = bNew; }
inline double SwUserFieldType::GetValue() const
@@ -90,10 +90,10 @@ inline double SwUserFieldType::GetValue() const
inline void SwUserFieldType::SetValue(const double nVal)
{ nValue = nVal; }
-inline USHORT SwUserFieldType::GetType() const
+inline sal_uInt16 SwUserFieldType::GetType() const
{ return nType; }
-inline void SwUserFieldType::SetType(USHORT nSub)
+inline void SwUserFieldType::SetType(sal_uInt16 nSub)
{
nType = nSub;
EnableFormat(!(nSub & nsSwGetSetExpType::GSE_STRING));
@@ -105,20 +105,21 @@ inline void SwUserFieldType::SetType(USHORT nSub)
class SW_DLLPUBLIC SwUserField : public SwValueField
{
- USHORT nSubType;
+ sal_uInt16 nSubType;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
public:
- SwUserField(SwUserFieldType*, USHORT nSub = 0, sal_uInt32 nFmt = 0);
+ SwUserField(SwUserFieldType*, sal_uInt16 nSub = 0, sal_uInt32 nFmt = 0);
- virtual USHORT GetSubType() const;
- virtual void SetSubType(USHORT nSub);
+ virtual sal_uInt16 GetSubType() const;
+ virtual void SetSubType(sal_uInt16 nSub);
virtual double GetValue() const;
virtual void SetValue( const double& rVal );
- virtual String Expand() const;
- virtual SwField* Copy() const;
- virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String GetFieldName() const;
// Name kann nicht geaendert werden
virtual const String& GetPar1() const;
@@ -126,10 +127,10 @@ public:
// Inhalt
virtual String GetPar2() const;
virtual void SetPar2(const String& rStr);
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
};
-#endif // _USRFLD_HXX
+#endif // SW_USRFLD_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index 42fa32f1007b..af12afe42bbc 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -138,48 +138,48 @@ class SwViewOption
static sal_Int32 nAppearanceFlags; //
protected:
- static USHORT nPixelTwips;// 1 Pixel == ? Twips
+ static sal_uInt16 nPixelTwips;// 1 Pixel == ? Twips
String sSymbolFont; // Symbolzeichensatz
- UINT32 nCoreOptions; // Bits fuer die ViewShell
- UINT32 nCore2Options; // Bits fuer die ViewShell
- UINT32 nUIOptions; // UI-Bits
+ sal_uInt32 nCoreOptions; // Bits fuer die ViewShell
+ sal_uInt32 nCore2Options; // Bits fuer die ViewShell
+ sal_uInt32 nUIOptions; // UI-Bits
Color aRetoucheColor; // DefaultBackground fuer BrowseView
Size aSnapSize; // Beschreibt hori. wie vert. Snap
- USHORT mnViewLayoutColumns;// # columns for edit view
+ sal_uInt16 mnViewLayoutColumns;// # columns for edit view
short nDivisionX; // Rasterunterteilung
short nDivisionY;
- BYTE nPagePrevRow; // Page Preview Row/Columns
- BYTE nPagePrevCol; // Page Preview Row/Columns
- BYTE nShdwCrsrFillMode; // FillMode fuer den ShadowCrsr
- BOOL bReadonly : 1; // Readonly-Doc
- BOOL bStarOneSetting : 1;// prevent from UI automatics (no scrollbars in readonly documents)
- BOOL bIsPagePreview : 1; // the preview mustn't print field/footnote/... shadings
- BOOL bSelectionInReadonly : 1; //determines whether selection is switched on in readonly documents
- BOOL bFormView : 1;
- BOOL bBookview : 1; // view mode for page preview
- BOOL mbViewLayoutBookMode : 1; // book view mode for edit view
+ sal_uInt8 nPagePrevRow; // Page Preview Row/Columns
+ sal_uInt8 nPagePrevCol; // Page Preview Row/Columns
+ sal_uInt8 nShdwCrsrFillMode; // FillMode fuer den ShadowCrsr
+ sal_Bool bReadonly : 1; // Readonly-Doc
+ sal_Bool bStarOneSetting : 1;// prevent from UI automatics (no scrollbars in readonly documents)
+ sal_Bool bIsPagePreview : 1; // the preview mustn't print field/footnote/... shadings
+ sal_Bool bSelectionInReadonly : 1; //determines whether selection is switched on in readonly documents
+ sal_Bool bFormView : 1;
+ sal_Bool bBookview : 1; // view mode for page preview
+ sal_Bool mbViewLayoutBookMode : 1; // book view mode for edit view
sal_Bool bShowPlaceHolderFields : 1; //only used in printing!
mutable bool bIdle;
// Maszstab
- USHORT nZoom; // Angaben in Prozent
+ sal_uInt16 nZoom; // Angaben in Prozent
SvxZoomType eZoom; // 'enum' fuer Zoom
- BYTE nTblDest; // Ziel fuer Tabellenhintergrund
+ sal_uInt8 nTblDest; // Ziel fuer Tabellenhintergrund
#if OSL_DEBUG_LEVEL > 1
// korrespondieren zu den Angaben in ui/config/cfgvw.src
- BOOL bTest1 :1; // Test-Flag "Layout not loading"
- BOOL bTest2 :1; // Test-Flag "WYSIWYG++"
- BOOL bTest3 :1; // Test-Flag ""
- BOOL bTest4 :1; // Test-Flag "WYSIWYG debug"
- BOOL bTest5 :1; // Test-Flag "No idle format"
- BOOL bTest6 :1; // Test-Flag "No screen adj"
- BOOL bTest7 :1; // Test-Flag "win format"
- BOOL bTest8 :1; // Test-Flag ""
- static BOOL bTest9; // Test-Flag "DrawingLayerNotLoading"
- BOOL bTest10 :1; // Test-Flag "Format by Input"
+ sal_Bool bTest1 :1; // Test-Flag "Layout not loading"
+ sal_Bool bTest2 :1; // Test-Flag "WYSIWYG++"
+ sal_Bool bTest3 :1; // Test-Flag ""
+ sal_Bool bTest4 :1; // Test-Flag "WYSIWYG debug"
+ sal_Bool bTest5 :1; // Test-Flag "No idle format"
+ sal_Bool bTest6 :1; // Test-Flag "No screen adj"
+ sal_Bool bTest7 :1; // Test-Flag "win format"
+ sal_Bool bTest8 :1; // Test-Flag ""
+ static sal_Bool bTest9; // Test-Flag "DrawingLayerNotLoading"
+ sal_Bool bTest10 :1; // Test-Flag "Format by Input"
#endif
public:
@@ -189,200 +189,200 @@ public:
void Init( Window *pWin ); // Initialisierung der statischen Daten
- USHORT GetPixelTwips() const { return nPixelTwips; }
+ sal_uInt16 GetPixelTwips() const { return nPixelTwips; }
- inline UINT32 GetCoreOptions() const {return nCoreOptions;}
+ inline sal_uInt32 GetCoreOptions() const {return nCoreOptions;}
inline void SetUIOptions( const SwViewOption& );
/*---------------------------------------------------------------------------
Optionen aus nCoreOptions
----------------------------------------------------------------------------*/
- inline BOOL IsIdle() const
+ inline sal_Bool IsIdle() const
{ return bIdle; }
// logically this is a const function since it does not modify the viewoptions
// but only effects idle formatting. Of course that member is already implement
// in the wrong place here... Also currently there are many const modifying casts in the code
// just to call this function on otherwise const objects. Thus declaring it as const now.
- inline void SetIdle( BOOL b ) const
+ inline void SetIdle( sal_Bool b ) const
{ bIdle = b; }
- inline BOOL IsTab(BOOL bHard = FALSE) const
+ inline sal_Bool IsTab(sal_Bool bHard = sal_False) const
{ return !bReadonly && (nCoreOptions & VIEWOPT_1_TAB) &&
((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
- ? TRUE : FALSE; }
- inline void SetTab( BOOL b ) {
+ ? sal_True : sal_False; }
+ inline void SetTab( sal_Bool b ) {
(b != 0) ? (nCoreOptions |= VIEWOPT_1_TAB ) : ( nCoreOptions &= ~VIEWOPT_1_TAB); }
- inline BOOL IsBlank(BOOL bHard = FALSE) const
+ inline sal_Bool IsBlank(sal_Bool bHard = sal_False) const
{ return !bReadonly && (nCoreOptions & VIEWOPT_1_BLANK) &&
((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
- ? TRUE : FALSE; }
- inline void SetBlank( BOOL b )
+ ? sal_True : sal_False; }
+ inline void SetBlank( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_BLANK ) : ( nCoreOptions &= ~VIEWOPT_1_BLANK); }
- inline BOOL IsHardBlank() const
- { return !bReadonly && nCoreOptions & VIEWOPT_1_HARDBLANK ? TRUE : FALSE; }
- inline void SetHardBlank( BOOL b )
+ inline sal_Bool IsHardBlank() const
+ { return !bReadonly && nCoreOptions & VIEWOPT_1_HARDBLANK ? sal_True : sal_False; }
+ inline void SetHardBlank( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_HARDBLANK ) : ( nCoreOptions &= ~VIEWOPT_1_HARDBLANK); }
- inline BOOL IsParagraph(BOOL bHard = FALSE) const
+ inline sal_Bool IsParagraph(sal_Bool bHard = sal_False) const
{ return !bReadonly && (nCoreOptions & VIEWOPT_1_PARAGRAPH) &&
((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
- ? TRUE : FALSE; }
- inline void SetParagraph( BOOL b )
+ ? sal_True : sal_False; }
+ inline void SetParagraph( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_PARAGRAPH ) : ( nCoreOptions &= ~VIEWOPT_1_PARAGRAPH); }
- inline BOOL IsLineBreak(BOOL bHard = FALSE) const
+ inline sal_Bool IsLineBreak(sal_Bool bHard = sal_False) const
{ return !bReadonly && (nCoreOptions & VIEWOPT_1_LINEBREAK) &&
((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
- ? TRUE : FALSE; }
- inline void SetLineBreak( BOOL b )
+ ? sal_True : sal_False; }
+ inline void SetLineBreak( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_LINEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_LINEBREAK); }
- inline void SetPageBreak( BOOL b )
+ inline void SetPageBreak( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_PAGEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBREAK); }
- inline void SetColumnBreak( BOOL b)
+ inline void SetColumnBreak( sal_Bool b)
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_COLUMNBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_COLUMNBREAK); }
- inline BOOL IsSoftHyph() const
- { return !bReadonly && (nCoreOptions & VIEWOPT_1_SOFTHYPH) ? TRUE : FALSE; }
- inline void SetSoftHyph( BOOL b )
+ inline sal_Bool IsSoftHyph() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_SOFTHYPH) ? sal_True : sal_False; }
+ inline void SetSoftHyph( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_SOFTHYPH ) : ( nCoreOptions &= ~VIEWOPT_1_SOFTHYPH); }
- inline BOOL IsFldName() const { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLDNAME) ? TRUE : FALSE; }
- inline void SetFldName( BOOL b )
+ inline sal_Bool IsFldName() const { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLDNAME) ? sal_True : sal_False; }
+ inline void SetFldName( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_FLDNAME ) : ( nCoreOptions &= ~VIEWOPT_1_FLDNAME); }
- inline BOOL IsPostIts() const
- { return (nCoreOptions & VIEWOPT_1_POSTITS) ? TRUE : FALSE; }
- inline void SetPostIts( BOOL b )
+ inline sal_Bool IsPostIts() const
+ { return (nCoreOptions & VIEWOPT_1_POSTITS) ? sal_True : sal_False; }
+ inline void SetPostIts( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_POSTITS ) : ( nCoreOptions &= ~VIEWOPT_1_POSTITS); }
void PaintPostIts( OutputDevice *pOut, const SwRect &rRect,
sal_Bool bIsScript ) const;
- USHORT GetPostItsWidth( const OutputDevice *pOut = 0 ) const;
+ sal_uInt16 GetPostItsWidth( const OutputDevice *pOut = 0 ) const;
- inline BOOL IsShowHiddenChar(sal_Bool bHard = sal_False) const
+ inline sal_Bool IsShowHiddenChar(sal_Bool bHard = sal_False) const
{ return !bReadonly && (nCoreOptions & VIEWOPT_1_CHAR_HIDDEN) &&
((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
- ? TRUE : FALSE; }
+ ? sal_True : sal_False; }
- inline void SetShowHiddenChar( BOOL b )
+ inline void SetShowHiddenChar( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_CHAR_HIDDEN ) : ( nCoreOptions &= ~VIEWOPT_1_CHAR_HIDDEN); }
- inline BOOL IsShowHiddenField() const
- { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLD_HIDDEN) ? TRUE : FALSE; }
- inline void SetShowHiddenField( BOOL b )
+ inline sal_Bool IsShowHiddenField() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLD_HIDDEN) ? sal_True : sal_False; }
+ inline void SetShowHiddenField( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_FLD_HIDDEN ) : ( nCoreOptions &= ~VIEWOPT_1_FLD_HIDDEN); }
- inline BOOL IsGraphic() const
- { return nCoreOptions & VIEWOPT_1_GRAPHIC ? TRUE : FALSE; }
- inline void SetGraphic( BOOL b )
+ inline sal_Bool IsGraphic() const
+ { return nCoreOptions & VIEWOPT_1_GRAPHIC ? sal_True : sal_False; }
+ inline void SetGraphic( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_GRAPHIC ) : ( nCoreOptions &= ~VIEWOPT_1_GRAPHIC); }
- inline BOOL IsPageBack() const
- { return nCoreOptions & VIEWOPT_1_PAGEBACK ? TRUE : FALSE; }
- inline void SetPageBack( BOOL b )
+ inline sal_Bool IsPageBack() const
+ { return nCoreOptions & VIEWOPT_1_PAGEBACK ? sal_True : sal_False; }
+ inline void SetPageBack( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_PAGEBACK) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBACK); }
- inline BOOL IsSolidMarkHdl() const
- { return nCoreOptions & VIEWOPT_1_SOLIDMARKHDL ? TRUE : FALSE; }
- inline void SetSolidMarkHdl( BOOL b )
+ inline sal_Bool IsSolidMarkHdl() const
+ { return nCoreOptions & VIEWOPT_1_SOLIDMARKHDL ? sal_True : sal_False; }
+ inline void SetSolidMarkHdl( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_SOLIDMARKHDL) : ( nCoreOptions &= ~VIEWOPT_1_SOLIDMARKHDL); }
- inline BOOL IsBigMarkHdl() const
- { return nCore2Options & VIEWOPT_CORE2_BIGMARKHDL ? TRUE : FALSE;}
- inline void SetBigMarkHdl(BOOL b)
+ inline sal_Bool IsBigMarkHdl() const
+ { return nCore2Options & VIEWOPT_CORE2_BIGMARKHDL ? sal_True : sal_False;}
+ inline void SetBigMarkHdl(sal_Bool b)
{ (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_BIGMARKHDL ) : (nCore2Options &= ~VIEWOPT_CORE2_BIGMARKHDL);}
- inline BOOL IsTable() const
- { return nCoreOptions & VIEWOPT_1_TABLE ? TRUE : FALSE; }
- inline void SetTable( BOOL b )
+ inline sal_Bool IsTable() const
+ { return nCoreOptions & VIEWOPT_1_TABLE ? sal_True : sal_False; }
+ inline void SetTable( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_TABLE ) : ( nCoreOptions &= ~VIEWOPT_1_TABLE); }
- inline BOOL IsDraw() const
- { return nCoreOptions & VIEWOPT_1_DRAW ? TRUE : FALSE; }
- inline void SetDraw( BOOL b )
+ inline sal_Bool IsDraw() const
+ { return nCoreOptions & VIEWOPT_1_DRAW ? sal_True : sal_False; }
+ inline void SetDraw( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_DRAW ) : ( nCoreOptions &= ~VIEWOPT_1_DRAW); }
- inline BOOL IsControl() const
- { return nCoreOptions & VIEWOPT_1_CONTROL ? TRUE : FALSE; }
- inline void SetControl( BOOL b )
+ inline sal_Bool IsControl() const
+ { return nCoreOptions & VIEWOPT_1_CONTROL ? sal_True : sal_False; }
+ inline void SetControl( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_CONTROL ) : ( nCoreOptions &= ~VIEWOPT_1_CONTROL); }
- inline BOOL IsSnap() const
- { return nCoreOptions & VIEWOPT_1_SNAP ? TRUE : FALSE; }
- inline void SetSnap( BOOL b )
+ inline sal_Bool IsSnap() const
+ { return nCoreOptions & VIEWOPT_1_SNAP ? sal_True : sal_False; }
+ inline void SetSnap( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_SNAP ) : ( nCoreOptions &= ~VIEWOPT_1_SNAP); }
inline void SetSnapSize( Size &rSz ){ aSnapSize = rSz; }
inline const Size &GetSnapSize() const { return aSnapSize; }
- inline BOOL IsGridVisible() const
- { return !bReadonly && (nCoreOptions & VIEWOPT_1_GRIDVISIBLE) ? TRUE : FALSE; }
- inline void SetGridVisible( BOOL b )
+ inline sal_Bool IsGridVisible() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_GRIDVISIBLE) ? sal_True : sal_False; }
+ inline void SetGridVisible( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_GRIDVISIBLE ) : ( nCoreOptions &= ~VIEWOPT_1_GRIDVISIBLE); }
- inline BOOL IsOnlineSpell() const
- { return !bReadonly && (nCoreOptions & VIEWOPT_1_ONLINESPELL) ? TRUE : FALSE; }
- inline void SetOnlineSpell( BOOL b )
+ inline sal_Bool IsOnlineSpell() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_ONLINESPELL) ? sal_True : sal_False; }
+ inline void SetOnlineSpell( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_ONLINESPELL ) : ( nCoreOptions &= ~VIEWOPT_1_ONLINESPELL); }
- inline BOOL IsViewMetaChars() const
- { return !bReadonly && (nCoreOptions & VIEWOPT_1_VIEWMETACHARS) ? TRUE : FALSE; }
- inline void SetViewMetaChars( BOOL b)
+ inline sal_Bool IsViewMetaChars() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_VIEWMETACHARS) ? sal_True : sal_False; }
+ inline void SetViewMetaChars( sal_Bool b)
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_VIEWMETACHARS ) : ( nCoreOptions &= ~VIEWOPT_1_VIEWMETACHARS); }
- inline BOOL IsSynchronize() const
- { return nCoreOptions & VIEWOPT_1_SYNCHRONIZE ? TRUE : FALSE;}
- inline void SetSynchronize( BOOL b )
+ inline sal_Bool IsSynchronize() const
+ { return nCoreOptions & VIEWOPT_1_SYNCHRONIZE ? sal_True : sal_False;}
+ inline void SetSynchronize( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_SYNCHRONIZE ) : ( nCoreOptions &= ~VIEWOPT_1_SYNCHRONIZE); }
- inline BOOL IsCrossHair() const
- { return nCoreOptions & VIEWOPT_1_CROSSHAIR ? TRUE : FALSE; }
- inline void SetCrossHair( BOOL b )
+ inline sal_Bool IsCrossHair() const
+ { return nCoreOptions & VIEWOPT_1_CROSSHAIR ? sal_True : sal_False; }
+ inline void SetCrossHair( sal_Bool b )
{ (b != 0) ? (nCoreOptions |= VIEWOPT_1_CROSSHAIR ) : ( nCoreOptions &= ~VIEWOPT_1_CROSSHAIR); }
/*---------------------------------------------------------------------------
Optionen aus nCore2Options
----------------------------------------------------------------------------*/
- inline BOOL IsBlackFont() const
- {return nCore2Options & VIEWOPT_CORE2_BLACKFONT ? TRUE : FALSE;}
+ inline sal_Bool IsBlackFont() const
+ {return nCore2Options & VIEWOPT_CORE2_BLACKFONT ? sal_True : sal_False;}
- inline void SetBlackFont(BOOL b)
+ inline void SetBlackFont(sal_Bool b)
{ (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_BLACKFONT) : (nCore2Options &= ~VIEWOPT_CORE2_BLACKFONT);}
- inline BOOL IsShowHiddenPara() const
- {return nCore2Options & VIEWOPT_CORE2_HIDDENPARA ? TRUE : FALSE;}
+ inline sal_Bool IsShowHiddenPara() const
+ {return nCore2Options & VIEWOPT_CORE2_HIDDENPARA ? sal_True : sal_False;}
- inline void SetShowHiddenPara(BOOL b)
+ inline void SetShowHiddenPara(sal_Bool b)
{ (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_HIDDENPARA) : (nCore2Options &= ~VIEWOPT_CORE2_HIDDENPARA);}
- inline BOOL IsSmoothScroll() const
- {return nCore2Options & VIEWOPT_CORE2_SMOOTHSCROLL ? TRUE : FALSE;}
+ inline sal_Bool IsSmoothScroll() const
+ {return nCore2Options & VIEWOPT_CORE2_SMOOTHSCROLL ? sal_True : sal_False;}
- inline void SetSmoothScroll(BOOL b)
+ inline void SetSmoothScroll(sal_Bool b)
{ (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_SMOOTHSCROLL) : (nCore2Options &= ~VIEWOPT_CORE2_SMOOTHSCROLL);}
- inline BOOL IsCursorInProtectedArea() const
- {return nCore2Options & VIEWOPT_CORE2_CRSR_IN_PROT ? TRUE : FALSE;}
+ inline sal_Bool IsCursorInProtectedArea() const
+ {return nCore2Options & VIEWOPT_CORE2_CRSR_IN_PROT ? sal_True : sal_False;}
- inline void SetCursorInProtectedArea(BOOL b)
+ inline void SetCursorInProtectedArea(sal_Bool b)
{ (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_CRSR_IN_PROT) : (nCore2Options &= ~VIEWOPT_CORE2_CRSR_IN_PROT);}
- inline BOOL IsPDFExport() const
- {return nCore2Options & VIEWOPT_CORE2_PDF_EXPORT ? TRUE : FALSE;}
+ inline sal_Bool IsPDFExport() const
+ {return nCore2Options & VIEWOPT_CORE2_PDF_EXPORT ? sal_True : sal_False;}
- inline void SetPDFExport(BOOL b)
+ inline void SetPDFExport(sal_Bool b)
{ (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_PDF_EXPORT) : (nCore2Options &= ~VIEWOPT_CORE2_PDF_EXPORT);}
- inline BOOL IsPrinting() const
- {return nCore2Options & VIEWOPT_CORE2_PRINTING ? TRUE : FALSE;}
+ inline sal_Bool IsPrinting() const
+ {return nCore2Options & VIEWOPT_CORE2_PRINTING ? sal_True : sal_False;}
- inline void SetPrinting(BOOL b)
+ inline void SetPrinting(sal_Bool b)
{ (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_PRINTING) : (nCore2Options &= ~VIEWOPT_CORE2_PRINTING);}
inline short GetDivisionX() const { return nDivisionX; }
@@ -390,102 +390,102 @@ public:
inline short GetDivisionY() const { return nDivisionY; }
inline void SetDivisionY( short n ){ nDivisionY = n; }
- inline BYTE GetPagePrevRow() const { return nPagePrevRow; }
- inline void SetPagePrevRow( BYTE n ) { nPagePrevRow = n; }
- inline BYTE GetPagePrevCol() const { return nPagePrevCol; }
- inline void SetPagePrevCol( BYTE n ) { nPagePrevCol = n; }
- BOOL IsReadonly() const { return bReadonly; }
- void SetReadonly(BOOL bSet) { bReadonly = bSet; }
+ inline sal_uInt8 GetPagePrevRow() const { return nPagePrevRow; }
+ inline void SetPagePrevRow( sal_uInt8 n ) { nPagePrevRow = n; }
+ inline sal_uInt8 GetPagePrevCol() const { return nPagePrevCol; }
+ inline void SetPagePrevCol( sal_uInt8 n ) { nPagePrevCol = n; }
+ sal_Bool IsReadonly() const { return bReadonly; }
+ void SetReadonly(sal_Bool bSet) { bReadonly = bSet; }
- BOOL IsSelectionInReadonly() const {return bSelectionInReadonly;}
- void SetSelectionInReadonly(BOOL bSet) {bSelectionInReadonly = bSet;}
+ sal_Bool IsSelectionInReadonly() const {return bSelectionInReadonly;}
+ void SetSelectionInReadonly(sal_Bool bSet) {bSelectionInReadonly = bSet;}
- BOOL IsFormView() const { return bFormView; }
- void SetFormView( BOOL bSet ) { bFormView = bSet; }
+ sal_Bool IsFormView() const { return bFormView; }
+ void SetFormView( sal_Bool bSet ) { bFormView = bSet; }
- inline BOOL IsPagePrevBookview() const { return bBookview; }
- inline void SetPagePrevBookview(BOOL bSet) { bBookview = bSet; }
+ inline sal_Bool IsPagePrevBookview() const { return bBookview; }
+ inline void SetPagePrevBookview(sal_Bool bSet) { bBookview = bSet; }
- BOOL IsAutoCompleteWords() const;
+ sal_Bool IsAutoCompleteWords() const;
bool IsViewLayoutBookMode() const { return mbViewLayoutBookMode; }
void SetViewLayoutBookMode( bool bNew ) { mbViewLayoutBookMode = bNew; }
- USHORT GetViewLayoutColumns() const { return mnViewLayoutColumns; }
- void SetViewLayoutColumns( USHORT nNew ) { mnViewLayoutColumns = nNew; }
+ sal_uInt16 GetViewLayoutColumns() const { return mnViewLayoutColumns; }
+ void SetViewLayoutColumns( sal_uInt16 nNew ) { mnViewLayoutColumns = nNew; }
#if OSL_DEBUG_LEVEL > 1
// korrespondieren zu den Angaben in ui/config/cfgvw.src
- inline BOOL IsTest1() const { return bTest1; }
- inline void SetTest1( BOOL b ) { bTest1 = b; }
- inline BOOL IsTest2() const { return bTest2; }
- inline void SetTest2( BOOL b ) { bTest2 = b; }
- inline BOOL IsTest3() const { return bTest3; }
- inline void SetTest3( BOOL b ) { bTest3 = b; }
- inline BOOL IsTest4() const { return bTest4; }
- inline void SetTest4( BOOL b ) { bTest4 = b; }
- inline BOOL IsTest5() const { return bTest5; }
- inline void SetTest5( BOOL b ) { bTest5 = b; }
- inline BOOL IsTest6() const { return bTest6; }
- inline void SetTest6( BOOL b ) { bTest6 = b; }
- inline BOOL IsTest7() const { return bTest7; }
- inline void SetTest7( BOOL b ) { bTest7 = b; }
- inline BOOL IsTest8() const { return bTest8; }
- inline void SetTest8( BOOL b ) { bTest8 = b; }
- static inline BOOL IsTest9() { return bTest9; }
- static inline void SetTest9( BOOL b ) { bTest9 = b; }
- inline BOOL IsTest10() const { return bTest10; }
- inline void SetTest10( BOOL b ) { bTest10 = b; }
+ inline sal_Bool IsTest1() const { return bTest1; }
+ inline void SetTest1( sal_Bool b ) { bTest1 = b; }
+ inline sal_Bool IsTest2() const { return bTest2; }
+ inline void SetTest2( sal_Bool b ) { bTest2 = b; }
+ inline sal_Bool IsTest3() const { return bTest3; }
+ inline void SetTest3( sal_Bool b ) { bTest3 = b; }
+ inline sal_Bool IsTest4() const { return bTest4; }
+ inline void SetTest4( sal_Bool b ) { bTest4 = b; }
+ inline sal_Bool IsTest5() const { return bTest5; }
+ inline void SetTest5( sal_Bool b ) { bTest5 = b; }
+ inline sal_Bool IsTest6() const { return bTest6; }
+ inline void SetTest6( sal_Bool b ) { bTest6 = b; }
+ inline sal_Bool IsTest7() const { return bTest7; }
+ inline void SetTest7( sal_Bool b ) { bTest7 = b; }
+ inline sal_Bool IsTest8() const { return bTest8; }
+ inline void SetTest8( sal_Bool b ) { bTest8 = b; }
+ static inline sal_Bool IsTest9() { return bTest9; }
+ static inline void SetTest9( sal_Bool b ) { bTest9 = b; }
+ inline sal_Bool IsTest10() const { return bTest10; }
+ inline void SetTest10( sal_Bool b ) { bTest10 = b; }
#endif
- inline USHORT GetZoom() const { return nZoom; }
- inline void SetZoom( USHORT n ){ nZoom = n; }
+ inline sal_uInt16 GetZoom() const { return nZoom; }
+ inline void SetZoom( sal_uInt16 n ){ nZoom = n; }
void DrawRect( OutputDevice* pOut, const SwRect &rRect, long nCol ) const;
void DrawRectPrinter( OutputDevice* pOut, const SwRect& rRect ) const;
SwViewOption& operator=( const SwViewOption &rOpt );
// Vergleichsmethoden
- BOOL IsEqualFlags ( const SwViewOption &rOpt ) const;
- inline BOOL operator == ( const SwViewOption &rOpt ) const;
- inline BOOL operator != ( const SwViewOption &rOpt ) const { return !(*this == rOpt); }
+ sal_Bool IsEqualFlags ( const SwViewOption &rOpt ) const;
+ inline sal_Bool operator == ( const SwViewOption &rOpt ) const;
+ inline sal_Bool operator != ( const SwViewOption &rOpt ) const { return !(*this == rOpt); }
/*---------------------------------------------------------------------------
Optionen aus nUIOptions
----------------------------------------------------------------------------*/
- BOOL IsViewVScrollBar() const
- { return nUIOptions & VIEWOPT_2_VSCROLLBAR ? TRUE : FALSE; }
- BOOL IsViewHScrollBar() const
- { return nUIOptions & VIEWOPT_2_HSCROLLBAR ? TRUE : FALSE; }
- BOOL IsKeepRatio() const
- { return nUIOptions & VIEWOPT_2_KEEPASPECTRATIO ? TRUE : FALSE; }
- BOOL IsGrfKeepZoom() const
- { return nUIOptions & VIEWOPT_2_GRFKEEPZOOM ? TRUE : FALSE; }
- BOOL IsPreventTips() const
- { return nUIOptions & VIEWOPT_2_PREVENT_TIPS ? TRUE : FALSE; }
- BOOL IsPrtFormat() const
- { return nUIOptions & VIEWOPT_2_PRTFORMAT ? TRUE : FALSE; }
+ sal_Bool IsViewVScrollBar() const
+ { return nUIOptions & VIEWOPT_2_VSCROLLBAR ? sal_True : sal_False; }
+ sal_Bool IsViewHScrollBar() const
+ { return nUIOptions & VIEWOPT_2_HSCROLLBAR ? sal_True : sal_False; }
+ sal_Bool IsKeepRatio() const
+ { return nUIOptions & VIEWOPT_2_KEEPASPECTRATIO ? sal_True : sal_False; }
+ sal_Bool IsGrfKeepZoom() const
+ { return nUIOptions & VIEWOPT_2_GRFKEEPZOOM ? sal_True : sal_False; }
+ sal_Bool IsPreventTips() const
+ { return nUIOptions & VIEWOPT_2_PREVENT_TIPS ? sal_True : sal_False; }
+ sal_Bool IsPrtFormat() const
+ { return nUIOptions & VIEWOPT_2_PRTFORMAT ? sal_True : sal_False; }
SvxZoomType GetZoomType() const { return eZoom; }
- BYTE GetTblDest() const { return nTblDest; }
+ sal_uInt8 GetTblDest() const { return nTblDest; }
- void SetViewVScrollBar(BOOL b)
+ void SetViewVScrollBar(sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_VSCROLLBAR ) : ( nUIOptions &= ~VIEWOPT_2_VSCROLLBAR); }
- void SetViewHScrollBar(BOOL b)
+ void SetViewHScrollBar(sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_HSCROLLBAR ) : ( nUIOptions &= ~VIEWOPT_2_HSCROLLBAR); }
- void SetKeepRatio (BOOL b)
+ void SetKeepRatio (sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_KEEPASPECTRATIO ) : ( nUIOptions &= ~VIEWOPT_2_KEEPASPECTRATIO); }
- void SetGrfKeepZoom (BOOL b)
+ void SetGrfKeepZoom (sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_GRFKEEPZOOM ) : ( nUIOptions &= ~VIEWOPT_2_GRFKEEPZOOM); }
- void SetPreventTips( BOOL b)
+ void SetPreventTips( sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_PREVENT_TIPS) : (nUIOptions &= ~VIEWOPT_2_PREVENT_TIPS); }
- void SetPrtFormat( BOOL b)
+ void SetPrtFormat( sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_PRTFORMAT) : (nUIOptions &= ~VIEWOPT_2_PRTFORMAT); }
void SetZoomType (SvxZoomType eZoom_){ eZoom = eZoom_; }
- void SetTblDest( BYTE nNew ) { nTblDest = nNew; }
+ void SetTblDest( sal_uInt8 nNew ) { nTblDest = nNew; }
const String& GetSymbolFont() const {return sSymbolFont;}
void SetSymbolFont(const String& sSet) {sSymbolFont = sSet;}
@@ -493,56 +493,56 @@ public:
const Color& GetRetoucheColor() const { return aRetoucheColor;}
void SetRetoucheColor(const Color&r) { aRetoucheColor = r; }
- BOOL IsViewAnyRuler() const {return 0 != (nUIOptions & VIEWOPT_2_ANY_RULER);}
- void SetViewAnyRuler(BOOL bSet)
+ sal_Bool IsViewAnyRuler() const {return 0 != (nUIOptions & VIEWOPT_2_ANY_RULER);}
+ void SetViewAnyRuler(sal_Bool bSet)
{ bSet ? (nUIOptions |= VIEWOPT_2_ANY_RULER) : (nUIOptions &= ~VIEWOPT_2_ANY_RULER);}
- BOOL IsViewHRuler(BOOL bDirect = FALSE) const
+ sal_Bool IsViewHRuler(sal_Bool bDirect = sal_False) const
{
- BOOL bRet = sal::static_int_cast< BOOL >( bDirect ?
+ sal_Bool bRet = sal::static_int_cast< sal_Bool >( bDirect ?
0 != (nUIOptions & VIEWOPT_2_H_RULER) :
!bReadonly ?
(nUIOptions & (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER)
- : FALSE );
+ : sal_False );
return bRet;
}
- void SetViewHRuler (BOOL b)
+ void SetViewHRuler (sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_H_RULER ) : ( nUIOptions &= ~VIEWOPT_2_H_RULER);}
- BOOL IsViewVRuler(BOOL bDirect = FALSE) const
+ sal_Bool IsViewVRuler(sal_Bool bDirect = sal_False) const
{
- BOOL bRet = sal::static_int_cast< BOOL >( bDirect ?
+ sal_Bool bRet = sal::static_int_cast< sal_Bool >( bDirect ?
0 !=(nUIOptions & VIEWOPT_2_V_RULER) :
!bReadonly ?
(nUIOptions &
(VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER)
- : FALSE );
+ : sal_False );
return bRet;
}
- void SetViewVRuler (BOOL b)
+ void SetViewVRuler (sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_V_RULER ) : ( nUIOptions &= ~VIEWOPT_2_V_RULER);}
// ShadowCursor ein schalten/abfragen/Farbe setzen/Modus setzen
- BOOL IsShadowCursor() const
- { return nUIOptions & VIEWOPT_2_SHADOWCRSR ? TRUE : FALSE; }
- void SetShadowCursor(BOOL b)
+ sal_Bool IsShadowCursor() const
+ { return nUIOptions & VIEWOPT_2_SHADOWCRSR ? sal_True : sal_False; }
+ void SetShadowCursor(sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_SHADOWCRSR ) : ( nUIOptions &= ~VIEWOPT_2_SHADOWCRSR); }
//move vertical ruler to the right
- BOOL IsVRulerRight() const
- { return nUIOptions & VIEWOPT_2_V_RULER_RIGHT ? TRUE : FALSE; }
- void SetVRulerRight(BOOL b)
+ sal_Bool IsVRulerRight() const
+ { return nUIOptions & VIEWOPT_2_V_RULER_RIGHT ? sal_True : sal_False; }
+ void SetVRulerRight(sal_Bool b)
{ b ? (nUIOptions |= VIEWOPT_2_V_RULER_RIGHT ) : ( nUIOptions &= ~VIEWOPT_2_V_RULER_RIGHT); }
- BOOL IsStarOneSetting() const {return bStarOneSetting; }
- void SetStarOneSetting(BOOL bSet) {bStarOneSetting = bSet; }
+ sal_Bool IsStarOneSetting() const {return bStarOneSetting; }
+ void SetStarOneSetting(sal_Bool bSet) {bStarOneSetting = bSet; }
- BOOL IsPagePreview() const {return bIsPagePreview; }
- void SetPagePreview(BOOL bSet) { bIsPagePreview= bSet; }
+ sal_Bool IsPagePreview() const {return bIsPagePreview; }
+ void SetPagePreview(sal_Bool bSet) { bIsPagePreview= bSet; }
- BYTE GetShdwCrsrFillMode() const { return nShdwCrsrFillMode; }
- void SetShdwCrsrFillMode( BYTE nMode ) { nShdwCrsrFillMode = nMode; };
+ sal_uInt8 GetShdwCrsrFillMode() const { return nShdwCrsrFillMode; }
+ void SetShdwCrsrFillMode( sal_uInt8 nMode ) { nShdwCrsrFillMode = nMode; };
sal_Bool IsShowPlaceHolderFields() const { return bShowPlaceHolderFields; }
void SetShowPlaceHolderFields(sal_Bool bSet) { bShowPlaceHolderFields = bSet; }
@@ -565,27 +565,27 @@ public:
static Color& GetSectionBoundColor();
static Color& GetPageBreakColor();
- static BOOL IsAppearanceFlag(sal_Int32 nFlag);
+ static sal_Bool IsAppearanceFlag(sal_Int32 nFlag);
- static BOOL IsDocBoundaries() {return IsAppearanceFlag(VIEWOPT_DOC_BOUNDARIES);}
- static BOOL IsObjectBoundaries(){return IsAppearanceFlag(VIEWOPT_OBJECT_BOUNDARIES);}
- static BOOL IsTableBoundaries() {return IsAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES );}
- static BOOL IsIndexShadings() {return IsAppearanceFlag(VIEWOPT_INDEX_SHADINGS );}
- static BOOL IsLinks() {return IsAppearanceFlag(VIEWOPT_LINKS );}
- static BOOL IsVisitedLinks() {return IsAppearanceFlag(VIEWOPT_VISITED_LINKS );}
- static BOOL IsFieldShadings() {return IsAppearanceFlag(VIEWOPT_FIELD_SHADINGS);}
- static BOOL IsSectionBoundaries() {return IsAppearanceFlag(VIEWOPT_SECTION_BOUNDARIES);}
- static BOOL IsShadow() {return IsAppearanceFlag(VIEWOPT_SHADOW );}
+ static sal_Bool IsDocBoundaries() {return IsAppearanceFlag(VIEWOPT_DOC_BOUNDARIES);}
+ static sal_Bool IsObjectBoundaries(){return IsAppearanceFlag(VIEWOPT_OBJECT_BOUNDARIES);}
+ static sal_Bool IsTableBoundaries() {return IsAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES );}
+ static sal_Bool IsIndexShadings() {return IsAppearanceFlag(VIEWOPT_INDEX_SHADINGS );}
+ static sal_Bool IsLinks() {return IsAppearanceFlag(VIEWOPT_LINKS );}
+ static sal_Bool IsVisitedLinks() {return IsAppearanceFlag(VIEWOPT_VISITED_LINKS );}
+ static sal_Bool IsFieldShadings() {return IsAppearanceFlag(VIEWOPT_FIELD_SHADINGS);}
+ static sal_Bool IsSectionBoundaries() {return IsAppearanceFlag(VIEWOPT_SECTION_BOUNDARIES);}
+ static sal_Bool IsShadow() {return IsAppearanceFlag(VIEWOPT_SHADOW );}
- static void SetAppearanceFlag(sal_Int32 nFlag, BOOL bSet, BOOL bSaveInConfig = FALSE);
+ static void SetAppearanceFlag(sal_Int32 nFlag, sal_Bool bSet, sal_Bool bSaveInConfig = sal_False);
- void SetDocBoundaries(BOOL bSet) {SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bSet);}
+ void SetDocBoundaries(sal_Bool bSet) {SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bSet);}
static void ApplyColorConfigValues(const svtools::ColorConfig& rConfig);
};
-inline BOOL SwViewOption::operator==( const SwViewOption &rOpt ) const
+inline sal_Bool SwViewOption::operator==( const SwViewOption &rOpt ) const
{
return IsEqualFlags( rOpt ) && nZoom == rOpt.GetZoom();
}
@@ -599,7 +599,7 @@ inline void SwViewOption::SetUIOptions( const SwViewOption& rVOpt )
// Hilfsfunktion zur Ermittlung der HTML-Faehigkeiten
-SW_DLLPUBLIC USHORT GetHtmlMode(const SwDocShell*);
+SW_DLLPUBLIC sal_uInt16 GetHtmlMode(const SwDocShell*);
#endif
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 19d31b4bec3e..7e07979f47a0 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -25,8 +25,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _VIEWSH_HXX
-#define _VIEWSH_HXX
+#ifndef SW_VIEWSH_HXX
+#define SW_VIEWSH_HXX
+
#include <com/sun/star/embed/XClassifiedObject.hpp>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <tools/rtti.hxx>
@@ -65,7 +66,6 @@ class SfxItemPool;
class SfxViewShell;
class SwViewOption;
class SwViewImp;
-class SwPrtOptions;
class SwPrintData;
class SwPagePreViewPrtData;
class Window;
@@ -111,7 +111,7 @@ class SW_DLLPUBLIC ViewShell : public Ring
//Umsetzen der SwVisArea, damit vor dem Drucken sauber formatiert
//werden kann.
- friend void SetSwVisArea( ViewShell *pSh, const SwRect &, BOOL bPDFExport = FALSE );
+ friend void SetSwVisArea( ViewShell *pSh, const SwRect &, sal_Bool bPDFExport = sal_False );
static BitmapEx* pReplaceBmp; // replaced display of still loaded images
static BitmapEx* pErrorBmp; // error display of missed images
@@ -266,7 +266,7 @@ public:
Point GetPagePos( sal_uInt16 nPageNum ) const;
sal_uInt16 GetNumPages(); //Anzahl der aktuellen Seiten Layout erfragen.
- sal_Bool IsDummyPage( USHORT nPageNum ) const; // An empty page?
+ sal_Bool IsDummyPage( sal_uInt16 nPageNum ) const; // An empty page?
//Invalidierung der ersten Sichtbaren Seite fuer alle Shells im Ring.
void SetFirstVisPageInvalid();
@@ -329,7 +329,8 @@ public:
/** Provides access to the document undo/redo interface
*/
- IDocumentUndoRedo* getIDocumentUndoRedoAccess();
+ IDocumentUndoRedo const& GetIDocumentUndoRedo() const;
+ IDocumentUndoRedo & GetIDocumentUndoRedo();
const IDocumentListItems* getIDocumentListItemsAccess() const;
const IDocumentOutlineNodes* getIDocumentOutlineNodesAccess() const;
@@ -350,7 +351,8 @@ public:
// printing of one page.
// bIsPDFExport == true is: do PDF Export (no printing!)
- sal_Bool PrintOrPDFExport( OutputDevice *pOutDev, const SwPrtOptions &rPrintData,
+ sal_Bool PrintOrPDFExport( OutputDevice *pOutDev,
+ SwPrintData const& rPrintData,
sal_Int32 nRenderer /* offset in vector of pages to print */ );
// printing of one brochure page
@@ -361,8 +363,7 @@ public:
static void PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions,
OutputDevice* pOleOut, const Rectangle& rRect );
- // creates temporary doc with selected text for PDF export
- SwDoc * CreatePrtDoc( SfxObjectShellRef& );
+ /// fill temporary doc with selected text for Print or PDF export
SwDoc * FillPrtDoc( SwDoc* pPrtDoc, const SfxPrinter* pPrt );
//Wird intern fuer die Shell gerufen die Druckt. Formatiert die Seiten.
@@ -454,7 +455,7 @@ public:
input parameter - constant reference to print options, to which the
view option will be adjusted.
*/
- void AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions );
+ void AdjustOptionsForPagePreview( SwPrintData const& rPrintOptions );
sal_Bool IsViewLocked() const { return bViewLocked; }
void LockView( sal_Bool b ) { bViewLocked = b; }
@@ -490,7 +491,7 @@ public:
//wenn sich der BrowdseModus aendert, bBrowseChgd == sal_True
//oder, im BrowseModus, wenn sich die Groessenverhaeltnisse
//aendern (bBrowseChgd == sal_False)
- void CheckBrowseView( BOOL bBrowseChgd );
+ void CheckBrowseView( sal_Bool bBrowseChgd );
const Size& GetBrowseBorder() const;
sal_Int32 GetBrowseWidth() const;
@@ -609,6 +610,6 @@ inline const SfxItemPool& ViewShell::GetAttrPool() const
-#endif //_VIEWSH_HXX
+#endif // SW_VIEWSH_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx
index 07f082e0c8c3..e8e917b888ff 100644
--- a/sw/inc/viscrs.hxx
+++ b/sw/inc/viscrs.hxx
@@ -46,11 +46,11 @@ class SwVisCrsr
friend void _InitCore();
friend void _FinitCore();
- BOOL bIsVisible : 1;
- BOOL bIsDragCrsr : 1;
+ sal_Bool bIsVisible : 1;
+ sal_Bool bIsDragCrsr : 1;
#ifdef SW_CRSR_TIMER
- BOOL bTimerOn : 1;
+ sal_Bool bTimerOn : 1;
#endif
Cursor aTxtCrsr;
@@ -68,11 +68,11 @@ public:
void Show();
void Hide();
- BOOL IsVisible() const { return bIsVisible; }
- void SetDragCrsr( BOOL bFlag = TRUE ) { bIsDragCrsr = bFlag; }
+ sal_Bool IsVisible() const { return bIsVisible; }
+ void SetDragCrsr( sal_Bool bFlag = sal_True ) { bIsDragCrsr = bFlag; }
#ifdef SW_CRSR_TIMER
- BOOL ChgTimerFlag( BOOL bTimerOn = TRUE );
+ sal_Bool ChgTimerFlag( sal_Bool bTimerOn = sal_True );
#endif
};
@@ -157,15 +157,15 @@ public:
virtual short MaxReplaceArived(); //returns RET_YES/RET_CANCEL/RET_NO
virtual void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
- BOOL UpDown( BOOL bUp, USHORT nCnt = 1 );
+ sal_Bool UpDown( sal_Bool bUp, sal_uInt16 nCnt = 1 );
- // TRUE: an die Position kann der Cursor gesetzt werden
- virtual BOOL IsAtValidPos( BOOL bPoint = TRUE ) const;
+ // sal_True: an die Position kann der Cursor gesetzt werden
+ virtual sal_Bool IsAtValidPos( sal_Bool bPoint = sal_True ) const;
#if OSL_DEBUG_LEVEL > 1
// zum Testen des UNO-Crsr Verhaltens hier die Implementierung
// am sichtbaren Cursor
- virtual BOOL IsSelOvr( int eFlags =
+ virtual sal_Bool IsSelOvr( int eFlags =
( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
@@ -195,7 +195,7 @@ public:
virtual void FillRects(); // fuer Table- und normalen Crsr
// Pruefe, ob sich der SPoint innerhalb der Tabellen-SSelection befindet
- BOOL IsInside( const Point& rPt ) const;
+ sal_Bool IsInside( const Point& rPt ) const;
virtual void SetMark();
virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
@@ -203,13 +203,13 @@ public:
virtual short MaxReplaceArived(); //returns RET_YES/RET_CANCEL/RET_NO
virtual void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
- // TRUE: an die Position kann der Cursor gesetzt werden
- virtual BOOL IsAtValidPos( BOOL bPoint = TRUE ) const;
+ // sal_True: an die Position kann der Cursor gesetzt werden
+ virtual sal_Bool IsAtValidPos( sal_Bool bPoint = sal_True ) const;
#if OSL_DEBUG_LEVEL > 1
// zum Testen des UNO-Crsr Verhaltens hier die Implementierung
// am sichtbaren Cursor
- virtual BOOL IsSelOvr( int eFlags =
+ virtual sal_Bool IsSelOvr( int eFlags =
( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
diff --git a/sw/inc/wdocsh.hxx b/sw/inc/wdocsh.hxx
index 8b1e6a68cd60..74ca5f098854 100644
--- a/sw/inc/wdocsh.hxx
+++ b/sw/inc/wdocsh.hxx
@@ -33,7 +33,7 @@
class SW_DLLPUBLIC SwWebDocShell: public SwDocShell
{
- USHORT nSourcePara; // aktive Zeile in der SourceView
+ sal_uInt16 nSourcePara; // aktive Zeile in der SourceView
public:
@@ -54,9 +54,9 @@ public:
String * pUserName,
sal_Int32 nFileFormat,
sal_Bool bTemplate = sal_False ) const;
- USHORT GetSourcePara()const
+ sal_uInt16 GetSourcePara()const
{return nSourcePara;}
- void SetSourcePara(USHORT nSet) {nSourcePara = nSet;}
+ void SetSourcePara(sal_uInt16 nSet) {nSourcePara = nSet;}
};
#endif
diff --git a/sw/prj/build.lst b/sw/prj/build.lst
index 8217f82b579a..d99aee5c1723 100755..100644
--- a/sw/prj/build.lst
+++ b/sw/prj/build.lst
@@ -1,77 +1,2 @@
-sw sw : filter l10n connectivity writerperfect lotuswordpro vbahelper svx stoc writerfilter unoxml fileaccess package comphelper NULL
-sw sw usr1 - all sw_mkout NULL
-sw sw\inc nmake - all sw_inc NULL
-sw sw\uiconfig\layout nmake - all sw_layout NULL
-sw sw\prj get - all sw_prj NULL
-sw sw\source\ui\inc nmake - all sw_uinc NULL
-sw sw\source\core\inc get - all sw_cinc NULL
-sw sw\source\filter\inc get - all sw_finc NULL
-sw sw\res get - all sw_res NULL
-sw sw\win\res get - all sw_wres NULL
-sw sw\win\imglst get - all sw_wimg NULL
-sw sw\sdi nmake - all sw_sdi NULL
-sw sw\source\core\bastyp nmake - all sw_bast sw_inc NULL
-sw sw\source\ui\app nmake - all sw_app sw_sdi sw_uinc sw_inc NULL
-sw sw\source\ui\cctrl nmake - all sw_cctrl sw_inc NULL
-sw sw\source\ui\chrdlg nmake - all sw_chrdl sw_inc NULL
-sw sw\source\ui\config nmake - all sw_conf sw_inc NULL
-sw sw\source\ui\dbui nmake - all sw_dbui sw_inc NULL
-sw sw\source\ui\dialog nmake - all sw_dlg sw_inc NULL
-sw sw\source\ui\dochdl nmake - all sw_dchdl sw_inc NULL
-sw sw\source\ui\docvw nmake - all sw_dcvw sw_inc NULL
-sw sw\source\ui\envelp nmake - all sw_envlp sw_inc NULL
-sw sw\source\ui\fldui nmake - all sw_fldui sw_inc NULL
-sw sw\source\ui\fmtui nmake - all sw_fmtui sw_inc NULL
-sw sw\source\ui\frmdlg nmake - all sw_frmdl sw_inc NULL
-sw sw\source\ui\globdoc nmake - all sw_globd sw_uinc sw_inc NULL
-sw sw\source\ui\index nmake - all sw_index sw_inc NULL
-sw sw\source\ui\lingu nmake - all sw_ling sw_inc NULL
-sw sw\source\ui\misc nmake - all sw_misc sw_sdi sw_inc NULL
-sw sw\source\ui\ribbar nmake - all sw_rbbar sw_inc NULL
-sw sw\source\ui\shells nmake - all sw_shell sw_uinc sw_sdi sw_inc NULL
-sw sw\source\ui\smartmenu nmake - all sw_smartmenu sw_inc NULL
-sw sw\source\ui\table nmake - all sw_table sw_inc NULL
-sw sw\source\ui\uiview nmake - all sw_uivw sw_sdi sw_inc NULL
-sw sw\source\ui\uno nmake - all sw_uiuno sw_sdi sw_inc NULL
-sw sw\source\ui\vba nmake - all sw_vba sw_inc NULL
-sw sw\source\ui\utlui nmake - all sw_utlui sw_inc NULL
-sw sw\source\ui\web nmake - all sw_web sw_uinc sw_sdi sw_inc NULL
-sw sw\source\ui\wrtsh nmake - all sw_wrtsh sw_inc NULL
-sw sw\source\core\attr nmake - all sw_attr sw_inc NULL
-sw sw\source\core\crsr nmake - all sw_crsr sw_inc NULL
-sw sw\source\core\doc nmake - all sw_doc sw_inc NULL
-sw sw\source\core\docnode nmake - all sw_dcnd sw_inc NULL
-sw sw\source\core\draw nmake - all sw_draw sw_inc NULL
-sw sw\source\core\edit nmake - all sw_edit sw_inc NULL
-sw sw\source\core\fields nmake - all sw_fld sw_inc NULL
-sw sw\source\core\frmedt nmake - all sw_frmed sw_inc NULL
-sw sw\source\core\graphic nmake - all sw_grph sw_inc NULL
-sw sw\source\core\layout nmake - all sw_layo sw_inc NULL
-sw sw\source\core\ole nmake - all sw_ole sw_inc NULL
-sw sw\source\core\para nmake - all sw_para sw_inc NULL
-sw sw\source\core\sw3io nmake - all sw_sw3io sw_inc NULL
-sw sw\source\core\swg nmake - all sw_swg sw_inc NULL
-sw sw\source\core\text nmake - all sw_text sw_inc NULL
-sw sw\source\core\tox nmake - all sw_tox sw_inc NULL
-sw sw\source\core\txtnode nmake - all sw_txtnd sw_inc NULL
-sw sw\source\core\undo nmake - all sw_undo sw_inc NULL
-sw sw\source\core\view nmake - all sw_view sw_inc NULL
-sw sw\source\core\unocore nmake - all sw_uco sw_inc NULL
-sw sw\source\core\objectpositioning nmake - all sw_objpos sw_inc NULL
-sw sw\source\core\access nmake - all sw_acc sw_inc NULL
-sw sw\source\core\SwNumberTree nmake - all sw_NumberTree sw_inc NULL
-sw sw\source\core\table nmake - all sw_tablecore sw_inc NULL
-sw sw\source\filter\ascii nmake - all sw_ascii sw_inc NULL
-sw sw\source\filter\basflt nmake - all sw_bsflt sw_inc NULL
-sw sw\source\filter\html nmake - all sw_html sw_inc NULL
-sw sw\source\filter\rtf nmake - all sw_rtf sw_inc NULL
-sw sw\source\filter\writer nmake - all sw_wrtr sw_inc NULL
-sw sw\source\filter\ww1 nmake - all sw_ww1 sw_inc NULL
-sw sw\source\filter\ww8 nmake - all sw_ww8 sw_inc NULL
-sw sw\source\filter\xml nmake - all sw_xml sw_inc NULL
-sw sw\source\ui nmake - all sw_ui sw_app sw_cctrl sw_chrdl sw_conf sw_dbui sw_dchdl sw_dcvw sw_dlg sw_envlp sw_fldui sw_fmtui sw_frmdl sw_globd sw_index sw_ling sw_misc sw_rbbar sw_shell sw_table sw_uiuno sw_uivw sw_utlui sw_web sw_wrtsh sw_smartmenu sw_vba NULL
-sw sw\source\core nmake - all sw_core sw_attr sw_bast sw_crsr sw_dcnd sw_doc sw_draw sw_edit sw_fld sw_frmed sw_grph sw_layo sw_ole sw_para sw_sw3io sw_swg sw_text sw_tox sw_txtnd sw_uco sw_undo sw_view sw_acc sw_objpos sw_NumberTree sw_tablecore NULL
-sw sw\source\filter nmake - all sw_flt sw_ascii sw_bsflt sw_html sw_rtf sw_wrtr sw_ww1 sw_ww8 sw_xml NULL
-sw sw\util nmake - all sw_util sw_core sw_flt sw_sdi sw_ui NULL
-sw sw\qa\unoapi nmake - all sw_qa_unoapi NULL
-sw sw\qa\core nmake - all sw_qa_cppunit sw_util NULL
+sw sw : filter L10N:l10n connectivity writerperfect lotuswordpro vbahelper svx stoc writerfilter unoxml fileaccess package comphelper LIBXSLT:libxslt NULL
+sw sw\prj nmake - all sw_prj NULL
diff --git a/sw/prj/d.lst b/sw/prj/d.lst
index d7e75a09564e..e69de29bb2d1 100644
--- a/sw/prj/d.lst
+++ b/sw/prj/d.lst
@@ -1,59 +0,0 @@
-mkdir: %COMMON_DEST%\bin%_EXT%\hid
-mkdir: %_DEST%\inc%_EXT%\sw
-mkdir: %_DEST%\xml%_EXT%\uiconfig
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swriter
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swxform
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sweb
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sglobal
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swform
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swriter\menubar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swxform\menubar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sweb\menubar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\menubar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swform\menubar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\menubar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swriter\toolbar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swxform\toolbar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sweb\toolbar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\toolbar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swform\toolbar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\toolbar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swriter\statusbar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swxform\statusbar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sweb\statusbar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\statusbar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swform\statusbar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\swreport\statusbar
-
-..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid
-..\xml\*.xml %_DEST%\xml%_EXT%\*.xml
-..\%__SRC%\bin\sw?????.dll %_DEST%\bin%_EXT%\sw?????.dll
-..\%__SRC%\bin\swd?????.dll %_DEST%\bin%_EXT%\swd?????.dll
-..\%__SRC%\bin\swui?????.dll %_DEST%\bin%_EXT%\swui?????.dll
-..\%__SRC%\bin\msword?????.dll %_DEST%\bin%_EXT%\msword?????.dll
-..\%__SRC%\bin\vbaswobj*.dll %_DEST%\bin%_EXT%\vbaswobj*.dll
-..\%__SRC%\bin\sw*.res %_DEST%\bin%_EXT%\sw*.res
-..\%__SRC%\lib\lib*.* %_DEST%\lib%_EXT%\lib*.*
-
-..\uiconfig\swriter\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swriter\menubar\*.xml
-..\uiconfig\swxform\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swxform\menubar\*.xml
-..\uiconfig\sweb\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sweb\menubar\*.xml
-..\uiconfig\sglobal\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\menubar\*.xml
-..\uiconfig\swform\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swform\menubar\*.xml
-..\uiconfig\swreport\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swreport\menubar\*.xml
-..\uiconfig\swriter\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swriter\toolbar\*.xml
-..\uiconfig\swxform\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swxform\toolbar\*.xml
-..\uiconfig\sweb\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sweb\toolbar\*.xml
-..\uiconfig\sglobal\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\toolbar\*.xml
-..\uiconfig\swform\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swform\toolbar\*.xml
-..\uiconfig\swreport\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swreport\toolbar\*.xml
-..\uiconfig\swriter\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swriter\statusbar\*.xml
-..\uiconfig\swxform\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swxform\statusbar\*.xml
-..\uiconfig\sweb\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sweb\statusbar\*.xml
-..\uiconfig\sglobal\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sglobal\statusbar\*.xml
-..\uiconfig\swform\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swform\statusbar\*.xml
-..\uiconfig\swreport\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\swreport\statusbar\*.xml
-
-..\%__SRC%\bin\*-layout.zip %_DEST%\pck%_EXT%\*.*
diff --git a/sw/uiconfig/layout/makefile.mk b/sw/prj/makefile.mk
index 9437db7a009b..e312a7ccab65 100644
--- a/sw/uiconfig/layout/makefile.mk
+++ b/sw/prj/makefile.mk
@@ -25,22 +25,16 @@
#
#*************************************************************************
-PRJ=../..
-PRJNAME=sw
-TARGET=layout
+PRJ=..
+TARGET=prj
.INCLUDE : settings.mk
-.IF "$(ENABLE_LAYOUT)" == "TRUE"
+.IF "$(VERBOSE)"!=""
+VERBOSEFLAG :=
+.ELSE
+VERBOSEFLAG := -s
+.ENDIF
-all: ALLTAR
-
-XML_FILES=wordcount.xml
-
-.INCLUDE : layout.mk
-
-.ELSE # ENABLE_LAYOUT != TRUE
-all .PHONY:
-.ENDIF # ENABLE_LAYOUT != TRUE
-
-.INCLUDE : target.mk
+all:
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/sw/qa/complex/accessibility/AccessibleRelationSet.java b/sw/qa/complex/accessibility/AccessibleRelationSet.java
index b7f45d25db2b..a6da2f29115a 100644
--- a/sw/qa/complex/accessibility/AccessibleRelationSet.java
+++ b/sw/qa/complex/accessibility/AccessibleRelationSet.java
@@ -27,7 +27,6 @@
package complex.accessibility;
-import com.sun.star.accessibility.AccessibleRelation;
import com.sun.star.accessibility.AccessibleRole;
import com.sun.star.accessibility.XAccessible;
import com.sun.star.accessibility.XAccessibleText;
@@ -42,68 +41,61 @@ import com.sun.star.text.XText;
import com.sun.star.text.XTextCursor;
import com.sun.star.text.XTextDocument;
import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-import complexlib.ComplexTestCase;
-import java.io.PrintWriter;
-import lib.StatusException;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
import util.AccessibilityTools;
import util.WriterTools;
-import util.utils;
+import static org.junit.Assert.*;
-public class AccessibleRelationSet extends ComplexTestCase {
-
- private static XAccessible para1 = null;
- private static XAccessible para2 = null;
- private static XAccessible para3 = null;
- private static XTextDocument xTextDoc = null;
+public class AccessibleRelationSet {
+ private XAccessible para1 = null;
+ private XAccessible para2 = null;
+ private XAccessible para3 = null;
+ private XTextDocument xTextDoc = null;
private final static String[] types = {"INVALID","CONTENT_FLOWS_FROM","CONTENT_FLOWS_TO","CONTROLLED_BY","CONTROLLER_FOR","LABEL_FOR","LABELED_BY","MEMBER_OF","SUB_WINDOW_OF"};
- public String[] getTestMethodNames() {
- return new String[]{"contents_flows_to","contents_flows_from"};
- }
-
- public void contents_flows_to() {
+ @Test public void contents_flows_to() {
XAccessibleRelationSet set = getAccessibleRelation(para1);
- boolean res = true;
short firstrelation=-1;
XAccessibleText atarget=null;
if (set != null) {
- log.println("Count of relations "+set.getRelationCount());
- assure("didn't gain correct count of relations",
- set.getRelationCount() == 1);
+ assertEquals(
+ "didn't gain correct count of relations", 1,
+ set.getRelationCount());
try {
firstrelation = set.getRelation(0).RelationType;
Object oTmp = set.getRelation(0).TargetSet[0];
atarget = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, oTmp);
} catch (IndexOutOfBoundsException e) {
- log.println("Exception when getting relations "+e);
- res = false;
+ fail("Exception when getting relations "+e);
}
}
- log.println("Expected for paragraph 0 "+types[2]);
- log.println("gained for paragraph 0 "+types[firstrelation]);
- res = types[2].equals(types[firstrelation]);
- assure("didn't gain correct relation type",res);
+ assertEquals(
+ "didn't gain correct relation type for paragraph 0", types[2],
+ types[firstrelation]);
- log.println("Text of target paragraph "+atarget.getText());
XAccessibleText paraTxt2 =
(XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, para2);
- assure("didn't gain correct target paragraph",
- atarget.getText().equals(paraTxt2.getText()) );
+ assertEquals(
+ "didn't gain correct target paragraph", atarget.getText(),
+ paraTxt2.getText());
}
- public void contents_flows_from() {
+ @Test public void contents_flows_from() {
XAccessibleRelationSet set = getAccessibleRelation(para2);
- boolean res = true;
short[] relationtypes = new short[2];
XAccessibleText[] atargets = new XAccessibleText[2];
if (set != null) {
- log.println("Count of relations "+set.getRelationCount());
- assure("didn't gain correct count of relations",
- set.getRelationCount() == 2);
+ assertEquals(
+ "didn't gain correct count of relations", 2,
+ set.getRelationCount());
try {
short tmprelation = set.getRelation(0).RelationType;
if ( tmprelation == 1 )
@@ -120,7 +112,7 @@ public class AccessibleRelationSet extends ComplexTestCase {
}
else
{
- assure("didn't gain correct relation type", false);
+ fail("didn't gain correct relation type");
}
tmprelation = set.getRelation(1).RelationType;
if ( tmprelation == 1 )
@@ -137,79 +129,51 @@ public class AccessibleRelationSet extends ComplexTestCase {
}
else
{
- assure("didn't gain correct relation type", false);
+ fail("didn't gain correct relation type");
}
} catch (IndexOutOfBoundsException e) {
- log.println("Exception when getting relations "+e);
- res = false;
+ fail("Exception when getting relations "+e);
}
}
- log.println("### Checking "+types[1]+" for paragraph 1");
- log.println("Expected for paragraph 1 "+types[1]);
- log.println("gained for paragraph 1 "+types[relationtypes[0]]);
- res = types[1].equals(types[relationtypes[0]]);
- assure("didn't gain correct relation type",res);
+ assertEquals(
+ "didn't gain correct relation type for paragraph 1", types[1],
+ types[relationtypes[0]]);
- log.println("Text of target paragraph "+atargets[0].getText());
XAccessibleText paraTxt1 =
(XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, para1);
- assure("didn't gain correct target paragraph",
- atargets[0].getText().equals(paraTxt1.getText()) );
+ assertEquals(
+ "didn't gain correct target paragraph", atargets[0].getText(),
+ paraTxt1.getText());
- log.println("### Checking "+types[2]+" for paragraph 1");
- log.println("Expected for paragraph 1 "+types[2]);
- log.println("gained for paragraph 1 "+types[relationtypes[1]]);
- res = types[2].equals(types[relationtypes[1]]);
- assure("didn't gain correct relation type",res);
+ assertEquals(
+ "didn't gain correct relation type for paragraph 3", types[2],
+ types[relationtypes[1]]);
- log.println("Text of target paragraph "+atargets[1].getText());
XAccessibleText paraTxt3 =
(XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class, para3);
- assure("didn't gain correct target paragraph",
- atargets[1].getText().equals(paraTxt3.getText()) );
+ assertEquals(
+ "didn't gain correct target paragraph", atargets[1].getText(),
+ paraTxt3.getText());
}
- private boolean getResult(XAccessible aPara, short index, int nr) {
- XAccessibleRelationSet set = getAccessibleRelation(aPara);
-
- boolean res = true;
- short firstrelation=-1;
- if (set != null) {
- log.println("Count of relations "+set.getRelationCount());
- try {
- firstrelation = set.getRelation(0).RelationType;
- } catch (IndexOutOfBoundsException e) {
- log.println("Exception when getting relations "+e);
- res = false;
- }
- }
+ @Before public void before()
+ throws com.sun.star.lang.IllegalArgumentException,
+ IndexOutOfBoundsException
+ {
+ XMultiServiceFactory factory = UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager());
-
- log.println("Expected for paragraph "+nr+" "+types[index]);
- log.println("gained for paragraph "+nr+" "+types[firstrelation]);
- res = types[index].equals(types[firstrelation]);
- return res;
- }
-
-
- public void before() {
- log.println( "creating a text document" );
- xTextDoc = WriterTools.createTextDoc( (XMultiServiceFactory) param.getMSF());
+ xTextDoc = WriterTools.createTextDoc(factory);
XText oText = xTextDoc.getText();
XTextCursor oCursor = oText.createTextCursor();
- log.println( "inserting some lines" );
- try {
- for (int i=0; i<5; i++){
- oText.insertString( oCursor,"Paragraph Number: " + i, false);
- oText.insertControlCharacter(
- oCursor, ControlCharacter.PARAGRAPH_BREAK, false );
- }
- } catch ( com.sun.star.lang.IllegalArgumentException e ){
- e.printStackTrace((PrintWriter)log);
- throw new StatusException( "Couldn't insert lines", e );
+ for (int i=0; i<5; i++){
+ oText.insertString( oCursor,"Paragraph Number: " + i, false);
+ oText.insertControlCharacter(
+ oCursor, ControlCharacter.PARAGRAPH_BREAK, false );
}
XModel aModel = (XModel)
@@ -217,26 +181,17 @@ public class AccessibleRelationSet extends ComplexTestCase {
AccessibilityTools at = new AccessibilityTools();
- XWindow xWindow = at.getCurrentWindow( (XMultiServiceFactory) param.getMSF(), aModel);
+ XWindow xWindow = at.getCurrentWindow(factory, aModel);
XAccessible xRoot = at.getAccessibleObject(xWindow);
at.getAccessibleObjectForRole(xRoot, AccessibleRole.DOCUMENT);
- try {
- para1 = at.SearchedContext.getAccessibleChild(0);
- para2 = at.SearchedContext.getAccessibleChild(1);
- para3 = at.SearchedContext.getAccessibleChild(2);
- } catch(IndexOutOfBoundsException e) {
- e.printStackTrace((PrintWriter)log);
- throw new StatusException( "Couldn't insert lines", e );
- }
-
- log.println("ImplementationName (para1)" + utils.getImplName(para1));
- log.println("ImplementationName (para2)" + utils.getImplName(para2));
+ para1 = at.SearchedContext.getAccessibleChild(0);
+ para2 = at.SearchedContext.getAccessibleChild(1);
+ para3 = at.SearchedContext.getAccessibleChild(2);
}
- public void after() {
- log.println("close text document");
+ @After public void after() {
util.DesktopTools.closeDoc(xTextDoc);
}
@@ -248,5 +203,15 @@ public class AccessibleRelationSet extends ComplexTestCase {
return set;
}
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+ private static final OfficeConnection connection = new OfficeConnection();
}
diff --git a/sw/qa/complex/checkColor/CheckChangeColor.java b/sw/qa/complex/checkColor/CheckChangeColor.java
index 8a8c563c7eea..a072072e18c8 100644
--- a/sw/qa/complex/checkColor/CheckChangeColor.java
+++ b/sw/qa/complex/checkColor/CheckChangeColor.java
@@ -1,90 +1,89 @@
package complex.checkColor;
-import com.sun.star.awt.Rectangle;
import com.sun.star.awt.Size;
-import com.sun.star.awt.WindowDescriptor;
-import com.sun.star.awt.XControlModel;
-import com.sun.star.awt.XToolkit;
-import com.sun.star.awt.XWindow;
-import com.sun.star.awt.XWindowPeer;
-import com.sun.star.beans.PropertyValue;
import com.sun.star.beans.XPropertySet;
import com.sun.star.container.XNameAccess;
import com.sun.star.container.XNameContainer;
-import com.sun.star.drawing.XControlShape;
-import com.sun.star.drawing.XShape;
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.frame.XController;
-import com.sun.star.lang.XComponent;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.style.XStyleFamiliesSupplier;
import com.sun.star.text.XTextDocument;
+import com.sun.star.uno.Any;
+import com.sun.star.uno.Type;
import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-import com.sun.star.view.XControlAccess;
-import complexlib.ComplexTestCase;
-import java.io.PrintWriter;
-import util.FormTools;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import util.DesktopTools;
import util.SOfficeFactory;
-import util.WriterTools;
+import static org.junit.Assert.*;
/**
* Created because of complaint on dev@openoffice.org: check the changing of
* BackColor and IsLandscape properties on the PageStyle service.
*/
-public class CheckChangeColor extends ComplexTestCase {
-
- private XToolkit xToolkit = null;
- private XWindowPeer xWinPeer = null;
-
- /**
- * Get all test method names.
- * @return The test methods.
- */
- public String[] getTestMethodNames() {
- return new String[] {"checkChangeColor"};
- }
-
-
+public class CheckChangeColor {
/**
* Check BackColor and IsLandscape properties, wait for an exception: test
* is ok if no exception happened.
*/
- public void checkChangeColor() {
- try {
- XMultiServiceFactory m_xMSF_ = (XMultiServiceFactory)param.getMSF();
- XComponentLoader aLoader = (XComponentLoader)UnoRuntime.queryInterface(XComponentLoader.class,m_xMSF_.createInstance( "com.sun.star.frame.Desktop" ));
- XComponent xDocument = (XComponent)UnoRuntime.queryInterface(XComponent.class, aLoader.loadComponentFromURL( "private:factory/swriter", "_blank", 0, new PropertyValue[ 0 ] ) );
- // xDocument.addEventListener( this );
+ @Test public void checkChangeColor() throws Exception {
+ // create a supplier to get the Style family collection
+ XStyleFamiliesSupplier xSupplier = ( XStyleFamiliesSupplier ) UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, document);
- XTextDocument oDoc = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, xDocument);
- XMultiServiceFactory oDocMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, oDoc );
+ // get the NameAccess interface from the Style family collection
+ XNameAccess xNameAccess = xSupplier.getStyleFamilies();
- // XInterface xInterface = (XInterface) oDocMSF.createInstance( "com.sun.star.style.PageStyle" );
+ XNameContainer xPageStyleCollection = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, xNameAccess.getByName( "PageStyles" ));
- // create a supplier to get the Style family collection
- XStyleFamiliesSupplier xSupplier = ( XStyleFamiliesSupplier ) UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, oDoc );
+ // create a PropertySet to set the properties for the new Pagestyle
+ XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xPageStyleCollection.getByName("Standard") );
- // get the NameAccess interface from the Style family collection
- XNameAccess xNameAccess = xSupplier.getStyleFamilies();
+ assertEquals(
+ "BackColor", new Any(Type.LONG, 0xFFFFFFFF),
+ Any.complete(xPropertySet.getPropertyValue("BackColor")));
+ assertEquals(
+ "IsLandscape", new Any(Type.BOOLEAN, false),
+ Any.complete(xPropertySet.getPropertyValue("IsLandscape")));
+ assertEquals(
+ "Size", new Type(Size.class),
+ Any.complete(xPropertySet.getPropertyValue("Size")).getType());
- XNameContainer xPageStyleCollection = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, xNameAccess.getByName( "PageStyles" ));
+ xPropertySet.setPropertyValue("BackColor", 0xFF000000);
+ xPropertySet.setPropertyValue("IsLandscape", true);
+ assertEquals(
+ "BackColor", new Any(Type.LONG, 0xFF000000),
+ Any.complete(xPropertySet.getPropertyValue("BackColor")));
+ assertEquals(
+ "IsLandscape", new Any(Type.BOOLEAN, true),
+ Any.complete(xPropertySet.getPropertyValue("IsLandscape")));
+ }
+
+ @Before public void setUpDocument() throws com.sun.star.uno.Exception {
+ document = SOfficeFactory.getFactory(
+ UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager())).
+ createTextDoc(null);
+ }
- // create a PropertySet to set the properties for the new Pagestyle
- XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xPageStyleCollection.getByName("Standard") );
+ @After public void tearDownDocument() {
+ DesktopTools.closeDoc(document);
+ }
- log.println("BackColor @ "+xPropertySet.getPropertyValue("BackColor").toString());
- log.println("IsLandscape @ "+xPropertySet.getPropertyValue("IsLandscape").toString());
- log.println("Size @ H:"+((Size)xPropertySet.getPropertyValue("Size")).Height+" W:"+((Size)xPropertySet.getPropertyValue("Size")).Width);
+ private XTextDocument document = null;
- log.println("Set Landscape");
- xPropertySet.setPropertyValue("IsLandscape",new Boolean(true) );
- log.println("Set BackColor");
- xPropertySet.setPropertyValue("BackColor",new Integer((int)255000000) );
- }
- catch(Exception e) {
- e.printStackTrace();
- failed("Exception.");
- }
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
}
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
}
diff --git a/sw/qa/complex/checkColor/makefile.mk b/sw/qa/complex/checkColor/makefile.mk
deleted file mode 100644
index 3048fb8fff95..000000000000
--- a/sw/qa/complex/checkColor/makefile.mk
+++ /dev/null
@@ -1,75 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ = ..$/..$/..
-TARGET = CheckChangeColor
-PRJNAME = $(TARGET)
-PACKAGE = complex$/checkColor
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar mysql.jar
-JAVAFILES = CheckChangeColor.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-
-#----- make a jar from compiled files ------------------------------
-
-MAXLINELENGTH = 100000
-
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
-
-# --- Parameters for the test --------------------------------------
-
-# test base is java complex
-CT_TESTBASE = -TestBase java_complex
-
-# test looks something like the.full.package.TestName
-CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
-
-# start the runner application
-CT_APP = org.openoffice.Runner
-
-# --- Targets ------------------------------------------------------
-
-.IF "$(depend)" == ""
-ALL : ALLTAR
-.ELSE
-ALL: ALLDEP
-.ENDIF
-
-.INCLUDE : target.mk
-
-RUN: run
-
-run:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_NOOFFICE) $(CT_TEST)
diff --git a/sw/qa/complex/indeterminateState/CheckIndeterminateState.java b/sw/qa/complex/indeterminateState/CheckIndeterminateState.java
index 7c3bf14f2e01..23a6d89ccf51 100644
--- a/sw/qa/complex/indeterminateState/CheckIndeterminateState.java
+++ b/sw/qa/complex/indeterminateState/CheckIndeterminateState.java
@@ -27,110 +27,99 @@
package complex.indeterminateState;
-import complexlib.ComplexTestCase;
-import helper.OfficeProvider;
-import util.SOfficeFactory;
-import util.AccessibilityTools;
+import com.sun.star.accessibility.AccessibleRole;
+import com.sun.star.accessibility.AccessibleStateType;
+import com.sun.star.accessibility.XAccessible;
+import com.sun.star.accessibility.XAccessibleContext;
+import com.sun.star.accessibility.XAccessibleStateSet;
+import com.sun.star.awt.FontWeight;
import com.sun.star.awt.XWindow;
-import com.sun.star.awt.XExtendedToolkit;
-import com.sun.star.frame.XDispatch;
+import com.sun.star.beans.XPropertySet;
import com.sun.star.frame.XController;
-import com.sun.star.frame.XDesktop;
import com.sun.star.frame.XModel;
-import com.sun.star.text.XTextDocument;
import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.text.XText;
+import com.sun.star.text.XTextDocument;
+import com.sun.star.text.XTextRange;
+import com.sun.star.text.XTextViewCursorSupplier;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XInterface;
-import com.sun.star.accessibility.AccessibleRole;
-import com.sun.star.accessibility.XAccessible;
-import com.sun.star.accessibility.XAccessibleValue;
-import com.sun.star.accessibility.XAccessibleContext;
-import com.sun.star.accessibility.XAccessibleStateSet;
-import com.sun.star.accessibility.AccessibleStateType;
-import com.sun.star.accessibility.XAccessibleAction;
-import com.sun.star.awt.XTopWindow;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.frame.XDispatchProvider;
-import com.sun.star.util.URL;
-import com.sun.star.util.XURLTransformer;
-
-import java.io.PrintWriter;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import util.AccessibilityTools;
+import util.DesktopTools;
+import util.SOfficeFactory;
+import static org.junit.Assert.*;
/**
*/
-public class CheckIndeterminateState extends ComplexTestCase {
-
- /**
- * Return all test methods.
- * @return The test methods.
- */
- public String[] getTestMethodNames() {
- return new String[]{"checkToolBoxItem"};
- }
-
+public class CheckIndeterminateState {
/*
* Test the indeterminate state of AccessibleToolBarItem
* The used tools are in project qadevOOo/runner
*/
- public void checkToolBoxItem() {
- log.println( "creating a test environment" );
- XTextDocument xTextDoc = null;
- // get a soffice factory object
- SOfficeFactory SOF = SOfficeFactory.getFactory((XMultiServiceFactory) param.getMSF());
-
- try {
- log.println( "creating a text document" );
- xTextDoc = SOF.createTextDoc(null);
- } catch ( com.sun.star.uno.Exception e ) {
- // Some exception occures.FAILED
- e.printStackTrace( (java.io.PrintWriter)log );
- failed (e.getMessage());
- }
-
+ @Test public void checkToolBoxItem() throws Exception {
XModel aModel = (XModel)
- UnoRuntime.queryInterface(XModel.class, xTextDoc);
+ UnoRuntime.queryInterface(XModel.class, document);
XController xController = aModel.getCurrentController();
- XInterface oObj = null;
+ XText text = document.getText();
+ text.setString("normal");
+ XTextRange end = text.getEnd();
+ end.setString("bold");
+ UnoRuntime.queryInterface(XPropertySet.class, end).setPropertyValue(
+ "CharWeight", FontWeight.BOLD);
+ UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xController).
+ getViewCursor().gotoRange(text, false);
- System.out.println("Press any key after making 'Bold' indeterminate.");
- try{
- byte[]b = new byte[16];
- System.in.read(b);
- } catch (Exception e) {
- e.printStackTrace();
- }
+ XInterface oObj = null;
AccessibilityTools at = new AccessibilityTools();
- XWindow xWindow = at.getCurrentContainerWindow((XMultiServiceFactory)param.getMSF(), aModel);
+ XWindow xWindow = at.getCurrentContainerWindow(getFactory(), aModel);
XAccessible xRoot = at.getAccessibleObject(xWindow);
- // uncomment to print the whole accessible tree.
-// at.printAccessibleTree((java.io.PrintWriter)log,xRoot);
-
- oObj = at.getAccessibleObjectForRole(xRoot,
- AccessibleRole.PUSH_BUTTON, "Bold");
- System.out.println("Found a PUSH_BUTTON: " + (oObj != null));
-
oObj = at.getAccessibleObjectForRole(xRoot,
AccessibleRole.TOGGLE_BUTTON, "Bold");
- System.out.println("Found a TOGGLE_BUTTON: " + (oObj != null));
-
- log.println("ImplementationName: "+ util.utils.getImplName(oObj));
+ assertNotNull("Found a TOGGLE_BUTTON", oObj);
XAccessibleContext oContext = (XAccessibleContext)
UnoRuntime.queryInterface(XAccessibleContext.class, oObj);
XAccessibleStateSet oSet = oContext.getAccessibleStateSet();
- short[]states = oSet.getStates();
- for(int i=0; i<states.length; i++)
- System.out.println("State "+i+": "+states[i]);
+ assertTrue("The 'INDETERMINATE' state is not set.",oSet.contains(AccessibleStateType.INDETERMINATE));
+ }
- assure("The 'INDETERMINATE' state is not set.",oSet.contains(AccessibleStateType.INDETERMINATE));
+ @Before public void setUpDocument() throws com.sun.star.uno.Exception {
+ document = SOfficeFactory.getFactory(getFactory()).createTextDoc(null);
}
-}
+ @After public void tearDownDocument() {
+ DesktopTools.closeDoc(document);
+ }
+ private XTextDocument document = null;
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
+ private static final XMultiServiceFactory getFactory() {
+ return UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager());
+ }
+}
diff --git a/sw/qa/complex/indeterminateState/makefile.mk b/sw/qa/complex/indeterminateState/makefile.mk
deleted file mode 100644
index 8850da116f5b..000000000000
--- a/sw/qa/complex/indeterminateState/makefile.mk
+++ /dev/null
@@ -1,82 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ = ..$/..$/..
-TARGET = CheckIndexedPropertyValue
-PRJNAME = $(TARGET)
-PACKAGE = complex$/indeterminateState
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-JAVAFILES = CheckIndeterminateState.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-
-#----- make a jar from compiled files ------------------------------
-
-MAXLINELENGTH = 100000
-
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
-
-# --- Parameters for the test --------------------------------------
-
-# start an office if the parameter is set for the makefile
-.IF "$(OFFICE)" == ""
-CT_APPEXECCOMMAND =
-.ELSE
-CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
-.ENDIF
-
-# test base is java complex
-CT_TESTBASE = -TestBase java_complex
-
-# test looks something like the.full.package.TestName
-CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
-
-# start the runner application
-CT_APP = org.openoffice.Runner
-
-# --- Targets ------------------------------------------------------
-
-.IF "$(depend)" == ""
-ALL: ALLTAR
-.ELSE
-ALL: ALLDEP
-.ENDIF
-
-.INCLUDE : target.mk
-
-RUN:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) $(CT_TEST)
-
-run: RUN
diff --git a/sw/qa/complex/writer/CheckBookmarks.java b/sw/qa/complex/writer/CheckBookmarks.java
index 0915db42e6ac..84bfe15ba045 100644
--- a/sw/qa/complex/writer/CheckBookmarks.java
+++ b/sw/qa/complex/writer/CheckBookmarks.java
@@ -43,9 +43,15 @@ import com.sun.star.text.XTextRange;
import com.sun.star.uno.UnoRuntime;
import complexlib.ComplexTestCase;
import java.math.BigInteger;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
class BookmarkHashes {
- public String m_sName;
public BigInteger m_nSetupHash;
public BigInteger m_nInsertRandomHash;
public BigInteger m_nDeleteRandomHash;
@@ -53,40 +59,13 @@ class BookmarkHashes {
public BigInteger m_nOdfReloadHash;
public BigInteger m_nMsWordReloadHash;
- public BookmarkHashes(String sName) {
- m_sName = sName;
- }
-
- public String checkExpectationString(BookmarkHashes aExpectation) {
- StringBuffer buffer = new StringBuffer();
- buffer.append("Comparing " + m_sName + " to expectations from " + aExpectation.m_sName + "\n");
- buffer.append(compareHashString("after setup", m_nSetupHash, aExpectation.m_nSetupHash));
- buffer.append(compareHashString("after insert random", m_nInsertRandomHash, aExpectation.m_nInsertRandomHash));
- buffer.append(compareHashString("after delete random", m_nDeleteRandomHash, aExpectation.m_nDeleteRandomHash));
- buffer.append(compareHashString("after line breaks", m_nLinebreakHash, aExpectation.m_nLinebreakHash));
- buffer.append(compareHashString("after ODF roundtrip", m_nOdfReloadHash, aExpectation.m_nOdfReloadHash));
- buffer.append(compareHashString("after MsWord roundtrip", m_nMsWordReloadHash, aExpectation.m_nMsWordReloadHash));
- return buffer.toString();
- };
-
- public boolean meetsExpectation(BookmarkHashes aExpectation) {
- return m_nSetupHash.equals(aExpectation.m_nSetupHash)
- && m_nInsertRandomHash.equals(aExpectation.m_nInsertRandomHash)
- && m_nDeleteRandomHash.equals(aExpectation.m_nDeleteRandomHash)
- && m_nLinebreakHash.equals(aExpectation.m_nLinebreakHash)
- && m_nOdfReloadHash.equals(aExpectation.m_nOdfReloadHash)
- && m_nMsWordReloadHash.equals(aExpectation.m_nMsWordReloadHash);
- }
-
- private String compareHashString(String sCheckName, BigInteger nActual, BigInteger nExpectation) {
- StringBuffer buffer = new StringBuffer(sCheckName);
- buffer.append(": ");
- if(nActual.equals(nExpectation))
- buffer.append("good (" + nActual.toString(16) + ")");
- else
- buffer.append("bad (actual:" + nActual.toString(16) + ", expected: " + nExpectation.toString(16) + ")");
- buffer.append("\n");
- return buffer.toString();
+ public void assertExpectation(BookmarkHashes aExpectation) {
+ assertEquals(aExpectation.m_nSetupHash, m_nSetupHash);
+ assertEquals(aExpectation.m_nInsertRandomHash, m_nInsertRandomHash);
+ assertEquals(aExpectation.m_nDeleteRandomHash, m_nDeleteRandomHash);
+ assertEquals(aExpectation.m_nLinebreakHash, m_nLinebreakHash);
+ assertEquals(aExpectation.m_nOdfReloadHash, m_nOdfReloadHash);
+ assertEquals(aExpectation.m_nMsWordReloadHash, m_nMsWordReloadHash);
}
static public java.math.BigInteger getBookmarksHash(XTextDocument xDoc)
@@ -114,18 +93,15 @@ class BookmarkHashes {
}
}
-public class CheckBookmarks extends ComplexTestCase {
+public class CheckBookmarks {
private XMultiServiceFactory m_xMsf = null;
private XTextDocument m_xDoc = null;
private XTextDocument m_xOdfReloadedDoc = null;
private XTextDocument m_xMsWordReloadedDoc = null;
-
- public String[] getTestMethodNames() {
- return new String[]{"checkBookmarks"};
- }
+ private final BookmarkHashes actualHashes = new BookmarkHashes();
private BookmarkHashes getDEV300m41Expectations() {
- BookmarkHashes result = new BookmarkHashes("DEV300m41");
+ BookmarkHashes result = new BookmarkHashes();
result.m_nSetupHash = new BigInteger("-4b0706744e8452fe1ae9d5e1c28cf70fb6194795",16);
result.m_nInsertRandomHash = new BigInteger("25aa0fad3f4881832dcdfe658ec2efa8a1a02bc5",16);
result.m_nDeleteRandomHash = new BigInteger("-3ec87e810b46d734677c351ad893bbbf9ea10f55",16);
@@ -135,42 +111,51 @@ public class CheckBookmarks extends ComplexTestCase {
return result;
}
- public void checkBookmarks()
+ @Test public void checkBookmarks()
throws com.sun.star.uno.Exception,
com.sun.star.io.IOException,
java.security.NoSuchAlgorithmException
{
- try {
- m_xMsf = (XMultiServiceFactory)param.getMSF();
- m_xDoc = util.WriterTools.createTextDoc(m_xMsf);
- BookmarkHashes actualHashes = new BookmarkHashes("actual");
- BookmarkHashes expectedHashes = getDEV300m41Expectations();
- setupBookmarks();
- actualHashes.m_nSetupHash = BookmarkHashes.getBookmarksHash(m_xDoc);
- insertRandomParts(200177);
- actualHashes.m_nInsertRandomHash = BookmarkHashes.getBookmarksHash(m_xDoc);
- deleteRandomParts(4711);
- actualHashes.m_nDeleteRandomHash = BookmarkHashes.getBookmarksHash(m_xDoc);
- insertLinebreaks(007);
- actualHashes.m_nLinebreakHash = BookmarkHashes.getBookmarksHash(m_xDoc);
- m_xOdfReloadedDoc = reloadFrom("StarOffice XML (Writer)", "odf");
- actualHashes.m_nOdfReloadHash = BookmarkHashes.getBookmarksHash(m_xOdfReloadedDoc);
- m_xMsWordReloadedDoc = reloadFrom("MS Word 97", "doc");
- actualHashes.m_nMsWordReloadHash = BookmarkHashes.getBookmarksHash(m_xMsWordReloadedDoc);
- log.println(actualHashes.checkExpectationString(expectedHashes));
- if(!actualHashes.meetsExpectation(expectedHashes))
- failed("CheckBookmark did not meet expectations (" + expectedHashes.m_sName + ").");
- } finally {
- // closing test document
- if(m_xDoc != null)
- util.DesktopTools.closeDoc(m_xDoc);
- if(m_xOdfReloadedDoc!= null)
- util.DesktopTools.closeDoc(m_xOdfReloadedDoc);
- if(m_xMsWordReloadedDoc!= null)
- util.DesktopTools.closeDoc(m_xMsWordReloadedDoc);
- }
+ actualHashes.assertExpectation(getDEV300m41Expectations());
}
+ @Before public void setUpDocuments() throws Exception {
+ m_xMsf = UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager());
+ m_xDoc = util.WriterTools.createTextDoc(m_xMsf);
+ setupBookmarks();
+ actualHashes.m_nSetupHash = BookmarkHashes.getBookmarksHash(m_xDoc);
+ insertRandomParts(200177);
+ actualHashes.m_nInsertRandomHash = BookmarkHashes.getBookmarksHash(m_xDoc);
+ deleteRandomParts(4711);
+ actualHashes.m_nDeleteRandomHash = BookmarkHashes.getBookmarksHash(m_xDoc);
+ insertLinebreaks(007);
+ actualHashes.m_nLinebreakHash = BookmarkHashes.getBookmarksHash(m_xDoc);
+ m_xOdfReloadedDoc = reloadFrom("StarOffice XML (Writer)", "odf");
+ actualHashes.m_nOdfReloadHash = BookmarkHashes.getBookmarksHash(m_xOdfReloadedDoc);
+ m_xMsWordReloadedDoc = reloadFrom("MS Word 97", "doc");
+ actualHashes.m_nMsWordReloadHash = BookmarkHashes.getBookmarksHash(m_xMsWordReloadedDoc);
+ }
+
+ @After public void tearDownDocuments() {
+ util.DesktopTools.closeDoc(m_xDoc);
+ util.DesktopTools.closeDoc(m_xOdfReloadedDoc);
+ util.DesktopTools.closeDoc(m_xMsWordReloadedDoc);
+ }
+
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+
private void setupBookmarks()
throws com.sun.star.uno.Exception
{
diff --git a/sw/qa/complex/writer/CheckCrossReferences.java b/sw/qa/complex/writer/CheckCrossReferences.java
index 7b469c0a4afc..cc7fcb1c7e53 100644
--- a/sw/qa/complex/writer/CheckCrossReferences.java
+++ b/sw/qa/complex/writer/CheckCrossReferences.java
@@ -1,123 +1,96 @@
-/*
- * CheckCrossReferences.java
- *
- * Created on November 1, 2007, 1:49 PM
- *
- * To change this template, choose Tools | Template Manager
- * and open the template in the editor.
- */
+/*************************************************************************
+*
+* 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.
+*
+************************************************************************/
package complex.writer;
-import complexlib.ComplexTestCase;
import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.text.XTextDocument;
import com.sun.star.uno.UnoRuntime;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
/**
*
* @author od138299
*/
-public class CheckCrossReferences extends ComplexTestCase {
+public class CheckCrossReferences {
- private com.sun.star.text.XTextDocument xDoc;
private com.sun.star.container.XEnumeration xParaEnum;
private com.sun.star.container.XEnumeration xPortionEnum;
private com.sun.star.util.XRefreshable xFldsRefresh;
- public String[] getTestMethodNames() {
- return new String[]{"checkCrossReferences"};
- }
-
- public com.sun.star.text.XTextField getNextField() {
-
- com.sun.star.text.XTextField xField = null;
+ public com.sun.star.text.XTextField getNextField()
+ throws com.sun.star.uno.Exception
+ {
if ( xPortionEnum != null ) {
- try {
- while ( xPortionEnum.hasMoreElements() ) {
- com.sun.star.beans.XPropertySet xPortionProps =
- (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class , xPortionEnum.nextElement());
- final String sPortionType =
- xPortionProps.getPropertyValue( "TextPortionType" ).toString();
- if ( sPortionType.equals( "TextField") ) {
- xField = (com.sun.star.text.XTextField)UnoRuntime.queryInterface(
- com.sun.star.text.XTextField.class,
- xPortionProps.getPropertyValue( "TextField" ) );
- if ( xField == null ) {
- System.out.println("Cannot retrieve next field.");
- failed("Cannot retrieve next field.");
- return null;
- }
- return xField;
- }
+ while ( xPortionEnum.hasMoreElements() ) {
+ com.sun.star.beans.XPropertySet xPortionProps =
+ (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
+ com.sun.star.beans.XPropertySet.class , xPortionEnum.nextElement());
+ final String sPortionType =
+ xPortionProps.getPropertyValue( "TextPortionType" ).toString();
+ if ( sPortionType.equals( "TextField") ) {
+ com.sun.star.text.XTextField xField = (com.sun.star.text.XTextField)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextField.class,
+ xPortionProps.getPropertyValue( "TextField" ) );
+ assertNotNull("Cannot retrieve next field.", xField);
+ return xField;
}
- } catch (com.sun.star.container.NoSuchElementException e) {
- System.out.println("Cannot retrieve next field.");
- e.printStackTrace();
- failed(e.getMessage());
- return null;
- } catch (com.sun.star.beans.UnknownPropertyException e) {
- System.out.println("Cannot retrieve next field.");
- e.printStackTrace();
- failed(e.getMessage());
- return null;
- } catch (com.sun.star.lang.WrappedTargetException e) {
- System.out.println("Cannot retrieve next field.");
- e.printStackTrace();
- failed(e.getMessage());
- return null;
}
}
while ( xParaEnum.hasMoreElements() ) {
- try {
- com.sun.star.container.XEnumerationAccess aPara =
- (com.sun.star.container.XEnumerationAccess)UnoRuntime.queryInterface(
- com.sun.star.container.XEnumerationAccess.class, xParaEnum.nextElement());
- xPortionEnum = aPara.createEnumeration();
- while ( xPortionEnum.hasMoreElements() ) {
- com.sun.star.beans.XPropertySet xPortionProps =
- (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
- com.sun.star.beans.XPropertySet.class , xPortionEnum.nextElement());
- final String sPortionType =
- xPortionProps.getPropertyValue( "TextPortionType" ).toString();
- if ( sPortionType.equals( "TextField") ) {
- xField = (com.sun.star.text.XTextField)UnoRuntime.queryInterface(
- com.sun.star.text.XTextField.class,
- xPortionProps.getPropertyValue( "TextField" ) );
- if ( xField == null ) {
- System.out.println("Cannot retrieve next field.");
- failed("Cannot retrieve next field.");
- return null;
- }
- return xField;
- }
+ com.sun.star.container.XEnumerationAccess aPara =
+ (com.sun.star.container.XEnumerationAccess)UnoRuntime.queryInterface(
+ com.sun.star.container.XEnumerationAccess.class, xParaEnum.nextElement());
+ xPortionEnum = aPara.createEnumeration();
+ while ( xPortionEnum.hasMoreElements() ) {
+ com.sun.star.beans.XPropertySet xPortionProps =
+ (com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
+ com.sun.star.beans.XPropertySet.class , xPortionEnum.nextElement());
+ final String sPortionType =
+ xPortionProps.getPropertyValue( "TextPortionType" ).toString();
+ if ( sPortionType.equals( "TextField") ) {
+ com.sun.star.text.XTextField xField = (com.sun.star.text.XTextField)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextField.class,
+ xPortionProps.getPropertyValue( "TextField" ) );
+ assertNotNull("Cannot retrieve next field.", xField);
+ return xField;
}
- } catch (com.sun.star.container.NoSuchElementException e) {
- System.out.println("Cannot retrieve next field.");
- e.printStackTrace();
- failed(e.getMessage());
- return null;
- } catch (com.sun.star.beans.UnknownPropertyException e) {
- System.out.println("Cannot retrieve next field.");
- e.printStackTrace();
- failed(e.getMessage());
- return null;
- } catch (com.sun.star.lang.WrappedTargetException e) {
- System.out.println("Cannot retrieve next field.");
- e.printStackTrace();
- failed(e.getMessage());
- return null;
}
}
- if ( xField == null ) {
- System.out.println("Cannot retrieve next field.");
- failed("Cannot retrieve next field.");
- return null;
- }
-
- return xField;
+ fail("Cannot retrieve next field.");
+ return null; // unreachable
}
public com.sun.star.beans.XPropertySet getFieldProps(
@@ -126,11 +99,7 @@ public class CheckCrossReferences extends ComplexTestCase {
(com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
com.sun.star.beans.XPropertySet.class, xField );
- if ( xProps == null ) {
- System.out.println("Cannot retrieve field properties.");
- failed("Cannot retrieve field properties.");
- return null;
- }
+ assertNotNull("Cannot retrieve field properties.", xProps);
return xProps;
}
@@ -138,56 +107,26 @@ public class CheckCrossReferences extends ComplexTestCase {
public void checkField( com.sun.star.text.XTextField xField,
com.sun.star.beans.XPropertySet xProps,
short nFormat,
- String aExpectedFldResult ) {
+ String aExpectedFldResult )
+ throws com.sun.star.uno.Exception
+ {
// set requested format
- try {
- xProps.setPropertyValue("ReferenceFieldPart", new Short(nFormat));
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- System.out.println("Cannot set ReferenceFieldPart property at field.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- } catch (com.sun.star.beans.PropertyVetoException e) {
- System.out.println("Cannot set ReferenceFieldPart property at field.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- } catch (com.sun.star.lang.WrappedTargetException e) {
- System.out.println("Cannot set ReferenceFieldPart property at field.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- } catch (com.sun.star.beans.UnknownPropertyException e) {
- System.out.println("Cannot set ReferenceFieldPart property at field.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- }
+ xProps.setPropertyValue("ReferenceFieldPart", new Short(nFormat));
+
// refresh fields in order to get new format applied
xFldsRefresh.refresh();
String aFldResult = xField.getPresentation( false );
- assure( "set reference field format doesn't result in correct field result",
- aFldResult.equals(aExpectedFldResult), true );
+ assertEquals( "set reference field format doesn't result in correct field result",
+ aExpectedFldResult, aFldResult);
}
- public void checkCrossReferences() throws com.sun.star.uno.Exception {
- // load test document
- try {
- XMultiServiceFactory xMSF = (XMultiServiceFactory)param.getMSF();
- xDoc = util.WriterTools.loadTextDoc( xMSF, util.utils.getFullTestURL("CheckCrossReferences.odt"));
- } catch(com.sun.star.uno.RuntimeException e) {
- System.out.println("Cannot load test document.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- }
-
+ @Test public void checkCrossReferences() throws com.sun.star.uno.Exception {
// setup paragraph enumeration
{
com.sun.star.container.XEnumerationAccess xParaEnumAccess =
(com.sun.star.container.XEnumerationAccess)UnoRuntime.queryInterface(
- com.sun.star.container.XEnumerationAccess.class, xDoc.getText());
+ com.sun.star.container.XEnumerationAccess.class, document.getText());
xParaEnum = xParaEnumAccess.createEnumeration();
}
@@ -195,7 +134,7 @@ public class CheckCrossReferences extends ComplexTestCase {
{
com.sun.star.text.XTextFieldsSupplier xFieldSupp =
(com.sun.star.text.XTextFieldsSupplier)UnoRuntime.queryInterface(
- com.sun.star.text.XTextFieldsSupplier.class, xDoc);
+ com.sun.star.text.XTextFieldsSupplier.class, document);
xFldsRefresh = (com.sun.star.util.XRefreshable)UnoRuntime.queryInterface(
com.sun.star.util.XRefreshable.class, xFieldSupp.getTextFields());
}
@@ -214,7 +153,6 @@ public class CheckCrossReferences extends ComplexTestCase {
com.sun.star.text.XTextField xField = null;
com.sun.star.beans.XPropertySet xProps = null;
- log.println( "Checking field reference formats NUMBER, NUMBER_NO_CONTEXT and NUMBER_FULL_CONTEXT for existing fields" );
xField = getNextField();
xProps = getFieldProps( xField );
checkField( xField, xProps, com.sun.star.text.ReferenceFieldPart.NUMBER, FldResult2 );
@@ -254,63 +192,36 @@ public class CheckCrossReferences extends ComplexTestCase {
// insert a certain cross-reference bookmark and a reference field to this bookmark
{
- log.println("Checking insert of cross-reference bookmark and corresponding reference field");
// restart paragraph enumeration
com.sun.star.container.XEnumerationAccess xParaEnumAccess =
(com.sun.star.container.XEnumerationAccess)UnoRuntime.queryInterface(
- com.sun.star.container.XEnumerationAccess.class, xDoc.getText());
+ com.sun.star.container.XEnumerationAccess.class, document.getText());
xParaEnum = xParaEnumAccess.createEnumeration();
// iterate on the paragraphs to find certain paragraph to insert the bookmark
com.sun.star.text.XTextRange xParaTextRange = null;
while ( xParaEnum.hasMoreElements() ) {
- try {
- xParaTextRange = (com.sun.star.text.XTextRange)UnoRuntime.queryInterface(
- com.sun.star.text.XTextRange.class, xParaEnum.nextElement());
- if ( xParaTextRange.getString().equals( "J" ) ) {
- break;
- }
- else {
- xParaTextRange = null;
- }
- } catch (com.sun.star.container.NoSuchElementException e) {
- System.out.println("Cannot find paragraph to insert cross-reference bookmark.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- } catch (com.sun.star.lang.WrappedTargetException e) {
- System.out.println("Cannot find paragraph to insert cross-reference bookmark.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
+ xParaTextRange = (com.sun.star.text.XTextRange)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextRange.class, xParaEnum.nextElement());
+ if ( xParaTextRange.getString().equals( "J" ) ) {
+ break;
+ }
+ else {
+ xParaTextRange = null;
}
}
- if ( xParaTextRange == null ) {
- System.out.println("Cannot find paragraph to insert cross-reference bookmark.");
- failed("Cannot find paragraph to insert cross-reference bookmark.");
- return;
- }
+ assertNotNull(
+ "Cannot find paragraph to insert cross-reference bookmark.",
+ xParaTextRange);
// insert bookmark
XMultiServiceFactory xFac = (XMultiServiceFactory)UnoRuntime.queryInterface(
- XMultiServiceFactory.class, xDoc);
+ XMultiServiceFactory.class, document);
final String cBookmarkName = "__RefNumPara__47114711";
- com.sun.star.text.XTextContent xBookmark = null;
- try {
- xBookmark = (com.sun.star.text.XTextContent)UnoRuntime.queryInterface(
- com.sun.star.text.XTextContent.class,
- xFac.createInstance( "com.sun.star.text.Bookmark" ) );
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- System.out.println("Cannot create bookmark.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- } catch (com.sun.star.uno.Exception e) {
- System.out.println("Cannot create bookmark.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- }
+ com.sun.star.text.XTextContent xBookmark =
+ (com.sun.star.text.XTextContent)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextContent.class,
+ xFac.createInstance( "com.sun.star.text.Bookmark" ) );
if ( xBookmark != null ) {
com.sun.star.container.XNamed xName =
(com.sun.star.container.XNamed)UnoRuntime.queryInterface(
@@ -320,22 +231,10 @@ public class CheckCrossReferences extends ComplexTestCase {
}
// insert reference field, which references the inserted bookmark
- com.sun.star.text.XTextContent xNewField = null;
- try {
- xNewField = (com.sun.star.text.XTextContent)UnoRuntime.queryInterface(
- com.sun.star.text.XTextContent.class,
- xFac.createInstance( "com.sun.star.text.TextField.GetReference" ) );
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- System.out.println("Cannot create new field.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- } catch (com.sun.star.uno.Exception e) {
- System.out.println("Cannot create new field.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- }
+ com.sun.star.text.XTextContent xNewField =
+ (com.sun.star.text.XTextContent)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextContent.class,
+ xFac.createInstance( "com.sun.star.text.TextField.GetReference" ) );
if ( xNewField != null ) {
com.sun.star.beans.XPropertySet xFieldProps =
(com.sun.star.beans.XPropertySet)UnoRuntime.queryInterface(
@@ -354,16 +253,39 @@ public class CheckCrossReferences extends ComplexTestCase {
com.sun.star.text.XTextField xField =
(com.sun.star.text.XTextField)UnoRuntime.queryInterface(
com.sun.star.text.XTextField.class, xNewField );
- assure( "inserted reference field doesn't has correct field result",
- xField.getPresentation( false ).equals("J"), true );
+ assertEquals( "inserted reference field doesn't has correct field result",
+ "J", xField.getPresentation( false ) );
xParaTextRange.getStart().setString( "Hallo new bookmark: " );
xFldsRefresh.refresh();
- assure( "inserted reference field doesn't has correct field result. Instead it's: "+xField.getPresentation( false ),
- xField.getPresentation( false ).equals("Hallo new bookmark: J"), true );
+ assertEquals( "inserted reference field doesn't has correct field result",
+ "Hallo new bookmark: J", xField.getPresentation( false ) );
}
+ }
+
+ @Before public void setUpDocument() throws com.sun.star.uno.Exception {
+ document = util.WriterTools.loadTextDoc(
+ UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager()),
+ TestDocument.getUrl("CheckCrossReferences.odt"));
+ }
- // closing test document
- util.DesktopTools.closeDoc( xDoc );
+ @After public void tearDownDocument() {
+ util.DesktopTools.closeDoc(document);
}
+
+ private XTextDocument document = null;
+
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
}
diff --git a/sw/qa/complex/writer/CheckFlies.java b/sw/qa/complex/writer/CheckFlies.java
index 50e94290c5b2..a65c01ec147d 100644
--- a/sw/qa/complex/writer/CheckFlies.java
+++ b/sw/qa/complex/writer/CheckFlies.java
@@ -38,43 +38,34 @@ import complexlib.ComplexTestCase;
import java.math.BigInteger;
import java.util.Collection;
import java.util.ArrayList;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
-public class CheckFlies extends ComplexTestCase {
- private XMultiServiceFactory m_xMsf = null;
- private XTextDocument m_xDoc = null;
-
- public String[] getTestMethodNames() {
- return new String[]{"checkFlies"};
- }
-
- public void checkFlies()
- throws com.sun.star.uno.Exception,
- com.sun.star.io.IOException
+public class CheckFlies {
+ @Test public void checkFlies()
+ throws com.sun.star.uno.Exception
{
- try {
- m_xMsf = (XMultiServiceFactory)param.getMSF();
- m_xDoc = util.WriterTools.loadTextDoc(m_xMsf, util.utils.getFullTestURL("CheckFlies.odt"));
- com.sun.star.text.XTextFramesSupplier xTFS = (com.sun.star.text.XTextFramesSupplier)UnoRuntime.queryInterface(
- com.sun.star.text.XTextFramesSupplier.class,
- m_xDoc);
- checkTextFrames(xTFS);
- com.sun.star.text.XTextGraphicObjectsSupplier xTGOS = (com.sun.star.text.XTextGraphicObjectsSupplier)UnoRuntime.queryInterface(
- com.sun.star.text.XTextGraphicObjectsSupplier.class,
- m_xDoc);
- checkGraphicFrames(xTGOS);
- com.sun.star.text.XTextEmbeddedObjectsSupplier xTEOS = (com.sun.star.text.XTextEmbeddedObjectsSupplier)UnoRuntime.queryInterface(
- com.sun.star.text.XTextEmbeddedObjectsSupplier.class,
- m_xDoc);
- checkEmbeddedFrames(xTEOS);
- } finally {
- // closing test document
- if(m_xDoc != null)
- util.DesktopTools.closeDoc(m_xDoc);
- }
+ com.sun.star.text.XTextFramesSupplier xTFS = (com.sun.star.text.XTextFramesSupplier)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextFramesSupplier.class,
+ document);
+ checkTextFrames(xTFS);
+ com.sun.star.text.XTextGraphicObjectsSupplier xTGOS = (com.sun.star.text.XTextGraphicObjectsSupplier)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextGraphicObjectsSupplier.class,
+ document);
+ checkGraphicFrames(xTGOS);
+ com.sun.star.text.XTextEmbeddedObjectsSupplier xTEOS = (com.sun.star.text.XTextEmbeddedObjectsSupplier)UnoRuntime.queryInterface(
+ com.sun.star.text.XTextEmbeddedObjectsSupplier.class,
+ document);
+ checkEmbeddedFrames(xTEOS);
}
private void checkEmbeddedFrames(com.sun.star.text.XTextEmbeddedObjectsSupplier xTGOS)
- throws com.sun.star.lang.WrappedTargetException
+ throws com.sun.star.uno.Exception
{
Collection<String> vExpectedEmbeddedFrames = new ArrayList<String>();
vExpectedEmbeddedFrames.add("Object1");
@@ -82,51 +73,42 @@ public class CheckFlies extends ComplexTestCase {
com.sun.star.container.XNameAccess xEmbeddedFrames = xTGOS.getEmbeddedObjects();
for(String sFrameName : xEmbeddedFrames.getElementNames())
{
- if(!vExpectedEmbeddedFrames.remove(sFrameName))
- failed("Unexpected frame name");
- try
- {
- xEmbeddedFrames.getByName(sFrameName);
- }
- catch(com.sun.star.container.NoSuchElementException e)
- {
- failed("Could not get embedded frame by name.");
- }
- if(!xEmbeddedFrames.hasByName(sFrameName))
- failed("Could not find embedded frame by name.");
+ assertTrue(
+ "Unexpected frame name",
+ vExpectedEmbeddedFrames.remove(sFrameName));
+ xEmbeddedFrames.getByName(sFrameName);
+ assertTrue(
+ "Could not find embedded frame by name.",
+ xEmbeddedFrames.hasByName(sFrameName));
}
- if(!vExpectedEmbeddedFrames.isEmpty())
- failed("Missing expected embedded frames.");
+ assertTrue(
+ "Missing expected embedded frames.",
+ vExpectedEmbeddedFrames.isEmpty());
try
{
xEmbeddedFrames.getByName("Nonexisting embedded frame");
- failed("Got nonexisting embedded frame");
+ fail("Got nonexisting embedded frame");
}
catch(com.sun.star.container.NoSuchElementException e)
{}
- if(xEmbeddedFrames.hasByName("Nonexisting embedded frame"))
- failed("Has nonexisting embedded frame");
+ assertFalse(
+ "Has nonexisting embedded frame",
+ xEmbeddedFrames.hasByName("Nonexisting embedded frame"));
com.sun.star.container.XIndexAccess xEmbeddedFramesIdx = (com.sun.star.container.XIndexAccess)UnoRuntime.queryInterface(
com.sun.star.container.XIndexAccess.class,
xEmbeddedFrames);
- if(xEmbeddedFramesIdx.getCount() != nEmbeddedFrames)
- failed("Unexpected number of embedded frames reported.");
+ assertEquals(
+ "Unexpected number of embedded frames reported.", nEmbeddedFrames,
+ xEmbeddedFramesIdx.getCount());
for(int nCurrentFrameIdx = 0; nCurrentFrameIdx < xEmbeddedFramesIdx.getCount(); nCurrentFrameIdx++)
{
- try
- {
- xEmbeddedFramesIdx.getByIndex(nCurrentFrameIdx);
- }
- catch(com.sun.star.lang.IndexOutOfBoundsException e)
- {
- failed("Could not get embedded frame by index.");
- }
+ xEmbeddedFramesIdx.getByIndex(nCurrentFrameIdx);
}
}
private void checkGraphicFrames(com.sun.star.text.XTextGraphicObjectsSupplier xTGOS)
- throws com.sun.star.lang.WrappedTargetException
+ throws com.sun.star.uno.Exception
{
Collection<String> vExpectedGraphicFrames = new ArrayList<String>();
vExpectedGraphicFrames.add("graphics1");
@@ -134,51 +116,42 @@ public class CheckFlies extends ComplexTestCase {
com.sun.star.container.XNameAccess xGraphicFrames = xTGOS.getGraphicObjects();
for(String sFrameName : xGraphicFrames.getElementNames())
{
- if(!vExpectedGraphicFrames.remove(sFrameName))
- failed("Unexpected frame name");
- try
- {
- xGraphicFrames.getByName(sFrameName);
- }
- catch(com.sun.star.container.NoSuchElementException e)
- {
- failed("Could not get graphics frame by name.");
- }
- if(!xGraphicFrames.hasByName(sFrameName))
- failed("Could not find graphics frame by name.");
+ assertTrue(
+ "Unexpected frame name",
+ vExpectedGraphicFrames.remove(sFrameName));
+ xGraphicFrames.getByName(sFrameName);
+ assertTrue(
+ "Could not find graphics frame by name.",
+ xGraphicFrames.hasByName(sFrameName));
}
- if(!vExpectedGraphicFrames.isEmpty())
- failed("Missing expected graphics frames.");
+ assertTrue(
+ "Missing expected graphics frames.",
+ vExpectedGraphicFrames.isEmpty());
try
{
xGraphicFrames.getByName("Nonexisting graphics frame");
- failed("Got nonexisting graphics frame");
+ fail("Got nonexisting graphics frame");
}
catch(com.sun.star.container.NoSuchElementException e)
{}
- if(xGraphicFrames.hasByName("Nonexisting graphics frame"))
- failed("Has nonexisting graphics frame");
+ assertFalse(
+ "Has nonexisting graphics frame",
+ xGraphicFrames.hasByName("Nonexisting graphics frame"));
com.sun.star.container.XIndexAccess xGraphicFramesIdx = (com.sun.star.container.XIndexAccess)UnoRuntime.queryInterface(
com.sun.star.container.XIndexAccess.class,
xGraphicFrames);
- if(xGraphicFramesIdx.getCount() != nGraphicFrames)
- failed("Unexpected number of graphics frames reported.");
+ assertEquals(
+ "Unexpected number of graphics frames reported.", nGraphicFrames,
+ xGraphicFramesIdx.getCount());
for(int nCurrentFrameIdx = 0; nCurrentFrameIdx < xGraphicFramesIdx.getCount(); nCurrentFrameIdx++)
{
- try
- {
- xGraphicFramesIdx.getByIndex(nCurrentFrameIdx);
- }
- catch(com.sun.star.lang.IndexOutOfBoundsException e)
- {
- failed("Could not get graphics frame by index.");
- }
+ xGraphicFramesIdx.getByIndex(nCurrentFrameIdx);
}
}
private void checkTextFrames(com.sun.star.text.XTextFramesSupplier xTFS)
- throws com.sun.star.lang.WrappedTargetException
+ throws com.sun.star.uno.Exception
{
Collection<String> vExpectedTextFrames = new ArrayList<String>();
vExpectedTextFrames.add("Frame1");
@@ -188,46 +161,62 @@ public class CheckFlies extends ComplexTestCase {
com.sun.star.container.XNameAccess xTextFrames = xTFS.getTextFrames();
for(String sFrameName : xTextFrames.getElementNames())
{
- if(!vExpectedTextFrames.remove(sFrameName))
- failed("Unexpected frame name");
- try
- {
- xTextFrames.getByName(sFrameName);
- }
- catch(com.sun.star.container.NoSuchElementException e)
- {
- failed("Could not get text frame by name.");
- }
- if(!xTextFrames.hasByName(sFrameName))
- failed("Could not find text frame by name.");
+ assertTrue(
+ "Unexpected frame name",
+ vExpectedTextFrames.remove(sFrameName));
+ xTextFrames.getByName(sFrameName);
+ assertTrue(
+ "Could not find text frame by name.",
+ xTextFrames.hasByName(sFrameName));
}
- if(!vExpectedTextFrames.isEmpty())
- failed("Missing expected text frames.");
+ assertTrue(
+ "Missing expected text frames.", vExpectedTextFrames.isEmpty());
try
{
xTextFrames.getByName("Nonexisting Textframe");
- failed("Got nonexisting text frame.");
+ fail("Got nonexisting text frame.");
}
catch(com.sun.star.container.NoSuchElementException e)
{}
- if(xTextFrames.hasByName("Nonexisting text frame"))
- failed("Has nonexisting text frame.");
+ assertFalse(
+ "Has nonexisting text frame.",
+ xTextFrames.hasByName("Nonexisting text frame"));
com.sun.star.container.XIndexAccess xTextFramesIdx = (com.sun.star.container.XIndexAccess)UnoRuntime.queryInterface(
com.sun.star.container.XIndexAccess.class,
xTextFrames);
- if(xTextFramesIdx.getCount() != nTextFrames)
- failed("Unexpected number of text frames reported.");
+ assertEquals(
+ "Unexpected number of text frames reported.", nTextFrames,
+ xTextFramesIdx.getCount());
for(int nCurrentFrameIdx = 0; nCurrentFrameIdx < xTextFramesIdx.getCount(); nCurrentFrameIdx++)
{
- try
- {
- xTextFramesIdx.getByIndex(nCurrentFrameIdx);
- }
- catch(com.sun.star.lang.IndexOutOfBoundsException e)
- {
- failed("Could not get text frame by index.");
- }
+ xTextFramesIdx.getByIndex(nCurrentFrameIdx);
}
}
+
+ @Before public void setUpDocument() throws com.sun.star.uno.Exception {
+ document = util.WriterTools.loadTextDoc(
+ UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager()),
+ TestDocument.getUrl("CheckFlies.odt"));
+ }
+
+ @After public void tearDownDocument() {
+ util.DesktopTools.closeDoc(document);
+ }
+
+ private XTextDocument document = null;
+
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
}
diff --git a/sw/qa/complex/writer/CheckIndexedPropertyValues.java b/sw/qa/complex/writer/CheckIndexedPropertyValues.java
index aca4f68c7ec2..c381cd5825c4 100644
--- a/sw/qa/complex/writer/CheckIndexedPropertyValues.java
+++ b/sw/qa/complex/writer/CheckIndexedPropertyValues.java
@@ -27,53 +27,31 @@
package complex.writer;
-import complexlib.ComplexTestCase;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.uno.XInterface;
import com.sun.star.beans.PropertyValue;
import com.sun.star.container.XIndexContainer;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.Type;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
/**
* Test the com.sun.star.document.IndexedPropertyValues service
*/
-public class CheckIndexedPropertyValues extends ComplexTestCase {
+public class CheckIndexedPropertyValues {
+ @Test public void checkIndexedPropertyValues()
+ throws com.sun.star.uno.Exception
+ {
+ XIndexContainer xCont = UnoRuntime.queryInterface(
+ XIndexContainer.class,
+ (connection.getComponentContext().getServiceManager().
+ createInstanceWithContext(
+ "com.sun.star.document.IndexedPropertyValues",
+ connection.getComponentContext())));
- private final String testedServiceName =
- "com.sun.star.document.IndexedPropertyValues";
- public String[] getTestMethodNames() {
- return new String[]{"checkIndexedPropertyValues"};
- }
-
-/* public String getTestObjectName() {
- return testedServiceName;
- }
-*/
- public void checkIndexedPropertyValues() {
- Object oObj = null;
- try {
- // print information about the service
- XMultiServiceFactory xMSF = (XMultiServiceFactory)param.getMSF();
- oObj = xMSF.createInstance(testedServiceName);
- System.out.println("****************");
- System.out.println("Service Name:");
- util.dbg.getSuppServices(oObj);
- System.out.println("****************");
- System.out.println("Interfaces:");
- util.dbg.printInterfaces((XInterface)oObj, true);
- }
- catch(com.sun.star.uno.Exception e) {
- System.out.println("Cannot create object.");
- e.printStackTrace();
- failed(e.getMessage());
- return;
- }
- XIndexContainer xCont = (XIndexContainer)UnoRuntime.queryInterface(
- XIndexContainer.class, oObj);
-
- assure("XIndexContainer was queried but returned null.",
- (xCont != null));
+ assertNotNull("XIndexContainer was queried but returned null.", xCont);
PropertyValue[] prop1 = new PropertyValue[1];
prop1[0] = new PropertyValue();
prop1[0].Name = "Jupp";
@@ -84,99 +62,55 @@ public class CheckIndexedPropertyValues extends ComplexTestCase {
prop2[0].Name = "Horst";
prop2[0].Value = "BadGuy";
- try {
- Type t = xCont.getElementType();
- log.println("Insertable Type: " + t.getTypeName());
- assure("Initial container is not empty: " + xCont.getCount(), xCont.getCount()==0);
- log.println("Inserting a PropertyValue.");
- xCont.insertByIndex(0, prop1);
- PropertyValue[]ret = (PropertyValue[])xCont.getByIndex(0);
- assure("Got the wrong PropertyValue: " +
- ret[0].Name + " " +(String)ret[0].Value,
- ret[0].Name.equals(prop1[0].Name) &&
- ret[0].Value.equals(prop1[0].Value));
- log.println("Replace the PropertyValue.");
- xCont.replaceByIndex(0, prop2);
- ret = (PropertyValue[])xCont.getByIndex(0);
- assure("Got the wrong PropertyValue: " +
- ret[0].Name + " " +(String)ret[0].Value,
- ret[0].Name.equals(prop2[0].Name) &&
- ret[0].Value.equals(prop2[0].Value));
- log.println("Remove the PropertyValue.");
- xCont.removeByIndex(0);
- assure("Could not remove PropertyValue.",
- !xCont.hasElements() && xCont.getCount()==0);
- log.println("Insert again.");
- xCont.insertByIndex(0, prop1);
- xCont.insertByIndex(1, prop2);
- assure("Did not insert PropertyValue.",
- xCont.hasElements() && xCont.getCount()==2);
-
- try {
- log.println("Insert with wrong index.");
- xCont.insertByIndex(25, prop2);
- failed("IllegalArgumentException was not thrown.");
- }
- catch(com.sun.star.lang.IllegalArgumentException e) {
- log.println("Wrong exception thrown.");
- failed(e.getMessage());
- e.printStackTrace();
- }
- catch(com.sun.star.lang.IndexOutOfBoundsException e) {
- log.println("Expected exception thrown: "+e);
- }
- catch(com.sun.star.lang.WrappedTargetException e) {
- log.println("Wrong exception thrown.");
- failed(e.getMessage());
- e.printStackTrace();
- }
-
- try {
- log.println("Remove non-existing index.");
- xCont.removeByIndex(25);
- failed("IndexOutOfBoundsException was not thrown.");
- }
- catch(com.sun.star.lang.IndexOutOfBoundsException e) {
- log.println("Expected exception thrown: "+e);
- }
- catch(com.sun.star.lang.WrappedTargetException e) {
- log.println("Wrong exception thrown.");
- failed(e.getMessage());
- e.printStackTrace();
- }
-
- try {
- log.println("Insert wrong argument.");
- xCont.insertByIndex(2, "Example String");
- failed("IllegalArgumentException was not thrown.");
- }
- catch(com.sun.star.lang.IllegalArgumentException e) {
- log.println("Expected exception thrown: " + e);
- }
- catch(com.sun.star.lang.IndexOutOfBoundsException e) {
- log.println("Wrong exception thrown.");
- failed(e.getMessage());
- e.printStackTrace();
- }
- catch(com.sun.star.lang.WrappedTargetException e) {
- log.println("Wrong exception thrown.");
- failed(e.getMessage());
- e.printStackTrace();
- }
+ Type t = xCont.getElementType();
+ assertEquals("Initial container is not empty", 0, xCont.getCount());
+ xCont.insertByIndex(0, prop1);
+ PropertyValue[]ret = (PropertyValue[])xCont.getByIndex(0);
+ assertEquals(prop1[0].Name, ret[0].Name);
+ assertEquals(prop1[0].Value, ret[0].Value);
+ xCont.replaceByIndex(0, prop2);
+ ret = (PropertyValue[])xCont.getByIndex(0);
+ assertEquals(prop2[0].Name, ret[0].Name);
+ assertEquals(prop2[0].Value, ret[0].Value);
+ xCont.removeByIndex(0);
+ assertTrue("Could not remove PropertyValue.",
+ !xCont.hasElements() && xCont.getCount()==0);
+ xCont.insertByIndex(0, prop1);
+ xCont.insertByIndex(1, prop2);
+ assertTrue("Did not insert PropertyValue.",
+ xCont.hasElements() && xCont.getCount()==2);
+ try {
+ xCont.insertByIndex(25, prop2);
+ fail("IllegalArgumentException was not thrown.");
}
- catch(com.sun.star.lang.IllegalArgumentException e) {
- failed(e.getMessage());
- e.printStackTrace();
+ catch(com.sun.star.lang.IndexOutOfBoundsException e) {
+ }
+
+ try {
+ xCont.removeByIndex(25);
+ fail("IndexOutOfBoundsException was not thrown.");
}
catch(com.sun.star.lang.IndexOutOfBoundsException e) {
- failed(e.getMessage());
- e.printStackTrace();
}
- catch(com.sun.star.lang.WrappedTargetException e) {
- failed(e.getMessage());
- e.printStackTrace();
+
+ try {
+ xCont.insertByIndex(2, "Example String");
+ fail("IllegalArgumentException was not thrown.");
+ }
+ catch(com.sun.star.lang.IllegalArgumentException e) {
}
}
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
}
diff --git a/sw/qa/complex/writer/CheckNamedPropertyValues.java b/sw/qa/complex/writer/CheckNamedPropertyValues.java
index 851381cf3c24..b2541954ce9f 100644
--- a/sw/qa/complex/writer/CheckNamedPropertyValues.java
+++ b/sw/qa/complex/writer/CheckNamedPropertyValues.java
@@ -27,53 +27,31 @@
package complex.writer;
-
-import complexlib.ComplexTestCase;
import com.sun.star.beans.PropertyValue;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.uno.XInterface;
import com.sun.star.container.XNameContainer;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.Type;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
/**
*
*/
-public class CheckNamedPropertyValues extends ComplexTestCase {
-
- private final String testedServiceName =
- "com.sun.star.document.NamedPropertyValues";
-
- public String[] getTestMethodNames() {
- return new String[]{"checkNamedPropertyValues"};
- }
-
-/* public String getTestObjectName() {
- return "complex.writer.CheckNamedPropertyValues";
- } */
-
- public void checkNamedPropertyValues() {
- Object oObj = null;
- try {
- XMultiServiceFactory xMSF = (XMultiServiceFactory)param.getMSF();
- oObj = xMSF.createInstance(testedServiceName);
- System.out.println("****************");
- System.out.println("Service Name:");
- util.dbg.getSuppServices(oObj);
- System.out.println("****************");
- System.out.println("Interfaces:");
- util.dbg.printInterfaces((XInterface)oObj, true);
- }
- catch(com.sun.star.uno.Exception e) {
- e.printStackTrace();
- failed(e.getMessage());
- return;
- }
- XNameContainer xCont = (XNameContainer)UnoRuntime.queryInterface(
- XNameContainer.class, oObj);
-
- assure("XNameContainer was queried but returned null.",
- (xCont != null));
+public class CheckNamedPropertyValues {
+ @Test public void checkNamedPropertyValues()
+ throws com.sun.star.uno.Exception
+ {
+ XNameContainer xCont = UnoRuntime.queryInterface(
+ XNameContainer.class,
+ (connection.getComponentContext().getServiceManager().
+ createInstanceWithContext(
+ "com.sun.star.document.NamedPropertyValues",
+ connection.getComponentContext())));
+
+ assertNotNull("XNameContainer was queried but returned null.", xCont);
PropertyValue[] prop1 = new PropertyValue[1];
prop1[0] = new PropertyValue();
prop1[0].Name = "Jupp";
@@ -84,113 +62,61 @@ public class CheckNamedPropertyValues extends ComplexTestCase {
prop2[0].Name = "Horst";
prop2[0].Value = "BadGuy";
- try {
- Type t = xCont.getElementType();
- log.println("Insertable Type: " + t.getTypeName());
- assure("Initial container is not empty.", !xCont.hasElements());
-
- log.println("Insert a PropertyValue.");
- xCont.insertByName("prop1", prop1);
- PropertyValue[]ret = (PropertyValue[])xCont.getByName("prop1");
- assure("Got the wrong PropertyValue: " +
- ret[0].Name + " " +(String)ret[0].Value,
- ret[0].Name.equals(prop1[0].Name) &&
- ret[0].Value.equals(prop1[0].Value));
- log.println("Replace the PropertyValue.");
- xCont.replaceByName("prop1", prop2);
- ret = (PropertyValue[])xCont.getByName("prop1");
- assure("Got the wrong PropertyValue: " +
- ret[0].Name + " " +(String)ret[0].Value,
- ret[0].Name.equals(prop2[0].Name) &&
- ret[0].Value.equals(prop2[0].Value));
- log.println("Remove the PropertyValue.");
- xCont.removeByName("prop1");
- assure("Could not remove PropertyValue.", !xCont.hasElements());
- log.println("Insert again.");
- xCont.insertByName("prop1", prop1);
- xCont.insertByName("prop2", prop2);
- assure("Did not insert PropertyValue.", xCont.hasElements());
- String[] names = xCont.getElementNames();
- int count = 0;
- for (int i=0; i<names.length; i++) {
- if (names[i].equals("prop1") || names[i].equals("prop2"))
- count++;
- else
- failed("Got a wrong element name: "+names[i]);
- }
- if (count != 2)
- failed("Not all element names were returned.");
-
- try {
- log.println("Insert PropertyValue with an existing name.");
- xCont.insertByName("prop2", prop1);
- failed("ElementExistException was not thrown.");
- }
- catch(com.sun.star.lang.IllegalArgumentException e) {
- log.println("Wrong exception thrown.");
- failed(e.getMessage());
- e.printStackTrace();
- }
- catch(com.sun.star.container.ElementExistException e) {
- log.println("Expected exception thrown: "+e);
- }
- catch(com.sun.star.lang.WrappedTargetException e) {
- log.println("Wrong exception thrown.");
- failed(e.getMessage());
- e.printStackTrace();
- }
-
- try {
- log.println("Inserting a wrong argument.");
- xCont.insertByName("prop3", "Example String");
- failed("IllegalArgumentException was not thrown.");
- }
- catch(com.sun.star.lang.IllegalArgumentException e) {
- log.println("Expected exception thrown: "+e);
- }
- catch(com.sun.star.container.ElementExistException e) {
- log.println("Wrong exception thrown.");
- failed(e.getMessage());
- e.printStackTrace();
- }
- catch(com.sun.star.lang.WrappedTargetException e) {
- log.println("Wrong exception thrown.");
- failed(e.getMessage());
- e.printStackTrace();
- }
+ Type t = xCont.getElementType();
+ assertFalse("Initial container is not empty.", xCont.hasElements());
+
+ xCont.insertByName("prop1", prop1);
+ PropertyValue[]ret = (PropertyValue[])xCont.getByName("prop1");
+ assertEquals(prop1[0].Name, ret[0].Name);
+ assertEquals(prop1[0].Value, ret[0].Value);
+ xCont.replaceByName("prop1", prop2);
+ ret = (PropertyValue[])xCont.getByName("prop1");
+ assertEquals(prop2[0].Name, ret[0].Name);
+ assertEquals(prop2[0].Value, ret[0].Value);
+ xCont.removeByName("prop1");
+ assertFalse("Could not remove PropertyValue.", xCont.hasElements());
+ xCont.insertByName("prop1", prop1);
+ xCont.insertByName("prop2", prop2);
+ assertTrue("Did not insert PropertyValue.", xCont.hasElements());
+ String[] names = xCont.getElementNames();
+ assertEquals("Not all element names were returned.", 2, names.length);
+ for (int i=0; i<names.length; i++) {
+ assertTrue(
+ "Got a wrong element name",
+ names[i].equals("prop1") || names[i].equals("prop2"));
+ }
- try {
- log.println("Remove a non-existing element.");
- xCont.removeByName("prop3");
- failed("NoSuchElementException was not thrown.");
- }
- catch(com.sun.star.container.NoSuchElementException e) {
- log.println("Expected exception thrown: "+e);
- }
- catch(com.sun.star.lang.WrappedTargetException e) {
- log.println("Wrong exception thrown.");
- failed(e.getMessage());
- e.printStackTrace();
- }
+ try {
+ xCont.insertByName("prop2", prop1);
+ fail("ElementExistException was not thrown.");
+ }
+ catch(com.sun.star.container.ElementExistException e) {
+ }
+ try {
+ xCont.insertByName("prop3", "Example String");
+ fail("IllegalArgumentException was not thrown.");
}
catch(com.sun.star.lang.IllegalArgumentException e) {
- failed(e.getMessage());
- e.printStackTrace();
}
- catch(com.sun.star.container.ElementExistException e) {
- failed(e.getMessage());
- e.printStackTrace();
+
+ try {
+ xCont.removeByName("prop3");
+ fail("NoSuchElementException was not thrown.");
}
catch(com.sun.star.container.NoSuchElementException e) {
- failed(e.getMessage());
- e.printStackTrace();
- }
- catch(com.sun.star.lang.WrappedTargetException e) {
- failed(e.getMessage());
- e.printStackTrace();
}
}
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+ private static final OfficeConnection connection = new OfficeConnection();
}
diff --git a/sw/qa/complex/writer/LoadSaveTest.java b/sw/qa/complex/writer/LoadSaveTest.java
new file mode 100644
index 000000000000..a1600488c7bc
--- /dev/null
+++ b/sw/qa/complex/writer/LoadSaveTest.java
@@ -0,0 +1,254 @@
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+package complex.writer;
+
+import complexlib.ComplexTestCase;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.uno.XComponentContext;
+import com.sun.star.lang.WrappedTargetException;
+import com.sun.star.lang.WrappedTargetRuntimeException;
+import com.sun.star.lang.EventObject;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.lang.XComponent;
+import com.sun.star.lang.XServiceInfo;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.beans.Pair;
+import com.sun.star.util.XCloseable;
+import com.sun.star.frame.XStorable;
+import com.sun.star.document.DocumentEvent;
+import com.sun.star.document.XDocumentEventBroadcaster;
+import com.sun.star.document.XDocumentEventListener;
+import com.sun.star.text.XTextDocument;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.io.File;
+
+/**
+ * a small program to load documents from one directory (recursively)
+ * and store them in another, implemented as a complex test.
+ */
+public class LoadSaveTest extends ComplexTestCase
+{
+ private XMultiServiceFactory m_xMSF = null;
+ private XComponentContext m_xContext = null;
+ private XDocumentEventBroadcaster m_xGEB = null;
+ private String m_TmpDir = null;
+
+ private String m_fileURL = "file://";
+ // these should be parameters or something?
+ private String m_SourceDir = "FIXME";
+ private String m_TargetDir = "/tmp/out";
+
+ public String[] getTestMethodNames() {
+ return new String[] { "testLoadStore" };
+ }
+
+ public void before() throws Exception
+ {
+ m_xMSF = (XMultiServiceFactory) param.getMSF();
+ XPropertySet xPropertySet = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, m_xMSF);
+ Object defaultCtx = xPropertySet.getPropertyValue("DefaultContext");
+ m_xContext = (XComponentContext)
+ UnoRuntime.queryInterface(XComponentContext.class, defaultCtx);
+ assure("could not get component context.", m_xContext != null);
+ Object oGEB = m_xMSF.createInstance(
+ "com.sun.star.frame.GlobalEventBroadcaster");
+ m_xGEB = (XDocumentEventBroadcaster)
+ UnoRuntime.queryInterface(XDocumentEventBroadcaster.class, oGEB);
+ assure("could not get global event broadcaster.", m_xGEB != null);
+ m_TmpDir = util.utils.getOfficeTemp/*Dir*/(m_xMSF);
+ log.println("tempdir: " + m_TmpDir);
+ log.println("sourcedir: " + m_SourceDir);
+ log.println("targetdir: " + m_TargetDir);
+ }
+
+ /*
+ public void after()
+ {
+ }
+ */
+
+ public void testLoadStore() throws Exception
+ {
+ Pair<List<String>, List<String>> dirsFiles =
+ getDirAndFileNames(m_SourceDir);
+ makeDirs(m_TargetDir, dirsFiles.First);
+ for (String fileName : dirsFiles.Second)
+ {
+ try {
+ testDoc(fileName);
+ } catch (Exception e) {
+ report(e);
+ }
+ }
+ }
+
+ public void testDoc(String fileName) throws Exception
+ {
+ XComponent xDoc = null;
+ EventListener xListener = new EventListener();
+ try {
+ m_xGEB.addDocumentEventListener(xListener);
+
+ log.println("Loading document: " + fileName + " ...");
+
+ PropertyValue[] loadProps = new PropertyValue[1];
+ loadProps[0] = new PropertyValue();
+ loadProps[0].Name = "ReadOnly";
+ loadProps[0].Value = new Boolean(true);
+
+ String sourceFile = m_fileURL + m_SourceDir + fileName;
+
+ xDoc = util.DesktopTools.loadDoc(m_xMSF, sourceFile, loadProps);
+
+ log.println("... done");
+
+ {
+ // apparently OnLayoutFinished is not sent for every doc???
+ // 10 seconds is evidently not enough for large documents
+ int time = 0;
+ while (!xListener.IsLayoutFinished() && (time < 30000)) {
+ Thread.sleep(100);
+ time += 100;
+ }
+ if (time >= 30000) {
+ log.println("timeout: no OnLayoutFinished received!");
+ }
+ }
+
+ log.println("Storing document: " + fileName + " ...");
+
+ XStorable xStor = (XStorable) UnoRuntime.queryInterface(
+ XStorable.class, xDoc);
+
+ String targetFile = m_fileURL + m_TargetDir + fileName;
+
+ xStor.storeToURL(targetFile, new PropertyValue[0]);
+
+ log.println("... done");
+
+ } finally {
+ if (xDoc != null) {
+ util.DesktopTools.closeDoc(xDoc);
+ }
+ if (xListener != null) {
+ m_xGEB.removeDocumentEventListener(xListener);
+ }
+ }
+ }
+
+ class EventListener implements XDocumentEventListener
+ {
+ boolean m_isLayoutFinished = false;
+ boolean IsLayoutFinished() { return m_isLayoutFinished; }
+ public void documentEventOccured(DocumentEvent Event)
+ {
+// log.println("event: " + Event.EventName);
+ if ("OnLayoutFinished".equals(Event.EventName))
+ {
+ // we only have one doc at any time, so no need to check
+ m_isLayoutFinished = true;
+// log.println("received OnLayoutFinished");
+ }
+ }
+ public void disposing(EventObject Event) { }
+ }
+
+ void report2(Exception e)
+ {
+ if (e instanceof WrappedTargetException)
+ {
+ log.println("Cause:");
+ Exception cause = (Exception)
+ (((WrappedTargetException)e).TargetException);
+ log.println(cause.toString());
+ report2(cause);
+ } else if (e instanceof WrappedTargetRuntimeException) {
+ log.println("Cause:");
+ Exception cause = (Exception)
+ (((WrappedTargetRuntimeException)e).TargetException);
+ log.println(cause.toString());
+ report2(cause);
+ }
+ }
+
+ void report(Exception e) {
+ log.println("Exception occurred:");
+ log.println(e.toString());
+ e.printStackTrace((java.io.PrintWriter) log);
+ report2(e);
+// failed();
+ }
+
+ Pair<List<String>, List<String>> getDirAndFileNames(String dir)
+ {
+ List<String> dirs = new ArrayList<String>();
+ List<String> files = new ArrayList<String>();
+ File root = new File(dir);
+ getDirAndFileNames(root, "", dirs, files);
+ return new Pair<List<String>, List<String>>(dirs, files);
+ }
+
+ void getDirAndFileNames(File file, String relPath,
+ List<String> dirs, List<String> files)
+ {
+ assure("does not exist: " + relPath, file.exists());
+ if (file.isDirectory()) {
+ dirs.add(relPath);
+ File[] subfiles = file.listFiles();
+ for (File subfile : subfiles)
+ {
+ String subfileName =
+ relPath + File.separator + subfile.getName();
+ getDirAndFileNames(subfile, subfileName, dirs, files);
+ }
+ }
+ else if (file.isFile()) {
+ if (file.getName().endsWith(".odt")) {
+ files.add(relPath);
+ }
+ }
+ }
+
+ void makeDirs(String target, List<String> dirs) throws Exception
+ {
+ for (String dir : dirs) {
+ File f = new File(target + dir);
+ if (!f.exists()) {
+ if (!f.mkdir()) {
+ throw new Exception("cannot mkdir: " + target + dir);
+ }
+ }
+ }
+ }
+}
+
diff --git a/sw/qa/complex/writer/TestDocument.java b/sw/qa/complex/writer/TestDocument.java
new file mode 100644
index 000000000000..25a11338ae5c
--- /dev/null
+++ b/sw/qa/complex/writer/TestDocument.java
@@ -0,0 +1,39 @@
+/*************************************************************************
+*
+* 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.
+*
+************************************************************************/
+
+package complex.writer;
+
+import java.io.File;
+import org.openoffice.test.OfficeFileUrl;
+
+final class TestDocument {
+ public static String getUrl(String name) {
+ return OfficeFileUrl.getAbsolute(new File("testdocuments", name));
+ }
+
+ private TestDocument() {}
+}
diff --git a/sw/qa/complex/writer/TextPortionEnumerationTest.java b/sw/qa/complex/writer/TextPortionEnumerationTest.java
index 2eda02bfa518..114359bc3581 100644
--- a/sw/qa/complex/writer/TextPortionEnumerationTest.java
+++ b/sw/qa/complex/writer/TextPortionEnumerationTest.java
@@ -27,7 +27,6 @@
package complex.writer;
-import complexlib.ComplexTestCase;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.AnyConverter;
import com.sun.star.uno.XComponentContext;
@@ -70,6 +69,13 @@ import com.sun.star.rdf.XMetadatable;
import com.sun.star.rdf.Statement;
import com.sun.star.rdf.XDocumentRepository;
import com.sun.star.rdf.XRepositorySupplier;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
import java.util.Map;
import java.util.HashMap;
@@ -432,10 +438,8 @@ class FuzzyTester
private Stack<Pair<TreeNode, TreeNodeEnum>> m_StackActual;
private List<TreeNode> m_BufferExpected;
private List<TreeNode> m_BufferActual;
- private share.LogWriter m_Log;
- FuzzyTester(share.LogWriter log) {
- m_Log = log;
+ FuzzyTester() {
m_BufferExpected = new ArrayList<TreeNode>();
m_BufferActual = new ArrayList<TreeNode>();
m_StackExpected = new Stack<Pair<TreeNode, TreeNodeEnum>>();
@@ -444,12 +448,10 @@ class FuzzyTester
/** idea: traverse both trees, enumerate nodes, stopping at content nodes.
then compare buffers. */
- boolean doTest(TreeNode expected, TreeNode actual)
+ void doTest(TreeNode expected, TreeNode actual)
{
- if (!expected.getType().equals("__ROOT__"))
- throw new RuntimeException("doTest: expected: root");
- if (!actual.getType().equals("__ROOT__"))
- throw new RuntimeException("doTest: actual: root");
+ assertEquals("__ROOT__", expected.getType());
+ assertEquals("__ROOT__", actual.getType());
m_StackExpected.push(new Pair(expected, expected.createEnumeration()));
m_StackActual.push(new Pair(actual, actual.createEnumeration()));
do {
@@ -459,18 +461,19 @@ class FuzzyTester
testBuffer();
} while (!m_StackExpected.empty() || !m_StackActual.empty());
if (m_DiffSequence != 0) {
- m_Log.println("warning: " + m_DiffSequence
+ System.out.println("warning: " + m_DiffSequence
+ " differences in sequence");
}
if (m_DiffSpuriousEmptyText != 0) {
- m_Log.println("warning: " + m_DiffSpuriousEmptyText
+ System.out.println("warning: " + m_DiffSpuriousEmptyText
+ " spurious empty text nodes");
}
if (m_DiffNesting != 0) {
- m_Log.println("WARNING: " + m_DiffNesting
+ System.out.println("WARNING: " + m_DiffNesting
+ " differences in nesting");
}
- return (m_DiffContent == 0) && (m_DiffMissing == 0);
+ assertEquals(0, m_DiffContent);
+ assertEquals(0, m_DiffMissing);
}
private void traverse(Stack<Pair<TreeNode, TreeNodeEnum>> stack,
@@ -563,7 +566,7 @@ class FuzzyTester
}
m_BufferActual.set(j, null);
} else {
-//m_Log.println("testBuffer:");
+//System.out.println("testBuffer:");
printMissing(node);
m_DiffMissing++;
}
@@ -573,7 +576,7 @@ class FuzzyTester
TreeNode node = m_BufferActual.get(j);
if (node != null)
{
-//m_Log.println("testBuffer:");
+//System.out.println("testBuffer:");
printUnexpected(node);
if ((node instanceof TextNode) &&
((TextNode) node).getContent().length() == 0) {
@@ -590,25 +593,25 @@ class FuzzyTester
void printDiff(String prefix, String expected, String actual)
{
- m_Log.println(prefix +
+ System.out.println(prefix +
":\texpected: " + expected + "\tactual: " + actual);
}
void printNesting(TreeNode node, TreeNode nesting)
{
- m_Log.println("node: " + node.toString()
+ System.out.println("node: " + node.toString()
+ " possibly moved across nesting " + nesting.toString());
}
void printMissing(TreeNode node)
{
- m_Log.println(" missing node: " + node.toString());
+ System.out.println(" missing node: " + node.toString());
}
void printUnexpected(TreeNode node)
{
- m_Log.println("unexpected node: " + node.toString());
+ System.out.println("unexpected node: " + node.toString());
}
}
@@ -619,10 +622,9 @@ class FuzzyTester
class EnumConverter
{
private Stack<TreeNode> m_Stack;
- TextPortionEnumerationTest m_T;
- EnumConverter(TextPortionEnumerationTest err) {
- m_Stack = new Stack<TreeNode>(); m_T = err;
+ EnumConverter() {
+ m_Stack = new Stack<TreeNode>();
}
TreeNode convert(XEnumeration xEnum) throws Exception
@@ -630,7 +632,7 @@ class EnumConverter
TreeNode root = new TreeNode();
m_Stack.push(root);
TreeNode ret = convertChildren(xEnum);
- m_T.assure("EnumConverter.convert: stack", m_Stack.empty());
+ assertTrue("EnumConverter.convert: stack", m_Stack.empty());
return ret;
}
@@ -670,7 +672,7 @@ class EnumConverter
xMeta);
XEnumeration xEnumChildren = xEA.createEnumeration();
TreeNode node2 = convertChildren(xEnumChildren);
- m_T.assure("stack error: meta-field", node == node2);
+ assertSame("stack error: meta-field", node2, node);
} else {
XPropertySet xFieldPropSet = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, xField);
@@ -678,7 +680,7 @@ class EnumConverter
xFieldPropSet.getPropertyValue("Content");
boolean isFixed = (Boolean)
xFieldPropSet.getPropertyValue("IsFixed");
- m_T.assure("field not fixed?", isFixed);
+ assertTrue("field not fixed?", isFixed);
node = new TextFieldNode(content);
}
} else if (type.equals("Footnote")) {
@@ -781,10 +783,8 @@ class EnumConverter
continue;
} else {
node = m_Stack.pop();
- m_T.assure("stack error: Ruby expected; is: " +
- node.toString(), node instanceof RubyNode);
-// m_T.assure("stack error: ruby",
-// ruby.equals(((RubyNode)node).getRubyText()));
+ assertTrue("stack error: Ruby expected; is: " +
+ node.toString(), node instanceof RubyNode);
}
} else if (type.equals("InContentMetadata")) {
Object xMeta = xPropSet.getPropertyValue("InContentMetadata");
@@ -797,9 +797,7 @@ class EnumConverter
UnoRuntime.queryInterface(XEnumerationAccess.class, xMeta);
XEnumeration xEnumChildren = xEA.createEnumeration();
TreeNode node2 = convertChildren(xEnumChildren);
- m_T.assure("stack error: meta", node == node2);
-// } else if (type.equals("MetadataField")) {
-// Object xMeta = xPropSet.getPropertyValue("MetadataField");
+ assertSame("stack error: meta", node2, node);
} else {
throw new RuntimeException("unexpected type: " + type);
}
@@ -1240,7 +1238,7 @@ class RangeInserter extends Inserter
//----------------------------------------------------------------------
-public class TextPortionEnumerationTest extends ComplexTestCase
+public class TextPortionEnumerationTest
{
private XMultiServiceFactory m_xMSF = null;
private XComponentContext m_xContext = null;
@@ -1249,115 +1247,28 @@ public class TextPortionEnumerationTest extends ComplexTestCase
private int m_Count = 1;
-// public String[] getTestMethodNames() { return new String[] { "testLoadStore" }; }
- public String[] getTestMethodNames() {
- return new String[] {
- "testText",
- "testTextField",
-// "testControlChar",
-// "testSoftPageBreak",
- "testFootnote",
- "testFrameAs",
- "testFrameAt",
- "testBookmarkPoint",
- "testBookmark",
- "testBookmarkPointXmlId",
- "testBookmarkXmlId",
- "testRefmarkPoint",
- "testRefmark",
- "testToxmarkPoint",
- "testToxmark",
- "testHyperlink",
- "testHyperlinkEmpty",
- "testRuby",
- "testRubyEmpty",
- "testMeta",
- "testMetaEmpty",
- "testMetaField",
- "testMetaFieldEmpty",
- "testBookmark1",
- "testBookmark2",
- "testRefMark2",
- "testRefMark3",
- "testToxMark2",
- "testToxMark3",
- "testMarks1",
- "testMarks2",
- "testMarks3",
- "testFrameMark1",
- "testFrameMark2",
- "testFrameMark3",
- "testFrameMark4",
- "testFrames1",
- "testFrames2",
- "testFrames3",
- "testFrames4",
- "testFrames5",
- "testRubyHyperlink1",
- "testRubyHyperlink2",
- "testEnd1",
- "testEnd2",
- "testEnd3",
- "testEnd4",
- "testEnd5",
- "testEmpty1",
- "testEmpty2",
- "testEmpty3",
- "test1",
- "testRange1",
- "testRangeHyperlinkHyperlink",
- "testRangeHyperlinkRuby",
- "testRangeRubyHyperlink",
- "testRangeRubyRuby",
- "testRangeHyperlinkMeta",
- "testRangeRubyMeta",
- "testRangeMetaHyperlink",
- "testRangeMetaRuby",
- "testRangeMetaMeta",
- "testRange2",
- "testRange3",
- "testRange4",
- "testRange5",
- "testRange6",
- "testRange7",
- "testMetaXChild",
- "testMetaXText",
- "testMetaXTextCursor",
- "testMetaXTextAttachToxMark",
- "testMetaXTextAttachRefMark",
- "testMetaXTextAttachTextField",
- "testMetaXTextAttachFootnote",
- "testMetaXTextAttachMeta",
- "testMetaFieldXTextField",
- "testMetaFieldXPropertySet",
- "testLoadStore",
- "testLoadStoreXmlid",
- };
- }
-
- public void before() throws Exception
+ @Before public void before() throws Exception
{
- m_xMSF = (XMultiServiceFactory) param.getMSF();
+ m_xMSF = UnoRuntime.queryInterface(
+ XMultiServiceFactory.class,
+ connection.getComponentContext().getServiceManager());
XPropertySet xPropertySet = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, m_xMSF);
Object defaultCtx = xPropertySet.getPropertyValue("DefaultContext");
m_xContext = (XComponentContext)
UnoRuntime.queryInterface(XComponentContext.class, defaultCtx);
- assure("could not get component context.", m_xContext != null);
+ assertNotNull("could not get component context.", m_xContext);
m_xDoc = util.WriterTools.createTextDoc(m_xMSF);
m_TmpDir = util.utils.getOfficeTemp/*Dir*/(m_xMSF);
- log.println("tempdir: " + m_TmpDir);
+ System.out.println("tempdir: " + m_TmpDir);
}
- public void after()
+ @After public void after()
{
- if (m_xDoc != null) {
- util.DesktopTools.closeDoc(m_xDoc);
- m_xDoc = null;
- }
+ util.DesktopTools.closeDoc(m_xDoc);
}
- public void testText() throws Exception
+ @Test public void testText() throws Exception
{
TreeNode root = new TreeNode();
TreeNode text = new TextNode("abc");
@@ -1365,7 +1276,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testTextField() throws Exception
+ @Test public void testTextField() throws Exception
{
String name = mkName("ruby");
TreeNode root = new TreeNode();
@@ -1374,7 +1285,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testControlChar() throws Exception
+ /*@Test*/ public void testControlChar() throws Exception
{
//FIXME this is converted to a text portion: ControlCharacter is obsolete
TreeNode root = new TreeNode();
@@ -1383,7 +1294,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testSoftPageBreak() throws Exception
+ /*@Test*/ public void testSoftPageBreak() throws Exception
{
//FIXME: insert a soft page break: not done
TreeNode root = new TreeNode();
@@ -1394,7 +1305,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFootnote() throws Exception
+ @Test public void testFootnote() throws Exception
{
String name = mkName("ftn");
TreeNode root = new TreeNode();
@@ -1403,7 +1314,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrameAs() throws Exception
+ @Test public void testFrameAs() throws Exception
{
String name = mkName("frame");
TreeNode root = new TreeNode();
@@ -1412,7 +1323,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrameAt() throws Exception
+ @Test public void testFrameAt() throws Exception
{
String name = mkName("frame");
TreeNode root = new TreeNode();
@@ -1423,7 +1334,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testBookmarkPoint() throws Exception
+ @Test public void testBookmarkPoint() throws Exception
{
String name = mkName("mark");
TreeNode root = new TreeNode();
@@ -1434,7 +1345,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testBookmark() throws Exception
+ @Test public void testBookmark() throws Exception
{
String name = mkName("mark");
TreeNode root = new TreeNode();
@@ -1447,7 +1358,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testBookmarkPointXmlId() throws Exception
+ @Test public void testBookmarkPointXmlId() throws Exception
{
String name = mkName("mark");
StringPair id = mkId("id");
@@ -1459,7 +1370,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testBookmarkXmlId() throws Exception
+ @Test public void testBookmarkXmlId() throws Exception
{
String name = mkName("mark");
StringPair id = mkId("id");
@@ -1473,7 +1384,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testRefmarkPoint() throws Exception
+ @Test public void testRefmarkPoint() throws Exception
{
String name = mkName("refmark");
TreeNode root = new TreeNode();
@@ -1484,7 +1395,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testRefmark() throws Exception
+ @Test public void testRefmark() throws Exception
{
String name = mkName("refmark");
TreeNode root = new TreeNode();
@@ -1497,7 +1408,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testToxmarkPoint() throws Exception
+ @Test public void testToxmarkPoint() throws Exception
{
String name = mkName("toxmark");
TreeNode root = new TreeNode();
@@ -1508,7 +1419,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testToxmark() throws Exception
+ @Test public void testToxmark() throws Exception
{
String name = mkName("toxmark");
TreeNode root = new TreeNode();
@@ -1521,7 +1432,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testHyperlink() throws Exception
+ @Test public void testHyperlink() throws Exception
{
String name = mkName("url");
TreeNode root = new TreeNode();
@@ -1532,7 +1443,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testHyperlinkEmpty() throws Exception
+ @Test public void testHyperlinkEmpty() throws Exception
{
String name = mkName("url");
TreeNode root = new TreeNode();
@@ -1543,7 +1454,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testRuby() throws Exception
+ @Test public void testRuby() throws Exception
{
String name = mkName("ruby");
TreeNode root = new TreeNode();
@@ -1554,7 +1465,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testRubyEmpty() throws Exception
+ @Test public void testRubyEmpty() throws Exception
{
// BUG: #i91534#
String name = mkName("ruby");
@@ -1564,7 +1475,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testMeta() throws Exception
+ @Test public void testMeta() throws Exception
{
StringPair id = new StringPair("content.xml", mkName("id"));
TreeNode root = new TreeNode();
@@ -1576,7 +1487,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testMetaEmpty() throws Exception
+ @Test public void testMetaEmpty() throws Exception
{
StringPair id = new StringPair("content.xml", mkName("id"));
TreeNode root = new TreeNode();
@@ -1587,7 +1498,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testMetaField() throws Exception
+ @Test public void testMetaField() throws Exception
{
StringPair id = new StringPair("content.xml", mkName("id"));
TreeNode root = new TreeNode();
@@ -1599,7 +1510,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testMetaFieldEmpty() throws Exception
+ @Test public void testMetaFieldEmpty() throws Exception
{
StringPair id = new StringPair("content.xml", mkName("id"));
TreeNode root = new TreeNode();
@@ -1610,7 +1521,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testBookmark1() throws Exception
+ @Test public void testBookmark1() throws Exception
{
String name1 = mkName("mark");
String name2 = mkName("mark");
@@ -1626,7 +1537,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testBookmark2() throws Exception
+ @Test public void testBookmark2() throws Exception
{
String name1 = mkName("mark");
String name2 = mkName("mark");
@@ -1642,7 +1553,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testRefMark2() throws Exception
+ @Test public void testRefMark2() throws Exception
{
String name1 = mkName("refmark");
TreeNode root = new TreeNode();
@@ -1654,7 +1565,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testRefMark3() throws Exception
+ @Test public void testRefMark3() throws Exception
{
// BUG: #i107672# (non-deterministic; depends on pointer ordering)
String name1 = mkName("refmark");
@@ -1684,7 +1595,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testToxMark2() throws Exception
+ @Test public void testToxMark2() throws Exception
{
String name1 = mkName("toxmark");
TreeNode root = new TreeNode();
@@ -1695,7 +1606,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testToxMark3() throws Exception
+ @Test public void testToxMark3() throws Exception
{
// BUG: #i107672# (non-deterministic; depends on pointer ordering)
String name1 = mkName("toxmark");
@@ -1725,7 +1636,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testMarks1() throws Exception
+ @Test public void testMarks1() throws Exception
{
String name1 = mkName("bookmark");
String name2 = mkName("toxmark");
@@ -1744,7 +1655,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testMarks2() throws Exception
+ @Test public void testMarks2() throws Exception
{
String name1 = mkName("bookmark");
String name2 = mkName("refmark");
@@ -1767,7 +1678,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testMarks3() throws Exception
+ @Test public void testMarks3() throws Exception
{
String name1 = mkName("bookmark");
String name2 = mkName("refmark");
@@ -1789,7 +1700,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrameMark1() throws Exception
+ @Test public void testFrameMark1() throws Exception
{
String name1 = mkName("bookmark");
String name2 = mkName("frame");
@@ -1801,7 +1712,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrameMark2() throws Exception
+ @Test public void testFrameMark2() throws Exception
{
// BUG: #i98530#
String name1 = mkName("bookmark");
@@ -1814,7 +1725,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrameMark3() throws Exception
+ @Test public void testFrameMark3() throws Exception
{
String name1 = mkName("frame");
String name2 = mkName("bookmark");
@@ -1826,7 +1737,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrameMark4() throws Exception
+ @Test public void testFrameMark4() throws Exception
{
String name1 = mkName("frame");
String name2 = mkName("bookmark");
@@ -1838,7 +1749,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrames1() throws Exception
+ @Test public void testFrames1() throws Exception
{
String name1 = mkName("frame");
String name2 = mkName("frame");
@@ -1850,7 +1761,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrames2() throws Exception
+ @Test public void testFrames2() throws Exception
{
String name1 = mkName("frame");
String name2 = mkName("frame");
@@ -1862,7 +1773,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrames3() throws Exception
+ @Test public void testFrames3() throws Exception
{
String name1 = mkName("frame");
String name2 = mkName("frame");
@@ -1874,7 +1785,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrames4() throws Exception
+ @Test public void testFrames4() throws Exception
{
String name1 = mkName("frame");
String name2 = mkName("frame");
@@ -1886,7 +1797,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testFrames5() throws Exception
+ @Test public void testFrames5() throws Exception
{
String name1 = mkName("frame");
String name2 = mkName("frame");
@@ -1898,7 +1809,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testRubyHyperlink1() throws Exception
+ @Test public void testRubyHyperlink1() throws Exception
{
String name1 = mkName("ruby");
String name2 = mkName("url");
@@ -1911,7 +1822,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testRubyHyperlink2() throws Exception
+ @Test public void testRubyHyperlink2() throws Exception
{
String name1 = mkName("url");
String name2 = mkName("ruby");
@@ -1924,7 +1835,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testEnd1() throws Exception
+ @Test public void testEnd1() throws Exception
{
String name1 = mkName("bookmark");
String name2 = mkName("toxmark");
@@ -1937,7 +1848,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testEnd2() throws Exception
+ @Test public void testEnd2() throws Exception
{
String name1 = mkName("bookmark");
String name2 = mkName("frame");
@@ -1954,7 +1865,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testEnd3() throws Exception
+ @Test public void testEnd3() throws Exception
{
String name1 = mkName("ftn");
String name2 = mkName("toxmark");
@@ -1965,7 +1876,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testEnd4() throws Exception
+ @Test public void testEnd4() throws Exception
{
String name1 = mkName("bookmark");
String name2 = mkName("frame");
@@ -1977,7 +1888,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testEnd5() throws Exception
+ @Test public void testEnd5() throws Exception
{
String name1 = mkName("refmark");
String name2 = mkName("ruby");
@@ -1991,7 +1902,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testEmpty1() throws Exception
+ @Test public void testEmpty1() throws Exception
{
String name1 = mkName("refmark");
String name2 = mkName("toxmark");
@@ -2013,7 +1924,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testEmpty2() throws Exception
+ @Test public void testEmpty2() throws Exception
{
String name3 = mkName("bookmark");
String name4 = mkName("frame");
@@ -2027,7 +1938,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void testEmpty3() throws Exception
+ @Test public void testEmpty3() throws Exception
{
String name1 = mkName("refmark");
String name2 = mkName("toxmark");
@@ -2058,7 +1969,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root);
}
- public void test1() throws Exception
+ @Test public void test1() throws Exception
{
String name1 = mkName("frame");
String name2 = mkName("bookmark");
@@ -2085,7 +1996,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
attributes; if these ever become entities, they should not be split!
*/
- public void testRange1() throws Exception
+ @Test public void testRange1() throws Exception
{
String name1 = mkName("url");
RangeInserter inserter = new RangeInserter(m_xDoc);
@@ -2100,7 +2011,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRangeHyperlinkHyperlink() throws Exception
+ @Test public void testRangeHyperlinkHyperlink() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2159,7 +2070,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRangeHyperlinkRuby() throws Exception
+ @Test public void testRangeHyperlinkRuby() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2225,7 +2136,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRangeRubyHyperlink() throws Exception
+ @Test public void testRangeRubyHyperlink() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2282,7 +2193,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRangeRubyRuby() throws Exception
+ @Test public void testRangeRubyRuby() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2328,7 +2239,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRangeHyperlinkMeta() throws Exception
+ @Test public void testRangeHyperlinkMeta() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2394,7 +2305,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRangeRubyMeta() throws Exception
+ @Test public void testRangeRubyMeta() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2461,7 +2372,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRangeMetaHyperlink() throws Exception
+ @Test public void testRangeMetaHyperlink() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2518,7 +2429,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRangeMetaRuby() throws Exception
+ @Test public void testRangeMetaRuby() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2607,7 +2518,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRangeMetaMeta() throws Exception
+ @Test public void testRangeMetaMeta() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2618,7 +2529,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
TreeNode met2 = new MetaNode( mkId("id") );
try {
inserter.insertRange( new Range(0, 4, met2) );
- assure("testRangeMetaMeta: overlap left allowed", false);
+ fail("testRangeMetaMeta: overlap left allowed");
} catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
TreeNode root = new TreeNode()
.appendChild( new TextNode("123") )
@@ -2629,7 +2540,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
TreeNode met3 = new MetaNode( mkId("id") );
try {
inserter.insertRange( new Range(5/*-1*/, 8/*-1*/, met3) );
- assure("testRangeMetaMeta: overlap right allowed", false);
+ fail("testRangeMetaMeta: overlap right allowed");
} catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
root = new TreeNode()
.appendChild( new TextNode("123") )
@@ -2659,7 +2570,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRange2() throws Exception
+ @Test public void testRange2() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2729,7 +2640,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRange3() throws Exception
+ @Test public void testRange3() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2763,7 +2674,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRange4() throws Exception
+ @Test public void testRange4() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2817,7 +2728,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRange5() throws Exception
+ @Test public void testRange5() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2866,7 +2777,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRange6() throws Exception
+ @Test public void testRange6() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2906,7 +2817,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
doTest(root, false);
}
- public void testRange7() throws Exception
+ @Test public void testRange7() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123456789");
@@ -2947,7 +2858,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
/* TODO: test partial selection, test UNDO/REDO */
// #i109601# NestedTextContent and XChild
- public void testMetaXChild() throws Exception
+ @Test public void testMetaXChild() throws Exception
{
StringPair id1 = new StringPair("content.xml", mkName("id"));
StringPair id2 = new StringPair("content.xml", mkName("id"));
@@ -3022,12 +2933,12 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XTextContent xNTC = (XTextContent)
UnoRuntime.queryInterface(XTextContent.class, oNTC);
if (null == nestedTextContent[i]) {
- assure("unexpected NestedTextContent at: " + i, null == xNTC);
+ assertNull("unexpected NestedTextContent at: " + i, xNTC);
} else {
XMetadatable xMetadatable = (XMetadatable)
UnoRuntime.queryInterface(XMetadatable.class, xNTC);
StringPair xmlid = xMetadatable.getMetadataReference();
- assure("wrong NestedTextContent at: " + i,
+ assertTrue("wrong NestedTextContent at: " + i,
MetaNode.eq(nestedTextContent[i], xmlid));
}
xDocTextCursor.goRight((short)1, false);
@@ -3047,37 +2958,37 @@ public class TextPortionEnumerationTest extends ComplexTestCase
UnoRuntime.queryInterface(XChild.class, xMeta6);
try {
xChild1.setParent(xChild4);
- assure("setParent(): allowed?", false);
+ fail("setParent(): allowed?");
} catch (NoSupportException e) { /* expected */ }
- assure("getParent(): not null", xChild1.getParent() == null);
- assure("getParent(): not null", xChild2.getParent() == null);
- assure("getParent(): not null", xChild6.getParent() == null);
+ assertNull("getParent(): not null", xChild1.getParent());
+ assertNull("getParent(): not null", xChild2.getParent());
+ assertNull("getParent(): not null", xChild6.getParent());
{
Object xParent3 = xChild3.getParent();
- assure("getParent(): null", null != xParent3);
+ assertNotNull("getParent(): null", xParent3);
XMetadatable xMetadatable = (XMetadatable)
UnoRuntime.queryInterface(XMetadatable.class, xParent3);
StringPair xmlid = xMetadatable.getMetadataReference();
- assure("getParent(): wrong", MetaNode.eq(xmlid, id2));
+ assertTrue("getParent(): wrong", MetaNode.eq(xmlid, id2));
}{
Object xParent4 = xChild4.getParent();
- assure("getParent(): null", null != xParent4);
+ assertNotNull("getParent(): null", xParent4);
XMetadatable xMetadatable = (XMetadatable)
UnoRuntime.queryInterface(XMetadatable.class, xParent4);
StringPair xmlid = xMetadatable.getMetadataReference();
- assure("getParent(): wrong", MetaNode.eq(xmlid, id3));
+ assertTrue("getParent(): wrong", MetaNode.eq(xmlid, id3));
}{
Object xParent5 = xChild5.getParent();
- assure("getParent(): null", null != xParent5);
+ assertNotNull("getParent(): null", xParent5);
XMetadatable xMetadatable = (XMetadatable)
UnoRuntime.queryInterface(XMetadatable.class, xParent5);
StringPair xmlid = xMetadatable.getMetadataReference();
- assure("getParent(): wrong", MetaNode.eq(xmlid, id3));
+ assertTrue("getParent(): wrong", MetaNode.eq(xmlid, id3));
}
}
/** test SwXMeta XText interface */
- public void testMetaXText() throws Exception
+ @Test public void testMetaXText() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("12AB6789");
@@ -3099,113 +3010,106 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XText xText = (XText) UnoRuntime.queryInterface(XText.class, xMeta);
XText xParentText = xText.getText();
- assure("getText(): no parent", xParentText != null);
+ assertNotNull("getText(): no parent", xParentText);
XTextRange xStart = xText.getStart();
- assure("getStart(): no start", xStart != null);
+ assertNotNull("getStart(): no start", xStart);
XTextRange xEnd = xText.getEnd();
- assure("getEnd(): no end", xEnd != null);
-
- /*
- String string = xText.getString();
- assure("getString(): invalid string returned",
- string != null && "AB".equals(string) );
- */
+ assertNotNull("getEnd(): no end", xEnd);
xText.setString("45");
{
String string = xText.getString();
- assure("getString(): invalid string returned: " + string,
- string != null && "45".equals(string) );
+ assertEquals("getString(): invalid string returned",
+ "45", string);
}
XTextCursor xTextCursor = xText.createTextCursor();
- assure("createTextCursor(): failed", xTextCursor != null);
+ assertNotNull("createTextCursor(): failed", xTextCursor);
try {
xText.createTextCursorByRange(null);
- assure("createTextCursorByRange(): null allowed?", false);
+ fail("createTextCursorByRange(): null allowed?");
} catch (RuntimeException e) { /* expected */ }
XTextCursor xTextCursorStart = xText.createTextCursorByRange(xStart);
- assure("createTextCursorByRange(): failed for start",
- xTextCursorStart != null);
+ assertNotNull("createTextCursorByRange(): failed for start",
+ xTextCursorStart);
XTextCursor xTextCursorEnd = xText.createTextCursorByRange(xEnd);
- assure("createTextCursorByRange(): failed for end",
- xTextCursorEnd != null);
+ assertNotNull("createTextCursorByRange(): failed for end",
+ xTextCursorEnd);
// move outside meta
xDocTextCursor.gotoStart(false);
try {
xText.insertString(null, "foo", false);
- assure("insertString(): null allowed?", false);
+ fail("insertString(): null allowed?");
} catch (RuntimeException e) { /* expected */ }
try {
xText.insertString(xDocTextCursor, "foo", false);
- assure("insertString(): cursor outside allowed?", false);
+ fail("insertString(): cursor outside allowed?");
} catch (RuntimeException e) { /* expected */ }
xStart = xText.getStart();
xText.insertString(xStart, "A", false);
{
String string = xText.getString();
- assure("getString(): invalid string returned: " + string,
- string != null && "A45".equals(string) );
+ assertEquals("getString(): invalid string returned",
+ "A45", string);
}
xText.insertString(xEnd, "B", false);
{
String string = xText.getString();
- assure("getString(): invalid string returned: " + string,
- string != null && "A45B".equals(string) );
+ assertEquals("getString(): invalid string returned",
+ "A45B", string);
}
try {
xText.insertControlCharacter(null, HARD_HYPHEN, false);
- assure("insertControlCharacter(): null allowed?", false);
+ fail("insertControlCharacter(): null allowed?");
} catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
xStart = xText.getStart();
try {
xText.insertControlCharacter(xDocTextCursor, HARD_HYPHEN, false);
- assure("insertControlCharacter(): cursor outside allowed?", false);
+ fail("insertControlCharacter(): cursor outside allowed?");
} catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
xText.insertControlCharacter(xStart, HARD_HYPHEN, false);
{
String string = xText.getString();
- assure("getString(): invalid string returned: " + string,
- string != null && ('\u2011' + "A45B").equals(string) );
+ assertEquals("getString(): invalid string returned",
+ '\u2011' + "A45B", string);
}
xText.insertControlCharacter(xEnd, HARD_HYPHEN, false);
{
String string = xText.getString();
- assure("getString(): invalid string returned: " + string,
- string != null &&
- ('\u2011' + "A45B" + '\u2011').equals(string) );
+ assertEquals("getString(): invalid string returned",
+ '\u2011' + "A45B" + '\u2011', string);
}
xText.setString("45");
try {
xText.insertTextContent(null, xMeta, false);
- assure("insertTextContent(): null range allowed?", false);
+ fail("insertTextContent(): null range allowed?");
} catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
try {
xText.insertTextContent(xStart, null, false);
- assure("insertTextContent(): null content allowed?", false);
+ fail("insertTextContent(): null content allowed?");
} catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
try {
xText.insertTextContent(xDocTextCursor, xMeta, false);
- assure("insertTextContent(): cursor outside allowed?", false);
+ fail("insertTextContent(): cursor outside allowed?");
} catch (com.sun.star.lang.IllegalArgumentException e) { /* ignore */ }
TextFieldNode field1 = new TextFieldNode( "f1" );
@@ -3237,13 +3141,13 @@ public class TextPortionEnumerationTest extends ComplexTestCase
try {
xText.removeTextContent(null);
- assure("removeTextContent(): null content allowed?", false);
+ fail("removeTextContent(): null content allowed?");
} catch (RuntimeException e) { /* expected */ }
xText.removeTextContent(xField1);
XTextRange xAnchor = xMeta.getAnchor();
- assure("getAnchor(): null", xAnchor != null);
+ assertNotNull("getAnchor(): null", xAnchor);
// evil test case: insert ruby around meta
RubyNode ruby = new RubyNode( mkName("ruby") );
@@ -3263,31 +3167,31 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XEnumerationAccess xEA = (XEnumerationAccess)
UnoRuntime.queryInterface(XEnumerationAccess.class, xMeta);
XEnumeration xEnum = xEA.createEnumeration();
- assure("createEnumeration(): returns null", xEnum != null);
+ assertNotNull("createEnumeration(): returns null", xEnum);
{
- assure("hasNext(): first missing", xEnum.hasMoreElements());
+ assertTrue("hasNext(): first missing", xEnum.hasMoreElements());
Object xElement = xEnum.nextElement();
XTextRange xPortion = (XTextRange)
UnoRuntime.queryInterface(XTextRange.class, xElement);
XPropertySet xPropSet = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, xPortion);
String type = (String) xPropSet.getPropertyValue("TextPortionType");
- assure("first: not text: " + type, type.equals("Text"));
+ assertEquals("first: not text", "Text", type);
String txt = xPortion.getString();
- assure("first: text differs: " + txt, "45".equals(txt));
+ assertEquals("first: text differs", "45", txt);
}
{
- assure("hasNext(): second missing", xEnum.hasMoreElements());
+ assertTrue("hasNext(): second missing", xEnum.hasMoreElements());
Object xElement = xEnum.nextElement();
XTextRange xPortion = (XTextRange)
UnoRuntime.queryInterface(XTextRange.class, xElement);
XPropertySet xPropSet = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, xPortion);
String type = (String) xPropSet.getPropertyValue("TextPortionType");
- assure("second: not text", type.equals("TextField"));
+ assertEquals("second: not text", "TextField", type);
}
// no ruby end here!!!
- assure("hasNext(): more elements?", !xEnum.hasMoreElements());
+ assertFalse("hasNext(): more elements?", xEnum.hasMoreElements());
XComponent xComponent = (XComponent)
UnoRuntime.queryInterface(XComponent.class, xMeta);
@@ -3295,14 +3199,14 @@ public class TextPortionEnumerationTest extends ComplexTestCase
try {
XTextCursor xCursor = xText.createTextCursor();
- assure("createTextCursor(): succeeds on disposed object?",
- xCursor == null);
+ assertNull("createTextCursor(): succeeds on disposed object?",
+ xCursor);
} catch (RuntimeException e) { /* expected */ }
}
/** check that cursor move methods move to positions in the meta,
but do not move to positions outside the meta. */
- public void testMetaXTextCursor() throws Exception
+ @Test public void testMetaXTextCursor() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("Text. 12 More text here.");
@@ -3323,30 +3227,30 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XText xText = (XText) UnoRuntime.queryInterface(XText.class, xMeta);
XTextRange xStart = xText.getStart();
- assure("getStart(): no start", xStart != null);
+ assertNotNull("getStart(): no start", xStart);
XTextRange xEnd = xText.getEnd();
- assure("getEnd(): no end", xEnd != null);
+ assertNotNull("getEnd(): no end", xEnd);
XTextCursor xTextCursor = xText.createTextCursor();
- assure("createTextCursor(): no cursor", xTextCursor != null);
+ assertNotNull("createTextCursor(): no cursor", xTextCursor);
// XTextCursor
boolean bSuccess = false;
xTextCursor.gotoStart(false);
xTextCursor.gotoEnd(false);
bSuccess = xTextCursor.goLeft((short)1, false);
- assure("goLeft(): failed", bSuccess);
+ assertTrue("goLeft(): failed", bSuccess);
bSuccess = xTextCursor.goLeft((short)1000, false);
- assure("goLeft(): succeeded", !bSuccess);
+ assertFalse("goLeft(): succeeded", bSuccess);
bSuccess = xTextCursor.goRight((short)1, false);
- assure("goRight(): failed", bSuccess);
+ assertTrue("goRight(): failed", bSuccess);
bSuccess = xTextCursor.goRight((short)1000, false);
- assure("goRight(): succeeded", !bSuccess);
+ assertFalse("goRight(): succeeded", bSuccess);
xTextCursor.gotoRange(xStart, false);
xTextCursor.gotoRange(xEnd, false);
try {
xTextCursor.gotoRange(xDocTextCursor, false);
- assure("gotoRange(): succeeded", false);
+ fail("gotoRange(): succeeded");
} catch (RuntimeException e) { /* expected */ }
// XWordCursor
@@ -3356,44 +3260,44 @@ public class TextPortionEnumerationTest extends ComplexTestCase
UnoRuntime.queryInterface(XWordCursor.class, xTextCursor);
bSuccess = xWordCursor.gotoNextWord(true);
- assure("gotoNextWord(): failed", bSuccess);
+ assertTrue("gotoNextWord(): failed", bSuccess);
{
String string = xTextCursor.getString();
- assure("gotoNextWord(): wrong string: " + string,
- "Two ".equals(string));
+ assertEquals("gotoNextWord(): wrong string",
+ "Two ", string);
}
bSuccess = xWordCursor.gotoNextWord(false);
- assure("gotoNextWord(): succeeded", !bSuccess);
+ assertFalse("gotoNextWord(): succeeded", bSuccess);
xTextCursor.collapseToEnd();
bSuccess = xWordCursor.gotoPreviousWord(true);
- assure("gotoPreviousWord(): failed", bSuccess);
+ assertTrue("gotoPreviousWord(): failed", bSuccess);
{
String string = xTextCursor.getString();
- assure("gotoPreviousWord(): wrong string: " + string,
- "words".equals(string));
+ assertEquals("gotoPreviousWord(): wrong string",
+ "words", string);
}
bSuccess = xWordCursor.gotoPreviousWord(false);
- assure("gotoPreviousWord(): succeeded", !bSuccess);
+ assertFalse("gotoPreviousWord(): succeeded", bSuccess);
bSuccess = xWordCursor.gotoEndOfWord(true);
- assure("gotoEndOfWord(): failed", bSuccess);
+ assertTrue("gotoEndOfWord(): failed", bSuccess);
{
String string = xTextCursor.getString();
- assure("gotoEndOfWord(): wrong string: " + string,
- "Two".equals(string));
+ assertEquals("gotoEndOfWord(): wrong string",
+ "Two", string);
}
xTextCursor.gotoEnd(false);
bSuccess = xWordCursor.gotoStartOfWord(true);
- assure("gotoStartOfWord(): failed", bSuccess);
+ assertTrue("gotoStartOfWord(): failed", bSuccess);
{
String string = xTextCursor.getString();
- assure("gotoStartOfWord(): wrong string: " + string,
- "words".equals(string));
+ assertEquals("gotoStartOfWord(): wrong string",
+ "words", string);
}
xText.setString("");
bSuccess = xWordCursor.gotoEndOfWord(false);
- assure("gotoEndOfWord(): succeeded", !bSuccess);
+ assertFalse("gotoEndOfWord(): succeeded", bSuccess);
bSuccess = xWordCursor.gotoStartOfWord(false);
- assure("gotoStartOfWord(): succeeded", !bSuccess);
+ assertFalse("gotoStartOfWord(): succeeded", bSuccess);
// XSentenceCursor
xText.setString("This is a sentence. Another sentence.");
@@ -3402,60 +3306,60 @@ public class TextPortionEnumerationTest extends ComplexTestCase
UnoRuntime.queryInterface(XSentenceCursor.class, xTextCursor);
bSuccess = xSentenceCursor.gotoNextSentence(true);
- assure("gotoNextSentence(): failed", bSuccess);
+ assertTrue("gotoNextSentence(): failed", bSuccess);
{
String string = xTextCursor.getString();
- assure("gotoNextSentence(): wrong string: " + string,
- "This is a sentence. ".equals(string));
+ assertEquals("gotoNextSentence(): wrong string",
+ "This is a sentence. ", string);
}
bSuccess = xSentenceCursor.gotoNextSentence(false);
- assure("gotoNextSentence(): succeeded", !bSuccess);
+ assertFalse("gotoNextSentence(): succeeded", bSuccess);
// FIXME:
// the sentence cursor seems to work differently than the word cursor
xText.setString("This is a sentence. Another sentence. Sentence 3.");
xTextCursor.gotoEnd(false);
bSuccess = xSentenceCursor.gotoPreviousSentence(true);
- assure("gotoPreviousSentence(): failed", bSuccess);
+ assertTrue("gotoPreviousSentence(): failed", bSuccess);
{
String string = xTextCursor.getString();
- assure("gotoPreviousSentence(): wrong string: " + string,
- "Another sentence. Sentence 3.".equals(string));
+ assertEquals("gotoPreviousSentence(): wrong string",
+ "Another sentence. Sentence 3.", string);
}
bSuccess = xSentenceCursor.gotoPreviousSentence(false);
- assure("gotoPreviousSentence(): succeeded", !bSuccess);
+ assertFalse("gotoPreviousSentence(): succeeded", bSuccess);
bSuccess = xSentenceCursor.gotoEndOfSentence(true);
- assure("gotoEndOfSentence(): failed", bSuccess);
+ assertTrue("gotoEndOfSentence(): failed", bSuccess);
{
String string = xTextCursor.getString();
- assure("gotoEndOfSentence(): wrong string: " + string,
- "This is a sentence.".equals(string));
+ assertEquals("gotoEndOfSentence(): wrong string",
+ "This is a sentence.", string);
}
xTextCursor.gotoEnd(false);
bSuccess = xSentenceCursor.gotoStartOfSentence(true);
- assure("gotoStartOfSentence(): failed", bSuccess);
+ assertTrue("gotoStartOfSentence(): failed", bSuccess);
{
String string = xTextCursor.getString();
- assure("gotoStartOfSentence(): wrong string: " + string,
- "Sentence 3.".equals(string));
+ assertEquals("gotoStartOfSentence(): wrong string",
+ "Sentence 3.", string);
}
xText.setString("");
bSuccess = xSentenceCursor.gotoEndOfSentence(false);
- assure("gotoEndOfSentence(): succeeded", !bSuccess);
+ assertFalse("gotoEndOfSentence(): succeeded", bSuccess);
bSuccess = xSentenceCursor.gotoStartOfSentence(false);
- assure("gotoStartOfSentence(): succeeded", !bSuccess);
+ assertFalse("gotoStartOfSentence(): succeeded", bSuccess);
XParagraphCursor xParagraphCursor = (XParagraphCursor)
UnoRuntime.queryInterface(XParagraphCursor.class, xTextCursor);
// XParagraphCursor (does not make sense)
bSuccess = xParagraphCursor.gotoNextParagraph(false);
- assure("gotoNextParagraph(): succeeded", !bSuccess);
+ assertFalse("gotoNextParagraph(): succeeded", bSuccess);
bSuccess = xParagraphCursor.gotoPreviousParagraph(false);
- assure("gotoPreviousParagraph(): succeeded", !bSuccess);
+ assertFalse("gotoPreviousParagraph(): succeeded", bSuccess);
bSuccess = xParagraphCursor.gotoStartOfParagraph(false);
- assure("gotoStartOfParagraph(): succeeded", !bSuccess);
+ assertFalse("gotoStartOfParagraph(): succeeded", bSuccess);
bSuccess = xParagraphCursor.gotoEndOfParagraph(false);
- assure("gotoEndOfParagraph(): succeeded", !bSuccess);
+ assertFalse("gotoEndOfParagraph(): succeeded", bSuccess);
}
@@ -3469,7 +3373,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
throws Exception { }
}
- public void testMetaXTextAttachToxMark() throws Exception
+ @Test public void testMetaXTextAttachToxMark() throws Exception
{
doMetaXTextAttach( new AttachHelper()
{
@@ -3485,7 +3389,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
});
}
- public void testMetaXTextAttachRefMark() throws Exception
+ @Test public void testMetaXTextAttachRefMark() throws Exception
{
doMetaXTextAttach( new AttachHelper()
{
@@ -3501,7 +3405,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
});
}
- public void testMetaXTextAttachTextField() throws Exception
+ @Test public void testMetaXTextAttachTextField() throws Exception
{
doMetaXTextAttach( new AttachHelper()
{
@@ -3517,7 +3421,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
});
}
- public void testMetaXTextAttachFootnote() throws Exception
+ @Test public void testMetaXTextAttachFootnote() throws Exception
{
doMetaXTextAttach( new AttachHelper()
{
@@ -3533,7 +3437,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
});
}
- public void testMetaXTextAttachMeta() throws Exception
+ @Test public void testMetaXTextAttachMeta() throws Exception
{
doMetaXTextAttach( new AttachHelper()
{
@@ -3783,7 +3687,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
}
}
- public void testMetaFieldXTextField() throws Exception
+ @Test public void testMetaFieldXTextField() throws Exception
{
com.sun.star.rdf.XRepositorySupplier xModel =
(com.sun.star.rdf.XRepositorySupplier) UnoRuntime.queryInterface(
@@ -3821,12 +3725,12 @@ public class TextPortionEnumerationTest extends ComplexTestCase
xGraph.addStatement(xMetadatable, xOdfPrefix, xPrefix);
xGraph.addStatement(xMetadatable, xOdfSuffix, xSuffix);
- assure("getPresentation(): wrong",
- "fooabcbar".equals(xMetaField.getPresentation(false)));
+ assertEquals("getPresentation(): wrong",
+ "fooabcbar", xMetaField.getPresentation(false));
inserter.insertRange( new Range(0, 0, text) );
}
- public void testMetaFieldXPropertySet() throws Exception
+ @Test public void testMetaFieldXPropertySet() throws Exception
{
RangeInserter inserter = new RangeInserter(m_xDoc);
TreeNode text = new TextNode("123");
@@ -3842,32 +3746,32 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XPropertySet xPropertySet = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, xMetaField);
- assure("PropertySet: not supported?", xPropertySet != null);
+ assertNotNull("PropertySet: not supported?", xPropertySet);
XPropertySetInfo xPropertySetInfo = xPropertySet.getPropertySetInfo();
- assure("hasPropertyByName(\"NumberFormat\"):",
- xPropertySetInfo.hasPropertyByName("NumberFormat"));
- assure("hasPropertyByName(\"IsFixedLanguage\"):",
- xPropertySetInfo.hasPropertyByName("IsFixedLanguage"));
+ assertTrue("hasPropertyByName(\"NumberFormat\"):",
+ xPropertySetInfo.hasPropertyByName("NumberFormat"));
+ assertTrue("hasPropertyByName(\"IsFixedLanguage\"):",
+ xPropertySetInfo.hasPropertyByName("IsFixedLanguage"));
int def = (Integer) xPropertySet.getPropertyValue("NumberFormat");
- log.println("NumberFormat: default is " + def);
+ System.out.println("NumberFormat: default is " + def);
short INT = com.sun.star.i18n.NumberFormatIndex.NUMBER_INT;
xPropertySet.setPropertyValue("NumberFormat", INT);
xPropertySet.setPropertyValue("IsFixedLanguage", true);
int format = (Integer) xPropertySet.getPropertyValue("NumberFormat");
- assure("NumberFormat: failed", format == INT);
+ assertEquals("NumberFormat: failed", INT, format);
boolean isFixed = (Boolean)
xPropertySet.getPropertyValue("IsFixedLanguage");
- assure("IsFixedLanguage: failed", isFixed);
+ assertTrue("IsFixedLanguage: failed", isFixed);
}
- public void testLoadStore() throws Exception
+ @Test public void testLoadStore() throws Exception
{
XTextDocument xComp = null;
String filename = "TESTMETA.odt";
String file;
try {
- file = util.utils.getFullTestURL(filename);
+ file = TestDocument.getUrl(filename);
xComp = doLoad(file);
if (xComp != null)
{
@@ -3885,21 +3789,21 @@ public class TextPortionEnumerationTest extends ComplexTestCase
private void doStore(XComponent xComp, String file) throws Exception
{
- log.println("Storing test document...");
+ System.out.println("Storing test document...");
XStorable xStor = (XStorable) UnoRuntime.queryInterface(
XStorable.class, xComp);
xStor.storeToURL(file, new PropertyValue[0]);
- log.println("...done");
+ System.out.println("...done");
}
public XTextDocument doLoad(String file) throws Exception
{
XComponent xComp = null;
- log.println("Loading test document...");
+ System.out.println("Loading test document...");
PropertyValue[] loadProps = new PropertyValue[1];
loadProps[0] = new PropertyValue();
@@ -3912,9 +3816,9 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XTextDocument xTextDoc = (XTextDocument)
UnoRuntime.queryInterface(XTextDocument.class, xComp);
- assure("cannot load: " + file, xTextDoc != null);
+ assertNotNull("cannot load: " + file, xTextDoc);
- log.println("...done");
+ System.out.println("...done");
return xTextDoc;
}
@@ -3923,7 +3827,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
{
XText xText = xTextDoc.getText();
- log.println("Checking meta(-field)s in loaded test document...");
+ System.out.println("Checking meta(-field)s in loaded test document...");
TreeNode root = new TreeNode()
.appendChild( new RubyNode("ruby1")
@@ -3968,16 +3872,16 @@ public class TextPortionEnumerationTest extends ComplexTestCase
.appendChild( new TextNode(" X X ") );
doTest(xTextDoc, root, false);
- log.println("...done");
+ System.out.println("...done");
}
- public void testLoadStoreXmlid() throws Exception
+ @Test public void testLoadStoreXmlid() throws Exception
{
XTextDocument xComp = null;
String filename = "TESTXMLID.odt";
String file;
try {
- file = util.utils.getFullTestURL(filename);
+ file = TestDocument.getUrl(filename);
xComp = doLoad(file);
if (xComp != null)
{
@@ -3997,7 +3901,7 @@ public class TextPortionEnumerationTest extends ComplexTestCase
{
XText xText = xTextDoc.getText();
- log.println("Checking bookmarks in loaded test document...");
+ System.out.println("Checking bookmarks in loaded test document...");
XRepositorySupplier xRS = (XRepositorySupplier)
UnoRuntime.queryInterface(XRepositorySupplier.class, xTextDoc);
@@ -4009,14 +3913,14 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XNameAccess xBookmarks = xBMS.getBookmarks();
XMetadatable xMark1 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xBookmarks.getByName("mk1"));
- assure("mark1",
+ assertTrue("mark1",
eq(xMark1.getMetadataReference(),
new StringPair("content.xml", "id90")));
XMetadatable xMark2 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xBookmarks.getByName("mk2"));
Pair<Statement[], Boolean> result = xRepo.getStatementRDFa(xMark2);
- assure("mark2", (result.First.length == 1)
+ assertTrue("mark2", (result.First.length == 1)
&& result.First[0].Subject.getStringValue().equals("uri:foo")
&& result.First[0].Predicate.getStringValue().equals("uri:bar")
&& result.First[0].Object.getStringValue().contains("a fooish bar")
@@ -4024,13 +3928,13 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XMetadatable xMark3 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xBookmarks.getByName("mk3"));
- assure("mark3",
+ assertTrue("mark3",
eq(xMark3.getMetadataReference(),
new StringPair("content.xml", "id91")));
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking sections in loaded test document...");
+ System.out.println("Checking sections in loaded test document...");
XTextSectionsSupplier xTSS = (XTextSectionsSupplier)
UnoRuntime.queryInterface(XTextSectionsSupplier.class, xTextDoc);
@@ -4039,58 +3943,58 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XMetadatable xSection1 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xSections.getByName("Section 1"));
- assure("idsection1", eq(xSection1.getMetadataReference(),
+ assertTrue("idsection1", eq(xSection1.getMetadataReference(),
new StringPair("content.xml", "idSection1")));
XMetadatable xSection2 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xSections.getByName("Section 2"));
- assure("idSection2", eq(xSection2.getMetadataReference(),
+ assertTrue("idSection2", eq(xSection2.getMetadataReference(),
new StringPair("content.xml", "idSection2")));
XMetadatable xSection3 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class,
xSections.getByName("Table of Contents1_Head"));
- assure("idTOCTitle", eq(xSection3.getMetadataReference(),
+ assertTrue("idTOCTitle", eq(xSection3.getMetadataReference(),
new StringPair("content.xml", "idTOCTitle")));
XMetadatable xSection4 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class,
xSections.getByName("Alphabetical Index1_Head"));
- assure("idAITitle", eq(xSection4.getMetadataReference(),
+ assertTrue("idAITitle", eq(xSection4.getMetadataReference(),
new StringPair("content.xml", "idAITitle")));
XMetadatable xSection5 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class,
xSections.getByName("Illustration Index1_Head"));
- assure("idIITitle", eq(xSection5.getMetadataReference(),
+ assertTrue("idIITitle", eq(xSection5.getMetadataReference(),
new StringPair("content.xml", "idIITitle")));
XMetadatable xSection6 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class,
xSections.getByName("Index of Tables1_Head"));
- assure("idIOTTitle", eq(xSection6.getMetadataReference(),
+ assertTrue("idIOTTitle", eq(xSection6.getMetadataReference(),
new StringPair("content.xml", "idIOTTitle")));
XMetadatable xSection7 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class,
xSections.getByName("User-Defined1_Head"));
- assure("idUDTitle", eq(xSection7.getMetadataReference(),
+ assertTrue("idUDTitle", eq(xSection7.getMetadataReference(),
new StringPair("content.xml", "idUDTitle")));
XMetadatable xSection8 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class,
xSections.getByName("Table of Objects1_Head"));
- assure("idTOOTitle", eq(xSection8.getMetadataReference(),
+ assertTrue("idTOOTitle", eq(xSection8.getMetadataReference(),
new StringPair("content.xml", "idTOOTitle")));
XMetadatable xSection9 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xSections.getByName("Bibliography1_Head"));
- assure("idBibTitle", eq(xSection9.getMetadataReference(),
+ assertTrue("idBibTitle", eq(xSection9.getMetadataReference(),
new StringPair("content.xml", "idBibTitle")));
- log.println("...done");
+ System.out.println("...done");
- log.println("Checking indexes in loaded test document...");
+ System.out.println("Checking indexes in loaded test document...");
XDocumentIndexesSupplier xDIS = (XDocumentIndexesSupplier)
UnoRuntime.queryInterface(XDocumentIndexesSupplier.class, xTextDoc);
@@ -4100,68 +4004,68 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XMetadatable xIndex1 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xIndexes.getByName("Table of Contents1"));
- assure("idTOC", eq(xIndex1.getMetadataReference(),
+ assertTrue("idTOC", eq(xIndex1.getMetadataReference(),
new StringPair("content.xml", "idTOC")));
XMetadatable xIndex1s = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xSections.getByName("Table of Contents1"));
- assure("idTOC", eq(xIndex1s.getMetadataReference(),
+ assertTrue("idTOC", eq(xIndex1s.getMetadataReference(),
new StringPair("content.xml", "idTOC")));
XMetadatable xIndex2 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xIndexes.getByName("Alphabetical Index1"));
- assure("idAI", eq(xIndex2.getMetadataReference(),
+ assertTrue("idAI", eq(xIndex2.getMetadataReference(),
new StringPair("content.xml", "idAI")));
XMetadatable xIndex2s = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xSections.getByName("Alphabetical Index1"));
- assure("idAI", eq(xIndex2s.getMetadataReference(),
+ assertTrue("idAI", eq(xIndex2s.getMetadataReference(),
new StringPair("content.xml", "idAI")));
XMetadatable xIndex3 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xIndexes.getByName("Illustration Index1"));
- assure("idII", eq(xIndex3.getMetadataReference(),
+ assertTrue("idII", eq(xIndex3.getMetadataReference(),
new StringPair("content.xml", "idII")));
XMetadatable xIndex3s = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xSections.getByName("Illustration Index1"));
- assure("idII", eq(xIndex3s.getMetadataReference(),
+ assertTrue("idII", eq(xIndex3s.getMetadataReference(),
new StringPair("content.xml", "idII")));
XMetadatable xIndex4 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xIndexes.getByName("Index of Tables1"));
- assure("idIOT", eq(xIndex4.getMetadataReference(),
+ assertTrue("idIOT", eq(xIndex4.getMetadataReference(),
new StringPair("content.xml", "idIOT")));
XMetadatable xIndex4s = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xSections.getByName("Index of Tables1"));
- assure("idIOT", eq(xIndex4s.getMetadataReference(),
+ assertTrue("idIOT", eq(xIndex4s.getMetadataReference(),
new StringPair("content.xml", "idIOT")));
XMetadatable xIndex5 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xIndexes.getByName("User-Defined1"));
- assure("idUD", eq(xIndex5.getMetadataReference(),
+ assertTrue("idUD", eq(xIndex5.getMetadataReference(),
new StringPair("content.xml", "idUD")));
XMetadatable xIndex5s = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xSections.getByName("User-Defined1"));
- assure("idUD", eq(xIndex5s.getMetadataReference(),
+ assertTrue("idUD", eq(xIndex5s.getMetadataReference(),
new StringPair("content.xml", "idUD")));
XMetadatable xIndex6 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xIndexes.getByName("Table of Objects1"));
- assure("idTOO", eq(xIndex6.getMetadataReference(),
+ assertTrue("idTOO", eq(xIndex6.getMetadataReference(),
new StringPair("content.xml", "idTOO")));
XMetadatable xIndex6s = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xSections.getByName("Table of Objects1"));
- assure("idTOO", eq(xIndex6s.getMetadataReference(),
+ assertTrue("idTOO", eq(xIndex6s.getMetadataReference(),
new StringPair("content.xml", "idTOO")));
XMetadatable xIndex7 = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xIndexes.getByName("Bibliography1"));
- assure("idBib", eq(xIndex7.getMetadataReference(),
+ assertTrue("idBib", eq(xIndex7.getMetadataReference(),
new StringPair("content.xml", "idBib")));
XMetadatable xIndex7s = (XMetadatable) UnoRuntime.queryInterface(
XMetadatable.class, xSections.getByName("Bibliography1"));
- assure("idBib", eq(xIndex7s.getMetadataReference(),
+ assertTrue("idBib", eq(xIndex7s.getMetadataReference(),
new StringPair("content.xml", "idBib")));
- log.println("...done");
+ System.out.println("...done");
}
static void close(XComponent i_comp)
@@ -4205,19 +4109,18 @@ public class TextPortionEnumerationTest extends ComplexTestCase
XEnumerationAccess xEA = (XEnumerationAccess)
UnoRuntime.queryInterface(XEnumerationAccess.class, xElement);
XEnumeration xEnum = xEA.createEnumeration();
- TreeNode outtree = new EnumConverter(this).convert(xEnum);
+ TreeNode outtree = new EnumConverter().convert(xEnum);
dumpTree(outtree, "O: ");
- boolean success = new FuzzyTester(log).doTest(intree, outtree);
- assure("test failed", success);
+ new FuzzyTester().doTest(intree, outtree);
}
private void dumpTree(TreeNode tree) { dumpTree(tree, "> "); }
private void dumpTree(TreeNode tree, String prefix)
{
- log.println(prefix + tree.toString());
+ System.out.println(prefix + tree.toString());
TreeNodeEnum children = tree.createEnumeration();
while (children.hasNext()) {
TreeNode node = children.next();
@@ -4246,6 +4149,16 @@ public class TextPortionEnumerationTest extends ComplexTestCase
((i_Left.Second).equals(i_Right.Second));
}
- public void assure(String str, boolean cond) { super.assure(str, cond); }
+ @BeforeClass public static void setUpConnection() throws Exception {
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
}
diff --git a/sw/qa/complex/writer/makefile.mk b/sw/qa/complex/writer/makefile.mk
deleted file mode 100644
index ae2a15f821dd..000000000000
--- a/sw/qa/complex/writer/makefile.mk
+++ /dev/null
@@ -1,108 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ = ..$/..$/..
-TARGET = PropertyValues
-PRJNAME = $(TARGET)
-PACKAGE = complex$/writer
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-JAVAFILES = CheckIndexedPropertyValues.java CheckNamedPropertyValues.java CheckCrossReferences.java CheckBookmarks.java CheckFlies.java TextPortionEnumerationTest.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-
-#----- make a jar from compiled files ------------------------------
-
-MAXLINELENGTH = 100000
-
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
-
-# --- Parameters for the test --------------------------------------
-
-# start an office if the parameter is set for the makefile
-.IF "$(OFFICE)" == ""
-CT_APPEXECCOMMAND =
-.ELSE
-CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
-.ENDIF
-
-# test base is java complex
-CT_TESTBASE = -TestBase java_complex
-
-# build package name with "." instead of $/
-CT_PACKAGE = -o $(PACKAGE:s\$/\.\)
-
-# start the runner application
-CT_APP = org.openoffice.Runner
-
-# --- Targets ------------------------------------------------------
-
-.IF "$(depend)" == ""
-ALL: ALLTAR
-.ELSE
-ALL: ALLDEP
-.ENDIF
-
-.INCLUDE : target.mk
-
-run: \
- CheckBookmarks \
- CheckCrossReferences \
- CheckIndexedPropertyValues \
- CheckNamedPropertyValues \
- CheckFlies \
- TextPortionEnumerationTest \
-
-
-RUN: run
-
-CheckIndexedPropertyValues:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) $(CT_PACKAGE).CheckIndexedPropertyValues
-
-
-CheckNamedPropertyValues:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) $(CT_PACKAGE).CheckNamedPropertyValues
-
-CheckCrossReferences:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) -tdoc $(PWD)$/testdocuments $(CT_PACKAGE).CheckCrossReferences
-
-CheckBookmarks:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) -tdoc $(PWD)$/testdocuments $(CT_PACKAGE).CheckBookmarks
-
-CheckFlies:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) -tdoc $(PWD)$/testdocuments $(CT_PACKAGE).CheckFlies
-
-TextPortionEnumerationTest:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) -tdoc $(PWD)$/testdocuments $(CT_PACKAGE).TextPortionEnumerationTest
-
diff --git a/sw/qa/core/Test-BigPtrArray.cxx b/sw/qa/core/Test-BigPtrArray.cxx
index b93ce8cbe9a9..a5699f0a386f 100644
--- a/sw/qa/core/Test-BigPtrArray.cxx
+++ b/sw/qa/core/Test-BigPtrArray.cxx
@@ -52,12 +52,12 @@ using namespace std;
namespace /* private */
{
- const ULONG NUM_ENTRIES = 10;
+ const sal_uLong NUM_ENTRIES = 10;
class BigPtrEntryMock : public BigPtrEntry
{
public:
- BigPtrEntryMock(ULONG count) : count_(count)
+ BigPtrEntryMock(sal_uLong count) : count_(count)
{
}
@@ -65,26 +65,26 @@ namespace /* private */
{
}
- ULONG getCount() const
+ sal_uLong getCount() const
{
return count_;
}
- void setCount(ULONG newCount)
+ void setCount(sal_uLong newCount)
{
count_ = newCount;
}
- ULONG Position() const
+ sal_uLong Position() const
{
return GetPos();
}
private:
- ULONG count_;
+ sal_uLong count_;
};
- BOOL AddToCount(const ElementPtr& rElem, void* pArgs)
+ sal_Bool AddToCount(const ElementPtr& rElem, void* pArgs)
{
BigPtrEntryMock* const pbem = static_cast<BigPtrEntryMock* const>(rElem);
pbem->setCount(pbem->getCount() + *((int*)pArgs));
@@ -96,9 +96,9 @@ namespace /* private */
(void)bparr;
}
- void fillBigPtrArray(BigPtrArray& bparr, ULONG numEntries)
+ void fillBigPtrArray(BigPtrArray& bparr, sal_uLong numEntries)
{
- for (ULONG i = 0; i < numEntries; i++)
+ for (sal_uLong i = 0; i < numEntries; i++)
bparr.Insert(new BigPtrEntryMock(i), bparr.Count());
}
@@ -109,7 +109,7 @@ namespace /* private */
bool checkElementPositions(const BigPtrArray& bparr)
{
- for (ULONG i = 0; i < bparr.Count(); i++)
+ for (sal_uLong i = 0; i < bparr.Count(); i++)
{
if (static_cast<BigPtrEntryMock*>(bparr[i])->Position() != i)
return false;
@@ -119,7 +119,7 @@ namespace /* private */
void releaseBigPtrArrayContent(BigPtrArray& bparr)
{
- for (ULONG i = 0; i < bparr.Count(); i++)
+ for (sal_uLong i = 0; i < bparr.Count(); i++)
delete bparr[i];
}
@@ -160,9 +160,9 @@ public:
BigPtrArray bparr;
- for (ULONG i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
- ULONG oldCount = bparr.Count();
+ sal_uLong oldCount = bparr.Count();
bparr.Insert(new BigPtrEntryMock(i), 0);
CPPUNIT_ASSERT_MESSAGE
(
@@ -173,7 +173,7 @@ public:
RTL_LOGFILE_CONTEXT_TRACE(logFile, "END: test_insert_entries_at_front");
- for (ULONG i = 0, j = NUM_ENTRIES - 1; i < NUM_ENTRIES; i++, j--)
+ for (sal_uLong i = 0, j = NUM_ENTRIES - 1; i < NUM_ENTRIES; i++, j--)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -203,7 +203,7 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- ULONG oldCount = bparr.Count();
+ sal_uLong oldCount = bparr.Count();
bparr.Insert(new BigPtrEntryMock(NUM_ENTRIES), bparr.Count() / 2);
@@ -236,9 +236,9 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- ULONG oldCount = bparr.Count();
+ sal_uLong oldCount = bparr.Count();
- for (ULONG i = 0, j = -5; i < 5; i++, j++)
+ for (sal_uLong i = 0, j = -5; i < 5; i++, j++)
bparr.Insert(new BigPtrEntryMock(j), i);
RTL_LOGFILE_CONTEXT_TRACE(logFile, "END: test_insert_at_already_used_index");
@@ -249,7 +249,7 @@ public:
(oldCount + 5 == bparr.Count())
);
- for (ULONG i = 0, j = -5; i < bparr.Count(); i++, j++)
+ for (sal_uLong i = 0, j = -5; i < bparr.Count(); i++, j++)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -277,7 +277,7 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- ULONG oldCount = bparr.Count();
+ sal_uLong oldCount = bparr.Count();
bparr.Insert(new BigPtrEntryMock(NUM_ENTRIES), bparr.Count());
CPPUNIT_ASSERT_MESSAGE
@@ -307,9 +307,9 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- for (ULONG i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
- ULONG oldCount = bparr.Count();
+ sal_uLong oldCount = bparr.Count();
delete bparr[0]; // release content
bparr.Remove(0); // remove item from container
@@ -320,7 +320,7 @@ public:
(oldCount - 1 == bparr.Count())
);
- for (ULONG j = 0, k = i + 1; j < bparr.Count(); j++, k++)
+ for (sal_uLong j = 0, k = i + 1; j < bparr.Count(); j++, k++)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -352,7 +352,7 @@ public:
for (int i = NUM_ENTRIES - 1; i >= 0; i--)
{
- ULONG oldCount = bparr.Count();
+ sal_uLong oldCount = bparr.Count();
delete bparr[i];
bparr.Remove(i);
@@ -362,7 +362,7 @@ public:
(oldCount - 1 == bparr.Count())
);
- for (ULONG j = 0; j < bparr.Count(); j++)
+ for (sal_uLong j = 0; j < bparr.Count(); j++)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -394,8 +394,8 @@ public:
while (bparr.Count())
{
- ULONG oldCount = bparr.Count();
- ULONG oldElement = static_cast<BigPtrEntryMock*>(bparr[bparr.Count() / 2])->getCount();
+ sal_uLong oldCount = bparr.Count();
+ sal_uLong oldElement = static_cast<BigPtrEntryMock*>(bparr[bparr.Count() / 2])->getCount();
delete bparr[bparr.Count() / 2];
bparr.Remove(bparr.Count() / 2);
@@ -406,7 +406,7 @@ public:
(oldCount - 1 == bparr.Count())
);
- for (ULONG i = 0; i < bparr.Count(); i++)
+ for (sal_uLong i = 0; i < bparr.Count(); i++)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -437,10 +437,10 @@ public:
while(bparr.Count())
{
- ULONG nRemove = (bparr.Count() > 3) ? 3 : bparr.Count();
- ULONG oldCount = bparr.Count();
+ sal_uLong nRemove = (bparr.Count() > 3) ? 3 : bparr.Count();
+ sal_uLong oldCount = bparr.Count();
- for (ULONG i = 0; i < nRemove; i++)
+ for (sal_uLong i = 0; i < nRemove; i++)
delete bparr[i];
bparr.Remove(0, nRemove);
@@ -491,13 +491,13 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- for (ULONG i = 0; i < NUM_ENTRIES - 1; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES - 1; i++)
{
bparr.Move(i, i + 2);
dumpBigPtrArray(bparr);
}
- for (ULONG i = 0; i < (NUM_ENTRIES - 1); i++)
+ for (sal_uLong i = 0; i < (NUM_ENTRIES - 1); i++)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -542,7 +542,7 @@ public:
static_cast<BigPtrEntryMock*>(bparr[0])->getCount() == (NUM_ENTRIES - 1)
);
- for (ULONG i = 1; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 1; i < NUM_ENTRIES; i++)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -569,14 +569,14 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- for (ULONG i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
bparr.Move(i, i);
}
dumpBigPtrArray(bparr);
- for (ULONG i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -604,14 +604,14 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- for (ULONG i = 0, j = NUM_ENTRIES - 1; i < NUM_ENTRIES; i++, j--)
+ for (sal_uLong i = 0, j = NUM_ENTRIES - 1; i < NUM_ENTRIES; i++, j--)
{
delete bparr[i];
bparr.Replace(i, new BigPtrEntryMock(j));
dumpBigPtrArray(bparr);
}
- for (ULONG i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -641,7 +641,7 @@ public:
int addCount = 1;
bparr.ForEach(AddToCount, &addCount);
- for (ULONG i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
CPPUNIT_ASSERT_MESSAGE
(
@@ -663,10 +663,10 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- ULONG addCount = 1;
+ sal_uLong addCount = 1;
bparr.ForEach(0, NUM_ENTRIES / 2, AddToCount, &addCount);
- ULONG i = 0;
+ sal_uLong i = 0;
for (/* */; i < NUM_ENTRIES / 2; i++)
{
CPPUNIT_ASSERT_MESSAGE
@@ -701,7 +701,7 @@ public:
int addCount = 1;
bparr.ForEach(NUM_ENTRIES / 2, NUM_ENTRIES, AddToCount, &addCount);
- ULONG i = 0;
+ sal_uLong i = 0;
for (/* */; i < NUM_ENTRIES / 2; i++)
{
CPPUNIT_ASSERT_MESSAGE
@@ -733,10 +733,10 @@ public:
fillBigPtrArray(bparr, NUM_ENTRIES);
dumpBigPtrArray(bparr);
- ULONG addCount = 1;
+ sal_uLong addCount = 1;
bparr.ForEach(0, 0, AddToCount, &addCount);
- for (ULONG i = 0; i < NUM_ENTRIES; i++)
+ for (sal_uLong i = 0; i < NUM_ENTRIES; i++)
{
CPPUNIT_ASSERT_MESSAGE
(
diff --git a/sw/qa/core/bigpointerarray-new.cxx b/sw/qa/core/bigpointerarray-new.cxx
index e376fb53003f..aee3e2e4807e 100644
--- a/sw/qa/core/bigpointerarray-new.cxx
+++ b/sw/qa/core/bigpointerarray-new.cxx
@@ -37,19 +37,19 @@ BigPtrArray::BigPtrArray()
//container_.reserve(1000);
}
-ULONG BigPtrArray::Count() const
+sal_uLong BigPtrArray::Count() const
{
return container_.size();
}
-void BigPtrArray::Move(ULONG fromPos, ULONG toPos)
+void BigPtrArray::Move(sal_uLong fromPos, sal_uLong toPos)
{
DBG_ASSERT(fromPos < container_.size() && toPos < container_.size(), "BigPtrArray.Move precondition violation");
Insert(container_[fromPos], toPos);
Remove(toPos < fromPos ? fromPos + 1 : fromPos, 1);
}
-void BigPtrArray::ForEach(ULONG fromPos, ULONG toPos, FnForEach fn, void* pArgs)
+void BigPtrArray::ForEach(sal_uLong fromPos, sal_uLong toPos, FnForEach fn, void* pArgs)
{
DBG_ASSERT(fromPos < toPos && fromPos < container_.size() && toPos < container_.size(), "BigPtrArray::ForEach precondition violation");
Container_t::const_iterator iter = container_.begin() + fromPos;
@@ -66,13 +66,13 @@ void BigPtrArray::ForEach(FnForEach fn, void* pArgs)
fn(*iter, pArgs);
}
-ElementPtr BigPtrArray::operator[](ULONG pos) const
+ElementPtr BigPtrArray::operator[](sal_uLong pos) const
{
DBG_ASSERT(pos < container_.size(), "BigPtrArray::operator[] precondition violation");
return container_[pos];
}
-void BigPtrArray::Insert(const ElementPtr& rElem, ULONG pos)
+void BigPtrArray::Insert(const ElementPtr& rElem, sal_uLong pos)
{
DBG_ASSERT(pos <= container_.size(), "BigPtrArray::Insert precondition violation");
@@ -88,14 +88,14 @@ void BigPtrArray::Insert(const ElementPtr& rElem, ULONG pos)
}
}
-void BigPtrArray::Remove( ULONG pos, ULONG n )
+void BigPtrArray::Remove( sal_uLong pos, sal_uLong n )
{
DBG_ASSERT((pos < container_.size()) && ((container_.begin() + pos + n) < container_.end()), "BigPtrArray.Remove precondition violation")
container_.erase(container_.begin() + pos, container_.begin() + pos + n);
FixElementIndizes(container_.begin(), container_.end());
}
-void BigPtrArray::Replace(ULONG pos, const ElementPtr& rElem)
+void BigPtrArray::Replace(sal_uLong pos, const ElementPtr& rElem)
{
DBG_ASSERT(pos < container_.size(), "BigPtrArray::Replace precondition violation");
rElem->pBigPtrArray_ = this;
diff --git a/sw/qa/core/bigpointerarray-new.hxx b/sw/qa/core/bigpointerarray-new.hxx
index 13b6e3c3c3f9..2f2792d40b92 100644
--- a/sw/qa/core/bigpointerarray-new.hxx
+++ b/sw/qa/core/bigpointerarray-new.hxx
@@ -42,7 +42,7 @@ class BigPtrEntry
{
friend class BigPtrArray;
BigPtrArray* pBigPtrArray_;
- ULONG pos_;
+ sal_uLong pos_;
protected:
BigPtrEntry() : pBigPtrArray_(0), pos_(0)
@@ -51,7 +51,7 @@ protected:
virtual ~BigPtrEntry()
{}
- ULONG GetPos() const
+ sal_uLong GetPos() const
{
return pos_;
}
@@ -63,7 +63,7 @@ protected:
};
typedef BigPtrEntry* ElementPtr;
-typedef BOOL (*FnForEach)(const ElementPtr&, void* pArgs);
+typedef sal_Bool (*FnForEach)(const ElementPtr&, void* pArgs);
/** A container abstraction
*/
@@ -80,7 +80,7 @@ public:
/** Return the number of entries inserted
into the array
*/
- ULONG Count() const;
+ sal_uLong Count() const;
/** Insert an Element into the array at a certain
position
@@ -94,7 +94,7 @@ public:
@pre (pos >= 0 && pos <= BigPtrArray.Count())
@post (((oldCount + 1) == BigPtrArray.Count()) && BigPtrArray[pos] == rElem)
*/
- void Insert(const ElementPtr& rElem, ULONG pos);
+ void Insert(const ElementPtr& rElem, sal_uLong pos);
/** Remove a specified number of elements starting at a certain position.
@@ -107,7 +107,7 @@ public:
@pre (pos < BigPtrArray.Count() && n <= BigPtrArray.Count())
@post ((oldCount - n) == BigPtrArray.Count())
*/
- void Remove(ULONG pos, ULONG n = 1);
+ void Remove(sal_uLong pos, sal_uLong n = 1);
/** Move an entry from a certain position to another on.
@@ -117,7 +117,7 @@ public:
@param to
[in]
*/
- void Move(ULONG fromPos, ULONG toPos);
+ void Move(sal_uLong fromPos, sal_uLong toPos);
/** Replace an entry at a certain position
@@ -130,7 +130,7 @@ public:
@pre pos < BigPtrArray.Count()
@post (oldCount == BigPtrArray.Count() && BigPtrArray[pos] == rElem)
*/
- void Replace(ULONG pos, const ElementPtr& rElem);
+ void Replace(sal_uLong pos, const ElementPtr& rElem);
/** Get the entry at a certain index
@@ -139,7 +139,7 @@ public:
@pre pos < BigPtrArray.Count()
*/
- ElementPtr operator[](ULONG pos) const;
+ ElementPtr operator[](sal_uLong pos) const;
/**
*/
@@ -147,7 +147,7 @@ public:
/**
*/
- void ForEach(ULONG fromPos, ULONG toPos, FnForEach fn, void* pArgs = NULL);
+ void ForEach(sal_uLong fromPos, sal_uLong toPos, FnForEach fn, void* pArgs = NULL);
private:
diff --git a/sw/qa/core/filters-test.cxx b/sw/qa/core/filters-test.cxx
index 1b6877cac8ef..737c7bd3a1a5 100644
--- a/sw/qa/core/filters-test.cxx
+++ b/sw/qa/core/filters-test.cxx
@@ -68,7 +68,7 @@ SO2_IMPL_REF(SwDocShell)
using namespace ::com::sun::star;
-static USHORT aWndFunc(Window *, USHORT, const String &, const String &)
+static sal_uInt16 aWndFunc(Window *, sal_uInt16, const String &, const String &)
{
return ERRCODE_BUTTON_OK;
}
diff --git a/sw/qa/core/makefile.mk b/sw/qa/core/makefile.mk
deleted file mode 100644
index c831e8722e2b..000000000000
--- a/sw/qa/core/makefile.mk
+++ /dev/null
@@ -1,217 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..$/..
-
-PRJNAME=sw
-TARGET=qa_unit
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-CFLAGSCXX += $(CPPUNIT_CFLAGS)
-
-SHL1OBJS=\
- $(SLO)$/Test-BigPtrArray.obj \
- $(SLO)$/bparr.obj
-
-SHL1TARGET=$(TARGET)
-SHL1STDLIBS=$(SALLIB) $(TOOLSLIB) $(CPPUNITLIB)
-
-SHL1IMPLIB= i$(SHL1TARGET)
-
-DEF1NAME =$(SHL1TARGET)
-
-SHL1VERSIONMAP = export.map
-
-# 2nd test ------------------------------------------------------------------
-
-SHL2OBJS=$(SLO)$/swdoc-test.obj
-SHL2TARGET=swdoctest
-SHL2STDLIBS+= \
- $(LNGLIB) \
- $(BASICLIB) \
- $(SFXLIB) \
- $(SVTOOLLIB) \
- $(SVLLIB) \
- $(SVXCORELIB) \
- $(EDITENGLIB) \
- $(SVXLIB) \
- $(BASEGFXLIB) \
- $(DRAWINGLAYERLIB) \
- $(VCLLIB) \
- $(CPPULIB) \
- $(CPPUHELPERLIB) \
- $(COMPHELPERLIB) \
- $(UCBHELPERLIB) \
- $(TKLIB) \
- $(VOSLIB) \
- $(SALLIB) \
- $(SALHELPERLIB) \
- $(TOOLSLIB) \
- $(I18NISOLANGLIB) \
- $(UNOTOOLSLIB) \
- $(SOTLIB) \
- $(XMLOFFLIB) \
- $(ICUUCLIB) \
- $(I18NUTILLIB) \
- $(AVMEDIALIB) \
- $(CPPUNITLIB)
-
-.IF "$(DBG_LEVEL)">="2"
-SHL2STDLIBS += $(LIBXML2LIB)
-.ENDIF
-
-SHL2IMPLIB= i$(SHL2TARGET)
-DEF2NAME =$(SHL2TARGET)
-SHL2VERSIONMAP = export.map
-
-# linking statically against sw parts
-SHL2LIBS=\
- $(SLB)$/swall.lib \
- $(SLB)$/core1.lib \
- $(SLB)$/core2.lib \
- $(SLB)$/core3.lib \
- $(SLB)$/core4.lib \
- $(SLB)$/filter.lib \
- $(SLB)$/ui1.lib \
- $(SLB)$/ui2.lib
-
-SHL3OBJS=$(SLO)$/filters-test.obj
-SHL3TARGET=swfilterstest
-SHL3STDLIBS+= \
- $(ISWLIB) \
- $(LNGLIB) \
- $(BASICLIB) \
- $(SFXLIB) \
- $(SVTOOLLIB) \
- $(SVLLIB) \
- $(SVXCORELIB) \
- $(EDITENGLIB) \
- $(SVXLIB) \
- $(BASEGFXLIB) \
- $(DRAWINGLAYERLIB) \
- $(VCLLIB) \
- $(CPPULIB) \
- $(CPPUHELPERLIB) \
- $(COMPHELPERLIB) \
- $(UCBHELPERLIB) \
- $(TKLIB) \
- $(VOSLIB) \
- $(SALLIB) \
- $(SALHELPERLIB) \
- $(TOOLSLIB) \
- $(I18NISOLANGLIB) \
- $(UNOTOOLSLIB) \
- $(SOTLIB) \
- $(XMLOFFLIB) \
- $(ICUUCLIB) \
- $(I18NUTILLIB) \
- $(AVMEDIALIB) \
- $(CPPUNITLIB)
-
-.IF "$(DBG_LEVEL)">="2"
-SHL3STDLIBS += $(LIBXML2LIB)
-.ENDIF
-
-SHL3IMPLIB= i$(SHL3TARGET)
-DEF3NAME =$(SHL3TARGET)
-SHL3VERSIONMAP = export.map
-
-# END ------------------------------------------------------------------
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.IF "$(OS)" == "WNT"
-my_file = file:///
-.ELSE
-my_file = file://
-.END
-
-ALLTAR: test
-
-$(MISC)$/$(TARGET)$/types.rdb .ERRREMOVE : $(SOLARBINDIR)$/types.rdb
- $(MKDIRHIER) $(@:d)
- $(GNUCOPY) $? $@
-
-$(MISC)/$(TARGET)/udkapi.rdb .ERRREMOVE : $(SOLARBINDIR)$/udkapi.rdb
- $(MKDIRHIER) $(@:d)
- $(GNUCOPY) $? $@
-
-#Make a services.rdb with the services we know we need to get up and running
-$(MISC)/$(TARGET)/services.rdb .ERRREMOVE : $(MISC)/$(TARGET)/udkapi.rdb makefile.mk
- $(MKDIRHIER) $(@:d)
- $(REGCOMP) -register -br $(MISC)/$(TARGET)/udkapi.rdb -r $@ -wop \
- -c $(DLLPRE)sw$(DLLPOSTFIX)$(DLLPOST) \
- -c $(DLLPRE)fileacc$(DLLPOST) \
- -c $(DLLPRE)fwk$(DLLPOSTFIX)$(DLLPOST) \
- -c $(DLLPRE)sfx$(DLLPOSTFIX)$(DLLPOST) \
- -c $(DLLPRE)ucb1$(DLLPOST) \
- -c $(DLLPRE)ucpfile1$(DLLPOST) \
- -c $(DLLPRE)unoxml$(DLLPOSTFIX)$(DLLPOST) \
- -c $(DLLPRE)comphelp$(COMPHLP_MAJOR)$(COMID)$(DLLPOST) \
- -c $(DLLPRE)xstor$(DLLPOST) \
- -c $(DLLPRE)package2$(DLLPOST) \
- -c $(DLLPRE)xof$(DLLPOSTFIX)$(DLLPOST) \
- -c $(DLLPRE)utl$(DLLPOSTFIX)$(DLLPOST) \
- -c stocservices.uno$(DLLPOST) \
- -c reflection.uno$(DLLPOST) \
- -c i18npool.uno$(DLLPOST) \
- -c sax.uno$(DLLPOST)
-
-#Tweak things so that we use the .res files in the solver
-STAR_RESOURCEPATH:=$(PWD)/$(BIN)$(PATH_SEPERATOR)$(SOLARBINDIR)
-.EXPORT : STAR_RESOURCEPATH
-
-test .PHONY: $(SHL1TARGETN) $(SHL2TARGETN) $(SHL3TARGETN) $(MISC)/$(TARGET)/services.rdb $(MISC)$/$(TARGET)$/types.rdb $(MISC)/$(TARGET)/udkapi.rdb
- echo "$(STAR_RESOURCEPATH)"
- @echo ----------------------------------------------------------
- @echo - start unit test \#1 on library $(SHL1TARGETN)
- @echo ----------------------------------------------------------
- $(CPPUNITTESTER) $(SHL1TARGETN)
- @echo ----------------------------------------------------------
- @echo - start unit test \#2 on library $(SHL2TARGETN)
- @echo ----------------------------------------------------------
- $(CPPUNITTESTER) $(SHL2TARGETN) -headless -invisible \
- -env:UNO_SERVICES=$(my_file)$(PWD)/$(MISC)/$(TARGET)/services.rdb \
- -env:UNO_TYPES="$(my_file)$(PWD)/$(MISC)/$(TARGET)/types.rdb $(my_file)$(PWD)/$(MISC)/$(TARGET)/udkapi.rdb" \
- -env:OOO_BASE_DIR="$(my_file)$(PWD)/$(MISC)/$(TARGET)" \
- -env:BRAND_BASE_DIR="$(my_file)$(PWD)/$(MISC)/$(TARGET)" \
- -env:UNO_USER_PACKAGES_CACHE="$(my_file)$(PWD)/$(MISC)/$(TARGET)"
- @echo ----------------------------------------------------------
- @echo - start unit test \#3 on library $(SHL3TARGETN)
- @echo ----------------------------------------------------------
- $(CPPUNITTESTER) $(SHL3TARGETN) -headless -invisible \
- -env:UNO_SERVICES=$(my_file)$(PWD)/$(MISC)/$(TARGET)/services.rdb \
- -env:UNO_TYPES="$(my_file)$(PWD)/$(MISC)/$(TARGET)/types.rdb $(my_file)$(PWD)/$(MISC)/$(TARGET)/udkapi.rdb" \
- -env:OOO_BASE_DIR="$(my_file)$(PWD)/$(MISC)/$(TARGET)" \
- -env:BRAND_BASE_DIR="$(my_file)$(PWD)/$(MISC)/$(TARGET)" \
- -env:UNO_USER_PACKAGES_CACHE="$(my_file)$(PWD)/$(MISC)/$(TARGET)"
diff --git a/sw/qa/core/swdoc-test.cxx b/sw/qa/core/swdoc-test.cxx
index 8c1b43e752de..ae399b80b3d7 100644
--- a/sw/qa/core/swdoc-test.cxx
+++ b/sw/qa/core/swdoc-test.cxx
@@ -69,7 +69,7 @@ SO2_IMPL_REF(SwDocShell)
using namespace ::com::sun::star;
-static USHORT aWndFunc(Window *, USHORT, const String &, const String &)
+static sal_uInt16 aWndFunc(Window *, sal_uInt16, const String &, const String &)
{
return ERRCODE_BUTTON_OK;
}
diff --git a/sw/qa/unoapi/Test.java b/sw/qa/unoapi/Test.java
index e0311cc069bb..8a5b9b58fb95 100644
--- a/sw/qa/unoapi/Test.java
+++ b/sw/qa/unoapi/Test.java
@@ -27,6 +27,7 @@ package org.openoffice.sw.qa.unoapi;
import org.openoffice.Runner;
import org.openoffice.test.OfficeConnection;
+import org.openoffice.test.Argument;
import static org.junit.Assert.*;
public final class Test {
@@ -43,8 +44,8 @@ public final class Test {
@org.junit.Test public void test() {
assertTrue(
Runner.run(
- "-sce", "sw.sce", "-xcl", "knownissues.xcl", "-tdoc",
- "testdocuments", "-cs", connection.getDescription()));
+ "-sce", Argument.get("sce"), "-xcl", Argument.get("xcl"), "-tdoc",
+ Argument.get("tdoc"), "-cs", connection.getDescription()));
}
private final OfficeConnection connection = new OfficeConnection();
diff --git a/sw/qa/unoapi/knownissues.xcl b/sw/qa/unoapi/knownissues.xcl
index 4f8e3953dfcf..99d7c7f12881 100644
--- a/sw/qa/unoapi/knownissues.xcl
+++ b/sw/qa/unoapi/knownissues.xcl
@@ -170,3 +170,17 @@ sw.SwXTextEmbeddedObject::com::sun::star::document::XEmbeddedObjectSupplier
### i111332 ###
sw.XMLStylesExporter::com::sun::star::document::XFilter
+
+### i113020 ###
+sw.SwXTextEmbeddedObject::com::sun::star::beans::XPropertySet
+sw.SwXTextGraphicObject::com::sun::star::beans::XPropertySet
+sw.SwXTextFrame::com::sun::star::beans::XPropertySet
+
+### i113136 ###
+sw.SwAccessibleParagraphView::com::sun::star::accessibility::XAccessibleEditableText
+
+### i114205 ###
+sw.SwAccessibleParagraphView::com::sun::star::accessibility::XAccessibleText
+
+### i114889 ###
+sw.SwXTextViewCursor::com::sun::star::view::XScreenCursor
diff --git a/sw/qa/unoapi/lastCheck.txt b/sw/qa/unoapi/lastCheck.txt
deleted file mode 100644
index b222cd4719d7..000000000000
--- a/sw/qa/unoapi/lastCheck.txt
+++ /dev/null
@@ -1 +0,0 @@
-sw: checked with cws_tleamisc that is based on src680_m47
diff --git a/sw/qa/unoapi/makefile.mk b/sw/qa/unoapi/makefile.mk
deleted file mode 100644
index f5102c2c9c84..000000000000
--- a/sw/qa/unoapi/makefile.mk
+++ /dev/null
@@ -1,48 +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.
-#***********************************************************************/
-
-.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
-nothing .PHONY:
-.ELSE
-
-PRJ = ../..
-PRJNAME = sw
-TARGET = qa_unoapi
-
-.IF "$(OOO_JUNIT_JAR)" != ""
-PACKAGE = org/openoffice/sw/qa/unoapi
-JAVATESTFILES = Test.java
-JAVAFILES = $(JAVATESTFILES)
-JARFILES = OOoRunner.jar ridl.jar test.jar
-EXTRAJARFILES = $(OOO_JUNIT_JAR)
-.END
-
-.INCLUDE: settings.mk
-.INCLUDE: target.mk
-.INCLUDE: installationtest.mk
-
-ALLTAR : javatest
-
-.END
diff --git a/sw/qa/unoapi/sw.sce b/sw/qa/unoapi/sw.sce
index 0f1092af8a51..f6ae766af2d7 100644
--- a/sw/qa/unoapi/sw.sce
+++ b/sw/qa/unoapi/sw.sce
@@ -5,9 +5,9 @@
#i111197 -o sw.SwAccessibleDocumentPageView
#i86751 -o sw.SwAccessibleDocumentView
-o sw.SwAccessibleEndnoteView
--o sw.SwAccessibleFooterView
--o sw.SwAccessibleFootnoteView
--o sw.SwAccessibleHeaderView
+#i113142 -o sw.SwAccessibleFooterView
+#i114637 -o sw.SwAccessibleFootnoteView
+#i113142 -o sw.SwAccessibleHeaderView
#i89022 -o sw.SwAccessiblePageView
-o sw.SwAccessibleParagraphView
-o sw.SwAccessibleTableCellView
diff --git a/sw/sdi/_annotsh.sdi b/sw/sdi/_annotsh.sdi
index 4725f53f3655..d77df897a95a 100644
--- a/sw/sdi/_annotsh.sdi
+++ b/sw/sdi/_annotsh.sdi
@@ -34,12 +34,6 @@ interface _Annotation
StateMethod = GetNoteState ;
]
- FN_DELETE_NOTE
- [
- ExecMethod = NoteExec ;
- StateMethod = GetNoteState ;
- ]
-
FN_DELETE_NOTE_AUTHOR
[
ExecMethod = NoteExec ;
diff --git a/sw/sdi/_docsh.sdi b/sw/sdi/_docsh.sdi
index cd2d1f850090..1c5b0db4f062 100644
--- a/sw/sdi/_docsh.sdi
+++ b/sw/sdi/_docsh.sdi
@@ -132,6 +132,11 @@ interface BaseTextDocument
ExecMethod = Execute;
StateMethod = GetState;
]
+ SID_MAIL_PREPAREEXPORT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState;
+ ]
}
diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi
index e264aec28c28..6ea824eab6cf 100644
--- a/sw/sdi/_textsh.sdi
+++ b/sw/sdi/_textsh.sdi
@@ -325,12 +325,6 @@ interface BaseText
StateMethod = StateInsert ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
- SID_INSERT_APPLET // status(final|play)
- [
- ExecMethod = ExecInsert ;
- StateMethod = StateInsert ;
- DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
- ]
FN_INSERT_TABLE // status(final|play)
[
ExecMethod = ExecInsert ;
@@ -920,7 +914,7 @@ interface BaseText
ExecMethod = ExecField ;
StateMethod = StateField;
]
- FN_DELETE_NOTE
+ FN_DELETE_COMMENT
[
ExecMethod = ExecField ;
StateMethod = StateField;
diff --git a/sw/sdi/makefile.mk b/sw/sdi/makefile.mk
deleted file mode 100644
index cf87ea15c53b..000000000000
--- a/sw/sdi/makefile.mk
+++ /dev/null
@@ -1,107 +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.
-#
-#*************************************************************************
-
-# wx mktyplib nur unter Windows aufrufbar
-# VMB.386 und WXSRVR.EXE muessen geladen sein! (n:\mscwini\bin)
-
-PRJ=..
-
-PRJNAME=sw
-TARGET=swslots
-
-# --- Settings -----------------------------------------------------
-.IF "$(L10N_framework)"==""
-SVSDIINC=$(PRJ)$/source$/ui$/inc
-.ENDIF
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(L10N_framework)"==""
-SDI1NAME=$(TARGET)
-SDI1EXPORT=swriter
-
-# --- Files --------------------------------------------------------
-SVSDI1DEPEND= \
- $(SOLARINCXDIR)$/sfx2/sfx.sdi \
- $(SOLARINCXDIR)$/sfx2/sfxitems.sdi \
- $(SOLARINCXDIR)$/svx/svx.sdi \
- $(SOLARINCXDIR)$/svx/svxitems.sdi \
- $(SOLARINCXDIR)$/svx/xoitems.sdi \
- switems.sdi\
- swriter.sdi\
- _docsh.sdi\
- docsh.sdi\
- wdocsh.sdi\
- wrtapp.sdi\
- _basesh.sdi\
- basesh.sdi\
- _textsh.sdi\
- textsh.sdi\
- wtextsh.sdi\
- _drwbase.sdi\
- drwbassh.sdi\
- wdrwbase.sdi\
- formsh.sdi\
- _formsh.sdi\
- wformsh.sdi\
- drawsh.sdi\
- drwtxtsh.sdi\
- _listsh.sdi\
- listsh.sdi\
- wlistsh.sdi\
- _frmsh.sdi\
- frmsh.sdi\
- wfrmsh.sdi\
- _tabsh.sdi\
- tabsh.sdi\
- wtabsh.sdi\
- _grfsh.sdi\
- grfsh.sdi\
- wgrfsh.sdi\
- _olesh.sdi\
- olesh.sdi\
- wolesh.sdi\
- beziersh.sdi\
- _viewsh.sdi\
- viewsh.sdi\
- wviewsh.sdi\
- _mediash.sdi\
- mediash.sdi\
- _annotsh.sdi\
- annotsh.sdi\
- _navsh.sdi \
- navsh.sdi \
- swslots.hrc \
- $(INC)$/globals.hrc \
- $(INC)$/cmdid.h
-.ENDIF
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 7caa1c5bf66c..36c45e495cc4 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -10016,32 +10016,7 @@ SfxBoolItem SelectionModeDefault FN_SELECTION_MODE_DEFAULT
GroupId = GID_EDIT;
]
-//--------------------------------------------------------------------------
-SfxVoidItem DeleteNote FN_DELETE_NOTE
-()
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_EDIT;
-]
-
-SfxVoidItem ReplyNote FN_REPLY
+SfxVoidItem ReplyComment FN_REPLY
()
[
/* flags: */
diff --git a/sw/source/core/SwNumberTree/SwNodeNum.cxx b/sw/source/core/SwNumberTree/SwNodeNum.cxx
index cbd2d222f572..67a0110000c6 100644
--- a/sw/source/core/SwNumberTree/SwNodeNum.cxx
+++ b/sw/source/core/SwNumberTree/SwNodeNum.cxx
@@ -319,7 +319,7 @@ SwNumberTree::tSwNumTreeNumber SwNodeNum::GetStartValue() const
if (nLevel >= 0 && nLevel < MAXLEVEL)
{
- const SwNumFmt * pFmt = pRule->GetNumFmt( static_cast<USHORT>(nLevel));
+ const SwNumFmt * pFmt = pRule->GetNumFmt( static_cast<sal_uInt16>(nLevel));
if (pFmt)
aResult = pFmt->GetStart();
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index 9b6c86969073..7e13c561bc8b 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -316,7 +316,7 @@ SwAccessibleDocument::SwAccessibleDocument ( SwAccessibleMap* pInitMap ) :
if( pWin )
{
pWin->AddChildEventListener( LINK( this, SwAccessibleDocument, WindowChildEventListener ));
- USHORT nCount = pWin->GetChildCount();
+ sal_uInt16 nCount = pWin->GetChildCount();
for( sal_uInt16 i=0; i < nCount; i++ )
{
Window* pChildWin = pWin->GetChild( i );
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 7fa43ad1dbcb..91c2614deac0 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -2595,7 +2595,7 @@ SwAccessibleSelectedParas_Impl* SwAccessibleMap::_BuildSelectedParas()
pFEShell->IsObjSelected() == 0 ) )
{
// get cursor without updating an existing table cursor.
- pCrsr = pCrsrShell->GetCrsr( FALSE );
+ pCrsr = pCrsrShell->GetCrsr( sal_False );
}
}
}
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 6103177a92d6..87a59379fb38 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -147,7 +147,7 @@ sal_Int32 SwAccessibleParagraph::GetCaretPos()
{
// same node? Then check whether it's also within 'our' part
// of the paragraph
- USHORT nIndex = pPoint->nContent.GetIndex();
+ sal_uInt16 nIndex = pPoint->nContent.GetIndex();
if( GetPortionData().IsValidCorePosition( nIndex ) )
{
// Yes, it's us!
@@ -187,7 +187,7 @@ sal_Bool SwAccessibleParagraph::GetSelection(
{
// get SwPosition for my node
const SwTxtNode* pNode = GetTxtNode();
- ULONG nHere = pNode->GetIndex();
+ sal_uLong nHere = pNode->GetIndex();
// iterate over ring
SwPaM* pRingStart = pCrsr;
@@ -198,9 +198,9 @@ sal_Bool SwAccessibleParagraph::GetSelection(
{
// check whether nHere is 'inside' pCrsr
SwPosition* pStart = pCrsr->Start();
- ULONG nStartIndex = pStart->nNode.GetIndex();
+ sal_uLong nStartIndex = pStart->nNode.GetIndex();
SwPosition* pEnd = pCrsr->End();
- ULONG nEndIndex = pEnd->nNode.GetIndex();
+ sal_uLong nEndIndex = pEnd->nNode.GetIndex();
if( ( nHere >= nStartIndex ) &&
( nHere <= nEndIndex ) )
{
@@ -222,7 +222,7 @@ sal_Bool SwAccessibleParagraph::GetSelection(
// selection starts in this node:
// then check whether it's before or inside our part of
// the paragraph, and if so, get the proper position
- USHORT nCoreStart = pStart->nContent.GetIndex();
+ sal_uInt16 nCoreStart = pStart->nContent.GetIndex();
if( nCoreStart <
GetPortionData().GetFirstValidCorePosition() )
{
@@ -258,7 +258,7 @@ sal_Bool SwAccessibleParagraph::GetSelection(
// selection ends in this node: then select everything
// before our part of the node
- USHORT nCoreEnd = pEnd->nContent.GetIndex();
+ sal_uInt16 nCoreEnd = pEnd->nContent.GetIndex();
if( nCoreEnd >
GetPortionData().GetLastValidCorePosition() )
{
@@ -320,7 +320,7 @@ SwPaM* SwAccessibleParagraph::GetCursor( const bool _bForSelection )
!(pFESh->IsFrmSelected() || pFESh->IsObjSelected() > 0) )
{
// get the selection, and test whether it affects our text node
- pCrsr = pCrsrShell->GetCrsr( FALSE /* ??? */ );
+ pCrsr = pCrsrShell->GetCrsr( sal_False /* ??? */ );
}
}
@@ -544,7 +544,7 @@ void SwAccessibleParagraph::ClearPortionData()
}
-void SwAccessibleParagraph::ExecuteAtViewShell( UINT16 nSlot )
+void SwAccessibleParagraph::ExecuteAtViewShell( sal_uInt16 nSlot )
{
DBG_ASSERT( GetMap() != NULL, "no map?" );
ViewShell* pViewShell = GetMap()->GetShell();
@@ -578,8 +578,8 @@ SwXTextPortion* SwAccessibleParagraph::CreateUnoPortion(
IsValidRange(nStartIndex, nEndIndex, GetString().getLength()),
"please check parameters before calling this method" );
- USHORT nStart = GetPortionData().GetModelPosition( nStartIndex );
- USHORT nEnd = (nEndIndex == -1) ? (nStart + 1) :
+ sal_uInt16 nStart = GetPortionData().GetModelPosition( nStartIndex );
+ sal_uInt16 nEnd = (nEndIndex == -1) ? (nStart + 1) :
GetPortionData().GetModelPosition( nEndIndex );
// create UNO cursor
@@ -651,13 +651,13 @@ sal_Bool SwAccessibleParagraph::GetWordBoundary(
if( pBreakIt->GetBreakIter().is() )
{
// get locale for this position
- USHORT nModelPos = GetPortionData().GetModelPosition( nPos );
+ sal_uInt16 nModelPos = GetPortionData().GetModelPosition( nPos );
lang::Locale aLocale = pBreakIt->GetLocale(
GetTxtNode()->GetLang( nModelPos ) );
// which type of word are we interested in?
// (DICTIONARY_WORD includes punctuation, ANY_WORD doesn't.)
- const USHORT nWordType = i18n::WordType::ANY_WORD;
+ const sal_uInt16 nWordType = i18n::WordType::ANY_WORD;
// get word boundary, as the Break-Iterator sees fit.
rBound = pBreakIt->GetBreakIter()->getWordBoundary(
@@ -731,12 +731,12 @@ sal_Bool SwAccessibleParagraph::GetGlyphBoundary(
if( pBreakIt->GetBreakIter().is() )
{
// get locale for this position
- USHORT nModelPos = GetPortionData().GetModelPosition( nPos );
+ sal_uInt16 nModelPos = GetPortionData().GetModelPosition( nPos );
lang::Locale aLocale = pBreakIt->GetLocale(
GetTxtNode()->GetLang( nModelPos ) );
// get word boundary, as the Break-Iterator sees fit.
- const USHORT nIterMode = i18n::CharacterIteratorMode::SKIPCELL;
+ const sal_uInt16 nIterMode = i18n::CharacterIteratorMode::SKIPCELL;
sal_Int32 nDone = 0;
rBound.endPos = pBreakIt->GetBreakIter()->nextCharacters(
rText, nPos, aLocale, nIterMode, 1, nDone );
@@ -1472,9 +1472,9 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
{
const SwTxtNode* pTxtNode( GetTxtNode() );
SwPosition* pStartPos = new SwPosition( *pTxtNode );
- pStartPos->nContent.Assign( const_cast<SwTxtNode*>(pTxtNode), static_cast<USHORT>(nIndex) );
+ pStartPos->nContent.Assign( const_cast<SwTxtNode*>(pTxtNode), static_cast<sal_uInt16>(nIndex) );
SwPosition* pEndPos = new SwPosition( *pTxtNode );
- pEndPos->nContent.Assign( const_cast<SwTxtNode*>(pTxtNode), static_cast<USHORT>(nIndex+1) );
+ pEndPos->nContent.Assign( const_cast<SwTxtNode*>(pTxtNode), static_cast<sal_uInt16>(nIndex+1) );
pPaM = new SwPaM( *pStartPos, *pEndPos );
@@ -1490,7 +1490,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
// From the perspective of the a11y API the character attributes, which
// are set at the automatic paragraph style of the paragraph are treated
// as run attributes.
-// SwXTextCursor::GetCrsrAttr( *pPaM, aSet, TRUE, TRUE );
+// SwXTextCursor::GetCrsrAttr( *pPaM, aSet, sal_True, sal_True );
// get character attributes from automatic paragraph style and merge these into <aSet>
{
const SwTxtNode* pTxtNode( GetTxtNode() );
@@ -1499,7 +1499,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
SfxItemSet aAutomaticParaStyleCharAttrs( pPaM->GetDoc()->GetAttrPool(),
RES_CHRATR_BEGIN, RES_CHRATR_END -1,
0 );
- aAutomaticParaStyleCharAttrs.Put( *(pTxtNode->GetpSwAttrSet()), FALSE );
+ aAutomaticParaStyleCharAttrs.Put( *(pTxtNode->GetpSwAttrSet()), sal_False );
aSet.Put( aAutomaticParaStyleCharAttrs );
}
}
@@ -1508,7 +1508,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
SfxItemSet aCharAttrsAtPaM( pPaM->GetDoc()->GetAttrPool(),
RES_CHRATR_BEGIN, RES_CHRATR_END -1,
0 );
- SwUnoCursorHelper::GetCrsrAttr(*pPaM, aCharAttrsAtPaM, TRUE, TRUE);
+ SwUnoCursorHelper::GetCrsrAttr(*pPaM, aCharAttrsAtPaM, sal_True, sal_True);
aSet.Put( aCharAttrsAtPaM );
}
// <--
@@ -1530,7 +1530,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
const SfxPoolItem* pItem( 0 );
// #i82637# - Found character attributes, whose value equals the value of
// the corresponding default character attributes, are excluded.
- if ( aSet.GetItemState( aPropIt->nWID, TRUE, &pItem ) == SFX_ITEM_SET )
+ if ( aSet.GetItemState( aPropIt->nWID, sal_True, &pItem ) == SFX_ITEM_SET )
{
uno::Any aVal;
pItem->QueryValue( aVal, aPropIt->nMemberId );
@@ -1633,12 +1633,12 @@ awt::Rectangle SwAccessibleParagraph::getCharacterBounds(
// get model position & prepare GetCharRect() arguments
SwCrsrMoveState aMoveState;
- aMoveState.bRealHeight = TRUE;
- aMoveState.bRealWidth = TRUE;
+ aMoveState.bRealHeight = sal_True;
+ aMoveState.bRealWidth = sal_True;
SwSpecialPos aSpecialPos;
SwTxtNode* pNode = const_cast<SwTxtNode*>( GetTxtNode() );
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
/* #i12332# FillSpecialPos does not accept nIndex ==
GetString().getLength(). In that case nPos is set to the
@@ -1730,7 +1730,7 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint )
DBG_ASSERT( GetFrm()->IsTxtFrm(), "The text frame has mutated!" );
const SwTxtFrm* pFrm = static_cast<const SwTxtFrm*>( GetFrm() );
SwCrsrMoveState aMoveState;
- aMoveState.bPosMatchesBounds = TRUE;
+ aMoveState.bPosMatchesBounds = sal_True;
sal_Bool bSuccess = pFrm->GetCrsrOfst( &aPos, aCorePoint, &aMoveState );
SwIndex aCntntIdx = aPos.nContent;
@@ -2063,7 +2063,7 @@ sal_Bool SwAccessibleParagraph::replaceText(
SwTxtNode* pNode = const_cast<SwTxtNode*>( GetTxtNode() );
// translate positions
- USHORT nStart, nEnd;
+ sal_uInt16 nStart, nEnd;
sal_Bool bSuccess = GetPortionData().GetEditableRange(
nStartIndex, nEndIndex, nStart, nEnd );
diff --git a/sw/source/core/access/accpara.hxx b/sw/source/core/access/accpara.hxx
index 0c8bbcde6175..062af1aa8940 100644
--- a/sw/source/core/access/accpara.hxx
+++ b/sw/source/core/access/accpara.hxx
@@ -112,7 +112,7 @@ class SwAccessibleParagraph :
SwPaM* GetCursor( const bool _bForSelection );
/// for cut/copy/paste: execute a particular slot at the view shell
- void ExecuteAtViewShell( UINT16 nSlot );
+ void ExecuteAtViewShell( sal_uInt16 nSlot );
/// helper method for get/setAttributes
/// (for the special case of (nEndIndex==-1) a single character will
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index 230db4ca2d12..0142391027b8 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -115,7 +115,7 @@ SwAccessiblePortionData::~SwAccessiblePortionData()
delete pSentences;
}
-void SwAccessiblePortionData::Text(USHORT nLength, USHORT nType)
+void SwAccessiblePortionData::Text(sal_uInt16 nLength, sal_uInt16 nType)
{
DBG_ASSERT( (nModelPosition + nLength) <= pTxtNode->GetTxt().Len(),
"portion exceeds model string!" );
@@ -137,7 +137,7 @@ void SwAccessiblePortionData::Text(USHORT nLength, USHORT nType)
// update buffer + nModelPosition
aBuffer.append( OUString(
pTxtNode->GetTxt().Copy(
- static_cast<USHORT>( nModelPosition ),
+ static_cast<sal_uInt16>( nModelPosition ),
nLength ) ) );
nModelPosition += nLength;
@@ -145,7 +145,7 @@ void SwAccessiblePortionData::Text(USHORT nLength, USHORT nType)
}
void SwAccessiblePortionData::Special(
- USHORT nLength, const String& rText, USHORT nType)
+ sal_uInt16 nLength, const String& rText, sal_uInt16 nType)
{
DBG_ASSERT( nModelPosition >= 0, "illegal position" );
DBG_ASSERT( (nModelPosition + nLength) <= pTxtNode->GetTxt().Len(),
@@ -225,7 +225,7 @@ void SwAccessiblePortionData::LineBreak()
aLineBreaks.push_back( aBuffer.getLength() );
}
-void SwAccessiblePortionData::Skip(USHORT nLength)
+void SwAccessiblePortionData::Skip(sal_uInt16 nLength)
{
DBG_ASSERT( !bFinished, "We are already done!" );
DBG_ASSERT( aModelPositions.size() == 0, "Never Skip() after portions" );
@@ -269,7 +269,7 @@ sal_Bool SwAccessiblePortionData::IsReadOnlyPortion( size_t nPortionNo ) const
return IsPortionAttrSet(nPortionNo, PORATTR_READONLY);
}
-sal_Bool SwAccessiblePortionData::IsGrayPortionType( USHORT nType ) const
+sal_Bool SwAccessiblePortionData::IsGrayPortionType( sal_uInt16 nType ) const
{
// gray portions?
// Compare with: inftxt.cxx, SwTxtPaintInfo::DrawViewOpt(...)
@@ -361,7 +361,7 @@ void SwAccessiblePortionData::GetLastLineBoundary(
FillBoundary( rBound, aLineBreaks, nBreaks <= 3 ? 0 : nBreaks-4 );
}
-USHORT SwAccessiblePortionData::GetModelPosition( sal_Int32 nPos ) const
+sal_uInt16 SwAccessiblePortionData::GetModelPosition( sal_Int32 nPos ) const
{
DBG_ASSERT( nPos >= 0, "illegal position" );
DBG_ASSERT( nPos <= sAccessibleString.getLength(), "illegal position" );
@@ -389,7 +389,7 @@ USHORT SwAccessiblePortionData::GetModelPosition( sal_Int32 nPos ) const
DBG_ASSERT( (nStartPos >= 0) && (nStartPos < USHRT_MAX),
"How can the SwTxtNode have so many characters?" );
- return static_cast<USHORT>(nStartPos);
+ return static_cast<sal_uInt16>(nStartPos);
}
void SwAccessiblePortionData::FillBoundary(
@@ -502,7 +502,7 @@ void SwAccessiblePortionData::GetSentenceBoundary(
{
pSentences->push_back( nCurrent );
- USHORT nModelPos = GetModelPosition( nCurrent );
+ sal_uInt16 nModelPos = GetModelPosition( nCurrent );
sal_Int32 nNew = pBreakIt->GetBreakIter()->endOfSentence(
sAccessibleString, nCurrent,
@@ -545,7 +545,7 @@ void SwAccessiblePortionData::GetAttributeBoundary(
}
-sal_Int32 SwAccessiblePortionData::GetAccessiblePosition( USHORT nPos ) const
+sal_Int32 SwAccessiblePortionData::GetAccessiblePosition( sal_uInt16 nPos ) const
{
DBG_ASSERT( nPos <= pTxtNode->GetTxt().Len(), "illegal position" );
@@ -578,14 +578,14 @@ sal_Int32 SwAccessiblePortionData::GetAccessiblePosition( USHORT nPos ) const
return nRet;
}
-USHORT SwAccessiblePortionData::FillSpecialPos(
+sal_uInt16 SwAccessiblePortionData::FillSpecialPos(
sal_Int32 nPos,
SwSpecialPos& rPos,
SwSpecialPos*& rpPos ) const
{
size_t nPortionNo = FindLastBreak( aAccessiblePositions, nPos );
- BYTE nExtend(SP_EXTEND_RANGE_NONE);
+ sal_uInt8 nExtend(SP_EXTEND_RANGE_NONE);
sal_Int32 nRefPos(0);
sal_Int32 nModelPos(0);
@@ -617,7 +617,7 @@ USHORT SwAccessiblePortionData::FillSpecialPos(
// if we have anything except plain text, compute nExtend + nRefPos
if( (nModelEndPos - nModelPos == 1) &&
- (pTxtNode->GetTxt().GetChar(static_cast<USHORT>(nModelPos)) !=
+ (pTxtNode->GetTxt().GetChar(static_cast<sal_uInt16>(nModelPos)) !=
sAccessibleString.getStr()[nPos]) )
{
// case 1: a one-character, non-text portion
@@ -661,41 +661,41 @@ USHORT SwAccessiblePortionData::FillSpecialPos(
// (if necessary)
size_t nRefLine = FindBreak( aLineBreaks, nRefPos );
size_t nMyLine = FindBreak( aLineBreaks, nPos );
- USHORT nLineOffset = static_cast<USHORT>( nMyLine - nRefLine );
+ sal_uInt16 nLineOffset = static_cast<sal_uInt16>( nMyLine - nRefLine );
if( nLineOffset != 0 )
nRefPos = aLineBreaks[ nMyLine ];
// fill char offset and 'special position'
- rPos.nCharOfst = static_cast<USHORT>( nPos - nRefPos );
+ rPos.nCharOfst = static_cast<sal_uInt16>( nPos - nRefPos );
rPos.nExtendRange = nExtend;
rPos.nLineOfst = nLineOffset;
}
- return static_cast<USHORT>( nModelPos );
+ return static_cast<sal_uInt16>( nModelPos );
}
void SwAccessiblePortionData::AdjustAndCheck(
sal_Int32 nPos,
size_t& nPortionNo,
- USHORT& nCorePos,
+ sal_uInt16& nCorePos,
sal_Bool& bEdit) const
{
// find portion and get mode position
nPortionNo = FindBreak( aAccessiblePositions, nPos );
- nCorePos = static_cast<USHORT>( aModelPositions[ nPortionNo ] );
+ nCorePos = static_cast<sal_uInt16>( aModelPositions[ nPortionNo ] );
// for special portions, make sure we're on a portion boundary
// for text portions, add the in-portion offset
if( IsSpecialPortion( nPortionNo ) )
bEdit &= nPos == aAccessiblePositions[nPortionNo];
else
- nCorePos = static_cast<USHORT>( nCorePos +
+ nCorePos = static_cast<sal_uInt16>( nCorePos +
nPos - aAccessiblePositions[nPortionNo] );
}
sal_Bool SwAccessiblePortionData::GetEditableRange(
sal_Int32 nStart, sal_Int32 nEnd,
- USHORT& nCoreStart, USHORT& nCoreEnd ) const
+ sal_uInt16& nCoreStart, sal_uInt16& nCoreEnd ) const
{
sal_Bool bIsEditable = sal_True;
@@ -730,21 +730,21 @@ sal_Bool SwAccessiblePortionData::GetEditableRange(
return bIsEditable;
}
-sal_Bool SwAccessiblePortionData::IsValidCorePosition( USHORT nPos ) const
+sal_Bool SwAccessiblePortionData::IsValidCorePosition( sal_uInt16 nPos ) const
{
// a position is valid its within the model positions that we know
return ( aModelPositions[0] <= nPos ) &&
( nPos <= aModelPositions[ aModelPositions.size()-1 ] );
}
-USHORT SwAccessiblePortionData::GetFirstValidCorePosition() const
+sal_uInt16 SwAccessiblePortionData::GetFirstValidCorePosition() const
{
- return static_cast<USHORT>( aModelPositions[0] );
+ return static_cast<sal_uInt16>( aModelPositions[0] );
}
-USHORT SwAccessiblePortionData::GetLastValidCorePosition() const
+sal_uInt16 SwAccessiblePortionData::GetLastValidCorePosition() const
{
- return static_cast<USHORT>( aModelPositions[ aModelPositions.size()-1 ] );
+ return static_cast<sal_uInt16>( aModelPositions[ aModelPositions.size()-1 ] );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/accportions.hxx b/sw/source/core/access/accportions.hxx
index ee37121ca2bc..ef04e7ff56eb 100644
--- a/sw/source/core/access/accportions.hxx
+++ b/sw/source/core/access/accportions.hxx
@@ -91,11 +91,11 @@ class SwAccessiblePortionData : public SwPortionHandler
sal_Bool IsPortionAttrSet( size_t nPortionNo, sal_uInt8 nAttr ) const;
sal_Bool IsSpecialPortion( size_t nPortionNo ) const;
sal_Bool IsReadOnlyPortion( size_t nPortionNo ) const;
- sal_Bool IsGrayPortionType( USHORT nType ) const;
+ sal_Bool IsGrayPortionType( sal_uInt16 nType ) const;
// helper method for GetEditableRange(...):
void AdjustAndCheck( sal_Int32 nPos, size_t& nPortionNo,
- USHORT& nCorePos, sal_Bool& bEdit ) const;
+ sal_uInt16& nCorePos, sal_Bool& bEdit ) const;
public:
SwAccessiblePortionData( const SwTxtNode* pTxtNd,
@@ -103,10 +103,10 @@ public:
virtual ~SwAccessiblePortionData();
// SwPortionHandler methods
- virtual void Text(USHORT nLength, USHORT nType);
- virtual void Special(USHORT nLength, const String& rText, USHORT nType);
+ virtual void Text(sal_uInt16 nLength, sal_uInt16 nType);
+ virtual void Special(sal_uInt16 nLength, const String& rText, sal_uInt16 nType);
virtual void LineBreak();
- virtual void Skip(USHORT nLength);
+ virtual void Skip(sal_uInt16 nLength);
virtual void Finish();
@@ -131,16 +131,16 @@ public:
/// get the position in the model string for a given
/// (accessibility) position
- USHORT GetModelPosition( sal_Int32 nPos ) const;
+ sal_uInt16 GetModelPosition( sal_Int32 nPos ) const;
/// get the position in the accessibility string for a given model position
- sal_Int32 GetAccessiblePosition( USHORT nPos ) const;
+ sal_Int32 GetAccessiblePosition( sal_uInt16 nPos ) const;
/// fill a SwSpecialPos structure, suitable for calling
/// SwTxtFrm->GetCharRect
/// Returns the core position, and fills thr rpPos either with NULL or
/// with the &rPos, after putting the appropriate data into it.
- USHORT FillSpecialPos( sal_Int32 nPos,
+ sal_uInt16 FillSpecialPos( sal_Int32 nPos,
SwSpecialPos& rPos,
SwSpecialPos*& rpPos ) const;
@@ -159,16 +159,16 @@ public:
/// or not at all. This can be used to test whether editing
/// that range would be legal
sal_Bool GetEditableRange( sal_Int32 nStart, sal_Int32 nEnd,
- USHORT& nCoreStart, USHORT& nCoreEnd ) const;
+ sal_uInt16& nCoreStart, sal_uInt16& nCoreEnd ) const;
/// Determine whether this core position is valid for these portions.
/// (A paragraph may be split into several frames, e.g. at page
/// boundaries. In this case, only part of a paragraph is represented
/// through this object. This method determines whether one particular
/// position is valid for this object or not.)
- sal_Bool IsValidCorePosition( USHORT nPos ) const;
- USHORT GetFirstValidCorePosition() const;
- USHORT GetLastValidCorePosition() const;
+ sal_Bool IsValidCorePosition( sal_uInt16 nPos ) const;
+ sal_uInt16 GetFirstValidCorePosition() const;
+ sal_uInt16 GetLastValidCorePosition() const;
};
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
index afd6306d968c..563a000a3230 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -1450,7 +1450,7 @@ void SAL_CALL SwAccessibleTable::selectAccessibleChild(
const SwTableLine* pUpper = pBox->GetUpper();
while( pUpper->GetUpper() != NULL )
pUpper = pUpper->GetUpper()->GetUpper();
- USHORT nPos =
+ sal_uInt16 nPos =
pSelectedTable->GetTable().GetTabLines().GetPos( pUpper );
if( nPos == USHRT_MAX )
pSelectedTable = NULL;
diff --git a/sw/source/core/access/makefile.mk b/sw/source/core/access/makefile.mk
deleted file mode 100644
index 3a3802dda733..000000000000
--- a/sw/source/core/access/makefile.mk
+++ /dev/null
@@ -1,97 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=access
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/acccell.obj \
- $(SLO)$/acccontext.obj \
- $(SLO)$/accdoc.obj \
- $(SLO)$/accembedded.obj \
- $(SLO)$/accfootnote.obj \
- $(SLO)$/accframe.obj \
- $(SLO)$/accframebase.obj \
- $(SLO)$/accfrmobj.obj \
- $(SLO)$/accfrmobjmap.obj \
- $(SLO)$/accfrmobjslist.obj \
- $(SLO)$/accgraphic.obj \
- $(SLO)$/accheaderfooter.obj \
- $(SLO)$/acchyperlink.obj \
- $(SLO)$/acchypertextdata.obj \
- $(SLO)$/accmap.obj \
- $(SLO)$/accnotextframe.obj \
- $(SLO)$/accpage.obj \
- $(SLO)$/accpara.obj \
- $(SLO)$/accportions.obj \
- $(SLO)$/accpreview.obj \
- $(SLO)$/accselectionhelper.obj \
- $(SLO)$/acctable.obj \
- $(SLO)$/acctextframe.obj \
- $(SLO)$/textmarkuphelper.obj \
- $(SLO)$/parachangetrackinginfo.obj
-
-EXCEPTIONSFILES= \
- $(SLO)$/acccell.obj \
- $(SLO)$/acccontext.obj \
- $(SLO)$/accdoc.obj \
- $(SLO)$/accembedded.obj \
- $(SLO)$/accfootnote.obj \
- $(SLO)$/accframe.obj \
- $(SLO)$/accframebase.obj \
- $(SLO)$/accfrmobj.obj \
- $(SLO)$/accfrmobjmap.obj \
- $(SLO)$/accfrmobjslist.obj \
- $(SLO)$/accgraphic.obj \
- $(SLO)$/accheaderfooter.obj \
- $(SLO)$/acchyperlink.obj \
- $(SLO)$/acchypertextdata.obj \
- $(SLO)$/accmap.obj \
- $(SLO)$/accnotextframe.obj \
- $(SLO)$/accpage.obj \
- $(SLO)$/accpara.obj \
- $(SLO)$/accportions.obj \
- $(SLO)$/accpreview.obj \
- $(SLO)$/accselectionhelper.obj \
- $(SLO)$/acctable.obj \
- $(SLO)$/acctextframe.obj \
- $(SLO)$/textmarkuphelper.obj \
- $(SLO)$/parachangetrackinginfo.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/sw/source/core/access/parachangetrackinginfo.cxx b/sw/source/core/access/parachangetrackinginfo.cxx
index 68902b516b2a..c98510bd4b74 100644
--- a/sw/source/core/access/parachangetrackinginfo.cxx
+++ b/sw/source/core/access/parachangetrackinginfo.cxx
@@ -89,7 +89,7 @@ namespace {
// iteration over the redlines which overlap with the text node.
const SwRedlineTbl& rRedlineTbl = pIDocChangeTrack->GetRedlineTbl();
- const USHORT nRedlineCount( rRedlineTbl.Count() );
+ const sal_uInt16 nRedlineCount( rRedlineTbl.Count() );
for ( sal_uInt16 nActRedline = nIdxOfFirstRedlineForTxtNode;
nActRedline < nRedlineCount;
++nActRedline)
diff --git a/sw/source/core/access/textmarkuphelper.cxx b/sw/source/core/access/textmarkuphelper.cxx
index eac87e6d554d..c3dd4d7d6bab 100644
--- a/sw/source/core/access/textmarkuphelper.cxx
+++ b/sw/source/core/access/textmarkuphelper.cxx
@@ -147,7 +147,7 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( const sal_Int32 nTextMarkupTyp
if ( pTextMarkupList )
{
const SwWrongArea* pTextMarkup =
- pTextMarkupList->GetElement( static_cast<USHORT>(nTextMarkupIndex) );
+ pTextMarkupList->GetElement( static_cast<sal_uInt16>(nTextMarkupIndex) );
if ( pTextMarkup )
{
const ::rtl::OUString rText = mrPortionData.GetAccessibleString();
@@ -178,7 +178,7 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( const sal_Int32 nTextMarkupTyp
// assumption:
// value of <nCharIndex> is in range [0..length of accessible text)
- const USHORT nCoreCharIndex = mrPortionData.GetModelPosition( nCharIndex );
+ const sal_uInt16 nCoreCharIndex = mrPortionData.GetModelPosition( nCharIndex );
// Handling of portions with core length == 0 at the beginning of the
// paragraph - e.g. numbering portion.
if ( mrPortionData.GetAccessiblePosition( nCoreCharIndex ) > nCharIndex )
@@ -197,11 +197,11 @@ sal_Int32 SwTextMarkupHelper::getTextMarkupCount( const sal_Int32 nTextMarkupTyp
{
const ::rtl::OUString rText = mrPortionData.GetAccessibleString();
- const USHORT nTextMarkupCount = pTextMarkupList->Count();
- for ( USHORT nTextMarkupIdx = 0; nTextMarkupIdx < nTextMarkupCount; ++nTextMarkupIdx )
+ const sal_uInt16 nTextMarkupCount = pTextMarkupList->Count();
+ for ( sal_uInt16 nTextMarkupIdx = 0; nTextMarkupIdx < nTextMarkupCount; ++nTextMarkupIdx )
{
const SwWrongArea* pTextMarkup =
- pTextMarkupList->GetElement( static_cast<USHORT>(nTextMarkupIdx) );
+ pTextMarkupList->GetElement( static_cast<sal_uInt16>(nTextMarkupIdx) );
OSL_ENSURE( pTextMarkup,
"<SwTextMarkupHelper::getTextMarkup(..)> - missing <SwWrongArea> instance" );
if ( pTextMarkup &&
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx
index 20595280817b..f25f117b36f1 100644
--- a/sw/source/core/attr/calbck.cxx
+++ b/sw/source/core/attr/calbck.cxx
@@ -57,8 +57,8 @@ SwClient::SwClient(SwModify *pToRegisterIn)
bModifyLocked =
bInModify =
bInDocDTOR =
- bInCache = FALSE;
- bInSwFntCache = FALSE;
+ bInCache = sal_False;
+ bInSwFntCache = sal_False;
if(pToRegisterIn)
pToRegisterIn->Add(this);
@@ -106,9 +106,9 @@ SwClient::~SwClient()
// erfrage vom Client Informationen
-BOOL SwClient::GetInfo( SfxPoolItem& ) const
+sal_Bool SwClient::GetInfo( SfxPoolItem& ) const
{
- return TRUE; // und weiter
+ return sal_True; // und weiter
}
/*************************************************************************
@@ -187,7 +187,7 @@ void SwModify::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
{
if (IsInCache() || IsInSwFntCache())
{
- const USHORT nWhich = pOldValue ? pOldValue->Which() :
+ const sal_uInt16 nWhich = pOldValue ? pOldValue->Which() :
pNewValue ? pNewValue->Which() : 0;
CheckCaching( nWhich );
}
@@ -199,7 +199,7 @@ void SwModify::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
#if OSL_DEBUG_LEVEL > 1
if( !pOldValue )
- bInModify = TRUE;
+ bInModify = sal_True;
else
// following Modifies don't calls an ASSRT
switch( pOldValue->Which() )
@@ -213,13 +213,13 @@ void SwModify::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
case RES_REFMARK_DELETED:
case RES_TOXMARK_DELETED:
case RES_FIELD_DELETED:
- bInModify = FALSE;
+ bInModify = sal_False;
break;
default:
- bInModify = TRUE;
+ bInModify = sal_True;
}
#else
- bInModify = TRUE;
+ bInModify = sal_True;
#endif
SwClientIter aIter( *this );
@@ -232,15 +232,15 @@ void SwModify::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
break;
} while( 0 != ( pLast = aIter++ ));
- bInModify = FALSE;
+ bInModify = sal_False;
UnlockModify();
}
// erfrage vom Modify Informationen
-BOOL SwModify::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwModify::GetInfo( SfxPoolItem& rInfo ) const
{
- BOOL bRet = TRUE; // bedeutet weiter zum naechsten
+ sal_Bool bRet = sal_True; // bedeutet weiter zum naechsten
if( pRoot )
{
@@ -351,7 +351,7 @@ SwClient *SwModify::_Remove(SwClient * pDepend)
pDepend->pRight = 0;
}
else {
- OSL_ENSURE( FALSE, "SwModify::Remove(): pDepend nicht gefunden");
+ OSL_ENSURE( sal_False, "SwModify::Remove(): pDepend nicht gefunden");
}
pDepend->pRegisteredIn = 0;
return pDepend;
@@ -359,16 +359,16 @@ SwClient *SwModify::_Remove(SwClient * pDepend)
/*************************************************************************
-|* SwModify::CheckCaching( const USHORT nWhich )
+|* SwModify::CheckCaching( const sal_uInt16 nWhich )
*************************************************************************/
-void SwModify::CheckCaching( const USHORT nWhich )
+void SwModify::CheckCaching( const sal_uInt16 nWhich )
{
if (isCHRATR(nWhich))
{
- SetInSwFntCache( FALSE );
+ SetInSwFntCache( sal_False );
}
else
switch ( nWhich )
@@ -376,7 +376,7 @@ void SwModify::CheckCaching( const USHORT nWhich )
case RES_OBJECTDYING:
case RES_FMT_CHG:
case RES_ATTRSET_CHG:
- SetInSwFntCache( FALSE );
+ SetInSwFntCache( sal_False );
case RES_UL_SPACE:
case RES_LR_SPACE:
@@ -388,7 +388,7 @@ void SwModify::CheckCaching( const USHORT nWhich )
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
break;
}
@@ -431,9 +431,9 @@ void SwDepend::Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue )
// erfrage vom Modify Informationen
-BOOL SwDepend::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwDepend::GetInfo( SfxPoolItem& rInfo ) const
{
- return pToTell ? pToTell->GetInfo( rInfo ) : TRUE;
+ return pToTell ? pToTell->GetInfo( rInfo ) : sal_True;
}
/********************************************************************/
diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx
index 57a507cd66ad..aae83558ca47 100644
--- a/sw/source/core/attr/cellatr.cxx
+++ b/sw/source/core/attr/cellatr.cxx
@@ -52,7 +52,7 @@
*************************************************************************/
-SwTblBoxNumFormat::SwTblBoxNumFormat( UINT32 nFormat, BOOL bFlag )
+SwTblBoxNumFormat::SwTblBoxNumFormat( sal_uInt32 nFormat, sal_Bool bFlag )
: SfxUInt32Item( RES_BOXATR_FORMAT, nFormat ), bAuto( bFlag )
{
}
@@ -140,7 +140,7 @@ void SwTblBoxFormula::ChangeState( const SfxPoolItem* pItem )
if( !pItem || RES_TABLEFML_UPDATE != pItem->Which() )
{
// setze bei allen das Value-Flag zurueck
- ChgValid( FALSE );
+ ChgValid( sal_False );
return ;
}
@@ -158,7 +158,7 @@ void SwTblBoxFormula::ChangeState( const SfxPoolItem* pItem )
// setze das Value-Flag zurueck
// JP 17.06.96: interne Darstellung auf alle Formeln
// (Referenzen auf andere Tabellen!!!)
- ChgValid( FALSE );
+ ChgValid( sal_False );
break;
case TBL_BOXNAME:
// ist es die gesuchte Tabelle ??
@@ -182,20 +182,20 @@ void SwTblBoxFormula::ChangeState( const SfxPoolItem* pItem )
case TBL_SPLITTBL:
if( &pTblNd->GetTable() == pUpdtFld->pTbl )
{
- USHORT nLnPos = SwTableFormula::GetLnPosInTbl(
+ sal_uInt16 nLnPos = SwTableFormula::GetLnPosInTbl(
pTblNd->GetTable(), GetTableBox() );
pUpdtFld->bBehindSplitLine = USHRT_MAX != nLnPos &&
pUpdtFld->nSplitLine <= nLnPos;
}
else
- pUpdtFld->bBehindSplitLine = FALSE;
+ pUpdtFld->bBehindSplitLine = sal_False;
// kein break
case TBL_MERGETBL:
if( pUpdtFld->pHistory )
{
// fuer die History brauche ich aber die unveraenderte Formel
SwTblBoxFormula aCopy( *this );
- pUpdtFld->bModified = FALSE;
+ pUpdtFld->bModified = sal_False;
ToSplitMergeBoxNm( *pUpdtFld );
if( pUpdtFld->bModified )
diff --git a/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx b/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx
index 5afbe840d545..c228387fcfd0 100644
--- a/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx
+++ b/sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx
@@ -76,7 +76,7 @@ SfxPoolItem* SwFmtWrapInfluenceOnObjPos::Clone( SfxItemPool * ) const
return new SwFmtWrapInfluenceOnObjPos(*this);
}
-bool SwFmtWrapInfluenceOnObjPos::QueryValue( Any& rVal, BYTE nMemberId ) const
+bool SwFmtWrapInfluenceOnObjPos::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
bool bRet = true;
@@ -95,7 +95,7 @@ bool SwFmtWrapInfluenceOnObjPos::QueryValue( Any& rVal, BYTE nMemberId ) const
return bRet;
}
-bool SwFmtWrapInfluenceOnObjPos::PutValue( const Any& rVal, BYTE nMemberId )
+bool SwFmtWrapInfluenceOnObjPos::PutValue( const Any& rVal, sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
bool bRet = true;
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index a3af389964a9..d4b217e49d11 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -47,7 +47,7 @@ TYPEINIT1( SwFmt, SwClient ); //rtti fuer SwFmt
SwFmt::SwFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
- const USHORT* pWhichRanges, SwFmt *pDrvdFrm, USHORT nFmtWhich )
+ const sal_uInt16* pWhichRanges, SwFmt *pDrvdFrm, sal_uInt16 nFmtWhich )
: SwModify( pDrvdFrm ),
aSet( rPool, pWhichRanges ),
nWhichId( nFmtWhich ),
@@ -57,8 +57,8 @@ SwFmt::SwFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
nPoolHlpFileId( UCHAR_MAX )
{
aFmtName.AssignAscii( pFmtNm );
- bWritten = bFmtInDTOR = bAutoUpdateFmt = FALSE; // LAYER_IMPL
- bAutoFmt = TRUE;
+ bWritten = bFmtInDTOR = bAutoUpdateFmt = sal_False; // LAYER_IMPL
+ bAutoFmt = sal_True;
if( pDrvdFrm )
aSet.SetParent( &pDrvdFrm->aSet );
@@ -66,7 +66,7 @@ SwFmt::SwFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
SwFmt::SwFmt( SwAttrPool& rPool, const String &rFmtNm,
- const USHORT* pWhichRanges, SwFmt *pDrvdFrm, USHORT nFmtWhich )
+ const sal_uInt16* pWhichRanges, SwFmt *pDrvdFrm, sal_uInt16 nFmtWhich )
: SwModify( pDrvdFrm ),
aFmtName( rFmtNm ),
aSet( rPool, pWhichRanges ),
@@ -76,8 +76,8 @@ SwFmt::SwFmt( SwAttrPool& rPool, const String &rFmtNm,
nPoolHelpId( USHRT_MAX ),
nPoolHlpFileId( UCHAR_MAX )
{
- bWritten = bFmtInDTOR = bAutoUpdateFmt = FALSE; // LAYER_IMPL
- bAutoFmt = TRUE;
+ bWritten = bFmtInDTOR = bAutoUpdateFmt = sal_False; // LAYER_IMPL
+ bAutoFmt = sal_True;
if( pDrvdFrm )
aSet.SetParent( &pDrvdFrm->aSet );
@@ -94,7 +94,7 @@ SwFmt::SwFmt( const SwFmt& rFmt )
nPoolHelpId( rFmt.GetPoolHelpId() ),
nPoolHlpFileId( rFmt.GetPoolHlpFileId() )
{
- bWritten = bFmtInDTOR = FALSE; // LAYER_IMPL
+ bWritten = bFmtInDTOR = sal_False; // LAYER_IMPL
bAutoFmt = rFmt.bAutoFmt;
bAutoUpdateFmt = rFmt.bAutoUpdateFmt;
@@ -121,9 +121,9 @@ SwFmt &SwFmt::operator=(const SwFmt& rFmt)
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
- SetInSwFntCache( FALSE );
+ SetInSwFntCache( sal_False );
// kopiere nur das Attribut-Delta Array
SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ),
@@ -190,16 +190,16 @@ void SwFmt::SetName( const String& rNewName, sal_Bool bBroadcast )
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
-void SwFmt::CopyAttrs( const SwFmt& rFmt, BOOL bReplace )
+void SwFmt::CopyAttrs( const SwFmt& rFmt, sal_Bool bReplace )
{
// kopiere nur das Attribut-Delta Array
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
- SetInSwFntCache( FALSE );
+ SetInSwFntCache( sal_False );
// Sonderbehandlung fuer einige Attribute
SwAttrSet* pChgSet = (SwAttrSet*)&rFmt.aSet;
@@ -249,7 +249,7 @@ SwFmt::~SwFmt()
{
OSL_ENSURE(DerivedFrom(), "SwFmt::~SwFmt: Def Abhaengige!" );
- bFmtInDTOR = TRUE;
+ bFmtInDTOR = sal_True;
SwFmt *pParentFmt = DerivedFrom();
if (!pParentFmt)
@@ -280,9 +280,9 @@ SwFmt::~SwFmt()
void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
{
- BOOL bWeiter = TRUE; // TRUE = Propagierung an die Abhaengigen
+ sal_Bool bWeiter = sal_True; // sal_True = Propagierung an die Abhaengigen
- USHORT nWhich = pOldValue ? pOldValue->Which() :
+ sal_uInt16 nWhich = pOldValue ? pOldValue->Which() :
pNewValue ? pNewValue->Which() : 0 ;
switch( nWhich )
{
@@ -326,7 +326,7 @@ void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
if( aNew.Count() )
// keine mehr gesetzt, dann Ende !!
SwModify::Modify( &aOld, &aNew );
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
break;
case RES_FMT_CHG:
@@ -352,7 +352,7 @@ void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
pClient = aIter.Next() )
pClient->Modify( pOldValue, pNewValue );
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
break;
@@ -360,14 +360,14 @@ void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
{
// Ist das Attribut in diesem Format definiert, dann auf
// NICHT weiter propagieren !!
- if( SFX_ITEM_SET == aSet.GetItemState( nWhich, FALSE ))
+ if( SFX_ITEM_SET == aSet.GetItemState( nWhich, sal_False ))
{
// wie finde ich heraus, ob nicht ich die Message versende ??
// aber wer ruft das hier ????
// OSL_ENSURE( FALSE, "Modify ohne Absender verschickt" );
//JP 11.06.96: DropCaps koennen hierher kommen
OSL_ENSURE( RES_PARATR_DROP == nWhich, "Modify ohne Absender verschickt" );
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
} // default
@@ -382,7 +382,7 @@ void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
}
-BOOL SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
+sal_Bool SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
{
if ( pDerFrom )
{
@@ -391,7 +391,7 @@ BOOL SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
while ( pFmt != 0 )
{
if ( pFmt == this )
- return FALSE;
+ return sal_False;
pFmt=pFmt->DerivedFrom();
}
@@ -404,7 +404,7 @@ BOOL SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
pDerFrom = pDerFrom->DerivedFrom();
}
if ( (pDerFrom == DerivedFrom()) || (pDerFrom == this) )
- return FALSE;
+ return sal_False;
OSL_ENSURE( Which()==pDerFrom->Which()
|| ( Which()==RES_CONDTXTFMTCOLL && pDerFrom->Which()==RES_TXTFMTCOLL)
@@ -415,9 +415,9 @@ BOOL SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
- SetInSwFntCache( FALSE );
+ SetInSwFntCache( sal_False );
pDerFrom->Add(this);
aSet.SetParent( &pDerFrom->aSet );
@@ -426,22 +426,22 @@ BOOL SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
SwFmtChg aNewFmt(this);
Modify( &aOldFmt, &aNewFmt );
- return TRUE;
+ return sal_True;
}
-BOOL SwFmt::SetFmtAttr(const SfxPoolItem& rAttr )
+sal_Bool SwFmt::SetFmtAttr(const SfxPoolItem& rAttr )
{
if ( IsInCache() || IsInSwFntCache() )
{
- const USHORT nWhich = rAttr.Which();
+ const sal_uInt16 nWhich = rAttr.Which();
CheckCaching( nWhich );
}
// wenn Modify gelockt ist, werden keine Modifies verschickt;
// fuer FrmFmt's immer das Modify verschicken!
- BOOL bRet = FALSE;
- const USHORT nFmtWhich = Which();
+ sal_Bool bRet = sal_False;
+ const sal_uInt16 nFmtWhich = Which();
if( IsModifyLocked() || (!GetDepends() &&
(RES_GRFFMTCOLL == nFmtWhich ||
RES_TXTFMTCOLL == nFmtWhich ) ) )
@@ -475,22 +475,22 @@ BOOL SwFmt::SetFmtAttr(const SfxPoolItem& rAttr )
}
-BOOL SwFmt::SetFmtAttr( const SfxItemSet& rSet )
+sal_Bool SwFmt::SetFmtAttr( const SfxItemSet& rSet )
{
if( !rSet.Count() )
- return FALSE;
+ return sal_False;
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
- SetInSwFntCache( FALSE );
+ SetInSwFntCache( sal_False );
// wenn Modify gelockt ist, werden keine Modifies verschickt;
// fuer FrmFmt's immer das Modify verschicken!
- BOOL bRet = FALSE;
- const USHORT nFmtWhich = Which();
+ sal_Bool bRet = sal_False;
+ const sal_uInt16 nFmtWhich = Which();
if ( IsModifyLocked() ||
( !GetDepends() &&
( RES_GRFFMTCOLL == nFmtWhich ||
@@ -524,17 +524,17 @@ BOOL SwFmt::SetFmtAttr( const SfxItemSet& rSet )
// Nimmt den Hint mit nWhich aus dem Delta-Array
-BOOL SwFmt::ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 )
+sal_Bool SwFmt::ResetFmtAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 )
{
if( !aSet.Count() )
- return FALSE;
+ return sal_False;
if( !nWhich2 || nWhich2 < nWhich1 )
nWhich2 = nWhich1; // dann setze auf 1. Id, nur dieses Item
if ( IsInCache() || IsInSwFntCache() )
{
- for( USHORT n = nWhich1; n < nWhich2; ++n )
+ for( sal_uInt16 n = nWhich1; n < nWhich2; ++n )
CheckCaching( n );
}
@@ -546,7 +546,7 @@ BOOL SwFmt::ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 )
SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ),
aNew( *aSet.GetPool(), aSet.GetRanges() );
- BOOL bRet = 0 != aSet.ClearItem_BC( nWhich1, nWhich2, &aOld, &aNew );
+ sal_Bool bRet = 0 != aSet.ClearItem_BC( nWhich1, nWhich2, &aOld, &aNew );
if( bRet )
{
@@ -561,7 +561,7 @@ BOOL SwFmt::ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 )
// #i73790#
// method renamed
-USHORT SwFmt::ResetAllFmtAttr()
+sal_uInt16 SwFmt::ResetAllFmtAttr()
{
if( !aSet.Count() )
return 0;
@@ -569,9 +569,9 @@ USHORT SwFmt::ResetAllFmtAttr()
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
- SetInSwFntCache( FALSE );
+ SetInSwFntCache( sal_False );
// wenn Modify gelockt ist, werden keine Modifies verschickt
if( IsModifyLocked() )
@@ -579,7 +579,7 @@ USHORT SwFmt::ResetAllFmtAttr()
SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ),
aNew( *aSet.GetPool(), aSet.GetRanges() );
- BOOL bRet = 0 != aSet.ClearItem_BC( 0, &aOld, &aNew );
+ sal_Bool bRet = 0 != aSet.ClearItem_BC( 0, &aOld, &aNew );
if( bRet )
{
@@ -596,9 +596,9 @@ USHORT SwFmt::ResetAllFmtAttr()
*************************************************************************/
-BOOL SwFmt::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwFmt::GetInfo( SfxPoolItem& rInfo ) const
{
- BOOL bRet = SwModify::GetInfo( rInfo );
+ sal_Bool bRet = SwModify::GetInfo( rInfo );
return bRet;
}
@@ -611,9 +611,9 @@ void SwFmt::DelDiffs( const SfxItemSet& rSet )
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
- SetInSwFntCache( FALSE );
+ SetInSwFntCache( sal_False );
// wenn Modify gelockt ist, werden keine Modifies verschickt
if( IsModifyLocked() )
@@ -624,7 +624,7 @@ void SwFmt::DelDiffs( const SfxItemSet& rSet )
SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ),
aNew( *aSet.GetPool(), aSet.GetRanges() );
- BOOL bRet = 0 != aSet.Intersect_BC( rSet, &aOld, &aNew );
+ sal_Bool bRet = 0 != aSet.Intersect_BC( rSet, &aOld, &aNew );
if( bRet )
{
diff --git a/sw/source/core/attr/hints.cxx b/sw/source/core/attr/hints.cxx
index 4dc1400c8786..8be07e422fc1 100644
--- a/sw/source/core/attr/hints.cxx
+++ b/sw/source/core/attr/hints.cxx
@@ -66,7 +66,7 @@ SwDelTxt::SwDelTxt( xub_StrLen nS, xub_StrLen nL )
-SwUpdateAttr::SwUpdateAttr( xub_StrLen nS, xub_StrLen nE, USHORT nW )
+SwUpdateAttr::SwUpdateAttr( xub_StrLen nS, xub_StrLen nE, sal_uInt16 nW )
: SwMsgPoolItem( RES_UPDATE_ATTR ),
nStart( nS ),
nEnd( nE ),
@@ -101,7 +101,7 @@ SwTableFmlUpdate::SwTableFmlUpdate( const SwTable* pNewTbl )
eFlags( TBL_CALC )
{
DATA.pDelTbl = 0;
- bModified = bBehindSplitLine = FALSE;
+ bModified = bBehindSplitLine = sal_False;
OSL_ENSURE( pTbl, "es muss ein Table-Pointer gesetzt werden!" );
}
@@ -114,7 +114,7 @@ SwAutoFmtGetDocNode::SwAutoFmtGetDocNode( const SwNodes* pNds )
SwAttrSetChg::SwAttrSetChg( const SwAttrSet& rTheSet, SwAttrSet& rSet )
: SwMsgPoolItem( RES_ATTRSET_CHG ),
- bDelSet( FALSE ),
+ bDelSet( sal_False ),
pChgSet( &rSet ),
pTheChgdSet( &rTheSet )
{}
@@ -122,7 +122,7 @@ SwAttrSetChg::SwAttrSetChg( const SwAttrSet& rTheSet, SwAttrSet& rSet )
SwAttrSetChg::SwAttrSetChg( const SwAttrSetChg& rChgSet )
: SwMsgPoolItem( RES_ATTRSET_CHG ),
- bDelSet( TRUE ),
+ bDelSet( sal_True ),
pTheChgdSet( rChgSet.pTheChgdSet )
{
pChgSet = new SwAttrSet( *rChgSet.pChgSet );
@@ -138,7 +138,7 @@ SwAttrSetChg::~SwAttrSetChg()
#if OSL_DEBUG_LEVEL > 1
-void SwAttrSetChg::ClearItem( USHORT nWhch )
+void SwAttrSetChg::ClearItem( sal_uInt16 nWhch )
{
OSL_ENSURE( bDelSet, "der Set darf nicht veraendert werden!" );
pChgSet->ClearItem( nWhch );
@@ -147,7 +147,7 @@ void SwAttrSetChg::ClearItem( USHORT nWhch )
#endif
-SwMsgPoolItem::SwMsgPoolItem( USHORT nWhch )
+SwMsgPoolItem::SwMsgPoolItem( sal_uInt16 nWhch )
: SfxPoolItem( nWhch )
{}
@@ -155,14 +155,14 @@ SwMsgPoolItem::SwMsgPoolItem( USHORT nWhch )
// "Overhead" vom SfxPoolItem
int SwMsgPoolItem::operator==( const SfxPoolItem& ) const
{
- OSL_ENSURE( FALSE, "SwMsgPoolItem kennt kein ==" );
+ OSL_ENSURE( sal_False, "SwMsgPoolItem kennt kein ==" );
return 0;
}
SfxPoolItem* SwMsgPoolItem::Clone( SfxItemPool* ) const
{
- OSL_ENSURE( FALSE, "SwMsgPoolItem kennt kein Clone" );
+ OSL_ENSURE( sal_False, "SwMsgPoolItem kennt kein Clone" );
return 0;
}
@@ -173,7 +173,7 @@ SfxPoolItem* SwMsgPoolItem::Clone( SfxItemPool* ) const
* Used to be inlined (hintids.hxx) in PRODUCT.
******************************************************************************/
#if OSL_DEBUG_LEVEL > 1
-const SfxPoolItem* GetDfltAttr( USHORT nWhich )
+const SfxPoolItem* GetDfltAttr( sal_uInt16 nWhich )
{
OSL_ASSERT( nWhich < POOLATTR_END && nWhich >= POOLATTR_BEGIN );
@@ -182,7 +182,7 @@ const SfxPoolItem* GetDfltAttr( USHORT nWhich )
return pHt;
}
#else
-const SfxPoolItem* GetDfltAttr( USHORT nWhich )
+const SfxPoolItem* GetDfltAttr( sal_uInt16 nWhich )
{
return aAttrTab[ nWhich - POOLATTR_BEGIN ];
}
@@ -214,7 +214,7 @@ void SwFindNearestNode::CheckNode( const SwNode& rNd )
{
if( &pNd->GetNodes() == &rNd.GetNodes() )
{
- ULONG nIdx = rNd.GetIndex();
+ sal_uLong nIdx = rNd.GetIndex();
if( nIdx < pNd->GetIndex() &&
( !pFnd || nIdx > pFnd->GetIndex() ) &&
nIdx > rNd.GetNodes().GetEndOfExtras().GetIndex() )
@@ -224,20 +224,20 @@ void SwFindNearestNode::CheckNode( const SwNode& rNd )
-USHORT GetWhichOfScript( USHORT nWhich, USHORT nScript )
+sal_uInt16 GetWhichOfScript( sal_uInt16 nWhich, sal_uInt16 nScript )
{
- static const USHORT aLangMap[3] =
+ static const sal_uInt16 aLangMap[3] =
{ RES_CHRATR_LANGUAGE, RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CTL_LANGUAGE };
- static const USHORT aFontMap[3] =
+ static const sal_uInt16 aFontMap[3] =
{ RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT};
- static const USHORT aFontSizeMap[3] =
+ static const sal_uInt16 aFontSizeMap[3] =
{ RES_CHRATR_FONTSIZE, RES_CHRATR_CJK_FONTSIZE, RES_CHRATR_CTL_FONTSIZE };
- static const USHORT aWeightMap[3] =
+ static const sal_uInt16 aWeightMap[3] =
{ RES_CHRATR_WEIGHT, RES_CHRATR_CJK_WEIGHT, RES_CHRATR_CTL_WEIGHT};
- static const USHORT aPostureMap[3] =
+ static const sal_uInt16 aPostureMap[3] =
{ RES_CHRATR_POSTURE, RES_CHRATR_CJK_POSTURE, RES_CHRATR_CTL_POSTURE};
- const USHORT* pM;
+ const sal_uInt16* pM;
switch( nWhich )
{
case RES_CHRATR_LANGUAGE:
@@ -273,13 +273,13 @@ USHORT GetWhichOfScript( USHORT nWhich, USHORT nScript )
pM = 0;
}
- USHORT nRet;
+ sal_uInt16 nRet;
if( pM )
{
using namespace ::com::sun::star::i18n;
{
if( ScriptType::WEAK == nScript )
- nScript = GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() );
+ nScript = GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
switch( nScript)
{
case ScriptType::COMPLEX: ++pM; // no break;
diff --git a/sw/source/core/attr/makefile.mk b/sw/source/core/attr/makefile.mk
deleted file mode 100644
index baf327dcac36..000000000000
--- a/sw/source/core/attr/makefile.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=attr
-
-AUTOSEG=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES = \
- $(SLO)$/cellatr.obj \
- $(SLO)$/format.obj \
- $(SLO)$/hints.obj \
- $(SLO)$/swatrset.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/calbck.obj \
- $(SLO)$/fmtfollowtextflow.obj \
- $(SLO)$/fmtwrapinfluenceonobjpos.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx
index 236075975f63..558f5ba7caf4 100644
--- a/sw/source/core/attr/swatrset.cxx
+++ b/sw/source/core/attr/swatrset.cxx
@@ -70,13 +70,13 @@ SwAttrPool::~SwAttrPool()
{
}
-SwAttrSet::SwAttrSet( SwAttrPool& rPool, USHORT nWh1, USHORT nWh2 )
+SwAttrSet::SwAttrSet( SwAttrPool& rPool, sal_uInt16 nWh1, sal_uInt16 nWh2 )
: SfxItemSet( rPool, nWh1, nWh2 ), pOldSet( 0 ), pNewSet( 0 )
{
}
-SwAttrSet::SwAttrSet( SwAttrPool& rPool, const USHORT* nWhichPairTable )
+SwAttrSet::SwAttrSet( SwAttrPool& rPool, const sal_uInt16* nWhichPairTable )
: SfxItemSet( rPool, nWhichPairTable ), pOldSet( 0 ), pNewSet( 0 )
{
}
@@ -87,7 +87,7 @@ SwAttrSet::SwAttrSet( const SwAttrSet& rSet )
{
}
-SfxItemSet* SwAttrSet::Clone( BOOL bItems, SfxItemPool *pToPool ) const
+SfxItemSet* SwAttrSet::Clone( sal_Bool bItems, SfxItemPool *pToPool ) const
{
if ( pToPool && pToPool != GetPool() )
{
@@ -101,11 +101,11 @@ SfxItemSet* SwAttrSet::Clone( BOOL bItems, SfxItemPool *pToPool ) const
if ( bItems )
{
SfxWhichIter aIter(*pTmpSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == GetItemState( nWhich, FALSE, &pItem ) )
+ if ( SFX_ITEM_SET == GetItemState( nWhich, sal_False, &pItem ) )
pTmpSet->Put( *pItem, pItem->Which() );
nWhich = aIter.NextWhich();
}
@@ -142,24 +142,24 @@ int SwAttrSet::Put_BC( const SfxItemSet& rSet,
-USHORT SwAttrSet::ClearItem_BC( USHORT nWhich,
+sal_uInt16 SwAttrSet::ClearItem_BC( sal_uInt16 nWhich,
SwAttrSet* pOld, SwAttrSet* pNew )
{
pNewSet = pNew;
pOldSet = pOld;
- USHORT nRet = SfxItemSet::ClearItem( nWhich );
+ sal_uInt16 nRet = SfxItemSet::ClearItem( nWhich );
pOldSet = pNewSet = 0;
return nRet;
}
-USHORT SwAttrSet::ClearItem_BC( USHORT nWhich1, USHORT nWhich2,
+sal_uInt16 SwAttrSet::ClearItem_BC( sal_uInt16 nWhich1, sal_uInt16 nWhich2,
SwAttrSet* pOld, SwAttrSet* pNew )
{
OSL_ENSURE( nWhich1 <= nWhich2, "kein gueltiger Bereich" );
pNewSet = pNew;
pOldSet = pOld;
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
for( ; nWhich1 <= nWhich2; ++nWhich1 )
nRet = nRet + SfxItemSet::ClearItem( nWhich1 );
pOldSet = pNewSet = 0;
@@ -203,14 +203,14 @@ bool SwAttrSet::SetModifyAtAttr( const SwModify* pModify )
bool bSet = false;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == GetItemState( RES_PAGEDESC, FALSE, &pItem ) &&
+ if( SFX_ITEM_SET == GetItemState( RES_PAGEDESC, sal_False, &pItem ) &&
((SwFmtPageDesc*)pItem)->GetDefinedIn() != pModify )
{
((SwFmtPageDesc*)pItem)->ChgDefinedIn( pModify );
bSet = true;
}
- if( SFX_ITEM_SET == GetItemState( RES_PARATR_DROP, FALSE, &pItem ) &&
+ if( SFX_ITEM_SET == GetItemState( RES_PARATR_DROP, sal_False, &pItem ) &&
((SwFmtDrop*)pItem)->GetDefinedIn() != pModify )
{
// CharFormat gesetzt und dann noch in unterschiedlichen
@@ -226,7 +226,7 @@ bool SwAttrSet::SetModifyAtAttr( const SwModify* pModify )
bSet = true;
}
- if( SFX_ITEM_SET == GetItemState( RES_BOXATR_FORMULA, FALSE, &pItem ) &&
+ if( SFX_ITEM_SET == GetItemState( RES_BOXATR_FORMULA, sal_False, &pItem ) &&
((SwTblBoxFormula*)pItem)->GetDefinedIn() != pModify )
{
((SwTblBoxFormula*)pItem)->ChgDefinedIn( pModify );
@@ -255,14 +255,14 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
// muss die NumRule kopiert werden?
if( pSrcDoc != pDstDoc && SFX_ITEM_SET == GetItemState(
- RES_PARATR_NUMRULE, FALSE, &pItem ) )
+ RES_PARATR_NUMRULE, sal_False, &pItem ) )
{
const String& rNm = ((SwNumRuleItem*)pItem)->GetValue();
if( rNm.Len() )
{
SwNumRule* pDestRule = pDstDoc->FindNumRulePtr( rNm );
if( pDestRule )
- pDestRule->SetInvalidRule( TRUE );
+ pDestRule->SetInvalidRule( sal_True );
else
pDstDoc->MakeNumRule( rNm,
pSrcDoc->FindNumRulePtr( rNm ) );
@@ -273,7 +273,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
// for text nodes
if ( pSrcDoc != pDstDoc &&
pCNd && pCNd->IsTxtNode() &&
- GetItemState( RES_PARATR_LIST_ID, FALSE, &pItem ) == SFX_ITEM_SET )
+ GetItemState( RES_PARATR_LIST_ID, sal_False, &pItem ) == SFX_ITEM_SET )
{
const String& sListId =
dynamic_cast<const SfxStringItem*>(pItem)->GetValue();
@@ -322,7 +322,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
// Verhalten, sie zu entfernen
const SwPageDesc* pPgDesc;
if( pSrcDoc != pDstDoc && SFX_ITEM_SET == GetItemState(
- RES_PAGEDESC, FALSE, &pItem ) &&
+ RES_PAGEDESC, sal_False, &pItem ) &&
0 != ( pPgDesc = ((SwFmtPageDesc*)pItem)->GetPageDesc()) )
{
SfxItemSet aTmpSet( *this );
@@ -381,15 +381,15 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
}
// check if ID is InRange of AttrSet-Ids
-BOOL IsInRange( const USHORT* pRange, const USHORT nId )
+sal_Bool IsInRange( const sal_uInt16* pRange, const sal_uInt16 nId )
{
while( *pRange )
{
if( *pRange <= nId && nId <= *(pRange+1) )
- return TRUE;
+ return sal_True;
pRange += 2;
}
- return FALSE;
+ return sal_False;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/bastyp/bparr.cxx b/sw/source/core/bastyp/bparr.cxx
index 4e448882ab9e..f7f87e160dad 100644
--- a/sw/source/core/bastyp/bparr.cxx
+++ b/sw/source/core/bastyp/bparr.cxx
@@ -37,18 +37,18 @@
// die Blockverwaltung waechst/schrumpft immer um 20 Bloecke, das sind dann
// immer ~ 20 * MAXENTRY == 20000 Eintraege
-const USHORT nBlockGrowSize = 20;
+const sal_uInt16 nBlockGrowSize = 20;
#if OSL_DEBUG_LEVEL > 2
#define CHECKIDX( p, n, i, c ) CheckIdx( p, n, i, c );
-void CheckIdx( BlockInfo** ppInf, USHORT nBlock, ULONG nSize, USHORT nCur )
+void CheckIdx( BlockInfo** ppInf, sal_uInt16 nBlock, sal_uLong nSize, sal_uInt16 nCur )
{
DBG_ASSERT( !nSize || nCur < nBlock, "BigPtrArray: CurIndex steht falsch" );
- ULONG nIdx = 0;
- for( USHORT nCnt = 0; nCnt < nBlock; ++nCnt, ++ppInf )
+ sal_uLong nIdx = 0;
+ for( sal_uInt16 nCnt = 0; nCnt < nBlock; ++nCnt, ++ppInf )
{
nIdx += (*ppInf)->nElem;
// Array mit Luecken darf es nicht geben
@@ -81,7 +81,7 @@ BigPtrArray::~BigPtrArray()
if( nBlock )
{
BlockInfo** pp = ppInf;
- for( USHORT n = 0; n < nBlock; ++n, ++pp )
+ for( sal_uInt16 n = 0; n < nBlock; ++n, ++pp )
{
delete[] (*pp)->pData;
delete *pp;
@@ -93,9 +93,9 @@ BigPtrArray::~BigPtrArray()
// Auch der Move ist schlicht. Optimieren ist hier wg. der
// Stueckelung des Feldes zwecklos!
-void BigPtrArray::Move( ULONG from, ULONG to )
+void BigPtrArray::Move( sal_uLong from, sal_uLong to )
{
- USHORT cur = Index2Block( from );
+ sal_uInt16 cur = Index2Block( from );
BlockInfo* p = ppInf[ cur ];
ElementPtr pElem = p->pData[ from - p->nStart ];
Insert( pElem, to ); // erst einfuegen, dann loeschen !!!!
@@ -105,7 +105,7 @@ void BigPtrArray::Move( ULONG from, ULONG to )
// das Ende ist EXCLUSIV
-void BigPtrArray::ForEach( ULONG nStart, ULONG nEnd,
+void BigPtrArray::ForEach( sal_uLong nStart, sal_uLong nEnd,
FnForEach fn, void* pArgs )
{
if( nEnd > nSize )
@@ -113,10 +113,10 @@ void BigPtrArray::ForEach( ULONG nStart, ULONG nEnd,
if( nStart < nEnd )
{
- USHORT cur = Index2Block( nStart );
+ sal_uInt16 cur = Index2Block( nStart );
BlockInfo** pp = ppInf + cur;
BlockInfo* p = *pp;
- USHORT nElem = USHORT( nStart - p->nStart );
+ sal_uInt16 nElem = sal_uInt16( nStart - p->nStart );
ElementPtr* pElem = p->pData + nElem;
nElem = p->nElem - nElem;
for(;;)
@@ -137,12 +137,12 @@ void BigPtrArray::ForEach( ULONG nStart, ULONG nEnd,
}
-ElementPtr BigPtrArray::operator[]( ULONG idx ) const
+ElementPtr BigPtrArray::operator[]( sal_uLong idx ) const
{
// weil die Funktion eben doch nicht const ist:
DBG_ASSERT( idx < nSize, "operator[]: Index aussserhalb" );
BigPtrArray* pThis = (BigPtrArray*) this;
- USHORT cur = Index2Block( idx );
+ sal_uInt16 cur = Index2Block( idx );
BlockInfo* p = ppInf[ cur ];
pThis->nCur = cur;
return p->pData[ idx - p->nStart ];
@@ -162,7 +162,7 @@ ElementPtr BigPtrArray::operator[]( ULONG idx ) const
-USHORT BigPtrArray::Index2Block( ULONG pos ) const
+sal_uInt16 BigPtrArray::Index2Block( sal_uLong pos ) const
{
// zuletzt verwendeter Block?
BlockInfo* p = ppInf[ nCur ];
@@ -187,11 +187,11 @@ USHORT BigPtrArray::Index2Block( ULONG pos ) const
}
// Binaere Suche:
// Diese fuehrt immer zum Erfolg
- USHORT lower = 0, upper = nBlock - 1;
- USHORT cur = 0;
+ sal_uInt16 lower = 0, upper = nBlock - 1;
+ sal_uInt16 cur = 0;
for(;;)
{
- USHORT n = lower + ( upper - lower ) / 2;
+ sal_uInt16 n = lower + ( upper - lower ) / 2;
cur = ( n == cur ) ? n+1 : n;
p = ppInf[ cur ];
if( p->nStart <= pos && p->nEnd >= pos )
@@ -208,10 +208,10 @@ USHORT BigPtrArray::Index2Block( ULONG pos ) const
// pos bezeichnet den letzten korrekten Block
-void BigPtrArray::UpdIndex( USHORT pos )
+void BigPtrArray::UpdIndex( sal_uInt16 pos )
{
BlockInfo** pp = ppInf + pos;
- ULONG idx = (*pp)->nEnd + 1;
+ sal_uLong idx = (*pp)->nEnd + 1;
BlockInfo* p;
while( ++pos < nBlock )
{
@@ -228,7 +228,7 @@ void BigPtrArray::UpdIndex( USHORT pos )
-BlockInfo* BigPtrArray::InsBlock( USHORT pos )
+BlockInfo* BigPtrArray::InsBlock( sal_uInt16 pos )
{
if( nBlock == nMaxBlock )
{
@@ -257,7 +257,7 @@ BlockInfo* BigPtrArray::InsBlock( USHORT pos )
return p;
}
-void BigPtrArray::BlockDel( USHORT nDel )
+void BigPtrArray::BlockDel( sal_uInt16 nDel )
{
nBlock = nBlock - nDel;
if( nMaxBlock - nBlock > nBlockGrowSize )
@@ -273,12 +273,12 @@ void BigPtrArray::BlockDel( USHORT nDel )
}
-void BigPtrArray::Insert( const ElementPtr& rElem, ULONG pos )
+void BigPtrArray::Insert( const ElementPtr& rElem, sal_uLong pos )
{
CHECKIDX( ppInf, nBlock, nSize, nCur );
BlockInfo* p;
- USHORT cur;
+ sal_uInt16 cur;
if( !nSize )
// Sonderfall: erstes Element einfuegen
p = InsBlock( cur = 0 );
@@ -354,14 +354,14 @@ void BigPtrArray::Insert( const ElementPtr& rElem, ULONG pos )
DBG_ASSERT( pos < MAXENTRY, "falsche Pos" );
if( pos != p->nElem )
{
- int nCount = p->nElem - USHORT(pos);
+ int nCount = p->nElem - sal_uInt16(pos);
ElementPtr *pFrom = p->pData + p->nElem,
*pTo = pFrom + 1;
while( nCount-- )
++( *--pTo = *--pFrom )->nOffset;
}
// Element eintragen und Indexe updaten
- ((ElementPtr&)rElem)->nOffset = USHORT(pos);
+ ((ElementPtr&)rElem)->nOffset = sal_uInt16(pos);
((ElementPtr&)rElem)->pBlock = p;
p->pData[ pos ] = rElem;
p->nEnd++;
@@ -373,28 +373,28 @@ void BigPtrArray::Insert( const ElementPtr& rElem, ULONG pos )
CHECKIDX( ppInf, nBlock, nSize, nCur );
}
-void BigPtrArray::Remove( ULONG pos, ULONG n )
+void BigPtrArray::Remove( sal_uLong pos, sal_uLong n )
{
CHECKIDX( ppInf, nBlock, nSize, nCur );
- USHORT nBlkdel = 0; // entfernte Bloecke
- USHORT cur = Index2Block( pos ); // aktuelle Blocknr
- USHORT nBlk1 = cur; // 1. behandelter Block
- USHORT nBlk1del = USHRT_MAX; // 1. entfernter Block
+ sal_uInt16 nBlkdel = 0; // entfernte Bloecke
+ sal_uInt16 cur = Index2Block( pos ); // aktuelle Blocknr
+ sal_uInt16 nBlk1 = cur; // 1. behandelter Block
+ sal_uInt16 nBlk1del = USHRT_MAX; // 1. entfernter Block
BlockInfo* p = ppInf[ cur ];
pos -= p->nStart;
- ULONG nElem = n;
+ sal_uLong nElem = n;
while( nElem )
{
- USHORT nel = p->nElem - USHORT(pos);
- if( ULONG(nel) > nElem )
- nel = USHORT(nElem);
+ sal_uInt16 nel = p->nElem - sal_uInt16(pos);
+ if( sal_uLong(nel) > nElem )
+ nel = sal_uInt16(nElem);
// Eventuell Elemente verschieben
- if( ( pos + nel ) < ULONG(p->nElem) )
+ if( ( pos + nel ) < sal_uLong(p->nElem) )
{
ElementPtr *pTo = p->pData + pos,
*pFrom = pTo + nel;
- int nCount = p->nElem - nel - USHORT(pos);
+ int nCount = p->nElem - nel - sal_uInt16(pos);
while( nCount-- )
{
*pTo = *pFrom++;
@@ -422,7 +422,7 @@ void BigPtrArray::Remove( ULONG pos, ULONG n )
if( nBlkdel )
{
// loeschen sollte man immer !!
- for( USHORT i = nBlk1del; i < ( nBlk1del + nBlkdel ); i++ )
+ for( sal_uInt16 i = nBlk1del; i < ( nBlk1del + nBlkdel ); i++ )
delete ppInf[ i ];
if( ( nBlk1del + nBlkdel ) < nBlock )
@@ -458,15 +458,15 @@ void BigPtrArray::Remove( ULONG pos, ULONG n )
}
-void BigPtrArray::Replace( ULONG idx, const ElementPtr& rElem)
+void BigPtrArray::Replace( sal_uLong idx, const ElementPtr& rElem)
{
// weil die Funktion eben doch nicht const ist:
DBG_ASSERT( idx < nSize, "Set: Index aussserhalb" );
BigPtrArray* pThis = (BigPtrArray*) this;
- USHORT cur = Index2Block( idx );
+ sal_uInt16 cur = Index2Block( idx );
BlockInfo* p = ppInf[ cur ];
pThis->nCur = cur;
- ((ElementPtr&)rElem)->nOffset = USHORT(idx - p->nStart);
+ ((ElementPtr&)rElem)->nOffset = sal_uInt16(idx - p->nStart);
((ElementPtr&)rElem)->pBlock = p;
p->pData[ idx - p->nStart ] = rElem;
}
@@ -474,7 +474,7 @@ void BigPtrArray::Replace( ULONG idx, const ElementPtr& rElem)
// Array komprimieren
-USHORT BigPtrArray::Compress( short nMax )
+sal_uInt16 BigPtrArray::Compress( short nMax )
{
CHECKIDX( ppInf, nBlock, nSize, nCur );
@@ -485,17 +485,17 @@ USHORT BigPtrArray::Compress( short nMax )
BlockInfo** pp = ppInf, **qq = pp;
BlockInfo* p;
BlockInfo* pLast(0); // letzter nicht voller Block
- USHORT nLast = 0; // fehlende Elemente
- USHORT nBlkdel = 0; // Anzahl der geloeschte Bloecke
- USHORT nFirstChgPos = USHRT_MAX; // ab welcher Pos gab es die 1. Aenderung?
+ sal_uInt16 nLast = 0; // fehlende Elemente
+ sal_uInt16 nBlkdel = 0; // Anzahl der geloeschte Bloecke
+ sal_uInt16 nFirstChgPos = USHRT_MAX; // ab welcher Pos gab es die 1. Aenderung?
// von Fuell-Prozenten auf uebrige Eintrage umrechnen
nMax = MAXENTRY - (long) MAXENTRY * nMax / 100;
- for( USHORT cur = 0; cur < nBlock; ++cur )
+ for( sal_uInt16 cur = 0; cur < nBlock; ++cur )
{
p = *pp++;
- USHORT n = p->nElem;
+ sal_uInt16 n = p->nElem;
// Testen, ob der noch nicht volle Block so gelassen wird
// dies ist der Fall, wenn der aktuelle Block gesplittet
// werden muesste, der noch nicht volle Block aber bereits
@@ -516,7 +516,7 @@ USHORT BigPtrArray::Compress( short nMax )
// Elemente uebertragen, vom akt. in den letzten
ElementPtr* pElem = pLast->pData + pLast->nElem;
ElementPtr* pFrom = p->pData;
- for( USHORT nCount = n, nOff = pLast->nElem;
+ for( sal_uInt16 nCount = n, nOff = pLast->nElem;
nCount; --nCount, ++pElem )
*pElem = *pFrom++,
(*pElem)->pBlock = pLast,
diff --git a/sw/source/core/bastyp/breakit.cxx b/sw/source/core/bastyp/breakit.cxx
index b47b18e5f6a4..c571e389acf8 100644
--- a/sw/source/core/bastyp/breakit.cxx
+++ b/sw/source/core/bastyp/breakit.cxx
@@ -101,11 +101,11 @@ void SwBreakIt::_GetForbidden( const LanguageType aLang )
m_pForbidden = new i18n::ForbiddenCharacters( aWrap.getForbiddenCharacters() );
}
-USHORT SwBreakIt::GetRealScriptOfText( const String& rTxt,
+sal_uInt16 SwBreakIt::GetRealScriptOfText( const String& rTxt,
xub_StrLen nPos ) const
{
createBreakIterator();
- USHORT nScript = i18n::ScriptType::WEAK;
+ sal_uInt16 nScript = i18n::ScriptType::WEAK;
if( xBreak.is() && rTxt.Len() )
{
if( nPos && nPos == rTxt.Len() )
@@ -134,17 +134,17 @@ USHORT SwBreakIt::GetRealScriptOfText( const String& rTxt,
nScript = xBreak->getScriptType( rTxt, nChgPos );
}
if( i18n::ScriptType::WEAK == nScript )
- nScript = GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() );
+ nScript = GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
return nScript;
}
-USHORT SwBreakIt::GetAllScriptsOfText( const String& rTxt ) const
+sal_uInt16 SwBreakIt::GetAllScriptsOfText( const String& rTxt ) const
{
- const USHORT coAllScripts = ( SCRIPTTYPE_LATIN |
+ const sal_uInt16 coAllScripts = ( SCRIPTTYPE_LATIN |
SCRIPTTYPE_ASIAN |
SCRIPTTYPE_COMPLEX );
createBreakIterator();
- USHORT nRet = 0, nScript;
+ sal_uInt16 nRet = 0, nScript;
if( !xBreak.is() )
nRet = coAllScripts;
else if( rTxt.Len() )
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 4e27f465a4df..ba6aa92fadb6 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -216,16 +216,16 @@ _CalcOp* FindOperator( const String& rSrch )
//-----------------------------------------------------------------------------
-SwHash* Find( const String& rStr, SwHash** ppTable, USHORT nTblSize,
- USHORT* pPos )
+SwHash* Find( const String& rStr, SwHash** ppTable, sal_uInt16 nTblSize,
+ sal_uInt16* pPos )
{
- ULONG ii = 0;
+ sal_uLong ii = 0;
for( xub_StrLen n = 0; n < rStr.Len(); ++n )
ii = ii << 1 ^ rStr.GetChar( n );
ii %= nTblSize;
if( pPos )
- *pPos = (USHORT)ii;
+ *pPos = (sal_uInt16)ii;
for( SwHash* pEntry = *(ppTable+ii); pEntry; pEntry = pEntry->pNext )
if( rStr == pEntry->aStr )
@@ -237,7 +237,7 @@ inline LanguageType GetDocAppScriptLang( SwDoc& rDoc )
{
return ((SvxLanguageItem&)rDoc.GetDefault(
GetWhichOfScript( RES_CHRATR_LANGUAGE,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ))
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ))
)).GetLanguage();
}
@@ -331,25 +331,25 @@ static const sal_Char* const sNTypeTab[ 27 ] =
// diese sind mit doppelten HashIds
sNType25, sNType26
};
-static USHORT const aHashValue[ 27 ] =
+static sal_uInt16 const aHashValue[ 27 ] =
{
34, 38, 43, 7, 18, 32, 22, 29, 30, 33, 3,
28, 24, 40, 9, 11, 26, 45, 4, 23, 36, 44, 19, 5, 1,
// diese sind mit doppelten HashIds
11, 38
};
-static USHORT const aAdrToken[ 12 ] =
+static sal_uInt16 const aAdrToken[ 12 ] =
{
USER_OPT_COMPANY, USER_OPT_STREET, USER_OPT_COUNTRY, USER_OPT_ZIP,
USER_OPT_CITY, USER_OPT_TITLE, USER_OPT_POSITION, USER_OPT_TELEPHONEWORK,
USER_OPT_TELEPHONEHOME, USER_OPT_FAX, USER_OPT_EMAIL, USER_OPT_STATE
};
-static USHORT SwDocStat::* const aDocStat1[ 3 ] =
+static sal_uInt16 SwDocStat::* const aDocStat1[ 3 ] =
{
&SwDocStat::nTbl, &SwDocStat::nGrf, &SwDocStat::nOLE
};
-static ULONG SwDocStat::* const aDocStat2[ 4 ] =
+static sal_uLong SwDocStat::* const aDocStat2[ 4 ] =
{
&SwDocStat::nPage, &SwDocStat::nPara,
&SwDocStat::nWord, &SwDocStat::nChar
@@ -363,7 +363,7 @@ static ULONG SwDocStat::* const aDocStat2[ 4 ] =
SwSbxValue nVal;
String sTmpStr;
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < 25; ++n )
{
@@ -371,8 +371,8 @@ static ULONG SwDocStat::* const aDocStat2[ 4 ] =
VarTable[ aHashValue[ n ] ] = new SwCalcExp( sTmpStr, nVal, 0 );
}
- ((SwCalcExp*)VarTable[ aHashValue[ 0 ] ])->nValue.PutBool( FALSE );
- ((SwCalcExp*)VarTable[ aHashValue[ 1 ] ])->nValue.PutBool( TRUE );
+ ((SwCalcExp*)VarTable[ aHashValue[ 0 ] ])->nValue.PutBool( sal_False );
+ ((SwCalcExp*)VarTable[ aHashValue[ 1 ] ])->nValue.PutBool( sal_True );
((SwCalcExp*)VarTable[ aHashValue[ 2 ] ])->nValue.PutDouble( F_PI );
((SwCalcExp*)VarTable[ aHashValue[ 3 ] ])->nValue.PutDouble( 2.7182818284590452354 );
@@ -405,7 +405,7 @@ static ULONG SwDocStat::* const aDocStat2[ 4 ] =
SwCalc::~SwCalc()
{
- for( USHORT n = 0; n < TBLSZ; ++n )
+ for( sal_uInt16 n = 0; n < TBLSZ; ++n )
delete VarTable[n];
if( pLclData != m_aSysLocale.GetLocaleDataPtr() )
delete pLclData;
@@ -444,15 +444,15 @@ SwSbxValue SwCalc::Calculate( const String& rStr )
/******************************************************************************
|*
-|* String SwCalc::GetStrResult( SwSbxValue nValue, BOOL bRound = TRUE )
-|* Beschreibung Der Parameter bRound ist auf TRUE defaultet und darf
-|* nur beim errechnen von Tabellenzellen auf FALSE gesetzt
+|* String SwCalc::GetStrResult( SwSbxValue nValue, sal_Bool bRound = sal_True )
+|* Beschreibung Der Parameter bRound ist auf sal_True defaultet und darf
+|* nur beim errechnen von Tabellenzellen auf sal_False gesetzt
|* werden, damit keine Rundungsfehler beim zusammenstellen
|* der Formel entstehen.
|*
|******************************************************************************/
-String SwCalc::GetStrResult( const SwSbxValue& rVal, BOOL bRound )
+String SwCalc::GetStrResult( const SwSbxValue& rVal, sal_Bool bRound )
{
if( !rVal.IsDouble() )
return rVal.GetString();
@@ -461,7 +461,7 @@ String SwCalc::GetStrResult( const SwSbxValue& rVal, BOOL bRound )
}
-String SwCalc::GetStrResult( double nValue, BOOL )
+String SwCalc::GetStrResult( double nValue, sal_Bool )
{
if( nValue >= DBL_MAX )
switch( eError )
@@ -476,7 +476,7 @@ String SwCalc::GetStrResult( double nValue, BOOL )
default : return RESOURCE->aCalc_Default;
}
- USHORT nDec = 15; //pLclData->getNumDigits();
+ sal_uInt16 nDec = 15; //pLclData->getNumDigits();
String aRetStr( ::rtl::math::doubleToUString( nValue,
rtl_math_StringFormat_Automatic,
nDec,
@@ -501,14 +501,14 @@ SwCalcExp* SwCalc::VarInsert( const String &rStr )
/******************************************************************************
|*
-|* SwCalcExp* SwCalc::VarLook( const String& , USHORT ins )
+|* SwCalcExp* SwCalc::VarLook( const String& , sal_uInt16 ins )
|*
|******************************************************************************/
-SwCalcExp* SwCalc::VarLook( const String& rStr, USHORT ins )
+SwCalcExp* SwCalc::VarLook( const String& rStr, sal_uInt16 ins )
{
aErrExpr.nValue.SetVoidValue(false);
- USHORT ii = 0;
+ sal_uInt16 ii = 0;
String aStr( rStr );
pCharClass->toLower( aStr );
@@ -542,7 +542,7 @@ SwCalcExp* SwCalc::VarLook( const String& rStr, USHORT ins )
else if( !pUFld->IsValid() )
{
// Die aktuellen Werte sichern . . .
- USHORT nOld_ListPor = nListPor;
+ sal_uInt16 nOld_ListPor = nListPor;
SwSbxValue nOld_LastLeft = nLastLeft;
SwSbxValue nOld_NumberValue = nNumberValue;
xub_StrLen nOld_CommandPos = nCommandPos;
@@ -600,7 +600,7 @@ SwCalcExp* SwCalc::VarLook( const String& rStr, USHORT ins )
return &aErrExpr;
}
- ULONG nTmpRec = 0;
+ sal_uLong nTmpRec = 0;
if( 0 != ( pFnd = Find( sDBNum, VarTable, TBLSZ ) ) )
nTmpRec = ((SwCalcExp*)pFnd)->nValue.GetULong();
@@ -655,7 +655,7 @@ SwCalcExp* SwCalc::VarLook( const String& rStr, USHORT ins )
/******************************************************************************
|*
-|* BOOL SwCalc::VarChange( const String& rStr, const SwSbxValue nValue )
+|* sal_Bool SwCalc::VarChange( const String& rStr, const SwSbxValue nValue )
|*
|******************************************************************************/
@@ -670,7 +670,7 @@ void SwCalc::VarChange( const String& rStr, const SwSbxValue& rValue )
String aStr( rStr );
pCharClass->toLower( aStr );
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
SwCalcExp* pFnd = (SwCalcExp*)Find( aStr, VarTable, TBLSZ, &nPos );
if( !pFnd )
@@ -685,17 +685,17 @@ void SwCalc::VarChange( const String& rStr, const SwSbxValue& rValue )
/******************************************************************************
|*
-|* BOOL SwCalc::Push( const void* pPtr )
+|* sal_Bool SwCalc::Push( const void* pPtr )
|*
|******************************************************************************/
-BOOL SwCalc::Push( const VoidPtr pPtr )
+sal_Bool SwCalc::Push( const VoidPtr pPtr )
{
if( USHRT_MAX != aRekurStk.GetPos( pPtr ) )
- return FALSE;
+ return sal_False;
aRekurStk.Insert( pPtr, aRekurStk.Count() );
- return TRUE;
+ return sal_True;
}
/******************************************************************************
@@ -738,13 +738,13 @@ if( !nUseOld )
coStartFlags, aEmptyStr,
coContFlags, aEmptyStr );
- BOOL bSetError = TRUE;
+ sal_Bool bSetError = sal_True;
xub_StrLen nRealStt = nCommandPos + (xub_StrLen)aRes.LeadingWhiteSpace;
if( aRes.TokenType & (KParseType::ASC_NUMBER | KParseType::UNI_NUMBER) )
{
nNumberValue.PutDouble( aRes.Value );
eCurrOper = CALC_NUMBER;
- bSetError = FALSE;
+ bSetError = sal_False;
}
else if( aRes.TokenType & KParseType::IDENTNAME )
{
@@ -788,20 +788,20 @@ if( !nUseOld )
}
aVarName = aName;
eCurrOper = CALC_NAME;
- bSetError = FALSE;
+ bSetError = sal_False;
}
else if ( aRes.TokenType & KParseType::DOUBLE_QUOTE_STRING )
{
nNumberValue.PutString( String( aRes.DequotedNameOrString ));
eCurrOper = CALC_NUMBER;
- bSetError = FALSE;
+ bSetError = sal_False;
}
else if( aRes.TokenType & KParseType::ONE_SINGLE_CHAR )
{
String aName( sCommand.Copy( nRealStt, static_cast<xub_StrLen>(aRes.EndPos) - nRealStt ));
if( 1 == aName.Len() )
{
- bSetError = FALSE;
+ bSetError = sal_False;
sal_Unicode ch = aName.GetChar( 0 );
switch( ch )
{
@@ -878,14 +878,14 @@ if( !nUseOld )
eCurrOper = CALC_NAME;
}
else
- bSetError = TRUE;
+ bSetError = sal_True;
}
else
- bSetError = TRUE;
+ bSetError = sal_True;
break;
default:
- bSetError = TRUE;
+ bSetError = sal_True;
break;
}
}
@@ -897,10 +897,10 @@ if( !nUseOld )
{
sal_Unicode ch = aName.GetChar(0);
- bSetError = TRUE;
+ bSetError = sal_True;
if ('<' == ch || '>' == ch)
{
- bSetError = FALSE;
+ bSetError = sal_False;
SwCalcOper eTmp2 = ('<' == ch) ? CALC_LEQ : CALC_GEQ;
eCurrOper = ('<' == ch) ? CALC_LES : CALC_GRE;
@@ -908,14 +908,14 @@ if( !nUseOld )
if( 2 == aName.Len() && '=' == aName.GetChar(1) )
eCurrOper = eTmp2;
else if( 1 != aName.Len() )
- bSetError = TRUE;
+ bSetError = sal_True;
}
}
}
else if( nRealStt == sCommand.Len() )
{
eCurrOper = CALC_ENDCALC;
- bSetError = FALSE;
+ bSetError = sal_False;
}
if( bSetError )
@@ -1030,15 +1030,15 @@ else
case '[': {
String aStr;
- BOOL bIgnore = FALSE;
+ sal_Bool bIgnore = sal_False;
do {
while( 0 != ( ch = NextCh( sCommand, nCommandPos ))
&& ch != ']' )
{
if( !bIgnore && '\\' == ch )
- bIgnore = TRUE;
+ bIgnore = sal_True;
else if( bIgnore )
- bIgnore = FALSE;
+ bIgnore = sal_False;
aStr += ch;
}
@@ -1135,26 +1135,26 @@ SwSbxValue SwCalc::Term()
nLastLeft = left;
for(;;)
{
- USHORT nSbxOper = USHRT_MAX;
+ sal_uInt16 nSbxOper = USHRT_MAX;
switch( eCurrOper )
{
case CALC_AND: {
GetToken();
- BOOL bB = Prim().GetBool();
+ sal_Bool bB = Prim().GetBool();
left.PutBool( left.GetBool() && bB );
}
break;
case CALC_OR: {
GetToken();
- BOOL bB = Prim().GetBool();
+ sal_Bool bB = Prim().GetBool();
left.PutBool( left.GetBool() || bB );
}
break;
case CALC_XOR: {
GetToken();
- BOOL bR = Prim().GetBool();
- BOOL bL = left.GetBool();
+ sal_Bool bR = Prim().GetBool();
+ sal_Bool bL = left.GetBool();
left.PutBool( (bL && !bR) || (!bL && bR) );
}
break;
@@ -1191,7 +1191,7 @@ SwSbxValue SwCalc::Term()
SwSbxValue e = Prim();
sal_Int32 nYear = (sal_Int32) floor( left.GetDouble() );
nYear = nYear & 0x0000FFFF;
- sal_Int32 nMonth = (INT32) floor( e.GetDouble() );
+ sal_Int32 nMonth = (sal_Int32) floor( e.GetDouble() );
nMonth = ( nMonth & 0x000000FF ) << 16;
left.PutLong( nMonth + nYear );
eCurrOper = CALC_DAY;
@@ -1215,7 +1215,7 @@ SwSbxValue SwCalc::Term()
double fVal = 0;
double fFac = 1;
- INT32 nDec = (INT32) floor( e.GetDouble() );
+ sal_Int32 nDec = (sal_Int32) floor( e.GetDouble() );
if( nDec < -20 || nDec > 20 )
{
eError = CALC_OVERFLOW;
@@ -1223,24 +1223,24 @@ SwSbxValue SwCalc::Term()
return left;
}
fVal = left.GetDouble();
- USHORT i;
+ sal_uInt16 i;
if( nDec >= 0)
- for (i = 0; i < (USHORT) nDec; ++i )
+ for (i = 0; i < (sal_uInt16) nDec; ++i )
fFac *= 10.0;
else
- for (i = 0; i < (USHORT) -nDec; ++i )
+ for (i = 0; i < (sal_uInt16) -nDec; ++i )
fFac /= 10.0;
fVal *= fFac;
- BOOL bSign;
+ sal_Bool bSign;
if (fVal < 0.0)
{
fVal *= -1.0;
- bSign = TRUE;
+ bSign = sal_True;
}
else
- bSign = FALSE;
+ bSign = sal_False;
// runden
double fNum = fVal; // find the exponent
@@ -1308,7 +1308,7 @@ SwSbxValue SwCalc::Prim()
pfCalc pFnc = 0;
- BOOL bChkTrig = FALSE, bChkPow = FALSE;
+ sal_Bool bChkTrig = sal_False, bChkPow = sal_False;
switch( eCurrOper )
{
@@ -1316,8 +1316,8 @@ SwSbxValue SwCalc::Prim()
case CALC_COS: pFnc = &cos; break;
case CALC_TAN: pFnc = &tan; break;
case CALC_ATAN: pFnc = &atan; break;
- case CALC_ASIN: pFnc = &asin; bChkTrig = TRUE; break;
- case CALC_ACOS: pFnc = &acos; bChkTrig = TRUE; break;
+ case CALC_ASIN: pFnc = &asin; bChkTrig = sal_True; break;
+ case CALC_ACOS: pFnc = &acos; bChkTrig = sal_True; break;
case CALC_NOT: {
GetToken();
@@ -1352,7 +1352,7 @@ SwSbxValue SwCalc::Prim()
else
{
nErg = nNumberValue;
- bChkPow = TRUE;
+ bChkPow = sal_True;
}
break;
@@ -1365,7 +1365,7 @@ SwSbxValue SwCalc::Prim()
else
{
nErg = VarLook( aVarName )->nValue;
- bChkPow = TRUE;
+ bChkPow = sal_True;
}
break;
@@ -1381,7 +1381,7 @@ SwSbxValue SwCalc::Prim()
else
{
GetToken();
- bChkPow = TRUE; // in order for =(7)^2 to work
+ bChkPow = sal_True; // in order for =(7)^2 to work
}
}
break;
@@ -1557,11 +1557,10 @@ lcl_Str2Double( const String& rCommand, xub_StrLen& rCommandPos, double& rVal,
}
/******************************************************************************
- * Methode : BOOL SwCalc::Str2Double( double& )
- * Beschreibung:
+ * Methode : sal_Bool SwCalc::Str2Double( double& )
******************************************************************************/
bool SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
- double& rVal, const LocaleDataWrapper* const pLclData )
+ double& rVal, const LocaleDataWrapper* const pLclData )
{
const SvtSysLocale aSysLocale;
return lcl_Str2Double( rCommand, rCommandPos, rVal,
@@ -1569,14 +1568,15 @@ bool SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
}
bool SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
- double& rVal, SwDoc* const pDoc )
+ double& rVal, SwDoc* const pDoc )
{
const SvtSysLocale aSysLocale;
::std::auto_ptr<const LocaleDataWrapper> pLclD;
if( pDoc )
{
LanguageType eLang = GetDocAppScriptLang( *pDoc );
- if( eLang != SvxLocaleToLanguage( aSysLocale.GetLocaleData().getLocale() ) )
+ if (eLang !=
+ SvxLocaleToLanguage(aSysLocale.GetLocaleData().getLocale()))
{
pLclD.reset( new LocaleDataWrapper(
::comphelper::getProcessServiceFactory(),
@@ -1592,10 +1592,10 @@ bool SwCalc::Str2Double( const String& rCommand, xub_StrLen& rCommandPos,
//------------------------------------------------------------------------------
-BOOL SwCalc::IsValidVarName( const String& rStr,
+sal_Bool SwCalc::IsValidVarName( const String& rStr,
String* pValidName )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
using namespace ::com::sun::star::i18n;
{
// Parse any token.
@@ -1637,9 +1637,9 @@ SwHash::~SwHash()
delete pNext;
}
-void DeleteHashTable( SwHash **ppHashTable, USHORT nCount )
+void DeleteHashTable( SwHash **ppHashTable, sal_uInt16 nCount )
{
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
delete *(ppHashTable+i);
delete [] ppHashTable;
}
@@ -1657,7 +1657,7 @@ SwSbxValue::~SwSbxValue()
{
}
-BOOL SwSbxValue::GetBool() const
+sal_Bool SwSbxValue::GetBool() const
{
return SbxSTRING == GetType() ? 0 != GetString().Len()
: 0 != SbxValue::GetBool();
diff --git a/sw/source/core/bastyp/index.cxx b/sw/source/core/bastyp/index.cxx
index f40115c68143..32457b85c960 100644
--- a/sw/source/core/bastyp/index.cxx
+++ b/sw/source/core/bastyp/index.cxx
@@ -206,7 +206,7 @@ SwIndex& SwIndex::operator=( const SwIndex& rIdx )
Remove();
pArray = rIdx.pArray;
pNext = pPrev = 0;
- bEqual = FALSE;
+ bEqual = sal_False;
}
else
bEqual = rIdx.nIndex == nIndex;
@@ -394,7 +394,7 @@ xub_StrLen SwIndex::operator-=( const SwIndex & rIndex )
|* SwIndex::operator<( const SwIndex & )
*************************************************************************/
-BOOL SwIndex::operator<( const SwIndex & rIndex ) const
+sal_Bool SwIndex::operator<( const SwIndex & rIndex ) const
{
OSL_ENSURE( pArray == rIndex.pArray, "Attempt to compare indices into different arrays.");
return nIndex < rIndex.nIndex;
@@ -404,7 +404,7 @@ BOOL SwIndex::operator<( const SwIndex & rIndex ) const
|* SwIndex::operator<=( const SwIndex & )
*************************************************************************/
-BOOL SwIndex::operator<=( const SwIndex & rIndex ) const
+sal_Bool SwIndex::operator<=( const SwIndex & rIndex ) const
{
OSL_ENSURE( pArray == rIndex.pArray, "Attempt to compare indices into different arrays.");
return nIndex <= rIndex.nIndex;
@@ -414,7 +414,7 @@ BOOL SwIndex::operator<=( const SwIndex & rIndex ) const
|* SwIndex::operator>( const SwIndex & )
*************************************************************************/
-BOOL SwIndex::operator>( const SwIndex & rIndex ) const
+sal_Bool SwIndex::operator>( const SwIndex & rIndex ) const
{
OSL_ENSURE( pArray == rIndex.pArray, "Attempt to compare indices into different arrays.");
return nIndex > rIndex.nIndex;
@@ -424,7 +424,7 @@ BOOL SwIndex::operator>( const SwIndex & rIndex ) const
|* SwIndex::operator>=( const SwIndex & )
*************************************************************************/
-BOOL SwIndex::operator>=( const SwIndex & rIndex ) const
+sal_Bool SwIndex::operator>=( const SwIndex & rIndex ) const
{
OSL_ENSURE( pArray == rIndex.pArray, "Attempt to compare indices into different arrays.");
return nIndex >= rIndex.nIndex;
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index 5b7606d940d8..270385c63bbb 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -144,14 +144,14 @@ extern void ClearFEShellTabCols();
|* einige Bereiche fuer die Set in Collections / Nodes
|*************************************************************************/
// AttrSet-Range fuer die 2 Break-Attribute
-USHORT aBreakSetRange[] = {
+sal_uInt16 aBreakSetRange[] = {
RES_PAGEDESC, RES_BREAK,
0 };
// AttrSet-Range fuer die TxtFmtColl
// list attributes ( RES_PARATR_LIST_BEGIN - RES_PARATR_LIST_END ) are not
// included in the paragraph style's itemset.
-USHORT aTxtFmtCollSetRange[] = {
+sal_uInt16 aTxtFmtCollSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -160,7 +160,7 @@ USHORT aTxtFmtCollSetRange[] = {
};
// AttrSet-Range fuer die GrfFmtColl
-USHORT aGrfFmtCollSetRange[] = {
+sal_uInt16 aGrfFmtCollSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_GRFATR_BEGIN, RES_GRFATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
@@ -168,7 +168,7 @@ USHORT aGrfFmtCollSetRange[] = {
};
// AttrSet-Range fuer die TextNode
-USHORT aTxtNodeSetRange[] = {
+sal_uInt16 aTxtNodeSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -178,14 +178,14 @@ USHORT aTxtNodeSetRange[] = {
};
// AttrSet-Range fuer die NoTxtNode
-USHORT aNoTxtNodeSetRange[] = {
+sal_uInt16 aNoTxtNodeSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_GRFATR_BEGIN, RES_GRFATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
-USHORT aTableSetRange[] = {
+sal_uInt16 aTableSetRange[] = {
RES_FILL_ORDER, RES_FRM_SIZE,
RES_LR_SPACE, RES_BREAK,
RES_BACKGROUND, RES_SHADOW,
@@ -200,7 +200,7 @@ USHORT aTableSetRange[] = {
0
};
-USHORT aTableLineSetRange[] = {
+sal_uInt16 aTableLineSetRange[] = {
RES_FILL_ORDER, RES_FRM_SIZE,
RES_LR_SPACE, RES_UL_SPACE,
RES_BACKGROUND, RES_SHADOW,
@@ -211,7 +211,7 @@ USHORT aTableLineSetRange[] = {
0
};
-USHORT aTableBoxSetRange[] = {
+sal_uInt16 aTableBoxSetRange[] = {
RES_FILL_ORDER, RES_FRM_SIZE,
RES_LR_SPACE, RES_UL_SPACE,
RES_BACKGROUND, RES_SHADOW,
@@ -224,21 +224,21 @@ USHORT aTableBoxSetRange[] = {
};
// AttrSet-Range fuer die SwFrmFmt
-USHORT aFrmFmtSetRange[] = {
+sal_uInt16 aFrmFmtSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
// AttrSet-Range fuer die SwCharFmt
-USHORT aCharFmtSetRange[] = {
+sal_uInt16 aCharFmtSetRange[] = {
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
// AttrSet-Range fuer die character autostyles
-USHORT aCharAutoFmtSetRange[] = {
+sal_uInt16 aCharAutoFmtSetRange[] = {
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
@@ -246,7 +246,7 @@ USHORT aCharAutoFmtSetRange[] = {
};
// AttrSet-Range fuer die SwPageDescFmt
-USHORT aPgFrmFmtSetRange[] = {
+sal_uInt16 aPgFrmFmtSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
@@ -421,13 +421,13 @@ SfxItemInfo aSlotTab[] =
};
-USHORT* SwAttrPool::pVersionMap1 = 0;
-USHORT* SwAttrPool::pVersionMap2 = 0;
-USHORT* SwAttrPool::pVersionMap3 = 0;
-USHORT* SwAttrPool::pVersionMap4 = 0;
+sal_uInt16* SwAttrPool::pVersionMap1 = 0;
+sal_uInt16* SwAttrPool::pVersionMap2 = 0;
+sal_uInt16* SwAttrPool::pVersionMap3 = 0;
+sal_uInt16* SwAttrPool::pVersionMap4 = 0;
// #i18732#
-USHORT* SwAttrPool::pVersionMap5 = 0;
-USHORT* SwAttrPool::pVersionMap6 = 0;
+sal_uInt16* SwAttrPool::pVersionMap5 = 0;
+sal_uInt16* SwAttrPool::pVersionMap6 = 0;
SwIndexReg* SwIndexReg::pEmptyIndexArray = 0;
const sal_Char* pMarkToTable = "table";
@@ -482,9 +482,9 @@ void _InitCore()
aAttrTab[ RES_CHRATR_WEIGHT- POOLATTR_BEGIN ] = new SvxWeightItem( WEIGHT_NORMAL, RES_CHRATR_WEIGHT );
aAttrTab[ RES_CHRATR_WORDLINEMODE- POOLATTR_BEGIN ] = new SvxWordLineModeItem( sal_False, RES_CHRATR_WORDLINEMODE );
aAttrTab[ RES_CHRATR_AUTOKERN- POOLATTR_BEGIN ] = new SvxAutoKernItem( sal_False, RES_CHRATR_AUTOKERN );
- aAttrTab[ RES_CHRATR_BLINK - POOLATTR_BEGIN ] = new SvxBlinkItem( FALSE, RES_CHRATR_BLINK );
- aAttrTab[ RES_CHRATR_NOHYPHEN - POOLATTR_BEGIN ] = new SvxNoHyphenItem( TRUE, RES_CHRATR_NOHYPHEN );
- aAttrTab[ RES_CHRATR_NOLINEBREAK- POOLATTR_BEGIN ] = new SvxNoLinebreakItem( TRUE, RES_CHRATR_NOLINEBREAK );
+ aAttrTab[ RES_CHRATR_BLINK - POOLATTR_BEGIN ] = new SvxBlinkItem( sal_False, RES_CHRATR_BLINK );
+ aAttrTab[ RES_CHRATR_NOHYPHEN - POOLATTR_BEGIN ] = new SvxNoHyphenItem( sal_True, RES_CHRATR_NOHYPHEN );
+ aAttrTab[ RES_CHRATR_NOLINEBREAK- POOLATTR_BEGIN ] = new SvxNoLinebreakItem( sal_True, RES_CHRATR_NOLINEBREAK );
aAttrTab[ RES_CHRATR_BACKGROUND - POOLATTR_BEGIN ] = new SvxBrushItem( RES_CHRATR_BACKGROUND );
// CJK-Attributes
@@ -503,10 +503,10 @@ void _InitCore()
aAttrTab[ RES_CHRATR_ROTATE - POOLATTR_BEGIN ] = new SvxCharRotateItem( 0, sal_False, RES_CHRATR_ROTATE );
aAttrTab[ RES_CHRATR_EMPHASIS_MARK - POOLATTR_BEGIN ] = new SvxEmphasisMarkItem( EMPHASISMARK_NONE, RES_CHRATR_EMPHASIS_MARK );
- aAttrTab[ RES_CHRATR_TWO_LINES - POOLATTR_BEGIN ] = new SvxTwoLinesItem( FALSE, 0, 0, RES_CHRATR_TWO_LINES );
+ aAttrTab[ RES_CHRATR_TWO_LINES - POOLATTR_BEGIN ] = new SvxTwoLinesItem( sal_False, 0, 0, RES_CHRATR_TWO_LINES );
aAttrTab[ RES_CHRATR_SCALEW - POOLATTR_BEGIN ] = new SvxCharScaleWidthItem( 100, RES_CHRATR_SCALEW );
aAttrTab[ RES_CHRATR_RELIEF - POOLATTR_BEGIN ] = new SvxCharReliefItem( RELIEF_NONE, RES_CHRATR_RELIEF );
- aAttrTab[ RES_CHRATR_HIDDEN - POOLATTR_BEGIN ] = new SvxCharHiddenItem( FALSE, RES_CHRATR_HIDDEN );
+ aAttrTab[ RES_CHRATR_HIDDEN - POOLATTR_BEGIN ] = new SvxCharHiddenItem( sal_False, RES_CHRATR_HIDDEN );
aAttrTab[ RES_CHRATR_OVERLINE- POOLATTR_BEGIN ] = new SvxOverlineItem( UNDERLINE_NONE, RES_CHRATR_OVERLINE );
// CharakterAttr - Dummies
@@ -548,12 +548,12 @@ void _InitCore()
aAttrTab[ RES_PARATR_HYPHENZONE- POOLATTR_BEGIN ] = pItem;
aAttrTab[ RES_PARATR_DROP- POOLATTR_BEGIN ] = new SwFmtDrop;
- aAttrTab[ RES_PARATR_REGISTER - POOLATTR_BEGIN ] = new SwRegisterItem( FALSE );
+ aAttrTab[ RES_PARATR_REGISTER - POOLATTR_BEGIN ] = new SwRegisterItem( sal_False );
aAttrTab[ RES_PARATR_NUMRULE - POOLATTR_BEGIN ] = new SwNumRuleItem( aEmptyStr );
- aAttrTab[ RES_PARATR_SCRIPTSPACE - POOLATTR_BEGIN ] = new SvxScriptSpaceItem( TRUE, RES_PARATR_SCRIPTSPACE );
- aAttrTab[ RES_PARATR_HANGINGPUNCTUATION - POOLATTR_BEGIN ] = new SvxHangingPunctuationItem( TRUE, RES_PARATR_HANGINGPUNCTUATION );
- aAttrTab[ RES_PARATR_FORBIDDEN_RULES - POOLATTR_BEGIN ] = new SvxForbiddenRuleItem( TRUE, RES_PARATR_FORBIDDEN_RULES );
+ aAttrTab[ RES_PARATR_SCRIPTSPACE - POOLATTR_BEGIN ] = new SvxScriptSpaceItem( sal_True, RES_PARATR_SCRIPTSPACE );
+ aAttrTab[ RES_PARATR_HANGINGPUNCTUATION - POOLATTR_BEGIN ] = new SvxHangingPunctuationItem( sal_True, RES_PARATR_HANGINGPUNCTUATION );
+ aAttrTab[ RES_PARATR_FORBIDDEN_RULES - POOLATTR_BEGIN ] = new SvxForbiddenRuleItem( sal_True, RES_PARATR_FORBIDDEN_RULES );
aAttrTab[ RES_PARATR_VERTALIGN - POOLATTR_BEGIN ] = new SvxParaVertAlignItem( 0, RES_PARATR_VERTALIGN );
aAttrTab[ RES_PARATR_SNAPTOGRID - POOLATTR_BEGIN ] = new SvxParaGridItem( sal_True, RES_PARATR_SNAPTOGRID );
aAttrTab[ RES_PARATR_CONNECT_BORDER - POOLATTR_BEGIN ] = new SwParaConnectBorderItem;
@@ -562,9 +562,9 @@ void _InitCore()
aAttrTab[ RES_PARATR_LIST_ID - POOLATTR_BEGIN ] = new SfxStringItem( RES_PARATR_LIST_ID, aEmptyStr );
aAttrTab[ RES_PARATR_LIST_LEVEL - POOLATTR_BEGIN ] = new SfxInt16Item( RES_PARATR_LIST_LEVEL, 0 );
- aAttrTab[ RES_PARATR_LIST_ISRESTART - POOLATTR_BEGIN ] = new SfxBoolItem( RES_PARATR_LIST_ISRESTART, FALSE );
+ aAttrTab[ RES_PARATR_LIST_ISRESTART - POOLATTR_BEGIN ] = new SfxBoolItem( RES_PARATR_LIST_ISRESTART, sal_False );
aAttrTab[ RES_PARATR_LIST_RESTARTVALUE - POOLATTR_BEGIN ] = new SfxInt16Item( RES_PARATR_LIST_RESTARTVALUE, 1 );
- aAttrTab[ RES_PARATR_LIST_ISCOUNTED - POOLATTR_BEGIN ] = new SfxBoolItem( RES_PARATR_LIST_ISCOUNTED, TRUE );
+ aAttrTab[ RES_PARATR_LIST_ISCOUNTED - POOLATTR_BEGIN ] = new SfxBoolItem( RES_PARATR_LIST_ISCOUNTED, sal_True );
aAttrTab[ RES_FILL_ORDER- POOLATTR_BEGIN ] = new SwFmtFillOrder;
aAttrTab[ RES_FRM_SIZE- POOLATTR_BEGIN ] = new SwFmtFrmSize;
@@ -588,7 +588,7 @@ void _InitCore()
aAttrTab[ RES_SHADOW- POOLATTR_BEGIN ] = new SvxShadowItem( RES_SHADOW );
aAttrTab[ RES_FRMMACRO- POOLATTR_BEGIN ] = new SvxMacroItem( RES_FRMMACRO );
aAttrTab[ RES_COL- POOLATTR_BEGIN ] = new SwFmtCol;
- aAttrTab[ RES_KEEP - POOLATTR_BEGIN ] = new SvxFmtKeepItem( FALSE, RES_KEEP );
+ aAttrTab[ RES_KEEP - POOLATTR_BEGIN ] = new SvxFmtKeepItem( sal_False, RES_KEEP );
aAttrTab[ RES_URL - POOLATTR_BEGIN ] = new SwFmtURL();
aAttrTab[ RES_EDIT_IN_READONLY - POOLATTR_BEGIN ] = new SwFmtEditInReadonly;
aAttrTab[ RES_LAYOUT_SPLIT - POOLATTR_BEGIN ] = new SwFmtLayoutSplit;
@@ -603,9 +603,9 @@ void _InitCore()
aAttrTab[ RES_ROW_SPLIT - POOLATTR_BEGIN ] = new SwFmtRowSplit;
// #i18732#
- aAttrTab[ RES_FOLLOW_TEXT_FLOW - POOLATTR_BEGIN ] = new SwFmtFollowTextFlow( TRUE );
+ aAttrTab[ RES_FOLLOW_TEXT_FLOW - POOLATTR_BEGIN ] = new SwFmtFollowTextFlow( sal_True );
// collapsing borders #i29550#
- aAttrTab[ RES_COLLAPSING_BORDERS - POOLATTR_BEGIN ] = new SfxBoolItem( RES_COLLAPSING_BORDERS, FALSE );
+ aAttrTab[ RES_COLLAPSING_BORDERS - POOLATTR_BEGIN ] = new SfxBoolItem( RES_COLLAPSING_BORDERS, sal_False );
// #i28701#
// #i35017# - constant name has changed
aAttrTab[ RES_WRAP_INFLUENCE_ON_OBJPOS - POOLATTR_BEGIN ] =
@@ -656,8 +656,8 @@ void _InitCore()
// - RES_CHRATR_NOLINEBREAK
// - RES_PARATR_REGISTER
// + 2 Dummies fuer die einzelnen "Bereiche"
- SwAttrPool::pVersionMap1 = new USHORT[ 60 ];
- USHORT i;
+ SwAttrPool::pVersionMap1 = new sal_uInt16[ 60 ];
+ sal_uInt16 i;
for( i = 1; i <= 17; i++ )
SwAttrPool::pVersionMap1[ i-1 ] = i;
for ( i = 18; i <= 27; ++i )
@@ -671,7 +671,7 @@ void _InitCore()
// 2. Version - neue Attribute:
// 10 Dummies fuer den Frame "Bereich"
- SwAttrPool::pVersionMap2 = new USHORT[ 75 ];
+ SwAttrPool::pVersionMap2 = new sal_uInt16[ 75 ];
for( i = 1; i <= 70; i++ )
SwAttrPool::pVersionMap2[ i-1 ] = i;
for ( i = 71; i <= 75; ++i )
@@ -680,7 +680,7 @@ void _InitCore()
// 3. Version - neue Attribute:
// neue Attribute und Dummies fuer die CJK-Version
// und neue Grafik-Attribute
- SwAttrPool::pVersionMap3 = new USHORT[ 86 ];
+ SwAttrPool::pVersionMap3 = new sal_uInt16[ 86 ];
for( i = 1; i <= 21; i++ )
SwAttrPool::pVersionMap3[ i-1 ] = i;
for ( i = 22; i <= 27; ++i )
@@ -691,7 +691,7 @@ void _InitCore()
SwAttrPool::pVersionMap3[ i-1 ] = i + 35;
// 4. Version - neue Paragraph Attribute fuer die CJK-Version
- SwAttrPool::pVersionMap4 = new USHORT[ 121 ];
+ SwAttrPool::pVersionMap4 = new sal_uInt16[ 121 ];
for( i = 1; i <= 65; i++ )
SwAttrPool::pVersionMap4[ i-1 ] = i;
for ( i = 66; i <= 121; ++i )
@@ -699,14 +699,14 @@ void _InitCore()
// #i18732# - setup new version map due to extension of
// the frame attributes (RES_FRMATR_*) for binary filters.
- SwAttrPool::pVersionMap5 = new USHORT[ 130 ];
+ SwAttrPool::pVersionMap5 = new sal_uInt16[ 130 ];
for( i = 1; i <= 109; i++ )
SwAttrPool::pVersionMap5[ i-1 ] = i;
for ( i = 110; i <= 130; ++i )
SwAttrPool::pVersionMap5[ i-1 ] = i + 6;
// 6. Version - new character attribute for overlining plus 2 dummies
- SwAttrPool::pVersionMap6 = new USHORT[ 136 ];
+ SwAttrPool::pVersionMap6 = new sal_uInt16[ 136 ];
for( i = 1; i <= 37; i++ )
SwAttrPool::pVersionMap6[ i-1 ] = i;
for ( i = 38; i <= 136; ++i )
@@ -762,7 +762,7 @@ void _FinitCore()
#if OSL_DEBUG_LEVEL > 1
//Defaultattribut freigeben lassen um asserts zu vermeiden.
if ( aAttrTab[0]->GetRefCount() )
- SfxItemPool::ReleaseDefaults( aAttrTab, POOLATTR_END-POOLATTR_BEGIN, FALSE);
+ SfxItemPool::ReleaseDefaults( aAttrTab, POOLATTR_END-POOLATTR_BEGIN, sal_False);
#endif
delete SwDoc::pACmpltWords;
@@ -807,7 +807,7 @@ void _FinitCore()
// loesche alle default-Attribute
SfxPoolItem* pHt;
- for( USHORT n = 0; n < POOLATTR_END - POOLATTR_BEGIN; n++ )
+ for( sal_uInt16 n = 0; n < POOLATTR_END - POOLATTR_BEGIN; n++ )
if( 0 != ( pHt = aAttrTab[n] ))
delete pHt;
@@ -822,7 +822,7 @@ void _FinitCore()
delete[] SwAttrPool::pVersionMap5;
delete[] SwAttrPool::pVersionMap6;
- for ( USHORT i = 0; i < pGlobalOLEExcludeList->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pGlobalOLEExcludeList->Count(); ++i )
delete (SvGlobalName*)(*pGlobalOLEExcludeList)[i];
delete pGlobalOLEExcludeList;
}
@@ -839,7 +839,7 @@ CharClass& GetAppCharClass()
return *pAppCharClass;
}
-void SwCalendarWrapper::LoadDefaultCalendar( USHORT eLang )
+void SwCalendarWrapper::LoadDefaultCalendar( sal_uInt16 eLang )
{
sUniqueId.Erase();
if( eLang != nLang )
diff --git a/sw/source/core/bastyp/makefile.mk b/sw/source/core/bastyp/makefile.mk
deleted file mode 100644
index 513e34ba7635..000000000000
--- a/sw/source/core/bastyp/makefile.mk
+++ /dev/null
@@ -1,79 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=bastyp
-
-AUTOSEG=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-CXXFILES = \
- bparr.cxx \
- breakit.cxx \
- calc.cxx \
- checkit.cxx \
- index.cxx \
- init.cxx \
- ring.cxx \
- swcache.cxx \
- swrect.cxx \
- swregion.cxx \
- swtypes.cxx \
- tabcol.cxx \
- SwSmartTagMgr.cxx
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/bparr.obj \
- $(SLO)$/checkit.obj \
- $(SLO)$/index.obj \
- $(SLO)$/ring.obj \
- $(SLO)$/swcache.obj \
- $(SLO)$/swrect.obj \
- $(SLO)$/swregion.obj
-
-EXCEPTIONSFILES = \
- $(SLO)$/SwSmartTagMgr.obj \
- $(SLO)$/breakit.obj \
- $(SLO)$/calc.obj \
- $(SLO)$/init.obj \
- $(SLO)$/swtypes.obj \
- $(SLO)$/tabcol.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx
index 3bbee6fcf35a..7bce1842d644 100644
--- a/sw/source/core/bastyp/swcache.cxx
+++ b/sw/source/core/bastyp/swcache.cxx
@@ -54,8 +54,8 @@ void SwCache::Check()
//Konsistenspruefung.
OSL_ENSURE( !pLast->GetNext(), "Last but not last." );
OSL_ENSURE( !pRealFirst->GetPrev(), "First but not first." );
- USHORT nCnt = 0;
- BOOL bFirstFound = FALSE;
+ sal_uInt16 nCnt = 0;
+ sal_Bool bFirstFound = sal_False;
SwCacheObj *pObj = pRealFirst;
SwCacheObj *pRekursive = pObj;
while ( pObj )
@@ -68,7 +68,7 @@ void SwCache::Check()
++nCnt;
if ( pObj == pFirst )
- bFirstFound = TRUE;
+ bFirstFound = sal_True;
if ( !pObj->GetNext() )
OSL_ENSURE( pObj == pLast, "Last not Found." );
pObj = pObj->GetNext();
@@ -92,12 +92,12 @@ void SwCache::Check()
|*************************************************************************/
-SwCache::SwCache( const USHORT nInitSize, const USHORT nGrowSize
+SwCache::SwCache( const sal_uInt16 nInitSize, const sal_uInt16 nGrowSize
#if OSL_DEBUG_LEVEL > 1
, const ByteString &rNm
#endif
) :
- SwCacheObjArr( (BYTE)nInitSize, (BYTE)nGrowSize ),
+ SwCacheObjArr( (sal_uInt8)nInitSize, (sal_uInt8)nGrowSize ),
aFreePositions( 5, 5 ),
pRealFirst( 0 ),
pFirst( 0 ),
@@ -166,7 +166,7 @@ SwCache::~SwCache()
|*************************************************************************/
-void SwCache::Flush( const BYTE )
+void SwCache::Flush( const sal_uInt8 )
{
INCREMENT( nFlushCnt );
SwCacheObj *pObj = pRealFirst;
@@ -177,7 +177,7 @@ void SwCache::Flush( const BYTE )
#if OSL_DEBUG_LEVEL > 1
if ( pObj->IsLocked() )
{
- OSL_ENSURE( TRUE, "Flushing locked objects." );
+ OSL_ENSURE( sal_False, "Flushing locked objects." );
if ( !pRealFirst )
{
pRealFirst = pFirst = pLast = pObj;
@@ -277,8 +277,8 @@ void SwCache::ToTop( SwCacheObj *pObj )
|*************************************************************************/
-SwCacheObj *SwCache::Get( const void *pOwner, const USHORT nIndex,
- const BOOL bToTop )
+SwCacheObj *SwCache::Get( const void *pOwner, const sal_uInt16 nIndex,
+ const sal_Bool bToTop )
{
SwCacheObj *pRet;
if ( 0 != (pRet = nIndex < Count() ? operator[]( nIndex ) : 0) )
@@ -301,7 +301,7 @@ SwCacheObj *SwCache::Get( const void *pOwner, const USHORT nIndex,
-SwCacheObj *SwCache::Get( const void *pOwner, const BOOL bToTop )
+SwCacheObj *SwCache::Get( const void *pOwner, const sal_Bool bToTop )
{
SwCacheObj *pRet = pRealFirst;
while ( pRet && !pRet->IsOwner( pOwner ) )
@@ -364,7 +364,7 @@ void SwCache::DeleteObj( SwCacheObj *pObj )
//Unangenehmer Nebeneffekt ist, das die Positionen verschoben werden
//muessen, und die Eigentuemer der Objekte diese wahrscheinlich nicht
//wiederfinden werden.
- for ( USHORT i = 0; i < Count(); ++i )
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
{
SwCacheObj *pTmpObj = operator[](i);
if ( !pTmpObj )
@@ -383,7 +383,7 @@ void SwCache::Delete( const void *pOwner )
{
INCREMENT( nDelete );
SwCacheObj *pObj;
- if ( 0 != (pObj = Get( pOwner, BOOL(FALSE) )) )
+ if ( 0 != (pObj = Get( pOwner, sal_Bool(sal_False) )) )
DeleteObj( pObj );
}
@@ -393,12 +393,12 @@ void SwCache::Delete( const void *pOwner )
|*************************************************************************/
-BOOL SwCache::Insert( SwCacheObj *pNew )
+sal_Bool SwCache::Insert( SwCacheObj *pNew )
{
CHECK;
OSL_ENSURE( !pNew->GetPrev() && !pNew->GetNext(), "New but not new." );
- USHORT nPos;//Wird hinter den if's zum setzen am Obj benutzt.
+ sal_uInt16 nPos;//Wird hinter den if's zum setzen am Obj benutzt.
if ( Count() < nCurMax )
{
//Es ist noch Platz frei, also einfach einfuegen.
@@ -410,7 +410,7 @@ BOOL SwCache::Insert( SwCacheObj *pNew )
{
//Es exitieren Platzhalter, also den letzten benutzen.
INCREMENT( nInsertFree );
- const USHORT nFreePos = aFreePositions.Count() - 1;
+ const sal_uInt16 nFreePos = aFreePositions.Count() - 1;
nPos = aFreePositions[ nFreePos ];
*(pData + nPos) = pNew;
aFreePositions.Remove( nFreePos );
@@ -425,8 +425,8 @@ BOOL SwCache::Insert( SwCacheObj *pNew )
pObj = pObj->GetPrev();
if ( !pObj )
{
- OSL_ENSURE( FALSE, "Cache overflow." );
- return FALSE;
+ OSL_ENSURE( sal_False, "Cache overflow." );
+ return sal_False;
}
nPos = pObj->GetCachePos();
@@ -467,7 +467,7 @@ BOOL SwCache::Insert( SwCacheObj *pNew )
pFirst = pNew;
CHECK;
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -475,14 +475,14 @@ BOOL SwCache::Insert( SwCacheObj *pNew )
|*************************************************************************/
-void SwCache::SetLRUOfst( const USHORT nOfst )
+void SwCache::SetLRUOfst( const sal_uInt16 nOfst )
{
if ( !pRealFirst || ((Count() - aFreePositions.Count()) < nOfst) )
return;
CHECK;
pFirst = pRealFirst;
- for ( USHORT i = 0; i < Count() && i < nOfst; ++i )
+ for ( sal_uInt16 i = 0; i < Count() && i < nOfst; ++i )
{
if ( pFirst->GetNext() && pFirst->GetNext()->GetNext() )
pFirst = pFirst->GetNext();
@@ -562,7 +562,7 @@ void SwCacheAccess::_Get()
|* SwCacheAccess::IsAvailable()
|*************************************************************************/
-BOOL SwCacheAccess::IsAvailable() const
+sal_Bool SwCacheAccess::IsAvailable() const
{
return pObj != 0;
}
diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx
index 3f64ccefeec9..9f5a7b6c6a1f 100644
--- a/sw/source/core/bastyp/swrect.cxx
+++ b/sw/source/core/bastyp/swrect.cxx
@@ -147,7 +147,7 @@ SwRect& SwRect::_Intersection( const SwRect& rRect )
-BOOL SwRect::IsInside( const SwRect& rRect ) const
+sal_Bool SwRect::IsInside( const SwRect& rRect ) const
{
const long nRight = Right();
const long nBottom = Bottom();
@@ -161,7 +161,7 @@ BOOL SwRect::IsInside( const SwRect& rRect ) const
-BOOL SwRect::IsInside( const Point& rPoint ) const
+sal_Bool SwRect::IsInside( const Point& rPoint ) const
{
return (Left() <= rPoint.X())
&& (Top() <= rPoint.Y())
@@ -171,7 +171,7 @@ BOOL SwRect::IsInside( const Point& rPoint ) const
/* ---------------------------------------------------------------------------
mouse moving of table borders
---------------------------------------------------------------------------*/
-BOOL SwRect::IsNear( const Point& rPoint, long nTolerance ) const
+sal_Bool SwRect::IsNear( const Point& rPoint, long nTolerance ) const
{
return IsInside(rPoint) ||
(((Left() - nTolerance) <= rPoint.X())
@@ -188,12 +188,12 @@ BOOL SwRect::IsNear( const Point& rPoint, long nTolerance ) const
-BOOL SwRect::IsOver( const SwRect& rRect ) const
+sal_Bool SwRect::IsOver( const SwRect& rRect ) const
{
return (Top() <= rRect.Bottom())
&& (Left() <= rRect.Right())
&& (Right() >= rRect.Left())
- && (Bottom()>= rRect.Top()) ? TRUE : FALSE;
+ && (Bottom()>= rRect.Top()) ? sal_True : sal_False;
}
/*************************************************************************
@@ -254,13 +254,13 @@ long SwRect::GetLeftDistance( long nLimit ) const { return m_Point.getX() - nLim
long SwRect::GetBottomDistance( long nLim ) const { return nLim - m_Point.getY() - m_Size.getHeight();}
long SwRect::GetTopDistance( long nLimit ) const { return m_Point.getY() - nLimit; }
long SwRect::GetRightDistance( long nLim ) const { return nLim - m_Point.getX() - m_Size.getWidth(); }
-BOOL SwRect::OverStepLeft( long nLimit ) const
+sal_Bool SwRect::OverStepLeft( long nLimit ) const
{ return nLimit > m_Point.getX() && m_Point.getX() + m_Size.getWidth() > nLimit; }
-BOOL SwRect::OverStepBottom( long nLimit ) const
+sal_Bool SwRect::OverStepBottom( long nLimit ) const
{ return nLimit > m_Point.getY() && m_Point.getY() + m_Size.getHeight() > nLimit; }
-BOOL SwRect::OverStepTop( long nLimit ) const
+sal_Bool SwRect::OverStepTop( long nLimit ) const
{ return nLimit > m_Point.getY() && m_Point.getY() + m_Size.getHeight() > nLimit; }
-BOOL SwRect::OverStepRight( long nLimit ) const
+sal_Bool SwRect::OverStepRight( long nLimit ) const
{ return nLimit > m_Point.getX() && m_Point.getX() + m_Size.getWidth() > nLimit; }
void SwRect::SetLeftAndWidth( long nLeft, long nNew )
{
diff --git a/sw/source/core/bastyp/swregion.cxx b/sw/source/core/bastyp/swregion.cxx
index 7a4e12dc2d86..5b812314da95 100644
--- a/sw/source/core/bastyp/swregion.cxx
+++ b/sw/source/core/bastyp/swregion.cxx
@@ -44,9 +44,9 @@ SV_IMPL_VARARR( SwRects, SwRect );
|* SwRegionRects::SwRegionRects()
|*************************************************************************/
-SwRegionRects::SwRegionRects( const SwRect &rStartRect, USHORT nInit,
- USHORT nGrow ) :
- SwRects( (BYTE)nInit, (BYTE)nGrow ),
+SwRegionRects::SwRegionRects( const SwRect &rStartRect, sal_uInt16 nInit,
+ sal_uInt16 nGrow ) :
+ SwRects( (sal_uInt8)nInit, (sal_uInt8)nGrow ),
aOrigin( rStartRect )
{
Insert( aOrigin, 0 );
@@ -56,18 +56,18 @@ SwRegionRects::SwRegionRects( const SwRect &rStartRect, USHORT nInit,
* inline InsertRect()
*
* InsertRect() wird nur von operator-=() gerufen.
- * Wenn bDel == TRUE ist, dann wird das Rect an der Position nPos mit
+ * Wenn bDel == sal_True ist, dann wird das Rect an der Position nPos mit
* rRect ueberschrieben, ansonsten wird rRect hinten angehaengt.
*************************************************************************/
-inline void SwRegionRects::InsertRect( const SwRect &rRect, const USHORT nPos,
- BOOL &rDel )
+inline void SwRegionRects::InsertRect( const SwRect &rRect, const sal_uInt16 nPos,
+ sal_Bool &rDel )
{
if( rDel )
{
pData = (SwRect*)pData; // looks weird but seems to help gcc ->i78417
*(pData+nPos) = rRect;
- rDel = FALSE;
+ rDel = sal_False;
}
else
Insert( rRect, Count() );
@@ -87,8 +87,8 @@ inline void SwRegionRects::InsertRect( const SwRect &rRect, const USHORT nPos,
void SwRegionRects::operator-=( const SwRect &rRect )
{
- USHORT nMax = Count();
- for ( USHORT i = 0; i < nMax; ++i )
+ sal_uInt16 nMax = Count();
+ for ( sal_uInt16 i = 0; i < nMax; ++i )
{
if ( rRect.IsOver( *(pData+i) ) )
{
@@ -98,7 +98,7 @@ void SwRegionRects::operator-=( const SwRect &rRect )
// Das erste Rect, das wir inserten wollen, nimmt die
// Stelle von i ein. So ersparen wir uns das Delete().
- BOOL bDel = TRUE;
+ sal_Bool bDel = sal_True;
//Jetzt aufteilen das Teil: Es sollen diejenigen Rechtecke
//zurueckbleiben, die im alten aber nicht im neuen liegen.
@@ -167,10 +167,10 @@ void SwRegionRects::Invert()
SwRegionRects aInvRegion( aOrigin, Count()*2+2 );
const SwRect *pDat = GetData();
- for( USHORT i = 0; i < Count(); ++pDat, ++i )
+ for( sal_uInt16 i = 0; i < Count(); ++pDat, ++i )
aInvRegion -= *pDat;
- USHORT nCpy = Count(), nDel = 0;
+ sal_uInt16 nCpy = Count(), nDel = 0;
if( aInvRegion.Count() < Count() )
{
nDel = Count() - aInvRegion.Count();
@@ -197,7 +197,7 @@ inline SwTwips CalcArea( const SwRect &rRect )
}
-void SwRegionRects::Compress( BOOL bFuzzy )
+void SwRegionRects::Compress( sal_Bool bFuzzy )
{
for ( int i = 0; i < Count(); ++i )
{
@@ -207,13 +207,13 @@ void SwRegionRects::Compress( BOOL bFuzzy )
//uberfluessig.
if ( (*(pData + i)).IsInside( *(pData + j) ) )
{
- Remove( static_cast<USHORT>(j), 1 );
+ Remove( static_cast<sal_uInt16>(j), 1 );
--j;
}
else if ( (*(pData + j)).IsInside( *(pData + i) ) )
{
*(pData + i) = *(pData + j);
- Remove( static_cast<USHORT>(j), 1 );
+ Remove( static_cast<sal_uInt16>(j), 1 );
i = -1;
break;
}
@@ -235,7 +235,7 @@ void SwRegionRects::Compress( BOOL bFuzzy )
(::CalcArea( aUnion ) - CalcArea( aInter )) )
{
*(pData + i) = aUnion;
- Remove( static_cast<USHORT>(j), 1 );
+ Remove( static_cast<sal_uInt16>(j), 1 );
i = -1;
break;
}
diff --git a/sw/source/core/bastyp/swtypes.cxx b/sw/source/core/bastyp/swtypes.cxx
index 25c934b7a2f2..a683ed170c0f 100644
--- a/sw/source/core/bastyp/swtypes.cxx
+++ b/sw/source/core/bastyp/swtypes.cxx
@@ -40,7 +40,8 @@
#include <frmfmt.hxx>
#include <frmtool.hxx>
#include <ndtxt.hxx>
-#include <undobj.hxx>
+#include <UndoDelete.hxx>
+#include <UndoInsert.hxx>
#include <swtable.hxx>
#include <viscrs.hxx>
#include <fntcache.hxx>
diff --git a/sw/source/core/bastyp/tabcol.cxx b/sw/source/core/bastyp/tabcol.cxx
index cad4899c2c3c..bf6a87dfd331 100644
--- a/sw/source/core/bastyp/tabcol.cxx
+++ b/sw/source/core/bastyp/tabcol.cxx
@@ -34,7 +34,7 @@
#include <limits.h> //for LONG_MAX
-SwTabCols::SwTabCols( USHORT nSize ) :
+SwTabCols::SwTabCols( sal_uInt16 nSize ) :
nLeftMin( 0 ),
nLeft( 0 ),
nRight( 0 ),
@@ -54,7 +54,7 @@ SwTabCols::SwTabCols( const SwTabCols& rCpy ) :
aData( rCpy.GetData() )
{
#if OSL_DEBUG_LEVEL > 1
- for ( USHORT i = 0; i < Count(); ++i )
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
{
SwTabColsEntry aEntry1 = aData[i];
SwTabColsEntry aEntry2 = rCpy.GetData()[i];
@@ -83,9 +83,9 @@ SwTabCols &SwTabCols::operator=( const SwTabCols& rCpy )
return *this;
}
-BOOL SwTabCols::operator==( const SwTabCols& rCmp ) const
+sal_Bool SwTabCols::operator==( const SwTabCols& rCmp ) const
{
- USHORT i;
+ sal_uInt16 i;
if ( !(nLeftMin == rCmp.GetLeftMin() &&
nLeft == rCmp.GetLeft() &&
@@ -93,20 +93,20 @@ BOOL SwTabCols::operator==( const SwTabCols& rCmp ) const
nRightMax== rCmp.GetRightMax()&&
bLastRowAllowedToChange== rCmp.IsLastRowAllowedToChange() &&
Count()== rCmp.Count()) )
- return FALSE;
+ return sal_False;
for ( i = 0; i < Count(); ++i )
{
SwTabColsEntry aEntry1 = aData[i];
SwTabColsEntry aEntry2 = rCmp.GetData()[i];
if ( aEntry1.nPos != aEntry2.nPos || aEntry1.bHidden != aEntry2.bHidden )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
-void SwTabCols::Insert( long nValue, long nMin, long nMax, BOOL bValue, USHORT nPos )
+void SwTabCols::Insert( long nValue, long nMin, long nMax, sal_Bool bValue, sal_uInt16 nPos )
{
SwTabColsEntry aEntry;
aEntry.nPos = nValue;
@@ -116,7 +116,7 @@ void SwTabCols::Insert( long nValue, long nMin, long nMax, BOOL bValue, USHORT n
aData.insert( aData.begin() + nPos, aEntry );
}
-void SwTabCols::Insert( long nValue, BOOL bValue, USHORT nPos )
+void SwTabCols::Insert( long nValue, sal_Bool bValue, sal_uInt16 nPos )
{
SwTabColsEntry aEntry;
aEntry.nPos = nValue;
@@ -134,7 +134,7 @@ void SwTabCols::Insert( long nValue, BOOL bValue, USHORT nPos )
#endif
}
-void SwTabCols::Remove( USHORT nPos, USHORT nAnz )
+void SwTabCols::Remove( sal_uInt16 nPos, sal_uInt16 nAnz )
{
SwTabColsEntries::iterator aStart = aData.begin() + nPos;
aData.erase( aStart, aStart + nAnz );
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 044bb46c0377..fa3cf8761bc0 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -32,13 +32,14 @@
#include <bookmrk.hxx>
#include <IDocumentMarkAccess.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <doc.hxx>
#include <ndtxt.hxx>
#include <pam.hxx>
#include <swserv.hxx>
#include <sfx2/linkmgr.hxx>
#include <swtypes.hxx>
-#include <undobj.hxx>
+#include <UndoBookmark.hxx>
#include <unobookmark.hxx>
#include <rtl/random.h>
#include <xmloff/odffields.hxx>
@@ -79,14 +80,15 @@ namespace
{
SwPosition& rStart = pField->GetMarkStart();
SwPosition& rEnd = pField->GetMarkEnd();
- SwTxtNode const * const pStartTxtNode = io_pDoc->GetNodes()[rStart.nNode]->GetTxtNode();
- SwTxtNode const * const pEndTxtNode = io_pDoc->GetNodes()[rEnd.nNode]->GetTxtNode();
+ SwTxtNode const*const pStartTxtNode =
+ rStart.nNode.GetNode().GetTxtNode();
+ SwTxtNode const*const pEndTxtNode = rEnd.nNode.GetNode().GetTxtNode();
const sal_Unicode ch_start=pStartTxtNode->GetTxt().GetChar(rStart.nContent.GetIndex());
xub_StrLen nEndPos = rEnd == rStart ? rEnd.nContent.GetIndex() : rEnd.nContent.GetIndex() - 1;
const sal_Unicode ch_end=pEndTxtNode->GetTxt().GetChar( nEndPos );
SwPaM aStartPaM(rStart);
SwPaM aEndPaM(rEnd);
- io_pDoc->StartUndo(UNDO_UI_REPLACE, NULL);
+ io_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_UI_REPLACE, NULL);
if( ( ch_start != aStartMark ) && ( aEndMark != CH_TXT_ATR_FORMELEMENT ) )
{
io_pDoc->InsertString(aStartPaM, aStartMark);
@@ -97,7 +99,7 @@ namespace
io_pDoc->InsertString(aEndPaM, aEndMark);
rEnd.nContent++;
}
- io_pDoc->EndUndo(UNDO_UI_REPLACE, NULL);
+ io_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_UI_REPLACE, NULL);
};
}
@@ -232,10 +234,10 @@ namespace sw { namespace mark
void Bookmark::InitDoc(SwDoc* const io_pDoc)
{
- if(io_pDoc->DoesUndo())
+ if (io_pDoc->GetIDocumentUndoRedo().DoesUndo())
{
- io_pDoc->ClearRedo();
- io_pDoc->AppendUndo(new SwUndoInsBookmark(*this));
+ io_pDoc->GetIDocumentUndoRedo().AppendUndo(
+ new SwUndoInsBookmark(*this));
}
io_pDoc->SetModified();
}
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 810997335843..7a496a422298 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -52,8 +52,8 @@
#include<vcl/window.hxx>
-SwCallLink::SwCallLink( SwCrsrShell & rSh, ULONG nAktNode, xub_StrLen nAktCntnt,
- BYTE nAktNdTyp, long nLRPos, bool bAktSelection )
+SwCallLink::SwCallLink( SwCrsrShell & rSh, sal_uLong nAktNode, xub_StrLen nAktCntnt,
+ sal_uInt8 nAktNdTyp, long nLRPos, bool bAktSelection )
: rShell( rSh ), nNode( nAktNode ), nCntnt( nAktCntnt ),
nNdTyp( nAktNdTyp ), nLeftFrmPos( nLRPos ),
bHasSelection( bAktSelection )
@@ -140,8 +140,8 @@ SwCallLink::~SwCallLink()
}
xub_StrLen nCmp, nAktCntnt = pCurCrsr->GetPoint()->nContent.GetIndex();
- USHORT nNdWhich = pCNd->GetNodeType();
- ULONG nAktNode = pCurCrsr->GetPoint()->nNode.GetIndex();
+ sal_uInt16 nNdWhich = pCNd->GetNodeType();
+ sal_uLong nAktNode = pCurCrsr->GetPoint()->nNode.GetIndex();
// Register the Shell as dependent at the current Node. By doing this all
// attribute changes can be signaled over the link.
@@ -176,7 +176,7 @@ SwCallLink::~SwCallLink()
{
const SwpHints &rHts = ((SwTxtNode*)pCNd)->GetSwpHints();
- USHORT n;
+ sal_uInt16 n;
xub_StrLen nStart;
const xub_StrLen *pEnd;
@@ -230,7 +230,7 @@ SwCallLink::~SwCallLink()
const SwFrm* pFrm;
const SwFlyFrm *pFlyFrm;
- if( !rShell.ActionPend() && 0 != ( pFrm = pCNd->GetFrm(0,0,FALSE) ) &&
+ if( !rShell.ActionPend() && 0 != ( pFrm = pCNd->GetFrm(0,0,sal_False) ) &&
0 != ( pFlyFrm = pFrm->FindFlyFrm() ) && !rShell.IsTableMode() )
{
const SwNodeIndex* pIndex = pFlyFrm->GetFmt()->GetCntnt().GetCntntIdx();
@@ -247,7 +247,7 @@ SwCallLink::~SwCallLink()
}
}
-long SwCallLink::GetFrm( SwTxtNode& rNd, xub_StrLen nCntPos, BOOL bCalcFrm )
+long SwCallLink::GetFrm( SwTxtNode& rNd, xub_StrLen nCntPos, sal_Bool bCalcFrm )
{
SwTxtFrm* pFrm = (SwTxtFrm*)rNd.GetFrm(0,0,bCalcFrm), *pNext = pFrm;
if ( pFrm && !pFrm->IsHiddenNow() )
diff --git a/sw/source/core/crsr/callnk.hxx b/sw/source/core/crsr/callnk.hxx
index 24f6b3aa0bab..b710b5db96c3 100644
--- a/sw/source/core/crsr/callnk.hxx
+++ b/sw/source/core/crsr/callnk.hxx
@@ -37,19 +37,19 @@ class SwCallLink
{
public:
SwCrsrShell & rShell;
- ULONG nNode;
+ sal_uLong nNode;
xub_StrLen nCntnt;
- BYTE nNdTyp;
+ sal_uInt8 nNdTyp;
long nLeftFrmPos;
bool bHasSelection;
SwCallLink( SwCrsrShell & rSh );
- SwCallLink( SwCrsrShell & rSh, ULONG nAktNode, xub_StrLen nAktCntnt,
- BYTE nAktNdTyp, long nLRPos,
+ SwCallLink( SwCrsrShell & rSh, sal_uLong nAktNode, xub_StrLen nAktCntnt,
+ sal_uInt8 nAktNdTyp, long nLRPos,
bool bAktSelection );
~SwCallLink();
- static long GetFrm( SwTxtNode& rNd, xub_StrLen nCntPos, BOOL bCalcFrm );
+ static long GetFrm( SwTxtNode& rNd, xub_StrLen nCntPos, sal_Bool bCalcFrm );
};
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index aeb4de951138..7ec342cfd3bc 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -155,27 +155,42 @@ SwPaM * SwCrsrShell::CreateCrsr()
// loesche den aktuellen Cursor und der folgende wird zum Aktuellen
-BOOL SwCrsrShell::DestroyCrsr()
+sal_Bool SwCrsrShell::DestroyCrsr()
{
// Innerhalb der Tabellen-SSelection keinen neuen Crsr loeschen
OSL_ENSURE( !IsTableMode(), "in Tabellen SSelection" );
// ist ueberhaupt ein naechtser vorhanden ?
if(pCurCrsr->GetNext() == pCurCrsr)
- return FALSE;
+ return sal_False;
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
SwCursor* pNextCrsr = (SwCursor*)pCurCrsr->GetNext();
delete pCurCrsr;
pCurCrsr = dynamic_cast<SwShellCrsr*>(pNextCrsr);
UpdateCrsr();
- return TRUE;
+ return sal_True;
+}
+
+
+SwPaM & SwCrsrShell::CreateNewShellCursor()
+{
+ if (HasSelection())
+ {
+ (void) CreateCrsr(); // n.b. returns old cursor
+ }
+ return *GetCrsr();
+}
+
+SwPaM & SwCrsrShell::GetCurrentShellCursor()
+{
+ return *GetCrsr();
}
// gebe den aktuellen zurueck
-SwPaM* SwCrsrShell::GetCrsr( BOOL bMakeTblCrsr ) const
+SwPaM* SwCrsrShell::GetCrsr( sal_Bool bMakeTblCrsr ) const
{
if( pTblCrsr )
{
@@ -186,7 +201,7 @@ SwPaM* SwCrsrShell::GetCrsr( BOOL bMakeTblCrsr ) const
if( pTblCrsr->GetPoint()->nNode.GetIndex() &&
pTblCrsr->GetMark()->nNode.GetIndex() &&
0 != ( pCNd = pTblCrsr->GetCntntNode() ) && pCNd->GetFrm() &&
- 0 != ( pCNd = pTblCrsr->GetCntntNode(FALSE) ) && pCNd->GetFrm())
+ 0 != ( pCNd = pTblCrsr->GetCntntNode(sal_False) ) && pCNd->GetFrm())
{
SwShellTableCrsr* pTC = (SwShellTableCrsr*)pTblCrsr;
GetLayout()->MakeTblCrsrs( *pTC );
@@ -214,7 +229,7 @@ void SwCrsrShell::StartAction()
nAktNdTyp = rNd.GetNodeType();
bAktSelection = *pCurCrsr->GetPoint() != *pCurCrsr->GetMark();
if( ND_TEXTNODE & nAktNdTyp )
- nLeftFrmPos = SwCallLink::GetFrm( (SwTxtNode&)rNd, nAktCntnt, TRUE );
+ nLeftFrmPos = SwCallLink::GetFrm( (SwTxtNode&)rNd, nAktCntnt, sal_True );
else
nLeftFrmPos = 0;
}
@@ -222,10 +237,10 @@ void SwCrsrShell::StartAction()
}
-void SwCrsrShell::EndAction( const BOOL bIdleEnd )
+void SwCrsrShell::EndAction( const sal_Bool bIdleEnd )
{
- BOOL bVis = bSVCrsrVis;
+ sal_Bool bVis = bSVCrsrVis;
// Idle-Formatierung ?
if( bIdleEnd && Imp()->GetRegion() )
@@ -239,8 +254,8 @@ void SwCrsrShell::EndAction( const BOOL bIdleEnd )
// Task: 76923: dont show the cursor in the ViewShell::EndAction() - call.
// Only the UpdateCrsr shows the cursor.
- BOOL bSavSVCrsrVis = bSVCrsrVis;
- bSVCrsrVis = FALSE;
+ sal_Bool bSavSVCrsrVis = bSVCrsrVis;
+ bSVCrsrVis = sal_False;
ViewShell::EndAction( bIdleEnd ); //der ViewShell den Vortritt lassen
@@ -265,20 +280,20 @@ void SwCrsrShell::EndAction( const BOOL bIdleEnd )
{
// Crsr-Moves ueberwachen, evt. Link callen
// der DTOR ist das interressante!!
- SwCallLink aLk( *this, nAktNode, nAktCntnt, (BYTE)nAktNdTyp,
+ SwCallLink aLk( *this, nAktNode, nAktCntnt, (sal_uInt8)nAktNdTyp,
nLeftFrmPos, bAktSelection );
}
if( bCallChgLnk && bChgCallFlag && aChgLnk.IsSet() )
{
aChgLnk.Call( this );
- bChgCallFlag = FALSE; // Flag zuruecksetzen
+ bChgCallFlag = sal_False; // Flag zuruecksetzen
}
}
return;
}
- USHORT nParm = SwCrsrShell::CHKRANGE;
+ sal_uInt16 nParm = SwCrsrShell::CHKRANGE;
if ( !bIdleEnd )
nParm |= SwCrsrShell::SCROLLWIN;
UpdateCrsr( nParm, bIdleEnd ); // Cursor-Aenderungen anzeigen
@@ -286,19 +301,19 @@ void SwCrsrShell::EndAction( const BOOL bIdleEnd )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
aLk.nNode = nAktNode; // evt. Link callen
- aLk.nNdTyp = (BYTE)nAktNdTyp;
+ aLk.nNdTyp = (sal_uInt8)nAktNdTyp;
aLk.nCntnt = nAktCntnt;
aLk.nLeftFrmPos = nLeftFrmPos;
if( !nCrsrMove ||
( 1 == nCrsrMove && bInCMvVisportChgd ) )
- ShowCrsrs( bSVCrsrVis ? TRUE : FALSE ); // Cursor & Selektionen wieder anzeigen
+ ShowCrsrs( bSVCrsrVis ? sal_True : sal_False ); // Cursor & Selektionen wieder anzeigen
}
// falls noch ein ChgCall vorhanden ist, dann rufe ihn
if( bCallChgLnk && bChgCallFlag && aChgLnk.IsSet() )
{
aChgLnk.Call( this );
- bChgCallFlag = FALSE; // Flag zuruecksetzen
+ bChgCallFlag = sal_False; // Flag zuruecksetzen
}
}
@@ -312,25 +327,25 @@ void SwCrsrShell::SttCrsrMove()
StartAction();
}
-void SwCrsrShell::EndCrsrMove( const BOOL bIdleEnd )
+void SwCrsrShell::EndCrsrMove( const sal_Bool bIdleEnd )
{
OSL_ENSURE( nCrsrMove, "EndCrsrMove() ohne SttCrsrMove()." );
EndAction( bIdleEnd );
if( !--nCrsrMove )
- bInCMvVisportChgd = FALSE;
+ bInCMvVisportChgd = sal_False;
}
#endif
-BOOL SwCrsrShell::LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
- BOOL bVisualAllowed )
+sal_Bool SwCrsrShell::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
+ sal_Bool bVisualAllowed )
{
if( IsTableMode() )
return bLeft ? GoPrevCell() : GoNextCell();
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// #i27615# Handle cursor in front of label.
const SwTxtNode* pTxtNd = 0;
@@ -345,8 +360,8 @@ BOOL SwCrsrShell::LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
SwShellCrsr* pShellCrsr = getShellCrsr( true );
if ( !bLeft && pShellCrsr->IsInFrontOfLabel() )
{
- SetInFrontOfLabel( FALSE );
- bRet = TRUE;
+ SetInFrontOfLabel( sal_False );
+ bRet = sal_True;
}
//
// 2. CASE: Cursor is at beginning of numbered paragraph. A move
@@ -357,25 +372,25 @@ BOOL SwCrsrShell::LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
0 != ( pTxtNd = pShellCrsr->GetNode()->GetTxtNode() ) &&
pTxtNd->HasVisibleNumberingOrBullet() )
{
- SetInFrontOfLabel( TRUE );
- bRet = TRUE;
+ SetInFrontOfLabel( sal_True );
+ bRet = sal_True;
}
//
// 3. CASE: Regular cursor move. Reset the bInFrontOfLabel flag:
//
else
{
- const BOOL bSkipHidden = !GetViewOptions()->IsShowHiddenChar();
+ const sal_Bool bSkipHidden = !GetViewOptions()->IsShowHiddenChar();
// #i107447#
// To avoid loop the reset of <bInFrontOfLabel> flag is no longer
// reflected in the return value <bRet>.
- const bool bResetOfInFrontOfLabel = SetInFrontOfLabel( FALSE );
+ const bool bResetOfInFrontOfLabel = SetInFrontOfLabel( sal_False );
bRet = pShellCrsr->LeftRight( bLeft, nCnt, nMode, bVisualAllowed,
bSkipHidden, !IsOverwriteCrsr() );
if ( !bRet && bLeft && bResetOfInFrontOfLabel )
{
// undo reset of <bInFrontOfLabel> flag
- SetInFrontOfLabel( TRUE );
+ SetInFrontOfLabel( sal_True );
}
}
@@ -393,11 +408,11 @@ void SwCrsrShell::MarkListLevel( const String& sListId,
nListLevel != nMarkedListLevel)
{
if ( sMarkedListId.Len() > 0 )
- pDoc->MarkListLevel( sMarkedListId, nMarkedListLevel, FALSE );
+ pDoc->MarkListLevel( sMarkedListId, nMarkedListLevel, sal_False );
if ( sListId.Len() > 0 )
{
- pDoc->MarkListLevel( sListId, nListLevel, TRUE );
+ pDoc->MarkListLevel( sListId, nListLevel, sal_True );
}
sMarkedListId = sListId;
@@ -413,7 +428,7 @@ void SwCrsrShell::UpdateMarkedListLevel()
{
if ( !pTxtNd->IsNumbered() )
{
- pCurCrsr->_SetInFrontOfLabel( FALSE );
+ pCurCrsr->_SetInFrontOfLabel( sal_False );
MarkListLevel( String(), 0 );
}
else if ( pCurCrsr->IsInFrontOfLabel() )
@@ -434,17 +449,17 @@ void SwCrsrShell::UpdateMarkedListLevel()
}
// <--
-BOOL SwCrsrShell::UpDown( BOOL bUp, USHORT nCnt )
+sal_Bool SwCrsrShell::UpDown( sal_Bool bUp, sal_uInt16 nCnt )
{
SET_CURR_SHELL( this );
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
- BOOL bTableMode = IsTableMode();
+ sal_Bool bTableMode = IsTableMode();
SwShellCrsr* pTmpCrsr = getShellCrsr( true );
- BOOL bRet = pTmpCrsr->UpDown( bUp, nCnt );
+ sal_Bool bRet = pTmpCrsr->UpDown( bUp, nCnt );
// #i40019# UpDown should always reset the bInFrontOfLabel flag:
- bRet = SetInFrontOfLabel(FALSE) || bRet;
+ bRet = SetInFrontOfLabel(sal_False) || bRet;
if( pBlockCrsr )
pBlockCrsr->clearPoints();
@@ -458,39 +473,39 @@ BOOL SwCrsrShell::UpDown( BOOL bUp, USHORT nCnt )
if( !bTableMode )
eUpdtMode = (CrsrFlag) (eUpdtMode
| SwCrsrShell::UPDOWN | SwCrsrShell::CHKRANGE);
- UpdateCrsr( static_cast<USHORT>(eUpdtMode) );
+ UpdateCrsr( static_cast<sal_uInt16>(eUpdtMode) );
}
}
return bRet;
}
-BOOL SwCrsrShell::LRMargin( BOOL bLeft, BOOL bAPI)
+sal_Bool SwCrsrShell::LRMargin( sal_Bool bLeft, sal_Bool bAPI)
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
SET_CURR_SHELL( this );
eMvState = MV_LEFTMARGIN; // Status fuers Crsr-Travelling - GetCrsrOfst
- const BOOL bTableMode = IsTableMode();
+ const sal_Bool bTableMode = IsTableMode();
SwShellCrsr* pTmpCrsr = getShellCrsr( true );
if( pBlockCrsr )
pBlockCrsr->clearPoints();
- const BOOL bWasAtLM =
+ const sal_Bool bWasAtLM =
( 0 == _GetCrsr()->GetPoint()->nContent.GetIndex() );
- BOOL bRet = pTmpCrsr->LeftRightMargin( bLeft, bAPI );
+ sal_Bool bRet = pTmpCrsr->LeftRightMargin( bLeft, bAPI );
if ( bLeft && !bTableMode && bRet && bWasAtLM && !_GetCrsr()->HasMark() )
{
const SwTxtNode * pTxtNd = _GetCrsr()->GetNode()->GetTxtNode();
if ( pTxtNd && pTxtNd->HasVisibleNumberingOrBullet() )
- SetInFrontOfLabel( TRUE );
+ SetInFrontOfLabel( sal_True );
}
else if ( !bLeft )
{
- bRet = SetInFrontOfLabel( FALSE ) || bRet;
+ bRet = SetInFrontOfLabel( sal_False ) || bRet;
}
if( bRet )
@@ -500,19 +515,19 @@ BOOL SwCrsrShell::LRMargin( BOOL bLeft, BOOL bAPI)
return bRet;
}
-BOOL SwCrsrShell::IsAtLRMargin( BOOL bLeft, BOOL bAPI ) const
+sal_Bool SwCrsrShell::IsAtLRMargin( sal_Bool bLeft, sal_Bool bAPI ) const
{
const SwShellCrsr* pTmpCrsr = getShellCrsr( true );
return pTmpCrsr->IsAtLeftRightMargin( bLeft, bAPI );
}
-BOOL SwCrsrShell::SttEndDoc( BOOL bStt )
+sal_Bool SwCrsrShell::SttEndDoc( sal_Bool bStt )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
SwShellCrsr* pTmpCrsr = pBlockCrsr ? &pBlockCrsr->getShellCrsr() : pCurCrsr;
- BOOL bRet = pTmpCrsr->SttEndDoc( bStt );
+ sal_Bool bRet = pTmpCrsr->SttEndDoc( bStt );
if( bRet )
{
if( bStt )
@@ -540,9 +555,9 @@ void SwCrsrShell::ExtendedSelectAll()
pPos->nContent.Assign( pCNd, pCNd ? pCNd->Len() : 0 );
}
-BOOL SwCrsrShell::MovePage( SwWhichPage fnWhichPage, SwPosPage fnPosPage )
+sal_Bool SwCrsrShell::MovePage( SwWhichPage fnWhichPage, SwPosPage fnPosPage )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// Springe beim Selektieren nie ueber Section-Grenzen !!
if( !pCurCrsr->HasMark() || !pCurCrsr->IsNoCntnt() )
@@ -554,35 +569,35 @@ BOOL SwCrsrShell::MovePage( SwWhichPage fnWhichPage, SwPosPage fnPosPage )
Point& rPt = pCurCrsr->GetPtPos();
SwCntntFrm * pFrm = pCurCrsr->GetCntntNode()->
GetFrm( &rPt, pCurCrsr->GetPoint() );
- if( pFrm && TRUE == ( bRet = GetFrmInPage( pFrm, fnWhichPage,
+ if( pFrm && sal_True == ( bRet = GetFrmInPage( pFrm, fnWhichPage,
fnPosPage, pCurCrsr ) ) &&
!pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ))
UpdateCrsr();
else
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
-BOOL SwCrsrShell::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara )
+sal_Bool SwCrsrShell::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
SwCursor* pTmpCrsr = getShellCrsr( true );
- BOOL bRet = pTmpCrsr->MovePara( fnWhichPara, fnPosPara );
+ sal_Bool bRet = pTmpCrsr->MovePara( fnWhichPara, fnPosPara );
if( bRet )
UpdateCrsr();
return bRet;
}
-BOOL SwCrsrShell::MoveSection( SwWhichSection fnWhichSect,
+sal_Bool SwCrsrShell::MoveSection( SwWhichSection fnWhichSect,
SwPosSection fnPosSect)
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
SwCursor* pTmpCrsr = getShellCrsr( true );
- BOOL bRet = pTmpCrsr->MoveSection( fnWhichSect, fnPosSect );
+ sal_Bool bRet = pTmpCrsr->MoveSection( fnWhichSect, fnPosSect );
if( bRet )
UpdateCrsr();
return bRet;
@@ -599,7 +614,7 @@ SwFrm* lcl_IsInHeaderFooter( const SwNodeIndex& rIdx, Point& rPt )
SwCntntNode* pCNd = rIdx.GetNode().GetCntntNode();
if( pCNd )
{
- pFrm = pCNd->GetFrm( &rPt, 0, FALSE )->GetUpper();
+ pFrm = pCNd->GetFrm( &rPt, 0, sal_False )->GetUpper();
while( pFrm && !pFrm->IsHeaderFrm() && !pFrm->IsFooterFrm() )
pFrm = pFrm->IsFlyFrm() ? ((SwFlyFrm*)pFrm)->AnchorFrm()
: pFrm->GetUpper();
@@ -607,7 +622,7 @@ SwFrm* lcl_IsInHeaderFooter( const SwNodeIndex& rIdx, Point& rPt )
return pFrm;
}
-BOOL SwCrsrShell::IsInHeaderFooter( BOOL* pbInHeader ) const
+sal_Bool SwCrsrShell::IsInHeaderFooter( sal_Bool* pbInHeader ) const
{
Point aPt;
SwFrm* pFrm = ::lcl_IsInHeaderFooter( pCurCrsr->GetPoint()->nNode, aPt );
@@ -616,7 +631,7 @@ BOOL SwCrsrShell::IsInHeaderFooter( BOOL* pbInHeader ) const
return 0 != pFrm;
}
-int SwCrsrShell::SetCrsr( const Point &rLPt, BOOL bOnlyText, bool bBlock )
+int SwCrsrShell::SetCrsr( const Point &rLPt, sal_Bool bOnlyText, bool bBlock )
{
SET_CURR_SHELL( this );
@@ -636,11 +651,11 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, BOOL bOnlyText, bool bBlock )
// <--
pTxtNd->HasVisibleNumberingOrBullet() )
{
- aTmpState.bInFrontOfLabel = TRUE; // #i27615#
+ aTmpState.bInFrontOfLabel = sal_True; // #i27615#
}
else
{
- aTmpState.bInFrontOfLabel = FALSE;
+ aTmpState.bInFrontOfLabel = sal_False;
}
int bRet = CRSR_POSOLD |
@@ -686,9 +701,9 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, BOOL bOnlyText, bool bBlock )
{
// im gleichen Frame gelandet?
SwFrm* pOld = ((SwCntntNode&)aPos.nNode.GetNode()).GetFrm(
- &aCharRect.Pos(), 0, FALSE );
+ &aCharRect.Pos(), 0, sal_False );
SwFrm* pNew = ((SwCntntNode&)aPos.nNode.GetNode()).GetFrm(
- &aPt, 0, FALSE );
+ &aPt, 0, sal_False );
if( pNew == pOld )
return bRet;
}
@@ -698,7 +713,7 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, BOOL bOnlyText, bool bBlock )
{
// SSelection ueber nicht erlaubte Sections oder wenn im Header/Footer
// dann in verschiedene
- if( !CheckNodesRange( aPos.nNode, pCrsr->GetMark()->nNode, TRUE )
+ if( !CheckNodesRange( aPos.nNode, pCrsr->GetMark()->nNode, sal_True )
|| ( pFrm && !pFrm->Frm().IsInside( pCrsr->GetMkPos() ) ))
return bRet;
@@ -721,7 +736,7 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, BOOL bOnlyText, bool bBlock )
if( !pCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ) )
{
- USHORT nFlag = SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE;
+ sal_uInt16 nFlag = SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE;
UpdateCrsr( nFlag );
bRet &= ~CRSR_POSOLD;
}
@@ -743,10 +758,10 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, BOOL bOnlyText, bool bBlock )
// es gibt keinen gueltigen Inhalt -> Cursor verstecken
pVisCrsr->Hide(); // sichtbaren Cursor immer verstecken
eMvState = MV_NONE; // Status fuers Crsr-Travelling
- bAllProtect = TRUE;
+ bAllProtect = sal_True;
if( GetDoc()->GetDocShell() )
{
- GetDoc()->GetDocShell()->SetReadOnlyUI( TRUE );
+ GetDoc()->GetDocShell()->SetReadOnlyUI( sal_True );
CallChgLnk(); // UI bescheid sagen!
}
}
@@ -839,7 +854,7 @@ void SwCrsrShell::ClearMark()
}
-void SwCrsrShell::NormalizePam(BOOL bPointFirst)
+void SwCrsrShell::NormalizePam(sal_Bool bPointFirst)
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
pCurCrsr->Normalize(bPointFirst);
@@ -859,8 +874,8 @@ void SwCrsrShell::SwapPam()
// Ansonsten wird er auf die gewaehlte SSelection gesetzt.
-BOOL SwCrsrShell::ChgCurrPam( const Point & rPt,
- BOOL bTstOnly, BOOL bTstHit )
+sal_Bool SwCrsrShell::ChgCurrPam( const Point & rPt,
+ sal_Bool bTstOnly, sal_Bool bTstHit )
{
SET_CURR_SHELL( this );
@@ -876,7 +891,7 @@ BOOL SwCrsrShell::ChgCurrPam( const Point & rPt,
SwCrsrMoveState aTmpState( MV_NONE );
aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
if ( !GetLayout()->GetCrsrOfst( &aPtPos, aPt, &aTmpState ) && bTstHit )
- return FALSE;
+ return sal_False;
// suche in allen Selektionen nach dieser Position
SwShellCrsr* pCmp = (SwShellCrsr*)pCurCrsr; // sicher den Pointer auf Cursor
@@ -885,15 +900,15 @@ BOOL SwCrsrShell::ChgCurrPam( const Point & rPt,
*pCmp->Start() <= aPtPos && *pCmp->End() > aPtPos )
{
if( bTstOnly || pCurCrsr == pCmp ) // ist der aktuelle.
- return TRUE; // return ohne Update
+ return sal_True; // return ohne Update
pCurCrsr = pCmp;
UpdateCrsr(); // Cursor steht schon richtig
- return TRUE;
+ return sal_True;
}
} while( pCurCrsr !=
( pCmp = dynamic_cast<SwShellCrsr*>(pCmp->GetNext()) ) );
- return FALSE;
+ return sal_False;
}
@@ -977,20 +992,20 @@ int SwCrsrShell::CompareCursor( CrsrCompareType eType ) const
}
-BOOL SwCrsrShell::IsSttPara() const
-{ return( pCurCrsr->GetPoint()->nContent == 0 ? TRUE : FALSE ); }
+sal_Bool SwCrsrShell::IsSttPara() const
+{ return( pCurCrsr->GetPoint()->nContent == 0 ? sal_True : sal_False ); }
-BOOL SwCrsrShell::IsEndPara() const
-{ return( pCurCrsr->GetPoint()->nContent == pCurCrsr->GetCntntNode()->Len() ? TRUE : FALSE ); }
+sal_Bool SwCrsrShell::IsEndPara() const
+{ return( pCurCrsr->GetPoint()->nContent == pCurCrsr->GetCntntNode()->Len() ? sal_True : sal_False ); }
-BOOL SwCrsrShell::IsInFrontOfLabel() const
+sal_Bool SwCrsrShell::IsInFrontOfLabel() const
{
return pCurCrsr->IsInFrontOfLabel();
}
-bool SwCrsrShell::SetInFrontOfLabel( BOOL bNew )
+bool SwCrsrShell::SetInFrontOfLabel( sal_Bool bNew )
{
if ( bNew != IsInFrontOfLabel() )
{
@@ -1001,12 +1016,12 @@ bool SwCrsrShell::SetInFrontOfLabel( BOOL bNew )
return false;
}
-BOOL SwCrsrShell::GotoPage( USHORT nPage )
+sal_Bool SwCrsrShell::GotoPage( sal_uInt16 nPage )
{
SET_CURR_SHELL( this );
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
SwCrsrSaveState aSaveState( *pCurCrsr );
- BOOL bRet = GetLayout()->SetCurrPage( pCurCrsr, nPage ) &&
+ sal_Bool bRet = GetLayout()->SetCurrPage( pCurCrsr, nPage ) &&
!pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS );
if( bRet )
@@ -1015,8 +1030,8 @@ BOOL SwCrsrShell::GotoPage( USHORT nPage )
}
-void SwCrsrShell::GetPageNum( USHORT &rnPhyNum, USHORT &rnVirtNum,
- BOOL bAtCrsrPos, const BOOL bCalcFrm )
+void SwCrsrShell::GetPageNum( sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum,
+ sal_Bool bAtCrsrPos, const sal_Bool bCalcFrm )
{
SET_CURR_SHELL( this );
// Seitennummer: die erste sichtbare Seite oder die am Cursor
@@ -1037,7 +1052,7 @@ void SwCrsrShell::GetPageNum( USHORT &rnPhyNum, USHORT &rnVirtNum,
}
-USHORT SwCrsrShell::GetNextPrevPageNum( BOOL bNext )
+sal_uInt16 SwCrsrShell::GetNextPrevPageNum( sal_Bool bNext )
{
SET_CURR_SHELL( this );
@@ -1078,7 +1093,7 @@ USHORT SwCrsrShell::GetNextPrevPageNum( BOOL bNext )
}
-USHORT SwCrsrShell::GetPageCnt()
+sal_uInt16 SwCrsrShell::GetPageCnt()
{
SET_CURR_SHELL( this );
// gebe die Anzahl der Seiten zurueck
@@ -1088,11 +1103,11 @@ USHORT SwCrsrShell::GetPageCnt()
// Gehe zur naechsten SSelection
-BOOL SwCrsrShell::GoNextCrsr()
+sal_Bool SwCrsrShell::GoNextCrsr()
{
// besteht ueberhaupt ein Ring ?
if( pCurCrsr->GetNext() == pCurCrsr )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
@@ -1104,17 +1119,17 @@ BOOL SwCrsrShell::GoNextCrsr()
UpdateCrsr();
pCurCrsr->Show();
}
- return TRUE;
+ return sal_True;
}
// gehe zur vorherigen SSelection
-BOOL SwCrsrShell::GoPrevCrsr()
+sal_Bool SwCrsrShell::GoPrevCrsr()
{
// besteht ueberhaupt ein Ring ?
if( pCurCrsr->GetNext() == pCurCrsr )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
@@ -1127,7 +1142,7 @@ BOOL SwCrsrShell::GoPrevCrsr()
pCurCrsr->Show();
}
- return TRUE;
+ return sal_True;
}
@@ -1138,11 +1153,11 @@ void SwCrsrShell::Paint( const Rectangle &rRect)
// beim Painten immer alle Cursor ausschalten
SwRect aRect( rRect );
- BOOL bVis = FALSE;
+ sal_Bool bVis = sal_False;
// ist Cursor sichtbar, dann verstecke den SV-Cursor
if( pVisCrsr->IsVisible() && !aRect.IsOver( aCharRect ) ) //JP 18.06.97: ???
{
- bVis = TRUE;
+ bVis = sal_True;
pVisCrsr->Hide();
}
@@ -1172,13 +1187,13 @@ void SwCrsrShell::Paint( const Rectangle &rRect)
void SwCrsrShell::VisPortChgd( const SwRect & rRect )
{
SET_CURR_SHELL( this );
- BOOL bVis; // beim Scrollen immer alle Cursor ausschalten
+ sal_Bool bVis; // beim Scrollen immer alle Cursor ausschalten
// ist Cursor sichtbar, dann verstecke den SV-Cursor
- if( TRUE == ( bVis = pVisCrsr->IsVisible() ))
+ if( sal_True == ( bVis = pVisCrsr->IsVisible() ))
pVisCrsr->Hide();
- bVisPortChgd = TRUE;
+ bVisPortChgd = sal_True;
aOldRBPos.X() = VisArea().Right();
aOldRBPos.Y() = VisArea().Bottom();
@@ -1192,9 +1207,9 @@ void SwCrsrShell::VisPortChgd( const SwRect & rRect )
pVisCrsr->Show();
if( nCrsrMove )
- bInCMvVisportChgd = TRUE;
+ bInCMvVisportChgd = sal_True;
- bVisPortChgd = FALSE;
+ bVisPortChgd = sal_False;
}
// aktualisiere den Crsrs, d.H. setze ihn wieder in den Content.
@@ -1286,7 +1301,7 @@ class SwNotifyAccAboutInvalidTextSelections
}
};
// <--
-void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
+void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
{
SET_CURR_SHELL( this );
@@ -1298,7 +1313,7 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
if( ActionPend() && BasicActionPend() )
{
if ( eFlags & SwCrsrShell::READONLY )
- bIgnoreReadonly = TRUE;
+ bIgnoreReadonly = sal_True;
return; // wenn nicht, dann kein Update !!
}
@@ -1307,7 +1322,7 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
if ( bIgnoreReadonly )
{
- bIgnoreReadonly = FALSE;
+ bIgnoreReadonly = sal_False;
eFlags |= SwCrsrShell::READONLY;
}
@@ -1323,8 +1338,8 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
if( pTstCrsr->HasMark() && !pBlockCrsr &&
pDoc->IsIdxInTbl( pTstCrsr->GetPoint()->nNode ) &&
( pTblCrsr ||
- pTstCrsr->GetNode( TRUE )->StartOfSectionNode() !=
- pTstCrsr->GetNode( FALSE )->StartOfSectionNode() ) )
+ pTstCrsr->GetNode( sal_True )->StartOfSectionNode() !=
+ pTstCrsr->GetNode( sal_False )->StartOfSectionNode() ) )
{
SwShellCrsr* pITmpCrsr = getShellCrsr( true );
Point aTmpPt( pITmpCrsr->GetPtPos() );
@@ -1361,7 +1376,7 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
// Second check if mark is in repeated headline:
if ( !bInRepeatedHeadline )
{
- SwCntntFrm* pMarkTblFrm = pITmpCrsr->GetCntntNode( FALSE )->GetFrm( &aTmpMk, pITmpCrsr->GetMark() );
+ SwCntntFrm* pMarkTblFrm = pITmpCrsr->GetCntntNode( sal_False )->GetFrm( &aTmpMk, pITmpCrsr->GetMark() );
OSL_ENSURE( pMarkTblFrm, "Tabelle Crsr nicht im Content ??" );
if ( pMarkTblFrm )
@@ -1416,7 +1431,7 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
}
SwCrsrMoveState aTmpState( MV_NONE );
- aTmpState.bRealHeight = TRUE;
+ aTmpState.bRealHeight = sal_True;
if( !pTblFrm->GetCharRect( aCharRect, *pTblCrsr->GetPoint(), &aTmpState ) )
{
Point aCentrPt( aCharRect.Center() );
@@ -1485,7 +1500,7 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
// sind wir vielleicht in einer geschuetzten/versteckten Section ?
{
SwShellCrsr* pShellCrsr = getShellCrsr( true );
- BOOL bChgState = TRUE;
+ sal_Bool bChgState = sal_True;
const SwSectionNode* pSectNd = pShellCrsr->GetNode()->FindSectionNode();
if( pSectNd && ( pSectNd->GetSection().IsHiddenFlag() ||
( !IsReadOnlyAvailable() &&
@@ -1499,14 +1514,14 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
// alles ist geschuetzt / versteckt -> besonderer Mode
if( bAllProtect && !IsReadOnlyAvailable() &&
pSectNd->GetSection().IsProtectFlag() )
- bChgState = FALSE;
+ bChgState = sal_False;
else
{
eMvState = MV_NONE; // Status fuers Crsr-Travelling
- bAllProtect = TRUE;
+ bAllProtect = sal_True;
if( GetDoc()->GetDocShell() )
{
- GetDoc()->GetDocShell()->SetReadOnlyUI( TRUE );
+ GetDoc()->GetDocShell()->SetReadOnlyUI( sal_True );
CallChgLnk(); // UI bescheid sagen!
}
return;
@@ -1515,12 +1530,12 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
}
if( bChgState )
{
- BOOL bWasAllProtect = bAllProtect;
- bAllProtect = FALSE;
+ sal_Bool bWasAllProtect = bAllProtect;
+ bAllProtect = sal_False;
if( bWasAllProtect && GetDoc()->GetDocShell() &&
GetDoc()->GetDocShell()->IsReadOnlyUI() )
{
- GetDoc()->GetDocShell()->SetReadOnlyUI( FALSE );
+ GetDoc()->GetDocShell()->SetReadOnlyUI( sal_False );
CallChgLnk(); // UI bescheid sagen!
}
}
@@ -1563,15 +1578,15 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
SwRect aOld( aCharRect );
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
SwCntntFrm *pFrm;
int nLoopCnt = 100;
SwShellCrsr* pShellCrsr = getShellCrsr( true );
do {
- BOOL bAgainst;
+ sal_Bool bAgainst;
do {
- bAgainst = FALSE;
+ bAgainst = sal_False;
pFrm = pShellCrsr->GetCntntNode()->GetFrm(
&pShellCrsr->GetPtPos(), pShellCrsr->GetPoint() );
// ist der Frm nicht mehr vorhanden, dann muss das gesamte Layout
@@ -1597,20 +1612,20 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
!pDoc->GetDocShell()->IsReadOnly() || bAllProtect ) )
{
// dann suche eine gueltige Position
- BOOL bChgState = TRUE;
+ sal_Bool bChgState = sal_True;
if( !FindValidCntntNode(!HasDrawView() ||
0 == Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount()))
{
// alles ist geschuetzt / versteckt -> besonderer Mode
if( bAllProtect )
- bChgState = FALSE;
+ bChgState = sal_False;
else
{
eMvState = MV_NONE; // Status fuers Crsr-Travelling
- bAllProtect = TRUE;
+ bAllProtect = sal_True;
if( GetDoc()->GetDocShell() )
{
- GetDoc()->GetDocShell()->SetReadOnlyUI( TRUE );
+ GetDoc()->GetDocShell()->SetReadOnlyUI( sal_True );
CallChgLnk(); // UI bescheid sagen!
}
return;
@@ -1619,16 +1634,16 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
if( bChgState )
{
- BOOL bWasAllProtect = bAllProtect;
- bAllProtect = FALSE;
+ sal_Bool bWasAllProtect = bAllProtect;
+ bAllProtect = sal_False;
if( bWasAllProtect && GetDoc()->GetDocShell() &&
GetDoc()->GetDocShell()->IsReadOnlyUI() )
{
- GetDoc()->GetDocShell()->SetReadOnlyUI( FALSE );
+ GetDoc()->GetDocShell()->SetReadOnlyUI( sal_False );
CallChgLnk(); // UI bescheid sagen!
}
- bAllProtect = FALSE;
- bAgainst = TRUE; // nochmal den richigen Frm suchen
+ bAllProtect = sal_False;
+ bAgainst = sal_True; // nochmal den richigen Frm suchen
}
}
} while( bAgainst );
@@ -1637,7 +1652,7 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
{
SwCrsrMoveState aTmpState( eMvState );
aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
- aTmpState.bRealHeight = TRUE;
+ aTmpState.bRealHeight = sal_True;
aTmpState.bRealWidth = IsOverwriteCrsr();
aTmpState.nCursorBidiLevel = pShellCrsr->GetCrsrBidiLevel();
@@ -1683,7 +1698,7 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
break;
}
aOld = aCharRect;
- bFirst = FALSE;
+ bFirst = sal_False;
// Cursor-Points auf die neuen Positionen setzen
pShellCrsr->GetPtPos().X() = aCharRect.Left();
@@ -1705,7 +1720,7 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
//JP 30.04.99: damit das EndAction, beim evtuellen Scrollen, den
// SV-Crsr nicht wieder sichtbar macht, wird hier das Flag
// gesichert und zurueckgesetzt.
- BOOL bSav = bSVCrsrVis; bSVCrsrVis = FALSE;
+ sal_Bool bSav = bSVCrsrVis; bSVCrsrVis = sal_False;
MakeSelVisible();
bSVCrsrVis = bSav;
}
@@ -1890,20 +1905,20 @@ void SwCrsrShell::Push()
/*
* Loescht einen Cursor (gesteuert durch bOldCrsr)
- * - vom Stack oder ( bOldCrsr = TRUE )
+ * - vom Stack oder ( bOldCrsr = sal_True )
* - den aktuellen und der auf dem Stack stehende wird zum aktuellen
*
* Return: es war auf dem Stack noch einer vorhanden
*/
-BOOL SwCrsrShell::Pop( BOOL bOldCrsr )
+sal_Bool SwCrsrShell::Pop( sal_Bool bOldCrsr )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
// noch weitere vorhanden ?
if( 0 == pCrsrStk )
- return FALSE;
+ return sal_False;
SwShellCrsr *pTmp = 0, *pOldStk = pCrsrStk;
@@ -1944,12 +1959,12 @@ BOOL SwCrsrShell::Pop( BOOL bOldCrsr )
pCurCrsr->GetPtPos() = pOldStk->GetPtPos();
delete pOldStk;
- if( !pCurCrsr->IsInProtectTable( TRUE ) &&
+ if( !pCurCrsr->IsInProtectTable( sal_True ) &&
!pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ) )
UpdateCrsr(); // akt. Cursor Updaten
}
- return TRUE;
+ return sal_True;
}
/*
@@ -1969,10 +1984,10 @@ void SwCrsrShell::Combine()
if( pCrsrStk->HasMark() ) // nur wenn GetMark gesetzt wurde
{
#if OSL_DEBUG_LEVEL > 1
- if( !CheckNodesRange( pCrsrStk->GetMark()->nNode, pCurCrsr->GetPoint()->nNode, TRUE ))
+ if( !CheckNodesRange( pCrsrStk->GetMark()->nNode, pCurCrsr->GetPoint()->nNode, sal_True ))
OSL_ENSURE( !this, "StackCrsr & akt. Crsr nicht in gleicher Section." );
#else
- CheckNodesRange( pCrsrStk->GetMark()->nNode, pCurCrsr->GetPoint()->nNode, TRUE );
+ CheckNodesRange( pCrsrStk->GetMark()->nNode, pCurCrsr->GetPoint()->nNode, sal_True );
#endif
// kopiere das GetMark
if( !pCurCrsr->HasMark() )
@@ -1988,7 +2003,7 @@ void SwCrsrShell::Combine()
}
delete pCrsrStk;
pCrsrStk = pTmp;
- if( !pCurCrsr->IsInProtectTable( TRUE ) &&
+ if( !pCurCrsr->IsInProtectTable( sal_True ) &&
!pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ) )
UpdateCrsr(); // akt. Cursor Updaten
@@ -2013,7 +2028,7 @@ void SwCrsrShell::HideCrsrs()
-void SwCrsrShell::ShowCrsrs( BOOL bCrsrVis )
+void SwCrsrShell::ShowCrsrs( sal_Bool bCrsrVis )
{
if( !bHasFocus || bAllProtect || bBasicHideCrsr )
return;
@@ -2033,7 +2048,7 @@ void SwCrsrShell::ShowCrsr()
{
if( !bBasicHideCrsr )
{
- bSVCrsrVis = TRUE;
+ bSVCrsrVis = sal_True;
UpdateCrsr();
}
}
@@ -2043,7 +2058,7 @@ void SwCrsrShell::HideCrsr()
{
if( !bBasicHideCrsr )
{
- bSVCrsrVis = FALSE;
+ bSVCrsrVis = sal_False;
// evt. die sel. Bereiche aufheben !!
SET_CURR_SHELL( this );
pVisCrsr->Hide();
@@ -2055,25 +2070,25 @@ void SwCrsrShell::ShLooseFcs()
{
if( !bBasicHideCrsr )
HideCrsrs();
- bHasFocus = FALSE;
+ bHasFocus = sal_False;
}
-void SwCrsrShell::ShGetFcs( BOOL bUpdate )
+void SwCrsrShell::ShGetFcs( sal_Bool bUpdate )
{
- bHasFocus = TRUE;
+ bHasFocus = sal_True;
if( !bBasicHideCrsr && VisArea().Width() )
{
- UpdateCrsr( static_cast<USHORT>( bUpdate ?
+ UpdateCrsr( static_cast<sal_uInt16>( bUpdate ?
SwCrsrShell::CHKRANGE|SwCrsrShell::SCROLLWIN
: SwCrsrShell::CHKRANGE ) );
- ShowCrsrs( bSVCrsrVis ? TRUE : FALSE );
+ ShowCrsrs( bSVCrsrVis ? sal_True : sal_False );
}
}
// gebe den aktuellen Frame, in dem der Cursor steht, zurueck
-SwCntntFrm *SwCrsrShell::GetCurrFrm( const BOOL bCalcFrm ) const
+SwCntntFrm *SwCrsrShell::GetCurrFrm( const sal_Bool bCalcFrm ) const
{
SET_CURR_SHELL( (ViewShell*)this );
SwCntntFrm *pRet = 0;
@@ -2082,16 +2097,16 @@ SwCntntFrm *SwCrsrShell::GetCurrFrm( const BOOL bCalcFrm ) const
{
if ( bCalcFrm )
{
- const USHORT* pST = &nStartAction;
- ++(*((USHORT*)pST));
+ const sal_uInt16* pST = &nStartAction;
+ ++(*((sal_uInt16*)pST));
const Size aOldSz( GetDocSize() );
pRet = pNd->GetFrm( &pCurCrsr->GetPtPos(), pCurCrsr->GetPoint() );
- --(*((USHORT*)pST));
+ --(*((sal_uInt16*)pST));
if( aOldSz != GetDocSize() )
((SwCrsrShell*)this)->SizeChgNotify();
}
else
- pRet = pNd->GetFrm( &pCurCrsr->GetPtPos(), pCurCrsr->GetPoint(), FALSE);
+ pRet = pNd->GetFrm( &pCurCrsr->GetPtPos(), pCurCrsr->GetPoint(), sal_False);
}
return pRet;
}
@@ -2103,11 +2118,11 @@ SwCntntFrm *SwCrsrShell::GetCurrFrm( const BOOL bCalcFrm ) const
void SwCrsrShell::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
- const USHORT nWhich = pOld ?
+ const sal_uInt16 nWhich = pOld ?
pOld->Which() :
pNew ?
pNew->Which() :
- sal::static_int_cast<USHORT>(RES_MSG_BEGIN);
+ sal::static_int_cast<sal_uInt16>(RES_MSG_BEGIN);
if( bCallChgLnk &&
( nWhich < RES_MSG_BEGIN || nWhich >= RES_MSG_END ||
@@ -2115,7 +2130,7 @@ void SwCrsrShell::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
nWhich == RES_ATTRSET_CHG ))
// die Messages werden nicht weitergemeldet
//MA 07. Apr. 94 fix(6681): RES_UPDATE_ATTR wird implizit vom
- //SwTxtNode::Insert(SwTxtHint*, USHORT) abgesetzt; hier wird reagiert und
+ //SwTxtNode::Insert(SwTxtHint*, sal_uInt16) abgesetzt; hier wird reagiert und
//vom Insert brauch nicht mehr die Keule RES_FMT_CHG versandt werden.
CallChgLnk();
@@ -2129,12 +2144,12 @@ void SwCrsrShell::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
// also, ob GetMark gesetzt und SPoint und GetMark unterschiedlich sind.
-BOOL SwCrsrShell::HasSelection() const
+sal_Bool SwCrsrShell::HasSelection() const
{
const SwPaM* pCrsr = getShellCrsr( true );
return( IsTableMode() || ( pCrsr->HasMark() &&
*pCrsr->GetPoint() != *pCrsr->GetMark())
- ? TRUE : FALSE );
+ ? sal_True : sal_False );
}
@@ -2143,12 +2158,12 @@ void SwCrsrShell::CallChgLnk()
// innerhalb von Start-/End-Action kein Call, sondern nur merken,
// das sich etwas geaendert hat. Wird bei EndAction beachtet.
if( BasicActionPend() )
- bChgCallFlag = TRUE; // das Change merken
+ bChgCallFlag = sal_True; // das Change merken
else if( aChgLnk.IsSet() )
{
if( bCallChgLnk )
aChgLnk.Call( this );
- bChgCallFlag = FALSE; // Flag zuruecksetzen
+ bChgCallFlag = sal_False; // Flag zuruecksetzen
}
}
@@ -2190,7 +2205,7 @@ String SwCrsrShell::GetText() const
}
// hole vom Start/Ende der akt. SSelection das nte Zeichen
-sal_Unicode SwCrsrShell::GetChar( BOOL bEnd, long nOffset )
+sal_Unicode SwCrsrShell::GetChar( sal_Bool bEnd, long nOffset )
{
if( IsTableMode() ) // im TabelleMode nicht moeglich
return 0;
@@ -2214,10 +2229,10 @@ sal_Unicode SwCrsrShell::GetChar( BOOL bEnd, long nOffset )
// erweiter die akt. SSelection am Anfang/Ende um n Zeichen
-BOOL SwCrsrShell::ExtendSelection( BOOL bEnd, xub_StrLen nCount )
+sal_Bool SwCrsrShell::ExtendSelection( sal_Bool bEnd, xub_StrLen nCount )
{
if( !pCurCrsr->HasMark() || IsTableMode() )
- return FALSE; // keine Selektion
+ return sal_False; // keine Selektion
SwPosition* pPos = bEnd ? pCurCrsr->End() : pCurCrsr->Start();
SwTxtNode* pTxtNd = pPos->nNode.GetNode().GetTxtNode();
@@ -2229,47 +2244,47 @@ BOOL SwCrsrShell::ExtendSelection( BOOL bEnd, xub_StrLen nCount )
if( ( nPos + nCount ) <= pTxtNd->GetTxt().Len() )
nPos = nPos + nCount;
else
- return FALSE; // nicht mehr moeglich
+ return sal_False; // nicht mehr moeglich
}
else if( nPos >= nCount )
nPos = nPos - nCount;
else
- return FALSE; // nicht mehr moeglich
+ return sal_False; // nicht mehr moeglich
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
pPos->nContent = nPos;
UpdateCrsr();
- return TRUE;
+ return sal_True;
}
// setze nur den sichtbaren Cursor an die angegebene Dokument-Pos.
-// returnt FALSE: wenn der SPoint vom Layout korrigiert wurde.
+// returnt sal_False: wenn der SPoint vom Layout korrigiert wurde.
-BOOL SwCrsrShell::SetVisCrsr( const Point &rPt )
+sal_Bool SwCrsrShell::SetVisCrsr( const Point &rPt )
{
SET_CURR_SHELL( this );
Point aPt( rPt );
SwPosition aPos( *pCurCrsr->GetPoint() );
SwCrsrMoveState aTmpState( MV_SETONLYTEXT );
aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
- aTmpState.bRealHeight = TRUE;
+ aTmpState.bRealHeight = sal_True;
- BOOL bRet = GetLayout()->GetCrsrOfst( &aPos, aPt /*, &aTmpState*/ );
+ sal_Bool bRet = GetLayout()->GetCrsrOfst( &aPos, aPt /*, &aTmpState*/ );
- SetInFrontOfLabel( FALSE ); // #i27615#
+ SetInFrontOfLabel( sal_False ); // #i27615#
// nur in TextNodes anzeigen !!
SwTxtNode* pTxtNd = aPos.nNode.GetNode().GetTxtNode();
if( !pTxtNd )
- return FALSE;
+ return sal_False;
const SwSectionNode* pSectNd = pTxtNd->FindSectionNode();
if( pSectNd && (pSectNd->GetSection().IsHiddenFlag() ||
( !IsReadOnlyAvailable() &&
pSectNd->GetSection().IsProtectFlag())) )
- return FALSE;
+ return sal_False;
SwCntntFrm *pFrm = pTxtNd->GetFrm( &aPt, &aPos );
if ( Imp()->IsIdleAction() )
@@ -2280,7 +2295,7 @@ BOOL SwCrsrShell::SetVisCrsr( const Point &rPt )
if( aTmp == aCharRect && // BUG 10137: bleibt der Cursor auf der
pVisCrsr->IsVisible() ) // Position nicht hidden & showen
- return TRUE;
+ return sal_True;
pVisCrsr->Hide(); // sichtbaren Cursor immer verstecken
if( IsScrollMDI( this, aCharRect ))
@@ -2298,13 +2313,13 @@ BOOL SwCrsrShell::SetVisCrsr( const Point &rPt )
aCrsrHeight.Y() = aCharRect.Height();
}
- pVisCrsr->SetDragCrsr( TRUE );
+ pVisCrsr->SetDragCrsr( sal_True );
pVisCrsr->Show(); // wieder anzeigen
}
return bRet;
}
-BOOL SwCrsrShell::IsOverReadOnlyPos( const Point& rPt ) const
+sal_Bool SwCrsrShell::IsOverReadOnlyPos( const Point& rPt ) const
{
Point aPt( rPt );
SwPaM aPam( *pCurCrsr->GetPoint() );
@@ -2316,10 +2331,10 @@ BOOL SwCrsrShell::IsOverReadOnlyPos( const Point& rPt ) const
// returne die Anzahl der Cursor im Ring (Flag besagt ob man nur
// aufgepspannte haben will - sprich etwas selektiert ist (Basic))
-USHORT SwCrsrShell::GetCrsrCnt( BOOL bAll ) const
+sal_uInt16 SwCrsrShell::GetCrsrCnt( sal_Bool bAll ) const
{
Ring* pTmp = GetCrsr()->GetNext();
- USHORT n = (bAll || ( pCurCrsr->HasMark() &&
+ sal_uInt16 n = (bAll || ( pCurCrsr->HasMark() &&
*pCurCrsr->GetPoint() != *pCurCrsr->GetMark())) ? 1 : 0;
while( pTmp != pCurCrsr )
{
@@ -2332,10 +2347,10 @@ USHORT SwCrsrShell::GetCrsrCnt( BOOL bAll ) const
}
-BOOL SwCrsrShell::IsStartOfDoc() const
+sal_Bool SwCrsrShell::IsStartOfDoc() const
{
if( pCurCrsr->GetPoint()->nContent.GetIndex() )
- return FALSE;
+ return sal_False;
// Hinter EndOfIcons kommt die Content-Section (EndNd+StNd+CntntNd)
SwNodeIndex aIdx( GetDoc()->GetNodes().GetEndOfExtras(), 2 );
@@ -2345,7 +2360,7 @@ BOOL SwCrsrShell::IsStartOfDoc() const
}
-BOOL SwCrsrShell::IsEndOfDoc() const
+sal_Bool SwCrsrShell::IsEndOfDoc() const
{
SwNodeIndex aIdx( GetDoc()->GetNodes().GetEndOfContent(), -1 );
SwCntntNode* pCNd = aIdx.GetNode().GetCntntNode();
@@ -2361,10 +2376,10 @@ BOOL SwCrsrShell::IsEndOfDoc() const
// Cursor auf seinen TextNode (oder StartNode?).
// Beim naechsten ::GetCrsr werden sie wieder alle erzeugt
// Wird fuers Drag&Drop / ClipBorad-Paste in Tabellen benoetigt.
-BOOL SwCrsrShell::ParkTblCrsr()
+sal_Bool SwCrsrShell::ParkTblCrsr()
{
if( !pTblCrsr )
- return FALSE;
+ return sal_False;
pTblCrsr->ParkCrsr();
@@ -2376,7 +2391,7 @@ BOOL SwCrsrShell::ParkTblCrsr()
*pCurCrsr->GetMark() = *pCurCrsr->GetPoint() = *pTblCrsr->GetPoint();
pCurCrsr->DeleteMark();
- return TRUE;
+ return sal_True;
}
/***********************************************************************
@@ -2394,7 +2409,7 @@ void SwCrsrShell::_ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing )
SwPaM *pTmpDel = 0, *pTmp = *ppDelRing;
// durchsuche den gesamten Ring
- BOOL bGoNext;
+ sal_Bool bGoNext;
do {
const SwPosition *pTmpStt = pTmp->Start(),
*pTmpEnd = pTmp->GetPoint() == pTmpStt ?
@@ -2415,22 +2430,22 @@ void SwCrsrShell::_ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing )
if( *pStt < *pTmpEnd )
pTmpDel = pTmp;
- bGoNext = TRUE;
+ bGoNext = sal_True;
if( pTmpDel ) // ist der Pam im Bereich ?? loesche ihn
{
- BOOL bDelete = TRUE;
+ sal_Bool bDelete = sal_True;
if( *ppDelRing == pTmpDel )
{
if( *ppDelRing == pCurCrsr )
{
- if( TRUE == ( bDelete = GoNextCrsr() ))
+ if( sal_True == ( bDelete = GoNextCrsr() ))
{
- bGoNext = FALSE;
+ bGoNext = sal_False;
pTmp = (SwPaM*)pTmp->GetNext();
}
}
else
- bDelete = FALSE; // StackCrsr nie loeschen !!
+ bDelete = sal_False; // StackCrsr nie loeschen !!
}
if( bDelete )
@@ -2531,9 +2546,9 @@ SwCrsrShell::SwCrsrShell( SwCrsrShell& rShell, Window *pInitWin )
bAllProtect = bVisPortChgd = bChgCallFlag = bInCMvVisportChgd =
bGCAttr = bIgnoreReadonly = bSelTblCells = bBasicHideCrsr =
- bOverwriteCrsr = FALSE;
- bCallChgLnk = bHasFocus = bSVCrsrVis = bAutoUpdateCells = TRUE;
- bSetCrsrInReadOnly = TRUE;
+ bOverwriteCrsr = sal_False;
+ bCallChgLnk = bHasFocus = bSVCrsrVis = bAutoUpdateCells = sal_True;
+ bSetCrsrInReadOnly = sal_True;
pVisCrsr = new SwVisCrsr( this );
mbMacroExecAllowed = rShell.IsMacroExecAllowed();
}
@@ -2570,9 +2585,9 @@ SwCrsrShell::SwCrsrShell( SwDoc& rDoc, Window *pInitWin,
bAllProtect = bVisPortChgd = bChgCallFlag = bInCMvVisportChgd =
bGCAttr = bIgnoreReadonly = bSelTblCells = bBasicHideCrsr =
- bOverwriteCrsr = FALSE;
- bCallChgLnk = bHasFocus = bSVCrsrVis = bAutoUpdateCells = TRUE;
- bSetCrsrInReadOnly = TRUE;
+ bOverwriteCrsr = sal_False;
+ bCallChgLnk = bHasFocus = bSVCrsrVis = bAutoUpdateCells = sal_True;
+ bSetCrsrInReadOnly = sal_True;
pVisCrsr = new SwVisCrsr( this );
mbMacroExecAllowed = true;
@@ -2627,13 +2642,13 @@ SwShellCrsr* SwCrsrShell::getShellCrsr( bool bBlock )
//Sollte fuer das Clipboard der WaitPtr geschaltet werden?
//Warten bei TableMode, Mehrfachselektion und mehr als x Selektieren Absaetzen.
-BOOL SwCrsrShell::ShouldWait() const
+sal_Bool SwCrsrShell::ShouldWait() const
{
if ( IsTableMode() || GetCrsrCnt() > 1 )
- return TRUE;
+ return sal_True;
if( HasDrawView() && GetDrawView()->GetMarkedObjectList().GetMarkCount() )
- return TRUE;
+ return sal_True;
SwPaM* pPam = GetCrsr();
return pPam->Start()->nNode.GetIndex() + 10 <
@@ -2641,7 +2656,7 @@ BOOL SwCrsrShell::ShouldWait() const
}
-USHORT SwCrsrShell::UpdateTblSelBoxes()
+sal_uInt16 SwCrsrShell::UpdateTblSelBoxes()
{
if( pTblCrsr && ( pTblCrsr->IsChgd() || !pTblCrsr->GetBoxesCount() ))
GetLayout()->MakeTblCrsrs( *pTblCrsr );
@@ -2685,18 +2700,18 @@ void SwCrsrShell::MakeSelVisible()
// suche eine gueltige ContentPosition (nicht geschuetzt/nicht versteckt)
-BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
+sal_Bool SwCrsrShell::FindValidCntntNode( sal_Bool bOnlyText )
{
if( pTblCrsr ) // was soll ich jetzt machen ??
{
OSL_ENSURE( !this, "TabellenSelection nicht aufgehoben!" );
- return FALSE;
+ return sal_False;
}
//JP 28.10.97: Bug 45129 - im UI-ReadOnly ist alles erlaubt
if( !bAllProtect && GetDoc()->GetDocShell() &&
GetDoc()->GetDocShell()->IsReadOnlyUI() )
- return TRUE;
+ return sal_True;
// dann raus da!
if( pCurCrsr->HasMark() )
@@ -2704,12 +2719,12 @@ BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
// als erstes mal auf Rahmen abpruefen
SwNodeIndex& rNdIdx = pCurCrsr->GetPoint()->nNode;
- ULONG nNdIdx = rNdIdx.GetIndex(); // sichern
+ sal_uLong nNdIdx = rNdIdx.GetIndex(); // sichern
SwNodes& rNds = pDoc->GetNodes();
SwCntntNode* pCNd = rNdIdx.GetNode().GetCntntNode();
const SwCntntFrm * pFrm;
- if( pCNd && 0 != (pFrm = pCNd->GetFrm(0,pCurCrsr->GetPoint(),FALSE)) &&
+ if( pCNd && 0 != (pFrm = pCNd->GetFrm(0,pCurCrsr->GetPoint(),sal_False)) &&
!IsReadOnlyAvailable() && pFrm->IsProtected() &&
nNdIdx < rNds.GetEndOfExtras().GetIndex() )
{
@@ -2719,17 +2734,17 @@ BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
aPam.GetMark()->nNode = rNds.GetEndOfContent();
aPam.GetPoint()->nNode = *pCNd->EndOfSectionNode();
- BOOL bFirst = FALSE;
- if( 0 == (pCNd = ::GetNode( aPam, bFirst, fnMoveForward, FALSE )))
+ sal_Bool bFirst = sal_False;
+ if( 0 == (pCNd = ::GetNode( aPam, bFirst, fnMoveForward, sal_False )))
{
aPam.GetMark()->nNode = *rNds.GetEndOfPostIts().StartOfSectionNode();
- pCNd = ::GetNode( aPam, bFirst, fnMoveBackward, FALSE );
+ pCNd = ::GetNode( aPam, bFirst, fnMoveBackward, sal_False );
}
if( !pCNd ) // sollte nie passieren !!!
{
rNdIdx = nNdIdx; // alten Node zurueck
- return FALSE;
+ return sal_False;
}
*pCurCrsr->GetPoint() = *aPam.GetPoint();
}
@@ -2742,7 +2757,7 @@ BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
nNdIdx = rNdIdx.GetIndex();
}
- BOOL bOk = TRUE;
+ sal_Bool bOk = sal_True;
// #i9059# cursor may not stand in protected cells
// (unless cursor in protected areas is OK.)
@@ -2785,15 +2800,15 @@ BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
typedef SwCntntNode* (SwNodes:: *FNGoSection)( SwNodeIndex *, int, int ) const;
FNGoSection funcGoSection = &SwNodes::GoNextSection;
- bOk = FALSE;
+ bOk = sal_False;
for( int nLoopCnt = 0; !bOk && nLoopCnt < 2; ++nLoopCnt )
{
- BOOL bWeiter;
+ sal_Bool bWeiter;
do {
- bWeiter = FALSE;
+ bWeiter = sal_False;
while( 0 != ( pCNd = (rNds.*funcGoSection)( &rNdIdx,
- TRUE, !IsReadOnlyAvailable() )) )
+ sal_True, !IsReadOnlyAvailable() )) )
{
// in eine Tabelle verschoben -> pruefe ob die
// vielleicht geschuetzt ist
@@ -2802,14 +2817,14 @@ BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
SwCallLink aTmp( *this );
SwCrsrSaveState aSaveState( *pCurCrsr );
aTmp.nNdTyp = 0; // im DTOR nichts machen!
- if( !pCurCrsr->IsInProtectTable( TRUE, TRUE ) )
+ if( !pCurCrsr->IsInProtectTable( sal_True, sal_True ) )
{
const SwSectionNode* pSNd = pCNd->FindSectionNode();
if( !pSNd || !pSNd->GetSection().IsHiddenFlag()
|| (!IsReadOnlyAvailable() &&
pSNd->GetSection().IsProtectFlag() ))
{
- bOk = TRUE;
+ bOk = sal_True;
break; // eine nicht geschuetzte Zelle gef.
}
continue; // dann weiter suchen
@@ -2817,7 +2832,7 @@ BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
}
else
{
- bOk = TRUE;
+ bOk = sal_True;
break; // eine nicht geschuetzte Zelle gef.
}
}
@@ -2825,13 +2840,13 @@ BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
if( bOk && rNdIdx.GetIndex() < rNds.GetEndOfExtras().GetIndex() )
{
// Teste mal auf Fly - kann auch noch geschuetzt sein!!
- if( 0 == (pFrm = pCNd->GetFrm(0,0,FALSE)) ||
+ if( 0 == (pFrm = pCNd->GetFrm(0,0,sal_False)) ||
( !IsReadOnlyAvailable() && pFrm->IsProtected() ) ||
( bOnlyText && pCNd->IsNoTxtNode() ) )
{
// dann weiter suchen!
- bOk = FALSE;
- bWeiter = TRUE;
+ bOk = sal_False;
+ bWeiter = sal_True;
}
}
} while( bWeiter );
@@ -2856,7 +2871,7 @@ BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
// falls Cursor im versteckten Bereich ist, auf jedenfall schon mal
// verschieben!!
- if( !pCNd || !pCNd->GetFrm(0,0,FALSE) )
+ if( !pCNd || !pCNd->GetFrm(0,0,sal_False) )
{
SwCrsrMoveState aTmpState( MV_NONE );
aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
@@ -2873,13 +2888,13 @@ void SwCrsrShell::NewCoreSelection()
}
-BOOL SwCrsrShell::IsCrsrReadonly() const
+sal_Bool SwCrsrShell::IsCrsrReadonly() const
{
if ( GetViewOptions()->IsReadonly() ||
// Formular view
GetViewOptions()->IsFormView() )
{
- SwFrm *pFrm = GetCurrFrm( FALSE );
+ SwFrm *pFrm = GetCurrFrm( sal_False );
const SwFlyFrm* pFly;
const SwSection* pSection;
@@ -2889,24 +2904,24 @@ BOOL SwCrsrShell::IsCrsrReadonly() const
!pFly->Lower()->IsNoTxtFrm() &&
!GetDrawView()->GetMarkedObjectList().GetMarkCount() )
{
- return FALSE;
+ return sal_False;
}
// edit in readonly sections
else if ( pFrm && pFrm->IsInSct() &&
0 != ( pSection = pFrm->FindSctFrm()->GetSection() ) &&
pSection->IsEditInReadonlyFlag() )
{
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// darf der Cursor in ReadOnlyBereiche?
-void SwCrsrShell::SetReadOnlyAvailable( BOOL bFlag )
+void SwCrsrShell::SetReadOnlyAvailable( sal_Bool bFlag )
{
// im GlobalDoc darf NIE umgeschaltet werden
if( (!GetDoc()->GetDocShell() ||
@@ -2925,9 +2940,9 @@ void SwCrsrShell::SetReadOnlyAvailable( BOOL bFlag )
}
}
-BOOL SwCrsrShell::HasReadonlySel() const
+sal_Bool SwCrsrShell::HasReadonlySel() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( IsReadOnlyAvailable() || GetViewOptions()->IsFormView() )
{
if( pTblCrsr )
@@ -2939,16 +2954,16 @@ BOOL SwCrsrShell::HasReadonlySel() const
do {
if( pCrsr->HasReadonlySel( GetViewOptions()->IsFormView() ) )
- bRet = TRUE;
+ bRet = sal_True;
} while( !bRet && pCurCrsr != ( pCrsr = (SwPaM*)pCrsr->GetNext() ));
}
}
return bRet;
}
-BOOL SwCrsrShell::IsSelFullPara() const
+sal_Bool SwCrsrShell::IsSelFullPara() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pCurCrsr->GetPoint()->nNode.GetIndex() ==
pCurCrsr->GetMark()->nNode.GetIndex() && pCurCrsr == pCurCrsr->GetNext() )
@@ -2982,13 +2997,13 @@ short SwCrsrShell::GetTextDirection( const Point* pPt ) const
return pDoc->GetTextDirection( aPos, &aPt );
}
-BOOL SwCrsrShell::IsInVerticalText( const Point* pPt ) const
+sal_Bool SwCrsrShell::IsInVerticalText( const Point* pPt ) const
{
const short nDir = GetTextDirection( pPt );
return FRMDIR_VERT_TOP_RIGHT == nDir || FRMDIR_VERT_TOP_LEFT == nDir;
}
-BOOL SwCrsrShell::IsInRightToLeftText( const Point* pPt ) const
+sal_Bool SwCrsrShell::IsInRightToLeftText( const Point* pPt ) const
{
const short nDir = GetTextDirection( pPt );
// GetTextDirection uses FRMDIR_VERT_TOP_LEFT to indicate RTL in
@@ -3029,39 +3044,39 @@ bool SwCrsrShell::SelectHiddenRange()
}
// die Suchfunktionen
-ULONG SwCrsrShell::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes,
+sal_uLong SwCrsrShell::Find( const SearchOptions& rSearchOpt, sal_Bool bSearchInNotes,
SwDocPositions eStart, SwDocPositions eEnde,
- BOOL& bCancel,
+ sal_Bool& bCancel,
FindRanges eRng, int bReplace )
{
if( pTblCrsr )
GetCrsr();
delete pTblCrsr, pTblCrsr = 0;
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
- ULONG nRet = pCurCrsr->Find( rSearchOpt, bSearchInNotes, eStart, eEnde, bCancel, eRng, bReplace );
+ sal_uLong nRet = pCurCrsr->Find( rSearchOpt, bSearchInNotes, eStart, eEnde, bCancel, eRng, bReplace );
if( nRet || bCancel )
UpdateCrsr();
return nRet;
}
-ULONG SwCrsrShell::Find( const SwTxtFmtColl& rFmtColl,
+sal_uLong SwCrsrShell::Find( const SwTxtFmtColl& rFmtColl,
SwDocPositions eStart, SwDocPositions eEnde,
- BOOL& bCancel,
+ sal_Bool& bCancel,
FindRanges eRng, const SwTxtFmtColl* pReplFmt )
{
if( pTblCrsr )
GetCrsr();
delete pTblCrsr, pTblCrsr = 0;
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
- ULONG nRet = pCurCrsr->Find( rFmtColl, eStart, eEnde, bCancel, eRng, pReplFmt );
+ sal_uLong nRet = pCurCrsr->Find( rFmtColl, eStart, eEnde, bCancel, eRng, pReplFmt );
if( nRet )
UpdateCrsr();
return nRet;
}
-ULONG SwCrsrShell::Find( const SfxItemSet& rSet, BOOL bNoCollections,
+sal_uLong SwCrsrShell::Find( const SfxItemSet& rSet, sal_Bool bNoCollections,
SwDocPositions eStart, SwDocPositions eEnde,
- BOOL& bCancel,
+ sal_Bool& bCancel,
FindRanges eRng, const SearchOptions* pSearchOpt,
const SfxItemSet* rReplSet )
{
@@ -3069,7 +3084,7 @@ ULONG SwCrsrShell::Find( const SfxItemSet& rSet, BOOL bNoCollections,
GetCrsr();
delete pTblCrsr, pTblCrsr = 0;
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
- ULONG nRet = pCurCrsr->Find( rSet, bNoCollections, eStart, eEnde, bCancel,
+ sal_uLong nRet = pCurCrsr->Find( rSet, bNoCollections, eStart, eEnde, bCancel,
eRng, pSearchOpt, rReplSet );
if( nRet )
UpdateCrsr();
@@ -3239,7 +3254,7 @@ void lcl_FillRecognizerData( uno::Sequence< rtl::OUString >& rSmartTagTypes,
std::vector< rtl::OUString > aSmartTagTypes;
std::vector< uno::Reference< container::XStringKeyMap > > aStringKeyMaps;
- for ( USHORT i = 0; i < rSmartTagList.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rSmartTagList.Count(); ++i )
{
const xub_StrLen nSTPos = rSmartTagList.Pos( i );
const xub_StrLen nSTLen = rSmartTagList.Len( i );
@@ -3261,7 +3276,7 @@ void lcl_FillRecognizerData( uno::Sequence< rtl::OUString >& rSmartTagTypes,
rStringKeyMaps.realloc( aSmartTagTypes.size() );
std::vector< rtl::OUString >::const_iterator aTypesIter = aSmartTagTypes.begin();
- USHORT i = 0;
+ sal_uInt16 i = 0;
for ( aTypesIter = aSmartTagTypes.begin(); aTypesIter != aSmartTagTypes.end(); ++aTypesIter )
rSmartTagTypes[i++] = *aTypesIter;
@@ -3310,7 +3325,7 @@ void SwCrsrShell::GetSmartTagTerm( uno::Sequence< rtl::OUString >& rSmartTagType
if( pSmartTagList->InWrongWord( nBegin, nLen ) && !pNode->IsSymbol(nBegin) )
{
- const USHORT nIndex = pSmartTagList->GetWrongPos( nBegin );
+ const sal_uInt16 nIndex = pSmartTagList->GetWrongPos( nBegin );
const SwWrongList* pSubList = pSmartTagList->SubList( nIndex );
if ( pSubList )
{
@@ -3354,7 +3369,7 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect,
if( pSmartTagList->InWrongWord( nBegin, nLen ) && !pNode->IsSymbol(nBegin) )
{
- const USHORT nIndex = pSmartTagList->GetWrongPos( nBegin );
+ const sal_uInt16 nIndex = pSmartTagList->GetWrongPos( nBegin );
const SwWrongList* pSubList = pSmartTagList->SubList( nIndex );
if ( pSubList )
{
@@ -3374,7 +3389,7 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect,
xub_StrLen nLineStart = GetCrsr()->GetPoint()->nContent.GetIndex();
RightMargin();
xub_StrLen nLineEnd = GetCrsr()->GetPoint()->nContent.GetIndex();
- Pop(FALSE);
+ Pop(sal_False);
// make sure the selection build later from the
// data below does not include footnotes and other
@@ -3405,16 +3420,16 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect,
rContent = nWordStart;
SwRect aStartRect;
SwCrsrMoveState aState;
- aState.bRealWidth = TRUE;
+ aState.bRealWidth = sal_True;
SwCntntNode* pCntntNode = pCrsr->GetCntntNode();
- SwCntntFrm *pCntntFrame = pCntntNode->GetFrm( &rPt, pCrsr->GetPoint(), FALSE);
+ SwCntntFrm *pCntntFrame = pCntntNode->GetFrm( &rPt, pCrsr->GetPoint(), sal_False);
pCntntFrame->GetCharRect( aStartRect, *pCrsr->GetPoint(), &aState );
rContent = nWordEnd - 1;
SwRect aEndRect;
pCntntFrame->GetCharRect( aEndRect, *pCrsr->GetPoint(),&aState );
rSelectRect = aStartRect.Union( aEndRect );
- Pop(FALSE);
+ Pop(sal_False);
}
}
}
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index f14608eda0a5..610b3f988a3a 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -38,6 +38,7 @@
#include <svx/svdobj.hxx>
#include <crsrsh.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pagefrm.hxx>
#include <cntfrm.hxx>
#include <rootfrm.hxx>
@@ -80,9 +81,9 @@ using namespace ::com::sun::star;
// zum naechsten/vorhergehenden Punkt auf gleicher Ebene
-BOOL SwCrsrShell::GotoNextNum()
+sal_Bool SwCrsrShell::GotoNextNum()
{
- BOOL bRet = GetDoc()->GotoNextNum( *pCurCrsr->GetPoint() );
+ sal_Bool bRet = GetDoc()->GotoNextNum( *pCurCrsr->GetPoint() );
if( bRet )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
@@ -120,9 +121,9 @@ BOOL SwCrsrShell::GotoNextNum()
}
-BOOL SwCrsrShell::GotoPrevNum()
+sal_Bool SwCrsrShell::GotoPrevNum()
{
- BOOL bRet = GetDoc()->GotoPrevNum( *pCurCrsr->GetPoint() );
+ sal_Bool bRet = GetDoc()->GotoPrevNum( *pCurCrsr->GetPoint() );
if( bRet )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
@@ -161,7 +162,7 @@ BOOL SwCrsrShell::GotoPrevNum()
// springe aus dem Content zum Header
-BOOL SwCrsrShell::GotoHeaderTxt()
+sal_Bool SwCrsrShell::GotoHeaderTxt()
{
const SwFrm* pFrm = GetCurrFrm()->FindPageFrm();
while( pFrm && !pFrm->IsHeaderFrm() )
@@ -190,7 +191,7 @@ BOOL SwCrsrShell::GotoHeaderTxt()
// springe aus dem Content zum Footer
-BOOL SwCrsrShell::GotoFooterTxt()
+sal_Bool SwCrsrShell::GotoFooterTxt()
{
const SwPageFrm* pFrm = GetCurrFrm()->FindPageFrm();
if( pFrm )
@@ -226,9 +227,9 @@ BOOL SwCrsrShell::GotoFooterTxt()
return 0 != pFrm;
}
-BOOL SwCrsrShell::SetCrsrInHdFt( USHORT nDescNo, BOOL bInHeader )
+sal_Bool SwCrsrShell::SetCrsrInHdFt( sal_uInt16 nDescNo, sal_Bool bInHeader )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwDoc *pMyDoc = GetDoc();
SET_CURR_SHELL( this );
@@ -238,7 +239,7 @@ BOOL SwCrsrShell::SetCrsrInHdFt( USHORT nDescNo, BOOL bInHeader )
// dann den akt. nehmen
const SwPageFrm* pPage = GetCurrFrm()->FindPageFrm();
if( pPage )
- for( USHORT i = 0; i < pMyDoc->GetPageDescCnt(); ++i )
+ for( sal_uInt16 i = 0; i < pMyDoc->GetPageDescCnt(); ++i )
if( pPage->GetPageDesc() ==
&const_cast<const SwDoc *>(pMyDoc)->GetPageDesc( i ) )
{
@@ -277,7 +278,7 @@ BOOL SwCrsrShell::SetCrsrInHdFt( USHORT nDescNo, BOOL bInHeader )
const SwFrm* pFrm;
Point aPt( pCurCrsr->GetPtPos() );
- if( pCNd && 0 != ( pFrm = pCNd->GetFrm( &aPt, 0, FALSE ) ))
+ if( pCNd && 0 != ( pFrm = pCNd->GetFrm( &aPt, 0, sal_False ) ))
{
// dann kann der Cursor ja auch hinein gesetzt werden
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
@@ -301,13 +302,13 @@ BOOL SwCrsrShell::SetCrsrInHdFt( USHORT nDescNo, BOOL bInHeader )
// springe zum naechsten Verzeichnis
-BOOL SwCrsrShell::GotoNextTOXBase( const String* pName )
+sal_Bool SwCrsrShell::GotoNextTOXBase( const String* pName )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwSectionFmts& rFmts = GetDoc()->GetSections();
SwCntntNode* pFnd = 0;
- for( USHORT n = rFmts.Count(); n; )
+ for( sal_uInt16 n = rFmts.Count(); n; )
{
const SwSection* pSect = rFmts[ --n ]->GetSection();
const SwSectionNode* pSectNd;
@@ -348,13 +349,13 @@ BOOL SwCrsrShell::GotoNextTOXBase( const String* pName )
// springe zum vorherigen Verzeichnis
-BOOL SwCrsrShell::GotoPrevTOXBase( const String* pName )
+sal_Bool SwCrsrShell::GotoPrevTOXBase( const String* pName )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwSectionFmts& rFmts = GetDoc()->GetSections();
SwCntntNode* pFnd = 0;
- for( USHORT n = rFmts.Count(); n; )
+ for( sal_uInt16 n = rFmts.Count(); n; )
{
const SwSection* pSect = rFmts[ --n ]->GetSection();
const SwSectionNode* pSectNd;
@@ -395,12 +396,12 @@ BOOL SwCrsrShell::GotoPrevTOXBase( const String* pName )
// springe zum Verzeichnis vom TOXMark
-BOOL SwCrsrShell::GotoTOXMarkBase()
+sal_Bool SwCrsrShell::GotoTOXMarkBase()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwTOXMarks aMarks;
- USHORT nCnt = GetDoc()->GetCurTOXMark( *pCurCrsr->GetPoint(), aMarks );
+ sal_uInt16 nCnt = GetDoc()->GetCurTOXMark( *pCurCrsr->GetPoint(), aMarks );
if( nCnt )
{
// dann nehme den 1. und hole den Verzeichnis-Typ.
@@ -446,12 +447,12 @@ BOOL SwCrsrShell::GotoTOXMarkBase()
// springe zur naechsten (vorherigen) Tabellenformel
// optional auch nur zu kaputten Formeln springen
-BOOL SwCrsrShell::GotoNxtPrvTblFormula( BOOL bNext, BOOL bOnlyErrors )
+sal_Bool SwCrsrShell::GotoNxtPrvTblFormula( sal_Bool bNext, sal_Bool bOnlyErrors )
{
if( IsTableMode() )
- return FALSE;
+ return sal_False;
- BOOL bFnd = FALSE;
+ sal_Bool bFnd = sal_False;
SwPosition& rPos = *pCurCrsr->GetPoint();
Point aPt;
@@ -474,15 +475,15 @@ BOOL SwCrsrShell::GotoNxtPrvTblFormula( BOOL bNext, BOOL bOnlyErrors )
if( rPos.nNode < GetDoc()->GetNodes().GetEndOfExtras() )
// auch beim Einsammeln wird nur der erste Frame benutzt!
aCurGEF.SetBodyPos( *rPos.nNode.GetNode().GetCntntNode()->GetFrm(
- &aPt, &rPos, FALSE ) );
+ &aPt, &rPos, sal_False ) );
{
const SfxPoolItem* pItem;
const SwTableBox* pTBox;
- USHORT n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount( RES_BOXATR_FORMULA );
+ sal_uInt32 n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount2( RES_BOXATR_FORMULA );
for( n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem(
+ if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem2(
RES_BOXATR_FORMULA, n ) ) &&
0 != (pTBox = ((SwTblBoxFormula*)pItem)->GetTableBox() ) &&
pTBox->GetSttNd() &&
@@ -493,7 +494,7 @@ BOOL SwCrsrShell::GotoNxtPrvTblFormula( BOOL bNext, BOOL bOnlyErrors )
const SwCntntFrm* pCFrm;
SwNodeIndex aIdx( *pTBox->GetSttNd() );
const SwCntntNode* pCNd = GetDoc()->GetNodes().GoNext( &aIdx );
- if( pCNd && 0 != ( pCFrm = pCNd->GetFrm( &aPt, 0, FALSE ) ) &&
+ if( pCNd && 0 != ( pCFrm = pCNd->GetFrm( &aPt, 0, sal_False ) ) &&
(IsReadOnlyAvailable() || !pCFrm->IsProtected() ))
{
_SetGetExpFld aCmp( *pTBox );
@@ -503,7 +504,7 @@ BOOL SwCrsrShell::GotoNxtPrvTblFormula( BOOL bNext, BOOL bOnlyErrors )
: ( aCmp < aCurGEF && aFndGEF < aCmp ))
{
aFndGEF = aCmp;
- bFnd = TRUE;
+ bFnd = sal_True;
}
}
}
@@ -527,12 +528,12 @@ BOOL SwCrsrShell::GotoNxtPrvTblFormula( BOOL bNext, BOOL bOnlyErrors )
}
// springe zum naechsten (vorherigen) Verzeichniseintrag
-BOOL SwCrsrShell::GotoNxtPrvTOXMark( BOOL bNext )
+sal_Bool SwCrsrShell::GotoNxtPrvTOXMark( sal_Bool bNext )
{
if( IsTableMode() )
- return FALSE;
+ return sal_False;
- BOOL bFnd = FALSE;
+ sal_Bool bFnd = sal_False;
SwPosition& rPos = *pCurCrsr->GetPoint();
Point aPt;
@@ -544,21 +545,21 @@ BOOL SwCrsrShell::GotoNxtPrvTOXMark( BOOL bNext )
if( rPos.nNode.GetIndex() < GetDoc()->GetNodes().GetEndOfExtras().GetIndex() )
// auch beim Einsammeln wird nur der erste Frame benutzt!
aCurGEF.SetBodyPos( *rPos.nNode.GetNode().
- GetCntntNode()->GetFrm( &aPt, &rPos, FALSE ) );
+ GetCntntNode()->GetFrm( &aPt, &rPos, sal_False ) );
{
const SfxPoolItem* pItem;
const SwCntntFrm* pCFrm;
const SwTxtNode* pTxtNd;
const SwTxtTOXMark* pTxtTOX;
- USHORT n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount( RES_TXTATR_TOXMARK );
+ sal_uInt32 n, nMaxItems = GetDoc()->GetAttrPool().GetItemCount2( RES_TXTATR_TOXMARK );
for( n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem(
+ if( 0 != (pItem = GetDoc()->GetAttrPool().GetItem2(
RES_TXTATR_TOXMARK, n ) ) &&
0 != (pTxtTOX = ((SwTOXMark*)pItem)->GetTxtTOXMark() ) &&
( pTxtNd = &pTxtTOX->GetTxtNode())->GetNodes().IsDocNodes() &&
- 0 != ( pCFrm = pTxtNd->GetFrm( &aPt, 0, FALSE )) &&
+ 0 != ( pCFrm = pTxtNd->GetFrm( &aPt, 0, sal_False )) &&
( IsReadOnlyAvailable() || !pCFrm->IsProtected() ))
{
SwNodeIndex aNdIndex( *pTxtNd ); // UNIX benoetigt dieses Obj.
@@ -569,7 +570,7 @@ BOOL SwCrsrShell::GotoNxtPrvTOXMark( BOOL bNext )
: ( aCmp < aCurGEF && aFndGEF < aCmp ))
{
aFndGEF = aCmp;
- bFnd = TRUE;
+ bFnd = sal_True;
}
}
}
@@ -619,14 +620,14 @@ const SwTOXMark& SwCrsrShell::GotoTOXMark( const SwTOXMark& rStart,
// springe zum naechsten / vorherigen FeldTypen
void lcl_MakeFldLst( _SetGetExpFlds& rLst, const SwFieldType& rFldType,
- USHORT nSubType, BOOL bInReadOnly,
- BOOL bChkInpFlag = FALSE )
+ sal_uInt16 nSubType, sal_Bool bInReadOnly,
+ sal_Bool bChkInpFlag = sal_False )
{
// es muss immer der 1. Frame gesucht werden
Point aPt;
SwTxtFld* pTxtFld;
SwClientIter aIter( (SwFieldType&)rFldType );
- BOOL bSubType = nSubType != USHRT_MAX;
+ sal_Bool bSubType = nSubType != USHRT_MAX;
for( SwClient* pLast = aIter.First( TYPE( SwFmtFld )); pLast; pLast = aIter.Next() )
if( 0 != ( pTxtFld = ((SwFmtFld*)pLast)->GetTxtFld() ) &&
( !bChkInpFlag || ((SwSetExpField*)pTxtFld->GetFld().GetFld())
@@ -636,7 +637,7 @@ void lcl_MakeFldLst( _SetGetExpFlds& rLst, const SwFieldType& rFldType,
{
SwCntntFrm* pCFrm;
const SwTxtNode& rTxtNode = pTxtFld->GetTxtNode();
- if( 0 != ( pCFrm = rTxtNode.GetFrm( &aPt, 0, FALSE )) &&
+ if( 0 != ( pCFrm = rTxtNode.GetFrm( &aPt, 0, sal_False )) &&
( bInReadOnly || !pCFrm->IsProtected() ))
{
_SetGetExpFld* pNew = new _SetGetExpFld(
@@ -648,8 +649,8 @@ void lcl_MakeFldLst( _SetGetExpFlds& rLst, const SwFieldType& rFldType,
}
-BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext,
- USHORT nSubType, USHORT nResType )
+sal_Bool SwCrsrShell::MoveFldType( const SwFieldType* pFldType, sal_Bool bNext,
+ sal_uInt16 nSubType, sal_uInt16 nResType )
{
// sortierte Liste aller Felder
_SetGetExpFlds aSrtLst( 64 );
@@ -657,7 +658,7 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext,
if (pFldType)
{
if( RES_INPUTFLD != pFldType->Which() && !pFldType->GetDepends() )
- return FALSE;
+ return sal_False;
// Modify-Object gefunden, trage alle Felder ins Array ein
::lcl_MakeFldLst( aSrtLst, *pFldType, nSubType, IsReadOnlyAvailable() );
@@ -666,22 +667,22 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext,
{
// es gibt noch versteckte InputFelder in den SetExp. Feldern
const SwFldTypes& rFldTypes = *pDoc->GetFldTypes();
- const USHORT nSize = rFldTypes.Count();
+ const sal_uInt16 nSize = rFldTypes.Count();
// Alle Typen abklappern
- for( USHORT i=0; i < nSize; ++i )
+ for( sal_uInt16 i=0; i < nSize; ++i )
if( RES_SETEXPFLD == ( pFldType = rFldTypes[ i ] )->Which() )
::lcl_MakeFldLst( aSrtLst, *pFldType, nSubType,
- IsReadOnlyAvailable(), TRUE );
+ IsReadOnlyAvailable(), sal_True );
}
}
else
{
const SwFldTypes& rFldTypes = *pDoc->GetFldTypes();
- const USHORT nSize = rFldTypes.Count();
+ const sal_uInt16 nSize = rFldTypes.Count();
// Alle Typen abklappern
- for( USHORT i=0; i < nSize; ++i )
+ for( sal_uInt16 i=0; i < nSize; ++i )
if( nResType == ( pFldType = rFldTypes[ i ] )->Which() )
::lcl_MakeFldLst( aSrtLst, *pFldType, nSubType,
IsReadOnlyAvailable() );
@@ -689,9 +690,9 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext,
// keine Felder gefunden?
if( !aSrtLst.Count() )
- return FALSE;
+ return sal_False;
- USHORT nPos;
+ sal_uInt16 nPos;
SwCursor* pCrsr = getShellCrsr( true );
{
// JP 19.08.98: es muss immer ueber das Feld gesucht werden, damit
@@ -706,14 +707,13 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext,
SwTxtFld * pTxtFld = static_cast<SwTxtFld *>(
pTNd->GetTxtAttrForCharAt(rPos.nContent.GetIndex(),
RES_TXTATR_FIELD));
- BOOL bDelFld = 0 == pTxtFld;
+ sal_Bool bDelFld = 0 == pTxtFld;
if( bDelFld )
{
SwFmtFld* pFmtFld = new SwFmtFld( SwDateTimeField(
(SwDateTimeFieldType*)pDoc->GetSysFldType( RES_DATETIMEFLD ) ) );
- pTxtFld = new SwTxtFld( *pFmtFld, rPos.nContent.GetIndex(),
- pDoc->IsClipBoard() );
+ pTxtFld = new SwTxtFld( *pFmtFld, rPos.nContent.GetIndex() );
pTxtFld->ChgTxtNode( pTNd );
}
@@ -722,10 +722,10 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext,
{
// auch beim Einsammeln wird nur der erste Frame benutzt!
Point aPt;
- aSrch.SetBodyPos( *pTNd->GetFrm( &aPt, &rPos, FALSE ) );
+ aSrch.SetBodyPos( *pTNd->GetFrm( &aPt, &rPos, sal_False ) );
}
- BOOL bFound = aSrtLst.Seek_Entry( &aSrch, &nPos );
+ sal_Bool bFound = aSrtLst.Seek_Entry( &aSrch, &nPos );
if( bDelFld )
{
delete (SwFmtFld*)&pTxtFld->GetAttr();
@@ -737,13 +737,13 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext,
if( bNext )
{
if( ++nPos >= aSrtLst.Count() )
- return FALSE; // schon am Ende
+ return sal_False; // schon am Ende
}
else if( !nPos-- )
- return FALSE; // weiter nach vorne geht nicht
+ return sal_False; // weiter nach vorne geht nicht
}
else if( bNext ? nPos >= aSrtLst.Count() : !nPos--)
- return FALSE;
+ return sal_False;
}
const _SetGetExpFld& rFnd = **( aSrtLst.GetData() + nPos );
@@ -753,7 +753,7 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext,
SwCrsrSaveState aSaveState( *pCrsr );
rFnd.GetPosOfContent( *pCrsr->GetPoint() );
- BOOL bRet = !pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
+ sal_Bool bRet = !pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE );
if( bRet )
UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY);
@@ -761,9 +761,9 @@ BOOL SwCrsrShell::MoveFldType( const SwFieldType* pFldType, BOOL bNext,
}
-BOOL SwCrsrShell::GotoFld( const SwFmtFld& rFld )
+sal_Bool SwCrsrShell::GotoFld( const SwFmtFld& rFld )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rFld.GetTxtFld() )
{
SET_CURR_SHELL( this );
@@ -784,7 +784,7 @@ BOOL SwCrsrShell::GotoFld( const SwFmtFld& rFld )
}
-void SwCrsrShell::GotoOutline( USHORT nIdx )
+void SwCrsrShell::GotoOutline( sal_uInt16 nIdx )
{
SwCursor* pCrsr = getShellCrsr( true );
@@ -802,7 +802,7 @@ void SwCrsrShell::GotoOutline( USHORT nIdx )
}
-BOOL SwCrsrShell::GotoOutline( const String& rName )
+sal_Bool SwCrsrShell::GotoOutline( const String& rName )
{
SwCursor* pCrsr = getShellCrsr( true );
@@ -810,29 +810,29 @@ BOOL SwCrsrShell::GotoOutline( const String& rName )
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
SwCrsrSaveState aSaveState( *pCrsr );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pDoc->GotoOutline( *pCrsr->GetPoint(), rName ) && !pCrsr->IsSelOvr() )
{
UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY);
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
-BOOL SwCrsrShell::GotoNextOutline() // naechster Node mit Outline-Num.
+sal_Bool SwCrsrShell::GotoNextOutline() // naechster Node mit Outline-Num.
{
SwCursor* pCrsr = getShellCrsr( true );
const SwNodes& rNds = GetDoc()->GetNodes();
SwNode* pNd = pCrsr->GetNode();
- USHORT nPos;
+ sal_uInt16 nPos;
if( rNds.GetOutLineNds().Seek_Entry( pNd, &nPos ))
++nPos;
if( nPos == rNds.GetOutLineNds().Count() )
- return FALSE;
+ return sal_False;
pNd = rNds.GetOutLineNds()[ nPos ];
@@ -842,30 +842,30 @@ BOOL SwCrsrShell::GotoNextOutline() // naechster Node mit Outline-Num.
pCrsr->GetPoint()->nNode = *pNd;
pCrsr->GetPoint()->nContent.Assign( (SwTxtNode*)pNd, 0 );
- BOOL bRet = !pCrsr->IsSelOvr();
+ sal_Bool bRet = !pCrsr->IsSelOvr();
if( bRet )
UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY);
return bRet;
}
-BOOL SwCrsrShell::GotoPrevOutline() // vorheriger Node mit Outline-Num.
+sal_Bool SwCrsrShell::GotoPrevOutline() // vorheriger Node mit Outline-Num.
{
SwCursor* pCrsr = getShellCrsr( true );
const SwNodes& rNds = GetDoc()->GetNodes();
SwNode* pNd = pCrsr->GetNode();
- USHORT nPos;
+ sal_uInt16 nPos;
rNds.GetOutLineNds().Seek_Entry( pNd, &nPos );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( nPos )
{
--nPos; // davor
pNd = rNds.GetOutLineNds()[ nPos ];
if( pNd->GetIndex() > pCrsr->GetPoint()->nNode.GetIndex() )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
@@ -883,13 +883,13 @@ BOOL SwCrsrShell::GotoPrevOutline() // vorheriger Node mit Outline-Num.
// suche die "Outline-Position" vom vorherigen Outline-Node mit dem
// Level.
-USHORT SwCrsrShell::GetOutlinePos( BYTE nLevel )
+sal_uInt16 SwCrsrShell::GetOutlinePos( sal_uInt8 nLevel )
{
SwPaM* pCrsr = getShellCrsr( true );
const SwNodes& rNds = GetDoc()->GetNodes();
SwNode* pNd = pCrsr->GetNode();
- USHORT nPos;
+ sal_uInt16 nPos;
if( rNds.GetOutLineNds().Seek_Entry( pNd, &nPos ))
nPos++; // steht auf der Position, fuers while zum Naechsten
@@ -905,13 +905,13 @@ USHORT SwCrsrShell::GetOutlinePos( BYTE nLevel )
}
-BOOL SwCrsrShell::MakeOutlineSel( USHORT nSttPos, USHORT nEndPos,
- BOOL bWithChilds )
+sal_Bool SwCrsrShell::MakeOutlineSel( sal_uInt16 nSttPos, sal_uInt16 nEndPos,
+ sal_Bool bWithChilds )
{
const SwNodes& rNds = GetDoc()->GetNodes();
const SwOutlineNodes& rOutlNds = rNds.GetOutLineNds();
if( !rOutlNds.Count() ) // wie jetzt ???
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
@@ -919,7 +919,7 @@ BOOL SwCrsrShell::MakeOutlineSel( USHORT nSttPos, USHORT nEndPos,
if( nSttPos > nEndPos ) // sollte jemand das vertauscht haben?
{
OSL_ENSURE( !this, "Start- > Ende-Position im Array" );
- USHORT nTmp = nSttPos;
+ sal_uInt16 nTmp = nSttPos;
nSttPos = nEndPos;
nEndPos = nTmp;
}
@@ -957,7 +957,7 @@ BOOL SwCrsrShell::MakeOutlineSel( USHORT nSttPos, USHORT nEndPos,
pCurCrsr->Move( fnMoveBackward, fnGoNode ); // ans Ende vom Vorgaenger
// und schon ist alles selektiert
- BOOL bRet = !pCurCrsr->IsSelOvr();
+ sal_Bool bRet = !pCurCrsr->IsSelOvr();
if( bRet )
UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY);
return bRet;
@@ -965,14 +965,14 @@ BOOL SwCrsrShell::MakeOutlineSel( USHORT nSttPos, USHORT nEndPos,
// springe zu dieser Refmark
-BOOL SwCrsrShell::GotoRefMark( const String& rRefMark, USHORT nSubType,
- USHORT nSeqNo )
+sal_Bool SwCrsrShell::GotoRefMark( const String& rRefMark, sal_uInt16 nSubType,
+ sal_uInt16 nSeqNo )
{
SET_CURR_SHELL( this );
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
SwCrsrSaveState aSaveState( *pCurCrsr );
- USHORT nPos;
+ sal_uInt16 nPos;
SwTxtNode* pTxtNd = SwGetRefFieldType::FindAnchor( GetDoc(), rRefMark,
nSubType, nSeqNo, &nPos );
if( pTxtNd && pTxtNd->GetNodes().IsDocNodes() )
@@ -983,26 +983,26 @@ BOOL SwCrsrShell::GotoRefMark( const String& rRefMark, USHORT nSubType,
if( !pCurCrsr->IsSelOvr() )
{
UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY);
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
-BOOL SwCrsrShell::IsPageAtPos( const Point &rPt ) const
+sal_Bool SwCrsrShell::IsPageAtPos( const Point &rPt ) const
{
if( GetLayout() )
return 0 != GetLayout()->GetPageAtPos( rPt );
- return FALSE;
+ return sal_False;
}
-BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
+sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
SwContentAtPos& rCntntAtPos,
- BOOL bSetCrsr,
+ sal_Bool bSetCrsr,
SwRect* pFldRect )
{
SET_CURR_SHELL( this );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !IsTableMode() )
{
@@ -1013,16 +1013,16 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
SwCntntFrm *pFrm(0);
SwTxtAttr* pTxtAttr;
SwCrsrMoveState aTmpState;
- aTmpState.bFieldInfo = TRUE;
+ aTmpState.bFieldInfo = sal_True;
aTmpState.bExactOnly = !( SwContentAtPos::SW_OUTLINE & rCntntAtPos.eCntntAtPos );
- aTmpState.bCntntCheck = (SwContentAtPos::SW_CONTENT_CHECK & rCntntAtPos.eCntntAtPos) ? TRUE : FALSE;
+ aTmpState.bCntntCheck = (SwContentAtPos::SW_CONTENT_CHECK & rCntntAtPos.eCntntAtPos) ? sal_True : sal_False;
aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
SwSpecialPos aSpecialPos;
aTmpState.pSpecialPos = ( SwContentAtPos::SW_SMARTTAG & rCntntAtPos.eCntntAtPos ) ?
&aSpecialPos : 0;
- const BOOL bCrsrFoundExact = GetLayout()->GetCrsrOfst( &aPos, aPt, &aTmpState );
+ const sal_Bool bCrsrFoundExact = GetLayout()->GetCrsrOfst( &aPos, aPt, &aTmpState );
pTxtNd = aPos.nNode.GetNode().GetTxtNode();
const SwNodes& rNds = GetDoc()->GetNodes();
@@ -1034,14 +1034,14 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
{
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_OUTLINE;
rCntntAtPos.sStr = pONd->GetExpandTxt( 0, STRING_LEN, true );
- bRet = TRUE;
+ bRet = sal_True;
}
}
// --> FME 2005-05-13 #i43742# New function: SW_CONTENT_CHECK
else if ( SwContentAtPos::SW_CONTENT_CHECK & rCntntAtPos.eCntntAtPos &&
bCrsrFoundExact )
{
- bRet = TRUE;
+ bRet = sal_True;
}
// <--
// #i23726#
@@ -1069,17 +1069,17 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
if ( pSmartTagList && pSmartTagList->InWrongWord( nCurrent, nLen ) && !pTxtNd->IsSymbol(nBegin) )
{
- const USHORT nIndex = pSmartTagList->GetWrongPos( nBegin );
+ const sal_uInt16 nIndex = pSmartTagList->GetWrongPos( nBegin );
const SwWrongList* pSubList = pSmartTagList->SubList( nIndex );
if ( pSubList )
{
nCurrent = aTmpState.pSpecialPos->nCharOfst;
if ( pSubList->InWrongWord( nCurrent, nLen ) )
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = TRUE;
+ bRet = sal_True;
if( bRet && bSetCrsr )
{
@@ -1089,7 +1089,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
*pCurCrsr->GetPoint() = aPos;
if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE) )
- bRet = FALSE;
+ bRet = sal_False;
else
UpdateCrsr();
}
@@ -1153,7 +1153,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
rCntntAtPos.aFnd.pFld = pFld;
rCntntAtPos.pFndTxtAttr = pTxtAttr;
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_FIELD;
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -1164,7 +1164,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
if( bCrsrFoundExact && pTxtNd && pFldBookmark) {
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_FORMCTRL;
rCntntAtPos.aFnd.pFldmark = pFldBookmark;
- bRet=TRUE;
+ bRet=sal_True;
}
}
@@ -1173,12 +1173,12 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
if( aTmpState.bFtnNoInfo )
{
// stehe ueber dem Zeichen der Fussnote (??)
- bRet = TRUE;
+ bRet = sal_True;
if( bSetCrsr )
{
*pCurCrsr->GetPoint() = aPos;
if( !GotoFtnAnchor() )
- bRet = FALSE;
+ bRet = sal_False;
}
if( bRet )
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_FTN;
@@ -1186,7 +1186,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
else if ( 0 != ( pTxtAttr = pTxtNd->GetTxtAttrForCharAt(
aPos.nContent.GetIndex(), RES_TXTATR_FTN )) )
{
- bRet = TRUE;
+ bRet = sal_True;
if( bSetCrsr )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
@@ -1194,19 +1194,19 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
pCurCrsr->GetPoint()->nNode = *((SwTxtFtn*)pTxtAttr)->GetStartNode();
SwCntntNode* pCNd = GetDoc()->GetNodes().GoNextSection(
&pCurCrsr->GetPoint()->nNode,
- TRUE, !IsReadOnlyAvailable() );
+ sal_True, !IsReadOnlyAvailable() );
if( pCNd )
{
pCurCrsr->GetPoint()->nContent.Assign( pCNd, 0 );
if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE ))
- bRet = FALSE;
+ bRet = sal_False;
else
UpdateCrsr();
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
if( bRet )
@@ -1251,7 +1251,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
if( pTxtAttr )
{
- bRet = TRUE;
+ bRet = sal_True;
if( bSetCrsr )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
@@ -1260,7 +1260,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
*pCurCrsr->GetPoint() = aPos;
if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE ) )
- bRet = FALSE;
+ bRet = sal_False;
else
UpdateCrsr();
}
@@ -1297,7 +1297,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
// nur INetAttrs mit URLs "erkennen"
if( pTxtAttr && pTxtAttr->GetINetFmt().GetValue().Len() )
{
- bRet = TRUE;
+ bRet = sal_True;
if( bSetCrsr )
{
SwCrsrSaveState aSaveState( *pCurCrsr );
@@ -1306,7 +1306,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
*pCurCrsr->GetPoint() = aPos;
if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE) )
- bRet = FALSE;
+ bRet = sal_False;
else
UpdateCrsr();
}
@@ -1334,7 +1334,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
rCntntAtPos.aFnd.pRedl = pRedl;
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_REDLINE;
rCntntAtPos.pFndTxtAttr = 0;
- bRet = TRUE;
+ bRet = sal_True;
if( pFldRect && 0 != ( pFrm = pTxtNd->GetFrm( &aPt ) ) )
pFrm->GetCharRect( *pFldRect, aPos, &aTmpState );
@@ -1358,12 +1358,12 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
pSttNd->GetIndex() )) &&
#if OSL_DEBUG_LEVEL > 1
( SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
- RES_BOXATR_FORMULA, FALSE, &pItem ) ||
+ RES_BOXATR_FORMULA, sal_False, &pItem ) ||
SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
- RES_BOXATR_VALUE, FALSE, &pItem ))
+ RES_BOXATR_VALUE, sal_False, &pItem ))
#else
SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
- RES_BOXATR_FORMULA, FALSE, &pItem )
+ RES_BOXATR_FORMULA, sal_False, &pItem )
#endif
)
{
@@ -1397,7 +1397,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
#endif
((SwTblBoxFormula*)pItem)->PtrToBoxNm( &pTblNd->GetTable() );
- bRet = TRUE;
+ bRet = sal_True;
if( bSetCrsr )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
@@ -1405,7 +1405,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
*pCurCrsr->GetPoint() = aPos;
if( pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
nsSwCursorSelOverFlags::SELOVER_TOGGLE) )
- bRet = FALSE;
+ bRet = sal_False;
else
UpdateCrsr();
}
@@ -1432,7 +1432,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
POOLATTR_END - 1 );
if( pTxtNd->GetpSwpHints() )
{
- for( USHORT i = 0; i < pTxtNd->GetSwpHints().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pTxtNd->GetSwpHints().Count(); ++i )
{
const SwTxtAttr* pHt = pTxtNd->GetSwpHints()[i];
xub_StrLen nAttrStart = *pHt->GetStart();
@@ -1481,7 +1481,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
String sAttrs;
SfxItemIter aIter( aSet );
const SfxPoolItem* pItem = aIter.FirstItem();
- while( TRUE )
+ while( sal_True )
{
if( !IsInvalidItem( pItem ))
{
@@ -1507,7 +1507,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
+= sAttrs;
}
}
- bRet = TRUE;
+ bRet = sal_True;
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_CURR_ATTRS;
}
#endif
@@ -1547,7 +1547,7 @@ const SwPostItField* SwCrsrShell::GetPostItFieldAtCursor() const
}
// befindet sich der Node in einem geschuetzten Bereich?
-BOOL SwContentAtPos::IsInProtectSect() const
+sal_Bool SwContentAtPos::IsInProtectSect() const
{
const SwTxtNode* pNd = 0;
if( pFndTxtAttr )
@@ -1574,7 +1574,7 @@ BOOL SwContentAtPos::IsInProtectSect() const
const SwCntntFrm* pFrm;
return pNd && ( pNd->IsInProtectSect() ||
- ( 0 != ( pFrm = pNd->GetFrm(0,0,FALSE)) &&
+ ( 0 != ( pFrm = pNd->GetFrm(0,0,sal_False)) &&
pFrm->IsProtected() ));
}
bool SwContentAtPos::IsInRTLText()const
@@ -1615,11 +1615,11 @@ bool SwContentAtPos::IsInRTLText()const
return bRet;
}
-BOOL SwCrsrShell::SelectTxtAttr( USHORT nWhich, BOOL bExpand,
+sal_Bool SwCrsrShell::SelectTxtAttr( sal_uInt16 nWhich, sal_Bool bExpand,
const SwTxtAttr* pTxtAttr )
{
SET_CURR_SHELL( this );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !IsTableMode() )
{
@@ -1648,7 +1648,7 @@ BOOL SwCrsrShell::SelectTxtAttr( USHORT nWhich, BOOL bExpand,
if( !pCurCrsr->IsSelOvr() )
{
UpdateCrsr();
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -1656,9 +1656,9 @@ BOOL SwCrsrShell::SelectTxtAttr( USHORT nWhich, BOOL bExpand,
}
-BOOL SwCrsrShell::GotoINetAttr( const SwTxtINetFmt& rAttr )
+sal_Bool SwCrsrShell::GotoINetAttr( const SwTxtINetFmt& rAttr )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rAttr.GetpTxtNode() )
{
SwCursor* pCrsr = getShellCrsr( true );
@@ -1683,14 +1683,15 @@ const SwFmtINetFmt* SwCrsrShell::FindINetAttr( const String& rName ) const
return pDoc->FindINetAttr( rName );
}
-BOOL SwCrsrShell::GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode,
+sal_Bool SwCrsrShell::GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode,
SwRect& rRect, sal_Int16& rOrient )
{
SET_CURR_SHELL( this );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
- if( !IsTableMode() && !HasSelection() && GetDoc()->DoesUndo() )
+ if (!IsTableMode() && !HasSelection()
+ && GetDoc()->GetIDocumentUndoRedo().DoesUndo())
{
Point aPt( rPt );
SwPosition aPos( *pCurCrsr->GetPoint() );
@@ -1704,18 +1705,19 @@ BOOL SwCrsrShell::GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode,
// Start-Position im geschuetzten Bereich?
rRect = aFPos.aCrsr;
rOrient = aFPos.eOrient;
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
}
-BOOL SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
+sal_Bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
{
SET_CURR_SHELL( this );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
- if( !IsTableMode() && !HasSelection() && GetDoc()->DoesUndo() )
+ if (!IsTableMode() && !HasSelection()
+ && GetDoc()->GetIDocumentUndoRedo().DoesUndo())
{
Point aPt( rPt );
SwPosition aPos( *pCurCrsr->GetPoint() );
@@ -1739,7 +1741,7 @@ BOOL SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
pCNd && pCNd->Len() )
nUndoId = UNDO_EMPTY;
- GetDoc()->StartUndo( nUndoId, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( nUndoId, NULL );
SwTxtFmtColl* pNextFmt = 0;
SwTxtNode* pTNd = pCNd->GetTxtNode();
@@ -1760,7 +1762,7 @@ BOOL SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
aPos.nNode = *pSectNd->EndOfSectionNode();
}
- for( USHORT n = 0; n < aFPos.nParaCnt + aFPos.nColumnCnt; ++n )
+ for( sal_uInt16 n = 0; n < aFPos.nParaCnt + aFPos.nColumnCnt; ++n )
{
GetDoc()->AppendTxtNode( aPos );
if( !n && pNextFmt )
@@ -1842,10 +1844,10 @@ BOOL SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
break;
}
- GetDoc()->EndUndo( nUndoId, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( nUndoId, NULL );
EndAction();
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -1887,7 +1889,7 @@ const SwRedline* SwCrsrShell::SelPrevRedline()
return pFnd;
}
-const SwRedline* SwCrsrShell::_GotoRedline( USHORT nArrPos, BOOL bSelect )
+const SwRedline* SwCrsrShell::_GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect )
{
const SwRedline* pFnd = 0;
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
@@ -1902,7 +1904,7 @@ const SwRedline* SwCrsrShell::_GotoRedline( USHORT nArrPos, BOOL bSelect )
SwNodeIndex* pIdx = &pCurCrsr->GetPoint()->nNode;
if( !pIdx->GetNode().IsCntntNode() &&
0 != ( pCNd = GetDoc()->GetNodes().GoNextSection( pIdx,
- TRUE, IsReadOnlyAvailable() )) )
+ sal_True, IsReadOnlyAvailable() )) )
{
if( *pIdx <= pFnd->End()->nNode )
pCurCrsr->GetPoint()->nContent.Assign( pCNd, 0 );
@@ -1925,7 +1927,7 @@ const SwRedline* SwCrsrShell::_GotoRedline( USHORT nArrPos, BOOL bSelect )
pIdx = &pCurCrsr->GetPoint()->nNode;
if( !pIdx->GetNode().IsCntntNode() &&
0 != ( pCNd = GetDoc()->GetNodes().GoPrevSection( pIdx,
- TRUE, IsReadOnlyAvailable() )) )
+ sal_True, IsReadOnlyAvailable() )) )
{
if( *pIdx >= pCurCrsr->GetMark()->nNode )
pCurCrsr->GetPoint()->nContent.Assign( pCNd, pCNd->Len() );
@@ -1955,7 +1957,7 @@ const SwRedline* SwCrsrShell::_GotoRedline( USHORT nArrPos, BOOL bSelect )
return pFnd;
}
-const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect )
+const SwRedline* SwCrsrShell::GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect )
{
const SwRedline* pFnd = 0;
if( !IsTableMode() )
@@ -1964,15 +1966,15 @@ const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect )
const SwRedlineTbl& rTbl = GetDoc()->GetRedlineTbl();
const SwRedline* pTmp = rTbl[ nArrPos ];
- USHORT nSeqNo = pTmp->GetSeqNo();
+ sal_uInt16 nSeqNo = pTmp->GetSeqNo();
if( nSeqNo && bSelect )
{
- BOOL bCheck = FALSE;
+ sal_Bool bCheck = sal_False;
int nLoopCnt = 2;
- USHORT nArrSavPos = nArrPos;
+ sal_uInt16 nArrSavPos = nArrPos;
do {
- pTmp = _GotoRedline( nArrPos, TRUE );
+ pTmp = _GotoRedline( nArrPos, sal_True );
if( !pFnd )
pFnd = pTmp;
@@ -1991,7 +1993,7 @@ const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect )
const SwPosition *pNStt = pNextPam->Start(),
*pNEnd = pNextPam->End();
- BOOL bDel = TRUE;
+ sal_Bool bDel = sal_True;
switch( ::ComparePosition( *pCStt, *pCEnd,
*pNStt, *pNEnd ))
{
@@ -2026,7 +2028,7 @@ const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect )
break;
default:
- bDel = FALSE;
+ bDel = sal_False;
}
if( bDel )
@@ -2040,7 +2042,7 @@ const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect )
}
}
- USHORT nFndPos = 2 == nLoopCnt
+ sal_uInt16 nFndPos = 2 == nLoopCnt
? rTbl.FindNextOfSeqNo( nArrPos )
: rTbl.FindPrevOfSeqNo( nArrPos );
if( USHRT_MAX != nFndPos ||
@@ -2051,7 +2053,7 @@ const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect )
{
// neuen Cursor erzeugen
CreateCrsr();
- bCheck = TRUE;
+ bCheck = sal_True;
}
nArrPos = nFndPos;
}
@@ -2067,12 +2069,12 @@ const SwRedline* SwCrsrShell::GotoRedline( USHORT nArrPos, BOOL bSelect )
}
-BOOL SwCrsrShell::SelectNxtPrvHyperlink( BOOL bNext )
+sal_Bool SwCrsrShell::SelectNxtPrvHyperlink( sal_Bool bNext )
{
SwNodes& rNds = GetDoc()->GetNodes();
const SwNode* pBodyEndNd = &rNds.GetEndOfContent();
const SwNode* pBodySttNd = pBodyEndNd->StartOfSectionNode();
- ULONG nBodySttNdIdx = pBodySttNd->GetIndex();
+ sal_uLong nBodySttNdIdx = pBodySttNd->GetIndex();
Point aPt;
_SetGetExpFld aCmpPos( SwPosition( bNext ? *pBodyEndNd : *pBodySttNd ) );
@@ -2089,7 +2091,7 @@ BOOL SwCrsrShell::SelectNxtPrvHyperlink( BOOL bNext )
{
const SwTxtNode* pTxtNd;
const SwCharFmts* pFmts = GetDoc()->GetCharFmts();
- for( USHORT n = pFmts->Count(); 1 < n; )
+ for( sal_uInt16 n = pFmts->Count(); 1 < n; )
{
SwClientIter aIter( *(*pFmts)[ --n ] );
@@ -2125,13 +2127,13 @@ BOOL SwCrsrShell::SelectNxtPrvHyperlink( BOOL bNext )
// then check all the Flys with a URL or imapge map
{
const SwSpzFrmFmts* pFmts = GetDoc()->GetSpzFrmFmts();
- for( USHORT n = 0, nEnd = pFmts->Count(); n < nEnd; ++n )
+ for( sal_uInt16 n = 0, nEnd = pFmts->Count(); n < nEnd; ++n )
{
SwFlyFrmFmt* pFmt = (SwFlyFrmFmt*)(*pFmts)[ n ];
const SwFmtURL& rURLItem = pFmt->GetURL();
if( rURLItem.GetMap() || rURLItem.GetURL().Len() )
{
- SwFlyFrm* pFly = pFmt->GetFrm( &aPt, FALSE );
+ SwFlyFrm* pFly = pFmt->GetFrm( &aPt, sal_False );
SwPosition aTmpPos( *pBodySttNd );
if( pFly &&
GetBodyTxtNode( *GetDoc(), aTmpPos, *pFly->GetLower() ) )
@@ -2148,7 +2150,7 @@ BOOL SwCrsrShell::SelectNxtPrvHyperlink( BOOL bNext )
}
// found any URL ?
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTxtINetFmt* pFndAttr = aCmpPos.GetINetFmt();
const SwFlyFrmFmt* pFndFmt = aCmpPos.GetFlyFmt();
if( pFndAttr || pFndFmt )
@@ -2170,7 +2172,7 @@ BOOL SwCrsrShell::SelectNxtPrvHyperlink( BOOL bNext )
{
UpdateCrsr( SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|
SwCrsrShell::READONLY );
- bRet = TRUE;
+ bRet = sal_True;
}
}
// find a draw object ?
@@ -2179,16 +2181,16 @@ BOOL SwCrsrShell::SelectNxtPrvHyperlink( BOOL bNext )
const SdrObject* pSObj = pFndFmt->FindSdrObject();
((SwFEShell*)this)->SelectObj( pSObj->GetCurrentBoundRect().Center() );
MakeSelVisible();
- bRet = TRUE;
+ bRet = sal_True;
}
else // then is it a fly
{
- SwFlyFrm* pFly = pFndFmt->GetFrm(&aPt, FALSE );
+ SwFlyFrm* pFly = pFndFmt->GetFrm(&aPt, sal_False );
if( pFly )
{
- ((SwFEShell*)this)->SelectFlyFrm( *pFly, TRUE );
+ ((SwFEShell*)this)->SelectFlyFrm( *pFly, sal_True );
MakeSelVisible();
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
diff --git a/sw/source/core/crsr/crstrvl1.cxx b/sw/source/core/crsr/crstrvl1.cxx
index 9f9a8d474e9a..0c28f43c0965 100644
--- a/sw/source/core/crsr/crstrvl1.cxx
+++ b/sw/source/core/crsr/crstrvl1.cxx
@@ -34,72 +34,72 @@
#include <viscrs.hxx>
#include <callnk.hxx>
-BOOL SwCrsrShell::IsStartWord( sal_Int16 nWordType ) const
+sal_Bool SwCrsrShell::IsStartWord( sal_Int16 nWordType ) const
{
return pCurCrsr->IsStartWord( nWordType );
}
-BOOL SwCrsrShell::IsEndWord( sal_Int16 nWordType ) const
+sal_Bool SwCrsrShell::IsEndWord( sal_Int16 nWordType ) const
{
return pCurCrsr->IsEndWord( nWordType );
}
-BOOL SwCrsrShell::IsInWord( sal_Int16 nWordType ) const
+sal_Bool SwCrsrShell::IsInWord( sal_Int16 nWordType ) const
{
return pCurCrsr->IsInWord( nWordType );
}
-BOOL SwCrsrShell::IsStartSentence() const
+sal_Bool SwCrsrShell::IsStartSentence() const
{
return pCurCrsr->IsStartEndSentence( false );
}
-BOOL SwCrsrShell::IsEndSentence() const
+sal_Bool SwCrsrShell::IsEndSentence() const
{
return pCurCrsr->IsStartEndSentence( true );
}
-BOOL SwCrsrShell::GoStartWord()
+sal_Bool SwCrsrShell::GoStartWord()
{
return CallCrsrFN( &SwCursor::GoStartWord );
}
-BOOL SwCrsrShell::GoEndWord()
+sal_Bool SwCrsrShell::GoEndWord()
{
return CallCrsrFN( &SwCursor::GoEndWord );
}
-BOOL SwCrsrShell::GoNextWord()
+sal_Bool SwCrsrShell::GoNextWord()
{
return CallCrsrFN( &SwCursor::GoNextWord );
}
-BOOL SwCrsrShell::GoPrevWord()
+sal_Bool SwCrsrShell::GoPrevWord()
{
return CallCrsrFN( &SwCursor::GoPrevWord );
}
-BOOL SwCrsrShell::GoNextSentence()
+sal_Bool SwCrsrShell::GoNextSentence()
{
return CallCrsrFN( &SwCursor::GoNextSentence );
}
-BOOL SwCrsrShell::GoEndSentence()
+sal_Bool SwCrsrShell::GoEndSentence()
{
return CallCrsrFN( &SwCursor::GoEndSentence );
}
-BOOL SwCrsrShell::GoPrevSentence()
+sal_Bool SwCrsrShell::GoPrevSentence()
{
return CallCrsrFN( &SwCursor::GoPrevSentence );
}
-BOOL SwCrsrShell::GoStartSentence()
+sal_Bool SwCrsrShell::GoStartSentence()
{
return CallCrsrFN( &SwCursor::GoStartSentence );
}
-BOOL SwCrsrShell::SelectWord( const Point* pPt )
+sal_Bool SwCrsrShell::SelectWord( const Point* pPt )
{
return pCurCrsr->SelectWord( pPt );
}
-BOOL SwCrsrShell::ExpandToSentenceBorders()
+sal_Bool SwCrsrShell::ExpandToSentenceBorders()
{
return pCurCrsr->ExpandToSentenceBorders();
}
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 4e169f68188b..d0b1a455f73a 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -46,13 +46,14 @@
#include <fchrfmt.hxx>
#include <charfmt.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <swcrsr.hxx>
#include <editsh.hxx>
#include <ndtxt.hxx>
#include <pamtyp.hxx>
#include <swundo.hxx>
#include <crsskip.hxx>
-#include <undobj.hxx>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::lang;
@@ -83,7 +84,7 @@ int CmpAttr( const SfxPoolItem& rItem1, const SfxPoolItem& rItem2 )
}
-const SwTxtAttr* GetFrwrdTxtHint( const SwpHints& rHtsArr, USHORT& rPos,
+const SwTxtAttr* GetFrwrdTxtHint( const SwpHints& rHtsArr, sal_uInt16& rPos,
xub_StrLen nCntntPos )
{
while( rPos < rHtsArr.Count() )
@@ -97,7 +98,7 @@ const SwTxtAttr* GetFrwrdTxtHint( const SwpHints& rHtsArr, USHORT& rPos,
}
-const SwTxtAttr* GetBkwrdTxtHint( const SwpHints& rHtsArr, USHORT& rPos,
+const SwTxtAttr* GetBkwrdTxtHint( const SwpHints& rHtsArr, sal_uInt16& rPos,
xub_StrLen nCntntPos )
{
while( rPos > 0 )
@@ -113,14 +114,14 @@ const SwTxtAttr* GetBkwrdTxtHint( const SwpHints& rHtsArr, USHORT& rPos,
void lcl_SetAttrPam( SwPaM & rPam, xub_StrLen nStart, const xub_StrLen* pEnde,
- const BOOL bSaveMark )
+ const sal_Bool bSaveMark )
{
xub_StrLen nCntntPos;
if( bSaveMark )
nCntntPos = rPam.GetMark()->nContent.GetIndex();
else
nCntntPos = rPam.GetPoint()->nContent.GetIndex();
- BOOL bTstEnde = rPam.GetPoint()->nNode == rPam.GetMark()->nNode;
+ sal_Bool bTstEnde = rPam.GetPoint()->nNode == rPam.GetMark()->nNode;
SwCntntNode* pCNd = rPam.GetCntntNode();
rPam.GetPoint()->nContent.Assign( pCNd, nStart );
@@ -143,15 +144,15 @@ void lcl_SetAttrPam( SwPaM & rPam, xub_StrLen nStart, const xub_StrLen* pEnde,
// umspannt, unter Beachtung des Suchbereiches
-BOOL lcl_Search( const SwTxtNode& rTxtNd, SwPaM& rPam,
+sal_Bool lcl_Search( const SwTxtNode& rTxtNd, SwPaM& rPam,
const SfxPoolItem& rCmpItem,
- SwMoveFn fnMove, BOOL bValue )
+ SwMoveFn fnMove, sal_Bool bValue )
{
if ( !rTxtNd.HasHints() )
- return FALSE;
+ return sal_False;
const SwTxtAttr *pTxtHt = 0;
- BOOL bForward = fnMove == fnMoveForward;
- USHORT nPos = bForward ? 0 : rTxtNd.GetSwpHints().Count();
+ sal_Bool bForward = fnMove == fnMoveForward;
+ sal_uInt16 nPos = bForward ? 0 : rTxtNd.GetSwpHints().Count();
xub_StrLen nCntntPos = rPam.GetPoint()->nContent.GetIndex();
while( 0 != ( pTxtHt=(*fnMove->fnGetHint)(rTxtNd.GetSwpHints(),nPos,nCntntPos)))
@@ -159,9 +160,9 @@ BOOL lcl_Search( const SwTxtNode& rTxtNd, SwPaM& rPam,
( !bValue || CmpAttr( pTxtHt->GetAttr(), rCmpItem )))
{
lcl_SetAttrPam( rPam, *pTxtHt->GetStart(), pTxtHt->GetEnd(), bForward );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -169,7 +170,7 @@ BOOL lcl_Search( const SwTxtNode& rTxtNd, SwPaM& rPam,
struct _SwSrchChrAttr
{
- USHORT nWhich;
+ sal_uInt16 nWhich;
xub_StrLen nStt, nEnd;
_SwSrchChrAttr( const SfxPoolItem& rItem,
@@ -182,11 +183,11 @@ class SwAttrCheckArr
{
_SwSrchChrAttr *pFndArr, *pStackArr;
xub_StrLen nNdStt, nNdEnd;
- USHORT nArrStart, nArrLen;
- USHORT nFound, nStackCnt;
+ sal_uInt16 nArrStart, nArrLen;
+ sal_uInt16 nFound, nStackCnt;
SfxItemSet aCmpSet;
- BOOL bNoColls;
- BOOL bForward;
+ sal_Bool bNoColls;
+ sal_Bool bForward;
public:
SwAttrCheckArr( const SfxItemSet& rSet, int bForward, int bNoCollections );
@@ -195,7 +196,7 @@ public:
void SetNewSet( const SwTxtNode& rTxtNd, const SwPaM& rPam );
// wieviele Attribute ueberhaupt ??
- USHORT Count() const { return aCmpSet.Count(); }
+ sal_uInt16 Count() const { return aCmpSet.Count(); }
int Found() const { return nFound == aCmpSet.Count(); }
int CheckStack();
@@ -215,7 +216,7 @@ SwAttrCheckArr::SwAttrCheckArr( const SfxItemSet& rSet, int bFwd,
int bNoCollections )
: aCmpSet( *rSet.GetPool(), RES_CHRATR_BEGIN, RES_TXTATR_END-1 )
{
- aCmpSet.Put( rSet, FALSE );
+ aCmpSet.Put( rSet, sal_False );
bNoColls = 0 != bNoCollections;
bForward = 0 != bFwd;
@@ -270,9 +271,9 @@ void SwAttrCheckArr::SetNewSet( const SwTxtNode& rTxtNd, const SwPaM& rPam )
SfxItemIter aIter( aCmpSet );
const SfxPoolItem* pItem = aIter.GetCurItem();
const SfxPoolItem* pFndItem;
- USHORT nWhich;
+ sal_uInt16 nWhich;
- while( TRUE )
+ while( sal_True )
{
// nur testen, ob vorhanden ist ?
if( IsInvalidItem( pItem ) )
@@ -323,7 +324,7 @@ int SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
// --------------------------------------------------------------
// Hier wird jetzt ausdruecklich auch in Zeichenvorlagen gesucht
// --------------------------------------------------------------
- USHORT nWhch = rAttr.Which();
+ sal_uInt16 nWhch = rAttr.Which();
SfxWhichIter* pIter = NULL;
const SfxPoolItem* pTmpItem = NULL;
const SfxItemSet* pSet = NULL;
@@ -338,7 +339,7 @@ int SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
pIter = new SfxWhichIter( *pSet );
nWhch = pIter->FirstWhich();
while( nWhch &&
- SFX_ITEM_SET != pSet->GetItemState( nWhch, TRUE, &pTmpItem ) )
+ SFX_ITEM_SET != pSet->GetItemState( nWhch, sal_True, &pTmpItem ) )
nWhch = pIter->NextWhich();
if( !nWhch )
pTmpItem = NULL;
@@ -348,10 +349,10 @@ int SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
pTmpItem = &rAttr.GetAttr();
while( pTmpItem )
{
- SfxItemState eState = aCmpSet.GetItemState( nWhch, FALSE, &pItem );
+ SfxItemState eState = aCmpSet.GetItemState( nWhch, sal_False, &pItem );
if( SFX_ITEM_DONTCARE == eState || SFX_ITEM_SET == eState )
{
- USHORT n;
+ sal_uInt16 n;
_SwSrchChrAttr* pCmp;
// loesche erstmal alle, die bis zu der Start Position schon wieder
@@ -401,7 +402,7 @@ int SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
}
}
- BOOL bContinue = FALSE;
+ sal_Bool bContinue = sal_False;
if( SFX_ITEM_DONTCARE == eState )
{
@@ -418,7 +419,7 @@ int SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
else if( pCmp->nEnd < aTmp.nEnd ) // erweitern ?
pCmp->nEnd = aTmp.nEnd;
- bContinue = TRUE;
+ bContinue = sal_True;
}
}
// wird Attribut gueltig ?
@@ -426,7 +427,7 @@ int SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
{
pFndArr[ nWhch - nArrStart ] = aTmp;
++nFound;
- bContinue = TRUE;
+ bContinue = sal_True;
}
// tja, dann muss es auf den Stack
@@ -455,7 +456,7 @@ int SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
{
nWhch = pIter->NextWhich();
while( nWhch &&
- SFX_ITEM_SET != pSet->GetItemState( nWhch, TRUE, &pTmpItem ) )
+ SFX_ITEM_SET != pSet->GetItemState( nWhch, sal_True, &pTmpItem ) )
nWhch = pIter->NextWhich();
if( !nWhch )
break;
@@ -478,7 +479,7 @@ int SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
// --------------------------------------------------------------
// Hier wird jetzt ausdruecklich auch in Zeichenvorlagen gesucht
// --------------------------------------------------------------
- USHORT nWhch = rAttr.Which();
+ sal_uInt16 nWhch = rAttr.Which();
SfxWhichIter* pIter = NULL;
const SfxPoolItem* pTmpItem = NULL;
const SfxItemSet* pSet = NULL;
@@ -493,7 +494,7 @@ int SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
pIter = new SfxWhichIter( *pSet );
nWhch = pIter->FirstWhich();
while( nWhch &&
- SFX_ITEM_SET != pSet->GetItemState( nWhch, TRUE, &pTmpItem ) )
+ SFX_ITEM_SET != pSet->GetItemState( nWhch, sal_True, &pTmpItem ) )
nWhch = pIter->NextWhich();
if( !nWhch )
pTmpItem = NULL;
@@ -503,10 +504,10 @@ int SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
pTmpItem = &rAttr.GetAttr();
while( pTmpItem )
{
- SfxItemState eState = aCmpSet.GetItemState( nWhch, FALSE, &pItem );
+ SfxItemState eState = aCmpSet.GetItemState( nWhch, sal_False, &pItem );
if( SFX_ITEM_DONTCARE == eState || SFX_ITEM_SET == eState )
{
- USHORT n;
+ sal_uInt16 n;
_SwSrchChrAttr* pCmp;
// loesche erstmal alle, die bis zu der Start Position schon wieder
@@ -555,7 +556,7 @@ int SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
}
}
- BOOL bContinue = FALSE;
+ sal_Bool bContinue = sal_False;
if( SFX_ITEM_DONTCARE == eState )
{
// wird Attribut gueltig ?
@@ -571,7 +572,7 @@ int SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
else if( pCmp->nStt > aTmp.nStt ) // erweitern ?
pCmp->nStt = aTmp.nStt;
- bContinue = TRUE;
+ bContinue = sal_True;
}
}
// wird Attribut gueltig ?
@@ -579,7 +580,7 @@ int SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
{
pFndArr[ nWhch - nArrStart ] = aTmp;
++nFound;
- bContinue = TRUE;
+ bContinue = sal_True;
}
// tja, dann muss es auf den Stack
@@ -608,7 +609,7 @@ int SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
{
nWhch = pIter->NextWhich();
while( nWhch &&
- SFX_ITEM_SET != pSet->GetItemState( nWhch, TRUE, &pTmpItem ) )
+ SFX_ITEM_SET != pSet->GetItemState( nWhch, sal_True, &pTmpItem ) )
nWhch = pIter->NextWhich();
if( !nWhch )
break;
@@ -624,7 +625,7 @@ xub_StrLen SwAttrCheckArr::Start() const
{
xub_StrLen nStart = nNdStt;
_SwSrchChrAttr* pArrPtr = pFndArr;
- for( USHORT n = 0; n < nArrLen; ++n, ++pArrPtr )
+ for( sal_uInt16 n = 0; n < nArrLen; ++n, ++pArrPtr )
if( pArrPtr->nWhich && pArrPtr->nStt > nStart )
nStart = pArrPtr->nStt;
@@ -636,7 +637,7 @@ xub_StrLen SwAttrCheckArr::End() const
{
_SwSrchChrAttr* pArrPtr = pFndArr;
xub_StrLen nEnd = nNdEnd;
- for( USHORT n = 0; n < nArrLen; ++n, ++pArrPtr )
+ for( sal_uInt16 n = 0; n < nArrLen; ++n, ++pArrPtr )
if( pArrPtr->nWhich && pArrPtr->nEnd < nEnd )
nEnd = pArrPtr->nEnd;
@@ -647,9 +648,9 @@ xub_StrLen SwAttrCheckArr::End() const
int SwAttrCheckArr::CheckStack()
{
if( !nStackCnt )
- return FALSE;
+ return sal_False;
- USHORT n;
+ sal_uInt16 n;
xub_StrLen nSttPos = Start(), nEndPos = End();
_SwSrchChrAttr* pArrPtr;
for( pArrPtr = pStackArr, n = 0; n < nArrLen; ++n, ++pArrPtr )
@@ -688,16 +689,16 @@ int lcl_SearchForward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
if( !rTxtNd.HasHints() )
{
if( !rCmpArr.Found() )
- return FALSE;
+ return sal_False;
nEndPos = rCmpArr.GetNdEnd();
- lcl_SetAttrPam( rPam, rCmpArr.GetNdStt(), &nEndPos, TRUE );
- return TRUE;
+ lcl_SetAttrPam( rPam, rCmpArr.GetNdStt(), &nEndPos, sal_True );
+ return sal_True;
}
// dann gehe mal durch das nach "Start" sortierte Array
const SwpHints& rHtArr = rTxtNd.GetSwpHints();
const SwTxtAttr* pAttr;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
// sollte jetzt schon alles vorhanden sein, dann teste, mit welchem
// das wieder beendet wird.
@@ -710,8 +711,8 @@ int lcl_SearchForward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
{
// dann haben wir unser Ende:
lcl_SetAttrPam( rPam, rCmpArr.GetNdStt(),
- pAttr->GetStart(), TRUE );
- return TRUE;
+ pAttr->GetStart(), sal_True );
+ return sal_True;
}
// ansonsten muessen wir weiter suchen
break;
@@ -721,8 +722,8 @@ int lcl_SearchForward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
{
// dann haben wir unseren Bereich
nEndPos = rCmpArr.GetNdEnd();
- lcl_SetAttrPam( rPam, rCmpArr.GetNdStt(), &nEndPos, TRUE );
- return TRUE;
+ lcl_SetAttrPam( rPam, rCmpArr.GetNdStt(), &nEndPos, sal_True );
+ return sal_True;
}
}
@@ -741,16 +742,16 @@ int lcl_SearchForward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
// dann haben wir den Bereich zusammen
if( (nSttPos = rCmpArr.Start()) > (nEndPos = rCmpArr.End()) )
- return FALSE;
- lcl_SetAttrPam( rPam, nSttPos, &nEndPos, TRUE );
- return TRUE;
+ return sal_False;
+ lcl_SetAttrPam( rPam, nSttPos, &nEndPos, sal_True );
+ return sal_True;
}
if( !rCmpArr.CheckStack() ||
(nSttPos = rCmpArr.Start()) > (nEndPos = rCmpArr.End()) )
- return FALSE;
- lcl_SetAttrPam( rPam, nSttPos, &nEndPos, TRUE );
- return TRUE;
+ return sal_False;
+ lcl_SetAttrPam( rPam, nSttPos, &nEndPos, sal_True );
+ return sal_True;
}
@@ -762,16 +763,16 @@ int lcl_SearchBackward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
if( !rTxtNd.HasHints() )
{
if( !rCmpArr.Found() )
- return FALSE;
+ return sal_False;
nEndPos = rCmpArr.GetNdEnd();
- lcl_SetAttrPam( rPam, rCmpArr.GetNdStt(), &nEndPos, FALSE );
- return TRUE;
+ lcl_SetAttrPam( rPam, rCmpArr.GetNdStt(), &nEndPos, sal_False );
+ return sal_True;
}
// dann gehe mal durch das nach "Start" sortierte Array
const SwpHints& rHtArr = rTxtNd.GetSwpHints();
const SwTxtAttr* pAttr;
- USHORT nPos = rHtArr.Count();
+ sal_uInt16 nPos = rHtArr.Count();
// sollte jetzt schon alles vorhanden sein, dann teste, mit welchem
// das wieder beendet wird.
@@ -785,8 +786,8 @@ int lcl_SearchBackward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
{
// dann haben wir unser Ende:
nEndPos = rCmpArr.GetNdEnd();
- lcl_SetAttrPam( rPam, nSttPos, &nEndPos, FALSE );
- return TRUE;
+ lcl_SetAttrPam( rPam, nSttPos, &nEndPos, sal_False );
+ return sal_True;
}
// ansonsten muessen wir weiter suchen
@@ -797,8 +798,8 @@ int lcl_SearchBackward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
{
// dann haben wir unseren Bereich
nEndPos = rCmpArr.GetNdEnd();
- lcl_SetAttrPam( rPam, rCmpArr.GetNdStt(), &nEndPos, FALSE );
- return TRUE;
+ lcl_SetAttrPam( rPam, rCmpArr.GetNdStt(), &nEndPos, sal_False );
+ return sal_True;
}
}
@@ -821,32 +822,32 @@ int lcl_SearchBackward( const SwTxtNode& rTxtNd, SwAttrCheckArr& rCmpArr,
// dann haben wir den Bereich zusammen
if( (nSttPos = rCmpArr.Start()) > (nEndPos = rCmpArr.End()) )
- return FALSE;
- lcl_SetAttrPam( rPam, nSttPos, &nEndPos, FALSE );
- return TRUE;
+ return sal_False;
+ lcl_SetAttrPam( rPam, nSttPos, &nEndPos, sal_False );
+ return sal_True;
}
if( !rCmpArr.CheckStack() ||
(nSttPos = rCmpArr.Start()) > (nEndPos = rCmpArr.End()) )
- return FALSE;
- lcl_SetAttrPam( rPam, nSttPos, &nEndPos, FALSE );
- return TRUE;
+ return sal_False;
+ lcl_SetAttrPam( rPam, nSttPos, &nEndPos, sal_False );
+ return sal_True;
}
-int lcl_Search( const SwCntntNode& rCNd, const SfxItemSet& rCmpSet, BOOL bNoColls )
+int lcl_Search( const SwCntntNode& rCNd, const SfxItemSet& rCmpSet, sal_Bool bNoColls )
{
// nur die harte Attributierung suchen ?
if( bNoColls && !rCNd.HasSwAttrSet() )
- return FALSE;
+ return sal_False;
const SfxItemSet& rNdSet = rCNd.GetSwAttrSet();
SfxItemIter aIter( rCmpSet );
const SfxPoolItem* pItem = aIter.GetCurItem();
const SfxPoolItem* pNdItem;
- USHORT nWhich;
+ sal_uInt16 nWhich;
- while( TRUE )
+ while( sal_True )
{
// nur testen, ob vorhanden ist ?
if( IsInvalidItem( pItem ))
@@ -854,36 +855,36 @@ int lcl_Search( const SwCntntNode& rCNd, const SfxItemSet& rCmpSet, BOOL bNoColl
nWhich = rCmpSet.GetWhichByPos( aIter.GetCurPos() );
if( SFX_ITEM_SET != rNdSet.GetItemState( nWhich, !bNoColls, &pNdItem )
|| CmpAttr( *pNdItem, rNdSet.GetPool()->GetDefaultItem( nWhich ) ))
- return FALSE;
+ return sal_False;
}
else
{
nWhich = pItem->Which();
if( !CmpAttr( rNdSet.Get( nWhich, !bNoColls ), *pItem ))
- return FALSE;
+ return sal_False;
}
if( aIter.IsAtEnd() )
break;
pItem = aIter.NextItem();
}
- return TRUE; // wurde gefunden
+ return sal_True; // wurde gefunden
}
-BOOL SwPaM::Find( const SfxPoolItem& rAttr, BOOL bValue, SwMoveFn fnMove,
- const SwPaM *pRegion, BOOL bInReadOnly )
+sal_Bool SwPaM::Find( const SfxPoolItem& rAttr, sal_Bool bValue, SwMoveFn fnMove,
+ const SwPaM *pRegion, sal_Bool bInReadOnly )
{
// stelle fest welches Attribut gesucht wird:
- USHORT nWhich = rAttr.Which();
+ sal_uInt16 nWhich = rAttr.Which();
int bCharAttr = isCHRATR(nWhich) || isTXTATR(nWhich);
SwPaM* pPam = MakeRegion( fnMove, pRegion );
- BOOL bFound = FALSE;
- BOOL bFirst = TRUE;
- BOOL bSrchForward = fnMove == fnMoveForward;
+ sal_Bool bFound = sal_False;
+ sal_Bool bFirst = sal_True;
+ sal_Bool bSrchForward = fnMove == fnMoveForward;
SwCntntNode * pNode;
const SfxPoolItem* pItem;
SwpFmts aFmtArr;
@@ -893,10 +894,10 @@ BOOL SwPaM::Find( const SfxPoolItem& rAttr, BOOL bValue, SwMoveFn fnMove,
? pPam->GetPoint()->nContent.GetIndex() == pPam->GetCntntNode()->Len()
: !pPam->GetPoint()->nContent.GetIndex() )
{
- if( !(*fnMove->fnNds)( &pPam->GetPoint()->nNode, FALSE ))
+ if( !(*fnMove->fnNds)( &pPam->GetPoint()->nNode, sal_False ))
{
delete pPam;
- return FALSE;
+ return sal_False;
}
SwCntntNode *pNd = pPam->GetCntntNode();
xub_StrLen nTmpPos = bSrchForward ? 0 : pNd->Len();
@@ -917,7 +918,7 @@ BOOL SwPaM::Find( const SfxPoolItem& rAttr, BOOL bValue, SwMoveFn fnMove,
SetMark();
*GetPoint() = *pPam->GetPoint();
*GetMark() = *pPam->GetMark();
- bFound = TRUE;
+ bFound = sal_True;
break;
}
else if (isTXTATR(nWhich))
@@ -935,7 +936,7 @@ BOOL SwPaM::Find( const SfxPoolItem& rAttr, BOOL bValue, SwMoveFn fnMove,
}
if( SFX_ITEM_SET == pNode->GetSwAttrSet().GetItemState( nWhich,
- TRUE, &pItem ) && ( !bValue || *pItem == rAttr ) )
+ sal_True, &pItem ) && ( !bValue || *pItem == rAttr ) )
{
// FORWARD: Point an das Ende, GetMark zum Anfanf vom Node
// BACKWARD: Point zum Anfang, GetMark an das Ende vom Node
@@ -943,7 +944,7 @@ BOOL SwPaM::Find( const SfxPoolItem& rAttr, BOOL bValue, SwMoveFn fnMove,
*GetPoint() = *pPam->GetPoint();
SetMark();
pNode->MakeEndIndex( &GetPoint()->nContent );
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -959,14 +960,14 @@ BOOL SwPaM::Find( const SfxPoolItem& rAttr, BOOL bValue, SwMoveFn fnMove,
typedef int (*FnSearchAttr)( const SwTxtNode&, SwAttrCheckArr&, SwPaM& );
-BOOL SwPaM::Find( const SfxItemSet& rSet, BOOL bNoColls, SwMoveFn fnMove,
- const SwPaM *pRegion, BOOL bInReadOnly, BOOL bMoveFirst )
+sal_Bool SwPaM::Find( const SfxItemSet& rSet, sal_Bool bNoColls, SwMoveFn fnMove,
+ const SwPaM *pRegion, sal_Bool bInReadOnly, sal_Bool bMoveFirst )
{
SwPaM* pPam = MakeRegion( fnMove, pRegion );
- BOOL bFound = FALSE;
- BOOL bFirst = TRUE;
- BOOL bSrchForward = fnMove == fnMoveForward;
+ sal_Bool bFound = sal_False;
+ sal_Bool bFirst = sal_True;
+ sal_Bool bSrchForward = fnMove == fnMoveForward;
SwCntntNode * pNode;
SwpFmts aFmtArr;
@@ -974,7 +975,7 @@ BOOL SwPaM::Find( const SfxItemSet& rSet, BOOL bNoColls, SwMoveFn fnMove,
SwAttrCheckArr aCmpArr( rSet, bSrchForward, bNoColls );
SfxItemSet aOtherSet( GetDoc()->GetAttrPool(),
RES_PARATR_BEGIN, RES_GRFATR_END-1 );
- aOtherSet.Put( rSet, FALSE ); // alle Invalid-Items erhalten!
+ aOtherSet.Put( rSet, sal_False ); // alle Invalid-Items erhalten!
FnSearchAttr fnSearch = bSrchForward
? (&::lcl_SearchForward)
@@ -987,10 +988,10 @@ BOOL SwPaM::Find( const SfxItemSet& rSet, BOOL bNoColls, SwMoveFn fnMove,
? pPam->GetPoint()->nContent.GetIndex() == pPam->GetCntntNode()->Len()
: !pPam->GetPoint()->nContent.GetIndex() ) )
{
- if( !(*fnMove->fnNds)( &pPam->GetPoint()->nNode, FALSE ))
+ if( !(*fnMove->fnNds)( &pPam->GetPoint()->nNode, sal_False ))
{
delete pPam;
- return FALSE;
+ return sal_False;
}
SwCntntNode *pNd = pPam->GetCntntNode();
xub_StrLen nTmpPos = bSrchForward ? 0 : pNd->Len();
@@ -1013,7 +1014,7 @@ BOOL SwPaM::Find( const SfxItemSet& rSet, BOOL bNoColls, SwMoveFn fnMove,
SetMark();
*GetPoint() = *pPam->GetPoint();
*GetMark() = *pPam->GetMark();
- bFound = TRUE;
+ bFound = sal_True;
break;
}
continue; // TextAttribute
@@ -1040,7 +1041,7 @@ BOOL SwPaM::Find( const SfxItemSet& rSet, BOOL bNoColls, SwMoveFn fnMove,
*GetPoint() = *pPam->GetPoint();
SetMark();
pNode->MakeEndIndex( &GetPoint()->nContent );
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -1058,13 +1059,13 @@ BOOL SwPaM::Find( const SfxItemSet& rSet, BOOL bNoColls, SwMoveFn fnMove,
// Parameter fuer das Suchen vom Attributen
struct SwFindParaAttr : public SwFindParas
{
- BOOL bValue;
+ sal_Bool bValue;
const SfxItemSet *pSet, *pReplSet;
const SearchOptions *pSearchOpt;
SwCursor& rCursor;
utl::TextSearch* pSTxt;
- SwFindParaAttr( const SfxItemSet& rSet, BOOL bNoCollection,
+ SwFindParaAttr( const SfxItemSet& rSet, sal_Bool bNoCollection,
const SearchOptions* pOpt, const SfxItemSet* pRSet,
SwCursor& rCrsr )
: bValue( bNoCollection ), pSet( &rSet ), pReplSet( pRSet ),
@@ -1072,22 +1073,22 @@ struct SwFindParaAttr : public SwFindParas
virtual ~SwFindParaAttr() { delete pSTxt; }
- virtual int Find( SwPaM* , SwMoveFn , const SwPaM*, BOOL bInReadOnly );
+ virtual int Find( SwPaM* , SwMoveFn , const SwPaM*, sal_Bool bInReadOnly );
virtual int IsReplaceMode() const;
};
int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
- BOOL bInReadOnly )
+ sal_Bool bInReadOnly )
{
// String ersetzen ?? (nur wenn Text angegeben oder nicht attributiert
// gesucht wird)
- BOOL bReplaceTxt = pSearchOpt && ( pSearchOpt->replaceString.getLength() ||
+ sal_Bool bReplaceTxt = pSearchOpt && ( pSearchOpt->replaceString.getLength() ||
!pSet->Count() );
- BOOL bReplaceAttr = pReplSet && pReplSet->Count();
- BOOL bMoveFirst = !bReplaceAttr;
+ sal_Bool bReplaceAttr = pReplSet && pReplSet->Count();
+ sal_Bool bMoveFirst = !bReplaceAttr;
if( bInReadOnly && (bReplaceAttr || bReplaceTxt ))
- bInReadOnly = FALSE;
+ bInReadOnly = sal_False;
// wir suchen nach Attributen, soll zusaetzlich Text gesucht werden ?
{
@@ -1095,7 +1096,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
SwPaM* pTextRegion = &aRegion;
SwPaM aSrchPam( *pCrsr->GetPoint() );
- while( TRUE )
+ while( sal_True )
{
if( pSet->Count() ) // gibts ueberhaupt Attributierung?
{
@@ -1104,7 +1105,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
//JP 17.11.95: was ist mit Attributen in leeren Absaetzen !!
// || *pCrsr->GetMark() == *pCrsr->GetPoint() ) // kein Bereich ??
return FIND_NOT_FOUND;
- bMoveFirst = TRUE;
+ bMoveFirst = sal_True;
if( !pSearchOpt )
break; // ok, nur Attribute, also gefunden
@@ -1129,7 +1130,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
}
// todo/mba: searching for attributes in Outliner text?!
- BOOL bSearchInNotes = FALSE;
+ sal_Bool bSearchInNotes = sal_False;
// Bug 24665: suche im richtigen Bereich weiter (pTextRegion!)
if( aSrchPam.Find( *pSearchOpt, bSearchInNotes, *pSTxt, fnMove, pTextRegion, bInReadOnly ) &&
@@ -1200,11 +1201,11 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
SfxItemIter aIter( *pSet );
const SfxPoolItem* pItem = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
// alle die nicht gesetzt sind mit Pool-Defaults aufuellen
if( !IsInvalidItem( pItem ) && SFX_ITEM_SET !=
- pReplSet->GetItemState( pItem->Which(), FALSE ))
+ pReplSet->GetItemState( pItem->Which(), sal_False ))
aSet.Put( pPool->GetDefaultItem( pItem->Which() ));
if( aIter.IsAtEnd() )
@@ -1232,8 +1233,8 @@ int SwFindParaAttr::IsReplaceMode() const
// Suchen nach Attributen
-ULONG SwCursor::Find( const SfxItemSet& rSet, BOOL bNoCollections,
- SwDocPositions nStart, SwDocPositions nEnde, BOOL& bCancel,
+sal_uLong SwCursor::Find( const SfxItemSet& rSet, sal_Bool bNoCollections,
+ SwDocPositions nStart, SwDocPositions nEnde, sal_Bool& bCancel,
FindRanges eFndRngs,
const SearchOptions* pSearchOpt, const SfxItemSet* pReplSet )
{
@@ -1242,23 +1243,27 @@ ULONG SwCursor::Find( const SfxItemSet& rSet, BOOL bNoCollections,
Link aLnk( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
- BOOL bReplace = ( pSearchOpt && ( pSearchOpt->replaceString.getLength() ||
+ sal_Bool bReplace = ( pSearchOpt && ( pSearchOpt->replaceString.getLength() ||
!rSet.Count() ) ) ||
(pReplSet && pReplSet->Count());
- BOOL bSttUndo = pDoc->DoesUndo() && bReplace;
- if( bSttUndo )
- pDoc->StartUndo( UNDO_REPLACE, NULL );
+ bool const bStartUndo = pDoc->GetIDocumentUndoRedo().DoesUndo() && bReplace;
+ if (bStartUndo)
+ {
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_REPLACE, NULL );
+ }
SwFindParaAttr aSwFindParaAttr( rSet, bNoCollections, pSearchOpt,
pReplSet, *this );
- ULONG nRet = FindAll(aSwFindParaAttr, nStart, nEnde, eFndRngs, bCancel );
+ sal_uLong nRet = FindAll(aSwFindParaAttr, nStart, nEnde, eFndRngs, bCancel );
pDoc->SetOle2Link( aLnk );
if( nRet && bReplace )
pDoc->SetModified();
- if( bSttUndo )
- pDoc->EndUndo( UNDO_REPLACE, NULL );
+ if (bStartUndo)
+ {
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_REPLACE, NULL );
+ }
return nRet;
}
diff --git a/sw/source/core/crsr/findcoll.cxx b/sw/source/core/crsr/findcoll.cxx
index f3b5cba3e2b3..b3f3f39e8a97 100644
--- a/sw/source/core/crsr/findcoll.cxx
+++ b/sw/source/core/crsr/findcoll.cxx
@@ -29,14 +29,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <tools/resid.hxx>
#include <swcrsr.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pamtyp.hxx>
#include <swundo.hxx>
-#include <undobj.hxx>
+#include <SwRewriter.hxx>
#include <comcore.hrc>
-#include <tools/resid.hxx>
//------------------ Methoden der CrsrShell ---------------------------
@@ -49,17 +50,17 @@ struct SwFindParaFmtColl : public SwFindParas
const SwTxtFmtColl* pRpColl, SwCursor& rCrsr )
: pFmtColl( &rFmtColl ), pReplColl( pRpColl ), rCursor( rCrsr )
{}
- virtual int Find( SwPaM* , SwMoveFn , const SwPaM*, BOOL bInReadOnly );
+ virtual int Find( SwPaM* , SwMoveFn , const SwPaM*, sal_Bool bInReadOnly );
virtual int IsReplaceMode() const;
};
int SwFindParaFmtColl::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
- BOOL bInReadOnly )
+ sal_Bool bInReadOnly )
{
int nRet = FIND_FOUND;
if( bInReadOnly && pReplColl )
- bInReadOnly = FALSE;
+ bInReadOnly = sal_False;
if( !pCrsr->Find( *pFmtColl, fnMove, pRegion, bInReadOnly ) )
nRet = FIND_NOT_FOUND;
@@ -81,8 +82,8 @@ int SwFindParaFmtColl::IsReplaceMode() const
// Suchen nach Format-Collections
-ULONG SwCursor::Find( const SwTxtFmtColl& rFmtColl,
- SwDocPositions nStart, SwDocPositions nEnde, BOOL& bCancel,
+sal_uLong SwCursor::Find( const SwTxtFmtColl& rFmtColl,
+ SwDocPositions nStart, SwDocPositions nEnde, sal_Bool& bCancel,
FindRanges eFndRngs, const SwTxtFmtColl* pReplFmtColl )
{
// OLE-Benachrichtigung abschalten !!
@@ -90,27 +91,31 @@ ULONG SwCursor::Find( const SwTxtFmtColl& rFmtColl,
Link aLnk( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
- BOOL bSttUndo = pDoc->DoesUndo() && pReplFmtColl;
- if( bSttUndo )
+ bool const bStartUndo =
+ pDoc->GetIDocumentUndoRedo().DoesUndo() && pReplFmtColl;
+ if (bStartUndo)
{
SwRewriter aRewriter;
aRewriter.AddRule(UNDO_ARG1, rFmtColl.GetName());
aRewriter.AddRule(UNDO_ARG2, SW_RES(STR_YIELDS));
aRewriter.AddRule(UNDO_ARG3, pReplFmtColl->GetName());
- pDoc->StartUndo( UNDO_UI_REPLACE_STYLE, &aRewriter );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_UI_REPLACE_STYLE,
+ &aRewriter );
}
SwFindParaFmtColl aSwFindParaFmtColl( rFmtColl, pReplFmtColl, *this );
- ULONG nRet = FindAll( aSwFindParaFmtColl, nStart, nEnde, eFndRngs, bCancel );
+ sal_uLong nRet = FindAll( aSwFindParaFmtColl, nStart, nEnde, eFndRngs, bCancel );
pDoc->SetOle2Link( aLnk );
if( nRet && pReplFmtColl )
pDoc->SetModified();
- if( bSttUndo )
- pDoc->EndUndo( UNDO_UI_REPLACE_STYLE, NULL );
+ if (bStartUndo)
+ {
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_END, 0);
+ }
return nRet;
}
diff --git a/sw/source/core/crsr/findfmt.cxx b/sw/source/core/crsr/findfmt.cxx
index e9a4fe7485b5..7a548c393f33 100644
--- a/sw/source/core/crsr/findfmt.cxx
+++ b/sw/source/core/crsr/findfmt.cxx
@@ -34,11 +34,11 @@
#include <pamtyp.hxx>
-BOOL SwPaM::Find( const SwFmt& rFmt, SwMoveFn fnMove,
- const SwPaM *pRegion, BOOL bInReadOnly )
+sal_Bool SwPaM::Find( const SwFmt& rFmt, SwMoveFn fnMove,
+ const SwPaM *pRegion, sal_Bool bInReadOnly )
{
- BOOL bFound = FALSE;
- BOOL bSrchForward = fnMove == fnMoveForward;
+ sal_Bool bFound = sal_False;
+ sal_Bool bSrchForward = fnMove == fnMoveForward;
SwPaM* pPam = MakeRegion( fnMove, pRegion );
// Wenn am Anfang/Ende, aus dem Node moven
@@ -46,17 +46,17 @@ BOOL SwPaM::Find( const SwFmt& rFmt, SwMoveFn fnMove,
? pPam->GetPoint()->nContent.GetIndex() == pPam->GetCntntNode()->Len()
: !pPam->GetPoint()->nContent.GetIndex() )
{
- if( !(*fnMove->fnNds)( &pPam->GetPoint()->nNode, FALSE ))
+ if( !(*fnMove->fnNds)( &pPam->GetPoint()->nNode, sal_False ))
{
delete pPam;
- return FALSE;
+ return sal_False;
}
SwCntntNode *pNd = pPam->GetPoint()->nNode.GetNode().GetCntntNode();
xub_StrLen nTmpPos = bSrchForward ? 0 : pNd->Len();
pPam->GetPoint()->nContent.Assign( pNd, nTmpPos );
}
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
SwCntntNode* pNode;
while( !bFound &&
0 != ( pNode = ::GetNode( *pPam, bFirst, fnMove, bInReadOnly )))
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 2a97ba556dd0..ec939a7f9786 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -28,15 +28,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <com/sun/star/util/SearchOptions.hpp>
#include <com/sun/star/util/SearchFlags.hpp>
-
-
#define _SVSTDARR_USHORTS
#define _SVSTDARR_ULONGS
#include <svl/svstdarr.hxx>
+
#include <vcl/svapp.hxx>
+#include <vcl/window.hxx>
+
#include <txatritr.hxx>
#include <fldbas.hxx>
#include <fmtfld.hxx>
@@ -44,15 +46,16 @@
#include <txtfld.hxx>
#include <swcrsr.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pamtyp.hxx>
#include <ndtxt.hxx>
#include <swundo.hxx>
+#include <UndoInsert.hxx>
#include <breakit.hxx>
#include <docsh.hxx>
#include <PostItMgr.hxx>
#include <viewsh.hxx>
-#include <vcl/window.hxx>
using namespace ::com::sun::star;
using namespace util;
@@ -69,7 +72,7 @@ String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart,
const SwpHints *pHts = rNd.GetpSwpHints();
- USHORT n = 0;
+ sal_uInt16 n = 0;
xub_StrLen nSoftHyphen = nStart;
xub_StrLen nHintStart = STRING_LEN;
bool bNewHint = true;
@@ -142,10 +145,9 @@ String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart,
// wir sie einfach.
// Fuer das Ende merken wir uns die Ersetzungen und entferenen
// hinterher alle am Stringende (koenten ja 'normale' 0x7f drinstehen
- BOOL bEmpty = RES_TXTATR_FIELD != pHt->Which() ||
+ sal_Bool bEmpty = RES_TXTATR_FIELD != pHt->Which() ||
!(static_cast<SwTxtFld const*>(pHt)
- ->GetFld().GetFld()->ExpandField(
- rNd.GetDoc()->IsClipBoard()).Len());
+ ->GetFld().GetFld()->ExpandField(true).Len());
if ( bEmpty && nStart == nAkt )
{
rArr.Insert( nAkt, rArr.Count() );
@@ -178,7 +180,7 @@ String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart,
}
while ( true );
- for( USHORT i = aReplaced.Count(); i; )
+ for( sal_uInt16 i = aReplaced.Count(); i; )
{
const xub_StrLen nTmp = aReplaced[ --i ];
if( nTmp == rRet.Len() - 1 )
@@ -224,15 +226,15 @@ xub_StrLen GetPostIt(xub_StrLen aCount,const SwpHints *pHts)
return aIndex;
}
-BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::TextSearch& rSTxt,
+sal_uInt8 SwPaM::Find( const SearchOptions& rSearchOpt, sal_Bool bSearchInNotes , utl::TextSearch& rSTxt,
SwMoveFn fnMove, const SwPaM * pRegion,
- BOOL bInReadOnly )
+ sal_Bool bInReadOnly )
{
if( !rSearchOpt.searchString.getLength() )
- return FALSE;
+ return sal_False;
SwPaM* pPam = MakeRegion( fnMove, pRegion );
- BOOL bSrchForward = fnMove == fnMoveForward;
+ sal_Bool bSrchForward = fnMove == fnMoveForward;
SwNodeIndex& rNdIdx = pPam->GetPoint()->nNode;
SwIndex& rCntntIdx = pPam->GetPoint()->nContent;
@@ -243,10 +245,10 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
rCntntIdx.GetIndex() )
: !rCntntIdx.GetIndex() && pPam->GetCntntNode()->Len() )
{
- if( !(*fnMove->fnNds)( &rNdIdx, FALSE ))
+ if( !(*fnMove->fnNds)( &rNdIdx, sal_False ))
{
delete pPam;
- return FALSE;
+ return sal_False;
}
SwCntntNode *pNd = rNdIdx.GetNode().GetCntntNode();
xub_StrLen nTmpPos = bSrchForward ? 0 : pNd->Len();
@@ -254,14 +256,14 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
}
/*
- * Ist bFound == TRUE, dann wurde der String gefunden und in
+ * Ist bFound == sal_True, dann wurde der String gefunden und in
* nStart und nEnde steht der gefundenen String
*/
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
/*
* StartPostion im Text oder Anfangsposition
*/
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
SwCntntNode * pNode;
//testarea
//String sCleanStr;
@@ -270,11 +272,11 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
xub_StrLen nStart, nEnde, nTxtLen;
- BOOL bRegSearch = SearchAlgorithms_REGEXP == rSearchOpt.algorithmType;
- BOOL bChkEmptyPara = bRegSearch && 2 == rSearchOpt.searchString.getLength() &&
+ sal_Bool bRegSearch = SearchAlgorithms_REGEXP == rSearchOpt.algorithmType;
+ sal_Bool bChkEmptyPara = bRegSearch && 2 == rSearchOpt.searchString.getLength() &&
( !rSearchOpt.searchString.compareToAscii( "^$" ) ||
!rSearchOpt.searchString.compareToAscii( "$^" ) );
- BOOL bChkParaEnd = bRegSearch && 1 == rSearchOpt.searchString.getLength() &&
+ sal_Bool bChkParaEnd = bRegSearch && 1 == rSearchOpt.searchString.getLength() &&
!rSearchOpt.searchString.compareToAscii( "$" );
// LanguageType eLastLang = 0;
@@ -420,7 +422,7 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
SwMoveFn fnMove,
- BOOL bSrchForward, BOOL bRegSearch, BOOL bChkEmptyPara, BOOL bChkParaEnd,
+ sal_Bool bSrchForward, sal_Bool bRegSearch, sal_Bool bChkEmptyPara, sal_Bool bChkParaEnd,
xub_StrLen &nStart, xub_StrLen &nEnde, xub_StrLen nTxtLen,SwNode* pNode, SwPaM* pPam)
{
bool bFound = false;
@@ -452,8 +454,8 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
aFltArr, sCleanStr, bRemoveSoftHyphens );
SwScriptIterator* pScriptIter = 0;
- USHORT nSearchScript = 0;
- USHORT nCurrScript = 0;
+ sal_uInt16 nSearchScript = 0;
+ sal_uInt16 nCurrScript = 0;
if ( SearchAlgorithms_APPROXIMATE == rSearchOpt.algorithmType &&
pBreakIt->GetBreakIter().is() )
@@ -524,7 +526,7 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
if( !bSrchForward ) // rueckwaerts Suche?
Exchange(); // Point und Mark tauschen
- bFound = TRUE;
+ bFound = sal_True;
break;
}
@@ -548,7 +550,7 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
{
if( !bSrchForward ) // rueckwaerts Suche?
Exchange(); // Point und Mark tauschen
- //bFound = TRUE;
+ //bFound = sal_True;
//break;
return true;
}
@@ -562,13 +564,13 @@ struct SwFindParaText : public SwFindParas
const SearchOptions& rSearchOpt;
SwCursor& rCursor;
utl::TextSearch aSTxt;
- BOOL bReplace;
- BOOL bSearchInNotes;
+ sal_Bool bReplace;
+ sal_Bool bSearchInNotes;
- SwFindParaText( const SearchOptions& rOpt, BOOL bSearchNotes, int bRepl, SwCursor& rCrsr )
+ SwFindParaText( const SearchOptions& rOpt, sal_Bool bSearchNotes, int bRepl, SwCursor& rCrsr )
: rSearchOpt( rOpt ), rCursor( rCrsr ), aSTxt( rOpt ), bReplace( 0 != bRepl ), bSearchInNotes( bSearchNotes )
{}
- virtual int Find( SwPaM* , SwMoveFn , const SwPaM*, BOOL bInReadOnly );
+ virtual int Find( SwPaM* , SwMoveFn , const SwPaM*, sal_Bool bInReadOnly );
virtual int IsReplaceMode() const;
virtual ~SwFindParaText();
};
@@ -578,12 +580,12 @@ SwFindParaText::~SwFindParaText()
}
int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove,
- const SwPaM* pRegion, BOOL bInReadOnly )
+ const SwPaM* pRegion, sal_Bool bInReadOnly )
{
if( bInReadOnly && bReplace )
- bInReadOnly = FALSE;
+ bInReadOnly = sal_False;
- BOOL bFnd = (BOOL)pCrsr->Find( rSearchOpt, bSearchInNotes, aSTxt, fnMove, pRegion, bInReadOnly );
+ sal_Bool bFnd = (sal_Bool)pCrsr->Find( rSearchOpt, bSearchInNotes, aSTxt, fnMove, pRegion, bInReadOnly );
if( bFnd && bReplace ) // String ersetzen ??
@@ -631,9 +633,9 @@ int SwFindParaText::IsReplaceMode() const
}
-ULONG SwCursor::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes,
+sal_uLong SwCursor::Find( const SearchOptions& rSearchOpt, sal_Bool bSearchInNotes,
SwDocPositions nStart, SwDocPositions nEnde,
- BOOL& bCancel,
+ sal_Bool& bCancel,
FindRanges eFndRngs, int bReplace )
{
// OLE-Benachrichtigung abschalten !!
@@ -641,21 +643,27 @@ ULONG SwCursor::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes,
Link aLnk( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
- BOOL bSttUndo = pDoc->DoesUndo() && bReplace;
- if( bSttUndo )
- pDoc->StartUndo( UNDO_REPLACE, NULL );
+ bool const bStartUndo = pDoc->GetIDocumentUndoRedo().DoesUndo() && bReplace;
+ if (bStartUndo)
+ {
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_REPLACE, NULL );
+ }
- BOOL bSearchSel = 0 != (rSearchOpt.searchFlag & SearchFlags::REG_NOT_BEGINOFLINE);
+ sal_Bool bSearchSel = 0 != (rSearchOpt.searchFlag & SearchFlags::REG_NOT_BEGINOFLINE);
if( bSearchSel )
eFndRngs = (FindRanges)(eFndRngs | FND_IN_SEL);
SwFindParaText aSwFindParaText( rSearchOpt, bSearchInNotes, bReplace, *this );
- ULONG nRet = FindAll( aSwFindParaText, nStart, nEnde, eFndRngs, bCancel );
+ sal_uLong nRet = FindAll( aSwFindParaText, nStart, nEnde, eFndRngs, bCancel );
pDoc->SetOle2Link( aLnk );
if( nRet && bReplace )
pDoc->SetModified();
- if( bSttUndo )
- pDoc->EndUndo( UNDO_REPLACE, NULL );
+ if (bStartUndo)
+ {
+ SwRewriter rewriter(MakeUndoReplaceRewriter(
+ nRet, rSearchOpt.searchString, rSearchOpt.replaceString));
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_REPLACE, & rewriter );
+ }
return nRet;
}
@@ -665,8 +673,8 @@ String *ReplaceBackReferences( const SearchOptions& rSearchOpt, SwPaM* pPam )
if( pPam && pPam->HasMark() &&
SearchAlgorithms_REGEXP == rSearchOpt.algorithmType )
{
- const SwCntntNode* pTxtNode = pPam->GetCntntNode( TRUE );
- if( pTxtNode && pTxtNode->IsTxtNode() && pTxtNode == pPam->GetCntntNode( FALSE ) )
+ const SwCntntNode* pTxtNode = pPam->GetCntntNode( sal_True );
+ if( pTxtNode && pTxtNode->IsTxtNode() && pTxtNode == pPam->GetCntntNode( sal_False ) )
{
utl::TextSearch aSTxt( rSearchOpt );
String aStr( pPam->GetTxt() );
diff --git a/sw/source/core/crsr/makefile.mk b/sw/source/core/crsr/makefile.mk
deleted file mode 100644
index c5c59b8ba120..000000000000
--- a/sw/source/core/crsr/makefile.mk
+++ /dev/null
@@ -1,80 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=crsr
-
-AUTOSEG=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(mydebug)" != ""
-CDEFS+=-Dmydebug
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES= \
- $(SLO)$/BlockCursor.obj \
- $(SLO)$/bookmrk.obj \
- $(SLO)$/callnk.obj \
- $(SLO)$/crbm.obj \
- $(SLO)$/crossrefbookmark.obj \
- $(SLO)$/crsrsh.obj \
- $(SLO)$/crstrvl.obj \
- $(SLO)$/crstrvl1.obj \
- $(SLO)$/findattr.obj \
- $(SLO)$/findcoll.obj \
- $(SLO)$/findfmt.obj \
- $(SLO)$/findtxt.obj \
- $(SLO)$/pam.obj \
- $(SLO)$/paminit.obj \
- $(SLO)$/swcrsr.obj \
- $(SLO)$/trvlcol.obj \
- $(SLO)$/trvlfnfl.obj \
- $(SLO)$/trvlreg.obj \
- $(SLO)$/trvltbl.obj \
- $(SLO)$/unocrsr.obj \
- $(SLO)$/viscrs.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-.IF "$(mydebug)" != ""
-SLOFILES += \
- $(SLO)$/pamio.obj
-.ENDIF
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 902e0f7d0c93..24a51cd362e1 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -57,7 +57,7 @@
#include <xmloff/odffields.hxx>
// fuer den dummen ?MSC-? Compiler
-inline xub_StrLen GetSttOrEnd( BOOL bCondition, const SwCntntNode& rNd )
+inline xub_StrLen GetSttOrEnd( sal_Bool bCondition, const SwCntntNode& rNd )
{
return bCondition ? 0 : rNd.Len();
}
@@ -105,58 +105,58 @@ SwPosition &SwPosition::operator=(const SwPosition &rPos)
}
-BOOL SwPosition::operator<(const SwPosition &rPos) const
+sal_Bool SwPosition::operator<(const SwPosition &rPos) const
{
if( nNode < rPos.nNode )
- return TRUE;
+ return sal_True;
if( nNode == rPos.nNode )
return ( nContent < rPos.nContent );
- return FALSE;
+ return sal_False;
}
-BOOL SwPosition::operator>(const SwPosition &rPos) const
+sal_Bool SwPosition::operator>(const SwPosition &rPos) const
{
if(nNode > rPos.nNode )
- return TRUE;
+ return sal_True;
if( nNode == rPos.nNode )
return ( nContent > rPos.nContent );
- return FALSE;
+ return sal_False;
}
-BOOL SwPosition::operator<=(const SwPosition &rPos) const
+sal_Bool SwPosition::operator<=(const SwPosition &rPos) const
{
if(nNode < rPos.nNode )
- return TRUE;
+ return sal_True;
if( nNode == rPos.nNode )
return ( nContent <= rPos.nContent );
- return FALSE;
+ return sal_False;
}
-BOOL SwPosition::operator>=(const SwPosition &rPos) const
+sal_Bool SwPosition::operator>=(const SwPosition &rPos) const
{
if(nNode > rPos.nNode )
- return TRUE;
+ return sal_True;
if( nNode == rPos.nNode )
return ( nContent >= rPos.nContent );
- return FALSE;
+ return sal_False;
}
-BOOL SwPosition::operator==(const SwPosition &rPos) const
+sal_Bool SwPosition::operator==(const SwPosition &rPos) const
{
return
( ( nNode == rPos.nNode ) && ( nContent == rPos.nContent ) ?
- TRUE: FALSE);
+ sal_True: sal_False);
}
-BOOL SwPosition::operator!=(const SwPosition &rPos) const
+sal_Bool SwPosition::operator!=(const SwPosition &rPos) const
{
if( nNode != rPos.nNode )
- return TRUE;
+ return sal_True;
return ( nContent != rPos.nContent );
}
@@ -258,9 +258,9 @@ SwComparePosition ComparePosition(
enum CHKSECTION { Chk_Both, Chk_One, Chk_None };
-CHKSECTION lcl_TstIdx( ULONG nSttIdx, ULONG nEndIdx, const SwNode& rEndNd )
+CHKSECTION lcl_TstIdx( sal_uLong nSttIdx, sal_uLong nEndIdx, const SwNode& rEndNd )
{
- ULONG nStt = rEndNd.StartOfSectionIndex(), nEnd = rEndNd.GetIndex();
+ sal_uLong nStt = rEndNd.StartOfSectionIndex(), nEnd = rEndNd.GetIndex();
CHKSECTION eSec = nStt < nSttIdx && nEnd >= nSttIdx ? Chk_One : Chk_None;
if( nStt < nEndIdx && nEnd >= nEndIdx )
return( eSec == Chk_One ? Chk_Both : Chk_One );
@@ -268,14 +268,14 @@ CHKSECTION lcl_TstIdx( ULONG nSttIdx, ULONG nEndIdx, const SwNode& rEndNd )
}
-BOOL lcl_ChkOneRange( CHKSECTION eSec, BOOL bChkSections,
- const SwNode& rBaseEnd, ULONG nStt, ULONG nEnd )
+sal_Bool lcl_ChkOneRange( CHKSECTION eSec, sal_Bool bChkSections,
+ const SwNode& rBaseEnd, sal_uLong nStt, sal_uLong nEnd )
{
if( eSec != Chk_Both )
- return FALSE;
+ return sal_False;
if( !bChkSections )
- return TRUE;
+ return sal_True;
// suche die umspannende Section
const SwNodes& rNds = rBaseEnd.GetNodes();
@@ -284,29 +284,29 @@ BOOL lcl_ChkOneRange( CHKSECTION eSec, BOOL bChkSections,
pNd = pNd->StartOfSectionNode();
if( pNd == rNds[ nEnd ]->StartOfSectionNode() )
- return TRUE; // der gleiche StartNode, die selbe Section
+ return sal_True; // der gleiche StartNode, die selbe Section
// steht schon auf einem GrundSection Node ? Fehler !!!
if( !pNd->StartOfSectionIndex() )
- return FALSE;
+ return sal_False;
while( ( pTmp = pNd->StartOfSectionNode())->EndOfSectionNode() !=
&rBaseEnd )
pNd = pTmp;
- ULONG nSttIdx = pNd->GetIndex(), nEndIdx = pNd->EndOfSectionIndex();
+ sal_uLong nSttIdx = pNd->GetIndex(), nEndIdx = pNd->EndOfSectionIndex();
return nSttIdx <= nStt && nStt <= nEndIdx &&
- nSttIdx <= nEnd && nEnd <= nEndIdx ? TRUE : FALSE;
+ nSttIdx <= nEnd && nEnd <= nEndIdx ? sal_True : sal_False;
}
-BOOL CheckNodesRange( const SwNodeIndex& rStt,
- const SwNodeIndex& rEnd, BOOL bChkSection )
+sal_Bool CheckNodesRange( const SwNodeIndex& rStt,
+ const SwNodeIndex& rEnd, sal_Bool bChkSection )
{
const SwNodes& rNds = rStt.GetNodes();
- ULONG nStt = rStt.GetIndex(), nEnd = rEnd.GetIndex();
+ sal_uLong nStt = rStt.GetIndex(), nEnd = rEnd.GetIndex();
CHKSECTION eSec = lcl_TstIdx( nStt, nEnd, rNds.GetEndOfContent() );
- if( Chk_None != eSec ) return eSec == Chk_Both ? TRUE : FALSE;
+ if( Chk_None != eSec ) return eSec == Chk_Both ? sal_True : sal_False;
eSec = lcl_TstIdx( nStt, nEnd, rNds.GetEndOfAutotext() );
if( Chk_None != eSec )
@@ -328,34 +328,34 @@ BOOL CheckNodesRange( const SwNodeIndex& rStt,
return lcl_ChkOneRange( eSec, bChkSection,
rNds.GetEndOfRedlines(), nStt, nEnd );
- return FALSE; // liegt irgendwo dazwischen, FEHLER
+ return sal_False; // liegt irgendwo dazwischen, FEHLER
}
-BOOL GoNext(SwNode* pNd, SwIndex * pIdx, USHORT nMode )
+sal_Bool GoNext(SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode )
{
if( pNd->IsCntntNode() )
return ((SwCntntNode*)pNd)->GoNext( pIdx, nMode );
- return FALSE;
+ return sal_False;
}
-BOOL GoPrevious( SwNode* pNd, SwIndex * pIdx, USHORT nMode )
+sal_Bool GoPrevious( SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode )
{
if( pNd->IsCntntNode() )
return ((SwCntntNode*)pNd)->GoPrevious( pIdx, nMode );
- return FALSE;
+ return sal_False;
}
-SwCntntNode* GoNextNds( SwNodeIndex* pIdx, BOOL bChk )
+SwCntntNode* GoNextNds( SwNodeIndex* pIdx, sal_Bool bChk )
{
SwNodeIndex aIdx( *pIdx );
SwCntntNode* pNd = aIdx.GetNodes().GoNext( &aIdx );
if( pNd )
{
if( bChk && 1 != aIdx.GetIndex() - pIdx->GetIndex() &&
- !CheckNodesRange( *pIdx, aIdx, TRUE ) )
+ !CheckNodesRange( *pIdx, aIdx, sal_True ) )
pNd = 0;
else
*pIdx = aIdx;
@@ -364,14 +364,14 @@ SwCntntNode* GoNextNds( SwNodeIndex* pIdx, BOOL bChk )
}
-SwCntntNode* GoPreviousNds( SwNodeIndex * pIdx, BOOL bChk )
+SwCntntNode* GoPreviousNds( SwNodeIndex * pIdx, sal_Bool bChk )
{
SwNodeIndex aIdx( *pIdx );
SwCntntNode* pNd = aIdx.GetNodes().GoPrevious( &aIdx );
if( pNd )
{
if( bChk && 1 != pIdx->GetIndex() - aIdx.GetIndex() &&
- !CheckNodesRange( *pIdx, aIdx, TRUE ) )
+ !CheckNodesRange( *pIdx, aIdx, sal_True ) )
pNd = 0;
else
*pIdx = aIdx;
@@ -561,9 +561,9 @@ void SwPaM::Exchange()
// Bewegen des Cursors
-BOOL SwPaM::Move( SwMoveFn fnMove, SwGoInDoc fnGo )
+sal_Bool SwPaM::Move( SwMoveFn fnMove, SwGoInDoc fnGo )
{
- BOOL bRet = (*fnGo)( *this, fnMove );
+ sal_Bool bRet = (*fnGo)( *this, fnMove );
m_bIsInFrontOfLabel = false;
@@ -612,7 +612,7 @@ SwPaM* SwPaM::MakeRegion( SwMoveFn fnMove, const SwPaM * pOrigRg )
return pPam;
}
-SwPaM & SwPaM::Normalize(BOOL bPointFirst)
+SwPaM & SwPaM::Normalize(sal_Bool bPointFirst)
{
if (HasMark())
if ( ( bPointFirst && *m_pPoint > *m_pMark) ||
@@ -624,7 +624,7 @@ SwPaM & SwPaM::Normalize(BOOL bPointFirst)
return *this;
}
-USHORT SwPaM::GetPageNum( BOOL bAtPoint, const Point* pLayPos )
+sal_uInt16 SwPaM::GetPageNum( sal_Bool bAtPoint, const Point* pLayPos )
{
// return die Seitennummer am Cursor
// (fuer Reader + Seitengebundene Rahmen)
@@ -634,7 +634,7 @@ USHORT SwPaM::GetPageNum( BOOL bAtPoint, const Point* pLayPos )
const SwPosition* pPos = bAtPoint ? m_pPoint : m_pMark;
if( 0 != ( pNd = pPos->nNode.GetNode().GetCntntNode() ) &&
- 0 != ( pCFrm = pNd->GetFrm( pLayPos, pPos, FALSE )) &&
+ 0 != ( pCFrm = pNd->GetFrm( pLayPos, pPos, sal_False )) &&
0 != ( pPg = pCFrm->FindPageFrm() ))
return pPg->GetPhyPageNum();
return 0;
@@ -667,15 +667,15 @@ const SwFrm* lcl_FindEditInReadonlyFrm( const SwFrm& rFrm )
// steht in etwas geschuetztem oder in die Selektion umspannt
// etwas geschuetztes.
-BOOL SwPaM::HasReadonlySel( bool bFormView ) const
+sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
Point aTmpPt;
const SwCntntNode *pNd;
const SwCntntFrm *pFrm;
if( 0 != ( pNd = GetPoint()->nNode.GetNode().GetCntntNode() ))
- pFrm = pNd->GetFrm( &aTmpPt, GetPoint(), FALSE );
+ pFrm = pNd->GetFrm( &aTmpPt, GetPoint(), sal_False );
else
pFrm = 0;
@@ -685,31 +685,31 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
if( pFrm && ( pFrm->IsProtected() ||
( bFormView && 0 == ( pSttEIRFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
- bRet = TRUE;
+ bRet = sal_True;
else if( pNd )
{
const SwSectionNode* pSNd = pNd->GetSectionNode();
if( pSNd && ( pSNd->GetSection().IsProtectFlag() ||
(bFormView && !pSNd->GetSection().IsEditInReadonlyFlag()) ) )
- bRet = TRUE;
+ bRet = sal_True;
}
if( !bRet && HasMark() && GetPoint()->nNode != GetMark()->nNode )
{
if( 0 != ( pNd = GetMark()->nNode.GetNode().GetCntntNode() ))
- pFrm = pNd->GetFrm( &aTmpPt, GetMark(), FALSE );
+ pFrm = pNd->GetFrm( &aTmpPt, GetMark(), sal_False );
else
pFrm = 0;
if( pFrm && ( pFrm->IsProtected() ||
( bFormView && 0 == ( pEndEIRFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
- bRet = TRUE;
+ bRet = sal_True;
else if( pNd )
{
const SwSectionNode* pSNd = pNd->GetSectionNode();
if( pSNd && ( pSNd->GetSection().IsProtectFlag() ||
(bFormView && !pSNd->GetSection().IsEditInReadonlyFlag()) ) )
- bRet = TRUE;
+ bRet = sal_True;
}
if ( !bRet && bFormView )
@@ -717,18 +717,18 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
// Check if start and end frame are inside the _same_
// edit-in-readonly-environment. Otherwise we better return 'true'
if ( pSttEIRFrm != pEndEIRFrm )
- bRet = TRUE;
+ bRet = sal_True;
}
// oder sollte eine geschuetzte Section innerhalb der
// Selektion liegen?
if( !bRet )
{
- ULONG nSttIdx = GetMark()->nNode.GetIndex(),
+ sal_uLong nSttIdx = GetMark()->nNode.GetIndex(),
nEndIdx = GetPoint()->nNode.GetIndex();
if( nEndIdx <= nSttIdx )
{
- ULONG nTmp = nSttIdx;
+ sal_uLong nTmp = nSttIdx;
nSttIdx = nEndIdx;
nEndIdx = nTmp;
}
@@ -739,14 +739,14 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
if( nSttIdx + 3 < nEndIdx )
{
const SwSectionFmts& rFmts = GetDoc()->GetSections();
- for( USHORT n = rFmts.Count(); n; )
+ for( sal_uInt16 n = rFmts.Count(); n; )
{
const SwSectionFmt* pFmt = rFmts[ --n ];
if( pFmt->GetProtect().IsCntntProtected() )
{
- const SwFmtCntnt& rCntnt = pFmt->GetCntnt(FALSE);
+ const SwFmtCntnt& rCntnt = pFmt->GetCntnt(sal_False);
OSL_ENSURE( rCntnt.GetCntntIdx(), "wo ist der SectionNode?" );
- ULONG nIdx = rCntnt.GetCntntIdx()->GetIndex();
+ sal_uLong nIdx = rCntnt.GetCntntIdx()->GetIndex();
if( nSttIdx <= nIdx && nEndIdx >= nIdx &&
rCntnt.GetCntntIdx()->GetNode().GetNodes().IsDocNodes() )
{
@@ -756,10 +756,10 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
if( CONTENT_SECTION == rSect.GetType() )
{
RestoreSavePos();
- return TRUE;
+ return sal_True;
}
*/
- bRet = TRUE;
+ bRet = sal_True;
break;
}
}
@@ -788,7 +788,7 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
{
// Unhandled fieldmarks case shouldn't be edited manually to avoid breaking anything
if ( ( pA == pB ) && bUnhandledMark )
- bRet = TRUE;
+ bRet = sal_True;
else
{
// Form protection case
@@ -816,8 +816,8 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
// Fall, darf die Position vom Pam nicht veraendert werden!
-SwCntntNode* GetNode( SwPaM & rPam, BOOL& rbFirst, SwMoveFn fnMove,
- BOOL bInReadOnly )
+SwCntntNode* GetNode( SwPaM & rPam, sal_Bool& rbFirst, SwMoveFn fnMove,
+ sal_Bool bInReadOnly )
{
SwCntntNode * pNd = 0;
SwCntntFrm* pFrm;
@@ -826,7 +826,7 @@ SwCntntNode* GetNode( SwPaM & rPam, BOOL& rbFirst, SwMoveFn fnMove,
{
if( rbFirst )
{
- rbFirst = FALSE;
+ rbFirst = sal_False;
pNd = rPam.GetCntntNode();
if( pNd )
{
@@ -849,18 +849,18 @@ SwCntntNode* GetNode( SwPaM & rPam, BOOL& rbFirst, SwMoveFn fnMove,
if( !pNd ) // steht Cursor auf keinem ContentNode ?
{
SwPosition aPos( *rPam.GetPoint() );
- BOOL bSrchForward = fnMove == fnMoveForward;
+ sal_Bool bSrchForward = fnMove == fnMoveForward;
SwNodes& rNodes = aPos.nNode.GetNodes();
// zum naechsten / vorherigen ContentNode
// Funktioniert noch alles, wenn die Uerbpruefung vom ueberspringen der
// Sektions herausgenommen wird ??
// if( (*fnMove->fnNds)( rNodes, &aPos.nNode ) )
- while( TRUE )
+ while( sal_True )
{
pNd = bSrchForward
- ? rNodes.GoNextSection( &aPos.nNode, TRUE, !bInReadOnly )
- : rNodes.GoPrevSection( &aPos.nNode, TRUE, !bInReadOnly );
+ ? rNodes.GoNextSection( &aPos.nNode, sal_True, !bInReadOnly )
+ : rNodes.GoPrevSection( &aPos.nNode, sal_True, !bInReadOnly );
if( pNd )
{
aPos.nContent.Assign( pNd, ::GetSttOrEnd( bSrchForward,*pNd ));
@@ -910,7 +910,7 @@ void GoEndDoc( SwPosition * pPos )
{
SwNodes& rNodes = pPos->nNode.GetNodes();
pPos->nNode = rNodes.GetEndOfContent();
- SwCntntNode* pCNd = GoPreviousNds( &pPos->nNode, TRUE );
+ SwCntntNode* pCNd = GoPreviousNds( &pPos->nNode, sal_True );
if( pCNd )
pCNd->MakeEndIndex( &pPos->nContent );
}
@@ -920,7 +920,7 @@ void GoStartSection( SwPosition * pPos )
{
// springe zum Anfang der Section
SwNodes& rNodes = pPos->nNode.GetNodes();
- USHORT nLevel = rNodes.GetSectionLevel( pPos->nNode );
+ sal_uInt16 nLevel = rNodes.GetSectionLevel( pPos->nNode );
if( pPos->nNode < rNodes.GetEndOfContent().StartOfSectionIndex() )
nLevel--;
do { rNodes.GoStartOfSection( &pPos->nNode ); } while( nLevel-- );
@@ -936,35 +936,35 @@ void GoEndSection( SwPosition * pPos )
{
// springe zum Anfang/Ende der Section
SwNodes& rNodes = pPos->nNode.GetNodes();
- USHORT nLevel = rNodes.GetSectionLevel( pPos->nNode );
+ sal_uInt16 nLevel = rNodes.GetSectionLevel( pPos->nNode );
if( pPos->nNode < rNodes.GetEndOfContent().StartOfSectionIndex() )
nLevel--;
do { rNodes.GoEndOfSection( &pPos->nNode ); } while( nLevel-- );
// steht jetzt auf einem EndNode, also zum vorherigen CntntNode
- if( GoPreviousNds( &pPos->nNode, TRUE ) )
+ if( GoPreviousNds( &pPos->nNode, sal_True ) )
pPos->nNode.GetNode().GetCntntNode()->MakeEndIndex( &pPos->nContent );
}
-BOOL GoInDoc( SwPaM & rPam, SwMoveFn fnMove )
+sal_Bool GoInDoc( SwPaM & rPam, SwMoveFn fnMove )
{
(*fnMove->fnDoc)( rPam.GetPoint() );
- return TRUE;
+ return sal_True;
}
-BOOL GoInSection( SwPaM & rPam, SwMoveFn fnMove )
+sal_Bool GoInSection( SwPaM & rPam, SwMoveFn fnMove )
{
(*fnMove->fnSections)( (SwPosition*)rPam.GetPoint() );
- return TRUE;
+ return sal_True;
}
-BOOL GoInNode( SwPaM & rPam, SwMoveFn fnMove )
+sal_Bool GoInNode( SwPaM & rPam, SwMoveFn fnMove )
{
- SwCntntNode *pNd = (*fnMove->fnNds)( &rPam.GetPoint()->nNode, TRUE );
+ SwCntntNode *pNd = (*fnMove->fnNds)( &rPam.GetPoint()->nNode, sal_True );
if( pNd )
rPam.GetPoint()->nContent.Assign( pNd,
::GetSttOrEnd( fnMove == fnMoveForward, *pNd ) );
@@ -972,35 +972,35 @@ BOOL GoInNode( SwPaM & rPam, SwMoveFn fnMove )
}
-BOOL GoInCntnt( SwPaM & rPam, SwMoveFn fnMove )
+sal_Bool GoInCntnt( SwPaM & rPam, SwMoveFn fnMove )
{
if( (*fnMove->fnNd)( &rPam.GetPoint()->nNode.GetNode(),
&rPam.GetPoint()->nContent, CRSR_SKIP_CHARS ))
- return TRUE;
+ return sal_True;
return GoInNode( rPam, fnMove );
}
-BOOL GoInCntntCells( SwPaM & rPam, SwMoveFn fnMove )
+sal_Bool GoInCntntCells( SwPaM & rPam, SwMoveFn fnMove )
{
if( (*fnMove->fnNd)( &rPam.GetPoint()->nNode.GetNode(),
&rPam.GetPoint()->nContent, CRSR_SKIP_CELLS ))
- return TRUE;
+ return sal_True;
return GoInNode( rPam, fnMove );
}
-BOOL GoInCntntSkipHidden( SwPaM & rPam, SwMoveFn fnMove )
+sal_Bool GoInCntntSkipHidden( SwPaM & rPam, SwMoveFn fnMove )
{
if( (*fnMove->fnNd)( &rPam.GetPoint()->nNode.GetNode(),
&rPam.GetPoint()->nContent, CRSR_SKIP_CHARS | CRSR_SKIP_HIDDEN ) )
- return TRUE;
+ return sal_True;
return GoInNode( rPam, fnMove );
}
-BOOL GoInCntntCellsSkipHidden( SwPaM & rPam, SwMoveFn fnMove )
+sal_Bool GoInCntntCellsSkipHidden( SwPaM & rPam, SwMoveFn fnMove )
{
if( (*fnMove->fnNd)( &rPam.GetPoint()->nNode.GetNode(),
&rPam.GetPoint()->nContent, CRSR_SKIP_CELLS | CRSR_SKIP_HIDDEN ) )
- return TRUE;
+ return sal_True;
return GoInNode( rPam, fnMove );
}
@@ -1009,7 +1009,7 @@ BOOL GoInCntntCellsSkipHidden( SwPaM & rPam, SwMoveFn fnMove )
// --------- Funktionsdefinitionen fuer die SwCrsrShell --------------
-BOOL GoPrevPara( SwPaM & rPam, SwPosPara aPosPara )
+sal_Bool GoPrevPara( SwPaM & rPam, SwPosPara aPosPara )
{
if( rPam.Move( fnMoveBackward, fnGoNode ) )
{
@@ -1018,13 +1018,13 @@ BOOL GoPrevPara( SwPaM & rPam, SwPosPara aPosPara )
SwCntntNode * pNd = rPos.nNode.GetNode().GetCntntNode();
rPos.nContent.Assign( pNd,
::GetSttOrEnd( aPosPara == fnMoveForward, *pNd ) );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL GoCurrPara( SwPaM & rPam, SwPosPara aPosPara )
+sal_Bool GoCurrPara( SwPaM & rPam, SwPosPara aPosPara )
{
SwPosition& rPos = *rPam.GetPoint();
SwCntntNode * pNd = rPos.nNode.GetNode().GetCntntNode();
@@ -1036,24 +1036,24 @@ BOOL GoCurrPara( SwPaM & rPam, SwPosPara aPosPara )
if( nOld != nNew )
{
rPos.nContent.Assign( pNd, nNew );
- return TRUE;
+ return sal_True;
}
}
// den Node noch etwas bewegen ( auf den naechsten/vorh. CntntNode)
if( ( aPosPara==fnParaStart && 0 != ( pNd =
- GoPreviousNds( &rPos.nNode, TRUE ))) ||
+ GoPreviousNds( &rPos.nNode, sal_True ))) ||
( aPosPara==fnParaEnd && 0 != ( pNd =
- GoNextNds( &rPos.nNode, TRUE ))) )
+ GoNextNds( &rPos.nNode, sal_True ))) )
{
rPos.nContent.Assign( pNd,
::GetSttOrEnd( aPosPara == fnMoveForward, *pNd ));
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL GoNextPara( SwPaM & rPam, SwPosPara aPosPara )
+sal_Bool GoNextPara( SwPaM & rPam, SwPosPara aPosPara )
{
if( rPam.Move( fnMoveForward, fnGoNode ) )
{
@@ -1062,14 +1062,14 @@ BOOL GoNextPara( SwPaM & rPam, SwPosPara aPosPara )
SwCntntNode * pNd = rPos.nNode.GetNode().GetCntntNode();
rPos.nContent.Assign( pNd,
::GetSttOrEnd( aPosPara == fnMoveForward, *pNd ) );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL GoCurrSection( SwPaM & rPam, SwMoveFn fnMove )
+sal_Bool GoCurrSection( SwPaM & rPam, SwMoveFn fnMove )
{
SwPosition& rPos = *rPam.GetPoint();
SwPosition aSavePos( rPos ); // eine Vergleichsposition
@@ -1077,10 +1077,10 @@ BOOL GoCurrSection( SwPaM & rPam, SwMoveFn fnMove )
(rNds.*fnMove->fnSection)( &rPos.nNode );
SwCntntNode *pNd;
if( 0 == ( pNd = rPos.nNode.GetNode().GetCntntNode()) &&
- 0 == ( pNd = (*fnMove->fnNds)( &rPos.nNode, TRUE )) )
+ 0 == ( pNd = (*fnMove->fnNds)( &rPos.nNode, sal_True )) )
{
rPos = aSavePos; // Cusror nicht veraendern
- return FALSE;
+ return sal_False;
}
rPos.nContent.Assign( pNd,
@@ -1089,7 +1089,7 @@ BOOL GoCurrSection( SwPaM & rPam, SwMoveFn fnMove )
}
-BOOL GoNextSection( SwPaM & rPam, SwMoveFn fnMove )
+sal_Bool GoNextSection( SwPaM & rPam, SwMoveFn fnMove )
{
SwPosition& rPos = *rPam.GetPoint();
SwPosition aSavePos( rPos ); // eine Vergleichsposition
@@ -1100,17 +1100,17 @@ BOOL GoNextSection( SwPaM & rPam, SwMoveFn fnMove )
if( !GoInCntnt( rPam, fnMoveForward ) )
{
rPos = aSavePos; // Cusror nicht veraendern
- return FALSE;
+ return sal_False;
}
(rNds.*fnMove->fnSection)( &rPos.nNode );
SwCntntNode *pNd = rPos.nNode.GetNode().GetCntntNode();
rPos.nContent.Assign( pNd,
::GetSttOrEnd( fnMove == fnMoveForward, *pNd ) );
- return TRUE;
+ return sal_True;
}
-BOOL GoPrevSection( SwPaM & rPam, SwMoveFn fnMove )
+sal_Bool GoPrevSection( SwPaM & rPam, SwMoveFn fnMove )
{
SwPosition& rPos = *rPam.GetPoint();
SwPosition aSavePos( rPos ); // eine Vergleichsposition
@@ -1121,13 +1121,13 @@ BOOL GoPrevSection( SwPaM & rPam, SwMoveFn fnMove )
if( !GoInCntnt( rPam, fnMoveBackward ))
{
rPos = aSavePos; // Cusror nicht veraendern
- return FALSE;
+ return sal_False;
}
(rNds.*fnMove->fnSection)( &rPos.nNode );
SwCntntNode *pNd = rPos.nNode.GetNode().GetCntntNode();
rPos.nContent.Assign( pNd,
::GetSttOrEnd( fnMove == fnMoveForward, *pNd ));
- return TRUE;
+ return sal_True;
}
String SwPaM::GetTxt() const
@@ -1178,7 +1178,7 @@ String SwPaM::GetTxt() const
return aResult;
}
-BOOL SwPaM::Overlap(const SwPaM & a, const SwPaM & b)
+sal_Bool SwPaM::Overlap(const SwPaM & a, const SwPaM & b)
{
return !(*b.End() <= *a.Start() || *a.End() <= *b.End());
}
@@ -1197,7 +1197,7 @@ void SwPaM::InvalidatePaM()
}
}
-BOOL SwPaM::LessThan(const SwPaM & a, const SwPaM & b)
+sal_Bool SwPaM::LessThan(const SwPaM & a, const SwPaM & b)
{
return (*a.Start() < *b.Start()) || (*a.Start() == *b.Start() && *a.End() < *b.End());
}
diff --git a/sw/source/core/crsr/paminit.cxx b/sw/source/core/crsr/paminit.cxx
index f423bdc335c0..726c7fbbe8ac 100644
--- a/sw/source/core/crsr/paminit.cxx
+++ b/sw/source/core/crsr/paminit.cxx
@@ -76,9 +76,9 @@ SwPosSection fnSectionStart = &aFwrd;
SwPosSection fnSectionEnd = &aBwrd;
// Travelling in Tabellen
-BOOL GotoPrevTable( SwPaM&, SwPosTable, BOOL bInReadOnly );
-BOOL GotoCurrTable( SwPaM&, SwPosTable, BOOL bInReadOnly );
-BOOL GotoNextTable( SwPaM&, SwPosTable, BOOL bInReadOnly );
+sal_Bool GotoPrevTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
+sal_Bool GotoCurrTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
+sal_Bool GotoNextTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
SwWhichTable fnTablePrev = &GotoPrevTable;
SwWhichTable fnTableCurr = &GotoCurrTable;
@@ -87,10 +87,10 @@ SwPosTable fnTableStart = &aFwrd;
SwPosTable fnTableEnd = &aBwrd;
// Travelling in Bereichen
-BOOL GotoPrevRegion( SwPaM&, SwPosRegion, BOOL bInReadOnly );
-BOOL GotoCurrRegion( SwPaM&, SwPosRegion, BOOL bInReadOnly );
-BOOL GotoCurrRegionAndSkip( SwPaM&, SwPosRegion, BOOL bInReadOnly );
-BOOL GotoNextRegion( SwPaM&, SwPosRegion, BOOL bInReadOnly );
+sal_Bool GotoPrevRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
+sal_Bool GotoCurrRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
+sal_Bool GotoCurrRegionAndSkip( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
+sal_Bool GotoNextRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
SwWhichRegion fnRegionPrev = &GotoPrevRegion;
SwWhichRegion fnRegionCurr = &GotoCurrRegion;
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 3e91eae07794..432ef6d0d281 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -44,6 +44,7 @@
#include <swcrsr.hxx>
#include <unocrsr.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docary.hxx>
#include <ndtxt.hxx>
#include <section.hxx>
@@ -66,21 +67,21 @@
using namespace ::com::sun::star::i18n;
-static const USHORT coSrchRplcThreshold = 60000;
+static const sal_uInt16 coSrchRplcThreshold = 60000;
struct _PercentHdl
{
SwDocShell* pDSh;
- ULONG nActPos;
- BOOL bBack, bNodeIdx;
+ sal_uLong nActPos;
+ sal_Bool bBack, bNodeIdx;
- _PercentHdl( ULONG nStt, ULONG nEnd, SwDocShell* pSh )
+ _PercentHdl( sal_uLong nStt, sal_uLong nEnd, SwDocShell* pSh )
: pDSh( pSh )
{
nActPos = nStt;
if( 0 != ( bBack = (nStt > nEnd )) )
{
- ULONG n = nStt; nStt = nEnd; nEnd = n;
+ sal_uLong n = nStt; nStt = nEnd; nEnd = n;
}
::StartProgress( STR_STATSTR_SEARCH, nStt, nEnd, 0 );
}
@@ -88,35 +89,35 @@ struct _PercentHdl
_PercentHdl( const SwPaM& rPam )
: pDSh( (SwDocShell*)rPam.GetDoc()->GetDocShell() )
{
- ULONG nStt, nEnd;
+ sal_uLong nStt, nEnd;
if( rPam.GetPoint()->nNode == rPam.GetMark()->nNode )
{
- bNodeIdx = FALSE;
+ bNodeIdx = sal_False;
nStt = rPam.GetMark()->nContent.GetIndex();
nEnd = rPam.GetPoint()->nContent.GetIndex();
}
else
{
- bNodeIdx = TRUE;
+ bNodeIdx = sal_True;
nStt = rPam.GetMark()->nNode.GetIndex();
nEnd = rPam.GetPoint()->nNode.GetIndex();
}
nActPos = nStt;
if( 0 != ( bBack = (nStt > nEnd )) )
{
- ULONG n = nStt; nStt = nEnd; nEnd = n;
+ sal_uLong n = nStt; nStt = nEnd; nEnd = n;
}
::StartProgress( STR_STATSTR_SEARCH, nStt, nEnd, pDSh );
}
~_PercentHdl() { ::EndProgress( pDSh ); }
- void NextPos( ULONG nPos ) const
+ void NextPos( sal_uLong nPos ) const
{ ::SetProgressState( bBack ? nActPos - nPos : nPos, pDSh ); }
void NextPos( SwPosition& rPos ) const
{
- ULONG nPos;
+ sal_uLong nPos;
if( bNodeIdx )
nPos = rPos.nNode.GetIndex();
else
@@ -158,12 +159,12 @@ bool SwCursor::IsReadOnlyAvailable() const
return false;
}
-BOOL SwCursor::IsSkipOverHiddenSections() const
+sal_Bool SwCursor::IsSkipOverHiddenSections() const
{
- return TRUE;
+ return sal_True;
}
-BOOL SwCursor::IsSkipOverProtectSections() const
+sal_Bool SwCursor::IsSkipOverProtectSections() const
{
return !IsReadOnlyAvailable();
}
@@ -196,7 +197,7 @@ _SwCursor_SavePos* SwCursor::CreateNewSavePos() const
// stelle fest, ob sich der Point ausserhalb des Content-Bereichs
// vom Nodes-Array befindet
-BOOL SwCursor::IsNoCntnt() const
+sal_Bool SwCursor::IsNoCntnt() const
{
return GetPoint()->nNode.GetIndex() <
GetDoc()->GetNodes().GetEndOfExtras().GetIndex();
@@ -216,7 +217,7 @@ bool SwTableCursor::IsSelOvrCheck(int eFlags)
&& HasMark() )
{
SwNodeIndex aOldPos( rNds, GetSavePos()->nNode );
- if( !CheckNodesRange( aOldPos, GetPoint()->nNode, TRUE ))
+ if( !CheckNodesRange( aOldPos, GetPoint()->nNode, sal_True ))
{
GetPoint()->nNode = aOldPos;
GetPoint()->nContent.Assign( GetCntntNode(), GetSavePos()->nCntnt );
@@ -226,17 +227,17 @@ bool SwTableCursor::IsSelOvrCheck(int eFlags)
return SwCursor::IsSelOvrCheck(eFlags);
}
-BOOL SwCursor::IsSelOvr( int eFlags )
+sal_Bool SwCursor::IsSelOvr( int eFlags )
{
SwDoc* pDoc = GetDoc();
SwNodes& rNds = pDoc->GetNodes();
- BOOL bSkipOverHiddenSections = IsSkipOverHiddenSections();
- BOOL bSkipOverProtectSections = IsSkipOverProtectSections();
+ sal_Bool bSkipOverHiddenSections = IsSkipOverHiddenSections();
+ sal_Bool bSkipOverProtectSections = IsSkipOverProtectSections();
if ( IsSelOvrCheck( eFlags ) )
{
- return TRUE;
+ return sal_True;
}
// neu: Bereiche ueberpruefen
@@ -256,7 +257,7 @@ BOOL SwCursor::IsSelOvr( int eFlags )
{
// dann wars das schon
RestoreSavePos();
- return TRUE;
+ return sal_True;
}
// dann setze den Cursor auf die neue Position:
@@ -274,14 +275,14 @@ BOOL SwCursor::IsSelOvr( int eFlags )
}
int bIsValidPos = 0 != pCNd;
- BOOL bValidNodesRange = bIsValidPos &&
- ::CheckNodesRange( rPtIdx, aIdx, TRUE );
+ sal_Bool bValidNodesRange = bIsValidPos &&
+ ::CheckNodesRange( rPtIdx, aIdx, sal_True );
if( !bValidNodesRange )
{
rPtIdx = pSavePos->nNode;
if( 0 == ( pCNd = rPtIdx.GetNode().GetCntntNode() ) )
{
- bIsValidPos = FALSE;
+ bIsValidPos = sal_False;
nCntntPos = 0;
rPtIdx = aIdx;
if( 0 == ( pCNd = rPtIdx.GetNode().GetCntntNode() ) )
@@ -298,32 +299,32 @@ BOOL SwCursor::IsSelOvr( int eFlags )
GetPoint()->nContent.Assign( pCNd, nTmpPos );
if( !bIsValidPos || !bValidNodesRange ||
// sollten wir in einer Tabelle gelandet sein?
- IsInProtectTable( TRUE ) )
- return TRUE;
+ IsInProtectTable( sal_True ) )
+ return sal_True;
}
// oder sollte eine geschuetzte Section innerhalb der Selektion liegen?
if( HasMark() && bSkipOverProtectSections)
{
- ULONG nSttIdx = GetMark()->nNode.GetIndex(),
+ sal_uLong nSttIdx = GetMark()->nNode.GetIndex(),
nEndIdx = GetPoint()->nNode.GetIndex();
if( nEndIdx <= nSttIdx )
{
- ULONG nTmp = nSttIdx;
+ sal_uLong nTmp = nSttIdx;
nSttIdx = nEndIdx;
nEndIdx = nTmp;
}
const SwSectionFmts& rFmts = pDoc->GetSections();
- for( USHORT n = 0; n < rFmts.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFmts.Count(); ++n )
{
const SwSectionFmt* pFmt = rFmts[n];
const SvxProtectItem& rProtect = pFmt->GetProtect();
if( rProtect.IsCntntProtected() )
{
- const SwFmtCntnt& rCntnt = pFmt->GetCntnt(FALSE);
+ const SwFmtCntnt& rCntnt = pFmt->GetCntnt(sal_False);
OSL_ENSURE( rCntnt.GetCntntIdx(), "wo ist der SectionNode?" );
- ULONG nIdx = rCntnt.GetCntntIdx()->GetIndex();
+ sal_uLong nIdx = rCntnt.GetCntntIdx()->GetIndex();
if( nSttIdx <= nIdx && nEndIdx >= nIdx )
{
// ist es keine gelinkte Section, dann kann sie auch
@@ -332,7 +333,7 @@ BOOL SwCursor::IsSelOvr( int eFlags )
if( CONTENT_SECTION == rSect.GetType() )
{
RestoreSavePos();
- return TRUE;
+ return sal_True;
}
}
}
@@ -384,7 +385,7 @@ BOOL SwCursor::IsSelOvr( int eFlags )
GetPoint()->nContent.Assign( pCNd, nTmpPos );
// sollten wir in einer Tabelle gelandet sein?
- if( IsInProtectTable( TRUE ) )
+ if( IsInProtectTable( sal_True ) )
pFrm = 0;
}
}
@@ -393,7 +394,7 @@ BOOL SwCursor::IsSelOvr( int eFlags )
{
DeleteMark();
RestoreSavePos();
- return TRUE; // ohne Frames geht gar nichts!
+ return sal_True; // ohne Frames geht gar nichts!
}
}
@@ -402,19 +403,19 @@ BOOL SwCursor::IsSelOvr( int eFlags )
{
DeleteMark();
RestoreSavePos();
- return TRUE;
+ return sal_True;
}
if( !HasMark() )
- return FALSE;
+ return sal_False;
//JP 19.08.98: teste mal auf ungueltige Selektion - sprich ueber
// GrundSections:
- if( !::CheckNodesRange( GetMark()->nNode, GetPoint()->nNode, TRUE ))
+ if( !::CheckNodesRange( GetMark()->nNode, GetPoint()->nNode, sal_True ))
{
DeleteMark();
RestoreSavePos();
- return TRUE; // ohne Frames geht gar nichts!
+ return sal_True; // ohne Frames geht gar nichts!
}
const SwTableNode* pPtNd = pNd->FindTableNode();
@@ -424,21 +425,21 @@ BOOL SwCursor::IsSelOvr( int eFlags )
{
DeleteMark();
RestoreSavePos();
- return TRUE; // ohne Frames geht gar nichts!
+ return sal_True; // ohne Frames geht gar nichts!
}
const SwTableNode* pMrkNd = pNd->FindTableNode();
// beide in keinem oder beide im gleichen TableNode
if( ( !pMrkNd && !pPtNd ) || pPtNd == pMrkNd )
- return FALSE;
+ return sal_False;
// in unterschiedlichen Tabellen oder nur Mark in der Tabelle
if( ( pPtNd && pMrkNd ) || pMrkNd )
{ // dann lasse das nicht zu, alte Pos zurueck
RestoreSavePos();
// Crsr bleibt an der alten Position
- return TRUE;
+ return sal_True;
}
// ACHTUNG: dieses kann nicht im TableMode geschehen !!
@@ -446,14 +447,14 @@ BOOL SwCursor::IsSelOvr( int eFlags )
{
if( nsSwCursorSelOverFlags::SELOVER_CHANGEPOS & eFlags )
{
- BOOL bSelTop = GetPoint()->nNode.GetIndex() <
+ sal_Bool bSelTop = GetPoint()->nNode.GetIndex() <
(( nsSwCursorSelOverFlags::SELOVER_TOGGLE & eFlags ) ? pSavePos->nNode
: GetMark()->nNode.GetIndex());
do {
// in Schleife fuer Tabelle hinter Tabelle
- ULONG nSEIdx = pPtNd->EndOfSectionIndex();
- ULONG nSttEndTbl = nSEIdx + 1; // dflt. Sel. nach unten
+ sal_uLong nSEIdx = pPtNd->EndOfSectionIndex();
+ sal_uLong nSttEndTbl = nSEIdx + 1; // dflt. Sel. nach unten
if( bSelTop ) // Sel. nach oben
nSttEndTbl = rNds[ nSEIdx ]->StartOfSectionIndex() - 1;
@@ -466,8 +467,8 @@ BOOL SwCursor::IsSelOvr( int eFlags )
{
// die lassen wir zu:
pMyNd = bSelTop
- ? rNds.GoPrevSection( &GetPoint()->nNode,TRUE,FALSE )
- : rNds.GoNextSection( &GetPoint()->nNode,TRUE,FALSE );
+ ? rNds.GoPrevSection( &GetPoint()->nNode,sal_True,sal_False )
+ : rNds.GoNextSection( &GetPoint()->nNode,sal_True,sal_False );
/* #i12312# Handle failure of Go{Prev|Next}Section */
if ( 0 == pMyNd)
@@ -479,7 +480,7 @@ BOOL SwCursor::IsSelOvr( int eFlags )
if( pMyNd->IsCntntNode() && // ist es ein ContentNode ??
::CheckNodesRange( GetMark()->nNode,
- GetPoint()->nNode, TRUE ))
+ GetPoint()->nNode, sal_True ))
{
// TABLE IN TABLE
const SwTableNode* pOuterTableNd = pMyNd->FindTableNode();
@@ -490,21 +491,21 @@ BOOL SwCursor::IsSelOvr( int eFlags )
SwCntntNode* pCNd = (SwCntntNode*)pMyNd;
xub_StrLen nTmpPos = bSelTop ? pCNd->Len() : 0;
GetPoint()->nContent.Assign( pCNd, nTmpPos );
- return FALSE;
+ return sal_False;
}
}
if( bSelTop
? ( !pMyNd->IsEndNode() || 0 == ( pPtNd = pMyNd->FindTableNode() ))
: 0 == ( pPtNd = pMyNd->GetTableNode() ))
break;
- } while( TRUE );
+ } while( sal_True );
}
// dann verbleibe auf der alten Position
RestoreSavePos();
- return TRUE; // Crsr bleibt an der alten Position
+ return sal_True; // Crsr bleibt an der alten Position
}
- return FALSE; // was bleibt noch ??
+ return sal_False; // was bleibt noch ??
}
#if defined( UNX )
@@ -514,20 +515,20 @@ BOOL SwCursor::IsSelOvr( int eFlags )
#endif
-BOOL SwCursor::IsInProtectTable( BOOL bMove, BOOL bChgCrsr )
+sal_Bool SwCursor::IsInProtectTable( sal_Bool bMove, sal_Bool bChgCrsr )
{
SwCntntNode* pCNd = GetCntntNode();
if( !pCNd )
- return FALSE;
+ return sal_False;
// No table, no protected cell:
const SwTableNode* pTableNode = pCNd->FindTableNode();
if ( !pTableNode )
- return FALSE;
+ return sal_False;
// Current position == last save position?
if ( pSavePos->nNode == GetPoint()->nNode.GetIndex() )
- return FALSE;
+ return sal_False;
// Check for convered cell:
bool bInCoveredCell = false;
@@ -542,11 +543,11 @@ BOOL SwCursor::IsInProtectTable( BOOL bMove, BOOL bChgCrsr )
{
// Position not protected?
if ( !pCNd->IsProtect() )
- return FALSE;
+ return sal_False;
// Cursor in protected cells allowed?
if ( IsReadOnlyAvailable() )
- return FALSE;
+ return sal_False;
}
// If we reach this point, we are in a protected or covered table cell!
@@ -556,7 +557,7 @@ BOOL SwCursor::IsInProtectTable( BOOL bMove, BOOL bChgCrsr )
if( bChgCrsr )
// restore the last save position
RestoreSavePos();
- return TRUE; // Crsr bleibt an der alten Position
+ return sal_True; // Crsr bleibt an der alten Position
}
// wir stehen in einer geschuetzten TabellenZelle
@@ -573,7 +574,7 @@ BOOL SwCursor::IsInProtectTable( BOOL bMove, BOOL bChgCrsr )
#else
SwNodeIndex aCellStt( *GetNode()->FindTableBoxStartNode()->EndOfSectionNode(), 1 );
#endif
- BOOL bProt = TRUE;
+ sal_Bool bProt = sal_True;
GoNextCell:
do {
if( !IDX.GetNode().IsStartNode() )
@@ -597,7 +598,7 @@ SetNextCrsr:
if( pTmpCNd )
{
GetPoint()->nContent.Assign( pTmpCNd, 0 );
- return FALSE;
+ return sal_False;
}
return IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS );
@@ -614,12 +615,12 @@ SetNextCrsr:
#if defined( UNX )
delete pCellStt;
#endif
- return TRUE; // Crsr bleibt an der alten Position
+ return sal_True; // Crsr bleibt an der alten Position
}
else if( pNd->IsTableNode() && IDX++ )
goto GoNextCell;
- bProt = FALSE; // Index steht jetzt auf einem ContentNode
+ bProt = sal_False; // Index steht jetzt auf einem ContentNode
goto SetNextCrsr;
}
@@ -634,7 +635,7 @@ SetNextCrsr:
SwNodeIndex aCellStt( *GetNode()->FindTableBoxStartNode(), -1 );
#endif
SwNode* pNd;
- BOOL bProt = TRUE;
+ sal_Bool bProt = sal_True;
GoPrevCell:
do {
if( !( pNd = &IDX.GetNode())->IsEndNode() )
@@ -658,7 +659,7 @@ SetPrevCrsr:
if( pTmpCNd )
{
GetPoint()->nContent.Assign( pTmpCNd, 0 );
- return FALSE;
+ return sal_False;
}
return IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS );
@@ -674,18 +675,18 @@ SetPrevCrsr:
#if defined( UNX )
delete pCellStt;
#endif
- return TRUE; // Crsr bleibt an der alten Position
+ return sal_True; // Crsr bleibt an der alten Position
}
else if( pNd->StartOfSectionNode()->IsTableNode() && IDX-- )
goto GoPrevCell;
- bProt = FALSE; // Index steht jetzt auf einem ContentNode
+ bProt = sal_False; // Index steht jetzt auf einem ContentNode
goto SetPrevCrsr;
}
}
-// TRUE: an die Position kann der Cursor gesetzt werden
-BOOL SwCursor::IsAtValidPos( BOOL bPoint ) const
+// sal_True: an die Position kann der Cursor gesetzt werden
+sal_Bool SwCursor::IsAtValidPos( sal_Bool bPoint ) const
{
const SwDoc* pDoc = GetDoc();
const SwPosition* pPos = bPoint ? GetPoint() : GetMark();
@@ -694,23 +695,23 @@ BOOL SwCursor::IsAtValidPos( BOOL bPoint ) const
if( pNd->IsCntntNode() && !((SwCntntNode*)pNd)->GetFrm() &&
!dynamic_cast<const SwUnoCrsr*>(this) )
{
- return FALSE;
+ return sal_False;
}
//JP 28.10.97: Bug 45129 - im UI-ReadOnly ist alles erlaubt
if( !pDoc->GetDocShell() || !pDoc->GetDocShell()->IsReadOnlyUI() )
- return TRUE;
+ return sal_True;
- BOOL bCrsrInReadOnly = IsReadOnlyAvailable();
+ sal_Bool bCrsrInReadOnly = IsReadOnlyAvailable();
if( !bCrsrInReadOnly && pNd->IsProtect() )
- return FALSE;
+ return sal_False;
const SwSectionNode* pSectNd = pNd->FindSectionNode();
if( pSectNd && (pSectNd->GetSection().IsHiddenFlag() ||
( !bCrsrInReadOnly && pSectNd->GetSection().IsProtectFlag() )))
- return FALSE;
+ return sal_False;
- return TRUE;
+ return sal_True;
}
void SwCursor::SaveTblBoxCntnt( const SwPosition* ) {}
@@ -732,22 +733,22 @@ SwMoveFnCollection* SwCursor::MakeFindRange( SwDocPositions nStart,
}
-ULONG lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurCrsr,
+sal_uLong lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurCrsr,
SwMoveFn fnMove, SwCursor*& pFndRing,
SwPaM& aRegion, FindRanges eFndRngs,
- BOOL bInReadOnly, BOOL& bCancel )
+ sal_Bool bInReadOnly, sal_Bool& bCancel )
{
SwDoc* pDoc = pCurCrsr->GetDoc();
- BOOL bDoesUndo = pDoc->DoesUndo();
+ bool const bDoesUndo = pDoc->GetIDocumentUndoRedo().DoesUndo();
int nFndRet = 0;
- ULONG nFound = 0;
- int bSrchBkwrd = fnMove == fnMoveBackward, bEnde = FALSE;
+ sal_uLong nFound = 0;
+ int bSrchBkwrd = fnMove == fnMoveBackward, bEnde = sal_False;
SwPaM *pTmpCrsr = pCurCrsr, *pSaveCrsr = pCurCrsr;
// only create progress-bar for ShellCrsr
bool bIsUnoCrsr = 0 != dynamic_cast<SwUnoCrsr*>(pCurCrsr);
_PercentHdl* pPHdl = 0;
- USHORT nCrsrCnt = 0;
+ sal_uInt16 nCrsrCnt = 0;
if( FND_IN_SEL & eFndRngs )
{
while( pCurCrsr != ( pTmpCrsr = (SwPaM*)pTmpCrsr->GetNext() ))
@@ -797,25 +798,26 @@ ULONG lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurCrsr,
if( !( eFndRngs & FND_IN_SELALL) )
{
- bEnde = TRUE;
+ bEnde = sal_True;
break;
}
- if( coSrchRplcThreshold == nFound && pDoc->DoesUndo()
+ if ((coSrchRplcThreshold == nFound)
+ && pDoc->GetIDocumentUndoRedo().DoesUndo()
&& rParas.IsReplaceMode())
{
short nRet = pCurCrsr->MaxReplaceArived();
if( RET_YES == nRet )
{
- pDoc->DelAllUndoObj();
- pDoc->DoUndo( FALSE );
+ pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
+ pDoc->GetIDocumentUndoRedo().DoUndo(false);
}
else
{
- bEnde = TRUE;
+ bEnde = sal_True;
if(RET_CANCEL == nRet)
{
- bCancel = TRUE;
+ bCancel = sal_True;
//unwind() ??
}
break;
@@ -853,7 +855,7 @@ ULONG lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurCrsr,
pFndRing = pCurCrsr->Create();
delete pPHdl;
- pDoc->DoUndo( bDoesUndo );
+ pDoc->GetIDocumentUndoRedo().DoUndo(bDoesUndo);
return nFound;
}
@@ -862,7 +864,7 @@ int lcl_MakeSelFwrd( const SwNode& rSttNd, const SwNode& rEndNd,
SwPaM& rPam, int bFirst )
{
if( rSttNd.GetIndex() + 1 == rEndNd.GetIndex() )
- return FALSE;
+ return sal_False;
SwNodes& rNds = rPam.GetDoc()->GetNodes();
rPam.DeleteMark();
@@ -872,18 +874,18 @@ int lcl_MakeSelFwrd( const SwNode& rSttNd, const SwNode& rEndNd,
rPam.GetPoint()->nNode = rSttNd;
pCNd = rNds.GoNext( &rPam.GetPoint()->nNode );
if( !pCNd )
- return FALSE;
+ return sal_False;
pCNd->MakeStartIndex( &rPam.GetPoint()->nContent );
}
else if( rSttNd.GetIndex() > rPam.GetPoint()->nNode.GetIndex() ||
rPam.GetPoint()->nNode.GetIndex() >= rEndNd.GetIndex() )
- return FALSE; // steht nicht in dieser Section
+ return sal_False; // steht nicht in dieser Section
rPam.SetMark();
rPam.GetPoint()->nNode = rEndNd;
pCNd = rNds.GoPrevious( &rPam.GetPoint()->nNode );
if( !pCNd )
- return FALSE;
+ return sal_False;
pCNd->MakeEndIndex( &rPam.GetPoint()->nContent );
return *rPam.GetMark() < *rPam.GetPoint();
@@ -894,7 +896,7 @@ int lcl_MakeSelBkwrd( const SwNode& rSttNd, const SwNode& rEndNd,
SwPaM& rPam, int bFirst )
{
if( rEndNd.GetIndex() + 1 == rSttNd.GetIndex() )
- return FALSE;
+ return sal_False;
SwNodes& rNds = rPam.GetDoc()->GetNodes();
rPam.DeleteMark();
@@ -904,18 +906,18 @@ int lcl_MakeSelBkwrd( const SwNode& rSttNd, const SwNode& rEndNd,
rPam.GetPoint()->nNode = rSttNd;
pCNd = rNds.GoPrevious( &rPam.GetPoint()->nNode );
if( !pCNd )
- return FALSE;
+ return sal_False;
pCNd->MakeEndIndex( &rPam.GetPoint()->nContent );
}
else if( rEndNd.GetIndex() > rPam.GetPoint()->nNode.GetIndex() ||
rPam.GetPoint()->nNode.GetIndex() >= rSttNd.GetIndex() )
- return FALSE; // steht nicht in dieser Section
+ return sal_False; // steht nicht in dieser Section
rPam.SetMark();
rPam.GetPoint()->nNode = rEndNd;
pCNd = rNds.GoNext( &rPam.GetPoint()->nNode );
if( !pCNd )
- return FALSE;
+ return sal_False;
pCNd->MakeStartIndex( &rPam.GetPoint()->nContent );
return *rPam.GetPoint() < *rPam.GetMark();
@@ -925,20 +927,20 @@ int lcl_MakeSelBkwrd( const SwNode& rSttNd, const SwNode& rEndNd,
// diese Methode "sucht" fuer alle Anwendungsfaelle, denn in SwFindParas
// steht immer die richtigen Parameter und die entsprechende Find-Methode
-ULONG SwCursor::FindAll( SwFindParas& rParas,
+sal_uLong SwCursor::FindAll( SwFindParas& rParas,
SwDocPositions nStart, SwDocPositions nEnde,
- FindRanges eFndRngs, BOOL& bCancel )
+ FindRanges eFndRngs, sal_Bool& bCancel )
{
- bCancel = FALSE;
+ bCancel = sal_False;
SwCrsrSaveState aSaveState( *this );
// Region erzeugen, ohne das diese in den Ring aufgenommen wird !
SwPaM aRegion( *GetPoint() );
SwMoveFn fnMove = MakeFindRange( nStart, nEnde, &aRegion );
- ULONG nFound = 0;
+ sal_uLong nFound = 0;
int bMvBkwrd = fnMove == fnMoveBackward;
- BOOL bInReadOnly = IsReadOnlyAvailable();
+ sal_Bool bInReadOnly = IsReadOnlyAvailable();
SwCursor* pFndRing = 0;
SwNodes& rNds = GetDoc()->GetNodes();
@@ -1034,8 +1036,8 @@ ULONG SwCursor::FindAll( SwFindParas& rParas,
: rNds.GetEndOfPostIts().StartOfSectionNode();
if( bMvBkwrd
- ? lcl_MakeSelBkwrd( rNds.GetEndOfContent(), *pSttNd,*this, FALSE )
- : lcl_MakeSelFwrd( *pSttNd, rNds.GetEndOfContent(), *this, FALSE ))
+ ? lcl_MakeSelBkwrd( rNds.GetEndOfContent(), *pSttNd,*this, sal_False )
+ : lcl_MakeSelFwrd( *pSttNd, rNds.GetEndOfContent(), *this, sal_False ))
{
nFound = lcl_FindSelection( rParas, this, fnMove, pFndRing,
aRegion, eFndRngs, bInReadOnly, bCancel );
@@ -1090,7 +1092,7 @@ ULONG SwCursor::FindAll( SwFindParas& rParas,
void SwCursor::FillFindPos( SwDocPositions ePos, SwPosition& rPos ) const
{
- BOOL bIsStart = TRUE;
+ sal_Bool bIsStart = sal_True;
SwCntntNode* pCNd = 0;
SwNodes& rNds = GetDoc()->GetNodes();
@@ -1104,18 +1106,18 @@ void SwCursor::FillFindPos( SwDocPositions ePos, SwPosition& rPos ) const
case DOCPOS_END:
rPos.nNode = rNds.GetEndOfContent();
pCNd = rNds.GoPrevious( &rPos.nNode );
- bIsStart = FALSE;
+ bIsStart = sal_False;
break;
case DOCPOS_OTHERSTART:
- rPos.nNode = *rNds[ ULONG(0) ];
+ rPos.nNode = *rNds[ sal_uLong(0) ];
pCNd = rNds.GoNext( &rPos.nNode );
break;
case DOCPOS_OTHEREND:
rPos.nNode = *rNds.GetEndOfContent().StartOfSectionNode();
pCNd = rNds.GoPrevious( &rPos.nNode );
- bIsStart = FALSE;
+ bIsStart = sal_False;
break;
// case DOCPOS_CURR:
@@ -1138,49 +1140,49 @@ short SwCursor::MaxReplaceArived()
}
-BOOL SwCursor::IsStartWord( sal_Int16 nWordType ) const
+sal_Bool SwCursor::IsStartWord( sal_Int16 nWordType ) const
{
return IsStartWordWT( nWordType );
}
-BOOL SwCursor::IsEndWord( sal_Int16 nWordType ) const
+sal_Bool SwCursor::IsEndWord( sal_Int16 nWordType ) const
{
return IsEndWordWT( nWordType );
}
-BOOL SwCursor::IsInWord( sal_Int16 nWordType ) const
+sal_Bool SwCursor::IsInWord( sal_Int16 nWordType ) const
{
return IsInWordWT( nWordType );
}
-BOOL SwCursor::GoStartWord()
+sal_Bool SwCursor::GoStartWord()
{
return GoStartWordWT( WordType::ANYWORD_IGNOREWHITESPACES );
}
-BOOL SwCursor::GoEndWord()
+sal_Bool SwCursor::GoEndWord()
{
return GoEndWordWT( WordType::ANYWORD_IGNOREWHITESPACES );
}
-BOOL SwCursor::GoNextWord()
+sal_Bool SwCursor::GoNextWord()
{
return GoNextWordWT( WordType::ANYWORD_IGNOREWHITESPACES );
}
-BOOL SwCursor::GoPrevWord()
+sal_Bool SwCursor::GoPrevWord()
{
return GoPrevWordWT( WordType::ANYWORD_IGNOREWHITESPACES );
}
-BOOL SwCursor::SelectWord( const Point* pPt )
+sal_Bool SwCursor::SelectWord( const Point* pPt )
{
return SelectWordWT( WordType::ANYWORD_IGNOREWHITESPACES, pPt );
}
-BOOL SwCursor::IsStartWordWT( sal_Int16 nWordType ) const
+sal_Bool SwCursor::IsStartWordWT( sal_Int16 nWordType ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
@@ -1193,9 +1195,9 @@ BOOL SwCursor::IsStartWordWT( sal_Int16 nWordType ) const
return bRet;
}
-BOOL SwCursor::IsEndWordWT( sal_Int16 nWordType ) const
+sal_Bool SwCursor::IsEndWordWT( sal_Int16 nWordType ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
@@ -1209,9 +1211,9 @@ BOOL SwCursor::IsEndWordWT( sal_Int16 nWordType ) const
return bRet;
}
-BOOL SwCursor::IsInWordWT( sal_Int16 nWordType ) const
+sal_Bool SwCursor::IsInWordWT( sal_Int16 nWordType ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
@@ -1220,7 +1222,7 @@ BOOL SwCursor::IsInWordWT( sal_Int16 nWordType ) const
pTxtNd->GetTxt(), nPtPos,
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
nWordType,
- TRUE );
+ sal_True );
bRet = aBoundary.startPos != aBoundary.endPos &&
aBoundary.startPos <= nPtPos &&
@@ -1234,9 +1236,9 @@ BOOL SwCursor::IsInWordWT( sal_Int16 nWordType ) const
return bRet;
}
-BOOL SwCursor::IsStartEndSentence( bool bEnd ) const
+sal_Bool SwCursor::IsStartEndSentence( bool bEnd ) const
{
- BOOL bRet = bEnd ?
+ sal_Bool bRet = bEnd ?
GetCntntNode() && GetPoint()->nContent == GetCntntNode()->Len() :
GetPoint()->nContent.GetIndex() == 0;
@@ -1251,9 +1253,9 @@ BOOL SwCursor::IsStartEndSentence( bool bEnd ) const
return bRet;
}
-BOOL SwCursor::GoStartWordWT( sal_Int16 nWordType )
+sal_Bool SwCursor::GoStartWordWT( sal_Int16 nWordType )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
@@ -1263,21 +1265,21 @@ BOOL SwCursor::GoStartWordWT( sal_Int16 nWordType )
pTxtNd->GetTxt(), nPtPos,
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
nWordType,
- FALSE ).startPos;
+ sal_False ).startPos;
if( nPtPos < pTxtNd->GetTxt().Len() )
{
GetPoint()->nContent = nPtPos;
if( !IsSelOvr() )
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
}
-BOOL SwCursor::GoEndWordWT( sal_Int16 nWordType )
+sal_Bool SwCursor::GoEndWordWT( sal_Int16 nWordType )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
@@ -1287,22 +1289,22 @@ BOOL SwCursor::GoEndWordWT( sal_Int16 nWordType )
pTxtNd->GetTxt(), nPtPos,
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
nWordType,
- TRUE ).endPos;
+ sal_True ).endPos;
if( nPtPos <= pTxtNd->GetTxt().Len() &&
GetPoint()->nContent.GetIndex() != nPtPos )
{
GetPoint()->nContent = nPtPos;
if( !IsSelOvr() )
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
}
-BOOL SwCursor::GoNextWordWT( sal_Int16 nWordType )
+sal_Bool SwCursor::GoNextWordWT( sal_Int16 nWordType )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
@@ -1318,15 +1320,15 @@ BOOL SwCursor::GoNextWordWT( sal_Int16 nWordType )
{
GetPoint()->nContent = nPtPos;
if( !IsSelOvr() )
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
}
-BOOL SwCursor::GoPrevWordWT( sal_Int16 nWordType )
+sal_Bool SwCursor::GoPrevWordWT( sal_Int16 nWordType )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
@@ -1345,18 +1347,18 @@ BOOL SwCursor::GoPrevWordWT( sal_Int16 nWordType )
{
GetPoint()->nContent = nPtPos;
if( !IsSelOvr() )
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
}
-BOOL SwCursor::SelectWordWT( sal_Int16 nWordType, const Point* pPt )
+sal_Bool SwCursor::SelectWordWT( sal_Int16 nWordType, const Point* pPt )
{
SwCrsrSaveState aSave( *this );
- BOOL bRet = FALSE;
- BOOL bForward = TRUE;
+ sal_Bool bRet = sal_False;
+ sal_Bool bForward = sal_True;
DeleteMark();
SwRootFrm* pLayout;
if( pPt && 0 != (pLayout = GetDoc()->GetRootFrm()) )
@@ -1388,7 +1390,7 @@ BOOL SwCursor::SelectWordWT( sal_Int16 nWordType, const Point* pPt )
GetMark()->nContent = rEnd.nContent;
GetMark()->nContent--; //Don't select the end delimiter
}
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -1407,7 +1409,7 @@ BOOL SwCursor::SelectWordWT( sal_Int16 nWordType, const Point* pPt )
SetMark();
GetMark()->nContent = (xub_StrLen)aBndry.startPos;
if( !IsSelOvr() )
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -1434,7 +1436,7 @@ static String lcl_MaskDeletedRedlines( const SwTxtNode* pTxtNd )
const bool nShowChg = IDocumentRedlineAccess::IsShowChanges( rDoc.GetRedlineMode() );
if ( nShowChg )
{
- USHORT nAct = rDoc.GetRedlinePos( *pTxtNd, USHRT_MAX );
+ sal_uInt16 nAct = rDoc.GetRedlinePos( *pTxtNd, USHRT_MAX );
for ( ; nAct < rDoc.GetRedlineTbl().Count(); nAct++ )
{
const SwRedline* pRed = rDoc.GetRedlineTbl()[ nAct ];
@@ -1456,9 +1458,9 @@ static String lcl_MaskDeletedRedlines( const SwTxtNode* pTxtNd )
return aRes;
}
-BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
+sal_Bool SwCursor::GoSentence( SentenceMoveType eMoveType )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
if( pTxtNd && pBreakIt->GetBreakIter().is() )
{
@@ -1486,7 +1488,7 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
sNodeText,
nPtPos, pBreakIt->GetLocale(
pTxtNd->GetLang( nPtPos ) ));
- while (nPtPos != (USHORT) -1 && ++nPtPos < sNodeText.Len()
+ while (nPtPos != (sal_uInt16) -1 && ++nPtPos < sNodeText.Len()
&& sNodeText.GetChar(nPtPos)== ' ' /*isWhiteSpace( aTxt.GetChar(nPtPos)*/ )
;
break;
@@ -1497,7 +1499,7 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
nPtPos, pBreakIt->GetLocale(
pTxtNd->GetLang( nPtPos ) ));
if (nPtPos == 0)
- return FALSE; // the previous sentence is not in this paragraph
+ return sal_False; // the previous sentence is not in this paragraph
if (nPtPos > 0)
nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence(
sNodeText,
@@ -1512,16 +1514,16 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
{
GetPoint()->nContent = nPtPos;
if( !IsSelOvr() )
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
}
-BOOL SwCursor::ExpandToSentenceBorders()
+sal_Bool SwCursor::ExpandToSentenceBorders()
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
const SwTxtNode* pStartNd = Start()->nNode.GetNode().GetTxtNode();
const SwTxtNode* pEndNd = End()->nNode.GetNode().GetTxtNode();
if (pStartNd && pEndNd && pBreakIt->GetBreakIter().is())
@@ -1557,14 +1559,14 @@ BOOL SwCursor::ExpandToSentenceBorders()
bChanged = true;
}
if (bChanged && !IsSelOvr())
- bRes = TRUE;
+ bRes = sal_True;
}
return bRes;
}
-BOOL SwTableCursor::LeftRight( BOOL bLeft, USHORT nCnt, USHORT /*nMode*/,
- BOOL /*bVisualAllowed*/, BOOL /*bSkipHidden*/, BOOL /*bInsertCrsr*/ )
+sal_Bool SwTableCursor::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 /*nMode*/,
+ sal_Bool /*bVisualAllowed*/, sal_Bool /*bSkipHidden*/, sal_Bool /*bInsertCrsr*/ )
{
return bLeft ? GoPrevCell( nCnt )
: GoNextCell( nCnt );
@@ -1574,7 +1576,7 @@ BOOL SwTableCursor::LeftRight( BOOL bLeft, USHORT nCnt, USHORT /*nMode*/,
// calculate cursor bidi level: extracted from LeftRight()
const SwCntntFrm*
SwCursor::DoSetBidiLevelLeftRight(
- BOOL & io_rbLeft, BOOL bVisualAllowed, BOOL bInsertCrsr)
+ sal_Bool & io_rbLeft, sal_Bool bVisualAllowed, sal_Bool bInsertCrsr)
{
// calculate cursor bidi level
const SwCntntFrm* pSttFrm = NULL;
@@ -1597,7 +1599,7 @@ SwCursor::DoSetBidiLevelLeftRight(
pSttFrm = rTNd.GetFrm( &aPt, GetPoint() );
if( pSttFrm )
{
- BYTE nCrsrLevel = GetCrsrBidiLevel();
+ sal_uInt8 nCrsrLevel = GetCrsrBidiLevel();
sal_Bool bForward = ! io_rbLeft;
((SwTxtFrm*)pSttFrm)->PrepareVisualMove( nPos, nCrsrLevel,
bForward, bInsertCrsr );
@@ -1621,8 +1623,8 @@ SwCursor::DoSetBidiLevelLeftRight(
return pSttFrm;
}
-BOOL SwCursor::LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
- BOOL bVisualAllowed,BOOL bSkipHidden, BOOL bInsertCrsr )
+sal_Bool SwCursor::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
+ sal_Bool bVisualAllowed,sal_Bool bSkipHidden, sal_Bool bInsertCrsr )
{
// calculate cursor bidi level
SwNode& rNode = GetPoint()->nNode.GetNode();
@@ -1672,12 +1674,12 @@ BOOL SwCursor::LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
const long nRowSpan = pTableBox->getRowSpan();
if ( nRowSpan > 1 )
{
- pTableBox = & pTableBox->FindEndOfRowSpan( pOldTabSttNode->GetTable(), (USHORT)(pTableBox->getRowSpan() + mnRowSpanOffset ) );
+ pTableBox = & pTableBox->FindEndOfRowSpan( pOldTabSttNode->GetTable(), (sal_uInt16)(pTableBox->getRowSpan() + mnRowSpanOffset ) );
SwNodeIndex& rPtIdx = GetPoint()->nNode;
SwNodeIndex aNewIdx( *pTableBox->GetSttNd() );
rPtIdx = aNewIdx;
- GetDoc()->GetNodes().GoNextSection( &rPtIdx, FALSE, FALSE );
+ GetDoc()->GetNodes().GoNextSection( &rPtIdx, sal_False, sal_False );
SwCntntNode* pCntntNode = GetCntntNode();
if ( pCntntNode )
{
@@ -1713,7 +1715,7 @@ BOOL SwCursor::LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
SwNodeIndex aNewIdx( *pTableBox->GetSttNd() );
rPtIdx = aNewIdx;
- GetDoc()->GetNodes().GoNextSection( &rPtIdx, FALSE, FALSE );
+ GetDoc()->GetNodes().GoNextSection( &rPtIdx, sal_False, sal_False );
SwCntntNode* pCntntNode = GetCntntNode();
if ( pCntntNode )
{
@@ -1747,7 +1749,7 @@ BOOL SwCursor::LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
}
}
- return 0 == nCnt && !IsInProtectTable( TRUE ) &&
+ return 0 == nCnt && !IsInProtectTable( sal_True ) &&
!IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS );
}
@@ -1767,8 +1769,8 @@ void SwCursor::DoSetBidiLevelUpDown()
if( nPos && nPos < ((SwTxtNode&)rNode).GetTxt().Len() )
{
- const BYTE nCurrLevel = pSI->DirType( nPos );
- const BYTE nPrevLevel = pSI->DirType( nPos - 1 );
+ const sal_uInt8 nCurrLevel = pSI->DirType( nPos );
+ const sal_uInt8 nPrevLevel = pSI->DirType( nPos - 1 );
if ( nCurrLevel % 2 != nPrevLevel % 2 )
{
@@ -1782,7 +1784,7 @@ void SwCursor::DoSetBidiLevelUpDown()
}
}
-BOOL SwCursor::UpDown( BOOL bUp, USHORT nCnt,
+sal_Bool SwCursor::UpDown( sal_Bool bUp, sal_uInt16 nCnt,
Point* pPt, long nUpDownX )
{
SwTableCursor* pTblCrsr = dynamic_cast<SwTableCursor*>(this);
@@ -1790,15 +1792,15 @@ BOOL SwCursor::UpDown( BOOL bUp, USHORT nCnt,
// vom Tabellen Crsr Point/Mark in der gleichen Box ??
// dann stelle den Point an den Anfang der Box
- if( pTblCrsr && GetNode( TRUE )->StartOfSectionNode() ==
- GetNode( FALSE )->StartOfSectionNode() )
+ if( pTblCrsr && GetNode( sal_True )->StartOfSectionNode() ==
+ GetNode( sal_False )->StartOfSectionNode() )
{
if ( End() != GetPoint() )
Exchange();
bAdjustTableCrsr = sal_True;
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
Point aPt;
if( pPt )
aPt = *pPt;
@@ -1821,10 +1823,10 @@ BOOL SwCursor::UpDown( BOOL bUp, USHORT nCnt,
// Bei Fussnoten ist auch die Bewegung in eine andere Fussnote erlaubt.
// aber keine Selection!!
- const BOOL bChkRange = pFrm->IsInFtn() && !HasMark()
- ? FALSE : TRUE;
+ const sal_Bool bChkRange = pFrm->IsInFtn() && !HasMark()
+ ? sal_False : sal_True;
const SwPosition aOldPos( *GetPoint() );
- BOOL bInReadOnly = IsReadOnlyAvailable();
+ sal_Bool bInReadOnly = IsReadOnlyAvailable();
if ( bAdjustTableCrsr && !bUp )
{
@@ -1832,7 +1834,7 @@ BOOL SwCursor::UpDown( BOOL bUp, USHORT nCnt,
// has more than one paragraph. If we want to go down, we have to
// set the point to the last frame in the table box. This is
// only necessary if we do not already have a table selection
- const SwStartNode* pTblNd = GetNode( TRUE )->FindTableBoxStartNode();
+ const SwStartNode* pTblNd = GetNode( sal_True )->FindTableBoxStartNode();
OSL_ENSURE( pTblNd, "pTblCrsr without SwTableNode?" );
if ( pTblNd ) // safety first
@@ -1879,7 +1881,7 @@ BOOL SwCursor::UpDown( BOOL bUp, USHORT nCnt,
}
pFrm->GetCrsrOfst( GetPoint(), aPt, &eTmpState );
}
- bRet = TRUE;
+ bRet = sal_True;
}
else
*GetPoint() = aOldPos;
@@ -1890,7 +1892,7 @@ BOOL SwCursor::UpDown( BOOL bUp, USHORT nCnt,
return bRet;
}
-BOOL SwCursor::LeftRightMargin( BOOL bLeft, BOOL bAPI )
+sal_Bool SwCursor::LeftRightMargin( sal_Bool bLeft, sal_Bool bAPI )
{
Point aPt;
SwCntntFrm * pFrm = GetCntntNode()->GetFrm( &aPt, GetPoint() );
@@ -1903,9 +1905,9 @@ BOOL SwCursor::LeftRightMargin( BOOL bLeft, BOOL bAPI )
pFrm->RightMargin( this, bAPI ) );
}
-BOOL SwCursor::IsAtLeftRightMargin( BOOL bLeft, BOOL bAPI ) const
+sal_Bool SwCursor::IsAtLeftRightMargin( sal_Bool bLeft, sal_Bool bAPI ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
Point aPt;
SwCntntFrm * pFrm = GetCntntNode()->GetFrm( &aPt, GetPoint() );
if( pFrm )
@@ -1920,16 +1922,16 @@ BOOL SwCursor::IsAtLeftRightMargin( BOOL bLeft, BOOL bAPI ) const
return bRet;
}
-BOOL SwCursor::SttEndDoc( BOOL bStt )
+sal_Bool SwCursor::SttEndDoc( sal_Bool bStt )
{
SwCrsrSaveState aSave( *this );
// Springe beim Selektieren nie ueber Section-Grenzen !!
// kann der Cursor weiterverschoben werden ?
SwMoveFn fnMove = bStt ? fnMoveBackward : fnMoveForward;
- BOOL bRet = (!HasMark() || !IsNoCntnt() ) &&
+ sal_Bool bRet = (!HasMark() || !IsNoCntnt() ) &&
Move( fnMove, fnGoDoc ) &&
- !IsInProtectTable( TRUE ) &&
+ !IsInProtectTable( sal_True ) &&
!IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS |
nsSwCursorSelOverFlags::SELOVER_ENABLEREVDIREKTION );
@@ -1937,11 +1939,11 @@ BOOL SwCursor::SttEndDoc( BOOL bStt )
return bRet;
}
-BOOL SwCursor::GoPrevNextCell( BOOL bNext, USHORT nCnt )
+sal_Bool SwCursor::GoPrevNextCell( sal_Bool bNext, sal_uInt16 nCnt )
{
const SwTableNode* pTblNd = GetPoint()->nNode.GetNode().FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// liegt vor dem StartNode der Cell ein weiterer EndNode, dann
// gibt es auch eine vorherige Celle
@@ -1959,7 +1961,7 @@ BOOL SwCursor::GoPrevNextCell( BOOL bNext, USHORT nCnt )
{
if ( pTableBox->getRowSpan() > 1 )
{
- pTableBox = & pTableBox->FindEndOfRowSpan( pTblNd->GetTable(), (USHORT)(pTableBox->getRowSpan() + mnRowSpanOffset) );
+ pTableBox = & pTableBox->FindEndOfRowSpan( pTblNd->GetTable(), (sal_uInt16)(pTableBox->getRowSpan() + mnRowSpanOffset) );
SwNodeIndex aNewIdx( *pTableBox->GetSttNd() );
rPtIdx = aNewIdx;
pTableBoxStartNode = rPtIdx.GetNode().FindTableBoxStartNode();
@@ -1974,7 +1976,7 @@ BOOL SwCursor::GoPrevNextCell( BOOL bNext, USHORT nCnt )
SwNodeIndex aCellIdx( *pTmpNode, bNext ? 1 : -1 );
if( (bNext && !aCellIdx.GetNode().IsStartNode()) ||
(!bNext && !aCellIdx.GetNode().IsEndNode()) )
- return FALSE;
+ return sal_False;
rPtIdx = bNext ? aCellIdx : SwNodeIndex(*aCellIdx.GetNode().StartOfSectionNode());
@@ -1992,20 +1994,20 @@ BOOL SwCursor::GoPrevNextCell( BOOL bNext, USHORT nCnt )
rPtIdx++;
if( !rPtIdx.GetNode().IsCntntNode() )
- GetDoc()->GetNodes().GoNextSection( &rPtIdx, TRUE, FALSE );
+ GetDoc()->GetNodes().GoNextSection( &rPtIdx, sal_True, sal_False );
GetPoint()->nContent.Assign( GetCntntNode(), 0 );
- return !IsInProtectTable( TRUE );
+ return !IsInProtectTable( sal_True );
}
-BOOL SwTableCursor::GotoTable( const String& /*rName*/ )
+sal_Bool SwTableCursor::GotoTable( const String& /*rName*/ )
{
- return FALSE; // invalid action
+ return sal_False; // invalid action
}
-BOOL SwCursor::GotoTable( const String& rName )
+sal_Bool SwCursor::GotoTable( const String& rName )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( !HasMark() )
{
SwTable* pTmpTbl = SwTable::FindTable( GetDoc()->FindTblFmtByName( rName ) );
@@ -2022,9 +2024,9 @@ BOOL SwCursor::GotoTable( const String& rName )
return bRet;
}
-BOOL SwCursor::GotoTblBox( const String& rName )
+sal_Bool SwCursor::GotoTblBox( const String& rName )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTableNode* pTblNd = GetPoint()->nNode.GetNode().FindTableNode();
if( pTblNd )
{
@@ -2043,7 +2045,7 @@ BOOL SwCursor::GotoTblBox( const String& rName )
return bRet;
}
-BOOL SwCursor::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara )
+sal_Bool SwCursor::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara )
{
//for optimization test something before
const SwNode* pNd = &GetPoint()->nNode.GetNode();
@@ -2078,18 +2080,18 @@ BOOL SwCursor::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara )
// a same node type.
SwCrsrSaveState aSave( *this );
return (*fnWhichPara)( *this, fnPosPara ) &&
- !IsInProtectTable( TRUE ) &&
+ !IsInProtectTable( sal_True ) &&
!IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS );
}
-BOOL SwCursor::MoveSection( SwWhichSection fnWhichSect,
+sal_Bool SwCursor::MoveSection( SwWhichSection fnWhichSect,
SwPosSection fnPosSect)
{
SwCrsrSaveState aSave( *this );
return (*fnWhichSect)( *this, fnPosSect ) &&
- !IsInProtectTable( TRUE ) &&
+ !IsInProtectTable( sal_True ) &&
!IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS );
}
@@ -2109,8 +2111,8 @@ void SwCursor::RestoreSavePos()
SwTableCursor::SwTableCursor( const SwPosition &rPos, SwPaM* pRing )
: SwCursor( rPos, pRing, false )
{
- bParked = FALSE;
- bChg = FALSE;
+ bParked = sal_False;
+ bChg = sal_False;
nTblPtNd = 0, nTblMkNd = 0;
nTblPtCnt = 0, nTblMkCnt = 0;
}
@@ -2118,32 +2120,32 @@ SwTableCursor::SwTableCursor( const SwPosition &rPos, SwPaM* pRing )
SwTableCursor::~SwTableCursor() {}
-BOOL lcl_SeekEntry( const SwSelBoxes& rTmp, const SwStartNode* pSrch, USHORT& rFndPos )
+sal_Bool lcl_SeekEntry( const SwSelBoxes& rTmp, const SwStartNode* pSrch, sal_uInt16& rFndPos )
{
- ULONG nIdx = pSrch->GetIndex();
+ sal_uLong nIdx = pSrch->GetIndex();
- USHORT nO = rTmp.Count();
+ sal_uInt16 nO = rTmp.Count();
if( nO > 0 )
{
nO--;
- USHORT nU = 0;
+ sal_uInt16 nU = 0;
while( nU <= nO )
{
- USHORT nM = nU + ( nO - nU ) / 2;
+ sal_uInt16 nM = nU + ( nO - nU ) / 2;
if( rTmp[ nM ]->GetSttNd() == pSrch )
{
rFndPos = nM;
- return TRUE;
+ return sal_True;
}
else if( rTmp[ nM ]->GetSttIdx() < nIdx )
nU = nM + 1;
else if( nM == 0 )
- return FALSE;
+ return sal_False;
else
nO = nM - 1;
}
}
- return FALSE;
+ return sal_False;
}
@@ -2158,10 +2160,10 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
Move( fnMoveForward );
Exchange();
Move( fnMoveForward );
- bParked = FALSE;
+ bParked = sal_False;
}
- bChg = FALSE;
+ bChg = sal_False;
// temp Kopie anlegen, damit alle Boxen, fuer die schon Cursor
// existieren, entfernt werden koennen.
@@ -2170,22 +2172,22 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
//Jetzt die Alten und die neuen abgleichen.
SwNodes& rNds = pAktCrsr->GetDoc()->GetNodes();
- USHORT nPos;
+ sal_uInt16 nPos;
const SwStartNode* pSttNd;
SwPaM* pCur = pAktCrsr;
do {
- BOOL bDel = FALSE;
+ sal_Bool bDel = sal_False;
pSttNd = pCur->GetPoint()->nNode.GetNode().FindTableBoxStartNode();
if( !pCur->HasMark() || !pSttNd ||
pSttNd != pCur->GetMark()->nNode.GetNode().FindTableBoxStartNode() )
- bDel = TRUE;
+ bDel = sal_True;
else if( lcl_SeekEntry( aTmp, pSttNd, nPos ))
{
SwNodeIndex aIdx( *pSttNd, 1 );
const SwNode* pNd = &aIdx.GetNode();
if( !pNd->IsCntntNode() )
- pNd = rNds.GoNextSection( &aIdx, TRUE, FALSE );
+ pNd = rNds.GoNextSection( &aIdx, sal_True, sal_False );
SwPosition* pPos = pCur->GetMark();
if( pNd != &pPos->nNode.GetNode() )
@@ -2194,7 +2196,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
aIdx.Assign( *pSttNd->EndOfSectionNode(), - 1 );
if( !( pNd = &aIdx.GetNode())->IsCntntNode() )
- pNd = rNds.GoPrevSection( &aIdx, TRUE, FALSE );
+ pNd = rNds.GoPrevSection( &aIdx, sal_True, sal_False );
pPos = pCur->GetPoint();
if( pNd != &pPos->nNode.GetNode() )
@@ -2204,7 +2206,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
aTmp.Remove( nPos );
}
else
- bDel = TRUE;
+ bDel = sal_True;
pCur = (SwPaM*)pCur->GetNext();
if( bDel )
@@ -2227,7 +2229,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
break;
const SwNode* pNd = &aIdx.GetNode();
if( !pNd->IsCntntNode() )
- pNd = rNds.GoNextSection( &aIdx, TRUE, FALSE );
+ pNd = rNds.GoNextSection( &aIdx, sal_True, sal_False );
SwPaM* pNew;
if( pAktCrsr->GetNext() == pAktCrsr && !pAktCrsr->HasMark() )
@@ -2247,7 +2249,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
SwPosition* pPos = pNew->GetPoint();
pPos->nNode.Assign( *pSttNd->EndOfSectionNode(), - 1 );
if( !( pNd = &pPos->nNode.GetNode())->IsCntntNode() )
- pNd = rNds.GoPrevSection( &pPos->nNode, TRUE, FALSE );
+ pNd = rNds.GoPrevSection( &pPos->nNode, sal_True, sal_False );
pPos->nContent.Assign( (SwCntntNode*)pNd, ((SwCntntNode*)pNd)->Len() );
}
@@ -2260,14 +2262,14 @@ void SwTableCursor::InsertBox( const SwTableBox& rTblBox )
{
SwTableBox* pBox = (SwTableBox*)&rTblBox;
aSelBoxes.Insert( pBox );
- bChg = TRUE;
+ bChg = sal_True;
}
bool SwTableCursor::NewTableSelection()
{
bool bRet = false;
const SwNode *pStart = GetCntntNode()->FindTableBoxStartNode();
- const SwNode *pEnd = GetCntntNode(FALSE)->FindTableBoxStartNode();
+ const SwNode *pEnd = GetCntntNode(sal_False)->FindTableBoxStartNode();
if( pStart && pEnd )
{
const SwTableNode *pTableNode = pStart->FindTableNode();
@@ -2287,7 +2289,7 @@ bool SwTableCursor::NewTableSelection()
void SwTableCursor::ActualizeSelection( const SwSelBoxes &rNew )
{
- USHORT nOld = 0, nNew = 0;
+ sal_uInt16 nOld = 0, nNew = 0;
while ( nOld < aSelBoxes.Count() && nNew < rNew.Count() )
{
const SwTableBox* pPOld = *( aSelBoxes.GetData() + nOld );
@@ -2314,16 +2316,16 @@ void SwTableCursor::ActualizeSelection( const SwSelBoxes &rNew )
InsertBox( **( rNew.GetData() + nNew ) );
}
-BOOL SwTableCursor::IsCrsrMovedUpdt()
+sal_Bool SwTableCursor::IsCrsrMovedUpdt()
{
if( !IsCrsrMoved() )
- return FALSE;
+ return sal_False;
nTblMkNd = GetMark()->nNode.GetIndex();
nTblPtNd = GetPoint()->nNode.GetIndex();
nTblMkCnt = GetMark()->nContent.GetIndex();
nTblPtCnt = GetPoint()->nContent.GetIndex();
- return TRUE;
+ return sal_True;
}
@@ -2343,18 +2345,18 @@ void SwTableCursor::ParkCrsr()
GetMark()->nNode = *pNd;
GetMark()->nContent.Assign( 0, 0 );
- bChg = TRUE;
- bParked = TRUE;
+ bChg = sal_True;
+ bParked = sal_True;
}
-BOOL SwTableCursor::HasReadOnlyBoxSel() const
+sal_Bool SwTableCursor::HasReadOnlyBoxSel() const
{
- BOOL bRet = FALSE;
- for( USHORT n = aSelBoxes.Count(); n; )
+ sal_Bool bRet = sal_False;
+ for( sal_uInt16 n = aSelBoxes.Count(); n; )
if( aSelBoxes[ --n ]->GetFrmFmt()->GetProtect().IsCntntProtected() )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
return bRet;
diff --git a/sw/source/core/crsr/trvlcol.cxx b/sw/source/core/crsr/trvlcol.cxx
index 6dafd069c86c..855b2d26b495 100644
--- a/sw/source/core/crsr/trvlcol.cxx
+++ b/sw/source/core/crsr/trvlcol.cxx
@@ -92,9 +92,9 @@ SwPosColumn fnColumnStart = &GetColumnStt;
SwPosColumn fnColumnEnd = &GetColumnEnd;
-BOOL SwCrsrShell::MoveColumn( SwWhichColumn fnWhichCol, SwPosColumn fnPosCol )
+sal_Bool SwCrsrShell::MoveColumn( SwWhichColumn fnWhichCol, SwPosColumn fnPosCol )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !pTblCrsr )
{
SwLayoutFrm* pLayFrm = GetCurrFrm()->GetUpper();
@@ -118,11 +118,11 @@ BOOL SwCrsrShell::MoveColumn( SwWhichColumn fnWhichCol, SwPosColumn fnPosCol )
pCnt->GetCrsrOfst( pCurCrsr->GetPoint(), aPt );
- if( !pCurCrsr->IsInProtectTable( TRUE ) &&
+ if( !pCurCrsr->IsInProtectTable( sal_True ) &&
!pCurCrsr->IsSelOvr() )
{
UpdateCrsr();
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx
index 550717942c1f..c2ead9272ea0 100644
--- a/sw/source/core/crsr/trvlfnfl.cxx
+++ b/sw/source/core/crsr/trvlfnfl.cxx
@@ -48,21 +48,21 @@
#include <viscrs.hxx>
#include <callnk.hxx>
-BOOL SwCrsrShell::CallCrsrFN( FNCrsr fnCrsr )
+sal_Bool SwCrsrShell::CallCrsrFN( FNCrsr fnCrsr )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
SwCursor* pCrsr = getShellCrsr( true );
- BOOL bRet = (pCrsr->*fnCrsr)();
+ sal_Bool bRet = (pCrsr->*fnCrsr)();
if( bRet )
UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE |
SwCrsrShell::READONLY );
return bRet;
}
-BOOL SwCursor::GotoFtnTxt()
+sal_Bool SwCursor::GotoFtnTxt()
{
// springe aus dem Content zur Fussnote
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwTxtNode* pTxtNd = GetPoint()->nNode.GetNode().GetTxtNode();
SwTxtAttr *const pFtn( (pTxtNd)
@@ -76,7 +76,7 @@ BOOL SwCursor::GotoFtnTxt()
SwCntntNode* pCNd = GetDoc()->GetNodes().GoNextSection(
&GetPoint()->nNode,
- TRUE, !IsReadOnlyAvailable() );
+ sal_True, !IsReadOnlyAvailable() );
if( pCNd )
{
GetPoint()->nContent.Assign( pCNd, 0 );
@@ -87,9 +87,9 @@ BOOL SwCursor::GotoFtnTxt()
return bRet;
}
-BOOL SwCrsrShell::GotoFtnTxt()
+sal_Bool SwCrsrShell::GotoFtnTxt()
{
- BOOL bRet = CallCrsrFN( &SwCursor::GotoFtnTxt );
+ sal_Bool bRet = CallCrsrFN( &SwCursor::GotoFtnTxt );
if( !bRet )
{
SwTxtNode* pTxtNd = _GetCrsr() ?
@@ -135,7 +135,7 @@ BOOL SwCrsrShell::GotoFtnTxt()
}
-BOOL SwCursor::GotoFtnAnchor()
+sal_Bool SwCursor::GotoFtnAnchor()
{
// springe aus der Fussnote zum Anker
const SwNode* pSttNd = GetNode()->FindFootnoteStartNode();
@@ -144,7 +144,7 @@ BOOL SwCursor::GotoFtnAnchor()
// durchsuche alle Fussnoten im Dokument nach diesem StartIndex
const SwTxtFtn* pTxtFtn;
const SwFtnIdxs& rFtnArr = pSttNd->GetDoc()->GetFtnIdxs();
- for( USHORT n = 0; n < rFtnArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFtnArr.Count(); ++n )
if( 0 != ( pTxtFtn = rFtnArr[ n ])->GetStartNode() &&
pSttNd == &pTxtFtn->GetStartNode()->GetNode() )
{
@@ -159,14 +159,14 @@ BOOL SwCursor::GotoFtnAnchor()
nsSwCursorSelOverFlags::SELOVER_TOGGLE );
}
}
- return FALSE;
+ return sal_False;
}
-BOOL SwCrsrShell::GotoFtnAnchor()
+sal_Bool SwCrsrShell::GotoFtnAnchor()
{
// springe aus der Fussnote zum Anker
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
- BOOL bRet = pCurCrsr->GotoFtnAnchor();
+ sal_Bool bRet = pCurCrsr->GotoFtnAnchor();
if( bRet )
{
// BUG 5996: Tabellen-Kopfzeile sonderbehandeln
@@ -177,22 +177,22 @@ BOOL SwCrsrShell::GotoFtnAnchor()
return bRet;
}
-inline sal_Bool CmpLE( const SwTxtFtn& rFtn, ULONG nNd, xub_StrLen nCnt )
+inline sal_Bool CmpLE( const SwTxtFtn& rFtn, sal_uLong nNd, xub_StrLen nCnt )
{
- ULONG nTNd = rFtn.GetTxtNode().GetIndex();
+ sal_uLong nTNd = rFtn.GetTxtNode().GetIndex();
return nTNd < nNd || ( nTNd == nNd && *rFtn.GetStart() <= nCnt );
}
-inline sal_Bool CmpL( const SwTxtFtn& rFtn, ULONG nNd, xub_StrLen nCnt )
+inline sal_Bool CmpL( const SwTxtFtn& rFtn, sal_uLong nNd, xub_StrLen nCnt )
{
- ULONG nTNd = rFtn.GetTxtNode().GetIndex();
+ sal_uLong nTNd = rFtn.GetTxtNode().GetIndex();
return nTNd < nNd || ( nTNd == nNd && *rFtn.GetStart() < nCnt );
}
-BOOL SwCursor::GotoNextFtnAnchor()
+sal_Bool SwCursor::GotoNextFtnAnchor()
{
const SwFtnIdxs& rFtnArr = GetDoc()->GetFtnIdxs();
const SwTxtFtn* pTxtFtn = 0;
- USHORT nPos;
+ sal_uInt16 nPos;
if( rFtnArr.SeekEntry( GetPoint()->nNode, &nPos ))
{
@@ -200,7 +200,7 @@ BOOL SwCursor::GotoNextFtnAnchor()
// naechstgelegene
if( nPos < rFtnArr.Count() )
{
- ULONG nNdPos = GetPoint()->nNode.GetIndex();
+ sal_uLong nNdPos = GetPoint()->nNode.GetIndex();
xub_StrLen nCntPos = GetPoint()->nContent.GetIndex();
pTxtFtn = rFtnArr[ nPos ];
@@ -236,7 +236,7 @@ BOOL SwCursor::GotoNextFtnAnchor()
else if( nPos < rFtnArr.Count() )
pTxtFtn = rFtnArr[ nPos ];
- BOOL bRet = 0 != pTxtFtn;
+ sal_Bool bRet = 0 != pTxtFtn;
if( bRet )
{
SwCrsrSaveState aSaveState( *this );
@@ -249,17 +249,17 @@ BOOL SwCursor::GotoNextFtnAnchor()
return bRet;
}
-BOOL SwCursor::GotoPrevFtnAnchor()
+sal_Bool SwCursor::GotoPrevFtnAnchor()
{
const SwFtnIdxs& rFtnArr = GetDoc()->GetFtnIdxs();
const SwTxtFtn* pTxtFtn = 0;
- USHORT nPos;
+ sal_uInt16 nPos;
if( rFtnArr.SeekEntry( GetPoint()->nNode, &nPos ) )
{
// es gibt eine Fussnote mit dem Index, suche also die
// naechstgelegene
- ULONG nNdPos = GetPoint()->nNode.GetIndex();
+ sal_uLong nNdPos = GetPoint()->nNode.GetIndex();
xub_StrLen nCntPos = GetPoint()->nContent.GetIndex();
pTxtFtn = rFtnArr[ nPos ];
@@ -294,7 +294,7 @@ BOOL SwCursor::GotoPrevFtnAnchor()
else if( nPos )
pTxtFtn = rFtnArr[ nPos-1 ];
- BOOL bRet = 0 != pTxtFtn;
+ sal_Bool bRet = 0 != pTxtFtn;
if( bRet )
{
SwCrsrSaveState aSaveState( *this );
@@ -307,12 +307,12 @@ BOOL SwCursor::GotoPrevFtnAnchor()
return bRet;
}
-BOOL SwCrsrShell::GotoNextFtnAnchor()
+sal_Bool SwCrsrShell::GotoNextFtnAnchor()
{
return CallCrsrFN( &SwCursor::GotoNextFtnAnchor );
}
-BOOL SwCrsrShell::GotoPrevFtnAnchor()
+sal_Bool SwCrsrShell::GotoPrevFtnAnchor()
{
return CallCrsrFN( &SwCursor::GotoPrevFtnAnchor );
}
@@ -320,7 +320,7 @@ BOOL SwCrsrShell::GotoPrevFtnAnchor()
// springe aus dem Rahmen zum Anker
-BOOL SwCrsrShell::GotoFlyAnchor()
+sal_Bool SwCrsrShell::GotoFlyAnchor()
{
SET_CURR_SHELL( this );
const SwFrm* pFrm = GetCurrFrm();
@@ -329,7 +329,7 @@ BOOL SwCrsrShell::GotoFlyAnchor()
} while( pFrm && !pFrm->IsFlyFrm() );
if( !pFrm ) // ist kein FlyFrame
- return FALSE;
+ return sal_False;
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
SwCrsrSaveState aSaveState( *pCurCrsr );
@@ -345,10 +345,10 @@ BOOL SwCrsrShell::GotoFlyAnchor()
: pFrm->Frm().Left();
const SwPageFrm* pPageFrm = pFrm->FindPageFrm();
- const SwCntntFrm* pFndFrm = pPageFrm->GetCntntPos( aPt, FALSE, TRUE );
+ const SwCntntFrm* pFndFrm = pPageFrm->GetCntntPos( aPt, sal_False, sal_True );
pFndFrm->GetCrsrOfst( pCurCrsr->GetPoint(), aPt );
- BOOL bRet = !pCurCrsr->IsInProtectTable() && !pCurCrsr->IsSelOvr();
+ sal_Bool bRet = !pCurCrsr->IsInProtectTable() && !pCurCrsr->IsSelOvr();
if( bRet )
UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE |
SwCrsrShell::READONLY );
diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx
index a95194d53e34..25550b03958a 100644
--- a/sw/source/core/crsr/trvlreg.cxx
+++ b/sw/source/core/crsr/trvlreg.cxx
@@ -42,8 +42,8 @@
-BOOL GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
- BOOL bInReadOnly )
+sal_Bool GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
+ sal_Bool bInReadOnly )
{
SwNodeIndex aIdx( rCurCrsr.GetPoint()->nNode );
SwSectionNode* pNd = aIdx.GetNode().FindSectionNode();
@@ -68,7 +68,7 @@ BOOL GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
{
aIdx = *pNd;
SwCntntNode* pCNd = pNd->GetNodes().GoNextSection( &aIdx,
- TRUE, !bInReadOnly );
+ sal_True, !bInReadOnly );
if( !pCNd )
{
aIdx--;
@@ -80,7 +80,7 @@ BOOL GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
{
aIdx = *pNd->EndOfSectionNode();
SwCntntNode* pCNd = pNd->GetNodes().GoPrevSection( &aIdx,
- TRUE, !bInReadOnly );
+ sal_True, !bInReadOnly );
if( !pCNd )
{
aIdx.Assign( *pNd, - 1 );
@@ -90,22 +90,22 @@ BOOL GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
}
rCurCrsr.GetPoint()->nNode = aIdx;
- return TRUE;
+ return sal_True;
}
} while( pNd );
- return FALSE;
+ return sal_False;
}
-BOOL GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
- BOOL bInReadOnly )
+sal_Bool GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
+ sal_Bool bInReadOnly )
{
SwNodeIndex aIdx( rCurCrsr.GetPoint()->nNode );
SwSectionNode* pNd = aIdx.GetNode().FindSectionNode();
if( pNd )
aIdx.Assign( *pNd->EndOfSectionNode(), - 1 );
- ULONG nEndCount = aIdx.GetNode().GetNodes().Count()-1;
+ sal_uLong nEndCount = aIdx.GetNode().GetNodes().Count()-1;
do {
while( aIdx.GetIndex() < nEndCount &&
0 == ( pNd = aIdx.GetNode().GetSectionNode()) )
@@ -124,7 +124,7 @@ BOOL GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
{
aIdx = *pNd;
SwCntntNode* pCNd = pNd->GetNodes().GoNextSection( &aIdx,
- TRUE, !bInReadOnly );
+ sal_True, !bInReadOnly );
if( !pCNd )
{
aIdx.Assign( *pNd->EndOfSectionNode(), +1 );
@@ -136,7 +136,7 @@ BOOL GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
{
aIdx = *pNd->EndOfSectionNode();
SwCntntNode* pCNd = pNd->GetNodes().GoPrevSection( &aIdx,
- TRUE, !bInReadOnly );
+ sal_True, !bInReadOnly );
if( !pCNd )
{
aIdx++;
@@ -146,33 +146,33 @@ BOOL GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
}
rCurCrsr.GetPoint()->nNode = aIdx;
- return TRUE;
+ return sal_True;
}
} while( pNd );
- return FALSE;
+ return sal_False;
}
-BOOL GotoCurrRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
- BOOL bInReadOnly )
+sal_Bool GotoCurrRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
+ sal_Bool bInReadOnly )
{
SwSectionNode* pNd = rCurCrsr.GetNode()->FindSectionNode();
if( !pNd )
- return FALSE;
+ return sal_False;
SwPosition* pPos = rCurCrsr.GetPoint();
- BOOL bMoveBackward = fnPosRegion == fnMoveBackward;
+ sal_Bool bMoveBackward = fnPosRegion == fnMoveBackward;
SwCntntNode* pCNd;
if( bMoveBackward )
{
SwNodeIndex aIdx( *pNd->EndOfSectionNode() );
- pCNd = pNd->GetNodes().GoPrevSection( &aIdx, TRUE, !bInReadOnly );
+ pCNd = pNd->GetNodes().GoPrevSection( &aIdx, sal_True, !bInReadOnly );
}
else
{
SwNodeIndex aIdx( *pNd );
- pCNd = pNd->GetNodes().GoNextSection( &aIdx, TRUE, !bInReadOnly );
+ pCNd = pNd->GetNodes().GoNextSection( &aIdx, sal_True, !bInReadOnly );
}
if( pCNd )
@@ -185,34 +185,34 @@ BOOL GotoCurrRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
}
-BOOL GotoCurrRegionAndSkip( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
- BOOL bInReadOnly )
+sal_Bool GotoCurrRegionAndSkip( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
+ sal_Bool bInReadOnly )
{
SwNode* pCurrNd = rCurCrsr.GetNode();
SwSectionNode* pNd = pCurrNd->FindSectionNode();
if( !pNd )
- return FALSE;
+ return sal_False;
SwPosition* pPos = rCurCrsr.GetPoint();
xub_StrLen nCurrCnt = pPos->nContent.GetIndex();
- BOOL bMoveBackward = fnPosRegion == fnMoveBackward;
+ sal_Bool bMoveBackward = fnPosRegion == fnMoveBackward;
do {
SwCntntNode* pCNd;
if( bMoveBackward ) // ans Ende vom Bereich
{
SwNodeIndex aIdx( *pNd->EndOfSectionNode() );
- pCNd = pNd->GetNodes().GoPrevSection( &aIdx, TRUE, !bInReadOnly );
+ pCNd = pNd->GetNodes().GoPrevSection( &aIdx, sal_True, !bInReadOnly );
if( !pCNd )
- return FALSE;
+ return sal_False;
pPos->nNode = aIdx;
}
else
{
SwNodeIndex aIdx( *pNd );
- pCNd = pNd->GetNodes().GoNextSection( &aIdx, TRUE, !bInReadOnly );
+ pCNd = pNd->GetNodes().GoNextSection( &aIdx, sal_True, !bInReadOnly );
if( !pCNd )
- return FALSE;
+ return sal_False;
pPos->nNode = aIdx;
}
@@ -222,18 +222,18 @@ BOOL GotoCurrRegionAndSkip( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
if( &pPos->nNode.GetNode() != pCurrNd ||
pPos->nContent.GetIndex() != nCurrCnt )
// es gab eine Veraenderung
- return TRUE;
+ return sal_True;
// dann versuche mal den "Parent" dieser Section
SwSection* pParent = pNd->GetSection().GetParent();
pNd = pParent ? pParent->GetFmt()->GetSectionNode() : 0;
} while( pNd );
- return FALSE;
+ return sal_False;
}
-BOOL SwCursor::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosRegion )
+sal_Bool SwCursor::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosRegion )
{
SwCrsrSaveState aSaveState( *this );
return !dynamic_cast<SwTableCursor*>(this) &&
@@ -243,21 +243,21 @@ BOOL SwCursor::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosRegion
GetPoint()->nContent.GetIndex() != pSavePos->nCntnt );
}
-BOOL SwCrsrShell::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosRegion )
+sal_Bool SwCrsrShell::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosRegion )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
- BOOL bRet = !pTblCrsr && pCurCrsr->MoveRegion( fnWhichRegion, fnPosRegion );
+ sal_Bool bRet = !pTblCrsr && pCurCrsr->MoveRegion( fnWhichRegion, fnPosRegion );
if( bRet )
UpdateCrsr();
return bRet;
}
-BOOL SwCursor::GotoRegion( const String& rName )
+sal_Bool SwCursor::GotoRegion( const String& rName )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwSectionFmts& rFmts = GetDoc()->GetSections();
- for( USHORT n = rFmts.Count(); n; )
+ for( sal_uInt16 n = rFmts.Count(); n; )
{
const SwSectionFmt* pFmt = rFmts[ --n ];
const SwNodeIndex* pIdx;
@@ -278,10 +278,10 @@ BOOL SwCursor::GotoRegion( const String& rName )
return bRet;
}
-BOOL SwCrsrShell::GotoRegion( const String& rName )
+sal_Bool SwCrsrShell::GotoRegion( const String& rName )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
- BOOL bRet = !pTblCrsr && pCurCrsr->GotoRegion( rName );
+ sal_Bool bRet = !pTblCrsr && pCurCrsr->GotoRegion( rName );
if( bRet )
UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE |
SwCrsrShell::READONLY ); // und den akt. Updaten
diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx
index 25c03bd6c99d..c1d1e00e2e03 100644
--- a/sw/source/core/crsr/trvltbl.cxx
+++ b/sw/source/core/crsr/trvltbl.cxx
@@ -52,16 +52,16 @@
// setze Crsr in die naechsten/vorherigen Celle
-BOOL SwCrsrShell::GoNextCell( BOOL bAppendLine )
+sal_Bool SwCrsrShell::GoNextCell( sal_Bool bAppendLine )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwTableNode* pTblNd = 0;
if( IsTableMode() || 0 != ( pTblNd = IsCrsrInTbl() ))
{
SwCursor* pCrsr = pTblCrsr ? pTblCrsr : pCurCrsr;
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
- bRet = TRUE;
+ bRet = sal_True;
// Check if we have to move the cursor to a covered cell before
// proceeding:
@@ -76,7 +76,7 @@ BOOL SwCrsrShell::GoNextCell( BOOL bAppendLine )
if ( !pTblNd )
pTblNd = IsCrsrInTbl();
pTableBox = & pTableBox->FindEndOfRowSpan( pTblNd->GetTable(),
- (USHORT)(pTableBox->getRowSpan() + pCrsr->GetCrsrRowSpanOffset() ) );
+ (sal_uInt16)(pTableBox->getRowSpan() + pCrsr->GetCrsrRowSpanOffset() ) );
pTableBoxStartNode = pTableBox->GetSttNd();
}
}
@@ -89,7 +89,7 @@ BOOL SwCrsrShell::GoNextCell( BOOL bAppendLine )
if( !aCellStt.GetNode().IsStartNode() )
{
if( pCrsr->HasMark() || !bAppendLine )
- bRet = FALSE;
+ bRet = sal_False;
else
{
// auf besonderen Wunsch: keine Line mehr vorhanden, dann
@@ -106,7 +106,7 @@ BOOL SwCrsrShell::GoNextCell( BOOL bAppendLine )
//nichts mitbekommen.
((SwEditShell*)this)->StartAllAction();
bRet = pDoc->InsertRow( pTblNd->GetTable().
- SelLineFromBox( pTableBox, aBoxes, FALSE ));
+ SelLineFromBox( pTableBox, aBoxes, sal_False ));
((SwEditShell*)this)->EndAllAction();
}
}
@@ -117,9 +117,9 @@ BOOL SwCrsrShell::GoNextCell( BOOL bAppendLine )
}
-BOOL SwCrsrShell::GoPrevCell()
+sal_Bool SwCrsrShell::GoPrevCell()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( IsTableMode() || IsCrsrInTbl() )
{
SwCursor* pCrsr = pTblCrsr ? pTblCrsr : pCurCrsr;
@@ -143,12 +143,12 @@ const SwFrm* lcl_FindMostUpperCellFrm( const SwFrm* pFrm )
return pFrm;
}
-BOOL SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
+sal_Bool SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
{
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
SwFrm *pFrm = GetCurrFrm();
if( !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
const SwTabFrm* pTabFrm = pFrm->FindTabFrm();
const SwTabFrm* pMasterTabFrm = pTabFrm->IsFollow() ? pTabFrm->FindMaster( true ) : pTabFrm;
@@ -172,7 +172,7 @@ BOOL SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
GetTblSel( *this, aBoxes, eType );
if( !aBoxes.Count() )
- return FALSE;
+ return sal_False;
pStt = aBoxes[0];
pEnd = aBoxes[aBoxes.Count() - 1];
@@ -184,7 +184,7 @@ BOOL SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
SwTable::SearchType eSearchType = bRow ? SwTable::SEARCH_ROW : SwTable::SEARCH_COL;
pTable->CreateSelection( *pCrsr, aBoxes, eSearchType, bCheckProtected );
if( !aBoxes.Count() )
- return FALSE;
+ return sal_False;
pStt = aBoxes[0];
pEnd = aBoxes[aBoxes.Count() - 1];
@@ -193,7 +193,7 @@ BOOL SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
{
const SwShellCrsr *pCrsr = _GetCrsr();
const SwFrm* pStartFrm = pFrm;
- const SwCntntNode *pCNd = pCrsr->GetCntntNode( FALSE );
+ const SwCntntNode *pCNd = pCrsr->GetCntntNode( sal_False );
const SwFrm* pEndFrm = pCNd ? pCNd->GetFrm( &pCrsr->GetMkPos() ) : 0;
if ( bRow )
@@ -203,7 +203,7 @@ BOOL SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
}
if ( !pStartFrm || !pEndFrm )
- return FALSE;
+ return sal_False;
const bool bVert = pFrm->ImplFindTabFrm()->IsVertical();
@@ -220,7 +220,7 @@ BOOL SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
aBoxes, bSelectUp ? 0 : &aCells, eType );
if( !aBoxes.Count() || ( !bSelectUp && 4 != aCells.Count() ) )
- return FALSE;
+ return sal_False;
if ( bSelectUp )
{
@@ -258,15 +258,15 @@ BOOL SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
pTblCrsr->GetPtPos() = pMasterTabFrm->IsVertical() ? pMasterTabFrm->Frm().TopRight() : pMasterTabFrm->Frm().TopLeft();
UpdateCrsr(); // und den akt. Updaten
- return TRUE;
+ return sal_True;
}
-BOOL SwCrsrShell::SelTbl()
+sal_Bool SwCrsrShell::SelTbl()
{
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
SwFrm *pFrm = GetCurrFrm();
if( !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
const SwTabFrm *pTblFrm = pFrm->ImplFindTabFrm();
const SwTabFrm* pMasterTabFrm = pTblFrm->IsFollow() ? pTblFrm->FindMaster( true ) : pTblFrm;
@@ -291,11 +291,11 @@ BOOL SwCrsrShell::SelTbl()
pTblCrsr->GetPoint()->nNode = *pTblNd->EndOfSectionNode();
pTblCrsr->Move( fnMoveBackward, fnGoCntnt );
UpdateCrsr(); // und den akt. Updaten
- return TRUE;
+ return sal_True;
}
-BOOL SwCrsrShell::SelTblBox()
+sal_Bool SwCrsrShell::SelTblBox()
{
// if we're in a table, create a table cursor, and select the cell
// that the current cursor's point resides in
@@ -309,12 +309,12 @@ BOOL SwCrsrShell::SelTblBox()
// frame. This should yield the same result as searching for the
// table box start node, right?
SwFrm *pFrm = GetCurrFrm();
- DBG_ASSERT( !pFrm->IsInTab() == !(pStartNode != NULL),
+ OSL_ENSURE( !pFrm->IsInTab() == !(pStartNode != NULL),
"Schroedinger's table: We're in a box, and also we aren't." );
#endif
if( pStartNode == NULL )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
@@ -346,7 +346,7 @@ BOOL SwCrsrShell::SelTblBox()
// needs updateing
UpdateCrsr();
- return TRUE;
+ return sal_True;
}
// return the next non-protected cell inside a table
@@ -354,7 +354,7 @@ BOOL SwCrsrShell::SelTblBox()
// return:
// true - Idx points to content in a suitable cell
// false - could not find a suitable cell
-bool lcl_FindNextCell( SwNodeIndex& rIdx, BOOL bInReadOnly )
+bool lcl_FindNextCell( SwNodeIndex& rIdx, sal_Bool bInReadOnly )
{
// ueberpruefe geschuetzte Zellen
SwNodeIndex aTmp( rIdx, 2 ); // TableNode + StartNode
@@ -433,7 +433,7 @@ bool lcl_FindNextCell( SwNodeIndex& rIdx, BOOL bInReadOnly )
}
// comments see lcl_FindNextCell
-bool lcl_FindPrevCell( SwNodeIndex& rIdx, BOOL bInReadOnly )
+bool lcl_FindPrevCell( SwNodeIndex& rIdx, sal_Bool bInReadOnly )
{
SwNodeIndex aTmp( rIdx, -2 ); // TableNode + EndNode
@@ -493,8 +493,8 @@ bool lcl_FindPrevCell( SwNodeIndex& rIdx, BOOL bInReadOnly )
}
-BOOL GotoPrevTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
- BOOL bInReadOnly )
+sal_Bool GotoPrevTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
+ sal_Bool bInReadOnly )
{
SwNodeIndex aIdx( rCurCrsr.GetPoint()->nNode );
@@ -550,16 +550,16 @@ BOOL GotoPrevTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
pTxtNode->Len() :
0 );
}
- return TRUE;
+ return sal_True;
}
} while( pTblNd );
- return FALSE;
+ return sal_False;
}
-BOOL GotoNextTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
- BOOL bInReadOnly )
+sal_Bool GotoNextTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
+ sal_Bool bInReadOnly )
{
SwNodeIndex aIdx( rCurCrsr.GetPoint()->nNode );
SwTableNode* pTblNd = aIdx.GetNode().FindTableNode();
@@ -567,7 +567,7 @@ BOOL GotoNextTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
if( pTblNd )
aIdx.Assign( *pTblNd->EndOfSectionNode(), 1 );
- ULONG nLastNd = rCurCrsr.GetDoc()->GetNodes().Count() - 1;
+ sal_uLong nLastNd = rCurCrsr.GetDoc()->GetNodes().Count() - 1;
do {
while( aIdx.GetIndex() < nLastNd &&
0 == ( pTblNd = aIdx.GetNode().GetTableNode()) )
@@ -603,34 +603,34 @@ BOOL GotoNextTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
pTxtNode->Len() :
0 );
}
- return TRUE;
+ return sal_True;
}
} while( pTblNd );
- return FALSE;
+ return sal_False;
}
-BOOL GotoCurrTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
- BOOL bInReadOnly )
+sal_Bool GotoCurrTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
+ sal_Bool bInReadOnly )
{
SwTableNode* pTblNd = rCurCrsr.GetPoint()->nNode.GetNode().FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
SwTxtNode* pTxtNode = 0;
if( fnPosTbl == fnMoveBackward ) // ans Ende der Tabelle
{
SwNodeIndex aIdx( *pTblNd->EndOfSectionNode() );
if( !lcl_FindPrevCell( aIdx, bInReadOnly ))
- return FALSE;
+ return sal_False;
pTxtNode = aIdx.GetNode().GetTxtNode();
}
else
{
SwNodeIndex aIdx( *pTblNd );
if( !lcl_FindNextCell( aIdx, bInReadOnly ))
- return FALSE;
+ return sal_False;
pTxtNode = aIdx.GetNode().GetTxtNode();
}
@@ -642,13 +642,13 @@ BOOL GotoCurrTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
0 );
}
- return TRUE;
+ return sal_True;
}
-BOOL SwCursor::MoveTable( SwWhichTable fnWhichTbl, SwPosTable fnPosTbl )
+sal_Bool SwCursor::MoveTable( SwWhichTable fnWhichTbl, SwPosTable fnPosTbl )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwTableCursor* pTblCrsr = dynamic_cast<SwTableCursor*>(this);
if( pTblCrsr || !HasMark() ) // nur wenn kein Mark oder ein TblCrsr
@@ -661,13 +661,13 @@ BOOL SwCursor::MoveTable( SwWhichTable fnWhichTbl, SwPosTable fnPosTbl )
return bRet;
}
-BOOL SwCrsrShell::MoveTable( SwWhichTable fnWhichTbl, SwPosTable fnPosTbl )
+sal_Bool SwCrsrShell::MoveTable( SwWhichTable fnWhichTbl, SwPosTable fnPosTbl )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen
SwShellCrsr* pCrsr = pTblCrsr ? pTblCrsr : pCurCrsr;
- BOOL bCheckPos, bRet;
- ULONG nPtNd = 0;
+ sal_Bool bCheckPos, bRet;
+ sal_uLong nPtNd = 0;
xub_StrLen nPtCnt = 0;
if( !pTblCrsr && pCurCrsr->HasMark() ) // wenn Mark und kein TblCrsr,
@@ -678,11 +678,11 @@ BOOL SwCrsrShell::MoveTable( SwWhichTable fnWhichTbl, SwPosTable fnPosTbl )
pCurCrsr->SwSelPaintRects::Hide();
pTblCrsr->SetMark();
pCrsr = pTblCrsr;
- bCheckPos = FALSE;
+ bCheckPos = sal_False;
}
else
{
- bCheckPos = TRUE;
+ bCheckPos = sal_True;
nPtNd = pCrsr->GetPoint()->nNode.GetIndex();
nPtCnt = pCrsr->GetPoint()->nContent.GetIndex();
}
@@ -700,24 +700,24 @@ BOOL SwCrsrShell::MoveTable( SwWhichTable fnWhichTbl, SwPosTable fnPosTbl )
if( bCheckPos &&
pCrsr->GetPoint()->nNode.GetIndex() == nPtNd &&
pCrsr->GetPoint()->nContent.GetIndex() == nPtCnt )
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
-BOOL SwCrsrShell::IsTblComplex() const
+sal_Bool SwCrsrShell::IsTblComplex() const
{
- SwFrm *pFrm = GetCurrFrm( FALSE );
+ SwFrm *pFrm = GetCurrFrm( sal_False );
if ( pFrm && pFrm->IsInTab() )
return pFrm->FindTabFrm()->GetTable()->IsTblComplex();
- return FALSE;
+ return sal_False;
}
-BOOL SwCrsrShell::IsTblComplexForChart()
+sal_Bool SwCrsrShell::IsTblComplexForChart()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
StartAction(); // IsTblComplexForChart() may trigger table formatting
// we better do that inside an action
@@ -784,10 +784,10 @@ String SwCrsrShell::GetBoxNms() const
}
-BOOL SwCrsrShell::GotoTable( const String& rName )
+sal_Bool SwCrsrShell::GotoTable( const String& rName )
{
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
- BOOL bRet = !pTblCrsr && pCurCrsr->GotoTable( rName );
+ sal_Bool bRet = !pTblCrsr && pCurCrsr->GotoTable( rName );
if( bRet )
{
pCurCrsr->GetPtPos() = Point();
@@ -798,10 +798,10 @@ BOOL SwCrsrShell::GotoTable( const String& rName )
}
-BOOL SwCrsrShell::CheckTblBoxCntnt( const SwPosition* pPos )
+sal_Bool SwCrsrShell::CheckTblBoxCntnt( const SwPosition* pPos )
{
if( !pBoxIdx || !pBoxPtr || IsSelTblCells() || !IsAutoUpdateCells() )
- return FALSE;
+ return sal_False;
// ueberpruefe, ob der Box Inhalt mit dem angegebenen Format der Box
// ueber einstimmt. Wenn nicht, setze neu
@@ -859,7 +859,7 @@ BOOL SwCrsrShell::CheckTblBoxCntnt( const SwPosition* pPos )
// aufruf kommt.
ClearTblBoxCntnt();
StartAction();
- GetDoc()->ChkBoxNumFmt( *pChkBox, TRUE );
+ GetDoc()->ChkBoxNumFmt( *pChkBox, sal_True );
EndAction();
}
@@ -877,13 +877,13 @@ void SwCrsrShell::SaveTblBoxCntnt( const SwPosition* pPos )
SwStartNode* pSttNd = pPos->nNode.GetNode().FindSttNodeByType( SwTableBoxStartNode );
- BOOL bCheckBox = FALSE;
+ sal_Bool bCheckBox = sal_False;
if( pSttNd && pBoxIdx )
{
if( pSttNd == &pBoxIdx->GetNode() )
pSttNd = 0; // die haben wir schon
else
- bCheckBox = TRUE;
+ bCheckBox = sal_True;
}
else
bCheckBox = 0 != pBoxIdx;
@@ -913,9 +913,9 @@ void SwCrsrShell::ClearTblBoxCntnt()
pBoxPtr = 0;
}
-BOOL SwCrsrShell::EndAllTblBoxEdit()
+sal_Bool SwCrsrShell::EndAllTblBoxEdit()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
ViewShell *pSh = this;
do {
if( pSh->IsA( TYPE( SwCrsrShell ) ) )
diff --git a/sw/source/core/crsr/unocrsr.cxx b/sw/source/core/crsr/unocrsr.cxx
index 9311ba482e43..48bb4b1f2cf4 100644
--- a/sw/source/core/crsr/unocrsr.cxx
+++ b/sw/source/core/crsr/unocrsr.cxx
@@ -42,9 +42,9 @@ IMPL_FIXEDMEMPOOL_NEWDEL( SwUnoCrsr, 10, 10 )
SwUnoCrsr::SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing )
: SwCursor( rPos, pRing, false ), SwModify( 0 ),
- bRemainInSection( TRUE ),
- bSkipOverHiddenSections( FALSE ),
- bSkipOverProtectSections( FALSE )
+ bRemainInSection( sal_True ),
+ bSkipOverHiddenSections( sal_False ),
+ bSkipOverProtectSections( sal_False )
{}
@@ -63,7 +63,7 @@ SwUnoCrsr::~SwUnoCrsr()
{
// dann muss der Cursor aus dem Array ausgetragen werden
SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl();
- USHORT nDelPos = rTbl.GetPos( this );
+ sal_uInt16 nDelPos = rTbl.GetPos( this );
if( USHRT_MAX != nDelPos )
rTbl.Remove( nDelPos );
@@ -113,7 +113,7 @@ bool SwUnoCrsr::IsReadOnlyAvailable() const
}
const SwCntntFrm*
-SwUnoCrsr::DoSetBidiLevelLeftRight( BOOL &, BOOL, BOOL )
+SwUnoCrsr::DoSetBidiLevelLeftRight( sal_Bool &, sal_Bool, sal_Bool )
{
return 0; // not for uno cursor
}
@@ -123,7 +123,7 @@ void SwUnoCrsr::DoSetBidiLevelUpDown()
return; // not for uno cursor
}
-BOOL SwUnoCrsr::IsSelOvr( int eFlags )
+sal_Bool SwUnoCrsr::IsSelOvr( int eFlags )
{
if( bRemainInSection )
{
@@ -134,8 +134,8 @@ BOOL SwUnoCrsr::IsSelOvr( int eFlags )
*pNewSttNd = rPtIdx.GetNode().StartOfSectionNode();
if( pOldSttNd != pNewSttNd )
{
- BOOL bMoveDown = GetSavePos()->nNode < rPtIdx.GetIndex();
- BOOL bValidPos = FALSE;
+ sal_Bool bMoveDown = GetSavePos()->nNode < rPtIdx.GetIndex();
+ sal_Bool bValidPos = sal_False;
// search the correct surrounded start node - which the index
// can't leave.
@@ -189,14 +189,14 @@ BOOL SwUnoCrsr::IsSelOvr( int eFlags )
}
}
else
- bValidPos = TRUE;
+ bValidPos = sal_True;
} while ( pInvalidNode );
}
if( bValidPos )
{
SwCntntNode* pCNd = GetCntntNode();
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
if( pCNd && !bMoveDown )
nCnt = pCNd->Len();
GetPoint()->nContent.Assign( pCNd, nCnt );
@@ -205,7 +205,7 @@ BOOL SwUnoCrsr::IsSelOvr( int eFlags )
{
rPtIdx = GetSavePos()->nNode;
GetPoint()->nContent.Assign( GetCntntNode(), GetSavePos()->nCntnt );
- return TRUE;
+ return sal_True;
}
}
}
@@ -218,7 +218,7 @@ BOOL SwUnoCrsr::IsSelOvr( int eFlags )
SwUnoTableCrsr::SwUnoTableCrsr(const SwPosition& rPos)
: SwCursor(rPos,0,false), SwUnoCrsr(rPos), SwTableCursor(rPos), aTblSel(rPos,0,false)
{
- SetRemainInSection(FALSE);
+ SetRemainInSection(sal_False);
}
SwUnoTableCrsr::~SwUnoTableCrsr()
@@ -227,9 +227,9 @@ SwUnoTableCrsr::~SwUnoTableCrsr()
delete aTblSel.GetNext(); // und loeschen
}
-BOOL SwUnoTableCrsr::IsSelOvr( int eFlags )
+sal_Bool SwUnoTableCrsr::IsSelOvr( int eFlags )
{
- BOOL bRet = SwUnoCrsr::IsSelOvr( eFlags );
+ sal_Bool bRet = SwUnoCrsr::IsSelOvr( eFlags );
if( !bRet )
{
const SwTableNode* pTNd = GetPoint()->nNode.GetNode().FindTableNode();
@@ -246,13 +246,13 @@ void SwUnoTableCrsr::MakeBoxSels()
bool bMakeTblCrsrs = true;
if( GetPoint()->nNode.GetIndex() && GetMark()->nNode.GetIndex() &&
0 != ( pCNd = GetCntntNode() ) && pCNd->GetFrm() &&
- 0 != ( pCNd = GetCntntNode(FALSE) ) && pCNd->GetFrm() )
+ 0 != ( pCNd = GetCntntNode(sal_False) ) && pCNd->GetFrm() )
bMakeTblCrsrs = GetDoc()->GetRootFrm()->MakeTblCrsrs( *this );
if ( !bMakeTblCrsrs )
{
SwSelBoxes& rTmpBoxes = (SwSelBoxes&)GetBoxes();
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
while( nCount < rTmpBoxes.Count() )
DeleteBox( nCount );
}
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 859f5013f29a..251e4d7fc23b 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -77,11 +77,11 @@ SwVisCrsr::SwVisCrsr( const SwCrsrShell * pCShell )
{
pCShell->GetWin()->SetCursor( &aTxtCrsr );
bIsVisible = aTxtCrsr.IsVisible();
- bIsDragCrsr = FALSE;
+ bIsDragCrsr = sal_False;
aTxtCrsr.SetWidth( 0 );
#ifdef SW_CRSR_TIMER
- bTimerOn = TRUE;
+ bTimerOn = sal_True;
SetTimeout( 50 ); // 50 millisecond delay
#endif
}
@@ -108,7 +108,7 @@ void SwVisCrsr::Show()
{
if( !bIsVisible )
{
- bIsVisible = TRUE;
+ bIsVisible = sal_True;
// display at all?
if( pCrsrShell->VisArea().IsOver( pCrsrShell->aCharRect ) )
@@ -136,7 +136,7 @@ void SwVisCrsr::Hide()
{
if( bIsVisible )
{
- bIsVisible = FALSE;
+ bIsVisible = sal_False;
#ifdef SW_CRSR_TIMER
if( IsActive() )
@@ -162,13 +162,13 @@ void SwVisCrsr::Timeout()
}
}
-BOOL SwCrsrShell::ChgCrsrTimerFlag( BOOL bTimerOn )
+sal_Bool SwCrsrShell::ChgCrsrTimerFlag( sal_Bool bTimerOn )
{
return pVisCrsr->ChgTimerFlag( bTimerOn );
}
-BOOL SwVisCrsr::ChgTimerFlag( BOOL bFlag )
+sal_Bool SwVisCrsr::ChgTimerFlag( sal_Bool bFlag )
{
bOld = bTimerOn;
if( !bFlag && bIsVisible && IsActive() )
@@ -215,7 +215,7 @@ void SwVisCrsr::_SetPosAndShow()
if( rNode.IsTxtNode() )
{
const SwTxtNode& rTNd = *rNode.GetTxtNode();
- const SwFrm* pFrm = rTNd.GetFrm( 0, 0, FALSE );
+ const SwFrm* pFrm = rTNd.GetFrm( 0, 0, sal_False );
if ( pFrm )
{
const SwScriptInfo* pSI = ((SwTxtFrm*)pFrm)->GetScriptInfo();
@@ -261,7 +261,7 @@ void SwVisCrsr::_SetPosAndShow()
((SwDrawView*)pCrsrShell->GetDrawView())->SetAnimationEnabled(
!pCrsrShell->IsSelection() );
- USHORT nStyle = bIsDragCrsr ? CURSOR_SHADOW : 0;
+ sal_uInt16 nStyle = bIsDragCrsr ? CURSOR_SHADOW : 0;
if( nStyle != aTxtCrsr.GetStyle() )
{
aTxtCrsr.SetStyle( nStyle );
@@ -392,7 +392,7 @@ void SwSelPaintRects::Show()
void SwSelPaintRects::Invalidate( const SwRect& rRect )
{
- USHORT nSz = Count();
+ sal_uInt16 nSz = Count();
if( !nSz )
return;
@@ -562,7 +562,7 @@ short SwShellCrsr::MaxReplaceArived()
// Terminate old actions. The table-frames get constructed and
// a SSelection can be created.
SvUShorts aArr;
- USHORT nActCnt;
+ sal_uInt16 nActCnt;
ViewShell *pShell = GetDoc()->GetRootFrm()->GetCurrShell(),
*pSh = pShell;
do {
@@ -575,7 +575,7 @@ short SwShellCrsr::MaxReplaceArived()
nRet = QueryBox( pDlg, SW_RES( MSG_COMCORE_ASKSEARCH )).Execute();
}
- for( USHORT n = 0; n < aArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aArr.Count(); ++n )
{
for( nActCnt = aArr[n]; nActCnt--; )
pSh->StartAction();
@@ -594,7 +594,7 @@ void SwShellCrsr::SaveTblBoxCntnt( const SwPosition* pPos )
((SwCrsrShell*)GetShell())->SaveTblBoxCntnt( pPos );
}
-BOOL SwShellCrsr::UpDown( BOOL bUp, USHORT nCnt )
+sal_Bool SwShellCrsr::UpDown( sal_Bool bUp, sal_uInt16 nCnt )
{
return SwCursor::UpDown( bUp, nCnt,
&GetPtPos(), GetShell()->GetUpDownX() );
@@ -605,7 +605,7 @@ BOOL SwShellCrsr::UpDown( BOOL bUp, USHORT nCnt )
// JP 05.03.98: To test the UNO-Crsr behavior here the implementation on the
// visible cursor.
-BOOL SwShellCrsr::IsSelOvr( int eFlags )
+sal_Bool SwShellCrsr::IsSelOvr( int eFlags )
{
return SwCursor::IsSelOvr( eFlags );
}
@@ -613,13 +613,13 @@ BOOL SwShellCrsr::IsSelOvr( int eFlags )
#endif
// TRUE: The cursor can be set to the position.
-BOOL SwShellCrsr::IsAtValidPos( BOOL bPoint ) const
+sal_Bool SwShellCrsr::IsAtValidPos( sal_Bool bPoint ) const
{
if( GetShell() && ( GetShell()->IsAllProtect() ||
GetShell()->GetViewOptions()->IsReadonly() ||
( GetShell()->Imp()->GetDrawView() &&
GetShell()->Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() )))
- return TRUE;
+ return sal_True;
return SwCursor::IsAtValidPos( bPoint );
}
@@ -671,13 +671,13 @@ void SwShellTableCrsr::FillRects()
SwRegionRects aReg( GetShell()->VisArea() );
SwNodes& rNds = GetDoc()->GetNodes();
- for( USHORT n = 0; n < aSelBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aSelBoxes.Count(); ++n )
{
const SwStartNode* pSttNd = (*(aSelBoxes.GetData() + n ))->GetSttNd();
const SwTableNode* pSelTblNd = pSttNd->FindTableNode();
SwNodeIndex aIdx( *pSttNd );
- SwCntntNode* pCNd = rNds.GoNextSection( &aIdx, TRUE, FALSE );
+ SwCntntNode* pCNd = rNds.GoNextSection( &aIdx, sal_True, sal_False );
// TABLE IN TABLE
// (see also lcl_FindTopLevelTable in unoobj2.cxx for a different
@@ -686,7 +686,7 @@ void SwShellTableCrsr::FillRects()
while ( pSelTblNd != pCurTblNd && pCurTblNd )
{
aIdx = pCurTblNd->EndOfSectionIndex();
- pCNd = rNds.GoNextSection( &aIdx, TRUE, FALSE );
+ pCNd = rNds.GoNextSection( &aIdx, sal_True, sal_False );
pCurTblNd = pCNd->FindTableNode();
}
@@ -713,19 +713,19 @@ void SwShellTableCrsr::FillRects()
// Check if the SPoint is within the Table-SSelection.
-BOOL SwShellTableCrsr::IsInside( const Point& rPt ) const
+sal_Bool SwShellTableCrsr::IsInside( const Point& rPt ) const
{
// Calculate the new rectangles.
// JP 16.01.98: If the cursor is still "parked" do nothing!!
if( !aSelBoxes.Count() || bParked ||
!GetPoint()->nNode.GetIndex() )
- return FALSE;
+ return sal_False;
SwNodes& rNds = GetDoc()->GetNodes();
- for( USHORT n = 0; n < aSelBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aSelBoxes.Count(); ++n )
{
SwNodeIndex aIdx( *(*(aSelBoxes.GetData() + n ))->GetSttNd() );
- SwCntntNode* pCNd = rNds.GoNextSection( &aIdx, TRUE, FALSE );
+ SwCntntNode* pCNd = rNds.GoNextSection( &aIdx, sal_True, sal_False );
if( !pCNd )
continue;
@@ -734,23 +734,23 @@ BOOL SwShellTableCrsr::IsInside( const Point& rPt ) const
pFrm = pFrm->GetUpper();
OSL_ENSURE( pFrm, "Node nicht in einer Tabelle" );
if( pFrm && pFrm->Frm().IsInside( rPt ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
#if OSL_DEBUG_LEVEL > 1
// JP 05.03.98: To test the UNO-Crsr behavior here the implementation on the
// visible cursor.
-BOOL SwShellTableCrsr::IsSelOvr( int eFlags )
+sal_Bool SwShellTableCrsr::IsSelOvr( int eFlags )
{
return SwShellCrsr::IsSelOvr( eFlags );
}
#endif
-BOOL SwShellTableCrsr::IsAtValidPos( BOOL bPoint ) const
+sal_Bool SwShellTableCrsr::IsAtValidPos( sal_Bool bPoint ) const
{
return SwShellCrsr::IsAtValidPos( bPoint );
}
diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx
index 84b390f16cb5..eb653789da52 100644
--- a/sw/source/core/doc/SwStyleNameMapper.cxx
+++ b/sw/source/core/doc/SwStyleNameMapper.cxx
@@ -1091,7 +1091,7 @@ const SvStringsDtor& SwStyleNameMapper::GetNumRuleProgNameArray()
const String SwStyleNameMapper::GetSpecialExtraProgName( const String& rExtraUIName )
{
String aRes = rExtraUIName;
- BOOL bChgName = FALSE;
+ sal_Bool bChgName = sal_False;
const SvStringsDtor& rExtraArr = GetExtraUINameArray();
static sal_uInt16 nIds[] =
{
@@ -1106,7 +1106,7 @@ const String SwStyleNameMapper::GetSpecialExtraProgName( const String& rExtraUIN
{
if (aRes == *rExtraArr[ *pIds ])
{
- bChgName = TRUE;
+ bChgName = sal_True;
break;
}
}
@@ -1118,7 +1118,7 @@ const String SwStyleNameMapper::GetSpecialExtraProgName( const String& rExtraUIN
const String SwStyleNameMapper::GetSpecialExtraUIName( const String& rExtraProgName )
{
String aRes = rExtraProgName;
- BOOL bChgName = FALSE;
+ sal_Bool bChgName = sal_False;
const SvStringsDtor& rExtraArr = GetExtraProgNameArray();
static sal_uInt16 nIds[] =
{
@@ -1134,7 +1134,7 @@ const String SwStyleNameMapper::GetSpecialExtraUIName( const String& rExtraProgN
{
if (aRes == *rExtraArr[ *pIds ])
{
- bChgName = TRUE;
+ bChgName = sal_True;
break;
}
}
diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx
index 1feb032d2814..b597117315a9 100644
--- a/sw/source/core/doc/acmplwrd.cxx
+++ b/sw/source/core/doc/acmplwrd.cxx
@@ -56,7 +56,7 @@ class SwAutoCompleteClient : public SwClient
SwAutoCompleteWord* pAutoCompleteWord;
SwDoc* pDoc;
#if OSL_DEBUG_LEVEL > 1
- static ULONG nSwAutoCompleteClientCount;
+ static sal_uLong nSwAutoCompleteClientCount;
#endif
public:
SwAutoCompleteClient(SwAutoCompleteWord& rToTell, SwDoc& rSwDoc);
@@ -68,7 +68,7 @@ public:
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
const SwDoc& GetDoc(){return *pDoc;}
#if OSL_DEBUG_LEVEL > 1
- static ULONG GetElementCount() {return nSwAutoCompleteClientCount;}
+ static sal_uLong GetElementCount() {return nSwAutoCompleteClientCount;}
#endif
};
@@ -90,7 +90,7 @@ typedef std::vector<SwDocPtr> SwDocPtrVector;
class SwAutoCompleteString : public String
{
#if OSL_DEBUG_LEVEL > 1
- static ULONG nSwAutoCompleteStringCount;
+ static sal_uLong nSwAutoCompleteStringCount;
#endif
SwDocPtrVector aSourceDocs;
public:
@@ -101,12 +101,12 @@ class SwAutoCompleteString : public String
//returns true if last document reference has been removed
sal_Bool RemoveDocument(const SwDoc& rDoc);
#if OSL_DEBUG_LEVEL > 1
- static ULONG GetElementCount() {return nSwAutoCompleteStringCount;}
+ static sal_uLong GetElementCount() {return nSwAutoCompleteStringCount;}
#endif
};
#if OSL_DEBUG_LEVEL > 1
- ULONG SwAutoCompleteClient::nSwAutoCompleteClientCount = 0;
- ULONG SwAutoCompleteString::nSwAutoCompleteStringCount = 0;
+ sal_uLong SwAutoCompleteClient::nSwAutoCompleteClientCount = 0;
+ sal_uLong SwAutoCompleteString::nSwAutoCompleteStringCount = 0;
#endif
SwAutoCompleteClient::SwAutoCompleteClient(SwAutoCompleteWord& rToTell, SwDoc& rSwDoc) :
@@ -227,18 +227,18 @@ sal_Bool SwAutoCompleteString::RemoveDocument(const SwDoc& rDoc)
return sal_False;
}
-SwAutoCompleteWord::SwAutoCompleteWord( USHORT nWords, USHORT nMWrdLen )
+SwAutoCompleteWord::SwAutoCompleteWord( sal_uInt16 nWords, sal_uInt16 nMWrdLen )
: aWordLst( 0, 255 ), aLRULst( 0, 255 ),
pImpl(new SwAutoCompleteWord_Impl(*this)),
nMaxCount( nWords ),
nMinWrdLen( nMWrdLen ),
- bLockWordLst( FALSE )
+ bLockWordLst( sal_False )
{
}
SwAutoCompleteWord::~SwAutoCompleteWord()
{
- for(USHORT nPos = aWordLst.Count(); nPos; nPos--)
+ for(sal_uInt16 nPos = aWordLst.Count(); nPos; nPos--)
{
SwAutoCompleteString* pCurrent = (SwAutoCompleteString*)aWordLst[ nPos - 1 ];
aWordLst.Remove( nPos - 1 );
@@ -246,13 +246,13 @@ SwAutoCompleteWord::~SwAutoCompleteWord()
}
delete pImpl;
#if OSL_DEBUG_LEVEL > 1
- ULONG nStrings = SwAutoCompleteString::GetElementCount();
- ULONG nClients = SwAutoCompleteClient::GetElementCount();
- DBG_ASSERT(!nStrings && !nClients, "AutoComplete: clients or string count mismatch");
+ sal_uLong nStrings = SwAutoCompleteString::GetElementCount();
+ sal_uLong nClients = SwAutoCompleteClient::GetElementCount();
+ OSL_ENSURE(!nStrings && !nClients, "AutoComplete: clients or string count mismatch");
#endif
}
-BOOL SwAutoCompleteWord::InsertWord( const String& rWord, SwDoc& rDoc )
+sal_Bool SwAutoCompleteWord::InsertWord( const String& rWord, SwDoc& rDoc )
{
SwDocShell* pDocShell = rDoc.GetDocShell();
SfxMedium* pMedium = pDocShell ? pDocShell->GetMedium() : 0;
@@ -269,7 +269,7 @@ BOOL SwAutoCompleteWord::InsertWord( const String& rWord, SwDoc& rDoc )
aNewWord.EraseAllChars( CH_TXTATR_BREAKWORD );
pImpl->AddDocument(rDoc);
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
xub_StrLen nWrdLen = aNewWord.Len();
while( nWrdLen && '.' == aNewWord.GetChar( nWrdLen-1 ))
--nWrdLen;
@@ -279,10 +279,10 @@ BOOL SwAutoCompleteWord::InsertWord( const String& rWord, SwDoc& rDoc )
SwAutoCompleteString* pAutoString;
StringPtr pNew = pAutoString = new SwAutoCompleteString( aNewWord, 0, nWrdLen );
pAutoString->AddDocument(rDoc);
- USHORT nInsPos;
+ sal_uInt16 nInsPos;
if( aWordLst.Insert( pNew, nInsPos ) )
{
- bRet = TRUE;
+ bRet = sal_True;
if( aLRULst.Count() < nMaxCount )
aLRULst.Insert( pNew, 0 );
else
@@ -322,15 +322,15 @@ BOOL SwAutoCompleteWord::InsertWord( const String& rWord, SwDoc& rDoc )
return bRet;
}
-void SwAutoCompleteWord::SetMaxCount( USHORT nNewMax )
+void SwAutoCompleteWord::SetMaxCount( sal_uInt16 nNewMax )
{
if( nNewMax < nMaxCount && aLRULst.Count() > nNewMax )
{
// dann die unten ueberhaengenden entfernen
- USHORT nLRUIndex = nNewMax-1;
+ sal_uInt16 nLRUIndex = nNewMax-1;
while( nNewMax < aWordLst.Count() && nLRUIndex < aLRULst.Count())
{
- USHORT nPos = aWordLst.GetPos( (String*)aLRULst[ nLRUIndex++ ] );
+ sal_uInt16 nPos = aWordLst.GetPos( (String*)aLRULst[ nLRUIndex++ ] );
OSL_ENSURE( USHRT_MAX != nPos, "String nicht gefunden" );
void * pDel = aWordLst[nPos];
aWordLst.Remove(nPos);
@@ -341,7 +341,7 @@ void SwAutoCompleteWord::SetMaxCount( USHORT nNewMax )
nMaxCount = nNewMax;
}
-void SwAutoCompleteWord::SetMinWordLen( USHORT n )
+void SwAutoCompleteWord::SetMinWordLen( sal_uInt16 n )
{
// will man wirklich alle Worte, die kleiner als die neue Min Laenge
// sind entfernen?
@@ -350,13 +350,13 @@ void SwAutoCompleteWord::SetMinWordLen( USHORT n )
// JP 11.03.99 - mal testhalber eingebaut
if( n < nMinWrdLen )
{
- for( USHORT nPos = 0; nPos < aWordLst.Count(); ++nPos )
+ for( sal_uInt16 nPos = 0; nPos < aWordLst.Count(); ++nPos )
if( aWordLst[ nPos ]->Len() < n )
{
void* pDel = aWordLst[ nPos ];
aWordLst.Remove(nPos);
- USHORT nDelPos = aLRULst.GetPos( pDel );
+ sal_uInt16 nDelPos = aLRULst.GetPos( pDel );
OSL_ENSURE( USHRT_MAX != nDelPos, "String nicht gefunden" );
aLRULst.Remove( nDelPos );
--nPos;
@@ -367,8 +367,8 @@ void SwAutoCompleteWord::SetMinWordLen( USHORT n )
nMinWrdLen = n;
}
-BOOL SwAutoCompleteWord::GetRange( const String& rWord, USHORT& rStt,
- USHORT& rEnd ) const
+sal_Bool SwAutoCompleteWord::GetRange( const String& rWord, sal_uInt16& rStt,
+ sal_uInt16& rEnd ) const
{
const StringPtr pStr = (StringPtr)&rWord;
aWordLst.Seek_Entry( pStr, &rStt );
@@ -383,8 +383,8 @@ BOOL SwAutoCompleteWord::GetRange( const String& rWord, USHORT& rStt,
void SwAutoCompleteWord::CheckChangedList( const SvStringsISortDtor& rNewLst )
{
- USHORT nMyLen = aWordLst.Count(), nNewLen = rNewLst.Count();
- USHORT nMyPos = 0, nNewPos = 0;
+ sal_uInt16 nMyLen = aWordLst.Count(), nNewLen = rNewLst.Count();
+ sal_uInt16 nMyPos = 0, nNewPos = 0;
for( ; nMyPos < nMyLen && nNewPos < nNewLen; ++nMyPos, ++nNewPos )
{
@@ -394,7 +394,7 @@ void SwAutoCompleteWord::CheckChangedList( const SvStringsISortDtor& rNewLst )
void* pDel = aWordLst[ nMyPos ];
aWordLst.Remove(nMyPos);
- USHORT nPos = aLRULst.GetPos( pDel );
+ sal_uInt16 nPos = aLRULst.GetPos( pDel );
OSL_ENSURE( USHRT_MAX != nPos, "String nicht gefunden" );
aLRULst.Remove( nPos );
delete (SwAutoCompleteString*)pDel;
@@ -409,7 +409,7 @@ void SwAutoCompleteWord::CheckChangedList( const SvStringsISortDtor& rNewLst )
for( ; nNewPos < nMyLen; ++nNewPos )
{
void* pDel = aWordLst[ nNewPos ];
- USHORT nPos = aLRULst.GetPos( pDel );
+ sal_uInt16 nPos = aLRULst.GetPos( pDel );
OSL_ENSURE( USHRT_MAX != nPos, "String nicht gefunden" );
aLRULst.Remove( nPos );
delete (SwAutoCompleteString*)pDel;
@@ -425,13 +425,13 @@ void SwAutoCompleteWord::DocumentDying(const SwDoc& rDoc)
SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get()->GetAutoCorrect();
const sal_Bool bDelete = !pACorr->GetSwFlags().bAutoCmpltKeepList;
- for(USHORT nPos = aWordLst.Count(); nPos; nPos--)
+ for(sal_uInt16 nPos = aWordLst.Count(); nPos; nPos--)
{
SwAutoCompleteString* pCurrent = (SwAutoCompleteString*)aWordLst[ nPos - 1 ];
if(pCurrent->RemoveDocument(rDoc) && bDelete)
{
aWordLst.Remove( nPos - 1 );
- USHORT nLRUPos = aLRULst.GetPos( (void*)pCurrent );
+ sal_uInt16 nLRUPos = aLRULst.GetPos( (void*)pCurrent );
DBG_ASSERT(nLRUPos < USHRT_MAX, "word not found in LRU list" );
aLRULst.Remove( nLRUPos );
delete pCurrent;
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index 3463273d8502..4444a713ea78 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -43,6 +43,7 @@
#include <docary.hxx>
#include <swundo.hxx>
#include <undobj.hxx>
+#include <numrule.hxx>
#include <doc.hxx>
#include <frmfmt.hxx>
#include <fmtanchr.hxx>
@@ -119,15 +120,15 @@ SW_DLLPUBLIC const char * dbg_out(const ::rtl::OUString & aStr)
struct CompareUShort
{
- bool operator()(USHORT a, USHORT b) const
+ bool operator()(sal_uInt16 a, sal_uInt16 b) const
{
return a < b;
}
};
-map<USHORT,String,CompareUShort> & GetItemWhichMap()
+map<sal_uInt16,String,CompareUShort> & GetItemWhichMap()
{
- static map<USHORT,String,CompareUShort> aItemWhichMap;
+ static map<sal_uInt16,String,CompareUShort> aItemWhichMap;
static bool bInitialized = false;
if (! bInitialized)
@@ -343,7 +344,7 @@ const String lcl_dbg_out(const SwpHints & rHints)
{
String aStr("[ SwpHints\n", RTL_TEXTENCODING_ASCII_US);
- for (USHORT i = 0; i < rHints.Count(); i++)
+ for (sal_uInt16 i = 0; i < rHints.Count(); i++)
{
aStr += String(" ", RTL_TEXTENCODING_ASCII_US);
aStr += lcl_dbg_out(*rHints[i]);
@@ -474,7 +475,7 @@ const String lcl_AnchoredFrames(const SwNode & rNode)
if (pFrmFmts)
{
bool bFirst = true;
- for (USHORT nI = 0; nI < pFrmFmts->Count(); nI++)
+ for (sal_uInt16 nI = 0; nI < pFrmFmts->Count(); nI++)
{
const SwFmtAnchor & rAnchor = (*pFrmFmts)[nI]->GetAnchor();
const SwPosition * pPos = rAnchor.GetCntntAnchor();
@@ -603,7 +604,7 @@ String lcl_dbg_out(const SwNode & rNode)
const SfxPoolItem * pItem = NULL;
if (pAttrSet && SFX_ITEM_SET ==
- pAttrSet->GetItemState(RES_PARATR_NUMRULE, FALSE, &pItem))
+ pAttrSet->GetItemState(RES_PARATR_NUMRULE, sal_False, &pItem))
{
aTmpStr += String("(", RTL_TEXTENCODING_ASCII_US);
aTmpStr +=
@@ -616,7 +617,7 @@ String lcl_dbg_out(const SwNode & rNode)
aTmpStr += String("</rule>", RTL_TEXTENCODING_ASCII_US);
if (pTxtNode->GetActualListLevel() > 0)
- pNumFmt = pNumRule->GetNumFmt( static_cast< USHORT >(pTxtNode->GetActualListLevel()) );
+ pNumFmt = pNumRule->GetNumFmt( static_cast< sal_uInt16 >(pTxtNode->GetActualListLevel()) );
if (pNumFmt)
{
@@ -722,7 +723,7 @@ SW_DLLPUBLIC const char * dbg_out(const SwTxtNode * pNode)
return NULL;
}
-BOOL lcl_dbg_add_node(const SwNodePtr & pNode, void * pArgs)
+sal_Bool lcl_dbg_add_node(const SwNodePtr & pNode, void * pArgs)
{
if (pNode)
{
@@ -731,10 +732,10 @@ BOOL lcl_dbg_add_node(const SwNodePtr & pNode, void * pArgs)
}
//MBA: this code didn't compile, needed to add a return value
- return TRUE;
+ return sal_True;
}
-void lcl_dbg_nodes_inner(String & aStr, SwNodes & rNodes, ULONG & nIndex)
+void lcl_dbg_nodes_inner(String & aStr, SwNodes & rNodes, sal_uLong & nIndex)
{
SwNode * pNode = rNodes[nIndex];
SwStartNode * pStartNode = dynamic_cast<SwStartNode *> (pNode);
@@ -743,8 +744,8 @@ void lcl_dbg_nodes_inner(String & aStr, SwNodes & rNodes, ULONG & nIndex)
if (pStartNode != NULL)
pEndNode = pStartNode->EndOfSectionNode();
- ULONG nCount = rNodes.Count();
- ULONG nStartIndex = nIndex;
+ sal_uLong nCount = rNodes.Count();
+ sal_uLong nStartIndex = nIndex;
bool bDone = false;
@@ -787,8 +788,8 @@ String lcl_dbg_out(SwNodes & rNodes)
{
String aStr("<nodes-array>", RTL_TEXTENCODING_ASCII_US);
- ULONG nIndex = 0;
- ULONG nCount = rNodes.Count();
+ sal_uLong nIndex = 0;
+ sal_uLong nCount = rNodes.Count();
while (nIndex < nCount)
{
@@ -809,43 +810,10 @@ String lcl_dbg_out(const SwUndo & rUndo)
{
String aStr("[ ", RTL_TEXTENCODING_ASCII_US);
- aStr += String::CreateFromInt32(rUndo.GetId());
+ aStr += String::CreateFromInt32(
+ static_cast<SfxUndoAction const&>(rUndo).GetId());
aStr += String(": ", RTL_TEXTENCODING_ASCII_US);
- switch(rUndo.GetId())
- {
- case UNDO_START:
- aStr += String(", ", RTL_TEXTENCODING_ASCII_US);
- aStr +=
- String::CreateFromInt32(dynamic_cast
- <const SwUndoStart &>(rUndo).
- GetUserId());
- aStr += String(", ", RTL_TEXTENCODING_ASCII_US);
- aStr += String::CreateFromInt32(dynamic_cast
- <const SwUndoStart &>(rUndo).
- GetEndOffset());
- aStr += String(" ", RTL_TEXTENCODING_ASCII_US);
-
- break;
-
- case UNDO_END:
- aStr += String(", ", RTL_TEXTENCODING_ASCII_US);
- aStr +=
- String::CreateFromInt32(dynamic_cast
- <const SwUndoEnd &>(rUndo).
- GetId());
- aStr += String(", ", RTL_TEXTENCODING_ASCII_US);
- aStr += String::CreateFromInt32(dynamic_cast
- <const SwUndoEnd &>(rUndo).
- GetSttOffset());
- aStr += String(" ", RTL_TEXTENCODING_ASCII_US);
-
- break;
-
- default:
- break;
- }
-
aStr += rUndo.GetComment();
aStr += String(" ]", RTL_TEXTENCODING_ASCII_US);
@@ -861,7 +829,7 @@ String lcl_dbg_out(SwOutlineNodes & rNodes)
{
String aStr("[\n", RTL_TEXTENCODING_ASCII_US);
- for (USHORT i = 0; i < rNodes.Count(); i++)
+ for (sal_uInt16 i = 0; i < rNodes.Count(); i++)
{
aStr += lcl_dbg_out(*rNodes[i]);
aStr += String("\n", RTL_TEXTENCODING_ASCII_US);
@@ -877,39 +845,6 @@ SW_DLLPUBLIC const char * dbg_out(SwOutlineNodes & rNodes)
return dbg_out(lcl_dbg_out(rNodes));
}
-String lcl_dbg_out(const SwUndos & rUndos)
-{
- USHORT nIndent = 0;
-
- String aStr("[\n", RTL_TEXTENCODING_ASCII_US);
-
- for (USHORT n = 0; n < rUndos.Count(); n++)
- {
- SwUndo * pUndo = rUndos[n];
-
- if (pUndo->GetId() == UNDO_END)
- nIndent--;
-
- for (USHORT nI = 0; n < nIndent; nI++)
- aStr += String(" ", RTL_TEXTENCODING_ASCII_US);
-
- aStr += lcl_dbg_out(*pUndo);
- aStr += String("\n", RTL_TEXTENCODING_ASCII_US);
-
- if (pUndo->GetId() == UNDO_START)
- nIndent++;
- }
-
- aStr += String("]\n", RTL_TEXTENCODING_ASCII_US);
-
- return aStr;
-}
-
-SW_DLLPUBLIC const char * dbg_out(const SwUndos & rUndos)
-{
- return dbg_out(lcl_dbg_out(rUndos));
-}
-
String lcl_dbg_out(const SwRewriter & rRewriter)
{
(void) rRewriter;
@@ -941,7 +876,7 @@ String lcl_dbg_out(const SwNumRule & rRule)
aResult += rRule.GetName();
aResult += String(" [", RTL_TEXTENCODING_ASCII_US);
- for (BYTE n = 0; n < MAXLEVEL; n++)
+ for (sal_uInt8 n = 0; n < MAXLEVEL; n++)
{
if (n > 0)
aResult += String(", ", RTL_TEXTENCODING_ASCII_US);
@@ -991,7 +926,7 @@ String lcl_dbg_out(const SwNumRuleTbl & rTbl)
{
String aResult("[", RTL_TEXTENCODING_ASCII_US);
- for (USHORT n = 0; n < rTbl.Count(); n++)
+ for (sal_uInt16 n = 0; n < rTbl.Count(); n++)
{
if (n > 0)
aResult += String(", ", RTL_TEXTENCODING_ASCII_US);
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 30bb078e19d8..18fafac8331f 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -28,7 +28,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <doc.hxx>
+#include <UndoManager.hxx>
#include <hintids.hxx>
#include <tools/shl.hxx>
@@ -80,7 +82,10 @@
#include <pam.hxx>
#include <ndtxt.hxx>
#include <swundo.hxx> // fuer die UndoIds
-#include <undobj.hxx>
+#include <UndoCore.hxx>
+#include <UndoInsert.hxx>
+#include <UndoSplitMove.hxx>
+#include <UndoTable.hxx>
#include <pagedesc.hxx> //DTor
#include <breakit.hxx>
#include <ndole.hxx>
@@ -100,7 +105,6 @@
#include <fldupde.hxx>
#include <swbaslnk.hxx>
#include <printdata.hxx>
-#include <swprtopt.hxx>
#include <cmdid.h> // fuer den dflt - Printer in SetJob
#include <statstr.hrc> // StatLine-String
#include <comcore.hrc>
@@ -113,6 +117,8 @@
#include <viewsh.hxx>
#include <shellres.hxx>
#include <txtfrm.hxx>
+#include <wdocsh.hxx> // SwWebDocShell
+#include <prtopt.hxx> // SwPrintOptions
#include <vector>
#include <map>
@@ -199,6 +205,7 @@ bool SwDoc::get(/*[in]*/ DocumentSettingId id) const
case PURGE_OLE: return mbPurgeOLE;
case KERN_ASIAN_PUNCTUATION: return mbKernAsianPunctuation;
case DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT: return mbDoNotResetParaAttrsForNumFont;
+ case MATH_BASELINE_ALIGNMENT: return mbMathBaselineAlignment;
default:
OSL_FAIL("Invalid setting id");
}
@@ -237,8 +244,8 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value)
mbOldNumbering = value;
const SwNumRuleTbl& rNmTbl = GetNumRuleTbl();
- for( USHORT n = 0; n < rNmTbl.Count(); ++n )
- rNmTbl[n]->SetInvalidRule(TRUE);
+ for( sal_uInt16 n = 0; n < rNmTbl.Count(); ++n )
+ rNmTbl[n]->SetInvalidRule(sal_True);
UpdateNumRule();
@@ -352,24 +359,26 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value)
case DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT:
mbDoNotResetParaAttrsForNumFont = value;
break;
-
+ case MATH_BASELINE_ALIGNMENT:
+ mbMathBaselineAlignment = value;
+ break;
default:
OSL_FAIL("Invalid setting id");
}
}
const i18n::ForbiddenCharacters*
- SwDoc::getForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ bool bLocaleData ) const
+ SwDoc::getForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ bool bLocaleData ) const
{
const i18n::ForbiddenCharacters* pRet = 0;
if( xForbiddenCharsTable.is() )
- pRet = xForbiddenCharsTable->GetForbiddenCharacters( nLang, FALSE );
+ pRet = xForbiddenCharsTable->GetForbiddenCharacters( nLang, sal_False );
if( bLocaleData && !pRet && pBreakIt )
pRet = &pBreakIt->GetForbidden( (LanguageType)nLang );
return pRet;
}
-void SwDoc::setForbiddenCharacters(/*[in]*/ USHORT nLang,
+void SwDoc::setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang,
/*[in]*/ const i18n::ForbiddenCharacters& rFChars )
{
if( !xForbiddenCharsTable.is() )
@@ -451,7 +460,7 @@ void SwDoc::setCharacterCompressionType( /*[in]*/SwCharCompressType n )
eChrCmprType = n;
if( pDrawModel )
{
- pDrawModel->SetCharCompressType( static_cast<UINT16>(n) );
+ pDrawModel->SetCharCompressType( static_cast<sal_uInt16>(n) );
if( !mbInReading )
pDrawModel->ReformatAllTextObjects();
}
@@ -594,8 +603,8 @@ const JobSetup* SwDoc::getJobsetup() const
void SwDoc::setJobsetup(/*[in]*/ const JobSetup &rJobSetup )
{
- BOOL bCheckPageDescs = 0 == pPrt;
- BOOL bDataChanged = FALSE;
+ sal_Bool bCheckPageDescs = 0 == pPrt;
+ sal_Bool bDataChanged = sal_False;
if ( pPrt )
{
@@ -604,7 +613,7 @@ void SwDoc::setJobsetup(/*[in]*/ const JobSetup &rJobSetup )
if ( pPrt->GetJobSetup() != rJobSetup )
{
pPrt->SetJobSetup( rJobSetup );
- bDataChanged = TRUE;
+ bDataChanged = sal_True;
}
}
else
@@ -626,18 +635,30 @@ void SwDoc::setJobsetup(/*[in]*/ const JobSetup &rJobSetup )
else
{
pPrt = p;
- bDataChanged = TRUE;
+ bDataChanged = sal_True;
}
}
if ( bDataChanged && !get(IDocumentSettingAccess::USE_VIRTUAL_DEVICE) )
PrtDataChanged();
}
-SwPrintData* SwDoc::getPrintData() const
+const SwPrintData & SwDoc::getPrintData() const
{
if(!pPrtData)
- ((SwDoc*)this)->pPrtData = new SwPrintData;
- return pPrtData;
+ {
+ SwDoc * pThis = const_cast< SwDoc * >(this);
+ pThis->pPrtData = new SwPrintData;
+
+ // SwPrintData should be initialized from the configuration,
+ // the respective config item is implememted by SwPrintOptions which
+ // is also derived from SwPrintData
+ const SwDocShell *pDocSh = GetDocShell();
+ DBG_ASSERT( pDocSh, "pDocSh is 0, can't determine if this is a WebDoc or not" );
+ bool bWeb = 0 != dynamic_cast< const SwWebDocShell * >(pDocSh);
+ SwPrintOptions aPrintOptions( bWeb );
+ *pThis->pPrtData = aPrintOptions;
+ }
+ return *pPrtData;
}
void SwDoc::setPrintData(/*[in]*/ const SwPrintData& rPrtData )
@@ -677,14 +698,14 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
}
SwUndoSplitNode* pUndo = 0;
- if ( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
+ GetIDocumentUndoRedo().ClearRedo();
// einfuegen vom Undo-Object, z.Z. nur beim TextNode
if( pNode->IsTxtNode() )
{
pUndo = new SwUndoSplitNode( this, rPos, bChkTableStart );
- AppendUndo(pUndo);
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
}
@@ -694,7 +715,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
// einen Absatz ein
if( bChkTableStart && !rPos.nContent.GetIndex() && pNode->IsTxtNode() )
{
- ULONG nPrevPos = rPos.nNode.GetIndex() - 1;
+ sal_uLong nPrevPos = rPos.nNode.GetIndex() - 1;
const SwTableNode* pTblNd;
const SwNode* pNd = GetNodes()[ nPrevPos ];
if( pNd->IsStartNode() &&
@@ -717,8 +738,8 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
{
// Dann nur, wenn die Tabelle Umbrueche traegt!
const SwFrmFmt* pFrmFmt = pTblNd->GetTable().GetFrmFmt();
- if( SFX_ITEM_SET != pFrmFmt->GetItemState(RES_PAGEDESC, FALSE) &&
- SFX_ITEM_SET != pFrmFmt->GetItemState( RES_BREAK, FALSE ) )
+ if( SFX_ITEM_SET != pFrmFmt->GetItemState(RES_PAGEDESC, sal_False) &&
+ SFX_ITEM_SET != pFrmFmt->GetItemState( RES_BREAK, sal_False ) )
pNd = 0;
}
}
@@ -739,13 +760,13 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
SwFrmFmt* pFrmFmt = pTblNd->GetTable().GetFrmFmt();
const SfxPoolItem *pItem;
if( SFX_ITEM_SET == pFrmFmt->GetItemState( RES_PAGEDESC,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
pTxtNd->SetAttr( *pItem );
pFrmFmt->ResetFmtAttr( RES_PAGEDESC );
}
if( SFX_ITEM_SET == pFrmFmt->GetItemState( RES_BREAK,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
pTxtNd->SetAttr( *pItem );
pFrmFmt->ResetFmtAttr( RES_BREAK );
@@ -771,7 +792,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
{
// verschiebe noch alle Bookmarks/TOXMarks/FlyAtCnt
if( aBkmkArr.Count() )
- _RestoreCntntIdx( this, aBkmkArr, rPos.nNode.GetIndex()-1, 0, TRUE );
+ _RestoreCntntIdx( this, aBkmkArr, rPos.nNode.GetIndex()-1, 0, sal_True );
if( IsRedlineOn() || (!IsIgnoreRedline() && pRedlineTbl->Count() ))
{
@@ -791,10 +812,8 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
bool SwDoc::AppendTxtNode( SwPosition& rPos )
{
- /*
- * Neuen Node vor EndOfContent erzeugen.
- */
- SwTxtNode *pCurNode = GetNodes()[ rPos.nNode ]->GetTxtNode();
+ // create new node before EndOfContent
+ SwTxtNode * pCurNode = rPos.nNode.GetNode().GetTxtNode();
if( !pCurNode )
{
// dann kann ja einer angelegt werden!
@@ -808,10 +827,9 @@ bool SwDoc::AppendTxtNode( SwPosition& rPos )
rPos.nNode++;
rPos.nContent.Assign( pCurNode, 0 );
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoInsert( rPos.nNode ));
+ GetIDocumentUndoRedo().AppendUndo( new SwUndoInsert( rPos.nNode ) );
}
if( IsRedlineOn() || (!IsIgnoreRedline() && pRedlineTbl->Count() ))
@@ -826,15 +844,15 @@ bool SwDoc::AppendTxtNode( SwPosition& rPos )
}
SetModified();
- return TRUE;
+ return sal_True;
}
bool SwDoc::InsertString( const SwPaM &rRg, const String &rStr,
const enum InsertFlags nInsertMode )
{
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
+ GetIDocumentUndoRedo().ClearRedo(); // AppendUndo not always called!
}
const SwPosition& rPos = *rRg.GetPoint();
@@ -856,15 +874,16 @@ bool SwDoc::InsertString( const SwPaM &rRg, const String &rStr,
SwDataChanged aTmp( rRg, 0 );
- if( !DoesUndo() || !DoesGroupUndo() )
+ if (!GetIDocumentUndoRedo().DoesUndo() ||
+ !GetIDocumentUndoRedo().DoesGroupUndo())
{
pNode->InsertText( rStr, rPos.nContent, nInsertMode );
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
SwUndoInsert * const pUndo( new SwUndoInsert(
rPos.nNode, rPos.nContent.GetIndex(), rStr.Len(), nInsertMode));
- AppendUndo(pUndo);
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
}
else
@@ -874,25 +893,12 @@ bool SwDoc::InsertString( const SwPaM &rRg, const String &rStr,
// don't group the start if hints at the start should be expanded
if (!(nInsertMode & IDocumentContentOperations::INS_FORCEHINTEXPAND))
{
- USHORT const nUndoSize = pUndos->Count();
- if (0 != nUndoSize)
+ SwUndo *const pLastUndo = GetUndoManager().GetLastUndo();
+ SwUndoInsert *const pUndoInsert(
+ dynamic_cast<SwUndoInsert *>(pLastUndo) );
+ if (pUndoInsert && pUndoInsert->CanGrouping(rPos))
{
- SwUndo * const pLastUndo = (*pUndos)[ nUndoSize - 1 ];
-
- switch (pLastUndo->GetId())
- {
- case UNDO_INSERT:
- case UNDO_TYPING:
- if (static_cast<SwUndoInsert*>(pLastUndo)
- ->CanGrouping( rPos ))
- {
- pUndo = static_cast<SwUndoInsert*>(pLastUndo);
- }
- break;
-
- default:
- break;
- }
+ pUndo = pUndoInsert;
}
}
@@ -903,7 +909,7 @@ bool SwDoc::InsertString( const SwPaM &rRg, const String &rStr,
{
pUndo = new SwUndoInsert( rPos.nNode, nInsPos, 0, nInsertMode,
!rCC.isLetterNumeric( rStr, 0 ) );
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
}
pNode->InsertText( rStr, rPos.nContent, nInsertMode );
@@ -911,12 +917,12 @@ bool SwDoc::InsertString( const SwPaM &rRg, const String &rStr,
for( xub_StrLen i = 0; i < rStr.Len(); ++i )
{
nInsPos++;
- // wenn CanGrouping() TRUE returnt, ist schon alles erledigt
+ // wenn CanGrouping() sal_True returnt, ist schon alles erledigt
if( !pUndo->CanGrouping( rStr.GetChar( i ) ))
{
pUndo = new SwUndoInsert( rPos.nNode, nInsPos, 1, nInsertMode,
!rCC.isLetterNumeric( rStr, i ) );
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
}
}
}
@@ -993,7 +999,7 @@ SwFlyFrmFmt* SwDoc::Insert(const SwPaM &rRg, const svt::EmbeddedObjectRef& xObj,
{
if( !pFrmFmt )
{
- USHORT nId = RES_POOLFRM_OLE;
+ sal_uInt16 nId = RES_POOLFRM_OLE;
SvGlobalName aClassName( xObj->getClassID() );
if (SotExchange::IsMath(aClassName))
nId = RES_POOLFRM_FORMEL;
@@ -1032,9 +1038,9 @@ SwFlyFrmFmt* SwDoc::InsertOLE(const SwPaM &rRg, const String& rObjName,
|* SwDoc::GetFldType()
|* Beschreibung: liefert den am Doc eingerichteten Feldtypen zurueck
*************************************************************************/
-SwFieldType *SwDoc::GetSysFldType( const USHORT eWhich ) const
+SwFieldType *SwDoc::GetSysFldType( const sal_uInt16 eWhich ) const
{
- for( USHORT i = 0; i < INIT_FLDTYPES; ++i )
+ for( sal_uInt16 i = 0; i < INIT_FLDTYPES; ++i )
if( eWhich == (*pFldTypes)[i]->Which() )
return (*pFldTypes)[i];
return 0;
@@ -1058,9 +1064,9 @@ struct _PostItFld : public _SetGetExpFld
_PostItFld( const SwNodeIndex& rNdIdx, const SwTxtFld* pFld, const SwIndex* pIdx = 0 )
: _SetGetExpFld( rNdIdx, pFld, pIdx ) {}
- USHORT GetPageNo( const StringRangeEnumerator &rRangeEnum,
+ sal_uInt16 GetPageNo( const StringRangeEnumerator &rRangeEnum,
const std::set< sal_Int32 > &rPossiblePages,
- USHORT& rVirtPgNo, USHORT& rLineNo );
+ sal_uInt16& rVirtPgNo, sal_uInt16& rLineNo );
SwPostItField* GetPostIt() const
{
@@ -1068,10 +1074,10 @@ struct _PostItFld : public _SetGetExpFld
}
};
-USHORT _PostItFld::GetPageNo(
+sal_uInt16 _PostItFld::GetPageNo(
const StringRangeEnumerator &rRangeEnum,
const std::set< sal_Int32 > &rPossiblePages,
- /* out */ USHORT& rVirtPgNo, /* out */ USHORT& rLineNo )
+ /* out */ sal_uInt16& rVirtPgNo, /* out */ sal_uInt16& rLineNo )
{
//Problem: Wenn ein PostItFld in einem Node steht, der von mehr als
//einer Layout-Instanz repraesentiert wird, steht die Frage im Raum,
@@ -1080,7 +1086,7 @@ USHORT _PostItFld::GetPageNo(
//sondern die des ersten Auftretens des PostIts innerhalb des selektierten
//Bereichs ermittelt werden.
rVirtPgNo = 0;
- USHORT nPos = GetCntnt();
+ sal_uInt16 nPos = GetCntnt();
SwClientIter aIter( (SwModify &)GetFld()->GetTxtNode() );
for( SwTxtFrm* pFrm = (SwTxtFrm*)aIter.First( TYPE( SwFrm ));
pFrm; pFrm = (SwTxtFrm*)aIter.Next() )
@@ -1088,10 +1094,10 @@ USHORT _PostItFld::GetPageNo(
if( pFrm->GetOfst() > nPos ||
(pFrm->HasFollow() && pFrm->GetFollow()->GetOfst() <= nPos) )
continue;
- USHORT nPgNo = pFrm->GetPhyPageNum();
+ sal_uInt16 nPgNo = pFrm->GetPhyPageNum();
if( rRangeEnum.hasValue( nPgNo, &rPossiblePages ))
{
- rLineNo = (USHORT)(pFrm->GetLineCount( nPos ) +
+ rLineNo = (sal_uInt16)(pFrm->GetLineCount( nPos ) +
pFrm->GetAllLines() - pFrm->GetThisLines());
rVirtPgNo = pFrm->GetVirtPageNum();
return nPgNo;
@@ -1142,7 +1148,7 @@ static void lcl_FormatPostIt(
SwPaM& aPam,
SwPostItField* pField,
bool bNewPage, bool bIsFirstPostIt,
- USHORT nPageNo, USHORT nLineNo )
+ sal_uInt16 nPageNo, sal_uInt16 nLineNo )
{
static char const sTmp[] = " : ";
@@ -1182,7 +1188,7 @@ static void lcl_FormatPostIt(
pIDCO->SplitNode( *aPam.GetPoint(), false );
aStr = pField->GetPar2();
-#if defined( WIN ) || defined( WNT ) || defined( PM2 )
+#if defined( WNT ) || defined( PM2 )
// Bei Windows und Co alle CR rausschmeissen
aStr.EraseAllChars( '\r' );
#endif
@@ -1197,7 +1203,7 @@ static sal_Int32 lcl_GetPaperBin( const SwPageFrm *pStartFrm )
const SwFrmFmt &rFmt = pStartFrm->GetPageDesc()->GetMaster();
const SfxPoolItem *pItem = NULL;
- SfxItemState eState = rFmt.GetItemState( RES_PAPER_BIN, FALSE, &pItem );
+ SfxItemState eState = rFmt.GetItemState( RES_PAPER_BIN, sal_False, &pItem );
const SvxPaperBinItem *pPaperBinItem = dynamic_cast< const SvxPaperBinItem * >(pItem);
if (eState > SFX_ITEM_DEFAULT && pPaperBinItem)
nRes = pPaperBinItem->GetValue();
@@ -1234,30 +1240,30 @@ void SwDoc::CalculatePagesForPrinting(
const SwPageFrm *pStPage = (SwPageFrm*)pLayout->Lower();
const SwFrm *pEndPage = pStPage;
- USHORT nFirstPageNo = 0;
- USHORT nLastPageNo = 0;
+ sal_uInt16 nFirstPageNo = 0;
+ sal_uInt16 nLastPageNo = 0;
- for( USHORT i = 1; i <= (USHORT)aPages.Max(); ++i )
+ for( sal_uInt16 i = 1; i <= (sal_uInt16)aPages.Max(); ++i )
{
- if( i < (USHORT)aPages.Min() )
+ if( i < (sal_uInt16)aPages.Min() )
{
if( !pStPage->GetNext() )
break;
pStPage = (SwPageFrm*)pStPage->GetNext();
pEndPage= pStPage;
}
- else if( i == (USHORT)aPages.Min() )
+ else if( i == (sal_uInt16)aPages.Min() )
{
nFirstPageNo = i;
nLastPageNo = nFirstPageNo;
- if( !pStPage->GetNext() || (i == (USHORT)aPages.Max()) )
+ if( !pStPage->GetNext() || (i == (sal_uInt16)aPages.Max()) )
break;
pEndPage = pStPage->GetNext();
}
- else if( i > (USHORT)aPages.Min() )
+ else if( i > (sal_uInt16)aPages.Min() )
{
nLastPageNo = i;
- if( !pEndPage->GetNext() || (i == (USHORT)aPages.Max()) )
+ if( !pEndPage->GetNext() || (i == (sal_uInt16)aPages.Max()) )
break;
pEndPage = pEndPage->GetNext();
}
@@ -1270,7 +1276,7 @@ void SwDoc::CalculatePagesForPrinting(
// geschaffen werden, alle Seiten von Seite x an zu deselektieren.
// Z.B. durch SetTotalRange ....
-// aMulti.Select( Range( nLastPageNo+1, SELECTION_MAX ), FALSE );
+// aMulti.Select( Range( nLastPageNo+1, SELECTION_MAX ), sal_False );
MultiSelection aTmpMulti( Range( 1, nLastPageNo ) );
long nTmpIdx = aMulti.FirstSelected();
static long nEndOfSelection = SFX_ENDOFSELECTION;
@@ -1282,7 +1288,7 @@ void SwDoc::CalculatePagesForPrinting(
aMulti = aTmpMulti;
// Ende des HACKs
- USHORT nPageNo = nFirstPageNo;
+ sal_uInt16 nPageNo = nFirstPageNo;
std::map< sal_Int32, sal_Int32 > &rPrinterPaperTrays = rData.GetPrinterPaperTrays();
std::set< sal_Int32 > &rValidPages = rData.GetValidPagesSet();
@@ -1291,7 +1297,7 @@ void SwDoc::CalculatePagesForPrinting(
rValidStartFrms.clear();
while ( pStPage )
{
- const BOOL bRightPg = pStPage->OnRightPage();
+ const sal_Bool bRightPg = pStPage->OnRightPage();
if ( aMulti.IsSelected( nPageNo ) &&
( (bRightPg && bPrintRightPages) ||
(!bRightPg && bPrintLeftPages) ) )
@@ -1373,7 +1379,7 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
sal_Int16 nPostItMode = (sal_Int16) rOptions.getIntValue( "PrintAnnotationMode", 0 );
DBG_ASSERT(nPostItMode == POSTITS_NONE || rData.HasPostItData(),
"print post-its without post-it data?" );
- const USHORT nPostItCount = rData.HasPostItData() ? rData.m_pPostItFields->Count() : 0;
+ const sal_uInt16 nPostItCount = rData.HasPostItData() ? rData.m_pPostItFields->Count() : 0;
if (nPostItMode != POSTITS_NONE && nPostItCount > 0)
{
SET_CURR_SHELL( rData.m_pPostItShell );
@@ -1397,9 +1403,9 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
// temporary post-it document.
// Since the array of post-it fileds is sorted by page and line number we will
// already get them in the correct order
- USHORT nVirtPg = 0, nLineNo = 0, nLastPageNum = 0, nPhyPageNum = 0;
+ sal_uInt16 nVirtPg = 0, nLineNo = 0, nLastPageNum = 0, nPhyPageNum = 0;
bool bIsFirstPostIt = true;
- for (USHORT i = 0; i < nPostItCount; ++i)
+ for (sal_uInt16 i = 0; i < nPostItCount; ++i)
{
_PostItFld& rPostIt = (_PostItFld&)*(*rData.m_pPostItFields)[ i ];
nLastPageNum = nPhyPageNum;
@@ -1639,7 +1645,7 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
// dann sorge mal dafuer, das alle Seiten in der richtigen
// Reihenfolge stehen:
- USHORT nSPg = 0, nEPg = aVec.size(), nStep = 1;
+ sal_uInt16 nSPg = 0, nEPg = aVec.size(), nStep = 1;
if ( 0 == (nEPg & 1 )) // ungerade gibt es nicht!
--nEPg;
@@ -1654,7 +1660,7 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
// the number of 'virtual' pages to be printed
sal_Int32 nCntPage = (( nEPg - nSPg ) / ( 2 * nStep )) + 1;
- for ( USHORT nPrintCount = 0; nSPg < nEPg &&
+ for ( sal_uInt16 nPrintCount = 0; nSPg < nEPg &&
nPrintCount < nCntPage; ++nPrintCount )
{
pStPage = aVec[ nSPg ];
@@ -1733,7 +1739,7 @@ void SwDoc::UpdateDocStat( SwDocStat& rStat )
rStat.nPara = 0; // Default ist auf 1 !!
SwNode* pNd;
- for( ULONG i = GetNodes().Count(); i; )
+ for( sal_uLong i = GetNodes().Count(); i; )
{
switch( ( pNd = GetNodes()[ --i ])->GetNodeType() )
{
@@ -1766,7 +1772,7 @@ void SwDoc::UpdateDocStat( SwDocStat& rStat )
}
rStat.nPage = GetRootFrm() ? GetRootFrm()->GetPageNum() : 0;
- rStat.bModified = FALSE;
+ rStat.bModified = sal_False;
SetDocStat( rStat );
com::sun::star::uno::Sequence < com::sun::star::beans::NamedValue > aStat( rStat.nPage ? 8 : 7);
@@ -1827,10 +1833,10 @@ void SwDoc::DocInfoChgd( )
const SwFmtRefMark* SwDoc::GetRefMark( const String& rName ) const
{
const SfxPoolItem* pItem;
- USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_REFMARK );
- for( USHORT n = 0; n < nMaxItems; ++n )
+ sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_REFMARK );
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
{
- if( 0 == (pItem = GetAttrPool().GetItem( RES_TXTATR_REFMARK, n ) ))
+ if( 0 == (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n ) ))
continue;
const SwFmtRefMark* pFmtRef = (SwFmtRefMark*)pItem;
@@ -1843,16 +1849,16 @@ const SwFmtRefMark* SwDoc::GetRefMark( const String& rName ) const
}
// returne die RefMark per Index - fuer Uno
-const SwFmtRefMark* SwDoc::GetRefMark( USHORT nIndex ) const
+const SwFmtRefMark* SwDoc::GetRefMark( sal_uInt16 nIndex ) const
{
const SfxPoolItem* pItem;
const SwTxtRefMark* pTxtRef;
const SwFmtRefMark* pRet = 0;
- USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_REFMARK );
- USHORT nCount = 0;
- for( USHORT n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = GetAttrPool().GetItem( RES_TXTATR_REFMARK, n )) &&
+ sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_REFMARK );
+ sal_uInt32 nCount = 0;
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
+ if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n )) &&
0 != (pTxtRef = ((SwFmtRefMark*)pItem)->GetTxtRefMark()) &&
&pTxtRef->GetTxtNode().GetNodes() == &GetNodes() )
{
@@ -1870,15 +1876,15 @@ const SwFmtRefMark* SwDoc::GetRefMark( USHORT nIndex ) const
//JP 24.06.96: Ist der ArrayPointer 0 dann returne nur, ob im Doc. eine
// RefMark gesetzt ist
// OS 25.06.96: ab jetzt wird immer die Anzahl der Referenzen returnt
-USHORT SwDoc::GetRefMarks( SvStringsDtor* pNames ) const
+sal_uInt16 SwDoc::GetRefMarks( SvStringsDtor* pNames ) const
{
const SfxPoolItem* pItem;
const SwTxtRefMark* pTxtRef;
- USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_REFMARK );
- USHORT nCount = 0;
- for( USHORT n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = GetAttrPool().GetItem( RES_TXTATR_REFMARK, n )) &&
+ sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_REFMARK );
+ sal_uInt32 nCount = 0;
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
+ if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_REFMARK, n )) &&
0 != (pTxtRef = ((SwFmtRefMark*)pItem)->GetTxtRefMark()) &&
&pTxtRef->GetTxtNode().GetNodes() == &GetNodes() )
{
@@ -1949,13 +1955,13 @@ void SwDoc::SetModified()
// Bit 0: -> alter Zustand
// Bit 1: -> neuer Zustand
long nCall = mbModified ? 3 : 2;
- mbModified = TRUE;
- pDocStat->bModified = TRUE;
+ mbModified = sal_True;
+ pDocStat->bModified = sal_True;
if( aOle2Link.IsSet() )
{
- mbInCallModified = TRUE;
+ mbInCallModified = sal_True;
aOle2Link.Call( (void*)nCall );
- mbInCallModified = FALSE;
+ mbInCallModified = sal_False;
}
if( pACEWord && !pACEWord->IsDeleted() )
@@ -1968,17 +1974,17 @@ void SwDoc::ResetModified()
// Bit 0: -> alter Zustand
// Bit 1: -> neuer Zustand
long nCall = mbModified ? 1 : 0;
- mbModified = FALSE;
+ mbModified = sal_False;
// If there is already a document statistic, we assume that
// it is correct. In this case we reset the modified flag.
if ( 0 != pDocStat->nChar )
- pDocStat->bModified = FALSE;
- nUndoSavePos = nUndoPos;
+ pDocStat->bModified = sal_False;
+ GetIDocumentUndoRedo().SetUndoNoModifiedPosition();
if( nCall && aOle2Link.IsSet() )
{
- mbInCallModified = TRUE;
+ mbInCallModified = sal_True;
aOle2Link.Call( (void*)nCall );
- mbInCallModified = FALSE;
+ mbInCallModified = sal_False;
}
}
@@ -1991,10 +1997,9 @@ void SwDoc::ReRead( SwPaM& rPam, const String& rGrfName,
|| rPam.GetPoint()->nNode.GetIndex() == rPam.GetMark()->nNode.GetIndex() )
&& 0 != ( pGrfNd = rPam.GetPoint()->nNode.GetNode().GetGrfNode() ) )
{
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoReRead( rPam, *pGrfNd ) );
+ GetIDocumentUndoRedo().AppendUndo(new SwUndoReRead(rPam, *pGrfNd));
}
// Weil nicht bekannt ist, ob sich die Grafik spiegeln laesst,
@@ -2003,15 +2008,15 @@ void SwDoc::ReRead( SwPaM& rPam, const String& rGrfName,
GetMirrorGrf().GetValue() )
pGrfNd->SetAttr( SwMirrorGrf() );
- pGrfNd->ReRead( rGrfName, rFltName, pGraphic, pGrafObj, TRUE );
+ pGrfNd->ReRead( rGrfName, rFltName, pGraphic, pGrafObj, sal_True );
SetModified();
}
}
-BOOL lcl_SpellAndGrammarAgain( const SwNodePtr& rpNd, void* pArgs )
+sal_Bool lcl_SpellAndGrammarAgain( const SwNodePtr& rpNd, void* pArgs )
{
SwTxtNode *pTxtNode = (SwTxtNode*)rpNd->GetTxtNode();
- BOOL bOnlyWrong = *(BOOL*)pArgs;
+ sal_Bool bOnlyWrong = *(sal_Bool*)pArgs;
if( pTxtNode )
{
if( bOnlyWrong )
@@ -2033,13 +2038,13 @@ BOOL lcl_SpellAndGrammarAgain( const SwNodePtr& rpNd, void* pArgs )
pTxtNode->GetGrammarCheck()->SetInvalid( 0, STRING_LEN );
}
}
- return TRUE;
+ return sal_True;
}
-BOOL lcl_CheckSmartTagsAgain( const SwNodePtr& rpNd, void* )
+sal_Bool lcl_CheckSmartTagsAgain( const SwNodePtr& rpNd, void* )
{
SwTxtNode *pTxtNode = (SwTxtNode*)rpNd->GetTxtNode();
-// BOOL bOnlyWrong = *(BOOL*)pArgs;
+// sal_Bool bOnlyWrong = *(sal_Bool*)pArgs;
if( pTxtNode )
{
pTxtNode->SetSmartTagDirty( true );
@@ -2051,20 +2056,20 @@ BOOL lcl_CheckSmartTagsAgain( const SwNodePtr& rpNd, void* )
pTxtNode->SetSmartTags( NULL );
}
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
- * SwDoc::SpellItAgainSam( BOOL bInvalid, BOOL bOnlyWrong )
+ * SwDoc::SpellItAgainSam( sal_Bool bInvalid, sal_Bool bOnlyWrong )
*
* stoesst das Spelling im Idle-Handler wieder an.
- * Wird bInvalid als TRUE uebergeben, so werden zusaetzlich die WrongListen
+ * Wird bInvalid als sal_True uebergeben, so werden zusaetzlich die WrongListen
* an allen Nodes invalidiert und auf allen Seiten das SpellInvalid-Flag
* gesetzt.
* Mit bOnlyWrong kann man dann steuern, ob nur die Bereiche mit falschen
* Woertern oder die kompletten Bereiche neu ueberprueft werden muessen.
************************************************************************/
-void SwDoc::SpellItAgainSam( BOOL bInvalid, BOOL bOnlyWrong, BOOL bSmartTags )
+void SwDoc::SpellItAgainSam( sal_Bool bInvalid, sal_Bool bOnlyWrong, sal_Bool bSmartTags )
{
OSL_ENSURE( GetRootFrm(), "SpellAgain: Where's my RootFrm?" );
if( bInvalid )
@@ -2099,7 +2104,7 @@ void SwDoc::InvalidateAutoCompleteFlag()
pPage->InvalidateAutoCompleteWords();
pPage = (SwPageFrm*)pPage->GetNext();
}
- for( ULONG nNd = 1, nCnt = GetNodes().Count(); nNd < nCnt; ++nNd )
+ for( sal_uLong nNd = 1, nCnt = GetNodes().Count(); nNd < nCnt; ++nNd )
{
SwTxtNode* pTxtNode = GetNodes()[ nNd ]->GetTxtNode();
if ( pTxtNode ) pTxtNode->SetAutoCompleteWordDirty( true );
@@ -2113,9 +2118,9 @@ const SwFmtINetFmt* SwDoc::FindINetAttr( const String& rName ) const
const SwFmtINetFmt* pItem;
const SwTxtINetFmt* pTxtAttr;
const SwTxtNode* pTxtNd;
- USHORT n, nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_INETFMT );
+ sal_uInt32 n, nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT );
for( n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = (SwFmtINetFmt*)GetAttrPool().GetItem(
+ if( 0 != (pItem = (SwFmtINetFmt*)GetAttrPool().GetItem2(
RES_TXTATR_INETFMT, n ) ) &&
pItem->GetName().Equals( rName ) &&
0 != ( pTxtAttr = pItem->GetTxtINetFmt()) &&
@@ -2128,27 +2133,27 @@ const SwFmtINetFmt* SwDoc::FindINetAttr( const String& rName ) const
return 0;
}
-void SwDoc::Summary( SwDoc* pExtDoc, BYTE nLevel, BYTE nPara, BOOL bImpress )
+void SwDoc::Summary( SwDoc* pExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, sal_Bool bImpress )
{
const SwOutlineNodes& rOutNds = GetNodes().GetOutLineNds();
if( pExtDoc && rOutNds.Count() )
{
- USHORT i;
+ sal_uInt16 i;
::StartProgress( STR_STATSTR_SUMMARY, 0, rOutNds.Count(), GetDocShell() );
SwNodeIndex aEndOfDoc( pExtDoc->GetNodes().GetEndOfContent(), -1 );
for( i = 0; i < rOutNds.Count(); ++i )
{
::SetProgressState( i, GetDocShell() );
- const ULONG nIndex = rOutNds[ i ]->GetIndex();
+ const sal_uLong nIndex = rOutNds[ i ]->GetIndex();
const int nLvl = ((SwTxtNode*)GetNodes()[ nIndex ])->GetAttrOutlineLevel()-1;//<-end,zhaojianwei
if( nLvl > nLevel )
continue;
- USHORT nEndOfs = 1;
- BYTE nWish = nPara;
- ULONG nNextOutNd = i + 1 < rOutNds.Count() ?
+ sal_uInt16 nEndOfs = 1;
+ sal_uInt8 nWish = nPara;
+ sal_uLong nNextOutNd = i + 1 < rOutNds.Count() ?
rOutNds[ i + 1 ]->GetIndex() : GetNodes().Count();
- BOOL bKeep = FALSE;
+ sal_Bool bKeep = sal_False;
while( ( nWish || bKeep ) && nIndex + nEndOfs < nNextOutNd &&
GetNodes()[ nIndex + nEndOfs ]->IsTxtNode() )
{
@@ -2170,7 +2175,7 @@ void SwDoc::Summary( SwDoc* pExtDoc, BYTE nLevel, BYTE nPara, BOOL bImpress )
while( aIndx < aEndOfDoc )
{
SwNode *pNode;
- BOOL bDelete = FALSE;
+ sal_Bool bDelete = sal_False;
if( (pNode = &aIndx.GetNode())->IsTxtNode() )
{
SwTxtNode *pNd = (SwTxtNode*)pNode;
@@ -2180,7 +2185,7 @@ void SwDoc::Summary( SwDoc* pExtDoc, BYTE nLevel, BYTE nPara, BOOL bImpress )
{
SwTxtFmtColl* pMyColl = pNd->GetTxtColl();
- const USHORT nHeadLine = static_cast<USHORT>(
+ const sal_uInt16 nHeadLine = static_cast<sal_uInt16>(
!pMyColl->IsAssignedToListLevelOfOutlineStyle() //<-end,zhaojianwei
? RES_POOLCOLL_HEADLINE2
: RES_POOLCOLL_HEADLINE1 );
@@ -2190,7 +2195,7 @@ void SwDoc::Summary( SwDoc* pExtDoc, BYTE nLevel, BYTE nPara, BOOL bImpress )
if( !pNd->Len() &&
pNd->StartOfSectionIndex()+2 < pNd->EndOfSectionIndex() )
{
- bDelete = TRUE;
+ bDelete = sal_True;
pExtDoc->GetNodes().Delete( aIndx );
}
}
@@ -2203,10 +2208,10 @@ void SwDoc::Summary( SwDoc* pExtDoc, BYTE nLevel, BYTE nPara, BOOL bImpress )
// loesche den nicht sichtbaren Content aus dem Document, wie z.B.:
// versteckte Bereiche, versteckte Absaetze
-BOOL SwDoc::RemoveInvisibleContent()
+bool SwDoc::RemoveInvisibleContent()
{
- BOOL bRet = FALSE;
- StartUndo( UNDO_UI_DELETE_INVISIBLECNTNT, NULL );
+ sal_Bool bRet = sal_False;
+ GetIDocumentUndoRedo().StartUndo( UNDO_UI_DELETE_INVISIBLECNTNT, NULL );
{
SwTxtNode* pTxtNd;
@@ -2219,7 +2224,7 @@ BOOL SwDoc::RemoveInvisibleContent()
pTxtNd->GetpSwpHints() && pTxtNd->HasHiddenParaField() &&
&pTxtNd->GetNodes() == &GetNodes() )
{
- bRet = TRUE;
+ bRet = sal_True;
SwPaM aPam( *pTxtNd, 0, *pTxtNd, pTxtNd->GetTxt().Len() );
// Remove hidden paragraph or delete contents:
@@ -2245,7 +2250,7 @@ BOOL SwDoc::RemoveInvisibleContent()
//
// Remove any hidden paragraph (hidden text attribute)
//
- for( ULONG n = GetNodes().Count(); n; )
+ for( sal_uLong n = GetNodes().Count(); n; )
{
SwTxtNode* pTxtNd = GetNodes()[ --n ]->GetTxtNode();
if ( pTxtNd )
@@ -2254,8 +2259,8 @@ BOOL SwDoc::RemoveInvisibleContent()
SwPaM aPam( *pTxtNd, 0, *pTxtNd, pTxtNd->GetTxt().Len() );
if ( pTxtNd->HasHiddenCharAttribute( true ) )
{
- bRemoved = TRUE;
- bRet = TRUE;
+ bRemoved = sal_True;
+ bRet = sal_True;
// Remove hidden paragraph or delete contents:
// Delete contents if
@@ -2277,8 +2282,8 @@ BOOL SwDoc::RemoveInvisibleContent()
}
else if ( pTxtNd->HasHiddenCharAttribute( false ) )
{
- bRemoved = TRUE;
- bRet = TRUE;
+ bRemoved = sal_True;
+ bRet = sal_True;
SwScriptInfo::DeleteHiddenRanges( *pTxtNd );
}
@@ -2293,7 +2298,7 @@ BOOL SwDoc::RemoveInvisibleContent()
// dann noch alle versteckten Bereiche loeschen/leeren
SwSectionFmts aSectFmts;
SwSectionFmts& rSectFmts = GetSections();
- USHORT n;
+ sal_uInt16 n;
for( n = rSectFmts.Count(); n; )
{
@@ -2332,7 +2337,7 @@ BOOL SwDoc::RemoveInvisibleContent()
SwSectionNode* pSectNd = pSectFmt->GetSectionNode();
if( pSectNd )
{
- bRet = TRUE;
+ bRet = sal_True;
SwPaM aPam( *pSectNd );
if( pSectNd->StartOfSectionNode()->StartOfSectionIndex() ==
@@ -2368,15 +2373,78 @@ BOOL SwDoc::RemoveInvisibleContent()
if( bRet )
SetModified();
- EndUndo( UNDO_UI_DELETE_INVISIBLECNTNT, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_UI_DELETE_INVISIBLECNTNT, NULL );
+ return bRet;
+}
+/*-- 25.08.2010 14:18:12---------------------------------------------------
+
+ -----------------------------------------------------------------------*/
+bool SwDoc::HasInvisibleContent() const
+{
+ sal_Bool bRet = sal_False;
+
+ SwClientIter aIter( *GetSysFldType( RES_HIDDENPARAFLD ) );
+ if( aIter.First( TYPE( SwFmtFld ) ) )
+ bRet = sal_True;
+
+ //
+ // Search for any hidden paragraph (hidden text attribute)
+ //
+ if( ! bRet )
+ {
+ for( sal_uLong n = GetNodes().Count(); !bRet && (n > 0); )
+ {
+ SwTxtNode* pTxtNd = GetNodes()[ --n ]->GetTxtNode();
+ if ( pTxtNd )
+ {
+ SwPaM aPam( *pTxtNd, 0, *pTxtNd, pTxtNd->GetTxt().Len() );
+ if( pTxtNd->HasHiddenCharAttribute( true ) || ( pTxtNd->HasHiddenCharAttribute( false ) ) )
+ {
+ bRet = sal_True;
+ }
+ }
+ }
+ }
+
+ if( ! bRet )
+ {
+ const SwSectionFmts& rSectFmts = GetSections();
+ sal_uInt16 n;
+
+ for( n = rSectFmts.Count(); !bRet && (n > 0); )
+ {
+ SwSectionFmt* pSectFmt = rSectFmts[ --n ];
+ // don't add sections in Undo/Redo
+ if( !pSectFmt->IsInNodesArr())
+ continue;
+ SwSection* pSect = pSectFmt->GetSection();
+ if( pSect->IsHidden() )
+ bRet = sal_True;
+ }
+ }
return bRet;
}
-BOOL SwDoc::ConvertFieldsToText()
+bool SwDoc::RestoreInvisibleContent()
{
- BOOL bRet = FALSE;
+ bool bRet = false;
+ SwUndoId nLastUndoId(UNDO_EMPTY);
+ if (GetIDocumentUndoRedo().GetLastUndoInfo(0, & nLastUndoId)
+ && (UNDO_UI_DELETE_INVISIBLECNTNT == nLastUndoId))
+ {
+ GetIDocumentUndoRedo().Undo();
+ GetIDocumentUndoRedo().ClearRedo();
+ bRet = true;
+ }
+ return bRet;
+}
+
+
+sal_Bool SwDoc::ConvertFieldsToText()
+{
+ sal_Bool bRet = sal_False;
LockExpFlds();
- StartUndo( UNDO_UI_REPLACE, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_UI_REPLACE, NULL );
const SwFldTypes* pMyFldTypes = GetFldTypes();
sal_uInt16 nCount = pMyFldTypes->Count();
@@ -2404,17 +2472,17 @@ BOOL SwDoc::ConvertFieldsToText()
// skip fields that are currently not in the document
// e.g. fields in undo or redo array
- BOOL bSkip = !pTxtFld ||
+ sal_Bool bSkip = !pTxtFld ||
!pTxtFld->GetpTxtNode()->GetNodes().IsDocNodes();
if (!bSkip)
{
- BOOL bInHeaderFooter = IsInHeaderFooter(SwNodeIndex(*pTxtFld->GetpTxtNode()));
+ sal_Bool bInHeaderFooter = IsInHeaderFooter(SwNodeIndex(*pTxtFld->GetpTxtNode()));
const SwFmtFld& rFmtFld = pTxtFld->GetFld();
const SwField* pField = rFmtFld.GetFld();
//#i55595# some fields have to be excluded in headers/footers
- USHORT nWhich = pField->GetTyp()->Which();
+ sal_uInt16 nWhich = pField->GetTyp()->Which();
if(!bInHeaderFooter ||
(nWhich != RES_PAGENUMBERFLD &&
nWhich != RES_CHAPTERFLD &&
@@ -2424,7 +2492,7 @@ BOOL SwDoc::ConvertFieldsToText()
nWhich != RES_REFPAGEGETFLD&&
nWhich != RES_REFPAGESETFLD))
{
- String sText = pField->GetCntnt();
+ String sText = pField->ExpandField(true);
//database fields should not convert their command into text
if( RES_DBFLD == pCurType->Which() && !static_cast<const SwDBField*>(pField)->IsInitialized())
sText.Erase();
@@ -2446,7 +2514,7 @@ BOOL SwDoc::ConvertFieldsToText()
if( bRet )
SetModified();
- EndUndo( UNDO_UI_REPLACE, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_UI_REPLACE, NULL );
UnlockExpFlds();
return bRet;
@@ -2483,26 +2551,17 @@ bool SwDoc::LinksUpdated() const
}
// embedded alle lokalen Links (Bereiche/Grafiken)
-bool SwDoc::EmbedAllLinks()
+::sfx2::SvBaseLink* lcl_FindNextRemovableLink( const ::sfx2::SvBaseLinks& rLinks, sfx2::LinkManager& rLnkMgr )
{
- BOOL bRet = FALSE;
- sfx2::LinkManager& rLnkMgr = GetLinkManager();
- const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.GetLinks();
- if( rLnks.Count() )
+ for( sal_uInt16 n = 0; n < rLinks.Count(); ++n )
{
- BOOL bDoesUndo = DoesUndo();
- DoUndo( FALSE );
-
- for( USHORT n = 0; n < rLnks.Count(); ++n )
+ ::sfx2::SvBaseLink* pLnk = &(*rLinks[ n ]);
+ if( pLnk &&
+ ( OBJECT_CLIENT_GRF == pLnk->GetObjType() ||
+ OBJECT_CLIENT_FILE == pLnk->GetObjType() ) &&
+ pLnk->ISA( SwBaseLink ) )
{
- ::sfx2::SvBaseLink* pLnk = &(*rLnks[ n ]);
- if( pLnk &&
- ( OBJECT_CLIENT_GRF == pLnk->GetObjType() ||
- OBJECT_CLIENT_FILE == pLnk->GetObjType() ) &&
- pLnk->ISA( SwBaseLink ) )
- {
::sfx2::SvBaseLinkRef xLink = pLnk;
- USHORT nCount = rLnks.Count();
String sFName;
rLnkMgr.GetDisplayNames( xLink, 0, &sFName, 0, 0 );
@@ -2510,46 +2569,57 @@ bool SwDoc::EmbedAllLinks()
INetURLObject aURL( sFName );
if( INET_PROT_FILE == aURL.GetProtocol() ||
INET_PROT_CID == aURL.GetProtocol() )
- {
- // dem Link sagen, das er aufgeloest wird!
- xLink->Closed();
+ return pLnk;
+ }
+ }
+ return 0;
+}
+bool SwDoc::EmbedAllLinks()
+{
+ sal_Bool bRet = sal_False;
+ sfx2::LinkManager& rLnkMgr = GetLinkManager();
+ const ::sfx2::SvBaseLinks& rLinks = rLnkMgr.GetLinks();
+ if( rLinks.Count() )
+ {
+ ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
- // falls einer vergessen hat sich auszutragen
- if( xLink.Is() )
- rLnkMgr.Remove( xLink );
+ ::sfx2::SvBaseLink* pLnk = 0;
+ while( 0 != (pLnk = lcl_FindNextRemovableLink( rLinks, rLnkMgr ) ) )
+ {
+ ::sfx2::SvBaseLinkRef xLink = pLnk;
+ // dem Link sagen, das er aufgeloest wird!
+ xLink->Closed();
- if( nCount != rLnks.Count() + 1 )
- n = 0; // wieder von vorne anfangen, es wurden
- // mehrere Links entfernt
- bRet = TRUE;
- }
- }
+ // falls einer vergessen hat sich auszutragen
+ if( xLink.Is() )
+ rLnkMgr.Remove( xLink );
+
+ bRet = sal_True;
}
- DelAllUndoObj();
- DoUndo( bDoesUndo );
+ GetIDocumentUndoRedo().DelAllUndoObj();
SetModified();
}
return bRet;
}
-BOOL SwDoc::IsInsTblFormatNum() const
+sal_Bool SwDoc::IsInsTblFormatNum() const
{
return SW_MOD()->IsInsTblFormatNum(get(IDocumentSettingAccess::HTML_MODE));
}
-BOOL SwDoc::IsInsTblChangeNumFormat() const
+sal_Bool SwDoc::IsInsTblChangeNumFormat() const
{
return SW_MOD()->IsInsTblChangeNumFormat(get(IDocumentSettingAccess::HTML_MODE));
}
-BOOL SwDoc::IsInsTblAlignNum() const
+sal_Bool SwDoc::IsInsTblAlignNum() const
{
return SW_MOD()->IsInsTblAlignNum(get(IDocumentSettingAccess::HTML_MODE));
}
// setze das InsertDB als Tabelle Undo auf:
-void SwDoc::AppendUndoForInsertFromDB( const SwPaM& rPam, BOOL bIsTable )
+void SwDoc::AppendUndoForInsertFromDB( const SwPaM& rPam, sal_Bool bIsTable )
{
if( bIsTable )
{
@@ -2558,26 +2628,26 @@ void SwDoc::AppendUndoForInsertFromDB( const SwPaM& rPam, BOOL bIsTable )
{
SwUndoCpyTbl* pUndo = new SwUndoCpyTbl;
pUndo->SetTableSttIdx( pTblNd->GetIndex() );
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
}
}
else if( rPam.HasMark() )
{
SwUndoCpyDoc* pUndo = new SwUndoCpyDoc( rPam );
- pUndo->SetInsertRange( rPam, FALSE );
- AppendUndo( pUndo );
+ pUndo->SetInsertRange( rPam, sal_False );
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
}
}
void SwDoc::ChgTOX(SwTOXBase & rTOX, const SwTOXBase & rNew)
{
- if (DoesUndo())
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- DelAllUndoObj();
+ GetIDocumentUndoRedo().DelAllUndoObj();
SwUndo * pUndo = new SwUndoTOXChange(&rTOX, rNew);
- AppendUndo(pUndo);
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
rTOX = rNew;
@@ -2594,9 +2664,9 @@ String SwDoc::GetPaMDescr(const SwPaM & rPam) const
String aResult;
bool bOK = false;
- if (rPam.GetNode(TRUE) == rPam.GetNode(FALSE))
+ if (rPam.GetNode(sal_True) == rPam.GetNode(sal_False))
{
- SwTxtNode * pTxtNode = rPam.GetNode(TRUE)->GetTxtNode();
+ SwTxtNode * pTxtNode = rPam.GetNode(sal_True)->GetTxtNode();
if (0 != pTxtNode)
{
@@ -2613,9 +2683,9 @@ String SwDoc::GetPaMDescr(const SwPaM & rPam) const
bOK = true;
}
}
- else if (0 != rPam.GetNode(TRUE))
+ else if (0 != rPam.GetNode(sal_True))
{
- if (0 != rPam.GetNode(FALSE))
+ if (0 != rPam.GetNode(sal_False))
aResult += String(SW_RES(STR_PARAGRAPHS));
bOK = true;
@@ -2646,7 +2716,7 @@ SwTxtFld * SwDoc::GetTxtFld(const SwPosition & rPos)
bool SwDoc::ContainsHiddenChars() const
{
- for( ULONG n = GetNodes().Count(); n; )
+ for( sal_uLong n = GetNodes().Count(); n; )
{
SwNode* pNd = GetNodes()[ --n ];
if ( ND_TEXTNODE == pNd->GetNodeType() &&
@@ -2657,7 +2727,7 @@ bool SwDoc::ContainsHiddenChars() const
return false;
}
-SwUnoCrsr* SwDoc::CreateUnoCrsr( const SwPosition& rPos, BOOL bTblCrsr )
+SwUnoCrsr* SwDoc::CreateUnoCrsr( const SwPosition& rPos, sal_Bool bTblCrsr )
{
SwUnoCrsr* pNew;
if( bTblCrsr )
@@ -2671,7 +2741,7 @@ SwUnoCrsr* SwDoc::CreateUnoCrsr( const SwPosition& rPos, BOOL bTblCrsr )
void SwDoc::ChkCondColls()
{
- for (USHORT n = 0; n < pTxtFmtCollTbl->Count(); n++)
+ for (sal_uInt16 n = 0; n < pTxtFmtCollTbl->Count(); n++)
{
SwTxtFmtColl *pColl = (*pTxtFmtCollTbl)[n];
diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx
index 598e8e5c7c83..00c6d40b5d91 100644
--- a/sw/source/core/doc/docbasic.cxx
+++ b/sw/source/core/doc/docbasic.cxx
@@ -52,13 +52,13 @@ static Sequence<Any> *lcl_docbasic_convertArgs( SbxArray& rArgs )
{
Sequence<Any> *pRet = 0;
- USHORT nCount = rArgs.Count();
+ sal_uInt16 nCount = rArgs.Count();
if( nCount > 1 )
{
nCount--;
pRet = new Sequence<Any>( nCount );
Any *pUnoArgs = pRet->getArray();
- for( USHORT i=0; i<nCount; i++ )
+ for( sal_uInt16 i=0; i<nCount; i++ )
{
SbxVariable *pVar = rArgs.Get( i+1 );
switch( pVar->GetType() )
@@ -85,7 +85,7 @@ static Sequence<Any> *lcl_docbasic_convertArgs( SbxArray& rArgs )
return pRet;
}
-BOOL SwDoc::ExecMacro( const SvxMacro& rMacro, String* pRet, SbxArray* pArgs )
+sal_Bool SwDoc::ExecMacro( const SvxMacro& rMacro, String* pRet, SbxArray* pArgs )
{
ErrCode eErr = 0;
switch( rMacro.GetScriptType() )
@@ -97,7 +97,7 @@ BOOL SwDoc::ExecMacro( const SvxMacro& rMacro, String* pRet, SbxArray* pArgs )
aRef = pRetValue;
eErr = pDocShell->CallBasic( rMacro.GetMacName(),
rMacro.GetLibName(),
- 0, pArgs, pRet ? pRetValue : 0 );
+ pArgs, pRet ? pRetValue : 0 );
if( pRet && SbxNULL < pRetValue->GetType() &&
SbxVOID != pRetValue->GetType() )
@@ -144,13 +144,13 @@ BOOL SwDoc::ExecMacro( const SvxMacro& rMacro, String* pRet, SbxArray* pArgs )
-USHORT SwDoc::CallEvent( USHORT nEvent, const SwCallMouseEvent& rCallEvent,
- BOOL bCheckPtr, SbxArray* pArgs, const Link* )
+sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent,
+ sal_Bool bCheckPtr, SbxArray* pArgs, const Link* )
{
if( !pDocShell ) // ohne DocShell geht das nicht!
return 0;
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
const SvxMacroTableDtor* pTbl = 0;
switch( rCallEvent.eType )
{
@@ -158,12 +158,12 @@ USHORT SwDoc::CallEvent( USHORT nEvent, const SwCallMouseEvent& rCallEvent,
if( bCheckPtr )
{
const SfxPoolItem* pItem;
- USHORT n, nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_INETFMT );
+ sal_uInt32 n, nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT );
for( n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = GetAttrPool().GetItem( RES_TXTATR_INETFMT, n ) )
+ if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) )
&& rCallEvent.PTR.pINetAttr == pItem )
{
- bCheckPtr = FALSE; // als Flag missbrauchen
+ bCheckPtr = sal_False; // als Flag missbrauchen
break;
}
}
@@ -177,9 +177,9 @@ USHORT SwDoc::CallEvent( USHORT nEvent, const SwCallMouseEvent& rCallEvent,
const SwFrmFmtPtr pFmt = (SwFrmFmtPtr)rCallEvent.PTR.pFmt;
if( bCheckPtr )
{
- USHORT nPos = GetSpzFrmFmts()->GetPos( pFmt );
+ sal_uInt16 nPos = GetSpzFrmFmts()->GetPos( pFmt );
if( USHRT_MAX != nPos )
- bCheckPtr = FALSE; // als Flag missbrauchen
+ bCheckPtr = sal_False; // als Flag missbrauchen
}
if( !bCheckPtr )
pTbl = &pFmt->GetMacro().GetMacroTable();
@@ -192,7 +192,7 @@ USHORT SwDoc::CallEvent( USHORT nEvent, const SwCallMouseEvent& rCallEvent,
if( bCheckPtr )
{
const SwFrmFmtPtr pFmt = (SwFrmFmtPtr)rCallEvent.PTR.IMAP.pFmt;
- USHORT nPos = GetSpzFrmFmts()->GetPos( pFmt );
+ sal_uInt16 nPos = GetSpzFrmFmts()->GetPos( pFmt );
const ImageMap* pIMap;
if( USHRT_MAX != nPos &&
0 != (pIMap = pFmt->GetURL().GetMap()) )
@@ -200,7 +200,7 @@ USHORT SwDoc::CallEvent( USHORT nEvent, const SwCallMouseEvent& rCallEvent,
for( nPos = pIMap->GetIMapObjectCount(); nPos; )
if( pIMapObj == pIMap->GetIMapObject( --nPos ))
{
- bCheckPtr = FALSE; // als Flag missbrauchen
+ bCheckPtr = sal_False; // als Flag missbrauchen
break;
}
}
@@ -222,7 +222,7 @@ USHORT SwDoc::CallEvent( USHORT nEvent, const SwCallMouseEvent& rCallEvent,
if( STARBASIC == rMacro.GetScriptType() )
{
nRet += 0 == pDocShell->CallBasic( rMacro.GetMacName(),
- rMacro.GetLibName(), 0, pArgs ) ? 1 : 0;
+ rMacro.GetLibName(), pArgs ) ? 1 : 0;
}
else if( EXTENDED_STYPE == rMacro.GetScriptType() )
{
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 40a4fce05d12..5a0b377ee5d4 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -58,7 +58,6 @@
#include <swserv.hxx>
#include <swundo.hxx>
#include <tools/pstm.hxx>
-#include <undobj.hxx>
#include <unocrsr.hxx>
#include <viscrs.hxx>
#include <stdio.h>
@@ -247,7 +246,7 @@ namespace
bind(&::rtl::OUString::equals, bind(&IMark::GetName, _1), rName));
}
-#if FALSE
+#if 0
static void lcl_DebugMarks(IDocumentMarkAccess::container_t vMarks)
{
OSL_TRACE("%d Marks", vMarks.size());
@@ -320,7 +319,7 @@ namespace sw { namespace mark
const ::rtl::OUString& rName,
const IDocumentMarkAccess::MarkType eType)
{
-#if FALSE
+#if 0
{
::rtl::OString sName = ::rtl::OUStringToOString(rName, RTL_TEXTENCODING_UTF8);
const SwPosition* const pPos1 = rPaM.GetPoint();
@@ -407,7 +406,7 @@ namespace sw { namespace mark
break;
}
pMarkBase->InitDoc(m_pDoc);
-#if FALSE
+#if 0
OSL_TRACE("--- makeType ---");
OSL_TRACE("Marks");
lcl_DebugMarks(m_vMarks);
@@ -518,7 +517,7 @@ namespace sw { namespace mark
// restore sorting if needed
if(isSortingNeeded)
sortMarks();
-#if FALSE
+#if 0
OSL_TRACE("correctMarksAbsolute");
lcl_DebugMarks(m_vMarks);
#endif
@@ -558,7 +557,7 @@ namespace sw { namespace mark
// restore sorting if needed
if(isSortingNeeded)
sortMarks();
-#if FALSE
+#if 0
OSL_TRACE("correctMarksRelative");
lcl_DebugMarks(m_vMarks);
#endif
@@ -674,7 +673,7 @@ namespace sw { namespace mark
}
if(isSortingNeeded)
sortMarks();
-#if FALSE
+#if 0
OSL_TRACE("deleteMarks");
lcl_DebugMarks(m_vMarks);
#endif
@@ -877,19 +876,19 @@ namespace
class _SwSaveTypeCountContent
{
union {
- struct { USHORT nType, nCount; } TC;
- ULONG nTypeCount;
+ struct { sal_uInt16 nType, nCount; } TC;
+ sal_uLong nTypeCount;
} TYPECOUNT;
xub_StrLen nContent;
public:
_SwSaveTypeCountContent() { TYPECOUNT.nTypeCount = 0; nContent = 0; }
- _SwSaveTypeCountContent( USHORT nType )
+ _SwSaveTypeCountContent( sal_uInt16 nType )
{
SetTypeAndCount( nType, 0 );
nContent = 0;
}
- _SwSaveTypeCountContent( const SvULongs& rArr, USHORT& rPos )
+ _SwSaveTypeCountContent( const SvULongs& rArr, sal_uInt16& rPos )
{
TYPECOUNT.nTypeCount = rArr[ rPos++ ];
nContent = static_cast<xub_StrLen>(rArr[ rPos++ ]);
@@ -900,17 +899,17 @@ namespace
rArr.Insert( nContent, rArr.Count() );
}
- void SetType( USHORT n ) { TYPECOUNT.TC.nType = n; }
- USHORT GetType() const { return TYPECOUNT.TC.nType; }
+ void SetType( sal_uInt16 n ) { TYPECOUNT.TC.nType = n; }
+ sal_uInt16 GetType() const { return TYPECOUNT.TC.nType; }
void IncType() { ++TYPECOUNT.TC.nType; }
void DecType() { --TYPECOUNT.TC.nType; }
- void SetCount( USHORT n ) { TYPECOUNT.TC.nCount = n; }
- USHORT GetCount() const { return TYPECOUNT.TC.nCount; }
- USHORT IncCount() { return ++TYPECOUNT.TC.nCount; }
- USHORT DecCount() { return --TYPECOUNT.TC.nCount; }
+ void SetCount( sal_uInt16 n ) { TYPECOUNT.TC.nCount = n; }
+ sal_uInt16 GetCount() const { return TYPECOUNT.TC.nCount; }
+ sal_uInt16 IncCount() { return ++TYPECOUNT.TC.nCount; }
+ sal_uInt16 DecCount() { return --TYPECOUNT.TC.nCount; }
- void SetTypeAndCount( USHORT nT, USHORT nC )
+ void SetTypeAndCount( sal_uInt16 nT, sal_uInt16 nC )
{ TYPECOUNT.TC.nCount = nC; TYPECOUNT.TC.nType = nT; }
void SetContent( xub_StrLen n ) { nContent = n; }
@@ -926,9 +925,9 @@ namespace
static const int BEHIND_SAME_NODE = 3; // Same node index but content index behind given content index
static const int BEHIND_NODE = 4; // Position behind the given node index
- static int lcl_RelativePosition( const SwPosition& rPos, ULONG nNode, xub_StrLen nCntnt )
+ static int lcl_RelativePosition( const SwPosition& rPos, sal_uLong nNode, xub_StrLen nCntnt )
{
- ULONG nIndex = rPos.nNode.GetIndex();
+ sal_uLong nIndex = rPos.nNode.GetIndex();
int nReturn = BEFORE_NODE;
if( nIndex == nNode )
{
@@ -951,17 +950,17 @@ namespace
return rPos.nNode > rNdIdx || ( pIdx && rPos.nNode == rNdIdx && rPos.nContent > pIdx->GetIndex() );
}
- static void lcl_ChkPaM( SvULongs& rSaveArr, ULONG nNode, xub_StrLen nCntnt,
+ static void lcl_ChkPaM( SvULongs& rSaveArr, sal_uLong nNode, xub_StrLen nCntnt,
const SwPaM& rPam, _SwSaveTypeCountContent& rSave,
- BOOL bChkSelDirection )
+ sal_Bool bChkSelDirection )
{
// SelektionsRichtung beachten
- bool bBound1IsStart = !bChkSelDirection ? TRUE :
+ bool bBound1IsStart = !bChkSelDirection ? sal_True :
( *rPam.GetPoint() < *rPam.GetMark()
? rPam.GetPoint() == &rPam.GetBound()
: rPam.GetMark() == &rPam.GetBound());
- const SwPosition* pPos = &rPam.GetBound( TRUE );
+ const SwPosition* pPos = &rPam.GetBound( sal_True );
if( pPos->nNode.GetIndex() == nNode &&
( bBound1IsStart ? pPos->nContent.GetIndex() < nCntnt
: pPos->nContent.GetIndex() <= nCntnt ))
@@ -970,7 +969,7 @@ namespace
rSave.Add( rSaveArr );
}
- pPos = &rPam.GetBound( FALSE );
+ pPos = &rPam.GetBound( sal_False );
if( pPos->nNode.GetIndex() == nNode &&
( (bBound1IsStart && bChkSelDirection)
? pPos->nContent.GetIndex() <= nCntnt
@@ -1067,12 +1066,12 @@ void SaveBookmark::SetInDoc(
if(pIdx && !m_nNode2)
aPam.GetMark()->nContent += m_nCntnt2;
else
- aPam.GetMark()->nContent.Assign(aPam.GetCntntNode(FALSE), m_nCntnt2);
+ aPam.GetMark()->nContent.Assign(aPam.GetCntntNode(sal_False), m_nCntnt2);
}
else
{
aPam.GetMark()->nNode = m_nNode2;
- aPam.GetMark()->nContent.Assign(aPam.GetCntntNode(FALSE), m_nCntnt2);
+ aPam.GetMark()->nContent.Assign(aPam.GetCntntNode(sal_False), m_nCntnt2);
}
}
@@ -1092,7 +1091,7 @@ void SaveBookmark::SetInDoc(
}
if(!aPam.HasMark()
- || CheckNodesRange(aPam.GetPoint()->nNode, aPam.GetMark()->nNode, TRUE))
+ || CheckNodesRange(aPam.GetPoint()->nNode, aPam.GetMark()->nNode, sal_True))
{
::sw::mark::IBookmark* const pBookmark = dynamic_cast< ::sw::mark::IBookmark* >(pDoc->getIDocumentMarkAccess()->makeMark(aPam, m_aName, m_eOrigBkmType));
if(pBookmark)
@@ -1134,13 +1133,13 @@ void _DelBookmarks(
// Array, das alle Angaben auf die Position als Offset speichert.
// Die neue Zuordung erfolgt nach dem Moven.
SwRedlineTbl& rTbl = (SwRedlineTbl&)pDoc->GetRedlineTbl();
- for(USHORT nCnt = 0; nCnt < rTbl.Count(); ++nCnt )
+ for(sal_uInt16 nCnt = 0; nCnt < rTbl.Count(); ++nCnt )
{
// liegt auf der Position ??
SwRedline* pRedl = rTbl[ nCnt ];
- SwPosition *pRStt = &pRedl->GetBound(TRUE),
- *pREnd = &pRedl->GetBound(FALSE);
+ SwPosition *pRStt = &pRedl->GetBound(sal_True),
+ *pREnd = &pRedl->GetBound(sal_False);
if( *pRStt > *pREnd )
{
SwPosition *pTmp = pRStt; pRStt = pREnd, pREnd = pTmp;
@@ -1153,11 +1152,11 @@ void _DelBookmarks(
pRStt->nContent = *pEndIdx;
else
{
- BOOL bStt = TRUE;
+ sal_Bool bStt = sal_True;
SwCntntNode* pCNd = pRStt->nNode.GetNode().GetCntntNode();
if( !pCNd && 0 == ( pCNd = pDoc->GetNodes().GoNext( &pRStt->nNode )) )
{
- bStt = FALSE;
+ bStt = sal_False;
pRStt->nNode = rStt;
if( 0 == ( pCNd = pDoc->GetNodes().GoPrevious( &pRStt->nNode )) )
{
@@ -1176,11 +1175,11 @@ void _DelBookmarks(
pREnd->nContent = *pSttIdx;
else
{
- BOOL bStt = FALSE;
+ sal_Bool bStt = sal_False;
SwCntntNode* pCNd = pREnd->nNode.GetNode().GetCntntNode();
if( !pCNd && 0 == ( pCNd = pDoc->GetNodes().GoPrevious( &pREnd->nNode )) )
{
- bStt = TRUE;
+ bStt = sal_True;
pREnd->nNode = rEnd;
if( 0 == ( pCNd = pDoc->GetNodes().GoNext( &pREnd->nNode )) )
{
@@ -1196,10 +1195,10 @@ void _DelBookmarks(
}
void _SaveCntntIdx(SwDoc* pDoc,
- ULONG nNode,
+ sal_uLong nNode,
xub_StrLen nCntnt,
SvULongs& rSaveArr,
- BYTE nSaveFly)
+ sal_uInt8 nSaveFly)
{
// 1. Bookmarks
_SwSaveTypeCountContent aSave;
@@ -1280,7 +1279,7 @@ void _SaveCntntIdx(SwDoc* pDoc,
SwFrm* pFrm = pNode->GetFrm();
#if OSL_DEBUG_LEVEL > 1
- static BOOL bViaDoc = FALSE;
+ static sal_Bool bViaDoc = sal_False;
if( bViaDoc )
pFrm = NULL;
#endif
@@ -1374,14 +1373,14 @@ void _SaveCntntIdx(SwDoc* pDoc,
if( _pStkCrsr )
do {
lcl_ChkPaM( rSaveArr, nNode, nCntnt, *_pStkCrsr,
- aSave, FALSE );
+ aSave, sal_False );
aSave.IncCount();
} while ( (_pStkCrsr != 0 ) &&
((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != PCURSH->GetStkCrsr()) );
FOREACHPAM_START( PCURSH->_GetCrsr() )
lcl_ChkPaM( rSaveArr, nNode, nCntnt, *PCURCRSR,
- aSave, FALSE );
+ aSave, sal_False );
aSave.IncCount();
FOREACHPAM_END()
@@ -1392,10 +1391,10 @@ void _SaveCntntIdx(SwDoc* pDoc,
{
aSave.SetTypeAndCount( 0x400, 0 );
const SwUnoCrsrTbl& rTbl = pDoc->GetUnoCrsrTbl();
- for( USHORT n = 0; n < rTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
{
FOREACHPAM_START( rTbl[ n ] )
- lcl_ChkPaM( rSaveArr, nNode, nCntnt, *PCURCRSR, aSave, FALSE );
+ lcl_ChkPaM( rSaveArr, nNode, nCntnt, *PCURCRSR, aSave, sal_False );
aSave.IncCount();
FOREACHPAM_END()
@@ -1404,7 +1403,7 @@ void _SaveCntntIdx(SwDoc* pDoc,
if( pUnoTblCrsr )
{
FOREACHPAM_START( &pUnoTblCrsr->GetSelRing() )
- lcl_ChkPaM( rSaveArr, nNode, nCntnt, *PCURCRSR, aSave, FALSE );
+ lcl_ChkPaM( rSaveArr, nNode, nCntnt, *PCURCRSR, aSave, sal_False );
aSave.IncCount();
FOREACHPAM_END()
}
@@ -1415,15 +1414,15 @@ void _SaveCntntIdx(SwDoc* pDoc,
void _RestoreCntntIdx(SwDoc* pDoc,
SvULongs& rSaveArr,
- ULONG nNode,
+ sal_uLong nNode,
xub_StrLen nOffset,
- BOOL bAuto)
+ sal_Bool bAuto)
{
SwCntntNode* pCNd = pDoc->GetNodes()[ nNode ]->GetCntntNode();
const SwRedlineTbl& rRedlTbl = pDoc->GetRedlineTbl();
SwSpzFrmFmts* pSpz = pDoc->GetSpzFrmFmts();
IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
- USHORT n = 0;
+ sal_uInt16 n = 0;
while( n < rSaveArr.Count() )
{
_SwSaveTypeCountContent aSave( rSaveArr, n );
@@ -1492,7 +1491,7 @@ void _RestoreCntntIdx(SwDoc* pDoc,
SwCrsrShell* pShell = pDoc->GetEditShell();
if( pShell )
{
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
FOREACHSHELL_START( pShell )
SwPaM *_pStkCrsr = PCURSH->GetStkCrsr();
if( _pStkCrsr )
@@ -1530,9 +1529,9 @@ void _RestoreCntntIdx(SwDoc* pDoc,
case 0x0400:
case 0x0401:
{
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
const SwUnoCrsrTbl& rTbl = pDoc->GetUnoCrsrTbl();
- for( USHORT i = 0; i < rTbl.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rTbl.Count(); ++i )
{
FOREACHPAM_START( rTbl[ i ] )
if( aSave.GetCount() == nCnt )
@@ -1586,7 +1585,7 @@ void _RestoreCntntIdx(SvULongs& rSaveArr,
const IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
SwCntntNode* pCNd = (SwCntntNode*)rNd.GetCntntNode();
- USHORT n = 0;
+ sal_uInt16 n = 0;
while( n < rSaveArr.Count() )
{
_SwSaveTypeCountContent aSave( rSaveArr, n );
@@ -1652,7 +1651,7 @@ void _RestoreCntntIdx(SvULongs& rSaveArr,
SwCrsrShell* pShell = pDoc->GetEditShell();
if( pShell )
{
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
FOREACHSHELL_START( pShell )
SwPaM *_pStkCrsr = PCURSH->GetStkCrsr();
if( _pStkCrsr )
@@ -1690,9 +1689,9 @@ void _RestoreCntntIdx(SvULongs& rSaveArr,
case 0x0400:
case 0x0401:
{
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
const SwUnoCrsrTbl& rTbl = pDoc->GetUnoCrsrTbl();
- for( USHORT i = 0; i < rTbl.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rTbl.Count(); ++i )
{
FOREACHPAM_START( rTbl[ i ] )
if( aSave.GetCount() == nCnt )
diff --git a/sw/source/core/doc/docchart.cxx b/sw/source/core/doc/docchart.cxx
index ee40b03ef4e7..78fafdf4d15d 100644
--- a/sw/source/core/doc/docchart.cxx
+++ b/sw/source/core/doc/docchart.cxx
@@ -66,7 +66,7 @@ void SwTable::UpdateCharts() const
GetFrmFmt()->GetDoc()->UpdateCharts( GetFrmFmt()->GetName() );
}
-BOOL SwTable::IsTblComplexForChart( const String& rSelection,
+sal_Bool SwTable::IsTblComplexForChart( const String& rSelection,
SwChartLines* pGetCLines ) const
{
const SwTableBox* pSttBox, *pEndBox;
@@ -115,7 +115,7 @@ IMPL_LINK( SwDoc, DoUpdateAllCharts, Timer *, EMPTYARG )
if( pVSh )
{
const SwFrmFmts& rTblFmts = *GetTblFrmFmts();
- for( USHORT n = 0; n < rTblFmts.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTblFmts.Count(); ++n )
{
SwTable* pTmpTbl;
const SwTableNode* pTblNd;
@@ -171,20 +171,20 @@ void SwDoc::UpdateCharts( const String &rName ) const
void SwDoc::SetTableName( SwFrmFmt& rTblFmt, const String &rNewName )
{
-// BOOL bStop = 1;
+// sal_Bool bStop = 1;
const String aOldName( rTblFmt.GetName() );
- BOOL bNameFound = 0 == rNewName.Len();
+ sal_Bool bNameFound = 0 == rNewName.Len();
if( !bNameFound )
{
SwFrmFmt* pFmt;
const SwFrmFmts& rTbl = *GetTblFrmFmts();
- for( USHORT i = rTbl.Count(); i; )
+ for( sal_uInt16 i = rTbl.Count(); i; )
if( !( pFmt = rTbl[ --i ] )->IsDefault() &&
pFmt->GetName() == rNewName && IsUsed( *pFmt ) )
{
- bNameFound = TRUE;
+ bNameFound = sal_True;
break;
}
}
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index acd0b5a94c7f..69c070ab3d20 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -36,11 +36,12 @@
#include <editeng/boxitem.hxx>
#include <editeng/udlnitem.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docary.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
#include <redline.hxx>
-#include <undobj.hxx>
+#include <UndoRedline.hxx>
#include <section.hxx>
#include <tox.hxx>
#include <docsh.hxx>
@@ -60,8 +61,8 @@ public:
CompareLine() {}
virtual ~CompareLine();
- virtual ULONG GetHashValue() const = 0;
- virtual BOOL Compare( const CompareLine& rLine ) const = 0;
+ virtual sal_uLong GetHashValue() const = 0;
+ virtual sal_Bool Compare( const CompareLine& rLine ) const = 0;
};
class CompareData
@@ -71,7 +72,7 @@ class CompareData
protected:
vector< CompareLine* > aLines;
- ULONG nSttLineNum;
+ sal_uLong nSttLineNum;
// Anfang und Ende beschneiden und alle anderen in das
// LinesArray setzen
@@ -82,7 +83,7 @@ public:
virtual ~CompareData();
// gibt es unterschiede?
- BOOL HasDiffs( const CompareData& rData ) const;
+ sal_Bool HasDiffs( const CompareData& rData ) const;
// startet das Vergleichen und Erzeugen der Unterschiede zweier
// Dokumente
@@ -91,14 +92,14 @@ public:
// ShowInsert / ShowDelete. Diese bekommen die Start und EndLine-Nummer
// uebergeben. Die Abbildung auf den tatsaechline Inhalt muss die
// Ableitung uebernehmen!
- ULONG ShowDiffs( const CompareData& rData );
+ sal_uLong ShowDiffs( const CompareData& rData );
- virtual void ShowInsert( ULONG nStt, ULONG nEnd );
- virtual void ShowDelete( const CompareData& rData, ULONG nStt,
- ULONG nEnd, ULONG nInsPos );
+ virtual void ShowInsert( sal_uLong nStt, sal_uLong nEnd );
+ virtual void ShowDelete( const CompareData& rData, sal_uLong nStt,
+ sal_uLong nEnd, sal_uLong nInsPos );
virtual void CheckForChangesInLine( const CompareData& rData,
- ULONG& nStt, ULONG& nEnd,
- ULONG& nThisStt, ULONG& nThisEnd );
+ sal_uLong& nStt, sal_uLong& nEnd,
+ sal_uLong& nThisStt, sal_uLong& nThisEnd );
// Eindeutigen Index fuer eine Line setzen. Gleiche Lines haben den
// selben Index; auch in den anderen CompareData!
@@ -116,7 +117,7 @@ public:
}
size_t GetLineCount() const { return aLines.size(); }
- ULONG GetLineOffset() const { return nSttLineNum; }
+ sal_uLong GetLineOffset() const { return nSttLineNum; }
const CompareLine* GetLine( size_t nLine ) const
{ return aLines[ nLine ]; }
void InsertLine( CompareLine* pLine )
@@ -127,24 +128,24 @@ class Hash
{
struct _HashData
{
- ULONG nNext, nHash;
+ sal_uLong nNext, nHash;
const CompareLine* pLine;
_HashData()
: nNext( 0 ), nHash( 0 ), pLine(0) {}
};
- ULONG* pHashArr;
+ sal_uLong* pHashArr;
_HashData* pDataArr;
- ULONG nCount, nPrime;
+ sal_uLong nCount, nPrime;
public:
- Hash( ULONG nSize );
+ Hash( sal_uLong nSize );
~Hash();
void CalcHashValue( CompareData& rData );
- ULONG GetCount() const { return nCount; }
+ sal_uLong GetCount() const { return nCount; }
};
class Compare
@@ -152,17 +153,17 @@ class Compare
public:
class MovedData
{
- ULONG* pIndex;
- ULONG* pLineNum;
- ULONG nCount;
+ sal_uLong* pIndex;
+ sal_uLong* pLineNum;
+ sal_uLong nCount;
public:
MovedData( CompareData& rData, sal_Char* pDiscard );
~MovedData();
- ULONG GetIndex( ULONG n ) const { return pIndex[ n ]; }
- ULONG GetLineNum( ULONG n ) const { return pLineNum[ n ]; }
- ULONG GetCount() const { return nCount; }
+ sal_uLong GetIndex( sal_uLong n ) const { return pIndex[ n ]; }
+ sal_uLong GetLineNum( sal_uLong n ) const { return pLineNum[ n ]; }
+ sal_uLong GetCount() const { return nCount; }
};
private:
@@ -173,9 +174,9 @@ private:
const MovedData &rMoved1, &rMoved2;
long *pMemory, *pFDiag, *pBDiag;
- void Compare( ULONG nStt1, ULONG nEnd1, ULONG nStt2, ULONG nEnd2 );
- ULONG CheckDiag( ULONG nStt1, ULONG nEnd1,
- ULONG nStt2, ULONG nEnd2, ULONG* pCost );
+ void Compare( sal_uLong nStt1, sal_uLong nEnd1, sal_uLong nStt2, sal_uLong nEnd2 );
+ sal_uLong CheckDiag( sal_uLong nStt1, sal_uLong nEnd1,
+ sal_uLong nStt2, sal_uLong nEnd2, sal_uLong* pCost );
public:
CompareSequence( CompareData& rData1, CompareData& rData2,
const MovedData& rD1, const MovedData& rD2 );
@@ -183,15 +184,15 @@ private:
};
- static void CountDifference( const CompareData& rData, ULONG* pCounts );
+ static void CountDifference( const CompareData& rData, sal_uLong* pCounts );
static void SetDiscard( const CompareData& rData,
- sal_Char* pDiscard, ULONG* pCounts );
- static void CheckDiscard( ULONG nLen, sal_Char* pDiscard );
- static ULONG SetChangedFlag( CompareData& rData, sal_Char* pDiscard, int bFirst );
+ sal_Char* pDiscard, sal_uLong* pCounts );
+ static void CheckDiscard( sal_uLong nLen, sal_Char* pDiscard );
+ static sal_uLong SetChangedFlag( CompareData& rData, sal_Char* pDiscard, int bFirst );
static void ShiftBoundaries( CompareData& rData1, CompareData& rData2 );
public:
- Compare( ULONG nDiff, CompareData& rData1, CompareData& rData2 );
+ Compare( sal_uLong nDiff, CompareData& rData1, CompareData& rData2 );
};
CompareLine::~CompareLine() {}
@@ -233,7 +234,7 @@ void CompareData::CompareLines( CompareData& rData )
{
CheckRanges( rData );
- ULONG nDifferent;
+ sal_uLong nDifferent;
{
Hash aH( GetLineCount() + rData.GetLineCount() + 1 );
aH.CalcHashValue( *this );
@@ -245,17 +246,17 @@ void CompareData::CompareLines( CompareData& rData )
}
}
-ULONG CompareData::ShowDiffs( const CompareData& rData )
+sal_uLong CompareData::ShowDiffs( const CompareData& rData )
{
- ULONG nLen1 = rData.GetLineCount(), nLen2 = GetLineCount();
- ULONG nStt1 = 0, nStt2 = 0;
- ULONG nCnt = 0;
+ sal_uLong nLen1 = rData.GetLineCount(), nLen2 = GetLineCount();
+ sal_uLong nStt1 = 0, nStt2 = 0;
+ sal_uLong nCnt = 0;
while( nStt1 < nLen1 || nStt2 < nLen2 )
{
if( rData.GetChanged( nStt1 ) || GetChanged( nStt2 ) )
{
- ULONG nSav1 = nStt1, nSav2 = nStt2;
+ sal_uLong nSav1 = nStt1, nSav2 = nStt2;
while( nStt1 < nLen1 && rData.GetChanged( nStt1 )) ++nStt1;
while( nStt2 < nLen2 && GetChanged( nStt2 )) ++nStt2;
@@ -276,17 +277,17 @@ ULONG CompareData::ShowDiffs( const CompareData& rData )
return nCnt;
}
-BOOL CompareData::HasDiffs( const CompareData& rData ) const
+sal_Bool CompareData::HasDiffs( const CompareData& rData ) const
{
- BOOL bRet = FALSE;
- ULONG nLen1 = rData.GetLineCount(), nLen2 = GetLineCount();
- ULONG nStt1 = 0, nStt2 = 0;
+ sal_Bool bRet = sal_False;
+ sal_uLong nLen1 = rData.GetLineCount(), nLen2 = GetLineCount();
+ sal_uLong nStt1 = 0, nStt2 = 0;
while( nStt1 < nLen1 || nStt2 < nLen2 )
{
if( rData.GetChanged( nStt1 ) || GetChanged( nStt2 ) )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
++nStt1, ++nStt2;
@@ -294,24 +295,24 @@ BOOL CompareData::HasDiffs( const CompareData& rData ) const
return bRet;
}
-void CompareData::ShowInsert( ULONG, ULONG )
+void CompareData::ShowInsert( sal_uLong, sal_uLong )
{
}
-void CompareData::ShowDelete( const CompareData&, ULONG, ULONG, ULONG )
+void CompareData::ShowDelete( const CompareData&, sal_uLong, sal_uLong, sal_uLong )
{
}
void CompareData::CheckForChangesInLine( const CompareData& ,
- ULONG&, ULONG&, ULONG&, ULONG& )
+ sal_uLong&, sal_uLong&, sal_uLong&, sal_uLong& )
{
}
-Hash::Hash( ULONG nSize )
+Hash::Hash( sal_uLong nSize )
: nCount( 1 )
{
-static const ULONG primes[] =
+static const sal_uLong primes[] =
{
509,
1021,
@@ -352,8 +353,8 @@ static const ULONG primes[] =
return;
}
nPrime = primes[ i ];
- pHashArr = new ULONG[ nPrime ];
- memset( pHashArr, 0, nPrime * sizeof( ULONG ) );
+ pHashArr = new sal_uLong[ nPrime ];
+ memset( pHashArr, 0, nPrime * sizeof( sal_uLong ) );
}
Hash::~Hash()
@@ -370,9 +371,9 @@ void Hash::CalcHashValue( CompareData& rData )
{
const CompareLine* pLine = rData.GetLine( n );
OSL_ENSURE( pLine, "wo ist die Line?" );
- ULONG nH = pLine->GetHashValue();
+ sal_uLong nH = pLine->GetHashValue();
- ULONG* pFound = &pHashArr[ nH % nPrime ];
+ sal_uLong* pFound = &pHashArr[ nH % nPrime ];
size_t i;
for( i = *pFound; ; i = pDataArr[i].nNext )
if( !i )
@@ -393,7 +394,7 @@ void Hash::CalcHashValue( CompareData& rData )
}
}
-Compare::Compare( ULONG nDiff, CompareData& rData1, CompareData& rData2 )
+Compare::Compare( sal_uLong nDiff, CompareData& rData1, CompareData& rData2 )
{
MovedData *pMD1, *pMD2;
// Suche die unterschiedlichen Lines
@@ -401,10 +402,10 @@ Compare::Compare( ULONG nDiff, CompareData& rData1, CompareData& rData2 )
sal_Char* pDiscard1 = new sal_Char[ rData1.GetLineCount() ];
sal_Char* pDiscard2 = new sal_Char[ rData2.GetLineCount() ];
- ULONG* pCount1 = new ULONG[ nDiff ];
- ULONG* pCount2 = new ULONG[ nDiff ];
- memset( pCount1, 0, nDiff * sizeof( ULONG ));
- memset( pCount2, 0, nDiff * sizeof( ULONG ));
+ sal_uLong* pCount1 = new sal_uLong[ nDiff ];
+ sal_uLong* pCount2 = new sal_uLong[ nDiff ];
+ memset( pCount1, 0, nDiff * sizeof( sal_uLong ));
+ memset( pCount2, 0, nDiff * sizeof( sal_uLong ));
// stelle fest, welche Indizies in den CompareData mehrfach vergeben wurden
CountDifference( rData1, pCount1 );
@@ -439,31 +440,31 @@ Compare::Compare( ULONG nDiff, CompareData& rData1, CompareData& rData2 )
delete pMD2;
}
-void Compare::CountDifference( const CompareData& rData, ULONG* pCounts )
+void Compare::CountDifference( const CompareData& rData, sal_uLong* pCounts )
{
- ULONG nLen = rData.GetLineCount();
- for( ULONG n = 0; n < nLen; ++n )
+ sal_uLong nLen = rData.GetLineCount();
+ for( sal_uLong n = 0; n < nLen; ++n )
{
- ULONG nIdx = rData.GetIndex( n );
+ sal_uLong nIdx = rData.GetIndex( n );
++pCounts[ nIdx ];
}
}
void Compare::SetDiscard( const CompareData& rData,
- sal_Char* pDiscard, ULONG* pCounts )
+ sal_Char* pDiscard, sal_uLong* pCounts )
{
- ULONG nLen = rData.GetLineCount();
+ sal_uLong nLen = rData.GetLineCount();
// berechne Max in Abhanegigkeit zur LineAnzahl
- USHORT nMax = 5;
- ULONG n;
+ sal_uInt16 nMax = 5;
+ sal_uLong n;
for( n = nLen / 64; ( n = n >> 2 ) > 0; )
nMax <<= 1;
for( n = 0; n < nLen; ++n )
{
- ULONG nIdx = rData.GetIndex( n );
+ sal_uLong nIdx = rData.GetIndex( n );
if( nIdx )
{
nIdx = pCounts[ nIdx ];
@@ -474,17 +475,17 @@ void Compare::SetDiscard( const CompareData& rData,
}
}
-void Compare::CheckDiscard( ULONG nLen, sal_Char* pDiscard )
+void Compare::CheckDiscard( sal_uLong nLen, sal_Char* pDiscard )
{
- for( ULONG n = 0; n < nLen; ++n )
+ for( sal_uLong n = 0; n < nLen; ++n )
{
if( 2 == pDiscard[ n ] )
pDiscard[n] = 0;
else if( pDiscard[ n ] )
{
- ULONG j;
- ULONG length;
- ULONG provisional = 0;
+ sal_uLong j;
+ sal_uLong length;
+ sal_uLong provisional = 0;
/* Find end of this run of discardable lines.
Count how many are provisionally discardable. */
@@ -514,9 +515,9 @@ void Compare::CheckDiscard( ULONG nLen, sal_Char* pDiscard )
}
else
{
- ULONG consec;
- ULONG minimum = 1;
- ULONG tem = length / 4;
+ sal_uLong consec;
+ sal_uLong minimum = 1;
+ sal_uLong tem = length / 4;
/* MINIMUM is approximate square root of LENGTH/4.
A subrun of two or more provisionals can stand
@@ -580,8 +581,8 @@ void Compare::CheckDiscard( ULONG nLen, sal_Char* pDiscard )
Compare::MovedData::MovedData( CompareData& rData, sal_Char* pDiscard )
: pIndex( 0 ), pLineNum( 0 ), nCount( 0 )
{
- ULONG nLen = rData.GetLineCount();
- ULONG n;
+ sal_uLong nLen = rData.GetLineCount();
+ sal_uLong n;
for( n = 0; n < nLen; ++n )
if( pDiscard[ n ] )
@@ -591,8 +592,8 @@ Compare::MovedData::MovedData( CompareData& rData, sal_Char* pDiscard )
if( nCount )
{
- pIndex = new ULONG[ nCount ];
- pLineNum = new ULONG[ nCount ];
+ pIndex = new sal_uLong[ nCount ];
+ pLineNum = new sal_uLong[ nCount ];
for( n = 0, nCount = 0; n < nLen; ++n )
if( !pDiscard[ n ] )
@@ -615,7 +616,7 @@ Compare::CompareSequence::CompareSequence(
const MovedData& rMD1, const MovedData& rMD2 )
: rData1( rD1 ), rData2( rD2 ), rMoved1( rMD1 ), rMoved2( rMD2 )
{
- ULONG nSize = rMD1.GetCount() + rMD2.GetCount() + 3;
+ sal_uLong nSize = rMD1.GetCount() + rMD2.GetCount() + 3;
pMemory = new long[ nSize * 2 ];
pFDiag = pMemory + ( rMD2.GetCount() + 1 );
pBDiag = pMemory + ( nSize + rMD2.GetCount() + 1 );
@@ -628,8 +629,8 @@ Compare::CompareSequence::~CompareSequence()
delete pMemory;
}
-void Compare::CompareSequence::Compare( ULONG nStt1, ULONG nEnd1,
- ULONG nStt2, ULONG nEnd2 )
+void Compare::CompareSequence::Compare( sal_uLong nStt1, sal_uLong nEnd1,
+ sal_uLong nStt2, sal_uLong nEnd2 )
{
/* Slide down the bottom initial diagonal. */
while( nStt1 < nEnd1 && nStt2 < nEnd2 &&
@@ -652,7 +653,7 @@ void Compare::CompareSequence::Compare( ULONG nStt1, ULONG nEnd1,
else
{
- ULONG c, d, b;
+ sal_uLong c, d, b;
/* Find a point of correspondence in the middle of the files. */
@@ -672,8 +673,8 @@ void Compare::CompareSequence::Compare( ULONG nStt1, ULONG nEnd1,
}
}
-ULONG Compare::CompareSequence::CheckDiag( ULONG nStt1, ULONG nEnd1,
- ULONG nStt2, ULONG nEnd2, ULONG* pCost )
+sal_uLong Compare::CompareSequence::CheckDiag( sal_uLong nStt1, sal_uLong nEnd1,
+ sal_uLong nStt2, sal_uLong nEnd2, sal_uLong* pCost )
{
const long dmin = nStt1 - nEnd2; /* Minimum valid diagonal. */
const long dmax = nEnd1 - nStt2; /* Maximum valid diagonal. */
@@ -706,7 +707,7 @@ ULONG Compare::CompareSequence::CheckDiag( ULONG nStt1, ULONG nEnd1,
else
x = thi;
y = x - d;
- while( ULONG(x) < nEnd1 && ULONG(y) < nEnd2 &&
+ while( sal_uLong(x) < nEnd1 && sal_uLong(y) < nEnd2 &&
rMoved1.GetIndex( x ) == rMoved2.GetIndex( y ))
++x, ++y;
pFDiag[d] = x;
@@ -729,7 +730,7 @@ ULONG Compare::CompareSequence::CheckDiag( ULONG nStt1, ULONG nEnd1,
else
x = thi - 1;
y = x - d;
- while( ULONG(x) > nStt1 && ULONG(y) > nStt2 &&
+ while( sal_uLong(x) > nStt1 && sal_uLong(y) > nStt2 &&
rMoved1.GetIndex( x - 1 ) == rMoved2.GetIndex( y - 1 ))
--x, --y;
pBDiag[d] = x;
@@ -749,15 +750,15 @@ void Compare::ShiftBoundaries( CompareData& rData1, CompareData& rData2 )
CompareData* pData = &rData1;
CompareData* pOtherData = &rData2;
- ULONG i = 0;
- ULONG j = 0;
- ULONG i_end = pData->GetLineCount();
- ULONG preceding = ULONG_MAX;
- ULONG other_preceding = ULONG_MAX;
+ sal_uLong i = 0;
+ sal_uLong j = 0;
+ sal_uLong i_end = pData->GetLineCount();
+ sal_uLong preceding = ULONG_MAX;
+ sal_uLong other_preceding = ULONG_MAX;
while (1)
{
- ULONG start, other_start;
+ sal_uLong start, other_start;
/* Scan forwards to find beginning of another run of changes.
Also keep track of the corresponding point in the other file. */
@@ -825,15 +826,15 @@ public:
SwCompareLine( const SwNode& rNd );
virtual ~SwCompareLine();
- virtual ULONG GetHashValue() const;
- virtual BOOL Compare( const CompareLine& rLine ) const;
+ virtual sal_uLong GetHashValue() const;
+ virtual sal_Bool Compare( const CompareLine& rLine ) const;
- static ULONG GetTxtNodeHashValue( const SwTxtNode& rNd, ULONG nVal );
- static BOOL CompareNode( const SwNode& rDstNd, const SwNode& rSrcNd );
- static BOOL CompareTxtNd( const SwTxtNode& rDstNd,
+ static sal_uLong GetTxtNodeHashValue( const SwTxtNode& rNd, sal_uLong nVal );
+ static sal_Bool CompareNode( const SwNode& rDstNd, const SwNode& rSrcNd );
+ static sal_Bool CompareTxtNd( const SwTxtNode& rDstNd,
const SwTxtNode& rSrcNd );
- BOOL ChangesInLine( const SwCompareLine& rLine,
+ sal_Bool ChangesInLine( const SwCompareLine& rLine,
SwPaM *& rpInsRing, SwPaM*& rpDelRing ) const;
const SwNode& GetNode() const { return rNode; }
@@ -849,23 +850,23 @@ class SwCompareData : public CompareData
SwDoc& rDoc;
SwPaM *pInsRing, *pDelRing;
- ULONG PrevIdx( const SwNode* pNd );
- ULONG NextIdx( const SwNode* pNd );
+ sal_uLong PrevIdx( const SwNode* pNd );
+ sal_uLong NextIdx( const SwNode* pNd );
virtual void CheckRanges( CompareData& );
- virtual void ShowInsert( ULONG nStt, ULONG nEnd );
- virtual void ShowDelete( const CompareData& rData, ULONG nStt,
- ULONG nEnd, ULONG nInsPos );
+ virtual void ShowInsert( sal_uLong nStt, sal_uLong nEnd );
+ virtual void ShowDelete( const CompareData& rData, sal_uLong nStt,
+ sal_uLong nEnd, sal_uLong nInsPos );
virtual void CheckForChangesInLine( const CompareData& rData,
- ULONG& nStt, ULONG& nEnd,
- ULONG& nThisStt, ULONG& nThisEnd );
+ sal_uLong& nStt, sal_uLong& nEnd,
+ sal_uLong& nThisStt, sal_uLong& nThisEnd );
public:
SwCompareData( SwDoc& rD ) : rDoc( rD ), pInsRing(0), pDelRing(0) {}
virtual ~SwCompareData();
- void SetRedlinesToDoc( BOOL bUseDocInfo );
+ void SetRedlinesToDoc( sal_Bool bUseDocInfo );
};
SwCompareLine::SwCompareLine( const SwNode& rNd )
@@ -877,9 +878,9 @@ SwCompareLine::~SwCompareLine()
{
}
-ULONG SwCompareLine::GetHashValue() const
+sal_uLong SwCompareLine::GetHashValue() const
{
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
switch( rNode.GetNodeType() )
{
case ND_TEXTNODE:
@@ -936,7 +937,7 @@ const SwNode& SwCompareLine::GetEndNode() const
return *pNd;
}
-BOOL SwCompareLine::Compare( const CompareLine& rLine ) const
+sal_Bool SwCompareLine::Compare( const CompareLine& rLine ) const
{
return CompareNode( rNode, ((SwCompareLine&)rLine).rNode );
}
@@ -964,12 +965,12 @@ namespace
}
}
-BOOL SwCompareLine::CompareNode( const SwNode& rDstNd, const SwNode& rSrcNd )
+sal_Bool SwCompareLine::CompareNode( const SwNode& rDstNd, const SwNode& rSrcNd )
{
if( rSrcNd.GetNodeType() != rDstNd.GetNodeType() )
- return FALSE;
+ return sal_False;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch( rDstNd.GetNodeType() )
{
@@ -1119,7 +1120,7 @@ String SwCompareLine::GetText() const
return sRet;
}
-ULONG SwCompareLine::GetTxtNodeHashValue( const SwTxtNode& rNd, ULONG nVal )
+sal_uLong SwCompareLine::GetTxtNodeHashValue( const SwTxtNode& rNd, sal_uLong nVal )
{
String sStr( rNd.GetExpandTxt() );
for( xub_StrLen n = 0; n < sStr.Len(); ++n )
@@ -1127,24 +1128,24 @@ ULONG SwCompareLine::GetTxtNodeHashValue( const SwTxtNode& rNd, ULONG nVal )
return nVal;
}
-BOOL SwCompareLine::CompareTxtNd( const SwTxtNode& rDstNd,
+sal_Bool SwCompareLine::CompareTxtNd( const SwTxtNode& rDstNd,
const SwTxtNode& rSrcNd )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// erstmal ganz einfach!
if( rDstNd.GetTxt() == rSrcNd.GetTxt() )
{
// der Text ist gleich, aber sind die "Sonderattribute" (0xFF) auch
// dieselben??
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
-BOOL SwCompareLine::ChangesInLine( const SwCompareLine& rLine,
+sal_Bool SwCompareLine::ChangesInLine( const SwCompareLine& rLine,
SwPaM *& rpInsRing, SwPaM*& rpDelRing ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( ND_TEXTNODE == rNode.GetNodeType() &&
ND_TEXTNODE == rLine.GetNode().GetNodeType() )
{
@@ -1191,14 +1192,12 @@ BOOL SwCompareLine::ChangesInLine( const SwCompareLine& rLine,
if( nStt != nSEnd )
{
{
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ ::sw::UndoGuard const ug(pDoc->GetIDocumentUndoRedo());
SwPaM aCpyPam( rSrcNd, nStt );
aCpyPam.SetMark();
aCpyPam.GetPoint()->nContent = nSEnd;
aCpyPam.GetDoc()->CopyRange( aCpyPam, *aPam.GetPoint(),
false );
- pDoc->DoUndo( bUndo );
}
SwPaM* pTmp = new SwPaM( *aPam.GetPoint(), rpDelRing );
@@ -1215,7 +1214,7 @@ BOOL SwCompareLine::ChangesInLine( const SwCompareLine& rLine,
*pCorr->GetPoint() = *pTmp->GetMark();
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -1237,7 +1236,7 @@ SwCompareData::~SwCompareData()
}
}
-ULONG SwCompareData::NextIdx( const SwNode* pNd )
+sal_uLong SwCompareData::NextIdx( const SwNode* pNd )
{
if( pNd->IsStartNode() )
{
@@ -1251,7 +1250,7 @@ ULONG SwCompareData::NextIdx( const SwNode* pNd )
return pNd->GetIndex() + 1;
}
-ULONG SwCompareData::PrevIdx( const SwNode* pNd )
+sal_uLong SwCompareData::PrevIdx( const SwNode* pNd )
{
if( pNd->IsEndNode() )
{
@@ -1273,11 +1272,11 @@ void SwCompareData::CheckRanges( CompareData& rData )
const SwNode& rSrcEndNd = rSrcNds.GetEndOfContent();
const SwNode& rDstEndNd = rDstNds.GetEndOfContent();
- ULONG nSrcSttIdx = NextIdx( rSrcEndNd.StartOfSectionNode() );
- ULONG nSrcEndIdx = rSrcEndNd.GetIndex();
+ sal_uLong nSrcSttIdx = NextIdx( rSrcEndNd.StartOfSectionNode() );
+ sal_uLong nSrcEndIdx = rSrcEndNd.GetIndex();
- ULONG nDstSttIdx = NextIdx( rDstEndNd.StartOfSectionNode() );
- ULONG nDstEndIdx = rDstEndNd.GetIndex();
+ sal_uLong nDstSttIdx = NextIdx( rDstEndNd.StartOfSectionNode() );
+ sal_uLong nDstEndIdx = rDstEndNd.GetIndex();
while( nSrcSttIdx < nSrcEndIdx && nDstSttIdx < nDstEndIdx )
{
@@ -1318,7 +1317,7 @@ void SwCompareData::CheckRanges( CompareData& rData )
}
}
-void SwCompareData::ShowInsert( ULONG nStt, ULONG nEnd )
+void SwCompareData::ShowInsert( sal_uLong nStt, sal_uLong nEnd )
{
SwPaM* pTmp = new SwPaM( ((SwCompareLine*)GetLine( nStt ))->GetNode(), 0,
((SwCompareLine*)GetLine( nEnd-1 ))->GetEndNode(), 0,
@@ -1330,14 +1329,14 @@ void SwCompareData::ShowInsert( ULONG nStt, ULONG nEnd )
}
-void SwCompareData::ShowDelete( const CompareData& rData, ULONG nStt,
- ULONG nEnd, ULONG nInsPos )
+void SwCompareData::ShowDelete( const CompareData& rData, sal_uLong nStt,
+ sal_uLong nEnd, sal_uLong nInsPos )
{
SwNodeRange aRg(
((SwCompareLine*)rData.GetLine( nStt ))->GetNode(), 0,
((SwCompareLine*)rData.GetLine( nEnd-1 ))->GetEndNode(), 1 );
- USHORT nOffset = 0;
+ sal_uInt16 nOffset = 0;
const CompareLine* pLine;
if( GetLineCount() == nInsPos )
{
@@ -1389,8 +1388,8 @@ void SwCompareData::ShowDelete( const CompareData& rData, ULONG nStt,
}
void SwCompareData::CheckForChangesInLine( const CompareData& rData,
- ULONG& rStt, ULONG& rEnd,
- ULONG& rThisStt, ULONG& rThisEnd )
+ sal_uLong& rStt, sal_uLong& rEnd,
+ sal_uLong& rThisStt, sal_uLong& rThisEnd )
{
while( rStt < rEnd && rThisStt < rThisEnd )
{
@@ -1404,12 +1403,12 @@ void SwCompareData::CheckForChangesInLine( const CompareData& rData,
}
}
-void SwCompareData::SetRedlinesToDoc( BOOL bUseDocInfo )
+void SwCompareData::SetRedlinesToDoc( sal_Bool bUseDocInfo )
{
SwPaM* pTmp = pDelRing;
// get the Author / TimeStamp from the "other" document info
- USHORT nAuthor = rDoc.GetRedlineAuthor();
+ sal_uInt16 nAuthor = rDoc.GetRedlineAuthor();
DateTime aTimeStamp;
SwDocShell *pDocShell(rDoc.GetDocShell());
DBG_ASSERT(pDocShell, "no SwDocShell");
@@ -1464,8 +1463,11 @@ void SwCompareData::SetRedlinesToDoc( BOOL bUseDocInfo )
rDoc.DeleteRedline( *pTmp, false, USHRT_MAX );
- if( rDoc.DoesUndo() )
- rDoc.AppendUndo( new SwUndoCompDoc( *pTmp, FALSE ));
+ if (rDoc.GetIDocumentUndoRedo().DoesUndo())
+ {
+ SwUndo *const pUndo(new SwUndoCompDoc( *pTmp, sal_False )) ;
+ rDoc.GetIDocumentUndoRedo().AppendUndo(pUndo);
+ }
rDoc.AppendRedline( new SwRedline( aRedlnData, *pTmp ), true );
} while( pDelRing != ( pTmp = (SwPaM*)pTmp->GetNext() ));
@@ -1530,8 +1532,11 @@ void SwCompareData::SetRedlinesToDoc( BOOL bUseDocInfo )
do {
if( rDoc.AppendRedline( new SwRedline( aRedlnData, *pTmp ), true) &&
- rDoc.DoesUndo() )
- rDoc.AppendUndo( new SwUndoCompDoc( *pTmp, TRUE ));
+ rDoc.GetIDocumentUndoRedo().DoesUndo())
+ {
+ SwUndo *const pUndo(new SwUndoCompDoc( *pTmp, sal_True ));
+ rDoc.GetIDocumentUndoRedo().AppendUndo(pUndo);
+ }
} while( pInsRing != ( pTmp = (SwPaM*)pTmp->GetNext() ));
}
}
@@ -1544,10 +1549,10 @@ long SwDoc::CompareDoc( const SwDoc& rDoc )
long nRet = 0;
- StartUndo(UNDO_EMPTY, NULL);
- BOOL bDocWasModified = IsModified();
+ GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
+ sal_Bool bDocWasModified = IsModified();
SwDoc& rSrcDoc = (SwDoc&)rDoc;
- BOOL bSrcModified = rSrcDoc.IsModified();
+ sal_Bool bSrcModified = rSrcDoc.IsModified();
RedlineMode_t eSrcRedlMode = rSrcDoc.GetRedlineMode();
rSrcDoc.SetRedlineMode( nsRedlineMode_t::REDLINE_SHOW_INSERT );
@@ -1575,13 +1580,11 @@ long SwDoc::CompareDoc( const SwDoc& rDoc )
if( !bSrcModified )
rSrcDoc.ResetModified();
- EndUndo(UNDO_EMPTY, NULL);
+ GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
return nRet;
}
-typedef void (SwDoc::*FNInsUndo)( SwUndo* );
-
class _SaveMergeRedlines : public Ring
{
const SwRedline* pSrcRedl;
@@ -1589,7 +1592,7 @@ class _SaveMergeRedlines : public Ring
public:
_SaveMergeRedlines( const SwNode& rDstNd,
const SwRedline& rSrcRedl, Ring* pRing );
- USHORT InsertRedline( FNInsUndo pFn );
+ sal_uInt16 InsertRedline();
SwRedline* GetDestRedline() { return pDestRedl; }
};
@@ -1620,16 +1623,15 @@ _SaveMergeRedlines::_SaveMergeRedlines( const SwNode& rDstNd,
}
}
-USHORT _SaveMergeRedlines::InsertRedline( FNInsUndo pFn )
+sal_uInt16 _SaveMergeRedlines::InsertRedline()
{
- USHORT nIns = 0;
+ sal_uInt16 nIns = 0;
SwDoc* pDoc = pDestRedl->GetDoc();
if( nsRedlineType_t::REDLINE_INSERT == pDestRedl->GetType() )
{
// der Teil wurde eingefuegt, also kopiere ihn aus dem SourceDoc
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
SwNodeIndex aSaveNd( pDestRedl->GetPoint()->nNode, -1 );
xub_StrLen nSaveCnt = pDestRedl->GetPoint()->nContent.GetIndex();
@@ -1642,7 +1644,6 @@ USHORT _SaveMergeRedlines::InsertRedline( FNInsUndo pFn )
*pDestRedl->GetPoint(), false );
pDoc->SetRedlineMode_intern( eOld );
- pDoc->DoUndo( bUndo );
pDestRedl->SetMark();
aSaveNd++;
@@ -1664,7 +1665,7 @@ USHORT _SaveMergeRedlines::InsertRedline( FNInsUndo pFn )
// eingefuegter ist, dann muss dieser gesplittet werden!
SwPosition* pDStt = pDestRedl->GetMark(),
* pDEnd = pDestRedl->GetPoint();
- USHORT n = 0;
+ sal_uInt16 n = 0;
// zur StartPos das erste Redline suchen
if( !pDoc->GetRedline( *pDStt, &n ) && n )
@@ -1704,13 +1705,16 @@ USHORT _SaveMergeRedlines::InsertRedline( FNInsUndo pFn )
pCpyRedl->SetMark();
*pCpyRedl->GetPoint() = *pRStt;
- SwUndoCompDoc* pUndo = pDoc->DoesUndo()
+ SwUndoCompDoc *const pUndo =
+ (pDoc->GetIDocumentUndoRedo().DoesUndo())
? new SwUndoCompDoc( *pCpyRedl ) : 0;
// now modify doc: append redline, undo (and count)
pDoc->AppendRedline( pCpyRedl, true );
if( pUndo )
- (pDoc->*pFn)( pUndo );
+ {
+ pDoc->GetIDocumentUndoRedo().AppendUndo(pUndo);
+ }
++nIns;
*pDStt = *pREnd;
@@ -1737,12 +1741,15 @@ USHORT _SaveMergeRedlines::InsertRedline( FNInsUndo pFn )
if( pDestRedl )
{
- SwUndoCompDoc* pUndo = pDoc->DoesUndo() ? new SwUndoCompDoc( *pDestRedl ) : 0;
+ SwUndoCompDoc *const pUndo = (pDoc->GetIDocumentUndoRedo().DoesUndo())
+ ? new SwUndoCompDoc( *pDestRedl ) : 0;
// now modify doc: append redline, undo (and count)
bool bRedlineAccepted = pDoc->AppendRedline( pDestRedl, true );
if( pUndo )
- (pDoc->*pFn)( pUndo );
+ {
+ pDoc->GetIDocumentUndoRedo().AppendUndo( pUndo );
+ }
++nIns;
// if AppendRedline has deleted our redline, we may not keep a
@@ -1761,10 +1768,10 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
long nRet = 0;
- StartUndo(UNDO_EMPTY, NULL);
+ GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
SwDoc& rSrcDoc = (SwDoc&)rDoc;
- BOOL bSrcModified = rSrcDoc.IsModified();
+ sal_Bool bSrcModified = rSrcDoc.IsModified();
RedlineMode_t eSrcRedlMode = rSrcDoc.GetRedlineMode();
rSrcDoc.SetRedlineMode( nsRedlineMode_t::REDLINE_SHOW_DELETE );
@@ -1783,12 +1790,12 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
// deren Position im DestDoc
_SaveMergeRedlines* pRing = 0;
const SwRedlineTbl& rSrcRedlTbl = rSrcDoc.GetRedlineTbl();
- ULONG nEndOfExtra = rSrcDoc.GetNodes().GetEndOfExtras().GetIndex();
- ULONG nMyEndOfExtra = GetNodes().GetEndOfExtras().GetIndex();
- for( USHORT n = 0; n < rSrcRedlTbl.Count(); ++n )
+ sal_uLong nEndOfExtra = rSrcDoc.GetNodes().GetEndOfExtras().GetIndex();
+ sal_uLong nMyEndOfExtra = GetNodes().GetEndOfExtras().GetIndex();
+ for( sal_uInt16 n = 0; n < rSrcRedlTbl.Count(); ++n )
{
const SwRedline* pRedl = rSrcRedlTbl[ n ];
- ULONG nNd = pRedl->GetPoint()->nNode.GetIndex();
+ sal_uLong nNd = pRedl->GetPoint()->nNode.GetIndex();
RedlineType_t eType = pRedl->GetType();
if( nEndOfExtra < nNd &&
( nsRedlineType_t::REDLINE_INSERT == eType || nsRedlineType_t::REDLINE_DELETE == eType ))
@@ -1818,7 +1825,7 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
_SaveMergeRedlines* pTmp = pRing;
do {
- nRet += pTmp->InsertRedline( &SwDoc::AppendUndo );
+ nRet += pTmp->InsertRedline();
} while( pRing != ( pTmp = (_SaveMergeRedlines*)pTmp->GetNext() ));
while( pRing != pRing->GetNext() )
@@ -1833,7 +1840,7 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
SetRedlineMode((RedlineMode_t)(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE));
- EndUndo(UNDO_EMPTY, NULL);
+ GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
return nRet;
}
diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx
index b68d512d1aa0..d13affa1c536 100644
--- a/sw/source/core/doc/doccorr.cxx
+++ b/sw/source/core/doc/doccorr.cxx
@@ -74,9 +74,9 @@
namespace
{
- // find the relevant section in which the SwUnoCrsr may wander. returns NULL if
- // no restrictions apply
- const SwStartNode* lcl_FindUnoCrsrSection( const SwNode& rNode )
+ // find the relevant section in which the SwUnoCrsr may wander.
+ // returns NULL if no restrictions apply
+ static const SwStartNode* lcl_FindUnoCrsrSection( const SwNode& rNode )
{
const SwStartNode* pStartNode = rNode.StartOfSectionNode();
while( ( pStartNode != NULL ) &&
@@ -87,45 +87,28 @@ namespace
return pStartNode;
}
- static inline void lcl_PaMCorrAbs1(SwPaM * pPam,
- SwNode const * const pOldNode,
- const SwPosition& rNewPos,
- const xub_StrLen nOffset)
- {
- for(int nb = 0; nb < 2; ++nb)
- if(&((pPam)->GetBound(BOOL(nb)).nNode.GetNode()) == pOldNode)
- {
- (pPam)->GetBound(BOOL(nb)) = rNewPos;
- (pPam)->GetBound(BOOL(nb)).nContent += nOffset;
- }
- };
-
- static inline bool lcl_PaMCorrAbs2(SwPaM* pPam,
- const SwPosition& rNewPos,
- ULONG nSttNode,
- ULONG nEndNode)
+ static inline bool lcl_PosCorrAbs(SwPosition & rPos,
+ const SwPosition& rStart,
+ const SwPosition& rEnd,
+ const SwPosition& rNewPos)
{
- bool bRet = false;
-
- for(int nb = 0; nb < 2; ++nb)
- if((pPam)->GetBound(BOOL(nb)).nNode >= nSttNode &&
- (pPam)->GetBound(BOOL(nb)).nNode <= nEndNode)
- {
- (pPam)->GetBound(BOOL(nb)) = rNewPos;
- bRet = true;
- }
- return bRet;
+ if ((rStart <= rPos) && (rPos <= rEnd))
+ {
+ rPos = rNewPos;
+ return true;
+ }
+ return false;
};
- static inline void lcl_PaMCorrAbs3(SwPaM * pPam,
+ static inline bool lcl_PaMCorrAbs(SwPaM & rPam,
const SwPosition& rStart,
const SwPosition& rEnd,
const SwPosition& rNewPos)
{
- for(int nb = 0; nb < 2; ++nb)
- if(rStart <= (pPam)->GetBound(BOOL(nb)) &&
- (pPam)->GetBound(BOOL(nb)) <= rEnd )
- (pPam)->GetBound(BOOL(nb)) = rNewPos;
+ bool bRet = false;
+ bRet |= lcl_PosCorrAbs(rPam.GetBound(true ), rStart, rEnd, rNewPos);
+ bRet |= lcl_PosCorrAbs(rPam.GetBound(false), rStart, rEnd, rNewPos);
+ return bRet;
};
static inline void lcl_PaMCorrRel1(SwPaM * pPam,
@@ -134,129 +117,79 @@ namespace
const xub_StrLen nCntIdx)
{
for(int nb = 0; nb < 2; ++nb)
- if(&((pPam)->GetBound(BOOL(nb)).nNode.GetNode()) == pOldNode)
+ if(&((pPam)->GetBound(sal_Bool(nb)).nNode.GetNode()) == pOldNode)
{
- (pPam)->GetBound(BOOL(nb)).nNode = rNewPos.nNode;
- (pPam)->GetBound(BOOL(nb)).nContent.Assign(
+ (pPam)->GetBound(sal_Bool(nb)).nNode = rNewPos.nNode;
+ (pPam)->GetBound(sal_Bool(nb)).nContent.Assign(
const_cast<SwIndexReg*>(rNewPos.nContent.GetIdxReg()),
- nCntIdx + (pPam)->GetBound(BOOL(nb)).nContent.GetIndex());
+ nCntIdx + (pPam)->GetBound(sal_Bool(nb)).nContent.GetIndex());
}
}
}
-void PaMCorrAbs( const SwNodeIndex &rOldNode,
- const SwPosition &rNewPos,
- const xub_StrLen nOffset)
-{
- const SwNode* pOldNode = &rOldNode.GetNode();
- const SwPosition aNewPos( rNewPos );
- const SwDoc* pDoc = pOldNode->GetDoc();
- SwCrsrShell* pShell = pDoc->GetEditShell();
-
- if( pShell )
- {
- FOREACHSHELL_START( pShell )
- SwPaM *_pStkCrsr = PCURSH->GetStkCrsr();
- if( _pStkCrsr )
- do {
- lcl_PaMCorrAbs1( _pStkCrsr, pOldNode, aNewPos, nOffset );
- } while ( (_pStkCrsr != 0 ) &&
- ((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != PCURSH->GetStkCrsr()) );
-
- FOREACHPAM_START( PCURSH->_GetCrsr() )
- lcl_PaMCorrAbs1( PCURCRSR, pOldNode, aNewPos, nOffset );
- FOREACHPAM_END()
-
- if( PCURSH->IsTableMode() )
- lcl_PaMCorrAbs1( PCURSH->GetTblCrs(), pOldNode, aNewPos, nOffset );
-
- FOREACHSHELL_END( pShell )
- }
-
- {
- SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl();
- for( USHORT n = 0; n < rTbl.Count(); ++n )
- {
- FOREACHPAM_START( rTbl[ n ] )
- lcl_PaMCorrAbs1( PCURCRSR, pOldNode, aNewPos, nOffset );
- FOREACHPAM_END()
- SwUnoTableCrsr* pUnoTblCrsr =
- dynamic_cast<SwUnoTableCrsr*>(rTbl[ n ]);
- if( pUnoTblCrsr )
- {
- FOREACHPAM_START( &pUnoTblCrsr->GetSelRing() )
- lcl_PaMCorrAbs1( PCURCRSR, pOldNode, aNewPos, nOffset );
- FOREACHPAM_END()
- }
- }
- }
-}
-
-
-void PaMCorrAbs( const SwNodeIndex &rStartNode,
- const SwNodeIndex &rEndNode,
- const SwPosition &rNewPos )
+void PaMCorrAbs( const SwPaM& rRange,
+ const SwPosition& rNewPos )
{
- const ULONG nSttNode = rStartNode.GetIndex();
- const ULONG nEndNode = rEndNode.GetIndex();
- const SwPosition aNewPos( rNewPos );
- SwDoc* pDoc = rStartNode.GetNode().GetDoc();
+ SwPosition const aStart( *rRange.Start() );
+ SwPosition const aEnd( *rRange.End() );
+ SwPosition const aNewPos( rNewPos );
+ SwDoc *const pDoc = aStart.nNode.GetNode().GetDoc();
+ SwCrsrShell *const pShell = pDoc->GetEditShell();
- SwCrsrShell* pShell = pDoc->GetEditShell();
if( pShell )
{
FOREACHSHELL_START( pShell )
SwPaM *_pStkCrsr = PCURSH->GetStkCrsr();
if( _pStkCrsr )
do {
- lcl_PaMCorrAbs2( _pStkCrsr, aNewPos, nSttNode, nEndNode );
+ lcl_PaMCorrAbs( *_pStkCrsr, aStart, aEnd, aNewPos );
} while ( (_pStkCrsr != 0 ) &&
((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != PCURSH->GetStkCrsr()) );
FOREACHPAM_START( PCURSH->_GetCrsr() )
- lcl_PaMCorrAbs2( PCURCRSR, aNewPos, nSttNode, nEndNode );
+ lcl_PaMCorrAbs( *PCURCRSR, aStart, aEnd, aNewPos );
FOREACHPAM_END()
if( PCURSH->IsTableMode() )
- lcl_PaMCorrAbs2( PCURSH->GetTblCrs(), aNewPos, nSttNode, nEndNode );
+ lcl_PaMCorrAbs( *PCURSH->GetTblCrs(), aStart, aEnd, aNewPos );
FOREACHSHELL_END( pShell )
}
-
{
- SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl();
- for( USHORT n = 0; n < rTbl.Count(); ++n )
+ SwUnoCrsrTbl& rTbl = const_cast<SwUnoCrsrTbl&>(pDoc->GetUnoCrsrTbl());
+
+ for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
{
- bool bChange = false;
+ SwUnoCrsr *const pUnoCursor = rTbl[ n ];
- SwUnoCrsr* pUnoCursor = rTbl[ n ];
+ bool bChange = false; // has the UNO cursor been corrected?
// determine whether the UNO cursor will leave it's designated
// section
- bool bLeaveSection =
+ bool const bLeaveSection =
pUnoCursor->IsRemainInSection() &&
( lcl_FindUnoCrsrSection( aNewPos.nNode.GetNode() ) !=
lcl_FindUnoCrsrSection(
pUnoCursor->GetPoint()->nNode.GetNode() ) );
FOREACHPAM_START( pUnoCursor )
- bChange |= lcl_PaMCorrAbs2(PCURCRSR, aNewPos, nSttNode, nEndNode);
+ bChange |= lcl_PaMCorrAbs( *PCURCRSR, aStart, aEnd, aNewPos );
FOREACHPAM_END()
- SwUnoTableCrsr* pUnoTblCrsr =
- dynamic_cast<SwUnoTableCrsr*>(pUnoCursor);
+ SwUnoTableCrsr *const pUnoTblCrsr =
+ dynamic_cast<SwUnoTableCrsr *>(rTbl[ n ]);
if( pUnoTblCrsr )
{
FOREACHPAM_START( &pUnoTblCrsr->GetSelRing() )
bChange |=
- lcl_PaMCorrAbs2( PCURCRSR, aNewPos, nSttNode, nEndNode );
+ lcl_PaMCorrAbs( *PCURCRSR, aStart, aEnd, aNewPos );
FOREACHPAM_END()
}
// if a UNO cursor leaves its designated section, we must inform
// (and invalidate) said cursor
- if( bChange && bLeaveSection )
+ if (bChange && bLeaveSection)
{
// the UNO cursor has left its section. We need to notify it!
SwMsgPoolItem aHint( RES_UNOCURSOR_LEAVES_SECTION );
@@ -266,77 +199,36 @@ void PaMCorrAbs( const SwNodeIndex &rStartNode,
}
}
-
-void PaMCorrAbs( const SwPaM& rRange,
- const SwPosition& rNewPos )
-{
- SwPosition aStart( *rRange.Start() );
- SwPosition aEnd( *rRange.End() );
- SwPosition aNewPos( rNewPos );
- SwDoc* pDoc = aStart.nNode.GetNode().GetDoc();
- SwCrsrShell* pShell = pDoc->GetEditShell();
-
- if( pShell )
- {
- FOREACHSHELL_START( pShell )
- SwPaM *_pStkCrsr = PCURSH->GetStkCrsr();
- if( _pStkCrsr )
- do {
- lcl_PaMCorrAbs3( _pStkCrsr, aStart, aEnd, aNewPos );
- } while ( (_pStkCrsr != 0 ) &&
- ((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != PCURSH->GetStkCrsr()) );
-
- FOREACHPAM_START( PCURSH->_GetCrsr() )
- lcl_PaMCorrAbs3( PCURCRSR, aStart, aEnd, aNewPos );
- FOREACHPAM_END()
-
- if( PCURSH->IsTableMode() )
- lcl_PaMCorrAbs3( PCURSH->GetTblCrs(), aStart, aEnd, aNewPos );
-
- FOREACHSHELL_END( pShell )
- }
- {
- SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl();
- for( USHORT n = 0; n < rTbl.Count(); ++n )
- {
- FOREACHPAM_START( rTbl[ n ] )
- lcl_PaMCorrAbs3( PCURCRSR, aStart, aEnd, aNewPos );
- FOREACHPAM_END()
-
- SwUnoTableCrsr* pUnoTblCrsr =
- dynamic_cast<SwUnoTableCrsr*>(rTbl[ n ]);
- if( pUnoTblCrsr )
- {
- FOREACHPAM_START( &pUnoTblCrsr->GetSelRing() )
- lcl_PaMCorrAbs3( PCURCRSR, aStart, aEnd, aNewPos );
- FOREACHPAM_END()
- }
- }
- }
-}
-
void SwDoc::CorrAbs(const SwNodeIndex& rOldNode,
const SwPosition& rNewPos,
const xub_StrLen nOffset,
- BOOL bMoveCrsr)
+ sal_Bool bMoveCrsr)
{
+ SwCntntNode *const pCntntNode( rOldNode.GetNode().GetCntntNode() );
+ SwPaM const aPam(rOldNode, 0,
+ rOldNode, (pCntntNode) ? pCntntNode->Len() : 0);
+ SwPosition aNewPos(rNewPos);
+ aNewPos.nContent += nOffset;
+
getIDocumentMarkAccess()->correctMarksAbsolute(rOldNode, rNewPos, nOffset);
- { // fix readlines
+ { // fix redlines
SwRedlineTbl& rTbl = *pRedlineTbl;
- for( USHORT n = 0; n < rTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
{
// is on position ??
- lcl_PaMCorrAbs1( rTbl[ n ], &rOldNode.GetNode(), SwPosition(rNewPos), nOffset );
+ lcl_PaMCorrAbs(*rTbl[ n ], *aPam.Start(), *aPam.End(), aNewPos);
}
}
if(bMoveCrsr)
- ::PaMCorrAbs(rOldNode, rNewPos, nOffset);
+ {
+ ::PaMCorrAbs(aPam, aNewPos);
+ }
}
void SwDoc::CorrAbs(const SwPaM& rRange,
const SwPosition& rNewPos,
- BOOL bMoveCrsr)
+ sal_Bool bMoveCrsr)
{
SwPosition aStart(*rRange.Start());
SwPosition aEnd(*rRange.End());
@@ -351,14 +243,17 @@ void SwDoc::CorrAbs(const SwPaM& rRange,
void SwDoc::CorrAbs(const SwNodeIndex& rStartNode,
const SwNodeIndex& rEndNode,
const SwPosition& rNewPos,
- BOOL bMoveCrsr)
+ sal_Bool bMoveCrsr)
{
- SwPosition aNewPos(rNewPos);
-
_DelBookmarks(rStartNode, rEndNode);
if(bMoveCrsr)
- ::PaMCorrAbs(rStartNode, rEndNode, rNewPos);
+ {
+ SwCntntNode *const pCntntNode( rEndNode.GetNode().GetCntntNode() );
+ SwPaM const aPam(rStartNode, 0,
+ rEndNode, (pCntntNode) ? pCntntNode->Len() : 0);
+ ::PaMCorrAbs(aPam, rNewPos);
+ }
}
@@ -397,7 +292,7 @@ void PaMCorrRel( const SwNodeIndex &rOldNode,
}
{
SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl();
- for( USHORT n = 0; n < rTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
{
FOREACHPAM_START( rTbl[ n ] )
lcl_PaMCorrRel1( PCURCRSR, pOldNode, aNewPos, nCntIdx );
@@ -418,14 +313,14 @@ void PaMCorrRel( const SwNodeIndex &rOldNode,
void SwDoc::CorrRel(const SwNodeIndex& rOldNode,
const SwPosition& rNewPos,
const xub_StrLen nOffset,
- BOOL bMoveCrsr)
+ sal_Bool bMoveCrsr)
{
getIDocumentMarkAccess()->correctMarksRelative(rOldNode, rNewPos, nOffset);
{ // dann die Redlines korrigieren
SwRedlineTbl& rTbl = *pRedlineTbl;
SwPosition aNewPos(rNewPos);
- for( USHORT n = 0; n < rTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
{
// liegt auf der Position ??
lcl_PaMCorrRel1( rTbl[ n ], &rOldNode.GetNode(), aNewPos, aNewPos.nContent.GetIndex() + nOffset );
@@ -459,5 +354,9 @@ SwEditShell* SwDoc::GetEditShell( ViewShell** ppSh ) const
return 0;
}
+::sw::IShellCursorSupplier * SwDoc::GetIShellCursorSupplier()
+{
+ return GetEditShell(0);
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docdde.cxx b/sw/source/core/doc/docdde.cxx
index 6959e2880877..10892ca2a611 100644
--- a/sw/source/core/doc/docdde.cxx
+++ b/sw/source/core/doc/docdde.cxx
@@ -92,7 +92,7 @@ struct _FindItem
{}
};
-BOOL lcl_FindSection( const SwSectionFmtPtr& rpSectFmt, void* pArgs, bool bCaseSensitive )
+sal_Bool lcl_FindSection( const SwSectionFmtPtr& rpSectFmt, void* pArgs, bool bCaseSensitive )
{
_FindItem * const pItem( static_cast<_FindItem*>(pArgs) );
SwSection* pSect = rpSectFmt->GetSection();
@@ -113,26 +113,26 @@ BOOL lcl_FindSection( const SwSectionFmtPtr& rpSectFmt, void* pArgs, bool bCaseS
{
// eine Tabelle im normalen NodesArr
pItem->pSectNd = pIdx->GetNode().GetSectionNode();
- return FALSE;
+ return sal_False;
}
//nein!! // sollte der Namen schon passen, der Rest aber nicht, dann haben wir
// sie nicht. Die Namen sind immer eindeutig.
}
}
- return TRUE; // dann weiter
+ return sal_True; // dann weiter
}
-BOOL lcl_FindSectionCaseSensitive( const SwSectionFmtPtr& rpSectFmt, void* pArgs )
+sal_Bool lcl_FindSectionCaseSensitive( const SwSectionFmtPtr& rpSectFmt, void* pArgs )
{
return lcl_FindSection( rpSectFmt, pArgs, true );
}
-BOOL lcl_FindSectionCaseInsensitive( const SwSectionFmtPtr& rpSectFmt, void* pArgs )
+sal_Bool lcl_FindSectionCaseInsensitive( const SwSectionFmtPtr& rpSectFmt, void* pArgs )
{
return lcl_FindSection( rpSectFmt, pArgs, false );
}
-BOOL lcl_FindTable( const SwFrmFmtPtr& rpTableFmt, void* pArgs )
+sal_Bool lcl_FindTable( const SwFrmFmtPtr& rpTableFmt, void* pArgs )
{
_FindItem * const pItem( static_cast<_FindItem*>(pArgs) );
String sNm( GetAppCharClass().lower( rpTableFmt->GetName() ));
@@ -148,12 +148,12 @@ BOOL lcl_FindTable( const SwFrmFmtPtr& rpTableFmt, void* pArgs )
// eine Tabelle im normalen NodesArr
pItem->pTblNd = (SwTableNode*)
pFBox->GetSttNd()->FindTableNode();
- return FALSE;
+ return sal_False;
}
//nein! // sollte der Namen schon passen, der Rest aber nicht, dann haben wir
// sie nicht. Die Namen sind immer eindeutig.
}
- return TRUE; // dann weiter
+ return sal_True; // dann weiter
}
@@ -192,7 +192,7 @@ bool SwDoc::GetData( const String& rItem, const String& rMimeType,
return SwServerObject( *aPara.pTblNd ).GetData( rValue, rMimeType );
}
- return FALSE;
+ return sal_False;
}
@@ -230,7 +230,7 @@ bool SwDoc::SetData( const String& rItem, const String& rMimeType,
return SwServerObject( *aPara.pTblNd ).SetData( rMimeType, rValue );
}
- return FALSE;
+ return sal_False;
}
@@ -288,7 +288,7 @@ bool SwDoc::SetData( const String& rItem, const String& rMimeType,
return pObj;
}
-BOOL SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam,
+sal_Bool SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam,
SwNodeRange*& rpRange ) const
{
// haben wir ueberhaupt das Item vorraetig?
@@ -307,7 +307,7 @@ BOOL SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam,
// sondern auch Rahmen(Text!), Tabellen, Gliederungen:
if( STRING_NOTFOUND != nPos )
{
- BOOL bWeiter = FALSE;
+ sal_Bool bWeiter = sal_False;
String sName( sItem.Copy( 0, nPos ) );
String sCmp( sItem.Copy( nPos + 1 ));
rCC.toLower( sItem );
@@ -323,7 +323,7 @@ BOOL SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam,
{
rpRange = new SwNodeRange( *aPara.pTblNd, 0,
*aPara.pTblNd->EndOfSectionNode(), 1 );
- return TRUE;
+ return sal_True;
}
}
else if( sCmp.EqualsAscii( pMarkToFrame ) )
@@ -336,13 +336,13 @@ BOOL SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam,
!( pNd = &pIdx->GetNode())->IsNoTxtNode() )
{
rpRange = new SwNodeRange( *pNd, 1, *pNd->EndOfSectionNode() );
- return TRUE;
+ return sal_True;
}
}
else if( sCmp.EqualsAscii( pMarkToRegion ) )
{
sItem = sName; // wird unten behandelt !
- bWeiter = TRUE;
+ bWeiter = sal_True;
}
else if( sCmp.EqualsAscii( pMarkToOutline ) )
{
@@ -350,11 +350,11 @@ BOOL SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam,
if( GotoOutline( aPos, sName ))
{
SwNode* pNd = &aPos.nNode.GetNode();
- //BYTE nLvl = pNd->GetTxtNode()->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
+ //sal_uInt8 nLvl = pNd->GetTxtNode()->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
const int nLvl = pNd->GetTxtNode()->GetAttrOutlineLevel()-1;//<-end,zhaojianwei
const SwOutlineNodes& rOutlNds = GetNodes().GetOutLineNds();
- USHORT nTmpPos;
+ sal_uInt16 nTmpPos;
rOutlNds.Seek_Entry( pNd, &nTmpPos );
rpRange = new SwNodeRange( aPos.nNode, 0, aPos.nNode );
@@ -371,12 +371,12 @@ BOOL SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam,
rpRange->aEnd = *rOutlNds[ nTmpPos ];
else
rpRange->aEnd = GetNodes().GetEndOfContent();
- return TRUE;
+ return sal_True;
}
}
if( !bWeiter )
- return FALSE;
+ return sal_False;
}
//search for bookmarks and sections case senstive at first. If nothing is found then try again case insensitive
@@ -404,7 +404,7 @@ BOOL SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam,
{
rpRange = new SwNodeRange( *aPara.pSectNd, 1,
*aPara.pSectNd->EndOfSectionNode() );
- return TRUE;
+ return sal_True;
}
}
@@ -412,7 +412,7 @@ BOOL SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam,
break;
bCaseSensitive = false;
}
- return FALSE;
+ return sal_False;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index cf2de5b310c7..30adf7eb721a 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
#include <vcl/virdev.hxx>
#include <svx/svdmodel.hxx>
@@ -49,6 +50,7 @@
#include <ndole.hxx>
#include <mdiexp.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docary.hxx>
#include <pagefrm.hxx> //Fuer DelPageDesc
#include <rootfrm.hxx> //Fuer DelPageDesc
@@ -69,6 +71,7 @@
#include <GetMetricVal.hxx>
#include <unotools/syslocale.hxx>
#include <statstr.hrc>
+#include <hints.hxx>
#include <SwUndoPageDesc.hxx>
@@ -120,8 +123,8 @@ static void lcl_DefaultPageFmt( sal_uInt16 nPoolFmtId,
SvxLRSpaceItem aLR( RES_LR_SPACE );
SvxULSpaceItem aUL( RES_UL_SPACE );
- aUL.SetUpper( (USHORT)nMinTop );
- aUL.SetLower( (USHORT)nMinBottom );
+ aUL.SetUpper( (sal_uInt16)nMinTop );
+ aUL.SetLower( (sal_uInt16)nMinBottom );
aLR.SetRight( nMinRight );
aLR.SetLeft( nMinLeft );
@@ -141,7 +144,7 @@ static void lcl_DefaultPageFmt( sal_uInt16 nPoolFmtId,
|*************************************************************************/
void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest,
- const BOOL bPage = TRUE )
+ const sal_Bool bPage = sal_True )
{
/////////////// !!!!!!!!!!!!!!!!
//JP 03.03.99:
@@ -149,7 +152,7 @@ void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest,
// funktioniert nicht richtig, wenn man unterschiedliche WhichRanges hat.
/////////////// !!!!!!!!!!!!!!!!
//Die interressanten Attribute uebernehmen.
- USHORT const aIdArr[] = { RES_FRM_SIZE, RES_UL_SPACE,
+ sal_uInt16 const aIdArr[] = { RES_FRM_SIZE, RES_UL_SPACE,
RES_BACKGROUND, RES_SHADOW,
RES_COL, RES_COL,
RES_FRAMEDIR, RES_FRAMEDIR,
@@ -163,9 +166,9 @@ void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest,
0 };
const SfxPoolItem* pItem;
- for( USHORT n = 0; aIdArr[ n ]; n += 2 )
+ for( sal_uInt16 n = 0; aIdArr[ n ]; n += 2 )
{
- for( USHORT nId = aIdArr[ n ]; nId <= aIdArr[ n+1]; ++nId )
+ for( sal_uInt16 nId = aIdArr[ n ]; nId <= aIdArr[ n+1]; ++nId )
{
// --> FME 2005-04-18 #i45539#
// bPage == true:
@@ -176,7 +179,7 @@ void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest,
if( ( bPage && RES_HEADER_FOOTER_EAT_SPACING != nId ) ||
( !bPage && RES_COL != nId && RES_PAPER_BIN != nId ))
{
- if( SFX_ITEM_SET == rSource.GetItemState( nId, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSource.GetItemState( nId, sal_False, &pItem ))
rDest.SetFmtAttr( *pItem );
else
rDest.ResetFmtAttr( nId );
@@ -191,18 +194,18 @@ void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest,
}
-void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
+void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged )
{
OSL_ENSURE( i < aPageDescs.Count(), "PageDescs ueberindiziert." );
SwPageDesc *pDesc = aPageDescs[i];
- BOOL bDoesUndo = DoesUndo();
- if (DoesUndo())
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- AppendUndo(new SwUndoPageDesc(*pDesc, rChged, this));
- DoUndo(FALSE);
+ SwUndo *const pUndo(new SwUndoPageDesc(*pDesc, rChged, this));
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
+ ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
//Als erstes wird ggf. gespiegelt.
if ( rChged.GetUseOn() == nsUseOnPage::PD_MIRROR )
@@ -225,7 +228,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
// ErgoSum-Texte geben, die sich auf eine geaenderte Seite beziehen,
// deshalb werden die Fussnoten invalidiert
SwFtnIdxs& rFtnIdxs = GetFtnIdxs();
- for( USHORT nPos = 0; nPos < rFtnIdxs.Count(); ++nPos )
+ for( sal_uInt16 nPos = 0; nPos < rFtnIdxs.Count(); ++nPos )
{
SwTxtFtn *pTxtFtn = rFtnIdxs[ nPos ];
const SwFmtFtn &rFtn = pTxtFtn->GetFtn();
@@ -241,7 +244,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
//Header abgleichen.
const SwFmtHeader &rHead = rChged.GetMaster().GetHeader();
- if( bDoesUndo )
+ if (undoGuard.UndoWasEnabled())
{
// #i46909# no undo if header or footer changed
// hat sich an den Nodes etwas veraendert ?
@@ -268,7 +271,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
SwFmtHeader aHead( MakeLayoutFmt( RND_STD_HEADERL, 0 ) );
pDesc->GetLeft().SetFmtAttr( aHead );
//Weitere Attribute (Raender, Umrandung...) uebernehmen.
- ::lcl_DescSetAttr( *rHead.GetHeaderFmt(), *aHead.GetHeaderFmt(), FALSE);
+ ::lcl_DescSetAttr( *rHead.GetHeaderFmt(), *aHead.GetHeaderFmt(), sal_False);
}
else
{
@@ -281,7 +284,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
{
SwFrmFmt *pFmt = new SwFrmFmt( GetAttrPool(), "Header",
GetDfltFrmFmt() );
- ::lcl_DescSetAttr( *pRight, *pFmt, FALSE );
+ ::lcl_DescSetAttr( *pRight, *pFmt, sal_False );
//Der Bereich auf den das rechte Kopfattribut zeigt wird
//kopiert und der Index auf den StartNode in das linke
//Kopfattribut gehaengt.
@@ -290,14 +293,14 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
SwNodeRange aRange( aRCnt.GetCntntIdx()->GetNode(), 0,
*aRCnt.GetCntntIdx()->GetNode().EndOfSectionNode() );
aTmp = *pSttNd->EndOfSectionNode();
- GetNodes()._Copy( aRange, aTmp, FALSE );
+ GetNodes()._Copy( aRange, aTmp, sal_False );
pFmt->SetFmtAttr( SwFmtCntnt( pSttNd ) );
pDesc->GetLeft().SetFmtAttr( SwFmtHeader( pFmt ) );
}
else
::lcl_DescSetAttr( *pRight,
- *(SwFrmFmt*)rLeftHead.GetHeaderFmt(), FALSE );
+ *(SwFrmFmt*)rLeftHead.GetHeaderFmt(), sal_False );
}
}
@@ -305,7 +308,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
//Footer abgleichen.
const SwFmtFooter &rFoot = rChged.GetMaster().GetFooter();
- if( bDoesUndo )
+ if (undoGuard.UndoWasEnabled())
{
// #i46909# no undo if header or footer changed
// hat sich an den Nodes etwas veraendert ?
@@ -330,7 +333,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
SwFmtFooter aFoot( MakeLayoutFmt( RND_STD_FOOTER, 0 ) );
pDesc->GetLeft().SetFmtAttr( aFoot );
//Weitere Attribute (Raender, Umrandung...) uebernehmen.
- ::lcl_DescSetAttr( *rFoot.GetFooterFmt(), *aFoot.GetFooterFmt(), FALSE);
+ ::lcl_DescSetAttr( *rFoot.GetFooterFmt(), *aFoot.GetFooterFmt(), sal_False);
}
else
{
@@ -343,7 +346,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
{
SwFrmFmt *pFmt = new SwFrmFmt( GetAttrPool(), "Footer",
GetDfltFrmFmt() );
- ::lcl_DescSetAttr( *pRight, *pFmt, FALSE );
+ ::lcl_DescSetAttr( *pRight, *pFmt, sal_False );
//Der Bereich auf den das rechte Kopfattribut zeigt wird
//kopiert und der Index auf den StartNode in das linke
//Kopfattribut gehaengt.
@@ -352,14 +355,14 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
SwNodeRange aRange( aRCnt.GetCntntIdx()->GetNode(), 0,
*aRCnt.GetCntntIdx()->GetNode().EndOfSectionNode() );
aTmp = *pSttNd->EndOfSectionNode();
- GetNodes()._Copy( aRange, aTmp, FALSE );
+ GetNodes()._Copy( aRange, aTmp, sal_False );
pFmt->SetFmtAttr( SwFmtCntnt( pSttNd ) );
pDesc->GetLeft().SetFmtAttr( SwFmtFooter( pFmt ) );
}
else
::lcl_DescSetAttr( *pRight,
- *(SwFrmFmt*)rLeftFoot.GetFooterFmt(), FALSE );
+ *(SwFrmFmt*)rLeftFoot.GetFooterFmt(), sal_False );
}
}
pDesc->ChgFooterShare( rChged.IsFooterShared() );
@@ -372,22 +375,22 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
//Wenn sich das UseOn oder der Follow aendern muessen die
//Absaetze das erfahren.
- BOOL bUseOn = FALSE;
- BOOL bFollow = FALSE;
+ sal_Bool bUseOn = sal_False;
+ sal_Bool bFollow = sal_False;
if ( pDesc->GetUseOn() != rChged.GetUseOn() )
{ pDesc->SetUseOn( rChged.GetUseOn() );
- bUseOn = TRUE;
+ bUseOn = sal_True;
}
if ( pDesc->GetFollow() != rChged.GetFollow() )
{ if ( rChged.GetFollow() == &rChged )
{ if ( pDesc->GetFollow() != pDesc )
{ pDesc->SetFollow( pDesc );
- bFollow = TRUE;
+ bFollow = sal_True;
}
}
else
{ pDesc->SetFollow( rChged.pFollow );
- bFollow = TRUE;
+ bFollow = sal_True;
}
}
@@ -420,13 +423,10 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
}
SetModified();
- DoUndo(bDoesUndo);
-
// #i46909# no undo if header or footer changed
if( bHeaderFooterChanged )
{
- ClearRedo();
- DelAllUndoObj();
+ GetIDocumentUndoRedo().DelAllUndoObj();
}
}
@@ -439,7 +439,7 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
|*
|*************************************************************************/
-void lcl_RemoveFrms( SwFrmFmt& rFmt, BOOL& rbFtnsRemoved )
+void lcl_RemoveFrms( SwFrmFmt& rFmt, sal_Bool& rbFtnsRemoved )
{
SwClientIter aIter( rFmt );
SwFrm *pFrm;
@@ -448,8 +448,8 @@ void lcl_RemoveFrms( SwFrmFmt& rFmt, BOOL& rbFtnsRemoved )
if ( !rbFtnsRemoved && pFrm->IsPageFrm() &&
((SwPageFrm*)pFrm)->IsFtnPage() )
{
- rFmt.getIDocumentLayoutAccess()->GetRootFrm()->RemoveFtns( 0, FALSE, TRUE );
- rbFtnsRemoved = TRUE;
+ rFmt.getIDocumentLayoutAccess()->GetRootFrm()->RemoveFtns( 0, sal_False, sal_True );
+ rbFtnsRemoved = sal_True;
}
else
{
@@ -488,8 +488,8 @@ void SwDoc::PreDelPageDesc(SwPageDesc * pDel)
aPageDescs[0]->Add( pLast );
}
- BOOL bFtnInf = FALSE;
- if ( TRUE == (bFtnInf = pLast == pFtnInfo->GetPageDescDep()) ||
+ sal_Bool bFtnInf = sal_False;
+ if ( sal_True == (bFtnInf = pLast == pFtnInfo->GetPageDescDep()) ||
pLast == pEndNoteInfo->GetPageDescDep() )
{
aPageDescs[0]->Add( pLast );
@@ -498,7 +498,7 @@ void SwDoc::PreDelPageDesc(SwPageDesc * pDel)
}
}
- for ( USHORT j = 0; j < aPageDescs.Count(); ++j )
+ for ( sal_uInt16 j = 0; j < aPageDescs.Count(); ++j )
{
if ( aPageDescs[j]->GetFollow() == pDel )
{
@@ -521,7 +521,7 @@ void SwDoc::PreDelPageDesc(SwPageDesc * pDel)
// Wenn wir auf Endnotenseiten stossen, schmeissen wir alle Fussnoten weg,
// anders kann die Reihenfolge der Seiten (FollowsPageDescs usw.)
// nicht garantiert werden.
- BOOL bFtnsRemoved = FALSE;
+ sal_Bool bFtnsRemoved = sal_False;
::lcl_RemoveFrms( pDel->GetMaster(), bFtnsRemoved );
::lcl_RemoveFrms( pDel->GetLeft(), bFtnsRemoved );
@@ -529,7 +529,7 @@ void SwDoc::PreDelPageDesc(SwPageDesc * pDel)
}
void SwDoc::BroadcastStyleOperation(String rName, SfxStyleFamily eFamily,
- USHORT nOp)
+ sal_uInt16 nOp)
{
if (pDocShell)
{
@@ -546,7 +546,7 @@ void SwDoc::BroadcastStyleOperation(String rName, SfxStyleFamily eFamily,
}
}
-void SwDoc::DelPageDesc( USHORT i, BOOL bBroadcast )
+void SwDoc::DelPageDesc( sal_uInt16 i, sal_Bool bBroadcast )
{
OSL_ENSURE( i < aPageDescs.Count(), "PageDescs ueberindiziert." );
OSL_ENSURE( i != 0, "Default Pagedesc loeschen is nicht." );
@@ -559,9 +559,10 @@ void SwDoc::DelPageDesc( USHORT i, BOOL bBroadcast )
BroadcastStyleOperation(pDel->GetName(), SFX_STYLE_FAMILY_PAGE,
SFX_STYLESHEET_ERASED);
- if (DoesUndo())
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- AppendUndo(new SwUndoPageDescDelete(*pDel, this));
+ SwUndo *const pUndo(new SwUndoPageDescDelete(*pDel, this));
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
PreDelPageDesc(pDel); // #i7983#
@@ -579,8 +580,8 @@ void SwDoc::DelPageDesc( USHORT i, BOOL bBroadcast )
|*
|*************************************************************************/
-USHORT SwDoc::MakePageDesc( const String &rName, const SwPageDesc *pCpy,
- BOOL bRegardLanguage, BOOL bBroadcast)
+sal_uInt16 SwDoc::MakePageDesc( const String &rName, const SwPageDesc *pCpy,
+ sal_Bool bRegardLanguage, sal_Bool bBroadcast) // #116530#
{
SwPageDesc *pNew;
if( pCpy )
@@ -613,19 +614,22 @@ USHORT SwDoc::MakePageDesc( const String &rName, const SwPageDesc *pCpy,
BroadcastStyleOperation(rName, SFX_STYLE_FAMILY_PAGE,
SFX_STYLESHEET_CREATED);
- if (DoesUndo())
- AppendUndo(new SwUndoPageDescCreate(pNew, this));
+ if (GetIDocumentUndoRedo().DoesUndo())
+ {
+ // #116530#
+ GetIDocumentUndoRedo().AppendUndo(new SwUndoPageDescCreate(pNew, this));
+ }
SetModified();
return (aPageDescs.Count()-1);
}
-SwPageDesc* SwDoc::FindPageDescByName( const String& rName, USHORT* pPos ) const
+SwPageDesc* SwDoc::FindPageDescByName( const String& rName, sal_uInt16* pPos ) const
{
SwPageDesc* pRet = 0;
if( pPos ) *pPos = USHRT_MAX;
- for( USHORT n = 0, nEnd = aPageDescs.Count(); n < nEnd; ++n )
+ for( sal_uInt16 n = 0, nEnd = aPageDescs.Count(); n < nEnd; ++n )
if( aPageDescs[ n ]->GetName() == rName )
{
pRet = aPageDescs[ n ];
@@ -651,12 +655,12 @@ void SwDoc::PrtDataChanged()
// <--
SwWait *pWait = 0;
- BOOL bEndAction = FALSE;
+ sal_Bool bEndAction = sal_False;
if( GetDocShell() )
GetDocShell()->UpdateFontList();
- BOOL bDraw = TRUE;
+ sal_Bool bDraw = sal_True;
if ( GetRootFrm() )
{
ViewShell *pSh = GetRootFrm()->GetCurrShell();
@@ -664,12 +668,12 @@ void SwDoc::PrtDataChanged()
( pSh && pSh->GetViewOptions()->IsPrtFormat() ) )
{
if ( GetDocShell() )
- pWait = new SwWait( *GetDocShell(), TRUE );
+ pWait = new SwWait( *GetDocShell(), sal_True );
GetRootFrm()->StartAllAction();
- bEndAction = TRUE;
+ bEndAction = sal_True;
- bDraw = FALSE;
+ bDraw = sal_False;
if( pDrawModel )
{
pDrawModel->SetAddExtLeading( get(IDocumentSettingAccess::ADD_EXT_LEADING) );
@@ -702,7 +706,7 @@ void SwDoc::PrtDataChanged()
pDrawModel->SetRefDevice( pOutDev );
}
- PrtOLENotify( TRUE );
+ PrtOLENotify( sal_True );
if ( bEndAction )
GetRootFrm()->EndAllAction();
@@ -716,7 +720,7 @@ void SwDoc::PrtDataChanged()
//ist in init.cxx zu finden.
extern SvPtrarr *pGlobalOLEExcludeList;
-void SwDoc::PrtOLENotify( BOOL bAll )
+void SwDoc::PrtOLENotify( sal_Bool bAll )
{
SwFEShell *pShell = 0;
if ( GetRootFrm() && GetRootFrm()->GetCurrShell() )
@@ -738,16 +742,16 @@ void SwDoc::PrtOLENotify( BOOL bAll )
//Da wir keine Shell haben, merken wir uns diesen unguenstigen
//Zustand am Dokument, dies wird dann beim Erzeugen der ersten Shell
//nachgeholt.
- mbOLEPrtNotifyPending = TRUE;
+ mbOLEPrtNotifyPending = sal_True;
if ( bAll )
- mbAllOLENotify = TRUE;
+ mbAllOLENotify = sal_True;
}
else
{
if ( mbAllOLENotify )
- bAll = TRUE;
+ bAll = sal_True;
- mbOLEPrtNotifyPending = mbAllOLENotify = FALSE;
+ mbOLEPrtNotifyPending = mbAllOLENotify = sal_False;
SwOLENodes *pNodes = 0;
@@ -772,12 +776,12 @@ void SwDoc::PrtOLENotify( BOOL bAll )
0, pNodes->Count(), GetDocShell());
GetRootFrm()->StartAllAction();
- for( USHORT i = 0; i < pNodes->Count(); ++i )
+ for( sal_uInt16 i = 0; i < pNodes->Count(); ++i )
{
::SetProgressState( i, GetDocShell() );
SwOLENode* pOLENd = (*pNodes)[i];
- pOLENd->SetOLESizeInvalid( FALSE );
+ pOLENd->SetOLESizeInvalid( sal_False );
//Ersteinmal die Infos laden und festellen ob das Teil nicht
//schon in der Exclude-Liste steht
@@ -792,8 +796,8 @@ void SwDoc::PrtOLENotify( BOOL bAll )
// aName = ????
}
- BOOL bFound = FALSE;
- for ( USHORT j = 0;
+ sal_Bool bFound = sal_False;
+ for ( sal_uInt16 j = 0;
j < pGlobalOLEExcludeList->Count() && !bFound;
++j )
{
@@ -824,7 +828,7 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, )
SwFEShell* pSh = (SwFEShell*)GetEditShell();
if( pSh )
{
- mbOLEPrtNotifyPending = mbAllOLENotify = FALSE;
+ mbOLEPrtNotifyPending = mbAllOLENotify = sal_False;
SwOLENodes aOLENodes;
SwClientIter aIter( *(SwModify*)GetDfltGrfFmtColl() );
@@ -846,12 +850,12 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, )
GetRootFrm()->StartAllAction();
SwMsgPoolItem aMsgHint( RES_UPDATE_ATTR );
- for( USHORT i = 0; i < aOLENodes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < aOLENodes.Count(); ++i )
{
::SetProgressState( i, GetDocShell() );
SwOLENode* pOLENd = aOLENodes[i];
- pOLENd->SetOLESizeInvalid( FALSE );
+ pOLENd->SetOLESizeInvalid( sal_False );
//Kennen wir nicht, also muss das Objekt geladen werden.
//Wenn es keine Benachrichtigung wuenscht
@@ -867,16 +871,16 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, )
return 0;
}
-BOOL SwDoc::FindPageDesc( const String & rName, sal_uInt16 * pFound)
+sal_Bool SwDoc::FindPageDesc( const String & rName, sal_uInt16 * pFound)
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
sal_uInt16 nI;
for (nI = 0; nI < aPageDescs.Count(); nI++)
{
if (aPageDescs[nI]->GetName() == rName)
{
*pFound = nI;
- bResult = TRUE;
+ bResult = sal_True;
break;
}
}
@@ -896,7 +900,7 @@ SwPageDesc * SwDoc::GetPageDesc( const String & rName )
return aResult;
}
-void SwDoc::DelPageDesc( const String & rName, BOOL bBroadcast )
+void SwDoc::DelPageDesc( const String & rName, sal_Bool bBroadcast )
{
sal_uInt16 nI;
@@ -919,7 +923,7 @@ void SwDoc::ChgPageDesc( const String & rName, const SwPageDesc & rDesc)
*/
void SwDoc::CheckDefaultPageFmt()
{
- for ( USHORT i = 0; i < GetPageDescCnt(); ++i )
+ for ( sal_uInt16 i = 0; i < GetPageDescCnt(); ++i )
{
SwPageDesc& rDesc = _GetPageDesc( i );
@@ -951,7 +955,7 @@ void SwDoc::SetDefaultPageMode(bool bSquaredPageMode)
aNewGrid.Init();
SetDefault(aNewGrid);
- for ( USHORT i = 0; i < GetPageDescCnt(); ++i )
+ for ( sal_uInt16 i = 0; i < GetPageDescCnt(); ++i )
{
SwPageDesc& rDesc = _GetPageDesc( i );
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index fdd576112301..a240afbf3dc6 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
#include <rtl/logfile.hxx>
#include <vcl/outdev.hxx>
@@ -50,12 +51,13 @@
#include <viewimp.hxx>
#include <swhints.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docsh.hxx>
#include <rootfrm.hxx> //Damit der RootDtor gerufen wird.
#include <poolfmt.hxx>
#include <viewsh.hxx> // fuer MakeDrawView
#include <drawdoc.hxx>
-#include <undobj.hxx>
+#include <UndoDraw.hxx>
#include <swundo.hxx> // fuer die UndoIds
#include <dcontact.hxx>
#include <dview.hxx>
@@ -128,7 +130,7 @@ void lcl_AdjustPositioningAttr( SwDrawFrmFmt* _pFrmFmt,
{
case FRMDIR_VERT_TOP_LEFT:
{
- // vertical from left-to-right - not supported yet
+ // vertical from left-to-right - Badaa: supported now!
bVert = true;
bR2L = true;
OSL_FAIL( "<lcl_AdjustPositioningAttr(..)> - vertical from left-to-right not supported." );
@@ -160,10 +162,18 @@ void lcl_AdjustPositioningAttr( SwDrawFrmFmt* _pFrmFmt,
}
// use geometry of drawing object
const SwRect aObjRect = _rSdrObj.GetSnapRect();
+
if ( bVert )
{
- nHoriRelPos = aObjRect.Top() - aAnchorPos.Y();
- nVertRelPos = aAnchorPos.X() - aObjRect.Right();
+ if ( bR2L ) {
+ //FRMDIR_VERT_TOP_LEFT
+ nHoriRelPos = aObjRect.Left() - aAnchorPos.X();
+ nVertRelPos = aObjRect.Top() - aAnchorPos.Y();
+ } else {
+ //FRMDIR_VERT_TOP_RIGHT
+ nHoriRelPos = aObjRect.Top() - aAnchorPos.Y();
+ nVertRelPos = aAnchorPos.X() - aObjRect.Right();
+ }
}
else if ( bR2L )
{
@@ -175,6 +185,7 @@ void lcl_AdjustPositioningAttr( SwDrawFrmFmt* _pFrmFmt,
nHoriRelPos = aObjRect.Left() - aAnchorPos.X();
nVertRelPos = aObjRect.Top() - aAnchorPos.Y();
}
+ //End of SCMS
}
_pFrmFmt->SetFmtAttr( SwFmtHoriOrient( nHoriRelPos, text::HoriOrientation::NONE, text::RelOrientation::FRAME ) );
@@ -206,7 +217,7 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView )
const SdrMarkList &rMrkList = rDrawView.GetMarkedObjectList();
SwDrawFrmFmt *pFmt = 0L;
SdrObject *pObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj();
- BOOL bNoGroup = ( 0 == pObj->GetUpGroup() );
+ sal_Bool bNoGroup = ( 0 == pObj->GetUpGroup() );
SwDrawContact* pNewContact = 0;
if( bNoGroup )
{
@@ -214,9 +225,9 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView )
SwDrawContact *pMyContact = (SwDrawContact*)GetUserCall(pObj);
const SwFmtAnchor aAnch( pMyContact->GetFmt()->GetAnchor() );
- SwUndoDrawGroup* pUndo = !DoesUndo()
+ SwUndoDrawGroup *const pUndo = (!GetIDocumentUndoRedo().DoesUndo())
? 0
- : new SwUndoDrawGroup( (USHORT)rMrkList.GetMarkCount() );
+ : new SwUndoDrawGroup( (sal_uInt16)rMrkList.GetMarkCount() );
// #i53320#
bool bGroupMembersNotPositioned( false );
@@ -226,7 +237,7 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView )
bGroupMembersNotPositioned = pAnchoredDrawObj->NotYetPositioned();
}
//ContactObjekte und Formate vernichten.
- for( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj);
@@ -284,14 +295,15 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView )
if( pUndo )
{
pUndo->SetGroupFmt( pFmt );
- ClearRedo();
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
}
}
else
{
- if ( DoesUndo() )
- ClearRedo();
+ if (GetIDocumentUndoRedo().DoesUndo())
+ {
+ GetIDocumentUndoRedo().ClearRedo();
+ }
rDrawView.GroupMarked();
OSL_ENSURE( rMrkList.GetMarkCount() == 1, "GroupMarked more or none groups." );
@@ -303,9 +315,11 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView )
void SwDoc::UnGroupSelection( SdrView& rDrawView )
{
- const int bUndo = DoesUndo();
+ bool const bUndo = GetIDocumentUndoRedo().DoesUndo();
if( bUndo )
- ClearRedo();
+ {
+ GetIDocumentUndoRedo().ClearRedo();
+ }
// replace marked 'virtual' drawing objects by the corresponding 'master'
// drawing objects.
@@ -322,7 +336,7 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView )
{
String sDrwFmtNm( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM("DrawObject" )));
- for ( USHORT i = 0; i < nMarkCount; ++i )
+ for ( sal_uInt16 i = 0; i < nMarkCount; ++i )
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
if ( pObj->IsA( TYPE(SdrObjGroup) ) )
@@ -335,10 +349,10 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView )
if( bUndo )
{
pUndo = new SwUndoDrawUnGroup( (SdrObjGroup*)pObj );
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
- for ( USHORT i2 = 0; i2 < pLst->GetObjCount(); ++i2 )
+ for ( sal_uInt16 i2 = 0; i2 < pLst->GetObjCount(); ++i2 )
{
SdrObject* pSubObj = pLst->GetObj( i2 );
SwDrawFrmFmt *pFmt = MakeDrawFrmFmt( sDrwFmtNm,
@@ -365,7 +379,7 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView )
if( bUndo )
{
pUndo = new SwUndoDrawUnGroupConnectToLayout();
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
while ( pFmtsAndObjs[i].size() > 0 )
@@ -394,15 +408,15 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView )
|*
|*************************************************************************/
-BOOL SwDoc::DeleteSelection( SwDrawView& rDrawView )
+sal_Bool SwDoc::DeleteSelection( SwDrawView& rDrawView )
{
- BOOL bCallBase = FALSE;
+ sal_Bool bCallBase = sal_False;
const SdrMarkList &rMrkList = rDrawView.GetMarkedObjectList();
if( rMrkList.GetMarkCount() )
{
- StartUndo(UNDO_EMPTY, NULL);
- USHORT i;
- BOOL bDelMarked = TRUE;
+ GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
+ sal_uInt16 i;
+ sal_Bool bDelMarked = sal_True;
if( 1 == rMrkList.GetMarkCount() )
{
@@ -414,7 +428,7 @@ BOOL SwDoc::DeleteSelection( SwDrawView& rDrawView )
if( pFrmFmt )
{
DelLayoutFmt( pFrmFmt );
- bDelMarked = FALSE;
+ bDelMarked = sal_False;
}
}
}
@@ -429,7 +443,7 @@ BOOL SwDoc::DeleteSelection( SwDrawView& rDrawView )
if( pFrmFmt &&
FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId() )
{
- rDrawView.MarkObj( pObj, rDrawView.Imp().GetPageView(), TRUE );
+ rDrawView.MarkObj( pObj, rDrawView.Imp().GetPageView(), sal_True );
--i;
DelLayoutFmt( pFrmFmt );
}
@@ -441,8 +455,10 @@ BOOL SwDoc::DeleteSelection( SwDrawView& rDrawView )
SdrObject *pObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj();
if( !pObj->GetUpGroup() )
{
- SwUndoDrawDelete* pUndo = !DoesUndo() ? 0
- : new SwUndoDrawDelete( (USHORT)rMrkList.GetMarkCount() );
+ SwUndoDrawDelete *const pUndo =
+ (!GetIDocumentUndoRedo().DoesUndo())
+ ? 0
+ : new SwUndoDrawDelete( (sal_uInt16)rMrkList.GetMarkCount() );
//ContactObjekte vernichten, Formate sicherstellen.
for( i = 0; i < rMrkList.GetMarkCount(); ++i )
@@ -473,13 +489,15 @@ BOOL SwDoc::DeleteSelection( SwDrawView& rDrawView )
}
if( pUndo )
- AppendUndo( pUndo );
+ {
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
+ }
}
- bCallBase = TRUE;
+ bCallBase = sal_True;
}
SetModified();
- EndUndo(UNDO_EMPTY, NULL);
+ GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
}
return bCallBase;
@@ -492,7 +510,7 @@ BOOL SwDoc::DeleteSelection( SwDrawView& rDrawView )
|*************************************************************************/
_ZSortFly::_ZSortFly( const SwFrmFmt* pFrmFmt, const SwFmtAnchor* pFlyAn,
- UINT32 nArrOrdNum )
+ sal_uInt32 nArrOrdNum )
: pFmt( pFrmFmt ), pAnchor( pFlyAn ), nOrdNum( nArrOrdNum )
{
// #i11176#
@@ -561,7 +579,7 @@ void SwDoc::InitDrawModel()
pSdrPool->SetPoolDefaultItem(SdrShadowXDistItem((300 * 72) / 127));
pSdrPool->SetPoolDefaultItem(SdrShadowYDistItem((300 * 72) / 127));
}
- SfxItemPool *pEEgPool = EditEngine::CreatePool( FALSE );
+ SfxItemPool *pEEgPool = EditEngine::CreatePool( sal_False );
pSdrPool->SetSecondaryPool( pEEgPool );
if ( !GetAttrPool().GetFrozenIdRanges () )
GetAttrPool().FreezeIdRanges();
@@ -576,7 +594,7 @@ void SwDoc::InitDrawModel()
//Seite.
pDrawModel = new SwDrawDocument( this );
- pDrawModel->EnableUndo( DoesUndo() );
+ pDrawModel->EnableUndo( GetIDocumentUndoRedo().DoesUndo() );
String sLayerNm;
sLayerNm.AssignAscii(RTL_CONSTASCII_STRINGPARAM("Hell" ));
@@ -600,7 +618,7 @@ void SwDoc::InitDrawModel()
nInvisibleControls = pDrawModel->GetLayerAdmin().NewLayer( sLayerNm )->GetID();
}
- pDrawModel->InsertPage( pDrawModel->AllocPage( FALSE ) );
+ pDrawModel->InsertPage( pDrawModel->AllocPage( sal_False ) );
RTL_LOGFILE_CONTEXT_TRACE( aLog, "after create DrawDocument" );
RTL_LOGFILE_CONTEXT_TRACE( aLog, "before create Spellchecker/Hyphenator" );
@@ -637,13 +655,13 @@ void SwDoc::NotifyInvisibleLayers( SdrPageView& _rSdrPageView )
{
String sLayerNm;
sLayerNm.AssignAscii(RTL_CONSTASCII_STRINGPARAM("InvisibleHell" ));
- _rSdrPageView.SetLayerVisible( sLayerNm, FALSE );
+ _rSdrPageView.SetLayerVisible( sLayerNm, sal_False );
sLayerNm.AssignAscii(RTL_CONSTASCII_STRINGPARAM("InvisibleHeaven" ));
- _rSdrPageView.SetLayerVisible( sLayerNm, FALSE );
+ _rSdrPageView.SetLayerVisible( sLayerNm, sal_False );
sLayerNm.AssignAscii(RTL_CONSTASCII_STRINGPARAM("InvisibleControls" ));
- _rSdrPageView.SetLayerVisible( sLayerNm, FALSE );
+ _rSdrPageView.SetLayerVisible( sLayerNm, sal_False );
}
/** method to determine, if a layer ID belongs to the visible ones.
@@ -837,7 +855,7 @@ IMPL_LINK(SwDoc, CalcFieldValueHdl, EditFieldInfo*, pInfo)
******************************************************************/
pInfo->SetRepresentation(
((const SvxDateField*) pField)->GetFormatted(
- *GetNumberFormatter( TRUE ), LANGUAGE_SYSTEM) );
+ *GetNumberFormatter( sal_True ), LANGUAGE_SYSTEM) );
}
else if (pField && pField->ISA(SvxURLField))
{
@@ -863,7 +881,7 @@ IMPL_LINK(SwDoc, CalcFieldValueHdl, EditFieldInfo*, pInfo)
break;
}
- USHORT nChrFmt;
+ sal_uInt16 nChrFmt;
if (IsVisitedURL(((const SvxURLField*)pField)->GetURL()))
nChrFmt = RES_POOLCHR_INET_VISIT;
@@ -892,7 +910,7 @@ IMPL_LINK(SwDoc, CalcFieldValueHdl, EditFieldInfo*, pInfo)
******************************************************************/
pInfo->SetRepresentation(
((const SvxExtTimeField*) pField)->GetFormatted(
- *GetNumberFormatter( TRUE ), LANGUAGE_SYSTEM) );
+ *GetNumberFormatter( sal_True ), LANGUAGE_SYSTEM) );
}
else
{
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index d966cb78ba8c..ba43772dcaa0 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -49,6 +49,7 @@
#include <cntfrm.hxx> // fuers Spell
#include <crsrsh.hxx>
#include <doc.hxx>
+#include <UndoManager.hxx>
#include <docsh.hxx>
#include <docary.hxx>
#include <doctxm.hxx> // beim Move: Verzeichnisse korrigieren
@@ -64,7 +65,12 @@
#include <swtable.hxx>
#include <swundo.hxx> // fuer die UndoIds
#include <txtfrm.hxx>
-#include <undobj.hxx>
+#include <hints.hxx>
+#include <UndoSplitMove.hxx>
+#include <UndoRedline.hxx>
+#include <UndoOverwrite.hxx>
+#include <UndoInsert.hxx>
+#include <UndoDelete.hxx>
#include <breakit.hxx>
#include <hhcwrp.hxx>
#include <vcl/msgbox.hxx>
@@ -453,8 +459,8 @@ bool lcl_SaveFtn( const SwNodeIndex& rSttNd, const SwNodeIndex& rEndNd,
if( pHints && pHints->HasFtn() ) //...with footnotes
{
bUpdateFtn = sal_True; // Heureka
- USHORT nCount = pHints->Count();
- for( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = pHints->Count();
+ for( sal_uInt16 i = 0; i < nCount; ++i )
{
SwTxtAttr *pAttr = pHints->GetTextHint( i );
if ( pAttr->Which() == RES_TXTATR_FTN )
@@ -752,8 +758,10 @@ bool SwDoc::Overwrite( const SwPaM &rRg, const String &rStr )
if(!pNode)
return sal_False;
- if( DoesUndo() )
- ClearRedo();
+ if (GetIDocumentUndoRedo().DoesUndo())
+ {
+ GetIDocumentUndoRedo().ClearRedo(); // AppendUndo not always called
+ }
sal_uInt16 nOldAttrCnt = pNode->GetpSwpHints()
? pNode->GetpSwpHints()->Count() : 0;
@@ -761,13 +769,11 @@ bool SwDoc::Overwrite( const SwPaM &rRg, const String &rStr )
SwIndex& rIdx = rPt.nContent;
xub_StrLen nStart = 0;
- sal_uInt16 nUndoSize = pUndos->Count();
- SwUndo * pUndo;
sal_Unicode c;
String aStr;
- BOOL bOldExpFlg = pNode->IsIgnoreDontExpand();
- pNode->SetIgnoreDontExpand( TRUE );
+ sal_Bool bOldExpFlg = pNode->IsIgnoreDontExpand();
+ pNode->SetIgnoreDontExpand( sal_True );
for( xub_StrLen nCnt = 0; nCnt < rStr.Len(); ++nCnt )
{
@@ -778,16 +784,24 @@ bool SwDoc::Overwrite( const SwPaM &rRg, const String &rStr )
lcl_SkipAttr( pNode, rIdx, nStart );
}
c = rStr.GetChar( nCnt );
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- if( DoesGroupUndo() && nUndoSize &&
- UNDO_OVERWRITE == ( pUndo = (*pUndos)[ nUndoSize-1 ])->GetId() &&
- ((SwUndoOverwrite*)pUndo)->CanGrouping( this, rPt, c ))
- ;// wenn CanGrouping() sal_True returnt, ist schon alles erledigt
- else
+ bool bMerged(false);
+ if (GetIDocumentUndoRedo().DoesGroupUndo())
+ {
+ SwUndo *const pUndo = GetUndoManager().GetLastUndo();
+ SwUndoOverwrite *const pUndoOW(
+ dynamic_cast<SwUndoOverwrite *>(pUndo) );
+ if (pUndoOW)
+ {
+ // if CanGrouping() returns true it's already merged
+ bMerged = pUndoOW->CanGrouping( this, rPt, c );
+ }
+ }
+ if (!bMerged)
{
- AppendUndo( new SwUndoOverwrite( this, rPt, c ));
- nUndoSize = pUndos->Count();
+ SwUndo *const pUndoOW( new SwUndoOverwrite(this, rPt, c) );
+ GetIDocumentUndoRedo().AppendUndo(pUndoOW);
}
}
else
@@ -820,7 +834,8 @@ bool SwDoc::Overwrite( const SwPaM &rRg, const String &rStr )
}
}
- if( !DoesUndo() && !IsIgnoreRedline() && GetRedlineTbl().Count() )
+ if (!GetIDocumentUndoRedo().DoesUndo() &&
+ !IsIgnoreRedline() && GetRedlineTbl().Count())
{
SwPaM aPam( rPt.nNode, nStart, rPt.nNode, rPt.nContent.GetIndex() );
DeleteRedline( aPam, true, USHRT_MAX );
@@ -887,15 +902,13 @@ bool SwDoc::MoveRange( SwPaM& rPaM, SwPosition& rPos, SwMoveFlags eMvFlags )
// in a particular order, and presence of bookmarks
// will change this order. Hence, we delete bookmarks
// here without undo.
- BOOL bDoesUndo = DoesUndo();
- DoUndo( FALSE );
+ ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
_DelBookmarks(
pStt->nNode,
pEnd->nNode,
NULL,
&pStt->nContent,
&pEnd->nContent);
- DoUndo( bDoesUndo );
}
@@ -904,9 +917,9 @@ bool SwDoc::MoveRange( SwPaM& rPaM, SwPosition& rPos, SwMoveFlags eMvFlags )
// falls Undo eingeschaltet, erzeuge das UndoMove-Objekt
SwUndoMove * pUndoMove = 0;
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
+ GetIDocumentUndoRedo().ClearRedo();
pUndoMove = new SwUndoMove( rPaM, rPos );
pUndoMove->SetMoveRedlines( eMvFlags == DOC_MOVEREDLINES );
}
@@ -1003,7 +1016,7 @@ bool SwDoc::MoveRange( SwPaM& rPaM, SwPosition& rPos, SwMoveFlags eMvFlags )
rPaM.SetMark(); // um den neuen Bereich eine Sel. aufspannen
pTNd = aSavePam.GetNode()->GetTxtNode();
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
// korrigiere erstmal den Content vom SavePam
if( bNullCntnt )
@@ -1046,7 +1059,7 @@ bool SwDoc::MoveRange( SwPaM& rPaM, SwPosition& rPos, SwMoveFlags eMvFlags )
// zwischen SPoint und GetMark steht jetzt der neu eingefuegte Bereich
pUndoMove->SetDestRange( aSavePam, *rPaM.GetPoint(),
bJoin, bCorrSavePam );
- AppendUndo( pUndoMove );
+ GetIDocumentUndoRedo().AppendUndo( pUndoMove );
}
else
{
@@ -1127,11 +1140,15 @@ bool SwDoc::MoveNodeRange( SwNodeRange& rRange, SwNodeIndex& rPos,
SwFtnIdxs aTmpFntIdx;
SwUndoMove* pUndo = 0;
- if( (DOC_CREATEUNDOOBJ & eMvFlags ) && DoesUndo() )
+ if ((DOC_CREATEUNDOOBJ & eMvFlags ) && GetIDocumentUndoRedo().DoesUndo())
+ {
pUndo = new SwUndoMove( this, rRange, rPos );
+ }
else
+ {
bUpdateFtn = lcl_SaveFtn( rRange.aStart, rRange.aEnd, rPos,
GetFtnIdxs(), aTmpFntIdx );
+ }
_SaveRedlines aSaveRedl( 0, 4 );
SvPtrarr aSavRedlInsPosArr( 0, 4 );
@@ -1177,7 +1194,7 @@ bool SwDoc::MoveNodeRange( SwNodeRange& rRange, SwNodeIndex& rPos,
pSaveInsPos = new SwNodeIndex( rRange.aStart, -1 );
// verschiebe die Nodes
- BOOL bNoDelFrms = 0 != (DOC_NO_DELFRMS & eMvFlags);
+ sal_Bool bNoDelFrms = 0 != (DOC_NO_DELFRMS & eMvFlags);
if( GetNodes()._MoveNodes( rRange, GetNodes(), rPos, !bNoDelFrms ) )
{
aIdx++; // wieder auf alte Position
@@ -1221,9 +1238,8 @@ bool SwDoc::MoveNodeRange( SwNodeRange& rRange, SwNodeIndex& rPos,
if( pUndo )
{
- ClearRedo();
pUndo->SetDestRange( aIdx, rPos, *pSaveInsPos );
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
if( pSaveInsPos )
@@ -1245,7 +1261,7 @@ bool SwDoc::MoveNodeRange( SwNodeRange& rRange, SwNodeIndex& rPos,
}
// Convert list of ranges of whichIds to a corresponding list of whichIds
-SvUShorts * lcl_RangesToUShorts(USHORT * pRanges)
+SvUShorts * lcl_RangesToUShorts(sal_uInt16 * pRanges)
{
SvUShorts * pResult = new SvUShorts();
@@ -1254,7 +1270,7 @@ SvUShorts * lcl_RangesToUShorts(USHORT * pRanges)
{
OSL_ENSURE(pRanges[i+1] != 0, "malformed ranges");
- for (USHORT j = pRanges[i]; j < pRanges[i+1]; j++)
+ for (sal_uInt16 j = pRanges[i]; j < pRanges[i+1]; j++)
pResult->Insert(j, pResult->Count());
i += 2;
@@ -1333,8 +1349,7 @@ void lcl_JoinText( SwPaM& rPam, sal_Bool bJoinPrev )
// falls PageBreaks geloescht / gesetzt werden, darf das
// nicht in die Undo-History aufgenommen werden !!
// (das loeschen vom Node geht auch am Undo vorbei !!!)
- sal_Bool bDoUndo = pDoc->DoesUndo();
- pDoc->DoUndo( sal_False );
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
/* PageBreaks, PageDesc, ColumnBreaks */
// Sollte an der Logik zum Kopieren der PageBreak's ...
@@ -1386,8 +1401,6 @@ void lcl_JoinText( SwPaM& rPam, sal_Bool bJoinPrev )
if( aBkmkArr.Count() )
::_RestoreCntntIdx( pDoc, aBkmkArr, aIdx.GetIndex() );
- pDoc->DoUndo( bDoUndo );
-
// falls der uebergebene PaM nicht im Crsr-Ring steht,
// gesondert behandeln (z.B. Aufruf aus dem Auto-Format)
if( pOldTxtNd == rPam.GetBound( sal_True ).nContent.GetIdxReg() )
@@ -1524,21 +1537,19 @@ bool SwDoc::DeleteAndJoinWithRedlineImpl( SwPaM & rPam, const bool )
OSL_ENSURE( IsRedlineOn(), "DeleteAndJoinWithRedline: redline off" );
{
- sal_uInt16 nUndoSize = 0;
SwUndoRedlineDelete* pUndo = 0;
RedlineMode_t eOld = GetRedlineMode();
checkRedlining(eOld);
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
//JP 06.01.98: MUSS noch optimiert werden!!!
SetRedlineMode(
(RedlineMode_t)(nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE ));
- nUndoSize = pUndos->Count();
- StartUndo(UNDO_EMPTY, NULL);
- AppendUndo( pUndo = new SwUndoRedlineDelete( rPam, UNDO_DELETE ));
+ GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
+ pUndo = new SwUndoRedlineDelete( rPam, UNDO_DELETE );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
if( *rPam.GetPoint() != *rPam.GetMark() )
AppendRedline( new SwRedline( nsRedlineType_t::REDLINE_DELETE, rPam ), true);
@@ -1546,18 +1557,29 @@ bool SwDoc::DeleteAndJoinWithRedlineImpl( SwPaM & rPam, const bool )
if( pUndo )
{
- EndUndo(UNDO_EMPTY, NULL);
- SwUndo* pPrevUndo;
- if( nUndoSize && DoesGroupUndo() &&
- nUndoSize + 1 == pUndos->Count() &&
- UNDO_REDLINE == ( pPrevUndo = (*pUndos)[ nUndoSize-1 ])->GetId() &&
- UNDO_DELETE == ((SwUndoRedline*)pPrevUndo)->GetUserId() &&
- ((SwUndoRedlineDelete*)pPrevUndo)->CanGrouping( *pUndo ))
+ GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
+ // ??? why the hell is the AppendUndo not below the
+ // CanGrouping, so this hideous cleanup wouldn't be necessary?
+ // bah, this is redlining, probably changing this would break it...
+ if (GetIDocumentUndoRedo().DoesGroupUndo())
{
- DoUndo( sal_False );
- pUndos->DeleteAndDestroy( nUndoSize, 1 );
- --nUndoPos, --nUndoCnt;
- DoUndo( sal_True );
+ SwUndo *const pLastUndo( GetUndoManager().GetLastUndo() );
+ SwUndoRedlineDelete *const pUndoRedlineDel(
+ dynamic_cast<SwUndoRedlineDelete*>(pLastUndo) );
+ if (pUndoRedlineDel)
+ {
+ bool const bMerged = pUndoRedlineDel->CanGrouping(*pUndo);
+ if (bMerged)
+ {
+ ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
+ SwUndo const*const pDeleted =
+ GetUndoManager().RemoveLastUndo();
+ OSL_ENSURE(pDeleted == pUndo,
+ "DeleteAndJoinWithRedlineImpl: "
+ "undo removed is not undo inserted?");
+ delete pDeleted;
+ }
+ }
}
//JP 06.01.98: MUSS noch optimiert werden!!!
SetRedlineMode( eOld );
@@ -1654,17 +1676,25 @@ bool SwDoc::DeleteRangeImplImpl(SwPaM & rPam)
}
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- sal_uInt16 nUndoSize = pUndos->Count();
- SwUndo * pUndo;
- if( DoesGroupUndo() && nUndoSize-- &&
- UNDO_DELETE == ( pUndo = (*pUndos)[ nUndoSize ])->GetId() &&
- ((SwUndoDelete*)pUndo)->CanGrouping( this, rPam ))
- ;// wenn CanGrouping() sal_True returnt, ist schon alles erledigt
- else
- AppendUndo( new SwUndoDelete( rPam ) );
+ GetIDocumentUndoRedo().ClearRedo();
+ bool bMerged(false);
+ if (GetIDocumentUndoRedo().DoesGroupUndo())
+ {
+ SwUndo *const pLastUndo( GetUndoManager().GetLastUndo() );
+ SwUndoDelete *const pUndoDelete(
+ dynamic_cast<SwUndoDelete *>(pLastUndo) );
+ if (pUndoDelete)
+ {
+ bMerged = pUndoDelete->CanGrouping( this, rPam );
+ // if CanGrouping() returns true it's already merged
+ }
+ }
+ if (!bMerged)
+ {
+ GetIDocumentUndoRedo().AppendUndo( new SwUndoDelete( rPam ) );
+ }
SetModified();
@@ -1808,7 +1838,7 @@ void lcl_syncGrammarError( SwTxtNode &rTxtNode, linguistic2::ProofreadingResult&
return;
SwGrammarMarkUp* pWrong = rTxtNode.GetGrammarCheck();
linguistic2::SingleProofreadingError* pArray = rResult.aErrors.getArray();
- USHORT i, j = 0;
+ sal_uInt16 i, j = 0;
if( pWrong )
{
for( i = 0; i < rResult.aErrors.getLength(); ++i )
@@ -1848,8 +1878,8 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
pEndPos->nNode.GetNode().GetTxtNode(), pEndPos->nContent,
bGrammarCheck );
- ULONG nCurrNd = pSttPos->nNode.GetIndex();
- ULONG nEndNd = pEndPos->nNode.GetIndex();
+ sal_uLong nCurrNd = pSttPos->nNode.GetIndex();
+ sal_uLong nEndNd = pEndPos->nNode.GetIndex();
uno::Any aRet;
if( nCurrNd <= nEndNd )
@@ -2180,7 +2210,7 @@ bool SwDoc::ReplaceRange( SwPaM& rPam, const String& rStr,
::std::vector<xub_StrLen> Breaks;
SwPaM aPam( *rPam.GetMark(), *rPam.GetPoint() );
- aPam.Normalize(FALSE);
+ aPam.Normalize(sal_False);
if (aPam.GetPoint()->nNode != aPam.GetMark()->nNode)
{
aPam.Move(fnMoveBackward);
@@ -2283,9 +2313,9 @@ bool SwDoc::ReplaceRangeImpl( SwPaM& rPam, const String& rStr,
{
RedlineMode_t eOld = GetRedlineMode();
checkRedlining(eOld);
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- StartUndo(UNDO_EMPTY, NULL);
+ GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
// Bug 68584 - if any Redline will change (split!) the node
const ::sw::mark::IMark* pBkmk = getIDocumentMarkAccess()->makeMark( aDelPam, ::rtl::OUString(), IDocumentMarkAccess::UNO_BOOKMARK );
@@ -2365,15 +2395,19 @@ bool SwDoc::ReplaceRangeImpl( SwPaM& rPam, const String& rStr,
InsertItemSet( aTmpRange, aSet, 0 );
}
- if( DoesUndo() )
- AppendUndo( new SwUndoRedlineDelete( aDelPam, UNDO_REPLACE ));
+ if (GetIDocumentUndoRedo().DoesUndo())
+ {
+ SwUndo *const pUndoRD =
+ new SwUndoRedlineDelete( aDelPam, UNDO_REPLACE );
+ GetIDocumentUndoRedo().AppendUndo(pUndoRD);
+ }
AppendRedline( new SwRedline( nsRedlineType_t::REDLINE_DELETE, aDelPam ), true);
*rPam.GetMark() = *aDelPam.GetMark();
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
*aDelPam.GetPoint() = *rPam.GetPoint();
- EndUndo(UNDO_EMPTY, NULL);
+ GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
// Bug 68584 - if any Redline will change (split!) the node
const ::sw::mark::IMark* pBkmk = getIDocumentMarkAccess()->makeMark( aDelPam, ::rtl::OUString(), IDocumentMarkAccess::UNO_BOOKMARK );
@@ -2400,21 +2434,13 @@ SetRedlineMode( eOld );
DeleteRedline( aDelPam, true, USHRT_MAX );
SwUndoReplace* pUndoRpl = 0;
- if( DoesUndo() )
+ bool const bDoesUndo = GetIDocumentUndoRedo().DoesUndo();
+ if (bDoesUndo)
{
- ClearRedo();
- SwUndo* pU;
-
- if( !pUndos->Count() ||
- UNDO_REPLACE != ( pU = (*pUndos)[ pUndos->Count()-1 ])->GetId() ||
- ( pUndoRpl = (SwUndoReplace*)pU )->IsFull() )
- {
- pUndoRpl = new SwUndoReplace();
- AppendUndo( pUndoRpl );
- }
- pUndoRpl->AddEntry( aDelPam, sRepl, bRegExReplace );
- DoUndo( sal_False );
+ pUndoRpl = new SwUndoReplace(aDelPam, sRepl, bRegExReplace);
+ GetIDocumentUndoRedo().AppendUndo(pUndoRpl);
}
+ ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
if( aDelPam.GetPoint() != pStt )
aDelPam.Exchange();
@@ -2467,8 +2493,7 @@ SetRedlineMode( eOld );
if( pUndoRpl )
{
- pUndoRpl->SetEntryEnd( rPam );
- DoUndo( sal_True );
+ pUndoRpl->SetEnd(rPam);
}
}
}
@@ -2499,16 +2524,18 @@ bool SwDoc::DelFullPara( SwPaM& rPam )
if ( nSectDiff-2 <= nNodeDiff || IsRedlineOn() ||
/* #i9185# Prevent getting the node after the end node (see below) */
- rEnd.nNode.GetIndex() + 1 == aNodes.Count() )
+ rEnd.nNode.GetIndex() + 1 == GetNodes().Count() )
+ {
return sal_False;
+ }
// harte SeitenUmbrueche am nachfolgenden Node verschieben
sal_Bool bSavePageBreak = sal_False, bSavePageDesc = sal_False;
/* #i9185# This whould lead to a segmentation fault if not catched
above. */
- ULONG nNextNd = rEnd.nNode.GetIndex() + 1;
- SwTableNode* pTblNd = aNodes[ nNextNd ]->GetTableNode();
+ sal_uLong nNextNd = rEnd.nNode.GetIndex() + 1;
+ SwTableNode *const pTblNd = GetNodes()[ nNextNd ]->GetTableNode();
if( pTblNd && pNd->IsCntntNode() )
{
@@ -2533,7 +2560,7 @@ bool SwDoc::DelFullPara( SwPaM& rPam )
}
}
- sal_Bool bDoesUndo = DoesUndo();
+ bool const bDoesUndo = GetIDocumentUndoRedo().DoesUndo();
if( bDoesUndo )
{
if( !rPam.HasMark() )
@@ -2548,7 +2575,7 @@ bool SwDoc::DelFullPara( SwPaM& rPam )
pTmpNode = rPam.GetMark()->nNode.GetNode().GetCntntNode();
rPam.GetMark()->nContent.Assign( pTmpNode, 0 );
- ClearRedo();
+ GetIDocumentUndoRedo().ClearRedo();
SwPaM aDelPam( *rPam.GetMark(), *rPam.GetPoint() );
{
@@ -2565,7 +2592,7 @@ bool SwDoc::DelFullPara( SwPaM& rPam )
*rPam.GetPoint() = *aDelPam.GetPoint();
pUndo->SetPgBrkFlags( bSavePageBreak, bSavePageDesc );
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
else
{
@@ -2606,10 +2633,10 @@ bool SwDoc::DelFullPara( SwPaM& rPam )
}
}
- SwCntntNode *pTmpNode = rPam.GetBound( TRUE ).nNode.GetNode().GetCntntNode();
- rPam.GetBound( TRUE ).nContent.Assign( pTmpNode, 0 );
- pTmpNode = rPam.GetBound( FALSE ).nNode.GetNode().GetCntntNode();
- rPam.GetBound( FALSE ).nContent.Assign( pTmpNode, 0 );
+ SwCntntNode *pTmpNode = rPam.GetBound( sal_True ).nNode.GetNode().GetCntntNode();
+ rPam.GetBound( sal_True ).nContent.Assign( pTmpNode, 0 );
+ pTmpNode = rPam.GetBound( sal_False ).nNode.GetNode().GetCntntNode();
+ rPam.GetBound( sal_False ).nContent.Assign( pTmpNode, 0 );
GetNodes().Delete( aRg.aStart, nNodeDiff+1 );
}
rPam.DeleteMark();
@@ -2622,15 +2649,13 @@ void SwDoc::TransliterateText(
const SwPaM& rPaM,
utl::TransliterationWrapper& rTrans )
{
- SwUndoTransliterate* pUndo;
- if( DoesUndo() )
- pUndo = new SwUndoTransliterate( rPaM, rTrans );
- else
- pUndo = 0;
+ SwUndoTransliterate *const pUndo = (GetIDocumentUndoRedo().DoesUndo())
+ ? new SwUndoTransliterate( rPaM, rTrans )
+ : 0;
const SwPosition* pStt = rPaM.Start(),
* pEnd = rPaM.End();
- ULONG nSttNd = pStt->nNode.GetIndex(),
+ sal_uLong nSttNd = pStt->nNode.GetIndex(),
nEndNd = pEnd->nNode.GetIndex();
xub_StrLen nSttCnt = pStt->nContent.GetIndex(),
nEndCnt = pEnd->nContent.GetIndex();
@@ -2646,7 +2671,7 @@ void SwDoc::TransliterateText(
pTNd->GetTxt(), nSttCnt,
pBreakIt->GetLocale( pTNd->GetLang( nSttCnt ) ),
WordType::ANY_WORD /*ANYWORD_IGNOREWHITESPACES*/,
- TRUE );
+ sal_True );
if( aBndry.startPos < nSttCnt && nSttCnt < aBndry.endPos )
{
@@ -2684,8 +2709,7 @@ void SwDoc::TransliterateText(
{
if( pUndo->HasData() )
{
- ClearRedo();
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
else
delete pUndo;
@@ -2704,7 +2728,7 @@ void SwDoc::checkRedlining(RedlineMode_t& _rReadlineMode)
&& !((_rReadlineMode & nsRedlineMode_t::REDLINE_SHOW_DELETE) == nsRedlineMode_t::REDLINE_SHOW_DELETE) )
{
WarningBox aWarning( pParent,SW_RES(MSG_DISABLE_READLINE_QUESTION));
- USHORT nResult = aWarning.Execute();
+ sal_uInt16 nResult = aWarning.Execute();
mbReadlineChecked = sal_True;
if ( nResult == RET_YES )
{
@@ -2722,8 +2746,8 @@ void SwDoc::CountWords( const SwPaM& rPaM, SwDocStat& rStat ) const
const SwPosition* pEnd = pStt == rPaM.GetPoint() ? rPaM.GetMark()
: rPaM.GetPoint();
- const ULONG nSttNd = pStt->nNode.GetIndex();
- const ULONG nEndNd = pEnd->nNode.GetIndex();
+ const sal_uLong nSttNd = pStt->nNode.GetIndex();
+ const sal_uLong nEndNd = pEnd->nNode.GetIndex();
const xub_StrLen nSttCnt = pStt->nContent.GetIndex();
const xub_StrLen nEndCnt = pEnd->nContent.GetIndex();
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 6447aa4645ba..8b246e37b254 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -43,6 +43,7 @@
#include <unotools/charclass.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <cntfrm.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
@@ -75,8 +76,8 @@
using namespace ::com::sun::star::uno;
-extern BOOL IsFrameBehind( const SwTxtNode& rMyNd, USHORT nMySttPos,
- const SwTxtNode& rBehindNd, USHORT nSttPos );
+extern sal_Bool IsFrameBehind( const SwTxtNode& rMyNd, sal_uInt16 nMySttPos,
+ const SwTxtNode& rBehindNd, sal_uInt16 nSttPos );
SV_IMPL_OP_PTRARR_SORT( _SetGetExpFlds, _SetGetExpFldPtr )
@@ -90,10 +91,10 @@ SV_IMPL_OP_PTRARR_SORT( _SetGetExpFlds, _SetGetExpFldPtr )
*/
SwFieldType* SwDoc::InsertFldType(const SwFieldType &rFldTyp)
{
- USHORT nSize = pFldTypes->Count(),
+ sal_uInt16 nSize = pFldTypes->Count(),
nFldWhich = rFldTyp.Which();
- USHORT i = INIT_FLDTYPES;
+ sal_uInt16 i = INIT_FLDTYPES;
switch( nFldWhich )
{
@@ -170,8 +171,8 @@ void SwDoc::InsDeletedFldType( SwFieldType& rFldTyp )
// - Wird genau der gleiche Typ gefunden, dann muss der geloeschte
// einen anderen Namen erhalten.
- USHORT nSize = pFldTypes->Count(), nFldWhich = rFldTyp.Which();
- USHORT i = INIT_FLDTYPES;
+ sal_uInt16 nSize = pFldTypes->Count(), nFldWhich = rFldTyp.Which();
+ sal_uInt16 i = INIT_FLDTYPES;
OSL_ENSURE( RES_SETEXPFLD == nFldWhich ||
RES_USERFLD == nFldWhich ||
@@ -186,7 +187,7 @@ void SwDoc::InsDeletedFldType( SwFieldType& rFldTyp )
rSCmp.isEqual( rFldNm, pFnd->GetName() ) )
{
// neuen Namen suchen
- USHORT nNum = 1;
+ sal_uInt16 nNum = 1;
do {
String sSrch( rFldNm );
sSrch.Append( String::CreateFromInt32( nNum ));
@@ -201,7 +202,7 @@ void SwDoc::InsDeletedFldType( SwFieldType& rFldTyp )
break; // raus aus der While-Schleife
}
++nNum;
- } while( TRUE );
+ } while( sal_True );
break;
}
@@ -210,13 +211,13 @@ void SwDoc::InsDeletedFldType( SwFieldType& rFldTyp )
switch( nFldWhich )
{
case RES_SETEXPFLD:
- ((SwSetExpFieldType&)rFldTyp).SetDeleted( FALSE );
+ ((SwSetExpFieldType&)rFldTyp).SetDeleted( sal_False );
break;
case RES_USERFLD:
- ((SwUserFieldType&)rFldTyp).SetDeleted( FALSE );
+ ((SwUserFieldType&)rFldTyp).SetDeleted( sal_False );
break;
case RES_DDEFLD:
- ((SwDDEFieldType&)rFldTyp).SetDeleted( FALSE );
+ ((SwDDEFieldType&)rFldTyp).SetDeleted( sal_False );
break;
}
}
@@ -224,19 +225,19 @@ void SwDoc::InsDeletedFldType( SwFieldType& rFldTyp )
/*--------------------------------------------------------------------
Beschreibung: Feldtypen loeschen
--------------------------------------------------------------------*/
-void SwDoc::RemoveFldType(USHORT nFld)
+void SwDoc::RemoveFldType(sal_uInt16 nFld)
{
OSL_ENSURE( INIT_FLDTYPES <= nFld, "keine InitFields loeschen" );
/*
* Abheangige Felder vorhanden -> ErrRaise
*/
- USHORT nSize = pFldTypes->Count();
+ sal_uInt16 nSize = pFldTypes->Count();
if(nFld < nSize)
{
SwFieldType* pTmp = (*pFldTypes)[nFld];
// JP 29.07.96: opt. FeldListe fuer den Calculator vorbereiten:
- USHORT nWhich = pTmp->Which();
+ sal_uInt16 nWhich = pTmp->Which();
switch( nWhich )
{
case RES_SETEXPFLD:
@@ -247,11 +248,11 @@ void SwDoc::RemoveFldType(USHORT nFld)
if( pTmp->GetDepends() && !IsUsed( *pTmp ) )
{
if( RES_SETEXPFLD == nWhich )
- ((SwSetExpFieldType*)pTmp)->SetDeleted( TRUE );
+ ((SwSetExpFieldType*)pTmp)->SetDeleted( sal_True );
else if( RES_USERFLD == nWhich )
- ((SwUserFieldType*)pTmp)->SetDeleted( TRUE );
+ ((SwUserFieldType*)pTmp)->SetDeleted( sal_True );
else
- ((SwDDEFieldType*)pTmp)->SetDeleted( TRUE );
+ ((SwDDEFieldType*)pTmp)->SetDeleted( sal_True );
nWhich = 0;
}
break;
@@ -276,13 +277,13 @@ const SwFldTypes* SwDoc::GetFldTypes() const
/*--------------------------------------------------------------------
Beschreibung: Den ersten Typen mit ResId und Namen finden
--------------------------------------------------------------------*/
-SwFieldType* SwDoc::GetFldType( USHORT nResId, const String& rName,
+SwFieldType* SwDoc::GetFldType( sal_uInt16 nResId, const String& rName,
bool bDbFieldMatching // used in some UNO calls for RES_DBFLD
// to use different string matching code
// #i51815#
) const
{
- USHORT nSize = pFldTypes->Count(), i = 0;
+ sal_uInt16 nSize = pFldTypes->Count(), i = 0;
const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore();
switch( nResId )
@@ -335,7 +336,7 @@ void SwDoc::UpdateFlds( SfxPoolItem *pNewHt, bool bCloseDB )
// Modify() fuer jeden Feldtypen rufen,
// abhaengige SwTxtFld werden benachrichtigt ...
- for( USHORT i=0; i < pFldTypes->Count(); ++i)
+ for( sal_uInt16 i=0; i < pFldTypes->Count(); ++i)
{
switch( (*pFldTypes)[i]->Which() )
{
@@ -372,7 +373,7 @@ void SwDoc::UpdateFlds( SfxPoolItem *pNewHt, bool bCloseDB )
}
if( !IsExpFldsLocked() )
- UpdateExpFlds( 0, FALSE ); // Expression-Felder Updaten
+ UpdateExpFlds( 0, sal_False ); // Expression-Felder Updaten
// Tabellen
UpdateTblFlds(pNewHt);
@@ -394,7 +395,7 @@ void SwDoc::UpdateUsrFlds()
{
SwCalc* pCalc = 0;
const SwFieldType* pFldType;
- for( USHORT i = INIT_FLDTYPES; i < pFldTypes->Count(); ++i )
+ for( sal_uInt16 i = INIT_FLDTYPES; i < pFldTypes->Count(); ++i )
if( RES_USERFLD == ( pFldType = (*pFldTypes)[i] )->Which() )
{
if( !pCalc )
@@ -415,7 +416,7 @@ void SwDoc::UpdateUsrFlds()
void SwDoc::UpdateRefFlds( SfxPoolItem* pHt )
{
SwFieldType* pFldType;
- for( USHORT i = 0; i < pFldTypes->Count(); ++i )
+ for( sal_uInt16 i = 0; i < pFldTypes->Count(); ++i )
if( RES_GETREFFLD == ( pFldType = (*pFldTypes)[i] )->Which() )
pFldType->Modify( 0, pHt );
}
@@ -426,9 +427,8 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
"Was ist das fuer ein MessageItem?" );
SwFieldType* pFldType(0);
- USHORT i;
- for( i = 0; i < pFldTypes->Count(); ++i )
+ for (sal_uInt16 i = 0; i < pFldTypes->Count(); ++i)
{
if( RES_TABLEFLD == ( pFldType = (*pFldTypes)[i] )->Which() )
{
@@ -461,7 +461,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
if( nsSwExtendedSubType::SUB_CMD & pFld->GetSubType() )
pFld->PtrToBoxNm( pUpdtFld->pTbl );
else
- pFld->ChgValid( FALSE );
+ pFld->ChgValid( sal_False );
break;
case TBL_BOXNAME:
// ist es die gesuchte Tabelle ??
@@ -487,7 +487,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
}
else
// setze bei allen das Value-Flag zurueck
- pFld->ChgValid( FALSE );
+ pFld->ChgValid( sal_False );
}
break;
@@ -497,13 +497,15 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
// und dann noch alle Tabellen Box Formeln abklappern
const SfxPoolItem* pItem;
- USHORT nMaxItems = GetAttrPool().GetItemCount( RES_BOXATR_FORMULA );
- for( i = 0; i < nMaxItems; ++i )
- if( 0 != (pItem = GetAttrPool().GetItem( RES_BOXATR_FORMULA, i ) ) &&
+ sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_BOXATR_FORMULA );
+ for (sal_uInt32 i = 0; i < nMaxItems; ++i)
+ {
+ if( 0 != (pItem = GetAttrPool().GetItem2( RES_BOXATR_FORMULA, i ) ) &&
((SwTblBoxFormula*)pItem)->GetDefinedIn() )
{
((SwTblBoxFormula*)pItem)->ChangeState( pHt );
}
+ }
// alle Felder/Boxen sind jetzt invalide, also kann das Rechnen anfangen
@@ -598,8 +600,9 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
}
// dann berechene noch die Formeln an den Boxen
- for( i = 0; i < nMaxItems; ++i )
- if( 0 != (pItem = GetAttrPool().GetItem( RES_BOXATR_FORMULA, i ) ) &&
+ for (sal_uInt32 i = 0; i < nMaxItems; ++i )
+ {
+ if( 0 != (pItem = GetAttrPool().GetItem2( RES_BOXATR_FORMULA, i ) ) &&
((SwTblBoxFormula*)pItem)->GetDefinedIn() &&
!((SwTblBoxFormula*)pItem)->IsValid() )
{
@@ -675,6 +678,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
}
}
}
+ }
if( pCalc )
delete pCalc;
@@ -683,7 +687,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
void SwDoc::UpdatePageFlds( SfxPoolItem* pMsgHnt )
{
SwFieldType* pFldType;
- for( USHORT i = 0; i < INIT_FLDTYPES; ++i )
+ for( sal_uInt16 i = 0; i < INIT_FLDTYPES; ++i )
switch( ( pFldType = (*pFldTypes)[ i ] )->Which() )
{
case RES_PAGENUMBERFLD:
@@ -702,7 +706,7 @@ void SwDoc::UpdatePageFlds( SfxPoolItem* pMsgHnt )
// ---- Loesche alle nicht referenzierten FeldTypen eines Dokumentes --
void SwDoc::GCFieldTypes()
{
- for( USHORT n = pFldTypes->Count(); n > INIT_FLDTYPES; )
+ for( sal_uInt16 n = pFldTypes->Count(); n > INIT_FLDTYPES; )
if( !(*pFldTypes)[ --n ]->GetDepends() )
RemoveFldType( n );
}
@@ -891,19 +895,19 @@ void _SetGetExpFld::SetBodyPos( const SwCntntFrm& rFrm )
}
}
-BOOL _SetGetExpFld::operator<( const _SetGetExpFld& rFld ) const
+sal_Bool _SetGetExpFld::operator<( const _SetGetExpFld& rFld ) const
{
if( nNode < rFld.nNode || ( nNode == rFld.nNode && nCntnt < rFld.nCntnt ))
- return TRUE;
+ return sal_True;
else if( nNode != rFld.nNode || nCntnt != rFld.nCntnt )
- return FALSE;
+ return sal_False;
const SwNode *pFirst = GetNodeFromCntnt(),
*pNext = rFld.GetNodeFromCntnt();
// Position gleich: nur weiter wenn beide FeldPointer besetzt sind !!
if( !pFirst || !pNext )
- return FALSE;
+ return sal_False;
// gleiche Section ??
if( pFirst->StartOfSectionNode() != pNext->StartOfSectionNode() )
@@ -987,7 +991,7 @@ const SwNode* _SetGetExpFld::GetNodeFromCntnt() const
xub_StrLen _SetGetExpFld::GetCntPosFromCntnt() const
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if( CNTNT.pTxtFld )
switch( eSetGetExpFldType )
{
@@ -1014,8 +1018,8 @@ _HashStr::_HashStr( const String& rName, const String& rText,
// suche nach dem Namen, ist er vorhanden, returne seinen String, sonst
// einen LeerString
-void LookString( SwHash** ppTbl, USHORT nSize, const String& rName,
- String& rRet, USHORT* pPos )
+void LookString( SwHash** ppTbl, sal_uInt16 nSize, const String& rName,
+ String& rRet, sal_uInt16* pPos )
{
rRet = rName;
rRet.EraseLeadingChars().EraseTrailingChars();
@@ -1052,7 +1056,7 @@ void lcl_CalcFld( SwDoc& rDoc, SwCalc& rCalc, const _SetGetExpFld& rSGEFld,
return ;
const SwField* pFld = pTxtFld->GetFld().GetFld();
- const USHORT nFldWhich = pFld->GetTyp()->Which();
+ const sal_uInt16 nFldWhich = pFld->GetTyp()->Which();
if( RES_SETEXPFLD == nFldWhich )
{
@@ -1105,38 +1109,38 @@ void SwDoc::FldsToCalc( SwCalc& rCalc, const _SetGetExpFld& rToThisFld )
{
// erzeuge die Sortierteliste aller SetFelder
pUpdtFlds->MakeFldList( *this, mbNewFldLst, GETFLD_CALC );
- mbNewFldLst = FALSE;
+ mbNewFldLst = sal_False;
SwNewDBMgr* pMgr = GetNewDBMgr();
- pMgr->CloseAll(FALSE);
+ pMgr->CloseAll(sal_False);
if( pUpdtFlds->GetSortLst()->Count() )
{
- USHORT nLast;
+ sal_uInt16 nLast;
_SetGetExpFld* pFld = (_SetGetExpFld*)&rToThisFld;
if( pUpdtFlds->GetSortLst()->Seek_Entry( pFld, &nLast ) )
++nLast;
const _SetGetExpFldPtr* ppSortLst = pUpdtFlds->GetSortLst()->GetData();
- for( USHORT n = 0; n < nLast; ++n, ++ppSortLst )
+ for( sal_uInt16 n = 0; n < nLast; ++n, ++ppSortLst )
lcl_CalcFld( *this, rCalc, **ppSortLst, pMgr );
}
- pMgr->CloseAll(FALSE);
+ pMgr->CloseAll(sal_False);
}
-void SwDoc::FldsToCalc( SwCalc& rCalc, ULONG nLastNd, sal_uInt16 nLastCnt )
+void SwDoc::FldsToCalc( SwCalc& rCalc, sal_uLong nLastNd, sal_uInt16 nLastCnt )
{
// erzeuge die Sortierteliste aller SetFelder
pUpdtFlds->MakeFldList( *this, mbNewFldLst, GETFLD_CALC );
- mbNewFldLst = FALSE;
+ mbNewFldLst = sal_False;
SwNewDBMgr* pMgr = GetNewDBMgr();
- pMgr->CloseAll(FALSE);
+ pMgr->CloseAll(sal_False);
const _SetGetExpFldPtr* ppSortLst = pUpdtFlds->GetSortLst()->GetData();
- for( USHORT n = pUpdtFlds->GetSortLst()->Count();
+ for( sal_uInt16 n = pUpdtFlds->GetSortLst()->Count();
n &&
( (*ppSortLst)->GetNode() < nLastNd ||
( (*ppSortLst)->GetNode() == nLastNd && (*ppSortLst)->GetCntnt() <= nLastCnt )
@@ -1144,15 +1148,15 @@ void SwDoc::FldsToCalc( SwCalc& rCalc, ULONG nLastNd, sal_uInt16 nLastCnt )
--n, ++ppSortLst )
lcl_CalcFld( *this, rCalc, **ppSortLst, pMgr );
- pMgr->CloseAll(FALSE);
+ pMgr->CloseAll(sal_False);
}
-void SwDoc::FldsToExpand( SwHash**& ppHashTbl, USHORT& rTblSize,
+void SwDoc::FldsToExpand( SwHash**& ppHashTbl, sal_uInt16& rTblSize,
const _SetGetExpFld& rToThisFld )
{
// erzeuge die Sortierteliste aller SetFelder
pUpdtFlds->MakeFldList( *this, mbNewFldLst, GETFLD_EXPAND );
- mbNewFldLst = FALSE;
+ mbNewFldLst = sal_False;
// HashTabelle fuer alle String Ersetzungen, wird "one the fly" gefuellt
// (versuche eine "ungerade"-Zahl zu erzeugen)
@@ -1160,14 +1164,14 @@ void SwDoc::FldsToExpand( SwHash**& ppHashTbl, USHORT& rTblSize,
ppHashTbl = new SwHash*[ rTblSize ];
memset( ppHashTbl, 0, sizeof( _HashStr* ) * rTblSize );
- USHORT nLast;
+ sal_uInt16 nLast;
{
_SetGetExpFld* pTmp = (_SetGetExpFld*)&rToThisFld;
if( pUpdtFlds->GetSortLst()->Seek_Entry( pTmp, &nLast ) )
++nLast;
}
- USHORT nPos;
+ sal_uInt16 nPos;
SwHash* pFnd;
String aNew;
const _SetGetExpFldPtr* ppSortLst = pUpdtFlds->GetSortLst()->GetData();
@@ -1238,11 +1242,11 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
if( IsExpFldsLocked() || IsInReading() )
return;
- BOOL bOldInUpdateFlds = pUpdtFlds->IsInUpdateFlds();
- pUpdtFlds->SetInUpdateFlds( TRUE );
+ sal_Bool bOldInUpdateFlds = pUpdtFlds->IsInUpdateFlds();
+ pUpdtFlds->SetInUpdateFlds( sal_True );
- pUpdtFlds->MakeFldList( *this, TRUE, GETFLD_ALL );
- mbNewFldLst = FALSE;
+ pUpdtFlds->MakeFldList( *this, sal_True, GETFLD_ALL );
+ mbNewFldLst = sal_False;
if( !pUpdtFlds->GetSortLst()->Count() )
{
@@ -1250,15 +1254,15 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
UpdateRefFlds(NULL);
pUpdtFlds->SetInUpdateFlds( bOldInUpdateFlds );
- pUpdtFlds->SetFieldsDirty( FALSE );
+ pUpdtFlds->SetFieldsDirty( sal_False );
return ;
}
- USHORT nWhich, n;
+ sal_uInt16 nWhich, n;
// HashTabelle fuer alle String Ersetzungen, wird "one the fly" gefuellt
// (versuche eine "ungerade"-Zahl zu erzeugen)
- USHORT nStrFmtCnt = (( pFldTypes->Count() / 7 ) + 1 ) * 7;
+ sal_uInt16 nStrFmtCnt = (( pFldTypes->Count() / 7 ) + 1 ) * 7;
SwHash** pHashStrTbl = new SwHash*[ nStrFmtCnt ];
memset( pHashStrTbl, 0, sizeof( _HashStr* ) * nStrFmtCnt );
@@ -1271,7 +1275,7 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
case RES_USERFLD:
{
// Eintrag vorhanden ?
- USHORT nPos;
+ sal_uInt16 nPos;
const String& rNm = pFldType->GetName();
String sExpand(((SwUserFieldType*)pFldType)->Expand(nsSwGetSetExpType::GSE_STRING, 0, 0));
SwHash* pFnd = Find( rNm, pHashStrTbl, nStrFmtCnt, &nPos );
@@ -1297,7 +1301,7 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
// aktuelle Datensatznummer schon vorher einstellen
SwNewDBMgr* pMgr = GetNewDBMgr();
- pMgr->CloseAll(FALSE);
+ pMgr->CloseAll(sal_False);
String aNew;
const _SetGetExpFldPtr* ppSortLst = pUpdtFlds->GetSortLst()->GetData();
@@ -1378,7 +1382,7 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
// Eintrag in den HashTable eintragen
// Eintrag vorhanden ?
- USHORT nPos;
+ sal_uInt16 nPos;
SwHash* pFnd = Find( rName, pHashStrTbl, nStrFmtCnt, &nPos );
String const value(pFld->ExpandField(IsClipBoard()));
if( pFnd )
@@ -1428,7 +1432,7 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
// suche den Namen vom Feld
aNew = ((SwSetExpFieldType*)pSFld->GetTyp())->GetSetRefName();
// Eintrag vorhanden ?
- USHORT nPos;
+ sal_uInt16 nPos;
SwHash* pFnd = Find( aNew, pHashStrTbl, nStrFmtCnt, &nPos );
if( pFnd )
// Eintrag in der HashTabelle aendern
@@ -1470,7 +1474,7 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
if( pSFld->IsSequenceFld() )
{
- const BYTE nLvl = pSFldTyp->GetOutlineLvl();
+ const sal_uInt8 nLvl = pSFldTyp->GetOutlineLvl();
if( MAXLEVEL > nLvl )
{
// dann teste, ob die Nummer neu aufsetzen muss
@@ -1516,7 +1520,7 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
}
}
- pMgr->CloseAll(FALSE);
+ pMgr->CloseAll(sal_False);
// HashTabelle wieder loeschen
::DeleteHashTable( pHashStrTbl, nStrFmtCnt );
@@ -1525,16 +1529,16 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
UpdateRefFlds(NULL);
pUpdtFlds->SetInUpdateFlds( bOldInUpdateFlds );
- pUpdtFlds->SetFieldsDirty( FALSE );
+ pUpdtFlds->SetFieldsDirty( sal_False );
}
void SwDoc::UpdateDBNumFlds( SwDBNameInfField& rDBFld, SwCalc& rCalc )
{
SwNewDBMgr* pMgr = GetNewDBMgr();
- USHORT nFldType = rDBFld.Which();
+ sal_uInt16 nFldType = rDBFld.Which();
- BOOL bPar1 = rCalc.Calculate( rDBFld.GetPar1() ).GetBool();
+ sal_Bool bPar1 = rCalc.Calculate( rDBFld.GetPar1() ).GetBool();
if( RES_DBNEXTSETFLD == nFldType )
((SwDBNextSetField&)rDBFld).SetCondValid( bPar1 );
@@ -1564,7 +1568,7 @@ void SwDoc::UpdateDBNumFlds( SwDBNameInfField& rDBFld, SwCalc& rCalc )
void SwDoc::_InitFieldTypes() // wird vom CTOR gerufen!!
{
// Feldtypen
- USHORT nFldType = 0;
+ sal_uInt16 nFldType = 0;
pFldTypes->Insert( new SwDateTimeFieldType(this), nFldType++ );
pFldTypes->Insert( new SwChapterFieldType, nFldType++ );
pFldTypes->Insert( new SwPageNumberFieldType, nFldType++ );
@@ -1625,11 +1629,11 @@ const SwDBData& SwDoc::GetDBDesc()
{
if(!aDBData.sDataSource.getLength())
{
- const USHORT nSize = pFldTypes->Count();
- for(USHORT i = 0; i < nSize && !aDBData.sDataSource.getLength(); ++i)
+ const sal_uInt16 nSize = pFldTypes->Count();
+ for(sal_uInt16 i = 0; i < nSize && !aDBData.sDataSource.getLength(); ++i)
{
SwFieldType& rFldType = *((*pFldTypes)[i]);
- USHORT nWhich = rFldType.Which();
+ sal_uInt16 nWhich = rFldType.Which();
if(IsUsed(rFldType))
{
switch(nWhich)
@@ -1666,7 +1670,7 @@ const SwDBData& SwDoc::GetDBDesc()
return aDBData;
}
-void SwDoc::SetInitDBFields( BOOL b )
+void SwDoc::SetInitDBFields( sal_Bool b )
{
GetNewDBMgr()->SetInitDBFields( b );
}
@@ -1687,7 +1691,6 @@ String lcl_DBDataToString(const SwDBData& rData)
void SwDoc::GetAllUsedDB( SvStringsDtor& rDBNameList,
const SvStringsDtor* pAllDBNames )
{
- USHORT n;
SvStringsDtor aUsedDBNames;
SvStringsDtor aAllDBNames;
@@ -1698,7 +1701,7 @@ void SwDoc::GetAllUsedDB( SvStringsDtor& rDBNameList,
}
SwSectionFmts& rArr = GetSections();
- for( n = rArr.Count(); n; )
+ for (sal_uInt16 n = rArr.Count(); n; )
{
SwSection* pSect = rArr[ --n ]->GetSection();
@@ -1712,10 +1715,10 @@ void SwDoc::GetAllUsedDB( SvStringsDtor& rDBNameList,
}
const SfxPoolItem* pItem;
- USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_FIELD );
- for( n = 0; n < nMaxItems; ++n )
+ sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_FIELD );
+ for (sal_uInt32 n = 0; n < nMaxItems; ++n)
{
- if( 0 == (pItem = GetAttrPool().GetItem( RES_TXTATR_FIELD, n ) ))
+ if( 0 == (pItem = GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) ))
continue;
const SwFmtFld* pFmtFld = (SwFmtFld*)pItem;
@@ -1766,7 +1769,7 @@ void SwDoc::GetAllDBNames( SvStringsDtor& rAllDBNames )
SwNewDBMgr* pMgr = GetNewDBMgr();
const SwDSParamArr& rArr = pMgr->GetDSParamArray();
- for(USHORT i = 0; i < rArr.Count(); i++)
+ for(sal_uInt16 i = 0; i < rArr.Count(); i++)
{
SwDSParam* pParam = rArr[i];
String* pStr = new String( pParam->sDataSource );
@@ -1787,7 +1790,7 @@ SvStringsDtor& SwDoc::FindUsedDBs( const SvStringsDtor& rAllDBNames,
#endif
xub_StrLen nPos;
- for (USHORT i = 0; i < rAllDBNames.Count(); ++i )
+ for (sal_uInt16 i = 0; i < rAllDBNames.Count(); ++i )
{
const String* pStr = rAllDBNames.GetObject(i);
@@ -1813,7 +1816,7 @@ SvStringsDtor& SwDoc::FindUsedDBs( const SvStringsDtor& rAllDBNames,
void SwDoc::AddUsedDBToList( SvStringsDtor& rDBNameList,
const SvStringsDtor& rUsedDBNames )
{
- for (USHORT i = 0; i < rUsedDBNames.Count(); i++)
+ for (sal_uInt16 i = 0; i < rUsedDBNames.Count(); i++)
AddUsedDBToList( rDBNameList, *rUsedDBNames.GetObject(i) );
}
@@ -1823,12 +1826,12 @@ void SwDoc::AddUsedDBToList( SvStringsDtor& rDBNameList, const String& rDBName)
return;
#ifdef UNX
- for( USHORT i = 0; i < rDBNameList.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rDBNameList.Count(); ++i )
if( rDBName == rDBNameList.GetObject(i)->GetToken(0) )
return;
#else
const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore();
- for( USHORT i = 0; i < rDBNameList.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rDBNameList.Count(); ++i )
if( rSCmp.isEqual( rDBName, rDBNameList.GetObject(i)->GetToken(0) ) )
return;
#endif
@@ -1851,10 +1854,9 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
aNewDBData.nCommandType = (short)rNewName.GetToken(2, DB_DELIM).ToInt32();
String sFormel;
- USHORT n;
SwSectionFmts& rArr = GetSections();
- for( n = rArr.Count(); n; )
+ for (sal_uInt16 n = rArr.Count(); n; )
{
SwSection* pSect = rArr[ --n ]->GetSection();
@@ -1867,11 +1869,11 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
}
const SfxPoolItem* pItem;
- USHORT nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_FIELD );
+ sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_FIELD );
- for( n = 0; n < nMaxItems; ++n )
+ for (sal_uInt32 n = 0; n < nMaxItems; ++n )
{
- if( 0 == (pItem = GetAttrPool().GetItem( RES_TXTATR_FIELD, n ) ))
+ if( 0 == (pItem = GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) ))
continue;
SwFmtFld* pFmtFld = (SwFmtFld*)pItem;
@@ -1880,7 +1882,7 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
continue;
SwField* pFld = pFmtFld->GetFld();
- BOOL bExpand = FALSE;
+ sal_Bool bExpand = sal_False;
switch( pFld->GetTyp()->Which() )
{
@@ -1898,7 +1900,7 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
((SwDBField*)pFld)->ClearInitialized();
((SwDBField*)pFld)->InitContent();
- bExpand = TRUE;
+ bExpand = sal_True;
}
break;
@@ -1908,7 +1910,7 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
lcl_DBDataToString(((SwDBNameInfField*)pFld)->GetRealDBData())))
{
((SwDBNameInfField*)pFld)->SetDBData(aNewDBData);
- bExpand = TRUE;
+ bExpand = sal_True;
}
break;
@@ -1918,7 +1920,7 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
lcl_DBDataToString(((SwDBNameInfField*)pFld)->GetRealDBData())))
{
((SwDBNameInfField*)pFld)->SetDBData(aNewDBData);
- bExpand = TRUE;
+ bExpand = sal_True;
}
// kein break;
case RES_HIDDENTXTFLD:
@@ -1926,7 +1928,7 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
sFormel = pFld->GetPar1();
ReplaceUsedDBs( rOldNames, rNewName, sFormel);
pFld->SetPar1( sFormel );
- bExpand = TRUE;
+ bExpand = sal_True;
break;
case RES_SETEXPFLD:
@@ -1935,7 +1937,7 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
sFormel = pFld->GetFormula();
ReplaceUsedDBs( rOldNames, rNewName, sFormel);
pFld->SetPar2( sFormel );
- bExpand = TRUE;
+ bExpand = sal_True;
break;
}
@@ -1957,7 +1959,7 @@ void SwDoc::ReplaceUsedDBs( const SvStringsDtor& rUsedDBNames,
String sUpperNewNm( sNewName );
- for( USHORT i = 0; i < rUsedDBNames.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rUsedDBNames.Count(); ++i )
{
String sDBName( *rUsedDBNames.GetObject( i ) );
@@ -1986,26 +1988,26 @@ void SwDoc::ReplaceUsedDBs( const SvStringsDtor& rUsedDBNames,
}
}
-BOOL SwDoc::IsNameInArray( const SvStringsDtor& rArr, const String& rName )
+sal_Bool SwDoc::IsNameInArray( const SvStringsDtor& rArr, const String& rName )
{
#ifdef UNX
- for( USHORT i = 0; i < rArr.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rArr.Count(); ++i )
if( rName == *rArr[ i ] )
- return TRUE;
+ return sal_True;
#else
const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore();
- for( USHORT i = 0; i < rArr.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rArr.Count(); ++i )
if( rSCmp.isEqual( rName, *rArr[ i] ))
- return TRUE;
+ return sal_True;
#endif
- return FALSE;
+ return sal_False;
}
void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
{
- BOOL bIsModified = IsModified();
+ sal_Bool bIsModified = IsModified();
- ULONG nDate, nTime;
+ sal_uLong nDate, nTime;
if( pNewDateTime )
{
nDate = pNewDateTime->GetDate();
@@ -2017,14 +2019,14 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
nTime = Time().GetTime();
}
- USHORT aTypes[5] = {
+ sal_uInt16 aTypes[5] = {
/*0*/ RES_DOCINFOFLD,
/*1*/ RES_AUTHORFLD,
/*2*/ RES_EXTUSERFLD,
/*3*/ RES_FILENAMEFLD,
/*4*/ RES_DATETIMEFLD }; // MUSS am Ende stehen!!
- USHORT nStt = bOnlyTimeDate ? 4 : 0;
+ sal_uInt16 nStt = bOnlyTimeDate ? 4 : 0;
for( ; nStt < 5; ++nStt )
{
@@ -2036,13 +2038,13 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
{
if( pFld && pFld->GetTxtFld() )
{
- BOOL bChgd = FALSE;
+ sal_Bool bChgd = sal_False;
switch( aTypes[ nStt ] )
{
case RES_DOCINFOFLD:
if( ((SwDocInfoField*)pFld->GetFld())->IsFixed() )
{
- bChgd = TRUE;
+ bChgd = sal_True;
SwDocInfoField* pDocInfFld = (SwDocInfoField*)pFld->GetFld();
pDocInfFld->SetExpansion( ((SwDocInfoFieldType*)
pDocInfFld->GetTyp())->Expand(
@@ -2056,7 +2058,7 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
case RES_AUTHORFLD:
if( ((SwAuthorField*)pFld->GetFld())->IsFixed() )
{
- bChgd = TRUE;
+ bChgd = sal_True;
SwAuthorField* pAuthorFld = (SwAuthorField*)pFld->GetFld();
pAuthorFld->SetExpansion( ((SwAuthorFieldType*)
pAuthorFld->GetTyp())->Expand(
@@ -2067,7 +2069,7 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
case RES_EXTUSERFLD:
if( ((SwExtUserField*)pFld->GetFld())->IsFixed() )
{
- bChgd = TRUE;
+ bChgd = sal_True;
SwExtUserField* pExtUserFld = (SwExtUserField*)pFld->GetFld();
pExtUserFld->SetExpansion( ((SwExtUserFieldType*)
pExtUserFld->GetTyp())->Expand(
@@ -2079,7 +2081,7 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
case RES_DATETIMEFLD:
if( ((SwDateTimeField*)pFld->GetFld())->IsFixed() )
{
- bChgd = TRUE;
+ bChgd = sal_True;
((SwDateTimeField*)pFld->GetFld())->SetDateTime(
DateTime(Date(nDate), Time(nTime)) );
}
@@ -2088,7 +2090,7 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
case RES_FILENAMEFLD:
if( ((SwFileNameField*)pFld->GetFld())->IsFixed() )
{
- bChgd = TRUE;
+ bChgd = sal_True;
SwFileNameField* pFileNameFld =
(SwFileNameField*)pFld->GetFld();
pFileNameFld->SetExpansion( ((SwFileNameFieldType*)
@@ -2109,19 +2111,19 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
ResetModified();
}
-bool SwDoc::SetFieldsDirty( bool b, const SwNode* pChk, ULONG nLen )
+bool SwDoc::SetFieldsDirty( bool b, const SwNode* pChk, sal_uLong nLen )
{
// teste ggfs. mal, ob die angegbenen Nodes ueberhaupt Felder beinhalten.
// wenn nicht, braucht das Flag nicht veraendert werden.
- BOOL bFldsFnd = FALSE;
+ sal_Bool bFldsFnd = sal_False;
if( b && pChk && !GetUpdtFlds().IsFieldsDirty() && !IsInDtor()
// ?? was ist mit Undo, da will man es doch auch haben !!
/*&& &pChk->GetNodes() == &GetNodes()*/ )
{
- b = FALSE;
+ b = sal_False;
if( !nLen )
++nLen;
- ULONG nStt = pChk->GetIndex();
+ sal_uLong nStt = pChk->GetIndex();
const SwNodes& rNds = pChk->GetNodes();
while( nLen-- )
{
@@ -2130,15 +2132,15 @@ bool SwDoc::SetFieldsDirty( bool b, const SwNode* pChk, ULONG nLen )
{
if( pTNd->GetAttrOutlineLevel() != 0 )
// Kapitelfelder aktualisieren
- b = TRUE;
+ b = sal_True;
else if( pTNd->GetpSwpHints() && pTNd->GetSwpHints().Count() )
- for( USHORT n = 0, nEnd = pTNd->GetSwpHints().Count();
+ for( sal_uInt16 n = 0, nEnd = pTNd->GetSwpHints().Count();
n < nEnd; ++n )
{
const SwTxtAttr* pAttr = pTNd->GetSwpHints()[ n ];
if( RES_TXTATR_FIELD == pAttr->Which() )
{
- b = TRUE;
+ b = sal_True;
break;
}
}
@@ -2155,9 +2157,9 @@ bool SwDoc::SetFieldsDirty( bool b, const SwNode* pChk, ULONG nLen )
void SwDoc::ChangeAuthorityData( const SwAuthEntry* pNewData )
{
- const USHORT nSize = pFldTypes->Count();
+ const sal_uInt16 nSize = pFldTypes->Count();
- for( USHORT i = INIT_FLDTYPES; i < nSize; ++i )
+ for( sal_uInt16 i = INIT_FLDTYPES; i < nSize; ++i )
{
SwFieldType* pFldType = (*pFldTypes)[i];
if( RES_AUTHORITY == pFldType->Which() )
@@ -2170,9 +2172,9 @@ void SwDoc::ChangeAuthorityData( const SwAuthEntry* pNewData )
}
-void SwDocUpdtFld::InsDelFldInFldLst( BOOL bIns, const SwTxtFld& rFld )
+void SwDocUpdtFld::InsDelFldInFldLst( sal_Bool bIns, const SwTxtFld& rFld )
{
- USHORT nWhich = rFld.GetFld().GetFld()->GetTyp()->Which();
+ sal_uInt16 nWhich = rFld.GetFld().GetFld()->GetTyp()->Which();
switch( nWhich )
{
case RES_DBFLD:
@@ -2189,7 +2191,7 @@ void SwDocUpdtFld::InsDelFldInFldLst( BOOL bIns, const SwTxtFld& rFld )
return;
}
- SetFieldsDirty( TRUE );
+ SetFieldsDirty( sal_True );
if( !pFldSortLst )
{
if( !bIns ) // keine Liste vorhanden und loeschen
@@ -2204,7 +2206,7 @@ void SwDocUpdtFld::InsDelFldInFldLst( BOOL bIns, const SwTxtFld& rFld )
// ueber den pTxtFld Pointer suchen. Ist zwar eine Sortierte
// Liste, aber nach Node-Positionen sortiert. Bis dieser
// bestimmt ist, ist das Suchen nach dem Pointer schon fertig
- for( USHORT n = 0; n < pFldSortLst->Count(); ++n )
+ for( sal_uInt16 n = 0; n < pFldSortLst->Count(); ++n )
if( &rFld == (*pFldSortLst)[ n ]->GetPointer() )
pFldSortLst->DeleteAndDestroy( n--, 1 );
// ein Feld kann mehrfach vorhanden sein!
@@ -2247,18 +2249,17 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
SvULongs aTmpArr;
SwSectionFmts& rArr = rDoc.GetSections();
SwSectionNode* pSectNd;
- USHORT nArrStt = 0;
- ULONG nSttCntnt = rDoc.GetNodes().GetEndOfExtras().GetIndex();
- USHORT n;
+ sal_uInt16 nArrStt = 0;
+ sal_uLong nSttCntnt = rDoc.GetNodes().GetEndOfExtras().GetIndex();
- for( n = rArr.Count(); n; )
+ for (sal_uInt16 n = rArr.Count(); n; )
{
SwSection* pSect = rArr[ --n ]->GetSection();
if( pSect && pSect->IsHidden() && pSect->GetCondition().Len() &&
0 != ( pSectNd = pSect->GetFmt()->GetSectionNode() ))
{
- ULONG nIdx = pSectNd->GetIndex();
- USHORT i;
+ sal_uLong nIdx = pSectNd->GetIndex();
+ sal_uInt16 i;
for( i = 0; i < aTmpArr.Count() && aTmpArr[ i ] < nIdx; ++i )
;
@@ -2271,37 +2272,39 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
// erst alle anzeigen, damit die Frames vorhanden sind. Mit deren
// Position wird das BodyAnchor ermittelt.
// Dafuer erst den ContentBereich, dann die Sonderbereiche!!!
- for( n = nArrStt; n < aTmpArr.Count(); ++n )
+ for (sal_uInt16 n = nArrStt; n < aTmpArr.Count(); ++n)
{
pSectNd = rDoc.GetNodes()[ aTmpArr[ n ] ]->GetSectionNode();
OSL_ENSURE( pSectNd, "Wo ist mein SectionNode" );
- pSectNd->GetSection().SetCondHidden( FALSE );
+ pSectNd->GetSection().SetCondHidden( sal_False );
}
- for( n = 0; n < nArrStt; ++n )
+ for (sal_uInt16 n = 0; n < nArrStt; ++n)
{
pSectNd = rDoc.GetNodes()[ aTmpArr[ n ] ]->GetSectionNode();
OSL_ENSURE( pSectNd, "Wo ist mein SectionNode" );
- pSectNd->GetSection().SetCondHidden( FALSE );
+ pSectNd->GetSection().SetCondHidden( sal_False );
}
// so, erst jetzt alle sortiert in die Liste eintragen
- for( n = 0; n < aTmpArr.Count(); ++n )
+ for (sal_uInt16 n = 0; n < aTmpArr.Count(); ++n)
+ {
GetBodyNode( *rDoc.GetNodes()[ aTmpArr[ n ] ]->GetSectionNode() );
+ }
}
String sTrue( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "TRUE" ))),
+ RTL_CONSTASCII_STRINGPARAM( "sal_True" ))),
sFalse( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "FALSE" )));
+ RTL_CONSTASCII_STRINGPARAM( "sal_False" )));
- BOOL bIsDBMgr = 0 != rDoc.GetNewDBMgr();
- USHORT nWhich, n;
+ sal_Bool bIsDBMgr = 0 != rDoc.GetNewDBMgr();
+ sal_uInt16 nWhich, n;
const String* pFormel = 0;
const SfxPoolItem* pItem;
- USHORT nMaxItems = rDoc.GetAttrPool().GetItemCount( RES_TXTATR_FIELD );
+ sal_uInt32 nMaxItems = rDoc.GetAttrPool().GetItemCount2( RES_TXTATR_FIELD );
for( n = 0; n < nMaxItems; ++n )
{
- if( 0 == (pItem = rDoc.GetAttrPool().GetItem( RES_TXTATR_FIELD, n )) )
+ if( 0 == (pItem = rDoc.GetAttrPool().GetItem2( RES_TXTATR_FIELD, n )) )
continue;
const SwFmtFld* pFmtFld = (SwFmtFld*)pItem;
@@ -2336,9 +2339,9 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
{
pFormel = &pFld->GetPar1();
if( !pFormel->Len() || pFormel->Equals( sFalse ))
- ((SwHiddenParaField*)pFld)->SetHidden( FALSE );
+ ((SwHiddenParaField*)pFld)->SetHidden( sal_False );
else if( pFormel->Equals( sTrue ))
- ((SwHiddenParaField*)pFld)->SetHidden( TRUE );
+ ((SwHiddenParaField*)pFld)->SetHidden( sal_True );
else
break;
@@ -2353,9 +2356,9 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
{
pFormel = &pFld->GetPar1();
if( !pFormel->Len() || pFormel->Equals( sFalse ))
- ((SwHiddenTxtField*)pFld)->SetValue( TRUE );
+ ((SwHiddenTxtField*)pFld)->SetValue( sal_True );
else if( pFormel->Equals( sTrue ))
- ((SwHiddenTxtField*)pFld)->SetValue( FALSE );
+ ((SwHiddenTxtField*)pFld)->SetValue( sal_False );
else
break;
@@ -2402,21 +2405,21 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
pFormel = 0;
}
}
- nFldLstGetMode = static_cast<BYTE>( eGetMode );
+ nFldLstGetMode = static_cast<sal_uInt8>( eGetMode );
nNodes = rDoc.GetNodes().Count();
}
-void SwDocUpdtFld::GetBodyNode( const SwTxtFld& rTFld, USHORT nFldWhich )
+void SwDocUpdtFld::GetBodyNode( const SwTxtFld& rTFld, sal_uInt16 nFldWhich )
{
const SwTxtNode& rTxtNd = rTFld.GetTxtNode();
const SwDoc& rDoc = *rTxtNd.GetDoc();
// immer den ersten !! (in Tab-Headline, Kopf-/Fuss )
Point aPt;
- const SwCntntFrm* pFrm = rTxtNd.GetFrm( &aPt, 0, FALSE );
+ const SwCntntFrm* pFrm = rTxtNd.GetFrm( &aPt, 0, sal_False );
_SetGetExpFld* pNew = NULL;
- BOOL bIsInBody = FALSE;
+ sal_Bool bIsInBody = sal_False;
if( !pFrm || pFrm->IsInDocBody() )
{
@@ -2479,7 +2482,7 @@ void SwDocUpdtFld::GetBodyNode( const SwSectionNode& rSectNd )
// immer den ersten !! (in Tab-Headline, Kopf-/Fuss )
Point aPt;
- const SwCntntFrm* pFrm = pCNd->GetFrm( &aPt, 0, FALSE );
+ const SwCntntFrm* pFrm = pCNd->GetFrm( &aPt, 0, sal_False );
if( !pFrm )
break;
@@ -2490,7 +2493,7 @@ void SwDocUpdtFld::GetBodyNode( const SwSectionNode& rSectNd )
#endif
pNew = new _SetGetExpFld( rSectNd, &aPos );
- } while( FALSE );
+ } while( sal_False );
}
if( !pNew )
@@ -2517,10 +2520,10 @@ void SwDocUpdtFld::InsertFldType( const SwFieldType& rType )
if( sFldName.Len() )
{
- SetFieldsDirty( TRUE );
+ SetFieldsDirty( sal_True );
// suchen und aus der HashTabelle entfernen
GetAppCharClass().toLower( sFldName );
- USHORT n;
+ sal_uInt16 n;
SwHash* pFnd = Find( sFldName, GetFldTypeTable(), TBLSZ, &n );
@@ -2548,10 +2551,10 @@ void SwDocUpdtFld::RemoveFldType( const SwFieldType& rType )
if( sFldName.Len() )
{
- SetFieldsDirty( TRUE );
+ SetFieldsDirty( sal_True );
// suchen und aus der HashTabelle entfernen
GetAppCharClass().toLower( sFldName );
- USHORT n;
+ sal_uInt16 n;
SwHash* pFnd = Find( sFldName, GetFldTypeTable(), TBLSZ, &n );
if( pFnd )
@@ -2574,7 +2577,7 @@ void SwDocUpdtFld::RemoveFldType( const SwFieldType& rType )
SwDocUpdtFld::SwDocUpdtFld()
: pFldSortLst(0), nFldUpdtPos(LONG_MAX), nFldLstGetMode(0)
{
- bInUpdateFlds = bFldsDirty = FALSE;
+ bInUpdateFlds = bFldsDirty = sal_False;
memset( aFldTypeTable, 0, sizeof( aFldTypeTable ) );
}
@@ -2582,7 +2585,7 @@ SwDocUpdtFld::~SwDocUpdtFld()
{
delete pFldSortLst;
- for( USHORT n = 0; n < TBLSZ; ++n )
+ for( sal_uInt16 n = 0; n < TBLSZ; ++n )
delete aFldTypeTable[n];
}
@@ -2592,23 +2595,24 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
{
OSL_ENSURE(pDstTxtFld, "no field to update!");
- BOOL bTblSelBreak = FALSE;
+ sal_Bool bTblSelBreak = sal_False;
SwFmtFld * pDstFmtFld = (SwFmtFld*)&pDstTxtFld->GetFld();
SwField * pDstFld = pDstFmtFld->GetFld();
- USHORT nFldWhich = rSrcFld.GetTyp()->Which();
+ sal_uInt16 nFldWhich = rSrcFld.GetTyp()->Which();
SwNodeIndex aTblNdIdx(pDstTxtFld->GetTxtNode());
if (pDstFld->GetTyp()->Which() ==
rSrcFld.GetTyp()->Which())
{
- if (DoesUndo())
+ if (GetIDocumentUndoRedo().DoesUndo())
{
SwPosition aPosition( pDstTxtFld->GetTxtNode() );
aPosition.nContent = *pDstTxtFld->GetStart();
- AppendUndo(new SwUndoFieldFromDoc(aPosition, *pDstFld, rSrcFld,
- pMsgHnt, bUpdateFlds));
+ SwUndo *const pUndo( new SwUndoFieldFromDoc(
+ aPosition, *pDstFld, rSrcFld, pMsgHnt, bUpdateFlds) );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
SwField * pNewFld = rSrcFld.CopyField();
@@ -2637,7 +2641,7 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
pNewFld->GetTyp()->Modify(0, &aTblUpdate);
if (! bUpdateFlds)
- bTblSelBreak = TRUE;
+ bTblSelBreak = sal_True;
}
}
break;
@@ -2664,7 +2668,7 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
//richtig setzt
SwDBField* pDBFld = (SwDBField*)pNewFld;
if (pDBFld->IsInitialized())
- pDBFld->ChgValue( pDBFld->GetValue(), TRUE );
+ pDBFld->ChgValue( pDBFld->GetValue(), sal_True );
pDBFld->ClearInitialized();
pDBFld->InitContent();
@@ -2685,14 +2689,18 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
}
bool SwDoc::PutValueToField(const SwPosition & rPos,
- const Any& rVal, USHORT nWhich)
+ const Any& rVal, sal_uInt16 nWhich)
{
Any aOldVal;
SwField * pField = GetField(rPos);
- if (DoesUndo() && pField->QueryValue(aOldVal, nWhich))
- AppendUndo(new SwUndoFieldFromAPI(rPos, aOldVal, rVal, nWhich));
+ if (GetIDocumentUndoRedo().DoesUndo() &&
+ pField->QueryValue(aOldVal, nWhich))
+ {
+ SwUndo *const pUndo(new SwUndoFieldFromAPI(rPos, aOldVal, rVal, nWhich));
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
+ }
return pField->PutValue(rVal, nWhich);
}
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index 67b0576e8c07..a2d76d1c6961 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -29,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <hintids.hxx>
#include <svl/itemiter.hxx>
#include <svx/svdobj.hxx>
@@ -44,6 +43,7 @@
#include <ndgrf.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <ndindex.hxx>
#include <docary.hxx>
#include <fmtcntnt.hxx>
@@ -62,23 +62,24 @@
#include <swundo.hxx>
#include <swtable.hxx>
#include <crstate.hxx>
-#include <undobj.hxx>
+#include <UndoCore.hxx>
+#include <UndoAttribute.hxx>
#include <fmtcnct.hxx>
#include <dflyobj.hxx>
#include <undoflystrattr.hxx>
-extern USHORT GetHtmlMode( const SwDocShell* );
+extern sal_uInt16 GetHtmlMode( const SwDocShell* );
using namespace ::com::sun::star;
-USHORT SwDoc::GetFlyCount( FlyCntType eType ) const
+sal_uInt16 SwDoc::GetFlyCount( FlyCntType eType ) const
{
const SwSpzFrmFmts& rFmts = *GetSpzFrmFmts();
- USHORT nSize = rFmts.Count();
- USHORT nCount = 0;
+ sal_uInt16 nSize = rFmts.Count();
+ sal_uInt16 nCount = 0;
const SwNodeIndex* pIdx;
- for ( USHORT i = 0; i < nSize; i++)
+ for ( sal_uInt16 i = 0; i < nSize; i++)
{
const SwFrmFmt* pFlyFmt = rFmts[ i ];
if( RES_FLYFRMFMT == pFlyFmt->Which()
@@ -114,14 +115,14 @@ USHORT SwDoc::GetFlyCount( FlyCntType eType ) const
}
// If you change this, also update SwXFrameEnumeration in unocoll.
-SwFrmFmt* SwDoc::GetFlyNum( USHORT nIdx, FlyCntType eType )
+SwFrmFmt* SwDoc::GetFlyNum( sal_uInt16 nIdx, FlyCntType eType )
{
SwSpzFrmFmts& rFmts = *GetSpzFrmFmts();
SwFrmFmt* pRetFmt = 0;
- USHORT nSize = rFmts.Count();
+ sal_uInt16 nSize = rFmts.Count();
const SwNodeIndex* pIdx;
- USHORT nCount = 0;
- for( USHORT i = 0; !pRetFmt && i < nSize; ++i )
+ sal_uInt16 nCount = 0;
+ for( sal_uInt16 i = 0; !pRetFmt && i < nSize; ++i )
{
SwFrmFmt* pFlyFmt = rFmts[ i ];
if( RES_FLYFRMFMT == pFlyFmt->Which()
@@ -168,7 +169,7 @@ Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFmtAnchor& rAnch,
case FLY_AS_CHAR:
if( pFlyFmt && rAnch.GetCntntAnchor() )
{
- const SwFrm* pOld = ((SwFlyFrmFmt*)pFlyFmt)->GetFrm( &aRet, FALSE );
+ const SwFrm* pOld = ((SwFlyFrmFmt*)pFlyFmt)->GetFrm( &aRet, sal_False );
if( pOld )
aRet = pOld->Frm().Pos();
}
@@ -180,7 +181,7 @@ Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFmtAnchor& rAnch,
{
const SwPosition *pPos = rAnch.GetCntntAnchor();
const SwCntntNode* pNd = pPos->nNode.GetNode().GetCntntNode();
- const SwFrm* pOld = pNd ? pNd->GetFrm( &aRet, 0, FALSE ) : 0;
+ const SwFrm* pOld = pNd ? pNd->GetFrm( &aRet, 0, sal_False ) : 0;
if( pOld )
aRet = pOld->Frm().Pos();
}
@@ -191,7 +192,7 @@ Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFmtAnchor& rAnch,
{
const SwFlyFrmFmt* pFmt = (SwFlyFrmFmt*)rAnch.GetCntntAnchor()->
nNode.GetNode().GetFlyFmt();
- const SwFrm* pOld = pFmt ? pFmt->GetFrm( &aRet, FALSE ) : 0;
+ const SwFrm* pOld = pFmt ? pFmt->GetFrm( &aRet, sal_False ) : 0;
if( pOld )
aRet = pOld->Frm().Pos();
}
@@ -199,9 +200,9 @@ Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFmtAnchor& rAnch,
case FLY_AT_PAGE:
{
- USHORT nPgNum = rAnch.GetPageNum();
+ sal_uInt16 nPgNum = rAnch.GetPageNum();
const SwPageFrm *pPage = (SwPageFrm*)rDoc.GetRootFrm()->Lower();
- for( USHORT i = 1; (i <= nPgNum) && pPage; ++i,
+ for( sal_uInt16 i = 1; (i <= nPgNum) && pPage; ++i,
pPage = (const SwPageFrm*)pPage->GetNext() )
if( i == nPgNum )
{
@@ -220,7 +221,7 @@ Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFmtAnchor& rAnch,
#define IGNOREANCHOR 1
#define DONTMAKEFRMS 2
-sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms )
+sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, sal_Bool bNewFrms )
{
//Ankerwechsel sind fast immer in alle 'Richtungen' erlaubt.
//Ausnahme: Absatz- bzw. Zeichengebundene Rahmen duerfen wenn sie in
@@ -294,10 +295,10 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms
pNd->InsertItem( aFmt, pPos->nContent.GetIndex(), 0 );
}
- if( SFX_ITEM_SET != rSet.GetItemState( RES_VERT_ORIENT, FALSE, &pItem ))
+ if( SFX_ITEM_SET != rSet.GetItemState( RES_VERT_ORIENT, sal_False, &pItem ))
{
SwFmtVertOrient aOldV( rFmt.GetVertOrient() );
- BOOL bSet = TRUE;
+ sal_Bool bSet = sal_True;
switch( aOldV.GetVertOrient() )
{
case text::VertOrientation::LINE_TOP: aOldV.SetVertOrient( text::VertOrientation::TOP ); break;
@@ -305,7 +306,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms
case text::VertOrientation::LINE_BOTTOM: aOldV.SetVertOrient( text::VertOrientation::BOTTOM); break;
case text::VertOrientation::NONE: aOldV.SetVertOrient( text::VertOrientation::CENTER); break;
default:
- bSet = FALSE;
+ bSet = sal_False;
}
if( bSet )
rSet.Put( aOldV );
@@ -323,7 +324,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms
//Chg: Wenn sich in den Positionsattributen lediglich die
//Ausrichtung veraendert (text::RelOrientation::FRAME vs. text::RelOrientation::PRTAREA), dann wird die
//Position ebenfalls korrigiert.
- if( SFX_ITEM_SET != rSet.GetItemState( RES_HORI_ORIENT, FALSE, &pItem ))
+ if( SFX_ITEM_SET != rSet.GetItemState( RES_HORI_ORIENT, sal_False, &pItem ))
pItem = 0;
SwFmtHoriOrient aOldH( rFmt.GetHoriOrient() );
@@ -344,7 +345,7 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms
rSet.Put( aOldH );
}
- if( SFX_ITEM_SET != rSet.GetItemState( RES_VERT_ORIENT, FALSE, &pItem ))
+ if( SFX_ITEM_SET != rSet.GetItemState( RES_VERT_ORIENT, sal_False, &pItem ))
pItem = 0;
SwFmtVertOrient aOldV( rFmt.GetVertOrient() );
@@ -376,35 +377,27 @@ sal_Int8 SwDoc::SetFlyFrmAnchor( SwFrmFmt& rFmt, SfxItemSet& rSet, BOOL bNewFrms
return MAKEFRMS;
}
-BOOL SwDoc::SetFlyFrmAttr( SwFrmFmt& rFlyFmt, SfxItemSet& rSet )
+static bool
+lcl_SetFlyFrmAttr(SwDoc & rDoc,
+ sal_Int8 (SwDoc::*pSetFlyFrmAnchor)(SwFrmFmt &, SfxItemSet &, sal_Bool),
+ SwFrmFmt & rFlyFmt, SfxItemSet & rSet)
{
- if( !rSet.Count() )
- return FALSE;
-
- ::std::auto_ptr<SwUndoFmtAttrHelper> pSaveUndo;
- const bool bDoesUndo = DoesUndo();
-
- if( DoesUndo() )
- {
- ClearRedo();
- pSaveUndo.reset( new SwUndoFmtAttrHelper( rFlyFmt ) );
- // --> FME 2004-10-13 #i32968#
- // Inserting columns in the frame causes MakeFrmFmt to put two
- // objects of type SwUndoFrmFmt on the undo stack. We don't want them.
- DoUndo( FALSE );
- // <--
- }
+ // #i32968# Inserting columns in the frame causes MakeFrmFmt to put two
+ // objects of type SwUndoFrmFmt on the undo stack. We don't want them.
+ ::sw::UndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo());
//Ist das Ankerattribut dabei? Falls ja ueberlassen wir die Verarbeitung
- //desselben einer Spezialmethode. Sie Returnt TRUE wenn der Fly neu
+ //desselben einer Spezialmethode. Sie Returnt sal_True wenn der Fly neu
//erzeugt werden muss (z.B. weil ein Wechsel des FlyTyps vorliegt).
- sal_Int8 nMakeFrms = SFX_ITEM_SET == rSet.GetItemState( RES_ANCHOR, FALSE )?
- SetFlyFrmAnchor( rFlyFmt, rSet, FALSE ) : DONTMAKEFRMS;
+ sal_Int8 const nMakeFrms =
+ (SFX_ITEM_SET == rSet.GetItemState( RES_ANCHOR, sal_False ))
+ ? (rDoc.*pSetFlyFrmAnchor)( rFlyFmt, rSet, sal_False )
+ : DONTMAKEFRMS;
const SfxPoolItem* pItem;
SfxItemIter aIter( rSet );
- SfxItemSet aTmpSet( GetAttrPool(), aFrmFmtSetRange );
- USHORT nWhich = aIter.GetCurItem()->Which();
+ SfxItemSet aTmpSet( rDoc.GetAttrPool(), aFrmFmtSetRange );
+ sal_uInt16 nWhich = aIter.GetCurItem()->Which();
do {
switch( nWhich )
{
@@ -413,7 +406,7 @@ BOOL SwDoc::SetFlyFrmAttr( SwFrmFmt& rFlyFmt, SfxItemSet& rSet )
case RES_PAGEDESC:
case RES_CNTNT:
case RES_FOOTER:
- OSL_ENSURE( !this, ":-) Unbekanntes Attribut fuer Fly." );
+ OSL_ENSURE( sal_False, ":-) Unbekanntes Attribut fuer Fly." );
// kein break;
case RES_CHAIN:
rSet.ClearItem( nWhich );
@@ -424,7 +417,7 @@ BOOL SwDoc::SetFlyFrmAttr( SwFrmFmt& rFlyFmt, SfxItemSet& rSet )
default:
if( !IsInvalidItem( aIter.GetCurItem() ) && ( SFX_ITEM_SET !=
- rFlyFmt.GetAttrSet().GetItemState( nWhich, TRUE, &pItem ) ||
+ rFlyFmt.GetAttrSet().GetItemState( nWhich, sal_True, &pItem ) ||
*pItem != *aIter.GetCurItem() ))
aTmpSet.Put( *aIter.GetCurItem() );
break;
@@ -441,21 +434,36 @@ BOOL SwDoc::SetFlyFrmAttr( SwFrmFmt& rFlyFmt, SfxItemSet& rSet )
if( MAKEFRMS == nMakeFrms )
rFlyFmt.MakeFrms();
- if ( pSaveUndo.get() )
+ return aTmpSet.Count() || MAKEFRMS == nMakeFrms;
+}
+
+sal_Bool SwDoc::SetFlyFrmAttr( SwFrmFmt& rFlyFmt, SfxItemSet& rSet )
+{
+ if( !rSet.Count() )
+ return sal_False;
+
+ ::std::auto_ptr<SwUndoFmtAttrHelper> pSaveUndo;
+
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- // --> FME 2004-10-13 #i32968#
- DoUndo( bDoesUndo );
- // <--
+ GetIDocumentUndoRedo().ClearRedo(); // AppendUndo far below, so leave it
+ pSaveUndo.reset( new SwUndoFmtAttrHelper( rFlyFmt ) );
+ }
+
+ bool const bRet =
+ lcl_SetFlyFrmAttr(*this, &SwDoc::SetFlyFrmAnchor, rFlyFmt, rSet);
+ if ( pSaveUndo.get() )
+ {
if ( pSaveUndo->GetUndo() )
{
- AppendUndo( pSaveUndo->ReleaseUndo() );
+ GetIDocumentUndoRedo().AppendUndo( pSaveUndo->ReleaseUndo() );
}
}
SetModified();
- return aTmpSet.Count() || MAKEFRMS == nMakeFrms;
+ return bRet;
}
// #i73249#
@@ -467,13 +475,11 @@ void SwDoc::SetFlyFrmTitle( SwFlyFrmFmt& rFlyFrmFmt,
return;
}
- const bool bFormerIsNoDrawUndoObj( IsNoDrawUndoObj() );
- SetNoDrawUndoObj( true );
+ ::sw::DrawUndoGuard const drawUndoGuard(GetIDocumentUndoRedo());
- if ( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoFlyStrAttr( rFlyFrmFmt,
+ GetIDocumentUndoRedo().AppendUndo( new SwUndoFlyStrAttr( rFlyFrmFmt,
UNDO_FLYFRMFMT_TITLE,
rFlyFrmFmt.GetObjTitle(),
sNewTitle ) );
@@ -481,8 +487,6 @@ void SwDoc::SetFlyFrmTitle( SwFlyFrmFmt& rFlyFrmFmt,
rFlyFrmFmt.SetObjTitle( sNewTitle, true );
- SetNoDrawUndoObj( bFormerIsNoDrawUndoObj );
-
SetModified();
}
@@ -494,13 +498,11 @@ void SwDoc::SetFlyFrmDescription( SwFlyFrmFmt& rFlyFrmFmt,
return;
}
- const bool bFormerIsNoDrawUndoObj( IsNoDrawUndoObj() );
- SetNoDrawUndoObj( true );
+ ::sw::DrawUndoGuard const drawUndoGuard(GetIDocumentUndoRedo());
- if ( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoFlyStrAttr( rFlyFrmFmt,
+ GetIDocumentUndoRedo().AppendUndo( new SwUndoFlyStrAttr( rFlyFrmFmt,
UNDO_FLYFRMFMT_DESCRIPTION,
rFlyFrmFmt.GetObjDescription(),
sNewDescription ) );
@@ -508,36 +510,34 @@ void SwDoc::SetFlyFrmDescription( SwFlyFrmFmt& rFlyFrmFmt,
rFlyFrmFmt.SetObjDescription( sNewDescription, true );
- SetNoDrawUndoObj( bFormerIsNoDrawUndoObj );
-
SetModified();
}
/***************************************************************************
- * Methode : BOOL SwDoc::SetFrmFmtToFly( SwFlyFrm&, SwFrmFmt& )
+ * Methode : sal_Bool SwDoc::SetFrmFmtToFly( SwFlyFrm&, SwFrmFmt& )
* Beschreibung:
***************************************************************************/
-BOOL SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt,
- SfxItemSet* pSet, BOOL bKeepOrient )
+sal_Bool SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt,
+ SfxItemSet* pSet, sal_Bool bKeepOrient )
{
- BOOL bChgAnchor = FALSE, bFrmSz = FALSE;
+ sal_Bool bChgAnchor = sal_False, bFrmSz = sal_False;
const SwFmtFrmSize aFrmSz( rFmt.GetFrmSize() );
const SwFmtVertOrient aVert( rFmt.GetVertOrient() );
const SwFmtHoriOrient aHori( rFmt.GetHoriOrient() );
SwUndoSetFlyFmt* pUndo = 0;
- if( DoesUndo() )
+ bool const bUndo = GetIDocumentUndoRedo().DoesUndo();
+ if (bUndo)
{
- ClearRedo();
- AppendUndo( pUndo = new SwUndoSetFlyFmt( rFmt, rNewFmt ) );
- // --> FME 2004-10-13 #i32968#
- // Inserting columns in the section causes MakeFrmFmt to put two
- // objects of type SwUndoFrmFmt on the undo stack. We don't want them.
- DoUndo( FALSE );
- // <--
+ pUndo = new SwUndoSetFlyFmt( rFmt, rNewFmt );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
+ // #i32968# Inserting columns in the section causes MakeFrmFmt to put
+ // 2 objects of type SwUndoFrmFmt on the undo stack. We don't want them.
+ ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
+
//Erstmal die Spalten setzen, sonst gibts nix als Aerger mit dem
//Set/Reset/Abgleich usw.
const SfxPoolItem* pItem;
@@ -550,20 +550,20 @@ BOOL SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt,
// 1. wenn nicht automatisch -> ignorieren, sonst -> wech
// 2. wech damit, MB!
- if( SFX_ITEM_SET == rNewFmt.GetAttrSet().GetItemState( RES_FRM_SIZE, FALSE ))
+ if( SFX_ITEM_SET == rNewFmt.GetAttrSet().GetItemState( RES_FRM_SIZE, sal_False ))
{
rFmt.ResetFmtAttr( RES_FRM_SIZE );
- bFrmSz = TRUE;
+ bFrmSz = sal_True;
}
const SfxItemSet* pAsk = pSet;
if( !pAsk ) pAsk = &rNewFmt.GetAttrSet();
- if( SFX_ITEM_SET == pAsk->GetItemState( RES_ANCHOR, FALSE, &pItem )
+ if( SFX_ITEM_SET == pAsk->GetItemState( RES_ANCHOR, sal_False, &pItem )
&& ((SwFmtAnchor*)pItem)->GetAnchorId() !=
rFmt.GetAnchor().GetAnchorId() )
{
if( pSet )
- bChgAnchor = MAKEFRMS == SetFlyFrmAnchor( rFmt, *pSet, FALSE );
+ bChgAnchor = MAKEFRMS == SetFlyFrmAnchor( rFmt, *pSet, sal_False );
else
{
//JP 23.04.98: muss den FlyFmt-Range haben, denn im SetFlyFrmAnchor
@@ -571,7 +571,7 @@ BOOL SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt,
SfxItemSet aFlySet( *rNewFmt.GetAttrSet().GetPool(),
rNewFmt.GetAttrSet().GetRanges() );
aFlySet.Put( *pItem );
- bChgAnchor = MAKEFRMS == SetFlyFrmAnchor( rFmt, aFlySet, FALSE);
+ bChgAnchor = MAKEFRMS == SetFlyFrmAnchor( rFmt, aFlySet, sal_False);
}
}
}
@@ -604,11 +604,6 @@ BOOL SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt,
SetModified();
- // --> FME 2004-10-13 #i32968#
- if ( pUndo )
- DoUndo( TRUE );
- // <--
-
return bChgAnchor;
}
@@ -639,10 +634,10 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
return false;
}
- StartUndo( UNDO_INSATTR, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_INSATTR, NULL );
- BOOL bUnmark = FALSE;
- for ( USHORT i = 0; i < _rMrkList.GetMarkCount(); ++i )
+ sal_Bool bUnmark = sal_False;
+ for ( sal_uInt16 i = 0; i < _rMrkList.GetMarkCount(); ++i )
{
SdrObject* pObj = _rMrkList.GetMark( i )->GetMarkedSdrObj();
if ( !pObj->ISA(SwVirtFlyDrawObj) )
@@ -731,7 +726,7 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
// consider that drawing objects can be in
// header/footer. Thus, <GetFrm()> by left-top-corner
pTxtFrm = aPos.nNode.GetNode().
- GetCntntNode()->GetFrm( &aPt, 0, FALSE );
+ GetCntntNode()->GetFrm( &aPt, 0, sal_False );
}
const SwFrm *pTmp = ::FindAnchor( pTxtFrm, aPt );
pNewAnchorFrm = pTmp->FindFlyFrm();
@@ -867,7 +862,7 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
}
}
- EndUndo( UNDO_END, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
SetModified();
return bUnmark;
@@ -909,16 +904,16 @@ int SwDoc::Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest )
if( !pTxtNd )
return SW_CHAIN_NOT_FOUND;
- const ULONG nFlySttNd = pCntIdx->GetIndex();
+ const sal_uLong nFlySttNd = pCntIdx->GetIndex();
if( 2 != ( pCntIdx->GetNode().EndOfSectionIndex() - nFlySttNd ) ||
pTxtNd->GetTxt().Len() )
return SW_CHAIN_NOT_EMPTY;
- USHORT nArrLen = GetSpzFrmFmts()->Count();
- for( USHORT n = 0; n < nArrLen; ++n )
+ sal_uInt16 nArrLen = GetSpzFrmFmts()->Count();
+ for( sal_uInt16 n = 0; n < nArrLen; ++n )
{
const SwFmtAnchor& rAnchor = (*GetSpzFrmFmts())[ n ]->GetAnchor();
- ULONG nTstSttNd;
+ sal_uLong nTstSttNd;
// #i20622# - to-frame anchored objects are allowed.
if ( ((rAnchor.GetAnchorId() == FLY_AT_PARA) ||
(rAnchor.GetAnchorId() == FLY_AT_CHAR)) &&
@@ -940,14 +935,14 @@ int SwDoc::Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest )
// both in the same fly, header, footer or on the page?
const SwFmtAnchor &rSrcAnchor = rSource.GetAnchor(),
&rDstAnchor = rDest.GetAnchor();
- ULONG nEndOfExtras = GetNodes().GetEndOfExtras().GetIndex();
- BOOL bAllowed = FALSE;
+ sal_uLong nEndOfExtras = GetNodes().GetEndOfExtras().GetIndex();
+ sal_Bool bAllowed = sal_False;
if ( FLY_AT_PAGE == rSrcAnchor.GetAnchorId() )
{
if ( (FLY_AT_PAGE == rDstAnchor.GetAnchorId()) ||
( rDstAnchor.GetCntntAnchor() &&
rDstAnchor.GetCntntAnchor()->nNode.GetIndex() > nEndOfExtras ))
- bAllowed = TRUE;
+ bAllowed = sal_True;
}
else if( rSrcAnchor.GetCntntAnchor() && rDstAnchor.GetCntntAnchor() )
{
@@ -966,7 +961,7 @@ int SwDoc::Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest )
pSttNd == rDstIdx.GetNode().FindHeaderStartNode() ) ||
( !pSttNd && rDstIdx.GetIndex() > nEndOfExtras &&
rSrcIdx.GetIndex() > nEndOfExtras ))
- bAllowed = TRUE;
+ bAllowed = sal_True;
}
return bAllowed ? SW_CHAIN_OK : SW_CHAIN_WRONG_AREA;
@@ -977,7 +972,7 @@ int SwDoc::Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest )
int nErr = Chainable( rSource, rDest );
if ( !nErr )
{
- StartUndo( UNDO_CHAINE, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_CHAINE, NULL );
SwFlyFrmFmt& rDestFmt = (SwFlyFrmFmt&)rDest;
@@ -1011,7 +1006,7 @@ int SwDoc::Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest )
}
SetAttr( aSet, rSource );
- EndUndo( UNDO_CHAINE, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_CHAINE, NULL );
}
return nErr;
}
@@ -1021,14 +1016,14 @@ void SwDoc::Unchain( SwFrmFmt &rFmt )
SwFmtChain aChain( rFmt.GetChain() );
if ( aChain.GetNext() )
{
- StartUndo( UNDO_UNCHAIN, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_UNCHAIN, NULL );
SwFrmFmt *pFollow = aChain.GetNext();
aChain.SetNext( 0 );
SetAttr( aChain, rFmt );
aChain = pFollow->GetChain();
aChain.SetPrev( 0 );
SetAttr( aChain, *pFollow );
- EndUndo( UNDO_UNCHAIN, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_UNCHAIN, NULL );
}
}
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index f424942b1a6a..32592c827649 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -54,12 +54,14 @@
#include <fmtcntnt.hxx>
#include <frmatr.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <rootfrm.hxx>
#include <pagefrm.hxx>
#include <hints.hxx> // fuer SwHyphenBug (in SetDefault)
#include <ndtxt.hxx>
#include <pam.hxx>
-#include <undobj.hxx>
+#include <UndoCore.hxx>
+#include <UndoAttribute.hxx>
#include <ndgrf.hxx>
#include <pagedesc.hxx> // Fuer Sonderbehandlung in InsFrmFmt
#include <rolbck.hxx> // Undo-Attr
@@ -95,14 +97,14 @@ SV_IMPL_PTRARR(SwSpzFrmFmts,SwFrmFmtPtr)
* interne Funktionen
*/
-BOOL SetTxtFmtCollNext( const SwTxtFmtCollPtr& rpTxtColl, void* pArgs )
+sal_Bool SetTxtFmtCollNext( const SwTxtFmtCollPtr& rpTxtColl, void* pArgs )
{
SwTxtFmtColl *pDel = (SwTxtFmtColl*) pArgs;
if ( &rpTxtColl->GetNextTxtFmtColl() == pDel )
{
rpTxtColl->SetNextTxtFmtColl( *rpTxtColl );
}
- return TRUE;
+ return sal_True;
}
/*
@@ -116,7 +118,7 @@ struct ParaRstFmt
SwHistory* pHistory;
const SwPosition *pSttNd, *pEndNd;
const SfxItemSet* pDelSet;
- USHORT nWhich;
+ sal_uInt16 nWhich;
bool bReset;
bool bResetListAttrs; // #i62575#
bool bResetAll;
@@ -125,7 +127,7 @@ struct ParaRstFmt
bool bKeepOutlineLevelAttr;
ParaRstFmt( const SwPosition* pStt, const SwPosition* pEnd,
- SwHistory* pHst, USHORT nWhch = 0, const SfxItemSet* pSet = 0 )
+ SwHistory* pHst, sal_uInt16 nWhch = 0, const SfxItemSet* pSet = 0 )
: pFmtColl(0),
pHistory(pHst),
pSttNd(pStt),
@@ -158,14 +160,14 @@ struct ParaRstFmt
* (wird bei Selectionen am Start/Ende und bei keiner SSelection benoetigt)
*/
-BOOL lcl_RstTxtAttr( const SwNodePtr& rpNd, void* pArgs )
+sal_Bool lcl_RstTxtAttr( const SwNodePtr& rpNd, void* pArgs )
{
ParaRstFmt* pPara = (ParaRstFmt*)pArgs;
SwTxtNode * pTxtNode = (SwTxtNode*)rpNd->GetTxtNode();
if( pTxtNode && pTxtNode->GetpSwpHints() )
{
SwIndex aSt( pTxtNode, 0 );
- USHORT nEnd = pTxtNode->Len();
+ sal_uInt16 nEnd = pTxtNode->Len();
if( &pPara->pSttNd->nNode.GetNode() == pTxtNode &&
pPara->pSttNd->nContent.GetIndex() )
@@ -188,16 +190,16 @@ BOOL lcl_RstTxtAttr( const SwNodePtr& rpNd, void* pArgs )
pTxtNode->RstAttr( aSt, nEnd - aSt.GetIndex(), pPara->nWhich,
pPara->pDelSet, pPara->bInclRefToxMark );
}
- return TRUE;
+ return sal_True;
}
-BOOL lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
+sal_Bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
{
ParaRstFmt* pPara = (ParaRstFmt*)pArgs;
SwCntntNode* pNode = (SwCntntNode*)rpNd->GetCntntNode();
if( pNode && pNode->HasSwAttrSet() )
{
- const BOOL bLocked = pNode->IsModifyLocked();
+ const sal_Bool bLocked = pNode->IsModifyLocked();
pNode->LockModify();
SwDoc* pDoc = pNode->GetDoc();
@@ -234,12 +236,12 @@ BOOL lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
const SfxPoolItem* pItem;
- USHORT const aSavIds[ 4 ] = { RES_PAGEDESC, RES_BREAK, //->add by zhaojianwei
+ sal_uInt16 const aSavIds[ 4 ] = { RES_PAGEDESC, RES_BREAK, //->add by zhaojianwei
RES_PARATR_NUMRULE,
RES_PARATR_OUTLINELEVEL };
- for( USHORT n = 0; n < 4; ++n ) //<-end,zhaojianwei
+ for( sal_uInt16 n = 0; n < 4; ++n ) //<-end,zhaojianwei
{
- if( SFX_ITEM_SET == pSet->GetItemState( aSavIds[ n ], FALSE, &pItem ))
+ if( SFX_ITEM_SET == pSet->GetItemState( aSavIds[ n ], sal_False, &pItem ))
{
bool bSave = false;
switch( aSavIds[ n ] )
@@ -291,12 +293,12 @@ BOOL lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
"<lcl_RstAttr(..)> - certain attributes are kept, but not needed. -> please inform OD" );
SfxItemIter aIter( *pPara->pDelSet );
pItem = aIter.FirstItem();
- while( TRUE )
+ while( sal_True )
{
if ( ( pItem->Which() != RES_PAGEDESC &&
pItem->Which() != RES_BREAK &&
pItem->Which() != RES_PARATR_NUMRULE ) ||
- ( aSet.GetItemState( pItem->Which(), FALSE ) != SFX_ITEM_SET ) )
+ ( aSet.GetItemState( pItem->Which(), sal_False ) != SFX_ITEM_SET ) )
{
pNode->ResetAttr( pItem->Which() );
}
@@ -324,37 +326,36 @@ BOOL lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
pNode->UnlockModify();
}
}
- return TRUE;
+ return sal_True;
}
-void SwDoc::RstTxtAttrs(const SwPaM &rRg, BOOL bInclRefToxMark )
+void SwDoc::RstTxtAttrs(const SwPaM &rRg, sal_Bool bInclRefToxMark )
{
SwHistory* pHst = 0;
SwDataChanged aTmp( rRg, 0 );
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
SwUndoResetAttr* pUndo = new SwUndoResetAttr( rRg, RES_CHRFMT );
pHst = &pUndo->GetHistory();
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
const SwPosition *pStt = rRg.Start(), *pEnd = rRg.End();
ParaRstFmt aPara( pStt, pEnd, pHst );
- aPara.bInclRefToxMark = ( bInclRefToxMark == TRUE );
+ aPara.bInclRefToxMark = ( bInclRefToxMark == sal_True );
GetNodes().ForEach( pStt->nNode.GetIndex(), pEnd->nNode.GetIndex()+1,
lcl_RstTxtAttr, &aPara );
SetModified();
}
void SwDoc::ResetAttrs( const SwPaM &rRg,
- BOOL bTxtAttr,
+ sal_Bool bTxtAttr,
const SvUShortsSort* pAttrs,
const bool bSendDataChangedEvents )
{
SwPaM* pPam = (SwPaM*)&rRg;
if( !bTxtAttr && pAttrs && pAttrs->Count() &&
RES_TXTATR_END > (*pAttrs)[ 0 ] )
- bTxtAttr = TRUE;
+ bTxtAttr = sal_True;
if( !rRg.HasMark() )
{
@@ -365,7 +366,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
pPam = new SwPaM( *rRg.GetPoint() );
SwIndex& rSt = pPam->GetPoint()->nContent;
- USHORT nMkPos, nPtPos = rSt.GetIndex();
+ sal_uInt16 nMkPos, nPtPos = rSt.GetIndex();
// JP 22.08.96: Sonderfall: steht der Crsr in einem URL-Attribut
// dann wird dessen Bereich genommen
@@ -384,7 +385,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
pTxtNd->GetTxt(), nPtPos,
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
WordType::ANY_WORD /*ANYWORD_IGNOREWHITESPACES*/,
- TRUE );
+ sal_True );
if( aBndry.startPos < nPtPos && nPtPos < aBndry.endPos )
{
@@ -395,7 +396,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
{
nPtPos = nMkPos = rSt.GetIndex();
if( bTxtAttr )
- pTxtNd->DontExpandFmt( rSt, TRUE );
+ pTxtNd->DontExpandFmt( rSt, sal_True );
}
}
@@ -412,24 +413,23 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
pDataChanged.reset( new SwDataChanged( *pPam, 0 ) );
}
SwHistory* pHst = 0;
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
SwUndoResetAttr* pUndo = new SwUndoResetAttr( rRg,
- static_cast<USHORT>(bTxtAttr ? RES_CONDTXTFMTCOLL : RES_TXTFMTCOLL ));
+ static_cast<sal_uInt16>(bTxtAttr ? RES_CONDTXTFMTCOLL : RES_TXTFMTCOLL ));
if( pAttrs && pAttrs->Count() )
{
pUndo->SetAttrs( *pAttrs );
}
pHst = &pUndo->GetHistory();
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
const SwPosition *pStt = pPam->Start(), *pEnd = pPam->End();
ParaRstFmt aPara( pStt, pEnd, pHst );
// mst: not including META here; it seems attrs with CH_TXTATR are omitted
- USHORT aResetableSetRange[] = {
+ sal_uInt16 aResetableSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -445,7 +445,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
SfxItemSet aDelSet( GetAttrPool(), aResetableSetRange );
if( pAttrs && pAttrs->Count() )
{
- for( USHORT n = pAttrs->Count(); n; )
+ for( sal_uInt16 n = pAttrs->Count(); n; )
if( POOLATTR_END > (*pAttrs)[ --n ] )
aDelSet.Put( *GetDfltAttr( (*pAttrs)[ n ] ));
@@ -453,7 +453,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
aPara.pDelSet = &aDelSet;
}
- BOOL bAdd = TRUE;
+ sal_Bool bAdd = sal_True;
SwNodeIndex aTmpStt( pStt->nNode );
SwNodeIndex aTmpEnd( pEnd->nNode );
if( pStt->nContent.GetIndex() ) // nur ein Teil
@@ -466,7 +466,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
const SfxPoolItem* pItem = aIter.GetCurItem();
SfxItemSet aCharSet( GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END );
- while( TRUE )
+ while( sal_True )
{
if( IsInRange( aCharFmtSetRange, pItem->Which() ))
{
@@ -508,7 +508,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
}
if( pEnd->nContent.GetIndex() == pEnd->nNode.GetNode().GetCntntNode()->Len() )
// dann spaeter aufsetzen und alle CharFmtAttr -> TxtFmtAttr
- aTmpEnd++, bAdd = FALSE;
+ aTmpEnd++, bAdd = sal_False;
else if( pStt->nNode != pEnd->nNode || !pStt->nContent.GetIndex() )
{
SwTxtNode* pTNd = aTmpEnd.GetNode().GetTxtNode();
@@ -516,7 +516,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
{
SfxItemIter aIter( *pTNd->GetpSwAttrSet() );
const SfxPoolItem* pItem = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
if( IsInRange( aCharFmtSetRange, pItem->Which() ))
{
@@ -584,7 +584,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
{
SfxItemIter aIter( rChgSet );
const SfxPoolItem* pItem = aIter.FirstItem();
- const USHORT nWhich = pItem->Which();
+ const sal_uInt16 nWhich = pItem->Which();
if ( isCHRATR(nWhich) ||
(RES_TXTATR_CHARFMT == nWhich) ||
@@ -658,7 +658,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
return false;
}
- SwNumFmt aNumFmt = pNumRule->Get(static_cast<USHORT>(pTxtNd->GetActualListLevel()));
+ SwNumFmt aNumFmt = pNumRule->Get(static_cast<sal_uInt16>(pTxtNd->GetActualListLevel()));
SwCharFmt * pCharFmt =
pDoc->FindCharFmtByName(aNumFmt.GetCharFmtName());
@@ -696,7 +696,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
pStt->nNode, pStt->nContent.GetIndex() );
if( pUndo )
- pUndo->SaveRedlineData( aPam, TRUE );
+ pUndo->SaveRedlineData( aPam, sal_True );
if( pDoc->IsRedlineOn() )
pDoc->AppendRedline( new SwRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
@@ -721,8 +721,8 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
aTxtSet.Put( rChgSet );
if( aTxtSet.Count() )
{
- USHORT nInsCnt = rSt.GetIndex();
- USHORT nEnd = pStt->nNode == pEnd->nNode
+ sal_uInt16 nInsCnt = rSt.GetIndex();
+ sal_uInt16 nEnd = pStt->nNode == pEnd->nNode
? pEnd->nContent.GetIndex()
: pNode->Len();
SwRegHistory history( pNode, *pNode, pHistory );
@@ -733,7 +733,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
&& pDoc->GetRedlineTbl().Count())))
{
// wurde Text-Inhalt eingefuegt? (RefMark/TOXMarks ohne Ende)
- BOOL bTxtIns = nInsCnt != rSt.GetIndex();
+ sal_Bool bTxtIns = nInsCnt != rSt.GetIndex();
// wurde Inhalt eingefuegt oder ueber die Selektion gesetzt?
SwPaM aPam( pStt->nNode, bTxtIns ? nInsCnt + 1 : nEnd,
pStt->nNode, nInsCnt );
@@ -757,7 +757,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
SwTableNode* pTblNd;
const SwFmtPageDesc* pDesc;
if( SFX_ITEM_SET == pOtherSet->GetItemState( RES_PAGEDESC,
- FALSE, (const SfxPoolItem**)&pDesc ))
+ sal_False, (const SfxPoolItem**)&pDesc ))
{
if( pNode )
{
@@ -806,7 +806,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
if( pNode && 0 == (nFlags & nsSetAttrMode::SETATTR_APICALL) &&
0 != (pTblNd = pNode->FindTableNode() ) &&
SFX_ITEM_SET == pOtherSet->GetItemState( RES_BREAK,
- FALSE, (const SfxPoolItem**)&pBreak ) )
+ sal_False, (const SfxPoolItem**)&pBreak ) )
{
SwTableNode* pCurTblNd = pTblNd;
while ( 0 != ( pCurTblNd = pCurTblNd->StartOfSectionNode()->FindTableNode() ) )
@@ -835,9 +835,9 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
{
// wenns eine PoolNumRule ist, diese ggfs. anlegen
const SwNumRuleItem* pRule;
- USHORT nPoolId;
+ sal_uInt16 nPoolId;
if( SFX_ITEM_SET == pOtherSet->GetItemState( RES_PARATR_NUMRULE,
- FALSE, (const SfxPoolItem**)&pRule ) &&
+ sal_False, (const SfxPoolItem**)&pRule ) &&
!pDoc->FindNumRulePtr( pRule->GetValue() ) &&
USHRT_MAX != (nPoolId = SwStyleNameMapper::GetPoolIdFromUIName ( pRule->GetValue(),
nsSwGetPoolIdFromName::GET_POOLID_NUMRULE )) )
@@ -858,7 +858,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
{
SwTxtNode* pTxtNd = static_cast<SwTxtNode*>(pNode);
const SwIndex& rSt = pStt->nContent;
- USHORT nMkPos, nPtPos = rSt.GetIndex();
+ sal_uInt16 nMkPos, nPtPos = rSt.GetIndex();
const String& rStr = pTxtNd->GetTxt();
// JP 22.08.96: Sonderfall: steht der Crsr in einem URL-Attribut
@@ -878,7 +878,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
pTxtNd->GetTxt(), nPtPos,
pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
WordType::ANY_WORD /*ANYWORD_IGNOREWHITESPACES*/,
- TRUE );
+ sal_True );
if( aBndry.startPos < nPtPos && nPtPos < aBndry.endPos )
{
@@ -920,7 +920,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
SwPaM aPam( *pNode, nMkPos, *pNode, nPtPos );
if( pUndo )
- pUndo->SaveRedlineData( aPam, FALSE );
+ pUndo->SaveRedlineData( aPam, sal_False );
pDoc->AppendRedline( new SwRedline( nsRedlineType_t::REDLINE_FORMAT, aPam ), true);
}
}
@@ -937,12 +937,12 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
if( pDoc->IsRedlineOn() && pCharSet && pCharSet->Count() )
{
if( pUndo )
- pUndo->SaveRedlineData( rRg, FALSE );
+ pUndo->SaveRedlineData( rRg, sal_False );
pDoc->AppendRedline( new SwRedline( nsRedlineType_t::REDLINE_FORMAT, rRg ), true);
}
/* jetzt wenn Bereich */
- ULONG nNodes = 0;
+ sal_uLong nNodes = 0;
SwNodeIndex aSt( pDoc->GetNodes() );
SwNodeIndex aEnd( pDoc->GetNodes() );
@@ -950,7 +950,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
if( pNode )
{
- USHORT nLen = pNode->Len();
+ sal_uInt16 nLen = pNode->Len();
if( pStt->nNode != pEnd->nNode )
aCntEnd.Assign( pNode, nLen );
@@ -997,7 +997,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
pNode = pEnd->nNode.GetNode().GetCntntNode();
if(pNode)
{
- USHORT nLen = pNode->Len();
+ sal_uInt16 nLen = pNode->Len();
if( aCntEnd.GetIndex() != nLen )
{
// the SwRegHistory inserts the attribute into the TxtNode!
@@ -1037,9 +1037,9 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
pDoc->GetNodes().ForEach( aSt, aEnd, lcl_RstTxtAttr, &aPara );
}
- BOOL bCreateSwpHints = pCharSet && (
- SFX_ITEM_SET == pCharSet->GetItemState( RES_TXTATR_CHARFMT, FALSE ) ||
- SFX_ITEM_SET == pCharSet->GetItemState( RES_TXTATR_INETFMT, FALSE ) );
+ sal_Bool bCreateSwpHints = pCharSet && (
+ SFX_ITEM_SET == pCharSet->GetItemState( RES_TXTATR_CHARFMT, sal_False ) ||
+ SFX_ITEM_SET == pCharSet->GetItemState( RES_TXTATR_INETFMT, sal_False ) );
for(; aSt < aEnd; aSt++ )
{
@@ -1087,9 +1087,9 @@ bool SwDoc::InsertPoolItem( const SwPaM &rRg, const SfxPoolItem &rHt,
{
SwDataChanged aTmp( rRg, 0 );
SwUndoAttr* pUndoAttr = 0;
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
+ GetIDocumentUndoRedo().ClearRedo();
pUndoAttr = new SwUndoAttr( rRg, rHt, nFlags );
}
@@ -1097,8 +1097,10 @@ bool SwDoc::InsertPoolItem( const SwPaM &rRg, const SfxPoolItem &rHt,
aSet.Put( rHt );
bool bRet = lcl_InsAttr( this, rRg, aSet, nFlags, pUndoAttr );
- if( DoesUndo() )
- AppendUndo( pUndoAttr );
+ if (GetIDocumentUndoRedo().DoesUndo())
+ {
+ GetIDocumentUndoRedo().AppendUndo( pUndoAttr );
+ }
if( bRet )
SetModified();
@@ -1110,16 +1112,18 @@ bool SwDoc::InsertItemSet ( const SwPaM &rRg, const SfxItemSet &rSet,
{
SwDataChanged aTmp( rRg, 0 );
SwUndoAttr* pUndoAttr = 0;
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
+ GetIDocumentUndoRedo().ClearRedo();
pUndoAttr = new SwUndoAttr( rRg, rSet, nFlags );
}
bool bRet = lcl_InsAttr( this, rRg, rSet, nFlags, pUndoAttr );
- if( DoesUndo() )
- AppendUndo( pUndoAttr );
+ if (GetIDocumentUndoRedo().DoesUndo())
+ {
+ GetIDocumentUndoRedo().AppendUndo( pUndoAttr );
+ }
if( bRet )
SetModified();
@@ -1141,14 +1145,17 @@ void SwDoc::SetAttr( const SfxPoolItem& rAttr, SwFmt& rFmt )
// das alte in die Undo-History aufgenommen
void SwDoc::SetAttr( const SfxItemSet& rSet, SwFmt& rFmt )
{
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
SwUndoFmtAttrHelper aTmp( rFmt );
rFmt.SetFmtAttr( rSet );
if ( aTmp.GetUndo() )
{
- AppendUndo( aTmp.ReleaseUndo() );
+ GetIDocumentUndoRedo().AppendUndo( aTmp.ReleaseUndo() );
+ }
+ else
+ {
+ GetIDocumentUndoRedo().ClearRedo();
}
}
else
@@ -1158,19 +1165,21 @@ void SwDoc::SetAttr( const SfxItemSet& rSet, SwFmt& rFmt )
SetModified();
}
-void SwDoc::ResetAttrAtFormat( const USHORT nWhichId,
+void SwDoc::ResetAttrAtFormat( const sal_uInt16 nWhichId,
SwFmt& rChangedFormat )
{
- SwUndo* pUndo = 0;
- if ( DoesUndo() )
- pUndo = new SwUndoFmtResetAttr( rChangedFormat, nWhichId );
+ SwUndo *const pUndo = (GetIDocumentUndoRedo().DoesUndo())
+ ? new SwUndoFmtResetAttr( rChangedFormat, nWhichId )
+ : 0;
- const BOOL bAttrReset = rChangedFormat.ResetFmtAttr( nWhichId );
+ const sal_Bool bAttrReset = rChangedFormat.ResetFmtAttr( nWhichId );
if ( bAttrReset )
{
if ( pUndo )
- AppendUndo( pUndo );
+ {
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
+ }
SetModified();
}
@@ -1187,14 +1196,14 @@ int lcl_SetNewDefTabStops( SwTwips nOldWidth, SwTwips nNewWidth,
// auf dem gleichen TabStop (gepoolt!) vorgenommen
// wird. Als Modify wird ein FmtChg verschickt.
- USHORT nOldCnt = rChgTabStop.Count();
+ sal_uInt16 nOldCnt = rChgTabStop.Count();
if( !nOldCnt || nOldWidth == nNewWidth )
- return FALSE;
+ return sal_False;
// suche den Anfang der Defaults
SvxTabStop* pTabs = ((SvxTabStop*)rChgTabStop.GetStart())
+ (nOldCnt-1);
- USHORT n;
+ sal_uInt16 n;
for( n = nOldCnt; n ; --n, --pTabs )
if( SVX_TAB_ADJUST_DEFAULT != pTabs->GetAdjustment() )
@@ -1202,7 +1211,7 @@ int lcl_SetNewDefTabStops( SwTwips nOldWidth, SwTwips nNewWidth,
++n;
if( n < nOldCnt ) // die DefTabStops loeschen
rChgTabStop.Remove( n, nOldCnt - n );
- return TRUE;
+ return sal_True;
}
// Setze das Attribut als neues default Attribut in diesem Dokument.
@@ -1223,12 +1232,12 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
SwAttrSet aOld( GetAttrPool(), rSet.GetRanges() ),
aNew( GetAttrPool(), rSet.GetRanges() );
SfxItemIter aIter( rSet );
- USHORT nWhich;
+ sal_uInt16 nWhich;
const SfxPoolItem* pItem = aIter.GetCurItem();
SfxItemPool* pSdrPool = GetAttrPool().GetSecondaryPool();
- while( TRUE )
+ while( sal_True )
{
- BOOL bCheckSdrDflt = FALSE;
+ sal_Bool bCheckSdrDflt = sal_False;
nWhich = pItem->Which();
aOld.Put( GetAttrPool().GetDefaultItem( nWhich ) );
GetAttrPool().SetPoolDefaultItem( *pItem );
@@ -1264,7 +1273,7 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
// copy also the defaults
if( bCheckSdrDflt )
{
- USHORT nEdtWhich, nSlotId;
+ sal_uInt16 nEdtWhich, nSlotId;
if( 0 != (nSlotId = GetAttrPool().GetSlotId( nWhich ) ) &&
nSlotId != nWhich &&
0 != (nEdtWhich = pSdrPool->GetWhich( nSlotId )) &&
@@ -1284,15 +1293,14 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
if( aNew.Count() && aCallMod.GetDepends() )
{
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoDefaultAttr( aOld ) );
+ GetIDocumentUndoRedo().AppendUndo( new SwUndoDefaultAttr( aOld ) );
}
const SfxPoolItem* pTmpItem;
if( ( SFX_ITEM_SET ==
- aNew.GetItemState( RES_PARATR_TABSTOP, FALSE, &pTmpItem ) ) &&
+ aNew.GetItemState( RES_PARATR_TABSTOP, sal_False, &pTmpItem ) ) &&
((SvxTabStopItem*)pTmpItem)->Count() )
{
// TabStop-Aenderungen behandeln wir erstmal anders:
@@ -1304,10 +1312,10 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
SwTwips nNewWidth = (*(SvxTabStopItem*)pTmpItem)[ 0 ].GetTabPos(),
nOldWidth = ((SvxTabStopItem&)aOld.Get(RES_PARATR_TABSTOP))[ 0 ].GetTabPos();
- int bChg = FALSE;
- USHORT nMaxItems = GetAttrPool().GetItemCount( RES_PARATR_TABSTOP );
- for( USHORT n = 0; n < nMaxItems; ++n )
- if( 0 != (pTmpItem = GetAttrPool().GetItem( RES_PARATR_TABSTOP, n ) ))
+ int bChg = sal_False;
+ sal_uInt32 nMaxItems = GetAttrPool().GetItemCount2( RES_PARATR_TABSTOP );
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
+ if( 0 != (pTmpItem = GetAttrPool().GetItem2( RES_PARATR_TABSTOP, n ) ))
bChg |= lcl_SetNewDefTabStops( nOldWidth, nNewWidth,
*(SvxTabStopItem*)pTmpItem );
@@ -1338,7 +1346,7 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
}
// Erfrage das Default Attribut in diesem Dokument.
-const SfxPoolItem& SwDoc::GetDefault( USHORT nFmtHint ) const
+const SfxPoolItem& SwDoc::GetDefault( sal_uInt16 nFmtHint ) const
{
return GetAttrPool().GetDefaultItem( nFmtHint );
}
@@ -1346,7 +1354,7 @@ const SfxPoolItem& SwDoc::GetDefault( USHORT nFmtHint ) const
/*
* Loeschen der Formate
*/
-void SwDoc::DelCharFmt(USHORT nFmt, BOOL bBroadcast)
+void SwDoc::DelCharFmt(sal_uInt16 nFmt, sal_Bool bBroadcast)
{
SwCharFmt * pDel = (*pCharFmtTbl)[nFmt];
@@ -1354,12 +1362,12 @@ void SwDoc::DelCharFmt(USHORT nFmt, BOOL bBroadcast)
BroadcastStyleOperation(pDel->GetName(), SFX_STYLE_FAMILY_CHAR,
SFX_STYLESHEET_ERASED);
- if (DoesUndo())
+ if (GetIDocumentUndoRedo().DoesUndo())
{
SwUndo * pUndo =
new SwUndoCharFmtDelete(pDel, this);
- AppendUndo(pUndo);
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
pCharFmtTbl->DeleteAndDestroy(nFmt);
@@ -1367,15 +1375,15 @@ void SwDoc::DelCharFmt(USHORT nFmt, BOOL bBroadcast)
SetModified();
}
-void SwDoc::DelCharFmt( SwCharFmt *pFmt, BOOL bBroadcast )
+void SwDoc::DelCharFmt( SwCharFmt *pFmt, sal_Bool bBroadcast )
{
- USHORT nFmt = pCharFmtTbl->GetPos( pFmt );
+ sal_uInt16 nFmt = pCharFmtTbl->GetPos( pFmt );
OSL_ENSURE( USHRT_MAX != nFmt, "Fmt not found," );
DelCharFmt( nFmt, bBroadcast );
}
-void SwDoc::DelFrmFmt( SwFrmFmt *pFmt, BOOL bBroadcast )
+void SwDoc::DelFrmFmt( SwFrmFmt *pFmt, sal_Bool bBroadcast )
{
if( pFmt->ISA( SwTableBoxFmt ) || pFmt->ISA( SwTableLineFmt ))
{
@@ -1388,7 +1396,7 @@ void SwDoc::DelFrmFmt( SwFrmFmt *pFmt, BOOL bBroadcast )
//Das Format muss in einem der beiden Arrays stehen, in welchem
//werden wir schon merken.
- USHORT nPos;
+ sal_uInt16 nPos;
if ( USHRT_MAX != ( nPos = pFrmFmtTbl->GetPos( pFmt )) )
{
if (bBroadcast)
@@ -1396,11 +1404,11 @@ void SwDoc::DelFrmFmt( SwFrmFmt *pFmt, BOOL bBroadcast )
SFX_STYLE_FAMILY_FRAME,
SFX_STYLESHEET_ERASED);
- if (DoesUndo())
+ if (GetIDocumentUndoRedo().DoesUndo())
{
SwUndo * pUndo = new SwUndoFrmFmtDelete(pFmt, this);
- AppendUndo(pUndo);
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
pFrmFmtTbl->DeleteAndDestroy( nPos );
@@ -1417,7 +1425,7 @@ void SwDoc::DelFrmFmt( SwFrmFmt *pFmt, BOOL bBroadcast )
void SwDoc::DelTblFrmFmt( SwTableFmt *pFmt )
{
- USHORT nPos = pTblFrmFmtTbl->GetPos( pFmt );
+ sal_uInt16 nPos = pTblFrmFmtTbl->GetPos( pFmt );
OSL_ENSURE( USHRT_MAX != nPos, "Fmt not found," );
pTblFrmFmtTbl->DeleteAndDestroy( nPos );
}
@@ -1444,13 +1452,13 @@ SwDrawFrmFmt *SwDoc::MakeDrawFrmFmt( const String &rFmtName,
}
-USHORT SwDoc::GetTblFrmFmtCount(BOOL bUsed) const
+sal_uInt16 SwDoc::GetTblFrmFmtCount(sal_Bool bUsed) const
{
- USHORT nCount = pTblFrmFmtTbl->Count();
+ sal_uInt16 nCount = pTblFrmFmtTbl->Count();
if(bUsed)
{
- SwAutoFmtGetDocNode aGetHt( &aNodes );
- for ( USHORT i = nCount; i; )
+ SwAutoFmtGetDocNode aGetHt( &GetNodes() );
+ for ( sal_uInt16 i = nCount; i; )
{
if((*pTblFrmFmtTbl)[--i]->GetInfo( aGetHt ))
@@ -1462,14 +1470,13 @@ USHORT SwDoc::GetTblFrmFmtCount(BOOL bUsed) const
}
-SwFrmFmt& SwDoc::GetTblFrmFmt(USHORT nFmt, BOOL bUsed ) const
+SwFrmFmt& SwDoc::GetTblFrmFmt(sal_uInt16 nFmt, sal_Bool bUsed ) const
{
- USHORT nRemoved = 0;
+ sal_uInt16 nRemoved = 0;
if(bUsed)
{
- SwAutoFmtGetDocNode aGetHt( &aNodes );
-
- for ( USHORT i = 0; i <= nFmt; i++ )
+ SwAutoFmtGetDocNode aGetHt( &GetNodes() );
+ for ( sal_uInt16 i = 0; i <= nFmt; i++ )
{
while ( (*pTblFrmFmtTbl)[ i + nRemoved]->GetInfo( aGetHt ))
{
@@ -1492,7 +1499,7 @@ SwTableFmt* SwDoc::MakeTblFrmFmt( const String &rFmtName,
SwFrmFmt *SwDoc::MakeFrmFmt(const String &rFmtName,
SwFrmFmt *pDerivedFrom,
- BOOL bBroadcast, BOOL bAuto)
+ sal_Bool bBroadcast, sal_Bool bAuto)
{
SwFrmFmt *pFmt = new SwFrmFmt( GetAttrPool(), rFmtName, pDerivedFrom );
@@ -1506,11 +1513,11 @@ SwFrmFmt *SwDoc::MakeFrmFmt(const String &rFmtName,
BroadcastStyleOperation(rFmtName, SFX_STYLE_FAMILY_PARA,
SFX_STYLESHEET_CREATED);
- if (DoesUndo())
+ if (GetIDocumentUndoRedo().DoesUndo())
{
SwUndo * pUndo = new SwUndoFrmFmtCreate(pFmt, pDerivedFrom, this);
- AppendUndo(pUndo);
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
}
@@ -1519,7 +1526,7 @@ SwFrmFmt *SwDoc::MakeFrmFmt(const String &rFmtName,
SwFmt *SwDoc::_MakeFrmFmt(const String &rFmtName,
SwFmt *pDerivedFrom,
- BOOL bBroadcast, BOOL bAuto)
+ sal_Bool bBroadcast, sal_Bool bAuto)
{
SwFrmFmt *pFrmFmt = dynamic_cast<SwFrmFmt*>(pDerivedFrom);
pFrmFmt = MakeFrmFmt( rFmtName, pFrmFmt, bBroadcast, bAuto );
@@ -1530,19 +1537,19 @@ SwFmt *SwDoc::_MakeFrmFmt(const String &rFmtName,
// #i40550# - add parameter <bAuto> - not relevant
SwCharFmt *SwDoc::MakeCharFmt( const String &rFmtName,
SwCharFmt *pDerivedFrom,
- BOOL bBroadcast,
- BOOL )
+ sal_Bool bBroadcast,
+ sal_Bool )
{
SwCharFmt *pFmt = new SwCharFmt( GetAttrPool(), rFmtName, pDerivedFrom );
pCharFmtTbl->Insert( pFmt, pCharFmtTbl->Count() );
- pFmt->SetAuto( FALSE );
+ pFmt->SetAuto( sal_False );
SetModified();
- if (DoesUndo())
+ if (GetIDocumentUndoRedo().DoesUndo())
{
SwUndo * pUndo = new SwUndoCharFmtCreate(pFmt, pDerivedFrom, this);
- AppendUndo(pUndo);
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
if (bBroadcast)
@@ -1556,7 +1563,7 @@ SwCharFmt *SwDoc::MakeCharFmt( const String &rFmtName,
SwFmt *SwDoc::_MakeCharFmt(const String &rFmtName,
SwFmt *pDerivedFrom,
- BOOL bBroadcast, BOOL bAuto)
+ sal_Bool bBroadcast, sal_Bool bAuto)
{
SwCharFmt *pCharFmt = dynamic_cast<SwCharFmt*>(pDerivedFrom);
pCharFmt = MakeCharFmt( rFmtName, pCharFmt, bBroadcast, bAuto );
@@ -1571,20 +1578,20 @@ SwFmt *SwDoc::_MakeCharFmt(const String &rFmtName,
// #i40550# - add parameter <bAuto> - not relevant
SwTxtFmtColl* SwDoc::MakeTxtFmtColl( const String &rFmtName,
SwTxtFmtColl *pDerivedFrom,
- BOOL bBroadcast,
- BOOL )
+ sal_Bool bBroadcast,
+ sal_Bool )
{
SwTxtFmtColl *pFmtColl = new SwTxtFmtColl( GetAttrPool(), rFmtName,
pDerivedFrom );
pTxtFmtCollTbl->Insert(pFmtColl, pTxtFmtCollTbl->Count());
- pFmtColl->SetAuto( FALSE );
+ pFmtColl->SetAuto( sal_False );
SetModified();
- if (DoesUndo())
+ if (GetIDocumentUndoRedo().DoesUndo())
{
SwUndo * pUndo = new SwUndoTxtFmtCollCreate(pFmtColl, pDerivedFrom,
this);
- AppendUndo(pUndo);
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
if (bBroadcast)
@@ -1596,7 +1603,7 @@ SwTxtFmtColl* SwDoc::MakeTxtFmtColl( const String &rFmtName,
SwFmt *SwDoc::_MakeTxtFmtColl(const String &rFmtName,
SwFmt *pDerivedFrom,
- BOOL bBroadcast, BOOL bAuto)
+ sal_Bool bBroadcast, sal_Bool bAuto)
{
SwTxtFmtColl *pTxtFmtColl = dynamic_cast<SwTxtFmtColl*>(pDerivedFrom);
pTxtFmtColl = MakeTxtFmtColl( rFmtName, pTxtFmtColl, bBroadcast, bAuto );
@@ -1607,12 +1614,12 @@ SwFmt *SwDoc::_MakeTxtFmtColl(const String &rFmtName,
//FEATURE::CONDCOLL
SwConditionTxtFmtColl* SwDoc::MakeCondTxtFmtColl( const String &rFmtName,
SwTxtFmtColl *pDerivedFrom,
- BOOL bBroadcast)
+ sal_Bool bBroadcast)
{
SwConditionTxtFmtColl*pFmtColl = new SwConditionTxtFmtColl( GetAttrPool(),
rFmtName, pDerivedFrom );
pTxtFmtCollTbl->Insert(pFmtColl, pTxtFmtCollTbl->Count());
- pFmtColl->SetAuto( FALSE );
+ pFmtColl->SetAuto( sal_False );
SetModified();
if (bBroadcast)
@@ -1631,12 +1638,12 @@ SwGrfFmtColl* SwDoc::MakeGrfFmtColl( const String &rFmtName,
SwGrfFmtColl *pFmtColl = new SwGrfFmtColl( GetAttrPool(), rFmtName,
pDerivedFrom );
pGrfFmtCollTbl->Insert( pFmtColl, pGrfFmtCollTbl->Count() );
- pFmtColl->SetAuto( FALSE );
+ pFmtColl->SetAuto( sal_False );
SetModified();
return pFmtColl;
}
-void SwDoc::DelTxtFmtColl(USHORT nFmtColl, BOOL bBroadcast)
+void SwDoc::DelTxtFmtColl(sal_uInt16 nFmtColl, sal_Bool bBroadcast)
{
OSL_ENSURE( nFmtColl, "Remove fuer Coll 0." );
@@ -1649,12 +1656,12 @@ void SwDoc::DelTxtFmtColl(USHORT nFmtColl, BOOL bBroadcast)
BroadcastStyleOperation(pDel->GetName(), SFX_STYLE_FAMILY_PARA,
SFX_STYLESHEET_ERASED);
- if (DoesUndo())
+ if (GetIDocumentUndoRedo().DoesUndo())
{
SwUndoTxtFmtCollDelete * pUndo =
new SwUndoTxtFmtCollDelete(pDel, this);
- AppendUndo(pUndo);
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
// Die FmtColl austragen
@@ -1666,14 +1673,14 @@ void SwDoc::DelTxtFmtColl(USHORT nFmtColl, BOOL bBroadcast)
SetModified();
}
-void SwDoc::DelTxtFmtColl( SwTxtFmtColl *pColl, BOOL bBroadcast )
+void SwDoc::DelTxtFmtColl( SwTxtFmtColl *pColl, sal_Bool bBroadcast )
{
- USHORT nFmt = pTxtFmtCollTbl->GetPos( pColl );
+ sal_uInt16 nFmt = pTxtFmtCollTbl->GetPos( pColl );
OSL_ENSURE( USHRT_MAX != nFmt, "Collection not found," );
DelTxtFmtColl( nFmt, bBroadcast );
}
-BOOL lcl_SetTxtFmtColl( const SwNodePtr& rpNode, void* pArgs )
+sal_Bool lcl_SetTxtFmtColl( const SwNodePtr& rpNode, void* pArgs )
{
// ParaSetFmtColl * pPara = (ParaSetFmtColl*)pArgs;
SwCntntNode* pCNd = (SwCntntNode*)rpNode->GetTxtNode();
@@ -1744,10 +1751,10 @@ BOOL lcl_SetTxtFmtColl( const SwNodePtr& rpNode, void* pArgs )
pPara->nWhich++;
}
- return TRUE;
+ return sal_True;
}
-BOOL SwDoc::SetTxtFmtColl( const SwPaM &rRg,
+sal_Bool SwDoc::SetTxtFmtColl( const SwPaM &rRg,
SwTxtFmtColl *pFmt,
bool bReset,
bool bResetListAttrs )
@@ -1755,16 +1762,15 @@ BOOL SwDoc::SetTxtFmtColl( const SwPaM &rRg,
SwDataChanged aTmp( rRg, 0 );
const SwPosition *pStt = rRg.Start(), *pEnd = rRg.End();
SwHistory* pHst = 0;
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
SwUndoFmtColl* pUndo = new SwUndoFmtColl( rRg, pFmt,
bReset,
bResetListAttrs );
pHst = pUndo->GetHistory();
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
ParaRstFmt aPara( pStt, pEnd, pHst );
@@ -1776,7 +1782,7 @@ BOOL SwDoc::SetTxtFmtColl( const SwPaM &rRg,
GetNodes().ForEach( pStt->nNode.GetIndex(), pEnd->nNode.GetIndex()+1,
lcl_SetTxtFmtColl, &aPara );
if( !aPara.nWhich )
- bRet = FALSE; // keinen gueltigen Node gefunden
+ bRet = sal_False; // keinen gueltigen Node gefunden
if( bRet )
SetModified();
@@ -1793,7 +1799,7 @@ SwFmt* SwDoc::CopyFmt( const SwFmt& rFmt,
// kein-Autoformat || default Format || Collection-Format
// dann suche danach.
if( !rFmt.IsAuto() || !rFmt.GetRegisteredIn() )
- for( USHORT n = 0; n < rFmtArr.Count(); n++ )
+ for( sal_uInt16 n = 0; n < rFmtArr.Count(); n++ )
{
// ist die Vorlage schon im Doc vorhanden ??
if( ((SwFmt*)rFmtArr[n])->GetName().Equals( rFmt.GetName() ))
@@ -1808,9 +1814,9 @@ SwFmt* SwDoc::CopyFmt( const SwFmt& rFmt,
// erzeuge das Format und kopiere die Attribute
// #i40550#
- SwFmt* pNewFmt = (this->*fnCopyFmt)( rFmt.GetName(), pParent, FALSE, TRUE );
+ SwFmt* pNewFmt = (this->*fnCopyFmt)( rFmt.GetName(), pParent, sal_False, sal_True );
pNewFmt->SetAuto( rFmt.IsAuto() );
- pNewFmt->CopyAttrs( rFmt, TRUE ); // kopiere Attribute
+ pNewFmt->CopyAttrs( rFmt, sal_True ); // kopiere Attribute
pNewFmt->SetPoolFmtId( rFmt.GetPoolFmtId() );
pNewFmt->SetPoolHelpId( rFmt.GetPoolHelpId() );
@@ -1859,7 +1865,7 @@ SwTxtFmtColl* SwDoc::CopyTxtColl( const SwTxtFmtColl& rColl )
pNewColl = new SwConditionTxtFmtColl( GetAttrPool(), rColl.GetName(),
pParent);
pTxtFmtCollTbl->Insert( pNewColl, pTxtFmtCollTbl->Count() );
- pNewColl->SetAuto( FALSE );
+ pNewColl->SetAuto( sal_False );
SetModified();
// Kopiere noch die Bedingungen
@@ -1871,7 +1877,7 @@ SwTxtFmtColl* SwDoc::CopyTxtColl( const SwTxtFmtColl& rColl )
pNewColl = MakeTxtFmtColl( rColl.GetName(), pParent );
// kopiere jetzt noch die Auto-Formate oder kopiere die Attribute
- pNewColl->CopyAttrs( rColl, TRUE );
+ pNewColl->CopyAttrs( rColl, sal_True );
if(rColl.IsAssignedToListLevelOfOutlineStyle())
pNewColl->AssignToListLevelOfOutlineStyle(rColl.GetAssignedOutlineStyleLevel());//<-end,zhaojianwei
@@ -1890,7 +1896,7 @@ SwTxtFmtColl* SwDoc::CopyTxtColl( const SwTxtFmtColl& rColl )
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pNewColl->GetItemState( RES_PARATR_NUMRULE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
const SwNumRule* pRule;
const String& rName = ((SwNumRuleItem*)pItem)->GetValue();
@@ -1900,7 +1906,7 @@ SwTxtFmtColl* SwDoc::CopyTxtColl( const SwTxtFmtColl& rColl )
{
SwNumRule* pDestRule = FindNumRulePtr( rName );
if( pDestRule )
- pDestRule->SetInvalidRule( TRUE );
+ pDestRule->SetInvalidRule( sal_True );
else
MakeNumRule( rName, pRule );
}
@@ -1939,7 +1945,7 @@ SwGrfFmtColl* SwDoc::CopyGrfColl( const SwGrfFmtColl& rColl )
SwPageDesc* lcl_FindPageDesc( const SwPageDescs& rArr, const String& rName )
{
- for( USHORT n = rArr.Count(); n; )
+ for( sal_uInt16 n = rArr.Count(); n; )
{
SwPageDesc* pDesc = rArr[ --n ];
if( pDesc->GetName() == rName )
@@ -1953,7 +1959,7 @@ void SwDoc::CopyFmtArr( const SvPtrarr& rSourceArr,
FNCopyFmt fnCopyFmt,
SwFmt& rDfltFmt )
{
- USHORT nSrc;
+ sal_uInt16 nSrc;
SwFmt* pSrc, *pDest;
// 1. Schritt alle Formate anlegen (das 0. ueberspringen - Default!)
@@ -1969,7 +1975,7 @@ void SwDoc::CopyFmtArr( const SvPtrarr& rSourceArr,
MakeCondTxtFmtColl( pSrc->GetName(), (SwTxtFmtColl*)&rDfltFmt );
else
// #i40550#
- (this->*fnCopyFmt)( pSrc->GetName(), &rDfltFmt, FALSE, TRUE );
+ (this->*fnCopyFmt)( pSrc->GetName(), &rDfltFmt, sal_False, sal_True );
}
}
@@ -1981,7 +1987,7 @@ void SwDoc::CopyFmtArr( const SvPtrarr& rSourceArr,
continue;
pDest = FindFmtByName( rDestArr, pSrc->GetName() );
- pDest->SetAuto( FALSE );
+ pDest->SetAuto( sal_False );
//JP 19.02.96: ist so wohl optimaler - loest ggfs. kein Modify aus!
pDest->DelDiffs( *pSrc );
@@ -1989,7 +1995,7 @@ void SwDoc::CopyFmtArr( const SvPtrarr& rSourceArr,
const SfxPoolItem* pItem;
if( &GetAttrPool() != pSrc->GetAttrSet().GetPool() &&
SFX_ITEM_SET == pSrc->GetAttrSet().GetItemState(
- RES_PAGEDESC, FALSE, &pItem ) &&
+ RES_PAGEDESC, sal_False, &pItem ) &&
((SwFmtPageDesc*)pItem)->GetPageDesc() )
{
SwFmtPageDesc aPageDesc( *(SwFmtPageDesc*)pItem );
@@ -2048,9 +2054,9 @@ void SwDoc::CopyPageDescHeaderFooterImpl( bool bCpyHeader,
{
// jetzt noch Header-/Footer-Attribute richtig behandeln
// Contenten Nodes Dokumentuebergreifend kopieren!
- USHORT nAttr = static_cast<USHORT>( bCpyHeader ? RES_HEADER : RES_FOOTER );
+ sal_uInt16 nAttr = static_cast<sal_uInt16>( bCpyHeader ? RES_HEADER : RES_FOOTER );
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET != rSrcFmt.GetAttrSet().GetItemState( nAttr, FALSE, &pItem ))
+ if( SFX_ITEM_SET != rSrcFmt.GetAttrSet().GetItemState( nAttr, sal_False, &pItem ))
return ;
// Im Header steht noch der Verweis auf das Format aus dem
@@ -2067,10 +2073,10 @@ void SwDoc::CopyPageDescHeaderFooterImpl( bool bCpyHeader,
{
SwFrmFmt* pNewFmt = new SwFrmFmt( GetAttrPool(), "CpyDesc",
GetDfltFrmFmt() );
- pNewFmt->CopyAttrs( *pOldFmt, TRUE );
+ pNewFmt->CopyAttrs( *pOldFmt, sal_True );
if( SFX_ITEM_SET == pNewFmt->GetAttrSet().GetItemState(
- RES_CNTNT, FALSE, &pItem ))
+ RES_CNTNT, sal_False, &pItem ))
{
SwFmtCntnt* pCntnt = (SwFmtCntnt*)pItem;
if( pCntnt->GetCntntIdx() )
@@ -2102,16 +2108,16 @@ void SwDoc::CopyPageDescHeaderFooterImpl( bool bCpyHeader,
}
void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc,
- BOOL bCopyPoolIds )
+ sal_Bool bCopyPoolIds )
{
- BOOL bNotifyLayout = FALSE;
+ sal_Bool bNotifyLayout = sal_False;
rDstDesc.SetLandscape( rSrcDesc.GetLandscape() );
rDstDesc.SetNumType( rSrcDesc.GetNumType() );
if( rDstDesc.ReadUseOn() != rSrcDesc.ReadUseOn() )
{
rDstDesc.WriteUseOn( rSrcDesc.ReadUseOn() );
- bNotifyLayout = TRUE;
+ bNotifyLayout = sal_True;
}
if( bCopyPoolIds )
@@ -2129,12 +2135,12 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc,
if( !pFollow )
{
// dann mal kopieren
- USHORT nPos = MakePageDesc( rSrcDesc.GetFollow()->GetName() );
+ sal_uInt16 nPos = MakePageDesc( rSrcDesc.GetFollow()->GetName() );
pFollow = aPageDescs[ nPos ];
CopyPageDesc( *rSrcDesc.GetFollow(), *pFollow );
}
rDstDesc.SetFollow( pFollow );
- bNotifyLayout = TRUE;
+ bNotifyLayout = sal_True;
}
// die Header/Footer-Attribute werden gesondert kopiert, die Content-
@@ -2195,8 +2201,7 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc,
void SwDoc::ReplaceStyles( SwDoc& rSource )
{
- BOOL bIsUndo = DoesUndo();
- DoUndo( FALSE );
+ ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
CopyFmtArr( *rSource.pCharFmtTbl, *pCharFmtTbl,
&SwDoc::_MakeCharFmt, *pDfltCharFmt );
@@ -2206,7 +2211,7 @@ void SwDoc::ReplaceStyles( SwDoc& rSource )
&SwDoc::_MakeTxtFmtColl, *pDfltTxtFmtColl );
// und jetzt noch die Seiten-Vorlagen
- USHORT nCnt = rSource.aPageDescs.Count();
+ sal_uInt16 nCnt = rSource.aPageDescs.Count();
if( nCnt )
{
// ein anderes Doc -> Numberformatter muessen gemergt werden
@@ -2233,7 +2238,7 @@ void SwDoc::ReplaceStyles( SwDoc& rSource )
if( nCnt )
{
const SwNumRuleTbl& rArr = rSource.GetNumRuleTbl();
- for( USHORT n = 0; n < nCnt; ++n )
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
const SwNumRule& rR = *rArr[ n ];
if( !rR.IsAutoRule() )
@@ -2247,22 +2252,20 @@ void SwDoc::ReplaceStyles( SwDoc& rSource )
}
}
- if( bIsUndo )
+ if (undoGuard.UndoWasEnabled())
{
- // es wurde am Nodes-Array gedreht!
- ClearRedo();
- DelAllUndoObj();
+ // nodes array was modified!
+ GetIDocumentUndoRedo().DelAllUndoObj();
}
SetModified();
- DoUndo( bIsUndo );
}
SwFmt* SwDoc::FindFmtByName( const SvPtrarr& rFmtArr,
const String& rName ) const
{
SwFmt* pFnd = 0;
- for( USHORT n = 0; n < rFmtArr.Count(); n++ )
+ for( sal_uInt16 n = 0; n < rFmtArr.Count(); n++ )
{
// ist die Vorlage schon im Doc vorhanden ??
if( ((SwFmt*)rFmtArr[n])->GetName() == rName )
@@ -2274,21 +2277,20 @@ SwFmt* SwDoc::FindFmtByName( const SvPtrarr& rFmtArr,
return pFnd;
}
-void SwDoc::MoveLeftMargin( const SwPaM& rPam, BOOL bRight, BOOL bModulus )
+void SwDoc::MoveLeftMargin( const SwPaM& rPam, sal_Bool bRight, sal_Bool bModulus )
{
SwHistory* pHistory = 0;
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
SwUndoMoveLeftMargin* pUndo = new SwUndoMoveLeftMargin( rPam, bRight,
bModulus );
pHistory = &pUndo->GetHistory();
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
}
const SvxTabStopItem& rTabItem = (SvxTabStopItem&)GetDefault( RES_PARATR_TABSTOP );
- USHORT nDefDist = rTabItem.Count() ?
- static_cast<USHORT>(rTabItem[0].GetTabPos()) : 1134;
+ sal_uInt16 nDefDist = rTabItem.Count() ?
+ static_cast<sal_uInt16>(rTabItem[0].GetTabPos()) : 1134;
const SwPosition &rStt = *rPam.Start(), &rEnd = *rPam.End();
SwNodeIndex aIdx( rStt.nNode );
while( aIdx <= rEnd.nNode )
@@ -2307,7 +2309,7 @@ void SwDoc::MoveLeftMargin( const SwPaM& rPam, BOOL bRight, BOOL bModulus )
const int nListLevel = pTNd->GetActualListLevel();
if ( nListLevel >= 0 )
{
- const SwNumFmt& rFmt = pRule->Get(static_cast<USHORT>(nListLevel));
+ const SwNumFmt& rFmt = pRule->Get(static_cast<sal_uInt16>(nListLevel));
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
aLS.SetTxtLeft( rFmt.GetIndentAt() );
@@ -2336,17 +2338,16 @@ void SwDoc::MoveLeftMargin( const SwPaM& rPam, BOOL bRight, BOOL bModulus )
SetModified();
}
-BOOL SwDoc::DontExpandFmt( const SwPosition& rPos, BOOL bFlag )
+sal_Bool SwDoc::DontExpandFmt( const SwPosition& rPos, sal_Bool bFlag )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
if( pTxtNd )
{
bRet = pTxtNd->DontExpandFmt( rPos.nContent, bFlag );
- if( bRet && DoesUndo() )
+ if( bRet && GetIDocumentUndoRedo().DoesUndo() )
{
- ClearRedo();
- AppendUndo( new SwUndoDontExpandFmt( rPos ));
+ GetIDocumentUndoRedo().AppendUndo( new SwUndoDontExpandFmt(rPos) );
}
}
return bRet;
@@ -2380,7 +2381,7 @@ void SwDoc::_CreateNumberFormatter()
Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
pNumberFormatter = new SvNumberFormatter( xMSF, eLang );
pNumberFormatter->SetEvalDateFormat( NF_EVALDATEFORMAT_FORMAT_INTL );
- pNumberFormatter->SetYear2000(static_cast<USHORT>(::utl::MiscCfg().GetYear2000()));
+ pNumberFormatter->SetYear2000(static_cast<sal_uInt16>(::utl::MiscCfg().GetYear2000()));
}
@@ -2389,8 +2390,8 @@ SwTblNumFmtMerge::SwTblNumFmtMerge( const SwDoc& rSrc, SwDoc& rDest )
{
// ein anderes Doc -> Numberformatter muessen gemergt werden
SvNumberFormatter* pN;
- if( &rSrc != &rDest && 0 != ( pN = ((SwDoc&)rSrc).GetNumberFormatter( FALSE ) ))
- ( pNFmt = rDest.GetNumberFormatter( TRUE ))->MergeFormatter( *pN );
+ if( &rSrc != &rDest && 0 != ( pN = ((SwDoc&)rSrc).GetNumberFormatter( sal_False ) ))
+ ( pNFmt = rDest.GetNumberFormatter( sal_True ))->MergeFormatter( *pN );
if( &rSrc != &rDest )
((SwGetRefFieldType*)rSrc.GetSysFldType( RES_GETREFFLD ))->
@@ -2404,7 +2405,7 @@ SwTblNumFmtMerge::~SwTblNumFmtMerge()
}
-void SwDoc::SetTxtFmtCollByAutoFmt( const SwPosition& rPos, USHORT nPoolId,
+void SwDoc::SetTxtFmtCollByAutoFmt( const SwPosition& rPos, sal_uInt16 nPoolId,
const SfxItemSet* pSet )
{
SwPaM aPam( rPos );
@@ -2428,7 +2429,7 @@ void SwDoc::SetTxtFmtCollByAutoFmt( const SwPosition& rPos, USHORT nPoolId,
// das Adjust Item behalten wir extra
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pTNd->GetpSwAttrSet()->GetItemState(
- RES_PARATR_ADJUST, FALSE, &pItem ))
+ RES_PARATR_ADJUST, sal_False, &pItem ))
aTmp.Put( *pItem );
aExtraData.SetItemSet( aTmp );
}
@@ -2479,7 +2480,7 @@ void SwDoc::SetFmtItemByAutoFmt( const SwPaM& rPam, const SfxItemSet& rSet )
void SwDoc::ChgFmt(SwFmt & rFmt, const SfxItemSet & rSet)
{
- if (DoesUndo())
+ if (GetIDocumentUndoRedo().DoesUndo())
{
// copying <rSet> to <aSet>
SfxItemSet aSet(rSet);
@@ -2507,18 +2508,18 @@ void SwDoc::ChgFmt(SwFmt & rFmt, const SfxItemSet & rSet)
SwUndo * pUndo = new SwUndoFmtAttr(aOldSet, rFmt);
- AppendUndo(pUndo);
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
rFmt.SetFmtAttr(rSet);
}
void SwDoc::RenameFmt(SwFmt & rFmt, const String & sNewName,
- BOOL bBroadcast)
+ sal_Bool bBroadcast)
{
SfxStyleFamily eFamily = SFX_STYLE_FAMILY_ALL;
- if (DoesUndo())
+ if (GetIDocumentUndoRedo().DoesUndo())
{
SwUndo * pUndo = NULL;
@@ -2542,7 +2543,9 @@ void SwDoc::RenameFmt(SwFmt & rFmt, const String & sNewName,
}
if (pUndo)
- AppendUndo(pUndo);
+ {
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
+ }
}
rFmt.SetName(sNewName);
@@ -2566,8 +2569,8 @@ namespace docfunc
const SwTxtFmtColls* pTxtFmtColls( rDoc.GetTxtFmtColls() );
if ( pTxtFmtColls )
{
- const USHORT nCount = pTxtFmtColls->Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ const sal_uInt16 nCount = pTxtFmtColls->Count();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
SwTxtFmtColl* pTxtFmtColl = (*pTxtFmtColls)[i];
diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx
index 6ce4d432dd27..6f5d0f509f52 100644
--- a/sw/source/core/doc/docftn.cxx
+++ b/sw/source/core/doc/docftn.cxx
@@ -37,9 +37,11 @@
#include <pam.hxx>
#include <pagedesc.hxx>
#include <charfmt.hxx>
-#include <undobj.hxx>
+#include <UndoAttribute.hxx>
+#include <hints.hxx>
#include <rolbck.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <ndtxt.hxx>
#include <poolfmt.hxx>
#include <ftninfo.hxx>
@@ -79,7 +81,7 @@ SwEndNoteInfo& SwEndNoteInfo::operator=(const SwEndNoteInfo& rInfo)
}
-BOOL SwEndNoteInfo::operator==( const SwEndNoteInfo& rInfo ) const
+sal_Bool SwEndNoteInfo::operator==( const SwEndNoteInfo& rInfo ) const
{
return aPageDescDep.GetRegisteredIn() ==
rInfo.aPageDescDep.GetRegisteredIn() &&
@@ -186,7 +188,7 @@ void SwEndNoteInfo::SetAnchorCharFmt( SwCharFmt* pChFmt )
void SwEndNoteInfo::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
- USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
if( RES_ATTRSET_CHG == nWhich ||
RES_FMT_CHG == nWhich )
@@ -197,7 +199,7 @@ void SwEndNoteInfo::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
else
pDoc = ((SwCharFmt*)aAnchorCharFmtDep.GetRegisteredIn())->GetDoc();
SwFtnIdxs& rFtnIdxs = pDoc->GetFtnIdxs();
- for( USHORT nPos = 0; nPos < rFtnIdxs.Count(); ++nPos )
+ for( sal_uInt16 nPos = 0; nPos < rFtnIdxs.Count(); ++nPos )
{
SwTxtFtn *pTxtFtn = rFtnIdxs[ nPos ];
const SwFmtFtn &rFtn = pTxtFtn->GetFtn();
@@ -222,7 +224,7 @@ SwFtnInfo& SwFtnInfo::operator=(const SwFtnInfo& rInfo)
}
-BOOL SwFtnInfo::operator==( const SwFtnInfo& rInfo ) const
+sal_Bool SwFtnInfo::operator==( const SwFtnInfo& rInfo ) const
{
return ePos == rInfo.ePos &&
eNum == rInfo.eNum &&
@@ -260,23 +262,22 @@ void SwDoc::SetFtnInfo(const SwFtnInfo& rInfo)
{
const SwFtnInfo &rOld = GetFtnInfo();
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoFootNoteInfo( rOld ) );
+ GetIDocumentUndoRedo().AppendUndo( new SwUndoFootNoteInfo(rOld) );
}
- BOOL bFtnPos = rInfo.ePos != rOld.ePos;
- BOOL bFtnDesc = rOld.ePos == FTNPOS_CHAPTER &&
+ sal_Bool bFtnPos = rInfo.ePos != rOld.ePos;
+ sal_Bool bFtnDesc = rOld.ePos == FTNPOS_CHAPTER &&
rInfo.GetPageDesc( *this ) != rOld.GetPageDesc( *this );
- BOOL bExtra = rInfo.aQuoVadis != rOld.aQuoVadis ||
+ sal_Bool bExtra = rInfo.aQuoVadis != rOld.aQuoVadis ||
rInfo.aErgoSum != rOld.aErgoSum ||
rInfo.aFmt.GetNumberingType() != rOld.aFmt.GetNumberingType() ||
rInfo.GetPrefix() != rOld.GetPrefix() ||
rInfo.GetSuffix() != rOld.GetSuffix();
SwCharFmt *pOldChrFmt = rOld.GetCharFmt( *this ),
*pNewChrFmt = rInfo.GetCharFmt( *this );
- BOOL bFtnChrFmts = pOldChrFmt != pNewChrFmt;
+ sal_Bool bFtnChrFmts = pOldChrFmt != pNewChrFmt;
*pFtnInfo = rInfo;
@@ -288,13 +289,13 @@ void SwDoc::SetFtnInfo(const SwFtnInfo& rInfo)
{
GetRootFrm()->UpdateFtnNums();
if ( bFtnDesc )
- GetRootFrm()->CheckFtnPageDescs( FALSE );
+ GetRootFrm()->CheckFtnPageDescs( sal_False );
if ( bExtra )
{
//Fuer die Benachrichtung bezueglich ErgoSum usw. sparen wir uns
//extra-Code und nutzen die vorhandenen Wege.
SwFtnIdxs& rFtnIdxs = GetFtnIdxs();
- for( USHORT nPos = 0; nPos < rFtnIdxs.Count(); ++nPos )
+ for( sal_uInt16 nPos = 0; nPos < rFtnIdxs.Count(); ++nPos )
{
SwTxtFtn *pTxtFtn = rFtnIdxs[ nPos ];
const SwFmtFtn &rFtn = pTxtFtn->GetFtn();
@@ -326,13 +327,13 @@ void SwDoc::SetEndNoteInfo(const SwEndNoteInfo& rInfo)
{
if( !(GetEndNoteInfo() == rInfo) )
{
- if( DoesUndo() )
+ if(GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoEndNoteInfo( GetEndNoteInfo() ) );
+ SwUndo *const pUndo( new SwUndoEndNoteInfo( GetEndNoteInfo() ) );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
- BOOL bNumChg = rInfo.nFtnOffset != GetEndNoteInfo().nFtnOffset;
+ sal_Bool bNumChg = rInfo.nFtnOffset != GetEndNoteInfo().nFtnOffset;
// this seems to be an optimization: UpdateAllFtn() is only called
// if the offset changes; if the offset is the same,
// but type/prefix/suffix changes, just set new numbers.
@@ -342,24 +343,24 @@ void SwDoc::SetEndNoteInfo(const SwEndNoteInfo& rInfo)
|| (rInfo.GetPrefix() != GetEndNoteInfo().GetPrefix())
|| (rInfo.GetSuffix() != GetEndNoteInfo().GetSuffix())
);
- BOOL bFtnDesc = rInfo.GetPageDesc( *this ) !=
+ sal_Bool bFtnDesc = rInfo.GetPageDesc( *this ) !=
GetEndNoteInfo().GetPageDesc( *this );
SwCharFmt *pOldChrFmt = GetEndNoteInfo().GetCharFmt( *this ),
*pNewChrFmt = rInfo.GetCharFmt( *this );
- BOOL bFtnChrFmts = pOldChrFmt != pNewChrFmt;
+ sal_Bool bFtnChrFmts = pOldChrFmt != pNewChrFmt;
*pEndNoteInfo = rInfo;
if ( GetRootFrm() )
{
if ( bFtnDesc )
- GetRootFrm()->CheckFtnPageDescs( TRUE );
+ GetRootFrm()->CheckFtnPageDescs( sal_True );
if ( bExtra )
{
//Fuer die Benachrichtung bezueglich ErgoSum usw. sparen wir uns
//extra-Code und nutzen die vorhandenen Wege.
SwFtnIdxs& rFtnIdxs = GetFtnIdxs();
- for( USHORT nPos = 0; nPos < rFtnIdxs.Count(); ++nPos )
+ for( sal_uInt16 nPos = 0; nPos < rFtnIdxs.Count(); ++nPos )
{
SwTxtFtn *pTxtFtn = rFtnIdxs[ nPos ];
const SwFmtFtn &rFtn = pTxtFtn->GetFtn();
@@ -393,26 +394,26 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr,
SwFtnIdxs& rFtnArr = GetFtnIdxs();
const SwPosition* pStt = rPam.Start(), *pEnd = rPam.End();
- const ULONG nSttNd = pStt->nNode.GetIndex();
+ const sal_uLong nSttNd = pStt->nNode.GetIndex();
const xub_StrLen nSttCnt = pStt->nContent.GetIndex();
- const ULONG nEndNd = pEnd->nNode.GetIndex();
+ const sal_uLong nEndNd = pEnd->nNode.GetIndex();
const xub_StrLen nEndCnt = pEnd->nContent.GetIndex();
- USHORT nPos;
+ sal_uInt16 nPos;
rFtnArr.SeekEntry( pStt->nNode, &nPos );
SwUndoChangeFootNote* pUndo = 0;
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
+ GetIDocumentUndoRedo().ClearRedo(); // AppendUndo far below, so leave it
pUndo = new SwUndoChangeFootNote( rPam, rNumStr, nNumber, bIsEndNote );
}
SwTxtFtn* pTxtFtn;
- ULONG nIdx;
- BOOL bChg = FALSE;
- BOOL bTypeChgd = FALSE;
- USHORT n = nPos; // sichern
+ sal_uLong nIdx;
+ sal_Bool bChg = sal_False;
+ sal_Bool bTypeChgd = sal_False;
+ sal_uInt16 n = nPos; // sichern
while( nPos < rFtnArr.Count() &&
(( nIdx = _SwTxtFtn_GetIndex((pTxtFtn = rFtnArr[ nPos++ ] )))
< nEndNd || ( nIdx == nEndNd &&
@@ -424,7 +425,7 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr,
if( rFtn.GetNumStr() != rNumStr ||
rFtn.IsEndNote() != bIsEndNote )
{
- bChg = TRUE;
+ bChg = sal_True;
if ( pUndo )
{
pUndo->GetHistory().Add( *pTxtFtn );
@@ -434,7 +435,7 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr,
if( rFtn.IsEndNote() != bIsEndNote )
{
((SwFmtFtn&)rFtn).SetEndNote( bIsEndNote );
- bTypeChgd = TRUE;
+ bTypeChgd = sal_True;
pTxtFtn->CheckCondColl();
//#i11339# dispose UNO wrapper when a footnote is changed to an endnote or vice versa
SwPtrMsgPoolItem aMsgHint( RES_FOOTNOTE_DELETED, (void*)&pTxtFtn->GetAttr() );
@@ -455,7 +456,7 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr,
if( rFtn.GetNumStr() != rNumStr ||
rFtn.IsEndNote() != bIsEndNote )
{
- bChg = TRUE;
+ bChg = sal_True;
if ( pUndo )
{
pUndo->GetHistory().Add( *pTxtFtn );
@@ -465,7 +466,7 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr,
if( rFtn.IsEndNote() != bIsEndNote )
{
((SwFmtFtn&)rFtn).SetEndNote( bIsEndNote );
- bTypeChgd = TRUE;
+ bTypeChgd = sal_True;
pTxtFtn->CheckCondColl();
}
}
@@ -476,8 +477,7 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr,
{
if( pUndo )
{
- ClearRedo();
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
if ( bTypeChgd )
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index 6decd1908fbb..cc881ca8cd45 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -44,6 +44,7 @@
#include <fmtinfmt.hxx>
#include <fmtanchr.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docary.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
@@ -67,30 +68,30 @@ enum SwSplitDocType
SPLITDOC_TO_HTML
};
-BOOL SwDoc::GenerateGlobalDoc( const String& rPath,
+sal_Bool SwDoc::GenerateGlobalDoc( const String& rPath,
const SwTxtFmtColl* pSplitColl )
{
return SplitDoc( SPLITDOC_TO_GLOBALDOC, rPath, pSplitColl );
}
//#outline level,add by zhaojianwei
-BOOL SwDoc::GenerateGlobalDoc( const String& rPath, int nOutlineLevel )
+sal_Bool SwDoc::GenerateGlobalDoc( const String& rPath, int nOutlineLevel )
{
return SplitDoc( SPLITDOC_TO_GLOBALDOC, rPath, nOutlineLevel );
}
-BOOL SwDoc::GenerateHTMLDoc( const String& rPath, int nOutlineLevel )
+sal_Bool SwDoc::GenerateHTMLDoc( const String& rPath, int nOutlineLevel )
{
return SplitDoc( SPLITDOC_TO_HTML, rPath, nOutlineLevel );
}
//<-end,zhaojianwei
-BOOL SwDoc::GenerateHTMLDoc( const String& rPath,
+sal_Bool SwDoc::GenerateHTMLDoc( const String& rPath,
const SwTxtFmtColl* pSplitColl )
{
return SplitDoc( SPLITDOC_TO_HTML, rPath, pSplitColl );
}
-BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
+sal_Bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath,
const SwTxtFmtColl* pSplitColl )
{
// ueber alle Node der Vorlage Iterieren und dafuer einzelne
@@ -101,9 +102,9 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
// Am Ende wird dieses Doc als GlobalDoc/HTML-Doc gespreichert.
if( !pDocShell || !pDocShell->GetMedium() ||
( SPLITDOC_TO_GLOBALDOC == eDocType && get(IDocumentSettingAccess::GLOBAL_DOCUMENT) ) )
- return FALSE;
+ return sal_False;
- USHORT nOutl = 0;
+ sal_uInt16 nOutl = 0;
SwOutlineNodes* pOutlNds = (SwOutlineNodes*)&GetNodes().GetOutLineNds();
SwNodePtr pSttNd;
@@ -123,7 +124,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
if( !pOutlNds->Count() )
{
delete pOutlNds;
- return FALSE;
+ return sal_False;
}
}
}
@@ -131,7 +132,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
{
// dann suche die Gliederungs - Vorlage, der 1. Ebene
const SwTxtFmtColls& rFmtColls =*GetTxtFmtColls();
- for( USHORT n = rFmtColls.Count(); n; )
+ for( sal_uInt16 n = rFmtColls.Count(); n; )
if ( rFmtColls[ --n ]->GetAttrOutlineLevel() == 1 )//<-end,zhaojianwei
{
pSplitColl = rFmtColls[ n ];
@@ -139,7 +140,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
}
if( !pSplitColl )
- return FALSE;
+ return sal_False;
}
const SfxFilter* pFilter;
@@ -158,10 +159,10 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
}
if( !pFilter )
- return FALSE;
+ return sal_False;
// Undo/Redline aufjedenfall abschalten
- DoUndo( FALSE );
+ GetIDocumentUndoRedo().DoUndo(false);
SetRedlineMode_intern( (RedlineMode_t)(GetRedlineMode() & ~nsRedlineMode_t::REDLINE_ON));
String sExt( pFilter->GetSuffixes().GetToken(0, ',') );
@@ -229,7 +230,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
String sFileName;
if( pSttNd->GetIndex() + 1 < aEndIdx.GetIndex() )
{
- SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
+ SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
if( xDocSh->DoInitNew( 0 ) )
{
SwDoc* pDoc = ((SwDocShell*)(&xDocSh))->GetDoc();
@@ -266,7 +267,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
SwNodeRange aRg( *pSttNd, 0, aEndIdx.GetNode() );
SwNodeIndex aTmpIdx( pDoc->GetNodes().GetEndOfContent() );
- GetNodes()._Copy( aRg, aTmpIdx, FALSE );
+ GetNodes()._Copy( aRg, aTmpIdx, sal_False );
// den initialen TextNode loeschen
SwNodeIndex aIdx( pDoc->GetNodes().GetEndOfExtras(), 2 );
@@ -284,7 +285,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
utl::TempFile aTempFile2(sLeading,&sExt,&sPath );
sFileName = aTempFile2.GetURL();
SfxMedium* pTmpMed = new SfxMedium( sFileName,
- STREAM_STD_READWRITE, TRUE );
+ STREAM_STD_READWRITE, sal_True );
pTmpMed->SetFilter( pFilter );
// fuer den HTML-Filter mussen wir aber ein Layout
@@ -315,7 +316,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
{
// loesche alle Nodes im Bereich und setze im "Start-
// Node" den Link auf das gespeicherte Doc
- ULONG nNodeDiff = aEndIdx.GetIndex() -
+ sal_uLong nNodeDiff = aEndIdx.GetIndex() -
pSttNd->GetIndex() - 1;
if( nNodeDiff )
{
@@ -332,14 +333,14 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
aTmp.Exchange();
if( !aTmp.Move( fnMoveBackward, fnGoNode ))
{
- OSL_ENSURE( FALSE, "kein Node mehr vorhanden" );
+ OSL_ENSURE( sal_False, "kein Node mehr vorhanden" );
}
}
// Bookmarks usw. verschieben
- CorrAbs( aSIdx, aEIdx, *aTmp.GetPoint(), TRUE);
+ CorrAbs( aSIdx, aEIdx, *aTmp.GetPoint(), sal_True);
// stehen noch FlyFrames rum, loesche auch diese
- for( USHORT n = 0; n < GetSpzFrmFmts()->Count(); ++n )
+ for( sal_uInt16 n = 0; n < GetSpzFrmFmts()->Count(); ++n )
{
SwFrmFmt* pFly = (*GetSpzFrmFmts())[n];
const SwFmtAnchor* pAnchor = &pFly->GetAnchor();
@@ -396,7 +397,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
if( pSectNd->GetIndex() + 1 ==
pSttNd->GetIndex() )
{
- BOOL bMvIdx = aEndIdx == *pSectEnd;
+ sal_Bool bMvIdx = aEndIdx == *pSectEnd;
DelSectionFmt( pSectNd->GetSection().GetFmt() );
if( bMvIdx )
aEndIdx--;
@@ -485,13 +486,13 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
}
//#outline level,add by zhaojianwei
-BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
+sal_Bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath, int nOutlineLevel )
{
if( !pDocShell || !pDocShell->GetMedium() ||
( SPLITDOC_TO_GLOBALDOC == eDocType && get(IDocumentSettingAccess::GLOBAL_DOCUMENT) ) )
- return FALSE;
+ return sal_False;
- USHORT nOutl = 0;
+ sal_uInt16 nOutl = 0;
SwOutlineNodes* pOutlNds = (SwOutlineNodes*)&GetNodes().GetOutLineNds();
SwNodePtr pSttNd;
@@ -511,10 +512,10 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
}
if( !pFilter )
- return FALSE;
+ return sal_False;
// Undo/Redline aufjedenfall abschalten
- DoUndo( FALSE );
+ GetIDocumentUndoRedo().DoUndo(false);
SetRedlineMode_intern( (RedlineMode_t)(GetRedlineMode() & ~nsRedlineMode_t::REDLINE_ON));
String sExt( pFilter->GetSuffixes().GetToken(0, ',') );
@@ -577,7 +578,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
String sFileName;
if( pSttNd->GetIndex() + 1 < aEndIdx.GetIndex() )
{
- SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
+ SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
if( xDocSh->DoInitNew( 0 ) )
{
SwDoc* pDoc = ((SwDocShell*)(&xDocSh))->GetDoc();
@@ -614,7 +615,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
SwNodeRange aRg( *pSttNd, 0, aEndIdx.GetNode() );
SwNodeIndex aTmpIdx( pDoc->GetNodes().GetEndOfContent() );
- GetNodes()._Copy( aRg, aTmpIdx, FALSE );
+ GetNodes()._Copy( aRg, aTmpIdx, sal_False );
// den initialen TextNode loeschen
SwNodeIndex aIdx( pDoc->GetNodes().GetEndOfExtras(), 2 );
@@ -632,7 +633,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
utl::TempFile aTempFile2(sLeading,&sExt,&sPath );
sFileName = aTempFile2.GetURL();
SfxMedium* pTmpMed = new SfxMedium( sFileName,
- STREAM_STD_READWRITE, TRUE );
+ STREAM_STD_READWRITE, sal_True );
pTmpMed->SetFilter( pFilter );
// fuer den HTML-Filter mussen wir aber ein Layout
@@ -662,7 +663,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
{
// loesche alle Nodes im Bereich und setze im "Start-
// Node" den Link auf das gespeicherte Doc
- ULONG nNodeDiff = aEndIdx.GetIndex() -
+ sal_uLong nNodeDiff = aEndIdx.GetIndex() -
pSttNd->GetIndex() - 1;
if( nNodeDiff )
{
@@ -679,14 +680,14 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
aTmp.Exchange();
if( !aTmp.Move( fnMoveBackward, fnGoNode ))
{
- OSL_ENSURE( FALSE, "kein Node mehr vorhanden" );
+ OSL_ENSURE( sal_False, "kein Node mehr vorhanden" );
}
}
// Bookmarks usw. verschieben
- CorrAbs( aSIdx, aEIdx, *aTmp.GetPoint(), TRUE);
+ CorrAbs( aSIdx, aEIdx, *aTmp.GetPoint(), sal_True);
// stehen noch FlyFrames rum, loesche auch diese
- for( USHORT n = 0; n < GetSpzFrmFmts()->Count(); ++n )
+ for( sal_uInt16 n = 0; n < GetSpzFrmFmts()->Count(); ++n )
{
SwFrmFmt* pFly = (*GetSpzFrmFmts())[n];
const SwFmtAnchor* pAnchor = &pFly->GetAnchor();
@@ -743,7 +744,7 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
if( pSectNd->GetIndex() + 1 ==
pSttNd->GetIndex() )
{
- BOOL bMvIdx = aEndIdx == *pSectEnd;
+ sal_Bool bMvIdx = aEndIdx == *pSectEnd;
DelSectionFmt( pSectNd->GetSection().GetFmt() );
if( bMvIdx )
aEndIdx--;
diff --git a/sw/source/core/doc/docglos.cxx b/sw/source/core/doc/docglos.cxx
index 3b4df9098392..350bde67062c 100644
--- a/sw/source/core/doc/docglos.cxx
+++ b/sw/source/core/doc/docglos.cxx
@@ -29,8 +29,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <com/sun/star/document/XDocumentProperties.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <shellio.hxx>
#include <pam.hxx>
#include <swundo.hxx>
@@ -39,11 +44,6 @@
#include <crsrsh.hxx>
#include <docsh.hxx>
-#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
-#include <com/sun/star/document/XDocumentProperties.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/beans/XPropertySetInfo.hpp>
-
using namespace ::com::sun::star;
@@ -109,14 +109,14 @@ static void lcl_copyDocumentProperties(
/* --------------------------------------------------
Description: inserts an AutoText block
--------------------------------------------------*/
-BOOL SwDoc::InsertGlossary( SwTextBlocks& rBlock, const String& rEntry,
+sal_Bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const String& rEntry,
SwPaM& rPaM, SwCrsrShell* pShell )
{
- BOOL bRet = FALSE;
- USHORT nIdx = rBlock.GetIndex( rEntry );
- if( (USHORT) -1 != nIdx )
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nIdx = rBlock.GetIndex( rEntry );
+ if( (sal_uInt16) -1 != nIdx )
{
- BOOL bSav_IsInsGlossary = mbInsOnlyTxtGlssry;
+ sal_Bool bSav_IsInsGlossary = mbInsOnlyTxtGlssry;
mbInsOnlyTxtGlssry = rBlock.IsOnlyTextBlock( nIdx );
if( rBlock.BeginGetDoc( nIdx ) )
@@ -159,7 +159,7 @@ BOOL SwDoc::InsertGlossary( SwTextBlocks& rBlock, const String& rEntry,
pCntntNd = aCpyPam.GetCntntNode();
aCpyPam.GetPoint()->nContent.Assign( pCntntNd, pCntntNd->Len() );
- StartUndo( UNDO_INSGLOSSARY, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_INSGLOSSARY, NULL );
SwPaM *_pStartCrsr = &rPaM, *__pStartCrsr = _pStartCrsr;
do {
@@ -186,12 +186,12 @@ BOOL SwDoc::InsertGlossary( SwTextBlocks& rBlock, const String& rEntry,
pShell->SaveTblBoxCntnt( &rInsPos );
} while( (_pStartCrsr=(SwPaM *)_pStartCrsr->GetNext()) !=
__pStartCrsr );
- EndUndo( UNDO_INSGLOSSARY, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_INSGLOSSARY, NULL );
UnlockExpFlds();
if( !IsExpFldsLocked() )
UpdateExpFlds(NULL, true);
- bRet = TRUE;
+ bRet = sal_True;
}
mbInsOnlyTxtGlssry = bSav_IsInsGlossary;
}
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 2dbd5ccbfbed..631225ded54d 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -74,6 +74,7 @@
#include <ndnotxt.hxx>
#include <ndole.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <rootfrm.hxx>
#include <pagefrm.hxx>
#include <cntfrm.hxx>
@@ -84,7 +85,7 @@
#include <dcontact.hxx>
#include <swundo.hxx>
#include <flypos.hxx>
-#include <undobj.hxx>
+#include <UndoInsert.hxx>
#include <expfld.hxx> // InsertLabel
#include <poolfmt.hxx> // PoolVorlagen-Id's
#include <docary.hxx>
@@ -111,7 +112,7 @@ using ::rtl::OUString;
#define DEF_FLY_WIDTH 2268 //Defaultbreite fuer FlyFrms (2268 == 4cm)
-static bool lcl_IsItemSet(const SwCntntNode & rNode, USHORT which)
+static bool lcl_IsItemSet(const SwCntntNode & rNode, sal_uInt16 which)
{
bool bResult = false;
@@ -189,10 +190,10 @@ SwFrmFmt *SwDoc::MakeLayoutFmt( RndStdIds eRequest, const SfxItemSet* pSet )
if( pSet ) // noch ein paar Attribute setzen ?
pFmt->SetFmtAttr( *pSet );
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoInsLayFmt( pFmt,0,0 ));
+ GetIDocumentUndoRedo().AppendUndo(
+ new SwUndoInsLayFmt(pFmt, 0, 0));
}
}
break;
@@ -243,7 +244,7 @@ void SwDoc::DelLayoutFmt( SwFrmFmt *pFmt )
}
const SwNodeIndex* pCntIdx = pFmt->GetCntnt().GetCntntIdx();
- if( pCntIdx && !DoesUndo() )
+ if (pCntIdx && !GetIDocumentUndoRedo().DoesUndo())
{
//Verbindung abbauen, falls es sich um ein OLE-Objekt handelt.
SwOLENode* pOLENd = GetNodes()[ pCntIdx->GetIndex()+1 ]->GetOLENode();
@@ -272,11 +273,10 @@ void SwDoc::DelLayoutFmt( SwFrmFmt *pFmt )
// erstmal sind nur Fly's Undofaehig
const sal_uInt16 nWh = pFmt->Which();
- if( DoesUndo() && (RES_FLYFRMFMT == nWh || RES_DRAWFRMFMT == nWh) )
+ if (GetIDocumentUndoRedo().DoesUndo() &&
+ (RES_FLYFRMFMT == nWh || RES_DRAWFRMFMT == nWh))
{
- // erstmal werden alle Undo - Objecte geloescht.
- ClearRedo();
- AppendUndo( new SwUndoDelLayFmt( pFmt ));
+ GetIDocumentUndoRedo().AppendUndo( new SwUndoDelLayFmt( pFmt ));
}
else
{
@@ -291,9 +291,9 @@ void SwDoc::DelLayoutFmt( SwFrmFmt *pFmt )
if ( pTbl )
{
std::vector<SwFrmFmt*> aToDeleteFrmFmts;
- const ULONG nNodeIdxOfFlyFmt( pCntntIdx->GetIndex() );
+ const sal_uLong nNodeIdxOfFlyFmt( pCntntIdx->GetIndex() );
- for ( USHORT i = 0; i < pTbl->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pTbl->Count(); ++i )
{
SwFrmFmt* pTmpFmt = (*pTbl)[i];
const SwFmtAnchor &rAnch = pTmpFmt->GetAnchor();
@@ -467,10 +467,9 @@ SwFrmFmt *SwDoc::CopyLayoutFmt( const SwFrmFmt& rSource,
}
}
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoInsLayFmt( pDest,0,0 ));
+ GetIDocumentUndoRedo().AppendUndo(new SwUndoInsLayFmt(pDest,0,0));
}
// sorge dafuer das auch Fly's in Fly's kopiert werden
@@ -508,10 +507,9 @@ SwFrmFmt *SwDoc::CopyLayoutFmt( const SwFrmFmt& rSource,
else
pDest->SetFmtAttr( rNewAnchor );
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoInsLayFmt( pDest,0,0 ));
+ GetIDocumentUndoRedo().AppendUndo(new SwUndoInsLayFmt(pDest,0,0));
}
}
@@ -699,12 +697,12 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos,
if( GetRootFrm() )
pFmt->MakeFrms(); // ???
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- ULONG nNodeIdx = rAnchPos.nNode.GetIndex();
+ sal_uLong nNodeIdx = rAnchPos.nNode.GetIndex();
xub_StrLen nCntIdx = rAnchPos.nContent.GetIndex();
- AppendUndo( new SwUndoInsLayFmt( pFmt, nNodeIdx, nCntIdx ));
+ GetIDocumentUndoRedo().AppendUndo(
+ new SwUndoInsLayFmt( pFmt, nNodeIdx, nCntIdx ));
}
SetModified();
@@ -714,7 +712,7 @@ SwFlyFrmFmt* SwDoc::_MakeFlySection( const SwPosition& rAnchPos,
SwFlyFrmFmt* SwDoc::MakeFlySection( RndStdIds eAnchorType,
const SwPosition* pAnchorPos,
const SfxItemSet* pFlySet,
- SwFrmFmt* pFrmFmt, BOOL bCalledFromShell )
+ SwFrmFmt* pFrmFmt, sal_Bool bCalledFromShell )
{
SwFlyFrmFmt* pFmt = 0;
sal_Bool bCallMake = sal_True;
@@ -758,7 +756,7 @@ SwFlyFrmFmt* SwDoc::MakeFlySection( RndStdIds eAnchorType,
if (bCalledFromShell && !lcl_IsItemSet(*pNewTxtNd, RES_PARATR_ADJUST) &&
SFX_ITEM_SET == pAnchorNode->GetSwAttrSet().
- GetItemState(RES_PARATR_ADJUST, TRUE, &pItem))
+ GetItemState(RES_PARATR_ADJUST, sal_True, &pItem))
static_cast<SwCntntNode *>(pNewTxtNd)->SetAttr(*pItem);
pFmt = _MakeFlySection( *pAnchorPos, *pNewTxtNd,
@@ -773,7 +771,7 @@ SwFlyFrmFmt* SwDoc::MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet,
{
SwFmtAnchor& rAnch = (SwFmtAnchor&)rSet.Get( RES_ANCHOR );
- StartUndo( UNDO_INSLAYFMT, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_INSLAYFMT, NULL );
SwFlyFrmFmt* pFmt = MakeFlySection( rAnch.GetAnchorId(), rPam.GetPoint(),
&rSet, pParent );
@@ -830,7 +828,7 @@ SwFlyFrmFmt* SwDoc::MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet,
rTbl.MakeCopy( this, aPos, *pSelBoxes );
// Don't delete a part of a table with row span!!
// You could delete the content instead -> ToDo
- //rTbl.DeleteSel( this, *pSelBoxes, 0, 0, TRUE, TRUE );
+ //rTbl.DeleteSel( this, *pSelBoxes, 0, 0, sal_True, sal_True );
}
// wenn Tabelle im Rahmen, dann ohne nachfolgenden TextNode
@@ -841,17 +839,21 @@ SwFlyFrmFmt* SwDoc::MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet,
GetNodes().Delete( aIndex, 1 );
//JP erstmal ein Hack, solange keine Flys/Headers/Footers Undofaehig sind
-if( DoesUndo() ) // werden erstmal alle Undo - Objecte geloescht.
- DelAllUndoObj();
+// werden erstmal alle Undo - Objecte geloescht.
+if( GetIDocumentUndoRedo().DoesUndo() )
+{
+ GetIDocumentUndoRedo().DelAllUndoObj();
+}
}
else
{
// copy all Pams and then delete all
SwPaM* pTmp = (SwPaM*)&rPam;
- BOOL bOldFlag = mbCopyIsMove, bOldUndo = mbUndo;
- mbCopyIsMove = TRUE;
- mbUndo = FALSE;
+ sal_Bool bOldFlag = mbCopyIsMove;
+ bool const bOldUndo = GetIDocumentUndoRedo().DoesUndo();
+ mbCopyIsMove = sal_True;
+ GetIDocumentUndoRedo().DoUndo(false);
do {
if( pTmp->HasMark() &&
*pTmp->GetPoint() != *pTmp->GetMark() )
@@ -861,7 +863,7 @@ if( DoesUndo() ) // werden erstmal alle Undo - Objecte geloescht.
pTmp = static_cast<SwPaM*>(pTmp->GetNext());
} while ( &rPam != pTmp );
mbCopyIsMove = bOldFlag;
- mbUndo = bOldUndo;
+ GetIDocumentUndoRedo().DoUndo(bOldUndo);
pTmp = (SwPaM*)&rPam;
do {
@@ -878,7 +880,7 @@ if( DoesUndo() ) // werden erstmal alle Undo - Objecte geloescht.
SetModified();
- EndUndo( UNDO_INSLAYFMT, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_INSLAYFMT, NULL );
return pFmt;
}
@@ -975,10 +977,9 @@ SwDrawFrmFmt* SwDoc::Insert( const SwPaM &rRg,
}
}
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoInsLayFmt( pFmt,0,0 ));
+ GetIDocumentUndoRedo().AppendUndo( new SwUndoInsLayFmt(pFmt, 0, 0) );
}
SetModified();
@@ -994,7 +995,7 @@ SwDrawFrmFmt* SwDoc::Insert( const SwPaM &rRg,
sal_Bool TstFlyRange( const SwPaM* pPam, const SwPosition* pFlyPos,
RndStdIds nAnchorId )
{
- sal_Bool bOk = FALSE;
+ sal_Bool bOk = sal_False;
const SwPaM* pTmp = pPam;
do {
const sal_uInt32 nFlyIndex = pFlyPos->nNode.GetIndex();
@@ -1158,31 +1159,27 @@ void lcl_CpyAttr( SfxItemSet &rNewSet, const SfxItemSet &rOldSet, sal_uInt16 nWh
}
-SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator,
+static SwFlyFrmFmt *
+lcl_InsertLabel(SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
+ SwUndoInsertLabel *const pUndo,
+ SwLabelType const eType, String const& rTxt, String const& rSeparator,
const String& rNumberingSeparator,
- const sal_Bool bBefore, const sal_uInt16 nId, const ULONG nNdIdx,
+ const sal_Bool bBefore, const sal_uInt16 nId, const sal_uLong nNdIdx,
const String& rCharacterStyle,
const sal_Bool bCpyBrd )
{
- sal_Bool bWasUndo = DoesUndo();
- SwUndoInsertLabel* pUndo = 0;
- if( bWasUndo )
- {
- ClearRedo();
- pUndo = new SwUndoInsertLabel( eType, rTxt, rSeparator, rNumberingSeparator,
- bBefore, nId, rCharacterStyle, bCpyBrd );
- DoUndo( sal_False );
- }
+ ::sw::UndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo());
sal_Bool bTable = sal_False; //Um etwas Code zu sparen.
//Erstmal das Feld bauen, weil ueber den Namen die TxtColl besorgt werden
//muss
- OSL_ENSURE( nId == USHRT_MAX || nId < GetFldTypes()->Count(), "FldType ueberindiziert." );
- SwFieldType *pType = nId != USHRT_MAX ? (*GetFldTypes())[nId] : NULL;
- OSL_ENSURE( !pType || pType->Which() == RES_SETEXPFLD, "Falsche Id fuer Label" );
+ OSL_ENSURE( nId == USHRT_MAX || nId < rDoc.GetFldTypes()->Count(),
+ "FldType index out of bounds." );
+ SwFieldType *pType = (nId != USHRT_MAX) ? (*rDoc.GetFldTypes())[nId] : NULL;
+ OSL_ENSURE(!pType || pType->Which() == RES_SETEXPFLD, "wrong Id for Label");
- SwTxtFmtColl *pColl = NULL;
+ SwTxtFmtColl * pColl = NULL;
if( pType )
{
for( sal_uInt16 i = pTxtFmtCollTbl->Count(); i; )
@@ -1197,7 +1194,9 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co
}
if( !pColl )
- pColl = GetTxtCollFromPool( RES_POOLCOLL_LABEL );
+ {
+ pColl = rDoc.GetTxtCollFromPool( RES_POOLCOLL_LABEL );
+ }
SwTxtNode *pNew = NULL;
SwFlyFrmFmt* pNewFmt = NULL;
@@ -1211,9 +1210,9 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co
//Am Anfang/Ende der Fly-Section den entsprechenden Node mit Feld
//einfuegen (Frame wird automatisch erzeugt).
{
- SwStartNode *pSttNd = GetNodes()[nNdIdx]->GetStartNode();
+ SwStartNode *pSttNd = rDoc.GetNodes()[nNdIdx]->GetStartNode();
OSL_ENSURE( pSttNd, "Kein StartNode in InsertLabel." );
- ULONG nNode;
+ sal_uLong nNode;
if( bBefore )
{
nNode = pSttNd->GetIndex();
@@ -1231,8 +1230,8 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co
pUndo->SetNodePos( nNode );
//Node fuer Beschriftungsabsatz erzeugen.
- SwNodeIndex aIdx( GetNodes(), nNode );
- pNew = GetNodes().MakeTxtNode( aIdx, pColl );
+ SwNodeIndex aIdx( rDoc.GetNodes(), nNode );
+ pNew = rDoc.GetNodes().MakeTxtNode( aIdx, pColl );
}
break;
@@ -1244,12 +1243,12 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co
// Frames erzeugen.
//Erstmal das Format zum Fly besorgen und das Layout entkoppeln.
- SwFrmFmt *pOldFmt = GetNodes()[nNdIdx]->GetFlyFmt();
+ SwFrmFmt *pOldFmt = rDoc.GetNodes()[nNdIdx]->GetFlyFmt();
OSL_ENSURE( pOldFmt, "Format des Fly nicht gefunden." );
pOldFmt->DelFrms();
- pNewFmt = MakeFlyFrmFmt( GetUniqueFrameName(),
- GetFrmFmtFromPool( RES_POOLFRM_FRAME ));
+ pNewFmt = rDoc.MakeFlyFrmFmt( rDoc.GetUniqueFrameName(),
+ rDoc.GetFrmFmtFromPool(RES_POOLFRM_FRAME) );
/* #i6447#: Only the selected items are copied from the old
format. */
@@ -1307,8 +1306,8 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co
aFrmSize.SetHeightSizeType( ATT_MIN_SIZE );
pNewSet->Put( aFrmSize );
- SwStartNode* pSttNd = GetNodes().MakeTextSection(
- SwNodeIndex( GetNodes().GetEndOfAutotext() ),
+ SwStartNode* pSttNd = rDoc.GetNodes().MakeTextSection(
+ SwNodeIndex( rDoc.GetNodes().GetEndOfAutotext() ),
SwFlyStartNode, pColl );
pNewSet->Put( SwFmtCntnt( pSttNd ));
@@ -1387,7 +1386,7 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co
break;
default:
- OSL_ENSURE( !this, "Neuer LabelType?." );
+ OSL_ENSURE(false, "unknown LabelType?");
}
OSL_ENSURE( pNew, "No Label inserted" );
if( pNew )
@@ -1407,7 +1406,7 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co
aTxt += ' ';
}
xub_StrLen nIdx = aTxt.Len();
- if ( rTxt.Len() > 0 )
+ if( rTxt.Len() > 0 )
{
aTxt += rSeparator;
}
@@ -1429,11 +1428,11 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co
pNew->InsertItem( aFmt, nIdx, nIdx );
if(rCharacterStyle.Len())
{
- SwCharFmt* pCharFmt = FindCharFmtByName( rCharacterStyle );
+ SwCharFmt* pCharFmt = rDoc.FindCharFmtByName(rCharacterStyle);
if( !pCharFmt )
{
- const USHORT nMyId = SwStyleNameMapper::GetPoolIdFromUIName(rCharacterStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
- pCharFmt = GetCharFmtFromPool( nMyId );
+ const sal_uInt16 nMyId = SwStyleNameMapper::GetPoolIdFromUIName(rCharacterStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
+ pCharFmt = rDoc.GetCharFmtFromPool( nMyId );
}
if (pCharFmt)
{
@@ -1453,7 +1452,8 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co
}
else
{
- SwTableNode *pNd = GetNodes()[nNdIdx]->GetStartNode()->GetTableNode();
+ SwTableNode *const pNd =
+ rDoc.GetNodes()[nNdIdx]->GetStartNode()->GetTableNode();
SwTable &rTbl = pNd->GetTable();
if ( !rTbl.GetFrmFmt()->GetKeep().GetValue() )
rTbl.GetFrmFmt()->SetFmtAttr( SvxFmtKeepItem( sal_True, RES_KEEP ) );
@@ -1461,57 +1461,68 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co
pUndo->SetUndoKeep();
}
}
- SetModified();
+ rDoc.SetModified();
}
- if( pUndo )
- AppendUndo( pUndo );
+ return pNewFmt;
+}
+
+SwFlyFrmFmt *
+SwDoc::InsertLabel(
+ SwLabelType const eType, String const& rTxt, String const& rSeparator,
+ String const& rNumberingSeparator,
+ sal_Bool const bBefore, sal_uInt16 const nId, sal_uLong const nNdIdx,
+ String const& rCharacterStyle,
+ sal_Bool const bCpyBrd )
+{
+ SwUndoInsertLabel * pUndo(0);
+ if (GetIDocumentUndoRedo().DoesUndo())
+ {
+ pUndo = new SwUndoInsertLabel(
+ eType, rTxt, rSeparator, rNumberingSeparator,
+ bBefore, nId, rCharacterStyle, bCpyBrd );
+ }
+
+ SwFlyFrmFmt *const pNewFmt = lcl_InsertLabel(*this, pTxtFmtCollTbl, pUndo,
+ eType, rTxt, rSeparator, rNumberingSeparator, bBefore,
+ nId, nNdIdx, rCharacterStyle, bCpyBrd);
+
+ if (pUndo)
+ {
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
+ }
else
- DelAllUndoObj();
- DoUndo( bWasUndo );
+ {
+ GetIDocumentUndoRedo().DelAllUndoObj();
+ }
return pNewFmt;
}
+
/*************************************************************************
|*
|* SwDoc::InsertDrawLabel()
|*
|*************************************************************************/
-SwFlyFrmFmt* SwDoc::InsertDrawLabel( const String &rTxt,
+static SwFlyFrmFmt *
+lcl_InsertDrawLabel( SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
+ SwUndoInsertLabel *const pUndo, SwDrawFrmFmt *const pOldFmt,
+ String const& rTxt,
const String& rSeparator,
const String& rNumberSeparator,
const sal_uInt16 nId,
const String& rCharacterStyle,
SdrObject& rSdrObj )
{
-
- SwDrawContact* pContact = (SwDrawContact*)GetUserCall( &rSdrObj );
- if ( !pContact )
- return 0;
- OSL_ENSURE( RES_DRAWFRMFMT == pContact->GetFmt()->Which(),
- "Kein DrawFrmFmt" );
-
- SwDrawFrmFmt* pOldFmt = (SwDrawFrmFmt *)pContact->GetFmt();
- if( !pOldFmt )
- return 0;
-
- sal_Bool bWasUndo = DoesUndo();
- sal_Bool bWasNoDrawUndo = IsNoDrawUndoObj();
- SwUndoInsertLabel* pUndo = 0;
- if( bWasUndo )
- {
- ClearRedo();
- pUndo = new SwUndoInsertLabel(
- LTYPE_DRAW, rTxt, rSeparator, rNumberSeparator, sal_False, nId, rCharacterStyle, sal_False );
- DoUndo( sal_False );
- SetNoDrawUndoObj( sal_True );
- }
+ ::sw::UndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo());
+ ::sw::DrawUndoGuard const drawUndoGuard(rDoc.GetIDocumentUndoRedo());
// Erstmal das Feld bauen, weil ueber den Namen die TxtColl besorgt
// werden muss
- OSL_ENSURE( nId == USHRT_MAX || nId < GetFldTypes()->Count(), "FldType overflow" );
- SwFieldType *pType = nId != USHRT_MAX ? (*GetFldTypes())[nId] : 0;
+ OSL_ENSURE( nId == USHRT_MAX || nId < rDoc.GetFldTypes()->Count(),
+ "FldType index out of bounds" );
+ SwFieldType *pType = nId != USHRT_MAX ? (*rDoc.GetFldTypes())[nId] : 0;
OSL_ENSURE( !pType || pType->Which() == RES_SETEXPFLD, "Wrong label id" );
SwTxtFmtColl *pColl = NULL;
@@ -1529,7 +1540,9 @@ SwFlyFrmFmt* SwDoc::InsertDrawLabel( const String &rTxt,
}
if( !pColl )
- pColl = GetTxtCollFromPool( RES_POOLCOLL_LABEL );
+ {
+ pColl = rDoc.GetTxtCollFromPool( RES_POOLCOLL_LABEL );
+ }
SwTxtNode* pNew = NULL;
SwFlyFrmFmt* pNewFmt = NULL;
@@ -1568,8 +1581,8 @@ SwFlyFrmFmt* SwDoc::InsertDrawLabel( const String &rTxt,
// Den Rahmen ggf. in den Hintergrund schicken.
// Consider 'invisible' hell layer.
- if ( GetHellId() != nLayerId &&
- GetInvisibleHellId() != nLayerId )
+ if ( rDoc.GetHellId() != nLayerId &&
+ rDoc.GetInvisibleHellId() != nLayerId )
{
SvxOpaqueItem aOpaque( RES_OPAQUE );
aOpaque.SetValue( sal_True );
@@ -1598,11 +1611,12 @@ SwFlyFrmFmt* SwDoc::InsertDrawLabel( const String &rTxt,
pNewSet->Put( pOldFmt->GetULSpace() );
SwStartNode* pSttNd =
- GetNodes().MakeTextSection( SwNodeIndex( GetNodes().GetEndOfAutotext() ),
+ rDoc.GetNodes().MakeTextSection(
+ SwNodeIndex( rDoc.GetNodes().GetEndOfAutotext() ),
SwFlyStartNode, pColl );
- pNewFmt = MakeFlyFrmFmt( GetUniqueFrameName(),
- GetFrmFmtFromPool( RES_POOLFRM_FRAME ) );
+ pNewFmt = rDoc.MakeFlyFrmFmt( rDoc.GetUniqueFrameName(),
+ rDoc.GetFrmFmtFromPool( RES_POOLFRM_FRAME ) );
// JP 28.10.99: Bug 69487 - set border and shadow to default if the
// template contains any.
@@ -1641,11 +1655,15 @@ SwFlyFrmFmt* SwDoc::InsertDrawLabel( const String &rTxt,
pNewSet->ClearItem();
pNewSet->Put( SwFmtSurround( SURROUND_NONE ) );
- if( nLayerId == GetHellId() )
- rSdrObj.SetLayer( GetHeavenId() );
+ if (nLayerId == rDoc.GetHellId())
+ {
// Consider drawing objects in 'invisible' hell layer
- else if( nLayerId == GetInvisibleHellId() )
- rSdrObj.SetLayer( GetInvisibleHeavenId() );
+ rSdrObj.SetLayer( rDoc.GetHeavenId() );
+ }
+ else if (nLayerId == rDoc.GetInvisibleHellId())
+ {
+ rSdrObj.SetLayer( rDoc.GetInvisibleHeavenId() );
+ }
pNewSet->Put( SvxLRSpaceItem( RES_LR_SPACE ) );
pNewSet->Put( SvxULSpaceItem( RES_UL_SPACE ) );
@@ -1714,11 +1732,11 @@ SwFlyFrmFmt* SwDoc::InsertDrawLabel( const String &rTxt,
pNew->InsertItem( aFmt, nIdx, nIdx );
if ( rCharacterStyle.Len() )
{
- SwCharFmt* pCharFmt = FindCharFmtByName( rCharacterStyle );
+ SwCharFmt * pCharFmt = rDoc.FindCharFmtByName(rCharacterStyle);
if ( !pCharFmt )
{
- const USHORT nMyId = SwStyleNameMapper::GetPoolIdFromUIName( rCharacterStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
- pCharFmt = GetCharFmtFromPool( nMyId );
+ const sal_uInt16 nMyId = SwStyleNameMapper::GetPoolIdFromUIName( rCharacterStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
+ pCharFmt = rDoc.GetCharFmtFromPool( nMyId );
}
if ( pCharFmt )
{
@@ -1730,18 +1748,54 @@ SwFlyFrmFmt* SwDoc::InsertDrawLabel( const String &rTxt,
}
}
- if( pUndo )
+ return pNewFmt;
+}
+
+SwFlyFrmFmt* SwDoc::InsertDrawLabel(
+ String const& rTxt,
+ String const& rSeparator,
+ String const& rNumberSeparator,
+ sal_uInt16 const nId,
+ String const& rCharacterStyle,
+ SdrObject& rSdrObj )
+{
+ SwDrawContact *const pContact =
+ static_cast<SwDrawContact*>(GetUserCall( &rSdrObj ));
+ OSL_ENSURE( RES_DRAWFRMFMT == pContact->GetFmt()->Which(),
+ "InsertDrawLabel(): not a DrawFrmFmt" );
+ if (!pContact)
+ return 0;
+
+ SwDrawFrmFmt* pOldFmt = (SwDrawFrmFmt *)pContact->GetFmt();
+ if (!pOldFmt)
+ return 0;
+
+ SwUndoInsertLabel * pUndo = 0;
+ if (GetIDocumentUndoRedo().DoesUndo())
+ {
+ GetIDocumentUndoRedo().ClearRedo();
+ pUndo = new SwUndoInsertLabel(
+ LTYPE_DRAW, rTxt, rSeparator, rNumberSeparator, sal_False,
+ nId, rCharacterStyle, sal_False );
+ }
+
+ SwFlyFrmFmt *const pNewFmt = lcl_InsertDrawLabel(
+ *this, pTxtFmtCollTbl, pUndo, pOldFmt,
+ rTxt, rSeparator, rNumberSeparator, nId, rCharacterStyle, rSdrObj);
+
+ if (pUndo)
{
- AppendUndo( pUndo );
- SetNoDrawUndoObj( bWasNoDrawUndo );
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
}
else
- DelAllUndoObj();
- DoUndo( bWasUndo );
+ {
+ GetIDocumentUndoRedo().DelAllUndoObj();
+ }
return pNewFmt;
}
+
/*************************************************************************
|*
|* IDocumentTimerAccess-methods
@@ -1803,7 +1857,7 @@ IMPL_LINK( SwDoc, DoIdleJobs, Timer *, pTimer )
if (GetRootFrm()->IsNeedGrammarCheck())
{
- BOOL bIsOnlineSpell = pSh->GetViewOptions()->IsOnlineSpell();
+ sal_Bool bIsOnlineSpell = pSh->GetViewOptions()->IsOnlineSpell();
sal_Bool bIsAutoGrammar = sal_False;
SvtLinguConfig().GetProperty( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
@@ -2192,7 +2246,7 @@ short SwDoc::GetTextDirection( const SwPosition& rPos,
if( !pItem )
{
- const SwPageDesc* pPgDsc = pNd->FindPageDesc( FALSE );
+ const SwPageDesc* pPgDsc = pNd->FindPageDesc( sal_False );
if( pPgDsc )
pItem = &pPgDsc->GetMaster().GetFrmDir();
}
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 9058feebab48..754b9b000183 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -97,6 +97,7 @@
#include <IGrammarContact.hxx>
#include <tblsel.hxx>
#include <MarkManager.hxx>
+#include <UndoManager.hxx>
#include <unochart.hxx>
#include <cmdid.h> // fuer den dflt - Printer in SetJob
@@ -191,7 +192,7 @@ void StartGrammarChecking( SwDoc &rDoc )
/*
* interne Funktionen
*/
-BOOL lcl_DelFmtIndizes( const SwFrmFmtPtr& rpFmt, void* )
+sal_Bool lcl_DelFmtIndizes( const SwFrmFmtPtr& rpFmt, void* )
{
SwFmtCntnt &rFmtCntnt = (SwFmtCntnt&)rpFmt->GetCntnt();
if ( rFmtCntnt.GetCntntIdx() )
@@ -199,18 +200,20 @@ BOOL lcl_DelFmtIndizes( const SwFrmFmtPtr& rpFmt, void* )
SwFmtAnchor &rFmtAnchor = (SwFmtAnchor&)rpFmt->GetAnchor();
if ( rFmtAnchor.GetCntntAnchor() )
rFmtAnchor.SetAnchor( 0 );
- return TRUE;
+ return sal_True;
}
/*
* exportierte Methoden
*/
-SwDoc::SwDoc() :
- aNodes( this ),
- aUndoNodes( this ),
+SwDoc::SwDoc()
+ : m_pNodes( new SwNodes(this) )
+ ,
mpAttrPool(new SwAttrPool(this)),
pMarkManager(new ::sw::mark::MarkManager(*this)),
m_pMetaFieldManager(new ::sw::MetaFieldManager()),
+ m_pUndoManager(new ::sw::UndoManager(
+ ::std::auto_ptr<SwNodes>(new SwNodes(this)), *this, *this, *this)),
pDfltFrmFmt( new SwFrmFmt( GetAttrPool(), sFrmFmtStr, 0 ) ),
pEmptyPageFmt( new SwFrmFmt( GetAttrPool(), sEmptyPageStr, pDfltFrmFmt ) ),
pColumnContFmt( new SwFrmFmt( GetAttrPool(), sColumnCntStr, pDfltFrmFmt ) ),
@@ -228,7 +231,6 @@ SwDoc::SwDoc() :
pDefTOXBases( new SwDefTOXBase_Impl() ),
pLayout( 0 ), // Rootframe des spezifischen Layouts.
pDrawModel( 0 ),
- pUndos( new SwUndos( 0, 20 ) ),
pUpdtFlds( new SwDocUpdtFld() ),
pFldTypes( new SwFldTypes() ),
pVirDev( 0 ),
@@ -242,7 +244,6 @@ SwDoc::SwDoc() :
pFtnIdxs( new SwFtnIdxs ),
pDocStat( new SwDocStat ),
pDocShell( 0 ),
- pDocShRef( 0 ),
pLinkMgr( new sfx2::LinkManager( 0 ) ),
pACEWord( 0 ),
pURLStateChgd( 0 ),
@@ -264,10 +265,6 @@ SwDoc::SwDoc() :
pChartControllerHelper( 0 ),
mpListItemsList( new tImplSortedNodeNumList() ), // #i83479#
m_pXmlIdRegistry(),
- nUndoPos( 0 ),
- nUndoSavePos( 0 ),
- nUndoCnt( 0 ),
- nUndoSttEnd( 0 ),
nAutoFmtRedlnCommentNo( 0 ),
nLinkUpdMode( GLOBALSETTING ),
eFldUpdMode( AUTOUPD_GLOBALSETTING ),
@@ -290,13 +287,11 @@ SwDoc::SwDoc() :
mbGlossDoc =
mbModified =
mbDtor =
- mbUndo =
mbPageNums =
mbLoaded =
mbUpdateExpFld =
mbNewDoc =
mbCopyIsMove =
- mbNoDrawUndoObj =
mbBrowseMode =
mbInReading =
mbInXMLImport =
@@ -320,7 +315,6 @@ SwDoc::SwDoc() :
mbApplyWorkaroundForB6375613 =
false;
- mbGroupUndo =
mbNewFldLst =
mbVisibleLinks =
mbPurgeOLE =
@@ -344,6 +338,7 @@ SwDoc::SwDoc() :
mbUseFormerObjectPos = aOptions.IsUseObjectPositioning();
mbUseFormerTextWrapping = aOptions.IsUseOurTextWrapping();
mbConsiderWrapOnObjPos = aOptions.IsConsiderWrappingStyle();
+ mbMathBaselineAlignment = false; // default for *old* documents is 'off'
mbAddFlyOffsets = false; // hidden
mbOldNumbering = false; // hidden
mbUseHiResolutionVirtualDevice = true; // hidden
@@ -406,8 +401,10 @@ SwDoc::SwDoc() :
// Counting of phantoms depends on <IsOldNumbering()>
pOutlineRule->SetCountPhantoms( !get(IDocumentSettingAccess::OLD_NUMBERING) );
- new SwTxtNode( SwNodeIndex( aUndoNodes.GetEndOfContent() ), pDfltTxtFmtColl );
- new SwTxtNode( SwNodeIndex( aNodes.GetEndOfContent() ),
+ new SwTxtNode(
+ SwNodeIndex(GetUndoManager().GetUndoNodes().GetEndOfContent()),
+ pDfltTxtFmtColl );
+ new SwTxtNode( SwNodeIndex( GetNodes().GetEndOfContent() ),
GetTxtCollFromPool( RES_POOLCOLL_STANDARD ));
// den eigenen IdleTimer setzen
@@ -443,7 +440,14 @@ SwDoc::SwDoc() :
*/
SwDoc::~SwDoc()
{
- SwPauseThreadStarting aPauseThreadStarting; // #i73788#
+ // nothing here should create Undo actions!
+ GetIDocumentUndoRedo().DoUndo(false);
+
+ if (pDocShell)
+ {
+ pDocShell->SetUndoManager(0);
+ }
+
// #i83479#
delete mpListItemsList;
@@ -486,9 +490,7 @@ SwDoc::~SwDoc()
delete pPgPViewPrtData;
- mbUndo = FALSE; // immer das Undo abschalten !!
- // damit die Fussnotenattribute die Fussnotennodes in Frieden lassen.
- mbDtor = TRUE;
+ mbDtor = sal_True;
DELETEZ( pLayout );
@@ -504,7 +506,7 @@ SwDoc::~SwDoc()
// die BaseLinks freigeben.
{
- for( USHORT n = pLinkMgr->GetServers().Count(); n; )
+ for( sal_uInt16 n = pLinkMgr->GetServers().Count(); n; )
pLinkMgr->GetServers()[ --n ]->Closed();
if( pLinkMgr->GetLinks().Count() )
@@ -513,13 +515,14 @@ SwDoc::~SwDoc()
// die KapitelNummern / Nummern muessen vor den Vorlage geloescht werden
// ansonsten wird noch staendig geupdatet !!!
- aNodes.pOutlineNds->Remove( USHORT(0), aNodes.pOutlineNds->Count() );
- aUndoNodes.pOutlineNds->Remove( USHORT(0), aUndoNodes.pOutlineNds->Count() );
+ m_pNodes->pOutlineNds->Remove(sal_uInt16(0), m_pNodes->pOutlineNds->Count());
+ SwNodes & rUndoNodes( GetUndoManager().GetUndoNodes() );
+ rUndoNodes.pOutlineNds->Remove(sal_uInt16(0), rUndoNodes.pOutlineNds->Count());
- pFtnIdxs->Remove( USHORT(0), pFtnIdxs->Count() );
+ pFtnIdxs->Remove( sal_uInt16(0), pFtnIdxs->Count() );
- pUndos->DeleteAndDestroy( 0, pUndos->Count() ); //Es koennen in den Attributen noch
- //noch indizes angemeldet sein.
+ // indices could be registered in attributes
+ m_pUndoManager->DelAllUndoObj();
// in den BookMarks sind Indizies auf den Content. Diese muessen vorm
// loesche der Nodes geloescht werden.
@@ -538,7 +541,7 @@ SwDoc::~SwDoc()
//JP: alt - loeschen ohne Flag ist teuer; Modify wird verschickt!
// aTOXTypes.DeleteAndDestroy( 0, aTOXTypes.Count() );
{
- for( USHORT n = pTOXTypes->Count(); n; )
+ for( sal_uInt16 n = pTOXTypes->Count(); n; )
{
(*pTOXTypes)[ --n ]->SetInDocDTOR();
delete (*pTOXTypes)[ n ];
@@ -562,8 +565,8 @@ SwDoc::~SwDoc()
// Inhaltssections loeschen
// nicht erst durch den SwNodes-DTOR, damit Formate
// keine Abhaengigen mehr haben.
- aNodes.DelNodes( SwNodeIndex( aNodes ), aNodes.Count() );
- aUndoNodes.DelNodes( SwNodeIndex( aUndoNodes ), aUndoNodes.Count() );
+ m_pNodes->DelNodes( SwNodeIndex(*m_pNodes), m_pNodes->Count() );
+ rUndoNodes.DelNodes( SwNodeIndex( rUndoNodes ), rUndoNodes.Count() );
// Formate loeschen, spaeter mal permanent machen.
@@ -653,7 +656,6 @@ SwDoc::~SwDoc()
delete pFtnIdxs;
delete pFldTypes;
delete pTOXTypes;
- delete pUndos;
delete pDocStat;
delete pEmptyPageFmt;
delete pColumnContFmt;
@@ -709,7 +711,15 @@ void SwDoc::SetDocShell( SwDocShell* pDSh )
{
if( pDocShell != pDSh )
{
+ if (pDocShell)
+ {
+ pDocShell->SetUndoManager(0);
+ }
pDocShell = pDSh;
+ if (pDocShell)
+ {
+ pDocShell->SetUndoManager(& GetUndoManager());
+ }
pLinkMgr->SetPersist( pDocShell );
//JP 27.08.98: Bug 55570 - DocShell Pointer auch am DrawModel setzen
@@ -741,9 +751,8 @@ SfxObjectShell* SwDoc::GetPersist() const
void SwDoc::ClearDoc()
{
- BOOL bOldUndo = mbUndo;
- DelAllUndoObj();
- mbUndo = FALSE; // immer das Undo abschalten !!
+ GetIDocumentUndoRedo().DelAllUndoObj();
+ ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
// Undo-Benachrichtigung vom Draw abschalten
if( pDrawModel )
@@ -753,7 +762,7 @@ void SwDoc::ClearDoc()
}
// stehen noch FlyFrames rum, loesche auch diese
- USHORT n;
+ sal_uInt16 n;
while ( 0 != (n = GetSpzFrmFmts()->Count()) )
DelLayoutFmt((*pSpzFrmFmtTbl)[n-1]);
OSL_ENSURE( !pDrawModel || !pDrawModel->GetPage(0)->GetObjCount(),
@@ -783,8 +792,8 @@ void SwDoc::ClearDoc()
pFirstNd->SetAttr( SwFmtPageDesc( pDummyPgDsc ));
SwPosition aPos( *pFirstNd, SwIndex( pFirstNd ));
- ::PaMCorrAbs( aSttIdx, SwNodeIndex( GetNodes().GetEndOfContent() ),
- aPos );
+ SwPaM const tmpPaM(aSttIdx, SwNodeIndex(GetNodes().GetEndOfContent()));
+ ::PaMCorrAbs(tmpPaM, aPos);
}
GetNodes().Delete( aSttIdx,
@@ -849,8 +858,6 @@ void SwDoc::ClearDoc()
pFirstNd->ResetAllAttr();
// delete now the dummy pagedesc
DelPageDesc( nDummyPgDsc );
-
- mbUndo = bOldUndo;
}
void SwDoc::SetPreViewPrtData( const SwPagePreViewPrtData* pNew )
@@ -903,11 +910,11 @@ IGrammarContact* getGrammarContact( const SwTxtNode& rTxtNode )
// #i42634# Moved common code of SwReader::Read() and SwDocShell::UpdateLinks()
// to new SwDoc::UpdateLinks():
-void SwDoc::UpdateLinks( BOOL bUI )
+void SwDoc::UpdateLinks( sal_Bool bUI )
{
SfxObjectCreateMode eMode;
- USHORT nLinkMode = getLinkUpdateMode( true );
- USHORT nUpdateDocMode = GetDocShell()->GetUpdateDocMode();
+ sal_uInt16 nLinkMode = getLinkUpdateMode( true );
+ sal_uInt16 nUpdateDocMode = GetDocShell()->GetUpdateDocMode();
if( GetDocShell() &&
(nLinkMode != NEVER || document::UpdateDocMode::FULL_UPDATE == nUpdateDocMode) &&
GetLinkManager().GetLinks().Count() &&
@@ -918,13 +925,13 @@ void SwDoc::UpdateLinks( BOOL bUI )
!GetDocShell()->IsPreview() )
{
ViewShell* pVSh = 0;
- BOOL bAskUpdate = nLinkMode == MANUAL;
- BOOL bUpdate = TRUE;
+ sal_Bool bAskUpdate = nLinkMode == MANUAL;
+ sal_Bool bUpdate = sal_True;
switch(nUpdateDocMode)
{
- case document::UpdateDocMode::NO_UPDATE: bUpdate = FALSE;break;
- case document::UpdateDocMode::QUIET_UPDATE:bAskUpdate = FALSE; break;
- case document::UpdateDocMode::FULL_UPDATE: bAskUpdate = TRUE; break;
+ case document::UpdateDocMode::NO_UPDATE: bUpdate = sal_False;break;
+ case document::UpdateDocMode::QUIET_UPDATE:bAskUpdate = sal_False; break;
+ case document::UpdateDocMode::FULL_UPDATE: bAskUpdate = sal_True; break;
}
if( bUpdate && (bUI || !bAskUpdate) )
{
@@ -936,10 +943,10 @@ void SwDoc::UpdateLinks( BOOL bUI )
ViewShell aVSh( *this, 0, 0 );
SET_CURR_SHELL( &aVSh );
- GetLinkManager().UpdateAllLinks( bAskUpdate , TRUE, FALSE, pDlgParent );
+ GetLinkManager().UpdateAllLinks( bAskUpdate , sal_True, sal_False, pDlgParent );
}
else
- GetLinkManager().UpdateAllLinks( bAskUpdate, TRUE, FALSE, pDlgParent );
+ GetLinkManager().UpdateAllLinks( bAskUpdate, sal_True, sal_False, pDlgParent );
}
}
@@ -1000,6 +1007,30 @@ SwDoc::GetMetaFieldManager()
return *m_pMetaFieldManager;
}
+::sw::UndoManager &
+SwDoc::GetUndoManager()
+{
+ return *m_pUndoManager;
+}
+
+::sw::UndoManager const&
+SwDoc::GetUndoManager() const
+{
+ return *m_pUndoManager;
+}
+
+IDocumentUndoRedo &
+SwDoc::GetIDocumentUndoRedo()
+{
+ return *m_pUndoManager;
+}
+
+IDocumentUndoRedo const&
+SwDoc::GetIDocumentUndoRedo() const
+{
+ return *m_pUndoManager;
+}
+
void SwDoc::InitTOXTypes()
{
ShellResource* pShellRes = ViewShell::GetShellRes();
@@ -1023,7 +1054,7 @@ SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const
{
SwDoc* pRet = new SwDoc;
//copy settings
- USHORT aRangeOfDefaults[] = {
+ sal_uInt16 aRangeOfDefaults[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -1034,8 +1065,8 @@ SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const
SfxItemSet aNewDefaults( pRet->GetAttrPool(), aRangeOfDefaults );
- USHORT nWhich;
- USHORT nRange = 0;
+ sal_uInt16 nWhich;
+ sal_uInt16 nRange = 0;
while( aRangeOfDefaults[nRange] != 0)
{
for( nWhich = aRangeOfDefaults[nRange]; nWhich < aRangeOfDefaults[nRange + 1]; ++nWhich )
@@ -1081,23 +1112,31 @@ SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const
// COMPATIBILITY FLAGS END
//
pRet->ReplaceStyles( * const_cast< SwDoc*>( this ));
- SfxObjectShellRef aDocShellRef = const_cast< SwDocShell* >( GetDocShell() );
- pRet->SetRefForDocShell( boost::addressof(aDocShellRef) );
- SfxObjectShellRef xRetShell = new SwDocShell( pRet, SFX_CREATE_MODE_STANDARD );
+
+ // we have to use pointer here, since the callee has to decide whether SfxObjectShellLock or SfxObjectShellRef should be used
+ // sometimes the object will be returned with refcount set to 0 ( if no DoInitNew is done )
+ SfxObjectShell* pRetShell = new SwDocShell( pRet, SFX_CREATE_MODE_STANDARD );
if( bCallInitNew )
- xRetShell->DoInitNew();
+ {
+ // it could happen that DoInitNew creates model, that increases the refcount of the object
+ pRetShell->DoInitNew();
+ }
+
//copy content
pRet->Paste( *this );
- pRet->SetRefForDocShell( 0 );
- return xRetShell;
+
+ // remove the temporary shell if it is there as it was done before
+ pRet->SetTmpDocShell( (SfxObjectShell*)NULL );
+
+ return pRetShell;
}
/*-------------------------------------------------------------------------
- copy document content - code from SwFEShell::Paste( SwDoc* , BOOL )
+ copy document content - code from SwFEShell::Paste( SwDoc* , sal_Bool )
-----------------------------------------------------------------------*/
void SwDoc::Paste( const SwDoc& rSource )
{
-// this has to be empty const USHORT nStartPageNumber = GetPhyPageNum();
+// this has to be empty const sal_uInt16 nStartPageNumber = GetPhyPageNum();
// until the end of the NodesArray
SwNodeIndex aSourceIdx( rSource.GetNodes().GetEndOfExtras(), 2 );
SwPaM aCpyPam( aSourceIdx ); //DocStart
@@ -1108,7 +1147,7 @@ void SwDoc::Paste( const SwDoc& rSource )
aCpyPam.SetMark();
aCpyPam.Move( fnMoveForward, fnGoDoc );
- this->StartUndo( UNDO_INSGLOSSARY, NULL );
+ this->GetIDocumentUndoRedo().StartUndo( UNDO_INSGLOSSARY, NULL );
this->LockExpFlds();
{
@@ -1143,9 +1182,9 @@ void SwDoc::Paste( const SwDoc& rSource )
//additionally copy page bound frames
if( /*bIncludingPageFrames && */rSource.GetSpzFrmFmts()->Count() )
{
- for ( USHORT i = 0; i < rSource.GetSpzFrmFmts()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rSource.GetSpzFrmFmts()->Count(); ++i )
{
- BOOL bInsWithFmt = TRUE;
+ sal_Bool bInsWithFmt = sal_True;
const SwFrmFmt& rCpyFmt = *(*rSource.GetSpzFrmFmts())[i];
if( bInsWithFmt )
{
@@ -1162,7 +1201,7 @@ void SwDoc::Paste( const SwDoc& rSource )
}
}
- this->EndUndo( UNDO_INSGLOSSARY, NULL );
+ this->GetIDocumentUndoRedo().EndUndo( UNDO_INSGLOSSARY, NULL );
UnlockExpFlds();
UpdateFlds(NULL, false);
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index bfcba62ad20b..2f423a902b78 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
#include <tools/date.hxx>
#include <tools/time.hxx>
@@ -36,11 +37,14 @@
#include <ftninfo.hxx>
#include <ftnidx.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
#include <doctxm.hxx> // pTOXBaseRing
#include <poolfmt.hxx>
-#include <undobj.hxx>
+#include <UndoCore.hxx>
+#include <UndoRedline.hxx>
+#include <UndoNumbering.hxx>
#include <swundo.hxx>
#include <SwUndoFmt.hxx>
#include <rolbck.hxx>
@@ -62,7 +66,7 @@
#include <map>
-inline BYTE GetUpperLvlChg( BYTE nCurLvl, BYTE nLevel, USHORT nMask )
+inline sal_uInt8 GetUpperLvlChg( sal_uInt8 nCurLvl, sal_uInt8 nLevel, sal_uInt16 nMask )
{
if( 1 < nLevel )
{
@@ -71,7 +75,7 @@ inline BYTE GetUpperLvlChg( BYTE nCurLvl, BYTE nLevel, USHORT nMask )
else
nCurLvl = 0;
}
- return static_cast<BYTE>((nMask - 1) & ~(( 1 << nCurLvl ) - 1));
+ return static_cast<sal_uInt8>((nMask - 1) & ~(( 1 << nCurLvl ) - 1));
}
void SwDoc::SetOutlineNumRule( const SwNumRule& rRule )
@@ -91,7 +95,7 @@ void SwDoc::SetOutlineNumRule( const SwNumRule& rRule )
*this);
// assure that the outline numbering rule is an automatic rule
- pOutlineRule->SetAutoRule( TRUE );
+ pOutlineRule->SetAutoRule( sal_True );
// teste ob die evt. gesetzen CharFormate in diesem Document
// definiert sind
@@ -116,7 +120,7 @@ void SwDoc::SetOutlineNumRule( const SwNumRule& rRule )
}
PropagateOutlineRule();
- pOutlineRule->SetInvalidRule(TRUE);
+ pOutlineRule->SetInvalidRule(sal_True);
UpdateNumRule();
// gibt es Fussnoten && gilt Kapitelweises Nummerieren, dann updaten
@@ -130,7 +134,7 @@ void SwDoc::SetOutlineNumRule( const SwNumRule& rRule )
void SwDoc::PropagateOutlineRule()
{
- for (USHORT n = 0; n < pTxtFmtCollTbl->Count(); n++)
+ for (sal_uInt16 n = 0; n < pTxtFmtCollTbl->Count(); n++)
{
SwTxtFmtColl *pColl = (*pTxtFmtCollTbl)[n];
@@ -139,7 +143,7 @@ void SwDoc::PropagateOutlineRule()
SwClientIter aIter(*pColl);
// Check only the list style, which is set at the paragraph style
- const SwNumRuleItem & rCollRuleItem = pColl->GetNumRule( FALSE );
+ const SwNumRuleItem & rCollRuleItem = pColl->GetNumRule( sal_False );
// Check on document setting OUTLINE_LEVEL_YIELDS_OUTLINE_RULE no longer needed.
if ( rCollRuleItem.GetValue().Len() == 0 )
@@ -158,21 +162,21 @@ void SwDoc::PropagateOutlineRule()
}
// Hoch-/Runterstufen
-BOOL SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
+sal_Bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
{
if( !GetNodes().GetOutLineNds().Count() || !nOffset )
- return FALSE;
+ return sal_False;
// den Bereich feststellen
const SwOutlineNodes& rOutlNds = GetNodes().GetOutLineNds();
const SwNodePtr pSttNd = (SwNodePtr)&rPam.Start()->nNode.GetNode();
const SwNodePtr pEndNd = (SwNodePtr)&rPam.End()->nNode.GetNode();
- USHORT nSttPos, nEndPos;
+ sal_uInt16 nSttPos, nEndPos;
if( !rOutlNds.Seek_Entry( pSttNd, &nSttPos ) &&
!nSttPos-- )
// wir stehen in keiner "Outline-Section"
- return FALSE;
+ return sal_False;
if( rOutlNds.Seek_Entry( pEndNd, &nEndPos ) )
++nEndPos;
@@ -180,7 +184,7 @@ BOOL SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
// jetzt haben wir unseren Bereich im OutlineNodes-Array
// dann prufe ersmal, ob nicht unterebenen aufgehoben werden
// (Stufung ueber die Grenzen)
- USHORT n;
+ sal_uInt16 n;
// so, dann koennen wir:
// 1. Vorlagen-Array anlegen
@@ -296,12 +300,12 @@ BOOL SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
*/
if (aCollArr[n] != NULL)
{
- USHORT m = n;
+ sal_uInt16 m = n;
int nCount = nNum;
while (nCount > 0 && m + nStep >= 0 && m + nStep < MAXLEVEL)
{
- m = static_cast<USHORT>(m + nStep);
+ m = static_cast<sal_uInt16>(m + nStep);
if (aCollArr[m] != NULL)
nCount--;
@@ -346,13 +350,13 @@ BOOL SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
}
if (! bMoveApplicable )
- return FALSE;
+ return sal_False;
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- StartUndo(UNDO_OUTLINE_LR, NULL);
- AppendUndo( new SwUndoOutlineLeftRight( rPam, nOffset ) );
+ GetIDocumentUndoRedo().StartUndo(UNDO_OUTLINE_LR, NULL);
+ SwUndo *const pUndoOLR( new SwUndoOutlineLeftRight( rPam, nOffset ) );
+ GetIDocumentUndoRedo().AppendUndo(pUndoOLR);
}
// 2. allen Nodes die neue Vorlage zuweisen
@@ -391,48 +395,52 @@ BOOL SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
n++;
// Undo ???
}
- if (DoesUndo())
- EndUndo(UNDO_OUTLINE_LR, NULL);
+ if (GetIDocumentUndoRedo().DoesUndo())
+ {
+ GetIDocumentUndoRedo().EndUndo(UNDO_OUTLINE_LR, NULL);
+ }
ChkCondColls();
SetModified();
- return TRUE;
+ return sal_True;
}
// Hoch-/Runter - Verschieben !
-BOOL SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset )
+sal_Bool SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset )
{
// kein Verschiebung in den Sonderbereichen
const SwPosition& rStt = *rPam.Start(),
& rEnd = &rStt == rPam.GetPoint() ? *rPam.GetMark()
: *rPam.GetPoint();
if( !GetNodes().GetOutLineNds().Count() || !nOffset ||
- rStt.nNode.GetIndex() < aNodes.GetEndOfExtras().GetIndex() ||
- rEnd.nNode.GetIndex() < aNodes.GetEndOfExtras().GetIndex() )
- return FALSE;
+ (rStt.nNode.GetIndex() < GetNodes().GetEndOfExtras().GetIndex()) ||
+ (rEnd.nNode.GetIndex() < GetNodes().GetEndOfExtras().GetIndex()))
+ {
+ return sal_False;
+ }
- USHORT nAktPos = 0;
+ sal_uInt16 nAktPos = 0;
SwNodeIndex aSttRg( rStt.nNode ), aEndRg( rEnd.nNode );
int nOutLineLevel = MAXLEVEL; //<-end,zhaojianwei
SwNode* pSrch = &aSttRg.GetNode();
if( pSrch->IsTxtNode())
- nOutLineLevel = static_cast<BYTE>(((SwTxtNode*)pSrch)->GetAttrOutlineLevel()-1);//<-end,zhaojianwei
+ nOutLineLevel = static_cast<sal_uInt8>(((SwTxtNode*)pSrch)->GetAttrOutlineLevel()-1);//<-end,zhaojianwei
SwNode* pEndSrch = &aEndRg.GetNode();
if( !GetNodes().GetOutLineNds().Seek_Entry( pSrch, &nAktPos ) )
{
if( !nAktPos )
- return FALSE; // Promoting or demoting before the first outline => no.
+ return sal_False; // Promoting or demoting before the first outline => no.
if( --nAktPos )
aSttRg = *GetNodes().GetOutLineNds()[ nAktPos ];
else if( 0 > nOffset )
- return FALSE; // Promoting at the top of document?!
+ return sal_False; // Promoting at the top of document?!
else
aSttRg = *GetNodes().GetEndOfContent().StartOfSectionNode();
}
- USHORT nTmpPos = 0;
+ sal_uInt16 nTmpPos = 0;
// If the given range ends at an outlined text node we have to decide if it has to be a part of
// the moving range or not. Normally it will be a sub outline of our chapter
// and has to be moved, too. But if the chapter ends with a table(or a section end),
@@ -485,14 +493,14 @@ BOOL SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset )
aEndRg++;
// calculation of the new position
- if( nOffset < 0 && nAktPos < USHORT(-nOffset) )
+ if( nOffset < 0 && nAktPos < sal_uInt16(-nOffset) )
pNd = GetNodes().GetEndOfContent().StartOfSectionNode();
else if( nAktPos + nOffset >= GetNodes().GetOutLineNds().Count() )
pNd = &GetNodes().GetEndOfContent();
else
pNd = GetNodes().GetOutLineNds()[ nAktPos + nOffset ];
- ULONG nNewPos = pNd->GetIndex();
+ sal_uLong nNewPos = pNd->GetIndex();
// And now a correction of the insert position if necessary...
SwNodeIndex aInsertPos( *pNd, -1 );
@@ -532,7 +540,7 @@ BOOL SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset )
if( pNd->IsTableNode() )
pNd = pNd->StartOfSectionNode();
if( pNd->FindTableNode() )
- return FALSE;
+ return sal_False;
OSL_ENSURE( aSttRg.GetIndex() > nNewPos || nNewPos >= aEndRg.GetIndex(),
"Position liegt im MoveBereich" );
@@ -541,19 +549,19 @@ BOOL SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset )
// setze die Position auf den Dokumentanfang.
// Sollten da Bereiche oder Tabellen stehen, so werden sie nach
// hinten verschoben.
- nNewPos = Max( nNewPos, aNodes.GetEndOfExtras().GetIndex() + 2 );
+ nNewPos = Max( nNewPos, GetNodes().GetEndOfExtras().GetIndex() + 2 );
long nOffs = nNewPos - ( 0 < nOffset ? aEndRg.GetIndex() : aSttRg.GetIndex());
SwPaM aPam( aSttRg, aEndRg, 0, -1 );
- return MoveParagraph( aPam, nOffs, TRUE );
+ return MoveParagraph( aPam, nOffs, sal_True );
}
-USHORT lcl_FindOutlineName( const SwNodes& rNds, const String& rName,
- BOOL bExact )
+sal_uInt16 lcl_FindOutlineName( const SwNodes& rNds, const String& rName,
+ sal_Bool bExact )
{
- USHORT nSavePos = USHRT_MAX;
+ sal_uInt16 nSavePos = USHRT_MAX;
const SwOutlineNodes& rOutlNds = rNds.GetOutLineNds();
- for( USHORT n = 0; n < rOutlNds.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rOutlNds.Count(); ++n )
{
SwTxtNode* pTxtNd = rOutlNds[ n ]->GetTxtNode();
String sTxt( pTxtNd->GetExpandTxt() );
@@ -574,7 +582,7 @@ USHORT lcl_FindOutlineName( const SwNodes& rNds, const String& rName,
return nSavePos;
}
-USHORT lcl_FindOutlineNum( const SwNodes& rNds, String& rName )
+sal_uInt16 lcl_FindOutlineNum( const SwNodes& rNds, String& rName )
{
// Gueltig Nummern sind (immer nur Offsets!!!):
// ([Nummer]+\.)+ (als regulaerer Ausdruck!)
@@ -585,16 +593,16 @@ USHORT lcl_FindOutlineNum( const SwNodes& rNds, String& rName )
if( STRING_NOTFOUND == nPos )
return USHRT_MAX; // ungueltige Nummer!!!
- USHORT nLevelVal[ MAXLEVEL ]; // Nummern aller Levels
+ sal_uInt16 nLevelVal[ MAXLEVEL ]; // Nummern aller Levels
memset( nLevelVal, 0, MAXLEVEL * sizeof( nLevelVal[0] ));
- BYTE nLevel = 0;
+ sal_uInt8 nLevel = 0;
String sName( rName );
while( STRING_NOTFOUND != nPos )
{
- USHORT nVal = 0;
+ sal_uInt16 nVal = 0;
sal_Unicode c;
- for( USHORT n = 0; n < sNum.Len(); ++n )
+ for( sal_uInt16 n = 0; n < sNum.Len(); ++n )
if( '0' <= ( c = sNum.GetChar( n )) && c <= '9' )
{
nVal *= 10; nVal += c - '0';
@@ -643,7 +651,7 @@ USHORT lcl_FindOutlineNum( const SwNodes& rNds, String& rName )
SwNumberTree::tNumberVector aLevelVal = rNdNum.GetNumberVector();
//now compare with the one searched for
bool bEqual = true;
- for( BYTE n = 0; (n < nLevel) && bEqual; ++n )
+ for( sal_uInt8 n = 0; (n < nLevel) && bEqual; ++n )
{
bEqual = aLevelVal[n] == nLevelVal[n];
}
@@ -678,7 +686,7 @@ USHORT lcl_FindOutlineNum( const SwNodes& rNds, String& rName )
// Text gesucht. Wird dieser gefunden ist es der Eintrag. Ansonsten der,
// der ueber die Nummer gefunden wurde.
// Ist keine Nummer angegeben, dann nur den Text suchen.
-BOOL SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const
+sal_Bool SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const
{
if( rName.Len() )
{
@@ -686,7 +694,7 @@ BOOL SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const
// 1. Schritt: ueber die Nummer:
String sName( rName );
- USHORT nFndPos = ::lcl_FindOutlineNum( GetNodes(), sName );
+ sal_uInt16 nFndPos = ::lcl_FindOutlineNum( GetNodes(), sName );
if( USHRT_MAX != nFndPos )
{
SwTxtNode* pNd = rOutlNds[ nFndPos ]->GetTxtNode();
@@ -694,7 +702,7 @@ BOOL SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const
//#i4533# leading numbers followed by a dot have been remove while
//searching for the outline position
//to compensate this they must be removed from the paragraphs text content, too
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
String sTempNum;
while(sExpandedText.Len() && (sTempNum = sExpandedText.GetToken(0, '.', nPos)).Len() &&
STRING_NOTFOUND != nPos &&
@@ -706,7 +714,7 @@ BOOL SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const
if( !sExpandedText.Equals( sName ) )
{
- USHORT nTmp = ::lcl_FindOutlineName( GetNodes(), sName, TRUE );
+ sal_uInt16 nTmp = ::lcl_FindOutlineName( GetNodes(), sName, sal_True );
if( USHRT_MAX != nTmp ) // ueber den Namen gefunden
{
nFndPos = nTmp;
@@ -715,32 +723,32 @@ BOOL SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const
}
rPos.nNode = *pNd;
rPos.nContent.Assign( pNd, 0 );
- return TRUE;
+ return sal_True;
}
- nFndPos = ::lcl_FindOutlineName( GetNodes(), rName, FALSE );
+ nFndPos = ::lcl_FindOutlineName( GetNodes(), rName, sal_False );
if( USHRT_MAX != nFndPos )
{
SwTxtNode* pNd = rOutlNds[ nFndPos ]->GetTxtNode();
rPos.nNode = *pNd;
rPos.nContent.Assign( pNd, 0 );
- return TRUE;
+ return sal_True;
}
// #i68289# additional search on hyperlink URL without its outline numbering part
if ( !sName.Equals( rName ) )
{
- nFndPos = ::lcl_FindOutlineName( GetNodes(), sName, FALSE );
+ nFndPos = ::lcl_FindOutlineName( GetNodes(), sName, sal_False );
if( USHRT_MAX != nFndPos )
{
SwTxtNode* pNd = rOutlNds[ nFndPos ]->GetTxtNode();
rPos.nNode = *pNd;
rPos.nContent.Assign( pNd, 0 );
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule )
@@ -748,8 +756,8 @@ void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule )
SwNumRule* pOld = rDoc.FindNumRulePtr( rRule.GetName() );
OSL_ENSURE( pOld, "ohne die alte NumRule geht gar nichts" );
- USHORT nChgFmtLevel = 0, nMask = 1;
- BYTE n;
+ sal_uInt16 nChgFmtLevel = 0, nMask = 1;
+ sal_uInt8 n;
for( n = 0; n < MAXLEVEL; ++n, nMask <<= 1 )
{
@@ -773,7 +781,7 @@ void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule )
if ( bInvalidateNumRule )
{
- pOld->SetInvalidRule(TRUE);
+ pOld->SetInvalidRule(sal_True);
}
return ;
@@ -781,12 +789,12 @@ void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule )
SwNumRule::tTxtNodeList aTxtNodeList;
pOld->GetTxtNodeList( aTxtNodeList );
- BYTE nLvl( 0 );
+ sal_uInt8 nLvl( 0 );
for ( SwNumRule::tTxtNodeList::iterator aIter = aTxtNodeList.begin();
aIter != aTxtNodeList.end(); ++aIter )
{
SwTxtNode* pTxtNd = *aIter;
- nLvl = static_cast<BYTE>(pTxtNd->GetActualListLevel());
+ nLvl = static_cast<sal_uInt8>(pTxtNd->GetActualListLevel());
if( nLvl < MAXLEVEL )
{
@@ -802,7 +810,7 @@ void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule )
pOld->Set( n, rRule.GetNumFmt( n ));
pOld->CheckCharFmts( &rDoc );
- pOld->SetInvalidRule(TRUE);
+ pOld->SetInvalidRule(sal_True);
pOld->SetContinusNum( rRule.IsContinusNum() );
rDoc.UpdateNumRule();
@@ -816,11 +824,12 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
const bool bResetIndentAttrs )
{
SwUndoInsNum * pUndo = NULL;
- if (DoesUndo())
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- StartUndo( UNDO_INSNUM, NULL ); // Klammerung fuer die Attribute!
- AppendUndo( pUndo = new SwUndoInsNum( rPam, rRule ) );
+ // Start/End for attributes!
+ GetIDocumentUndoRedo().StartUndo( UNDO_INSNUM, NULL );
+ pUndo = new SwUndoInsNum( rPam, rRule );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
SwNumRule * pNew = FindNumRulePtr( rRule.GetName() );
@@ -923,32 +932,65 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
{
SvUShortsSort aResetAttrsArray;
aResetAttrsArray.Insert( RES_LR_SPACE );
- ResetAttrs( rPam, sal_True, &aResetAttrsArray );
+ // --> OD 2010-10-05 #i114929#
+ // On a selection setup a corresponding Point-and-Mark in order to get
+ // the indentation attribute reset on all paragraphs touched by the selection
+ if ( rPam.HasMark() &&
+ rPam.End()->nNode.GetNode().GetTxtNode() )
+ {
+ SwPaM aPam( rPam.Start()->nNode,
+ rPam.End()->nNode );
+ aPam.Start()->nContent = 0;
+ aPam.End()->nContent = rPam.End()->nNode.GetNode().GetTxtNode()->Len();
+ ResetAttrs( aPam, sal_False, &aResetAttrsArray );
+ }
+ else
+ {
+ ResetAttrs( rPam, sal_False, &aResetAttrsArray );
+ }
+ // <--
}
- if (DoesUndo())
- EndUndo( UNDO_INSNUM, NULL );
+ if (GetIDocumentUndoRedo().DoesUndo())
+ {
+ GetIDocumentUndoRedo().EndUndo( UNDO_INSNUM, NULL );
+ }
SetModified();
}
void SwDoc::SetCounted(const SwPaM & rPam, bool bCounted)
{
-
if ( bCounted )
{
SvUShortsSort aResetAttrsArray;
aResetAttrsArray.Insert( RES_PARATR_LIST_ISCOUNTED );
- ResetAttrs( rPam, sal_True, &aResetAttrsArray );
+ // --> OD 2010-10-05 #i114929#
+ // On a selection setup a corresponding Point-and-Mark in order to get
+ // the list-is-counted attribute reset on all paragraphs touched by the selection
+ if ( rPam.HasMark() &&
+ rPam.End()->nNode.GetNode().GetTxtNode() )
+ {
+ SwPaM aPam( rPam.Start()->nNode,
+ rPam.End()->nNode );
+ aPam.Start()->nContent = 0;
+ aPam.End()->nContent = rPam.End()->nNode.GetNode().GetTxtNode()->Len();
+ ResetAttrs( aPam, sal_False, &aResetAttrsArray );
+ }
+ else
+ {
+ ResetAttrs( rPam, sal_False, &aResetAttrsArray );
+ }
+ // <--
}
else
{
InsertPoolItem( rPam,
- SfxBoolItem( RES_PARATR_LIST_ISCOUNTED, FALSE ), 0 );
+ SfxBoolItem( RES_PARATR_LIST_ISCOUNTED, sal_False ), 0 );
}
}
-void SwDoc::SetNumRuleStart( const SwPosition& rPos, BOOL bFlag )
+void SwDoc::SetNumRuleStart( const SwPosition& rPos, sal_Bool bFlag )
{
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
@@ -957,10 +999,10 @@ void SwDoc::SetNumRuleStart( const SwPosition& rPos, BOOL bFlag )
const SwNumRule* pRule = pTxtNd->GetNumRule();
if( pRule && !bFlag != !pTxtNd->IsListRestart())
{
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoNumRuleStart( rPos, bFlag ));
+ SwUndo *const pUndo( new SwUndoNumRuleStart(rPos, bFlag) );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
pTxtNd->SetListRestart(bFlag ? true : false);
@@ -970,7 +1012,7 @@ void SwDoc::SetNumRuleStart( const SwPosition& rPos, BOOL bFlag )
}
}
-void SwDoc::SetNodeNumStart( const SwPosition& rPos, USHORT nStt )
+void SwDoc::SetNodeNumStart( const SwPosition& rPos, sal_uInt16 nStt )
{
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
@@ -979,10 +1021,10 @@ void SwDoc::SetNodeNumStart( const SwPosition& rPos, USHORT nStt )
if ( !pTxtNd->HasAttrListRestartValue() ||
pTxtNd->GetAttrListRestartValue() != nStt )
{
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoNumRuleStart( rPos, nStt ));
+ SwUndo *const pUndo( new SwUndoNumRuleStart(rPos, nStt) );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
pTxtNd->SetAttrListRestartValue( nStt );
@@ -992,24 +1034,23 @@ void SwDoc::SetNodeNumStart( const SwPosition& rPos, USHORT nStt )
}
// loeschen geht nur, wenn die Rule niemand benutzt!
-BOOL SwDoc::DelNumRule( const String& rName, BOOL bBroadcast )
+sal_Bool SwDoc::DelNumRule( const String& rName, sal_Bool bBroadcast )
{
- USHORT nPos = FindNumRule( rName );
+ sal_uInt16 nPos = FindNumRule( rName );
if ( (*pNumRuleTbl)[ nPos ] == GetOutlineNumRule() )
{
OSL_FAIL( "<SwDoc::DelNumRule(..)> - No deletion of outline list style. This is serious defect - please inform OD" );
- return FALSE;
+ return sal_False;
}
if( USHRT_MAX != nPos && !IsUsed( *(*pNumRuleTbl)[ nPos ] ))
{
- if (DoesUndo())
+ if (GetIDocumentUndoRedo().DoesUndo())
{
SwUndo * pUndo =
new SwUndoNumruleDelete(*(*pNumRuleTbl)[nPos], this);
-
- AppendUndo(pUndo);
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
if (bBroadcast)
@@ -1046,9 +1087,9 @@ BOOL SwDoc::DelNumRule( const String& rName, BOOL bBroadcast )
maNumRuleMap.erase(aTmpName);
SetModified();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void SwDoc::ChgNumRuleFmts( const SwNumRule& rRule, const String * pName )
@@ -1057,12 +1098,11 @@ void SwDoc::ChgNumRuleFmts( const SwNumRule& rRule, const String * pName )
if( pRule )
{
SwUndoInsNum* pUndo = 0;
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
pUndo = new SwUndoInsNum( *pRule, rRule );
pUndo->GetHistory();
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
}
::lcl_ChgNumRule( *this, rRule );
@@ -1074,18 +1114,17 @@ void SwDoc::ChgNumRuleFmts( const SwNumRule& rRule, const String * pName )
}
sal_Bool SwDoc::RenameNumRule(const String & rOldName, const String & rNewName,
- BOOL bBroadcast)
+ sal_Bool bBroadcast)
{
sal_Bool bResult = sal_False;
SwNumRule * pNumRule = FindNumRulePtr(rOldName);
if (pNumRule)
{
- if (DoesUndo())
+ if (GetIDocumentUndoRedo().DoesUndo())
{
SwUndo * pUndo = new SwUndoNumruleRename(rOldName, rNewName, this);
-
- AppendUndo(pUndo);
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
SwNumRule::tTxtNodeList aTxtNodeList;
@@ -1114,7 +1153,7 @@ sal_Bool SwDoc::RenameNumRule(const String & rOldName, const String & rNewName,
void SwDoc::StopNumRuleAnimations( OutputDevice* pOut )
{
- for( USHORT n = GetNumRuleTbl().Count(); n; )
+ for( sal_uInt16 n = GetNumRuleTbl().Count(); n; )
{
SwNumRule::tTxtNodeList aTxtNodeList;
GetNumRuleTbl()[ --n ]->GetTxtNodeList( aTxtNodeList );
@@ -1131,20 +1170,21 @@ void SwDoc::StopNumRuleAnimations( OutputDevice* pOut )
}
}
-BOOL SwDoc::ReplaceNumRule( const SwPosition& rPos,
+sal_Bool SwDoc::ReplaceNumRule( const SwPosition& rPos,
const String& rOldRule, const String& rNewRule )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwNumRule *pOldRule = FindNumRulePtr( rOldRule ),
*pNewRule = FindNumRulePtr( rNewRule );
if( pOldRule && pNewRule && pOldRule != pNewRule )
{
SwUndoInsNum* pUndo = 0;
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- StartUndo( UNDO_START, NULL ); // Klammerung fuer die Attribute!
- AppendUndo( pUndo = new SwUndoInsNum( rPos, *pNewRule, rOldRule ) );
+ // Start/End for attributes!
+ GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ pUndo = new SwUndoInsNum( rPos, *pNewRule, rOldRule );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
SwNumRule::tTxtNodeList aTxtNodeList;
@@ -1153,8 +1193,8 @@ BOOL SwDoc::ReplaceNumRule( const SwPosition& rPos,
{
SwRegHistory aRegH( pUndo ? pUndo->GetHistory() : 0 );
- USHORT nChgFmtLevel = 0;
- for( BYTE n = 0; n < MAXLEVEL; ++n )
+ sal_uInt16 nChgFmtLevel = 0;
+ for( sal_uInt8 n = 0; n < MAXLEVEL; ++n )
{
const SwNumFmt& rOldFmt = pOldRule->Get( n ),
& rNewFmt = pNewRule->Get( n );
@@ -1181,10 +1221,10 @@ BOOL SwDoc::ReplaceNumRule( const SwPosition& rPos,
pTxtNd->NumRuleChgd();
}
}
- EndUndo( UNDO_END, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
SetModified();
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -1213,12 +1253,12 @@ void SwDoc::MakeUniqueNumRules(const SwPaM & rPaM)
::std::map<SwNumRule *, ListStyleData> aMyNumRuleMap;
- ULONG nStt = rPaM.Start()->nNode.GetIndex();
- ULONG nEnd = rPaM.End()->nNode.GetIndex();
+ sal_uLong nStt = rPaM.Start()->nNode.GetIndex();
+ sal_uLong nEnd = rPaM.End()->nNode.GetIndex();
bool bFirst = true;
- for (ULONG n = nStt; n <= nEnd; n++)
+ for (sal_uLong n = nStt; n <= nEnd; n++)
{
SwTxtNode * pCNd = GetNodes()[n]->GetTxtNode();
@@ -1274,10 +1314,10 @@ void SwDoc::MakeUniqueNumRules(const SwPaM & rPaM)
}
}
-BOOL SwDoc::NoNum( const SwPaM& rPam )
+sal_Bool SwDoc::NoNum( const SwPaM& rPam )
{
- BOOL bRet = SplitNode( *rPam.GetPoint(), false );
+ sal_Bool bRet = SplitNode( *rPam.GetPoint(), false );
// ist ueberhaupt Nummerierung im Spiel ?
if( bRet )
{
@@ -1292,25 +1332,25 @@ BOOL SwDoc::NoNum( const SwPaM& rPam )
SetModified();
}
else
- bRet = FALSE; // keine Nummerierung , ?? oder immer TRUE ??
+ bRet = sal_False; // keine Nummerierung , ?? oder immer sal_True ??
}
return bRet;
}
void SwDoc::DelNumRules( const SwPaM& rPam )
{
- ULONG nStt = rPam.GetPoint()->nNode.GetIndex(),
+ sal_uLong nStt = rPam.GetPoint()->nNode.GetIndex(),
nEnd = rPam.GetMark()->nNode.GetIndex();
if( nStt > nEnd )
{
- ULONG nTmp = nStt; nStt = nEnd; nEnd = nTmp;
+ sal_uLong nTmp = nStt; nStt = nEnd; nEnd = nTmp;
}
SwUndoDelNum* pUndo;
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( pUndo = new SwUndoDelNum( rPam ) );
+ pUndo = new SwUndoDelNum( rPam );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
else
pUndo = 0;
@@ -1329,13 +1369,13 @@ void SwDoc::DelNumRules( const SwPaM& rPam )
aRegH.RegisterInModify( pTNd, *pTNd );
if( pUndo )
- pUndo->AddNode( *pTNd, FALSE );
+ pUndo->AddNode( *pTNd, sal_False );
// directly set list style attribute is reset, otherwise empty
// list style is applied
const SfxItemSet* pAttrSet = pTNd->GetpSwAttrSet();
if ( pAttrSet &&
- pAttrSet->GetItemState( RES_PARATR_NUMRULE, FALSE ) == SFX_ITEM_SET )
+ pAttrSet->GetItemState( RES_PARATR_NUMRULE, sal_False ) == SFX_ITEM_SET )
pTNd->ResetAttr( RES_PARATR_NUMRULE );
else
pTNd->SetAttr( aEmptyRule );
@@ -1364,21 +1404,21 @@ void SwDoc::DelNumRules( const SwPaM& rPam )
void SwDoc::InvalidateNumRules()
{
- for (USHORT n = 0; n < pNumRuleTbl->Count(); ++n)
- (*pNumRuleTbl)[n]->SetInvalidRule(TRUE);
+ for (sal_uInt16 n = 0; n < pNumRuleTbl->Count(); ++n)
+ (*pNumRuleTbl)[n]->SetInvalidRule(sal_True);
}
// zum naechsten/vorhergehenden Punkt auf gleicher Ebene
-BOOL lcl_IsNumOk( BYTE nSrchNum, BYTE& rLower, BYTE& rUpper,
- BOOL bOverUpper, BYTE nNumber )
+sal_Bool lcl_IsNumOk( sal_uInt8 nSrchNum, sal_uInt8& rLower, sal_uInt8& rUpper,
+ sal_Bool bOverUpper, sal_uInt8 nNumber )
{
OSL_ENSURE( nNumber < MAXLEVEL,
"<lcl_IsNumOk(..)> - misusage of method" );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
{
if( bOverUpper ? nSrchNum == nNumber : nSrchNum >= nNumber )
- bRet = TRUE;
+ bRet = sal_True;
else if( nNumber > rLower )
rLower = nNumber;
else if( nNumber < rUpper )
@@ -1387,9 +1427,9 @@ BOOL lcl_IsNumOk( BYTE nSrchNum, BYTE& rLower, BYTE& rUpper,
return bRet;
}
-BOOL lcl_IsValidPrevNextNumNode( const SwNodeIndex& rIdx )
+sal_Bool lcl_IsValidPrevNextNumNode( const SwNodeIndex& rIdx )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwNode& rNd = rIdx.GetNode();
switch( rNd.GetNodeType() )
{
@@ -1403,28 +1443,28 @@ BOOL lcl_IsValidPrevNextNumNode( const SwNodeIndex& rIdx )
break;
case ND_SECTIONNODE: // der ist erlaubt, also weiter
- bRet = TRUE;
+ bRet = sal_True;
break;
}
return bRet;
}
-BOOL lcl_GotoNextPrevNum( SwPosition& rPos, BOOL bNext,
- BOOL bOverUpper, BYTE* pUpper, BYTE* pLower )
+sal_Bool lcl_GotoNextPrevNum( SwPosition& rPos, sal_Bool bNext,
+ sal_Bool bOverUpper, sal_uInt8* pUpper, sal_uInt8* pLower )
{
const SwTxtNode* pNd = rPos.nNode.GetNode().GetTxtNode();
const SwNumRule* pRule;
if( !pNd || 0 == ( pRule = pNd->GetNumRule()))
- return FALSE;
+ return sal_False;
- BYTE nSrchNum = static_cast<BYTE>(pNd->GetActualListLevel());
+ sal_uInt8 nSrchNum = static_cast<sal_uInt8>(pNd->GetActualListLevel());
SwNodeIndex aIdx( rPos.nNode );
if( ! pNd->IsCountedInList() )
{
// falls gerade mal NO_NUMLEVEL an ist, so such den vorherigen Node
// mit Nummerierung
- BOOL bError = FALSE;
+ sal_Bool bError = sal_False;
do {
aIdx--;
if( aIdx.GetNode().IsTxtNode() )
@@ -1432,28 +1472,28 @@ BOOL lcl_GotoNextPrevNum( SwPosition& rPos, BOOL bNext,
pNd = aIdx.GetNode().GetTxtNode();
pRule = pNd->GetNumRule();
- BYTE nTmpNum;
+ sal_uInt8 nTmpNum;
if( pRule )
{
- nTmpNum = static_cast<BYTE>(pNd->GetActualListLevel());
+ nTmpNum = static_cast<sal_uInt8>(pNd->GetActualListLevel());
if( !( ! pNd->IsCountedInList() &&
(nTmpNum >= nSrchNum )) )
break; // gefunden
}
else
- bError = TRUE;
+ bError = sal_True;
}
else
bError = !lcl_IsValidPrevNextNumNode( aIdx );
} while( !bError );
if( bError )
- return FALSE;
+ return sal_False;
}
- BYTE nLower = nSrchNum, nUpper = nSrchNum;
- BOOL bRet = FALSE;
+ sal_uInt8 nLower = nSrchNum, nUpper = nSrchNum;
+ sal_Bool bRet = sal_False;
const SwTxtNode* pLast;
if( bNext )
@@ -1471,11 +1511,11 @@ BOOL lcl_GotoNextPrevNum( SwPosition& rPos, BOOL bNext,
if( pRule )
{
if( ::lcl_IsNumOk( nSrchNum, nLower, nUpper, bOverUpper,
- static_cast<BYTE>(pNd->GetActualListLevel()) ))
+ static_cast<sal_uInt8>(pNd->GetActualListLevel()) ))
{
rPos.nNode = aIdx;
rPos.nContent.Assign( (SwTxtNode*)pNd, 0 );
- bRet = TRUE;
+ bRet = sal_True;
break;
}
else
@@ -1506,7 +1546,7 @@ BOOL lcl_GotoNextPrevNum( SwPosition& rPos, BOOL bNext,
rPos.nNode.Assign( *pLast );
rPos.nContent.Assign( (SwTxtNode*)pLast, 0 );
}
- bRet = TRUE;
+ bRet = sal_True;
}
if( bRet )
@@ -1519,10 +1559,10 @@ BOOL lcl_GotoNextPrevNum( SwPosition& rPos, BOOL bNext,
return bRet;
}
-BOOL SwDoc::GotoNextNum( SwPosition& rPos, BOOL bOverUpper,
- BYTE* pUpper, BYTE* pLower )
+sal_Bool SwDoc::GotoNextNum( SwPosition& rPos, sal_Bool bOverUpper,
+ sal_uInt8* pUpper, sal_uInt8* pLower )
{
- return ::lcl_GotoNextPrevNum( rPos, TRUE, bOverUpper, pUpper, pLower );
+ return ::lcl_GotoNextPrevNum( rPos, sal_True, bOverUpper, pUpper, pLower );
}
const SwNumRule * SwDoc::SearchNumRule(const SwPosition & rPos,
@@ -1560,7 +1600,7 @@ const SwNumRule * SwDoc::SearchNumRule(const SwPosition & rPos,
const SwNumRule * pNumRule = pTxtNd->GetNumRule();
if (pNumRule)
{
- if ( ( pNumRule->IsOutlineRule() == ( bOutline ? TRUE : FALSE ) ) &&
+ if ( ( pNumRule->IsOutlineRule() == ( bOutline ? sal_True : sal_False ) ) &&
( ( bNum && pNumRule->Get(0).IsEnumeration()) ||
( !bNum && pNumRule->Get(0).IsItemize() ) ) ) // #i22362#, #i29560#
{
@@ -1593,33 +1633,33 @@ const SwNumRule * SwDoc::SearchNumRule(const SwPosition & rPos,
pNode = &aIdx.GetNode();
}
- while (! (pNode == aNodes.DocumentSectionStartNode(pStartFromNode) ||
- pNode == aNodes.DocumentSectionEndNode(pStartFromNode)));
+ while (!(pNode == GetNodes().DocumentSectionStartNode(pStartFromNode) ||
+ pNode == GetNodes().DocumentSectionEndNode(pStartFromNode)));
}
return pResult;
}
-BOOL SwDoc::GotoPrevNum( SwPosition& rPos, BOOL bOverUpper,
- BYTE* pUpper, BYTE* pLower )
+sal_Bool SwDoc::GotoPrevNum( SwPosition& rPos, sal_Bool bOverUpper,
+ sal_uInt8* pUpper, sal_uInt8* pLower )
{
- return ::lcl_GotoNextPrevNum( rPos, FALSE, bOverUpper, pUpper, pLower );
+ return ::lcl_GotoNextPrevNum( rPos, sal_False, bOverUpper, pUpper, pLower );
}
-BOOL SwDoc::NumUpDown( const SwPaM& rPam, BOOL bDown )
+sal_Bool SwDoc::NumUpDown( const SwPaM& rPam, sal_Bool bDown )
{
- ULONG nStt = rPam.GetPoint()->nNode.GetIndex(),
+ sal_uLong nStt = rPam.GetPoint()->nNode.GetIndex(),
nEnd = rPam.GetMark()->nNode.GetIndex();
if( nStt > nEnd )
{
- ULONG nTmp = nStt; nStt = nEnd; nEnd = nTmp;
+ sal_uLong nTmp = nStt; nStt = nEnd; nEnd = nTmp;
}
// -> outline nodes are promoted or demoted differently
bool bOnlyOutline = true;
bool bOnlyNonOutline = true;
- for (ULONG n = nStt; n <= nEnd; n++)
+ for (sal_uLong n = nStt; n <= nEnd; n++)
{
SwTxtNode * pTxtNd = GetNodes()[n]->GetTxtNode();
@@ -1637,7 +1677,7 @@ BOOL SwDoc::NumUpDown( const SwPaM& rPam, BOOL bDown )
}
}
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
char nDiff = bDown ? 1 : -1;
if (bOnlyOutline)
@@ -1650,7 +1690,7 @@ BOOL SwDoc::NumUpDown( const SwPaM& rPam, BOOL bDown )
promotable resp. demotable.
*/
- for (ULONG nTmp = nStt; nTmp <= nEnd; ++nTmp)
+ for (sal_uLong nTmp = nStt; nTmp <= nEnd; ++nTmp)
{
SwTxtNode* pTNd = GetNodes()[ nTmp ]->GetTxtNode();
@@ -1662,25 +1702,25 @@ BOOL SwDoc::NumUpDown( const SwPaM& rPam, BOOL bDown )
if (pRule)
{
- BYTE nLevel = static_cast<BYTE>(pTNd->GetActualListLevel());
+ sal_uInt8 nLevel = static_cast<sal_uInt8>(pTNd->GetActualListLevel());
if( (-1 == nDiff && 0 >= nLevel) ||
(1 == nDiff && MAXLEVEL - 1 <= nLevel))
- bRet = FALSE;
+ bRet = sal_False;
}
}
}
if( bRet )
{
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoNumUpDown( rPam, nDiff ) );
+ SwUndo *const pUndo( new SwUndoNumUpDown(rPam, nDiff) );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
String sNumRule;
- for(ULONG nTmp = nStt; nTmp <= nEnd; ++nTmp )
+ for(sal_uLong nTmp = nStt; nTmp <= nEnd; ++nTmp )
{
SwTxtNode* pTNd = GetNodes()[ nTmp ]->GetTxtNode();
@@ -1690,7 +1730,7 @@ BOOL SwDoc::NumUpDown( const SwPaM& rPam, BOOL bDown )
if (pRule)
{
- BYTE nLevel = static_cast<BYTE>(pTNd->GetActualListLevel());
+ sal_uInt8 nLevel = static_cast<sal_uInt8>(pTNd->GetActualListLevel());
nLevel = nLevel + nDiff;
pTNd->SetAttrListLevel(nLevel);
@@ -1706,12 +1746,12 @@ BOOL SwDoc::NumUpDown( const SwPaM& rPam, BOOL bDown )
return bRet;
}
-BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
+sal_Bool SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, sal_Bool bIsOutlMv )
{
const SwPosition *pStt = rPam.Start(), *pEnd = rPam.End();
- ULONG nStIdx = pStt->nNode.GetIndex();
- ULONG nEndIdx = pEnd->nNode.GetIndex();
+ sal_uLong nStIdx = pStt->nNode.GetIndex();
+ sal_uLong nEndIdx = pEnd->nNode.GetIndex();
// Here are some sophisticated checks whether the wished PaM will be moved or not.
// For moving outlines (bIsOutlMv) I've already done some checks, so here are two different
@@ -1731,24 +1771,24 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
{ // First is a start node
pTmp2 = pTmp1->EndOfSectionNode();
if( pTmp2->GetIndex() > nEndIdx )
- return FALSE; // Its end node is behind the moved range
+ return sal_False; // Its end node is behind the moved range
}
pTmp1 = pTmp1->StartOfSectionNode()->EndOfSectionNode();
if( pTmp1->GetIndex() <= nEndIdx )
- return FALSE; // End node inside but start node before moved range => no.
+ return sal_False; // End node inside but start node before moved range => no.
pTmp1 = GetNodes()[ nEndIdx ];
if( pTmp1->IsEndNode() )
{ // The last one is an end node
pTmp1 = pTmp1->StartOfSectionNode();
if( pTmp1->GetIndex() < nStIdx )
- return FALSE; // Its start node is before the moved range.
+ return sal_False; // Its start node is before the moved range.
}
pTmp1 = pTmp1->StartOfSectionNode();
if( pTmp1->GetIndex() >= nStIdx )
- return FALSE; // A start node which ends behind the moved area => no.
+ return sal_False; // A start node which ends behind the moved area => no.
}
- ULONG nInStIdx, nInEndIdx;
+ sal_uLong nInStIdx, nInEndIdx;
long nOffs = nOffset;
if( nOffset > 0 )
{
@@ -1759,8 +1799,8 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
else
{
//Impossible to move to negative index
- if( ULONG(abs( nOffset )) > nStIdx)
- return FALSE;
+ if( sal_uLong(abs( nOffset )) > nStIdx)
+ return sal_False;
nInEndIdx = nStIdx - 1;
nStIdx += nOffset;
@@ -1770,7 +1810,7 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
// [ nStIdx, nInEndIdx ] mit [ nInStIdx, nEndIdx ]
if( nEndIdx >= GetNodes().GetEndOfContent().GetIndex() )
- return FALSE;
+ return sal_False;
if( !bIsOutlMv )
{ // And here the restrictions for moving paragraphs other than chapters (outlines)
@@ -1781,7 +1821,7 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
pTmp1 = GetNodes()[ nStIdx ]->StartOfSectionNode();
pTmp2 = GetNodes()[ nInStIdx ]->StartOfSectionNode();
if( pTmp1 != pTmp2 )
- return FALSE; // "start" nodes in different sections
+ return sal_False; // "start" nodes in different sections
pTmp1 = GetNodes()[ nEndIdx ];
bool bIsEndNode = pTmp1->IsEndNode();
if( !pTmp1->IsStartNode() )
@@ -1801,21 +1841,21 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
}
pTmp2 = pTmp2->EndOfSectionNode();
if( pTmp1 != pTmp2 )
- return FALSE; // The "end" notes are in different sections
+ return sal_False; // The "end" notes are in different sections
}
// auf Redlining testen - darf die Selektion ueberhaupt verschoben
// werden?
if( !IsIgnoreRedline() )
{
- USHORT nRedlPos = GetRedlinePos( pStt->nNode.GetNode(), nsRedlineType_t::REDLINE_DELETE );
+ sal_uInt16 nRedlPos = GetRedlinePos( pStt->nNode.GetNode(), nsRedlineType_t::REDLINE_DELETE );
if( USHRT_MAX != nRedlPos )
{
SwPosition aStPos( *pStt ), aEndPos( *pEnd );
aStPos.nContent = 0;
SwCntntNode* pCNd = pEnd->nNode.GetNode().GetCntntNode();
aEndPos.nContent = pCNd ? pCNd->Len() : 1;
- BOOL bCheckDel = TRUE;
+ sal_Bool bCheckDel = sal_True;
// es existiert fuer den Bereich irgendein Redline-Delete-Object
for( ; nRedlPos < GetRedlineTbl().Count(); ++nRedlPos )
@@ -1837,14 +1877,14 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
case POS_INSIDE: // Pos1 liegt vollstaendig in Pos2
// ist erlaubt, aber checke dann alle nachfolgenden
// auf Ueberlappungen
- bCheckDel = FALSE;
+ bCheckDel = sal_False;
break;
case POS_OUTSIDE: // Pos2 liegt vollstaendig in Pos1
case POS_EQUAL: // Pos1 ist genauso gross wie Pos2
case POS_OVERLAP_BEFORE: // Pos1 ueberlappt Pos2 am Anfang
case POS_OVERLAP_BEHIND: // Pos1 ueberlappt Pos2 am Ende
- return FALSE;
+ return sal_False;
}
}
}
@@ -1866,7 +1906,7 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
{
// wenn der Bereich komplett im eigenen Redline liegt, kann es
// verschoben werden!
- USHORT nRedlPos = GetRedlinePos( pStt->nNode.GetNode(), nsRedlineType_t::REDLINE_INSERT );
+ sal_uInt16 nRedlPos = GetRedlinePos( pStt->nNode.GetNode(), nsRedlineType_t::REDLINE_INSERT );
if( USHRT_MAX != nRedlPos )
{
SwRedline* pTmp = GetRedlineTbl()[ nRedlPos ];
@@ -1902,7 +1942,7 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
if( !pOwnRedl )
{
- StartUndo( UNDO_START, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
// zuerst das Insert, dann das Loeschen
SwPosition aInsPos( aIdx );
@@ -1914,7 +1954,7 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
rOrigPam.DeleteMark();
rOrigPam.GetPoint()->nNode = aIdx.GetIndex() - 1;
- BOOL bDelLastPara = !aInsPos.nNode.GetNode().IsCntntNode();
+ sal_Bool bDelLastPara = !aInsPos.nNode.GetNode().IsCntntNode();
/* When copying to a non-content node Copy will
insert a paragraph before that node and insert before
@@ -1927,7 +1967,7 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
/* aInsPos points to the non-content node. Move it to
the previous content node. */
SwPaM aInsPam(aInsPos);
- BOOL bMoved = aInsPam.Move(fnMoveBackward);
+ sal_Bool bMoved = aInsPam.Move(fnMoveBackward);
OSL_ENSURE(bMoved, "No content node found!");
if (bMoved)
@@ -1953,21 +1993,21 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
// alle die im zu loeschenden Node stehen, mussen auf den
// naechsten umgestezt werden
SwPosition* pPos;
- for( USHORT n = 0; n < GetRedlineTbl().Count(); ++n )
+ for( sal_uInt16 n = 0; n < GetRedlineTbl().Count(); ++n )
{
SwRedline* pTmp = GetRedlineTbl()[ n ];
- if( ( pPos = &pTmp->GetBound(TRUE))->nNode == aIdx )
+ if( ( pPos = &pTmp->GetBound(sal_True))->nNode == aIdx )
{
pPos->nNode++;
pPos->nContent.Assign( pPos->nNode.GetNode().GetCntntNode(),0);
}
- if( ( pPos = &pTmp->GetBound(FALSE))->nNode == aIdx )
+ if( ( pPos = &pTmp->GetBound(sal_False))->nNode == aIdx )
{
pPos->nNode++;
pPos->nContent.Assign( pPos->nNode.GetNode().GetCntntNode(),0);
}
}
- CorrRel( aIdx, aInsPos, 0, FALSE );
+ CorrRel( aIdx, aInsPos, 0, sal_False );
pCNd->JoinNext();
}
@@ -1977,12 +2017,13 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
RedlineMode_t eOld = GetRedlineMode();
checkRedlining(eOld);
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
//JP 06.01.98: MUSS noch optimiert werden!!!
SetRedlineMode(
(RedlineMode_t)(nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE));
- AppendUndo( new SwUndoRedlineDelete( aPam, UNDO_DELETE ));
+ SwUndo *const pUndo(new SwUndoRedlineDelete(aPam, UNDO_DELETE));
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
SwRedline* pNewRedline = new SwRedline( nsRedlineType_t::REDLINE_DELETE, aPam );
@@ -1990,17 +2031,17 @@ BOOL SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv )
// prevent assertion from aPam's target being deleted
// (Alternatively, one could just let aPam go out of scope, but
// that requires touching a lot of code.)
- aPam.GetBound(TRUE).nContent.Assign( NULL, 0 );
- aPam.GetBound(FALSE).nContent.Assign( NULL, 0 );
+ aPam.GetBound(sal_True).nContent.Assign( NULL, 0 );
+ aPam.GetBound(sal_False).nContent.Assign( NULL, 0 );
AppendRedline( pNewRedline, true );
//JP 06.01.98: MUSS noch optimiert werden!!!
SetRedlineMode( eOld );
- EndUndo( UNDO_END, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
SetModified();
- return TRUE;
+ return sal_True;
}
}
@@ -2010,7 +2051,7 @@ SetRedlineMode( eOld );
SplitRedline(aTemp);
}
- ULONG nRedlSttNd(0), nRedlEndNd(0);
+ sal_uLong nRedlSttNd(0), nRedlEndNd(0);
if( pOwnRedl )
{
const SwPosition *pRStt = pOwnRedl->Start(), *pREnd = pOwnRedl->End();
@@ -2019,8 +2060,8 @@ SetRedlineMode( eOld );
}
SwUndoMoveNum* pUndo = 0;
- ULONG nMoved = 0;
- if( DoesUndo() )
+ sal_uLong nMoved = 0;
+ if (GetIDocumentUndoRedo().DoesUndo())
{
pUndo = new SwUndoMoveNum( rPam, nOffset, bIsOutlMv );
nMoved = rPam.End()->nNode.GetIndex() - rPam.Start()->nNode.GetIndex() + 1;
@@ -2031,13 +2072,12 @@ SetRedlineMode( eOld );
if( pUndo )
{
- ClearRedo();
// i57907: Under circumstances (sections at the end of a chapter)
// the rPam.Start() is not moved to the new position.
// But aIdx should be at the new end position and as long as the number of moved paragraphs
// is nMoved, I know, where the new position is.
pUndo->SetStartNode( aIdx.GetIndex() - nMoved );
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
if( pOwnRedl )
@@ -2058,12 +2098,12 @@ SetRedlineMode( eOld );
}
SetModified();
- return TRUE;
+ return sal_True;
}
-BOOL SwDoc::NumOrNoNum( const SwNodeIndex& rIdx, BOOL bDel )
+sal_Bool SwDoc::NumOrNoNum( const SwNodeIndex& rIdx, sal_Bool bDel )
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
SwTxtNode * pTxtNd = rIdx.GetNode().GetTxtNode();
if (pTxtNd && pTxtNd->GetNumRule() != NULL &&
@@ -2071,23 +2111,23 @@ BOOL SwDoc::NumOrNoNum( const SwNodeIndex& rIdx, BOOL bDel )
{
if ( !pTxtNd->IsCountedInList() == !bDel)
{
- BOOL bOldNum = bDel; // == pTxtNd->IsCounted();
- BOOL bNewNum = bDel ? FALSE : TRUE;
+ sal_Bool bOldNum = bDel; // == pTxtNd->IsCounted();
+ sal_Bool bNewNum = bDel ? sal_False : sal_True;
pTxtNd->SetCountedInList(bNewNum ? true : false);
SetModified();
- bResult = TRUE;
+ bResult = sal_True;
- if (DoesUndo())
+ if (GetIDocumentUndoRedo().DoesUndo())
{
SwUndoNumOrNoNum * pUndo =
new SwUndoNumOrNoNum(rIdx, bOldNum, bNewNum);
- AppendUndo(pUndo);
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
}
- else if (bDel && pTxtNd->GetNumRule(FALSE) &&
+ else if (bDel && pTxtNd->GetNumRule(sal_False) &&
pTxtNd->GetActualListLevel() >= 0 &&
pTxtNd->GetActualListLevel() < MAXLEVEL)
{
@@ -2095,7 +2135,7 @@ BOOL SwDoc::NumOrNoNum( const SwNodeIndex& rIdx, BOOL bDel )
DelNumRules(aPam);
- bResult = TRUE;
+ bResult = sal_True;
}
}
@@ -2115,9 +2155,9 @@ SwNumRule* SwDoc::GetCurrNumRule( const SwPosition& rPos ) const
return pRet;
}
-USHORT SwDoc::FindNumRule( const String& rName ) const
+sal_uInt16 SwDoc::FindNumRule( const String& rName ) const
{
- for( USHORT n = pNumRuleTbl->Count(); n; )
+ for( sal_uInt16 n = pNumRuleTbl->Count(); n; )
if( (*pNumRuleTbl)[ --n ]->GetName() == rName )
return n;
@@ -2132,7 +2172,7 @@ SwNumRule* SwDoc::FindNumRulePtr( const String& rName ) const
if ( !pResult )
{
- for (USHORT n = 0; n < pNumRuleTbl->Count(); ++n)
+ for (sal_uInt16 n = 0; n < pNumRuleTbl->Count(); ++n)
{
if ((*pNumRuleTbl)[n]->GetName() == rName)
{
@@ -2155,9 +2195,9 @@ void SwDoc::AddNumRule(SwNumRule * pRule)
createListForListStyle( pRule->GetName() );
}
-USHORT SwDoc::MakeNumRule( const String &rName,
+sal_uInt16 SwDoc::MakeNumRule( const String &rName,
const SwNumRule* pCpy,
- BOOL bBroadcast,
+ sal_Bool bBroadcast,
const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode )
{
SwNumRule* pNew;
@@ -2182,15 +2222,14 @@ USHORT SwDoc::MakeNumRule( const String &rName,
eDefaultNumberFormatPositionAndSpaceMode );
}
- USHORT nRet = pNumRuleTbl->Count();
+ sal_uInt16 nRet = pNumRuleTbl->Count();
AddNumRule(pNew);
- if (DoesUndo())
+ if (GetIDocumentUndoRedo().DoesUndo())
{
SwUndo * pUndo = new SwUndoNumruleCreate(pNew, this);
-
- AppendUndo(pUndo);
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
if (bBroadcast)
@@ -2200,7 +2239,7 @@ USHORT SwDoc::MakeNumRule( const String &rName,
return nRet;
}
-String SwDoc::GetUniqueNumRuleName( const String* pChkStr, BOOL bAutoNum ) const
+String SwDoc::GetUniqueNumRuleName( const String* pChkStr, sal_Bool bAutoNum ) const
{
String aName;
if( bAutoNum )
@@ -2219,8 +2258,8 @@ String SwDoc::GetUniqueNumRuleName( const String* pChkStr, BOOL bAutoNum ) const
aName = SW_RESSTR( STR_NUMRULE_DEFNAME );
}
- USHORT nNum(0), nTmp, nFlagSize = ( pNumRuleTbl->Count() / 8 ) +2;
- BYTE* pSetFlags = new BYTE[ nFlagSize ];
+ sal_uInt16 nNum(0), nTmp, nFlagSize = ( pNumRuleTbl->Count() / 8 ) +2;
+ sal_uInt8* pSetFlags = new sal_uInt8[ nFlagSize ];
memset( pSetFlags, 0, nFlagSize );
xub_StrLen nNmLen = aName.Len();
@@ -2238,7 +2277,7 @@ String SwDoc::GetUniqueNumRuleName( const String* pChkStr, BOOL bAutoNum ) const
}
const SwNumRule* pNumRule;
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < pNumRuleTbl->Count(); ++n )
if( 0 != ( pNumRule = (*pNumRuleTbl)[ n ] ) )
@@ -2247,7 +2286,7 @@ String SwDoc::GetUniqueNumRuleName( const String* pChkStr, BOOL bAutoNum ) const
if( rNm.Match( aName ) == nNmLen )
{
// Nummer bestimmen und das Flag setzen
- nNum = (USHORT)rNm.Copy( nNmLen ).ToInt32();
+ nNum = (sal_uInt16)rNm.Copy( nNmLen ).ToInt32();
if( nNum-- && nNum < pNumRuleTbl->Count() )
pSetFlags[ nNum / 8 ] |= (0x01 << ( nNum & 0x07 ));
}
@@ -2279,14 +2318,14 @@ String SwDoc::GetUniqueNumRuleName( const String* pChkStr, BOOL bAutoNum ) const
void SwDoc::UpdateNumRule()
{
const SwNumRuleTbl& rNmTbl = GetNumRuleTbl();
- for( USHORT n = 0; n < rNmTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rNmTbl.Count(); ++n )
if( rNmTbl[ n ]->IsInvalidRule() )
rNmTbl[ n ]->Validate();
}
void SwDoc::MarkListLevel( const String& sListId,
const int nListLevel,
- const BOOL bValue )
+ const sal_Bool bValue )
{
SwList* pList = getListByName( sListId );
@@ -2298,15 +2337,15 @@ void SwDoc::MarkListLevel( const String& sListId,
void SwDoc::MarkListLevel( SwList& rList,
const int nListLevel,
- const BOOL bValue )
+ const sal_Bool bValue )
{
// Set new marked list level and notify all affected nodes of the changed mark.
rList.MarkListLevel( nListLevel, bValue );
}
-BOOL SwDoc::IsFirstOfNumRule(SwPosition & rPos)
+sal_Bool SwDoc::IsFirstOfNumRule(SwPosition & rPos)
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
SwTxtNode * pTxtNode = rPos.nNode.GetNode().GetTxtNode();
if (pTxtNode)
@@ -2407,7 +2446,7 @@ sal_Int32 SwDoc::getOutlineNodesCount() const
int SwDoc::getOutlineLevel( const sal_Int32 nIdx ) const
{
- return GetNodes().GetOutLineNds()[ static_cast<USHORT>(nIdx) ]->
+ return GetNodes().GetOutLineNds()[ static_cast<sal_uInt16>(nIdx) ]->
// GetTxtNode()->GetOutlineLevel(); //#outline level,zhaojianwei
GetTxtNode()->GetAttrOutlineLevel()-1; //<-end,zhaojianwei
}
@@ -2416,14 +2455,14 @@ String SwDoc::getOutlineText( const sal_Int32 nIdx,
const bool bWithNumber,
const bool bWithSpacesForLevel ) const
{
- return GetNodes().GetOutLineNds()[ static_cast<USHORT>(nIdx) ]->
+ return GetNodes().GetOutLineNds()[ static_cast<sal_uInt16>(nIdx) ]->
GetTxtNode()->GetExpandTxt( 0, STRING_LEN, bWithNumber,
bWithNumber, bWithSpacesForLevel );
}
SwTxtNode* SwDoc::getOutlineNode( const sal_Int32 nIdx ) const
{
- return GetNodes().GetOutLineNds()[ static_cast<USHORT>(nIdx) ]->GetTxtNode();
+ return GetNodes().GetOutLineNds()[ static_cast<sal_uInt16>(nIdx) ]->GetTxtNode();
}
void SwDoc::getOutlineNodes( IDocumentOutlineNodes::tSortedOutlineNodeList& orOutlineNodeList ) const
@@ -2431,8 +2470,8 @@ void SwDoc::getOutlineNodes( IDocumentOutlineNodes::tSortedOutlineNodeList& orOu
orOutlineNodeList.clear();
orOutlineNodeList.reserve( getOutlineNodesCount() );
- const USHORT nOutlCount( static_cast<USHORT>(getOutlineNodesCount()) );
- for ( USHORT i = 0; i < nOutlCount; ++i )
+ const sal_uInt16 nOutlCount( static_cast<sal_uInt16>(getOutlineNodesCount()) );
+ for ( sal_uInt16 i = 0; i < nOutlCount; ++i )
{
orOutlineNodeList.push_back(
GetNodes().GetOutLineNds()[i]->GetTxtNode() );
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index d807706d9710..e409ec3462d8 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -39,11 +39,14 @@
#include <editeng/crsditem.hxx>
#include <swmodule.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docary.hxx>
#include <ndtxt.hxx>
#include <redline.hxx>
#include <swundo.hxx>
-#include <undobj.hxx>
+#include <UndoCore.hxx>
+#include <UndoRedline.hxx>
+#include <hints.hxx>
#include <pamtyp.hxx>
#include <poolfmt.hxx>
#include <viewsh.hxx>
@@ -100,10 +103,10 @@ TYPEINIT1(SwRedlineHint, SfxHint);
const SwRedlineTbl& rTbl = pDoc->GetRedlineTbl();
// verify valid redline positions
- for( USHORT i = 0; i < rTbl.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rTbl.Count(); ++i )
lcl_CheckPam( rTbl[ i ] );
- for( USHORT j = 0; j < rTbl.Count(); ++j )
+ for( sal_uInt16 j = 0; j < rTbl.Count(); ++j )
{
// check for empty redlines
DBG_ASSERT( ( *(rTbl[j]->GetPoint()) != *(rTbl[j]->GetMark()) ) ||
@@ -112,7 +115,7 @@ TYPEINIT1(SwRedlineHint, SfxHint);
}
// verify proper redline sorting
- for( USHORT n = 1; n < rTbl.Count(); ++n )
+ for( sal_uInt16 n = 1; n < rTbl.Count(); ++n )
{
const SwRedline* pPrev = rTbl[ n-1 ];
const SwRedline* pCurrent = rTbl[ n ];
@@ -131,11 +134,11 @@ TYPEINIT1(SwRedlineHint, SfxHint);
void lcl_DebugRedline( const SwDoc* pDoc )
{
- static USHORT nWatch = 0;
+ static sal_uInt16 nWatch = 0;
const SwRedlineTbl& rTbl = pDoc->GetRedlineTbl();
- for( USHORT n = 0; n < rTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
{
- USHORT nDummy = 0;
+ sal_uInt16 nDummy = 0;
const SwRedline* pCurrent = rTbl[ n ];
const SwRedline* pNext = n+1 < rTbl.Count() ? rTbl[ n+1 ] : 0;
if( pCurrent == pNext )
@@ -172,7 +175,7 @@ void SwDoc::SetRedlineMode( RedlineMode_t eMode )
bool bSaveInXMLImportFlag = IsInXMLImport();
SetInXMLImport( false );
// und dann alles verstecken, anzeigen
- void (SwRedline::*pFnc)( USHORT ) = 0;
+ void (SwRedline::*pFnc)( sal_uInt16 ) = 0;
switch( nsRedlineMode_t::REDLINE_SHOW_MASK & eMode )
{
@@ -195,8 +198,8 @@ void SwDoc::SetRedlineMode( RedlineMode_t eMode )
_CHECK_REDLINE( this )
if( pFnc )
- for( USHORT nLoop = 1; nLoop <= 2; ++nLoop )
- for( USHORT i = 0; i < pRedlineTbl->Count(); ++i )
+ for( sal_uInt16 nLoop = 1; nLoop <= 2; ++nLoop )
+ for( sal_uInt16 i = 0; i < pRedlineTbl->Count(); ++i )
((*pRedlineTbl)[ i ]->*pFnc)( nLoop );
_CHECK_REDLINE( this )
SetInXMLImport( bSaveInXMLImportFlag );
@@ -367,10 +370,10 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
( pNewRedl->GetContentIdx() == NULL ) )
{ // Do not insert empty redlines
delete pNewRedl;
- return FALSE;
+ return sal_False;
}
- BOOL bCompress = FALSE;
- USHORT n = 0;
+ sal_Bool bCompress = sal_False;
+ sal_uInt16 n = 0;
// zur StartPos das erste Redline suchen
if( !GetRedline( *pStt, &n ) && n )
--n;
@@ -470,7 +473,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
if( bDelete )
{
delete pNewRedl, pNewRedl = 0;
- bCompress = TRUE;
+ bCompress = sal_True;
}
}
else if( POS_INSIDE == eCmpPos )
@@ -670,7 +673,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
case POS_INSIDE:
case POS_EQUAL:
delete pNewRedl, pNewRedl = 0;
- bCompress = TRUE;
+ bCompress = sal_True;
break;
case POS_OVERLAP_BEFORE:
@@ -722,7 +725,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
// delete current (below), and restart process with
// previous
- USHORT nToBeDeleted = n;
+ sal_uInt16 nToBeDeleted = n;
bDec = true;
if( *(pNewRedl->Start()) <= *pREnd )
@@ -761,7 +764,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
switch( eCmpPos )
{
case POS_EQUAL:
- bCompress = TRUE;
+ bCompress = sal_True;
pRedlineTbl->DeleteAndDestroy( n );
bDec = true;
// kein break!
@@ -788,7 +791,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
else
DeleteAndJoin( *pNewRedl );
- bCompress = TRUE;
+ bCompress = sal_True;
}
delete pNewRedl, pNewRedl = 0;
break;
@@ -803,7 +806,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
{
pRedlineTbl->SavePtrInArr( pNewRedl );
DeleteAndJoin( *pRedl );
- USHORT nFnd = pRedlineTbl->GetPos(pNewRedl );
+ sal_uInt16 nFnd = pRedlineTbl->GetPos(pNewRedl );
if( USHRT_MAX != nFnd )
pRedlineTbl->Remove( nFnd );
else
@@ -833,7 +836,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
// behandelt wird, erstmal temp. einfuegen
pRedlineTbl->SavePtrInArr( pNewRedl );
DeleteAndJoin( aPam );
- USHORT nFnd = pRedlineTbl->GetPos(pNewRedl );
+ sal_uInt16 nFnd = pRedlineTbl->GetPos(pNewRedl );
if( USHRT_MAX != nFnd )
pRedlineTbl->Remove( nFnd );
else
@@ -862,7 +865,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
// behandelt wird, erstmal temp. einfuegen
pRedlineTbl->SavePtrInArr( pNewRedl );
DeleteAndJoin( aPam );
- USHORT nFnd = pRedlineTbl->GetPos(pNewRedl );
+ sal_uInt16 nFnd = pRedlineTbl->GetPos(pNewRedl );
if( USHRT_MAX != nFnd )
pRedlineTbl->Remove( nFnd );
else
@@ -894,7 +897,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
delete pNewRedl, pNewRedl = 0;
if( IsHideChanges( eRedlineMode ))
pRedl->Hide();
- bCompress = TRUE;
+ bCompress = sal_True;
}
break;
@@ -907,7 +910,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
if (*pStt != *pEnd)
// <--
{
- pNewRedl->PushData( *pRedl, FALSE );
+ pNewRedl->PushData( *pRedl, sal_False );
pRedl->SetStart( *pEnd, pRStt );
// re-insert
pRedlineTbl->Remove( n );
@@ -917,7 +920,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
}
else
{
- pNewRedl->PushData( *pRedl, FALSE );
+ pNewRedl->PushData( *pRedl, sal_False );
if( *pREnd != *pEnd )
{
pNew = new SwRedline( *pRedl );
@@ -945,7 +948,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
pNew->SetEnd( *pRStt );
pNewRedl->SetStart( *pREnd, pStt );
}
- bCompress = TRUE;
+ bCompress = sal_True;
}
break;
@@ -1270,7 +1273,7 @@ void SwDoc::CompressRedlines()
{
_CHECK_REDLINE( this )
- void (SwRedline::*pFnc)(USHORT) = 0;
+ void (SwRedline::*pFnc)(sal_uInt16) = 0;
switch( nsRedlineMode_t::REDLINE_SHOW_MASK & eRedlineMode )
{
case nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE:
@@ -1282,7 +1285,7 @@ void SwDoc::CompressRedlines()
}
// versuche gleiche zusammenzufassen
- for( USHORT n = 1; n < pRedlineTbl->Count(); ++n )
+ for( sal_uInt16 n = 1; n < pRedlineTbl->Count(); ++n )
{
SwRedline* pPrev = (*pRedlineTbl)[ n-1 ],
* pCur = (*pRedlineTbl)[ n ];
@@ -1313,8 +1316,8 @@ void SwDoc::CompressRedlines()
bool SwDoc::SplitRedline( const SwPaM& rRange )
{
- BOOL bChg = FALSE;
- USHORT n = 0;
+ sal_Bool bChg = sal_False;
+ sal_uInt16 n = 0;
const SwPosition* pStt = rRange.Start(),
* pEnd = pStt == rRange.GetPoint() ? rRange.GetMark()
: rRange.GetPoint();
@@ -1328,7 +1331,7 @@ bool SwDoc::SplitRedline( const SwPaM& rRange )
if( *pTStt <= *pStt && *pStt <= *pTEnd &&
*pTStt <= *pEnd && *pEnd <= *pTEnd )
{
- bChg = TRUE;
+ bChg = sal_True;
int nn = 0;
if( *pStt == *pTStt )
nn += 1;
@@ -1374,21 +1377,20 @@ bool SwDoc::SplitRedline( const SwPaM& rRange )
}
bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo,
- USHORT nDelType )
+ sal_uInt16 nDelType )
{
if( nsRedlineMode_t::REDLINE_IGNOREDELETE_REDLINES & eRedlineMode ||
!rRange.HasMark() || *rRange.GetMark() == *rRange.GetPoint() )
- return FALSE;
+ return sal_False;
- BOOL bChg = FALSE;
+ sal_Bool bChg = sal_False;
- if( bSaveInUndo && DoesUndo() )
+ if (bSaveInUndo && GetIDocumentUndoRedo().DoesUndo())
{
SwUndoRedline* pUndo = new SwUndoRedline( UNDO_REDLINE, rRange );
if( pUndo->GetRedlSaveCount() )
{
- ClearRedo();
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
}
else
delete pUndo;
@@ -1397,7 +1399,7 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo,
const SwPosition* pStt = rRange.Start(),
* pEnd = pStt == rRange.GetPoint() ? rRange.GetMark()
: rRange.GetPoint();
- USHORT n = 0;
+ sal_uInt16 n = 0;
GetRedline( *pStt, &n );
for( ; n < pRedlineTbl->Count() ; ++n )
{
@@ -1408,17 +1410,17 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo,
SwPosition* pRStt = pRedl->Start(),
* pREnd = pRStt == pRedl->GetPoint() ? pRedl->GetMark()
: pRedl->GetPoint();
- BOOL bDel = FALSE;
+ sal_Bool bDel = sal_False;
switch( ComparePosition( *pStt, *pEnd, *pRStt, *pREnd ) )
{
case POS_EQUAL:
case POS_OUTSIDE:
- bDel = TRUE;
+ bDel = sal_True;
break;
case POS_OVERLAP_BEFORE:
if( *pEnd == *pREnd )
- bDel = TRUE;
+ bDel = sal_True;
else
{
pRedl->InvalidateRange();
@@ -1432,7 +1434,7 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo,
case POS_OVERLAP_BEHIND:
if( *pStt == *pRStt )
- bDel = TRUE;
+ bDel = sal_True;
else
{
pRedl->InvalidateRange();
@@ -1495,7 +1497,7 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo,
{
pRedl->InvalidateRange();
pRedlineTbl->DeleteAndDestroy( n-- );
- bChg = TRUE;
+ bChg = sal_True;
}
}
@@ -1506,19 +1508,19 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo,
}
bool SwDoc::DeleteRedline( const SwStartNode& rNode, bool bSaveInUndo,
- USHORT nDelType )
+ sal_uInt16 nDelType )
{
SwPaM aTemp(*rNode.EndOfSectionNode(), rNode);
return DeleteRedline(aTemp, bSaveInUndo, nDelType);
}
-USHORT SwDoc::GetRedlinePos( const SwNode& rNd, USHORT nType ) const
+sal_uInt16 SwDoc::GetRedlinePos( const SwNode& rNd, sal_uInt16 nType ) const
{
- const ULONG nNdIdx = rNd.GetIndex();
- for( USHORT n = 0; n < pRedlineTbl->Count() ; ++n )
+ const sal_uLong nNdIdx = rNd.GetIndex();
+ for( sal_uInt16 n = 0; n < pRedlineTbl->Count() ; ++n )
{
const SwRedline* pTmp = (*pRedlineTbl)[ n ];
- ULONG nPt = pTmp->GetPoint()->nNode.GetIndex(),
+ sal_uLong nPt = pTmp->GetPoint()->nNode.GetIndex(),
nMk = pTmp->GetMark()->nNode.GetIndex();
if( nPt < nMk ) { long nTmp = nMk; nMk = nPt; nPt = nTmp; }
@@ -1533,9 +1535,9 @@ USHORT SwDoc::GetRedlinePos( const SwNode& rNd, USHORT nType ) const
}
const SwRedline* SwDoc::GetRedline( const SwPosition& rPos,
- USHORT* pFndPos ) const
+ sal_uInt16* pFndPos ) const
{
- USHORT nO = pRedlineTbl->Count(), nM, nU = 0;
+ sal_uInt16 nO = pRedlineTbl->Count(), nM, nU = 0;
if( nO > 0 )
{
nO--;
@@ -1600,17 +1602,17 @@ const SwRedline* SwDoc::GetRedline( const SwPosition& rPos,
return 0;
}
-typedef BOOL (*Fn_AcceptReject)( SwRedlineTbl& rArr, USHORT& rPos,
- BOOL bCallDelete,
+typedef sal_Bool (*Fn_AcceptReject)( SwRedlineTbl& rArr, sal_uInt16& rPos,
+ sal_Bool bCallDelete,
const SwPosition* pSttRng,
const SwPosition* pEndRng);
-BOOL lcl_AcceptRedline( SwRedlineTbl& rArr, USHORT& rPos,
- BOOL bCallDelete,
+sal_Bool lcl_AcceptRedline( SwRedlineTbl& rArr, sal_uInt16& rPos,
+ sal_Bool bCallDelete,
const SwPosition* pSttRng = 0,
const SwPosition* pEndRng = 0 )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
SwRedline* pRedl = rArr[ rPos ];
SwPosition *pRStt = 0, *pREnd = 0;
SwComparePosition eCmp = POS_OUTSIDE;
@@ -1628,7 +1630,7 @@ BOOL lcl_AcceptRedline( SwRedlineTbl& rArr, USHORT& rPos,
case nsRedlineType_t::REDLINE_INSERT:
case nsRedlineType_t::REDLINE_FORMAT:
{
- BOOL bCheck = FALSE, bReplace = FALSE;
+ sal_Bool bCheck = sal_False, bReplace = sal_False;
switch( eCmp )
{
case POS_INSIDE:
@@ -1644,18 +1646,18 @@ BOOL lcl_AcceptRedline( SwRedlineTbl& rArr, USHORT& rPos,
rArr.Insert( pNew ); ++rPos;
}
pRedl->SetEnd( *pSttRng, pREnd );
- bCheck = TRUE;
+ bCheck = sal_True;
}
break;
case POS_OVERLAP_BEFORE:
pRedl->SetStart( *pEndRng, pRStt );
- bReplace = TRUE;
+ bReplace = sal_True;
break;
case POS_OVERLAP_BEHIND:
pRedl->SetEnd( *pSttRng, pREnd );
- bCheck = TRUE;
+ bCheck = sal_True;
break;
case POS_OUTSIDE:
@@ -1664,7 +1666,7 @@ BOOL lcl_AcceptRedline( SwRedlineTbl& rArr, USHORT& rPos,
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
if( bReplace || ( bCheck && !pRedl->HasValidRange() ))
@@ -1679,7 +1681,7 @@ BOOL lcl_AcceptRedline( SwRedlineTbl& rArr, USHORT& rPos,
{
SwDoc& rDoc = *pRedl->GetDoc();
const SwPosition *pDelStt = 0, *pDelEnd = 0;
- BOOL bDelRedl = FALSE;
+ sal_Bool bDelRedl = sal_False;
switch( eCmp )
{
case POS_INSIDE:
@@ -1709,7 +1711,7 @@ BOOL lcl_AcceptRedline( SwRedlineTbl& rArr, USHORT& rPos,
case POS_EQUAL:
{
rArr.Remove( rPos-- );
- bDelRedl = TRUE;
+ bDelRedl = sal_True;
if( bCallDelete )
{
pDelStt = pRedl->Start();
@@ -1718,7 +1720,7 @@ BOOL lcl_AcceptRedline( SwRedlineTbl& rArr, USHORT& rPos,
}
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
if( pDelStt && pDelEnd )
@@ -1741,8 +1743,8 @@ BOOL lcl_AcceptRedline( SwRedlineTbl& rArr, USHORT& rPos,
if( pCSttNd && !pCEndNd )
{
- aPam.GetBound( TRUE ).nContent.Assign( 0, 0 );
- aPam.GetBound( FALSE ).nContent.Assign( 0, 0 );
+ aPam.GetBound( sal_True ).nContent.Assign( 0, 0 );
+ aPam.GetBound( sal_False ).nContent.Assign( 0, 0 );
aPam.DeleteMark();
rDoc.DelFullPara( aPam );
}
@@ -1759,17 +1761,17 @@ BOOL lcl_AcceptRedline( SwRedlineTbl& rArr, USHORT& rPos,
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
-BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
- BOOL bCallDelete,
+sal_Bool lcl_RejectRedline( SwRedlineTbl& rArr, sal_uInt16& rPos,
+ sal_Bool bCallDelete,
const SwPosition* pSttRng = 0,
const SwPosition* pEndRng = 0 )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
SwRedline* pRedl = rArr[ rPos ];
SwPosition *pRStt = 0, *pREnd = 0;
SwComparePosition eCmp = POS_OUTSIDE;
@@ -1788,7 +1790,7 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
{
SwDoc& rDoc = *pRedl->GetDoc();
const SwPosition *pDelStt = 0, *pDelEnd = 0;
- BOOL bDelRedl = FALSE;
+ sal_Bool bDelRedl = sal_False;
switch( eCmp )
{
case POS_INSIDE:
@@ -1818,7 +1820,7 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
{
// dann den Bereich wieder loeschen
rArr.Remove( rPos-- );
- bDelRedl = TRUE;
+ bDelRedl = sal_True;
if( bCallDelete )
{
pDelStt = pRedl->Start();
@@ -1828,7 +1830,7 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
if( pDelStt && pDelEnd )
{
@@ -1851,8 +1853,8 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
if( pCSttNd && !pCEndNd )
{
- aPam.GetBound( TRUE ).nContent.Assign( 0, 0 );
- aPam.GetBound( FALSE ).nContent.Assign( 0, 0 );
+ aPam.GetBound( sal_True ).nContent.Assign( 0, 0 );
+ aPam.GetBound( sal_False ).nContent.Assign( 0, 0 );
aPam.DeleteMark();
rDoc.DelFullPara( aPam );
}
@@ -1866,7 +1868,7 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
case nsRedlineType_t::REDLINE_DELETE:
{
SwRedline* pNew = 0;
- BOOL bCheck = FALSE, bReplace = FALSE;
+ sal_Bool bCheck = sal_False, bReplace = sal_False;
switch( eCmp )
{
@@ -1880,7 +1882,7 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
if( *pSttRng == *pRStt )
{
pRedl->SetStart( *pEndRng, pRStt );
- bReplace = TRUE;
+ bReplace = sal_True;
if( pNew )
pNew->SetEnd( *pEndRng );
}
@@ -1897,7 +1899,7 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
}
pRedl->SetEnd( *pSttRng, pREnd );
- bCheck = TRUE;
+ bCheck = sal_True;
if( pNew )
pNew->SetStart( *pSttRng );
}
@@ -1911,7 +1913,7 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
pNew->PopData();
}
pRedl->SetStart( *pEndRng, pRStt );
- bReplace = TRUE;
+ bReplace = sal_True;
if( pNew )
pNew->SetEnd( *pEndRng );
break;
@@ -1923,7 +1925,7 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
pNew->PopData();
}
pRedl->SetEnd( *pSttRng, pREnd );
- bCheck = TRUE;
+ bCheck = sal_True;
if( pNew )
pNew->SetStart( *pSttRng );
break;
@@ -1936,7 +1938,7 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
if( pNew )
@@ -1963,15 +1965,15 @@ BOOL lcl_RejectRedline( SwRedlineTbl& rArr, USHORT& rPos,
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
const SwRedline* lcl_FindCurrRedline( const SwPosition& rSttPos,
- USHORT& rPos,
- BOOL bNext = TRUE )
+ sal_uInt16& rPos,
+ sal_Bool bNext = sal_True )
{
const SwRedline* pFnd = 0;
const SwRedlineTbl& rArr = rSttPos.nNode.GetNode().GetDoc()->GetRedlineTbl();
@@ -1999,16 +2001,16 @@ const SwRedline* lcl_FindCurrRedline( const SwPosition& rSttPos,
}
int lcl_AcceptRejectRedl( Fn_AcceptReject fn_AcceptReject,
- SwRedlineTbl& rArr, BOOL bCallDelete,
+ SwRedlineTbl& rArr, sal_Bool bCallDelete,
const SwPaM& rPam)
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
int nCount = 0;
const SwPosition* pStt = rPam.Start(),
* pEnd = pStt == rPam.GetPoint() ? rPam.GetMark()
: rPam.GetPoint();
- const SwRedline* pFnd = lcl_FindCurrRedline( *pStt, n, TRUE );
+ const SwRedline* pFnd = lcl_FindCurrRedline( *pStt, n, sal_True );
if( pFnd && // neu ein Teil davon?
( *pFnd->Start() != *pStt || *pFnd->End() > *pEnd ))
{
@@ -2080,9 +2082,9 @@ void lcl_AdjustRedlineRange( SwPaM& rPam )
}
-bool SwDoc::AcceptRedline( USHORT nPos, bool bCallDelete )
+bool SwDoc::AcceptRedline( sal_uInt16 nPos, bool bCallDelete )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// aufjedenfall auf sichtbar umschalten
if( (nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE) !=
@@ -2092,21 +2094,24 @@ bool SwDoc::AcceptRedline( USHORT nPos, bool bCallDelete )
SwRedline* pTmp = (*pRedlineTbl)[ nPos ];
if( pTmp->HasMark() && pTmp->IsVisible() )
{
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
SwRewriter aRewriter;
aRewriter.AddRule(UNDO_ARG1, pTmp->GetDescr());
- StartUndo( UNDO_ACCEPT_REDLINE, &aRewriter);
+ GetIDocumentUndoRedo().StartUndo(UNDO_ACCEPT_REDLINE, &aRewriter);
}
int nLoopCnt = 2;
- USHORT nSeqNo = pTmp->GetSeqNo();
+ sal_uInt16 nSeqNo = pTmp->GetSeqNo();
do {
- if( DoesUndo() )
- AppendUndo( new SwUndoAcceptRedline( *pTmp ));
+ if (GetIDocumentUndoRedo().DoesUndo())
+ {
+ SwUndo *const pUndo( new SwUndoAcceptRedline(*pTmp) );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
+ }
bRet |= lcl_AcceptRedline( *pRedlineTbl, nPos, bCallDelete );
@@ -2114,7 +2119,7 @@ bool SwDoc::AcceptRedline( USHORT nPos, bool bCallDelete )
{
if( USHRT_MAX == nPos )
nPos = 0;
- USHORT nFndPos = 2 == nLoopCnt
+ sal_uInt16 nFndPos = 2 == nLoopCnt
? pRedlineTbl->FindNextSeqNo( nSeqNo, nPos )
: pRedlineTbl->FindPrevSeqNo( nSeqNo, nPos );
if( USHRT_MAX != nFndPos || ( 0 != ( --nLoopCnt ) &&
@@ -2135,8 +2140,10 @@ bool SwDoc::AcceptRedline( USHORT nPos, bool bCallDelete )
SetModified();
}
- if( DoesUndo() )
- EndUndo( UNDO_ACCEPT_REDLINE, NULL );
+ if (GetIDocumentUndoRedo().DoesUndo())
+ {
+ GetIDocumentUndoRedo().EndUndo(UNDO_END, 0);
+ }
}
return bRet;
}
@@ -2154,10 +2161,10 @@ bool SwDoc::AcceptRedline( const SwPaM& rPam, bool bCallDelete )
SwPaM aPam( *rPam.GetMark(), *rPam.GetPoint() );
lcl_AdjustRedlineRange( aPam );
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- StartUndo( UNDO_ACCEPT_REDLINE, NULL );
- AppendUndo( new SwUndoAcceptRedline( aPam ));
+ GetIDocumentUndoRedo().StartUndo( UNDO_ACCEPT_REDLINE, NULL );
+ GetIDocumentUndoRedo().AppendUndo( new SwUndoAcceptRedline( aPam ));
}
int nRet = lcl_AcceptRejectRedl( lcl_AcceptRedline, *pRedlineTbl,
@@ -2167,7 +2174,7 @@ bool SwDoc::AcceptRedline( const SwPaM& rPam, bool bCallDelete )
CompressRedlines();
SetModified();
}
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
String aTmpStr;
@@ -2180,14 +2187,14 @@ bool SwDoc::AcceptRedline( const SwPaM& rPam, bool bCallDelete )
SwRewriter aRewriter;
aRewriter.AddRule(UNDO_ARG1, aTmpStr);
- EndUndo( UNDO_ACCEPT_REDLINE, &aRewriter );
+ GetIDocumentUndoRedo().EndUndo( UNDO_ACCEPT_REDLINE, &aRewriter );
}
return nRet != 0;
}
-bool SwDoc::RejectRedline( USHORT nPos, bool bCallDelete )
+bool SwDoc::RejectRedline( sal_uInt16 nPos, bool bCallDelete )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// aufjedenfall auf sichtbar umschalten
if( (nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE) !=
@@ -2197,21 +2204,24 @@ bool SwDoc::RejectRedline( USHORT nPos, bool bCallDelete )
SwRedline* pTmp = (*pRedlineTbl)[ nPos ];
if( pTmp->HasMark() && pTmp->IsVisible() )
{
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
SwRewriter aRewriter;
aRewriter.AddRule(UNDO_ARG1, pTmp->GetDescr());
- StartUndo( UNDO_REJECT_REDLINE, NULL );
+ GetIDocumentUndoRedo().StartUndo(UNDO_REJECT_REDLINE, &aRewriter);
}
int nLoopCnt = 2;
- USHORT nSeqNo = pTmp->GetSeqNo();
+ sal_uInt16 nSeqNo = pTmp->GetSeqNo();
do {
- if( DoesUndo() )
- AppendUndo( new SwUndoRejectRedline( *pTmp ));
+ if (GetIDocumentUndoRedo().DoesUndo())
+ {
+ SwUndo *const pUndo( new SwUndoRejectRedline( *pTmp ) );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
+ }
bRet |= lcl_RejectRedline( *pRedlineTbl, nPos, bCallDelete );
@@ -2219,7 +2229,7 @@ bool SwDoc::RejectRedline( USHORT nPos, bool bCallDelete )
{
if( USHRT_MAX == nPos )
nPos = 0;
- USHORT nFndPos = 2 == nLoopCnt
+ sal_uInt16 nFndPos = 2 == nLoopCnt
? pRedlineTbl->FindNextSeqNo( nSeqNo, nPos )
: pRedlineTbl->FindPrevSeqNo( nSeqNo, nPos );
if( USHRT_MAX != nFndPos || ( 0 != ( --nLoopCnt ) &&
@@ -2240,8 +2250,10 @@ bool SwDoc::RejectRedline( USHORT nPos, bool bCallDelete )
SetModified();
}
- if( DoesUndo() )
- EndUndo( UNDO_REJECT_REDLINE, NULL );
+ if (GetIDocumentUndoRedo().DoesUndo())
+ {
+ GetIDocumentUndoRedo().EndUndo(UNDO_END, 0);
+ }
}
return bRet;
}
@@ -2259,10 +2271,10 @@ bool SwDoc::RejectRedline( const SwPaM& rPam, bool bCallDelete )
SwPaM aPam( *rPam.GetMark(), *rPam.GetPoint() );
lcl_AdjustRedlineRange( aPam );
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- StartUndo( UNDO_REJECT_REDLINE, NULL );
- AppendUndo( new SwUndoRejectRedline( aPam ));
+ GetIDocumentUndoRedo().StartUndo( UNDO_REJECT_REDLINE, NULL );
+ GetIDocumentUndoRedo().AppendUndo( new SwUndoRejectRedline(aPam) );
}
int nRet = lcl_AcceptRejectRedl( lcl_RejectRedline, *pRedlineTbl,
@@ -2272,7 +2284,7 @@ bool SwDoc::RejectRedline( const SwPaM& rPam, bool bCallDelete )
CompressRedlines();
SetModified();
}
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
String aTmpStr;
@@ -2285,7 +2297,7 @@ bool SwDoc::RejectRedline( const SwPaM& rPam, bool bCallDelete )
SwRewriter aRewriter;
aRewriter.AddRule(UNDO_ARG1, aTmpStr);
- EndUndo( UNDO_REJECT_REDLINE, &aRewriter );
+ GetIDocumentUndoRedo().EndUndo( UNDO_REJECT_REDLINE, &aRewriter );
}
return nRet != 0;
@@ -2298,12 +2310,12 @@ const SwRedline* SwDoc::SelNextRedline( SwPaM& rPam ) const
SwPosition& rSttPos = *rPam.GetPoint();
SwPosition aSavePos( rSttPos );
- BOOL bRestart;
+ sal_Bool bRestart;
// sollte die StartPos auf dem letzen gueligen ContentNode stehen,
// dann aufjedenfall das naechste Redline nehmen
- USHORT n = 0;
- const SwRedline* pFnd = lcl_FindCurrRedline( rSttPos, n, TRUE );
+ sal_uInt16 n = 0;
+ const SwRedline* pFnd = lcl_FindCurrRedline( rSttPos, n, sal_True );
if( pFnd )
{
const SwPosition* pEnd = pFnd->End();
@@ -2320,7 +2332,7 @@ const SwRedline* SwDoc::SelNextRedline( SwPaM& rPam ) const
}
do {
- bRestart = FALSE;
+ bRestart = sal_False;
for( ; !pFnd && n < pRedlineTbl->Count(); ++n )
{
@@ -2392,7 +2404,7 @@ const SwRedline* SwDoc::SelNextRedline( SwPaM& rPam ) const
{
if( n < pRedlineTbl->Count() )
{
- bRestart = TRUE;
+ bRestart = sal_True;
*rPam.GetPoint() = *pSaveFnd->End();
}
else
@@ -2415,12 +2427,12 @@ const SwRedline* SwDoc::SelPrevRedline( SwPaM& rPam ) const
SwPosition& rSttPos = *rPam.GetPoint();
SwPosition aSavePos( rSttPos );
- BOOL bRestart;
+ sal_Bool bRestart;
// sollte die StartPos auf dem ersten gueligen ContentNode stehen,
// dann aufjedenfall das vorherige Redline nehmen
- USHORT n = 0;
- const SwRedline* pFnd = lcl_FindCurrRedline( rSttPos, n, FALSE );
+ sal_uInt16 n = 0;
+ const SwRedline* pFnd = lcl_FindCurrRedline( rSttPos, n, sal_False );
if( pFnd )
{
const SwPosition* pStt = pFnd->Start();
@@ -2437,7 +2449,7 @@ const SwRedline* SwDoc::SelPrevRedline( SwPaM& rPam ) const
}
do {
- bRestart = FALSE;
+ bRestart = sal_False;
while( !pFnd && 0 < n )
{
@@ -2511,7 +2523,7 @@ const SwRedline* SwDoc::SelPrevRedline( SwPaM& rPam ) const
{
if( n )
{
- bRestart = TRUE;
+ bRestart = sal_True;
*rPam.GetPoint() = *pSaveFnd->Start();
}
else
@@ -2530,16 +2542,16 @@ const SwRedline* SwDoc::SelPrevRedline( SwPaM& rPam ) const
// Kommentar am Redline setzen
bool SwDoc::SetRedlineComment( const SwPaM& rPaM, const String& rS )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwPosition* pStt = rPaM.Start(),
* pEnd = pStt == rPaM.GetPoint() ? rPaM.GetMark()
: rPaM.GetPoint();
- USHORT n = 0;
- if( lcl_FindCurrRedline( *pStt, n, TRUE ) )
+ sal_uInt16 n = 0;
+ if( lcl_FindCurrRedline( *pStt, n, sal_True ) )
{
for( ; n < pRedlineTbl->Count(); ++n )
{
- bRet = TRUE;
+ bRet = sal_True;
SwRedline* pTmp = (*pRedlineTbl)[ n ];
if( pStt != pEnd && *pTmp->Start() > *pEnd )
break;
@@ -2556,13 +2568,13 @@ bool SwDoc::SetRedlineComment( const SwPaM& rPaM, const String& rS )
}
// legt gebenenfalls einen neuen Author an
-USHORT SwDoc::GetRedlineAuthor()
+sal_uInt16 SwDoc::GetRedlineAuthor()
{
return SW_MOD()->GetRedlineAuthor();
}
// fuer die Reader usw. - neuen Author in die Tabelle eintragen
-USHORT SwDoc::InsertRedlineAuthor( const String& rNew )
+sal_uInt16 SwDoc::InsertRedlineAuthor( const String& rNew )
{
return SW_MOD()->InsertRedlineAuthor(rNew);
}
@@ -2570,7 +2582,7 @@ USHORT SwDoc::InsertRedlineAuthor( const String& rNew )
void SwDoc::UpdateRedlineAttr()
{
const SwRedlineTbl& rTbl = GetRedlineTbl();
- for( USHORT n = 0; n < rTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
{
SwRedline* pRedl = rTbl[ n ];
if( pRedl->IsVisible() )
@@ -2581,7 +2593,7 @@ void SwDoc::UpdateRedlineAttr()
// setze Kommentar-Text fuers Redline, das dann per AppendRedline
// hereinkommt. Wird vom Autoformat benutzt. 0-Pointer setzt den Modus
// wieder zurueck. Pointer wird nicht kopiert, muss also gueltig bleiben!
-void SwDoc::SetAutoFmtRedlineComment( const String* pTxt, USHORT nSeqNo )
+void SwDoc::SetAutoFmtRedlineComment( const String* pTxt, sal_uInt16 nSeqNo )
{
mbIsAutoFmtRedline = 0 != pTxt;
if( pTxt )
@@ -2606,9 +2618,9 @@ void SwDoc::SetRedlinePassword(
/* */
-BOOL SwRedlineTbl::Insert( SwRedlinePtr& p, BOOL bIns )
+sal_Bool SwRedlineTbl::Insert( SwRedlinePtr& p, sal_Bool bIns )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( p->HasValidRange() )
{
bRet = _SwRedlineTbl::Insert( p );
@@ -2623,9 +2635,9 @@ BOOL SwRedlineTbl::Insert( SwRedlinePtr& p, BOOL bIns )
return bRet;
}
-BOOL SwRedlineTbl::Insert( SwRedlinePtr& p, USHORT& rP, BOOL bIns )
+sal_Bool SwRedlineTbl::Insert( SwRedlinePtr& p, sal_uInt16& rP, sal_Bool bIns )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( p->HasValidRange() )
{
bRet = _SwRedlineTbl::Insert( p, rP );
@@ -2640,10 +2652,10 @@ BOOL SwRedlineTbl::Insert( SwRedlinePtr& p, USHORT& rP, BOOL bIns )
return bRet;
}
-BOOL SwRedlineTbl::InsertWithValidRanges( SwRedlinePtr& p, USHORT* pInsPos )
+sal_Bool SwRedlineTbl::InsertWithValidRanges( SwRedlinePtr& p, sal_uInt16* pInsPos )
{
// erzeuge aus den Selektion gueltige "Teilbereiche".
- BOOL bAnyIns = FALSE;
+ sal_Bool bAnyIns = sal_False;
SwPosition* pStt = p->Start(),
* pEnd = pStt == p->GetPoint() ? p->GetMark() : p->GetPoint();
SwPosition aNewStt( *pStt );
@@ -2660,7 +2672,7 @@ BOOL SwRedlineTbl::InsertWithValidRanges( SwRedlinePtr& p, USHORT* pInsPos )
}
SwRedline* pNew = 0;
- USHORT nInsPos;
+ sal_uInt16 nInsPos;
if( aNewStt < *pEnd )
do {
@@ -2685,7 +2697,7 @@ BOOL SwRedlineTbl::InsertWithValidRanges( SwRedlinePtr& p, USHORT* pInsPos )
{
// We want to be before the table
*pNew->GetPoint() = SwPosition(*pTab);
- pC = GoPreviousNds( &pNew->GetPoint()->nNode, FALSE ); // here we are.
+ pC = GoPreviousNds( &pNew->GetPoint()->nNode, sal_False ); // here we are.
if( pC )
pNew->GetPoint()->nContent.Assign( pC, 0 );
pTab = pNew->GetPoint()->nNode.GetNode().StartOfSectionNode()->FindTableNode();
@@ -2730,7 +2742,7 @@ BOOL SwRedlineTbl::InsertWithValidRanges( SwRedlinePtr& p, USHORT* pInsPos )
_SwRedlineTbl::Insert( pNew, nInsPos ) )
{
pNew->CallDisplayFunc();
- bAnyIns = TRUE;
+ bAnyIns = sal_True;
pNew = 0;
if( pInsPos && *pInsPos < nInsPos )
*pInsPos = nInsPos;
@@ -2749,7 +2761,7 @@ BOOL SwRedlineTbl::InsertWithValidRanges( SwRedlinePtr& p, USHORT* pInsPos )
return bAnyIns;
}
-void SwRedlineTbl::Remove( USHORT nP, USHORT nL )
+void SwRedlineTbl::Remove( sal_uInt16 nP, sal_uInt16 nL )
{
SwDoc* pDoc = 0;
if( !nP && nL && nL == _SwRedlineTbl::Count() )
@@ -2763,7 +2775,7 @@ void SwRedlineTbl::Remove( USHORT nP, USHORT nL )
pSh->InvalidateWindows( SwRect( 0, 0, LONG_MAX, LONG_MAX ) );
}
-void SwRedlineTbl::DeleteAndDestroy( USHORT nP, USHORT nL )
+void SwRedlineTbl::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )
{
SwDoc* pDoc = 0;
if( !nP && nL && nL == _SwRedlineTbl::Count() )
@@ -2780,7 +2792,7 @@ void SwRedlineTbl::DeleteAndDestroy( USHORT nP, USHORT nL )
// suche den naechsten oder vorherigen Redline mit dergleichen Seq.No
// Mit dem Lookahead kann die Suche eingeschraenkt werden. 0 oder
// USHRT_MAX suchen im gesamten Array.
-USHORT SwRedlineTbl::FindNextOfSeqNo( USHORT nSttPos, USHORT nLookahead ) const
+sal_uInt16 SwRedlineTbl::FindNextOfSeqNo( sal_uInt16 nSttPos, sal_uInt16 nLookahead ) const
{
return nSttPos + 1 < _SwRedlineTbl::Count()
? FindNextSeqNo( _SwRedlineTbl::GetObject( nSttPos )
@@ -2788,7 +2800,7 @@ USHORT SwRedlineTbl::FindNextOfSeqNo( USHORT nSttPos, USHORT nLookahead ) const
: USHRT_MAX;
}
-USHORT SwRedlineTbl::FindPrevOfSeqNo( USHORT nSttPos, USHORT nLookahead ) const
+sal_uInt16 SwRedlineTbl::FindPrevOfSeqNo( sal_uInt16 nSttPos, sal_uInt16 nLookahead ) const
{
return nSttPos ? FindPrevSeqNo( _SwRedlineTbl::GetObject(
nSttPos )->GetSeqNo(),
@@ -2796,10 +2808,10 @@ USHORT SwRedlineTbl::FindPrevOfSeqNo( USHORT nSttPos, USHORT nLookahead ) const
: USHRT_MAX;
}
-USHORT SwRedlineTbl::FindNextSeqNo( USHORT nSeqNo, USHORT nSttPos,
- USHORT nLookahead ) const
+sal_uInt16 SwRedlineTbl::FindNextSeqNo( sal_uInt16 nSeqNo, sal_uInt16 nSttPos,
+ sal_uInt16 nLookahead ) const
{
- USHORT nRet = USHRT_MAX, nEnd;
+ sal_uInt16 nRet = USHRT_MAX, nEnd;
if( nSeqNo && nSttPos < _SwRedlineTbl::Count() )
{
nEnd = _SwRedlineTbl::Count();
@@ -2817,10 +2829,10 @@ USHORT SwRedlineTbl::FindNextSeqNo( USHORT nSeqNo, USHORT nSttPos,
return nRet;
}
-USHORT SwRedlineTbl::FindPrevSeqNo( USHORT nSeqNo, USHORT nSttPos,
- USHORT nLookahead ) const
+sal_uInt16 SwRedlineTbl::FindPrevSeqNo( sal_uInt16 nSeqNo, sal_uInt16 nSttPos,
+ sal_uInt16 nLookahead ) const
{
- USHORT nRet = USHRT_MAX, nEnd;
+ sal_uInt16 nRet = USHRT_MAX, nEnd;
if( nSeqNo && nSttPos < _SwRedlineTbl::Count() )
{
nEnd = 0;
@@ -2854,12 +2866,12 @@ void SwRedlineExtraData::Reject( SwPaM& ) const
int SwRedlineExtraData::operator == ( const SwRedlineExtraData& ) const
{
- return FALSE;
+ return sal_False;
}
SwRedlineExtraData_FmtColl::SwRedlineExtraData_FmtColl( const String& rColl,
- USHORT nPoolFmtId,
+ sal_uInt16 nPoolFmtId,
const SfxItemSet* pItemSet )
: sFmtNm(rColl), pSet(0), nPoolId(nPoolFmtId)
{
@@ -2937,7 +2949,7 @@ SwRedlineExtraData_Format::SwRedlineExtraData_Format( const SfxItemSet& rSet )
{
SfxItemIter aIter( rSet );
const SfxPoolItem* pItem = aIter.FirstItem();
- while( TRUE )
+ while( sal_True )
{
aWhichIds.Insert( pItem->Which(), aWhichIds.Count() );
if( aIter.IsAtEnd() )
@@ -2948,7 +2960,7 @@ SwRedlineExtraData_Format::SwRedlineExtraData_Format( const SfxItemSet& rSet )
SwRedlineExtraData_Format::SwRedlineExtraData_Format(
const SwRedlineExtraData_Format& rCpy )
- : SwRedlineExtraData(), aWhichIds( (BYTE)rCpy.aWhichIds.Count() )
+ : SwRedlineExtraData(), aWhichIds( (sal_uInt8)rCpy.aWhichIds.Count() )
{
aWhichIds.Insert( &rCpy.aWhichIds, 0 );
}
@@ -2970,7 +2982,7 @@ void SwRedlineExtraData_Format::Reject( SwPaM& rPam ) const
pDoc->SetRedlineMode_intern((RedlineMode_t)(eOld & ~(nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_IGNORE)));
// eigentlich muesste hier das Attribut zurueck gesetzt werden!!!
- for( USHORT n = 0, nEnd = aWhichIds.Count(); n < nEnd; ++n )
+ for( sal_uInt16 n = 0, nEnd = aWhichIds.Count(); n < nEnd; ++n )
{
pDoc->InsertPoolItem( rPam, *GetDfltAttr( aWhichIds[ n ] ),
nsSetAttrMode::SETATTR_DONTEXPAND );
@@ -2982,11 +2994,11 @@ void SwRedlineExtraData_Format::Reject( SwPaM& rPam ) const
int SwRedlineExtraData_Format::operator == ( const SwRedlineExtraData& rCmp ) const
{
int nRet = 1;
- USHORT nEnd = aWhichIds.Count();
+ sal_uInt16 n = 0, nEnd = aWhichIds.Count();
if( nEnd != ((SwRedlineExtraData_Format&)rCmp).aWhichIds.Count() )
nRet = 0;
else
- for(USHORT n=0 ; n < nEnd; ++n )
+ for( ; n < nEnd; ++n )
if( ((SwRedlineExtraData_Format&)rCmp).aWhichIds[n] != aWhichIds[n])
{
nRet = 0;
@@ -2995,14 +3007,14 @@ int SwRedlineExtraData_Format::operator == ( const SwRedlineExtraData& rCmp ) co
return nRet;
}
-SwRedlineData::SwRedlineData( RedlineType_t eT, USHORT nAut )
+SwRedlineData::SwRedlineData( RedlineType_t eT, sal_uInt16 nAut )
: pNext( 0 ), pExtraData( 0 ), eType( eT ), nAuthor( nAut ), nSeqNo( 0 )
{
aStamp.SetSec( 0 );
aStamp.Set100Sec( 0 );
}
-SwRedlineData::SwRedlineData( const SwRedlineData& rCpy, BOOL bCpyNext )
+SwRedlineData::SwRedlineData( const SwRedlineData& rCpy, sal_Bool bCpyNext )
:
pNext( (bCpyNext && rCpy.pNext) ? new SwRedlineData( *rCpy.pNext ) : 0 ),
pExtraData( rCpy.pExtraData ? rCpy.pExtraData->CreateNew() : 0 ),
@@ -3012,7 +3024,7 @@ SwRedlineData::SwRedlineData( const SwRedlineData& rCpy, BOOL bCpyNext )
}
// fuer sw3io: pNext geht in eigenen Besitz ueber!
-SwRedlineData::SwRedlineData(RedlineType_t eT, USHORT nAut, const DateTime& rDT,
+SwRedlineData::SwRedlineData(RedlineType_t eT, sal_uInt16 nAut, const DateTime& rDT,
const String& rCmnt, SwRedlineData *pNxt, SwRedlineExtraData* pData)
: pNext(pNxt), pExtraData(pData), sComment(rCmnt), aStamp(rDT),
eType(eT), nAuthor(nAut), nSeqNo(0)
@@ -3051,8 +3063,8 @@ SwRedline::SwRedline(RedlineType_t eTyp, const SwPaM& rPam )
pRedlineData( new SwRedlineData( eTyp, GetDoc()->GetRedlineAuthor() ) ),
pCntntSect( 0 )
{
- bDelLastPara = bIsLastParaDelete = FALSE;
- bIsVisible = TRUE;
+ bDelLastPara = bIsLastParaDelete = sal_False;
+ bIsVisible = sal_True;
if( !rPam.HasMark() )
DeleteMark();
}
@@ -3062,8 +3074,8 @@ SwRedline::SwRedline( const SwRedlineData& rData, const SwPaM& rPam )
pRedlineData( new SwRedlineData( rData )),
pCntntSect( 0 )
{
- bDelLastPara = bIsLastParaDelete = FALSE;
- bIsVisible = TRUE;
+ bDelLastPara = bIsLastParaDelete = sal_False;
+ bIsVisible = sal_True;
if( !rPam.HasMark() )
DeleteMark();
}
@@ -3073,8 +3085,8 @@ SwRedline::SwRedline( const SwRedlineData& rData, const SwPosition& rPos )
pRedlineData( new SwRedlineData( rData )),
pCntntSect( 0 )
{
- bDelLastPara = bIsLastParaDelete = FALSE;
- bIsVisible = TRUE;
+ bDelLastPara = bIsLastParaDelete = sal_False;
+ bIsVisible = sal_True;
}
SwRedline::SwRedline( const SwRedline& rCpy )
@@ -3082,8 +3094,8 @@ SwRedline::SwRedline( const SwRedline& rCpy )
pRedlineData( new SwRedlineData( *rCpy.pRedlineData )),
pCntntSect( 0 )
{
- bDelLastPara = bIsLastParaDelete = FALSE;
- bIsVisible = TRUE;
+ bDelLastPara = bIsLastParaDelete = sal_False;
+ bIsVisible = sal_True;
if( !rCpy.HasMark() )
DeleteMark();
}
@@ -3101,7 +3113,7 @@ SwRedline::~SwRedline()
}
// liegt eine gueltige Selektion vor?
-BOOL SwRedline::HasValidRange() const
+sal_Bool SwRedline::HasValidRange() const
{
const SwNode* pPtNd = &GetPoint()->nNode.GetNode(),
* pMkNd = &GetMark()->nNode.GetNode();
@@ -3112,11 +3124,11 @@ BOOL SwRedline::HasValidRange() const
( pPtNd != pMkNd || GetContentIdx() != NULL ||
pPtNd != &pPtNd->GetNodes().GetEndOfContent() )
)
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
-void SwRedline::CallDisplayFunc( USHORT nLoop )
+void SwRedline::CallDisplayFunc( sal_uInt16 nLoop )
{
switch( nsRedlineMode_t::REDLINE_SHOW_MASK & GetDoc()->GetRedlineMode() )
{
@@ -3132,25 +3144,24 @@ void SwRedline::CallDisplayFunc( USHORT nLoop )
}
}
-void SwRedline::Show( USHORT nLoop )
+void SwRedline::Show( sal_uInt16 nLoop )
{
if( 1 <= nLoop )
{
SwDoc* pDoc = GetDoc();
RedlineMode_t eOld = pDoc->GetRedlineMode();
pDoc->SetRedlineMode_intern((RedlineMode_t)(eOld | nsRedlineMode_t::REDLINE_IGNORE));
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
switch( GetType() )
{
case nsRedlineType_t::REDLINE_INSERT: // Inhalt wurde eingefuegt
- bIsVisible = TRUE;
+ bIsVisible = sal_True;
MoveFromSection();
break;
case nsRedlineType_t::REDLINE_DELETE: // Inhalt wurde geloescht
- bIsVisible = TRUE;
+ bIsVisible = sal_True;
MoveFromSection();
break;
@@ -3162,28 +3173,26 @@ void SwRedline::Show( USHORT nLoop )
break;
}
pDoc->SetRedlineMode_intern( eOld );
- pDoc->DoUndo( bUndo );
}
}
-void SwRedline::Hide( USHORT nLoop )
+void SwRedline::Hide( sal_uInt16 nLoop )
{
SwDoc* pDoc = GetDoc();
RedlineMode_t eOld = pDoc->GetRedlineMode();
pDoc->SetRedlineMode_intern((RedlineMode_t)(eOld | nsRedlineMode_t::REDLINE_IGNORE));
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
switch( GetType() )
{
case nsRedlineType_t::REDLINE_INSERT: // Inhalt wurde eingefuegt
- bIsVisible = TRUE;
+ bIsVisible = sal_True;
if( 1 <= nLoop )
MoveFromSection();
break;
case nsRedlineType_t::REDLINE_DELETE: // Inhalt wurde geloescht
- bIsVisible = FALSE;
+ bIsVisible = sal_False;
switch( nLoop )
{
case 0: MoveToSection(); break;
@@ -3201,18 +3210,16 @@ void SwRedline::Hide( USHORT nLoop )
break;
}
pDoc->SetRedlineMode_intern( eOld );
- pDoc->DoUndo( bUndo );
}
-void SwRedline::ShowOriginal( USHORT nLoop )
+void SwRedline::ShowOriginal( sal_uInt16 nLoop )
{
SwDoc* pDoc = GetDoc();
RedlineMode_t eOld = pDoc->GetRedlineMode();
SwRedlineData* pCur;
pDoc->SetRedlineMode_intern((RedlineMode_t)(eOld | nsRedlineMode_t::REDLINE_IGNORE));
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
// bestimme den Type, ist der erste auf Stack
for( pCur = pRedlineData; pCur->pNext; )
@@ -3221,7 +3228,7 @@ void SwRedline::ShowOriginal( USHORT nLoop )
switch( pCur->eType )
{
case nsRedlineType_t::REDLINE_INSERT: // Inhalt wurde eingefuegt
- bIsVisible = FALSE;
+ bIsVisible = sal_False;
switch( nLoop )
{
case 0: MoveToSection(); break;
@@ -3231,7 +3238,7 @@ void SwRedline::ShowOriginal( USHORT nLoop )
break;
case nsRedlineType_t::REDLINE_DELETE: // Inhalt wurde geloescht
- bIsVisible = TRUE;
+ bIsVisible = sal_True;
if( 1 <= nLoop )
MoveFromSection();
break;
@@ -3245,27 +3252,26 @@ void SwRedline::ShowOriginal( USHORT nLoop )
break;
}
pDoc->SetRedlineMode_intern( eOld );
- pDoc->DoUndo( bUndo );
}
void SwRedline::InvalidateRange() // das Layout anstossen
{
- ULONG nSttNd = GetMark()->nNode.GetIndex(),
+ sal_uLong nSttNd = GetMark()->nNode.GetIndex(),
nEndNd = GetPoint()->nNode.GetIndex();
- USHORT nSttCnt = GetMark()->nContent.GetIndex(),
+ sal_uInt16 nSttCnt = GetMark()->nContent.GetIndex(),
nEndCnt = GetPoint()->nContent.GetIndex();
if( nSttNd > nEndNd || ( nSttNd == nEndNd && nSttCnt > nEndCnt ))
{
- ULONG nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
- nTmp = nSttCnt; nSttCnt = nEndCnt; nEndCnt = (USHORT)nTmp;
+ sal_uLong nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
+ nTmp = nSttCnt; nSttCnt = nEndCnt; nEndCnt = (sal_uInt16)nTmp;
}
SwUpdateAttr aHt( 0, 0, RES_FMT_CHG );
SwNodes& rNds = GetDoc()->GetNodes();
SwNode* pNd;
- for( ULONG n = nSttNd; n <= nEndNd; ++n )
+ for( sal_uLong n = nSttNd; n <= nEndNd; ++n )
if( ND_TEXTNODE == ( pNd = rNds[ n ] )->GetNodeType() )
{
aHt.nStart = n == nSttNd ? nSttCnt : 0;
@@ -3280,7 +3286,7 @@ void SwRedline::InvalidateRange() // das Layout anstossen
* text node nNdIdx
*************************************************************************/
-void SwRedline::CalcStartEnd( ULONG nNdIdx, USHORT& nStart, USHORT& nEnd ) const
+void SwRedline::CalcStartEnd( sal_uLong nNdIdx, sal_uInt16& nStart, sal_uInt16& nEnd ) const
{
const SwPosition *pRStt = Start(), *pREnd = End();
if( pRStt->nNode < nNdIdx )
@@ -3330,13 +3336,13 @@ void SwRedline::MoveToSection()
// damit die Indizies der anderen Redlines nicht mitverschoben
// werden, diese aufs Ende setzen (ist exclusive).
const SwRedlineTbl& rTbl = pDoc->GetRedlineTbl();
- for( USHORT n = 0; n < rTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
{
SwRedline* pRedl = rTbl[ n ];
- if( pRedl->GetBound(TRUE) == *pStt )
- pRedl->GetBound(TRUE) = *pEnd;
- if( pRedl->GetBound(FALSE) == *pStt )
- pRedl->GetBound(FALSE) = *pEnd;
+ if( pRedl->GetBound(sal_True) == *pStt )
+ pRedl->GetBound(sal_True) = *pEnd;
+ if( pRedl->GetBound(sal_False) == *pStt )
+ pRedl->GetBound(sal_False) = *pEnd;
}
}
@@ -3362,7 +3368,7 @@ void SwRedline::MoveToSection()
else
{
if( pCSttNd && !pCEndNd )
- bDelLastPara = TRUE;
+ bDelLastPara = sal_True;
pDoc->MoveRange( aPam, aPos,
IDocumentContentOperations::DOC_MOVEDEFAULT );
}
@@ -3401,9 +3407,9 @@ void SwRedline::CopyToSection()
SwDoc* pDoc = GetDoc();
SwNodes& rNds = pDoc->GetNodes();
- BOOL bSaveCopyFlag = pDoc->IsCopyIsMove(),
+ sal_Bool bSaveCopyFlag = pDoc->IsCopyIsMove(),
bSaveRdlMoveFlg = pDoc->IsRedlineMove();
- pDoc->SetCopyIsMove( TRUE );
+ pDoc->SetCopyIsMove( sal_True );
// The IsRedlineMove() flag causes the behaviour of the
// SwDoc::_CopyFlyInFly method to change, which will eventually be
@@ -3483,13 +3489,13 @@ void SwRedline::DelCopyOfSection()
// damit die Indizies der anderen Redlines nicht mitverschoben
// werden, diese aufs Ende setzen (ist exclusive).
const SwRedlineTbl& rTbl = pDoc->GetRedlineTbl();
- for( USHORT n = 0; n < rTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
{
SwRedline* pRedl = rTbl[ n ];
- if( pRedl->GetBound(TRUE) == *pStt )
- pRedl->GetBound(TRUE) = *pEnd;
- if( pRedl->GetBound(FALSE) == *pStt )
- pRedl->GetBound(FALSE) = *pEnd;
+ if( pRedl->GetBound(sal_True) == *pStt )
+ pRedl->GetBound(sal_True) = *pEnd;
+ if( pRedl->GetBound(sal_False) == *pStt )
+ pRedl->GetBound(sal_False) = *pEnd;
}
}
@@ -3501,7 +3507,7 @@ void SwRedline::DelCopyOfSection()
else if( pCSttNd || pCEndNd )
{
if( pCSttNd && !pCEndNd )
- bDelLastPara = TRUE;
+ bDelLastPara = sal_True;
pDoc->DeleteRange( aPam );
if( bDelLastPara )
@@ -3513,21 +3519,21 @@ void SwRedline::DelCopyOfSection()
// bDelLastPara condition above), only redlines before the
// current ones can be affected.
const SwRedlineTbl& rTbl = pDoc->GetRedlineTbl();
- USHORT n = rTbl.GetPos( this );
+ sal_uInt16 n = rTbl.GetPos( this );
OSL_ENSURE( n != USHRT_MAX, "How strange. We don't exist!" );
- for( BOOL bBreak = FALSE; !bBreak && n > 0; )
+ for( sal_Bool bBreak = sal_False; !bBreak && n > 0; )
{
--n;
- bBreak = TRUE;
- if( rTbl[ n ]->GetBound(TRUE) == *aPam.GetPoint() )
+ bBreak = sal_True;
+ if( rTbl[ n ]->GetBound(sal_True) == *aPam.GetPoint() )
{
- rTbl[ n ]->GetBound(TRUE) = *pEnd;
- bBreak = FALSE;
+ rTbl[ n ]->GetBound(sal_True) = *pEnd;
+ bBreak = sal_False;
}
- if( rTbl[ n ]->GetBound(FALSE) == *aPam.GetPoint() )
+ if( rTbl[ n ]->GetBound(sal_False) == *aPam.GetPoint() )
{
- rTbl[ n ]->GetBound(FALSE) = *pEnd;
- bBreak = FALSE;
+ rTbl[ n ]->GetBound(sal_False) = *pEnd;
+ bBreak = sal_False;
}
}
@@ -3536,8 +3542,8 @@ void SwRedline::DelCopyOfSection()
*GetMark() = *pEnd;
DeleteMark();
- aPam.GetBound( TRUE ).nContent.Assign( 0, 0 );
- aPam.GetBound( FALSE ).nContent.Assign( 0, 0 );
+ aPam.GetBound( sal_True ).nContent.Assign( 0, 0 );
+ aPam.GetBound( sal_False ).nContent.Assign( 0, 0 );
aPam.DeleteMark();
pDoc->DelFullPara( aPam );
}
@@ -3561,42 +3567,42 @@ void SwRedline::MoveFromSection()
SwDoc* pDoc = GetDoc();
const SwRedlineTbl& rTbl = pDoc->GetRedlineTbl();
SvPtrarr aBeforeArr( 16, 16 ), aBehindArr( 16, 16 );
- USHORT nMyPos = rTbl.GetPos( this );
+ sal_uInt16 nMyPos = rTbl.GetPos( this );
OSL_ENSURE( this, "this nicht im Array?" );
- BOOL bBreak = FALSE;
- USHORT n;
+ sal_Bool bBreak = sal_False;
+ sal_uInt16 n;
for( n = nMyPos+1; !bBreak && n < rTbl.Count(); ++n )
{
- bBreak = TRUE;
- if( rTbl[ n ]->GetBound(TRUE) == *GetPoint() )
+ bBreak = sal_True;
+ if( rTbl[ n ]->GetBound(sal_True) == *GetPoint() )
{
- void* pTmp = &rTbl[ n ]->GetBound(TRUE);
+ void* pTmp = &rTbl[ n ]->GetBound(sal_True);
aBehindArr.Insert( pTmp, aBehindArr.Count());
- bBreak = FALSE;
+ bBreak = sal_False;
}
- if( rTbl[ n ]->GetBound(FALSE) == *GetPoint() )
+ if( rTbl[ n ]->GetBound(sal_False) == *GetPoint() )
{
- void* pTmp = &rTbl[ n ]->GetBound(FALSE);
+ void* pTmp = &rTbl[ n ]->GetBound(sal_False);
aBehindArr.Insert( pTmp, aBehindArr.Count() );
- bBreak = FALSE;
+ bBreak = sal_False;
}
}
- for( bBreak = FALSE, n = nMyPos; !bBreak && n ; )
+ for( bBreak = sal_False, n = nMyPos; !bBreak && n ; )
{
--n;
- bBreak = TRUE;
- if( rTbl[ n ]->GetBound(TRUE) == *GetPoint() )
+ bBreak = sal_True;
+ if( rTbl[ n ]->GetBound(sal_True) == *GetPoint() )
{
- void* pTmp = &rTbl[ n ]->GetBound(TRUE);
+ void* pTmp = &rTbl[ n ]->GetBound(sal_True);
aBeforeArr.Insert( pTmp, aBeforeArr.Count() );
- bBreak = FALSE;
+ bBreak = sal_False;
}
- if( rTbl[ n ]->GetBound(FALSE) == *GetPoint() )
+ if( rTbl[ n ]->GetBound(sal_False) == *GetPoint() )
{
- void* pTmp = &rTbl[ n ]->GetBound(FALSE);
+ void* pTmp = &rTbl[ n ]->GetBound(sal_False);
aBeforeArr.Insert( pTmp, aBeforeArr.Count() );
- bBreak = FALSE;
+ bBreak = sal_False;
}
}
@@ -3616,7 +3622,7 @@ void SwRedline::MoveFromSection()
? pCNd->GetFmtColl() : 0;
SwNodeIndex aNdIdx( GetPoint()->nNode, -1 );
- USHORT nPos = GetPoint()->nContent.GetIndex();
+ sal_uInt16 nPos = GetPoint()->nContent.GetIndex();
SwPosition aPos( *GetPoint() );
if( bDelLastPara && *aPam.GetPoint() == *aPam.GetMark() )
@@ -3641,7 +3647,7 @@ void SwRedline::MoveFromSection()
{
GetPoint()->nNode++;
GetPoint()->nContent.Assign( pCNd = GetCntntNode(), 0 );
- bDelLastPara = FALSE;
+ bDelLastPara = sal_False;
}
else if( pColl )
pCNd = GetCntntNode();
@@ -3681,12 +3687,12 @@ void SwRedline::SetContentIdx( const SwNodeIndex* pIdx )
if( pIdx && !pCntntSect )
{
pCntntSect = new SwNodeIndex( *pIdx );
- bIsVisible = FALSE;
+ bIsVisible = sal_False;
}
else if( !pIdx && pCntntSect )
{
delete pCntntSect, pCntntSect = 0;
- bIsVisible = FALSE;
+ bIsVisible = sal_False;
}
#if OSL_DEBUG_LEVEL > 1
else
@@ -3694,15 +3700,15 @@ void SwRedline::SetContentIdx( const SwNodeIndex* pIdx )
#endif
}
-BOOL SwRedline::CanCombine( const SwRedline& rRedl ) const
+sal_Bool SwRedline::CanCombine( const SwRedline& rRedl ) const
{
return IsVisible() && rRedl.IsVisible() &&
pRedlineData->CanCombine( *rRedl.pRedlineData );
}
-void SwRedline::PushData( const SwRedline& rRedl, BOOL bOwnAsNext )
+void SwRedline::PushData( const SwRedline& rRedl, sal_Bool bOwnAsNext )
{
- SwRedlineData* pNew = new SwRedlineData( *rRedl.pRedlineData, FALSE );
+ SwRedlineData* pNew = new SwRedlineData( *rRedl.pRedlineData, sal_False );
if( bOwnAsNext )
{
pNew->pNext = pRedlineData;
@@ -3715,46 +3721,46 @@ void SwRedline::PushData( const SwRedline& rRedl, BOOL bOwnAsNext )
}
}
-BOOL SwRedline::PopData()
+sal_Bool SwRedline::PopData()
{
if( !pRedlineData->pNext )
- return FALSE;
+ return sal_False;
SwRedlineData* pCur = pRedlineData;
pRedlineData = pCur->pNext;
pCur->pNext = 0;
delete pCur;
- return TRUE;
+ return sal_True;
}
-USHORT SwRedline::GetStackCount() const
+sal_uInt16 SwRedline::GetStackCount() const
{
- USHORT nRet = 1;
+ sal_uInt16 nRet = 1;
for( SwRedlineData* pCur = pRedlineData; pCur->pNext; ++nRet )
pCur = pCur->pNext;
return nRet;
}
-USHORT SwRedline::GetAuthor( USHORT nPos ) const
+sal_uInt16 SwRedline::GetAuthor( sal_uInt16 nPos ) const
{
return GetRedlineData(nPos).nAuthor;
}
-const String& SwRedline::GetAuthorString( USHORT nPos ) const
+const String& SwRedline::GetAuthorString( sal_uInt16 nPos ) const
{
return SW_MOD()->GetRedlineAuthor(GetRedlineData(nPos).nAuthor);
}
-const DateTime& SwRedline::GetTimeStamp( USHORT nPos ) const
+const DateTime& SwRedline::GetTimeStamp( sal_uInt16 nPos ) const
{
return GetRedlineData(nPos).aStamp;
}
-RedlineType_t SwRedline::GetRealType( USHORT nPos ) const
+RedlineType_t SwRedline::GetRealType( sal_uInt16 nPos ) const
{
return GetRedlineData(nPos).eType;
}
-const String& SwRedline::GetComment( USHORT nPos ) const
+const String& SwRedline::GetComment( sal_uInt16 nPos ) const
{
return GetRedlineData(nPos).sComment;
}
@@ -3766,18 +3772,18 @@ int SwRedline::operator==( const SwRedline& rCmp ) const
int SwRedline::operator<( const SwRedline& rCmp ) const
{
- BOOL nResult = FALSE;
+ sal_Bool nResult = sal_False;
if (*Start() < *rCmp.Start())
- nResult = TRUE;
+ nResult = sal_True;
else if (*Start() == *rCmp.Start())
if (*End() < *rCmp.End())
- nResult = TRUE;
+ nResult = sal_True;
return nResult;
}
-const SwRedlineData & SwRedline::GetRedlineData(USHORT nPos) const
+const SwRedlineData & SwRedline::GetRedlineData(sal_uInt16 nPos) const
{
SwRedlineData * pCur = pRedlineData;
@@ -3793,7 +3799,7 @@ const SwRedlineData & SwRedline::GetRedlineData(USHORT nPos) const
return *pCur;
}
-String SwRedline::GetDescr(USHORT nPos)
+String SwRedline::GetDescr(sal_uInt16 nPos)
{
String aResult;
@@ -3837,11 +3843,11 @@ String SwRedline::GetDescr(USHORT nPos)
bool SwDoc::IsInRedlines(const SwNode & rNode) const
{
SwPosition aPos(rNode);
- SwNode & rEndOfRedlines = aNodes.GetEndOfRedlines();
+ SwNode & rEndOfRedlines = GetNodes().GetEndOfRedlines();
SwPaM aPam(SwPosition(*rEndOfRedlines.StartOfSectionNode()),
SwPosition(rEndOfRedlines));
- return aPam.ContainsPosition(aPos) ? sal_True : sal_False;
+ return aPam.ContainsPosition(aPos) ? true : false;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx
index 759002c3ac4e..564e8d7e6989 100644
--- a/sw/source/core/doc/docruby.cxx
+++ b/sw/source/core/doc/docruby.cxx
@@ -29,14 +29,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <string.h> // fuer strchr()
-#include <hintids.hxx>
#include <com/sun/star/i18n/UnicodeType.hdl>
#include <com/sun/star/i18n/WordType.hdl>
+
#include <unotools/charclass.hxx>
+
+#include <hintids.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docary.hxx>
#include <mvsave.hxx> // Strukturen zum Sichern beim Move/Delete
#include <ndtxt.hxx>
@@ -44,7 +46,6 @@
#include <rubylist.hxx>
#include <pam.hxx>
#include <swundo.hxx> // fuer die UndoIds
-#include <undobj.hxx>
#include <breakit.hxx>
#include <crsskip.hxx>
@@ -60,12 +61,12 @@ using namespace ::com::sun::star::i18n;
*
*
*/
-USHORT SwDoc::FillRubyList( const SwPaM& rPam, SwRubyList& rList,
- USHORT nMode )
+sal_uInt16 SwDoc::FillRubyList( const SwPaM& rPam, SwRubyList& rList,
+ sal_uInt16 nMode )
{
const SwPaM *_pStartCrsr = (SwPaM*)rPam.GetNext(),
*__pStartCrsr = _pStartCrsr;
- BOOL bCheckEmpty = &rPam != _pStartCrsr;
+ sal_Bool bCheckEmpty = &rPam != _pStartCrsr;
do {
const SwPosition* pStt = _pStartCrsr->Start(),
* pEnd = pStt == _pStartCrsr->GetPoint()
@@ -106,18 +107,18 @@ USHORT SwDoc::FillRubyList( const SwPaM& rPam, SwRubyList& rList,
return rList.Count();
}
-USHORT SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
- USHORT nMode )
+sal_uInt16 SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
+ sal_uInt16 nMode )
{
- StartUndo( UNDO_SETRUBYATTR, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_SETRUBYATTR, NULL );
SvUShortsSort aDelArr;
aDelArr.Insert( RES_TXTATR_CJK_RUBY );
- USHORT nListEntry = 0;
+ sal_uInt16 nListEntry = 0;
const SwPaM *_pStartCrsr = (SwPaM*)rPam.GetNext(),
*__pStartCrsr = _pStartCrsr;
- BOOL bCheckEmpty = &rPam != _pStartCrsr;
+ sal_Bool bCheckEmpty = &rPam != _pStartCrsr;
do {
const SwPosition* pStt = _pStartCrsr->Start(),
* pEnd = pStt == _pStartCrsr->GetPoint()
@@ -146,7 +147,7 @@ USHORT SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
}
else
{
- ResetAttrs( aPam, TRUE, &aDelArr );
+ ResetAttrs( aPam, sal_True, &aDelArr );
}
}
@@ -190,12 +191,12 @@ USHORT SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
} while( 30 > rList.Count() &&
(_pStartCrsr=(SwPaM *)_pStartCrsr->GetNext()) != __pStartCrsr );
- EndUndo( UNDO_SETRUBYATTR, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_SETRUBYATTR, NULL );
return nListEntry;
}
-BOOL SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, USHORT )
+sal_Bool SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, sal_uInt16 )
{
// Point must be the startposition, Mark is optional the end position
SwPosition* pPos = rPam.GetPoint();
@@ -203,7 +204,7 @@ BOOL SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, USHORT )
const String* pTxt = &pTNd->GetTxt();
xub_StrLen nStart = pPos->nContent.GetIndex(), nEnd = pTxt->Len();
- BOOL bHasMark = rPam.HasMark();
+ sal_Bool bHasMark = rPam.HasMark();
if( bHasMark )
{
// in the same node?
@@ -219,7 +220,7 @@ BOOL SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, USHORT )
// ----- search the start
// --- look where a ruby attribut starts
- USHORT nHtIdx = USHRT_MAX;
+ sal_uInt16 nHtIdx = USHRT_MAX;
const SwpHints* pHts = pTNd->GetpSwpHints();
const SwTxtAttr* pAttr = 0;
if( pHts )
@@ -249,7 +250,7 @@ BOOL SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, USHORT )
*pTxt, nStart,
pBreakIt->GetLocale( pTNd->GetLang( nStart )),
WordType::ANYWORD_IGNOREWHITESPACES,
- TRUE ).startPos;
+ sal_True ).startPos;
if( nWordStt < nStart && -1 != nWordStt )
{
nStart = (xub_StrLen)nWordStt;
@@ -257,7 +258,7 @@ BOOL SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, USHORT )
}
}
- BOOL bAlphaNum = FALSE;
+ sal_Bool bAlphaNum = sal_False;
long nWordEnd = nEnd;
CharClass& rCC = GetAppCharClass();
while( nStart < nEnd )
@@ -277,14 +278,14 @@ BOOL SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, USHORT )
}
sal_Int32 nChType = rCC.getType( *pTxt, nStart );
- BOOL bIgnoreChar = FALSE, bIsAlphaNum = FALSE, bChkNxtWrd = FALSE;
+ sal_Bool bIgnoreChar = sal_False, bIsAlphaNum = sal_False, bChkNxtWrd = sal_False;
switch( nChType )
{
case UnicodeType::UPPERCASE_LETTER:
case UnicodeType::LOWERCASE_LETTER:
case UnicodeType::TITLECASE_LETTER:
case UnicodeType::DECIMAL_DIGIT_NUMBER:
- bChkNxtWrd = bIsAlphaNum = TRUE;
+ bChkNxtWrd = bIsAlphaNum = sal_True;
break;
case UnicodeType::SPACE_SEPARATOR:
@@ -292,15 +293,15 @@ BOOL SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, USHORT )
/*??*/ case UnicodeType::PRIVATE_USE:
case UnicodeType::START_PUNCTUATION:
case UnicodeType::END_PUNCTUATION:
- bIgnoreChar = TRUE;
+ bIgnoreChar = sal_True;
break;
case UnicodeType::OTHER_LETTER:
- bChkNxtWrd = TRUE;
+ bChkNxtWrd = sal_True;
default:
- bIsAlphaNum = FALSE;
+ bIsAlphaNum = sal_False;
break;
}
@@ -320,7 +321,7 @@ BOOL SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, USHORT )
*pTxt, nStart,
pBreakIt->GetLocale( pTNd->GetLang( nStart )),
WordType::ANYWORD_IGNOREWHITESPACES,
- TRUE ).endPos;
+ sal_True ).endPos;
if( 0 > nWordEnd || nWordEnd > nEnd || nWordEnd == nStart )
nWordEnd = nEnd;
}
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 072f91113865..62b9560151c6 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
#include <rtl/math.hxx>
#include <unotools/collatorwrapper.hxx>
@@ -40,6 +41,7 @@
#include <fmtanchr.hxx>
#include <frmfmt.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <node.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
@@ -47,7 +49,9 @@
#include <swundo.hxx>
#include <sortopt.hxx>
#include <docsort.hxx>
-#include <undobj.hxx>
+#include <UndoSort.hxx>
+#include <UndoRedline.hxx>
+#include <hints.hxx>
#include <tblsel.hxx>
#include <cellatr.hxx>
#include <redline.hxx>
@@ -127,20 +131,20 @@ double SwSortElement::StrToDouble( const String& rStr ) const
/*--------------------------------------------------------------------
Beschreibung: Operatoren zum Vergleichen
--------------------------------------------------------------------*/
-BOOL SwSortElement::operator==(const SwSortElement& )
+sal_Bool SwSortElement::operator==(const SwSortElement& )
{
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
Beschreibung: Kleiner-Operator fuers sortieren
--------------------------------------------------------------------*/
-BOOL SwSortElement::operator<(const SwSortElement& rCmp)
+sal_Bool SwSortElement::operator<(const SwSortElement& rCmp)
{
// der eigentliche Vergleich
//
- for(USHORT nKey = 0; nKey < pOptions->aKeys.Count(); ++nKey)
+ for(sal_uInt16 nKey = 0; nKey < pOptions->aKeys.Count(); ++nKey)
{
const SwSortElement *pOrig, *pCmp;
@@ -181,10 +185,10 @@ BOOL SwSortElement::operator<(const SwSortElement& rCmp)
return -1 == nCmp;
}
}
- return FALSE;
+ return sal_False;
}
-double SwSortElement::GetValue( USHORT nKey ) const
+double SwSortElement::GetValue( sal_uInt16 nKey ) const
{
return StrToDouble( GetKey( nKey ));
}
@@ -204,7 +208,7 @@ SwSortTxtElement::~SwSortTxtElement()
/*--------------------------------------------------------------------
Beschreibung: Key ermitteln
--------------------------------------------------------------------*/
-String SwSortTxtElement::GetKey(USHORT nId) const
+String SwSortTxtElement::GetKey(sal_uInt16 nId) const
{
SwTxtNode* pTxtNd = aPos.GetNode().GetTxtNode();
if( !pTxtNd )
@@ -214,7 +218,7 @@ String SwSortTxtElement::GetKey(USHORT nId) const
const String& rStr = pTxtNd->GetTxt();
sal_Unicode nDeli = pOptions->cDeli;
- USHORT nDCount = pOptions->aKeys[nId]->nColumnId, i = 1;
+ sal_uInt16 nDCount = pOptions->aKeys[nId]->nColumnId, i = 1;
xub_StrLen nStart = 0;
// Den Delimitter suchen
@@ -233,7 +237,7 @@ String SwSortTxtElement::GetKey(USHORT nId) const
/*--------------------------------------------------------------------
Beschreibung: Sortier-Elemente fuer Tabellen
--------------------------------------------------------------------*/
-SwSortBoxElement::SwSortBoxElement( USHORT nRC )
+SwSortBoxElement::SwSortBoxElement( sal_uInt16 nRC )
: nRow( nRC )
{
}
@@ -245,10 +249,10 @@ SwSortBoxElement::~SwSortBoxElement()
/*--------------------------------------------------------------------
Beschreibung: Schluessel zu einer Zelle ermitteln
--------------------------------------------------------------------*/
-String SwSortBoxElement::GetKey(USHORT nKey) const
+String SwSortBoxElement::GetKey(sal_uInt16 nKey) const
{
const _FndBox* pFndBox;
- USHORT nCol = pOptions->aKeys[nKey]->nColumnId-1;
+ sal_uInt16 nCol = pOptions->aKeys[nKey]->nColumnId-1;
if( SRT_ROWS == pOptions->eDirection )
pFndBox = pBox->GetBox(nCol, nRow); // Zeilen sortieren
@@ -266,7 +270,7 @@ String SwSortBoxElement::GetKey(USHORT nKey) const
{
// ueber alle TextNodes der Box
const SwNode *pNd = 0, *pEndNd = pMyBox->GetSttNd()->EndOfSectionNode();
- for( ULONG nIdx = pMyBox->GetSttIdx() + 1; pNd != pEndNd; ++nIdx )
+ for( sal_uLong nIdx = pMyBox->GetSttIdx() + 1; pNd != pEndNd; ++nIdx )
if( ( pNd = pDoc->GetNodes()[ nIdx ])->IsTxtNode() )
aRetStr += ((SwTxtNode*)pNd)->GetTxt();
}
@@ -274,10 +278,10 @@ String SwSortBoxElement::GetKey(USHORT nKey) const
return aRetStr;
}
-double SwSortBoxElement::GetValue( USHORT nKey ) const
+double SwSortBoxElement::GetValue( sal_uInt16 nKey ) const
{
const _FndBox* pFndBox;
- USHORT nCol = pOptions->aKeys[nKey]->nColumnId-1;
+ sal_uInt16 nCol = pOptions->aKeys[nKey]->nColumnId-1;
if( SRT_ROWS == pOptions->eDirection )
pFndBox = pBox->GetBox(nCol, nRow); // Zeilen sortieren
@@ -302,13 +306,13 @@ double SwSortBoxElement::GetValue( USHORT nKey ) const
/*--------------------------------------------------------------------
Beschreibung: Text sortieren im Document
--------------------------------------------------------------------*/
-BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
+sal_Bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
{
// pruefen ob Rahmen im Text
const SwPosition *pStart = rPaM.Start(), *pEnd = rPaM.End();
// Index auf den Start der Selektion
- for ( USHORT n = 0; n < GetSpzFrmFmts()->Count(); ++n )
+ for ( sal_uInt16 n = 0; n < GetSpzFrmFmts()->Count(); ++n )
{
SwFrmFmt *const pFmt = static_cast<SwFrmFmt*>((*GetSpzFrmFmts())[n]);
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -316,22 +320,24 @@ BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
if (pAPos && (FLY_AT_PARA == pAnchor->GetAnchorId()) &&
pStart->nNode <= pAPos->nNode && pAPos->nNode <= pEnd->nNode )
- return FALSE;
+ return sal_False;
}
// pruefe ob nur TextNodes in der Selection liegen
{
- ULONG nStart = pStart->nNode.GetIndex(),
+ sal_uLong nStart = pStart->nNode.GetIndex(),
nEnd = pEnd->nNode.GetIndex();
while( nStart <= nEnd )
// Iterieren ueber einen selektierten Bereich
if( !GetNodes()[ nStart++ ]->IsTxtNode() )
- return FALSE;
+ return sal_False;
}
- BOOL bUndo = DoesUndo();
+ bool const bUndo = GetIDocumentUndoRedo().DoesUndo();
if( bUndo )
- StartUndo( UNDO_START, NULL );
+ {
+ GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ }
SwPaM* pRedlPam = 0;
SwUndoRedlineSort* pRedlUndo = 0;
@@ -340,7 +346,7 @@ BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
if( IsRedlineOn() || (!IsIgnoreRedline() && pRedlineTbl->Count() ))
{
pRedlPam = new SwPaM( pStart->nNode, pEnd->nNode, -1, 1 );
- SwCntntNode* pCNd = pRedlPam->GetCntntNode( FALSE );
+ SwCntntNode* pCNd = pRedlPam->GetCntntNode( sal_False );
if( pCNd )
pRedlPam->GetMark()->nContent = pCNd->Len();
@@ -349,7 +355,7 @@ BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
if( bUndo )
{
pRedlUndo = new SwUndoRedlineSort( *pRedlPam,rOpt );
- DoUndo( FALSE );
+ GetIDocumentUndoRedo().DoUndo(false);
}
// erst den Bereich kopieren, dann
SwNodeIndex aEndIdx( pEnd->nNode, 1 );
@@ -360,11 +366,11 @@ BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
DeleteRedline( *pRedlPam, true, USHRT_MAX );
pRedlPam->GetMark()->nNode.Assign( pEnd->nNode.GetNode(), 1 );
- pCNd = pRedlPam->GetCntntNode( FALSE );
+ pCNd = pRedlPam->GetCntntNode( sal_False );
pRedlPam->GetMark()->nContent.Assign( pCNd, 0 );
pRedlPam->GetPoint()->nNode.Assign( aEndIdx.GetNode() );
- pCNd = pRedlPam->GetCntntNode( TRUE );
+ pCNd = pRedlPam->GetCntntNode( sal_True );
xub_StrLen nCLen = 0;
if( !pCNd &&
0 != (pCNd = GetNodes()[ aEndIdx.GetIndex()-1 ]->GetCntntNode()))
@@ -398,15 +404,18 @@ BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
// Und jetzt der Akt: Verschieben von Nodes und immer schoen auf UNDO
// achten
//
- ULONG nBeg = pStart->nNode.GetIndex();
+ sal_uLong nBeg = pStart->nNode.GetIndex();
SwNodeRange aRg( aStart, aStart );
if( bUndo && !pRedlUndo )
- AppendUndo( pUndoSort = new SwUndoSort( rPaM, rOpt ) );
+ {
+ pUndoSort = new SwUndoSort(rPaM, rOpt);
+ GetIDocumentUndoRedo().AppendUndo(pUndoSort);
+ }
- DoUndo( FALSE );
+ GetIDocumentUndoRedo().DoUndo(false);
- for ( USHORT n = 0; n < aSortArr.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < aSortArr.Count(); ++n )
{
SwSortTxtElement* pBox = (SwSortTxtElement*)aSortArr[n];
aStart = nBeg + n;
@@ -430,7 +439,10 @@ BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
if( pRedlUndo )
{
pRedlUndo->SetSaveRange( *pRedlPam );
- AppendUndo( pRedlUndo );
+ // UGLY: temp. enable Undo
+ GetIDocumentUndoRedo().DoUndo(true);
+ GetIDocumentUndoRedo().AppendUndo( pRedlUndo );
+ GetIDocumentUndoRedo().DoUndo(false);
}
// nBeg is start of sorted range
@@ -467,23 +479,25 @@ BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
delete pRedlPam, pRedlPam = 0;
}
- DoUndo( bUndo );
+ GetIDocumentUndoRedo().DoUndo( bUndo );
if( bUndo )
- EndUndo( UNDO_END, NULL );
+ {
+ GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ }
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
Beschreibung: Tabelle sortieren im Document
--------------------------------------------------------------------*/
-BOOL SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
+sal_Bool SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
{
// uebers SwDoc fuer Undo !!
OSL_ENSURE( rBoxes.Count(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// Auf gehts sortieren
// suche alle Boxen / Lines
@@ -494,12 +508,12 @@ BOOL SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
}
if(!aFndBox.GetLines().Count())
- return FALSE;
+ return sal_False;
if( !IsIgnoreRedline() && GetRedlineTbl().Count() )
DeleteRedline( *pTblNd, true, USHRT_MAX );
- USHORT nStart = 0;
+ sal_uInt16 nStart = 0;
if( pTblNd->GetTable().GetRowsToRepeat() > 0 && rOpt.eDirection == SRT_ROWS )
{
// Oberste seleketierte Zeile
@@ -532,7 +546,7 @@ BOOL SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
FlatFndBox aFlatBox(this, aFndBox);
if(!aFlatBox.IsSymmetric())
- return FALSE;
+ return sal_False;
// MIB 9.7.97: HTML-Layout loeschen
pTblNd->GetTable().SetHTMLTableLayout( 0 );
@@ -546,21 +560,18 @@ BOOL SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
pTblNd->DelFrms();
// ? TL_CHART2: ?
- // Redo loeschen bevor Undo
- BOOL bUndo = DoesUndo();
SwUndoSort* pUndoSort = 0;
- if(bUndo)
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
pUndoSort = new SwUndoSort( rBoxes[0]->GetSttIdx(),
rBoxes[rBoxes.Count()-1]->GetSttIdx(),
*pTblNd, rOpt, aFlatBox.HasItemSets() );
- AppendUndo(pUndoSort);
- DoUndo(FALSE);
+ GetIDocumentUndoRedo().AppendUndo(pUndoSort);
}
+ ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
// SchluesselElemente einsortieren
- USHORT nCount = (rOpt.eDirection == SRT_ROWS) ?
+ sal_uInt16 nCount = (rOpt.eDirection == SRT_ROWS) ?
aFlatBox.GetRows() : aFlatBox.GetCols();
// SortList nach Schluessel sortieren
@@ -569,7 +580,7 @@ BOOL SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
// wenn die HeaderLine wiederholt wird und die
// Zeilen sortiert werden 1.Zeile nicht mitsortieren
- USHORT i;
+ sal_uInt16 i;
for( i = nStart; i < nCount; ++i)
{
@@ -591,7 +602,7 @@ BOOL SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
// Restore table frames:
// --> FME 2004-11-26 #i37739# A simple 'MakeFrms' after the node sorting
// does not work if the table is inside a frame and has no prev/next.
- const ULONG nIdx = pTblNd->GetIndex();
+ const sal_uLong nIdx = pTblNd->GetIndex();
aNode2Layout.RestoreUpperFrms( GetNodes(), nIdx, nIdx + 1 );
// <--
@@ -602,20 +613,17 @@ BOOL SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
aSortList.DeleteAndDestroy( 0, aSortList.Count() );
SwSortElement::Finit();
- // Undo wieder aktivieren
- DoUndo(bUndo);
-
SetModified();
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
Beschreibung: Zeilenweise verschieben
--------------------------------------------------------------------*/
-void MoveRow(SwDoc* pDoc, const FlatFndBox& rBox, USHORT nS, USHORT nT,
+void MoveRow(SwDoc* pDoc, const FlatFndBox& rBox, sal_uInt16 nS, sal_uInt16 nT,
SwMovedBoxes& rMovedList, SwUndoSort* pUD)
{
- for( USHORT i=0; i < rBox.GetCols(); ++i )
+ for( sal_uInt16 i=0; i < rBox.GetCols(); ++i )
{ // Alte Zellen-Pos bestimmen und merken
const _FndBox* pSource = rBox.GetBox(i, nS);
@@ -625,7 +633,7 @@ void MoveRow(SwDoc* pDoc, const FlatFndBox& rBox, USHORT nS, USHORT nT,
const SwTableBox* pT = pTarget->GetBox();
const SwTableBox* pS = pSource->GetBox();
- BOOL bMoved = rMovedList.GetPos(pT) != USHRT_MAX;
+ sal_Bool bMoved = rMovedList.GetPos(pT) != USHRT_MAX;
// und verschieben
MoveCell(pDoc, pS, pT, bMoved, pUD);
@@ -658,10 +666,10 @@ void MoveRow(SwDoc* pDoc, const FlatFndBox& rBox, USHORT nS, USHORT nT,
/*--------------------------------------------------------------------
Beschreibung: Spaltenweise verschieben
--------------------------------------------------------------------*/
-void MoveCol(SwDoc* pDoc, const FlatFndBox& rBox, USHORT nS, USHORT nT,
+void MoveCol(SwDoc* pDoc, const FlatFndBox& rBox, sal_uInt16 nS, sal_uInt16 nT,
SwMovedBoxes& rMovedList, SwUndoSort* pUD)
{
- for(USHORT i=0; i < rBox.GetRows(); ++i)
+ for(sal_uInt16 i=0; i < rBox.GetRows(); ++i)
{ // Alte Zellen-Pos bestimmen und merken
const _FndBox* pSource = rBox.GetBox(nS, i);
@@ -673,7 +681,7 @@ void MoveCol(SwDoc* pDoc, const FlatFndBox& rBox, USHORT nS, USHORT nT,
const SwTableBox* pS = pSource->GetBox();
// und verschieben
- BOOL bMoved = rMovedList.GetPos(pT) != USHRT_MAX;
+ sal_Bool bMoved = rMovedList.GetPos(pT) != USHRT_MAX;
MoveCell(pDoc, pS, pT, bMoved, pUD);
rMovedList.Insert(pS, rMovedList.Count() );
@@ -705,7 +713,7 @@ void MoveCol(SwDoc* pDoc, const FlatFndBox& rBox, USHORT nS, USHORT nT,
Beschreibung: Eine einzelne Zelle verschieben
--------------------------------------------------------------------*/
void MoveCell(SwDoc* pDoc, const SwTableBox* pSource, const SwTableBox* pTar,
- BOOL bMovedBefore, SwUndoSort* pUD)
+ sal_Bool bMovedBefore, SwUndoSort* pUD)
{
OSL_ENSURE(pSource && pTar,"Fehlende Quelle oder Ziel");
@@ -732,9 +740,9 @@ void MoveCell(SwDoc* pDoc, const SwTableBox* pSource, const SwTableBox* pTar,
// Ziel
SwNodeIndex aTar( *pTar->GetSttNd() );
pNd = pDoc->GetNodes().GoNext( &aTar ); // naechsten ContentNode
- ULONG nCount = pNd->EndOfSectionIndex() - pNd->StartOfSectionIndex();
+ sal_uLong nCount = pNd->EndOfSectionIndex() - pNd->StartOfSectionIndex();
- BOOL bDelFirst = FALSE;
+ sal_Bool bDelFirst = sal_False;
if( nCount == 2 )
{
OSL_ENSURE( pNd->GetCntntNode(), "Kein ContentNode");
@@ -796,71 +804,71 @@ FlatFndBox::~FlatFndBox()
/*--------------------------------------------------------------------
Beschreibung: Alle Lines einer Box muessen gleichviel Boxen haben
--------------------------------------------------------------------*/
-BOOL FlatFndBox::CheckLineSymmetry(const _FndBox& rBox)
+sal_Bool FlatFndBox::CheckLineSymmetry(const _FndBox& rBox)
{
const _FndLines &rLines = rBox.GetLines();
- USHORT nBoxes(0);
+ sal_uInt16 nBoxes(0);
// UeberLines iterieren
- for(USHORT i=0; i < rLines.Count(); ++i)
+ for(sal_uInt16 i=0; i < rLines.Count(); ++i)
{ // Die Boxen einer Line
_FndLine* pLn = rLines[i];
const _FndBoxes& rBoxes = pLn->GetBoxes();
// Anzahl der Boxen aller Lines ungleich -> keine Symmetrie
if( i && nBoxes != rBoxes.Count())
- return FALSE;
+ return sal_False;
nBoxes = rBoxes.Count();
if( !CheckBoxSymmetry( *pLn ) )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
Beschreibung: Box auf Symmetrie pruefen
Alle Boxen einer Line muessen gleichviele Lines haben
--------------------------------------------------------------------*/
-BOOL FlatFndBox::CheckBoxSymmetry(const _FndLine& rLn)
+sal_Bool FlatFndBox::CheckBoxSymmetry(const _FndLine& rLn)
{
const _FndBoxes &rBoxes = rLn.GetBoxes();
- USHORT nLines(0);
+ sal_uInt16 nLines(0);
// Ueber Boxes iterieren
- for(USHORT i=0; i < rBoxes.Count(); ++i)
+ for(sal_uInt16 i=0; i < rBoxes.Count(); ++i)
{ // Die Boxen einer Line
_FndBox* pBox = rBoxes[i];
const _FndLines& rLines = pBox->GetLines();
// Anzahl der Boxen aller Lines ungleich -> keine Symmetrie
if( i && nLines != rLines.Count() )
- return FALSE;
+ return sal_False;
nLines = rLines.Count();
if( nLines && !CheckLineSymmetry( *pBox ) )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
Beschreibung: max Anzahl der Spalten (Boxes)
--------------------------------------------------------------------*/
-USHORT FlatFndBox::GetColCount(const _FndBox& rBox)
+sal_uInt16 FlatFndBox::GetColCount(const _FndBox& rBox)
{
const _FndLines& rLines = rBox.GetLines();
// Ueber Lines iterieren
if( !rLines.Count() )
return 1;
- USHORT nSum = 0;
- for( USHORT i=0; i < rLines.Count(); ++i )
+ sal_uInt16 nSum = 0;
+ for( sal_uInt16 i=0; i < rLines.Count(); ++i )
{
// Die Boxen einer Line
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
const _FndBoxes& rBoxes = rLines[i]->GetBoxes();
- for( USHORT j=0; j < rBoxes.Count(); ++j )
+ for( sal_uInt16 j=0; j < rBoxes.Count(); ++j )
// Rekursiv wirder ueber die Lines Iterieren
nCount += rBoxes[j]->GetLines().Count()
? GetColCount(*rBoxes[j]) : 1;
@@ -874,18 +882,18 @@ USHORT FlatFndBox::GetColCount(const _FndBox& rBox)
/*--------------------------------------------------------------------
Beschreibung: max Anzahl der Zeilen (Lines)
--------------------------------------------------------------------*/
-USHORT FlatFndBox::GetRowCount(const _FndBox& rBox)
+sal_uInt16 FlatFndBox::GetRowCount(const _FndBox& rBox)
{
const _FndLines& rLines = rBox.GetLines();
if( !rLines.Count() )
return 1;
- USHORT nLines = 0;
- for(USHORT i=0; i < rLines.Count(); ++i)
+ sal_uInt16 nLines = 0;
+ for(sal_uInt16 i=0; i < rLines.Count(); ++i)
{ // Die Boxen einer Line
const _FndBoxes& rBoxes = rLines[i]->GetBoxes();
- USHORT nLn = 1;
- for(USHORT j=0; j < rBoxes.Count(); ++j)
+ sal_uInt16 nLn = 1;
+ for(sal_uInt16 j=0; j < rBoxes.Count(); ++j)
if( rBoxes[j]->GetLines().Count() )
// Rekursiv ueber die Lines Iterieren
nLn = Max(GetRowCount(*rBoxes[j]), nLn);
@@ -898,19 +906,19 @@ USHORT FlatFndBox::GetRowCount(const _FndBox& rBox)
/*--------------------------------------------------------------------
Beschreibung: lineares Array aus atomaren FndBoxes erzeugen
--------------------------------------------------------------------*/
-void FlatFndBox::FillFlat(const _FndBox& rBox, BOOL bLastBox)
+void FlatFndBox::FillFlat(const _FndBox& rBox, sal_Bool bLastBox)
{
- BOOL bModRow = FALSE;
+ sal_Bool bModRow = sal_False;
const _FndLines& rLines = rBox.GetLines();
// Ueber Lines iterieren
- USHORT nOldRow = nRow;
- for( USHORT i=0; i < rLines.Count(); ++i )
+ sal_uInt16 nOldRow = nRow;
+ for( sal_uInt16 i=0; i < rLines.Count(); ++i )
{
// Die Boxen einer Line
const _FndBoxes& rBoxes = rLines[i]->GetBoxes();
- USHORT nOldCol = nCol;
- for( USHORT j = 0; j < rBoxes.Count(); ++j )
+ sal_uInt16 nOldCol = nCol;
+ for( sal_uInt16 j = 0; j < rBoxes.Count(); ++j )
{
// Die Box pruefen ob es eine atomare Box ist
const _FndBox* pBox = rBoxes[ j ];
@@ -918,7 +926,7 @@ void FlatFndBox::FillFlat(const _FndBox& rBox, BOOL bLastBox)
if( !pBox->GetLines().Count() )
{
// peichern
- USHORT nOff = nRow * nCols + nCol;
+ sal_uInt16 nOff = nRow * nCols + nCol;
*(pArr + nOff) = pBox;
// sicher die Formel/Format/Value Werte
@@ -939,7 +947,7 @@ void FlatFndBox::FillFlat(const _FndBox& rBox, BOOL bLastBox)
*(ppItemSets + nOff ) = pSet;
}
- bModRow = TRUE;
+ bModRow = sal_True;
}
else
{
@@ -959,16 +967,16 @@ void FlatFndBox::FillFlat(const _FndBox& rBox, BOOL bLastBox)
/*--------------------------------------------------------------------
Beschreibung: Zugriff auf eine bestimmte Zelle
--------------------------------------------------------------------*/
-const _FndBox* FlatFndBox::GetBox(USHORT n_Col, USHORT n_Row) const
+const _FndBox* FlatFndBox::GetBox(sal_uInt16 n_Col, sal_uInt16 n_Row) const
{
- USHORT nOff = n_Row * nCols + n_Col;
+ sal_uInt16 nOff = n_Row * nCols + n_Col;
const _FndBox* pTmp = *(pArr + nOff);
OSL_ENSURE(n_Col < nCols && n_Row < nRows && pTmp, "unzulaessiger Array-Zugriff");
return pTmp;
}
-const SfxItemSet* FlatFndBox::GetItemSet(USHORT n_Col, USHORT n_Row) const
+const SfxItemSet* FlatFndBox::GetItemSet(sal_uInt16 n_Col, sal_uInt16 n_Row) const
{
OSL_ENSURE( !ppItemSets || ( n_Col < nCols && n_Row < nRows), "unzulaessiger Array-Zugriff");
diff --git a/sw/source/core/doc/docstat.cxx b/sw/source/core/doc/docstat.cxx
index 5225ffd6ad10..0b79d817a436 100644
--- a/sw/source/core/doc/docstat.cxx
+++ b/sw/source/core/doc/docstat.cxx
@@ -47,7 +47,7 @@ SwDocStat::SwDocStat() :
nWord(0),
nChar(0),
nCharExcludingSpaces(0),
- bModified(TRUE)
+ bModified(sal_True)
{}
/************************************************************************
@@ -65,7 +65,7 @@ void SwDocStat::Reset()
nWord = 0;
nChar = 0;
nCharExcludingSpaces = 0;
- bModified = TRUE;
+ bModified = sal_True;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index b11d9497e975..00d425324f25 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -50,6 +50,7 @@
#include <frmatr.hxx>
#include <pagedesc.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pagefrm.hxx>
#include <ndtxt.hxx>
#include <swtable.hxx>
@@ -59,7 +60,7 @@
#include <poolfmt.hxx>
#include <txtfrm.hxx>
#include <rootfrm.hxx>
-#include <undobj.hxx>
+#include <UndoAttribute.hxx>
#include <swundo.hxx>
#include <mdiexp.hxx>
#include <docary.hxx>
@@ -102,18 +103,18 @@ typedef LinkStruct* LinkStructPtr;
SV_DECL_PTRARR(LinkStructArr, LinkStructPtr, 0, 5 )
SV_IMPL_PTRARR(LinkStructArr, LinkStructPtr)
-USHORT SwDoc::GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const
+sal_uInt16 SwDoc::GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const
{
if( rArr.Count() )
- rArr.Remove( USHORT(0), rArr.Count() );
+ rArr.Remove( sal_uInt16(0), rArr.Count() );
// dann mal ueber den Pool und alle Primary oder Secondary heraussuchen
const SwTxtTOXMark* pMark;
const SfxPoolItem* pItem;
const SwTOXType* pTOXType;
- USHORT i, nMaxItems = GetAttrPool().GetItemCount( RES_TXTATR_TOXMARK );
+ sal_uInt32 i, nMaxItems = GetAttrPool().GetItemCount2( RES_TXTATR_TOXMARK );
for( i = 0; i < nMaxItems; ++i )
- if( 0 != (pItem = GetAttrPool().GetItem( RES_TXTATR_TOXMARK, i ) ) &&
+ if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_TOXMARK, i ) ) &&
0!= ( pTOXType = ((SwTOXMark*)pItem)->GetTOXType()) &&
TOX_INDEX == pTOXType->GetType() &&
0 != ( pMark = ((SwTOXMark*)pItem)->GetTxtTOXMark() ) &&
@@ -136,12 +137,11 @@ USHORT SwDoc::GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const
/*--------------------------------------------------------------------
Beschreibung: aktuelle Verzeichnismarkierungen ermitteln
--------------------------------------------------------------------*/
-USHORT SwDoc::GetCurTOXMark( const SwPosition& rPos,
+sal_uInt16 SwDoc::GetCurTOXMark( const SwPosition& rPos,
SwTOXMarks& rArr ) const
{
- // suche an der Position rPos nach allen SwTOXMark's
- SwTxtNode* pTxtNd = GetNodes()[ rPos.nNode ]->GetTxtNode();
- // kein TextNode oder kein HintsArray vorhanden ??
+ // search on Position rPos for all SwTOXMarks
+ SwTxtNode *const pTxtNd = rPos.nNode.GetNode().GetTxtNode();
if( !pTxtNd || !pTxtNd->GetpSwpHints() )
return 0;
@@ -152,7 +152,7 @@ USHORT SwDoc::GetCurTOXMark( const SwPosition& rPos,
xub_StrLen nAktPos = rPos.nContent.GetIndex();
- for( USHORT n = 0; n < rHts.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rHts.Count(); ++n )
{
if( RES_TXTATR_TOXMARK != (pHt = rHts[n])->Which() )
continue;
@@ -186,14 +186,13 @@ void SwDoc::DeleteTOXMark( const SwTOXMark* pTOXMark )
SwTxtNode& rTxtNd = const_cast<SwTxtNode&>(pTxtTOXMark->GetTxtNode());
OSL_ENSURE( rTxtNd.GetpSwpHints(), "kann nicht geloescht werden" );
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- // fuers Undo die Attribute sichern
- ClearRedo();
+ // save attributes for Undo
SwUndoResetAttr* pUndo = new SwUndoResetAttr(
SwPosition( rTxtNd, SwIndex( &rTxtNd, *pTxtTOXMark->GetStart() ) ),
RES_TXTATR_TOXMARK );
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
SwRegHistory aRHst( rTxtNd, &pUndo->GetHistory() );
rTxtNd.GetpSwpHints()->Register( &aRHst );
@@ -201,7 +200,7 @@ void SwDoc::DeleteTOXMark( const SwTOXMark* pTOXMark )
rTxtNd.DeleteAttribute( const_cast<SwTxtTOXMark*>(pTxtTOXMark) );
- if ( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
if( rTxtNd.GetpSwpHints() )
rTxtNd.GetpSwpHints()->DeRegister();
@@ -214,10 +213,10 @@ void SwDoc::DeleteTOXMark( const SwTOXMark* pTOXMark )
--------------------------------------------------------------------*/
class CompareNodeCntnt
{
- ULONG nNode;
+ sal_uLong nNode;
xub_StrLen nCntnt;
public:
- CompareNodeCntnt( ULONG nNd, xub_StrLen nCnt )
+ CompareNodeCntnt( sal_uLong nNd, xub_StrLen nCnt )
: nNode( nNd ), nCntnt( nCnt ) {}
int operator==( const CompareNodeCntnt& rCmp ) const
@@ -239,7 +238,7 @@ public:
};
const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark,
- SwTOXSearch eDir, BOOL bInReadOnly )
+ SwTOXSearch eDir, sal_Bool bInReadOnly )
{
const SwTxtTOXMark* pMark = rCurTOXMark.GetTxtTOXMark();
OSL_ENSURE(pMark, "pMark==0 Ungueltige TxtTOXMark");
@@ -268,7 +267,7 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark,
if( pTOXMark != &rCurTOXMark &&
0 != ( pMark = pTOXMark->GetTxtTOXMark()) &&
0 != ( pTOXSrc = pMark->GetpTxtNd() ) &&
- 0 != ( pCFrm = pTOXSrc->GetFrm( &aPt, 0, FALSE )) &&
+ 0 != ( pCFrm = pTOXSrc->GetFrm( &aPt, 0, sal_False )) &&
( bInReadOnly || !pCFrm->IsProtected() ))
{
CompareNodeCntnt aAbsNew( pTOXSrc->GetIndex(), *pMark->GetStart() );
@@ -287,12 +286,12 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark,
if ( (aAbsNew < aAbsIdx && aAbsNew > aPrevPos &&
aPrevPos != aAbsIdx && aAbsNew != aAbsIdx ) ||
(aAbsIdx == aAbsNew &&
- (ULONG(&rCurTOXMark) > ULONG(pTOXMark) &&
+ (sal_uLong(&rCurTOXMark) > sal_uLong(pTOXMark) &&
(!pNew ||
(pNew && (aPrevPos < aAbsIdx ||
- ULONG(pNew) < ULONG(pTOXMark)))))) ||
+ sal_uLong(pNew) < sal_uLong(pTOXMark)))))) ||
(aPrevPos == aAbsNew && aAbsIdx != aAbsNew &&
- ULONG(pTOXMark) > ULONG(pNew)) )
+ sal_uLong(pTOXMark) > sal_uLong(pNew)) )
{
pNew = pTOXMark;
aPrevPos = aAbsNew;
@@ -312,12 +311,12 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark,
if ( (aAbsNew > aAbsIdx && aAbsNew < aNextPos &&
aNextPos != aAbsIdx && aAbsNew != aAbsIdx ) ||
(aAbsIdx == aAbsNew &&
- (ULONG(&rCurTOXMark) < ULONG(pTOXMark) &&
+ (sal_uLong(&rCurTOXMark) < sal_uLong(pTOXMark) &&
(!pNew ||
(pNew && (aNextPos > aAbsIdx ||
- ULONG(pNew) > ULONG(pTOXMark)))))) ||
+ sal_uLong(pNew) > sal_uLong(pTOXMark)))))) ||
(aNextPos == aAbsNew && aAbsIdx != aAbsNew &&
- ULONG(pTOXMark) < ULONG(pNew)) )
+ sal_uLong(pTOXMark) < sal_uLong(pNew)) )
{
pNew = pTOXMark;
aNextPos = aAbsNew;
@@ -357,9 +356,9 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark,
const SwTOXBaseSection* SwDoc::InsertTableOf( const SwPosition& rPos,
const SwTOXBase& rTOX,
const SfxItemSet* pSet,
- BOOL bExpand )
+ sal_Bool bExpand )
{
- StartUndo( UNDO_INSTOX, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_INSTOX, NULL );
String sSectNm( rTOX.GetTOXName() );
sSectNm = GetUniqueTOXBaseName( *rTOX.GetTOXType(), &sSectNm );
@@ -401,12 +400,12 @@ sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" ));
}
}
- EndUndo( UNDO_INSTOX, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_INSTOX, NULL );
return pNewSection;
}
-const SwTOXBaseSection* SwDoc::InsertTableOf( ULONG nSttNd, ULONG nEndNd,
+const SwTOXBaseSection* SwDoc::InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd,
const SwTOXBase& rTOX,
const SfxItemSet* pSet )
{
@@ -479,7 +478,7 @@ const SwAttrSet& SwDoc::GetTOXBaseAttrSet(const SwTOXBase& rTOXBase) const
return pFmt->GetAttrSet();
}
-const SwTOXBase* SwDoc::GetDefaultTOXBase( TOXTypes eTyp, BOOL bCreate )
+const SwTOXBase* SwDoc::GetDefaultTOXBase( TOXTypes eTyp, sal_Bool bCreate )
{
SwTOXBase** prBase = 0;
switch(eTyp)
@@ -522,17 +521,17 @@ void SwDoc::SetDefaultTOXBase(const SwTOXBase& rBase)
/*--------------------------------------------------------------------
Beschreibung: Verzeichnis loeschen
--------------------------------------------------------------------*/
-BOOL SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes )
+sal_Bool SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, sal_Bool bDelNodes )
{
// its only delete the TOX, not the nodes
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
OSL_ENSURE( rTOXBase.ISA( SwTOXBaseSection ), "keine TOXBaseSection!" );
const SwTOXBaseSection& rTOXSect = (const SwTOXBaseSection&)rTOXBase;
SwSectionFmt* pFmt = rTOXSect.GetFmt();
if( pFmt )
{
- StartUndo( UNDO_CLEARTOXRANGE, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_CLEARTOXRANGE, NULL );
/* Save the start node of the TOX' section. */
SwSectionNode * pMyNode = pFmt->GetSectionNode();
@@ -591,8 +590,8 @@ BOOL SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes )
if( !bDelNodes )
{
SwSections aArr( 0, 4 );
- USHORT nCnt = pFmt->GetChildSections( aArr, SORTSECT_NOT, FALSE );
- for( USHORT n = 0; n < nCnt; ++n )
+ sal_uInt16 nCnt = pFmt->GetChildSections( aArr, SORTSECT_NOT, sal_False );
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
SwSection* pSect = aArr[ n ];
if( TOX_HEADER_SECTION == pSect->GetType() )
@@ -604,8 +603,8 @@ BOOL SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes )
DelSectionFmt( pFmt, bDelNodes );
- EndUndo( UNDO_CLEARTOXRANGE, NULL );
- bRet = TRUE;
+ GetIDocumentUndoRedo().EndUndo( UNDO_CLEARTOXRANGE, NULL );
+ bRet = sal_True;
}
return bRet;
@@ -614,21 +613,21 @@ BOOL SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes )
/*--------------------------------------------------------------------
Beschreibung: Verzeichnistypen verwalten
--------------------------------------------------------------------*/
-USHORT SwDoc::GetTOXTypeCount(TOXTypes eTyp) const
+sal_uInt16 SwDoc::GetTOXTypeCount(TOXTypes eTyp) const
{
const SwTOXTypePtr * ppTTypes = pTOXTypes->GetData();
- USHORT nCnt = 0;
- for( USHORT n = 0; n < pTOXTypes->Count(); ++n, ++ppTTypes )
+ sal_uInt16 nCnt = 0;
+ for( sal_uInt16 n = 0; n < pTOXTypes->Count(); ++n, ++ppTTypes )
if( eTyp == (*ppTTypes)->GetType() )
++nCnt;
return nCnt;
}
-const SwTOXType* SwDoc::GetTOXType( TOXTypes eTyp, USHORT nId ) const
+const SwTOXType* SwDoc::GetTOXType( TOXTypes eTyp, sal_uInt16 nId ) const
{
const SwTOXTypePtr * ppTTypes = pTOXTypes->GetData();
- USHORT nCnt = 0;
- for( USHORT n = 0; n < pTOXTypes->Count(); ++n, ++ppTTypes )
+ sal_uInt16 nCnt = 0;
+ for( sal_uInt16 n = 0; n < pTOXTypes->Count(); ++n, ++ppTTypes )
if( eTyp == (*ppTTypes)->GetType() && nCnt++ == nId )
return (*ppTTypes);
return 0;
@@ -644,7 +643,7 @@ const SwTOXType* SwDoc::InsertTOXType( const SwTOXType& rTyp )
String SwDoc::GetUniqueTOXBaseName( const SwTOXType& rType,
const String* pChkStr ) const
{
- USHORT n;
+ sal_uInt16 n;
const SwSectionNode* pSectNd;
const SwSection* pSect;
@@ -653,21 +652,21 @@ String SwDoc::GetUniqueTOXBaseName( const SwTOXType& rType,
String aName( rType.GetTypeName() );
xub_StrLen nNmLen = aName.Len();
- USHORT nNum = 0;
- USHORT nTmp = 0;
- USHORT nFlagSize = ( pSectionFmtTbl->Count() / 8 ) +2;
- BYTE* pSetFlags = new BYTE[ nFlagSize ];
+ sal_uInt16 nNum = 0;
+ sal_uInt16 nTmp = 0;
+ sal_uInt16 nFlagSize = ( pSectionFmtTbl->Count() / 8 ) +2;
+ sal_uInt8* pSetFlags = new sal_uInt8[ nFlagSize ];
memset( pSetFlags, 0, nFlagSize );
for( n = 0; n < pSectionFmtTbl->Count(); ++n )
- if( 0 != ( pSectNd = (*pSectionFmtTbl)[ n ]->GetSectionNode( FALSE ) )&&
+ if( 0 != ( pSectNd = (*pSectionFmtTbl)[ n ]->GetSectionNode( sal_False ) )&&
TOX_CONTENT_SECTION == (pSect = &pSectNd->GetSection())->GetType())
{
const String& rNm = pSect->GetSectionName();
if( rNm.Match( aName ) == nNmLen )
{
// Nummer bestimmen und das Flag setzen
- nNum = (USHORT)rNm.Copy( nNmLen ).ToInt32();
+ nNum = (sal_uInt16)rNm.Copy( nNmLen ).ToInt32();
if( nNum-- && nNum < pSectionFmtTbl->Count() )
pSetFlags[ nNum / 8 ] |= (0x01 << ( nNum & 0x07 ));
}
@@ -695,14 +694,14 @@ String SwDoc::GetUniqueTOXBaseName( const SwTOXType& rType,
return aName += String::CreateFromInt32( ++nNum );
}
-BOOL SwDoc::SetTOXBaseName(const SwTOXBase& rTOXBase, const String& rName)
+sal_Bool SwDoc::SetTOXBaseName(const SwTOXBase& rTOXBase, const String& rName)
{
OSL_ENSURE( rTOXBase.ISA( SwTOXBaseSection ),
"keine TOXBaseSection!" );
SwTOXBaseSection* pTOX = (SwTOXBaseSection*)&rTOXBase;
String sTmp = GetUniqueTOXBaseName(*rTOXBase.GetTOXType(), &rName);
- BOOL bRet = sTmp == rName;
+ sal_Bool bRet = sTmp == rName;
if(bRet)
{
pTOX->SetTOXName(rName);
@@ -712,7 +711,7 @@ BOOL SwDoc::SetTOXBaseName(const SwTOXBase& rTOXBase, const String& rName)
return bRet;
}
-const SwTxtNode* lcl_FindChapterNode( const SwNode& rNd, BYTE nLvl = 0 )
+const SwTxtNode* lcl_FindChapterNode( const SwNode& rNd, sal_uInt8 nLvl = 0 )
{
const SwNode* pNd = &rNd;
if( pNd->GetNodes().GetEndOfExtras().GetIndex() > pNd->GetIndex() )
@@ -720,7 +719,7 @@ const SwTxtNode* lcl_FindChapterNode( const SwNode& rNd, BYTE nLvl = 0 )
// then find the "Anchor" (Body) position
Point aPt;
SwNode2Layout aNode2Layout( *pNd, pNd->GetIndex() );
- const SwFrm* pFrm = aNode2Layout.GetFrm( &aPt, 0, FALSE );
+ const SwFrm* pFrm = aNode2Layout.GetFrm( &aPt, 0, sal_False );
if( pFrm )
{
@@ -747,9 +746,9 @@ SwTOXBaseSection::~SwTOXBaseSection()
{
}
-BOOL SwTOXBaseSection::SetPosAtStartEnd( SwPosition& rPos, BOOL bAtStart ) const
+sal_Bool SwTOXBaseSection::SetPosAtStartEnd( SwPosition& rPos, sal_Bool bAtStart ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwSectionNode* pSectNd = GetFmt()->GetSectionNode();
if( pSectNd )
{
@@ -767,7 +766,7 @@ BOOL SwTOXBaseSection::SetPosAtStartEnd( SwPosition& rPos, BOOL bAtStart ) const
if( pCNd ) nC = pCNd->Len();
}
rPos.nContent.Assign( pCNd, nC );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
@@ -803,7 +802,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
// determine page description of table-of-content
sal_uInt32 nPgDescNdIdx = pSectNd->GetIndex() + 1;
sal_uInt32* pPgDescNdIdx = &nPgDescNdIdx;
- pDefaultPageDesc = pSectNd->FindPageDesc( FALSE, pPgDescNdIdx );
+ pDefaultPageDesc = pSectNd->FindPageDesc( sal_False, pPgDescNdIdx );
if ( nPgDescNdIdx < pSectNd->GetIndex() )
{
pDefaultPageDesc = 0;
@@ -824,7 +823,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
eBreak == SVX_BREAK_PAGE_BOTH )
)
{
- pDefaultPageDesc = pNdAfterTOX->FindPageDesc( FALSE );
+ pDefaultPageDesc = pNdAfterTOX->FindPageDesc( sal_False );
}
}
// consider start node of content section in the node array.
@@ -836,7 +835,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
// determine page description of content before table-of-content
SwNodeIndex aIdx( *pSectNd );
pDefaultPageDesc =
- pSectNd->GetNodes().GoPrevious( &aIdx )->FindPageDesc( FALSE );
+ pSectNd->GetNodes().GoPrevious( &aIdx )->FindPageDesc( sal_False );
}
if ( !pDefaultPageDesc )
@@ -892,7 +891,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
}
aEndIdx--;
SwPosition aPos( aEndIdx, SwIndex( pFirstEmptyNd, 0 ));
- pDoc->CorrAbs( aSttIdx, aEndIdx, aPos, TRUE );
+ pDoc->CorrAbs( aSttIdx, aEndIdx, aPos, sal_True );
// delete all before
DelFlyInRange( aSttIdx, aEndIdx );
@@ -969,9 +968,9 @@ sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" ));
// sortierte Liste aller Verzeichnismarken und Verzeichnisbereiche
void* p = 0;
String* pStr = 0;
- USHORT nCnt = 0, nFormMax = GetTOXForm().GetFormMax();
- SvStringsDtor aStrArr( (BYTE)nFormMax );
- SvPtrarr aCollArr( (BYTE)nFormMax );
+ sal_uInt16 nCnt = 0, nFormMax = GetTOXForm().GetFormMax();
+ SvStringsDtor aStrArr( (sal_uInt8)nFormMax );
+ SvPtrarr aCollArr( (sal_uInt8)nFormMax );
for( ; nCnt < nFormMax; ++nCnt )
{
aCollArr.Insert( p, nCnt );
@@ -984,7 +983,7 @@ sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" ));
::SetProgressState( 0, pDoc->GetDocShell() );
// setze den Text in das Verzeichniss
- USHORT nLvl = aSortArr[ nCnt ]->GetLevel();
+ sal_uInt16 nLvl = aSortArr[ nCnt ]->GetLevel();
SwTxtFmtColl* pColl = (SwTxtFmtColl*)aCollArr[ nLvl ];
if( !pColl )
{
@@ -1002,7 +1001,7 @@ sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" ));
// fuer die Seitennummer eintragen
//if it is a TOX_INDEX and the SwForm IsCommaSeparated()
// then a range of entries must be generated into one paragraph
- USHORT nRange = 1;
+ sal_uInt16 nRange = 1;
if(TOX_INDEX == SwTOXBase::GetType() &&
GetTOXForm().IsCommaSeparated() &&
aSortArr[nCnt]->GetType() == TOX_SORT_INDEX)
@@ -1032,7 +1031,7 @@ sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" ));
if( !aCorPam.Move( fnMoveForward ) )
aCorPam.Move( fnMoveBackward );
SwNodeIndex aEndIdx( aInsPos, 1 );
- pDoc->CorrAbs( aInsPos, aEndIdx, *aCorPam.GetPoint(), TRUE );
+ pDoc->CorrAbs( aInsPos, aEndIdx, *aCorPam.GetPoint(), sal_True );
// Task 70995 - save and restore PageDesc and Break Attributes
if( pFirstEmptyNd->HasSwAttrSet() )
@@ -1048,7 +1047,7 @@ sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "_Head" ));
}
// now create the new Frames
- ULONG nIdx = pSectNd->GetIndex();
+ sal_uLong nIdx = pSectNd->GetIndex();
// don't delete if index is empty
if(nIdx + 2 < pSectNd->EndOfSectionIndex())
pDoc->GetNodes().Delete( aInsPos, 1 );
@@ -1067,12 +1066,12 @@ void SwTOXBaseSection::InsertAlphaDelimitter( const SwTOXInternational& rIntl )
{
SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc();
String sDeli, sLastDeli;
- USHORT i = 0;
+ sal_uInt16 i = 0;
while( i < aSortArr.Count() )
{
::SetProgressState( 0, pDoc->GetDocShell() );
- USHORT nLevel = aSortArr[i]->GetLevel();
+ sal_uInt16 nLevel = aSortArr[i]->GetLevel();
// Alpha-Delimitter ueberlesen
if( nLevel == FORM_ALPHA_DELIMITTER )
@@ -1107,14 +1106,14 @@ void SwTOXBaseSection::InsertAlphaDelimitter( const SwTOXInternational& rIntl )
/*--------------------------------------------------------------------
Beschreibung: Template auswerten
--------------------------------------------------------------------*/
-SwTxtFmtColl* SwTOXBaseSection::GetTxtFmtColl( USHORT nLevel )
+SwTxtFmtColl* SwTOXBaseSection::GetTxtFmtColl( sal_uInt16 nLevel )
{
SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc();
const String& rName = GetTOXForm().GetTemplate( nLevel );
SwTxtFmtColl* pColl = rName.Len() ? pDoc->FindTxtFmtCollByName(rName) :0;
if( !pColl )
{
- USHORT nPoolFmt = 0;
+ sal_uInt16 nPoolFmt = 0;
const TOXTypes eMyType = SwTOXBase::GetType();
switch( eMyType )
{
@@ -1239,12 +1238,12 @@ void SwTOXBaseSection::UpdateOutline( const SwTxtNode* pOwnChapterNode )
SwNodes& rNds = pDoc->GetNodes();
const SwOutlineNodes& rOutlNds = rNds.GetOutLineNds();
- for( USHORT n = 0; n < rOutlNds.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rOutlNds.Count(); ++n )
{
::SetProgressState( 0, pDoc->GetDocShell() );
SwTxtNode* pTxtNd = rOutlNds[ n ]->GetTxtNode();
if( pTxtNd && pTxtNd->Len() && pTxtNd->GetDepends() &&
- USHORT( pTxtNd->GetAttrOutlineLevel()) <= GetLevel() &&
+ sal_uInt16( pTxtNd->GetAttrOutlineLevel()) <= GetLevel() &&
pTxtNd->GetFrm() &&
!pTxtNd->HasHiddenParaField() &&
!pTxtNd->HasHiddenCharAttribute( true ) &&
@@ -1263,11 +1262,11 @@ void SwTOXBaseSection::UpdateOutline( const SwTxtNode* pOwnChapterNode )
void SwTOXBaseSection::UpdateTemplate( const SwTxtNode* pOwnChapterNode )
{
SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc();
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
String sTmpStyleNames = GetStyleNames(i);
- USHORT nTokenCount = sTmpStyleNames.GetTokenCount(TOX_STYLE_DELIMITER);
- for( USHORT nStyle = 0; nStyle < nTokenCount; ++nStyle )
+ sal_uInt16 nTokenCount = sTmpStyleNames.GetTokenCount(TOX_STYLE_DELIMITER);
+ for( sal_uInt16 nStyle = 0; nStyle < nTokenCount; ++nStyle )
{
SwTxtFmtColl* pColl = pDoc->FindTxtFmtCollByName(
sTmpStyleNames.GetToken( nStyle,
@@ -1381,9 +1380,9 @@ long lcl_IsSOObject( const SvGlobalName& rFactoryNm )
long nFlag;
// GlobalNameId
struct _GlobalNameIds {
- UINT32 n1;
- USHORT n2, n3;
- BYTE b8, b9, b10, b11, b12, b13, b14, b15;
+ sal_uInt32 n1;
+ sal_uInt16 n2, n3;
+ sal_uInt8 b8, b9, b10, b11, b12, b13, b14, b15;
} aGlNmIds[4];
} aArr[] = {
{ nsSwTOOElements::TOO_MATH,
@@ -1430,7 +1429,7 @@ void SwTOXBaseSection::UpdateCntnt( SwTOXElement eMyType,
SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc();
SwNodes& rNds = pDoc->GetNodes();
// auf den 1. Node der 1. Section
- ULONG nIdx = rNds.GetEndOfAutotext().StartOfSectionIndex() + 2,
+ sal_uLong nIdx = rNds.GetEndOfAutotext().StartOfSectionIndex() + 2,
nEndIdx = rNds.GetEndOfAutotext().GetIndex();
while( nIdx < nEndIdx )
@@ -1459,7 +1458,7 @@ void SwTOXBaseSection::UpdateCntnt( SwTOXElement eMyType,
case nsSwTOXElement::TOX_OLE:
if( pNd->IsOLENode() )
{
- BOOL bInclude = TRUE;
+ sal_Bool bInclude = sal_True;
if(TOX_OBJECTS == SwTOXBase::GetType())
{
SwOLENode* pOLENode = pNd->GetOLENode();
@@ -1476,7 +1475,7 @@ void SwTOXBaseSection::UpdateCntnt( SwTOXElement eMyType,
else
{
OSL_FAIL("OLE-object nicht geladen?");
- bInclude = FALSE;
+ bInclude = sal_False;
}
}
@@ -1512,7 +1511,7 @@ void SwTOXBaseSection::UpdateCntnt( SwTOXElement eMyType,
{
SwTOXPara * pNew = new SwTOXPara( *pCNd, eMyType,
( USHRT_MAX != nSetLevel )
- ? static_cast<USHORT>(nSetLevel)
+ ? static_cast<sal_uInt16>(nSetLevel)
: FORM_ALPHA_DELIMITTER );
InsertSorted( pNew );
}
@@ -1531,7 +1530,7 @@ void SwTOXBaseSection::UpdateTable( const SwTxtNode* pOwnChapterNode )
SwNodes& rNds = pDoc->GetNodes();
const SwFrmFmts& rArr = *pDoc->GetTblFrmFmts();
- for( USHORT n = 0; n < rArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rArr.Count(); ++n )
{
::SetProgressState( 0, pDoc->GetDocShell() );
@@ -1560,7 +1559,7 @@ void SwTOXBaseSection::UpdateTable( const SwTxtNode* pOwnChapterNode )
if( pOutlNd->GetTxtColl()->IsAssignedToListLevelOfOutlineStyle())
{
const int nTmp = pOutlNd->GetTxtColl()->GetAttrOutlineLevel();
- pNew->SetLevel( static_cast<USHORT>(nTmp) );//<-end ,zhaojianwei
+ pNew->SetLevel( static_cast<sal_uInt16>(nTmp) );//<-end ,zhaojianwei
}
}
}
@@ -1576,7 +1575,7 @@ void SwTOXBaseSection::UpdateTable( const SwTxtNode* pOwnChapterNode )
Beschreibung: String generieren anhand der Form
SonderZeichen 0-31 und 255 entfernen
--------------------------------------------------------------------*/
-String lcl_GetNumString( const SwTOXSortTabBase& rBase, sal_Bool bUsePrefix, BYTE nLevel )
+String lcl_GetNumString( const SwTOXSortTabBase& rBase, sal_Bool bUsePrefix, sal_uInt8 nLevel )
{
String sRet;
@@ -1596,8 +1595,8 @@ String lcl_GetNumString( const SwTOXSortTabBase& rBase, sal_Bool bUsePrefix, BYT
// add parameter <_TOXSectNdIdx> and <_pDefaultPageDesc> in order to control,
// which page description is used, no appropriate one is found.
-void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
- USHORT nCount,
+void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx,
+ sal_uInt16 nCount,
SvStringsDtor& ,
const sal_uInt32 _nTOXSectNdIdx,
const SwPageDesc* _pDefaultPageDesc )
@@ -1610,13 +1609,13 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
SwTxtNode* pTOXNd = (SwTxtNode*)aSortArr[nArrayIdx]->pTOXNd;
String& rTxt = (String&)pTOXNd->GetTxt();
rTxt.Erase();
- for(USHORT nIndex = nArrayIdx; nIndex < nArrayIdx + nCount; nIndex++)
+ for(sal_uInt16 nIndex = nArrayIdx; nIndex < nArrayIdx + nCount; nIndex++)
{
if(nIndex > nArrayIdx)
rTxt.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ", " )); // comma separation
// String mit dem Pattern aus der Form initialisieren
const SwTOXSortTabBase& rBase = *aSortArr[nIndex];
- USHORT nLvl = rBase.GetLevel();
+ sal_uInt16 nLvl = rBase.GetLevel();
OSL_ENSURE( nLvl < GetTOXForm().GetFormMax(), "ungueltiges FORM_LEVEL");
SvxTabStopItem aTStops( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
@@ -1636,7 +1635,7 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
{
case TOKEN_ENTRY_NO:
// fuer Inhaltsverzeichnis Numerierung
- rTxt.Insert( lcl_GetNumString( rBase, aToken.nChapterFormat == CF_NUMBER, static_cast<BYTE>(aToken.nOutlineLevel - 1)) );
+ rTxt.Insert( lcl_GetNumString( rBase, aToken.nChapterFormat == CF_NUMBER, static_cast<sal_uInt8>(aToken.nOutlineLevel - 1)) );
break;
case TOKEN_ENTRY_TEXT:
@@ -1665,7 +1664,7 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
{
const SvxLRSpaceItem& rLR =
(SvxLRSpaceItem&)pTOXNd->
- SwCntntNode::GetAttr( RES_LR_SPACE, TRUE );
+ SwCntntNode::GetAttr( RES_LR_SPACE, sal_True );
long nTabPosition = aToken.nTabStopPosition;
if( !GetTOXForm().IsRelTabPos() && rLR.GetTxtLeft() )
@@ -1680,20 +1679,20 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
const SwPageDesc* pPageDesc = ((SwFmtPageDesc&)pTOXNd->
SwCntntNode::GetAttr( RES_PAGEDESC )).GetPageDesc();
- BOOL bCallFindRect = TRUE;
+ sal_Bool bCallFindRect = sal_True;
long nRightMargin;
if( pPageDesc )
{
- const SwFrm* pFrm = pTOXNd->GetFrm( 0, 0, TRUE );
+ const SwFrm* pFrm = pTOXNd->GetFrm( 0, 0, sal_True );
if( !pFrm || 0 == ( pFrm = pFrm->FindPageFrm() ) ||
pPageDesc != ((SwPageFrm*)pFrm)->GetPageDesc() )
// dann muss man ueber den PageDesc gehen
- bCallFindRect = FALSE;
+ bCallFindRect = sal_False;
}
SwRect aNdRect;
if( bCallFindRect )
- aNdRect = pTOXNd->FindLayoutRect( TRUE );
+ aNdRect = pTOXNd->FindLayoutRect( sal_True );
if( aNdRect.IsEmpty() )
{
@@ -1701,7 +1700,7 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
// vorlage gehen.
sal_uInt32 nPgDescNdIdx = pTOXNd->GetIndex() + 1;
sal_uInt32* pPgDescNdIdx = &nPgDescNdIdx;
- pPageDesc = pTOXNd->FindPageDesc( FALSE, pPgDescNdIdx );
+ pPageDesc = pTOXNd->FindPageDesc( sal_False, pPgDescNdIdx );
if ( !pPageDesc ||
*pPgDescNdIdx < _nTOXSectNdIdx )
{
@@ -1743,11 +1742,11 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
{
// Die Anzahl der gleichen Eintrage bestimmt die Seitennummern-Pattern
//
- USHORT nSize = rBase.aTOXSources.Count();
+ sal_uInt16 nSize = rBase.aTOXSources.Count();
if( nSize > 0 )
{
String aInsStr( cNumRepl );
- for(USHORT i=1; i < nSize; ++i)
+ for(sal_uInt16 i=1; i < nSize; ++i)
{
aInsStr.AppendAscii( sPageDeli );
aInsStr += cNumRepl;
@@ -1774,11 +1773,11 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
{
SwChapterFieldType aFldTyp;
SwChapterField aFld( &aFldTyp, aToken.nChapterFormat );
- aFld.SetLevel( static_cast<BYTE>(aToken.nOutlineLevel - 1) );
+ aFld.SetLevel( static_cast<sal_uInt8>(aToken.nOutlineLevel - 1) );
// #i53420#
aFld.ChangeExpansion( pFrm,
dynamic_cast<const SwCntntNode*>(pTOXSource->pNd),
- TRUE );
+ sal_True );
// <--
//---> #i89791#
// continue to support CF_NUMBER
@@ -1828,7 +1827,7 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
pNewLink->aINetFmt.SetINetFmt(sLinkCharacterStyle);
if(sLinkCharacterStyle.Len())
{
- USHORT nPoolId =
+ sal_uInt16 nPoolId =
SwStyleNameMapper::GetPoolIdFromUIName( sLinkCharacterStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
pNewLink->aINetFmt.SetVisitedFmtId(nPoolId);
pNewLink->aINetFmt.SetINetFmtId(nPoolId);
@@ -1848,7 +1847,7 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
{
ToxAuthorityField eField = (ToxAuthorityField)aToken.nAuthorityField;
SwIndex aIdx( pTOXNd, rTxt.Len() );
- rBase.FillText( *pTOXNd, aIdx, static_cast<USHORT>(eField) );
+ rBase.FillText( *pTOXNd, aIdx, static_cast<sal_uInt16>(eField) );
}
break;
case TOKEN_END: break;
@@ -1877,7 +1876,7 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
}
if(aLinkArr.Count())
- for(USHORT i = 0; i < aLinkArr.Count(); ++i )
+ for(sal_uInt16 i = 0; i < aLinkArr.Count(); ++i )
{
LinkStruct* pTmp = aLinkArr.GetObject(i);
pTOXNd->InsertItem( pTmp->aINetFmt, pTmp->nStartTextPos,
@@ -1896,7 +1895,7 @@ void SwTOXBaseSection::UpdatePageNum()
// die aktuellen Seitennummern ins Verzeichnis eintragen
SwPageFrm* pAktPage = 0;
- USHORT nPage = 0;
+ sal_uInt16 nPage = 0;
SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc();
SwTOXInternational aIntl( GetLanguage(),
@@ -1904,7 +1903,7 @@ void SwTOXBaseSection::UpdatePageNum()
GetOptions() : 0,
GetSortAlgorithm() );
- for( USHORT nCnt = 0; nCnt < aSortArr.Count(); ++nCnt )
+ for( sal_uInt16 nCnt = 0; nCnt < aSortArr.Count(); ++nCnt )
{
// Schleife ueber alle SourceNodes
SvUShorts aNums; //Die Seitennummern
@@ -1912,7 +1911,7 @@ void SwTOXBaseSection::UpdatePageNum()
SvUShorts* pMainNums = 0; // contains page numbers of main entries
// process run in lines
- USHORT nRange = 0;
+ sal_uInt16 nRange = 0;
if(GetTOXForm().IsCommaSeparated() &&
aSortArr[nCnt]->GetType() == TOX_SORT_INDEX)
{
@@ -1930,12 +1929,12 @@ void SwTOXBaseSection::UpdatePageNum()
else
nRange = 1;
- for(USHORT nRunInEntry = nCnt; nRunInEntry < nCnt + nRange; nRunInEntry++)
+ for(sal_uInt16 nRunInEntry = nCnt; nRunInEntry < nCnt + nRange; nRunInEntry++)
{
SwTOXSortTabBase* pSortBase = aSortArr[nRunInEntry];
- USHORT nSize = pSortBase->aTOXSources.Count();
- USHORT i;
- for( USHORT j = 0; j < nSize; ++j )
+ sal_uInt16 nSize = pSortBase->aTOXSources.Count();
+ sal_uInt16 i;
+ for( sal_uInt16 j = 0; j < nSize; ++j )
{
::SetProgressState( 0, pDoc->GetDocShell() );
@@ -2004,12 +2003,12 @@ void SwTOXBaseSection::UpdatePageNum()
Beschreibung: Austausch der Seitennummer-Platzhalter
--------------------------------------------------------------------*/
// search for the page no in the array of main entry page numbers
-BOOL lcl_HasMainEntry( const SvUShorts* pMainEntryNums, USHORT nToFind )
+sal_Bool lcl_HasMainEntry( const SvUShorts* pMainEntryNums, sal_uInt16 nToFind )
{
- for(USHORT i = 0; pMainEntryNums && i < pMainEntryNums->Count(); ++i)
+ for(sal_uInt16 i = 0; pMainEntryNums && i < pMainEntryNums->Count(); ++i)
if(nToFind == (*pMainEntryNums)[i])
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
@@ -2026,7 +2025,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
xub_StrLen nStartPos = pNd->GetTxt().Search( sSrchStr );
( sSrchStr = cNumRepl ) += cEndPageNum;
xub_StrLen nEndPos = pNd->GetTxt().Search( sSrchStr );
- USHORT i;
+ sal_uInt16 i;
if( STRING_NOTFOUND == nEndPos || !rNums.Count() )
return;
@@ -2034,14 +2033,14 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
if( STRING_NOTFOUND == nStartPos || nStartPos > nEndPos)
nStartPos = nEndPos;
- USHORT nOld = rNums[0],
+ sal_uInt16 nOld = rNums[0],
nBeg = nOld,
nCount = 0;
String aNumStr( SvxNumberType( ((SwPageDesc*)rDescs[0])->GetNumType() ).
GetNumStr( nBeg ) );
if( pCharStyleIdx && lcl_HasMainEntry( pMainEntryNums, nBeg ))
{
- USHORT nTemp = 0;
+ sal_uInt16 nTemp = 0;
pCharStyleIdx->Insert( nTemp, pCharStyleIdx->Count());
}
@@ -2050,7 +2049,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
SwCharFmt* pPageNoCharFmt = 0;
SwpHints* pHints = pNd->GetpSwpHints();
if(pHints)
- for(USHORT nHintIdx = 0; nHintIdx < pHints->GetStartCount(); nHintIdx++)
+ for(sal_uInt16 nHintIdx = 0; nHintIdx < pHints->GetStartCount(); nHintIdx++)
{
SwTxtAttr* pAttr = pHints->GetStart(nHintIdx);
xub_StrLen nTmpEnd = pAttr->GetEnd() ? *pAttr->GetEnd() : 0;
@@ -2072,7 +2071,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
// Alle folgenden aufaddieren
// break up if main entry starts or ends and
// insert a char style index
- BOOL bMainEntryChanges = lcl_HasMainEntry(pMainEntryNums, nOld)
+ sal_Bool bMainEntryChanges = lcl_HasMainEntry(pMainEntryNums, nOld)
!= lcl_HasMainEntry(pMainEntryNums, rNums[i]);
if(nOld == rNums[i]-1 && !bMainEntryChanges &&
@@ -2111,7 +2110,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
}
else
{ // Alle Nummern eintragen
- aNumStr += aType.GetNumStr( USHORT(rNums[i]) );
+ aNumStr += aType.GetNumStr( sal_uInt16(rNums[i]) );
if(i != (rNums.Count()-1))
aNumStr.AppendAscii( sPageDeli );
}
@@ -2155,7 +2154,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
//search by name
SwDoc* pDoc = pNd->GetDoc();
- USHORT nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( GetMainEntryCharStyle(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
+ sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( GetMainEntryCharStyle(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
SwCharFmt* pCharFmt = 0;
if(USHRT_MAX != nPoolId)
pCharFmt = pDoc->GetCharFmtFromPool(nPoolId);
@@ -2167,7 +2166,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
//find the page numbers in aNumStr and set the character style
xub_StrLen nOffset = pNd->GetTxt().Len() - aNumStr.Len();
SwFmtCharFmt aCharFmt(pCharFmt);
- for(USHORT j = 0; j < pCharStyleIdx->Count(); j += 2)
+ for(sal_uInt16 j = 0; j < pCharStyleIdx->Count(); j += 2)
{
xub_StrLen nStartIdx = (*pCharStyleIdx)[j] + nOffset;
xub_StrLen nEndIdx = (*pCharStyleIdx)[j + 1] + nOffset;
@@ -2278,7 +2277,7 @@ void SwTOXBaseSection::InsertSorted(SwTOXSortTabBase* pNew)
--------------------------------------------------------------------*/
Range SwTOXBaseSection::GetKeyRange(const String& rStr, const String& rStrReading,
const SwTOXSortTabBase& rNew,
- USHORT nLevel, const Range& rRange )
+ sal_uInt16 nLevel, const Range& rRange )
{
const SwTOXInternational& rIntl = *rNew.pTOXIntl;
String sToCompare(rStr);
@@ -2292,10 +2291,10 @@ Range SwTOXBaseSection::GetKeyRange(const String& rStr, const String& rStrReadin
OSL_ENSURE(rRange.Min() >= 0 && rRange.Max() >= 0, "Min Max < 0");
- const USHORT nMin = (USHORT)rRange.Min();
- const USHORT nMax = (USHORT)rRange.Max();
+ const sal_uInt16 nMin = (sal_uInt16)rRange.Min();
+ const sal_uInt16 nMax = (sal_uInt16)rRange.Max();
- USHORT i;
+ sal_uInt16 i;
for( i = nMin; i < nMax; ++i)
{
@@ -2306,8 +2305,7 @@ Range SwTOXBaseSection::GetKeyRange(const String& rStr, const String& rStrReadin
if( rIntl.IsEqual( sMyString, sMyStringReading, pBase->GetLocale(),
sToCompare, sToCompareReading, rNew.GetLocale() ) &&
- pBase->GetLevel() == nLevel &&
- pBase->GetType() == TOX_SORT_CUSTOM )
+ pBase->GetLevel() == nLevel )
break;
}
if(i == nMax)
@@ -2322,8 +2320,8 @@ Range SwTOXBaseSection::GetKeyRange(const String& rStr, const String& rStrReadin
}
aSortArr.Insert(pKey, i );
}
- USHORT nStart = i+1;
- USHORT nEnd = aSortArr.Count();
+ sal_uInt16 nStart = i+1;
+ sal_uInt16 nEnd = aSortArr.Count();
// Ende des Bereiches suchen
for(i = nStart; i < aSortArr.Count(); ++i)
@@ -2336,10 +2334,10 @@ Range SwTOXBaseSection::GetKeyRange(const String& rStr, const String& rStrReadin
return Range(nStart, nEnd);
}
-BOOL SwTOXBase::IsTOXBaseInReadonly() const
+sal_Bool SwTOXBase::IsTOXBaseInReadonly() const
{
const SwTOXBaseSection *pSect = PTR_CAST(SwTOXBaseSection, this);
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwSectionNode* pSectNode;
if(pSect && pSect->GetFmt() &&
0 != (pSectNode = pSect->GetFmt()->GetSectionNode()))
@@ -2369,7 +2367,7 @@ void SwTOXBase::SetAttrSet( const SfxItemSet& rSet )
pSect->GetFmt()->SetFmtAttr( rSet );
}
-BOOL SwTOXBase::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwTOXBase::GetInfo( SfxPoolItem& rInfo ) const
{
switch( rInfo.Which() )
{
@@ -2379,9 +2377,9 @@ BOOL SwTOXBase::GetInfo( SfxPoolItem& rInfo ) const
if( pSect && pSect->GetFmt() )
pSect->GetFmt()->GetInfo( rInfo );
}
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx
index fdfe5ca10310..6ed12fd4cce5 100644
--- a/sw/source/core/doc/extinput.cxx
+++ b/sw/source/core/doc/extinput.cxx
@@ -29,19 +29,23 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <com/sun/star/i18n/ScriptType.hpp>
+
+#include <editeng/langitem.hxx>
+#include <editeng/scripttypeitem.hxx>
-#include <hintids.hxx>
#include <vcl/keycodes.hxx>
#include <vcl/cmdevt.hxx>
+
+#include <hintids.hxx>
#include <extinput.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <index.hxx>
#include <ndtxt.hxx>
#include <txtfrm.hxx>
#include <swundo.hxx>
-#include <editeng/langitem.hxx>
-#include <editeng/scripttypeitem.hxx>
-#include <com/sun/star/i18n/ScriptType.hpp>
+
using namespace ::com::sun::star;
@@ -49,8 +53,8 @@ SwExtTextInput::SwExtTextInput( const SwPaM& rPam, Ring* pRing )
: SwPaM( *rPam.GetPoint(), (SwPaM*)pRing ),
eInputLanguage(LANGUAGE_DONTKNOW)
{
- bIsOverwriteCursor = FALSE;
- bInsText = TRUE;
+ bIsOverwriteCursor = sal_False;
+ bInsText = sal_True;
}
SwExtTextInput::~SwExtTextInput()
@@ -79,7 +83,7 @@ SwExtTextInput::~SwExtTextInput()
// for CJK/CTL scripts.
bool bLang = true;
// <--
- USHORT nWhich = RES_CHRATR_LANGUAGE;
+ sal_uInt16 nWhich = RES_CHRATR_LANGUAGE;
switch(GetI18NScriptTypeOfLanguage(eInputLanguage))
{
case i18n::ScriptType::ASIAN: nWhich = RES_CHRATR_CJK_LANGUAGE; break;
@@ -107,12 +111,14 @@ SwExtTextInput::~SwExtTextInput()
if( bInsText )
{
rIdx = nSttCnt;
- pDoc->StartUndo( UNDO_OVERWRITE, NULL );
+ pDoc->GetIDocumentUndoRedo().StartUndo(
+ UNDO_OVERWRITE, NULL );
pDoc->Overwrite( *this, sTxt.Copy( 0,
sOverwriteText.Len() ));
pDoc->InsertString( *this,
sTxt.Copy( sOverwriteText.Len() ) );
- pDoc->EndUndo( UNDO_OVERWRITE, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo(
+ UNDO_OVERWRITE, NULL );
}
}
else
@@ -206,7 +212,7 @@ void SwExtTextInput::SetInputData( const CommandExtTextInputData& rData )
}
}
-void SwExtTextInput::SetOverwriteCursor( BOOL bFlag )
+void SwExtTextInput::SetOverwriteCursor( sal_Bool bFlag )
{
bIsOverwriteCursor = bFlag;
@@ -259,17 +265,17 @@ SwExtTextInput* SwDoc::GetExtTextInput( const SwNode& rNd,
SwExtTextInput* pRet = 0;
if( pExtInputRing )
{
- ULONG nNdIdx = rNd.GetIndex();
+ sal_uLong nNdIdx = rNd.GetIndex();
SwExtTextInput* pTmp = (SwExtTextInput*)pExtInputRing;
do {
- ULONG nPt = pTmp->GetPoint()->nNode.GetIndex(),
+ sal_uLong nPt = pTmp->GetPoint()->nNode.GetIndex(),
nMk = pTmp->GetMark()->nNode.GetIndex();
xub_StrLen nPtCnt = pTmp->GetPoint()->nContent.GetIndex(),
nMkCnt = pTmp->GetMark()->nContent.GetIndex();
if( nPt < nMk || ( nPt == nMk && nPtCnt < nMkCnt ))
{
- ULONG nTmp = nMk; nMk = nPt; nPt = nTmp;
+ sal_uLong nTmp = nMk; nMk = nPt; nPt = nTmp;
nTmp = nMkCnt; nMkCnt = nPtCnt; nPtCnt = (xub_StrLen)nTmp;
}
diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx
index 1b8b0b409bd8..04f3ffcdb008 100644
--- a/sw/source/core/doc/fmtcol.cxx
+++ b/sw/source/core/doc/fmtcol.cxx
@@ -78,7 +78,7 @@ namespace TxtFmtCollFunc
{
if ( !pNewNumRuleItem )
{
- pTxtFmtColl->GetItemState( RES_PARATR_NUMRULE, FALSE, (const SfxPoolItem**)&pNewNumRuleItem );
+ pTxtFmtColl->GetItemState( RES_PARATR_NUMRULE, sal_False, (const SfxPoolItem**)&pNewNumRuleItem );
}
if ( pNewNumRuleItem )
{
@@ -99,7 +99,7 @@ namespace TxtFmtCollFunc
SwNumRule* pNumRule( 0 );
const SwNumRuleItem* pNumRuleItem( 0 );
- rTxtFmtColl.GetItemState( RES_PARATR_NUMRULE, FALSE, (const SfxPoolItem**)&pNumRuleItem );
+ rTxtFmtColl.GetItemState( RES_PARATR_NUMRULE, sal_False, (const SfxPoolItem**)&pNumRuleItem );
if ( pNumRuleItem )
{
const String sNumRuleName = pNumRuleItem->GetValue();
@@ -161,21 +161,21 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
pNewChgSet = (SwAttrSetChg*)pNew;
pOldChgSet = (SwAttrSetChg*)pOld;
pNewChgSet->GetChgSet()->GetItemState(
- RES_LR_SPACE, FALSE, (const SfxPoolItem**)&pNewLRSpace );
+ RES_LR_SPACE, sal_False, (const SfxPoolItem**)&pNewLRSpace );
pNewChgSet->GetChgSet()->GetItemState(
- RES_UL_SPACE, FALSE, (const SfxPoolItem**)&pNewULSpace );
+ RES_UL_SPACE, sal_False, (const SfxPoolItem**)&pNewULSpace );
pNewChgSet->GetChgSet()->GetItemState( RES_CHRATR_FONTSIZE,
- FALSE, (const SfxPoolItem**)&(aFontSizeArr[0]) );
+ sal_False, (const SfxPoolItem**)&(aFontSizeArr[0]) );
pNewChgSet->GetChgSet()->GetItemState( RES_CHRATR_CJK_FONTSIZE,
- FALSE, (const SfxPoolItem**)&(aFontSizeArr[1]) );
+ sal_False, (const SfxPoolItem**)&(aFontSizeArr[1]) );
pNewChgSet->GetChgSet()->GetItemState( RES_CHRATR_CTL_FONTSIZE,
- FALSE, (const SfxPoolItem**)&(aFontSizeArr[2]) );
+ sal_False, (const SfxPoolItem**)&(aFontSizeArr[2]) );
// #i70223#, #i84745#
// check, if attribute set is applied to this paragraph style
if ( bAssignedToListLevelOfOutlineStyle &&
pNewChgSet->GetTheChgdSet() == &GetAttrSet() )
{
- pNewChgSet->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, FALSE,
+ pNewChgSet->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, sal_False,
(const SfxPoolItem**)&pNewNumRuleItem );
}
// <--
@@ -231,13 +231,13 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
}
// <--
- int bWeiter = TRUE;
+ int bWeiter = sal_True;
// dann pruefe doch mal gegen die eigenen Attribute
- if( pNewLRSpace && SFX_ITEM_SET == GetItemState( RES_LR_SPACE, FALSE,
+ if( pNewLRSpace && SFX_ITEM_SET == GetItemState( RES_LR_SPACE, sal_False,
(const SfxPoolItem**)&pOldLRSpace ))
{
- int bChg = FALSE;
+ int bChg = sal_False;
if( pOldLRSpace != pNewLRSpace ) // verhinder Rekursion (SetAttr!!)
{
SvxLRSpaceItem aNew( *pOldLRSpace );
@@ -276,22 +276,22 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
}
if( pNewULSpace && SFX_ITEM_SET == GetItemState(
- RES_UL_SPACE, FALSE, (const SfxPoolItem**)&pOldULSpace ) &&
+ RES_UL_SPACE, sal_False, (const SfxPoolItem**)&pOldULSpace ) &&
pOldULSpace != pNewULSpace ) // verhinder Rekursion (SetAttr!!)
{
SvxULSpaceItem aNew( *pOldULSpace );
- int bChg = FALSE;
+ int bChg = sal_False;
// wir hatten eine relative Angabe -> neu berechnen
if( 100 != aNew.GetPropUpper() )
{
- USHORT nTmp = aNew.GetUpper(); // alten zum Vergleichen
+ sal_uInt16 nTmp = aNew.GetUpper(); // alten zum Vergleichen
aNew.SetUpper( pNewULSpace->GetUpper(), aNew.GetPropUpper() );
bChg |= nTmp != aNew.GetUpper();
}
// wir hatten eine relative Angabe -> neu berechnen
if( 100 != aNew.GetPropLower() )
{
- USHORT nTmp = aNew.GetLower(); // alten zum Vergleichen
+ sal_uInt16 nTmp = aNew.GetLower(); // alten zum Vergleichen
aNew.SetLower( pNewULSpace->GetLower(), aNew.GetPropLower() );
bChg |= nTmp != aNew.GetLower();
}
@@ -312,7 +312,7 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
SvxFontHeightItem *pFSize = aFontSizeArr[ nC ], *pOldFSize;
if( pFSize && SFX_ITEM_SET == GetItemState(
- pFSize->Which(), FALSE, (const SfxPoolItem**)&pOldFSize ) &&
+ pFSize->Which(), sal_False, (const SfxPoolItem**)&pOldFSize ) &&
// verhinder Rekursion (SetAttr!!)
pFSize != pOldFSize )
{
@@ -327,7 +327,7 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
else
{
// wir hatten eine relative Angabe -> neu berechnen
- UINT32 nTmp = pOldFSize->GetHeight(); // alten zum Vergleichen
+ sal_uInt32 nTmp = pOldFSize->GetHeight(); // alten zum Vergleichen
SvxFontHeightItem aNew(240 , 100, pFSize->Which());
aNew.SetHeight( pFSize->GetHeight(), pOldFSize->GetProp(),
pOldFSize->GetPropUnit() );
@@ -348,18 +348,18 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
SwFmtColl::Modify( pOld, pNew );
}
-BOOL SwTxtFmtColl::IsAtDocNodeSet() const
+sal_Bool SwTxtFmtColl::IsAtDocNodeSet() const
{
SwClientIter aIter( *(SwModify*)this );
const SwNodes& rNds = GetDoc()->GetNodes();
for( SwClient* pC = aIter.First(TYPE(SwCntntNode)); pC; pC = aIter.Next() )
if( &((SwCntntNode*)pC)->GetNodes() == &rNds )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
-BOOL SwTxtFmtColl::SetFmtAttr( const SfxPoolItem& rAttr )
+sal_Bool SwTxtFmtColl::SetFmtAttr( const SfxPoolItem& rAttr )
{
const bool bIsNumRuleItem = rAttr.Which() == RES_PARATR_NUMRULE;
if ( bIsNumRuleItem )
@@ -367,7 +367,7 @@ BOOL SwTxtFmtColl::SetFmtAttr( const SfxPoolItem& rAttr )
TxtFmtCollFunc::RemoveFromNumRule( *this );
}
- const BOOL bRet = SwFmtColl::SetFmtAttr( rAttr );
+ const sal_Bool bRet = SwFmtColl::SetFmtAttr( rAttr );
if ( bIsNumRuleItem )
{
@@ -377,16 +377,16 @@ BOOL SwTxtFmtColl::SetFmtAttr( const SfxPoolItem& rAttr )
return bRet;
}
-BOOL SwTxtFmtColl::SetFmtAttr( const SfxItemSet& rSet )
+sal_Bool SwTxtFmtColl::SetFmtAttr( const SfxItemSet& rSet )
{
const bool bIsNumRuleItemAffected =
- rSet.GetItemState( RES_PARATR_NUMRULE, FALSE ) == SFX_ITEM_SET;
+ rSet.GetItemState( RES_PARATR_NUMRULE, sal_False ) == SFX_ITEM_SET;
if ( bIsNumRuleItemAffected )
{
TxtFmtCollFunc::RemoveFromNumRule( *this );
}
- const BOOL bRet = SwFmtColl::SetFmtAttr( rSet );
+ const sal_Bool bRet = SwFmtColl::SetFmtAttr( rSet );
if ( bIsNumRuleItemAffected )
{
@@ -396,7 +396,7 @@ BOOL SwTxtFmtColl::SetFmtAttr( const SfxItemSet& rSet )
return bRet;
}
-BOOL SwTxtFmtColl::ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 )
+sal_Bool SwTxtFmtColl::ResetFmtAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 )
{
const bool bIsNumRuleItemAffected =
( nWhich2 != 0 && nWhich2 > nWhich1 )
@@ -408,14 +408,14 @@ BOOL SwTxtFmtColl::ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 )
TxtFmtCollFunc::RemoveFromNumRule( *this );
}
- const BOOL bRet = SwFmtColl::ResetFmtAttr( nWhich1, nWhich2 );
+ const sal_Bool bRet = SwFmtColl::ResetFmtAttr( nWhich1, nWhich2 );
return bRet;
}
// <--
// #i73790#
-USHORT SwTxtFmtColl::ResetAllFmtAttr()
+sal_uInt16 SwTxtFmtColl::ResetAllFmtAttr()
{
const bool bOldState( mbStayAssignedToListLevelOfOutlineStyle );
mbStayAssignedToListLevelOfOutlineStyle = true;
@@ -428,7 +428,7 @@ USHORT SwTxtFmtColl::ResetAllFmtAttr()
: -1;
// <--
- USHORT nRet = SwFmtColl::ResetAllFmtAttr();
+ sal_uInt16 nRet = SwFmtColl::ResetAllFmtAttr();
// #i70748#
if ( nAssignedOutlineStyleLevel != -1 )
@@ -452,12 +452,12 @@ bool SwTxtFmtColl::AreListLevelIndentsApplicable() const
// no list style applied to paragraph style
bAreListLevelIndentsApplicable = false;
}
- else if ( GetItemState( RES_LR_SPACE, FALSE ) == SFX_ITEM_SET )
+ else if ( GetItemState( RES_LR_SPACE, sal_False ) == SFX_ITEM_SET )
{
// paragraph style has hard-set indent attributes
bAreListLevelIndentsApplicable = false;
}
- else if ( GetItemState( RES_PARATR_NUMRULE, FALSE ) == SFX_ITEM_SET )
+ else if ( GetItemState( RES_PARATR_NUMRULE, sal_False ) == SFX_ITEM_SET )
{
// list style is directly applied to paragraph style and paragraph
// style has no hard-set indent attributes
@@ -472,14 +472,14 @@ bool SwTxtFmtColl::AreListLevelIndentsApplicable() const
const SwTxtFmtColl* pColl = dynamic_cast<const SwTxtFmtColl*>(DerivedFrom());
while ( pColl )
{
- if ( pColl->GetAttrSet().GetItemState( RES_LR_SPACE, FALSE ) == SFX_ITEM_SET )
+ if ( pColl->GetAttrSet().GetItemState( RES_LR_SPACE, sal_False ) == SFX_ITEM_SET )
{
// indent attributes found in the paragraph style hierarchy.
bAreListLevelIndentsApplicable = false;
break;
}
- if ( pColl->GetAttrSet().GetItemState( RES_PARATR_NUMRULE, FALSE ) == SFX_ITEM_SET )
+ if ( pColl->GetAttrSet().GetItemState( RES_PARATR_NUMRULE, sal_False ) == SFX_ITEM_SET )
{
// paragraph style with the list style found and until now no
// indent attributes are found in the paragraph style hierarchy.
@@ -499,15 +499,15 @@ bool SwTxtFmtColl::AreListLevelIndentsApplicable() const
//FEATURE::CONDCOLL
-SwCollCondition::SwCollCondition( SwTxtFmtColl* pColl, ULONG nMasterCond,
- ULONG nSubCond )
+SwCollCondition::SwCollCondition( SwTxtFmtColl* pColl, sal_uLong nMasterCond,
+ sal_uLong nSubCond )
: SwClient( pColl ), nCondition( nMasterCond )
{
aSubCondition.nSubCondition = nSubCond;
}
-SwCollCondition::SwCollCondition( SwTxtFmtColl* pColl, ULONG nMasterCond,
+SwCollCondition::SwCollCondition( SwTxtFmtColl* pColl, sal_uLong nMasterCond,
const String& rSubExp )
: SwClient( pColl ), nCondition( nMasterCond )
{
@@ -567,7 +567,7 @@ int SwCollCondition::operator==( const SwCollCondition& rCmp ) const
}
-void SwCollCondition::SetCondition( ULONG nCond, ULONG nSubCond )
+void SwCollCondition::SetCondition( sal_uLong nCond, sal_uLong nSubCond )
{
if( USRFLD_EXPRESSION & nCondition )
delete aSubCondition.pFldExpression;
@@ -584,7 +584,7 @@ const SwCollCondition* SwConditionTxtFmtColl::HasCondition(
const SwCollCondition& rCond ) const
{
const SwCollCondition* pFnd = 0;
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < aCondColls.Count(); ++n )
if( *( pFnd = aCondColls[ n ]) == rCond )
@@ -596,7 +596,7 @@ const SwCollCondition* SwConditionTxtFmtColl::HasCondition(
void SwConditionTxtFmtColl::InsertCondition( const SwCollCondition& rCond )
{
- for( USHORT n = 0; n < aCondColls.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aCondColls.Count(); ++n )
if( *aCondColls[ n ] == rCond )
{
aCondColls.DeleteAndDestroy( n );
@@ -609,14 +609,14 @@ void SwConditionTxtFmtColl::InsertCondition( const SwCollCondition& rCond )
}
-BOOL SwConditionTxtFmtColl::RemoveCondition( const SwCollCondition& rCond )
+sal_Bool SwConditionTxtFmtColl::RemoveCondition( const SwCollCondition& rCond )
{
- BOOL bRet = FALSE;
- for( USHORT n = 0; n < aCondColls.Count(); ++n )
+ sal_Bool bRet = sal_False;
+ for( sal_uInt16 n = 0; n < aCondColls.Count(); ++n )
if( *aCondColls[ n ] == rCond )
{
aCondColls.DeleteAndDestroy( n );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -629,7 +629,7 @@ void SwConditionTxtFmtColl::SetConditions( const SwFmtCollConditions& rCndClls )
if( aCondColls.Count() )
aCondColls.DeleteAndDestroy( 0, aCondColls.Count() );
SwDoc& rDoc = *GetDoc();
- for( USHORT n = 0; n < rCndClls.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rCndClls.Count(); ++n )
{
SwCollCondition* pFnd = rCndClls[ n ];
SwTxtFmtColl* pTmpColl = pFnd->GetTxtFmtColl()
@@ -650,7 +650,7 @@ void SwTxtFmtColl::SetAttrOutlineLevel( int nLevel)
{
OSL_ENSURE( 0 <= nLevel && nLevel <= MAXLEVEL ,"SwTxtFmtColl: Level Out Of Range" );
SetFmtAttr( SfxUInt16Item( RES_PARATR_OUTLINELEVEL,
- static_cast<UINT16>(nLevel) ) );
+ static_cast<sal_uInt16>(nLevel) ) );
}
int SwTxtFmtColl::GetAttrOutlineLevel() const
@@ -678,12 +678,12 @@ void SwTxtFmtColl::AssignToListLevelOfOutlineStyle(const int nAssignedListLevel)
{
if ( !pDerivedTxtFmtColl->IsAssignedToListLevelOfOutlineStyle() )
{
- if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_NUMRULE, FALSE ) == SFX_ITEM_DEFAULT )
+ if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_NUMRULE, sal_False ) == SFX_ITEM_DEFAULT )
{
SwNumRuleItem aItem(aEmptyStr);
pDerivedTxtFmtColl->SetFmtAttr( aItem );
}
- if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_OUTLINELEVEL, FALSE ) == SFX_ITEM_DEFAULT )
+ if ( pDerivedTxtFmtColl->GetItemState( RES_PARATR_OUTLINELEVEL, sal_False ) == SFX_ITEM_DEFAULT )
{
pDerivedTxtFmtColl->SetAttrOutlineLevel( 0 );
}
diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx
index afd96de4ba90..e0e257505ba7 100644
--- a/sw/source/core/doc/ftnidx.cxx
+++ b/sw/source/core/doc/ftnidx.cxx
@@ -43,24 +43,24 @@
_SV_IMPL_SORTAR_ALG( _SwFtnIdxs, SwTxtFtnPtr )
-BOOL _SwFtnIdxs::Seek_Entry( const SwTxtFtnPtr rSrch, USHORT* pFndPos ) const
+sal_Bool _SwFtnIdxs::Seek_Entry( const SwTxtFtnPtr rSrch, sal_uInt16* pFndPos ) const
{
- ULONG nIdx = _SwTxtFtn_GetIndex( rSrch );
+ sal_uLong nIdx = _SwTxtFtn_GetIndex( rSrch );
xub_StrLen nCntIdx = *rSrch->GetStart();
- USHORT nO = Count(), nM, nU = 0;
+ sal_uInt16 nO = Count(), nM, nU = 0;
if( nO > 0 )
{
nO--;
while( nU <= nO )
{
nM = nU + ( nO - nU ) / 2;
- ULONG nFndIdx = _SwTxtFtn_GetIndex( (*this)[ nM ] );
+ sal_uLong nFndIdx = _SwTxtFtn_GetIndex( (*this)[ nM ] );
if( nFndIdx == nIdx && *(*this)[ nM ]->GetStart() == nCntIdx )
{
if( pFndPos )
*pFndPos = nM;
- return TRUE;
+ return sal_True;
}
else if( nFndIdx < nIdx ||
(nFndIdx == nIdx && *(*this)[ nM ]->GetStart() < nCntIdx ))
@@ -69,7 +69,7 @@ BOOL _SwFtnIdxs::Seek_Entry( const SwTxtFtnPtr rSrch, USHORT* pFndPos ) const
{
if( pFndPos )
*pFndPos = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
@@ -77,7 +77,7 @@ BOOL _SwFtnIdxs::Seek_Entry( const SwTxtFtnPtr rSrch, USHORT* pFndPos ) const
}
if( pFndPos )
*pFndPos = nU;
- return FALSE;
+ return sal_False;
}
@@ -102,11 +102,11 @@ void SwFtnIdxs::UpdateFtn( const SwNodeIndex& rStt )
{
const SwOutlineNodes& rOutlNds = pDoc->GetNodes().GetOutLineNds();
const SwNode* pCapStt = &pDoc->GetNodes().GetEndOfExtras();
- ULONG nCapEnd = pDoc->GetNodes().GetEndOfContent().GetIndex();
+ sal_uLong nCapEnd = pDoc->GetNodes().GetEndOfContent().GetIndex();
if( rOutlNds.Count() )
{
// suche den Start des Kapitels, in den rStt steht.
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < rOutlNds.Count(); ++n )
if( rOutlNds[ n ]->GetIndex() > rStt.GetIndex() )
@@ -124,7 +124,7 @@ void SwFtnIdxs::UpdateFtn( const SwNodeIndex& rStt )
}
}
- USHORT nPos, nFtnNo = 1;
+ sal_uInt16 nPos, nFtnNo = 1;
if( SeekEntry( *pCapStt, &nPos ) && nPos )
{
// gehe nach vorne bis der Index nicht mehr gleich ist
@@ -156,12 +156,12 @@ void SwFtnIdxs::UpdateFtn( const SwNodeIndex& rStt )
SwUpdFtnEndNtAtEnd aNumArr;
- // BOOL, damit hier auch bei Chapter-Einstellung die Endnoten
+ // sal_Bool, damit hier auch bei Chapter-Einstellung die Endnoten
// durchlaufen.
- const BOOL bEndNoteOnly = FTNNUM_DOC != rFtnInfo.eNum;
+ const sal_Bool bEndNoteOnly = FTNNUM_DOC != rFtnInfo.eNum;
- USHORT nPos, nFtnNo = 1, nEndNo = 1;
- ULONG nUpdNdIdx = rStt.GetIndex();
+ sal_uInt16 nPos, nFtnNo = 1, nEndNo = 1;
+ sal_uLong nUpdNdIdx = rStt.GetIndex();
for( nPos = 0; nPos < Count(); ++nPos )
{
pTxtFtn = (*this)[ nPos ];
@@ -188,7 +188,7 @@ void SwFtnIdxs::UpdateFtn( const SwNodeIndex& rStt )
const SwFmtFtn &rFtn = pTxtFtn->GetFtn();
if( !rFtn.GetNumStr().Len() )
{
- USHORT nSectNo = aNumArr.ChkNumber( *pTxtFtn );
+ sal_uInt16 nSectNo = aNumArr.ChkNumber( *pTxtFtn );
if( !nSectNo && ( rFtn.IsEndNote() || !bEndNoteOnly ))
nSectNo = rFtn.IsEndNote()
? rEndInfo.nFtnOffset + nEndNo++
@@ -227,14 +227,14 @@ void SwFtnIdxs::UpdateAllFtn()
if( FTNNUM_CHAPTER == rFtnInfo.eNum )
{
const SwOutlineNodes& rOutlNds = pDoc->GetNodes().GetOutLineNds();
- USHORT nNo = 1, // Nummer fuer die Fussnoten
+ sal_uInt16 nNo = 1, // Nummer fuer die Fussnoten
nFtnIdx = 0; // Index in das FtnIdx-Array
- for( USHORT n = 0; n < rOutlNds.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rOutlNds.Count(); ++n )
{
//if( !rOutlNds[ n ]->GetTxtNode()->GetTxtColl()->GetOutlineLevel() )//#outline level,zhaojianwei
if ( rOutlNds[ n ]->GetTxtNode()->GetAttrOutlineLevel() == 1 )//<-end,zhaojianwei
{
- ULONG nCapStt = rOutlNds[ n ]->GetIndex(); // Start eines neuen Kapitels
+ sal_uLong nCapStt = rOutlNds[ n ]->GetIndex(); // Start eines neuen Kapitels
for( ; nFtnIdx < Count(); ++nFtnIdx )
{
pTxtFtn = (*this)[ nFtnIdx ];
@@ -267,17 +267,17 @@ void SwFtnIdxs::UpdateAllFtn()
}
- // BOOL, damit hier auch bei Chapter-Einstellung die Endnoten
+ // sal_Bool, damit hier auch bei Chapter-Einstellung die Endnoten
// durchlaufen.
- const BOOL bEndNoteOnly = FTNNUM_DOC != rFtnInfo.eNum;
- USHORT nFtnNo = 0, nEndNo = 0;
- for( USHORT nPos = 0; nPos < Count(); ++nPos )
+ const sal_Bool bEndNoteOnly = FTNNUM_DOC != rFtnInfo.eNum;
+ sal_uInt16 nFtnNo = 0, nEndNo = 0;
+ for( sal_uInt16 nPos = 0; nPos < Count(); ++nPos )
{
pTxtFtn = (*this)[ nPos ];
const SwFmtFtn &rFtn = pTxtFtn->GetFtn();
if( !rFtn.GetNumStr().Len() )
{
- USHORT nSectNo = aNumArr.ChkNumber( *pTxtFtn );
+ sal_uInt16 nSectNo = aNumArr.ChkNumber( *pTxtFtn );
if( !nSectNo && ( rFtn.IsEndNote() || !bEndNoteOnly ))
nSectNo = rFtn.IsEndNote()
? rEndInfo.nFtnOffset + (++nEndNo)
@@ -297,18 +297,18 @@ void SwFtnIdxs::UpdateAllFtn()
pDoc->GetRootFrm()->UpdateFtnNums();
}
-SwTxtFtn* SwFtnIdxs::SeekEntry( const SwNodeIndex& rPos, USHORT* pFndPos ) const
+SwTxtFtn* SwFtnIdxs::SeekEntry( const SwNodeIndex& rPos, sal_uInt16* pFndPos ) const
{
- ULONG nIdx = rPos.GetIndex();
+ sal_uLong nIdx = rPos.GetIndex();
- USHORT nO = Count(), nM, nU = 0;
+ sal_uInt16 nO = Count(), nM, nU = 0;
if( nO > 0 )
{
nO--;
while( nU <= nO )
{
nM = nU + ( nO - nU ) / 2;
- ULONG nNdIdx = _SwTxtFtn_GetIndex( (*this)[ nM ] );
+ sal_uLong nNdIdx = _SwTxtFtn_GetIndex( (*this)[ nM ] );
if( nNdIdx == nIdx )
{
if( pFndPos )
@@ -337,23 +337,23 @@ SwTxtFtn* SwFtnIdxs::SeekEntry( const SwNodeIndex& rPos, USHORT* pFndPos ) const
const SwSectionNode* SwUpdFtnEndNtAtEnd::FindSectNdWithEndAttr(
const SwTxtFtn& rTxtFtn )
{
- USHORT nWh = static_cast<USHORT>( rTxtFtn.GetFtn().IsEndNote() ?
+ sal_uInt16 nWh = static_cast<sal_uInt16>( rTxtFtn.GetFtn().IsEndNote() ?
RES_END_AT_TXTEND : RES_FTN_AT_TXTEND );
- USHORT nVal;
+ sal_uInt16 nVal;
const SwSectionNode* pNd = rTxtFtn.GetTxtNode().FindSectionNode();
while( pNd && FTNEND_ATTXTEND_OWNNUMSEQ != ( nVal =
((const SwFmtFtnAtTxtEnd&)pNd->GetSection().GetFmt()->
- GetFmtAttr( nWh, TRUE )).GetValue() ) &&
+ GetFmtAttr( nWh, sal_True )).GetValue() ) &&
FTNEND_ATTXTEND_OWNNUMANDFMT != nVal )
pNd = pNd->StartOfSectionNode()->FindSectionNode();
return pNd;
}
-USHORT SwUpdFtnEndNtAtEnd::GetNumber( const SwTxtFtn& rTxtFtn,
+sal_uInt16 SwUpdFtnEndNtAtEnd::GetNumber( const SwTxtFtn& rTxtFtn,
const SwSectionNode& rNd )
{
- USHORT nRet = 0, nWh;
+ sal_uInt16 nRet = 0, nWh;
SvPtrarr* pArr;
SvUShorts* pNum;
if( rTxtFtn.GetFtn().IsEndNote() )
@@ -370,7 +370,7 @@ USHORT SwUpdFtnEndNtAtEnd::GetNumber( const SwTxtFtn& rTxtFtn,
}
void* pNd = (void*)&rNd;
- for( USHORT n = pArr->Count(); n; )
+ for( sal_uInt16 n = pArr->Count(); n; )
if( pArr->GetObject( --n ) == pNd )
{
nRet = ++pNum->GetObject( n );
@@ -388,7 +388,7 @@ USHORT SwUpdFtnEndNtAtEnd::GetNumber( const SwTxtFtn& rTxtFtn,
return nRet;
}
-USHORT SwUpdFtnEndNtAtEnd::ChkNumber( const SwTxtFtn& rTxtFtn )
+sal_uInt16 SwUpdFtnEndNtAtEnd::ChkNumber( const SwTxtFtn& rTxtFtn )
{
const SwSectionNode* pSectNd = FindSectNdWithEndAttr( rTxtFtn );
return pSectNd ? GetNumber( rTxtFtn, *pSectNd ) : 0;
diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx
index 6e49dc8108d5..eb1864073088 100644
--- a/sw/source/core/doc/gctable.cxx
+++ b/sw/source/core/doc/gctable.cxx
@@ -36,40 +36,40 @@
#include <swtblfmt.hxx>
-inline const SvxBorderLine* GetLineTB( const SvxBoxItem* pBox, BOOL bTop )
+inline const SvxBorderLine* GetLineTB( const SvxBoxItem* pBox, sal_Bool bTop )
{
return bTop ? pBox->GetTop() : pBox->GetBottom();
}
-BOOL _SwGCBorder_BoxBrd::CheckLeftBorderOfFormat( const SwFrmFmt& rFmt )
+sal_Bool _SwGCBorder_BoxBrd::CheckLeftBorderOfFormat( const SwFrmFmt& rFmt )
{
const SvxBorderLine* pBrd;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rFmt.GetItemState( RES_BOX, TRUE, &pItem ) &&
+ if( SFX_ITEM_SET == rFmt.GetItemState( RES_BOX, sal_True, &pItem ) &&
0 != ( pBrd = ((SvxBoxItem*)pItem)->GetLeft() ) )
{
if( *pBrdLn == *pBrd )
- bAnyBorderFnd = TRUE;
- return TRUE;
+ bAnyBorderFnd = sal_True;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL lcl_GCBorder_ChkBoxBrd_L( const SwTableLine*& rpLine, void* pPara )
+sal_Bool lcl_GCBorder_ChkBoxBrd_L( const SwTableLine*& rpLine, void* pPara )
{
const SwTableBox* pBox = rpLine->GetTabBoxes()[ 0 ];
return lcl_GCBorder_ChkBoxBrd_B( pBox, pPara );
}
-BOOL lcl_GCBorder_ChkBoxBrd_B( const SwTableBox*& rpBox, void* pPara )
+sal_Bool lcl_GCBorder_ChkBoxBrd_B( const SwTableBox*& rpBox, void* pPara )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( rpBox->GetTabLines().Count() )
{
- for( USHORT n = 0, nLines = rpBox->GetTabLines().Count();
+ for( sal_uInt16 n = 0, nLines = rpBox->GetTabLines().Count();
n < nLines && bRet; ++n )
{
const SwTableLine* pLine = rpBox->GetTabLines()[ n ];
@@ -84,36 +84,36 @@ BOOL lcl_GCBorder_ChkBoxBrd_B( const SwTableBox*& rpBox, void* pPara )
return bRet;
}
-BOOL lcl_GCBorder_GetLastBox_L( const SwTableLine*& rpLine, void* pPara )
+sal_Bool lcl_GCBorder_GetLastBox_L( const SwTableLine*& rpLine, void* pPara )
{
const SwTableBoxes& rBoxes = rpLine->GetTabBoxes();
const SwTableBox* pBox = rBoxes[ rBoxes.Count()-1 ];
::lcl_GCBorder_GetLastBox_B( pBox, pPara );
- return TRUE;
+ return sal_True;
}
-BOOL lcl_GCBorder_GetLastBox_B( const SwTableBox*& rpBox, void* pPara )
+sal_Bool lcl_GCBorder_GetLastBox_B( const SwTableBox*& rpBox, void* pPara )
{
SwTableLines& rLines = (SwTableLines&)rpBox->GetTabLines();
if( rLines.Count() )
rLines.ForEach( &lcl_GCBorder_GetLastBox_L, pPara );
else
((SwTableBoxes*)pPara)->Insert( rpBox, ((SwTableBoxes*)pPara)->Count() );
- return TRUE;
+ return sal_True;
}
// suche das "Ende" der vorgegebene BorderLine. Returnt wird die "Layout"Pos!
-USHORT lcl_FindEndPosOfBorder( const SwCollectTblLineBoxes& rCollTLB,
- const SvxBorderLine& rBrdLn, USHORT& rStt, BOOL bTop )
+sal_uInt16 lcl_FindEndPosOfBorder( const SwCollectTblLineBoxes& rCollTLB,
+ const SvxBorderLine& rBrdLn, sal_uInt16& rStt, sal_Bool bTop )
{
- USHORT nPos, nLastPos = 0;
- for( USHORT nEnd = rCollTLB.Count(); rStt < nEnd; ++rStt )
+ sal_uInt16 nPos, nLastPos = 0;
+ for( sal_uInt16 nEnd = rCollTLB.Count(); rStt < nEnd; ++rStt )
{
const SfxPoolItem* pItem;
const SvxBorderLine* pBrd;
const SwTableBox& rBox = rCollTLB.GetBox( rStt, &nPos );
- if( SFX_ITEM_SET != rBox.GetFrmFmt()->GetItemState(RES_BOX,TRUE, &pItem )
+ if( SFX_ITEM_SET != rBox.GetFrmFmt()->GetItemState(RES_BOX,sal_True, &pItem )
|| 0 == ( pBrd = GetLineTB( (SvxBoxItem*)pItem, bTop ))
|| !( *pBrd == rBrdLn ))
break;
@@ -123,23 +123,23 @@ USHORT lcl_FindEndPosOfBorder( const SwCollectTblLineBoxes& rCollTLB,
}
inline const SvxBorderLine* lcl_GCBorder_GetBorder( const SwTableBox& rBox,
- BOOL bTop,
+ sal_Bool bTop,
const SfxPoolItem** ppItem )
{
- return SFX_ITEM_SET == rBox.GetFrmFmt()->GetItemState( RES_BOX, TRUE, ppItem )
+ return SFX_ITEM_SET == rBox.GetFrmFmt()->GetItemState( RES_BOX, sal_True, ppItem )
? GetLineTB( (SvxBoxItem*)*ppItem, bTop )
: 0;
}
void lcl_GCBorder_DelBorder( const SwCollectTblLineBoxes& rCollTLB,
- USHORT& rStt, BOOL bTop,
+ sal_uInt16& rStt, sal_Bool bTop,
const SvxBorderLine& rLine,
const SfxPoolItem* pItem,
- USHORT nEndPos,
+ sal_uInt16 nEndPos,
SwShareBoxFmts* pShareFmts )
{
SwTableBox* pBox = (SwTableBox*)&rCollTLB.GetBox( rStt );
- USHORT nNextPos;
+ sal_uInt16 nNextPos;
const SvxBorderLine* pLn = &rLine;
do {
@@ -166,11 +166,11 @@ void lcl_GCBorder_DelBorder( const SwCollectTblLineBoxes& rCollTLB,
pLn = lcl_GCBorder_GetBorder( *pBox, bTop, &pItem );
- } while( TRUE );
+ } while( sal_True );
}
-BOOL lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
+sal_Bool lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
{
_SwGCLineBorder* pGCPara = (_SwGCLineBorder*)pPara;
@@ -181,7 +181,7 @@ BOOL lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
const SvxBorderLine* pBrd;
const SfxPoolItem* pItem;
const SwTableBoxes& rBoxes = rpLine->GetTabBoxes();
- for( USHORT n = 0, nBoxes = rBoxes.Count() - 1; n < nBoxes; ++n )
+ for( sal_uInt16 n = 0, nBoxes = rBoxes.Count() - 1; n < nBoxes; ++n )
{
SwTableBoxes aBoxes;
{
@@ -193,9 +193,9 @@ BOOL lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
}
SwTableBox* pBox;
- for( USHORT i = aBoxes.Count(); i; )
+ for( sal_uInt16 i = aBoxes.Count(); i; )
if( SFX_ITEM_SET == (pBox = aBoxes[ --i ])->GetFrmFmt()->
- GetItemState( RES_BOX, TRUE, &pItem ) &&
+ GetItemState( RES_BOX, sal_True, &pItem ) &&
0 != ( pBrd = ((SvxBoxItem*)pItem)->GetRight() ) )
{
aBPara.SetBorder( *pBrd );
@@ -219,8 +219,8 @@ BOOL lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
// und jetzt die eigene untere Kante mit der nachfolgenden oberen Kante
if( !pGCPara->IsLastLine() )
{
- SwCollectTblLineBoxes aBottom( FALSE );
- SwCollectTblLineBoxes aTop( TRUE );
+ SwCollectTblLineBoxes aBottom( sal_False );
+ SwCollectTblLineBoxes aTop( sal_True );
::lcl_Line_CollectBox( rpLine, &aBottom );
@@ -228,7 +228,7 @@ BOOL lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
::lcl_Line_CollectBox( pNextLine, &aTop );
// dann entferne mal alle "doppelten" gleichen Lines
- USHORT nBtmPos, nTopPos,
+ sal_uInt16 nBtmPos, nTopPos,
nSttBtm = 0, nSttTop = 0,
nEndBtm = aBottom.Count(), nEndTop = aTop.Count();
@@ -236,23 +236,23 @@ BOOL lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
*pTopBox = &aTop.GetBox( nSttTop++, &nTopPos );
const SfxPoolItem *pBtmItem = 0, *pTopItem = 0;
const SvxBorderLine *pBtmLine(0), *pTopLine(0);
- BOOL bGetTopItem = TRUE, bGetBtmItem = TRUE;
+ sal_Bool bGetTopItem = sal_True, bGetBtmItem = sal_True;
do {
if( bGetBtmItem )
- pBtmLine = lcl_GCBorder_GetBorder( *pBtmBox, FALSE, &pBtmItem );
+ pBtmLine = lcl_GCBorder_GetBorder( *pBtmBox, sal_False, &pBtmItem );
if( bGetTopItem )
- pTopLine = lcl_GCBorder_GetBorder( *pTopBox, TRUE, &pTopItem );
+ pTopLine = lcl_GCBorder_GetBorder( *pTopBox, sal_True, &pTopItem );
if( pTopLine && pBtmLine && *pTopLine == *pBtmLine )
{
// dann kann einer entfernt werden, aber welche?
- USHORT nSavSttBtm = nSttBtm, nSavSttTop = nSttTop;
- USHORT nBtmEndPos = ::lcl_FindEndPosOfBorder( aBottom,
- *pTopLine, nSttBtm, FALSE );
+ sal_uInt16 nSavSttBtm = nSttBtm, nSavSttTop = nSttTop;
+ sal_uInt16 nBtmEndPos = ::lcl_FindEndPosOfBorder( aBottom,
+ *pTopLine, nSttBtm, sal_False );
if( !nBtmEndPos ) nBtmEndPos = nBtmPos;
- USHORT nTopEndPos = ::lcl_FindEndPosOfBorder( aTop,
- *pTopLine, nSttTop, TRUE );
+ sal_uInt16 nTopEndPos = ::lcl_FindEndPosOfBorder( aTop,
+ *pTopLine, nSttTop, sal_True );
if( !nTopEndPos ) nTopEndPos = nTopPos;
@@ -261,7 +261,7 @@ BOOL lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
// dann die TopBorder bis zur BottomEndPos loeschen
nSttTop = nSavSttTop;
if( nTopPos <= nBtmEndPos )
- lcl_GCBorder_DelBorder( aTop, --nSttTop, TRUE,
+ lcl_GCBorder_DelBorder( aTop, --nSttTop, sal_True,
*pBtmLine, pTopItem, nBtmEndPos,
pGCPara->pShareFmts );
else
@@ -272,7 +272,7 @@ BOOL lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
// sonst die BottomBorder bis zur TopEndPos loeschen
nSttBtm = nSavSttBtm;
if( nBtmPos <= nTopEndPos )
- lcl_GCBorder_DelBorder( aBottom, --nSttBtm, FALSE,
+ lcl_GCBorder_DelBorder( aBottom, --nSttBtm, sal_False,
*pTopLine, pBtmItem, nTopEndPos,
pGCPara->pShareFmts );
else
@@ -288,36 +288,36 @@ BOOL lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
pBtmBox = &aBottom.GetBox( nSttBtm++, &nBtmPos );
pTopBox = &aTop.GetBox( nSttTop++, &nTopPos );
- bGetTopItem = bGetBtmItem = TRUE;
+ bGetTopItem = bGetBtmItem = sal_True;
}
else if( nTopPos < nBtmPos )
{
if( nSttTop >= nEndTop )
break;
pTopBox = &aTop.GetBox( nSttTop++, &nTopPos );
- bGetTopItem = TRUE;
- bGetBtmItem = FALSE;
+ bGetTopItem = sal_True;
+ bGetBtmItem = sal_False;
}
else
{
if( nSttBtm >= nEndBtm )
break;
pBtmBox = &aBottom.GetBox( nSttBtm++, &nBtmPos );
- bGetTopItem = FALSE;
- bGetBtmItem = TRUE;
+ bGetTopItem = sal_False;
+ bGetBtmItem = sal_True;
}
- } while( TRUE );
+ } while( sal_True );
}
((SwTableLine*)rpLine)->GetTabBoxes().ForEach( &lcl_GC_Box_Border, pPara );
++pGCPara->nLinePos;
- return TRUE;
+ return sal_True;
}
-BOOL lcl_GC_Box_Border( const SwTableBox*& rpBox, void* pPara )
+sal_Bool lcl_GC_Box_Border( const SwTableBox*& rpBox, void* pPara )
{
if( rpBox->GetTabLines().Count() )
{
@@ -325,7 +325,7 @@ BOOL lcl_GC_Box_Border( const SwTableBox*& rpBox, void* pPara )
aPara.pShareFmts = ((_SwGCLineBorder*)pPara)->pShareFmts;
((SwTableBox*)rpBox)->GetTabLines().ForEach( &lcl_GC_Line_Border, &aPara );
}
- return TRUE;
+ return sal_True;
}
struct _GCLinePara
@@ -338,10 +338,10 @@ struct _GCLinePara
{}
};
-BOOL lcl_MergeGCBox( const SwTableBox*& rpTblBox, void* pPara )
+sal_Bool lcl_MergeGCBox( const SwTableBox*& rpTblBox, void* pPara )
{
SwTableBox*& rpBox = (SwTableBox*&)rpTblBox;
- USHORT n, nLen = rpBox->GetTabLines().Count();
+ sal_uInt16 n, nLen = rpBox->GetTabLines().Count();
if( nLen )
{
// ACHTUNG: die Anzahl der Lines kann sich aendern!
@@ -357,7 +357,7 @@ BOOL lcl_MergeGCBox( const SwTableBox*& rpTblBox, void* pPara )
// hinter diese Box in der Parent-Line und loesche diese Box
SwTableLine* pInsLine = rpBox->GetUpper();
SwTableLine* pCpyLine = rpBox->GetTabLines()[0];
- USHORT nInsPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, rpBox );
+ sal_uInt16 nInsPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, rpBox );
for( n = 0; n < pCpyLine->GetTabBoxes().Count(); ++n )
pCpyLine->GetTabBoxes()[n]->SetUpper( pInsLine );
@@ -366,16 +366,16 @@ BOOL lcl_MergeGCBox( const SwTableBox*& rpTblBox, void* pPara )
// loesche alte die Box mit der Line
pInsLine->GetTabBoxes().DeleteAndDestroy( nInsPos );
- return FALSE; // neu aufsetzen
+ return sal_False; // neu aufsetzen
}
}
- return TRUE;
+ return sal_True;
}
-BOOL lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara )
+sal_Bool lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara )
{
SwTableLine* pLn = (SwTableLine*)rpLine;
- USHORT nLen = pLn->GetTabBoxes().Count();
+ sal_uInt16 nLen = pLn->GetTabBoxes().Count();
if( nLen )
{
_GCLinePara* pGCPara = (_GCLinePara*)pPara;
@@ -396,7 +396,7 @@ BOOL lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara )
SwTableLines& rLns = *pGCPara->pLns;
const SwTableLine* pTmp = pLn;
- USHORT nInsPos = rLns.GetPos( pTmp );
+ sal_uInt16 nInsPos = rLns.GetPos( pTmp );
OSL_ENSURE( USHRT_MAX != nInsPos, "Line nicht gefunden!" );
SwTableBox* pUpper = pLn->GetUpper();
@@ -408,12 +408,12 @@ BOOL lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara )
// Line an die "eingefuegten" uebertragen
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pLn->GetFrmFmt()->GetItemState(
- RES_BACKGROUND, TRUE, &pItem ))
+ RES_BACKGROUND, sal_True, &pItem ))
{
SwTableLines& rBoxLns = pBox->GetTabLines();
- for( USHORT nLns = 0; nLns < nLen; ++nLns )
+ for( sal_uInt16 nLns = 0; nLns < nLen; ++nLns )
if( SFX_ITEM_SET != rBoxLns[ nLns ]->GetFrmFmt()->
- GetItemState( RES_BACKGROUND, TRUE ))
+ GetItemState( RES_BACKGROUND, sal_True ))
pGCPara->pShareFmts->SetAttr( *rBoxLns[ nLns ], *pItem );
}
@@ -434,7 +434,7 @@ BOOL lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara )
if( !lcl_MergeGCBox( *(pLn->GetTabBoxes().GetData() + nLen ), pPara ))
--nLen;
}
- return TRUE;
+ return sal_True;
}
// Struktur ein wenig aufraeumen
@@ -444,7 +444,7 @@ void SwTable::GCLines()
_GCLinePara aPara( GetTabLines() );
SwShareBoxFmts aShareFmts;
aPara.pShareFmts = &aShareFmts;
- for( USHORT n = 0; n < GetTabLines().Count() &&
+ for( sal_uInt16 n = 0; n < GetTabLines().Count() &&
lcl_MergeGCLine( *(GetTabLines().GetData() + n ), &aPara ); ++n )
;
}
diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index 0ea5eea71363..8252e86feb2b 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -59,36 +59,36 @@ using namespace ::com::sun::star;
class SwHTMLTableLayoutConstraints
{
- USHORT nRow; // Start-Zeile
- USHORT nCol; // Start-Spalte
- USHORT nColSpan; // COLSPAN der Zelle
+ sal_uInt16 nRow; // Start-Zeile
+ sal_uInt16 nCol; // Start-Spalte
+ sal_uInt16 nColSpan; // COLSPAN der Zelle
SwHTMLTableLayoutConstraints *pNext; // die naechste Bedingung
- ULONG nMinNoAlign, nMaxNoAlign; // Zwischenergebnisse AL-Pass 1
+ sal_uLong nMinNoAlign, nMaxNoAlign; // Zwischenergebnisse AL-Pass 1
public:
- SwHTMLTableLayoutConstraints( ULONG nMin, ULONG nMax, USHORT nRow,
- USHORT nCol, USHORT nColSp );
+ SwHTMLTableLayoutConstraints( sal_uLong nMin, sal_uLong nMax, sal_uInt16 nRow,
+ sal_uInt16 nCol, sal_uInt16 nColSp );
~SwHTMLTableLayoutConstraints();
- ULONG GetMinNoAlign() const { return nMinNoAlign; }
- ULONG GetMaxNoAlign() const { return nMaxNoAlign; }
+ sal_uLong GetMinNoAlign() const { return nMinNoAlign; }
+ sal_uLong GetMaxNoAlign() const { return nMaxNoAlign; }
SwHTMLTableLayoutConstraints *InsertNext( SwHTMLTableLayoutConstraints *pNxt );
SwHTMLTableLayoutConstraints* GetNext() const { return pNext; }
- USHORT GetRow() const { return nRow; }
+ sal_uInt16 GetRow() const { return nRow; }
- USHORT GetColSpan() const { return nColSpan; }
- USHORT GetColumn() const { return nCol; }
+ sal_uInt16 GetColSpan() const { return nColSpan; }
+ sal_uInt16 GetColumn() const { return nCol; }
};
SwHTMLTableLayoutCnts::SwHTMLTableLayoutCnts( const SwStartNode *pSttNd,
SwHTMLTableLayout* pTab,
- BOOL bNoBrTag,
+ sal_Bool bNoBrTag,
SwHTMLTableLayoutCnts* pNxt ) :
pNext( pNxt ), pBox( 0 ), pTable( pTab ), pStartNode( pSttNd ),
nPass1Done( 0 ), nWidthSet( 0 ), bNoBreakTag( bNoBrTag )
@@ -107,9 +107,9 @@ const SwStartNode *SwHTMLTableLayoutCnts::GetStartNode() const
SwHTMLTableLayoutCell::SwHTMLTableLayoutCell( SwHTMLTableLayoutCnts *pCnts,
- USHORT nRSpan, USHORT nCSpan,
- USHORT nWidth, BOOL bPrcWidth,
- BOOL bNWrapOpt ) :
+ sal_uInt16 nRSpan, sal_uInt16 nCSpan,
+ sal_uInt16 nWidth, sal_Bool bPrcWidth,
+ sal_Bool bNWrapOpt ) :
pContents( pCnts ),
nRowSpan( nRSpan ), nColSpan( nCSpan ),
nWidthOption( nWidth ), bPrcWidthOption( bPrcWidth ),
@@ -125,9 +125,9 @@ SwHTMLTableLayoutCell::~SwHTMLTableLayoutCell()
}
-SwHTMLTableLayoutColumn::SwHTMLTableLayoutColumn( USHORT nWidth,
- BOOL bRelWidth,
- BOOL bLBorder ) :
+SwHTMLTableLayoutColumn::SwHTMLTableLayoutColumn( sal_uInt16 nWidth,
+ sal_Bool bRelWidth,
+ sal_Bool bLBorder ) :
nMinNoAlign(MINLAY), nMaxNoAlign(MINLAY), nAbsMinNoAlign(MINLAY),
nMin(0), nMax(0),
nAbsColWidth(0), nRelColWidth(0),
@@ -137,7 +137,7 @@ SwHTMLTableLayoutColumn::SwHTMLTableLayoutColumn( USHORT nWidth,
SwHTMLTableLayoutConstraints::SwHTMLTableLayoutConstraints(
- ULONG nMin, ULONG nMax, USHORT nRw, USHORT nColumn, USHORT nColSp ):
+ sal_uLong nMin, sal_uLong nMax, sal_uInt16 nRw, sal_uInt16 nColumn, sal_uInt16 nColSp ):
nRow( nRw ), nCol( nColumn ), nColSpan( nColSp ),
pNext( 0 ),
nMinNoAlign( nMin ), nMaxNoAlign( nMax )
@@ -183,13 +183,13 @@ typedef SwHTMLTableLayoutCell *SwHTMLTableLayoutCellPtr;
SwHTMLTableLayout::SwHTMLTableLayout(
const SwTable * pSwTbl,
- USHORT nRws, USHORT nCls, BOOL bColsOpt, BOOL bColTgs,
- USHORT nWdth, BOOL bPrcWdth, USHORT nBorderOpt,
- USHORT nCellPad, USHORT nCellSp, SvxAdjust eAdjust,
- USHORT nLMargin, USHORT nRMargin,
- USHORT nBWidth, USHORT nLeftBWidth,
- USHORT nRightBWidth,
- USHORT nInhLeftBWidth, USHORT nInhRightBWidth ) :
+ sal_uInt16 nRws, sal_uInt16 nCls, sal_Bool bColsOpt, sal_Bool bColTgs,
+ sal_uInt16 nWdth, sal_Bool bPrcWdth, sal_uInt16 nBorderOpt,
+ sal_uInt16 nCellPad, sal_uInt16 nCellSp, SvxAdjust eAdjust,
+ sal_uInt16 nLMargin, sal_uInt16 nRMargin,
+ sal_uInt16 nBWidth, sal_uInt16 nLeftBWidth,
+ sal_uInt16 nRightBWidth,
+ sal_uInt16 nInhLeftBWidth, sal_uInt16 nInhRightBWidth ) :
aColumns( new SwHTMLTableLayoutColumnPtr[nCls] ),
aCells( new SwHTMLTableLayoutCellPtr[nRws*nCls] ),
pSwTable( pSwTbl ), pLeftFillerBox( 0 ), pRightFillerBox( 0 ),
@@ -207,9 +207,9 @@ SwHTMLTableLayout::SwHTMLTableLayout(
nDelayedResizeAbsAvail( 0 ), nLastResizeAbsAvail( 0 ),
nPass1Done( 0 ), nWidthSet( 0 ), eTableAdjust( eAdjust ),
bColsOption( bColsOpt ), bColTags( bColTgs ),
- bPrcWidthOption( bPrcWdth ), bUseRelWidth( FALSE ),
- bMustResize( TRUE ), bExportable( TRUE ), bBordersChanged( FALSE ),
- bMustNotResize( FALSE ), bMustNotRecalc( FALSE )
+ bPrcWidthOption( bPrcWdth ), bUseRelWidth( sal_False ),
+ bMustResize( sal_True ), bExportable( sal_True ), bBordersChanged( sal_False ),
+ bMustNotResize( sal_False ), bMustNotRecalc( sal_False )
{
aResizeTimer.SetTimeoutHdl( STATIC_LINK( this, SwHTMLTableLayout,
DelayedResize_Impl ) );
@@ -217,13 +217,13 @@ SwHTMLTableLayout::SwHTMLTableLayout(
SwHTMLTableLayout::~SwHTMLTableLayout()
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < nCols; i++ )
delete aColumns[i];
delete[] aColumns;
- USHORT nCount = nRows*nCols;
+ sal_uInt16 nCount = nRows*nCols;
for( i=0; i<nCount; i++ )
delete aCells[i];
delete[] aCells;
@@ -237,10 +237,10 @@ SwHTMLTableLayout::~SwHTMLTableLayout()
// MIB 27.6.97: Dabei muss auch der Abstand zum Inhalt berueckichtigt werden,
// und zwar auch dann, wenn wenn nur die gegenueberliegende Seite
// eine Umrandung hat.
-USHORT SwHTMLTableLayout::GetLeftCellSpace( USHORT nCol, USHORT nColSpan,
- BOOL bSwBorders ) const
+sal_uInt16 SwHTMLTableLayout::GetLeftCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan,
+ sal_Bool bSwBorders ) const
{
- USHORT nSpace = nCellSpacing + nCellPadding;
+ sal_uInt16 nSpace = nCellSpacing + nCellPadding;
if( nCol == 0 )
{
@@ -271,10 +271,10 @@ USHORT SwHTMLTableLayout::GetLeftCellSpace( USHORT nCol, USHORT nColSpan,
return nSpace;
}
-USHORT SwHTMLTableLayout::GetRightCellSpace( USHORT nCol, USHORT nColSpan,
- BOOL bSwBorders ) const
+sal_uInt16 SwHTMLTableLayout::GetRightCellSpace( sal_uInt16 nCol, sal_uInt16 nColSpan,
+ sal_Bool bSwBorders ) const
{
- USHORT nSpace = nCellPadding;
+ sal_uInt16 nSpace = nCellPadding;
if( nCol+nColSpan == nCols )
{
@@ -296,12 +296,12 @@ USHORT SwHTMLTableLayout::GetRightCellSpace( USHORT nCol, USHORT nColSpan,
return nSpace;
}
-void SwHTMLTableLayout::AddBorderWidth( ULONG &rMin, ULONG &rMax,
- ULONG &rAbsMin,
- USHORT nCol, USHORT nColSpan,
- BOOL bSwBorders ) const
+void SwHTMLTableLayout::AddBorderWidth( sal_uLong &rMin, sal_uLong &rMax,
+ sal_uLong &rAbsMin,
+ sal_uInt16 nCol, sal_uInt16 nColSpan,
+ sal_Bool bSwBorders ) const
{
- ULONG nAdd = GetLeftCellSpace( nCol, nColSpan, bSwBorders ) +
+ sal_uLong nAdd = GetLeftCellSpace( nCol, nColSpan, bSwBorders ) +
GetRightCellSpace( nCol, nColSpan, bSwBorders );
rMin += nAdd;
@@ -309,8 +309,8 @@ void SwHTMLTableLayout::AddBorderWidth( ULONG &rMin, ULONG &rMax,
rAbsMin += nAdd;
}
-void SwHTMLTableLayout::SetBoxWidth( SwTableBox *pBox, USHORT nCol,
- USHORT nColSpan ) const
+void SwHTMLTableLayout::SetBoxWidth( SwTableBox *pBox, sal_uInt16 nCol,
+ sal_uInt16 nColSpan ) const
{
SwFrmFmt *pFrmFmt = pBox->GetFrmFmt();
@@ -324,12 +324,12 @@ void SwHTMLTableLayout::SetBoxWidth( SwTableBox *pBox, USHORT nCol,
pFrmFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nFrmWidth, 0 ));
}
-void SwHTMLTableLayout::GetAvail( USHORT nCol, USHORT nColSpan,
- USHORT& rAbsAvail, USHORT& rRelAvail ) const
+void SwHTMLTableLayout::GetAvail( sal_uInt16 nCol, sal_uInt16 nColSpan,
+ sal_uInt16& rAbsAvail, sal_uInt16& rRelAvail ) const
{
rAbsAvail = 0;
rRelAvail = 0;
- for( USHORT i=nCol; i<nCol+nColSpan;i++ )
+ for( sal_uInt16 i=nCol; i<nCol+nColSpan;i++ )
{
const SwHTMLTableLayoutColumn *pColumn = GetColumn(i);
rAbsAvail = rAbsAvail + pColumn->GetAbsColWidth();
@@ -337,19 +337,19 @@ void SwHTMLTableLayout::GetAvail( USHORT nCol, USHORT nColSpan,
}
}
-USHORT SwHTMLTableLayout::GetBrowseWidthByVisArea( const SwDoc& rDoc )
+sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByVisArea( const SwDoc& rDoc )
{
ViewShell *pVSh = 0;
rDoc.GetEditShell( &pVSh );
if( pVSh )
{
- return (USHORT)pVSh->GetBrowseWidth();
+ return (sal_uInt16)pVSh->GetBrowseWidth();
}
return 0;
}
-USHORT SwHTMLTableLayout::GetBrowseWidth( const SwDoc& rDoc )
+sal_uInt16 SwHTMLTableLayout::GetBrowseWidth( const SwDoc& rDoc )
{
// Wenn ein Layout da ist, koennen wir die Breite dort herholen.
const SwRootFrm *pRootFrm = rDoc.GetRootFrm();
@@ -357,7 +357,7 @@ USHORT SwHTMLTableLayout::GetBrowseWidth( const SwDoc& rDoc )
{
const SwFrm *pPageFrm = pRootFrm->GetLower();
if( pPageFrm )
- return (USHORT)pPageFrm->Prt().Width();
+ return (sal_uInt16)pPageFrm->Prt().Width();
}
// #i91658#
@@ -368,7 +368,7 @@ USHORT SwHTMLTableLayout::GetBrowseWidth( const SwDoc& rDoc )
// <--
}
-USHORT SwHTMLTableLayout::GetBrowseWidthByTabFrm(
+sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByTabFrm(
const SwTabFrm& rTabFrm ) const
{
SwTwips nWidth = 0;
@@ -397,12 +397,12 @@ USHORT SwHTMLTableLayout::GetBrowseWidthByTabFrm(
rTabFrm.CalcFlyOffsets( nUpperDummy, nLeftOffset, nRightOffset );
nWidth -= (nLeftOffset + nRightOffset);
- return nWidth < USHRT_MAX ? static_cast<USHORT>(nWidth) : USHRT_MAX;
+ return nWidth < USHRT_MAX ? static_cast<sal_uInt16>(nWidth) : USHRT_MAX;
}
-USHORT SwHTMLTableLayout::GetBrowseWidthByTable( const SwDoc& rDoc ) const
+sal_uInt16 SwHTMLTableLayout::GetBrowseWidthByTable( const SwDoc& rDoc ) const
{
- USHORT nBrowseWidth = 0;
+ sal_uInt16 nBrowseWidth = 0;
SwClientIter aIter( *(SwModify*)pSwTable->GetFrmFmt() );
SwClient* pCli = aIter.First( TYPE( SwTabFrm ));
if( pCli )
@@ -441,9 +441,9 @@ SwFrmFmt *SwHTMLTableLayout::FindFlyFrmFmt() const
return pTblNd->GetFlyFmt();
}
-static void lcl_GetMinMaxSize( ULONG& rMinNoAlignCnts, ULONG& rMaxNoAlignCnts,
- ULONG& rAbsMinNoAlignCnts,
- SwTxtNode *pTxtNd, ULONG nIdx, BOOL bNoBreak )
+static void lcl_GetMinMaxSize( sal_uLong& rMinNoAlignCnts, sal_uLong& rMaxNoAlignCnts,
+ sal_uLong& rAbsMinNoAlignCnts,
+ SwTxtNode *pTxtNd, sal_uLong nIdx, sal_Bool bNoBreak )
{
pTxtNd->GetMinMaxSize( nIdx, rMinNoAlignCnts, rMaxNoAlignCnts,
rAbsMinNoAlignCnts );
@@ -476,8 +476,8 @@ void SwHTMLTableLayout::AutoLayoutPass1()
ClearPass1Info();
- BOOL bFixRelWidths = FALSE;
- USHORT i;
+ sal_Bool bFixRelWidths = sal_False;
+ sal_uInt16 i;
SwHTMLTableLayoutConstraints *pConstraints = 0;
@@ -485,19 +485,19 @@ void SwHTMLTableLayout::AutoLayoutPass1()
{
SwHTMLTableLayoutColumn *pColumn = GetColumn( i );
pColumn->ClearPass1Info( !HasColTags() );
- USHORT nMinColSpan = USHRT_MAX; // Spaltenzahl, auf die sich dir
+ sal_uInt16 nMinColSpan = USHRT_MAX; // Spaltenzahl, auf die sich dir
// berechnete Breite bezieht
- USHORT nColSkip = USHRT_MAX; // Wie viele Spalten muessen
+ sal_uInt16 nColSkip = USHRT_MAX; // Wie viele Spalten muessen
// uebersprungen werden
- for( USHORT j=0; j<nRows; j++ )
+ for( sal_uInt16 j=0; j<nRows; j++ )
{
SwHTMLTableLayoutCell *pCell = GetCell(j,i);
SwHTMLTableLayoutCnts *pCnts = pCell->GetContents();
// Zum Ermitteln der naechsten zu berechnenden
// Spalte muessen alle Zeilen herangezogen werden
- USHORT nColSpan = pCell->GetColSpan();
+ sal_uInt16 nColSpan = pCell->GetColSpan();
if( nColSpan < nColSkip )
nColSkip = nColSpan;
@@ -508,11 +508,11 @@ void SwHTMLTableLayout::AutoLayoutPass1()
if( nColSpan < nMinColSpan )
nMinColSpan = nColSpan;
- ULONG nMinNoAlignCell = 0;
- ULONG nMaxNoAlignCell = 0;
- ULONG nAbsMinNoAlignCell = 0;
- ULONG nMaxTableCell = 0;
- ULONG nAbsMinTableCell = 0;
+ sal_uLong nMinNoAlignCell = 0;
+ sal_uLong nMaxNoAlignCell = 0;
+ sal_uLong nAbsMinNoAlignCell = 0;
+ sal_uLong nMaxTableCell = 0;
+ sal_uLong nAbsMinTableCell = 0;
while( pCnts )
{
@@ -520,15 +520,15 @@ void SwHTMLTableLayout::AutoLayoutPass1()
if( pSttNd )
{
const SwDoc *pDoc = pSttNd->GetDoc();
- ULONG nIdx = pSttNd->GetIndex();
+ sal_uLong nIdx = pSttNd->GetIndex();
while( !(pDoc->GetNodes()[nIdx])->IsEndNode() )
{
SwTxtNode *pTxtNd = (pDoc->GetNodes()[nIdx])->GetTxtNode();
if( pTxtNd )
{
- ULONG nMinNoAlignCnts = 0;
- ULONG nMaxNoAlignCnts = 0;
- ULONG nAbsMinNoAlignCnts = 0;
+ sal_uLong nMinNoAlignCnts = 0;
+ sal_uLong nMaxNoAlignCnts = 0;
+ sal_uLong nAbsMinNoAlignCnts = 0;
lcl_GetMinMaxSize( nMinNoAlignCnts,
nMaxNoAlignCnts,
@@ -552,14 +552,14 @@ void SwHTMLTableLayout::AutoLayoutPass1()
if( pChild )
{
pChild->AutoLayoutPass1();
- ULONG nMaxTableCnts = pChild->nMax;
- ULONG nAbsMinTableCnts = pChild->nMin;
+ sal_uLong nMaxTableCnts = pChild->nMax;
+ sal_uLong nAbsMinTableCnts = pChild->nMin;
// Eine feste Tabellen-Breite wird als Minimum
// und Maximum gleichzeitig uebernommen
if( !pChild->bPrcWidthOption && pChild->nWidthOption )
{
- ULONG nTabWidth = pChild->nWidthOption;
+ sal_uLong nTabWidth = pChild->nWidthOption;
if( nTabWidth >= nAbsMinTableCnts )
{
nMaxTableCnts = nTabWidth;
@@ -587,14 +587,14 @@ void SwHTMLTableLayout::AutoLayoutPass1()
OSL_ENSURE( !this, "Sub tables in HTML import?" );
SwHTMLTableLayout *pChild = pCnts->GetTable();
pChild->AutoLayoutPass1();
- ULONG nMaxTableCnts = pChild->nMax;
- ULONG nAbsMinTableCnts = pChild->nMin;
+ sal_uLong nMaxTableCnts = pChild->nMax;
+ sal_uLong nAbsMinTableCnts = pChild->nMin;
// Eine feste Tabellen-Breite wird als Minimum
// und Maximum gleichzeitig uebernommen
if( !pChild->bPrcWidthOption && pChild->nWidthOption )
{
- ULONG nTabWidth = pChild->nWidthOption;
+ sal_uLong nTabWidth = pChild->nWidthOption;
if( nTabWidth >= nAbsMinTableCnts )
{
nMaxTableCnts = nTabWidth;
@@ -631,8 +631,8 @@ void SwHTMLTableLayout::AutoLayoutPass1()
}
// War frueher hinter AddBorderWidth
- BOOL bRelWidth = pCell->IsPrcWidthOption();
- USHORT nWidth = pCell->GetWidthOption();
+ sal_Bool bRelWidth = pCell->IsPrcWidthOption();
+ sal_uInt16 nWidth = pCell->GetWidthOption();
// Eine NOWRAP-Option bezieht sich auf Text und auf
// Tabellen, wird aber bei fester Zellenbreite
@@ -686,9 +686,9 @@ void SwHTMLTableLayout::AutoLayoutPass1()
// unten erklaert.
if( !HasColTags() && nWidth && !bRelWidth )
{
- ULONG nAbsWidth = nWidth, nDummy = 0, nDummy2 = 0;
+ sal_uLong nAbsWidth = nWidth, nDummy = 0, nDummy2 = 0;
AddBorderWidth( nAbsWidth, nDummy, nDummy2,
- i, nColSpan, FALSE );
+ i, nColSpan, sal_False );
if( nAbsWidth >= nMinNoAlignCell )
{
@@ -755,9 +755,9 @@ void SwHTMLTableLayout::AutoLayoutPass1()
{
// absolute Breiten als Minimal- und Maximalbreite
// uebernehmen.
- ULONG nAbsWidth = pColumn->GetWidthOption();
- ULONG nDummy = 0, nDummy2 = 0;
- AddBorderWidth( nAbsWidth, nDummy, nDummy2, i, 1, FALSE );
+ sal_uLong nAbsWidth = pColumn->GetWidthOption();
+ sal_uLong nDummy = 0, nDummy2 = 0;
+ AddBorderWidth( nAbsWidth, nDummy, nDummy2, i, 1, sal_False );
if( nAbsWidth >= pColumn->GetMinNoAlign() )
{
@@ -803,16 +803,16 @@ void SwHTMLTableLayout::AutoLayoutPass1()
{
// Erstmal muss die Breite analog zu den den Spaltenbreiten
// aufbereitet werden
- USHORT nCol = pConstr->GetColumn();
- USHORT nColSpan = pConstr->GetColSpan();
- ULONG nConstrMin = pConstr->GetMinNoAlign();
- ULONG nConstrMax = pConstr->GetMaxNoAlign();
+ sal_uInt16 nCol = pConstr->GetColumn();
+ sal_uInt16 nColSpan = pConstr->GetColSpan();
+ sal_uLong nConstrMin = pConstr->GetMinNoAlign();
+ sal_uLong nConstrMax = pConstr->GetMaxNoAlign();
// jetzt holen wir uns die bisherige Breite der ueberspannten
// Spalten
- ULONG nColsMin = 0;
- ULONG nColsMax = 0;
- for( USHORT j=nCol; j<nCol+nColSpan; j++ )
+ sal_uLong nColsMin = 0;
+ sal_uLong nColsMax = 0;
+ for( sal_uInt16 j=nCol; j<nCol+nColSpan; j++ )
{
SwHTMLTableLayoutColumn *pColumn = GetColumn( j );
nColsMin += pColumn->GetMin();
@@ -822,22 +822,22 @@ void SwHTMLTableLayout::AutoLayoutPass1()
if( nColsMin<nConstrMin )
{
// den Minimalwert anteilig auf die Spalten verteilen
- ULONG nMinD = nConstrMin-nColsMin;
+ sal_uLong nMinD = nConstrMin-nColsMin;
if( nConstrMin > nColsMax )
{
// Anteilig anhand der Mindestbreiten
- USHORT nEndCol = nCol+nColSpan;
- ULONG nDiff = nMinD;
- for( USHORT ic=nCol; ic<nEndCol; ic++ )
+ sal_uInt16 nEndCol = nCol+nColSpan;
+ sal_uLong nDiff = nMinD;
+ for( sal_uInt16 ic=nCol; ic<nEndCol; ic++ )
{
SwHTMLTableLayoutColumn *pColumn = GetColumn( ic );
- ULONG nColMin = pColumn->GetMin();
- ULONG nColMax = pColumn->GetMax();
+ sal_uLong nColMin = pColumn->GetMin();
+ sal_uLong nColMax = pColumn->GetMax();
nMin -= nColMin;
- ULONG nAdd = ic<nEndCol-1 ? (nColMin * nMinD) / nColsMin
+ sal_uLong nAdd = ic<nEndCol-1 ? (nColMin * nMinD) / nColsMin
: nDiff;
nColMin += nAdd;
nMin += nColMin;
@@ -859,11 +859,11 @@ void SwHTMLTableLayout::AutoLayoutPass1()
else
{
// Anteilig anhand der Differenz zwischen Max und Min
- for( USHORT ic=nCol; ic<nCol+nColSpan; ic++ )
+ for( sal_uInt16 ic=nCol; ic<nCol+nColSpan; ic++ )
{
SwHTMLTableLayoutColumn *pColumn = GetColumn( ic );
- ULONG nDiff = pColumn->GetMax()-pColumn->GetMin();
+ sal_uLong nDiff = pColumn->GetMax()-pColumn->GetMin();
if( nMinD < nDiff )
nDiff = nMinD;
@@ -880,9 +880,9 @@ void SwHTMLTableLayout::AutoLayoutPass1()
if( !HasColTags() && nColsMax<nConstrMax )
{
- ULONG nMaxD = nConstrMax-nColsMax;
+ sal_uLong nMaxD = nConstrMax-nColsMax;
- for( USHORT ic=nCol; ic<nCol+nColSpan; ic++ )
+ for( sal_uInt16 ic=nCol; ic<nCol+nColSpan; ic++ )
{
SwHTMLTableLayoutColumn *pColumn = GetColumn( ic );
@@ -913,9 +913,9 @@ void SwHTMLTableLayout::AutoLayoutPass1()
// erhalten und dient als Ausgangsbasis fuer die andern Breiten.
// Es werden auch hier nur die Maximalbreiten beeinflusst!
- ULONG nAbsMin = 0; // absolte Min-Breite alter Spalten mit
+ sal_uLong nAbsMin = 0; // absolte Min-Breite alter Spalten mit
// relativer Breite
- ULONG nRel = 0; // Summe der relativen Breiten aller Spalten
+ sal_uLong nRel = 0; // Summe der relativen Breiten aller Spalten
for( i=0; i<nCols; i++ )
{
SwHTMLTableLayoutColumn *pColumn = GetColumn( i );
@@ -926,7 +926,7 @@ void SwHTMLTableLayout::AutoLayoutPass1()
}
}
- ULONG nQuot = ULONG_MAX;
+ sal_uLong nQuot = ULONG_MAX;
for( i=0; i<nCols; i++ )
{
SwHTMLTableLayoutColumn *pColumn = GetColumn( i );
@@ -936,7 +936,7 @@ void SwHTMLTableLayout::AutoLayoutPass1()
if( pColumn->GetWidthOption() && pColumn->GetMin() )
{
pColumn->SetMax( nAbsMin * pColumn->GetWidthOption() );
- ULONG nColQuot = pColumn->GetMax() / pColumn->GetMin();
+ sal_uLong nColQuot = pColumn->GetMax() / pColumn->GetMin();
if( nColQuot<nQuot )
nQuot = nColQuot;
}
@@ -961,9 +961,9 @@ void SwHTMLTableLayout::AutoLayoutPass1()
}
else
{
- USHORT nRel = 0; // Summe der relativen Breiten aller Spalten
- USHORT nRelCols = 0; // Anzahl Spalten mit relativer Angabe
- ULONG nRelMax = 0; // Anteil am Maximum dieser Spalten
+ sal_uInt16 nRel = 0; // Summe der relativen Breiten aller Spalten
+ sal_uInt16 nRelCols = 0; // Anzahl Spalten mit relativer Angabe
+ sal_uLong nRelMax = 0; // Anteil am Maximum dieser Spalten
for( i=0; i<nCols; i++ )
{
OSL_ENSURE( nRel<=100, "relative Breite aller Spalten>100%" );
@@ -972,11 +972,11 @@ void SwHTMLTableLayout::AutoLayoutPass1()
{
// Sicherstellen, dass die relativen breiten nicht
// ueber 100% landen
- USHORT nColWidth = pColumn->GetWidthOption();
+ sal_uInt16 nColWidth = pColumn->GetWidthOption();
if( nRel+nColWidth > 100 )
{
nColWidth = 100 - nRel;
- pColumn->SetWidthOption( nColWidth, TRUE, FALSE );
+ pColumn->SetWidthOption( nColWidth, sal_True, sal_False );
}
nRelMax += pColumn->GetMax();
nRel = nRel + nColWidth;
@@ -1000,8 +1000,8 @@ void SwHTMLTableLayout::AutoLayoutPass1()
// mit fester Breite. Ist das richtig???
if( nRel < 100 && nRelCols < nCols )
{
- USHORT nRelLeft = 100 - nRel;
- ULONG nFixMax = nMax - nRelMax;
+ sal_uInt16 nRelLeft = 100 - nRel;
+ sal_uLong nFixMax = nMax - nRelMax;
for( i=0; i<nCols; i++ )
{
SwHTMLTableLayoutColumn *pColumn = GetColumn( i );
@@ -1010,16 +1010,16 @@ void SwHTMLTableLayout::AutoLayoutPass1()
pColumn->GetMin() )
{
// den Rest bekommt die naechste Spalte
- USHORT nColWidth =
- (USHORT)((pColumn->GetMax() * nRelLeft) / nFixMax);
- pColumn->SetWidthOption( nColWidth, TRUE, FALSE );
+ sal_uInt16 nColWidth =
+ (sal_uInt16)((pColumn->GetMax() * nRelLeft) / nFixMax);
+ pColumn->SetWidthOption( nColWidth, sal_True, sal_False );
}
}
}
// nun die Maximalbreiten entsprechend anpassen
- ULONG nQuotMax = ULONG_MAX;
- ULONG nOldMax = nMax;
+ sal_uLong nQuotMax = ULONG_MAX;
+ sal_uLong nOldMax = nMax;
nMax = 0;
for( i=0; i<nCols; i++ )
{
@@ -1031,8 +1031,8 @@ void SwHTMLTableLayout::AutoLayoutPass1()
SwHTMLTableLayoutColumn *pColumn = GetColumn( i );
if( pColumn->IsRelWidthOption() && pColumn->GetWidthOption() )
{
- ULONG nNewMax;
- ULONG nColQuotMax;
+ sal_uLong nNewMax;
+ sal_uLong nColQuotMax;
if( !nWidthOption )
{
nNewMax = nOldMax * pColumn->GetWidthOption();
@@ -1080,10 +1080,10 @@ void SwHTMLTableLayout::AutoLayoutPass1()
// nRelAvail ist der auf USHRT_MAX bezogene verfuegbare Platz oder 0
// nAbsSpace ist der Anteil von nAbsAvail, der durch der umgebende Zelle
// fur die Umrandung und den Abstand zum Inhalt reserviert ist.
-void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
- USHORT nAbsLeftSpace,
- USHORT nAbsRightSpace,
- USHORT nParentInhAbsSpace )
+void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAvail,
+ sal_uInt16 nAbsLeftSpace,
+ sal_uInt16 nAbsRightSpace,
+ sal_uInt16 nParentInhAbsSpace )
{
// Erstmal fuehren wie jede Menge Plausibilaets-Test durch
@@ -1109,7 +1109,7 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
// vorhandene Filler-Zellen und Abstande angepasst
// Abstand zum Inhalt und Unrandung
- USHORT nAbsLeftFill = 0, nAbsRightFill = 0;
+ sal_uInt16 nAbsLeftFill = 0, nAbsRightFill = 0;
if( !IsTopTable() &&
GetMin() + nAbsLeftSpace + nAbsRightSpace <= nAbsAvail )
{
@@ -1149,10 +1149,10 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
nRelRightFill = 0;
if( !IsTopTable() && (nAbsLeftFill>0 || nAbsRightFill) )
{
- ULONG nAbsLeftFillL = nAbsLeftFill, nAbsRightFillL = nAbsRightFill;
+ sal_uLong nAbsLeftFillL = nAbsLeftFill, nAbsRightFillL = nAbsRightFill;
- nRelLeftFill = (USHORT)((nAbsLeftFillL * nRelAvail) / nAbsAvail);
- nRelRightFill = (USHORT)((nAbsRightFillL * nRelAvail) / nAbsAvail);
+ nRelLeftFill = (sal_uInt16)((nAbsLeftFillL * nRelAvail) / nAbsAvail);
+ nRelRightFill = (sal_uInt16)((nAbsRightFillL * nRelAvail) / nAbsAvail);
nAbsAvail -= (nAbsLeftFill + nAbsRightFill);
if( nRelAvail )
@@ -1161,8 +1161,8 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
// Schritt 2: Die absolute Tabellenbreite wird berechnet.
- USHORT nAbsTabWidth = 0;
- bUseRelWidth = FALSE;
+ sal_uInt16 nAbsTabWidth = 0;
+ bUseRelWidth = sal_False;
if( nWidthOption )
{
if( bPrcWidthOption )
@@ -1184,12 +1184,12 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
// Spielen wir solche Spielchen
// jetzt doch. Dort war eine Grafik in einer 1%-breiten
// Tabelle und hat da natuerlich nicht hineingepasst.
- nAbsTabWidth = (USHORT)( ((ULONG)nAbsAvail * nWidthOption) / 100 );
+ nAbsTabWidth = (sal_uInt16)( ((sal_uLong)nAbsAvail * nWidthOption) / 100 );
if( IsTopTable() &&
- ( /*MayBeInFlyFrame() ||*/ (ULONG)nAbsTabWidth > nMin ) )
+ ( /*MayBeInFlyFrame() ||*/ (sal_uLong)nAbsTabWidth > nMin ) )
{
nRelAvail = USHRT_MAX;
- bUseRelWidth = TRUE;
+ bUseRelWidth = sal_True;
}
}
else
@@ -1217,7 +1217,7 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
// Schritt 3: Bestimmen der Spaltenbreiten und ggf. auch der
// absoluten und relativen Tabellenbreiten.
- if( (!IsTopTable() && nMin > (ULONG)nAbsAvail) ||
+ if( (!IsTopTable() && nMin > (sal_uLong)nAbsAvail) ||
nMin > MAX_TABWIDTH )
{
// Wenn
@@ -1235,10 +1235,10 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
// that are: Every cell's width excluding the borders must be at least
// MINLAY:
- ULONG nRealMin = 0;
- for( USHORT i=0; i<nCols; i++ )
+ sal_uLong nRealMin = 0;
+ for( sal_uInt16 i=0; i<nCols; i++ )
{
- ULONG nRealColMin = MINLAY, nDummy1, nDummy2;
+ sal_uLong nRealColMin = MINLAY, nDummy1, nDummy2;
AddBorderWidth( nRealColMin, nDummy1, nDummy2, i, 1 );
nRealMin += nRealColMin;
}
@@ -1247,30 +1247,30 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
// "Nichts geht mehr". We cannot get the minimum column widths
// the layout wants to have.
- USHORT nAbs = 0, nRel = 0;
+ sal_uInt16 nAbs = 0, nRel = 0;
SwHTMLTableLayoutColumn *pColumn;
- for( USHORT i=0; i<nCols-1; i++ )
+ for( sal_uInt16 i=0; i<nCols-1; i++ )
{
pColumn = GetColumn( i );
- ULONG nColMin = pColumn->GetMin();
+ sal_uLong nColMin = pColumn->GetMin();
if( nColMin <= USHRT_MAX )
{
pColumn->SetAbsColWidth(
- (USHORT)((nColMin * nAbsTabWidth) / nMin) );
+ (sal_uInt16)((nColMin * nAbsTabWidth) / nMin) );
pColumn->SetRelColWidth(
- (USHORT)((nColMin * nRelTabWidth) / nMin) );
+ (sal_uInt16)((nColMin * nRelTabWidth) / nMin) );
}
else
{
double nColMinD = nColMin;
pColumn->SetAbsColWidth(
- (USHORT)((nColMinD * nAbsTabWidth) / nMin) );
+ (sal_uInt16)((nColMinD * nAbsTabWidth) / nMin) );
pColumn->SetRelColWidth(
- (USHORT)((nColMinD * nRelTabWidth) / nMin) );
+ (sal_uInt16)((nColMinD * nRelTabWidth) / nMin) );
}
- nAbs = nAbs + (USHORT)pColumn->GetAbsColWidth();
- nRel = nRel + (USHORT)pColumn->GetRelColWidth();
+ nAbs = nAbs + (sal_uInt16)pColumn->GetAbsColWidth();
+ nRel = nRel + (sal_uInt16)pColumn->GetRelColWidth();
}
pColumn = GetColumn( nCols-1 );
pColumn->SetAbsColWidth( nAbsTabWidth - nAbs );
@@ -1278,43 +1278,43 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
}
else
{
- ULONG nDistAbs = nAbsTabWidth - nRealMin;
- ULONG nDistRel = nRelTabWidth - nRealMin;
- ULONG nDistMin = nMin - nRealMin;
- USHORT nAbs = 0, nRel = 0;
+ sal_uLong nDistAbs = nAbsTabWidth - nRealMin;
+ sal_uLong nDistRel = nRelTabWidth - nRealMin;
+ sal_uLong nDistMin = nMin - nRealMin;
+ sal_uInt16 nAbs = 0, nRel = 0;
SwHTMLTableLayoutColumn *pColumn;
- for( USHORT i=0; i<nCols-1; i++ )
+ for( sal_uInt16 i=0; i<nCols-1; i++ )
{
pColumn = GetColumn( i );
- ULONG nColMin = pColumn->GetMin();
- ULONG nRealColMin = MINLAY, nDummy1, nDummy2;
+ sal_uLong nColMin = pColumn->GetMin();
+ sal_uLong nRealColMin = MINLAY, nDummy1, nDummy2;
AddBorderWidth( nRealColMin, nDummy1, nDummy2, i, 1 );
if( nColMin <= USHRT_MAX )
{
pColumn->SetAbsColWidth(
- (USHORT)((((nColMin-nRealColMin) * nDistAbs) / nDistMin) + nRealColMin) );
+ (sal_uInt16)((((nColMin-nRealColMin) * nDistAbs) / nDistMin) + nRealColMin) );
pColumn->SetRelColWidth(
- (USHORT)((((nColMin-nRealColMin) * nDistRel) / nDistMin) + nRealColMin) );
+ (sal_uInt16)((((nColMin-nRealColMin) * nDistRel) / nDistMin) + nRealColMin) );
}
else
{
double nColMinD = nColMin;
pColumn->SetAbsColWidth(
- (USHORT)((((nColMinD-nRealColMin) * nDistAbs) / nDistMin) + nRealColMin) );
+ (sal_uInt16)((((nColMinD-nRealColMin) * nDistAbs) / nDistMin) + nRealColMin) );
pColumn->SetRelColWidth(
- (USHORT)((((nColMinD-nRealColMin) * nDistRel) / nDistMin) + nRealColMin) );
+ (sal_uInt16)((((nColMinD-nRealColMin) * nDistRel) / nDistMin) + nRealColMin) );
}
- nAbs = nAbs + (USHORT)pColumn->GetAbsColWidth();
- nRel = nRel + (USHORT)pColumn->GetRelColWidth();
+ nAbs = nAbs + (sal_uInt16)pColumn->GetAbsColWidth();
+ nRel = nRel + (sal_uInt16)pColumn->GetRelColWidth();
}
pColumn = GetColumn( nCols-1 );
pColumn->SetAbsColWidth( nAbsTabWidth - nAbs );
pColumn->SetRelColWidth( nRelTabWidth - nRel );
}
}
- else if( nMax <= (ULONG)(nAbsTabWidth ? nAbsTabWidth : nAbsAvail) )
+ else if( nMax <= (sal_uLong)(nAbsTabWidth ? nAbsTabWidth : nAbsAvail) )
{
// Wenn
// - die Tabelle eine fixe Breite besitzt und das Maximum der
@@ -1326,7 +1326,7 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
// Keine fixe Breite, dann das Maximum nehmen.
if( !nAbsTabWidth )
- nAbsTabWidth = (USHORT)nMax;
+ nAbsTabWidth = (sal_uInt16)nMax;
// Eine Top-Table darf auch beriter werden als der verfuegbare Platz.
if( nAbsTabWidth > nAbsAvail )
@@ -1338,14 +1338,14 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
// Nur den Anteil der relativen Breite verwenden, der auch fuer
// die absolute Breite verwendet wuerde.
- ULONG nAbsTabWidthL = nAbsTabWidth;
+ sal_uLong nAbsTabWidthL = nAbsTabWidth;
nRelTabWidth =
- ( nRelAvail ? (USHORT)((nAbsTabWidthL * nRelAvail) / nAbsAvail)
+ ( nRelAvail ? (sal_uInt16)((nAbsTabWidthL * nRelAvail) / nAbsAvail)
: nAbsTabWidth );
// Gibt es Spalten mit und Spalten ohne %-Angabe?
- ULONG nFixMax = nMax;
- for( USHORT i=0; i<nCols; i++ )
+ sal_uLong nFixMax = nMax;
+ for( sal_uInt16 i=0; i<nCols; i++ )
{
const SwHTMLTableLayoutColumn *pColumn = GetColumn( i );
if( pColumn->IsRelWidthOption() && pColumn->GetWidthOption()>0 )
@@ -1365,9 +1365,9 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
// werden zuerst die fixen Breiten entsprechend korrigiert
// eingestellt und erst danach die relativen.
- USHORT nAbs = 0, nRel = 0;
- USHORT nFixedCols = 0;
- USHORT i;
+ sal_uInt16 nAbs = 0, nRel = 0;
+ sal_uInt16 nFixedCols = 0;
+ sal_uInt16 i;
for( i = 0; i < nCols; i++ )
{
@@ -1376,21 +1376,21 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
{
// Die Spalte behaelt ihre Breite bei.
nFixedCols++;
- ULONG nColMax = pColumn->GetMax();
- pColumn->SetAbsColWidth( (USHORT)nColMax );
+ sal_uLong nColMax = pColumn->GetMax();
+ pColumn->SetAbsColWidth( (sal_uInt16)nColMax );
- ULONG nRelColWidth =
+ sal_uLong nRelColWidth =
(nColMax * nRelTabWidth) / nAbsTabWidth;
- ULONG nChkWidth =
+ sal_uLong nChkWidth =
(nRelColWidth * nAbsTabWidth) / nRelTabWidth;
if( nChkWidth < nColMax )
nRelColWidth++;
else if( nChkWidth > nColMax )
nRelColWidth--;
- pColumn->SetRelColWidth( (USHORT)nRelColWidth );
+ pColumn->SetRelColWidth( (sal_uInt16)nRelColWidth );
- nAbs = nAbs + (USHORT)nColMax;
- nRel = nRel + (USHORT)nRelColWidth;
+ nAbs = nAbs + (sal_uInt16)nColMax;
+ nRel = nRel + (sal_uInt16)nRelColWidth;
}
}
@@ -1399,9 +1399,9 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
// nAbs, so dass man gleich nFixMax haette nehmen koennen.
// Der Code ist so aber verstaendlicher.
OSL_ENSURE( nFixMax == nAbs, "Zwei Schleifen, zwei Summen?" );
- ULONG nDistMax = nMax - nFixMax;
- USHORT nDistAbsTabWidth = nAbsTabWidth - nAbs;
- USHORT nDistRelTabWidth = nRelTabWidth - nRel;
+ sal_uLong nDistMax = nMax - nFixMax;
+ sal_uInt16 nDistAbsTabWidth = nAbsTabWidth - nAbs;
+ sal_uInt16 nDistRelTabWidth = nRelTabWidth - nRel;
for( i=0; i<nCols; i++ )
{
@@ -1417,11 +1417,11 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
}
else
{
- ULONG nColMax = pColumn->GetMax();
+ sal_uLong nColMax = pColumn->GetMax();
pColumn->SetAbsColWidth(
- (USHORT)((nColMax * nDistAbsTabWidth) / nDistMax) );
+ (sal_uInt16)((nColMax * nDistAbsTabWidth) / nDistMax) );
pColumn->SetRelColWidth(
- (USHORT)((nColMax * nDistRelTabWidth) / nDistMax) );
+ (sal_uInt16)((nColMax * nDistRelTabWidth) / nDistMax) );
}
nAbs = nAbs + pColumn->GetAbsColWidth();
nRel = nRel + pColumn->GetRelColWidth();
@@ -1433,13 +1433,13 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
{
// nein, dann den zu verteilenden Platz auf alle Spalten
// gleichmaessig vertilen.
- for( USHORT i=0; i<nCols; i++ )
+ for( sal_uInt16 i=0; i<nCols; i++ )
{
- ULONG nColMax = GetColumn( i )->GetMax();
+ sal_uLong nColMax = GetColumn( i )->GetMax();
GetColumn( i )->SetAbsColWidth(
- (USHORT)((nColMax * nAbsTabWidth) / nMax) );
+ (sal_uInt16)((nColMax * nAbsTabWidth) / nMax) );
GetColumn( i )->SetRelColWidth(
- (USHORT)((nColMax * nRelTabWidth) / nMax) );
+ (sal_uInt16)((nColMax * nRelTabWidth) / nMax) );
}
}
}
@@ -1450,7 +1450,7 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
if( !nAbsTabWidth )
nAbsTabWidth = nAbsAvail;
if( nAbsTabWidth < nMin )
- nAbsTabWidth = (USHORT)nMin;
+ nAbsTabWidth = (sal_uInt16)nMin;
if( nAbsTabWidth > nAbsAvail )
{
@@ -1459,25 +1459,25 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
nAbsAvail = nAbsTabWidth;
}
- ULONG nAbsTabWidthL = nAbsTabWidth;
+ sal_uLong nAbsTabWidthL = nAbsTabWidth;
nRelTabWidth =
- ( nRelAvail ? (USHORT)((nAbsTabWidthL * nRelAvail) / nAbsAvail)
+ ( nRelAvail ? (sal_uInt16)((nAbsTabWidthL * nRelAvail) / nAbsAvail)
: nAbsTabWidth );
double nW = nAbsTabWidth - nMin;
double nD = (nMax==nMin ? 1 : nMax-nMin);
- USHORT nAbs = 0, nRel = 0;
- for( USHORT i=0; i<nCols-1; i++ )
+ sal_uInt16 nAbs = 0, nRel = 0;
+ for( sal_uInt16 i=0; i<nCols-1; i++ )
{
double nd = GetColumn( i )->GetMax() - GetColumn( i )->GetMin();
- ULONG nAbsColWidth = GetColumn( i )->GetMin() + (ULONG)((nd*nW)/nD);
- ULONG nRelColWidth = nRelAvail
+ sal_uLong nAbsColWidth = GetColumn( i )->GetMin() + (sal_uLong)((nd*nW)/nD);
+ sal_uLong nRelColWidth = nRelAvail
? (nAbsColWidth * nRelTabWidth) / nAbsTabWidth
: nAbsColWidth;
- GetColumn( i )->SetAbsColWidth( (USHORT)nAbsColWidth );
- GetColumn( i )->SetRelColWidth( (USHORT)nRelColWidth );
- nAbs = nAbs + (USHORT)nAbsColWidth;
- nRel = nRel + (USHORT)nRelColWidth;
+ GetColumn( i )->SetAbsColWidth( (sal_uInt16)nAbsColWidth );
+ GetColumn( i )->SetRelColWidth( (sal_uInt16)nRelColWidth );
+ nAbs = nAbs + (sal_uInt16)nAbsColWidth;
+ nRel = nRel + (sal_uInt16)nRelColWidth;
}
GetColumn( nCols-1 )->SetAbsColWidth( nAbsTabWidth - nAbs );
GetColumn( nCols-1 )->SetRelColWidth( nRelTabWidth - nRel );
@@ -1493,9 +1493,9 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
{
// Die Breite von zusaetzlichen Zellen zur Ausrichtung der
// inneren Tabelle bestimmen
- USHORT nAbsDist = (USHORT)(nAbsAvail-nAbsTabWidth);
- USHORT nRelDist = (USHORT)(nRelAvail-nRelTabWidth);
- USHORT nParentInhAbsLeftSpace = 0, nParentInhAbsRightSpace = 0;
+ sal_uInt16 nAbsDist = (sal_uInt16)(nAbsAvail-nAbsTabWidth);
+ sal_uInt16 nRelDist = (sal_uInt16)(nRelAvail-nRelTabWidth);
+ sal_uInt16 nParentInhAbsLeftSpace = 0, nParentInhAbsRightSpace = 0;
// Groesse und Position der zusaetzlichen Zellen bestimmen
switch( eTableAdjust )
@@ -1507,10 +1507,10 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
break;
case SVX_ADJUST_CENTER:
{
- USHORT nAbsLeftDist = nAbsDist / 2;
+ sal_uInt16 nAbsLeftDist = nAbsDist / 2;
nAbsLeftFill = nAbsLeftFill + nAbsLeftDist;
nAbsRightFill += nAbsDist - nAbsLeftDist;
- USHORT nRelLeftDist = nRelDist / 2;
+ sal_uInt16 nRelLeftDist = nRelDist / 2;
nRelLeftFill = nRelLeftFill + nRelLeftDist;
nRelRightFill += nRelDist - nRelLeftDist;
nParentInhAbsLeftSpace = nParentInhAbsSpace / 2;
@@ -1559,32 +1559,32 @@ void SwHTMLTableLayout::AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
}
}
-static BOOL lcl_ResizeLine( const SwTableLine*& rpLine, void* pPara );
+static sal_Bool lcl_ResizeLine( const SwTableLine*& rpLine, void* pPara );
-static BOOL lcl_ResizeBox( const SwTableBox*& rpBox, void* pPara )
+static sal_Bool lcl_ResizeBox( const SwTableBox*& rpBox, void* pPara )
{
- USHORT *pWidth = (USHORT *)pPara;
+ sal_uInt16 *pWidth = (sal_uInt16 *)pPara;
if( !rpBox->GetSttNd() )
{
- USHORT nWidth = 0;
+ sal_uInt16 nWidth = 0;
((SwTableBox *)rpBox)->GetTabLines().ForEach( &lcl_ResizeLine, &nWidth );
rpBox->GetFrmFmt()->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nWidth, 0 ));
*pWidth = *pWidth + nWidth;
}
else
{
- *pWidth = *pWidth + (USHORT)rpBox->GetFrmFmt()->GetFrmSize().GetSize().Width();
+ *pWidth = *pWidth + (sal_uInt16)rpBox->GetFrmFmt()->GetFrmSize().GetSize().Width();
}
- return TRUE;
+ return sal_True;
}
-static BOOL lcl_ResizeLine( const SwTableLine*& rpLine, void* pPara )
+static sal_Bool lcl_ResizeLine( const SwTableLine*& rpLine, void* pPara )
{
- USHORT *pWidth = (USHORT *)pPara;
+ sal_uInt16 *pWidth = (sal_uInt16 *)pPara;
#if OSL_DEBUG_LEVEL > 1
- USHORT nOldWidth = *pWidth;
+ sal_uInt16 nOldWidth = *pWidth;
#endif
*pWidth = 0;
((SwTableLine *)rpLine)->GetTabBoxes().ForEach( &lcl_ResizeBox, pWidth );
@@ -1594,13 +1594,13 @@ static BOOL lcl_ResizeLine( const SwTableLine*& rpLine, void* pPara )
"Zeilen einer Box sind unterschiedlich lang" );
#endif
- return TRUE;
+ return sal_True;
}
-void SwHTMLTableLayout::SetWidths( BOOL bCallPass2, USHORT nAbsAvail,
- USHORT nRelAvail, USHORT nAbsLeftSpace,
- USHORT nAbsRightSpace,
- USHORT nParentInhAbsSpace )
+void SwHTMLTableLayout::SetWidths( sal_Bool bCallPass2, sal_uInt16 nAbsAvail,
+ sal_uInt16 nRelAvail, sal_uInt16 nAbsLeftSpace,
+ sal_uInt16 nAbsRightSpace,
+ sal_uInt16 nParentInhAbsSpace )
{
// SetWidth muss am Ende einmal mehr fuer jede Zelle durchlaufen
// worden sein.
@@ -1616,9 +1616,9 @@ void SwHTMLTableLayout::SetWidths( BOOL bCallPass2, USHORT nAbsAvail,
// Da die Boxen nichts von der HTML-Tabellen-Struktur wissen, wird
// ueber die HTML-Tabellen-Struktur iteriert. Fuer Tabellen in Tabellen
// in Tabellen wird rekursiv SetWidth aufgerufen.
- for( USHORT i=0; i<nRows; i++ )
+ for( sal_uInt16 i=0; i<nRows; i++ )
{
- for( USHORT j=0; j<nCols; j++ )
+ for( sal_uInt16 j=0; j<nCols; j++ )
{
SwHTMLTableLayoutCell *pCell = GetCell( i, j );
@@ -1632,11 +1632,11 @@ void SwHTMLTableLayout::SetWidths( BOOL bCallPass2, USHORT nAbsAvail,
}
else
{
- USHORT nAbs = 0, nRel = 0, nLSpace = 0, nRSpace = 0,
+ sal_uInt16 nAbs = 0, nRel = 0, nLSpace = 0, nRSpace = 0,
nInhSpace = 0;
if( bCallPass2 )
{
- USHORT nColSpan = pCell->GetColSpan();
+ sal_uInt16 nColSpan = pCell->GetColSpan();
GetAvail( j, nColSpan, nAbs, nRel );
nLSpace = GetLeftCellSpace( j, nColSpan );
nRSpace = GetRightCellSpace( j, nColSpan );
@@ -1661,7 +1661,7 @@ void SwHTMLTableLayout::SetWidths( BOOL bCallPass2, USHORT nAbsAvail,
// stattdessen die Breiten der Filler-Zellen gesetzt.
if( IsTopTable() )
{
- USHORT nCalcTabWidth = 0;
+ sal_uInt16 nCalcTabWidth = 0;
((SwTable *)pSwTable)->GetTabLines().ForEach( &lcl_ResizeLine,
&nCalcTabWidth );
OSL_ENSURE( Abs( nRelTabWidth-nCalcTabWidth ) < COLFUZZY,
@@ -1674,9 +1674,9 @@ void SwHTMLTableLayout::SetWidths( BOOL bCallPass2, USHORT nAbsAvail,
((SwTable *)pSwTable)->LockModify();
SwFmtFrmSize aFrmSize( pFrmFmt->GetFrmSize() );
aFrmSize.SetWidth( nRelTabWidth );
- BOOL bRel = bUseRelWidth &&
+ sal_Bool bRel = bUseRelWidth &&
text::HoriOrientation::FULL!=pFrmFmt->GetHoriOrient().GetHoriOrient();
- aFrmSize.SetWidthPercent( (BYTE)(bRel ? nWidthOption : 0) );
+ aFrmSize.SetWidthPercent( (sal_uInt8)(bRel ? nWidthOption : 0) );
pFrmFmt->SetFmtAttr( aFrmSize );
((SwTable *)pSwTable)->UnlockModify();
@@ -1694,7 +1694,7 @@ void SwHTMLTableLayout::SetWidths( BOOL bCallPass2, USHORT nAbsAvail,
// Bei %-Angaben wird die Breite auf das Minimum gesetzt.
aFlyFrmSize.SetWidth( nMin > USHRT_MAX ? USHRT_MAX
: nMin );
- aFlyFrmSize.SetWidthPercent( (BYTE)nWidthOption );
+ aFlyFrmSize.SetWidthPercent( (sal_uInt8)nWidthOption );
}
pFlyFrmFmt->SetFmtAttr( aFlyFrmSize );
}
@@ -1708,7 +1708,7 @@ void SwHTMLTableLayout::SetWidths( BOOL bCallPass2, USHORT nAbsAvail,
// checke doch mal ob die Tabellen korrekte Breiten haben
SwTwips nSize = pSwTable->GetFrmFmt()->GetFrmSize().GetWidth();
const SwTableLines& rLines = pSwTable->GetTabLines();
- for( USHORT n = 0; n < rLines.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rLines.Count(); ++n )
_CheckBoxWidth( *rLines[ n ], nSize );
}
#endif
@@ -1729,7 +1729,7 @@ void SwHTMLTableLayout::SetWidths( BOOL bCallPass2, USHORT nAbsAvail,
}
}
-void SwHTMLTableLayout::_Resize( USHORT nAbsAvail, BOOL bRecalc )
+void SwHTMLTableLayout::_Resize( sal_uInt16 nAbsAvail, sal_Bool bRecalc )
{
// Wenn bRecalc gestzt ist, hat sich am Inhalt der Tabelle etwas
// geaendert. Es muss dann der erste Pass noch einmal durchgefuehrt
@@ -1743,10 +1743,10 @@ void SwHTMLTableLayout::_Resize( USHORT nAbsAvail, BOOL bRecalc )
// Sonst koennen die Breiten gesetzt werden, wobei zuvor aber jewils
// noch der Pass 2 laufen muss.
- SetWidths( TRUE, nAbsAvail );
+ SetWidths( sal_True, nAbsAvail );
if ( pRoot && pRoot->IsCallbackActionEnabled() )
- pRoot->EndAllAction( TRUE ); //True per VirDev (Browsen ruhiger)
+ pRoot->EndAllAction( sal_True ); //True per VirDev (Browsen ruhiger)
}
IMPL_STATIC_LINK( SwHTMLTableLayout, DelayedResize_Impl, void*, EMPTYARG )
@@ -1759,20 +1759,20 @@ IMPL_STATIC_LINK( SwHTMLTableLayout, DelayedResize_Impl, void*, EMPTYARG )
}
-BOOL SwHTMLTableLayout::Resize( USHORT nAbsAvail, BOOL bRecalc,
- BOOL bForce, ULONG nDelay )
+sal_Bool SwHTMLTableLayout::Resize( sal_uInt16 nAbsAvail, sal_Bool bRecalc,
+ sal_Bool bForce, sal_uLong nDelay )
{
if( 0 == nAbsAvail )
- return FALSE;
+ return sal_False;
OSL_ENSURE( IsTopTable(), "Resize darf nur an Top-Tabellen aufgerufen werden" );
// Darf die Tabelle uberhaupt Resized werden oder soll sie es trotzdem?
if( bMustNotResize && !bForce )
- return FALSE;
+ return sal_False;
// Darf ein Recalc der Tabelle durchgefuehrt werden?
if( bMustNotRecalc && !bForce )
- bRecalc = FALSE;
+ bRecalc = sal_False;
const SwDoc *pDoc = GetDoc();
@@ -1782,7 +1782,7 @@ BOOL SwHTMLTableLayout::Resize( USHORT nAbsAvail, BOOL bRecalc,
// weil sond die Umschaltung von relativ nach absolut nicht funktioniert.
if( pDoc->GetRootFrm() && pDoc->get(IDocumentSettingAccess::BROWSE_MODE) )
{
- const USHORT nVisAreaWidth = GetBrowseWidthByVisArea( *pDoc );
+ const sal_uInt16 nVisAreaWidth = GetBrowseWidthByVisArea( *pDoc );
if( nVisAreaWidth < nAbsAvail && !FindFlyFrmFmt() )
nAbsAvail = nVisAreaWidth;
}
@@ -1794,7 +1794,7 @@ BOOL SwHTMLTableLayout::Resize( USHORT nAbsAvail, BOOL bRecalc,
bRecalc |= bDelayedResizeRecalc;
nDelayedResizeAbsAvail = nAbsAvail;
- return FALSE;
+ return sal_False;
}
// Optimierung:
@@ -1810,7 +1810,7 @@ BOOL SwHTMLTableLayout::Resize( USHORT nAbsAvail, BOOL bRecalc,
(nLastResizeAbsAvail==nAbsAvail) ||
(nAbsAvail<=nMin && nRelTabWidth==nMin) ||
(!bPrcWidthOption && nAbsAvail>=nMax && nRelTabWidth==nMax) ) )
- return FALSE;
+ return sal_False;
if( nDelay==HTMLTABLE_RESIZE_NOW )
{
@@ -1830,12 +1830,12 @@ BOOL SwHTMLTableLayout::Resize( USHORT nAbsAvail, BOOL bRecalc,
_Resize( nAbsAvail, bRecalc );
}
- return TRUE;
+ return sal_True;
}
-void SwHTMLTableLayout::BordersChanged( USHORT nAbsAvail, BOOL bRecalc )
+void SwHTMLTableLayout::BordersChanged( sal_uInt16 nAbsAvail, sal_Bool bRecalc )
{
- bBordersChanged = TRUE;
+ bBordersChanged = sal_True;
Resize( nAbsAvail, bRecalc );
}
diff --git a/sw/source/core/doc/lineinfo.cxx b/sw/source/core/doc/lineinfo.cxx
index 3d6b872522ee..8addb27cf01e 100644
--- a/sw/source/core/doc/lineinfo.cxx
+++ b/sw/source/core/doc/lineinfo.cxx
@@ -62,10 +62,10 @@ SwLineNumberInfo::SwLineNumberInfo() :
nCountBy( 5 ),
nDividerCountBy( 3 ),
ePos( LINENUMBER_POS_LEFT ),
- bPaintLineNumbers( FALSE ),
- bCountBlankLines( TRUE ),
- bCountInFlys( FALSE ),
- bRestartEachPage( FALSE )
+ bPaintLineNumbers( sal_False ),
+ bCountBlankLines( sal_True ),
+ bCountInFlys( sal_False ),
+ bRestartEachPage( sal_False )
{
}
@@ -106,7 +106,7 @@ SwLineNumberInfo& SwLineNumberInfo::operator=(const SwLineNumberInfo &rCpy)
return *this;
}
-BOOL SwLineNumberInfo::operator==( const SwLineNumberInfo& rInf ) const
+sal_Bool SwLineNumberInfo::operator==( const SwLineNumberInfo& rInf ) const
{
return GetRegisteredIn() == rInf.GetRegisteredIn() &&
aType.GetNumberingType() == rInf.GetNumType().GetNumberingType() &&
diff --git a/sw/source/core/doc/list.cxx b/sw/source/core/doc/list.cxx
index 69883e3af67f..3fc2ee0500dd 100644
--- a/sw/source/core/doc/list.cxx
+++ b/sw/source/core/doc/list.cxx
@@ -61,7 +61,7 @@ class SwListImpl
void ValidateListTree();
void MarkListLevel( const int nListLevel,
- const BOOL bValue );
+ const sal_Bool bValue );
bool IsListLevelMarked( const int nListLevel ) const;
@@ -103,7 +103,7 @@ SwListImpl::SwListImpl( const String sListId,
pNode = pNode->EndOfSectionNode();
if (pNode != &rNodes.GetEndOfContent())
{
- ULONG nIndex = pNode->GetIndex();
+ sal_uLong nIndex = pNode->GetIndex();
nIndex++;
pNode = rNodes[nIndex];
}
@@ -187,7 +187,7 @@ void SwListImpl::ValidateListTree()
}
void SwListImpl::MarkListLevel( const int nListLevel,
- const BOOL bValue )
+ const sal_Bool bValue )
{
if ( bValue )
{
@@ -280,7 +280,7 @@ void SwList::ValidateListTree()
}
void SwList::MarkListLevel( const int nListLevel,
- const BOOL bValue )
+ const sal_Bool bValue )
{
mpListImpl->MarkListLevel( nListLevel, bValue );
}
diff --git a/sw/source/core/doc/makefile.mk b/sw/source/core/doc/makefile.mk
deleted file mode 100644
index 3399c694b8fc..000000000000
--- a/sw/source/core/doc/makefile.mk
+++ /dev/null
@@ -1,92 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=doc
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES = \
- $(SLO)$/SwStyleNameMapper.obj \
- $(SLO)$/acmplwrd.obj \
- $(SLO)$/dbgoutsw.obj \
- $(SLO)$/doc.obj \
- $(SLO)$/docbasic.obj \
- $(SLO)$/docbm.obj \
- $(SLO)$/docchart.obj \
- $(SLO)$/doccomp.obj \
- $(SLO)$/doccorr.obj \
- $(SLO)$/docdde.obj \
- $(SLO)$/docdesc.obj \
- $(SLO)$/docdraw.obj \
- $(SLO)$/docedt.obj \
- $(SLO)$/docfld.obj \
- $(SLO)$/docfly.obj \
- $(SLO)$/docfmt.obj \
- $(SLO)$/docftn.obj \
- $(SLO)$/docglbl.obj \
- $(SLO)$/docglos.obj \
- $(SLO)$/doclay.obj \
- $(SLO)$/docnew.obj \
- $(SLO)$/docnum.obj \
- $(SLO)$/docredln.obj \
- $(SLO)$/docruby.obj \
- $(SLO)$/docsort.obj \
- $(SLO)$/doctxm.obj \
- $(SLO)$/docxforms.obj \
- $(SLO)$/extinput.obj \
- $(SLO)$/fmtcol.obj \
- $(SLO)$/ftnidx.obj \
- $(SLO)$/gctable.obj \
- $(SLO)$/htmltbl.obj \
- $(SLO)$/lineinfo.obj \
- $(SLO)$/list.obj \
- $(SLO)$/notxtfrm.obj \
- $(SLO)$/number.obj \
- $(SLO)$/poolfmt.obj \
- $(SLO)$/swserv.obj \
- $(SLO)$/swstylemanager.obj \
- $(SLO)$/tblafmt.obj \
- $(SLO)$/tblcpy.obj \
- $(SLO)$/tblrwcl.obj \
- $(SLO)$/visiturl.obj
-
-SLOFILES = $(EXCEPTIONSFILES) \
- $(SLO)$/docstat.obj \
- $(SLO)$/sortopt.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index f5666ce73968..15aaccd7c9a1 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -88,9 +88,9 @@ using namespace com::sun::star;
extern void ClrContourCache( const SdrObject *pObj ); // TxtFly.Cxx
-inline BOOL GetRealURL( const SwGrfNode& rNd, String& rTxt )
+inline sal_Bool GetRealURL( const SwGrfNode& rNd, String& rTxt )
{
- BOOL bRet = rNd.GetFileFilterNms( &rTxt, 0 );
+ sal_Bool bRet = rNd.GetFileFilterNms( &rTxt, 0 );
if( bRet )
rTxt = URIHelper::removePassword( rTxt, INetURLObject::WAS_ENCODED,
INetURLObject::DECODE_UNAMBIGUOUS);
@@ -99,7 +99,7 @@ inline BOOL GetRealURL( const SwGrfNode& rNd, String& rTxt )
void lcl_PaintReplacement( const SwRect &rRect, const String &rText,
const ViewShell &rSh, const SwNoTxtFrm *pFrm,
- BOOL bDefect )
+ sal_Bool bDefect )
{
static Font *pFont = 0;
if ( !pFont )
@@ -110,7 +110,7 @@ void lcl_PaintReplacement( const SwRect &rRect, const String &rText,
pFont->SetName( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "Arial Unicode" )));
pFont->SetFamily( FAMILY_SWISS );
- pFont->SetTransparent( TRUE );
+ pFont->SetTransparent( sal_True );
}
Color aCol( COL_RED );
@@ -118,16 +118,16 @@ void lcl_PaintReplacement( const SwRect &rRect, const String &rText,
const SwFmtURL &rURL = pFrm->FindFlyFrm()->GetFmt()->GetURL();
if( rURL.GetURL().Len() || rURL.GetMap() )
{
- BOOL bVisited = FALSE;
+ sal_Bool bVisited = sal_False;
if ( rURL.GetMap() )
{
ImageMap *pMap = (ImageMap*)rURL.GetMap();
- for( USHORT i = 0; i < pMap->GetIMapObjectCount(); i++ )
+ for( sal_uInt16 i = 0; i < pMap->GetIMapObjectCount(); i++ )
{
IMapObject *pObj = pMap->GetIMapObject( i );
if( rSh.GetDoc()->IsVisitedURL( pObj->GetURL() ) )
{
- bVisited = TRUE;
+ bVisited = sal_True;
break;
}
}
@@ -144,7 +144,7 @@ void lcl_PaintReplacement( const SwRect &rRect, const String &rText,
pFont->SetUnderline( eUnderline );
pFont->SetColor( aCol );
- const BitmapEx& rBmp = ViewShell::GetReplacementBitmap( bDefect != FALSE );
+ const BitmapEx& rBmp = ViewShell::GetReplacementBitmap( bDefect != sal_False );
Graphic::DrawEx( rSh.GetOut(), rText, *pFont, rBmp, rRect.Pos(), rRect.SSize() );
}
@@ -221,15 +221,15 @@ void lcl_ClearArea( const SwFrm &rFrm,
if ( aRegion.Count() )
{
const SvxBrushItem *pItem; const Color *pCol; SwRect aOrigRect;
- if ( rFrm.GetBackgroundBrush( pItem, pCol, aOrigRect, FALSE ) )
- for( USHORT i = 0; i < aRegion.Count(); ++i )
+ if ( rFrm.GetBackgroundBrush( pItem, pCol, aOrigRect, sal_False ) )
+ for( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
::DrawGraphic( pItem, &rOut, aOrigRect, aRegion[i] );
else
{
rOut.Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
rOut.SetFillColor( rFrm.GetShell()->Imp()->GetRetoucheColor());
rOut.SetLineColor();
- for( USHORT i = 0; i < aRegion.Count(); ++i )
+ for( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
rOut.DrawRect( aRegion[i].SVRect() );
rOut.Pop();
}
@@ -242,7 +242,7 @@ void lcl_ClearArea( const SwFrm &rFrm,
|*
*************************************************************************/
-void SwNoTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/ ) const
+void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
if ( Frm().IsEmpty() )
return;
@@ -260,7 +260,7 @@ void SwNoTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/
GetRealURL( *(SwGrfNode*)pNd, aTxt );
if( !aTxt.Len() )
aTxt = FindFlyFrm()->GetFmt()->GetName();
- lcl_PaintReplacement( Frm(), aTxt, *pSh, this, FALSE );
+ lcl_PaintReplacement( Frm(), aTxt, *pSh, this, sal_False );
}
return;
}
@@ -275,13 +275,13 @@ void SwNoTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/
OutputDevice *pOut = pSh->GetOut();
pOut->Push();
- BOOL bClip = TRUE;
+ sal_Bool bClip = sal_True;
PolyPolygon aPoly;
SwNoTxtNode& rNoTNd = *(SwNoTxtNode*)GetNode();
SwGrfNode* pGrfNd = rNoTNd.GetGrfNode();
if( pGrfNd )
- pGrfNd->SetFrameInPaint( TRUE );
+ pGrfNd->SetFrameInPaint( sal_True );
// #i13147# - add 2nd parameter with value <sal_True> to
// method call <FindFlyFrm().GetContour(..)> to indicate that it is called
@@ -292,7 +292,7 @@ void SwNoTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/
)
{
pOut->SetClipRegion( aPoly );
- bClip = FALSE;
+ bClip = sal_False;
}
SwRect aOrigPaint( rRect );
@@ -327,7 +327,7 @@ void SwNoTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/
// wenn nicht sichtbar, loesche einfach den angegebenen Bereich
lcl_ClearArea( *this, *pSh->GetOut(), aPaintArea, SwRect() );
if( pGrfNd )
- pGrfNd->SetFrameInPaint( FALSE );
+ pGrfNd->SetFrameInPaint( sal_False );
pOut->Pop();
SfxProgress::LeaveLock();
@@ -336,7 +336,7 @@ void SwNoTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/
/*************************************************************************
|*
|* void lcl_CalcRect( Point & aPt, Size & aDim,
-|* USHORT nMirror )
+|* sal_uInt16 nMirror )
|*
|* Beschreibung Errechne die Position und die Groesse der Grafik im
|* Frame, entsprechen der aktuellen Grafik-Attribute
@@ -348,7 +348,7 @@ void SwNoTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/
*************************************************************************/
-void lcl_CalcRect( Point& rPt, Size& rDim, USHORT nMirror )
+void lcl_CalcRect( Point& rPt, Size& rDim, sal_uInt16 nMirror )
{
if( nMirror == RES_MIRROR_GRAPH_VERT || nMirror == RES_MIRROR_GRAPH_BOTH )
{
@@ -373,7 +373,7 @@ void lcl_CalcRect( Point& rPt, Size& rDim, USHORT nMirror )
*************************************************************************/
void SwNoTxtFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect,
- BOOL ) const
+ sal_Bool ) const
{
//currently only used for scaling, cropping and mirroring the contour of graphics!
//all other is handled by the GraphicObject
@@ -383,7 +383,7 @@ void SwNoTxtFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect,
const SwAttrSet& rAttrSet = GetNode()->GetSwAttrSet();
const SwCropGrf& rCrop = rAttrSet.GetCropGrf();
- USHORT nMirror = rAttrSet.GetMirrorGrf().GetValue();
+ sal_uInt16 nMirror = rAttrSet.GetMirrorGrf().GetValue();
if( rAttrSet.GetMirrorGrf().IsGrfToggle() )
{
@@ -530,7 +530,7 @@ void SwNoTxtFrm::MakeAll()
MakePrtArea( rAttrs );
if ( !bValidSize )
- { bValidSize = TRUE;
+ { bValidSize = sal_True;
Format();
}
}
@@ -566,11 +566,11 @@ void SwNoTxtFrm::Format( const SwBorderAttrs * )
|*************************************************************************/
-BOOL SwNoTxtFrm::GetCharRect( SwRect &rRect, const SwPosition& rPos,
+sal_Bool SwNoTxtFrm::GetCharRect( SwRect &rRect, const SwPosition& rPos,
SwCrsrMoveState *pCMS ) const
{
if ( &rPos.nNode.GetNode() != (SwNode*)GetNode() )
- return FALSE;
+ return sal_False;
Calc();
SwRect aFrameRect( Frm() );
@@ -599,17 +599,17 @@ BOOL SwNoTxtFrm::GetCharRect( SwRect &rRect, const SwPosition& rPos,
}
}
- return TRUE;
+ return sal_True;
}
-BOOL SwNoTxtFrm::GetCrsrOfst(SwPosition* pPos, Point& ,
+sal_Bool SwNoTxtFrm::GetCrsrOfst(SwPosition* pPos, Point& ,
SwCrsrMoveState* ) const
{
SwCntntNode* pCNd = (SwCntntNode*)GetNode();
pPos->nNode = *pCNd;
pPos->nContent.Assign( pCNd, 0 );
- return TRUE;
+ return sal_True;
}
#define CLEARCACHE( pNd ) {\
@@ -624,7 +624,7 @@ BOOL SwNoTxtFrm::GetCrsrOfst(SwPosition* pPos, Point& ,
void SwNoTxtFrm::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
- USHORT nWhich = pNew ? pNew->Which() : pOld ? pOld->Which() : 0;
+ sal_uInt16 nWhich = pNew ? pNew->Which() : pOld ? pOld->Which() : 0;
// #i73788#
// no <SwCntntFrm::Modify(..)> for RES_LINKED_GRAPHIC_STREAM_ARRIVED
@@ -637,7 +637,7 @@ void SwNoTxtFrm::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
SwCntntFrm::Modify( pOld, pNew );
}
- BOOL bComplete = TRUE;
+ sal_Bool bComplete = sal_True;
switch( nWhich )
{
@@ -647,7 +647,7 @@ void SwNoTxtFrm::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
case RES_GRF_REREAD_AND_INCACHE:
if( ND_GRFNODE == GetNode()->GetNodeType() )
{
- bComplete = FALSE;
+ bComplete = sal_False;
SwGrfNode* pNd = (SwGrfNode*) GetNode();
ViewShell *pVSh = 0;
@@ -683,10 +683,10 @@ void SwNoTxtFrm::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
case RES_ATTRSET_CHG:
{
- USHORT n;
+ sal_uInt16 n;
for( n = RES_GRFATR_BEGIN; n < RES_GRFATR_END; ++n )
if( SFX_ITEM_SET == ((SwAttrSetChg*)pOld)->GetChgSet()->
- GetItemState( n, FALSE ))
+ GetItemState( n, sal_False ))
{
CLEARCACHE( (SwGrfNode*) GetNode() )
break;
@@ -702,7 +702,7 @@ void SwNoTxtFrm::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
case RES_LINKED_GRAPHIC_STREAM_ARRIVED:
if ( GetNode()->GetNodeType() == ND_GRFNODE )
{
- bComplete = FALSE;
+ bComplete = sal_False;
SwGrfNode* pNd = (SwGrfNode*) GetNode();
CLEARCACHE( pNd )
@@ -789,7 +789,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
SwGrfNode* pGrfNd = rNoTNd.GetGrfNode();
SwOLENode* pOLENd = rNoTNd.GetOLENode();
- const BOOL bPrn = pOut == rNoTNd.getIDocumentDeviceAccess()->getPrinter( false ) ||
+ const sal_Bool bPrn = pOut == rNoTNd.getIDocumentDeviceAccess()->getPrinter( false ) ||
pOut->GetConnectMetaFile();
const bool bIsChart = pOLENd && ChartPrettyPainter::IsChart( pOLENd->GetOLEObj().GetObject() );
@@ -818,7 +818,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
if( pGrfNd )
{
- BOOL bForceSwap = FALSE, bContinue = TRUE;
+ sal_Bool bForceSwap = sal_False, bContinue = sal_True;
GraphicObject& rGrfObj = pGrfNd->GetGrfObj();
GraphicAttr aGrfAttr;
@@ -853,8 +853,8 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
String aTxt( pGrfNd->GetTitle() );
if ( !aTxt.Len() )
GetRealURL( *pGrfNd, aTxt );
- ::lcl_PaintReplacement( aAlignedGrfArea, aTxt, *pShell, this, FALSE );
- bContinue = FALSE;
+ ::lcl_PaintReplacement( aAlignedGrfArea, aTxt, *pShell, this, sal_False );
+ bContinue = sal_False;
}
else if( rGrfObj.IsCached( pOut, aAlignedGrfArea.Pos(),
aAlignedGrfArea.SSize(), &aGrfAttr ))
@@ -862,17 +862,17 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
rGrfObj.DrawWithPDFHandling( *pOut,
aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(),
&aGrfAttr );
- bContinue = FALSE;
+ bContinue = sal_False;
}
}
if( bContinue )
{
- const BOOL bSwapped = rGrfObj.IsSwappedOut();
- const BOOL bSwappedIn = 0 != pGrfNd->SwapIn( bPrn );
+ const sal_Bool bSwapped = rGrfObj.IsSwappedOut();
+ const sal_Bool bSwappedIn = 0 != pGrfNd->SwapIn( bPrn );
if( bSwappedIn && rGrfObj.GetGraphic().IsSupportedGraphic())
{
- const BOOL bAnimate = rGrfObj.IsAnimated() &&
+ const sal_Bool bAnimate = rGrfObj.IsAnimated() &&
!pShell->IsPreView() &&
!pShell->GetAccessibilityOptions()->IsStopAnimatedGraphics() &&
// --> FME 2004-06-21 #i9684# Stop animation during printing/pdf export
@@ -906,7 +906,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
}
else
{
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
if( bSwappedIn )
{
if( GRAPHIC_NONE == rGrfObj.GetType() )
@@ -925,12 +925,12 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
if ( nResId )
aText = SW_RESSTR( nResId );
- ::lcl_PaintReplacement( aAlignedGrfArea, aText, *pShell, this, TRUE );
+ ::lcl_PaintReplacement( aAlignedGrfArea, aText, *pShell, this, sal_True );
}
//Beim Drucken duerfen wir nicht die Grafiken sammeln...
if( bSwapped && bPrn )
- bForceSwap = TRUE;
+ bForceSwap = sal_True;
}
if( bForceSwap )
pGrfNd->SwapOut();
@@ -948,11 +948,11 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
{
// #i99665#
// Adjust AntiAliasing mode at output device for chart OLE
- const USHORT nFormerAntialiasingAtOutput( pOut->GetAntialiasing() );
+ const sal_uInt16 nFormerAntialiasingAtOutput( pOut->GetAntialiasing() );
if ( pOLENd->IsChart() &&
pShell->Imp()->GetDrawView()->IsAntiAliasing() )
{
- const USHORT nAntialiasingForChartOLE =
+ const sal_uInt16 nAntialiasingForChartOLE =
nFormerAntialiasingAtOutput | ANTIALIASING_PIXELSNAPHAIRLINE;
pOut->SetAntialiasing( nAntialiasingForChartOLE );
}
@@ -964,7 +964,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
// Im BrowseModus gibt es nicht unbedingt einen Drucker und
// damit kein JobSetup, also legen wir eines an ...
const JobSetup* pJobSetup = pOLENd->getIDocumentDeviceAccess()->getJobsetup();
- BOOL bDummyJobSetup = 0 == pJobSetup;
+ sal_Bool bDummyJobSetup = 0 == pJobSetup;
if( bDummyJobSetup )
pJobSetup = new JobSetup();
@@ -1011,18 +1011,18 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
}
-BOOL SwNoTxtFrm::IsTransparent() const
+sal_Bool SwNoTxtFrm::IsTransparent() const
{
const ViewShell* pSh = GetShell();
if ( !pSh || !pSh->GetViewOptions()->IsGraphic() )
- return TRUE;
+ return sal_True;
const SwGrfNode *pNd;
if( 0 != (pNd = GetNode()->GetGrfNode()) )
return pNd->IsTransparent();
//#29381# OLE sind immer Transparent.
- return TRUE;
+ return sal_True;
}
@@ -1035,7 +1035,7 @@ void SwNoTxtFrm::StopAnimation( OutputDevice* pOut ) const
}
-BOOL SwNoTxtFrm::HasAnimation() const
+sal_Bool SwNoTxtFrm::HasAnimation() const
{
const SwGrfNode* pGrfNd = GetNode()->GetGrfNode();
return pGrfNd && pGrfNd->IsAnimated();
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index edfe1546ad15..73dcba920960 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -66,7 +66,7 @@
using namespace ::com::sun::star;
-USHORT SwNumRule::nRefCount = 0;
+sal_uInt16 SwNumRule::nRefCount = 0;
SwNumFmt* SwNumRule::aBaseFmts[ RULE_END ][ MAXLEVEL ] = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } };
@@ -76,13 +76,13 @@ SwNumFmt* SwNumRule::aLabelAlignmentBaseFmts[ RULE_END ][ MAXLEVEL ] = {
char sOutline[] = "Outline";
char* SwNumRule::pDefOutlineName = sOutline;
-USHORT SwNumRule::aDefNumIndents[ MAXLEVEL ] = {
+sal_uInt16 SwNumRule::aDefNumIndents[ MAXLEVEL ] = {
//inch: 0,5 1,0 1,5 2,0 2,5 3,0 3,5 4,0 4,5 5,0
1440/4, 1440/2, 1440*3/4, 1440, 1440*5/4, 1440*3/2, 1440*7/4, 1440*2,
1440*9/4, 1440*5/2
};
-const SwNumFmt& SwNumRule::Get( USHORT i ) const
+const SwNumFmt& SwNumRule::Get( sal_uInt16 i ) const
{
OSL_ASSERT( i < MAXLEVEL && eRuleType < RULE_END );
return aFmts[ i ]
@@ -92,7 +92,7 @@ const SwNumFmt& SwNumRule::Get( USHORT i ) const
: *aLabelAlignmentBaseFmts[ eRuleType ][ i ] );
}
-const SwNumFmt* SwNumRule::GetNumFmt( USHORT i ) const
+const SwNumFmt* SwNumRule::GetNumFmt( sal_uInt16 i ) const
{
const SwNumFmt * pResult = NULL;
@@ -170,21 +170,19 @@ void SwNumRule::SetNumRuleMap(boost::unordered_map<String, SwNumRule *, StringHa
pNumRuleMap = _pNumRuleMap;
}
-
-USHORT SwNumRule::GetNumIndent( BYTE nLvl )
+sal_uInt16 SwNumRule::GetNumIndent( sal_uInt8 nLvl )
{
OSL_ENSURE( MAXLEVEL > nLvl, "NumLevel is out of range" );
return aDefNumIndents[ nLvl ];
}
-
-USHORT SwNumRule::GetBullIndent( BYTE nLvl )
+sal_uInt16 SwNumRule::GetBullIndent( sal_uInt8 nLvl )
{
OSL_ENSURE( MAXLEVEL > nLvl, "NumLevel is out of range" );
return aDefNumIndents[ nLvl ];
}
-static void lcl_SetRuleChgd( SwTxtNode& rNd, BYTE nLevel )
+static void lcl_SetRuleChgd( SwTxtNode& rNd, sal_uInt8 nLevel )
{
if( rNd.GetActualListLevel() == nLevel )
rNd.NumRuleChgd();
@@ -220,7 +218,7 @@ SwNumFmt::SwNumFmt(const SvxNumberFormat& rNumFmt, SwDoc* pDoc) :
SwCharFmt* pCFmt = pDoc->FindCharFmtByName( rCharStyleName );
if( !pCFmt )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName( rCharStyleName,
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rCharStyleName,
nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
pCFmt = nId != USHRT_MAX
? pDoc->GetCharFmtFromPool( nId )
@@ -245,7 +243,7 @@ void SwNumFmt::NotifyGraphicArrived()
}
// #i22362#
-BOOL SwNumFmt::IsEnumeration() const
+sal_Bool SwNumFmt::IsEnumeration() const
{
// --> FME 2004-08-12 #i30655# native numbering did not work any longer
// using this code. Therefore HBRINKM and I agreed upon defining
@@ -254,20 +252,20 @@ BOOL SwNumFmt::IsEnumeration() const
}
-BOOL SwNumFmt::IsItemize() const
+sal_Bool SwNumFmt::IsItemize() const
{
- BOOL bResult;
+ sal_Bool bResult;
switch(GetNumberingType())
{
case SVX_NUM_CHAR_SPECIAL:
case SVX_NUM_BITMAP:
- bResult = TRUE;
+ bResult = sal_True;
break;
default:
- bResult = FALSE;
+ bResult = sal_False;
}
return bResult;
@@ -284,9 +282,9 @@ SwNumFmt& SwNumFmt::operator=( const SwNumFmt& rNumFmt)
return *this;
}
-BOOL SwNumFmt::operator==( const SwNumFmt& rNumFmt) const
+sal_Bool SwNumFmt::operator==( const SwNumFmt& rNumFmt) const
{
- BOOL bRet = SvxNumberFormat::operator==(rNumFmt) &&
+ sal_Bool bRet = SvxNumberFormat::operator==(rNumFmt) &&
pRegisteredIn == rNumFmt.pRegisteredIn;
return bRet;
}
@@ -351,13 +349,13 @@ sal_Int16 SwNumFmt::GetVertOrient() const
void SwNumFmt::UpdateNumNodes( SwDoc* pDoc )
{
- BOOL bDocIsModified = pDoc->IsModified();
- BOOL bFnd = FALSE;
+ sal_Bool bDocIsModified = pDoc->IsModified();
+ sal_Bool bFnd = sal_False;
const SwNumRule* pRule;
- for( USHORT n = pDoc->GetNumRuleTbl().Count(); !bFnd && n; )
+ for( sal_uInt16 n = pDoc->GetNumRuleTbl().Count(); !bFnd && n; )
{
pRule = pDoc->GetNumRuleTbl()[ --n ];
- for( BYTE i = 0; i < MAXLEVEL; ++i )
+ for( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
if( pRule->GetNumFmt( i ) == this )
{
SwNumRule::tTxtNodeList aTxtNodeList;
@@ -368,7 +366,7 @@ void SwNumFmt::UpdateNumNodes( SwDoc* pDoc )
lcl_SetRuleChgd( *(*aIter), i );
}
// <--
- bFnd = TRUE;
+ bFnd = sal_True;
break;
}
}
@@ -397,7 +395,7 @@ long int SwNumRule::nInstances = 0;
SwNumRule::SwNumRule( const String& rNm,
const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode,
SwNumRuleType eType,
- BOOL bAutoFlg )
+ sal_Bool bAutoFlg )
: maTxtNodeList(),
maParagraphStyleList(),
pNumRuleMap(0),
@@ -407,9 +405,9 @@ SwNumRule::SwNumRule( const String& rNm,
nPoolHelpId( USHRT_MAX ),
nPoolHlpFileId( UCHAR_MAX ),
bAutoRuleFlag( bAutoFlg ),
- bInvalidRuleFlag( TRUE ),
- bContinusNum( FALSE ),
- bAbsSpaces( FALSE ),
+ bInvalidRuleFlag( sal_True ),
+ bContinusNum( sal_False ),
+ bAbsSpaces( sal_False ),
mbCountPhantoms( true ),
meDefaultNumberFormatPositionAndSpaceMode( eDefaultNumberFormatPositionAndSpaceMode ),
msDefaultListId()
@@ -421,7 +419,7 @@ SwNumRule::SwNumRule( const String& rNm,
if( !nRefCount++ ) // zum erstmal, also initialisiern
{
SwNumFmt* pFmt;
- BYTE n;
+ sal_uInt8 n;
// numbering:
// position-and-space mode LABEL_WIDTH_AND_POSITION:
@@ -509,7 +507,7 @@ SwNumRule::SwNumRule( const SwNumRule& rNumRule )
nPoolHelpId( rNumRule.GetPoolHelpId() ),
nPoolHlpFileId( rNumRule.GetPoolHlpFileId() ),
bAutoRuleFlag( rNumRule.bAutoRuleFlag ),
- bInvalidRuleFlag( TRUE ),
+ bInvalidRuleFlag( sal_True ),
bContinusNum( rNumRule.bContinusNum ),
bAbsSpaces( rNumRule.bAbsSpaces ),
mbCountPhantoms( true ),
@@ -522,14 +520,14 @@ SwNumRule::SwNumRule( const SwNumRule& rNumRule )
++nRefCount;
memset( aFmts, 0, sizeof( aFmts ));
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
if( rNumRule.aFmts[ n ] )
Set( n, *rNumRule.aFmts[ n ] );
}
SwNumRule::~SwNumRule()
{
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
delete aFmts[ n ];
if (pNumRuleMap)
@@ -564,7 +562,7 @@ SwNumRule::~SwNumRule()
void SwNumRule::CheckCharFmts( SwDoc* pDoc )
{
SwCharFmt* pFmt;
- for( BYTE n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt8 n = 0; n < MAXLEVEL; ++n )
if( aFmts[ n ] && 0 != ( pFmt = aFmts[ n ]->GetCharFmt() ) &&
pFmt->GetDoc() != pDoc )
{
@@ -580,13 +578,13 @@ SwNumRule& SwNumRule::operator=( const SwNumRule& rNumRule )
{
if( this != &rNumRule )
{
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
Set( n, rNumRule.aFmts[ n ] );
eRuleType = rNumRule.eRuleType;
sName = rNumRule.sName;
bAutoRuleFlag = rNumRule.bAutoRuleFlag;
- bInvalidRuleFlag = TRUE;
+ bInvalidRuleFlag = sal_True;
bContinusNum = rNumRule.bContinusNum;
bAbsSpaces = rNumRule.bAbsSpaces;
nPoolFmtId = rNumRule.GetPoolFmtId();
@@ -596,9 +594,9 @@ SwNumRule& SwNumRule::operator=( const SwNumRule& rNumRule )
return *this;
}
-BOOL SwNumRule::operator==( const SwNumRule& rRule ) const
+sal_Bool SwNumRule::operator==( const SwNumRule& rRule ) const
{
- BOOL bRet = eRuleType == rRule.eRuleType &&
+ sal_Bool bRet = eRuleType == rRule.eRuleType &&
sName == rRule.sName &&
bAutoRuleFlag == rRule.bAutoRuleFlag &&
bContinusNum == rRule.bContinusNum &&
@@ -608,17 +606,17 @@ BOOL SwNumRule::operator==( const SwNumRule& rRule ) const
nPoolHlpFileId == rRule.GetPoolHlpFileId();
if( bRet )
{
- for( BYTE n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt8 n = 0; n < MAXLEVEL; ++n )
if( !( rRule.Get( n ) == Get( n ) ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
return bRet;
}
-void SwNumRule::Set( USHORT i, const SwNumFmt& rNumFmt )
+void SwNumRule::Set( sal_uInt16 i, const SwNumFmt& rNumFmt )
{
OSL_ENSURE( i < MAXLEVEL, "Serious defect, please inform OD" );
if( i < MAXLEVEL )
@@ -627,12 +625,12 @@ void SwNumRule::Set( USHORT i, const SwNumFmt& rNumFmt )
{
delete aFmts[ i ];
aFmts[ i ] = new SwNumFmt( rNumFmt );
- bInvalidRuleFlag = TRUE;
+ bInvalidRuleFlag = sal_True;
}
}
}
-void SwNumRule::Set( USHORT i, const SwNumFmt* pNumFmt )
+void SwNumRule::Set( sal_uInt16 i, const SwNumFmt* pNumFmt )
{
OSL_ENSURE( i < MAXLEVEL, "Serious defect, please inform OD" );
if( i >= MAXLEVEL )
@@ -643,17 +641,17 @@ void SwNumRule::Set( USHORT i, const SwNumFmt* pNumFmt )
if( pNumFmt )
{
aFmts[ i ] = new SwNumFmt( *pNumFmt );
- bInvalidRuleFlag = TRUE;
+ bInvalidRuleFlag = sal_True;
}
}
else if( !pNumFmt )
- delete pOld, aFmts[ i ] = 0, bInvalidRuleFlag = TRUE;
+ delete pOld, aFmts[ i ] = 0, bInvalidRuleFlag = sal_True;
else if( *pOld != *pNumFmt )
- *pOld = *pNumFmt, bInvalidRuleFlag = TRUE;
+ *pOld = *pNumFmt, bInvalidRuleFlag = sal_True;
}
-String SwNumRule::MakeNumString( const SwNodeNum& rNum, BOOL bInclStrings,
- BOOL bOnlyArabic ) const
+String SwNumRule::MakeNumString( const SwNodeNum& rNum, sal_Bool bInclStrings,
+ sal_Bool bOnlyArabic ) const
{
String aStr;
@@ -665,8 +663,8 @@ String SwNumRule::MakeNumString( const SwNodeNum& rNum, BOOL bInclStrings,
}
String SwNumRule::MakeNumString( const SwNumberTree::tNumberVector & rNumVector,
- const BOOL bInclStrings,
- const BOOL bOnlyArabic,
+ const sal_Bool bInclStrings,
+ const sal_Bool bOnlyArabic,
const unsigned int _nRestrictToThisLevel ) const
{
String aStr;
@@ -680,17 +678,17 @@ String SwNumRule::MakeNumString( const SwNumberTree::tNumberVector & rNumVector,
if (nLevel < MAXLEVEL)
{
- const SwNumFmt& rMyNFmt = Get( static_cast<USHORT>(nLevel) );
+ const SwNumFmt& rMyNFmt = Get( static_cast<sal_uInt16>(nLevel) );
{
- BYTE i = static_cast<BYTE>(nLevel);
+ sal_uInt8 i = static_cast<sal_uInt8>(nLevel);
if( !IsContinusNum() &&
// - do not include upper levels, if level isn't numbered.
rMyNFmt.GetNumberingType() != SVX_NUM_NUMBER_NONE &&
rMyNFmt.GetIncludeUpperLevels() ) // nur der eigene Level ?
{
- BYTE n = rMyNFmt.GetIncludeUpperLevels();
+ sal_uInt8 n = rMyNFmt.GetIncludeUpperLevels();
if( 1 < n )
{
if( i+1 >= n )
@@ -754,7 +752,7 @@ String SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum,
bool bMakeNumStringForPhantom( false );
if ( pWorkingNodeNum->IsPhantom() )
{
- SwNumFmt aFmt( Get( static_cast<USHORT>(pWorkingNodeNum->GetLevelInListTree()) ) );
+ SwNumFmt aFmt( Get( static_cast<sal_uInt16>(pWorkingNodeNum->GetLevelInListTree()) ) );
bMakeNumStringForPhantom = aFmt.IsEnumeration() &&
SVX_NUM_NUMBER_NONE != aFmt.GetNumberingType();
@@ -773,7 +771,7 @@ String SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum,
if ( bInclSuperiorNumLabels && pWorkingNodeNum->GetLevelInListTree() > 0 )
{
- BYTE n = Get( static_cast<USHORT>(pWorkingNodeNum->GetLevelInListTree()) ).GetIncludeUpperLevels();
+ sal_uInt8 n = Get( static_cast<sal_uInt16>(pWorkingNodeNum->GetLevelInListTree()) ).GetIncludeUpperLevels();
pWorkingNodeNum = dynamic_cast<SwNodeNum*>(pWorkingNodeNum->GetParent());
// skip parents, whose list label is already contained in the actual list label.
while ( pWorkingNodeNum && n > 1 )
@@ -801,7 +799,7 @@ String SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum,
// (Kopiert die NumFormate und returnt sich selbst)
SwNumRule& SwNumRule::CopyNumRule( SwDoc* pDoc, const SwNumRule& rNumRule )
{
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
{
Set( n, rNumRule.aFmts[ n ] );
if( aFmts[ n ] && aFmts[ n ]->GetCharFmt() &&
@@ -818,20 +816,20 @@ SwNumRule& SwNumRule::CopyNumRule( SwDoc* pDoc, const SwNumRule& rNumRule )
nPoolFmtId = rNumRule.GetPoolFmtId();
nPoolHelpId = rNumRule.GetPoolHelpId();
nPoolHlpFileId = rNumRule.GetPoolHlpFileId();
- bInvalidRuleFlag = TRUE;
+ bInvalidRuleFlag = sal_True;
return *this;
}
void SwNumRule::SetSvxRule(const SvxNumRule& rNumRule, SwDoc* pDoc)
{
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
{
const SvxNumberFormat* pSvxFmt = rNumRule.Get(n);
delete aFmts[n];
aFmts[n] = pSvxFmt ? new SwNumFmt(*pSvxFmt, pDoc) : 0;
}
- bInvalidRuleFlag = TRUE;
+ bInvalidRuleFlag = sal_True;
bContinusNum = rNumRule.IsContinuousNumbering();
}
@@ -844,7 +842,7 @@ SvxNumRule SwNumRule::MakeSvxNumRule() const
NUM_RULE ?
SVX_RULETYPE_NUMBERING :
SVX_RULETYPE_OUTLINE_NUMBERING );
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
{
SwNumFmt aNumFmt = Get(n);
if(aNumFmt.GetCharFmt())
@@ -854,8 +852,7 @@ SvxNumRule SwNumRule::MakeSvxNumRule() const
return aRule;
}
-
-void SwNumRule::SetInvalidRule(BOOL bFlag)
+void SwNumRule::SetInvalidRule(sal_Bool bFlag)
{
if (bFlag)
{
@@ -885,7 +882,7 @@ void SwNumRule::SetInvalidRule(BOOL bFlag)
// change indent of all list levels by given difference
void SwNumRule::ChangeIndent( const short nDiff )
{
- for ( USHORT i = 0; i < MAXLEVEL; ++i )
+ for ( sal_uInt16 i = 0; i < MAXLEVEL; ++i )
{
SwNumFmt aTmpNumFmt( Get(i) );
@@ -918,12 +915,12 @@ void SwNumRule::ChangeIndent( const short nDiff )
Set( i, aTmpNumFmt );
}
- SetInvalidRule( TRUE );
+ SetInvalidRule( sal_True );
}
// set indent of certain list level to given value
void SwNumRule::SetIndent( const short nNewIndent,
- const USHORT nListLevel )
+ const sal_uInt16 nListLevel )
{
SwNumFmt aTmpNumFmt( Get(nListLevel) );
@@ -946,7 +943,7 @@ void SwNumRule::SetIndent( const short nNewIndent,
aTmpNumFmt.SetIndentAt( nNewIndent );
}
- SetInvalidRule( TRUE );
+ SetInvalidRule( sal_True );
}
// set indent of first list level to given value and change other list level's
@@ -989,7 +986,7 @@ void SwNumRule::Validate()
std::mem_fun( &SwList::ValidateListTree ) );
- SetInvalidRule(FALSE);
+ SetInvalidRule(sal_False);
}
@@ -1078,8 +1075,7 @@ namespace numfunc
{
return static_cast<short>(meFontItalic);
}
-
- inline sal_Unicode GetChar( BYTE p_nListLevel ) const
+ inline sal_Unicode GetChar( sal_uInt8 p_nListLevel ) const
{
if ( p_nListLevel > MAXLEVEL )
{
@@ -1290,7 +1286,7 @@ namespace numfunc
return SwDefBulletConfig::getInstance()->GetFont();
}
- sal_Unicode GetBulletChar( BYTE nLevel )
+ sal_Unicode GetBulletChar( sal_uInt8 nLevel )
{
return SwDefBulletConfig::getInstance()->GetChar( nLevel );
}
diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx
index e5edcbb15252..7f822c8c6afd 100644
--- a/sw/source/core/doc/poolfmt.cxx
+++ b/sw/source/core/doc/poolfmt.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
#include <i18npool/mslangid.hxx>
#include <unotools/localedatawrapper.hxx>
@@ -55,6 +56,7 @@
#include <editeng/scriptspaceitem.hxx>
#include <viewopt.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <fmtanchr.hxx>
#include <fmtornt.hxx>
#include <fmtsrnd.hxx>
@@ -75,27 +77,27 @@
using namespace ::com::sun::star;
-const USHORT PT_3 = 3 * 20; // 3 pt
-const USHORT PT_6 = 6 * 20; // 6 pt
-const USHORT PT_7 = 7 * 20; // 6 pt
-const USHORT PT_8 = 8 * 20; // 8 pt
-const USHORT PT_9 = 9 * 20; // 9 pt
-const USHORT PT_10 = 10 * 20; // 10 pt
-const USHORT PT_11 = 11 * 20; // 11 pt
-const USHORT PT_12 = 12 * 20; // 12 pt
-const USHORT PT_14 = 14 * 20; // 14 pt
-const USHORT PT_16 = 16 * 20; // 16 pt
-const USHORT PT_18 = 18 * 20; // 18 pt
-const USHORT PT_22 = 22 * 20; // 22 pt
-const USHORT PT_24 = 24 * 20; // 22 pt
-
-
-//const USHORT HTML_PARSPACE = ((CM_05 * 7) / 10);
+const sal_uInt16 PT_3 = 3 * 20; // 3 pt
+const sal_uInt16 PT_6 = 6 * 20; // 6 pt
+const sal_uInt16 PT_7 = 7 * 20; // 6 pt
+const sal_uInt16 PT_8 = 8 * 20; // 8 pt
+const sal_uInt16 PT_9 = 9 * 20; // 9 pt
+const sal_uInt16 PT_10 = 10 * 20; // 10 pt
+const sal_uInt16 PT_11 = 11 * 20; // 11 pt
+const sal_uInt16 PT_12 = 12 * 20; // 12 pt
+const sal_uInt16 PT_14 = 14 * 20; // 14 pt
+const sal_uInt16 PT_16 = 16 * 20; // 16 pt
+const sal_uInt16 PT_18 = 18 * 20; // 18 pt
+const sal_uInt16 PT_22 = 22 * 20; // 22 pt
+const sal_uInt16 PT_24 = 24 * 20; // 22 pt
+
+
+//const sal_uInt16 HTML_PARSPACE = ((CM_05 * 7) / 10);
#define HTML_PARSPACE GetMetricVal( CM_05 )
static const sal_Char sKomma[] = ", ";
-static const USHORT aHeadlineSizes[ 2 * MAXLEVEL ] = {
+static const sal_uInt16 aHeadlineSizes[ 2 * MAXLEVEL ] = {
// PT_16, PT_14, PT_14, PT_12, PT_12, // normal
//JP 10.12.96: jetzt soll alles prozentual sein:
115, 100, 100, 85, 85,
@@ -121,7 +123,7 @@ long lcl_GetRightMargin( SwDoc& rDoc )
void SetAllScriptItem( SfxItemSet& rSet, const SfxPoolItem& rItem )
{
rSet.Put( rItem );
- USHORT nWhCJK = 0, nWhCTL = 0;
+ sal_uInt16 nWhCJK = 0, nWhCTL = 0;
switch( rItem.Which() )
{
case RES_CHRATR_FONTSIZE:
@@ -147,19 +149,19 @@ void SetAllScriptItem( SfxItemSet& rSet, const SfxPoolItem& rItem )
rSet.Put( rItem, nWhCTL );
}
-void lcl_SetDfltFont( USHORT nFntType, SfxItemSet& rSet )
+void lcl_SetDfltFont( sal_uInt16 nFntType, SfxItemSet& rSet )
{
static struct {
- USHORT nResLngId;
- USHORT nResFntId;
+ sal_uInt16 nResLngId;
+ sal_uInt16 nResFntId;
} aArr[ 3 ] = {
{ RES_CHRATR_LANGUAGE, RES_CHRATR_FONT },
{ RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_FONT },
{ RES_CHRATR_CTL_LANGUAGE, RES_CHRATR_CTL_FONT }
};
- for( USHORT n = 0; n < 3; ++n )
+ for( sal_uInt16 n = 0; n < 3; ++n )
{
- USHORT nLng = ((SvxLanguageItem&)rSet.GetPool()->GetDefaultItem(
+ sal_uInt16 nLng = ((SvxLanguageItem&)rSet.GetPool()->GetDefaultItem(
aArr[n].nResLngId )).GetLanguage();
Font aFnt( OutputDevice::GetDefaultFont( nFntType,
nLng, DEFAULTFONT_FLAGS_ONLYONE ) );
@@ -170,13 +172,13 @@ void lcl_SetDfltFont( USHORT nFntType, SfxItemSet& rSet )
}
}
-void lcl_SetDfltFont( USHORT nLatinFntType, USHORT nCJKFntType,
- USHORT nCTLFntType, SfxItemSet& rSet )
+void lcl_SetDfltFont( sal_uInt16 nLatinFntType, sal_uInt16 nCJKFntType,
+ sal_uInt16 nCTLFntType, SfxItemSet& rSet )
{
static struct {
- USHORT nResLngId;
- USHORT nResFntId;
- USHORT nFntType;
+ sal_uInt16 nResLngId;
+ sal_uInt16 nResFntId;
+ sal_uInt16 nFntType;
} aArr[ 3 ] = {
{ RES_CHRATR_LANGUAGE, RES_CHRATR_FONT, 0 },
{ RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_FONT, 0 },
@@ -186,9 +188,9 @@ void lcl_SetDfltFont( USHORT nLatinFntType, USHORT nCJKFntType,
aArr[1].nFntType = nCJKFntType;
aArr[2].nFntType = nCTLFntType;
- for( USHORT n = 0; n < 3; ++n )
+ for( sal_uInt16 n = 0; n < 3; ++n )
{
- USHORT nLng = ((SvxLanguageItem&)rSet.GetPool()->GetDefaultItem(
+ sal_uInt16 nLng = ((SvxLanguageItem&)rSet.GetPool()->GetDefaultItem(
aArr[n].nResLngId )).GetLanguage();
Font aFnt( OutputDevice::GetDefaultFont( aArr[n].nFntType,
nLng, DEFAULTFONT_FLAGS_ONLYONE ) );
@@ -201,7 +203,7 @@ void lcl_SetDfltFont( USHORT nLatinFntType, USHORT nCJKFntType,
void lcl_SetHeadline( SwDoc* pDoc, SwTxtFmtColl* pColl,
SfxItemSet& rSet,
- USHORT nOutLvlBits, BYTE nLevel, BOOL bItalic )
+ sal_uInt16 nOutLvlBits, sal_uInt8 nLevel, sal_Bool bItalic )
{
SetAllScriptItem( rSet, SvxWeightItem( WEIGHT_BOLD, RES_CHRATR_WEIGHT ) );
SvxFontHeightItem aHItem(240, 100, RES_CHRATR_FONTSIZE);
@@ -260,11 +262,11 @@ void lcl_SetHeadline( SwDoc* pDoc, SwTxtFmtColl* pColl,
-void lcl_SetRegister( SwDoc* pDoc, SfxItemSet& rSet, USHORT nFact,
- BOOL bHeader, BOOL bTab )
+void lcl_SetRegister( SwDoc* pDoc, SfxItemSet& rSet, sal_uInt16 nFact,
+ sal_Bool bHeader, sal_Bool bTab )
{
SvxLRSpaceItem aLR( RES_LR_SPACE );
- USHORT nLeft = nFact ? GetMetricVal( CM_05 ) * nFact : 0;
+ sal_uInt16 nLeft = nFact ? GetMetricVal( CM_05 ) * nFact : 0;
aLR.SetTxtLeft( nLeft );
rSet.Put( aLR );
@@ -288,13 +290,13 @@ void lcl_SetRegister( SwDoc* pDoc, SfxItemSet& rSet, USHORT nFact,
void lcl_SetNumBul( SwDoc* pDoc, SwTxtFmtColl* pColl,
SfxItemSet& rSet,
- USHORT nNxt, SwTwips nEZ, SwTwips nLeft,
+ sal_uInt16 nNxt, SwTwips nEZ, SwTwips nLeft,
SwTwips nUpper, SwTwips nLower )
{
SvxLRSpaceItem aLR( RES_LR_SPACE ); SvxULSpaceItem aUL( RES_UL_SPACE );
- aLR.SetTxtFirstLineOfst( USHORT(nEZ) ); aLR.SetTxtLeft( USHORT(nLeft) );
- aUL.SetUpper( USHORT(nUpper) ); aUL.SetLower( USHORT(nLower) );
+ aLR.SetTxtFirstLineOfst( sal_uInt16(nEZ) ); aLR.SetTxtLeft( sal_uInt16(nLeft) );
+ aUL.SetUpper( sal_uInt16(nUpper) ); aUL.SetLower( sal_uInt16(nLower) );
rSet.Put( aLR );
rSet.Put( aUL );
@@ -309,14 +311,14 @@ void lcl_SetNumBul( SwDoc* pDoc, SwTxtFmtColl* pColl,
// Ist der String-Pointer definiert, dann erfrage nur die
// Beschreibung der Attribute, !! es legt keine Vorlage an !!
-SvxFrameDirection GetDefaultFrameDirection(ULONG nLanguage)
+SvxFrameDirection GetDefaultFrameDirection(sal_uLong nLanguage)
{
SvxFrameDirection eResult = (MsLangId::isRightToLeft( static_cast<LanguageType>(nLanguage)) ?
FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP);
return eResult;
}
-SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
+SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage )
{
OSL_ENSURE(
(RES_POOLCOLL_TEXT_BEGIN <= nId && nId < RES_POOLCOLL_TEXT_END) ||
@@ -328,8 +330,8 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
"Falsche AutoFormat-Id" );
SwTxtFmtColl* pNewColl;
- USHORT nOutLvlBits = 0;
- for( USHORT n = 0; n < pTxtFmtCollTbl->Count(); ++n )
+ sal_uInt16 nOutLvlBits = 0;
+ for( sal_uInt16 n = 0; n < pTxtFmtCollTbl->Count(); ++n )
{
if( nId == ( pNewColl = (*pTxtFmtCollTbl)[ n ] )->GetPoolFmtId() )
{
@@ -341,7 +343,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
}
// bis hierher nicht gefunden -> neu anlegen
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
if( RES_POOLCOLL_TEXT_BEGIN <= nId && nId < RES_POOLCOLL_TEXT_END )
nResId = RC_POOLCOLL_TEXT_BEGIN - RES_POOLCOLL_TEXT_BEGIN;
else if (RES_POOLCOLL_LISTS_BEGIN <= nId && nId < RES_POOLCOLL_LISTS_END)
@@ -364,7 +366,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
// ein Set fuer alle zusetzenden Attribute
SwAttrSet aSet( GetAttrPool(), aTxtFmtCollSetRange );
- USHORT nParent = GetPoolParent( nId );
+ sal_uInt16 nParent = GetPoolParent( nId );
{
@@ -389,7 +391,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
/* koreans do not like SvxScriptItem(TRUE) */
if (bRegardLanguage)
{
- ULONG nAppLanguage = GetAppLanguage();
+ sal_uLong nAppLanguage = GetAppLanguage();
if (GetDefaultFrameDirection(nAppLanguage) ==
FRMDIR_HORI_RIGHT_TOP)
{
@@ -398,7 +400,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
}
if (nAppLanguage == LANGUAGE_KOREAN)
{
- SvxScriptSpaceItem aScriptSpace(FALSE, RES_PARATR_SCRIPTSPACE);
+ SvxScriptSpaceItem aScriptSpace(sal_False, RES_PARATR_SCRIPTSPACE);
aSet.Put(aScriptSpace);
}
}
@@ -459,7 +461,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
case RES_POOLCOLL_HEADLINE_BASE: // Basis Ueberschrift
{
- static const USHORT aFntInit[] = {
+ static const sal_uInt16 aFntInit[] = {
DEFAULTFONT_LATIN_HEADING, RES_CHRATR_FONT,
RES_CHRATR_LANGUAGE, LANGUAGE_ENGLISH_US,
DEFAULTFONT_CJK_HEADING, RES_CHRATR_CJK_FONT,
@@ -469,9 +471,9 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
0
};
- for( const USHORT* pArr = aFntInit; *pArr; pArr += 4 )
+ for( const sal_uInt16* pArr = aFntInit; *pArr; pArr += 4 )
{
- USHORT nLng = ((SvxLanguageItem&)GetDefault( *(pArr+2) )).GetLanguage();
+ sal_uInt16 nLng = ((SvxLanguageItem&)GetDefault( *(pArr+2) )).GetLanguage();
if( LANGUAGE_DONTKNOW == nLng )
nLng = *(pArr+3);
@@ -487,7 +489,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
SvxULSpaceItem aUL( PT_12, PT_6, RES_UL_SPACE );
if( get(IDocumentSettingAccess::HTML_MODE) )
aUL.SetLower( HTML_PARSPACE );
- aSet.Put( SvxFmtKeepItem( TRUE, RES_KEEP ));
+ aSet.Put( SvxFmtKeepItem( sal_True, RES_KEEP ));
pNewColl->SetNextTxtFmtColl( *GetTxtCollFromPool( RES_POOLCOLL_TEXT ));
@@ -504,40 +506,40 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
case RES_POOLCOLL_SIGNATURE: // Unterschrift
case RES_POOLCOLL_TABLE: // Tabelle-Inhalt
{
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
case RES_POOLCOLL_HEADLINE1: // Ueberschrift 1
- lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 0, FALSE );
+ lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 0, sal_False );
break;
case RES_POOLCOLL_HEADLINE2: // Ueberschrift 2
- lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 1, TRUE );
+ lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 1, sal_True );
break;
case RES_POOLCOLL_HEADLINE3: // Ueberschrift 3
- lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 2, FALSE );
+ lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 2, sal_False );
break;
case RES_POOLCOLL_HEADLINE4: // Ueberschrift 4
- lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 3, TRUE );
+ lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 3, sal_True );
break;
case RES_POOLCOLL_HEADLINE5: // Ueberschrift 5
- lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 4, FALSE );
+ lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 4, sal_False );
break;
case RES_POOLCOLL_HEADLINE6: // Ueberschrift 6
- lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 5, FALSE );
+ lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 5, sal_False );
break;
case RES_POOLCOLL_HEADLINE7: // Ueberschrift 7
- lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 6, FALSE );
+ lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 6, sal_False );
break;
case RES_POOLCOLL_HEADLINE8: // Ueberschrift 8
- lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 7, FALSE );
+ lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 7, sal_False );
break;
case RES_POOLCOLL_HEADLINE9: // Ueberschrift 9
- lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 8, FALSE );
+ lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 8, sal_False );
break;
case RES_POOLCOLL_HEADLINE10: // Ueberschrift 10
- lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 9, FALSE );
+ lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 9, sal_False );
break;
@@ -551,7 +553,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
case RES_POOLCOLL_FOOTERL:
case RES_POOLCOLL_FOOTERR:
{
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
long nRightMargin = lcl_GetRightMargin( *this );
@@ -568,7 +570,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
{
SetAllScriptItem( aSet, SvxWeightItem( WEIGHT_BOLD, RES_CHRATR_WEIGHT ) );
aSet.Put( SvxAdjustItem( SVX_ADJUST_CENTER, RES_PARATR_ADJUST ) );
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
@@ -581,7 +583,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
aLR.SetTxtLeft( GetMetricVal( CM_05 ));
SetAllScriptItem( aSet, SvxFontHeightItem( PT_10, 100, RES_CHRATR_FONTSIZE ) );
aSet.Put( aLR );
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
@@ -592,7 +594,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
aSet.Put( aUL );
SetAllScriptItem( aSet, SvxPostureItem( ITALIC_NORMAL, RES_CHRATR_POSTURE ) );
SetAllScriptItem( aSet, SvxFontHeightItem( PT_10, 100, RES_CHRATR_FONTSIZE ) );
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
@@ -608,7 +610,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
{
SvxULSpaceItem aUL( RES_UL_SPACE ); aUL.SetLower( PT_3 );
aSet.Put( aUL );
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
@@ -622,117 +624,117 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
SvxULSpaceItem aUL( RES_UL_SPACE ); aUL.SetLower( PT_3 );
aSet.Put( aUL );
}
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
// Benutzer-Verzeichnisse:
case RES_POOLCOLL_TOX_USERH: // Header
- lcl_SetRegister( this, aSet, 0, TRUE, FALSE );
+ lcl_SetRegister( this, aSet, 0, sal_True, sal_False );
{
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
case RES_POOLCOLL_TOX_USER1: // 1. Ebene
- lcl_SetRegister( this, aSet, 0, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 0, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_USER2: // 2. Ebene
- lcl_SetRegister( this, aSet, 1, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 1, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_USER3: // 3. Ebene
- lcl_SetRegister( this, aSet, 2, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 2, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_USER4: // 4. Ebene
- lcl_SetRegister( this, aSet, 3, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 3, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_USER5: // 5. Ebene
- lcl_SetRegister( this, aSet, 4, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 4, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_USER6: // 6. Ebene
- lcl_SetRegister( this, aSet, 5, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 5, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_USER7: // 7. Ebene
- lcl_SetRegister( this, aSet, 6, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 6, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_USER8: // 8. Ebene
- lcl_SetRegister( this, aSet, 7, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 7, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_USER9: // 9. Ebene
- lcl_SetRegister( this, aSet, 8, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 8, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_USER10: // 10. Ebene
- lcl_SetRegister( this, aSet, 9, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 9, sal_False, sal_True );
break;
// Index-Verzeichnisse
case RES_POOLCOLL_TOX_IDXH: // Header
- lcl_SetRegister( this, aSet, 0, TRUE, FALSE );
+ lcl_SetRegister( this, aSet, 0, sal_True, sal_False );
{
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
case RES_POOLCOLL_TOX_IDX1: // 1. Ebene
- lcl_SetRegister( this, aSet, 0, FALSE, FALSE );
+ lcl_SetRegister( this, aSet, 0, sal_False, sal_False );
break;
case RES_POOLCOLL_TOX_IDX2: // 2. Ebene
- lcl_SetRegister( this, aSet, 1, FALSE, FALSE );
+ lcl_SetRegister( this, aSet, 1, sal_False, sal_False );
break;
case RES_POOLCOLL_TOX_IDX3: // 3. Ebene
- lcl_SetRegister( this, aSet, 2, FALSE, FALSE );
+ lcl_SetRegister( this, aSet, 2, sal_False, sal_False );
break;
case RES_POOLCOLL_TOX_IDXBREAK: // Trenner
- lcl_SetRegister( this, aSet, 0, FALSE, FALSE );
+ lcl_SetRegister( this, aSet, 0, sal_False, sal_False );
break;
// Inhalts-Verzeichnisse
case RES_POOLCOLL_TOX_CNTNTH: // Header
- lcl_SetRegister( this, aSet, 0, TRUE, FALSE );
+ lcl_SetRegister( this, aSet, 0, sal_True, sal_False );
{
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
case RES_POOLCOLL_TOX_CNTNT1: // 1. Ebene
- lcl_SetRegister( this, aSet, 0, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 0, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_CNTNT2: // 2. Ebene
- lcl_SetRegister( this, aSet, 1, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 1, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_CNTNT3: // 3. Ebene
- lcl_SetRegister( this, aSet, 2, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 2, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_CNTNT4: // 4. Ebene
- lcl_SetRegister( this, aSet, 3, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 3, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_CNTNT5: // 5. Ebene
- lcl_SetRegister( this, aSet, 4, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 4, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_CNTNT6: // 6. Ebene
- lcl_SetRegister( this, aSet, 5, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 5, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_CNTNT7: // 7. Ebene
- lcl_SetRegister( this, aSet, 6, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 6, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_CNTNT8: // 8. Ebene
- lcl_SetRegister( this, aSet, 7, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 7, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_CNTNT9: // 9. Ebene
- lcl_SetRegister( this, aSet, 8, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 8, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_CNTNT10: // 10. Ebene
- lcl_SetRegister( this, aSet, 9, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 9, sal_False, sal_True );
break;
case RES_POOLCOLL_TOX_ILLUSH:
case RES_POOLCOLL_TOX_OBJECTH:
case RES_POOLCOLL_TOX_TABLESH:
case RES_POOLCOLL_TOX_AUTHORITIESH:
- lcl_SetRegister( this, aSet, 0, TRUE, FALSE );
+ lcl_SetRegister( this, aSet, 0, sal_True, sal_False );
{
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
@@ -740,7 +742,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
case RES_POOLCOLL_TOX_OBJECT1:
case RES_POOLCOLL_TOX_TABLES1:
case RES_POOLCOLL_TOX_AUTHORITIES1:
- lcl_SetRegister( this, aSet, 0, FALSE, TRUE );
+ lcl_SetRegister( this, aSet, 0, sal_False, sal_True );
break;
@@ -1001,7 +1003,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
aBox.SetLine( &aNew, BOX_LINE_BOTTOM );
aSet.Put( aBox );
- aSet.Put( SwParaConnectBorderItem( FALSE ) );
+ aSet.Put( SwParaConnectBorderItem( sal_False ) );
SetAllScriptItem( aSet, SvxFontHeightItem(120, 100, RES_CHRATR_FONTSIZE) );
SvxULSpaceItem aUL( RES_UL_SPACE );
@@ -1012,7 +1014,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
}
aUL.SetLower( HTML_PARSPACE );
aSet.Put( aUL);
- SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
+ SwFmtLineNumber aLN; aLN.SetCountLines( sal_False );
aSet.Put( aLN );
}
break;
@@ -1054,7 +1056,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
// pruefe, ob diese "Auto-Collection" in Dokument schon/noch
// benutzt wird
-bool SwDoc::IsPoolTxtCollUsed( USHORT nId ) const
+bool SwDoc::IsPoolTxtCollUsed( sal_uInt16 nId ) const
{
OSL_ENSURE(
(RES_POOLCOLL_TEXT_BEGIN <= nId && nId < RES_POOLCOLL_TEXT_END) ||
@@ -1066,32 +1068,32 @@ bool SwDoc::IsPoolTxtCollUsed( USHORT nId ) const
"Falsche AutoFormat-Id" );
SwTxtFmtColl* pNewColl = 0;
- BOOL bFnd = FALSE;
- for( USHORT n = 0; !bFnd && n < pTxtFmtCollTbl->Count(); ++n )
+ sal_Bool bFnd = sal_False;
+ for( sal_uInt16 n = 0; !bFnd && n < pTxtFmtCollTbl->Count(); ++n )
{
pNewColl = (*pTxtFmtCollTbl)[ n ];
if( nId == pNewColl->GetPoolFmtId() )
- bFnd = TRUE;
+ bFnd = sal_True;
}
if( !bFnd || !pNewColl->GetDepends() )
- return FALSE;
+ return sal_False;
- SwAutoFmtGetDocNode aGetHt( &aNodes );
+ SwAutoFmtGetDocNode aGetHt( &GetNodes() );
return !pNewColl->GetInfo( aGetHt );
}
// Gebe das "Auto[matische]-Format" mit der Id zurueck. Existiert
// es noch nicht, dann erzeuge es
-SwFmt* SwDoc::GetFmtFromPool( USHORT nId )
+SwFmt* SwDoc::GetFmtFromPool( sal_uInt16 nId )
{
SwFmt *pNewFmt = 0;
SwFmt *pDeriveFmt = 0;
SvPtrarr* pArray[ 2 ];
- USHORT nArrCnt = 1, nRCId = 0;
- USHORT* pWhichRange = 0;
+ sal_uInt16 nArrCnt = 1, nRCId = 0;
+ sal_uInt16* pWhichRange = 0;
switch( nId & (COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID) )
{
@@ -1142,7 +1144,7 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId )
OSL_ENSURE( nRCId, "ungueltige Id" );
while( nArrCnt-- )
- for( USHORT n = 0; n < (*pArray[nArrCnt]).Count(); ++n )
+ for( sal_uInt16 n = 0; n < (*pArray[nArrCnt]).Count(); ++n )
if( nId == ( pNewFmt = (SwFmt*)(*pArray[ nArrCnt ] )[ n ] )->
GetPoolFmtId() )
{
@@ -1154,30 +1156,27 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId )
SwAttrSet aSet( GetAttrPool(), pWhichRange );
{
- BOOL bIsModified = IsModified();
+ sal_Bool bIsModified = IsModified();
- BOOL bDoesUndo = DoesUndo();
- DoUndo(FALSE);
- switch (nId & (COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID) )
{
- case POOLGRP_CHARFMT:
- pNewFmt = _MakeCharFmt( aNm, pDeriveFmt, FALSE, TRUE );
-
- break;
- case POOLGRP_FRAMEFMT:
- pNewFmt = _MakeFrmFmt(aNm, pDeriveFmt, FALSE, TRUE );
-
- break;
- default:
- break;
+ ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
+ switch (nId & (COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID) )
+ {
+ case POOLGRP_CHARFMT:
+ pNewFmt = _MakeCharFmt(aNm, pDeriveFmt, sal_False, sal_True);
+ break;
+ case POOLGRP_FRAMEFMT:
+ pNewFmt = _MakeFrmFmt(aNm, pDeriveFmt, sal_False, sal_True);
+ break;
+ default:
+ break;
+ }
}
- DoUndo(bDoesUndo);
-
if( !bIsModified )
ResetModified();
pNewFmt->SetPoolFmtId( nId );
- pNewFmt->SetAuto( FALSE ); // kein Auto-Format
+ pNewFmt->SetAuto( sal_False ); // kein Auto-Format
}
switch( nId )
@@ -1338,7 +1337,7 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId )
aSet.Put( SwFmtAnchor( FLY_AT_PAGE ));
aSet.Put( SwFmtHoriOrient( 0, text::HoriOrientation::CENTER, text::RelOrientation::FRAME ));
aSet.Put( SwFmtVertOrient( 0, text::VertOrientation::CENTER, text::RelOrientation::FRAME ));
- aSet.Put( SvxOpaqueItem( FALSE ));
+ aSet.Put( SvxOpaqueItem( sal_False ));
aSet.Put( SwFmtSurround( SURROUND_THROUGHT ));
}
break;
@@ -1350,11 +1349,11 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId )
aSet.Put( SvxLRSpaceItem( 114, 114, 0, 0, RES_LR_SPACE ) );
SvxProtectItem aProtect( RES_PROTECT );
- aProtect.SetSizeProtect( TRUE );
- aProtect.SetPosProtect( TRUE );
+ aProtect.SetSizeProtect( sal_True );
+ aProtect.SetPosProtect( sal_True );
aSet.Put( aProtect );
- pNewFmt->SetAutoUpdateFmt( TRUE );
+ pNewFmt->SetAutoUpdateFmt( sal_True );
}
break;
}
@@ -1379,12 +1378,12 @@ SwCharFmt* SwDoc::GetCharFmtFromPool( sal_uInt16 nId )
// pruefe, ob diese "Auto-Collection" in Dokument schon/noch
// benutzt wird
-bool SwDoc::IsPoolFmtUsed( USHORT nId ) const
+bool SwDoc::IsPoolFmtUsed( sal_uInt16 nId ) const
{
SwFmt *pNewFmt = 0;
const SvPtrarr* pArray[ 2 ];
- USHORT nArrCnt = 1;
- BOOL bFnd = TRUE;
+ sal_uInt16 nArrCnt = 1;
+ sal_Bool bFnd = sal_True;
if( RES_POOLCHR_BEGIN <= nId && nId < RES_POOLCHR_END )
{
@@ -1398,18 +1397,18 @@ bool SwDoc::IsPoolFmtUsed( USHORT nId ) const
}
else
{
- OSL_ENSURE( FALSE, "ungueltige Id" );
- bFnd = FALSE;
+ OSL_ENSURE( sal_False, "ungueltige Id" );
+ bFnd = sal_False;
}
if( bFnd )
{
- bFnd = FALSE;
+ bFnd = sal_False;
while( nArrCnt-- && !bFnd )
- for( USHORT n = 0; !bFnd && n < (*pArray[nArrCnt]).Count(); ++n )
+ for( sal_uInt16 n = 0; !bFnd && n < (*pArray[nArrCnt]).Count(); ++n )
if( nId == ( pNewFmt = (SwFmt*)(*pArray[ nArrCnt ] )[ n ] )->
GetPoolFmtId() )
- bFnd = TRUE;
+ bFnd = sal_True;
}
// nicht gefunden oder keine Abhaengigen ?
@@ -1417,11 +1416,11 @@ bool SwDoc::IsPoolFmtUsed( USHORT nId ) const
{
// dann teste mal, ob es abhaengige ContentNodes im Nodes Array gibt
// (auch indirekte fuer Format-Ableitung! )
- SwAutoFmtGetDocNode aGetHt( &aNodes );
+ SwAutoFmtGetDocNode aGetHt( &GetNodes() );
bFnd = !pNewFmt->GetInfo( aGetHt );
}
else
- bFnd = FALSE;
+ bFnd = sal_False;
return bFnd;
}
@@ -1447,7 +1446,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
"Falsche AutoFormat-Id" );
SwPageDesc *pNewPgDsc;
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < aPageDescs.Count(); ++n )
if( nId == ( pNewPgDsc = aPageDescs[ n ] )->GetPoolFmtId() )
@@ -1465,12 +1464,12 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
ResId aResId( sal_uInt32(RC_POOLPAGEDESC_BEGIN + nId - RES_POOLPAGE_BEGIN), *pSwResMgr );
String aNm( aResId );
{
- BOOL bIsModified = IsModified();
+ sal_Bool bIsModified = IsModified();
- BOOL bDoesUndo = DoesUndo();
- DoUndo(FALSE);
- n = MakePageDesc( aNm, 0, bRegardLanguage );
- DoUndo(bDoesUndo);
+ {
+ ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
+ n = MakePageDesc( aNm, 0, bRegardLanguage );
+ }
pNewPgDsc = aPageDescs[ n ];
pNewPgDsc->SetPoolFmtId( nId );
@@ -1483,11 +1482,11 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
aLR.SetLeft( GetMetricVal( CM_1 ) * 2 );
aLR.SetRight( aLR.GetLeft() );
SvxULSpaceItem aUL( RES_UL_SPACE );
- aUL.SetUpper( (USHORT)aLR.GetLeft() );
- aUL.SetLower( (USHORT)aLR.GetLeft() );
+ aUL.SetUpper( (sal_uInt16)aLR.GetLeft() );
+ aUL.SetLower( (sal_uInt16)aLR.GetLeft() );
SwAttrSet aSet( GetAttrPool(), aPgFrmFmtSetRange );
- BOOL bSetLeft = TRUE;
+ sal_Bool bSetLeft = sal_True;
switch( nId )
{
@@ -1520,7 +1519,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
lcl_GetStdPgSize( this, aSet );
aSet.Put( aLR );
aSet.Put( aUL );
- bSetLeft = FALSE;
+ bSetLeft = sal_False;
if( pNewPgDsc )
pNewPgDsc->SetUseOn( nsUseOnPage::PD_LEFT );
}
@@ -1530,7 +1529,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
lcl_GetStdPgSize( this, aSet );
aSet.Put( aLR );
aSet.Put( aUL );
- bSetLeft = FALSE;
+ bSetLeft = sal_False;
if( pNewPgDsc )
pNewPgDsc->SetUseOn( nsUseOnPage::PD_RIGHT );
}
@@ -1549,7 +1548,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
if( pNewPgDsc )
{
pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
- pNewPgDsc->SetLandscape( TRUE );
+ pNewPgDsc->SetLandscape( sal_True );
}
}
break;
@@ -1558,8 +1557,8 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
{
lcl_GetStdPgSize( this, aSet );
aLR.SetRight( GetMetricVal( CM_1 ));
- aUL.SetUpper( (USHORT)aLR.GetRight() );
- aUL.SetLower( (USHORT)aLR.GetRight() );
+ aUL.SetUpper( (sal_uInt16)aLR.GetRight() );
+ aUL.SetLower( (sal_uInt16)aLR.GetRight() );
aSet.Put( aLR );
aSet.Put( aUL );
@@ -1595,7 +1594,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
if( pNewPgDsc )
{
pNewPgDsc->SetUseOn( nsUseOnPage::PD_ALL );
- pNewPgDsc->SetLandscape( TRUE );
+ pNewPgDsc->SetLandscape( sal_True );
}
}
break;
@@ -1613,13 +1612,13 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
return pNewPgDsc;
}
-SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
+SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId )
{
OSL_ENSURE( RES_POOLNUMRULE_BEGIN <= nId && nId < RES_POOLNUMRULE_END,
"Falsche AutoFormat-Id" );
SwNumRule* pNewRule;
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < GetNumRuleTbl().Count(); ++n )
if( nId == ( pNewRule = GetNumRuleTbl()[ n ] )->GetPoolFmtId() )
@@ -1643,13 +1642,13 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
= numfunc::GetDefaultPositionAndSpaceMode(); //#i89178#
// <--
{
- BOOL bIsModified = IsModified();
+ sal_Bool bIsModified = IsModified();
- n = MakeNumRule( aNm, 0, FALSE, eNumberFormatPositionAndSpaceMode );
+ n = MakeNumRule( aNm, 0, sal_False, eNumberFormatPositionAndSpaceMode );
pNewRule = GetNumRuleTbl()[ n ];
pNewRule->SetPoolFmtId( nId );
- pNewRule->SetAutoRule( FALSE );
+ pNewRule->SetAutoRule( sal_False );
if( RES_POOLNUMRULE_NUM1 <= nId && nId <= RES_POOLNUMRULE_NUM5 )
pNumCFmt = GetCharFmtFromPool( RES_POOLCHR_NUM_LEVEL );
@@ -1674,22 +1673,22 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
aFmt.SetIncludeUpperLevels( 1 );
aFmt.SetSuffix( aDotStr );
- static const USHORT aAbsSpace[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpace[ MAXLEVEL ] =
{
// cm: 0,5 1,0 1,5 2,0 2,5 3,0 3,5 4,0 4,5 5,0
283, 567, 850, 1134, 1417, 1701, 1984, 2268, 2551, 2835
};
#ifdef USE_MEASUREMENT
- static const USHORT aAbsSpaceInch[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpaceInch[ MAXLEVEL ] =
{
283, 567, 850, 1134, 1417, 1701, 1984, 2268, 2551, 2835
};
- const USHORT* pArr = MEASURE_METRIC ==
+ const sal_uInt16* pArr = MEASURE_METRIC ==
SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
- const USHORT* pArr = aAbsSpace;
+ const sal_uInt16* pArr = aAbsSpace;
#endif
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
@@ -1721,7 +1720,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
case RES_POOLNUMRULE_NUM2:
{
- static const USHORT aAbsSpace[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpace[ MAXLEVEL ] =
{
283, 283, 567, 709, // 0.50, 0.50, 1.00, 1.25
850, 1021, 1304, 1474, // 1.50, 1.80, 2.30, 2.60
@@ -1729,19 +1728,19 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
};
#ifdef USE_MEASUREMENT
- static const USHORT aAbsSpaceInch[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpaceInch[ MAXLEVEL ] =
{
385, 385, 770, 963,
1155, 1386, 1771, 2002,
2156, 2387
};
- const USHORT* pArr = MEASURE_METRIC ==
+ const sal_uInt16* pArr = MEASURE_METRIC ==
SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
- const USHORT* pArr = aAbsSpace;
+ const sal_uInt16* pArr = aAbsSpace;
#endif
SwNumFmt aFmt;
@@ -1755,7 +1754,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
aFmt.SetLabelFollowedBy( SvxNumberFormat::LISTTAB );
}
- USHORT nSpace = 0;
+ sal_uInt16 nSpace = 0;
for( n = 0; n < MAXLEVEL; ++n )
{
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
@@ -1784,7 +1783,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
aFmt.SetCharFmt( pNumCFmt );
aFmt.SetIncludeUpperLevels( 1 );
- USHORT nOffs = GetMetricVal( CM_1 ) * 3;
+ sal_uInt16 nOffs = GetMetricVal( CM_1 ) * 3;
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
@@ -1823,22 +1822,22 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
aFmt.SetIncludeUpperLevels( 1 );
aFmt.SetSuffix( aDotStr );
- static const USHORT aAbsSpace[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpace[ MAXLEVEL ] =
{
// cm: 0,5 1,0 1,5 2,0 2,5 3,0 3,5 4,0 4,5 5,0
283, 567, 850, 1134, 1417, 1701, 1984, 2268, 2551, 2835
};
#ifdef USE_MEASUREMENT
- static const USHORT aAbsSpaceInch[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpaceInch[ MAXLEVEL ] =
{
283, 567, 850, 1134, 1417, 1701, 1984, 2268, 2551, 2835
};
- const USHORT* pArr = MEASURE_METRIC ==
+ const sal_uInt16* pArr = MEASURE_METRIC ==
SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
- const USHORT* pArr = aAbsSpace;
+ const sal_uInt16* pArr = aAbsSpace;
#endif
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
@@ -1872,7 +1871,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
case RES_POOLNUMRULE_NUM5:
{
// [ First, LSpace ]
- static const USHORT aAbsSpace0to2[] =
+ static const sal_uInt16 aAbsSpace0to2[] =
{
227, 227, // 0.40, 0.40,
369, 624, // 0.65, 1.10,
@@ -1880,18 +1879,18 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
};
#ifdef USE_MEASUREMENT
- static const USHORT aAbsSpaceInch0to2[] =
+ static const sal_uInt16 aAbsSpaceInch0to2[] =
{
308, 308,
501, 847,
347, 1194
};
- const USHORT* pArr0to2 = MEASURE_METRIC ==
+ const sal_uInt16* pArr0to2 = MEASURE_METRIC ==
SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace0to2
: aAbsSpaceInch0to2;
#else
- const USHORT* pArr0to2 = aAbsSpace0to2;
+ const sal_uInt16* pArr0to2 = aAbsSpace0to2;
#endif
SwNumFmt aFmt;
@@ -1962,7 +1961,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
aFmt.SetCharFmt( pBullCFmt );
aFmt.SetBulletFont( &numfunc::GetDefBulletFont() );
aFmt.SetBulletChar( cBulletChar );
- USHORT nOffs = GetMetricVal( CM_01 ) * 4,
+ sal_uInt16 nOffs = GetMetricVal( CM_01 ) * 4,
nOffs2 = GetMetricVal( CM_1 ) * 2;
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
@@ -2006,22 +2005,22 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
aFmt.SetBulletFont( &numfunc::GetDefBulletFont() );
aFmt.SetBulletChar( cBulletChar );
- static const USHORT aAbsSpace[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpace[ MAXLEVEL ] =
{
// cm: 0,4 0,8 1,2 1,6 2,0 2,4 2,8 3,2 3,6 4,0
227, 454, 680, 907, 1134, 1361, 1587, 1814, 2041, 2268
};
#ifdef USE_MEASUREMENT
- static const USHORT aAbsSpaceInch[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpaceInch[ MAXLEVEL ] =
{
227, 454, 680, 907, 1134, 1361, 1587, 1814, 2041, 2268
};
- const USHORT* pArr = MEASURE_METRIC ==
+ const sal_uInt16* pArr = MEASURE_METRIC ==
SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
- const USHORT* pArr = aAbsSpace;
+ const sal_uInt16* pArr = aAbsSpace;
#endif
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
@@ -2062,22 +2061,22 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
aFmt.SetBulletFont( &numfunc::GetDefBulletFont() );
aFmt.SetBulletChar( 0x2013 );
- static const USHORT aAbsSpace[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpace[ MAXLEVEL ] =
{
// cm: 0,3 0,6 0,9 1,2 1,5 1,8 2,1 2,4 2,7 3,0
170, 340, 510, 680, 850, 1020, 1191, 1361, 1531, 1701
};
#ifdef USE_MEASUREMENT
- static const USHORT aAbsSpaceInch[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpaceInch[ MAXLEVEL ] =
{
170, 340, 510, 680, 850, 1020, 1191, 1361, 1531, 1701
};
- const USHORT* pArr = MEASURE_METRIC ==
+ const sal_uInt16* pArr = MEASURE_METRIC ==
SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
- const USHORT* pArr = aAbsSpace;
+ const sal_uInt16* pArr = aAbsSpace;
#endif
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
@@ -2118,7 +2117,7 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
aFmt.SetIncludeUpperLevels( 1 );
aFmt.SetBulletFont( &numfunc::GetDefBulletFont() );
- USHORT nOffs = GetMetricVal( CM_01 ) * 4;
+ sal_uInt16 nOffs = GetMetricVal( CM_01 ) * 4;
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
@@ -2159,22 +2158,22 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
aFmt.SetIncludeUpperLevels( 1 );
aFmt.SetBulletFont( &numfunc::GetDefBulletFont() );
- static const USHORT aAbsSpace[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpace[ MAXLEVEL ] =
{
// cm: 0,4 0,8 1,2 1,6 2,0 2,4 2,8 3,2 3,6 4,0
227, 454, 680, 907, 1134, 1361, 1587, 1814, 2041, 2268
};
#ifdef USE_MEASUREMENT
- static const USHORT aAbsSpaceInch[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpaceInch[ MAXLEVEL ] =
{
227, 454, 680, 907, 1134, 1361, 1587, 1814, 2041, 2268
};
- const USHORT* pArr = MEASURE_METRIC ==
+ const sal_uInt16* pArr = MEASURE_METRIC ==
SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
- const USHORT* pArr = aAbsSpace;
+ const sal_uInt16* pArr = aAbsSpace;
#endif
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
@@ -2222,22 +2221,22 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
aFmt.SetBulletChar( 0x2717 );
aFmt.SetBulletFont( &numfunc::GetDefBulletFont() );
- static const USHORT aAbsSpace[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpace[ MAXLEVEL ] =
{
// cm: 0,4 0,8 1,2 1,6 2,0 2,4 2,8 3,2 3,6 4,0
227, 454, 680, 907, 1134, 1361, 1587, 1814, 2041, 2268
};
#ifdef USE_MEASUREMENT
- static const USHORT aAbsSpaceInch[ MAXLEVEL ] =
+ static const sal_uInt16 aAbsSpaceInch[ MAXLEVEL ] =
{
227, 454, 680, 907, 1134, 1361, 1587, 1814, 2041, 2268
};
- const USHORT* pArr = MEASURE_METRIC ==
+ const sal_uInt16* pArr = MEASURE_METRIC ==
SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? aAbsSpace
: aAbsSpaceInch;
#else
- const USHORT* pArr = aAbsSpace;
+ const sal_uInt16* pArr = aAbsSpace;
#endif
if ( eNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
@@ -2275,26 +2274,26 @@ SwNumRule* SwDoc::GetNumRuleFromPool( USHORT nId )
// pruefe, ob diese "Auto-Collection" in Dokument schon/noch
// benutzt wird
-bool SwDoc::IsPoolPageDescUsed( USHORT nId ) const
+bool SwDoc::IsPoolPageDescUsed( sal_uInt16 nId ) const
{
OSL_ENSURE( RES_POOLPAGE_BEGIN <= nId && nId < RES_POOLPAGE_END,
"Falsche AutoFormat-Id" );
SwPageDesc *pNewPgDsc = 0;
- BOOL bFnd = FALSE;
- for( USHORT n = 0; !bFnd && n < aPageDescs.Count(); ++n )
+ sal_Bool bFnd = sal_False;
+ for( sal_uInt16 n = 0; !bFnd && n < aPageDescs.Count(); ++n )
{
pNewPgDsc = aPageDescs[ n ];
if( nId == pNewPgDsc->GetPoolFmtId() )
- bFnd = TRUE;
+ bFnd = sal_True;
}
// nicht gefunden oder keine Abhaengigen ?
if( !bFnd || !pNewPgDsc->GetDepends() ) // ??????
- return FALSE;
+ return sal_False;
// dann teste mal, ob es abhaengige ContentNodes im Nodes Array gibt
// (auch indirekte fuer Format-Ableitung! )
- SwAutoFmtGetDocNode aGetHt( &aNodes );
+ SwAutoFmtGetDocNode aGetHt( &GetNodes() );
return !pNewPgDsc->GetInfo( aGetHt );
}
@@ -2303,7 +2302,7 @@ sal_Bool SwDoc::IsUsed( const SwModify& rModify ) const
{
// dann teste mal, ob es abhaengige ContentNodes im Nodes Array gibt
// (auch indirekte fuer Format-Ableitung! )
- SwAutoFmtGetDocNode aGetHt( &aNodes );
+ SwAutoFmtGetDocNode aGetHt( &GetNodes() );
return !rModify.GetInfo( aGetHt );
}
@@ -2319,12 +2318,12 @@ sal_Bool SwDoc::IsUsed( const SwNumRule& rRule ) const
// Suche die Position vom Vorlagen-Namen. Ist nicht vorhanden
// dann fuege neu ein
-USHORT SwDoc::SetDocPattern( const String& rPatternName )
+sal_uInt16 SwDoc::SetDocPattern( const String& rPatternName )
{
OSL_ENSURE( rPatternName.Len(), "kein Dokument-Vorlagenname" );
- USHORT nNewPos = aPatternNms.Count();
- for( USHORT n = 0; n < aPatternNms.Count(); ++n )
+ sal_uInt16 nNewPos = aPatternNms.Count();
+ for( sal_uInt16 n = 0; n < aPatternNms.Count(); ++n )
if( !aPatternNms[n] )
{
if( nNewPos == aPatternNms.Count() )
@@ -2342,9 +2341,9 @@ USHORT SwDoc::SetDocPattern( const String& rPatternName )
return nNewPos;
}
-USHORT GetPoolParent( USHORT nId )
+sal_uInt16 GetPoolParent( sal_uInt16 nId )
{
- USHORT nRet = USHRT_MAX;
+ sal_uInt16 nRet = USHRT_MAX;
if( POOLGRP_NOCOLLID & nId ) // 1 == Formate / 0 == Collections
{
switch( ( COLL_GET_RANGE_BITS | POOLGRP_NOCOLLID ) & nId )
diff --git a/sw/source/core/doc/sortopt.cxx b/sw/source/core/doc/sortopt.cxx
index 9e432f8402f7..eaee0fddd513 100644
--- a/sw/source/core/doc/sortopt.cxx
+++ b/sw/source/core/doc/sortopt.cxx
@@ -42,11 +42,11 @@ SV_IMPL_PTRARR(SwSortKeys, SwSortKey*)
SwSortKey::SwSortKey() :
eSortOrder( SRT_ASCENDING ),
nColumnId( 0 ),
- bIsNumeric( TRUE )
+ bIsNumeric( sal_True )
{
}
-SwSortKey::SwSortKey(USHORT nId, const String& rSrtType, SwSortOrder eOrder) :
+SwSortKey::SwSortKey(sal_uInt16 nId, const String& rSrtType, SwSortOrder eOrder) :
sSortType( rSrtType ),
eSortOrder( eOrder ),
nColumnId( nId ),
@@ -69,8 +69,8 @@ SwSortOptions::SwSortOptions()
: eDirection( SRT_ROWS ),
cDeli( 9 ),
nLanguage( LANGUAGE_SYSTEM ),
- bTable( FALSE ),
- bIgnoreCase( FALSE )
+ bTable( sal_False ),
+ bIgnoreCase( sal_False )
{
}
@@ -81,7 +81,7 @@ SwSortOptions::SwSortOptions(const SwSortOptions& rOpt) :
bTable( rOpt.bTable ),
bIgnoreCase( rOpt.bIgnoreCase )
{
- for( USHORT i=0; i < rOpt.aKeys.Count(); ++i )
+ for( sal_uInt16 i=0; i < rOpt.aKeys.Count(); ++i )
{
SwSortKey* pNew = new SwSortKey(*rOpt.aKeys[i]);
aKeys.C40_INSERT( SwSortKey, pNew, aKeys.Count());
diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx
index 4d070fffdd2a..d6553658dd33 100644
--- a/sw/source/core/doc/swserv.cxx
+++ b/sw/source/core/doc/swserv.cxx
@@ -53,10 +53,10 @@ SwServerObject::~SwServerObject()
}
-BOOL SwServerObject::GetData( uno::Any & rData,
- const String & rMimeType, BOOL )
+sal_Bool SwServerObject::GetData( uno::Any & rData,
+ const String & rMimeType, sal_Bool )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
WriterRef xWrt;
switch( SotExchange::GetFormatIdFromMimeType( rMimeType ) )
{
@@ -103,14 +103,14 @@ BOOL SwServerObject::GetData( uno::Any & rData,
{
// Stream anlegen
SvMemoryStream aMemStm( 65535, 65535 );
- SwWriter aWrt( aMemStm, *pPam, FALSE );
+ SwWriter aWrt( aMemStm, *pPam, sal_False );
if( !IsError( aWrt.Write( xWrt )) )
{
aMemStm << '\0'; // append a zero char
rData <<= uno::Sequence< sal_Int8 >(
(sal_Int8*)aMemStm.GetData(),
aMemStm.Seek( STREAM_SEEK_TO_END ) );
- bRet = TRUE;
+ bRet = sal_True;
}
delete pPam;
@@ -120,11 +120,11 @@ BOOL SwServerObject::GetData( uno::Any & rData,
}
-BOOL SwServerObject::SetData( const String & ,
+sal_Bool SwServerObject::SetData( const String & ,
const uno::Any& )
{
// set new data into the "server" -> at first nothing to do
- return FALSE;
+ return sal_False;
}
@@ -133,7 +133,7 @@ void SwServerObject::SendDataChanged( const SwPosition& rPos )
// ist an unseren Aenderungen jemand interessiert ?
if( HasDataLinks() )
{
- int bCall = FALSE;
+ int bCall = sal_False;
const SwStartNode* pNd = 0;
switch( eType )
{
@@ -151,7 +151,7 @@ void SwServerObject::SendDataChanged( const SwPosition& rPos )
}
if( pNd )
{
- ULONG nNd = rPos.nNode.GetIndex();
+ sal_uLong nNd = rPos.nNode.GetIndex();
bCall = pNd->GetIndex() < nNd && nNd < pNd->EndOfSectionIndex();
}
@@ -170,7 +170,7 @@ void SwServerObject::SendDataChanged( const SwPaM& rRange )
// ist an unseren Aenderungen jemand interessiert ?
if( HasDataLinks() )
{
- int bCall = FALSE;
+ int bCall = sal_False;
const SwStartNode* pNd = 0;
const SwPosition* pStt = rRange.Start(), *pEnd = rRange.End();
switch( eType )
@@ -204,9 +204,9 @@ void SwServerObject::SendDataChanged( const SwPaM& rRange )
}
-BOOL SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
+sal_Bool SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
{
- ULONG nSttNd = 0, nEndNd = 0;
+ sal_uLong nSttNd = 0, nEndNd = 0;
xub_StrLen nStt = 0;
xub_StrLen nEnd = 0;
const SwNode* pNd = 0;
@@ -232,7 +232,7 @@ BOOL SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
case SECTION_SERVER: pNd = CNTNT_TYPE.pSectNd; break;
case SECTION_SERVER+1:
- return TRUE;
+ return sal_True;
}
if( pNd )
@@ -252,7 +252,7 @@ BOOL SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
SwServerObject::ServerModes eSave = eType;
if( !pChkLnk )
((SwServerObject*)this)->eType = NONE_SERVER;
- for( USHORT n = rLnks.Count(); n; )
+ for( sal_uInt16 n = rLnks.Count(); n; )
{
const ::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]);
if( pLnk && OBJECT_CLIENT_GRF != pLnk->GetObjType() &&
@@ -264,7 +264,7 @@ if( !pChkLnk )
{
if( pLnk == pChkLnk ||
((SwBaseLink*)pLnk)->IsRecursion( pChkLnk ) )
- return TRUE;
+ return sal_True;
}
else if( ((SwBaseLink*)pLnk)->IsRecursion( (SwBaseLink*)pLnk ) )
((SwBaseLink*)pLnk)->SetNoDataFlag();
@@ -275,7 +275,7 @@ if( !pChkLnk )
((SwServerObject*)this)->eType = eSave;
}
- return FALSE;
+ return sal_False;
}
void SwServerObject::SetNoServer()
@@ -308,7 +308,7 @@ void SwServerObject::SetDdeBookmark( ::sw::mark::IMark& rBookmark)
/* */
-SwDataChanged::SwDataChanged( const SwPaM& rPam, USHORT nTyp )
+SwDataChanged::SwDataChanged( const SwPaM& rPam, sal_uInt16 nTyp )
: pPam( &rPam ), pPos( 0 ), pDoc( rPam.GetDoc() ), nType( nTyp )
{
nNode = rPam.GetPoint()->nNode.GetIndex();
@@ -316,7 +316,7 @@ SwDataChanged::SwDataChanged( const SwPaM& rPam, USHORT nTyp )
}
-SwDataChanged::SwDataChanged( SwDoc* pDc, const SwPosition& rPos, USHORT nTyp )
+SwDataChanged::SwDataChanged( SwDoc* pDc, const SwPosition& rPos, sal_uInt16 nTyp )
: pPam( 0 ), pPos( &rPos ), pDoc( pDc ), nType( nTyp )
{
nNode = rPos.nNode.GetIndex();
@@ -331,7 +331,7 @@ SwDataChanged::~SwDataChanged()
{
const ::sfx2::SvLinkSources& rServers = pDoc->GetLinkManager().GetServers();
- for( USHORT nCnt = rServers.Count(); nCnt; )
+ for( sal_uInt16 nCnt = rServers.Count(); nCnt; )
{
::sfx2::SvLinkSourceRef refObj( rServers[ --nCnt ] );
// noch jemand am Object interessiert ?
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index eb6f375033c5..9d16beb1b4d0 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -52,43 +52,43 @@
#include <SwStyleNameMapper.hxx>
// bis SO5PF
-const USHORT AUTOFORMAT_ID_X = 9501;
-const USHORT AUTOFORMAT_ID_358 = 9601;
-const USHORT AUTOFORMAT_DATA_ID_X = 9502;
+const sal_uInt16 AUTOFORMAT_ID_X = 9501;
+const sal_uInt16 AUTOFORMAT_ID_358 = 9601;
+const sal_uInt16 AUTOFORMAT_DATA_ID_X = 9502;
// ab SO5
//! in nachfolgenden Versionen muss der Betrag dieser IDs groesser sein
-const USHORT AUTOFORMAT_ID_504 = 9801;
-const USHORT AUTOFORMAT_DATA_ID_504 = 9802;
+const sal_uInt16 AUTOFORMAT_ID_504 = 9801;
+const sal_uInt16 AUTOFORMAT_DATA_ID_504 = 9802;
-const USHORT AUTOFORMAT_ID_552 = 9901;
-const USHORT AUTOFORMAT_DATA_ID_552 = 9902;
+const sal_uInt16 AUTOFORMAT_ID_552 = 9901;
+const sal_uInt16 AUTOFORMAT_DATA_ID_552 = 9902;
// --- from 641 on: CJK and CTL font settings
-const USHORT AUTOFORMAT_ID_641 = 10001;
-const USHORT AUTOFORMAT_DATA_ID_641 = 10002;
+const sal_uInt16 AUTOFORMAT_ID_641 = 10001;
+const sal_uInt16 AUTOFORMAT_DATA_ID_641 = 10002;
// --- from 680/dr14 on: diagonal frame lines
-const USHORT AUTOFORMAT_ID_680DR14 = 10011;
-const USHORT AUTOFORMAT_DATA_ID_680DR14 = 10012;
+const sal_uInt16 AUTOFORMAT_ID_680DR14 = 10011;
+const sal_uInt16 AUTOFORMAT_DATA_ID_680DR14 = 10012;
// --- from 680/dr25 on: store strings as UTF-8
-const USHORT AUTOFORMAT_ID_680DR25 = 10021;
-const USHORT AUTOFORMAT_DATA_ID_680DR25 = 10022;
+const sal_uInt16 AUTOFORMAT_ID_680DR25 = 10021;
+const sal_uInt16 AUTOFORMAT_DATA_ID_680DR25 = 10022;
// --- from DEV300/overline2 on: overline
-const USHORT AUTOFORMAT_ID_300OVRLN = 10031;
-const USHORT AUTOFORMAT_DATA_ID_300OVRLN = 10032;
+const sal_uInt16 AUTOFORMAT_ID_300OVRLN = 10031;
+const sal_uInt16 AUTOFORMAT_DATA_ID_300OVRLN = 10032;
// current version
-const USHORT AUTOFORMAT_ID = AUTOFORMAT_ID_300OVRLN;
-const USHORT AUTOFORMAT_DATA_ID = AUTOFORMAT_DATA_ID_300OVRLN;
+const sal_uInt16 AUTOFORMAT_ID = AUTOFORMAT_ID_300OVRLN;
+const sal_uInt16 AUTOFORMAT_DATA_ID = AUTOFORMAT_DATA_ID_300OVRLN;
#ifdef READ_OLDVERS
-const USHORT AUTOFORMAT_OLD_ID = 8201;
-const USHORT AUTOFORMAT_OLD_ID1 = 8301;
-const USHORT AUTOFORMAT_OLD_DATA_ID = 8202;
+const sal_uInt16 AUTOFORMAT_OLD_ID = 8201;
+const sal_uInt16 AUTOFORMAT_OLD_ID1 = 8301;
+const sal_uInt16 AUTOFORMAT_OLD_DATA_ID = 8202;
#endif
@@ -105,34 +105,34 @@ SV_IMPL_PTRARR( _SwTableAutoFmtTbl, SwTableAutoFmt* )
struct SwAfVersions
{
public:
- USHORT nFontVersion;
- USHORT nFontHeightVersion;
- USHORT nWeightVersion;
- USHORT nPostureVersion;
- USHORT nUnderlineVersion;
- USHORT nOverlineVersion;
- USHORT nCrossedOutVersion;
- USHORT nContourVersion;
- USHORT nShadowedVersion;
- USHORT nColorVersion;
- USHORT nBoxVersion;
- USHORT nLineVersion;
- USHORT nBrushVersion;
-
- USHORT nAdjustVersion;
-
- USHORT nHorJustifyVersion;
- USHORT nVerJustifyVersion;
- USHORT nOrientationVersion;
- USHORT nMarginVersion;
- USHORT nBoolVersion;
- USHORT nInt32Version;
- USHORT nRotateModeVersion;
-
- USHORT nNumFmtVersion;
+ sal_uInt16 nFontVersion;
+ sal_uInt16 nFontHeightVersion;
+ sal_uInt16 nWeightVersion;
+ sal_uInt16 nPostureVersion;
+ sal_uInt16 nUnderlineVersion;
+ sal_uInt16 nOverlineVersion;
+ sal_uInt16 nCrossedOutVersion;
+ sal_uInt16 nContourVersion;
+ sal_uInt16 nShadowedVersion;
+ sal_uInt16 nColorVersion;
+ sal_uInt16 nBoxVersion;
+ sal_uInt16 nLineVersion;
+ sal_uInt16 nBrushVersion;
+
+ sal_uInt16 nAdjustVersion;
+
+ sal_uInt16 nHorJustifyVersion;
+ sal_uInt16 nVerJustifyVersion;
+ sal_uInt16 nOrientationVersion;
+ sal_uInt16 nMarginVersion;
+ sal_uInt16 nBoolVersion;
+ sal_uInt16 nInt32Version;
+ sal_uInt16 nRotateModeVersion;
+
+ sal_uInt16 nNumFmtVersion;
SwAfVersions();
- void Load( SvStream& rStream, USHORT nVer );
+ void Load( SvStream& rStream, sal_uInt16 nVer );
};
SwAfVersions::SwAfVersions() :
@@ -161,7 +161,7 @@ SwAfVersions::SwAfVersions() :
{
}
-void SwAfVersions::Load( SvStream& rStream, USHORT nVer )
+void SwAfVersions::Load( SvStream& rStream, sal_uInt16 nVer )
{
rStream >> nFontVersion;
rStream >> nFontHeightVersion;
@@ -327,7 +327,7 @@ SwBoxAutoFmt& SwBoxAutoFmt::operator=( const SwBoxAutoFmt& rNew )
aItem = *(aItemType*)pNew; \
delete pNew;
-BOOL SwBoxAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions, USHORT nVer )
+sal_Bool SwBoxAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions, sal_uInt16 nVer )
{
SfxPoolItem* pNew;
SvxOrientationItem aOrientation( SVX_ORIENTATION_STANDARD, 0);
@@ -398,7 +398,7 @@ BOOL SwBoxAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions, USHOR
if( 0 == rVersions.nNumFmtVersion )
{
- USHORT eSys, eLge;
+ sal_uInt16 eSys, eLge;
// --- from 680/dr25 on: store strings as UTF-8
CharSet eCharSet = (nVer >= AUTOFORMAT_ID_680DR25) ? RTL_TEXTENCODING_UTF8 : rStream.GetStreamCharSet();
rStream.ReadByteString( sNumFmtString, eCharSet )
@@ -417,7 +417,7 @@ BOOL SwBoxAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions, USHOR
#ifdef READ_OLDVERS
-BOOL SwBoxAutoFmt::LoadOld( SvStream& rStream, USHORT aLoadVer[] )
+sal_Bool SwBoxAutoFmt::LoadOld( SvStream& rStream, sal_uInt16 aLoadVer[] )
{
SfxPoolItem* pNew;
READ( aFont, SvxFontItem , 0)
@@ -447,7 +447,7 @@ BOOL SwBoxAutoFmt::LoadOld( SvStream& rStream, USHORT aLoadVer[] )
#endif
-BOOL SwBoxAutoFmt::Save( SvStream& rStream ) const
+sal_Bool SwBoxAutoFmt::Save( SvStream& rStream ) const
{
SvxOrientationItem aOrientation( aRotateAngle.GetValue(), aStacked.GetValue(), 0 );
@@ -487,13 +487,13 @@ BOOL SwBoxAutoFmt::Save( SvStream& rStream ) const
// --- from 680/dr25 on: store strings as UTF-8
rStream.WriteByteString( sNumFmtString, RTL_TEXTENCODING_UTF8 )
- << (USHORT)eSysLanguage << (USHORT)eNumFmtLanguage;
+ << (sal_uInt16)eSysLanguage << (sal_uInt16)eNumFmtLanguage;
return 0 == rStream.GetError();
}
-BOOL SwBoxAutoFmt::SaveVerionNo( SvStream& rStream ) const
+sal_Bool SwBoxAutoFmt::SaveVerionNo( SvStream& rStream ) const
{
rStream << aFont.GetVersion( SOFFICE_FILEFORMAT_40 );
rStream << aHeight.GetVersion( SOFFICE_FILEFORMAT_40 );
@@ -519,7 +519,7 @@ BOOL SwBoxAutoFmt::SaveVerionNo( SvStream& rStream ) const
rStream << aRotateAngle.GetVersion( SOFFICE_FILEFORMAT_40 );
rStream << aRotateMode.GetVersion( SOFFICE_FILEFORMAT_40 );
- rStream << (USHORT)0; // NumberFormat
+ rStream << (sal_uInt16)0; // NumberFormat
return 0 == rStream.GetError();
}
@@ -530,12 +530,12 @@ BOOL SwBoxAutoFmt::SaveVerionNo( SvStream& rStream ) const
SwTableAutoFmt::SwTableAutoFmt( const String& rName )
: aName( rName ), nStrResId( USHRT_MAX )
{
- bInclFont = TRUE;
- bInclJustify = TRUE;
- bInclFrame = TRUE;
- bInclBackground = TRUE;
- bInclValueFormat = TRUE;
- bInclWidthHeight = TRUE;
+ bInclFont = sal_True;
+ bInclJustify = sal_True;
+ bInclFrame = sal_True;
+ bInclBackground = sal_True;
+ bInclValueFormat = sal_True;
+ bInclWidthHeight = sal_True;
memset( aBoxAutoFmt, 0, sizeof( aBoxAutoFmt ) );
}
@@ -543,14 +543,14 @@ SwTableAutoFmt::SwTableAutoFmt( const String& rName )
SwTableAutoFmt::SwTableAutoFmt( const SwTableAutoFmt& rNew )
{
- for( BYTE n = 0; n < 16; ++n )
+ for( sal_uInt8 n = 0; n < 16; ++n )
aBoxAutoFmt[ n ] = 0;
*this = rNew;
}
SwTableAutoFmt& SwTableAutoFmt::operator=( const SwTableAutoFmt& rNew )
{
- for( BYTE n = 0; n < 16; ++n )
+ for( sal_uInt8 n = 0; n < 16; ++n )
{
if( aBoxAutoFmt[ n ] )
delete aBoxAutoFmt[ n ];
@@ -578,13 +578,13 @@ SwTableAutoFmt& SwTableAutoFmt::operator=( const SwTableAutoFmt& rNew )
SwTableAutoFmt::~SwTableAutoFmt()
{
SwBoxAutoFmt** ppFmt = aBoxAutoFmt;
- for( BYTE n = 0; n < 16; ++n, ++ppFmt )
+ for( sal_uInt8 n = 0; n < 16; ++n, ++ppFmt )
if( *ppFmt )
delete *ppFmt;
}
-void SwTableAutoFmt::SetBoxFmt( const SwBoxAutoFmt& rNew, BYTE nPos )
+void SwTableAutoFmt::SetBoxFmt( const SwBoxAutoFmt& rNew, sal_uInt8 nPos )
{
OSL_ENSURE( nPos < 16, "falscher Bereich" );
@@ -596,7 +596,7 @@ void SwTableAutoFmt::SetBoxFmt( const SwBoxAutoFmt& rNew, BYTE nPos )
}
-const SwBoxAutoFmt& SwTableAutoFmt::GetBoxFmt( BYTE nPos ) const
+const SwBoxAutoFmt& SwTableAutoFmt::GetBoxFmt( sal_uInt8 nPos ) const
{
OSL_ENSURE( nPos < 16, "falscher Bereich" );
@@ -614,7 +614,7 @@ const SwBoxAutoFmt& SwTableAutoFmt::GetBoxFmt( BYTE nPos ) const
-SwBoxAutoFmt& SwTableAutoFmt::UpdateFromSet( BYTE nPos,
+SwBoxAutoFmt& SwTableAutoFmt::UpdateFromSet( sal_uInt8 nPos,
const SfxItemSet& rSet,
UpdateFlags eFlags,
SvNumberFormatter* pNFmtr )
@@ -660,7 +660,7 @@ SwBoxAutoFmt& SwTableAutoFmt::UpdateFromSet( BYTE nPos,
const SwTblBoxNumFormat* pNumFmtItem;
const SvNumberformat* pNumFormat = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, TRUE,
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, sal_True,
(const SfxPoolItem**)&pNumFmtItem ) && pNFmtr &&
0 != (pNumFormat = pNFmtr->GetEntry( pNumFmtItem->GetValue() )) )
pFmt->SetValueFormat( ((SvNumberformat*)pNumFormat)->GetFormatstring(),
@@ -679,7 +679,7 @@ SwBoxAutoFmt& SwTableAutoFmt::UpdateFromSet( BYTE nPos,
}
-void SwTableAutoFmt::UpdateToSet( BYTE nPos, SfxItemSet& rSet,
+void SwTableAutoFmt::UpdateToSet( sal_uInt8 nPos, SfxItemSet& rSet,
UpdateFlags eFlags, SvNumberFormatter* pNFmtr ) const
{
const SwBoxAutoFmt& rChg = GetBoxFmt( nPos );
@@ -752,7 +752,7 @@ void SwTableAutoFmt::UpdateToSet( BYTE nPos, SfxItemSet& rSet,
if( sFmt.Len() )
{
short nType;
- BOOL bNew;
+ sal_Bool bNew;
xub_StrLen nCheckPos;
sal_uInt32 nKey = pNFmtr->GetIndexPuttingAndConverting( sFmt, eLng,
eSys, nType, bNew, nCheckPos);
@@ -767,24 +767,24 @@ void SwTableAutoFmt::UpdateToSet( BYTE nPos, SfxItemSet& rSet,
}
-BOOL SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions )
+sal_Bool SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions )
{
- BOOL bRet = TRUE;
- USHORT nVal = 0;
+ sal_Bool bRet = sal_True;
+ sal_uInt16 nVal = 0;
rStream >> nVal;
bRet = 0 == rStream.GetError();
if( bRet && (nVal == AUTOFORMAT_DATA_ID_X ||
(AUTOFORMAT_DATA_ID_504 <= nVal && nVal <= AUTOFORMAT_DATA_ID)) )
{
- BOOL b;
+ sal_Bool b;
// --- from 680/dr25 on: store strings as UTF-8
CharSet eCharSet = (nVal >= AUTOFORMAT_ID_680DR25) ? RTL_TEXTENCODING_UTF8 : rStream.GetStreamCharSet();
rStream.ReadByteString( aName, eCharSet );
if( AUTOFORMAT_DATA_ID_552 <= nVal )
{
rStream >> nStrResId;
- USHORT nId = RID_SVXSTR_TBLAFMT_BEGIN + nStrResId;
+ sal_uInt16 nId = RID_SVXSTR_TBLAFMT_BEGIN + nStrResId;
if( RID_SVXSTR_TBLAFMT_BEGIN <= nId &&
nId < RID_SVXSTR_TBLAFMT_END )
{
@@ -802,7 +802,7 @@ BOOL SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions )
bRet = 0 == rStream.GetError();
- for( BYTE i = 0; i < 16; ++i )
+ for( sal_uInt8 i = 0; i < 16; ++i )
{
SwBoxAutoFmt* pFmt = new SwBoxAutoFmt;
bRet = pFmt->Load( rStream, rVersions, nVal );
@@ -820,16 +820,16 @@ BOOL SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions )
#ifdef READ_OLDVERS
-BOOL SwTableAutoFmt::LoadOld( SvStream& rStream, USHORT aLoadVer[] )
+sal_Bool SwTableAutoFmt::LoadOld( SvStream& rStream, sal_uInt16 aLoadVer[] )
{
- BOOL bRet = TRUE;
- USHORT nVal = 0;
+ sal_Bool bRet = sal_True;
+ sal_uInt16 nVal = 0;
rStream >> nVal;
bRet = 0 == rStream.GetError();
if( bRet && ( AUTOFORMAT_OLD_DATA_ID == nVal ))
{
- BOOL b;
+ sal_Bool b;
rStream.ReadByteString( aName, rStream.GetStreamCharSet() );
rStream >> b; bInclFont = b;
rStream >> b; bInclJustify = b;
@@ -855,10 +855,10 @@ BOOL SwTableAutoFmt::LoadOld( SvStream& rStream, USHORT aLoadVer[] )
#endif
-BOOL SwTableAutoFmt::Save( SvStream& rStream ) const
+sal_Bool SwTableAutoFmt::Save( SvStream& rStream ) const
{
- USHORT nVal = AUTOFORMAT_DATA_ID;
- BOOL b;
+ sal_uInt16 nVal = AUTOFORMAT_DATA_ID;
+ sal_Bool b;
rStream << nVal;
// --- from 680/dr25 on: store strings as UTF-8
rStream.WriteByteString( aName, RTL_TEXTENCODING_UTF8 );
@@ -870,7 +870,7 @@ BOOL SwTableAutoFmt::Save( SvStream& rStream ) const
rStream << ( b = bInclValueFormat );
rStream << ( b = bInclWidthHeight );
- BOOL bRet = 0 == rStream.GetError();
+ sal_Bool bRet = 0 == rStream.GetError();
for( int i = 0; bRet && i < 16; ++i )
{
@@ -896,7 +896,7 @@ SwTableAutoFmtTbl::SwTableAutoFmtTbl()
SwBoxAutoFmt aNew;
- BYTE i;
+ sal_uInt8 i;
Color aColor( COL_BLUE );
SvxBrushItem aBrushItem( aColor, RES_BACKGROUND );
@@ -946,39 +946,39 @@ SwTableAutoFmtTbl::SwTableAutoFmtTbl()
Insert( pNew, Count() );
}
-BOOL SwTableAutoFmtTbl::Load()
+sal_Bool SwTableAutoFmtTbl::Load()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
String sNm( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( sAutoTblFmtName )));
SvtPathOptions aOpt;
if( aOpt.SearchFile( sNm, SvtPathOptions::PATH_USERCONFIG ))
{
- SfxMedium aStream( sNm, STREAM_STD_READ, TRUE );
+ SfxMedium aStream( sNm, STREAM_STD_READ, sal_True );
bRet = Load( *aStream.GetInStream() );
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
-BOOL SwTableAutoFmtTbl::Save() const
+sal_Bool SwTableAutoFmtTbl::Save() const
{
SvtPathOptions aPathOpt;
String sNm( aPathOpt.GetUserConfigPath() );
sNm += INET_PATH_TOKEN;
sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( sAutoTblFmtName ));
- SfxMedium aStream(sNm, STREAM_STD_WRITE, TRUE );
+ SfxMedium aStream(sNm, STREAM_STD_WRITE, sal_True );
return Save( *aStream.GetOutStream() ) && aStream.Commit();
}
-BOOL SwTableAutoFmtTbl::Load( SvStream& rStream )
+sal_Bool SwTableAutoFmtTbl::Load( SvStream& rStream )
{
- BOOL bRet = 0 == rStream.GetError();
+ sal_Bool bRet = 0 == rStream.GetError();
if (bRet)
{
// Achtung hier muss ein allgemeiner Header gelesen werden
- USHORT nVal = 0;
+ sal_uInt16 nVal = 0;
rStream >> nVal;
bRet = 0 == rStream.GetError();
@@ -989,13 +989,13 @@ BOOL SwTableAutoFmtTbl::Load( SvStream& rStream )
if( nVal == AUTOFORMAT_ID_358 ||
(AUTOFORMAT_ID_504 <= nVal && nVal <= AUTOFORMAT_ID) )
{
- UINT16 nFileVers = SOFFICE_FILEFORMAT_40;
- BYTE nChrSet, nCnt;
+ sal_uInt16 nFileVers = SOFFICE_FILEFORMAT_40;
+ sal_uInt8 nChrSet, nCnt;
long nPos = rStream.Tell();
rStream >> nCnt >> nChrSet;
// if( 4 <= nCnt )
// rStream >> nFileVers;
- if( rStream.Tell() != ULONG(nPos + nCnt) )
+ if( rStream.Tell() != sal_uLong(nPos + nCnt) )
{
OSL_ENSURE( !this, "Der Header enthaelt mehr/neuere Daten" );
rStream.Seek( nPos + nCnt );
@@ -1010,12 +1010,12 @@ BOOL SwTableAutoFmtTbl::Load( SvStream& rStream )
aVersions.Load( rStream, nVal ); // Item-Versionen
SwTableAutoFmt* pNew;
- USHORT nAnz = 0;
+ sal_uInt16 nAnz = 0;
rStream >> nAnz;
bRet = 0 == rStream.GetError();
- for( USHORT i = 0; i < nAnz; ++i )
+ for( sal_uInt16 i = 0; i < nAnz; ++i )
{
pNew = new SwTableAutoFmt( aEmptyStr );
bRet = pNew->Load( rStream, aVersions );
@@ -1034,18 +1034,18 @@ BOOL SwTableAutoFmtTbl::Load( SvStream& rStream )
else if( AUTOFORMAT_OLD_ID == nVal || AUTOFORMAT_OLD_ID1 == nVal )
{
SwTableAutoFmt* pNew;
- USHORT nAnz = 0;
+ sal_uInt16 nAnz = 0;
rStream >> nAnz;
- USHORT aArr[ 12 ];
- memset( aArr, 0, 12 * sizeof( USHORT ) );
+ sal_uInt16 aArr[ 12 ];
+ memset( aArr, 0, 12 * sizeof( sal_uInt16 ) );
if( AUTOFORMAT_OLD_ID1 == nVal )
- for( USHORT n = 0; n < 12; ++n )
+ for( sal_uInt16 n = 0; n < 12; ++n )
rStream >> aArr[ n ];
bRet = 0 == rStream.GetError();
- for( USHORT i = 0; i < nAnz; ++i )
+ for( sal_uInt16 i = 0; i < nAnz; ++i )
{
pNew = new SwTableAutoFmt( aEmptyStr );
bRet = pNew->LoadOld( rStream, aArr );
@@ -1067,18 +1067,18 @@ BOOL SwTableAutoFmtTbl::Load( SvStream& rStream )
}
-BOOL SwTableAutoFmtTbl::Save( SvStream& rStream ) const
+sal_Bool SwTableAutoFmtTbl::Save( SvStream& rStream ) const
{
- BOOL bRet = 0 == rStream.GetError();
+ sal_Bool bRet = 0 == rStream.GetError();
if (bRet)
{
rStream.SetVersion( SOFFICE_FILEFORMAT_40 );
// Achtung hier muss ein allgemeiner Header gespeichert werden
- USHORT nVal = AUTOFORMAT_ID;
+ sal_uInt16 nVal = AUTOFORMAT_ID;
rStream << nVal
- << (BYTE)2 // Anzahl von Zeichen des Headers incl. diesem
- << (BYTE)GetStoreCharSet( ::gsl_getSystemTextEncoding() );
+ << (sal_uInt8)2 // Anzahl von Zeichen des Headers incl. diesem
+ << (sal_uInt8)GetStoreCharSet( ::gsl_getSystemTextEncoding() );
bRet = 0 == rStream.GetError();
@@ -1086,10 +1086,10 @@ BOOL SwTableAutoFmtTbl::Save( SvStream& rStream ) const
// die VersionsNummer fuer alle Attribute schreiben
(*this)[ 0 ]->GetBoxFmt( 0 ).SaveVerionNo( rStream );
- rStream << (USHORT)(Count() - 1);
+ rStream << (sal_uInt16)(Count() - 1);
bRet = 0 == rStream.GetError();
- for( USHORT i = 1; bRet && i < Count(); ++i )
+ for( sal_uInt16 i = 1; bRet && i < Count(); ++i )
{
SwTableAutoFmt* pFmt = (*this)[ i ];
bRet = pFmt->Save( rStream );
diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx
index fdc56a2c572d..d83bf854c645 100644
--- a/sw/source/core/doc/tblcpy.cxx
+++ b/sw/source/core/doc/tblcpy.cxx
@@ -36,6 +36,7 @@
#include <svl/zforlist.hxx>
#include <frmfmt.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <cntfrm.hxx>
#include <pam.hxx>
#include <swtable.hxx>
@@ -48,16 +49,17 @@
#include <mvsave.hxx>
#include <docary.hxx>
#include <fmtanchr.hxx>
-#include <undobj.hxx>
+#include <hints.hxx>
+#include <UndoTable.hxx>
#include <redline.hxx>
#include <fmtfsize.hxx>
#include <list>
-BOOL _FndCntntLine( const SwTableLine*& rpLine, void* pPara );
-BOOL _FndCntntBox( const SwTableBox*& rpBox, void* pPara );
+sal_Bool _FndCntntLine( const SwTableLine*& rpLine, void* pPara );
+sal_Bool _FndCntntBox( const SwTableBox*& rpBox, void* pPara );
void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
SwTable& rDstTbl, SwTableBox* pDstBox,
- BOOL bDelCntnt, SwUndoTblCpyTbl* pUndo );
+ sal_Bool bDelCntnt, SwUndoTblCpyTbl* pUndo );
// The following type will be used by table copy functions to describe
// the structure of tables (or parts of tables).
@@ -69,13 +71,13 @@ namespace
{
SwTableBox* mpBox;
SwTableBox* mpCopy;
- USHORT mnColSpan;
+ sal_uInt16 mnColSpan;
bool mbSelected;
};
typedef std::vector< BoxSpanInfo > BoxStructure;
typedef std::vector< BoxStructure > LineStructure;
- typedef std::list< ULONG > ColumnStructure;
+ typedef std::list< sal_uLong > ColumnStructure;
struct SubBox
{
@@ -91,14 +93,14 @@ namespace
public:
LineStructure maLines;
ColumnStructure maCols;
- USHORT mnStartCol;
- USHORT mnAddLine;
- void addLine( USHORT &rLine, const SwTableBoxes&, const SwSelBoxes*,
+ sal_uInt16 mnStartCol;
+ sal_uInt16 mnAddLine;
+ void addLine( sal_uInt16 &rLine, const SwTableBoxes&, const SwSelBoxes*,
bool bNewModel );
- void addBox( USHORT nLine, const SwSelBoxes*, SwTableBox *pBox,
- ULONG &rnB, USHORT &rnC, ColumnStructure::iterator& rpCl,
+ void addBox( sal_uInt16 nLine, const SwSelBoxes*, SwTableBox *pBox,
+ sal_uLong &rnB, sal_uInt16 &rnC, ColumnStructure::iterator& rpCl,
BoxStructure::iterator& rpSel, bool &rbSel, bool bCover );
- void incColSpan( USHORT nLine, USHORT nCol );
+ void incColSpan( sal_uInt16 nLine, sal_uInt16 nCol );
TableStructure( const SwTable& rTable );
TableStructure( const SwTable& rTable, _FndBox &rFndBox,
const SwSelBoxes& rSelBoxes,
@@ -138,7 +140,7 @@ namespace
rSubTable.insert( pEndLn, aSubLine );
} while( ++nSize < rBox.GetTabLines().Count() );
}
- for( USHORT nLine = 0; nLine < rBox.GetTabLines().Count(); ++nLine )
+ for( sal_uInt16 nLine = 0; nLine < rBox.GetTabLines().Count(); ++nLine )
pStartLn = insertSubLine( rSubTable, *rBox.GetTabLines()[nLine],
pStartLn );
OSL_ENSURE( pStartLn == pEndLn, "Sub line confusion" );
@@ -164,7 +166,7 @@ namespace
SubTable::iterator pMax = pStartLn;
++pMax;
SubTable::difference_type nMax = 1;
- for( USHORT nBox = 0; nBox < rLine.GetTabBoxes().Count(); ++nBox )
+ for( sal_uInt16 nBox = 0; nBox < rLine.GetTabBoxes().Count(); ++nBox )
{
SubTable::iterator pTmp = insertSubBox( rSubTable,
*rLine.GetTabBoxes()[nBox], pStartLn, pMax );
@@ -184,8 +186,8 @@ namespace
{
maCols.push_front(0);
const SwTableLines &rLines = rTable.GetTabLines();
- USHORT nCnt = 0;
- for( USHORT nLine = 0; nLine < rLines.Count(); ++nLine )
+ sal_uInt16 nCnt = 0;
+ for( sal_uInt16 nLine = 0; nLine < rLines.Count(); ++nLine )
addLine( nCnt, rLines[nLine]->GetTabBoxes(), 0, rTable.IsNewModel() );
}
@@ -200,8 +202,8 @@ namespace
_FndLines &rFndLines = rFndBox.GetLines();
maCols.push_front(0);
const SwTableLine* pLine = rFndLines[0]->GetLine();
- USHORT nStartLn = rTable.GetTabLines().C40_GETPOS( SwTableLine, pLine );
- USHORT nEndLn = nStartLn;
+ sal_uInt16 nStartLn = rTable.GetTabLines().C40_GETPOS( SwTableLine, pLine );
+ sal_uInt16 nEndLn = nStartLn;
if( rFndLines.Count() > 1 )
{
pLine = rFndLines[ rFndLines.Count()-1 ]->GetLine();
@@ -211,9 +213,9 @@ namespace
{
const SwTableLines &rLines = rTable.GetTabLines();
if( bNoSelection &&
- (USHORT)nMinSize > nEndLn - nStartLn + 1 )
+ (sal_uInt16)nMinSize > nEndLn - nStartLn + 1 )
{
- USHORT nNewEndLn = nStartLn + (USHORT)nMinSize - 1;
+ sal_uInt16 nNewEndLn = nStartLn + (sal_uInt16)nMinSize - 1;
if( nNewEndLn >= rLines.Count() )
{
mnAddLine = nNewEndLn - rLines.Count() + 1;
@@ -231,8 +233,8 @@ namespace
}
maLines.resize( nEndLn - nStartLn + 1 );
const SwSelBoxes* pSelBoxes = &rSelBoxes;
- USHORT nCnt = 0;
- for( USHORT nLine = nStartLn; nLine <= nEndLn; ++nLine )
+ sal_uInt16 nCnt = 0;
+ for( sal_uInt16 nLine = nStartLn; nLine <= nEndLn; ++nLine )
{
addLine( nCnt, rLines[nLine]->GetTabBoxes(),
pSelBoxes, rTable.IsNewModel() );
@@ -244,7 +246,7 @@ namespace
{
BoxStructure::iterator pC = maLines[0].begin();
BoxStructure::iterator pEnd = maLines[0].end();
- USHORT nIdx = mnStartCol;
+ sal_uInt16 nIdx = mnStartCol;
mnStartCol = 0;
while( nIdx && pC != pEnd )
{
@@ -258,12 +260,12 @@ namespace
}
}
- void TableStructure::addLine( USHORT &rLine, const SwTableBoxes& rBoxes,
+ void TableStructure::addLine( sal_uInt16 &rLine, const SwTableBoxes& rBoxes,
const SwSelBoxes* pSelBoxes, bool bNewModel )
{
bool bComplex = false;
if( !bNewModel )
- for( USHORT nBox = 0; !bComplex && nBox < rBoxes.Count(); ++nBox )
+ for( sal_uInt16 nBox = 0; !bComplex && nBox < rBoxes.Count(); ++nBox )
bComplex = rBoxes[nBox]->GetTabLines().Count() > 0;
if( bComplex )
{
@@ -272,7 +274,7 @@ namespace
aSubTable.push_back( aSubLine );
SubTable::iterator pStartLn = aSubTable.begin();
SubTable::iterator pEndLn = aSubTable.end();
- for( USHORT nBox = 0; nBox < rBoxes.Count(); ++nBox )
+ for( sal_uInt16 nBox = 0; nBox < rBoxes.Count(); ++nBox )
insertSubBox( aSubTable, *rBoxes[nBox], pStartLn, pEndLn );
SubTable::size_type nSize = aSubTable.size();
if( nSize )
@@ -281,8 +283,8 @@ namespace
while( pStartLn != pEndLn )
{
bool bSelected = false;
- ULONG nBorder = 0;
- USHORT nCol = 0;
+ sal_uLong nBorder = 0;
+ sal_uInt16 nCol = 0;
maLines[rLine].reserve( pStartLn->size() );
BoxStructure::iterator pSel = maLines[rLine].end();
ColumnStructure::iterator pCol = maCols.begin();
@@ -302,20 +304,20 @@ namespace
else
{
bool bSelected = false;
- ULONG nBorder = 0;
- USHORT nCol = 0;
+ sal_uLong nBorder = 0;
+ sal_uInt16 nCol = 0;
maLines[rLine].reserve( rBoxes.Count() );
ColumnStructure::iterator pCol = maCols.begin();
BoxStructure::iterator pSel = maLines[rLine].end();
- for( USHORT nBox = 0; nBox < rBoxes.Count(); ++nBox )
+ for( sal_uInt16 nBox = 0; nBox < rBoxes.Count(); ++nBox )
addBox( rLine, pSelBoxes, rBoxes[nBox], nBorder, nCol,
pCol, pSel, bSelected, false );
++rLine;
}
}
- void TableStructure::addBox( USHORT nLine, const SwSelBoxes* pSelBoxes,
- SwTableBox *pBox, ULONG &rnBorder, USHORT &rnCol,
+ void TableStructure::addBox( sal_uInt16 nLine, const SwSelBoxes* pSelBoxes,
+ SwTableBox *pBox, sal_uLong &rnBorder, sal_uInt16 &rnCol,
ColumnStructure::iterator& rpCol, BoxStructure::iterator& rpSel,
bool &rbSelected, bool bCovered )
{
@@ -326,7 +328,7 @@ namespace
aInfo.mbSelected = true;
if( mnStartCol == USHRT_MAX )
{
- mnStartCol = (USHORT)maLines[nLine].size();
+ mnStartCol = (sal_uInt16)maLines[nLine].size();
if( pSelBoxes->Count() < 2 )
{
pSelBoxes = 0;
@@ -337,7 +339,7 @@ namespace
else
aInfo.mbSelected = false;
rnBorder += pBox->GetFrmFmt()->GetFrmSize().GetWidth();
- USHORT nLeftCol = rnCol;
+ sal_uInt16 nLeftCol = rnCol;
while( rpCol != maCols.end() && *rpCol < rnBorder )
{
++rnCol;
@@ -377,10 +379,10 @@ namespace
if( mnAddLine )
{
const SwTableLines &rLines = rTable.GetTabLines();
- USHORT nLineCount = rLines.Count();
+ sal_uInt16 nLineCount = rLines.Count();
if( nLineCount < mnAddLine )
mnAddLine = nLineCount;
- USHORT nLine = (USHORT)maLines.size();
+ sal_uInt16 nLine = (sal_uInt16)maLines.size();
maLines.resize( nLine + mnAddLine );
while( mnAddLine )
{
@@ -391,9 +393,9 @@ namespace
}
}
- void TableStructure::incColSpan( USHORT nLineMax, USHORT nNewCol )
+ void TableStructure::incColSpan( sal_uInt16 nLineMax, sal_uInt16 nNewCol )
{
- for( USHORT nLine = 0; nLine < nLineMax; ++nLine )
+ for( sal_uInt16 nLine = 0; nLine < nLineMax; ++nLine )
{
BoxStructure::iterator pInfo = maLines[nLine].begin();
BoxStructure::iterator pEnd = maLines[nLine].end();
@@ -413,7 +415,7 @@ namespace
return;
LineStructure::const_iterator pCurrLine = pFirstLine;
LineStructure::size_type nLineCount = maLines.size();
- USHORT nFirstStartCol = 0;
+ sal_uInt16 nFirstStartCol = 0;
{
BoxStructure::const_iterator pFirstBox = pFirstLine->begin();
if( pFirstBox != pFirstLine->end() && pFirstBox->mpBox &&
@@ -424,7 +426,7 @@ namespace
{
BoxStructure::const_iterator pFirstBox = pCurrLine->begin();
BoxStructure::const_iterator pLastBox = pCurrLine->end();
- USHORT nCurrStartCol = mnStartCol;
+ sal_uInt16 nCurrStartCol = mnStartCol;
if( pFirstBox != pLastBox )
{
BoxStructure::const_iterator pTmpBox = pLastBox;
@@ -448,7 +450,7 @@ namespace
BoxStructure::const_iterator pCurrBox = pFirstBox;
BoxStructure &rBox = maLines[nLine];
BoxStructure::size_type nBoxCount = rBox.size();
- USHORT nCol = 0;
+ sal_uInt16 nCol = 0;
for( BoxStructure::size_type nBox = 0; nBox < nBoxCount; ++nBox )
{
BoxSpanInfo& rInfo = rBox[nBox];
@@ -505,7 +507,7 @@ namespace
SwTableBox *pBox = rInfo.mpBox;
if( pBox && pBox->getRowSpan() > 0 )
lcl_CpyBox( rSource, rInfo.mpCopy, rDstTbl, pBox,
- TRUE, pUndo );
+ sal_True, pUndo );
}
}
}
@@ -525,7 +527,7 @@ namespace
void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
SwTable& rDstTbl, SwTableBox* pDstBox,
- BOOL bDelCntnt, SwUndoTblCpyTbl* pUndo )
+ sal_Bool bDelCntnt, SwUndoTblCpyTbl* pUndo )
{
OSL_ENSURE( ( !pCpyBox || pCpyBox->GetSttNd() ) && pDstBox->GetSttNd(),
"Keine inhaltstragende Box" );
@@ -546,13 +548,12 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
if( pUndo )
pUndo->AddBoxBefore( *pDstBox, bDelCntnt );
- BOOL bUndo = pDoc->DoesUndo();
bool bUndoRedline = pUndo && pDoc->IsRedlineOn();
- pDoc->DoUndo( FALSE );
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
SwNodeIndex aSavePos( aInsIdx, -1 );
if( pRg.get() )
- pCpyDoc->CopyWithFlyInFly( *pRg, 0, aInsIdx, FALSE );
+ pCpyDoc->CopyWithFlyInFly( *pRg, 0, aInsIdx, sal_False );
else
pDoc->GetNodes().MakeTxtNode( aInsIdx, (SwTxtFmtColl*)pDoc->GetDfltTxtFmtColl() );
aSavePos++;
@@ -561,7 +562,7 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
while( pLine->GetUpper() )
pLine = pLine->GetUpper()->GetUpper();
- BOOL bReplaceColl = TRUE;
+ sal_Bool bReplaceColl = sal_True;
if( bDelCntnt && !bUndoRedline )
{
// zuerst die Fly loeschen, dann die entsprechenden Nodes
@@ -572,11 +573,11 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
SwPosition aMvPos( aInsIdx );
SwCntntNode* pCNd = pDoc->GetNodes().GoPrevious( &aMvPos.nNode );
aMvPos.nContent.Assign( pCNd, pCNd->Len() );
- pDoc->CorrAbs( aInsIdx, aEndNdIdx, aMvPos, /*TRUE*/FALSE );
+ pDoc->CorrAbs( aInsIdx, aEndNdIdx, aMvPos, /*sal_True*/sal_False );
}
// stehen noch FlyFrames rum, loesche auch diese
- for( USHORT n = 0; n < pDoc->GetSpzFrmFmts()->Count(); ++n )
+ for( sal_uInt16 n = 0; n < pDoc->GetSpzFrmFmts()->Count(); ++n )
{
SwFrmFmt *const pFly = (*pDoc->GetSpzFrmFmts())[n];
SwFmtAnchor const*const pAnchor = &pFly->GetAnchor();
@@ -605,7 +606,7 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
if( pCNd &&
RES_POOLCOLL_TABLE_HDLN !=
pCNd->GetFmtColl()->GetPoolFmtId() )
- bReplaceColl = FALSE;
+ bReplaceColl = sal_False;
}
pDoc->GetNodes().Delete( aInsIdx, aEndNdIdx.GetIndex() - aInsIdx.GetIndex() );
@@ -615,11 +616,11 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
if( pUndo )
pUndo->AddBoxAfter( *pDstBox, aInsIdx, bDelCntnt );
- // Ueberschrift
- SwTxtNode* pTxtNd = pDoc->GetNodes()[ aSavePos ]->GetTxtNode();
+ // heading
+ SwTxtNode *const pTxtNd = aSavePos.GetNode().GetTxtNode();
if( pTxtNd )
{
- USHORT nPoolId = pTxtNd->GetTxtColl()->GetPoolFmtId();
+ sal_uInt16 nPoolId = pTxtNd->GetTxtColl()->GetPoolFmtId();
if( bReplaceColl &&
(( 1 < rDstTbl.GetTabLines().Count() &&
pLine == rDstTbl.GetTabLines()[0] )
@@ -659,12 +660,12 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
if( aBoxAttrSet.Count() )
{
const SfxPoolItem* pItem;
- SvNumberFormatter* pN = pDoc->GetNumberFormatter( FALSE );
+ SvNumberFormatter* pN = pDoc->GetNumberFormatter( sal_False );
if( pN && pN->HasMergeFmtTbl() && SFX_ITEM_SET == aBoxAttrSet.
- GetItemState( RES_BOXATR_FORMAT, FALSE, &pItem ) )
+ GetItemState( RES_BOXATR_FORMAT, sal_False, &pItem ) )
{
- ULONG nOldIdx = ((SwTblBoxNumFormat*)pItem)->GetValue();
- ULONG nNewIdx = pN->GetMergeFmtIndex( nOldIdx );
+ sal_uLong nOldIdx = ((SwTblBoxNumFormat*)pItem)->GetValue();
+ sal_uLong nNewIdx = pN->GetMergeFmtIndex( nOldIdx );
if( nNewIdx != nOldIdx )
aBoxAttrSet.Put( SwTblBoxNumFormat( nNewIdx ));
}
@@ -672,11 +673,9 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
}
}
}
-
- pDoc->DoUndo( bUndo );
}
-BOOL SwTable::InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
+sal_Bool SwTable::InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
SwUndoTblCpyTbl* pUndo )
{
SwDoc* pDoc = GetFrmFmt()->GetDoc();
@@ -703,7 +702,7 @@ BOOL SwTable::InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
if( pUndo )
pUndo->InsertRow( *this, aBoxes, aTarget.mnAddLine );
else
- InsertRow( pDoc, aBoxes, aTarget.mnAddLine, TRUE );
+ InsertRow( pDoc, aBoxes, aTarget.mnAddLine, sal_True );
aTarget.moreLines( *this );
bClear = true;
@@ -733,7 +732,7 @@ BOOL SwTable::InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
// make frames
aFndBox.MakeFrms( *this );
- return TRUE;
+ return sal_True;
}
// kopiere die Tabelle in diese.
@@ -743,7 +742,7 @@ BOOL SwTable::InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
// Box einer "GrundLine".
// Ist auch keine Line mehr vorhanden, -> auch in die letzte Box
// einer "GrundLine"
-BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwNodeIndex& rSttBox,
+sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwNodeIndex& rSttBox,
SwUndoTblCpyTbl* pUndo )
{
SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
@@ -773,10 +772,10 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwNodeIndex& rSttBox,
SwTblNumFmtMerge aTNFM( *pCpyDoc, *pDoc );
- BOOL bDelCntnt = TRUE;
+ sal_Bool bDelCntnt = sal_True;
const SwTableBox* pTmp;
- for( USHORT nLines = 0; nLines < rCpyTbl.GetTabLines().Count(); ++nLines )
+ for( sal_uInt16 nLines = 0; nLines < rCpyTbl.GetTabLines().Count(); ++nLines )
{
// hole die erste Box von der Copy-Line
const SwTableBox* pCpyBox = rCpyTbl.GetTabLines()[nLines]
@@ -789,25 +788,25 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwNodeIndex& rSttBox,
// (keine leeren Section erzeugen, werden sonst geloescht!)
lcl_CpyBox( rCpyTbl, pCpyBox, *this, pMyBox, bDelCntnt, pUndo );
- if( 0 == (pTmp = pCpyBox->FindNextBox( rCpyTbl, pCpyBox, FALSE )))
+ if( 0 == (pTmp = pCpyBox->FindNextBox( rCpyTbl, pCpyBox, sal_False )))
break; // es folgt keine weitere Box mehr
pCpyBox = pTmp;
- if( 0 == ( pTmp = pMyBox->FindNextBox( *this, pMyBox, FALSE )))
- bDelCntnt = FALSE; // kein Platz mehr ??
+ if( 0 == ( pTmp = pMyBox->FindNextBox( *this, pMyBox, sal_False )))
+ bDelCntnt = sal_False; // kein Platz mehr ??
else
pMyBox = (SwTableBox*)pTmp;
- } while( TRUE );
+ } while( sal_True );
// suche die oberste Line
SwTableLine* pNxtLine = pMyBox->GetUpper();
while( pNxtLine->GetUpper() )
pNxtLine = pNxtLine->GetUpper()->GetUpper();
- USHORT nPos = GetTabLines().C40_GETPOS( SwTableLine, pNxtLine );
+ sal_uInt16 nPos = GetTabLines().C40_GETPOS( SwTableLine, pNxtLine );
// gibt es eine naechste ??
if( nPos + 1 >= GetTabLines().Count() )
- bDelCntnt = FALSE; // es gibt keine, alles in die letzte Box
+ bDelCntnt = sal_False; // es gibt keine, alles in die letzte Box
else
{
// suche die naechste "Inhaltstragende Box"
@@ -815,15 +814,15 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwNodeIndex& rSttBox,
pMyBox = pNxtLine->GetTabBoxes()[0];
while( pMyBox->GetTabLines().Count() )
pMyBox = pMyBox->GetTabLines()[0]->GetTabBoxes()[0];
- bDelCntnt = TRUE;
+ bDelCntnt = sal_True;
}
}
aFndBox.MakeFrms( pTblNd->GetTable() ); // erzeuge die Frames neu
- return TRUE;
+ return sal_True;
}
-BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
+sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
SwUndoTblCpyTbl* pUndo )
{
OSL_ENSURE( rSelBoxes.Count(), "Missing selection" );
@@ -842,7 +841,7 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
SwTableBox *pTmpBox, *pSttBox = (SwTableBox*)rSelBoxes[0];
- USHORT nLn, nBx;
+ sal_uInt16 nLn, nBx;
_FndLine *pFLine, *pInsFLine = 0;
_FndBox aFndBox( 0, 0 );
// suche alle Boxen / Lines
@@ -856,16 +855,16 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
if( 1 != rCpyTbl.GetTabSortBoxes().Count() )
{
SwTableLine* pSttLine = pSttBox->GetUpper();
- USHORT nSttBox = pSttLine->GetTabBoxes().C40_GETPOS( SwTableBox, pSttBox );
- USHORT nSttLine = GetTabLines().C40_GETPOS( SwTableLine, pSttLine );
+ sal_uInt16 nSttBox = pSttLine->GetTabBoxes().C40_GETPOS( SwTableBox, pSttBox );
+ sal_uInt16 nSttLine = GetTabLines().C40_GETPOS( SwTableLine, pSttLine );
_FndBox* pFndBox;
- USHORT nFndCnt = aFndBox.GetLines().Count();
+ sal_uInt16 nFndCnt = aFndBox.GetLines().Count();
if( !nFndCnt )
- return FALSE;
+ return sal_False;
// teste ob genug Platz fuer die einzelnen Lines und Boxen ist:
- USHORT nTstLns = 0;
+ sal_uInt16 nTstLns = 0;
pFLine = aFndBox.GetLines()[ 0 ];
pSttLine = pFLine->GetLine();
nSttLine = GetTabLines().C40_GETPOS( SwTableLine, pSttLine );
@@ -880,9 +879,9 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
// teste, ob man durch einfuegen neuer zum Ziel kommt. Aber
// nur wenn die SSelection eine Box umfasst !!
if( 1 < rSelBoxes.Count() )
- return FALSE;
+ return sal_False;
- USHORT nNewLns = rCpyTbl.GetTabLines().Count() -
+ sal_uInt16 nNewLns = rCpyTbl.GetTabLines().Count() -
(GetTabLines().Count() - nSttLine );
// Dann teste mal ob die Anzahl der Boxen fuer die Lines reicht
@@ -890,7 +889,7 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
pSttBox = pFLine->GetBoxes()[0]->GetBox();
nSttBox = pFLine->GetLine()->GetTabBoxes().C40_GETPOS( SwTableBox, pSttBox );
- for( USHORT n = rCpyTbl.GetTabLines().Count() - nNewLns;
+ for( sal_uInt16 n = rCpyTbl.GetTabLines().Count() - nNewLns;
n < rCpyTbl.GetTabLines().Count(); ++n )
{
SwTableLine* pCpyLn = rCpyTbl.GetTabLines()[ n ];
@@ -898,13 +897,13 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
if( pLastLn->GetTabBoxes().Count() < nSttBox ||
( pLastLn->GetTabBoxes().Count() - nSttBox ) <
pCpyLn->GetTabBoxes().Count() )
- return FALSE;
+ return sal_False;
// Test auf Verschachtelungen
for( nBx = 0; nBx < pCpyLn->GetTabBoxes().Count(); ++nBx )
if( !( pTmpBox = pLastLn->GetTabBoxes()[ nSttBox + nBx ])
->GetSttNd() )
- return FALSE;
+ return sal_False;
}
// es ist also Platz fuer das zu kopierende vorhanden, also
// fuege entsprechend neue Zeilen ein.
@@ -915,10 +914,10 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
if( pUndo
? !pUndo->InsertRow( *this, SelLineFromBox( pInsBox,
- aBoxes, TRUE ), nNewLns )
+ aBoxes, sal_True ), nNewLns )
: !InsertRow( pDoc, SelLineFromBox( pInsBox,
- aBoxes, TRUE ), nNewLns, TRUE ) )
- return FALSE;
+ aBoxes, sal_True ), nNewLns, sal_True ) )
+ return sal_False;
}
nTstLns = rCpyTbl.GetTabLines().Count(); // soviele Kopieren
@@ -926,7 +925,7 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
else if( 0 == (nFndCnt % rCpyTbl.GetTabLines().Count()) )
nTstLns = nFndCnt;
else
- return FALSE; // kein Platz fuer die Zeilen
+ return sal_False; // kein Platz fuer die Zeilen
for( nLn = 0; nLn < nTstLns; ++nLn )
{
@@ -953,14 +952,14 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
if( pLine->GetTabBoxes().Count() < nSttBox ||
( pLine->GetTabBoxes().Count() - nSttBox ) <
pFLine->GetBoxes().Count() )
- return FALSE;
+ return sal_False;
// Test auf Verschachtelungen
for( nBx = 0; nBx < pFLine->GetBoxes().Count(); ++nBx )
{
if( !( pTmpBox = pLine->GetTabBoxes()[ nSttBox + nBx ])
->GetSttNd() )
- return FALSE;
+ return sal_False;
// wenn Ok, fuege die Box in die FndLine zu
pFndBox = new _FndBox( pTmpBox, pInsFLine );
pInsFLine->GetBoxes().C40_INSERT( _FndBox, pFndBox, nBx );
@@ -972,14 +971,14 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
if( pLine->GetTabBoxes().Count() < nSttBox ||
( pLine->GetTabBoxes().Count() - nSttBox ) <
pCpyLn->GetTabBoxes().Count() )
- return FALSE;
+ return sal_False;
// Test auf Verschachtelungen
for( nBx = 0; nBx < pCpyLn->GetTabBoxes().Count(); ++nBx )
{
if( !( pTmpBox = pLine->GetTabBoxes()[ nSttBox + nBx ])
->GetSttNd() )
- return FALSE;
+ return sal_False;
// wenn Ok, fuege die Box in die FndLine zu
if( nBx == pFLine->GetBoxes().Count() )
{
@@ -994,17 +993,17 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
// (n-Fach)
if( 0 != ( pFLine->GetBoxes().Count() %
pCpyLn->GetTabBoxes().Count() ))
- return FALSE;
+ return sal_False;
// Test auf Verschachtelungen
for( nBx = 0; nBx < pFLine->GetBoxes().Count(); ++nBx )
if( !pFLine->GetBoxes()[ nBx ]->GetBox()->GetSttNd() )
- return FALSE;
+ return sal_False;
}
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
}
{
@@ -1021,9 +1020,9 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
if( 1 == rCpyTbl.GetTabSortBoxes().Count() )
{
SwTableBox *pTmpBx = rCpyTbl.GetTabSortBoxes()[0];
- for( USHORT n = 0; n < rSelBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rSelBoxes.Count(); ++n )
lcl_CpyBox( rCpyTbl, pTmpBx, *this,
- (SwTableBox*)rSelBoxes[n], TRUE, pUndo );
+ (SwTableBox*)rSelBoxes[n], sal_True, pUndo );
}
else
for( nLn = 0; nLn < aFndBox.GetLines().Count(); ++nLn )
@@ -1036,33 +1035,33 @@ BOOL SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
// Kopiere in pMyBox die pCpyBox
lcl_CpyBox( rCpyTbl, pCpyLn->GetTabBoxes()[
nBx % pCpyLn->GetTabBoxes().Count() ],
- *this, pFLine->GetBoxes()[ nBx ]->GetBox(), TRUE, pUndo );
+ *this, pFLine->GetBoxes()[ nBx ]->GetBox(), sal_True, pUndo );
}
}
aFndBox.MakeFrms( *this );
- return TRUE;
+ return sal_True;
}
-BOOL _FndCntntBox( const SwTableBox*& rpBox, void* pPara )
+sal_Bool _FndCntntBox( const SwTableBox*& rpBox, void* pPara )
{
SwTableBox* pBox = (SwTableBox*)rpBox;
if( rpBox->GetTabLines().Count() )
pBox->GetTabLines().ForEach( &_FndCntntLine, pPara );
else
((SwSelBoxes*)pPara)->Insert( pBox );
- return TRUE;
+ return sal_True;
}
-BOOL _FndCntntLine( const SwTableLine*& rpLine, void* pPara )
+sal_Bool _FndCntntLine( const SwTableLine*& rpLine, void* pPara )
{
((SwTableLine*)rpLine)->GetTabBoxes().ForEach( &_FndCntntBox, pPara );
- return TRUE;
+ return sal_True;
}
// suche alle Inhaltstragenden-Boxen dieser Box
SwSelBoxes& SwTable::SelLineFromBox( const SwTableBox* pBox,
- SwSelBoxes& rBoxes, BOOL bToTop ) const
+ SwSelBoxes& rBoxes, sal_Bool bToTop ) const
{
SwTableLine* pLine = (SwTableLine*)pBox->GetUpper();
if( bToTop )
@@ -1070,7 +1069,7 @@ SwSelBoxes& SwTable::SelLineFromBox( const SwTableBox* pBox,
pLine = pLine->GetUpper()->GetUpper();
// alle alten loeschen
- rBoxes.Remove( USHORT(0), rBoxes.Count() );
+ rBoxes.Remove( sal_uInt16(0), rBoxes.Count() );
pLine->GetTabBoxes().ForEach( &_FndCntntBox, &rBoxes );
return rBoxes;
}
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 01e831532b3e..92676eb272ab 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -53,7 +53,8 @@
#include <swundo.hxx>
#include <rowfrm.hxx>
#include <ddefld.hxx>
-#include <undobj.hxx>
+#include <hints.hxx>
+#include <UndoTable.hxx>
#include <cellatr.hxx>
#include <mvsave.hxx>
#include <swtblfmt.hxx>
@@ -99,10 +100,10 @@ struct _CpyTabFrm
_CpyTabFrm& operator=( const _CpyTabFrm& );
- BOOL operator==( const _CpyTabFrm& rCpyTabFrm )
- { return (ULONG)Value.nSize == (ULONG)rCpyTabFrm.Value.nSize; }
- BOOL operator<( const _CpyTabFrm& rCpyTabFrm )
- { return (ULONG)Value.nSize < (ULONG)rCpyTabFrm.Value.nSize; }
+ sal_Bool operator==( const _CpyTabFrm& rCpyTabFrm )
+ { return (sal_uLong)Value.nSize == (sal_uLong)rCpyTabFrm.Value.nSize; }
+ sal_Bool operator<( const _CpyTabFrm& rCpyTabFrm )
+ { return (sal_uLong)Value.nSize < (sal_uLong)rCpyTabFrm.Value.nSize; }
};
struct CR_SetBoxWidth
@@ -115,15 +116,15 @@ struct CR_SetBoxWidth
SwUndoTblNdsChg* pUndo;
SwTwips nDiff, nSide, nMaxSize, nLowerDiff;
TblChgMode nMode;
- USHORT nTblWidth, nRemainWidth, nBoxWidth;
- BOOL bBigger, bLeft, bSplittBox, bAnyBoxFnd;
+ sal_uInt16 nTblWidth, nRemainWidth, nBoxWidth;
+ sal_Bool bBigger, bLeft, bSplittBox, bAnyBoxFnd;
- CR_SetBoxWidth( USHORT eType, SwTwips nDif, SwTwips nSid, SwTwips nTblW,
+ CR_SetBoxWidth( sal_uInt16 eType, SwTwips nDif, SwTwips nSid, SwTwips nTblW,
SwTwips nMax, SwTableNode* pTNd )
: pTblNd( pTNd ),
nDiff( nDif ), nSide( nSid ), nMaxSize( nMax ), nLowerDiff( 0 ),
- nTblWidth( (USHORT)nTblW ), nRemainWidth( 0 ), nBoxWidth( 0 ),
- bSplittBox( FALSE ), bAnyBoxFnd( FALSE )
+ nTblWidth( (sal_uInt16)nTblW ), nRemainWidth( 0 ), nBoxWidth( 0 ),
+ bSplittBox( sal_False ), bAnyBoxFnd( sal_False )
{
bLeft = nsTblChgWidthHeightType::WH_COL_LEFT == ( eType & 0xff ) ||
nsTblChgWidthHeightType::WH_CELL_LEFT == ( eType & 0xff );
@@ -154,20 +155,20 @@ struct CR_SetBoxWidth
nLowerDiff = 0; nRemainWidth = 0;
}
- void AddBoxWidth( const SwTableBox& rBox, USHORT nWidth )
+ void AddBoxWidth( const SwTableBox& rBox, sal_uInt16 nWidth )
{
SwTableLinePtr p = (SwTableLine*)rBox.GetUpper();
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( aLines.Insert( p, nFndPos ))
aLinesWidth.Insert( nWidth, nFndPos );
else
aLinesWidth[ nFndPos ] = aLinesWidth[ nFndPos ] + nWidth;
}
- USHORT GetBoxWidth( const SwTableLine& rLn ) const
+ sal_uInt16 GetBoxWidth( const SwTableLine& rLn ) const
{
SwTableLinePtr p = (SwTableLine*)&rLn;
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( aLines.Seek_Entry( p, &nFndPos ) )
nFndPos = aLinesWidth[ nFndPos ];
else
@@ -176,20 +177,20 @@ struct CR_SetBoxWidth
}
};
-BOOL lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_DelSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_DelOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck );
-
-typedef BOOL (*FN_lcl_SetBoxWidth)(SwTableLine*, CR_SetBoxWidth&, SwTwips, BOOL );
+sal_Bool lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_DelSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_DelOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+
+typedef sal_Bool (*FN_lcl_SetBoxWidth)(SwTableLine*, CR_SetBoxWidth&, SwTwips, sal_Bool );
#if OSL_DEBUG_LEVEL > 1
@@ -198,13 +199,13 @@ void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize );
#define CHECKBOXWIDTH \
{ \
SwTwips nSize = GetFrmFmt()->GetFrmSize().GetWidth(); \
- for( USHORT nTmp = 0; nTmp < aLines.Count(); ++nTmp ) \
+ for( sal_uInt16 nTmp = 0; nTmp < aLines.Count(); ++nTmp ) \
::_CheckBoxWidth( *aLines[ nTmp ], nSize ); \
}
#define CHECKTABLELAYOUT \
{ \
- for ( USHORT i = 0; i < GetTabLines().Count(); ++i ) \
+ for ( sal_uInt16 i = 0; i < GetTabLines().Count(); ++i ) \
{ \
SwFrmFmt* pFmt = GetTabLines()[i]->GetFrmFmt(); \
SwClientIter aIter( *pFmt ); \
@@ -240,13 +241,13 @@ struct CR_SetLineHeight
SwUndoTblNdsChg* pUndo;
SwTwips nMaxSpace, nMaxHeight;
TblChgMode nMode;
- USHORT nLines;
- BOOL bBigger, bTop, bSplittBox, bAnyBoxFnd;
+ sal_uInt16 nLines;
+ sal_Bool bBigger, bTop, bSplittBox, bAnyBoxFnd;
- CR_SetLineHeight( USHORT eType, SwTableNode* pTNd )
+ CR_SetLineHeight( sal_uInt16 eType, SwTableNode* pTNd )
: pTblNd( pTNd ), pUndo( 0 ),
nMaxSpace( 0 ), nMaxHeight( 0 ), nLines( 0 ),
- bSplittBox( FALSE ), bAnyBoxFnd( FALSE )
+ bSplittBox( sal_False ), bAnyBoxFnd( sal_False )
{
bTop = nsTblChgWidthHeightType::WH_ROW_TOP == ( eType & 0xff ) || nsTblChgWidthHeightType::WH_CELL_TOP == ( eType & 0xff );
bBigger = 0 != (eType & nsTblChgWidthHeightType::WH_FLAG_BIGGER );
@@ -268,14 +269,14 @@ struct CR_SetLineHeight
}
};
-BOOL lcl_SetSelLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
- SwTwips nDist, BOOL bCheck );
-BOOL lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
- SwTwips nDist, BOOL bCheck );
+sal_Bool lcl_SetSelLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
+ SwTwips nDist, sal_Bool bCheck );
+sal_Bool lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
+ SwTwips nDist, sal_Bool bCheck );
-typedef BOOL (*FN_lcl_SetLineHeight)(SwTableLine*, CR_SetLineHeight&, SwTwips, BOOL );
+typedef sal_Bool (*FN_lcl_SetLineHeight)(SwTableLine*, CR_SetLineHeight&, SwTwips, sal_Bool );
_CpyTabFrm& _CpyTabFrm::operator=( const _CpyTabFrm& rCpyTabFrm )
{
@@ -291,21 +292,21 @@ void lcl_DelCpyTabFrmFmts( _CpyTabFrm& rArr );
struct _CpyPara
{
- boost::shared_ptr< std::vector< std::vector< ULONG > > > pWidths;
+ boost::shared_ptr< std::vector< std::vector< sal_uLong > > > pWidths;
SwDoc* pDoc;
SwTableNode* pTblNd;
_CpyTabFrms& rTabFrmArr;
SwTableLine* pInsLine;
SwTableBox* pInsBox;
- ULONG nOldSize, nNewSize; // zum Korrigieren der Size-Attribute
- ULONG nMinLeft, nMaxRight;
- USHORT nCpyCnt, nInsPos;
- USHORT nLnIdx, nBoxIdx;
- BYTE nDelBorderFlag;
- BOOL bCpyCntnt;
-
- _CpyPara( SwTableNode* pNd, USHORT nCopies, _CpyTabFrms& rFrmArr,
- BOOL bCopyContent = TRUE )
+ sal_uLong nOldSize, nNewSize; // zum Korrigieren der Size-Attribute
+ sal_uLong nMinLeft, nMaxRight;
+ sal_uInt16 nCpyCnt, nInsPos;
+ sal_uInt16 nLnIdx, nBoxIdx;
+ sal_uInt8 nDelBorderFlag;
+ sal_Bool bCpyCntnt;
+
+ _CpyPara( SwTableNode* pNd, sal_uInt16 nCopies, _CpyTabFrms& rFrmArr,
+ sal_Bool bCopyContent = sal_True )
: pDoc( pNd->GetDoc() ), pTblNd( pNd ), rTabFrmArr(rFrmArr),
pInsLine(0), pInsBox(0), nOldSize(0), nNewSize(0),
nMinLeft(ULONG_MAX), nMaxRight(0),
@@ -332,7 +333,7 @@ struct _CpyPara
void SetBoxWidth( SwTableBox* pBox );
};
-BOOL lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
+sal_Bool lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
{
_CpyPara* pCpyPara = (_CpyPara*)pPara;
@@ -340,7 +341,7 @@ BOOL lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
SwTableBox* pBox = (SwTableBox*)rpFndBox->GetBox();
_CpyTabFrm aFindFrm( (SwTableBoxFmt*)pBox->GetFrmFmt() );
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( pCpyPara->nCpyCnt )
{
if( !pCpyPara->rTabFrmArr.Seek_Entry( aFindFrm, &nFndPos ))
@@ -366,7 +367,7 @@ BOOL lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
// die erste Line sollte reichen
_FndBoxes& rFndBoxes = pCmpLine->GetBoxes();
long nSz = 0;
- for( USHORT n = rFndBoxes.Count(); n; )
+ for( sal_uInt16 n = rFndBoxes.Count(); n; )
nSz += rFndBoxes[ --n ]->GetBox()->GetFrmFmt()->GetFrmSize().GetWidth();
aFrmSz.SetWidth( aFrmSz.GetWidth() -
nSz / ( pCpyPara->nCpyCnt + 1 ) );
@@ -458,10 +459,10 @@ BOOL lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
}
}
}
- return TRUE;
+ return sal_True;
}
-BOOL lcl_CopyRow( const _FndLine*& rpFndLine, void* pPara )
+sal_Bool lcl_CopyRow( const _FndLine*& rpFndLine, void* pPara )
{
_CpyPara* pCpyPara = (_CpyPara*)pPara;
SwTableLine* pNewLine = new SwTableLine(
@@ -481,11 +482,11 @@ BOOL lcl_CopyRow( const _FndLine*& rpFndLine, void* pPara )
((_FndLine*)rpFndLine)->GetBoxes().ForEach( &lcl_CopyCol, &aPara );
pCpyPara->nDelBorderFlag &= 0xf8;
- return TRUE;
+ return sal_True;
}
-void lcl_InsCol( _FndLine* pFndLn, _CpyPara& rCpyPara, USHORT nCpyCnt,
- BOOL bBehind )
+void lcl_InsCol( _FndLine* pFndLn, _CpyPara& rCpyPara, sal_uInt16 nCpyCnt,
+ sal_Bool bBehind )
{
// Bug 29124: nicht nur in den Grundlines kopieren. Wenns geht, so weit
// runter wie moeglich.
@@ -494,7 +495,7 @@ void lcl_InsCol( _FndLine* pFndLn, _CpyPara& rCpyPara, USHORT nCpyCnt,
!( pFBox = pFndLn->GetBoxes()[ 0 ] )->GetBox()->GetSttNd() )
{
// eine Box mit mehreren Lines, also in diese Lines einfuegen
- for( USHORT n = 0; n < pFBox->GetLines().Count(); ++n )
+ for( sal_uInt16 n = 0; n < pFBox->GetLines().Count(); ++n )
lcl_InsCol( pFBox->GetLines()[ n ], rCpyPara, nCpyCnt, bBehind );
}
else
@@ -506,7 +507,7 @@ void lcl_InsCol( _FndLine* pFndLn, _CpyPara& rCpyPara, USHORT nCpyCnt,
if( bBehind )
++rCpyPara.nInsPos;
- for( USHORT n = 0; n < nCpyCnt; ++n )
+ for( sal_uInt16 n = 0; n < nCpyCnt; ++n )
{
if( n + 1 == nCpyCnt && bBehind )
rCpyPara.nDelBorderFlag = 9;
@@ -527,14 +528,14 @@ SwRowFrm* GetRowFrm( SwTableLine& rLine )
return 0;
}
-BOOL SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt, BOOL bBehind )
+sal_Bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool bBehind )
{
OSL_ENSURE( rBoxes.Count() && nCnt, "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
- BOOL bRes = TRUE;
+ sal_Bool bRes = sal_True;
if( IsNewModel() )
bRes = NewInsertCol( pDoc, rBoxes, nCnt, bBehind );
else
@@ -546,7 +547,7 @@ BOOL SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt, BOO
GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
@@ -560,7 +561,7 @@ BOOL SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt, BOO
_CpyTabFrms aTabFrmArr;
_CpyPara aCpyPara( pTblNd, nCnt, aTabFrmArr );
- for( USHORT n = 0; n < aFndBox.GetLines().Count(); ++n )
+ for( sal_uInt16 n = 0; n < aFndBox.GetLines().Count(); ++n )
lcl_InsCol( aFndBox.GetLines()[ n ], aCpyPara, nCnt, bBehind );
// dann raeume die Struktur dieser Line noch mal auf, generell alle
@@ -571,7 +572,7 @@ BOOL SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt, BOO
CHECKBOXWIDTH;
CHECKTABLELAYOUT;
- bRes = TRUE;
+ bRes = sal_True;
}
SwChartDataProvider *pPCD = pDoc->GetChartDataProvider();
@@ -582,13 +583,13 @@ BOOL SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt, BOO
return bRes;
}
-BOOL SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
- USHORT nCnt, BOOL bBehind )
+sal_Bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
+ sal_uInt16 nCnt, sal_Bool bBehind )
{
OSL_ENSURE( pDoc && rBoxes.Count() && nCnt, "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// suche alle Boxen / Lines
_FndBox aFndBox( 0, 0 );
@@ -597,7 +598,7 @@ BOOL SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
@@ -617,7 +618,7 @@ BOOL SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
}
//Lines fuer das Layout-Update herausuchen.
- const BOOL bLayout = !IsNewModel() &&
+ const sal_Bool bLayout = !IsNewModel() &&
0 != SwClientIter( *GetFrmFmt() ).First( TYPE(SwTabFrm) );
if ( bLayout )
@@ -650,7 +651,7 @@ BOOL SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
else
aCpyPara.nDelBorderFlag = 2;
- for( USHORT nCpyCnt = 0; nCpyCnt < nCnt; ++nCpyCnt )
+ for( sal_uInt16 nCpyCnt = 0; nCpyCnt < nCnt; ++nCpyCnt )
{
if( bBehind )
aCpyPara.nDelBorderFlag = 1;
@@ -678,12 +679,12 @@ BOOL SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
pPCD->AddRowCols( *this, rBoxes, nCnt, bBehind );
pDoc->UpdateCharts( GetFrmFmt()->GetName() );
- return TRUE;
+ return sal_True;
}
-BOOL _FndBoxAppendRowLine( const SwTableLine*& rpLine, void* pPara );
+sal_Bool _FndBoxAppendRowLine( const SwTableLine*& rpLine, void* pPara );
-BOOL _FndBoxAppendRowBox( const SwTableBox*& rpBox, void* pPara )
+sal_Bool _FndBoxAppendRowBox( const SwTableBox*& rpBox, void* pPara )
{
_FndPara* pFndPara = (_FndPara*)pPara;
_FndBox* pFndBox = new _FndBox( (SwTableBox*)rpBox, pFndPara->pFndLine );
@@ -697,10 +698,10 @@ BOOL _FndBoxAppendRowBox( const SwTableBox*& rpBox, void* pPara )
else
pFndPara->pFndLine->GetBoxes().C40_INSERT( _FndBox, pFndBox,
pFndPara->pFndLine->GetBoxes().Count() );
- return TRUE;
+ return sal_True;
}
-BOOL _FndBoxAppendRowLine( const SwTableLine*& rpLine, void* pPara )
+sal_Bool _FndBoxAppendRowLine( const SwTableLine*& rpLine, void* pPara )
{
_FndPara* pFndPara = (_FndPara*)pPara;
_FndLine* pFndLine = new _FndLine( (SwTableLine*)rpLine, pFndPara->pFndBox );
@@ -713,14 +714,14 @@ BOOL _FndBoxAppendRowLine( const SwTableLine*& rpLine, void* pPara )
}
else
delete pFndLine;
- return TRUE;
+ return sal_True;
}
-BOOL SwTable::AppendRow( SwDoc* pDoc, USHORT nCnt )
+sal_Bool SwTable::AppendRow( SwDoc* pDoc, sal_uInt16 nCnt )
{
SwTableNode* pTblNd = (SwTableNode*)aSortCntBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// suche alle Boxen / Lines
_FndBox aFndBox( 0, 0 );
@@ -733,12 +734,12 @@ BOOL SwTable::AppendRow( SwDoc* pDoc, USHORT nCnt )
_FndBoxAppendRowLine( pLLine, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
//Lines fuer das Layout-Update herausuchen.
- const BOOL bLayout = 0 != SwClientIter( *GetFrmFmt() ).First( TYPE(SwTabFrm) );
+ const sal_Bool bLayout = 0 != SwClientIter( *GetFrmFmt() ).First( TYPE(SwTabFrm) );
if( bLayout )
{
aFndBox.SetTableLines( *this );
@@ -751,7 +752,7 @@ BOOL SwTable::AppendRow( SwDoc* pDoc, USHORT nCnt )
aCpyPara.nInsPos = GetTabLines().Count();
aCpyPara.nDelBorderFlag = 1;
- for( USHORT nCpyCnt = 0; nCpyCnt < nCnt; ++nCpyCnt )
+ for( sal_uInt16 nCpyCnt = 0; nCpyCnt < nCnt; ++nCpyCnt )
{
aCpyPara.nDelBorderFlag = 1;
aFndBox.GetLines().ForEach( &lcl_CopyRow, &aCpyPara );
@@ -764,7 +765,7 @@ BOOL SwTable::AppendRow( SwDoc* pDoc, USHORT nCnt )
//Layout updaten
if ( bLayout )
{
- aFndBox.MakeNewFrms( *this, nCnt, TRUE );
+ aFndBox.MakeNewFrms( *this, nCnt, sal_True );
}
// TL_CHART2: need to inform chart of probably changed cell names
pDoc->UpdateCharts( GetFrmFmt()->GetName() );
@@ -772,22 +773,22 @@ BOOL SwTable::AppendRow( SwDoc* pDoc, USHORT nCnt )
CHECKBOXWIDTH;
CHECKTABLELAYOUT;
- return TRUE;
+ return sal_True;
}
void lcl_LastBoxSetWidth( SwTableBoxes &rBoxes, const long nOffset,
- BOOL bFirst, SwShareBoxFmts& rShareFmts );
+ sal_Bool bFirst, SwShareBoxFmts& rShareFmts );
void lcl_LastBoxSetWidthLine( SwTableLines &rLines, const long nOffset,
- BOOL bFirst, SwShareBoxFmts& rShareFmts )
+ sal_Bool bFirst, SwShareBoxFmts& rShareFmts )
{
- for ( USHORT i = 0; i < rLines.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
::lcl_LastBoxSetWidth( rLines[i]->GetTabBoxes(), nOffset, bFirst,
rShareFmts );
}
void lcl_LastBoxSetWidth( SwTableBoxes &rBoxes, const long nOffset,
- BOOL bFirst, SwShareBoxFmts& rShareFmts )
+ sal_Bool bFirst, SwShareBoxFmts& rShareFmts )
{
SwTableBox& rBox = *rBoxes[ bFirst ? 0 : rBoxes.Count() - 1 ];
if( !rBox.GetSttNd() )
@@ -814,7 +815,7 @@ void lcl_LastBoxSetWidth( SwTableBoxes &rBoxes, const long nOffset,
}
void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
- BOOL bCalcNewSize, const BOOL bCorrBorder,
+ sal_Bool bCalcNewSize, const sal_Bool bCorrBorder,
SwShareBoxFmts* pShareFmts )
{
do {
@@ -822,13 +823,13 @@ void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
pBox->GetFrmFmt()->GetFrmSize().GetWidth() : 0;
SwTableLine* pLine = pBox->GetUpper();
SwTableBoxes& rTblBoxes = pLine->GetTabBoxes();
- USHORT nDelPos = rTblBoxes.C40_GETPOS( SwTableBox, pBox );
+ sal_uInt16 nDelPos = rTblBoxes.C40_GETPOS( SwTableBox, pBox );
SwTableBox* pUpperBox = pBox->GetUpper()->GetUpper();
// Sonderbehandlung fuer Umrandung:
if( bCorrBorder && 1 < rTblBoxes.Count() )
{
- BOOL bChgd = FALSE;
+ sal_Bool bChgd = sal_False;
const SvxBoxItem& rBoxItem = pBox->GetFrmFmt()->GetBox();
if( rBoxItem.GetLeft() || rBoxItem.GetRight() )
@@ -853,7 +854,7 @@ void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
pShareFmts->SetAttr( *pNxtBox, aTmp );
else
pNxtBox->ClaimFrmFmt()->SetFmtAttr( aTmp );
- bChgd = TRUE;
+ bChgd = sal_True;
}
}
if( !bChgd && nDelPos )
@@ -900,7 +901,7 @@ void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
if( rTblBoxes.Count() )
{
// dann passe noch die Frame-SSize an
- BOOL bLastBox = nDelPos == rTblBoxes.Count();
+ sal_Bool bLastBox = nDelPos == rTblBoxes.Count();
if( bLastBox )
--nDelPos;
pBox = rTblBoxes[nDelPos];
@@ -948,8 +949,8 @@ void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
SwTableBox* lcl_FndNxtPrvDelBox( const SwTableLines& rTblLns,
SwTwips nBoxStt, SwTwips nBoxWidth,
- USHORT nLinePos, BOOL bNxt,
- SwSelBoxes* pAllDelBoxes, USHORT* pCurPos )
+ sal_uInt16 nLinePos, sal_Bool bNxt,
+ SwSelBoxes* pAllDelBoxes, sal_uInt16* pCurPos )
{
SwTableBox* pFndBox = 0;
do {
@@ -960,10 +961,10 @@ SwTableBox* lcl_FndNxtPrvDelBox( const SwTableLines& rTblLns,
SwTableLine* pLine = rTblLns[ nLinePos ];
SwTwips nFndBoxWidth = 0;
SwTwips nFndWidth = nBoxStt + nBoxWidth;
- USHORT nBoxCnt = pLine->GetTabBoxes().Count();
+ sal_uInt16 nBoxCnt = pLine->GetTabBoxes().Count();
pFndBox = pLine->GetTabBoxes()[ 0 ];
- for( USHORT n = 0; 0 < nFndWidth && n < nBoxCnt; ++n )
+ for( sal_uInt16 n = 0; 0 < nFndWidth && n < nBoxCnt; ++n )
{
pFndBox = pLine->GetTabBoxes()[ n ];
nFndWidth -= (nFndBoxWidth = pFndBox->GetFrmFmt()->
@@ -986,7 +987,7 @@ SwTableBox* lcl_FndNxtPrvDelBox( const SwTableLines& rTblLns,
else if( pAllDelBoxes )
{
// falls der Vorganger auch geloscht wird, ist nicht zu tun
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( !pAllDelBoxes->Seek_Entry( pFndBox, &nFndPos ) )
break;
@@ -1004,45 +1005,45 @@ SwTableBox* lcl_FndNxtPrvDelBox( const SwTableLines& rTblLns,
void lcl_SaveUpperLowerBorder( SwTable& rTbl, const SwTableBox& rBox,
SwShareBoxFmts& rShareFmts,
SwSelBoxes* pAllDelBoxes = 0,
- USHORT* pCurPos = 0 )
+ sal_uInt16* pCurPos = 0 )
{
//JP 16.04.97: 2.Teil fuer Bug 36271
- BOOL bChgd = FALSE;
+ sal_Bool bChgd = sal_False;
const SwTableLine* pLine = rBox.GetUpper();
const SwTableBoxes& rTblBoxes = pLine->GetTabBoxes();
const SwTableBox* pUpperBox = &rBox;
- USHORT nDelPos = rTblBoxes.C40_GETPOS( SwTableBox, pUpperBox );
+ sal_uInt16 nDelPos = rTblBoxes.C40_GETPOS( SwTableBox, pUpperBox );
pUpperBox = rBox.GetUpper()->GetUpper();
const SvxBoxItem& rBoxItem = rBox.GetFrmFmt()->GetBox();
// dann die unteren/oberen Kanten
if( rBoxItem.GetTop() || rBoxItem.GetBottom() )
{
- bChgd = FALSE;
+ bChgd = sal_False;
const SwTableLines* pTblLns;
if( pUpperBox )
pTblLns = &pUpperBox->GetTabLines();
else
pTblLns = &rTbl.GetTabLines();
- USHORT nLnPos = pTblLns->GetPos( pLine );
+ sal_uInt16 nLnPos = pTblLns->GetPos( pLine );
// bestimme die Attr.Position der akt. zu loeschenden Box
// und suche dann in der unteren / oberen Line die entspr.
// Gegenstuecke
SwTwips nBoxStt = 0;
- for( USHORT n = 0; n < nDelPos; ++n )
+ for( sal_uInt16 n = 0; n < nDelPos; ++n )
nBoxStt += rTblBoxes[ n ]->GetFrmFmt()->GetFrmSize().GetWidth();
SwTwips nBoxWidth = rBox.GetFrmFmt()->GetFrmSize().GetWidth();
SwTableBox *pPrvBox = 0, *pNxtBox = 0;
if( nLnPos ) // Vorgaenger?
pPrvBox = ::lcl_FndNxtPrvDelBox( *pTblLns, nBoxStt, nBoxWidth,
- nLnPos, FALSE, pAllDelBoxes, pCurPos );
+ nLnPos, sal_False, pAllDelBoxes, pCurPos );
if( nLnPos + 1 < pTblLns->Count() ) // Nachfolger?
pNxtBox = ::lcl_FndNxtPrvDelBox( *pTblLns, nBoxStt, nBoxWidth,
- nLnPos, TRUE, pAllDelBoxes, pCurPos );
+ nLnPos, sal_True, pAllDelBoxes, pCurPos );
if( pNxtBox && pNxtBox->GetSttNd() )
{
@@ -1055,7 +1056,7 @@ void lcl_SaveUpperLowerBorder( SwTable& rTbl, const SwTableBox& rBox,
: rBoxItem.GetBottom(),
BOX_LINE_TOP );
rShareFmts.SetAttr( *pNxtBox, aTmp );
- bChgd = TRUE;
+ bChgd = sal_True;
}
}
if( !bChgd && pPrvBox && pPrvBox->GetSttNd() )
@@ -1075,12 +1076,12 @@ void lcl_SaveUpperLowerBorder( SwTable& rTbl, const SwTableBox& rBox,
}
}
-BOOL SwTable::DeleteSel(
+sal_Bool SwTable::DeleteSel(
SwDoc* pDoc
,
const SwSelBoxes& rBoxes,
const SwSelBoxes* pMerged, SwUndo* pUndo,
- const BOOL bDelMakeFrms, const BOOL bCorrBorder )
+ const sal_Bool bDelMakeFrms, const sal_Bool bCorrBorder )
{
OSL_ENSURE( pDoc, "No doc?" );
SwTableNode* pTblNd = 0;
@@ -1088,7 +1089,7 @@ BOOL SwTable::DeleteSel(
{
pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
}
SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
@@ -1111,7 +1112,7 @@ BOOL SwTable::DeleteSel(
{
SwSelBoxes aBoxes;
aBoxes.Insert( &rBoxes );
- for( USHORT n = 0; n < aBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aBoxes.Count(); ++n )
::lcl_SaveUpperLowerBorder( *this, *rBoxes[ n ], aShareFmts,
&aBoxes, &n );
}
@@ -1121,9 +1122,9 @@ BOOL SwTable::DeleteSel(
SwChartDataProvider *pPCD = pDoc->GetChartDataProvider();
//
// delete boxes from last to first
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
- USHORT nIdx = rBoxes.Count() - 1 - n;
+ sal_uInt16 nIdx = rBoxes.Count() - 1 - n;
// first adapt the data-sequence for chart if necessary
// (needed to move the implementation cursor properly to it's new
@@ -1132,7 +1133,7 @@ BOOL SwTable::DeleteSel(
pPCD->DeleteBox( &pTblNd->GetTable(), *rBoxes[nIdx] );
// ... then delete the boxes
- _DeleteBox( *this, rBoxes[nIdx], pUndo, TRUE, bCorrBorder, &aShareFmts );
+ _DeleteBox( *this, rBoxes[nIdx], pUndo, sal_True, bCorrBorder, &aShareFmts );
}
// dann raeume die Struktur aller Lines auf
@@ -1147,16 +1148,16 @@ BOOL SwTable::DeleteSel(
CHECKTABLELAYOUT;
CHECK_TABLE( *this );
- return TRUE;
+ return sal_True;
}
-BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
- BOOL bSameHeight )
+sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt,
+ sal_Bool bSameHeight )
{
OSL_ENSURE( pDoc && rBoxes.Count() && nCnt, "keine gueltigen Werte" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// TL_CHART2: splitting/merging of a number of cells or rows will usually make
// the table to complex to be handled with chart.
@@ -1171,7 +1172,7 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
if ( bSameHeight )
{
pRowHeights = new long[ rBoxes.Count() ];
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox* pSelBox = *( rBoxes.GetData() + n );
const SwRowFrm* pRow = GetRowFrm( *pSelBox->GetUpper() );
@@ -1186,7 +1187,7 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
aFndBox.SetTableLines( rBoxes, *this );
aFndBox.DelFrms( *this );
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox* pSelBox = *( rBoxes.GetData() + n );
OSL_ENSURE( pSelBox, "Box steht nicht in der Tabelle" );
@@ -1200,13 +1201,13 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
if ( bSameHeight && ATT_VAR_SIZE == aFSz.GetHeightSizeType() )
aFSz.SetHeightSizeType( ATT_MIN_SIZE );
- BOOL bChgLineSz = 0 != aFSz.GetHeight() || bSameHeight;
+ sal_Bool bChgLineSz = 0 != aFSz.GetHeight() || bSameHeight;
if ( bChgLineSz )
aFSz.SetHeight( ( bSameHeight ? pRowHeights[ n ] : aFSz.GetHeight() ) /
(nCnt + 1) );
SwTableBox* pNewBox = new SwTableBox( pFrmFmt, nCnt, pInsLine );
- USHORT nBoxPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, pSelBox );
+ sal_uInt16 nBoxPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, pSelBox );
pInsLine->GetTabBoxes().Remove( nBoxPos ); // alte loeschen
pInsLine->GetTabBoxes().C40_INSERT( SwTableBox, pNewBox, nBoxPos );
@@ -1214,24 +1215,24 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
SwTableBox* pLastBox = pSelBox; // zum verteilen der TextNodes !!
// sollte Bereiche in der Box stehen, dann bleibt sie so bestehen
// !! FALLS DAS GEAENDERT WIRD MUSS DAS UNDO ANGEPASST WERDEN !!!
- BOOL bMoveNodes = TRUE;
+ sal_Bool bMoveNodes = sal_True;
{
- ULONG nSttNd = pLastBox->GetSttIdx() + 1,
+ sal_uLong nSttNd = pLastBox->GetSttIdx() + 1,
nEndNd = pLastBox->GetSttNd()->EndOfSectionIndex();
while( nSttNd < nEndNd )
if( !pDoc->GetNodes()[ nSttNd++ ]->IsTxtNode() )
{
- bMoveNodes = FALSE;
+ bMoveNodes = sal_False;
break;
}
}
SwTableBoxFmt* pCpyBoxFrmFmt = (SwTableBoxFmt*)pSelBox->GetFrmFmt();
- BOOL bChkBorder = 0 != pCpyBoxFrmFmt->GetBox().GetTop();
+ sal_Bool bChkBorder = 0 != pCpyBoxFrmFmt->GetBox().GetTop();
if( bChkBorder )
pCpyBoxFrmFmt = (SwTableBoxFmt*)pSelBox->ClaimFrmFmt();
- for( USHORT i = 0; i <= nCnt; ++i )
+ for( sal_uInt16 i = 0; i <= nCnt; ++i )
{
// also erstmal eine neue Linie in der neuen Box
SwTableLine* pNewLine = new SwTableLine(
@@ -1259,7 +1260,7 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
SvxBoxItem aTmp( pCpyBoxFrmFmt->GetBox() );
aTmp.SetLine( 0, BOX_LINE_TOP );
pCpyBoxFrmFmt->SetFmtAttr( aTmp );
- bChkBorder = FALSE;
+ bChkBorder = sal_False;
}
if( bMoveNodes )
@@ -1271,7 +1272,7 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
SwNodeRange aRg( *pLastBox->GetSttNd(), +2, *pEndNd );
pLastBox = pNewLine->GetTabBoxes()[0]; // neu setzen
SwNodeIndex aInsPos( *pLastBox->GetSttNd(), 1 );
- pDoc->GetNodes()._MoveNodes(aRg, pDoc->GetNodes(), aInsPos, FALSE);
+ pDoc->GetNodes()._MoveNodes(aRg, pDoc->GetNodes(), aInsPos, sal_False);
pDoc->GetNodes().Delete( aInsPos, 1 ); // den leeren noch loeschen
}
}
@@ -1291,15 +1292,15 @@ BOOL SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
CHECKBOXWIDTH
CHECKTABLELAYOUT
- return TRUE;
+ return sal_True;
}
-BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
+sal_Bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt )
{
OSL_ENSURE( pDoc && rBoxes.Count() && nCnt, "keine gueltigen Werte" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// TL_CHART2: splitting/merging of a number of cells or rows will usually make
// the table to complex to be handled with chart.
@@ -1318,8 +1319,8 @@ BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
_CpyTabFrms aFrmArr;
SvPtrarr aLastBoxArr;
- USHORT nFndPos;
- for( USHORT n = 0; n < aSelBoxes.Count(); ++n )
+ sal_uInt16 nFndPos;
+ for( sal_uInt16 n = 0; n < aSelBoxes.Count(); ++n )
{
SwTableBox* pSelBox = *( aSelBoxes.GetData() + n );
OSL_ENSURE( pSelBox, "Box steht nicht in der Tabelle" );
@@ -1330,7 +1331,7 @@ BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
// dann teile die Box nCnt in nCnt Boxen
SwTableLine* pInsLine = pSelBox->GetUpper();
- USHORT nBoxPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, pSelBox );
+ sal_uInt16 nBoxPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, pSelBox );
// suche das FrmFmt im Array aller Frame-Formate
SwTableBoxFmt* pLastBoxFmt;
@@ -1365,7 +1366,7 @@ BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
}
// dann fuege mal an der Position die neuen Boxen ein
- for( USHORT i = 1; i < nCnt; ++i )
+ for( sal_uInt16 i = 1; i < nCnt; ++i )
::_InsTblBox( pDoc, pTblNd, pInsLine, aFindFrm.pNewFrmFmt,
pSelBox, nBoxPos + i ); // dahinter einfuegen
@@ -1383,7 +1384,7 @@ BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
aFindFrm.pNewFrmFmt->SetFmtAttr( aTmp );
// und dann das Format aus dem "cache" entfernen
- for( USHORT i = aFrmArr.Count(); i; )
+ for( sal_uInt16 i = aFrmArr.Count(); i; )
{
const _CpyTabFrm& rCTF = aFrmArr[ --i ];
if( rCTF.pNewFrmFmt == aFindFrm.pNewFrmFmt ||
@@ -1401,7 +1402,7 @@ BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
CHECKBOXWIDTH
CHECKTABLELAYOUT
- return TRUE;
+ return sal_True;
}
/*
@@ -1418,12 +1419,12 @@ BOOL SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt )
----------------------- >> MERGE << ------------------------
*/
-void lcl_CpyLines( USHORT nStt, USHORT nEnd,
+void lcl_CpyLines( sal_uInt16 nStt, sal_uInt16 nEnd,
SwTableLines& rLines,
SwTableBox* pInsBox,
- USHORT nPos = USHRT_MAX )
+ sal_uInt16 nPos = USHRT_MAX )
{
- for( USHORT n = nStt; n < nEnd; ++n )
+ for( sal_uInt16 n = nStt; n < nEnd; ++n )
rLines[n]->SetUpper( pInsBox );
if( USHRT_MAX == nPos )
nPos = pInsBox->GetTabLines().Count();
@@ -1431,12 +1432,12 @@ void lcl_CpyLines( USHORT nStt, USHORT nEnd,
rLines.Remove( nStt, nEnd - nStt );
}
-void lcl_CpyBoxes( USHORT nStt, USHORT nEnd,
+void lcl_CpyBoxes( sal_uInt16 nStt, sal_uInt16 nEnd,
SwTableBoxes& rBoxes,
SwTableLine* pInsLine,
- USHORT nPos = USHRT_MAX )
+ sal_uInt16 nPos = USHRT_MAX )
{
- for( USHORT n = nStt; n < nEnd; ++n )
+ for( sal_uInt16 n = nStt; n < nEnd; ++n )
rBoxes[n]->SetUpper( pInsLine );
if( USHRT_MAX == nPos )
nPos = pInsLine->GetTabBoxes().Count();
@@ -1454,7 +1455,7 @@ void lcl_CalcWidth( SwTableBox* pBox )
OSL_ENSURE( pLine, "Box steht in keiner Line" );
long nWidth = 0;
- for( USHORT n = 0; n < pLine->GetTabBoxes().Count(); ++n )
+ for( sal_uInt16 n = 0; n < pLine->GetTabBoxes().Count(); ++n )
nWidth += pLine->GetTabBoxes()[n]->GetFrmFmt()->GetFrmSize().GetWidth();
pFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nWidth, 0 ));
@@ -1469,14 +1470,14 @@ struct _InsULPara
SwTableNode* pTblNd;
SwTableLine* pInsLine;
SwTableBox* pInsBox;
- BOOL bUL_LR : 1; // Upper-Lower(TRUE) oder Left-Right(FALSE) ?
- BOOL bUL : 1; // Upper-Left(TRUE) oder Lower-Right(FALSE) ?
+ sal_Bool bUL_LR : 1; // Upper-Lower(sal_True) oder Left-Right(sal_False) ?
+ sal_Bool bUL : 1; // Upper-Left(sal_True) oder Lower-Right(sal_False) ?
SwTableBox* pLeftBox;
SwTableBox* pRightBox;
SwTableBox* pMergeBox;
- _InsULPara( SwTableNode* pTNd, BOOL bUpperLower, BOOL bUpper,
+ _InsULPara( SwTableNode* pTNd, sal_Bool bUpperLower, sal_Bool bUpper,
SwTableBox* pLeft, SwTableBox* pMerge, SwTableBox* pRight,
SwTableLine* pLine=0, SwTableBox* pBox=0 )
: pTblNd( pTNd ), pInsLine( pLine ), pInsBox( pBox ),
@@ -1484,25 +1485,25 @@ struct _InsULPara
{ bUL_LR = bUpperLower; bUL = bUpper; }
void SetLeft( SwTableBox* pBox=0 )
- { bUL_LR = FALSE; bUL = TRUE; if( pBox ) pInsBox = pBox; }
+ { bUL_LR = sal_False; bUL = sal_True; if( pBox ) pInsBox = pBox; }
void SetRight( SwTableBox* pBox=0 )
- { bUL_LR = FALSE; bUL = FALSE; if( pBox ) pInsBox = pBox; }
+ { bUL_LR = sal_False; bUL = sal_False; if( pBox ) pInsBox = pBox; }
void SetUpper( SwTableLine* pLine=0 )
- { bUL_LR = TRUE; bUL = TRUE; if( pLine ) pInsLine = pLine; }
+ { bUL_LR = sal_True; bUL = sal_True; if( pLine ) pInsLine = pLine; }
void SetLower( SwTableLine* pLine=0 )
- { bUL_LR = TRUE; bUL = FALSE; if( pLine ) pInsLine = pLine; }
+ { bUL_LR = sal_True; bUL = sal_False; if( pLine ) pInsLine = pLine; }
};
-BOOL lcl_Merge_MoveBox( const _FndBox*& rpFndBox, void* pPara )
+sal_Bool lcl_Merge_MoveBox( const _FndBox*& rpFndBox, void* pPara )
{
_InsULPara* pULPara = (_InsULPara*)pPara;
SwTableBoxes* pBoxes;
- USHORT nStt = 0, nEnd = rpFndBox->GetLines().Count();
- USHORT nInsPos = USHRT_MAX;
+ sal_uInt16 nStt = 0, nEnd = rpFndBox->GetLines().Count();
+ sal_uInt16 nInsPos = USHRT_MAX;
if( !pULPara->bUL_LR ) // Left/Right
{
- USHORT nPos;
+ sal_uInt16 nPos;
SwTableBox* pFndBox = (SwTableBox*)rpFndBox->GetBox();
pBoxes = &pFndBox->GetUpper()->GetTabBoxes();
if( pULPara->bUL ) // Left ?
@@ -1549,19 +1550,19 @@ BOOL lcl_Merge_MoveBox( const _FndBox*& rpFndBox, void* pPara )
else
delete pBox;
}
- return TRUE;
+ return sal_True;
}
-BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
+sal_Bool lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
{
_InsULPara* pULPara = (_InsULPara*)pPara;
SwTableLines* pLines;
- USHORT nStt = 0, nEnd = rpFndLine->GetBoxes().Count();
- USHORT nInsPos = USHRT_MAX;
+ sal_uInt16 nStt = 0, nEnd = rpFndLine->GetBoxes().Count();
+ sal_uInt16 nInsPos = USHRT_MAX;
if( pULPara->bUL_LR ) // UpperLower ?
{
- USHORT nPos;
+ sal_uInt16 nPos;
SwTableLine* pFndLn = (SwTableLine*)rpFndLine->GetLine();
pLines = pFndLn->GetUpper() ?
&pFndLn->GetUpper()->GetTabLines() :
@@ -1570,8 +1571,8 @@ BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
SwTableBox* pLBx = rpFndLine->GetBoxes()[0]->GetBox();
SwTableBox* pRBx = rpFndLine->GetBoxes()[
rpFndLine->GetBoxes().Count()-1]->GetBox();
- USHORT nLeft = pFndLn->GetTabBoxes().C40_GETPOS( SwTableBox, pLBx );
- USHORT nRight = pFndLn->GetTabBoxes().C40_GETPOS( SwTableBox, pRBx );
+ sal_uInt16 nLeft = pFndLn->GetTabBoxes().C40_GETPOS( SwTableBox, pLBx );
+ sal_uInt16 nRight = pFndLn->GetTabBoxes().C40_GETPOS( SwTableBox, pRBx );
if( !nLeft || nRight == pFndLn->GetTabBoxes().Count() )
{
@@ -1649,7 +1650,7 @@ BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
// Right auch mit in die Line
pInsLine = pULPara->pLeftBox->GetUpper();
- USHORT nMvPos = pULPara->pRightBox->GetUpper()->GetTabBoxes().
+ sal_uInt16 nMvPos = pULPara->pRightBox->GetUpper()->GetTabBoxes().
C40_GETPOS( SwTableBox, pULPara->pRightBox );
lcl_CpyBoxes( nMvPos, nMvPos+1,
pULPara->pRightBox->GetUpper()->GetTabBoxes(),
@@ -1671,7 +1672,7 @@ BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
pRMBox = new SwTableBox( (SwTableBoxFmt*)pRMBox->GetFrmFmt(), 0, pNewLn );
pNewLn->GetTabBoxes().C40_INSERT( SwTableBox, pRMBox, 0 );
- USHORT nPos1, nPos2;
+ sal_uInt16 nPos1, nPos2;
if( pULPara->bUL )
nPos1 = 0,
nPos2 = nMvPos;
@@ -1702,7 +1703,7 @@ BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
lcl_CalcWidth( pRMBox ); // bereche die Breite der Box
}
else {
- OSL_ENSURE( FALSE , "Was denn nun" );
+ OSL_ENSURE( sal_False, "Was denn nun" );
}
}
// Left/Right
@@ -1729,16 +1730,16 @@ BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
else
delete pNewLine;
- return TRUE;
+ return sal_True;
}
-BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
+sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
SwTableBox* pMergeBox, SwUndoTblMerge* pUndo )
{
OSL_ENSURE( rBoxes.Count() && pMergeBox, "keine gueltigen Werte" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// suche alle Boxen / Lines
_FndBox aFndBox( 0, 0 );
@@ -1747,7 +1748,7 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
// TL_CHART2: splitting/merging of a number of cells or rows will usually make
// the table to complex to be handled with chart.
@@ -1778,7 +1779,7 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
&pFndBox->GetBox()->GetTabLines() : &GetTabLines();
SwTableLine* pNewLine = pFndBox->GetLines()[0]->GetLine();
- USHORT nInsPos = pLines->C40_GETPOS( SwTableLine, pNewLine );
+ sal_uInt16 nInsPos = pLines->C40_GETPOS( SwTableLine, pNewLine );
pLines->C40_INSERT( SwTableLine, pInsLine, nInsPos );
SwTableBox* pLeftBox = new SwTableBox( (SwTableBoxFmt*)pMergeBox->GetFrmFmt(), 0, pInsLine );
@@ -1792,13 +1793,13 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
// in diese kommen alle Lines, die ueber dem selektierten Bereich stehen
// Sie bilden also eine Upper/Lower Line
- _InsULPara aPara( pTblNd, TRUE, TRUE, pLeftBox, pMergeBox, pRightBox, pInsLine );
+ _InsULPara aPara( pTblNd, sal_True, sal_True, pLeftBox, pMergeBox, pRightBox, pInsLine );
// move die oben/unten ueberhaengenden Lines vom selektierten Bereich
pFndBox->GetLines()[0]->GetBoxes().ForEach( &lcl_Merge_MoveBox,
&aPara );
aPara.SetLower( pInsLine );
- USHORT nEnd = pFndBox->GetLines().Count()-1;
+ sal_uInt16 nEnd = pFndBox->GetLines().Count()-1;
pFndBox->GetLines()[nEnd]->GetBoxes().ForEach( &lcl_Merge_MoveBox,
&aPara );
@@ -1810,7 +1811,7 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
pFndBox->GetLines().ForEach( &lcl_Merge_MoveLine, &aPara );
if( !pLeftBox->GetTabLines().Count() )
- _DeleteBox( *this, pLeftBox, 0, FALSE, FALSE );
+ _DeleteBox( *this, pLeftBox, 0, sal_False, sal_False );
else
{
lcl_CalcWidth( pLeftBox ); // bereche die Breite der Box
@@ -1818,7 +1819,7 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
pUndo->AddNewBox( pLeftBox->GetSttIdx() );
}
if( !pRightBox->GetTabLines().Count() )
- _DeleteBox( *this, pRightBox, 0, FALSE, FALSE );
+ _DeleteBox( *this, pRightBox, 0, sal_False, sal_False );
else
{
lcl_CalcWidth( pRightBox ); // bereche die Breite der Box
@@ -1826,7 +1827,7 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
pUndo->AddNewBox( pRightBox->GetSttIdx() );
}
- DeleteSel( pDoc, rBoxes, 0, 0, FALSE, FALSE );
+ DeleteSel( pDoc, rBoxes, 0, 0, sal_False, sal_False );
// dann raeume die Struktur dieser Line noch mal auf:
// generell alle Aufraeumen
@@ -1839,18 +1840,18 @@ BOOL SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
CHECKBOXWIDTH
CHECKTABLELAYOUT
- return TRUE;
+ return sal_True;
}
void lcl_CheckRowSpan( SwTable &rTbl )
{
- USHORT nLineCount = rTbl.GetTabLines().Count();
- USHORT nMaxSpan = nLineCount;
+ sal_uInt16 nLineCount = rTbl.GetTabLines().Count();
+ sal_uInt16 nMaxSpan = nLineCount;
long nMinSpan = 1;
while( nMaxSpan )
{
SwTableLine* pLine = rTbl.GetTabLines()[ nLineCount - nMaxSpan ];
- for( USHORT nBox = 0; nBox < pLine->GetTabBoxes().Count(); ++nBox )
+ for( sal_uInt16 nBox = 0; nBox < pLine->GetTabBoxes().Count(); ++nBox )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nBox];
long nRowSpan = pBox->getRowSpan();
@@ -1864,31 +1865,31 @@ void lcl_CheckRowSpan( SwTable &rTbl )
}
}
-USHORT lcl_GetBoxOffset( const _FndBox& rBox )
+sal_uInt16 lcl_GetBoxOffset( const _FndBox& rBox )
{
// suche die erste Box
const _FndBox* pFirstBox = &rBox;
while( pFirstBox->GetLines().Count() )
pFirstBox = pFirstBox->GetLines()[ 0 ]->GetBoxes()[ 0 ];
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
// dann ueber die Lines nach oben die Position bestimmen
const SwTableBox* pBox = pFirstBox->GetBox();
do {
const SwTableBoxes& rBoxes = pBox->GetUpper()->GetTabBoxes();
const SwTableBox* pCmp;
- for( USHORT n = 0; pBox != ( pCmp = rBoxes[ n ] ); ++n )
- nRet = nRet + (USHORT) pCmp->GetFrmFmt()->GetFrmSize().GetWidth();
+ for( sal_uInt16 n = 0; pBox != ( pCmp = rBoxes[ n ] ); ++n )
+ nRet = nRet + (sal_uInt16) pCmp->GetFrmFmt()->GetFrmSize().GetWidth();
pBox = pBox->GetUpper()->GetUpper();
} while( pBox );
return nRet;
}
-USHORT lcl_GetLineWidth( const _FndLine& rLine )
+sal_uInt16 lcl_GetLineWidth( const _FndLine& rLine )
{
- USHORT nRet = 0;
- for( USHORT n = rLine.GetBoxes().Count(); n; )
- nRet = nRet + (USHORT)rLine.GetBoxes()[ --n ]->GetBox()->GetFrmFmt()
+ sal_uInt16 nRet = 0;
+ for( sal_uInt16 n = rLine.GetBoxes().Count(); n; )
+ nRet = nRet + (sal_uInt16)rLine.GetBoxes()[ --n ]->GetBox()->GetFrmFmt()
->GetFrmSize().GetWidth();
return nRet;
}
@@ -1896,27 +1897,27 @@ USHORT lcl_GetLineWidth( const _FndLine& rLine )
void lcl_CalcNewWidths( const _FndLines& rFndLines, _CpyPara& rPara )
{
rPara.pWidths.reset();
- USHORT nLineCount = rFndLines.Count();
+ sal_uInt16 nLineCount = rFndLines.Count();
if( nLineCount )
{
- rPara.pWidths = boost::shared_ptr< std::vector< std::vector< ULONG > > >
- ( new std::vector< std::vector< ULONG > >( nLineCount ));
+ rPara.pWidths = boost::shared_ptr< std::vector< std::vector< sal_uLong > > >
+ ( new std::vector< std::vector< sal_uLong > >( nLineCount ));
// First we collect information about the left/right borders of all
// selected cells
- for( USHORT nLine = 0; nLine < nLineCount; ++nLine )
+ for( sal_uInt16 nLine = 0; nLine < nLineCount; ++nLine )
{
- std::vector< ULONG > &rWidth = (*rPara.pWidths.get())[ nLine ];
+ std::vector< sal_uLong > &rWidth = (*rPara.pWidths.get())[ nLine ];
const _FndLine *pFndLine = rFndLines[ nLine ];
if( pFndLine && pFndLine->GetBoxes().Count() )
{
const SwTableLine *pLine = pFndLine->GetLine();
if( pLine && pLine->GetTabBoxes().Count() )
{
- USHORT nBoxCount = pLine->GetTabBoxes().Count();
- ULONG nPos = 0;
+ sal_uInt16 nBoxCount = pLine->GetTabBoxes().Count();
+ sal_uLong nPos = 0;
// The first selected box...
const SwTableBox *pSel = pFndLine->GetBoxes()[0]->GetBox();
- USHORT nBox = 0;
+ sal_uInt16 nBox = 0;
// Sum up the width of all boxes before the first selected box
while( nBox < nBoxCount )
{
@@ -1930,7 +1931,7 @@ void lcl_CalcNewWidths( const _FndLines& rFndLines, _CpyPara& rPara )
if( rPara.nMinLeft > nPos )
rPara.nMinLeft = nPos;
nBoxCount = pFndLine->GetBoxes().Count();
- rWidth = std::vector< ULONG >( nBoxCount+2 );
+ rWidth = std::vector< sal_uLong >( nBoxCount+2 );
rWidth[ 0 ] = nPos;
// Add now the widths of all selected boxes and store
// the positions in the vector
@@ -1950,39 +1951,39 @@ void lcl_CalcNewWidths( const _FndLines& rFndLines, _CpyPara& rPara )
}
}
// Second step: calculate the new widths for the copied cells
- ULONG nSelSize = rPara.nMaxRight - rPara.nMinLeft;
+ sal_uLong nSelSize = rPara.nMaxRight - rPara.nMinLeft;
if( nSelSize )
{
- for( USHORT nLine = 0; nLine < nLineCount; ++nLine )
+ for( sal_uInt16 nLine = 0; nLine < nLineCount; ++nLine )
{
- std::vector< ULONG > &rWidth = (*rPara.pWidths.get())[ nLine ];
- USHORT nCount = (USHORT)rWidth.size();
+ std::vector< sal_uLong > &rWidth = (*rPara.pWidths.get())[ nLine ];
+ sal_uInt16 nCount = (sal_uInt16)rWidth.size();
if( nCount > 2 )
{
rWidth[ nCount - 1 ] = rPara.nMaxRight;
- ULONG nLastPos = 0;
- for( USHORT nBox = 0; nBox < nCount; ++nBox )
+ sal_uLong nLastPos = 0;
+ for( sal_uInt16 nBox = 0; nBox < nCount; ++nBox )
{
sal_uInt64 nNextPos = rWidth[ nBox ];
nNextPos -= rPara.nMinLeft;
nNextPos *= rPara.nNewSize;
nNextPos /= nSelSize;
- rWidth[ nBox ] = (ULONG)(nNextPos - nLastPos);
- nLastPos = (ULONG)nNextPos;
+ rWidth[ nBox ] = (sal_uLong)(nNextPos - nLastPos);
+ nLastPos = (sal_uLong)nNextPos;
}
}
}
}
}
-BOOL lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
+sal_Bool lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
{
_CpyPara* pCpyPara = (_CpyPara*)pPara;
// Calculation of new size
- ULONG nRealSize;
- ULONG nDummy1 = 0;
- ULONG nDummy2 = 0;
+ sal_uLong nRealSize;
+ sal_uLong nDummy1 = 0;
+ sal_uLong nDummy2 = 0;
if( pCpyPara->pTblNd->GetTable().IsNewModel() )
{
if( pCpyPara->nBoxIdx == 1 )
@@ -1998,7 +1999,7 @@ BOOL lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
nRealSize /= pCpyPara->nOldSize;
}
- ULONG nSize;
+ sal_uLong nSize;
bool bDummy = nDummy1 > 0;
if( bDummy )
nSize = nDummy1;
@@ -2013,7 +2014,7 @@ BOOL lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
_CpyTabFrm aFindFrm( (SwTableBoxFmt*)rpFndBox->GetBox()->GetFrmFmt() );
SwFmtFrmSize aFrmSz;
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( !pCpyPara->rTabFrmArr.Seek_Entry( aFindFrm, &nFndPos ) ||
( aFrmSz = ( aFindFrm = pCpyPara->rTabFrmArr[ nFndPos ]).pNewFrmFmt->
GetFrmSize()).GetWidth() != (SwTwips)nSize )
@@ -2062,12 +2063,12 @@ BOOL lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
if( aBoxAttrSet.Count() )
{
const SfxPoolItem* pItem;
- SvNumberFormatter* pN = pCpyPara->pDoc->GetNumberFormatter( FALSE );
+ SvNumberFormatter* pN = pCpyPara->pDoc->GetNumberFormatter( sal_False );
if( pN && pN->HasMergeFmtTbl() && SFX_ITEM_SET == aBoxAttrSet.
- GetItemState( RES_BOXATR_FORMAT, FALSE, &pItem ) )
+ GetItemState( RES_BOXATR_FORMAT, sal_False, &pItem ) )
{
- ULONG nOldIdx = ((SwTblBoxNumFormat*)pItem)->GetValue();
- ULONG nNewIdx = pN->GetMergeFmtIndex( nOldIdx );
+ sal_uLong nOldIdx = ((SwTblBoxNumFormat*)pItem)->GetValue();
+ sal_uLong nNewIdx = pN->GetMergeFmtIndex( nOldIdx );
if( nNewIdx != nOldIdx )
aBoxAttrSet.Put( SwTblBoxNumFormat( nNewIdx ));
}
@@ -2079,7 +2080,7 @@ BOOL lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
*rpFndBox->GetBox()->GetSttNd()->EndOfSectionNode() );
SwNodeIndex aInsIdx( *pBox->GetSttNd(), 1 );
- pFromDoc->CopyWithFlyInFly( aCpyRg, 0, aInsIdx, FALSE );
+ pFromDoc->CopyWithFlyInFly( aCpyRg, 0, aInsIdx, sal_False );
// den initialen TextNode loeschen
pCpyPara->pDoc->GetNodes().Delete( aInsIdx, 1 );
}
@@ -2099,16 +2100,16 @@ BOOL lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
}
}
while( nSize );
- return TRUE;
+ return sal_True;
}
-BOOL lcl_CopyLineToDoc( const _FndLine*& rpFndLine, void* pPara )
+sal_Bool lcl_CopyLineToDoc( const _FndLine*& rpFndLine, void* pPara )
{
_CpyPara* pCpyPara = (_CpyPara*)pPara;
// suche das Format in der Liste aller Formate
_CpyTabFrm aFindFrm( (SwTableBoxFmt*)rpFndLine->GetLine()->GetFrmFmt() );
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( !pCpyPara->rTabFrmArr.Seek_Entry( aFindFrm, &nFndPos ))
{
// es ist noch nicht vorhanden, also kopiere es
@@ -2152,23 +2153,23 @@ BOOL lcl_CopyLineToDoc( const _FndLine*& rpFndLine, void* pPara )
}
else
// errechne sie
- for( USHORT n = 0; n < rpFndLine->GetBoxes().Count(); ++n )
+ for( sal_uInt16 n = 0; n < rpFndLine->GetBoxes().Count(); ++n )
aPara.nOldSize += rpFndLine->GetBoxes()[n]
->GetBox()->GetFrmFmt()->GetFrmSize().GetWidth();
((_FndLine*)rpFndLine)->GetBoxes().ForEach( &lcl_CopyBoxToDoc, &aPara );
if( pCpyPara->pTblNd->GetTable().IsNewModel() )
++pCpyPara->nLnIdx;
- return TRUE;
+ return sal_True;
}
-BOOL SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
+sal_Bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
{
// suche alle Boxen / Lines
SwSelBoxes aSelBoxes;
SwTableBox* pBox = GetTabSortBoxes()[ 0 ];
pBox = GetTblBox( pBox->GetSttNd()->StartOfSectionNode()->GetIndex() + 1 );
- SelLineFromBox( pBox, aSelBoxes, TRUE );
+ SelLineFromBox( pBox, aSelBoxes, sal_True );
_FndBox aFndBox( 0, 0 );
{
@@ -2176,7 +2177,7 @@ BOOL SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
((SwTableLines&)GetTabLines()).ForEach( &_FndLineCopyCol, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
{
// Tabellen-Formeln in die relative Darstellung umwandeln
@@ -2186,7 +2187,7 @@ BOOL SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
}
_CpyTabFrms aCpyFmt;
- _CpyPara aPara( &rTblNd, 1, aCpyFmt, TRUE );
+ _CpyPara aPara( &rTblNd, 1, aCpyFmt, sal_True );
aPara.nNewSize = aPara.nOldSize = rTblNd.GetTable().GetFrmFmt()->GetFrmSize().GetWidth();
// dann kopiere mal
if( IsNewModel() )
@@ -2195,9 +2196,9 @@ BOOL SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
if( rTblNd.GetTable().IsNewModel() )
{ // The copied line must not contain any row span attributes > 1
SwTableLine* pLine = rTblNd.GetTable().GetTabLines()[0];
- USHORT nColCount = pLine->GetTabBoxes().Count();
+ sal_uInt16 nColCount = pLine->GetTabBoxes().Count();
OSL_ENSURE( nColCount, "Empty Table Line" );
- for( USHORT nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
+ for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pTableBox = pLine->GetTabBoxes()[nCurrCol];
OSL_ENSURE( pTableBox, "Missing Table Box" );
@@ -2205,12 +2206,12 @@ BOOL SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
}
}
- return TRUE;
+ return sal_True;
}
-BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
- const SwSelBoxes& rSelBoxes, BOOL bCpyNds,
- BOOL bCpyName ) const
+sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
+ const SwSelBoxes& rSelBoxes, sal_Bool bCpyNds,
+ sal_Bool bCpyName ) const
{
// suche alle Boxen / Lines
_FndBox aFndBox( 0, 0 );
@@ -2219,7 +2220,7 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
((SwTableLines&)GetTabLines()).ForEach( &_FndLineCopyCol, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
// erst die Poolvorlagen fuer die Tabelle kopieren, damit die dann
// wirklich kopiert und damit die gueltigen Werte haben.
@@ -2233,9 +2234,9 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
SwTable* pNewTbl = (SwTable*)pInsDoc->InsertTable(
SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 1 ),
rPos, 1, 1, GetFrmFmt()->GetHoriOrient().GetHoriOrient(),
- 0, 0, FALSE, IsNewModel() );
+ 0, 0, sal_False, IsNewModel() );
if( !pNewTbl )
- return FALSE;
+ return sal_False;
SwNodeIndex aIdx( rPos.nNode, -1 );
SwTableNode* pTblNd = aIdx.GetNode().FindTableNode();
@@ -2255,7 +2256,7 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
// tauschen am Node den Tabellen-Pointer aus
pNewTbl = new SwDDETable( *pNewTbl,
(SwDDEFieldType*)pFldType );
- pTblNd->SetNewTable( pNewTbl, FALSE );
+ pTblNd->SetNewTable( pNewTbl, sal_False );
}
pNewTbl->GetFrmFmt()->CopyAttrs( *GetFrmFmt() );
@@ -2291,11 +2292,11 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
_FndLine* pFndLn = aFndBox.GetLines()[ 0 ];
SwTableLine* pLn = pFndLn->GetLine();
const SwTableLine* pTmp = pLn;
- USHORT nLnPos = GetTabLines().GetPos( pTmp );
+ sal_uInt16 nLnPos = GetTabLines().GetPos( pTmp );
if( USHRT_MAX != nLnPos && nLnPos )
{
// es gibt eine Line davor
- SwCollectTblLineBoxes aLnPara( FALSE, HEADLINE_BORDERCOPY );
+ SwCollectTblLineBoxes aLnPara( sal_False, HEADLINE_BORDERCOPY );
pLn = GetTabLines()[ nLnPos - 1 ];
pLn->GetTabBoxes().ForEach( &lcl_Box_CollectBox, &aLnPara );
@@ -2303,7 +2304,7 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
if( aLnPara.Resize( lcl_GetBoxOffset( aFndBox ),
lcl_GetLineWidth( *pFndLn )) )
{
- aLnPara.SetValues( TRUE );
+ aLnPara.SetValues( sal_True );
pLn = pNewTbl->GetTabLines()[ 0 ];
pLn->GetTabBoxes().ForEach( &lcl_BoxSetSplitBoxFmts, &aLnPara );
}
@@ -2316,7 +2317,7 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
if( nLnPos < GetTabLines().Count() - 1 )
{
// es gibt eine Line dahinter
- SwCollectTblLineBoxes aLnPara( TRUE, HEADLINE_BORDERCOPY );
+ SwCollectTblLineBoxes aLnPara( sal_True, HEADLINE_BORDERCOPY );
pLn = GetTabLines()[ nLnPos + 1 ];
pLn->GetTabBoxes().ForEach( &lcl_Box_CollectBox, &aLnPara );
@@ -2324,7 +2325,7 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
if( aLnPara.Resize( lcl_GetBoxOffset( aFndBox ),
lcl_GetLineWidth( *pFndLn )) )
{
- aLnPara.SetValues( FALSE );
+ aLnPara.SetValues( sal_False );
pLn = pNewTbl->GetTabLines()[ pNewTbl->GetTabLines().Count()-1 ];
pLn->GetTabBoxes().ForEach( &lcl_BoxSetSplitBoxFmts, &aLnPara );
}
@@ -2334,7 +2335,7 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
// die initiale Box muss noch geloescht werden
_DeleteBox( *pNewTbl, pNewTbl->GetTabLines()[
pNewTbl->GetTabLines().Count() - 1 ]->GetTabBoxes()[0],
- 0, FALSE, FALSE );
+ 0, sal_False, sal_False );
if( pNewTbl->IsNewModel() )
lcl_CheckRowSpan( *pNewTbl );
@@ -2345,16 +2346,16 @@ BOOL SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
CHECKTABLELAYOUT
- return TRUE;
+ return sal_True;
}
// suche ab dieser Line nach der naechsten Box mit Inhalt
SwTableBox* SwTableLine::FindNextBox( const SwTable& rTbl,
- const SwTableBox* pSrchBox, BOOL bOvrTblLns ) const
+ const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const
{
const SwTableLine* pLine = this; // fuer M800
SwTableBox* pBox;
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( GetTabBoxes().Count() && pSrchBox &&
USHRT_MAX != ( nFndPos = GetTabBoxes().GetPos( pSrchBox )) &&
nFndPos + 1 != GetTabBoxes().Count() )
@@ -2398,11 +2399,11 @@ SwTableBox* SwTableLine::FindNextBox( const SwTable& rTbl,
// suche ab dieser Line nach der vorherigen Box
SwTableBox* SwTableLine::FindPreviousBox( const SwTable& rTbl,
- const SwTableBox* pSrchBox, BOOL bOvrTblLns ) const
+ const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const
{
const SwTableLine* pLine = this; // fuer M800
SwTableBox* pBox;
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( GetTabBoxes().Count() && pSrchBox &&
USHRT_MAX != ( nFndPos = GetTabBoxes().GetPos( pSrchBox )) &&
nFndPos )
@@ -2452,7 +2453,7 @@ SwTableBox* SwTableLine::FindPreviousBox( const SwTable& rTbl,
// suche ab dieser Line nach der naechsten Box mit Inhalt
SwTableBox* SwTableBox::FindNextBox( const SwTable& rTbl,
- const SwTableBox* pSrchBox, BOOL bOvrTblLns ) const
+ const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const
{
if( !pSrchBox && !GetTabLines().Count() )
return (SwTableBox*)this;
@@ -2463,7 +2464,7 @@ SwTableBox* SwTableBox::FindNextBox( const SwTable& rTbl,
// suche ab dieser Line nach der naechsten Box mit Inhalt
SwTableBox* SwTableBox::FindPreviousBox( const SwTable& rTbl,
- const SwTableBox* pSrchBox, BOOL bOvrTblLns ) const
+ const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const
{
if( !pSrchBox && !GetTabLines().Count() )
return (SwTableBox*)this;
@@ -2471,7 +2472,7 @@ SwTableBox* SwTableBox::FindPreviousBox( const SwTable& rTbl,
bOvrTblLns );
}
-BOOL lcl_BoxSetHeadCondColl( const SwTableBox*& rpBox, void* )
+sal_Bool lcl_BoxSetHeadCondColl( const SwTableBox*& rpBox, void* )
{
// in der HeadLine sind die Absaetze mit BedingtenVorlage anzupassen
const SwStartNode* pSttNd = rpBox->GetSttNd();
@@ -2479,27 +2480,27 @@ BOOL lcl_BoxSetHeadCondColl( const SwTableBox*& rpBox, void* )
pSttNd->CheckSectionCondColl();
else
((SwTableBox*)rpBox)->GetTabLines().ForEach( &lcl_LineSetHeadCondColl, 0 );
- return TRUE;
+ return sal_True;
}
-BOOL lcl_LineSetHeadCondColl( const SwTableLine*& rpLine, void* )
+sal_Bool lcl_LineSetHeadCondColl( const SwTableLine*& rpLine, void* )
{
((SwTableLine*)rpLine)->GetTabBoxes().ForEach( &lcl_BoxSetHeadCondColl, 0 );
- return TRUE;
+ return sal_True;
}
-SwTwips lcl_GetDistance( SwTableBox* pBox, BOOL bLeft )
+SwTwips lcl_GetDistance( SwTableBox* pBox, sal_Bool bLeft )
{
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
SwTwips nRet = 0;
SwTableLine* pLine;
while( pBox && 0 != ( pLine = pBox->GetUpper() ) )
{
- USHORT nStt = 0, nPos = pLine->GetTabBoxes().C40_GETPOS( SwTableBox, pBox );
+ sal_uInt16 nStt = 0, nPos = pLine->GetTabBoxes().C40_GETPOS( SwTableBox, pBox );
if( bFirst && !bLeft )
++nPos;
- bFirst = FALSE;
+ bFirst = sal_False;
while( nStt < nPos )
nRet += pLine->GetTabBoxes()[ nStt++ ]->GetFrmFmt()
@@ -2509,30 +2510,30 @@ SwTwips lcl_GetDistance( SwTableBox* pBox, BOOL bLeft )
return nRet;
}
-BOOL lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox* pBox = rBoxes[ n ];
SwFrmFmt* pFmt = pBox->GetFrmFmt();
const SwFmtFrmSize& rSz = pFmt->GetFrmSize();
SwTwips nWidth = rSz.GetWidth();
- BOOL bGreaterBox = FALSE;
+ sal_Bool bGreaterBox = sal_False;
if( bCheck )
{
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
if( !::lcl_SetSelBoxWidth( pBox->GetTabLines()[ i ], rParam,
- nDist, TRUE ))
- return FALSE;
+ nDist, sal_True ))
+ return sal_False;
// dann noch mal alle "ContentBoxen" sammeln
if( ( 0 != ( bGreaterBox = TBLFIX_CHGABS != rParam.nMode && ( nDist + ( rParam.bLeft ? 0 : nWidth ) ) >= rParam.nSide)) ||
( !rParam.bBigger && ( Abs( nDist + (( rParam.nMode && rParam.bLeft ) ? 0 : nWidth ) - rParam.nSide ) < COLFUZZY ) ) )
{
- rParam.bAnyBoxFnd = TRUE;
+ rParam.bAnyBoxFnd = sal_True;
SwTwips nLowerDiff;
if( bGreaterBox && TBLFIX_CHGPROP == rParam.nMode )
{
@@ -2547,16 +2548,16 @@ BOOL lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nLowerDiff = rParam.nDiff;
if( nWidth < nLowerDiff || nWidth - nLowerDiff < MINLAY )
- return FALSE;
+ return sal_False;
}
}
else
{
SwTwips nLowerDiff = 0, nOldLower = rParam.nLowerDiff;
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
{
rParam.nLowerDiff = 0;
- lcl_SetSelBoxWidth( pBox->GetTabLines()[ i ], rParam, nDist, FALSE );
+ lcl_SetSelBoxWidth( pBox->GetTabLines()[ i ], rParam, nDist, sal_False );
if( nLowerDiff < rParam.nLowerDiff )
nLowerDiff = rParam.nLowerDiff;
@@ -2609,14 +2610,14 @@ BOOL lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nDist >= rParam.nSide )
break;
}
- return TRUE;
+ return sal_True;
}
-BOOL lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox* pBox = rBoxes[ n ];
SwFrmFmt* pFmt = pBox->GetFrmFmt();
@@ -2625,17 +2626,17 @@ BOOL lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( bCheck )
{
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
if( !::lcl_SetOtherBoxWidth( pBox->GetTabLines()[ i ],
- rParam, nDist, TRUE ))
- return FALSE;
+ rParam, nDist, sal_True ))
+ return sal_False;
if( rParam.bBigger && ( TBLFIX_CHGABS == rParam.nMode
? Abs( nDist - rParam.nSide ) < COLFUZZY
: ( rParam.bLeft ? nDist < rParam.nSide - COLFUZZY
: nDist >= rParam.nSide - COLFUZZY )) )
{
- rParam.bAnyBoxFnd = TRUE;
+ rParam.bAnyBoxFnd = sal_True;
SwTwips nDiff;
if( TBLFIX_CHGPROP == rParam.nMode ) // Tabelle fix, proport.
{
@@ -2648,17 +2649,17 @@ BOOL lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nDiff = rParam.nDiff;
if( nWidth < nDiff || nWidth - nDiff < MINLAY )
- return FALSE;
+ return sal_False;
}
}
else
{
SwTwips nLowerDiff = 0, nOldLower = rParam.nLowerDiff;
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
{
rParam.nLowerDiff = 0;
lcl_SetOtherBoxWidth( pBox->GetTabLines()[ i ], rParam,
- nDist, FALSE );
+ nDist, sal_False );
if( nLowerDiff < rParam.nLowerDiff )
nLowerDiff = rParam.nLowerDiff;
@@ -2703,14 +2704,14 @@ BOOL lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nDist > rParam.nSide )
break;
}
- return TRUE;
+ return sal_True;
}
-BOOL lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- USHORT n, nCmp;
+ sal_uInt16 n, nCmp;
for( n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox* pBox = rBoxes[ n ];
@@ -2720,10 +2721,10 @@ BOOL lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( bCheck )
{
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
if( !::lcl_InsSelBox( pBox->GetTabLines()[ i ], rParam,
- nDist, TRUE ))
- return FALSE;
+ nDist, sal_True ))
+ return sal_False;
// dann noch mal alle "ContentBoxen" sammeln
if( Abs( nDist + ( rParam.bLeft ? 0 : nWidth )
@@ -2736,14 +2737,14 @@ BOOL lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( nCmp )
{
- rParam.bAnyBoxFnd = TRUE;
+ rParam.bAnyBoxFnd = sal_True;
if( pFmt->GetProtect().IsCntntProtected() )
- return FALSE;
+ return sal_False;
if( rParam.bSplittBox &&
nWidth - rParam.nDiff <= COLFUZZY +
( 567 / 2 /* min. 0,5 cm Platz lassen*/) )
- return FALSE;
+ return sal_False;
if( pBox->GetSttNd() )
rParam.aBoxes.Insert( pBox );
@@ -2754,10 +2755,10 @@ BOOL lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
else
{
SwTwips nLowerDiff = 0, nOldLower = rParam.nLowerDiff;
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
{
rParam.nLowerDiff = 0;
- lcl_InsSelBox( pBox->GetTabLines()[ i ], rParam, nDist, FALSE );
+ lcl_InsSelBox( pBox->GetTabLines()[ i ], rParam, nDist, sal_False );
if( nLowerDiff < rParam.nLowerDiff )
nLowerDiff = rParam.nLowerDiff;
@@ -2837,18 +2838,18 @@ BOOL lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nDist += nWidth;
}
- return TRUE;
+ return sal_True;
}
-BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
// Sonderfall: kein Platz in den anderen Boxen aber in der Zelle
if( rParam.bSplittBox )
- return TRUE;
+ return sal_True;
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- USHORT n;
+ sal_uInt16 n;
// Tabelle fix, proport.
if( !rParam.nRemainWidth && TBLFIX_CHGPROP == rParam.nMode )
@@ -2862,8 +2863,8 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( (nTmpDist + nWidth / 2 ) > rParam.nSide )
{
rParam.nRemainWidth = rParam.bLeft
- ? USHORT(nTmpDist)
- : USHORT(rParam.nTblWidth - nTmpDist);
+ ? sal_uInt16(nTmpDist)
+ : sal_uInt16(rParam.nTblWidth - nTmpDist);
break;
}
nTmpDist += nWidth;
@@ -2879,22 +2880,22 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( bCheck )
{
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
if( !::lcl_InsOtherBox( pBox->GetTabLines()[ i ],
- rParam, nDist, TRUE ))
- return FALSE;
+ rParam, nDist, sal_True ))
+ return sal_False;
if(
rParam.bLeft ? ((nDist + nWidth / 2 ) <= rParam.nSide &&
(TBLFIX_CHGABS != rParam.nMode ||
- (n < rBoxes.Count() &&
+ (n < rBoxes.Count() &&
(nDist + nWidth + rBoxes[ n+1 ]->
GetFrmFmt()->GetFrmSize().GetWidth() / 2)
- > rParam.nSide )))
+ > rParam.nSide) ))
: (nDist + nWidth / 2 ) > rParam.nSide
)
{
- rParam.bAnyBoxFnd = TRUE;
+ rParam.bAnyBoxFnd = sal_True;
SwTwips nDiff;
if( TBLFIX_CHGPROP == rParam.nMode ) // Tabelle fix, proport.
{
@@ -2904,7 +2905,7 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nDiff /= rParam.nRemainWidth;
if( nWidth < nDiff || nWidth - nDiff < MINLAY )
- return FALSE;
+ return sal_False;
}
else
{
@@ -2917,7 +2918,7 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( rParam.bLeft && pBox->GetUpper()->GetUpper() )
{
const SwTableBox* pTmpBox = pBox;
- USHORT nBoxPos = n;
+ sal_uInt16 nBoxPos = n;
while( !nBoxPos && pTmpBox->GetUpper()->GetUpper() )
{
pTmpBox = pTmpBox->GetUpper()->GetUpper();
@@ -2930,7 +2931,7 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
}
if( nTmpWidth < nDiff || nTmpWidth - nDiff < MINLAY )
- return FALSE;
+ return sal_False;
break;
}
}
@@ -2938,11 +2939,11 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
else
{
SwTwips nLowerDiff = 0, nOldLower = rParam.nLowerDiff;
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
{
rParam.nLowerDiff = 0;
lcl_InsOtherBox( pBox->GetTabLines()[ i ], rParam,
- nDist, FALSE );
+ nDist, sal_False );
if( nLowerDiff < rParam.nLowerDiff )
nLowerDiff = rParam.nLowerDiff;
@@ -2952,10 +2953,10 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
if( nLowerDiff ||
(rParam.bLeft ? ((nDist + nWidth / 2 ) <= rParam.nSide &&
(TBLFIX_CHGABS != rParam.nMode ||
- (n < rBoxes.Count() &&
+ (n < rBoxes.Count() &&
(nDist + nWidth + rBoxes[ n+1 ]->
GetFrmFmt()->GetFrmSize().GetWidth() / 2)
- > rParam.nSide )))
+ > rParam.nSide) ))
: (nDist + nWidth / 2 ) > rParam.nSide ))
{
if( !nLowerDiff )
@@ -2987,7 +2988,7 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
nDist += nWidth;
}
- return TRUE;
+ return sal_True;
}
// das Ergebnis des Positions Vergleiches
@@ -2998,8 +2999,8 @@ BOOL lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
// POS_EQUAL, // Box und Start/End sind gleich
// POS_OVERLAP_BEFORE, // Box ueberlappt den Start
// POS_OVERLAP_BEHIND // Box ueberlappt das Ende
-SwComparePosition _CheckBoxInRange( USHORT nStt, USHORT nEnd,
- USHORT nBoxStt, USHORT nBoxEnd )
+SwComparePosition _CheckBoxInRange( sal_uInt16 nStt, sal_uInt16 nEnd,
+ sal_uInt16 nBoxStt, sal_uInt16 nBoxEnd )
{
// COLFUZZY noch beachten!!
SwComparePosition nRet;
@@ -3040,7 +3041,7 @@ void lcl_DelSelBox_CorrLowers( SwTableLine& rLine, CR_SetBoxWidth& rParam,
// 1. Schritt die eigene Breite feststellen
SwTableBoxes& rBoxes = rLine.GetTabBoxes();
SwTwips nBoxWidth = 0;
- USHORT n;
+ sal_uInt16 n;
for( n = rBoxes.Count(); n; )
nBoxWidth += rBoxes[ --n ]->GetFrmFmt()->GetFrmSize().GetWidth();
@@ -3062,7 +3063,7 @@ void lcl_DelSelBox_CorrLowers( SwTableLine& rLine, CR_SetBoxWidth& rParam,
if( !pBox->GetSttNd() )
{
// hat selbst auch Lower, also auch die anpassen
- for( USHORT i = pBox->GetTabLines().Count(); i; )
+ for( sal_uInt16 i = pBox->GetTabLines().Count(); i; )
::lcl_DelSelBox_CorrLowers( *pBox->GetTabLines()[ --i ],
rParam, nDiff );
}
@@ -3072,16 +3073,16 @@ void lcl_DelSelBox_CorrLowers( SwTableLine& rLine, CR_SetBoxWidth& rParam,
void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam,
const SwFmtFrmSize& rOldSz,
- USHORT& rDelWidth, SwTwips nDist )
+ sal_uInt16& rDelWidth, SwTwips nDist )
{
- long nDiff;
- BOOL bSetSize = FALSE;
+ long nDiff = 0;
+ sal_Bool bSetSize = sal_False;
switch( rParam.nMode )
{
case TBLFIX_CHGABS: // Tabelle feste Breite, den Nachbar andern
nDiff = rDelWidth + rParam.nLowerDiff;
- bSetSize = TRUE;
+ bSetSize = sal_True;
break;
case TBLFIX_CHGPROP: // Tabelle feste Breite, alle Nachbarn aendern
@@ -3089,9 +3090,9 @@ void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam,
{
// dann kurz berechnen:
if( rParam.bLeft )
- rParam.nRemainWidth = USHORT(nDist);
+ rParam.nRemainWidth = sal_uInt16(nDist);
else
- rParam.nRemainWidth = USHORT(rParam.nTblWidth - nDist);
+ rParam.nRemainWidth = sal_uInt16(rParam.nTblWidth - nDist);
}
// relativ berechnen
@@ -3099,7 +3100,7 @@ void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam,
nDiff *= rDelWidth + rParam.nLowerDiff;
nDiff /= rParam.nRemainWidth;
- bSetSize = TRUE;
+ bSetSize = sal_True;
break;
case TBLVAR_CHGABS: // Tabelle variable, alle Nachbarn aendern
@@ -3108,10 +3109,10 @@ void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam,
{
nDiff = rDelWidth + rParam.nLowerDiff - rParam.nBoxWidth;
if( 0 < nDiff )
- rDelWidth = rDelWidth - USHORT(nDiff);
+ rDelWidth = rDelWidth - sal_uInt16(nDiff);
else
- rDelWidth = rDelWidth + USHORT(-nDiff);
- bSetSize = TRUE;
+ rDelWidth = rDelWidth + sal_uInt16(-nDiff);
+ bSetSize = sal_True;
}
break;
}
@@ -3123,23 +3124,23 @@ void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam,
rParam.aShareFmts.SetSize( rBox, aNew );
// dann leider nochmals die Lower anpassen
- for( USHORT i = rBox.GetTabLines().Count(); i; )
+ for( sal_uInt16 i = rBox.GetTabLines().Count(); i; )
::lcl_DelSelBox_CorrLowers( *rBox.GetTabLines()[ --i ], rParam,
aNew.GetWidth() );
}
}
-BOOL lcl_DeleteBox_Rekursiv( CR_SetBoxWidth& rParam, SwTableBox& rBox,
- BOOL bCheck )
+sal_Bool lcl_DeleteBox_Rekursiv( CR_SetBoxWidth& rParam, SwTableBox& rBox,
+ sal_Bool bCheck )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( rBox.GetSttNd() )
{
if( bCheck )
{
- rParam.bAnyBoxFnd = TRUE;
+ rParam.bAnyBoxFnd = sal_True;
if( rBox.GetFrmFmt()->GetProtect().IsCntntProtected() )
- bRet = FALSE;
+ bRet = sal_False;
else
{
SwTableBox* pBox = &rBox;
@@ -3148,42 +3149,42 @@ BOOL lcl_DeleteBox_Rekursiv( CR_SetBoxWidth& rParam, SwTableBox& rBox,
}
else
::_DeleteBox( rParam.pTblNd->GetTable(), &rBox,
- rParam.pUndo, FALSE, TRUE, &rParam.aShareFmts );
+ rParam.pUndo, sal_False, sal_True, &rParam.aShareFmts );
}
else
{
// die muessen leider alle sequentiel ueber die
// Contentboxen geloescht werden
- for( USHORT i = rBox.GetTabLines().Count(); i; )
+ for( sal_uInt16 i = rBox.GetTabLines().Count(); i; )
{
SwTableLine& rLine = *rBox.GetTabLines()[ --i ];
- for( USHORT n = rLine.GetTabBoxes().Count(); n; )
+ for( sal_uInt16 n = rLine.GetTabBoxes().Count(); n; )
if( !::lcl_DeleteBox_Rekursiv( rParam,
*rLine.GetTabBoxes()[ --n ], bCheck ))
- return FALSE;
+ return sal_False;
}
}
return bRet;
}
-BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
SwTableBoxes& rBoxes = pTabLine->GetTabBoxes();
- USHORT n, nCntEnd, nBoxChkStt, nBoxChkEnd, nDelWidth = 0;
+ sal_uInt16 n, nCntEnd, nBoxChkStt, nBoxChkEnd, nDelWidth = 0;
if( rParam.bLeft )
{
n = rBoxes.Count();
nCntEnd = 0;
- nBoxChkStt = (USHORT)rParam.nSide;
- nBoxChkEnd = static_cast<USHORT>(rParam.nSide + rParam.nBoxWidth);
+ nBoxChkStt = (sal_uInt16)rParam.nSide;
+ nBoxChkEnd = static_cast<sal_uInt16>(rParam.nSide + rParam.nBoxWidth);
}
else
{
n = 0;
nCntEnd = rBoxes.Count();
- nBoxChkStt = static_cast<USHORT>(rParam.nSide - rParam.nBoxWidth);
- nBoxChkEnd = (USHORT)rParam.nSide;
+ nBoxChkStt = static_cast<sal_uInt16>(rParam.nSide - rParam.nBoxWidth);
+ nBoxChkEnd = (sal_uInt16)rParam.nSide;
}
@@ -3198,13 +3199,13 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
SwFrmFmt* pFmt = pBox->GetFrmFmt();
const SwFmtFrmSize& rSz = pFmt->GetFrmSize();
long nWidth = rSz.GetWidth();
- BOOL bDelBox = FALSE, bChgLowers = FALSE;
+ sal_Bool bDelBox = sal_False, bChgLowers = sal_False;
// die Boxenbreite testen und entpsrechend reagieren
SwComparePosition ePosType = ::_CheckBoxInRange(
nBoxChkStt, nBoxChkEnd,
- USHORT(rParam.bLeft ? nDist - nWidth : nDist),
- USHORT(rParam.bLeft ? nDist : nDist + nWidth));
+ sal_uInt16(rParam.bLeft ? nDist - nWidth : nDist),
+ sal_uInt16(rParam.bLeft ? nDist : nDist + nWidth));
switch( ePosType )
{
@@ -3212,7 +3213,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
if( bCheck )
{
if( rParam.bLeft )
- return TRUE;
+ return sal_True;
}
else if( rParam.bLeft )
{
@@ -3226,7 +3227,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
if( bCheck )
{
if( !rParam.bLeft )
- return TRUE;
+ return sal_True;
}
else if( !rParam.bLeft )
{
@@ -3239,7 +3240,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
case POS_OUTSIDE: // Box ueberlappt Start/End vollstaendig
case POS_INSIDE: // Box liegt vollstaendig in Start/End
case POS_EQUAL: // Box und Start/End sind gleich
- bDelBox = TRUE;
+ bDelBox = sal_True;
break;
case POS_OVERLAP_BEFORE: // Box ueberlappt den Start
@@ -3247,14 +3248,14 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
: nWidth / 2 )))
{
if( !pBox->GetSttNd() )
- bChgLowers = TRUE;
+ bChgLowers = sal_True;
else
- bDelBox = TRUE;
+ bDelBox = sal_True;
}
else if( !bCheck && rParam.bLeft )
{
if( !pBox->GetSttNd() )
- bChgLowers = TRUE;
+ bChgLowers = sal_True;
else
{
::lcl_ChgBoxSize( *pBox, rParam, rSz, nDelWidth, nDist );
@@ -3269,16 +3270,16 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
// generell loeschen oder wie beim OVERLAP_Before nur die, die
// bis zur Haelfte in die "Loesch-"Box reicht ???
if( !pBox->GetSttNd() )
- bChgLowers = TRUE;
+ bChgLowers = sal_True;
else
- bDelBox = TRUE;
+ bDelBox = sal_True;
break;
default: break;
}
if( bDelBox )
{
- nDelWidth = nDelWidth + USHORT(nWidth);
+ nDelWidth = nDelWidth + sal_uInt16(nWidth);
if( bCheck )
{
// die letzte/erste Box kann nur bei Tbl-Var geloescht werden,
@@ -3289,10 +3290,10 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
? nWidth - nDist
: (nDist + nWidth - rParam.nTblWidth )))
|| !::lcl_DeleteBox_Rekursiv( rParam, *pBox, bCheck ) )
- return FALSE;
+ return sal_False;
if( pFmt->GetProtect().IsCntntProtected() )
- return FALSE;
+ return sal_False;
}
else
{
@@ -3304,11 +3305,11 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
}
else if( bChgLowers )
{
- BOOL bFirst = TRUE, bCorrLowers = FALSE;
+ sal_Bool bFirst = sal_True, bCorrLowers = sal_False;
long nLowerDiff = 0;
long nOldLower = rParam.nLowerDiff;
- USHORT nOldRemain = rParam.nRemainWidth;
- USHORT i;
+ sal_uInt16 nOldRemain = rParam.nRemainWidth;
+ sal_uInt16 i;
for( i = pBox->GetTabLines().Count(); i; )
{
@@ -3316,7 +3317,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
rParam.nRemainWidth = nOldRemain;
SwTableLine* pLine = pBox->GetTabLines()[ --i ];
if( !::lcl_DelSelBox( pLine, rParam, nDist, bCheck ))
- return FALSE;
+ return sal_False;
// gibt es die Box und die darin enthaltenen Lines noch??
if( n < rBoxes.Count() &&
@@ -3326,14 +3327,14 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
{
if( !bFirst && !bCorrLowers &&
COLFUZZY < Abs( nLowerDiff - rParam.nLowerDiff ) )
- bCorrLowers = TRUE;
+ bCorrLowers = sal_True;
// die groesste "loesch" Breite entscheidet, aber nur wenn
// nicht die gesamte Line geloescht wurde
if( nLowerDiff < rParam.nLowerDiff )
nLowerDiff = rParam.nLowerDiff;
- bFirst = FALSE;
+ bFirst = sal_False;
}
}
rParam.nLowerDiff = nOldLower;
@@ -3345,7 +3346,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
nLowerDiff = nWidth;
// DelBreite anpassen!!
- nDelWidth = nDelWidth + USHORT(nLowerDiff);
+ nDelWidth = nDelWidth + sal_uInt16(nLowerDiff);
if( !bCheck )
{
@@ -3361,7 +3362,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
{
// sonst muss die Groesse der Box angepasst werden
SwFmtFrmSize aNew( rSz );
- BOOL bCorrRel = FALSE;
+ sal_Bool bCorrRel = sal_False;
if( TBLVAR_CHGABS != rParam.nMode )
{
@@ -3373,7 +3374,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
else if( rParam.bLeft ) // TBLFIX_CHGABS
{
nLowerDiff = nLowerDiff - nDelWidth;
- bCorrLowers = TRUE;
+ bCorrLowers = sal_True;
n = nCntEnd;
}
break;
@@ -3384,7 +3385,7 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
else if( !rParam.bLeft ) // TBLFIX_CHGABS
{
nLowerDiff = nLowerDiff - nDelWidth;
- bCorrLowers = TRUE;
+ bCorrLowers = sal_True;
n = nCntEnd;
}
break;
@@ -3401,9 +3402,9 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
{
// dann kurz berechnen:
if( rParam.bLeft )
- rParam.nRemainWidth = USHORT(nDist - nLowerDiff);
+ rParam.nRemainWidth = sal_uInt16(nDist - nLowerDiff);
else
- rParam.nRemainWidth = USHORT(rParam.nTblWidth - nDist
+ rParam.nRemainWidth = sal_uInt16(rParam.nTblWidth - nDist
- nLowerDiff );
}
@@ -3434,19 +3435,19 @@ BOOL lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
nDist += nWidth;
}
rParam.nLowerDiff = nDelWidth;
- return TRUE;
+ return sal_True;
}
// Dummy Funktion fuer die Methode SetColWidth
-BOOL lcl_DelOtherBox( SwTableLine* , CR_SetBoxWidth& , SwTwips , BOOL )
+sal_Bool lcl_DelOtherBox( SwTableLine* , CR_SetBoxWidth& , SwTwips , sal_Bool )
{
- return TRUE;
+ return sal_True;
}
void lcl_AjustLines( SwTableLine* pLine, CR_SetBoxWidth& rParam )
{
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox* pBox = rBoxes[ n ];
@@ -3457,7 +3458,7 @@ void lcl_AjustLines( SwTableLine* pLine, CR_SetBoxWidth& rParam )
aSz.SetWidth( nWidth );
rParam.aShareFmts.SetSize( *pBox, aSz );
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
::lcl_AjustLines( pBox->GetTabLines()[ i ], rParam );
}
}
@@ -3470,13 +3471,13 @@ void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize )
SwTwips nAktSize = 0;
// checke doch mal ob die Tabellen korrekte Breiten haben
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
const SwTableBox* pBox = rBoxes[ n ];
const SwTwips nBoxW = pBox->GetFrmFmt()->GetFrmSize().GetWidth();
nAktSize += nBoxW;
- for( USHORT i = 0; i < pBox->GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
_CheckBoxWidth( *pBox->GetTabLines()[ i ], nBoxW );
}
@@ -3498,11 +3499,11 @@ _FndBox* lcl_SaveInsDelData( CR_SetBoxWidth& rParam, SwUndo** ppUndo,
{
// erstmal die Boxen besorgen !
if( rParam.bBigger )
- for( USHORT n = 0; n < rTbl.GetTabLines().Count(); ++n )
- ::lcl_DelSelBox( rTbl.GetTabLines()[ n ], rParam, nDistStt, TRUE );
+ for( sal_uInt16 n = 0; n < rTbl.GetTabLines().Count(); ++n )
+ ::lcl_DelSelBox( rTbl.GetTabLines()[ n ], rParam, nDistStt, sal_True );
else
- for( USHORT n = 0; n < rTbl.GetTabLines().Count(); ++n )
- ::lcl_InsSelBox( rTbl.GetTabLines()[ n ], rParam, nDistStt, TRUE );
+ for( sal_uInt16 n = 0; n < rTbl.GetTabLines().Count(); ++n )
+ ::lcl_InsSelBox( rTbl.GetTabLines()[ n ], rParam, nDistStt, sal_True );
}
// loeschen der gesamten Tabelle verhindern
@@ -3534,7 +3535,7 @@ _FndBox* lcl_SaveInsDelData( CR_SetBoxWidth& rParam, SwUndo** ppUndo,
return pFndBox;
}
-BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
+sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo )
{
SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
@@ -3544,13 +3545,13 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
_FndBox* pFndBox = 0; // fuers Einfuegen/Loeschen
SwTableSortBoxes aTmpLst( 0, 5 ); // fuers Undo
- BOOL bBigger,
- bRet = FALSE,
+ sal_Bool bBigger,
+ bRet = sal_False,
bLeft = nsTblChgWidthHeightType::WH_COL_LEFT == ( eType & 0xff ) ||
nsTblChgWidthHeightType::WH_CELL_LEFT == ( eType & 0xff ),
bInsDel = 0 != (eType & nsTblChgWidthHeightType::WH_FLAG_INSDEL );
- USHORT n;
- ULONG nBoxIdx = rAktBox.GetSttIdx();
+ sal_uInt16 n;
+ sal_uLong nBoxIdx = rAktBox.GetSttIdx();
// bestimme die akt. Kante der Box
// wird nur fuer die Breitenmanipulation benoetigt!
@@ -3568,7 +3569,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
{
fnSelBox = lcl_DelSelBox;
fnOtherBox = lcl_DelOtherBox;
- aParam.nBoxWidth = (USHORT)rAktBox.GetFrmFmt()->GetFrmSize().GetWidth();
+ aParam.nBoxWidth = (sal_uInt16)rAktBox.GetFrmFmt()->GetFrmSize().GetWidth();
if( bLeft )
nDistStt = rSz.GetWidth();
}
@@ -3595,7 +3596,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
bBigger = !bBigger;
// erstmal testen, ob ueberhaupt Platz ist
- BOOL bChgLRSpace = TRUE;
+ sal_Bool bChgLRSpace = sal_True;
if( bBigger )
{
if( GetFrmFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) &&
@@ -3614,7 +3615,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
( bLeft ? rLR.GetRight() >= nAbsDiff
: rLR.GetLeft() >= nAbsDiff ))
{
- bRet = TRUE; bLeft = !bLeft;
+ bRet = sal_True; bLeft = !bLeft;
}
if( !bRet )
@@ -3632,13 +3633,13 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
}
else
{
- bRet = TRUE;
+ bRet = sal_True;
for( n = 0; n < aLines.Count(); ++n )
{
aParam.LoopClear();
- if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, TRUE ))
+ if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -3655,7 +3656,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
{
// dies gesamte Tabelle soll geloescht werden!!
GetFrmFmt()->GetDoc()->DeleteRowCol( aParam.aBoxes );
- return FALSE;
+ return sal_False;
}
if( ppUndo )
@@ -3664,7 +3665,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
: UNDO_TABLE_INSCOL );
}
else if( ppUndo )
- *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, TRUE );
+ *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, sal_True );
long nFrmWidth = LONG_MAX;
LockModify();
@@ -3679,7 +3680,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
// dann mal herunterbrechen auf USHRT_MAX / 2
CR_SetBoxWidth aTmpPara( 0, aSz.GetWidth() / 2,
0, aSz.GetWidth(), aSz.GetWidth(), aParam.pTblNd );
- for( USHORT nLn = 0; nLn < aLines.Count(); ++nLn )
+ for( sal_uInt16 nLn = 0; nLn < aLines.Count(); ++nLn )
::lcl_AjustLines( aLines[ nLn ], aTmpPara );
aSz.SetWidth( aSz.GetWidth() / 2 );
aParam.nDiff = nRelDiff /= 2;
@@ -3688,14 +3689,14 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
}
if( bLeft )
- aLR.SetLeft( USHORT( aLR.GetLeft() - nAbsDiff ) );
+ aLR.SetLeft( sal_uInt16( aLR.GetLeft() - nAbsDiff ) );
else
- aLR.SetRight( USHORT( aLR.GetRight() - nAbsDiff ) );
+ aLR.SetRight( sal_uInt16( aLR.GetRight() - nAbsDiff ) );
}
else if( bLeft )
- aLR.SetLeft( USHORT( aLR.GetLeft() + nAbsDiff ) );
+ aLR.SetLeft( sal_uInt16( aLR.GetLeft() + nAbsDiff ) );
else
- aLR.SetRight( USHORT( aLR.GetRight() + nAbsDiff ) );
+ aLR.SetRight( sal_uInt16( aLR.GetRight() + nAbsDiff ) );
if( bChgLRSpace )
GetFrmFmt()->SetFmtAttr( aLR );
@@ -3734,11 +3735,11 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
aSz.SetWidth( aSz.GetWidth() - nRelDiff );
if( rSz.GetWidthPercent() )
- aSz.SetWidthPercent( static_cast<BYTE>(( aSz.GetWidth() * 100 ) /
+ aSz.SetWidthPercent( static_cast<sal_uInt8>(( aSz.GetWidth() * 100 ) /
( aSz.GetWidth() + aLR.GetRight() + aLR.GetLeft())));
GetFrmFmt()->SetFmtAttr( aSz );
- aParam.nTblWidth = USHORT( aSz.GetWidth() );
+ aParam.nTblWidth = sal_uInt16( aSz.GetWidth() );
UnlockModify();
@@ -3746,7 +3747,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
{
--n;
aParam.LoopClear();
- (*fnSelBox)( aLines[ n ], aParam, nDistStt, FALSE );
+ (*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_False );
}
// sollte die Tabelle noch auf relativen Werten
@@ -3763,7 +3764,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
else if( bInsDel ||
( bLeft ? nDist : Abs( rSz.GetWidth() - nDist ) > COLFUZZY ) )
{
- bRet = TRUE;
+ bRet = sal_True;
if( bLeft && TBLFIX_CHGABS == eTblChgMode && !bInsDel )
aParam.bBigger = !bBigger;
@@ -3775,9 +3776,9 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
for( n = 0; n < aLines.Count(); ++n )
{
aParam.LoopClear();
- if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, TRUE ))
+ if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -3790,14 +3791,14 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
for( n = 0; n < aLines.Count(); ++n )
{
aParam.LoopClear();
- if( !(*fnOtherBox)( aLines[ n ], aParam, 0, TRUE ))
+ if( !(*fnOtherBox)( aLines[ n ], aParam, 0, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
if( bRet && !aParam.bAnyBoxFnd )
- bRet = FALSE;
+ bRet = sal_False;
}
if( !bRet && rAktBox.GetFrmFmt()->GetFrmSize().GetWidth()
@@ -3805,16 +3806,16 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
( 567 / 2 /* min. 0,5 cm Platz lassen*/) )
{
// dann den Platz von der akt. Zelle nehmen
- aParam.bSplittBox = TRUE;
+ aParam.bSplittBox = sal_True;
// aber das muss auch mal getestet werden!
- bRet = TRUE;
+ bRet = sal_True;
for( n = 0; n < aLines.Count(); ++n )
{
aParam.LoopClear();
- if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, TRUE ))
+ if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -3826,9 +3827,9 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
for( n = 0; n < aLines.Count(); ++n )
{
aParam.LoopClear();
- if( !(*fnOtherBox)( aLines[ n ], aParam, 0, TRUE ))
+ if( !(*fnOtherBox)( aLines[ n ], aParam, 0, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -3838,9 +3839,9 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
for( n = 0; n < aLines.Count(); ++n )
{
aParam.LoopClear();
- if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, TRUE ))
+ if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -3861,7 +3862,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
: UNDO_TABLE_INSCOL );
}
else if( ppUndo )
- *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, TRUE );
+ *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, sal_True );
if( bInsDel
? ( TBLFIX_CHGABS == eTblChgMode ? bLeft : bLeft )
@@ -3872,8 +3873,8 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
--n;
aParam.LoopClear();
aParam1.LoopClear();
- (*fnSelBox)( aLines[ n ], aParam, nDistStt, FALSE );
- (*fnOtherBox)( aLines[ n ], aParam1, nDistStt, FALSE );
+ (*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_False );
+ (*fnOtherBox)( aLines[ n ], aParam1, nDistStt, sal_False );
}
}
else
@@ -3882,8 +3883,8 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
--n;
aParam.LoopClear();
aParam1.LoopClear();
- (*fnOtherBox)( aLines[ n ], aParam1, nDistStt, FALSE );
- (*fnSelBox)( aLines[ n ], aParam, nDistStt, FALSE );
+ (*fnOtherBox)( aLines[ n ], aParam1, nDistStt, sal_False );
+ (*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_False );
}
}
}
@@ -3914,7 +3915,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
SwTableLine* pLine = rAktBox.GetUpper();
while( pLine->GetUpper() )
{
- USHORT nPos = pLine->GetTabBoxes().C40_GETPOS( SwTableBox, pBox );
+ sal_uInt16 nPos = pLine->GetTabBoxes().C40_GETPOS( SwTableBox, pBox );
if( bLeft ? nPos : nPos + 1 != pLine->GetTabBoxes().Count() )
break;
@@ -3925,7 +3926,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
if( pLine->GetUpper() )
{
// dann muss die Distanz wieder korriegiert werden!
- aParam.nSide -= ::lcl_GetDistance( pLine->GetUpper(), TRUE );
+ aParam.nSide -= ::lcl_GetDistance( pLine->GetUpper(), sal_True );
if( bLeft )
aParam.nMaxSize = aParam.nSide;
@@ -3941,9 +3942,9 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
: ( rSz.GetWidth() - nDist ) > COLFUZZY ) &&
!aParam.bBigger )
{
- bRet = (*fnOtherBox)( pLine, aParam, 0, TRUE );
+ bRet = (*fnOtherBox)( pLine, aParam, 0, sal_True );
if( bRet && !aParam.bAnyBoxFnd )
- bRet = FALSE;
+ bRet = sal_False;
}
if( !bRet && !aParam.bBigger && rAktBox.GetFrmFmt()->
@@ -3951,14 +3952,14 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
( 567 / 2 /* min. 0,5 cm Platz lassen*/) )
{
// dann den Platz von der akt. Zelle nehmen
- aParam.bSplittBox = TRUE;
- bRet = TRUE;
+ aParam.bSplittBox = sal_True;
+ bRet = sal_True;
}
}
else
{
FN_lcl_SetBoxWidth fnTmp = aParam.bBigger ? fnOtherBox : fnSelBox;
- bRet = (*fnTmp)( pLine, aParam, nDistStt, TRUE );
+ bRet = (*fnTmp)( pLine, aParam, nDistStt, sal_True );
}
// wenn ja, dann setzen
@@ -3975,19 +3976,19 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
: UNDO_TABLE_INSCOL );
}
else if( ppUndo )
- *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, TRUE );
+ *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, sal_True );
if( bInsDel
? ( TBLFIX_CHGABS == eTblChgMode ? (bBigger && bLeft) : bLeft )
: ( TBLFIX_CHGABS != eTblChgMode && bLeft ) )
{
- (*fnSelBox)( pLine, aParam, nDistStt, FALSE );
- (*fnOtherBox)( pLine, aParam1, nDistStt, FALSE );
+ (*fnSelBox)( pLine, aParam, nDistStt, sal_False );
+ (*fnOtherBox)( pLine, aParam1, nDistStt, sal_False );
}
else
{
- (*fnOtherBox)( pLine, aParam1, nDistStt, FALSE );
- (*fnSelBox)( pLine, aParam, nDistStt, FALSE );
+ (*fnOtherBox)( pLine, aParam1, nDistStt, sal_False );
+ (*fnSelBox)( pLine, aParam, nDistStt, sal_False );
}
}
}
@@ -4012,7 +4013,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
if( ppUndo && *ppUndo )
{
- aParam.pUndo->SetColWidthParam( nBoxIdx, static_cast<USHORT>(eTblChgMode), eType,
+ aParam.pUndo->SetColWidthParam( nBoxIdx, static_cast<sal_uInt16>(eTblChgMode), eType,
nAbsDiff, nRelDiff );
if( !aParam.bBigger )
aParam.pUndo->SaveNewBoxes( *aParam.pTblNd, aTmpLst );
@@ -4064,7 +4065,7 @@ _FndBox* lcl_SaveInsDelData( CR_SetLineHeight& rParam, SwUndo** ppUndo,
}
void SetLineHeight( SwTableLine& rLine, SwTwips nOldHeight, SwTwips nNewHeight,
- BOOL bMinSize )
+ sal_Bool bMinSize )
{
SwLayoutFrm* pLineFrm = GetRowFrm( rLine );
OSL_ENSURE( pLineFrm, "wo ist der Frm von der SwTableLine?" );
@@ -4092,18 +4093,18 @@ void SetLineHeight( SwTableLine& rLine, SwTwips nOldHeight, SwTwips nNewHeight,
// erst alle inneren anpassen
SwTableBoxes& rBoxes = rLine.GetTabBoxes();
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTableBox& rBox = *rBoxes[ n ];
- for( USHORT i = 0; i < rBox.GetTabLines().Count(); ++i )
+ for( sal_uInt16 i = 0; i < rBox.GetTabLines().Count(); ++i )
SetLineHeight( *rBox.GetTabLines()[ i ], nMyOldH, nMyNewH, bMinSize );
}
}
-BOOL lcl_SetSelLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_SetSelLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( !bCheck )
{
// Zeilenhoehe einstellen
@@ -4117,15 +4118,15 @@ BOOL lcl_SetSelLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
OSL_ENSURE( pLineFrm, "wo ist der Frm von der SwTableLine?" );
SwTwips nRstHeight = CalcRowRstHeight( pLineFrm );
if( (nRstHeight + ROWFUZZY) < nDist )
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
-BOOL lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( bCheck )
{
if( rParam.bBigger )
@@ -4172,17 +4173,17 @@ BOOL lcl_SetOtherLineHeight( SwTableLine* pLine, CR_SetLineHeight& rParam,
return bRet;
}
-BOOL lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
- SwTwips nDist, BOOL bCheck )
+sal_Bool lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
+ SwTwips nDist, sal_Bool bCheck )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( !bCheck )
{
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
SwDoc* pDoc = pLine->GetFrmFmt()->GetDoc();
if( !rParam.bBigger )
{
- USHORT n;
+ sal_uInt16 n;
for( n = rBoxes.Count(); n; )
::lcl_SaveUpperLowerBorder( rParam.pTblNd->GetTable(),
@@ -4190,8 +4191,8 @@ BOOL lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
rParam.aShareFmts );
for( n = rBoxes.Count(); n; )
::_DeleteBox( rParam.pTblNd->GetTable(),
- rBoxes[ --n ], rParam.pUndo, FALSE,
- FALSE, &rParam.aShareFmts );
+ rBoxes[ --n ], rParam.pUndo, sal_False,
+ sal_False, &rParam.aShareFmts );
}
else
{
@@ -4203,7 +4204,7 @@ BOOL lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
pLines = &pLine->GetUpper()->GetTabLines();
else
pLines = &rParam.pTblNd->GetTable().GetTabLines();
- USHORT nPos = pLines->C40_GETPOS( SwTableLine, pLine );
+ sal_uInt16 nPos = pLines->C40_GETPOS( SwTableLine, pLine );
if( !rParam.bTop )
++nPos;
pLines->C40_INSERT( SwTableLine, pNewLine, nPos );
@@ -4213,7 +4214,7 @@ BOOL lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
// und noch mal die Anzahl Boxen erzeugen
SwTableBoxes& rNewBoxes = pNewLine->GetTabBoxes();
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
SwTwips nWidth = 0;
SwTableBox* pOld = rBoxes[ n ];
@@ -4250,26 +4251,26 @@ BOOL lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
{
// Boxen einsammeln!
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- for( USHORT n = rBoxes.Count(); n; )
+ for( sal_uInt16 n = rBoxes.Count(); n; )
{
SwTableBox* pBox = rBoxes[ --n ];
if( pBox->GetFrmFmt()->GetProtect().IsCntntProtected() )
- return FALSE;
+ return sal_False;
if( pBox->GetSttNd() )
rParam.aBoxes.Insert( pBox );
else
{
- for( USHORT i = pBox->GetTabLines().Count(); i; )
+ for( sal_uInt16 i = pBox->GetTabLines().Count(); i; )
lcl_InsDelSelLine( pBox->GetTabLines()[ --i ],
- rParam, 0, TRUE );
+ rParam, 0, sal_True );
}
}
}
return bRet;
}
-BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
+sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff,SwUndo** ppUndo )
{
SwTableLine* pLine = rAktBox.GetUpper();
@@ -4280,13 +4281,13 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
_FndBox* pFndBox = 0; // fuers Einfuegen/Loeschen
SwTableSortBoxes aTmpLst( 0, 5 ); // fuers Undo
- BOOL bBigger,
- bRet = FALSE,
+ sal_Bool bBigger,
+ bRet = sal_False,
bTop = nsTblChgWidthHeightType::WH_ROW_TOP == ( eType & 0xff ) ||
nsTblChgWidthHeightType::WH_CELL_TOP == ( eType & 0xff ),
bInsDel = 0 != (eType & nsTblChgWidthHeightType::WH_FLAG_INSDEL );
- USHORT n, nBaseLinePos = GetTabLines().C40_GETPOS( SwTableLine, pBaseLine );
- ULONG nBoxIdx = rAktBox.GetSttIdx();
+ sal_uInt16 n, nBaseLinePos = GetTabLines().C40_GETPOS( SwTableLine, pBaseLine );
+ sal_uLong nBoxIdx = rAktBox.GetSttIdx();
CR_SetLineHeight aParam( eType,
(SwTableNode*)rAktBox.GetSttNd()->FindTableNode() );
@@ -4327,7 +4328,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
// erstmal testen, ob ueberhaupt Platz ist
if( bBigger )
{
- bRet = TRUE;
+ bRet = sal_True;
// was ist mit Top, was ist mit Tabelle im Rahmen oder in Kopf-/Fusszeile
// mit fester Hoehe ??
if( !bRet )
@@ -4346,7 +4347,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
}
else
bRet = (*fnSelLine)( (*pLines)[ nBaseLinePos ], aParam,
- nAbsDiff, TRUE );
+ nAbsDiff, sal_True );
if( bRet )
{
@@ -4354,7 +4355,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
{
if( !aParam.aBoxes.Count() )
::lcl_InsDelSelLine( (*pLines)[ nBaseLinePos ],
- aParam, 0, TRUE );
+ aParam, 0, sal_True );
pFndBox = ::lcl_SaveInsDelData( aParam, ppUndo, aTmpLst );
@@ -4363,7 +4364,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
aParam.aBoxes.Count() == aSortCntBoxes.Count() )
{
GetFrmFmt()->GetDoc()->DeleteRowCol( aParam.aBoxes );
- return FALSE;
+ return sal_False;
}
@@ -4373,16 +4374,16 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
: UNDO_ROW_DELETE );
}
else if( ppUndo )
- *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, TRUE );
+ *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, sal_True );
(*fnSelLine)( (*pLines)[ nBaseLinePos ], aParam,
- nAbsDiff, FALSE );
+ nAbsDiff, sal_False );
}
}
else
{
- bRet = TRUE;
- USHORT nStt, nEnd;
+ bRet = sal_True;
+ sal_uInt16 nStt, nEnd;
if( bTop )
nStt = 0, nEnd = nBaseLinePos;
else
@@ -4399,7 +4400,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
aParam.nMaxHeight += pLineFrm->Frm().Height();
}
if( bBigger && aParam.nMaxSpace < nAbsDiff )
- bRet = FALSE;
+ bRet = sal_False;
}
else
{
@@ -4411,7 +4412,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
nEnd = nStt + 1;
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
if( bRet )
@@ -4421,16 +4422,16 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
for( n = nStt; n < nEnd; ++n )
{
if( !(*fnOtherLine)( (*pLines)[ n ], aParam,
- nAbsDiff, TRUE ))
+ nAbsDiff, sal_True ))
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
}
else
bRet = (*fnSelLine)( (*pLines)[ nBaseLinePos ], aParam,
- nAbsDiff, TRUE );
+ nAbsDiff, sal_True );
}
if( bRet )
@@ -4440,7 +4441,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
{
if( !aParam.aBoxes.Count() )
::lcl_InsDelSelLine( (*pLines)[ nBaseLinePos ],
- aParam, 0, TRUE );
+ aParam, 0, sal_True );
pFndBox = ::lcl_SaveInsDelData( aParam, ppUndo, aTmpLst );
if( ppUndo )
*ppUndo = aParam.CreateUndo(
@@ -4448,7 +4449,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
: UNDO_ROW_DELETE );
}
else if( ppUndo )
- *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, TRUE );
+ *ppUndo = new SwUndoAttrTbl( *aParam.pTblNd, sal_True );
CR_SetLineHeight aParam1( aParam );
if( TBLFIX_CHGPROP == eTblChgMode && !bBigger &&
@@ -4463,18 +4464,18 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
if( bTop )
{
(*fnSelLine)( (*pLines)[ nBaseLinePos ], aParam,
- nAbsDiff, FALSE );
+ nAbsDiff, sal_False );
for( n = nStt; n < nEnd; ++n )
(*fnOtherLine)( (*pLines)[ n ], aParam1,
- nAbsDiff, FALSE );
+ nAbsDiff, sal_False );
}
else
{
for( n = nStt; n < nEnd; ++n )
(*fnOtherLine)( (*pLines)[ n ], aParam1,
- nAbsDiff, FALSE );
+ nAbsDiff, sal_False );
(*fnSelLine)( (*pLines)[ nBaseLinePos ], aParam,
- nAbsDiff, FALSE );
+ nAbsDiff, sal_False );
}
}
else
@@ -4510,7 +4511,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
if( ppUndo && *ppUndo )
{
- aParam.pUndo->SetColWidthParam( nBoxIdx, static_cast<USHORT>(eTblChgMode), eType,
+ aParam.pUndo->SetColWidthParam( nBoxIdx, static_cast<sal_uInt16>(eTblChgMode), eType,
nAbsDiff, nRelDiff );
if( bBigger )
aParam.pUndo->SaveNewBoxes( *aParam.pTblNd, aTmpLst );
@@ -4525,7 +4526,7 @@ BOOL SwTable::SetRowHeight( SwTableBox& rAktBox, USHORT eType,
SwFrmFmt* SwShareBoxFmt::GetFormat( long nWidth ) const
{
SwFrmFmt *pRet = 0, *pTmp;
- for( USHORT n = aNewFmts.Count(); n; )
+ for( sal_uInt16 n = aNewFmts.Count(); n; )
if( ( pTmp = (SwFrmFmt*)aNewFmts[ --n ])->GetFrmSize().GetWidth()
== nWidth )
{
@@ -4538,13 +4539,13 @@ SwFrmFmt* SwShareBoxFmt::GetFormat( long nWidth ) const
SwFrmFmt* SwShareBoxFmt::GetFormat( const SfxPoolItem& rItem ) const
{
const SfxPoolItem* pItem;
- USHORT nWhich = rItem.Which();
+ sal_uInt16 nWhich = rItem.Which();
SwFrmFmt *pRet = 0, *pTmp;
- const SfxPoolItem& rFrmSz = pOldFmt->GetFmtAttr( RES_FRM_SIZE, FALSE );
- for( USHORT n = aNewFmts.Count(); n; )
+ const SfxPoolItem& rFrmSz = pOldFmt->GetFmtAttr( RES_FRM_SIZE, sal_False );
+ for( sal_uInt16 n = aNewFmts.Count(); n; )
if( SFX_ITEM_SET == ( pTmp = (SwFrmFmt*)aNewFmts[ --n ])->
- GetItemState( nWhich, FALSE, &pItem ) && *pItem == rItem &&
- pTmp->GetFmtAttr( RES_FRM_SIZE, FALSE ) == rFrmSz )
+ GetItemState( nWhich, sal_False, &pItem ) && *pItem == rItem &&
+ pTmp->GetFmtAttr( RES_FRM_SIZE, sal_False ) == rFrmSz )
{
pRet = pTmp;
break;
@@ -4558,14 +4559,14 @@ void SwShareBoxFmt::AddFormat( const SwFrmFmt& rNew )
aNewFmts.Insert( pFmt, aNewFmts.Count() );
}
-BOOL SwShareBoxFmt::RemoveFormat( const SwFrmFmt& rFmt )
+sal_Bool SwShareBoxFmt::RemoveFormat( const SwFrmFmt& rFmt )
{
- // returnt TRUE, wenn geloescht werden kann
+ // returnt sal_True, wenn geloescht werden kann
if( pOldFmt == &rFmt )
- return TRUE;
+ return sal_True;
void* p = (void*)&rFmt;
- USHORT nFnd = aNewFmts.GetPos( p );
+ sal_uInt16 nFnd = aNewFmts.GetPos( p );
if( USHRT_MAX != nFnd )
aNewFmts.Remove( nFnd );
return 0 == aNewFmts.Count();
@@ -4577,7 +4578,7 @@ SwShareBoxFmts::~SwShareBoxFmts()
SwFrmFmt* SwShareBoxFmts::GetFormat( const SwFrmFmt& rFmt, long nWidth ) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
return Seek_Entry( rFmt, &nPos )
? aShareArr[ nPos ]->GetFormat( nWidth )
: 0;
@@ -4585,7 +4586,7 @@ SwFrmFmt* SwShareBoxFmts::GetFormat( const SwFrmFmt& rFmt, long nWidth ) const
SwFrmFmt* SwShareBoxFmts::GetFormat( const SwFrmFmt& rFmt,
const SfxPoolItem& rItem ) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
return Seek_Entry( rFmt, &nPos )
? aShareArr[ nPos ]->GetFormat( rItem )
: 0;
@@ -4594,7 +4595,7 @@ SwFrmFmt* SwShareBoxFmts::GetFormat( const SwFrmFmt& rFmt,
void SwShareBoxFmts::AddFormat( const SwFrmFmt& rOld, const SwFrmFmt& rNew )
{
{
- USHORT nPos;
+ sal_uInt16 nPos;
SwShareBoxFmt* pEntry;
if( !Seek_Entry( rOld, &nPos ))
{
@@ -4676,27 +4677,27 @@ void SwShareBoxFmts::SetAttr( SwTableLine& rLine, const SfxPoolItem& rItem )
void SwShareBoxFmts::RemoveFormat( const SwFrmFmt& rFmt )
{
- for( USHORT i = aShareArr.Count(); i; )
+ for( sal_uInt16 i = aShareArr.Count(); i; )
if( aShareArr[ --i ]->RemoveFormat( rFmt ))
aShareArr.DeleteAndDestroy( i );
}
-BOOL SwShareBoxFmts::Seek_Entry( const SwFrmFmt& rFmt, USHORT* pPos ) const
+sal_Bool SwShareBoxFmts::Seek_Entry( const SwFrmFmt& rFmt, sal_uInt16* pPos ) const
{
- ULONG nIdx = (ULONG)&rFmt;
- USHORT nO = aShareArr.Count(), nM, nU = 0;
+ sal_uLong nIdx = (sal_uLong)&rFmt;
+ sal_uInt16 nO = aShareArr.Count(), nM, nU = 0;
if( nO > 0 )
{
nO--;
while( nU <= nO )
{
nM = nU + ( nO - nU ) / 2;
- ULONG nFmt = (ULONG)&aShareArr[ nM ]->GetOldFormat();
+ sal_uLong nFmt = (sal_uLong)&aShareArr[ nM ]->GetOldFormat();
if( nFmt == nIdx )
{
if( pPos )
*pPos = nM;
- return TRUE;
+ return sal_True;
}
else if( nFmt < nIdx )
nU = nM + 1;
@@ -4704,7 +4705,7 @@ BOOL SwShareBoxFmts::Seek_Entry( const SwFrmFmt& rFmt, USHORT* pPos ) const
{
if( pPos )
*pPos = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
@@ -4712,7 +4713,7 @@ BOOL SwShareBoxFmts::Seek_Entry( const SwFrmFmt& rFmt, USHORT* pPos ) const
}
if( pPos )
*pPos = nU;
- return FALSE;
+ return sal_False;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/visiturl.cxx b/sw/source/core/doc/visiturl.cxx
index 6de29cd3d866..a39ced3f767e 100644
--- a/sw/source/core/doc/visiturl.cxx
+++ b/sw/source/core/doc/visiturl.cxx
@@ -68,13 +68,13 @@ void SwURLStateChanged::Notify( SfxBroadcaster& , const SfxHint& rHint )
sURL == pDoc->GetDocShell()->GetMedium()->GetName() )
(sBkmk = pIURL->GetMark()).Insert( INET_MARK_TOKEN, 0 );
- BOOL bAction = FALSE, bUnLockView = FALSE;
+ sal_Bool bAction = sal_False, bUnLockView = sal_False;
const SwFmtINetFmt* pItem;
const SwTxtINetFmt* pTxtAttr;
const SwTxtNode* pTxtNd;
- USHORT n, nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_TXTATR_INETFMT );
+ sal_uInt32 n, nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT );
for( n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = (SwFmtINetFmt*)pDoc->GetAttrPool().GetItem(
+ if( 0 != (pItem = (SwFmtINetFmt*)pDoc->GetAttrPool().GetItem2(
RES_TXTATR_INETFMT, n ) ) &&
( pItem->GetValue() == sURL ||
( sBkmk.Len() && pItem->GetValue() == sBkmk )) &&
@@ -84,9 +84,9 @@ void SwURLStateChanged::Notify( SfxBroadcaster& , const SfxHint& rHint )
if( !bAction && pESh )
{
pESh->StartAllAction();
- bAction = TRUE;
+ bAction = sal_True;
bUnLockView = !pESh->IsViewLocked();
- pESh->LockView( TRUE );
+ pESh->LockView( sal_True );
}
const_cast<SwTxtINetFmt*>(pTxtAttr)->SetVisitedValid( false );
const SwTxtAttr* pAttr = pTxtAttr;
@@ -99,20 +99,20 @@ void SwURLStateChanged::Notify( SfxBroadcaster& , const SfxHint& rHint )
if( bAction )
pESh->EndAllAction();
if( bUnLockView )
- pESh->LockView( FALSE );
+ pESh->LockView( sal_False );
}
}
// erfrage ob die URL besucht war. Uebers Doc, falls nur ein Bookmark
// angegeben ist. Dann muss der Doc. Name davor gesetzt werden!
-BOOL SwDoc::IsVisitedURL( const String& rURL ) const
+sal_Bool SwDoc::IsVisitedURL( const String& rURL ) const
{
#if OSL_DEBUG_LEVEL > 1
static long nTmp = 0;
++nTmp;
#endif
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rURL.Len() )
{
INetURLHistory *pHist = INetURLHistory::GetOrCreate();
diff --git a/sw/source/core/docnode/makefile.mk b/sw/source/core/docnode/makefile.mk
deleted file mode 100644
index e188c8d6ec9c..000000000000
--- a/sw/source/core/docnode/makefile.mk
+++ /dev/null
@@ -1,73 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=docnode
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES= \
- $(SLO)$/cancellablejob.obj \
- $(SLO)$/finalthreadmanager.obj \
- $(SLO)$/ndcopy.obj \
- $(SLO)$/ndindex.obj \
- $(SLO)$/ndnotxt.obj \
- $(SLO)$/ndnum.obj \
- $(SLO)$/ndsect.obj \
- $(SLO)$/ndtbl.obj \
- $(SLO)$/ndtbl1.obj \
- $(SLO)$/node.obj \
- $(SLO)$/node2lay.obj \
- $(SLO)$/nodes.obj \
- $(SLO)$/observablethread.obj \
- $(SLO)$/retrievedinputstreamdata.obj \
- $(SLO)$/retrieveinputstream.obj \
- $(SLO)$/retrieveinputstreamconsumer.obj \
- $(SLO)$/section.obj \
- $(SLO)$/swbaslnk.obj \
- $(SLO)$/swthreadmanager.obj \
- $(SLO)$/threadlistener.obj \
- $(SLO)$/threadmanager.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/pausethreadstarting.obj \
- $(SLO)$/swthreadjoiner.obj
-
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx
index 5a86b1af6f7b..156529b38f56 100644
--- a/sw/source/core/docnode/ndcopy.cxx
+++ b/sw/source/core/docnode/ndcopy.cxx
@@ -29,16 +29,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <editeng/brkitem.hxx>
#define _ZFORLIST_DECLARE_TABLE
#include <hintids.hxx>
-
-
-#include <editeng/brkitem.hxx>
#include <fmtpdsc.hxx>
#include <fmtanchr.hxx>
#include <fmtcntnt.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
#include <fldbas.hxx>
@@ -77,10 +76,10 @@ namespace
nNewIdx is the new position of interest.
*/
- static void lcl_NonCopyCount( const SwPaM& rPam, SwNodeIndex& rLastIdx, const ULONG nNewIdx, ULONG& rDelCount )
+ static void lcl_NonCopyCount( const SwPaM& rPam, SwNodeIndex& rLastIdx, const sal_uLong nNewIdx, sal_uLong& rDelCount )
{
- ULONG nStart = rPam.Start()->nNode.GetIndex();
- ULONG nEnd = rPam.End()->nNode.GetIndex();
+ sal_uLong nStart = rPam.Start()->nNode.GetIndex();
+ sal_uLong nEnd = rPam.End()->nNode.GetIndex();
if( rLastIdx.GetIndex() < nNewIdx ) // Moving forward?
{
do // count "non-copy" nodes
@@ -111,9 +110,9 @@ namespace
const SwPosition& rOrigStt,
const SwPosition& rCpyStt,
SwPosition& rChgPos,
- ULONG nDelCount )
+ sal_uLong nDelCount )
{
- ULONG nNdOff = rOrigPos.nNode.GetIndex();
+ sal_uLong nNdOff = rOrigPos.nNode.GetIndex();
nNdOff -= rOrigStt.nNode.GetIndex();
nNdOff -= nDelCount;
xub_StrLen nCntntPos = rOrigPos.nContent.GetIndex();
@@ -138,8 +137,7 @@ namespace
const SwDoc* pSrcDoc = rPam.GetDoc();
SwDoc* pDestDoc = rCpyPam.GetDoc();
const IDocumentMarkAccess* const pSrcMarkAccess = pSrcDoc->getIDocumentMarkAccess();
- bool bDoesUndo = pDestDoc->DoesUndo();
- pDestDoc->DoUndo(false);
+ ::sw::UndoGuard const undoGuard(pDestDoc->GetIDocumentUndoRedo());
const SwPosition &rStt = *rPam.Start(), &rEnd = *rPam.End();
SwPosition* pCpyStt = rCpyPam.Start();
@@ -165,7 +163,7 @@ namespace
}
// We have to count the "non-copied" nodes..
SwNodeIndex aCorrIdx(rStt.nNode);
- ULONG nDelCount = 0;
+ sal_uLong nDelCount = 0;
for(mark_vector_t::const_iterator ppMark = vMarksToCopy.begin();
ppMark != vMarksToCopy.end();
++ppMark)
@@ -205,7 +203,6 @@ namespace
pNewMetadatable->RegisterAsCopyOf(*pMetadatable);
}
}
- pDestDoc->DoUndo(bDoesUndo);
}
}
@@ -285,37 +282,37 @@ SwCntntNode* SwTxtNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
}
-BOOL lcl_SrchNew( const _MapTblFrmFmt& rMap, void * pPara )
+sal_Bool lcl_SrchNew( const _MapTblFrmFmt& rMap, void * pPara )
{
if( rMap.pOld != *(const SwFrmFmt**)pPara )
- return TRUE;
+ return sal_True;
*((const SwFrmFmt**)pPara) = rMap.pNew;
- return FALSE; // abbrechen, Pointer gefunden
+ return sal_False; // abbrechen, Pointer gefunden
}
struct _CopyTable
{
SwDoc* pDoc;
- ULONG nOldTblSttIdx;
+ sal_uLong nOldTblSttIdx;
_MapTblFrmFmts& rMapArr;
SwTableLine* pInsLine;
SwTableBox* pInsBox;
SwTableNode *pTblNd;
const SwTable *pOldTable;
- _CopyTable( SwDoc* pDc, _MapTblFrmFmts& rArr, ULONG nOldStt,
+ _CopyTable( SwDoc* pDc, _MapTblFrmFmts& rArr, sal_uLong nOldStt,
SwTableNode& rTblNd, const SwTable* pOldTbl )
: pDoc(pDc), nOldTblSttIdx(nOldStt), rMapArr(rArr),
pInsLine(0), pInsBox(0), pTblNd(&rTblNd), pOldTable( pOldTbl )
{}
};
-BOOL lcl_CopyTblBox( const SwTableBox*& rpBox, void* pPara );
+sal_Bool lcl_CopyTblBox( const SwTableBox*& rpBox, void* pPara );
-BOOL lcl_CopyTblLine( const SwTableLine*& rpLine, void* pPara );
+sal_Bool lcl_CopyTblLine( const SwTableLine*& rpLine, void* pPara );
-BOOL lcl_CopyTblBox( const SwTableBox*& rpBox, void* pPara )
+sal_Bool lcl_CopyTblBox( const SwTableBox*& rpBox, void* pPara )
{
_CopyTable* pCT = (_CopyTable*)pPara;
@@ -324,7 +321,7 @@ BOOL lcl_CopyTblBox( const SwTableBox*& rpBox, void* pPara )
if( pBoxFmt == rpBox->GetFrmFmt() ) // ein neues anlegen ??
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pBoxFmt->GetItemState( RES_BOXATR_FORMULA, FALSE,
+ if( SFX_ITEM_SET == pBoxFmt->GetItemState( RES_BOXATR_FORMULA, sal_False,
&pItem ) && ((SwTblBoxFormula*)pItem)->IsIntrnlName() )
{
((SwTblBoxFormula*)pItem)->PtrToBoxNm( pCT->pOldTable );
@@ -335,12 +332,12 @@ BOOL lcl_CopyTblBox( const SwTableBox*& rpBox, void* pPara )
if( rpBox->GetSttIdx() )
{
- SvNumberFormatter* pN = pCT->pDoc->GetNumberFormatter( FALSE );
+ SvNumberFormatter* pN = pCT->pDoc->GetNumberFormatter( sal_False );
if( pN && pN->HasMergeFmtTbl() && SFX_ITEM_SET == pBoxFmt->
- GetItemState( RES_BOXATR_FORMAT, FALSE, &pItem ) )
+ GetItemState( RES_BOXATR_FORMAT, sal_False, &pItem ) )
{
- ULONG nOldIdx = ((SwTblBoxNumFormat*)pItem)->GetValue();
- ULONG nNewIdx = pN->GetMergeFmtIndex( nOldIdx );
+ sal_uLong nOldIdx = ((SwTblBoxNumFormat*)pItem)->GetValue();
+ sal_uLong nNewIdx = pN->GetMergeFmtIndex( nOldIdx );
if( nNewIdx != nOldIdx )
pBoxFmt->SetFmtAttr( SwTblBoxNumFormat( nNewIdx ));
@@ -351,7 +348,7 @@ BOOL lcl_CopyTblBox( const SwTableBox*& rpBox, void* pPara )
pCT->rMapArr.Count() );
}
- USHORT nLines = rpBox->GetTabLines().Count();
+ sal_uInt16 nLines = rpBox->GetTabLines().Count();
SwTableBox* pNewBox;
if( nLines )
pNewBox = new SwTableBox( pBoxFmt, nLines, pCT->pInsLine );
@@ -376,10 +373,10 @@ BOOL lcl_CopyTblBox( const SwTableBox*& rpBox, void* pPara )
else if( pNewBox->IsInHeadline( &pCT->pTblNd->GetTable() ))
// in der HeadLine sind die Absaetze mit BedingtenVorlage anzupassen
pNewBox->GetSttNd()->CheckSectionCondColl();
- return TRUE;
+ return sal_True;
}
-BOOL lcl_CopyTblLine( const SwTableLine*& rpLine, void* pPara )
+sal_Bool lcl_CopyTblLine( const SwTableLine*& rpLine, void* pPara )
{
_CopyTable* pCT = (_CopyTable*)pPara;
SwTableLineFmt* pLineFmt = (SwTableLineFmt*)rpLine->GetFrmFmt();
@@ -406,7 +403,7 @@ BOOL lcl_CopyTblLine( const SwTableLine*& rpLine, void* pPara )
}
pCT->pInsLine = pNewLine;
((SwTableLine*)rpLine)->GetTabBoxes().ForEach( &lcl_CopyTblBox, pCT );
- return TRUE;
+ return sal_True;
}
SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
@@ -425,7 +422,7 @@ SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
if( !pDoc->IsCopyIsMove() )
{
const SwFrmFmts& rTblFmts = *pDoc->GetTblFrmFmts();
- for( USHORT n = rTblFmts.Count(); n; )
+ for( sal_uInt16 n = rTblFmts.Count(); n; )
if( rTblFmts[ --n ]->GetName() == sTblName )
{
sTblName = pDoc->GetUniqueTblName();
@@ -460,7 +457,7 @@ SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
// tauschen am Node den Tabellen-Pointer aus
SwDDETable* pNewTable = new SwDDETable( pTblNd->GetTable(), pDDEType );
- pTblNd->SetNewTable( pNewTable, FALSE );
+ pTblNd->SetNewTable( pNewTable, sal_False );
}
// dann kopiere erstmal den Inhalt der Tabelle, die Zuordnung der
// Boxen/Lines und das anlegen der Frames erfolgt spaeter
@@ -472,7 +469,7 @@ SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
// We have to make sure that the table node of the SwTable is accessible, even
// without any content in aSortCntBoxes. #i26629#
pTblNd->GetTable().SetTableNode( pTblNd );
- rNds._Copy( aRg, aInsPos, FALSE );
+ rNds._Copy( aRg, aInsPos, sal_False );
pTblNd->GetTable().SetTableNode( 0 );
// Sonderbehandlung fuer eine einzelne Box
@@ -512,10 +509,10 @@ void SwTxtNode::CopyCollFmt( SwTxtNode& rDestNd )
{
// Sonderbehandlung fuer unsere Break-Attribute
const SfxPoolItem* pAttr;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, FALSE, &pAttr ) )
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False, &pAttr ) )
aPgBrkSet.Put( *pAttr );
- if( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, FALSE, &pAttr ) )
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, sal_False, &pAttr ) )
aPgBrkSet.Put( *pAttr );
}
@@ -531,12 +528,12 @@ void SwTxtNode::CopyCollFmt( SwTxtNode& rDestNd )
// ----- Copy-Methode vom SwDoc ------
// verhinder das Kopieren in Fly's, die im Bereich verankert sind.
-BOOL lcl_ChkFlyFly( SwDoc* pDoc, ULONG nSttNd, ULONG nEndNd,
- ULONG nInsNd )
+sal_Bool lcl_ChkFlyFly( SwDoc* pDoc, sal_uLong nSttNd, sal_uLong nEndNd,
+ sal_uLong nInsNd )
{
const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts();
- for( USHORT n = 0; n < rFrmFmtTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFrmFmtTbl.Count(); ++n )
{
SwFrmFmt const*const pFmt = rFrmFmtTbl[n];
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -557,15 +554,15 @@ BOOL lcl_ChkFlyFly( SwDoc* pDoc, ULONG nSttNd, ULONG nEndNd,
if( pSNd->GetIndex() < nInsNd &&
nInsNd < pSNd->EndOfSectionIndex() )
- return TRUE; // nicht kopieren !!
+ return sal_True; // nicht kopieren !!
if( lcl_ChkFlyFly( pDoc, pSNd->GetIndex(),
pSNd->EndOfSectionIndex(), nInsNd ) )
- return TRUE; // nicht kopieren !!
+ return sal_True; // nicht kopieren !!
}
}
- return FALSE;
+ return sal_False;
}
void lcl_DeleteRedlines( const SwPaM& rPam, SwPaM& rCpyPam )
@@ -579,10 +576,10 @@ void lcl_DeleteRedlines( const SwPaM& rPam, SwPaM& rCpyPam )
SwPaM* pDelPam = 0;
const SwPosition *pStt = rPam.Start(), *pEnd = rPam.End();
// We have to count the "non-copied" nodes
- ULONG nDelCount = 0;
+ sal_uLong nDelCount = 0;
SwNodeIndex aCorrIdx( pStt->nNode );
- USHORT n = 0;
+ sal_uInt16 n = 0;
pSrcDoc->GetRedline( *pStt, &n );
for( ; n < rTbl.Count(); ++n )
{
@@ -632,18 +629,16 @@ void lcl_DeleteRedlines( const SwPaM& rPam, SwPaM& rCpyPam )
RedlineMode_t eOld = pDestDoc->GetRedlineMode();
pDestDoc->SetRedlineMode_intern( (RedlineMode_t)(eOld | nsRedlineMode_t::REDLINE_IGNORE));
- BOOL bDoesUndo = pDestDoc->DoesUndo();
- pDestDoc->DoUndo( FALSE );
+ ::sw::UndoGuard const undoGuard(pDestDoc->GetIDocumentUndoRedo());
do {
pDestDoc->DeleteAndJoin( *(SwPaM*)pDelPam->GetNext() );
if( pDelPam->GetNext() == pDelPam )
break;
delete pDelPam->GetNext();
- } while( TRUE );
+ } while( sal_True );
delete pDelPam;
- pDestDoc->DoUndo( bDoesUndo );
pDestDoc->SetRedlineMode_intern( eOld );
}
}
@@ -678,7 +673,7 @@ SwDoc::CopyRange( SwPaM& rPam, SwPosition& rPos, const bool bCopyAll ) const
if( pDoc == this )
{
// Start-/EndNode noch korrigieren
- ULONG nStt = pStt->nNode.GetIndex(),
+ sal_uLong nStt = pStt->nNode.GetIndex(),
nEnd = pEnd->nNode.GetIndex(),
nDiff = nEnd - nStt +1;
SwNode* pNd = GetNodes()[ nStt ];
@@ -722,49 +717,50 @@ SwDoc::CopyRange( SwPaM& rPam, SwPosition& rPos, const bool bCopyAll ) const
"please tell me what you did to get here!");
pDoc->SetRedlineMode_intern((RedlineMode_t)(eOld | nsRedlineMode_t::REDLINE_IGNORE));
- BOOL bDoUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE ); // Auf jedenfall Undo abschalten
// dann kopiere den Bereich im unteren DokumentBereich,
// (mit Start/End-Nodes geklammert) und verschiebe diese
// dann an die gewuenschte Stelle.
SwUndoCpyDoc* pUndo = 0;
SwPaM aPam( rPos ); // UndoBereich sichern
- if( bDoUndo )
+ if (pDoc->GetIDocumentUndoRedo().DoesUndo())
{
- pDoc->ClearRedo();
+ pDoc->GetIDocumentUndoRedo().ClearRedo();
pUndo = new SwUndoCpyDoc( aPam );
}
- SwStartNode* pSttNd = pDoc->GetNodes().MakeEmptySection(
+ {
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
+ SwStartNode* pSttNd = pDoc->GetNodes().MakeEmptySection(
SwNodeIndex( GetNodes().GetEndOfAutotext() ));
- aPam.GetPoint()->nNode = *pSttNd->EndOfSectionNode();
- // copy without Frames
- pDoc->CopyImpl( rPam, *aPam.GetPoint(), false, bCopyAll, 0 );
-
- aPam.GetPoint()->nNode = pDoc->GetNodes().GetEndOfAutotext();
- aPam.SetMark();
- SwCntntNode* pNode = pDoc->GetNodes().GoPrevious( &aPam.GetMark()->nNode );
- pNode->MakeEndIndex( &aPam.GetMark()->nContent );
-
- aPam.GetPoint()->nNode = *aPam.GetNode()->StartOfSectionNode();
- pNode = pDoc->GetNodes().GoNext( &aPam.GetPoint()->nNode );
- pNode->MakeStartIndex( &aPam.GetPoint()->nContent );
- // move to desired position
- pDoc->MoveRange( aPam, rPos, DOC_MOVEDEFAULT );
-
- pNode = aPam.GetCntntNode();
- *aPam.GetPoint() = rPos; // Cursor umsetzen fuers Undo !
- aPam.SetMark(); // auch den Mark umsetzen !!
- aPam.DeleteMark(); // aber keinen Bereich makieren !!
- pDoc->DeleteSection( pNode ); // Bereich wieder loeschen
-
- // falls Undo eingeschaltet ist, so speicher den eingefuegten Bereich
- pDoc->DoUndo( bDoUndo );
- if( bDoUndo )
+ aPam.GetPoint()->nNode = *pSttNd->EndOfSectionNode();
+ // copy without Frames
+ pDoc->CopyImpl( rPam, *aPam.GetPoint(), false, bCopyAll, 0 );
+
+ aPam.GetPoint()->nNode = pDoc->GetNodes().GetEndOfAutotext();
+ aPam.SetMark();
+ SwCntntNode* pNode =
+ pDoc->GetNodes().GoPrevious( &aPam.GetMark()->nNode );
+ pNode->MakeEndIndex( &aPam.GetMark()->nContent );
+
+ aPam.GetPoint()->nNode = *aPam.GetNode()->StartOfSectionNode();
+ pNode = pDoc->GetNodes().GoNext( &aPam.GetPoint()->nNode );
+ pNode->MakeStartIndex( &aPam.GetPoint()->nContent );
+ // move to desired position
+ pDoc->MoveRange( aPam, rPos, DOC_MOVEDEFAULT );
+
+ pNode = aPam.GetCntntNode();
+ *aPam.GetPoint() = rPos; // Cursor umsetzen fuers Undo !
+ aPam.SetMark(); // auch den Mark umsetzen !!
+ aPam.DeleteMark(); // aber keinen Bereich makieren !!
+ pDoc->DeleteSection( pNode ); // Bereich wieder loeschen
+ }
+
+ // if Undo is enabled, store the insertion range
+ if (pDoc->GetIDocumentUndoRedo().DoesUndo())
{
pUndo->SetInsertRange( aPam );
- pDoc->AppendUndo( pUndo );
+ pDoc->GetIDocumentUndoRedo().AppendUndo(pUndo);
}
if( pRedlineRange )
@@ -874,11 +870,10 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
SwTblNumFmtMerge aTNFM( *this, *pDoc );
- if( pDoc->DoesUndo() )
+ if (pDoc->GetIDocumentUndoRedo().DoesUndo())
{
- pDoc->ClearRedo();
pUndo = new SwUndoCpyDoc( aCpyPam );
- pDoc->AppendUndo( pUndo );
+ pDoc->GetIDocumentUndoRedo().AppendUndo( pUndo );
}
RedlineMode_t eOld = pDoc->GetRedlineMode();
@@ -888,7 +883,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
// bewege den Pam von der Insert-Position ein zurueck, dadurch wird
// die Position nicht "verschoben"
aCpyPam.SetMark();
- BOOL bCanMoveBack = aCpyPam.Move( fnMoveBackward, fnGoCntnt );
+ sal_Bool bCanMoveBack = aCpyPam.Move( fnMoveBackward, fnGoCntnt );
// If the position was shifted from more than one node, an end node has been skipped
bool bAfterTable = false;
if ( ( rPos.nNode.GetIndex() - aCpyPam.GetPoint()->nNode.GetIndex() ) > 1 )
@@ -913,7 +908,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
( ( pDestTxtNd && !pDestTxtNd->GetTxt().Len() ) ||
( !bOneNode && !rPos.nContent.GetIndex() ) );
bool bCopyBookmarks = true;
- BOOL bStartIsTxtNode = 0 != pSttTxtNd;
+ sal_Bool bStartIsTxtNode = 0 != pSttTxtNd;
// #i104585# copy outline num rule to clipboard (for ASCII filter)
if (pDoc->IsClipBoard() && GetOutlineNumRule())
@@ -955,7 +950,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
if( !bCopyCollFmt || bColumnSel || pStt->nContent.GetIndex() )
{
SwIndex aDestIdx( rPos.nContent );
- BOOL bCopyOk = FALSE;
+ sal_Bool bCopyOk = sal_False;
if( !pDestTxtNd )
{
if( pStt->nContent.GetIndex() || bOneNode )
@@ -964,7 +959,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
else
{
pDestTxtNd = static_cast<SwTxtNode*>(pSttTxtNd->MakeCopy( pDoc, aInsPos ));
- bCopyOk = TRUE;
+ bCopyOk = sal_True;
}
aDestIdx.Assign( pDestTxtNd, 0 );
bCopyCollFmt = true;
@@ -972,10 +967,10 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
else if( !bOneNode || bColumnSel )
{
xub_StrLen nCntntEnd = pEnd->nContent.GetIndex();
- BOOL bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
- pDoc->SplitNode( rPos, false );
- pDoc->DoUndo( bDoesUndo );
+ {
+ ::sw::UndoGuard const ug(pDoc->GetIDocumentUndoRedo());
+ pDoc->SplitNode( rPos, false );
+ }
if( bCanMoveBack && rPos == *aCpyPam.GetPoint() )
{
@@ -990,7 +985,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
// korrigiere den Bereich wieder !!
if( bEndEqualIns )
{
- BOOL bChg = pEnd != rPam.GetPoint();
+ sal_Bool bChg = pEnd != rPam.GetPoint();
if( bChg )
rPam.Exchange();
rPam.Move( fnMoveBackward, fnGoCntnt );
@@ -1020,12 +1015,12 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
if (pAttrSet != NULL)
{
const SfxPoolItem * pItem = NULL;
- aNumRuleState = pAttrSet->GetItemState(RES_PARATR_NUMRULE, FALSE, &pItem);
+ aNumRuleState = pAttrSet->GetItemState(RES_PARATR_NUMRULE, sal_False, &pItem);
if (SFX_ITEM_SET == aNumRuleState)
aNumRuleItem = *((SwNumRuleItem *) pItem);
aListIdState =
- pAttrSet->GetItemState(RES_PARATR_LIST_ID, FALSE, &pItem);
+ pAttrSet->GetItemState(RES_PARATR_LIST_ID, sal_False, &pItem);
if (SFX_ITEM_SET == aListIdState)
{
aListIdItem.SetValue( static_cast<const SfxStringItem*>(pItem)->GetValue() );
@@ -1095,14 +1090,14 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
else if( rPos.nContent.GetIndex() )
{ // Insertion in the middle of a text node, it has to be split
// (and joined from undo)
- bStartIsTxtNode = TRUE;
+ bStartIsTxtNode = sal_True;
// splitte den TextNode, bei dem Eingefuegt wird.
xub_StrLen nCntntEnd = pEnd->nContent.GetIndex();
- BOOL bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
- pDoc->SplitNode( rPos, false );
- pDoc->DoUndo( bDoesUndo );
+ {
+ ::sw::UndoGuard const ug(pDoc->GetIDocumentUndoRedo());
+ pDoc->SplitNode( rPos, false );
+ }
if( bCanMoveBack && rPos == *aCpyPam.GetPoint() )
{
@@ -1152,7 +1147,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
// will ensure that this node will be deleted during Undo
// using JoinNext.
DBG_ASSERT( !bStartIsTxtNode, "Oops, undo may be instable now." );
- bStartIsTxtNode = TRUE;
+ bStartIsTxtNode = sal_True;
}
// Save numrule at destination
@@ -1168,12 +1163,12 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
const SfxPoolItem * pItem = NULL;
aNumRuleState =
- pAttrSet->GetItemState(RES_PARATR_NUMRULE, FALSE, &pItem);
+ pAttrSet->GetItemState(RES_PARATR_NUMRULE, sal_False, &pItem);
if (SFX_ITEM_SET == aNumRuleState)
aNumRuleItem = *((SwNumRuleItem *) pItem);
aListIdState =
- pAttrSet->GetItemState(RES_PARATR_LIST_ID, FALSE, &pItem);
+ pAttrSet->GetItemState(RES_PARATR_LIST_ID, sal_False, &pItem);
if (SFX_ITEM_SET == aListIdState)
aListIdItem.SetValue( static_cast<const SfxStringItem*>(pItem)->GetValue() );
}
@@ -1223,22 +1218,22 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
if( pSttTxtNd && bCopyCollFmt && pDestTxtNd->HasSwAttrSet() )
{
aBrkSet.Put( *pDestTxtNd->GetpSwAttrSet() );
- if( SFX_ITEM_SET == aBrkSet.GetItemState( RES_BREAK, FALSE ) )
+ if( SFX_ITEM_SET == aBrkSet.GetItemState( RES_BREAK, sal_False ) )
pDestTxtNd->ResetAttr( RES_BREAK );
- if( SFX_ITEM_SET == aBrkSet.GetItemState( RES_PAGEDESC, FALSE ) )
+ if( SFX_ITEM_SET == aBrkSet.GetItemState( RES_PAGEDESC, sal_False ) )
pDestTxtNd->ResetAttr( RES_PAGEDESC );
}
if( aInsPos == pEnd->nNode )
{
SwNodeIndex aSaveIdx( aInsPos, -1 );
- CopyWithFlyInFly( aRg, 0,aInsPos, bMakeNewFrms, FALSE );
+ CopyWithFlyInFly( aRg, 0,aInsPos, bMakeNewFrms, sal_False );
aSaveIdx++;
pEnd->nNode = aSaveIdx;
pEnd->nContent.Assign( aSaveIdx.GetNode().GetTxtNode(), 0 );
}
else
- CopyWithFlyInFly( aRg, pEnd->nContent.GetIndex(), aInsPos, bMakeNewFrms, FALSE );
+ CopyWithFlyInFly( aRg, pEnd->nContent.GetIndex(), aInsPos, bMakeNewFrms, sal_False );
bCopyBookmarks = false;
@@ -1249,7 +1244,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
pDestTxtNd->SetAttr( aBrkSet );
}
}
- } while( FALSE );
+ } while( sal_False );
// Position ummelden ( falls verschoben / im anderen Node )
rPos.nContent.Assign( rPos.nNode.GetNode().GetCntntNode(),
@@ -1258,7 +1253,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
if( rPos.nNode != aInsPos )
{
aCpyPam.GetMark()->nNode = aInsPos;
- aCpyPam.GetMark()->nContent.Assign( aCpyPam.GetCntntNode(FALSE), 0 );
+ aCpyPam.GetMark()->nContent.Assign( aCpyPam.GetCntntNode(sal_False), 0 );
rPos = *aCpyPam.GetMark();
}
else
@@ -1288,8 +1283,10 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
lcl_DeleteRedlines( rPam, aCpyPam );
// falls Undo eingeschaltet ist, so speicher den eingefuegten Bereich
- if( pDoc->DoesUndo() )
- pUndo->SetInsertRange( aCpyPam, TRUE, bStartIsTxtNode );
+ if (pDoc->GetIDocumentUndoRedo().DoesUndo())
+ {
+ pUndo->SetInsertRange( aCpyPam, sal_True, bStartIsTxtNode );
+ }
if( pCpyRange )
{
@@ -1315,16 +1312,16 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos,
// ----- Copy-Methode vom SwDoc - "kopiere Fly's in Fly's" ------
void SwDoc::CopyWithFlyInFly( const SwNodeRange& rRg, const xub_StrLen nEndContentIndex,
- const SwNodeIndex& rInsPos, BOOL bMakeNewFrms,
- BOOL bDelRedlines, BOOL bCopyFlyAtFly ) const
+ const SwNodeIndex& rInsPos, sal_Bool bMakeNewFrms,
+ sal_Bool bDelRedlines, sal_Bool bCopyFlyAtFly ) const
{
SwDoc* pDest = rInsPos.GetNode().GetDoc();
_SaveRedlEndPosForRestore aRedlRest( rInsPos, 0 );
SwNodeIndex aSavePos( rInsPos, -1 );
- BOOL bEndIsEqualEndPos = rInsPos == rRg.aEnd;
- GetNodes()._CopyNodes( rRg, rInsPos, bMakeNewFrms, TRUE );
+ sal_Bool bEndIsEqualEndPos = rInsPos == rRg.aEnd;
+ GetNodes()._CopyNodes( rRg, rInsPos, bMakeNewFrms, sal_True );
aSavePos++;
if( bEndIsEqualEndPos )
((SwNodeIndex&)rRg.aEnd) = aSavePos;
@@ -1350,11 +1347,10 @@ void SwDoc::CopyWithFlyInFly( const SwNodeRange& rRg, const xub_StrLen nEndConte
}
#endif
- // Undo abschalten
- BOOL bUndo = pDest->DoesUndo();
- pDest->DoUndo( FALSE );
- CopyFlyInFlyImpl( rRg, nEndContentIndex, aSavePos, bCopyFlyAtFly );
- pDest->DoUndo( bUndo );
+ {
+ ::sw::UndoGuard const undoGuard(pDest->GetIDocumentUndoRedo());
+ CopyFlyInFlyImpl( rRg, nEndContentIndex, aSavePos, bCopyFlyAtFly );
+ }
SwNodeRange aCpyRange( aSavePos, rInsPos );
@@ -1399,9 +1395,9 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
// beibehalten.
SwDoc *const pDest = rStartIdx.GetNode().GetDoc();
_ZSortFlys aArr;
- USHORT nArrLen = GetSpzFrmFmts()->Count();
+ sal_uInt16 nArrLen = GetSpzFrmFmts()->Count();
- for ( USHORT n = 0; n < nArrLen; ++n )
+ for ( sal_uInt16 n = 0; n < nArrLen; ++n )
{
SwFrmFmt const*const pFmt = (*GetSpzFrmFmts())[n];
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -1441,7 +1437,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
//last node information is only necessary to know for the last TextNode
SwNodeIndex aTmp( pAPos->nNode );
++aTmp;//goto next node
- while( rNodes[aTmp ]->IsEndNode() )
+ while (aTmp.GetNode().IsEndNode())
{
if( aTmp == rNodes.GetEndOfContent().GetIndex() )
{
@@ -1471,7 +1467,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
//die Chains entsprechend aufgebaut werden koennen.
SvPtrarr aNewArr( 10, 10 );
- for ( USHORT n = 0; n < aArr.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < aArr.Count(); ++n )
{
const _ZSortFly& rZSortFly = aArr[ n ];
@@ -1491,7 +1487,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
{
// First, determine number of anchor text node in the copied range.
// Note: The anchor text node *have* to be inside the copied range.
- ULONG nAnchorTxtNdNumInRange( 0L );
+ sal_uLong nAnchorTxtNdNumInRange( 0L );
bool bAnchorTxtNdFound( false );
SwNodeIndex aIdx( rRg.aStart );
while ( !bAnchorTxtNdFound && aIdx <= rRg.aEnd )
@@ -1564,7 +1560,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
// ueberpruefe Rekursion: Inhalt in "seinen eigenen" Frame
// kopieren. Dann nicht kopieren
- BOOL bMakeCpy = TRUE;
+ sal_Bool bMakeCpy = sal_True;
if( pDest == this )
{
const SwFmtCntnt& rCntnt = rZSortFly.GetFmt()->GetCntnt();
@@ -1574,7 +1570,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
pSNd->GetIndex() < rStartIdx.GetIndex() &&
rStartIdx.GetIndex() < pSNd->EndOfSectionIndex() )
{
- bMakeCpy = FALSE;
+ bMakeCpy = sal_False;
aArr.Remove( n, 1 );
--n;
}
@@ -1591,13 +1587,13 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg,
OSL_ENSURE( aArr.Count() == aNewArr.Count(), "Missing new Flys" );
if ( aArr.Count() == aNewArr.Count() )
{
- for ( USHORT n = 0; n < aArr.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < aArr.Count(); ++n )
{
const SwFrmFmt *pFmt = aArr[n].GetFmt();
const SwFmtChain &rChain = pFmt->GetChain();
int nCnt = 0 != rChain.GetPrev();
nCnt += rChain.GetNext() ? 1: 0;
- for ( USHORT k = 0; nCnt && k < aArr.Count(); ++k )
+ for ( sal_uInt16 k = 0; nCnt && k < aArr.Count(); ++k )
{
const _ZSortFly &rTmp = aArr[k];
const SwFrmFmt *pTmp = rTmp.GetFmt();
diff --git a/sw/source/core/docnode/ndindex.cxx b/sw/source/core/docnode/ndindex.cxx
index 499c0b30f5d5..3b064674d7bd 100644
--- a/sw/source/core/docnode/ndindex.cxx
+++ b/sw/source/core/docnode/ndindex.cxx
@@ -44,7 +44,7 @@ SwNodeRange::SwNodeRange( const SwNodeRange &rRange )
: aStart( rRange.aStart ), aEnd( rRange.aEnd )
{}
-SwNodeRange::SwNodeRange( SwNodes& rNds, ULONG nSttIdx, ULONG nEndIdx )
+SwNodeRange::SwNodeRange( SwNodes& rNds, sal_uLong nSttIdx, sal_uLong nEndIdx )
: aStart( rNds, nSttIdx ), aEnd( rNds, nEndIdx )
{}
@@ -60,7 +60,7 @@ SwNodeRange::SwNodeRange( const SwNode& rS, long nSttDiff,
{}
-SwNodeIndex::SwNodeIndex( SwNodes& rNds, ULONG nIdx )
+SwNodeIndex::SwNodeIndex( SwNodes& rNds, sal_uLong nIdx )
: pNd( rNds[ nIdx ] ), pNext( 0 ), pPrev( 0 )
{
rNds.RegisterIndex( *this );
@@ -132,7 +132,7 @@ SwNodeIndex& SwNodeIndex::operator=( const SwNode& rNd )
return *this;
}
-SwNodeIndex& SwNodeIndex::Assign( SwNodes& rNds, ULONG nIdx )
+SwNodeIndex& SwNodeIndex::Assign( SwNodes& rNds, sal_uLong nIdx )
{
if( &pNd->GetNodes() != &rNds )
{
diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx
index ce35aa9dc5b3..c244e14267c4 100644
--- a/sw/source/core/docnode/ndnotxt.cxx
+++ b/sw/source/core/docnode/ndnotxt.cxx
@@ -49,14 +49,14 @@
#include <frmfmt.hxx> // #i73249#
SwNoTxtNode::SwNoTxtNode( const SwNodeIndex & rWhere,
- const BYTE nNdType,
+ const sal_uInt8 nNdType,
SwGrfFmtColl *pGrfColl,
SwAttrSet* pAutoAttr ) :
SwCntntNode( rWhere, nNdType, pGrfColl ),
pContour( 0 ),
- bAutomaticContour( FALSE ),
- bContourMapModeValid( TRUE ),
- bPixelContour( FALSE )
+ bAutomaticContour( sal_False ),
+ bContourMapModeValid( sal_True ),
+ bPixelContour( sal_False )
{
// soll eine Harte-Attributierung gesetzt werden?
if( pAutoAttr )
@@ -92,19 +92,19 @@ void SwNoTxtNode::NewAttrSet( SwAttrPool& rPool )
// bei Grafiken und OLE-Objekten
-BOOL SwNoTxtNode::RestorePersistentData()
+sal_Bool SwNoTxtNode::RestorePersistentData()
{
- return TRUE;
+ return sal_True;
}
-BOOL SwNoTxtNode::SavePersistentData()
+sal_Bool SwNoTxtNode::SavePersistentData()
{
- return TRUE;
+ return sal_True;
}
-void SwNoTxtNode::SetContour( const PolyPolygon *pPoly, BOOL bAutomatic )
+void SwNoTxtNode::SetContour( const PolyPolygon *pPoly, sal_Bool bAutomatic )
{
delete pContour;
if ( pPoly )
@@ -112,8 +112,8 @@ void SwNoTxtNode::SetContour( const PolyPolygon *pPoly, BOOL bAutomatic )
else
pContour = 0;
bAutomaticContour = bAutomatic;
- bContourMapModeValid = TRUE;
- bPixelContour = FALSE;
+ bContourMapModeValid = sal_True;
+ bPixelContour = sal_False;
}
@@ -121,9 +121,9 @@ void SwNoTxtNode::CreateContour()
{
OSL_ENSURE( !pContour, "Contour available." );
pContour = new PolyPolygon(SvxContourDlg::CreateAutoContour(GetGraphic()));
- bAutomaticContour = TRUE;
- bContourMapModeValid = TRUE;
- bPixelContour = FALSE;
+ bAutomaticContour = sal_True;
+ bContourMapModeValid = sal_True;
+ bPixelContour = sal_False;
}
const PolyPolygon *SwNoTxtNode::HasContour() const
@@ -131,7 +131,7 @@ const PolyPolygon *SwNoTxtNode::HasContour() const
if( !bContourMapModeValid )
{
const MapMode aGrfMap( GetGraphic().GetPrefMapMode() );
- BOOL bPixelGrf = aGrfMap.GetMapUnit() == MAP_PIXEL;
+ sal_Bool bPixelGrf = aGrfMap.GetMapUnit() == MAP_PIXEL;
const MapMode aContourMap( bPixelGrf ? MAP_PIXEL : MAP_100TH_MM );
if( bPixelGrf ? !bPixelContour : aGrfMap != aContourMap )
{
@@ -140,13 +140,13 @@ const PolyPolygon *SwNoTxtNode::HasContour() const
OutputDevice* pOutDev =
(bPixelGrf || bPixelContour) ? Application::GetDefaultDevice()
: 0;
- USHORT nPolyCount = pContour->Count();
- for( USHORT j=0; j<nPolyCount; j++ )
+ sal_uInt16 nPolyCount = pContour->Count();
+ for( sal_uInt16 j=0; j<nPolyCount; j++ )
{
Polygon& rPoly = (*pContour)[j];
- USHORT nCount = rPoly.GetSize();
- for( USHORT i=0 ; i<nCount; i++ )
+ sal_uInt16 nCount = rPoly.GetSize();
+ for( sal_uInt16 i=0 ; i<nCount; i++ )
{
if( bPixelGrf )
rPoly[i] = pOutDev->LogicToPixel( rPoly[i],
@@ -160,8 +160,8 @@ const PolyPolygon *SwNoTxtNode::HasContour() const
}
}
}
- ((SwNoTxtNode *)this)->bContourMapModeValid = TRUE;
- ((SwNoTxtNode *)this)->bPixelContour = FALSE;
+ ((SwNoTxtNode *)this)->bContourMapModeValid = sal_True;
+ ((SwNoTxtNode *)this)->bPixelContour = sal_False;
}
return pContour;
@@ -180,13 +180,13 @@ void SwNoTxtNode::SetContourAPI( const PolyPolygon *pPoly )
pContour = new PolyPolygon( *pPoly );
else
pContour = 0;
- bContourMapModeValid = FALSE;
+ bContourMapModeValid = sal_False;
}
-BOOL SwNoTxtNode::GetContourAPI( PolyPolygon &rContour ) const
+sal_Bool SwNoTxtNode::GetContourAPI( PolyPolygon &rContour ) const
{
if( !pContour )
- return FALSE;
+ return sal_False;
rContour = *pContour;
if( bContourMapModeValid )
@@ -199,13 +199,13 @@ BOOL SwNoTxtNode::GetContourAPI( PolyPolygon &rContour ) const
if( aGrfMap.GetMapUnit() != MAP_PIXEL &&
aGrfMap != aContourMap )
{
- USHORT nPolyCount = rContour.Count();
- for( USHORT j=0; j<nPolyCount; j++ )
+ sal_uInt16 nPolyCount = rContour.Count();
+ for( sal_uInt16 j=0; j<nPolyCount; j++ )
{
Polygon& rPoly = (*pContour)[j];
- USHORT nCount = rPoly.GetSize();
- for( USHORT i=0 ; i<nCount; i++ )
+ sal_uInt16 nCount = rPoly.GetSize();
+ for( sal_uInt16 i=0 ; i<nCount; i++ )
{
rPoly[i] = OutputDevice::LogicToLogic( rPoly[i], aGrfMap,
aContourMap );
@@ -214,12 +214,12 @@ BOOL SwNoTxtNode::GetContourAPI( PolyPolygon &rContour ) const
}
}
- return TRUE;
+ return sal_True;
}
-BOOL SwNoTxtNode::IsPixelContour() const
+sal_Bool SwNoTxtNode::IsPixelContour() const
{
- BOOL bRet;
+ sal_Bool bRet;
if( bContourMapModeValid )
{
const MapMode aGrfMap( GetGraphic().GetPrefMapMode() );
@@ -239,7 +239,7 @@ Graphic SwNoTxtNode::GetGraphic() const
Graphic aRet;
if ( GetGrfNode() )
{
- ((SwGrfNode*)this)->SwapIn( TRUE );
+ ((SwGrfNode*)this)->SwapIn( sal_True );
aRet = ((SwGrfNode*)this)->GetGrf();
}
else
diff --git a/sw/source/core/docnode/ndnum.cxx b/sw/source/core/docnode/ndnum.cxx
index a14af75b37cb..5cbce94d072c 100644
--- a/sw/source/core/docnode/ndnum.cxx
+++ b/sw/source/core/docnode/ndnum.cxx
@@ -38,11 +38,11 @@
#include <docary.hxx>
_SV_IMPL_SORTAR_ALG( SwOutlineNodes, SwNodePtr )
-BOOL SwOutlineNodes::Seek_Entry( const SwNodePtr rSrch, USHORT* pFndPos ) const
+sal_Bool SwOutlineNodes::Seek_Entry( const SwNodePtr rSrch, sal_uInt16* pFndPos ) const
{
- ULONG nIdx = rSrch->GetIndex();
+ sal_uLong nIdx = rSrch->GetIndex();
- USHORT nO = Count(), nM, nU = 0;
+ sal_uInt16 nO = Count(), nM, nU = 0;
if( nO > 0 )
{
//JP 17.03.98: aufgrund des Bug 48592 - wo unter anderem nach Undo/Redo
@@ -50,7 +50,7 @@ BOOL SwOutlineNodes::Seek_Entry( const SwNodePtr rSrch, USHORT* pFndPos ) const
// jetzt mal einen Check eingebaut.
#if OSL_DEBUG_LEVEL > 1
{
- for( USHORT n = 1; n < nO; ++n )
+ for( sal_uInt16 n = 1; n < nO; ++n )
if( &(*this)[ n-1 ]->GetNodes() !=
&(*this)[ n ]->GetNodes() )
{
@@ -67,7 +67,7 @@ BOOL SwOutlineNodes::Seek_Entry( const SwNodePtr rSrch, USHORT* pFndPos ) const
{
if( pFndPos )
*pFndPos = nM;
- return TRUE;
+ return sal_True;
}
else if( (*this)[ nM ]->GetIndex() < nIdx )
nU = nM + 1;
@@ -75,7 +75,7 @@ BOOL SwOutlineNodes::Seek_Entry( const SwNodePtr rSrch, USHORT* pFndPos ) const
{
if( pFndPos )
*pFndPos = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
@@ -83,7 +83,7 @@ BOOL SwOutlineNodes::Seek_Entry( const SwNodePtr rSrch, USHORT* pFndPos ) const
}
if( pFndPos )
*pFndPos = nU;
- return FALSE;
+ return sal_False;
}
void SwNodes::UpdateOutlineNode(SwNode & rNd)
@@ -92,7 +92,7 @@ void SwNodes::UpdateOutlineNode(SwNode & rNd)
if (pTxtNd && pTxtNd->IsOutlineStateChanged())
{
- BOOL bFound = pOutlineNds->Seek_Entry(pTxtNd);
+ sal_Bool bFound = pOutlineNds->Seek_Entry(pTxtNd);
if (pTxtNd->IsOutline())
{
@@ -128,7 +128,7 @@ void SwNodes::UpdtOutlineIdx( const SwNode& rNd )
return;
const SwNodePtr pSrch = (SwNodePtr)&rNd;
- USHORT nPos;
+ sal_uInt16 nPos;
pOutlineNds->Seek_Entry( pSrch, &nPos );
if( nPos == pOutlineNds->Count() ) // keine zum Updaten vorhanden ?
return;
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index 8383a9f596cb..8adee6831112 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -39,11 +39,13 @@
#include <txtftn.hxx>
#include <fmtclds.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <rootfrm.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
#include <section.hxx>
-#include <undobj.hxx>
+#include <UndoSection.hxx>
+#include <UndoDelete.hxx>
#include <swundo.hxx>
#include <calc.hxx>
#include <swtable.hxx>
@@ -90,8 +92,8 @@ bool lcl_IsInSameTblBox( SwNodes& _rNds,
do
{
if ( _bPrev
- ? !_rNds.GoPrevSection( &aChkIdx, FALSE, FALSE )
- : !_rNds.GoNextSection( &aChkIdx, FALSE, FALSE ) )
+ ? !_rNds.GoPrevSection( &aChkIdx, sal_False, sal_False )
+ : !_rNds.GoNextSection( &aChkIdx, sal_False, sal_False ) )
{
OSL_FAIL( "<lcl_IsInSameTblBox(..)> - no previous/next!" );
return false;
@@ -121,8 +123,8 @@ bool lcl_IsInSameTblBox( SwNodes& _rNds,
// dann suche den StartNode der Box
const SwTableSortBoxes& rSortBoxes = pTblNd->GetTable().GetTabSortBoxes();
- ULONG nIdx = _rNd.GetIndex();
- for( USHORT n = 0; n < rSortBoxes.Count(); ++n )
+ sal_uLong nIdx = _rNd.GetIndex();
+ for( sal_uInt16 n = 0; n < rSortBoxes.Count(); ++n )
{
const SwStartNode* pNd = rSortBoxes[ n ]->GetSttNd();
if ( pNd->GetIndex() < nIdx && nIdx < pNd->EndOfSectionIndex() )
@@ -140,14 +142,14 @@ void lcl_CheckEmptyLayFrm( SwNodes& rNds, SwSectionData& rSectionData,
const SwNode& rStt, const SwNode& rEnd )
{
SwNodeIndex aIdx( rStt );
- if( !rNds.GoPrevSection( &aIdx, TRUE, FALSE ) ||
- !CheckNodesRange( rStt, aIdx, TRUE ) ||
+ if( !rNds.GoPrevSection( &aIdx, sal_True, sal_False ) ||
+ !CheckNodesRange( rStt, aIdx, sal_True ) ||
// #i21457#
!lcl_IsInSameTblBox( rNds, rStt, true ))
{
aIdx = rEnd;
- if( !rNds.GoNextSection( &aIdx, TRUE, FALSE ) ||
- !CheckNodesRange( rEnd, aIdx, TRUE ) ||
+ if( !rNds.GoNextSection( &aIdx, sal_True, sal_False ) ||
+ !CheckNodesRange( rEnd, aIdx, sal_True ) ||
// #i21457#
!lcl_IsInSameTblBox( rNds, rEnd, false ))
{
@@ -162,7 +164,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
SfxItemSet const*const pAttr, bool const bUpdate)
{
const SwNode* pPrvNd = 0;
- USHORT nRegionRet = 0;
+ sal_uInt16 nRegionRet = 0;
if( rRange.HasMark() &&
0 == ( nRegionRet = IsInsRegionAvailable( rRange, &pPrvNd ) ))
{
@@ -187,12 +189,12 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
}
SwUndoInsSection* pUndoInsSect = 0;
- if( DoesUndo() )
+ bool const bUndo(GetIDocumentUndoRedo().DoesUndo());
+ if (bUndo)
{
- ClearRedo();
pUndoInsSect = new SwUndoInsSection(rRange, rNewData, pAttr, pTOXBase);
- AppendUndo( pUndoInsSect );
- DoUndo( FALSE );
+ GetIDocumentUndoRedo().AppendUndo( pUndoInsSect );
+ GetIDocumentUndoRedo().DoUndo(false);
}
SwSectionFmt* const pFmt = MakeSectionFmt( 0 );
@@ -234,7 +236,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
pSttPos->nNode.GetNode().GetTxtNode();
if (pTNd)
{
- pUndoInsSect->SaveSplitNode( pTNd, TRUE );
+ pUndoInsSect->SaveSplitNode( pTNd, sal_True );
}
}
@@ -245,7 +247,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
if (pTNd &&
(pTNd->GetTxt().Len() != pEndPos->nContent.GetIndex()))
{
- pUndoInsSect->SaveSplitNode( pTNd, FALSE );
+ pUndoInsSect->SaveSplitNode( pTNd, sal_False );
}
}
}
@@ -314,7 +316,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
{
if( pUndoInsSect && pCNd->IsTxtNode() )
{
- pUndoInsSect->SaveSplitNode( (SwTxtNode*)pCNd, TRUE );
+ pUndoInsSect->SaveSplitNode( (SwTxtNode*)pCNd, sal_True );
}
SplitNode( *pPos, false );
pNewSectNode = GetNodes().InsertTextSection(
@@ -354,10 +356,10 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
rNewSect.SetCondHidden( aCalc.Calculate( rNewSect.GetCondition() ).GetBool() );
}
- BOOL bUpdateFtn = FALSE;
+ sal_Bool bUpdateFtn = sal_False;
if( GetFtnIdxs().Count() && pAttr )
{
- USHORT nVal = ((SwFmtFtnAtTxtEnd&)pAttr->Get(
+ sal_uInt16 nVal = ((SwFmtFtnAtTxtEnd&)pAttr->Get(
RES_FTN_AT_TXTEND )).GetValue();
if( ( FTNEND_ATTXTEND_OWNNUMSEQ == nVal ||
FTNEND_ATTXTEND_OWNNUMANDFMT == nVal ) ||
@@ -365,7 +367,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
pAttr->Get( RES_END_AT_TXTEND )).GetValue() ) ||
FTNEND_ATTXTEND_OWNNUMANDFMT == nVal ))
{
- bUpdateFtn = TRUE;
+ bUpdateFtn = sal_True;
}
}
@@ -373,7 +375,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
{
pUndoInsSect->SetSectNdPos( pNewSectNode->GetIndex() );
pUndoInsSect->SetUpdtFtnFlag( bUpdateFtn );
- DoUndo( TRUE );
+ GetIDocumentUndoRedo().DoUndo(bUndo);
}
if (rNewData.IsLinkType())
@@ -390,10 +392,10 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
return &pNewSectNode->GetSection();
}
-USHORT SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
+sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
const SwNode** ppSttNd ) const
{
- USHORT nRet = 1;
+ sal_uInt16 nRet = 1;
if( rRange.HasMark() )
{
// teste ob es sich um eine gueltige Selektion handelt
@@ -415,7 +417,7 @@ USHORT SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
pCNd->Len() )
{
SwNodeIndex aIdx( pStt->nNode, -1 );
- ULONG nCmp = pEnd->nNode.GetIndex();
+ sal_uLong nCmp = pEnd->nNode.GetIndex();
const SwStartNode* pPrvNd;
const SwEndNode* pNxtNd;
while( 0 != ( pPrvNd = (pNd = &aIdx.GetNode())->GetSectionNode() ) &&
@@ -521,42 +523,40 @@ SwSectionFmt* SwDoc::MakeSectionFmt( SwSectionFmt *pDerivedFrom )
return pNew;
}
-void SwDoc::DelSectionFmt( SwSectionFmt *pFmt, BOOL bDelNodes )
+void SwDoc::DelSectionFmt( SwSectionFmt *pFmt, sal_Bool bDelNodes )
{
- USHORT nPos = pSectionFmtTbl->GetPos( pFmt );
+ sal_uInt16 nPos = pSectionFmtTbl->GetPos( pFmt );
- StartUndo(UNDO_DELSECTION, NULL);
+ GetIDocumentUndoRedo().StartUndo(UNDO_DELSECTION, NULL);
if( USHRT_MAX != nPos )
{
- const SwNodeIndex* pIdx = pFmt->GetCntnt( FALSE ).GetCntntIdx();
+ const SwNodeIndex* pIdx = pFmt->GetCntnt( sal_False ).GetCntntIdx();
const SfxPoolItem* pFtnEndAtTxtEnd;
if( SFX_ITEM_SET != pFmt->GetItemState(
- RES_FTN_AT_TXTEND, TRUE, &pFtnEndAtTxtEnd ) ||
+ RES_FTN_AT_TXTEND, sal_True, &pFtnEndAtTxtEnd ) ||
SFX_ITEM_SET != pFmt->GetItemState(
- RES_END_AT_TXTEND, TRUE, &pFtnEndAtTxtEnd ))
+ RES_END_AT_TXTEND, sal_True, &pFtnEndAtTxtEnd ))
pFtnEndAtTxtEnd = 0;
const SwSectionNode* pSectNd;
- if( DoesUndo() )
+ if( GetIDocumentUndoRedo().DoesUndo() )
{
- ClearRedo();
if( bDelNodes && pIdx && &GetNodes() == &pIdx->GetNodes() &&
0 != (pSectNd = pIdx->GetNode().GetSectionNode() ))
{
SwNodeIndex aUpdIdx( *pIdx );
- ClearRedo();
SwPaM aPaM( *pSectNd->EndOfSectionNode(), *pSectNd );
- AppendUndo( new SwUndoDelete( aPaM ));
+ GetIDocumentUndoRedo().AppendUndo( new SwUndoDelete( aPaM ));
if( pFtnEndAtTxtEnd )
GetFtnIdxs().UpdateFtn( aUpdIdx );
SetModified();
//#126178# start/end undo have to be pairs!
- EndUndo(UNDO_DELSECTION, NULL);
+ GetIDocumentUndoRedo().EndUndo(UNDO_DELSECTION, NULL);
return ;
}
- AppendUndo( MakeUndoDelSection( *pFmt ) );
+ GetIDocumentUndoRedo().AppendUndo( MakeUndoDelSection( *pFmt ) );
}
else if( bDelNodes && pIdx && &GetNodes() == &pIdx->GetNodes() &&
0 != (pSectNd = pIdx->GetNode().GetSectionNode() ))
@@ -567,7 +567,7 @@ void SwDoc::DelSectionFmt( SwSectionFmt *pFmt, BOOL bDelNodes )
GetFtnIdxs().UpdateFtn( aUpdIdx );
SetModified();
//#126178# start/end undo have to be pairs!
- EndUndo(UNDO_DELSECTION, NULL);
+ GetIDocumentUndoRedo().EndUndo(UNDO_DELSECTION, NULL);
return ;
}
@@ -585,7 +585,7 @@ void SwDoc::DelSectionFmt( SwSectionFmt *pFmt, BOOL bDelNodes )
// zu loeschen!
pSectionFmtTbl->Remove( nPos );
//FEATURE::CONDCOLL
- ULONG nCnt = 0, nSttNd = 0;
+ sal_uLong nCnt = 0, nSttNd = 0;
if( pIdx && &GetNodes() == &pIdx->GetNodes() &&
0 != (pSectNd = pIdx->GetNode().GetSectionNode() ))
{
@@ -611,7 +611,7 @@ void SwDoc::DelSectionFmt( SwSectionFmt *pFmt, BOOL bDelNodes )
//FEATURE::CONDCOLL
}
- EndUndo(UNDO_DELSECTION, NULL);
+ GetIDocumentUndoRedo().EndUndo(UNDO_DELSECTION, NULL);
SetModified();
}
@@ -628,16 +628,16 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
if (pSection->DataEquals(rNewData))
{
// die Attribute ueberpruefen
- BOOL bOnlyAttrChg = FALSE;
+ sal_Bool bOnlyAttrChg = sal_False;
if( pAttr && pAttr->Count() )
{
SfxItemIter aIter( *pAttr );
- USHORT nWhich = aIter.GetCurItem()->Which();
- while( TRUE )
+ sal_uInt16 nWhich = aIter.GetCurItem()->Which();
+ while( sal_True )
{
if( pFmt->GetFmtAttr( nWhich ) != *aIter.GetCurItem() )
{
- bOnlyAttrChg = TRUE;
+ bOnlyAttrChg = sal_True;
break;
}
@@ -649,23 +649,17 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
if( bOnlyAttrChg )
{
- const BOOL bDoesUndo = DoesUndo();
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( MakeUndoUpdateSection( *pFmt, true ) );
- // --> FME 2004-10-13 #i32968#
- // Inserting columns in the section causes MakeFrmFmt to put two
- // objects of type SwUndoFrmFmt on the undo stack. We don't want them.
- DoUndo( FALSE );
- // <--
+ GetIDocumentUndoRedo().AppendUndo(
+ MakeUndoUpdateSection( *pFmt, true ) );
}
+ // #i32968# Inserting columns in the section causes MakeFrmFmt
+ // to put two objects of type SwUndoFrmFmt on the undo stack.
+ // We don't want them.
+ ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
pFmt->SetFmtAttr( *pAttr );
SetModified();
-
- // --> FME 2004-10-13 #i32968#
- DoUndo( bDoesUndo );
- // <--
}
return;
}
@@ -690,17 +684,13 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
}
}
- const BOOL bDoesUndo = DoesUndo();
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( MakeUndoUpdateSection( *pFmt, false ) );
- // --> FME 2004-10-13 #i32968#
- // Inserting columns in the section causes MakeFrmFmt to put two
- // objects of type SwUndoFrmFmt on the undo stack. We don't want them.
- DoUndo( FALSE );
- // <--
+ GetIDocumentUndoRedo().AppendUndo(MakeUndoUpdateSection(*pFmt, false));
}
+ // #i32968# Inserting columns in the section causes MakeFrmFmt to put two
+ // objects of type SwUndoFrmFmt on the undo stack. We don't want them.
+ ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
// Der LinkFileName koennte auch nur aus Separatoren bestehen
String sCompareString = sfx2::cTokenSeperator;
@@ -717,9 +707,9 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
else
sSectName.Erase();
- /// In SwSection::operator=(..) class member bCondHiddenFlag is always set to TRUE.
+ /// In SwSection::operator=(..) class member bCondHiddenFlag is always set to sal_True.
/// IMHO this have to be changed, but I can't estimate the consequences:
- /// Either it is set to TRUE using corresponding method <SwSection.SetCondHidden(..)>,
+ /// Either it is set to sal_True using corresponding method <SwSection.SetCondHidden(..)>,
/// or it is set to the value of SwSection which is assigned to it.
/// Discussion with AMA results that the adjustment to the assignment operator
/// could be very risky.
@@ -744,9 +734,9 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
/// Because on using SwSection::operator=() to set up <pSection>
/// with <rNewData> and the above given note, the hidden condition flag
- /// has to be set to FALSE, if hidden condition flag of <pFmt->GetSection()>
- /// (SwSection before the changes) is FALSE (already saved in <bOldCondHidden>)
- /// and new calculated condition is TRUE.
+ /// has to be set to sal_False, if hidden condition flag of <pFmt->GetSection()>
+ /// (SwSection before the changes) is sal_False (already saved in <bOldCondHidden>)
+ /// and new calculated condition is sal_True.
/// This is necessary, because otherwise the <SetCondHidden> would have
/// no effect.
bool bCalculatedCondHidden =
@@ -767,10 +757,6 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
}
SetModified();
-
- // --> FME 2004-10-13 #i32968#
- DoUndo( bDoesUndo );
- // <--
}
/* --------------------------------------------------
@@ -783,12 +769,12 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
* --------------------------------------------------*/
// und dann waren da noch die Fussnoten:
-void lcl_DeleteFtn( SwSectionNode *pNd, ULONG nStt, ULONG nEnd )
+void lcl_DeleteFtn( SwSectionNode *pNd, sal_uLong nStt, sal_uLong nEnd )
{
SwFtnIdxs& rFtnArr = pNd->GetDoc()->GetFtnIdxs();
if( rFtnArr.Count() )
{
- USHORT nPos;
+ sal_uInt16 nPos;
rFtnArr.SeekEntry( SwNodeIndex( *pNd ), &nPos );
SwTxtFtn* pSrch;
@@ -876,7 +862,7 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx,
// aInsPos is at the moment the Position where my EndNode will be inserted
const SwStartNode* pStartNode = aInsPos.GetNode().StartOfSectionNode();
// This StartNode should be in front of me, but if not, I wanna survive
- ULONG nMyIndex = pSectNd->GetIndex();
+ sal_uLong nMyIndex = pSectNd->GetIndex();
if( pStartNode->GetIndex() > nMyIndex ) // Suspicious!
{
const SwNode* pTemp;
@@ -933,7 +919,7 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx,
// Hier bietet sich als Optimierung an, vorhandene Frames nicht zu
// zerstoeren und wieder neu anzulegen, sondern nur umzuhaengen.
- BOOL bInsFrm = bCreateFrms && !pSectNd->GetSection().IsHidden() &&
+ sal_Bool bInsFrm = bCreateFrms && !pSectNd->GetSection().IsHidden() &&
GetDoc()->GetRootFrm();
SwNode2Layout *pNode2Layout = NULL;
if( bInsFrm )
@@ -945,10 +931,10 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx,
}
// jetzt noch bei allen im Bereich den richtigen StartNode setzen
- ULONG nEnde = pSectNd->EndOfSectionIndex();
- ULONG nStart = pSectNd->GetIndex()+1;
- ULONG nSkipIdx = ULONG_MAX;
- for( ULONG n = nStart; n < nEnde; ++n )
+ sal_uLong nEnde = pSectNd->EndOfSectionIndex();
+ sal_uLong nStart = pSectNd->GetIndex()+1;
+ sal_uLong nSkipIdx = ULONG_MAX;
+ for( sal_uLong n = nStart; n < nEnde; ++n )
{
SwNode* pNd = (*this)[n];
@@ -988,7 +974,7 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex const& rNdIdx,
{
if( pNode2Layout )
{
- ULONG nIdx = pSectNd->GetIndex();
+ sal_uLong nIdx = pSectNd->GetIndex();
pNode2Layout->RestoreUpperFrms( pSectNd->GetNodes(), nIdx, nIdx + 1 );
delete pNode2Layout;
}
@@ -1087,14 +1073,13 @@ SwSectionNode::~SwSectionNode()
if ( pLast->IsA( TYPE(SwFrm) ) )
{
SwSectionFrm *pSectFrm = (SwSectionFrm*)pLast;
- SwSectionFrm::MoveCntntAndDelete( pSectFrm, TRUE );
+ SwSectionFrm::MoveCntntAndDelete( pSectFrm, sal_True );
pLast = aIter.GoStart();
}
else
pLast = aIter++;
}
}
- SwDoc* pDoc = GetDoc();
SwSectionFmt* pFmt = m_pSection->GetFmt();
if( pFmt )
@@ -1105,12 +1090,6 @@ SwSectionNode::~SwSectionNode()
pFmt->ResetFmtAttr( RES_CNTNT );
pFmt->UnlockModify();
}
-
- BOOL bUndo = pDoc->DoesUndo();
- // verhinder beim Loeschen aus der Undo/Redo-History einen rekursiven Aufruf
- if( bUndo && &pDoc->GetNodes() != &GetNodes() )
- pDoc->DoUndo( FALSE );
- pDoc->DoUndo( bUndo );
}
@@ -1132,14 +1111,14 @@ void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx )
if( GetSection().IsHidden() || IsCntntHidden() )
{
SwNodeIndex aIdx( *EndOfSectionNode() );
- SwCntntNode* pCNd = rNds.GoNextSection( &aIdx, TRUE, FALSE );
+ SwCntntNode* pCNd = rNds.GoNextSection( &aIdx, sal_True, sal_False );
if( !pCNd )
{
aIdx = *this;
- if( 0 == ( pCNd = rNds.GoPrevSection( &aIdx, TRUE, FALSE )) )
+ if( 0 == ( pCNd = rNds.GoPrevSection( &aIdx, sal_True, sal_False )) )
return ;
}
- pCNd = rNds[ aIdx ]->GetCntntNode();
+ pCNd = aIdx.GetNode().GetCntntNode();
pCNd->MakeFrms( (SwCntntNode&)rIdx.GetNode() );
}
else
@@ -1258,7 +1237,7 @@ void SwSectionNode::MakeFrms( SwNodeIndex* pIdxBehind, SwNodeIndex* pEndIdx )
void SwSectionNode::DelFrms()
{
- ULONG nStt = GetIndex()+1, nEnd = EndOfSectionIndex();
+ sal_uLong nStt = GetIndex()+1, nEnd = EndOfSectionIndex();
if( nStt >= nEnd )
{
return ;
@@ -1276,14 +1255,14 @@ void SwSectionNode::DelFrms()
// Fly/TblBox-Frame keinen Lower !!!
{
SwNodeIndex aIdx( *this );
- if( !rNds.GoPrevSection( &aIdx, TRUE, FALSE ) ||
- !CheckNodesRange( *this, aIdx, TRUE ) ||
+ if( !rNds.GoPrevSection( &aIdx, sal_True, sal_False ) ||
+ !CheckNodesRange( *this, aIdx, sal_True ) ||
// #i21457#
!lcl_IsInSameTblBox( rNds, *this, true ))
{
aIdx = *EndOfSectionNode();
- if( !rNds.GoNextSection( &aIdx, TRUE, FALSE ) ||
- !CheckNodesRange( *EndOfSectionNode(), aIdx, TRUE ) ||
+ if( !rNds.GoNextSection( &aIdx, sal_True, sal_False ) ||
+ !CheckNodesRange( *EndOfSectionNode(), aIdx, sal_True ) ||
// #i21457#
!lcl_IsInSameTblBox( rNds, *EndOfSectionNode(), false ))
{
@@ -1338,15 +1317,15 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c
pNewSect->SetCondition( GetSection().GetCondition() );
pNewSect->SetLinkFileName( GetSection().GetLinkFileName() );
if( !pNewSect->IsHiddenFlag() && GetSection().IsHidden() )
- pNewSect->SetHidden( TRUE );
+ pNewSect->SetHidden( sal_True );
if( !pNewSect->IsProtectFlag() && GetSection().IsProtect() )
- pNewSect->SetProtect( TRUE );
+ pNewSect->SetProtect( sal_True );
// edit in readonly sections
if( !pNewSect->IsEditInReadonlyFlag() && GetSection().IsEditInReadonly() )
- pNewSect->SetEditInReadonly( TRUE );
+ pNewSect->SetEditInReadonly( sal_True );
SwNodeRange aRg( *this, +1, *EndOfSectionNode() ); // (wo stehe in denn nun ??)
- rNds._Copy( aRg, aInsPos, FALSE );
+ rNds._Copy( aRg, aInsPos, sal_False );
// loesche alle Frames vom kopierten Bereich, diese werden beim
// erzeugen des SectionFrames angelegt !
@@ -1358,7 +1337,8 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c
: CREATE_NONE );
// falls als Server aus dem Undo kopiert wird, wieder eintragen
- if (m_pSection->IsServer() && (pDoc->GetUndoNds() == &rNds))
+ if (m_pSection->IsServer()
+ && pDoc->GetIDocumentUndoRedo().IsUndoNodes(rNds))
{
pNewSect->SetRefObject( m_pSection->GetObject() );
pDoc->GetLinkManager().InsertServer( pNewSect->GetObject() );
@@ -1370,12 +1350,12 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c
return pSectNd;
}
-BOOL SwSectionNode::IsCntntHidden() const
+sal_Bool SwSectionNode::IsCntntHidden() const
{
OSL_ENSURE( !m_pSection->IsHidden(),
"That's simple: Hidden Section => Hidden Content" );
SwNodeIndex aTmp( *this, 1 );
- ULONG nEnd = EndOfSectionIndex();
+ sal_uLong nEnd = EndOfSectionIndex();
while( aTmp < nEnd )
{
if( aTmp.GetNode().IsSectionNode() )
@@ -1388,12 +1368,12 @@ BOOL SwSectionNode::IsCntntHidden() const
else
{
if( aTmp.GetNode().IsCntntNode() || aTmp.GetNode().IsTableNode() )
- return FALSE; // Nicht versteckter Inhalt wurde gefunden
+ return sal_False; // Nicht versteckter Inhalt wurde gefunden
OSL_ENSURE( aTmp.GetNode().IsEndNode(), "EndNode expected" );
}
aTmp++;
}
- return TRUE; // Alles versteckt
+ return sal_True; // Alles versteckt
}
@@ -1421,8 +1401,8 @@ void SwSectionNode::NodesArrChgd()
: pDoc->GetDfltFrmFmt() );
// jetzt noch bei allen im Bereich den richtigen StartNode setzen
- ULONG nStart = GetIndex()+1, nEnde = EndOfSectionIndex();
- for( ULONG n = nStart; n < nEnde; ++n )
+ sal_uLong nStart = GetIndex()+1, nEnde = EndOfSectionIndex();
+ for( sal_uLong n = nStart; n < nEnde; ++n )
// die Verschachtelung der Formate herstellen!
if( 0 != ( pSectNd = rNds[ n ]->GetSectionNode() ) )
{
@@ -1468,22 +1448,22 @@ String SwDoc::GetUniqueSectionName( const String* pChkStr ) const
String aName( aId );
xub_StrLen nNmLen = aName.Len();
- USHORT nNum = 0;
- USHORT nTmp, nFlagSize = ( pSectionFmtTbl->Count() / 8 ) +2;
- BYTE* pSetFlags = new BYTE[ nFlagSize ];
+ sal_uInt16 nNum = 0;
+ sal_uInt16 nTmp, nFlagSize = ( pSectionFmtTbl->Count() / 8 ) +2;
+ sal_uInt8* pSetFlags = new sal_uInt8[ nFlagSize ];
memset( pSetFlags, 0, nFlagSize );
const SwSectionNode* pSectNd;
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < pSectionFmtTbl->Count(); ++n )
- if( 0 != ( pSectNd = (*pSectionFmtTbl)[ n ]->GetSectionNode( FALSE ) ))
+ if( 0 != ( pSectNd = (*pSectionFmtTbl)[ n ]->GetSectionNode( sal_False ) ))
{
const String& rNm = pSectNd->GetSection().GetSectionName();
if( rNm.Match( aName ) == nNmLen )
{
// Nummer bestimmen und das Flag setzen
- nNum = static_cast<USHORT>(rNm.Copy( nNmLen ).ToInt32());
+ nNum = static_cast<sal_uInt16>(rNm.Copy( nNmLen ).ToInt32());
if( nNum-- && nNum < pSectionFmtTbl->Count() )
pSetFlags[ nNum / 8 ] |= (0x01 << ( nNum & 0x07 ));
}
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index d583912735a7..04da8a2dd6cb 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -52,6 +52,8 @@
#include <pagefrm.hxx>
#include <tabcol.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
+#include <UndoManager.hxx>
#include <cntfrm.hxx>
#include <pam.hxx>
#include <swcrsr.hxx>
@@ -62,7 +64,12 @@
#include <fldbas.hxx>
#include <poolfmt.hxx>
#include <tabfrm.hxx>
-#include <undobj.hxx>
+#include <UndoCore.hxx>
+#include <UndoRedline.hxx>
+#include <UndoDelete.hxx>
+#include <UndoNumbering.hxx>
+#include <UndoTable.hxx>
+#include <hints.hxx>
#include <tblafmt.hxx>
#include <swcache.hxx>
#include <ddefld.hxx>
@@ -106,20 +113,20 @@ const sal_Unicode T2T_PARA = 0x0a;
extern void ClearFEShellTabCols();
// steht im gctable.cxx
-extern BOOL lcl_GC_Line_Border( const SwTableLine*& , void* pPara );
+extern sal_Bool lcl_GC_Line_Border( const SwTableLine*& , void* pPara );
-void lcl_SetDfltBoxAttr( SwFrmFmt& rFmt, BYTE nId )
+void lcl_SetDfltBoxAttr( SwFrmFmt& rFmt, sal_uInt8 nId )
{
- BOOL bTop = FALSE, bBottom = FALSE, bLeft = FALSE, bRight = FALSE;
+ sal_Bool bTop = sal_False, bBottom = sal_False, bLeft = sal_False, bRight = sal_False;
switch ( nId )
{
- case 0: bTop = bBottom = bLeft = TRUE; break;
- case 1: bTop = bBottom = bLeft = bRight = TRUE; break;
- case 2: bBottom = bLeft = TRUE; break;
- case 3: bBottom = bLeft = bRight = TRUE; break;
+ case 0: bTop = bBottom = bLeft = sal_True; break;
+ case 1: bTop = bBottom = bLeft = bRight = sal_True; break;
+ case 2: bBottom = bLeft = sal_True; break;
+ case 3: bBottom = bLeft = bRight = sal_True; break;
}
- const BOOL bHTML = rFmt.getIDocumentSettingAccess()->get(IDocumentSettingAccess::HTML_MODE);
+ const sal_Bool bHTML = rFmt.getIDocumentSettingAccess()->get(IDocumentSettingAccess::HTML_MODE);
Color aCol( bHTML ? COL_GRAY : COL_BLACK );
SvxBorderLine aLine( &aCol, DEF_LINE_WIDTH_0 );
if ( bHTML )
@@ -140,7 +147,7 @@ void lcl_SetDfltBoxAttr( SwFrmFmt& rFmt, BYTE nId )
rFmt.SetFmtAttr( aBox );
}
-void lcl_SetDfltBoxAttr( SwTableBox& rBox, SvPtrarr &rBoxFmtArr, BYTE nId,
+void lcl_SetDfltBoxAttr( SwTableBox& rBox, SvPtrarr &rBoxFmtArr, sal_uInt8 nId,
const SwTableAutoFmt* pAutoFmt = 0 )
{
SvPtrarr* pArr = (SvPtrarr*)rBoxFmtArr[ nId ];
@@ -152,7 +159,7 @@ void lcl_SetDfltBoxAttr( SwTableBox& rBox, SvPtrarr &rBoxFmtArr, BYTE nId,
SwTableBoxFmt* pNewBoxFmt = 0;
SwFrmFmt* pBoxFmt = rBox.GetFrmFmt();
- for( USHORT n = 0; n < pArr->Count(); n += 2 )
+ for( sal_uInt16 n = 0; n < pArr->Count(); n += 2 )
if( pArr->GetObject( n ) == pBoxFmt )
{
pNewBoxFmt = (SwTableBoxFmt*)pArr->GetObject( n + 1 );
@@ -169,7 +176,7 @@ void lcl_SetDfltBoxAttr( SwTableBox& rBox, SvPtrarr &rBoxFmtArr, BYTE nId,
if( pAutoFmt )
pAutoFmt->UpdateToSet( nId, (SfxItemSet&)pNewBoxFmt->GetAttrSet(),
SwTableAutoFmt::UPDATE_BOX,
- pDoc->GetNumberFormatter( TRUE ) );
+ pDoc->GetNumberFormatter( sal_True ) );
else
::lcl_SetDfltBoxAttr( *pNewBoxFmt, nId );
@@ -182,7 +189,7 @@ void lcl_SetDfltBoxAttr( SwTableBox& rBox, SvPtrarr &rBoxFmtArr, BYTE nId,
}
SwTableBoxFmt *lcl_CreateDfltBoxFmt( SwDoc &rDoc, SvPtrarr &rBoxFmtArr,
- USHORT nCols, BYTE nId )
+ sal_uInt16 nCols, sal_uInt8 nId )
{
if ( !rBoxFmtArr[nId] )
{
@@ -198,14 +205,14 @@ SwTableBoxFmt *lcl_CreateDfltBoxFmt( SwDoc &rDoc, SvPtrarr &rBoxFmtArr,
SwTableBoxFmt *lcl_CreateAFmtBoxFmt( SwDoc &rDoc, SvPtrarr &rBoxFmtArr,
const SwTableAutoFmt& rAutoFmt,
- USHORT nCols, BYTE nId )
+ sal_uInt16 nCols, sal_uInt8 nId )
{
if( !rBoxFmtArr[nId] )
{
SwTableBoxFmt* pBoxFmt = rDoc.MakeTableBoxFmt();
rAutoFmt.UpdateToSet( nId, (SfxItemSet&)pBoxFmt->GetAttrSet(),
SwTableAutoFmt::UPDATE_BOX,
- rDoc.GetNumberFormatter( TRUE ) );
+ rDoc.GetNumberFormatter( sal_True ) );
if( USHRT_MAX != nCols )
pBoxFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE,
USHRT_MAX / nCols, 0 ));
@@ -217,7 +224,7 @@ SwTableBoxFmt *lcl_CreateAFmtBoxFmt( SwDoc &rDoc, SvPtrarr &rBoxFmtArr,
SwTableNode* SwDoc::IsIdxInTbl(const SwNodeIndex& rIdx)
{
SwTableNode* pTableNd = 0;
- ULONG nIndex = rIdx.GetIndex();
+ sal_uLong nIndex = rIdx.GetIndex();
do {
SwNode* pNd = (SwNode*)GetNodes()[ nIndex ]->StartOfSectionNode();
if( 0 != ( pTableNd = pNd->GetTableNode() ) )
@@ -233,20 +240,20 @@ SwTableNode* SwDoc::IsIdxInTbl(const SwNodeIndex& rIdx)
// fuege in der Line, vor der InsPos eine neue Box ein.
-BOOL SwNodes::InsBoxen( SwTableNode* pTblNd,
+sal_Bool SwNodes::InsBoxen( SwTableNode* pTblNd,
SwTableLine* pLine,
SwTableBoxFmt* pBoxFmt,
SwTxtFmtColl* pTxtColl,
const SfxItemSet* pAutoAttr,
- USHORT nInsPos,
- USHORT nCnt )
+ sal_uInt16 nInsPos,
+ sal_uInt16 nCnt )
{
if( !nCnt )
- return FALSE;
+ return sal_False;
OSL_ENSURE( pLine, "keine gueltige Zeile" );
// Index hinter die letzte Box der Line
- ULONG nIdxPos = 0;
+ sal_uLong nIdxPos = 0;
SwTableBox *pPrvBox = 0, *pNxtBox = 0;
if( pLine->GetTabBoxes().Count() )
{
@@ -268,7 +275,7 @@ BOOL SwNodes::InsBoxen( SwTableNode* pTblNd,
if( !pPrvBox && !pNxtBox )
{
- BOOL bSetIdxPos = TRUE;
+ sal_Bool bSetIdxPos = sal_True;
if( pTblNd->GetTable().GetTabLines().Count() && !nInsPos )
{
const SwTableLine* pTblLn = pLine;
@@ -281,7 +288,7 @@ BOOL SwNodes::InsBoxen( SwTableNode* pTblNd,
while( ( pNxtBox = pLine->GetTabBoxes()[0])->GetTabLines().Count() )
pLine = pNxtBox->GetTabLines()[0];
nIdxPos = pNxtBox->GetSttIdx();
- bSetIdxPos = FALSE;
+ bSetIdxPos = sal_False;
}
}
if( bSetIdxPos )
@@ -294,7 +301,7 @@ BOOL SwNodes::InsBoxen( SwTableNode* pTblNd,
nIdxPos = pPrvBox->GetSttNd()->EndOfSectionIndex() + 1;
SwNodeIndex aEndIdx( *this, nIdxPos );
- for( USHORT n = 0; n < nCnt; ++n )
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
SwStartNode* pSttNd = new SwStartNode( aEndIdx, ND_STARTNODE,
SwTableBoxStartNode );
@@ -304,7 +311,7 @@ BOOL SwNodes::InsBoxen( SwTableNode* pTblNd,
pPrvBox = new SwTableBox( pBoxFmt, *pSttNd, pLine );
SwTableBoxes & rTabBoxes = pLine->GetTabBoxes();
- USHORT nRealInsPos = nInsPos + n;
+ sal_uInt16 nRealInsPos = nInsPos + n;
if (nRealInsPos > rTabBoxes.Count())
nRealInsPos = rTabBoxes.Count();
@@ -327,18 +334,18 @@ BOOL SwNodes::InsBoxen( SwTableNode* pTblNd,
pTNd->ChgFmtColl( pTxtColl );
}
}
- return TRUE;
+ return sal_True;
}
// --------------- einfuegen einer neuen Tabelle --------------
const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
- const SwPosition& rPos, USHORT nRows,
- USHORT nCols, sal_Int16 eAdjust,
+ const SwPosition& rPos, sal_uInt16 nRows,
+ sal_uInt16 nCols, sal_Int16 eAdjust,
const SwTableAutoFmt* pTAFmt,
const SvUShorts* pColArr,
- BOOL bCalledFromShell,
- BOOL bNewModel )
+ sal_Bool bCalledFromShell,
+ sal_Bool bNewModel )
{
OSL_ENSURE( nRows, "Tabelle ohne Zeile?" );
OSL_ENSURE( nCols, "Tabelle ohne Spalten?" );
@@ -357,10 +364,10 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
String aTblName = GetUniqueTblName();
- if( DoesUndo() )
+ if( GetIDocumentUndoRedo().DoesUndo() )
{
- ClearRedo();
- AppendUndo( new SwUndoInsTbl( rPos, nCols, nRows, static_cast<USHORT>(eAdjust),
+ GetIDocumentUndoRedo().AppendUndo(
+ new SwUndoInsTbl( rPos, nCols, nRows, static_cast<sal_uInt16>(eAdjust),
rInsTblOpts, pTAFmt, pColArr,
aTblName));
}
@@ -370,12 +377,12 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
SwTxtFmtColl *pBodyColl = GetTxtCollFromPool( RES_POOLCOLL_TABLE ),
*pHeadColl = pBodyColl;
- BOOL bDfltBorders = 0 != ( rInsTblOpts.mnInsMode & tabopts::DEFAULT_BORDER );
+ sal_Bool bDfltBorders = 0 != ( rInsTblOpts.mnInsMode & tabopts::DEFAULT_BORDER );
if( (rInsTblOpts.mnInsMode & tabopts::HEADLINE) && (1 != nRows || !bDfltBorders) )
pHeadColl = GetTxtCollFromPool( RES_POOLCOLL_TABLE_HDLN );
- const USHORT nRowsToRepeat =
+ const sal_uInt16 nRowsToRepeat =
tabopts::HEADLINE == (rInsTblOpts.mnInsMode & tabopts::HEADLINE) ?
rInsTblOpts.mnRowsToRepeat :
0;
@@ -407,7 +414,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
const SwAttrSet & aNdSet = pCntntNd->GetSwAttrSet();
const SfxPoolItem *pItem = NULL;
- if (SFX_ITEM_SET == aNdSet.GetItemState( RES_FRAMEDIR, TRUE, &pItem )
+ if (SFX_ITEM_SET == aNdSet.GetItemState( RES_FRAMEDIR, sal_True, &pItem )
&& pItem != NULL)
{
pTableFmt->SetFmtAttr( *pItem );
@@ -423,12 +430,12 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
SwTwips nWidth = USHRT_MAX;
if( pColArr )
{
- USHORT nSttPos = (*pColArr)[ 0 ];
- USHORT nLastPos = (*pColArr)[ USHORT(pColArr->Count()-1)];
+ sal_uInt16 nSttPos = (*pColArr)[ 0 ];
+ sal_uInt16 nLastPos = (*pColArr)[ sal_uInt16(pColArr->Count()-1)];
if( text::HoriOrientation::NONE == eAdjust )
{
- USHORT nFrmWidth = nLastPos;
- nLastPos = (*pColArr)[ USHORT(pColArr->Count()-2)];
+ sal_uInt16 nFrmWidth = nLastPos;
+ nLastPos = (*pColArr)[ sal_uInt16(pColArr->Count()-2)];
pTableFmt->SetFmtAttr( SvxLRSpaceItem( nSttPos, nFrmWidth - nLastPos, 0, 0, RES_LR_SPACE ) );
}
nWidth = nLastPos - nSttPos;
@@ -440,7 +447,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
}
pTableFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nWidth ));
if( !(rInsTblOpts.mnInsMode & tabopts::SPLIT_LAYOUT) )
- pTableFmt->SetFmtAttr( SwFmtLayoutSplit( FALSE ));
+ pTableFmt->SetFmtAttr( SwFmtLayoutSplit( sal_False ));
// verschiebe ggfs. die harten PageDesc/PageBreak Attribute:
SwCntntNode* pNextNd = GetNodes()[ pTblNd->EndOfSectionIndex()+1 ]
@@ -449,14 +456,14 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
{
const SfxItemSet* pNdSet = pNextNd->GetpSwAttrSet();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == pNdSet->GetItemState( RES_PAGEDESC, FALSE,
+ if( SFX_ITEM_SET == pNdSet->GetItemState( RES_PAGEDESC, sal_False,
&pItem ) )
{
pTableFmt->SetFmtAttr( *pItem );
pNextNd->ResetAttr( RES_PAGEDESC );
pNdSet = pNextNd->GetpSwAttrSet();
}
- if( pNdSet && SFX_ITEM_SET == pNdSet->GetItemState( RES_BREAK, FALSE,
+ if( pNdSet && SFX_ITEM_SET == pNdSet->GetItemState( RES_BREAK, sal_False,
&pItem ) )
{
pTableFmt->SetFmtAttr( *pItem );
@@ -479,27 +486,27 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
}
else
{
- const USHORT nBoxArrLen = pTAFmt ? 16 : 4;
- for( USHORT i = 0; i < nBoxArrLen; ++i )
+ const sal_uInt16 nBoxArrLen = pTAFmt ? 16 : 4;
+ for( sal_uInt16 i = 0; i < nBoxArrLen; ++i )
aBoxFmtArr.Insert( (void*)0, i );
}
SfxItemSet aCharSet( GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1 );
SwNodeIndex aNdIdx( *pTblNd, 1 ); // auf den ersten Box-StartNode
SwTableLines& rLines = pNdTbl->GetTabLines();
- for( USHORT n = 0; n < nRows; ++n )
+ for( sal_uInt16 n = 0; n < nRows; ++n )
{
SwTableLine* pLine = new SwTableLine( pLineFmt, nCols, 0 );
rLines.C40_INSERT( SwTableLine, pLine, n );
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- for( USHORT i = 0; i < nCols; ++i )
+ for( sal_uInt16 i = 0; i < nCols; ++i )
{
SwTableBoxFmt *pBoxF;
if( pTAFmt )
{
- BYTE nId = static_cast<BYTE>(!n ? 0 : (( n+1 == nRows )
+ sal_uInt8 nId = static_cast<sal_uInt8>(!n ? 0 : (( n+1 == nRows )
? 12 : (4 * (1 + ((n-1) & 1 )))));
- nId = nId + static_cast<BYTE>( !i ? 0 :
+ nId = nId + static_cast<sal_uInt8>( !i ? 0 :
( i+1 == nCols ? 3 : (1 + ((i-1) & 1))));
pBoxF = ::lcl_CreateAFmtBoxFmt( *this, aBoxFmtArr, *pTAFmt,
nCols, nId );
@@ -517,7 +524,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
}
else if( bDfltBorders )
{
- BYTE nBoxId = (i < nCols - 1 ? 0 : 1) + (n ? 2 : 0 );
+ sal_uInt8 nBoxId = (i < nCols - 1 ? 0 : 1) + (n ? 2 : 0 );
pBoxF = ::lcl_CreateDfltBoxFmt( *this, aBoxFmtArr, nCols, nBoxId);
}
else
@@ -528,7 +535,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
// Positionen der Spalten!! (nicht deren Breite!)
if( pColArr )
{
- nWidth = (*pColArr)[ USHORT(i + 1) ] - (*pColArr)[ i ];
+ nWidth = (*pColArr)[ sal_uInt16(i + 1) ] - (*pColArr)[ i ];
if( pBoxF->GetFrmSize().GetWidth() != nWidth )
{
if( pBoxF->GetDepends() ) // neues Format erzeugen!
@@ -565,10 +572,10 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
}
SwTableNode* SwNodes::InsertTable( const SwNodeIndex& rNdIdx,
- USHORT nBoxes,
+ sal_uInt16 nBoxes,
SwTxtFmtColl* pCntntTxtColl,
- USHORT nLines,
- USHORT nRepeat,
+ sal_uInt16 nLines,
+ sal_uInt16 nRepeat,
SwTxtFmtColl* pHeadlineTxtColl,
const SwAttrSet * pAttrSet)
{
@@ -587,9 +594,9 @@ SwTableNode* SwNodes::InsertTable( const SwNodeIndex& rNdIdx,
SwNodeIndex aIdx( *pEndNd );
SwTxtFmtColl* pTxtColl = pHeadlineTxtColl;
- for( USHORT nL = 0; nL < nLines; ++nL )
+ for( sal_uInt16 nL = 0; nL < nLines; ++nL )
{
- for( USHORT nB = 0; nB < nBoxes; ++nB )
+ for( sal_uInt16 nB = 0; nB < nBoxes; ++nB )
{
SwStartNode* pSttNd = new SwStartNode( aIdx, ND_STARTNODE,
SwTableBoxStartNode );
@@ -601,17 +608,17 @@ SwTableNode* SwNodes::InsertTable( const SwNodeIndex& rNdIdx,
const SfxPoolItem* pItem = NULL;
if ( NULL != pAttrSet )
{
- static const USHORT aPropagateItems[] = {
+ static const sal_uInt16 aPropagateItems[] = {
RES_PARATR_ADJUST,
RES_CHRATR_FONT, RES_CHRATR_FONTSIZE,
RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_FONTSIZE,
RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_FONTSIZE, 0 };
- const USHORT* pIdx = aPropagateItems;
+ const sal_uInt16* pIdx = aPropagateItems;
while ( *pIdx != 0 )
{
if ( SFX_ITEM_SET != pTmpNd->GetSwAttrSet().GetItemState( *pIdx ) &&
- SFX_ITEM_SET == pAttrSet->GetItemState( *pIdx, TRUE, &pItem ) )
+ SFX_ITEM_SET == pAttrSet->GetItemState( *pIdx, sal_True, &pItem ) )
static_cast<SwCntntNode *>(pTmpNd)->SetAttr(*pItem);
++pIdx;
}
@@ -637,7 +644,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
// pruefe ob in der Selection eine Tabelle liegt
const SwPosition *pStt = rRange.Start(), *pEnd = rRange.End();
{
- ULONG nCnt = pStt->nNode.GetIndex();
+ sal_uLong nCnt = pStt->nNode.GetIndex();
for( ; nCnt <= pEnd->nNode.GetIndex(); ++nCnt )
if( !GetNodes()[ nCnt ]->IsTxtNode() )
return 0;
@@ -651,15 +658,15 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
pEnd = aOriginal.GetPoint();
SwUndoTxtToTbl* pUndo = 0;
- if( DoesUndo() )
+ if( GetIDocumentUndoRedo().DoesUndo() )
{
- StartUndo( UNDO_TEXTTOTABLE, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_TEXTTOTABLE, NULL );
pUndo = new SwUndoTxtToTbl( aOriginal, rInsTblOpts, cCh,
- static_cast<USHORT>(eAdjust), pTAFmt );
- AppendUndo( pUndo );
+ static_cast<sal_uInt16>(eAdjust), pTAFmt );
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
// das Splitten vom TextNode nicht in die Undohistory aufnehmen
- DoUndo( FALSE );
+ GetIDocumentUndoRedo().DoUndo( false );
}
::PaMCorrAbs( aOriginal, *pEnd );
@@ -669,7 +676,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
if( pStt->nContent.GetIndex() )
SplitNode( *pStt, false );
- BOOL bEndCntnt = 0 != pEnd->nContent.GetIndex();
+ sal_Bool bEndCntnt = 0 != pEnd->nContent.GetIndex();
// nicht splitten am Ende der Zeile (aber am Ende vom Doc!!)
if( bEndCntnt )
{
@@ -691,14 +698,14 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
if( aRg.aEnd.GetIndex() == aRg.aStart.GetIndex() )
{
- OSL_ENSURE( FALSE, "Kein Bereich" );
+ OSL_ENSURE( sal_False, "Kein Bereich" );
aRg.aEnd++;
}
// Wir gehen jetzt immer ueber die Upper, um die Tabelle einzufuegen:
SwNode2Layout aNode2Layout( aRg.aStart.GetNode() );
- DoUndo( 0 != pUndo );
+ GetIDocumentUndoRedo().DoUndo( 0 != pUndo );
// dann erstelle die Box/Line/Table-Struktur
SwTableBoxFmt* pBoxFmt = MakeTableBoxFmt();
@@ -710,7 +717,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
// die Tabelle bekommt USHRT_MAX als default SSize
pTableFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, USHRT_MAX ));
if( !(rInsTblOpts.mnInsMode & tabopts::SPLIT_LAYOUT) )
- pTableFmt->SetFmtAttr( SwFmtLayoutSplit( FALSE ));
+ pTableFmt->SetFmtAttr( SwFmtLayoutSplit( sal_False ));
/* If the first node in the selection is a context node and if it
has an item FRAMEDIR set (no default) propagate the item to the
@@ -720,7 +727,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
const SwAttrSet & aNdSet = pSttCntntNd->GetSwAttrSet();
const SfxPoolItem *pItem = NULL;
- if (SFX_ITEM_SET == aNdSet.GetItemState( RES_FRAMEDIR, TRUE, &pItem )
+ if (SFX_ITEM_SET == aNdSet.GetItemState( RES_FRAMEDIR, sal_True, &pItem )
&& pItem != NULL)
{
pTableFmt->SetFmtAttr( *pItem );
@@ -734,18 +741,18 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
SwTable * pNdTbl = &pTblNd->GetTable();
OSL_ENSURE( pNdTbl, "kein Tabellen-Node angelegt." );
- const USHORT nRowsToRepeat =
+ const sal_uInt16 nRowsToRepeat =
tabopts::HEADLINE == (rInsTblOpts.mnInsMode & tabopts::HEADLINE) ?
rInsTblOpts.mnRowsToRepeat :
0;
pNdTbl->SetRowsToRepeat( nRowsToRepeat );
- BOOL bUseBoxFmt = FALSE;
+ sal_Bool bUseBoxFmt = sal_False;
if( !pBoxFmt->GetDepends() )
{
// die Formate an den Boxen haben schon die richtige Size, es darf
// also nur noch die richtige Umrandung/AutoFmt gesetzt werden.
- bUseBoxFmt = TRUE;
+ bUseBoxFmt = sal_True;
pTableFmt->SetFmtAttr( pBoxFmt->GetFrmSize() );
delete pBoxFmt;
eAdjust = text::HoriOrientation::NONE;
@@ -757,10 +764,10 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
if( pTAFmt || ( rInsTblOpts.mnInsMode & tabopts::DEFAULT_BORDER) )
{
- BYTE nBoxArrLen = pTAFmt ? 16 : 4;
+ sal_uInt8 nBoxArrLen = pTAFmt ? 16 : 4;
SvPtrarr aBoxFmtArr( nBoxArrLen, 0 );
{
- for( BYTE i = 0; i < nBoxArrLen; ++i )
+ for( sal_uInt8 i = 0; i < nBoxArrLen; ++i )
aBoxFmtArr.Insert( (void*)0, i );
}
@@ -770,21 +777,21 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
SwTableBoxFmt *pBoxF = 0;
SwTableLines& rLines = pNdTbl->GetTabLines();
- USHORT nRows = rLines.Count();
- for( USHORT n = 0; n < nRows; ++n )
+ sal_uInt16 nRows = rLines.Count();
+ for( sal_uInt16 n = 0; n < nRows; ++n )
{
SwTableBoxes& rBoxes = rLines[ n ]->GetTabBoxes();
- USHORT nCols = rBoxes.Count();
- for( USHORT i = 0; i < nCols; ++i )
+ sal_uInt16 nCols = rBoxes.Count();
+ for( sal_uInt16 i = 0; i < nCols; ++i )
{
SwTableBox* pBox = rBoxes[ i ];
- BOOL bChgSz = FALSE;
+ sal_Bool bChgSz = sal_False;
if( pTAFmt )
{
- BYTE nId = static_cast<BYTE>(!n ? 0 : (( n+1 == nRows )
+ sal_uInt8 nId = static_cast<sal_uInt8>(!n ? 0 : (( n+1 == nRows )
? 12 : (4 * (1 + ((n-1) & 1 )))));
- nId = nId + static_cast<BYTE>(!i ? 0 :
+ nId = nId + static_cast<sal_uInt8>(!i ? 0 :
( i+1 == nCols ? 3 : (1 + ((i-1) & 1))));
if( bUseBoxFmt )
::lcl_SetDfltBoxAttr( *pBox, aBoxFmtArr, nId, pTAFmt );
@@ -803,8 +810,8 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
SwTableAutoFmt::UPDATE_CHAR, 0 );
if( aCharSet.Count() )
{
- ULONG nSttNd = pBox->GetSttIdx()+1;
- ULONG nEndNd = pBox->GetSttNd()->EndOfSectionIndex();
+ sal_uLong nSttNd = pBox->GetSttIdx()+1;
+ sal_uLong nEndNd = pBox->GetSttNd()->EndOfSectionIndex();
for( ; nSttNd < nEndNd; ++nSttNd )
{
SwCntntNode* pNd = GetNodes()[ nSttNd ]->GetCntntNode();
@@ -824,7 +831,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
}
else
{
- BYTE nId = (i < nCols - 1 ? 0 : 1) + (n ? 2 : 0 );
+ sal_uInt8 nId = (i < nCols - 1 ? 0 : 1) + (n ? 2 : 0 );
if( bUseBoxFmt )
::lcl_SetDfltBoxAttr( *pBox, aBoxFmtArr, nId );
else
@@ -846,7 +853,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
if( bUseBoxFmt )
{
- for( BYTE i = 0; i < nBoxArrLen; ++i )
+ for( sal_uInt8 i = 0; i < nBoxArrLen; ++i )
{
SvPtrarr* pArr = (SvPtrarr*)aBoxFmtArr[ i ];
delete pArr;
@@ -857,11 +864,11 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
// JP 03.04.97: Inhalt der Boxen auf Zahlen abpruefen
if( IsInsTblFormatNum() )
{
- for( USHORT nBoxes = pNdTbl->GetTabSortBoxes().Count(); nBoxes; )
- ChkBoxNumFmt( *pNdTbl->GetTabSortBoxes()[ --nBoxes ], FALSE );
+ for( sal_uInt16 nBoxes = pNdTbl->GetTabSortBoxes().Count(); nBoxes; )
+ ChkBoxNumFmt( *pNdTbl->GetTabSortBoxes()[ --nBoxes ], sal_False );
}
- ULONG nIdx = pTblNd->GetIndex();
+ sal_uLong nIdx = pTblNd->GetIndex();
aNode2Layout.RestoreUpperFrms( GetNodes(), nIdx, nIdx + 1 );
{
@@ -873,7 +880,9 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
}
if( pUndo )
- EndUndo( UNDO_TEXTTOTABLE, NULL );
+ {
+ GetIDocumentUndoRedo().EndUndo( UNDO_TEXTTOTABLE, NULL );
+ }
SetModified();
SetFieldsDirty(true, NULL, 0);
@@ -898,7 +907,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
SwTable * pTable = &pTblNd->GetTable();
SwTableLine* pLine;
SwTableBox* pBox;
- USHORT nBoxes, nLines, nMaxBoxes = 0;
+ sal_uInt16 nBoxes, nLines, nMaxBoxes = 0;
SwNodeIndex aSttIdx( *pTblNd, 1 );
SwNodeIndex aEndIdx( rRange.aEnd, -1 );
@@ -923,13 +932,14 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
{
if( *pTxt == cCh )
{
- aPosArr.Insert( static_cast<USHORT>(
- aFInfo.GetCharPos( nChPos+1, FALSE )),
+ aPosArr.Insert( static_cast<sal_uInt16>(
+ aFInfo.GetCharPos( nChPos+1, sal_False )),
aPosArr.Count() );
}
}
- aPosArr.Insert( static_cast<USHORT>(aFInfo.GetFrm()->IsVertical() ?
+ aPosArr.Insert(
+ static_cast<sal_uInt16>(aFInfo.GetFrm()->IsVertical() ?
aFInfo.GetFrm()->Prt().Bottom() :
aFInfo.GetFrm()->Prt().Right()),
aPosArr.Count() );
@@ -944,7 +954,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
if( pSet )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False, &pItem ) )
{
if( !nLines )
pTblFmt->SetFmtAttr( *pItem );
@@ -953,7 +963,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
}
if( pSet && SFX_ITEM_SET == pSet->GetItemState(
- RES_PAGEDESC, FALSE, &pItem ) &&
+ RES_PAGEDESC, sal_False, &pItem ) &&
((SwFmtPageDesc*)pItem)->GetPageDesc() )
{
if( !nLines )
@@ -1024,7 +1034,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
}
// die Tabelle ausgleichen, leere Sections einfuegen
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < pTable->GetTabLines().Count(); ++n )
{
@@ -1035,7 +1045,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
nBoxes, nMaxBoxes - nBoxes );
if( pUndo )
- for( USHORT i = nBoxes; i < nMaxBoxes; ++i )
+ for( sal_uInt16 i = nBoxes; i < nMaxBoxes; ++i )
pUndo->AddFillBox( *pCurrLine->GetTabBoxes()[ i ] );
// fehlen der 1. Line Boxen, dann kann man das Breiten Array
@@ -1048,13 +1058,13 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
if( aPosArr.Count() )
{
SwTableLines& rLns = pTable->GetTabLines();
- USHORT nLastPos = 0;
+ sal_uInt16 nLastPos = 0;
for( n = 0; n < aPosArr.Count(); ++n )
{
SwTableBoxFmt *pNewFmt = pDoc->MakeTableBoxFmt();
pNewFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE,
aPosArr[ n ] - nLastPos ));
- for( USHORT nTmpLine = 0; nTmpLine < rLns.Count(); ++nTmpLine )
+ for( sal_uInt16 nTmpLine = 0; nTmpLine < rLns.Count(); ++nTmpLine )
//JP 24.06.98: hier muss ein Add erfolgen, da das BoxFormat
// von der rufenden Methode noch gebraucht wird!
pNewFmt->Add( rLns[ nTmpLine ]->GetTabBoxes()[ n ] );
@@ -1093,11 +1103,12 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
const SwPosition *pStt = aOriginal.GetMark();
const SwPosition *pEnd = aOriginal.GetPoint();
- SwUndoTxtToTbl* pUndo = 0;
- if( DoesUndo() )
+// SwUndoTxtToTbl* pUndo = 0;
+ bool const bUndo(GetIDocumentUndoRedo().DoesUndo());
+ if (bUndo)
{
// das Splitten vom TextNode nicht in die Undohistory aufnehmen
- DoUndo( FALSE );
+ GetIDocumentUndoRedo().DoUndo(false);
}
::PaMCorrAbs( aOriginal, *pEnd );
@@ -1107,7 +1118,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
if( pStt->nContent.GetIndex() )
SplitNode( *pStt, false );
- BOOL bEndCntnt = 0 != pEnd->nContent.GetIndex();
+ sal_Bool bEndCntnt = 0 != pEnd->nContent.GetIndex();
// nicht splitten am Ende der Zeile (aber am Ende vom Doc!!)
if( bEndCntnt )
{
@@ -1129,14 +1140,14 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
if( aRg.aEnd.GetIndex() == aRg.aStart.GetIndex() )
{
- OSL_ENSURE( FALSE, "Kein Bereich" );
+ OSL_ENSURE( sal_False, "Kein Bereich" );
aRg.aEnd++;
}
// Wir gehen jetzt immer ueber die Upper, um die Tabelle einzufuegen:
SwNode2Layout aNode2Layout( aRg.aStart.GetNode() );
- DoUndo( 0 != pUndo );
+ GetIDocumentUndoRedo().DoUndo(bUndo);
// dann erstelle die Box/Line/Table-Struktur
SwTableBoxFmt* pBoxFmt = MakeTableBoxFmt();
@@ -1156,7 +1167,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
const SwAttrSet & aNdSet = pSttCntntNd->GetSwAttrSet();
const SfxPoolItem *pItem = NULL;
- if (SFX_ITEM_SET == aNdSet.GetItemState( RES_FRAMEDIR, TRUE, &pItem )
+ if (SFX_ITEM_SET == aNdSet.GetItemState( RES_FRAMEDIR, sal_True, &pItem )
&& pItem != NULL)
{
pTableFmt->SetFmtAttr( *pItem );
@@ -1179,7 +1190,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
delete pBoxFmt;
}
- ULONG nIdx = pTblNd->GetIndex();
+ sal_uLong nIdx = pTblNd->GetIndex();
aNode2Layout.RestoreUpperFrms( GetNodes(), nIdx, nIdx + 1 );
SetModified();
@@ -1281,7 +1292,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
SwTable * pTable = &pTblNd->GetTable();
SwTableLine* pLine;
SwTableBox* pBox;
- USHORT nBoxes, nLines, nMaxBoxes = 0;
+ sal_uInt16 nBoxes, nLines, nMaxBoxes = 0;
SwNodeIndex aNodeIndex = rTableNodes.begin()->begin()->aStart;
// delete frames of all contained content nodes
@@ -1302,7 +1313,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
if( pSet )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False, &pItem ) )
{
if( !nLines )
pTblFmt->SetFmtAttr( *pItem );
@@ -1311,7 +1322,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
}
if( pSet && SFX_ITEM_SET == pSet->GetItemState(
- RES_PAGEDESC, FALSE, &pItem ) &&
+ RES_PAGEDESC, sal_False, &pItem ) &&
((SwFmtPageDesc*)pItem)->GetPageDesc() )
{
if( !nLines )
@@ -1361,18 +1372,18 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
}
// die Tabelle ausgleichen, leere Sections einfuegen
- USHORT n;
+ sal_uInt16 n;
if( aPosArr.Count() )
{
SwTableLines& rLns = pTable->GetTabLines();
- USHORT nLastPos = 0;
+ sal_uInt16 nLastPos = 0;
for( n = 0; n < aPosArr.Count(); ++n )
{
SwTableBoxFmt *pNewFmt = pDoc->MakeTableBoxFmt();
pNewFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE,
aPosArr[ n ] - nLastPos ));
- for( USHORT nLines2 = 0; nLines2 < rLns.Count(); ++nLines2 )
+ for( sal_uInt16 nLines2 = 0; nLines2 < rLns.Count(); ++nLines2 )
//JP 24.06.98: hier muss ein Add erfolgen, da das BoxFormat
// von der rufenden Methode noch gebraucht wird!
pNewFmt->Add( rLns[ nLines2 ]->GetTabBoxes()[ n ] );
@@ -1396,10 +1407,10 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
//---------------- Tabelle -> Text -----------------------
-BOOL SwDoc::TableToText( const SwTableNode* pTblNd, sal_Unicode cCh )
+sal_Bool SwDoc::TableToText( const SwTableNode* pTblNd, sal_Unicode cCh )
{
if( !pTblNd )
- return FALSE;
+ return sal_False;
// --> FME 2004-09-28 #i34471#
// If this is trigged by SwUndoTblToTxt::Repeat() nobody ever deleted
@@ -1412,9 +1423,9 @@ BOOL SwDoc::TableToText( const SwTableNode* pTblNd, sal_Unicode cCh )
SwNodeRange aRg( *pTblNd, 0, *pTblNd->EndOfSectionNode() );
SwUndoTblToTxt* pUndo = 0;
SwNodeRange* pUndoRg = 0;
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
+ GetIDocumentUndoRedo().ClearRedo();
pUndoRg = new SwNodeRange( aRg.aStart, -1, aRg.aEnd, +1 );
pUndo = new SwUndoTblToTxt( pTblNd->GetTable(), cCh );
}
@@ -1423,13 +1434,13 @@ BOOL SwDoc::TableToText( const SwTableNode* pTblNd, sal_Unicode cCh )
aMsgHnt.eFlags = TBL_BOXNAME;
UpdateTblFlds( &aMsgHnt );
- BOOL bRet = GetNodes().TableToText( aRg, cCh, pUndo );
+ sal_Bool bRet = GetNodes().TableToText( aRg, cCh, pUndo );
if( pUndoRg )
{
pUndoRg->aStart++;
pUndoRg->aEnd--;
pUndo->SetRange( *pUndoRg );
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
delete pUndoRg;
}
@@ -1457,9 +1468,9 @@ struct _DelTabPara
// forward deklarieren damit sich die Lines und Boxen rekursiv aufrufen
// koennen.
-BOOL lcl_DelBox( const SwTableBox*&, void *pPara );
+sal_Bool lcl_DelBox( const SwTableBox*&, void *pPara );
-BOOL lcl_DelLine( const SwTableLine*& rpLine, void* pPara )
+sal_Bool lcl_DelLine( const SwTableLine*& rpLine, void* pPara )
{
OSL_ENSURE( pPara, "die Parameter fehlen" );
_DelTabPara aPara( *(_DelTabPara*)pPara );
@@ -1467,11 +1478,11 @@ BOOL lcl_DelLine( const SwTableLine*& rpLine, void* pPara )
if( rpLine->GetUpper() ) // gibt es noch eine uebergeordnete Box ??
// dann gebe den letzten TextNode zurueck
((_DelTabPara*)pPara)->pLastNd = aPara.pLastNd;
- return TRUE;
+ return sal_True;
}
-BOOL lcl_DelBox( const SwTableBox*& rpBox, void* pPara )
+sal_Bool lcl_DelBox( const SwTableBox*& rpBox, void* pPara )
{
OSL_ENSURE( pPara, "die Parameter fehlen" );
@@ -1491,7 +1502,7 @@ BOOL lcl_DelBox( const SwTableBox*& rpBox, void* pPara )
0 != ( pCurTxtNd = aDelRg.aStart.GetNode().GetTxtNode() ))
{
// Join the current text node with the last from the previous box if possible
- ULONG nNdIdx = aDelRg.aStart.GetIndex();
+ sal_uLong nNdIdx = aDelRg.aStart.GetIndex();
aDelRg.aStart--;
if( pDelPara->pLastNd == &aDelRg.aStart.GetNode() )
{
@@ -1531,19 +1542,19 @@ BOOL lcl_DelBox( const SwTableBox*& rpBox, void* pPara )
if( pDelPara->pLastNd && pDelPara->pLastNd->HasSwAttrSet() )
pDelPara->pLastNd->ResetAttr( RES_PARATR_ADJUST );
}
- return TRUE;
+ return sal_True;
}
-BOOL SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
+sal_Bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
SwUndoTblToTxt* pUndo )
{
// ist eine Tabelle selektiert ?
SwTableNode* pTblNd;
if( rRange.aStart.GetIndex() >= rRange.aEnd.GetIndex() ||
- 0 == ( pTblNd = (*this)[ rRange.aStart ]->GetTableNode()) ||
+ 0 == ( pTblNd = rRange.aStart.GetNode().GetTableNode()) ||
&rRange.aEnd.GetNode() != pTblNd->EndOfSectionNode() )
- return FALSE;
+ return sal_False;
// stand die Tabelle ganz alleine in einer Section ?
// dann ueber den Upper der Tabelle die Frames anlegen
@@ -1572,9 +1583,9 @@ BOOL SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
// was ist mit UNDO???
const SfxItemSet& rTblSet = pTblNd->pTable->GetFrmFmt()->GetAttrSet();
const SfxPoolItem *pBreak, *pDesc;
- if( SFX_ITEM_SET != rTblSet.GetItemState( RES_PAGEDESC, FALSE, &pDesc ))
+ if( SFX_ITEM_SET != rTblSet.GetItemState( RES_PAGEDESC, sal_False, &pDesc ))
pDesc = 0;
- if( SFX_ITEM_SET != rTblSet.GetItemState( RES_BREAK, FALSE, &pBreak ))
+ if( SFX_ITEM_SET != rTblSet.GetItemState( RES_BREAK, sal_False, &pBreak ))
pBreak = 0;
if( pBreak || pDesc )
@@ -1590,7 +1601,7 @@ BOOL SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
SectionUp( &aDelRg ); // loesche die Section und damit die Tabelle
// #i28006#
- ULONG nStt = aDelRg.aStart.GetIndex(), nEnd = aDelRg.aEnd.GetIndex();
+ sal_uLong nStt = aDelRg.aStart.GetIndex(), nEnd = aDelRg.aEnd.GetIndex();
if( !pFrmNd )
{
pNode2Layout->RestoreUpperFrms( *this,
@@ -1630,7 +1641,7 @@ BOOL SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
// #i28006# Fly frames have to be restored even if the table was
// #alone in the section
const SwSpzFrmFmts& rFlyArr = *GetDoc()->GetSpzFrmFmts();
- for( USHORT n = 0; n < rFlyArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFlyArr.Count(); ++n )
{
SwFrmFmt *const pFmt = (SwFrmFmt*)rFlyArr[n];
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
@@ -1645,69 +1656,71 @@ BOOL SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
}
}
- return TRUE;
+ return sal_True;
}
// ----- einfuegen von Spalten/Zeilen ------------------------
-BOOL SwDoc::InsertCol( const SwCursor& rCursor, USHORT nCnt, BOOL bBehind )
+sal_Bool SwDoc::InsertCol( const SwCursor& rCursor, sal_uInt16 nCnt, sal_Bool bBehind )
{
if( !::CheckSplitCells( rCursor, nCnt + 1, nsSwTblSearchType::TBLSEARCH_COL ) )
- return FALSE;
+ return sal_False;
// lasse ueber das Layout die Boxen suchen
SwSelBoxes aBoxes;
::GetTblSel( rCursor, aBoxes, nsSwTblSearchType::TBLSEARCH_COL );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( aBoxes.Count() )
bRet = InsertCol( aBoxes, nCnt, bBehind );
return bRet;
}
-BOOL SwDoc::InsertCol( const SwSelBoxes& rBoxes, USHORT nCnt, BOOL bBehind )
+sal_Bool SwDoc::InsertCol( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool bBehind )
{
// uebers SwDoc fuer Undo !!
OSL_ENSURE( rBoxes.Count(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
SwTable& rTbl = pTblNd->GetTable();
if( rTbl.ISA( SwDDETable ))
- return FALSE;
+ return sal_False;
SwTableSortBoxes aTmpLst( 0, 5 );
SwUndoTblNdsChg* pUndo = 0;
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- DoUndo( FALSE );
pUndo = new SwUndoTblNdsChg( UNDO_TABLE_INSCOL, rBoxes, *pTblNd,
- 0, 0, nCnt, bBehind, FALSE );
+ 0, 0, nCnt, bBehind, sal_False );
aTmpLst.Insert( &rTbl.GetTabSortBoxes(), 0, rTbl.GetTabSortBoxes().Count() );
}
- SwTableFmlUpdate aMsgHnt( &rTbl );
- aMsgHnt.eFlags = TBL_BOXPTR;
- UpdateTblFlds( &aMsgHnt );
-
- BOOL bRet = rTbl.InsertCol( this, rBoxes, nCnt, bBehind );
- if( bRet )
+ bool bRet(false);
{
- SetModified();
- ::ClearFEShellTabCols();
- SetFieldsDirty( true, NULL, 0 );
+ ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
+
+ SwTableFmlUpdate aMsgHnt( &rTbl );
+ aMsgHnt.eFlags = TBL_BOXPTR;
+ UpdateTblFlds( &aMsgHnt );
+
+ bRet = rTbl.InsertCol( this, rBoxes, nCnt, bBehind );
+ if (bRet)
+ {
+ SetModified();
+ ::ClearFEShellTabCols();
+ SetFieldsDirty( true, NULL, 0 );
+ }
}
if( pUndo )
{
- DoUndo( TRUE );
if( bRet )
{
- ClearRedo();
pUndo->SaveNewBoxes( *pTblNd, aTmpLst );
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
}
else
delete pUndo;
@@ -1715,60 +1728,62 @@ BOOL SwDoc::InsertCol( const SwSelBoxes& rBoxes, USHORT nCnt, BOOL bBehind )
return bRet;
}
-BOOL SwDoc::InsertRow( const SwCursor& rCursor, USHORT nCnt, BOOL bBehind )
+sal_Bool SwDoc::InsertRow( const SwCursor& rCursor, sal_uInt16 nCnt, sal_Bool bBehind )
{
// lasse ueber das Layout die Boxen suchen
SwSelBoxes aBoxes;
GetTblSel( rCursor, aBoxes, nsSwTblSearchType::TBLSEARCH_ROW );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( aBoxes.Count() )
bRet = InsertRow( aBoxes, nCnt, bBehind );
return bRet;
}
-BOOL SwDoc::InsertRow( const SwSelBoxes& rBoxes, USHORT nCnt, BOOL bBehind )
+sal_Bool SwDoc::InsertRow( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool bBehind )
{
// uebers SwDoc fuer Undo !!
OSL_ENSURE( rBoxes.Count(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
SwTable& rTbl = pTblNd->GetTable();
if( rTbl.ISA( SwDDETable ))
- return FALSE;
+ return sal_False;
SwTableSortBoxes aTmpLst( 0, 5 );
SwUndoTblNdsChg* pUndo = 0;
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- DoUndo( FALSE );
pUndo = new SwUndoTblNdsChg( UNDO_TABLE_INSROW,rBoxes, *pTblNd,
- 0, 0, nCnt, bBehind, FALSE );
+ 0, 0, nCnt, bBehind, sal_False );
aTmpLst.Insert( &rTbl.GetTabSortBoxes(), 0, rTbl.GetTabSortBoxes().Count() );
}
- SwTableFmlUpdate aMsgHnt( &rTbl );
- aMsgHnt.eFlags = TBL_BOXPTR;
- UpdateTblFlds( &aMsgHnt );
-
- BOOL bRet = rTbl.InsertRow( this, rBoxes, nCnt, bBehind );
- if( bRet )
+ bool bRet(false);
{
- SetModified();
- ::ClearFEShellTabCols();
- SetFieldsDirty( true, NULL, 0 );
+ ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
+
+ SwTableFmlUpdate aMsgHnt( &rTbl );
+ aMsgHnt.eFlags = TBL_BOXPTR;
+ UpdateTblFlds( &aMsgHnt );
+
+ bRet = rTbl.InsertRow( this, rBoxes, nCnt, bBehind );
+ if (bRet)
+ {
+ SetModified();
+ ::ClearFEShellTabCols();
+ SetFieldsDirty( true, NULL, 0 );
+ }
}
if( pUndo )
{
- DoUndo( TRUE );
if( bRet )
{
- ClearRedo();
pUndo->SaveNewBoxes( *pTblNd, aTmpLst );
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
}
else
delete pUndo;
@@ -1779,13 +1794,13 @@ BOOL SwDoc::InsertRow( const SwSelBoxes& rBoxes, USHORT nCnt, BOOL bBehind )
// ----- loeschen von Spalten/Zeilen ------------------------
-BOOL SwDoc::DeleteRow( const SwCursor& rCursor )
+sal_Bool SwDoc::DeleteRow( const SwCursor& rCursor )
{
// lasse ueber das Layout die Boxen suchen
SwSelBoxes aBoxes;
GetTblSel( rCursor, aBoxes, nsSwTblSearchType::TBLSEARCH_ROW );
if( ::HasProtectedCells( aBoxes ))
- return FALSE;
+ return sal_False;
// die Crsr aus dem Loeschbereich entfernen.
// Der Cursor steht danach:
@@ -1796,7 +1811,7 @@ BOOL SwDoc::DeleteRow( const SwCursor& rCursor )
SwTableNode* pTblNd = rCursor.GetNode()->FindTableNode();
if( pTblNd->GetTable().ISA( SwDDETable ))
- return FALSE;
+ return sal_False;
// suche alle Boxen / Lines
_FndBox aFndBox( 0, 0 );
@@ -1806,7 +1821,7 @@ BOOL SwDoc::DeleteRow( const SwCursor& rCursor )
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
SwEditShell* pESh = GetEditShell();
if( pESh )
@@ -1836,7 +1851,7 @@ BOOL SwDoc::DeleteRow( const SwCursor& rCursor )
pDelBox = pLn->GetTabBoxes()[ pLn->GetTabBoxes().Count() - 1 ];
}
SwTableBox* pNextBox = pDelLine->FindNextBox( pTblNd->GetTable(),
- pDelBox, TRUE );
+ pDelBox, sal_True );
while( pNextBox &&
pNextBox->GetFrmFmt()->GetProtect().IsCntntProtected() )
pNextBox = pNextBox->FindNextBox( pTblNd->GetTable(), pNextBox );
@@ -1848,13 +1863,13 @@ BOOL SwDoc::DeleteRow( const SwCursor& rCursor )
while( !pDelBox->GetSttNd() )
pDelBox = pDelBox->GetTabLines()[0]->GetTabBoxes()[0];
pNextBox = pDelLine->FindPreviousBox( pTblNd->GetTable(),
- pDelBox, TRUE );
+ pDelBox, sal_True );
while( pNextBox &&
pNextBox->GetFrmFmt()->GetProtect().IsCntntProtected() )
pNextBox = pNextBox->FindPreviousBox( pTblNd->GetTable(), pNextBox );
}
- ULONG nIdx;
+ sal_uLong nIdx;
if( pNextBox ) // dann den Cursor hier hinein
nIdx = pNextBox->GetSttIdx() + 1;
else // ansonsten hinter die Tabelle
@@ -1878,20 +1893,20 @@ BOOL SwDoc::DeleteRow( const SwCursor& rCursor )
// dann loesche doch die Zeilen
- StartUndo(UNDO_ROW_DELETE, NULL);
- BOOL bResult = DeleteRowCol( aBoxes );
- EndUndo(UNDO_ROW_DELETE, NULL);
+ GetIDocumentUndoRedo().StartUndo(UNDO_ROW_DELETE, NULL);
+ sal_Bool bResult = DeleteRowCol( aBoxes );
+ GetIDocumentUndoRedo().EndUndo(UNDO_ROW_DELETE, NULL);
return bResult;
}
-BOOL SwDoc::DeleteCol( const SwCursor& rCursor )
+sal_Bool SwDoc::DeleteCol( const SwCursor& rCursor )
{
// lasse ueber das Layout die Boxen suchen
SwSelBoxes aBoxes;
GetTblSel( rCursor, aBoxes, nsSwTblSearchType::TBLSEARCH_COL );
if( ::HasProtectedCells( aBoxes ))
- return FALSE;
+ return sal_False;
// die Crsr muessen noch aus dem Loesch Bereich entfernt
// werden. Setze sie immer hinter/auf die Tabelle; ueber die
@@ -1904,26 +1919,26 @@ BOOL SwDoc::DeleteCol( const SwCursor& rCursor )
}
// dann loesche doch die Spalten
- StartUndo(UNDO_COL_DELETE, NULL);
- BOOL bResult = DeleteRowCol( aBoxes, true );
- EndUndo(UNDO_COL_DELETE, NULL);
+ GetIDocumentUndoRedo().StartUndo(UNDO_COL_DELETE, NULL);
+ sal_Bool bResult = DeleteRowCol( aBoxes, true );
+ GetIDocumentUndoRedo().EndUndo(UNDO_COL_DELETE, NULL);
return bResult;
}
-BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
+sal_Bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
{
if( ::HasProtectedCells( rBoxes ))
- return FALSE;
+ return sal_False;
// uebers SwDoc fuer Undo !!
OSL_ENSURE( rBoxes.Count(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
if( pTblNd->GetTable().ISA( SwDDETable ))
- return FALSE;
+ return sal_False;
::ClearFEShellTabCols();
SwSelBoxes aSelBoxes;
@@ -1940,21 +1955,21 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
}
// soll die gesamte Tabelle geloescht werden ??
- const ULONG nTmpIdx1 = pTblNd->GetIndex();
- const ULONG nTmpIdx2 = aSelBoxes[ aSelBoxes.Count()-1 ]->GetSttNd()->
+ const sal_uLong nTmpIdx1 = pTblNd->GetIndex();
+ const sal_uLong nTmpIdx2 = aSelBoxes[ aSelBoxes.Count()-1 ]->GetSttNd()->
EndOfSectionIndex()+1;
if( pTblNd->GetTable().GetTabSortBoxes().Count() == aSelBoxes.Count() &&
aSelBoxes[0]->GetSttIdx()-1 == nTmpIdx1 &&
nTmpIdx2 == pTblNd->EndOfSectionIndex() )
{
- BOOL bNewTxtNd = FALSE;
+ sal_Bool bNewTxtNd = sal_False;
// steht diese auch noch alleine in einem FlyFrame ?
SwNodeIndex aIdx( *pTblNd, -1 );
const SwStartNode* pSttNd = aIdx.GetNode().GetStartNode();
if( pSttNd )
{
- const ULONG nTblEnd = pTblNd->EndOfSectionIndex() + 1;
- const ULONG nSectEnd = pSttNd->EndOfSectionIndex();
+ const sal_uLong nTblEnd = pTblNd->EndOfSectionIndex() + 1;
+ const sal_uLong nSectEnd = pSttNd->EndOfSectionIndex();
if( nTblEnd == nSectEnd )
{
if( SwFlyStartNode == pSttNd->GetStartNodeType() )
@@ -1964,22 +1979,22 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
{
// Ok, das ist das gesuchte FlyFormat
DelLayoutFmt( pFmt );
- return TRUE;
+ return sal_True;
}
}
// kein Fly ?? also Kopf- oder Fusszeile: dann immer einen
// TextNode ueberig lassen.
// Undo koennen wir dann vergessen !!
- bNewTxtNd = TRUE;
+ bNewTxtNd = sal_True;
}
}
// kein Fly ?? also Kopf- oder Fusszeile: dann immer einen
// TextNode ueberig lassen.
aIdx++;
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
+ GetIDocumentUndoRedo().ClearRedo();
SwPaM aPaM( *pTblNd->EndOfSectionNode(), aIdx.GetNode() );
if( bNewTxtNd )
@@ -1996,13 +2011,14 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
*aSavePaM.GetMark() = SwPosition( *pTblNd );
aSavePaM.Move( fnMoveBackward, fnGoNode );
}
- ::PaMCorrAbs( SwNodeIndex( *pTblNd ),
- SwNodeIndex( *pTblNd->EndOfSectionNode() ),
- *aSavePaM.GetMark() );
+ {
+ SwPaM const tmpPaM(*pTblNd, *pTblNd->EndOfSectionNode());
+ ::PaMCorrAbs(tmpPaM, *aSavePaM.GetMark());
+ }
// harte SeitenUmbrueche am nachfolgenden Node verschieben
- BOOL bSavePageBreak = FALSE, bSavePageDesc = FALSE;
- ULONG nNextNd = pTblNd->EndOfSectionIndex()+1;
+ sal_Bool bSavePageBreak = sal_False, bSavePageDesc = sal_False;
+ sal_uLong nNextNd = pTblNd->EndOfSectionIndex()+1;
SwCntntNode* pNextNd = GetNodes()[ nNextNd ]->GetCntntNode();
if( pNextNd )
{
@@ -2010,17 +2026,17 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
SwFrmFmt* pTableFmt = pTblNd->GetTable().GetFrmFmt();
const SfxPoolItem *pItem;
if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
pNextNd->SetAttr( *pItem );
- bSavePageDesc = TRUE;
+ bSavePageDesc = sal_True;
}
if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
pNextNd->SetAttr( *pItem );
- bSavePageBreak = TRUE;
+ bSavePageBreak = sal_True;
}
}
}
@@ -2029,7 +2045,7 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
pUndo->SetTblDelLastNd();
pUndo->SetPgBrkFlags( bSavePageBreak, bSavePageDesc );
pUndo->SetTableName(pTblNd->GetTable().GetFrmFmt()->GetName());
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
}
else
{
@@ -2047,9 +2063,10 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
*aSavePaM.GetMark() = SwPosition( *pTblNd );
aSavePaM.Move( fnMoveBackward, fnGoNode );
}
- ::PaMCorrAbs( SwNodeIndex( *pTblNd ),
- SwNodeIndex( *pTblNd->EndOfSectionNode() ),
- *aSavePaM.GetMark() );
+ {
+ SwPaM const tmpPaM(*pTblNd, *pTblNd->EndOfSectionNode());
+ ::PaMCorrAbs(tmpPaM, *aSavePaM.GetMark());
+ }
// harte SeitenUmbrueche am nachfolgenden Node verschieben
SwCntntNode* pNextNd = GetNodes()[ pTblNd->EndOfSectionIndex()+1 ]->GetCntntNode();
@@ -2058,11 +2075,11 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
SwFrmFmt* pTableFmt = pTblNd->GetTable().GetFrmFmt();
const SfxPoolItem *pItem;
if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
pNextNd->SetAttr( *pItem );
if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
pNextNd->SetAttr( *pItem );
}
@@ -2071,43 +2088,45 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
}
SetModified();
SetFieldsDirty( true, NULL, 0 );
- return TRUE;
+ return sal_True;
}
SwUndoTblNdsChg* pUndo = 0;
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- DoUndo( FALSE );
pUndo = new SwUndoTblNdsChg( UNDO_TABLE_DELBOX, aSelBoxes, *pTblNd,
- nMin, nMax, 0, FALSE, FALSE );
+ nMin, nMax, 0, sal_False, sal_False );
}
- SwTableFmlUpdate aMsgHnt( &pTblNd->GetTable() );
- aMsgHnt.eFlags = TBL_BOXPTR;
- UpdateTblFlds( &aMsgHnt );
-
- if( rTable.IsNewModel() )
+ bool bRet(false);
{
- if( bColumn )
- rTable.PrepareDeleteCol( nMin, nMax );
- rTable.FindSuperfluousRows( aSelBoxes );
- if( pUndo )
- pUndo->ReNewBoxes( aSelBoxes );
- }
- const BOOL bRet = rTable.DeleteSel( this, aSelBoxes, 0, pUndo, TRUE, TRUE );
- if( bRet )
- {
- SetModified();
- SetFieldsDirty( true, NULL, 0 );
+ ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
+
+ SwTableFmlUpdate aMsgHnt( &pTblNd->GetTable() );
+ aMsgHnt.eFlags = TBL_BOXPTR;
+ UpdateTblFlds( &aMsgHnt );
+
+ if (rTable.IsNewModel())
+ {
+ if (bColumn)
+ rTable.PrepareDeleteCol( nMin, nMax );
+ rTable.FindSuperfluousRows( aSelBoxes );
+ if (pUndo)
+ pUndo->ReNewBoxes( aSelBoxes );
+ }
+ bRet = rTable.DeleteSel( this, aSelBoxes, 0, pUndo, sal_True, sal_True );
+ if (bRet)
+ {
+ SetModified();
+ SetFieldsDirty( true, NULL, 0 );
+ }
}
if( pUndo )
{
- DoUndo( TRUE );
if( bRet )
{
- ClearRedo();
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
}
else
delete pUndo;
@@ -2119,33 +2138,31 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
// ---------- teilen / zusammenfassen von Boxen in der Tabelle --------
-BOOL SwDoc::SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert, USHORT nCnt,
+sal_Bool SwDoc::SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert, sal_uInt16 nCnt,
sal_Bool bSameHeight )
{
// uebers SwDoc fuer Undo !!
OSL_ENSURE( rBoxes.Count() && nCnt, "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
SwTable& rTbl = pTblNd->GetTable();
if( rTbl.ISA( SwDDETable ))
- return FALSE;
+ return sal_False;
SvULongs aNdsCnts;
SwTableSortBoxes aTmpLst( 0, 5 );
SwUndoTblNdsChg* pUndo = 0;
- BOOL bDoUndo = DoesUndo();
- if( bDoUndo )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- DoUndo( FALSE );
pUndo = new SwUndoTblNdsChg( UNDO_TABLE_SPLIT, rBoxes, *pTblNd, 0, 0,
nCnt, bVert, bSameHeight );
aTmpLst.Insert( &rTbl.GetTabSortBoxes(), 0, rTbl.GetTabSortBoxes().Count() );
if( !bVert )
{
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
const SwStartNode* pSttNd = rBoxes[ n ]->GetSttNd();
aNdsCnts.Insert( pSttNd->EndOfSectionIndex() -
@@ -2154,33 +2171,35 @@ BOOL SwDoc::SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert, USHORT nCnt,
}
}
- SwTableFmlUpdate aMsgHnt( &rTbl );
- aMsgHnt.eFlags = TBL_BOXPTR;
- UpdateTblFlds( &aMsgHnt );
+ bool bRet(false);
+ {
+ ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
- BOOL bRet;
- if( bVert )
- bRet = rTbl.SplitCol( this, rBoxes, nCnt );
- else
- bRet = rTbl.SplitRow( this, rBoxes, nCnt, bSameHeight );
+ SwTableFmlUpdate aMsgHnt( &rTbl );
+ aMsgHnt.eFlags = TBL_BOXPTR;
+ UpdateTblFlds( &aMsgHnt );
- if( bRet )
- {
- SetModified();
- SetFieldsDirty( true, NULL, 0 );
+ if (bVert)
+ bRet = rTbl.SplitCol( this, rBoxes, nCnt );
+ else
+ bRet = rTbl.SplitRow( this, rBoxes, nCnt, bSameHeight );
+
+ if (bRet)
+ {
+ SetModified();
+ SetFieldsDirty( true, NULL, 0 );
+ }
}
- DoUndo( bDoUndo );
if( pUndo )
{
if( bRet )
{
- ClearRedo();
if( bVert )
pUndo->SaveNewBoxes( *pTblNd, aTmpLst );
else
pUndo->SaveNewBoxes( *pTblNd, aTmpLst, rBoxes, aNdsCnts );
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
}
else
delete pUndo;
@@ -2190,7 +2209,7 @@ BOOL SwDoc::SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert, USHORT nCnt,
}
-USHORT SwDoc::MergeTbl( SwPaM& rPam )
+sal_uInt16 SwDoc::MergeTbl( SwPaM& rPam )
{
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
SwTableNode* pTblNd = rPam.GetNode()->FindTableNode();
@@ -2199,7 +2218,7 @@ USHORT SwDoc::MergeTbl( SwPaM& rPam )
SwTable& rTable = pTblNd->GetTable();
if( rTable.ISA(SwDDETable) )
return TBLMERGE_NOSELECTION;
- USHORT nRet = TBLMERGE_NOSELECTION;
+ sal_uInt16 nRet = TBLMERGE_NOSELECTION;
if( !rTable.IsNewModel() )
{
nRet =::CheckMergeSel( rPam );
@@ -2209,15 +2228,15 @@ USHORT SwDoc::MergeTbl( SwPaM& rPam )
}
// --> FME 2004-10-08 #i33394#
- StartUndo( UNDO_TABLE_MERGE, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_TABLE_MERGE, NULL );
// <--
RedlineMode_t eOld = GetRedlineMode();
SetRedlineMode_intern((RedlineMode_t)(eOld | nsRedlineMode_t::REDLINE_IGNORE));
- SwUndoTblMerge* pUndo = 0;
- if( DoesUndo() )
- pUndo = new SwUndoTblMerge( rPam );
+ SwUndoTblMerge *const pUndo( (GetIDocumentUndoRedo().DoesUndo())
+ ? new SwUndoTblMerge( rPam )
+ : 0 );
// lasse ueber das Layout die Boxen suchen
SwSelBoxes aBoxes;
@@ -2230,13 +2249,19 @@ USHORT SwDoc::MergeTbl( SwPaM& rPam )
if( pUndo )
{
delete pUndo;
- if( UNDO_REDLINE == GetUndoIds(NULL, NULL) )
+ SwUndoId nLastUndoId(UNDO_EMPTY);
+ if (GetIDocumentUndoRedo().GetLastUndoInfo(0, & nLastUndoId)
+ && (UNDO_REDLINE == nLastUndoId))
{
- SwUndoRedline* pU = (SwUndoRedline*)RemoveLastUndo( UNDO_REDLINE );
+ // FIXME: why is this horrible cleanup necessary?
+ SwUndoRedline *const pU = dynamic_cast<SwUndoRedline*>(
+ GetUndoManager().RemoveLastUndo());
if( pU->GetRedlSaveCount() )
{
- SwUndoIter aUndoIter( &rPam, UNDO_REDLINE );
- pU->Undo( aUndoIter );
+ SwEditShell *const pEditShell(GetEditShell(0));
+ OSL_ASSERT(pEditShell);
+ ::sw::UndoRedoContext context(*this, *pEditShell);
+ static_cast<SfxUndoAction *>(pU)->UndoWithContext(context);
}
delete pU;
}
@@ -2259,7 +2284,7 @@ USHORT SwDoc::MergeTbl( SwPaM& rPam )
SwPaM* pTmp = &rPam;
while( &rPam != ( pTmp = (SwPaM*)pTmp->GetNext() ))
for( int i = 0; i < 2; ++i )
- pTmp->GetBound( (BOOL)i ) = *rPam.GetPoint();
+ pTmp->GetBound( (sal_Bool)i ) = *rPam.GetPoint();
}
// dann fuege sie zusammen
@@ -2273,7 +2298,9 @@ USHORT SwDoc::MergeTbl( SwPaM& rPam )
SetModified();
SetFieldsDirty( true, NULL, 0 );
if( pUndo )
- AppendUndo( pUndo );
+ {
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
+ }
}
else if( pUndo )
delete pUndo;
@@ -2284,7 +2311,7 @@ USHORT SwDoc::MergeTbl( SwPaM& rPam )
::ClearFEShellTabCols();
SetRedlineMode_intern( eOld );
}
- EndUndo( UNDO_TABLE_MERGE, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_TABLE_MERGE, NULL );
return nRet;
}
@@ -2331,7 +2358,7 @@ void SwTableNode::MakeFrms(const SwNodeIndex & rIdx )
OSL_ENSURE( pNode, "Kein Contentnode oder Copy-Node und neuer Node identisch.");
- BOOL bBefore = rIdx < GetIndex();
+ sal_Bool bBefore = rIdx < GetIndex();
SwNode2Layout aNode2Layout( *this, rIdx.GetIndex() );
@@ -2398,7 +2425,7 @@ void SwTableNode::DelFrms()
SwClient *pLast = aIter.GoStart();
while ( pLast )
{
- BOOL bAgain = FALSE;
+ sal_Bool bAgain = sal_False;
if ( pLast->IsA( TYPE(SwFrm) ) )
{
SwTabFrm *pFrm = (SwTabFrm*)pLast;
@@ -2424,7 +2451,7 @@ void SwTableNode::DelFrms()
// <--
pFrm->Cut();
delete pFrm;
- bAgain = TRUE;
+ bAgain = sal_True;
}
}
pLast = bAgain ? aIter.GoStart() : aIter++;
@@ -2432,7 +2459,7 @@ void SwTableNode::DelFrms()
}
-void SwTableNode::SetNewTable( SwTable* pNewTable, BOOL bNewFrames )
+void SwTableNode::SetNewTable( SwTable* pNewTable, sal_Bool bNewFrames )
{
DelFrms();
delete pTable;
@@ -2467,7 +2494,7 @@ void SwDoc::GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr,
if( pShCrsr )
aPt = pShCrsr->GetPtPos();
- const SwFrm* pTmpFrm = pCNd->GetFrm( &aPt, 0, FALSE );
+ const SwFrm* pTmpFrm = pCNd->GetFrm( &aPt, 0, sal_False );
do {
pTmpFrm = pTmpFrm->GetUpper();
} while ( !pTmpFrm->IsCellFrm() );
@@ -2485,9 +2512,9 @@ void SwDoc::GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr,
//Fix-Punkte setzen, LeftMin in Dokumentkoordinaten die anderen relativ.
SWRECTFN( pTab )
const SwPageFrm* pPage = pTab->FindPageFrm();
- const ULONG nLeftMin = (pTab->Frm().*fnRect->fnGetLeft)() -
+ const sal_uLong nLeftMin = (pTab->Frm().*fnRect->fnGetLeft)() -
(pPage->Frm().*fnRect->fnGetLeft)();
- const ULONG nRightMax = (pTab->Frm().*fnRect->fnGetRight)() -
+ const sal_uLong nRightMax = (pTab->Frm().*fnRect->fnGetRight)() -
(pPage->Frm().*fnRect->fnGetLeft)();
rFill.SetLeftMin ( nLeftMin );
@@ -2516,7 +2543,7 @@ bool FuzzyCompare::operator() ( long s1, long s2 ) const
bool lcl_IsFrmInColumn( const SwCellFrm& rFrm, SwSelBoxes& rBoxes )
{
- for( USHORT i = 0; i < rBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{
if ( rFrm.GetTabBox() == rBoxes[ i ] )
return true;
@@ -2624,7 +2651,7 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* ,
// calculate hidden flags for entry nUpperBorder/nLowerBorder:
long nTmpVal = nUpperBorder;
- for ( BYTE i = 0; i < 2; ++i )
+ for ( sal_uInt8 i = 0; i < 2; ++i )
{
aHiddenIter = aHidden.find( nTmpVal );
if ( aHiddenIter == aHidden.end() )
@@ -2643,7 +2670,7 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* ,
}
// transfer calculated values from BoundaryMap and HiddenMap into rFill:
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
for ( aIter = aBoundaries.begin(); aIter != aBoundaries.end(); ++aIter )
{
const long nTabTop = (pTab->*fnRect->fnGetPrtTop)();
@@ -2667,7 +2694,7 @@ void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* ,
rFill.SetLastRowAllowedToChange( !pTab->HasFollowFlowLine() );
}
-void SwDoc::SetTabCols( const SwTabCols &rNew, BOOL bCurRowOnly,
+void SwDoc::SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly,
const SwCursor* pCrsr, const SwCellFrm* pBoxFrm )
{
const SwTableBox* pBox = 0;
@@ -2689,7 +2716,7 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, BOOL bCurRowOnly,
if( pShCrsr )
aPt = pShCrsr->GetPtPos();
- const SwFrm* pTmpFrm = pCNd->GetFrm( &aPt, 0, FALSE );
+ const SwFrm* pTmpFrm = pCNd->GetFrm( &aPt, 0, sal_False );
do {
pTmpFrm = pTmpFrm->GetUpper();
} while ( !pTmpFrm->IsCellFrm() );
@@ -2728,9 +2755,9 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, BOOL bCurRowOnly,
SwTabCols aOld( rNew.Count() );
const SwPageFrm* pPage = pTab->FindPageFrm();
- const ULONG nLeftMin = (pTab->Frm().*fnRect->fnGetLeft)() -
+ const sal_uLong nLeftMin = (pTab->Frm().*fnRect->fnGetLeft)() -
(pPage->Frm().*fnRect->fnGetLeft)();
- const ULONG nRightMax = (pTab->Frm().*fnRect->fnGetRight)() -
+ const sal_uLong nRightMax = (pTab->Frm().*fnRect->fnGetRight)() -
(pPage->Frm().*fnRect->fnGetLeft)();
//Fix-Punkte setzen, LeftMin in Dokumentkoordinaten die anderen relativ.
@@ -2743,7 +2770,7 @@ void SwDoc::SetTabCols( const SwTabCols &rNew, BOOL bCurRowOnly,
SetTabCols(rTab, rNew, aOld, pBox, bCurRowOnly );
}
-void SwDoc::SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const SwCursor*,
+void SwDoc::SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const SwCursor*,
const SwCellFrm* pBoxFrm )
{
const SwTableBox* pBox;
@@ -2781,17 +2808,17 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const SwCursor*
GetTabRows( aOld, 0, pBoxFrm );
- StartUndo( UNDO_TABLE_ATTR, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_TABLE_ATTR, NULL );
// check for differences between aOld and rNew:
- const USHORT nCount = rNew.Count();
+ const sal_uInt16 nCount = rNew.Count();
const SwTable* pTable = pTab->GetTable();
OSL_ENSURE( pTable, "My colleague told me, this couldn't happen" );
- for ( USHORT i = 0; i <= nCount; ++i )
+ for ( sal_uInt16 i = 0; i <= nCount; ++i )
{
- const USHORT nIdxStt = bVert ? nCount - i : i - 1;
- const USHORT nIdxEnd = bVert ? nCount - i - 1 : i;
+ const sal_uInt16 nIdxStt = bVert ? nCount - i : i - 1;
+ const sal_uInt16 nIdxEnd = bVert ? nCount - i - 1 : i;
const long nOldRowStart = i == 0 ? 0 : aOld[ nIdxStt ];
const long nOldRowEnd = i == nCount ? aOld.GetRight() : aOld[ nIdxEnd ];
@@ -2819,7 +2846,7 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const SwCursor*
if ( pFrm->IsCellFrm() && pFrm->FindTabFrm() == pTab )
{
const long nLowerBorder = (pFrm->Frm().*fnRect->fnGetBottom)();
- const ULONG nTabTop = (pTab->*fnRect->fnGetPrtTop)();
+ const sal_uLong nTabTop = (pTab->*fnRect->fnGetPrtTop)();
if ( abs( (*fnRect->fnYInc)( nTabTop, nOldRowEnd ) - nLowerBorder ) <= ROWFUZZY )
{
if ( !bCurColOnly || pFrm == pBoxFrm )
@@ -2864,7 +2891,7 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const SwCursor*
}
}
- EndUndo( UNDO_TABLE_ATTR, NULL );
+ GetIDocumentUndoRedo().EndUndo( UNDO_TABLE_ATTR, NULL );
::ClearFEShellTabCols();
}
@@ -2873,27 +2900,27 @@ void SwDoc::SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const SwCursor*
* Direktzugriff fuer UNO
* --------------------------------------------------*/
void SwDoc::SetTabCols(SwTable& rTab, const SwTabCols &rNew, const SwTabCols &rOld,
- const SwTableBox *pStart, BOOL bCurRowOnly )
+ const SwTableBox *pStart, sal_Bool bCurRowOnly )
{
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoAttrTbl( *rTab.GetTableNode(), TRUE ));
+ GetIDocumentUndoRedo().AppendUndo(
+ new SwUndoAttrTbl( *rTab.GetTableNode(), sal_True ));
}
rTab.SetTabCols( rNew, rOld, pStart, bCurRowOnly );
::ClearFEShellTabCols();
SetModified();
}
-void SwDoc::SetRowsToRepeat( SwTable &rTable, USHORT nSet )
+void SwDoc::SetRowsToRepeat( SwTable &rTable, sal_uInt16 nSet )
{
if( nSet == rTable.GetRowsToRepeat() )
return;
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoTblHeadline( rTable, rTable.GetRowsToRepeat() , nSet) );
+ GetIDocumentUndoRedo().AppendUndo(
+ new SwUndoTblHeadline(rTable, rTable.GetRowsToRepeat(), nSet) );
}
SwMsgPoolItem aChg( RES_TBLHEADLINECHG );
@@ -2907,7 +2934,7 @@ void SwDoc::SetRowsToRepeat( SwTable &rTable, USHORT nSet )
// Splittet eine Tabelle in der Grund-Zeile, in der der Index steht.
// Alle GrundZeilen dahinter wandern in eine neue Tabelle/-Node.
-// Ist das Flag bCalcNewSize auf TRUE, wird fuer beide neuen Tabellen
+// Ist das Flag bCalcNewSize auf sal_True, wird fuer beide neuen Tabellen
// die neue Size aus dem Max der Boxen errechnet; vorrausgesetzt,
// die Size ist "absolut" gesetzt (USHRT_MAX)
@@ -2922,13 +2949,13 @@ void SwCollectTblLineBoxes::AddBox( const SwTableBox& rBox )
aPosArr.Insert( nWidth, aPosArr.Count() );
SwTableBox* p = (SwTableBox*)&rBox;
aBoxes.Insert( p, aBoxes.Count() );
- nWidth = nWidth + (USHORT)rBox.GetFrmFmt()->GetFrmSize().GetWidth();
+ nWidth = nWidth + (sal_uInt16)rBox.GetFrmFmt()->GetFrmSize().GetWidth();
}
const SwTableBox* SwCollectTblLineBoxes::GetBoxOfPos( const SwTableBox& rBox )
{
const SwTableBox* pRet = 0;
- USHORT n;
+ sal_uInt16 n;
if( aPosArr.Count() )
{
@@ -2945,15 +2972,15 @@ const SwTableBox* SwCollectTblLineBoxes::GetBoxOfPos( const SwTableBox& rBox )
if( n >= aPosArr.Count() )
--n;
- nWidth = nWidth + (USHORT)rBox.GetFrmFmt()->GetFrmSize().GetWidth();
+ nWidth = nWidth + (sal_uInt16)rBox.GetFrmFmt()->GetFrmSize().GetWidth();
pRet = aBoxes[ n ];
}
return pRet;
}
-BOOL SwCollectTblLineBoxes::Resize( USHORT nOffset, USHORT nOldWidth )
+sal_Bool SwCollectTblLineBoxes::Resize( sal_uInt16 nOffset, sal_uInt16 nOldWidth )
{
- USHORT n;
+ sal_uInt16 n;
if( aPosArr.Count() )
{
@@ -2973,29 +3000,29 @@ BOOL SwCollectTblLineBoxes::Resize( USHORT nOffset, USHORT nOldWidth )
// dann die Positionen der neuen Size anpassen
for( n = 0; n < aPosArr.Count(); ++n )
{
- ULONG nSize = nWidth;
+ sal_uLong nSize = nWidth;
nSize *= ( aPosArr[ n ] - nOffset );
nSize /= nOldWidth;
- aPosArr[ n ] = USHORT( nSize );
+ aPosArr[ n ] = sal_uInt16( nSize );
}
}
return 0 != aPosArr.Count();
}
-BOOL lcl_Line_CollectBox( const SwTableLine*& rpLine, void* pPara )
+sal_Bool lcl_Line_CollectBox( const SwTableLine*& rpLine, void* pPara )
{
SwCollectTblLineBoxes* pSplPara = (SwCollectTblLineBoxes*)pPara;
if( pSplPara->IsGetValues() )
((SwTableLine*)rpLine)->GetTabBoxes().ForEach( &lcl_Box_CollectBox, pPara );
else
((SwTableLine*)rpLine)->GetTabBoxes().ForEach( &lcl_BoxSetSplitBoxFmts, pPara );
- return TRUE;
+ return sal_True;
}
-BOOL lcl_Box_CollectBox( const SwTableBox*& rpBox, void* pPara )
+sal_Bool lcl_Box_CollectBox( const SwTableBox*& rpBox, void* pPara )
{
SwCollectTblLineBoxes* pSplPara = (SwCollectTblLineBoxes*)pPara;
- USHORT nLen = rpBox->GetTabLines().Count();
+ sal_uInt16 nLen = rpBox->GetTabLines().Count();
if( nLen )
{
// dann mit der richtigen Line weitermachen
@@ -3009,13 +3036,13 @@ BOOL lcl_Box_CollectBox( const SwTableBox*& rpBox, void* pPara )
}
else
pSplPara->AddBox( *rpBox );
- return TRUE;
+ return sal_True;
}
-BOOL lcl_BoxSetSplitBoxFmts( const SwTableBox*& rpBox, void* pPara )
+sal_Bool lcl_BoxSetSplitBoxFmts( const SwTableBox*& rpBox, void* pPara )
{
SwCollectTblLineBoxes* pSplPara = (SwCollectTblLineBoxes*)pPara;
- USHORT nLen = rpBox->GetTabLines().Count();
+ sal_uInt16 nLen = rpBox->GetTabLines().Count();
if( nLen )
{
// dann mit der richtigen Line weitermachen
@@ -3046,7 +3073,7 @@ BOOL lcl_BoxSetSplitBoxFmts( const SwTableBox*& rpBox, void* pPara )
}
else
{
-USHORT aTableSplitBoxSetRange[] = {
+sal_uInt16 aTableSplitBoxSetRange[] = {
RES_LR_SPACE, RES_UL_SPACE,
RES_BACKGROUND, RES_SHADOW,
RES_PROTECT, RES_PROTECT,
@@ -3080,12 +3107,12 @@ USHORT aTableSplitBoxSetRange[] = {
pBox->GetSttNd()->CheckSectionCondColl();
}
}
- return TRUE;
+ return sal_True;
}
-BOOL SwDoc::SplitTable( const SwPosition& rPos, USHORT eHdlnMode,
- BOOL bCalcNewSize )
+sal_Bool SwDoc::SplitTable( const SwPosition& rPos, sal_uInt16 eHdlnMode,
+ sal_Bool bCalcNewSize )
{
SwNode* pNd = &rPos.nNode.GetNode();
SwTableNode* pTNd = pNd->FindTableNode();
@@ -3093,7 +3120,7 @@ BOOL SwDoc::SplitTable( const SwPosition& rPos, USHORT eHdlnMode,
return 0;
if( pTNd->GetTable().ISA( SwDDETable ))
- return FALSE;
+ return sal_False;
SwTable& rTbl = pTNd->GetTable();
rTbl.SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
@@ -3101,11 +3128,13 @@ BOOL SwDoc::SplitTable( const SwPosition& rPos, USHORT eHdlnMode,
SwTableFmlUpdate aMsgHnt( &rTbl );
SwHistory aHistory;
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
+ {
aMsgHnt.pHistory = &aHistory;
+ }
{
- ULONG nSttIdx = pNd->FindTableBoxStartNode()->GetIndex();
+ sal_uLong nSttIdx = pNd->FindTableBoxStartNode()->GetIndex();
// Suche die Grund-Line dieser Box:
SwTableBox* pBox = rTbl.GetTblBox( nSttIdx );
@@ -3130,16 +3159,17 @@ BOOL SwDoc::SplitTable( const SwPosition& rPos, USHORT eHdlnMode,
aFndBox.SetTableLines( rTbl );
aFndBox.DelFrms( rTbl );
- SwTableNode* pNew = GetNodes().SplitTable( rPos.nNode, FALSE, bCalcNewSize );
+ SwTableNode* pNew = GetNodes().SplitTable( rPos.nNode, sal_False, bCalcNewSize );
if( pNew )
{
SwSaveRowSpan* pSaveRowSp = pNew->GetTable().CleanUpTopRowSpan( rTbl.GetTabLines().Count() );
SwUndoSplitTbl* pUndo = 0;
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( pUndo = new SwUndoSplitTbl( *pNew, pSaveRowSp, eHdlnMode, bCalcNewSize ));
+ pUndo = new SwUndoSplitTbl(
+ *pNew, pSaveRowSp, eHdlnMode, bCalcNewSize);
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
if( aHistory.Count() )
pUndo->SaveFormula( aHistory );
}
@@ -3150,12 +3180,12 @@ BOOL SwDoc::SplitTable( const SwPosition& rPos, USHORT eHdlnMode,
// an der aktuellen als obere
case HEADLINE_BORDERCOPY:
{
- SwCollectTblLineBoxes aPara( FALSE, eHdlnMode );
+ SwCollectTblLineBoxes aPara( sal_False, eHdlnMode );
SwTableLine* pLn = rTbl.GetTabLines()[
rTbl.GetTabLines().Count() - 1 ];
pLn->GetTabBoxes().ForEach( &lcl_Box_CollectBox, &aPara );
- aPara.SetValues( TRUE );
+ aPara.SetValues( sal_True );
pLn = pNew->GetTable().GetTabLines()[ 0 ];
pLn->GetTabBoxes().ForEach( &lcl_BoxSetSplitBoxFmts, &aPara );
@@ -3172,11 +3202,11 @@ BOOL SwDoc::SplitTable( const SwPosition& rPos, USHORT eHdlnMode,
if( HEADLINE_BOXATRCOLLCOPY == eHdlnMode && pUndo )
pHst = pUndo->GetHistory();
- SwCollectTblLineBoxes aPara( TRUE, eHdlnMode, pHst );
+ SwCollectTblLineBoxes aPara( sal_True, eHdlnMode, pHst );
SwTableLine* pLn = rTbl.GetTabLines()[ 0 ];
pLn->GetTabBoxes().ForEach( &lcl_Box_CollectBox, &aPara );
- aPara.SetValues( TRUE );
+ aPara.SetValues( sal_True );
pLn = pNew->GetTable().GetTabLines()[ 0 ];
pLn->GetTabBoxes().ForEach( &lcl_BoxSetSplitBoxFmts, &aPara );
}
@@ -3215,7 +3245,7 @@ BOOL SwDoc::SplitTable( const SwPosition& rPos, USHORT eHdlnMode,
return 0 != pNew;
}
-BOOL lcl_ChgTblSize( SwTable& rTbl )
+sal_Bool lcl_ChgTblSize( SwTable& rTbl )
{
// das Attribut darf nicht ueber das Modify an der
// Tabelle gesetzt werden, denn sonst werden alle
@@ -3224,19 +3254,19 @@ BOOL lcl_ChgTblSize( SwTable& rTbl )
SwFmtFrmSize aTblMaxSz( pFmt->GetFrmSize() );
if( USHRT_MAX == aTblMaxSz.GetWidth() )
- return FALSE;
+ return sal_False;
- BOOL bLocked = pFmt->IsModifyLocked();
+ sal_Bool bLocked = pFmt->IsModifyLocked();
pFmt->LockModify();
aTblMaxSz.SetWidth( 0 );
SwTableLines& rLns = rTbl.GetTabLines();
- for( USHORT nLns = 0; nLns < rLns.Count(); ++nLns )
+ for( sal_uInt16 nLns = 0; nLns < rLns.Count(); ++nLns )
{
SwTwips nMaxLnWidth = 0;
SwTableBoxes& rBoxes = rLns[ nLns ]->GetTabBoxes();
- for( USHORT nBox = 0; nBox < rBoxes.Count(); ++nBox )
+ for( sal_uInt16 nBox = 0; nBox < rBoxes.Count(); ++nBox )
nMaxLnWidth += rBoxes[nBox]->GetFrmFmt()->GetFrmSize().GetWidth();
if( nMaxLnWidth > aTblMaxSz.GetWidth() )
@@ -3246,7 +3276,7 @@ BOOL lcl_ChgTblSize( SwTable& rTbl )
if( !bLocked ) // und gegebenenfalls Lock wieder freigeben
pFmt->UnlockModify();
- return TRUE;
+ return sal_True;
}
class _SplitTable_Para
@@ -3259,7 +3289,7 @@ public:
_SplitTable_Para( SwTableNode* pNew, SwTable& rOld )
: aSrc( 16, 16 ), aDest( 16, 16 ), pNewTblNd( pNew ), rOldTbl( rOld )
{}
- USHORT SrcFmt_GetPos( void* pFmt ) const
+ sal_uInt16 SrcFmt_GetPos( void* pFmt ) const
{ return aSrc.GetPos( pFmt ); }
void DestFmt_Insert( void* pFmt )
@@ -3268,7 +3298,7 @@ public:
void SrcFmt_Insert( void* pFmt )
{ aSrc.Insert( pFmt, aSrc.Count() ); }
- SwFrmFmt* DestFmt_Get( USHORT nPos ) const
+ SwFrmFmt* DestFmt_Get( sal_uInt16 nPos ) const
{ return (SwFrmFmt*)aDest[ nPos ]; }
void ChgBox( SwTableBox* pBox )
@@ -3279,15 +3309,15 @@ public:
};
-BOOL lcl_SplitTable_CpyBox( const SwTableBox*& rpBox, void* pPara );
+sal_Bool lcl_SplitTable_CpyBox( const SwTableBox*& rpBox, void* pPara );
-BOOL lcl_SplitTable_CpyLine( const SwTableLine*& rpLine, void* pPara )
+sal_Bool lcl_SplitTable_CpyLine( const SwTableLine*& rpLine, void* pPara )
{
SwTableLine* pLn = (SwTableLine*)rpLine;
_SplitTable_Para& rPara = *(_SplitTable_Para*)pPara;
SwFrmFmt *pSrcFmt = pLn->GetFrmFmt();
- USHORT nPos = rPara.SrcFmt_GetPos( pSrcFmt );
+ sal_uInt16 nPos = rPara.SrcFmt_GetPos( pSrcFmt );
if( USHRT_MAX == nPos )
{
rPara.DestFmt_Insert( pLn->ClaimFrmFmt() );
@@ -3297,16 +3327,16 @@ BOOL lcl_SplitTable_CpyLine( const SwTableLine*& rpLine, void* pPara )
pLn->ChgFrmFmt( (SwTableLineFmt*)rPara.DestFmt_Get( nPos ) );
pLn->GetTabBoxes().ForEach( &lcl_SplitTable_CpyBox, pPara );
- return TRUE;
+ return sal_True;
}
-BOOL lcl_SplitTable_CpyBox( const SwTableBox*& rpBox, void* pPara )
+sal_Bool lcl_SplitTable_CpyBox( const SwTableBox*& rpBox, void* pPara )
{
SwTableBox* pBox = (SwTableBox*)rpBox;
_SplitTable_Para& rPara = *(_SplitTable_Para*)pPara;
SwFrmFmt *pSrcFmt = pBox->GetFrmFmt();
- USHORT nPos = rPara.SrcFmt_GetPos( pSrcFmt );
+ sal_uInt16 nPos = rPara.SrcFmt_GetPos( pSrcFmt );
if( USHRT_MAX == nPos )
{
rPara.DestFmt_Insert( pBox->ClaimFrmFmt() );
@@ -3319,18 +3349,18 @@ BOOL lcl_SplitTable_CpyBox( const SwTableBox*& rpBox, void* pPara )
rPara.ChgBox( pBox );
else
pBox->GetTabLines().ForEach( &lcl_SplitTable_CpyLine, pPara );
- return TRUE;
+ return sal_True;
}
-SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, BOOL bAfter,
- BOOL bCalcNewSize )
+SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, sal_Bool bAfter,
+ sal_Bool bCalcNewSize )
{
SwNode* pNd = &rPos.GetNode();
SwTableNode* pTNd = pNd->FindTableNode();
if( !pTNd || pNd->IsTableNode() )
return 0;
- ULONG nSttIdx = pNd->FindTableBoxStartNode()->GetIndex();
+ sal_uLong nSttIdx = pNd->FindTableBoxStartNode()->GetIndex();
// Suche die Grund-Line dieser Box:
SwTable& rTbl = pTNd->GetTable();
@@ -3343,7 +3373,7 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, BOOL bAfter,
pLine = pLine->GetUpper()->GetUpper();
// in pLine steht jetzt die GrundLine.
- USHORT nLinePos = rTbl.GetTabLines().C40_GETPOS( SwTableLine, pLine );
+ sal_uInt16 nLinePos = rTbl.GetTabLines().C40_GETPOS( SwTableLine, pLine );
if( USHRT_MAX == nLinePos ||
( bAfter ? ++nLinePos >= rTbl.GetTabLines().Count() : !nLinePos ))
return 0; // nicht gefunden oder letze Line !!
@@ -3388,20 +3418,20 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, BOOL bAfter,
SwChartDataProvider *pPCD = rTbl.GetFrmFmt()->getIDocumentChartDataProviderAccess()->GetChartDataProvider();
if( pPCD )
{
- for (USHORT k = nLinePos; k < rTbl.GetTabLines().Count(); ++k)
+ for (sal_uInt16 k = nLinePos; k < rTbl.GetTabLines().Count(); ++k)
{
- USHORT nLineIdx = (rTbl.GetTabLines().Count() - 1) - k + nLinePos;
- USHORT nBoxCnt = rTbl.GetTabLines()[ nLineIdx ]->GetTabBoxes().Count();
- for (USHORT j = 0; j < nBoxCnt; ++j)
+ sal_uInt16 nLineIdx = (rTbl.GetTabLines().Count() - 1) - k + nLinePos;
+ sal_uInt16 nBoxCnt = rTbl.GetTabLines()[ nLineIdx ]->GetTabBoxes().Count();
+ for (sal_uInt16 j = 0; j < nBoxCnt; ++j)
{
- USHORT nIdx = nBoxCnt - 1 - j;
+ sal_uInt16 nIdx = nBoxCnt - 1 - j;
pPCD->DeleteBox( &rTbl, *rTbl.GetTabLines()[ nLineIdx ]->GetTabBoxes()[nIdx] );
}
}
}
//
// ...und loeschen
- USHORT nDeleted = rTbl.GetTabLines().Count() - nLinePos;
+ sal_uInt16 nDeleted = rTbl.GetTabLines().Count() - nLinePos;
rTbl.GetTabLines().Remove( nLinePos, nDeleted );
// und die betr. Boxen verschieben. Dabei die Formate eindeutig
@@ -3436,11 +3466,11 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, BOOL bAfter,
// und die Umkehrung davon. rPos muss in der Tabelle stehen, die bestehen
// bleibt. Das Flag besagt ob die aktuelle mit der davor oder dahinter
// stehenden vereint wird.
-BOOL SwDoc::MergeTable( const SwPosition& rPos, BOOL bWithPrev, USHORT nMode )
+sal_Bool SwDoc::MergeTable( const SwPosition& rPos, sal_Bool bWithPrev, sal_uInt16 nMode )
{
SwTableNode* pTblNd = rPos.nNode.GetNode().FindTableNode(), *pDelTblNd;
if( !pTblNd )
- return FALSE;
+ return sal_False;
SwNodes& rNds = GetNodes();
if( bWithPrev )
@@ -3448,11 +3478,11 @@ BOOL SwDoc::MergeTable( const SwPosition& rPos, BOOL bWithPrev, USHORT nMode )
else
pDelTblNd = rNds[ pTblNd->EndOfSectionIndex() + 1 ]->GetTableNode();
if( !pDelTblNd )
- return FALSE;
+ return sal_False;
if( pTblNd->GetTable().ISA( SwDDETable ) ||
pDelTblNd->GetTable().ISA( SwDDETable ))
- return FALSE;
+ return sal_False;
// MIB 9.7.97: HTML-Layout loeschen
pTblNd->GetTable().SetHTMLTableLayout( 0 );
@@ -3461,11 +3491,10 @@ BOOL SwDoc::MergeTable( const SwPosition& rPos, BOOL bWithPrev, USHORT nMode )
// beide Tabellen vorhanden, also kanns losgehen
SwUndoMergeTbl* pUndo = 0;
SwHistory* pHistory = 0;
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( pUndo = new SwUndoMergeTbl( *pTblNd, *pDelTblNd,
- bWithPrev, nMode ));
+ pUndo = new SwUndoMergeTbl( *pTblNd, *pDelTblNd, bWithPrev, nMode );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
pHistory = new SwHistory;
}
@@ -3478,7 +3507,7 @@ BOOL SwDoc::MergeTable( const SwPosition& rPos, BOOL bWithPrev, USHORT nMode )
// das eigentliche Mergen
SwNodeIndex aIdx( bWithPrev ? *pTblNd : *pDelTblNd );
- BOOL bRet = rNds.MergeTable( aIdx, !bWithPrev, nMode, pHistory );
+ sal_Bool bRet = rNds.MergeTable( aIdx, !bWithPrev, nMode, pHistory );
if( pHistory )
{
@@ -3494,8 +3523,8 @@ BOOL SwDoc::MergeTable( const SwPosition& rPos, BOOL bWithPrev, USHORT nMode )
return bRet;
}
-BOOL SwNodes::MergeTable( const SwNodeIndex& rPos, BOOL bWithPrev,
- USHORT nMode, SwHistory* )
+sal_Bool SwNodes::MergeTable( const SwNodeIndex& rPos, sal_Bool bWithPrev,
+ sal_uInt16 nMode, SwHistory* )
{
SwTableNode* pDelTblNd = rPos.GetNode().GetTableNode();
OSL_ENSURE( pDelTblNd, "wo ist der TableNode geblieben?" );
@@ -3504,7 +3533,7 @@ BOOL SwNodes::MergeTable( const SwNodeIndex& rPos, BOOL bWithPrev,
OSL_ENSURE( pTblNd, "wo ist der TableNode geblieben?" );
if( !pDelTblNd || !pTblNd )
- return FALSE;
+ return sal_False;
pDelTblNd->DelFrms();
@@ -3557,12 +3586,12 @@ BOOL SwNodes::MergeTable( const SwNodeIndex& rPos, BOOL bWithPrev,
}
// die Lines und Boxen ruebermoven
- USHORT nOldSize = rTbl.GetTabLines().Count();
+ sal_uInt16 nOldSize = rTbl.GetTabLines().Count();
rTbl.GetTabLines().Insert( &rDelTbl.GetTabLines(), nOldSize );
rDelTbl.GetTabLines().Remove( 0, rDelTbl.GetTabLines().Count() );
rTbl.GetTabSortBoxes().Insert( &rDelTbl.GetTabSortBoxes() );
- rDelTbl.GetTabSortBoxes().Remove( (USHORT)0, rDelTbl.GetTabSortBoxes().Count() );
+ rDelTbl.GetTabSortBoxes().Remove( (sal_uInt16)0, rDelTbl.GetTabSortBoxes().Count() );
// die vordere Tabelle bleibt immer stehen, die hintere wird geloescht
SwEndNode* pTblEndNd = pDelTblNd->EndOfSectionNode();
@@ -3602,7 +3631,7 @@ BOOL SwNodes::MergeTable( const SwNodeIndex& rPos, BOOL bWithPrev,
//Layout updaten
aFndBox.MakeFrms( rTbl );
- return TRUE;
+ return sal_True;
}
// -------------------------------------------------------------------
@@ -3613,8 +3642,8 @@ struct _SetAFmtTabPara
{
SwTableAutoFmt& rTblFmt;
SwUndoTblAutoFmt* pUndo;
- USHORT nEndBox, nCurBox;
- BYTE nAFmtLine, nAFmtBox;
+ sal_uInt16 nEndBox, nCurBox;
+ sal_uInt8 nAFmtLine, nAFmtBox;
_SetAFmtTabPara( const SwTableAutoFmt& rNew )
: rTblFmt( (SwTableAutoFmt&)rNew ), pUndo( 0 ),
@@ -3624,16 +3653,16 @@ struct _SetAFmtTabPara
// forward deklarieren damit sich die Lines und Boxen rekursiv aufrufen
// koennen.
-BOOL lcl_SetAFmtBox( const _FndBox*&, void *pPara );
-BOOL lcl_SetAFmtLine( const _FndLine*&, void *pPara );
+sal_Bool lcl_SetAFmtBox( const _FndBox*&, void *pPara );
+sal_Bool lcl_SetAFmtLine( const _FndLine*&, void *pPara );
-BOOL lcl_SetAFmtLine( const _FndLine*& rpLine, void *pPara )
+sal_Bool lcl_SetAFmtLine( const _FndLine*& rpLine, void *pPara )
{
((_FndLine*&)rpLine)->GetBoxes().ForEach( &lcl_SetAFmtBox, pPara );
- return TRUE;
+ return sal_True;
}
-BOOL lcl_SetAFmtBox( const _FndBox*& rpBox, void *pPara )
+sal_Bool lcl_SetAFmtBox( const _FndBox*& rpBox, void *pPara )
{
_SetAFmtTabPara* pSetPara = (_SetAFmtTabPara*)pPara;
@@ -3644,7 +3673,7 @@ BOOL lcl_SetAFmtBox( const _FndBox*& rpBox, void *pPara )
else if( pSetPara->nCurBox == pSetPara->nEndBox )
pSetPara->nAFmtBox = 3;
else
- pSetPara->nAFmtBox = (BYTE)(1 + ((pSetPara->nCurBox-1) & 1));
+ pSetPara->nAFmtBox = (sal_uInt8)(1 + ((pSetPara->nCurBox-1) & 1));
}
if( rpBox->GetBox()->GetSttNd() )
@@ -3653,16 +3682,16 @@ BOOL lcl_SetAFmtBox( const _FndBox*& rpBox, void *pPara )
SwDoc* pDoc = pSetBox->GetFrmFmt()->GetDoc();
SfxItemSet aCharSet( pDoc->GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1 );
SfxItemSet aBoxSet( pDoc->GetAttrPool(), aTableBoxSetRange );
- BYTE nPos = pSetPara->nAFmtLine * 4 + pSetPara->nAFmtBox;
+ sal_uInt8 nPos = pSetPara->nAFmtLine * 4 + pSetPara->nAFmtBox;
pSetPara->rTblFmt.UpdateToSet( nPos, aCharSet,
SwTableAutoFmt::UPDATE_CHAR, 0 );
pSetPara->rTblFmt.UpdateToSet( nPos, aBoxSet,
SwTableAutoFmt::UPDATE_BOX,
- pDoc->GetNumberFormatter( TRUE ) );
+ pDoc->GetNumberFormatter( sal_True ) );
if( aCharSet.Count() )
{
- ULONG nSttNd = pSetBox->GetSttIdx()+1;
- ULONG nEndNd = pSetBox->GetSttNd()->EndOfSectionIndex();
+ sal_uLong nSttNd = pSetBox->GetSttIdx()+1;
+ sal_uLong nEndNd = pSetBox->GetSttNd()->EndOfSectionIndex();
for( ; nSttNd < nEndNd; ++nSttNd )
{
SwCntntNode* pNd = pDoc->GetNodes()[ nSttNd ]->GetCntntNode();
@@ -3685,17 +3714,17 @@ BOOL lcl_SetAFmtBox( const _FndBox*& rpBox, void *pPara )
if( !rpBox->GetUpper()->GetUpper() ) // eine BaseLine
++pSetPara->nCurBox;
- return TRUE;
+ return sal_True;
}
// AutoFormat fuer die Tabelle/TabellenSelection
-BOOL SwDoc::SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNew )
+sal_Bool SwDoc::SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNew )
{
OSL_ENSURE( rBoxes.Count(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// suche alle Boxen / Lines
_FndBox aFndBox( 0, 0 );
@@ -3704,7 +3733,7 @@ BOOL SwDoc::SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNe
pTblNd->GetTable().GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
pTblNd->GetTable().SetHTMLTableLayout( 0 );
@@ -3719,18 +3748,19 @@ BOOL SwDoc::SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNe
// Undo abschalten, Attribute werden sich vorher gemerkt
SwUndoTblAutoFmt* pUndo = 0;
- if( DoesUndo() )
+ bool const bUndo(GetIDocumentUndoRedo().DoesUndo());
+ if (bUndo)
{
- ClearRedo();
- AppendUndo( pUndo = new SwUndoTblAutoFmt( *pTblNd, rNew ) );
- DoUndo( FALSE );
+ pUndo = new SwUndoTblAutoFmt( *pTblNd, rNew );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
+ GetIDocumentUndoRedo().DoUndo(false);
}
_SetAFmtTabPara aPara( rNew );
_FndLines& rFLns = pFndBox->GetLines();
_FndLine* pLine;
- for( USHORT n = 0; n < rFLns.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFLns.Count(); ++n )
{
pLine = rFLns[n];
@@ -3743,7 +3773,7 @@ BOOL SwDoc::SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNe
else if( n+1 == rFLns.Count() )
aPara.nAFmtLine = 3;
else
- aPara.nAFmtLine = (BYTE)(1 + ((n-1) & 1 ));
+ aPara.nAFmtLine = (sal_uInt8)(1 + ((n-1) & 1 ));
aPara.nAFmtBox = 0;
aPara.nCurBox = 0;
@@ -3755,22 +3785,24 @@ BOOL SwDoc::SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNe
}
if( pUndo )
- DoUndo( TRUE );
+ {
+ GetIDocumentUndoRedo().DoUndo(bUndo);
+ }
SetModified();
SetFieldsDirty( true, NULL, 0 );
- return TRUE;
+ return sal_True;
}
// Erfrage wie attributiert ist
-BOOL SwDoc::GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet )
+sal_Bool SwDoc::GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet )
{
OSL_ENSURE( rBoxes.Count(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
- return FALSE;
+ return sal_False;
// suche alle Boxen / Lines
_FndBox aFndBox( 0, 0 );
@@ -3779,7 +3811,7 @@ BOOL SwDoc::GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet )
pTblNd->GetTable().GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
}
if( !aFndBox.GetLines().Count() )
- return FALSE;
+ return sal_False;
_FndBox* pFndBox = &aFndBox;
while( 1 == pFndBox->GetLines().Count() &&
@@ -3791,30 +3823,30 @@ BOOL SwDoc::GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet )
_FndLines& rFLns = pFndBox->GetLines();
- USHORT aLnArr[4];
+ sal_uInt16 aLnArr[4];
aLnArr[0] = 0;
aLnArr[1] = 1 < rFLns.Count() ? 1 : 0;
aLnArr[2] = 2 < rFLns.Count() ? 2 : aLnArr[1];
aLnArr[3] = rFLns.Count() - 1;
- for( BYTE nLine = 0; nLine < 4; ++nLine )
+ for( sal_uInt8 nLine = 0; nLine < 4; ++nLine )
{
_FndLine& rLine = *rFLns[ aLnArr[ nLine ] ];
- USHORT aBoxArr[4];
+ sal_uInt16 aBoxArr[4];
aBoxArr[0] = 0;
aBoxArr[1] = 1 < rLine.GetBoxes().Count() ? 1 : 0;
aBoxArr[2] = 2 < rLine.GetBoxes().Count() ? 2 : aBoxArr[1];
aBoxArr[3] = rLine.GetBoxes().Count() - 1;
- for( BYTE nBox = 0; nBox < 4; ++nBox )
+ for( sal_uInt8 nBox = 0; nBox < 4; ++nBox )
{
SwTableBox* pFBox = rLine.GetBoxes()[ aBoxArr[ nBox ] ]->GetBox();
// immer auf die 1. runterfallen
while( !pFBox->GetSttNd() )
pFBox = pFBox->GetTabLines()[0]->GetTabBoxes()[0];
- BYTE nPos = nLine * 4 + nBox;
+ sal_uInt8 nPos = nLine * 4 + nBox;
SwNodeIndex aIdx( *pFBox->GetSttNd(), 1 );
SwCntntNode* pCNd = aIdx.GetNode().GetCntntNode();
if( !pCNd )
@@ -3825,11 +3857,11 @@ BOOL SwDoc::GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet )
SwTableAutoFmt::UPDATE_CHAR, 0 );
rGet.UpdateFromSet( nPos, pFBox->GetFrmFmt()->GetAttrSet(),
SwTableAutoFmt::UPDATE_BOX,
- GetNumberFormatter( TRUE ) );
+ GetNumberFormatter( sal_True ) );
}
}
- return TRUE;
+ return sal_True;
}
String SwDoc::GetUniqueTblName() const
@@ -3838,10 +3870,10 @@ String SwDoc::GetUniqueTblName() const
String aName( aId );
xub_StrLen nNmLen = aName.Len();
- USHORT nNum, nTmp, nFlagSize = ( pTblFrmFmtTbl->Count() / 8 ) +2;
- USHORT n;
+ sal_uInt16 nNum, nTmp, nFlagSize = ( pTblFrmFmtTbl->Count() / 8 ) +2;
+ sal_uInt16 n;
- BYTE* pSetFlags = new BYTE[ nFlagSize ];
+ sal_uInt8* pSetFlags = new sal_uInt8[ nFlagSize ];
memset( pSetFlags, 0, nFlagSize );
for( n = 0; n < pTblFrmFmtTbl->Count(); ++n )
@@ -3851,7 +3883,7 @@ String SwDoc::GetUniqueTblName() const
pFmt->GetName().Match( aName ) == nNmLen )
{
// Nummer bestimmen und das Flag setzen
- nNum = static_cast<USHORT>(pFmt->GetName().Copy( nNmLen ).ToInt32());
+ nNum = static_cast<sal_uInt16>(pFmt->GetName().Copy( nNmLen ).ToInt32());
if( nNum-- && nNum < pTblFrmFmtTbl->Count() )
pSetFlags[ nNum / 8 ] |= (0x01 << ( nNum & 0x07 ));
}
@@ -3873,7 +3905,7 @@ String SwDoc::GetUniqueTblName() const
return aName += String::CreateFromInt32( ++nNum );
}
-SwTableFmt* SwDoc::FindTblFmtByName( const String& rName, BOOL bAll ) const
+SwTableFmt* SwDoc::FindTblFmtByName( const String& rName, sal_Bool bAll ) const
{
const SwFmt* pRet = 0;
if( bAll )
@@ -3881,7 +3913,7 @@ SwTableFmt* SwDoc::FindTblFmtByName( const String& rName, BOOL bAll ) const
else
{
// dann nur die, die im Doc gesetzt sind
- for( USHORT n = 0; n < pTblFrmFmtTbl->Count(); ++n )
+ for( sal_uInt16 n = 0; n < pTblFrmFmtTbl->Count(); ++n )
{
const SwFrmFmt* pFmt = (*pTblFrmFmtTbl)[ n ];
if( !pFmt->IsDefault() && IsUsed( *pFmt ) &&
@@ -3895,20 +3927,21 @@ SwTableFmt* SwDoc::FindTblFmtByName( const String& rName, BOOL bAll ) const
return (SwTableFmt*)pRet;
}
-BOOL SwDoc::SetColRowWidthHeight( SwTableBox& rAktBox, USHORT eType,
+sal_Bool SwDoc::SetColRowWidthHeight( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff )
{
SwTableNode* pTblNd = (SwTableNode*)rAktBox.GetSttNd()->FindTableNode();
SwUndo* pUndo = 0;
if( nsTblChgWidthHeightType::WH_FLAG_INSDEL & eType && pTblNd->GetTable().ISA( SwDDETable ))
- return FALSE;
+ return sal_False;
SwTableFmlUpdate aMsgHnt( &pTblNd->GetTable() );
aMsgHnt.eFlags = TBL_BOXPTR;
UpdateTblFlds( &aMsgHnt );
- BOOL bRet = FALSE;
+ bool const bUndo(GetIDocumentUndoRedo().DoesUndo());
+ sal_Bool bRet = sal_False;
switch( eType & 0xff )
{
case nsTblChgWidthHeightType::WH_COL_LEFT:
@@ -3918,7 +3951,7 @@ BOOL SwDoc::SetColRowWidthHeight( SwTableBox& rAktBox, USHORT eType,
{
bRet = pTblNd->GetTable().SetColWidth( rAktBox,
eType, nAbsDiff, nRelDiff,
- DoesUndo() ? &pUndo : 0 );
+ (bUndo) ? &pUndo : 0 );
}
break;
case nsTblChgWidthHeightType::WH_ROW_TOP:
@@ -3927,15 +3960,14 @@ BOOL SwDoc::SetColRowWidthHeight( SwTableBox& rAktBox, USHORT eType,
case nsTblChgWidthHeightType::WH_CELL_BOTTOM:
bRet = pTblNd->GetTable().SetRowHeight( rAktBox,
eType, nAbsDiff, nRelDiff,
- DoesUndo() ? &pUndo : 0 );
+ (bUndo) ? &pUndo : 0 );
break;
}
+ GetIDocumentUndoRedo().DoUndo(bUndo); // SetColWidth can turn it off
if( pUndo )
{
- ClearRedo();
- AppendUndo( pUndo );
- DoUndo( TRUE ); // im SetColWidth kann es abgeschaltet werden!
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
}
if( bRet )
@@ -3948,30 +3980,30 @@ BOOL SwDoc::SetColRowWidthHeight( SwTableBox& rAktBox, USHORT eType,
}
-void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, BOOL bCallUpdate )
+void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, sal_Bool bCallUpdate )
{
//JP 09.07.97: Optimierung: wenn die Box schon sagt, das es Text
// sein soll, dann bleibt das auch Text!
const SfxPoolItem* pNumFmtItem = 0;
if( SFX_ITEM_SET == rBox.GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT,
- FALSE, &pNumFmtItem ) && GetNumberFormatter()->IsTextFormat(
+ sal_False, &pNumFmtItem ) && GetNumberFormatter()->IsTextFormat(
((SwTblBoxNumFormat*)pNumFmtItem)->GetValue() ))
return ;
SwUndoTblNumFmt* pUndo = 0;
- BOOL bIsEmptyTxtNd, bChgd = TRUE;
+ sal_Bool bIsEmptyTxtNd, bChgd = sal_True;
sal_uInt32 nFmtIdx;
double fNumber;
if( rBox.HasNumCntnt( fNumber, nFmtIdx, bIsEmptyTxtNd ) )
{
if( !rBox.IsNumberChanged() )
- bChgd = FALSE;
+ bChgd = sal_False;
else
{
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- StartUndo( UNDO_TABLE_AUTOFMT, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_TABLE_AUTOFMT, NULL );
pUndo = new SwUndoTblNumFmt( rBox );
pUndo->SetNumFmt( nFmtIdx, fNumber );
}
@@ -3979,16 +4011,16 @@ void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, BOOL bCallUpdate )
SwTableBoxFmt* pBoxFmt = (SwTableBoxFmt*)rBox.GetFrmFmt();
SfxItemSet aBoxSet( GetAttrPool(), RES_BOXATR_FORMAT, RES_BOXATR_VALUE );
- BOOL bSetNumFmt = IsInsTblFormatNum(), bLockModify = TRUE;
+ sal_Bool bSetNumFmt = IsInsTblFormatNum(), bLockModify = sal_True;
if( bSetNumFmt )
{
if( !IsInsTblChangeNumFormat() )
{
if( !pNumFmtItem )
- bSetNumFmt = FALSE;
+ bSetNumFmt = sal_False;
else
{
- ULONG nOldNumFmt = ((SwTblBoxNumFormat*)pNumFmtItem)->
+ sal_uLong nOldNumFmt = ((SwTblBoxNumFormat*)pNumFmtItem)->
GetValue();
SvNumberFormatter* pNumFmtr = GetNumberFormatter();
@@ -4001,7 +4033,7 @@ void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, BOOL bCallUpdate )
else
// eingstelltes und vorgegebenes NumFormat
// stimmen nicht ueberein -> als Text einfuegen
- bLockModify = bSetNumFmt = FALSE;
+ bLockModify = bSetNumFmt = sal_False;
}
}
@@ -4040,20 +4072,20 @@ void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, BOOL bCallUpdate )
const SfxPoolItem* pValueItem = 0, *pFmtItem = 0;
SwTableBoxFmt* pBoxFmt = (SwTableBoxFmt*)rBox.GetFrmFmt();
if( SFX_ITEM_SET == pBoxFmt->GetItemState( RES_BOXATR_FORMAT,
- FALSE, &pFmtItem ) ||
+ sal_False, &pFmtItem ) ||
SFX_ITEM_SET == pBoxFmt->GetItemState( RES_BOXATR_VALUE,
- FALSE, &pValueItem ))
+ sal_False, &pValueItem ))
{
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- StartUndo( UNDO_TABLE_AUTOFMT, NULL );
+ GetIDocumentUndoRedo().StartUndo( UNDO_TABLE_AUTOFMT, NULL );
pUndo = new SwUndoTblNumFmt( rBox );
}
pBoxFmt = (SwTableBoxFmt*)rBox.ClaimFrmFmt();
// alle Zahlenformate entfernen
- USHORT nWhich1 = RES_BOXATR_FORMULA;
+ sal_uInt16 nWhich1 = RES_BOXATR_FORMULA;
if( !bIsEmptyTxtNd )
{
nWhich1 = RES_BOXATR_FORMAT;
@@ -4066,7 +4098,7 @@ void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, BOOL bCallUpdate )
pBoxFmt->ResetFmtAttr( nWhich1, RES_BOXATR_VALUE );
}
else
- bChgd = FALSE;
+ bChgd = sal_False;
}
if( bChgd )
@@ -4074,8 +4106,8 @@ void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, BOOL bCallUpdate )
if( pUndo )
{
pUndo->SetBox( rBox );
- AppendUndo( pUndo );
- EndUndo( UNDO_END, NULL );
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
+ GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
}
const SwTableNode* pTblNd = rBox.GetSttNd()->FindTableNode();
@@ -4095,10 +4127,9 @@ void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, BOOL bCallUpdate )
void SwDoc::SetTblBoxFormulaAttrs( SwTableBox& rBox, const SfxItemSet& rSet )
{
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoTblNumFmt( rBox, &rSet ) );
+ GetIDocumentUndoRedo().AppendUndo( new SwUndoTblNumFmt(rBox, &rSet) );
}
SwFrmFmt* pBoxFmt = rBox.ClaimFrmFmt();
@@ -4135,20 +4166,20 @@ void SwDoc::ClearLineNumAttrs( SwPosition & rPos )
RES_PARATR_BEGIN, RES_PARATR_END - 1,
0);
pTxtNode->SwCntntNode::GetAttr( rSet );
- if ( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE , FALSE , &pFmtItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE , sal_False , &pFmtItem ) )
{
SwUndoDelNum * pUndo;
- if( DoesUndo() )
+ if( GetIDocumentUndoRedo().DoesUndo() )
{
- ClearRedo();
- AppendUndo( pUndo = new SwUndoDelNum( aPam ) );
+ GetIDocumentUndoRedo().ClearRedo();
+ GetIDocumentUndoRedo().AppendUndo( pUndo = new SwUndoDelNum( aPam ) );
}
else
pUndo = 0;
SwRegHistory aRegH( pUndo ? pUndo->GetHistory() : 0 );
aRegH.RegisterInModify( pTxtNode , *pTxtNode );
if ( pUndo )
- pUndo->AddNode( *pTxtNode , FALSE );
+ pUndo->AddNode( *pTxtNode , sal_False );
String aStyle = String::CreateFromAscii("");
SfxStringItem * pNewItem = (SfxStringItem*)pFmtItem->Clone();
pNewItem->SetValue( aStyle );
@@ -4163,7 +4194,7 @@ void SwDoc::ClearLineNumAttrs( SwPosition & rPos )
void SwDoc::ClearBoxNumAttrs( const SwNodeIndex& rNode )
{
SwStartNode* pSttNd;
- if( 0 != ( pSttNd = GetNodes()[ rNode ]->
+ if( 0 != ( pSttNd = rNode.GetNode().
FindSttNodeByType( SwTableBoxStartNode )) &&
2 == pSttNd->EndOfSectionIndex() - pSttNd->GetIndex() )
{
@@ -4172,20 +4203,19 @@ void SwDoc::ClearBoxNumAttrs( const SwNodeIndex& rNode )
const SfxPoolItem* pFmtItem = 0;
const SfxItemSet& rSet = pBox->GetFrmFmt()->GetAttrSet();
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, FALSE, &pFmtItem ) ||
- SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMULA, FALSE ) ||
- SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_VALUE, FALSE ))
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, sal_False, &pFmtItem ) ||
+ SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMULA, sal_False ) ||
+ SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_VALUE, sal_False ))
{
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoTblNumFmt( *pBox ) );
+ GetIDocumentUndoRedo().AppendUndo(new SwUndoTblNumFmt(*pBox));
}
SwFrmFmt* pBoxFmt = pBox->ClaimFrmFmt();
//JP 01.09.97: TextFormate bleiben erhalten!
- USHORT nWhich1 = RES_BOXATR_FORMAT;
+ sal_uInt16 nWhich1 = RES_BOXATR_FORMAT;
if( pFmtItem && GetNumberFormatter()->IsTextFormat(
((SwTblBoxNumFormat*)pFmtItem)->GetValue() ))
nWhich1 = RES_BOXATR_FORMULA;
@@ -4207,41 +4237,47 @@ void SwDoc::ClearBoxNumAttrs( const SwNodeIndex& rNode )
// in eine bestehende TblSelektion gefuellt wird.
// Gerufen wird es von: edglss.cxx/fecopy.cxx
-BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
- const SwTable* pCpyTbl, BOOL bCpyName, BOOL bCorrPos )
+sal_Bool SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
+ const SwTable* pCpyTbl, sal_Bool bCpyName, sal_Bool bCorrPos )
{
- BOOL bRet;
+ sal_Bool bRet;
const SwTableNode* pSrcTblNd = pCpyTbl
? pCpyTbl->GetTableNode()
: rBoxes[ 0 ]->GetSttNd()->FindTableNode();
- SwTableNode* pInsTblNd = GetNodes()[ rInsPos.nNode ]->FindTableNode();
+ SwTableNode * pInsTblNd = rInsPos.nNode.GetNode().FindTableNode();
+ bool const bUndo( GetIDocumentUndoRedo().DoesUndo() );
if( !pCpyTbl && !pInsTblNd )
{
SwUndoCpyTbl* pUndo = 0;
- if( DoesUndo() )
+ if (bUndo)
{
- ClearRedo();
+ GetIDocumentUndoRedo().ClearRedo();
pUndo = new SwUndoCpyTbl;
- DoUndo( FALSE );
}
- bRet = pSrcTblNd->GetTable().MakeCopy( this, rInsPos, rBoxes,
- TRUE, bCpyName );
+ {
+ ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
+ bRet = pSrcTblNd->GetTable().MakeCopy( this, rInsPos, rBoxes,
+ sal_True, bCpyName );
+ }
+
if( pUndo )
{
if( !bRet )
+ {
delete pUndo;
+ pUndo = 0;
+ }
else
{
pInsTblNd = GetNodes()[ rInsPos.nNode.GetIndex() - 1 ]->FindTableNode();
pUndo->SetTableSttIdx( pInsTblNd->GetIndex() );
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
}
- DoUndo( TRUE );
}
}
else
@@ -4253,43 +4289,38 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
nsRedlineMode_t::REDLINE_SHOW_DELETE));
SwUndoTblCpyTbl* pUndo = 0;
- if( DoesUndo() )
+ if (bUndo)
{
- ClearRedo();
+ GetIDocumentUndoRedo().ClearRedo();
pUndo = new SwUndoTblCpyTbl;
- DoUndo( FALSE );
+ GetIDocumentUndoRedo().DoUndo(false);
}
SwDoc* pCpyDoc = (SwDoc*)pSrcTblNd->GetDoc();
- SfxObjectShellRef* pRefForDocSh = 0;
- BOOL bDelCpyDoc = pCpyDoc == this;
+ sal_Bool bDelCpyDoc = pCpyDoc == this;
if( bDelCpyDoc )
{
// kopiere die Tabelle erstmal in ein temp. Doc
pCpyDoc = new SwDoc;
pCpyDoc->acquire();
- pRefForDocSh = new SfxObjectShellRef();
- pCpyDoc->SetRefForDocShell( pRefForDocSh );
SwPosition aPos( SwNodeIndex( pCpyDoc->GetNodes().GetEndOfContent() ));
- if( !pSrcTblNd->GetTable().MakeCopy( pCpyDoc, aPos, rBoxes, TRUE, TRUE ))
+ if( !pSrcTblNd->GetTable().MakeCopy( pCpyDoc, aPos, rBoxes, sal_True, sal_True ))
{
- delete pRefForDocSh;
if( pCpyDoc->release() == 0 )
delete pCpyDoc;
if( pUndo )
{
- DoUndo( TRUE );
+ GetIDocumentUndoRedo().DoUndo(bUndo);
delete pUndo;
+ pUndo = 0;
}
- return FALSE;
+ return sal_False;
}
aPos.nNode -= 1; // auf den EndNode der Tabelle
pSrcTblNd = aPos.nNode.GetNode().FindTableNode();
-
- pCpyDoc->SetRefForDocShell( NULL );
}
const SwStartNode* pSttNd = rInsPos.nNode.GetNode().FindTableBoxStartNode();
@@ -4328,7 +4359,6 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
if( bDelCpyDoc )
{
- delete pRefForDocSh;
if( pCpyDoc->release() == 0 )
delete pCpyDoc;
}
@@ -4337,11 +4367,13 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
{
// falls die Tabelle nicht kopiert werden konnte, das Undo-Object
// wieder loeschen
+ GetIDocumentUndoRedo().DoUndo(bUndo);
if( !bRet && pUndo->IsEmpty() )
delete pUndo;
else
- AppendUndo( pUndo );
- DoUndo( TRUE );
+ {
+ GetIDocumentUndoRedo().AppendUndo(pUndo);
+ }
}
if( bCorrPos )
@@ -4362,20 +4394,21 @@ BOOL SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
-BOOL SwDoc::_UnProtectTblCells( SwTable& rTbl )
+sal_Bool SwDoc::_UnProtectTblCells( SwTable& rTbl )
{
- BOOL bChgd = FALSE;
- SwUndoAttrTbl* pUndo = DoesUndo() ? new SwUndoAttrTbl( *rTbl.GetTableNode() )
- : 0;
+ sal_Bool bChgd = sal_False;
+ SwUndoAttrTbl *const pUndo = (GetIDocumentUndoRedo().DoesUndo())
+ ? new SwUndoAttrTbl( *rTbl.GetTableNode() )
+ : 0;
SwTableSortBoxes& rSrtBox = rTbl.GetTabSortBoxes();
- for( USHORT i = rSrtBox.Count(); i; )
+ for( sal_uInt16 i = rSrtBox.Count(); i; )
{
SwFrmFmt *pBoxFmt = rSrtBox[ --i ]->GetFrmFmt();
if( pBoxFmt->GetProtect().IsCntntProtected() )
{
pBoxFmt->ResetFmtAttr( RES_PROTECT );
- bChgd = TRUE;
+ bChgd = sal_True;
}
}
@@ -4383,8 +4416,7 @@ BOOL SwDoc::_UnProtectTblCells( SwTable& rTbl )
{
if( bChgd )
{
- ClearRedo();
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
}
else
delete pUndo;
@@ -4393,9 +4425,9 @@ BOOL SwDoc::_UnProtectTblCells( SwTable& rTbl )
}
-BOOL SwDoc::UnProtectCells( const String& rName )
+sal_Bool SwDoc::UnProtectCells( const String& rName )
{
- BOOL bChgd = FALSE;
+ sal_Bool bChgd = sal_False;
SwTableFmt* pFmt = FindTblFmtByName( rName );
if( pFmt )
{
@@ -4407,23 +4439,23 @@ BOOL SwDoc::UnProtectCells( const String& rName )
return bChgd;
}
-BOOL SwDoc::UnProtectCells( const SwSelBoxes& rBoxes )
+sal_Bool SwDoc::UnProtectCells( const SwSelBoxes& rBoxes )
{
- BOOL bChgd = FALSE;
+ sal_Bool bChgd = sal_False;
if( rBoxes.Count() )
{
- SwUndoAttrTbl* pUndo = DoesUndo()
+ SwUndoAttrTbl *const pUndo = (GetIDocumentUndoRedo().DoesUndo())
? new SwUndoAttrTbl( *rBoxes[0]->GetSttNd()->FindTableNode() )
: 0;
SvPtrarr aFmts( 16 ), aNewFmts( 16 );
- for( USHORT i = rBoxes.Count(); i; )
+ for( sal_uInt16 i = rBoxes.Count(); i; )
{
SwTableBox* pBox = rBoxes[ --i ];
SwFrmFmt* pBoxFmt = pBox->GetFrmFmt();
if( pBoxFmt->GetProtect().IsCntntProtected() )
{
- USHORT nFnd = aFmts.GetPos( pBoxFmt );
+ sal_uInt16 nFnd = aFmts.GetPos( pBoxFmt );
if( USHRT_MAX != nFnd )
pBox->ChgFrmFmt( (SwTableBoxFmt*)aNewFmts[ nFnd ] );
else
@@ -4433,7 +4465,7 @@ BOOL SwDoc::UnProtectCells( const SwSelBoxes& rBoxes )
pBoxFmt->ResetFmtAttr( RES_PROTECT );
aNewFmts.Insert( pBoxFmt, aNewFmts.Count() );
}
- bChgd = TRUE;
+ bChgd = sal_True;
}
}
@@ -4441,8 +4473,7 @@ BOOL SwDoc::UnProtectCells( const SwSelBoxes& rBoxes )
{
if( bChgd )
{
- ClearRedo();
- AppendUndo( pUndo );
+ GetIDocumentUndoRedo().AppendUndo( pUndo );
}
else
delete pUndo;
@@ -4451,26 +4482,26 @@ BOOL SwDoc::UnProtectCells( const SwSelBoxes& rBoxes )
return bChgd;
}
-BOOL SwDoc::UnProtectTbls( const SwPaM& rPam )
+sal_Bool SwDoc::UnProtectTbls( const SwPaM& rPam )
{
- StartUndo(UNDO_EMPTY, NULL);
+ GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
- BOOL bChgd = FALSE, bHasSel = rPam.HasMark() ||
+ sal_Bool bChgd = sal_False, bHasSel = rPam.HasMark() ||
rPam.GetNext() != (SwPaM*)&rPam;
SwFrmFmts& rFmts = *GetTblFrmFmts();
SwTable* pTbl;
const SwTableNode* pTblNd;
- for( USHORT n = rFmts.Count(); n ; )
+ for( sal_uInt16 n = rFmts.Count(); n ; )
if( 0 != (pTbl = SwTable::FindTable( rFmts[ --n ] )) &&
0 != (pTblNd = pTbl->GetTableNode() ) &&
pTblNd->GetNodes().IsDocNodes() )
{
- ULONG nTblIdx = pTblNd->GetIndex();
+ sal_uLong nTblIdx = pTblNd->GetIndex();
// dann ueberpruefe ob Tabelle in der Selection liegt
if( bHasSel )
{
- int bFound = FALSE;
+ int bFound = sal_False;
SwPaM* pTmp = (SwPaM*)&rPam;
do {
const SwPosition *pStt = pTmp->Start(),
@@ -4487,18 +4518,18 @@ BOOL SwDoc::UnProtectTbls( const SwPaM& rPam )
bChgd |= _UnProtectTblCells( *pTbl );
}
- EndUndo(UNDO_EMPTY, NULL);
+ GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
if( bChgd )
SetModified();
return bChgd;
}
-BOOL SwDoc::HasTblAnyProtection( const SwPosition* pPos,
+sal_Bool SwDoc::HasTblAnyProtection( const SwPosition* pPos,
const String* pTblName,
- BOOL* pFullTblProtection )
+ sal_Bool* pFullTblProtection )
{
- BOOL bHasProtection = FALSE;
+ sal_Bool bHasProtection = sal_False;
SwTable* pTbl = 0;
if( pTblName )
pTbl = SwTable::FindTable( FindTblFmtByName( *pTblName ) );
@@ -4512,22 +4543,22 @@ BOOL SwDoc::HasTblAnyProtection( const SwPosition* pPos,
if( pTbl )
{
SwTableSortBoxes& rSrtBox = pTbl->GetTabSortBoxes();
- for( USHORT i = rSrtBox.Count(); i; )
+ for( sal_uInt16 i = rSrtBox.Count(); i; )
{
SwFrmFmt *pBoxFmt = rSrtBox[ --i ]->GetFrmFmt();
if( pBoxFmt->GetProtect().IsCntntProtected() )
{
if( !bHasProtection )
{
- bHasProtection = TRUE;
+ bHasProtection = sal_True;
if( !pFullTblProtection )
break;
- *pFullTblProtection = TRUE;
+ *pFullTblProtection = sal_True;
}
}
else if( bHasProtection && pFullTblProtection )
{
- *pFullTblProtection = FALSE;
+ *pFullTblProtection = sal_False;
break;
}
}
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 1beb28e4dd49..14fac9d60f93 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -45,7 +45,8 @@
#include <cntfrm.hxx>
#include <txtfrm.hxx>
#include <svx/svxids.hrc>
-#include "doc.hxx"
+#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include "pam.hxx"
#include "swcrsr.hxx"
#include "viscrs.hxx"
@@ -55,7 +56,8 @@
#include "swtblfmt.hxx"
#include "docary.hxx"
#include "ndindex.hxx"
-#include "undobj.hxx"
+#include <UndoTable.hxx>
+
using namespace ::com::sun::star;
@@ -65,30 +67,30 @@ extern void ClearFEShellTabCols();
//siehe auch swtable.cxx
#define COLFUZZY 20L
-inline BOOL IsSame( long nA, long nB ) { return Abs(nA-nB) <= COLFUZZY; }
+inline sal_Bool IsSame( long nA, long nB ) { return Abs(nA-nB) <= COLFUZZY; }
class SwTblFmtCmp
{
public:
SwFrmFmt *pOld,
*pNew;
- INT16 nType;
+ sal_Int16 nType;
- SwTblFmtCmp( SwFrmFmt *pOld, SwFrmFmt *pNew, INT16 nType );
+ SwTblFmtCmp( SwFrmFmt *pOld, SwFrmFmt *pNew, sal_Int16 nType );
- static SwFrmFmt *FindNewFmt( SvPtrarr &rArr, SwFrmFmt*pOld, INT16 nType );
+ static SwFrmFmt *FindNewFmt( SvPtrarr &rArr, SwFrmFmt*pOld, sal_Int16 nType );
static void Delete( SvPtrarr &rArr );
};
-SwTblFmtCmp::SwTblFmtCmp( SwFrmFmt *pO, SwFrmFmt *pN, INT16 nT )
+SwTblFmtCmp::SwTblFmtCmp( SwFrmFmt *pO, SwFrmFmt *pN, sal_Int16 nT )
: pOld ( pO ), pNew ( pN ), nType( nT )
{
}
-SwFrmFmt *SwTblFmtCmp::FindNewFmt( SvPtrarr &rArr, SwFrmFmt *pOld, INT16 nType )
+SwFrmFmt *SwTblFmtCmp::FindNewFmt( SvPtrarr &rArr, SwFrmFmt *pOld, sal_Int16 nType )
{
- for ( USHORT i = 0; i < rArr.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rArr.Count(); ++i )
{
SwTblFmtCmp *pCmp = (SwTblFmtCmp*)rArr[i];
if ( pCmp->pOld == pOld && pCmp->nType == nType )
@@ -99,14 +101,14 @@ SwFrmFmt *SwTblFmtCmp::FindNewFmt( SvPtrarr &rArr, SwFrmFmt *pOld, INT16 nType )
void SwTblFmtCmp::Delete( SvPtrarr &rArr )
{
- for ( USHORT i = 0; i < rArr.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rArr.Count(); ++i )
delete (SwTblFmtCmp*)rArr[i];
}
void lcl_GetStartEndCell( const SwCursor& rCrsr,
SwLayoutFrm *&prStart, SwLayoutFrm *&prEnd )
{
- OSL_ENSURE( rCrsr.GetCntntNode() && rCrsr.GetCntntNode( FALSE ),
+ OSL_ENSURE( rCrsr.GetCntntNode() && rCrsr.GetCntntNode( sal_False ),
"Tabselection nicht auf Cnt." );
Point aPtPos, aMkPos;
@@ -119,7 +121,7 @@ void lcl_GetStartEndCell( const SwCursor& rCrsr,
// robust:
SwCntntNode* pPointNd = rCrsr.GetCntntNode();
- SwCntntNode* pMarkNd = rCrsr.GetCntntNode(FALSE);
+ SwCntntNode* pMarkNd = rCrsr.GetCntntNode(sal_False);
SwFrm* pPointFrm = pPointNd ? pPointNd->GetFrm( &aPtPos ) : 0;
SwFrm* pMarkFrm = pMarkNd ? pMarkNd->GetFrm( &aMkPos ) : 0;
@@ -128,8 +130,8 @@ void lcl_GetStartEndCell( const SwCursor& rCrsr,
prEnd = pMarkFrm ? pMarkFrm->GetUpper() : 0;
}
-BOOL lcl_GetBoxSel( const SwCursor& rCursor, SwSelBoxes& rBoxes,
- BOOL bAllCrsr = FALSE )
+sal_Bool lcl_GetBoxSel( const SwCursor& rCursor, SwSelBoxes& rBoxes,
+ sal_Bool bAllCrsr = sal_False )
{
const SwTableCursor* pTblCrsr =
dynamic_cast<const SwTableCursor*>(&rCursor);
@@ -173,17 +175,17 @@ inline void InsertLine( SvPtrarr& rLineArr, SwTableLine* pLine )
//-----------------------------------------------------------------------------
-BOOL lcl_IsAnLower( const SwTableLine *pLine, const SwTableLine *pAssumed )
+sal_Bool lcl_IsAnLower( const SwTableLine *pLine, const SwTableLine *pAssumed )
{
const SwTableLine *pTmp = pAssumed->GetUpper() ?
pAssumed->GetUpper()->GetUpper() : 0;
while ( pTmp )
{
if ( pTmp == pLine )
- return TRUE;
+ return sal_True;
pTmp = pTmp->GetUpper() ? pTmp->GetUpper()->GetUpper() : 0;
}
- return FALSE;
+ return sal_False;
}
//-----------------------------------------------------------------------------
@@ -191,20 +193,20 @@ struct LinesAndTable
{
SvPtrarr &rLines;
const SwTable &rTable;
- BOOL bInsertLines;
+ sal_Bool bInsertLines;
LinesAndTable( SvPtrarr &rL, const SwTable &rTbl ) :
- rLines( rL ), rTable( rTbl ), bInsertLines( TRUE ) {}
+ rLines( rL ), rTable( rTbl ), bInsertLines( sal_True ) {}
};
-BOOL _FindLine( const _FndLine*& rpLine, void* pPara );
+sal_Bool _FindLine( const _FndLine*& rpLine, void* pPara );
-BOOL _FindBox( const _FndBox*& rpBox, void* pPara )
+sal_Bool _FindBox( const _FndBox*& rpBox, void* pPara )
{
if ( rpBox->GetLines().Count() )
{
- ((LinesAndTable*)pPara)->bInsertLines = TRUE;
+ ((LinesAndTable*)pPara)->bInsertLines = sal_True;
((_FndBox*)rpBox)->GetLines().ForEach( _FindLine, pPara );
if ( ((LinesAndTable*)pPara)->bInsertLines )
{
@@ -213,24 +215,24 @@ BOOL _FindBox( const _FndBox*& rpBox, void* pPara )
: ((LinesAndTable*)pPara)->rTable.GetTabLines();
if ( rpBox->GetLines().Count() == rLines.Count() )
{
- for ( USHORT i = 0; i < rLines.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
::InsertLine( ((LinesAndTable*)pPara)->rLines,
(SwTableLine*)rLines[i] );
}
else
- ((LinesAndTable*)pPara)->bInsertLines = FALSE;
+ ((LinesAndTable*)pPara)->bInsertLines = sal_False;
}
}
else if ( rpBox->GetBox() )
::InsertLine( ((LinesAndTable*)pPara)->rLines,
(SwTableLine*)rpBox->GetBox()->GetUpper() );
- return TRUE;
+ return sal_True;
}
-BOOL _FindLine( const _FndLine*& rpLine, void* pPara )
+sal_Bool _FindLine( const _FndLine*& rpLine, void* pPara )
{
((_FndLine*)rpLine)->GetBoxes().ForEach( _FindBox, pPara );
- return TRUE;
+ return sal_True;
}
void lcl_CollectLines( SvPtrarr &rArr, const SwCursor& rCursor, bool bRemoveLines )
@@ -257,10 +259,10 @@ void lcl_CollectLines( SvPtrarr &rArr, const SwCursor& rCursor, bool bRemoveLine
// (Not for row split)
if ( bRemoveLines )
{
- for ( USHORT i = 0; i < rArr.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rArr.Count(); ++i )
{
SwTableLine *pUpLine = (SwTableLine*)rArr[i];
- for ( USHORT k = 0; k < rArr.Count(); ++k )
+ for ( sal_uInt16 k = 0; k < rArr.Count(); ++k )
{
if ( k != i && ::lcl_IsAnLower( pUpLine, (SwTableLine*)rArr[k] ) )
{
@@ -298,7 +300,7 @@ void lcl_ProcessRowSize( SvPtrarr &rFmtCmp, SwTableLine *pLine, const SwFmtFrmSi
{
lcl_ProcessRowAttr( rFmtCmp, pLine, rNew );
SwTableBoxes &rBoxes = pLine->GetTabBoxes();
- for ( USHORT i = 0; i < rBoxes.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
::lcl_ProcessBoxSize( rFmtCmp, rBoxes[i], rNew );
}
@@ -311,7 +313,7 @@ void lcl_ProcessBoxSize( SvPtrarr &rFmtCmp, SwTableBox *pBox, const SwFmtFrmSize
{
SwFmtFrmSize aSz( rNew );
aSz.SetHeight( rNew.GetHeight() ? rNew.GetHeight() / rLines.Count() : 0 );
- for ( USHORT i = 0; i < rLines.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
::lcl_ProcessRowSize( rFmtCmp, rLines[i], aSz );
}
}
@@ -331,15 +333,14 @@ void SwDoc::SetRowSplit( const SwCursor& rCursor, const SwFmtRowSplit &rNew )
if( aRowArr.Count() )
{
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoAttrTbl( *pTblNd ));
+ GetIDocumentUndoRedo().AppendUndo(new SwUndoAttrTbl(*pTblNd));
}
- SvPtrarr aFmtCmp( Max( BYTE(255), BYTE(aRowArr.Count()) ), 255 );
+ SvPtrarr aFmtCmp( Max( sal_uInt8(255), sal_uInt8(aRowArr.Count()) ), 255 );
- for( USHORT i = 0; i < aRowArr.Count(); ++i )
+ for( sal_uInt16 i = 0; i < aRowArr.Count(); ++i )
::lcl_ProcessRowAttr( aFmtCmp, (SwTableLine*)aRowArr[i], rNew );
SwTblFmtCmp::Delete( aFmtCmp );
@@ -367,7 +368,7 @@ void SwDoc::GetRowSplit( const SwCursor& rCursor, SwFmtRowSplit *& rpSz ) const
rpSz = &(SwFmtRowSplit&)((SwTableLine*)aRowArr[0])->
GetFrmFmt()->GetRowSplit();
- for ( USHORT i = 1; i < aRowArr.Count() && rpSz; ++i )
+ for ( sal_uInt16 i = 1; i < aRowArr.Count() && rpSz; ++i )
{
if ( (*rpSz).GetValue() != ((SwTableLine*)aRowArr[i])->GetFrmFmt()->GetRowSplit().GetValue() )
rpSz = 0;
@@ -392,14 +393,13 @@ void SwDoc::SetRowHeight( const SwCursor& rCursor, const SwFmtFrmSize &rNew )
if( aRowArr.Count() )
{
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoAttrTbl( *pTblNd ));
+ GetIDocumentUndoRedo().AppendUndo(new SwUndoAttrTbl(*pTblNd));
}
- SvPtrarr aFmtCmp( Max( BYTE(255), BYTE(aRowArr.Count()) ), 255 );
- for ( USHORT i = 0; i < aRowArr.Count(); ++i )
+ SvPtrarr aFmtCmp( Max( sal_uInt8(255), sal_uInt8(aRowArr.Count()) ), 255 );
+ for ( sal_uInt16 i = 0; i < aRowArr.Count(); ++i )
::lcl_ProcessRowSize( aFmtCmp, (SwTableLine*)aRowArr[i], rNew );
SwTblFmtCmp::Delete( aFmtCmp );
@@ -427,7 +427,7 @@ void SwDoc::GetRowHeight( const SwCursor& rCursor, SwFmtFrmSize *& rpSz ) const
rpSz = &(SwFmtFrmSize&)((SwTableLine*)aRowArr[0])->
GetFrmFmt()->GetFrmSize();
- for ( USHORT i = 1; i < aRowArr.Count() && rpSz; ++i )
+ for ( sal_uInt16 i = 1; i < aRowArr.Count() && rpSz; ++i )
{
if ( *rpSz != ((SwTableLine*)aRowArr[i])->GetFrmFmt()->GetFrmSize() )
rpSz = 0;
@@ -438,9 +438,9 @@ void SwDoc::GetRowHeight( const SwCursor& rCursor, SwFmtFrmSize *& rpSz ) const
}
}
-BOOL SwDoc::BalanceRowHeight( const SwCursor& rCursor, BOOL bTstOnly )
+sal_Bool SwDoc::BalanceRowHeight( const SwCursor& rCursor, sal_Bool bTstOnly )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode();
if( pTblNd )
{
@@ -452,7 +452,7 @@ BOOL SwDoc::BalanceRowHeight( const SwCursor& rCursor, BOOL bTstOnly )
if( !bTstOnly )
{
long nHeight = 0;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < aRowArr.Count(); ++i )
{
@@ -466,20 +466,20 @@ BOOL SwDoc::BalanceRowHeight( const SwCursor& rCursor, BOOL bTstOnly )
}
SwFmtFrmSize aNew( ATT_MIN_SIZE, 0, nHeight );
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoAttrTbl( *pTblNd ));
+ GetIDocumentUndoRedo().AppendUndo(
+ new SwUndoAttrTbl(*pTblNd));
}
- SvPtrarr aFmtCmp( Max( BYTE(255), BYTE(aRowArr.Count()) ), 255 );
+ SvPtrarr aFmtCmp( Max( sal_uInt8(255), sal_uInt8(aRowArr.Count()) ), 255 );
for( i = 0; i < aRowArr.Count(); ++i )
::lcl_ProcessRowSize( aFmtCmp, (SwTableLine*)aRowArr[i], aNew );
SwTblFmtCmp::Delete( aFmtCmp );
SetModified();
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -498,15 +498,14 @@ void SwDoc::SetRowBackground( const SwCursor& rCursor, const SvxBrushItem &rNew
if( aRowArr.Count() )
{
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoAttrTbl( *pTblNd ));
+ GetIDocumentUndoRedo().AppendUndo(new SwUndoAttrTbl(*pTblNd));
}
- SvPtrarr aFmtCmp( Max( BYTE(255), BYTE(aRowArr.Count()) ), 255 );
+ SvPtrarr aFmtCmp( Max( sal_uInt8(255), sal_uInt8(aRowArr.Count()) ), 255 );
- for( USHORT i = 0; i < aRowArr.Count(); ++i )
+ for( sal_uInt16 i = 0; i < aRowArr.Count(); ++i )
::lcl_ProcessRowAttr( aFmtCmp, (SwTableLine*)aRowArr[i], rNew );
SwTblFmtCmp::Delete( aFmtCmp );
@@ -518,9 +517,9 @@ void SwDoc::SetRowBackground( const SwCursor& rCursor, const SvxBrushItem &rNew
/******************************************************************************
* SwTwips SwDoc::GetRowBackground() const
******************************************************************************/
-BOOL SwDoc::GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) const
+sal_Bool SwDoc::GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode();
if( pTblNd )
{
@@ -531,11 +530,11 @@ BOOL SwDoc::GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) c
{
rToFill = ((SwTableLine*)aRowArr[0])->GetFrmFmt()->GetBackground();
- bRet = TRUE;
- for ( USHORT i = 1; i < aRowArr.Count(); ++i )
+ bRet = sal_True;
+ for ( sal_uInt16 i = 1; i < aRowArr.Count(); ++i )
if ( rToFill != ((SwTableLine*)aRowArr[i])->GetFrmFmt()->GetBackground() )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -592,10 +591,9 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
if( aUnions.Count() )
{
SwTable& rTable = pTblNd->GetTable();
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoAttrTbl( *pTblNd ));
+ GetIDocumentUndoRedo().AppendUndo( new SwUndoAttrTbl(*pTblNd) );
}
SvPtrarr aFmtCmp( 255, 255 );
@@ -608,13 +606,13 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
const SvxBorderLine* pBottom = 0;
const SvxBorderLine* pHori = 0;
const SvxBorderLine* pVert = 0;
- BOOL bHoriValid = TRUE, bVertValid = TRUE,
- bTopValid = TRUE, bBottomValid = TRUE,
- bLeftValid = TRUE, bRightValid = TRUE;
+ sal_Bool bHoriValid = sal_True, bVertValid = sal_True,
+ bTopValid = sal_True, bBottomValid = sal_True,
+ bLeftValid = sal_True, bRightValid = sal_True;
// JP 21.07.95: die Flags im BoxInfo-Item entscheiden, wann eine
// BorderLine gueltig ist!!
- if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, FALSE,
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, sal_False,
(const SfxPoolItem**)&pSetBoxInfo) )
{
pHori = pSetBoxInfo->GetHori();
@@ -630,7 +628,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
bRightValid = pSetBoxInfo->IsValid(VALID_RIGHT);
}
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BOX, FALSE,
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_BOX, sal_False,
(const SfxPoolItem**)&pSetBox) )
{
pLeft = pSetBox->GetLeft();
@@ -641,17 +639,17 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
else
{
// nicht gesetzt, also keine gueltigen Werte
- bTopValid = bBottomValid = bLeftValid = bRightValid = FALSE;
+ bTopValid = bBottomValid = bLeftValid = bRightValid = sal_False;
pSetBox = 0;
}
- BOOL bFirst = TRUE;
- for ( USHORT i = 0; i < aUnions.Count(); ++i )
+ sal_Bool bFirst = sal_True;
+ for ( sal_uInt16 i = 0; i < aUnions.Count(); ++i )
{
SwSelUnion *pUnion = aUnions[i];
SwTabFrm *pTab = pUnion->GetTable();
const SwRect &rUnion = pUnion->GetUnion();
- const BOOL bLast = i == aUnions.Count() - 1 ? TRUE : FALSE;
+ const sal_Bool bLast = i == aUnions.Count() - 1 ? sal_True : sal_False;
SvPtrarr aCellArr( 255, 255 );
::lcl_CollectCells( aCellArr, pUnion->GetUnion(), pTab );
@@ -664,7 +662,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
//handelt doch keine Aussenkanten sein.
//Aussenkanten werden links, rechts, oben und unten gesetzt.
//Innenkanten werden nur oben und links gesetzt.
- for ( USHORT j = 0; j < aCellArr.Count(); ++j )
+ for ( sal_uInt16 j = 0; j < aCellArr.Count(); ++j )
{
SwCellFrm *pCell = (SwCellFrm*)aCellArr[j];
const sal_Bool bVert = pTab->IsVertical();
@@ -701,7 +699,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
SvxBoxItem aBox( pCell->GetFmt()->GetBox() );
- INT16 nType = 0;
+ sal_Int16 nType = 0;
//Obere Kante
if( bTopValid )
@@ -765,10 +763,10 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
if( pSetBox )
{
- static USHORT const aBorders[] = {
+ static sal_uInt16 const aBorders[] = {
BOX_LINE_BOTTOM, BOX_LINE_TOP,
BOX_LINE_RIGHT, BOX_LINE_LEFT };
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
for( int k = 0; k < 4; ++k, ++pBrd )
aBox.SetDistance( pSetBox->GetDistance( *pBrd ), *pBrd );
}
@@ -786,7 +784,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
}
}
- bFirst = FALSE;
+ bFirst = sal_False;
}
SwHTMLTableLayout *pTableLayout = rTable.GetHTMLTableLayout();
@@ -796,7 +794,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
SwTabFrm* pTabFrm = pFrm->ImplFindTabFrm();
pTableLayout->BordersChanged(
- pTableLayout->GetBrowseWidthByTabFrm( *pTabFrm ), TRUE );
+ pTableLayout->GetBrowseWidthByTabFrm( *pTabFrm ), sal_True );
}
SwTblFmtCmp::Delete( aFmtCmp );
::ClearFEShellTabCols();
@@ -823,7 +821,7 @@ void lcl_SetLineStyle( SvxBorderLine *pToSet,
}
void SwDoc::SetTabLineStyle( const SwCursor& rCursor,
- const Color* pColor, BOOL bSetLine,
+ const Color* pColor, sal_Bool bSetLine,
const SvxBorderLine* pBorderLine )
{
SwCntntNode* pCntNd = rCursor.GetPoint()->nNode.GetNode().GetCntntNode();
@@ -840,20 +838,19 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor,
if( aUnions.Count() )
{
SwTable& rTable = pTblNd->GetTable();
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoAttrTbl( *pTblNd ));
+ GetIDocumentUndoRedo().AppendUndo(new SwUndoAttrTbl(*pTblNd));
}
- for( USHORT i = 0; i < aUnions.Count(); ++i )
+ for( sal_uInt16 i = 0; i < aUnions.Count(); ++i )
{
SwSelUnion *pUnion = aUnions[i];
SwTabFrm *pTab = pUnion->GetTable();
SvPtrarr aCellArr( 255, 255 );
::lcl_CollectCells( aCellArr, pUnion->GetUnion(), pTab );
- for ( USHORT j = 0; j < aCellArr.Count(); ++j )
+ for ( sal_uInt16 j = 0; j < aCellArr.Count(); ++j )
{
SwCellFrm *pCell = ( SwCellFrm* )aCellArr[j];
@@ -893,7 +890,7 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor,
SwTabFrm* pTabFrm = pFrm->ImplFindTabFrm();
pTableLayout->BordersChanged(
- pTableLayout->GetBrowseWidthByTabFrm( *pTabFrm ), TRUE );
+ pTableLayout->GetBrowseWidthByTabFrm( *pTabFrm ), sal_True );
}
::ClearFEShellTabCols();
SetModified();
@@ -918,28 +915,28 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
SvxBoxItem aSetBox ((const SvxBoxItem &) rSet.Get(RES_BOX ));
SvxBoxInfoItem aSetBoxInfo((const SvxBoxInfoItem&) rSet.Get(SID_ATTR_BORDER_INNER));
- BOOL bTopSet = FALSE,
- bBottomSet = FALSE,
- bLeftSet = FALSE,
- bRightSet = FALSE,
- bHoriSet = FALSE,
- bVertSet = FALSE,
- bDistanceSet = FALSE;
+ sal_Bool bTopSet = sal_False,
+ bBottomSet = sal_False,
+ bLeftSet = sal_False,
+ bRightSet = sal_False,
+ bHoriSet = sal_False,
+ bVertSet = sal_False,
+ bDistanceSet = sal_False;
aSetBoxInfo.ResetFlags();
- for ( USHORT i = 0; i < aUnions.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aUnions.Count(); ++i )
{
SwSelUnion *pUnion = aUnions[i];
const SwTabFrm *pTab = pUnion->GetTable();
const SwRect &rUnion = pUnion->GetUnion();
- const BOOL bFirst = i == 0 ? TRUE : FALSE;
- const BOOL bLast = i == aUnions.Count() - 1 ? TRUE : FALSE;
+ const sal_Bool bFirst = i == 0 ? sal_True : sal_False;
+ const sal_Bool bLast = i == aUnions.Count() - 1 ? sal_True : sal_False;
SvPtrarr aCellArr( 255, 255 );
::lcl_CollectCells( aCellArr, rUnion, (SwTabFrm*)pTab );
- for ( USHORT j = 0; j < aCellArr.Count(); ++j )
+ for ( sal_uInt16 j = 0; j < aCellArr.Count(); ++j )
{
const SwCellFrm *pCell = (const SwCellFrm*)aCellArr[j];
const sal_Bool bVert = pTab->IsVertical();
@@ -976,14 +973,14 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
if (aSetBoxInfo.IsValid(VALID_TOP))
{
if ( !bTopSet )
- { bTopSet = TRUE;
+ { bTopSet = sal_True;
aSetBox.SetLine( rBox.GetTop(), BOX_LINE_TOP );
}
else if ((aSetBox.GetTop() && rBox.GetTop() &&
!(*aSetBox.GetTop() == *rBox.GetTop())) ||
- ((!aSetBox.GetTop()) ^ (!rBox.GetTop()))) // XOR-Ausdruck ist TRUE, wenn genau einer der beiden Pointer 0 ist
+ ((!aSetBox.GetTop()) ^ (!rBox.GetTop()))) // XOR-Ausdruck ist sal_True, wenn genau einer der beiden Pointer 0 ist
{
- aSetBoxInfo.SetValid(VALID_TOP, FALSE );
+ aSetBoxInfo.SetValid(VALID_TOP, sal_False );
aSetBox.SetLine( 0, BOX_LINE_TOP );
}
}
@@ -995,14 +992,14 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
if (aSetBoxInfo.IsValid(VALID_LEFT))
{
if ( !bLeftSet )
- { bLeftSet = TRUE;
+ { bLeftSet = sal_True;
aSetBox.SetLine( rBox.GetLeft(), BOX_LINE_LEFT );
}
else if ((aSetBox.GetLeft() && rBox.GetLeft() &&
!(*aSetBox.GetLeft() == *rBox.GetLeft())) ||
((!aSetBox.GetLeft()) ^ (!rBox.GetLeft())))
{
- aSetBoxInfo.SetValid(VALID_LEFT, FALSE );
+ aSetBoxInfo.SetValid(VALID_LEFT, sal_False );
aSetBox.SetLine( 0, BOX_LINE_LEFT );
}
}
@@ -1012,13 +1009,13 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
if (aSetBoxInfo.IsValid(VALID_VERT))
{
if ( !bVertSet )
- { bVertSet = TRUE;
+ { bVertSet = sal_True;
aSetBoxInfo.SetLine( rBox.GetLeft(), BOXINFO_LINE_VERT );
}
else if ((aSetBoxInfo.GetVert() && rBox.GetLeft() &&
!(*aSetBoxInfo.GetVert() == *rBox.GetLeft())) ||
((!aSetBoxInfo.GetVert()) ^ (!rBox.GetLeft())))
- { aSetBoxInfo.SetValid( VALID_VERT, FALSE );
+ { aSetBoxInfo.SetValid( VALID_VERT, sal_False );
aSetBoxInfo.SetLine( 0, BOXINFO_LINE_VERT );
}
}
@@ -1028,13 +1025,13 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
if ( aSetBoxInfo.IsValid(VALID_RIGHT) && bRightOver )
{
if ( !bRightSet )
- { bRightSet = TRUE;
+ { bRightSet = sal_True;
aSetBox.SetLine( rBox.GetRight(), BOX_LINE_RIGHT );
}
else if ((aSetBox.GetRight() && rBox.GetRight() &&
!(*aSetBox.GetRight() == *rBox.GetRight())) ||
(!aSetBox.GetRight() ^ !rBox.GetRight()))
- { aSetBoxInfo.SetValid( VALID_RIGHT, FALSE );
+ { aSetBoxInfo.SetValid( VALID_RIGHT, sal_False );
aSetBox.SetLine( 0, BOX_LINE_RIGHT );
}
}
@@ -1045,13 +1042,13 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
if ( aSetBoxInfo.IsValid(VALID_BOTTOM) )
{
if ( !bBottomSet )
- { bBottomSet = TRUE;
+ { bBottomSet = sal_True;
aSetBox.SetLine( rBox.GetBottom(), BOX_LINE_BOTTOM );
}
else if ((aSetBox.GetBottom() && rBox.GetBottom() &&
!(*aSetBox.GetBottom() == *rBox.GetBottom())) ||
(!aSetBox.GetBottom() ^ !rBox.GetBottom()))
- { aSetBoxInfo.SetValid( VALID_BOTTOM, FALSE );
+ { aSetBoxInfo.SetValid( VALID_BOTTOM, sal_False );
aSetBox.SetLine( 0, BOX_LINE_BOTTOM );
}
}
@@ -1063,14 +1060,14 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
if (aSetBoxInfo.IsValid(VALID_HORI))
{
if ( !bHoriSet )
- { bHoriSet = TRUE;
+ { bHoriSet = sal_True;
aSetBoxInfo.SetLine( rBox.GetBottom(), BOXINFO_LINE_HORI );
}
else if ((aSetBoxInfo.GetHori() && rBox.GetBottom() &&
!(*aSetBoxInfo.GetHori() == *rBox.GetBottom())) ||
((!aSetBoxInfo.GetHori()) ^ (!rBox.GetBottom())))
{
- aSetBoxInfo.SetValid( VALID_HORI, FALSE );
+ aSetBoxInfo.SetValid( VALID_HORI, sal_False );
aSetBoxInfo.SetLine( 0, BOXINFO_LINE_HORI );
}
}
@@ -1079,14 +1076,14 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
// Abstand zum Text
if (aSetBoxInfo.IsValid(VALID_DISTANCE))
{
- static USHORT const aBorders[] = {
+ static sal_uInt16 const aBorders[] = {
BOX_LINE_BOTTOM, BOX_LINE_TOP,
BOX_LINE_RIGHT, BOX_LINE_LEFT };
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
if( !bDistanceSet ) // bei 1. Durchlauf erstmal setzen
{
- bDistanceSet = TRUE;
+ bDistanceSet = sal_True;
for( int k = 0; k < 4; ++k, ++pBrd )
aSetBox.SetDistance( rBox.GetDistance( *pBrd ),
*pBrd );
@@ -1097,8 +1094,8 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
if( aSetBox.GetDistance( *pBrd ) !=
rBox.GetDistance( *pBrd ) )
{
- aSetBoxInfo.SetValid( VALID_DISTANCE, FALSE );
- aSetBox.SetDistance( (USHORT) 0 );
+ aSetBoxInfo.SetValid( VALID_DISTANCE, sal_False );
+ aSetBox.SetDistance( (sal_uInt16) 0 );
break;
}
}
@@ -1118,17 +1115,16 @@ void SwDoc::SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew )
{
SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode();
SwSelBoxes aBoxes;
- if( pTblNd && ::lcl_GetBoxSel( rCursor, aBoxes, TRUE ) )
+ if( pTblNd && ::lcl_GetBoxSel( rCursor, aBoxes, sal_True ) )
{
SwTable& rTable = pTblNd->GetTable();
- if( DoesUndo() )
+ if (GetIDocumentUndoRedo().DoesUndo())
{
- ClearRedo();
- AppendUndo( new SwUndoAttrTbl( *pTblNd ));
+ GetIDocumentUndoRedo().AppendUndo( new SwUndoAttrTbl(*pTblNd) );
}
- SvPtrarr aFmtCmp( Max( BYTE(255), BYTE(aBoxes.Count()) ), 255 );
- for ( USHORT i = 0; i < aBoxes.Count(); ++i )
+ SvPtrarr aFmtCmp( Max( sal_uInt8(255), sal_uInt8(aBoxes.Count()) ), 255 );
+ for ( sal_uInt16 i = 0; i < aBoxes.Count(); ++i )
{
SwTableBox *pBox = aBoxes[i];
@@ -1151,7 +1147,7 @@ void SwDoc::SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew )
SwTabFrm* pTabFrm = pFrm->ImplFindTabFrm();
pTableLayout->Resize(
- pTableLayout->GetBrowseWidthByTabFrm( *pTabFrm ), TRUE );
+ pTableLayout->GetBrowseWidthByTabFrm( *pTabFrm ), sal_True );
}
SwTblFmtCmp::Delete( aFmtCmp );
SetModified();
@@ -1163,17 +1159,17 @@ void SwDoc::SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew )
#* Methoden : GetBoxAttr()
#***********************************************************************/
-BOOL SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) const
+sal_Bool SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode();
SwSelBoxes aBoxes;
if( pTblNd && lcl_GetBoxSel( rCursor, aBoxes ))
{
- bRet = TRUE;
- BOOL bOneFound = FALSE;
- const USHORT nWhich = rToFill.Which();
- for( USHORT i = 0; i < aBoxes.Count(); ++i )
+ bRet = sal_True;
+ sal_Bool bOneFound = sal_False;
+ const sal_uInt16 nWhich = rToFill.Which();
+ for( sal_uInt16 i = 0; i < aBoxes.Count(); ++i )
{
switch ( nWhich )
{
@@ -1184,10 +1180,10 @@ BOOL SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) const
if( !bOneFound )
{
(SvxBrushItem&)rToFill = rBack;
- bOneFound = TRUE;
+ bOneFound = sal_True;
}
else if( rToFill != rBack )
- bRet = FALSE;
+ bRet = sal_False;
}
break;
@@ -1198,10 +1194,10 @@ BOOL SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) const
if( !bOneFound )
{
(SvxFrameDirectionItem&)rToFill = rDir;
- bOneFound = TRUE;
+ bOneFound = sal_True;
}
else if( rToFill != rDir )
- bRet = FALSE;
+ bRet = sal_False;
}
case RES_VERT_ORIENT:
{
@@ -1210,14 +1206,14 @@ BOOL SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) const
if( !bOneFound )
{
(SwFmtVertOrient&)rToFill = rOrient;
- bOneFound = TRUE;
+ bOneFound = sal_True;
}
else if( rToFill != rOrient )
- bRet = FALSE;
+ bRet = sal_False;
}
}
- if ( FALSE == bRet )
+ if ( sal_False == bRet )
break;
}
}
@@ -1228,7 +1224,7 @@ BOOL SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) const
#* Class : SwDoc
#* Methoden : SetBoxAlign, SetBoxAlign
#***********************************************************************/
-void SwDoc::SetBoxAlign( const SwCursor& rCursor, USHORT nAlign )
+void SwDoc::SetBoxAlign( const SwCursor& rCursor, sal_uInt16 nAlign )
{
OSL_ENSURE( nAlign == text::VertOrientation::NONE ||
nAlign == text::VertOrientation::CENTER ||
@@ -1237,18 +1233,18 @@ void SwDoc::SetBoxAlign( const SwCursor& rCursor, USHORT nAlign )
SetBoxAttr( rCursor, aVertOri );
}
-USHORT SwDoc::GetBoxAlign( const SwCursor& rCursor ) const
+sal_uInt16 SwDoc::GetBoxAlign( const SwCursor& rCursor ) const
{
- USHORT nAlign = USHRT_MAX;
+ sal_uInt16 nAlign = USHRT_MAX;
SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode();
SwSelBoxes aBoxes;
if( pTblNd && ::lcl_GetBoxSel( rCursor, aBoxes ))
- for( USHORT i = 0; i < aBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < aBoxes.Count(); ++i )
{
const SwFmtVertOrient &rOri =
aBoxes[i]->GetFrmFmt()->GetVertOrient();
if( USHRT_MAX == nAlign )
- nAlign = static_cast<USHORT>(rOri.GetVertOrient());
+ nAlign = static_cast<sal_uInt16>(rOri.GetVertOrient());
else if( rOri.GetVertOrient() != nAlign )
{
nAlign = USHRT_MAX;
@@ -1263,7 +1259,7 @@ USHORT SwDoc::GetBoxAlign( const SwCursor& rCursor ) const
#* Class : SwDoc
#* Methoden : AdjustCellWidth()
#***********************************************************************/
-USHORT lcl_CalcCellFit( const SwLayoutFrm *pCell )
+sal_uInt16 lcl_CalcCellFit( const SwLayoutFrm *pCell )
{
SwTwips nRet = 0;
const SwFrm *pFrm = pCell->Lower(); //Die ganze Zelle.
@@ -1288,7 +1284,7 @@ USHORT lcl_CalcCellFit( const SwLayoutFrm *pCell )
//Um Rechenungenauikeiten, die spaeter bei SwTable::SetTabCols enstehen,
//auszugleichen, addieren wir noch ein bischen.
nRet += COLFUZZY;
- return (USHORT)Max( long(MINLAY), nRet );
+ return (sal_uInt16)Max( long(MINLAY), nRet );
}
/*Die Zelle ist in der Selektion, wird aber nicht von den TabCols beschrieben.
@@ -1305,15 +1301,15 @@ USHORT lcl_CalcCellFit( const SwLayoutFrm *pCell )
void lcl_CalcSubColValues( SvUShorts &rToFill, const SwTabCols &rCols,
const SwLayoutFrm *pCell, const SwLayoutFrm *pTab,
- BOOL bWishValues )
+ sal_Bool bWishValues )
{
- const USHORT nWish = bWishValues ?
+ const sal_uInt16 nWish = bWishValues ?
::lcl_CalcCellFit( pCell ) :
- MINLAY + USHORT(pCell->Frm().Width() - pCell->Prt().Width());
+ MINLAY + sal_uInt16(pCell->Frm().Width() - pCell->Prt().Width());
SWRECTFN( pTab )
- for ( USHORT i = 0 ; i <= rCols.Count(); ++i )
+ for ( sal_uInt16 i = 0 ; i <= rCols.Count(); ++i )
{
long nColLeft = i == 0 ? rCols.GetLeft() : rCols[i-1];
long nColRight = i == rCols.Count() ? rCols.GetRight() : rCols[i];
@@ -1321,7 +1317,7 @@ void lcl_CalcSubColValues( SvUShorts &rToFill, const SwTabCols &rCols,
nColRight += rCols.GetLeftMin();
//Werte auf die Verhaeltnisse der Tabelle (Follows) anpassen.
- if ( rCols.GetLeftMin() != USHORT((pTab->Frm().*fnRect->fnGetLeft)()) )
+ if ( rCols.GetLeftMin() != sal_uInt16((pTab->Frm().*fnRect->fnGetLeft)()) )
{
const long nDiff = (pTab->Frm().*fnRect->fnGetLeft)() - rCols.GetLeftMin();
nColLeft += nDiff;
@@ -1341,8 +1337,8 @@ void lcl_CalcSubColValues( SvUShorts &rToFill, const SwTabCols &rCols,
if ( nWidth && pCell->Frm().Width() )
{
long nTmp = nWidth * nWish / pCell->Frm().Width();
- if ( USHORT(nTmp) > rToFill[i] )
- rToFill[i] = USHORT(nTmp);
+ if ( sal_uInt16(nTmp) > rToFill[i] )
+ rToFill[i] = sal_uInt16(nTmp);
}
}
}
@@ -1351,27 +1347,27 @@ void lcl_CalcSubColValues( SvUShorts &rToFill, const SwTabCols &rCols,
*Es wird nicht ueber die Eintrage in den TabCols itereriert, sondern
*quasi ueber die Zwischenraeume, die ja die Zellen beschreiben.
*
- *bWishValues == TRUE: Es werden zur aktuellen Selektion bzw. zur aktuellen
+ *bWishValues == sal_True: Es werden zur aktuellen Selektion bzw. zur aktuellen
* Zelle die Wunschwerte aller betroffen Zellen ermittelt.
* Sind mehrere Zellen in einer Spalte, so wird der
* groesste Wunschwert als Ergebnis geliefert.
* Fuer die TabCol-Eintraege, zu denen keine Zellen
* ermittelt wurden, werden 0-en eingetragen.
*
- *bWishValues == FALSE: Die Selektion wird senkrecht ausgedehnt. Zu jeder
+ *bWishValues == sal_False: Die Selektion wird senkrecht ausgedehnt. Zu jeder
* Spalte in den TabCols, die sich mit der Selektion
* schneidet wird der Minimalwert ermittelt.
*/
void lcl_CalcColValues( SvUShorts &rToFill, const SwTabCols &rCols,
const SwLayoutFrm *pStart, const SwLayoutFrm *pEnd,
- BOOL bWishValues )
+ sal_Bool bWishValues )
{
SwSelUnions aUnions;
::MakeSelUnions( aUnions, pStart, pEnd,
bWishValues ? nsSwTblSearchType::TBLSEARCH_NONE : nsSwTblSearchType::TBLSEARCH_COL );
- for ( USHORT i2 = 0; i2 < aUnions.Count(); ++i2 )
+ for ( sal_uInt16 i2 = 0; i2 < aUnions.Count(); ++i2 )
{
SwSelUnion *pSelUnion = aUnions[i2];
const SwTabFrm *pTab = pSelUnion->GetTable();
@@ -1388,11 +1384,11 @@ void lcl_CalcColValues( SvUShorts &rToFill, const SwTabCols &rCols,
const long nCLeft = (pCell->Frm().*fnRect->fnGetLeft)();
const long nCRight = (pCell->Frm().*fnRect->fnGetRight)();
- BOOL bNotInCols = TRUE;
+ sal_Bool bNotInCols = sal_True;
- for ( USHORT i = 0; i <= rCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i <= rCols.Count(); ++i )
{
- USHORT nFit = rToFill[i];
+ sal_uInt16 nFit = rToFill[i];
long nColLeft = i == 0 ? rCols.GetLeft() : rCols[i-1];
long nColRight = i == rCols.Count() ? rCols.GetRight() : rCols[i];
@@ -1409,7 +1405,7 @@ void lcl_CalcColValues( SvUShorts &rToFill, const SwTabCols &rCols,
//Werte auf die Verhaeltnisse der Tabelle (Follows) anpassen.
long nLeftA = nColLeft;
long nRightA = nColRight;
- if ( rCols.GetLeftMin() != USHORT((pTab->Frm().*fnRect->fnGetLeft)()) )
+ if ( rCols.GetLeftMin() != sal_uInt16((pTab->Frm().*fnRect->fnGetLeft)()) )
{
const long nDiff = (pTab->Frm().*fnRect->fnGetLeft)() - rCols.GetLeftMin();
nLeftA += nDiff;
@@ -1419,15 +1415,15 @@ void lcl_CalcColValues( SvUShorts &rToFill, const SwTabCols &rCols,
//Wir wollen nicht allzu genau hinsehen.
if ( ::IsSame(nCLeft, nLeftA) && ::IsSame(nCRight, nRightA))
{
- bNotInCols = FALSE;
+ bNotInCols = sal_False;
if ( bWishValues )
{
- const USHORT nWish = ::lcl_CalcCellFit( pCell );
+ const sal_uInt16 nWish = ::lcl_CalcCellFit( pCell );
if ( nWish > nFit )
nFit = nWish;
}
else
- { const USHORT nMin = MINLAY + USHORT(pCell->Frm().Width() -
+ { const sal_uInt16 nMin = MINLAY + sal_uInt16(pCell->Frm().Width() -
pCell->Prt().Width());
if ( !nFit || nMin < nFit )
nFit = nMin;
@@ -1447,7 +1443,7 @@ void lcl_CalcColValues( SvUShorts &rToFill, const SwTabCols &rCols,
}
-void SwDoc::AdjustCellWidth( const SwCursor& rCursor, BOOL bBalance )
+void SwDoc::AdjustCellWidth( const SwCursor& rCursor, sal_Bool bBalance )
{
// pruefe ob vom aktuellen Crsr der Point/Mark in einer Tabelle stehen
SwCntntNode* pCntNd = rCursor.GetPoint()->nNode.GetNode().GetCntntNode();
@@ -1472,17 +1468,17 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, BOOL bBalance )
if ( ! aTabCols.Count() )
return;
- const BYTE nTmp = (BYTE)Max( USHORT(255), USHORT(aTabCols.Count() + 1) );
+ const sal_uInt8 nTmp = (sal_uInt8)Max( sal_uInt16(255), sal_uInt16(aTabCols.Count() + 1) );
SvUShorts aWish( nTmp, nTmp ),
aMins( nTmp, nTmp );
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i <= aTabCols.Count(); ++i )
{
- aWish.Insert( USHORT(0), aWish.Count() );
- aMins.Insert( USHORT(0), aMins.Count() );
+ aWish.Insert( sal_uInt16(0), aWish.Count() );
+ aMins.Insert( sal_uInt16(0), aMins.Count() );
}
- ::lcl_CalcColValues( aWish, aTabCols, pStart, pEnd, TRUE );
+ ::lcl_CalcColValues( aWish, aTabCols, pStart, pEnd, sal_True );
//Es ist Robuster wenn wir die Min-Werte fuer die ganze Tabelle berechnen.
const SwTabFrm *pTab = pStart->ImplFindTabFrm();
@@ -1490,25 +1486,25 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, BOOL bBalance )
pEnd = (SwLayoutFrm*)pTab->FindLastCntnt()->GetUpper();
while( !pEnd->IsCellFrm() )
pEnd = pEnd->GetUpper();
- ::lcl_CalcColValues( aMins, aTabCols, pStart, pEnd, FALSE );
+ ::lcl_CalcColValues( aMins, aTabCols, pStart, pEnd, sal_False );
if( bBalance )
{
//Alle Spalten, die makiert sind haben jetzt einen Wunschwert
//eingtragen. Wir addieren die aktuellen Werte, teilen das Ergebnis
//durch die Anzahl und haben eine Wunschwert fuer den ausgleich.
- USHORT nWish = 0, nCnt = 0;
+ sal_uInt16 nWish = 0, nCnt = 0;
for ( i = 0; i <= aTabCols.Count(); ++i )
{
int nDiff = aWish[i];
if ( nDiff )
{
if ( i == 0 )
- nWish = static_cast<USHORT>( nWish + aTabCols[i] - aTabCols.GetLeft() );
+ nWish = static_cast<sal_uInt16>( nWish + aTabCols[i] - aTabCols.GetLeft() );
else if ( i == aTabCols.Count() )
- nWish = static_cast<USHORT>(nWish + aTabCols.GetRight() - aTabCols[i-1] );
+ nWish = static_cast<sal_uInt16>(nWish + aTabCols.GetRight() - aTabCols[i-1] );
else
- nWish = static_cast<USHORT>(nWish + aTabCols[i] - aTabCols[i-1] );
+ nWish = static_cast<sal_uInt16>(nWish + aTabCols[i] - aTabCols[i-1] );
++nCnt;
}
}
@@ -1518,14 +1514,14 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, BOOL bBalance )
aWish[i] = nWish;
}
- const USHORT nOldRight = static_cast<USHORT>(aTabCols.GetRight());
+ const sal_uInt16 nOldRight = static_cast<sal_uInt16>(aTabCols.GetRight());
//Um die Impl. einfach zu gestalten, aber trotzdem in den meissten Faellen
//den Platz richtig auszunutzen laufen wir zweimal.
//Problem: Erste Spalte wird breiter, die anderen aber erst danach
//schmaler. Die Wunschbreite der ersten Spalte wuerde abgelehnt, weil
//mit ihr die max. Breite der Tabelle ueberschritten wuerde.
- for ( USHORT k= 0; k < 2; ++k )
+ for ( sal_uInt16 k= 0; k < 2; ++k )
{
for ( i = 0; i <= aTabCols.Count(); ++i )
{
@@ -1558,20 +1554,20 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, BOOL bBalance )
nDiff -= nTmpD;
nTabRight -= nTmpD;
}
- for ( USHORT i2 = i; i2 < aTabCols.Count(); ++i2 )
+ for ( sal_uInt16 i2 = i; i2 < aTabCols.Count(); ++i2 )
aTabCols[i2] += nDiff;
aTabCols.SetRight( nTabRight );
}
}
}
- const USHORT nNewRight = static_cast<USHORT>(aTabCols.GetRight());
+ const sal_uInt16 nNewRight = static_cast<sal_uInt16>(aTabCols.GetRight());
SwFrmFmt *pFmt = pTblNd->GetTable().GetFrmFmt();
const sal_Int16 nOriHori = pFmt->GetHoriOrient().GetHoriOrient();
//So, die richtige Arbeit koennen wir jetzt der SwTable ueberlassen.
- SetTabCols( aTabCols, FALSE, 0, (SwCellFrm*)pBoxFrm );
+ SetTabCols( aTabCols, sal_False, 0, (SwCellFrm*)pBoxFrm );
// i54248: lijian/fme
// alignment might have been changed in SetTabCols, restore old value:
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index f42a3a535858..792f4ffaa4ce 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -158,7 +158,7 @@ int Put( boost::shared_ptr<const SfxItemSet>& mrpAttrSet, const SwCntntNode& rNo
// --> FME 2007-4-12 #i76273# Robust: Save the style name items:
SfxItemSet* pStyleNames = 0;
- if ( SFX_ITEM_SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, FALSE ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, sal_False ) )
{
pStyleNames = new SfxItemSet( *aNewSet.GetPool(), RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME );
pStyleNames->Put( aNewSet );
@@ -208,7 +208,7 @@ int Put_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
// --> FME 2007-4-12 #i76273# Robust: Save the style name items:
SfxItemSet* pStyleNames = 0;
- if ( SFX_ITEM_SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, FALSE ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( RES_FRMATR_STYLE_NAME, sal_False ) )
{
pStyleNames = new SfxItemSet( *aNewSet.GetPool(), RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME );
pStyleNames->Put( aNewSet );
@@ -236,28 +236,28 @@ int Put_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
return nRet;
}
-USHORT ClearItem_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
- const SwCntntNode& rNode, USHORT nWhich,
+sal_uInt16 ClearItem_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
+ const SwCntntNode& rNode, sal_uInt16 nWhich,
SwAttrSet* pOld, SwAttrSet* pNew )
{
SwAttrSet aNewSet( (SwAttrSet&)*mrpAttrSet );
if( rNode.GetModifyAtAttr() )
aNewSet.SetModifyAtAttr( &rNode );
- const USHORT nRet = aNewSet.ClearItem_BC( nWhich, pOld, pNew );
+ const sal_uInt16 nRet = aNewSet.ClearItem_BC( nWhich, pOld, pNew );
if ( nRet )
GetNewAutoStyle( mrpAttrSet, rNode, aNewSet );
return nRet;
}
-USHORT ClearItem_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
+sal_uInt16 ClearItem_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
const SwCntntNode& rNode,
- USHORT nWhich1, USHORT nWhich2,
+ sal_uInt16 nWhich1, sal_uInt16 nWhich2,
SwAttrSet* pOld, SwAttrSet* pNew )
{
SwAttrSet aNewSet( (SwAttrSet&)*mrpAttrSet );
if( rNode.GetModifyAtAttr() )
aNewSet.SetModifyAtAttr( &rNode );
- const USHORT nRet = aNewSet.ClearItem_BC( nWhich1, nWhich2, pOld, pNew );
+ const sal_uInt16 nRet = aNewSet.ClearItem_BC( nWhich1, nWhich2, pOld, pNew );
if ( nRet )
GetNewAutoStyle( mrpAttrSet, rNode, aNewSet );
return nRet;
@@ -284,13 +284,13 @@ USHORT ClearItem_BC( boost::shared_ptr<const SfxItemSet>& mrpAttrSet,
*******************************************************************/
-USHORT SwNode::GetSectionLevel() const
+sal_uInt16 SwNode::GetSectionLevel() const
{
// EndNode einer Grund-Section ?? diese sind immer 0 !!
if( IsEndNode() && 0 == pStartOfSection->StartOfSectionIndex() )
return 0;
- USHORT nLevel;
+ sal_uInt16 nLevel;
const SwNode* pNode = IsStartNode() ? this : pStartOfSection;
for( nLevel = 1; 0 != pNode->StartOfSectionIndex(); ++nLevel )
pNode = pNode->pStartOfSection;
@@ -323,10 +323,10 @@ USHORT SwNode::GetSectionLevel() const
long SwNode::nSerial = 0;
#endif
-SwNode::SwNode( const SwNodeIndex &rWhere, const BYTE nNdType )
+SwNode::SwNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType )
: nNodeType( nNdType ), pStartOfSection( 0 )
{
- bSetNumLSpace = bIgnoreDontExpand = FALSE;
+ bSetNumLSpace = bIgnoreDontExpand = sal_False;
nAFmtNumLvl = 0;
SwNodes& rNodes = (SwNodes&)rWhere.GetNodes();
@@ -357,10 +357,10 @@ SwNode::SwNode( const SwNodeIndex &rWhere, const BYTE nNdType )
#endif
}
-SwNode::SwNode( SwNodes& rNodes, ULONG nPos, const BYTE nNdType )
+SwNode::SwNode( SwNodes& rNodes, sal_uLong nPos, const sal_uInt8 nNdType )
: nNodeType( nNdType ), pStartOfSection( 0 )
{
- bSetNumLSpace = bIgnoreDontExpand = FALSE;
+ bSetNumLSpace = bIgnoreDontExpand = sal_False;
nAFmtNumLvl = 0;
SwNode* pInsNd = this; // der MAC kann this nicht einfuegen !!
@@ -414,9 +414,9 @@ SwTableNode* SwNode::FindTableNode()
// liegt der Node im Sichtbarenbereich der Shell ?
-BOOL SwNode::IsInVisibleArea( ViewShell* pSh ) const
+sal_Bool SwNode::IsInVisibleArea( ViewShell* pSh ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwCntntNode* pNd;
if( ND_STARTNODE & nNodeType )
@@ -433,7 +433,7 @@ BOOL SwNode::IsInVisibleArea( ViewShell* pSh ) const
pNd = GetCntntNode();
const SwFrm* pFrm;
- if( pNd && 0 != ( pFrm = pNd->GetFrm( 0, 0, FALSE ) ) )
+ if( pNd && 0 != ( pFrm = pNd->GetFrm( 0, 0, sal_False ) ) )
{
if( !pSh )
// dann die Shell vom Doc besorgen:
@@ -450,14 +450,14 @@ BOOL SwNode::IsInVisibleArea( ViewShell* pSh ) const
} while ( pFrm && !pFrm->IsValid() );
if( !pFrm || pSh->VisArea().IsOver( pFrm->Frm() ) )
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
}
-BOOL SwNode::IsInProtectSect() const
+sal_Bool SwNode::IsInProtectSect() const
{
const SwNode* pNd = ND_SECTIONNODE == nNodeType ? pStartOfSection : this;
const SwSectionNode* pSectNd = pNd->FindSectionNode();
@@ -467,12 +467,12 @@ BOOL SwNode::IsInProtectSect() const
// befindet sich der Node in irgendetwas geschuetzten ?
// (Bereich/Rahmen/Tabellenzellen/... incl. des Ankers bei
// Rahmen/Fussnoten/..)
-BOOL SwNode::IsProtect() const
+sal_Bool SwNode::IsProtect() const
{
const SwNode* pNd = ND_SECTIONNODE == nNodeType ? pStartOfSection : this;
const SwStartNode* pSttNd = pNd->FindSectionNode();
if( pSttNd && ((SwSectionNode*)pSttNd)->GetSection().IsProtectFlag() )
- return TRUE;
+ return sal_True;
if( 0 != ( pSttNd = FindTableBoxStartNode() ) )
{
@@ -484,18 +484,18 @@ BOOL SwNode::IsProtect() const
GetTblBox( pSttNd->GetIndex() );
//Robust #149568
if( pBox && pBox->GetFrmFmt()->GetProtect().IsCntntProtected() )
- return TRUE;
+ return sal_True;
}
SwFrmFmt* pFlyFmt = GetFlyFmt();
if( pFlyFmt )
{
if( pFlyFmt->GetProtect().IsCntntProtected() )
- return TRUE;
+ return sal_True;
const SwFmtAnchor& rAnchor = pFlyFmt->GetAnchor();
return rAnchor.GetCntntAnchor()
? rAnchor.GetCntntAnchor()->nNode.GetNode().IsProtect()
- : FALSE;
+ : sal_False;
}
if( 0 != ( pSttNd = FindFootnoteStartNode() ) )
@@ -506,13 +506,13 @@ BOOL SwNode::IsProtect() const
return pTFtn->GetTxtNode().IsProtect();
}
- return FALSE;
+ return sal_False;
}
// suche den PageDesc, mit dem dieser Node formatiert ist. Wenn das
// Layout vorhanden ist wird ueber das gesucht, ansonsten gibt es nur
// die harte Tour ueber die Nodes nach vorne suchen!!
-const SwPageDesc* SwNode::FindPageDesc( BOOL bCalcLay,
+const SwPageDesc* SwNode::FindPageDesc( sal_Bool bCalcLay,
sal_uInt32* pPgDescNdIdx ) const
{
if ( !GetNodes().IsDocNodes() )
@@ -568,7 +568,7 @@ const SwPageDesc* SwNode::FindPageDesc( BOOL bCalcLay,
// dann erstmal den richtigen Anker finden
const SwFrmFmt* pFmt = 0;
const SwSpzFrmFmts& rFmts = *pDoc->GetSpzFrmFmts();
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < rFmts.Count(); ++n )
{
@@ -622,7 +622,7 @@ const SwPageDesc* SwNode::FindPageDesc( BOOL bCalcLay,
if( n >= rFmts.Count() )
{
OSL_ENSURE( !this, "Fly-Section aber kein Format gefunden" );
- return FALSE;
+ return sal_False;
}
}
}
@@ -645,7 +645,7 @@ const SwPageDesc* SwNode::FindPageDesc( BOOL bCalcLay,
0 != ( pSttNd = pNd->FindFooterStartNode() ))
{
// dann in den PageDescs diesen StartNode suchen
- USHORT nId;
+ sal_uInt16 nId;
UseOnPage eAskUse;
if( SwHeaderStartNode == pSttNd->GetStartNodeType())
{
@@ -658,7 +658,7 @@ const SwPageDesc* SwNode::FindPageDesc( BOOL bCalcLay,
eAskUse = nsUseOnPage::PD_FOOTERSHARE;
}
- for( USHORT n = pDoc->GetPageDescCnt(); n && !pPgDesc; )
+ for( sal_uInt16 n = pDoc->GetPageDescCnt(); n && !pPgDesc; )
{
const SwPageDesc& rPgDsc = pDoc->GetPageDesc( --n );
const SwFrmFmt* pFmt = &rPgDsc.GetMaster();
@@ -693,7 +693,7 @@ const SwPageDesc* SwNode::FindPageDesc( BOOL bCalcLay,
// der Anker kann nur im Bodytext sein
const SwTxtFtn* pTxtFtn;
const SwFtnIdxs& rFtnArr = pDoc->GetFtnIdxs();
- for( USHORT n = 0; n < rFtnArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFtnArr.Count(); ++n )
if( 0 != ( pTxtFtn = rFtnArr[ n ])->GetStartNode() &&
(SwNode*)pSttNd ==
&pTxtFtn->GetStartNode()->GetNode() )
@@ -721,9 +721,9 @@ const SwPageDesc* SwNode::FindPageDesc( BOOL bCalcLay,
SwFindNearestNode aInfo( *pNd );
// dann ueber alle Nodes aller PageDesc
const SfxPoolItem* pItem;
- USHORT i, nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_PAGEDESC );
+ sal_uInt32 i, nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_PAGEDESC );
for( i = 0; i < nMaxItems; ++i )
- if( 0 != (pItem = pDoc->GetAttrPool().GetItem( RES_PAGEDESC, i ) ) &&
+ if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_PAGEDESC, i ) ) &&
((SwFmtPageDesc*)pItem)->GetDefinedIn() )
{
const SwModify* pMod = ((SwFmtPageDesc*)pItem)->GetDefinedIn();
@@ -776,7 +776,7 @@ SwFrmFmt* SwNode::GetFlyFmt() const
{
// dann gibts noch harten steinigen Weg uebers Dokument:
const SwSpzFrmFmts& rFrmFmtTbl = *GetDoc()->GetSpzFrmFmts();
- for( USHORT n = 0; n < rFrmFmtTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFrmFmtTbl.Count(); ++n )
{
SwFrmFmt* pFmt = rFrmFmtTbl[n];
const SwFmtCntnt& rCntnt = pFmt->GetCntnt();
@@ -815,21 +815,21 @@ SwStartNode* SwNode::FindSttNodeByType( SwStartNodeType eTyp )
return eTyp == pTmp->GetStartNodeType() ? pTmp : 0;
}
-const SwTxtNode* SwNode::FindOutlineNodeOfLevel( BYTE nLvl ) const
+const SwTxtNode* SwNode::FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const
{
const SwTxtNode* pRet = 0;
const SwOutlineNodes& rONds = GetNodes().GetOutLineNds();
if( MAXLEVEL > nLvl && rONds.Count() )
{
- USHORT nPos;
+ sal_uInt16 nPos;
SwNode* pNd = (SwNode*)this;
- BOOL bCheckFirst = FALSE;
+ sal_Bool bCheckFirst = sal_False;
if( !rONds.Seek_Entry( pNd, &nPos ))
{
if( nPos )
nPos = nPos-1;
else
- bCheckFirst = TRUE;
+ bCheckFirst = sal_True;
}
if( bCheckFirst )
@@ -842,8 +842,8 @@ const SwTxtNode* SwNode::FindOutlineNodeOfLevel( BYTE nLvl ) const
const SwCntntNode* pCNd = GetCntntNode();
Point aPt( 0, 0 );
- const SwFrm* pFrm = pRet->GetFrm( &aPt, 0, FALSE ),
- * pMyFrm = pCNd ? pCNd->GetFrm( &aPt, 0, FALSE ) : 0;
+ const SwFrm* pFrm = pRet->GetFrm( &aPt, 0, sal_False ),
+ * pMyFrm = pCNd ? pCNd->GetFrm( &aPt, 0, sal_False ) : 0;
const SwPageFrm* pPgFrm = pFrm ? pFrm->FindPageFrm() : 0;
if( pPgFrm && pMyFrm &&
pPgFrm->Frm().Top() > pMyFrm->Frm().Top() )
@@ -875,11 +875,11 @@ inline sal_Bool IsValidNextPrevNd( const SwNode& rNd )
ND_TABLENODE == rNd.StartOfSectionNode()->GetNodeType() );
}
-BYTE SwNode::HasPrevNextLayNode() const
+sal_uInt8 SwNode::HasPrevNextLayNode() const
{
// assumption: <this> node is a node inside the document nodes array section.
- BYTE nRet = 0;
+ sal_uInt8 nRet = 0;
if( IsValidNextPrevNd( *this ))
{
SwNodeIndex aIdx( *this, -1 );
@@ -922,7 +922,7 @@ BYTE SwNode::HasPrevNextLayNode() const
*******************************************************************/
-SwStartNode::SwStartNode( const SwNodeIndex &rWhere, const BYTE nNdType,
+SwStartNode::SwStartNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType,
SwStartNodeType eSttNd )
: SwNode( rWhere, nNdType ), eSttNdTyp( eSttNd )
{
@@ -930,7 +930,7 @@ SwStartNode::SwStartNode( const SwNodeIndex &rWhere, const BYTE nNdType,
pEndOfSection = (SwEndNode*)this;
}
-SwStartNode::SwStartNode( SwNodes& rNodes, ULONG nPos )
+SwStartNode::SwStartNode( SwNodes& rNodes, sal_uLong nPos )
: SwNode( rNodes, nPos, ND_STARTNODE ), eSttNdTyp( SwNormalStartNode )
{
// erstmal temporaer, bis der EndNode eingefuegt wird.
@@ -942,7 +942,7 @@ void SwStartNode::CheckSectionCondColl() const
{
//FEATURE::CONDCOLL
SwNodeIndex aIdx( *this );
- ULONG nEndIdx = EndOfSectionIndex();
+ sal_uLong nEndIdx = EndOfSectionIndex();
const SwNodes& rNds = GetNodes();
SwCntntNode* pCNd;
while( 0 != ( pCNd = rNds.GoNext( &aIdx )) && pCNd->GetIndex() < nEndIdx )
@@ -982,7 +982,7 @@ SwEndNode::SwEndNode( const SwNodeIndex &rWhere, SwStartNode& rSttNd )
pStartOfSection->pEndOfSection = this;
}
-SwEndNode::SwEndNode( SwNodes& rNds, ULONG nPos, SwStartNode& rSttNd )
+SwEndNode::SwEndNode( SwNodes& rNds, sal_uLong nPos, SwStartNode& rSttNd )
: SwNode( rNds, nPos, ND_ENDNODE )
{
pStartOfSection = &rSttNd;
@@ -996,7 +996,7 @@ SwEndNode::SwEndNode( SwNodes& rNds, ULONG nPos, SwStartNode& rSttNd )
// --------------------
-SwCntntNode::SwCntntNode( const SwNodeIndex &rWhere, const BYTE nNdType,
+SwCntntNode::SwCntntNode( const SwNodeIndex &rWhere, const sal_uInt8 nNdType,
SwFmtColl *pColl )
: SwModify( pColl ), // CrsrsShell, FrameFmt,
SwNode( rWhere, nNdType ),
@@ -1023,7 +1023,7 @@ SwCntntNode::~SwCntntNode()
void SwCntntNode::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
{
- USHORT nWhich = pOldValue ? pOldValue->Which() :
+ sal_uInt16 nWhich = pOldValue ? pOldValue->Which() :
pNewValue ? pNewValue->Which() : 0 ;
switch( nWhich )
@@ -1080,7 +1080,7 @@ void SwCntntNode::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
if( GetNodes().IsDocNodes() && IsTxtNode() )
{
if( SFX_ITEM_SET == ((SwAttrSetChg*)pOldValue)->GetChgSet()->GetItemState(
- RES_CHRATR_HIDDEN, FALSE ) )
+ RES_CHRATR_HIDDEN, sal_False ) )
{
((SwTxtNode*)this)->SetCalcHiddenCharFlags();
}
@@ -1090,7 +1090,7 @@ void SwCntntNode::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
case RES_UPDATE_ATTR:
if( GetNodes().IsDocNodes() && IsTxtNode() )
{
- const USHORT nTmp = ((SwUpdateAttr*)pNewValue)->nWhichAttr;
+ const sal_uInt16 nTmp = ((SwUpdateAttr*)pNewValue)->nWhichAttr;
if ( RES_ATTRSET_CHG == nTmp )
{
// anybody wants to do some optimization here?
@@ -1103,17 +1103,17 @@ void SwCntntNode::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
SwModify::Modify( pOldValue, pNewValue );
}
-BOOL SwCntntNode::InvalidateNumRule()
+sal_Bool SwCntntNode::InvalidateNumRule()
{
SwNumRule* pRule = 0;
const SfxPoolItem* pItem;
if( GetNodes().IsDocNodes() &&
- 0 != ( pItem = GetNoCondAttr( RES_PARATR_NUMRULE, TRUE )) &&
+ 0 != ( pItem = GetNoCondAttr( RES_PARATR_NUMRULE, sal_True )) &&
((SwNumRuleItem*)pItem)->GetValue().Len() &&
0 != (pRule = GetDoc()->FindNumRulePtr(
((SwNumRuleItem*)pItem)->GetValue() ) ) )
{
- pRule->SetInvalidRule( TRUE );
+ pRule->SetInvalidRule( sal_True );
}
return 0 != pRule;
}
@@ -1121,14 +1121,14 @@ BOOL SwCntntNode::InvalidateNumRule()
SwCntntFrm *SwCntntNode::GetFrm( const Point* pPoint,
const SwPosition *pPos,
- const BOOL bCalcFrm ) const
+ const sal_Bool bCalcFrm ) const
{
return (SwCntntFrm*) ::GetFrmOfModify( *(SwModify*)this, FRM_CNTNT,
pPoint, pPos, bCalcFrm );
}
-SwRect SwCntntNode::FindLayoutRect( const BOOL bPrtArea, const Point* pPoint,
- const BOOL bCalcFrm ) const
+SwRect SwCntntNode::FindLayoutRect( const sal_Bool bPrtArea, const Point* pPoint,
+ const sal_Bool bCalcFrm ) const
{
SwRect aRet;
SwCntntFrm* pFrm = (SwCntntFrm*)::GetFrmOfModify( *(SwModify*)this,
@@ -1138,8 +1138,8 @@ SwRect SwCntntNode::FindLayoutRect( const BOOL bPrtArea, const Point* pPoint,
return aRet;
}
-SwRect SwCntntNode::FindPageFrmRect( const BOOL bPrtArea, const Point* pPoint,
- const BOOL bCalcFrm ) const
+SwRect SwCntntNode::FindPageFrmRect( const sal_Bool bPrtArea, const Point* pPoint,
+ const sal_Bool bCalcFrm ) const
{
SwRect aRet;
SwFrm* pFrm = ::GetFrmOfModify( *(SwModify*)this,
@@ -1170,7 +1170,7 @@ SwFmtColl *SwCntntNode::ChgFmtColl( SwFmtColl *pNewColl )
//FEATURE::CONDCOLL
// HACK: hier muss die entsprechend der neuen Vorlage die Bedingungen
// neu ueberprueft werden!
- if( TRUE /*pNewColl */ )
+ if( sal_True /*pNewColl */ )
{
SetCondFmtColl( 0 );
}
@@ -1188,15 +1188,15 @@ SwFmtColl *SwCntntNode::ChgFmtColl( SwFmtColl *pNewColl )
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
return pOldColl;
}
-BOOL SwCntntNode::GoNext(SwIndex * pIdx, USHORT nMode ) const
+sal_Bool SwCntntNode::GoNext(SwIndex * pIdx, sal_uInt16 nMode ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( pIdx->GetIndex() < Len() )
{
if( !IsTxtNode() )
@@ -1228,23 +1228,23 @@ BOOL SwCntntNode::GoNext(SwIndex * pIdx, USHORT nMode ) const
if( 1 == nDone )
*pIdx = nPos;
else
- bRet = FALSE;
+ bRet = sal_False;
}
else if( nPos < rTNd.GetTxt().Len() )
(*pIdx)++;
else
- bRet = FALSE;
+ bRet = sal_False;
}
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
-BOOL SwCntntNode::GoPrevious(SwIndex * pIdx, USHORT nMode ) const
+sal_Bool SwCntntNode::GoPrevious(SwIndex * pIdx, sal_uInt16 nMode ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( pIdx->GetIndex() > 0 )
{
if( !IsTxtNode() )
@@ -1276,16 +1276,16 @@ BOOL SwCntntNode::GoPrevious(SwIndex * pIdx, USHORT nMode ) const
if( 1 == nDone )
*pIdx = nPos;
else
- bRet = FALSE;
+ bRet = sal_False;
}
else if( nPos )
(*pIdx)--;
else
- bRet = FALSE;
+ bRet = sal_False;
}
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
@@ -1377,7 +1377,7 @@ void SwCntntNode::DelFrms()
{
SwCntntFrm* pMaster = (SwTxtFrm*)pFrm->FindMaster();
pMaster->SetFollow( pFrm->GetFollow() );
- pFrm->_SetIsFollow( FALSE );
+ pFrm->_SetIsFollow( sal_False );
}
pFrm->SetFollow( 0 );//Damit er nicht auf dumme Gedanken kommt.
//Andernfalls kann es sein, dass ein Follow
@@ -1433,7 +1433,7 @@ SwCntntNode *SwCntntNode::JoinPrev()
// erfrage vom Modify Informationen
-BOOL SwCntntNode::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwCntntNode::GetInfo( SfxPoolItem& rInfo ) const
{
switch( rInfo.Which() )
{
@@ -1441,21 +1441,21 @@ BOOL SwCntntNode::GetInfo( SfxPoolItem& rInfo ) const
if( &GetNodes() == ((SwAutoFmtGetDocNode&)rInfo).pNodes )
{
((SwAutoFmtGetDocNode&)rInfo).pCntntNode = this;
- return FALSE;
+ return sal_False;
}
break;
case RES_FINDNEARESTNODE:
if( ((SwFmtPageDesc&)GetAttr( RES_PAGEDESC )).GetPageDesc() )
((SwFindNearestNode&)rInfo).CheckNode( *this );
- return TRUE;
+ return sal_True;
case RES_CONTENT_VISIBLE:
{
((SwPtrMsgPoolItem&)rInfo).pObject =
SwClientIter( *(SwCntntNode*)this ).First( TYPE(SwFrm) );
}
- return FALSE;
+ return sal_False;
}
return SwModify::GetInfo( rInfo );
@@ -1463,7 +1463,7 @@ BOOL SwCntntNode::GetInfo( SfxPoolItem& rInfo ) const
// setze ein Attribut
-BOOL SwCntntNode::SetAttr(const SfxPoolItem& rAttr )
+sal_Bool SwCntntNode::SetAttr(const SfxPoolItem& rAttr )
{
if( !GetpSwAttrSet() ) // lasse von den entsprechenden Nodes die
NewAttrSet( GetDoc()->GetAttrPool() ); // AttrSets anlegen
@@ -1473,10 +1473,10 @@ BOOL SwCntntNode::SetAttr(const SfxPoolItem& rAttr )
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// wenn Modify gelockt ist, werden keine Modifies verschickt
if( IsModifyLocked() ||
( !GetDepends() && RES_PARATR_NUMRULE != rAttr.Which() ))
@@ -1498,16 +1498,16 @@ BOOL SwCntntNode::SetAttr(const SfxPoolItem& rAttr )
}
#include <svl/itemiter.hxx>
-BOOL SwCntntNode::SetAttr( const SfxItemSet& rSet )
+sal_Bool SwCntntNode::SetAttr( const SfxItemSet& rSet )
{
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
const SfxPoolItem* pFnd = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_AUTO_STYLE, FALSE, &pFnd ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_AUTO_STYLE, sal_False, &pFnd ) )
{
OSL_ENSURE( rSet.Count() == 1, "SetAutoStyle mixed with other attributes?!" );
const SwFmtAutoFmt* pTmp = static_cast<const SwFmtAutoFmt*>(pFnd);
@@ -1536,24 +1536,24 @@ BOOL SwCntntNode::SetAttr( const SfxItemSet& rSet )
// the string is empty.
const SfxPoolItem* pNameItem = 0;
if ( 0 != GetCondFmtColl() ||
- SFX_ITEM_SET != mpAttrSet->GetItemState( RES_FRMATR_STYLE_NAME, FALSE, &pNameItem ) ||
+ SFX_ITEM_SET != mpAttrSet->GetItemState( RES_FRMATR_STYLE_NAME, sal_False, &pNameItem ) ||
0 == static_cast<const SfxStringItem*>(pNameItem)->GetValue().Len() )
AttrSetHandleHelper::SetParent( mpAttrSet, *this, &GetAnyFmtColl(), GetFmtColl() );
else
const_cast<SfxItemSet*>(mpAttrSet.get())->SetParent( &GetFmtColl()->GetAttrSet() );
}
- return TRUE;
+ return sal_True;
}
if( !GetpSwAttrSet() ) // lasse von den entsprechenden Nodes die
NewAttrSet( GetDoc()->GetAttrPool() ); // AttrSets anlegen
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// wenn Modify gelockt ist, werden keine Modifies verschickt
if ( IsModifyLocked() ||
( !GetDepends() &&
- SFX_ITEM_SET != rSet.GetItemState( RES_PARATR_NUMRULE, FALSE ) ) )
+ SFX_ITEM_SET != rSet.GetItemState( RES_PARATR_NUMRULE, sal_False ) ) )
{
// einige Sonderbehandlungen fuer Attribute
bRet = 0 != AttrSetHandleHelper::Put( mpAttrSet, *this, rSet );
@@ -1576,24 +1576,24 @@ BOOL SwCntntNode::SetAttr( const SfxItemSet& rSet )
// Nimmt den Hint mit nWhich aus dem Delta-Array
-BOOL SwCntntNode::ResetAttr( USHORT nWhich1, USHORT nWhich2 )
+sal_Bool SwCntntNode::ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 )
{
if( !GetpSwAttrSet() )
- return FALSE;
+ return sal_False;
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
// wenn Modify gelockt ist, werden keine Modifies verschickt
if( IsModifyLocked() )
{
- USHORT nDel = 0;
+ sal_uInt16 nDel = 0;
if ( !nWhich2 || nWhich2 < nWhich1 )
{
- std::vector<USHORT> aClearWhichIds;
+ std::vector<sal_uInt16> aClearWhichIds;
aClearWhichIds.push_back( nWhich1 );
nDel = ClearItemsFromAttrSet( aClearWhichIds );
}
@@ -1611,7 +1611,7 @@ BOOL SwCntntNode::ResetAttr( USHORT nWhich1, USHORT nWhich2 )
SwAttrSet aOld( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() ),
aNew( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() );
- BOOL bRet = 0 != AttrSetHandleHelper::ClearItem_BC( mpAttrSet, *this, nWhich1, nWhich2, &aOld, &aNew );
+ sal_Bool bRet = 0 != AttrSetHandleHelper::ClearItem_BC( mpAttrSet, *this, nWhich1, nWhich2, &aOld, &aNew );
if( bRet )
{
@@ -1624,23 +1624,23 @@ BOOL SwCntntNode::ResetAttr( USHORT nWhich1, USHORT nWhich2 )
}
return bRet;
}
-BOOL SwCntntNode::ResetAttr( const SvUShorts& rWhichArr )
+sal_Bool SwCntntNode::ResetAttr( const SvUShorts& rWhichArr )
{
if( !GetpSwAttrSet() )
- return FALSE;
+ return sal_False;
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
// wenn Modify gelockt ist, werden keine Modifies verschickt
- USHORT nDel = 0;
+ sal_uInt16 nDel = 0;
if( IsModifyLocked() )
{
- std::vector<USHORT> aClearWhichIds;
- for( USHORT n = 0, nEnd = rWhichArr.Count(); n < nEnd; ++n )
+ std::vector<sal_uInt16> aClearWhichIds;
+ for( sal_uInt16 n = 0, nEnd = rWhichArr.Count(); n < nEnd; ++n )
aClearWhichIds.push_back( rWhichArr[ n ] );
nDel = ClearItemsFromAttrSet( aClearWhichIds );
@@ -1650,7 +1650,7 @@ BOOL SwCntntNode::ResetAttr( const SvUShorts& rWhichArr )
SwAttrSet aOld( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() ),
aNew( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() );
- for( USHORT n = 0, nEnd = rWhichArr.Count(); n < nEnd; ++n )
+ for( sal_uInt16 n = 0, nEnd = rWhichArr.Count(); n < nEnd; ++n )
if( AttrSetHandleHelper::ClearItem_BC( mpAttrSet, *this, rWhichArr[ n ], &aOld, &aNew ))
++nDel;
@@ -1667,7 +1667,7 @@ BOOL SwCntntNode::ResetAttr( const SvUShorts& rWhichArr )
}
-USHORT SwCntntNode::ResetAllAttr()
+sal_uInt16 SwCntntNode::ResetAllAttr()
{
if( !GetpSwAttrSet() )
return 0;
@@ -1675,15 +1675,15 @@ USHORT SwCntntNode::ResetAllAttr()
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
// wenn Modify gelockt ist, werden keine Modifies verschickt
if( IsModifyLocked() )
{
- std::vector<USHORT> aClearWhichIds;
+ std::vector<sal_uInt16> aClearWhichIds;
aClearWhichIds.push_back(0);
- USHORT nDel = ClearItemsFromAttrSet( aClearWhichIds );
+ sal_uInt16 nDel = ClearItemsFromAttrSet( aClearWhichIds );
if( !GetpSwAttrSet()->Count() ) // leer, dann loeschen
mpAttrSet.reset(); // DELETEZ( mpAttrSet );
return nDel;
@@ -1691,7 +1691,7 @@ USHORT SwCntntNode::ResetAllAttr()
SwAttrSet aOld( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() ),
aNew( *GetpSwAttrSet()->GetPool(), GetpSwAttrSet()->GetRanges() );
- BOOL bRet = 0 != AttrSetHandleHelper::ClearItem_BC( mpAttrSet, *this, 0, &aOld, &aNew );
+ sal_Bool bRet = 0 != AttrSetHandleHelper::ClearItem_BC( mpAttrSet, *this, 0, &aOld, &aNew );
if( bRet )
{
@@ -1706,28 +1706,28 @@ USHORT SwCntntNode::ResetAllAttr()
}
-BOOL SwCntntNode::GetAttr( SfxItemSet& rSet, BOOL bInParent ) const
+sal_Bool SwCntntNode::GetAttr( SfxItemSet& rSet, sal_Bool bInParent ) const
{
if( rSet.Count() )
rSet.ClearItem();
const SwAttrSet& rAttrSet = GetSwAttrSet();
if( bInParent )
- return rSet.Set( rAttrSet, TRUE ) ? TRUE : FALSE;
+ return rSet.Set( rAttrSet, sal_True ) ? sal_True : sal_False;
rSet.Put( rAttrSet );
- return rSet.Count() ? TRUE : FALSE;
+ return rSet.Count() ? sal_True : sal_False;
}
-USHORT SwCntntNode::ClearItemsFromAttrSet( const std::vector<USHORT>& rWhichIds )
+sal_uInt16 SwCntntNode::ClearItemsFromAttrSet( const std::vector<sal_uInt16>& rWhichIds )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if ( 0 == rWhichIds.size() )
return nRet;
OSL_ENSURE( GetpSwAttrSet(), "no item set" );
SwAttrSet aNewAttrSet( *GetpSwAttrSet() );
- for ( std::vector<USHORT>::const_iterator aIter = rWhichIds.begin();
+ for ( std::vector<sal_uInt16>::const_iterator aIter = rWhichIds.begin();
aIter != rWhichIds.end();
++aIter )
{
@@ -1739,14 +1739,14 @@ USHORT SwCntntNode::ClearItemsFromAttrSet( const std::vector<USHORT>& rWhichIds
return nRet;
}
-const SfxPoolItem* SwCntntNode::GetNoCondAttr( USHORT nWhich,
- BOOL bInParents ) const
+const SfxPoolItem* SwCntntNode::GetNoCondAttr( sal_uInt16 nWhich,
+ sal_Bool bInParents ) const
{
const SfxPoolItem* pFnd = 0;
if( pCondColl && pCondColl->GetRegisteredIn() )
{
if( !GetpSwAttrSet() || ( SFX_ITEM_SET != GetpSwAttrSet()->GetItemState(
- nWhich, FALSE, &pFnd ) && bInParents ))
+ nWhich, sal_False, &pFnd ) && bInParents ))
((SwFmt*)GetRegisteredIn())->GetItemState( nWhich, bInParents, &pFnd );
}
// undo change of issue #i51029#
@@ -1766,7 +1766,7 @@ const SfxPoolItem* SwCntntNode::GetNoCondAttr( USHORT nWhich,
int SwCntntNode::CanJoinNext( SwNodeIndex* pIdx ) const
{
const SwNodes& rNds = GetNodes();
- BYTE nNdType = GetNodeType();
+ sal_uInt8 nNdType = GetNodeType();
SwNodeIndex aIdx( *this, 1 );
const SwNode* pNd = this;
@@ -1776,7 +1776,7 @@ int SwCntntNode::CanJoinNext( SwNodeIndex* pIdx ) const
aIdx++;
if( pNd->GetNodeType() != nNdType || rNds.Count()-1 == aIdx.GetIndex() )
- return FALSE;
+ return sal_False;
if( IsTxtNode() )
{ // Do not merge strings if the result exceeds the allowed string length
const SwTxtNode* pTxtNd = static_cast<const SwTxtNode*>(this);
@@ -1784,11 +1784,11 @@ int SwCntntNode::CanJoinNext( SwNodeIndex* pIdx ) const
pTxtNd = static_cast<const SwTxtNode*>(pNd);
nSum += pTxtNd->GetTxt().Len();
if( nSum > STRING_LEN )
- return FALSE;
+ return sal_False;
}
if( pIdx )
*pIdx = aIdx;
- return TRUE;
+ return sal_True;
}
@@ -1796,7 +1796,7 @@ int SwCntntNode::CanJoinNext( SwNodeIndex* pIdx ) const
// in pIdx kann die 2. Position returnt werden.
int SwCntntNode::CanJoinPrev( SwNodeIndex* pIdx ) const
{
- BYTE nNdType = GetNodeType();
+ sal_uInt8 nNdType = GetNodeType();
SwNodeIndex aIdx( *this, -1 );
const SwNode* pNd = this;
@@ -1806,10 +1806,10 @@ int SwCntntNode::CanJoinPrev( SwNodeIndex* pIdx ) const
aIdx--;
if( pNd->GetNodeType() != nNdType || 0 == aIdx.GetIndex() )
- return FALSE;
+ return sal_False;
if( pIdx )
*pIdx = aIdx;
- return TRUE;
+ return sal_True;
}
@@ -1842,13 +1842,13 @@ void SwCntntNode::SetCondFmtColl( SwFmtColl* pColl )
if( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
}
}
-BOOL SwCntntNode::IsAnyCondition( SwCollCondition& rTmp ) const
+sal_Bool SwCntntNode::IsAnyCondition( SwCollCondition& rTmp ) const
{
const SwNodes& rNds = GetNodes();
{
@@ -1883,7 +1883,7 @@ BOOL SwCntntNode::IsAnyCondition( SwCollCondition& rTmp ) const
const SwTxtFtn* pTxtFtn;
const SwNode* pSrchNd = pSttNd;
- for( USHORT n = 0; n < rFtnArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFtnArr.Count(); ++n )
if( 0 != ( pTxtFtn = rFtnArr[ n ])->GetStartNode() &&
pSrchNd == &pTxtFtn->GetStartNode()->GetNode() )
{
@@ -1902,7 +1902,7 @@ BOOL SwCntntNode::IsAnyCondition( SwCollCondition& rTmp ) const
if( nCond )
{
rTmp.SetCondition( (Master_CollConditions)nCond, 0 );
- return TRUE;
+ return sal_True;
}
pSttNd = pSttNd->GetIndex()
? pSttNd->StartOfSectionNode()
@@ -1911,7 +1911,7 @@ BOOL SwCntntNode::IsAnyCondition( SwCollCondition& rTmp ) const
}
{
- USHORT nPos;
+ sal_uInt16 nPos;
const SwOutlineNodes& rOutlNds = rNds.GetOutLineNds();
if( rOutlNds.Count() )
{
@@ -1925,13 +1925,13 @@ BOOL SwCntntNode::IsAnyCondition( SwCollCondition& rTmp ) const
if( pOutlNd->IsOutline())
{
rTmp.SetCondition( PARA_IN_OUTLINE, pOutlNd->GetAttrOutlineLevel() - 1 );
- return TRUE;
+ return sal_True;
}
}
}
}
- return FALSE;
+ return sal_False;
}
@@ -1990,7 +1990,7 @@ short SwCntntNode::GetTextDirection( const SwPosition& rPos,
aPt = *pPt;
// #i72024# - No format of the frame, because this can cause recursive layout actions
- SwFrm* pFrm = GetFrm( &aPt, &rPos, FALSE );
+ SwFrm* pFrm = GetFrm( &aPt, &rPos, sal_False );
if ( pFrm )
{
@@ -2053,10 +2053,10 @@ IDocumentListItems& SwNode::getIDocumentListItems()
return *GetDoc();
}
-BOOL SwNode::IsInRedlines() const
+sal_Bool SwNode::IsInRedlines() const
{
const SwDoc * pDoc = GetDoc();
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
if (pDoc != NULL)
bResult = pDoc->IsInRedlines(*this);
diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx
index 5882e9038831..88169f482382 100644
--- a/sw/source/core/docnode/node2lay.cxx
+++ b/sw/source/core/docnode/node2lay.cxx
@@ -52,34 +52,34 @@ class SwNode2LayImpl
{
SwClientIter *pIter; // Der eigentliche Iterator
SvPtrarr *pUpperFrms;// Zum Einsammeln der Upper
- ULONG nIndex; // Der Index des einzufuegenden Nodes
- BOOL bMaster : 1; // TRUE => nur Master , FALSE => nur Frames ohne Follow
- BOOL bInit : 1; // Ist am SwClient bereits ein First()-Aufruf erfolgt?
+ sal_uLong nIndex; // Der Index des einzufuegenden Nodes
+ sal_Bool bMaster : 1; // sal_True => nur Master , sal_False => nur Frames ohne Follow
+ sal_Bool bInit : 1; // Ist am SwClient bereits ein First()-Aufruf erfolgt?
public:
- SwNode2LayImpl( const SwNode& rNode, ULONG nIdx, BOOL bSearch );
+ SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, sal_Bool bSearch );
~SwNode2LayImpl() { delete pIter; delete pUpperFrms; }
SwFrm* NextFrm(); // liefert den naechsten "sinnvollen" Frame
SwLayoutFrm* UpperFrm( SwFrm* &rpFrm, const SwNode &rNode );
void SaveUpperFrms(); // Speichert (und lockt ggf.) die pUpper
// Fuegt unter jeden pUpper des Arrays einen Frame ein.
- void RestoreUpperFrms( SwNodes& rNds, ULONG nStt, ULONG nEnd );
+ void RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd );
SwFrm* GetFrm( const Point* pDocPos = 0,
const SwPosition *pPos = 0,
- const BOOL bCalcFrm = TRUE ) const;
+ const sal_Bool bCalcFrm = sal_True ) const;
};
/* --------------------------------------------------
* Hauptaufgabe des Ctor: Das richtige SwModify zu ermitteln,
* ueber das iteriert wird.
- * Uebergibt man bSearch == TRUE, so wird der naechste Cntnt- oder TableNode
+ * Uebergibt man bSearch == sal_True, so wird der naechste Cntnt- oder TableNode
* gesucht, der Frames besitzt ( zum Einsammeln der pUpper ), ansonsten wird
* erwartet, das rNode bereits auf einem solchen Cntnt- oder TableNode sitzt,
* vor oder hinter den eingefuegt werden soll.
* --------------------------------------------------*/
-SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, ULONG nIdx, BOOL bSearch )
- : pUpperFrms( NULL ), nIndex( nIdx ), bInit( FALSE )
+SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, sal_uLong nIdx, sal_Bool bSearch )
+ : pUpperFrms( NULL ), nIndex( nIdx ), bInit( sal_False )
{
const SwNode* pNd;
if( bSearch || rNode.IsSectionNode() )
@@ -92,13 +92,13 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, ULONG nIdx, BOOL bSearch )
pNd = rNode.GetNodes().GoPreviousWithFrm( &aTmp );
if( !bSearch && pNd && rNode.GetIndex() > pNd->GetIndex() )
pNd = NULL; // Nicht ueber den Bereich hinausschiessen
- bMaster = FALSE;
+ bMaster = sal_False;
}
else
{
SwNodeIndex aTmp( rNode, -1 );
pNd = rNode.GetNodes().GoNextWithFrm( &aTmp );
- bMaster = TRUE;
+ bMaster = sal_True;
if( !bSearch && pNd && rNode.EndOfSectionIndex() < pNd->GetIndex() )
pNd = NULL; // Nicht ueber den Bereich hinausschiessen
}
@@ -139,11 +139,11 @@ SwFrm* SwNode2LayImpl::NextFrm()
{
SwFrm* pRet;
if( !pIter )
- return FALSE;
+ return sal_False;
if( !bInit )
{
pRet = (SwFrm*)pIter->First(TYPE(SwFrm));
- bInit = TRUE;
+ bInit = sal_True;
}
else
pRet = (SwFrm*)pIter->Next();
@@ -278,19 +278,19 @@ SwLayoutFrm* SwNode2LayImpl::UpperFrm( SwFrm* &rpFrm, const SwNode &rNode )
return pUpper;
}
-void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, ULONG nStt, ULONG nEnd )
+void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd )
{
OSL_ENSURE( pUpperFrms, "RestoreUpper without SaveUpper?" );
SwNode* pNd;
SwDoc *pDoc = rNds.GetDoc();
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
for( ; nStt < nEnd; ++nStt )
{
SwFrm* pNew = 0;
SwFrm* pNxt;
SwLayoutFrm* pUp;
if( (pNd = rNds[nStt])->IsCntntNode() )
- for( USHORT n = 0; n < pUpperFrms->Count(); )
+ for( sal_uInt16 n = 0; n < pUpperFrms->Count(); )
{
pNxt = (SwFrm*)(*pUpperFrms)[n++];
if( bFirst && pNxt && pNxt->IsSctFrm() )
@@ -305,7 +305,7 @@ void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, ULONG nStt, ULONG nEnd )
(*pUpperFrms)[n-2] = pNew;
}
else if( pNd->IsTableNode() )
- for( USHORT x = 0; x < pUpperFrms->Count(); )
+ for( sal_uInt16 x = 0; x < pUpperFrms->Count(); )
{
pNxt = (SwFrm*)(*pUpperFrms)[x++];
if( bFirst && pNxt && pNxt->IsSctFrm() )
@@ -324,21 +324,21 @@ void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, ULONG nStt, ULONG nEnd )
else if( pNd->IsSectionNode() )
{
nStt = pNd->EndOfSectionIndex();
- for( USHORT x = 0; x < pUpperFrms->Count(); )
+ for( sal_uInt16 x = 0; x < pUpperFrms->Count(); )
{
pNxt = (SwFrm*)(*pUpperFrms)[x++];
if( bFirst && pNxt && pNxt->IsSctFrm() )
((SwSectionFrm*)pNxt)->UnlockJoin();
pUp = (SwLayoutFrm*)(*pUpperFrms)[x++];
OSL_ENSURE( pUp->GetUpper() || pUp->IsFlyFrm(), "Lost Upper" );
- ::_InsertCnt( pUp, pDoc, pNd->GetIndex(), FALSE, nStt+1, pNxt );
+ ::_InsertCnt( pUp, pDoc, pNd->GetIndex(), sal_False, nStt+1, pNxt );
pNxt = pUp->GetLastLower();
(*pUpperFrms)[x-2] = pNxt;
}
}
- bFirst = FALSE;
+ bFirst = sal_False;
}
- for( USHORT x = 0; x < pUpperFrms->Count(); ++x )
+ for( sal_uInt16 x = 0; x < pUpperFrms->Count(); ++x )
{
SwFrm* pTmp = (SwFrm*)(*pUpperFrms)[++x];
if( pTmp->IsFtnFrm() )
@@ -357,25 +357,25 @@ void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, ULONG nStt, ULONG nEnd )
SwFrm* SwNode2LayImpl::GetFrm( const Point* pDocPos,
const SwPosition *pPos,
- const BOOL bCalcFrm ) const
+ const sal_Bool bCalcFrm ) const
{
return pIter ? ::GetFrmOfModify( pIter->GetModify(), USHRT_MAX,
pDocPos, pPos, bCalcFrm )
: 0;
}
-SwNode2Layout::SwNode2Layout( const SwNode& rNd, ULONG nIdx )
+SwNode2Layout::SwNode2Layout( const SwNode& rNd, sal_uLong nIdx )
{
- pImpl = new SwNode2LayImpl( rNd, nIdx, FALSE );
+ pImpl = new SwNode2LayImpl( rNd, nIdx, sal_False );
}
SwNode2Layout::SwNode2Layout( const SwNode& rNd )
{
- pImpl = new SwNode2LayImpl( rNd, rNd.GetIndex(), TRUE );
+ pImpl = new SwNode2LayImpl( rNd, rNd.GetIndex(), sal_True );
pImpl->SaveUpperFrms();
}
-void SwNode2Layout::RestoreUpperFrms( SwNodes& rNds, ULONG nStt, ULONG nEnd )
+void SwNode2Layout::RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd )
{
OSL_ENSURE( pImpl, "RestoreUpperFrms without SaveUpperFrms" );
pImpl->RestoreUpperFrms( rNds, nStt, nEnd );
@@ -398,7 +398,7 @@ SwNode2Layout::~SwNode2Layout()
SwFrm* SwNode2Layout::GetFrm( const Point* pDocPos,
const SwPosition *pPos,
- const BOOL bCalcFrm ) const
+ const sal_Bool bCalcFrm ) const
{
return pImpl->GetFrm( pDocPos, pPos, bCalcFrm );
}
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 6e0ea5a3ec80..ab3f5df151b1 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -30,8 +30,10 @@
#include "precompiled_sw.hxx"
#include <stdlib.h>
+
#include <node.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pam.hxx>
#include <txtfld.hxx>
#include <fmtfld.hxx>
@@ -51,15 +53,15 @@
#include <docsh.hxx>
#include <svl/smplhint.hxx>
-extern BOOL CheckNodesRange( const SwNodeIndex& rStt,
- const SwNodeIndex& rEnd, BOOL bChkSection );
+extern sal_Bool CheckNodesRange( const SwNodeIndex& rStt,
+ const SwNodeIndex& rEnd, sal_Bool bChkSection );
SV_DECL_PTRARR(SwSttNdPtrs,SwStartNode*,2,2)
// Funktion zum bestimmen des hoechsten Levels innerhalb des Bereiches
-USHORT HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange );
+sal_uInt16 HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange );
//-----------------------------------------------------------------------
@@ -73,11 +75,11 @@ USHORT HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange );
SwNodes::SwNodes( SwDoc* pDocument )
: pRoot( 0 ), pMyDoc( pDocument )
{
- bInNodesDel = bInDelUpdOutl = bInDelUpdNum = FALSE;
+ bInNodesDel = bInDelUpdOutl = bInDelUpdNum = sal_False;
OSL_ENSURE( pMyDoc, "in welchem Doc stehe ich denn?" );
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
SwStartNode* pSttNd = new SwStartNode( *this, nPos++ );
pEndOfPostIts = new SwEndNode( *this, nPos++, *pSttNd );
@@ -118,7 +120,7 @@ SwNodes::~SwNodes()
{
SwNode *pNode;
SwNodeIndex aNdIdx( *this );
- while( TRUE )
+ while( sal_True )
{
pNode = &aNdIdx.GetNode();
if( pNode == pEndOfContent )
@@ -133,8 +135,8 @@ SwNodes::~SwNodes()
delete pEndOfContent;
}
-void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz,
- SwNodeIndex& rInsPos, BOOL bNewFrms )
+void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
+ SwNodeIndex& rInsPos, sal_Bool bNewFrms )
{
// im UndoBereich brauchen wir keine Frames
SwNodes& rNds = rInsPos.GetNodes();
@@ -142,13 +144,13 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz,
//JP 03.02.99: alle Felder als invalide erklaeren, aktu. erfolgt im
// Idle-Handler des Docs
- if( GetDoc()->SetFieldsDirty( TRUE, &rDelPos.GetNode(), nSz ) &&
+ if( GetDoc()->SetFieldsDirty( sal_True, &rDelPos.GetNode(), nSz ) &&
rNds.GetDoc() != GetDoc() )
rNds.GetDoc()->SetFieldsDirty( true, NULL, 0 );
//JP 12.03.99: 63293 - Nodes vom RedlineBereich NIE aufnehmen
- ULONG nNd = rInsPos.GetIndex();
- BOOL bInsOutlineIdx = !(
+ sal_uLong nNd = rInsPos.GetIndex();
+ sal_Bool bInsOutlineIdx = !(
rNds.GetEndOfRedlines().StartOfSectionNode()->GetIndex() < nNd &&
nNd < rNds.GetEndOfRedlines().GetIndex() );
@@ -156,9 +158,9 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz,
{
// wird von vorne nach hinten gemovt, so wird nach vorne immer
// nachgeschoben, d.H. die Loeschposition ist immer gleich
- USHORT nDiff = rDelPos.GetIndex() < rInsPos.GetIndex() ? 0 : 1;
+ sal_uInt16 nDiff = rDelPos.GetIndex() < rInsPos.GetIndex() ? 0 : 1;
- for( ULONG n = rDelPos.GetIndex(); nSz; n += nDiff, --nSz )
+ for( sal_uLong n = rDelPos.GetIndex(); nSz; n += nDiff, --nSz )
{
SwNodeIndex aDelIdx( *this, n );
SwNode& rNd = aDelIdx.GetNode();
@@ -208,15 +210,18 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz,
}
else
{
- int bSavePersData = GetDoc()->GetUndoNds() == &rNds;
- int bRestPersData = GetDoc()->GetUndoNds() == this;
+ bool bSavePersData(GetDoc()->GetIDocumentUndoRedo().IsUndoNodes(rNds));
+ bool bRestPersData(GetDoc()->GetIDocumentUndoRedo().IsUndoNodes(*this));
SwDoc* pDestDoc = rNds.GetDoc() != GetDoc() ? rNds.GetDoc() : 0;
+ OSL_ENSURE(!pDestDoc, "SwNodes::ChgNode(): "
+ "the code to handle text fields here looks broken\n"
+ "if the target is in a different document.");
if( !bRestPersData && !bSavePersData && pDestDoc )
- bSavePersData = bRestPersData = TRUE;
+ bSavePersData = bRestPersData = sal_True;
String sNumRule;
SwNodeIndex aInsPos( rInsPos );
- for( ULONG n = 0; n < nSz; n++ )
+ for( sal_uLong n = 0; n < nSz; n++ )
{
SwNode* pNd = &rDelPos.GetNode();
@@ -243,7 +248,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz,
sNumRule = pNumRule->GetName();
SwNumRule* pDestRule = pDestDoc->FindNumRulePtr( sNumRule );
if( pDestRule )
- pDestRule->SetInvalidRule( TRUE );
+ pDestRule->SetInvalidRule( sal_True );
else
pDestDoc->MakeNumRule( sNumRule, pNumRule );
}
@@ -256,7 +261,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz,
pTxtNd->RemoveFromList();
}
- RemoveNode( rDelPos.GetIndex(), 1, FALSE ); // Indizies verschieben !!
+ RemoveNode( rDelPos.GetIndex(), 1, sal_False ); // Indizies verschieben !!
SwCntntNode * pCNd = pNd->GetCntntNode();
rNds.InsertNode( pNd, aInsPos );
@@ -278,10 +283,12 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz,
// Sonderbehandlung fuer die Felder!
if( pHts && pHts->Count() )
{
- int bToUndo = &pDestDoc->GetNodes() != &rNds;
- for( USHORT i = pHts->Count(); i; )
+ // this looks fishy if pDestDoc != 0
+ bool const bToUndo = !pDestDoc &&
+ GetDoc()->GetIDocumentUndoRedo().IsUndoNodes(rNds);
+ for( sal_uInt16 i = pHts->Count(); i; )
{
- USHORT nDelMsg = 0;
+ sal_uInt16 nDelMsg = 0;
SwTxtAttr * const pAttr = pHts->GetTextHint( --i );
switch ( pAttr->Which() )
{
@@ -381,7 +388,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz,
{
OSL_ENSURE( !this, "ob das so richtig ist ??" );
aFrmNdIdx = rNds.GetEndOfContent();
- pFrmNd = rNds.GoPrevSection( &aFrmNdIdx, TRUE, FALSE );
+ pFrmNd = rNds.GoPrevSection( &aFrmNdIdx, sal_True, sal_False );
if( pFrmNd && !((SwCntntNode*)pFrmNd)->GetDepends() )
pFrmNd = 0;
@@ -428,14 +435,14 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz,
|*
***********************************************************************/
-BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
- const SwNodeIndex& aIndex, BOOL bNewFrms )
+sal_Bool SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
+ const SwNodeIndex& aIndex, sal_Bool bNewFrms )
{
SwNode * pAktNode;
if( aIndex == 0 ||
( (pAktNode = &aIndex.GetNode())->GetStartNode() &&
!pAktNode->StartOfSectionIndex() ))
- return FALSE;
+ return sal_False;
SwNodeRange aRg( aRange );
@@ -458,18 +465,18 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
// wird im selben Array's verschoben, dann ueberpruefe die Einfuegepos.
if( aRg.aStart >= aRg.aEnd )
- return FALSE;
+ return sal_False;
if( this == &rNodes )
{
if( ( aIndex.GetIndex()-1 >= aRg.aStart.GetIndex() &&
aIndex.GetIndex()-1 < aRg.aEnd.GetIndex()) ||
( aIndex.GetIndex()-1 == aRg.aEnd.GetIndex() ) )
- return FALSE;
+ return sal_False;
}
- USHORT nLevel = 0; // Level-Counter
- ULONG nInsPos = 0; // Cnt fuer das TmpArray
+ sal_uInt16 nLevel = 0; // Level-Counter
+ sal_uLong nInsPos = 0; // Cnt fuer das TmpArray
// das Array bildet einen Stack, es werden alle StartOfSelction's gesichert
SwSttNdPtrs aSttNdStack( 1, 5 );
@@ -483,8 +490,8 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
SwNodeRange aOrigInsPos( aIdx, -1, aIdx ); // Originale Insert Pos
//JP 16.01.98: SectionNodes: DelFrms/MakeFrms beim obersten SectionNode!
- USHORT nSectNdCnt = 0;
- BOOL bSaveNewFrms = bNewFrms;
+ sal_uInt16 nSectNdCnt = 0;
+ sal_Bool bSaveNewFrms = bNewFrms;
// bis alles verschoben ist
while( aRg.aStart < aRg.aEnd )
@@ -513,8 +520,8 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
aRg.aEnd -= nInsPos;
//JP 12.03.99: 63293 - Nodes vom RedlineBereich NIE aufnehmen
- ULONG nNd = aIdx.GetIndex();
- BOOL bInsOutlineIdx = !( rNodes.GetEndOfRedlines().
+ sal_uLong nNd = aIdx.GetIndex();
+ sal_Bool bInsOutlineIdx = !( rNodes.GetEndOfRedlines().
StartOfSectionNode()->GetIndex() < nNd &&
nNd < rNodes.GetEndOfRedlines().GetIndex() );
@@ -526,7 +533,7 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
// dann bewege alle Start/End/ContentNodes. Loesche
// bei den ContentNodes auch die Frames !!
pTblNd->pStartOfSection = aIdx.GetNode().pStartOfSection;
- for( ULONG n = 0; n < nInsPos; ++n )
+ for( sal_uLong n = 0; n < nInsPos; ++n )
{
SwNodeIndex aMvIdx( aRg.aEnd, 1 );
SwCntntNode* pCNd = 0;
@@ -567,7 +574,7 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
// (Array kopieren und alle gefunden wieder loeschen;
// erleichtert das suchen!!)
SwNodeIndex aMvIdx( aRg.aEnd, 1 );
- for( ULONG n = 0; n < nInsPos; ++n )
+ for( sal_uLong n = 0; n < nInsPos; ++n )
{
SwNode* pNd = &aMvIdx.GetNode();
@@ -578,7 +585,7 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
if( bOutlNd )
pOutlineNds->Remove( pNd );
- RemoveNode( aMvIdx.GetIndex(), 1, FALSE );
+ RemoveNode( aMvIdx.GetIndex(), 1, sal_False );
pNd->pStartOfSection = pSttNode;
rNodes.InsertNode( pNd, aIdx );
@@ -610,7 +617,8 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
}
}
- if( GetDoc()->GetUndoNds() == &rNodes )
+ if (GetDoc()->GetIDocumentUndoRedo().IsUndoNodes(
+ rNodes))
{
SwFrmFmt* pTblFmt = pTblNd->GetTable().GetFrmFmt();
SwPtrMsgPoolItem aMsgHint( RES_REMOVE_UNO_OBJECT,
@@ -647,8 +655,8 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
// noch den EndNode erzeugen
new SwEndNode( aIdx, *pTmp );
}
- else if( (const SwNodes*)&rNodes ==
- GetDoc()->GetUndoNds() )
+ else if (GetDoc()->GetIDocumentUndoRedo().IsUndoNodes(
+ rNodes))
{
// im UndoNodes-Array spendieren wir einen
// Platzhalter
@@ -664,7 +672,7 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
aRg.aEnd--;
aIdx--;
- } while( FALSE );
+ } while( sal_False );
}
else
{
@@ -679,14 +687,14 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
if( bNewFrms && pSctNd )
pSctNd->DelFrms();
- RemoveNode( aRg.aEnd.GetIndex(), 1, FALSE ); // EndNode loeschen
- ULONG nSttPos = pSttNd->GetIndex();
+ RemoveNode( aRg.aEnd.GetIndex(), 1, sal_False ); // EndNode loeschen
+ sal_uLong nSttPos = pSttNd->GetIndex();
// dieser StartNode wird spaeter wieder entfernt!
SwStartNode* pTmpSttNd = new SwStartNode( *this, nSttPos+1 );
pTmpSttNd->pStartOfSection = pSttNd->pStartOfSection;
- RemoveNode( nSttPos, 1, FALSE ); // SttNode loeschen
+ RemoveNode( nSttPos, 1, sal_False ); // SttNode loeschen
pSttNd->pStartOfSection = aIdx.GetNode().pStartOfSection;
rNodes.InsertNode( pSttNd, aIdx );
@@ -704,7 +712,7 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
{
pSctNd->NodesArrChgd();
++nSectNdCnt;
- bNewFrms = FALSE;
+ bNewFrms = sal_False;
}
}
}
@@ -714,7 +722,7 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
case ND_SECTIONNODE:
if( !nLevel &&
- ( (const SwNodes*)&rNodes == GetDoc()->GetUndoNds() ) )
+ GetDoc()->GetIDocumentUndoRedo().IsUndoNodes(rNodes))
{
// dann muss an der akt. InsPos ein SectionDummyNode
// eingefuegt werden
@@ -763,7 +771,7 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
aRg.aEnd++;
{
SwNodeIndex aCntIdx( aRg.aEnd );
- for( ULONG n = 0; n < nInsPos; n++, aCntIdx++)
+ for( sal_uLong n = 0; n < nInsPos; n++, aCntIdx++)
aCntIdx.GetNode().pStartOfSection = pTmpStt;
}
@@ -799,7 +807,7 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
nInsPos = 0;
// loesche nur noch den Pointer aus dem Nodes-Array.
- RemoveNode( aRg.aEnd.GetIndex(), 1, TRUE );
+ RemoveNode( aRg.aEnd.GetIndex(), 1, sal_True );
aRg.aEnd--;
SwSectionNode* pSectNd = aSttNdStack[ nLevel ]->GetSectionNode();
@@ -839,7 +847,7 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
break;
case ND_SECTIONDUMMY:
- if( (const SwNodes*)this == GetDoc()->GetUndoNds() )
+ if (GetDoc()->GetIDocumentUndoRedo().IsUndoNodes(*this))
{
if( &rNodes == this ) // innerhalb vom UndoNodesArray
{
@@ -868,13 +876,13 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
}
}
else {
- OSL_ENSURE( FALSE, "wie kommt diser Node ins Nodes-Array??" );
+ OSL_ENSURE( sal_False, "wie kommt diser Node ins Nodes-Array??" );
}
aRg.aEnd--;
break;
default:
- OSL_ENSURE( FALSE, "was ist das fuer ein Node??" );
+ OSL_ENSURE( sal_False, "was ist das fuer ein Node??" );
break;
}
@@ -908,7 +916,7 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
rNodes.UpdtOutlineIdx( aOrigInsPos.aStart.GetNode() );
}
- return TRUE;
+ return sal_True;
}
@@ -1042,8 +1050,8 @@ void SwNodes::SectionUp(SwNodeRange *pRange)
{
// dann wurde paarig aufgehoben, also nur die im Berich neu anpassen
SwStartNode* pTmpSttNd = pAktNode->pStartOfSection;
- RemoveNode( pRange->aStart.GetIndex(), 1, TRUE );
- RemoveNode( pRange->aEnd.GetIndex(), 1, TRUE );
+ RemoveNode( pRange->aStart.GetIndex(), 1, sal_True );
+ RemoveNode( pRange->aEnd.GetIndex(), 1, sal_True );
SwNodeIndex aTmpIdx( pRange->aStart );
while( aTmpIdx < pRange->aEnd )
@@ -1156,7 +1164,7 @@ void SwNodes::SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & aEn
|* SwIndex &rIndex bezeichnet die Position, an der
|* geloescht wird
|* rIndex ist nach Aufruf der Funktion unveraendert (Kopie?!)
-|* USHORT nNodes bezeichnet die Anzahl der zu loeschenden
+|* sal_uInt16 nNodes bezeichnet die Anzahl der zu loeschenden
|* Nodes; ist auf 1 defaulted
|*
|* Debug-Funktionen
@@ -1164,12 +1172,12 @@ void SwNodes::SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & aEn
|* der zu loeschenden Nodes aus.
|*
*******************************************************************/
-void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes)
+void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes)
{
- USHORT nLevel = 0; // Level-Counter
+ sal_uInt16 nLevel = 0; // Level-Counter
SwNode * pAktNode;
- ULONG nCnt = Count() - rIndex.GetIndex() - 1;
+ sal_uLong nCnt = Count() - rIndex.GetIndex() - 1;
if( nCnt > nNodes ) nCnt = nNodes;
if( nCnt == 0 ) // keine Anzahl -> return
@@ -1195,9 +1203,9 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes)
// so ist aEnd <= aStart
aRg.aStart--;
- BOOL bSaveInNodesDel = bInNodesDel;
- bInNodesDel = TRUE;
- BOOL bUpdateOutline = FALSE;
+ sal_Bool bSaveInNodesDel = bInNodesDel;
+ bInNodesDel = sal_True;
+ sal_Bool bUpdateOutline = sal_False;
// bis alles geloescht ist
while( aRg.aStart < aRg.aEnd )
@@ -1214,7 +1222,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes)
pTblNd->DelFrms();
SwNode *pNd, *pChkNd = pAktNode->pStartOfSection;
- USHORT nIdxPos;
+ sal_uInt16 nIdxPos;
do {
pNd = &aRg.aEnd.GetNode();
@@ -1225,7 +1233,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes)
{
// loesche die Gliederungs-Indizies.
pOutlineNds->Remove( nIdxPos );
- bUpdateOutline = TRUE;
+ bUpdateOutline = sal_True;
}
((SwTxtNode*)pNd)->InvalidateNumRule();
}
@@ -1240,7 +1248,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes)
}
else
{
- RemoveNode( aRg.aEnd.GetIndex()+1, nCnt, TRUE ); // loesche
+ RemoveNode( aRg.aEnd.GetIndex()+1, nCnt, sal_True ); // loesche
nCnt = 0;
aRg.aEnd--; // vor den EndNode
nLevel++;
@@ -1254,13 +1262,13 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes)
{
// loesche jetzt das Array
aRg.aEnd++;
- RemoveNode( aRg.aEnd.GetIndex(), nCnt, TRUE );
+ RemoveNode( aRg.aEnd.GetIndex(), nCnt, sal_True );
nCnt = 0;
}
}
else // es werden alle Nodes Innerhalb eines Start- und
{ // End-Nodes geloescht, loesche mit Start/EndNode
- RemoveNode( aRg.aEnd.GetIndex(), nCnt + 2, TRUE ); // loesche Array
+ RemoveNode( aRg.aEnd.GetIndex(), nCnt + 2, sal_True ); // loesche Array
nCnt = 0;
nLevel--;
}
@@ -1287,7 +1295,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes)
if( pTxtNd->IsOutline())
{ // loesche die Gliederungs-Indizies.
pOutlineNds->Remove( pTxtNd );
- bUpdateOutline = TRUE;
+ bUpdateOutline = sal_True;
}
pTxtNd->InvalidateNumRule();
}
@@ -1301,7 +1309,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes)
aRg.aEnd++;
if( nCnt != 0 )
- RemoveNode( aRg.aEnd.GetIndex(), nCnt, TRUE ); // loesche den Rest
+ RemoveNode( aRg.aEnd.GetIndex(), nCnt, sal_True ); // loesche den Rest
// loesche alle leeren Start-/End-Node-Paare
while( aRg.aEnd.GetNode().GetEndNode() &&
@@ -1321,14 +1329,14 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes)
if( bUpdateOutline || bInDelUpdOutl )
{
UpdtOutlineIdx( aRg.aEnd.GetNode() );
- bInDelUpdOutl = FALSE;
+ bInDelUpdOutl = sal_False;
}
}
else
{
if( bUpdateOutline )
- bInDelUpdOutl = TRUE;
+ bInDelUpdOutl = sal_True;
}
}
@@ -1360,15 +1368,14 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes)
|* erste Node auch ein Startnode ist.
|*
*******************************************************************/
-USHORT SwNodes::GetSectionLevel(const SwNodeIndex &rIdx) const {
+sal_uInt16 SwNodes::GetSectionLevel(const SwNodeIndex &rIdx) const {
// Sonderbehandlung 1. Node
if(rIdx == 0) return 1;
/*
* Keine Rekursion! - hier wird das SwNode::GetSectionLevel
* aufgerufen
*/
- return (*this)[rIdx]->GetSectionLevel();
-
+ return rIdx.GetNode().GetSectionLevel();
}
void SwNodes::GoStartOfSection(SwNodeIndex *pIdx) const
@@ -1506,7 +1513,7 @@ SwNode* SwNodes::GoPreviousWithFrm(SwNodeIndex *pIdx) const
/*************************************************************************
|*
-|* BOOL SwNodes::CheckNodesRange()
+|* sal_Bool SwNodes::CheckNodesRange()
|*
|* Beschreibung
|* Teste ob der uebergene SRange nicht ueber die Grenzen der
@@ -1519,34 +1526,34 @@ SwNode* SwNodes::GoPreviousWithFrm(SwNodeIndex *pIdx) const
|*
|* Parameter SwIndex & Start-Index vom Bereich
|* SwIndex & End-Index vom Bereich
-|* BOOL TRUE: Start+End in gleicher Section!
-|* FALSE: Start+End in verschiedenen Sect.
-|* Return-Wert BOOL TRUE: gueltiger SRange
-|* FALSE: ungueltiger SRange
+|* sal_Bool sal_True: Start+End in gleicher Section!
+|* sal_False: Start+End in verschiedenen Sect.
+|* Return-Wert sal_Bool sal_True: gueltiger SRange
+|* sal_False: ungueltiger SRange
|*
*************************************************************************/
-inline int TstIdx( ULONG nSttIdx, ULONG nEndIdx, ULONG nStt, ULONG nEnd )
+inline int TstIdx( sal_uLong nSttIdx, sal_uLong nEndIdx, sal_uLong nStt, sal_uLong nEnd )
{
return nStt < nSttIdx && nEnd >= nSttIdx &&
nStt < nEndIdx && nEnd >= nEndIdx;
}
-BOOL SwNodes::CheckNodesRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd ) const
+sal_Bool SwNodes::CheckNodesRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd ) const
{
- ULONG nStt = rStt.GetIndex(), nEnd = rEnd.GetIndex();
+ sal_uLong nStt = rStt.GetIndex(), nEnd = rEnd.GetIndex();
if( TstIdx( nStt, nEnd, pEndOfContent->StartOfSectionIndex(),
- pEndOfContent->GetIndex() )) return TRUE;
+ pEndOfContent->GetIndex() )) return sal_True;
if( TstIdx( nStt, nEnd, pEndOfAutotext->StartOfSectionIndex(),
- pEndOfAutotext->GetIndex() )) return TRUE;
+ pEndOfAutotext->GetIndex() )) return sal_True;
if( TstIdx( nStt, nEnd, pEndOfPostIts->StartOfSectionIndex(),
- pEndOfPostIts->GetIndex() )) return TRUE;
+ pEndOfPostIts->GetIndex() )) return sal_True;
if( TstIdx( nStt, nEnd, pEndOfInserts->StartOfSectionIndex(),
- pEndOfInserts->GetIndex() )) return TRUE;
+ pEndOfInserts->GetIndex() )) return sal_True;
if( TstIdx( nStt, nEnd, pEndOfRedlines->StartOfSectionIndex(),
- pEndOfRedlines->GetIndex() )) return TRUE;
+ pEndOfRedlines->GetIndex() )) return sal_True;
- return FALSE; // liegt irgendwo dazwischen, FEHLER
+ return sal_False; // liegt irgendwo dazwischen, FEHLER
}
@@ -1558,12 +1565,12 @@ BOOL SwNodes::CheckNodesRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd
|* Loesche aus den NodesArray ab einer Position entsprechend Node's.
|*
|* Parameter SwIndex & Der Startpunkt im Nodes-Array
-|* USHORT die Anzahl
+|* sal_uInt16 die Anzahl
|*
*************************************************************************/
-void SwNodes::DelNodes( const SwNodeIndex & rStart, ULONG nCnt )
+void SwNodes::DelNodes( const SwNodeIndex & rStart, sal_uLong nCnt )
{
- ULONG nSttIdx = rStart.GetIndex();
+ sal_uLong nSttIdx = rStart.GetIndex();
if( !nSttIdx && nCnt == GetEndOfContent().GetIndex()+1 )
{
@@ -1580,10 +1587,10 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, ULONG nCnt )
while( *ppEndNdArr )
{
nSttIdx = (*ppEndNdArr)->StartOfSectionIndex() + 1;
- ULONG nEndIdx = (*ppEndNdArr)->GetIndex();
+ sal_uLong nEndIdx = (*ppEndNdArr)->GetIndex();
if( nSttIdx != nEndIdx )
- RemoveNode( nSttIdx, nEndIdx - nSttIdx, TRUE );
+ RemoveNode( nSttIdx, nEndIdx - nSttIdx, sal_True );
++ppEndNdArr;
}
@@ -1591,14 +1598,14 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, ULONG nCnt )
else
{
int bUpdateNum = 0;
- for( ULONG n = nSttIdx, nEnd = nSttIdx + nCnt; n < nEnd; ++n )
+ for( sal_uLong n = nSttIdx, nEnd = nSttIdx + nCnt; n < nEnd; ++n )
{
SwNode* pNd = (*this)[ n ];
if( pNd->IsTxtNode() &&
0 != ((SwTxtNode*)pNd)->GetAttrOutlineLevel() ) //<-end,zhaojianwei
{ // loesche die Gliederungs-Indizies.
- USHORT nIdxPos;
+ sal_uInt16 nIdxPos;
if( pOutlineNds->Seek_Entry( pNd, &nIdxPos ))
{
pOutlineNds->Remove( nIdxPos );
@@ -1611,7 +1618,7 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, ULONG nCnt )
((SwCntntNode*)pNd)->DelFrms();
}
}
- RemoveNode( nSttIdx, nCnt, TRUE );
+ RemoveNode( nSttIdx, nCnt, sal_True );
// rufe noch das Update fuer die Gliederungsnumerierung auf
if( bUpdateNum )
@@ -1622,25 +1629,25 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, ULONG nCnt )
/*************************************************************************
|*
-|* USHORT HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange )
+|* sal_uInt16 HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange )
|*
|* Beschreibung
|* Berechne den hoehsten Level innerhalb des Bereiches
|*
|* Parameter SwNodes & das Node-Array
|* SwNodeRange & der zu ueberpruefende Bereich
-|* Return USHORT der hoechste Level
+|* Return sal_uInt16 der hoechste Level
|*
*************************************************************************/
struct HighLevel
{
- USHORT nLevel, nTop;
- HighLevel( USHORT nLv ) : nLevel( nLv ), nTop( nLv ) {}
+ sal_uInt16 nLevel, nTop;
+ HighLevel( sal_uInt16 nLv ) : nLevel( nLv ), nTop( nLv ) {}
};
-BOOL _HighestLevel( const SwNodePtr& rpNode, void * pPara )
+sal_Bool _HighestLevel( const SwNodePtr& rpNode, void * pPara )
{
HighLevel * pHL = (HighLevel*)pPara;
if( rpNode->GetStartNode() )
@@ -1649,11 +1656,11 @@ BOOL _HighestLevel( const SwNodePtr& rpNode, void * pPara )
pHL->nLevel--;
if( pHL->nTop > pHL->nLevel )
pHL->nTop = pHL->nLevel;
- return TRUE;
+ return sal_True;
}
-USHORT HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange )
+sal_uInt16 HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange )
{
HighLevel aPara( rNodes.GetSectionLevel( rRange.aStart ));
rNodes.ForEach( rRange.aStart, rRange.aEnd, _HighestLevel, &aPara );
@@ -1684,10 +1691,10 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
SwNodeIndex aEndIdx( pEnd->nNode );
SwNodeIndex aSttIdx( pStt->nNode );
- SwTxtNode* const pSrcNd = (*this)[ aSttIdx ]->GetTxtNode();
- SwTxtNode* pDestNd = rNodes[ rPos.nNode ]->GetTxtNode();
- BOOL bSplitDestNd = TRUE;
- BOOL bCopyCollFmt = pDestNd && !pDestNd->GetTxt().Len();
+ SwTxtNode *const pSrcNd = aSttIdx.GetNode().GetTxtNode();
+ SwTxtNode * pDestNd = rPos.nNode.GetNode().GetTxtNode();
+ sal_Bool bSplitDestNd = sal_True;
+ sal_Bool bCopyCollFmt = pDestNd && !pDestNd->GetTxt().Len();
if( pSrcNd )
{
@@ -1698,27 +1705,27 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
pDestNd = rNodes.MakeTxtNode( rPos.nNode, pSrcNd->GetTxtColl() );
rPos.nNode--;
rPos.nContent.Assign( pDestNd, 0 );
- bCopyCollFmt = TRUE;
+ bCopyCollFmt = sal_True;
}
bSplitDestNd = pDestNd->Len() > rPos.nContent.GetIndex() ||
pEnd->nNode.GetNode().IsTxtNode();
// verschiebe jetzt noch den Inhalt in den neuen Node
- BOOL bOneNd = pStt->nNode == pEnd->nNode;
+ sal_Bool bOneNd = pStt->nNode == pEnd->nNode;
const xub_StrLen nLen =
( (bOneNd) ? pEnd->nContent.GetIndex() : pSrcNd->Len() )
- pStt->nContent.GetIndex();
if( !pEnd->nNode.GetNode().IsCntntNode() )
{
- bOneNd = TRUE;
- ULONG nSttNdIdx = pStt->nNode.GetIndex() + 1;
- const ULONG nEndNdIdx = pEnd->nNode.GetIndex();
+ bOneNd = sal_True;
+ sal_uLong nSttNdIdx = pStt->nNode.GetIndex() + 1;
+ const sal_uLong nEndNdIdx = pEnd->nNode.GetIndex();
for( ; nSttNdIdx < nEndNdIdx; ++nSttNdIdx )
{
if( (*this)[ nSttNdIdx ]->IsCntntNode() )
{
- bOneNd = FALSE;
+ bOneNd = sal_False;
break;
}
}
@@ -1730,15 +1737,13 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
{
if( !rPos.nContent.GetIndex() )
{
- bCopyCollFmt = TRUE;
+ bCopyCollFmt = sal_True;
}
if( rNodes.IsDocNodes() )
{
SwDoc* const pInsDoc = pDestNd->GetDoc();
- const bool bIsUndo = pInsDoc->DoesUndo();
- pInsDoc->DoUndo( false );
+ ::sw::UndoGuard const ug(pInsDoc->GetIDocumentUndoRedo());
pInsDoc->SplitNode( rPos, false );
- pInsDoc->DoUndo( bIsUndo );
}
else
{
@@ -1749,7 +1754,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
{
aEndIdx--;
}
- bSplitDestNd = TRUE;
+ bSplitDestNd = sal_True;
pDestNd = rNodes[ rPos.nNode.GetIndex() - 1 ]->GetTxtNode();
if( nLen )
@@ -1766,11 +1771,9 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
if( bCopyCollFmt )
{
SwDoc* const pInsDoc = pDestNd->GetDoc();
- const bool bIsUndo = pInsDoc->DoesUndo();
- pInsDoc->DoUndo( false );
+ ::sw::UndoGuard const undoGuard(pInsDoc->GetIDocumentUndoRedo());
pSrcNd->CopyCollFmt( *pDestNd );
- pInsDoc->DoUndo( bIsUndo );
- bCopyCollFmt = FALSE;
+ bCopyCollFmt = sal_False;
}
if( bOneNd ) // das wars schon
@@ -1805,10 +1808,8 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
if( rNodes.IsDocNodes() )
{
SwDoc* const pInsDoc = pDestNd->GetDoc();
- const bool bIsUndo = pInsDoc->DoesUndo();
- pInsDoc->DoUndo( false );
+ ::sw::UndoGuard const ug(pInsDoc->GetIDocumentUndoRedo());
pInsDoc->SplitNode( rPos, false );
- pInsDoc->DoUndo( bIsUndo );
}
else
{
@@ -1824,10 +1825,10 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
}
}
// am Ende steht noch ein leerer Text Node herum.
- bSplitDestNd = TRUE;
+ bSplitDestNd = sal_True;
}
- SwTxtNode* const pEndSrcNd = (*this)[ aEndIdx ]->GetTxtNode();
+ SwTxtNode* const pEndSrcNd = aEndIdx.GetNode().GetTxtNode();
if ( pEndSrcNd )
{
{
@@ -1846,7 +1847,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
}
else
{
- pDestNd = rNodes[ rPos.nNode ]->GetTxtNode();
+ pDestNd = rPos.nNode.GetNode().GetTxtNode();
}
if( pDestNd && pEnd->nContent.GetIndex() )
@@ -1860,10 +1861,8 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
if( bCopyCollFmt )
{
SwDoc* const pInsDoc = pDestNd->GetDoc();
- const bool bIsUndo = pInsDoc->DoesUndo();
- pInsDoc->DoUndo( false );
+ ::sw::UndoGuard const ug(pInsDoc->GetIDocumentUndoRedo());
pEndSrcNd->CopyCollFmt( *pDestNd );
- pInsDoc->DoUndo( bIsUndo );
}
}
}
@@ -1883,7 +1882,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
if( aEndIdx != aSttIdx )
{
// verschiebe jetzt die Nodes in das NodesArary
- const ULONG nSttDiff = aSttIdx.GetIndex() - pStt->nNode.GetIndex();
+ const sal_uLong nSttDiff = aSttIdx.GetIndex() - pStt->nNode.GetIndex();
SwNodeRange aRg( aSttIdx, aEndIdx );
_MoveNodes( aRg, rNodes, rPos.nNode );
// falls ins gleiche Nodes-Array verschoben wurde, stehen die
@@ -1903,7 +1902,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
OSL_ENSURE( bSuccess, "Move() - no ContentNode here" );
(void) bSuccess;
}
- pStt->nContent.Assign( (*this)[ pStt->nNode ]->GetCntntNode(),
+ pStt->nContent.Assign( pStt->nNode.GetNode().GetCntntNode(),
pStt->nContent.GetIndex() );
// der PaM wird korrigiert, denn falls ueber Nodegrenzen verschoben
// wurde, so stehen sie in unterschielichen Nodes. Auch die Selektion
@@ -1927,13 +1926,13 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes )
|*
*************************************************************************/
-inline BYTE MaxLvl( BYTE nMin, BYTE nMax, short nNew )
+inline sal_uInt8 MaxLvl( sal_uInt8 nMin, sal_uInt8 nMax, short nNew )
{
- return (BYTE)(nNew < nMin ? nMin : nNew > nMax ? nMax : nNew);
+ return (sal_uInt8)(nNew < nMin ? nMin : nNew > nMax ? nMax : nNew);
}
void SwNodes::_CopyNodes( const SwNodeRange& rRange,
- const SwNodeIndex& rIndex, BOOL bNewFrms, BOOL bTblInsDummyNode ) const
+ const SwNodeIndex& rIndex, sal_Bool bNewFrms, sal_Bool bTblInsDummyNode ) const
{
SwDoc* pDoc = rIndex.GetNode().GetDoc();
@@ -1946,7 +1945,7 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange,
SwNodeRange aRg( rRange );
// "einfache" StartNodes oder EndNodes ueberspringen
- while( ND_STARTNODE == (pAktNode = (*this)[ aRg.aStart ])->GetNodeType()
+ while( ND_STARTNODE == (pAktNode = & aRg.aStart.GetNode())->GetNodeType()
|| ( pAktNode->IsEndNode() &&
!pAktNode->pStartOfSection->IsSectionNode() ) )
aRg.aStart++;
@@ -1958,7 +1957,7 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange,
// special section nodes and then one before the first.
if (aRg.aEnd.GetNode().StartOfSectionIndex() != 0)
{
- while( (( pAktNode = (*this)[ aRg.aEnd ])->GetStartNode() &&
+ while( ((pAktNode = & aRg.aEnd.GetNode())->GetStartNode() &&
!pAktNode->IsSectionNode() ) ||
( pAktNode->IsEndNode() &&
ND_STARTNODE == pAktNode->pStartOfSection->GetNodeType()) )
@@ -1984,9 +1983,9 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange,
SwNodeIndex aInsPos( rIndex );
SwNodeIndex aOrigInsPos( rIndex, -1 ); // Originale Insert Pos
- USHORT nLevel = 0; // Level-Counter
+ sal_uInt16 nLevel = 0; // Level-Counter
- for( ULONG nNodeCnt = aRg.aEnd.GetIndex() - aRg.aStart.GetIndex();
+ for( sal_uLong nNodeCnt = aRg.aEnd.GetIndex() - aRg.aStart.GetIndex();
nNodeCnt > 0; --nNodeCnt )
{
pAktNode = &aRg.aStart.GetNode();
@@ -2019,7 +2018,7 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange,
SwStartNode* pSttNd = aRg.aStart.GetNode().GetStartNode();
_CopyNodes( SwNodeRange( *pSttNd, + 1,
*pSttNd->EndOfSectionNode() ),
- aInsPos, bNewFrms, FALSE );
+ aInsPos, bNewFrms, sal_False );
// fuer den Box-EndNode einen DummyNode einfuegen?
if( bTblInsDummyNode )
@@ -2106,23 +2105,23 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange,
break;
case ND_SECTIONDUMMY:
- if( (const SwNodes*)this == GetDoc()->GetUndoNds() )
+ if (GetDoc()->GetIDocumentUndoRedo().IsUndoNodes(*this))
{
// dann muss an der akt. InsPos auch ein SectionNode
// (Start/Ende) stehen; dann diesen ueberspringen.
// Andernfalls nicht weiter beachten.
- SwNode* pTmpNd = pDoc->GetNodes()[ aInsPos ];
+ SwNode *const pTmpNd = & aInsPos.GetNode();
if( pTmpNd->IsSectionNode() ||
pTmpNd->StartOfSectionNode()->IsSectionNode() )
aInsPos++; // ueberspringen
}
else {
- OSL_ENSURE( FALSE, "wie kommt diser Node ins Nodes-Array??" );
+ OSL_ENSURE( sal_False, "wie kommt diser Node ins Nodes-Array??" );
}
break;
default:
- OSL_ENSURE( FALSE, "weder Start-/End-/Content-Node, unbekannter Typ" );
+ OSL_ENSURE( sal_False, "weder Start-/End-/Content-Node, unbekannter Typ" );
}
aRg.aStart++;
}
@@ -2134,7 +2133,7 @@ void SwNodes::_DelDummyNodes( const SwNodeRange& rRg )
while( aIdx.GetIndex() < rRg.aEnd.GetIndex() )
{
if( ND_SECTIONDUMMY == aIdx.GetNode().GetNodeType() )
- RemoveNode( aIdx.GetIndex(), 1, TRUE );
+ RemoveNode( aIdx.GetIndex(), 1, sal_True );
else
aIdx++;
}
@@ -2161,27 +2160,28 @@ SwStartNode* SwNodes::MakeTextSection( const SwNodeIndex & rWhere,
}
// zum naechsten Content-Node, der nicht geschuetzt oder versteckt ist
- // (beides auf FALSE ==> GoNext/GoPrevious!!!)
+ // (beides auf sal_False ==> GoNext/GoPrevious!!!)
SwCntntNode* SwNodes::GoNextSection( SwNodeIndex * pIdx,
int bSkipHidden, int bSkipProtect ) const
{
- int bFirst = TRUE;
+ int bFirst = sal_True;
SwNodeIndex aTmp( *pIdx );
const SwNode* pNd;
while( aTmp < Count() - 1 )
{
- if( ND_SECTIONNODE == ( pNd = (*this)[aTmp])->GetNodeType() )
+ pNd = & aTmp.GetNode();
+ if (ND_SECTIONNODE == pNd->GetNodeType())
{
const SwSection& rSect = ((SwSectionNode*)pNd)->GetSection();
if( (bSkipHidden && rSect.IsHiddenFlag()) ||
(bSkipProtect && rSect.IsProtectFlag()) )
// dann diese Section ueberspringen
aTmp = *pNd->EndOfSectionNode();
- bFirst = FALSE;
+ bFirst = sal_False;
}
else if( bFirst )
{
- bFirst = FALSE;
+ bFirst = sal_False;
if( pNd->pStartOfSection->IsSectionNode() )
{
const SwSection& rSect = ((SwSectionNode*)pNd->
@@ -2209,7 +2209,7 @@ SwCntntNode* SwNodes::GoNextSection( SwNodeIndex * pIdx,
}
}
aTmp++;
- bFirst = FALSE;
+ bFirst = sal_False;
}
return 0;
}
@@ -2217,12 +2217,13 @@ SwCntntNode* SwNodes::GoNextSection( SwNodeIndex * pIdx,
SwCntntNode* SwNodes::GoPrevSection( SwNodeIndex * pIdx,
int bSkipHidden, int bSkipProtect ) const
{
- int bFirst = TRUE;
+ int bFirst = sal_True;
SwNodeIndex aTmp( *pIdx );
const SwNode* pNd;
while( aTmp > 0 )
{
- if( ND_ENDNODE == ( pNd = (*this)[aTmp])->GetNodeType() )
+ pNd = & aTmp.GetNode();
+ if (ND_ENDNODE == pNd->GetNodeType())
{
if( pNd->pStartOfSection->IsSectionNode() )
{
@@ -2233,11 +2234,11 @@ SwCntntNode* SwNodes::GoPrevSection( SwNodeIndex * pIdx,
// dann diese Section ueberspringen
aTmp = *pNd->StartOfSectionNode();
}
- bFirst = FALSE;
+ bFirst = sal_False;
}
else if( bFirst )
{
- bFirst = FALSE;
+ bFirst = sal_False;
if( pNd->pStartOfSection->IsSectionNode() )
{
const SwSection& rSect = ((SwSectionNode*)pNd->
@@ -2311,8 +2312,8 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx,
rFrmIdx = aIdx;
// suche nach vorne/hinten nach einem Content Node
- else if( 0 != ( pFrmNd = GoPrevSection( &aIdx, TRUE, FALSE )) &&
- ::CheckNodesRange( aIdx, rFrmIdx, TRUE ) &&
+ else if( 0 != ( pFrmNd = GoPrevSection( &aIdx, sal_True, sal_False )) &&
+ ::CheckNodesRange( aIdx, rFrmIdx, sal_True ) &&
// nach vorne nie aus der Tabelle hinaus!
pFrmNd->FindTableNode() == pTableNd &&
// Bug 37652: nach hinten nie aus der Tabellenzelle hinaus!
@@ -2333,8 +2334,8 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx,
// JP 19.09.93: aber nie die Section dafuer verlassen !!
if( ( pEnd && ( pFrmNd = &aIdx.GetNode())->IsCntntNode() ) ||
- ( 0 != ( pFrmNd = GoNextSection( &aIdx, TRUE, FALSE )) &&
- ::CheckNodesRange( aIdx, rFrmIdx, TRUE ) &&
+ ( 0 != ( pFrmNd = GoNextSection( &aIdx, sal_True, sal_False )) &&
+ ::CheckNodesRange( aIdx, rFrmIdx, sal_True ) &&
( pFrmNd->FindTableNode() == pTableNd &&
// Bug 37652: nach hinten nie aus der Tabellenzelle hinaus!
(!pFrmNd->FindTableNode() || pFrmNd->FindTableBoxStartNode()
@@ -2414,9 +2415,9 @@ struct _TempBigPtrEntry : public BigPtrEntry
};
-void SwNodes::RemoveNode( ULONG nDelPos, ULONG nSz, BOOL bDel )
+void SwNodes::RemoveNode( sal_uLong nDelPos, sal_uLong nSz, sal_Bool bDel )
{
- ULONG nEnd = nDelPos + nSz;
+ sal_uLong nEnd = nDelPos + nSz;
SwNode* pNew = (*this)[ nEnd ];
if( pRoot )
@@ -2424,7 +2425,7 @@ void SwNodes::RemoveNode( ULONG nDelPos, ULONG nSz, BOOL bDel )
SwNodeIndex *p = pRoot;
while( p )
{
- ULONG nIdx = p->GetIndex();
+ sal_uLong nIdx = p->GetIndex();
SwNodeIndex* pNext = p->pNext;
if( nDelPos <= nIdx && nIdx < nEnd )
(*p) = *pNew;
@@ -2435,7 +2436,7 @@ void SwNodes::RemoveNode( ULONG nDelPos, ULONG nSz, BOOL bDel )
p = pRoot->pPrev;
while( p )
{
- ULONG nIdx = p->GetIndex();
+ sal_uLong nIdx = p->GetIndex();
SwNodeIndex* pPrev = p->pPrev;
if( nDelPos <= nIdx && nIdx < nEnd )
(*p) = *pNew;
@@ -2445,7 +2446,7 @@ void SwNodes::RemoveNode( ULONG nDelPos, ULONG nSz, BOOL bDel )
}
{
- for (ULONG nCnt = 0; nCnt < nSz; nCnt++)
+ for (sal_uLong nCnt = 0; nCnt < nSz; nCnt++)
{
SwTxtNode * pTxtNd = ((*this)[ nDelPos + nCnt ])->GetTxtNode();
@@ -2458,7 +2459,7 @@ void SwNodes::RemoveNode( ULONG nDelPos, ULONG nSz, BOOL bDel )
if( bDel )
{
- ULONG nCnt = nSz;
+ sal_uLong nCnt = nSz;
SwNode *pDel = (*this)[ nDelPos+nCnt-1 ], *pPrev = (*this)[ nDelPos+nCnt-2 ];
// temp. Object setzen
@@ -2475,7 +2476,7 @@ void SwNodes::RemoveNode( ULONG nDelPos, ULONG nSz, BOOL bDel )
{
delete pDel;
pDel = pPrev;
- ULONG nPrevNdIdx = pPrev->GetIndex();
+ sal_uLong nPrevNdIdx = pPrev->GetIndex();
BigPtrArray::Replace( nPrevNdIdx+1, pTempEntry );
if( nCnt )
pPrev = (*this)[ nPrevNdIdx - 1 ];
@@ -2530,7 +2531,7 @@ void SwNodes::InsertNode( const SwNodePtr pNode,
}
void SwNodes::InsertNode( const SwNodePtr pNode,
- ULONG nPos )
+ sal_uLong nPos )
{
const ElementPtr pIns = pNode;
BigPtrArray::Insert( pIns, nPos );
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index a0e62843fad2..934cdcb5a6fc 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -29,8 +29,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <stdlib.h>
+
#include <hintids.hxx>
#include <svl/intitem.hxx>
#include <svl/stritem.hxx>
@@ -46,6 +46,7 @@
#include <fmtcntnt.hxx>
#include <fmtpdsc.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <node.hxx>
#include <pam.hxx>
#include <frmtool.hxx>
@@ -79,7 +80,7 @@ class SwIntrnlSectRefLink : public SwBaseLink
{
SwSectionFmt& rSectFmt;
public:
- SwIntrnlSectRefLink( SwSectionFmt& rFmt, USHORT nUpdateType, USHORT nFmt )
+ SwIntrnlSectRefLink( SwSectionFmt& rFmt, sal_uInt16 nUpdateType, sal_uInt16 nFmt )
: SwBaseLink( nUpdateType, nFmt ),
rSectFmt( rFmt )
{}
@@ -89,7 +90,7 @@ public:
const uno::Any & rValue );
virtual const SwNode* GetAnchor() const;
- virtual BOOL IsInRange( ULONG nSttNd, ULONG nEndNd, xub_StrLen nStt = 0,
+ virtual sal_Bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, xub_StrLen nStt = 0,
xub_StrLen nEnd = STRING_NOTFOUND ) const;
inline SwSectionNode* GetSectNode()
@@ -262,10 +263,8 @@ SwSection::~SwSection()
{
// Bug: 28191 - nicht ins Undo aufnehmen, sollte schon vorher
// geschehen sein!!
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
pDoc->DelSectionFmt( pFmt ); // und loeschen
- pDoc->DoUndo( bUndo );
}
}
if (m_RefObj.Is())
@@ -347,15 +346,15 @@ void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, bool const bCondition)
}
}
-BOOL SwSection::CalcHiddenFlag() const
+sal_Bool SwSection::CalcHiddenFlag() const
{
const SwSection* pSect = this;
do {
if( pSect->IsHidden() && pSect->IsCondHidden() )
- return TRUE;
+ return sal_True;
} while( 0 != ( pSect = pSect->GetParent()) );
- return FALSE;
+ return sal_False;
}
bool SwSection::IsProtect() const
@@ -394,7 +393,7 @@ void SwSection::SetProtect(bool const bFlag)
if (pFormat)
{
SvxProtectItem aItem( RES_PROTECT );
- aItem.SetCntntProtect( (BOOL)bFlag );
+ aItem.SetCntntProtect( (sal_Bool)bFlag );
pFormat->SetFmtAttr( aItem );
// note: this will call m_Data.SetProtectFlag via Modify!
}
@@ -412,7 +411,7 @@ void SwSection::SetEditInReadonly(bool const bFlag)
if (pFormat)
{
SwFmtEditInReadonly aItem;
- aItem.SetValue( (BOOL)bFlag );
+ aItem.SetValue( (sal_Bool)bFlag );
pFormat->SetFmtAttr( aItem );
// note: this will call m_Data.SetEditInReadonlyFlag via Modify!
}
@@ -435,7 +434,7 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pNewSet->GetItemState(
- RES_PROTECT, FALSE, &pItem ) )
+ RES_PROTECT, sal_False, &pItem ) )
{
m_Data.SetProtectFlag( static_cast<SvxProtectItem const*>(pItem)
->IsCntntProtected() );
@@ -445,7 +444,7 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
// --> edit in readonly sections
if( SFX_ITEM_SET == pNewSet->GetItemState(
- RES_EDIT_IN_READONLY, FALSE, &pItem ) )
+ RES_EDIT_IN_READONLY, sal_False, &pItem ) )
{
m_Data.SetEditInReadonlyFlag(
static_cast<SwFmtEditInReadonly const*>(pItem)->GetValue());
@@ -455,9 +454,9 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
// <--
if( SFX_ITEM_SET == pNewSet->GetItemState(
- RES_FTN_AT_TXTEND, FALSE, &pItem ) ||
+ RES_FTN_AT_TXTEND, sal_False, &pItem ) ||
SFX_ITEM_SET == pNewSet->GetItemState(
- RES_END_AT_TXTEND, FALSE, &pItem ))
+ RES_END_AT_TXTEND, sal_False, &pItem ))
{
bUpdateFtn = true;
}
@@ -536,7 +535,7 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
if( bUpdateFtn )
{
- SwSectionNode* pSectNd = GetFmt()->GetSectionNode( FALSE );
+ SwSectionNode* pSectNd = GetFmt()->GetSectionNode( sal_False );
if( pSectNd )
pSectNd->GetDoc()->GetFtnIdxs().UpdateFtn(SwNodeIndex( *pSectNd ));
}
@@ -617,7 +616,7 @@ void SwSection::MakeChildLinksVisible( const SwSectionNode& rSectNd )
{
const SwNode* pNd;
const ::sfx2::SvBaseLinks& rLnks = rSectNd.GetDoc()->GetLinkManager().GetLinks();
- for( USHORT n = rLnks.Count(); n; )
+ for( sal_uInt16 n = rLnks.Count(); n; )
{
::sfx2::SvBaseLink* pBLnk = &(*rLnks[ --n ]);
if( pBLnk && !pBLnk->IsVisible() &&
@@ -634,7 +633,7 @@ void SwSection::MakeChildLinksVisible( const SwSectionNode& rSectNd )
// steht nur noch in einer normalen Section, also
// wieder anzeigen
if( !pParent )
- pBLnk->SetVisible( TRUE );
+ pBLnk->SetVisible( sal_True );
}
}
}
@@ -662,7 +661,7 @@ SwSectionFmt::~SwSectionFmt()
if( !GetDoc()->IsInDtor() )
{
SwSectionNode* pSectNd;
- const SwNodeIndex* pIdx = GetCntnt( FALSE ).GetCntntIdx();
+ const SwNodeIndex* pIdx = GetCntnt( sal_False ).GetCntntIdx();
if( pIdx && &GetDoc()->GetNodes() == &pIdx->GetNodes() &&
0 != (pSectNd = pIdx->GetNode().GetSectionNode() ))
{
@@ -690,7 +689,7 @@ SwSectionFmt::~SwSectionFmt()
if ( pLast->IsA( TYPE(SwFrm) ) )
{
SwSectionFrm *pFrm = (SwSectionFrm*)pLast;
- SwSectionFrm::MoveCntntAndDelete( pFrm, TRUE );
+ SwSectionFrm::MoveCntntAndDelete( pFrm, sal_True );
pLast = aIter.GoStart();
}
else
@@ -715,17 +714,17 @@ SwSection * SwSectionFmt::GetSection() const
return (SwSectionPtr)aIter.First( TYPE(SwSection) );
}
- OSL_ENSURE( FALSE, "keine Section als Client." );
+ OSL_ENSURE( sal_False, "keine Section als Client." );
return 0;
}
-extern void lcl_DeleteFtn( SwSectionNode *pNd, ULONG nStt, ULONG nEnd );
+extern void lcl_DeleteFtn( SwSectionNode *pNd, sal_uLong nStt, sal_uLong nEnd );
//Vernichtet alle Frms in aDepend (Frms werden per PTR_CAST erkannt).
void SwSectionFmt::DelFrms()
{
SwSectionNode* pSectNd;
- const SwNodeIndex* pIdx = GetCntnt(FALSE).GetCntntIdx();
+ const SwNodeIndex* pIdx = GetCntnt(sal_False).GetCntntIdx();
if( pIdx && &GetDoc()->GetNodes() == &pIdx->GetNodes() &&
0 != (pSectNd = pIdx->GetNode().GetSectionNode() ))
{
@@ -737,7 +736,7 @@ void SwSectionFmt::DelFrms()
if ( pLast->IsA( TYPE(SwFrm) ) )
{
SwSectionFrm *pFrm = (SwSectionFrm*)pLast;
- SwSectionFrm::MoveCntntAndDelete( pFrm, FALSE );
+ SwSectionFrm::MoveCntntAndDelete( pFrm, sal_False );
pLast = aIter.GoStart();
}
else
@@ -756,8 +755,8 @@ void SwSectionFmt::DelFrms()
pLast = aIter++;
}
- ULONG nEnde = pSectNd->EndOfSectionIndex();
- ULONG nStart = pSectNd->GetIndex()+1;
+ sal_uLong nEnde = pSectNd->EndOfSectionIndex();
+ sal_uLong nStart = pSectNd->GetIndex()+1;
lcl_DeleteFtn( pSectNd, nStart, nEnde );
}
if( pIdx )
@@ -767,7 +766,7 @@ void SwSectionFmt::DelFrms()
//zu weiteren Folgefehlern, die mit Laufzeitkosten geloest werden
//muesten.
SwNodeIndex aNextNd( *pIdx );
- SwCntntNode* pCNd = GetDoc()->GetNodes().GoNextSection( &aNextNd, TRUE, FALSE );
+ SwCntntNode* pCNd = GetDoc()->GetNodes().GoNextSection( &aNextNd, sal_True, sal_False );
if( pCNd )
{
const SfxPoolItem& rItem = pCNd->GetSwAttrSet().Get( RES_PAGEDESC );
@@ -781,7 +780,7 @@ void SwSectionFmt::DelFrms()
void SwSectionFmt::MakeFrms()
{
SwSectionNode* pSectNd;
- const SwNodeIndex* pIdx = GetCntnt(FALSE).GetCntntIdx();
+ const SwNodeIndex* pIdx = GetCntnt(sal_False).GetCntntIdx();
if( pIdx && &GetDoc()->GetNodes() == &pIdx->GetNodes() &&
0 != (pSectNd = pIdx->GetNode().GetSectionNode() ))
@@ -804,8 +803,8 @@ void lcl_ClientIter( SwSectionFmt* pFmt, const SfxPoolItem* pOld,
void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
- BOOL bClients = FALSE;
- USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_Bool bClients = sal_False;
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
switch( nWhich )
{
case RES_ATTRSET_CHG:
@@ -815,7 +814,7 @@ void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
SfxItemSet* pOldSet = ((SwAttrSetChg*)pOld)->GetChgSet();
const SfxPoolItem *pItem;
if( SFX_ITEM_SET == pNewSet->GetItemState(
- RES_PROTECT, FALSE, &pItem ))
+ RES_PROTECT, sal_False, &pItem ))
{
lcl_ClientIter( this, pItem, pItem );
pNewSet->ClearItem( RES_PROTECT );
@@ -824,7 +823,7 @@ void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
// --> edit in readonly sections
if( SFX_ITEM_SET == pNewSet->GetItemState(
- RES_EDIT_IN_READONLY, FALSE, &pItem ) )
+ RES_EDIT_IN_READONLY, sal_False, &pItem ) )
{
lcl_ClientIter( this, pItem, pItem );
pNewSet->ClearItem( RES_EDIT_IN_READONLY );
@@ -833,7 +832,7 @@ void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
// <--
if( SFX_ITEM_SET == pNewSet->GetItemState(
- RES_FTN_AT_TXTEND, FALSE, &pItem ))
+ RES_FTN_AT_TXTEND, sal_False, &pItem ))
{
lcl_ClientIter( this, &pOldSet->Get( RES_FTN_AT_TXTEND ),
pItem );
@@ -841,7 +840,7 @@ void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
pOldSet->ClearItem( RES_FTN_AT_TXTEND );
}
if( SFX_ITEM_SET == pNewSet->GetItemState(
- RES_END_AT_TXTEND, FALSE, &pItem ))
+ RES_END_AT_TXTEND, sal_False, &pItem ))
{
lcl_ClientIter( this, &pOldSet->Get( RES_END_AT_TXTEND ),
pItem );
@@ -855,7 +854,7 @@ void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
case RES_SECTION_RESETHIDDENFLAG:
case RES_FTN_AT_TXTEND:
- case RES_END_AT_TXTEND : bClients = TRUE;
+ case RES_END_AT_TXTEND : bClients = sal_True;
// no break !!
case RES_SECTION_HIDDEN:
case RES_SECTION_NOT_HIDDEN:
@@ -922,7 +921,7 @@ void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
}
// erfrage vom Format Informationen
-BOOL SwSectionFmt::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwSectionFmt::GetInfo( SfxPoolItem& rInfo ) const
{
switch( rInfo.Which() )
{
@@ -933,7 +932,7 @@ BOOL SwSectionFmt::GetInfo( SfxPoolItem& rInfo ) const
if( pNd )
((SwFindNearestNode&)rInfo).CheckNode( *pNd );
}
- return TRUE;
+ return sal_True;
case RES_CONTENT_VISIBLE:
{
@@ -952,7 +951,7 @@ BOOL SwSectionFmt::GetInfo( SfxPoolItem& rInfo ) const
}
((SwPtrMsgPoolItem&)rInfo).pObject = pFrm;
}
- return FALSE;
+ return sal_False;
}
return SwModify::GetInfo( rInfo );
}
@@ -971,11 +970,11 @@ extern "C" {
const SwSectionFmt* pFSectFmt = (*(SwSectionPtr*)pFirst)->GetFmt();
const SwSectionFmt* pSSectFmt = (*(SwSectionPtr*)pSecond)->GetFmt();
OSL_ENSURE( pFSectFmt && pSSectFmt &&
- pFSectFmt->GetCntnt(FALSE).GetCntntIdx() &&
- pSSectFmt->GetCntnt(FALSE).GetCntntIdx(),
+ pFSectFmt->GetCntnt(sal_False).GetCntntIdx() &&
+ pSSectFmt->GetCntnt(sal_False).GetCntntIdx(),
"ungueltige Sections" );
- return (int)((long)pFSectFmt->GetCntnt(FALSE).GetCntntIdx()->GetIndex()) -
- pSSectFmt->GetCntnt(FALSE).GetCntntIdx()->GetIndex();
+ return (int)((long)pFSectFmt->GetCntnt(sal_False).GetCntntIdx()->GetIndex()) -
+ pSSectFmt->GetCntnt(sal_False).GetCntntIdx()->GetIndex();
}
int
@@ -998,9 +997,9 @@ extern "C" {
}
// alle Sections, die von dieser abgeleitet sind
-USHORT SwSectionFmt::GetChildSections( SwSections& rArr,
+sal_uInt16 SwSectionFmt::GetChildSections( SwSections& rArr,
SectionSort eSort,
- BOOL bAllSections ) const
+ sal_Bool bAllSections ) const
{
rArr.Remove( 0, rArr.Count() );
@@ -1011,7 +1010,7 @@ USHORT SwSectionFmt::GetChildSections( SwSections& rArr,
const SwNodeIndex* pIdx;
for( pLast = aIter.First(TYPE(SwSectionFmt)); pLast; pLast = aIter.Next() )
if( bAllSections ||
- ( 0 != ( pIdx = ((SwSectionFmt*)pLast)->GetCntnt(FALSE).
+ ( 0 != ( pIdx = ((SwSectionFmt*)pLast)->GetCntnt(sal_False).
GetCntntIdx()) && &pIdx->GetNodes() == &GetDoc()->GetNodes() ))
{
const SwSection* Dummy=((SwSectionFmt*)pLast)->GetSection();
@@ -1045,9 +1044,9 @@ USHORT SwSectionFmt::GetChildSections( SwSections& rArr,
// erfrage, ob sich die Section im Nodes-Array oder UndoNodes-Array
// befindet.
-BOOL SwSectionFmt::IsInNodesArr() const
+sal_Bool SwSectionFmt::IsInNodesArr() const
{
- const SwNodeIndex* pIdx = GetCntnt(FALSE).GetCntntIdx();
+ const SwNodeIndex* pIdx = GetCntnt(sal_False).GetCntntIdx();
return pIdx && &pIdx->GetNodes() == &GetDoc()->GetNodes();
}
@@ -1105,7 +1104,7 @@ void SwSectionFmt::UpdateParent() // Parent wurde veraendert
if( bIsHidden == pSection->IsHiddenFlag() )
{
- SwMsgPoolItem aMsgItem( static_cast<USHORT>(bIsHidden
+ SwMsgPoolItem aMsgItem( static_cast<sal_uInt16>(bIsHidden
? RES_SECTION_HIDDEN
: RES_SECTION_NOT_HIDDEN ) );
pLast->Modify( &aMsgItem, &aMsgItem );
@@ -1137,7 +1136,7 @@ void SwSectionFmt::UpdateParent() // Parent wurde veraendert
SwSectionNode* SwSectionFmt::GetSectionNode(bool const bAlways)
{
- const SwNodeIndex* pIdx = GetCntnt(FALSE).GetCntntIdx();
+ const SwNodeIndex* pIdx = GetCntnt(sal_False).GetCntntIdx();
if( pIdx && ( bAlways || &pIdx->GetNodes() == &GetDoc()->GetNodes() ))
return pIdx->GetNode().GetSectionNode();
return 0;
@@ -1175,7 +1174,7 @@ bool SwSectionFmt::IsInUndo() const
bool SwSectionFmt::IsInContent() const
{
- SwNodeIndex const*const pIdx = GetCntnt(FALSE).GetCntntIdx();
+ SwNodeIndex const*const pIdx = GetCntnt(sal_False).GetCntntIdx();
OSL_ENSURE(pIdx, "SwSectionFmt::IsInContent: no index?");
return (pIdx) ? !GetDoc()->IsInHeaderFooter(*pIdx) : true;
}
@@ -1216,7 +1215,7 @@ void lcl_BreakSectionLinksInSect( const SwSectionNode& rSectNd )
}
const ::sfx2::SvBaseLink* pOwnLink( &(rSectNd.GetSection().GetBaseLink() ) );
const ::sfx2::SvBaseLinks& rLnks = rSectNd.GetDoc()->GetLinkManager().GetLinks();
- for ( USHORT n = rLnks.Count(); n > 0; )
+ for ( sal_uInt16 n = rLnks.Count(); n > 0; )
{
SwIntrnlSectRefLink* pSectLnk = dynamic_cast<SwIntrnlSectRefLink*>(&(*rLnks[ --n ]));
if ( pSectLnk && pSectLnk != pOwnLink &&
@@ -1249,7 +1248,7 @@ void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
aValue <<= ::rtl::OUString( sName ); // beliebiger Name
const ::sfx2::SvBaseLinks& rLnks = pDoc->GetLinkManager().GetLinks();
- for( USHORT n = rLnks.Count(); n; )
+ for( sal_uInt16 n = rLnks.Count(); n; )
{
::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]);
if( pLnk && pLnk != &rUpdLnk &&
@@ -1288,13 +1287,14 @@ void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
// Der Return-Wert gibt an, was mit der Shell zu geschehen hat:
// 0 - Fehler, konnte DocShell nicht finden
// 1 - DocShell ist ein existieren Document
-// 2 - DocShell wurde neu angelegt, muss also wieder geschlossen werden
+// 2 - DocShell wurde neu angelegt, muss also wieder geschlossen werden ( will be assigned to xLockRef additionaly )
int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
+ SfxObjectShellLock& xLockRef,
const String& rFileName,
const String& rPasswd,
String& rFilter,
- INT16 nVersion,
+ sal_Int16 nVersion,
SwDocShell* pDestSh )
{
if( !rFileName.Len() )
@@ -1309,7 +1309,7 @@ int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
TypeId aType( TYPE(SwDocShell) );
SfxObjectShell* pShell = pDestSh;
- BOOL bFirst = 0 != pShell;
+ sal_Bool bFirst = 0 != pShell;
if( !bFirst )
// keine DocShell uebergeben, also beginne mit der ersten aus der
@@ -1324,7 +1324,7 @@ int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
{
const SfxPoolItem* pItem;
if( ( SFX_ITEM_SET == pMed->GetItemSet()->GetItemState(
- SID_VERSION, FALSE, &pItem ) )
+ SID_VERSION, sal_False, &pItem ) )
? (nVersion == ((SfxInt16Item*)pItem)->GetValue())
: !nVersion )
{
@@ -1336,7 +1336,7 @@ int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
if( bFirst )
{
- bFirst = FALSE;
+ bFirst = sal_False;
pShell = SfxObjectShell::GetFirst( &aType );
}
else
@@ -1345,7 +1345,7 @@ int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
// 2. selbst die Date oeffnen
SfxMedium* pMed = new SfxMedium( aTmpObj.GetMainURL(
- INetURLObject::NO_DECODE ), STREAM_READ, TRUE );
+ INetURLObject::NO_DECODE ), STREAM_READ, sal_True );
if( INET_PROT_FILE == aTmpObj.GetProtocol() )
pMed->DownLoad(); // nur mal das Medium anfassen (DownLoaden)
@@ -1369,14 +1369,16 @@ int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
pMed->GetItemSet()->Put( SfxStringItem( SID_PASSWORD, rPasswd ));
if( !pSfxFlt )
- aMatcher.DetectFilter( *pMed, &pSfxFlt, FALSE, FALSE );
+ aMatcher.DetectFilter( *pMed, &pSfxFlt, sal_False, sal_False );
if( pSfxFlt )
{
// ohne Filter geht gar nichts
pMed->SetFilter( pSfxFlt );
- xDocSh = new SwDocShell( SFX_CREATE_MODE_INTERNAL );
+ // if the new shell is created, SfxObjectShellLock should be used to let it be closed later for sure
+ xLockRef = new SwDocShell( SFX_CREATE_MODE_INTERNAL );
+ xDocSh = (SfxObjectShell*)xLockRef;
if( xDocSh->DoLoad( pMed ) )
return 2;
}
@@ -1392,10 +1394,10 @@ int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
const uno::Any & rValue )
{
- SwSectionNode* pSectNd = rSectFmt.GetSectionNode( FALSE );
+ SwSectionNode* pSectNd = rSectFmt.GetSectionNode( sal_False );
SwDoc* pDoc = rSectFmt.GetDoc();
- ULONG nDataFormat = SotExchange::GetFormatIdFromMimeType( rMimeType );
+ sal_uLong nDataFormat = SotExchange::GetFormatIdFromMimeType( rMimeType );
if( !pSectNd || !pDoc || pDoc->IsInDtor() || ChkNoDataFlag() ||
sfx2::LinkManager::RegisterStatusInfoId() == nDataFormat )
@@ -1413,10 +1415,10 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
// <--
// Undo immer abschalten
- BOOL bWasUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
- BOOL bWasVisibleLinks = pDoc->IsVisibleLinks();
- pDoc->SetVisibleLinks( FALSE );
+ bool const bWasUndo = pDoc->GetIDocumentUndoRedo().DoesUndo();
+ pDoc->GetIDocumentUndoRedo().DoUndo(false);
+ sal_Bool bWasVisibleLinks = pDoc->IsVisibleLinks();
+ pDoc->SetVisibleLinks( sal_False );
SwPaM* pPam;
ViewShell* pVSh = 0;
@@ -1436,7 +1438,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
SwPosition aPos( aIdx, SwIndex( pNewNd, 0 ));
aPos.nNode--;
- pDoc->CorrAbs( aIdx, aEndIdx, aPos, TRUE );
+ pDoc->CorrAbs( aIdx, aEndIdx, aPos, sal_True );
pPam = new SwPaM( aPos );
@@ -1473,6 +1475,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
RedlineMode_t eOldRedlineMode = nsRedlineMode_t::REDLINE_NONE;
SfxObjectShellRef xDocSh;
+ SfxObjectShellLock xLockRef;
int nRet;
if( !sFileName.Len() )
{
@@ -1481,7 +1484,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
}
else
{
- nRet = lcl_FindDocShell( xDocSh, sFileName,
+ nRet = lcl_FindDocShell( xDocSh, xLockRef, sFileName,
rSection.GetLinkFilePassword(),
sFilter, 0, pDoc->GetDocShell() );
if( nRet )
@@ -1504,7 +1507,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == xDocSh->GetMedium()->GetItemSet()->
- GetItemState( SID_PASSWORD, FALSE, &pItem ) )
+ GetItemState( SID_PASSWORD, sal_False, &pItem ) )
rSection.SetLinkFilePassword(
((SfxStringItem*)pItem)->GetValue() );
}
@@ -1514,7 +1517,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
if( sRange.Len() )
{
// Rekursionen abfangen
- BOOL bRecursion = FALSE;
+ sal_Bool bRecursion = sal_False;
if( pSrcDoc == pDoc )
{
SwServerObjectRef refObj( (SwServerObject*)
@@ -1556,13 +1559,13 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
if ( pSrcDoc != pDoc &&
rSection.IsProtectFlag() )
{
- pSrcDoc->GetLinkManager().UpdateAllLinks( FALSE, TRUE, FALSE, 0 );
+ pSrcDoc->GetLinkManager().UpdateAllLinks( sal_False, sal_True, sal_False, 0 );
}
// <--
if( pCpyRg )
{
SwNodeIndex& rInsPos = pPam->GetPoint()->nNode;
- BOOL bCreateFrm = rInsPos.GetIndex() <=
+ sal_Bool bCreateFrm = rInsPos.GetIndex() <=
pDoc->GetNodes().GetEndOfExtras().GetIndex() ||
rInsPos.GetNode().FindTableNode();
@@ -1583,7 +1586,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
pPam->Move( fnMoveBackward, fnGoNode );
pPam->SetMark(); // beide SwPositions ummelden!
- pDoc->CorrAbs( aSave, *pPam->GetPoint(), 0, TRUE );
+ pDoc->CorrAbs( aSave, *pPam->GetPoint(), 0, sal_True );
pDoc->GetNodes().Delete( aSave, 1 );
}
delete pCpyRg;
@@ -1642,15 +1645,15 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
if( pESh )
{
- pESh->Pop( FALSE );
+ pESh->Pop( sal_False );
pPam = 0; // pam is deleted before
}
}
- // Alle UndoActions entfernen und Undo wieder einschalten
- pDoc->DelAllUndoObj();
- pDoc->DoUndo( bWasUndo );
+ // remove all undo actions and turn undo on again
+ pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
+ pDoc->GetIDocumentUndoRedo().DoUndo(bWasUndo);
pDoc->SetVisibleLinks( bWasVisibleLinks );
pDoc->UnlockExpFlds();
@@ -1674,7 +1677,7 @@ void SwIntrnlSectRefLink::Closed()
// kennzeichnen und das Flag umsetzen
const SwSectionFmts& rFmts = pDoc->GetSections();
- for( USHORT n = rFmts.Count(); n; )
+ for( sal_uInt16 n = rFmts.Count(); n; )
if( rFmts[ --n ] == &rSectFmt )
{
ViewShell* pSh;
@@ -1698,7 +1701,7 @@ void SwIntrnlSectRefLink::Closed()
pDoc->UpdateSection( n, aSectionData );
// alle in der Section liegenden Links werden sichtbar
- SwSectionNode* pSectNd = rSectFmt.GetSectionNode( FALSE );
+ SwSectionNode* pSectNd = rSectFmt.GetSectionNode( sal_False );
if( pSectNd )
pSectNd->GetSection().MakeChildLinksVisible( *pSectNd );
@@ -1720,7 +1723,7 @@ void SwSection::CreateLink( LinkCreateType eCreateType )
if (!pFmt || (CONTENT_SECTION == m_Data.GetType()))
return ;
- USHORT nUpdateType = sfx2::LINKUPDATE_ALWAYS;
+ sal_uInt16 nUpdateType = sfx2::LINKUPDATE_ALWAYS;
if (!m_RefLink.Is())
{
@@ -1755,7 +1758,7 @@ void SwSection::CreateLink( LinkCreateType eCreateType )
String sFltr( sCmd.GetToken( 1, sfx2::cTokenSeperator ) );
String sRange( sCmd.GetToken( 2, sfx2::cTokenSeperator ) );
pFmt->GetDoc()->GetLinkManager().InsertFileLink( *pLnk,
- static_cast<USHORT>(m_Data.GetType()),
+ static_cast<sal_uInt16>(m_Data.GetType()),
sCmd.GetToken( 0, sfx2::cTokenSeperator ),
( sFltr.Len() ? &sFltr : 0 ),
( sRange.Len() ? &sRange : 0 ) );
@@ -1809,14 +1812,14 @@ void SwSection::BreakLink()
const SwNode* SwIntrnlSectRefLink::GetAnchor() const
{
- return rSectFmt.GetSectionNode( FALSE );
+ return rSectFmt.GetSectionNode( sal_False );
}
-BOOL SwIntrnlSectRefLink::IsInRange( ULONG nSttNd, ULONG nEndNd,
+sal_Bool SwIntrnlSectRefLink::IsInRange( sal_uLong nSttNd, sal_uLong nEndNd,
xub_StrLen , xub_StrLen ) const
{
- SwStartNode* pSttNd = rSectFmt.GetSectionNode( FALSE );
+ SwStartNode* pSttNd = rSectFmt.GetSectionNode( sal_False );
return pSttNd &&
nSttNd < pSttNd->GetIndex() &&
pSttNd->EndOfSectionIndex() < nEndNd;
diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx
index 37ca7e2a99f8..464753c462b7 100644
--- a/sw/source/core/docnode/swbaslnk.cxx
+++ b/sw/source/core/docnode/swbaslnk.cxx
@@ -64,7 +64,7 @@
using namespace com::sun::star;
-BOOL SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd );
+sal_Bool SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd );
TYPEINIT1( SwBaseLink, ::sfx2::SvBaseLink );
@@ -106,11 +106,11 @@ void SwBaseLink::DataChanged( const String& rMimeType,
SwDoc* pDoc = pCntntNode->GetDoc();
if( pDoc->IsInDtor() || ChkNoDataFlag() || bIgnoreDataChanged )
{
- bIgnoreDataChanged = FALSE;
+ bIgnoreDataChanged = sal_False;
return ;
}
- ULONG nFmt = SotExchange::GetFormatIdFromMimeType( rMimeType );
+ sal_uLong nFmt = SotExchange::GetFormatIdFromMimeType( rMimeType );
if( pCntntNode->IsNoTxtNode() &&
nFmt == sfx2::LinkManager::RegisterStatusInfoId() )
@@ -119,7 +119,7 @@ void SwBaseLink::DataChanged( const String& rMimeType,
::rtl::OUString sState;
if( rValue.hasValue() && ( rValue >>= sState ))
{
- USHORT nEvent = 0;
+ sal_uInt16 nEvent = 0;
switch( sState.toInt32() )
{
case sfx2::LinkManager::STATE_LOAD_OK: nEvent = SVX_EVENT_IMAGE_LOAD; break;
@@ -138,10 +138,10 @@ void SwBaseLink::DataChanged( const String& rMimeType,
return; // das wars!
}
- BOOL bUpdate = FALSE;
- BOOL bGraphicArrived = FALSE;
- BOOL bGraphicPieceArrived = FALSE;
- BOOL bDontNotify = FALSE;
+ sal_Bool bUpdate = sal_False;
+ sal_Bool bGraphicArrived = sal_False;
+ sal_Bool bGraphicPieceArrived = sal_False;
+ sal_Bool bDontNotify = sal_False;
Size aGrfSz, aFrmFmtSz;
if( pCntntNode->IsGrfNode() )
@@ -181,12 +181,12 @@ void SwBaseLink::DataChanged( const String& rMimeType,
// gesetzt ist, dann muss "unten" der Teil von
// bGraphicArrived durchlaufen werden!
// (ansonten wird die Grafik in deft. Size gepaintet)
- bGraphicArrived = TRUE;
- bGraphicPieceArrived = FALSE;
+ bGraphicArrived = sal_True;
+ bGraphicPieceArrived = sal_False;
}
rGrfObj.SetGraphic( aGrf, rGrfObj.GetLink() );
- bUpdate = TRUE;
+ bUpdate = sal_True;
// Bug 33999: damit der Node den Transparent-Status
// richtig gesetzt hat, ohne auf die Grafik
@@ -204,7 +204,7 @@ void SwBaseLink::DataChanged( const String& rMimeType,
((SwGrfNode*)pCntntNode)->SetTwipSize( Size(0,0) );
}
else if( pCntntNode->IsOLENode() )
- bUpdate = TRUE;
+ bUpdate = sal_True;
ViewShell *pSh = 0;
SwEditShell* pESh = pDoc->GetEditShell( &pSh );
@@ -216,19 +216,19 @@ void SwBaseLink::DataChanged( const String& rMimeType,
{
SwMsgPoolItem aMsgHint( RES_GRAPHIC_PIECE_ARRIVED );
pCntntNode->Modify( &aMsgHint, &aMsgHint );
- bUpdate = FALSE;
+ bUpdate = sal_False;
}
}
- static BOOL bInNotifyLinks = FALSE;
+ static sal_Bool bInNotifyLinks = sal_False;
if( bUpdate && !bDontNotify && (!bSwapIn || bGraphicArrived) &&
!bInNotifyLinks)
{
- BOOL bLockView = FALSE;
+ sal_Bool bLockView = sal_False;
if( pSh )
{
bLockView = pSh->IsViewLocked();
- pSh->LockView( TRUE );
+ pSh->LockView( sal_True );
}
if( pESh )
@@ -236,16 +236,16 @@ void SwBaseLink::DataChanged( const String& rMimeType,
else if( pSh )
pSh->StartAction();
- SwMsgPoolItem aMsgHint( static_cast<USHORT>(
+ SwMsgPoolItem aMsgHint( static_cast<sal_uInt16>(
bGraphicArrived ? RES_GRAPHIC_ARRIVED : RES_UPDATE_ATTR ) );
if ( bGraphicArrived )
{
//Alle benachrichtigen, die am gleichen Link horchen.
- bInNotifyLinks = TRUE;
+ bInNotifyLinks = sal_True;
const ::sfx2::SvBaseLinks& rLnks = pDoc->GetLinkManager().GetLinks();
- for( USHORT n = rLnks.Count(); n; )
+ for( sal_uInt16 n = rLnks.Count(); n; )
{
::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]);
if( pLnk && OBJECT_CLIENT_GRF == pLnk->GetObjType() &&
@@ -258,9 +258,9 @@ void SwBaseLink::DataChanged( const String& rMimeType,
( !bSwapIn ||
GRAPHIC_DEFAULT == pGrfNd->GetGrfObj().GetType()))
{
- pBLink->bIgnoreDataChanged = FALSE;
+ pBLink->bIgnoreDataChanged = sal_False;
pBLink->DataChanged( rMimeType, rValue );
- pBLink->bIgnoreDataChanged = TRUE;
+ pBLink->bIgnoreDataChanged = sal_True;
pGrfNd->SetGrafikArrived( ((SwGrfNode*)pCntntNode)->
IsGrafikArrived() );
@@ -276,7 +276,7 @@ void SwBaseLink::DataChanged( const String& rMimeType,
}
}
- bInNotifyLinks = FALSE;
+ bInNotifyLinks = sal_False;
}
else
{
@@ -286,8 +286,8 @@ void SwBaseLink::DataChanged( const String& rMimeType,
if( pESh )
{
- const BOOL bEndActionByVirDev = pESh->IsEndActionByVirDev();
- pESh->SetEndActionByVirDev( TRUE );
+ const sal_Bool bEndActionByVirDev = pESh->IsEndActionByVirDev();
+ pESh->SetEndActionByVirDev( sal_True );
pESh->EndAllAction();
pESh->SetEndActionByVirDev( bEndActionByVirDev );
}
@@ -295,13 +295,13 @@ void SwBaseLink::DataChanged( const String& rMimeType,
pSh->EndAction();
if( pSh && !bLockView )
- pSh->LockView( FALSE );
+ pSh->LockView( sal_False );
}
}
-BOOL SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd )
+sal_Bool SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
ViewShell *pSh;
CurrShell *pCurr = 0;
if ( pGrfNd->GetDoc()->GetEditShell( &pSh ) )
@@ -339,7 +339,7 @@ BOOL SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd )
SwFmtFrmSize aAttr( rOldAttr );
aAttr.SetSize( aCalcSz );
pFmt->SetFmtAttr( aAttr );
- bRet = TRUE;
+ bRet = sal_True;
}
if( !aSz.Width() )
@@ -351,19 +351,19 @@ BOOL SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd )
SwNode *pANd;
SwTableNode *pTblNd;
if( pAPos &&
- 0 != (pANd = pDoc->GetNodes()[pAPos->nNode]) &&
+ 0 != (pANd = & pAPos->nNode.GetNode()) &&
0 != (pTblNd = pANd->FindTableNode()) )
{
- const BOOL bLastGrf = !pTblNd->GetTable().DecGrfsThatResize();
+ const sal_Bool bLastGrf = !pTblNd->GetTable().DecGrfsThatResize();
SwHTMLTableLayout *pLayout =
pTblNd->GetTable().GetHTMLTableLayout();
if( pLayout )
{
- const USHORT nBrowseWidth =
+ const sal_uInt16 nBrowseWidth =
pLayout->GetBrowseWidthByTable( *pDoc );
if ( nBrowseWidth )
{
- pLayout->Resize( nBrowseWidth, TRUE, TRUE,
+ pLayout->Resize( nBrowseWidth, sal_True, sal_True,
bLastGrf ? HTMLTABLE_RESIZE_NOW
: 500 );
}
@@ -383,11 +383,11 @@ BOOL SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd )
}
-BOOL SwBaseLink::SwapIn( BOOL bWaitForData, BOOL bNativFormat )
+sal_Bool SwBaseLink::SwapIn( sal_Bool bWaitForData, sal_Bool bNativFormat )
{
- bSwapIn = TRUE;
+ bSwapIn = sal_True;
- BOOL bRes;
+ sal_Bool bRes;
if( !GetObj() && ( bNativFormat || ( !IsSynchron() && bWaitForData ) ))
{
@@ -416,27 +416,27 @@ BOOL SwBaseLink::SwapIn( BOOL bWaitForData, BOOL bNativFormat )
if( bWaitForData && !GetObj() )
{
OSL_ENSURE( !this, "das SvxFileObject wurde in einem GetData geloescht!" );
- bRes = FALSE;
+ bRes = sal_False;
}
else if( 0 != ( bRes = aValue.hasValue() ) )
{
//JP 14.04.99: Bug 64820 - das Flag muss beim SwapIn natuerlich
// zurueckgesetzt werden. Die Daten sollen ja neu
// uebernommen werden
- bIgnoreDataChanged = FALSE;
+ bIgnoreDataChanged = sal_False;
DataChanged( aMimeType, aValue );
}
}
else if( !IsSynchron() && bWaitForData )
{
- SetSynchron( TRUE );
+ SetSynchron( sal_True );
bRes = Update();
- SetSynchron( FALSE );
+ SetSynchron( sal_False );
}
else
bRes = Update();
- bSwapIn = FALSE;
+ bSwapIn = sal_False;
return bRes;
}
@@ -477,7 +477,7 @@ const SwNode* SwBaseLink::GetAnchor() const
return 0;
}
-BOOL SwBaseLink::IsRecursion( const SwBaseLink* pChkLnk ) const
+sal_Bool SwBaseLink::IsRecursion( const SwBaseLink* pChkLnk ) const
{
SwServerObjectRef aRef( (SwServerObject*)GetObj() );
if( aRef.Is() )
@@ -487,14 +487,14 @@ BOOL SwBaseLink::IsRecursion( const SwBaseLink* pChkLnk ) const
// handelt es sich um eine Rekursion.
return aRef->IsLinkInServer( pChkLnk );
}
- return FALSE;
+ return sal_False;
}
-BOOL SwBaseLink::IsInRange( ULONG, ULONG, xub_StrLen, xub_StrLen ) const
+sal_Bool SwBaseLink::IsInRange( sal_uLong, sal_uLong, xub_StrLen, xub_StrLen ) const
{
// Grafik oder OLE-Links nicht,
// Felder oder Sections haben eigene Ableitung!
- return FALSE;
+ return sal_False;
}
SwBaseLink::~SwBaseLink()
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 94fb6973120e..bf0eb423734c 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -175,8 +175,8 @@ SwContact* GetUserCall( const SdrObject* pObj )
return static_cast<SwContact*>(pObj->GetUserCall());
}
-// liefert TRUE falls das SrdObject ein Marquee-Object (Lauftext) ist
-BOOL IsMarqueeTextObj( const SdrObject& rObj )
+// liefert sal_True falls das SrdObject ein Marquee-Object (Lauftext) ist
+sal_Bool IsMarqueeTextObj( const SdrObject& rObj )
{
SdrTextAniKind eTKind;
return SdrInventor == rObj.GetObjInventor() &&
@@ -238,7 +238,7 @@ void SwContact::MoveObjToVisibleLayer( SdrObject* _pDrawObj )
if ( pAnchoredObj->GetPageFrm() )
{
::Notify_Background( _pDrawObj, pAnchoredObj->GetPageFrm(),
- pAnchoredObj->GetObjRect(), PREP_FLY_ARRIVE, TRUE );
+ pAnchoredObj->GetObjRect(), PREP_FLY_ARRIVE, sal_True );
}
pAnchoredObj->InvalidateObjPos();
@@ -272,7 +272,7 @@ void SwContact::MoveObjToInvisibleLayer( SdrObject* _pDrawObj )
if ( pAnchoredObj && pAnchoredObj->GetPageFrm() )
{
::Notify_Background( _pDrawObj, pAnchoredObj->GetPageFrm(),
- pAnchoredObj->GetObjRect(), PREP_FLY_LEAVE, TRUE );
+ pAnchoredObj->GetObjRect(), PREP_FLY_LEAVE, sal_True );
}
}
// <--
@@ -351,7 +351,7 @@ void SwContact::_MoveObjToLayer( const bool _bToVisible,
static_cast<SdrObjGroup*>(_pDrawObj)->GetSubList();
if ( pLst )
{
- for ( USHORT i = 0; i < pLst->GetObjCount(); ++i )
+ for ( sal_uInt16 i = 0; i < pLst->GetObjCount(); ++i )
{
_MoveObjToLayer( _bToVisible, pLst->GetObj( i ) );
}
@@ -541,7 +541,7 @@ SwVirtFlyDrawObj *SwFlyDrawContact::CreateNewRef( SwFlyFrm *pFly )
SdrPage* pPg( 0L );
if ( 0 != ( pPg = GetMaster()->GetPage() ) )
{
- const UINT32 nOrdNum = GetMaster()->GetOrdNum();
+ const sal_uInt32 nOrdNum = GetMaster()->GetOrdNum();
pPg->ReplaceObject( pDrawObj, nOrdNum );
}
// --> OD 2004-08-16 #i27030# - insert new <SwVirtFlyDrawObj> instance
@@ -712,7 +712,7 @@ bool CheckControlLayer( const SdrObject *pObj )
if ( pObj->ISA( SdrObjGroup ) )
{
const SdrObjList *pLst = ((SdrObjGroup*)pObj)->GetSubList();
- for ( USHORT i = 0; i < pLst->GetObjCount(); ++i )
+ for ( sal_uInt16 i = 0; i < pLst->GetObjCount(); ++i )
{
if ( ::CheckControlLayer( pLst->GetObj( i ) ) )
{
@@ -731,7 +731,7 @@ SwDrawContact::SwDrawContact( SwFrmFmt* pToRegisterIn, SdrObject* pObj ) :
mbDisconnectInProgress( false ),
mbUserCallActive( false ),
// Note: value of <meEventTypeOfCurrentUserCall> isn't of relevance, because
- // <mbUserCallActive> is FALSE.
+ // <mbUserCallActive> is sal_False.
meEventTypeOfCurrentUserCall( SDRUSERCALL_MOVEONLY )
{
// clear vector containing 'virtual' drawing objects.
@@ -1100,7 +1100,7 @@ void SwDrawContact::NotifyBackgrdOfAllVirtObjs( const Rectangle* pOldBoundRect )
aOldRect.Pos() += pDrawVirtObj->GetOffset();
if( aOldRect.HasArea() )
::Notify_Background( pDrawVirtObj, pPage,
- aOldRect, PREP_FLY_LEAVE,TRUE);
+ aOldRect, PREP_FLY_LEAVE,sal_True);
}
// #i34640# - include spacing for wrapping
SwRect aRect( pDrawVirtObj->GetAnchoredObj()->GetObjRectWithSpaces() );
@@ -1109,7 +1109,7 @@ void SwDrawContact::NotifyBackgrdOfAllVirtObjs( const Rectangle* pOldBoundRect )
SwPageFrm* pPg = (SwPageFrm*)::FindPage( aRect, pPage );
if ( pPg )
::Notify_Background( pDrawVirtObj, pPg, aRect,
- PREP_FLY_ARRIVE, TRUE );
+ PREP_FLY_ARRIVE, sal_True );
}
::ClrContourCache( pDrawVirtObj );
}
@@ -1139,7 +1139,7 @@ void lcl_NotifyBackgroundOfObj( SwDrawContact& _rDrawContact,
SwPageFrm* pOldPageFrm = (SwPageFrm*)::FindPage( aOldRect, pPageFrm );
// <--
::Notify_Background( &_rObj, pOldPageFrm, aOldRect,
- PREP_FLY_LEAVE, TRUE);
+ PREP_FLY_LEAVE, sal_True);
}
}
// --> OD 2004-10-21 #i34640# - include spacing for wrapping
@@ -1149,7 +1149,7 @@ void lcl_NotifyBackgroundOfObj( SwDrawContact& _rDrawContact,
{
pPageFrm = (SwPageFrm*)::FindPage( aNewRect, pPageFrm );
::Notify_Background( &_rObj, pPageFrm, aNewRect,
- PREP_FLY_ARRIVE, TRUE );
+ PREP_FLY_ARRIVE, sal_True );
}
ClrContourCache( &_rObj );
}
@@ -1528,12 +1528,12 @@ namespace
{
static const SwFmtAnchor* lcl_getAnchorFmt( const SfxPoolItem& _rItem )
{
- USHORT nWhich = _rItem.Which();
+ sal_uInt16 nWhich = _rItem.Which();
const SwFmtAnchor* pAnchorFmt = NULL;
if ( RES_ATTRSET_CHG == nWhich )
{
static_cast<const SwAttrSetChg&>(_rItem).GetChgSet()->
- GetItemState( RES_ANCHOR, FALSE, (const SfxPoolItem**)&pAnchorFmt );
+ GetItemState( RES_ANCHOR, sal_False, (const SfxPoolItem**)&pAnchorFmt );
}
else if ( RES_ANCHOR == nWhich )
{
@@ -1554,14 +1554,14 @@ void SwDrawContact::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
OSL_ENSURE( !mbDisconnectInProgress,
"<SwDrawContact::Modify(..)> called during disconnection.");
- USHORT nWhich = pNew ? pNew->Which() : 0;
+ sal_uInt16 nWhich = pNew ? pNew->Which() : 0;
const SwFmtAnchor* pNewAnchorFmt = pNew ? lcl_getAnchorFmt( *pNew ) : NULL;
if ( pNewAnchorFmt )
{
// nicht auf ein Reset Anchor reagieren !!!!!
if ( SFX_ITEM_SET ==
- GetFmt()->GetAttrSet().GetItemState( RES_ANCHOR, FALSE ) )
+ GetFmt()->GetAttrSet().GetItemState( RES_ANCHOR, sal_False ) )
{
// no connect to layout during disconnection
if ( !mbDisconnectInProgress )
@@ -1614,11 +1614,11 @@ void SwDrawContact::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
RES_WRAP_INFLUENCE_ON_OBJPOS == nWhich ||
( RES_ATTRSET_CHG == nWhich &&
( SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
- RES_SURROUND, FALSE ) ||
+ RES_SURROUND, sal_False ) ||
SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
- RES_OPAQUE, FALSE ) ||
+ RES_OPAQUE, sal_False ) ||
SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
- RES_WRAP_INFLUENCE_ON_OBJPOS, FALSE ) ) ) )
+ RES_WRAP_INFLUENCE_ON_OBJPOS, sal_False ) ) ) )
{
lcl_NotifyBackgroundOfObj( *this, *GetMaster(), 0L );
NotifyBackgrdOfAllVirtObjs( 0L );
@@ -1630,15 +1630,15 @@ void SwDrawContact::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
RES_FOLLOW_TEXT_FLOW == nWhich ||
( RES_ATTRSET_CHG == nWhich &&
( SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
- RES_LR_SPACE, FALSE ) ||
+ RES_LR_SPACE, sal_False ) ||
SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
- RES_UL_SPACE, FALSE ) ||
+ RES_UL_SPACE, sal_False ) ||
SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
- RES_HORI_ORIENT, FALSE ) ||
+ RES_HORI_ORIENT, sal_False ) ||
SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
- RES_VERT_ORIENT, FALSE ) ||
+ RES_VERT_ORIENT, sal_False ) ||
SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
- RES_FOLLOW_TEXT_FLOW, FALSE ) ) ) )
+ RES_FOLLOW_TEXT_FLOW, sal_False ) ) ) )
{
lcl_NotifyBackgroundOfObj( *this, *GetMaster(), 0L );
NotifyBackgrdOfAllVirtObjs( 0L );
@@ -1748,7 +1748,7 @@ void SwDrawContact::DisconnectFromLayout( bool _bMoveMasterToInvisibleLayer )
for( SdrView* pView = aIter.FirstView(); pView;
pView = aIter.NextView() )
{
- pView->MarkObj( GetMaster(), pView->GetSdrPageView(), TRUE );
+ pView->MarkObj( GetMaster(), pView->GetSdrPageView(), sal_True );
}
// Instead of removing 'master' object from drawing page, move the
@@ -1881,10 +1881,10 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
{
case FLY_AT_PAGE:
{
- USHORT nPgNum = pAnch->GetPageNum();
+ sal_uInt16 nPgNum = pAnch->GetPageNum();
SwPageFrm *pPage = static_cast<SwPageFrm*>(pRoot->Lower());
- for ( USHORT i = 1; i < nPgNum && pPage; ++i )
+ for ( sal_uInt16 i = 1; i < nPgNum && pPage; ++i )
{
pPage = static_cast<SwPageFrm*>(pPage->GetNext());
}
@@ -2014,7 +2014,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
}
break;
default:
- OSL_ENSURE( FALSE, "Unknown Anchor." );
+ OSL_ENSURE( sal_False, "Unknown Anchor." );
break;
}
if ( GetAnchorFrm() )
@@ -2505,7 +2505,7 @@ SdrHdl* SwDrawVirtObj::GetHdl(sal_uInt32 nHdlNum) const
return pHdl;
}
-SdrHdl* SwDrawVirtObj::GetPlusHdl(const SdrHdl& rHdl, USHORT nPlNum) const
+SdrHdl* SwDrawVirtObj::GetPlusHdl(const SdrHdl& rHdl, sal_uInt16 nPlNum) const
{
SdrHdl* pHdl = rRefObj.GetPlusHdl(rHdl, nPlNum);
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index bcb3c278e4a2..096386733626 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -44,6 +44,7 @@
#include "cntfrm.hxx"
#include "frmatr.hxx"
#include "doc.hxx"
+#include <IDocumentUndoRedo.hxx>
#include "dview.hxx"
#include "dflyobj.hxx"
#include "flyfrm.hxx"
@@ -72,7 +73,7 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star;
-static BOOL bInResize = FALSE;
+static sal_Bool bInResize = sal_False;
TYPEINIT1( SwFlyDrawObj, SdrObject )
TYPEINIT1( SwVirtFlyDrawObj, SdrVirtObj )
@@ -150,19 +151,19 @@ SwFlyDrawObj::~SwFlyDrawObj()
|*
*************************************************************************/
-UINT32 SwFlyDrawObj::GetObjInventor() const
+sal_uInt32 SwFlyDrawObj::GetObjInventor() const
{
return SWGInventor;
}
-UINT16 SwFlyDrawObj::GetObjIdentifier() const
+sal_uInt16 SwFlyDrawObj::GetObjIdentifier() const
{
return SwFlyDrawObjIdentifier;
}
-UINT16 SwFlyDrawObj::GetObjVersion() const
+sal_uInt16 SwFlyDrawObj::GetObjVersion() const
{
return SwDrawFirst;
}
@@ -418,7 +419,7 @@ SwVirtFlyDrawObj::SwVirtFlyDrawObj(SdrObject& rNew, SwFlyFrm* pFly) :
pFlyFrm( pFly )
{
//#110094#-1
- // bNotPersistent = bNeedColorRestore = bWriterFlyFrame = TRUE;
+ // bNotPersistent = bNeedColorRestore = bWriterFlyFrame = sal_True;
const SvxProtectItem &rP = pFlyFrm->GetFmt()->GetProtect();
bMovProt = rP.IsPosProtected();
bSizProt = rP.IsSizeProtected();
@@ -502,13 +503,13 @@ void SwVirtFlyDrawObj::wrap_DoPaintObject() const
void SwVirtFlyDrawObj::TakeObjInfo( SdrObjTransformInfoRec& rInfo ) const
{
rInfo.bSelectAllowed = rInfo.bMoveAllowed =
- rInfo.bResizeFreeAllowed = rInfo.bResizePropAllowed = TRUE;
+ rInfo.bResizeFreeAllowed = rInfo.bResizePropAllowed = sal_True;
rInfo.bRotateFreeAllowed = rInfo.bRotate90Allowed =
rInfo.bMirrorFreeAllowed = rInfo.bMirror45Allowed =
rInfo.bMirror90Allowed = rInfo.bShearAllowed =
rInfo.bCanConvToPath = rInfo.bCanConvToPoly =
- rInfo.bCanConvToPathLineToArea = rInfo.bCanConvToPolyLineToArea = FALSE;
+ rInfo.bCanConvToPathLineToArea = rInfo.bCanConvToPolyLineToArea = sal_False;
}
@@ -652,8 +653,19 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
long lYDiff = aNewPos.Y() - aOldPos.Y();
if( GetFlyFrm()->GetAnchorFrm()->IsVertical() )
{
- lXDiff -= rVert.GetPos();
- lYDiff += rHori.GetPos();
+ //lXDiff -= rVert.GetPos();
+ //lYDiff += rHori.GetPos();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( GetFlyFrm()->GetAnchorFrm()->IsVertLR() )
+ {
+ lXDiff += rVert.GetPos();
+ lXDiff = -lXDiff;
+ }
+ else
+ {
+ lXDiff -= rVert.GetPos();
+ lYDiff += rHori.GetPos();
+ }
}
else
{
@@ -674,7 +686,7 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
RES_VERT_ORIENT, RES_HORI_ORIENT );
SwFmtHoriOrient aHori( pFmt->GetHoriOrient() );
SwFmtVertOrient aVert( pFmt->GetVertOrient() );
- BOOL bPut = FALSE;
+ sal_Bool bPut = sal_False;
if( !GetFlyFrm()->IsFlyLayFrm() &&
::GetHtmlMode(pFmt->GetDoc()->GetDocShell()) )
@@ -683,7 +695,7 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
//Einzig einen Snap auf Links/Rechts bzw. Linker-/Rechter-Rand koennen
//wir versuchen.
const SwFrm* pAnch = GetFlyFrm()->GetAnchorFrm();
- BOOL bNextLine = FALSE;
+ sal_Bool bNextLine = sal_False;
if( !GetFlyFrm()->IsAutoPos() || text::RelOrientation::PAGE_FRAME != aHori.GetRelationOrient() )
{
@@ -694,9 +706,9 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
}
else
{
- bNextLine = TRUE;
+ bNextLine = sal_True;
//Horizontale Ausrichtung:
- const BOOL bLeftFrm =
+ const sal_Bool bLeftFrm =
aFlyRect.Left() < pAnch->Frm().Left() + pAnch->Prt().Left(),
bLeftPrt = aFlyRect.Left() + aFlyRect.Width() <
pAnch->Frm().Left() + pAnch->Prt().Width()/2;
@@ -707,7 +719,7 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
}
else
{
- const BOOL bRightFrm = aFlyRect.Left() >
+ const sal_Bool bRightFrm = aFlyRect.Left() >
pAnch->Frm().Left() + pAnch->Prt().Width();
aHori.SetHoriOrient( text::HoriOrientation::RIGHT );
aHori.SetRelationOrient( bRightFrm ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA );
@@ -717,7 +729,7 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
}
//Vertikale Ausrichtung bleibt grundsaetzlich schlicht erhalten,
//nur bei nicht automatischer Ausrichtung wird umgeschaltet.
- BOOL bRelChar = text::RelOrientation::CHAR == eRelVert;
+ sal_Bool bRelChar = text::RelOrientation::CHAR == eRelVert;
aVert.SetVertOrient( eVert != text::VertOrientation::NONE ? eVert :
GetFlyFrm()->IsFlyInCntFrm() ? text::VertOrientation::CHAR_CENTER :
bRelChar && bNextLine ? text::VertOrientation::CHAR_TOP : text::VertOrientation::TOP );
@@ -726,7 +738,7 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
else
aVert.SetRelationOrient( text::RelOrientation::PRINT_AREA );
aSet.Put( aVert );
- bPut = TRUE;
+ bPut = sal_True;
}
//Automatische Ausrichtungen wollen wir moeglichst nicht verlieren.
@@ -737,14 +749,14 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
aHori.SetHoriOrient( eHori );
aHori.SetRelationOrient( eRelHori );
aSet.Put( aHori );
- bPut = TRUE;
+ bPut = sal_True;
}
if ( text::VertOrientation::NONE != eVert )
{
aVert.SetVertOrient( eVert );
aVert.SetRelationOrient( eRelVert );
aSet.Put( aVert );
- bPut = TRUE;
+ bPut = sal_True;
}
}
if ( bPut )
@@ -764,7 +776,9 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef,
const sal_Bool bRTL = pTmpFrm->IsRightToLeft();
- const Point aNewPos( bVertX || bRTL ?
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ const bool bVertL2RX = pTmpFrm->IsVertLR();
+ const Point aNewPos( ( bVertX && !bVertL2RX ) || bRTL ?
aOutRect.Right() + 1 :
aOutRect.Left(),
aOutRect.Top() );
@@ -782,7 +796,7 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef,
const SwFmtCol& rCol = rAttrs.GetAttrSet().GetCol();
if ( rCol.GetColumns().Count() > 1 )
{
- for ( USHORT i = 0; i < rCol.GetColumns().Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rCol.GetColumns().Count(); ++i )
{
nMin += rCol.GetColumns()[i]->GetLeft() +
rCol.GetColumns()[i]->GetRight() +
@@ -820,19 +834,18 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef,
}
if ( aFrmSz.GetWidthPercent() && aFrmSz.GetWidthPercent() != 0xFF &&
aOldFrmSz.GetWidth() != aFrmSz.GetWidth() )
- aFrmSz.SetWidthPercent( BYTE(aSz.Width() * 100L / nRelWidth + 0.5) );
+ aFrmSz.SetWidthPercent( sal_uInt8(aSz.Width() * 100L / nRelWidth + 0.5) );
if ( aFrmSz.GetHeightPercent() && aFrmSz.GetHeightPercent() != 0xFF &&
aOldFrmSz.GetHeight() != aFrmSz.GetHeight() )
- aFrmSz.SetHeightPercent( BYTE(aSz.Height() * 100L / nRelHeight + 0.5) );
+ aFrmSz.SetHeightPercent( sal_uInt8(aSz.Height() * 100L / nRelHeight + 0.5) );
pFmt->GetDoc()->SetAttr( aFrmSz, *pFmt );
}
}
//Position kann auch veraendert sein!
- const Point aOldPos( bVertX || bRTL ?
+ const Point aOldPos( ( bVertX && !bVertL2RX ) || bRTL ?
GetFlyFrm()->Frm().TopRight() :
GetFlyFrm()->Frm().Pos() );
-
if ( aNewPos != aOldPos )
{
//Kann sich durch das ChgSize veraendert haben!
@@ -840,16 +853,21 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef,
{
if( aOutRect.TopRight() != aNewPos )
{
- SwTwips nDeltaX = aNewPos.X() - aOutRect.Right();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ SwTwips nDeltaX;
+ if ( bVertL2RX )
+ nDeltaX = aNewPos.X() - aOutRect.Left();
+ else
+ nDeltaX = aNewPos.X() - aOutRect.Right();
SwTwips nDeltaY = aNewPos.Y() - aOutRect.Top();
MoveRect( aOutRect, Size( nDeltaX, nDeltaY ) );
}
}
else if ( aOutRect.TopLeft() != aNewPos )
aOutRect.SetPos( aNewPos );
- bInResize = TRUE;
+ bInResize = sal_True;
NbcMove( Size( 0, 0 ) );
- bInResize = FALSE;
+ bInResize = sal_False;
}
}
@@ -858,7 +876,7 @@ void SwVirtFlyDrawObj::Move(const Size& rSiz)
{
NbcMove( rSiz );
SetChanged();
- GetFmt()->GetDoc()->SetNoDrawUndoObj( TRUE );
+ GetFmt()->GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(false);
}
@@ -867,7 +885,7 @@ void SwVirtFlyDrawObj::Resize(const Point& rRef,
{
NbcResize( rRef, xFact, yFact );
SetChanged();
- GetFmt()->GetDoc()->SetNoDrawUndoObj( TRUE );
+ GetFmt()->GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(false);
}
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index 59a6cd850d04..b39bd6521a76 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -59,7 +59,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing;
using namespace ::com::sun::star::frame;
-SwDPage::SwDPage(SwDrawDocument& rNewModel, BOOL bMasterPage) :
+SwDPage::SwDPage(SwDrawDocument& rNewModel, sal_Bool bMasterPage) :
FmFormPage(rNewModel, 0, bMasterPage),
pGridLst( 0 ),
rDoc(rNewModel.GetDoc())
@@ -78,7 +78,7 @@ SwDPage::~SwDPage()
|*
*************************************************************************/
-SdrObject* SwDPage::ReplaceObject( SdrObject* pNewObj, ULONG nObjNum )
+SdrObject* SwDPage::ReplaceObject( SdrObject* pNewObj, sal_uLong nObjNum )
{
SdrObject *pOld = GetObj( nObjNum );
OSL_ENSURE( pOld, "Oups, Object not replaced" );
@@ -146,10 +146,10 @@ const SdrPageGridFrameList* SwDPage::GetGridFrameList(
return pGridLst;
}
-BOOL SwDPage::RequestHelp( Window* pWindow, SdrView* pView,
+sal_Bool SwDPage::RequestHelp( Window* pWindow, SdrView* pView,
const HelpEvent& rEvt )
{
- BOOL bWeiter = TRUE;
+ sal_Bool bWeiter = sal_True;
if( rEvt.GetMode() & ( HELPMODE_QUICK | HELPMODE_BALLOON ))
{
@@ -200,7 +200,7 @@ BOOL SwDPage::RequestHelp( Window* pWindow, SdrView* pView,
if ( sTxt.Len() )
{
// --> OD 2007-07-26 #i80029#
- BOOL bExecHyperlinks = rDoc.GetDocShell()->IsReadOnly();
+ sal_Bool bExecHyperlinks = rDoc.GetDocShell()->IsReadOnly();
if ( !bExecHyperlinks )
{
SvtSecurityOptions aSecOpts;
@@ -225,7 +225,7 @@ BOOL SwDPage::RequestHelp( Window* pWindow, SdrView* pView,
Rectangle aRect( rEvt.GetMousePosPixel(), Size(1,1) );
Help::ShowQuickHelp( pWindow, aRect, sTxt );
}
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
}
diff --git a/sw/source/core/draw/drawdoc.cxx b/sw/source/core/draw/drawdoc.cxx
index 714c4e860240..5e2a2c138e83 100644
--- a/sw/source/core/draw/drawdoc.cxx
+++ b/sw/source/core/draw/drawdoc.cxx
@@ -65,11 +65,11 @@ const String GetPalettePath()
SwDrawDocument::SwDrawDocument( SwDoc* pD ) :
FmFormModel( ::GetPalettePath(), &pD->GetAttrPool(),
- pD->GetDocShell(), TRUE ),
+ pD->GetDocShell(), sal_True ),
pDoc( pD )
{
SetScaleUnit( MAP_TWIP );
- SetSwapGraphics( TRUE );
+ SetSwapGraphics( sal_True );
SwDocShell* pDocSh = pDoc->GetDocShell();
if ( pDocSh )
@@ -99,7 +99,7 @@ SwDrawDocument::SwDrawDocument( SwDoc* pD ) :
SfxItemPool* pSdrPool = pD->GetAttrPool().GetSecondaryPool();
if( pSdrPool )
{
- const USHORT aWhichRanges[] =
+ const sal_uInt16 aWhichRanges[] =
{
RES_CHRATR_BEGIN, RES_CHRATR_END,
RES_PARATR_BEGIN, RES_PARATR_END,
@@ -107,11 +107,11 @@ SwDrawDocument::SwDrawDocument( SwDoc* pD ) :
};
SfxItemPool& rDocPool = pD->GetAttrPool();
- USHORT nEdtWhich, nSlotId;
+ sal_uInt16 nEdtWhich, nSlotId;
const SfxPoolItem* pItem;
- for( const USHORT* pRangeArr = aWhichRanges;
+ for( const sal_uInt16* pRangeArr = aWhichRanges;
*pRangeArr; pRangeArr += 2 )
- for( USHORT nW = *pRangeArr, nEnd = *(pRangeArr+1);
+ for( sal_uInt16 nW = *pRangeArr, nEnd = *(pRangeArr+1);
nW < nEnd; ++nW )
if( 0 != (pItem = rDocPool.GetPoolDefaultItem( nW )) &&
0 != (nSlotId = rDocPool.GetSlotId( nW ) ) &&
@@ -128,7 +128,7 @@ SwDrawDocument::SwDrawDocument( SwDoc* pD ) :
SetForbiddenCharsTable( pD->getForbiddenCharacterTable() );
// Implementation for asian compression
- SetCharCompressType( static_cast<UINT16>(pD->getCharacterCompressionType() ));
+ SetCharCompressType( static_cast<sal_uInt16>(pD->getCharacterCompressionType() ));
}
/*************************************************************************
@@ -191,7 +191,7 @@ SvStream* SwDrawDocument::GetDocumentStream( SdrDocumentStreamInfo& rInfo ) cons
pRet = utl::UcbStreamHelper::CreateStream( xStream );
if( pRet )
{
- rInfo.mbDeleteAfterUse = TRUE;
+ rInfo.mbDeleteAfterUse = sal_True;
rInfo.mxStorageRef = xPictureStorage;
}
}
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index 4e186427f8dd..658bbbf802c2 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -33,6 +33,7 @@
#include <editeng/protitem.hxx>
#include <svx/svdpagv.hxx>
#include <svx/fmmodel.hxx>
+#include <sot/exchange.hxx>
#include "swtypes.hxx"
#include "pagefrm.hxx"
@@ -52,6 +53,7 @@
#include <ndole.hxx>
#include <fmtanchr.hxx>
#include "shellres.hxx"
+#include <IDocumentUndoRedo.hxx>
// #i7672#
#include <editeng/outliner.hxx>
@@ -73,17 +75,17 @@ class SwSdrHdl : public SdrHdl
public:
SwSdrHdl(const Point& rPnt, bool bTopRight ) :
SdrHdl( rPnt, bTopRight ? HDL_ANCHOR_TR : HDL_ANCHOR ) {}
- virtual BOOL IsFocusHdl() const;
+ virtual sal_Bool IsFocusHdl() const;
};
-BOOL SwSdrHdl::IsFocusHdl() const
+sal_Bool SwSdrHdl::IsFocusHdl() const
{
if( HDL_ANCHOR == eKind || HDL_ANCHOR_TR == eKind )
- return TRUE;
+ return sal_True;
return SdrHdl::IsFocusHdl();
}
-const SwFrm *lcl_FindAnchor( const SdrObject *pObj, BOOL bAll )
+const SwFrm *lcl_FindAnchor( const SdrObject *pObj, sal_Bool bAll )
{
const SwVirtFlyDrawObj *pVirt = pObj->ISA(SwVirtFlyDrawObj) ?
(SwVirtFlyDrawObj*)pObj : 0;
@@ -113,18 +115,18 @@ SwDrawView::SwDrawView( SwViewImp &rI, SdrModel *pMd, OutputDevice *pOutDev) :
FmFormView( (FmFormModel*)pMd, pOutDev ),
rImp( rI )
{
- SetPageVisible( FALSE );
- SetBordVisible( FALSE );
- SetGridVisible( FALSE );
- SetHlplVisible( FALSE );
- SetGlueVisible( FALSE );
- SetFrameDragSingles( TRUE );
- SetVirtualObjectBundling( TRUE );
- SetSwapAsynchron( TRUE );
-
- EnableExtendedKeyInputDispatcher( FALSE );
- EnableExtendedMouseEventDispatcher( FALSE );
- EnableExtendedCommandEventDispatcher( FALSE );
+ SetPageVisible( sal_False );
+ SetBordVisible( sal_False );
+ SetGridVisible( sal_False );
+ SetHlplVisible( sal_False );
+ SetGlueVisible( sal_False );
+ SetFrameDragSingles( sal_True );
+ SetVirtualObjectBundling( sal_True );
+ SetSwapAsynchron( sal_True );
+
+ EnableExtendedKeyInputDispatcher( sal_False );
+ EnableExtendedMouseEventDispatcher( sal_False );
+ EnableExtendedCommandEventDispatcher( sal_False );
SetHitTolerancePixel( GetMarkHdlSizePixel()/2 );
@@ -146,7 +148,7 @@ sal_Bool SwDrawView::IsAntiAliasing() const
//////////////////////////////////////////////////////////////////////////////
-SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, USHORT nTol, const SdrMarkList &rMrkList)
+SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, sal_uInt16 nTol, const SdrMarkList &rMrkList)
{
if(!nTol)
{
@@ -205,7 +207,7 @@ SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, USHORT n
return pRetval;
}
-SdrObject* SwDrawView::CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const
+SdrObject* SwDrawView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uLong nOptions, const SetOfByte* pMVisLay) const
{
// call parent
SdrObject* pRetval = FmFormView::CheckSingleSdrObjectHit(rPnt, nTol, pObj, pPV, nOptions, pMVisLay);
@@ -266,7 +268,8 @@ void SwDrawView::AddCustomHdl()
}
// add anchor handle:
- aHdl.AddHdl( new SwSdrHdl( aPos, pAnch->IsVertical() ||
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ aHdl.AddHdl( new SwSdrHdl( aPos, ( pAnch->IsVertical() && !pAnch->IsVertLR() ) ||
pAnch->IsRightToLeft() ) );
}
@@ -281,7 +284,7 @@ SdrObject* SwDrawView::GetMaxToTopObj( SdrObject* pObj ) const
{
if ( GetUserCall(pObj) )
{
- const SwFrm *pAnch = ::lcl_FindAnchor( pObj, FALSE );
+ const SwFrm *pAnch = ::lcl_FindAnchor( pObj, sal_False );
if ( pAnch )
{
//Das oberste Obj innerhalb des Ankers darf nicht ueberholt
@@ -292,15 +295,15 @@ SdrObject* SwDrawView::GetMaxToTopObj( SdrObject* pObj ) const
const SwPageFrm *pPage = pFly->FindPageFrm();
if ( pPage->GetSortedObjs() )
{
- UINT32 nOrdNum = 0;
- for ( USHORT i = 0; i < pPage->GetSortedObjs()->Count(); ++i )
+ sal_uInt32 nOrdNum = 0;
+ for ( sal_uInt16 i = 0; i < pPage->GetSortedObjs()->Count(); ++i )
{
const SdrObject *pO =
(*pPage->GetSortedObjs())[i]->GetDrawObj();
if ( pO->GetOrdNumDirect() > nOrdNum )
{
- const SwFrm *pTmpAnch = ::lcl_FindAnchor( pO, FALSE );
+ const SwFrm *pTmpAnch = ::lcl_FindAnchor( pO, sal_False );
if ( pFly->IsAnLower( pTmpAnch ) )
{
nOrdNum = pO->GetOrdNumDirect();
@@ -334,7 +337,7 @@ SdrObject* SwDrawView::GetMaxToBtmObj(SdrObject* pObj) const
{
if ( GetUserCall(pObj) )
{
- const SwFrm *pAnch = ::lcl_FindAnchor( pObj, FALSE );
+ const SwFrm *pAnch = ::lcl_FindAnchor( pObj, sal_False );
if ( pAnch )
{
//Der Fly des Ankers darf nicht "unterflogen" werden.
@@ -355,22 +358,22 @@ SdrObject* SwDrawView::GetMaxToBtmObj(SdrObject* pObj) const
|*
*************************************************************************/
-inline BOOL lcl_IsChild( SdrObject *pParent, SdrObject *pChild )
+inline sal_Bool lcl_IsChild( SdrObject *pParent, SdrObject *pChild )
{
if ( pParent->ISA(SwVirtFlyDrawObj) )
{
- const SwFrm *pAnch = lcl_FindAnchor( pChild, FALSE );
+ const SwFrm *pAnch = lcl_FindAnchor( pChild, sal_False );
if ( pAnch && ((SwVirtFlyDrawObj*)pParent)->GetFlyFrm()->IsAnLower( pAnch ))
{
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
inline SdrObject *lcl_FindParent( SdrObject *pObj )
{
- const SwFrm *pAnch = lcl_FindAnchor( pObj, FALSE );
+ const SwFrm *pAnch = lcl_FindAnchor( pObj, sal_False );
if ( pAnch && pAnch->IsInFly() )
return (SdrObject*)pAnch->FindFlyFrm()->GetVirtDrawObj();
return 0;
@@ -401,7 +404,7 @@ sal_uInt32 SwDrawView::_GetMaxChildOrdNum( const SwFlyFrm& _rParentObj,
}
if ( pObj->GetOrdNum() > nMaxChildOrdNum &&
- _rParentObj.IsAnLower( lcl_FindAnchor( pObj, TRUE ) ) )
+ _rParentObj.IsAnLower( lcl_FindAnchor( pObj, sal_True ) ) )
{
nMaxChildOrdNum = pObj->GetOrdNum();
break;
@@ -500,8 +503,8 @@ void SwDrawView::_MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
}
// --> adjustment and re-factoring of method
-void SwDrawView::ObjOrderChanged( SdrObject* pObj, ULONG nOldPos,
- ULONG nNewPos )
+void SwDrawView::ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
+ sal_uLong nNewPos )
{
// nothing to do for group members
if ( pObj->GetUpGroup() )
@@ -624,7 +627,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, ULONG nOldPos,
// If object is anchored inside a invisible part of the document
// (e.g. page header, whose page style isn't applied, or hidden
// section), no anchor frame exists.
- const SwFrm* pTmpAnchorFrm = lcl_FindAnchor( pTmpObj, TRUE );
+ const SwFrm* pTmpAnchorFrm = lcl_FindAnchor( pTmpObj, sal_True );
const SwFlyFrm* pTmpParentObj = pTmpAnchorFrm
? pTmpAnchorFrm->FindFlyFrm() : 0L;
// <--
@@ -678,7 +681,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, ULONG nOldPos,
// If object is anchored inside a invisible part of the document
// (e.g. page header, whose page style isn't applied, or hidden
// section), no anchor frame exists.
- const SwFrm* pTmpAnchorFrm = lcl_FindAnchor( pTmpObj, TRUE );
+ const SwFrm* pTmpAnchorFrm = lcl_FindAnchor( pTmpObj, sal_True );
const SwFlyFrm* pTmpParentObj = pTmpAnchorFrm
? pTmpAnchorFrm->FindFlyFrm() : 0L;
// <--
@@ -735,11 +738,11 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, ULONG nOldPos,
*************************************************************************/
-BOOL SwDrawView::TakeDragLimit( SdrDragMode eMode,
+sal_Bool SwDrawView::TakeDragLimit( SdrDragMode eMode,
Rectangle& rRect ) const
{
const SdrMarkList &rMrkList = GetMarkedObjectList();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( 1 == rMrkList.GetMarkCount() )
{
const SdrObject *pObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj();
@@ -747,7 +750,7 @@ BOOL SwDrawView::TakeDragLimit( SdrDragMode eMode,
if( ::CalcClipRect( pObj, aRect, eMode == SDRDRAG_MOVE ) )
{
rRect = aRect.SVRect();
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -772,7 +775,7 @@ const SwFrm* SwDrawView::CalcAnchor()
//der aktuelle Anker. Nur suchen wenn wir gerade draggen.
const SwFrm* pAnch;
Rectangle aMyRect;
- const BOOL bFly = pObj->ISA(SwVirtFlyDrawObj);
+ const sal_Bool bFly = pObj->ISA(SwVirtFlyDrawObj);
if ( bFly )
{
pAnch = ((SwVirtFlyDrawObj*)pObj)->GetFlyFrm()->GetAnchorFrm();
@@ -794,9 +797,10 @@ const SwFrm* SwDrawView::CalcAnchor()
aMyRect = pObj->GetSnapRect();
}
- const sal_Bool bTopRight = pAnch && ( pAnch->IsVertical() ||
- pAnch->IsRightToLeft() );
-
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ const sal_Bool bTopRight = pAnch && ( ( pAnch->IsVertical() &&
+ !pAnch->IsVertLR() ) ||
+ pAnch->IsRightToLeft() );
const Point aMyPt = bTopRight ? aMyRect.TopRight() : aMyRect.TopLeft();
Point aPt;
@@ -923,9 +927,9 @@ void SwDrawView::CheckPossibilities()
//OLE-Objekte konnen selbst einen Resize-Schutz wuenschen (StarMath)
const SdrMarkList &rMrkList = GetMarkedObjectList();
- BOOL bProtect = FALSE,
- bSzProtect = FALSE;
- for ( USHORT i = 0; !bProtect && i < rMrkList.GetMarkCount(); ++i )
+ sal_Bool bProtect = sal_False,
+ bSzProtect = sal_False;
+ for ( sal_uInt16 i = 0; !bProtect && i < rMrkList.GetMarkCount(); ++i )
{
const SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
const SwFrm *pFrm = NULL;
@@ -947,9 +951,17 @@ void SwDrawView::CheckPossibilities()
// than one Writer fly frame can be selected.
// TODO/LATER: retrieve Aspect - from where?!
- bSzProtect |= ( embed::EmbedMisc::EMBED_NEVERRESIZE & xObj->getStatus( embed::Aspects::MSOLE_CONTENT ) ) ? TRUE : FALSE;
+ bSzProtect |= ( embed::EmbedMisc::EMBED_NEVERRESIZE & xObj->getStatus( embed::Aspects::MSOLE_CONTENT ) ) ? sal_True : sal_False;
// <--
+
+ // #i972: protect position if it is a Math object anchored 'as char' and baseline alignment is activated
+ SwDoc* pDoc = Imp().GetShell()->GetDoc();
+ const bool bProtectMathPos = SotExchange::IsMath( xObj->getClassID() )
+ && FLY_AS_CHAR == pFly->GetFmt()->GetAnchor().GetAnchorId()
+ && pDoc->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT );
+ if (bProtectMathPos)
+ bMoveProtect = true;
}
}
}
@@ -968,12 +980,12 @@ void SwDrawView::CheckPossibilities()
if ( !pFrmFmt )
{
OSL_FAIL( "<SwDrawView::CheckPossibilities()> - missing frame format" );
- bProtect = TRUE;
+ bProtect = sal_True;
}
else if ((FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId()) &&
rMrkList.GetMarkCount() > 1 )
{
- bProtect = TRUE;
+ bProtect = sal_True;
}
}
}
@@ -1032,7 +1044,7 @@ void SwDrawView::DeleteMarked()
SwDoc* pDoc = Imp().GetShell()->GetDoc();
if ( pDoc->GetRootFrm() )
pDoc->GetRootFrm()->StartAllAction();
- pDoc->StartUndo(UNDO_EMPTY, NULL);
+ pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
// replace marked <SwDrawVirtObj>-objects by its reference objects.
{
SdrPageView* pDrawPageView = rImp.GetPageView();
@@ -1050,7 +1062,7 @@ void SwDrawView::DeleteMarked()
FmFormView::DeleteMarked();
::FrameNotify( Imp().GetShell(), FLY_DRAG_END );
}
- pDoc->EndUndo(UNDO_EMPTY, NULL);
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
if( pDoc->GetRootFrm() )
pDoc->GetRootFrm()->EndAllAction();
}
diff --git a/sw/source/core/draw/makefile.mk b/sw/source/core/draw/makefile.mk
deleted file mode 100644
index 71d0cbdd25fb..000000000000
--- a/sw/source/core/draw/makefile.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=draw
-
-AUTOSEG=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-EXCEPTIONSFILES= \
- $(SLO)$/dcontact.obj \
- $(SLO)$/dflyobj.obj \
- $(SLO)$/dobjfac.obj \
- $(SLO)$/dpage.obj \
- $(SLO)$/drawdoc.obj \
- $(SLO)$/dview.obj \
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index a20611fcd67f..c047543e4bf9 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -95,17 +95,19 @@ void _PaMIntoCrsrShellRing::RemoveFromRing( SwPaM& rPam, Ring* pPrev )
SwAutoCorrDoc::SwAutoCorrDoc( SwEditShell& rEditShell, SwPaM& rPam,
sal_Unicode cIns )
- : rEditSh( rEditShell ), rCrsr( rPam ), pIdx( 0 ),
- nUndoId( UNDO_EMPTY ),
- bUndoIdInitialized( cIns ? false : true )
+ : rEditSh( rEditShell ), rCrsr( rPam ), pIdx( 0 )
+ , m_nEndUndoCounter(0)
+ , bUndoIdInitialized( cIns ? false : true )
{
}
SwAutoCorrDoc::~SwAutoCorrDoc()
{
- if( UNDO_EMPTY != nUndoId )
- rEditSh.EndUndo( nUndoId );
+ for (int i = 0; i < m_nEndUndoCounter; ++i)
+ {
+ rEditSh.EndUndo();
+ }
delete pIdx;
}
@@ -125,7 +127,7 @@ void SwAutoCorrDoc::DeleteSel( SwPaM& rDelPam )
}
}
-BOOL SwAutoCorrDoc::Delete( xub_StrLen nStt, xub_StrLen nEnd )
+sal_Bool SwAutoCorrDoc::Delete( xub_StrLen nStt, xub_StrLen nEnd )
{
const SwNodeIndex& rNd = rCrsr.GetPoint()->nNode;
SwPaM aSel( rNd, nStt, rNd, nEnd );
@@ -133,11 +135,11 @@ BOOL SwAutoCorrDoc::Delete( xub_StrLen nStt, xub_StrLen nEnd )
if( bUndoIdInitialized )
bUndoIdInitialized = true;
- return TRUE;
+ return sal_True;
}
-BOOL SwAutoCorrDoc::Insert( xub_StrLen nPos, const String& rTxt )
+sal_Bool SwAutoCorrDoc::Insert( xub_StrLen nPos, const String& rTxt )
{
SwPaM aPam( rCrsr.GetPoint()->nNode.GetNode(), nPos );
rEditSh.GetDoc()->InsertString( aPam, rTxt );
@@ -145,13 +147,16 @@ BOOL SwAutoCorrDoc::Insert( xub_StrLen nPos, const String& rTxt )
{
bUndoIdInitialized = true;
if( 1 == rTxt.Len() )
- rEditSh.StartUndo( nUndoId = UNDO_AUTOCORRECT );
+ {
+ rEditSh.StartUndo( UNDO_AUTOCORRECT );
+ ++m_nEndUndoCounter;
+ }
}
- return TRUE;
+ return sal_True;
}
-BOOL SwAutoCorrDoc::Replace( xub_StrLen nPos, const String& rTxt )
+sal_Bool SwAutoCorrDoc::Replace( xub_StrLen nPos, const String& rTxt )
{
SwPaM* pPam = &rCrsr;
if( pPam->GetPoint()->nContent.GetIndex() != nPos )
@@ -163,7 +168,7 @@ BOOL SwAutoCorrDoc::Replace( xub_StrLen nPos, const String& rTxt )
SwTxtNode * const pNd = pPam->GetNode()->GetTxtNode();
if ( !pNd )
{
- return FALSE;
+ return sal_False;
}
// text attributes with dummy characters must not be replaced!
@@ -210,26 +215,29 @@ BOOL SwAutoCorrDoc::Replace( xub_StrLen nPos, const String& rTxt )
{
bUndoIdInitialized = true;
if( 1 == rTxt.Len() )
- rEditSh.StartUndo( nUndoId = UNDO_AUTOCORRECT );
+ {
+ rEditSh.StartUndo( UNDO_AUTOCORRECT );
+ ++m_nEndUndoCounter;
+ }
}
}
if( pPam != &rCrsr )
delete pPam;
- return TRUE;
+ return sal_True;
}
-BOOL SwAutoCorrDoc::SetAttr( xub_StrLen nStt, xub_StrLen nEnd, USHORT nSlotId,
+sal_Bool SwAutoCorrDoc::SetAttr( xub_StrLen nStt, xub_StrLen nEnd, sal_uInt16 nSlotId,
SfxPoolItem& rItem )
{
const SwNodeIndex& rNd = rCrsr.GetPoint()->nNode;
SwPaM aPam( rNd, nStt, rNd, nEnd );
SfxItemPool& rPool = rEditSh.GetDoc()->GetAttrPool();
- USHORT nWhich = rPool.GetWhich( nSlotId, FALSE );
+ sal_uInt16 nWhich = rPool.GetWhich( nSlotId, sal_False );
if( nWhich )
{
rItem.SetWhich( nWhich );
@@ -247,7 +255,7 @@ BOOL SwAutoCorrDoc::SetAttr( xub_StrLen nStt, xub_StrLen nEnd, USHORT nSlotId,
-BOOL SwAutoCorrDoc::SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String& rURL )
+sal_Bool SwAutoCorrDoc::SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String& rURL )
{
const SwNodeIndex& rNd = rCrsr.GetPoint()->nNode;
SwPaM aPam( rNd, nStt, rNd, nEnd );
@@ -258,17 +266,17 @@ BOOL SwAutoCorrDoc::SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String&
rEditSh.GetDoc()->SetFmtItemByAutoFmt( aPam, aSet );
if( bUndoIdInitialized )
bUndoIdInitialized = true;
- return TRUE;
+ return sal_True;
}
// returne den Text eines vorherigen Absatzes.
// Dieser darf nicht leer sein!
// Gibt es diesen nicht oder gibt es davor nur Leere, dann returne 0
// Das Flag gibt an:
- // TRUE: den, vor der normalen Einfuegeposition (TRUE)
- // FALSE: den, in den das korrigierte Wort eingfuegt wurde.
+ // sal_True: den, vor der normalen Einfuegeposition (sal_True)
+ // sal_False: den, in den das korrigierte Wort eingfuegt wurde.
// (Muss nicht der gleiche Absatz sein!!!!)
-const String* SwAutoCorrDoc::GetPrevPara( BOOL bAtNormalPos )
+const String* SwAutoCorrDoc::GetPrevPara( sal_Bool bAtNormalPos )
{
const String* pStr = 0;
@@ -292,7 +300,7 @@ const String* SwAutoCorrDoc::GetPrevPara( BOOL bAtNormalPos )
}
-BOOL SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPos,
+sal_Bool SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPos,
SvxAutoCorrect& rACorrect,
const String** ppPara )
{
@@ -304,16 +312,16 @@ BOOL SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPos,
SwTxtNode* pTxtNd = rCrsr.GetNode()->GetTxtNode();
OSL_ENSURE( pTxtNd, "wo ist denn der TextNode?" );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( nEndPos == rSttPos )
return bRet;
- LanguageType eLang = GetLanguage(nEndPos, FALSE);
+ LanguageType eLang = GetLanguage(nEndPos, sal_False);
if(LANGUAGE_SYSTEM == eLang)
eLang = (LanguageType)GetAppLanguage();
//JP 22.04.99: Bug 63883 - Sonderbehandlung fuer Punkte.
- BOOL bLastCharIsPoint = nEndPos < pTxtNd->GetTxt().Len() &&
+ sal_Bool bLastCharIsPoint = nEndPos < pTxtNd->GetTxt().Len() &&
'.' == pTxtNd->GetTxt().GetChar( nEndPos );
const SvxAutocorrWord* pFnd = rACorrect.SearchWordsInList(
@@ -332,13 +340,13 @@ BOOL SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPos,
{
// replace the selection
pDoc->ReplaceRange( aPam, pFnd->GetLong(), false);
- bRet = TRUE;
+ bRet = sal_True;
}
}
else
{
- SwTextBlocks aTBlks( rACorrect.GetAutoCorrFileName( eLang, FALSE, TRUE ));
- USHORT nPos = aTBlks.GetIndex( pFnd->GetShort() );
+ SwTextBlocks aTBlks( rACorrect.GetAutoCorrFileName( eLang, sal_False, sal_True ));
+ sal_uInt16 nPos = aTBlks.GetIndex( pFnd->GetShort() );
if( USHRT_MAX != nPos && aTBlks.BeginGetDoc( nPos ) )
{
DeleteSel( aPam );
@@ -381,7 +389,7 @@ BOOL SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPos,
(*pIdx)++;
pTxtNd = pIdx->GetNode().GetTxtNode();
}
- bRet = TRUE;
+ bRet = sal_True;
}
aTBlks.EndGetDoc();
}
@@ -399,17 +407,17 @@ BOOL SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPos,
// - FnCptlSttSntnc
// gerufen. Dann koennen die Worte ggfs. in die Ausnahmelisten
// aufgenommen werden.
-void SwAutoCorrDoc::SaveCpltSttWord( ULONG nFlag, xub_StrLen nPos,
+void SwAutoCorrDoc::SaveCpltSttWord( sal_uLong nFlag, xub_StrLen nPos,
const String& rExceptWord,
sal_Unicode cChar )
{
- ULONG nNode = pIdx ? pIdx->GetIndex() : rCrsr.GetPoint()->nNode.GetIndex();
- LanguageType eLang = GetLanguage(nPos, FALSE);
+ sal_uLong nNode = pIdx ? pIdx->GetIndex() : rCrsr.GetPoint()->nNode.GetIndex();
+ LanguageType eLang = GetLanguage(nPos, sal_False);
rEditSh.GetDoc()->SetAutoCorrExceptWord( new SwAutoCorrExceptWord( nFlag,
nNode, nPos, rExceptWord, cChar, eLang ));
}
-LanguageType SwAutoCorrDoc::GetLanguage( xub_StrLen nPos, BOOL bPrevPara ) const
+LanguageType SwAutoCorrDoc::GetLanguage( xub_StrLen nPos, sal_Bool bPrevPara ) const
{
LanguageType eRet = LANGUAGE_SYSTEM;
@@ -443,12 +451,12 @@ void SwAutoCorrExceptWord::CheckChar( const SwPosition& rPos, sal_Unicode cChr )
}
-BOOL SwAutoCorrExceptWord::CheckDelChar( const SwPosition& rPos )
+sal_Bool SwAutoCorrExceptWord::CheckDelChar( const SwPosition& rPos )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !bDeleted && rPos.nNode.GetIndex() == nNode &&
rPos.nContent.GetIndex() == nCntnt )
- bDeleted = bRet = TRUE;
+ bDeleted = bRet = sal_True;
return bRet;
}
@@ -482,8 +490,8 @@ void SwDontExpandItem::RestoreDontExpandItems( const SwPosition& rPos )
if( pTxtNd->GetpSwpHints() && pTxtNd->GetpSwpHints()->Count() )
{
- const USHORT nSize = pTxtNd->GetpSwpHints()->Count();
- USHORT n;
+ const sal_uInt16 nSize = pTxtNd->GetpSwpHints()->Count();
+ sal_uInt16 n;
xub_StrLen nAttrStart;
const xub_StrLen* pAttrEnd;
@@ -503,13 +511,13 @@ void SwDontExpandItem::RestoreDontExpandItems( const SwPosition& rPos )
{
const SfxPoolItem* pItem;
if( !pDontExpItems || SFX_ITEM_SET != pDontExpItems->
- GetItemState( pHt->Which(), FALSE, &pItem ) ||
+ GetItemState( pHt->Which(), sal_False, &pItem ) ||
*pItem != pHt->GetAttr() )
{
// das Attribut war vorher nicht in dieser Form im Absatz
// gesetzt, also kann es nur durchs einfuegen/kopieren erzeugt
// worden sein. Damit ist es ein Kandiadat fuers DontExpand
- pHt->SetDontExpand( TRUE );
+ pHt->SetDontExpand( sal_True );
}
}
}
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index b404358e7726..9e2d8099d6d4 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -35,7 +35,11 @@
#include <hintids.hxx>
#include <svl/svstdarr.hxx>
+
#include <unotools/charclass.hxx>
+
+#include <vcl/msgbox.hxx>
+
#include <editeng/boxitem.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/brkitem.hxx>
@@ -45,12 +49,13 @@
#include <editeng/langitem.hxx>
#include <editeng/cscoitem.hxx>
#include <editeng/unolingu.hxx>
-
#include <editeng/acorrcfg.hxx>
+
#include <swwait.hxx>
#include <fmtpdsc.hxx>
#include <fmtanchr.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docary.hxx>
#include <editsh.hxx>
#include <index.hxx>
@@ -73,7 +78,6 @@
#include <mdiexp.hxx>
#include <statstr.hrc>
#include <comcore.hrc>
-#include <vcl/msgbox.hxx>
#include <numrule.hxx>
using namespace ::com::sun::star;
@@ -96,7 +100,7 @@ SvxSwAutoFmtFlags* SwEditShell::pAutoFmtFlags = 0;
// Number of num-/bullet-paragraph templates. MAXLEVEL will soon be raised
// to x, but not the number of templates. (Artifact from <= 4.0)
-const USHORT cnNumBullColls = 4;
+const sal_uInt16 cnNumBullColls = 4;
class SwAutoFormat
{
@@ -110,12 +114,12 @@ class SwAutoFormat
SwTxtNode* pAktTxtNd; // the current TextNode
SwTxtFrm* pAktTxtFrm; // frame of the current TextNode
CharClass* pCharClass; // Character classification
- ULONG nEndNdIdx; // for the percentage-display
+ sal_uLong nEndNdIdx; // for the percentage-display
LanguageType eCharClassLang;
- USHORT nLastHeadLvl, nLastCalcHeadLvl;
- USHORT nLastEnumLvl, nLastCalcEnumLvl;
- USHORT nRedlAutoFmtSeqId;
+ sal_uInt16 nLastHeadLvl, nLastCalcHeadLvl;
+ sal_uInt16 nLastEnumLvl, nLastCalcEnumLvl;
+ sal_uInt16 nRedlAutoFmtSeqId;
enum
{
@@ -145,11 +149,11 @@ class SwAutoFormat
IS_ENDE
} eStat;
- BOOL bEnde : 1;
- BOOL bEmptyLine : 1;
- BOOL bMoreLines : 1;
+ sal_Bool bEnde : 1;
+ sal_Bool bEmptyLine : 1;
+ sal_Bool bMoreLines : 1;
- static BOOL m_bAskForCancelUndoWhileBufferOverflow;
+ static sal_Bool m_bAskForCancelUndoWhileBufferOverflow;
static short m_nActionWhileAutoformatUndoBufferOverflow;
@@ -166,25 +170,25 @@ class SwAutoFormat
}
- BOOL IsSpace( const sal_Unicode c ) const
- { return (' ' == c || '\t' == c || 0x0a == c|| 0x3000 == c /* Jap. space */) ? TRUE : FALSE; }
+ sal_Bool IsSpace( const sal_Unicode c ) const
+ { return (' ' == c || '\t' == c || 0x0a == c|| 0x3000 == c /* Jap. space */) ? sal_True : sal_False; }
- void SetColl( USHORT nId, BOOL bHdLineOrText = FALSE );
+ void SetColl( sal_uInt16 nId, sal_Bool bHdLineOrText = sal_False );
String GoNextPara();
- BOOL HasObjects( const SwNode& rNd );
+ sal_Bool HasObjects( const SwNode& rNd );
// TxtNode methods
const SwTxtNode* GetNextNode() const;
- BOOL IsEmptyLine( const SwTxtNode& rNd ) const
+ sal_Bool IsEmptyLine( const SwTxtNode& rNd ) const
{ return 0 == rNd.GetTxt().Len() ||
rNd.GetTxt().Len() == GetLeadingBlanks( rNd.GetTxt() ); }
- BOOL IsOneLine( const SwTxtNode& ) const;
- BOOL IsFastFullLine( const SwTxtNode& ) const;
- BOOL IsNoAlphaLine( const SwTxtNode&) const;
- BOOL IsEnumericChar( const SwTxtNode&) const;
- BOOL IsBlanksInString( const SwTxtNode&) const;
- USHORT CalcLevel( const SwTxtNode&, USHORT *pDigitLvl = 0 ) const;
+ sal_Bool IsOneLine( const SwTxtNode& ) const;
+ sal_Bool IsFastFullLine( const SwTxtNode& ) const;
+ sal_Bool IsNoAlphaLine( const SwTxtNode&) const;
+ sal_Bool IsEnumericChar( const SwTxtNode&) const;
+ sal_Bool IsBlanksInString( const SwTxtNode&) const;
+ sal_uInt16 CalcLevel( const SwTxtNode&, sal_uInt16 *pDigitLvl = 0 ) const;
xub_StrLen GetBigIndent( xub_StrLen& rAktSpacePos ) const;
String& DelLeadingBlanks( String& rStr ) const;
@@ -192,8 +196,8 @@ class SwAutoFormat
xub_StrLen GetLeadingBlanks( const String& rStr ) const;
xub_StrLen GetTrailingBlanks( const String& rStr ) const;
- BOOL IsFirstCharCapital( const SwTxtNode& rNd ) const;
- USHORT GetDigitLevel( const SwTxtNode& rTxtNd, xub_StrLen& rPos,
+ sal_Bool IsFirstCharCapital( const SwTxtNode& rNd ) const;
+ sal_uInt16 GetDigitLevel( const SwTxtNode& rTxtNd, xub_StrLen& rPos,
String* pPreFix = 0, String* pPostFix = 0,
String* pNumTypes = 0 ) const;
// get the FORMATED TextFrame
@@ -202,26 +206,26 @@ class SwAutoFormat
void BuildIndent();
void BuildText();
void BuildTextIndent();
- void BuildEnum( USHORT nLvl, USHORT nDigitLevel );
+ void BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel );
void BuildNegIndent( SwTwips nSpaces );
- void BuildHeadLine( USHORT nLvl );
+ void BuildHeadLine( sal_uInt16 nLvl );
- BOOL HasSelBlanks( SwPaM& rPam ) const;
- BOOL HasBreakAttr( const SwTxtNode& ) const;
+ sal_Bool HasSelBlanks( SwPaM& rPam ) const;
+ sal_Bool HasBreakAttr( const SwTxtNode& ) const;
void DeleteSel( SwPaM& rPam );
- BOOL DeleteAktNxtPara( const String& rNxtPara );
+ sal_Bool DeleteAktNxtPara( const String& rNxtPara );
// delete in the node start and/or end
- void DeleteAktPara( BOOL bStart = TRUE, BOOL nEnd = TRUE );
- void DelEmptyLine( BOOL bTstNextPara = TRUE );
+ void DeleteAktPara( sal_Bool bStart = sal_True, sal_Bool nEnd = sal_True );
+ void DelEmptyLine( sal_Bool bTstNextPara = sal_True );
// when using multiline paragraphs delete the "left" and/or
// "right" margins
- void DelMoreLinesBlanks( BOOL bWithLineBreaks = FALSE );
+ void DelMoreLinesBlanks( sal_Bool bWithLineBreaks = sal_False );
// delete the previous paragraph
void DelPrevPara();
// execute AutoCorrect on current TextNode
void AutoCorrect( xub_StrLen nSttPos = 0 );
- BOOL CanJoin( const SwTxtNode* pTxtNd ) const
+ sal_Bool CanJoin( const SwTxtNode* pTxtNd ) const
{
return !bEnde && pTxtNd &&
!IsEmptyLine( *pTxtNd ) &&
@@ -233,16 +237,16 @@ class SwAutoFormat
}
// is a dot at the end ??
- BOOL IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const;
+ sal_Bool IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const;
- BOOL DoUnderline();
- BOOL DoTable();
+ sal_Bool DoUnderline();
+ sal_Bool DoTable();
- void _SetRedlineTxt( USHORT nId );
- BOOL SetRedlineTxt( USHORT nId )
- { if( aFlags.bWithRedlining ) _SetRedlineTxt( nId ); return TRUE; }
- BOOL ClearRedlineTxt()
- { if( aFlags.bWithRedlining ) pDoc->SetAutoFmtRedlineComment(0); return TRUE; }
+ void _SetRedlineTxt( sal_uInt16 nId );
+ sal_Bool SetRedlineTxt( sal_uInt16 nId )
+ { if( aFlags.bWithRedlining ) _SetRedlineTxt( nId ); return sal_True; }
+ sal_Bool ClearRedlineTxt()
+ { if( aFlags.bWithRedlining ) pDoc->SetAutoFmtRedlineComment(0); return sal_True; }
public:
SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
@@ -252,7 +256,7 @@ public:
}
};
-BOOL SwAutoFormat::m_bAskForCancelUndoWhileBufferOverflow = TRUE;
+sal_Bool SwAutoFormat::m_bAskForCancelUndoWhileBufferOverflow = sal_True;
short SwAutoFormat::m_nActionWhileAutoformatUndoBufferOverflow = RET_YES;
const sal_Unicode* StrChr( const sal_Unicode* pSrc, sal_Unicode c )
@@ -286,10 +290,10 @@ void SwAutoFormat::_GetCharClass( LanguageType eLang )
eCharClassLang = eLang;
}
-void SwAutoFormat::_SetRedlineTxt( USHORT nActionId )
+void SwAutoFormat::_SetRedlineTxt( sal_uInt16 nActionId )
{
String sTxt;
- USHORT nSeqNo = 0;
+ sal_uInt16 nSeqNo = 0;
if( STR_AUTOFMTREDL_END > nActionId )
{
sTxt = *ViewShell::GetShellRes()->GetAutoFmtNameLst()[ nActionId ];
@@ -329,14 +333,14 @@ String SwAutoFormat::GoNextPara()
//has to be checed twice before and after incrementation
if( aNdIdx.GetIndex() >= aEndNdIdx.GetIndex() )
{
- bEnde = TRUE;
+ bEnde = sal_True;
return aEmptyStr;
}
aNdIdx++;
if( aNdIdx.GetIndex() >= aEndNdIdx.GetIndex() )
{
- bEnde = TRUE;
+ bEnde = sal_True;
return aEmptyStr;
}
else
@@ -348,7 +352,7 @@ String SwAutoFormat::GoNextPara()
// EndNode : at the end, terminate
if( pNewNd->IsEndNode() )
{
- bEnde = TRUE;
+ bEnde = sal_True;
return aEmptyStr;
}
else if( pNewNd->IsTableNode() )
@@ -370,20 +374,20 @@ String SwAutoFormat::GoNextPara()
return pAktTxtNd->GetTxt();
}
-BOOL SwAutoFormat::HasObjects( const SwNode& rNd )
+sal_Bool SwAutoFormat::HasObjects( const SwNode& rNd )
{
// Is there something bound to the paragraph in the paragraph
// like borders, DrawObjects, ...
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwSpzFrmFmts& rFmts = *pDoc->GetSpzFrmFmts();
- for( USHORT n = 0; n < rFmts.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFmts.Count(); ++n )
{
const SwFmtAnchor& rAnchor = rFmts[ n ]->GetAnchor();
if ((FLY_AT_PAGE != rAnchor.GetAnchorId()) &&
rAnchor.GetCntntAnchor() &&
&rAnchor.GetCntntAnchor()->nNode.GetNode() == &rNd )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
}
@@ -398,16 +402,16 @@ const SwTxtNode* SwAutoFormat::GetNextNode() const
}
-BOOL SwAutoFormat::IsOneLine( const SwTxtNode& rNd ) const
+sal_Bool SwAutoFormat::IsOneLine( const SwTxtNode& rNd ) const
{
SwTxtFrmInfo aFInfo( GetFrm( rNd ) );
return aFInfo.IsOneLine();
}
-BOOL SwAutoFormat::IsFastFullLine( const SwTxtNode& rNd ) const
+sal_Bool SwAutoFormat::IsFastFullLine( const SwTxtNode& rNd ) const
{
- BOOL bRet = aFlags.bRightMargin;
+ sal_Bool bRet = aFlags.bRightMargin;
if( bRet )
{
SwTxtFrmInfo aFInfo( GetFrm( rNd ) );
@@ -417,24 +421,24 @@ BOOL SwAutoFormat::IsFastFullLine( const SwTxtNode& rNd ) const
}
-BOOL SwAutoFormat::IsEnumericChar( const SwTxtNode& rNd ) const
+sal_Bool SwAutoFormat::IsEnumericChar( const SwTxtNode& rNd ) const
{
const String& rTxt = rNd.GetTxt();
String sTmp( rTxt );
xub_StrLen nBlnks = GetLeadingBlanks( sTmp );
xub_StrLen nLen = rTxt.Len() - nBlnks;
if( !nLen )
- return FALSE;
+ return sal_False;
// -, +, * separated by blank ??
if( 2 < nLen && IsSpace( rTxt.GetChar( nBlnks + 1 ) ) )
{
if( StrChr( pBulletChar, rTxt.GetChar( nBlnks ) ) )
- return TRUE;
+ return sal_True;
// Should there be a symbol font at the position?
SwTxtFrmInfo aFInfo( GetFrm( rNd ) );
if( aFInfo.IsBullet( nBlnks ))
- return TRUE;
+ return sal_True;
}
// 1.) / 1. / 1.1.1 / (1). / (1) / ....
@@ -442,7 +446,7 @@ BOOL SwAutoFormat::IsEnumericChar( const SwTxtNode& rNd ) const
}
-BOOL SwAutoFormat::IsBlanksInString( const SwTxtNode& rNd ) const
+sal_Bool SwAutoFormat::IsBlanksInString( const SwTxtNode& rNd ) const
{
// Search more that 5 blanks/tabs in the string.
String sTmp( rNd.GetTxt() );
@@ -458,7 +462,7 @@ BOOL SwAutoFormat::IsBlanksInString( const SwTxtNode& rNd ) const
while( *pTmp && IsSpace( *++pTmp ))
;
if( 5 <= pTmp - pStt )
- return TRUE;
+ return sal_True;
}
else
++pTmp;
@@ -466,13 +470,13 @@ BOOL SwAutoFormat::IsBlanksInString( const SwTxtNode& rNd ) const
else
++pTmp;
}
- return FALSE;
+ return sal_False;
}
-USHORT SwAutoFormat::CalcLevel( const SwTxtNode& rNd, USHORT *pDigitLvl ) const
+sal_uInt16 SwAutoFormat::CalcLevel( const SwTxtNode& rNd, sal_uInt16 *pDigitLvl ) const
{
- USHORT nLvl = 0, nBlnk = 0;
+ sal_uInt16 nLvl = 0, nBlnk = 0;
const String& rTxt = rNd.GetTxt();
if( pDigitLvl )
*pDigitLvl = USHRT_MAX;
@@ -529,11 +533,11 @@ xub_StrLen SwAutoFormat::GetBigIndent( xub_StrLen& rAktSpacePos ) const
}
-BOOL SwAutoFormat::IsNoAlphaLine( const SwTxtNode& rNd ) const
+sal_Bool SwAutoFormat::IsNoAlphaLine( const SwTxtNode& rNd ) const
{
const String& rStr = rNd.GetTxt();
if( !rStr.Len() )
- return FALSE;
+ return sal_False;
// oder besser: ueber die Anzahl von Alpha/Num- und !AN-Zeichen
// bestimmen.
xub_StrLen nANChar = 0, nBlnk = 0;
@@ -545,18 +549,18 @@ BOOL SwAutoFormat::IsNoAlphaLine( const SwTxtNode& rNd ) const
else if( rCC.isLetterNumeric( rStr, n ))
++nANChar;
- // sind zu 75% keine Alpha-Nummerische-Zeichen, dann TRUE
- ULONG nLen = rStr.Len() - nBlnk;
- nLen = ( nLen * 3 ) / 4; // long overflow, if the strlen > USHORT
+ // sind zu 75% keine Alpha-Nummerische-Zeichen, dann sal_True
+ sal_uLong nLen = rStr.Len() - nBlnk;
+ nLen = ( nLen * 3 ) / 4; // long overflow, if the strlen > sal_uInt16
return xub_StrLen(nLen) < (rStr.Len() - nANChar - nBlnk);
}
-BOOL SwAutoFormat::DoUnderline()
+sal_Bool SwAutoFormat::DoUnderline()
{
if( !aFlags.bSetBorder )
- return FALSE;
+ return sal_False;
const sal_Unicode* pStr = pAktTxtNd->GetTxt().GetBuffer();
int eState = 0;
@@ -573,12 +577,12 @@ BOOL SwAutoFormat::DoUnderline()
case '~': eTmp = 5; break;
case '#': eTmp = 6; break;
default:
- return FALSE;
+ return sal_False;
}
if( 0 == eState )
eState = eTmp;
else if( eState != eTmp )
- return FALSE;
+ return sal_False;
++nCnt;
++pStr;
@@ -587,7 +591,7 @@ BOOL SwAutoFormat::DoUnderline()
if( 2 < nCnt )
{
// dann unterstreiche mal den vorherigen Absatz, wenn es diesen gibt!
- DelEmptyLine( FALSE );
+ DelEmptyLine( sal_False );
aDelPam.SetMark();
aDelPam.GetMark()->nContent = 0;
@@ -625,7 +629,7 @@ BOOL SwAutoFormat::DoUnderline()
RES_PARATR_CONNECT_BORDER, RES_PARATR_CONNECT_BORDER,
RES_BOX, RES_BOX,
0);
- aSet.Put( SwParaConnectBorderItem( FALSE ) );
+ aSet.Put( SwParaConnectBorderItem( sal_False ) );
SvxBoxItem aBox( RES_BOX );
aBox.SetLine( &aLine, BOX_LINE_BOTTOM );
aBox.SetDistance( 42 ); // ~0,75 mm
@@ -638,11 +642,11 @@ BOOL SwAutoFormat::DoUnderline()
}
-BOOL SwAutoFormat::DoTable()
+sal_Bool SwAutoFormat::DoTable()
{
if( !aFlags.bCreateTable || !aFlags.bAFmtByInput ||
pAktTxtNd->FindTableNode() )
- return FALSE;
+ return sal_False;
const String& rTmp = pAktTxtNd->GetTxt();
xub_StrLen nSttPlus = GetLeadingBlanks( rTmp );
@@ -652,7 +656,7 @@ BOOL SwAutoFormat::DoTable()
if( 2 > nEndPlus - nSttPlus ||
( '+' != ( cChar = rTmp.GetChar( nSttPlus )) && '|' != cChar ) ||
( '+' != ( cChar = rTmp.GetChar( nEndPlus - 1)) && '|' != cChar ))
- return FALSE;
+ return sal_False;
SwTxtFrmInfo aInfo( pAktTxtFrm );
@@ -673,11 +677,11 @@ BOOL SwAutoFormat::DoTable()
case '+':
case '|':
- aPosArr.Insert( static_cast<USHORT>(aInfo.GetCharPos(n)), aPosArr.Count() );
+ aPosArr.Insert( static_cast<sal_uInt16>(aInfo.GetCharPos(n)), aPosArr.Count() );
break;
default:
- return FALSE;
+ return sal_False;
}
if( ++n == nEndPlus )
break;
@@ -688,7 +692,7 @@ BOOL SwAutoFormat::DoTable()
if( 1 < aPosArr.Count() )
{
// Ausrichtung vom Textnode besorgen:
- USHORT nColCnt = aPosArr.Count() - 1;
+ sal_uInt16 nColCnt = aPosArr.Count() - 1;
SwTwips nSttPos = aPosArr[ 0 ];
sal_Int16 eHori;
switch( pAktTxtNd->GetSwAttrSet().GetAdjust().GetAdjust() )
@@ -702,7 +706,7 @@ BOOL SwAutoFormat::DoTable()
eHori = text::HoriOrientation::NONE;
// dann muss als letztes noch die akt. FrameBreite
// ins Array
- aPosArr.Insert( static_cast<USHORT>(pAktTxtFrm->Frm().Width()), aPosArr.Count() );
+ aPosArr.Insert( static_cast<sal_uInt16>(pAktTxtFrm->Frm().Width()), aPosArr.Count() );
}
else
eHori = text::HoriOrientation::LEFT;
@@ -772,7 +776,7 @@ xub_StrLen SwAutoFormat::GetTrailingBlanks( const String& rStr ) const
}
-BOOL SwAutoFormat::IsFirstCharCapital( const SwTxtNode& rNd ) const
+sal_Bool SwAutoFormat::IsFirstCharCapital( const SwTxtNode& rNd ) const
{
const String& rTxt = rNd.GetTxt();
for( xub_StrLen n = 0, nEnd = rTxt.Len(); n < nEnd; ++n )
@@ -785,11 +789,11 @@ BOOL SwAutoFormat::IsFirstCharCapital( const SwTxtNode& rNd ) const
0 != ( i18n::KCharacterType::UPPER &
nCharType );
}
- return FALSE;
+ return sal_False;
}
-USHORT SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
+sal_uInt16 SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
String* pPreFix, String* pPostFix, String* pNumTypes ) const
{
// Teste auf 1.) / 1. / 1.1.1 / (1). / (1) / ....
@@ -797,11 +801,11 @@ USHORT SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
xub_StrLen nPos = rPos;
int eScan = NONE;
- USHORT nStart = 0;
- BYTE nDigitLvl = 0, nDigitCnt = 0;
+ sal_uInt16 nStart = 0;
+ sal_uInt8 nDigitLvl = 0, nDigitCnt = 0;
//count number of parenthesis to assure a sensible order is found
- USHORT nOpeningParentheses = 0;
- USHORT nClosingParentheses = 0;
+ sal_uInt16 nOpeningParentheses = 0;
+ sal_uInt16 nClosingParentheses = 0;
CharClass& rCC = GetCharClass( rNd.GetSwAttrSet().GetLanguage().GetLanguage() );
@@ -841,7 +845,7 @@ USHORT SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
}
else if( rCC.isAlpha( rTxt, nPos ) )
{
- BOOL bIsUpper =
+ sal_Bool bIsUpper =
0 != ( i18n::KCharacterType::UPPER &
rCC.getCharacterType( rTxt, nPos ));
sal_Unicode cLow = rCC.toLower( rTxt, nPos, 1 ).GetChar(0), cNumTyp;
@@ -919,8 +923,8 @@ USHORT SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
else
{
// roemische Zahlen: checke ob das gueltige Zeichen sind
- USHORT nVal;
- BOOL bError = FALSE;
+ sal_uInt16 nVal;
+ sal_Bool bError = sal_False;
switch( cLow )
{
case 'm': nVal = 1000; goto CHECK_ROMAN_1;
@@ -939,43 +943,43 @@ CHECK_ROMAN_1:
if( nMod5 == ((3 * nVal) + n10 ) ||
nMod5 == ((4 * nVal) + n10 ) ||
nLast == n10 )
- nStart = static_cast<USHORT>(nStart + (n10 * 8));
+ nStart = static_cast<sal_uInt16>(nStart + (n10 * 8));
else if( nMod5 == 0 ||
nMod5 == (1 * nVal) ||
nMod5 == (2 * nVal) )
nStart = nStart + nVal;
else
- bError = TRUE;
+ bError = sal_True;
}
break;
CHECK_ROMAN_5:
{
if( ( nStart / nVal ) & 1 )
- bError = TRUE;
+ bError = sal_True;
else
{
int nMod = nStart % nVal;
int n10 = nVal / 5;
if( n10 == nMod )
- nStart = static_cast<USHORT>(nStart + (3 * n10));
+ nStart = static_cast<sal_uInt16>(nStart + (3 * n10));
else if( 0 == nMod )
nStart = nStart + nVal;
else
- bError = TRUE;
+ bError = sal_True;
}
}
break;
case 'i':
if( nStart % 5 >= 3 )
- bError = TRUE;
+ bError = sal_True;
else
nStart += 1;
break;
default:
- bError = TRUE;
+ bError = sal_True;
}
if( bError )
@@ -1030,7 +1034,7 @@ CHECK_ROMAN_5:
}
-void SwAutoFormat::SetColl( USHORT nId, BOOL bHdLineOrText )
+void SwAutoFormat::SetColl( sal_uInt16 nId, sal_Bool bHdLineOrText )
{
aDelPam.DeleteMark();
aDelPam.GetPoint()->nNode = aNdIdx;
@@ -1053,7 +1057,7 @@ void SwAutoFormat::SetColl( USHORT nId, BOOL bHdLineOrText )
// sonst nur den Blocksatz
SvxAdjustItem* pAdj;
if( SFX_ITEM_SET == aSet.GetItemState( RES_PARATR_ADJUST,
- FALSE, (const SfxPoolItem**)&pAdj ))
+ sal_False, (const SfxPoolItem**)&pAdj ))
{
SvxAdjust eAdj = pAdj->GetAdjust();
if( bHdLineOrText ? (SVX_ADJUST_RIGHT != eAdj &&
@@ -1067,7 +1071,7 @@ void SwAutoFormat::SetColl( USHORT nId, BOOL bHdLineOrText )
}
-BOOL SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const
+sal_Bool SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const
{
// noch ein Blank am Anfang oder Ende ?
// nicht loeschen, wird wieder eingefuegt.
@@ -1086,38 +1090,38 @@ BOOL SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const
( ' ' == pTxtNd->GetTxt().GetChar( nBlnkPos )))
pPos->nContent++;
else
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
-BOOL SwAutoFormat::HasBreakAttr( const SwTxtNode& rTxtNd ) const
+sal_Bool SwAutoFormat::HasBreakAttr( const SwTxtNode& rTxtNd ) const
{
const SfxItemSet* pSet = rTxtNd.GetpSwAttrSet();
if( !pSet )
- return FALSE;
+ return sal_False;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, FALSE, &pItem )
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False, &pItem )
&& SVX_BREAK_NONE != ((SvxFmtBreakItem*)pItem)->GetBreak() )
- return TRUE;
+ return sal_True;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, FALSE, &pItem )
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, sal_False, &pItem )
&& ((SwFmtPageDesc*)pItem)->GetPageDesc()
&& nsUseOnPage::PD_NONE != ((SwFmtPageDesc*)pItem)->GetPageDesc()->GetUseOn() )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
// ist ein Punkt am Ende ??
-BOOL SwAutoFormat::IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const
+sal_Bool SwAutoFormat::IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const
{
const String& rStr = rTxtNd.GetTxt();
xub_StrLen n = rStr.Len();
if( !n )
- return TRUE;
+ return sal_True;
while( --n && IsSpace( rStr.GetChar( n ) ) )
;
@@ -1126,7 +1130,7 @@ BOOL SwAutoFormat::IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const
// loesche im Node Anfang oder/und Ende
-void SwAutoFormat::DeleteAktPara( BOOL bStart, BOOL bEnd )
+void SwAutoFormat::DeleteAktPara( sal_Bool bStart, sal_Bool bEnd )
{
if( aFlags.bAFmtByInput
? aFlags.bAFmtByInpDelSpacesAtSttEnd
@@ -1185,7 +1189,7 @@ void SwAutoFormat::DeleteSel( SwPaM& rDelPam )
pEditShell->DeleteSel( rDelPam );
}
-BOOL SwAutoFormat::DeleteAktNxtPara( const String& rNxtPara )
+sal_Bool SwAutoFormat::DeleteAktNxtPara( const String& rNxtPara )
{
// Loesche Blanks am Ende vom akt. und am Anfang vom naechsten
aDelPam.DeleteMark();
@@ -1208,7 +1212,7 @@ BOOL SwAutoFormat::DeleteAktNxtPara( const String& rNxtPara )
// noch ein Blank am Anfang oder Ende ?
// nicht loeschen, wird wieder eingefuegt.
- BOOL bHasBlnks = HasSelBlanks( aDelPam );
+ sal_Bool bHasBlnks = HasSelBlanks( aDelPam );
if( *aDelPam.GetPoint() != *aDelPam.GetMark() )
DeleteSel( aDelPam );
@@ -1218,7 +1222,7 @@ BOOL SwAutoFormat::DeleteAktNxtPara( const String& rNxtPara )
}
-void SwAutoFormat::DelEmptyLine( BOOL bTstNextPara )
+void SwAutoFormat::DelEmptyLine( sal_Bool bTstNextPara )
{
SetRedlineTxt( STR_AUTOFMTREDL_DEL_EMPTY_PARA );
// Loesche Blanks den leeren Absatz
@@ -1228,7 +1232,7 @@ void SwAutoFormat::DelEmptyLine( BOOL bTstNextPara )
aDelPam.SetMark();
aDelPam.GetMark()->nNode--;
- SwTxtNode* pTNd = aDelPam.GetNode( FALSE )->GetTxtNode();
+ SwTxtNode* pTNd = aDelPam.GetNode( sal_False )->GetTxtNode();
if( pTNd )
// erstmal den vorherigen Textnode benutzen.
aDelPam.GetMark()->nContent.Assign( pTNd, pTNd->GetTxt().Len() );
@@ -1237,7 +1241,7 @@ void SwAutoFormat::DelEmptyLine( BOOL bTstNextPara )
// dann versuche den naechsten (am Anfang vom Dok, Tabellen-Zellen,
// Rahmen, ...
aDelPam.GetMark()->nNode += 2;
- pTNd = aDelPam.GetNode( FALSE )->GetTxtNode();
+ pTNd = aDelPam.GetNode( sal_False )->GetTxtNode();
if( pTNd )
{
aDelPam.GetMark()->nContent.Assign( pTNd, 0 );
@@ -1258,7 +1262,7 @@ void SwAutoFormat::DelEmptyLine( BOOL bTstNextPara )
}
-void SwAutoFormat::DelMoreLinesBlanks( BOOL bWithLineBreaks )
+void SwAutoFormat::DelMoreLinesBlanks( sal_Bool bWithLineBreaks )
{
if( aFlags.bAFmtByInput
? aFlags.bAFmtByInpDelSpacesBetweenLines
@@ -1277,7 +1281,7 @@ void SwAutoFormat::DelMoreLinesBlanks( BOOL bWithLineBreaks )
pNxt = (SwPaM*)aDelPam.GetNext();
if( pNxt->HasMark() && *pNxt->GetPoint() != *pNxt->GetMark() )
{
- BOOL bHasBlnks = HasSelBlanks( *pNxt );
+ sal_Bool bHasBlnks = HasSelBlanks( *pNxt );
DeleteSel( *pNxt );
if( !bHasBlnks )
{
@@ -1288,7 +1292,7 @@ void SwAutoFormat::DelMoreLinesBlanks( BOOL bWithLineBreaks )
if( pNxt == &aDelPam )
break;
delete pNxt;
- } while( TRUE );
+ } while( sal_True );
aDelPam.DeleteMark();
}
@@ -1320,9 +1324,9 @@ void SwAutoFormat::BuildIndent()
SetRedlineTxt( STR_AUTOFMTREDL_SET_TMPL_INDENT );
// lese alle nachfolgenden Absaetze die zu diesem Einzug gehoeren
- BOOL bBreak = TRUE;
+ sal_Bool bBreak = sal_True;
if( bMoreLines )
- DelMoreLinesBlanks( TRUE );
+ DelMoreLinesBlanks( sal_True );
else
bBreak = !IsFastFullLine( *pAktTxtNd ) ||
IsBlanksInString( *pAktTxtNd ) ||
@@ -1349,7 +1353,7 @@ void SwAutoFormat::BuildIndent()
!CalcLevel( *pNxtNd ) );
}
}
- DeleteAktPara( TRUE, TRUE );
+ DeleteAktPara( sal_True, sal_True );
AutoCorrect();
}
@@ -1358,16 +1362,16 @@ void SwAutoFormat::BuildTextIndent()
{
SetRedlineTxt( STR_AUTOFMTREDL_SET_TMPL_TEXT_INDENT);
// lese alle nachfolgenden Absaetze die zu diesem Einzug gehoeren
- BOOL bBreak = TRUE;
+ sal_Bool bBreak = sal_True;
if( bMoreLines )
- DelMoreLinesBlanks( TRUE );
+ DelMoreLinesBlanks( sal_True );
else
bBreak = !IsFastFullLine( *pAktTxtNd ) ||
IsBlanksInString( *pAktTxtNd ) ||
IsSentenceAtEnd( *pAktTxtNd );
if( aFlags.bAFmtByInput )
- pAktTxtNd->SetAutoFmtLvl( (BYTE)CalcLevel( *pAktTxtNd ) );
+ pAktTxtNd->SetAutoFmtLvl( (sal_uInt8)CalcLevel( *pAktTxtNd ) );
SetColl( RES_POOLCOLL_TEXT_MOVE );
if( !bBreak )
@@ -1388,7 +1392,7 @@ void SwAutoFormat::BuildTextIndent()
pNxtNd = GetNextNode();
}
}
- DeleteAktPara( TRUE, TRUE );
+ DeleteAktPara( sal_True, sal_True );
AutoCorrect();
}
@@ -1398,14 +1402,14 @@ void SwAutoFormat::BuildText()
SetRedlineTxt( STR_AUTOFMTREDL_SET_TMPL_TEXT );
// lese alle nachfolgenden Absaetze die zu diesem Text
// ohne Einzug gehoeren
- BOOL bBreak = TRUE;
+ sal_Bool bBreak = sal_True;
if( bMoreLines )
DelMoreLinesBlanks();
else
bBreak = !IsFastFullLine( *pAktTxtNd ) ||
IsBlanksInString( *pAktTxtNd ) ||
IsSentenceAtEnd( *pAktTxtNd );
- SetColl( RES_POOLCOLL_TEXT, TRUE );
+ SetColl( RES_POOLCOLL_TEXT, sal_True );
if( !bBreak )
{
SetRedlineTxt( STR_AUTOFMTREDL_DEL_MORELINES );
@@ -1427,16 +1431,16 @@ void SwAutoFormat::BuildText()
break;
}
}
- DeleteAktPara( TRUE, TRUE );
+ DeleteAktPara( sal_True, sal_True );
AutoCorrect();
}
-void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
+void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel )
{
SetRedlineTxt( STR_AUTOFMTREDL_SET_NUMBULET );
- BOOL bBreak = TRUE;
+ sal_Bool bBreak = sal_True;
// als erstes den akt. Einzug bestimmen und die Framebreite bestimmen
SwTwips nFrmWidth = pAktTxtFrm->Prt().Width();;
@@ -1458,9 +1462,9 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
IsBlanksInString( *pAktTxtNd ) ||
IsSentenceAtEnd( *pAktTxtNd );
sal_Bool bRTL = pEditShell->IsInRightToLeftText();
- DeleteAktPara( TRUE, TRUE );
+ DeleteAktPara( sal_True, sal_True );
- BOOL bChgBullet = FALSE, bChgEnum = FALSE;
+ sal_Bool bChgBullet = sal_False, bChgEnum = sal_False;
xub_StrLen nAutoCorrPos = 0;
// falls die Numerierung gesetzt werden, die akt. besorgen
@@ -1488,7 +1492,7 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
{
SwCharFmt* pCFmt = pDoc->GetCharFmtFromPool(
RES_POOLCHR_BUL_LEVEL );
- bChgBullet = TRUE;
+ bChgBullet = sal_True;
// wurde das Format schon mal angepasst?
if( !aRule.GetNumFmt( nLvl ) )
{
@@ -1514,11 +1518,11 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
// <--
}
- USHORT nAbsPos = lBullIndent;
- USHORT nSpaceSteps = nLvl
- ? USHORT(nLeftTxtPos / nLvl)
+ sal_uInt16 nAbsPos = lBullIndent;
+ sal_uInt16 nSpaceSteps = nLvl
+ ? sal_uInt16(nLeftTxtPos / nLvl)
: lBullIndent;
- for( BYTE n = 0; n < MAXLEVEL; ++n, nAbsPos = nAbsPos + nSpaceSteps )
+ for( sal_uInt8 n = 0; n < MAXLEVEL; ++n, nAbsPos = nAbsPos + nSpaceSteps )
{
SwNumFmt aFmt( aRule.Get( n ) );
aFmt.SetBulletFont( pBullFnt );
@@ -1535,7 +1539,7 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
if( n == nLvl &&
nFrmWidth < ( nSpaceSteps * MAXLEVEL ) )
- nSpaceSteps = static_cast<USHORT>(( nFrmWidth - nLeftTxtPos ) /
+ nSpaceSteps = static_cast<sal_uInt16>(( nFrmWidth - nLeftTxtPos ) /
( MAXLEVEL - nLvl ));
}
}
@@ -1543,8 +1547,8 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
}
else
{
- bChgBullet = TRUE;
- SetColl( static_cast<USHORT>(RES_POOLCOLL_BUL_LEVEL1 + ( Min( nLvl, cnNumBullColls ) * 4 )) );
+ bChgBullet = sal_True;
+ SetColl( static_cast<sal_uInt16>(RES_POOLCOLL_BUL_LEVEL1 + ( Min( nLvl, cnNumBullColls ) * 4 )) );
}
}
else
@@ -1559,13 +1563,13 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
if( USHRT_MAX != ( nDigitLevel = GetDigitLevel( *pAktTxtNd, nTxtStt,
&aPreFix, &aPostFix, &aNumTypes )) )
{
- bChgEnum = TRUE;
+ bChgEnum = sal_True;
// Ebene 0 und Einrueckung dann wird die Ebene durch den linken
// Einzug und der default NumEinrueckung bestimmt.
if( !nDigitLevel && nLeftTxtPos )
- nLvl = Min( USHORT( nLeftTxtPos / lNumIndent ),
- USHORT( MAXLEVEL - 1 ) );
+ nLvl = Min( sal_uInt16( nLeftTxtPos / lNumIndent ),
+ sal_uInt16( MAXLEVEL - 1 ) );
else
nLvl = nDigitLevel;
}
@@ -1579,7 +1583,7 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
if( !nDigitLevel )
{
SwNumFmt aFmt( aRule.Get( nLvl ) );
- aFmt.SetStart( static_cast<USHORT>(aPreFix.GetToken( 1,
+ aFmt.SetStart( static_cast<sal_uInt16>(aPreFix.GetToken( 1,
(sal_Unicode)1 ).ToInt32()));
aFmt.SetPrefix( aPreFix.GetToken( 0, (sal_Unicode)1 ));
aFmt.SetSuffix( aPostFix.GetToken( 0, (sal_Unicode)1 ));
@@ -1597,13 +1601,13 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
}
else
{
- USHORT nSpaceSteps = nLvl ? USHORT(nLeftTxtPos / nLvl) : 0;
- BYTE n;
+ sal_uInt16 nSpaceSteps = nLvl ? sal_uInt16(nLeftTxtPos / nLvl) : 0;
+ sal_uInt8 n;
for( n = 0; n <= nLvl; ++n )
{
SwNumFmt aFmt( aRule.Get( n ) );
- aFmt.SetStart( static_cast<USHORT>(aPreFix.GetToken( n+1,
+ aFmt.SetStart( static_cast<sal_uInt16>(aPreFix.GetToken( n+1,
(sal_Unicode)1 ).ToInt32() ));
if( !n )
aFmt.SetPrefix( aPreFix.GetToken( n, (sal_Unicode)1 ));
@@ -1612,7 +1616,7 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
if( n < aNumTypes.Len() )
aFmt.SetNumberingType((aNumTypes.GetChar( n ) - '0'));
- aFmt.SetAbsLSpace( USHORT( nSpaceSteps * n )
+ aFmt.SetAbsLSpace( sal_uInt16( nSpaceSteps * n )
+ lNumIndent );
if( !aFmt.GetCharFmt() )
@@ -1624,16 +1628,16 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
}
// passt alles vollstaendig in den Frame?
- BOOL bDefStep = nFrmWidth < (nSpaceSteps * MAXLEVEL);
+ sal_Bool bDefStep = nFrmWidth < (nSpaceSteps * MAXLEVEL);
for( ; n < MAXLEVEL; ++n )
{
SwNumFmt aFmt( aRule.Get( n ) );
aFmt.SetIncludeUpperLevels( MAXLEVEL );
if( bDefStep )
- aFmt.SetAbsLSpace( USHORT( (nLeftTxtPos +
- SwNumRule::GetNumIndent(static_cast<BYTE>(n-nLvl)))));
+ aFmt.SetAbsLSpace( sal_uInt16( (nLeftTxtPos +
+ SwNumRule::GetNumIndent(static_cast<sal_uInt8>(n-nLvl)))));
else
- aFmt.SetAbsLSpace( USHORT( nSpaceSteps * n )
+ aFmt.SetAbsLSpace( sal_uInt16( nSpaceSteps * n )
+ lNumIndent );
aRule.Set( n, aFmt );
}
@@ -1641,9 +1645,9 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
}
}
else if( !aFlags.bAFmtByInput )
- SetColl( static_cast<USHORT>(RES_POOLCOLL_NUM_LEVEL1 + ( Min( nLvl, cnNumBullColls ) * 4 ) ));
+ SetColl( static_cast<sal_uInt16>(RES_POOLCOLL_NUM_LEVEL1 + ( Min( nLvl, cnNumBullColls ) * 4 ) ));
else
- bChgEnum = FALSE;
+ bChgEnum = sal_False;
}
if( bChgEnum || bChgBullet )
@@ -1657,11 +1661,11 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
{
aDelPam.SetMark();
aDelPam.GetMark()->nNode++;
- aDelPam.GetNode(FALSE)->GetTxtNode()->SetAttrListLevel( nLvl );
+ aDelPam.GetNode(sal_False)->GetTxtNode()->SetAttrListLevel( nLvl );
}
pAktTxtNd->SetAttrListLevel(nLvl);
- pAktTxtNd->SetNumLSpace( TRUE );
+ pAktTxtNd->SetNumLSpace( sal_True );
// start new list
pDoc->SetNumRule( aDelPam, aRule, true );
@@ -1738,7 +1742,7 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
if(!pNxtNd || pCurrNode == pNxtNd)
break;
}
- DeleteAktPara( FALSE, TRUE );
+ DeleteAktPara( sal_False, sal_True );
AutoCorrect( nAutoCorrPos );
}
@@ -1751,28 +1755,28 @@ void SwAutoFormat::BuildNegIndent( SwTwips nSpaces )
// Einrueckung in der 2.Zeile)
// lese alle nachfolgenden Absaetze die zu dieser Aufzaehlung gehoeren
- BOOL bBreak = TRUE;
+ sal_Bool bBreak = sal_True;
xub_StrLen nSpacePos, nTxtPos = GetBigIndent( nSpacePos );
if( bMoreLines )
- DelMoreLinesBlanks( TRUE );
+ DelMoreLinesBlanks( sal_True );
else
bBreak = !IsFastFullLine( *pAktTxtNd ) ||
( !nTxtPos && IsBlanksInString( *pAktTxtNd )) ||
IsSentenceAtEnd( *pAktTxtNd );
- SetColl( static_cast<USHORT>( nTxtPos
+ SetColl( static_cast<sal_uInt16>( nTxtPos
? RES_POOLCOLL_CONFRONTATION
: RES_POOLCOLL_TEXT_NEGIDENT ) );
if( nTxtPos )
{
const String& rStr = pAktTxtNd->GetTxt();
- BOOL bInsTab = TRUE;
+ sal_Bool bInsTab = sal_True;
if( '\t' == rStr.GetChar( nSpacePos+1 )) // ein Tab, das belassen wir
{
--nSpacePos;
- bInsTab = FALSE;
+ bInsTab = sal_False;
}
xub_StrLen nSpaceStt = nSpacePos;
@@ -1783,7 +1787,7 @@ void SwAutoFormat::BuildNegIndent( SwTwips nSpaces )
if( bInsTab && '\t' == rStr.GetChar( nSpaceStt ) ) // ein Tab, das belassen wir
{
++nSpaceStt;
- bInsTab = FALSE;
+ bInsTab = sal_False;
}
@@ -1826,12 +1830,12 @@ void SwAutoFormat::BuildNegIndent( SwTwips nSpaces )
pNxtNd = GetNextNode();
}
}
- DeleteAktPara( TRUE, TRUE );
+ DeleteAktPara( sal_True, sal_True );
AutoCorrect();
}
-void SwAutoFormat::BuildHeadLine( USHORT nLvl )
+void SwAutoFormat::BuildHeadLine( sal_uInt16 nLvl )
{
if( aFlags.bWithRedlining )
{
@@ -1843,14 +1847,14 @@ void SwAutoFormat::BuildHeadLine( USHORT nLvl )
pDoc->SetAutoFmtRedlineComment( &sTxt );
}
- SetColl( static_cast<USHORT>(RES_POOLCOLL_HEADLINE1 + nLvl ), TRUE );
+ SetColl( static_cast<sal_uInt16>(RES_POOLCOLL_HEADLINE1 + nLvl ), sal_True );
if( aFlags.bAFmtByInput )
{
SwTxtFmtColl& rNxtColl = pAktTxtNd->GetTxtColl()->GetNextTxtFmtColl();
DelPrevPara();
- DeleteAktPara( TRUE, FALSE );
+ DeleteAktPara( sal_True, sal_False );
DeleteAktNxtPara( aEmptyStr );
aDelPam.DeleteMark();
@@ -1860,7 +1864,7 @@ void SwAutoFormat::BuildHeadLine( USHORT nLvl )
}
else
{
- DeleteAktPara( TRUE, TRUE );
+ DeleteAktPara( sal_True, sal_True );
AutoCorrect();
}
}
@@ -1886,7 +1890,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
if( nPos >= pTxt->Len() )
return;
- BOOL bGetLanguage = aFlags.bChgOrdinalNumber ||
+ sal_Bool bGetLanguage = aFlags.bChgOrdinalNumber ||
aFlags.bChgToEnEmDash || aFlags.bSetINetAttr ||
aFlags.bCptlSttWrd || aFlags.bCptlSttSntnc ||
aFlags.bAddNonBrkSpace;
@@ -1901,7 +1905,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
SwTxtFrmInfo aFInfo( 0 );
xub_StrLen nSttPos, nLastBlank = nPos;
- BOOL bFirst = aFlags.bCptlSttSntnc, bFirstSent = bFirst;
+ sal_Bool bFirst = aFlags.bCptlSttSntnc, bFirstSent = bFirst;
sal_Unicode cChar = 0;
CharClass& rAppCC = GetAppCharClass();
@@ -1924,17 +1928,17 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
{
SetRedlineTxt( STR_AUTOFMTREDL_TYPO );
aDelPam.GetPoint()->nContent = nPos;
- BOOL bSetHardBlank = FALSE;
+ sal_Bool bSetHardBlank = sal_False;
String sReplace( pATst->GetQuote( aACorrDoc,
- nPos, cChar, TRUE ));
+ nPos, cChar, sal_True ));
aDelPam.SetMark();
aDelPam.GetPoint()->nContent = nPos+1;
if( 2 == sReplace.Len() && ' ' == sReplace.GetChar( 1 ))
{
sReplace.Erase( 1 );
- bSetHardBlank = TRUE;
+ bSetHardBlank = sal_True;
}
pDoc->ReplaceRange( aDelPam, sReplace, false );
@@ -1957,7 +1961,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
}
}
- int bCallACorr = FALSE;
+ int bCallACorr = sal_False;
int bBreak = 0;
if( nPos && IsSpace( pTxt->GetChar( nPos-1 )))
nLastBlank = nPos;
@@ -1975,15 +1979,15 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
if( !aFInfo.IsBullet( nPos ))
{
SetRedlineTxt( STR_AUTOFMTREDL_TYPO );
- BOOL bSetHardBlank = FALSE;
+ sal_Bool bSetHardBlank = sal_False;
aDelPam.GetPoint()->nContent = nPos;
String sReplace( pATst->GetQuote( aACorrDoc,
- nPos, cChar, FALSE ));
+ nPos, cChar, sal_False ));
if( 2 == sReplace.Len() && ' ' == sReplace.GetChar( 0 ))
{
sReplace.Erase( 0, 1 );
- bSetHardBlank = TRUE;
+ bSetHardBlank = sal_True;
}
aDelPam.SetMark();
@@ -2068,7 +2072,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
case '!':
case '?':
if( aFlags.bCptlSttSntnc )
- bFirstSent = TRUE;
+ bFirstSent = sal_True;
default:
if( !( rAppCC.isLetterNumeric( *pTxt, nPos )
|| '/' == cChar )) // '/' should not be a word seperator (e.g. '1/2' needs to be handled as one word for replacement)
@@ -2082,15 +2086,15 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
if( nPos == nSttPos )
{
if( ++nPos == pTxt->Len() )
- bCallACorr = TRUE;
+ bCallACorr = sal_True;
}
else
- bCallACorr = TRUE;
+ bCallACorr = sal_True;
if( bCallACorr )
{
- bCallACorr = FALSE;
+ bCallACorr = sal_False;
aDelPam.GetPoint()->nContent = nPos;
SetRedlineTxt( STR_AUTOFMTREDL_USE_REPLACE );
if( aFlags.bAutoCorrect &&
@@ -2143,12 +2147,12 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
if( aFlags.bCptlSttSntnc && bFirst )
{
SetRedlineTxt( STR_AUTOFMTREDL_CPTL_STT_SENT );
- pATst->FnCptlSttSntnc( aACorrDoc, *pTxt, TRUE, nSttPos, nPos, eLang);
- bFirst = FALSE;
+ pATst->FnCptlSttSntnc( aACorrDoc, *pTxt, sal_True, nSttPos, nPos, eLang);
+ bFirst = sal_False;
}
bFirst = bFirstSent;
- bFirstSent = FALSE;
+ bFirstSent = sal_False;
if( aFlags.bWithRedlining )
{
@@ -2181,14 +2185,14 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
"Kein Bereich angegeben" );
if( aFlags.bSetNumRule && !aFlags.bAFmtByInput )
- aFlags.bSetNumRule = FALSE;
+ aFlags.bSetNumRule = sal_False;
- BOOL bReplaceStyles = !aFlags.bAFmtByInput || aFlags.bReplaceStyles;
+ sal_Bool bReplaceStyles = !aFlags.bAFmtByInput || aFlags.bReplaceStyles;
const SwTxtNode* pNxtNd = 0;
- BOOL bNxtEmpty = FALSE;
- BOOL bNxtAlpha = FALSE;
- USHORT nNxtLevel = 0;
+ sal_Bool bNxtEmpty = sal_False;
+ sal_Bool bNxtAlpha = sal_False;
+ sal_uInt16 nNxtLevel = 0;
// setze den Bereich zum Autoformatieren
if( pSttNd )
@@ -2205,9 +2209,9 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
IsNoAlphaLine( *pNxtNd );
}
else
- bEmptyLine = TRUE; // am Dokument Anfang
+ bEmptyLine = sal_True; // am Dokument Anfang
- bEnde = FALSE;
+ bEnde = sal_False;
// setze die Werte fuer die Prozent-Anzeige
nEndNdIdx = aEndNdIdx.GetIndex();
@@ -2220,7 +2224,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
RedlineMode_t eRedlMode = pDoc->GetRedlineMode(), eOldMode = eRedlMode;
if( aFlags.bWithRedlining )
{
- pDoc->SetAutoFmtRedline( TRUE );
+ pDoc->SetAutoFmtRedline( sal_True );
eRedlMode = (RedlineMode_t)(nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_SHOW_INSERT);
}
else
@@ -2228,16 +2232,16 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
pDoc->SetRedlineMode( eRedlMode );
// save undo state (might be turned off)
- sal_Bool bUndoState = pDoc->DoesUndo();
+ bool const bUndoState = pDoc->GetIDocumentUndoRedo().DoesUndo();
// wenn mehrere Zeilen, dann erstmal nicht mit
// dem nachfolgenden Absatz zusammenfassen.
- bMoreLines = FALSE;
+ bMoreLines = sal_False;
nLastCalcHeadLvl = nLastCalcEnumLvl = 0;
nLastHeadLvl = nLastEnumLvl = USHRT_MAX;
- USHORT nLevel = 0;
- USHORT nDigitLvl = 0;
+ sal_uInt16 nLevel = 0;
+ sal_uInt16 nDigitLvl = 0;
// defaulten
SwTxtFrmInfo aFInfo( 0 );
@@ -2246,50 +2250,6 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
eStat = READ_NEXT_PARA;
while( !bEnde )
{
- // limit redline array size to prevent overflow and to conserve memory
- if( pDoc->HasTooManyUndos() )
- {
- DBG_ASSERT( bUndoState, "undo overflow without undo?" );
-
- //ask user
- short nResult = m_nActionWhileAutoformatUndoBufferOverflow; // TODO: read the last decision of the user from configuration
- if(m_bAskForCancelUndoWhileBufferOverflow) // TODO: read the last decision of the user from configuration
- {
- Window* pParent = pEditShell?pEditShell->GetWin():NULL;
- WarningBox aWarning( pParent,SW_RES(MSG_DISABLE_UNDO_QUESTION));
- aWarning.SetDefaultCheckBoxText();
- USHORT nDefaultButton = nResult==RET_YES?BUTTONID_YES:(nResult==RET_NO?BUTTONID_NO:BUTTONID_CANCEL);
- aWarning.SetFocusButton(nDefaultButton);
- nResult = aWarning.Execute();
- m_bAskForCancelUndoWhileBufferOverflow = !aWarning.GetCheckBoxState();
- m_nActionWhileAutoformatUndoBufferOverflow = nResult;
- // TODO: store m_bAskForCancelUndoWhileBufferOverflow in configuration
- // TODO: store m_nActionWhileAutoformatUndoBufferOverflow in configuration
- }
-
- DBG_ASSERT( (nResult == RET_YES) || (nResult == RET_CANCEL) || (nResult == RET_NO),
- "unexpected result" );
-
- if( nResult == RET_YES )
- {
- // turn off undo and continue
- pDoc->DoUndo( sal_False );
- pDoc->DelAllUndoObj();
- }
- else if( nResult == RET_NO )
- {
- //stop autoformatting and keep changes
- eStat = IS_ENDE;
- }
- else if( nResult == RET_CANCEL )
- {
- //cancel autoformatting and undo changes
- eStat = IS_ENDE;
-
- // TODO: undo changes
- }
- }
-
switch( eStat )
{
case READ_NEXT_PARA:
@@ -2304,8 +2264,8 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
{
if( aFlags.bDelEmptyNode && !HasObjects( *pAktTxtNd ) )
{
- bEmptyLine = TRUE;
- ULONG nOldCnt = pDoc->GetNodes().Count();
+ bEmptyLine = sal_True;
+ sal_uLong nOldCnt = pDoc->GetNodes().Count();
DelEmptyLine();
// wurde wiklich ein Node geloescht ?
if( nOldCnt != pDoc->GetNodes().Count() )
@@ -2325,7 +2285,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
{
//JP 30.09.96: das DoTable() verlaesst sich auf das
// Pop und Move - Crsr nach dem AutoFormat!
- pEdShell->Pop( FALSE );
+ pEdShell->Pop( sal_False );
*pEdShell->GetCrsr() = aDelPam;
pEdShell->Push();
@@ -2338,8 +2298,8 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// geloescht werden!
if( !DoUnderline() && bReplaceStyles )
{
- SetColl( RES_POOLCOLL_STANDARD, TRUE );
- bEmptyLine = TRUE;
+ SetColl( RES_POOLCOLL_STANDARD, sal_True );
+ bEmptyLine = sal_True;
}
eStat = READ_NEXT_PARA;
}
@@ -2352,12 +2312,12 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
if( pAktTxtNd->GetNumRule() )
{
// in Numerierung nichts machen, zum naechsten
- bEmptyLine = FALSE;
+ bEmptyLine = sal_False;
eStat = READ_NEXT_PARA;
// loesche alle Blanks am Anfang/Ende
// und alle mitten drin
//JP 29.04.98: erstmal nur alle "mitten drin".
- DelMoreLinesBlanks( FALSE );
+ DelMoreLinesBlanks( sal_False );
break;
}
@@ -2366,7 +2326,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// erstmal: wurden schon mal entsprechende Vorlagen
// vergeben, so behalte die bei, gehe zum
// naechsten Node.
- USHORT nPoolId = pAktTxtNd->GetTxtColl()->GetPoolFmtId();
+ sal_uInt16 nPoolId = pAktTxtNd->GetTxtColl()->GetPoolFmtId();
if( IsPoolUserFmt( nPoolId )
? !aFlags.bChgUserColl
: ( RES_POOLCOLL_STANDARD != nPoolId &&
@@ -2385,7 +2345,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
short nSz;
SvxLRSpaceItem* pLRSpace;
if( SFX_ITEM_SET == pAktTxtNd->GetSwAttrSet().
- GetItemState( RES_LR_SPACE, TRUE,
+ GetItemState( RES_LR_SPACE, sal_True,
(const SfxPoolItem**)&pLRSpace ) &&
( 0 != (nSz = pLRSpace->GetTxtFirstLineOfst()) ||
0 != pLRSpace->GetTxtLeft() ) )
@@ -2405,7 +2365,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// nie zusammenfassen, so belassen
// (Opt. vielleicht als Ausnahmen nur Einzug)
- bMoreLines = TRUE;
+ bMoreLines = sal_True;
if( bReplaceStyles )
{
@@ -2432,15 +2392,15 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
nNxtLevel = CalcLevel( *pNxtNd );
if( !bEmptyLine && HasBreakAttr( *pAktTxtNd ) )
- bEmptyLine = TRUE;
+ bEmptyLine = sal_True;
if( !bNxtEmpty && HasBreakAttr( *pNxtNd ) )
- bNxtEmpty = TRUE;
+ bNxtEmpty = sal_True;
}
else
{
- bNxtEmpty = FALSE; // TRUE;
- bNxtAlpha = FALSE;
+ bNxtEmpty = sal_False; // sal_True;
+ bNxtAlpha = sal_False;
nNxtLevel = 0;
}
eStat = !bMoreLines ? IS_ONE_LINE : TST_ENUMERIC;
@@ -2457,7 +2417,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
if( !DelLeadingBlanks( sClrStr ).Len() )
{
- bEmptyLine = TRUE;
+ bEmptyLine = sal_True;
eStat = READ_NEXT_PARA;
break; // naechsten Absatz lesen
}
@@ -2467,7 +2427,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
IsBlanksInString( *pAktTxtNd ) )
break;
- bEmptyLine = FALSE;
+ bEmptyLine = sal_False;
String sEndClrStr( sClrStr );
xub_StrLen nLen = DelTrailingBlanks( sEndClrStr ).Len();
@@ -2521,7 +2481,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
case TST_ENUMERIC:
{
- bEmptyLine = FALSE;
+ bEmptyLine = sal_False;
if( IsEnumericChar( *pAktTxtNd ))
{
if( nLevel >= MAXLEVEL )
@@ -2615,12 +2575,12 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
// erstmal: wurden schon mal entsprechende Vorlagen
// vergeben, so behalte die bei, gehe zum
// naechsten Node.
- bEmptyLine = FALSE;
+ bEmptyLine = sal_False;
eStat = READ_NEXT_PARA;
// loesche alle Blanks am Anfang/Ende
// und alle mitten drin
//JP 29.04.98: erstmal nur alle "mitten drin".
- DelMoreLinesBlanks( FALSE );
+ DelMoreLinesBlanks( sal_False );
// behandel die harte Attributierung
if( pAktTxtNd->HasSwAttrSet() )
@@ -2629,7 +2589,7 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
SvxLRSpaceItem* pLRSpace;
if( bReplaceStyles &&
SFX_ITEM_SET == pAktTxtNd->GetSwAttrSet().
- GetItemState( RES_LR_SPACE, FALSE,
+ GetItemState( RES_LR_SPACE, sal_False,
(const SfxPoolItem**)&pLRSpace ) &&
( 0 != (nSz = pLRSpace->GetTxtFirstLineOfst()) ||
0 != pLRSpace->GetTxtLeft() ) )
@@ -2651,17 +2611,17 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags,
break;
case IS_ENDE:
- bEnde = TRUE;
+ bEnde = sal_True;
break;
}
}
if( aFlags.bWithRedlining )
- pDoc->SetAutoFmtRedline( FALSE );
+ pDoc->SetAutoFmtRedline( sal_False );
pDoc->SetRedlineMode( eOldMode );
// restore undo (in case it has been changed)
- pDoc->DoUndo( bUndoState );
+ pDoc->GetIDocumentUndoRedo().DoUndo(bUndoState);
// Prozent-Anzeige wieder abschalten
if( !aFlags.bAFmtByInput )
@@ -2681,7 +2641,7 @@ void SwEditShell::AutoFormat( const SvxSwAutoFmtFlags* pAFlags )
{
aAFFlags = *pAFlags;
if( !aAFFlags.bAFmtByInput )
- pWait = new SwWait( *GetDoc()->GetDocShell(), TRUE );
+ pWait = new SwWait( *GetDoc()->GetDocShell(), sal_True );
}
SwPaM* pCrsr = GetCrsr();
@@ -2717,13 +2677,13 @@ void SwEditShell::AutoFmtBySplitNode()
StartAllAction();
StartUndo( UNDO_AUTOFORMAT );
- BOOL bRange = FALSE;
+ sal_Bool bRange = sal_False;
pCrsr->SetMark();
SwIndex* pCntnt = &pCrsr->GetMark()->nContent;
if( pCntnt->GetIndex() )
{
*pCntnt = 0;
- bRange = TRUE;
+ bRange = sal_True;
}
else
{
@@ -2734,7 +2694,7 @@ void SwEditShell::AutoFmtBySplitNode()
{
pCntnt->Assign( pTxtNd, 0 );
pCrsr->GetMark()->nNode = aNdIdx;
- bRange = TRUE;
+ bRange = sal_True;
}
}
@@ -2749,7 +2709,7 @@ void SwEditShell::AutoFmtBySplitNode()
//JP 30.09.96: das DoTable() verlaesst sich auf das PopCrsr
// und MoveCrsr!
- Pop( FALSE );
+ Pop( sal_False );
pCrsr = GetCrsr();
}
pCrsr->DeleteMark();
diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx
index 930b31e52f8c..bb5d650484b2 100644
--- a/sw/source/core/edit/edatmisc.cxx
+++ b/sw/source/core/edit/edatmisc.cxx
@@ -29,9 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <editsh.hxx>
#include <doc.hxx> // fuer aNodes
+#include <IDocumentUndoRedo.hxx>
#include <pam.hxx> // fuer SwPaM
#include <edimp.hxx> // fuer MACROS
#include <swundo.hxx> // fuer die UndoIds
@@ -48,9 +48,11 @@ void SwEditShell::ResetAttr( const SvUShortsSort* pAttrs )
{
SET_CURR_SHELL( this );
StartAllAction();
- BOOL bUndoGroup = GetCrsr()->GetNext() != GetCrsr();
+ sal_Bool bUndoGroup = GetCrsr()->GetNext() != GetCrsr();
if( bUndoGroup )
- GetDoc()->StartUndo(UNDO_RESETATTR, NULL);
+ {
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_RESETATTR, NULL);
+ }
FOREACHPAM_START(this)
@@ -58,7 +60,9 @@ void SwEditShell::ResetAttr( const SvUShortsSort* pAttrs )
FOREACHPAM_END()
if( bUndoGroup )
- GetDoc()->EndUndo(UNDO_RESETATTR, NULL);
+ {
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_RESETATTR, NULL);
+ }
CallChgLnk();
EndAllAction();
}
@@ -68,12 +72,14 @@ void SwEditShell::ResetAttr( const SvUShortsSort* pAttrs )
void SwEditShell::GCAttr()
{
FOREACHPAM_START(this)
- SwTxtNode *pTxtNode;
if ( !PCURCRSR->HasMark() )
{
- if( 0 != (pTxtNode = GetDoc()->GetNodes()[
- PCURCRSR->GetPoint()->nNode]->GetTxtNode()))
+ SwTxtNode *const pTxtNode =
+ PCURCRSR->GetPoint()->nNode.GetNode().GetTxtNode();
+ if (pTxtNode)
+ {
pTxtNode->GCAttr();
+ }
}
else
{
@@ -103,22 +109,22 @@ void SwEditShell::SetDefault( const SfxPoolItem& rFmtHint )
// Erfrage das Default Attribut in diesem Dokument.
-const SfxPoolItem& SwEditShell::GetDefault( USHORT nFmtHint ) const
+const SfxPoolItem& SwEditShell::GetDefault( sal_uInt16 nFmtHint ) const
{
return GetDoc()->GetDefault( nFmtHint );
}
-void SwEditShell::SetAttr( const SfxPoolItem& rHint, USHORT nFlags )
+void SwEditShell::SetAttr( const SfxPoolItem& rHint, sal_uInt16 nFlags )
{
SET_CURR_SHELL( this );
StartAllAction();
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() != pCrsr ) // Ring von Cursorn
{
- BOOL bIsTblMode = IsTableMode();
- GetDoc()->StartUndo(UNDO_INSATTR, NULL);
+ sal_Bool bIsTblMode = IsTableMode();
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, NULL);
FOREACHPAM_START(this)
if( PCURCRSR->HasMark() && ( bIsTblMode ||
@@ -128,7 +134,7 @@ void SwEditShell::SetAttr( const SfxPoolItem& rHint, USHORT nFlags )
}
FOREACHPAM_END()
- GetDoc()->EndUndo(UNDO_INSATTR, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_INSATTR, NULL);
}
else
{
@@ -140,15 +146,15 @@ void SwEditShell::SetAttr( const SfxPoolItem& rHint, USHORT nFlags )
}
-void SwEditShell::SetAttr( const SfxItemSet& rSet, USHORT nFlags )
+void SwEditShell::SetAttr( const SfxItemSet& rSet, sal_uInt16 nFlags )
{
SET_CURR_SHELL( this );
StartAllAction();
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() != pCrsr ) // Ring von Cursorn
{
- BOOL bIsTblMode = IsTableMode();
- GetDoc()->StartUndo(UNDO_INSATTR, NULL);
+ sal_Bool bIsTblMode = IsTableMode();
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, NULL);
FOREACHPAM_START(this)
if( PCURCRSR->HasMark() && ( bIsTblMode ||
@@ -158,7 +164,7 @@ void SwEditShell::SetAttr( const SfxItemSet& rSet, USHORT nFlags )
}
FOREACHPAM_END()
- GetDoc()->EndUndo(UNDO_INSATTR, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_INSATTR, NULL);
}
else
{
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 7d712567fd4d..e55b8c3f05ed 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -65,19 +65,19 @@
// wenn Selektion groesser Max Nodes oder mehr als Max Selektionen
// => keine Attribute
-const USHORT& getMaxLookup()
+const sal_uInt16& getMaxLookup()
{
- static const USHORT nMaxLookup = 1000;
+ static const sal_uInt16 nMaxLookup = 1000;
return nMaxLookup;
}
-BOOL SwEditShell::GetCurAttr( SfxItemSet& rSet,
+sal_Bool SwEditShell::GetCurAttr( SfxItemSet& rSet,
const bool bMergeIndentValuesOfNumRule ) const
{
if( GetCrsrCnt() > getMaxLookup() )
{
rSet.InvalidateAllItems();
- return FALSE;
+ return sal_False;
}
SfxItemSet aSet( *rSet.GetPool(), rSet.GetRanges() );
@@ -99,7 +99,7 @@ BOOL SwEditShell::GetCurAttr( SfxItemSet& rSet,
if (pNumRule)
{
const String & aCharFmtName =
- pNumRule->Get(static_cast<USHORT>(pTxtNd->GetActualListLevel())).GetCharFmtName();
+ pNumRule->Get(static_cast<sal_uInt16>(pTxtNd->GetActualListLevel())).GetCharFmtName();
SwCharFmt * pCharFmt =
GetDoc()->FindCharFmtByName(aCharFmtName);
@@ -111,14 +111,14 @@ BOOL SwEditShell::GetCurAttr( SfxItemSet& rSet,
continue;
}
- ULONG nSttNd = PCURCRSR->GetMark()->nNode.GetIndex(),
+ sal_uLong nSttNd = PCURCRSR->GetMark()->nNode.GetIndex(),
nEndNd = PCURCRSR->GetPoint()->nNode.GetIndex();
xub_StrLen nSttCnt = PCURCRSR->GetMark()->nContent.GetIndex(),
nEndCnt = PCURCRSR->GetPoint()->nContent.GetIndex();
if( nSttNd > nEndNd || ( nSttNd == nEndNd && nSttCnt > nEndCnt ))
{
- ULONG nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
+ sal_uLong nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
nTmp = nSttCnt; nSttCnt = nEndCnt; nEndCnt = (xub_StrLen)nTmp;
}
@@ -126,12 +126,12 @@ BOOL SwEditShell::GetCurAttr( SfxItemSet& rSet,
{
rSet.ClearItem();
rSet.InvalidateAllItems();
- return FALSE;
+ return sal_False;
}
// beim 1.Node traegt der Node die Werte in den GetSet ein (Initial)
// alle weiteren Nodes werden zum GetSet zu gemergt
- for( ULONG n = nSttNd; n <= nEndNd; ++n )
+ for( sal_uLong n = nSttNd; n <= nEndNd; ++n )
{
SwNode* pNd = GetDoc()->GetNodes()[ n ];
switch( pNd->GetNodeType() )
@@ -143,7 +143,7 @@ BOOL SwEditShell::GetCurAttr( SfxItemSet& rSet,
: ((SwTxtNode*)pNd)->GetTxt().Len();
((SwTxtNode*)pNd)->GetAttr( *pSet, nStt, nEnd,
- FALSE, TRUE,
+ sal_False, sal_True,
bMergeIndentValuesOfNumRule );
}
break;
@@ -169,7 +169,7 @@ BOOL SwEditShell::GetCurAttr( SfxItemSet& rSet,
FOREACHPAM_END()
- return TRUE;
+ return sal_True;
}
SwTxtFmtColl* SwEditShell::GetCurTxtFmtColl() const
@@ -181,14 +181,14 @@ SwTxtFmtColl* SwEditShell::GetCurTxtFmtColl() const
FOREACHPAM_START(this)
- ULONG nSttNd = PCURCRSR->GetMark()->nNode.GetIndex(),
+ sal_uLong nSttNd = PCURCRSR->GetMark()->nNode.GetIndex(),
nEndNd = PCURCRSR->GetPoint()->nNode.GetIndex();
xub_StrLen nSttCnt = PCURCRSR->GetMark()->nContent.GetIndex(),
nEndCnt = PCURCRSR->GetPoint()->nContent.GetIndex();
if( nSttNd > nEndNd || ( nSttNd == nEndNd && nSttCnt > nEndCnt ))
{
- ULONG nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
+ sal_uLong nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
nTmp = nSttCnt; nSttCnt = nEndCnt; nEndCnt = (xub_StrLen)nTmp;
}
@@ -198,7 +198,7 @@ SwTxtFmtColl* SwEditShell::GetCurTxtFmtColl() const
break;
}
- for( ULONG n = nSttNd; n <= nEndNd; ++n )
+ for( sal_uLong n = nSttNd; n <= nEndNd; ++n )
{
SwNode* pNd = GetDoc()->GetNodes()[ n ];
if( pNd->IsTxtNode() )
@@ -216,13 +216,13 @@ SwTxtFmtColl* SwEditShell::GetCurTxtFmtColl() const
-BOOL SwEditShell::GetCurFtn( SwFmtFtn* pFillFtn )
+sal_Bool SwEditShell::GetCurFtn( SwFmtFtn* pFillFtn )
{
// der Cursor muss auf dem akt. Fussnoten-Anker stehen:
SwPaM* pCrsr = GetCrsr();
SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode();
if( !pTxtNd )
- return FALSE;
+ return sal_False;
SwTxtAttr *const pFtn = pTxtNd->GetTxtAttrForCharAt(
pCrsr->GetPoint()->nContent.GetIndex(), RES_TXTATR_FTN);
@@ -258,23 +258,23 @@ bool SwEditShell::SetCurFtn( const SwFmtFtn& rFillFtn )
bool SwEditShell::HasFtns( bool bEndNotes ) const
{
const SwFtnIdxs &rIdxs = pDoc->GetFtnIdxs();
- for ( USHORT i = 0; i < rIdxs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rIdxs.Count(); ++i )
{
const SwFmtFtn &rFtn = rIdxs[i]->GetFtn();
if ( bEndNotes == rFtn.IsEndNote() )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// gebe Liste aller Fussnoten und deren Anfangstexte
-USHORT SwEditShell::GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes )
+sal_uInt16 SwEditShell::GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes )
{
if( rList.Count() )
rList.Remove( 0, rList.Count() );
- USHORT n, nFtnCnt = pDoc->GetFtnIdxs().Count();
+ sal_uInt16 n, nFtnCnt = pDoc->GetFtnIdxs().Count();
SwTxtFtn* pTxtFtn;
for( n = 0; n < nFtnCnt; ++n )
{
@@ -312,28 +312,28 @@ USHORT SwEditShell::GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes )
// linken Rand ueber Objectleiste einstellen (aenhlich dem Stufen von
// Numerierungen)
-BOOL SwEditShell::IsMoveLeftMargin( BOOL bRight, BOOL bModulus ) const
+sal_Bool SwEditShell::IsMoveLeftMargin( sal_Bool bRight, sal_Bool bModulus ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
const SvxTabStopItem& rTabItem = (SvxTabStopItem&)GetDoc()->
GetDefault( RES_PARATR_TABSTOP );
- USHORT nDefDist = static_cast<USHORT>(rTabItem.Count() ? rTabItem[0].GetTabPos() : 1134);
+ sal_uInt16 nDefDist = static_cast<sal_uInt16>(rTabItem.Count() ? rTabItem[0].GetTabPos() : 1134);
if( !nDefDist )
- return FALSE;
+ return sal_False;
FOREACHPAM_START(this)
- ULONG nSttNd = PCURCRSR->GetMark()->nNode.GetIndex(),
+ sal_uLong nSttNd = PCURCRSR->GetMark()->nNode.GetIndex(),
nEndNd = PCURCRSR->GetPoint()->nNode.GetIndex();
if( nSttNd > nEndNd )
{
- ULONG nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
+ sal_uLong nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
}
SwCntntNode* pCNd;
- for( ULONG n = nSttNd; bRet && n <= nEndNd; ++n )
+ for( sal_uLong n = nSttNd; bRet && n <= nEndNd; ++n )
if( 0 != ( pCNd = GetDoc()->GetNodes()[ n ]->GetTxtNode() ))
{
const SvxLRSpaceItem& rLS = (SvxLRSpaceItem&)
@@ -346,13 +346,13 @@ BOOL SwEditShell::IsMoveLeftMargin( BOOL bRight, BOOL bModulus ) const
SwFrm* pFrm = pCNd->GetFrm();
if ( pFrm )
{
- const USHORT nFrmWidth = static_cast<USHORT>( pFrm->IsVertical() ?
+ const sal_uInt16 nFrmWidth = static_cast<sal_uInt16>( pFrm->IsVertical() ?
pFrm->Frm().Height() :
pFrm->Frm().Width() );
bRet = nFrmWidth > ( nNext + MM50 );
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
}
@@ -363,7 +363,7 @@ BOOL SwEditShell::IsMoveLeftMargin( BOOL bRight, BOOL bModulus ) const
return bRet;
}
-void SwEditShell::MoveLeftMargin( BOOL bRight, BOOL bModulus )
+void SwEditShell::MoveLeftMargin( sal_Bool bRight, sal_Bool bModulus )
{
StartAllAction();
StartUndo( UNDO_START );
@@ -373,7 +373,7 @@ void SwEditShell::MoveLeftMargin( BOOL bRight, BOOL bModulus )
{
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
GetDoc()->MoveLeftMargin( aRangeArr.SetPam( n, aPam ),
bRight, bModulus );
}
@@ -385,9 +385,9 @@ void SwEditShell::MoveLeftMargin( BOOL bRight, BOOL bModulus )
}
-inline USHORT lcl_SetScriptFlags( USHORT nType )
+inline sal_uInt16 lcl_SetScriptFlags( sal_uInt16 nType )
{
- USHORT nRet;
+ sal_uInt16 nRet;
switch( nType )
{
case ::com::sun::star::i18n::ScriptType::LATIN: nRet = SCRIPTTYPE_LATIN; break;
@@ -398,24 +398,24 @@ inline USHORT lcl_SetScriptFlags( USHORT nType )
return nRet;
}
-BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
- USHORT &rScrpt, BOOL bInSelection, BOOL bNum )
+sal_Bool lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
+ sal_uInt16 &rScrpt, sal_Bool bInSelection, sal_Bool bNum )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const String& rTxt = rTNd.GetTxt();
String sExp;
// consider numbering
if ( bNum )
{
- bRet = FALSE;
+ bRet = sal_False;
if ( rTNd.IsInList() )
{
OSL_ENSURE( rTNd.GetNumRule(),
"<lcl_IsNoEndTxtAttrAtPos(..)> - no list style found at text node. Serious defect -> please inform OD." );
const SwNumRule* pNumRule = rTNd.GetNumRule();
- const SwNumFmt &rNumFmt = pNumRule->Get( static_cast<USHORT>(rTNd.GetActualListLevel()) );
+ const SwNumFmt &rNumFmt = pNumRule->Get( static_cast<sal_uInt16>(rTNd.GetActualListLevel()) );
if( SVX_NUM_BITMAP != rNumFmt.GetNumberingType() )
{
if ( SVX_NUM_CHAR_SPECIAL == rNumFmt.GetNumberingType() )
@@ -432,14 +432,14 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
const SwTxtAttr* const pAttr = rTNd.GetTxtAttrForCharAt( nPos );
if (pAttr)
{
- bRet = TRUE; // all other than fields can be
+ bRet = sal_True; // all other than fields can be
// defined as weak-script ?
if ( RES_TXTATR_FIELD == pAttr->Which() )
{
const SwField* const pFld = pAttr->GetFld().GetFld();
if (pFld)
{
- sExp += pFld->ExpandField(rTNd.GetDoc()->IsClipBoard());
+ sExp += pFld->ExpandField(true);
}
}
}
@@ -451,7 +451,7 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
xub_StrLen n;
if( bInSelection )
{
- USHORT nScript;
+ sal_uInt16 nScript;
for( n = 0; n < nEnd; n = (xub_StrLen)
pBreakIt->GetBreakIter()->endOfScript( sExp, n, nScript ))
{
@@ -469,9 +469,9 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
// returns the scripttpye of the selection
-USHORT SwEditShell::GetScriptType() const
+sal_uInt16 SwEditShell::GetScriptType() const
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
{
FOREACHPAM_START(this)
@@ -498,7 +498,7 @@ USHORT SwEditShell::GetScriptType() const
nPos = aIdx.GetIndex();
}
- USHORT nScript;
+ sal_uInt16 nScript;
if ( pTNd->GetTxt().Len() )
{
@@ -507,15 +507,15 @@ USHORT SwEditShell::GetScriptType() const
pBreakIt->GetBreakIter()->getScriptType( pTNd->GetTxt(), nPos );
}
else
- nScript = GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() );
+ nScript = GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
- if( !lcl_IsNoEndTxtAttrAtPos( *pTNd, nPos, nRet, FALSE, FALSE ))
+ if( !lcl_IsNoEndTxtAttrAtPos( *pTNd, nPos, nRet, sal_False, sal_False ))
nRet |= lcl_SetScriptFlags( nScript );
}
}
else if ( pBreakIt->GetBreakIter().is() )
{
- ULONG nEndIdx = pEnd->nNode.GetIndex();
+ sal_uLong nEndIdx = pEnd->nNode.GetIndex();
SwNodeIndex aIdx( pStt->nNode );
for( ; aIdx.GetIndex() <= nEndIdx; aIdx++ )
if( aIdx.GetNode().IsTxtNode() )
@@ -537,7 +537,7 @@ USHORT SwEditShell::GetScriptType() const
if( nEndPos > rTxt.Len() )
nEndPos = rTxt.Len();
- USHORT nScript;
+ sal_uInt16 nScript;
while( nChg < nEndPos )
{
nScript = pScriptInfo ?
@@ -545,7 +545,7 @@ USHORT SwEditShell::GetScriptType() const
pBreakIt->GetBreakIter()->getScriptType(
rTxt, nChg );
- if( !lcl_IsNoEndTxtAttrAtPos( *pTNd, nChg, nRet, TRUE,
+ if( !lcl_IsNoEndTxtAttrAtPos( *pTNd, nChg, nRet, sal_True,
0 == nChg && rTxt.Len() == nEndPos ) )
nRet |= lcl_SetScriptFlags( nScript );
@@ -582,12 +582,12 @@ USHORT SwEditShell::GetScriptType() const
}
-USHORT SwEditShell::GetCurLang() const
+sal_uInt16 SwEditShell::GetCurLang() const
{
const SwPaM* pCrsr = GetCrsr();
const SwPosition& rPos = *pCrsr->GetPoint();
const SwTxtNode* pTNd = rPos.nNode.GetNode().GetTxtNode();
- USHORT nLang;
+ sal_uInt16 nLang;
if( pTNd )
{
//JP 24.9.2001: if exist no selection, then get the language before
@@ -602,14 +602,14 @@ USHORT SwEditShell::GetCurLang() const
return nLang;
}
-USHORT SwEditShell::GetScalingOfSelectedText() const
+sal_uInt16 SwEditShell::GetScalingOfSelectedText() const
{
const SwPaM* pCrsr = GetCrsr();
const SwPosition* pStt = pCrsr->Start();
const SwTxtNode* pTNd = pStt->nNode.GetNode().GetTxtNode();
OSL_ENSURE( pTNd, "no textnode available" );
- USHORT nScaleWidth;
+ sal_uInt16 nScaleWidth;
if( pTNd )
{
xub_StrLen nStt = pStt->nContent.GetIndex(), nEnd;
diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx
index f1d24f6c4511..e6b111dd38f1 100644
--- a/sw/source/core/edit/eddel.cxx
+++ b/sw/source/core/edit/eddel.cxx
@@ -32,6 +32,7 @@
#include <hintids.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <editsh.hxx>
#include <cntfrm.hxx>
#include <pam.hxx>
@@ -40,7 +41,6 @@
#include <IMark.hxx>
#include <docary.hxx>
#include <SwRewriter.hxx>
-#include <undobj.hxx>
#include <globals.hrc>
#include <comcore.hrc>
@@ -50,7 +50,7 @@
* Loeschen
************************************************************/
-void SwEditShell::DeleteSel( SwPaM& rPam, BOOL* pUndo )
+void SwEditShell::DeleteSel( SwPaM& rPam, sal_Bool* pUndo )
{
// nur bei Selektion
if( !rPam.HasMark() || *rPam.GetPoint() == *rPam.GetMark())
@@ -64,13 +64,13 @@ void SwEditShell::DeleteSel( SwPaM& rPam, BOOL* pUndo )
// selektierten Boxen suchen in den Inhalt loeschen
if( rPam.GetNode()->FindTableNode() &&
rPam.GetNode()->StartOfSectionNode() !=
- rPam.GetNode(FALSE)->StartOfSectionNode() )
+ rPam.GetNode(sal_False)->StartOfSectionNode() )
{
// in Tabellen das Undo gruppieren
if( pUndo && !*pUndo )
{
- GetDoc()->StartUndo( UNDO_START, NULL );
- *pUndo = TRUE;
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ *pUndo = sal_True;
}
SwPaM aDelPam( *rPam.Start() );
const SwPosition* pEndSelPos = rPam.End();
@@ -124,13 +124,13 @@ long SwEditShell::Delete()
{
StartAllAction();
- BOOL bUndo = GetCrsr()->GetNext() != GetCrsr();
+ sal_Bool bUndo = GetCrsr()->GetNext() != GetCrsr();
if( bUndo ) // mehr als eine Selection ?
{
SwRewriter aRewriter;
aRewriter.AddRule(UNDO_ARG1, String(SW_RES(STR_MULTISEL)));
- GetDoc()->StartUndo( UNDO_DELETE, &aRewriter );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_DELETE, &aRewriter);
}
FOREACHPAM_START(this)
@@ -139,7 +139,9 @@ long SwEditShell::Delete()
// falls eine Undo-Klammerung, dann hier beenden
if( bUndo )
- GetDoc()->EndUndo( UNDO_DELETE, NULL );
+ {
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_END, 0);
+ }
EndAllAction();
nRet = 1;
}
@@ -160,7 +162,7 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
{
SwPosition * pPos = 0;
boost::shared_ptr<SwPosition> pInsertPos;
- USHORT nMove = 0;
+ sal_uInt16 nMove = 0;
FOREACHPAM_START(this)
if( !pPos )
@@ -181,7 +183,7 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
if( nMove )
{
SwCursor aCrsr( *pPos, 0, false);
- if( aCrsr.UpDown( FALSE, nMove, 0, 0 ) )
+ if( aCrsr.UpDown( sal_False, nMove, 0, 0 ) )
{
pInsertPos.reset( new SwPosition( *aCrsr.GetPoint() ) );
aInsertList.push_back( pInsertPos );
@@ -195,20 +197,20 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
// Check if a selection would be copied into itself
if( pDestShell->GetDoc() == GetDoc() &&
*PCURCRSR->Start() <= *pTmp && *pTmp < *PCURCRSR->End() )
- return FALSE;
+ return sal_False;
FOREACHPAM_END()
}
pDestShell->StartAllAction();
SwPosition *pPos = 0;
- BOOL bRet = FALSE;
- BOOL bFirstMove = TRUE;
+ sal_Bool bRet = sal_False;
+ sal_Bool bFirstMove = sal_True;
SwNodeIndex aSttNdIdx( pDestShell->GetDoc()->GetNodes() );
xub_StrLen nSttCntIdx = 0;
// For block selection this list is filled with the insert positions
std::list< boost::shared_ptr<SwPosition> >::iterator pNextInsert = aInsertList.begin();
- pDestShell->GetDoc()->StartUndo( UNDO_START, NULL );
+ pDestShell->GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
FOREACHPAM_START(this)
if( !pPos )
@@ -244,7 +246,7 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
// Anfangs-Position vom neuen Bereich merken
aSttNdIdx = pPos->nNode.GetIndex()-1;
nSttCntIdx = pPos->nContent.GetIndex();
- bFirstMove = FALSE;
+ bFirstMove = sal_False;
}
const bool bSuccess( GetDoc()->CopyRange( *PCURCRSR, *pPos, false ) );
@@ -254,7 +256,7 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
SwPaM aInsertPaM(*pPos, SwPosition(aSttNdIdx));
pDestShell->GetDoc()->MakeUniqueNumRules(aInsertPaM);
- bRet = TRUE;
+ bRet = sal_True;
FOREACHPAM_END()
@@ -282,15 +284,15 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
OSL_ENSURE( pCmp->GetPoint()->nContent.GetIdxReg()
== pCmp->GetCntntNode(), "Point im falschen Node" );
OSL_ENSURE( pCmp->GetMark()->nContent.GetIdxReg()
- == pCmp->GetCntntNode(FALSE), "Mark im falschen Node" );
- BOOL bTst = *pCmp->GetPoint() == *pCmp->GetMark();
+ == pCmp->GetCntntNode(sal_False), "Mark im falschen Node" );
+ sal_Bool bTst = *pCmp->GetPoint() == *pCmp->GetMark();
(void) bTst;
} while( pDestShell->GetCrsr() != ( pCmp = (SwPaM*)pCmp->GetNext() ) );
}
#endif
// Undo-Klammerung hier beenden
- pDestShell->GetDoc()->EndUndo( UNDO_END, NULL );
+ pDestShell->GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
pDestShell->EndAllAction();
pDestShell->SaveTblBoxCntnt( pDestShell->GetCrsr()->GetPoint() );
@@ -305,15 +307,15 @@ long SwEditShell::Copy( SwEditShell* pDestShell )
// ein ( nicht \& )
// z.B.: Fnd: "zzz", Repl: "xx\t\\t..&..\&"
// --> "xx\t<Tab>..zzz..&"
-BOOL SwEditShell::Replace( const String& rNewStr, BOOL bRegExpRplc )
+sal_Bool SwEditShell::Replace( const String& rNewStr, sal_Bool bRegExpRplc )
{
SET_CURR_SHELL( this );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !HasReadonlySel() )
{
StartAllAction();
- GetDoc()->StartUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
FOREACHPAM_START(this)
if( PCURCRSR->HasMark() && *PCURCRSR->GetMark() != *PCURCRSR->GetPoint() )
@@ -325,7 +327,7 @@ BOOL SwEditShell::Replace( const String& rNewStr, BOOL bRegExpRplc )
FOREACHPAM_END()
// Undo-Klammerung hier beenden
- GetDoc()->EndUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
EndAllAction();
}
return bRet;
@@ -333,9 +335,9 @@ BOOL SwEditShell::Replace( const String& rNewStr, BOOL bRegExpRplc )
// Special-Methode fuer JOE's- Wizzards
-BOOL SwEditShell::DelFullPara()
+sal_Bool SwEditShell::DelFullPara()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !IsTableMode() )
{
SwPaM* pCrsr = GetCrsr();
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 8741f3d0d513..cf2af7012047 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -34,13 +34,14 @@
#include <editeng/brkitem.hxx>
#include <editsh.hxx>
#include <doc.hxx> // fuer SwTxtFmtColls
+#include <IDocumentUndoRedo.hxx>
#include <edimp.hxx> // fuer MACROS
#include <ndtxt.hxx>
#include <paratr.hxx>
#include <fmtpdsc.hxx>
#include <viewopt.hxx> // Formular view
#include <SwRewriter.hxx>
-#include <undobj.hxx>
+#include <numrule.hxx>
#include <swundo.hxx>
/*************************************
@@ -55,13 +56,13 @@ SwTxtFmtColl& SwEditShell::GetDfltTxtFmtColl() const
}
-USHORT SwEditShell::GetTxtFmtCollCount() const
+sal_uInt16 SwEditShell::GetTxtFmtCollCount() const
{
return GetDoc()->GetTxtFmtColls()->Count();
}
-SwTxtFmtColl& SwEditShell::GetTxtFmtColl( USHORT nFmtColl) const
+SwTxtFmtColl& SwEditShell::GetTxtFmtColl( sal_uInt16 nFmtColl) const
{
return *((*(GetDoc()->GetTxtFmtColls()))[nFmtColl]);
}
@@ -76,7 +77,7 @@ void SwEditShell::SetTxtFmtColl( SwTxtFmtColl *pFmt,
SwRewriter aRewriter;
aRewriter.AddRule(UNDO_ARG1, pLocal->GetName());
- GetDoc()->StartUndo(UNDO_SETFMTCOLL, &aRewriter);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_SETFMTCOLL, &aRewriter);
FOREACHPAM_START(this)
if( !PCURCRSR->HasReadonlySel(
@@ -85,7 +86,7 @@ void SwEditShell::SetTxtFmtColl( SwTxtFmtColl *pFmt,
GetDoc()->SetTxtFmtColl( *PCURCRSR, pLocal, true, bResetListAttrs );
FOREACHPAM_END()
- GetDoc()->EndUndo(UNDO_SETFMTCOLL, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_SETFMTCOLL, &aRewriter);
EndAllAction();
}
// <--
@@ -99,14 +100,14 @@ SwTxtFmtColl* SwEditShell::MakeTxtFmtColl(const String& rFmtCollName,
pParent = &GetTxtFmtColl(0);
if ( (pColl=GetDoc()->MakeTxtFmtColl(rFmtCollName, pParent)) == 0 )
{
- OSL_ENSURE( FALSE, "MakeTxtFmtColl failed" );
+ OSL_ENSURE( sal_False, "MakeTxtFmtColl failed" );
}
return pColl;
}
-void SwEditShell::FillByEx(SwTxtFmtColl* pColl, BOOL bReset)
+void SwEditShell::FillByEx(SwTxtFmtColl* pColl, sal_Bool bReset)
{
if( bReset )
{
@@ -128,10 +129,10 @@ void SwEditShell::FillByEx(SwTxtFmtColl* pColl, BOOL bReset)
// AutoNumRules NICHT in die Vorlagen uebernehmen
const SfxPoolItem* pItem;
const SwNumRule* pRule = 0;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, FALSE ) ||
- SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC,FALSE ) ||
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False ) ||
+ SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC,sal_False ) ||
( SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_NUMRULE,
- FALSE, &pItem ) && 0 != (pRule = GetDoc()->FindNumRulePtr(
+ sal_False, &pItem ) && 0 != (pRule = GetDoc()->FindNumRulePtr(
((SwNumRuleItem*)pItem)->GetValue() )) &&
pRule && pRule->IsAutoRule() )
)
@@ -141,7 +142,7 @@ void SwEditShell::FillByEx(SwTxtFmtColl* pColl, BOOL bReset)
aSet.ClearItem( RES_PAGEDESC );
if( pRule || (SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_NUMRULE,
- FALSE, &pItem ) && 0 != (pRule = GetDoc()->FindNumRulePtr(
+ sal_False, &pItem ) && 0 != (pRule = GetDoc()->FindNumRulePtr(
((SwNumRuleItem*)pItem)->GetValue() )) &&
pRule && pRule->IsAutoRule() ))
aSet.ClearItem( RES_PARATR_NUMRULE );
diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx
index 7ba0ca933d6f..8e20335fe89f 100644
--- a/sw/source/core/edit/edfld.cxx
+++ b/sw/source/core/edit/edfld.cxx
@@ -53,10 +53,10 @@
wenn 0 alle zaehlen
--------------------------------------------------------------------*/
-USHORT SwEditShell::GetFldTypeCount(USHORT nResId, BOOL bUsed ) const
+sal_uInt16 SwEditShell::GetFldTypeCount(sal_uInt16 nResId, sal_Bool bUsed ) const
{
const SwFldTypes* pFldTypes = GetDoc()->GetFldTypes();
- const USHORT nSize = pFldTypes->Count();
+ const sal_uInt16 nSize = pFldTypes->Count();
if(nResId == USHRT_MAX)
{
@@ -64,8 +64,8 @@ USHORT SwEditShell::GetFldTypeCount(USHORT nResId, BOOL bUsed ) const
return nSize;
else
{
- USHORT nUsed = 0;
- for ( USHORT i = 0; i < nSize; i++ )
+ sal_uInt16 nUsed = 0;
+ for ( sal_uInt16 i = 0; i < nSize; i++ )
{
if(IsUsed(*(*pFldTypes)[i]))
nUsed++;
@@ -75,8 +75,8 @@ USHORT SwEditShell::GetFldTypeCount(USHORT nResId, BOOL bUsed ) const
}
// Alle Typen mit gleicher ResId
- USHORT nIdx = 0;
- for(USHORT i = 0; i < nSize; ++i)
+ sal_uInt16 nIdx = 0;
+ for(sal_uInt16 i = 0; i < nSize; ++i)
{ // Gleiche ResId -> Index erhoehen
SwFieldType& rFldType = *((*pFldTypes)[i]);
if(rFldType.Which() == nResId)
@@ -89,10 +89,10 @@ USHORT SwEditShell::GetFldTypeCount(USHORT nResId, BOOL bUsed ) const
Beschreibung: Feldtypen zu einer ResId finden
wenn 0 alle finden
--------------------------------------------------------------------*/
-SwFieldType* SwEditShell::GetFldType(USHORT nFld, USHORT nResId, BOOL bUsed ) const
+SwFieldType* SwEditShell::GetFldType(sal_uInt16 nFld, sal_uInt16 nResId, sal_Bool bUsed ) const
{
const SwFldTypes* pFldTypes = GetDoc()->GetFldTypes();
- const USHORT nSize = pFldTypes->Count();
+ const sal_uInt16 nSize = pFldTypes->Count();
if(nResId == USHRT_MAX && nFld < nSize)
{
@@ -100,7 +100,7 @@ SwFieldType* SwEditShell::GetFldType(USHORT nFld, USHORT nResId, BOOL bUsed ) co
return (*pFldTypes)[nFld];
else
{
- USHORT i, nUsed = 0;
+ sal_uInt16 i, nUsed = 0;
for ( i = 0; i < nSize; i++ )
{
if(IsUsed(*(*pFldTypes)[i]))
@@ -114,8 +114,8 @@ SwFieldType* SwEditShell::GetFldType(USHORT nFld, USHORT nResId, BOOL bUsed ) co
}
}
- USHORT nIdx = 0;
- for(USHORT i = 0; i < nSize; ++i)
+ sal_uInt16 nIdx = 0;
+ for(sal_uInt16 i = 0; i < nSize; ++i)
{ // Gleiche ResId -> Index erhoehen
SwFieldType* pFldType = (*pFldTypes)[i];
if(pFldType->Which() == nResId)
@@ -134,7 +134,7 @@ SwFieldType* SwEditShell::GetFldType(USHORT nFld, USHORT nResId, BOOL bUsed ) co
/*--------------------------------------------------------------------
Beschreibung: Den ersten Typen mit ResId und Namen finden
--------------------------------------------------------------------*/
-SwFieldType* SwEditShell::GetFldType(USHORT nResId, const String& rName) const
+SwFieldType* SwEditShell::GetFldType(sal_uInt16 nResId, const String& rName) const
{
return GetDoc()->GetFldType( nResId, rName, false );
}
@@ -142,7 +142,7 @@ SwFieldType* SwEditShell::GetFldType(USHORT nResId, const String& rName) const
/*--------------------------------------------------------------------
Beschreibung: Feldtypen loeschen
--------------------------------------------------------------------*/
-void SwEditShell::RemoveFldType(USHORT nFld, USHORT nResId)
+void SwEditShell::RemoveFldType(sal_uInt16 nFld, sal_uInt16 nResId)
{
if( USHRT_MAX == nResId )
{
@@ -151,9 +151,9 @@ void SwEditShell::RemoveFldType(USHORT nFld, USHORT nResId)
}
const SwFldTypes* pFldTypes = GetDoc()->GetFldTypes();
- const USHORT nSize = pFldTypes->Count();
- USHORT nIdx = 0;
- for( USHORT i = 0; i < nSize; ++i )
+ const sal_uInt16 nSize = pFldTypes->Count();
+ sal_uInt16 nIdx = 0;
+ for( sal_uInt16 i = 0; i < nSize; ++i )
// Gleiche ResId -> Index erhoehen
if( (*pFldTypes)[i]->Which() == nResId &&
nIdx++ == nFld )
@@ -166,15 +166,15 @@ void SwEditShell::RemoveFldType(USHORT nFld, USHORT nResId)
/*--------------------------------------------------------------------
Beschreibung: FieldType ueber Name loeschen
--------------------------------------------------------------------*/
-void SwEditShell::RemoveFldType(USHORT nResId, const String& rStr)
+void SwEditShell::RemoveFldType(sal_uInt16 nResId, const String& rStr)
{
const SwFldTypes* pFldTypes = GetDoc()->GetFldTypes();
- const USHORT nSize = pFldTypes->Count();
+ const sal_uInt16 nSize = pFldTypes->Count();
const CharClass& rCC = GetAppCharClass();
String aTmp( rCC.lower( rStr ));
- for(USHORT i = 0; i < nSize; ++i)
+ for(sal_uInt16 i = 0; i < nSize; ++i)
{
// Gleiche ResId -> Index erhoehen
SwFieldType* pFldType = (*pFldTypes)[i];
@@ -201,7 +201,7 @@ void SwEditShell::FieldToText( SwFieldType* pType )
Push();
SwPaM* pPaM = GetCrsr();
- BOOL bDDEFld = RES_DDEFLD == pType->Which();
+ sal_Bool bDDEFld = RES_DDEFLD == pType->Which();
// Modify-Object gefunden, trage alle Felder ins Array ein
SwClientIter aIter( *pType );
SwClient * pLast = aIter.GoStart();
@@ -225,8 +225,7 @@ void SwEditShell::FieldToText( SwFieldType* pType )
*pFmtFld->GetTxtFld()->GetStart() );
// Feldinhalt durch Text ersetzen
- String const aEntry(
- pFmtFld->GetFld()->ExpandField(GetDoc()->IsClipBoard()) );
+ String const aEntry( pFmtFld->GetFld()->ExpandField(true) );
pPaM->SetMark();
pPaM->Move( fnMoveForward );
GetDoc()->DeleteRange( *pPaM );
@@ -242,7 +241,7 @@ void SwEditShell::FieldToText( SwFieldType* pType )
} while( 0 != ( pLast = aIter++ ));
- Pop( FALSE );
+ Pop( sal_False );
EndAllAction();
EndUndo( UNDO_DELETE );
}
@@ -342,11 +341,11 @@ SwTxtFld* lcl_FindInputFld( SwDoc* pDoc, SwField& rFld )
((SwSetExpField&)rFld).GetInputFlag() ) )
{
const SfxPoolItem* pItem;
- USHORT n, nMaxItems =
- pDoc->GetAttrPool().GetItemCount( RES_TXTATR_FIELD );
+ sal_uInt32 n, nMaxItems =
+ pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_FIELD );
for( n = 0; n < nMaxItems; ++n )
if( 0 != (pItem =
- pDoc->GetAttrPool().GetItem( RES_TXTATR_FIELD, n ) )
+ pDoc->GetAttrPool().GetItem2( RES_TXTATR_FIELD, n ) )
&& ((SwFmtFld*)pItem)->GetFld() == &rFld )
{
pTFld = ((SwFmtFld*)pItem)->GetTxtFld();
@@ -367,7 +366,7 @@ void SwEditShell::UpdateFlds( SwField &rFld )
// Cursor-Position.
SwMsgPoolItem* pMsgHnt = 0;
SwRefMarkFldUpdate aRefMkHt( GetOut() );
- USHORT nFldWhich = rFld.GetTyp()->Which();
+ sal_uInt16 nFldWhich = rFld.GetTyp()->Which();
if( RES_GETREFFLD == nFldWhich )
pMsgHnt = &aRefMkHt;
@@ -383,14 +382,14 @@ void SwEditShell::UpdateFlds( SwField &rFld )
pTxtFld = lcl_FindInputFld( GetDoc(), rFld);
if (pTxtFld != 0)
- GetDoc()->UpdateFld(pTxtFld, rFld, pMsgHnt, TRUE);
+ GetDoc()->UpdateFld(pTxtFld, rFld, pMsgHnt, sal_True);
}
- // bOkay (statt return wg. EndAllAction) wird FALSE,
+ // bOkay (statt return wg. EndAllAction) wird sal_False,
// 1) wenn nur ein Pam mehr als ein Feld enthaelt oder
// 2) bei gemischten Feldtypen
- BOOL bOkay = TRUE;
- BOOL bTblSelBreak = FALSE;
+ sal_Bool bOkay = sal_True;
+ sal_Bool bTblSelBreak = sal_False;
SwMsgPoolItem aHint( RES_TXTATR_FIELD ); // Such-Hint
FOREACHPAM_START(this) // fuer jeden PaM
@@ -413,11 +412,11 @@ void SwEditShell::UpdateFlds( SwField &rFld )
// Suche nach SwTxtFld ...
while( bOkay
&& pCurStt->nContent != pCurEnd->nContent
- && aPam.Find( aHint, FALSE, fnMoveForward, &aCurPam ) )
+ && aPam.Find( aHint, sal_False, fnMoveForward, &aCurPam ) )
{
// wenn nur ein Pam mehr als ein Feld enthaelt ...
if( aPam.Start()->nContent != pCurStt->nContent )
- bOkay = FALSE;
+ bOkay = sal_False;
if( 0 != (pTxtFld = GetDocTxtFld( pCurStt )) )
{
@@ -427,10 +426,10 @@ void SwEditShell::UpdateFlds( SwField &rFld )
// bei gemischten Feldtypen
if( pCurFld->GetTyp()->Which() !=
rFld.GetTyp()->Which() )
- bOkay = FALSE;
+ bOkay = sal_False;
bTblSelBreak = GetDoc()->UpdateFld(pTxtFld, rFld,
- pMsgHnt, FALSE);
+ pMsgHnt, sal_False);
}
// Der Suchbereich wird um den gefundenen Bereich
// verkuerzt.
@@ -481,7 +480,7 @@ void SwEditShell::ChangeDBFields( const SvStringsDtor& rOldNames,
/*--------------------------------------------------------------------
Beschreibung: Alle Expression-Felder erneuern
--------------------------------------------------------------------*/
-void SwEditShell::UpdateExpFlds(BOOL bCloseDB)
+void SwEditShell::UpdateExpFlds(sal_Bool bCloseDB)
{
SET_CURR_SHELL( this );
StartAllAction();
@@ -520,30 +519,30 @@ void SwEditShell::SetFldUpdateFlags( SwFldUpdateFlags eFlags )
getIDocumentSettingAccess()->setFieldUpdateFlags( eFlags );
}
-SwFldUpdateFlags SwEditShell::GetFldUpdateFlags(BOOL bDocSettings) const
+SwFldUpdateFlags SwEditShell::GetFldUpdateFlags(sal_Bool bDocSettings) const
{
return getIDocumentSettingAccess()->getFieldUpdateFlags( !bDocSettings );
}
-void SwEditShell::SetFixFields( BOOL bOnlyTimeDate,
+void SwEditShell::SetFixFields( sal_Bool bOnlyTimeDate,
const DateTime* pNewDateTime )
{
SET_CURR_SHELL( this );
- BOOL bUnLockView = !IsViewLocked();
- LockView( TRUE );
+ sal_Bool bUnLockView = !IsViewLocked();
+ LockView( sal_True );
StartAllAction();
GetDoc()->SetFixFields( bOnlyTimeDate, pNewDateTime );
EndAllAction();
if( bUnLockView )
- LockView( FALSE );
+ LockView( sal_False );
}
-void SwEditShell::SetLabelDoc( BOOL bFlag )
+void SwEditShell::SetLabelDoc( sal_Bool bFlag )
{
GetDoc()->set(IDocumentSettingAccess::LABEL_DOCUMENT, bFlag );
}
-BOOL SwEditShell::IsLabelDoc() const
+sal_Bool SwEditShell::IsLabelDoc() const
{
return getIDocumentSettingAccess()->get(IDocumentSettingAccess::LABEL_DOCUMENT);
}
@@ -553,14 +552,14 @@ void SwEditShell::ChangeAuthorityData(const SwAuthEntry* pNewData)
GetDoc()->ChangeAuthorityData(pNewData);
}
-BOOL SwEditShell::IsAnyDatabaseFieldInDoc()const
+sal_Bool SwEditShell::IsAnyDatabaseFieldInDoc()const
{
const SwFldTypes * pFldTypes = GetDoc()->GetFldTypes();
- const USHORT nSize = pFldTypes->Count();
- for(USHORT i = 0; i < nSize; ++i)
+ const sal_uInt16 nSize = pFldTypes->Count();
+ for(sal_uInt16 i = 0; i < nSize; ++i)
{
SwFieldType& rFldType = *((*pFldTypes)[i]);
- USHORT nWhich = rFldType.Which();
+ sal_uInt16 nWhich = rFldType.Which();
if(IsUsed(rFldType))
{
switch(nWhich)
@@ -575,7 +574,7 @@ BOOL SwEditShell::IsAnyDatabaseFieldInDoc()const
while(pFld)
{
if(pFld->IsFldInDoc())
- return TRUE;
+ return sal_True;
pFld = (SwFmtFld*)aIter.Next();
}
}
@@ -583,7 +582,7 @@ BOOL SwEditShell::IsAnyDatabaseFieldInDoc()const
}
}
}
- return FALSE;
+ return sal_False;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/edfldexp.cxx b/sw/source/core/edit/edfldexp.cxx
index 01eb838957c8..a506445ad10f 100644
--- a/sw/source/core/edit/edfldexp.cxx
+++ b/sw/source/core/edit/edfldexp.cxx
@@ -45,21 +45,21 @@
using namespace com::sun::star;
using ::rtl::OUString;
-BOOL SwEditShell::IsFieldDataSourceAvailable(String& rUsedDataSource) const
+sal_Bool SwEditShell::IsFieldDataSourceAvailable(String& rUsedDataSource) const
{
const SwFldTypes * pFldTypes = GetDoc()->GetFldTypes();
- const USHORT nSize = pFldTypes->Count();
+ const sal_uInt16 nSize = pFldTypes->Count();
uno::Reference< lang::XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
if( !xMgr.is() )
- return FALSE;
+ return sal_False;
uno::Reference<uno::XInterface> xInstance = xMgr->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.DatabaseContext")));
uno::Reference<container::XNameAccess> xDBContext(xInstance, uno::UNO_QUERY) ;
if(!xDBContext.is())
- return FALSE;
- for(USHORT i = 0; i < nSize; ++i)
+ return sal_False;
+ for(sal_uInt16 i = 0; i < nSize; ++i)
{
SwFieldType& rFldType = *((*pFldTypes)[i]);
- USHORT nWhich = rFldType.Which();
+ sal_uInt16 nWhich = rFldType.Which();
if(IsUsed(rFldType))
{
switch(nWhich)
@@ -81,7 +81,7 @@ BOOL SwEditShell::IsFieldDataSourceAvailable(String& rUsedDataSource) const
catch(uno::Exception const &)
{
rUsedDataSource = rData.sDataSource;
- return FALSE;
+ return sal_False;
}
}
pFld = (SwFmtFld*)aIter.Next();
@@ -91,7 +91,7 @@ BOOL SwEditShell::IsFieldDataSourceAvailable(String& rUsedDataSource) const
}
}
}
- return TRUE;
+ return sal_True;
}
diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx
index 76b6766242f9..e597cac10d02 100644
--- a/sw/source/core/edit/edfmt.cxx
+++ b/sw/source/core/edit/edfmt.cxx
@@ -49,13 +49,13 @@
// OPT: inline
-USHORT SwEditShell::GetCharFmtCount() const
+sal_uInt16 SwEditShell::GetCharFmtCount() const
{
return GetDoc()->GetCharFmts()->Count();
}
-SwCharFmt& SwEditShell::GetCharFmt(USHORT nFmt) const
+SwCharFmt& SwEditShell::GetCharFmt(sal_uInt16 nFmt) const
{
return *((*(GetDoc()->GetCharFmts()))[nFmt]);
}
@@ -68,14 +68,14 @@ SwCharFmt* SwEditShell::GetCurCharFmt() const
RES_TXTATR_CHARFMT );
const SfxPoolItem* pItem;
if( GetCurAttr( aSet ) && SFX_ITEM_SET ==
- aSet.GetItemState( RES_TXTATR_CHARFMT, FALSE, &pItem ) )
+ aSet.GetItemState( RES_TXTATR_CHARFMT, sal_False, &pItem ) )
pFmt = ((SwFmtCharFmt*)pItem)->GetCharFmt();
return pFmt;
}
-void SwEditShell::FillByEx(SwCharFmt* pCharFmt, BOOL bReset)
+void SwEditShell::FillByEx(SwCharFmt* pCharFmt, sal_Bool bReset)
{
if ( bReset )
{
@@ -129,12 +129,12 @@ void SwEditShell::FillByEx(SwCharFmt* pCharFmt, BOOL bReset)
}
// Frm
-USHORT SwEditShell::GetTblFrmFmtCount(BOOL bUsed) const
+sal_uInt16 SwEditShell::GetTblFrmFmtCount(sal_Bool bUsed) const
{
return GetDoc()->GetTblFrmFmtCount(bUsed);
}
-SwFrmFmt& SwEditShell::GetTblFrmFmt(USHORT nFmt, BOOL bUsed ) const
+SwFrmFmt& SwEditShell::GetTblFrmFmt(sal_uInt16 nFmt, sal_Bool bUsed ) const
{
return GetDoc()->GetTblFrmFmt(nFmt, bUsed );
}
@@ -158,31 +158,31 @@ SwCharFmt* SwEditShell::MakeCharFmt( const String& rName,
// inlines in product
-SwTxtFmtColl* SwEditShell::GetTxtCollFromPool( USHORT nId )
+SwTxtFmtColl* SwEditShell::GetTxtCollFromPool( sal_uInt16 nId )
{
return GetDoc()->GetTxtCollFromPool( nId );
}
// return the demanded automatic format - base-class !
-SwFmt* SwEditShell::GetFmtFromPool( USHORT nId )
+SwFmt* SwEditShell::GetFmtFromPool( sal_uInt16 nId )
{
return GetDoc()->GetFmtFromPool( nId );
}
-SwPageDesc* SwEditShell::GetPageDescFromPool( USHORT nId )
+SwPageDesc* SwEditShell::GetPageDescFromPool( sal_uInt16 nId )
{
return GetDoc()->GetPageDescFromPool( nId );
}
-BOOL SwEditShell::IsUsed( const SwModify& rModify ) const
+sal_Bool SwEditShell::IsUsed( const SwModify& rModify ) const
{
return pDoc->IsUsed( rModify );
}
-const SwFlyFrmFmt* SwEditShell::FindFlyByName( const String& rName, BYTE nNdTyp ) const
+const SwFlyFrmFmt* SwEditShell::FindFlyByName( const String& rName, sal_uInt8 nNdTyp ) const
{
return pDoc->FindFlyByName(rName, nNdTyp);
}
diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx
index 15b1a45f072d..94cc61bc0499 100644
--- a/sw/source/core/edit/edglbldc.cxx
+++ b/sw/source/core/edit/edglbldc.cxx
@@ -29,8 +29,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <editsh.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
@@ -44,25 +44,27 @@
SV_IMPL_OP_PTRARR_SORT( SwGlblDocContents, SwGlblDocContentPtr )
-BOOL SwEditShell::IsGlobalDoc() const
+sal_Bool SwEditShell::IsGlobalDoc() const
{
return getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT);
}
-void SwEditShell::SetGlblDocSaveLinks( BOOL bFlag )
+void SwEditShell::SetGlblDocSaveLinks( sal_Bool bFlag )
{
getIDocumentSettingAccess()->set(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS, bFlag);
if( !GetDoc()->IsModified() ) // Bug 57028
- GetDoc()->SetUndoNoResetModified();
+ {
+ GetDoc()->GetIDocumentUndoRedo().SetUndoNoResetModified();
+ }
GetDoc()->SetModified();
}
-BOOL SwEditShell::IsGlblDocSaveLinks() const
+sal_Bool SwEditShell::IsGlblDocSaveLinks() const
{
return getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS);
}
-USHORT SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
+sal_uInt16 SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
{
if( rArr.Count() )
rArr.DeleteAndDestroy( 0, rArr.Count() );
@@ -73,7 +75,7 @@ USHORT SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
// dann alle gelinkten Bereiche auf der obersten Ebene
SwDoc* pMyDoc = GetDoc();
const SwSectionFmts& rSectFmts = pMyDoc->GetSections();
- USHORT n;
+ sal_uInt16 n;
for( n = rSectFmts.Count(); n; )
{
@@ -100,7 +102,7 @@ USHORT SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
// und als letztes die Dummies (sonstiger Text) einfuegen
SwNode* pNd;
- ULONG nSttIdx = pMyDoc->GetNodes().GetEndOfExtras().GetIndex() + 2;
+ sal_uLong nSttIdx = pMyDoc->GetNodes().GetEndOfExtras().GetIndex() + 2;
for( n = 0; n < rArr.Count(); ++n )
{
const SwGlblDocContent& rNew = *rArr[ n ];
@@ -126,7 +128,7 @@ USHORT SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
// sollte man das Ende auch noch setzen??
if( rArr.Count() )
{
- ULONG nNdEnd = pMyDoc->GetNodes().GetEndOfContent().GetIndex();
+ sal_uLong nNdEnd = pMyDoc->GetNodes().GetEndOfContent().GetIndex();
for( ; nSttIdx < nNdEnd; ++nSttIdx )
if( ( pNd = pMyDoc->GetNodes()[ nSttIdx ])->IsCntntNode()
|| pNd->IsSectionNode() || pNd->IsTableNode() )
@@ -146,11 +148,11 @@ USHORT SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const
return rArr.Count();
}
-BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
+sal_Bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
SwSectionData & rNew)
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
StartAllAction();
@@ -162,15 +164,15 @@ BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
SwPosition& rPos = *pCrsr->GetPoint();
rPos.nNode = rInsPos.GetDocPos();
- BOOL bEndUndo = FALSE;
+ sal_Bool bEndUndo = sal_False;
SwDoc* pMyDoc = GetDoc();
- SwTxtNode* pTxtNd = pMyDoc->GetNodes()[ rPos.nNode ]->GetTxtNode();
+ SwTxtNode *const pTxtNd = rPos.nNode.GetNode().GetTxtNode();
if( pTxtNd )
rPos.nContent.Assign( pTxtNd, 0 );
else
{
- bEndUndo = TRUE;
- pMyDoc->StartUndo( UNDO_START, NULL );
+ bEndUndo = sal_True;
+ pMyDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
rPos.nNode--;
pMyDoc->AppendTxtNode( rPos );
pCrsr->SetMark();
@@ -179,17 +181,19 @@ BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
InsertSection( rNew );
if( bEndUndo )
- pMyDoc->EndUndo( UNDO_END, NULL );
+ {
+ pMyDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ }
EndAllAction();
- return TRUE;
+ return sal_True;
}
-BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
+sal_Bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
const SwTOXBase& rTOX )
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
StartAllAction();
@@ -201,7 +205,7 @@ BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
SwPosition& rPos = *pCrsr->GetPoint();
rPos.nNode = rInsPos.GetDocPos();
- BOOL bEndUndo = FALSE;
+ sal_Bool bEndUndo = sal_False;
SwDoc* pMyDoc = GetDoc();
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
if( pTxtNd && pTxtNd->GetTxt().Len() && rPos.nNode.GetIndex() + 1 !=
@@ -209,8 +213,8 @@ BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
rPos.nContent.Assign( pTxtNd, 0 );
else
{
- bEndUndo = TRUE;
- pMyDoc->StartUndo( UNDO_START, NULL );
+ bEndUndo = sal_True;
+ pMyDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
rPos.nNode--;
pMyDoc->AppendTxtNode( rPos );
}
@@ -218,16 +222,18 @@ BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos,
InsertTableOf( rTOX );
if( bEndUndo )
- pMyDoc->EndUndo( UNDO_END, NULL );
+ {
+ pMyDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
+ }
EndAllAction();
- return TRUE;
+ return sal_True;
}
-BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos )
+sal_Bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos )
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
StartAllAction();
@@ -243,14 +249,14 @@ BOOL SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos )
SwDoc* pMyDoc = GetDoc();
pMyDoc->AppendTxtNode( rPos );
EndAllAction();
- return TRUE;
+ return sal_True;
}
-BOOL SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
- USHORT nDelPos )
+sal_Bool SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
+ sal_uInt16 nDelPos )
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
StartAllAction();
@@ -264,7 +270,7 @@ BOOL SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
SwDoc* pMyDoc = GetDoc();
const SwGlblDocContent& rDelPos = *rArr[ nDelPos ];
- ULONG nDelIdx = rDelPos.GetDocPos();
+ sal_uLong nDelIdx = rDelPos.GetDocPos();
if( 1 == rArr.Count() )
{
// ein Node muss aber da bleiben!
@@ -294,32 +300,32 @@ BOOL SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
case GLBLDOC_TOXBASE:
{
SwTOXBaseSection* pTOX = (SwTOXBaseSection*)rDelPos.GetTOX();
- pMyDoc->DeleteTOX( *pTOX, TRUE );
+ pMyDoc->DeleteTOX( *pTOX, sal_True );
}
break;
case GLBLDOC_SECTION:
{
SwSectionFmt* pSectFmt = (SwSectionFmt*)rDelPos.GetSection()->GetFmt();
- pMyDoc->DelSectionFmt( pSectFmt, TRUE );
+ pMyDoc->DelSectionFmt( pSectFmt, sal_True );
}
break;
}
EndUndo( UNDO_END );
EndAllAction();
- return TRUE;
+ return sal_True;
}
-BOOL SwEditShell::MoveGlobalDocContent( const SwGlblDocContents& rArr ,
- USHORT nFromPos, USHORT nToPos,
- USHORT nInsPos )
+sal_Bool SwEditShell::MoveGlobalDocContent( const SwGlblDocContents& rArr ,
+ sal_uInt16 nFromPos, sal_uInt16 nToPos,
+ sal_uInt16 nInsPos )
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) ||
nFromPos >= rArr.Count() || nToPos > rArr.Count() ||
nInsPos > rArr.Count() || nFromPos >= nToPos ||
( nFromPos <= nInsPos && nInsPos <= nToPos ) )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
StartAllAction();
@@ -350,10 +356,10 @@ BOOL SwEditShell::MoveGlobalDocContent( const SwGlblDocContents& rArr ,
return bRet;
}
-BOOL SwEditShell::GotoGlobalDocContent( const SwGlblDocContent& rPos )
+sal_Bool SwEditShell::GotoGlobalDocContent( const SwGlblDocContent& rPos )
{
if( !getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
SttCrsrMove();
@@ -366,17 +372,17 @@ BOOL SwEditShell::GotoGlobalDocContent( const SwGlblDocContent& rPos )
rCrsrPos.nNode = rPos.GetDocPos();
SwDoc* pMyDoc = GetDoc();
- SwCntntNode* pCNd = pMyDoc->GetNodes()[ rCrsrPos.nNode ]->GetCntntNode();
+ SwCntntNode * pCNd = rCrsrPos.nNode.GetNode().GetCntntNode();
if( !pCNd )
pCNd = pMyDoc->GetNodes().GoNext( &rCrsrPos.nNode );
rCrsrPos.nContent.Assign( pCNd, 0 );
EndCrsrMove();
- return TRUE;
+ return sal_True;
}
-SwGlblDocContent::SwGlblDocContent( ULONG nPos )
+SwGlblDocContent::SwGlblDocContent( sal_uLong nPos )
{
eType = GLBLDOC_UNKNOWN;
PTR.pTOX = 0;
diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx
index eec9f9447ce1..a559edc840a0 100644
--- a/sw/source/core/edit/edglss.cxx
+++ b/sw/source/core/edit/edglss.cxx
@@ -65,8 +65,8 @@ void SwEditShell::InsertGlossary( SwTextBlocks& rGlossary, const String& rStr )
******************************************************************************/
-USHORT SwEditShell::MakeGlossary( SwTextBlocks& rBlks, const String& rName, const String& rShortName,
- BOOL bSaveRelFile, const String* pOnlyTxt )
+sal_uInt16 SwEditShell::MakeGlossary( SwTextBlocks& rBlks, const String& rName, const String& rShortName,
+ sal_Bool bSaveRelFile, const String* pOnlyTxt )
{
SwDoc* pGDoc = rBlks.GetDoc();
@@ -78,7 +78,7 @@ USHORT SwEditShell::MakeGlossary( SwTextBlocks& rBlks, const String& rName, cons
}
rBlks.SetBaseURL( sBase );
- USHORT nRet;
+ sal_uInt16 nRet;
if( pOnlyTxt )
nRet = rBlks.PutText( rShortName, rName, *pOnlyTxt );
@@ -93,17 +93,17 @@ USHORT SwEditShell::MakeGlossary( SwTextBlocks& rBlks, const String& rName, cons
nRet = rBlks.PutDoc();
}
else
- nRet = (USHORT) -1;
+ nRet = (sal_uInt16) -1;
}
return nRet;
}
-USHORT SwEditShell::SaveGlossaryDoc( SwTextBlocks& rBlock,
+sal_uInt16 SwEditShell::SaveGlossaryDoc( SwTextBlocks& rBlock,
const String& rName,
const String& rShortName,
- BOOL bSaveRelFile,
- BOOL bOnlyTxt )
+ sal_Bool bSaveRelFile,
+ sal_Bool bOnlyTxt )
{
StartAllAction();
@@ -117,7 +117,7 @@ USHORT SwEditShell::SaveGlossaryDoc( SwTextBlocks& rBlock,
sBase = aURL.GetMainURL( INetURLObject::NO_DECODE );
}
rBlock.SetBaseURL( sBase );
- USHORT nRet = USHRT_MAX;
+ sal_uInt16 nRet = USHRT_MAX;
if( bOnlyTxt )
{
@@ -180,7 +180,7 @@ USHORT SwEditShell::SaveGlossaryDoc( SwTextBlocks& rBlock,
******************************************************************************/
-BOOL SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
+sal_Bool SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
{
OSL_ENSURE( pInsDoc, "kein Ins.Dokument" );
@@ -197,7 +197,7 @@ BOOL SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
(*pSttNd)--;
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SET_CURR_SHELL( this );
pInsDoc->LockExpFlds();
@@ -216,22 +216,22 @@ BOOL SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
->GetSttNd()->FindTableNode() ))
{
// teste ob der TabellenName kopiert werden kann
- BOOL bCpyTblNm = aBoxes.Count() == pTblNd->GetTable().GetTabSortBoxes().Count();
+ sal_Bool bCpyTblNm = aBoxes.Count() == pTblNd->GetTable().GetTabSortBoxes().Count();
if( bCpyTblNm )
{
const String& rTblName = pTblNd->GetTable().GetFrmFmt()->GetName();
const SwFrmFmts& rTblFmts = *pInsDoc->GetTblFrmFmts();
- for( USHORT n = rTblFmts.Count(); n; )
+ for( sal_uInt16 n = rTblFmts.Count(); n; )
if( rTblFmts[ --n ]->GetName() == rTblName )
{
- bCpyTblNm = FALSE;
+ bCpyTblNm = sal_False;
break;
}
}
- bRet = pInsDoc->InsCopyOfTbl( aPos, aBoxes, 0, bCpyTblNm, FALSE );
+ bRet = pInsDoc->InsCopyOfTbl( aPos, aBoxes, 0, bCpyTblNm, sal_False );
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
else
{
@@ -277,11 +277,11 @@ BOOL SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
/*------------------------------------------------------------------------
Beschreibung: Text innerhalb der Selektion erfragen
- Returnwert: liefert FALSE, wenn der selektierte Bereich
+ Returnwert: liefert sal_False, wenn der selektierte Bereich
zu gross ist, um in den Stringpuffer kopiert zu werden.
------------------------------------------------------------------------*/
-BOOL SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
+sal_Bool SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
{
GetCrsr(); // ggfs. alle Cursor erzeugen lassen
if( IsSelOnePara() )
@@ -319,18 +319,18 @@ BOOL SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
{
// Selektierte Bereiche in ein ASCII Dokument schreiben
SwWriter aWriter( aStream, *this);
- xWrt->SetShowProgress( FALSE );
+ xWrt->SetShowProgress( sal_False );
switch( nHndlParaBrk )
{
case GETSELTXT_PARABRK_TO_BLANK:
- xWrt->bASCII_ParaAsBlanc = TRUE;
- xWrt->bASCII_NoLastLineEnd = TRUE;
+ xWrt->bASCII_ParaAsBlanc = sal_True;
+ xWrt->bASCII_NoLastLineEnd = sal_True;
break;
case GETSELTXT_PARABRK_TO_ONLYCR:
- xWrt->bASCII_ParaAsCR = TRUE;
- xWrt->bASCII_NoLastLineEnd = TRUE;
+ xWrt->bASCII_ParaAsCR = sal_True;
+ xWrt->bASCII_NoLastLineEnd = sal_True;
break;
}
@@ -338,7 +338,7 @@ BOOL SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
SwAsciiOptions aAsciiOpt( xWrt->GetAsciiOptions() );
aAsciiOpt.SetCharSet( RTL_TEXTENCODING_UCS2 );
xWrt->SetAsciiOptions( aAsciiOpt );
- xWrt->bUCS2_WithStartChar = FALSE;
+ xWrt->bUCS2_WithStartChar = sal_False;
long lLen;
if( !IsError( aWriter.Write( xWrt ) ) &&
@@ -363,7 +363,7 @@ BOOL SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk )
}
}
- return TRUE;
+ return sal_True;
}
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 9b33f67b7c12..a0bf4f415cca 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
#include <tools/urlobj.hxx>
#include <vcl/cmdevt.hxx>
@@ -41,6 +42,7 @@
#include <frmfmt.hxx>
#include <charfmt.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docary.hxx>
#include <editsh.hxx>
#include <frame.hxx>
@@ -78,7 +80,7 @@ SV_IMPL_PTRARR(SwGetINetAttrs, SwGetINetAttr*)
******************************************************************************/
-void SwEditShell::Insert( sal_Unicode c, BOOL bOnlyCurrCrsr )
+void SwEditShell::Insert( sal_Unicode c, sal_Bool bOnlyCurrCrsr )
{
StartAllAction();
FOREACHPAM_START(this)
@@ -128,7 +130,7 @@ void SwEditShell::Insert2(const String &rStr, const bool bForceExpandHints )
// calculate cursor bidi level
SwCursor* pTmpCrsr = _GetCrsr();
- const BOOL bDoNotSetBidiLevel = ! pTmpCrsr ||
+ const sal_Bool bDoNotSetBidiLevel = ! pTmpCrsr ||
( 0 != dynamic_cast<SwUnoCrsr*>(pTmpCrsr) );
if ( ! bDoNotSetBidiLevel )
@@ -145,7 +147,7 @@ void SwEditShell::Insert2(const String &rStr, const bool bForceExpandHints )
SwScriptInfo* pSI = SwScriptInfo::GetScriptInfo( ((SwTxtNode&)rNode),
sal_True );
- BYTE nLevel = 0;
+ sal_uInt8 nLevel = 0;
if ( ! pSI )
{
// seems to be an empty paragraph.
@@ -169,7 +171,7 @@ void SwEditShell::Insert2(const String &rStr, const bool bForceExpandHints )
}
}
- SetInFrontOfLabel( FALSE ); // #i27615#
+ SetInFrontOfLabel( sal_False ); // #i27615#
EndAllAction();
}
@@ -186,7 +188,7 @@ void SwEditShell::Overwrite(const String &rStr)
FOREACHPAM_START(this)
if( !GetDoc()->Overwrite(*PCURCRSR, rStr ) )
{
- OSL_ENSURE( FALSE, "Doc->Overwrite(Str) failed." );
+ OSL_ENSURE( sal_False, "Doc->Overwrite(Str) failed." );
}
SaveTblBoxCntnt( PCURCRSR->GetPoint() );
FOREACHPAM_END()
@@ -198,10 +200,10 @@ void SwEditShell::Overwrite(const String &rStr)
* long SwEditShell::SplitNode()
******************************************************************************/
-long SwEditShell::SplitNode( BOOL bAutoFormat, BOOL bCheckTableStart )
+long SwEditShell::SplitNode( sal_Bool bAutoFormat, sal_Bool bCheckTableStart )
{
StartAllAction();
- GetDoc()->StartUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
FOREACHPAM_START(this)
// eine Tabellen Zelle wird jetzt zu einer normalen Textzelle!
@@ -209,7 +211,7 @@ long SwEditShell::SplitNode( BOOL bAutoFormat, BOOL bCheckTableStart )
GetDoc()->SplitNode( *PCURCRSR->GetPoint(), bCheckTableStart );
FOREACHPAM_END()
- GetDoc()->EndUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
if( bAutoFormat )
AutoFmtBySplitNode();
@@ -224,14 +226,14 @@ sal_Bool SwEditShell::AppendTxtNode()
{
sal_Bool bRet = sal_False;
StartAllAction();
- GetDoc()->StartUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
FOREACHPAM_START(this)
GetDoc()->ClearBoxNumAttrs( PCURCRSR->GetPoint()->nNode );
bRet = GetDoc()->AppendTxtNode( *PCURCRSR->GetPoint()) || bRet;
FOREACHPAM_END()
- GetDoc()->EndUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
ClearTblBoxCntnt();
@@ -261,7 +263,7 @@ SwGrfNode * SwEditShell::_GetGrfNode() const
* oder auf die gleiche Graphic zeigt)
******************************************************************************/
-const Graphic* SwEditShell::GetGraphic( BOOL bWait ) const
+const Graphic* SwEditShell::GetGraphic( sal_Bool bWait ) const
{
SwGrfNode* pGrfNode = _GetGrfNode();
const Graphic* pGrf( 0L );
@@ -269,7 +271,7 @@ const Graphic* SwEditShell::GetGraphic( BOOL bWait ) const
{
pGrf = &(pGrfNode->GetGrf());
// --> #i73788#
- // no load of linked graphic, if its not needed now (bWait = FALSE).
+ // no load of linked graphic, if its not needed now (bWait = sal_False).
if ( bWait )
{
if( pGrf->IsSwapOut() ||
@@ -299,7 +301,7 @@ const Graphic* SwEditShell::GetGraphic( BOOL bWait ) const
// <--
}
-BOOL SwEditShell::IsGrfSwapOut( BOOL bOnlyLinked ) const
+sal_Bool SwEditShell::IsGrfSwapOut( sal_Bool bOnlyLinked ) const
{
SwGrfNode *pGrfNode = _GetGrfNode();
return pGrfNode &&
@@ -315,10 +317,10 @@ const GraphicObject* SwEditShell::GetGraphicObj() const
return pGrfNode ? &(pGrfNode->GetGrfObj()) : 0L;
}
-USHORT SwEditShell::GetGraphicType() const
+sal_uInt16 SwEditShell::GetGraphicType() const
{
SwGrfNode *pGrfNode = _GetGrfNode();
- return static_cast<USHORT>(pGrfNode ? pGrfNode->GetGrfObj().GetType() : GRAPHIC_NONE);
+ return static_cast<sal_uInt16>(pGrfNode ? pGrfNode->GetGrfObj().GetType() : GRAPHIC_NONE);
}
/******************************************************************************
@@ -327,7 +329,7 @@ USHORT SwEditShell::GetGraphicType() const
* oder auf die gleiche Graphic zeigt)
******************************************************************************/
-BOOL SwEditShell::GetGrfSize(Size& rSz) const
+sal_Bool SwEditShell::GetGrfSize(Size& rSz) const
{
SwNoTxtNode* pNoTxtNd;
SwPaM* pCurrentCrsr = GetCrsr();
@@ -336,9 +338,9 @@ BOOL SwEditShell::GetGrfSize(Size& rSz) const
&& 0 != ( pNoTxtNd = pCurrentCrsr->GetNode()->GetNoTxtNode() ) )
{
rSz = pNoTxtNd->GetTwipSize();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/******************************************************************************
@@ -404,7 +406,7 @@ void SwEditShell::ClearAutomaticContour()
if( pNd->HasAutomaticContour() )
{
StartAllAction();
- pNd->SetContour( NULL, FALSE );
+ pNd->SetContour( NULL, sal_False );
SwFlyFrm *pFly = (SwFlyFrm*)pNd->GetFrm()->GetUpper();
const SwFmtSurround &rSur = pFly->GetFmt()->GetSurround();
pFly->GetFmt()->SwModify::Modify( (SwFmtSurround*)&rSur,
@@ -437,7 +439,7 @@ svt::EmbeddedObjectRef& SwEditShell::GetOLEObject() const
}
-BOOL SwEditShell::HasOLEObj( const String &rName ) const
+sal_Bool SwEditShell::HasOLEObj( const String &rName ) const
{
SwStartNode *pStNd;
SwNodeIndex aIdx( *GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
@@ -448,11 +450,11 @@ BOOL SwEditShell::HasOLEObj( const String &rName ) const
if( rNd.IsOLENode() &&
rName == ((SwOLENode&)rNd).GetChartTblName() &&
((SwOLENode&)rNd).GetFrm() )
- return TRUE;
+ return sal_True;
aIdx.Assign( *pStNd->EndOfSectionNode(), + 1 );
}
- return FALSE;
+ return sal_False;
}
@@ -512,7 +514,7 @@ const SwFmtRefMark* SwEditShell::GetRefMark( const String& rName ) const
}
// returne die Namen aller im Doc gesetzten Referenzen
-USHORT SwEditShell::GetRefMarks( SvStringsDtor* pStrings ) const
+sal_uInt16 SwEditShell::GetRefMarks( SvStringsDtor* pStrings ) const
{
return GetDoc()->GetRefMarks( pStrings );
}
@@ -522,7 +524,7 @@ USHORT SwEditShell::GetRefMarks( SvStringsDtor* pStrings ) const
******************************************************************************/
-String SwEditShell::GetDropTxt( const USHORT nChars ) const
+String SwEditShell::GetDropTxt( const sal_uInt16 nChars ) const
{
/**
* pb: made changes for #i74939#
@@ -536,7 +538,7 @@ String SwEditShell::GetDropTxt( const USHORT nChars ) const
{
// if a multi selection exists, search for the first line
// -> it is the cursor with the lowest index
- ULONG nIndex = pCrsr->GetMark()->nNode.GetIndex();
+ sal_uLong nIndex = pCrsr->GetMark()->nNode.GetIndex();
bool bPrev = true;
SwPaM* pLast = pCrsr;
SwPaM* pTemp = pCrsr;
@@ -547,7 +549,7 @@ String SwEditShell::GetDropTxt( const USHORT nChars ) const
if ( bPrev )
{
pTemp = pPrev2;
- ULONG nTemp = pPrev2->GetMark()->nNode.GetIndex();
+ sal_uLong nTemp = pPrev2->GetMark()->nNode.GetIndex();
if ( nTemp < nIndex )
{
nIndex = nTemp;
@@ -580,7 +582,7 @@ void SwEditShell::ReplaceDropTxt( const String &rStr )
SwPaM aPam( rNd, rStr.Len(), rNd, 0 );
if( !GetDoc()->Overwrite( aPam, rStr ) )
{
- OSL_ENSURE( FALSE, "Doc->Overwrite(Str) failed." );
+ OSL_ENSURE( sal_False, "Doc->Overwrite(Str) failed." );
}
EndAllAction();
@@ -608,7 +610,7 @@ String SwEditShell::Calculate()
rCC.toLower( aStr );
sal_Unicode ch;
- BOOL bValidFlds = FALSE;
+ sal_Bool bValidFlds = sal_False;
xub_StrLen nPos = 0;
while( nPos < aStr.Len() )
@@ -636,7 +638,7 @@ String SwEditShell::Calculate()
GetDoc()->FldsToCalc( aCalc,
pStart->nNode.GetIndex(),
pStart->nContent.GetIndex() );
- bValidFlds = TRUE;
+ bValidFlds = sal_True;
}
(( aFormel += '(' ) +=
aCalc.GetStrResult( aCalc.VarLook( sVar )
@@ -686,9 +688,9 @@ Graphic SwEditShell::GetIMapGraphic() const
GRAPHIC_DEFAULT == rGrf.GetType() ) )
{
#if OSL_DEBUG_LEVEL > 1
- OSL_ENSURE( ((SwGrfNode*)pNd)->SwapIn( TRUE ) || !TRUE, "Grafik konnte nicht geladen werden" );
+ OSL_ENSURE( ((SwGrfNode*)pNd)->SwapIn( sal_True ), "Grafik konnte nicht geladen werden" );
#else
- ((SwGrfNode*)pNd)->SwapIn( TRUE );
+ ((SwGrfNode*)pNd)->SwapIn( sal_True );
#endif
}
aRet = rGrf;
@@ -708,14 +710,14 @@ Graphic SwEditShell::GetIMapGraphic() const
}
-BOOL SwEditShell::InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, BOOL bKeepSelection )
+sal_Bool SwEditShell::InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, sal_Bool bKeepSelection )
{
// URL und Hinweistext (direkt oder via Selektion) notwendig
if( !rFmt.GetValue().Len() || ( !rStr.Len() && !HasSelection() ) )
- return FALSE;
+ return sal_False;
StartAllAction();
- GetDoc()->StartUndo( UNDO_UI_INSERT_URLTXT, NULL);
- BOOL bInsTxt = TRUE;
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_UI_INSERT_URLTXT, NULL);
+ sal_Bool bInsTxt = sal_True;
if( rStr.Len() )
{
@@ -723,33 +725,33 @@ BOOL SwEditShell::InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, BOOL
if( pCrsr->HasMark() && *pCrsr->GetPoint() != *pCrsr->GetMark() )
{
// Selection vorhanden, MehrfachSelektion?
- BOOL bDelTxt = TRUE;
+ sal_Bool bDelTxt = sal_True;
if( pCrsr->GetNext() == pCrsr )
{
// einfach Selection -> Text ueberpruefen
String sTxt( GetSelTxt() );
sTxt.EraseTrailingChars();
if( sTxt == rStr )
- bDelTxt = bInsTxt = FALSE;
+ bDelTxt = bInsTxt = sal_False;
}
else if( rFmt.GetValue() == rStr ) // Name und URL gleich?
- bDelTxt = bInsTxt = FALSE;
+ bDelTxt = bInsTxt = sal_False;
if( bDelTxt )
Delete();
}
else if( pCrsr->GetNext() != pCrsr && rFmt.GetValue() == rStr )
- bInsTxt = FALSE;
+ bInsTxt = sal_False;
if( bInsTxt )
{
Insert2( rStr );
SetMark();
- ExtendSelection( FALSE, rStr.Len() );
+ ExtendSelection( sal_False, rStr.Len() );
}
}
else
- bInsTxt = FALSE;
+ bInsTxt = sal_False;
SetAttr( rFmt );
if (bInsTxt && !IsCrsrPtAtEnd())
@@ -758,20 +760,20 @@ BOOL SwEditShell::InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, BOOL
ClearMark();
if( bInsTxt )
DontExpandFmt();
- GetDoc()->EndUndo( UNDO_UI_INSERT_URLTXT, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_UI_INSERT_URLTXT, NULL );
EndAllAction();
- return TRUE;
+ return sal_True;
}
-USHORT SwEditShell::GetINetAttrs( SwGetINetAttrs& rArr )
+sal_uInt16 SwEditShell::GetINetAttrs( SwGetINetAttrs& rArr )
{
if( rArr.Count() )
rArr.DeleteAndDestroy( 0, rArr.Count() );
const SwTxtNode* pTxtNd;
const SwCharFmts* pFmts = GetDoc()->GetCharFmts();
- for( USHORT n = pFmts->Count(); 1 < n; )
+ for( sal_uInt16 n = pFmts->Count(); 1 < n; )
{
SwClientIter aIter( *(*pFmts)[ --n ] );
@@ -800,9 +802,9 @@ USHORT SwEditShell::GetINetAttrs( SwGetINetAttrs& rArr )
// ist der Cursor in eine INetAttribut, dann wird das komplett
// geloescht; inclusive des Hinweistextes (wird beim Drag&Drop gebraucht)
-BOOL SwEditShell::DelINetAttrWithText()
+sal_Bool SwEditShell::DelINetAttrWithText()
{
- BOOL bRet = SelectTxtAttr( RES_TXTATR_INETFMT, FALSE );
+ sal_Bool bRet = SelectTxtAttr( RES_TXTATR_INETFMT, sal_False );
if( bRet )
DeleteSel( *GetCrsr() );
return bRet;
@@ -810,12 +812,12 @@ BOOL SwEditShell::DelINetAttrWithText()
// setzen an den Textzeichenattributen das DontExpand-Flag
-BOOL SwEditShell::DontExpandFmt()
+sal_Bool SwEditShell::DontExpandFmt()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !IsTableMode() && GetDoc()->DontExpandFmt( *GetCrsr()->GetPoint() ))
{
- bRet = TRUE;
+ bRet = sal_True;
CallChgLnk();
}
return bRet;
@@ -826,17 +828,17 @@ SvNumberFormatter* SwEditShell::GetNumberFormatter()
return GetDoc()->GetNumberFormatter();
}
-BOOL SwEditShell::RemoveInvisibleContent()
+sal_Bool SwEditShell::RemoveInvisibleContent()
{
StartAllAction();
- BOOL bRet = GetDoc()->RemoveInvisibleContent();
+ sal_Bool bRet = GetDoc()->RemoveInvisibleContent();
EndAllAction();
return bRet;
}
-BOOL SwEditShell::ConvertFieldsToText()
+sal_Bool SwEditShell::ConvertFieldsToText()
{
StartAllAction();
- BOOL bRet = GetDoc()->ConvertFieldsToText();
+ sal_Bool bRet = GetDoc()->ConvertFieldsToText();
EndAllAction();
return bRet;
}
@@ -853,8 +855,8 @@ void SwEditShell::SetNumberingRestart()
else
MakeFindRange(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, pCrsr); //extra content
SwPosition* pSttPos = pCrsr->Start(), *pEndPos = pCrsr->End();
- ULONG nCurrNd = pSttPos->nNode.GetIndex();
- ULONG nEndNd = pEndPos->nNode.GetIndex();
+ sal_uLong nCurrNd = pSttPos->nNode.GetIndex();
+ sal_uLong nEndNd = pEndPos->nNode.GetIndex();
if( nCurrNd <= nEndNd )
{
SwCntntFrm* pCntFrm;
@@ -884,7 +886,7 @@ void SwEditShell::SetNumberingRestart()
pTxtNd->IsCountedInList() &&
!pTxtNd->IsListRestart() &&
pTxtNd->GetNum()->GetNumber() ==
- pNumRule->Get( static_cast<USHORT>(pTxtNd->GetActualListLevel()) ).GetStart() )
+ pNumRule->Get( static_cast<sal_uInt16>(pTxtNd->GetActualListLevel()) ).GetStart() )
{
//now set a the start value as attribute
SwPosition aCurrentNode(*pNd);
@@ -911,20 +913,20 @@ void SwEditShell::SetNumberingRestart()
}
- Pop(FALSE);
+ Pop(sal_False);
EndAllAction();
}
-USHORT SwEditShell::GetLineCount( BOOL bActPos )
+sal_uInt16 SwEditShell::GetLineCount( sal_Bool bActPos )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
CalcLayout();
SwPaM* pPam = GetCrsr();
SwNodeIndex& rPtIdx = pPam->GetPoint()->nNode;
SwNodeIndex aStart( rPtIdx );
SwCntntNode* pCNd;
SwCntntFrm *pCntFrm = 0;
- ULONG nTmpPos;
+ sal_uLong nTmpPos;
if( !bActPos )
aStart = 0;
@@ -943,7 +945,7 @@ USHORT SwEditShell::GetLineCount( BOOL bActPos )
pTmp = pCNd->FindFootnoteStartNode();
else
{ // Footer/Header
- const USHORT nTyp = FRM_HEADER | FRM_FOOTER;
+ const sal_uInt16 nTyp = FRM_HEADER | FRM_FOOTER;
SwFrm* pFrm = pCntFrm;
while( pFrm && !(pFrm->GetType() & nTyp) )
pFrm = pFrm->GetUpper();
@@ -960,7 +962,7 @@ USHORT SwEditShell::GetLineCount( BOOL bActPos )
}
while( 0 != ( pCNd = GetDoc()->GetNodes().GoNextSection(
- &aStart, TRUE, FALSE )) && ( !bActPos || aStart <= rPtIdx ) )
+ &aStart, sal_True, sal_False )) && ( !bActPos || aStart <= rPtIdx ) )
{
if( 0 != ( pCntFrm = pCNd->GetFrm() ) && pCntFrm->IsTxtFrm() )
{
@@ -1030,12 +1032,12 @@ void SwEditShell::SetLineNumberInfo(const SwLineNumberInfo& rInfo)
EndAllAction();
}
-USHORT SwEditShell::GetLinkUpdMode(BOOL bDocSettings) const
+sal_uInt16 SwEditShell::GetLinkUpdMode(sal_Bool bDocSettings) const
{
return getIDocumentSettingAccess()->getLinkUpdateMode( !bDocSettings );
}
-void SwEditShell::SetLinkUpdMode( USHORT nMode )
+void SwEditShell::SetLinkUpdMode( sal_uInt16 nMode )
{
getIDocumentSettingAccess()->setLinkUpdateMode( nMode );
}
@@ -1051,7 +1053,7 @@ SwExtTextInput* SwEditShell::CreateExtTextInput(LanguageType eInputLanguage)
return pRet;
}
-String SwEditShell::DeleteExtTextInput( SwExtTextInput* pDel, BOOL bInsText )
+String SwEditShell::DeleteExtTextInput( SwExtTextInput* pDel, sal_Bool bInsText )
{
if( !pDel )
{
@@ -1131,14 +1133,14 @@ void SwEditShell::TransliterateText( sal_uInt32 nType )
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() != pCrsr )
{
- GetDoc()->StartUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
FOREACHPAM_START( this )
if( PCURCRSR->HasMark() )
GetDoc()->TransliterateText( *PCURCRSR, aTrans );
FOREACHPAM_END()
- GetDoc()->EndUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
}
else
GetDoc()->TransliterateText( *pCrsr, aTrans );
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 690eef6ccbd6..65ae73daa6e1 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -48,6 +48,7 @@
#include <charatr.hxx>
#include <editsh.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <rootfrm.hxx> // SwRootFrm
#include <pam.hxx>
#include <swundo.hxx> // fuer die UndoIds
@@ -120,8 +121,8 @@ public:
// the content positions of each portion need to be saved
struct SpellContentPosition
{
- USHORT nLeft;
- USHORT nRight;
+ sal_uInt16 nLeft;
+ sal_uInt16 nRight;
};
typedef std::vector<SpellContentPosition> SpellContentPositions;
class SwSpellIter : public SwLinguIter
@@ -698,7 +699,7 @@ bool SwEditShell::HasLastSentenceGotGrammarChecked() const
* SwEditShell::HasConvIter
*************************************************************************/
-BOOL SwEditShell::HasConvIter() const
+sal_Bool SwEditShell::HasConvIter() const
{
return 0 != pConvIter;
}
@@ -707,7 +708,7 @@ BOOL SwEditShell::HasConvIter() const
* SwEditShell::HasHyphIter
*************************************************************************/
-BOOL SwEditShell::HasHyphIter() const
+sal_Bool SwEditShell::HasHyphIter() const
{
return 0 != pHyphIter;
}
@@ -719,7 +720,7 @@ BOOL SwEditShell::HasHyphIter() const
void SwEditShell::SetLinguRange( SwDocPositions eStart, SwDocPositions eEnd )
{
SwPaM *pCrsr = GetCrsr();
- MakeFindRange( static_cast<USHORT>(eStart), static_cast<USHORT>(eEnd), pCrsr );
+ MakeFindRange( static_cast<sal_uInt16>(eStart), static_cast<sal_uInt16>(eEnd), pCrsr );
if( *pCrsr->GetPoint() > *pCrsr->GetMark() )
pCrsr->Exchange();
}
@@ -1034,7 +1035,7 @@ uno::Reference< XSpellAlternatives >
Sequence< PropertyValue > aPropVals(1);
PropertyValue &rVal = aPropVals.getArray()[0];
rVal.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_MAX_NUMBER_OF_SUGGESTIONS ));
- rVal.Value <<= (INT16) 7;
+ rVal.Value <<= (sal_Int16) 7;
xSpellAlt = xSpell->spell( aWord, eActLang, aPropVals );
}
@@ -1048,7 +1049,7 @@ uno::Reference< XSpellAlternatives >
xub_StrLen nLineStart = GetCrsr()->GetPoint()->nContent.GetIndex();
RightMargin();
xub_StrLen nLineEnd = GetCrsr()->GetPoint()->nContent.GetIndex();
- Pop(FALSE);
+ Pop(sal_False);
// make sure the selection build later from the
// data below does not include footnotes and other
@@ -1079,16 +1080,16 @@ uno::Reference< XSpellAlternatives >
rContent = nWordStart;
SwRect aStartRect;
SwCrsrMoveState aState;
- aState.bRealWidth = TRUE;
+ aState.bRealWidth = sal_True;
SwCntntNode* pCntntNode = pCrsr->GetCntntNode();
- SwCntntFrm *pCntntFrame = pCntntNode->GetFrm(pPt, pCrsr->GetPoint(), FALSE);
+ SwCntntFrm *pCntntFrame = pCntntNode->GetFrm(pPt, pCrsr->GetPoint(), sal_False);
pCntntFrame->GetCharRect( aStartRect, *pCrsr->GetPoint(), &aState );
rContent = nWordEnd - 1;
SwRect aEndRect;
pCntntFrame->GetCharRect( aEndRect, *pCrsr->GetPoint(),&aState );
rSelectRect = aStartRect.Union( aEndRect );
- Pop(FALSE);
+ Pop(sal_False);
}
}
}
@@ -1180,7 +1181,7 @@ bool SwEditShell::GetGrammarCorrection(
xub_StrLen nLineStart = GetCrsr()->GetPoint()->nContent.GetIndex();
RightMargin();
xub_StrLen nLineEnd = GetCrsr()->GetPoint()->nContent.GetIndex();
- Pop(FALSE);
+ Pop(sal_False);
// make sure the selection build later from the
// data below does not include footnotes and other
@@ -1211,16 +1212,16 @@ bool SwEditShell::GetGrammarCorrection(
rContent = nWordStart;
SwRect aStartRect;
SwCrsrMoveState aState;
- aState.bRealWidth = TRUE;
+ aState.bRealWidth = sal_True;
SwCntntNode* pCntntNode = pCrsr->GetCntntNode();
- SwCntntFrm *pCntntFrame = pCntntNode->GetFrm(pPt, pCrsr->GetPoint(), FALSE);
+ SwCntntFrm *pCntntFrame = pCntntNode->GetFrm(pPt, pCrsr->GetPoint(), sal_False);
pCntntFrame->GetCharRect( aStartRect, *pCrsr->GetPoint(), &aState );
rContent = nWordEnd - 1;
SwRect aEndRect;
pCntntFrame->GetCharRect( aEndRect, *pCrsr->GetPoint(),&aState );
rSelectRect = aStartRect.Union( aEndRect );
- Pop(FALSE);
+ Pop(sal_False);
}
}
}
@@ -1295,7 +1296,7 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
// iterate over the new portions, beginning at the end to take advantage of the previously
// saved content positions
- pDoc->StartUndo( UNDO_OVERWRITE, NULL );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_OVERWRITE, NULL );
StartAction();
SwPaM *pCrsr = GetCrsr();
@@ -1339,8 +1340,8 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
pCrsr->SetMark();
pCrsr->GetPoint()->nContent = aCurrentOldPosition->nLeft;
pCrsr->GetMark()->nContent = aCurrentOldPosition->nRight;
- USHORT nScriptType = GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage );
- USHORT nLangWhichId = RES_CHRATR_LANGUAGE;
+ sal_uInt16 nScriptType = GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage );
+ sal_uInt16 nLangWhichId = RES_CHRATR_LANGUAGE;
switch(nScriptType)
{
case SCRIPTTYPE_ASIAN : nLangWhichId = RES_CHRATR_CJK_LANGUAGE; break;
@@ -1388,8 +1389,8 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
while(aCurrentNewPortion != rNewPortions.end())
{
//set the language attribute
- USHORT nScriptType = GetScriptType();
- USHORT nLangWhichId = RES_CHRATR_LANGUAGE;
+ sal_uInt16 nScriptType = GetScriptType();
+ sal_uInt16 nLangWhichId = RES_CHRATR_LANGUAGE;
switch(nScriptType)
{
case SCRIPTTYPE_ASIAN : nLangWhichId = RES_CHRATR_CJK_LANGUAGE; break;
@@ -1412,7 +1413,7 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
// restore cursor to the end of the sentence
// (will work also if the sentence length has changed,
// since cursors get updated automatically!)
- Pop( FALSE );
+ Pop( sal_False );
// collapse cursor to the end of the modified sentence
*pCrsr->Start() = *pCrsr->End();
@@ -1424,7 +1425,7 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
// set continuation position for spell/grammar checking to the end of this sentence
pSpellIter->SetCurr( new SwPosition( *pCrsr->Start() ) );
- pDoc->EndUndo( UNDO_OVERWRITE, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_OVERWRITE, NULL );
EndAction();
}
}
@@ -1443,7 +1444,7 @@ SpellContentPositions lcl_CollectDeletedRedlines(SwEditShell* pSh)
const SwPosition* pStartPos = pCrsr->Start();
const SwTxtNode* pTxtNode = pCrsr->GetNode()->GetTxtNode();
- USHORT nAct = pDoc->GetRedlinePos( *pTxtNode, USHRT_MAX );
+ sal_uInt16 nAct = pDoc->GetRedlinePos( *pTxtNode, USHRT_MAX );
const xub_StrLen nStartIndex = pStartPos->nContent.GetIndex();
for ( ; nAct < pDoc->GetRedlineTbl().Count(); nAct++ )
{
@@ -1581,7 +1582,7 @@ bool SwSpellIter::SpellSentence(::svx::SpellPortions& rPortions, bool bIsGrammar
//the cursor has to be collapsed on the left to go to the start of the sentence - if sentence ends inside of the error
pCrsr->DeleteMark();
pCrsr->SetMark();
- BOOL bStartSent = 0 != pMySh->GoStartSentence();
+ sal_Bool bStartSent = 0 != pMySh->GoStartSentence();
SpellContentPositions aDeletedRedlines = lcl_CollectDeletedRedlines(pMySh);
if(bStartSent)
{
@@ -1715,8 +1716,8 @@ void SwSpellIter::ToSentenceStart()
LanguageType lcl_GetLanguage(SwEditShell& rSh)
{
- USHORT nScriptType = rSh.GetScriptType();
- USHORT nLangWhichId = RES_CHRATR_LANGUAGE;
+ sal_uInt16 nScriptType = rSh.GetScriptType();
+ sal_uInt16 nLangWhichId = RES_CHRATR_LANGUAGE;
switch(nScriptType)
{
@@ -1831,9 +1832,9 @@ void SwSpellIter::AddPortion(uno::Reference< XSpellAlternatives > xAlt,
{
const SwTxtAttr* pTxtAttr = pTxtNode->GetTxtAttrForCharAt(
pCrsr->GetMark()->nContent.GetIndex() );
- const USHORT nWhich = pTxtAttr
+ const sal_uInt16 nWhich = pTxtAttr
? pTxtAttr->Which()
- : static_cast<USHORT>(RES_TXTATR_END);
+ : static_cast<sal_uInt16>(RES_TXTATR_END);
switch (nWhich)
{
case RES_TXTATR_FIELD:
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx
index 1a8610a984b2..f4b54f774903 100644
--- a/sw/source/core/edit/ednumber.cxx
+++ b/sw/source/core/edit/ednumber.cxx
@@ -34,6 +34,7 @@
#include <editsh.hxx>
#include <edimp.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <ndtxt.hxx>
#include <paratr.hxx>
#include <swundo.hxx>
@@ -57,7 +58,7 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
if( aRg.nEnd < aRg.nStart )
{ aRg.nStart = aRg.nEnd; aRg.nEnd = rIdx1.GetIndex(); }
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
const SwPamRange* pTmp;
if( Count() && Seek_Entry( aRg, &nPos )) // suche Insert Position
{
@@ -71,9 +72,9 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
return; // ende, weil schon alle zusammengefasst waren
}
- BOOL bEnde;
+ sal_Bool bEnde;
do {
- bEnde = TRUE;
+ bEnde = sal_True;
// mit dem Vorgaenger zusammenfassen ??
if( nPos > 0 )
@@ -82,7 +83,7 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
|| pTmp->nEnd+1 == aRg.nStart )
{
aRg.nStart = pTmp->nStart;
- bEnde = FALSE;
+ bEnde = sal_False;
Remove( --nPos, 1 ); // zusammenfassen
}
// SSelection im Bereich ??
@@ -96,7 +97,7 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
pTmp->nStart == aRg.nEnd+1 )
{
aRg.nEnd = pTmp->nEnd;
- bEnde = FALSE;
+ bEnde = sal_False;
Remove( nPos, 1 ); // zusammenfassen
}
@@ -111,7 +112,7 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
-SwPaM& SwPamRanges::SetPam( USHORT nArrPos, SwPaM& rPam )
+SwPaM& SwPamRanges::SetPam( sal_uInt16 nArrPos, SwPaM& rPam )
{
OSL_ASSERT( nArrPos < Count() );
const SwPamRange& rTmp = *(GetData() + nArrPos );
@@ -146,20 +147,20 @@ const SwNumRule* SwEditShell::GetOutlineNumRule() const
// Absaetze ohne Numerierung, aber mit Einzuegen
-BOOL SwEditShell::NoNum()
+sal_Bool SwEditShell::NoNum()
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
StartAllAction();
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() != pCrsr ) // Mehrfachselektion ?
{
- GetDoc()->StartUndo( UNDO_START, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
bRet = bRet && GetDoc()->NoNum( aRangeArr.SetPam( n, aPam ));
- GetDoc()->EndUndo( UNDO_END, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
}
else
bRet = GetDoc()->NoNum( *pCrsr );
@@ -170,9 +171,9 @@ BOOL SwEditShell::NoNum()
// Loeschen, Splitten der Aufzaehlungsliste
// -> #i29560#
-BOOL SwEditShell::HasNumber() const
+sal_Bool SwEditShell::HasNumber() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
const SwTxtNode * pTxtNd =
GetCrsr()->GetPoint()->nNode.GetNode().GetTxtNode();
@@ -186,16 +187,16 @@ BOOL SwEditShell::HasNumber() const
pTxtNd->GetNumRule() == GetDoc()->GetOutlineNumRule() &&
!pTxtNd->IsCountedInList() )
{
- bResult = FALSE;
+ bResult = sal_False;
}
}
return bResult;
}
-BOOL SwEditShell::HasBullet() const
+sal_Bool SwEditShell::HasBullet() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
const SwTxtNode * pTxtNd =
GetCrsr()->GetPoint()->nNode.GetNode().GetTxtNode();
@@ -216,14 +217,14 @@ void SwEditShell::DelNumRules()
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() != pCrsr ) // Mehrfachselektion ?
{
- GetDoc()->StartUndo( UNDO_START, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
{
GetDoc()->DelNumRules( aRangeArr.SetPam( n, aPam ) );
}
- GetDoc()->EndUndo( UNDO_END, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
}
else
GetDoc()->DelNumRules( *pCrsr );
@@ -234,7 +235,7 @@ void SwEditShell::DelNumRules()
// cursor can not be anymore in front of a label,
// because numbering/bullet is deleted.
- SetInFrontOfLabel( FALSE );
+ SetInFrontOfLabel( sal_False );
GetDoc()->SetModified();
EndAllAction();
@@ -243,22 +244,22 @@ void SwEditShell::DelNumRules()
// Hoch-/Runterstufen
-BOOL SwEditShell::NumUpDown( BOOL bDown )
+sal_Bool SwEditShell::NumUpDown( sal_Bool bDown )
{
StartAllAction();
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() == pCrsr ) // keine Mehrfachselektion ?
bRet = GetDoc()->NumUpDown( *pCrsr, bDown );
else
{
- GetDoc()->StartUndo( UNDO_START, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
bRet = bRet && GetDoc()->NumUpDown( aRangeArr.SetPam( n, aPam ), bDown );
- GetDoc()->EndUndo( UNDO_END, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
}
GetDoc()->SetModified();
@@ -273,9 +274,9 @@ BOOL SwEditShell::NumUpDown( BOOL bDown )
return bRet;
}
// -> #i23726#
-BOOL SwEditShell::IsFirstOfNumRule() const
+sal_Bool SwEditShell::IsFirstOfNumRule() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
SwPaM * pCrsr = GetCrsr();
if (pCrsr->GetNext() == pCrsr)
@@ -286,9 +287,9 @@ BOOL SwEditShell::IsFirstOfNumRule() const
return bResult;
}
-BOOL SwEditShell::IsFirstOfNumRule(const SwPaM & rPaM) const
+sal_Bool SwEditShell::IsFirstOfNumRule(const SwPaM & rPaM) const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
SwPosition aPos(*rPaM.GetPoint());
bResult = GetDoc()->IsFirstOfNumRule(aPos);
@@ -346,7 +347,7 @@ void SwEditShell::SetIndent(short nIndent, const SwPosition & rPos)
else if ( pTxtNode->GetActualListLevel() >= 0 )
{
aRule.SetIndent( nIndent,
- static_cast<USHORT>(pTxtNode->GetActualListLevel()) );
+ static_cast<sal_uInt16>(pTxtNode->GetActualListLevel()) );
}
// <--
@@ -361,7 +362,7 @@ void SwEditShell::SetIndent(short nIndent, const SwPosition & rPos)
}
// <- #i23725#
-BOOL SwEditShell::MoveParagraph( long nOffset )
+sal_Bool SwEditShell::MoveParagraph( long nOffset )
{
StartAllAction();
@@ -373,7 +374,7 @@ BOOL SwEditShell::MoveParagraph( long nOffset )
pCrsr->DeleteMark();
}
- BOOL bRet = GetDoc()->MoveParagraph( *pCrsr, nOffset );
+ sal_Bool bRet = GetDoc()->MoveParagraph( *pCrsr, nOffset );
GetDoc()->SetModified();
EndAllAction();
@@ -400,11 +401,11 @@ void SwEditShell::GetCurrentOutlineLevels( sal_uInt8& rUpper, sal_uInt8& rLower
aCrsr.SetMark();
if( pCrsr->HasMark() )
*aCrsr.GetPoint() = *pCrsr->End();
- GetDoc()->GotoNextNum( *aCrsr.GetPoint(), FALSE,
+ GetDoc()->GotoNextNum( *aCrsr.GetPoint(), sal_False,
&rUpper, &rLower );
}
-BOOL SwEditShell::MoveNumParas( BOOL bUpperLower, BOOL bUpperLeft )
+sal_Bool SwEditShell::MoveNumParas( sal_Bool bUpperLower, sal_Bool bUpperLeft )
{
StartAllAction();
@@ -416,9 +417,9 @@ BOOL SwEditShell::MoveNumParas( BOOL bUpperLower, BOOL bUpperLeft )
if( pCrsr->HasMark() )
*aCrsr.GetPoint() = *pCrsr->End();
- BOOL bRet = FALSE;
- BYTE nUpperLevel, nLowerLevel;
- if( GetDoc()->GotoNextNum( *aCrsr.GetPoint(), FALSE,
+ sal_Bool bRet = sal_False;
+ sal_uInt8 nUpperLevel, nLowerLevel;
+ if( GetDoc()->GotoNextNum( *aCrsr.GetPoint(), sal_False,
&nUpperLevel, &nLowerLevel ))
{
if( bUpperLower )
@@ -430,12 +431,12 @@ BOOL SwEditShell::MoveNumParas( BOOL bUpperLower, BOOL bUpperLeft )
if( bUpperLeft ) // verschiebe nach oben
{
SwPosition aPos( *aCrsr.GetMark() );
- if( GetDoc()->GotoPrevNum( aPos, FALSE ) )
+ if( GetDoc()->GotoPrevNum( aPos, sal_False ) )
nOffset = aPos.nNode.GetIndex() -
aCrsr.GetMark()->nNode.GetIndex();
else
{
- ULONG nStt = aPos.nNode.GetIndex(), nIdx = nStt - 1;
+ sal_uLong nStt = aPos.nNode.GetIndex(), nIdx = nStt - 1;
while( nIdx && (
( pNd = GetDoc()->GetNodes()[ nIdx ])->IsSectionNode() ||
( pNd->IsEndNode() && pNd->StartOfSectionNode()->IsSectionNode())))
@@ -446,11 +447,11 @@ BOOL SwEditShell::MoveNumParas( BOOL bUpperLower, BOOL bUpperLeft )
}
else // verschiebe nach unten
{
- const SwNumRule* pOrig = aCrsr.GetNode(FALSE)->GetTxtNode()->GetNumRule();
+ const SwNumRule* pOrig = aCrsr.GetNode(sal_False)->GetTxtNode()->GetNumRule();
if( aCrsr.GetNode()->IsTxtNode() &&
pOrig == aCrsr.GetNode()->GetTxtNode()->GetNumRule() )
{
- ULONG nStt = aCrsr.GetPoint()->nNode.GetIndex(), nIdx = nStt+1;
+ sal_uLong nStt = aCrsr.GetPoint()->nNode.GetIndex(), nIdx = nStt+1;
while (nIdx < GetDoc()->GetNodes().Count()-1)
{
@@ -498,23 +499,23 @@ BOOL SwEditShell::MoveNumParas( BOOL bUpperLower, BOOL bUpperLeft )
return bRet;
}
-BOOL SwEditShell::OutlineUpDown( short nOffset )
+sal_Bool SwEditShell::OutlineUpDown( short nOffset )
{
StartAllAction();
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() == pCrsr ) // keine Mehrfachselektion ?
bRet = GetDoc()->OutlineUpDown( *pCrsr, nOffset );
else
{
- GetDoc()->StartUndo( UNDO_START, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
bRet = bRet && GetDoc()->OutlineUpDown(
aRangeArr.SetPam( n, aPam ), nOffset );
- GetDoc()->EndUndo( UNDO_END, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
}
GetDoc()->SetModified();
EndAllAction();
@@ -522,25 +523,25 @@ BOOL SwEditShell::OutlineUpDown( short nOffset )
}
-BOOL SwEditShell::MoveOutlinePara( short nOffset )
+sal_Bool SwEditShell::MoveOutlinePara( short nOffset )
{
StartAllAction();
- BOOL bRet = GetDoc()->MoveOutlinePara( *GetCrsr(), nOffset );
+ sal_Bool bRet = GetDoc()->MoveOutlinePara( *GetCrsr(), nOffset );
EndAllAction();
return bRet;
}
// Outlines and SubOutline are ReadOnly?
-BOOL SwEditShell::IsProtectedOutlinePara() const
+sal_Bool SwEditShell::IsProtectedOutlinePara() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwNode& rNd = GetCrsr()->Start()->nNode.GetNode();
if( rNd.IsTxtNode() )
{
const SwOutlineNodes& rOutlNd = GetDoc()->GetNodes().GetOutLineNds();
SwNodePtr pNd = (SwNodePtr)&rNd;
- BOOL bFirst = TRUE;
- USHORT nPos;
+ sal_Bool bFirst = sal_True;
+ sal_uInt16 nPos;
int nLvl(0);
if( !rOutlNd.Seek_Entry( pNd, &nPos ) && nPos )
--nPos;
@@ -557,14 +558,14 @@ BOOL SwEditShell::IsProtectedOutlinePara() const
if( bFirst )
{
nLvl = nTmpLvl;
- bFirst = FALSE;
+ bFirst = sal_False;
}
else if( nLvl >= nTmpLvl )
break;
if( pTmpNd->IsProtect() )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
}
@@ -585,7 +586,7 @@ BOOL SwEditShell::IsProtectedOutlinePara() const
* 2) outline must not be within table
* 3) if bCopy is set, outline must not be write protected
*/
-BOOL lcl_IsOutlineMoveAndCopyable( const SwDoc* pDoc, USHORT nIdx, bool bCopy )
+sal_Bool lcl_IsOutlineMoveAndCopyable( const SwDoc* pDoc, sal_uInt16 nIdx, bool bCopy )
{
const SwNodes& rNds = pDoc->GetNodes();
const SwNode* pNd = rNds.GetOutLineNds()[ nIdx ];
@@ -594,20 +595,20 @@ BOOL lcl_IsOutlineMoveAndCopyable( const SwDoc* pDoc, USHORT nIdx, bool bCopy )
( bCopy || !pNd->IsProtect() ); // 3) write
}
-BOOL SwEditShell::IsOutlineMovable( USHORT nIdx ) const
+sal_Bool SwEditShell::IsOutlineMovable( sal_uInt16 nIdx ) const
{
return lcl_IsOutlineMoveAndCopyable( GetDoc(), nIdx, false );
}
-BOOL SwEditShell::IsOutlineCopyable( USHORT nIdx ) const
+sal_Bool SwEditShell::IsOutlineCopyable( sal_uInt16 nIdx ) const
{
return lcl_IsOutlineMoveAndCopyable( GetDoc(), nIdx, true );
}
-BOOL SwEditShell::NumOrNoNum( BOOL bNumOn, BOOL bChkStart )
+sal_Bool SwEditShell::NumOrNoNum( sal_Bool bNumOn, sal_Bool bChkStart )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() == pCrsr && !pCrsr->HasMark() &&
( !bChkStart || !pCrsr->GetPoint()->nContent.GetIndex()) )
@@ -619,10 +620,10 @@ BOOL SwEditShell::NumOrNoNum( BOOL bNumOn, BOOL bChkStart )
return bRet;
}
-BOOL SwEditShell::IsNoNum( BOOL bChkStart ) const
+sal_Bool SwEditShell::IsNoNum( sal_Bool bChkStart ) const
{
// ein Backspace im Absatz ohne Nummer wird zum Delete
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
SwPaM* pCrsr = GetCrsr();
if (pCrsr->GetNext() == pCrsr && !pCrsr->HasMark() &&
@@ -639,10 +640,10 @@ BOOL SwEditShell::IsNoNum( BOOL bChkStart ) const
return bResult;
}
-BYTE SwEditShell::GetNumLevel() const
+sal_uInt8 SwEditShell::GetNumLevel() const
{
// gebe die akt. Ebene zurueck, auf der sich der Point vom Cursor befindet
- BYTE nLevel = MAXLEVEL; //end,zhaojianwei
+ sal_uInt8 nLevel = MAXLEVEL; //end,zhaojianwei
SwPaM* pCrsr = GetCrsr();
const SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode();
@@ -657,7 +658,7 @@ BYTE SwEditShell::GetNumLevel() const
const int nListLevelOfTxtNode( pTxtNd->GetActualListLevel() );
if ( nListLevelOfTxtNode >= 0 )
{
- nLevel = static_cast<BYTE>( nListLevelOfTxtNode );
+ nLevel = static_cast<sal_uInt8>( nListLevelOfTxtNode );
}
}
@@ -676,13 +677,14 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule,
{
StartAllAction();
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() != pCrsr ) // Mehrfachselektion ?
{
- GetDoc()->StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
{
aRangeArr.SetPam( n, aPam );
GetDoc()->SetNumRule( aPam, rRule,
@@ -690,24 +692,20 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule,
sal_True, bResetIndentAttrs );
GetDoc()->SetCounted( aPam, true );
}
- GetDoc()->EndUndo( UNDO_END, NULL );
}
else
{
- GetDoc()->StartUndo( UNDO_START, NULL );
-
GetDoc()->SetNumRule( *pCrsr, rRule,
bCreateNewList, sContinuedListId,
sal_True, bResetIndentAttrs );
GetDoc()->SetCounted( *pCrsr, true );
-
- GetDoc()->EndUndo( UNDO_END, NULL );
}
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
EndAllAction();
}
-String SwEditShell::GetUniqueNumRuleName( const String* pChkStr, BOOL bAutoNum ) const
+String SwEditShell::GetUniqueNumRuleName( const String* pChkStr, sal_Bool bAutoNum ) const
{
return GetDoc()->GetUniqueNumRuleName( pChkStr, bAutoNum );
}
@@ -719,27 +717,27 @@ void SwEditShell::ChgNumRuleFmts( const SwNumRule& rRule )
EndAllAction();
}
-BOOL SwEditShell::ReplaceNumRule( const String& rOldRule, const String& rNewRule )
+sal_Bool SwEditShell::ReplaceNumRule( const String& rOldRule, const String& rNewRule )
{
StartAllAction();
- BOOL bRet = GetDoc()->ReplaceNumRule( *GetCrsr()->GetPoint(), rOldRule, rNewRule );
+ sal_Bool bRet = GetDoc()->ReplaceNumRule( *GetCrsr()->GetPoint(), rOldRule, rNewRule );
EndAllAction();
return bRet;
}
-void SwEditShell::SetNumRuleStart( BOOL bFlag )
+void SwEditShell::SetNumRuleStart( sal_Bool bFlag )
{
StartAllAction();
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() != pCrsr ) // Mehrfachselektion ?
{
- GetDoc()->StartUndo( UNDO_START, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
GetDoc()->SetNumRuleStart( *aRangeArr.SetPam( n, aPam ).GetPoint(), bFlag );
- GetDoc()->EndUndo( UNDO_END, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
}
else
GetDoc()->SetNumRuleStart( *pCrsr->GetPoint(), bFlag );
@@ -747,28 +745,28 @@ void SwEditShell::SetNumRuleStart( BOOL bFlag )
EndAllAction();
}
-BOOL SwEditShell::IsNumRuleStart() const
+sal_Bool SwEditShell::IsNumRuleStart() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
const SwTxtNode* pTxtNd = GetCrsr()->GetNode()->GetTxtNode();
if( pTxtNd )
- bResult = pTxtNd->IsListRestart() ? TRUE : FALSE;
+ bResult = pTxtNd->IsListRestart() ? sal_True : sal_False;
return bResult;
}
-void SwEditShell::SetNodeNumStart( USHORT nStt )
+void SwEditShell::SetNodeNumStart( sal_uInt16 nStt )
{
StartAllAction();
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() != pCrsr ) // Mehrfachselektion ?
{
- GetDoc()->StartUndo( UNDO_START, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
- for( USHORT n = 0; n < aRangeArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
GetDoc()->SetNodeNumStart( *aRangeArr.SetPam( n, aPam ).GetPoint(), nStt );
- GetDoc()->EndUndo( UNDO_END, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
}
else
GetDoc()->SetNodeNumStart( *pCrsr->GetPoint(), nStt );
@@ -776,7 +774,7 @@ void SwEditShell::SetNodeNumStart( USHORT nStt )
EndAllAction();
}
-USHORT SwEditShell::GetNodeNumStart() const
+sal_uInt16 SwEditShell::GetNodeNumStart() const
{
const SwTxtNode* pTxtNd = GetCrsr()->GetNode()->GetTxtNode();
// correction: check, if list restart value is set at text node and
@@ -784,7 +782,7 @@ USHORT SwEditShell::GetNodeNumStart() const
// return USHRT_MAX, if no list restart value is found.
if ( pTxtNd && pTxtNd->HasAttrListRestartValue() )
{
- return static_cast<USHORT>(pTxtNd->GetAttrListRestartValue());
+ return static_cast<sal_uInt16>(pTxtNd->GetAttrListRestartValue());
}
return USHRT_MAX;
}
diff --git a/sw/source/core/edit/edredln.cxx b/sw/source/core/edit/edredln.cxx
index 2bbd97027691..44116e4ebf5c 100644
--- a/sw/source/core/edit/edredln.cxx
+++ b/sw/source/core/edit/edredln.cxx
@@ -40,12 +40,12 @@
#include "frmtool.hxx"
-USHORT SwEditShell::GetRedlineMode() const
+sal_uInt16 SwEditShell::GetRedlineMode() const
{
return GetDoc()->GetRedlineMode();
}
-void SwEditShell::SetRedlineMode( USHORT eMode )
+void SwEditShell::SetRedlineMode( sal_uInt16 eMode )
{
if( eMode != GetDoc()->GetRedlineMode() )
{
@@ -56,17 +56,17 @@ void SwEditShell::SetRedlineMode( USHORT eMode )
}
}
-BOOL SwEditShell::IsRedlineOn() const
+sal_Bool SwEditShell::IsRedlineOn() const
{
return GetDoc()->IsRedlineOn();
}
-USHORT SwEditShell::GetRedlineCount() const
+sal_uInt16 SwEditShell::GetRedlineCount() const
{
return GetDoc()->GetRedlineTbl().Count();
}
-const SwRedline& SwEditShell::GetRedline( USHORT nPos ) const
+const SwRedline& SwEditShell::GetRedline( sal_uInt16 nPos ) const
{
return *GetDoc()->GetRedlineTbl()[ nPos ];
}
@@ -83,22 +83,22 @@ void lcl_InvalidateAll( ViewShell* pSh )
} while ( pSh != pStop );
}
-BOOL SwEditShell::AcceptRedline( USHORT nPos )
+sal_Bool SwEditShell::AcceptRedline( sal_uInt16 nPos )
{
SET_CURR_SHELL( this );
StartAllAction();
- BOOL bRet = GetDoc()->AcceptRedline( nPos, true );
+ sal_Bool bRet = GetDoc()->AcceptRedline( nPos, true );
if( !nPos && !::IsExtraData( GetDoc() ) )
lcl_InvalidateAll( this );
EndAllAction();
return bRet;
}
-BOOL SwEditShell::RejectRedline( USHORT nPos )
+sal_Bool SwEditShell::RejectRedline( sal_uInt16 nPos )
{
SET_CURR_SHELL( this );
StartAllAction();
- BOOL bRet = GetDoc()->RejectRedline( nPos, true );
+ sal_Bool bRet = GetDoc()->RejectRedline( nPos, true );
if( !nPos && !::IsExtraData( GetDoc() ) )
lcl_InvalidateAll( this );
EndAllAction();
@@ -106,9 +106,9 @@ BOOL SwEditShell::RejectRedline( USHORT nPos )
}
// Kommentar am Redline setzen
-BOOL SwEditShell::SetRedlineComment( const String& rS )
+sal_Bool SwEditShell::SetRedlineComment( const String& rS )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
FOREACHPAM_START(this)
bRet = bRet || GetDoc()->SetRedlineComment( *PCURCRSR, rS );
FOREACHPAM_END()
@@ -137,11 +137,11 @@ void SwEditShell::UpdateRedlineAttr()
// suche das Redline zu diesem Data und returne die Pos im Array
// USHRT_MAX wird returnt, falls nicht vorhanden
-USHORT SwEditShell::FindRedlineOfData( const SwRedlineData& rData ) const
+sal_uInt16 SwEditShell::FindRedlineOfData( const SwRedlineData& rData ) const
{
const SwRedlineTbl& rTbl = GetDoc()->GetRedlineTbl();
- for( USHORT i = 0, nCnt = rTbl.Count(); i < nCnt; ++i )
+ for( sal_uInt16 i = 0, nCnt = rTbl.Count(); i < nCnt; ++i )
if( &rTbl[ i ]->GetRedlineData() == &rData )
return i;
return USHRT_MAX;
diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx
index 9f4ff1a4216e..62463af9f947 100644
--- a/sw/source/core/edit/edsect.cxx
+++ b/sw/source/core/edit/edsect.cxx
@@ -29,9 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-#include <doc.hxx>
#include <editsh.hxx>
+#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pam.hxx>
#include <docary.hxx>
#include <swundo.hxx> // fuer die UndoIds
@@ -51,7 +51,7 @@ SwEditShell::InsertSection(
if( !IsTableMode() )
{
StartAllAction();
- GetDoc()->StartUndo( UNDO_INSSECTION, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_INSSECTION, NULL );
FOREACHPAM_START(this)
SwSection const*const pNew =
@@ -60,25 +60,24 @@ SwEditShell::InsertSection(
pRet = pNew;
FOREACHPAM_END()
- // Undo-Klammerung hier beenden
- GetDoc()->EndUndo( UNDO_INSSECTION, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_INSSECTION, NULL );
EndAllAction();
}
return pRet;
}
-BOOL SwEditShell::IsInsRegionAvailable() const
+sal_Bool SwEditShell::IsInsRegionAvailable() const
{
if( IsTableMode() )
- return FALSE;
+ return sal_False;
SwPaM* pCrsr = GetCrsr();
if( pCrsr->GetNext() != pCrsr )
- return FALSE;
+ return sal_False;
if( pCrsr->HasMark() )
return 0 != GetDoc()->IsInsRegionAvailable( *pCrsr );
- return TRUE;
+ return sal_True;
}
@@ -96,7 +95,7 @@ const SwSection* SwEditShell::GetCurrSection() const
* Bereich innerhalb der Fussnote sein.
* --------------------------------------------------*/
-const SwSection* SwEditShell::GetAnySection( BOOL bOutOfTab, const Point* pPt ) const
+const SwSection* SwEditShell::GetAnySection( sal_Bool bOutOfTab, const Point* pPt ) const
{
SwFrm *pFrm;
if ( pPt )
@@ -108,7 +107,7 @@ const SwSection* SwEditShell::GetAnySection( BOOL bOutOfTab, const Point* pPt )
pFrm = pNd->GetFrm( pPt );
}
else
- pFrm = GetCurrFrm( FALSE );
+ pFrm = GetCurrFrm( sal_False );
if( bOutOfTab && pFrm )
pFrm = pFrm->FindTabFrm();
@@ -126,17 +125,17 @@ const SwSection* SwEditShell::GetAnySection( BOOL bOutOfTab, const Point* pPt )
return NULL;
}
-USHORT SwEditShell::GetSectionFmtCount() const
+sal_uInt16 SwEditShell::GetSectionFmtCount() const
{
return GetDoc()->GetSections().Count();
}
-BOOL SwEditShell::IsAnySectionInDoc( BOOL bChkReadOnly, BOOL bChkHidden, BOOL bChkTOX ) const
+sal_Bool SwEditShell::IsAnySectionInDoc( sal_Bool bChkReadOnly, sal_Bool bChkHidden, sal_Bool bChkTOX ) const
{
const SwSectionFmts& rFmts = GetDoc()->GetSections();
- USHORT nCnt = rFmts.Count();
- USHORT n;
+ sal_uInt16 nCnt = rFmts.Count();
+ sal_uInt16 n;
for( n = 0; n < nCnt; ++n )
{
@@ -144,8 +143,8 @@ BOOL SwEditShell::IsAnySectionInDoc( BOOL bChkReadOnly, BOOL bChkHidden, BOOL bC
const SwSectionFmt* pFmt = rFmts[ n ];
if( pFmt->IsInNodesArr() &&
(bChkTOX ||
- ((eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION
- && TOX_HEADER_SECTION != eTmpType )))
+ ( (eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION
+ && TOX_HEADER_SECTION != eTmpType ) ) )
{
const SwSection& rSect = *rFmts[ n ]->GetSection();
if( (!bChkReadOnly && !bChkHidden ) ||
@@ -157,19 +156,19 @@ BOOL SwEditShell::IsAnySectionInDoc( BOOL bChkReadOnly, BOOL bChkHidden, BOOL bC
return n != nCnt;
}
-USHORT SwEditShell::GetSectionFmtPos( const SwSectionFmt& rFmt ) const
+sal_uInt16 SwEditShell::GetSectionFmtPos( const SwSectionFmt& rFmt ) const
{
SwSectionFmt* pFmt = (SwSectionFmt*)&rFmt;
return GetDoc()->GetSections().GetPos( pFmt );
}
-const SwSectionFmt& SwEditShell::GetSectionFmt( USHORT nFmt ) const
+const SwSectionFmt& SwEditShell::GetSectionFmt( sal_uInt16 nFmt ) const
{
return *GetDoc()->GetSections()[ nFmt ];
}
-void SwEditShell::DelSectionFmt( USHORT nFmt )
+void SwEditShell::DelSectionFmt( sal_uInt16 nFmt )
{
StartAllAction();
GetDoc()->DelSectionFmt( GetDoc()->GetSections()[ nFmt ] );
@@ -252,7 +251,7 @@ void SwEditShell::_SetSectionAttr( SwSectionFmt& rSectFmt,
const SfxItemSet& rSet )
{
StartAllAction();
- if(SFX_ITEM_SET == rSet.GetItemState(RES_CNTNT, FALSE))
+ if(SFX_ITEM_SET == rSet.GetItemState(RES_CNTNT, sal_False))
{
SfxItemSet aSet(rSet);
aSet.ClearItem(RES_CNTNT);
@@ -269,9 +268,9 @@ void SwEditShell::_SetSectionAttr( SwSectionFmt& rSectFmt,
// search inside the cursor selection for full selected sections.
// if any part of section in the selection return 0.
// if more than one in the selection return the count
-USHORT SwEditShell::GetFullSelectedSectionCount() const
+sal_uInt16 SwEditShell::GetFullSelectedSectionCount() const
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
FOREACHPAM_START(this)
const SwPosition* pStt = PCURCRSR->Start(),
diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index 2e5a142b1bf8..edf9b2a9d150 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -44,6 +44,7 @@
#include <frmatr.hxx>
#include <editsh.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <cntfrm.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
@@ -66,14 +67,14 @@ using namespace ::com::sun::star::uno;
extern void ClearFEShellTabCols();
const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTblOpts,
- USHORT nRows, USHORT nCols,
+ sal_uInt16 nRows, sal_uInt16 nCols,
sal_Int16 eAdj,
const SwTableAutoFmt* pTAFmt )
{
StartAllAction();
SwPosition* pPos = GetCrsr()->GetPoint();
- BOOL bEndUndo = 0 != pPos->nContent.GetIndex();
+ sal_Bool bEndUndo = 0 != pPos->nContent.GetIndex();
if( bEndUndo )
{
StartUndo( UNDO_START );
@@ -86,7 +87,7 @@ const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTblOpts
const SwTable *pTable = GetDoc()->InsertTable( rInsTblOpts, *pPos,
nRows, nCols,
eAdj, pTAFmt,
- 0, TRUE );
+ 0, sal_True );
if( bEndUndo )
EndUndo( UNDO_END );
@@ -94,13 +95,13 @@ const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTblOpts
return *pTable;
}
-BOOL SwEditShell::TextToTable( const SwInsertTableOptions& rInsTblOpts,
+sal_Bool SwEditShell::TextToTable( const SwInsertTableOptions& rInsTblOpts,
sal_Unicode cCh,
sal_Int16 eAdj,
const SwTableAutoFmt* pTAFmt )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
- BOOL bRet = FALSE;
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
+ sal_Bool bRet = sal_False;
StartAllAction();
FOREACHPAM_START(this)
if( PCURCRSR->HasMark() )
@@ -111,10 +112,10 @@ BOOL SwEditShell::TextToTable( const SwInsertTableOptions& rInsTblOpts,
return bRet;
}
-BOOL SwEditShell::TableToText( sal_Unicode cCh )
+sal_Bool SwEditShell::TableToText( sal_Unicode cCh )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
- BOOL bRet = FALSE;
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
+ sal_Bool bRet = sal_False;
SwPaM* pCrsr = GetCrsr();
const SwTableNode* pTblNd =
GetDoc()->IsIdxInTbl( pCrsr->GetPoint()->nNode );
@@ -155,23 +156,23 @@ BOOL SwEditShell::TableToText( sal_Unicode cCh )
return bRet;
}
-BOOL SwEditShell::IsTextToTableAvailable() const
+sal_Bool SwEditShell::IsTextToTableAvailable() const
{
- BOOL bOnlyText = FALSE;
+ sal_Bool bOnlyText = sal_False;
FOREACHPAM_START(this)
if( PCURCRSR->HasMark() && *PCURCRSR->GetPoint() != *PCURCRSR->GetMark() )
{
- bOnlyText = TRUE;
+ bOnlyText = sal_True;
// pruefe ob in der Selection eine Tabelle liegt
- ULONG nStt = PCURCRSR->GetMark()->nNode.GetIndex(),
+ sal_uLong nStt = PCURCRSR->GetMark()->nNode.GetIndex(),
nEnd = PCURCRSR->GetPoint()->nNode.GetIndex();
- if( nStt > nEnd ) { ULONG n = nStt; nStt = nEnd; nEnd = n; }
+ if( nStt > nEnd ) { sal_uLong n = nStt; nStt = nEnd; nEnd = n; }
for( ; nStt <= nEnd; ++nStt )
if( !GetDoc()->GetNodes()[ nStt ]->IsTxtNode() )
{
- bOnlyText = FALSE;
+ bOnlyText = sal_False;
break;
}
@@ -185,14 +186,14 @@ BOOL SwEditShell::IsTextToTableAvailable() const
void SwEditShell::InsertDDETable( const SwInsertTableOptions& rInsTblOpts,
SwDDEFieldType* pDDEType,
- USHORT nRows, USHORT nCols,
+ sal_uInt16 nRows, sal_uInt16 nCols,
sal_Int16 eAdj )
{
SwPosition* pPos = GetCrsr()->GetPoint();
StartAllAction();
- BOOL bEndUndo = 0 != pPos->nContent.GetIndex();
+ sal_Bool bEndUndo = 0 != pPos->nContent.GetIndex();
if( bEndUndo )
{
StartUndo( UNDO_START );
@@ -258,12 +259,14 @@ void SwEditShell::SetTblChgMode( TblChgMode eMode )
{
((SwTable&)pTblNd->GetTable()).SetTblChgMode( eMode );
if( !GetDoc()->IsModified() ) // Bug 57028
- GetDoc()->SetUndoNoResetModified();
+ {
+ GetDoc()->GetIDocumentUndoRedo().SetUndoNoResetModified();
+ }
GetDoc()->SetModified();
}
}
-BOOL SwEditShell::GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const
+sal_Bool SwEditShell::GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const
{
SwSelBoxes aBoxes;
if( IsTableMode() )
@@ -280,10 +283,10 @@ BOOL SwEditShell::GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const
SwTableBox *pBox = (SwTableBox*)((SwCellFrm*)pFrm)->GetTabBox();
aBoxes.Insert( pBox );
}
- } while( FALSE );
+ } while( sal_False );
}
- for( USHORT n = 0; n < aBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aBoxes.Count(); ++n )
{
const SwTableBox* pSelBox = aBoxes[ n ];
const SwTableBoxFmt* pTblFmt = (SwTableBoxFmt*)pSelBox->GetFrmFmt();
@@ -322,7 +325,7 @@ void SwEditShell::SetTblBoxFormulaAttrs( const SfxItemSet& rSet )
SwTableBox *pBox = (SwTableBox*)((SwCellFrm*)pFrm)->GetTabBox();
aBoxes.Insert( pBox );
}
- } while( FALSE );
+ } while( sal_False );
}
// beim setzen einer Formel keine Ueberpruefung mehr vornehmen!
@@ -330,17 +333,17 @@ void SwEditShell::SetTblBoxFormulaAttrs( const SfxItemSet& rSet )
ClearTblBoxCntnt();
StartAllAction();
- GetDoc()->StartUndo( UNDO_START, NULL );
- for( USHORT n = 0; n < aBoxes.Count(); ++n )
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
+ for( sal_uInt16 n = 0; n < aBoxes.Count(); ++n )
GetDoc()->SetTblBoxFormulaAttrs( *aBoxes[ n ], rSet );
- GetDoc()->EndUndo( UNDO_END, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
EndAllAction();
}
-BOOL SwEditShell::IsTableBoxTextFormat() const
+sal_Bool SwEditShell::IsTableBoxTextFormat() const
{
if( IsTableMode() )
- return FALSE;
+ return sal_False;
SwTableBox *pBox = 0;
{
@@ -353,25 +356,25 @@ BOOL SwEditShell::IsTableBoxTextFormat() const
}
if( !pBox )
- return FALSE;
+ return sal_False;
sal_uInt32 nFmt;
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pBox->GetFrmFmt()->GetAttrSet().GetItemState(
- RES_BOXATR_FORMAT, TRUE, &pItem ))
+ RES_BOXATR_FORMAT, sal_True, &pItem ))
{
nFmt = ((SwTblBoxNumFormat*)pItem)->GetValue();
return GetDoc()->GetNumberFormatter()->IsTextFormat( nFmt ) ||
NUMBERFORMAT_TEXT == nFmt;
}
- ULONG nNd = pBox->IsValidNumTxtNd();
+ sal_uLong nNd = pBox->IsValidNumTxtNd();
if( ULONG_MAX == nNd )
- return TRUE;
+ return sal_True;
const String& rTxt = GetDoc()->GetNodes()[ nNd ]->GetTxtNode()->GetTxt();
if( !rTxt.Len() )
- return FALSE;
+ return sal_False;
double fVal;
return !GetDoc()->GetNumberFormatter()->IsNumberFormat( rTxt, nFmt, fVal );
@@ -392,57 +395,57 @@ String SwEditShell::GetTableBoxText() const
pBox = (SwTableBox*)((SwCellFrm*)pFrm)->GetTabBox();
}
- ULONG nNd;
+ sal_uLong nNd;
if( pBox && ULONG_MAX != ( nNd = pBox->IsValidNumTxtNd() ) )
sRet = GetDoc()->GetNodes()[ nNd ]->GetTxtNode()->GetTxt();
}
return sRet;
}
-BOOL SwEditShell::SplitTable( USHORT eMode )
+sal_Bool SwEditShell::SplitTable( sal_uInt16 eMode )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwPaM *pCrsr = GetCrsr();
if( pCrsr->GetNode()->FindTableNode() )
{
StartAllAction();
- GetDoc()->StartUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
- bRet = GetDoc()->SplitTable( *pCrsr->GetPoint(), eMode, TRUE );
+ bRet = GetDoc()->SplitTable( *pCrsr->GetPoint(), eMode, sal_True );
- GetDoc()->EndUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
ClearFEShellTabCols();
EndAllAction();
}
return bRet;
}
-BOOL SwEditShell::MergeTable( BOOL bWithPrev, USHORT nMode )
+sal_Bool SwEditShell::MergeTable( sal_Bool bWithPrev, sal_uInt16 nMode )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwPaM *pCrsr = GetCrsr();
if( pCrsr->GetNode()->FindTableNode() )
{
StartAllAction();
- GetDoc()->StartUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
bRet = GetDoc()->MergeTable( *pCrsr->GetPoint(), bWithPrev, nMode );
- GetDoc()->EndUndo(UNDO_EMPTY, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_EMPTY, NULL);
ClearFEShellTabCols();
EndAllAction();
}
return bRet;
}
-BOOL SwEditShell::CanMergeTable( BOOL bWithPrev, BOOL* pChkNxtPrv ) const
+sal_Bool SwEditShell::CanMergeTable( sal_Bool bWithPrev, sal_Bool* pChkNxtPrv ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwPaM *pCrsr = GetCrsr();
const SwTableNode* pTblNd = pCrsr->GetNode()->FindTableNode();
if( pTblNd && !pTblNd->GetTable().ISA( SwDDETable ))
{
- BOOL bNew = pTblNd->GetTable().IsNewModel();
+ sal_Bool bNew = pTblNd->GetTable().IsNewModel();
const SwNodes& rNds = GetDoc()->GetNodes();
if( pChkNxtPrv )
{
@@ -451,13 +454,13 @@ BOOL SwEditShell::CanMergeTable( BOOL bWithPrev, BOOL* pChkNxtPrv ) const
bNew == pChkNd->GetTable().IsNewModel() &&
// Consider table in table case
pChkNd->EndOfSectionIndex() == pTblNd->GetIndex() - 1 )
- *pChkNxtPrv = TRUE, bRet = TRUE; // mit Prev ist moeglich
+ *pChkNxtPrv = sal_True, bRet = sal_True; // mit Prev ist moeglich
else
{
pChkNd = rNds[ pTblNd->EndOfSectionIndex() + 1 ]->GetTableNode();
if( pChkNd && !pChkNd->GetTable().ISA( SwDDETable ) &&
bNew == pChkNd->GetTable().IsNewModel() )
- *pChkNxtPrv = FALSE, bRet = TRUE; // mit Next ist moeglich
+ *pChkNxtPrv = sal_False, bRet = sal_True; // mit Next ist moeglich
}
}
else
@@ -482,7 +485,7 @@ BOOL SwEditShell::CanMergeTable( BOOL bWithPrev, BOOL* pChkNxtPrv ) const
}
// setze das InsertDB als Tabelle Undo auf:
-void SwEditShell::AppendUndoForInsertFromDB( BOOL bIsTable )
+void SwEditShell::AppendUndoForInsertFromDB( sal_Bool bIsTable )
{
GetDoc()->AppendUndoForInsertFromDB( *GetCrsr(), bIsTable );
}
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index bfe064945dce..b86a70f01be5 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -28,24 +28,31 @@
// 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>
-
#include <tools/urlobj.hxx>
-#include <svtools/txtcmp.hxx>
+
#include <svl/fstathelper.hxx>
+
+#include <svtools/txtcmp.hxx>
+
#include <sfx2/docfile.hxx>
-#include "editeng/unolingu.hxx"
+
+#include <xmloff/odffields.hxx>
+
+#include <editeng/unolingu.hxx>
+
#include <swtypes.hxx>
#include <editsh.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pam.hxx>
#include <viewopt.hxx>
#include <ndtxt.hxx>
#include <swundo.hxx>
-#include <undobj.hxx>
#include <txttxmrk.hxx>
#include <edimp.hxx>
#include <tox.hxx>
@@ -54,7 +61,6 @@
#include <mdiexp.hxx>
#include <statstr.hrc>
#include <bookmrk.hxx>
-#include <xmloff/odffields.hxx>
using namespace ::com::sun::star;
@@ -69,7 +75,7 @@ using namespace ::com::sun::star::util;
void SwEditShell::Insert(const SwTOXMark& rMark)
{
- BOOL bInsAtPos = rMark.IsAlternativeText();
+ sal_Bool bInsAtPos = rMark.IsAlternativeText();
StartAllAction();
FOREACHPAM_START(this)
@@ -107,19 +113,19 @@ void SwEditShell::DeleteTOXMark( SwTOXMark* pMark )
Beschreibung: Alle Verzeichnismarkierungen am SPoint zusammensuchen
--------------------------------------------------------------------*/
-USHORT SwEditShell::GetCurTOXMarks(SwTOXMarks& rMarks) const
+sal_uInt16 SwEditShell::GetCurTOXMarks(SwTOXMarks& rMarks) const
{
return GetDoc()->GetCurTOXMark( *GetCrsr()->Start(), rMarks );
}
-BOOL SwEditShell::IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const
+sal_Bool SwEditShell::IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const
{
OSL_ENSURE( rTOXBase.ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
const SwTOXBaseSection& rTOXSect = (const SwTOXBaseSection&)rTOXBase;
return rTOXSect.IsProtect();
}
-void SwEditShell::SetTOXBaseReadonly(const SwTOXBase& rTOXBase, BOOL bReadonly)
+void SwEditShell::SetTOXBaseReadonly(const SwTOXBase& rTOXBase, sal_Bool bReadonly)
{
OSL_ENSURE( rTOXBase.ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
const SwTOXBaseSection& rTOXSect = (const SwTOXBaseSection&)rTOXBase;
@@ -131,7 +137,7 @@ void SwEditShell::SetTOXBaseReadonly(const SwTOXBase& rTOXBase, BOOL bReadonly)
UpdateSection( GetSectionFmtPos( *rTOXSect.GetFmt() ), aSectionData, 0 );
}
-const SwTOXBase* SwEditShell::GetDefaultTOXBase( TOXTypes eTyp, BOOL bCreate )
+const SwTOXBase* SwEditShell::GetDefaultTOXBase( TOXTypes eTyp, sal_Bool bCreate )
{
return GetDoc()->GetDefaultTOXBase( eTyp, bCreate );
}
@@ -156,7 +162,7 @@ void SwEditShell::InsertTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
// Einfuegen des Verzeichnisses
const SwTOXBaseSection* pTOX = pDoc->InsertTableOf(
- *GetCrsr()->GetPoint(), rTOX, pSet, TRUE );
+ *GetCrsr()->GetPoint(), rTOX, pSet, sal_True );
OSL_ENSURE(pTOX, "Kein aktuelles Verzeichnis");
// Formatierung anstossen
@@ -177,9 +183,9 @@ void SwEditShell::InsertTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
Beschreibung: Verzeichnisinhalt erneuern
--------------------------------------------------------------------*/
-BOOL SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
+sal_Bool SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
OSL_ENSURE( rTOX.ISA( SwTOXBaseSection ), "keine TOXBaseSection!" );
SwTOXBaseSection* pTOX = (SwTOXBaseSection*)&rTOX;
@@ -190,14 +196,14 @@ BOOL SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
SwDoc* pMyDoc = GetDoc();
SwDocShell* pDocSh = pMyDoc->GetDocShell();
- BOOL bInIndex = pTOX == GetCurTOX();
+ sal_Bool bInIndex = pTOX == GetCurTOX();
SET_CURR_SHELL( this );
StartAllAction();
::StartProgress( STR_STATSTR_TOX_UPDATE, 0, 0, pDocSh );
::SetProgressText( STR_STATSTR_TOX_UPDATE, pDocSh );
- pMyDoc->StartUndo(UNDO_TOXCHANGE, NULL);
+ pMyDoc->GetIDocumentUndoRedo().StartUndo(UNDO_TOXCHANGE, NULL);
// Verzeichnisrumpf erzeugen
pTOX->Update(pSet);
@@ -212,7 +218,7 @@ BOOL SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
// Seitennummern eintragen
pTOX->UpdatePageNum();
- pMyDoc->EndUndo(UNDO_TOXCHANGE, NULL);
+ pMyDoc->GetIDocumentUndoRedo().EndUndo(UNDO_TOXCHANGE, NULL);
::EndProgress( pDocSh );
EndAllAction();
@@ -230,7 +236,7 @@ const SwTOXBase* SwEditShell::GetCurTOX() const
return GetDoc()->GetCurTOX( *GetCrsr()->GetPoint() );
}
-BOOL SwEditShell::DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes )
+sal_Bool SwEditShell::DeleteTOX( const SwTOXBase& rTOXBase, sal_Bool bDelNodes )
{
return GetDoc()->DeleteTOX( (SwTOXBase&)rTOXBase, bDelNodes );
}
@@ -239,7 +245,7 @@ BOOL SwEditShell::DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes )
Beschreibung: Typen der Verzeichnisse verwalten
--------------------------------------------------------------------*/
-const SwTOXType* SwEditShell::GetTOXType(TOXTypes eTyp, USHORT nId) const
+const SwTOXType* SwEditShell::GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const
{
return pDoc->GetTOXType(eTyp, nId);
}
@@ -248,17 +254,17 @@ const SwTOXType* SwEditShell::GetTOXType(TOXTypes eTyp, USHORT nId) const
Beschreibung: Schluessel fuer Stichwortverzeichnisse verwalten
--------------------------------------------------------------------*/
-USHORT SwEditShell::GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const
+sal_uInt16 SwEditShell::GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const
{
return GetDoc()->GetTOIKeys( eTyp, rArr );
}
-USHORT SwEditShell::GetTOXCount() const
+sal_uInt16 SwEditShell::GetTOXCount() const
{
const SwSectionFmts& rFmts = GetDoc()->GetSections();
- USHORT nRet = 0;
- for( USHORT n = rFmts.Count(); n; )
+ sal_uInt16 nRet = 0;
+ for( sal_uInt16 n = rFmts.Count(); n; )
{
const SwSection* pSect = rFmts[ --n ]->GetSection();
if( TOX_CONTENT_SECTION == pSect->GetType() &&
@@ -269,10 +275,10 @@ USHORT SwEditShell::GetTOXCount() const
}
-const SwTOXBase* SwEditShell::GetTOX( USHORT nPos ) const
+const SwTOXBase* SwEditShell::GetTOX( sal_uInt16 nPos ) const
{
const SwSectionFmts& rFmts = GetDoc()->GetSections();
- for( USHORT n = 0, nCnt = 0; n < rFmts.Count(); ++n )
+ for( sal_uInt16 n = 0, nCnt = 0; n < rFmts.Count(); ++n )
{
const SwSection* pSect = rFmts[ n ]->GetSection();
if( TOX_CONTENT_SECTION == pSect->GetType() &&
@@ -288,13 +294,13 @@ const SwTOXBase* SwEditShell::GetTOX( USHORT nPos ) const
// nach einlesen einer Datei alle Verzeichnisse updaten
-void SwEditShell::SetUpdateTOX( BOOL bFlag )
+void SwEditShell::SetUpdateTOX( sal_Bool bFlag )
{
GetDoc()->SetUpdateTOX( bFlag );
}
-BOOL SwEditShell::IsUpdateTOX() const
+sal_Bool SwEditShell::IsUpdateTOX() const
{
return GetDoc()->IsUpdateTOX();
}
@@ -312,8 +318,8 @@ void SwEditShell::SetTOIAutoMarkURL(const String& rSet)
void SwEditShell::ApplyAutoMark()
{
StartAllAction();
- BOOL bDoesUndo = DoesUndo();
- DoUndo(FALSE);
+ sal_Bool bDoesUndo = DoesUndo();
+ DoUndo(sal_False);
//1. remove all automatic generated index entries if AutoMarkURL has a
// length and the file exists
//2. load file
@@ -335,7 +341,7 @@ void SwEditShell::ApplyAutoMark()
}
//2.
- SfxMedium aMedium( sAutoMarkURL, STREAM_STD_READ, TRUE );
+ SfxMedium aMedium( sAutoMarkURL, STREAM_STD_READ, sal_True );
SvStream& rStrm = *aMedium.GetInStream();
const String sZero('0');
Push();
@@ -344,16 +350,16 @@ void SwEditShell::ApplyAutoMark()
//
// SearchOptions to be used in loop below
//
- BOOL bCaseSensitive = TRUE;
- BOOL bWordOnly = FALSE;
- BOOL bSrchInSel = FALSE;
- BOOL bLEV_Relaxed = TRUE;
- INT32 nLEV_Other = 2; // -> changedChars;
- INT32 nLEV_Longer = 3; //! -> deletedChars;
- INT32 nLEV_Shorter = 1; //! -> insertedChars;
- INT32 nTransliterationFlags = 0;
+ sal_Bool bCaseSensitive = sal_True;
+ sal_Bool bWordOnly = sal_False;
+ sal_Bool bSrchInSel = sal_False;
+ sal_Bool bLEV_Relaxed = sal_True;
+ sal_Int32 nLEV_Other = 2; // -> changedChars;
+ sal_Int32 nLEV_Longer = 3; //! -> deletedChars;
+ sal_Int32 nLEV_Shorter = 1; //! -> insertedChars;
+ sal_Int32 nTransliterationFlags = 0;
//
- INT32 nSrchFlags = 0;
+ sal_Int32 nSrchFlags = 0;
if (!bCaseSensitive)
{
nSrchFlags |= SearchFlags::ALL_IGNORE_CASE;
@@ -420,13 +426,13 @@ void SwEditShell::ApplyAutoMark()
aSearchOpt.searchString = sToSelect;
KillPams();
- BOOL bCancel;
+ sal_Bool bCancel;
// todo/mba: assuming that notes shouldn't be searched
- BOOL bSearchInNotes = FALSE;
- ULONG nRet = Find( aSearchOpt, bSearchInNotes, DOCPOS_START, DOCPOS_END, bCancel,
+ sal_Bool bSearchInNotes = sal_False;
+ sal_uLong nRet = Find( aSearchOpt, bSearchInNotes, DOCPOS_START, DOCPOS_END, bCancel,
(FindRanges)(FND_IN_SELALL|FND_IN_BODYONLY),
- FALSE );
+ sal_False );
if(nRet)
{
@@ -439,8 +445,8 @@ void SwEditShell::ApplyAutoMark()
}
if(sAlternative.Len())
pTmpMark->SetAlternativeText(sAlternative);
- pTmpMark->SetMainEntry(FALSE);
- pTmpMark->SetAutoGenerated(TRUE);
+ pTmpMark->SetMainEntry(sal_False);
+ pTmpMark->SetAutoGenerated(sal_True);
//4.
SwEditShell::Insert(*pTmpMark);
}
@@ -448,7 +454,7 @@ void SwEditShell::ApplyAutoMark()
}
}
KillPams();
- Pop(FALSE);
+ Pop(sal_False);
}
DoUndo(bDoesUndo);
EndAllAction();
diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx
index ba44432e6ec4..8366ec3bf6fc 100644
--- a/sw/source/core/edit/edundo.cxx
+++ b/sw/source/core/edit/edundo.cxx
@@ -29,18 +29,20 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <svx/svdview.hxx>
+
#include <editsh.hxx>
#include <fesh.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pam.hxx>
-#include <undobj.hxx>
+#include <UndoCore.hxx>
#include <swundo.hxx>
#include <dcontact.hxx>
#include <flyfrm.hxx>
#include <frmfmt.hxx>
#include <viewimp.hxx>
+#include <docsh.hxx>
/** helper function to select all objects in an SdrMarkList;
@@ -48,16 +50,64 @@
void lcl_SelectSdrMarkList( SwEditShell* pShell,
const SdrMarkList* pSdrMarkList );
+bool SwEditShell::CursorsLocked() const
+{
+
+ return GetDoc()->GetDocShell()->GetModel()->hasControllersLocked();
+}
+
+void
+SwEditShell::HandleUndoRedoContext(::sw::UndoRedoContext & rContext)
+{
+ // do nothing if somebody has locked controllers!
+ if (CursorsLocked())
+ {
+ return;
+ }
+
+ SwFrmFmt * pSelFmt(0);
+ SdrMarkList * pMarkList(0);
+ rContext.GetSelections(pSelFmt, pMarkList);
+
+ if (pSelFmt) // select frame
+ {
+ if (RES_DRAWFRMFMT == pSelFmt->Which())
+ {
+ SdrObject* pSObj = pSelFmt->FindSdrObject();
+ static_cast<SwFEShell*>(this)->SelectObj(
+ pSObj->GetCurrentBoundRect().Center() );
+ }
+ else
+ {
+ Point aPt;
+ SwFlyFrm *const pFly =
+ static_cast<SwFlyFrmFmt*>(pSelFmt)->GetFrm(& aPt, false);
+ if (pFly)
+ {
+ static_cast<SwFEShell*>(this)->SelectFlyFrm(*pFly, true);
+ }
+ }
+ }
+ else if (pMarkList)
+ {
+ lcl_SelectSdrMarkList( this, pMarkList );
+ }
+ else if (GetCrsr()->GetNext() != GetCrsr())
+ {
+ // current cursor is the last one:
+ // go around the ring, to the first cursor
+ GoNextCrsr();
+ }
+}
-BOOL SwEditShell::Undo( SwUndoId nUndoId, USHORT nCnt )
+bool SwEditShell::Undo(sal_uInt16 const nCount)
{
SET_CURR_SHELL( this );
// current undo state was not saved
- BOOL bRet = FALSE;
- BOOL bSaveDoesUndo = GetDoc()->DoesUndo();
+ ::sw::UndoGuard const undoGuard(GetDoc()->GetIDocumentUndoRedo());
+ sal_Bool bRet = sal_False;
- GetDoc()->DoUndo( FALSE );
StartAllAction();
{
// eigentlich muesste ja nur der aktuelle Cursor berarbeitet
@@ -70,8 +120,9 @@ BOOL SwEditShell::Undo( SwUndoId nUndoId, USHORT nCnt )
// JP 02.04.98: Cursor merken - beim Auto-Format/-Korrektur
// soll dieser wieder an die Position
- SwUndoId nLastUndoId = GetDoc()->GetUndoIds(NULL, NULL);
- BOOL bRestoreCrsr = 1 == nCnt && ( UNDO_AUTOFORMAT == nLastUndoId ||
+ SwUndoId nLastUndoId(UNDO_EMPTY);
+ GetDoc()->GetIDocumentUndoRedo().GetLastUndoInfo(0, & nLastUndoId);
+ bool bRestoreCrsr = 1 == nCount && (UNDO_AUTOFORMAT == nLastUndoId ||
UNDO_AUTOCORRECT == nLastUndoId );
Push();
@@ -81,51 +132,19 @@ BOOL SwEditShell::Undo( SwUndoId nUndoId, USHORT nCnt )
RedlineMode_t eOld = GetDoc()->GetRedlineMode();
- SwUndoIter aUndoIter( GetCrsr(), nUndoId );
- while( nCnt-- )
- {
- do {
-
- bRet = GetDoc()->Undo( aUndoIter ) || bRet;
-
- if( !aUndoIter.IsNextUndo() )
- break;
-
- // es geht weiter, also erzeuge einen neuen Cursor wenn
- // der alte schon eine Selection hat
- // JP 02.04.98: aber nicht wenns ein Autoformat ist
- if( !bRestoreCrsr && HasSelection() )
- {
- CreateCrsr();
- aUndoIter.pAktPam = GetCrsr();
- }
- } while( TRUE );
- }
-
- Pop( !bRestoreCrsr );
-
- if( aUndoIter.pSelFmt ) // dann erzeuge eine Rahmen-Selection
- {
- if( RES_DRAWFRMFMT == aUndoIter.pSelFmt->Which() )
+ try {
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
- SdrObject* pSObj = aUndoIter.pSelFmt->FindSdrObject();
- ((SwFEShell*)this)->SelectObj( pSObj->GetCurrentBoundRect().Center() );
+ bRet = GetDoc()->GetIDocumentUndoRedo().Undo()
+ || bRet;
}
- else
- {
- Point aPt;
- SwFlyFrm* pFly = ((SwFlyFrmFmt*)aUndoIter.pSelFmt)->GetFrm(
- &aPt, FALSE );
- if( pFly )
- ((SwFEShell*)this)->SelectFlyFrm( *pFly, TRUE );
- }
- }
- else if( aUndoIter.pMarkList )
- {
- lcl_SelectSdrMarkList( this, aUndoIter.pMarkList );
+ } catch (::com::sun::star::uno::Exception & e) {
+ OSL_TRACE("SwEditShell::Undo(): exception caught:\n %s",
+ ::rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8)
+ .getStr());
}
- else if( GetCrsr()->GetNext() != GetCrsr() ) // gehe nach einem
- GoNextCrsr(); // Undo zur alten Undo-Position !!
+
+ Pop( !bRestoreCrsr );
GetDoc()->SetRedlineMode( eOld );
GetDoc()->CompressRedlines();
@@ -135,21 +154,18 @@ BOOL SwEditShell::Undo( SwUndoId nUndoId, USHORT nCnt )
}
EndAllAction();
- // undo state was not restored but set to FALSE everytime
- GetDoc()->DoUndo( bSaveDoesUndo );
return bRet;
}
-USHORT SwEditShell::Redo( USHORT nCnt )
+bool SwEditShell::Redo(sal_uInt16 const nCount)
{
SET_CURR_SHELL( this );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// undo state was not saved
- BOOL bSaveDoesUndo = GetDoc()->DoesUndo();
+ ::sw::UndoGuard const undoGuard(GetDoc()->GetIDocumentUndoRedo());
- GetDoc()->DoUndo( FALSE );
StartAllAction();
{
@@ -167,51 +183,17 @@ USHORT SwEditShell::Redo( USHORT nCnt )
RedlineMode_t eOld = GetDoc()->GetRedlineMode();
- SwUndoIter aUndoIter( GetCrsr(), UNDO_EMPTY );
- while( nCnt-- )
- {
- do {
-
- bRet = GetDoc()->Redo( aUndoIter ) || bRet;
-
- if( !aUndoIter.IsNextUndo() )
- break;
-
- // es geht weiter, also erzeugen einen neuen Cursor wenn
- // der alte schon eine SSelection hat
- if( HasSelection() )
- {
- CreateCrsr();
- aUndoIter.pAktPam = GetCrsr();
- }
- } while( TRUE );
- }
-
- if( aUndoIter.IsUpdateAttr() )
- UpdateAttr();
-
- if( aUndoIter.pSelFmt ) // dann erzeuge eine Rahmen-Selection
- {
- if( RES_DRAWFRMFMT == aUndoIter.pSelFmt->Which() )
+ try {
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
- SdrObject* pSObj = aUndoIter.pSelFmt->FindSdrObject();
- ((SwFEShell*)this)->SelectObj( pSObj->GetCurrentBoundRect().Center() );
+ bRet = GetDoc()->GetIDocumentUndoRedo().Redo()
+ || bRet;
}
- else
- {
- Point aPt;
- SwFlyFrm* pFly = ((SwFlyFrmFmt*)aUndoIter.pSelFmt)->GetFrm(
- &aPt, FALSE );
- if( pFly )
- ((SwFEShell*)this)->SelectFlyFrm( *pFly, TRUE );
- }
- }
- else if( aUndoIter.pMarkList )
- {
- lcl_SelectSdrMarkList( this, aUndoIter.pMarkList );
+ } catch (::com::sun::star::uno::Exception & e) {
+ OSL_TRACE("SwEditShell::Redo(): exception caught:\n %s",
+ ::rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8)
+ .getStr());
}
- else if( GetCrsr()->GetNext() != GetCrsr() ) // gehe nach einem
- GoNextCrsr(); // Redo zur alten Undo-Position !!
GetDoc()->SetRedlineMode( eOld );
GetDoc()->CompressRedlines();
@@ -222,41 +204,31 @@ USHORT SwEditShell::Redo( USHORT nCnt )
EndAllAction();
- // undo state was not restored but set FALSE everytime
- GetDoc()->DoUndo( bSaveDoesUndo );
return bRet;
}
-USHORT SwEditShell::Repeat( USHORT nCount )
+bool SwEditShell::Repeat(sal_uInt16 const nCount)
{
SET_CURR_SHELL( this );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
StartAllAction();
- SwUndoIter aUndoIter( GetCrsr(), UNDO_EMPTY );
- bRet = GetDoc()->Repeat( aUndoIter, nCount ) || bRet;
+ try {
+ ::sw::RepeatContext context(*GetDoc(), *GetCrsr());
+ bRet = GetDoc()->GetIDocumentUndoRedo().Repeat( context, nCount )
+ || bRet;
+ } catch (::com::sun::star::uno::Exception & e) {
+ OSL_TRACE("SwEditShell::Repeat(): exception caught:\n %s",
+ ::rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8)
+ .getStr());
+ }
EndAllAction();
return bRet;
}
- // abfragen/setzen der Anzahl von wiederherstellbaren Undo-Actions
-
-USHORT SwEditShell::GetUndoActionCount()
-{
- return SwDoc::GetUndoActionCount();
-}
-
-
-void SwEditShell::SetUndoActionCount( USHORT nNew )
-{
- SwDoc::SetUndoActionCount( nNew );
-}
-
-
-
void lcl_SelectSdrMarkList( SwEditShell* pShell,
const SdrMarkList* pSdrMarkList )
@@ -267,7 +239,7 @@ void lcl_SelectSdrMarkList( SwEditShell* pShell,
if( pShell->ISA( SwFEShell ) )
{
SwFEShell* pFEShell = static_cast<SwFEShell*>( pShell );
- for( USHORT i = 0; i < pSdrMarkList->GetMarkCount(); ++i )
+ for( sal_uInt16 i = 0; i < pSdrMarkList->GetMarkCount(); ++i )
pFEShell->SelectObj( Point(),
(i==0) ? 0 : SW_ADD_SELECT,
pSdrMarkList->GetMark( i )->GetMarkedSdrObj() );
diff --git a/sw/source/core/edit/edws.cxx b/sw/source/core/edit/edws.cxx
index 2132a8698b29..bb34343dc65e 100644
--- a/sw/source/core/edit/edws.cxx
+++ b/sw/source/core/edit/edws.cxx
@@ -29,12 +29,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
-
#include <vcl/window.hxx>
+
#include <editsh.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pam.hxx>
#include <docary.hxx>
#include <acorrect.hxx>
@@ -60,7 +59,7 @@ SwEditShell::SwEditShell( SwEditShell& rEdSH, Window *pWindow )
SwEditShell::SwEditShell( SwDoc& rDoc, Window *pWindow, const SwViewOption *pOptions )
: SwCrsrShell( rDoc, pWindow, pOptions )
{
- GetDoc()->DoUndo(true);
+ GetDoc()->GetIDocumentUndoRedo().DoUndo(true);
}
@@ -99,7 +98,7 @@ void SwEditShell::ResetModified()
void SwEditShell::SetUndoNoResetModified()
{
GetDoc()->SetModified();
- GetDoc()->SetUndoNoResetModified();
+ GetDoc()->GetIDocumentUndoRedo().SetUndoNoResetModified();
}
/******************************************************************************
@@ -262,24 +261,24 @@ void SwEditShell::InsertTOXType(const SwTOXType& rTyp)
void SwEditShell::DoUndo( sal_Bool bOn )
-{ GetDoc()->DoUndo( bOn ); }
+{ GetDoc()->GetIDocumentUndoRedo().DoUndo( bOn ); }
sal_Bool SwEditShell::DoesUndo() const
-{ return GetDoc()->DoesUndo(); }
+{ return GetDoc()->GetIDocumentUndoRedo().DoesUndo(); }
void SwEditShell::DoGroupUndo( sal_Bool bOn )
-{ GetDoc()->DoGroupUndo( bOn ); }
+{ GetDoc()->GetIDocumentUndoRedo().DoGroupUndo( bOn ); }
sal_Bool SwEditShell::DoesGroupUndo() const
-{ return GetDoc()->DoesGroupUndo(); }
+{ return GetDoc()->GetIDocumentUndoRedo().DoesGroupUndo(); }
void SwEditShell::DelAllUndoObj()
{
- GetDoc()->DelAllUndoObj();
+ GetDoc()->GetIDocumentUndoRedo().DelAllUndoObj();
}
// Zusammenfassen von Kontinuierlichen Insert/Delete/Overwrite von
@@ -290,44 +289,25 @@ void SwEditShell::DelAllUndoObj()
SwUndoId SwEditShell::StartUndo( SwUndoId eUndoId,
const SwRewriter *pRewriter )
-{ return GetDoc()->StartUndo( eUndoId, pRewriter ); }
+{ return GetDoc()->GetIDocumentUndoRedo().StartUndo( eUndoId, pRewriter ); }
// schliesst Klammerung der nUndoId, nicht vom UI benutzt
SwUndoId SwEditShell::EndUndo(SwUndoId eUndoId,
const SwRewriter *pRewriter)
-{ return GetDoc()->EndUndo(eUndoId, pRewriter); }
-
-// liefert die Id der letzten undofaehigen Aktion zurueck
-// fuellt ggf. VARARR mit sdbcx::User-UndoIds
-
-
-SwUndoId SwEditShell::GetUndoIds(String* pStr,SwUndoIds *pUndoIds) const
-{ return GetDoc()->GetUndoIds(pStr,pUndoIds); }
-
-String SwEditShell::GetUndoIdsStr(String* pStr,SwUndoIds *pUndoIds) const
-{ return GetDoc()->GetUndoIdsStr(pStr,pUndoIds); }
-
-// liefert die Id der letzten Redofaehigen Aktion zurueck
-// fuellt ggf. VARARR mit RedoIds
-
-
-SwUndoId SwEditShell::GetRedoIds(String* pStr,SwUndoIds *pRedoIds) const
-{ return GetDoc()->GetRedoIds(pStr,pRedoIds); }
-
-String SwEditShell::GetRedoIdsStr(String* pStr,SwUndoIds *pRedoIds) const
-{ return GetDoc()->GetRedoIdsStr(pStr,pRedoIds); }
+{ return GetDoc()->GetIDocumentUndoRedo().EndUndo(eUndoId, pRewriter); }
-// liefert die Id der letzten Repeatfaehigen Aktion zurueck
-// fuellt ggf. VARARR mit RedoIds
+bool SwEditShell::GetLastUndoInfo(::rtl::OUString *const o_pStr,
+ SwUndoId *const o_pId) const
+{ return GetDoc()->GetIDocumentUndoRedo().GetLastUndoInfo(o_pStr, o_pId); }
-SwUndoId SwEditShell::GetRepeatIds(String* pStr, SwUndoIds *pRedoIds) const
-{ return GetDoc()->GetRepeatIds(pStr,pRedoIds); }
+bool SwEditShell::GetFirstRedoInfo(::rtl::OUString *const o_pStr) const
+{ return GetDoc()->GetIDocumentUndoRedo().GetFirstRedoInfo(o_pStr); }
-String SwEditShell::GetRepeatIdsStr(String* pStr, SwUndoIds *pRedoIds) const
-{ return GetDoc()->GetRepeatIdsStr(pStr,pRedoIds); }
+SwUndoId SwEditShell::GetRepeatInfo(::rtl::OUString *const o_pStr) const
+{ return GetDoc()->GetIDocumentUndoRedo().GetRepeatInfo(o_pStr); }
diff --git a/sw/source/core/edit/makefile.mk b/sw/source/core/edit/makefile.mk
deleted file mode 100644
index 355d667b823c..000000000000
--- a/sw/source/core/edit/makefile.mk
+++ /dev/null
@@ -1,71 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=edit
-
-AUTOSEG=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES=\
- $(SLO)$/acorrect.obj \
- $(SLO)$/autofmt.obj \
- $(SLO)$/edatmisc.obj \
- $(SLO)$/edattr.obj \
- $(SLO)$/eddel.obj \
- $(SLO)$/edfcol.obj \
- $(SLO)$/edfld.obj \
- $(SLO)$/edfldexp.obj \
- $(SLO)$/edfmt.obj \
- $(SLO)$/edglbldc.obj \
- $(SLO)$/edglss.obj \
- $(SLO)$/editsh.obj \
- $(SLO)$/edlingu.obj \
- $(SLO)$/ednumber.obj \
- $(SLO)$/edredln.obj \
- $(SLO)$/edsect.obj \
- $(SLO)$/edtab.obj \
- $(SLO)$/edtox.obj \
- $(SLO)$/edundo.obj \
- $(SLO)$/edws.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/except/dbgloop.cxx b/sw/source/core/except/dbgloop.cxx
new file mode 100644
index 000000000000..0cf08c601422
--- /dev/null
+++ b/sw/source/core/except/dbgloop.cxx
@@ -0,0 +1,168 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+#ifdef DBG_UTIL
+
+#include <tools/stream.hxx>
+#include "dbgloop.hxx"
+#include "errhdl.hxx"
+
+DbgLoopStack DbgLoop::aDbgLoopStack;
+
+/*************************************************************************
+ * class DbgLoopStack
+ *************************************************************************/
+
+DbgLoopStack::DbgLoopStack()
+{
+ Reset();
+}
+
+void DbgLoopStack::Reset()
+{
+ nPtr = 0;
+ pDbg = 0;
+ for( sal_uInt16 i = 0; i < DBG_MAX_STACK; ++i )
+ aCount[i] = 0;
+}
+
+/*************************************************************************
+ * DbgLoopStack::Push()
+ *************************************************************************/
+
+void DbgLoopStack::Push( const void *pThis )
+{
+ // Wir muessen irgendwie mitbekommen, wann die erste Stackposition
+ // resettet werden soll, z.B. wenn wir einen Nullpointer uebergeben
+ if( !nPtr && ( pDbg != pThis || !pThis ) )
+ {
+ aCount[1] = 0;
+ pDbg = pThis;
+ }
+
+ ++nPtr;
+ if( DBG_MAX_STACK > nPtr )
+ {
+ // Wenn eine loop entdeckt wird, wird der counter wieder zurueckgesetzt.
+ ASSERT( DBG_MAX_LOOP > aCount[nPtr], "DbgLoopStack::Push: loop detected" );
+ if( DBG_MAX_LOOP > aCount[nPtr] )
+ ++(aCount[nPtr]);
+ else
+ aCount[nPtr] = 0;
+ }
+}
+
+/*************************************************************************
+ * DbgLoopStack::Pop()
+ *************************************************************************/
+
+void DbgLoopStack::Pop()
+{
+ if( DBG_MAX_STACK > nPtr )
+ {
+ ASSERT( nPtr, "DbgLoopStack::Pop: can't pop the stack" );
+
+ ASSERT( aCount[nPtr], "DbgLoopStack::Pop: can't dec the count" );
+ if( DBG_MAX_STACK > nPtr + 1 )
+ aCount[nPtr + 1] = 0;
+ }
+ --nPtr;
+}
+
+/*************************************************************************
+ * DbgLoopStack::Print()
+ *************************************************************************/
+
+void DbgLoopStack::Print( SvStream &rOS ) const
+{
+ rOS << "POS: " << nPtr << '\n';
+ sal_uInt16 i;
+ for( i = 0; i < DBG_MAX_STACK; ++i )
+ rOS << i << " ";
+ rOS << '\n';
+ for( i = 0; i < DBG_MAX_STACK; ++i )
+ rOS << aCount[i] << " ";
+ rOS << '\n';
+}
+
+#ifdef STAND_ALONE
+// compile with: cl /AL /DSTAND_ALONE dbgloop.cxx
+
+/*************************************************************************
+ * main()
+ *************************************************************************/
+
+#include <stdlib.h>
+
+void AssertFail( const char *pErr, const char *pFile, sal_uInt16 nLine )
+{
+ cout << pErr << '\n';
+ PrintLoopStack( cout );
+ exit(0);
+}
+
+class Test
+{
+public:
+ void Run() const;
+};
+
+void Test::Run() const
+{
+ cout << "---" << '\n';
+ for( sal_uInt16 i = 0; i < 10; ++i )
+ {
+ cout << "i" << i;
+ DBG_LOOP;
+ PrintLoopStack( cout );
+ for( sal_uInt16 j = 0; j < 10; ++j )
+ {
+ cout << " j" << j;
+ DBG_LOOP;
+ PrintLoopStack( cout );
+ }
+ cout << '\n';
+ }
+ PrintLoopStack( cout );
+}
+
+int main()
+{
+ // unterschiedliche Instanzen waehlen wg. pDbg != pThis
+ Test aTest1;
+ aTest1.Run();
+ Test aTest2;
+ aTest2.Run();
+ return 0;
+}
+#endif
+
+#endif // DBG_UTIL
+
diff --git a/sw/source/core/except/errhdl.cxx b/sw/source/core/except/errhdl.cxx
new file mode 100644
index 000000000000..3e2a2dfd0966
--- /dev/null
+++ b/sw/source/core/except/errhdl.cxx
@@ -0,0 +1,136 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+#ifdef DBG_UTIL
+
+#define _ERRHDL_CXX
+
+
+#include "stdlib.h"
+#include <tools/debug.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/sound.hxx>
+#include <errhdl.hxx>
+#include <error.h> // fuer die defines von ERR_SW6MSG_ ...
+
+#ifndef CVBREAK
+#define CVBREAK
+#endif
+
+sal_Bool bAssertFail = sal_False; // ist gerade eine Assertbox oben ?
+sal_Bool bAssert = sal_False; // sal_True, wenn mal ein ASSERT kam.
+
+/*------------------------------------------------------------------------
+ Ausgabe einer Fehlermeldung inkl. Bedingung, Dateiname und Zeilennummer
+ wo der Fehler auftrat.
+ Die Funktion wird durch das ASSERT Makro gerufen!
+ Parameter:
+ char *pError Fehlermeldung
+ char *pFileName Filename in dem der Fehler auftrat
+ sal_uInt16 nLine Zeilennummer in dem der Fehler auftrat
+------------------------------------------------------------------------*/
+
+void AssertFail( const sal_Char* pError, const sal_Char* pFileName, sal_uInt16 nLine )
+{
+ CVBREAK;
+ // NOTE4("ASSERT: %s at %d: %s\n", pFileName, nLine, pError);
+ bAssert = sal_True;
+
+ if( !bAssertFail && GetpApp() && GetpApp()->IsInMain() )
+ {
+ bAssertFail = sal_True;
+ ByteString aErr;
+ aErr = "Assertion failed\n==================\nFILE : ";
+ aErr += pFileName;
+ aErr += " at line ";
+ aErr += ByteString::CreateFromInt32( nLine );
+ aErr += "\nERROR : ";
+ aErr += pError;
+
+ ByteString aTmp( getenv( "SW_NOBEEP" ) );
+ if ( aTmp != "sal_True" )
+ Sound::Beep(SOUND_ERROR);
+
+#if defined( UNX ) && !defined( DBG_UTIL )
+ DBG_ERROR( aErr.GetBuffer() ); // DbgErr ist in UNIX-nicht Produkt-Versionen nicht definiert
+#else
+ DbgError( aErr.GetBuffer() );
+#endif
+ bAssertFail = sal_False;
+ }
+ else
+ {
+ Sound::Beep(SOUND_ERROR);
+ Sound::Beep(SOUND_ERROR);
+ Sound::Beep(SOUND_ERROR);
+ if( !bAssertFail )
+ *(short *)0 = 4711; // UAE ausloesen
+ }
+}
+
+/*------------------------------------------------------------------------
+ Ausgabe einer Fehlermeldung inkl. Bedingung, Dateiname und Zeilennummer
+ wo der Fehler auftrat.
+ Die Funktion wird durch das ASSERT Makro gerufen!
+ Parameter:
+ sal_uInt16 nErrorId Id fuer Fehlermeldung
+ char *pFileName Filename in dem der Fehler auftrat
+ sal_uInt16 nLine Zeilennummer in dem der Fehler auftrat
+------------------------------------------------------------------------*/
+
+void AssertFail( sal_uInt16 nErrorId, const sal_Char* pFileName, sal_uInt16 nLine )
+{
+ // Umsetzung der ErrorId in eine Fehlermeldung
+ static const sal_Char
+ /* Error Fehlermeldungen zugriffe ausserhalb eines Bereiches */
+ sERR_VAR_IDX[] = "Op[]",
+ sERR_OUTOFSCOPE[] = "Zugriff ausserhalb des Bereiches",
+ /* Error Codes fuer Numerierungsregeln */
+ sERR_NUMLEVEL[] = "Falscher Num-Level",
+ /* Error Codes fuer TxtNode */
+ sERR_NOHINTS[] = "Zugriff auf ungueltiges HintsArray",
+ sERR_UNKNOWN[] = "???";
+
+ static const sal_Char* aErrStrTab[ ERR_SWGMSG_END - ERR_SWGMSG_START +1 ] =
+ {
+ sERR_VAR_IDX, sERR_OUTOFSCOPE, sERR_NUMLEVEL, sERR_NOHINTS
+ };
+
+ const sal_Char* pMsg;
+ if( nErrorId >= ERR_SWGMSG_START && nErrorId < ERR_SWGMSG_END )
+ pMsg = aErrStrTab[ nErrorId - ERR_SWGMSG_START ];
+ else
+ pMsg = sERR_UNKNOWN;
+
+ AssertFail( pMsg, pFileName, nLine );
+}
+
+#endif // DBG_UTIL
+
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index a3c91b01808d..e1d88e187988 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -75,16 +75,16 @@ SV_IMPL_PTRARR( SortKeyArr, TOXSortKeyPtr )
SwAuthEntry::SwAuthEntry(const SwAuthEntry& rCopy)
: nRefCount(0)
{
- for(USHORT i = 0; i < AUTH_FIELD_END; i++)
+ for(sal_uInt16 i = 0; i < AUTH_FIELD_END; i++)
aAuthFields[i] = rCopy.aAuthFields[i];
}
// --------------------------------------------------------
-BOOL SwAuthEntry::operator==(const SwAuthEntry& rComp)
+sal_Bool SwAuthEntry::operator==(const SwAuthEntry& rComp)
{
- for(USHORT i = 0; i < AUTH_FIELD_END; i++)
+ for(sal_uInt16 i = 0; i < AUTH_FIELD_END; i++)
if(aAuthFields[i] != rComp.aAuthFields[i])
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// --------------------------------------------------------
@@ -95,8 +95,8 @@ SwAuthorityFieldType::SwAuthorityFieldType(SwDoc* pDoc)
m_pSortKeyArr(new SortKeyArr(3, 3)),
m_cPrefix('['),
m_cSuffix(']'),
- m_bIsSequence(FALSE),
- m_bSortByDocument(TRUE),
+ m_bIsSequence(sal_False),
+ m_bSortByDocument(sal_True),
m_eLanguage((LanguageType)::GetAppLanguage())
{
}
@@ -112,7 +112,7 @@ SwAuthorityFieldType::SwAuthorityFieldType( const SwAuthorityFieldType& rFType)
m_eLanguage(rFType.m_eLanguage),
m_sSortAlgorithm(rFType.m_sSortAlgorithm)
{
- for(USHORT i = 0; i < rFType.m_pSortKeyArr->Count(); i++)
+ for(sal_uInt16 i = 0; i < rFType.m_pSortKeyArr->Count(); i++)
m_pSortKeyArr->Insert((*rFType.m_pSortKeyArr)[i], i);
}
@@ -132,16 +132,16 @@ SwFieldType* SwAuthorityFieldType::Copy() const
void SwAuthorityFieldType::RemoveField(long nHandle)
{
#if OSL_DEBUG_LEVEL > 1
- BOOL bRemoved = FALSE;
+ sal_Bool bRemoved = sal_False;
#endif
- for(USHORT j = 0; j < m_pDataArr->Count(); j++)
+ for(sal_uInt16 j = 0; j < m_pDataArr->Count(); j++)
{
SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
long nRet = (long)(void*)pTemp;
if(nRet == nHandle)
{
#if OSL_DEBUG_LEVEL > 1
- bRemoved = TRUE;
+ bRemoved = sal_True;
#endif
pTemp->RemoveRef();
if(!pTemp->GetRefCount())
@@ -162,11 +162,11 @@ long SwAuthorityFieldType::AddField(const String& rFieldContents)
{
long nRet = 0;
SwAuthEntry* pEntry = new SwAuthEntry;
- for( USHORT i = 0; i < AUTH_FIELD_END; ++i )
+ for( sal_uInt16 i = 0; i < AUTH_FIELD_END; ++i )
pEntry->SetAuthorField( (ToxAuthorityField)i,
rFieldContents.GetToken( i, TOX_STYLE_DELIMITER ));
- for(USHORT j = 0; j < m_pDataArr->Count() && pEntry; j++)
+ for(sal_uInt16 j = 0; j < m_pDataArr->Count() && pEntry; j++)
{
SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
if(*pTemp == *pEntry)
@@ -188,16 +188,16 @@ long SwAuthorityFieldType::AddField(const String& rFieldContents)
return nRet;
}
-BOOL SwAuthorityFieldType::AddField(long nHandle)
+sal_Bool SwAuthorityFieldType::AddField(long nHandle)
{
- BOOL bRet = FALSE;
- for( USHORT j = 0; j < m_pDataArr->Count(); j++ )
+ sal_Bool bRet = sal_False;
+ for( sal_uInt16 j = 0; j < m_pDataArr->Count(); j++ )
{
SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
long nTmp = (long)(void*)pTemp;
if( nTmp == nHandle )
{
- bRet = TRUE;
+ bRet = sal_True;
pTemp->AddRef();
//re-generate positions of the fields
DelSequenceArray();
@@ -211,7 +211,7 @@ BOOL SwAuthorityFieldType::AddField(long nHandle)
const SwAuthEntry* SwAuthorityFieldType::GetEntryByHandle(long nHandle) const
{
const SwAuthEntry* pRet = 0;
- for(USHORT j = 0; j < m_pDataArr->Count(); j++)
+ for(sal_uInt16 j = 0; j < m_pDataArr->Count(); j++)
{
const SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
long nTmp = (long)(void*)pTemp;
@@ -228,7 +228,7 @@ const SwAuthEntry* SwAuthorityFieldType::GetEntryByHandle(long nHandle) const
void SwAuthorityFieldType::GetAllEntryIdentifiers(
SvStringsDtor& rToFill )const
{
- for(USHORT j = 0; j < m_pDataArr->Count(); j++)
+ for(sal_uInt16 j = 0; j < m_pDataArr->Count(); j++)
{
SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
rToFill.Insert( new String( pTemp->GetAuthorField(
@@ -240,7 +240,7 @@ const SwAuthEntry* SwAuthorityFieldType::GetEntryByIdentifier(
const String& rIdentifier)const
{
const SwAuthEntry* pRet = 0;
- for( USHORT j = 0; j < m_pDataArr->Count(); ++j )
+ for( sal_uInt16 j = 0; j < m_pDataArr->Count(); ++j )
{
const SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
if( rIdentifier == pTemp->GetAuthorField( AUTH_FIELD_IDENTIFIER ))
@@ -255,13 +255,13 @@ const SwAuthEntry* SwAuthorityFieldType::GetEntryByIdentifier(
bool SwAuthorityFieldType::ChangeEntryContent(const SwAuthEntry* pNewEntry)
{
bool bChanged = false;
- for( USHORT j = 0; j < m_pDataArr->Count(); ++j )
+ for( sal_uInt16 j = 0; j < m_pDataArr->Count(); ++j )
{
SwAuthEntry* pTemp = m_pDataArr->GetObject(j);
if(pTemp->GetAuthorField(AUTH_FIELD_IDENTIFIER) ==
pNewEntry->GetAuthorField(AUTH_FIELD_IDENTIFIER))
{
- for(USHORT i = 0; i < AUTH_FIELD_END; i++)
+ for(sal_uInt16 i = 0; i < AUTH_FIELD_END; i++)
pTemp->SetAuthorField((ToxAuthorityField) i,
pNewEntry->GetAuthorField((ToxAuthorityField)i));
bChanged = true;
@@ -274,9 +274,9 @@ bool SwAuthorityFieldType::ChangeEntryContent(const SwAuthEntry* pNewEntry)
Description: appends a new entry (if new) and returns the array position
-----------------------------------------------------------------------*/
-USHORT SwAuthorityFieldType::AppendField( const SwAuthEntry& rInsert )
+sal_uInt16 SwAuthorityFieldType::AppendField( const SwAuthEntry& rInsert )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
for( nRet = 0; nRet < m_pDataArr->Count(); ++nRet )
{
SwAuthEntry* pTemp = m_pDataArr->GetObject( nRet );
@@ -294,7 +294,7 @@ USHORT SwAuthorityFieldType::AppendField( const SwAuthEntry& rInsert )
return nRet;
}
-long SwAuthorityFieldType::GetHandle(USHORT nPos)
+long SwAuthorityFieldType::GetHandle(sal_uInt16 nPos)
{
long nRet = 0;
if( nPos < m_pDataArr->Count() )
@@ -305,7 +305,7 @@ long SwAuthorityFieldType::GetHandle(USHORT nPos)
return nRet;
}
-USHORT SwAuthorityFieldType::GetSequencePos(long nHandle)
+sal_uInt16 SwAuthorityFieldType::GetSequencePos(long nHandle)
{
//find the field in a sorted array of handles,
#if OSL_DEBUG_LEVEL > 1
@@ -379,7 +379,7 @@ USHORT SwAuthorityFieldType::GetSequencePos(long nHandle)
}
}
- for(USHORT i = 0; i < aSortArr.Count(); i++)
+ for(sal_uInt16 i = 0; i < aSortArr.Count(); i++)
{
const SwTOXSortTabBase& rBase = *aSortArr[i];
SwFmtFld& rFmtFld = ((SwTOXAuthority&)rBase).GetFldFmt();
@@ -389,8 +389,8 @@ USHORT SwAuthorityFieldType::GetSequencePos(long nHandle)
aSortArr.DeleteAndDestroy(0, aSortArr.Count());
}
//find nHandle
- USHORT nRet = 0;
- for(USHORT i = 0; i < m_SequArr.size(); ++i)
+ sal_uInt16 nRet = 0;
+ for(sal_uInt16 i = 0; i < m_SequArr.size(); ++i)
{
if(m_SequArr[i] == nHandle)
{
@@ -404,7 +404,8 @@ USHORT SwAuthorityFieldType::GetSequencePos(long nHandle)
return nRet;
}
-bool SwAuthorityFieldType::QueryValue( Any& rVal, USHORT nWhichId ) const
+
+bool SwAuthorityFieldType::QueryValue( Any& rVal, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -459,7 +460,7 @@ bool SwAuthorityFieldType::QueryValue( Any& rVal, USHORT nWhichId ) const
return true;
}
-bool SwAuthorityFieldType::PutValue( const Any& rAny, USHORT nWhichId )
+bool SwAuthorityFieldType::PutValue( const Any& rAny, sal_uInt16 nWhichId )
{
bool bRet = true;
String sTmp;
@@ -539,12 +540,12 @@ void SwAuthorityFieldType::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
SwModify::Modify( pOld, pNew );
}
-USHORT SwAuthorityFieldType::GetSortKeyCount() const
+sal_uInt16 SwAuthorityFieldType::GetSortKeyCount() const
{
return m_pSortKeyArr->Count();
}
-const SwTOXSortKey* SwAuthorityFieldType::GetSortKey(USHORT nIdx) const
+const SwTOXSortKey* SwAuthorityFieldType::GetSortKey(sal_uInt16 nIdx) const
{
SwTOXSortKey* pRet = 0;
if(m_pSortKeyArr->Count() > nIdx)
@@ -553,11 +554,11 @@ const SwTOXSortKey* SwAuthorityFieldType::GetSortKey(USHORT nIdx) const
return pRet;
}
-void SwAuthorityFieldType::SetSortKeys(USHORT nKeyCount, SwTOXSortKey aKeys[])
+void SwAuthorityFieldType::SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey aKeys[])
{
m_pSortKeyArr->DeleteAndDestroy(0, m_pSortKeyArr->Count());
- USHORT nArrIdx = 0;
- for(USHORT i = 0; i < nKeyCount; i++)
+ sal_uInt16 nArrIdx = 0;
+ for(sal_uInt16 i = 0; i < nKeyCount; i++)
if(aKeys[i].eField < AUTH_FIELD_END)
m_pSortKeyArr->Insert(new SwTOXSortKey(aKeys[i]), nArrIdx++);
}
@@ -670,7 +671,7 @@ const char* aFieldNames[] =
"ISBN"
};
-bool SwAuthorityField::QueryValue( Any& rAny, USHORT /*nWhichId*/ ) const
+bool SwAuthorityField::QueryValue( Any& rAny, sal_uInt16 /*nWhichId*/ ) const
{
if(!GetTyp())
return false;
@@ -701,7 +702,7 @@ sal_Int16 lcl_Find(const OUString& rFieldName)
return -1;
}
//----------------------------------------------------------------------------
-bool SwAuthorityField::PutValue( const Any& rAny, USHORT /*nWhichId*/ )
+bool SwAuthorityField::PutValue( const Any& rAny, sal_uInt16 /*nWhichId*/ )
{
if(!GetTyp() || !((SwAuthorityFieldType*)GetTyp())->GetEntryByHandle(m_nHandle))
return false;
@@ -746,7 +747,7 @@ SwFieldType* SwAuthorityField::ChgTyp( SwFieldType* pFldTyp )
{
const SwAuthEntry* pEntry = pSrcTyp->GetEntryByHandle( m_nHandle );
- USHORT nHdlPos = pDstTyp->AppendField( *pEntry );
+ sal_uInt16 nHdlPos = pDstTyp->AppendField( *pEntry );
pSrcTyp->RemoveField( m_nHandle );
m_nHandle = pDstTyp->GetHandle( nHdlPos );
pDstTyp->AddField( m_nHandle );
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index 67d778055f11..12b2d4ede232 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -55,7 +55,7 @@
const sal_Unicode cRelTrenner = ',';
const sal_Unicode cRelKennung = ''; // CTRL-R
-const USHORT cMAXSTACKSIZE = 50;
+const sal_uInt16 cMAXSTACKSIZE = 50;
const SwFrm* lcl_GetBoxFrm( const SwTableBox& rBox );
long lcl_GetLongBoxNum( String& rStr );
@@ -108,7 +108,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == GetFrmFmt()->GetItemState(
- RES_BOXATR_FORMULA, FALSE, &pItem ) )
+ RES_BOXATR_FORMULA, sal_False, &pItem ) )
{
rCalcPara.rCalc.SetCalcError( CALC_NOERR ); // wieder zuruecksetzen
if( !((SwTblBoxFormula*)pItem)->IsValid() )
@@ -135,7 +135,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const
break;
}
else if( SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
- RES_BOXATR_VALUE, FALSE, &pItem ) )
+ RES_BOXATR_VALUE, sal_False, &pItem ) )
{
rCalcPara.rCalc.SetCalcError( CALC_NOERR ); // wieder zuruecksetzen
nRet = ((SwTblBoxValue*)pItem)->GetValue();
@@ -201,7 +201,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const
break;
default:
- String const value(pFld->ExpandField(pDoc->IsClipBoard()));
+ String const value(pFld->ExpandField(true));
nRet = rCalcPara.rCalc.Calculate(value).GetDouble();
}
}
@@ -233,7 +233,7 @@ double SwTableBox::GetValue( SwTblCalcPara& rCalcPara ) const
}
// ?? sonst ist das ein Fehler
- } while( FALSE );
+ } while( sal_False );
if( !rCalcPara.IsStackOverFlow() )
{
@@ -264,15 +264,15 @@ SwTblCalcPara::~SwTblCalcPara()
delete pBoxStk;
}
-bool SwTblCalcPara::CalcWithStackOverflow()
+sal_Bool SwTblCalcPara::CalcWithStackOverflow()
{
// falls ein StackUeberlauf erkannt wurde, sollte mit
// der letzten Box noch mal aufgesetzt werden. Irgend
// ein Weg sollte dann
- USHORT nSaveMaxSize = nMaxSize;
+ sal_uInt16 nSaveMaxSize = nMaxSize;
nMaxSize = cMAXSTACKSIZE - 5;
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
SwTableBoxes aStackOverFlows;
do {
SwTableBox* pBox = (SwTableBox*)pLastTblBox;
@@ -289,7 +289,7 @@ bool SwTblCalcPara::CalcWithStackOverflow()
// falls Rekursionen erkannt wurden
nStackCnt = 0;
rCalc.SetCalcError( CALC_NOERR );
- pBoxStk->Remove( USHORT(0), pBoxStk->Count() );
+ pBoxStk->Remove( sal_uInt16(0), pBoxStk->Count() );
while( !rCalc.IsCalcError() && nCnt )
{
@@ -351,7 +351,7 @@ void SwTableFormula::_MakeFormel( const SwTable& rTbl, String& rNewStr,
rNewStr += '(';
bool bDelim = false;
- for( USHORT n = 0; n < aBoxes.Count() &&
+ for( sal_uInt16 n = 0; n < aBoxes.Count() &&
!pCalcPara->rCalc.IsCalcError(); ++n )
{
const SwTableBox* pTblBox = aBoxes[n];
@@ -361,7 +361,7 @@ void SwTableFormula::_MakeFormel( const SwTable& rTbl, String& rNewStr,
rNewStr += cListDelim;
bDelim = true;
rNewStr += pCalcPara->rCalc.GetStrResult(
- pTblBox->GetValue( *pCalcPara ), FALSE );
+ pTblBox->GetValue( *pCalcPara ), sal_False );
}
}
rNewStr += ')';
@@ -373,7 +373,7 @@ void SwTableFormula::_MakeFormel( const SwTable& rTbl, String& rNewStr,
if ( pSttBox->getRowSpan() >= 1 )
{
rNewStr += pCalcPara->rCalc.GetStrResult(
- pSttBox->GetValue( *pCalcPara ), FALSE );
+ pSttBox->GetValue( *pCalcPara ), sal_False );
}
}
else
@@ -609,7 +609,7 @@ String SwTableFormula::ScanString( FnScanFormel fnFormel, const SwTable& rTbl,
void* pPara ) const
{
String aStr;
- USHORT nFml = 0, nStt = 0, nEnd = 0, nTrenner;
+ sal_uInt16 nFml = 0, nStt = 0, nEnd = 0, nTrenner;
do {
// falls der Formel ein Name vorangestellt ist, diese Tabelle
@@ -689,7 +689,7 @@ String SwTableFormula::ScanString( FnScanFormel fnFormel, const SwTable& rTbl,
}
nFml = nEnd+1;
- } while( TRUE );
+ } while( sal_True );
return aStr;
}
@@ -697,7 +697,7 @@ const SwTable* SwTableFormula::FindTable( SwDoc& rDoc, const String& rNm ) const
{
const SwFrmFmts& rTblFmts = *rDoc.GetTblFrmFmts();
const SwTable* pTmpTbl, *pRet = 0;
- for( USHORT nFmtCnt = rTblFmts.Count(); nFmtCnt; )
+ for( sal_uInt16 nFmtCnt = rTblFmts.Count(); nFmtCnt; )
{
SwFrmFmt* pFmt = rTblFmts[ --nFmtCnt ];
// falls wir von Sw3Writer gerufen werden, dann ist dem
@@ -726,12 +726,12 @@ const SwFrm* lcl_GetBoxFrm( const SwTableBox& rBox )
SwCntntNode* pCNd = aIdx.GetNodes().GoNext( &aIdx );
OSL_ENSURE( pCNd, "Box hat keinen TextNode" );
Point aPt; // den im Layout 1. Frame returnen - Tab.Kopfzeile !!
- return pCNd->GetFrm( &aPt, NULL, FALSE );
+ return pCNd->GetFrm( &aPt, NULL, sal_False );
}
long lcl_GetLongBoxNum( String& rStr )
{
- USHORT nPos;
+ sal_uInt16 nPos;
long nRet;
if( STRING_NOTFOUND == ( nPos = rStr.Search( cRelTrenner ) ))
{
@@ -774,8 +774,8 @@ const SwTableBox* lcl_RelToBox( const SwTable& rTbl,
pBox = pLine->GetUpper();
pLine = pBox->GetUpper();
}
- USHORT nSttBox = pLine->GetTabBoxes().GetPos( pBox );
- USHORT nSttLine = rTbl.GetTabLines().GetPos( pLine );
+ sal_uInt16 nSttBox = pLine->GetTabBoxes().GetPos( pBox );
+ sal_uInt16 nSttLine = rTbl.GetTabLines().GetPos( pLine );
long nBoxOffset = lcl_GetLongBoxNum( sGetName ) + nSttBox;
long nLineOffset = lcl_GetLongBoxNum( sGetName ) + nSttLine;
@@ -787,13 +787,13 @@ const SwTableBox* lcl_RelToBox( const SwTable& rTbl,
if( nLineOffset >= long(pLines->Count()) )
return 0;
- pLine = (*pLines)[ USHORT(nLineOffset) ];
+ pLine = (*pLines)[ sal_uInt16(nLineOffset) ];
// dann suche die Box
pBoxes = &pLine->GetTabBoxes();
if( nBoxOffset >= long(pBoxes->Count()) )
return 0;
- pBox = (*pBoxes)[ USHORT(nBoxOffset) ];
+ pBox = (*pBoxes)[ sal_uInt16(nBoxOffset) ];
while( sGetName.Len() )
{
@@ -851,8 +851,8 @@ String lcl_BoxNmToRel( const SwTable& rTbl, const SwTableNode& rTblNd,
// die externe Darstellung bei:
if( &rTbl == &rTblNd.GetTable() )
{
- long nBox = SwTable::_GetBoxNum( sTmp, TRUE );
- nBox -= SwTable::_GetBoxNum( sCpy, TRUE );
+ long nBox = SwTable::_GetBoxNum( sTmp, sal_True );
+ nBox -= SwTable::_GetBoxNum( sCpy, sal_True );
long nLine = SwTable::_GetBoxNum( sTmp );
nLine -= SwTable::_GetBoxNum( sCpy );
@@ -876,11 +876,11 @@ String lcl_BoxNmToRel( const SwTable& rTbl, const SwTableNode& rTblNd,
return sTmp;
}
-USHORT SwTableFormula::GetBoxesOfFormula( const SwTable& rTbl,
+sal_uInt16 SwTableFormula::GetBoxesOfFormula( const SwTable& rTbl,
SwSelBoxes& rBoxes )
{
if( rBoxes.Count() )
- rBoxes.Remove( USHORT(0), rBoxes.Count() );
+ rBoxes.Remove( sal_uInt16(0), rBoxes.Count() );
BoxNmToPtr( &rTbl );
ScanString( &SwTableFormula::_GetFmlBoxes, rTbl, &rBoxes );
@@ -964,7 +964,7 @@ void SwTableFormula::GetBoxes( const SwTableBox& rSttBox,
break;
// dann mal die Tabellenkoepfe raus:
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
pLine = rBoxes[n]->GetUpper();
while( pLine->GetUpper() )
@@ -973,7 +973,7 @@ void SwTableFormula::GetBoxes( const SwTableBox& rSttBox,
if( pTbl->IsHeadline( *pLine ) )
rBoxes.Remove( n--, 1 );
}
- } while( FALSE );
+ } while( sal_False );
}
}
@@ -1037,9 +1037,9 @@ bool SwTableFormula::HasValidBoxes() const
}
-USHORT SwTableFormula::GetLnPosInTbl( const SwTable& rTbl, const SwTableBox* pBox )
+sal_uInt16 SwTableFormula::GetLnPosInTbl( const SwTable& rTbl, const SwTableBox* pBox )
{
- USHORT nRet = USHRT_MAX;
+ sal_uInt16 nRet = USHRT_MAX;
if( pBox )
{
const SwTableLine* pLn = pBox->GetUpper();
@@ -1063,8 +1063,8 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
String* pTblNmBox = pLastBox ? pLastBox : &rFirstBox;
- USHORT nLastBoxLen = pTblNmBox->Len();
- USHORT nTrenner = pTblNmBox->Search( '.' );
+ sal_uInt16 nLastBoxLen = pTblNmBox->Len();
+ sal_uInt16 nTrenner = pTblNmBox->Search( '.' );
if( STRING_NOTFOUND != nTrenner &&
// falls im Namen schon die Punkte enthalten sind,
// treten diese immer paarig auf!!! (A1.1.1 !!)
@@ -1085,13 +1085,13 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
if( rTblUpd.pTbl != &rTbl ) // es ist nicht die akt.
(rNewStr += rTblUpd.pTbl->GetFrmFmt()->GetName() )
+= '.'; // den neuen Tabellen Namen setzen
- rTblUpd.bModified = TRUE;
+ rTblUpd.bModified = sal_True;
}
else if( pFnd != rTblUpd.pTbl ||
( rTblUpd.pTbl != &rTbl && &rTbl != rTblUpd.DATA.pDelTbl))
(rNewStr += sTblNm ) += '.'; // den Tabellen Namen behalten
else
- rTblUpd.bModified = TRUE;
+ rTblUpd.bModified = sal_True;
}
else
(rNewStr += sTblNm ) += '.'; // den Tabellen Namen behalten
@@ -1141,7 +1141,7 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
{
// das ist die "erste" Box in der Selektion. Die bestimmt ob die
// Formel in der alten oder neuen Tabelle steht.
- USHORT nEndLnPos = SwTableFormula::GetLnPosInTbl( *pTbl, pEndBox ),
+ sal_uInt16 nEndLnPos = SwTableFormula::GetLnPosInTbl( *pTbl, pEndBox ),
nSttLnPos = SwTableFormula::GetLnPosInTbl( *pTbl, pSttBox );
if( USHRT_MAX != nSttLnPos && USHRT_MAX != nEndLnPos &&
@@ -1156,7 +1156,7 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
{
// das ist aufjedenfall eine ungueltige Formel, also fuers
// Undo auf Modified setzen
- rTblUpd.bModified = TRUE;
+ rTblUpd.bModified = sal_True;
if( pEndBox )
bInNewTbl = USHRT_MAX != nEndLnPos &&
rTblUpd.nSplitLine <= nEndLnPos &&
@@ -1165,7 +1165,7 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
}
else
{
- USHORT nSttLnPos = SwTableFormula::GetLnPosInTbl( *pTbl, pSttBox );
+ sal_uInt16 nSttLnPos = SwTableFormula::GetLnPosInTbl( *pTbl, pSttBox );
// dann landet das Teil in der neuen Tabelle?
bInNewTbl = USHRT_MAX != nSttLnPos &&
rTblUpd.nSplitLine <= nSttLnPos &&
@@ -1177,7 +1177,7 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
{
if( !bInNewTbl )
{
- rTblUpd.bModified = TRUE;
+ rTblUpd.bModified = sal_True;
( rNewStr += rTblUpd.pTbl->GetFrmFmt()->GetName() ) += '.';
}
else if( sTblNm.Len() )
@@ -1185,7 +1185,7 @@ void SwTableFormula::_SplitMergeBoxNm( const SwTable& rTbl, String& rNewStr,
}
else if( bInNewTbl )
{
- rTblUpd.bModified = TRUE;
+ rTblUpd.bModified = sal_True;
( rNewStr += *rTblUpd.DATA.pNewTblNm ) += '.';
}
else if( sTblNm.Len() )
diff --git a/sw/source/core/fields/chpfld.cxx b/sw/source/core/fields/chpfld.cxx
index 9daa3ffe25fe..0fc69d1c244c 100644
--- a/sw/source/core/fields/chpfld.cxx
+++ b/sw/source/core/fields/chpfld.cxx
@@ -135,11 +135,11 @@ void SwChapterField::ChangeExpansion(const SwTxtNode &rTxtNd, sal_Bool bSrchNum)
do {
if( pONd && pONd->GetTxtColl() )
{
- BYTE nPrevLvl = nLevel;
+ sal_uInt8 nPrevLvl = nLevel;
OSL_ENSURE( pONd->GetAttrOutlineLevel() >= 0 && pONd->GetAttrOutlineLevel() <= MAXLEVEL,
"<SwChapterField::ChangeExpansion(..)> - outline node with inconsistent outline level. Serious defect -> please inform OD." );
- nLevel = static_cast<BYTE>(pONd->GetAttrOutlineLevel());
+ nLevel = static_cast<sal_uInt8>(pONd->GetAttrOutlineLevel());
if( nPrevLvl < nLevel )
nLevel = nPrevLvl;
@@ -171,7 +171,7 @@ void SwChapterField::ChangeExpansion(const SwTxtNode &rTxtNd, sal_Bool bSrchNum)
SwNumRule* pRule( pTxtNd->GetNumRule() );
if ( pTxtNd->IsCountedInList() && pRule )
{
- const SwNumFmt& rNFmt = pRule->Get( static_cast<USHORT>(pTxtNd->GetActualListLevel()) );
+ const SwNumFmt& rNFmt = pRule->Get( static_cast<sal_uInt16>(pTxtNd->GetActualListLevel()) );
sPost = rNFmt.GetSuffix();
sPre = rNFmt.GetPrefix();
}
@@ -200,7 +200,7 @@ void SwChapterField::ChangeExpansion(const SwTxtNode &rTxtNd, sal_Bool bSrchNum)
}
}
-bool SwChapterField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwChapterField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -234,9 +234,9 @@ bool SwChapterField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwChapterField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwChapterField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch( nWhichId )
{
case FIELD_PROP_BYTE1:
@@ -272,7 +272,7 @@ bool SwChapterField::PutValue( const uno::Any& rAny, USHORT nWhichId )
default:
OSL_FAIL("illegal property");
- bRet = false;
+ bRet = false;
}
return bRet;
}
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index b3117a45091c..8f1e6bd16c87 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -29,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <float.h>
#include <sfx2/app.hxx>
#include <svl/zforlist.hxx>
@@ -64,7 +63,7 @@ String lcl_DBTrennConv(const String& aContent)
{
String sTmp(aContent);
sal_Unicode* pStr = sTmp.GetBufferAccess();
- for( USHORT i = sTmp.Len(); i; --i, ++pStr )
+ for( sal_uInt16 i = sTmp.Len(); i; --i, ++pStr )
if( DB_DELIM == *pStr )
*pStr = '.';
return sTmp;
@@ -115,7 +114,7 @@ void SwDBFieldType::ReleaseRef()
if (--nRefCnt <= 0)
{
- USHORT nPos = GetDoc()->GetFldTypes()->GetPos(this);
+ sal_uInt16 nPos = GetDoc()->GetFldTypes()->GetPos(this);
if (nPos != USHRT_MAX)
{
@@ -125,7 +124,7 @@ void SwDBFieldType::ReleaseRef()
}
}
-bool SwDBFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwDBFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -147,7 +146,7 @@ bool SwDBFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwDBFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwDBFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -193,12 +192,12 @@ bool SwDBFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId )
Beschreibung: SwDBField
--------------------------------------------------------------------*/
-SwDBField::SwDBField(SwDBFieldType* pTyp, ULONG nFmt)
+SwDBField::SwDBField(SwDBFieldType* pTyp, sal_uLong nFmt)
: SwValueField(pTyp, nFmt),
nSubType(0),
- bIsInBodyTxt(TRUE),
- bValidValue(FALSE),
- bInitialized(FALSE)
+ bIsInBodyTxt(sal_True),
+ bValidValue(sal_False),
+ bInitialized(sal_False)
{
if (GetTyp())
((SwDBFieldType*)GetTyp())->AddRef();
@@ -273,29 +272,25 @@ SwField* SwDBField::Copy() const
return pTmp;
}
-String SwDBField::GetCntnt(BOOL bName) const
+String SwDBField::GetFieldName() const
{
- if(bName)
- {
- const String& rDBName = ((SwDBFieldType*)GetTyp())->GetName();
+ const String& rDBName = static_cast<SwDBFieldType*>(GetTyp())->GetName();
- String sContent( rDBName.GetToken(0, DB_DELIM) );
+ String sContent( rDBName.GetToken(0, DB_DELIM) );
- if (sContent.Len() > 1)
- {
- sContent += DB_DELIM;
- sContent += rDBName.GetToken(1, DB_DELIM);
- sContent += DB_DELIM;
- sContent += rDBName.GetToken(2, DB_DELIM);
- }
- return lcl_DBTrennConv(sContent);
+ if (sContent.Len() > 1)
+ {
+ sContent += DB_DELIM;
+ sContent += rDBName.GetToken(1, DB_DELIM);
+ sContent += DB_DELIM;
+ sContent += rDBName.GetToken(2, DB_DELIM);
}
- return Expand();
+ return lcl_DBTrennConv(sContent);
}
//------------------------------------------------------------------------------
-void SwDBField::ChgValue( double d, BOOL bVal )
+void SwDBField::ChgValue( double d, sal_Bool bVal )
{
bValidValue = bVal;
SetValue(d);
@@ -323,7 +318,7 @@ void SwDBField::Evaluate()
SwNewDBMgr* pMgr = GetDoc()->GetNewDBMgr();
// erstmal loeschen
- bValidValue = FALSE;
+ bValidValue = sal_False;
double nValue = DBL_MAX;
const SwDBData& aTmpData = GetDBData();
@@ -352,7 +347,7 @@ void SwDBField::Evaluate()
if (*pDocFormatter->GetNullDate() != aStandard)
nValue += (aStandard - *pDocFormatter->GetNullDate());
}
- bValidValue = TRUE;
+ bValidValue = sal_True;
SetValue(nValue);
aContent = ((SwValueFieldType*)GetTyp())->ExpandValue(nValue, GetFormat(), GetLanguage());
}
@@ -367,15 +362,15 @@ void SwDBField::Evaluate()
SvNumberFormatter* pFormatter = GetDoc()->GetNumberFormatter();
if (nFmt && nFmt != SAL_MAX_UINT32 && !pFormatter->IsTextFormat(nFmt))
- bValidValue = TRUE; // Wegen Bug #60339 nicht mehr bei allen Strings
+ bValidValue = sal_True; // Wegen Bug #60339 nicht mehr bei allen Strings
}
else
{
- // Bei Strings TRUE wenn Laenge > 0 sonst FALSE
+ // Bei Strings sal_True wenn Laenge > 0 sonst sal_False
SetValue(aContent.Len() ? 1 : 0);
}
}
- bInitialized = TRUE;
+ bInitialized = sal_True;
}
/*--------------------------------------------------------------------
@@ -387,23 +382,23 @@ const String& SwDBField::GetPar1() const
return ((SwDBFieldType*)GetTyp())->GetName();
}
-USHORT SwDBField::GetSubType() const
+sal_uInt16 SwDBField::GetSubType() const
{
return nSubType;
}
-void SwDBField::SetSubType(USHORT nType)
+void SwDBField::SetSubType(sal_uInt16 nType)
{
nSubType = nType;
}
-bool SwDBField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwDBField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
case FIELD_PROP_BOOL1:
{
- BOOL bTemp = 0 == (GetSubType()&nsSwExtendedSubType::SUB_OWN_FMT);
+ sal_Bool bTemp = 0 == (GetSubType()&nsSwExtendedSubType::SUB_OWN_FMT);
rAny.setValue(&bTemp, ::getBooleanCppuType());
}
break;
@@ -429,7 +424,7 @@ bool SwDBField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
}
-bool SwDBField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwDBField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -441,10 +436,10 @@ bool SwDBField::PutValue( const uno::Any& rAny, USHORT nWhichId )
break;
case FIELD_PROP_BOOL2:
{
- USHORT nSubTyp = GetSubType();
+ sal_uInt16 nSubTyp = GetSubType();
sal_Bool bVisible = sal_False;
if(!(rAny >>= bVisible))
- return FALSE;
+ return sal_False;
if(bVisible)
nSubTyp &= ~nsSwExtendedSubType::SUB_INVISIBLE;
else
@@ -492,7 +487,7 @@ bool SwDBField::PutValue( const uno::Any& rAny, USHORT nWhichId )
Beschreibung: Basisklasse fuer alle weiteren Datenbankfelder
--------------------------------------------------------------------*/
-SwDBNameInfField::SwDBNameInfField(SwFieldType* pTyp, const SwDBData& rDBData, ULONG nFmt) :
+SwDBNameInfField::SwDBNameInfField(SwFieldType* pTyp, const SwDBData& rDBData, sal_uLong nFmt) :
SwField(pTyp, nFmt),
aDBData(rDBData),
nSubType(0)
@@ -518,24 +513,20 @@ void SwDBNameInfField::SetDBData(const SwDBData & rDBData)
//------------------------------------------------------------------------------
-String SwDBNameInfField::GetCntnt(BOOL bName) const
+String SwDBNameInfField::GetFieldName() const
{
- String sStr(SwField::GetCntnt(bName));
-
- if(bName)
+ String sStr( SwField::GetFieldName() );
+ if (aDBData.sDataSource.getLength())
{
- if (aDBData.sDataSource.getLength())
- {
- sStr += ':';
- sStr += String(aDBData.sDataSource);
- sStr += DB_DELIM;
- sStr += String(aDBData.sCommand);
- }
+ sStr += ':';
+ sStr += String(aDBData.sDataSource);
+ sStr += DB_DELIM;
+ sStr += String(aDBData.sCommand);
}
return lcl_DBTrennConv(sStr);
}
-bool SwDBNameInfField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwDBNameInfField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -560,7 +551,7 @@ bool SwDBNameInfField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwDBNameInfField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwDBNameInfField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -575,7 +566,7 @@ bool SwDBNameInfField::PutValue( const uno::Any& rAny, USHORT nWhichId )
break;
case FIELD_PROP_BOOL2:
{
- USHORT nSubTyp = GetSubType();
+ sal_uInt16 nSubTyp = GetSubType();
sal_Bool bVisible = sal_False;
if(!(rAny >>= bVisible))
return false;
@@ -592,12 +583,12 @@ bool SwDBNameInfField::PutValue( const uno::Any& rAny, USHORT nWhichId )
return true;
}
-USHORT SwDBNameInfField::GetSubType() const
+sal_uInt16 SwDBNameInfField::GetSubType() const
{
return nSubType;
}
-void SwDBNameInfField::SetSubType(USHORT nType)
+void SwDBNameInfField::SetSubType(sal_uInt16 nType)
{
nSubType = nType;
}
@@ -626,7 +617,7 @@ SwDBNextSetField::SwDBNextSetField(SwDBNextSetFieldType* pTyp,
const String& rCond,
const String& ,
const SwDBData& rDBData) :
- SwDBNameInfField(pTyp, rDBData), aCond(rCond), bCondValid(TRUE)
+ SwDBNameInfField(pTyp, rDBData), aCond(rCond), bCondValid(sal_True)
{}
//------------------------------------------------------------------------------
@@ -672,7 +663,7 @@ void SwDBNextSetField::SetPar1(const String& rStr)
aCond = rStr;
}
-bool SwDBNextSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwDBNextSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
bool bRet = true;
switch( nWhichId )
@@ -686,7 +677,7 @@ bool SwDBNextSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return bRet;
}
-bool SwDBNextSetField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwDBNextSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
bool bRet = true;
switch( nWhichId )
@@ -728,7 +719,7 @@ SwDBNumSetField::SwDBNumSetField(SwDBNumSetFieldType* pTyp,
SwDBNameInfField(pTyp, rDBData),
aCond(rCond),
aPar2(rDBNum),
- bCondValid(TRUE)
+ bCondValid(sal_True)
{}
//------------------------------------------------------------------------------
@@ -757,7 +748,7 @@ void SwDBNumSetField::Evaluate(SwDoc* pDoc)
if( bCondValid && pMgr && pMgr->IsInMerge() &&
pMgr->IsDataSourceOpen(aTmpData.sDataSource, aTmpData.sCommand, sal_True))
{ // Bedingug OK -> aktuellen Set einstellen
- pMgr->ToRecordId(Max((USHORT)aPar2.ToInt32(), USHORT(1))-1);
+ pMgr->ToRecordId(Max((sal_uInt16)aPar2.ToInt32(), sal_uInt16(1))-1);
}
}
@@ -789,7 +780,7 @@ void SwDBNumSetField::SetPar2(const String& rStr)
aPar2 = rStr;
}
-bool SwDBNumSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwDBNumSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
bool bRet = true;
switch( nWhichId )
@@ -806,7 +797,7 @@ bool SwDBNumSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return bRet;
}
-bool SwDBNumSetField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwDBNumSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
bool bRet = true;
switch( nWhichId )
@@ -838,7 +829,7 @@ SwDBNameFieldType::SwDBNameFieldType(SwDoc* pDocument)
}
//------------------------------------------------------------------------------
-String SwDBNameFieldType::Expand(ULONG ) const
+String SwDBNameFieldType::Expand(sal_uLong ) const
{
const SwDBData aData = pDoc->GetDBData();
String sRet(aData.sDataSource);
@@ -860,7 +851,7 @@ SwFieldType* SwDBNameFieldType::Copy() const
Beschreibung: Name der angedockten DB
--------------------------------------------------------------------*/
-SwDBNameField::SwDBNameField(SwDBNameFieldType* pTyp, const SwDBData& rDBData, ULONG nFmt)
+SwDBNameField::SwDBNameField(SwDBNameFieldType* pTyp, const SwDBData& rDBData, sal_uLong nFmt)
: SwDBNameInfField(pTyp, rDBData, nFmt)
{}
@@ -885,12 +876,12 @@ SwField* SwDBNameField::Copy() const
return pTmp;
}
-bool SwDBNameField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwDBNameField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
return SwDBNameInfField::QueryValue(rAny, nWhichId );
}
-bool SwDBNameField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwDBNameField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
return SwDBNameInfField::PutValue(rAny, nWhichId );
}
@@ -919,7 +910,7 @@ SwFieldType* SwDBSetNumberFieldType::Copy() const
SwDBSetNumberField::SwDBSetNumberField(SwDBSetNumberFieldType* pTyp,
const SwDBData& rDBData,
- ULONG nFmt)
+ sal_uLong nFmt)
: SwDBNameInfField(pTyp, rDBData, nFmt), nNumber(0)
{}
@@ -930,7 +921,7 @@ String SwDBSetNumberField::Expand() const
if(0 !=(GetSubType() & nsSwExtendedSubType::SUB_INVISIBLE) || nNumber == 0)
return aEmptyStr;
else
- return FormatNumber((USHORT)nNumber, GetFormat());
+ return FormatNumber((sal_uInt16)nNumber, GetFormat());
//return(nNumber == 0 ? aEmptyStr : FormatNumber(nNumber, GetFormat()));
}
@@ -960,7 +951,7 @@ SwField* SwDBSetNumberField::Copy() const
return pTmp;
}
-bool SwDBSetNumberField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwDBSetNumberField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
bool bRet = true;
switch( nWhichId )
@@ -977,7 +968,7 @@ bool SwDBSetNumberField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return bRet;
}
-bool SwDBSetNumberField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwDBSetNumberField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
bool bRet = true;
switch( nWhichId )
@@ -986,7 +977,7 @@ bool SwDBSetNumberField::PutValue( const uno::Any& rAny, USHORT nWhichId )
{
sal_Int16 nSet = 0;
rAny >>= nSet;
- if(nSet < (INT16) SVX_NUMBER_NONE )
+ if(nSet < (sal_Int16) SVX_NUMBER_NONE )
SetFormat(nSet);
else {
}
diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx
index d2b49aeefffd..464525ede506 100644
--- a/sw/source/core/fields/ddefld.cxx
+++ b/sw/source/core/fields/ddefld.cxx
@@ -56,7 +56,7 @@ class SwIntrnlRefLink : public SwBaseLink
{
SwDDEFieldType& rFldType;
public:
- SwIntrnlRefLink( SwDDEFieldType& rType, USHORT nUpdateType, USHORT nFmt )
+ SwIntrnlRefLink( SwDDEFieldType& rType, sal_uInt16 nUpdateType, sal_uInt16 nFmt )
: SwBaseLink( nUpdateType, nFmt ),
rFldType( rType )
{}
@@ -66,7 +66,7 @@ public:
const uno::Any & rValue );
virtual const SwNode* GetAnchor() const;
- virtual BOOL IsInRange( ULONG nSttNd, ULONG nEndNd, xub_StrLen nStt = 0,
+ virtual sal_Bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, xub_StrLen nStt = 0,
xub_StrLen nEnd = STRING_NOTFOUND ) const;
};
@@ -93,7 +93,7 @@ void SwIntrnlRefLink::DataChanged( const String& rMimeType,
if( n && 0x0d == sStr.GetChar( n-1 ) )
--n;
- BOOL bDel = n != sStr.Len();
+ sal_Bool bDel = n != sStr.Len();
if( bDel )
sStr.Erase( n );
@@ -119,7 +119,7 @@ void SwIntrnlRefLink::DataChanged( const String& rMimeType,
// dann suchen wir uns mal alle Felder. Wird kein gueltiges
// gefunden, dann Disconnecten wir uns!
SwMsgPoolItem aUpdateDDE( RES_UPDATEDDETBL );
- int bCallModify = FALSE;
+ int bCallModify = sal_False;
rFldType.LockModify();
SwClientIter aIter( rFldType );
@@ -138,7 +138,7 @@ void SwIntrnlRefLink::DataChanged( const String& rMimeType,
pSh->StartAction();
}
pLast->Modify( 0, &aUpdateDDE );
- bCallModify = TRUE;
+ bCallModify = sal_True;
}
} while( 0 != ( pLast = aIter++ ));
@@ -206,7 +206,7 @@ const SwNode* SwIntrnlRefLink::GetAnchor() const
return pNd;
}
-BOOL SwIntrnlRefLink::IsInRange( ULONG nSttNd, ULONG nEndNd,
+sal_Bool SwIntrnlRefLink::IsInRange( sal_uLong nSttNd, sal_uLong nEndNd,
xub_StrLen nStt, xub_StrLen nEnd ) const
{
// hier sollte irgend ein Anchor aus dem normalen Nodes-Array reichen
@@ -225,7 +225,7 @@ BOOL SwIntrnlRefLink::IsInRange( ULONG nSttNd, ULONG nEndNd,
if( pTblNd->GetNodes().IsDocNodes() &&
nSttNd < pTblNd->EndOfSectionIndex() &&
nEndNd > pTblNd->GetIndex() )
- return TRUE;
+ return sal_True;
}
else if( ((SwFmtFld*)pLast)->GetTxtFld() )
{
@@ -233,24 +233,24 @@ BOOL SwIntrnlRefLink::IsInRange( ULONG nSttNd, ULONG nEndNd,
const SwTxtNode* pNd = pTFld->GetpTxtNode();
if( pNd && pNds == &pNd->GetNodes() )
{
- ULONG nNdPos = pNd->GetIndex();
+ sal_uLong nNdPos = pNd->GetIndex();
if( nSttNd <= nNdPos && nNdPos <= nEndNd &&
( nNdPos != nSttNd || *pTFld->GetStart() >= nStt ) &&
( nNdPos != nEndNd || *pTFld->GetStart() < nEnd ))
- return TRUE;
+ return sal_True;
}
}
} while( 0 != ( pLast = aIter++ ));
- return FALSE;
+ return sal_False;
}
SwDDEFieldType::SwDDEFieldType(const String& rName,
- const String& rCmd, USHORT nUpdateType )
+ const String& rCmd, sal_uInt16 nUpdateType )
: SwFieldType( RES_DDEFLD ),
aName( rName ), pDoc( 0 ), nRefCnt( 0 )
{
- bCRLFFlag = bDeleted = FALSE;
+ bCRLFFlag = bDeleted = sal_False;
refLink = new SwIntrnlRefLink( *this, nUpdateType, FORMAT_STRING );
SetCmd( rCmd );
}
@@ -327,9 +327,9 @@ void SwDDEFieldType::_RefCntChgd()
}
}
-bool SwDDEFieldType::QueryValue( uno::Any& rVal, USHORT nWhichId ) const
+bool SwDDEFieldType::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
{
- BYTE nPart = 0;
+ sal_uInt8 nPart = 0;
switch( nWhichId )
{
case FIELD_PROP_PAR2: nPart = 3; break;
@@ -337,7 +337,7 @@ bool SwDDEFieldType::QueryValue( uno::Any& rVal, USHORT nWhichId ) const
case FIELD_PROP_SUBTYPE: nPart = 1; break;
case FIELD_PROP_BOOL1:
{
- sal_Bool bSet = GetType() == sfx2::LINKUPDATE_ALWAYS ? TRUE : FALSE;
+ sal_Bool bSet = GetType() == sfx2::LINKUPDATE_ALWAYS ? sal_True : sal_False;
rVal.setValue(&bSet, ::getBooleanCppuType());
}
break;
@@ -352,16 +352,16 @@ bool SwDDEFieldType::QueryValue( uno::Any& rVal, USHORT nWhichId ) const
return true;
}
-bool SwDDEFieldType::PutValue( const uno::Any& rVal, USHORT nWhichId )
+bool SwDDEFieldType::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
{
- BYTE nPart = 0;
+ sal_uInt8 nPart = 0;
switch( nWhichId )
{
case FIELD_PROP_PAR2: nPart = 3; break;
case FIELD_PROP_PAR4: nPart = 2; break;
case FIELD_PROP_SUBTYPE: nPart = 1; break;
case FIELD_PROP_BOOL1:
- SetType( static_cast<USHORT>(*(sal_Bool*)rVal.getValue() ?
+ SetType( static_cast<sal_uInt16>(*(sal_Bool*)rVal.getValue() ?
sfx2::LINKUPDATE_ALWAYS :
sfx2::LINKUPDATE_ONCALL ) );
break;
diff --git a/sw/source/core/fields/ddetbl.cxx b/sw/source/core/fields/ddetbl.cxx
index 35f5f3b7466d..c10ea7d2895f 100644
--- a/sw/source/core/fields/ddetbl.cxx
+++ b/sw/source/core/fields/ddetbl.cxx
@@ -47,13 +47,13 @@ TYPEINIT1( SwDDETable, SwTable );
// Constructor movet alle Lines/Boxen aus der SwTable zu sich.
// Die SwTable ist danach Leer und muss geloescht werden.
SwDDETable::SwDDETable( SwTable& rTable, SwDDEFieldType* pDDEType,
- BOOL bUpdate )
+ sal_Bool bUpdate )
: SwTable( rTable ), aDepend( this, pDDEType )
{
// Kopiere/move die Daten der Tabelle
aSortCntBoxes.Insert( &rTable.GetTabSortBoxes(), 0,
rTable.GetTabSortBoxes().Count() ); // move die Inh. Boxen
- rTable.GetTabSortBoxes().Remove( (USHORT)0, rTable.GetTabSortBoxes().Count() );
+ rTable.GetTabSortBoxes().Remove( (sal_uInt16)0, rTable.GetTabSortBoxes().Count() );
aLines.Insert( &rTable.GetTabLines(),0 ); // move die Lines
rTable.GetTabLines().Remove( 0, rTable.GetTabLines().Count() );
@@ -117,11 +117,11 @@ void SwDDETable::ChangeContent()
String aExpand = pDDEType->GetExpansion();
aExpand.EraseAllChars( '\r' );
- for( USHORT n = 0; n < aLines.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aLines.Count(); ++n )
{
String aLine = aExpand.GetToken( n, '\n' );
SwTableLine* pLine = aLines[ n ];
- for( USHORT i = 0; i < pLine->GetTabBoxes().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pLine->GetTabBoxes().Count(); ++i )
{
SwTableBox* pBox = pLine->GetTabBoxes()[ i ];
OSL_ENSURE( pBox->GetSttIdx(), "keine InhaltsBox" );
@@ -150,7 +150,7 @@ SwDDEFieldType* SwDDETable::GetDDEFldType()
return (SwDDEFieldType*)aDepend.GetRegisteredIn();
}
-BOOL SwDDETable::NoDDETable()
+sal_Bool SwDDETable::NoDDETable()
{
// suche den TabellenNode
OSL_ENSURE( GetFrmFmt(), "Kein FrameFormat" );
@@ -158,11 +158,11 @@ BOOL SwDDETable::NoDDETable()
// Stehen wir im richtigen NodesArray (Wegen UNDO)
if( !aLines.Count() )
- return FALSE;
+ return sal_False;
OSL_ENSURE( GetTabSortBoxes().Count(), "Tabelle ohne Inhalt?" );
SwNode* pNd = (SwNode*)GetTabSortBoxes()[0]->GetSttNd();
if( !pNd->GetNodes().IsDocNodes() )
- return FALSE;
+ return sal_False;
SwTableNode* pTblNd = pNd->FindTableNode();
OSL_ENSURE( pTblNd, "wo steht denn die Tabelle ?");
@@ -172,7 +172,7 @@ BOOL SwDDETable::NoDDETable()
// Kopiere/move die Daten der Tabelle
pNewTbl->GetTabSortBoxes().Insert( &GetTabSortBoxes(), 0,
GetTabSortBoxes().Count() ); // move die Inh. Boxen
- GetTabSortBoxes().Remove( (USHORT)0, GetTabSortBoxes().Count() );
+ GetTabSortBoxes().Remove( (sal_uInt16)0, GetTabSortBoxes().Count() );
pNewTbl->GetTabLines().Insert( &GetTabLines(),0 ); // move die Lines
GetTabLines().Remove( 0, GetTabLines().Count() );
@@ -182,7 +182,7 @@ BOOL SwDDETable::NoDDETable()
pTblNd->SetNewTable( pNewTbl ); // setze die Tabelle
- return TRUE;
+ return sal_True;
}
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index 6722334cfdfa..9a7c1b6b7d5b 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -171,9 +171,9 @@ void SwPageNumberFieldType::ChangeExpansion( SwDoc* pDoc, sal_uInt16 nPage,
// es NIE zurueck
const SfxItemPool &rPool = pDoc->GetAttrPool();
const SwFmtPageDesc *pDesc;
- sal_uInt16 nMaxItems = rPool.GetItemCount( RES_PAGEDESC );
- for( sal_uInt16 n = 0; n < nMaxItems; ++n )
- if( 0 != (pDesc = (SwFmtPageDesc*)rPool.GetItem( RES_PAGEDESC, n ) )
+ sal_uInt32 nMaxItems = rPool.GetItemCount2( RES_PAGEDESC );
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
+ if( 0 != (pDesc = (SwFmtPageDesc*)rPool.GetItem2( RES_PAGEDESC, n ) )
&& pDesc->GetNumOffset() && pDesc->GetDefinedIn() )
{
if( pDesc->GetDefinedIn()->ISA( SwCntntNode ))
@@ -249,7 +249,7 @@ sal_uInt16 SwPageNumberField::GetSubType() const
return nSubType;
}
-bool SwPageNumberField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwPageNumberField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -280,7 +280,7 @@ bool SwPageNumberField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwPageNumberField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwPageNumberField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
bool bRet = true;
sal_Int16 nSet = 0;
@@ -333,7 +333,7 @@ SwAuthorFieldType::SwAuthorFieldType()
{
}
-String SwAuthorFieldType::Expand(ULONG nFmt) const
+String SwAuthorFieldType::Expand(sal_uLong nFmt) const
{
String sRet;
SvtUserOptions& rOpt = SW_MOD()->GetUserOptions();
@@ -376,7 +376,7 @@ SwField* SwAuthorField::Copy() const
return pTmp;
}
-bool SwAuthorField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwAuthorField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
bool bVal;
switch( nWhichId )
@@ -401,7 +401,7 @@ bool SwAuthorField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwAuthorField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwAuthorField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -436,7 +436,7 @@ SwFileNameFieldType::SwFileNameFieldType(SwDoc *pDocument)
pDoc = pDocument;
}
-String SwFileNameFieldType::Expand(ULONG nFmt) const
+String SwFileNameFieldType::Expand(sal_uLong nFmt) const
{
String aRet;
const SwDocShell* pDShell = pDoc->GetDocShell();
@@ -517,7 +517,7 @@ SwField* SwFileNameField::Copy() const
return pTmp;
}
-bool SwFileNameField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwFileNameField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -543,7 +543,7 @@ bool SwFileNameField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
case FIELD_PROP_BOOL2:
{
- BOOL bVal = IsFixed();
+ sal_Bool bVal = IsFixed();
rAny.setValue(&bVal, ::getBooleanCppuType());
}
break;
@@ -557,7 +557,7 @@ bool SwFileNameField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwFileNameField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwFileNameField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -568,7 +568,7 @@ bool SwFileNameField::PutValue( const uno::Any& rAny, USHORT nWhichId )
// here only a int16
sal_Int32 nType = 0;
rAny >>= nType;
- BOOL bFixed = IsFixed();
+ sal_Bool bFixed = IsFixed();
switch( nType )
{
case text::FilenameDisplayFormat::PATH:
@@ -614,7 +614,7 @@ SwTemplNameFieldType::SwTemplNameFieldType(SwDoc *pDocument)
pDoc = pDocument;
}
-String SwTemplNameFieldType::Expand(ULONG nFmt) const
+String SwTemplNameFieldType::Expand(sal_uLong nFmt) const
{
OSL_ENSURE( nFmt < FF_END, "Expand: kein guelt. Fmt!" );
@@ -688,7 +688,7 @@ SwField* SwTemplNameField::Copy() const
return pTmp;
}
-bool SwTemplNameField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwTemplNameField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch ( nWhichId )
{
@@ -714,7 +714,7 @@ bool SwTemplNameField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwTemplNameField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwTemplNameField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch ( nWhichId )
{
@@ -838,7 +838,7 @@ void SwDocStatField::ChangeExpansion( const SwFrm* pFrm )
pFrm->FindPageFrm()->GetPageDesc()->GetNumType().GetNumberingType() );
}
-bool SwDocStatField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwDocStatField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch ( nWhichId )
{
@@ -851,7 +851,7 @@ bool SwDocStatField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwDocStatField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwDocStatField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
bool bRet = false;
switch ( nWhichId )
@@ -892,7 +892,7 @@ SwFieldType* SwDocInfoFieldType::Copy() const
return pTyp;
}
-void lcl_GetLocalDataWrapper( ULONG nLang,
+void lcl_GetLocalDataWrapper( sal_uLong nLang,
const LocaleDataWrapper **ppAppLocalData,
const LocaleDataWrapper **ppLocalData )
{
@@ -1161,30 +1161,30 @@ String SwDocInfoField::Expand() const
return aContent;
}
-String SwDocInfoField::GetCntnt(sal_Bool bName) const
+String SwDocInfoField::GetFieldName() const
{
- if ( bName )
- {
- String aStr(SwFieldType::GetTypeStr(GetTypeId()));
- aStr += ':';
+ String aStr(SwFieldType::GetTypeStr(GetTypeId()));
+ aStr += ':';
- sal_uInt16 nSub = nSubType & 0xff;
+ sal_uInt16 const nSub = nSubType & 0xff;
- switch(nSub)
- {
- case DI_CUSTOM:
- aStr += aName;
- break;
+ switch (nSub)
+ {
+ case DI_CUSTOM:
+ aStr += aName;
+ break;
- default:
- aStr += *ViewShell::GetShellRes()->aDocInfoLst[ nSub - DI_SUBTYPE_BEGIN ];
- break;
- }
- if( IsFixed() )
- ( aStr += ' ' ) += ViewShell::GetShellRes()->aFixedStr;
- return aStr;
+ default:
+ aStr += *ViewShell::GetShellRes()
+ ->aDocInfoLst[ nSub - DI_SUBTYPE_BEGIN ];
+ break;
}
- return Expand();
+ if (IsFixed())
+ {
+ aStr += ' ';
+ aStr += ViewShell::GetShellRes()->aFixedStr;
+ }
+ return aStr;
}
SwField* SwDocInfoField::Copy() const
@@ -1214,7 +1214,7 @@ void SwDocInfoField::SetLanguage(sal_uInt16 nLng)
SwValueField::SetLanguage(nLng);
}
-bool SwDocInfoField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwDocInfoField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -1262,7 +1262,7 @@ bool SwDocInfoField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwDocInfoField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwDocInfoField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
sal_Int32 nValue = 0;
switch( nWhichId )
@@ -1458,25 +1458,20 @@ void SwHiddenTxtField::Evaluate(SwDoc* pDoc)
}
}
-String SwHiddenTxtField::GetCntnt(sal_Bool bName) const
+String SwHiddenTxtField::GetFieldName() const
{
- if ( bName )
- {
- String aStr(SwFieldType::GetTypeStr(nSubType));
- aStr += ' ';
- aStr += aCond;
- aStr += ' ';
- aStr += aTRUETxt;
+ String aStr(SwFieldType::GetTypeStr(nSubType));
+ aStr += ' ';
+ aStr += aCond;
+ aStr += ' ';
+ aStr += aTRUETxt;
- if(nSubType == TYP_CONDTXTFLD)
- {
-static char const cTmp[] = " : ";
- aStr.AppendAscii(cTmp);
- aStr += aFALSETxt;
- }
- return aStr;
+ if (nSubType == TYP_CONDTXTFLD)
+ {
+ aStr.AppendAscii(" : ");
+ aStr += aFALSETxt;
}
- return Expand();
+ return aStr;
}
SwField* SwHiddenTxtField::Copy() const
@@ -1542,7 +1537,7 @@ sal_uInt16 SwHiddenTxtField::GetSubType() const
return nSubType;
}
-bool SwHiddenTxtField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwHiddenTxtField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
const String* pOut = 0;
switch( nWhichId )
@@ -1573,7 +1568,7 @@ bool SwHiddenTxtField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwHiddenTxtField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwHiddenTxtField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -1594,7 +1589,7 @@ bool SwHiddenTxtField::PutValue( const uno::Any& rAny, USHORT nWhichId )
break;
case FIELD_PROP_PAR4:
::GetString( rAny, aContent);
- bValid = TRUE;
+ bValid = sal_True;
break;
default:
OSL_FAIL("illegal property");
@@ -1674,7 +1669,7 @@ SwField* SwHiddenParaField::Copy() const
return pFld;
}
-bool SwHiddenParaField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwHiddenParaField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch ( nWhichId )
{
@@ -1694,7 +1689,7 @@ bool SwHiddenParaField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwHiddenParaField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwHiddenParaField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch ( nWhichId )
{
@@ -1824,7 +1819,7 @@ sal_uInt32 SwPostItField::GetNumberOfParagraphs() const
return (mpText) ? mpText->Count() : 1;
}
-bool SwPostItField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwPostItField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -1884,7 +1879,7 @@ bool SwPostItField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwPostItField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwPostItField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -1914,7 +1909,7 @@ bool SwPostItField::PutValue( const uno::Any& rAny, USHORT nWhichId )
{
util::DateTime aDateTimeValue;
if(!(rAny >>= aDateTimeValue))
- return FALSE;
+ return sal_False;
aDateTime.Set100Sec(aDateTimeValue.HundredthSeconds);
aDateTime.SetSec(aDateTimeValue.Seconds);
aDateTime.SetMin(aDateTimeValue.Minutes);
@@ -2010,7 +2005,7 @@ void SwExtUserField::SetSubType(sal_uInt16 nSub)
nType = nSub;
}
-bool SwExtUserField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwExtUserField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -2036,7 +2031,7 @@ bool SwExtUserField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwExtUserField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwExtUserField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -2113,7 +2108,7 @@ void SwRefPageSetField::SetPar2(const String& rStr)
SetOffset( (short) rStr.ToInt32() );
}
-bool SwRefPageSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwRefPageSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -2129,7 +2124,7 @@ bool SwRefPageSetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwRefPageSetField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwRefPageSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -2366,7 +2361,7 @@ void SwRefPageGetField::ChangeExpansion( const SwFrm* pFrm,
}
}
-bool SwRefPageGetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwRefPageGetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -2382,7 +2377,7 @@ bool SwRefPageGetField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwRefPageGetField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwRefPageGetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -2477,7 +2472,7 @@ void SwJumpEditField::SetPar2(const String& rStr)
sHelp = rStr;
}
-bool SwJumpEditField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwJumpEditField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -2508,7 +2503,7 @@ bool SwJumpEditField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwJumpEditField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwJumpEditField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -2587,7 +2582,7 @@ void SwCombinedCharField::SetPar1(const String& rStr)
}
bool SwCombinedCharField::QueryValue( uno::Any& rAny,
- USHORT nWhichId ) const
+ sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -2601,7 +2596,7 @@ bool SwCombinedCharField::QueryValue( uno::Any& rAny,
}
bool SwCombinedCharField::PutValue( const uno::Any& rAny,
- USHORT nWhichId )
+ sal_uInt16 nWhichId )
{
switch( nWhichId )
{
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 9933df39c824..495d371967a5 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -72,15 +72,23 @@ using ::rtl::OUString;
SV_IMPL_PTRARR( _SwSeqFldList, _SeqFldLstElem* )
//-----------------------------------------------------------------------------
-sal_Int16 lcl_SubTypeToAPI(USHORT nSubType)
+sal_Int16 lcl_SubTypeToAPI(sal_uInt16 nSubType)
{
sal_Int16 nRet = 0;
switch(nSubType)
{
- case nsSwGetSetExpType::GSE_EXPR : nRet = SetVariableType::VAR /*0*/; break;
- case nsSwGetSetExpType::GSE_SEQ : nRet = SetVariableType::SEQUENCE /*1*/; break;
- case nsSwGetSetExpType::GSE_FORMULA : nRet = SetVariableType::FORMULA /*2*/; break;
- case nsSwGetSetExpType::GSE_STRING : nRet = SetVariableType::STRING /*3*/; break;
+ case nsSwGetSetExpType::GSE_EXPR:
+ nRet = SetVariableType::VAR; // 0
+ break;
+ case nsSwGetSetExpType::GSE_SEQ:
+ nRet = SetVariableType::SEQUENCE; // 1
+ break;
+ case nsSwGetSetExpType::GSE_FORMULA:
+ nRet = SetVariableType::FORMULA; // 2
+ break;
+ case nsSwGetSetExpType::GSE_STRING:
+ nRet = SetVariableType::STRING; // 3
+ break;
}
return nRet;
}
@@ -105,7 +113,7 @@ sal_Int32 lcl_APIToSubType(const uno::Any& rAny)
//-----------------------------------------------------------------------------
-void ReplacePoint( String& rTmpName, BOOL bWithCommandType )
+void ReplacePoint( String& rTmpName, sal_Bool bWithCommandType )
{
// replace first and last (if bWithCommandType: last two) dot Ersten und letzten Punkt ersetzen, da in Tabellennamen Punkte erlaubt sind
// since table names may contain dots
@@ -249,7 +257,7 @@ const SwTxtNode* GetBodyTxtNode( const SwDoc& rDoc, SwPosition& rPos,
{
Point aPt( pLayout->Frm().Pos() );
aPt.Y()++; // aus dem Header raus
- pCntFrm = pPgFrm->GetCntntPos( aPt, FALSE, TRUE, FALSE );
+ pCntFrm = pPgFrm->GetCntntPos( aPt, sal_False, sal_True, sal_False );
pTxtNode = GetFirstTxtNode( rDoc, rPos, pCntFrm, aPt );
}
}
@@ -289,9 +297,9 @@ void SwGetExpFieldType::Modify( SfxPoolItem*, SfxPoolItem* pNew )
--------------------------------------------------------------------*/
SwGetExpField::SwGetExpField(SwGetExpFieldType* pTyp, const String& rFormel,
- USHORT nSub, ULONG nFmt)
+ sal_uInt16 nSub, sal_uLong nFmt)
: SwFormulaField( pTyp, nFmt, 0.0 ),
- bIsInBodyTxt( TRUE ),
+ bIsInBodyTxt( sal_True ),
nSubType(nSub),
bLateInitialization( false )
{
@@ -306,18 +314,15 @@ String SwGetExpField::Expand() const
return sExpand;
}
-String SwGetExpField::GetCntnt(BOOL bName) const
+String SwGetExpField::GetFieldName() const
{
- if ( bName )
- {
- String aStr( SwFieldType::GetTypeStr( static_cast<USHORT>(nsSwGetSetExpType::GSE_FORMULA & nSubType
- ? TYP_FORMELFLD
- : TYP_GETFLD ) ));
- aStr += ' ';
- aStr += GetFormula();
- return aStr;
- }
- return Expand();
+ String aStr( SwFieldType::GetTypeStr(
+ static_cast<sal_uInt16>(((nsSwGetSetExpType::GSE_FORMULA & nSubType) != 0)
+ ? TYP_FORMELFLD
+ : TYP_GETFLD ) ));
+ aStr += ' ';
+ aStr += GetFormula();
+ return aStr;
}
SwField* SwGetExpField::Copy() const
@@ -373,7 +378,7 @@ void SwGetExpField::ChangeExpansion( const SwFrm& rFrm, const SwTxtFld& rFld )
if(GetSubType() & nsSwGetSetExpType::GSE_STRING)
{
SwHash** ppHashTbl;
- USHORT nSize;
+ sal_uInt16 nSize;
rDoc.FldsToExpand( ppHashTbl, nSize, aEndFld );
LookString( ppHashTbl, nSize, GetFormula(), sExpand );
::DeleteHashTable( ppHashTbl, nSize ); // HashTabelle loeschen
@@ -403,17 +408,17 @@ void SwGetExpField::SetPar2(const String& rStr)
SetFormula(rStr);
}
-USHORT SwGetExpField::GetSubType() const
+sal_uInt16 SwGetExpField::GetSubType() const
{
return nSubType;
}
-void SwGetExpField::SetSubType(USHORT nType)
+void SwGetExpField::SetSubType(sal_uInt16 nType)
{
nSubType = nType;
}
-void SwGetExpField::SetLanguage(USHORT nLng)
+void SwGetExpField::SetLanguage(sal_uInt16 nLng)
{
if (nSubType & nsSwExtendedSubType::SUB_CMD)
SwField::SetLanguage(nLng);
@@ -421,7 +426,7 @@ void SwGetExpField::SetLanguage(USHORT nLng)
SwValueField::SetLanguage(nLng);
}
-bool SwGetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwGetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -445,7 +450,7 @@ bool SwGetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
break;
case FIELD_PROP_BOOL2:
{
- BOOL bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
+ sal_Bool bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
rAny.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -458,7 +463,7 @@ bool SwGetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwGetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwGetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
sal_Int32 nTmp = 0;
String sTmp;
@@ -473,7 +478,7 @@ bool SwGetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
break;
case FIELD_PROP_USHORT1:
rAny >>= nTmp;
- nSubType = static_cast<USHORT>(nTmp);
+ nSubType = static_cast<sal_uInt16>(nTmp);
break;
case FIELD_PROP_PAR1:
SetFormula( ::GetString( rAny, sTmp ));
@@ -481,7 +486,7 @@ bool SwGetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
case FIELD_PROP_SUBTYPE:
nTmp = lcl_APIToSubType(rAny);
if( nTmp >=0 )
- SetSubType( static_cast<USHORT>((GetSubType() & 0xff00) | nTmp));
+ SetSubType( static_cast<sal_uInt16>((GetSubType() & 0xff00) | nTmp));
break;
case FIELD_PROP_BOOL2:
if(*(sal_Bool*) rAny.getValue())
@@ -502,16 +507,16 @@ bool SwGetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
Set-Expression-Type
--------------------------------------------------*/
-SwSetExpFieldType::SwSetExpFieldType( SwDoc* pDc, const String& rName, USHORT nTyp )
+SwSetExpFieldType::SwSetExpFieldType( SwDoc* pDc, const String& rName, sal_uInt16 nTyp )
: SwValueFieldType( pDc, RES_SETEXPFLD ),
sName( rName ),
pOutlChgNd( 0 ),
sDelim( String::CreateFromAscii( "." ) ),
nType(nTyp), nLevel( UCHAR_MAX ),
- bDeleted( FALSE )
+ bDeleted( sal_False )
{
if( ( nsSwGetSetExpType::GSE_SEQ | nsSwGetSetExpType::GSE_STRING ) & nType )
- EnableFormat(FALSE); // Numberformatter nicht einsetzen
+ EnableFormat(sal_False); // Numberformatter nicht einsetzen
}
SwFieldType* SwSetExpFieldType::Copy() const
@@ -534,7 +539,7 @@ void SwSetExpFieldType::Modify( SfxPoolItem*, SfxPoolItem* )
return; // nicht weiter expandieren
}
-void SwSetExpFieldType::SetSeqFormat(ULONG nFmt)
+void SwSetExpFieldType::SetSeqFormat(sal_uLong nFmt)
{
SwClientIter aIter(*this);
for( SwFmtFld* pFld = (SwFmtFld*)aIter.First( TYPE(SwFmtFld) );
@@ -542,7 +547,7 @@ void SwSetExpFieldType::SetSeqFormat(ULONG nFmt)
pFld->GetFld()->ChangeFormat( nFmt );
}
-ULONG SwSetExpFieldType::GetSeqFormat()
+sal_uLong SwSetExpFieldType::GetSeqFormat()
{
if( !GetDepends() )
return SVX_NUM_ARABIC;
@@ -551,15 +556,15 @@ ULONG SwSetExpFieldType::GetSeqFormat()
return pFld->GetFormat();
}
-USHORT SwSetExpFieldType::SetSeqRefNo( SwSetExpField& rFld )
+sal_uInt16 SwSetExpFieldType::SetSeqRefNo( SwSetExpField& rFld )
{
if( !GetDepends() || !(nsSwGetSetExpType::GSE_SEQ & nType) )
return USHRT_MAX;
-extern void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos = 0 );
+extern void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos = 0 );
SvUShorts aArr( 64 );
- USHORT n;
+ sal_uInt16 n;
// dann testmal, ob die Nummer schon vergeben ist oder ob eine neue
// bestimmt werden muss.
@@ -574,7 +579,7 @@ extern void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos = 0 );
// teste erstmal ob die Nummer schon vorhanden ist:
- USHORT nNum = rFld.GetSeqNumber();
+ sal_uInt16 nNum = rFld.GetSeqNumber();
if( USHRT_MAX != nNum )
{
for( n = 0; n < aArr.Count(); ++n )
@@ -596,7 +601,7 @@ extern void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos = 0 );
return n;
}
-USHORT SwSetExpFieldType::GetSeqFldList( SwSeqFldList& rList )
+sal_uInt16 SwSetExpFieldType::GetSeqFldList( SwSeqFldList& rList )
{
if( rList.Count() )
rList.Remove( 0, rList.Count() );
@@ -634,7 +639,7 @@ void SwSetExpFieldType::SetChapter( SwSetExpField& rFld, const SwNode& rNd )
const SwNodeNum & aNum = *(pTxtNd->GetNum());
// nur die Nummer besorgen, ohne Pre-/Post-fixstrings
- String sNumber( pRule->MakeNumString(aNum, FALSE ));
+ String sNumber( pRule->MakeNumString(aNum, sal_False ));
if( sNumber.Len() )
rFld.ChgExpStr( ( sNumber += sDelim ) += rFld.GetExpStr() );
@@ -647,7 +652,7 @@ void SwSetExpFieldType::SetChapter( SwSetExpField& rFld, const SwNode& rNd )
}
}
-bool SwSetExpFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwSetExpFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -672,7 +677,7 @@ bool SwSetExpFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwSetExpFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwSetExpFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -680,7 +685,7 @@ bool SwSetExpFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId )
{
sal_Int32 nSet = lcl_APIToSubType(rAny);
if(nSet >=0)
- SetType(static_cast<USHORT>(nSet));
+ SetType(static_cast<sal_uInt16>(nSet));
}
break;
case FIELD_PROP_PAR2:
@@ -709,7 +714,7 @@ bool SwSetExpFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId )
return true;
}
-BOOL SwSeqFldList::InsertSort( _SeqFldLstElem* pNew )
+sal_Bool SwSeqFldList::InsertSort( _SeqFldLstElem* pNew )
{
sal_Unicode* p = pNew->sDlgEntry.GetBufferAccess();
while( *p )
@@ -719,16 +724,16 @@ BOOL SwSeqFldList::InsertSort( _SeqFldLstElem* pNew )
++p;
}
- USHORT nPos;
- BOOL bRet = SeekEntry( *pNew, &nPos );
+ sal_uInt16 nPos;
+ sal_Bool bRet = SeekEntry( *pNew, &nPos );
if( !bRet )
C40_INSERT( _SeqFldLstElem, pNew, nPos );
return bRet;
}
-BOOL SwSeqFldList::SeekEntry( const _SeqFldLstElem& rNew, USHORT* pP )
+sal_Bool SwSeqFldList::SeekEntry( const _SeqFldLstElem& rNew, sal_uInt16* pP )
{
- USHORT nO = Count(), nM, nU = 0;
+ sal_uInt16 nO = Count(), nM, nU = 0;
if( nO > 0 )
{
CollatorWrapper & rCaseColl = ::GetAppCaseCollator(),
@@ -740,7 +745,7 @@ BOOL SwSeqFldList::SeekEntry( const _SeqFldLstElem& rNew, USHORT* pP )
const String& rTmp2 = rNew.sDlgEntry;
xub_StrLen nFndPos2 = 0;
String sNum2( rTmp2.GetToken( 0, ' ', nFndPos2 ));
- BOOL bIsNum2IsNumeric = rCC.isAsciiNumeric( sNum2 );
+ sal_Bool bIsNum2IsNumeric = rCC.isAsciiNumeric( sNum2 );
sal_Int32 nNum2 = bIsNum2IsNumeric ? sNum2.ToInt32() : 0;
nO--;
@@ -769,7 +774,7 @@ BOOL SwSeqFldList::SeekEntry( const _SeqFldLstElem& rNew, USHORT* pP )
if( 0 == nCmp )
{
if( pP ) *pP = nM;
- return TRUE;
+ return sal_True;
}
else if( 0 < nCmp )
nU = nM + 1;
@@ -780,7 +785,7 @@ BOOL SwSeqFldList::SeekEntry( const _SeqFldLstElem& rNew, USHORT* pP )
}
}
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -788,13 +793,13 @@ BOOL SwSeqFldList::SeekEntry( const _SeqFldLstElem& rNew, USHORT* pP )
--------------------------------------------------------------------*/
SwSetExpField::SwSetExpField(SwSetExpFieldType* pTyp, const String& rFormel,
- ULONG nFmt)
+ sal_uLong nFmt)
: SwFormulaField( pTyp, nFmt, 0.0 ), nSeqNo( USHRT_MAX ),
nSubType(0)
{
SetFormula(rFormel);
// SubType ignorieren !!!
- bInput = FALSE;
+ bInput = sal_False;
if( IsSequenceFld() )
{
SwValueField::SetValue(1.0);
@@ -826,35 +831,28 @@ String SwSetExpField::Expand() const
}
/*--------------------------------------------------------------------
- Beschreibung: liefert den Namen oder den Inhalt
+ @return the field name
--------------------------------------------------------------------*/
-String SwSetExpField::GetCntnt(BOOL bName) const
+String SwSetExpField::GetFieldName() const
{
- if( bName )
- {
- USHORT nStrType;
-
- if( IsSequenceFld() )
- nStrType = TYP_SEQFLD;
- else if( bInput )
- nStrType = TYP_SETINPFLD;
- else
- nStrType = TYP_SETFLD;
+ SwFldTypesEnum const nStrType( (IsSequenceFld())
+ ? TYP_SEQFLD
+ : (bInput)
+ ? TYP_SETINPFLD
+ : TYP_SETFLD );
- String aStr( SwFieldType::GetTypeStr( nStrType ) );
- aStr += ' ';
- aStr += GetTyp()->GetName();
+ String aStr( SwFieldType::GetTypeStr( static_cast<sal_uInt16>(nStrType) ) );
+ aStr += ' ';
+ aStr += GetTyp()->GetName();
- if( TYP_SEQFLD != nStrType )
- {
- // Sequence nicht die Formel ausgeben
- aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " = " ));
- aStr += GetFormula();
- }
- return aStr;
+ // Sequence: without formula
+ if (TYP_SEQFLD != nStrType)
+ {
+ aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " = " ) );
+ aStr += GetFormula();
}
- return Expand();
+ return aStr;
}
SwField* SwSetExpField::Copy() const
@@ -873,7 +871,7 @@ SwField* SwSetExpField::Copy() const
return pTmp;
}
-void SwSetExpField::SetSubType(USHORT nSub)
+void SwSetExpField::SetSubType(sal_uInt16 nSub)
{
((SwSetExpFieldType*)GetTyp())->SetType(nSub & 0xff);
nSubType = nSub & 0xff00;
@@ -881,7 +879,7 @@ void SwSetExpField::SetSubType(USHORT nSub)
DBG_ASSERT( (nSub & 0xff) != 3, "SubType ist illegal!" );
}
-USHORT SwSetExpField::GetSubType() const
+sal_uInt16 SwSetExpField::GetSubType() const
{
return ((SwSetExpFieldType*)GetTyp())->GetType() | nSubType;
}
@@ -891,7 +889,7 @@ void SwSetExpField::SetValue( const double& rAny )
SwValueField::SetValue(rAny);
if( IsSequenceFld() )
- sExpand = FormatNumber( (USHORT)GetValue(), GetFormat() );
+ sExpand = FormatNumber( (sal_uInt16)GetValue(), GetFormat() );
else
sExpand = ((SwValueFieldType*)GetTyp())->ExpandValue( rAny,
GetFormat(), GetLanguage());
@@ -919,9 +917,9 @@ xub_StrLen SwGetExpField::GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc
if(sNodeText.Len())
{
//now check if sNodeText starts with a non-alphanumeric character plus a blank
- USHORT nSrcpt = pBreakIt->GetRealScriptOfText( sNodeText, 0 );
+ sal_uInt16 nSrcpt = pBreakIt->GetRealScriptOfText( sNodeText, 0 );
- static USHORT nIds[] =
+ static sal_uInt16 nIds[] =
{
RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
RES_CHRATR_FONT, RES_CHRATR_FONT,
@@ -941,7 +939,7 @@ xub_StrLen SwGetExpField::GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc
GetWhichOfScript( RES_CHRATR_LANGUAGE, nSrcpt )) ).GetLanguage();
CharClass aCC( SvxCreateLocale( eLang ));
sal_Unicode c0 = sNodeText.GetChar(0);
- BOOL bIsAlphaNum = aCC.isAlphaNumeric( sNodeText, 0 );
+ sal_Bool bIsAlphaNum = aCC.isAlphaNumeric( sNodeText, 0 );
if( !bIsAlphaNum ||
(c0 == ' ' || c0 == '\t'))
{
@@ -968,7 +966,7 @@ const String& SwSetExpField::GetPar1() const
String SwSetExpField::GetPar2() const
{
- USHORT nType = ((SwSetExpFieldType*)GetTyp())->GetType();
+ sal_uInt16 nType = ((SwSetExpFieldType*)GetTyp())->GetType();
if (nType & nsSwGetSetExpType::GSE_STRING)
return GetFormula();
@@ -977,7 +975,7 @@ String SwSetExpField::GetPar2() const
void SwSetExpField::SetPar2(const String& rStr)
{
- USHORT nType = ((SwSetExpFieldType*)GetTyp())->GetType();
+ sal_uInt16 nType = ((SwSetExpFieldType*)GetTyp())->GetType();
if( !(nType & nsSwGetSetExpType::GSE_SEQ) || rStr.Len() )
{
@@ -1008,25 +1006,21 @@ SwFieldType* SwInputFieldType::Copy() const
--------------------------------------------------------------------*/
SwInputField::SwInputField(SwInputFieldType* pTyp, const String& rContent,
- const String& rPrompt, USHORT nSub, ULONG nFmt) :
+ const String& rPrompt, sal_uInt16 nSub, sal_uLong nFmt) :
SwField(pTyp, nFmt), aContent(rContent), aPText(rPrompt), nSubType(nSub)
{
}
-String SwInputField::GetCntnt(BOOL bName) const
+String SwInputField::GetFieldName() const
{
- if ( bName )
+ String aStr(SwField::GetFieldName());
+ if ((nSubType & 0x00ff) == INP_USR)
{
- String aStr(SwField::GetCntnt(bName));
- if ((nSubType & 0x00ff) == INP_USR)
- {
- aStr += GetTyp()->GetName();
- aStr += ' ';
- aStr += aContent;
- }
- return aStr;
+ aStr += GetTyp()->GetName();
+ aStr += ' ';
+ aStr += aContent;
}
- return Expand();
+ return aStr;
}
SwField* SwInputField::Copy() const
@@ -1058,7 +1052,7 @@ String SwInputField::Expand() const
return sRet;
}
-bool SwInputField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwInputField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -1080,7 +1074,7 @@ bool SwInputField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwInputField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwInputField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -1149,22 +1143,22 @@ String SwInputField::GetToolTip() const
return aToolTip;
}
-BOOL SwInputField::isFormField() const
+sal_Bool SwInputField::isFormField() const
{
return aHelp.Len() > 0 || aToolTip.Len() > 0;
}
-USHORT SwInputField::GetSubType() const
+sal_uInt16 SwInputField::GetSubType() const
{
return nSubType;
}
-void SwInputField::SetSubType(USHORT nSub)
+void SwInputField::SetSubType(sal_uInt16 nSub)
{
nSubType = nSub;
}
-bool SwSetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -1191,7 +1185,7 @@ bool SwSetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
//I18N - if the formula contains only "TypeName+1"
//and it's one of the initially created sequence fields
//then the localized names has to be replaced by a programmatic name
- OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, GetFormula(), TRUE);
+ OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, GetFormula(), sal_True);
rAny <<= OUString( sMyFormula );
}
break;
@@ -1210,13 +1204,13 @@ bool SwSetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
break;
case FIELD_PROP_BOOL3:
{
- BOOL bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
+ sal_Bool bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
rAny.setValue(&bTmp, ::getBooleanCppuType());
}
break;
case FIELD_PROP_BOOL1:
{
- BOOL bTmp = GetInputFlag();
+ sal_Bool bTmp = GetInputFlag();
rAny.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -1229,7 +1223,7 @@ bool SwSetExpField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwSetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwSetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
sal_Int32 nTmp32 = 0;
sal_Int16 nTmp16 = 0;
@@ -1270,7 +1264,7 @@ bool SwSetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
//I18N - if the formula contains only "TypeName+1"
//and it's one of the initially created sequence fields
//then the localized names has to be replaced by a programmatic name
- OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, uTmp, FALSE);
+ OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, uTmp, sal_False);
SetFormula( sMyFormula );
}
break;
@@ -1284,7 +1278,7 @@ bool SwSetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
case FIELD_PROP_SUBTYPE:
nTmp32 = lcl_APIToSubType(rAny);
if(nTmp32 >= 0)
- SetSubType(static_cast<USHORT>((GetSubType() & 0xff00) | nTmp32));
+ SetSubType(static_cast<sal_uInt16>((GetSubType() & 0xff00) | nTmp32));
break;
case FIELD_PROP_PAR3:
::GetString( rAny, aPText );
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index 182cb0cc64e2..b14864d52c98 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -53,14 +53,11 @@
#include <comcore.hrc>
#include <math.h>
-#ifdef MAC
-#include <stdlib.h>
-#endif
using namespace ::com::sun::star;
using namespace nsSwDocInfoSubType;
-USHORT lcl_GetLanguageOfFormat( USHORT nLng, ULONG nFmt,
+sal_uInt16 lcl_GetLanguageOfFormat( sal_uInt16 nLng, sal_uLong nFmt,
const SvNumberFormatter& rFormatter )
{
if( nLng == LANGUAGE_NONE ) // wegen Bug #60010
@@ -88,7 +85,7 @@ SvStringsDtor* SwFieldType::pFldNames = 0;
DBG_NAME(SwFieldType)
- USHORT aTypeTab[] = {
+ sal_uInt16 aTypeTab[] = {
/* RES_DBFLD */ TYP_DBFLD,
/* RES_USERFLD */ TYP_USERFLD,
/* RES_FILENAMEFLD */ TYP_FILENAMEFLD,
@@ -134,7 +131,7 @@ DBG_NAME(SwFieldType)
-const String& SwFieldType::GetTypeStr(USHORT nTypeId)
+const String& SwFieldType::GetTypeStr(sal_uInt16 nTypeId)
{
if( !pFldNames )
_GetFldName();
@@ -151,7 +148,7 @@ const String& SwFieldType::GetTypeStr(USHORT nTypeId)
jedes Dokument einmalig ist.
--------------------------------------------------*/
-SwFieldType::SwFieldType( USHORT nWhichId )
+SwFieldType::SwFieldType( sal_uInt16 nWhichId )
: SwModify(0),
nWhich( nWhichId )
{
@@ -172,11 +169,11 @@ const String& SwFieldType::GetName() const
return aEmptyStr;
}
-bool SwFieldType::QueryValue( uno::Any&, USHORT ) const
+bool SwFieldType::QueryValue( uno::Any&, sal_uInt16 ) const
{
return false;
}
-bool SwFieldType::PutValue( const uno::Any& , USHORT )
+bool SwFieldType::PutValue( const uno::Any& , sal_uInt16 )
{
return false;
}
@@ -187,9 +184,9 @@ bool SwFieldType::PutValue( const uno::Any& , USHORT )
Felder sind n-mal vorhanden, Feldtypen nur einmal
--------------------------------------------------------------------*/
-SwField::SwField(SwFieldType* pTyp, sal_uInt32 nFmt, USHORT nLng) :
+SwField::SwField(SwFieldType* pTyp, sal_uInt32 nFmt, sal_uInt16 nLng) :
nLang(nLng),
- bIsAutomaticLanguage(TRUE),
+ bIsAutomaticLanguage(sal_True),
nFormat(nFmt)
{
OSL_ENSURE( pTyp, "SwField: ungueltiger SwFieldType" );
@@ -205,27 +202,27 @@ SwField::~SwField()
--------------------------------------------------------------------*/
#if OSL_DEBUG_LEVEL > 1
-USHORT SwField::Which() const
+sal_uInt16 SwField::Which() const
{
OSL_ENSURE(pType, "Kein Typ vorhanden");
return pType->Which();
}
#endif
-USHORT SwField::GetTypeId() const
+sal_uInt16 SwField::GetTypeId() const
{
- USHORT nRet;
+ sal_uInt16 nRet;
switch( pType->Which() )
{
case RES_DATETIMEFLD:
if (GetSubType() & FIXEDFLD)
- nRet = static_cast<USHORT>(GetSubType() & DATEFLD ? TYP_FIXDATEFLD : TYP_FIXTIMEFLD);
+ nRet = static_cast<sal_uInt16>(GetSubType() & DATEFLD ? TYP_FIXDATEFLD : TYP_FIXTIMEFLD);
else
- nRet = static_cast<USHORT>(GetSubType() & DATEFLD ? TYP_DATEFLD : TYP_TIMEFLD);
+ nRet = static_cast<sal_uInt16>(GetSubType() & DATEFLD ? TYP_DATEFLD : TYP_TIMEFLD);
break;
case RES_GETEXPFLD:
- nRet = static_cast<USHORT>(nsSwGetSetExpType::GSE_FORMULA & GetSubType() ? TYP_FORMELFLD : TYP_GETFLD);
+ nRet = static_cast<sal_uInt16>(nsSwGetSetExpType::GSE_FORMULA & GetSubType() ? TYP_FORMELFLD : TYP_GETFLD);
break;
case RES_HIDDENTXTFLD:
@@ -262,21 +259,20 @@ USHORT SwField::GetTypeId() const
Beschreibung: liefert den Namen oder den Inhalt
--------------------------------------------------------------------*/
-String SwField::GetCntnt( BOOL bName ) const
+String SwField::GetFieldName() const
{
- String sRet;
- if( bName )
+ sal_uInt16 nTypeId = GetTypeId();
+ if (RES_DATETIMEFLD == GetTyp()->Which())
{
- USHORT nTypeId = GetTypeId();
- if( RES_DATETIMEFLD == GetTyp()->Which() )
- nTypeId = static_cast<USHORT>(GetSubType() & DATEFLD ? TYP_DATEFLD : TYP_TIMEFLD);
-
- sRet = SwFieldType::GetTypeStr( nTypeId );
- if( IsFixed() )
- ( sRet += ' ' ) += ViewShell::GetShellRes()->aFixedStr;
+ nTypeId = static_cast<sal_uInt16>(
+ ((GetSubType() & DATEFLD) != 0) ? TYP_DATEFLD : TYP_TIMEFLD);
+ }
+ String sRet = SwFieldType::GetTypeStr( nTypeId );
+ if (IsFixed())
+ {
+ sRet += ' ';
+ sRet += ViewShell::GetShellRes()->aFixedStr;
}
- else
- sRet = Expand();
return sRet;
}
@@ -305,22 +301,22 @@ void SwField::SetPar1(const String& )
void SwField::SetPar2(const String& )
{}
-USHORT SwField::GetSubType() const
+sal_uInt16 SwField::GetSubType() const
{
return 0;
}
-void SwField::SetSubType(USHORT )
+void SwField::SetSubType(sal_uInt16 )
{
}
-bool SwField::QueryValue( uno::Any& rVal, USHORT nWhichId ) const
+bool SwField::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
case FIELD_PROP_BOOL4:
{
- BOOL bFixed = !bIsAutomaticLanguage;
+ sal_Bool bFixed = !bIsAutomaticLanguage;
rVal.setValue(&bFixed, ::getCppuBooleanType());
}
break;
@@ -329,13 +325,13 @@ bool SwField::QueryValue( uno::Any& rVal, USHORT nWhichId ) const
}
return true;
}
-bool SwField::PutValue( const uno::Any& rVal, USHORT nWhichId )
+bool SwField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
case FIELD_PROP_BOOL4:
{
- BOOL bFixed = FALSE;
+ sal_Bool bFixed = sal_False;
if(rVal >>= bFixed)
bIsAutomaticLanguage = !bFixed;
}
@@ -364,9 +360,9 @@ SwFieldType* SwField::ChgTyp( SwFieldType* pNewType )
}
// hat das Feld eine Action auf dem ClickHandler ? (z.B. INetFelder,..)
-BOOL SwField::HasClickHdl() const
+sal_Bool SwField::HasClickHdl() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch( pType->Which() )
{
case RES_INTERNETFLD:
@@ -375,7 +371,7 @@ BOOL SwField::HasClickHdl() const
case RES_MACROFLD:
case RES_INPUTFLD:
case RES_DROPDOWN :
- bRet = TRUE;
+ bRet = sal_True;
break;
case RES_SETEXPFLD:
@@ -385,7 +381,7 @@ BOOL SwField::HasClickHdl() const
return bRet;
}
-void SwField::SetLanguage(USHORT nLng)
+void SwField::SetLanguage(sal_uInt16 nLng)
{
nLang = nLng;
}
@@ -395,14 +391,14 @@ void SwField::ChangeFormat(sal_uInt32 n)
nFormat = n;
}
-BOOL SwField::IsFixed() const
+sal_Bool SwField::IsFixed() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch( pType->Which() )
{
case RES_FIXDATEFLD:
case RES_FIXTIMEFLD:
- bRet = TRUE;
+ bRet = sal_True;
break;
case RES_DATETIMEFLD:
@@ -425,9 +421,9 @@ BOOL SwField::IsFixed() const
return bRet;
}
-String SwField::ExpandField(bool const bInClipboard) const
+String SwField::ExpandField(bool const bCached) const
{
- if (!bInClipboard) // #i85766# do not expand fields in clipboard documents
+ if (!bCached) // #i85766# do not expand fields in clipboard documents
{
m_Cache = Expand();
}
@@ -438,7 +434,8 @@ SwField * SwField::CopyField() const
{
SwField *const pNew = Copy();
// #i85766# cache expansion of source (for clipboard)
- pNew->m_Cache = Expand();
+ // use this->cache, not this->Expand(): only text formatting calls Expand()
+ pNew->m_Cache = m_Cache;
return pNew;
}
@@ -446,7 +443,7 @@ SwField * SwField::CopyField() const
Beschreibung: Numerierung expandieren
--------------------------------------------------------------------*/
-String FormatNumber(USHORT nNum, sal_uInt32 nFormat)
+String FormatNumber(sal_uInt16 nNum, sal_uInt32 nFormat)
{
if(SVX_NUM_PAGEDESC == nFormat)
return String::CreateFromInt32( nNum );
@@ -462,10 +459,10 @@ String FormatNumber(USHORT nNum, sal_uInt32 nFormat)
Beschreibung: CTOR SwValueFieldType
--------------------------------------------------------------------*/
-SwValueFieldType::SwValueFieldType( SwDoc* pDocPtr, USHORT nWhichId )
+SwValueFieldType::SwValueFieldType( SwDoc* pDocPtr, sal_uInt16 nWhichId )
: SwFieldType(nWhichId),
pDoc(pDocPtr),
- bUseFormat(TRUE)
+ bUseFormat(sal_True)
{
}
@@ -481,7 +478,7 @@ SwValueFieldType::SwValueFieldType( const SwValueFieldType& rTyp )
--------------------------------------------------------------------*/
String SwValueFieldType::ExpandValue( const double& rVal,
- sal_uInt32 nFmt, USHORT nLng) const
+ sal_uInt32 nFmt, sal_uInt16 nLng) const
{
if (rVal >= DBL_MAX) // FehlerString fuer Calculator
return ViewShell::GetShellRes()->aCalc_Error;
@@ -491,7 +488,7 @@ String SwValueFieldType::ExpandValue( const double& rVal,
Color* pCol = 0;
// wegen Bug #60010
- USHORT nFmtLng = ::lcl_GetLanguageOfFormat( nLng, nFmt, *pFormatter );
+ sal_uInt16 nFmtLng = ::lcl_GetLanguageOfFormat( nLng, nFmt, *pFormatter );
if( nFmt < SV_COUNTRY_LANGUAGE_OFFSET && LANGUAGE_SYSTEM != nFmtLng )
{
@@ -542,7 +539,7 @@ void SwValueFieldType::DoubleToString( String &rValue, const double &rVal,
}
void SwValueFieldType::DoubleToString( String &rValue, const double &rVal,
- USHORT nLng ) const
+ sal_uInt16 nLng ) const
{
SvNumberFormatter* pFormatter = pDoc->GetNumberFormatter();
@@ -560,7 +557,7 @@ void SwValueFieldType::DoubleToString( String &rValue, const double &rVal,
--------------------------------------------------------------------*/
SwValueField::SwValueField( SwValueFieldType* pFldType, sal_uInt32 nFmt,
- USHORT nLng, const double fVal )
+ sal_uInt16 nLng, const double fVal )
: SwField(pFldType, nFmt, nLng),
fValue(fVal)
{
@@ -605,7 +602,7 @@ SwFieldType* SwValueField::ChgTyp( SwFieldType* pNewType )
sal_uInt32 SwValueField::GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt32 nFmt)
{
const SvNumberformat* pEntry = pFormatter->GetEntry(nFmt);
- USHORT nLng = SvxLocaleToLanguage( SvtSysLocale().GetLocaleData().getLocale() );
+ sal_uInt16 nLng = SvxLocaleToLanguage( SvtSysLocale().GetLocaleData().getLocale() );
if (pEntry && nLng != pEntry->GetLanguage())
{
@@ -636,7 +633,7 @@ sal_uInt32 SwValueField::GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt
Beschreibung: Sprache im Format anpassen
--------------------------------------------------------------------*/
-void SwValueField::SetLanguage( USHORT nLng )
+void SwValueField::SetLanguage( sal_uInt16 nLng )
{
if( IsAutomaticLanguage() &&
((SwValueFieldType *)GetTyp())->UseFormat() &&
@@ -644,7 +641,7 @@ void SwValueField::SetLanguage( USHORT nLng )
{
// wegen Bug #60010
SvNumberFormatter* pFormatter = GetDoc()->GetNumberFormatter();
- USHORT nFmtLng = ::lcl_GetLanguageOfFormat( nLng, GetFormat(),
+ sal_uInt16 nFmtLng = ::lcl_GetLanguageOfFormat( nLng, GetFormat(),
*pFormatter );
if( (GetFormat() >= SV_COUNTRY_LANGUAGE_OFFSET ||
@@ -712,7 +709,7 @@ void SwFormulaField::SetFormula(const String& rStr)
{
sFormula = rStr;
- ULONG nFmt(GetFormat());
+ sal_uLong nFmt(GetFormat());
if( nFmt && SAL_MAX_UINT32 != nFmt )
{
diff --git a/sw/source/core/fields/flddat.cxx b/sw/source/core/fields/flddat.cxx
index f9f092c04861..098d7a49ffb9 100644
--- a/sw/source/core/fields/flddat.cxx
+++ b/sw/source/core/fields/flddat.cxx
@@ -56,7 +56,7 @@ SwFieldType* SwDateTimeFieldType::Copy() const
Beschreibung: Datum/Zeit-Feld
--------------------------------------------------------------------*/
-SwDateTimeField::SwDateTimeField(SwDateTimeFieldType* pInitType, USHORT nSub, ULONG nFmt, USHORT nLng)
+SwDateTimeField::SwDateTimeField(SwDateTimeFieldType* pInitType, sal_uInt16 nSub, sal_uLong nFmt, sal_uInt16 nLng)
: SwValueField(pInitType, nFmt, nLng, 0.0),
nSubType(nSub),
nOffset(0)
@@ -107,12 +107,12 @@ SwField* SwDateTimeField::Copy() const
return pTmp;
}
-USHORT SwDateTimeField::GetSubType() const
+sal_uInt16 SwDateTimeField::GetSubType() const
{
return nSubType;
}
-void SwDateTimeField::SetSubType(USHORT nType)
+void SwDateTimeField::SetSubType(sal_uInt16 nType)
{
nSubType = nType;
}
@@ -153,7 +153,7 @@ double SwDateTimeField::GetValue() const
return GetDateTime(GetDoc(), DateTime());
}
-Date SwDateTimeField::GetDate(BOOL bUseOffset) const
+Date SwDateTimeField::GetDate(sal_Bool bUseOffset) const
{
SvNumberFormatter* pFormatter = GetDoc()->GetNumberFormatter();
Date* pNullDate = pFormatter->GetNullDate();
@@ -168,7 +168,7 @@ Date SwDateTimeField::GetDate(BOOL bUseOffset) const
return aDate;
}
-Time SwDateTimeField::GetTime(BOOL bUseOffset) const
+Time SwDateTimeField::GetTime(sal_Bool bUseOffset) const
{
double fDummy;
double fFract = modf(GetValue(), &fDummy);
@@ -179,19 +179,19 @@ Time SwDateTimeField::GetTime(BOOL bUseOffset) const
return (Time)aDT;
}
-bool SwDateTimeField::QueryValue( uno::Any& rVal, USHORT nWhichId ) const
+bool SwDateTimeField::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
case FIELD_PROP_BOOL1:
{
- BOOL bTmp = IsFixed();
+ sal_Bool bTmp = IsFixed();
rVal.setValue(&bTmp, ::getCppuBooleanType());
}
break;
case FIELD_PROP_BOOL2:
{
- BOOL bTmp = IsDate();
+ sal_Bool bTmp = IsDate();
rVal.setValue(&bTmp, ::getCppuBooleanType());
}
break;
@@ -222,7 +222,7 @@ bool SwDateTimeField::QueryValue( uno::Any& rVal, USHORT nWhichId ) const
return true;
}
-bool SwDateTimeField::PutValue( const uno::Any& rVal, USHORT nWhichId )
+bool SwDateTimeField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
{
sal_Int32 nTmp = 0;
switch( nWhichId )
@@ -249,7 +249,7 @@ bool SwDateTimeField::PutValue( const uno::Any& rVal, USHORT nWhichId )
{
util::DateTime aDateTimeValue;
if(!(rVal >>= aDateTimeValue))
- return FALSE;
+ return sal_False;
DateTime aDateTime;
aDateTime.Set100Sec(aDateTimeValue.HundredthSeconds);
aDateTime.SetSec(aDateTimeValue.Seconds);
diff --git a/sw/source/core/fields/flddropdown.cxx b/sw/source/core/fields/flddropdown.cxx
index 7a61d6e34c08..0e866b1e1c51 100644
--- a/sw/source/core/fields/flddropdown.cxx
+++ b/sw/source/core/fields/flddropdown.cxx
@@ -171,7 +171,7 @@ const String & SwDropDownField::GetToolTip() const
return aToolTip;
}
-BOOL SwDropDownField::SetSelectedItem(const String & rItem)
+sal_Bool SwDropDownField::SetSelectedItem(const String & rItem)
{
vector<String>::const_iterator aIt =
std::find(aValues.begin(), aValues.end(), rItem);
@@ -199,7 +199,7 @@ void SwDropDownField::SetToolTip(const String & rToolTip)
aToolTip = rToolTip;
}
-bool SwDropDownField::QueryValue(::uno::Any &rVal, USHORT nWhich) const
+bool SwDropDownField::QueryValue(::uno::Any &rVal, sal_uInt16 nWhich) const
{
nWhich &= ~CONVERT_TWIPS;
switch( nWhich )
@@ -228,7 +228,7 @@ bool SwDropDownField::QueryValue(::uno::Any &rVal, USHORT nWhich) const
}
bool SwDropDownField::PutValue(const uno::Any &rVal,
- USHORT nWhich)
+ sal_uInt16 nWhich)
{
switch( nWhich )
{
diff --git a/sw/source/core/fields/fldlst.cxx b/sw/source/core/fields/fldlst.cxx
index 6f704a34a25b..a7ee49314997 100644
--- a/sw/source/core/fields/fldlst.cxx
+++ b/sw/source/core/fields/fldlst.cxx
@@ -46,21 +46,21 @@
Beschreibung: Sortieren der Input-Eintraege
--------------------------------------------------------------------*/
-SwInputFieldList::SwInputFieldList( SwEditShell* pShell, BOOL bBuildTmpLst )
+SwInputFieldList::SwInputFieldList( SwEditShell* pShell, sal_Bool bBuildTmpLst )
: pSh(pShell)
{
// Hier die Liste aller Eingabefelder sortiert erstellen
pSrtLst = new _SetGetExpFlds();
const SwFldTypes& rFldTypes = *pSh->GetDoc()->GetFldTypes();
- const USHORT nSize = rFldTypes.Count();
+ const sal_uInt16 nSize = rFldTypes.Count();
// Alle Typen abklappern
- for(USHORT i=0; i < nSize; ++i)
+ for(sal_uInt16 i=0; i < nSize; ++i)
{
SwFieldType* pFldType = (SwFieldType*)rFldTypes[ i ];
- USHORT nType = pFldType->Which();
+ sal_uInt16 nType = pFldType->Which();
if( RES_SETEXPFLD == nType || RES_INPUTFLD == nType || RES_DROPDOWN == nType )
{
@@ -106,13 +106,13 @@ SwInputFieldList::~SwInputFieldList()
Beschreibung: Felder aus der Liste in sortierter Reihenfolge
--------------------------------------------------------------------*/
-USHORT SwInputFieldList::Count() const
+sal_uInt16 SwInputFieldList::Count() const
{
return pSrtLst->Count();
}
-SwField* SwInputFieldList::GetField(USHORT nId)
+SwField* SwInputFieldList::GetField(sal_uInt16 nId)
{
const SwTxtFld* pTxtFld = (*pSrtLst)[ nId ]->GetFld();
OSL_ENSURE( pTxtFld, "kein TextFld" );
@@ -131,14 +131,14 @@ void SwInputFieldList::PushCrsr()
void SwInputFieldList::PopCrsr()
{
- pSh->Pop(FALSE);
+ pSh->Pop(sal_False);
}
/*--------------------------------------------------------------------
Beschreibung: Position eines Feldes ansteuern
--------------------------------------------------------------------*/
-void SwInputFieldList::GotoFieldPos(USHORT nId)
+void SwInputFieldList::GotoFieldPos(sal_uInt16 nId)
{
pSh->StartAllAction();
(*pSrtLst)[ nId ]->GetPosOfContent( *pSh->GetCrsr()->GetPoint() );
@@ -148,17 +148,17 @@ void SwInputFieldList::GotoFieldPos(USHORT nId)
// vergleiche TmpLst mit akt Feldern. Alle neue kommen in die SortLst
// damit sie geupdatet werden koennen. Returnt die Anzahl.
// (Fuer Textbausteine: nur seine Input-Felder aktualisieren)
-USHORT SwInputFieldList::BuildSortLst()
+sal_uInt16 SwInputFieldList::BuildSortLst()
{
const SwFldTypes& rFldTypes = *pSh->GetDoc()->GetFldTypes();
- USHORT nSize = rFldTypes.Count();
+ sal_uInt16 nSize = rFldTypes.Count();
// Alle Typen abklappern
- for( USHORT i = 0; i < nSize; ++i )
+ for( sal_uInt16 i = 0; i < nSize; ++i )
{
SwFieldType* pFldType = (SwFieldType*)rFldTypes[ i ];
- USHORT nType = pFldType->Which();
+ sal_uInt16 nType = pFldType->Which();
if( RES_SETEXPFLD == nType || RES_INPUTFLD == nType )
{
@@ -179,7 +179,7 @@ USHORT SwInputFieldList::BuildSortLst()
VoidPtr pTmp = (VoidPtr)pTxtFld;
// nicht in der TempListe vorhanden, also in die SortListe
// aufnehemen
- USHORT nFndPos = aTmpLst.GetPos( pTmp );
+ sal_uInt16 nFndPos = aTmpLst.GetPos( pTmp );
if( USHRT_MAX == nFndPos )
{
SwNodeIndex aIdx( rTxtNode );
@@ -208,7 +208,7 @@ void SwInputFieldList::RemoveUnselectedFlds()
FOREACHPAM_START(pSh)
{
- for (USHORT i = 0; i < Count();)
+ for (sal_uInt16 i = 0; i < Count();)
{
_SetGetExpFld* pFld = (*pSrtLst)[i];
SwPosition aPos(*PCURCRSR->GetPoint());
diff --git a/sw/source/core/fields/macrofld.cxx b/sw/source/core/fields/macrofld.cxx
index 9211f14457d8..023eb68f800c 100644
--- a/sw/source/core/fields/macrofld.cxx
+++ b/sw/source/core/fields/macrofld.cxx
@@ -29,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <hintids.hxx>
#include <doc.hxx>
#include <docufld.hxx>
@@ -39,8 +38,10 @@
#include <com/sun/star/uri/XVndSunStarScriptUrl.hpp>
#include <comphelper/processfactory.hxx>
+
using namespace ::com::sun::star;
using ::rtl::OUString;
+
/*--------------------------------------------------------------------
Beschreibung: MacroFeldtypen
--------------------------------------------------------------------*/
@@ -63,7 +64,7 @@ SwFieldType* SwMacroFieldType::Copy() const
SwMacroField::SwMacroField(SwMacroFieldType* pInitType,
const String& rLibAndName, const String& rTxt) :
- SwField(pInitType), aMacro(rLibAndName), aText(rTxt), bIsScriptURL(FALSE)
+ SwField(pInitType), aMacro(rLibAndName), aText(rTxt), bIsScriptURL(sal_False)
{
bIsScriptURL = isScriptURL(aMacro);
}
@@ -78,16 +79,12 @@ SwField* SwMacroField::Copy() const
return new SwMacroField((SwMacroFieldType*)GetTyp(), aMacro, aText);
}
-String SwMacroField::GetCntnt(BOOL bName) const
+String SwMacroField::GetFieldName() const
{
- if(bName)
- {
- String aStr(GetTyp()->GetName());
- aStr += ' ';
- aStr += aMacro;
- return aStr;
- }
- return Expand();
+ String aStr(GetTyp()->GetName());
+ aStr += ' ';
+ aStr += aMacro;
+ return aStr;
}
String SwMacroField::GetLibName() const
@@ -100,9 +97,9 @@ String SwMacroField::GetLibName() const
if (aMacro.Len())
{
- USHORT nPos = aMacro.Len();
+ sal_uInt16 nPos = aMacro.Len();
- for (USHORT i = 0; i < 3 && nPos > 0; i++)
+ for (sal_uInt16 i = 0; i < 3 && nPos > 0; i++)
while (aMacro.GetChar(--nPos) != '.' && nPos > 0) ;
return aMacro.Copy(0, nPos );
@@ -122,9 +119,9 @@ String SwMacroField::GetMacroName() const
}
else
{
- USHORT nPos = aMacro.Len();
+ sal_uInt16 nPos = aMacro.Len();
- for (USHORT i = 0; i < 3 && nPos > 0; i++)
+ for (sal_uInt16 i = 0; i < 3 && nPos > 0; i++)
while (aMacro.GetChar(--nPos) != '.' && nPos > 0) ;
return aMacro.Copy( ++nPos );
@@ -176,7 +173,7 @@ String SwMacroField::GetPar2() const
return aText;
}
-bool SwMacroField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwMacroField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -198,7 +195,7 @@ bool SwMacroField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwMacroField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwMacroField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
String sTmp;
switch( nWhichId )
@@ -236,7 +233,7 @@ void SwMacroField::CreateMacroString(
rMacro += rMacroName;
}
-BOOL SwMacroField::isScriptURL( const String& str )
+sal_Bool SwMacroField::isScriptURL( const String& str )
{
uno::Reference< lang::XMultiServiceFactory > xSMgr =
::comphelper::getProcessServiceFactory();
@@ -253,10 +250,10 @@ BOOL SwMacroField::isScriptURL( const String& str )
if ( xUrl.is() )
{
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/makefile.mk b/sw/source/core/fields/makefile.mk
deleted file mode 100644
index 358b3f7afcd8..000000000000
--- a/sw/source/core/fields/makefile.mk
+++ /dev/null
@@ -1,92 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=fields
-
-AUTOSEG=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-CXXFILES = \
- authfld.cxx \
- cellfml.cxx \
- chpfld.cxx \
- dbfld.cxx \
- ddefld.cxx \
- ddetbl.cxx \
- docufld.cxx \
- expfld.cxx \
- fldbas.cxx \
- flddat.cxx \
- flddropdown.cxx \
- scrptfld.cxx \
- macrofld.cxx \
- fldlst.cxx \
- postithelper.cxx \
- reffld.cxx \
- tblcalc.cxx \
- usrfld.cxx
-
-
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/scrptfld.obj
-
-EXCEPTIONSFILES = \
- $(SLO)$/authfld.obj \
- $(SLO)$/cellfml.obj \
- $(SLO)$/chpfld.obj \
- $(SLO)$/dbfld.obj \
- $(SLO)$/ddefld.obj \
- $(SLO)$/ddetbl.obj \
- $(SLO)$/docufld.obj \
- $(SLO)$/expfld.obj \
- $(SLO)$/fldbas.obj \
- $(SLO)$/flddat.obj \
- $(SLO)$/flddropdown.obj \
- $(SLO)$/fldlst.obj \
- $(SLO)$/macrofld.obj \
- $(SLO)$/postithelper.obj \
- $(SLO)$/reffld.obj \
- $(SLO)$/tblcalc.obj \
- $(SLO)$/textapi.obj \
- $(SLO)$/usrfld.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 42f3a87303ac..5a1b83fe4e5c 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -77,7 +77,7 @@ using namespace ::com::sun::star::text;
using namespace ::com::sun::star::lang;
using ::rtl::OUString;
-extern void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos = 0 );
+extern void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos = 0 );
void lcl_GetLayTree( const SwFrm* pFrm, SvPtrarr& rArr )
{
@@ -103,11 +103,11 @@ void lcl_GetLayTree( const SwFrm* pFrm, SvPtrarr& rArr )
}
-BOOL IsFrameBehind( const SwTxtNode& rMyNd, USHORT nMySttPos,
- const SwTxtNode& rBehindNd, USHORT nSttPos )
+sal_Bool IsFrameBehind( const SwTxtNode& rMyNd, sal_uInt16 nMySttPos,
+ const SwTxtNode& rBehindNd, sal_uInt16 nSttPos )
{
- const SwTxtFrm *pMyFrm = (SwTxtFrm*)rMyNd.GetFrm(0,0,FALSE),
- *pFrm = (SwTxtFrm*)rBehindNd.GetFrm(0,0,FALSE);
+ const SwTxtFrm *pMyFrm = (SwTxtFrm*)rMyNd.GetFrm(0,0,sal_False),
+ *pFrm = (SwTxtFrm*)rBehindNd.GetFrm(0,0,sal_False);
while( pFrm && !pFrm->IsInside( nSttPos ) )
pFrm = (SwTxtFrm*)pFrm->GetFollow();
@@ -115,15 +115,15 @@ BOOL IsFrameBehind( const SwTxtNode& rMyNd, USHORT nMySttPos,
pMyFrm = (SwTxtFrm*)pMyFrm->GetFollow();
if( !pFrm || !pMyFrm || pFrm == pMyFrm )
- return FALSE;
+ return sal_False;
SvPtrarr aRefArr( 10, 10 ), aArr( 10, 10 );
::lcl_GetLayTree( pFrm, aRefArr );
::lcl_GetLayTree( pMyFrm, aArr );
- USHORT nRefCnt = aRefArr.Count() - 1, nCnt = aArr.Count() - 1;
- BOOL bVert = FALSE;
- BOOL bR2L = FALSE;
+ sal_uInt16 nRefCnt = aRefArr.Count() - 1, nCnt = aArr.Count() - 1;
+ sal_Bool bVert = sal_False;
+ sal_Bool bR2L = sal_False;
// solange bis ein Frame ungleich ist ?
while( nRefCnt && nCnt && aRefArr[ nRefCnt ] == aArr[ nCnt ] )
@@ -147,7 +147,7 @@ BOOL IsFrameBehind( const SwTxtNode& rMyNd, USHORT nMySttPos,
const SwFrm* pFldFrm = (const SwFrm*)aArr[ nCnt ];
// unterschiedliche Frames, dann ueberpruefe deren Y-/X-Position
- BOOL bRefIsLower = FALSE;
+ sal_Bool bRefIsLower = sal_False;
if( ( FRM_COLUMN | FRM_CELL ) & pFldFrm->GetType() ||
( FRM_COLUMN | FRM_CELL ) & pRefFrm->GetType() )
{
@@ -212,8 +212,8 @@ BOOL IsFrameBehind( const SwTxtNode& rMyNd, USHORT nMySttPos,
SwGetRefField::SwGetRefField( SwGetRefFieldType* pFldType,
- const String& rSetRef, USHORT nSubTyp,
- USHORT nSeqenceNo, ULONG nFmt )
+ const String& rSetRef, sal_uInt16 nSubTyp,
+ sal_uInt16 nSeqenceNo, sal_uLong nFmt )
: SwField( pFldType, nFmt ),
sSetRefName( rSetRef ),
nSubType( nSubTyp ),
@@ -230,12 +230,12 @@ String SwGetRefField::GetDescription() const
return SW_RES(STR_REFERENCE);
}
-USHORT SwGetRefField::GetSubType() const
+sal_uInt16 SwGetRefField::GetSubType() const
{
return nSubType;
}
-void SwGetRefField::SetSubType( USHORT n )
+void SwGetRefField::SetSubType( sal_uInt16 n )
{
nSubType = n;
}
@@ -256,7 +256,7 @@ bool SwGetRefField::IsRefToNumItemCrossRefBookmark() const
const SwTxtNode* SwGetRefField::GetReferencedTxtNode() const
{
SwDoc* pDoc = dynamic_cast<SwGetRefFieldType*>(GetTyp())->GetDoc();
- USHORT nDummy = USHRT_MAX;
+ sal_uInt16 nDummy = USHRT_MAX;
return SwGetRefFieldType::FindAnchor( pDoc, sSetRefName, nSubType, nSeqNo, &nDummy );
}
// <--
@@ -275,11 +275,8 @@ String SwGetRefField::Expand() const
}
-String SwGetRefField::GetCntnt(BOOL bName) const
+String SwGetRefField::GetFieldName() const
{
- if( !bName )
- return Expand();
-
String aStr(GetTyp()->GetName());
aStr += ' ';
aStr += sSetRefName;
@@ -292,8 +289,8 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
sTxt.Erase();
SwDoc* pDoc = ((SwGetRefFieldType*)GetTyp())->GetDoc();
- USHORT nStt = USHRT_MAX;
- USHORT nEnd = USHRT_MAX;
+ sal_uInt16 nStt = USHRT_MAX;
+ sal_uInt16 nEnd = USHRT_MAX;
SwTxtNode* pTxtNd = SwGetRefFieldType::FindAnchor( pDoc, sSetRefName,
nSubType, nSeqNo, &nStt, &nEnd );
if ( !pTxtNd )
@@ -360,7 +357,7 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
case REF_ENDNOTE:
{
// die Nummer oder den NumString besorgen
- USHORT n, nFtnCnt = pDoc->GetFtnIdxs().Count();
+ sal_uInt16 n, nFtnCnt = pDoc->GetFtnIdxs().Count();
SwTxtFtn* pFtnIdx;
for( n = 0; n < nFtnCnt; ++n )
if( nSeqNo == (pFtnIdx = pDoc->GetFtnIdxs()[ n ])->GetSeqRefNo() )
@@ -396,14 +393,14 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
case REF_PAGE:
case REF_PAGE_PGDESC:
{
- const SwTxtFrm* pFrm = (SwTxtFrm*)pTxtNd->GetFrm(0,0,FALSE),
+ const SwTxtFrm* pFrm = (SwTxtFrm*)pTxtNd->GetFrm(0,0,sal_False),
*pSave = pFrm;
while( pFrm && !pFrm->IsInside( nStt ) )
pFrm = (SwTxtFrm*)pFrm->GetFollow();
if( pFrm || 0 != ( pFrm = pSave ))
{
- USHORT nPageNo = pFrm->GetVirtPageNum();
+ sal_uInt16 nPageNo = pFrm->GetVirtPageNum();
const SwPageFrm *pPage;
if( REF_PAGE_PGDESC == GetFormat() &&
0 != ( pPage = pFrm->FindPageFrm() ) &&
@@ -424,7 +421,7 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr )
SwChapterFieldType aFldTyp;
SwChapterField aFld( &aFldTyp, 0 );
aFld.SetLevel( MAXLEVEL - 1 );
- aFld.ChangeExpansion( pFrm, pTxtNd, TRUE );
+ aFld.ChangeExpansion( pFrm, pTxtNd, sal_True );
sTxt = aFld.GetNumber();
}
}
@@ -581,7 +578,7 @@ String SwGetRefField::GetPar2() const
return Expand();
}
-bool SwGetRefField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwGetRefField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -653,7 +650,7 @@ bool SwGetRefField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwGetRefField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwGetRefField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
String sTmp;
switch( nWhichId )
@@ -738,7 +735,7 @@ void SwGetRefField::ConvertProgrammaticToUIName()
if(!pDoc->GetFldType(RES_SETEXPFLD, rPar1, false))
{
sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromProgName( rPar1, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
- USHORT nResId = USHRT_MAX;
+ sal_uInt16 nResId = USHRT_MAX;
switch( nPoolId )
{
case RES_POOLCOLL_LABEL_ABB:
@@ -806,8 +803,8 @@ void SwGetRefFieldType::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
}
SwTxtNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const String& rRefMark,
- USHORT nSubType, USHORT nSeqNo,
- USHORT* pStt, USHORT* pEnd )
+ sal_uInt16 nSubType, sal_uInt16 nSeqNo,
+ sal_uInt16* pStt, sal_uInt16* pEnd )
{
OSL_ENSURE( pStt, "warum wird keine StartPos abgefragt?" );
@@ -860,7 +857,7 @@ SwTxtNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const String& rRefMark,
const ::sw::mark::IMark* pBkmk = ppMark->get();
const SwPosition* pPos = &pBkmk->GetMarkStart();
- pTxtNd = pDoc->GetNodes()[ pPos->nNode ]->GetTxtNode();
+ pTxtNd = pPos->nNode.GetNode().GetTxtNode();
*pStt = pPos->nContent.GetIndex();
if(pEnd)
{
@@ -891,7 +888,7 @@ SwTxtNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const String& rRefMark,
case REF_FOOTNOTE:
case REF_ENDNOTE:
{
- USHORT n, nFtnCnt = pDoc->GetFtnIdxs().Count();
+ sal_uInt16 n, nFtnCnt = pDoc->GetFtnIdxs().Count();
SwTxtFtn* pFtnIdx;
for( n = 0; n < nFtnCnt; ++n )
if( nSeqNo == (pFtnIdx = pDoc->GetFtnIdxs()[ n ])->GetSeqRefNo() )
@@ -921,24 +918,24 @@ struct _RefIdsMap
String aName;
SvUShortsSort aIds, aDstIds, aIdsMap;
SvUShorts aMap;
- BOOL bInit;
+ sal_Bool bInit;
_RefIdsMap( const String& rName )
: aName( rName ), aIds( 16, 16 ), aIdsMap( 16, 16 ), aMap( 16, 16 ),
- bInit( FALSE )
+ bInit( sal_False )
{}
void Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld,
- BOOL bField = TRUE );
+ sal_Bool bField = sal_True );
- BOOL IsInit() const { return bInit; }
+ sal_Bool IsInit() const { return bInit; }
};
SV_DECL_PTRARR_DEL( _RefIdsMaps, _RefIdsMap*, 5, 5 )
SV_IMPL_PTRARR( _RefIdsMaps, _RefIdsMap* )
void _RefIdsMap::Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld,
- BOOL bField )
+ sal_Bool bField )
{
if( !bInit )
@@ -970,19 +967,19 @@ void _RefIdsMap::Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld,
}
else
{
- USHORT n;
+ sal_uInt16 n;
for( n = rDestDoc.GetFtnIdxs().Count(); n; )
aIds.Insert( rDestDoc.GetFtnIdxs()[ --n ]->GetSeqRefNo() );
for( n = rDoc.GetFtnIdxs().Count(); n; )
aDstIds.Insert( rDoc.GetFtnIdxs()[ --n ]->GetSeqRefNo() );
}
- bInit = TRUE;
+ bInit = sal_True;
}
// dann teste mal, ob die Nummer schon vergeben ist
// oder ob eine neue bestimmt werden muss.
- USHORT nPos, nSeqNo = rFld.GetSeqNo();
+ sal_uInt16 nPos, nSeqNo = rFld.GetSeqNo();
if( aIds.Seek_Entry( nSeqNo ) && aDstIds.Seek_Entry( nSeqNo ))
{
// ist schon vergeben, also muss eine neue
@@ -991,7 +988,7 @@ void _RefIdsMap::Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld,
rFld.SetSeqNo( aMap[ nPos ] );
else
{
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < aIds.Count(); ++n )
if( n != aIds[ n ] )
@@ -1021,7 +1018,7 @@ void _RefIdsMap::Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld,
else
{
SwTxtFtn* pFtnIdx;
- for( USHORT i = 0, nCnt = rDoc.GetFtnIdxs().Count(); i < nCnt; ++i )
+ for( sal_uInt16 i = 0, nCnt = rDoc.GetFtnIdxs().Count(); i < nCnt; ++i )
if( nSeqNo == (pFtnIdx = rDoc.GetFtnIdxs()[ i ])->GetSeqRefNo() )
{
pFtnIdx->SetSeqNo( n );
@@ -1060,7 +1057,7 @@ void SwGetRefFieldType::MergeWithOtherDoc( SwDoc& rDestDoc )
case REF_SEQUENCEFLD:
{
_RefIdsMap* pMap = 0;
- for( USHORT n = aFldMap.Count(); n; )
+ for( sal_uInt16 n = aFldMap.Count(); n; )
if( aFldMap[ --n ]->aName == rRefFld.GetSetRefName() )
{
pMap = aFldMap[ n ];
@@ -1072,13 +1069,13 @@ void SwGetRefFieldType::MergeWithOtherDoc( SwDoc& rDestDoc )
aFldMap.C40_INSERT( _RefIdsMap, pMap, aFldMap.Count() );
}
- pMap->Check( *pDoc, rDestDoc, rRefFld, TRUE );
+ pMap->Check( *pDoc, rDestDoc, rRefFld, sal_True );
}
break;
case REF_FOOTNOTE:
case REF_ENDNOTE:
- aFntMap.Check( *pDoc, rDestDoc, rRefFld, FALSE );
+ aFntMap.Check( *pDoc, rDestDoc, rRefFld, sal_False );
break;
}
}
diff --git a/sw/source/core/fields/scrptfld.cxx b/sw/source/core/fields/scrptfld.cxx
index d801d6268847..3db79ca70afd 100644
--- a/sw/source/core/fields/scrptfld.cxx
+++ b/sw/source/core/fields/scrptfld.cxx
@@ -57,7 +57,7 @@ SwFieldType* SwScriptFieldType::Copy() const
SwScriptField::SwScriptField( SwScriptFieldType* pInitType,
const String& rType, const String& rCode,
- BOOL bURL )
+ sal_Bool bURL )
: SwField( pInitType ), sType( rType ), sCode( rCode ), bCodeURL( bURL )
{
}
@@ -106,7 +106,7 @@ String SwScriptField::GetPar2() const
return sCode;
}
-bool SwScriptField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwScriptField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -125,7 +125,7 @@ bool SwScriptField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwScriptField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwScriptField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
diff --git a/sw/source/core/fields/tblcalc.cxx b/sw/source/core/fields/tblcalc.cxx
index d0f338100af0..c3f081a3f2dd 100644
--- a/sw/source/core/fields/tblcalc.cxx
+++ b/sw/source/core/fields/tblcalc.cxx
@@ -40,6 +40,7 @@
#include <docfld.hxx> // fuer _SetGetExpFld
#include <unofldmid.h>
+
using namespace ::com::sun::star;
using ::rtl::OUString;
@@ -71,7 +72,7 @@ void SwTblField::CalcField( SwTblCalcPara& rCalcPara )
SwTblField::SwTblField( SwTblFieldType* pInitType, const String& rFormel,
- USHORT nType, ULONG nFmt )
+ sal_uInt16 nType, sal_uLong nFmt )
: SwValueField( pInitType, nFmt ), SwTableFormula( rFormel ),
sExpand( '0' ), nSubType(nType)
{
@@ -90,22 +91,12 @@ SwField* SwTblField::Copy() const
}
-String SwTblField::GetCntnt(BOOL bName) const
+String SwTblField::GetFieldName() const
{
- if( bName )
- {
- String aStr(GetTyp()->GetName());
- aStr += ' ';
-
- USHORT nOldSubType = nSubType;
- SwTblField* pThis = (SwTblField*)this;
- pThis->nSubType |= nsSwExtendedSubType::SUB_CMD;
- aStr += Expand();
- pThis->nSubType = nOldSubType;
-
- return aStr;
- }
- return Expand();
+ String aStr(GetTyp()->GetName());
+ aStr += ' ';
+ aStr += const_cast<SwTblField *>(this)->GetCommand();
+ return aStr;
}
// suche den TextNode, in dem das Feld steht
@@ -126,21 +117,28 @@ const SwNode* SwTblField::GetNodeOfFormula() const
return 0;
}
+String SwTblField::GetCommand()
+{
+ if (EXTRNL_NAME != GetNameType())
+ {
+ SwNode const*const pNd = GetNodeOfFormula();
+ SwTableNode const*const pTblNd = (pNd) ? pNd->FindTableNode() : 0;
+ if (pTblNd)
+ {
+ PtrToBoxNm( &pTblNd->GetTable() );
+ }
+ }
+ return (EXTRNL_NAME == GetNameType())
+ ? SwTableFormula::GetFormula()
+ : String();
+}
String SwTblField::Expand() const
{
String aStr;
if (nSubType & nsSwExtendedSubType::SUB_CMD)
{
- if( EXTRNL_NAME != GetNameType() )
- {
- const SwNode* pNd = GetNodeOfFormula();
- const SwTableNode* pTblNd = pNd ? pNd->FindTableNode() : 0;
- if( pTblNd )
- ((SwTblField*)this)->PtrToBoxNm( &pTblNd->GetTable() );
- }
- if( EXTRNL_NAME == GetNameType() )
- aStr = SwTableFormula::GetFormula();
+ aStr = const_cast<SwTblField *>(this)->GetCommand();
}
else
{
@@ -156,12 +154,12 @@ String SwTblField::Expand() const
return aStr;
}
-USHORT SwTblField::GetSubType() const
+sal_uInt16 SwTblField::GetSubType() const
{
return nSubType;
}
-void SwTblField::SetSubType(USHORT nType)
+void SwTblField::SetSubType(sal_uInt16 nType)
{
nSubType = nType;
}
@@ -189,14 +187,14 @@ void SwTblField::SetPar2(const String& rStr)
SetFormula( rStr );
}
-bool SwTblField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwTblField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
bool bRet = true;
switch ( nWhichId )
{
case FIELD_PROP_PAR2:
{
- USHORT nOldSubType = nSubType;
+ sal_uInt16 nOldSubType = nSubType;
SwTblField* pThis = (SwTblField*)this;
pThis->nSubType |= nsSwExtendedSubType::SUB_CMD;
rAny <<= rtl::OUString( Expand() );
@@ -205,7 +203,7 @@ bool SwTblField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
break;
case FIELD_PROP_BOOL1:
{
- BOOL bFormula = 0 != (nsSwExtendedSubType::SUB_CMD & nSubType);
+ sal_Bool bFormula = 0 != (nsSwExtendedSubType::SUB_CMD & nSubType);
rAny.setValue(&bFormula, ::getBooleanCppuType());
}
break;
@@ -221,7 +219,7 @@ bool SwTblField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return bRet;
}
-bool SwTblField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwTblField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
bool bRet = true;
String sTmp;
diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx
index 1c01848e4c55..8909f588f842 100644
--- a/sw/source/core/fields/usrfld.cxx
+++ b/sw/source/core/fields/usrfld.cxx
@@ -29,22 +29,24 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
-#include <svx/svdmodel.hxx>
+#include <svx/svdmodel.hxx>
#include <calbck.hxx>
#include <calc.hxx>
#include <usrfld.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <editsh.hxx>
#include <dpage.hxx>
#include <unofldmid.h>
+
using namespace ::com::sun::star;
using ::rtl::OUString;
+
/*--------------------------------------------------------------------
Beschreibung: Benutzerfelder
--------------------------------------------------------------------*/
@@ -71,17 +73,14 @@ SwField* SwUserField::Copy() const
return pTmp;
}
-String SwUserField::GetCntnt(sal_Bool bName) const
+String SwUserField::GetFieldName() const
{
- if ( bName )
- { String aStr(SwFieldType::GetTypeStr(TYP_USERFLD));
- aStr += ' ';
- aStr += GetTyp()->GetName();
- aStr.AppendAscii(" = ");
- aStr += ((SwUserFieldType*)GetTyp())->GetContent();
- return aStr;
- }
- return Expand();
+ String aStr(SwFieldType::GetTypeStr(TYP_USERFLD));
+ aStr += ' ';
+ aStr += GetTyp()->GetName();
+ aStr.AppendAscii(" = ");
+ aStr += static_cast<SwUserFieldType*>(GetTyp())->GetContent();
+ return aStr;
}
double SwUserField::GetValue() const
@@ -128,19 +127,19 @@ void SwUserField::SetSubType(sal_uInt16 nSub)
nSubType = nSub & 0xff00;
}
-bool SwUserField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwUserField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
case FIELD_PROP_BOOL2:
{
- BOOL bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
+ sal_Bool bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
rAny.setValue(&bTmp, ::getBooleanCppuType());
}
break;
case FIELD_PROP_BOOL1:
{
- BOOL bTmp = 0 == (nSubType & nsSwExtendedSubType::SUB_INVISIBLE);
+ sal_Bool bTmp = 0 == (nSubType & nsSwExtendedSubType::SUB_INVISIBLE);
rAny.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -153,7 +152,7 @@ bool SwUserField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwUserField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwUserField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -299,11 +298,13 @@ void SwUserFieldType::SetContent( const String& rStr, sal_uInt32 nFmt )
sal_Bool bModified = GetDoc()->IsModified();
GetDoc()->SetModified();
if( !bModified ) // Bug 57028
- GetDoc()->SetUndoNoResetModified();
+ {
+ GetDoc()->GetIDocumentUndoRedo().SetUndoNoResetModified();
+ }
}
}
-bool SwUserFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwUserFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -315,7 +316,7 @@ bool SwUserFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
break;
case FIELD_PROP_BOOL1:
{
- BOOL bExpression = 0 != (nsSwGetSetExpType::GSE_EXPR&nType);
+ sal_Bool bExpression = 0 != (nsSwGetSetExpType::GSE_EXPR&nType);
rAny.setValue(&bExpression, ::getBooleanCppuType());
}
break;
@@ -325,7 +326,7 @@ bool SwUserFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwUserFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwUserFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 60525d45094b..f2a53816c0fe 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -65,6 +65,7 @@
#include <txtflcnt.hxx>
#include <fesh.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <rootfrm.hxx>
#include <ndtxt.hxx>
#include <pam.hxx>
@@ -94,11 +95,11 @@ using namespace ::com::sun::star;
|*
|*************************************************************************/
-BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
+sal_Bool SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
{
OSL_ENSURE( pClpDoc, "kein Clipboard-Dokument" );
- pClpDoc->DoUndo( FALSE ); // immer auf FALSE !!
+ pClpDoc->GetIDocumentUndoRedo().DoUndo(false); // always false!
// steht noch Inhalt im ClpDocument, dann muss dieser geloescht werden
SwNodeIndex aSttIdx( pClpDoc->GetNodes().GetEndOfExtras(), 2 );
@@ -114,7 +115,7 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
}
// stehen noch FlyFrames rum, loesche auch diese
- for( USHORT n = 0; n < pClpDoc->GetSpzFrmFmts()->Count(); ++n )
+ for( sal_uInt16 n = 0; n < pClpDoc->GetSpzFrmFmts()->Count(); ++n )
{
SwFlyFrmFmt* pFly = (SwFlyFrmFmt*)(*pClpDoc->GetSpzFrmFmts())[n];
pClpDoc->DelLayoutFmt( pFly );
@@ -127,12 +128,12 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
if( pNewClpTxt )
{
pTxtNd->InsertText( *pNewClpTxt, SwIndex( pTxtNd ) );
- return TRUE; // das wars.
+ return sal_True; // das wars.
}
pClpDoc->LockExpFlds();
pClpDoc->SetRedlineMode_intern( nsRedlineMode_t::REDLINE_DELETE_REDLINES );
- BOOL bRet;
+ sal_Bool bRet;
// soll ein FlyFrame kopiert werden ?
if( IsFrmSelected() )
@@ -161,7 +162,7 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
SwSpzFrmFmts& rSpzFrmFmts = *(SwSpzFrmFmts*)pClpDoc->GetSpzFrmFmts();
if( rSpzFrmFmts[ 0 ] != pFlyFmt )
{
- USHORT nPos = rSpzFrmFmts.GetPos( pFlyFmt );
+ sal_uInt16 nPos = rSpzFrmFmts.GetPos( pFlyFmt );
OSL_ENSURE( nPos != USHRT_MAX, "Fly steht nicht im Spz-Array" );
rSpzFrmFmts.Remove( nPos );
@@ -185,13 +186,13 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
pTxtNd->EraseText( rIdx, 1 );
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
else if ( IsObjSelected() )
{
SwPosition aPos( aSttIdx, SwIndex( pTxtNd, 0 ));
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
@@ -205,7 +206,7 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
aSet.Put( aAnchor );
SdrObject *const pNew =
- pClpDoc->CloneSdrObj( *pObj, FALSE, TRUE );
+ pClpDoc->CloneSdrObj( *pObj, sal_False, sal_True );
SwPaM aTemp(aPos);
pClpDoc->Insert(aTemp, *pNew, &aSet, NULL);
@@ -226,7 +227,7 @@ BOOL SwFEShell::Copy( SwDoc* pClpDoc, const String* pNewClpTxt )
pClpDoc->CopyLayoutFmt( *pFmt, aAnchor, true, true );
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
else
bRet = _CopySelToDoc( pClpDoc, 0 ); // kopiere die Selectionen
@@ -255,17 +256,17 @@ const Point &lcl_FindBasePos( const SwFrm *pFrm, const Point &rPt )
return pFrm->Frm().Pos();
}
-BOOL lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm* pFly,
+sal_Bool lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm* pFly,
const Point& rInsPt, SwFEShell& rDestShell, SwFmtAnchor& rAnchor,
- Point& rNewPos, BOOL bCheckFlyRecur )
+ Point& rNewPos, sal_Bool bCheckFlyRecur )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
rAnchor.SetAnchor( &rPos );
- SwCntntFrm* pTmpFrm = rNd.GetCntntNode()->GetFrm( &rInsPt, 0, FALSE );
+ SwCntntFrm* pTmpFrm = rNd.GetCntntNode()->GetFrm( &rInsPt, 0, sal_False );
SwFlyFrm *pTmpFly = pTmpFrm->FindFlyFrm();
if( pTmpFly && bCheckFlyRecur && pFly->IsUpperOf( *pTmpFly ) )
{
- bRet = FALSE;
+ bRet = sal_False;
}
else if ( FLY_AT_FLY == rAnchor.GetAnchorId() )
{
@@ -289,15 +290,15 @@ BOOL lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm* pFly,
return bRet;
}
-BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
- const Point& rInsPt, BOOL bIsMove, BOOL bSelectInsert )
+sal_Bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
+ const Point& rInsPt, sal_Bool bIsMove, sal_Bool bSelectInsert )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
//Die Liste muss kopiert werden, weil unten die neuen Objekte
//selektiert werden.
const SdrMarkList aMrkList( Imp()->GetDrawView()->GetMarkedObjectList() );
- ULONG nMarkCount = aMrkList.GetMarkCount();
+ sal_uLong nMarkCount = aMrkList.GetMarkCount();
if( !pDestShell->Imp()->GetDrawView() )
// sollte mal eine erzeugt werden
pDestShell->MakeDrawView();
@@ -311,7 +312,7 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
SwDoc* pDestDoc = pDestShell->GetDoc();
Size aSiz( rInsPt.X() - rSttPt.X(), rInsPt.Y() - rSttPt.Y() );
- for( USHORT i = 0; i < nMarkCount; ++i )
+ for( sal_uInt16 i = 0; i < nMarkCount; ++i )
{
SdrObject *pObj = aMrkList.GetMark( i )->GetMarkedSdrObj();
@@ -319,7 +320,7 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
SwFrmFmt *pFmt = pContact->GetFmt();
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
- BOOL bInsWithFmt = TRUE;
+ sal_Bool bInsWithFmt = sal_True;
if( pDestDrwView->IsGroupEntered() )
{
@@ -330,10 +331,10 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
{
SdrObject* pNew = pDestDoc->CloneSdrObj( *pObj, bIsMove &&
- GetDoc() == pDestDoc, FALSE );
+ GetDoc() == pDestDoc, sal_False );
pNew->NbcMove( aSiz );
pDestDrwView->InsertObjectAtView( pNew, *pDestPgView );
- bInsWithFmt = FALSE;
+ bInsWithFmt = sal_False;
}
}
@@ -358,21 +359,21 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
GetLayout()->GetCrsrOfst( &aPos, aPt, &aState );
const SwNode *pNd;
if( (pNd = &aPos.nNode.GetNode())->IsNoTxtNode() )
- bRet = FALSE;
+ bRet = sal_False;
else
bRet = ::lcl_SetAnchor( aPos, *pNd, 0, rInsPt,
- *pDestShell, aAnchor, aNewAnch, FALSE );
+ *pDestShell, aAnchor, aNewAnch, sal_False );
}
else
{
SwPaM *pCrsr = pDestShell->GetCrsr();
if( pCrsr->GetNode()->IsNoTxtNode() )
- bRet = FALSE;
+ bRet = sal_False;
else
bRet = ::lcl_SetAnchor( *pCrsr->GetPoint(),
*pCrsr->GetNode(), 0, rInsPt,
*pDestShell, aAnchor,
- aNewAnch, FALSE );
+ aNewAnch, sal_False );
}
}
else if ( FLY_AT_PAGE == aAnchor.GetAnchorId() )
@@ -392,7 +393,7 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
SfxItemSet aSet( pDestDoc->GetAttrPool(),aFrmFmtSetRange);
aSet.Put( aAnchor );
SdrObject* pNew = pDestDoc->CloneSdrObj( *pObj, bIsMove &&
- GetDoc() == pDestDoc, TRUE );
+ GetDoc() == pDestDoc, sal_True );
pFmt = pDestDoc->Insert( *pDestShell->GetCrsr(),
*pNew, &aSet, NULL );
}
@@ -434,8 +435,8 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
const SdrMarkList aList( pSrcDrwView->GetMarkedObjectList() );
pSrcDrwView->UnmarkAll();
- ULONG nMrkCnt = aMrkList.GetMarkCount();
- USHORT i;
+ sal_uLong nMrkCnt = aMrkList.GetMarkCount();
+ sal_uInt16 i;
for ( i = 0; i < nMrkCnt; ++i )
{
SdrObject *pObj = aMrkList.GetMark( i )->GetMarkedSdrObj();
@@ -456,10 +457,10 @@ BOOL SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
return bRet;
}
-BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
- const Point& rInsPt, BOOL bIsMove, BOOL bSelectInsert )
+sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
+ const Point& rInsPt, sal_Bool bIsMove, sal_Bool bSelectInsert )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
OSL_ENSURE( pDestShell, "Copy ohne DestShell." );
OSL_ENSURE( this == pDestShell || !pDestShell->IsObjSelected(),
@@ -471,10 +472,10 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
pDestShell->GetDoc()->LockExpFlds();
// Referenzen sollen verschoben werden.
- BOOL bCopyIsMove = pDoc->IsCopyIsMove();
+ sal_Bool bCopyIsMove = pDoc->IsCopyIsMove();
if( bIsMove )
// am Doc ein Flag setzen, damit in den TextNodes
- pDoc->SetCopyIsMove( TRUE );
+ pDoc->SetCopyIsMove( sal_True );
RedlineMode_t eOldRedlMode = pDestShell->GetDoc()->GetRedlineMode();
pDestShell->GetDoc()->SetRedlineMode_intern( (RedlineMode_t)(eOldRedlMode | nsRedlineMode_t::REDLINE_DELETE_REDLINES));
@@ -490,7 +491,7 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
SwFlyFrm* pFly = FindFlyFrm();
SwFrmFmt* pFlyFmt = pFly->GetFmt();
SwFmtAnchor aAnchor( pFlyFmt->GetAnchor() );
- bRet = TRUE;
+ bRet = sal_True;
Point aNewAnch;
if ((FLY_AT_PARA == aAnchor.GetAnchorId()) ||
@@ -509,25 +510,25 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
GetLayout()->GetCrsrOfst( &aPos, aPt, &aState );
const SwNode *pNd;
if( (pNd = &aPos.nNode.GetNode())->IsNoTxtNode() )
- bRet = FALSE;
+ bRet = sal_False;
else
{ //Nicht in sich selbst kopieren
const SwNodeIndex *pTmp = pFlyFmt->GetCntnt().GetCntntIdx();
if ( aPos.nNode > *pTmp && aPos.nNode <
pTmp->GetNode().EndOfSectionIndex() )
{
- bRet = FALSE;
+ bRet = sal_False;
}
else
bRet = ::lcl_SetAnchor( aPos, *pNd, pFly, rInsPt,
- *pDestShell, aAnchor, aNewAnch, TRUE );
+ *pDestShell, aAnchor, aNewAnch, sal_True );
}
}
else
{
const SwPaM *pCrsr = pDestShell->GetCrsr();
if( pCrsr->GetNode()->IsNoTxtNode() )
- bRet = FALSE;
+ bRet = sal_False;
else
bRet = ::lcl_SetAnchor( *pCrsr->GetPoint(), *pCrsr->GetNode(),
pFly, rInsPt, *pDestShell, aAnchor,
@@ -569,12 +570,12 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
// kopiert wird
if( bSelectInsert )
{
- SwFlyFrm* pFlyFrm = ((SwFlyFrmFmt*)pFlyFmt)->GetFrm( &aPt, FALSE );
+ SwFlyFrm* pFlyFrm = ((SwFlyFrmFmt*)pFlyFmt)->GetFrm( &aPt, sal_False );
if( pFlyFrm )
{
//JP 12.05.98: sollte das nicht im SelectFlyFrm stehen???
pDestShell->Imp()->GetDrawView()->UnmarkAll();
- pDestShell->SelectFlyFrm( *pFlyFrm, TRUE );
+ pDestShell->SelectFlyFrm( *pFlyFrm, sal_True );
}
}
@@ -606,12 +607,12 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
Point aPt( rInsPt );
GetLayout()->GetCrsrOfst( pDstPos, aPt );
if( !pDstPos->nNode.GetNode().IsNoTxtNode() )
- bRet = TRUE;
+ bRet = sal_True;
}
else if( !pDestShell->GetCrsr()->GetNode()->IsNoTxtNode() )
{
pDstPos = new SwPosition( *pDestShell->GetCrsr()->GetPoint() );
- bRet = TRUE;
+ bRet = sal_True;
}
if( bRet )
@@ -642,7 +643,7 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
}
else
{
- bRet = TRUE;
+ bRet = sal_True;
if( this == pDestShell )
{
// gleiche Shell? Dann erfrage die Position an der
@@ -653,7 +654,7 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
bRet = !aPos.nNode.GetNode().IsNoTxtNode();
}
else if( pDestShell->GetCrsr()->GetNode()->IsNoTxtNode() )
- bRet = FALSE;
+ bRet = sal_False;
if( bRet )
bRet = 0 != SwEditShell::Copy( pDestShell );
@@ -667,7 +668,7 @@ BOOL SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
{
// alte Actions beenden; die Tabellen-Frames werden angelegt und
// eine SSelection kann erzeugt werden
- USHORT nActCnt;
+ sal_uInt16 nActCnt;
for( nActCnt = 0; pDestShell->ActionPend(); ++nActCnt )
pDestShell->EndAllAction();
@@ -694,11 +695,11 @@ namespace {
typedef std::pair< PaMPtr, PositionPtr > Insertion;
}
-BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
+sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
{
SET_CURR_SHELL( this );
OSL_ENSURE( pClpDoc, "kein Clipboard-Dokument" );
- const USHORT nStartPageNumber = GetPhyPageNum();
+ const sal_uInt16 nStartPageNumber = GetPhyPageNum();
// dann bis zum Ende vom Nodes Array
SwNodeIndex aIdx( pClpDoc->GetNodes().GetEndOfExtras(), 2 );
SwPaM aCpyPam( aIdx ); //DocStart
@@ -722,9 +723,9 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
aCpyPam.SetMark();
aCpyPam.Move( fnMoveForward, fnGoDoc );
- BOOL bRet = TRUE, bDelTbl = TRUE;
+ sal_Bool bRet = sal_True, bDelTbl = sal_True;
StartAllAction();
- GetDoc()->StartUndo( UNDO_INSGLOSSARY, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_INSGLOSSARY, NULL );
GetDoc()->LockExpFlds();
// When the clipboard content has been created by a rectangular selection
@@ -759,7 +760,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
SwPosition aStartPos( *pStartCursor->GetPoint() );
SwPosition aInsertPos( aStartPos ); // first insertion position
bool bCompletePara = false;
- USHORT nMove = 0;
+ sal_uInt16 nMove = 0;
while( nCount )
{
--nCount;
@@ -777,7 +778,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
SwCursor aCrsr( aStartPos, 0, false);
// Check if we find another insert position by moving
// down the last given position
- if( aCrsr.UpDown( FALSE, ++nMove, 0, 0 ) )
+ if( aCrsr.UpDown( sal_False, ++nMove, 0, 0 ) )
aInsertPos = *aCrsr.GetPoint();
else // if there is no paragraph we have to create it
bCompletePara = nCount > 0;
@@ -845,7 +846,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
{
SwPosition aDestPos( *PCURCRSR->GetPoint() );
- BOOL bParkTblCrsr = FALSE;
+ sal_Bool bParkTblCrsr = sal_False;
const SwStartNode* pSttNd = PCURCRSR->GetNode()->FindTableBoxStartNode();
// TABLE IN TABLE: Tabelle in Tabelle kopieren
@@ -855,7 +856,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
{
GetTblSel( *this, aBoxes );
ParkTblCrsr();
- bParkTblCrsr = TRUE;
+ bParkTblCrsr = sal_True;
}
else if( !PCURCRSR->HasMark() && PCURCRSR->GetNext() == PCURCRSR &&
( !pSrcNd->GetTable().IsTblComplex() ||
@@ -876,13 +877,12 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
SwCntntNode* pCNd = GetDoc()->GetNodes().GoNext( &aNdIdx );
SwPosition aPos( aNdIdx, SwIndex( pCNd, 0 ));
// #i59539: Don't remove all redline
- ::PaMCorrAbs( SwNodeIndex( *pDestNd ),
- SwNodeIndex( *pDestNd->EndOfSectionNode() ),
- aPos );
+ SwPaM const tmpPaM(*pDestNd, *pDestNd->EndOfSectionNode());
+ ::PaMCorrAbs(tmpPaM, aPos);
}
bRet = GetDoc()->InsCopyOfTbl( aDestPos, aBoxes, &pSrcNd->GetTable(),
- FALSE, FALSE );
+ sal_False, sal_False );
if( bParkTblCrsr )
GetCrsr();
@@ -893,7 +893,11 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
SwCntntNode* pCNd = GetDoc()->GetNodes().GoNext( &aNdIdx );
SwPosition aPos( aNdIdx, SwIndex( pCNd, 0 ));
// #i59539: Don't remove all redline
- ::PaMCorrAbs( PCURCRSR->GetPoint()->nNode, aPos );
+ SwNode & rNode(PCURCRSR->GetPoint()->nNode.GetNode());
+ SwCntntNode *const pCntntNode( rNode.GetCntntNode() );
+ SwPaM const tmpPam(rNode, 0,
+ rNode, (pCntntNode) ? pCntntNode->Len() : 0);
+ ::PaMCorrAbs(tmpPam, aPos);
}
break; // aus der "while"-Schleife heraus
@@ -905,9 +909,9 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
if( !Imp()->GetDrawView() )
MakeDrawView();
- for ( USHORT i = 0; i < pClpDoc->GetSpzFrmFmts()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pClpDoc->GetSpzFrmFmts()->Count(); ++i )
{
- BOOL bInsWithFmt = TRUE;
+ sal_Bool bInsWithFmt = sal_True;
const SwFrmFmt& rCpyFmt = *(*pClpDoc->GetSpzFrmFmts())[i];
if( Imp()->GetDrawView()->IsGroupEntered() &&
@@ -918,7 +922,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
if( pSdrObj )
{
SdrObject* pNew = GetDoc()->CloneSdrObj( *pSdrObj,
- FALSE, FALSE );
+ sal_False, sal_False );
// Insert object sets any anchor position to 0.
// Therefore we calculate the absolute position here
@@ -953,7 +957,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
pNew->NbcSetAnchorPos( aGrpAnchor );
pNew->SetSnapRect( aSnapRect );
- bInsWithFmt = FALSE;
+ bInsWithFmt = sal_False;
}
}
@@ -981,7 +985,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
{
Point aPt;
lcl_SetAnchor( *PCURCRSR->GetPoint(), *PCURCRSR->GetNode(),
- 0, aPt, *this, aAnchor, aPt, FALSE );
+ 0, aPt, *this, aAnchor, aPt, sal_False );
}
SwFrmFmt * pNew = GetDoc()->CopyLayoutFmt( rCpyFmt, aAnchor, true, true );
@@ -992,9 +996,9 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
{
const Point aPt( GetCrsrDocPos() );
SwFlyFrm* pFlyFrm = ((SwFlyFrmFmt*)pNew)->
- GetFrm( &aPt, FALSE );
+ GetFrm( &aPt, sal_False );
if( pFlyFrm )
- SelectFlyFrm( *pFlyFrm, TRUE );
+ SelectFlyFrm( *pFlyFrm, sal_True );
// immer nur den ersten Fly-Frame nehmen; die anderen
// wurden ueber Fly in Fly ins ClipBoard kopiert !
break;
@@ -1030,7 +1034,7 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
if( bDelTbl && IsTableMode() )
{
SwEditShell::Delete();
- bDelTbl = FALSE;
+ bDelTbl = sal_False;
}
SwPosition& rInsPos = *PCURCRSR->GetPoint();
@@ -1078,9 +1082,9 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
if( !Imp()->GetDrawView() )
MakeDrawView();
- for ( USHORT i = 0; i < pClpDoc->GetSpzFrmFmts()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pClpDoc->GetSpzFrmFmts()->Count(); ++i )
{
- BOOL bInsWithFmt = TRUE;
+ sal_Bool bInsWithFmt = sal_True;
const SwFrmFmt& rCpyFmt = *(*pClpDoc->GetSpzFrmFmts())[i];
if( bInsWithFmt )
{
@@ -1100,14 +1104,14 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
FOREACHPAM_END()
}
- GetDoc()->EndUndo( UNDO_INSGLOSSARY, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_INSGLOSSARY, NULL );
// wurden neue Tabellenformeln eingefuegt ?
if( pTblFldTyp->GetDepends() )
{
// alte Actions beenden; die Tabellen-Frames werden angelegt und
// eine Selection kann erzeugt werden
- USHORT nActCnt;
+ sal_uInt16 nActCnt;
for( nActCnt = 0; ActionPend(); ++nActCnt )
EndAllAction();
@@ -1121,25 +1125,25 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
return bRet;
}
-BOOL SwFEShell::PastePages( SwFEShell& rToFill, USHORT nStartPage, USHORT nEndPage)
+sal_Bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage)
{
Push();
if(!GotoPage(nStartPage))
{
Pop(sal_False);
- return FALSE;
+ return sal_False;
}
MovePage( fnPageCurr, fnPageStart );
SwPaM aCpyPam( *GetCrsr()->GetPoint() );
String sStartingPageDesc = GetPageDesc( GetCurPageDesc()).GetName();
- SwPageDesc* pDesc = rToFill.FindPageDescByName( sStartingPageDesc, TRUE );
+ SwPageDesc* pDesc = rToFill.FindPageDescByName( sStartingPageDesc, sal_True );
if( pDesc )
rToFill.ChgCurPageDesc( *pDesc );
if(!GotoPage(nEndPage))
{
Pop(sal_False);
- return FALSE;
+ return sal_False;
}
//if the page starts with a table a paragraph has to be inserted before
SwNode* pTableNode = aCpyPam.GetNode()->FindTableNode();
@@ -1186,7 +1190,7 @@ BOOL SwFEShell::PastePages( SwFEShell& rToFill, USHORT nStartPage, USHORT nEndPa
if( !rToFill.Imp()->GetDrawView() )
rToFill.MakeDrawView();
- for ( USHORT i = 0; i < GetDoc()->GetSpzFrmFmts()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < GetDoc()->GetSpzFrmFmts()->Count(); ++i )
{
const SwFrmFmt& rCpyFmt = *(*GetDoc()->GetSpzFrmFmts())[i];
SwFmtAnchor aAnchor( rCpyFmt.GetAnchor() );
@@ -1205,14 +1209,14 @@ BOOL SwFEShell::PastePages( SwFEShell& rToFill, USHORT nStartPage, USHORT nEndPa
Pop(sal_False);
EndAllAction();
- return TRUE;
+ return sal_True;
}
-BOOL SwFEShell::GetDrawObjGraphic( ULONG nFmt, Graphic& rGrf ) const
+sal_Bool SwFEShell::GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const
{
OSL_ENSURE( Imp()->HasDrawView(), "GetDrawObjGraphic without DrawView?" );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- BOOL bConvert = TRUE;
+ sal_Bool bConvert = sal_True;
if( rMrkList.GetMarkCount() )
{
if( rMrkList.GetMarkCount() == 1 &&
@@ -1230,7 +1234,7 @@ BOOL SwFEShell::GetDrawObjGraphic( ULONG nFmt, Graphic& rGrf ) const
if( GRAPHIC_BITMAP != aGrf.GetType() )
{
rGrf = aGrf;
- bConvert = FALSE;
+ bConvert = sal_False;
}
else if( GetWin() )
{
@@ -1239,7 +1243,7 @@ BOOL SwFEShell::GetDrawObjGraphic( ULONG nFmt, Graphic& rGrf ) const
GetGrfSize( aSz );
VirtualDevice aVirtDev;
- aVirtDev.EnableOutput( FALSE );
+ aVirtDev.EnableOutput( sal_False );
MapMode aTmp( GetWin()->GetMapMode() );
aTmp.SetOrigin( aPt );
@@ -1257,7 +1261,7 @@ BOOL SwFEShell::GetDrawObjGraphic( ULONG nFmt, Graphic& rGrf ) const
else if( GRAPHIC_BITMAP == aGrf.GetType() )
{
rGrf = aGrf;
- bConvert = FALSE;
+ bConvert = sal_False;
}
else
{
@@ -1277,7 +1281,7 @@ BOOL SwFEShell::GetDrawObjGraphic( ULONG nFmt, Graphic& rGrf ) const
else
{
rGrf = aGrf;
- bConvert = FALSE;
+ bConvert = sal_False;
}
}
}
@@ -1329,7 +1333,7 @@ void lcl_ConvertSdrOle2ObjsToSdrGrafObjs( SdrModel* _pModel )
}
}
-void SwFEShell::Paste( SvStream& rStrm, USHORT nAction, const Point* pPt )
+void SwFEShell::Paste( SvStream& rStrm, sal_uInt16 nAction, const Point* pPt )
{
SET_CURR_SHELL( this );
StartAllAction();
@@ -1444,7 +1448,7 @@ void SwFEShell::Paste( SvStream& rStrm, USHORT nAction, const Point* pPt )
pFmt = GetDoc()->Insert( *GetCrsr(), *pNewObj, &aFrmSet, NULL );
}
else
- pView->ReplaceObjectAtView( pOldObj, *Imp()->GetPageView(), pNewObj, TRUE );
+ pView->ReplaceObjectAtView( pOldObj, *Imp()->GetPageView(), pNewObj, sal_True );
}
break;
@@ -1452,7 +1456,7 @@ void SwFEShell::Paste( SvStream& rStrm, USHORT nAction, const Point* pPt )
{
SfxItemSet aSet( GetAttrPool() );
aSet.Put(pClpObj->GetMergedItemSet());
- pView->SetAttributes( aSet, FALSE );
+ pView->SetAttributes( aSet, sal_False );
}
break;
@@ -1466,7 +1470,7 @@ void SwFEShell::Paste( SvStream& rStrm, USHORT nAction, const Point* pPt )
if( SW_PASTESDR_INSERT == nAction )
{
- GetDoc()->SetNoDrawUndoObj( TRUE );
+ ::sw::DrawUndoGuard drawUndoGuard(GetDoc()->GetIDocumentUndoRedo());
sal_Bool bDesignMode = pView->IsDesignMode();
if( !bDesignMode )
@@ -1477,11 +1481,11 @@ void SwFEShell::Paste( SvStream& rStrm, USHORT nAction, const Point* pPt )
lcl_ConvertSdrOle2ObjsToSdrGrafObjs( pModel );
pView->Paste( *pModel, aPos );
- ULONG nCnt = pView->GetMarkedObjectList().GetMarkCount();
+ sal_uLong nCnt = pView->GetMarkedObjectList().GetMarkCount();
if( nCnt )
{
const Point aNull( 0, 0 );
- for( ULONG i=0; i < nCnt; ++i )
+ for( sal_uLong i=0; i < nCnt; ++i )
{
SdrObject *pObj = pView->GetMarkedObjectList().GetMark(i)->GetMarkedSdrObj();
pObj->ImpSetAnchorPos( aNull );
@@ -1505,20 +1509,19 @@ void SwFEShell::Paste( SvStream& rStrm, USHORT nAction, const Point* pPt )
if( !bDesignMode )
pView->SetDesignMode( sal_False );
}
- GetDoc()->SetNoDrawUndoObj( FALSE );
}
EndUndo();
EndAllAction();
delete pModel;
}
-BOOL SwFEShell::Paste( const Graphic &rGrf )
+sal_Bool SwFEShell::Paste( const Graphic &rGrf )
{
SET_CURR_SHELL( this );
SdrObject* pObj;
SdrView *pView = Imp()->GetDrawView();
- BOOL bRet = 1 == pView->GetMarkedObjectList().GetMarkCount() &&
+ sal_Bool bRet = 1 == pView->GetMarkedObjectList().GetMarkCount() &&
(pObj = pView->GetMarkedObjectList().GetMark( 0 )->GetMarkedSdrObj())->IsClosedObj() &&
!pObj->ISA( SdrOle2Obj );
@@ -1528,7 +1531,7 @@ BOOL SwFEShell::Paste( const Graphic &rGrf )
SfxItemSet aSet( GetAttrPool(), XATTR_FILLSTYLE, XATTR_FILLBITMAP );
aSet.Put( XFillStyleItem( XFILL_BITMAP ));
aSet.Put( XFillBitmapItem( aEmptyStr, aXOBitmap ));
- pView->SetAttributes( aSet, FALSE );
+ pView->SetAttributes( aSet, sal_False );
}
return bRet;
}
diff --git a/sw/source/core/frmedt/fedesc.cxx b/sw/source/core/frmedt/fedesc.cxx
index d1ebb84cbf28..11ea45c3cdea 100644
--- a/sw/source/core/frmedt/fedesc.cxx
+++ b/sw/source/core/frmedt/fedesc.cxx
@@ -29,11 +29,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <tools/ref.hxx>
#include <hintids.hxx>
-#include <tools/ref.hxx>
#include <fesh.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pagefrm.hxx>
#include <rootfrm.hxx>
#include <cntfrm.hxx>
@@ -43,13 +44,14 @@
#include <tabfrm.hxx>
#include <edimp.hxx>
#include <SwStyleNameMapper.hxx>
+
/*************************************************************************
|*
|* SwFEShell::GetPageDescCnt()
|*
|*************************************************************************/
-USHORT SwFEShell::GetPageDescCnt() const
+sal_uInt16 SwFEShell::GetPageDescCnt() const
{
return GetDoc()->GetPageDescCnt();
}
@@ -65,10 +67,10 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc )
#if OSL_DEBUG_LEVEL > 1
//Die SS veraendert keinen PageDesc, sondern setzt nur das Attribut.
//Der Pagedesc muss im Dokument vorhanden sein!
- BOOL bFound = FALSE;
- for ( USHORT nTst = 0; nTst < GetPageDescCnt(); ++nTst )
+ sal_Bool bFound = sal_False;
+ for ( sal_uInt16 nTst = 0; nTst < GetPageDescCnt(); ++nTst )
if ( &rDesc == &GetPageDesc( nTst ) )
- bFound = TRUE;
+ bFound = sal_True;
OSL_ENSURE( bFound, "ChgCurPageDesc mit ungueltigem Descriptor." );
#endif
@@ -76,7 +78,7 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc )
SwPageFrm *pPage = GetCurrFrm()->FindPageFrm();
const SwFrm *pFlow = 0;
- USHORT nPageNmOffset = 0;
+ sal_uInt16 nPageNmOffset = 0;
OSL_ENSURE( !GetCrsr()->HasMark(), "ChgCurPageDesc nur ohne Selektion!");
@@ -130,17 +132,17 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc )
|*
|*************************************************************************/
-void SwFEShell::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
+void SwFEShell::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged )
{
StartAllAction();
SET_CURR_SHELL( this );
//Fix i64842: because Undo has a very special way to handle header/footer content
// we have to copy the page descriptor before calling ChgPageDesc.
- const sal_Bool bDoesUndo( GetDoc()->DoesUndo() );
SwPageDesc aDesc( rChged );
- GetDoc()->DoUndo( sal_False );
- GetDoc()->CopyPageDesc(rChged, aDesc);
- GetDoc()->DoUndo( bDoesUndo );
+ {
+ ::sw::UndoGuard const undoGuard(GetDoc()->GetIDocumentUndoRedo());
+ GetDoc()->CopyPageDesc(rChged, aDesc);
+ }
GetDoc()->ChgPageDesc( i, aDesc );
EndAllActionAndCall();
}
@@ -151,19 +153,19 @@ void SwFEShell::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
|*
|*************************************************************************/
-const SwPageDesc& SwFEShell::GetPageDesc( USHORT i ) const
+const SwPageDesc& SwFEShell::GetPageDesc( sal_uInt16 i ) const
{
return const_cast<const SwDoc *>(GetDoc())->GetPageDesc( i );
}
SwPageDesc* SwFEShell::FindPageDescByName( const String& rName,
- BOOL bGetFromPool,
- USHORT* pPos )
+ sal_Bool bGetFromPool,
+ sal_uInt16* pPos )
{
SwPageDesc* pDesc = GetDoc()->FindPageDescByName( rName, pPos );
if( !pDesc && bGetFromPool )
{
- USHORT nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC );
+ sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC );
if( USHRT_MAX != nPoolId &&
0 != (pDesc = GetDoc()->GetPageDescFromPool( nPoolId ))
&& pPos )
@@ -173,7 +175,7 @@ SwPageDesc* SwFEShell::FindPageDescByName( const String& rName,
return pDesc;
}
-USHORT SwFEShell::GetMousePageDesc( const Point &rPt ) const
+sal_uInt16 SwFEShell::GetMousePageDesc( const Point &rPt ) const
{
if( GetLayout() )
{
@@ -184,7 +186,7 @@ USHORT SwFEShell::GetMousePageDesc( const Point &rPt ) const
while( pPage->GetNext() && rPt.Y() > pPage->Frm().Bottom() )
pPage = static_cast<const SwPageFrm*>( pPage->GetNext() );
SwDoc *pMyDoc = GetDoc();
- for ( USHORT i = 0; i < GetDoc()->GetPageDescCnt(); ++i )
+ for ( sal_uInt16 i = 0; i < GetDoc()->GetPageDescCnt(); ++i )
{
if ( pPage->GetPageDesc() == &const_cast<const SwDoc *>(pMyDoc)
->GetPageDesc(i) )
@@ -195,7 +197,7 @@ USHORT SwFEShell::GetMousePageDesc( const Point &rPt ) const
return 0;
}
-USHORT SwFEShell::GetCurPageDesc( const BOOL bCalcFrm ) const
+sal_uInt16 SwFEShell::GetCurPageDesc( const sal_Bool bCalcFrm ) const
{
const SwFrm *pFrm = GetCurrFrm( bCalcFrm );
if ( pFrm )
@@ -204,7 +206,7 @@ USHORT SwFEShell::GetCurPageDesc( const BOOL bCalcFrm ) const
if ( pPage )
{
SwDoc *pMyDoc = GetDoc();
- for ( USHORT i = 0; i < GetDoc()->GetPageDescCnt(); ++i )
+ for ( sal_uInt16 i = 0; i < GetDoc()->GetPageDescCnt(); ++i )
{
if ( pPage->GetPageDesc() == &const_cast<const SwDoc *>(pMyDoc)
->GetPageDesc(i) )
@@ -227,14 +229,14 @@ const SwPageDesc* SwFEShell::GetSelectedPageDescs() const
FOREACHPAM_START(this)
if( 0 != (pCNd = PCURCRSR->GetCntntNode() ) &&
- 0 != ( pPtFrm = pCNd->GetFrm( &aNulPt, 0, FALSE )) )
+ 0 != ( pPtFrm = pCNd->GetFrm( &aNulPt, 0, sal_False )) )
pPtFrm = pPtFrm->FindPageFrm();
else
pPtFrm = 0;
if( PCURCRSR->HasMark() &&
- 0 != (pCNd = PCURCRSR->GetCntntNode( FALSE ) ) &&
- 0 != ( pMkFrm = pCNd->GetFrm( &aNulPt, 0, FALSE )) )
+ 0 != (pCNd = PCURCRSR->GetCntntNode( sal_False ) ) &&
+ 0 != ( pMkFrm = pCNd->GetFrm( &aNulPt, 0, sal_False )) )
pMkFrm = pMkFrm->FindPageFrm();
else
pMkFrm = pPtFrm;
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index dc0159a29618..58e317905cbd 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
#include <svl/itemiter.hxx>
#include <svtools/imapobj.hxx>
@@ -55,6 +56,7 @@
#include <viewimp.hxx>
#include <viscrs.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <dview.hxx>
#include <dflyobj.hxx>
#include <dcontact.hxx>
@@ -70,10 +72,12 @@
#include <fldbas.hxx>
#include <fmtfld.hxx>
#include <swundo.hxx>
+#include <frame.hxx>
+#include <notxtfrm.hxx>
#include <HandleAnchorNodeChg.hxx>
#include <frmatr.hxx>
-
#include <fmtsrnd.hxx> // #i89920#
+#include <ndole.hxx>
#include <editeng/opaqitem.hxx>
using ::rtl::OUString;
@@ -113,10 +117,10 @@ sal_Bool lcl_SetNewFlyPos( const SwNode& rNode, SwFmtAnchor& rAnchor,
return bRet;
}
-BOOL lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm,
+sal_Bool lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm,
SfxItemSet& rSet )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
SwFmtAnchor aNewAnch( (SwFmtAnchor&)rSet.Get( RES_ANCHOR ) );
RndStdIds nNew = aNewAnch.GetAnchorId();
const SwFrm *pNewAnch;
@@ -136,7 +140,7 @@ BOOL lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm,
pNewAnch = ::FindAnchor( pFrm, aTmpPnt );
if( pNewAnch->IsProtected() )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
@@ -458,7 +462,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt )
SwPosition aPos( GetDoc()->GetNodes().GetEndOfExtras() );
Point aTmpPnt( rAbsPos );
GetLayout()->GetCrsrOfst( &aPos, aTmpPnt, &aState );
- pTxtFrm = aPos.nNode.GetNode().GetCntntNode()->GetFrm(0,&aPos,FALSE );
+ pTxtFrm = aPos.nNode.GetNode().GetCntntNode()->GetFrm(0,&aPos,sal_False );
}
const SwFrm *pNewAnch;
if( pTxtFrm )
@@ -583,7 +587,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt )
//TODO: That doesn't seem to be intended
if( Color(COL_TRANSPARENT) != GetOut()->GetLineColor() )
{
- OSL_ENSURE( FALSE, "Hey, Joe: Where's my Null Pen?" );
+ OSL_ENSURE( sal_False, "Hey, Joe: Where's my Null Pen?" );
GetOut()->SetLineColor( Color(COL_TRANSPARENT) );
}
#endif
@@ -668,7 +672,7 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali
SwFlyFrmFmt *pRet;
if( bMoveCntnt )
{
- GetDoc()->StartUndo( UNDO_INSLAYFMT, NULL );
+ GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_INSLAYFMT, NULL );
SwFmtAnchor* pOldAnchor = 0;
sal_Bool bHOriChgd = sal_False, bVOriChgd = sal_False;
SwFmtVertOrient aOldV;
@@ -726,9 +730,18 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali
// das verschieben von TabelleSelektion ist noch nicht
// Undofaehig - also darf das UmAnkern auch nicht
// aufgezeichnet werden.
- sal_Bool bDoesUndo = GetDoc()->DoesUndo();
- if( bDoesUndo && UNDO_INSLAYFMT == GetDoc()->GetUndoIds(NULL, NULL) )
- GetDoc()->DoUndo( sal_False );
+ bool const bDoesUndo =
+ GetDoc()->GetIDocumentUndoRedo().DoesUndo();
+ SwUndoId nLastUndoId(UNDO_EMPTY);
+ if (bDoesUndo &&
+ GetDoc()->GetIDocumentUndoRedo().GetLastUndoInfo(0,
+ & nLastUndoId))
+ {
+ if (UNDO_INSLAYFMT == nLastUndoId)
+ {
+ GetDoc()->GetIDocumentUndoRedo().DoUndo(false);
+ }
+ }
((SfxItemSet&)rSet).Put( *pOldAnchor );
@@ -738,17 +751,17 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali
((SfxItemSet&)rSet).Put( aOldV );
GetDoc()->SetFlyFrmAttr( *pRet, (SfxItemSet&)rSet );
- GetDoc()->DoUndo( bDoesUndo );
+ GetDoc()->GetIDocumentUndoRedo().DoUndo(bDoesUndo);
}
delete pOldAnchor;
}
- GetDoc()->EndUndo( UNDO_INSLAYFMT, NULL );
+ GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_INSLAYFMT, NULL );
}
else
/* If called from a shell try to propagate an
existing adjust item from rPos to the content node of the
new frame. */
- pRet = GetDoc()->MakeFlySection( eRndId, &rPos, &rSet, pParent, TRUE );
+ pRet = GetDoc()->MakeFlySection( eRndId, &rPos, &rSet, pParent, sal_True );
if( pRet )
{
@@ -1386,7 +1399,7 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
{
// search for a sequence field:
const SfxPoolItem* pItem;
- for( USHORT n = 0, nEnd = pHts->Count(); n < nEnd; ++n )
+ for( sal_uInt16 n = 0, nEnd = pHts->Count(); n < nEnd; ++n )
if( RES_TXTATR_FIELD == ( pItem =
&(*pHts)[ n ]->GetAttr())->Which() &&
TYP_SEQFLD == ((SwFmtFld*)pItem)->GetFld()->GetTypeId() )
@@ -1456,6 +1469,12 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference <
pFly->ChgRelPos( aTmp );
}
}
+
+ SwFlyFrmFmt *pFlyFrmFmt = pFly->GetFmt();
+ OSL_ENSURE( pFlyFrmFmt, "fly frame format missing!" );
+ if ( pFlyFrmFmt )
+ pFlyFrmFmt->SetLastFlyFrmPrtRectPos( pFly->Prt().Pos() ); //stores the value of last Prt rect
+
EndAllAction();
return aResult;
@@ -1519,6 +1538,20 @@ const String& SwFEShell::GetFlyName() const
}
+const uno::Reference < embed::XEmbeddedObject > SwFEShell::GetOleRef() const
+{
+ uno::Reference < embed::XEmbeddedObject > xObj;
+ SwFlyFrm * pFly = FindFlyFrm();
+ if (pFly && pFly->Lower() && pFly->Lower()->IsNoTxtFrm())
+ {
+ SwOLENode *pNd = ((SwNoTxtFrm*)pFly->Lower())->GetNode()->GetOLENode();
+ if (pNd)
+ xObj = pNd->GetOLEObj().GetOleRef();
+ }
+ return xObj;
+}
+
+
String SwFEShell::GetUniqueGrfName() const
{
return GetDoc()->GetUniqueGrfName();
@@ -1546,8 +1579,8 @@ const SwFrmFmt* SwFEShell::IsURLGrfAtPos( const Point& rPt, String* pURL,
const SwFmtURL &rURL = pFly->GetFmt()->GetURL();
if( rURL.GetURL().Len() || rURL.GetMap() )
{
- BOOL bSetTargetFrameName = pTargetFrameName != 0;
- BOOL bSetDescription = pDescription != 0;
+ sal_Bool bSetTargetFrameName = pTargetFrameName != 0;
+ sal_Bool bSetDescription = pDescription != 0;
if ( rURL.GetMap() )
{
IMapObject *pObject = pFly->GetFmt()->GetIMapObject( rPt, pFly );
@@ -1867,13 +1900,13 @@ sal_Bool SwFEShell::ReplaceSdrObj( const String& rGrfName, const String& rFltNam
return bRet;
}
-static USHORT SwFmtGetPageNum(const SwFlyFrmFmt * pFmt)
+static sal_uInt16 SwFmtGetPageNum(const SwFlyFrmFmt * pFmt)
{
OSL_ENSURE(pFmt != NULL, "invalid argument");
SwFlyFrm * pFrm = pFmt->GetFrm();
- USHORT aResult;
+ sal_uInt16 aResult;
if (pFrm != NULL)
aResult = pFrm->GetPhyPageNum();
@@ -1887,7 +1920,7 @@ static USHORT SwFmtGetPageNum(const SwFlyFrmFmt * pFmt)
void SwFEShell::GetConnectableFrmFmts(SwFrmFmt & rFmt,
const String & rReference,
- BOOL bSuccessors,
+ sal_Bool bSuccessors,
::std::vector< String > & aPrevPageVec,
::std::vector< String > & aThisPageVec,
::std::vector< String > & aNextPageVec,
@@ -1947,7 +1980,7 @@ void SwFEShell::GetConnectableFrmFmts(SwFrmFmt & rFmt,
aRestVec.clear();
/* number of page rFmt resides on */
- USHORT nPageNum = SwFmtGetPageNum((SwFlyFrmFmt *) &rFmt);
+ sal_uInt16 nPageNum = SwFmtGetPageNum((SwFlyFrmFmt *) &rFmt);
::std::vector< const SwFrmFmt * >::const_iterator aIt;
@@ -1959,7 +1992,7 @@ void SwFEShell::GetConnectableFrmFmts(SwFrmFmt & rFmt,
itself */
if (aString != rReference && aString != rFmt.GetName())
{
- USHORT nNum1 =
+ sal_uInt16 nNum1 =
SwFmtGetPageNum((SwFlyFrmFmt *) *aIt);
if (nNum1 == nPageNum -1)
@@ -2078,6 +2111,95 @@ void SwFEShell::SetObjDescription( const String& rDescription )
}
}
}
-// <--
+
+
+void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedObject >& xObj, SwFlyFrm * pFly )
+{
+#if OSL_DEBUG_LEVEL > 1
+ SvGlobalName aCLSID( xObj->getClassID() );
+ const bool bStarMath = ( SotExchange::IsMath( aCLSID ) != 0 );
+ OSL_ENSURE( bStarMath, "AlignFormulaToBaseline should only be called for Math objects" );
+
+ if ( !bStarMath )
+ return;
+#endif
+
+ if (!pFly)
+ pFly = FindFlyFrm( xObj );
+ OSL_ENSURE( pFly , "No fly frame!" );
+ SwFrmFmt * pFrmFmt = pFly ? pFly->GetFmt() : 0;
+
+ // baseline to baseline alignment should only be applied to formulas anchored as char
+ if ( pFly && pFrmFmt && FLY_AS_CHAR == pFrmFmt->GetAnchor().GetAnchorId() )
+ {
+ // get baseline from Math object
+ uno::Any aBaseline;
+ if( svt::EmbeddedObjectRef::TryRunningState( xObj ) )
+ {
+ uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY );
+ if ( xSet.is() )
+ {
+ try
+ {
+ aBaseline = xSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BaseLine") ) );
+ }
+ catch ( uno::Exception& )
+ {
+ OSL_ENSURE( sal_False , "Baseline could not be retrieved from Starmath!" );
+ }
+ }
+ }
+
+ sal_Int32 nBaseline = ::comphelper::getINT32(aBaseline);
+ const MapMode aSourceMapMode( MAP_100TH_MM );
+ const MapMode aTargetMapMode( MAP_TWIP );
+ nBaseline = OutputDevice::LogicToLogic( nBaseline, aSourceMapMode.GetMapUnit(), aTargetMapMode.GetMapUnit() );
+
+ OSL_ENSURE( nBaseline > 0, "Wrong value of Baseline while retrieving from Starmath!" );
+ //nBaseline must be moved by aPrt position
+ const SwFlyFrmFmt *pFlyFrmFmt = pFly->GetFmt();
+ OSL_ENSURE( pFlyFrmFmt, "fly frame format missing!" );
+ if ( pFlyFrmFmt )
+ nBaseline += pFlyFrmFmt->GetLastFlyFrmPrtRectPos().Y();
+
+ const SwFmtVertOrient &rVert = pFrmFmt->GetVertOrient();
+ SwFmtVertOrient aVert( rVert );
+ aVert.SetPos( -nBaseline );
+ aVert.SetVertOrient( com::sun::star::text::VertOrientation::NONE );
+
+ pFrmFmt->LockModify();
+ pFrmFmt->SetFmtAttr( aVert );
+ pFrmFmt->UnlockModify();
+ pFly->InvalidatePos();
+ }
+}
+
+
+void SwFEShell::AlignAllFormulasToBaseline()
+{
+ StartAllAction();
+
+ SwStartNode *pStNd;
+ SwNodeIndex aIdx( *GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
+ while ( 0 != (pStNd = aIdx.GetNode().GetStartNode()) )
+ {
+ ++aIdx;
+ SwOLENode *pOleNode = dynamic_cast< SwOLENode * >( &aIdx.GetNode() );
+ if ( pOleNode )
+ {
+ const uno::Reference < embed::XEmbeddedObject > & xObj( pOleNode->GetOLEObj().GetOleRef() );
+ if (xObj.is())
+ {
+ SvGlobalName aCLSID( xObj->getClassID() );
+ if ( SotExchange::IsMath( aCLSID ) )
+ AlignFormulaToBaseline( xObj );
+ }
+ }
+
+ aIdx.Assign( *pStNd->EndOfSectionNode(), + 1 );
+ }
+
+ EndAllAction();
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/frmedt/feflyole.cxx b/sw/source/core/frmedt/feflyole.cxx
index b3c89130bc36..43df3c04d3a4 100644
--- a/sw/source/core/frmedt/feflyole.cxx
+++ b/sw/source/core/frmedt/feflyole.cxx
@@ -67,9 +67,9 @@ SwFlyFrm *SwFEShell::FindFlyFrm( const uno::Reference < embed::XEmbeddedObject >
if ( !pFly )
{
//Kein Fly oder der falsche selektiert. Ergo muessen wir leider suchen.
- BOOL bExist = FALSE;
+ sal_Bool bExist = sal_False;
SwStartNode *pStNd;
- ULONG nSttIdx = GetNodes().GetEndOfAutotext().StartOfSectionIndex() + 1,
+ sal_uLong nSttIdx = GetNodes().GetEndOfAutotext().StartOfSectionIndex() + 1,
nEndIdx = GetNodes().GetEndOfAutotext().GetIndex();
while( nSttIdx < nEndIdx &&
0 != (pStNd = GetNodes()[ nSttIdx ]->GetStartNode()) )
@@ -78,7 +78,7 @@ SwFlyFrm *SwFEShell::FindFlyFrm( const uno::Reference < embed::XEmbeddedObject >
if ( pNd->IsOLENode() &&
((SwOLENode*)pNd)->GetOLEObj().GetOleRef() == xObj )
{
- bExist = TRUE;
+ bExist = sal_True;
SwFrm *pFrm = ((SwOLENode*)pNd)->GetFrm();
if ( pFrm )
pFly = pFrm->FindFlyFrm();
@@ -122,13 +122,13 @@ void SwFEShell::MakeObjVisible( const uno::Reference < embed::XEmbeddedObject >&
}
}
-BOOL SwFEShell::FinishOLEObj() // Server wird beendet
+sal_Bool SwFEShell::FinishOLEObj() // Server wird beendet
{
SfxInPlaceClient* pIPClient = GetSfxViewShell()->GetIPClient();
if ( !pIPClient )
- return FALSE;
+ return sal_False;
- BOOL bRet = pIPClient->IsObjectInPlaceActive();
+ sal_Bool bRet = pIPClient->IsObjectInPlaceActive();
if( bRet )
{
uno::Reference < embed::XEmbeddedObject > xObj = pIPClient->GetObject();
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 8570ba213574..20edc3ecbcac 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -28,12 +28,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <com/sun/star/embed/EmbedMisc.hpp>
-#include "hintids.hxx"
-#ifdef WIN
-#define _FESHVIEW_ONLY_INLINE_NEEDED
-#endif
+#include "hintids.hxx"
#include <svx/sdrobjectfilter.hxx>
#include <svx/svditer.hxx>
@@ -53,6 +51,8 @@
#include <svx/svdpage.hxx>
#include <svx/svdpagv.hxx>
+#include <IDocumentSettingAccess.hxx>
+#include <cmdid.h>
#include <poolfmt.hrc> // fuer InitFldTypes
#include <frmfmt.hxx>
#include <frmatr.hxx>
@@ -72,6 +72,7 @@
#include "pagefrm.hxx"
#include "sectfrm.hxx"
#include "doc.hxx"
+#include <IDocumentUndoRedo.hxx>
#include "dview.hxx"
#include "dflyobj.hxx"
#include "dcontact.hxx"
@@ -96,7 +97,7 @@
using namespace com::sun::star;
//Tattergrenze fuer Drawing-SS
-#define MINMOVE ((USHORT)GetOut()->PixelToLogic(Size(Imp()->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width())
+#define MINMOVE ((sal_uInt16)GetOut()->PixelToLogic(Size(Imp()->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width())
SwFlyFrm *GetFlyFromMarked( const SdrMarkList *pLst, ViewShell *pSh )
{
@@ -120,12 +121,12 @@ void lcl_GrabCursor( SwFEShell* pSh, SwFlyFrm* pOldSelFly)
{
// dann das evt. gesetzte Macro rufen
pSh->GetFlyMacroLnk().Call( (void*)pFlyFmt );
-extern BOOL bNoInterrupt; // in swapp.cxx
+extern sal_Bool bNoInterrupt; // in swapp.cxx
// wir in dem Makro ein Dialog gestartet, dann kommt das
// MouseButtonUp zu diesem und nicht zu uns. Dadurch ist
// Flag bei uns immer gesetzt und schaltet nie die auf die
// entsp. Shell um !!!!!!!
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
}
else if( !pFlyFmt || RES_DRAWFRMFMT == pFlyFmt->Which() )
{
@@ -133,7 +134,7 @@ extern BOOL bNoInterrupt; // in swapp.cxx
pSh->KillPams();
pSh->ClearMark();
// <--
- pSh->SetCrsr( pSh->Imp()->GetDrawView()->GetAllMarkedRect().TopLeft(), TRUE);
+ pSh->SetCrsr( pSh->Imp()->GetDrawView()->GetAllMarkedRect().TopLeft(), sal_True);
}
}
@@ -143,7 +144,7 @@ extern BOOL bNoInterrupt; // in swapp.cxx
|*
*************************************************************************/
-BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj )
+sal_Bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj )
{
SwDrawView *pDView = Imp()->GetDrawView();
if(!pDView)
@@ -154,16 +155,16 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj )
//durchkommen
const SdrMarkList &rMrkList = pDView->GetMarkedObjectList();
- const BOOL bHadSelection = rMrkList.GetMarkCount() ? TRUE : FALSE;
- const BOOL bAddSelect = 0 != (SW_ADD_SELECT & nFlag);
- const BOOL bEnterGroup = 0 != (SW_ENTER_GROUP & nFlag);
+ const sal_Bool bHadSelection = rMrkList.GetMarkCount() ? sal_True : sal_False;
+ const sal_Bool bAddSelect = 0 != (SW_ADD_SELECT & nFlag);
+ const sal_Bool bEnterGroup = 0 != (SW_ENTER_GROUP & nFlag);
SwFlyFrm* pOldSelFly = 0;
const Point aOldPos( pDView->GetAllMarkedRect().TopLeft() );
if( bHadSelection )
{
//Unmark rufen wenn !bAddSelect oder wenn ein Fly selektiert ist.
- BOOL bUnmark = !bAddSelect;
+ sal_Bool bUnmark = !bAddSelect;
if ( rMrkList.GetMarkCount() == 1 )
{
@@ -171,7 +172,7 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj )
pOldSelFly = ::GetFlyFromMarked( &rMrkList, this );
if ( pOldSelFly )
{
- const USHORT nType = GetCntType();
+ const sal_uInt16 nType = GetCntType();
if( nType != CNT_TXT || (SW_LEAVE_FRAME & nFlag) ||
( pOldSelFly->GetFmt()->GetProtect().IsCntntProtected()
&& !IsReadOnlyAvailable() ))
@@ -183,18 +184,18 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj )
//linke obere Ecke gesetzt.
Point aPt( pOldSelFly->Frm().Pos() );
aPt.X() -= 1;
- BOOL bUnLockView = !IsViewLocked();
- LockView( TRUE );
- SetCrsr( aPt, TRUE );
+ sal_Bool bUnLockView = !IsViewLocked();
+ LockView( sal_True );
+ SetCrsr( aPt, sal_True );
if( bUnLockView )
- LockView( FALSE );
+ LockView( sal_False );
}
if ( nType & CNT_GRF &&
((SwNoTxtFrm*)pOldSelFly->Lower())->HasAnimation() )
{
GetWin()->Invalidate( pOldSelFly->Frm().SVRect() );
}
- bUnmark = TRUE;
+ bUnmark = sal_True;
}
}
if ( bUnmark )
@@ -216,16 +217,16 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj )
pDView->MarkObj( rPt, MINMOVE, bAddSelect, bEnterGroup );
}
- const BOOL bRet = 0 != rMrkList.GetMarkCount();
+ const sal_Bool bRet = 0 != rMrkList.GetMarkCount();
if ( rMrkList.GetMarkCount() > 1 )
{
//Ganz dumm ist es, wenn Zeichenobjekte Selektiert waren und
//nun ein Fly hinzuselektiert wird.
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject *pTmpObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
- BOOL bForget = pTmpObj->ISA(SwVirtFlyDrawObj);
+ sal_Bool bForget = pTmpObj->ISA(SwVirtFlyDrawObj);
if( bForget )
{
pDView->UnmarkAll();
@@ -247,7 +248,7 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj )
}
}
else if ( !pOldSelFly && bHadSelection )
- SetCrsr( aOldPos, TRUE);
+ SetCrsr( aOldPos, sal_True);
if( bRet || !bHadSelection )
CallChgLnk();
@@ -261,7 +262,7 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj )
/*************************************************************************
|*
-|* sal_Bool SwFEShell::MoveAnchor( USHORT nDir )
+|* sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir )
|*
|* Description: MoveAnchor( nDir ) looked for an another Anchor for
|* the selected drawing object (or fly frame) in the given direction.
@@ -285,7 +286,7 @@ BOOL SwFEShell::SelectObj( const Point& rPt, BYTE nFlag, SdrObject *pObj )
( aPt1.Y() == aPt2.Y() && ( aPt1.X() < aPt2.X() || \
( aPt1.X() == aPt2.X() && bOld ) ) ) )
-sal_Bool SwFEShell::MoveAnchor( USHORT nDir )
+sal_Bool SwFEShell::MoveAnchor( sal_uInt16 nDir )
{
const SdrMarkList* pMrkList;
if( !Imp()->GetDrawView() ||
@@ -420,7 +421,7 @@ sal_Bool SwFEShell::MoveAnchor( USHORT nDir )
Point aCenter( pOld->Frm().Left() + pOld->Frm().Width()/2,
pOld->Frm().Top() + pOld->Frm().Height()/2 );
Point aBest;
- for( i = 0; (USHORT)i<pPage->GetSortedObjs()->Count(); ++i )
+ for( i = 0; (sal_uInt16)i<pPage->GetSortedObjs()->Count(); ++i )
{
SwAnchoredObject* pAnchObj =
(*pPage->GetSortedObjs())[i];
@@ -543,9 +544,9 @@ const SdrMarkList* SwFEShell::_GetMarkList() const
return pMarkList;
}
-USHORT SwFEShell::GetSelFrmType() const
+sal_uInt16 SwFEShell::GetSelFrmType() const
{
- USHORT eType;
+ sal_uInt16 eType;
// get marked frame list, and check if anything is selected
const SdrMarkList* pMarkList = _GetMarkList();
@@ -616,7 +617,7 @@ void SwFEShell::ScrollTo( const Point &rPt )
|*
*************************************************************************/
-void SwFEShell::SetDragMode( UINT16 eDragMode )
+void SwFEShell::SetDragMode( sal_uInt16 eDragMode )
{
if ( Imp()->HasDrawView() )
Imp()->GetDrawView()->SetDragMode( (SdrDragMode)eDragMode );
@@ -628,7 +629,7 @@ void SwFEShell::SetDragMode( UINT16 eDragMode )
|*
*************************************************************************/
-long SwFEShell::BeginDrag( const Point* pPt, BOOL )
+long SwFEShell::BeginDrag( const Point* pPt, sal_Bool )
{
SdrView *pView = Imp()->GetDrawView();
if ( pView && pView->AreObjectsMarked() )
@@ -647,7 +648,7 @@ long SwFEShell::BeginDrag( const Point* pPt, BOOL )
|*
*************************************************************************/
-long SwFEShell::Drag( const Point *pPt, BOOL )
+long SwFEShell::Drag( const Point *pPt, sal_Bool )
{
OSL_ENSURE( Imp()->HasDrawView(), "Drag without DrawView?" );
if ( Imp()->GetDrawView()->IsDragObj() )
@@ -667,7 +668,7 @@ long SwFEShell::Drag( const Point *pPt, BOOL )
|*
*************************************************************************/
-long SwFEShell::EndDrag( const Point *, BOOL )
+long SwFEShell::EndDrag( const Point *, sal_Bool )
{
OSL_ENSURE( Imp()->HasDrawView(), "EndDrag without DrawView?" );
SdrView *pView = Imp()->GetDrawView();
@@ -693,8 +694,8 @@ long SwFEShell::EndDrag( const Point *, BOOL )
pView->EndDragObj();
// JP 18.08.95: DrawUndo-Action auf FlyFrames werden nicht gespeichert
// Die Fly aendern das Flag
- GetDoc()->SetNoDrawUndoObj( FALSE );
- ChgAnchor( 0, TRUE );
+ GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(true);
+ ChgAnchor( 0, sal_True );
EndUndo( UNDO_END );
@@ -785,10 +786,10 @@ void lcl_NotifyNeighbours( const SdrMarkList *pLst )
//3. Rahmen die dem Rahmen ausweichen bzw. wichen muessen benachrichtigt werden.
//4. Auch Zeichenobjekte koennen Rahmen verdraengen
- for( USHORT j = 0; j < pLst->GetMarkCount(); ++j )
+ for( sal_uInt16 j = 0; j < pLst->GetMarkCount(); ++j )
{
SwPageFrm *pPage;
- BOOL bCheckNeighbours = FALSE;
+ sal_Bool bCheckNeighbours = sal_False;
sal_Int16 aHori = text::HoriOrientation::NONE;
SwRect aRect;
SdrObject *pO = pLst->GetMark( 0 )->GetMarkedSdrObj();
@@ -801,7 +802,7 @@ void lcl_NotifyNeighbours( const SdrMarkList *pLst )
if( text::HoriOrientation::NONE != aHori && text::HoriOrientation::CENTER != aHori &&
pFly->IsFlyAtCntFrm() )
{
- bCheckNeighbours = TRUE;
+ bCheckNeighbours = sal_True;
pFly->InvalidatePos();
pFly->Frm().Pos().Y() += 1;
}
@@ -857,7 +858,7 @@ void lcl_NotifyNeighbours( const SdrMarkList *pLst )
}
}
-void SwFEShell::SelectionToTop( BOOL bTop )
+void SwFEShell::SelectionToTop( sal_Bool bTop )
{
OSL_ENSURE( Imp()->HasDrawView(), "SelectionToTop without DrawView?" );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
@@ -877,7 +878,7 @@ void SwFEShell::SelectionToTop( BOOL bTop )
EndAllAction();
}
-void SwFEShell::SelectionToBottom( BOOL bBottom )
+void SwFEShell::SelectionToBottom( sal_Bool bBottom )
{
OSL_ENSURE( Imp()->HasDrawView(), "SelectionToBottom without DrawView?" );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
@@ -912,7 +913,7 @@ short SwFEShell::GetLayerId() const
if ( Imp()->HasDrawView() )
{
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
const SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
if ( nRet == SHRT_MAX )
@@ -946,7 +947,7 @@ void SwFEShell::ChangeOpaque( SdrLayerID nLayerId )
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
const IDocumentDrawModelAccess* pIDDMA = getIDocumentDrawModelAccess();
// correct type of <nControls>
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject* pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
// #i18447# - no change of layer for controls
@@ -992,18 +993,18 @@ void SwFEShell::SelectionToHell()
|*
*************************************************************************/
-USHORT SwFEShell::IsObjSelected() const
+sal_uInt16 SwFEShell::IsObjSelected() const
{
if ( IsFrmSelected() || !Imp()->HasDrawView() )
return 0;
else
- return USHORT( Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() );
+ return sal_uInt16( Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() );
}
-BOOL SwFEShell::IsFrmSelected() const
+sal_Bool SwFEShell::IsFrmSelected() const
{
if ( !Imp()->HasDrawView() )
- return FALSE;
+ return sal_False;
else
return 0 != ::GetFlyFromMarked( &Imp()->GetDrawView()->GetMarkedObjectList(),
(ViewShell*)this );
@@ -1061,7 +1062,7 @@ void SwFEShell::EndTextEdit()
DelSelectedObj();
if ( aSave.GetMarkCount() )
{
- for ( USHORT i = 0; i < aSave.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < aSave.GetMarkCount(); ++i )
pView->MarkObj( aSave.GetMark( i )->GetMarkedSdrObj(),
Imp()->GetPageView() );
}
@@ -1112,7 +1113,7 @@ bool SwFEShell::IsObjSelectable( const Point& rPt )
{
SdrObject* pObj;
SdrPageView* pPV;
- USHORT nOld = pDView->GetHitTolerancePixel();
+ sal_uInt16 nOld = pDView->GetHitTolerancePixel();
pDView->SetHitTolerancePixel( pDView->GetMarkHdlSizePixel()/2 );
bRet = 0 != pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMARKABLE );
@@ -1231,18 +1232,18 @@ sal_Bool SwFEShell::ShouldObjectBeSelected(const Point& rPt)
* Beinhaltet das Objekt ein Control oder Gruppen,
* die nur aus Controls bestehen
* --------------------------------------------------*/
-BOOL lcl_IsControlGroup( const SdrObject *pObj )
+sal_Bool lcl_IsControlGroup( const SdrObject *pObj )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if(pObj->ISA(SdrUnoObj))
- bRet = TRUE;
+ bRet = sal_True;
else if( pObj->ISA( SdrObjGroup ) )
{
- bRet = TRUE;
+ bRet = sal_True;
const SdrObjList *pLst = ((SdrObjGroup*)pObj)->GetSubList();
- for ( USHORT i = 0; i < pLst->GetObjCount(); ++i )
+ for ( sal_uInt16 i = 0; i < pLst->GetObjCount(); ++i )
if( !::lcl_IsControlGroup( pLst->GetObj( i ) ) )
- return FALSE;
+ return sal_False;
}
return bRet;
}
@@ -1267,7 +1268,7 @@ namespace
};
}
-const SdrObject* SwFEShell::GetBestObject( BOOL bNext, USHORT eType, BOOL bFlat, const ::svx::ISdrObjectFilter* pFilter )
+const SdrObject* SwFEShell::GetBestObject( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType, sal_Bool bFlat, const ::svx::ISdrObjectFilter* pFilter )
{
if( !Imp()->HasDrawView() )
return NULL;
@@ -1280,12 +1281,12 @@ const SdrObject* SwFEShell::GetBestObject( BOOL bNext, USHORT eType, BOOL bFlat,
Point aTopPos( nTmp, nTmp );
Point aCurPos;
Point aPos;
- BOOL bNoDraw = 0 == (GOTOOBJ_DRAW_ANY & eType);
- BOOL bNoFly = 0 == (GOTOOBJ_FLY_ANY & eType);
+ sal_Bool bNoDraw = 0 == (GOTOOBJ_DRAW_ANY & eType);
+ sal_Bool bNoFly = 0 == (GOTOOBJ_FLY_ANY & eType);
if( !bNoFly && bNoDraw )
{
- SwFlyFrm *pFly = GetCurrFrm( FALSE )->FindFlyFrm();
+ SwFlyFrm *pFly = GetCurrFrm( sal_False )->FindFlyFrm();
if( pFly )
pBest = pFly->GetVirtDrawObj();
}
@@ -1338,7 +1339,7 @@ const SdrObject* SwFEShell::GetBestObject( BOOL bNext, USHORT eType, BOOL bFlat,
while ( aObjIter.IsMore() )
{
SdrObject* pObj = aObjIter.Next();
- BOOL bFlyFrm = pObj->ISA(SwVirtFlyDrawObj);
+ sal_Bool bFlyFrm = pObj->ISA(SwVirtFlyDrawObj);
if( ( bNoFly && bFlyFrm ) ||
( bNoDraw && !bFlyFrm ) ||
( eType == GOTOOBJ_DRAW_SIMPLE && lcl_IsControlGroup( pObj ) ) ||
@@ -1411,10 +1412,12 @@ const SdrObject* SwFEShell::GetBestObject( BOOL bNext, USHORT eType, BOOL bFlat,
break;
}
- if(((bNext? (aPos.Y() < aCurPos.Y()) : // nur unter mir
+ if( (
+ (bNext? (aPos.Y() < aCurPos.Y()) : // nur unter mir
(aPos.Y() > aCurPos.Y())) && // " reverse
(bNext? (aBestPos.Y() > aCurPos.Y()) : // naeher drunter
- (aBestPos.Y() < aCurPos.Y()))) || // " reverse
+ (aBestPos.Y() < aCurPos.Y()))
+ ) || // " reverse
(aBestPos.Y() == aCurPos.Y() &&
(bNext? (aBestPos.X() > aCurPos.X()) : // weiter links
(aBestPos.X() < aCurPos.X())))) // " reverse
@@ -1442,14 +1445,14 @@ const SdrObject* SwFEShell::GetBestObject( BOOL bNext, USHORT eType, BOOL bFlat,
return pBest;
}
-BOOL SwFEShell::GotoObj( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType )
+sal_Bool SwFEShell::GotoObj( sal_Bool bNext, sal_uInt16 /*GOTOOBJ_...*/ eType )
{
const SdrObject* pBest = GetBestObject( bNext, eType );
if ( !pBest )
- return FALSE;
+ return sal_False;
- BOOL bFlyFrm = pBest->ISA(SwVirtFlyDrawObj);
+ sal_Bool bFlyFrm = pBest->ISA(SwVirtFlyDrawObj);
if( bFlyFrm )
{
SwVirtFlyDrawObj *pO = (SwVirtFlyDrawObj*)pBest;
@@ -1465,7 +1468,7 @@ BOOL SwFEShell::GotoObj( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType )
MakeVisible( pBest->GetCurrentBoundRect() );
}
CallChgLnk();
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -1474,9 +1477,9 @@ BOOL SwFEShell::GotoObj( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType )
|*
*************************************************************************/
-BOOL SwFEShell::BeginCreate( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos )
+sal_Bool SwFEShell::BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( !Imp()->HasDrawView() )
Imp()->MakeDrawView();
@@ -1498,10 +1501,10 @@ BOOL SwFEShell::BeginCreate( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, const Poin
return bRet;
}
-BOOL SwFEShell::BeginCreate( UINT16 eSdrObjectKind, UINT32 eObjInventor,
+sal_Bool SwFEShell::BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, sal_uInt32 eObjInventor,
const Point &rPos )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( !Imp()->HasDrawView() )
Imp()->MakeDrawView();
@@ -1539,34 +1542,36 @@ void SwFEShell::MoveCreate( const Point &rPos )
|*
*************************************************************************/
-BOOL SwFEShell::EndCreate( UINT16 eSdrCreateCmd )
+sal_Bool SwFEShell::EndCreate( sal_uInt16 eSdrCreateCmd )
{
// JP 18.08.95: Damit das Undo-Object aus der DrawEngine nicht bei uns
// gespeichert wird, (wir erzeugen ein eigenes Undo-Object!) hier kurz
// das Undo abschalten
OSL_ENSURE( Imp()->HasDrawView(), "EndCreate without DrawView?" );
if( !Imp()->GetDrawView()->IsGroupEntered() )
- GetDoc()->SetNoDrawUndoObj( TRUE );
- BOOL bCreate = Imp()->GetDrawView()->EndCreateObj(
+ {
+ GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(false);
+ }
+ sal_Bool bCreate = Imp()->GetDrawView()->EndCreateObj(
SdrCreateCmd( eSdrCreateCmd ) );
- GetDoc()->SetNoDrawUndoObj( FALSE );
+ GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(true);
if ( !bCreate )
{
::FrameNotify( this, FLY_DRAG_END );
- return FALSE;
+ return sal_False;
}
if ( (SdrCreateCmd)eSdrCreateCmd == SDRCREATE_NEXTPOINT )
{
::FrameNotify( this, FLY_DRAG );
- return TRUE;
+ return sal_True;
}
return ImpEndCreate();
}
-BOOL SwFEShell::ImpEndCreate()
+sal_Bool SwFEShell::ImpEndCreate()
{
OSL_ENSURE( Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() == 1,
"Neues Object nicht selektiert." );
@@ -1580,7 +1585,7 @@ BOOL SwFEShell::ImpEndCreate()
Imp()->GetDrawView()->DeleteMarked();
Imp()->GetDrawView()->UnmarkAll();
::FrameNotify( this, FLY_DRAG_END );
- return FALSE;
+ return sal_False;
}
if( rSdrObj.GetUpGroup() )
@@ -1591,7 +1596,7 @@ BOOL SwFEShell::ImpEndCreate()
rSdrObj.NbcSetRelativePos( aTmpPos - aNewAnchor );
rSdrObj.NbcSetAnchorPos( aNewAnchor );
::FrameNotify( this, FLY_DRAG );
- return TRUE;
+ return sal_True;
}
LockPaint();
@@ -1604,14 +1609,14 @@ BOOL SwFEShell::ImpEndCreate()
//Fremde Identifier sollen in den Default laufen.
//Ueberschneidungen sind moeglich!!
- UINT16 nIdent = SdrInventor == rSdrObj.GetObjInventor()
+ sal_uInt16 nIdent = SdrInventor == rSdrObj.GetObjInventor()
? rSdrObj.GetObjIdentifier()
: 0xFFFF;
//Default fuer Controls ist Zeichengebunden, Absatzgebunden sonst.
SwFmtAnchor aAnch;
const SwFrm *pAnch = 0;
- BOOL bCharBound = FALSE;
+ sal_Bool bCharBound = sal_False;
if( rSdrObj.ISA( SdrUnoObj ) )
{
SwPosition aPos( GetDoc()->GetNodes() );
@@ -1627,7 +1632,7 @@ BOOL SwFEShell::ImpEndCreate()
pAnch->GetCharRect( aTmp, aPos );
//Der Crsr darf nicht zu weit entfernt sein.
- bCharBound = TRUE;
+ bCharBound = sal_True;
Rectangle aRect( aTmp.SVRect() );
aRect.Left() -= MM50*2;
aRect.Top() -= MM50*2;
@@ -1635,7 +1640,7 @@ BOOL SwFEShell::ImpEndCreate()
aRect.Bottom()+= MM50*2;
if( !aRect.IsOver( rBound ) && !::GetHtmlMode( GetDoc()->GetDocShell() ))
- bCharBound = FALSE;
+ bCharBound = sal_False;
//Bindung in Kopf-/Fusszeilen ist ebenfalls nicht erlaubt.
if( bCharBound )
@@ -1670,7 +1675,7 @@ BOOL SwFEShell::ImpEndCreate()
// die naechste nicht READONLY Position suchen?
bAtPage = true;
- pAnch = aPos.nNode.GetNode().GetCntntNode()->GetFrm( &aPoint, 0, FALSE );
+ pAnch = aPos.nNode.GetNode().GetCntntNode()->GetFrm( &aPoint, 0, sal_False );
if( !bAtPage )
{
@@ -1775,29 +1780,29 @@ BOOL SwFEShell::ImpEndCreate()
//Erzeugtes Object wegwerfen, so kann der Fly am elegentesten
//ueber vorhandene SS erzeugt werden.
- GetDoc()->SetNoDrawUndoObj( TRUE ); // siehe oben
+ GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(false); // see above
// --> OD 2005-08-08 #i52858# - method name changed
SdrPage *pPg = getIDocumentDrawModelAccess()->GetOrCreateDrawModel()->GetPage( 0 );
// <--
if( !pPg )
{
SdrModel* pTmpSdrModel = getIDocumentDrawModelAccess()->GetDrawModel();
- pPg = pTmpSdrModel->AllocPage( FALSE );
+ pPg = pTmpSdrModel->AllocPage( sal_False );
pTmpSdrModel->InsertPage( pPg );
}
pPg->RecalcObjOrdNums();
SdrObject* pRemovedObject = pPg->RemoveObject( rSdrObj.GetOrdNumDirect() );
SdrObject::Free( pRemovedObject );
- GetDoc()->SetNoDrawUndoObj( FALSE );
+ GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(true);
SwFlyFrm* pFlyFrm;
- if( NewFlyFrm( aSet, TRUE ) &&
+ if( NewFlyFrm( aSet, sal_True ) &&
::GetHtmlMode( GetDoc()->GetDocShell() ) &&
0 != ( pFlyFrm = FindFlyFrm() ))
{
SfxItemSet aHtmlSet( GetDoc()->GetAttrPool(), RES_VERT_ORIENT, RES_HORI_ORIENT );
//Horizontale Ausrichtung:
- const BOOL bLeftFrm = aFlyRect.Left() <
+ const sal_Bool bLeftFrm = aFlyRect.Left() <
pAnch->Frm().Left() + pAnch->Prt().Left(),
bLeftPrt = aFlyRect.Left() + aFlyRect.Width() <
pAnch->Frm().Left() + pAnch->Prt().Width()/2;
@@ -1808,7 +1813,7 @@ BOOL SwFEShell::ImpEndCreate()
}
else
{
- const BOOL bRightFrm = aFlyRect.Left() >
+ const sal_Bool bRightFrm = aFlyRect.Left() >
pAnch->Frm().Left() + pAnch->Prt().Width();
aHori.SetHoriOrient( text::HoriOrientation::RIGHT );
aHori.SetRelationOrient( bRightFrm ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA );
@@ -1889,12 +1894,12 @@ BOOL SwFEShell::ImpEndCreate()
if ( pMarkObj )
{
Imp()->GetDrawView()->MarkObj( pMarkObj, Imp()->GetPageView(),
- FALSE, FALSE );
+ sal_False, sal_False );
}
else
{
Imp()->GetDrawView()->MarkObj( &rSdrObj, Imp()->GetPageView(),
- FALSE, FALSE );
+ sal_False, sal_False );
}
}
}
@@ -1904,7 +1909,7 @@ BOOL SwFEShell::ImpEndCreate()
KillPams();
EndAllActionAndCall();
UnlockPaint();
- return TRUE;
+ return sal_True;
}
@@ -1927,9 +1932,9 @@ void SwFEShell::BreakCreate()
|*
*************************************************************************/
-BOOL SwFEShell::IsDrawCreate() const
+sal_Bool SwFEShell::IsDrawCreate() const
{
- return Imp()->HasDrawView() ? Imp()->GetDrawView()->IsCreateObj() : FALSE;
+ return Imp()->HasDrawView() ? Imp()->GetDrawView()->IsCreateObj() : sal_False;
}
/*************************************************************************
@@ -1938,7 +1943,7 @@ BOOL SwFEShell::IsDrawCreate() const
|*
*************************************************************************/
-BOOL SwFEShell::BeginMark( const Point &rPos )
+sal_Bool SwFEShell::BeginMark( const Point &rPos )
{
if ( !Imp()->HasDrawView() )
Imp()->MakeDrawView();
@@ -1953,7 +1958,7 @@ BOOL SwFEShell::BeginMark( const Point &rPos )
return pDView->BegMarkObj( rPos );
}
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1986,9 +1991,9 @@ void SwFEShell::MoveMark( const Point &rPos )
|*
*************************************************************************/
-BOOL SwFEShell::EndMark()
+sal_Bool SwFEShell::EndMark()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
OSL_ENSURE( Imp()->HasDrawView(), "EndMark without DrawView?" );
if (Imp()->GetDrawView()->IsMarkObj())
@@ -1997,7 +2002,7 @@ BOOL SwFEShell::EndMark()
if ( bRet )
{
- BOOL bShowHdl = FALSE;
+ sal_Bool bShowHdl = sal_False;
SwDrawView* pDView = Imp()->GetDrawView();
//Rahmen werden auf diese Art nicht Selektiert, es sein denn es
//ist nur ein Rahmen.
@@ -2005,14 +2010,14 @@ BOOL SwFEShell::EndMark()
SwFlyFrm* pOldSelFly = ::GetFlyFromMarked( &rMrkList, this );
if ( rMrkList.GetMarkCount() > 1 )
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
if( pObj->ISA(SwVirtFlyDrawObj) )
{
if ( !bShowHdl )
{
- bShowHdl = TRUE;
+ bShowHdl = sal_True;
}
rMrkList.DeleteMark( i );
--i; //keinen auslassen.
@@ -2028,7 +2033,7 @@ BOOL SwFEShell::EndMark()
if ( rMrkList.GetMarkCount() )
::lcl_GrabCursor(this, pOldSelFly);
else
- bRet = FALSE;
+ bRet = sal_False;
}
if ( bRet )
::FrameNotify( this, FLY_DRAG_START );
@@ -2067,7 +2072,7 @@ short SwFEShell::GetAnchorId() const
if ( Imp()->HasDrawView() )
{
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
if ( pObj->ISA(SwVirtFlyDrawObj) )
@@ -2097,7 +2102,7 @@ short SwFEShell::GetAnchorId() const
|*
*************************************************************************/
-void SwFEShell::ChgAnchor( int eAnchorId, BOOL bSameOnly, BOOL bPosCorr )
+void SwFEShell::ChgAnchor( int eAnchorId, sal_Bool bSameOnly, sal_Bool bPosCorr )
{
OSL_ENSURE( Imp()->HasDrawView(), "ChgAnchor without DrawView?" );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
@@ -2198,12 +2203,12 @@ Point SwFEShell::GetObjAbsPos() const
|*
*************************************************************************/
-BOOL SwFEShell::IsGroupSelected()
+sal_Bool SwFEShell::IsGroupSelected()
{
if ( IsObjSelected() )
{
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
// consider 'virtual' drawing objects.
@@ -2215,11 +2220,11 @@ BOOL SwFEShell::IsGroupSelected()
FLY_AS_CHAR != ((SwDrawContact*)GetUserCall(pObj))->
GetFmt()->GetAnchor().GetAnchorId() )
{
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
// Change return type.
@@ -2235,7 +2240,7 @@ bool SwFEShell::IsGroupAllowed() const
const SdrObject* pUpGroup = 0L;
const SwFrm* pHeaderFooterFrm = 0L;
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- for ( USHORT i = 0; bIsGroupAllowed && i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; bIsGroupAllowed && i < rMrkList.GetMarkCount(); ++i )
{
const SdrObject* pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
if ( i )
@@ -2351,7 +2356,7 @@ void SwFEShell::UnGroupSelection()
|*
*************************************************************************/
-void SwFEShell::MirrorSelection( BOOL bHorizontal )
+void SwFEShell::MirrorSelection( sal_Bool bHorizontal )
{
SdrView *pView = Imp()->GetDrawView();
if ( IsObjSelected() && pView->IsMirrorAllowed() )
@@ -2365,10 +2370,10 @@ void SwFEShell::MirrorSelection( BOOL bHorizontal )
// springe zum benannten Rahmen (Grafik/OLE)
-BOOL SwFEShell::GotoFly( const String& rName, FlyCntType eType, BOOL bSelFrm )
+sal_Bool SwFEShell::GotoFly( const String& rName, FlyCntType eType, sal_Bool bSelFrm )
{
- BOOL bRet = FALSE;
-static BYTE const aChkArr[ 4 ] = {
+ sal_Bool bRet = sal_False;
+ static sal_uInt8 const aChkArr[ 4 ] = {
/* FLYCNTTYPE_ALL */ 0,
/* FLYCNTTYPE_FRM */ ND_TEXTNODE,
/* FLYCNTTYPE_GRF */ ND_GRFNODE,
@@ -2409,19 +2414,19 @@ static BYTE const aChkArr[ 4 ] = {
GetCrsrDocPos() = rChrRect.Pos();
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
}
-USHORT SwFEShell::GetFlyCount( FlyCntType eType ) const
+sal_uInt16 SwFEShell::GetFlyCount( FlyCntType eType ) const
{
return GetDoc()->GetFlyCount(eType);
}
-const SwFrmFmt* SwFEShell::GetFlyNum(USHORT nIdx, FlyCntType eType ) const
+const SwFrmFmt* SwFEShell::GetFlyNum(sal_uInt16 nIdx, FlyCntType eType ) const
{
return GetDoc()->GetFlyNum(nIdx, eType );
}
@@ -2440,14 +2445,14 @@ void SwFEShell::MakeSelVisible()
//Welcher Schutz ist am selektierten Objekt gesetzt?
-BYTE SwFEShell::IsSelObjProtected( USHORT eType ) const
+sal_uInt8 SwFEShell::IsSelObjProtected( sal_uInt16 eType ) const
{
int nChk = 0;
const bool bParent = (eType & FLYPROTECT_PARENT);
if( Imp()->HasDrawView() )
{
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- for( ULONG i = rMrkList.GetMarkCount(); i; )
+ for( sal_uLong i = rMrkList.GetMarkCount(); i; )
{
SdrObject *pObj = rMrkList.GetMark( --i )->GetMarkedSdrObj();
if( !bParent )
@@ -2455,32 +2460,38 @@ BYTE SwFEShell::IsSelObjProtected( USHORT eType ) const
nChk |= ( pObj->IsMoveProtect() ? FLYPROTECT_POS : 0 ) |
( pObj->IsResizeProtect()? FLYPROTECT_SIZE : 0 );
- if( FLYPROTECT_CONTENT & eType && pObj->ISA(SwVirtFlyDrawObj) )
+ if( pObj->ISA(SwVirtFlyDrawObj) )
{
SwFlyFrm *pFly = ((SwVirtFlyDrawObj*)pObj)->GetFlyFrm();
- if ( pFly->GetFmt()->GetProtect().IsCntntProtected() )
+ if ( (FLYPROTECT_CONTENT & eType) && pFly->GetFmt()->GetProtect().IsCntntProtected() )
nChk |= FLYPROTECT_CONTENT;
if ( pFly->Lower() && pFly->Lower()->IsNoTxtFrm() )
{
SwOLENode *pNd = ((SwCntntFrm*)pFly->Lower())->GetNode()->GetOLENode();
- if ( pNd )
+ uno::Reference < embed::XEmbeddedObject > xObj( pNd ? pNd->GetOLEObj().GetOleRef() : 0 );
+ if ( xObj.is() )
{
- uno::Reference < embed::XEmbeddedObject > xObj = pNd->GetOLEObj().GetOleRef();
-
// TODO/LATER: use correct aspect
- if ( xObj.is() &&
- embed::EmbedMisc::EMBED_NEVERRESIZE & xObj->getStatus( embed::Aspects::MSOLE_CONTENT ) )
+ const bool bNeverResize = (embed::EmbedMisc::EMBED_NEVERRESIZE & xObj->getStatus( embed::Aspects::MSOLE_CONTENT ));
+ if ( (FLYPROTECT_CONTENT & eType) && bNeverResize )
{
nChk |= FLYPROTECT_SIZE;
nChk |= FLYPROTECT_FIXED;
}
+
+ // set FLYPROTECT_POS if it is a Math object anchored 'as char' and baseline alignment is activated
+ const bool bProtectMathPos = SotExchange::IsMath( xObj->getClassID() )
+ && FLY_AS_CHAR == pFly->GetFmt()->GetAnchor().GetAnchorId()
+ && pDoc->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT );
+ if ((FLYPROTECT_POS & eType) && bProtectMathPos)
+ nChk |= FLYPROTECT_POS;
}
}
}
nChk &= eType;
if( nChk == eType )
- return static_cast<BYTE>(eType);
+ return static_cast<sal_uInt8>(eType);
}
const SwFrm* pAnch;
if( pObj->ISA(SwVirtFlyDrawObj) )
@@ -2491,19 +2502,19 @@ BYTE SwFEShell::IsSelObjProtected( USHORT eType ) const
pAnch = pTmp ? pTmp->GetAnchorFrm( pObj ) : NULL;
}
if( pAnch && pAnch->IsProtected() )
- return static_cast<BYTE>(eType);
+ return static_cast<sal_uInt8>(eType);
}
}
- return static_cast<BYTE>(nChk);
+ return static_cast<sal_uInt8>(nChk);
}
-BOOL SwFEShell::GetObjAttr( SfxItemSet &rSet ) const
+sal_Bool SwFEShell::GetObjAttr( SfxItemSet &rSet ) const
{
if ( !IsObjSelected() )
- return FALSE;
+ return sal_False;
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj);
@@ -2518,23 +2529,23 @@ BOOL SwFEShell::GetObjAttr( SfxItemSet &rSet ) const
}
// <--
}
- return TRUE;
+ return sal_True;
}
-BOOL SwFEShell::SetObjAttr( const SfxItemSet& rSet )
+sal_Bool SwFEShell::SetObjAttr( const SfxItemSet& rSet )
{
SET_CURR_SHELL( this );
if ( !rSet.Count() )
{ OSL_ENSURE( !this, "SetObjAttr, empty set." );
- return FALSE;
+ return sal_False;
}
StartAllAction();
StartUndo( UNDO_INSATTR );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj);
@@ -2544,15 +2555,15 @@ BOOL SwFEShell::SetObjAttr( const SfxItemSet& rSet )
EndUndo( UNDO_INSATTR );
EndAllActionAndCall();
GetDoc()->SetModified();
- return TRUE;
+ return sal_True;
}
-BOOL SwFEShell::IsAlignPossible() const
+sal_Bool SwFEShell::IsAlignPossible() const
{
- USHORT nCnt;
+ sal_uInt16 nCnt;
if ( 0 < (nCnt = IsObjSelected()) )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if ( nCnt == 1 )
{
SdrObject *pO = Imp()->GetDrawView()->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
@@ -2563,7 +2574,7 @@ BOOL SwFEShell::IsAlignPossible() const
if ( bRet )
return Imp()->GetDrawView()->IsAlignPossible();
}
- return FALSE;
+ return sal_False;
}
@@ -2573,7 +2584,7 @@ void SwFEShell::CheckUnboundObjects()
SET_CURR_SHELL( this );
const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList();
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
if ( !GetUserCall(pObj) )
@@ -2594,14 +2605,14 @@ void SwFEShell::CheckUnboundObjects()
//Fremde Identifier sollen in den Default laufen.
//Ueberschneidungen sind moeglich!!
- UINT16 nIdent =
+ sal_uInt16 nIdent =
Imp()->GetDrawView()->GetCurrentObjInventor() == SdrInventor ?
Imp()->GetDrawView()->GetCurrentObjIdentifier() : 0xFFFF;
SwFmtAnchor aAnch;
const SwFrm *pAnch = 0;
{
- pAnch = ::FindAnchor( pPage, aPt, TRUE );
+ pAnch = ::FindAnchor( pPage, aPt, sal_True );
SwPosition aPos( *((SwCntntFrm*)pAnch)->GetNode() );
aAnch.SetType( FLY_AT_PARA );
aAnch.SetAnchor( &aPos );
@@ -2661,7 +2672,7 @@ int SwFEShell::Chainable( SwRect &rRect, const SwFrmFmt &rSource,
SdrObject* pObj;
SdrPageView* pPView;
SwDrawView *pDView = (SwDrawView*)Imp()->GetDrawView();
- const USHORT nOld = pDView->GetHitTolerancePixel();
+ const sal_uInt16 nOld = pDView->GetHitTolerancePixel();
pDView->SetHitTolerancePixel( 0 );
if( pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SDRSEARCH_PICKMARKABLE ) &&
pObj->ISA(SwVirtFlyDrawObj) )
@@ -2694,7 +2705,7 @@ int SwFEShell::Chain( SwFrmFmt &rSource, const Point &rPt )
SdrObject* pObj;
SdrPageView* pPView;
SwDrawView *pDView = (SwDrawView*)Imp()->GetDrawView();
- const USHORT nOld = pDView->GetHitTolerancePixel();
+ const sal_uInt16 nOld = pDView->GetHitTolerancePixel();
pDView->SetHitTolerancePixel( 0 );
pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SDRSEARCH_PICKMARKABLE );
pDView->SetHitTolerancePixel( nOld );
@@ -2732,15 +2743,15 @@ void SwFEShell::HideChainMarker()
void SwFEShell::SetChainMarker()
{
- BOOL bDelFrom = TRUE,
- bDelTo = TRUE;
+ sal_Bool bDelFrom = sal_True,
+ bDelTo = sal_True;
if ( IsFrmSelected() )
{
SwFlyFrm *pFly = FindFlyFrm();
if ( pFly->GetPrevLink() )
{
- bDelFrom = FALSE;
+ bDelFrom = sal_False;
const SwFrm *pPre = pFly->GetPrevLink();
Point aStart( pPre->Frm().Right(), pPre->Frm().Bottom());
@@ -2753,7 +2764,7 @@ void SwFEShell::SetChainMarker()
}
if ( pFly->GetNextLink() )
{
- bDelTo = FALSE;
+ bDelTo = sal_False;
const SwFlyFrm *pNxt = pFly->GetNextLink();
Point aStart( pFly->Frm().Right(), pFly->Frm().Bottom());
@@ -2809,8 +2820,8 @@ long SwFEShell::GetSectionWidth( SwFmt& rFmt ) const
return 0;
}
-void SwFEShell::CreateDefaultShape( UINT16 eSdrObjectKind, const Rectangle& rRect,
- USHORT nSlotId)
+ void SwFEShell::CreateDefaultShape( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect,
+ sal_uInt16 nSlotId)
{
SdrView* pDrawView = GetDrawView();
SdrModel* pDrawModel = pDrawView->GetModel();
@@ -2938,7 +2949,7 @@ void SwFEShell::CreateDefaultShape( UINT16 eSdrObjectKind, const Rectangle& rRec
}
else if(pObj->ISA(SdrCaptionObj))
{
- BOOL bVerticalText = ( SID_DRAW_TEXT_VERTICAL == nSlotId ||
+ sal_Bool bVerticalText = ( SID_DRAW_TEXT_VERTICAL == nSlotId ||
SID_DRAW_CAPTION_VERTICAL == nSlotId );
((SdrTextObj*)pObj)->SetVerticalWriting(bVerticalText);
if(bVerticalText)
@@ -2966,8 +2977,8 @@ void SwFEShell::CreateDefaultShape( UINT16 eSdrObjectKind, const Rectangle& rRec
if(bVertical)
{
SfxItemSet aSet(pDrawModel->GetItemPool());
- aSet.Put(SdrTextAutoGrowWidthItem(TRUE));
- aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_True));
+ aSet.Put(SdrTextAutoGrowHeightItem(sal_False));
aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP));
aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT));
pText->SetMergedItemSet(aSet);
@@ -2976,12 +2987,12 @@ void SwFEShell::CreateDefaultShape( UINT16 eSdrObjectKind, const Rectangle& rRec
if(bMarquee)
{
SfxItemSet aSet(pDrawModel->GetItemPool(), SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST);
- aSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
- aSet.Put( SdrTextAutoGrowHeightItem( FALSE ) );
+ aSet.Put( SdrTextAutoGrowWidthItem( sal_False ) );
+ aSet.Put( SdrTextAutoGrowHeightItem( sal_False ) );
aSet.Put( SdrTextAniKindItem( SDRTEXTANI_SLIDE ) );
aSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) );
aSet.Put( SdrTextAniCountItem( 1 ) );
- aSet.Put( SdrTextAniAmountItem( (INT16)GetWin()->PixelToLogic(Size(2,1)).Width()) );
+ aSet.Put( SdrTextAniAmountItem( (sal_Int16)GetWin()->PixelToLogic(Size(2,1)).Width()) );
pObj->SetMergedItemSetAndBroadcast(aSet);
}
}
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 40b4080cc207..6f90a7b74987 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -79,8 +79,8 @@ using namespace ::com::sun::star;
//siehe auch swtable.cxx
#define COLFUZZY 20L
-inline BOOL IsSame( long nA, long nB ) { return Abs(nA-nB) <= COLFUZZY; }
-inline BOOL IsNear( long nA, long nB, long nTolerance ) { return Abs( nA - nB ) <= nTolerance; }
+inline sal_Bool IsSame( long nA, long nB ) { return Abs(nA-nB) <= COLFUZZY; }
+inline sal_Bool IsNear( long nA, long nB, long nTolerance ) { return Abs( nA - nB ) <= nTolerance; }
// table column cache
SwTabCols *pLastCols = 0;
@@ -99,17 +99,17 @@ class TblWait
{
SwWait *pWait;
public:
- TblWait( USHORT nCnt, SwFrm *pFrm, SwDocShell &rDocShell, USHORT nCnt2 = 0);
+ TblWait( sal_uInt16 nCnt, SwFrm *pFrm, SwDocShell &rDocShell, sal_uInt16 nCnt2 = 0);
~TblWait() { delete pWait; }
};
-TblWait::TblWait( USHORT nCnt, SwFrm *pFrm, SwDocShell &rDocShell, USHORT nCnt2):
+TblWait::TblWait( sal_uInt16 nCnt, SwFrm *pFrm, SwDocShell &rDocShell, sal_uInt16 nCnt2):
pWait( 0 )
{
- BOOL bWait = 20 < nCnt || 20 < nCnt2 || (pFrm &&
+ sal_Bool bWait = 20 < nCnt || 20 < nCnt2 || (pFrm &&
20 < pFrm->ImplFindTabFrm()->GetTable()->GetTabLines().Count());
if( bWait )
- pWait = new SwWait( rDocShell, TRUE );
+ pWait = new SwWait( rDocShell, sal_True );
}
@@ -202,18 +202,18 @@ void SwFEShell::ParkCursorInTab()
#* Class : SwFEShell
#* Methoden : InsertRow(), InsertCol
#***********************************************************************/
-BOOL SwFEShell::InsertRow( USHORT nCnt, BOOL bBehind )
+sal_Bool SwFEShell::InsertRow( sal_uInt16 nCnt, sal_Bool bBehind )
{
// pruefe ob vom aktuellen Crsr der Point/Mark in einer Tabelle stehen
SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable ))
{
ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR,
ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK );
- return FALSE;
+ return sal_False;
}
SET_CURR_SHELL( this );
@@ -225,7 +225,7 @@ BOOL SwFEShell::InsertRow( USHORT nCnt, BOOL bBehind )
TblWait( nCnt, pFrm, *GetDoc()->GetDocShell(), aBoxes.Count() );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( aBoxes.Count() )
bRet = GetDoc()->InsertRow( aBoxes, nCnt, bBehind );
@@ -233,18 +233,18 @@ BOOL SwFEShell::InsertRow( USHORT nCnt, BOOL bBehind )
return bRet;
}
-BOOL SwFEShell::InsertCol( USHORT nCnt, BOOL bBehind )
+sal_Bool SwFEShell::InsertCol( sal_uInt16 nCnt, sal_Bool bBehind )
{
// pruefe ob vom aktuellen Crsr der Point/Mark in einer Tabelle stehen
SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable ))
{
ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR,
ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK );
- return FALSE;
+ return sal_False;
}
SET_CURR_SHELL( this );
@@ -253,7 +253,7 @@ BOOL SwFEShell::InsertCol( USHORT nCnt, BOOL bBehind )
{
ErrorHandler::HandleError( ERR_TBLINSCOL_ERROR,
ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK );
- return FALSE;
+ return sal_False;
}
StartAllAction();
@@ -263,7 +263,7 @@ BOOL SwFEShell::InsertCol( USHORT nCnt, BOOL bBehind )
TblWait( nCnt, pFrm, *GetDoc()->GetDocShell(), aBoxes.Count() );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( aBoxes.Count() )
bRet = GetDoc()->InsertCol( aBoxes, nCnt, bBehind );
@@ -279,11 +279,11 @@ BOOL SwFEShell::InsertCol( USHORT nCnt, BOOL bBehind )
/**
Determines if the current cursor is in the last row of the table.
*/
-BOOL SwFEShell::IsLastCellInRow() const
+sal_Bool SwFEShell::IsLastCellInRow() const
{
SwTabCols aTabCols;
GetTabCols( aTabCols );
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
if (IsTableRightToLeft())
/* If the table is right-to-left the last row is the most left one. */
@@ -295,25 +295,25 @@ BOOL SwFEShell::IsLastCellInRow() const
return bResult;
}
-BOOL SwFEShell::DeleteCol()
+sal_Bool SwFEShell::DeleteCol()
{
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable ))
{
ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR,
ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK );
- return FALSE;
+ return sal_False;
}
SET_CURR_SHELL( this );
StartAllAction();
// lasse ueber das Layout die Boxen suchen
- BOOL bRet;
+ sal_Bool bRet;
SwSelBoxes aBoxes;
GetTblSel( *this, aBoxes, nsSwTblSearchType::TBLSEARCH_COL );
if ( aBoxes.Count() )
@@ -335,31 +335,31 @@ BOOL SwFEShell::DeleteCol()
}
else
- bRet = FALSE;
+ bRet = sal_False;
EndAllActionAndCall();
return bRet;
}
-BOOL SwFEShell::DeleteRow()
+sal_Bool SwFEShell::DeleteRow()
{
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable ))
{
ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR,
ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK );
- return FALSE;
+ return sal_False;
}
SET_CURR_SHELL( this );
StartAllAction();
// lasse ueber das Layout die Boxen suchen
- BOOL bRet;
+ sal_Bool bRet;
SwSelBoxes aBoxes;
GetTblSel( *this, aBoxes, nsSwTblSearchType::TBLSEARCH_ROW );
@@ -385,7 +385,7 @@ BOOL SwFEShell::DeleteRow()
if( !aFndBox.GetLines().Count() )
{
EndAllActionAndCall();
- return FALSE;
+ return sal_False;
}
KillPams();
@@ -411,7 +411,7 @@ BOOL SwFEShell::DeleteRow()
pDelBox = pLn->GetTabBoxes()[ pLn->GetTabBoxes().Count() - 1 ];
}
SwTableBox* pNextBox = pDelLine->FindNextBox( pTblNd->GetTable(),
- pDelBox, TRUE );
+ pDelBox, sal_True );
while( pNextBox &&
pNextBox->GetFrmFmt()->GetProtect().IsCntntProtected() )
pNextBox = pNextBox->FindNextBox( pTblNd->GetTable(), pNextBox );
@@ -423,13 +423,13 @@ BOOL SwFEShell::DeleteRow()
while( !pDelBox->GetSttNd() )
pDelBox = pDelBox->GetTabLines()[0]->GetTabBoxes()[0];
pNextBox = pDelLine->FindPreviousBox( pTblNd->GetTable(),
- pDelBox, TRUE );
+ pDelBox, sal_True );
while( pNextBox &&
pNextBox->GetFrmFmt()->GetProtect().IsCntntProtected() )
pNextBox = pNextBox->FindPreviousBox( pTblNd->GetTable(), pNextBox );
}
- ULONG nIdx;
+ sal_uLong nIdx;
if( pNextBox ) // dann den Cursor hier hinein
nIdx = pNextBox->GetSttIdx() + 1;
else // ansonsten hinter die Tabelle
@@ -456,7 +456,7 @@ BOOL SwFEShell::DeleteRow()
EndUndo(UNDO_ROW_DELETE);
}
else
- bRet = FALSE;
+ bRet = sal_False;
EndAllActionAndCall();
return bRet;
@@ -467,10 +467,10 @@ BOOL SwFEShell::DeleteRow()
#* Methoden : MergeTab(), SplitTab()
#***********************************************************************/
-USHORT SwFEShell::MergeTab()
+sal_uInt16 SwFEShell::MergeTab()
{
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
- USHORT nRet = TBLMERGE_NOSELECTION;
+ sal_uInt16 nRet = TBLMERGE_NOSELECTION;
if( IsTableMode() )
{
SwShellTableCrsr* pTableCrsr = GetTableCrsr();
@@ -498,18 +498,18 @@ USHORT SwFEShell::MergeTab()
return nRet;
}
-BOOL SwFEShell::SplitTab( BOOL bVert, USHORT nCnt, BOOL bSameHeight )
+sal_Bool SwFEShell::SplitTab( sal_Bool bVert, sal_uInt16 nCnt, sal_Bool bSameHeight )
{
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable ))
{
ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR,
ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK );
- return FALSE;
+ return sal_False;
}
SET_CURR_SHELL( this );
@@ -518,11 +518,11 @@ BOOL SwFEShell::SplitTab( BOOL bVert, USHORT nCnt, BOOL bSameHeight )
{
ErrorHandler::HandleError( ERR_TBLSPLIT_ERROR,
ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK );
- return FALSE;
+ return sal_False;
}
StartAllAction();
// lasse ueber das Layout die Boxen suchen
- BOOL bRet;
+ sal_Bool bRet;
SwSelBoxes aBoxes;
GetTblSel( *this, aBoxes );
if( aBoxes.Count() )
@@ -536,7 +536,7 @@ BOOL SwFEShell::SplitTab( BOOL bVert, USHORT nCnt, BOOL bSameHeight )
DELETEZ( pLastRows );
}
else
- bRet = FALSE;
+ bRet = sal_False;
EndAllActionAndCall();
return bRet;
}
@@ -552,16 +552,16 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const
if ( pLastCols )
{
//Paar Kleinigkeiten muessen wir schon noch sicherstellen
- BOOL bDel = TRUE;
+ sal_Bool bDel = sal_True;
if ( pColumnCacheLastTable == pTab->GetTable() )
{
- bDel = FALSE;
+ bDel = sal_False;
SWRECTFN( pTab )
const SwPageFrm* pPage = pTab->FindPageFrm();
- const ULONG nLeftMin = (pTab->Frm().*fnRect->fnGetLeft)() -
+ const sal_uLong nLeftMin = (pTab->Frm().*fnRect->fnGetLeft)() -
(pPage->Frm().*fnRect->fnGetLeft)();
- const ULONG nRightMax = (pTab->Frm().*fnRect->fnGetRight)() -
+ const sal_uLong nRightMax = (pTab->Frm().*fnRect->fnGetRight)() -
(pPage->Frm().*fnRect->fnGetLeft)();
if ( pColumnCacheLastTabFrm != pTab )
@@ -577,25 +577,25 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const
pColumnCacheLastTabFrm = pTab;
}
else
- bDel = TRUE;
+ bDel = sal_True;
}
if ( !bDel &&
- pLastCols->GetLeftMin () == (USHORT)nLeftMin &&
- pLastCols->GetLeft () == (USHORT)(pTab->Prt().*fnRect->fnGetLeft)() &&
- pLastCols->GetRight () == (USHORT)(pTab->Prt().*fnRect->fnGetRight)()&&
- pLastCols->GetRightMax() == (USHORT)nRightMax - pLastCols->GetLeftMin() )
+ pLastCols->GetLeftMin () == (sal_uInt16)nLeftMin &&
+ pLastCols->GetLeft () == (sal_uInt16)(pTab->Prt().*fnRect->fnGetLeft)() &&
+ pLastCols->GetRight () == (sal_uInt16)(pTab->Prt().*fnRect->fnGetRight)()&&
+ pLastCols->GetRightMax() == (sal_uInt16)nRightMax - pLastCols->GetLeftMin() )
{
if ( pColumnCacheLastCellFrm != pBox )
{
pTab->GetTable()->GetTabCols( *pLastCols,
- ((SwCellFrm*)pBox)->GetTabBox(), TRUE);
+ ((SwCellFrm*)pBox)->GetTabBox(), sal_True);
pColumnCacheLastCellFrm = pBox;
}
rToFill = *pLastCols;
}
else
- bDel = TRUE;
+ bDel = sal_True;
}
if ( bDel )
DELETEZ(pLastCols);
@@ -612,7 +612,7 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const
#if OSL_DEBUG_LEVEL > 1
SwTabColsEntry aEntry;
- for ( USHORT i = 0; i < rToFill.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rToFill.Count(); ++i )
{
aEntry = rToFill.GetEntry( i );
(void)aEntry;
@@ -630,10 +630,10 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const
if ( pLastRows )
{
//Paar Kleinigkeiten muessen wir schon noch sicherstellen
- BOOL bDel = TRUE;
+ sal_Bool bDel = sal_True;
if ( pRowCacheLastTable == pTab->GetTable() )
{
- bDel = FALSE;
+ bDel = sal_False;
SWRECTFN( pTab )
const SwPageFrm* pPage = pTab->FindPageFrm();
const long nLeftMin = ( bVert ?
@@ -645,7 +645,7 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const
if ( pRowCacheLastTabFrm != pTab ||
pRowCacheLastCellFrm != pBox )
- bDel = TRUE;
+ bDel = sal_True;
if ( !bDel &&
pLastRows->GetLeftMin () == nLeftMin &&
@@ -656,7 +656,7 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const
rToFill = *pLastRows;
}
else
- bDel = TRUE;
+ bDel = sal_True;
}
if ( bDel )
DELETEZ(pLastRows);
@@ -676,7 +676,7 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const
#* Class : SwFEShell
#* Methoden : SetTabCols(), GetTabCols()
#***********************************************************************/
-void SwFEShell::SetTabCols( const SwTabCols &rNew, BOOL bCurRowOnly )
+void SwFEShell::SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly )
{
SwFrm *pBox = GetCurrFrm();
if( !pBox || !pBox->IsInTab() )
@@ -717,7 +717,7 @@ void SwFEShell::GetTabRows( SwTabCols &rToFill ) const
_GetTabRows( rToFill, pFrm );
}
-void SwFEShell::SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly )
+void SwFEShell::SetTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly )
{
SwFrm *pBox = GetCurrFrm();
if( !pBox || !pBox->IsInTab() )
@@ -741,7 +741,7 @@ void SwFEShell::GetMouseTabRows( SwTabCols &rToFill, const Point &rPt ) const
_GetTabRows( rToFill, pBox );
}
-void SwFEShell::SetMouseTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const Point &rPt )
+void SwFEShell::SetMouseTabRows( const SwTabCols &rNew, sal_Bool bCurColOnly, const Point &rPt )
{
const SwFrm *pBox = GetBox( rPt );
if( pBox )
@@ -793,12 +793,12 @@ void SwFEShell::GetRowHeight( SwFmtFrmSize *& rpSz ) const
GetDoc()->GetRowHeight( *getShellCrsr( false ), rpSz );
}
-BOOL SwFEShell::BalanceRowHeight( BOOL bTstOnly )
+sal_Bool SwFEShell::BalanceRowHeight( sal_Bool bTstOnly )
{
SET_CURR_SHELL( this );
if( !bTstOnly )
StartAllAction();
- BOOL bRet = GetDoc()->BalanceRowHeight( *getShellCrsr( false ), bTstOnly );
+ sal_Bool bRet = GetDoc()->BalanceRowHeight( *getShellCrsr( false ), bTstOnly );
if( !bTstOnly )
EndAllActionAndCall();
return bRet;
@@ -818,7 +818,7 @@ void SwFEShell::SetRowBackground( const SvxBrushItem &rNew )
/******************************************************************************
* SwTwips SwFEShell::GetRowBackground() const
******************************************************************************/
-BOOL SwFEShell::GetRowBackground( SvxBrushItem &rToFill ) const
+sal_Bool SwFEShell::GetRowBackground( SvxBrushItem &rToFill ) const
{
return GetDoc()->GetRowBackground( *getShellCrsr( false ), rToFill );
}
@@ -836,7 +836,7 @@ void SwFEShell::SetTabBorders( const SfxItemSet& rSet )
EndAllActionAndCall();
}
-void SwFEShell::SetTabLineStyle( const Color* pColor, BOOL bSetLine,
+void SwFEShell::SetTabLineStyle( const Color* pColor, sal_Bool bSetLine,
const SvxBorderLine* pBorderLine )
{
SET_CURR_SHELL( this );
@@ -864,7 +864,7 @@ void SwFEShell::SetBoxBackground( const SvxBrushItem &rNew )
EndAllActionAndCall();
}
-BOOL SwFEShell::GetBoxBackground( SvxBrushItem &rToFill ) const
+sal_Bool SwFEShell::GetBoxBackground( SvxBrushItem &rToFill ) const
{
return GetDoc()->GetBoxAttr( *getShellCrsr( false ), rToFill );
}
@@ -881,7 +881,7 @@ void SwFEShell::SetBoxDirection( const SvxFrameDirectionItem& rNew )
EndAllActionAndCall();
}
-BOOL SwFEShell::GetBoxDirection( SvxFrameDirectionItem& rToFill ) const
+sal_Bool SwFEShell::GetBoxDirection( SvxFrameDirectionItem& rToFill ) const
{
return GetDoc()->GetBoxAttr( *getShellCrsr( false ), rToFill );
}
@@ -890,7 +890,7 @@ BOOL SwFEShell::GetBoxDirection( SvxFrameDirectionItem& rToFill ) const
#* Class : SwFEShell
#* Methoden : SetBoxAlign, SetBoxAlign
#***********************************************************************/
-void SwFEShell::SetBoxAlign( USHORT nAlign )
+void SwFEShell::SetBoxAlign( sal_uInt16 nAlign )
{
SET_CURR_SHELL( this );
StartAllAction();
@@ -898,7 +898,7 @@ void SwFEShell::SetBoxAlign( USHORT nAlign )
EndAllActionAndCall();
}
-USHORT SwFEShell::GetBoxAlign() const
+sal_uInt16 SwFEShell::GetBoxAlign() const
{
return GetDoc()->GetBoxAlign( *getShellCrsr( false ) );
}
@@ -932,7 +932,7 @@ void SwFEShell::GetTabBackground( SvxBrushItem &rToFill ) const
#* Class : SwFEShell
#* Methoden : HasWholeTabSelection()
#***********************************************************************/
-BOOL SwFEShell::HasWholeTabSelection() const
+sal_Bool SwFEShell::HasWholeTabSelection() const
{
//Ist die ganze Tabelle Selektiert?
if ( IsTableMode() )
@@ -948,22 +948,22 @@ BOOL SwFEShell::HasWholeTabSelection() const
== pTblNd->EndOfSectionIndex() );
}
}
- return FALSE;
+ return sal_False;
}
-BOOL SwFEShell::HasBoxSelection() const
+sal_Bool SwFEShell::HasBoxSelection() const
{
if(!IsCrsrInTbl())
- return FALSE;
+ return sal_False;
//Ist die ganze Tabelle Selektiert?
if( IsTableMode() )
- return TRUE;
+ return sal_True;
SwPaM* pPam = GetCrsr();
// empty boxes are also selected as the absence of selection
- BOOL bChg = FALSE;
+ sal_Bool bChg = sal_False;
if( pPam->GetPoint() == pPam->End())
{
- bChg = TRUE;
+ bChg = sal_True;
pPam->Exchange();
}
SwNode* pNd;
@@ -974,7 +974,7 @@ BOOL SwFEShell::HasBoxSelection() const
pNd->EndOfSectionIndex())
{
SwNodeIndex aIdx( *pNd->EndOfSectionNode(), -1 );
- SwCntntNode* pCNd = GetDoc()->GetNodes()[ aIdx ]->GetCntntNode();
+ SwCntntNode* pCNd = aIdx.GetNode().GetCntntNode();
if( !pCNd )
{
pCNd = GetDoc()->GetNodes().GoPrevious( &aIdx );
@@ -984,12 +984,12 @@ BOOL SwFEShell::HasBoxSelection() const
{
if( bChg )
pPam->Exchange();
- return TRUE;
+ return sal_True;
}
}
if( bChg )
pPam->Exchange();
- return FALSE;
+ return sal_False;
}
/***********************************************************************
@@ -999,7 +999,7 @@ BOOL SwFEShell::HasBoxSelection() const
void SwFEShell::ProtectCells()
{
SvxProtectItem aProt( RES_PROTECT );
- aProt.SetCntntProtect( TRUE );
+ aProt.SetCntntProtect( sal_True );
SET_CURR_SHELL( this );
StartAllAction();
@@ -1051,16 +1051,16 @@ void SwFEShell::UnProtectTbls()
EndAllActionAndCall();
}
-BOOL SwFEShell::HasTblAnyProtection( const String* pTblName,
- BOOL* pFullTblProtection )
+sal_Bool SwFEShell::HasTblAnyProtection( const String* pTblName,
+ sal_Bool* pFullTblProtection )
{
return GetDoc()->HasTblAnyProtection( GetCrsr()->GetPoint(), pTblName,
pFullTblProtection );
}
-BOOL SwFEShell::CanUnProtectCells() const
+sal_Bool SwFEShell::CanUnProtectCells() const
{
- BOOL bUnProtectAvailable = FALSE;
+ sal_Bool bUnProtectAvailable = sal_False;
const SwTableNode *pTblNd = IsCrsrInTbl();
if( pTblNd && !pTblNd->IsProtect() )
{
@@ -1089,7 +1089,7 @@ BOOL SwFEShell::CanUnProtectCells() const
#* Class : SwFEShell
#* Methoden : GetRowsToRepeat(), SetRowsToRepeat()
#***********************************************************************/
-USHORT SwFEShell::GetRowsToRepeat() const
+sal_uInt16 SwFEShell::GetRowsToRepeat() const
{
const SwFrm *pFrm = GetCurrFrm();
const SwTabFrm *pTab = pFrm ? pFrm->FindTabFrm() : 0;
@@ -1098,13 +1098,13 @@ USHORT SwFEShell::GetRowsToRepeat() const
return 0;
}
-void SwFEShell::SetRowsToRepeat( USHORT nSet )
+void SwFEShell::SetRowsToRepeat( sal_uInt16 nSet )
{
SwFrm *pFrm = GetCurrFrm();
SwTabFrm *pTab = pFrm ? pFrm->FindTabFrm() : 0;
if( pTab && pTab->GetTable()->GetRowsToRepeat() != nSet )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
SET_CURR_SHELL( this );
StartAllAction();
GetDoc()->SetRowsToRepeat( *pTab->GetTable(), nSet );
@@ -1114,15 +1114,15 @@ void SwFEShell::SetRowsToRepeat( USHORT nSet )
/*-------------------------------------------------------------------------
returns the number of rows consecutively selected from top
-----------------------------------------------------------------------*/
-USHORT lcl_GetRowNumber( const SwPosition& rPos )
+sal_uInt16 lcl_GetRowNumber( const SwPosition& rPos )
{
- USHORT nRet = USHRT_MAX;
+ sal_uInt16 nRet = USHRT_MAX;
Point aTmpPt;
const SwCntntNode *pNd;
const SwCntntFrm *pFrm;
if( 0 != ( pNd = rPos.nNode.GetNode().GetCntntNode() ))
- pFrm = pNd->GetFrm( &aTmpPt, &rPos, FALSE );
+ pFrm = pNd->GetFrm( &aTmpPt, &rPos, sal_False );
else
pFrm = 0;
@@ -1135,7 +1135,7 @@ USHORT lcl_GetRowNumber( const SwPosition& rPos )
const SwTabFrm* pTabFrm = (const SwTabFrm*)pRow->GetUpper();
const SwTableLine* pTabLine = static_cast<const SwRowFrm*>(pRow)->GetTabLine();
- USHORT nI = 0;
+ sal_uInt16 nI = 0;
while ( nI < pTabFrm->GetTable()->GetTabLines().Count() )
{
if ( pTabFrm->GetTable()->GetTabLines()[ nI ] == pTabLine )
@@ -1149,11 +1149,11 @@ USHORT lcl_GetRowNumber( const SwPosition& rPos )
return nRet;
}
-USHORT SwFEShell::GetRowSelectionFromTop() const
+sal_uInt16 SwFEShell::GetRowSelectionFromTop() const
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
const SwPaM* pPaM = IsTableMode() ? GetTableCrsr() : _GetCrsr();
- const USHORT nPtLine = lcl_GetRowNumber( *pPaM->GetPoint() );
+ const sal_uInt16 nPtLine = lcl_GetRowNumber( *pPaM->GetPoint() );
if ( !IsTableMode() )
{
@@ -1161,7 +1161,7 @@ USHORT SwFEShell::GetRowSelectionFromTop() const
}
else
{
- const USHORT nMkLine = lcl_GetRowNumber( *pPaM->GetMark() );
+ const sal_uInt16 nMkLine = lcl_GetRowNumber( *pPaM->GetMark() );
if ( ( nPtLine == 0 && nMkLine != USHRT_MAX ) ||
( nMkLine == 0 && nPtLine != USHRT_MAX ) )
@@ -1182,9 +1182,9 @@ USHORT SwFEShell::GetRowSelectionFromTop() const
* returns true if the current frame is localed inside a table headline OR
* inside the first line of a table!!!
*/
-BOOL SwFEShell::CheckHeadline( bool bRepeat ) const
+sal_Bool SwFEShell::CheckHeadline( bool bRepeat ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( !IsTableMode() )
{
SwFrm *pFrm = GetCurrFrm(); // DONE MULTIIHEADER
@@ -1210,7 +1210,7 @@ BOOL SwFEShell::CheckHeadline( bool bRepeat ) const
#* Methoden : AdjustCellWidth()
#***********************************************************************/
-void SwFEShell::AdjustCellWidth( BOOL bBalance )
+void SwFEShell::AdjustCellWidth( sal_Bool bBalance )
{
SET_CURR_SHELL( this );
StartAllAction();
@@ -1223,14 +1223,14 @@ void SwFEShell::AdjustCellWidth( BOOL bBalance )
EndAllActionAndCall();
}
-BOOL SwFEShell::IsAdjustCellWidthAllowed( BOOL bBalance ) const
+sal_Bool SwFEShell::IsAdjustCellWidthAllowed( sal_Bool bBalance ) const
{
//Es muss mindestens eine Zelle mit Inhalt in der Selektion enthalten
//sein.
SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
SwSelBoxes aBoxes;
::GetTblSelCrs( *this, aBoxes );
@@ -1247,7 +1247,7 @@ BOOL SwFEShell::IsAdjustCellWidthAllowed( BOOL bBalance ) const
aBoxes.Insert( pBox );
}
- for ( USHORT i = 0; i < aBoxes.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aBoxes.Count(); ++i )
{
SwTableBox *pBox = aBoxes[i];
if ( pBox->GetSttNd() )
@@ -1260,21 +1260,21 @@ BOOL SwFEShell::IsAdjustCellWidthAllowed( BOOL bBalance ) const
while ( pCNd )
{
if ( pCNd->GetTxt().Len() )
- return TRUE;
+ return sal_True;
++aIdx;
- pCNd = GetDoc()->GetNodes()[ aIdx ]->GetTxtNode();
+ pCNd = aIdx.GetNode().GetTxtNode();
}
}
}
- return FALSE;
+ return sal_False;
}
// AutoFormat fuer die Tabelle/TabellenSelection
-BOOL SwFEShell::SetTableAutoFmt( const SwTableAutoFmt& rNew )
+sal_Bool SwFEShell::SetTableAutoFmt( const SwTableAutoFmt& rNew )
{
SwTableNode *pTblNd = (SwTableNode*)IsCrsrInTbl();
if( !pTblNd || pTblNd->GetTable().IsTblComplex() )
- return FALSE;
+ return sal_False;
SwSelBoxes aBoxes;
@@ -1287,14 +1287,14 @@ BOOL SwFEShell::SetTableAutoFmt( const SwTableAutoFmt& rNew )
else
{
const SwTableSortBoxes& rTBoxes = pTblNd->GetTable().GetTabSortBoxes();
- for( USHORT n = 0; n < rTBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTBoxes.Count(); ++n )
{
SwTableBox* pBox = rTBoxes[ n ];
aBoxes.Insert( pBox );
}
}
- BOOL bRet;
+ sal_Bool bRet;
if( aBoxes.Count() )
{
SET_CURR_SHELL( this );
@@ -1305,15 +1305,15 @@ BOOL SwFEShell::SetTableAutoFmt( const SwTableAutoFmt& rNew )
EndAllActionAndCall();
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
-BOOL SwFEShell::GetTableAutoFmt( SwTableAutoFmt& rGet )
+sal_Bool SwFEShell::GetTableAutoFmt( SwTableAutoFmt& rGet )
{
const SwTableNode *pTblNd = IsCrsrInTbl();
if( !pTblNd || pTblNd->GetTable().IsTblComplex() )
- return FALSE;
+ return sal_False;
SwSelBoxes aBoxes;
@@ -1326,7 +1326,7 @@ BOOL SwFEShell::GetTableAutoFmt( SwTableAutoFmt& rGet )
else
{
const SwTableSortBoxes& rTBoxes = pTblNd->GetTable().GetTabSortBoxes();
- for( USHORT n = 0; n < rTBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTBoxes.Count(); ++n )
{
SwTableBox* pBox = rTBoxes[ n ];
aBoxes.Insert( pBox );
@@ -1340,25 +1340,25 @@ BOOL SwFEShell::GetTableAutoFmt( SwTableAutoFmt& rGet )
#* Class : SwFEShell
#* Methoden : DeleteTblSel()
#***********************************************************************/
-BOOL SwFEShell::DeleteTblSel()
+sal_Bool SwFEShell::DeleteTblSel()
{
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
if( pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable ))
{
ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR,
ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK );
- return FALSE;
+ return sal_False;
}
SET_CURR_SHELL( this );
StartAllAction();
// lasse ueber das Layout die Boxen suchen
- BOOL bRet;
+ sal_Bool bRet;
SwSelBoxes aBoxes;
GetTblSelCrs( *this, aBoxes );
if( aBoxes.Count() )
@@ -1378,7 +1378,7 @@ BOOL SwFEShell::DeleteTblSel()
DELETEZ( pLastRows );
}
else
- bRet = FALSE;
+ bRet = sal_False;
EndAllActionAndCall();
return bRet;
}
@@ -1388,10 +1388,10 @@ BOOL SwFEShell::DeleteTblSel()
|* SwFEShell::GetCurTabColNum()
|*
|*************************************************************************/
-USHORT SwFEShell::GetCurTabColNum() const
+sal_uInt16 SwFEShell::GetCurTabColNum() const
{
//!!!GetCurMouseTabColNum() mitpflegen!!!!
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
SwFrm *pFrm = GetCurrFrm();
OSL_ENSURE( pFrm, "Crsr geparkt?" );
@@ -1420,7 +1420,7 @@ USHORT SwFEShell::GetCurTabColNum() const
if ( !::IsSame( nX, nRight ) )
{
nX = nRight - nX + aTabCols.GetLeft();
- for ( USHORT i = 0; i < aTabCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aTabCols.Count(); ++i )
if ( ::IsSame( nX, aTabCols[i] ) )
{
nRet = i + 1;
@@ -1437,7 +1437,7 @@ USHORT SwFEShell::GetCurTabColNum() const
if ( !::IsSame( nX, nLeft + aTabCols.GetLeft() ) )
{
- for ( USHORT i = 0; i < aTabCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aTabCols.Count(); ++i )
if ( ::IsSame( nX, nLeft + aTabCols[i] ) )
{
nRet = i + 1;
@@ -1701,7 +1701,7 @@ const SwFrm* SwFEShell::GetBox( const Point &rPt, bool* pbRow, bool* pbCol ) con
//Erst die Flys checken.
if ( pPage->GetSortedObjs() )
{
- for ( USHORT i = 0; !pFrm && i < pPage->GetSortedObjs()->Count(); ++i )
+ for ( sal_uInt16 i = 0; !pFrm && i < pPage->GetSortedObjs()->Count(); ++i )
{
SwAnchoredObject* pObj = (*pPage->GetSortedObjs())[i];
if ( pObj->ISA(SwFlyFrm) )
@@ -1860,7 +1860,7 @@ bool SwFEShell::SelTblRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag
bool pbCol[2] = { 0, 0 };
// pEnd is set during dragging.
- for ( USHORT i = 0; i < ( pEnd ? 2 : 1 ); ++i )
+ for ( sal_uInt16 i = 0; i < ( pEnd ? 2 : 1 ); ++i )
{
const SwCellFrm* pFrm =
static_cast<const SwCellFrm*>(GetBox( paPt[i], &pbRow[i], &pbCol[i] ) );
@@ -1912,7 +1912,7 @@ bool SwFEShell::SelTblRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag
*pCrsr->GetPoint() = *ppPos[0];
pCrsr->GetPtPos() = paPt[0];
- if ( !pCrsr->IsInProtectTable( FALSE, TRUE ) )
+ if ( !pCrsr->IsInProtectTable( sal_False, sal_True ) )
{
bool bNewSelection = true;
@@ -1926,7 +1926,7 @@ bool SwFEShell::SelTblRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag
*pCrsr->GetPoint() = *ppPos[1];
pCrsr->GetPtPos() = paPt[1];
- if ( pCrsr->IsInProtectTable( FALSE, FALSE ) )
+ if ( pCrsr->IsInProtectTable( sal_False, sal_False ) )
{
pCrsr->RestoreSavePos();
bNewSelection = false;
@@ -1972,9 +1972,9 @@ bool SwFEShell::SelTblRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag
|* SwFEShell::WhichMouseTabCol()
|*
|*************************************************************************/
-BYTE SwFEShell::WhichMouseTabCol( const Point &rPt ) const
+sal_uInt8 SwFEShell::WhichMouseTabCol( const Point &rPt ) const
{
- BYTE nRet = SW_TABCOL_NONE;
+ sal_uInt8 nRet = SW_TABCOL_NONE;
bool bRow = false;
bool bCol = false;
bool bSelect = false;
@@ -2064,9 +2064,9 @@ SwTxtNode * SwFEShell::GetNumRuleNodeAtPos( const Point &rPt)
return pResult;
}
-BOOL SwFEShell::IsNumLabel( const Point &rPt, int nMaxOffset )
+sal_Bool SwFEShell::IsNumLabel( const Point &rPt, int nMaxOffset )
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
SwContentAtPos aCntntAtPos
(SwContentAtPos::SW_NUMLABEL);
@@ -2075,7 +2075,7 @@ BOOL SwFEShell::IsNumLabel( const Point &rPt, int nMaxOffset )
{
if ((nMaxOffset >= 0 && aCntntAtPos.nDist <= nMaxOffset) ||
(nMaxOffset < 0))
- bResult = TRUE;
+ bResult = sal_True;
}
return bResult;
@@ -2123,7 +2123,7 @@ void SwFEShell::GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const
_GetTabCols( rToFill, pBox );
}
-void SwFEShell::SetMouseTabCols( const SwTabCols &rNew, BOOL bCurRowOnly,
+void SwFEShell::SetMouseTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly,
const Point &rPt )
{
const SwFrm *pBox = GetBox( rPt );
@@ -2141,16 +2141,16 @@ void SwFEShell::SetMouseTabCols( const SwTabCols &rNew, BOOL bCurRowOnly,
|* SwFEShell::GetMouseColNum(), GetMouseTabColNum()
|*
|*************************************************************************/
-USHORT SwFEShell::GetCurMouseColNum( const Point &rPt,
+sal_uInt16 SwFEShell::GetCurMouseColNum( const Point &rPt,
SwGetCurColNumPara* pPara ) const
{
return _GetCurColNum( GetBox( rPt ), pPara );
}
-USHORT SwFEShell::GetCurMouseTabColNum( const Point &rPt ) const
+sal_uInt16 SwFEShell::GetCurMouseTabColNum( const Point &rPt ) const
{
//!!!GetCurTabColNum() mitpflegen!!!!
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
const SwFrm *pFrm = GetBox( rPt );
OSL_ENSURE( pFrm, "Table not found" );
@@ -2166,7 +2166,7 @@ USHORT SwFEShell::GetCurMouseTabColNum( const Point &rPt ) const
if ( !::IsSame( nX, nLeft + aTabCols.GetLeft() ) )
{
- for ( USHORT i = 0; i < aTabCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aTabCols.Count(); ++i )
if ( ::IsSame( nX, nLeft + aTabCols[i] ) )
{
nRet = i + 1;
@@ -2241,18 +2241,18 @@ bool lcl_GoTableRow( SwCrsrShell* pShell, bool bUp )
}
// aender eine Zellenbreite/-Hoehe/Spaltenbreite/Zeilenhoehe
-BOOL SwFEShell::SetColRowWidthHeight( USHORT eType, USHORT nDiff )
+sal_Bool SwFEShell::SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff )
{
SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
if( nsTblChgWidthHeightType::WH_FLAG_INSDEL & eType &&
pFrm->ImplFindTabFrm()->GetTable()->ISA( SwDDETable ))
{
ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR,
ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK );
- return FALSE;
+ return sal_False;
}
SET_CURR_SHELL( this );
@@ -2282,7 +2282,7 @@ BOOL SwFEShell::SetColRowWidthHeight( USHORT eType, USHORT nDiff )
if( (eType & (nsTblChgWidthHeightType::WH_FLAG_BIGGER | nsTblChgWidthHeightType::WH_FLAG_INSDEL)) ==
(nsTblChgWidthHeightType::WH_FLAG_BIGGER | nsTblChgWidthHeightType::WH_FLAG_INSDEL) )
{
- nDiff = USHORT((pFrm->Frm().*fnRect->fnGetWidth)());
+ nDiff = sal_uInt16((pFrm->Frm().*fnRect->fnGetWidth)());
// we must move the cursor outside the current cell before
// deleting the cells.
@@ -2312,7 +2312,7 @@ BOOL SwFEShell::SetColRowWidthHeight( USHORT eType, USHORT nDiff )
nLogDiff /= nPrtWidth;
/** The cells are destroyed in here */
- BOOL bRet = GetDoc()->SetColRowWidthHeight(
+ sal_Bool bRet = GetDoc()->SetColRowWidthHeight(
*(SwTableBox*)((SwCellFrm*)pFrm)->GetTabBox(),
eType, nDiff, nLogDiff );
@@ -2348,44 +2348,44 @@ BOOL SwFEShell::SetColRowWidthHeight( USHORT eType, USHORT nDiff )
return bRet;
}
-BOOL lcl_IsFormulaSelBoxes( const SwTable& rTbl, const SwTblBoxFormula& rFml,
+sal_Bool lcl_IsFormulaSelBoxes( const SwTable& rTbl, const SwTblBoxFormula& rFml,
SwCellFrms& rCells )
{
SwTblBoxFormula aTmp( rFml );
SwSelBoxes aBoxes;
- for( USHORT nSelBoxes = aTmp.GetBoxesOfFormula( rTbl,aBoxes ); nSelBoxes; )
+ for( sal_uInt16 nSelBoxes = aTmp.GetBoxesOfFormula( rTbl,aBoxes ); nSelBoxes; )
{
SwTableBox* pBox = aBoxes[ --nSelBoxes ];
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < rCells.Count(); ++i )
if( rCells[ i ]->GetTabBox() == pBox )
break; // gefunden
if( i == rCells.Count() )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// erfrage die Formel fuer die Autosumme
-BOOL SwFEShell::GetAutoSum( String& rFml ) const
+sal_Bool SwFEShell::GetAutoSum( String& rFml ) const
{
SwFrm *pFrm = GetCurrFrm();
SwTabFrm *pTab = pFrm ? pFrm->ImplFindTabFrm() : 0;
if( !pTab )
- return FALSE;
+ return sal_False;
rFml = String::CreateFromAscii( sCalc_Sum );
SwCellFrms aCells;
if( ::GetAutoSumSel( *this, aCells ))
{
- USHORT nW = 0, nInsPos = 0;
- for( USHORT n = aCells.Count(); n; )
+ sal_uInt16 nW = 0, nInsPos = 0;
+ for( sal_uInt16 n = aCells.Count(); n; )
{
SwCellFrm* pCFrm = aCells[ --n ];
- USHORT nBoxW = pCFrm->GetTabBox()->IsFormulaOrValueBox();
+ sal_uInt16 nBoxW = pCFrm->GetTabBox()->IsFormulaOrValueBox();
if( !nBoxW )
break;
@@ -2404,7 +2404,7 @@ BOOL SwFEShell::GetAutoSum( String& rFml ) const
{
nW = RES_BOXATR_VALUE;
// alle vorhierigen Leere wieder mit aufnehmen !
- for( USHORT i = aCells.Count(); n+1 < i; )
+ for( sal_uInt16 i = aCells.Count(); n+1 < i; )
{
String sTmp( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "|<" )) );
@@ -2442,7 +2442,7 @@ BOOL SwFEShell::GetAutoSum( String& rFml ) const
nW = RES_BOXATR_VALUE;
rFml.Erase( nInsPos );
// alle vorhierigen Leere wieder mit aufnehmen !
- for( USHORT i = aCells.Count(); n+1 < i; )
+ for( sal_uInt16 i = aCells.Count(); n+1 < i; )
{
String sTmp( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "|<" )) );
@@ -2475,31 +2475,31 @@ BOOL SwFEShell::GetAutoSum( String& rFml ) const
}
}
- return TRUE;
+ return sal_True;
}
-BOOL SwFEShell::IsTableRightToLeft() const
+sal_Bool SwFEShell::IsTableRightToLeft() const
{
SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
return pFrm->ImplFindTabFrm()->IsRightToLeft();
}
-BOOL SwFEShell::IsMouseTableRightToLeft(const Point &rPt) const
+sal_Bool SwFEShell::IsMouseTableRightToLeft(const Point &rPt) const
{
SwFrm *pFrm = (SwFrm *)GetBox( rPt );
const SwTabFrm* pTabFrm = pFrm ? pFrm->ImplFindTabFrm() : 0;
OSL_ENSURE( pTabFrm, "Table not found" );
- return pTabFrm ? pTabFrm->IsRightToLeft() : FALSE;
+ return pTabFrm ? pTabFrm->IsRightToLeft() : sal_False;
}
-BOOL SwFEShell::IsTableVertical() const
+sal_Bool SwFEShell::IsTableVertical() const
{
SwFrm *pFrm = GetCurrFrm();
if( !pFrm || !pFrm->IsInTab() )
- return FALSE;
+ return sal_False;
return pFrm->ImplFindTabFrm()->IsVertical();
}
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index cc78e2060a9b..f59d728bc8c7 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -92,7 +92,7 @@ void SwFEShell::EndAllActionAndCall()
#* Beschreibung: Ermitteln des Cntnt's der dem Punkt am naechsten liegt
#***********************************************************************/
-Point SwFEShell::GetCntntPos( const Point& rPoint, BOOL bNext ) const
+Point SwFEShell::GetCntntPos( const Point& rPoint, sal_Bool bNext ) const
{
SET_CURR_SHELL( (ViewShell*)this );
return GetLayout()->GetNextPrevCntntPos( rPoint, bNext );
@@ -124,10 +124,10 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt,
if( !pFrm )
return GetLayout()->Frm();
- BOOL bFrm = TRUE;
+ sal_Bool bFrm = sal_True;
switch ( eType )
{
- case RECT_PAGE_PRT: bFrm = FALSE; /* no break */
+ case RECT_PAGE_PRT: bFrm = sal_False; /* no break */
case RECT_PAGE : pFrm = pFrm->FindPageFrm();
break;
@@ -136,7 +136,7 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt,
pFrm->Calc();
break;
- case RECT_FLY_PRT_EMBEDDED: bFrm = FALSE; /* no break */
+ case RECT_FLY_PRT_EMBEDDED: bFrm = sal_False; /* no break */
case RECT_FLY_EMBEDDED: pFrm = xObj.is() ? FindFlyFrm( xObj )
: pFrm->IsFlyFrm()
? pFrm
@@ -147,22 +147,22 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt,
case RECT_OUTTABSECTION : if( pFrm->IsInTab() )
pFrm = pFrm->FindTabFrm();
else {
- OSL_ENSURE( FALSE, "Missing Table" );
+ OSL_ENSURE( sal_False, "Missing Table" );
}
/* KEIN BREAK */
case RECT_SECTION_PRT:
case RECT_SECTION: if( pFrm->IsInSct() )
pFrm = pFrm->FindSctFrm();
else {
- OSL_ENSURE( FALSE, "Missing section" );
+ OSL_ENSURE( sal_False, "Missing section" );
}
if( RECT_OUTTABSECTION_PRT == eType ||
RECT_SECTION_PRT == eType )
- bFrm = FALSE;
+ bFrm = sal_False;
break;
- case RECT_HEADERFOOTER_PRT: bFrm = FALSE; /* no break */
+ case RECT_HEADERFOOTER_PRT: bFrm = sal_False; /* no break */
case RECT_HEADERFOOTER: if( 0 == (pFrm = pFrm->FindFooterOrHeader()) )
return GetLayout()->Frm();
break;
@@ -175,7 +175,7 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt,
}
-USHORT SwFEShell::GetPageNumber( const Point &rPoint ) const
+sal_uInt16 SwFEShell::GetPageNumber( const Point &rPoint ) const
{
const SwFrm *pPage = GetLayout()->Lower();
while ( pPage && !pPage->Frm().IsInside( rPoint ) )
@@ -187,13 +187,13 @@ USHORT SwFEShell::GetPageNumber( const Point &rPoint ) const
}
-BOOL SwFEShell::GetPageNumber( long nYPos, BOOL bAtCrsrPos, USHORT& rPhyNum, USHORT& rVirtNum, String &rDisplay) const
+sal_Bool SwFEShell::GetPageNumber( long nYPos, sal_Bool bAtCrsrPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, String &rDisplay) const
{
const SwFrm *pPage;
if ( bAtCrsrPos ) //Seite vom Crsr besorgen
{
- pPage = GetCurrFrm( FALSE );
+ pPage = GetCurrFrm( sal_False );
if ( pPage )
pPage = pPage->FindPageFrm();
}
@@ -232,7 +232,7 @@ BOOL SwFEShell::GetPageNumber( long nYPos, BOOL bAtCrsrPos, USHORT& rPhyNum, USH
bool SwFEShell::IsDirectlyInSection() const
{
- SwFrm* pFrm = GetCurrFrm( FALSE );
+ SwFrm* pFrm = GetCurrFrm( sal_False );
return pFrm && pFrm->GetUpper() && pFrm->GetUpper()->IsSctFrm();
}
@@ -242,9 +242,9 @@ bool SwFEShell::IsDirectlyInSection() const
|*
*************************************************************************/
-USHORT SwFEShell::GetFrmType( const Point *pPt, BOOL bStopAtFly ) const
+sal_uInt16 SwFEShell::GetFrmType( const Point *pPt, sal_Bool bStopAtFly ) const
{
- USHORT nReturn = FRMTYPE_NONE;
+ sal_uInt16 nReturn = FRMTYPE_NONE;
const SwFrm *pFrm;
if ( pPt )
{
@@ -255,7 +255,7 @@ USHORT SwFEShell::GetFrmType( const Point *pPt, BOOL bStopAtFly ) const
pFrm = pNd->GetFrm( pPt );
}
else
- pFrm = GetCurrFrm( FALSE );
+ pFrm = GetCurrFrm( sal_False );
while ( pFrm )
{
switch ( pFrm->GetType() )
@@ -315,7 +315,7 @@ USHORT SwFEShell::GetFrmType( const Point *pPt, BOOL bStopAtFly ) const
|*
*************************************************************************/
-void SwFEShell::ShGetFcs( BOOL bUpdate )
+void SwFEShell::ShGetFcs( sal_Bool bUpdate )
{
::SetShell( this );
SwCrsrShell::ShGetFcs( bUpdate );
@@ -346,7 +346,7 @@ void SwFEShell::ShLooseFcs()
|*
*************************************************************************/
-USHORT SwFEShell::GetPhyPageNum()
+sal_uInt16 SwFEShell::GetPhyPageNum()
{
SwFrm *pFrm = GetCurrFrm();
if ( pFrm )
@@ -354,7 +354,7 @@ USHORT SwFEShell::GetPhyPageNum()
return 0;
}
-USHORT SwFEShell::GetVirtPageNum( const BOOL bCalcFrm )
+sal_uInt16 SwFEShell::GetVirtPageNum( const sal_Bool bCalcFrm )
{
SwFrm *pFrm = GetCurrFrm( bCalcFrm );
if ( pFrm )
@@ -367,11 +367,11 @@ USHORT SwFEShell::GetVirtPageNum( const BOOL bCalcFrm )
|* void lcl_SetAPageOffset()
|* void SwFEShell::SetNewPageOffset()
|* void SwFEShell::SetPageOffset()
-|* USHORT SwFEShell::GetPageOffset() const
+|* sal_uInt16 SwFEShell::GetPageOffset() const
|*
*************************************************************************/
-void lcl_SetAPageOffset( USHORT nOffset, SwPageFrm* pPage, SwFEShell* pThis )
+void lcl_SetAPageOffset( sal_uInt16 nOffset, SwPageFrm* pPage, SwFEShell* pThis )
{
pThis->StartAllAction();
OSL_ENSURE( pPage->FindFirstBodyCntnt(),
@@ -380,7 +380,7 @@ void lcl_SetAPageOffset( USHORT nOffset, SwPageFrm* pPage, SwFEShell* pThis )
SwFmtPageDesc aDesc( pPage->GetPageDesc() );
aDesc.SetNumOffset( nOffset );
- SwFrm *pFrm = pThis->GetCurrFrm( FALSE );
+ SwFrm *pFrm = pThis->GetCurrFrm( sal_False );
if ( pFrm->IsInTab() )
pThis->GetDoc()->SetAttr( aDesc, *pFrm->FindTabFrm()->GetFmt() );
else
@@ -391,16 +391,16 @@ void lcl_SetAPageOffset( USHORT nOffset, SwPageFrm* pPage, SwFEShell* pThis )
pThis->EndAllAction();
}
-void SwFEShell::SetNewPageOffset( USHORT nOffset )
+void SwFEShell::SetNewPageOffset( sal_uInt16 nOffset )
{
- GetLayout()->SetVirtPageNum( TRUE );
- const SwPageFrm *pPage = GetCurrFrm( FALSE )->FindPageFrm();
+ GetLayout()->SetVirtPageNum( sal_True );
+ const SwPageFrm *pPage = GetCurrFrm( sal_False )->FindPageFrm();
lcl_SetAPageOffset( nOffset, (SwPageFrm*)pPage, this );
}
-void SwFEShell::SetPageOffset( USHORT nOffset )
+void SwFEShell::SetPageOffset( sal_uInt16 nOffset )
{
- const SwPageFrm *pPage = GetCurrFrm( FALSE )->FindPageFrm();
+ const SwPageFrm *pPage = GetCurrFrm( sal_False )->FindPageFrm();
const SwRootFrm* pLayout = GetLayout();
while ( pPage )
{
@@ -412,7 +412,7 @@ void SwFEShell::SetPageOffset( USHORT nOffset )
const SwFmtPageDesc& rPgDesc = pFlow->GetAttrSet()->GetPageDesc();
if ( rPgDesc.GetNumOffset() )
{
- pLayout->SetVirtPageNum( TRUE );
+ pLayout->SetVirtPageNum( sal_True );
lcl_SetAPageOffset( nOffset, (SwPageFrm*)pPage, this );
break;
}
@@ -421,7 +421,7 @@ void SwFEShell::SetPageOffset( USHORT nOffset )
}
}
-USHORT SwFEShell::GetPageOffset() const
+sal_uInt16 SwFEShell::GetPageOffset() const
{
const SwPageFrm *pPage = GetCurrFrm()->FindPageFrm();
while ( pPage )
@@ -431,7 +431,7 @@ USHORT SwFEShell::GetPageOffset() const
{
if ( pFlow->IsInTab() )
pFlow = pFlow->FindTabFrm();
- const USHORT nOffset = pFlow->GetAttrSet()->GetPageDesc().GetNumOffset();
+ const sal_uInt16 nOffset = pFlow->GetAttrSet()->GetPageDesc().GetNumOffset();
if ( nOffset )
return nOffset;
}
@@ -448,18 +448,18 @@ USHORT SwFEShell::GetPageOffset() const
void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator,
const String& rNumberSeparator,
- const BOOL bBefore, const USHORT nId,
+ const sal_Bool bBefore, const sal_uInt16 nId,
const String& rCharacterStyle,
- const BOOL bCpyBrd )
+ const sal_Bool bCpyBrd )
{
//NodeIndex der CrsrPosition besorgen, den Rest kann das Dokument
//selbst erledigen.
- SwCntntFrm *pCnt = LTYPE_DRAW==eType ? 0 : GetCurrFrm( FALSE );
+ SwCntntFrm *pCnt = LTYPE_DRAW==eType ? 0 : GetCurrFrm( sal_False );
if( LTYPE_DRAW==eType || pCnt )
{
StartAllAction();
- ULONG nIdx = 0;
+ sal_uLong nIdx = 0;
SwFlyFrmFmt* pFlyFmt = 0;
switch( eType )
{
@@ -492,7 +492,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const
// local list to perform the corresponding action for each object
std::vector<SdrObject*> aDrawObjs;
{
- for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMrkList.GetMarkCount(); ++i )
{
SdrObject* pDrawObj = rMrkList.GetMark(i)->GetMarkedSdrObj();
aDrawObjs.push_back( pDrawObj );
@@ -528,7 +528,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const
SwFlyFrm* pFrm;
const Point aPt( GetCrsrDocPos() );
if( pFlyFmt && 0 != ( pFrm = pFlyFmt->GetFrm( &aPt )))
- SelectFlyFrm( *pFrm, TRUE );
+ SelectFlyFrm( *pFrm, sal_True );
EndAllActionAndCall();
}
@@ -540,19 +540,19 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const
#* Methoden : Sort
#***********************************************************************/
-BOOL SwFEShell::Sort(const SwSortOptions& rOpt)
+sal_Bool SwFEShell::Sort(const SwSortOptions& rOpt)
{
if( !HasSelection() )
- return FALSE;
+ return sal_False;
SET_CURR_SHELL( this );
- BOOL bRet;
+ sal_Bool bRet;
StartAllAction();
if(IsTableMode())
{
// Tabelle sortieren
// pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
- SwFrm *pFrm = GetCurrFrm( FALSE );
+ SwFrm *pFrm = GetCurrFrm( sal_False );
OSL_ENSURE( pFrm->FindTabFrm(), "Crsr nicht in Tabelle." );
// lasse ueber das Layout die Boxen suchen
@@ -583,7 +583,7 @@ BOOL SwFEShell::Sort(const SwSortOptions& rOpt)
SwPosition* pEnd = pPam->End();
SwNodeIndex aPrevIdx( pStart->nNode, -1 );
- ULONG nOffset = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
+ sal_uLong nOffset = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
xub_StrLen nCntStt = pStart->nContent.GetIndex();
// Das Sortieren
@@ -616,10 +616,10 @@ BOOL SwFEShell::Sort(const SwSortOptions& rOpt)
|*
|*************************************************************************/
-USHORT SwFEShell::_GetCurColNum( const SwFrm *pFrm,
+sal_uInt16 SwFEShell::_GetCurColNum( const SwFrm *pFrm,
SwGetCurColNumPara* pPara ) const
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
while ( pFrm )
{
pFrm = pFrm->GetUpper();
@@ -659,15 +659,15 @@ USHORT SwFEShell::_GetCurColNum( const SwFrm *pFrm,
return nRet;
}
-USHORT SwFEShell::GetCurColNum( SwGetCurColNumPara* pPara ) const
+sal_uInt16 SwFEShell::GetCurColNum( SwGetCurColNumPara* pPara ) const
{
OSL_ENSURE( GetCurrFrm(), "Crsr geparkt?" );
return _GetCurColNum( GetCurrFrm(), pPara );
}
-USHORT SwFEShell::GetCurOutColNum( SwGetCurColNumPara* pPara ) const
+sal_uInt16 SwFEShell::GetCurOutColNum( SwGetCurColNumPara* pPara ) const
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
SwFrm* pFrm = GetCurrFrm();
OSL_ENSURE( pFrm, "Crsr geparkt?" );
if( pFrm )
@@ -683,13 +683,13 @@ USHORT SwFEShell::GetCurOutColNum( SwGetCurColNumPara* pPara ) const
SwFEShell::SwFEShell( SwDoc& rDoc, Window *pWindow, const SwViewOption *pOptions )
: SwEditShell( rDoc, pWindow, pOptions ),
- pChainFrom( 0 ), pChainTo( 0 ), bCheckForOLEInCaption( FALSE )
+ pChainFrom( 0 ), pChainTo( 0 ), bCheckForOLEInCaption( sal_False )
{
}
SwFEShell::SwFEShell( SwEditShell& rShell, Window *pWindow )
: SwEditShell( rShell, pWindow ),
- pChainFrom( 0 ), pChainTo( 0 ), bCheckForOLEInCaption( FALSE )
+ pChainFrom( 0 ), pChainTo( 0 ), bCheckForOLEInCaption( sal_False )
{
}
@@ -741,8 +741,11 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
_bMirror = _bMirror && !pPage->OnRightPage();
Point aPos;
- BOOL bVertic = FALSE;
- BOOL bRTL = FALSE;
+ bool bVertic = false;
+ sal_Bool bRTL = sal_False;
+ // --> OD 2009-09-01 #mongolianlayout#
+ bool bVerticalL2R = false;
+ // <--
if ((FLY_AT_PAGE == _nAnchorId) || (FLY_AT_FLY == _nAnchorId)) // LAYER_IMPL
{
@@ -767,9 +770,14 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
else
aPos = (pFrm->Frm().*fnRect->fnGetPos)();
- if( bVert )
+ // --> OD 2009-09-01 #mongolianlayout#
+ if( bVert || bVertL2R )
+ // <--
{
- bVertic = TRUE;
+ // --> OD 2009-09-01 #mongolianlayout#
+ bVertic = bVert ? true : false;
+ bVerticalL2R = bVertL2R ? true : false;
+ // <--
_bMirror = false; // no mirroring in vertical environment
switch ( _eHoriRelOrient )
{
@@ -818,8 +826,9 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
default:break;
}
}
- // --> OD 2006-12-12 #i67221# - proposed patch
- if( bVert )
+ // --> OD 2009-09-01 #mongolianlayout#
+ if ( bVert && !bVertL2R )
+ // <--
{
switch ( _eVertRelOrient )
{
@@ -831,6 +840,20 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
break;
}
}
+ // --> OD 2009-09-01 #mongolianlayout#
+ else if ( bVertL2R )
+ {
+ switch ( _eVertRelOrient )
+ {
+ case text::RelOrientation::PRINT_AREA:
+ case text::RelOrientation::PAGE_PRINT_AREA:
+ {
+ aPos.X() += pFrm->GetLeftMargin();
+ }
+ break;
+ }
+ }
+ // <--
else
{
switch ( _eVertRelOrient )
@@ -895,10 +918,17 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
// to page areas.
if ( _eVertRelOrient == text::RelOrientation::PAGE_FRAME || _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA )
{
- if ( bVert )
+ // --> OD 2009-09-01 #mongolianlayout#
+ if ( bVert && !bVertL2R )
+ // <--
{
aPos.X() = aVertEnvironRect.Right();
}
+ // --> OD 2009-09-01 #mongolianlayout#
+ else if ( bVertL2R )
+ {
+ aPos.X() = aVertEnvironRect.Left();
+ }
else
{
aPos.Y() = aVertEnvironRect.Top();
@@ -915,7 +945,9 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
// to page areas.
if ( _eVertRelOrient == text::RelOrientation::PAGE_FRAME || _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA )
{
- if ( bVert )
+ // --> OD 2009-09-01 #mongolianlayout#
+ if ( bVert && !bVertL2R )
+ // <--
{
aPos.X() = aVertEnvironRect.Right();
if ( _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA )
@@ -923,6 +955,16 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
aPos.X() -= rVertEnvironLayFrm.GetRightMargin();
}
}
+ // --> OD 2009-09-01 #mongolianlayout#
+ else if ( bVertL2R )
+ {
+ aPos.X() = aVertEnvironRect.Left();
+ if ( _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA )
+ {
+ aPos.X() += rVertEnvironLayFrm.GetLeftMargin();
+ }
+ }
+ // <--
else
{
aPos.Y() = aVertEnvironRect.Top();
@@ -982,10 +1024,12 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
pTxtFrm->GetTopOfLine( nTop, aDefaultCntntPos );
}
}
- if ( bVert )
+ // --> OD 2009-09-01 #mongolianlayout#
+ if ( bVert || bVertL2R )
{
aPos.X() = nTop;
}
+ // <--
else
{
aPos.Y() = nTop;
@@ -1012,10 +1056,12 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
pTxtFrm->GetAutoPos( aChRect, aDefaultCntntPos );
}
nLeft = (aChRect.*fnRect->fnGetLeft)();
- if ( bVert )
+ // --> OD 2009-09-01 #mongolianlayout#
+ if ( bVert || bVertL2R )
{
aPos.Y() = nLeft;
}
+ // <--
else
{
aPos.X() = nLeft;
@@ -1023,7 +1069,9 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
}
// <--
- if ( bVert )
+ // --> OD 2009-09-01 #mongolianlayout#
+ if ( bVert || bVertL2R )
+ // <--
{
_orRect = SwRect( aVertEnvironRect.Left(),
aHoriEnvironRect.Top(),
@@ -1057,7 +1105,9 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
}
// bei zeichengebundenen lieber nur 90% der Hoehe ausnutzen
{
- if( bVert )
+ // --> OD 2009-09-01 #mongolianlayout#
+ if( bVert || bVertL2R )
+ // <--
_orRect.Width( (_orRect.Width()*9)/10 );
else
_orRect.Height( (_orRect.Height()*9)/10 );
@@ -1067,26 +1117,51 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
const SwTwips nBaseOfstForFly = ( pFrm->IsTxtFrm() && pFly ) ?
((SwTxtFrm*)pFrm)->GetBaseOfstForFly( !bWrapThrough ) :
0;
- if( bVert )
+ // --> OD 2009-09-01 #mongolianlayout#
+ if( bVert || bVertL2R )
+ // <--
{
- bVertic = TRUE;
+ // --> OD 2009-09-01 #mongolianlayout#
+ bVertic = bVert ? true : false;
+ bVerticalL2R = bVertL2R ? true : false;
+ // <--
_bMirror = false;
switch ( _eHoriRelOrient )
{
- case text::RelOrientation::FRAME_RIGHT: aPos.Y() += pFrm->Prt().Height();
- aPos += (pFrm->Prt().*fnRect->fnGetPos)();
- break;
- case text::RelOrientation::PRINT_AREA: aPos += (pFrm->Prt().*fnRect->fnGetPos)();
- aPos.Y() += nBaseOfstForFly;
- break;
- case text::RelOrientation::PAGE_RIGHT: aPos.Y() = pPage->Frm().Top()
- + pPage->Prt().Bottom(); break;
- case text::RelOrientation::PAGE_PRINT_AREA: aPos.Y() = pPage->Frm().Top()
- + pPage->Prt().Top(); break;
+ case text::RelOrientation::FRAME_RIGHT:
+ {
+ aPos.Y() += pFrm->Prt().Height();
+ aPos += (pFrm->Prt().*fnRect->fnGetPos)();
+ break;
+ }
+ case text::RelOrientation::PRINT_AREA:
+ {
+ aPos += (pFrm->Prt().*fnRect->fnGetPos)();
+ aPos.Y() += nBaseOfstForFly;
+ break;
+ }
+ case text::RelOrientation::PAGE_RIGHT:
+ {
+ aPos.Y() = pPage->Frm().Top() + pPage->Prt().Bottom();
+ break;
+ }
+ case text::RelOrientation::PAGE_PRINT_AREA:
+ {
+ aPos.Y() = pPage->Frm().Top() + pPage->Prt().Top();
+ break;
+ }
case text::RelOrientation::PAGE_LEFT:
- case text::RelOrientation::PAGE_FRAME: aPos.Y() = pPage->Frm().Top(); break;
- case text::RelOrientation::FRAME: aPos.Y() += nBaseOfstForFly; break;
+ case text::RelOrientation::PAGE_FRAME:
+ {
+ aPos.Y() = pPage->Frm().Top();
+ break;
+ }
+ case text::RelOrientation::FRAME:
+ {
+ aPos.Y() += nBaseOfstForFly;
+ break;
+ }
default: break;
}
}
@@ -1144,19 +1219,27 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
{
switch ( _eHoriRelOrient )
{
- case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrm->Prt().Width();
- aPos += pFrm->Prt().Pos();
- break;
- case text::RelOrientation::PRINT_AREA: aPos += pFrm->Prt().Pos();
- aPos.X() += nBaseOfstForFly;
- break;
- case text::RelOrientation::PAGE_RIGHT: aPos.X() = pPage->Frm().Left()
- + pPage->Prt().Right(); break;
- case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() = pPage->Frm().Left()
- + pPage->Prt().Left(); break;
+ case text::RelOrientation::FRAME_RIGHT:
+ aPos.X() += pFrm->Prt().Width();
+ aPos += pFrm->Prt().Pos();
+ break;
+ case text::RelOrientation::PRINT_AREA:
+ aPos += pFrm->Prt().Pos();
+ aPos.X() += nBaseOfstForFly;
+ break;
+ case text::RelOrientation::PAGE_RIGHT:
+ aPos.X() = pPage->Frm().Left() + pPage->Prt().Right();
+ break;
+ case text::RelOrientation::PAGE_PRINT_AREA:
+ aPos.X() = pPage->Frm().Left() + pPage->Prt().Left();
+ break;
case text::RelOrientation::PAGE_LEFT:
- case text::RelOrientation::PAGE_FRAME: aPos.X() = pPage->Frm().Left(); break;
- case text::RelOrientation::FRAME: aPos.X() += nBaseOfstForFly; break;
+ case text::RelOrientation::PAGE_FRAME:
+ aPos.X() = pPage->Frm().Left();
+ break;
+ case text::RelOrientation::FRAME:
+ aPos.X() += nBaseOfstForFly;
+ break;
default: break;
}
}
@@ -1164,8 +1247,12 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
}
if( !_opRef )
{
- if( bVertic )
+ if( bVertic && !bVerticalL2R )
_orRect.Pos( aPos.X() - _orRect.Width() - _orRect.Left(), _orRect.Top() - aPos.Y() );
+ // --> OD 2009-09-01 #mongolianlayout#
+ else if( bVerticalL2R )
+ _orRect.Pos( _orRect.Left() - aPos.X(), _orRect.Top() - aPos.Y() );
+ // <--
else if ( bRTL )
_orRect.Pos( - ( _orRect.Right() - aPos.X() ), _orRect.Top() - aPos.Y() );
else
@@ -1206,10 +1293,13 @@ Size SwFEShell::GetGraphicDefaultSize() const
return aRet;
}
-BOOL SwFEShell::IsFrmVertical(BOOL bEnvironment, BOOL& bRTL) const
+// --> OD 2009-08-31 #mongolianlayou#
+// add output parameter <bVertL2R>
+sal_Bool SwFEShell::IsFrmVertical(const sal_Bool bEnvironment, sal_Bool& bRTL, sal_Bool& bVertL2R) const
{
- BOOL bVert = FALSE;
- bRTL = FALSE;
+ sal_Bool bVert = sal_False;
+ bRTL = sal_False;
+ bVertL2R = sal_False;
if ( Imp()->HasDrawView() )
{
@@ -1242,10 +1332,12 @@ BOOL SwFEShell::IsFrmVertical(BOOL bEnvironment, BOOL& bRTL) const
bVert = pRef->IsVertical();
bRTL = pRef->IsRightToLeft();
+ bVertL2R = pRef->IsVertLR();
}
return bVert;
}
+// <--
void SwFEShell::MoveObjectIfActive( svt::EmbeddedObjectRef&, const Point& )
{
diff --git a/sw/source/core/frmedt/makefile.mk b/sw/source/core/frmedt/makefile.mk
deleted file mode 100644
index 57baf675aa8e..000000000000
--- a/sw/source/core/frmedt/makefile.mk
+++ /dev/null
@@ -1,76 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=frmedt
-
-AUTOSEG=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-
-.IF "$(mydebug)" != ""
-CDEFS+=-Dmydebug
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-CXXFILES = \
- fecopy.cxx \
- fedesc.cxx \
- fefly1.cxx \
- feflyole.cxx \
- feshview.cxx \
- fetab.cxx \
- fews.cxx \
- tblsel.cxx
-
-
-
-SLOFILES = $(EXCEPTIONSFILES)
-
-EXCEPTIONSFILES=\
- $(SLO)$/fecopy.obj \
- $(SLO)$/fedesc.obj \
- $(SLO)$/fefly1.obj \
- $(SLO)$/feflyole.obj \
- $(SLO)$/feshview.obj \
- $(SLO)$/fetab.obj \
- $(SLO)$/fews.obj \
- $(SLO)$/tblsel.obj
-
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index 43320270641f..44e3a136aed6 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -29,15 +29,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#include <hintids.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/protitem.hxx>
+
+#include <hintids.hxx>
#include <fmtanchr.hxx>
#include <fmtfsize.hxx>
#include <frmatr.hxx>
#include <tblsel.hxx>
#include <crsrsh.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docary.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
@@ -51,11 +53,12 @@
#include <rootfrm.hxx>
#include <viscrs.hxx>
#include <swtblfmt.hxx>
-#include <undobj.hxx>
+#include <UndoTable.hxx>
#include <mvsave.hxx>
// OD 26.08.2003 #i18103#
#include <sectfrm.hxx>
#include <frmtool.hxx>
+#include <deque>
//siehe auch swtable.cxx
#define COLFUZZY 20L
@@ -75,11 +78,11 @@
_SV_IMPL_SORTAR_ALG( SwSelBoxes, SwTableBoxPtr )
-BOOL SwSelBoxes::Seek_Entry( const SwTableBoxPtr rSrch, USHORT* pFndPos ) const
+sal_Bool SwSelBoxes::Seek_Entry( const SwTableBoxPtr rSrch, sal_uInt16* pFndPos ) const
{
- ULONG nIdx = rSrch->GetSttIdx();
+ sal_uLong nIdx = rSrch->GetSttIdx();
- USHORT nO = Count(), nM, nU = 0;
+ sal_uInt16 nO = Count(), nM, nU = 0;
if( nO > 0 )
{
nO--;
@@ -90,7 +93,7 @@ BOOL SwSelBoxes::Seek_Entry( const SwTableBoxPtr rSrch, USHORT* pFndPos ) const
{
if( pFndPos )
*pFndPos = nM;
- return TRUE;
+ return sal_True;
}
else if( (*this)[ nM ]->GetSttIdx() < nIdx )
nU = nM + 1;
@@ -98,7 +101,7 @@ BOOL SwSelBoxes::Seek_Entry( const SwTableBoxPtr rSrch, USHORT* pFndPos ) const
{
if( pFndPos )
*pFndPos = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
@@ -106,7 +109,7 @@ BOOL SwSelBoxes::Seek_Entry( const SwTableBoxPtr rSrch, USHORT* pFndPos ) const
}
if( pFndPos )
*pFndPos = nU;
- return FALSE;
+ return sal_False;
}
@@ -116,21 +119,21 @@ struct _CmpLPt
{
Point aPos;
const SwTableBox* pSelBox;
- BOOL bVert;
+ sal_Bool bVert;
- _CmpLPt( const Point& rPt, const SwTableBox* pBox, BOOL bVertical );
+ _CmpLPt( const Point& rPt, const SwTableBox* pBox, sal_Bool bVertical );
- BOOL operator==( const _CmpLPt& rCmp ) const
- { return X() == rCmp.X() && Y() == rCmp.Y() ? TRUE : FALSE; }
+ sal_Bool operator==( const _CmpLPt& rCmp ) const
+ { return X() == rCmp.X() && Y() == rCmp.Y() ? sal_True : sal_False; }
- BOOL operator<( const _CmpLPt& rCmp ) const
+ sal_Bool operator<( const _CmpLPt& rCmp ) const
{
if ( bVert )
return X() > rCmp.X() || ( X() == rCmp.X() && Y() < rCmp.Y() )
- ? TRUE : FALSE;
+ ? sal_True : sal_False;
else
return Y() < rCmp.Y() || ( Y() == rCmp.Y() && X() < rCmp.X() )
- ? TRUE : FALSE;
+ ? sal_True : sal_False;
}
long X() const { return aPos.X(); }
@@ -153,8 +156,7 @@ struct _Sort_CellFrm
: pFrm( &rCFrm ) {}
};
-SV_DECL_VARARR( _Sort_CellFrms, _Sort_CellFrm, 16, 16 )
-SV_IMPL_VARARR( _Sort_CellFrms, _Sort_CellFrm )
+typedef std::deque< _Sort_CellFrm > _Sort_CellFrms;
SV_IMPL_PTRARR( SwChartBoxes, SwTableBoxPtr );
SV_IMPL_PTRARR( SwChartLines, SwChartBoxes* );
@@ -182,7 +184,7 @@ const SwLayoutFrm *lcl_FindNextCellFrm( const SwLayoutFrm *pLay )
void GetTblSelCrs( const SwCrsrShell &rShell, SwSelBoxes& rBoxes )
{
if( rBoxes.Count() )
- rBoxes.Remove( USHORT(0), rBoxes.Count() );
+ rBoxes.Remove( sal_uInt16(0), rBoxes.Count() );
if( rShell.IsTableMode() && ((SwCrsrShell&)rShell).UpdateTblSelBoxes())
rBoxes.Insert( &rShell.GetTableCrsr()->GetBoxes() );
}
@@ -190,7 +192,7 @@ void GetTblSelCrs( const SwCrsrShell &rShell, SwSelBoxes& rBoxes )
void GetTblSelCrs( const SwTableCursor& rTblCrsr, SwSelBoxes& rBoxes )
{
if( rBoxes.Count() )
- rBoxes.Remove( USHORT(0), rBoxes.Count() );
+ rBoxes.Remove( sal_uInt16(0), rBoxes.Count() );
if( rTblCrsr.IsChgd() || !rTblCrsr.GetBoxesCount() )
{
@@ -216,7 +218,7 @@ void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes,
const SwTblSearchType eSearchType )
{
//Start- und Endzelle besorgen und den naechsten fragen.
- OSL_ENSURE( rCrsr.GetCntntNode() && rCrsr.GetCntntNode( FALSE ),
+ OSL_ENSURE( rCrsr.GetCntntNode() && rCrsr.GetCntntNode( sal_False ),
"Tabselection nicht auf Cnt." );
// Zeilen-Selektion:
@@ -244,31 +246,31 @@ void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes,
const SwTable& rTbl = pTblNd->GetTable();
const SwTableLines& rLines = rTbl.GetTabLines();
- const SwNode* pMarkNode = rCrsr.GetNode( FALSE );
- const ULONG nMarkSectionStart = pMarkNode->StartOfSectionIndex();
+ const SwNode* pMarkNode = rCrsr.GetNode( sal_False );
+ const sal_uLong nMarkSectionStart = pMarkNode->StartOfSectionIndex();
const SwTableBox* pMarkBox = rTbl.GetTblBox( nMarkSectionStart );
OSL_ENSURE( pMarkBox, "Point in table, mark outside?" );
const SwTableLine* pLine = pMarkBox ? pMarkBox->GetUpper() : 0;
- USHORT nSttPos = rLines.GetPos( pLine );
+ sal_uInt16 nSttPos = rLines.GetPos( pLine );
OSL_ENSURE( USHRT_MAX != nSttPos, "Wo ist meine Zeile in der Tabelle?" );
- pLine = rTbl.GetTblBox( rCrsr.GetNode( TRUE )->StartOfSectionIndex() )->GetUpper();
- USHORT nEndPos = rLines.GetPos( pLine );
+ pLine = rTbl.GetTblBox( rCrsr.GetNode( sal_True )->StartOfSectionIndex() )->GetUpper();
+ sal_uInt16 nEndPos = rLines.GetPos( pLine );
OSL_ENSURE( USHRT_MAX != nEndPos, "Wo ist meine Zeile in der Tabelle?" );
// pb: #i20193# if tableintable then nSttPos == nEndPos == USHRT_MAX
if ( nSttPos != USHRT_MAX && nEndPos != USHRT_MAX )
{
if( nEndPos < nSttPos ) // vertauschen
{
- USHORT nTmp = nSttPos; nSttPos = nEndPos; nEndPos = nTmp;
+ sal_uInt16 nTmp = nSttPos; nSttPos = nEndPos; nEndPos = nTmp;
}
int bChkProtected = nsSwTblSearchType::TBLSEARCH_PROTECT & eSearchType;
for( ; nSttPos <= nEndPos; ++nSttPos )
{
pLine = rLines[ nSttPos ];
- for( USHORT n = pLine->GetTabBoxes().Count(); n ; )
+ for( sal_uInt16 n = pLine->GetTabBoxes().Count(); n ; )
{
SwTableBox* pBox = pLine->GetTabBoxes()[ --n ];
// Zellenschutzt beachten ??
@@ -291,7 +293,7 @@ void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes,
const SwCntntNode *pCntNd = rCrsr.GetCntntNode();
const SwLayoutFrm *pStart = pCntNd ?
pCntNd->GetFrm( &aPtPos )->GetUpper() : 0;
- pCntNd = rCrsr.GetCntntNode(FALSE);
+ pCntNd = rCrsr.GetCntntNode(sal_False);
const SwLayoutFrm *pEnd = pCntNd ?
pCntNd->GetFrm( &aMkPos )->GetUpper() : 0;
if( pStart && pEnd )
@@ -312,13 +314,13 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
int bChkProtected = nsSwTblSearchType::TBLSEARCH_PROTECT & eSearchType;
- BOOL bTblIsValid;
+ sal_Bool bTblIsValid;
// #i55421# Reduced value 10
int nLoopMax = 10;
- USHORT i;
+ sal_uInt16 i;
do {
- bTblIsValid = TRUE;
+ bTblIsValid = sal_True;
//Zuerst lassen wir uns die Tabellen und die Rechtecke heraussuchen.
SwSelUnions aUnions;
@@ -340,7 +342,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
const SwTabFrm *pTable = pUnion->GetTable();
if( !pTable->IsValid() && nLoopMax )
{
- bTblIsValid = FALSE;
+ bTblIsValid = sal_False;
break;
}
@@ -353,7 +355,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
{
if( !pRow->IsValid() && nLoopMax )
{
- bTblIsValid = FALSE;
+ bTblIsValid = sal_False;
break;
}
@@ -365,7 +367,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
{
if( !pCell->IsValid() && nLoopMax )
{
- bTblIsValid = FALSE;
+ bTblIsValid = sal_False;
break;
}
@@ -475,24 +477,24 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
rBoxes.Remove( i, rBoxes.Count() );
--nLoopMax;
- } while( TRUE );
+ } while( sal_True );
OSL_ENSURE( nLoopMax, "das Layout der Tabelle wurde nicht valide!" );
}
-BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
+sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
SwChartLines* pGetCLines )
{
const SwTableNode* pTNd = rSttNd.FindTableNode();
if( !pTNd )
- return FALSE;
+ return sal_False;
Point aNullPos;
SwNodeIndex aIdx( rSttNd );
const SwCntntNode* pCNd = aIdx.GetNode().GetCntntNode();
if( !pCNd )
- pCNd = aIdx.GetNodes().GoNextSection( &aIdx, FALSE, FALSE );
+ pCNd = aIdx.GetNodes().GoNextSection( &aIdx, sal_False, sal_False );
// if table is invisible, return
// (layout needed for forming table selection further down, so we can't
@@ -501,7 +503,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
// invisible - e.g. in a hidden section
// Robust: check, if content was found (e.g. empty table cells)
if ( !pCNd || pCNd->GetFrm() == NULL )
- return FALSE;
+ return sal_False;
const SwLayoutFrm *pStart = pCNd ? pCNd->GetFrm( &aNullPos )->GetUpper() : 0;
OSL_ENSURE( pStart, "ohne Frame geht gar nichts" );
@@ -509,29 +511,29 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
aIdx = rEndNd;
pCNd = aIdx.GetNode().GetCntntNode();
if( !pCNd )
- pCNd = aIdx.GetNodes().GoNextSection( &aIdx, FALSE, FALSE );
+ pCNd = aIdx.GetNodes().GoNextSection( &aIdx, sal_False, sal_False );
// #i22135# - Robust: check, if content was found and if it's visible
if ( !pCNd || pCNd->GetFrm() == NULL )
{
- return FALSE;
+ return sal_False;
}
const SwLayoutFrm *pEnd = pCNd ? pCNd->GetFrm( &aNullPos )->GetUpper() : 0;
OSL_ENSURE( pEnd, "ohne Frame geht gar nichts" );
- BOOL bTblIsValid, bValidChartSel;
+ sal_Bool bTblIsValid, bValidChartSel;
// --> FME 2006-01-25 #i55421# Reduced value 10
int nLoopMax = 10; //JP 28.06.99: max 100 loops - Bug 67292
// <--
- USHORT i = 0;
+ sal_uInt16 i = 0;
do {
- bTblIsValid = TRUE;
- bValidChartSel = TRUE;
+ bTblIsValid = sal_True;
+ bValidChartSel = sal_True;
- USHORT nRowCells = USHRT_MAX;
+ sal_uInt16 nRowCells = USHRT_MAX;
//Zuerst lassen wir uns die Tabellen und die Rechtecke heraussuchen.
SwSelUnions aUnions;
@@ -549,7 +551,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
if( !pTable->IsValid() && nLoopMax )
{
- bTblIsValid = FALSE;
+ bTblIsValid = sal_False;
break;
}
@@ -564,7 +566,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
{
if( !pRow->IsValid() && nLoopMax )
{
- bTblIsValid = FALSE;
+ bTblIsValid = sal_False;
break;
}
@@ -577,7 +579,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
{
if( !pCell->IsValid() && nLoopMax )
{
- bTblIsValid = FALSE;
+ bTblIsValid = sal_False;
break;
}
@@ -615,12 +617,11 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
rUnion.Top() <= nFrmBottom &&
nFrmBottom <= nUnionBottom+ nYFuzzy )
- aCellFrms.Insert(
- _Sort_CellFrm( *(SwCellFrm*)pCell ),
- aCellFrms.Count() );
+ aCellFrms.push_back(
+ _Sort_CellFrm( *(SwCellFrm*)pCell) );
else
{
- bValidChartSel = FALSE;
+ bValidChartSel = sal_False;
break;
}
}
@@ -642,12 +643,12 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
// alle Zellen der (Teil-)Tabelle zusammen. Dann teste mal ob
// all huebsch nebeneinander liegen.
- USHORT n, nEnd, nCellCnt = 0;
+ size_t n, nCellCnt = 0;
long nYPos = LONG_MAX;
long nXPos = 0;
long nHeight = 0;
- for( n = 0, nEnd = aCellFrms.Count(); n < nEnd; ++n )
+ for( n = 0 ; n < aCellFrms.size(); ++n )
{
const _Sort_CellFrm& rCF = aCellFrms[ n ];
if( (rCF.pFrm->Frm().*fnRect->fnGetTop)() != nYPos )
@@ -659,7 +660,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
nRowCells = nCellCnt;
else if( nRowCells != nCellCnt )
{
- bValidChartSel = FALSE;
+ bValidChartSel = sal_False;
break;
}
}
@@ -682,7 +683,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
}
else
{
- bValidChartSel = FALSE;
+ bValidChartSel = sal_False;
break;
}
}
@@ -691,20 +692,20 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
if( USHRT_MAX == nRowCells )
nRowCells = nCellCnt;
else if( nRowCells != nCellCnt )
- bValidChartSel = FALSE;
+ bValidChartSel = sal_False;
}
if( bValidChartSel && pGetCLines )
{
nYPos = LONG_MAX;
SwChartBoxes* pBoxes = 0;
- for( n = 0, nEnd = aCellFrms.Count(); n < nEnd; ++n )
+ for( n = 0; n < aCellFrms.size(); ++n )
{
const _Sort_CellFrm& rCF = aCellFrms[ n ];
if( (rCF.pFrm->Frm().*fnRect->fnGetTop)() != nYPos )
{
pBoxes = new SwChartBoxes( 255 < nRowCells
- ? 255 : (BYTE)nRowCells);
+ ? 255 : (sal_uInt8)nRowCells);
pGetCLines->C40_INSERT( SwChartBoxes, pBoxes, pGetCLines->Count() );
nYPos = (rCF.pFrm->Frm().*fnRect->fnGetTop)();
}
@@ -733,7 +734,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
--nLoopMax;
if( pGetCLines )
pGetCLines->DeleteAndDestroy( 0, pGetCLines->Count() );
- } while( TRUE );
+ } while( sal_True );
OSL_ENSURE( nLoopMax, "das Layout der Tabelle wurde nicht valide!" );
@@ -744,7 +745,7 @@ BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
}
-BOOL IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell )
+sal_Bool IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell )
{
OSL_ENSURE( pCell->IsCellFrm(), "Frame ohne Gazelle" );
@@ -754,7 +755,7 @@ BOOL IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell )
(( rUnion.Top() <= pCell->Frm().Top()+20 &&
rUnion.Bottom() > pCell->Frm().Top() ) ||
( rUnion.Top() >= pCell->Frm().Top() &&
- rUnion.Bottom() < pCell->Frm().Bottom() )) ? TRUE : FALSE );
+ rUnion.Bottom() < pCell->Frm().Bottom() )) ? sal_True : sal_False );
return (
rUnion.Top() <= pCell->Frm().Top() &&
@@ -764,10 +765,10 @@ BOOL IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell )
rUnion.Right() > pCell->Frm().Left() ) ||
( rUnion.Left() >= pCell->Frm().Left() &&
- rUnion.Right() < pCell->Frm().Right() )) ? TRUE : FALSE );
+ rUnion.Right() < pCell->Frm().Right() )) ? sal_True : sal_False );
}
-BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
+sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
{
SwShellCrsr* pCrsr = rShell.pCurCrsr;
if ( rShell.IsTableMode() )
@@ -775,7 +776,7 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
const SwLayoutFrm *pStart = pCrsr->GetCntntNode()->GetFrm(
&pCrsr->GetPtPos() )->GetUpper(),
- *pEnd = pCrsr->GetCntntNode(FALSE)->GetFrm(
+ *pEnd = pCrsr->GetCntntNode(sal_False)->GetFrm(
&pCrsr->GetMkPos() )->GetUpper();
const SwLayoutFrm* pSttCell = pStart;
@@ -788,8 +789,8 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
// default erstmal nach oben testen, dann nach links
::MakeSelUnions( aUnions, pStart, pEnd, nsSwTblSearchType::TBLSEARCH_COL );
- BOOL bTstRow = TRUE, bFound = FALSE;
- USHORT i;
+ sal_Bool bTstRow = sal_True, bFound = sal_False;
+ sal_uInt16 i;
// 1. teste ob die darueber liegende Box Value/Formel enhaelt:
for( i = 0; i < aUnions.Count(); ++i )
@@ -813,8 +814,8 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
{
if( pCell == pSttCell )
{
- USHORT nWhichId = 0;
- for( USHORT n = rBoxes.Count(); n; )
+ sal_uInt16 nWhichId = 0;
+ for( sal_uInt16 n = rBoxes.Count(); n; )
if( USHRT_MAX != ( nWhichId = rBoxes[ --n ]
->GetTabBox()->IsFormulaOrValueBox() ))
break;
@@ -822,7 +823,7 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
// alle Boxen zusammen, nicht mehr die Zeile
// pruefen, wenn eine Formel oder Value gefunden wurde
bTstRow = 0 == nWhichId || USHRT_MAX == nWhichId;
- bFound = TRUE;
+ bFound = sal_True;
break;
}
@@ -856,7 +857,7 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
// 2. teste ob die links liegende Box Value/Formel enhaelt:
if( bTstRow )
{
- bFound = FALSE;
+ bFound = sal_False;
rBoxes.Remove( 0, rBoxes.Count() );
aUnions.DeleteAndDestroy( 0, aUnions.Count() );
@@ -882,8 +883,8 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
{
if( pCell == pSttCell )
{
- USHORT nWhichId = 0;
- for( USHORT n = rBoxes.Count(); n; )
+ sal_uInt16 nWhichId = 0;
+ for( sal_uInt16 n = rBoxes.Count(); n; )
if( USHRT_MAX != ( nWhichId = rBoxes[ --n ]
->GetTabBox()->IsFormulaOrValueBox() ))
break;
@@ -891,7 +892,7 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
// alle Boxen zusammen, nicht mehr die Zeile
// pruefen, wenn eine Formel oder Value gefunden wurde
bFound = 0 != nWhichId && USHRT_MAX != nWhichId;
- bTstRow = FALSE;
+ bTstRow = sal_False;
break;
}
@@ -925,25 +926,25 @@ BOOL GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
return bFound;
}
-BOOL HasProtectedCells( const SwSelBoxes& rBoxes )
+sal_Bool HasProtectedCells( const SwSelBoxes& rBoxes )
{
- BOOL bRet = FALSE;
- for( USHORT n = 0, nCnt = rBoxes.Count(); n < nCnt; ++n )
+ sal_Bool bRet = sal_False;
+ for( sal_uInt16 n = 0, nCnt = rBoxes.Count(); n < nCnt; ++n )
if( rBoxes[ n ]->GetFrmFmt()->GetProtect().IsCntntProtected() )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
return bRet;
}
-_CmpLPt::_CmpLPt( const Point& rPt, const SwTableBox* pBox, BOOL bVertical )
+_CmpLPt::_CmpLPt( const Point& rPt, const SwTableBox* pBox, sal_Bool bVertical )
: aPos( rPt ), pSelBox( pBox ), bVert( bVertical )
{}
void lcl_InsTblBox( SwTableNode* pTblNd, SwDoc* pDoc, SwTableBox* pBox,
- USHORT nInsPos, USHORT nCnt = 1 )
+ sal_uInt16 nInsPos, sal_uInt16 nCnt = 1 )
{
OSL_ENSURE( pBox->GetSttNd(), "Box ohne Start-Node" );
SwCntntNode* pCNd = pDoc->GetNodes()[ pBox->GetSttIdx() + 1 ]
@@ -961,25 +962,25 @@ void lcl_InsTblBox( SwTableNode* pTblNd, SwDoc* pDoc, SwTableBox* pBox,
nInsPos, nCnt );
}
-BOOL IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam )
+sal_Bool IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam )
{
rPam.GetPoint()->nNode = *rBox.GetSttNd()->EndOfSectionNode();
rPam.Move( fnMoveBackward, fnGoCntnt );
rPam.SetMark();
rPam.GetPoint()->nNode = *rBox.GetSttNd();
rPam.Move( fnMoveForward, fnGoCntnt );
- BOOL bRet = *rPam.GetMark() == *rPam.GetPoint()
+ sal_Bool bRet = *rPam.GetMark() == *rPam.GetPoint()
&& ( rBox.GetSttNd()->GetIndex() + 1 == rPam.GetPoint()->nNode.GetIndex() );
if( bRet )
{
// dann teste mal auf absatzgebundenen Flys
const SwSpzFrmFmts& rFmts = *rPam.GetDoc()->GetSpzFrmFmts();
- ULONG nSttIdx = rPam.GetPoint()->nNode.GetIndex(),
+ sal_uLong nSttIdx = rPam.GetPoint()->nNode.GetIndex(),
nEndIdx = rBox.GetSttNd()->EndOfSectionIndex(),
nIdx;
- for( USHORT n = 0; n < rFmts.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFmts.Count(); ++n )
{
const SwFmtAnchor& rAnchor = rFmts[n]->GetAnchor();
const SwPosition* pAPos = rAnchor.GetCntntAnchor();
@@ -989,7 +990,7 @@ BOOL IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam )
nSttIdx <= ( nIdx = pAPos->nNode.GetIndex() ) &&
nIdx < nEndIdx )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -1002,10 +1003,10 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
SwTableBox** ppMergeBox, SwUndoTblMerge* pUndo )
{
if( rBoxes.Count() )
- rBoxes.Remove( USHORT(0), rBoxes.Count() );
+ rBoxes.Remove( sal_uInt16(0), rBoxes.Count() );
//Zuerst lassen wir uns die Tabellen und die Rechtecke heraussuchen.
- OSL_ENSURE( rPam.GetCntntNode() && rPam.GetCntntNode( FALSE ),
+ OSL_ENSURE( rPam.GetCntntNode() && rPam.GetCntntNode( sal_False ),
"Tabselection nicht auf Cnt." );
//JP 24.09.96: Merge mit wiederholenden TabellenHeadline funktioniert nicht
@@ -1014,7 +1015,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
Point aPt( 0, 0 );
const SwLayoutFrm *pStart = rPam.GetCntntNode()->GetFrm(
&aPt )->GetUpper(),
- *pEnd = rPam.GetCntntNode(FALSE)->GetFrm(
+ *pEnd = rPam.GetCntntNode(sal_False)->GetFrm(
&aPt )->GetUpper();
SwSelUnions aUnions;
@@ -1033,7 +1034,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
SWRECTFN( pStart->GetUpper() )
- for ( USHORT i = 0; i < aUnions.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aUnions.Count(); ++i )
{
const SwTabFrm *pTabFrm = aUnions[i]->GetTable();
@@ -1065,7 +1066,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
{
if( ( rUnion.Right() + COLFUZZY ) < pCell->Frm().Right() )
{
- USHORT nInsPos = pBox->GetUpper()->
+ sal_uInt16 nInsPos = pBox->GetUpper()->
GetTabBoxes().C40_GETPOS( SwTableBox, pBox )+1;
lcl_InsTblBox( pTblNd, pDoc, pBox, nInsPos );
pBox->ClaimFrmFmt();
@@ -1109,7 +1110,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
else if( ( rUnion.Left() - COLFUZZY ) >= pCell->Frm().Left() &&
( rUnion.Right() + COLFUZZY ) < pCell->Frm().Right() )
{
- USHORT nInsPos = pBox->GetUpper()->GetTabBoxes().
+ sal_uInt16 nInsPos = pBox->GetUpper()->GetTabBoxes().
C40_GETPOS( SwTableBox, pBox )+1;
lcl_InsTblBox( pTblNd, pDoc, pBox, nInsPos, 2 );
pBox->ClaimFrmFmt();
@@ -1129,7 +1130,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pBox->GetFrmFmt()->GetAttrSet()
- .GetItemState( RES_BOX, FALSE, &pItem ))
+ .GetItemState( RES_BOX, sal_False, &pItem ))
{
SvxBoxItem aBox( *(SvxBoxItem*)pItem );
aBox.SetLine( 0, BOX_LINE_RIGHT );
@@ -1168,7 +1169,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
{
// dann muss eine neue Box einfuegt und die
// Breiten angepasst werden
- USHORT nInsPos = pBox->GetUpper()->GetTabBoxes().
+ sal_uInt16 nInsPos = pBox->GetUpper()->GetTabBoxes().
C40_GETPOS( SwTableBox, pBox )+1;
lcl_InsTblBox( pTblNd, pDoc, pBox, nInsPos, 1 );
@@ -1225,7 +1226,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
// 1. Loesung: gehe ueber das Array und
// alle auf der gleichen Y-Ebene werden mit Blanks getrennt
// alle anderen werden als Absaetze getrennt.
- BOOL bCalcWidth = TRUE;
+ sal_Bool bCalcWidth = sal_True;
const SwTableBox* pFirstBox = aPosArr[ 0 ].pSelBox;
// JP 27.03.98: Optimierung - falls die Boxen einer Line leer sind,
@@ -1237,8 +1238,8 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
#if defined( DEL_ONLY_EMPTY_LINES )
nWidth = pFirstBox->GetFrmFmt()->GetFrmSize().GetWidth();
- BOOL bEmptyLine = TRUE;
- USHORT n, nSttPos = 0;
+ sal_Bool bEmptyLine = sal_True;
+ sal_uInt16 n, nSttPos = 0;
for( n = 0; n < aPosArr.Count(); ++n )
{
@@ -1246,14 +1247,14 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
if( n && aPosArr[ n - 1 ].Y() == rPt.Y() ) // gleiche Ebene ?
{
if( bEmptyLine && !IsEmptyBox( *rPt.pSelBox, aPam ))
- bEmptyLine = FALSE;
+ bEmptyLine = sal_False;
if( bCalcWidth )
nWidth += rPt.pSelBox->GetFrmFmt()->GetFrmSize().GetWidth();
}
else
{
if( bCalcWidth && n )
- bCalcWidth = FALSE; // eine Zeile fertig
+ bCalcWidth = sal_False; // eine Zeile fertig
if( bEmptyLine && nSttPos < n )
{
@@ -1261,7 +1262,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
// nicht mit Blanks aufgefuellt und als Absatz
// eingefuegt werden.
if( pUndo )
- for( USHORT i = nSttPos; i < n; ++i )
+ for( sal_uInt16 i = nSttPos; i < n; ++i )
pUndo->SaveCollection( *aPosArr[ i ].pSelBox );
aPosArr.Remove( nSttPos, n - nSttPos );
@@ -1276,21 +1277,21 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
if( bEmptyLine && nSttPos < n )
{
if( pUndo )
- for( USHORT i = nSttPos; i < n; ++i )
+ for( sal_uInt16 i = nSttPos; i < n; ++i )
pUndo->SaveCollection( *aPosArr[ i ].pSelBox );
aPosArr.Remove( nSttPos, n - nSttPos );
}
#elsif defined( DEL_EMPTY_BOXES_AT_START_AND_END )
nWidth = pFirstBox->GetFrmFmt()->GetFrmSize().GetWidth();
- USHORT n, nSttPos = 0, nSEndPos = 0, nESttPos = 0;
+ sal_uInt16 n, nSttPos = 0, nSEndPos = 0, nESttPos = 0;
for( n = 0; n < aPosArr.Count(); ++n )
{
const _CmpLPt& rPt = aPosArr[ n ];
if( n && aPosArr[ n - 1 ].Y() == rPt.Y() ) // gleiche Ebene ?
{
- BOOL bEmptyBox = IsEmptyBox( *rPt.pSelBox, aPam );
+ sal_Bool bEmptyBox = IsEmptyBox( *rPt.pSelBox, aPam );
if( bEmptyBox )
{
if( nSEndPos == n ) // der Anfang ist leer
@@ -1305,7 +1306,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
else
{
if( bCalcWidth && n )
- bCalcWidth = FALSE; // eine Zeile fertig
+ bCalcWidth = sal_False; // eine Zeile fertig
// zuerst die vom Anfang
if( nSttPos < nSEndPos )
@@ -1313,10 +1314,10 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
// dann ist der vorder Teil der Line leer und braucht
// nicht mit Blanks aufgefuellt werden.
if( pUndo )
- for( USHORT i = nSttPos; i < nSEndPos; ++i )
+ for( sal_uInt16 i = nSttPos; i < nSEndPos; ++i )
pUndo->SaveCollection( *aPosArr[ i ].pSelBox );
- USHORT nCnt = nSEndPos - nSttPos;
+ sal_uInt16 nCnt = nSEndPos - nSttPos;
aPosArr.Remove( nSttPos, nCnt );
nESttPos -= nCnt;
n -= nCnt;
@@ -1327,10 +1328,10 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
// dann ist der vorder Teil der Line leer und braucht
// nicht mit Blanks aufgefuellt werden.
if( pUndo )
- for( USHORT i = nESttPos; i < n; ++i )
+ for( sal_uInt16 i = nESttPos; i < n; ++i )
pUndo->SaveCollection( *aPosArr[ i ].pSelBox );
- USHORT nCnt = n - nESttPos;
+ sal_uInt16 nCnt = n - nESttPos;
aPosArr.Remove( nESttPos, nCnt );
n -= nCnt;
}
@@ -1349,10 +1350,10 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
// dann ist der vorder Teil der Line leer und braucht
// nicht mit Blanks aufgefuellt werden.
if( pUndo )
- for( USHORT i = nSttPos; i < nSEndPos; ++i )
+ for( sal_uInt16 i = nSttPos; i < nSEndPos; ++i )
pUndo->SaveCollection( *aPosArr[ i ].pSelBox );
- USHORT nCnt = nSEndPos - nSttPos;
+ sal_uInt16 nCnt = nSEndPos - nSttPos;
aPosArr.Remove( nSttPos, nCnt );
nESttPos -= nCnt;
n -= nCnt;
@@ -1362,10 +1363,10 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
// dann ist der vorder Teil der Line leer und braucht
// nicht mit Blanks aufgefuellt werden.
if( pUndo )
- for( USHORT i = nESttPos; i < n; ++i )
+ for( sal_uInt16 i = nESttPos; i < n; ++i )
pUndo->SaveCollection( *aPosArr[ i ].pSelBox );
- USHORT nCnt = n - nESttPos;
+ sal_uInt16 nCnt = n - nESttPos;
aPosArr.Remove( nESttPos, nCnt );
}
#else
@@ -1378,7 +1379,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
aPosArr[ 0 ].Y() ) :
0;
- for( USHORT n = 0; n < aPosArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aPosArr.Count(); ++n )
{
const _CmpLPt& rPt = aPosArr[ n ];
if( bCalcWidth )
@@ -1386,7 +1387,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
if( nY == ( bVert ? rPt.X() : rPt.Y() ) ) // gleiche Ebene ?
nWidth += rPt.pSelBox->GetFrmFmt()->GetFrmSize().GetWidth();
else
- bCalcWidth = FALSE; // eine Zeile fertig
+ bCalcWidth = sal_False; // eine Zeile fertig
}
if( IsEmptyBox( *rPt.pSelBox, aPam ) )
@@ -1405,7 +1406,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
{
SwTableBox* pTmpBox = rBoxes[0];
SwTableLine* pInsLine = pTmpBox->GetUpper();
- USHORT nInsPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, pTmpBox );
+ sal_uInt16 nInsPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, pTmpBox );
lcl_InsTblBox( pTblNd, pDoc, pTmpBox, nInsPos );
(*ppMergeBox) = pInsLine->GetTabBoxes()[ nInsPos ];
@@ -1436,23 +1437,28 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
SwPaM aPam( aInsPos );
- for( USHORT n = 0; n < aPosArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aPosArr.Count(); ++n )
{
const _CmpLPt& rPt = aPosArr[ n ];
aPam.GetPoint()->nNode.Assign( *rPt.pSelBox->GetSttNd()->
EndOfSectionNode(), -1 );
SwCntntNode* pCNd = aPam.GetCntntNode();
- USHORT nL = pCNd ? pCNd->Len() : 0;
+ sal_uInt16 nL = pCNd ? pCNd->Len() : 0;
aPam.GetPoint()->nContent.Assign( pCNd, nL );
SwNodeIndex aSttNdIdx( *rPt.pSelBox->GetSttNd(), 1 );
// ein Node muss in der Box erhalten bleiben (sonst wird beim
// Move die gesamte Section geloescht)
+ bool const bUndo(pDoc->GetIDocumentUndoRedo().DoesUndo());
if( pUndo )
- pDoc->DoUndo( FALSE );
+ {
+ pDoc->GetIDocumentUndoRedo().DoUndo(false);
+ }
pDoc->AppendTxtNode( *aPam.GetPoint() );
if( pUndo )
- pDoc->DoUndo( TRUE );
+ {
+ pDoc->GetIDocumentUndoRedo().DoUndo(bUndo);
+ }
SwNodeRange aRg( aSttNdIdx, aPam.GetPoint()->nNode );
rInsPosNd++;
if( pUndo )
@@ -1465,7 +1471,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
// wo steht jetzt aInsPos ??
if( bCalcWidth )
- bCalcWidth = FALSE; // eine Zeile fertig
+ bCalcWidth = sal_False; // eine Zeile fertig
// den initialen TextNode ueberspringen
rInsPosNd.Assign( pDoc->GetNodes(),
@@ -1491,32 +1497,32 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
}
-static BOOL lcl_CheckCol( const _FndBox*& rpFndBox, void* pPara );
+static sal_Bool lcl_CheckCol( const _FndBox*& rpFndBox, void* pPara );
-static BOOL lcl_CheckRow( const _FndLine*& rpFndLine, void* pPara )
+static sal_Bool lcl_CheckRow( const _FndLine*& rpFndLine, void* pPara )
{
((_FndLine*)rpFndLine)->GetBoxes().ForEach( &lcl_CheckCol, pPara );
- return *(BOOL*)pPara;
+ return *(sal_Bool*)pPara;
}
-static BOOL lcl_CheckCol( const _FndBox*& rpFndBox, void* pPara )
+static sal_Bool lcl_CheckCol( const _FndBox*& rpFndBox, void* pPara )
{
if( !rpFndBox->GetBox()->GetSttNd() )
{
if( rpFndBox->GetLines().Count() !=
rpFndBox->GetBox()->GetTabLines().Count() )
- *((BOOL*)pPara) = FALSE;
+ *((sal_Bool*)pPara) = sal_False;
else
((_FndBox*)rpFndBox)->GetLines().ForEach( &lcl_CheckRow, pPara );
}
// Box geschuetzt ??
else if( rpFndBox->GetBox()->GetFrmFmt()->GetProtect().IsCntntProtected() )
- *((BOOL*)pPara) = FALSE;
- return *(BOOL*)pPara;
+ *((sal_Bool*)pPara) = sal_False;
+ return *(sal_Bool*)pPara;
}
-USHORT CheckMergeSel( const SwPaM& rPam )
+sal_uInt16 CheckMergeSel( const SwPaM& rPam )
{
SwSelBoxes aBoxes;
//JP 24.09.96: Merge mit wiederholenden TabellenHeadline funktioniert nicht
@@ -1525,15 +1531,15 @@ USHORT CheckMergeSel( const SwPaM& rPam )
Point aPt;
const SwLayoutFrm *pStart = rPam.GetCntntNode()->GetFrm(
&aPt )->GetUpper(),
- *pEnd = rPam.GetCntntNode(FALSE)->GetFrm(
+ *pEnd = rPam.GetCntntNode(sal_False)->GetFrm(
&aPt )->GetUpper();
GetTblSel( pStart, pEnd, aBoxes, 0 );
return CheckMergeSel( aBoxes );
}
-USHORT CheckMergeSel( const SwSelBoxes& rBoxes )
+sal_uInt16 CheckMergeSel( const SwSelBoxes& rBoxes )
{
- USHORT eRet = TBLMERGE_NOSELECTION;
+ sal_uInt16 eRet = TBLMERGE_NOSELECTION;
if( rBoxes.Count() )
{
eRet = TBLMERGE_OK;
@@ -1545,7 +1551,7 @@ USHORT CheckMergeSel( const SwSelBoxes& rBoxes )
&_FndLineCopyCol, &aPara );
if( aFndBox.GetLines().Count() )
{
- BOOL bMergeSelOk = TRUE;
+ sal_Bool bMergeSelOk = sal_True;
_FndBox* pFndBox = &aFndBox;
_FndLine* pFndLine = 0;
while( pFndBox && 1 == pFndBox->GetLines().Count() )
@@ -1625,7 +1631,7 @@ void lcl_FindStartEndRow( const SwLayoutFrm *&rpStart,
aEndArr.Insert( p, 0 );
}
- for( USHORT n = 0; n < aEndArr.Count() && n < aSttArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aEndArr.Count() && n < aSttArr.Count(); ++n )
if( aSttArr[ n ] != aEndArr[ n ] )
{
// first unequal line or box - all odds are
@@ -1720,8 +1726,8 @@ void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart,
(!pTmp->IsCellFrm() ||
( ( ! bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() < nSX &&
(pTmp->Frm().*fnRect->fnGetRight)()< nSX2 ) ||
- (bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() > nSX &&
- (pTmp->Frm().*fnRect->fnGetRight)()> nSX2) ) ) )
+ ( bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() > nSX &&
+ (pTmp->Frm().*fnRect->fnGetRight)()> nSX2 ) ) ) )
pTmp = pTmp->GetNextLayoutLeaf();
if ( pTmp )
@@ -1849,14 +1855,14 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
const SwTabFrm *pEndTable = pEnd->FindTabFrm();
if( !pTable || !pEndTable )
return;
- BOOL bExchange = FALSE;
+ sal_Bool bExchange = sal_False;
if ( pTable != pEndTable )
{
if ( !pTable->IsAnFollow( pEndTable ) )
{
OSL_ENSURE( pEndTable->IsAnFollow( pTable ), "Tabkette verknotet." );
- bExchange = TRUE;
+ bExchange = sal_True;
}
}
else
@@ -1868,10 +1874,10 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
{
if( (pStart->Frm().*fnRect->fnGetLeft)() >
(pEnd->Frm().*fnRect->fnGetLeft)() )
- bExchange = TRUE;
+ bExchange = sal_True;
}
else if( bVert == ( nSttTop < nEndTop ) )
- bExchange = TRUE;
+ bExchange = sal_True;
}
if ( bExchange )
{
@@ -2027,7 +2033,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
}
}
-BOOL CheckSplitCells( const SwCrsrShell& rShell, USHORT nDiv,
+sal_Bool CheckSplitCells( const SwCrsrShell& rShell, sal_uInt16 nDiv,
const SwTblSearchType eSearchType )
{
if( !rShell.IsTableMode() )
@@ -2036,13 +2042,13 @@ BOOL CheckSplitCells( const SwCrsrShell& rShell, USHORT nDiv,
return CheckSplitCells( *rShell.getShellCrsr(false), nDiv, eSearchType );
}
-BOOL CheckSplitCells( const SwCursor& rCrsr, USHORT nDiv,
+sal_Bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv,
const SwTblSearchType eSearchType )
{
if( 1 >= nDiv )
- return FALSE;
+ return sal_False;
- USHORT nMinValue = nDiv * MINLAY;
+ sal_uInt16 nMinValue = nDiv * MINLAY;
//Start- und Endzelle besorgen und den naechsten fragen.
Point aPtPos, aMkPos;
@@ -2054,7 +2060,7 @@ BOOL CheckSplitCells( const SwCursor& rCrsr, USHORT nDiv,
}
const SwLayoutFrm *pStart = rCrsr.GetCntntNode()->GetFrm(
&aPtPos )->GetUpper(),
- *pEnd = rCrsr.GetCntntNode(FALSE)->GetFrm(
+ *pEnd = rCrsr.GetCntntNode(sal_False)->GetFrm(
&aMkPos )->GetUpper();
SWRECTFN( pStart->GetUpper() )
@@ -2065,7 +2071,7 @@ BOOL CheckSplitCells( const SwCursor& rCrsr, USHORT nDiv,
::MakeSelUnions( aUnions, pStart, pEnd, eSearchType );
//Jetzt zu jedem Eintrag die Boxen herausfischen und uebertragen.
- for ( USHORT i = 0; i < aUnions.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aUnions.Count(); ++i )
{
SwSelUnion *pUnion = aUnions[i];
const SwTabFrm *pTable = pUnion->GetTable();
@@ -2087,7 +2093,7 @@ BOOL CheckSplitCells( const SwCursor& rCrsr, USHORT nDiv,
if( ::IsFrmInTblSel( pUnion->GetUnion(), pCell ) )
{
if( (pCell->Frm().*fnRect->fnGetWidth)() < nMinValue )
- return FALSE;
+ return sal_False;
}
if ( pCell->GetNext() )
@@ -2103,7 +2109,7 @@ BOOL CheckSplitCells( const SwCursor& rCrsr, USHORT nDiv,
pRow = (const SwLayoutFrm*)pRow->GetNext();
}
}
- return TRUE;
+ return sal_True;
}
// -------------------------------------------------------------------
@@ -2130,7 +2136,7 @@ void lcl_InsertRow( SwTableLine &rLine, SwLayoutFrm *pUpper, SwFrm *pSibling )
}
-BOOL _FndBoxCopyCol( const SwTableBox*& rpBox, void* pPara )
+sal_Bool _FndBoxCopyCol( const SwTableBox*& rpBox, void* pPara )
{
_FndPara* pFndPara = (_FndPara*)pPara;
_FndBox* pFndBox = new _FndBox( (SwTableBox*)rpBox, pFndPara->pFndLine );
@@ -2141,25 +2147,25 @@ BOOL _FndBoxCopyCol( const SwTableBox*& rpBox, void* pPara )
if( !pFndBox->GetLines().Count() )
{
delete pFndBox;
- return TRUE;
+ return sal_True;
}
}
else
{
SwTableBoxPtr pSrch = (SwTableBoxPtr)rpBox;
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
if( !pFndPara->rBoxes.Seek_Entry( pSrch, &nFndPos ))
{
delete pFndBox;
- return TRUE;
+ return sal_True;
}
}
pFndPara->pFndLine->GetBoxes().C40_INSERT( _FndBox, pFndBox,
pFndPara->pFndLine->GetBoxes().Count() );
- return TRUE;
+ return sal_True;
}
-BOOL _FndLineCopyCol( const SwTableLine*& rpLine, void* pPara )
+sal_Bool _FndLineCopyCol( const SwTableLine*& rpLine, void* pPara )
{
_FndPara* pFndPara = (_FndPara*)pPara;
_FndLine* pFndLine = new _FndLine( (SwTableLine*)rpLine, pFndPara->pFndBox );
@@ -2172,7 +2178,7 @@ BOOL _FndLineCopyCol( const SwTableLine*& rpLine, void* pPara )
}
else
delete pFndLine;
- return TRUE;
+ return sal_True;
}
void _FndBox::SetTableLines( const SwSelBoxes &rBoxes, const SwTable &rTable )
@@ -2184,15 +2190,15 @@ void _FndBox::SetTableLines( const SwSelBoxes &rBoxes, const SwTable &rTable )
//Line im Array der SwTable. Damit die 0 fuer 'keine Line' verwand werden
//kann werden die Positionen um 1 nach oben versetzt!
- USHORT nStPos = USHRT_MAX;
- USHORT nEndPos= 0;
+ sal_uInt16 nStPos = USHRT_MAX;
+ sal_uInt16 nEndPos= 0;
- for ( USHORT i = 0; i < rBoxes.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{
SwTableLine *pLine = rBoxes[i]->GetUpper();
while ( pLine->GetUpper() )
pLine = pLine->GetUpper()->GetUpper();
- const USHORT nPos = rTable.GetTabLines().GetPos(
+ const sal_uInt16 nPos = rTable.GetTabLines().GetPos(
(const SwTableLine*&)pLine ) + 1;
OSL_ENSURE( nPos != USHRT_MAX, "TableLine not found." );
@@ -2222,7 +2228,7 @@ void _FndBox::SetTableLines( const SwTable &rTable )
return;
SwTableLine* pTmpLine = GetLines()[0]->GetLine();
- USHORT nPos = rTable.GetTabLines().C40_GETPOS( SwTableLine, pTmpLine );
+ sal_uInt16 nPos = rTable.GetTabLines().C40_GETPOS( SwTableLine, pTmpLine );
OSL_ENSURE( USHRT_MAX != nPos, "Line steht nicht in der Tabelle" );
if( nPos )
pLineBefore = rTable.GetTabLines()[ nPos - 1 ];
@@ -2236,7 +2242,7 @@ void _FndBox::SetTableLines( const SwTable &rTable )
inline void UnsetFollow( SwFlowFrm *pTab )
{
- pTab->bIsFollow = FALSE;
+ pTab->bIsFollow = sal_False;
}
void _FndBox::DelFrms( SwTable &rTable )
@@ -2247,8 +2253,8 @@ void _FndBox::DelFrms( SwTable &rTable )
//Wird ein Master vernichtet, so muss der Follow Master werden.
//Ein TabFrm muss immer uebrigbleiben.
- USHORT nStPos = 0;
- USHORT nEndPos= rTable.GetTabLines().Count() - 1;
+ sal_uInt16 nStPos = 0;
+ sal_uInt16 nEndPos= rTable.GetTabLines().Count() - 1;
if( rTable.IsNewModel() && pLineBefore )
rTable.CheckRowSpan( pLineBefore, true );
if ( pLineBefore )
@@ -2268,7 +2274,7 @@ void _FndBox::DelFrms( SwTable &rTable )
--nEndPos;
}
- for ( USHORT i = nStPos; i <= nEndPos; ++i)
+ for ( sal_uInt16 i = nStPos; i <= nEndPos; ++i)
{
SwFrmFmt *pFmt = rTable.GetTabLines()[i]->GetFrmFmt();
SwClientIter aIter( *pFmt );
@@ -2280,12 +2286,12 @@ void _FndBox::DelFrms( SwTable &rTable )
if ( pFrm &&
((SwRowFrm*)pFrm)->GetTabLine() == rTable.GetTabLines()[i] )
{
- BOOL bDel = TRUE;
+ sal_Bool bDel = sal_True;
SwTabFrm *pUp = !pFrm->GetPrev() && !pFrm->GetNext() ?
(SwTabFrm*)pFrm->GetUpper() : 0;
if ( !pUp )
{
- const USHORT nRepeat =
+ const sal_uInt16 nRepeat =
((SwTabFrm*)pFrm->GetUpper())->GetTable()->GetRowsToRepeat();
if ( nRepeat > 0 &&
((SwTabFrm*)pFrm->GetUpper())->IsFollow() )
@@ -2319,7 +2325,7 @@ void _FndBox::DelFrms( SwTable &rTable )
// flag from pUp to pPrev. pUp may still have the
// flag set although there is not more follow flow
// line associated with pUp.
- pPrev->SetFollowFlowLine( FALSE );
+ pPrev->SetFollowFlowLine( sal_False );
// <--
}
else if ( pFollow )
@@ -2345,7 +2351,7 @@ void _FndBox::DelFrms( SwTable &rTable )
}
}
delete pUp;
- bDel = FALSE;//Die Row wird mit in den Abgrund
+ bDel = sal_False;//Die Row wird mit in den Abgrund
//gerissen.
}
}
@@ -2359,7 +2365,7 @@ void _FndBox::DelFrms( SwTable &rTable )
// We do not delete the follow flow line,
// this will be done automatically in the
// next turn.
- ((SwTabFrm*)pTabFrm)->SetFollowFlowLine( FALSE );
+ ((SwTabFrm*)pTabFrm)->SetFollowFlowLine( sal_False );
}
pFrm->Cut();
@@ -2371,7 +2377,7 @@ void _FndBox::DelFrms( SwTable &rTable )
}
}
-BOOL lcl_IsLineOfTblFrm( const SwTabFrm& rTable, const SwFrm& rChk )
+sal_Bool lcl_IsLineOfTblFrm( const SwTabFrm& rTable, const SwFrm& rChk )
{
const SwTabFrm* pTblFrm = rChk.FindTabFrm();
if( pTblFrm->IsFollow() )
@@ -2397,8 +2403,8 @@ void lcl_UpdateRepeatedHeadlines( SwTabFrm& rTabFrm, bool bCalcLowers )
// Insert fresh set of headlines:
pLower = (SwRowFrm*)rTabFrm.Lower();
SwTable& rTable = *rTabFrm.GetTable();
- const USHORT nRepeat = rTable.GetRowsToRepeat();
- for ( USHORT nIdx = 0; nIdx < nRepeat; ++nIdx )
+ const sal_uInt16 nRepeat = rTable.GetRowsToRepeat();
+ for ( sal_uInt16 nIdx = 0; nIdx < nRepeat; ++nIdx )
{
SwRowFrm* pHeadline = new SwRowFrm(
*rTable.GetTabLines()[ nIdx ] );
@@ -2417,8 +2423,8 @@ void _FndBox::MakeFrms( SwTable &rTable )
//wieder neu erzeugt werden.
//Und Zwar fuer alle Auspraegungen der Tabelle (mehrere z.B. im Kopf/Fuss).
- USHORT nStPos = 0;
- USHORT nEndPos= rTable.GetTabLines().Count() - 1;
+ sal_uInt16 nStPos = 0;
+ sal_uInt16 nEndPos= rTable.GetTabLines().Count() - 1;
if ( pLineBefore )
{
nStPos = rTable.GetTabLines().GetPos(
@@ -2448,7 +2454,7 @@ void _FndBox::MakeFrms( SwTable &rTable )
i >= 0 && !pSibling; --i )
{
SwTableLine *pLine = pLineBehind ? pLineBehind :
- rTable.GetTabLines()[static_cast<USHORT>(i)];
+ rTable.GetTabLines()[static_cast<sal_uInt16>(i)];
SwClientIter aIter( *pLine->GetFrmFmt() );
pSibling = (SwFrm*)aIter.First( TYPE(SwFrm) );
while ( pSibling && (
@@ -2474,8 +2480,8 @@ void _FndBox::MakeFrms( SwTable &rTable )
// ???? oder das der Letzte Follow der Tabelle ????
pUpperFrm = pTable;
- for ( i = nStPos; (USHORT)i <= nEndPos; ++i )
- ::lcl_InsertRow( *rTable.GetTabLines()[static_cast<USHORT>(i)],
+ for ( i = nStPos; (sal_uInt16)i <= nEndPos; ++i )
+ ::lcl_InsertRow( *rTable.GetTabLines()[static_cast<sal_uInt16>(i)],
(SwLayoutFrm*)pUpperFrm, pSibling );
if ( pUpperFrm->IsTabFrm() )
((SwTabFrm*)pUpperFrm)->SetCalcLowers();
@@ -2488,23 +2494,23 @@ void _FndBox::MakeFrms( SwTable &rTable )
}
}
-void _FndBox::MakeNewFrms( SwTable &rTable, const USHORT nNumber,
- const BOOL bBehind )
+void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber,
+ const sal_Bool bBehind )
{
//Frms fuer neu eingefuege Zeilen erzeugen.
- //bBehind == TRUE: vor pLineBehind
- // == FALSE: hinter pLineBefore
- const USHORT nBfPos = pLineBefore ?
+ //bBehind == sal_True: vor pLineBehind
+ // == sal_False: hinter pLineBefore
+ const sal_uInt16 nBfPos = pLineBefore ?
rTable.GetTabLines().GetPos( (const SwTableLine*&)pLineBefore ) :
USHRT_MAX;
- const USHORT nBhPos = pLineBehind ?
+ const sal_uInt16 nBhPos = pLineBehind ?
rTable.GetTabLines().GetPos( (const SwTableLine*&)pLineBehind ) :
USHRT_MAX;
//nNumber: wie oft ist eingefuegt worden.
//nCnt: wieviele sind nNumber mal eingefuegt worden.
- const USHORT nCnt =
+ const sal_uInt16 nCnt =
((nBhPos != USHRT_MAX ? nBhPos : rTable.GetTabLines().Count()) -
(nBfPos != USHRT_MAX ? nBfPos + 1 : 0)) / (nNumber + 1);
@@ -2545,10 +2551,10 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const USHORT nNumber,
pTable = pTable->GetFollow();
pUpperFrm = pTable;
}
- const USHORT nMax = nBhPos != USHRT_MAX ?
+ const sal_uInt16 nMax = nBhPos != USHRT_MAX ?
nBhPos : rTable.GetTabLines().Count();
- USHORT i = nBfPos != USHRT_MAX ? nBfPos + 1 + nCnt : nCnt;
+ sal_uInt16 i = nBfPos != USHRT_MAX ? nBfPos + 1 + nCnt : nCnt;
for ( ; i < nMax; ++i )
::lcl_InsertRow( *rTable.GetTabLines()[i], pUpperFrm, pSibling );
@@ -2557,7 +2563,7 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const USHORT nNumber,
}
else //davor einfuegen
{
- USHORT i;
+ sal_uInt16 i;
// We are looking for the frame that is behind the row frame
// that should be inserted.
@@ -2593,7 +2599,7 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const USHORT nNumber,
if ( pLineBefore )
pSibling = pSibling->GetNext();
- USHORT nMax = nBhPos != USHRT_MAX ?
+ sal_uInt16 nMax = nBhPos != USHRT_MAX ?
nBhPos - nCnt :
rTable.GetTabLines().Count() - nCnt;
@@ -2609,7 +2615,7 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const USHORT nNumber,
//Die Headlines mussen ggf. auch verarbeitet werden. Um gut arbeitenden
//Code nicht zu zerfasern wird hier nochmals iteriert.
- const USHORT nRowsToRepeat = rTable.GetRowsToRepeat();
+ const sal_uInt16 nRowsToRepeat = rTable.GetRowsToRepeat();
if ( nRowsToRepeat > 0 &&
( ( !bBehind && ( nBfPos == USHRT_MAX || nBfPos + 1 < nRowsToRepeat ) ) ||
( bBehind && ( ( nBfPos == USHRT_MAX && nRowsToRepeat > 1 ) || nBfPos + 2 < nRowsToRepeat ) ) ) )
@@ -2631,14 +2637,14 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const USHORT nNumber,
}
}
-BOOL _FndBox::AreLinesToRestore( const SwTable &rTable ) const
+sal_Bool _FndBox::AreLinesToRestore( const SwTable &rTable ) const
{
//Lohnt es sich MakeFrms zu rufen?
if ( !pLineBefore && !pLineBehind && rTable.GetTabLines().Count() )
- return TRUE;
+ return sal_True;
- USHORT nBfPos;
+ sal_uInt16 nBfPos;
if(pLineBefore)
{
const SwTableLine* rLBefore = (const SwTableLine*)pLineBefore;
@@ -2647,7 +2653,7 @@ BOOL _FndBox::AreLinesToRestore( const SwTable &rTable ) const
else
nBfPos = USHRT_MAX;
- USHORT nBhPos;
+ sal_uInt16 nBhPos;
if(pLineBehind)
{
const SwTableLine* rLBehind = (const SwTableLine*)pLineBehind;
@@ -2658,8 +2664,8 @@ BOOL _FndBox::AreLinesToRestore( const SwTable &rTable ) const
if ( nBfPos == nBhPos ) //Duerfte eigentlich nie vorkommen.
{
- OSL_ENSURE( FALSE, "Table, Loeschen auf keinem Bereich !?!" );
- return FALSE;
+ OSL_ENSURE( sal_False, "Table, Loeschen auf keinem Bereich !?!" );
+ return sal_False;
}
if ( rTable.GetRowsToRepeat() > 0 )
@@ -2680,19 +2686,19 @@ BOOL _FndBox::AreLinesToRestore( const SwTable &rTable ) const
// Some adjacent lines at the beginning of the table have been deleted:
if ( nBfPos == USHRT_MAX && nBhPos == 0 )
- return FALSE;
+ return sal_False;
// Some adjacent lines at the end of the table have been deleted:
if ( nBhPos == USHRT_MAX && nBfPos == (rTable.GetTabLines().Count() - 1) )
- return FALSE;
+ return sal_False;
// Some adjacent lines in the middle of the table have been deleted:
if ( nBfPos != USHRT_MAX && nBhPos != USHRT_MAX && (nBfPos + 1) == nBhPos )
- return FALSE;
+ return sal_False;
// The structure of the deleted lines is more complex due to split lines.
// A call of MakeFrms() is necessary.
- return TRUE;
+ return sal_True;
}
diff --git a/sw/source/core/graphic/grfatr.cxx b/sw/source/core/graphic/grfatr.cxx
index a58a810e2f18..e652a0a12c2b 100644
--- a/sw/source/core/graphic/grfatr.cxx
+++ b/sw/source/core/graphic/grfatr.cxx
@@ -76,19 +76,19 @@ int SwMirrorGrf::operator==( const SfxPoolItem& rItem) const
((SwMirrorGrf&)rItem).IsGrfToggle() == IsGrfToggle();
}
-BOOL lcl_IsHoriOnEvenPages(int nEnum, BOOL bToggle)
+sal_Bool lcl_IsHoriOnEvenPages(int nEnum, sal_Bool bToggle)
{
- BOOL bEnum = nEnum == RES_MIRROR_GRAPH_VERT ||
+ sal_Bool bEnum = nEnum == RES_MIRROR_GRAPH_VERT ||
nEnum == RES_MIRROR_GRAPH_BOTH;
return bEnum != bToggle;
}
-BOOL lcl_IsHoriOnOddPages(int nEnum)
+sal_Bool lcl_IsHoriOnOddPages(int nEnum)
{
- BOOL bEnum = nEnum == RES_MIRROR_GRAPH_VERT ||
+ sal_Bool bEnum = nEnum == RES_MIRROR_GRAPH_VERT ||
nEnum == RES_MIRROR_GRAPH_BOTH;
return bEnum;
}
-bool SwMirrorGrf::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SwMirrorGrf::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
bool bRet = true;
sal_Bool bVal;
@@ -114,7 +114,7 @@ bool SwMirrorGrf::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return bRet;
}
-bool SwMirrorGrf::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SwMirrorGrf::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
bool bRet = true;
sal_Bool bVal = *(sal_Bool*)rVal.getValue();
@@ -125,17 +125,17 @@ bool SwMirrorGrf::PutValue( const uno::Any& rVal, BYTE nMemberId )
case MID_MIRROR_HORZ_EVEN_PAGES:
case MID_MIRROR_HORZ_ODD_PAGES:
{
- BOOL bIsVert = GetValue() == RES_MIRROR_GRAPH_HOR ||
+ sal_Bool bIsVert = GetValue() == RES_MIRROR_GRAPH_HOR ||
GetValue() == RES_MIRROR_GRAPH_BOTH;
- BOOL bOnOddPages = nMemberId == MID_MIRROR_HORZ_EVEN_PAGES ?
+ sal_Bool bOnOddPages = nMemberId == MID_MIRROR_HORZ_EVEN_PAGES ?
lcl_IsHoriOnOddPages(GetValue()) : bVal;
- BOOL bOnEvenPages = nMemberId == MID_MIRROR_HORZ_ODD_PAGES ?
+ sal_Bool bOnEvenPages = nMemberId == MID_MIRROR_HORZ_ODD_PAGES ?
lcl_IsHoriOnEvenPages(GetValue(), IsGrfToggle()) : bVal;
MirrorGraph nEnum = bOnOddPages ?
bIsVert ? RES_MIRROR_GRAPH_BOTH : RES_MIRROR_GRAPH_VERT :
bIsVert ? RES_MIRROR_GRAPH_HOR : RES_MIRROR_GRAPH_DONT;
- BOOL bToggle = bOnOddPages != bOnEvenPages;
- SetValue(static_cast<USHORT>(nEnum));
+ sal_Bool bToggle = bOnOddPages != bOnEvenPages;
+ SetValue(static_cast<sal_uInt16>(nEnum));
SetGrfToggle( bToggle );
}
break;
@@ -195,7 +195,7 @@ int SwRotationGrf::operator==( const SfxPoolItem& rCmp ) const
}
-bool SwRotationGrf::QueryValue( uno::Any& rVal, BYTE ) const
+bool SwRotationGrf::QueryValue( uno::Any& rVal, sal_uInt8 ) const
{
// SfxUInt16Item::QueryValue returns sal_Int32 in Any now... (srx642w)
// where we still want this to be a sal_Int16
@@ -203,15 +203,15 @@ bool SwRotationGrf::QueryValue( uno::Any& rVal, BYTE ) const
return true;
}
-bool SwRotationGrf::PutValue( const uno::Any& rVal, BYTE )
+bool SwRotationGrf::PutValue( const uno::Any& rVal, sal_uInt8 )
{
// SfxUInt16Item::QueryValue returns sal_Int32 in Any now... (srx642w)
// where we still want this to be a sal_Int16
sal_Int16 nValue = 0;
if (rVal >>= nValue)
{
- // UINT16 argument needed
- SetValue( (UINT16) nValue );
+ // sal_uInt16 argument needed
+ SetValue( (sal_uInt16) nValue );
return true;
}
@@ -267,13 +267,13 @@ int SwGammaGrf::operator==( const SfxPoolItem& rCmp ) const
nValue == ((SwGammaGrf&)rCmp).GetValue();
}
-bool SwGammaGrf::QueryValue( uno::Any& rVal, BYTE ) const
+bool SwGammaGrf::QueryValue( uno::Any& rVal, sal_uInt8 ) const
{
rVal <<= nValue;
return true;
}
-bool SwGammaGrf::PutValue( const uno::Any& rVal, BYTE )
+bool SwGammaGrf::PutValue( const uno::Any& rVal, sal_uInt8 )
{
return rVal >>= nValue;
}
@@ -293,7 +293,7 @@ SfxPoolItem* SwTransparencyGrf::Clone( SfxItemPool * ) const
}
// ------------------------------------------------------------------
bool SwTransparencyGrf::QueryValue( uno::Any& rVal,
- BYTE ) const
+ sal_uInt8 ) const
{
DBG_ASSERT(ISA(SfxByteItem),"Put/QueryValue should be removed!");
sal_Int16 nRet = GetValue();
@@ -303,7 +303,7 @@ bool SwTransparencyGrf::QueryValue( uno::Any& rVal,
}
// ------------------------------------------------------------------
bool SwTransparencyGrf::PutValue( const uno::Any& rVal,
- BYTE )
+ sal_uInt8 )
{
//temporary conversion until this is a SfxInt16Item!
DBG_ASSERT(ISA(SfxByteItem),"Put/QueryValue should be removed!");
@@ -318,7 +318,7 @@ bool SwTransparencyGrf::PutValue( const uno::Any& rVal,
nVal += 128;
}
DBG_ASSERT( 0 <= nVal && nVal <= 100, "value out of range" );
- SetValue(static_cast<BYTE>(nVal));
+ SetValue(static_cast<sal_uInt8>(nVal));
return true;
}
@@ -329,13 +329,13 @@ SfxPoolItem* SwDrawModeGrf::Clone( SfxItemPool * ) const
return new SwDrawModeGrf( *this );
}
-USHORT SwDrawModeGrf::GetValueCount() const
+sal_uInt16 SwDrawModeGrf::GetValueCount() const
{
return GRAPHICDRAWMODE_WATERMARK + 1;
}
bool SwDrawModeGrf::QueryValue( uno::Any& rVal,
- BYTE ) const
+ sal_uInt8 ) const
{
drawing::ColorMode eRet = (drawing::ColorMode)GetEnumValue();
rVal <<= eRet;
@@ -343,12 +343,12 @@ bool SwDrawModeGrf::QueryValue( uno::Any& rVal,
}
bool SwDrawModeGrf::PutValue( const uno::Any& rVal,
- BYTE )
+ sal_uInt8 )
{
sal_Int32 eVal = SWUnoHelper::GetEnumAsInt32( rVal );
if(eVal >= 0 && eVal <= GRAPHICDRAWMODE_WATERMARK)
{
- SetEnumValue((USHORT)eVal);
+ SetEnumValue((sal_uInt16)eVal);
return true;
}
return false;
diff --git a/sw/source/core/graphic/makefile.mk b/sw/source/core/graphic/makefile.mk
deleted file mode 100644
index bb637de66610..000000000000
--- a/sw/source/core/graphic/makefile.mk
+++ /dev/null
@@ -1,53 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=graphic
-
-AUTOSEG=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/grfatr.obj \
- $(SLO)$/ndgrf.obj
-
-EXCEPTIONSFILES= \
- $(SLO)$/ndgrf.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 9ad221c52e82..73b6c04237b2 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -83,10 +83,10 @@ SwGrfNode::SwGrfNode(
{
aGrfObj.SetSwapStreamHdl( LINK( this, SwGrfNode, SwapGraphic ) );
bInSwapIn = bChgTwipSize = bChgTwipSizeFromPixel = bLoadLowResGrf =
- bFrameInPaint = bScaleImageMap = FALSE;
+ bFrameInPaint = bScaleImageMap = sal_False;
- bGrafikArrived = TRUE;
- ReRead(rGrfName,rFltName, pGraphic, 0, FALSE);
+ bGrafikArrived = sal_True;
+ ReRead(rGrfName,rFltName, pGraphic, 0, sal_False);
}
SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
@@ -103,8 +103,8 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
if( rGrfObj.HasUserData() && rGrfObj.IsSwappedOut() )
aGrfObj.SetSwapState();
bInSwapIn = bChgTwipSize = bChgTwipSizeFromPixel= bLoadLowResGrf =
- bFrameInPaint = bScaleImageMap = FALSE;
- bGrafikArrived = TRUE;
+ bFrameInPaint = bScaleImageMap = sal_False;
+ bGrafikArrived = sal_True;
}
// Konstruktor fuer den SW/G-Reader. Dieser ctor wird verwendet,
@@ -127,8 +127,8 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
aGrfObj.SetGraphic( aGrf, rGrfName );
bInSwapIn = bChgTwipSize = bChgTwipSizeFromPixel = bLoadLowResGrf =
- bFrameInPaint = bScaleImageMap = FALSE;
- bGrafikArrived = TRUE;
+ bFrameInPaint = bScaleImageMap = sal_False;
+ bGrafikArrived = sal_True;
InsertLink( rGrfName, rFltName );
if( IsLinkedFile() )
@@ -143,12 +143,12 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere,
}
}
-BOOL SwGrfNode::ReRead(
+sal_Bool SwGrfNode::ReRead(
const String& rGrfName, const String& rFltName,
const Graphic* pGraphic, const GraphicObject* pGrfObj,
- BOOL bNewGrf )
+ sal_Bool bNewGrf )
{
- BOOL bReadGrf = FALSE, bSetTwipSize = TRUE;
+ sal_Bool bReadGrf = sal_False, bSetTwipSize = sal_True;
OSL_ENSURE( pGraphic || pGrfObj || rGrfName.Len(),
"GraphicNode without a name, Graphic or GraphicObject" );
@@ -165,7 +165,7 @@ BOOL SwGrfNode::ReRead(
String sCmd( rGrfName );
if( rFltName.Len() )
{
- USHORT nNewType;
+ sal_uInt16 nNewType;
if( rFltName.EqualsAscii( "DDE" ))
nNewType = OBJECT_CLIENT_DDE;
else
@@ -192,7 +192,7 @@ BOOL SwGrfNode::ReRead(
if( pGraphic )
{
aGrfObj.SetGraphic( *pGraphic, rGrfName );
- bReadGrf = TRUE;
+ bReadGrf = sal_True;
}
else if( pGrfObj )
{
@@ -200,7 +200,7 @@ BOOL SwGrfNode::ReRead(
if( pGrfObj->HasUserData() && pGrfObj->IsSwappedOut() )
aGrfObj.SetSwapState();
aGrfObj.SetLink( rGrfName );
- bReadGrf = TRUE;
+ bReadGrf = sal_True;
}
else
{
@@ -227,7 +227,7 @@ BOOL SwGrfNode::ReRead(
((SwBaseLink*)&refLink)->SwapIn();
}
}
- bSetTwipSize = FALSE;
+ bSetTwipSize = sal_False;
}
}
else if( pGraphic && !rGrfName.Len() )
@@ -237,7 +237,7 @@ BOOL SwGrfNode::ReRead(
DelStreamName();
aGrfObj.SetGraphic( *pGraphic );
- bReadGrf = TRUE;
+ bReadGrf = sal_True;
}
else if( pGrfObj && !rGrfName.Len() )
{
@@ -248,12 +248,12 @@ BOOL SwGrfNode::ReRead(
aGrfObj = *pGrfObj;
if( pGrfObj->HasUserData() && pGrfObj->IsSwappedOut() )
aGrfObj.SetSwapState();
- bReadGrf = TRUE;
+ bReadGrf = sal_True;
}
// Import einer Grafik:
// Ist die Grafik bereits geladen?
else if( !bNewGrf && GRAPHIC_NONE != aGrfObj.GetType() )
- return TRUE;
+ return sal_True;
else
{
@@ -268,7 +268,7 @@ BOOL SwGrfNode::ReRead(
if( pGraphic )
{
aGrfObj.SetGraphic( *pGraphic, rGrfName );
- bReadGrf = TRUE;
+ bReadGrf = sal_True;
// Verbindung herstellen ohne ein Update; Grafik haben wir!
((SwBaseLink*)&refLink)->Connect();
}
@@ -276,7 +276,7 @@ BOOL SwGrfNode::ReRead(
{
aGrfObj = *pGrfObj;
aGrfObj.SetLink( rGrfName );
- bReadGrf = TRUE;
+ bReadGrf = sal_True;
// Verbindung herstellen ohne ein Update; Grafik haben wir!
((SwBaseLink*)&refLink)->Connect();
}
@@ -360,7 +360,7 @@ SwGrfNode * SwNodes::MakeGrfNode( const SwNodeIndex & rWhere,
const Graphic* pGraphic,
SwGrfFmtColl* pGrfColl,
SwAttrSet* pAutoAttr,
- BOOL bDelayed )
+ sal_Bool bDelayed )
{
OSL_ENSURE( pGrfColl, "MakeGrfNode: Formatpointer ist 0." );
SwGrfNode *pNode;
@@ -391,7 +391,7 @@ Size SwGrfNode::GetTwipSize() const
-BOOL SwGrfNode::ImportGraphic( SvStream& rStrm )
+sal_Bool SwGrfNode::ImportGraphic( SvStream& rStrm )
{
Graphic aGraphic;
if( !GraphicFilter::GetGraphicFilter()->ImportGraphic( aGraphic, String(), rStrm ) )
@@ -400,10 +400,10 @@ BOOL SwGrfNode::ImportGraphic( SvStream& rStrm )
aGrfObj.SetGraphic( aGraphic );
aGrfObj.SetUserData( aUserData );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// Returnwert:
@@ -411,13 +411,13 @@ BOOL SwGrfNode::ImportGraphic( SvStream& rStrm )
// 0 : nicht geladen
// 1 : Einlesen erfolgreich
-short SwGrfNode::SwapIn( BOOL bWaitForData )
+short SwGrfNode::SwapIn( sal_Bool bWaitForData )
{
if( bInSwapIn ) // nicht rekuriv!!
return !aGrfObj.IsSwappedOut();
short nRet = 0;
- bInSwapIn = TRUE;
+ bInSwapIn = sal_True;
SwBaseLink* pLink = (SwBaseLink*)(::sfx2::SvBaseLink*) refLink;
if( pLink )
@@ -493,7 +493,7 @@ short SwGrfNode::SwapIn( BOOL bWaitForData )
if( !nGrfSize.Width() && !nGrfSize.Height() )
SetTwipSize( ::GetGraphicSizeTwip( aGrfObj.GetGraphic(), 0 ) );
}
- bInSwapIn = FALSE;
+ bInSwapIn = sal_False;
return nRet;
}
@@ -521,12 +521,12 @@ short SwGrfNode::SwapOut()
}
-BOOL SwGrfNode::GetFileFilterNms( String* pFileNm, String* pFilterNm ) const
+sal_Bool SwGrfNode::GetFileFilterNms( String* pFileNm, String* pFilterNm ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( refLink.Is() && refLink->GetLinkManager() )
{
- USHORT nType = refLink->GetObjType();
+ sal_uInt16 nType = refLink->GetObjType();
if( OBJECT_CLIENT_GRF == nType )
bRet = refLink->GetLinkManager()->GetDisplayNames(
refLink, 0, pFileNm, 0, pFilterNm );
@@ -540,7 +540,7 @@ BOOL SwGrfNode::GetFileFilterNms( String* pFileNm, String* pFilterNm ) const
( *pFileNm += sTopic ) += sfx2::cTokenSeperator;
*pFileNm += sItem;
pFilterNm->AssignAscii( RTL_CONSTASCII_STRINGPARAM( "DDE" ));
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -551,18 +551,18 @@ BOOL SwGrfNode::GetFileFilterNms( String* pFileNm, String* pFilterNm ) const
// Eine Grafik Undo-faehig machen. Falls sie sich bereits in
// einem Storage befindet, muss sie geladen werden.
-BOOL SwGrfNode::SavePersistentData()
+sal_Bool SwGrfNode::SavePersistentData()
{
if( refLink.Is() )
{
OSL_ENSURE( !bInSwapIn, "SavePersistentData: stehe noch im SwapIn" );
GetDoc()->GetLinkManager().Remove( refLink );
- return TRUE;
+ return sal_True;
}
// Erst mal reinswappen, falls sie im Storage ist
if( HasStreamName() && !SwapIn() )
- return FALSE;
+ return sal_False;
// --> OD 2005-04-19 #i44367#
// Do not delete graphic file in storage, because the graphic file could
@@ -579,11 +579,11 @@ BOOL SwGrfNode::SavePersistentData()
// <--
// Und in TempFile rausswappen
- return (BOOL) SwapOut();
+ return (sal_Bool) SwapOut();
}
-BOOL SwGrfNode::RestorePersistentData()
+sal_Bool SwGrfNode::RestorePersistentData()
{
if( refLink.Is() )
{
@@ -593,7 +593,7 @@ BOOL SwGrfNode::RestorePersistentData()
if( getIDocumentLayoutAccess()->GetRootFrm() )
refLink->Update();
}
- return TRUE;
+ return sal_True;
}
@@ -607,7 +607,7 @@ void SwGrfNode::InsertLink( const String& rGrfName, const String& rFltName )
refLink->SetVisible( pIDLA->IsVisibleLinks() );
if( rFltName.EqualsAscii( "DDE" ))
{
- USHORT nTmp = 0;
+ sal_uInt16 nTmp = 0;
String sApp, sTopic, sItem;
sApp = rGrfName.GetToken( 0, sfx2::cTokenSeperator, nTmp );
sTopic = rGrfName.GetToken( 0, sfx2::cTokenSeperator, nTmp );
@@ -617,7 +617,7 @@ void SwGrfNode::InsertLink( const String& rGrfName, const String& rFltName )
}
else
{
- BOOL bSync = rFltName.EqualsAscii( "SYNCHRON" );
+ sal_Bool bSync = rFltName.EqualsAscii( "SYNCHRON" );
refLink->SetSynchron( bSync );
refLink->SetContentType( SOT_FORMATSTR_ID_SVXB );
@@ -635,11 +635,11 @@ void SwGrfNode::ReleaseLink()
if( refLink.Is() )
{
{
- bInSwapIn = TRUE;
+ bInSwapIn = sal_True;
SwBaseLink* pLink = (SwBaseLink*)(::sfx2::SvBaseLink*) refLink;
//TODO pLink->setInputStream(getInputStream());
- pLink->SwapIn( TRUE, TRUE );
- bInSwapIn = FALSE;
+ pLink->SwapIn( sal_True, sal_True );
+ bInSwapIn = sal_False;
}
getIDocumentLinksAdministration()->GetLinkManager().Remove( refLink );
refLink.Clear();
@@ -657,7 +657,7 @@ void SwGrfNode::SetTwipSize( const Size& rSz )
ScaleImageMap();
// Image-Map nicht noch einmal skalieren
- SetScaleImageMap( FALSE );
+ SetScaleImageMap( sal_False );
}
}
@@ -676,7 +676,7 @@ void SwGrfNode::ScaleImageMap()
if ( !aURL.GetMap() )
return;
- BOOL bScale = FALSE;
+ sal_Bool bScale = sal_False;
Fraction aScaleX( 1, 1 );
Fraction aScaleY( 1, 1 );
@@ -695,7 +695,7 @@ void SwGrfNode::ScaleImageMap()
if( nGrfSize.Width() != nWidth )
{
aScaleX = Fraction( nGrfSize.Width(), nWidth );
- bScale = TRUE;
+ bScale = sal_True;
}
}
if( !rFrmSize.GetHeightPercent() )
@@ -710,7 +710,7 @@ void SwGrfNode::ScaleImageMap()
if( nGrfSize.Height() != nHeight )
{
aScaleY = Fraction( nGrfSize.Height(), nHeight );
- bScale = TRUE;
+ bScale = sal_True;
}
}
@@ -951,9 +951,9 @@ IMPL_LINK( SwGrfNode, SwapGraphic, GraphicObject*, pGrfObj )
// then make it by your self
if( !bInSwapIn )
{
- BOOL bIsModifyLocked = IsModifyLocked();
+ sal_Bool bIsModifyLocked = IsModifyLocked();
LockModify();
- SwapIn( FALSE );
+ SwapIn( sal_False );
if( !bIsModifyLocked )
UnlockModify();
}
@@ -1015,7 +1015,7 @@ void DelAllGrfCacheEntries( SwDoc* pDoc )
const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.GetLinks();
SwGrfNode* pGrfNd;
String sFileNm;
- for( USHORT n = rLnks.Count(); n; )
+ for( sal_uInt16 n = rLnks.Count(); n; )
{
::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]);
if( pLnk && OBJECT_CLIENT_GRF == pLnk->GetObjType() &&
@@ -1038,7 +1038,7 @@ GraphicAttr& SwGrfNode::GetGraphicAttr( GraphicAttr& rGA,
rGA.SetDrawMode( (GraphicDrawMode)rSet.GetDrawModeGrf().GetValue() );
const SwMirrorGrf & rMirror = rSet.GetMirrorGrf();
- ULONG nMirror = BMP_MIRROR_NONE;
+ sal_uLong nMirror = BMP_MIRROR_NONE;
if( rMirror.IsGrfToggle() && pFrm && !pFrm->FindPageFrm()->OnRightPage() )
{
switch( rMirror.GetValue() )
@@ -1079,15 +1079,15 @@ GraphicAttr& SwGrfNode::GetGraphicAttr( GraphicAttr& rGA,
rGA.SetInvert( rSet.GetInvertGrf().GetValue() );
const sal_uInt16 nTrans = rSet.GetTransparencyGrf().GetValue();
- rGA.SetTransparency( (BYTE) FRound(
- Min( nTrans, (USHORT) 100 ) * 2.55 ) );
+ rGA.SetTransparency( (sal_uInt8) FRound(
+ Min( nTrans, (sal_uInt16) 100 ) * 2.55 ) );
return rGA;
}
-BOOL SwGrfNode::IsTransparent() const
+sal_Bool SwGrfNode::IsTransparent() const
{
- BOOL bRet = aGrfObj.IsTransparent();
+ sal_Bool bRet = aGrfObj.IsTransparent();
if( !bRet ) // ask the attribut
bRet = 0 != GetSwAttrSet().GetTransparencyGrf().GetValue();
@@ -1095,9 +1095,9 @@ BOOL SwGrfNode::IsTransparent() const
}
-BOOL SwGrfNode::IsSelected() const
+sal_Bool SwGrfNode::IsSelected() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwEditShell* pESh = GetDoc()->GetEditShell();
if( pESh )
{
@@ -1107,7 +1107,7 @@ BOOL SwGrfNode::IsSelected() const
if( pV->ISA( SwEditShell ) && pN == &((SwCrsrShell*)pV)
->GetCrsr()->GetPoint()->nNode.GetNode() )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
}
diff --git a/sw/source/core/inc/GetMetricVal.hxx b/sw/source/core/inc/GetMetricVal.hxx
index 610bd935dc86..a752aa53b0d1 100644
--- a/sw/source/core/inc/GetMetricVal.hxx
+++ b/sw/source/core/inc/GetMetricVal.hxx
@@ -34,14 +34,14 @@
#define CM_05 1 // 0.5 centimeter or 1/4 inch
#define CM_01 2 // 0.1 centimeter or 1/20 inch
-inline USHORT GetMetricVal( int n )
+inline sal_uInt16 GetMetricVal( int n )
{
#ifdef USE_MEASUREMENT
- USHORT nVal = MEASURE_METRIC == SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
+ sal_uInt16 nVal = MEASURE_METRIC == SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()
? 567 // 1 cm
: 770; // 1/2 Inch
#else
- USHORT nVal = 567; // 1 cm
+ sal_uInt16 nVal = 567; // 1 cm
#endif
if( CM_01 == n )
diff --git a/sw/source/core/inc/SwPortionHandler.hxx b/sw/source/core/inc/SwPortionHandler.hxx
index 7830e59e46d8..a78e00bbc753 100644
--- a/sw/source/core/inc/SwPortionHandler.hxx
+++ b/sw/source/core/inc/SwPortionHandler.hxx
@@ -61,8 +61,8 @@ public:
* model string.
*/
virtual void Text(
- USHORT nLength, /// length of this portion in the model string
- USHORT nType /// type of this portion
+ sal_uInt16 nLength, /// length of this portion in the model string
+ sal_uInt16 nType /// type of this portion
) = 0;
/** special portion. This method is called for every non-text
@@ -71,9 +71,9 @@ public:
* the text which is displayed, and the type of the portion.
*/
virtual void Special(
- USHORT nLength, /// length of this portion in the model string
+ sal_uInt16 nLength, /// length of this portion in the model string
const String& rText, /// text which is painted on-screen
- USHORT nType /// type of this portion
+ sal_uInt16 nType /// type of this portion
) = 0;
/** line break. This method is called whenever a line break in the
@@ -90,7 +90,7 @@ public:
* Skip() between portions is not allowed.
*/
virtual void Skip(
- USHORT nLength /// number of 'model string' characters to be skipped
+ sal_uInt16 nLength /// number of 'model string' characters to be skipped
) = 0;
/** end of paragraph. This method is to be called when all the
diff --git a/sw/inc/SwUndoFmt.hxx b/sw/source/core/inc/SwUndoFmt.hxx
index d5da4ffcb1c2..0eeb4df3f802 100644
--- a/sw/inc/SwUndoFmt.hxx
+++ b/sw/source/core/inc/SwUndoFmt.hxx
@@ -25,11 +25,13 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _SW_UNDO_TXT_FMT_COLL_HXX
-#define _SW_UNDO_TXT_FMT_COLL_HXX
+#ifndef SW_UNDO_TXT_FMT_COLL_HXX
+#define SW_UNDO_TXT_FMT_COLL_HXX
#include <undobj.hxx>
#include <swundo.hxx>
+#include <numrule.hxx>
+
class SwDoc;
class SwTxtFmtColl;
@@ -45,8 +47,8 @@ protected:
SwDoc * pDoc;
mutable String sNewName;
SfxItemSet * pNewSet;
- USHORT nId; // FmtId related
- BOOL bAuto;
+ sal_uInt16 nId; // FmtId related
+ sal_Bool bAuto;
public:
@@ -54,8 +56,8 @@ public:
SwDoc * pDoc);
virtual ~SwUndoFmtCreate();
- virtual void Undo(SwUndoIter & rIter);
- virtual void Redo(SwUndoIter & rIter);
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
virtual SwRewriter GetRewriter() const;
@@ -71,15 +73,15 @@ protected:
SwDoc * pDoc;
String sOldName;
SfxItemSet aOldSet;
- USHORT nId; // FmtId related
- BOOL bAuto;
+ sal_uInt16 nId; // FmtId related
+ sal_Bool bAuto;
public:
SwUndoFmtDelete(SwUndoId nUndoId, SwFmt * pOld, SwDoc * pDoc);
~SwUndoFmtDelete();
- virtual void Undo(SwUndoIter & rIter);
- virtual void Redo(SwUndoIter & rIter);
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
virtual SwRewriter GetRewriter() const;
@@ -100,8 +102,8 @@ public:
SwDoc * pDoc);
~SwUndoRenameFmt();
- void Undo(SwUndoIter & rIter);
- void Redo(SwUndoIter & rIter);
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
SwRewriter GetRewriter() const;
@@ -172,7 +174,7 @@ public:
class SwUndoFrmFmtCreate : public SwUndoFmtCreate
{
- BOOL bAuto;
+ sal_Bool bAuto;
public:
SwUndoFrmFmtCreate(SwFrmFmt * pNew, SwFrmFmt * pDerivedFrom,
@@ -213,8 +215,8 @@ class SwUndoNumruleCreate : public SwUndo
public:
SwUndoNumruleCreate(const SwNumRule * pNew, SwDoc * pDoc);
- virtual void Undo(SwUndoIter & rIter);
- virtual void Redo(SwUndoIter & rIter);
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
SwRewriter GetRewriter() const;
};
@@ -227,8 +229,8 @@ class SwUndoNumruleDelete : public SwUndo
public:
SwUndoNumruleDelete(const SwNumRule & aRule, SwDoc * pDoc);
- virtual void Undo(SwUndoIter & rIter);
- virtual void Redo(SwUndoIter & rIter);
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
SwRewriter GetRewriter() const;
};
@@ -242,11 +244,12 @@ class SwUndoNumruleRename : public SwUndo
SwUndoNumruleRename(const String & aOldName, const String & aNewName,
SwDoc * pDoc);
- virtual void Undo(SwUndoIter & rIter);
- virtual void Redo(SwUndoIter & rIter);
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
SwRewriter GetRewriter() const;
};
-#endif // _SW_UNDO_TXT_FMT_COLL_HXX
+
+#endif // SW_UNDO_TXT_FMT_COLL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/SwUndoPageDesc.hxx b/sw/source/core/inc/SwUndoPageDesc.hxx
index 29004b3941e0..7acb98053e52 100644
--- a/sw/inc/SwUndoPageDesc.hxx
+++ b/sw/source/core/inc/SwUndoPageDesc.hxx
@@ -25,8 +25,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _SW_UNDO_PAGE_DESC_HXX
-#define _SW_UNDO_PAGE_DESC_HXX
+#ifndef SW_UNDO_PAGE_DESC_HXX
+#define SW_UNDO_PAGE_DESC_HXX
#include <undobj.hxx>
#include <pagedesc.hxx>
@@ -49,9 +49,8 @@ public:
SwDoc * pDoc);
virtual ~SwUndoPageDesc();
- virtual void Undo(SwUndoIter & rIt);
- virtual void Redo(SwUndoIter & rIt);
- virtual void Repeat(SwUndoIter & rIt);
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
virtual SwRewriter GetRewriter() const;
};
@@ -62,13 +61,15 @@ class SwUndoPageDescCreate : public SwUndo
SwPageDescExt aNew;
SwDoc * pDoc;
+ void DoImpl();
+
public:
SwUndoPageDescCreate(const SwPageDesc * pNew, SwDoc * pDoc);
virtual ~SwUndoPageDescCreate();
- virtual void Undo(SwUndoIter & rIt);
- virtual void Redo(SwUndoIter & rIt);
- virtual void Repeat(SwUndoIter & rIt);
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
virtual SwRewriter GetRewriter() const;
};
@@ -78,13 +79,15 @@ class SwUndoPageDescDelete : public SwUndo
SwPageDescExt aOld;
SwDoc * pDoc;
+ void DoImpl();
+
public:
SwUndoPageDescDelete(const SwPageDesc & aOld, SwDoc * pDoc);
virtual ~SwUndoPageDescDelete();
- virtual void Undo(SwUndoIter & rIt);
- virtual void Redo(SwUndoIter & rIt);
- virtual void Repeat(SwUndoIter & rIt);
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
virtual SwRewriter GetRewriter() const;
};
diff --git a/sw/inc/SwUndoTOXChange.hxx b/sw/source/core/inc/SwUndoTOXChange.hxx
index 9c6838e470a1..a661ab5de571 100644
--- a/sw/inc/SwUndoTOXChange.hxx
+++ b/sw/source/core/inc/SwUndoTOXChange.hxx
@@ -25,8 +25,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _SW_UNDO_TOX_CHANGE_HXX
-#define _SW_UNDO_TOX_CHANGE_HXX
+#ifndef SW_UNDO_TOX_CHANGE_HXX
+#define SW_UNDO_TOX_CHANGE_HXX
+
#include <undobj.hxx>
#include <tox.hxx>
@@ -35,16 +36,17 @@ class SwUndoTOXChange : public SwUndo
SwTOXBase * pTOX, aOld, aNew;
void UpdateTOXBaseSection();
+ void DoImpl();
public:
SwUndoTOXChange(SwTOXBase * pTOX, const SwTOXBase & rNew);
virtual ~SwUndoTOXChange();
- virtual void Undo(SwUndoIter & rIter);
- virtual void Redo(SwUndoIter & rIter);
- virtual void Repeat(SwUndoIter & rIter);
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
};
-#endif //_SW_UNDO_TOX_CHANGE_HXX
+#endif // SW_UNDO_TOX_CHANGE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/SwXMLTextBlocks.hxx b/sw/source/core/inc/SwXMLTextBlocks.hxx
index 4e5cfac7544d..c87b08d77360 100644
--- a/sw/source/core/inc/SwXMLTextBlocks.hxx
+++ b/sw/source/core/inc/SwXMLTextBlocks.hxx
@@ -43,10 +43,10 @@ class SwImpBlocks;
class SwXMLTextBlocks : public SwImpBlocks
{
protected:
- BOOL bAutocorrBlock;
- BOOL bBlock;
+ sal_Bool bAutocorrBlock;
+ sal_Bool bBlock;
SfxObjectShellRef xDocShellRef;
- USHORT nFlags;
+ sal_uInt16 nFlags;
String aPackageName;
SfxMediumRef xMedium;
@@ -61,50 +61,50 @@ public:
short nCurBlk;
SwXMLTextBlocks( const String& rFile );
SwXMLTextBlocks( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String& rFile );
- void AddName( const String&, const String&, const String&, BOOL bOnlyTxt = FALSE );
- virtual void AddName( const String&, const String&, BOOL bOnlyTxt = FALSE );
+ void AddName( const String&, const String&, const String&, sal_Bool bOnlyTxt = sal_False );
+ virtual void AddName( const String&, const String&, sal_Bool bOnlyTxt = sal_False );
void GeneratePackageName ( const String& rShort, String& rPackageName );
virtual ~SwXMLTextBlocks();
- //virtual BOOL IsOld() const;
- virtual ULONG Delete( USHORT );
- virtual ULONG Rename( USHORT, const String&, const String& );
- virtual ULONG CopyBlock( SwImpBlocks& rImp, String& rShort, const String& rLong);
+ //virtual sal_Bool IsOld() const;
+ virtual sal_uLong Delete( sal_uInt16 );
+ virtual sal_uLong Rename( sal_uInt16, const String&, const String& );
+ virtual sal_uLong CopyBlock( SwImpBlocks& rImp, String& rShort, const String& rLong);
virtual void ClearDoc();
- virtual ULONG GetDoc( USHORT );
- virtual ULONG BeginPutDoc( const String&, const String& );
- virtual ULONG PutDoc();
- virtual ULONG GetText( USHORT, String& );
- virtual ULONG PutText( const String&, const String&, const String& );
- virtual ULONG MakeBlockList();
+ virtual sal_uLong GetDoc( sal_uInt16 );
+ virtual sal_uLong BeginPutDoc( const String&, const String& );
+ virtual sal_uLong PutDoc();
+ virtual sal_uLong GetText( sal_uInt16, String& );
+ virtual sal_uLong PutText( const String&, const String&, const String& );
+ virtual sal_uLong MakeBlockList();
virtual short GetFileType ( void ) const;
- virtual ULONG OpenFile( BOOL bReadOnly = TRUE );
+ virtual sal_uLong OpenFile( sal_Bool bReadOnly = sal_True );
virtual void CloseFile();
- static BOOL IsFileUCBStorage( const String & rFileName);
+ static sal_Bool IsFileUCBStorage( const String & rFileName);
// Methods for the new Autocorrecter
- ULONG GetText( const String& rShort, String& );
+ sal_uLong GetText( const String& rShort, String& );
- virtual BOOL IsOnlyTextBlock( const String& rShort ) const;
- virtual BOOL IsOnlyTextBlock( USHORT nIdx ) const;
- virtual void SetIsTextOnly( const String& rShort, BOOL bNewValue );
- virtual void SetIsTextOnly( USHORT nIdx, BOOL bNewValue );
+ virtual sal_Bool IsOnlyTextBlock( const String& rShort ) const;
+ virtual sal_Bool IsOnlyTextBlock( sal_uInt16 nIdx ) const;
+ virtual void SetIsTextOnly( const String& rShort, sal_Bool bNewValue );
+ virtual void SetIsTextOnly( sal_uInt16 nIdx, sal_Bool bNewValue );
- virtual ULONG GetMacroTable( USHORT, SvxMacroTableDtor& rMacroTbl,
+ virtual sal_uLong GetMacroTable( sal_uInt16, SvxMacroTableDtor& rMacroTbl,
sal_Bool bFileAlreadyOpen = sal_False );
- virtual ULONG SetMacroTable( USHORT nIdx,
+ virtual sal_uLong SetMacroTable( sal_uInt16 nIdx,
const SvxMacroTableDtor& rMacroTable,
sal_Bool bFileAlreadyOpen = sal_False );
- virtual BOOL PutMuchEntries( BOOL bOn );
+ virtual sal_Bool PutMuchEntries( sal_Bool bOn );
public:
SwDoc* GetDoc() const { return pDoc; }
//void SetDoc( SwDoc * pNewDoc);
- ULONG StartPutBlock( const String& rShort, const String& rPackageName );
- ULONG PutBlock( SwPaM& rPaM, const String& rLong );
- ULONG GetBlockText( const String& rShort, String& rText );
- ULONG PutBlockText( const String& rShort, const String& rName, const String& rText, const String& rPackageName );
+ sal_uLong StartPutBlock( const String& rShort, const String& rPackageName );
+ sal_uLong PutBlock( SwPaM& rPaM, const String& rLong );
+ sal_uLong GetBlockText( const String& rShort, String& rText );
+ sal_uLong PutBlockText( const String& rShort, const String& rName, const String& rText, const String& rPackageName );
void MakeBlockText( const String& rText );
};
diff --git a/sw/source/core/inc/UndoAttribute.hxx b/sw/source/core/inc/UndoAttribute.hxx
new file mode 100644
index 000000000000..84423605b5d0
--- /dev/null
+++ b/sw/source/core/inc/UndoAttribute.hxx
@@ -0,0 +1,288 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SW_UNDO_ATTRIBUTE_HXX
+#define SW_UNDO_ATTRIBUTE_HXX
+
+#include <undobj.hxx>
+
+#include <memory>
+
+#ifndef _SVSTDARR_HXX
+#define _SVSTDARR_USHORTS
+#define _SVSTDARR_ULONGS
+#define _SVSTDARR_BOOLS
+#define _SVSTDARR_BYTES
+#define _SVSTDARR_USHORTSSORT
+#include <svl/svstdarr.hxx>
+#endif
+#include <svl/itemset.hxx>
+
+#include <swtypes.hxx>
+#include <calbck.hxx>
+
+
+class SvxTabStopItem;
+class SwFmt;
+class SwFtnInfo;
+class SwEndNoteInfo;
+
+
+class SwUndoAttr : public SwUndo, private SwUndRng
+{
+ SfxItemSet m_AttrSet; // attributes for Redo
+ const ::std::auto_ptr<SwHistory> m_pHistory; // History for Undo
+ ::std::auto_ptr<SwRedlineData> m_pRedlineData; // Redlining
+ ::std::auto_ptr<SwRedlineSaveDatas> m_pRedlineSaveData;
+ sal_uLong m_nNodeIndex; // Offset: for Redlining
+ const SetAttrMode m_nInsertFlags; // insert flags
+
+ void RemoveIdx( SwDoc& rDoc );
+
+public:
+ SwUndoAttr( const SwPaM&, const SfxItemSet &, const SetAttrMode nFlags );
+ SwUndoAttr( const SwPaM&, const SfxPoolItem&, const SetAttrMode nFlags );
+
+ virtual ~SwUndoAttr();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ void SaveRedlineData( const SwPaM& rPam, sal_Bool bInsCntnt );
+
+ SwHistory& GetHistory() { return *m_pHistory; }
+
+};
+
+class SwUndoResetAttr : public SwUndo, private SwUndRng
+{
+ const ::std::auto_ptr<SwHistory> m_pHistory;
+ SvUShortsSort m_Ids;
+ const sal_uInt16 m_nFormatId; // Format-Id for Redo
+
+public:
+ SwUndoResetAttr( const SwPaM&, sal_uInt16 nFmtId );
+ SwUndoResetAttr( const SwPosition&, sal_uInt16 nFmtId );
+
+ virtual ~SwUndoResetAttr();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ void SetAttrs( const SvUShortsSort& rArr );
+
+ SwHistory& GetHistory() { return *m_pHistory; }
+
+};
+
+class SwUndoFmtAttr : public SwUndo
+{
+ friend class SwUndoDefaultAttr;
+ SwFmt * m_pFmt;
+ ::std::auto_ptr<SfxItemSet> m_pOldSet; // old attributes
+ sal_uLong m_nNodeIndex;
+ const sal_uInt16 m_nFmtWhich;
+ const bool m_bSaveDrawPt;
+
+ bool IsFmtInDoc( SwDoc* ); //is the attribute format still in the Doc?
+ void SaveFlyAnchor( bool bSaveDrawPt = false );
+ // --> OD 2004-10-26 #i35443# - Add return value, type <bool>.
+ // Return value indicates, if anchor attribute is restored.
+ // Notes: - If anchor attribute is restored, all other existing attributes
+ // are also restored.
+ // - Anchor attribute isn't restored successfully, if it contains
+ // an invalid anchor position and all other existing attributes
+ // aren't restored.
+ // This situation occurs for undo of styles.
+ bool RestoreFlyAnchor(::sw::UndoRedoContext & rContext);
+ // <--
+ // --> OD 2008-02-27 #refactorlists# - removed <rAffectedItemSet>
+ void Init();
+ // <--
+
+public:
+ // register at the Format and save old attributes
+ // --> OD 2008-02-27 #refactorlists# - removed <rNewSet>
+ SwUndoFmtAttr( const SfxItemSet& rOldSet,
+ SwFmt& rFmt,
+ bool bSaveDrawPt = true );
+ // <--
+ SwUndoFmtAttr( const SfxPoolItem& rItem,
+ SwFmt& rFmt,
+ bool bSaveDrawPt = true );
+
+ virtual ~SwUndoFmtAttr();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ virtual SwRewriter GetRewriter() const;
+
+ void PutAttr( const SfxPoolItem& rItem );
+ SwFmt* GetFmt( SwDoc& rDoc ); // checks if it is still in the Doc!
+};
+
+// --> OD 2008-02-12 #newlistlevelattrs#
+class SwUndoFmtResetAttr : public SwUndo
+{
+ public:
+ SwUndoFmtResetAttr( SwFmt& rChangedFormat,
+ const sal_uInt16 nWhichId );
+ ~SwUndoFmtResetAttr();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+
+ private:
+ // format at which a certain attribute is reset.
+ SwFmt * const m_pChangedFormat;
+ // which ID of the reset attribute
+ const sal_uInt16 m_nWhichId;
+ // old attribute which has been reset - needed for undo.
+ ::std::auto_ptr<SfxPoolItem> m_pOldItem;
+};
+// <--
+
+class SwUndoDontExpandFmt : public SwUndo
+{
+ const sal_uLong m_nNodeIndex;
+ const xub_StrLen m_nContentIndex;
+
+public:
+ SwUndoDontExpandFmt( const SwPosition& rPos );
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+};
+
+// helper class to receive changed attribute sets
+class SwUndoFmtAttrHelper : public SwClient
+{
+ ::std::auto_ptr<SwUndoFmtAttr> m_pUndo;
+ const bool m_bSaveDrawPt;
+
+public:
+ SwUndoFmtAttrHelper( SwFmt& rFmt, bool bSaveDrawPt = true );
+
+ virtual void Modify( SfxPoolItem*, SfxPoolItem* );
+
+ SwUndoFmtAttr* GetUndo() const { return m_pUndo.get(); }
+ // release the undo object (so it is not deleted here), and return it
+ SwUndoFmtAttr* ReleaseUndo() { return m_pUndo.release(); }
+};
+
+
+class SwUndoMoveLeftMargin : public SwUndo, private SwUndRng
+{
+ const ::std::auto_ptr<SwHistory> m_pHistory;
+ const bool m_bModulus;
+
+public:
+ SwUndoMoveLeftMargin( const SwPaM&, sal_Bool bRight, sal_Bool bModulus );
+
+ virtual ~SwUndoMoveLeftMargin();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ SwHistory& GetHistory() { return *m_pHistory; }
+
+};
+
+
+//--------------------------------------------------------------------
+
+class SwUndoDefaultAttr : public SwUndo
+{
+ ::std::auto_ptr<SfxItemSet> m_pOldSet; // the old attributes
+ ::std::auto_ptr<SvxTabStopItem> m_pTabStop;
+
+public:
+ // registers at the format and saves old attributes
+ SwUndoDefaultAttr( const SfxItemSet& rOldSet );
+
+ virtual ~SwUndoDefaultAttr();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+};
+
+
+//--------------------------------------------------------------------
+
+class SwUndoChangeFootNote : public SwUndo, private SwUndRng
+{
+ const ::std::auto_ptr<SwHistory> m_pHistory;
+ const String m_Text;
+ const sal_uInt16 m_nNumber;
+ const bool m_bEndNote;
+
+public:
+ SwUndoChangeFootNote( const SwPaM& rRange, const String& rTxt,
+ sal_uInt16 nNum, bool bIsEndNote );
+ virtual ~SwUndoChangeFootNote();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ SwHistory& GetHistory() { return *m_pHistory; }
+};
+
+class SwUndoFootNoteInfo : public SwUndo
+{
+ ::std::auto_ptr<SwFtnInfo> m_pFootNoteInfo;
+
+public:
+ SwUndoFootNoteInfo( const SwFtnInfo &rInfo );
+
+ virtual ~SwUndoFootNoteInfo();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+};
+
+class SwUndoEndNoteInfo : public SwUndo
+{
+ ::std::auto_ptr<SwEndNoteInfo> m_pEndNoteInfo;
+
+public:
+ SwUndoEndNoteInfo( const SwEndNoteInfo &rInfo );
+
+ virtual ~SwUndoEndNoteInfo();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+};
+
+#endif // SW_UNDO_ATTRIBUTE_HXX
+
diff --git a/sw/source/core/inc/UndoBookmark.hxx b/sw/source/core/inc/UndoBookmark.hxx
new file mode 100644
index 000000000000..87d774d0c43e
--- /dev/null
+++ b/sw/source/core/inc/UndoBookmark.hxx
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SW_UNDO_BOOKMARK_HXX
+#define SW_UNDO_BOOKMARK_HXX
+
+#include <undobj.hxx>
+
+
+class SwHistoryBookmark;
+
+namespace sw {
+ namespace mark {
+ class IMark;
+ }
+}
+
+
+class SwUndoBookmark : public SwUndo
+{
+ const ::std::auto_ptr<SwHistoryBookmark> m_pHistoryBookmark;
+
+protected:
+ SwUndoBookmark( SwUndoId nUndoId, const ::sw::mark::IMark& );
+
+ void SetInDoc( SwDoc* );
+ void ResetInDoc( SwDoc* );
+
+public:
+ virtual ~SwUndoBookmark();
+
+ // #111827#
+ /**
+ Returns the rewriter for this undo object.
+
+ The rewriter contains the following rule:
+
+ $1 -> <name of bookmark>
+
+ <name of bookmark> is the name of the bookmark whose
+ insertion/deletion is recorded by this undo object.
+
+ @return the rewriter for this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+};
+
+
+class SwUndoInsBookmark : public SwUndoBookmark
+{
+public:
+ SwUndoInsBookmark( const ::sw::mark::IMark& );
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+};
+
+#endif // SW_UNDO_BOOKMARK_HXX
+
diff --git a/sw/source/core/inc/UndoCore.hxx b/sw/source/core/inc/UndoCore.hxx
new file mode 100644
index 000000000000..41e89dcdd518
--- /dev/null
+++ b/sw/source/core/inc/UndoCore.hxx
@@ -0,0 +1,263 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SW_UNDOCORE_HXX
+#define SW_UNDOCORE_HXX
+
+#include <undobj.hxx>
+
+#include <calbck.hxx>
+
+
+class SfxItemSet;
+class SwFmtColl;
+class SwFmtAnchor;
+class SdrMarkList;
+class SwUndoDelete;
+class SwRedlineSaveData;
+
+namespace sw {
+ class UndoManager;
+ class IShellCursorSupplier;
+}
+
+
+typedef SwRedlineSaveData* SwRedlineSaveDataPtr;
+SV_DECL_PTRARR_DEL( SwRedlineSaveDatas, SwRedlineSaveDataPtr, 8, 8 )
+
+
+namespace sw {
+
+class SW_DLLPRIVATE UndoRedoContext
+ : public SfxUndoContext
+{
+public:
+ UndoRedoContext(SwDoc & rDoc, IShellCursorSupplier & rCursorSupplier)
+ : m_rDoc(rDoc)
+ , m_rCursorSupplier(rCursorSupplier)
+ , m_pSelFmt(0)
+ , m_pMarkList(0)
+ { }
+
+ SwDoc & GetDoc() const { return m_rDoc; }
+
+ IShellCursorSupplier & GetCursorSupplier() { return m_rCursorSupplier; }
+
+ void SetSelections(SwFrmFmt *const pSelFmt, SdrMarkList *const pMarkList)
+ {
+ m_pSelFmt = pSelFmt;
+ m_pMarkList = pMarkList;
+ }
+ void GetSelections(SwFrmFmt *& o_rpSelFmt, SdrMarkList *& o_rpMarkList)
+ {
+ o_rpSelFmt = m_pSelFmt;
+ o_rpMarkList = m_pMarkList;
+ }
+
+private:
+ SwDoc & m_rDoc;
+ IShellCursorSupplier & m_rCursorSupplier;
+ SwFrmFmt * m_pSelFmt;
+ SdrMarkList * m_pMarkList;
+};
+
+class SW_DLLPRIVATE RepeatContext
+ : public SfxRepeatTarget
+{
+public:
+ RepeatContext(SwDoc & rDoc, SwPaM & rPaM)
+ : m_rDoc(rDoc)
+ , m_pCurrentPaM(& rPaM)
+ , m_bDeleteRepeated(false)
+ { }
+
+ SwDoc & GetDoc() const { return m_rDoc; }
+
+ SwPaM & GetRepeatPaM()
+ {
+ return *m_pCurrentPaM;
+ }
+
+private:
+ friend class ::sw::UndoManager;
+ friend class ::SwUndoDelete;
+
+ SwDoc & m_rDoc;
+ SwPaM * m_pCurrentPaM;
+ bool m_bDeleteRepeated; /// has a delete action been repeated?
+};
+
+} // namespace sw
+
+
+
+class SwUndoFmtColl : public SwUndo, private SwUndRng
+{
+ String aFmtName;
+ SwHistory* pHistory;
+ SwFmtColl* pFmtColl;
+ // --> OD 2008-04-15 #refactorlists# - for correct <ReDo(..)> and <Repeat(..)>
+ // boolean, which indicates that the attributes are reseted at the nodes
+ // before the format has been applied.
+ const bool mbReset;
+ // boolean, which indicates that the list attributes had been reseted at
+ // the nodes before the format has been applied.
+ const bool mbResetListAttrs;
+ // <--
+
+ void DoSetFmtColl(SwDoc & rDoc, SwPaM & rPaM);
+
+public:
+ // --> OD 2008-04-15 #refactorlists#
+// SwUndoFmtColl( const SwPaM&, SwFmtColl* );
+ SwUndoFmtColl( const SwPaM&, SwFmtColl*,
+ const bool bReset,
+ const bool bResetListAttrs );
+ // <--
+ virtual ~SwUndoFmtColl();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ // #111827#
+ /**
+ Returns the rewriter for this undo object.
+
+ The rewriter contains one rule:
+
+ $1 -> <name of format collection>
+
+ <name of format collection> is the name of the format
+ collection that is applied by the action recorded by this undo
+ object.
+
+ @return the rewriter for this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+
+ SwHistory* GetHistory() { return pHistory; }
+
+};
+
+
+class SwUndoSetFlyFmt : public SwUndo, public SwClient
+{
+ SwFrmFmt* pFrmFmt; // das gespeicherte FlyFormat
+ SwFrmFmt* pOldFmt; // die alte Fly Vorlage
+ SwFrmFmt* pNewFmt; // die neue Fly Vorlage
+ SfxItemSet* pItemSet; // die zurueck-/ gesetzten Attribute
+ sal_uLong nOldNode, nNewNode;
+ xub_StrLen nOldCntnt, nNewCntnt;
+ sal_uInt16 nOldAnchorTyp, nNewAnchorTyp;
+ sal_Bool bAnchorChgd;
+
+ void PutAttr( sal_uInt16 nWhich, const SfxPoolItem* pItem );
+ void Modify( SfxPoolItem*, SfxPoolItem* );
+ void GetAnchor( SwFmtAnchor& rAnhor, sal_uLong nNode, xub_StrLen nCntnt );
+
+public:
+ SwUndoSetFlyFmt( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFrmFmt );
+ virtual ~SwUndoSetFlyFmt();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+
+ virtual SwRewriter GetRewriter() const;
+};
+
+
+//------------ Undo von verschieben/stufen von Gliederung ----------------
+
+class SwUndoOutlineLeftRight : public SwUndo, private SwUndRng
+{
+ short nOffset;
+public:
+ SwUndoOutlineLeftRight( const SwPaM& rPam, short nOffset );
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+};
+
+
+//--------------------------------------------------------------------
+
+// -> #111827#
+const int nUndoStringLength = 20;
+
+/**
+ Shortens a string to a maximum length.
+
+ @param rStr the string to be shortened
+ @param nLength the maximum length for rStr
+ @param rFillStr string to replace cut out characters with
+
+ If rStr has less than nLength characters it will be returned unaltered.
+
+ If rStr has more than nLength characters the following algorithm
+ generates the shortened string:
+
+ frontLength = (nLength - length(rFillStr)) / 2
+ rearLength = nLength - length(rFillStr) - frontLength
+ shortenedString = concat(<first frontLength characters of rStr,
+ rFillStr,
+ <last rearLength characters of rStr>)
+
+ Preconditions:
+ - nLength - length(rFillStr) >= 2
+
+ @return the shortened string
+ */
+String
+ShortenString(const String & rStr, xub_StrLen nLength, const String & rFillStr);
+// <- #111827#
+
+// #16487#
+/**
+ Denotes special characters in a string.
+
+ The rStr is split into parts containing special characters and
+ parts not containing special characters. In a part containing
+ special characters all characters are equal. These parts are
+ maximal.
+
+ @param rStr the string to denote in
+
+ The resulting string is generated by concatenating the found
+ parts. The parts without special characters are surrounded by
+ "'". The parts containing special characters are denoted as "n x",
+ where n is the length of the part and x is the representation of
+ the special character (i. e. "tab(s)").
+
+ @return the denoted string
+*/
+String DenoteSpecialCharacters(const String & rStr);
+
+
+#endif // SW_UNDOCORE_HXX
+
diff --git a/sw/source/core/inc/UndoDelete.hxx b/sw/source/core/inc/UndoDelete.hxx
new file mode 100644
index 000000000000..7bdfb79c633d
--- /dev/null
+++ b/sw/source/core/inc/UndoDelete.hxx
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SW_UNDO_DELETE_HXX
+#define SW_UNDO_DELETE_HXX
+
+#include <undobj.hxx>
+
+#include <tools/mempool.hxx>
+
+
+class SwRedlineSaveDatas;
+class SwTxtNode;
+
+namespace sfx2 {
+ class MetadatableUndo;
+}
+
+
+class SwUndoDelete
+ : public SwUndo
+ , private SwUndRng
+ , private SwUndoSaveCntnt
+{
+ SwNodeIndex* pMvStt; // Position of Nodes in UndoNodes-Array
+ String *pSttStr, *pEndStr;
+ SwRedlineData* pRedlData;
+ SwRedlineSaveDatas* pRedlSaveData;
+ ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoStart;
+ ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoEnd;
+
+ String sTableName;
+
+ sal_uLong nNode;
+ sal_uLong nNdDiff; // difference of Nodes before/after Delete
+ sal_uLong nSectDiff; // diff. of Nodes before/after Move w/ SectionNodes
+ sal_uLong nReplaceDummy; // diff. to a temporary dummy object
+ sal_uInt16 nSetPos;
+
+ sal_Bool bGroup : 1; // TRUE: is already Grouped; see CanGrouping()
+ sal_Bool bBackSp : 1; // TRUE: if Grouped and preceding content deleted
+ sal_Bool bJoinNext: 1; // TRUE: if range is selected forwards
+ sal_Bool bTblDelLastNd : 1; // TRUE: TextNode following Table inserted/deleted
+ sal_Bool bDelFullPara : 1; // TRUE: entire Nodes were deleted
+ sal_Bool bResetPgDesc : 1; // TRUE: reset PgDsc on following node
+ sal_Bool bResetPgBrk : 1; // TRUE: reset PgBreak on following node
+ sal_Bool bFromTableCopy : 1; // TRUE: called by SwUndoTblCpyTbl
+
+ sal_Bool SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd,
+ SwTxtNode* pSttTxtNd, SwTxtNode* pEndTxtNd );
+public:
+ SwUndoDelete( SwPaM&,
+ sal_Bool bFullPara = sal_False, sal_Bool bCalledByTblCpy = sal_False );
+ virtual ~SwUndoDelete();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ // #111827#
+ /**
+ Returns rewriter for this undo object.
+
+ The rewriter consists of the following rule:
+
+ $1 -> '<deleted text>'
+
+ <deleted text> is shortened to nUndoStringLength characters.
+
+ @return rewriter for this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+
+ sal_Bool CanGrouping( SwDoc*, const SwPaM& );
+
+ void SetTblDelLastNd() { bTblDelLastNd = sal_True; }
+
+ // for PageDesc/PageBreak Attributes of a table
+ void SetPgBrkFlags( sal_Bool bPageBreak, sal_Bool bPageDesc )
+ { bResetPgDesc = bPageDesc; bResetPgBrk = bPageBreak; }
+
+ void SetTableName(const String & rName);
+
+ // SwUndoTblCpyTbl needs this information:
+ sal_Bool IsDelFullPara() const { return bDelFullPara; }
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwUndoDelete)
+};
+
+#endif // SW_UNDO_DELETE_HXX
+
diff --git a/sw/source/core/inc/UndoDraw.hxx b/sw/source/core/inc/UndoDraw.hxx
new file mode 100644
index 000000000000..9d490901c02b
--- /dev/null
+++ b/sw/source/core/inc/UndoDraw.hxx
@@ -0,0 +1,150 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SW_UNDO_DRAW_HXX
+#define SW_UNDO_DRAW_HXX
+
+#include <undobj.hxx>
+
+#include <svx/svdundo.hxx>
+
+
+struct SwUndoGroupObjImpl;
+class SdrMark;
+class SdrMarkList;
+class SdrObject;
+class SdrObjGroup;
+class SdrUndoAction;
+class SwDrawFrmFmt;
+
+
+
+//--------------------------------------------------------------------
+// ----------- Undo for Draw Objects ---------------------------------
+
+class SwSdrUndo : public SwUndo
+{
+ SdrUndoAction* pSdrUndo;
+ SdrMarkList* pMarkList; // MarkList for all selected SdrObjects
+public:
+ SwSdrUndo( SdrUndoAction* , const SdrMarkList* pMarkList );
+
+ virtual ~SwSdrUndo();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+
+ String GetComment() const;
+};
+
+class SwUndoDrawGroup : public SwUndo
+{
+ SwUndoGroupObjImpl* pObjArr;
+ sal_uInt16 nSize;
+ sal_Bool bDelFmt;
+
+public:
+ SwUndoDrawGroup( sal_uInt16 nCnt );
+
+ virtual ~SwUndoDrawGroup();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+
+ void AddObj( sal_uInt16 nPos, SwDrawFrmFmt*, SdrObject* );
+ void SetGroupFmt( SwDrawFrmFmt* );
+};
+
+// --> OD 2006-11-01 #130889#
+// Action "ungroup drawing object" is now splitted into three parts - see
+// method <SwDoc::UnGroupSelection(..)>:
+// - creation for <SwDrawFrmFmt> instances for the group members of the
+// selected group objects
+// - intrinsic ungroup of the selected group objects
+// - creation of <SwDrawContact> instances for the former group members and
+// connection to the Writer layout.
+// Thus, two undo actions (instances of <SwUndo>) are needed:
+// - Existing class <SwUndoDrawUnGroup> takes over the part for the formats.
+// - New class <SwUndoDrawUnGroupConnectToLayout> takes over the part for
+// contact object.
+class SwUndoDrawUnGroup : public SwUndo
+{
+ SwUndoGroupObjImpl* pObjArr;
+ sal_uInt16 nSize;
+ sal_Bool bDelFmt;
+
+public:
+ SwUndoDrawUnGroup( SdrObjGroup* );
+
+ virtual ~SwUndoDrawUnGroup();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+
+ void AddObj( sal_uInt16 nPos, SwDrawFrmFmt* );
+};
+
+// --> OD 2006-11-01 #130889#
+class SwUndoDrawUnGroupConnectToLayout : public SwUndo
+{
+ private:
+ std::vector< std::pair< SwDrawFrmFmt*, SdrObject* > > aDrawFmtsAndObjs;
+
+ public:
+ SwUndoDrawUnGroupConnectToLayout();
+
+ virtual ~SwUndoDrawUnGroupConnectToLayout();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+
+ void AddFmtAndObj( SwDrawFrmFmt* pDrawFrmFmt,
+ SdrObject* pDrawObject );
+};
+// <--
+
+
+class SwUndoDrawDelete : public SwUndo
+{
+ SwUndoGroupObjImpl* pObjArr;
+ SdrMarkList* pMarkLst; // MarkList for all selected SdrObjects
+ sal_uInt16 nSize;
+ sal_Bool bDelFmt;
+
+public:
+ SwUndoDrawDelete( sal_uInt16 nCnt );
+
+ virtual ~SwUndoDrawDelete();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+
+ void AddObj( sal_uInt16 nPos, SwDrawFrmFmt*, const SdrMark& );
+};
+
+#endif // SW_UNDO_DRAW_HXX
+
diff --git a/sw/source/core/inc/UndoInsert.hxx b/sw/source/core/inc/UndoInsert.hxx
new file mode 100644
index 000000000000..a39ba329fdc1
--- /dev/null
+++ b/sw/source/core/inc/UndoInsert.hxx
@@ -0,0 +1,235 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SW_UNDO_INSERT_HXX
+#define SW_UNDO_INSERT_HXX
+
+#include <undobj.hxx>
+
+#include <tools/mempool.hxx>
+
+#include <swtypes.hxx>
+#include <IDocumentContentOperations.hxx>
+
+
+class Graphic;
+class SwGrfNode;
+class SwUndoDelete;
+class SwUndoFmtAttr;
+
+
+class SwUndoInsert: public SwUndo, private SwUndoSaveCntnt
+{
+ SwPosition *pPos; // Inhalt fuers Redo
+ String *pTxt, *pUndoTxt;
+ SwRedlineData* pRedlData;
+ sal_uLong nNode;
+ xub_StrLen nCntnt, nLen;
+ sal_Bool bIsWordDelim : 1;
+ sal_Bool bIsAppend : 1;
+
+ const IDocumentContentOperations::InsertFlags m_nInsertFlags;
+
+ friend class SwDoc; // eigentlich nur SwDoc::Insert( String )
+ sal_Bool CanGrouping( sal_Unicode cIns );
+ sal_Bool CanGrouping( const SwPosition& rPos );
+
+ SwDoc * pDoc;
+
+ void Init(const SwNodeIndex & rNode);
+ String * GetTxtFromDoc() const;
+
+public:
+ SwUndoInsert( const SwNodeIndex& rNode, xub_StrLen nCntnt, xub_StrLen nLen,
+ const IDocumentContentOperations::InsertFlags nInsertFlags,
+ sal_Bool bWDelim = sal_True );
+ SwUndoInsert( const SwNodeIndex& rNode );
+ virtual ~SwUndoInsert();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ // #111827#
+ /**
+ Returns rewriter for this undo object.
+
+ The returned rewriter has the following rule:
+
+ $1 -> '<inserted text>'
+
+ <inserted text> is shortened to a length of nUndoStringLength.
+
+ @return rewriter for this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwUndoInsert)
+};
+
+
+//--------------------------------------------------------------------
+
+SwRewriter SW_DLLPRIVATE
+MakeUndoReplaceRewriter(sal_uLong const ocurrences,
+ ::rtl::OUString const& sOld, ::rtl::OUString const& sNew);
+
+class SwUndoReplace
+ : public SwUndo
+{
+public:
+ SwUndoReplace(SwPaM const& rPam,
+ ::rtl::OUString const& rInsert, bool const bRegExp);
+
+ virtual ~SwUndoReplace();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+
+ // #111827#
+ /**
+ Returns the rewriter of this undo object.
+
+ If this undo object represents several replacements the
+ rewriter contains the following rules:
+
+ $1 -> <number of replacements>
+ $2 -> occurrences of
+ $3 -> <replaced text>
+
+ If this undo object represents one replacement the rewriter
+ contains these rules:
+
+ $1 -> <replaced text>
+ $2 -> "->" (STR_YIELDS)
+ $3 -> <replacing text>
+
+ @return the rewriter of this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+
+ void SetEnd( const SwPaM& rPam );
+
+private:
+ class Impl;
+ ::std::auto_ptr<Impl> m_pImpl;
+};
+
+
+//--------------------------------------------------------------------
+
+class SwUndoReRead : public SwUndo
+{
+ Graphic *pGrf;
+ String *pNm, *pFltr;
+ sal_uLong nPos;
+ sal_uInt16 nMirr;
+
+ void SaveGraphicData( const SwGrfNode& );
+ void SetAndSave( ::sw::UndoRedoContext & );
+
+public:
+ SwUndoReRead( const SwPaM& rPam, const SwGrfNode& pGrfNd );
+
+ virtual ~SwUndoReRead();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+};
+
+//--------------------------------------------------------------------
+
+class SwUndoInsertLabel : public SwUndo
+{
+ union {
+ struct {
+ // fuer NoTxtFrms
+ SwUndoInsLayFmt* pUndoFly;
+ SwUndoFmtAttr* pUndoAttr;
+ } OBJECT;
+ struct {
+ // fuer Tabelle/TextRahmen
+ SwUndoDelete* pUndoInsNd;
+ sal_uLong nNode;
+ } NODE;
+ };
+
+ String sText;
+ // --> PB 2005-01-06 #i39983# the separator is drawn with a character style
+ String sSeparator;
+ // <--
+ String sNumberSeparator;
+ String sCharacterStyle;
+ // OD 2004-04-15 #i26791# - re-store of drawing object position no longer needed
+ sal_uInt16 nFldId;
+ SwLabelType eType;
+ sal_uInt8 nLayerId; // fuer Zeichen-Objekte
+ sal_Bool bBefore :1;
+ sal_Bool bUndoKeep :1;
+ sal_Bool bCpyBrd :1;
+
+public:
+ SwUndoInsertLabel( const SwLabelType eTyp, const String &rText,
+ // --> PB 2005-01-06 #i39983# the separator is drawn with a character style
+ const String& rSeparator,
+ // <--
+ const String& rNumberSeparator, //#i61007# order of captions
+ const sal_Bool bBefore, const sal_uInt16 nId,
+ const String& rCharacterStyle,
+ const sal_Bool bCpyBrd );
+ virtual ~SwUndoInsertLabel();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ // #111827#
+ /**
+ Returns the rewriter of this undo object.
+
+ The rewriter contains this rule:
+
+ $1 -> '<text of inserted label>'
+
+ <text of inserted label> is shortened to nUndoStringLength
+ characters.
+
+ @return the rewriter of this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+
+ void SetNodePos( sal_uLong nNd )
+ { if( LTYPE_OBJECT != eType ) NODE.nNode = nNd; }
+
+ void SetUndoKeep() { bUndoKeep = sal_True; }
+ void SetFlys( SwFrmFmt& rOldFly, SfxItemSet& rChgSet, SwFrmFmt& rNewFly );
+ void SetDrawObj( sal_uInt8 nLayerId );
+};
+
+#endif // SW_UNDO_INSERT_HXX
+
diff --git a/sw/source/core/inc/UndoManager.hxx b/sw/source/core/inc/UndoManager.hxx
new file mode 100644
index 000000000000..0f734d17abfa
--- /dev/null
+++ b/sw/source/core/inc/UndoManager.hxx
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SW_UNDO_MANAGER_HXX
+#define SW_UNDO_MANAGER_HXX
+
+#include <IDocumentUndoRedo.hxx>
+
+#include <memory>
+
+#include <svl/undo.hxx>
+
+
+class IDocumentDrawModelAccess;
+class IDocumentRedlineAccess;
+class IDocumentState;
+
+
+namespace sw {
+
+class UndoManager
+ : public IDocumentUndoRedo
+ , public SfxUndoManager
+{
+public:
+
+ UndoManager(::std::auto_ptr<SwNodes> pUndoNodes,
+ IDocumentDrawModelAccess & rDrawModelAccess,
+ IDocumentRedlineAccess & rRedlineAccess,
+ IDocumentState & rState);
+
+ /** IDocumentUndoRedo */
+ virtual void DoUndo(bool const bDoUndo);
+ virtual bool DoesUndo() const;
+ virtual void DoGroupUndo(bool const bDoUndo);
+ virtual bool DoesGroupUndo() const;
+ virtual void DoDrawUndo(bool const bDoUndo);
+ virtual bool DoesDrawUndo() const;
+ virtual void SetUndoNoModifiedPosition();
+ virtual void LockUndoNoModifiedPosition();
+ virtual void UnLockUndoNoModifiedPosition();
+ virtual void SetUndoNoResetModified();
+ virtual bool IsUndoNoResetModified() const;
+// virtual bool Undo();
+ virtual SwUndoId StartUndo(SwUndoId const eUndoId,
+ SwRewriter const*const pRewriter);
+ virtual SwUndoId EndUndo(SwUndoId const eUndoId,
+ SwRewriter const*const pRewriter);
+ virtual void DelAllUndoObj();
+ virtual bool GetLastUndoInfo(::rtl::OUString *const o_pStr,
+ SwUndoId *const o_pId) const;
+ virtual SwUndoComments_t GetUndoComments() const;
+// virtual bool Redo();
+ virtual bool GetFirstRedoInfo(::rtl::OUString *const o_pStr) const;
+ virtual SwUndoComments_t GetRedoComments() const;
+ virtual bool Repeat(::sw::RepeatContext & rContext,
+ sal_uInt16 const nRepeatCnt);
+ virtual SwUndoId GetRepeatInfo(::rtl::OUString *const o_pStr) const;
+ virtual void AppendUndo(SwUndo *const pUndo);
+ virtual void ClearRedo();
+ virtual bool IsUndoNodes(SwNodes const& rNodes) const;
+
+ // ::svl::IUndoManager
+ virtual void AddUndoAction(SfxUndoAction *pAction,
+ sal_Bool bTryMerg = sal_False);
+ virtual sal_Bool Undo();
+ virtual sal_Bool Redo();
+ virtual void EnableUndo(bool bEnable);
+
+ SwUndo * RemoveLastUndo();
+ SwUndo * GetLastUndo();
+
+ SwNodes const& GetUndoNodes() const;
+ SwNodes & GetUndoNodes();
+
+private:
+ IDocumentDrawModelAccess & m_rDrawModelAccess;
+ IDocumentRedlineAccess & m_rRedlineAccess;
+ IDocumentState & m_rState;
+
+ /// Undo nodes array: content not currently in document
+ ::std::auto_ptr<SwNodes> m_pUndoNodes;
+
+ bool m_bGroupUndo : 1; // TRUE: Undo grouping enabled
+ bool m_bDrawUndo : 1; // TRUE: Draw Undo enabled
+ bool m_bLockUndoNoModifiedPosition : 1;
+ /// position in Undo-Array at which Doc was saved (and is not modified)
+ UndoStackMark m_UndoSaveMark;
+
+ typedef enum { UNDO = true, REDO = false } UndoOrRedo_t;
+ bool impl_DoUndoRedo(UndoOrRedo_t const undoOrRedo);
+
+ // UGLY: should not be called
+ using SfxUndoManager::Repeat;
+};
+
+} // namespace sw
+
+#endif // SW_UNDO_MANAGER_HXX
+
diff --git a/sw/source/core/inc/UndoNumbering.hxx b/sw/source/core/inc/UndoNumbering.hxx
new file mode 100644
index 000000000000..3d92ff7ce1c7
--- /dev/null
+++ b/sw/source/core/inc/UndoNumbering.hxx
@@ -0,0 +1,150 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SW_UNDO_NUMBERING_HXX
+#define SW_UNDO_NUMBERING_HXX
+
+#include <vector>
+#include <undobj.hxx>
+#include <boost/shared_ptr.hpp>
+#include <numrule.hxx>
+
+
+//--------------------------------------------------------------------
+//----------- Undo for Numbering -------------------------------------
+
+class SwUndoInsNum : public SwUndo, private SwUndRng
+{
+ SwNumRule aNumRule;
+ SwHistory* pHistory;
+ sal_uLong nSttSet;
+ SwNumRule* pOldNumRule;
+ String sReplaceRule;
+ sal_uInt16 nLRSavePos;
+public:
+ SwUndoInsNum( const SwPaM& rPam, const SwNumRule& rRule );
+ SwUndoInsNum( const SwNumRule& rOldRule, const SwNumRule& rNewRule,
+ SwUndoId nUndoId = UNDO_INSFMTATTR );
+ SwUndoInsNum( const SwPosition& rPos, const SwNumRule& rRule,
+ const String& rReplaceRule );
+
+ virtual ~SwUndoInsNum();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ virtual SwRewriter GetRewriter() const;
+
+ SwHistory* GetHistory(); // will be created if necessary
+ void SetSttNum( sal_uLong nNdIdx ) { nSttSet = nNdIdx; }
+ void SaveOldNumRule( const SwNumRule& rOld );
+
+ void SetLRSpaceEndPos();
+
+};
+
+class SwUndoDelNum : public SwUndo, private SwUndRng
+{
+ struct NodeLevel
+ {
+ sal_uLong index;
+ int level;
+ inline NodeLevel(sal_uLong idx, int lvl) : index(idx), level(lvl) {};
+ };
+ std::vector<NodeLevel> aNodes;
+ SwHistory* pHistory;
+public:
+ SwUndoDelNum( const SwPaM& rPam );
+
+ virtual ~SwUndoDelNum();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ void AddNode( const SwTxtNode& rNd, sal_Bool bResetLRSpace );
+ SwHistory* GetHistory() { return pHistory; }
+
+};
+
+class SwUndoMoveNum : public SwUndo, private SwUndRng
+{
+ sal_uLong nNewStt;
+ long nOffset;
+public:
+ SwUndoMoveNum( const SwPaM& rPam, long nOffset, sal_Bool bIsOutlMv = sal_False );
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ void SetStartNode( sal_uLong nValue ) { nNewStt = nValue; }
+};
+
+class SwUndoNumUpDown : public SwUndo, private SwUndRng
+{
+ short nOffset;
+public:
+ SwUndoNumUpDown( const SwPaM& rPam, short nOffset );
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+};
+
+class SwUndoNumOrNoNum : public SwUndo
+{
+ sal_uLong nIdx;
+ sal_Bool mbNewNum, mbOldNum;
+
+public:
+ SwUndoNumOrNoNum( const SwNodeIndex& rIdx, sal_Bool mbOldNum,
+ sal_Bool mbNewNum );
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+};
+
+class SwUndoNumRuleStart : public SwUndo
+{
+ sal_uLong nIdx;
+ sal_uInt16 nOldStt, nNewStt;
+ sal_Bool bSetSttValue : 1;
+ sal_Bool bFlag : 1;
+public:
+ SwUndoNumRuleStart( const SwPosition& rPos, sal_Bool bDelete );
+ SwUndoNumRuleStart( const SwPosition& rPos, sal_uInt16 nStt );
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+};
+
+#endif // SW_UNDO_NUMBERING_HXX
+
diff --git a/sw/source/core/inc/UndoOverwrite.hxx b/sw/source/core/inc/UndoOverwrite.hxx
new file mode 100644
index 000000000000..151de9b344c1
--- /dev/null
+++ b/sw/source/core/inc/UndoOverwrite.hxx
@@ -0,0 +1,105 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SW_UNDO_OVERWRITE_HXX
+#define SW_UNDO_OVERWRITE_HXX
+
+#include <undobj.hxx>
+
+#include <com/sun/star/uno/Sequence.h>
+
+
+class SwRedlineSaveDatas;
+class SwTxtNode;
+
+namespace utl {
+ class TransliterationWrapper;
+}
+
+
+class SwUndoOverwrite: public SwUndo, private SwUndoSaveCntnt
+{
+ String aDelStr, aInsStr;
+ SwRedlineSaveDatas* pRedlSaveData;
+ sal_uLong nSttNode;
+ xub_StrLen nSttCntnt;
+ sal_Bool bInsChar : 1; // no Overwrite, but Insert
+ sal_Bool bGroup : 1; // TRUE: is already grouped; evaluated in CanGrouping()
+
+public:
+ SwUndoOverwrite( SwDoc*, SwPosition&, sal_Unicode cIns );
+
+ virtual ~SwUndoOverwrite();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ // #111827#
+ /**
+ Returns the rewriter of this undo object.
+
+ The rewriter contains the following rule:
+
+ $1 -> '<overwritten text>'
+
+ <overwritten text> is shortened to nUndoStringLength characters.
+
+ @return the rewriter of this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+
+ sal_Bool CanGrouping( SwDoc*, SwPosition&, sal_Unicode cIns );
+};
+
+//--------------------------------------------------------------------
+
+struct _UndoTransliterate_Data;
+class SwUndoTransliterate : public SwUndo, public SwUndRng
+{
+ std::vector< _UndoTransliterate_Data * > aChanges;
+ sal_uInt32 nType;
+
+ void DoTransliterate(SwDoc & rDoc, SwPaM & rPam);
+
+public:
+ SwUndoTransliterate( const SwPaM& rPam,
+ const utl::TransliterationWrapper& rTrans );
+
+ virtual ~SwUndoTransliterate();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ void AddChanges( SwTxtNode& rTNd, xub_StrLen nStart, xub_StrLen nLen,
+ ::com::sun::star::uno::Sequence <sal_Int32>& rOffsets );
+ sal_Bool HasData() const { return aChanges.size() > 0; }
+};
+
+#endif // SW_UNDO_OVERWRITE_HXX
+
diff --git a/sw/source/core/inc/UndoRedline.hxx b/sw/source/core/inc/UndoRedline.hxx
new file mode 100644
index 000000000000..57b0df0867b9
--- /dev/null
+++ b/sw/source/core/inc/UndoRedline.hxx
@@ -0,0 +1,145 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SW_UNDO_REDLINE_HXX
+#define SW_UNDO_REDLINE_HXX
+
+#include <undobj.hxx>
+
+
+struct SwSortOptions;
+class SwRedline;
+class SwRedlineSaveDatas;
+class SwUndoDelete;
+
+
+//--------------------------------------------------------------------
+
+class SwUndoRedline : public SwUndo, public SwUndRng
+{
+protected:
+ SwRedlineData* pRedlData;
+ SwRedlineSaveDatas* pRedlSaveData;
+ SwUndoId nUserId;
+ sal_Bool bHiddenRedlines;
+
+ virtual void UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam);
+ virtual void RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam);
+
+public:
+ SwUndoRedline( SwUndoId nUserId, const SwPaM& rRange );
+
+ virtual ~SwUndoRedline();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+
+ SwUndoId GetUserId() const { return nUserId; }
+ sal_uInt16 GetRedlSaveCount() const;
+};
+
+class SwUndoRedlineDelete : public SwUndoRedline
+{
+ sal_Bool bCanGroup : 1;
+ sal_Bool bIsDelim : 1;
+ sal_Bool bIsBackspace : 1;
+
+ virtual void UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam);
+ virtual void RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam);
+
+public:
+ SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUserId = UNDO_EMPTY );
+
+ sal_Bool CanGrouping( const SwUndoRedlineDelete& rPrev );
+
+ // SwUndoTblCpyTbl needs this information:
+ long NodeDiff() const { return nSttNode - nEndNode; }
+ xub_StrLen ContentStart() const { return nSttCntnt; }
+};
+
+class SwUndoRedlineSort : public SwUndoRedline
+{
+ SwSortOptions* pOpt;
+ sal_uLong nSaveEndNode, nOffset;
+ xub_StrLen nSaveEndCntnt;
+
+ virtual void UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam);
+ virtual void RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam);
+
+public:
+ SwUndoRedlineSort( const SwPaM& rRange, const SwSortOptions& rOpt );
+
+ virtual ~SwUndoRedlineSort();
+
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ void SetSaveRange( const SwPaM& rRange );
+ void SetOffset( const SwNodeIndex& rIdx );
+};
+
+class SwUndoAcceptRedline : public SwUndoRedline
+{
+private:
+ virtual void RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam);
+
+public:
+ SwUndoAcceptRedline( const SwPaM& rRange );
+
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+};
+
+class SwUndoRejectRedline : public SwUndoRedline
+{
+private:
+ virtual void RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam);
+
+public:
+ SwUndoRejectRedline( const SwPaM& rRange );
+
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+};
+
+//--------------------------------------------------------------------
+
+class SwUndoCompDoc : public SwUndo, public SwUndRng
+{
+ SwRedlineData* pRedlData;
+ SwUndoDelete* pUnDel, *pUnDel2;
+ SwRedlineSaveDatas* pRedlSaveData;
+ sal_Bool bInsert;
+public:
+ SwUndoCompDoc( const SwPaM& rRg, sal_Bool bIns );
+ SwUndoCompDoc( const SwRedline& rRedl );
+
+ virtual ~SwUndoCompDoc();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+};
+
+#endif // SW_UNDO_REDLINE_HXX
+
diff --git a/sw/source/core/inc/UndoSection.hxx b/sw/source/core/inc/UndoSection.hxx
new file mode 100644
index 000000000000..bc6c8dd9fbfc
--- /dev/null
+++ b/sw/source/core/inc/UndoSection.hxx
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SW_UNDO_SECTION_HXX
+#define SW_UNDO_SECTION_HXX
+
+#include <undobj.hxx>
+
+#include <memory>
+
+#include <swdllapi.h>
+
+
+class SfxItemSet;
+class SwTxtNode;
+class SwSectionData;
+class SwSectionFmt;
+class SwTOXBase;
+
+
+//------------ Undo of Insert-/Delete-Section ----------------------
+
+class SwUndoInsSection : public SwUndo, private SwUndRng
+{
+private:
+ const ::std::auto_ptr<SwSectionData> m_pSectionData;
+ const ::std::auto_ptr<SwTOXBase> m_pTOXBase; /// set iff section is TOX
+ const ::std::auto_ptr<SfxItemSet> m_pAttrSet;
+ ::std::auto_ptr<SwHistory> m_pHistory;
+ ::std::auto_ptr<SwRedlineData> m_pRedlData;
+ sal_uLong m_nSectionNodePos;
+ bool m_bSplitAtStart : 1;
+ bool m_bSplitAtEnd : 1;
+ bool m_bUpdateFtn : 1;
+
+ void Join( SwDoc& rDoc, sal_uLong nNode );
+
+public:
+ SwUndoInsSection(SwPaM const&, SwSectionData const&,
+ SfxItemSet const*const pSet, SwTOXBase const*const pTOXBase);
+
+ virtual ~SwUndoInsSection();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ void SetSectNdPos(sal_uLong const nPos) { m_nSectionNodePos = nPos; }
+ void SaveSplitNode(SwTxtNode *const pTxtNd, bool const bAtStart);
+ void SetUpdtFtnFlag(bool const bFlag) { m_bUpdateFtn = bFlag; }
+};
+
+SW_DLLPRIVATE SwUndo * MakeUndoDelSection(SwSectionFmt const&);
+
+SW_DLLPRIVATE SwUndo * MakeUndoUpdateSection(SwSectionFmt const&, bool const);
+
+#endif // SW_UNDO_SECTION_HXX
+
diff --git a/sw/source/core/inc/UndoSort.hxx b/sw/source/core/inc/UndoSort.hxx
new file mode 100644
index 000000000000..b1cab7246aad
--- /dev/null
+++ b/sw/source/core/inc/UndoSort.hxx
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SW_UNDO_SORT_HXX
+#define SW_UNDO_SORT_HXX
+
+#include <undobj.hxx>
+
+
+struct SwSortOptions;
+class SwTableNode;
+class SwUndoAttrTbl;
+
+
+/*--------------------------------------------------------------------
+ Undo for Sorting
+ --------------------------------------------------------------------*/
+
+struct SwSortUndoElement
+{
+ union {
+ struct {
+ sal_uLong nKenn;
+ sal_uLong nSource, nTarget;
+ } TXT;
+ struct {
+ String *pSource, *pTarget;
+ } TBL;
+ } SORT_TXT_TBL;
+
+ SwSortUndoElement( const String& aS, const String& aT )
+ {
+ SORT_TXT_TBL.TBL.pSource = new String( aS );
+ SORT_TXT_TBL.TBL.pTarget = new String( aT );
+ }
+ SwSortUndoElement( sal_uLong nS, sal_uLong nT )
+ {
+ SORT_TXT_TBL.TXT.nSource = nS;
+ SORT_TXT_TBL.TXT.nTarget = nT;
+ SORT_TXT_TBL.TXT.nKenn = 0xffffffff;
+ }
+ ~SwSortUndoElement();
+};
+
+SV_DECL_PTRARR_DEL(SwSortList, SwSortUndoElement*, 10,30)
+SV_DECL_PTRARR(SwUndoSortList, SwNodeIndex*, 10,30)
+
+class SwUndoSort : public SwUndo, private SwUndRng
+{
+ SwSortOptions* pSortOpt;
+ SwSortList aSortList;
+ SwUndoAttrTbl* pUndoTblAttr;
+ SwRedlineData* pRedlData;
+ sal_uLong nTblNd;
+
+public:
+ SwUndoSort( const SwPaM&, const SwSortOptions& );
+ SwUndoSort( sal_uLong nStt, sal_uLong nEnd, const SwTableNode&,
+ const SwSortOptions&, sal_Bool bSaveTable );
+
+ virtual ~SwUndoSort();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ void Insert( const String& rOrgPos, const String& rNewPos );
+ void Insert( sal_uLong nOrgPos, sal_uLong nNewPos );
+
+};
+
+#endif // SW_UNDO_SORT_HXX
+
diff --git a/sw/source/core/inc/UndoSplitMove.hxx b/sw/source/core/inc/UndoSplitMove.hxx
new file mode 100644
index 000000000000..f58e71517f78
--- /dev/null
+++ b/sw/source/core/inc/UndoSplitMove.hxx
@@ -0,0 +1,96 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SW_UNDO_MOVE_HXX
+#define SW_UNDO_MOVE_HXX
+
+#include <undobj.hxx>
+
+
+class SwUndoSplitNode: public SwUndo
+{
+ SwHistory* pHistory;
+ SwRedlineData* pRedlData;
+ sal_uLong nNode;
+ xub_StrLen nCntnt;
+ sal_Bool bTblFlag : 1;
+ sal_Bool bChkTblStt : 1;
+
+public:
+ SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos, sal_Bool bChkTbl );
+
+ virtual ~SwUndoSplitNode();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ void SetTblFlag() { bTblFlag = sal_True; }
+};
+
+
+class SwUndoMove : public SwUndo, private SwUndRng, private SwUndoSaveCntnt
+{
+ // nDest.. - destination range of move (after move!)
+ // nIns.. - source Position of move (after move!)
+ // nMv.. - destination position of move (before move!); for REDO
+ sal_uLong nDestSttNode, nDestEndNode, nInsPosNode, nMvDestNode;
+ xub_StrLen nDestSttCntnt, nDestEndCntnt, nInsPosCntnt, nMvDestCntnt;
+
+ sal_uInt16 nFtnStt; // StartPos of Footnotes in History
+
+ sal_Bool bJoinNext : 1,
+ bJoinPrev : 1,
+ bMoveRange : 1;
+
+ bool bMoveRedlines; // use DOC_MOVEREDLINES when calling SwDoc::Move
+
+ void DelFtn( const SwPaM& );
+
+public:
+ SwUndoMove( const SwPaM&, const SwPosition& );
+ SwUndoMove( SwDoc* pDoc, const SwNodeRange&, const SwNodeIndex& );
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+
+ /// set the destination range after the move
+ void SetDestRange( const SwPaM&, const SwPosition&, sal_Bool, sal_Bool );
+ void SetDestRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd,
+ const SwNodeIndex& rInsPos );
+
+ sal_Bool IsMoveRange() const { return bMoveRange; }
+ sal_uLong GetEndNode() const { return nEndNode; }
+ sal_uLong GetDestSttNode() const { return nDestSttNode; }
+ xub_StrLen GetDestSttCntnt() const { return nDestSttCntnt; }
+
+ void SetMoveRedlines( bool b ) { bMoveRedlines = b; }
+
+};
+
+#endif // SW_UNDO_MOVE_HXX
+
diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx
new file mode 100644
index 000000000000..d7705a398ee2
--- /dev/null
+++ b/sw/source/core/inc/UndoTable.hxx
@@ -0,0 +1,391 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SW_UNDO_TABLE_HXX
+#define SW_UNDO_TABLE_HXX
+
+#include <undobj.hxx>
+
+#ifndef _SVSTDARR_HXX
+#define _SVSTDARR_USHORTS
+#define _SVSTDARR_ULONGS
+#define _SVSTDARR_BOOLS
+#define _SVSTDARR_BYTES
+#define _SVSTDARR_USHORTSSORT
+#include <svl/svstdarr.hxx>
+#endif
+
+#include <vector>
+#include <swtypes.hxx>
+#include <itabenum.hxx>
+
+class SfxItemSet;
+
+struct SwSaveRowSpan;
+class _SaveTable;
+class SwDDEFieldType;
+class SwUndoSaveSections;
+class SwUndoMoves;
+class SwUndoDelete;
+class SwSelBoxes;
+class SwTblToTxtSaves;
+class SwTable;
+class SwTableBox;
+class SwStartNode;
+class SwTableNode;
+class SwTableAutoFmt;
+class SwTableSortBoxes;
+
+
+class SwUndoInsTbl : public SwUndo
+{
+ String sTblNm;
+ SwInsertTableOptions aInsTblOpts;
+ SwDDEFieldType* pDDEFldType;
+ SvUShorts* pColWidth;
+ SwRedlineData* pRedlData;
+ SwTableAutoFmt* pAutoFmt;
+ sal_uLong nSttNode;
+ sal_uInt16 nRows, nCols;
+ sal_uInt16 nAdjust;
+
+public:
+ SwUndoInsTbl( const SwPosition&, sal_uInt16 nCols, sal_uInt16 nRows,
+ sal_uInt16 eAdjust, const SwInsertTableOptions& rInsTblOpts,
+ const SwTableAutoFmt* pTAFmt, const SvUShorts* pColArr,
+ const String & rName);
+
+ virtual ~SwUndoInsTbl();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ virtual SwRewriter GetRewriter() const;
+
+};
+
+class SwUndoTxtToTbl : public SwUndo, public SwUndRng
+{
+ String sTblNm;
+ SwInsertTableOptions aInsTblOpts;
+ SvULongs* pDelBoxes;
+ SwTableAutoFmt* pAutoFmt;
+ SwHistory* pHistory;
+ sal_Unicode cTrenner;
+ sal_uInt16 nAdjust;
+ sal_Bool bSplitEnd : 1;
+
+public:
+ SwUndoTxtToTbl( const SwPaM&, const SwInsertTableOptions&, sal_Unicode,
+ sal_uInt16,
+ const SwTableAutoFmt* pAFmt );
+
+ virtual ~SwUndoTxtToTbl();
+
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ SwHistory& GetHistory(); // will be created if necessary
+ void AddFillBox( const SwTableBox& rBox );
+};
+
+class SwUndoTblToTxt : public SwUndo
+{
+ String sTblNm;
+ SwDDEFieldType* pDDEFldType;
+ _SaveTable* pTblSave;
+ SwTblToTxtSaves* pBoxSaves;
+ SwHistory* pHistory;
+ sal_uLong nSttNd, nEndNd;
+ sal_uInt16 nAdjust;
+ sal_Unicode cTrenner;
+ sal_uInt16 nHdlnRpt;
+ sal_Bool bCheckNumFmt : 1;
+
+public:
+ SwUndoTblToTxt( const SwTable& rTbl, sal_Unicode cCh );
+
+ virtual ~SwUndoTblToTxt();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ void SetRange( const SwNodeRange& );
+ void AddBoxPos( SwDoc& rDoc, sal_uLong nNdIdx, sal_uLong nEndIdx,
+ xub_StrLen nCntntIdx = STRING_MAXLEN);
+};
+
+class SwUndoAttrTbl : public SwUndo
+{
+ sal_uLong nSttNode;
+ _SaveTable* pSaveTbl;
+ sal_Bool bClearTabCol : 1;
+public:
+ SwUndoAttrTbl( const SwTableNode& rTblNd, sal_Bool bClearTabCols = sal_False );
+
+ virtual ~SwUndoAttrTbl();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+};
+
+class SwUndoTblNumFmt;
+
+class SwUndoTblAutoFmt : public SwUndo
+{
+ sal_uLong nSttNode;
+ _SaveTable* pSaveTbl;
+ ::std::vector< ::boost::shared_ptr<SwUndoTblNumFmt> > m_Undos;
+ sal_Bool bSaveCntntAttr;
+
+ void UndoRedo(bool const bUndo, ::sw::UndoRedoContext & rContext);
+
+public:
+ SwUndoTblAutoFmt( const SwTableNode& rTblNd, const SwTableAutoFmt& );
+
+ virtual ~SwUndoTblAutoFmt();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+
+ void SaveBoxCntnt( const SwTableBox& rBox );
+};
+
+class SwUndoTblNdsChg : public SwUndo
+{
+ _SaveTable* pSaveTbl;
+ SvULongs aBoxes;
+
+ union {
+ SvULongs* pNewSttNds;
+ SwUndoSaveSections* pDelSects;
+ } Ptrs;
+ std::vector<bool> aMvBoxes; // for SplitRow (split Nodes of Box)
+ long nMin, nMax; // for redo of delete column
+ sal_uLong nSttNode, nCurrBox;
+ sal_uInt16 nCount, nRelDiff, nAbsDiff, nSetColType;
+ sal_Bool bFlag;
+ sal_Bool bSameHeight; // only used for SplitRow
+public:
+ SwUndoTblNdsChg( SwUndoId UndoId,
+ const SwSelBoxes& rBoxes,
+ const SwTableNode& rTblNd,
+ long nMn, long nMx,
+ sal_uInt16 nCnt, sal_Bool bFlg, sal_Bool bSameHeight );
+
+ // for SetColWidth
+ SwUndoTblNdsChg( SwUndoId UndoId, const SwSelBoxes& rBoxes,
+ const SwTableNode& rTblNd );
+
+ virtual ~SwUndoTblNdsChg();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+
+ void SaveNewBoxes( const SwTableNode& rTblNd, const SwTableSortBoxes& rOld );
+ void SaveNewBoxes( const SwTableNode& rTblNd, const SwTableSortBoxes& rOld,
+ const SwSelBoxes& rBoxes, const SvULongs& rNodeCnts );
+ void SaveSection( SwStartNode* pSttNd );
+ void ReNewBoxes( const SwSelBoxes& rBoxes );
+
+
+ void SetColWidthParam( sal_uLong nBoxIdx, sal_uInt16 nMode, sal_uInt16 nType,
+ SwTwips nAbsDif, SwTwips nRelDif )
+ {
+ nCurrBox = nBoxIdx;
+ nCount = nMode;
+ nSetColType = nType;
+ nAbsDiff = (sal_uInt16)nAbsDif;
+ nRelDiff = (sal_uInt16)nRelDif;
+ }
+
+};
+
+class SwUndoTblMerge : public SwUndo, private SwUndRng
+{
+ sal_uLong nTblNode;
+ _SaveTable* pSaveTbl;
+ SvULongs aBoxes, aNewSttNds;
+ SwUndoMoves* pMoves;
+ SwHistory* pHistory;
+
+public:
+ SwUndoTblMerge( const SwPaM& rTblSel );
+
+ virtual ~SwUndoTblMerge();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+
+ void MoveBoxCntnt( SwDoc* pDoc, SwNodeRange& rRg, SwNodeIndex& rPos );
+
+ void SetSelBoxes( const SwSelBoxes& rBoxes );
+
+ void AddNewBox( sal_uLong nSttNdIdx )
+ { aNewSttNds.Insert( nSttNdIdx, aNewSttNds.Count() ); }
+
+ void SaveCollection( const SwTableBox& rBox );
+
+};
+
+
+class SwUndoTblNumFmt : public SwUndo
+{
+ SfxItemSet *pBoxSet;
+ SwHistory* pHistory;
+ String aStr, aNewFml;
+
+ sal_uLong nFmtIdx, nNewFmtIdx;
+ double fNum, fNewNum;
+ sal_uLong nNode;
+ sal_uLong nNdPos;
+
+ sal_Bool bNewFmt : 1;
+ sal_Bool bNewFml : 1;
+ sal_Bool bNewValue : 1;
+
+public:
+ SwUndoTblNumFmt( const SwTableBox& rBox, const SfxItemSet* pNewSet = 0 );
+
+ virtual ~SwUndoTblNumFmt();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+
+ void SetNumFmt( sal_uLong nNewNumFmtIdx, const double& rNewNumber )
+ { nFmtIdx = nNewNumFmtIdx; fNum = rNewNumber; }
+ void SetBox( const SwTableBox& rBox );
+};
+
+class _UndoTblCpyTbl_Entries;
+
+class SwUndoTblCpyTbl : public SwUndo
+{
+ _UndoTblCpyTbl_Entries* pArr;
+ SwUndoTblNdsChg* pInsRowUndo;
+
+ //b6341295: When redlining is active, PrepareRedline has to create the
+ //redlining attributes for the new and the old table cell content
+ SwUndo* PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox,
+ const SwPosition& rPos, bool& rJoin, bool bRedo );
+public:
+ SwUndoTblCpyTbl();
+
+ virtual ~SwUndoTblCpyTbl();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+
+ void AddBoxBefore( const SwTableBox& rBox, sal_Bool bDelCntnt );
+ void AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex& rIdx,
+ sal_Bool bDelCntnt );
+
+ sal_Bool IsEmpty() const;
+ sal_Bool InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes, sal_uInt16 nCnt );
+};
+
+class SwUndoCpyTbl : public SwUndo
+{
+ SwUndoDelete* pDel;
+ sal_uLong nTblNode;
+public:
+ SwUndoCpyTbl();
+
+ virtual ~SwUndoCpyTbl();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+
+ void SetTableSttIdx( sal_uLong nIdx ) { nTblNode = nIdx; }
+};
+
+class SwUndoSplitTbl : public SwUndo
+{
+ sal_uLong nTblNode, nOffset;
+ SwSaveRowSpan* mpSaveRowSpan; // stores row span values at the splitting row
+ _SaveTable* pSavTbl;
+ SwHistory* pHistory;
+ sal_uInt16 nMode, nFmlEnd;
+ sal_Bool bCalcNewSize;
+public:
+ SwUndoSplitTbl( const SwTableNode& rTblNd, SwSaveRowSpan* pRowSp,
+ sal_uInt16 nMode, sal_Bool bCalcNewSize );
+
+ virtual ~SwUndoSplitTbl();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ void SetTblNodeOffset( sal_uLong nIdx ) { nOffset = nIdx - nTblNode; }
+ SwHistory* GetHistory() { return pHistory; }
+ void SaveFormula( SwHistory& rHistory );
+};
+
+class SwUndoMergeTbl : public SwUndo
+{
+ String aName;
+ sal_uLong nTblNode;
+ _SaveTable* pSavTbl, *pSavHdl;
+ SwHistory* pHistory;
+ sal_uInt16 nMode;
+ sal_Bool bWithPrev;
+public:
+ SwUndoMergeTbl( const SwTableNode& rTblNd, const SwTableNode& rDelTblNd,
+ sal_Bool bWithPrev, sal_uInt16 nMode );
+
+ virtual ~SwUndoMergeTbl();
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+
+ void SaveFormula( SwHistory& rHistory );
+};
+
+
+//--------------------------------------------------------------------
+
+class SwUndoTblHeadline : public SwUndo
+{
+ sal_uLong nTblNd;
+ sal_uInt16 nOldHeadline;
+ sal_uInt16 nNewHeadline;
+public:
+ SwUndoTblHeadline( const SwTable&, sal_uInt16 nOldHdl, sal_uInt16 nNewHdl );
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
+ virtual void RepeatImpl( ::sw::RepeatContext & );
+};
+
+#endif // SW_UNDO_TABLE_HXX
+
diff --git a/sw/source/core/inc/acorrect.hxx b/sw/source/core/inc/acorrect.hxx
index 9031c7a98363..38975d37969f 100644
--- a/sw/source/core/inc/acorrect.hxx
+++ b/sw/source/core/inc/acorrect.hxx
@@ -57,7 +57,7 @@ class SwAutoCorrDoc : public SvxAutoCorrDoc
SwEditShell& rEditSh;
SwPaM& rCrsr;
SwNodeIndex* pIdx;
- SwUndoId nUndoId;
+ int m_nEndUndoCounter;
bool bUndoIdInitialized;
void DeleteSel( SwPaM& rDelPam );
@@ -66,25 +66,25 @@ public:
SwAutoCorrDoc( SwEditShell& rEditShell, SwPaM& rPam, sal_Unicode cIns = 0 );
~SwAutoCorrDoc();
- virtual BOOL Delete( xub_StrLen nStt, xub_StrLen nEnd );
- virtual BOOL Insert( xub_StrLen nPos, const String& rTxt );
- virtual BOOL Replace( xub_StrLen nPos, const String& rTxt );
+ virtual sal_Bool Delete( xub_StrLen nStt, xub_StrLen nEnd );
+ virtual sal_Bool Insert( xub_StrLen nPos, const String& rTxt );
+ virtual sal_Bool Replace( xub_StrLen nPos, const String& rTxt );
- virtual BOOL SetAttr( xub_StrLen nStt, xub_StrLen nEnd, USHORT nSlotId,
+ virtual sal_Bool SetAttr( xub_StrLen nStt, xub_StrLen nEnd, sal_uInt16 nSlotId,
SfxPoolItem& );
- virtual BOOL SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String& rURL );
+ virtual sal_Bool SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String& rURL );
// returne den Text eines vorherigen Absatzes.
// Dieser darf nicht leer sein!
// Gibt es diesen nicht oder gibt es davor nur Leere, dann returne 0
// Das Flag gibt an:
- // TRUE: den, vor der normalen Einfuegeposition (TRUE)
- // FALSE: den, in den das korrigierte Wort eingfuegt wurde.
+ // sal_True: den, vor der normalen Einfuegeposition (sal_True)
+ // sal_False: den, in den das korrigierte Wort eingfuegt wurde.
// (Muss nicht der gleiche Absatz sein!!!!)
- virtual const String* GetPrevPara( BOOL bAtNormalPos );
+ virtual const String* GetPrevPara( sal_Bool bAtNormalPos );
- virtual BOOL ChgAutoCorrWord( xub_StrLen& rSttPos, xub_StrLen nEndPos,
+ virtual sal_Bool ChgAutoCorrWord( xub_StrLen& rSttPos, xub_StrLen nEndPos,
SvxAutoCorrect& rACorrect,
const String** ppPara );
@@ -93,30 +93,30 @@ public:
// - FnCptlSttSntnc
// gerufen. Dann koennen die Worte ggfs. in die Ausnahmelisten
// aufgenommen werden.
- virtual void SaveCpltSttWord( ULONG nFlag, xub_StrLen nPos,
+ virtual void SaveCpltSttWord( sal_uLong nFlag, xub_StrLen nPos,
const String& rExceptWord, sal_Unicode cChar );
- virtual LanguageType GetLanguage( xub_StrLen nPos, BOOL bPrevPara ) const;
+ virtual LanguageType GetLanguage( xub_StrLen nPos, sal_Bool bPrevPara ) const;
};
class SwAutoCorrExceptWord
{
String sWord;
- ULONG nFlags, nNode;
+ sal_uLong nFlags, nNode;
xub_StrLen nCntnt;
sal_Unicode cChar;
LanguageType eLanguage;
- BOOL bDeleted;
+ sal_Bool bDeleted;
public:
- SwAutoCorrExceptWord( ULONG nAFlags, ULONG nNd, xub_StrLen nContent,
+ SwAutoCorrExceptWord( sal_uLong nAFlags, sal_uLong nNd, xub_StrLen nContent,
const String& rWord, sal_Unicode cChr,
LanguageType eLang )
: sWord(rWord), nFlags(nAFlags), nNode(nNd), nCntnt(nContent),
- cChar(cChr), eLanguage(eLang), bDeleted(FALSE)
+ cChar(cChr), eLanguage(eLang), bDeleted(sal_False)
{}
- BOOL IsDeleted() const { return bDeleted; }
+ sal_Bool IsDeleted() const { return bDeleted; }
void CheckChar( const SwPosition& rPos, sal_Unicode cChar );
- BOOL CheckDelChar( const SwPosition& rPos );
+ sal_Bool CheckDelChar( const SwPosition& rPos );
};
diff --git a/sw/source/core/inc/anchoredobjectposition.hxx b/sw/source/core/inc/anchoredobjectposition.hxx
index 88e90c715380..88affdb989b2 100644
--- a/sw/source/core/inc/anchoredobjectposition.hxx
+++ b/sw/source/core/inc/anchoredobjectposition.hxx
@@ -79,12 +79,14 @@ namespace objectpositioning
void _GetInfoAboutObj();
// #i62875#
- SwTwips _ImplAdjustVertRelPos( const SwTwips _nTopOfAnch,
- const bool _bVert,
- const SwFrm& _rPageAlignLayFrm,
- const SwTwips _nProposedRelPosY,
- const bool _bFollowTextFlow,
- const bool _bCheckBottom = true ) const;
+ // --> OD 2009-09-01 #mongolianlayout# - add parameter <bVertL2R>
+ SwTwips _ImplAdjustVertRelPos( const SwTwips nTopOfAnch,
+ const bool bVert,
+ const bool bVertL2R,
+ const SwFrm& rPageAlignLayFrm,
+ const SwTwips nProposedRelPosY,
+ const bool bFollowTextFlow,
+ const bool bCheckBottom = true ) const;
SwTwips _ImplAdjustHoriRelPos( const SwFrm& _rPageAlignLayFrm,
const SwTwips _nProposedRelPosX ) const;
@@ -167,46 +169,52 @@ namespace objectpositioning
#i62875# - made inline, intrinsic actions moved
to private method <_ImplAdjustVertRelPos>, which is only
called, if <mbDoNotCaptureAnchoredObj> not set.
+ OD 2009-09-01 #mongolianlayout# - add parameter <bVertL2R>
- @param _nTopOfAnch
+ @param nTopOfAnch
input parameter - 'vertical' position, at which the relative
position of the object is calculated from.
- @param _bVert
+ @param bVert
input parameter - boolean, indicating, if object is in vertical
layout.
- @param _rPageAlignLayFrm
+ @param bVertL2R
+ input parameter - boolean, indicating, if object is in mongolian
+ layout (vertical left-to-right layout).
+
+ @param rPageAlignLayFrm
input parameter - layout frame, which determines the 'page area'
the object has to be vertical positioned in.
- @param _nProposedRelPosY
+ @param nProposedRelPosY
input parameter - proposed relative vertical position, which
will be adjusted.
- @param _bFollowTextFlow
+ @param bFollowTextFlow
input parameter - value of attribute 'Follow text flow' of the
anchored object.
- @param _bCheckBottom
+ @param bCheckBottom
input parameter - boolean indicating, if bottom of anchored
object has to be checked and thus, (if needed) the proposed
relative position has to be adjusted. default value <true>
*/
- inline SwTwips _AdjustVertRelPos( const SwTwips _nTopOfAnch,
- const bool _bVert,
- const SwFrm& _rPageAlignLayFrm,
- const SwTwips _nProposedRelPosY,
- const bool _bFollowTextFlow,
- const bool _bCheckBottom = true ) const
+ inline SwTwips _AdjustVertRelPos( const SwTwips nTopOfAnch,
+ const bool bVert,
+ const bool bVertL2R,
+ const SwFrm& rPageAlignLayFrm,
+ const SwTwips nProposedRelPosY,
+ const bool bFollowTextFlow,
+ const bool bCheckBottom = true ) const
{
return !mbDoNotCaptureAnchoredObj
- ? _ImplAdjustVertRelPos( _nTopOfAnch, _bVert,
- _rPageAlignLayFrm,
- _nProposedRelPosY,
- _bFollowTextFlow,
- _bCheckBottom )
- : _nProposedRelPosY;
+ ? _ImplAdjustVertRelPos( nTopOfAnch, bVert, bVertL2R,
+ rPageAlignLayFrm,
+ nProposedRelPosY,
+ bFollowTextFlow,
+ bCheckBottom )
+ : nProposedRelPosY;
}
// *********************************************************************
@@ -422,7 +430,7 @@ namespace objectpositioning
bool _DrawAsideFly( const SwFlyFrm* _pFly,
const SwRect& _rObjRect,
const SwFrm* _pObjContext,
- const ULONG _nObjIndex,
+ const sal_uLong _nObjIndex,
const bool _bEvenPage,
const sal_Int16 _eHoriOrient,
const sal_Int16 _eRelOrient
diff --git a/sw/source/core/inc/blink.hxx b/sw/source/core/inc/blink.hxx
index ad56ed7750ca..1a4b0a9252c0 100644
--- a/sw/source/core/inc/blink.hxx
+++ b/sw/source/core/inc/blink.hxx
@@ -42,9 +42,9 @@ class SwBlinkPortion
Point aPos;
const SwLinePortion *pPor;
const SwRootFrm *pFrm;
- USHORT nDir;
+ sal_uInt16 nDir;
public:
- SwBlinkPortion( const SwLinePortion* pPortion, USHORT nDirection )
+ SwBlinkPortion( const SwLinePortion* pPortion, sal_uInt16 nDirection )
{ pPor = pPortion; nDir = nDirection; }
SwBlinkPortion( const SwBlinkPortion* pBlink, const SwLinePortion* pPort )
{ pPor = pPort; pFrm = pBlink->pFrm; aPos = pBlink->aPos; nDir = pBlink->nDir; }
@@ -53,10 +53,10 @@ public:
void SetRootFrm( const SwRootFrm* pNew ){ pFrm = pNew; }
const SwRootFrm* GetRootFrm() const{ return pFrm; }
const SwLinePortion *GetPortion() const{ return pPor; }
- USHORT GetDirection() const { return nDir; }
- BOOL operator<( const SwBlinkPortion& rBlinkPortion ) const
+ sal_uInt16 GetDirection() const { return nDir; }
+ sal_Bool operator<( const SwBlinkPortion& rBlinkPortion ) const
{ return (long)pPor < (long)rBlinkPortion.pPor; }
- BOOL operator==( const SwBlinkPortion& rBlinkPortion ) const
+ sal_Bool operator==( const SwBlinkPortion& rBlinkPortion ) const
{ return (long)pPor == (long)rBlinkPortion.pPor; }
};
@@ -67,7 +67,7 @@ class SwBlink
{
SwBlinkList aList;
AutoTimer aTimer;
- BOOL bVisible;
+ sal_Bool bVisible;
public:
SwBlink();
~SwBlink();
@@ -75,11 +75,11 @@ public:
DECL_LINK( Blinker, Timer * );
void Insert( const Point& rPoint, const SwLinePortion* pPor,
- const SwTxtFrm *pTxtFrm, USHORT nDir );
+ const SwTxtFrm *pTxtFrm, sal_uInt16 nDir );
void Replace( const SwLinePortion* pOld, const SwLinePortion* pNew );
void Delete( const SwLinePortion* pPor );
void FrmDelete( const SwRootFrm* pRoot );
- inline BOOL IsVisible() const { return bVisible ; }
+ inline sal_Bool IsVisible() const { return bVisible ; }
};
// Blink-Manager, globale Variable, in Blink.Cxx angelegt
diff --git a/sw/source/core/inc/bodyfrm.hxx b/sw/source/core/inc/bodyfrm.hxx
index 625011d17382..5d8a7f30f43b 100644
--- a/sw/source/core/inc/bodyfrm.hxx
+++ b/sw/source/core/inc/bodyfrm.hxx
@@ -44,7 +44,7 @@ protected:
public:
SwBodyFrm( SwFrmFmt* );
- virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual void Paint( const SwRect&, const SwPrintData *pPrintData = NULL ) const;
DECL_FIXEDMEMPOOL_NEWDEL(SwBodyFrm)
};
diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx
index 1de092aa969d..b50a1a7e3612 100644
--- a/sw/source/core/inc/cellfrm.hxx
+++ b/sw/source/core/inc/cellfrm.hxx
@@ -25,8 +25,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _CELLFRM_HXX
-#define _CELLFRM_HXX
+#ifndef SW_CELLFRM_HXX
+#define SW_CELLFRM_HXX
#include <tools/mempool.hxx>
@@ -47,10 +47,11 @@ public:
SwCellFrm( const SwTableBox &, bool bInsertContent = true );
~SwCellFrm();
- virtual BOOL GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* = 0 ) const;
+ virtual sal_Bool GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* = 0 ) const;
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
- virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
- virtual void CheckDirection( BOOL bVert );
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
+ virtual void CheckDirection( sal_Bool bVert );
// --> OD 2010-02-17 #i103961#
virtual void Cut();
diff --git a/sw/source/core/inc/cntfrm.hxx b/sw/source/core/inc/cntfrm.hxx
index bd59b54e3530..3a21ef14e0bc 100644
--- a/sw/source/core/inc/cntfrm.hxx
+++ b/sw/source/core/inc/cntfrm.hxx
@@ -38,7 +38,7 @@ class SwAttrSetChg;
class SwTxtFrm;
//Implementiert in cntfrm.cxx, wird von cntfrm.cxx und crsrsh.cxx angezogen
-extern BOOL GetFrmInPage( const SwCntntFrm*, SwWhichPage, SwPosPage, SwPaM* );
+extern sal_Bool GetFrmInPage( const SwCntntFrm*, SwWhichPage, SwPosPage, SwPaM* );
class SwCntntFrm: public SwFrm, public SwFlowFrm
{
@@ -47,27 +47,27 @@ class SwCntntFrm: public SwFrm, public SwFlowFrm
// --> OD 2007-11-26 #b6614158#
// parameter <bObjsInNewUpper>, indicating that objects are existing in
// remaining area of new upper
- BOOL _WouldFit( SwTwips nSpace,
+ sal_Bool _WouldFit( SwTwips nSpace,
SwLayoutFrm *pNewUpper,
- BOOL bTstMove,
+ sal_Bool bTstMove,
const bool bObjsInNewUpper );
// <--
virtual void MakeAll();
- void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, BYTE &,
+ void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, sal_uInt8 &,
SwAttrSetChg *pa = 0, SwAttrSetChg *pb = 0 );
- virtual BOOL ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL& );
+ virtual sal_Bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool& );
const SwCntntFrm* ImplGetNextCntntFrm( bool bFwd ) const;
protected:
- BOOL MakePrtArea( const SwBorderAttrs & );
+ sal_Bool MakePrtArea( const SwBorderAttrs & );
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
- virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
- virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
+ virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
+ virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
SwCntntFrm( SwCntntNode * const );
@@ -80,32 +80,32 @@ public:
inline SwCntntNode *GetNode();
inline const SwCntntNode *GetNode() const;
- USHORT GetSectionLevel();
+ sal_uInt16 GetSectionLevel();
inline const SwCntntFrm *GetFollow() const;
inline SwCntntFrm *GetFollow();
SwTxtFrm* FindMaster() const;
//Layoutabhaengiges Cursortravelling
- virtual BOOL LeftMargin( SwPaM * ) const;
- virtual BOOL RightMargin( SwPaM *, BOOL bAPI = FALSE ) const;
- virtual BOOL UnitUp( SwPaM *, const SwTwips nOffset = 0,
- BOOL bSetInReadOnly = FALSE ) const;
- virtual BOOL UnitDown( SwPaM *, const SwTwips nOffset = 0,
- BOOL bSetInReadOnly = FALSE ) const;
- inline BOOL StartNextPage( SwPaM * ) const;
- inline BOOL StartPrevPage( SwPaM * ) const;
- inline BOOL StartCurrPage( SwPaM * ) const;
- inline BOOL EndCurrPage( SwPaM * ) const;
- inline BOOL EndNextPage( SwPaM * ) const;
- inline BOOL EndPrevPage( SwPaM * ) const;
+ virtual sal_Bool LeftMargin( SwPaM * ) const;
+ virtual sal_Bool RightMargin( SwPaM *, sal_Bool bAPI = sal_False ) const;
+ virtual sal_Bool UnitUp( SwPaM *, const SwTwips nOffset = 0,
+ sal_Bool bSetInReadOnly = sal_False ) const;
+ virtual sal_Bool UnitDown( SwPaM *, const SwTwips nOffset = 0,
+ sal_Bool bSetInReadOnly = sal_False ) const;
+ inline sal_Bool StartNextPage( SwPaM * ) const;
+ inline sal_Bool StartPrevPage( SwPaM * ) const;
+ inline sal_Bool StartCurrPage( SwPaM * ) const;
+ inline sal_Bool EndCurrPage( SwPaM * ) const;
+ inline sal_Bool EndNextPage( SwPaM * ) const;
+ inline sal_Bool EndPrevPage( SwPaM * ) const;
// nMaxHeight is the required height
// bSplit indicates, that the paragraph has to be split
// bTst indicates, that we are currently doing a test formatting
virtual sal_Bool WouldFit( SwTwips &nMaxHeight, sal_Bool &bSplit, sal_Bool bTst );
- BOOL MoveFtnCntFwd( BOOL, SwFtnBossFrm* );//von MoveFwd gerufen bei Ftn-Inhalt
+ sal_Bool MoveFtnCntFwd( sal_Bool, SwFtnBossFrm* );//von MoveFwd gerufen bei Ftn-Inhalt
inline SwCntntFrm* GetNextCntntFrm() const;
inline SwCntntFrm* GetPrevCntntFrm() const;
diff --git a/sw/source/core/inc/dbg_lay.hxx b/sw/source/core/inc/dbg_lay.hxx
index 141d55d41946..d290e9c8c178 100644
--- a/sw/source/core/inc/dbg_lay.hxx
+++ b/sw/source/core/inc/dbg_lay.hxx
@@ -74,27 +74,27 @@ class SwImplEnterLeave;
class SwProtocol
{
- static ULONG nRecord;
+ static sal_uLong nRecord;
static SwImplProtocol* pImpl;
- static BOOL Start() { return 0 != ( PROT_INIT & nRecord ); }
+ static sal_Bool Start() { return 0 != ( PROT_INIT & nRecord ); }
public:
- static ULONG Record() { return nRecord; }
- static void SetRecord( ULONG nNew ) { nRecord = nNew; }
- static BOOL Record( ULONG nFunc ) { return 0 != (( nFunc | PROT_INIT ) & nRecord); }
- static void Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAction, void* pParam );
+ static sal_uLong Record() { return nRecord; }
+ static void SetRecord( sal_uLong nNew ) { nRecord = nNew; }
+ static sal_Bool Record( sal_uLong nFunc ) { return 0 != (( nFunc | PROT_INIT ) & nRecord); }
+ static void Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAction, void* pParam );
static void Init();
static void Stop();
- static void SnapShot( const SwFrm* pFrm, ULONG nFlags );
- static void GetVar( const USHORT nNo, long& rVar );
+ static void SnapShot( const SwFrm* pFrm, sal_uLong nFlags );
+ static void GetVar( const sal_uInt16 nNo, long& rVar );
};
class SwEnterLeave
{
SwImplEnterLeave* pImpl;
- void Ctor( const SwFrm* pFrm, ULONG nFunc, ULONG nAct, void* pPar );
+ void Ctor( const SwFrm* pFrm, sal_uLong nFunc, sal_uLong nAct, void* pPar );
void Dtor();
public:
- SwEnterLeave( const SwFrm* pFrm, ULONG nFunc, ULONG nAct, void* pPar )
+ SwEnterLeave( const SwFrm* pFrm, sal_uLong nFunc, sal_uLong nAct, void* pPar )
{ if( SwProtocol::Record( nFunc ) ) Ctor( pFrm, nFunc, nAct, pPar ); else pImpl = NULL; }
~SwEnterLeave() { if( pImpl ) Dtor(); }
};
diff --git a/sw/source/ui/ribbar/tblctrl.src b/sw/source/core/inc/dbgloop.hxx
index 0c783172af74..bfa17b466828 100644
--- a/sw/source/ui/ribbar/tblctrl.src
+++ b/sw/source/core/inc/dbgloop.hxx
@@ -25,70 +25,53 @@
*
************************************************************************/
-#include "tblctrl.hrc"
-#include "helpid.h"
-#include "cmdid.h"
-FloatingWindow RID_TBL_OPT_CTRL
-{
- Moveable = TRUE ;
- Closeable = TRUE ;
- Hide = TRUE ;
- SVLook = TRUE ;
- HelpID = HID_TBL_OPT_CTRL ;
- ToolBox TBX_OPTIMIZE_TABLE
- {
- MenuStrings = TRUE ;
- SVLook = TRUE ;
- HelpID = 1 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = FN_TABLE_BALANCE_CELLS ;
- HelpID = FN_TABLE_BALANCE_CELLS ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_BALANCE_ROWS ;
- HelpID = FN_TABLE_BALANCE_ROWS ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_OPTIMAL_HEIGHT ;
- HelpID = FN_TABLE_OPTIMAL_HEIGHT ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_ADJUST_CELLS ;
- HelpID = FN_TABLE_ADJUST_CELLS ;
- };
- };
- };
- Text [ en-US ] = "Optimize" ;
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+#ifndef _DBGLOOP_HXX
+#define _DBGLOOP_HXX
+#ifdef DBG_UTIL
+#include <tools/solar.h>
+class SvStream;
+#define DBG_MAX_STACK 20 // Verschachtelungstiefe
+#define DBG_MAX_LOOP 1000 // das Abbruchkriterium
+class DbgLoopStack
+{
+ sal_uInt16 aCount[DBG_MAX_STACK];
+ sal_uInt16 nPtr;
+ const void *pDbg;
+ void Reset();
+public:
+ DbgLoopStack();
+ void Push( const void *pThis );
+ void Pop();
+ void Print( SvStream &rOS ) const; //$ ostream
+};
+class DbgLoop
+{
+ friend inline void PrintLoopStack( SvStream &rOS ); //$ ostream
+ static DbgLoopStack aDbgLoopStack;
+public:
+ inline DbgLoop( const void *pThis ) { aDbgLoopStack.Push( pThis ); }
+ inline ~DbgLoop() { aDbgLoopStack.Pop(); }
+};
+inline void PrintLoopStack( SvStream &rOS ) //$ ostream
+{
+ DbgLoop::aDbgLoopStack.Print( rOS );
+}
+#define DBG_LOOP DbgLoop aDbgLoop( (const void*)this );
+#define DBG_LOOP_RESET DbgLoop aDbgLoop( 0 );
+#else
+#define DBG_LOOP
+#define DBG_LOOP_RESET
+#endif
+#endif
diff --git a/sw/source/core/inc/dflyobj.hxx b/sw/source/core/inc/dflyobj.hxx
index f89947ee95b6..9e3cf0dff55e 100644
--- a/sw/source/core/inc/dflyobj.hxx
+++ b/sw/source/core/inc/dflyobj.hxx
@@ -33,12 +33,12 @@ class SwFlyFrm;
class SwFrmFmt;
class SdrObjMacroHitRec;
-const UINT32 SWGInventor = UINT32('S')*0x00000001+
- UINT32('W')*0x00000100+
- UINT32('G')*0x00010000;
+const sal_uInt32 SWGInventor = sal_uInt32('S')*0x00000001+
+ sal_uInt32('W')*0x00000100+
+ sal_uInt32('G')*0x00010000;
-const UINT16 SwFlyDrawObjIdentifier = 0x0001;
-const UINT16 SwDrawFirst = 0x0001;
+const sal_uInt16 SwFlyDrawObjIdentifier = 0x0001;
+const sal_uInt16 SwDrawFirst = 0x0001;
//---------------------------------------
//SwFlyDrawObj, Die DrawObjekte fuer Flys.
@@ -61,9 +61,9 @@ public:
//Damit eine Instanz dieser Klasse beim laden erzeugt werden kann
//(per Factory).
- virtual UINT32 GetObjInventor() const;
- virtual UINT16 GetObjIdentifier() const;
- virtual UINT16 GetObjVersion() const;
+ virtual sal_uInt32 GetObjInventor() const;
+ virtual sal_uInt16 GetObjIdentifier() const;
+ virtual sal_uInt16 GetObjVersion() const;
};
//---------------------------------------
diff --git a/sw/source/core/inc/docfld.hxx b/sw/source/core/inc/docfld.hxx
index 891c6f2b02d7..26d19dc4d859 100644
--- a/sw/source/core/inc/docfld.hxx
+++ b/sw/source/core/inc/docfld.hxx
@@ -48,7 +48,7 @@ struct SwPosition;
// Update an den Expression Feldern
class _SetGetExpFld
{
- ULONG nNode;
+ sal_uLong nNode;
xub_StrLen nCntnt;
union {
const SwTxtFld* pTxtFld;
@@ -85,11 +85,11 @@ public:
_SetGetExpFld( const SwFlyFrmFmt& rFlyFmt, const SwPosition* pPos = 0 );
- BOOL operator==( const _SetGetExpFld& rFld ) const
+ sal_Bool operator==( const _SetGetExpFld& rFld ) const
{ return nNode == rFld.nNode && nCntnt == rFld.nCntnt &&
( !CNTNT.pTxtFld || !rFld.CNTNT.pTxtFld ||
CNTNT.pTxtFld == rFld.CNTNT.pTxtFld ); }
- BOOL operator<( const _SetGetExpFld& rFld ) const;
+ sal_Bool operator<( const _SetGetExpFld& rFld ) const;
const SwTxtFld* GetFld() const
{ return TEXTFIELD == eSetGetExpFldType ? CNTNT.pTxtFld : 0; }
@@ -104,7 +104,7 @@ public:
const SwFlyFrmFmt* GetFlyFmt() const
{ return FLYFRAME == eSetGetExpFldType ? CNTNT.pFlyFmt : 0; }
- ULONG GetNode() const { return nNode; }
+ sal_uLong GetNode() const { return nNode; }
xub_StrLen GetCntnt() const { return nCntnt; }
const void* GetPointer() const { return CNTNT.pTxtFld; }
@@ -139,8 +139,8 @@ struct SwCalcFldType : public SwHash
// Suche nach dem String, der unter dem Namen in der HashTabelle abgelegt
// wurde
-void LookString( SwHash** ppTbl, USHORT nSize, const String& rName,
- String& rRet, USHORT* pPos = 0 );
+void LookString( SwHash** ppTbl, sal_uInt16 nSize, const String& rName,
+ String& rRet, sal_uInt16* pPos = 0 );
// --------
@@ -158,14 +158,14 @@ class SwDocUpdtFld
long nFldUpdtPos; // ab dieser Position mit Update starten
SwCntntNode* pCNode; // der TxtNode zur UpdatePos.
- ULONG nNodes; // sollte die NodesAnzahl unterschiedlich sein
- BYTE nFldLstGetMode;
+ sal_uLong nNodes; // sollte die NodesAnzahl unterschiedlich sein
+ sal_uInt8 nFldLstGetMode;
- BOOL bInUpdateFlds : 1; // zur Zeit laeuft ein UpdateFlds,
- BOOL bFldsDirty : 1; // irgendwelche Felder sind ungueltig
+ sal_Bool bInUpdateFlds : 1; // zur Zeit laeuft ein UpdateFlds,
+ sal_Bool bFldsDirty : 1; // irgendwelche Felder sind ungueltig
void _MakeFldList( SwDoc& pDoc, int eGetMode );
- void GetBodyNode( const SwTxtFld& , USHORT nFldWhich );
+ void GetBodyNode( const SwTxtFld& , sal_uInt16 nFldWhich );
void GetBodyNode( const SwSectionNode&);
public:
SwDocUpdtFld();
@@ -175,16 +175,16 @@ public:
void MakeFldList( SwDoc& rDoc, int bAll, int eGetMode );
- void InsDelFldInFldLst( BOOL bIns, const SwTxtFld& rFld );
+ void InsDelFldInFldLst( sal_Bool bIns, const SwTxtFld& rFld );
void InsertFldType( const SwFieldType& rType );
void RemoveFldType( const SwFieldType& rType );
- BOOL IsInUpdateFlds() const { return bInUpdateFlds; }
- void SetInUpdateFlds( BOOL b ) { bInUpdateFlds = b; }
+ sal_Bool IsInUpdateFlds() const { return bInUpdateFlds; }
+ void SetInUpdateFlds( sal_Bool b ) { bInUpdateFlds = b; }
- BOOL IsFieldsDirty() const { return bFldsDirty; }
- void SetFieldsDirty( BOOL b ) { bFldsDirty = b; }
+ sal_Bool IsFieldsDirty() const { return bFldsDirty; }
+ void SetFieldsDirty( sal_Bool b ) { bFldsDirty = b; }
SwHash** GetFldTypeTable() const { return (SwHash**)aFldTypeTable; }
};
diff --git a/sw/source/core/inc/docsort.hxx b/sw/source/core/inc/docsort.hxx
index f30d88d2d439..aa2d096f3cb8 100644
--- a/sw/source/core/inc/docsort.hxx
+++ b/sw/source/core/inc/docsort.hxx
@@ -64,11 +64,11 @@ SV_DECL_PTRARR(SwMovedBoxes, SwMovedBoxPtr, 10, 10 )
--------------------------------------------------------------------*/
void MoveCol(SwDoc* pDoc, const FlatFndBox& rBox,
- USHORT nS, USHORT nT, SwMovedBoxes& rMovedList, SwUndoSort* pUD=0);
+ sal_uInt16 nS, sal_uInt16 nT, SwMovedBoxes& rMovedList, SwUndoSort* pUD=0);
void MoveRow(SwDoc* pDoc, const FlatFndBox& rBox,
- USHORT nS, USHORT nT, SwMovedBoxes& rMovedList, SwUndoSort* pUD=0);
+ sal_uInt16 nS, sal_uInt16 nT, SwMovedBoxes& rMovedList, SwUndoSort* pUD=0);
void MoveCell(SwDoc* pDoc, const SwTableBox* pSource,
- const SwTableBox* pTar, BOOL bMovedBefore, SwUndoSort* pUD=0);
+ const SwTableBox* pTar, sal_Bool bMovedBefore, SwUndoSort* pUD=0);
/*-------------------------------------------------------------------
Beschreibung: Elemente zum Sortieren von Text und Tabellen-Inhalt
@@ -89,11 +89,11 @@ struct SwSortElement
virtual ~SwSortElement();
- virtual String GetKey(USHORT nKey ) const = 0;
- virtual double GetValue(USHORT nKey ) const;
+ virtual String GetKey(sal_uInt16 nKey ) const = 0;
+ virtual double GetValue(sal_uInt16 nKey ) const;
- BOOL operator==(const SwSortElement& );
- BOOL operator<(const SwSortElement& );
+ sal_Bool operator==(const SwSortElement& );
+ sal_Bool operator<(const SwSortElement& );
double StrToDouble(const String& rStr) const;
};
@@ -105,13 +105,13 @@ struct SwSortElement
struct SwSortTxtElement : public SwSortElement
{
// fuer Text
- ULONG nOrg;
+ sal_uLong nOrg;
SwNodeIndex aPos;
SwSortTxtElement( const SwNodeIndex& rPos );
virtual ~SwSortTxtElement();
- virtual String GetKey( USHORT nKey ) const;
+ virtual String GetKey( sal_uInt16 nKey ) const;
};
/*--------------------------------------------------------------------
@@ -120,13 +120,13 @@ struct SwSortTxtElement : public SwSortElement
struct SwSortBoxElement : public SwSortElement
{
- USHORT nRow;
+ sal_uInt16 nRow;
- SwSortBoxElement( USHORT nRC );
+ SwSortBoxElement( sal_uInt16 nRC );
virtual ~SwSortBoxElement();
- virtual String GetKey( USHORT nKey ) const;
- virtual double GetValue( USHORT nKey ) const;
+ virtual String GetKey( sal_uInt16 nKey ) const;
+ virtual double GetValue( sal_uInt16 nKey ) const;
};
@@ -141,39 +141,39 @@ public:
FlatFndBox(SwDoc* pDocPtr, const _FndBox& rBox);
~FlatFndBox();
- BOOL IsSymmetric() const { return bSym; }
- USHORT GetRows() const { return nRows; }
- USHORT GetCols() const { return nCols; }
+ sal_Bool IsSymmetric() const { return bSym; }
+ sal_uInt16 GetRows() const { return nRows; }
+ sal_uInt16 GetCols() const { return nCols; }
- const _FndBox* GetBox(USHORT nCol, USHORT nRow) const;
+ const _FndBox* GetBox(sal_uInt16 nCol, sal_uInt16 nRow) const;
- inline BOOL HasItemSets() const;
- const SfxItemSet* GetItemSet(USHORT nCol, USHORT nRow) const;
+ inline sal_Bool HasItemSets() const;
+ const SfxItemSet* GetItemSet(sal_uInt16 nCol, sal_uInt16 nRow) const;
private:
- BOOL CheckLineSymmetry(const _FndBox& rBox);
- BOOL CheckBoxSymmetry(const _FndLine& rLn);
- USHORT GetColCount(const _FndBox& rBox);
- USHORT GetRowCount(const _FndBox& rBox);
- void FillFlat(const _FndBox&, BOOL bLastBox=FALSE);
+ sal_Bool CheckLineSymmetry(const _FndBox& rBox);
+ sal_Bool CheckBoxSymmetry(const _FndLine& rLn);
+ sal_uInt16 GetColCount(const _FndBox& rBox);
+ sal_uInt16 GetRowCount(const _FndBox& rBox);
+ void FillFlat(const _FndBox&, sal_Bool bLastBox=sal_False);
SwDoc* pDoc;
const _FndBox& rBoxRef;
_FndBoxPtr* pArr;
SfxItemSet** ppItemSets;
- USHORT nRows;
- USHORT nCols;
+ sal_uInt16 nRows;
+ sal_uInt16 nCols;
- USHORT nRow;
- USHORT nCol;
+ sal_uInt16 nRow;
+ sal_uInt16 nCol;
- BOOL bSym;
+ sal_Bool bSym;
};
-inline BOOL FlatFndBox::HasItemSets() const { return 0 != ppItemSets; }
+inline sal_Bool FlatFndBox::HasItemSets() const { return 0 != ppItemSets; }
#endif // _NDSORT_HXX
diff --git a/sw/source/core/inc/doctxm.hxx b/sw/source/core/inc/doctxm.hxx
index 2a790120e7f1..842b6a319726 100644
--- a/sw/source/core/inc/doctxm.hxx
+++ b/sw/source/core/inc/doctxm.hxx
@@ -75,8 +75,8 @@ class SwTOXBaseSection : public SwTOXBase, public SwSection
// Textrumpf generieren
// OD 18.03.2003 #106329# - add parameter <_TOXSectNdIdx> and <_pDefaultPageDesc>
- void GenerateText( USHORT nArrayIdx,
- USHORT nCount,
+ void GenerateText( sal_uInt16 nArrayIdx,
+ sal_uInt16 nCount,
SvStringsDtor&,
const sal_uInt32 _nTOXSectNdIdx,
const SwPageDesc* _pDefaultPageDesc );
@@ -90,11 +90,11 @@ class SwTOXBaseSection : public SwTOXBase, public SwSection
// Bereich fuer Stichwort einfuegen suchen
Range GetKeyRange( const String& rStr, const String& rStrReading,
- const SwTOXSortTabBase& rNew, USHORT nLevel,
+ const SwTOXSortTabBase& rNew, sal_uInt16 nLevel,
const Range& rRange );
// returne die TextCollection ueber den Namen / aus Format-Pool
- SwTxtFmtColl* GetTxtFmtColl( USHORT nLevel );
+ SwTxtFmtColl* GetTxtFmtColl( sal_uInt16 nLevel );
public:
SwTOXBaseSection(SwTOXBase const& rBase, SwSectionFmt & rFmt);
@@ -108,7 +108,7 @@ public:
void UpdatePageNum(); // Seitennummern einfuegen
TYPEINFO(); // fuers rtti
- BOOL SetPosAtStartEnd( SwPosition& rPos, BOOL bAtStart = TRUE ) const;
+ sal_Bool SetPosAtStartEnd( SwPosition& rPos, sal_Bool bAtStart = sal_True ) const;
};
struct SwDefTOXBase_Impl
diff --git a/sw/source/core/inc/drawdev.hxx b/sw/source/core/inc/drawdev.hxx
index 5f5be7c02344..31d630a741e4 100644
--- a/sw/source/core/inc/drawdev.hxx
+++ b/sw/source/core/inc/drawdev.hxx
@@ -52,21 +52,21 @@ public:
// Ausgabemethoden
inline void DrawText( const Point& rStart, const String& rTxt,
- const USHORT nIdx = 0,
- const USHORT nLen = STRING_LEN );
- inline void DrawStretchText( const Point& rStart, USHORT nWidth,
+ const sal_uInt16 nIdx = 0,
+ const sal_uInt16 nLen = STRING_LEN );
+ inline void DrawStretchText( const Point& rStart, sal_uInt16 nWidth,
const String& rTxt,
- const USHORT nIdx = 0,
- const USHORT nLen = STRING_LEN );
+ const sal_uInt16 nIdx = 0,
+ const sal_uInt16 nLen = STRING_LEN );
inline void DrawTextArray( const Point& rStart,
const String& rTxt,
long *pKernArray = 0,
- const USHORT nIdx = 0,
- const USHORT nLen = STRING_LEN);
+ const sal_uInt16 nIdx = 0,
+ const sal_uInt16 nLen = STRING_LEN);
inline void DrawLine( const Point& rStart, const Point& rEnd );
inline void DrawRect( const SwRect& rRect,
- const USHORT nHorzRount = 0,
- const USHORT nVertRound = 0 );
+ const sal_uInt16 nHorzRount = 0,
+ const sal_uInt16 nVertRound = 0 );
inline const Point *GetOrigin() const {return pPos; }
};
@@ -76,7 +76,7 @@ public:
*************************************************************************/
inline void SwDrawDev::DrawText( const Point& rStart, const String& rTxt,
- const USHORT nIdx, const USHORT nLen )
+ const sal_uInt16 nIdx, const sal_uInt16 nLen )
{
if( !pPos )
pOut->DrawText( rStart, rTxt, nIdx, nLen );
@@ -88,8 +88,8 @@ inline void SwDrawDev::DrawText( const Point& rStart, const String& rTxt,
* SwDrawDev::DrawStretchText
*************************************************************************/
-inline void SwDrawDev::DrawStretchText( const Point& rStart, USHORT nWidth,
- const String& rTxt, const USHORT nIdx, const USHORT nLen )
+inline void SwDrawDev::DrawStretchText( const Point& rStart, sal_uInt16 nWidth,
+ const String& rTxt, const sal_uInt16 nIdx, const sal_uInt16 nLen )
{
if( !pPos )
pOut->DrawStretchText( rStart, nWidth, rTxt, nIdx, nLen );
@@ -102,7 +102,7 @@ inline void SwDrawDev::DrawStretchText( const Point& rStart, USHORT nWidth,
*************************************************************************/
inline void SwDrawDev::DrawTextArray( const Point& rStart, const String& rTxt,
- long *pKernArray, const USHORT nIdx, const USHORT nLen )
+ long *pKernArray, const sal_uInt16 nIdx, const sal_uInt16 nLen )
{
if( !pPos )
pOut->DrawTextArray( rStart, rTxt, pKernArray, nIdx, nLen );
@@ -127,7 +127,7 @@ inline void SwDrawDev::DrawLine( const Point& rStart, const Point& rEnd )
*************************************************************************/
inline void SwDrawDev::DrawRect( const SwRect& rRect,
- const USHORT nHorzRound, const USHORT nVertRound )
+ const sal_uInt16 nHorzRound, const sal_uInt16 nVertRound )
{
SwRect aRect( rRect );
if( pPos )
diff --git a/sw/source/core/inc/drawfont.hxx b/sw/source/core/inc/drawfont.hxx
index 34de322eae77..aad3c9f00787 100644
--- a/sw/source/core/inc/drawfont.hxx
+++ b/sw/source/core/inc/drawfont.hxx
@@ -69,25 +69,25 @@ class SwDrawTextInfo
xub_StrLen nIdx;
xub_StrLen nLen;
xub_StrLen nOfst;
- USHORT nWidth;
- USHORT nAscent;
- USHORT nCompress;
+ sal_uInt16 nWidth;
+ sal_uInt16 nAscent;
+ sal_uInt16 nCompress;
long nSperren;
long nSpace;
long nKern;
xub_StrLen nNumberOfBlanks;
- BYTE nCursorBidiLevel;
- BOOL bBullet : 1;
- BOOL bUpper : 1; // Fuer Kapitaelchen: Grossbuchstaben-Flag
- BOOL bDrawSpace : 1; // Fuer Kapitaelchen: Unter/Durchstreichung
- BOOL bGreyWave : 1; // Graue Wellenlinie beim extended TextInput
- BOOL bSpaceStop : 1; // For underlining we need to know, if a portion
+ sal_uInt8 nCursorBidiLevel;
+ sal_Bool bBullet : 1;
+ sal_Bool bUpper : 1; // Fuer Kapitaelchen: Grossbuchstaben-Flag
+ sal_Bool bDrawSpace : 1; // Fuer Kapitaelchen: Unter/Durchstreichung
+ sal_Bool bGreyWave : 1; // Graue Wellenlinie beim extended TextInput
+ sal_Bool bSpaceStop : 1; // For underlining we need to know, if a portion
// is right in front of a hole portion or a
// fix margin portion.
- BOOL bSnapToGrid : 1; // Does paragraph snap to grid?
- BOOL bIgnoreFrmRTL : 1; // Paint text as if text has LTR direction, used for
+ sal_Bool bSnapToGrid : 1; // Does paragraph snap to grid?
+ sal_Bool bIgnoreFrmRTL : 1; // Paint text as if text has LTR direction, used for
// line numbering
- BOOL bPosMatchesBounds :1; // GetCrsrOfst should not return the next
+ sal_Bool bPosMatchesBounds :1; // GetCrsrOfst should not return the next
// position if screen position is inside second
// half of bound rect, used for Accessibility
@@ -95,27 +95,27 @@ class SwDrawTextInfo
public:
#if OSL_DEBUG_LEVEL > 1
- BOOL bPos : 1; // These flags should control, that the appropriate
- BOOL bWrong : 1; // Set-function has been called before calling
- BOOL bGrammarCheck : 1; // the Get-function of a member
- BOOL bSize : 1;
- BOOL bFnt : 1;
- BOOL bHyph : 1;
- BOOL bLeft : 1;
- BOOL bRight : 1;
- BOOL bKana : 1;
- BOOL bOfst : 1;
- BOOL bAscent: 1;
- BOOL bSperr : 1;
- BOOL bSpace : 1;
- BOOL bNumberOfBlanks : 1;
- BOOL bUppr : 1;
- BOOL bDrawSp: 1;
+ sal_Bool bPos : 1; // These flags should control, that the appropriate
+ sal_Bool bWrong : 1; // Set-function has been called before calling
+ sal_Bool bGrammarCheck : 1; // the Get-function of a member
+ sal_Bool bSize : 1;
+ sal_Bool bFnt : 1;
+ sal_Bool bHyph : 1;
+ sal_Bool bLeft : 1;
+ sal_Bool bRight : 1;
+ sal_Bool bKana : 1;
+ sal_Bool bOfst : 1;
+ sal_Bool bAscent: 1;
+ sal_Bool bSperr : 1;
+ sal_Bool bSpace : 1;
+ sal_Bool bNumberOfBlanks : 1;
+ sal_Bool bUppr : 1;
+ sal_Bool bDrawSp: 1;
#endif
SwDrawTextInfo( ViewShell *pS, OutputDevice &rO, const SwScriptInfo* pSI,
const XubString &rSt, xub_StrLen nI, xub_StrLen nL,
- USHORT nW = 0, BOOL bB = FALSE )
+ sal_uInt16 nW = 0, sal_Bool bB = sal_False )
{
pFrm = NULL;
pSh = pS;
@@ -131,11 +131,11 @@ public:
nCursorBidiLevel = 0;
bBullet = bB;
pUnderFnt = 0;
- bGreyWave = FALSE;
- bSpaceStop = FALSE;
- bSnapToGrid = FALSE;
- bIgnoreFrmRTL = FALSE;
- bPosMatchesBounds = FALSE;
+ bGreyWave = sal_False;
+ bSpaceStop = sal_False;
+ bSnapToGrid = sal_False;
+ bIgnoreFrmRTL = sal_False;
+ bPosMatchesBounds = sal_False;
// These values are initialized but, they have to be
// set explicitly via their Set-function before they may
@@ -154,15 +154,15 @@ public:
nAscent = 0;
nSperren = 0;
nSpace = 0;
- bUpper = FALSE;
- bDrawSpace = FALSE;
+ bUpper = sal_False;
+ bDrawSpace = sal_False;
#if OSL_DEBUG_LEVEL > 1
// these flags control, whether the matching member variables have
// been set by using the Set-function before they may be accessed
// by their Get-function:
bPos = bWrong = bGrammarCheck = bSize = bFnt = bAscent = bSpace = bNumberOfBlanks = bUppr =
- bDrawSp = bLeft = bRight = bKana = bOfst = bHyph = bSperr = FALSE;
+ bDrawSp = bLeft = bRight = bKana = bOfst = bHyph = bSperr = sal_False;
#endif
}
@@ -306,12 +306,12 @@ public:
return nKanaDiff;
}
- USHORT GetWidth() const
+ sal_uInt16 GetWidth() const
{
return nWidth;
}
- USHORT GetAscent() const
+ sal_uInt16 GetAscent() const
{
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE( bAscent, "DrawTextInfo: Undefined Ascent" );
@@ -319,7 +319,7 @@ public:
return nAscent;
}
- USHORT GetKanaComp() const
+ sal_uInt16 GetKanaComp() const
{
return nCompress;
}
@@ -353,17 +353,17 @@ public:
return nNumberOfBlanks;
}
- BYTE GetCursorBidiLevel() const
+ sal_uInt8 GetCursorBidiLevel() const
{
return nCursorBidiLevel;
}
- BOOL GetBullet() const
+ sal_Bool GetBullet() const
{
return bBullet;
}
- BOOL GetUpper() const
+ sal_Bool GetUpper() const
{
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE( bUppr, "DrawTextInfo: Undefined Upperflag" );
@@ -371,7 +371,7 @@ public:
return bUpper;
}
- BOOL GetDrawSpace() const
+ sal_Bool GetDrawSpace() const
{
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE( bDrawSp, "DrawTextInfo: Undefined DrawSpaceflag" );
@@ -379,27 +379,27 @@ public:
return bDrawSpace;
}
- BOOL GetGreyWave() const
+ sal_Bool GetGreyWave() const
{
return bGreyWave;
}
- BOOL IsSpaceStop() const
+ sal_Bool IsSpaceStop() const
{
return bSpaceStop;
}
- BOOL SnapToGrid() const
+ sal_Bool SnapToGrid() const
{
return bSnapToGrid;
}
- BOOL IsIgnoreFrmRTL() const
+ sal_Bool IsIgnoreFrmRTL() const
{
return bIgnoreFrmRTL;
}
- BOOL IsPosMatchesBounds() const
+ sal_Bool IsPosMatchesBounds() const
{
return bPosMatchesBounds;
}
@@ -413,7 +413,7 @@ public:
{
pPos = &rNew;
#if OSL_DEBUG_LEVEL > 1
- bPos = TRUE;
+ bPos = sal_True;
#endif
}
@@ -421,7 +421,7 @@ public:
{
pHyphPos = pNew;
#if OSL_DEBUG_LEVEL > 1
- bHyph = TRUE;
+ bHyph = sal_True;
#endif
}
@@ -434,7 +434,7 @@ public:
{
pWrong = pNew;
#if OSL_DEBUG_LEVEL > 1
- bWrong = TRUE;
+ bWrong = sal_True;
#endif
}
@@ -442,7 +442,7 @@ public:
{
pGrammarCheck = pNew;
#if OSL_DEBUG_LEVEL > 1
- bGrammarCheck = TRUE;
+ bGrammarCheck = sal_True;
#endif
}
@@ -455,7 +455,7 @@ public:
{
pSize = &rNew;
#if OSL_DEBUG_LEVEL > 1
- bSize = TRUE;
+ bSize = sal_True;
#endif
}
@@ -463,7 +463,7 @@ public:
{
pFnt = pNew;
#if OSL_DEBUG_LEVEL > 1
- bFnt = TRUE;
+ bFnt = sal_True;
#endif
}
@@ -481,7 +481,7 @@ public:
{
nOfst = nNew;
#if OSL_DEBUG_LEVEL > 1
- bOfst = TRUE;
+ bOfst = sal_True;
#endif
}
@@ -489,7 +489,7 @@ public:
{
nLeft = nNew;
#if OSL_DEBUG_LEVEL > 1
- bLeft = TRUE;
+ bLeft = sal_True;
#endif
}
@@ -497,7 +497,7 @@ public:
{
nRight = nNew;
#if OSL_DEBUG_LEVEL > 1
- bRight = TRUE;
+ bRight = sal_True;
#endif
}
@@ -505,20 +505,20 @@ public:
{
nKanaDiff = nNew;
#if OSL_DEBUG_LEVEL > 1
- bKana = TRUE;
+ bKana = sal_True;
#endif
}
- void SetWidth( USHORT nNew )
+ void SetWidth( sal_uInt16 nNew )
{
nWidth = nNew;
}
- void SetAscent( USHORT nNew )
+ void SetAscent( sal_uInt16 nNew )
{
nAscent = nNew;
#if OSL_DEBUG_LEVEL > 1
- bAscent = TRUE;
+ bAscent = sal_True;
#endif
}
@@ -540,20 +540,20 @@ public:
nSperren = 0;
}
#if OSL_DEBUG_LEVEL > 1
- bSpace = TRUE;
- bSperr = TRUE;
+ bSpace = sal_True;
+ bSperr = sal_True;
#endif
}
void SetNumberOfBlanks( xub_StrLen nNew )
{
#if OSL_DEBUG_LEVEL > 1
- bNumberOfBlanks = TRUE;
+ bNumberOfBlanks = sal_True;
#endif
nNumberOfBlanks = nNew;
}
- void SetCursorBidiLevel( BYTE nNew )
+ void SetCursorBidiLevel( sal_uInt8 nNew )
{
nCursorBidiLevel = nNew;
}
@@ -563,7 +563,7 @@ public:
nCompress = nNew;
}
- void SetBullet( BOOL bNew )
+ void SetBullet( sal_Bool bNew )
{
bBullet = bNew;
}
@@ -573,48 +573,48 @@ public:
pUnderFnt = pULFnt;
}
- void SetUpper( BOOL bNew )
+ void SetUpper( sal_Bool bNew )
{
bUpper = bNew;
#if OSL_DEBUG_LEVEL > 1
- bUppr = TRUE;
+ bUppr = sal_True;
#endif
}
- void SetDrawSpace( BOOL bNew )
+ void SetDrawSpace( sal_Bool bNew )
{
bDrawSpace = bNew;
#if OSL_DEBUG_LEVEL > 1
- bDrawSp = TRUE;
+ bDrawSp = sal_True;
#endif
}
- void SetGreyWave( BOOL bNew )
+ void SetGreyWave( sal_Bool bNew )
{
bGreyWave = bNew;
}
- void SetSpaceStop( BOOL bNew )
+ void SetSpaceStop( sal_Bool bNew )
{
bSpaceStop = bNew;
}
- void SetSnapToGrid( BOOL bNew )
+ void SetSnapToGrid( sal_Bool bNew )
{
bSnapToGrid = bNew;
}
- void SetIgnoreFrmRTL( BOOL bNew )
+ void SetIgnoreFrmRTL( sal_Bool bNew )
{
bIgnoreFrmRTL = bNew;
}
- void SetPosMatchesBounds( BOOL bNew )
+ void SetPosMatchesBounds( sal_Bool bNew )
{
bPosMatchesBounds = bNew;
}
- void Shift( USHORT nDir );
+ void Shift( sal_uInt16 nDir );
// sets a new color at the output device if necessary
// if a font is passed as argument, the change if made to the font
diff --git a/sw/source/core/inc/dview.hxx b/sw/source/core/inc/dview.hxx
index 90df8fd4ccbb..b51f555ea384 100644
--- a/sw/source/core/inc/dview.hxx
+++ b/sw/source/core/inc/dview.hxx
@@ -90,7 +90,7 @@ protected:
// overloaded to allow extra handling when picking SwVirtFlyDrawObj's
using FmFormView::CheckSingleSdrObjectHit;
- virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const;
+ virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uLong nOptions, const SetOfByte* pMVisLay) const;
public:
SwDrawView( SwViewImp &rI, SdrModel *pMd, OutputDevice* pOutDev=NULL );
@@ -104,9 +104,9 @@ public:
// Overload to resue edit background color in active text edit view (OutlinerView)
virtual void ModelHasChanged();
- virtual void ObjOrderChanged( SdrObject* pObj, ULONG nOldPos,
- ULONG nNewPos );
- virtual BOOL TakeDragLimit(SdrDragMode eMode, Rectangle& rRect) const;
+ virtual void ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
+ sal_uLong nNewPos );
+ virtual sal_Bool TakeDragLimit(SdrDragMode eMode, Rectangle& rRect) const;
virtual void MakeVisible( const Rectangle&, Window &rWin );
virtual void CheckPossibilities();
diff --git a/sw/source/core/inc/flowfrm.hxx b/sw/source/core/inc/flowfrm.hxx
index f14c4c87e275..1403718101d8 100644
--- a/sw/source/core/inc/flowfrm.hxx
+++ b/sw/source/core/inc/flowfrm.hxx
@@ -79,12 +79,12 @@ class SwFlowFrm
//Hilfsfunktionen fuer MoveSubTree()
static SwLayoutFrm *CutTree( SwFrm* );
- static BOOL PasteTree( SwFrm *, SwLayoutFrm *, SwFrm *, SwFrm* );
+ static sal_Bool PasteTree( SwFrm *, SwLayoutFrm *, SwFrm *, SwFrm* );
//Wird fuer das Zusammenspiel von _GetPrevxxx und MoveBwd gebraucht, damit
//mehrere Blaetter gleichzeitig uebersprungen werden koennen.
//Wird auch vom MoveBwd des TabFrm ausgewertet!
- static BOOL bMoveBwdJump;
+ static sal_Bool bMoveBwdJump;
/** helper method to determine previous frame for calculation of the
upper space
@@ -116,36 +116,36 @@ protected:
SwFlowFrm *pFollow;
- BOOL bIsFollow :1; //Ist's ein Follow
- BOOL bLockJoin :1; //Join (und damit deleten) verboten wenn TRUE!
- BOOL bUndersized:1; // wir sind kleiner als gewuenscht
- BOOL bFtnAtEnd :1; // For sectionfrms only: footnotes at the end of section
- BOOL bEndnAtEnd :1; // " " " : endnotes at the end of section
- BOOL bCntntLock :1; // " " " : content locked
- BOOL bOwnFtnNum :1; // " " " : special numbering of footnotes
- BOOL bFtnLock :1; // " " " : ftn, don't leave this section bwd
- BOOL bFlyLock :1; // Stop positioning of at-character flyframes
+ sal_Bool bIsFollow :1; //Ist's ein Follow
+ sal_Bool bLockJoin :1; //Join (und damit deleten) verboten wenn sal_True!
+ sal_Bool bUndersized:1; // wir sind kleiner als gewuenscht
+ sal_Bool bFtnAtEnd :1; // For sectionfrms only: footnotes at the end of section
+ sal_Bool bEndnAtEnd :1; // " " " : endnotes at the end of section
+ sal_Bool bCntntLock :1; // " " " : content locked
+ sal_Bool bOwnFtnNum :1; // " " " : special numbering of footnotes
+ sal_Bool bFtnLock :1; // " " " : ftn, don't leave this section bwd
+ sal_Bool bFlyLock :1; // Stop positioning of at-character flyframes
//Prueft ob Vorwaertsfluss noch Sinn macht Endloswanderschaften (unterbinden)
- inline BOOL IsFwdMoveAllowed();
+ inline sal_Bool IsFwdMoveAllowed();
// #i44049# - method <CalcCntnt(..)> has to check this property.
friend void CalcCntnt( SwLayoutFrm *pLay, bool bNoColl, bool bNoCalcFollow );
- BOOL IsKeepFwdMoveAllowed(); //Wie oben, Move fuer Keep.
+ sal_Bool IsKeepFwdMoveAllowed(); //Wie oben, Move fuer Keep.
//Prueft ob ein Obj das Umlauf wuenscht ueberlappt.
//eine Null bedeutet, kein Objekt ueberlappt,
// 1 heisst, Objekte, die am FlowFrm selbst verankert sind, ueberlappen
// 2 heisst, Objekte, die woanders verankert sind, ueberlappen
// 3 heistt, beiderlei verankerte Objekte ueberlappen
- BYTE BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect );
+ sal_uInt8 BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect );
- void LockJoin() { bLockJoin = TRUE; }
- void UnlockJoin() { bLockJoin = FALSE; }
+ void LockJoin() { bLockJoin = sal_True; }
+ void UnlockJoin() { bLockJoin = sal_False; }
- BOOL CheckMoveFwd( BOOL &rbMakePage, BOOL bKeep, BOOL bMovedBwd );
- BOOL MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways = FALSE );
- virtual BOOL ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL bHead, BOOL &rReformat )=0;
- BOOL MoveBwd( BOOL &rbReformat );
+ sal_Bool CheckMoveFwd( sal_Bool &rbMakePage, sal_Bool bKeep, sal_Bool bMovedBwd );
+ sal_Bool MoveFwd( sal_Bool bMakePage, sal_Bool bPageBreak, sal_Bool bMoveAlways = sal_False );
+ virtual sal_Bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool bHead, sal_Bool &rReformat )=0;
+ sal_Bool MoveBwd( sal_Bool &rbReformat );
public:
SwFlowFrm( SwFrm &rFrm );
@@ -153,48 +153,48 @@ public:
const SwFrm *GetFrm() const { return &rThis; }
SwFrm *GetFrm() { return &rThis; }
- static BOOL IsMoveBwdJump() { return bMoveBwdJump; }
- static void SetMoveBwdJump( BOOL bNew ){ bMoveBwdJump = bNew; }
+ static sal_Bool IsMoveBwdJump() { return bMoveBwdJump; }
+ static void SetMoveBwdJump( sal_Bool bNew ){ bMoveBwdJump = bNew; }
- inline void SetUndersized( const BOOL bNew ) { bUndersized = bNew; }
- inline BOOL IsUndersized() const { return bUndersized; }
+ inline void SetUndersized( const sal_Bool bNew ) { bUndersized = bNew; }
+ inline sal_Bool IsUndersized() const { return bUndersized; }
- BOOL IsPrevObjMove() const;
+ sal_Bool IsPrevObjMove() const;
//Die Kette mit minimalen Operationen und Benachrichtigungen unter den
//neuen Parent Moven.
void MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling = 0 );
- BOOL HasFollow() const { return pFollow ? TRUE : FALSE; }
- BOOL IsFollow() const { return bIsFollow; }
- inline void _SetIsFollow( BOOL bSet ) { bIsFollow = bSet; }
+ sal_Bool HasFollow() const { return pFollow ? sal_True : sal_False; }
+ sal_Bool IsFollow() const { return bIsFollow; }
+ inline void _SetIsFollow( sal_Bool bSet ) { bIsFollow = bSet; }
const SwFlowFrm *GetFollow() const { return pFollow; }
SwFlowFrm *GetFollow() { return pFollow; }
- BOOL IsAnFollow( const SwFlowFrm *pFlow ) const;
+ sal_Bool IsAnFollow( const SwFlowFrm *pFlow ) const;
inline void SetFollow( SwFlowFrm *pNew ) { pFollow = pNew; }
sal_Bool IsJoinLocked() const { return bLockJoin; }
sal_Bool IsAnyJoinLocked() const { return bLockJoin || HasLockedFollow(); }
- BOOL IsFtnAtEnd() const { return bFtnAtEnd; }
- BOOL IsEndnAtEnd() const { return bEndnAtEnd; }
- BOOL IsAnyNoteAtEnd() const { return bFtnAtEnd || bEndnAtEnd; }
- BOOL AreNotesAtEnd() const { return bFtnAtEnd && bEndnAtEnd; }
+ sal_Bool IsFtnAtEnd() const { return bFtnAtEnd; }
+ sal_Bool IsEndnAtEnd() const { return bEndnAtEnd; }
+ sal_Bool IsAnyNoteAtEnd() const { return bFtnAtEnd || bEndnAtEnd; }
+ sal_Bool AreNotesAtEnd() const { return bFtnAtEnd && bEndnAtEnd; }
- BOOL IsPageBreak( BOOL bAct ) const;
- BOOL IsColBreak( BOOL bAct ) const;
+ sal_Bool IsPageBreak( sal_Bool bAct ) const;
+ sal_Bool IsColBreak( sal_Bool bAct ) const;
//Ist ein Keep zu beruecksichtigen (Breaks!)
- BOOL IsKeep( const SwAttrSet& rAttrs, bool bBreakCheck = false ) const;
+ sal_Bool IsKeep( const SwAttrSet& rAttrs, bool bBreakCheck = false ) const;
sal_Bool HasLockedFollow() const;
- BOOL HasParaSpaceAtPages( BOOL bSct ) const;
+ sal_Bool HasParaSpaceAtPages( sal_Bool bSct ) const;
/** method to determine the upper space hold by the frame
#i11860# - add 3rd parameter <_bConsiderGrid> to get
the upper space with and without considering the page grid
- (default value: <TRUE>)
+ (default value: <sal_True>)
*/
SwTwips CalcUpperSpace( const SwBorderAttrs *pAttrs = NULL,
const SwFrm* pPr = NULL,
@@ -229,14 +229,14 @@ public:
void CheckKeep();
- void SetFtnLock( BOOL bNew ){ bFtnLock = bNew; }
- BOOL IsFtnLock() const { return bFtnLock; }
- void SetFlyLock( BOOL bNew ){ bFlyLock = bNew; }
- BOOL IsFlyLock() const { return bFlyLock; }
- void SetOwnFtnNum( BOOL bNew ){ bOwnFtnNum = bNew; }
- BOOL IsOwnFtnNum() const { return bOwnFtnNum; }
- void SetCntntLock( BOOL bNew ){ bCntntLock = bNew; }
- BOOL IsCntntLocked() const { return bCntntLock; }
+ void SetFtnLock( sal_Bool bNew ){ bFtnLock = bNew; }
+ sal_Bool IsFtnLock() const { return bFtnLock; }
+ void SetFlyLock( sal_Bool bNew ){ bFlyLock = bNew; }
+ sal_Bool IsFlyLock() const { return bFlyLock; }
+ void SetOwnFtnNum( sal_Bool bNew ){ bOwnFtnNum = bNew; }
+ sal_Bool IsOwnFtnNum() const { return bOwnFtnNum; }
+ void SetCntntLock( sal_Bool bNew ){ bCntntLock = bNew; }
+ sal_Bool IsCntntLocked() const { return bCntntLock; }
//casten einen Frm auf einen FlowFrm - wenns denn einer ist, sonst 0
//Diese Methoden muessen fuer neue Ableitungen geaendert werden!
@@ -244,7 +244,7 @@ public:
static const SwFlowFrm *CastFlowFrm( const SwFrm *pFrm );
};
-inline BOOL SwFlowFrm::IsFwdMoveAllowed()
+inline sal_Bool SwFlowFrm::IsFwdMoveAllowed()
{
return rThis.GetIndPrev() != 0;
}
diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index b069301c415a..7b1adc88c661 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -25,13 +25,13 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _FLYFRM_HXX
-#define _FLYFRM_HXX
+#ifndef SW_FLYFRM_HXX
+#define SW_FLYFRM_HXX
#include "layfrm.hxx"
+#include "frmfmt.hxx"
class SwPageFrm;
-class SwFlyFrmFmt;
class SwFmtFrmSize;
struct SwCrsrMoveState;
class SwBorderAttrs;
@@ -48,25 +48,25 @@ class PolyPolygon;
//fuer Ankerwechsel benoetigt.
//implementiert in layout/flycnt.cxx
const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
- const BOOL bBody = FALSE );
+ const sal_Bool bBody = sal_False );
// berechnet das Rechteck, in dem das Objekt bewegt bzw. resized werden darf
-BOOL CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, BOOL bMove = TRUE );
+sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove = sal_True );
//allg. Basisklasse fuer alle Freifliegenden Rahmen
// #i26791# - inherit also from <SwAnchoredFlyFrm>
class SwFlyFrm : public SwLayoutFrm, public SwAnchoredObject
{
//darf Locken. Definiert in frmtool.cxx
- friend void AppendObjs ( const SwSpzFrmFmts *, ULONG, SwFrm *, SwPageFrm * );
+ friend void AppendObjs ( const SwSpzFrmFmts *, sal_uLong, SwFrm *, SwPageFrm * );
friend void AppendAllObjs( const SwSpzFrmFmts * );
friend void Notify( SwFlyFrm *, SwPageFrm *pOld, const SwRect &rOld,
const SwRect* pOldPrt );
- void InitDrawObj( BOOL bNotify ); //Wird von den CToren gerufen.
+ void InitDrawObj( sal_Bool bNotify ); //Wird von den CToren gerufen.
void FinitDrawObj(); //Wird vom CTor gerufen.
- void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, BYTE &,
+ void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, sal_uInt8 &,
SwAttrSetChg *pa = 0, SwAttrSetChg *pb = 0 );
using SwLayoutFrm::CalcRel;
@@ -80,7 +80,7 @@ protected:
// Point aRelPos; //Die Relative Position zum Master
private:
- BOOL bLocked :1; //Cntnt-gebundene Flys muessen derart blockiert werden
+ sal_Bool bLocked :1; //Cntnt-gebundene Flys muessen derart blockiert werden
//koennen, dass sie nicht Formatiert werden; :MakeAll
//returnt dann sofort. Dies ist bei Seitenwechseln
//waehrend der Formatierung notwendig.
@@ -88,31 +88,31 @@ private:
//sonst der Anker formatiert wird obwohl die Root noch
//nicht korrekt an der Shell haengt und weil sonst
//initial zuviel Formatiert wuerde.
- BOOL bNotifyBack:1; //TRUE wenn am Ende eines MakeAll() der Background
+ sal_Bool bNotifyBack:1; //sal_True wenn am Ende eines MakeAll() der Background
//vom NotifyDTor benachrichtigt werden muss.
protected:
- BOOL bInvalid :1; //Pos, PrtArea od. SSize wurden Invalidiert, sie werden
+ sal_Bool bInvalid :1; //Pos, PrtArea od. SSize wurden Invalidiert, sie werden
//gleich wieder Validiert, denn sie muessen _immer_
//gueltig sein. Damit in LayAction korrekt gearbeitet
//werden kann muss hier festgehalten werden, dass sie
//invalidiert wurden. Ausnahmen bestaetigen die Regelt!
- BOOL bMinHeight:1; //TRUE wenn die vom Attribut vorgegebene Hoehe eine
+ sal_Bool bMinHeight:1; //sal_True wenn die vom Attribut vorgegebene Hoehe eine
//eine Minimalhoehe ist (der Frm also bei Bedarf
//darueberhinaus wachsen kann).
- BOOL bHeightClipped :1; //TRUE wenn der Fly nicht die Pos/Size anhand der Attrs
- BOOL bWidthClipped :1; //formatieren konnte, weil z.B. nicht genug Raum vorh.
+ sal_Bool bHeightClipped :1; //sal_True wenn der Fly nicht die Pos/Size anhand der Attrs
+ sal_Bool bWidthClipped :1; //formatieren konnte, weil z.B. nicht genug Raum vorh.
//war.
- BOOL bFormatHeightOnly :1; //Damit nach einer Anpassung der Breite
+ sal_Bool bFormatHeightOnly :1; //Damit nach einer Anpassung der Breite
//(CheckClip) nur das Format aufgerufen wird;
//nicht aber die Breite anhand der Attribute
//wieder bestimmt wird.
- BOOL bInCnt :1; // FLY_AS_CHAR, anchored as character
- BOOL bAtCnt :1; // FLY_AT_PARA, anchored at paragraph
- BOOL bLayout :1; // FLY_AT_PAGE, FLY_AT_FLY, at page or at frame
- BOOL bAutoPosition :1; // FLY_AT_CHAR, anchored at character
- BOOL bNoShrink :1; // temporary forbud of shrinking to avoid loops
- BOOL bLockDeleteContent :1; // If the flag is set, the content of the
+ sal_Bool bInCnt :1; // FLY_AS_CHAR, anchored as character
+ sal_Bool bAtCnt :1; // FLY_AT_PARA, anchored at paragraph
+ sal_Bool bLayout :1; // FLY_AT_PAGE, FLY_AT_FLY, at page or at frame
+ sal_Bool bAutoPosition :1; // FLY_AT_CHAR, anchored at character
+ sal_Bool bNoShrink :1; // temporary forbud of shrinking to avoid loops
+ sal_Bool bLockDeleteContent :1; // If the flag is set, the content of the
// fly frame is not deleted if moved to
// invisible layer.
@@ -121,11 +121,11 @@ protected:
virtual void Format( const SwBorderAttrs *pAttrs = 0 );
void MakePrtArea( const SwBorderAttrs &rAttrs );
- void Lock() { bLocked = TRUE; }
- void Unlock() { bLocked = FALSE; }
+ void Lock() { bLocked = sal_True; }
+ void Unlock() { bLocked = sal_False; }
- void SetMinHeight() { bMinHeight = TRUE; }
- void ResetMinHeight(){ bMinHeight = FALSE; }
+ void SetMinHeight() { bMinHeight = sal_True; }
+ void ResetMinHeight(){ bMinHeight = sal_False; }
Size CalcRel( const SwFmtFrmSize &rSz ) const;
SwTwips CalcAutoWidth() const;
@@ -153,23 +153,24 @@ public:
virtual ~SwFlyFrm();
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
// erfrage vom Client Informationen
- virtual BOOL GetInfo( SfxPoolItem& ) const;
- virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
virtual Size ChgSize( const Size& aNewSize );
- virtual BOOL GetCrsrOfst( SwPosition *, Point&,
+ virtual sal_Bool GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0 ) const;
- virtual void CheckDirection( BOOL bVert );
+ virtual void CheckDirection( sal_Bool bVert );
virtual void Cut();
#if OSL_DEBUG_LEVEL > 1
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 );
#endif
- SwTwips _Shrink( SwTwips, BOOL bTst );
- SwTwips _Grow ( SwTwips, BOOL bTst );
+ SwTwips _Shrink( SwTwips, sal_Bool bTst );
+ SwTwips _Grow ( SwTwips, sal_Bool bTst );
void _Invalidate( SwPageFrm *pPage = 0 );
- BOOL FrmSizeChg( const SwFmtFrmSize & );
+ sal_Bool FrmSizeChg( const SwFmtFrmSize & );
SwFlyFrm *GetPrevLink() const { return pPrevLink; }
SwFlyFrm *GetNextLink() const { return pNextLink; }
@@ -185,33 +186,33 @@ public:
void NotifyDrawObj();
void ChgRelPos( const Point &rAbsPos );
- BOOL IsInvalid() const { return bInvalid; }
- void Invalidate() const { ((SwFlyFrm*)this)->bInvalid = TRUE; }
- void Validate() const { ((SwFlyFrm*)this)->bInvalid = FALSE; }
-
- BOOL IsMinHeight() const { return bMinHeight; }
- BOOL IsLocked() const { return bLocked; }
- BOOL IsAutoPos() const { return bAutoPosition; }
- BOOL IsFlyInCntFrm() const { return bInCnt; }
- BOOL IsFlyFreeFrm() const { return bAtCnt || bLayout; }
- BOOL IsFlyLayFrm() const { return bLayout; }
- BOOL IsFlyAtCntFrm() const { return bAtCnt; }
-
- BOOL IsNotifyBack() const { return bNotifyBack; }
- void SetNotifyBack() { bNotifyBack = TRUE; }
- void ResetNotifyBack() { bNotifyBack = FALSE; }
- BOOL IsNoShrink() const { return bNoShrink; }
- void SetNoShrink( BOOL bNew ) { bNoShrink = bNew; }
- BOOL IsLockDeleteContent() const { return bLockDeleteContent; }
- void SetLockDeleteContent( BOOL bNew ) { bLockDeleteContent = bNew; }
-
-
- BOOL IsClipped() const { return bHeightClipped || bWidthClipped; }
- BOOL IsHeightClipped() const { return bHeightClipped; }
- BOOL IsWidthClipped() const { return bWidthClipped; }
-
- BOOL IsLowerOf( const SwLayoutFrm* pUpper ) const;
- inline BOOL IsUpperOf( const SwFlyFrm& _rLower ) const
+ sal_Bool IsInvalid() const { return bInvalid; }
+ void Invalidate() const { ((SwFlyFrm*)this)->bInvalid = sal_True; }
+ void Validate() const { ((SwFlyFrm*)this)->bInvalid = sal_False; }
+
+ sal_Bool IsMinHeight() const { return bMinHeight; }
+ sal_Bool IsLocked() const { return bLocked; }
+ sal_Bool IsAutoPos() const { return bAutoPosition; }
+ sal_Bool IsFlyInCntFrm() const { return bInCnt; }
+ sal_Bool IsFlyFreeFrm() const { return bAtCnt || bLayout; }
+ sal_Bool IsFlyLayFrm() const { return bLayout; }
+ sal_Bool IsFlyAtCntFrm() const { return bAtCnt; }
+
+ sal_Bool IsNotifyBack() const { return bNotifyBack; }
+ void SetNotifyBack() { bNotifyBack = sal_True; }
+ void ResetNotifyBack() { bNotifyBack = sal_False; }
+ sal_Bool IsNoShrink() const { return bNoShrink; }
+ void SetNoShrink( sal_Bool bNew ) { bNoShrink = bNew; }
+ sal_Bool IsLockDeleteContent() const { return bLockDeleteContent; }
+ void SetLockDeleteContent( sal_Bool bNew ) { bLockDeleteContent = bNew; }
+
+
+ sal_Bool IsClipped() const { return bHeightClipped || bWidthClipped; }
+ sal_Bool IsHeightClipped() const { return bHeightClipped; }
+ sal_Bool IsWidthClipped() const { return bWidthClipped; }
+
+ sal_Bool IsLowerOf( const SwLayoutFrm* pUpper ) const;
+ inline sal_Bool IsUpperOf( const SwFlyFrm& _rLower ) const
{
return _rLower.IsLowerOf( this );
}
@@ -220,12 +221,12 @@ public:
// #i13147# - add parameter <_bForPaint> to avoid load of
// the graphic during paint. Default value: sal_False
- BOOL GetContour( PolyPolygon& rContour,
+ sal_Bool GetContour( PolyPolygon& rContour,
const sal_Bool _bForPaint = sal_False ) const;
//Auf dieser Shell painten (PreView, Print-Flag usw. rekursiv beachten)?.
- static BOOL IsPaint( SdrObject *pObj, const ViewShell *pSh );
+ static sal_Bool IsPaint( SdrObject *pObj, const ViewShell *pSh );
/** SwFlyFrm::IsBackgroundTransparent
@@ -269,6 +270,12 @@ public:
format isn't possible, if Writer fly frame is locked resp. col-locked.
*/
virtual bool IsFormatPossible() const;
+
+ // overwriting "SwFrmFmt *SwLayoutFrm::GetFmt" to provide the correct derived return type.
+ // (This is in order to skip on the otherwise necessary casting of the result to
+ // 'SwFlyFrmFmt *' after calls to this function. The casting is now done in this function.)
+ virtual const SwFlyFrmFmt *GetFmt() const;
+ virtual SwFlyFrmFmt *GetFmt();
};
#endif
diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx
index 87dd6fc87eca..cf46533c98e7 100644
--- a/sw/source/core/inc/flyfrms.hxx
+++ b/sw/source/core/inc/flyfrms.hxx
@@ -187,8 +187,8 @@ class SwFlyInCntFrm : public SwFlyFrm
Point aRef; //Relativ zu diesem Point wird die AbsPos berechnet.
long nLine; //Zeilenhoehe, Ref.Y() - nLine == Zeilenanfang.
- BOOL bInvalidLayout :1;
- BOOL bInvalidCntnt :1;
+ sal_Bool bInvalidLayout :1;
+ sal_Bool bInvalidCntnt :1;
protected:
virtual void NotifyBackground( SwPageFrm *pPage,
@@ -215,9 +215,9 @@ public:
inline void InvalidateCntnt() const;
inline void ValidateLayout() const;
inline void ValidateCntnt() const;
- BOOL IsInvalid() const { return (bInvalidLayout || bInvalidCntnt); }
- BOOL IsInvalidLayout() const { return bInvalidLayout; }
- BOOL IsInvalidCntnt() const { return bInvalidCntnt; }
+ sal_Bool IsInvalid() const { return (bInvalidLayout || bInvalidCntnt); }
+ sal_Bool IsInvalidLayout() const { return bInvalidLayout; }
+ sal_Bool IsInvalidCntnt() const { return bInvalidCntnt; }
//BP 26.11.93: vgl. tabfrm.hxx, gilt bestimmt aber fuer andere auch...
@@ -242,19 +242,19 @@ public:
inline void SwFlyInCntFrm::InvalidateLayout() const
{
- ((SwFlyInCntFrm*)this)->bInvalidLayout = TRUE;
+ ((SwFlyInCntFrm*)this)->bInvalidLayout = sal_True;
}
inline void SwFlyInCntFrm::InvalidateCntnt() const
{
- ((SwFlyInCntFrm*)this)->bInvalidCntnt = TRUE;
+ ((SwFlyInCntFrm*)this)->bInvalidCntnt = sal_True;
}
inline void SwFlyInCntFrm::ValidateLayout() const
{
- ((SwFlyInCntFrm*)this)->bInvalidLayout = FALSE;
+ ((SwFlyInCntFrm*)this)->bInvalidLayout = sal_False;
}
inline void SwFlyInCntFrm::ValidateCntnt() const
{
- ((SwFlyInCntFrm*)this)->bInvalidCntnt = FALSE;
+ ((SwFlyInCntFrm*)this)->bInvalidCntnt = sal_False;
}
#endif
diff --git a/sw/source/core/inc/fntcache.hxx b/sw/source/core/inc/fntcache.hxx
index caca5826484a..39a739ab41e2 100644
--- a/sw/source/core/inc/fntcache.hxx
+++ b/sw/source/core/inc/fntcache.hxx
@@ -67,7 +67,7 @@ public:
// Font-Cache, globale Variable, in txtinit.Cxx angelegt/zerstoert
extern SwFntCache *pFntCache;
extern SwFntObj *pLastFont;
-extern BYTE *pMagicNo;
+extern sal_uInt8 *pMagicNo;
extern Color *pWaveCol;
/*************************************************************************
@@ -84,16 +84,16 @@ class SwFntObj : public SwCacheObj
Font *pScrFont;
Font *pPrtFont;
OutputDevice* pPrinter;
- USHORT nGuessedLeading;
- USHORT nExtLeading;
- USHORT nScrAscent;
- USHORT nPrtAscent;
- USHORT nScrHeight;
- USHORT nPrtHeight;
- USHORT nPropWidth;
- USHORT nZoom;
- BOOL bSymbol : 1;
- BOOL bPaintBlank : 1;
+ sal_uInt16 nGuessedLeading;
+ sal_uInt16 nExtLeading;
+ sal_uInt16 nScrAscent;
+ sal_uInt16 nPrtAscent;
+ sal_uInt16 nScrHeight;
+ sal_uInt16 nPrtHeight;
+ sal_uInt16 nPropWidth;
+ sal_uInt16 nZoom;
+ sal_Bool bSymbol : 1;
+ sal_Bool bPaintBlank : 1;
static long nPixWidth;
static MapMode *pPixMap;
@@ -101,8 +101,8 @@ class SwFntObj : public SwCacheObj
// SMARTTAGS
void calcLinePos(SwDrawTextInfo& rInf, Point& aStart, Point& aEnd, xub_StrLen nStart,
- xub_StrLen nWrLen, xub_StrLen nCnt, const BOOL bSwitchH2V, const BOOL bSwitchL2R,
- long nHalfSpace, long* pKernArray, const BOOL bBidiPor);
+ xub_StrLen nWrLen, xub_StrLen nCnt, const sal_Bool bSwitchH2V, const sal_Bool bSwitchL2R,
+ long nHalfSpace, long* pKernArray, const sal_Bool bBidiPor);
public:
DECL_FIXEDMEMPOOL_NEWDEL(SwFntObj)
@@ -116,20 +116,20 @@ public:
inline Font *GetFont() { return &aFont; }
inline const Font *GetFont() const { return &aFont; }
- inline USHORT GetGuessedLeading() const { return nGuessedLeading; }
- inline USHORT GetExtLeading() const { return nExtLeading; }
+ inline sal_uInt16 GetGuessedLeading() const { return nGuessedLeading; }
+ inline sal_uInt16 GetExtLeading() const { return nExtLeading; }
- USHORT GetFontAscent( const ViewShell *pSh, const OutputDevice& rOut );
- USHORT GetFontHeight( const ViewShell *pSh, const OutputDevice& rOut );
- USHORT GetFontLeading( const ViewShell *pSh, const OutputDevice& rOut );
+ sal_uInt16 GetFontAscent( const ViewShell *pSh, const OutputDevice& rOut );
+ sal_uInt16 GetFontHeight( const ViewShell *pSh, const OutputDevice& rOut );
+ sal_uInt16 GetFontLeading( const ViewShell *pSh, const OutputDevice& rOut );
void GuessLeading( const ViewShell& rSh, const FontMetric& rMet );
void SetDevFont( const ViewShell *pSh, OutputDevice& rOut );
inline OutputDevice* GetPrt() const { return pPrinter; }
- inline USHORT GetZoom() const { return nZoom; }
- inline USHORT GetPropWidth() const { return nPropWidth; }
- inline BOOL IsSymbol() const { return bSymbol; }
+ inline sal_uInt16 GetZoom() const { return nZoom; }
+ inline sal_uInt16 GetPropWidth() const { return nPropWidth; }
+ inline sal_Bool IsSymbol() const { return bSymbol; }
void DrawText( SwDrawTextInfo &rInf );
Size GetTextSize( SwDrawTextInfo &rInf );
@@ -151,9 +151,9 @@ protected:
virtual SwCacheObj *NewObj( );
public:
- SwFntAccess( const void * &rMagic, USHORT &rIndex, const void *pOwner,
+ SwFntAccess( const void * &rMagic, sal_uInt16 &rIndex, const void *pOwner,
ViewShell *pShell,
- BOOL bCheck = FALSE );
+ sal_Bool bCheck = sal_False );
inline SwFntObj* Get() { return (SwFntObj*) SwCacheAccess::Get(); };
};
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 00f21add8b20..ec1bc3870422 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -25,8 +25,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _FRAME_HXX
-#define _FRAME_HXX
+#ifndef SW_FRAME_HXX
+#define SW_FRAME_HXX
+
#include <svl/svarray.hxx>
#include <editeng/borderline.hxx>
#include "swtypes.hxx" // fuer SwTwips
@@ -60,7 +61,7 @@ class SvxBrushItem;
class SwSelectionList;
struct SwPosition;
struct SwCrsrMoveState;
-class SwPrtOptions;
+class SwPrintData;
// --> OD 2004-07-06 #i28701#
class SwSortedObjs;
@@ -142,8 +143,8 @@ class SwAnchoredObject;
class SwFrm;
typedef long (SwFrm:: *SwFrmGet)() const;
-typedef BOOL (SwFrm:: *SwFrmMax)( long );
-typedef void (SwFrm:: *SwFrmMakePos)( const SwFrm*, const SwFrm*, BOOL );
+typedef sal_Bool (SwFrm:: *SwFrmMax)( long );
+typedef void (SwFrm:: *SwFrmMakePos)( const SwFrm*, const SwFrm*, sal_Bool );
typedef long (*SwOperator)( long, long );
typedef void (SwFrm:: *SwFrmSet)( long, long );
@@ -204,8 +205,8 @@ struct SwRectFnCollection
};
typedef SwRectFnCollection* SwRectFn;
+/*
extern SwRectFn fnRectHori, fnRectVert, fnRectB2T, fnRectVL2R;
-
#define SWRECTFN( pFrm ) sal_Bool bVert = pFrm->IsVertical(); \
sal_Bool bRev = pFrm->IsReverse(); \
SwRectFn fnRect = bVert ? \
@@ -227,6 +228,36 @@ extern SwRectFn fnRectHori, fnRectVert, fnRectB2T, fnRectVL2R;
sal_Bool bNeighb = pFrm->IsNeighbourFrm(); \
SwRectFn fnRect = bVert == bNeighb ? \
fnRectHori : fnRectVert;
+*/
+
+//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+extern SwRectFn fnRectHori, fnRectVert, fnRectB2T, fnRectVL2R, fnRectVertL2R;
+#define SWRECTFN( pFrm ) sal_Bool bVert = pFrm->IsVertical(); \
+ sal_Bool bRev = pFrm->IsReverse(); \
+ sal_Bool bVertL2R = pFrm->IsVertLR(); \
+ SwRectFn fnRect = bVert ? \
+ ( bRev ? fnRectVL2R : ( bVertL2R ? fnRectVertL2R : fnRectVert ) ): \
+ ( bRev ? fnRectB2T : fnRectHori );
+#define SWRECTFNX( pFrm ) sal_Bool bVertX = pFrm->IsVertical(); \
+ sal_Bool bRevX = pFrm->IsReverse(); \
+ sal_Bool bVertL2RX = pFrm->IsVertLR(); \
+ SwRectFn fnRectX = bVertX ? \
+ ( bRevX ? fnRectVL2R : ( bVertL2RX ? fnRectVertL2R : fnRectVert ) ): \
+ ( bRevX ? fnRectB2T : fnRectHori );
+#define SWREFRESHFN( pFrm ) { if( bVert != pFrm->IsVertical() || \
+ bRev != pFrm->IsReverse() ) \
+ bVert = pFrm->IsVertical(); \
+ bRev = pFrm->IsReverse(); \
+ bVertL2R = pFrm->IsVertLR(); \
+ fnRect = bVert ? \
+ ( bRev ? fnRectVL2R : ( bVertL2R ? fnRectVertL2R : fnRectVert ) ): \
+ ( bRev ? fnRectB2T : fnRectHori ); }
+#define SWRECTFN2( pFrm ) sal_Bool bVert = pFrm->IsVertical(); \
+ sal_Bool bVertL2R = pFrm->IsVertLR(); \
+ sal_Bool bNeighb = pFrm->IsNeighbourFrm(); \
+ SwRectFn fnRect = bVert == bNeighb ? \
+ fnRectHori : ( bVertL2R ? fnRectVertL2R : fnRectVert );
+//End of SCMS
#define POS_DIFF( aFrm1, aFrm2 ) \
( (aFrm1.*fnRect->fnGetTop)() != (aFrm2.*fnRect->fnGetTop)() || \
(aFrm1.*fnRect->fnGetLeft)() != (aFrm2.*fnRect->fnGetLeft)() )
@@ -350,9 +381,9 @@ class SwFrm: public SwClient
SwCntntFrm* _FindPrevCnt( const bool _bInSameFtn = false );
- void _UpdateAttrFrm( SfxPoolItem*, SfxPoolItem*, BYTE & );
+ void _UpdateAttrFrm( SfxPoolItem*, SfxPoolItem*, sal_uInt8 & );
SwFrm* _GetIndNext();
- void SetDirFlags( BOOL bVert );
+ void SetDirFlags( sal_Bool bVert );
SwFrm( SwFrm & ); //Kopieren ist nicht erlaubt.
@@ -364,49 +395,52 @@ protected:
SwRect aFrm; //Absolute Dokumentposition und groesse des Frm
SwRect aPrt; //Position der PrtArea rel zum Frm und groesse der PrtArea
- USHORT bFlag01: 1;
- USHORT bFlag02: 1;
- USHORT bFlag03: 1;
- USHORT bFlag04: 1;
- USHORT bFlag05: 1;
- USHORT bReverse: 1; // Next line above/at the right side instead
+ sal_uInt16 bFlag01: 1;
+ sal_uInt16 bFlag02: 1;
+ sal_uInt16 bFlag03: 1;
+ sal_uInt16 bFlag04: 1;
+ sal_uInt16 bFlag05: 1;
+ sal_uInt16 bReverse: 1; // Next line above/at the right side instead
// under/at the left side of the previous line.
- USHORT bInvalidR2L: 1;
- USHORT bDerivedR2L: 1;
- USHORT bRightToLeft: 1;
- USHORT bInvalidVert: 1;
- USHORT bDerivedVert: 1;
- USHORT bVertical: 1;
- USHORT nType: 4; //Who am I?
-
- BOOL bValidPos: 1;
- BOOL bValidPrtArea: 1;
- BOOL bValidSize: 1;
- BOOL bValidLineNum: 1;
- BOOL bFixSize: 1;
- BOOL bUnUsed1: 1;
- BOOL bCompletePaint: 1; //Frame wird ganz gepaintet wenn TRUE, auch
+ sal_uInt16 bInvalidR2L: 1;
+ sal_uInt16 bDerivedR2L: 1;
+ sal_uInt16 bRightToLeft: 1;
+ sal_uInt16 bInvalidVert: 1;
+ sal_uInt16 bDerivedVert: 1;
+ sal_uInt16 bVertical: 1;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ sal_uInt16 bVertLR: 1;
+ //End of SCMS
+ sal_uInt16 nType: 4; //Who am I?
+
+ sal_Bool bValidPos: 1;
+ sal_Bool bValidPrtArea: 1;
+ sal_Bool bValidSize: 1;
+ sal_Bool bValidLineNum: 1;
+ sal_Bool bFixSize: 1;
+ sal_Bool bUnUsed1: 1;
+ sal_Bool bCompletePaint: 1; //Frame wird ganz gepaintet wenn sal_True, auch
//wenn der Inhalt nur teilw. veraendert ist;
- //Bei CntntFrms wird ausschliesslich wenn TRUE
+ //Bei CntntFrms wird ausschliesslich wenn sal_True
//der Border (von Action) gemalt.
- BOOL bRetouche: 1; //Der Frame ist fuer Retusche verantwortlich
- //wenn TRUE.
+ sal_Bool bRetouche: 1; //Der Frame ist fuer Retusche verantwortlich
+ //wenn sal_True.
public:
- BOOL bUnUsed2: 1;
+ sal_Bool bUnUsed2: 1;
protected:
- BOOL bInfInvalid: 1; //InfoFlags sind Invalid.
- BOOL bInfBody: 1; //Frm steht im DokumentBody.
- BOOL bInfTab: 1; //Frm steht in einer Tabelle.
- BOOL bInfFly: 1; //Frm steht in einem Fly.
- BOOL bInfFtn: 1; //Frm steht in einer Fussnote.
- BOOL bInfSct: 1; //Frm steht in einem Bereich.
- BOOL bColLocked: 1; //Grow/Shrink sperren bei spaltigen Section-
+ sal_Bool bInfInvalid: 1; //InfoFlags sind Invalid.
+ sal_Bool bInfBody: 1; //Frm steht im DokumentBody.
+ sal_Bool bInfTab: 1; //Frm steht in einer Tabelle.
+ sal_Bool bInfFly: 1; //Frm steht in einem Fly.
+ sal_Bool bInfFtn: 1; //Frm steht in einer Fussnote.
+ sal_Bool bInfSct: 1; //Frm steht in einem Bereich.
+ sal_Bool bColLocked: 1; //Grow/Shrink sperren bei spaltigen Section-
//oder Fly-Frames, wird im Format gesetzt
- void ColLock() { bColLocked = TRUE; }
- void ColUnlock() { bColLocked = FALSE; }
+ void ColLock() { bColLocked = sal_True; }
+ void ColUnlock() { bColLocked = sal_False; }
- SwPageFrm *InsertPage( SwPageFrm *pSibling, BOOL bFtn );
+ SwPageFrm *InsertPage( SwPageFrm *pSibling, sal_Bool bFtn );
void PrepareMake();
void OptPrepareMake();
void MakePos();
@@ -418,19 +452,19 @@ protected:
// <--
virtual void MakeAll() = 0;
//Adjustierung der Frames einer Seite
- SwTwips AdjustNeighbourhood( SwTwips nDiff, BOOL bTst = FALSE );
+ SwTwips AdjustNeighbourhood( SwTwips nDiff, sal_Bool bTst = sal_False );
//Aendern nur die Framesize, nicht die PrtArea-SSize
- virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE ) = 0;
- virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE ) = 0;
+ virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False ) = 0;
+ virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False ) = 0;
SwModify *GetDep() { return pRegisteredIn; }
const SwModify *GetDep() const { return pRegisteredIn; }
SwFrm( SwModify* );
- void CheckDir( UINT16 nDir, BOOL bVert, BOOL bOnlyBiDi, BOOL bBrowse );
+ void CheckDir( sal_uInt16 nDir, sal_Bool bVert, sal_Bool bOnlyBiDi, sal_Bool bBrowse );
/** enumeration for the different invalidations
@@ -455,7 +489,7 @@ protected:
OD 2004-05-19 #i28701#
Method has *only* to contain actions, which has to be performed on
- *every* assignment of the corresponding flag to <FALSE>.
+ *every* assignment of the corresponding flag to <sal_False>.
@author OD
*/
@@ -467,15 +501,15 @@ protected:
public:
TYPEINFO(); //Bereits in Basisklasse Client drin.
- USHORT GetType() const { return 0x1 << nType; }
+ sal_uInt16 GetType() const { return 0x1 << nType; }
static SwCache &GetCache() { return *pCache; }
static SwCache *GetCachePtr() { return pCache; }
static void SetCache( SwCache *pNew ) { pCache = pNew; }
//Aendern die PrtArea-SSize und die FrmSize.
- SwTwips Shrink( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
- SwTwips Grow ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
+ SwTwips Shrink( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
+ SwTwips Grow ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
//Wir brauchen unterschiedliche Methoden (wg. Performance) fuer das
//Einfuegenin den Layout Baum:
@@ -492,7 +526,7 @@ public:
//For internal use only; wer es anders macht wird
//in einen Sack gesteckt und muss zwei Tage drin hocken bleiben.
//Fuert Spezialbehandlung fuer _Get[Next|Prev]Leaf() durch (Tabellen).
- SwLayoutFrm *GetLeaf( MakePageType eMakePage, BOOL bFwd );
+ SwLayoutFrm *GetLeaf( MakePageType eMakePage, sal_Bool bFwd );
SwLayoutFrm *GetNextLeaf ( MakePageType eMakePage );
SwLayoutFrm *GetNextFtnLeaf( MakePageType eMakePage );
SwLayoutFrm *GetNextSctLeaf( MakePageType eMakePage );
@@ -501,10 +535,10 @@ public:
SwLayoutFrm *GetPrevFtnLeaf( MakePageType eMakeFtn = MAKEPAGE_FTN );
SwLayoutFrm *GetPrevSctLeaf( MakePageType eMakeFtn = MAKEPAGE_FTN );
SwLayoutFrm *GetPrevCellLeaf( MakePageType eMakeFtn = MAKEPAGE_FTN );
- const SwLayoutFrm *GetLeaf ( MakePageType eMakePage, BOOL bFwd,
+ const SwLayoutFrm *GetLeaf ( MakePageType eMakePage, sal_Bool bFwd,
const SwFrm *pAnch ) const;
- BOOL WrongPageDesc( SwPageFrm* pNew );
+ sal_Bool WrongPageDesc( SwPageFrm* pNew );
// --> OD 2004-07-02 #i28701# - new methods to append/remove drawing objects
void AppendDrawObj( SwAnchoredObject& _rNewObj );
@@ -523,37 +557,37 @@ public:
virtual void PaintBorder( const SwRect&, const SwPageFrm *pPage,
const SwBorderAttrs & ) const;
void PaintBaBo( const SwRect&, const SwPageFrm *pPage = 0,
- const BOOL bLowerBorder = FALSE ) const;
+ const sal_Bool bLowerBorder = sal_False ) const;
void PaintBackground( const SwRect&, const SwPageFrm *pPage,
const SwBorderAttrs &,
- const BOOL bLowerMode = FALSE,
- const BOOL bLowerBorder = FALSE ) const;
+ const sal_Bool bLowerMode = sal_False,
+ const sal_Bool bLowerBorder = sal_False ) const;
void PaintBorderLine( const SwRect&, const SwRect&, const SwPageFrm*,
const Color *pColor, const SvxBorderStyle = SOLID ) const;
//Retouche, nicht im Bereich des uebergebenen Rect!
void Retouche( const SwPageFrm *pPage, const SwRect &rRect ) const;
- BOOL GetBackgroundBrush( const SvxBrushItem*& rpBrush,
+ sal_Bool GetBackgroundBrush( const SvxBrushItem*& rpBrush,
const Color*& rpColor,
SwRect &rOrigRect,
- BOOL bLowerMode ) const;
+ sal_Bool bLowerMode ) const;
inline void SetCompletePaint() const;
inline void ResetCompletePaint() const;
- inline BOOL IsCompletePaint() const { return bCompletePaint; }
+ inline sal_Bool IsCompletePaint() const { return bCompletePaint; }
inline void SetRetouche() const;
inline void ResetRetouche() const;
- inline BOOL IsRetouche() const { return bRetouche; }
+ inline sal_Bool IsRetouche() const { return bRetouche; }
void SetInfFlags(); //Setzen der InfoFlags
- inline void InvalidateInfFlags() { bInfInvalid = TRUE; }
- inline BOOL IsInDocBody() const; //Benutzen die InfoFlags.
- inline BOOL IsInFtn() const; //ggf. werden die Flags ermittelt.
- inline BOOL IsInTab() const;
- inline BOOL IsInFly() const;
- inline BOOL IsInSct() const;
+ inline void InvalidateInfFlags() { bInfInvalid = sal_True; }
+ inline sal_Bool IsInDocBody() const; //Benutzen die InfoFlags.
+ inline sal_Bool IsInFtn() const; //ggf. werden die Flags ermittelt.
+ inline sal_Bool IsInTab() const;
+ inline sal_Bool IsInFly() const;
+ inline sal_Bool IsInSct() const;
// If frame is inside a split table row, this function returns
// the corresponding row frame in the follow table.
@@ -565,18 +599,25 @@ public:
bool IsInBalancedSection() const;
- inline BOOL IsReverse() const { return bReverse; }
- inline void SetReverse( BOOL bNew ){ bReverse = bNew ? 1 : 0; }
- inline BOOL IsVertical() const;
- inline BOOL GetVerticalFlag() const;
- inline void SetVertical( BOOL bNew ){ bVertical = bNew ? 1 : 0; }
- inline void SetDerivedVert( BOOL bNew ){ bDerivedVert = bNew ? 1 : 0; }
- inline void SetInvalidVert( BOOL bNew) { bInvalidVert = bNew ? 1 : 0; }
- inline BOOL IsRightToLeft() const;
- inline BOOL GetRightToLeftFlag() const;
- inline void SetRightToLeft( BOOL bNew ){ bRightToLeft = bNew ? 1 : 0; }
- inline void SetDerivedR2L( BOOL bNew ) { bDerivedR2L = bNew ? 1 : 0; }
- inline void SetInvalidR2L( BOOL bNew ) { bInvalidR2L = bNew ? 1 : 0; }
+ inline sal_Bool IsReverse() const { return bReverse; }
+ inline void SetReverse( sal_Bool bNew ){ bReverse = bNew ? 1 : 0; }
+ inline sal_Bool IsVertical() const;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ inline sal_Bool IsVertLR() const;
+ //End of SCMS
+ inline sal_Bool GetVerticalFlag() const;
+ inline void SetVertical( sal_Bool bNew ){ bVertical = bNew ? 1 : 0; }
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ inline void SetbVertLR( sal_Bool bNew ) { bVertLR = bNew ? 1 : 0; }
+ //End of SCMS
+ inline void SetDerivedVert( sal_Bool bNew ){ bDerivedVert = bNew ? 1 : 0; }
+ inline void SetInvalidVert( sal_Bool bNew) { bInvalidVert = bNew ? 1 : 0; }
+ inline sal_Bool IsRightToLeft() const;
+ inline sal_Bool GetRightToLeftFlag() const;
+ inline void SetRightToLeft( sal_Bool bNew ){ bRightToLeft = bNew ? 1 : 0; }
+ inline void SetDerivedR2L( sal_Bool bNew ) { bDerivedR2L = bNew ? 1 : 0; }
+ inline void SetInvalidR2L( sal_Bool bNew ) { bInvalidR2L = bNew ? 1 : 0; }
+
void CheckDirChange();
// returns upper left frame position for LTR and
// upper right frame position for Asian / RTL frames
@@ -585,7 +626,7 @@ public:
/** determine, if frame is moveable in given environment
OD 08.08.2003 #110978#
- method replaced 'old' method <BOOL IsMoveable() const>.
+ method replaced 'old' method <sal_Bool IsMoveable() const>.
Determines, if frame is moveable in given environment. if no environment
is given (parameter _pLayoutFrm == 0L), the movability in the actual
environment (<this->GetUpper()) is checked.
@@ -598,31 +639,31 @@ public:
@return boolean, indicating, if frame is moveable in given environment
*/
-// BOOL IsMoveable() const;
+// sal_Bool IsMoveable() const;
bool IsMoveable( const SwLayoutFrm* _pLayoutFrm = 0L ) const;
//Ist es fuer den (Txt)Frm in der aktuellen Umgebung erlaubt eine
//Fussnote einzufuegen (nicht z.B. in wiederholten TabellenHeadlines).
- BOOL IsFtnAllowed() const;
+ sal_Bool IsFtnAllowed() const;
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
virtual void Format( const SwBorderAttrs *pAttrs = 0 );
- virtual void CheckDirection( BOOL bVert );
+ virtual void CheckDirection( sal_Bool bVert );
void ReinitializeFrmSizeAttrFlags();
const SwAttrSet *GetAttrSet() const;
- inline BOOL HasFixSize() const { return bFixSize; }
- inline void SetFixSize( BOOL bNew ) { bFixSize = bNew; }
+ inline sal_Bool HasFixSize() const { return bFixSize; }
+ inline void SetFixSize( sal_Bool bNew ) { bFixSize = bNew; }
//Kann 0 liefern, pruefen auch ob die Shell zum richtigen Dokument
//gehoert. Impl in frmsh.hxx
ViewShell *GetShell() const;
//Prueft alle Seiten ab der Uebergebenen und korrigiert ggf.
- static void CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields = TRUE );
+ static void CheckPageDescs( SwPageFrm *pStart, sal_Bool bNotifyFields = sal_True );
//Koennen 0 liefern, einmal const einmal nicht
SwFrm *GetNext() { return pNext; }
@@ -632,7 +673,7 @@ public:
SwPageFrm *FindPageFrm();
SwFrm *FindColFrm();
SwRowFrm *FindRowFrm();
- SwFtnBossFrm *FindFtnBossFrm( BOOL bFootnotes = FALSE );
+ SwFtnBossFrm *FindFtnBossFrm( sal_Bool bFootnotes = sal_False );
SwTabFrm *ImplFindTabFrm();
SwFtnFrm *ImplFindFtnFrm();
SwFlyFrm *ImplFindFlyFrm();
@@ -653,7 +694,7 @@ public:
inline SwFrm *FindPrev();
inline const SwPageFrm *FindPageFrm() const;
inline const SwRootFrm *FindRootFrm() const;
- inline const SwFtnBossFrm *FindFtnBossFrm( BOOL bFtn = FALSE ) const;
+ inline const SwFtnBossFrm *FindFtnBossFrm( sal_Bool bFtn = sal_False ) const;
inline const SwFrm *FindColFrm() const;
inline const SwFrm *FindFooterOrHeader() const;
inline const SwTabFrm *FindTabFrm() const;
@@ -705,10 +746,10 @@ public:
{ return ( pNext || !IsInSct() ) ? pNext : _GetIndNext(); }
const SwFrm* GetIndNext() const { return ((SwFrm*)this)->GetIndNext(); }
- USHORT GetPhyPageNum() const; //Seitennummer ohne Offset
- USHORT GetVirtPageNum() const; //Seitenummer mit Offset
- BOOL OnRightPage() const { return 0 != GetPhyPageNum() % 2; };
- BOOL WannaRightPage() const;
+ sal_uInt16 GetPhyPageNum() const; //Seitennummer ohne Offset
+ sal_uInt16 GetVirtPageNum() const; //Seitenummer mit Offset
+ sal_Bool OnRightPage() const { return 0 != GetPhyPageNum() % 2; };
+ sal_Bool WannaRightPage() const;
inline const SwLayoutFrm *GetPrevLayoutLeaf() const;
@@ -729,7 +770,7 @@ public:
const SwRect PaintArea() const;
// The UnionFrm is the union of frm- and prt-area, normally identical
// to the frm-area except the case of negative prt-margins.
- const SwRect UnionFrm( BOOL bBorder = FALSE ) const;
+ const SwRect UnionFrm( sal_Bool bBorder = sal_False ) const;
//Der Zugriff auf die Member wird hier ausnahmsweiste gestattet,
//dies soll aber nicht dazu dienen die Werte wahllos zu veraendern;
@@ -743,13 +784,13 @@ public:
virtual void Cut() = 0;
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 ) = 0;
- void ValidateLineNum() { bValidLineNum = TRUE; }
+ void ValidateLineNum() { bValidLineNum = sal_True; }
- BOOL GetValidPosFlag() const { return bValidPos; }
- BOOL GetValidPrtAreaFlag()const { return bValidPrtArea; }
- BOOL GetValidSizeFlag() const { return bValidSize; }
- BOOL GetValidLineNumFlag()const { return bValidLineNum; }
- BOOL IsValid() const { return bValidPos && bValidSize && bValidPrtArea; }
+ sal_Bool GetValidPosFlag() const { return bValidPos; }
+ sal_Bool GetValidPrtAreaFlag()const { return bValidPrtArea; }
+ sal_Bool GetValidSizeFlag() const { return bValidSize; }
+ sal_Bool GetValidLineNumFlag()const { return bValidLineNum; }
+ sal_Bool IsValid() const { return bValidPos && bValidSize && bValidPrtArea; }
//Invalideren nur den Frm
// OD 2004-05-19 #i28701# - add call to method <_ActionOnInvalidation(..)>
@@ -762,7 +803,7 @@ public:
{
if ( bValidSize && _InvalidationAllowed( INVALID_SIZE ) )
{
- bValidSize = FALSE;
+ bValidSize = sal_False;
_ActionOnInvalidation( INVALID_SIZE );
}
}
@@ -770,7 +811,7 @@ public:
{
if ( bValidPrtArea && _InvalidationAllowed( INVALID_PRTAREA ) )
{
- bValidPrtArea = FALSE;
+ bValidPrtArea = sal_False;
_ActionOnInvalidation( INVALID_PRTAREA );
}
}
@@ -778,7 +819,7 @@ public:
{
if ( bValidPos && _InvalidationAllowed( INVALID_POS ) )
{
- bValidPos = FALSE;
+ bValidPos = sal_False;
_ActionOnInvalidation( INVALID_POS );
}
}
@@ -786,7 +827,7 @@ public:
{
if ( bValidLineNum && _InvalidationAllowed( INVALID_LINENUM ) )
{
- bValidLineNum = FALSE;
+ bValidLineNum = sal_False;
_ActionOnInvalidation( INVALID_LINENUM );
}
}
@@ -795,7 +836,7 @@ public:
if ( ( bValidSize || bValidPrtArea || bValidPos ) &&
_InvalidationAllowed( INVALID_ALL ) )
{
- bValidSize = bValidPrtArea = bValidPos = FALSE;
+ bValidSize = bValidPrtArea = bValidPos = sal_False;
_ActionOnInvalidation( INVALID_ALL );
}
}
@@ -811,8 +852,8 @@ public:
void ImplInvalidatePos();
void ImplInvalidateLineNum();
- inline void InvalidateNextPos( BOOL bNoFtn = FALSE );
- void ImplInvalidateNextPos( BOOL bNoFtn = FALSE );
+ inline void InvalidateNextPos( sal_Bool bNoFtn = sal_False );
+ void ImplInvalidateNextPos( sal_Bool bNoFtn = sal_False );
/** method to invalidate printing area of next frame
@@ -826,53 +867,54 @@ public:
virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const;
- virtual BOOL GetCrsrOfst( SwPosition *, Point&,
+ virtual sal_Bool GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0 ) const;
- virtual BOOL GetCharRect( SwRect &, const SwPosition&,
+ virtual sal_Bool GetCharRect( SwRect &, const SwPosition&,
SwCrsrMoveState* = 0 ) const;
- virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
// der "kurze Dienstweg" zwischen den Frames und der Formatierung.
// Wer den void* falsch Casted ist selbst schuld!
// Auf jedenfall muss der void* auf 0 geprueft werden.
virtual void Prepare( const PrepareHint ePrep = PREP_CLEAR,
- const void *pVoid = 0, BOOL bNotify = TRUE );
-
- //TRUE wenn's die richtige Klasse ist, FALSE sonst
- inline BOOL IsLayoutFrm() const;
- inline BOOL IsRootFrm() const;
- inline BOOL IsPageFrm() const;
- inline BOOL IsColumnFrm() const;
- inline BOOL IsFtnBossFrm() const; // Fussnotenbosse sind PageFrms und ColumnFrms
- inline BOOL IsHeaderFrm() const;
- inline BOOL IsFooterFrm() const;
- inline BOOL IsFtnContFrm() const;
- inline BOOL IsFtnFrm() const;
- inline BOOL IsBodyFrm() const;
- inline BOOL IsColBodyFrm() const; // in layfrm.hxx implementiert, BodyFrm unterhalb ColumnFrm
- inline BOOL IsPageBodyFrm() const; // in layfrm.hxx implementiert, BodyFrm unterhalb PageFrm
- inline BOOL IsFlyFrm() const;
- inline BOOL IsSctFrm() const;
- inline BOOL IsTabFrm() const;
- inline BOOL IsRowFrm() const;
- inline BOOL IsCellFrm() const;
- inline BOOL IsCntntFrm() const;
- inline BOOL IsTxtFrm() const;
- inline BOOL IsNoTxtFrm() const;
- inline BOOL IsFlowFrm() const; //Frms deren PrtArea von den Nachbarn
+ const void *pVoid = 0, sal_Bool bNotify = sal_True );
+
+ //sal_True wenn's die richtige Klasse ist, sal_False sonst
+ inline sal_Bool IsLayoutFrm() const;
+ inline sal_Bool IsRootFrm() const;
+ inline sal_Bool IsPageFrm() const;
+ inline sal_Bool IsColumnFrm() const;
+ inline sal_Bool IsFtnBossFrm() const; // Fussnotenbosse sind PageFrms und ColumnFrms
+ inline sal_Bool IsHeaderFrm() const;
+ inline sal_Bool IsFooterFrm() const;
+ inline sal_Bool IsFtnContFrm() const;
+ inline sal_Bool IsFtnFrm() const;
+ inline sal_Bool IsBodyFrm() const;
+ inline sal_Bool IsColBodyFrm() const; // in layfrm.hxx implementiert, BodyFrm unterhalb ColumnFrm
+ inline sal_Bool IsPageBodyFrm() const; // in layfrm.hxx implementiert, BodyFrm unterhalb PageFrm
+ inline sal_Bool IsFlyFrm() const;
+ inline sal_Bool IsSctFrm() const;
+ inline sal_Bool IsTabFrm() const;
+ inline sal_Bool IsRowFrm() const;
+ inline sal_Bool IsCellFrm() const;
+ inline sal_Bool IsCntntFrm() const;
+ inline sal_Bool IsTxtFrm() const;
+ inline sal_Bool IsNoTxtFrm() const;
+ inline sal_Bool IsFlowFrm() const; //Frms deren PrtArea von den Nachbarn
//abhaengen und die halt im Inhaltsfluss
//stehen.
- inline BOOL IsRetoucheFrm() const; //Frms die Retouchefaehig sind bzw. die
+ inline sal_Bool IsRetoucheFrm() const; //Frms die Retouchefaehig sind bzw. die
//u.U. hinter sich Retouchieren muessen.
- inline BOOL IsAccessibleFrm() const;
+ inline sal_Bool IsAccessibleFrm() const;
void PrepareCrsr(); //Die CrsrShell darf.
//Ist der Frm (bzw. die Section in der er steht) geschuetzt?
//Auch Fly in Fly in ... und Fussnoten
- BOOL IsProtected() const;
+ sal_Bool IsProtected() const;
- BOOL IsColLocked() const { return bColLocked; }
+ sal_Bool IsColLocked() const { return bColLocked; }
virtual ~SwFrm();
@@ -893,16 +935,16 @@ public:
long GetPrtBottom() const;
long GetPrtRight() const;
long GetPrtTop() const;
- BOOL SetMinLeft( long );
- BOOL SetMaxBottom( long );
- BOOL SetMaxRight( long );
- BOOL SetMinTop( long );
- void MakeBelowPos( const SwFrm*, const SwFrm*, BOOL );
- void MakeUpperPos( const SwFrm*, const SwFrm*, BOOL );
- void MakeLeftPos( const SwFrm*, const SwFrm*, BOOL );
- void MakeRightPos( const SwFrm*, const SwFrm*, BOOL );
- inline BOOL IsNeighbourFrm() const
- { return GetType() & FRM_NEIGHBOUR ? TRUE : FALSE; }
+ sal_Bool SetMinLeft( long );
+ sal_Bool SetMaxBottom( long );
+ sal_Bool SetMaxRight( long );
+ sal_Bool SetMinTop( long );
+ void MakeBelowPos( const SwFrm*, const SwFrm*, sal_Bool );
+ void MakeUpperPos( const SwFrm*, const SwFrm*, sal_Bool );
+ void MakeLeftPos( const SwFrm*, const SwFrm*, sal_Bool );
+ void MakeRightPos( const SwFrm*, const SwFrm*, sal_Bool );
+ inline sal_Bool IsNeighbourFrm() const
+ { return GetType() & FRM_NEIGHBOUR ? sal_True : sal_False; }
// --> OD 2006-05-10 #i65250#
inline sal_uInt32 GetFrmId() const { return mnFrmId; }
@@ -917,7 +959,7 @@ public:
bool IsInCoveredCell() const;
// FME 2007-08-30 #i81146# new loop control
- void ValidateThisAndAllLowers( const USHORT nStage );
+ void ValidateThisAndAllLowers( const sal_uInt16 nStage );
public:
#if OSL_DEBUG_LEVEL > 1
@@ -928,73 +970,79 @@ public:
bool IsCollapse() const;
};
-inline BOOL SwFrm::IsInDocBody() const
+inline sal_Bool SwFrm::IsInDocBody() const
{
if ( bInfInvalid )
((SwFrm*)this)->SetInfFlags();
return bInfBody;
}
-inline BOOL SwFrm::IsInFtn() const
+inline sal_Bool SwFrm::IsInFtn() const
{
if ( bInfInvalid )
((SwFrm*)this)->SetInfFlags();
return bInfFtn;
}
-inline BOOL SwFrm::IsInTab() const
+inline sal_Bool SwFrm::IsInTab() const
{
if ( bInfInvalid )
((SwFrm*)this)->SetInfFlags();
return bInfTab;
}
-inline BOOL SwFrm::IsInFly() const
+inline sal_Bool SwFrm::IsInFly() const
{
if ( bInfInvalid )
((SwFrm*)this)->SetInfFlags();
return bInfFly;
}
-inline BOOL SwFrm::IsInSct() const
+inline sal_Bool SwFrm::IsInSct() const
{
if ( bInfInvalid )
((SwFrm*)this)->SetInfFlags();
return bInfSct;
}
-BOOL SwFrm::IsVertical() const
+sal_Bool SwFrm::IsVertical() const
{
if( bInvalidVert )
- ((SwFrm*)this)->SetDirFlags( TRUE );
+ ((SwFrm*)this)->SetDirFlags( sal_True );
return bVertical != 0;
}
-BOOL SwFrm::GetVerticalFlag() const
+//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+inline sal_Bool SwFrm::IsVertLR() const
+{
+ return bVertLR != 0;
+}
+//End of SCMS
+sal_Bool SwFrm::GetVerticalFlag() const
{
return bVertical != 0;
}
-inline BOOL SwFrm::IsRightToLeft() const
+inline sal_Bool SwFrm::IsRightToLeft() const
{
if( bInvalidR2L )
- ((SwFrm*)this)->SetDirFlags( FALSE );
+ ((SwFrm*)this)->SetDirFlags( sal_False );
return bRightToLeft != 0;
}
-BOOL SwFrm::GetRightToLeftFlag() const
+sal_Bool SwFrm::GetRightToLeftFlag() const
{
return bRightToLeft != 0;
}
inline void SwFrm::SetCompletePaint() const
{
- ((SwFrm*)this)->bCompletePaint = TRUE;
+ ((SwFrm*)this)->bCompletePaint = sal_True;
}
inline void SwFrm::ResetCompletePaint() const
{
- ((SwFrm*)this)->bCompletePaint = FALSE;
+ ((SwFrm*)this)->bCompletePaint = sal_False;
}
inline void SwFrm::SetRetouche() const
{
- ((SwFrm*)this)->bRetouche = TRUE;
+ ((SwFrm*)this)->bRetouche = sal_True;
}
inline void SwFrm::ResetRetouche() const
{
- ((SwFrm*)this)->bRetouche = FALSE;
+ ((SwFrm*)this)->bRetouche = sal_False;
}
inline SwLayoutFrm *SwFrm::GetNextLayoutLeaf()
@@ -1044,14 +1092,14 @@ inline void SwFrm::InvalidateAll()
{
if ( bValidPrtArea && bValidSize && bValidPos )
ImplInvalidatePos();
- bValidPrtArea = bValidSize = bValidPos = FALSE;
+ bValidPrtArea = bValidSize = bValidPos = sal_False;
// OD 2004-05-19 #i28701#
_ActionOnInvalidation( INVALID_ALL );
}
}
-inline void SwFrm::InvalidateNextPos( BOOL bNoFtn )
+inline void SwFrm::InvalidateNextPos( sal_Bool bNoFtn )
{
if ( pNext && !pNext->IsSctFrm() )
pNext->InvalidatePos();
@@ -1105,7 +1153,7 @@ inline SwTabFrm *SwFrm::FindTabFrm()
{
return IsInTab() ? ImplFindTabFrm() : 0;
}
-inline const SwFtnBossFrm *SwFrm::FindFtnBossFrm( BOOL bFtn ) const
+inline const SwFtnBossFrm *SwFrm::FindFtnBossFrm( sal_Bool bFtn ) const
{
return ((SwFrm*)this)->FindFtnBossFrm( bFtn );
}
@@ -1186,89 +1234,89 @@ inline const SwFrm *SwFrm::FindPrev() const
}
-inline BOOL SwFrm::IsLayoutFrm() const
+inline sal_Bool SwFrm::IsLayoutFrm() const
{
- return GetType() & FRM_LAYOUT ? TRUE : FALSE;
+ return GetType() & FRM_LAYOUT ? sal_True : sal_False;
}
-inline BOOL SwFrm::IsRootFrm() const
+inline sal_Bool SwFrm::IsRootFrm() const
{
return nType == FRMC_ROOT;
}
-inline BOOL SwFrm::IsPageFrm() const
+inline sal_Bool SwFrm::IsPageFrm() const
{
return nType == FRMC_PAGE;
}
-inline BOOL SwFrm::IsColumnFrm() const
+inline sal_Bool SwFrm::IsColumnFrm() const
{
return nType == FRMC_COLUMN;
}
-inline BOOL SwFrm::IsFtnBossFrm() const
+inline sal_Bool SwFrm::IsFtnBossFrm() const
{
- return GetType() & FRM_FTNBOSS ? TRUE : FALSE;
+ return GetType() & FRM_FTNBOSS ? sal_True : sal_False;
}
-inline BOOL SwFrm::IsHeaderFrm() const
+inline sal_Bool SwFrm::IsHeaderFrm() const
{
return nType == FRMC_HEADER;
}
-inline BOOL SwFrm::IsFooterFrm() const
+inline sal_Bool SwFrm::IsFooterFrm() const
{
return nType == FRMC_FOOTER;
}
-inline BOOL SwFrm::IsFtnContFrm() const
+inline sal_Bool SwFrm::IsFtnContFrm() const
{
return nType == FRMC_FTNCONT;
}
-inline BOOL SwFrm::IsFtnFrm() const
+inline sal_Bool SwFrm::IsFtnFrm() const
{
return nType == FRMC_FTN;
}
-inline BOOL SwFrm::IsBodyFrm() const
+inline sal_Bool SwFrm::IsBodyFrm() const
{
return nType == FRMC_BODY;
}
-inline BOOL SwFrm::IsFlyFrm() const
+inline sal_Bool SwFrm::IsFlyFrm() const
{
return nType == FRMC_FLY;
}
-inline BOOL SwFrm::IsSctFrm() const
+inline sal_Bool SwFrm::IsSctFrm() const
{
return nType == FRMC_SECTION;
}
-inline BOOL SwFrm::IsTabFrm() const
+inline sal_Bool SwFrm::IsTabFrm() const
{
return nType == FRMC_TAB;
}
-inline BOOL SwFrm::IsRowFrm() const
+inline sal_Bool SwFrm::IsRowFrm() const
{
return nType == FRMC_ROW;
}
-inline BOOL SwFrm::IsCellFrm() const
+inline sal_Bool SwFrm::IsCellFrm() const
{
return nType == FRMC_CELL;
}
-inline BOOL SwFrm::IsCntntFrm() const
+inline sal_Bool SwFrm::IsCntntFrm() const
{
- return GetType() & FRM_CNTNT ? TRUE : FALSE;
+ return GetType() & FRM_CNTNT ? sal_True : sal_False;
}
-inline BOOL SwFrm::IsTxtFrm() const
+inline sal_Bool SwFrm::IsTxtFrm() const
{
return nType == FRMC_TXT;
}
-inline BOOL SwFrm::IsNoTxtFrm() const
+inline sal_Bool SwFrm::IsNoTxtFrm() const
{
return nType == FRMC_NOTXT;
}
-inline BOOL SwFrm::IsFlowFrm() const
+inline sal_Bool SwFrm::IsFlowFrm() const
{
- return GetType() & 0xCA00 ? TRUE : FALSE; //TabFrm, CntntFrm, SectionFrm
+ return GetType() & 0xCA00 ? sal_True : sal_False; //TabFrm, CntntFrm, SectionFrm
}
-inline BOOL SwFrm::IsRetoucheFrm() const
+inline sal_Bool SwFrm::IsRetoucheFrm() const
{
- return GetType() & 0xCA40 ? TRUE : FALSE; //TabFrm, CntntFrm, SectionFrm, Ftnfrm
+ return GetType() & 0xCA40 ? sal_True : sal_False; //TabFrm, CntntFrm, SectionFrm, Ftnfrm
}
-inline BOOL SwFrm::IsAccessibleFrm() const
+inline sal_Bool SwFrm::IsAccessibleFrm() const
{
- return GetType() & FRM_ACCESSIBLE ? TRUE : FALSE;
+ return GetType() & FRM_ACCESSIBLE ? sal_True : sal_False;
}
#endif
diff --git a/sw/source/core/inc/frminf.hxx b/sw/source/core/inc/frminf.hxx
index b965dabd816f..f05658c8ced7 100644
--- a/sw/source/core/inc/frminf.hxx
+++ b/sw/source/core/inc/frminf.hxx
@@ -50,22 +50,22 @@ public:
inline SwTxtFrmInfo( const SwTxtFrm *pTxtFrm ) : pFrm(pTxtFrm) { }
// Passt der Absatz in eine Zeile?
- BOOL IsOneLine() const;
+ sal_Bool IsOneLine() const;
// Ist die Zeile zu X% gefuellt?
- BOOL IsFilled( const BYTE nPercent ) const;
+ sal_Bool IsFilled( const sal_uInt8 nPercent ) const;
// Wo beginnt der Text (ohne whitespaces)? (rel. im Frame !!)
SwTwips GetLineStart() const;
//returne die mittel Position des n. Charakters
- SwTwips GetCharPos( xub_StrLen nChar, BOOL bCenter = TRUE ) const;
+ SwTwips GetCharPos( xub_StrLen nChar, sal_Bool bCenter = sal_True ) const;
// Sammelt die whitespaces am Zeilenbeginn und -ende im Pam
- void GetSpaces( SwPaM &rPam, BOOL bWithLineBreak ) const;
+ void GetSpaces( SwPaM &rPam, sal_Bool bWithLineBreak ) const;
// Ist an der ersten Textposition ein Bullet/Symbol etc?
- BOOL IsBullet( xub_StrLen nTxtPos ) const;
+ sal_Bool IsBullet( xub_StrLen nTxtPos ) const;
// Ermittelt Erstzeileneinzug
SwTwips GetFirstIndent() const;
@@ -76,7 +76,7 @@ public:
{ pFrm = pNew; return *this; }
// liegt eine Gegenueberstellung vor? (returnt Pos im Frame)
- USHORT GetBigIndent( xub_StrLen& rFndPos,
+ sal_uInt16 GetBigIndent( xub_StrLen& rFndPos,
const SwTxtFrm *pNextFrm = 0 ) const;
};
diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index 1b34323aa418..eb8e04eb196d 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -66,7 +66,7 @@ struct SwFindRowSpanCacheObj;
// - add 6th parameter to indicate that method should
// consider background transparency, saved in the color of the brush item
void MA_FASTCALL DrawGraphic( const SvxBrushItem *, OutputDevice *,
- const SwRect &rOrg, const SwRect &rOut, const BYTE nGrfNum = GRFNUM_NO,
+ const SwRect &rOrg, const SwRect &rOut, const sal_uInt8 nGrfNum = GRFNUM_NO,
const sal_Bool bConsiderBackgroundTransparency = sal_False );
// - method to align rectangle
@@ -83,14 +83,14 @@ void SwAlignGrfRect( SwRect *pGrfRect, const OutputDevice &rOut );
SwFlyFrm *GetFlyFromMarked( const SdrMarkList *pLst, ViewShell *pSh );
//Nicht gleich die math.lib anziehen.
-ULONG MA_FASTCALL SqRt( BigInt nX );
+sal_uLong MA_FASTCALL SqRt( BigInt nX );
SwFrm *SaveCntnt( SwLayoutFrm *pLay, SwFrm *pStart );
void RestoreCntnt( SwFrm *pSav, SwLayoutFrm *pParent, SwFrm *pSibling, bool bGrow );
//CntntNodes besorgen, CntntFrms erzeugen und in den LayFrm haengen.
-void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, ULONG nIndex,
- BOOL bPages = FALSE, ULONG nEndIndex = 0,
+void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, sal_uLong nIndex,
+ sal_Bool bPages = sal_False, sal_uLong nEndIndex = 0,
SwFrm *pPrv = 0 );
//Erzeugen der Frames fuer einen bestimmten Bereich, verwendet _InsertCnt
@@ -98,10 +98,10 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
const SwNodeIndex &rEndIdx );
//Um z.B. fuer Tabelleheadlines das Erzeugen der Flys in _InsertCnt zu unterbinden.
-extern BOOL bDontCreateObjects;
+extern sal_Bool bDontCreateObjects;
//Fuer FlyCnts, siehe SwFlyAtCntFrm::MakeAll()
-extern BOOL bSetCompletePaintOnInvalidate;
+extern sal_Bool bSetCompletePaintOnInvalidate;
//Fuer Tabelleneinstellung per Tastatur.
long MA_FASTCALL CalcRowRstHeight( SwLayoutFrm *pRow );
@@ -109,7 +109,7 @@ long MA_FASTCALL CalcHeightWidthFlys( const SwFrm *pFrm ); //MA_FLY_HEIGHT
//Neue Seite einsetzen
SwPageFrm * MA_FASTCALL InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper,
- BOOL bOdd, BOOL bInsertEmpty, BOOL bFtn,
+ sal_Bool bOdd, sal_Bool bInsertEmpty, sal_Bool bFtn,
SwFrm *pSibling );
//Flys bei der Seite anmelden.
@@ -123,26 +123,26 @@ void Notify_Background( const SdrObject* pObj,
SwPageFrm* pPage,
const SwRect& rRect,
const PrepareHint eHint,
- const BOOL bInva );
+ const sal_Bool bInva );
const SwFrm* GetVirtualUpper( const SwFrm* pFrm, const Point& rPos );
-BOOL Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj );
+sal_Bool Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj );
-const SwFrm *FindKontext( const SwFrm *pFrm, USHORT nAdditionalKontextTyp );
+const SwFrm *FindKontext( const SwFrm *pFrm, sal_uInt16 nAdditionalKontextTyp );
-BOOL IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm );
+sal_Bool IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm );
const SwFrm * MA_FASTCALL FindPage( const SwRect &rRect, const SwFrm *pPage );
// wird von SwCntntNode::GetFrm und von SwFlyFrm::GetFrm
// gerufen
-SwFrm* GetFrmOfModify( SwModify const&, USHORT const nFrmType, const Point* = 0,
+SwFrm* GetFrmOfModify( SwModify const&, sal_uInt16 const nFrmType, const Point* = 0,
const SwPosition *pPos = 0,
- const BOOL bCalcFrm = FALSE );
+ const sal_Bool bCalcFrm = sal_False );
//Sollen ExtraDaten (Reline-Strich, Zeilennummern) gepaintet werden?
-BOOL IsExtraData( const SwDoc *pDoc );
+sal_Bool IsExtraData( const SwDoc *pDoc );
// #i11760# - method declaration <CalcCntnt(..)>
void CalcCntnt( SwLayoutFrm *pLay,
@@ -161,9 +161,9 @@ protected:
const SwRect aPrt;
SwTwips mnFlyAnchorOfst;
SwTwips mnFlyAnchorOfstNoWrap;
- BOOL bHadFollow;
- BOOL bInvaKeep;
- BOOL bValidSize;
+ sal_Bool bHadFollow;
+ sal_Bool bInvaKeep;
+ sal_Bool bValidSize;
protected:
// #i49383#
bool mbFrmDeleted;
@@ -174,7 +174,7 @@ public:
const SwRect &Frm() const { return aFrm; }
const SwRect &Prt() const { return aPrt; }
- void SetInvaKeep() { bInvaKeep = TRUE; }
+ void SetInvaKeep() { bInvaKeep = sal_True; }
// #i49383#
void FrmDeleted()
{
@@ -184,15 +184,15 @@ public:
class SwLayNotify : public SwFrmNotify
{
- BOOL bLowersComplete;
+ sal_Bool bLowersComplete;
SwLayoutFrm *GetLay() { return (SwLayoutFrm*)pFrm; }
public:
SwLayNotify( SwLayoutFrm *pLayFrm );
~SwLayNotify();
- void SetLowersComplete( BOOL b ) { bLowersComplete = b; }
- BOOL IsLowersComplete() { return bLowersComplete; }
+ void SetLowersComplete( sal_Bool b ) { bLowersComplete = b; }
+ sal_Bool IsLowersComplete() { return bLowersComplete; }
};
class SwFlyNotify : public SwLayNotify
@@ -255,36 +255,36 @@ class SwBorderAttrs : public SwCacheObj
const SvxShadowItem &rShadow;
const Size aFrmSize; //Die FrmSize
- BOOL bBorderDist :1; //Ist's ein Frm der auch ohne Linie
+ sal_Bool bBorderDist :1; //Ist's ein Frm der auch ohne Linie
//einen Abstand haben kann?
//Mit den Folgenden Bools werden die gecache'ten Werte fuer UNgueltig
//erklaert - bis sie einmal berechnet wurden.
- BOOL bTopLine :1;
- BOOL bBottomLine :1;
- BOOL bLeftLine :1;
- BOOL bRightLine :1;
- BOOL bTop :1;
- BOOL bBottom :1;
- BOOL bLine :1;
-
- BOOL bIsLine :1; //Umrandung an mind. einer Kante?
-
- BOOL bCacheGetLine :1; //GetTopLine(), GetBottomLine() cachen?
- BOOL bCachedGetTopLine :1; //GetTopLine() gecached?
- BOOL bCachedGetBottomLine :1; //GetBottomLine() gecached?
+ sal_Bool bTopLine :1;
+ sal_Bool bBottomLine :1;
+ sal_Bool bLeftLine :1;
+ sal_Bool bRightLine :1;
+ sal_Bool bTop :1;
+ sal_Bool bBottom :1;
+ sal_Bool bLine :1;
+
+ sal_Bool bIsLine :1; //Umrandung an mind. einer Kante?
+
+ sal_Bool bCacheGetLine :1; //GetTopLine(), GetBottomLine() cachen?
+ sal_Bool bCachedGetTopLine :1; //GetTopLine() gecached?
+ sal_Bool bCachedGetBottomLine :1; //GetBottomLine() gecached?
// - booleans indicating, if values <bJoinedWithPrev>
// and <bJoinedWithNext> are cached and valid.
// Caching depends on value of <bCacheGetLine>.
- mutable BOOL bCachedJoinedWithPrev :1;
- mutable BOOL bCachedJoinedWithNext :1;
+ mutable sal_Bool bCachedJoinedWithPrev :1;
+ mutable sal_Bool bCachedJoinedWithNext :1;
// - booleans indicating, if borders are joined
// with previous/next frame.
- BOOL bJoinedWithPrev :1;
- BOOL bJoinedWithNext :1;
+ sal_Bool bJoinedWithPrev :1;
+ sal_Bool bJoinedWithNext :1;
//Die gecache'ten Werte, undefiniert bis sie einmal berechnet wurden.
- USHORT nTopLine,
+ sal_uInt16 nTopLine,
nBottomLine,
nLeftLine,
nRightLine,
@@ -323,12 +323,12 @@ class SwBorderAttrs : public SwCacheObj
// - internal helper method for methods
// <_CalcJoinedWithPrev> and <_CalcJoinedWithNext>.
- BOOL _JoinWithCmp( const SwFrm& _rCallerFrm,
+ sal_Bool _JoinWithCmp( const SwFrm& _rCallerFrm,
const SwFrm& _rCmpFrm ) const;
//Rechte und linke Linie sowie LRSpace gleich?
// - change name of 1st parameter - "rAttrs" -> "rCmpAttrs".
- BOOL CmpLeftRight( const SwBorderAttrs &rCmpAttrs,
+ sal_Bool CmpLeftRight( const SwBorderAttrs &rCmpAttrs,
const SwFrm *pCaller,
const SwFrm *pCmp ) const;
@@ -344,37 +344,37 @@ public:
inline const SvxBoxItem &GetBox() const { return rBox; }
inline const SvxShadowItem &GetShadow() const { return rShadow; }
- inline USHORT CalcTopLine() const;
- inline USHORT CalcBottomLine() const;
- inline USHORT CalcLeftLine() const;
- inline USHORT CalcRightLine() const;
- inline USHORT CalcTop() const;
- inline USHORT CalcBottom() const;
+ inline sal_uInt16 CalcTopLine() const;
+ inline sal_uInt16 CalcBottomLine() const;
+ inline sal_uInt16 CalcLeftLine() const;
+ inline sal_uInt16 CalcRightLine() const;
+ inline sal_uInt16 CalcTop() const;
+ inline sal_uInt16 CalcBottom() const;
long CalcLeft( const SwFrm *pCaller ) const;
long CalcRight( const SwFrm *pCaller ) const;
- inline BOOL IsLine() const;
+ inline sal_Bool IsLine() const;
inline const Size &GetSize() const { return aFrmSize; }
- inline BOOL IsBorderDist() const { return bBorderDist; }
+ inline sal_Bool IsBorderDist() const { return bBorderDist; }
//Sollen obere bzw. untere Umrandung fuer den Frm ausgewertet werden?
// #i25029# - add optional 2nd parameter <_pPrevFrm>
// If set, its value is taken for testing, if borders/shadow have to joined
// with previous frame.
- inline USHORT GetTopLine ( const SwFrm& _rFrm,
+ inline sal_uInt16 GetTopLine ( const SwFrm& _rFrm,
const SwFrm* _pPrevFrm = 0L ) const;
- inline USHORT GetBottomLine( const SwFrm& _rFrm ) const;
- inline void SetGetCacheLine( BOOL bNew ) const;
+ inline sal_uInt16 GetBottomLine( const SwFrm& _rFrm ) const;
+ inline void SetGetCacheLine( sal_Bool bNew ) const;
// - accessors for cached values <bJoinedWithPrev>
// and <bJoinedWithPrev>
// #i25029# - add optional 2nd parameter <_pPrevFrm>
// If set, its value is taken for testing, if borders/shadow have to joined
// with previous frame.
- BOOL JoinedWithPrev( const SwFrm& _rFrm,
+ sal_Bool JoinedWithPrev( const SwFrm& _rFrm,
const SwFrm* _pPrevFrm = 0L ) const;
- BOOL JoinedWithNext( const SwFrm& _rFrm ) const;
+ sal_Bool JoinedWithNext( const SwFrm& _rFrm ) const;
};
class SwBorderAttrAccess : public SwCacheAccess
@@ -398,9 +398,9 @@ class SwOrderIter
{
const SwPageFrm *pPage;
const SdrObject *pCurrent;
- const BOOL bFlysOnly;
+ const sal_Bool bFlysOnly;
public:
- SwOrderIter( const SwPageFrm *pPage, BOOL bFlysOnly = TRUE );
+ SwOrderIter( const SwPageFrm *pPage, sal_Bool bFlysOnly = sal_True );
void Current( const SdrObject *pNew ) { pCurrent = pNew; }
const SdrObject *Current() const { return pCurrent; }
@@ -414,22 +414,22 @@ public:
class StackHack
{
- static BYTE nCnt;
- static BOOL bLocked;
+ static sal_uInt8 nCnt;
+ static sal_Bool bLocked;
public:
StackHack()
{
if ( ++StackHack::nCnt > 50 )
- StackHack::bLocked = TRUE;
+ StackHack::bLocked = sal_True;
}
~StackHack()
{
if ( --StackHack::nCnt < 5 )
- StackHack::bLocked = FALSE;
+ StackHack::bLocked = sal_False;
}
- static BOOL IsLocked() { return StackHack::bLocked; }
- static BYTE Count() { return StackHack::nCnt; }
+ static sal_Bool IsLocked() { return StackHack::bLocked; }
+ static sal_uInt8 Count() { return StackHack::nCnt; }
};
@@ -437,7 +437,7 @@ public:
// #i25029# - add optional 2nd parameter <_pPrevFrm>
// If set, its value is taken for testing, if borders/shadow have to joined
// with previous frame.
-inline USHORT SwBorderAttrs::GetTopLine ( const SwFrm& _rFrm,
+inline sal_uInt16 SwBorderAttrs::GetTopLine ( const SwFrm& _rFrm,
const SwFrm* _pPrevFrm ) const
{
if ( !bCachedGetTopLine || _pPrevFrm )
@@ -446,60 +446,60 @@ inline USHORT SwBorderAttrs::GetTopLine ( const SwFrm& _rFrm,
}
return nGetTopLine;
}
-inline USHORT SwBorderAttrs::GetBottomLine( const SwFrm& _rFrm ) const
+inline sal_uInt16 SwBorderAttrs::GetBottomLine( const SwFrm& _rFrm ) const
{
if ( !bCachedGetBottomLine )
const_cast<SwBorderAttrs*>(this)->_GetBottomLine( _rFrm );
return nGetBottomLine;
}
-inline void SwBorderAttrs::SetGetCacheLine( BOOL bNew ) const
+inline void SwBorderAttrs::SetGetCacheLine( sal_Bool bNew ) const
{
((SwBorderAttrs*)this)->bCacheGetLine = bNew;
((SwBorderAttrs*)this)->bCachedGetBottomLine =
- ((SwBorderAttrs*)this)->bCachedGetTopLine = FALSE;
+ ((SwBorderAttrs*)this)->bCachedGetTopLine = sal_False;
// - invalidate cache for values <bJoinedWithPrev>
// and <bJoinedWithNext>.
- bCachedJoinedWithPrev = FALSE;
- bCachedJoinedWithNext = FALSE;
+ bCachedJoinedWithPrev = sal_False;
+ bCachedJoinedWithNext = sal_False;
}
-inline USHORT SwBorderAttrs::CalcTopLine() const
+inline sal_uInt16 SwBorderAttrs::CalcTopLine() const
{
if ( bTopLine )
((SwBorderAttrs*)this)->_CalcTopLine();
return nTopLine;
}
-inline USHORT SwBorderAttrs::CalcBottomLine() const
+inline sal_uInt16 SwBorderAttrs::CalcBottomLine() const
{
if ( bBottomLine )
((SwBorderAttrs*)this)->_CalcBottomLine();
return nBottomLine;
}
-inline USHORT SwBorderAttrs::CalcLeftLine() const
+inline sal_uInt16 SwBorderAttrs::CalcLeftLine() const
{
if ( bLeftLine )
((SwBorderAttrs*)this)->_CalcLeftLine();
return nLeftLine;
}
-inline USHORT SwBorderAttrs::CalcRightLine() const
+inline sal_uInt16 SwBorderAttrs::CalcRightLine() const
{
if ( bRightLine )
((SwBorderAttrs*)this)->_CalcRightLine();
return nRightLine;
}
-inline USHORT SwBorderAttrs::CalcTop() const
+inline sal_uInt16 SwBorderAttrs::CalcTop() const
{
if ( bTop )
((SwBorderAttrs*)this)->_CalcTop();
return nTop;
}
-inline USHORT SwBorderAttrs::CalcBottom() const
+inline sal_uInt16 SwBorderAttrs::CalcBottom() const
{
if ( bBottom )
((SwBorderAttrs*)this)->_CalcBottom();
return nBottom;
}
-inline BOOL SwBorderAttrs::IsLine() const
+inline sal_Bool SwBorderAttrs::IsLine() const
{
if ( bLine )
((SwBorderAttrs*)this)->_IsLine();
diff --git a/sw/source/core/inc/ftnboss.hxx b/sw/source/core/inc/ftnboss.hxx
index 427673fdeb20..793bf0c8866a 100644
--- a/sw/source/core/inc/ftnboss.hxx
+++ b/sw/source/core/inc/ftnboss.hxx
@@ -65,7 +65,7 @@ class SwFtnBossFrm: public SwLayoutFrm
SwFtnContFrm *MakeFtnCont();
SwFtnFrm *FindFirstFtn();
- BYTE _NeighbourhoodAdjustment( const SwFrm* pFrm ) const;
+ sal_uInt8 _NeighbourhoodAdjustment( const SwFrm* pFrm ) const;
protected:
void InsertFtn( SwFtnFrm * );
@@ -79,16 +79,16 @@ public:
//Fussnotenschnittstelle
void AppendFtn( SwCntntFrm *, SwTxtFtn * );
- void RemoveFtn( const SwCntntFrm *, const SwTxtFtn *, BOOL bPrep = TRUE );
+ void RemoveFtn( const SwCntntFrm *, const SwTxtFtn *, sal_Bool bPrep = sal_True );
static SwFtnFrm *FindFtn( const SwCntntFrm *, const SwTxtFtn * );
SwFtnContFrm *FindFtnCont();
inline const SwFtnContFrm *FindFtnCont() const;
const SwFtnFrm *FindFirstFtn( SwCntntFrm* ) const;
- SwFtnContFrm *FindNearestFtnCont( BOOL bDontLeave = FALSE );
+ SwFtnContFrm *FindNearestFtnCont( sal_Bool bDontLeave = sal_False );
void ChangeFtnRef( const SwCntntFrm *pOld, const SwTxtFtn *,
SwCntntFrm *pNew );
- void RearrangeFtns( const SwTwips nDeadLine, const BOOL bLock = FALSE,
+ void RearrangeFtns( const SwTwips nDeadLine, const sal_Bool bLock = sal_False,
const SwTxtFtn *pAttr = 0 );
//SS damit der Textformatierer Temporaer die Fussnotenhoehe begrenzen
@@ -118,11 +118,11 @@ public:
SwFtnBossFrm* _pOld,
SvPtrarr& _rFtnArr,
const sal_Bool _bCollectOnlyPreviousFtns = sal_False );
- void _MoveFtns( SvPtrarr &rFtnArr, BOOL bCalc = FALSE );
+ void _MoveFtns( SvPtrarr &rFtnArr, sal_Bool bCalc = sal_False );
void MoveFtns( const SwCntntFrm *pSrc, SwCntntFrm *pDest,
SwTxtFtn *pAttr );
// Sollte AdjustNeighbourhood gerufen werden (oder Grow/Shrink)?
- BYTE NeighbourhoodAdjustment( const SwFrm* pFrm ) const
+ sal_uInt8 NeighbourhoodAdjustment( const SwFrm* pFrm ) const
{ return IsPageFrm() ? NA_ONLY_ADJUST : _NeighbourhoodAdjustment( pFrm ); }
};
diff --git a/sw/source/core/inc/ftnfrm.hxx b/sw/source/core/inc/ftnfrm.hxx
index b1543e5c4383..b4e7e3b7f5f4 100644
--- a/sw/source/core/inc/ftnfrm.hxx
+++ b/sw/source/core/inc/ftnfrm.hxx
@@ -48,8 +48,8 @@ public:
const SwFtnFrm* FindFootNote() const;
- virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
- virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
+ virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
+ virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
virtual void Format( const SwBorderAttrs *pAttrs = 0 );
virtual void PaintBorder( const SwRect &, const SwPageFrm *pPage,
const SwBorderAttrs & ) const;
@@ -67,15 +67,15 @@ class SwFtnFrm: public SwLayoutFrm
SwCntntFrm *pRef; //In diesem CntntFrm steht die Fussnotenref.
SwTxtFtn *pAttr; //Fussnotenattribut (zum wiedererkennen)
- BOOL bBackMoveLocked : 1; //Absaetze in dieser Fussnote duerfen derzeit
+ sal_Bool bBackMoveLocked : 1; //Absaetze in dieser Fussnote duerfen derzeit
//nicht rueckwaerts fliessen.
// --> OD 2005-05-18 #i49383# - control unlock of position of lower anchored objects.
bool mbUnlockPosOfLowerObjs : 1;
// <--
#if OSL_DEBUG_LEVEL > 1
protected:
- virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
- virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
+ virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
+ virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
#endif
@@ -85,7 +85,7 @@ public:
virtual void Cut();
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 );
- BOOL operator<( const SwTxtFtn* pTxtFtn ) const;
+ sal_Bool operator<( const SwTxtFtn* pTxtFtn ) const;
#if OSL_DEBUG_LEVEL > 1
// in a non pro version test if the attribute has the same
@@ -114,13 +114,13 @@ public:
void InvalidateNxtFtnCnts( SwPageFrm* pPage );
- void LockBackMove() { bBackMoveLocked = TRUE; }
- void UnlockBackMove() { bBackMoveLocked = FALSE;}
- BOOL IsBackMoveLocked() { return bBackMoveLocked; }
+ void LockBackMove() { bBackMoveLocked = sal_True; }
+ void UnlockBackMove() { bBackMoveLocked = sal_False;}
+ sal_Bool IsBackMoveLocked() { return bBackMoveLocked; }
// Verhindert, dass der letzte Inhalt den SwFtnFrm mitloescht (Cut())
- inline void ColLock() { bColLocked = TRUE; }
- inline void ColUnlock() { bColLocked = FALSE; }
+ inline void ColLock() { bColLocked = sal_True; }
+ inline void ColUnlock() { bColLocked = sal_False; }
// --> OD 2005-05-18 #i49383#
inline void UnlockPosOfLowerObjs()
diff --git a/sw/source/core/inc/hffrm.hxx b/sw/source/core/inc/hffrm.hxx
index 50b41717a3f9..c3705d29f1c5 100644
--- a/sw/source/core/inc/hffrm.hxx
+++ b/sw/source/core/inc/hffrm.hxx
@@ -38,14 +38,14 @@ class SwHeadFootFrm : public SwLayoutFrm
protected:
void FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs);
void FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs);
- inline BOOL GetEatSpacing() const; // in hffrm.cxx
+ inline sal_Bool GetEatSpacing() const; // in hffrm.cxx
public:
- SwHeadFootFrm(SwFrmFmt * pFrm, USHORT aType);
+ SwHeadFootFrm(SwFrmFmt * pFrm, sal_uInt16 aType);
virtual void Format( const SwBorderAttrs *pAttrs = 0 );
virtual SwTwips GrowFrm( SwTwips,
- BOOL bTst = FALSE, BOOL bInfo = FALSE );
+ sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
virtual SwTwips ShrinkFrm( SwTwips,
- BOOL bTst = FALSE, BOOL bInfo = FALSE );
+ sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
};
class SwHeaderFrm: public SwHeadFootFrm
diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx
index 2a0a01be4461..e0ff55d151e4 100644
--- a/sw/source/core/inc/layact.hxx
+++ b/sw/source/core/inc/layact.hxx
@@ -72,36 +72,36 @@ class SwLayAction
//Wenn ein Absatz - oder was auch immer - bei der Formatierung mehr
//als eine Seite rueckwaerts floss traegt er seine neue Seitennummer
//hier ein. Die Steuerung der InternalAction kann dann geeignet reagieren.
- USHORT nPreInvaPage;
+ sal_uInt16 nPreInvaPage;
- ULONG nStartTicks; //Startzeitpunkt der Aktion, vergeht zu viel Zeit kann
+ sal_uLong nStartTicks; //Startzeitpunkt der Aktion, vergeht zu viel Zeit kann
//der WaitCrsr per CheckWaitCrsr() eingeschaltet werden.
- USHORT nInputType; //Bei welchem Input soll die Verarbeitung abgebrochen
+ sal_uInt16 nInputType; //Bei welchem Input soll die Verarbeitung abgebrochen
//werden?
- USHORT nEndPage; //StatBar Steuerung.
- USHORT nCheckPageNum; //CheckPageDesc() wurde verzoegert wenn != USHRT_MAX
+ sal_uInt16 nEndPage; //StatBar Steuerung.
+ sal_uInt16 nCheckPageNum; //CheckPageDesc() wurde verzoegert wenn != USHRT_MAX
//ab dieser Seite Checken.
- BOOL bPaint; //Painten oder nur Formatieren?
- BOOL bComplete; //Alles bis zum sichtbaren Bereich Formatieren oder
+ sal_Bool bPaint; //Painten oder nur Formatieren?
+ sal_Bool bComplete; //Alles bis zum sichtbaren Bereich Formatieren oder
//oder nur den sichtbaren Bereich?
- BOOL bCalcLayout; //Vollstaendige Reformatierung?
- BOOL bAgain; //Zur automatisch wiederholten Action wenn Seiten
+ sal_Bool bCalcLayout; //Vollstaendige Reformatierung?
+ sal_Bool bAgain; //Zur automatisch wiederholten Action wenn Seiten
//geloscht werden.
- BOOL bNextCycle; //Wiederaufsetzen bei der ersten Ungueltigen Seite.
- BOOL bInput; //Zum Abbrechen der Verarbeitung wenn ein Input anliegt.
- BOOL bIdle; //True wenn die Layaction vom Idler ausgeloest wurde.
- BOOL bReschedule; //Soll das Reschedule - abhaengig vom Progress -
+ sal_Bool bNextCycle; //Wiederaufsetzen bei der ersten Ungueltigen Seite.
+ sal_Bool bInput; //Zum Abbrechen der Verarbeitung wenn ein Input anliegt.
+ sal_Bool bIdle; //True wenn die Layaction vom Idler ausgeloest wurde.
+ sal_Bool bReschedule; //Soll das Reschedule - abhaengig vom Progress -
//gerufen werden?
- BOOL bCheckPages; //CheckPageDescs() ausfuehren oder verzoegern.
- BOOL bUpdateExpFlds;//Wird gesetzt wenn nach dem Formatierien noch eine
+ sal_Bool bCheckPages; //CheckPageDescs() ausfuehren oder verzoegern.
+ sal_Bool bUpdateExpFlds;//Wird gesetzt wenn nach dem Formatierien noch eine
//Runde fuer den ExpFld laufen muss.
- BOOL bBrowseActionStop; //Action fruehzeitig beenden (per bInput) und den
+ sal_Bool bBrowseActionStop; //Action fruehzeitig beenden (per bInput) und den
//Rest dem Idler ueberlassen.
- BOOL bWaitAllowed; //Wartecursor erlaubt?
- BOOL bPaintExtraData; //Anzeige von Zeilennumerierung o. ae. eingeschaltet?
- BOOL bActionInProgress; // wird in Action() anfangs gesetzt und zum Schluss geloescht
+ sal_Bool bWaitAllowed; //Wartecursor erlaubt?
+ sal_Bool bPaintExtraData; //Anzeige von Zeilennumerierung o. ae. eingeschaltet?
+ sal_Bool bActionInProgress; // wird in Action() anfangs gesetzt und zum Schluss geloescht
// OD 14.04.2003 #106346# - new flag for content formatting on interrupt.
sal_Bool mbFormatCntntOnInterrupt;
@@ -110,28 +110,28 @@ class SwLayAction
void PaintCntnt( const SwCntntFrm *, const SwPageFrm *,
const SwRect &rOldRect, long nOldBottom );
- BOOL PaintWithoutFlys( const SwRect &, const SwCntntFrm *,
+ sal_Bool PaintWithoutFlys( const SwRect &, const SwCntntFrm *,
const SwPageFrm * );
- inline BOOL _PaintCntnt( const SwCntntFrm *, const SwPageFrm *,
+ inline sal_Bool _PaintCntnt( const SwCntntFrm *, const SwPageFrm *,
const SwRect & );
- BOOL FormatLayout( SwLayoutFrm *, BOOL bAddRect = TRUE );
- BOOL FormatLayoutTab( SwTabFrm *, BOOL bAddRect = TRUE );
- BOOL FormatCntnt( const SwPageFrm* pPage );
+ sal_Bool FormatLayout( SwLayoutFrm *, sal_Bool bAddRect = sal_True );
+ sal_Bool FormatLayoutTab( SwTabFrm *, sal_Bool bAddRect = sal_True );
+ sal_Bool FormatCntnt( const SwPageFrm* pPage );
void _FormatCntnt( const SwCntntFrm* pCntnt,
const SwPageFrm* pPage );
- BOOL IsShortCut( SwPageFrm *& );
+ sal_Bool IsShortCut( SwPageFrm *& );
- BOOL TurboAction();
- BOOL _TurboAction( const SwCntntFrm * );
+ sal_Bool TurboAction();
+ sal_Bool _TurboAction( const SwCntntFrm * );
void InternalAction();
SwPageFrm *CheckFirstVisPage( SwPageFrm *pPage );
- BOOL RemoveEmptyBrowserPages();
+ sal_Bool RemoveEmptyBrowserPages();
inline void CheckIdleEnd();
- inline ULONG GetStartTicks() { return nStartTicks; }
+ inline sal_uLong GetStartTicks() { return nStartTicks; }
#endif
@@ -140,63 +140,63 @@ public:
~SwLayAction();
#ifdef _LAYACT_CXX
- void SetIdle ( BOOL bNew ) { bIdle = bNew; }
- void SetCheckPages ( BOOL bNew ) { bCheckPages = bNew; }
- void SetBrowseActionStop(BOOL bNew ) { bBrowseActionStop = bNew; }
- void SetNextCycle ( BOOL bNew ) { bNextCycle = bNew; }
-
- BOOL IsWaitAllowed() const { return bWaitAllowed; }
- BOOL IsNextCycle() const { return bNextCycle; }
- BOOL IsInput() const { return bInput; }
- BOOL IsWait() const { return 0 != pWait; }
- BOOL IsPaint() const { return bPaint; }
- BOOL IsIdle() const { return bIdle; }
- BOOL IsReschedule() const { return bReschedule; }
- BOOL IsPaintExtraData() const { return bPaintExtraData;}
- BOOL IsStopPrt() const;
- BOOL IsInterrupt() const { return IsInput() || IsStopPrt(); }
-
- USHORT GetInputType() const { return nInputType; }
+ void SetIdle ( sal_Bool bNew ) { bIdle = bNew; }
+ void SetCheckPages ( sal_Bool bNew ) { bCheckPages = bNew; }
+ void SetBrowseActionStop(sal_Bool bNew ) { bBrowseActionStop = bNew; }
+ void SetNextCycle ( sal_Bool bNew ) { bNextCycle = bNew; }
+
+ sal_Bool IsWaitAllowed() const { return bWaitAllowed; }
+ sal_Bool IsNextCycle() const { return bNextCycle; }
+ sal_Bool IsInput() const { return bInput; }
+ sal_Bool IsWait() const { return 0 != pWait; }
+ sal_Bool IsPaint() const { return bPaint; }
+ sal_Bool IsIdle() const { return bIdle; }
+ sal_Bool IsReschedule() const { return bReschedule; }
+ sal_Bool IsPaintExtraData() const { return bPaintExtraData;}
+ sal_Bool IsStopPrt() const;
+ sal_Bool IsInterrupt() const { return IsInput() || IsStopPrt(); }
+
+ sal_uInt16 GetInputType() const { return nInputType; }
#endif
//Einstellen der Action auf das gewuenschte Verhalten.
- void SetPaint ( BOOL bNew ) { bPaint = bNew; }
- void SetComplete ( BOOL bNew ) { bComplete = bNew; }
- void SetStatBar ( BOOL bNew );
- void SetInputType ( USHORT nNew ) { nInputType = nNew; }
- void SetCalcLayout ( BOOL bNew ) { bCalcLayout = bNew; }
- void SetReschedule ( BOOL bNew ) { bReschedule = bNew; }
- void SetWaitAllowed ( BOOL bNew ) { bWaitAllowed = bNew; }
-
- void SetAgain() { bAgain = TRUE; }
- void SetUpdateExpFlds() {bUpdateExpFlds = TRUE; }
+ void SetPaint ( sal_Bool bNew ) { bPaint = bNew; }
+ void SetComplete ( sal_Bool bNew ) { bComplete = bNew; }
+ void SetStatBar ( sal_Bool bNew );
+ void SetInputType ( sal_uInt16 nNew ) { nInputType = nNew; }
+ void SetCalcLayout ( sal_Bool bNew ) { bCalcLayout = bNew; }
+ void SetReschedule ( sal_Bool bNew ) { bReschedule = bNew; }
+ void SetWaitAllowed ( sal_Bool bNew ) { bWaitAllowed = bNew; }
+
+ void SetAgain() { bAgain = sal_True; }
+ void SetUpdateExpFlds() {bUpdateExpFlds = sal_True; }
void SetProgress(SfxProgress * _pProgress = NULL)
{ pProgress = _pProgress; }
- inline void SetCheckPageNum( USHORT nNew );
- inline void SetCheckPageNumDirect( USHORT nNew ) { nCheckPageNum = nNew; }
+ inline void SetCheckPageNum( sal_uInt16 nNew );
+ inline void SetCheckPageNumDirect( sal_uInt16 nNew ) { nCheckPageNum = nNew; }
void Action(); //Jetzt gehts loos...
void Reset(); //Zurueck auf CTor-Defaults.
- BOOL IsAgain() const { return bAgain; }
- BOOL IsComplete() const { return bComplete; }
- BOOL IsExpFlds() const { return bUpdateExpFlds; }
- BOOL IsCalcLayout() const { return bCalcLayout; }
- BOOL IsCheckPages() const { return bCheckPages; }
- BOOL IsBrowseActionStop() const { return bBrowseActionStop; }
- BOOL IsActionInProgress() const { return bActionInProgress; }
+ sal_Bool IsAgain() const { return bAgain; }
+ sal_Bool IsComplete() const { return bComplete; }
+ sal_Bool IsExpFlds() const { return bUpdateExpFlds; }
+ sal_Bool IsCalcLayout() const { return bCalcLayout; }
+ sal_Bool IsCheckPages() const { return bCheckPages; }
+ sal_Bool IsBrowseActionStop() const { return bBrowseActionStop; }
+ sal_Bool IsActionInProgress() const { return bActionInProgress; }
- USHORT GetCheckPageNum() const { return nCheckPageNum; }
+ sal_uInt16 GetCheckPageNum() const { return nCheckPageNum; }
//Auch andere sollen den Wartecrsr einschalten koennen.
void CheckWaitCrsr();
// --> OD 2004-06-09 #i28701# - method is now public;
// delete 2nd parameter, because its not used;
- BOOL FormatLayoutFly( SwFlyFrm * );
+ sal_Bool FormatLayoutFly( SwFlyFrm * );
// --> OD 2004-06-09 #i28701# - method is now public
- BOOL _FormatFlyCntnt( const SwFlyFrm * );
+ sal_Bool _FormatFlyCntnt( const SwFlyFrm * );
};
@@ -207,11 +207,11 @@ class SwLayIdle
SwViewImp *pImp; // Hier Meldet sich der Idler an und ab.
SwCntntNode *pCntntNode; // Hier wird die aktuelle Cursorposition
xub_StrLen nTxtPos; // zwischengespeichert.
- BOOL bPageValid; // Konnte die Seite alles validiert werden?
- BOOL bAllValid; // Konnte alles validiert werden?
+ sal_Bool bPageValid; // Konnte die Seite alles validiert werden?
+ sal_Bool bAllValid; // Konnte alles validiert werden?
#if OSL_DEBUG_LEVEL > 1
- BOOL bIndicator;
+ sal_Bool bIndicator;
#endif
#ifdef _LAYACT_CXX
@@ -221,8 +221,8 @@ class SwLayIdle
#endif
enum IdleJobType{ ONLINE_SPELLING, AUTOCOMPLETE_WORDS, WORD_COUNT, SMART_TAGS }; // SMARTTAGS
- BOOL _DoIdleJob( const SwCntntFrm*, IdleJobType );
- BOOL DoIdleJob( IdleJobType, BOOL bVisAreaOnly );
+ sal_Bool _DoIdleJob( const SwCntntFrm*, IdleJobType );
+ sal_Bool DoIdleJob( IdleJobType, sal_Bool bVisAreaOnly );
#endif
@@ -231,7 +231,7 @@ public:
~SwLayIdle();
};
-inline void SwLayAction::SetCheckPageNum( USHORT nNew )
+inline void SwLayAction::SetCheckPageNum( sal_uInt16 nNew )
{
if ( nNew < nCheckPageNum )
nCheckPageNum = nNew;
diff --git a/sw/source/core/inc/laycache.hxx b/sw/source/core/inc/laycache.hxx
index 71a2ec530196..768a1611010b 100644
--- a/sw/source/core/inc/laycache.hxx
+++ b/sw/source/core/inc/laycache.hxx
@@ -52,7 +52,7 @@ class SvStream;
class SwLayoutCache
{
SwLayCacheImpl *pImpl;
- USHORT nLockCount;
+ sal_uInt16 nLockCount;
public:
SwLayoutCache() : pImpl( NULL ), nLockCount( 0 ) {}
~SwLayoutCache();
@@ -62,7 +62,7 @@ public:
void ClearImpl();
sal_Bool IsLocked() const { return nLockCount > 0; }
- USHORT& GetLockCount() { return nLockCount; }
+ sal_uInt16& GetLockCount() { return nLockCount; }
SwLayCacheImpl *LockImpl()
{ if( nLockCount & 0x8000 ) return NULL;
if ( pImpl )
diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx
index 5a62a8c46425..093549d057da 100644
--- a/sw/source/core/inc/layfrm.hxx
+++ b/sw/source/core/inc/layfrm.hxx
@@ -25,8 +25,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _LAYFRM_HXX
-#define _LAYFRM_HXX
+#ifndef SW_LAYFRM_HXX
+#define SW_LAYFRM_HXX
#include "frame.hxx"
@@ -61,10 +61,10 @@ protected:
SwFrm *pLower;
- virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
- virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
+ virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
+ virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
- long CalcRel( const SwFmtFrmSize &rSz, BOOL bWidth ) const;
+ long CalcRel( const SwFmtFrmSize &rSz, sal_Bool bWidth ) const;
public:
// --> #i28701#
@@ -77,10 +77,10 @@ public:
//Proportionale Groessenanpassung der untergeordneten.
void ChgLowersProp( const Size& rOldSize );
- void AdjustColumns( const SwFmtCol *pCol, BOOL bAdjustAttributes );
+ void AdjustColumns( const SwFmtCol *pCol, sal_Bool bAdjustAttributes );
void ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
- const BOOL bChgFtn = FALSE );
+ const sal_Bool bChgFtn = sal_False );
//Painted die Column-Trennlinien fuer die innenliegenden Columns.
@@ -89,7 +89,7 @@ public:
virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const;
- virtual BOOL GetCrsrOfst( SwPosition *, Point&,
+ virtual sal_Bool GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0 ) const;
virtual void Cut();
@@ -97,16 +97,17 @@ public:
//sucht den dichtesten Cntnt zum SPoint, wird bei Seiten, Flys und Cells
//benutzt wenn GetCrsrOfst versagt hat.
- const SwCntntFrm* GetCntntPos( Point &rPoint, const BOOL bDontLeave,
- const BOOL bBodyOnly = FALSE,
- const BOOL bCalc = FALSE,
+ const SwCntntFrm* GetCntntPos( Point &rPoint, const sal_Bool bDontLeave,
+ const sal_Bool bBodyOnly = sal_False,
+ const sal_Bool bCalc = sal_False,
const SwCrsrMoveState *pCMS = 0,
- const BOOL bDefaultExpand = TRUE ) const;
+ const sal_Bool bDefaultExpand = sal_True ) const;
SwLayoutFrm( SwFrmFmt* );
~SwLayoutFrm();
- virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
const SwFrm *Lower() const { return pLower; }
SwFrm *Lower() { return pLower; }
const SwCntntFrm *ContainsCntnt() const;
@@ -120,17 +121,17 @@ public:
// investigated for sections.
const SwFrm *ContainsAny( const bool _bInvestigateFtnForSections = false ) const;
inline SwFrm *ContainsAny( const bool _bInvestigateFtnForSections = false );
- BOOL IsAnLower( const SwFrm * ) const;
+ sal_Bool IsAnLower( const SwFrm * ) const;
- const SwFrmFmt *GetFmt() const { return (const SwFrmFmt*)GetDep(); }
- SwFrmFmt *GetFmt() { return (SwFrmFmt*)GetDep(); }
- void SetFrmFmt( SwFrmFmt* );
+ virtual const SwFrmFmt *GetFmt() const;
+ virtual SwFrmFmt *GetFmt();
+ void SetFrmFmt( SwFrmFmt* );
//Verschieben der Ftns aller Lower - ab dem StartCntnt.
- //TRUE wenn mindestens eine Ftn verschoben wurde.
+ //sal_True wenn mindestens eine Ftn verschoben wurde.
//Ruft das Update der Seitennummer wenn bFtnNums gesetzt ist.
- BOOL MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
- SwFtnBossFrm *pNewBoss, const BOOL bFtnNums );
+ sal_Bool MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
+ SwFtnBossFrm *pNewBoss, const sal_Bool bFtnNums );
// --> #i28701# - change purpose of method and its name
// --> #i44016# - add parameter <_bUnlockPosOfObjs> to
@@ -188,12 +189,12 @@ inline SwFrm* SwLayoutFrm::ContainsAny( const bool _bInvestigateFtnForSections )
}
// Diese SwFrm-inlines sind hier, damit frame.hxx nicht layfrm.hxx includen muss
-inline BOOL SwFrm::IsColBodyFrm() const
+inline sal_Bool SwFrm::IsColBodyFrm() const
{
return nType == FRMC_BODY && GetUpper()->IsColumnFrm();
}
-inline BOOL SwFrm::IsPageBodyFrm() const
+inline sal_Bool SwFrm::IsPageBodyFrm() const
{
return nType == FRMC_BODY && GetUpper()->IsPageFrm();
}
@@ -203,6 +204,6 @@ inline SwFrm* SwLayoutFrm::GetLastLower()
return const_cast<SwFrm*>(static_cast<const SwLayoutFrm*>(this)->GetLastLower());
}
-#endif //_LAYFRM_HXX
+#endif // SW_LAYFRM_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/layouter.hxx b/sw/source/core/inc/layouter.hxx
index 2de2702b7492..7ffa885038dd 100644
--- a/sw/source/core/inc/layouter.hxx
+++ b/sw/source/core/inc/layouter.hxx
@@ -67,7 +67,7 @@ class SwLayouter
SwEndnoter* pEndnoter;
SwLooping* pLooping;
void _CollectEndnotes( SwSectionFrm* pSect );
- BOOL StartLooping( SwPageFrm* pPage );
+ sal_Bool StartLooping( SwPageFrm* pPage );
// --> #i28701#
SwMovedFwdFrmsByObjPos* mpMovedFwdFrms;
@@ -127,15 +127,15 @@ public:
~SwLayouter();
void InsertEndnotes( SwSectionFrm* pSect );
void CollectEndnote( SwFtnFrm* pFtn );
- BOOL HasEndnotes() const;
+ sal_Bool HasEndnotes() const;
- void LoopControl( SwPageFrm* pPage, BYTE nLoop );
+ void LoopControl( SwPageFrm* pPage, sal_uInt8 nLoop );
void EndLoopControl();
void LoopingLouieLight( const SwDoc& rDoc, const SwTxtFrm& rFrm );
static void CollectEndnotes( SwDoc* pDoc, SwSectionFrm* pSect );
- static BOOL Collecting( SwDoc* pDoc, SwSectionFrm* pSect, SwFtnFrm* pFtn );
- static BOOL StartLoopControl( SwDoc* pDoc, SwPageFrm *pPage );
+ static sal_Bool Collecting( SwDoc* pDoc, SwSectionFrm* pSect, SwFtnFrm* pFtn );
+ static sal_Bool StartLoopControl( SwDoc* pDoc, SwPageFrm *pPage );
// --> #i28701#
static void ClearMovedFwdFrms( const SwDoc& _rDoc );
diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx
index ec9b4dcebbb5..ed4a856de65a 100644
--- a/sw/source/core/inc/mvsave.hxx
+++ b/sw/source/core/inc/mvsave.hxx
@@ -25,9 +25,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _MVSAVE_HXX
-#define _MVSAVE_HXX
-
+#ifndef SW_MVSAVE_HXX
+#define SW_MVSAVE_HXX
#include <tools/string.hxx>
#include <vcl/keycod.hxx>
@@ -76,8 +75,8 @@ namespace sw { namespace mark
bool m_bSavePos;
bool m_bSaveOtherPos;
IDocumentMarkAccess::MarkType m_eOrigBkmType;
- ULONG m_nNode1;
- ULONG m_nNode2;
+ sal_uLong m_nNode1;
+ sal_uLong m_nNode2;
xub_StrLen m_nCntnt1;
xub_StrLen m_nCntnt2;
::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndo;
@@ -92,11 +91,11 @@ void _DelBookmarks(const SwNodeIndex& rStt,
::std::vector< ::sw::mark::SaveBookmark> * SaveBkmk =0,
const SwIndex* pSttIdx =0,
const SwIndex* pEndIdx =0);
-void _SaveCntntIdx( SwDoc* pDoc, ULONG nNode, xub_StrLen nCntnt,
- SvULongs& rSaveArr, BYTE nSaveFly = 0 );
+void _SaveCntntIdx( SwDoc* pDoc, sal_uLong nNode, xub_StrLen nCntnt,
+ SvULongs& rSaveArr, sal_uInt8 nSaveFly = 0 );
void _RestoreCntntIdx( SwDoc* pDoc, SvULongs& rSaveArr,
- ULONG nNode, xub_StrLen nOffset = 0,
- BOOL bAuto = FALSE );
+ sal_uLong nNode, xub_StrLen nOffset = 0,
+ sal_Bool bAuto = sal_False );
void _RestoreCntntIdx( SvULongs& rSaveArr, const SwNode& rNd,
xub_StrLen nLen, xub_StrLen nCorrLen );
@@ -105,11 +104,11 @@ void _RestoreCntntIdx( SvULongs& rSaveArr, const SwNode& rNd,
* location. */
struct _SaveFly
{
- ULONG nNdDiff; /// relative node difference
+ sal_uLong nNdDiff; /// relative node difference
SwFrmFmt* pFrmFmt; /// the fly's frame format
sal_Bool bInsertPosition; /// if true, anchor _at_ insert position
- _SaveFly( ULONG nNodeDiff, SwFrmFmt* pFmt, sal_Bool bInsert )
+ _SaveFly( sal_uLong nNodeDiff, SwFrmFmt* pFmt, sal_Bool bInsert )
: nNdDiff( nNodeDiff ), pFrmFmt( pFmt ), bInsertPosition( bInsert )
{ }
};
@@ -131,16 +130,16 @@ class SwDataChanged
const SwPaM* pPam;
const SwPosition* pPos;
SwDoc* pDoc;
- ULONG nNode;
+ sal_uLong nNode;
xub_StrLen nCntnt;
- USHORT nType; // Insert/Move/Delete/... (UndoIds)
+ sal_uInt16 nType; // Insert/Move/Delete/... (UndoIds)
public:
- SwDataChanged( const SwPaM& rPam, USHORT nType );
- SwDataChanged( SwDoc* pDoc, const SwPosition& rPos, USHORT nType );
+ SwDataChanged( const SwPaM& rPam, sal_uInt16 nType );
+ SwDataChanged( SwDoc* pDoc, const SwPosition& rPos, sal_uInt16 nType );
~SwDataChanged();
- ULONG GetNode() const { return nNode; }
+ sal_uLong GetNode() const { return nNode; }
xub_StrLen GetCntnt() const { return nCntnt; }
};
@@ -149,25 +148,10 @@ public:
// Crsr verschieben kann
// die Funktionen rufen nicht die SwDoc::Corr - Methoden!
- // Setzt alle PaMs an OldPos auf NewPos + Offset
-void PaMCorrAbs( const SwPosition &rOldPos,
- const SwPosition &rNewPos,
- const xub_StrLen nOffset = 0 );
-
- // Setzt alle PaMs in OldNode auf NewPos + Offset
-void PaMCorrAbs( const SwNodeIndex &rOldNode,
- const SwPosition &rNewPos,
- const xub_StrLen nOffset = 0 );
-
// Setzt alle PaMs im Bereich vom Range nach NewPos
void PaMCorrAbs( const SwPaM& rRange,
const SwPosition& rNewPos );
- // Setzt alle PaMs im Bereich von [StartNode, EndNode] nach NewPos
-void PaMCorrAbs( const SwNodeIndex &rStartNode,
- const SwNodeIndex &rEndNode,
- const SwPosition &rNewPos );
-
// Setzt alle PaMs in OldNode auf relative Pos
void PaMCorrRel( const SwNodeIndex &rOldNode,
const SwPosition &rNewPos,
@@ -181,18 +165,18 @@ class _ZSortFly
{
const SwFrmFmt* pFmt;
const SwFmtAnchor* pAnchor;
- UINT32 nOrdNum;
+ sal_uInt32 nOrdNum;
public:
_ZSortFly( const SwFrmFmt* pFrmFmt, const SwFmtAnchor* pFlyAnchor,
- UINT32 nArrOrdNum );
+ sal_uInt32 nArrOrdNum );
_ZSortFly& operator=( const _ZSortFly& rCpy )
{
pFmt = rCpy.pFmt, pAnchor = rCpy.pAnchor, nOrdNum = rCpy.nOrdNum;
return *this;
}
- int operator==( const _ZSortFly& ) const { return FALSE; }
+ int operator==( const _ZSortFly& ) const { return sal_False; }
int operator<( const _ZSortFly& rCmp ) const
{ return nOrdNum < rCmp.nOrdNum; }
@@ -226,6 +210,6 @@ public:
};
-#endif // _MVSAVE_HXX
+#endif // SW_MVSAVE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/node2lay.hxx b/sw/source/core/inc/node2lay.hxx
index 173cfa0efb02..ac83381f8c16 100644
--- a/sw/source/core/inc/node2lay.hxx
+++ b/sw/source/core/inc/node2lay.hxx
@@ -68,15 +68,15 @@ public:
SwNode2Layout( const SwNode& rNd );
// Dieser Ctor ist fuer das Einfuegen vor oder hinter rNd gedacht,
// nIdx ist der Index des einzufuegenden Nodes
- SwNode2Layout( const SwNode& rNd, ULONG nIdx );
+ SwNode2Layout( const SwNode& rNd, sal_uLong nIdx );
~SwNode2Layout();
SwFrm* NextFrm();
SwLayoutFrm* UpperFrm( SwFrm* &rpFrm, const SwNode& rNode );
- void RestoreUpperFrms( SwNodes& rNds, ULONG nStt, ULONG nEnd );
+ void RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd );
SwFrm *GetFrm( const Point* pDocPos = 0,
const SwPosition *pPos = 0,
- const BOOL bCalcFrm = TRUE ) const;
+ const sal_Bool bCalcFrm = sal_True ) const;
};
#endif
diff --git a/sw/source/core/inc/noteurl.hxx b/sw/source/core/inc/noteurl.hxx
index 66e5ac515a3e..42db71134c45 100644
--- a/sw/source/core/inc/noteurl.hxx
+++ b/sw/source/core/inc/noteurl.hxx
@@ -49,7 +49,7 @@ public:
const String& GetURL() const { return aURL; }
const String& GetTarget() const { return aTarget; }
const SwRect& GetRect() const { return aRect; }
- BOOL operator==( const SwURLNote& rSwURLNote ) const
+ sal_Bool operator==( const SwURLNote& rSwURLNote ) const
{ return aRect == rSwURLNote.aRect; }
};
@@ -61,10 +61,10 @@ class SwNoteURL
SwURLNoteList aList;
public:
SwNoteURL() {}
- USHORT Count() const { return aList.Count(); }
+ sal_uInt16 Count() const { return aList.Count(); }
void InsertURLNote( const String& rURL, const String& rTarget,
const SwRect& rRect );
- const SwURLNote& GetURLNote( USHORT nPos ) const
+ const SwURLNote& GetURLNote( sal_uInt16 nPos ) const
{ return *aList.GetObject( nPos ); }
void FillImageMap( ImageMap* pMap, const Point& rPos, const MapMode& rMap );
};
diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx
index aefadba8cd50..584a23d8acbe 100644
--- a/sw/source/core/inc/notxtfrm.hxx
+++ b/sw/source/core/inc/notxtfrm.hxx
@@ -25,8 +25,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _NOTXTFRM_HXX
-#define _NOTXTFRM_HXX
+#ifndef SW_NOTXTFRM_HXX
+#define SW_NOTXTFRM_HXX
#include <cntfrm.hxx>
@@ -56,22 +56,23 @@ public:
~SwNoTxtFrm();
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
- virtual void Paint(const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
- virtual BOOL GetCharRect( SwRect &, const SwPosition&,
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
+ virtual sal_Bool GetCharRect( SwRect &, const SwPosition&,
SwCrsrMoveState* = 0) const;
- BOOL GetCrsrOfst(SwPosition* pPos, Point& aPoint,
+ sal_Bool GetCrsrOfst(SwPosition* pPos, Point& aPoint,
SwCrsrMoveState* = 0) const;
const Size &GetGrfSize() const { return GetSize(); }
- void GetGrfArea( SwRect &rRect, SwRect * = 0, BOOL bMirror = TRUE ) const;
+ void GetGrfArea( SwRect &rRect, SwRect * = 0, sal_Bool bMirror = sal_True ) const;
- BOOL IsTransparent() const;
+ sal_Bool IsTransparent() const;
void StopAnimation( OutputDevice* = 0 ) const;
- BOOL HasAnimation() const;
+ sal_Bool HasAnimation() const;
// Routine for the graphics cache
- USHORT GetWeight() { return nWeight; }
+ sal_uInt16 GetWeight() { return nWeight; }
};
#endif
diff --git a/sw/source/core/inc/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx
index 8116aa504927..392790a7cd78 100644
--- a/sw/source/core/inc/pagefrm.hxx
+++ b/sw/source/core/inc/pagefrm.hxx
@@ -67,21 +67,21 @@ class SwPageFrm: public SwFtnBossFrm
SwPageDesc *pDesc; //PageDesc der die Seite beschreibt.
- USHORT nPhyPageNum; //Physikalische Seitennummer.
-
- BOOL bInvalidCntnt :1;
- BOOL bInvalidLayout :1;
- BOOL bInvalidFlyCntnt :1;
- BOOL bInvalidFlyLayout :1;
- BOOL bInvalidFlyInCnt :1;
- BOOL bFtnPage :1; //Diese Seite ist fuer Dokumentende-Fussnoten.
- BOOL bEmptyPage :1; //Dies ist eine explizite Leerseite
- BOOL bEndNotePage :1; //'Fussnotenseite' fuer Endnoten
- BOOL bInvalidSpelling :1; //Das Online-Spelling ist gefordert
- BOOL bInvalidSmartTags :1; //checking for smarttags is needed // SMARTTAGS
- BOOL bInvalidAutoCmplWrds :1; //Auto-Complete Wordliste aktualisieren
- BOOL bInvalidWordCount :1;
- BOOL bHasGrid :1; // Grid for Asian layout
+ sal_uInt16 nPhyPageNum; //Physikalische Seitennummer.
+
+ sal_Bool bInvalidCntnt :1;
+ sal_Bool bInvalidLayout :1;
+ sal_Bool bInvalidFlyCntnt :1;
+ sal_Bool bInvalidFlyLayout :1;
+ sal_Bool bInvalidFlyInCnt :1;
+ sal_Bool bFtnPage :1; //Diese Seite ist fuer Dokumentende-Fussnoten.
+ sal_Bool bEmptyPage :1; //Dies ist eine explizite Leerseite
+ sal_Bool bEndNotePage :1; //'Fussnotenseite' fuer Endnoten
+ sal_Bool bInvalidSpelling :1; //Das Online-Spelling ist gefordert
+ sal_Bool bInvalidSmartTags :1; //checking for smarttags is needed // SMARTTAGS
+ sal_Bool bInvalidAutoCmplWrds :1; //Auto-Complete Wordliste aktualisieren
+ sal_Bool bInvalidWordCount :1;
+ sal_Bool bHasGrid :1; // Grid for Asian layout
// #i28701# - boolean, indicating that layout of page frame
// is in progress.
@@ -89,7 +89,7 @@ class SwPageFrm: public SwFtnBossFrm
static const sal_Int8 mnShadowPxWidth;
- void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, BYTE &,
+ void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, sal_uInt8 &,
SwAttrSetChg *pa = 0, SwAttrSetChg *pb = 0 );
// Anpassen der max. Fussnotenhoehen in den einzelnen Spalten
@@ -195,13 +195,13 @@ public:
//Spezialisiertes GetCntntPos() fuer Felder in Rahmen.
void GetCntntPosition( const Point &rPt, SwPosition &rPos ) const;
- BOOL IsEmptyPage() const { return bEmptyPage; } //explizite Leerseite.
+ sal_Bool IsEmptyPage() const { return bEmptyPage; } //explizite Leerseite.
void UpdateFtnNum();
//Immer nach dem Paste rufen. Erzeugt die Seitengeb. Rahmen und Formatiert
//generischen Inhalt.
- void PreparePage( BOOL bFtn );
+ void PreparePage( sal_Bool bFtn );
//Schickt an alle ContentFrames ein Prepare wg. geaenderter Registervorlage
void PrepareRegisterChg();
@@ -215,18 +215,18 @@ public:
// this assertion. Thus, delete it.
void PlaceFly( SwFlyFrm* pFly, SwFlyFrmFmt* pFmt );
- virtual BOOL GetCrsrOfst( SwPosition *, Point&,
+ virtual sal_Bool GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0 ) const;
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
// erfrage vom Client Informationen
- virtual BOOL GetInfo( SfxPoolItem& ) const;
+ virtual sal_Bool GetInfo( SfxPoolItem& ) const;
virtual void Cut();
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 );
- virtual void CheckDirection( BOOL bVert );
- void CheckGrid( BOOL bInvalidate );
+ virtual void CheckDirection( sal_Bool bVert );
+ void CheckGrid( sal_Bool bInvalidate );
void PaintGrid( OutputDevice* pOut, SwRect &rRect ) const;
- BOOL HasGrid() const { return bHasGrid; }
+ sal_Bool HasGrid() const { return bHasGrid; }
//Zeilennummern usw malen
void RefreshExtraData( const SwRect & ) const;
@@ -235,13 +235,13 @@ public:
void RefreshSubsidiary( const SwRect& ) const;
//Fussnotenschnittstelle
- BOOL IsFtnPage() const { return bFtnPage; }
- BOOL IsEndNotePage() const { return bEndNotePage; }
- void SetFtnPage( BOOL b ) { bFtnPage = b; }
- void SetEndNotePage( BOOL b ) { bEndNotePage = b; }
+ sal_Bool IsFtnPage() const { return bFtnPage; }
+ sal_Bool IsEndNotePage() const { return bEndNotePage; }
+ void SetFtnPage( sal_Bool b ) { bFtnPage = b; }
+ void SetEndNotePage( sal_Bool b ) { bEndNotePage = b; }
- inline USHORT GetPhyPageNum() const { return nPhyPageNum;}
- inline void SetPhyPageNum( USHORT nNum ) { nPhyPageNum = nNum;}
+ inline sal_uInt16 GetPhyPageNum() const { return nPhyPageNum;}
+ inline void SetPhyPageNum( sal_uInt16 nNum ) { nPhyPageNum = nNum;}
inline void DecrPhyPageNum() { --nPhyPageNum; }
inline void IncrPhyPageNum() { ++nPhyPageNum; }
@@ -265,17 +265,17 @@ public:
inline void ValidateSmartTags() const; // SMARTTAGS
inline void ValidateAutoCompleteWords() const;
inline void ValidateWordCount() const;
- inline BOOL IsInvalid() const;
- inline BOOL IsInvalidFly() const;
- BOOL IsInvalidFlyLayout() const { return bInvalidFlyLayout; }
- BOOL IsInvalidFlyCntnt() const { return bInvalidFlyCntnt; }
- BOOL IsInvalidFlyInCnt() const { return bInvalidFlyInCnt; }
- BOOL IsInvalidLayout() const { return bInvalidLayout; }
- BOOL IsInvalidCntnt() const { return (bInvalidCntnt || bInvalidFlyInCnt); }
- BOOL IsInvalidSpelling() const { return bInvalidSpelling; }
- BOOL IsInvalidSmartTags() const { return bInvalidSmartTags; } // SMARTTAGS
- BOOL IsInvalidAutoCompleteWords() const { return bInvalidAutoCmplWrds; }
- BOOL IsInvalidWordCount() const { return bInvalidWordCount; }
+ inline sal_Bool IsInvalid() const;
+ inline sal_Bool IsInvalidFly() const;
+ sal_Bool IsInvalidFlyLayout() const { return bInvalidFlyLayout; }
+ sal_Bool IsInvalidFlyCntnt() const { return bInvalidFlyCntnt; }
+ sal_Bool IsInvalidFlyInCnt() const { return bInvalidFlyInCnt; }
+ sal_Bool IsInvalidLayout() const { return bInvalidLayout; }
+ sal_Bool IsInvalidCntnt() const { return (bInvalidCntnt || bInvalidFlyInCnt); }
+ sal_Bool IsInvalidSpelling() const { return bInvalidSpelling; }
+ sal_Bool IsInvalidSmartTags() const { return bInvalidSmartTags; } // SMARTTAGS
+ sal_Bool IsInvalidAutoCompleteWords() const { return bInvalidAutoCmplWrds; }
+ sal_Bool IsInvalidWordCount() const { return bInvalidWordCount; }
/** SwPageFrm::GetDrawBackgrdColor
@@ -355,7 +355,7 @@ public:
SwRect& _orBorderAndShadowBoundRect,
const bool bRightSidebar );
- static void PaintNotesSidebar(const SwRect& _rPageRect, ViewShell* _pViewShell, USHORT nPageNum, bool bRight);
+ static void PaintNotesSidebar(const SwRect& _rPageRect, ViewShell* _pViewShell, sal_uInt16 nPageNum, bool bRight);
static void PaintNotesSidebarArrows(const Point &aMiddleFirst, const Point &aMiddleSecond, ViewShell* _pViewShell, const Color aColorUp, const Color aColorDown);
/**
asks the page on which side a margin should be shown, e.g for notes
@@ -407,84 +407,84 @@ inline const SwCntntFrm *SwPageFrm::FindLastBodyCntnt() const
}
inline void SwPageFrm::InvalidateFlyLayout() const
{
- ((SwPageFrm*)this)->bInvalidFlyLayout = TRUE;
+ ((SwPageFrm*)this)->bInvalidFlyLayout = sal_True;
}
inline void SwPageFrm::InvalidateFlyCntnt() const
{
- ((SwPageFrm*)this)->bInvalidFlyCntnt = TRUE;
+ ((SwPageFrm*)this)->bInvalidFlyCntnt = sal_True;
}
inline void SwPageFrm::InvalidateFlyInCnt() const
{
- ((SwPageFrm*)this)->bInvalidFlyInCnt = TRUE;
+ ((SwPageFrm*)this)->bInvalidFlyInCnt = sal_True;
}
inline void SwPageFrm::InvalidateLayout() const
{
- ((SwPageFrm*)this)->bInvalidLayout = TRUE;
+ ((SwPageFrm*)this)->bInvalidLayout = sal_True;
}
inline void SwPageFrm::InvalidateCntnt() const
{
- ((SwPageFrm*)this)->bInvalidCntnt = TRUE;
+ ((SwPageFrm*)this)->bInvalidCntnt = sal_True;
}
inline void SwPageFrm::InvalidateSpelling() const
{
- ((SwPageFrm*)this)->bInvalidSpelling = TRUE;
+ ((SwPageFrm*)this)->bInvalidSpelling = sal_True;
}
// SMARTTAGS
inline void SwPageFrm::InvalidateSmartTags() const
{
- ((SwPageFrm*)this)->bInvalidSmartTags = TRUE;
+ ((SwPageFrm*)this)->bInvalidSmartTags = sal_True;
}
inline void SwPageFrm::InvalidateAutoCompleteWords() const
{
- ((SwPageFrm*)this)->bInvalidAutoCmplWrds = TRUE;
+ ((SwPageFrm*)this)->bInvalidAutoCmplWrds = sal_True;
}
inline void SwPageFrm::InvalidateWordCount() const
{
- ((SwPageFrm*)this)->bInvalidWordCount = TRUE;
+ ((SwPageFrm*)this)->bInvalidWordCount = sal_True;
}
inline void SwPageFrm::ValidateFlyLayout() const
{
- ((SwPageFrm*)this)->bInvalidFlyLayout = FALSE;
+ ((SwPageFrm*)this)->bInvalidFlyLayout = sal_False;
}
inline void SwPageFrm::ValidateFlyCntnt() const
{
- ((SwPageFrm*)this)->bInvalidFlyCntnt = FALSE;
+ ((SwPageFrm*)this)->bInvalidFlyCntnt = sal_False;
}
inline void SwPageFrm::ValidateFlyInCnt() const
{
- ((SwPageFrm*)this)->bInvalidFlyInCnt = FALSE;
+ ((SwPageFrm*)this)->bInvalidFlyInCnt = sal_False;
}
inline void SwPageFrm::ValidateLayout() const
{
- ((SwPageFrm*)this)->bInvalidLayout = FALSE;
+ ((SwPageFrm*)this)->bInvalidLayout = sal_False;
}
inline void SwPageFrm::ValidateCntnt() const
{
- ((SwPageFrm*)this)->bInvalidCntnt = FALSE;
+ ((SwPageFrm*)this)->bInvalidCntnt = sal_False;
}
inline void SwPageFrm::ValidateSpelling() const
{
- ((SwPageFrm*)this)->bInvalidSpelling = FALSE;
+ ((SwPageFrm*)this)->bInvalidSpelling = sal_False;
}
// SMARTTAGS
inline void SwPageFrm::ValidateSmartTags() const
{
- ((SwPageFrm*)this)->bInvalidSmartTags = FALSE;
+ ((SwPageFrm*)this)->bInvalidSmartTags = sal_False;
}
inline void SwPageFrm::ValidateAutoCompleteWords() const
{
- ((SwPageFrm*)this)->bInvalidAutoCmplWrds = FALSE;
+ ((SwPageFrm*)this)->bInvalidAutoCmplWrds = sal_False;
}
inline void SwPageFrm::ValidateWordCount() const
{
- ((SwPageFrm*)this)->bInvalidWordCount = FALSE;
+ ((SwPageFrm*)this)->bInvalidWordCount = sal_False;
}
-inline BOOL SwPageFrm::IsInvalid() const
+inline sal_Bool SwPageFrm::IsInvalid() const
{
return (bInvalidCntnt || bInvalidLayout || bInvalidFlyInCnt);
}
-inline BOOL SwPageFrm::IsInvalidFly() const
+inline sal_Bool SwPageFrm::IsInvalidFly() const
{
return bInvalidFlyLayout || bInvalidFlyCntnt;
}
diff --git a/sw/source/core/inc/pamtyp.hxx b/sw/source/core/inc/pamtyp.hxx
index 9b4367feb4b0..f124abaccf27 100644
--- a/sw/source/core/inc/pamtyp.hxx
+++ b/sw/source/core/inc/pamtyp.hxx
@@ -45,39 +45,39 @@ void GoStartDoc( SwPosition*);
void GoEndDoc( SwPosition*);
void GoStartSection( SwPosition*);
void GoEndSection( SwPosition*);
-BOOL GoInDoc( SwPaM&, SwMoveFn);
-BOOL GoInSection( SwPaM&, SwMoveFn);
-BOOL GoInNode( SwPaM&, SwMoveFn);
-BOOL GoInCntnt( SwPaM&, SwMoveFn);
-BOOL GoInCntntCells( SwPaM&, SwMoveFn);
-BOOL GoInCntntSkipHidden( SwPaM&, SwMoveFn);
-BOOL GoInCntntCellsSkipHidden( SwPaM&, SwMoveFn);
-const SwTxtAttr* GetFrwrdTxtHint( const SwpHints&, USHORT&, xub_StrLen );
-const SwTxtAttr* GetBkwrdTxtHint( const SwpHints&, USHORT&, xub_StrLen );
-
-BOOL GoNext(SwNode* pNd, SwIndex * pIdx, USHORT nMode );
-BOOL GoPrevious(SwNode* pNd, SwIndex * pIdx, USHORT nMode );
-SW_DLLPUBLIC SwCntntNode* GoNextNds( SwNodeIndex * pIdx, BOOL );
-SwCntntNode* GoPreviousNds( SwNodeIndex * pIdx, BOOL );
+sal_Bool GoInDoc( SwPaM&, SwMoveFn);
+sal_Bool GoInSection( SwPaM&, SwMoveFn);
+sal_Bool GoInNode( SwPaM&, SwMoveFn);
+sal_Bool GoInCntnt( SwPaM&, SwMoveFn);
+sal_Bool GoInCntntCells( SwPaM&, SwMoveFn);
+sal_Bool GoInCntntSkipHidden( SwPaM&, SwMoveFn);
+sal_Bool GoInCntntCellsSkipHidden( SwPaM&, SwMoveFn);
+const SwTxtAttr* GetFrwrdTxtHint( const SwpHints&, sal_uInt16&, xub_StrLen );
+const SwTxtAttr* GetBkwrdTxtHint( const SwpHints&, sal_uInt16&, xub_StrLen );
+
+sal_Bool GoNext(SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode );
+sal_Bool GoPrevious(SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode );
+SW_DLLPUBLIC SwCntntNode* GoNextNds( SwNodeIndex * pIdx, sal_Bool );
+SwCntntNode* GoPreviousNds( SwNodeIndex * pIdx, sal_Bool );
// --------- Funktionsdefinitionen fuer die SwCrsrShell --------------
-BOOL GoPrevPara( SwPaM&, SwPosPara);
-BOOL GoCurrPara( SwPaM&, SwPosPara);
-BOOL GoNextPara( SwPaM&, SwPosPara);
-BOOL GoPrevSection( SwPaM&, SwPosSection);
-BOOL GoCurrSection( SwPaM&, SwPosSection);
-BOOL GoNextSection( SwPaM&, SwPosSection);
+sal_Bool GoPrevPara( SwPaM&, SwPosPara);
+sal_Bool GoCurrPara( SwPaM&, SwPosPara);
+sal_Bool GoNextPara( SwPaM&, SwPosPara);
+sal_Bool GoPrevSection( SwPaM&, SwPosSection);
+sal_Bool GoCurrSection( SwPaM&, SwPosSection);
+sal_Bool GoNextSection( SwPaM&, SwPosSection);
// ------------ Typedefiniton fuer Funktionen ----------------------
-typedef BOOL (*GoNd)( SwNode*, SwIndex*, USHORT );
-typedef SwCntntNode* (*GoNds)( SwNodeIndex*, BOOL );
+typedef sal_Bool (*GoNd)( SwNode*, SwIndex*, sal_uInt16 );
+typedef SwCntntNode* (*GoNds)( SwNodeIndex*, sal_Bool );
typedef void (*GoDoc)( SwPosition* );
typedef void (*GoSection)( SwPosition* );
-typedef BOOL (SwPosition:: *CmpOp)( const SwPosition& ) const;
-typedef const SwTxtAttr* (*GetHint)( const SwpHints&, USHORT&, xub_StrLen );
+typedef sal_Bool (SwPosition:: *CmpOp)( const SwPosition& ) const;
+typedef const SwTxtAttr* (*GetHint)( const SwpHints&, sal_uInt16&, xub_StrLen );
typedef int (utl::TextSearch:: *SearchTxt)( const String&, xub_StrLen*,
xub_StrLen*, ::com::sun::star::util::SearchResult* );
typedef void (SwNodes:: *MvSection)( SwNodeIndex * ) const;
@@ -96,7 +96,7 @@ struct SwMoveFnCollection
};
// --------- Funktionsdefinitionen fuers Suchen --------------
-SwCntntNode* GetNode( SwPaM&, BOOL&, SwMoveFn, BOOL bInReadOnly = FALSE );
+SwCntntNode* GetNode( SwPaM&, sal_Bool&, SwMoveFn, sal_Bool bInReadOnly = sal_False );
diff --git a/sw/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx
index 5a40d1ce13bb..84f64e309d70 100644
--- a/sw/inc/rolbck.hxx
+++ b/sw/source/core/inc/rolbck.hxx
@@ -109,10 +109,10 @@ public:
class SwHistorySetFmt : public SwHistoryHint
{
::std::auto_ptr<SfxPoolItem> m_pAttr;
- const ULONG m_nNodeIndex;
+ const sal_uLong m_nNodeIndex;
public:
- SwHistorySetFmt( const SfxPoolItem* pFmtHt, ULONG nNode );
+ SwHistorySetFmt( const SfxPoolItem* pFmtHt, sal_uLong nNode );
virtual ~SwHistorySetFmt();
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
virtual String GetDescription() const;
@@ -121,11 +121,11 @@ public:
class SwHistoryResetFmt : public SwHistoryHint
{
- const ULONG m_nNodeIndex;
- const USHORT m_nWhich;
+ const sal_uLong m_nNodeIndex;
+ const sal_uInt16 m_nWhich;
public:
- SwHistoryResetFmt( const SfxPoolItem* pFmtHt, ULONG nNodeIdx );
+ SwHistoryResetFmt( const SfxPoolItem* pFmtHt, sal_uLong nNodeIdx );
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
};
@@ -133,12 +133,12 @@ public:
class SwHistorySetTxt : public SwHistoryHint
{
::std::auto_ptr<SfxPoolItem> m_pAttr;
- const ULONG m_nNodeIndex;
+ const sal_uLong m_nNodeIndex;
const xub_StrLen m_nStart;
const xub_StrLen m_nEnd;
public:
- SwHistorySetTxt( SwTxtAttr* pTxtHt, ULONG nNode );
+ SwHistorySetTxt( SwTxtAttr* pTxtHt, sal_uLong nNode );
virtual ~SwHistorySetTxt();
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
@@ -151,12 +151,12 @@ class SwHistorySetTxtFld : public SwHistoryHint
::std::auto_ptr<SwFieldType> m_pFldType;
const ::std::auto_ptr<SwFmtFld> m_pFld;
- ULONG m_nNodeIndex;
+ sal_uLong m_nNodeIndex;
xub_StrLen m_nPos;
- USHORT m_nFldWhich;
+ sal_uInt16 m_nFldWhich;
public:
- SwHistorySetTxtFld( SwTxtFld* pTxtFld, ULONG nNode );
+ SwHistorySetTxtFld( SwTxtFld* pTxtFld, sal_uLong nNode );
virtual ~SwHistorySetTxtFld();
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
@@ -167,12 +167,12 @@ public:
class SwHistorySetRefMark : public SwHistoryHint
{
const String m_RefName;
- const ULONG m_nNodeIndex;
+ const sal_uLong m_nNodeIndex;
const xub_StrLen m_nStart;
const xub_StrLen m_nEnd;
public:
- SwHistorySetRefMark( SwTxtRefMark* pTxtHt, ULONG nNode );
+ SwHistorySetRefMark( SwTxtRefMark* pTxtHt, sal_uLong nNode );
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
};
@@ -182,12 +182,12 @@ class SwHistorySetTOXMark : public SwHistoryHint
SwTOXMark m_TOXMark;
const String m_TOXName;
const TOXTypes m_eTOXTypes;
- const ULONG m_nNodeIndex;
+ const sal_uLong m_nNodeIndex;
const xub_StrLen m_nStart;
const xub_StrLen m_nEnd;
public:
- SwHistorySetTOXMark( SwTxtTOXMark* pTxtHt, ULONG nNode );
+ SwHistorySetTOXMark( SwTxtTOXMark* pTxtHt, sal_uLong nNode );
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
int IsEqual( const SwTOXMark& rCmp ) const;
@@ -195,18 +195,18 @@ public:
class SwHistoryResetTxt : public SwHistoryHint
{
- const ULONG m_nNodeIndex;
+ const sal_uLong m_nNodeIndex;
const xub_StrLen m_nStart;
const xub_StrLen m_nEnd;
- const USHORT m_nAttr;
+ const sal_uInt16 m_nAttr;
public:
- SwHistoryResetTxt( USHORT nWhich, xub_StrLen nStt, xub_StrLen nEnd,
- ULONG nNode );
+ SwHistoryResetTxt( sal_uInt16 nWhich, xub_StrLen nStt, xub_StrLen nEnd,
+ sal_uLong nNode );
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
- USHORT GetWhich() const { return m_nAttr; }
- ULONG GetNode() const { return m_nNodeIndex; }
+ sal_uInt16 GetWhich() const { return m_nAttr; }
+ sal_uLong GetNode() const { return m_nNodeIndex; }
xub_StrLen GetCntnt() const { return m_nStart; }
};
@@ -215,12 +215,12 @@ class SwHistorySetFootnote : public SwHistoryHint
{
const ::std::auto_ptr<SwUndoSaveSection> m_pUndo;
const String m_FootnoteNumber;
- ULONG m_nNodeIndex;
+ sal_uLong m_nNodeIndex;
const xub_StrLen m_nStart;
const bool m_bEndNote;
public:
- SwHistorySetFootnote( SwTxtFtn* pTxtFtn, ULONG nNode );
+ SwHistorySetFootnote( SwTxtFtn* pTxtFtn, sal_uLong nNode );
SwHistorySetFootnote( const SwTxtFtn& );
virtual ~SwHistorySetFootnote();
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
@@ -232,11 +232,11 @@ public:
class SwHistoryChangeFmtColl : public SwHistoryHint
{
SwFmtColl * const m_pColl;
- const ULONG m_nNodeIndex;
- const BYTE m_nNodeType;
+ const sal_uLong m_nNodeIndex;
+ const sal_uInt8 m_nNodeType;
public:
- SwHistoryChangeFmtColl( SwFmtColl* pColl, ULONG nNode, BYTE nNodeWhich );
+ SwHistoryChangeFmtColl( SwFmtColl* pColl, sal_uLong nNode, sal_uInt8 nNodeWhich );
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
};
@@ -267,8 +267,8 @@ class SwHistoryBookmark : public SwHistoryHint
const ::rtl::OUString m_aName;
::rtl::OUString m_aShortName;
KeyCode m_aKeycode;
- const ULONG m_nNode;
- const ULONG m_nOtherNode;
+ const sal_uLong m_nNode;
+ const sal_uLong m_nOtherNode;
const xub_StrLen m_nCntnt;
const xub_StrLen m_nOtherCntnt;
const bool m_bSavePos;
@@ -282,10 +282,10 @@ class SwHistorySetAttrSet : public SwHistoryHint
{
SfxItemSet m_OldSet;
SvUShorts m_ResetArray;
- const ULONG m_nNodeIndex;
+ const sal_uLong m_nNodeIndex;
public:
- SwHistorySetAttrSet( const SfxItemSet& rSet, ULONG nNode,
+ SwHistorySetAttrSet( const SfxItemSet& rSet, sal_uLong nNode,
const SvUShortsSort& rSetArr );
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
@@ -293,19 +293,19 @@ public:
class SwHistoryResetAttrSet : public SwHistoryHint
{
- const ULONG m_nNodeIndex;
+ const sal_uLong m_nNodeIndex;
const xub_StrLen m_nStart;
const xub_StrLen m_nEnd;
SvUShorts m_Array;
public:
- SwHistoryResetAttrSet( const SfxItemSet& rSet, ULONG nNode,
+ SwHistoryResetAttrSet( const SfxItemSet& rSet, sal_uLong nNode,
xub_StrLen nStt = STRING_MAXLEN,
xub_StrLen nEnd = STRING_MAXLEN );
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
const SvUShorts& GetArr() const { return m_Array; }
- ULONG GetNode() const { return m_nNodeIndex; }
+ sal_uLong GetNode() const { return m_nNodeIndex; }
xub_StrLen GetCntnt() const { return m_nStart; }
};
@@ -313,7 +313,7 @@ public:
class SwHistoryChangeFlyAnchor : public SwHistoryHint
{
SwFrmFmt & m_rFmt;
- const ULONG m_nOldNodeIndex;
+ const sal_uLong m_nOldNodeIndex;
const xub_StrLen m_nOldContentIndex;
public:
@@ -355,39 +355,39 @@ class SwHistory
friend class SwRegHistory; // for inserting History attributes
SwpHstry m_SwpHstry;
- USHORT m_nEndDiff;
+ sal_uInt16 m_nEndDiff;
public:
- SwHistory( USHORT nInitSz = 0, USHORT nGrowSz = 2 );
+ SwHistory( sal_uInt16 nInitSz = 0, sal_uInt16 nGrowSz = 2 );
~SwHistory();
// delete History from nStart to array end
- void Delete( USHORT nStart = 0 );
+ void Delete( sal_uInt16 nStart = 0 );
// call and delete all objects between nStart and array end
- bool Rollback( SwDoc* pDoc, USHORT nStart = 0 );
+ bool Rollback( SwDoc* pDoc, sal_uInt16 nStart = 0 );
// call all objects between nStart and TmpEnd; store nStart as TmpEnd
- bool TmpRollback( SwDoc* pDoc, USHORT nStart, bool ToFirst = true );
+ bool TmpRollback( SwDoc* pDoc, sal_uInt16 nStart, bool ToFirst = true );
void Add( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue,
- ULONG nNodeIdx );
- void Add( SwTxtAttr* pTxtHt, ULONG nNodeIdx, bool bNewAttr = true );
- void Add( SwFmtColl*, ULONG nNodeIdx, BYTE nWhichNd );
+ sal_uLong nNodeIdx );
+ void Add( SwTxtAttr* pTxtHt, sal_uLong nNodeIdx, bool bNewAttr = true );
+ void Add( SwFmtColl*, sal_uLong nNodeIdx, sal_uInt8 nWhichNd );
void Add( const ::sw::mark::IMark&, bool bSavePos, bool bSaveOtherPos );
void Add( SwFrmFmt& rFmt );
- void Add( SwFlyFrmFmt&, USHORT& rSetPos );
+ void Add( SwFlyFrmFmt&, sal_uInt16& rSetPos );
void Add( const SwTxtFtn& );
void Add( const SfxItemSet & rSet, const SwCharFmt & rCharFmt);
- USHORT Count() const { return m_SwpHstry.Count(); }
- USHORT GetTmpEnd() const { return m_SwpHstry.Count() - m_nEndDiff; }
- USHORT SetTmpEnd( USHORT nTmpEnd ); // return previous value
- SwHistoryHint * operator[]( USHORT nPos ) { return m_SwpHstry[nPos]; }
- SwHistoryHint const* operator[]( USHORT nPos ) const
+ sal_uInt16 Count() const { return m_SwpHstry.Count(); }
+ sal_uInt16 GetTmpEnd() const { return m_SwpHstry.Count() - m_nEndDiff; }
+ sal_uInt16 SetTmpEnd( sal_uInt16 nTmpEnd ); // return previous value
+ SwHistoryHint * operator[]( sal_uInt16 nPos ) { return m_SwpHstry[nPos]; }
+ SwHistoryHint const* operator[]( sal_uInt16 nPos ) const
{ return m_SwpHstry[nPos]; }
// for SwUndoDelete::Undo/Redo
- void Move( USHORT nPos, SwHistory *pIns,
- USHORT nStart = 0, USHORT nEnd = USHRT_MAX )
+ void Move( sal_uInt16 nPos, SwHistory *pIns,
+ sal_uInt16 nStart = 0, sal_uInt16 nEnd = USHRT_MAX )
{
m_SwpHstry.Insert( &pIns->m_SwpHstry, nPos, nStart, nEnd );
pIns->m_SwpHstry.Remove( nStart, (nEnd == USHRT_MAX)
@@ -397,9 +397,9 @@ public:
// helper methods for recording attribute in History
// used by Undo classes (Delete/Overwrite/Inserts)
- void CopyAttr( SwpHints* pHts, ULONG nNodeIdx, xub_StrLen nStart,
+ void CopyAttr( SwpHints* pHts, sal_uLong nNodeIdx, xub_StrLen nStart,
xub_StrLen nEnd, bool bFields );
- void CopyFmtAttr( const SfxItemSet& rSet, ULONG nNodeIdx );
+ void CopyFmtAttr( const SfxItemSet& rSet, sal_uLong nNodeIdx );
};
#ifndef ROLBCK_HISTORY_ONLY
@@ -409,7 +409,7 @@ class SwRegHistory : public SwClient
private:
SvUShortsSort m_WhichIdSet;
SwHistory * const m_pHistory;
- ULONG m_nNodeIndex;
+ sal_uLong m_nNodeIndex;
void _MakeSetWhichIds();
@@ -429,7 +429,7 @@ public:
void AddHint( SwTxtAttr* pHt, const bool bNew = false );
void RegisterInModify( SwModify* pRegIn, const SwNode& rNd );
- void ChangeNodeIndex( ULONG nNew ) { m_nNodeIndex = nNew; }
+ void ChangeNodeIndex( sal_uLong nNew ) { m_nNodeIndex = nNew; }
};
#endif
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index 8fff29693d6a..ac404df62b35 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -25,8 +25,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _ROOTFRM_HXX
-#define _ROOTFRM_HXX
+#ifndef SW_ROOTFRM_HXX
+#define SW_ROOTFRM_HXX
+
#include "layfrm.hxx"
class SwCntntFrm;
@@ -79,7 +80,7 @@ class SwRootFrm: public SwLayoutFrm
// for pages located at the outer borders
SwRect maPagesArea; // the area covered by the pages
long mnViewWidth; // the current page layout bases on this view width
- USHORT mnColumns; // the current page layout bases on this number of columns
+ sal_uInt16 mnColumns; // the current page layout bases on this number of columns
bool mbBookMode; // the current page layout is in book view
bool mbSidebarChanged; // the notes sidebar state has changed
// <--
@@ -87,19 +88,19 @@ class SwRootFrm: public SwLayoutFrm
bool mbNeedGrammarCheck; // true when sth needs to be checked (not necessarily started yet!)
static SwLayVout *pVout;
- static BOOL bInPaint; //Schutz gegen doppelte Paints.
- static BOOL bNoVirDev; //Bei SystemPaints kein virt. Device
-
- BOOL bCheckSuperfluous :1; //Leere Seiten suchen?
- BOOL bIdleFormat :1; //Idle-Formatierer anwerfen?
- BOOL bBrowseWidthValid :1; //Ist nBrowseWidth gueltig?
- BOOL bDummy2 :1; //Unbenutzt
- BOOL bTurboAllowed :1;
- BOOL bAssertFlyPages :1; //Ggf. weitere Seiten fuer Flys einfuegen?
- BOOL bDummy :1; //Unbenutzt
- BOOL bIsVirtPageNum :1; //gibt es eine virtuelle Seitennummer ?
- BOOL bIsNewLayout :1; //Layout geladen oder neu erzeugt.
- BOOL bCallbackActionEnabled:1; //Keine Action in Benachrichtung erwuenscht
+ static sal_Bool bInPaint; //Schutz gegen doppelte Paints.
+ static sal_Bool bNoVirDev; //Bei SystemPaints kein virt. Device
+
+ sal_Bool bCheckSuperfluous :1; //Leere Seiten suchen?
+ sal_Bool bIdleFormat :1; //Idle-Formatierer anwerfen?
+ sal_Bool bBrowseWidthValid :1; //Ist nBrowseWidth gueltig?
+ sal_Bool bDummy2 :1; //Unbenutzt
+ sal_Bool bTurboAllowed :1;
+ sal_Bool bAssertFlyPages :1; //Ggf. weitere Seiten fuer Flys einfuegen?
+ sal_Bool bDummy :1; //Unbenutzt
+ sal_Bool bIsVirtPageNum :1; //gibt es eine virtuelle Seitennummer ?
+ sal_Bool bIsNewLayout :1; //Layout geladen oder neu erzeugt.
+ sal_Bool bCallbackActionEnabled:1; //Keine Action in Benachrichtung erwuenscht
//siehe dcontact.cxx, ::Changed()
//Fuer den BrowseMode. nBrowseWidth ist die Aeussere Kante des am weitesten
@@ -148,7 +149,7 @@ class SwRootFrm: public SwLayoutFrm
SwDestroyList* pDestroy;
- USHORT nPhyPageNums; //Anzahl der Seiten.
+ sal_uInt16 nPhyPageNums; //Anzahl der Seiten.
sal_uInt16 nAccessibleShells; // Number of accessible shells
void ImplCalcBrowseWidth();
@@ -167,9 +168,9 @@ public:
static void RemoveMasterObjs( SdrPage *pPg );
//Virtuelles Device ausgeben (z.B. wenn Animationen ins Spiel kommen)
- static BOOL FlushVout();
+ static sal_Bool FlushVout();
//Clipping sparen, wenn im Vout eh genau das Cliprechteck ausgegeben wird
- static BOOL HasSameRect( const SwRect& rRect );
+ static sal_Bool HasSameRect( const SwRect& rRect );
SwRootFrm( SwFrmFmt*, ViewShell* );
~SwRootFrm();
@@ -183,7 +184,7 @@ public:
//Der ChangeLinkd der CrsrShell (UI-Benachrichtigung) wird im EndAllAction
//automatisch gecallt.
void StartAllAction();
- void EndAllAction( BOOL bVirDev = FALSE );
+ void EndAllAction( sal_Bool bVirDev = sal_False );
// fuer bestimmte UNO-Aktionen (Tabellencursor) ist es notwendig, dass alle Actions
// kurzfristig zurueckgesetzt werden. Dazu muss sich jede ViewShell ihren alten Action-zaehler
@@ -195,12 +196,13 @@ public:
SdrPage* GetDrawPage() { return pDrawPage; }
void SetDrawPage( SdrPage* pNew ){ pDrawPage = pNew; }
- virtual BOOL GetCrsrOfst( SwPosition *, Point&,
+ virtual sal_Bool GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0 ) const;
- virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
- virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
- virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
+ virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
+ virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
#if OSL_DEBUG_LEVEL > 1
virtual void Cut();
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 );
@@ -208,28 +210,28 @@ public:
virtual bool FillSelection( SwSelectionList& rList, const SwRect& rRect ) const;
- Point GetNextPrevCntntPos( const Point &rPoint, BOOL bNext ) const;
+ Point GetNextPrevCntntPos( const Point &rPoint, sal_Bool bNext ) const;
virtual Size ChgSize( const Size& aNewSize );
- void SetIdleFlags() { bIdleFormat = TRUE; }
- BOOL IsIdleFormat() const { return bIdleFormat; }
- void ResetIdleFormat() { bIdleFormat = FALSE; }
+ void SetIdleFlags() { bIdleFormat = sal_True; }
+ sal_Bool IsIdleFormat() const { return bIdleFormat; }
+ void ResetIdleFormat() { bIdleFormat = sal_False; }
bool IsNeedGrammarCheck() const { return mbNeedGrammarCheck; }
void SetNeedGrammarCheck( bool bVal ) { mbNeedGrammarCheck = bVal; }
//Sorgt dafuer, dass alle gewuenschten Seitengebunden Flys eine Seite finden
- void SetAssertFlyPages() { bAssertFlyPages = TRUE; }
+ void SetAssertFlyPages() { bAssertFlyPages = sal_True; }
void AssertFlyPages();
- BOOL IsAssertFlyPages() { return bAssertFlyPages; }
+ sal_Bool IsAssertFlyPages() { return bAssertFlyPages; }
//Stellt sicher, dass ab der uebergebenen Seite auf allen Seiten die
//Seitengebundenen Rahmen auf der richtigen Seite (Seitennummer) stehen.
void AssertPageFlys( SwPageFrm * );
//Saemtlichen Inhalt invalidieren, Size oder PrtArea
- void InvalidateAllCntnt( BYTE nInvalidate = INV_SIZE );
+ void InvalidateAllCntnt( sal_uInt8 nInvalidate = INV_SIZE );
/** method to invalidate/re-calculate the position of all floating
screen objects (Writer fly frames and drawing objects), which are
@@ -242,21 +244,21 @@ public:
void InvalidateAllObjPos();
//Ueberfluessige Seiten entfernen.
- void SetSuperfluous() { bCheckSuperfluous = TRUE; }
- BOOL IsSuperfluous() const { return bCheckSuperfluous; }
+ void SetSuperfluous() { bCheckSuperfluous = sal_True; }
+ sal_Bool IsSuperfluous() const { return bCheckSuperfluous; }
void RemoveSuperfluous();
//abfragen/setzen der aktuellen Seite und der Gesamtzahl der Seiten.
//Es wird soweit wie notwendig Formatiert.
- USHORT GetCurrPage( const SwPaM* ) const;
- USHORT SetCurrPage( SwCursor*, USHORT nPageNum );
- Point GetPagePos( USHORT nPageNum ) const;
- USHORT GetPageNum() const { return nPhyPageNums; }
+ sal_uInt16 GetCurrPage( const SwPaM* ) const;
+ sal_uInt16 SetCurrPage( SwCursor*, sal_uInt16 nPageNum );
+ Point GetPagePos( sal_uInt16 nPageNum ) const;
+ sal_uInt16 GetPageNum() const { return nPhyPageNums; }
void DecrPhyPageNums() { --nPhyPageNums; }
void IncrPhyPageNums() { ++nPhyPageNums; }
- BOOL IsVirtPageNum() const { return bIsVirtPageNum; }
- inline void SetVirtPageNum( const BOOL bOf ) const;
- BOOL IsDummyPage( USHORT nPageNum ) const;
+ sal_Bool IsVirtPageNum() const { return bIsVirtPageNum; }
+ inline void SetVirtPageNum( const sal_Bool bOf ) const;
+ sal_Bool IsDummyPage( sal_uInt16 nPageNum ) const;
// Point rPt: The point that should be used to find the page
// Size pSize: If given, we return the (first) page that overlaps with the
@@ -266,16 +268,16 @@ public:
const SwPageFrm* GetPageAtPos( const Point& rPt, const Size* pSize = 0, bool bExtend = false ) const;
//Der Crsr moechte die zu selektierenden Bereiche wissen.
- void CalcFrmRects( SwShellCrsr&, BOOL bIsTblSel );
+ void CalcFrmRects( SwShellCrsr&, sal_Bool bIsTblSel );
// Calculates the cells included from the current selection
// false: There was no result because of an invalid layout
// true: Everything worked fine.
bool MakeTblCrsrs( SwTableCursor& );
- void DisallowTurbo() const { ((SwRootFrm*)this)->bTurboAllowed = FALSE; }
- void ResetTurboFlag() const { ((SwRootFrm*)this)->bTurboAllowed = TRUE; }
- BOOL IsTurboAllowed() const { return bTurboAllowed; }
+ void DisallowTurbo() const { ((SwRootFrm*)this)->bTurboAllowed = sal_False; }
+ void ResetTurboFlag() const { ((SwRootFrm*)this)->bTurboAllowed = sal_True; }
+ sal_Bool IsTurboAllowed() const { return bTurboAllowed; }
void SetTurbo( const SwCntntFrm *pCntnt ) { pTurbo = pCntnt; }
void ResetTurbo() { pTurbo = 0; }
const SwCntntFrm *GetTurbo() { return pTurbo; }
@@ -284,23 +286,23 @@ public:
void UpdateFtnNums(); //nur bei Seitenweiser Nummerierung!
//Alle Fussnoten (nicht etwa die Referenzen) entfernen.
- void RemoveFtns( SwPageFrm *pPage = 0, BOOL bPageOnly = FALSE,
- BOOL bEndNotes = FALSE );
- void CheckFtnPageDescs( BOOL bEndNote );
+ void RemoveFtns( SwPageFrm *pPage = 0, sal_Bool bPageOnly = sal_False,
+ sal_Bool bEndNotes = sal_False );
+ void CheckFtnPageDescs( sal_Bool bEndNote );
const SwPageFrm *GetLastPage() const { return pLastPage; }
SwPageFrm *GetLastPage() { return pLastPage; }
- static BOOL IsInPaint() { return bInPaint; }
+ static sal_Bool IsInPaint() { return bInPaint; }
- static void SetNoVirDev( const BOOL bNew ) { bNoVirDev = bNew; }
+ static void SetNoVirDev( const sal_Bool bNew ) { bNoVirDev = bNew; }
inline long GetBrowseWidth() const;
- void SetBrowseWidth( long n ) { bBrowseWidthValid = TRUE; nBrowseWidth = n;}
+ void SetBrowseWidth( long n ) { bBrowseWidthValid = sal_True; nBrowseWidth = n;}
inline void InvalidateBrowseWidth();
- BOOL IsNewLayout() const { return bIsNewLayout; }
- void ResetNewLayout() { bIsNewLayout = FALSE;}
+ sal_Bool IsNewLayout() const { return bIsNewLayout; }
+ void ResetNewLayout() { bIsNewLayout = sal_False;}
// Hier werden leere SwSectionFrms zur Zerstoerung angemeldet
// und spaeter zerstoert oder wieder abgemeldet
@@ -309,12 +311,12 @@ public:
void RemoveFromList( SwSectionFrm* pSct ) { if( pDestroy ) _RemoveFromList( pSct ); }
#if OSL_DEBUG_LEVEL > 1
// Wird zur Zeit nur fuer OSL_ENSURE( benutzt:
- BOOL IsInDelList( SwSectionFrm* pSct ) const; // Ist der SectionFrm in der Liste enthalten?
+ sal_Bool IsInDelList( SwSectionFrm* pSct ) const; // Ist der SectionFrm in der Liste enthalten?
#endif
- void SetCallbackActionEnabled( BOOL b ) { bCallbackActionEnabled = b; }
- BOOL IsCallbackActionEnabled() const { return bCallbackActionEnabled; }
+ void SetCallbackActionEnabled( sal_Bool b ) { bCallbackActionEnabled = b; }
+ sal_Bool IsCallbackActionEnabled() const { return bCallbackActionEnabled; }
sal_Bool IsAnyShellAccessible() const { return nAccessibleShells > 0; }
void AddAccessibleShell() { ++nAccessibleShells; }
@@ -357,11 +359,11 @@ inline void SwRootFrm::InvalidateBrowseWidth()
ImplInvalidateBrowseWidth();
}
-inline void SwRootFrm::SetVirtPageNum( const BOOL bOf) const
+inline void SwRootFrm::SetVirtPageNum( const sal_Bool bOf) const
{
((SwRootFrm*)this)->bIsVirtPageNum = bOf;
}
-#endif //_ROOTFRM_HXX
+#endif // SW_ROOTFRM_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/rowfrm.hxx b/sw/source/core/inc/rowfrm.hxx
index 659e3ee6c28d..8055ce869a10 100644
--- a/sw/source/core/inc/rowfrm.hxx
+++ b/sw/source/core/inc/rowfrm.hxx
@@ -39,15 +39,15 @@ class SwRowFrm: public SwLayoutFrm
{
virtual void Format( const SwBorderAttrs *pAttrs = 0 );
//Aendern nur die Framesize, nicht die PrtArea-SSize
- virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
- virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
+ virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
+ virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
const SwTableLine *pTabLine;
SwRowFrm* pFollowRow;
// --> collapsing borders FME 2005-05-27 #i29550#
- USHORT mnTopMarginForLowers;
- USHORT mnBottomMarginForLowers;
- USHORT mnBottomLineSize;
+ sal_uInt16 mnTopMarginForLowers;
+ sal_uInt16 mnBottomMarginForLowers;
+ sal_uInt16 mnBottomLineSize;
// <-- collapsing
bool bIsFollowFlowRow;
bool bIsRepeatedHeadline;
@@ -73,7 +73,7 @@ public:
//Passt die Zellen auf die aktuelle Hoehe an, invalidiert die Zellen
//wenn die Direction nicht der Hoehe entspricht.
- void AdjustCells( const SwTwips nHeight, const BOOL bHeight );
+ void AdjustCells( const SwTwips nHeight, const sal_Bool bHeight );
//
//
@@ -81,12 +81,12 @@ public:
void SetFollowRow( SwRowFrm* pNew ) { pFollowRow = pNew; }
// --> collapsing borders FME 2005-05-27 #i29550#
- USHORT GetTopMarginForLowers() const { return mnTopMarginForLowers; }
- void SetTopMarginForLowers( USHORT nNew ) { mnTopMarginForLowers = nNew; }
- USHORT GetBottomMarginForLowers() const { return mnBottomMarginForLowers; }
- void SetBottomMarginForLowers( USHORT nNew ) { mnBottomMarginForLowers = nNew; }
- USHORT GetBottomLineSize() const { return mnBottomLineSize; }
- void SetBottomLineSize( USHORT nNew ) { mnBottomLineSize = nNew; }
+ sal_uInt16 GetTopMarginForLowers() const { return mnTopMarginForLowers; }
+ void SetTopMarginForLowers( sal_uInt16 nNew ) { mnTopMarginForLowers = nNew; }
+ sal_uInt16 GetBottomMarginForLowers() const { return mnBottomMarginForLowers; }
+ void SetBottomMarginForLowers( sal_uInt16 nNew ) { mnBottomMarginForLowers = nNew; }
+ sal_uInt16 GetBottomLineSize() const { return mnBottomLineSize; }
+ void SetBottomLineSize( sal_uInt16 nNew ) { mnBottomLineSize = nNew; }
// <-- collapsing
bool IsRepeatedHeadline() const { return bIsRepeatedHeadline; }
diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx
index 433ce855939e..d814bc089666 100644
--- a/sw/source/core/inc/scriptinfo.hxx
+++ b/sw/source/core/inc/scriptinfo.hxx
@@ -63,20 +63,20 @@ class SwScanner
xub_StrLen nBegin;
xub_StrLen nLen;
LanguageType aCurrLang;
- USHORT nWordType;
- BOOL bClip;
+ sal_uInt16 nWordType;
+ sal_Bool bClip;
public:
SwScanner( const SwTxtNode& rNd, const String& rTxt, const LanguageType* pLang,
const ModelToViewHelper::ConversionMap* pConvMap,
- USHORT nWordType,
- xub_StrLen nStart, xub_StrLen nEnde, BOOL bClip = FALSE );
+ sal_uInt16 nWordType,
+ xub_StrLen nStart, xub_StrLen nEnde, sal_Bool bClip = sal_False );
// This next word function tries to find the language for the next word
// It should currently _not_ be used for spell checking, and works only for
// ! bReverse
- BOOL NextWord();
+ sal_Bool NextWord();
const XubString& GetWord() const { return aWord; }
@@ -100,8 +100,8 @@ private:
struct ScriptChangeInfo
{
xub_StrLen position; //!< Character position at which we change script
- BYTE type; //!< Script type (Latin/Asian/Complex) that we change to.
- inline ScriptChangeInfo(xub_StrLen pos, BYTE typ) : position(pos), type(typ) {};
+ sal_uInt8 type; //!< Script type (Latin/Asian/Complex) that we change to.
+ inline ScriptChangeInfo(xub_StrLen pos, sal_uInt8 typ) : position(pos), type(typ) {};
};
//TODO - This is sorted, so should probably be a std::set rather than vector.
// But we also use random access (probably unnecessarily).
@@ -110,8 +110,8 @@ private:
struct DirectionChangeInfo
{
xub_StrLen position; //!< Character position at which we change direction.
- BYTE type; //!< Direction that we change to.
- inline DirectionChangeInfo(xub_StrLen pos, BYTE typ) : position(pos), type(typ) {};
+ sal_uInt8 type; //!< Direction that we change to.
+ inline DirectionChangeInfo(xub_StrLen pos, sal_uInt8 typ) : position(pos), type(typ) {};
};
std::vector<DirectionChangeInfo> aDirectionChanges;
SvXub_StrLens aKashida;
@@ -124,12 +124,12 @@ private:
{
xub_StrLen position; //!< Character position where the change occurs.
xub_StrLen length; //!< Length of the segment.
- BYTE type; //!< Type of compression that we change to.
- inline CompressionChangeInfo(xub_StrLen pos, xub_StrLen len, BYTE typ) : position(pos), length(len), type(typ) {};
+ sal_uInt8 type; //!< Type of compression that we change to.
+ inline CompressionChangeInfo(xub_StrLen pos, xub_StrLen len, sal_uInt8 typ) : position(pos), length(len), type(typ) {};
};
std::vector<CompressionChangeInfo> aCompressionChanges;
xub_StrLen nInvalidityPos;
- BYTE nDefaultDir;
+ sal_uInt8 nDefaultDir;
void UpdateBidiInfo( const String& rTxt );
@@ -154,44 +154,44 @@ public:
inline xub_StrLen GetInvalidity() const { return nInvalidityPos; };
// get default direction for paragraph
- inline BYTE GetDefaultDir() const { return nDefaultDir; };
+ inline sal_uInt8 GetDefaultDir() const { return nDefaultDir; };
// array operations, nCnt refers to array position
- inline USHORT CountScriptChg() const;
- inline xub_StrLen GetScriptChg( const USHORT nCnt ) const;
- inline BYTE GetScriptType( const USHORT nCnt ) const;
+ inline size_t CountScriptChg() const;
+ inline xub_StrLen GetScriptChg( const size_t nCnt ) const;
+ inline sal_uInt8 GetScriptType( const sal_uInt16 nCnt ) const;
- inline USHORT CountDirChg() const;
- inline xub_StrLen GetDirChg( const USHORT nCnt ) const;
- inline BYTE GetDirType( const USHORT nCnt ) const;
+ inline size_t CountDirChg() const;
+ inline xub_StrLen GetDirChg( const size_t nCnt ) const;
+ inline sal_uInt8 GetDirType( const size_t nCnt ) const;
- inline USHORT CountKashida() const;
- inline xub_StrLen GetKashida( const USHORT nCnt ) const;
+ inline size_t CountKashida() const;
+ inline xub_StrLen GetKashida( const size_t nCnt ) const;
- inline USHORT CountCompChg() const;
- inline xub_StrLen GetCompStart( const USHORT nCnt ) const;
- inline xub_StrLen GetCompLen( const USHORT nCnt ) const;
- inline BYTE GetCompType( const USHORT nCnt ) const;
+ inline size_t CountCompChg() const;
+ inline xub_StrLen GetCompStart( const size_t nCnt ) const;
+ inline xub_StrLen GetCompLen( const size_t nCnt ) const;
+ inline sal_uInt8 GetCompType( const size_t nCnt ) const;
- inline USHORT CountHiddenChg() const;
- inline xub_StrLen GetHiddenChg( const USHORT nCnt ) const;
+ inline size_t CountHiddenChg() const;
+ inline xub_StrLen GetHiddenChg( const size_t nCnt ) const;
static void CalcHiddenRanges( const SwTxtNode& rNode,
MultiSelection& rHiddenMulti );
// "high" level operations, nPos refers to string position
xub_StrLen NextScriptChg( const xub_StrLen nPos ) const;
- BYTE ScriptType( const xub_StrLen nPos ) const;
+ sal_uInt8 ScriptType( const xub_StrLen nPos ) const;
// Returns the position of the next direction level change.
// If bLevel is set, the position of the next level which is smaller
// than the level at position nPos is returned. This is required to
// obtain the end of a SwBidiPortion
xub_StrLen NextDirChg( const xub_StrLen nPos,
- const BYTE* pLevel = 0 ) const;
- BYTE DirType( const xub_StrLen nPos ) const;
+ const sal_uInt8* pLevel = 0 ) const;
+ sal_uInt8 DirType( const xub_StrLen nPos ) const;
#if OSL_DEBUG_LEVEL > 1
- BYTE CompType( const xub_StrLen nPos ) const;
+ sal_uInt8 CompType( const xub_StrLen nPos ) const;
#endif
//
@@ -244,7 +244,7 @@ public:
@param bDel
If set, the hidden ranges will be deleted from the text node.
*/
- static USHORT MaskHiddenRanges( const SwTxtNode& rNode, XubString& rText,
+ static sal_uInt16 MaskHiddenRanges( const SwTxtNode& rNode, XubString& rText,
const xub_StrLen nStt, const xub_StrLen nEnd,
const xub_Unicode cChar );
@@ -263,11 +263,11 @@ public:
// examines the range [ nStart, nStart + nEnd ] if there are kanas
// returns start index of kana entry in array, otherwise USHRT_MAX
- USHORT HasKana( xub_StrLen nStart, const xub_StrLen nEnd ) const;
+ sal_uInt16 HasKana( xub_StrLen nStart, const xub_StrLen nEnd ) const;
// modifies the kerning array according to a given compress value
long Compress( sal_Int32* pKernArray, xub_StrLen nIdx, xub_StrLen nLen,
- const USHORT nCompress, const USHORT nFontHeight,
+ const sal_uInt16 nCompress, const sal_uInt16 nFontHeight,
Point* pPoint = NULL ) const;
/** Performes a kashida justification on the kerning array
@@ -286,7 +286,7 @@ public:
The value which has to be added to a kashida opportunity.
@return The number of kashida opportunities in the given range
*/
- USHORT KashidaJustify( sal_Int32* pKernArray, sal_Int32* pScrArray,
+ sal_uInt16 KashidaJustify( sal_Int32* pKernArray, sal_Int32* pScrArray,
xub_StrLen nStt, xub_StrLen nLen,
long nSpaceAdd = 0) const;
@@ -311,7 +311,7 @@ public:
pKashidaPositions: buffer to reveive the char indices of the
kashida opportunties relative to the paragraph
*/
- USHORT GetKashidaPositions ( xub_StrLen nStt, xub_StrLen nLen,
+ sal_uInt16 GetKashidaPositions ( xub_StrLen nStt, xub_StrLen nLen,
xub_StrLen* pKashidaPosition );
@@ -358,7 +358,7 @@ public:
The value which has to be added to the cells.
@return The number of extra spaces in the given range
*/
- static USHORT ThaiJustify( const XubString& rTxt, sal_Int32* pKernArray,
+ static sal_uInt16 ThaiJustify( const XubString& rTxt, sal_Int32* pKernArray,
sal_Int32* pScrArray, xub_StrLen nIdx,
xub_StrLen nLen, xub_StrLen nNumberOfBlanks = 0,
long nSpaceAdd = 0 );
@@ -366,7 +366,7 @@ public:
static SwScriptInfo* GetScriptInfo( const SwTxtNode& rNode,
sal_Bool bAllowInvalid = sal_False );
- static BYTE WhichFont( xub_StrLen nIdx, const String* pTxt, const SwScriptInfo* pSI );
+ static sal_uInt8 WhichFont( xub_StrLen nIdx, const String* pTxt, const SwScriptInfo* pSI );
};
inline void SwScriptInfo::SetInvalidity( const xub_StrLen nPos )
@@ -374,60 +374,59 @@ inline void SwScriptInfo::SetInvalidity( const xub_StrLen nPos )
if ( nPos < nInvalidityPos )
nInvalidityPos = nPos;
};
-
-inline USHORT SwScriptInfo::CountScriptChg() const { return aScriptChanges.size(); }
-inline xub_StrLen SwScriptInfo::GetScriptChg( const USHORT nCnt ) const
+inline size_t SwScriptInfo::CountScriptChg() const { return aScriptChanges.size(); }
+inline xub_StrLen SwScriptInfo::GetScriptChg( const size_t nCnt ) const
{
OSL_ENSURE( nCnt < aScriptChanges.size(),"No ScriptChange today!");
return aScriptChanges[nCnt].position;
}
-inline BYTE SwScriptInfo::GetScriptType( const xub_StrLen nCnt ) const
+inline sal_uInt8 SwScriptInfo::GetScriptType( const xub_StrLen nCnt ) const
{
OSL_ENSURE( nCnt < aScriptChanges.size(),"No ScriptType today!");
return aScriptChanges[nCnt].type;
}
-inline USHORT SwScriptInfo::CountDirChg() const { return aDirectionChanges.size(); }
-inline xub_StrLen SwScriptInfo::GetDirChg( const USHORT nCnt ) const
+inline size_t SwScriptInfo::CountDirChg() const { return aDirectionChanges.size(); }
+inline xub_StrLen SwScriptInfo::GetDirChg( const size_t nCnt ) const
{
OSL_ENSURE( nCnt < aDirectionChanges.size(),"No DirChange today!");
return aDirectionChanges[ nCnt ].position;
}
-inline BYTE SwScriptInfo::GetDirType( const xub_StrLen nCnt ) const
+inline sal_uInt8 SwScriptInfo::GetDirType( const size_t nCnt ) const
{
OSL_ENSURE( nCnt < aDirectionChanges.size(),"No DirType today!");
return aDirectionChanges[ nCnt ].type;
}
-inline USHORT SwScriptInfo::CountKashida() const { return aKashida.Count(); }
-inline xub_StrLen SwScriptInfo::GetKashida( const USHORT nCnt ) const
+inline size_t SwScriptInfo::CountKashida() const { return aKashida.size(); }
+inline xub_StrLen SwScriptInfo::GetKashida( const size_t nCnt ) const
{
- OSL_ENSURE( nCnt < aKashida.Count(),"No Kashidas today!");
+ OSL_ENSURE( nCnt < aKashida.size(),"No Kashidas today!");
return aKashida[ nCnt ];
}
-inline USHORT SwScriptInfo::CountCompChg() const { return aCompressionChanges.size(); };
-inline xub_StrLen SwScriptInfo::GetCompStart( const USHORT nCnt ) const
+inline size_t SwScriptInfo::CountCompChg() const { return aCompressionChanges.size(); };
+inline xub_StrLen SwScriptInfo::GetCompStart( const size_t nCnt ) const
{
OSL_ENSURE( nCnt < aCompressionChanges.size(),"No CompressionStart today!");
return aCompressionChanges[ nCnt ].position;
}
-inline xub_StrLen SwScriptInfo::GetCompLen( const USHORT nCnt ) const
+inline xub_StrLen SwScriptInfo::GetCompLen( const size_t nCnt ) const
{
OSL_ENSURE( nCnt < aCompressionChanges.size(),"No CompressionLen today!");
return aCompressionChanges[ nCnt ].length;
}
-inline BYTE SwScriptInfo::GetCompType( const USHORT nCnt ) const
+inline sal_uInt8 SwScriptInfo::GetCompType( const size_t nCnt ) const
{
OSL_ENSURE( nCnt < aCompressionChanges.size(),"No CompressionType today!");
return aCompressionChanges[ nCnt ].type;
}
-inline USHORT SwScriptInfo::CountHiddenChg() const { return aHiddenChg.Count(); };
-inline xub_StrLen SwScriptInfo::GetHiddenChg( const USHORT nCnt ) const
+inline size_t SwScriptInfo::CountHiddenChg() const { return aHiddenChg.size(); };
+inline xub_StrLen SwScriptInfo::GetHiddenChg( const size_t nCnt ) const
{
- OSL_ENSURE( nCnt < aHiddenChg.Count(),"No HiddenChg today!");
+ OSL_ENSURE( nCnt < aHiddenChg.size(),"No HiddenChg today!");
return aHiddenChg[ nCnt ];
}
diff --git a/sw/source/core/inc/sectfrm.hxx b/sw/source/core/inc/sectfrm.hxx
index 7cf0b8b43659..f06ff2a4a5d1 100644
--- a/sw/source/core/inc/sectfrm.hxx
+++ b/sw/source/core/inc/sectfrm.hxx
@@ -46,27 +46,27 @@ class SwSectionFrm: public SwLayoutFrm, public SwFlowFrm
{
SwSection* pSection;
- void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, BYTE &,
+ void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, sal_uInt8 &,
SwAttrSetChg *pa = 0, SwAttrSetChg *pb = 0 );
- void _Cut( BOOL bRemove );
+ void _Cut( sal_Bool bRemove );
// Is there a FtnContainer?
// An empty sectionfrm without FtnCont is superfluous
- BOOL IsSuperfluous() const { return !ContainsAny() && !ContainsFtnCont(); }
+ sal_Bool IsSuperfluous() const { return !ContainsAny() && !ContainsFtnCont(); }
void CalcFtnAtEndFlag();
void CalcEndAtEndFlag();
const SwSectionFmt* _GetEndSectFmt() const;
- BOOL IsEndnoteAtMyEnd() const;
+ sal_Bool IsEndnoteAtMyEnd() const;
protected:
virtual void MakeAll();
- virtual BOOL ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL bHead, BOOL &rReformat );
+ virtual sal_Bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool bHead, sal_Bool &rReformat );
virtual void Format( const SwBorderAttrs *pAttrs = 0 );
public:
SwSectionFrm( SwSection & ); //Inhalt wird nicht erzeugt!
- SwSectionFrm( SwSectionFrm &, BOOL bMaster );//_Nur_ zum Erzeugen von Master/Follows
+ SwSectionFrm( SwSectionFrm &, sal_Bool bMaster );//_Nur_ zum Erzeugen von Master/Follows
~SwSectionFrm();
void Init();
- virtual void CheckDirection( BOOL bVert );
+ virtual void CheckDirection( sal_Bool bVert );
virtual void Cut();
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 );
@@ -76,53 +76,53 @@ public:
inline SwSectionFrm *GetFollow();
SwSectionFrm* FindMaster() const;
- SwCntntFrm *FindLastCntnt( BYTE nMode = 0 );
- inline const SwCntntFrm *FindLastCntnt( BYTE nMode = 0 ) const;
+ SwCntntFrm *FindLastCntnt( sal_uInt8 nMode = 0 );
+ inline const SwCntntFrm *FindLastCntnt( sal_uInt8 nMode = 0 ) const;
inline SwSection* GetSection() { return pSection; }
inline const SwSection* GetSection() const { return pSection; }
- inline void ColLock() { bColLocked = TRUE; }
- inline void ColUnlock() { bColLocked = FALSE; }
+ inline void ColLock() { bColLocked = sal_True; }
+ inline void ColUnlock() { bColLocked = sal_False; }
void CalcFtnCntnt();
void SimpleFormat();
- BOOL IsDescendantFrom( const SwSectionFmt* pSect ) const;
- BOOL HasToBreak( const SwFrm* pFrm ) const;
+ sal_Bool IsDescendantFrom( const SwSectionFmt* pSect ) const;
+ sal_Bool HasToBreak( const SwFrm* pFrm ) const;
void MergeNext( SwSectionFrm* pNxt );
//Zerlegt den pFrm umgebenden SectionFrm in zwei Teile,
//pFrm an den Anfang des 2. Teils
- BOOL SplitSect( SwFrm* pFrm, BOOL bApres );
- void DelEmpty( BOOL bRemove ); // wie Cut(), Follow-Verkettung wird aber mitgepflegt
- BOOL IsToIgnore() const // Keine Groesse, kein Inhalt, muss ignoriert werden
+ sal_Bool SplitSect( SwFrm* pFrm, sal_Bool bApres );
+ void DelEmpty( sal_Bool bRemove ); // wie Cut(), Follow-Verkettung wird aber mitgepflegt
+ sal_Bool IsToIgnore() const // Keine Groesse, kein Inhalt, muss ignoriert werden
{ return !Frm().Height() && !ContainsCntnt(); }
SwFtnContFrm* ContainsFtnCont( const SwFtnContFrm* pCont = NULL ) const;
- BOOL Growable() const;
- SwTwips _Shrink( SwTwips, BOOL bTst );
- SwTwips _Grow ( SwTwips, BOOL bTst );
+ sal_Bool Growable() const;
+ SwTwips _Shrink( SwTwips, sal_Bool bTst );
+ SwTwips _Grow ( SwTwips, sal_Bool bTst );
// A sectionfrm has to maximize, if he has a follow or a ftncontainer at
// the end of the page. A superfluous follow will be ignored,
// if bCheckFollow is set.
- BOOL ToMaximize( BOOL bCheckFollow ) const;
- inline BOOL _ToMaximize() const
- { if( !pSection ) return FALSE; return ToMaximize( FALSE ); }
- BOOL MoveAllowed( const SwFrm* ) const;
- BOOL CalcMinDiff( SwTwips& rMinDiff ) const;
- // Uebergibt man kein bOverSize bzw. FALSE, so ist der Returnwert
+ sal_Bool ToMaximize( sal_Bool bCheckFollow ) const;
+ inline sal_Bool _ToMaximize() const
+ { if( !pSection ) return sal_False; return ToMaximize( sal_False ); }
+ sal_Bool MoveAllowed( const SwFrm* ) const;
+ sal_Bool CalcMinDiff( SwTwips& rMinDiff ) const;
+ // Uebergibt man kein bOverSize bzw. sal_False, so ist der Returnwert
// >0 fuer Undersized-Frames, ==0 sonst.
- // Uebergibt man TRUE, so kann es auch einen negativen Returnwert geben,
+ // Uebergibt man sal_True, so kann es auch einen negativen Returnwert geben,
// wenn der SectionFrm nicht vollstaendig ausgefuellt ist, was z.B. bei
// SectionFrm mit Follow meist vorkommt. Benoetigt wird dies im
// FormatWidthCols, um "Luft" aus den Spalten zu lassen.
- long Undersize( BOOL bOverSize = FALSE );
+ long Undersize( sal_Bool bOverSize = sal_False );
// Groesse an die Umgebung anpassen
- void _CheckClipping( BOOL bGrow, BOOL bMaximize );
+ void _CheckClipping( sal_Bool bGrow, sal_Bool bMaximize );
void InvalidateFtnPos();
void CollectEndnotes( SwLayouter* pLayouter );
const SwSectionFmt* GetEndSectFmt() const
{ if( IsEndnAtEnd() ) return _GetEndSectFmt(); return NULL; }
- static void MoveCntntAndDelete( SwSectionFrm* pDel, BOOL bSave );
+ static void MoveCntntAndDelete( SwSectionFrm* pDel, sal_Bool bSave );
bool IsBalancedSection() const;
@@ -140,7 +140,7 @@ inline SwSectionFrm *SwSectionFrm::GetFollow()
{
return (SwSectionFrm*)SwFlowFrm::GetFollow();
}
-inline const SwCntntFrm *SwSectionFrm::FindLastCntnt( BYTE nMode ) const
+inline const SwCntntFrm *SwSectionFrm::FindLastCntnt( sal_uInt8 nMode ) const
{
return ((SwSectionFrm*)this)->FindLastCntnt( nMode );
}
diff --git a/sw/source/core/inc/swblocks.hxx b/sw/source/core/inc/swblocks.hxx
index 287f3c0b3408..1ac9455abff7 100644
--- a/sw/source/core/inc/swblocks.hxx
+++ b/sw/source/core/inc/swblocks.hxx
@@ -45,15 +45,15 @@ class SwBlockName
{
friend class SwImpBlocks;
friend class Sw2TextBlocks;
- USHORT nHashS, nHashL; // Hash-Codes zum Checken
+ sal_uInt16 nHashS, nHashL; // Hash-Codes zum Checken
long nPos; // Dateiposition (SW2-Format)
public:
String aShort; // Short name
String aLong; // Long name
String aPackageName; // Package name
- BOOL bIsOnlyTxtFlagInit : 1; // ist das Flag gueltig?
- BOOL bIsOnlyTxt : 1; // unformatted text
- BOOL bInPutMuchBlocks : 1; // put serveral block entries
+ sal_Bool bIsOnlyTxtFlagInit : 1; // ist das Flag gueltig?
+ sal_Bool bIsOnlyTxt : 1; // unformatted text
+ sal_Bool bInPutMuchBlocks : 1; // put serveral block entries
SwBlockName( const String& rShort, const String& rLong, long n );
SwBlockName( const String& rShort, const String& rLong, const String& rPackageName );
@@ -79,12 +79,12 @@ protected:
Date aDateModified; // fuers abgleichen bei den Aktionen
Time aTimeModified;
SwDoc* pDoc; // Austauschdokument
- USHORT nCur; // aktueller Index
- BOOL bReadOnly : 1;
- BOOL bInPutMuchBlocks : 1; // put serveral block entries
- BOOL bInfoChanged : 1; // any Info of TextBlock is changed
+ sal_uInt16 nCur; // aktueller Index
+ sal_Bool bReadOnly : 1;
+ sal_Bool bInPutMuchBlocks : 1; // put serveral block entries
+ sal_Bool bInfoChanged : 1; // any Info of TextBlock is changed
- SwImpBlocks( const String&, BOOL = FALSE );
+ SwImpBlocks( const String&, sal_Bool = sal_False );
virtual ~SwImpBlocks();
static short GetFileType( const String& );
@@ -97,50 +97,50 @@ protected:
virtual void ClearDoc(); // Doc-Inhalt loeschen
SwPaM* MakePaM(); // PaM ueber Doc aufspannen
- virtual void AddName( const String&, const String&, BOOL bOnlyTxt = FALSE );
- BOOL IsFileChanged() const;
+ virtual void AddName( const String&, const String&, sal_Bool bOnlyTxt = sal_False );
+ sal_Bool IsFileChanged() const;
void Touch();
public:
- static USHORT Hash( const String& ); // Hashcode fuer Blocknamen
- USHORT GetCount() const; // Anzahl Textbausteine ermitteln
- USHORT GetIndex( const String& ) const; // Index fuer Kurznamen ermitteln
- USHORT GetLongIndex( const String& ) const; //Index fuer Langnamen ermitteln
- const String& GetShortName( USHORT ) const; // Kurzname fuer Index zurueck
- const String& GetLongName( USHORT ) const; // Langname fuer Index zurueck
- const String& GetPackageName( USHORT ) const; // Langname fuer Index zurueck
+ static sal_uInt16 Hash( const String& ); // Hashcode fuer Blocknamen
+ sal_uInt16 GetCount() const; // Anzahl Textbausteine ermitteln
+ sal_uInt16 GetIndex( const String& ) const; // Index fuer Kurznamen ermitteln
+ sal_uInt16 GetLongIndex( const String& ) const; //Index fuer Langnamen ermitteln
+ const String& GetShortName( sal_uInt16 ) const; // Kurzname fuer Index zurueck
+ const String& GetLongName( sal_uInt16 ) const; // Langname fuer Index zurueck
+ const String& GetPackageName( sal_uInt16 ) const; // Langname fuer Index zurueck
const String& GetFileName() const {return aFile;} // phys. Dateinamen liefern
void SetName( const String& rName ) // logic name
- { aName = rName; bInfoChanged = TRUE; }
+ { aName = rName; bInfoChanged = sal_True; }
const String & GetName( void )
{ return aName; }
const String& GetBaseURL() const { return sBaseURL;}
void SetBaseURL( const String& rURL ) { sBaseURL = rURL; }
- virtual ULONG Delete( USHORT ) = 0;
- virtual ULONG Rename( USHORT, const String&, const String& ) = 0;
- virtual ULONG CopyBlock( SwImpBlocks& rImp, String& rShort, const String& rLong) = 0;
- virtual ULONG GetDoc( USHORT ) = 0;
- virtual ULONG GetDocForConversion( USHORT );
- virtual ULONG BeginPutDoc( const String&, const String& ) = 0;
- virtual ULONG PutDoc() = 0;
- virtual ULONG GetText( USHORT, String& ) = 0;
- virtual ULONG PutText( const String&, const String&, const String& ) = 0;
- virtual ULONG MakeBlockList() = 0;
-
- virtual ULONG OpenFile( BOOL bReadOnly = TRUE ) = 0;
+ virtual sal_uLong Delete( sal_uInt16 ) = 0;
+ virtual sal_uLong Rename( sal_uInt16, const String&, const String& ) = 0;
+ virtual sal_uLong CopyBlock( SwImpBlocks& rImp, String& rShort, const String& rLong) = 0;
+ virtual sal_uLong GetDoc( sal_uInt16 ) = 0;
+ virtual sal_uLong GetDocForConversion( sal_uInt16 );
+ virtual sal_uLong BeginPutDoc( const String&, const String& ) = 0;
+ virtual sal_uLong PutDoc() = 0;
+ virtual sal_uLong GetText( sal_uInt16, String& ) = 0;
+ virtual sal_uLong PutText( const String&, const String&, const String& ) = 0;
+ virtual sal_uLong MakeBlockList() = 0;
+
+ virtual sal_uLong OpenFile( sal_Bool bReadOnly = sal_True ) = 0;
virtual void CloseFile() = 0;
- virtual BOOL IsOnlyTextBlock( const String& rShort ) const;
+ virtual sal_Bool IsOnlyTextBlock( const String& rShort ) const;
- virtual ULONG GetMacroTable( USHORT nIdx, SvxMacroTableDtor& rMacroTbl,
+ virtual sal_uLong GetMacroTable( sal_uInt16 nIdx, SvxMacroTableDtor& rMacroTbl,
sal_Bool bFileAlreadyOpen = sal_False );
- virtual ULONG SetMacroTable( USHORT nIdx,
+ virtual sal_uLong SetMacroTable( sal_uInt16 nIdx,
const SvxMacroTableDtor& rMacroTbl,
sal_Bool bFileAlreadyOpen = sal_False );
- virtual BOOL PutMuchEntries( BOOL bOn );
+ virtual sal_Bool PutMuchEntries( sal_Bool bOn );
};
#endif
diff --git a/sw/source/core/inc/swcache.hxx b/sw/source/core/inc/swcache.hxx
index 48cc9ef8a284..cfb585345566 100644
--- a/sw/source/core/inc/swcache.hxx
+++ b/sw/source/core/inc/swcache.hxx
@@ -82,10 +82,10 @@ class SwCache : public SwCacheObjArr
SwCacheObj *pFirst; //der virtuelle erste.
SwCacheObj *pLast;
- const USHORT nMax; //Mehr sollen nicht aufgenommen werden,
+ const sal_uInt16 nMax; //Mehr sollen nicht aufgenommen werden,
//der Cache kann aber dynamisch um jeweils
//nMax vergroessert werden.
- USHORT nCurMax; //Mehr werden nicht aufgenommen.
+ sal_uInt16 nCurMax; //Mehr werden nicht aufgenommen.
void DeleteObj( SwCacheObj *pObj );
@@ -111,34 +111,34 @@ class SwCache : public SwCacheObjArr
public:
- //nur BYTE hineinstecken!!!
+ //nur sal_uInt8 hineinstecken!!!
#if OSL_DEBUG_LEVEL > 1
- SwCache( const USHORT nInitSize, const USHORT nGrowSize,
+ SwCache( const sal_uInt16 nInitSize, const sal_uInt16 nGrowSize,
const ByteString &rNm );
~SwCache();
#else
- SwCache( const USHORT nInitSize, const USHORT nGrowSize );
+ SwCache( const sal_uInt16 nInitSize, const sal_uInt16 nGrowSize );
#endif
- void Flush( const BYTE nPercent = 100 );
+ void Flush( const sal_uInt8 nPercent = 100 );
- //bToTop == FALSE -> Keine LRU-Umsortierung!
- SwCacheObj *Get( const void *pOwner, const BOOL bToTop = TRUE );
- SwCacheObj *Get( const void *pOwner, const USHORT nIndex,
- const BOOL bToTop = TRUE );
+ //bToTop == sal_False -> Keine LRU-Umsortierung!
+ SwCacheObj *Get( const void *pOwner, const sal_Bool bToTop = sal_True );
+ SwCacheObj *Get( const void *pOwner, const sal_uInt16 nIndex,
+ const sal_Bool bToTop = sal_True );
void ToTop( SwCacheObj *pObj );
- BOOL Insert( SwCacheObj *pNew );
+ sal_Bool Insert( SwCacheObj *pNew );
void Delete( const void *pOwner );
-// void Delete( const void *pOwner, const USHORT nIndex );
+// void Delete( const void *pOwner, const sal_uInt16 nIndex );
- void SetLRUOfst( const USHORT nOfst ); //nOfst sagt wieviele unangetastet
+ void SetLRUOfst( const sal_uInt16 nOfst ); //nOfst sagt wieviele unangetastet
//bleiben sollen.
void ResetLRUOfst() { pFirst = pRealFirst; }
- inline void IncreaseMax( const USHORT nAdd );
- inline void DecreaseMax( const USHORT nSub );
- USHORT GetCurMax() const { return nCurMax; }
+ inline void IncreaseMax( const sal_uInt16 nAdd );
+ inline void DecreaseMax( const sal_uInt16 nSub );
+ sal_uInt16 GetCurMax() const { return nCurMax; }
inline SwCacheObj *First() { return pRealFirst; }
inline SwCacheObj *Last() { return pLast; }
inline SwCacheObj *Next( SwCacheObj *pCacheObj);
@@ -149,7 +149,7 @@ class SwSaveSetLRUOfst
{
SwCache &rCache;
public:
- SwSaveSetLRUOfst( SwCache &rC, const USHORT nOfst )
+ SwSaveSetLRUOfst( SwCache &rC, const sal_uInt16 nOfst )
: rCache( rC ) { rCache.SetLRUOfst( nOfst ); }
~SwSaveSetLRUOfst() { rCache.ResetLRUOfst(); }
@@ -165,16 +165,16 @@ class SwCacheObj
SwCacheObj *pNext; //Fuer die LRU-Verkettung.
SwCacheObj *pPrev;
- USHORT nCachePos; //Position im Cache-Array.
+ sal_uInt16 nCachePos; //Position im Cache-Array.
- BYTE nLock;
+ sal_uInt8 nLock;
inline SwCacheObj *GetNext() { return pNext; }
inline SwCacheObj *GetPrev() { return pPrev; }
inline void SetNext( SwCacheObj *pNew ) { pNext = pNew; }
inline void SetPrev( SwCacheObj *pNew ) { pPrev = pNew; }
- inline void SetCachePos( const USHORT nNew ) { nCachePos = nNew; }
+ inline void SetCachePos( const sal_uInt16 nNew ) { nCachePos = nNew; }
protected:
const void *pOwner;
@@ -186,12 +186,12 @@ public:
virtual ~SwCacheObj();
inline const void *GetOwner() const { return pOwner; }
- inline BOOL IsOwner( const void *pNew ) const;
+ inline sal_Bool IsOwner( const void *pNew ) const;
- inline USHORT GetCachePos() const { return nCachePos; }
+ inline sal_uInt16 GetCachePos() const { return nCachePos; }
inline void Invalidate() { pOwner = 0; }
- inline BOOL IsLocked() const { return 0 != nLock; }
+ inline sal_Bool IsLocked() const { return 0 != nLock; }
#if OSL_DEBUG_LEVEL > 1
void Lock();
@@ -229,36 +229,36 @@ protected:
inline SwCacheObj *Get();
- inline SwCacheAccess( SwCache &rCache, const void *pOwner, BOOL bSeek = TRUE );
- inline SwCacheAccess( SwCache &rCache, const void *pOwner, const USHORT nIndex );
+ inline SwCacheAccess( SwCache &rCache, const void *pOwner, sal_Bool bSeek = sal_True );
+ inline SwCacheAccess( SwCache &rCache, const void *pOwner, const sal_uInt16 nIndex );
public:
virtual ~SwCacheAccess();
- virtual BOOL IsAvailable() const;
+ virtual sal_Bool IsAvailable() const;
//Abkuerzung fuer diejenigen, die wissen, das die Ableitung das IsAvailable
//nicht ueberladen haben.
- BOOL IsAvail() const { return pObj != 0; }
+ sal_Bool IsAvail() const { return pObj != 0; }
};
-inline void SwCache::IncreaseMax( const USHORT nAdd )
+inline void SwCache::IncreaseMax( const sal_uInt16 nAdd )
{
- nCurMax = nCurMax + sal::static_int_cast< USHORT >(nAdd);
+ nCurMax = nCurMax + sal::static_int_cast< sal_uInt16 >(nAdd);
#if OSL_DEBUG_LEVEL > 1
++nIncreaseMax;
#endif
}
-inline void SwCache::DecreaseMax( const USHORT nSub )
+inline void SwCache::DecreaseMax( const sal_uInt16 nSub )
{
if ( nCurMax > nSub )
- nCurMax = nCurMax - sal::static_int_cast< USHORT >(nSub);
+ nCurMax = nCurMax - sal::static_int_cast< sal_uInt16 >(nSub);
#if OSL_DEBUG_LEVEL > 1
++nDecreaseMax;
#endif
}
-inline BOOL SwCacheObj::IsOwner( const void *pNew ) const
+inline sal_Bool SwCacheObj::IsOwner( const void *pNew ) const
{
return pOwner && pOwner == pNew;
}
@@ -271,7 +271,7 @@ inline SwCacheObj *SwCache::Next( SwCacheObj *pCacheObj)
return NULL;
}
-inline SwCacheAccess::SwCacheAccess( SwCache &rC, const void *pOwn, BOOL bSeek ) :
+inline SwCacheAccess::SwCacheAccess( SwCache &rC, const void *pOwn, sal_Bool bSeek ) :
rCache( rC ),
pObj( 0 ),
pOwner( pOwn )
@@ -281,7 +281,7 @@ inline SwCacheAccess::SwCacheAccess( SwCache &rC, const void *pOwn, BOOL bSeek )
}
inline SwCacheAccess::SwCacheAccess( SwCache &rC, const void *pOwn,
- const USHORT nIndex ) :
+ const sal_uInt16 nIndex ) :
rCache( rC ),
pObj( 0 ),
pOwner( pOwn )
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index 9e8d2e15fd5b..f0cf7bab6a32 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -54,33 +54,33 @@ class SwSubFont : public SvxFont
friend class SwFont;
const void *pMagic; // "MagicNumber" innerhalb des Fontcaches
Size aSize; // Fremde kriegen nur diese Size zu sehen
- USHORT nFntIndex; // Index im Fontcache
- USHORT nOrgHeight; // Hoehe inkl. Escapement/Proportion
- USHORT nOrgAscent; // Ascent inkl. Escapement/Proportion
- USHORT nPropWidth; // proportional width
+ sal_uInt16 nFntIndex; // Index im Fontcache
+ sal_uInt16 nOrgHeight; // Hoehe inkl. Escapement/Proportion
+ sal_uInt16 nOrgAscent; // Ascent inkl. Escapement/Proportion
+ sal_uInt16 nPropWidth; // proportional width
inline SwSubFont() : aSize(0,0)
{ pMagic = NULL; nFntIndex = nOrgHeight = nOrgAscent = 0; nPropWidth =100; }
- USHORT CalcEscAscent( const USHORT nOldAscent ) const;
- USHORT CalcEscHeight( const USHORT nOldHeight,
- const USHORT nOldAscent ) const;
+ sal_uInt16 CalcEscAscent( const sal_uInt16 nOldAscent ) const;
+ sal_uInt16 CalcEscHeight( const sal_uInt16 nOldHeight,
+ const sal_uInt16 nOldAscent ) const;
void CalcEsc( SwDrawTextInfo& rInf, Point& rPos );
inline void CopyMagic( const SwSubFont& rFnt )
{ pMagic = rFnt.pMagic; nFntIndex = rFnt.nFntIndex; }
- BOOL operator==( const SwFont &rFnt ) const;
+ sal_Bool operator==( const SwFont &rFnt ) const;
SwSubFont& operator=( const SwSubFont &rFont );
short _CheckKerning( );
- BOOL ChgFnt( ViewShell *pSh, OutputDevice& rOut );
- BOOL IsSymbol( ViewShell *pSh );
- USHORT GetAscent( ViewShell *pSh, const OutputDevice& rOut );
- USHORT GetHeight( ViewShell *pSh, const OutputDevice& rOut );
+ sal_Bool ChgFnt( ViewShell *pSh, OutputDevice& rOut );
+ sal_Bool IsSymbol( ViewShell *pSh );
+ sal_uInt16 GetAscent( ViewShell *pSh, const OutputDevice& rOut );
+ sal_uInt16 GetHeight( ViewShell *pSh, const OutputDevice& rOut );
Size _GetTxtSize( SwDrawTextInfo& rInf );
Size GetCapitalSize( SwDrawTextInfo& rInf );
- void _DrawText( SwDrawTextInfo &rInf, const BOOL bGrey );
+ void _DrawText( SwDrawTextInfo &rInf, const sal_Bool bGrey );
void DrawCapital( SwDrawTextInfo &rInf );
void DrawStretchCapital( SwDrawTextInfo &rInf );
void DoOnCapitals( SwDoCapitals &rDo );
@@ -97,17 +97,17 @@ class SwSubFont : public SvxFont
inline void SetOverline( const FontUnderline eOverline );
inline void SetStrikeout( const FontStrikeout eStrikeout );
inline void SetItalic( const FontItalic eItalic );
- inline void SetOutline( const BOOL bOutline );
- inline void SetVertical( const USHORT nDir, const BOOL bVertFormat );
- inline void SetShadow( const BOOL bShadow );
- inline void SetAutoKern( const BYTE nAutoKern );
- inline void SetWordLineMode( const BOOL bWordLineMode );
+ inline void SetOutline( const sal_Bool bOutline );
+ inline void SetVertical( const sal_uInt16 nDir, const sal_Bool bVertFormat );
+ inline void SetShadow( const sal_Bool bShadow );
+ inline void SetAutoKern( const sal_uInt8 nAutoKern );
+ inline void SetWordLineMode( const sal_Bool bWordLineMode );
inline void SetEmphasisMark( const FontEmphasisMark eValue );
inline void SetRelief( const FontRelief eNew );
// Methoden fuer die Hoch-/Tiefstellung
inline void SetEscapement( const short nNewEsc );
- inline void SetProportion( const BYTE nNewPropr );
+ inline void SetProportion( const sal_uInt8 nNewPropr );
inline void SetFamily( const FontFamily eFamily );
inline void SetName( const XubString& rName );
@@ -117,10 +117,10 @@ class SwSubFont : public SvxFont
inline void SetLanguage( LanguageType eNewLang );
inline short CheckKerning()
{ return GetFixKerning() >= 0 ? GetFixKerning() : _CheckKerning( ); }
- inline void SetPropWidth( const USHORT nNew )
+ inline void SetPropWidth( const sal_uInt16 nNew )
{ pMagic = 0; nPropWidth = nNew; }
public:
- USHORT GetPropWidth() const { return nPropWidth; }
+ sal_uInt16 GetPropWidth() const { return nPropWidth; }
};
#define SW_LATIN 0
@@ -135,23 +135,23 @@ class SwFont
Color* pBackColor; // background color (i.e. at character styles)
Color aUnderColor; // color of the underlining
Color aOverColor; // color of the overlining
- BYTE nToxCnt; // Zaehlt die Schachtelungstiefe der Tox
- BYTE nRefCnt; // Zaehlt die Schachtelungstiefe der Refs
- BYTE m_nMetaCount; // count META/METAFIELD
- BYTE nActual; // actual font (Latin, CJK or CTL)
+ sal_uInt8 nToxCnt; // Zaehlt die Schachtelungstiefe der Tox
+ sal_uInt8 nRefCnt; // Zaehlt die Schachtelungstiefe der Refs
+ sal_uInt8 m_nMetaCount; // count META/METAFIELD
+ sal_uInt8 nActual; // actual font (Latin, CJK or CTL)
// Schalter fuer die Font-Extensions
- BOOL bNoHyph :1; // SwTxtNoHyphenHere: keine Trennstelle
- BOOL bBlink :1; // blinkender Font
- BOOL bPaintBlank :1; // Blanks nicht mit DrawRect
- BOOL bFntChg :1;
- BOOL bOrgChg :1; // nOrgHeight/Ascent sind invalid
- BOOL bURL :1;
- BOOL bPaintWrong :1; // Flag fuer Rechtschreibfehler
- BOOL bGreyWave :1; // Fuers extended TextInput: Graue Wellenlinie
- BOOL bNoColReplace :1; // Replacement without colormanipulation
-
- BOOL operator==( const SwFont &rFnt ) const;
+ sal_Bool bNoHyph :1; // SwTxtNoHyphenHere: keine Trennstelle
+ sal_Bool bBlink :1; // blinkender Font
+ sal_Bool bPaintBlank :1; // Blanks nicht mit DrawRect
+ sal_Bool bFntChg :1;
+ sal_Bool bOrgChg :1; // nOrgHeight/Ascent sind invalid
+ sal_Bool bURL :1;
+ sal_Bool bPaintWrong :1; // Flag fuer Rechtschreibfehler
+ sal_Bool bGreyWave :1; // Fuers extended TextInput: Graue Wellenlinie
+ sal_Bool bNoColReplace :1; // Replacement without colormanipulation
+
+ sal_Bool operator==( const SwFont &rFnt ) const;
protected:
inline SwFont() { pBackColor = NULL; nActual = SW_LATIN; }
@@ -167,35 +167,35 @@ public:
SwFont& operator=( const SwFont &rFont );
- inline BYTE GetActual() const { return nActual; }
- inline void SetActual( BYTE nNew );
+ inline sal_uInt8 GetActual() const { return nActual; }
+ inline void SetActual( sal_uInt8 nNew );
inline const SvxFont& GetActualFont() const { return aSub[nActual]; }
// holt sich eine MagicNumber ueber SwFntAccess
- void GoMagic( ViewShell *pSh, BYTE nWhich );
+ void GoMagic( ViewShell *pSh, sal_uInt8 nWhich );
// set background color
void SetBackColor( Color* pNewColor );
inline const Color* GetBackColor() const{ return pBackColor; }
- inline void ChkMagic( ViewShell *pSh, BYTE nWhich )
+ inline void ChkMagic( ViewShell *pSh, sal_uInt8 nWhich )
{ if( !aSub[ nWhich ].pMagic ) GoMagic( pSh, nWhich ); }
// uebernimmt die MagicNumber eines (hoffentlich ident.) Kollegen
- inline void CopyMagic( const SwFont* pFnt, BYTE nWhich )
+ inline void CopyMagic( const SwFont* pFnt, sal_uInt8 nWhich )
{ aSub[nWhich].CopyMagic( pFnt->aSub[nWhich] ); }
- inline void GetMagic( const void* &rMagic, USHORT &rIdx, BYTE nWhich )
+ inline void GetMagic( const void* &rMagic, sal_uInt16 &rIdx, sal_uInt8 nWhich )
{ rMagic = aSub[nWhich].pMagic; rIdx = aSub[nWhich].nFntIndex; }
- inline void SetMagic( const void* pNew, const USHORT nIdx, BYTE nWhich )
+ inline void SetMagic( const void* pNew, const sal_uInt16 nIdx, sal_uInt8 nWhich )
{ aSub[nWhich].pMagic = pNew; aSub[nWhich].nFntIndex = nIdx; }
- inline BOOL DifferentMagic( const SwFont* pFnt, BYTE nWhich )
+ inline sal_Bool DifferentMagic( const SwFont* pFnt, sal_uInt8 nWhich )
{ return aSub[nWhich].pMagic != pFnt->aSub[nWhich].pMagic ||
!aSub[nWhich].pMagic || !pFnt->aSub[nWhich].pMagic; }
- inline const Size &GetSize( BYTE nWhich ) const
+ inline const Size &GetSize( sal_uInt8 nWhich ) const
{ return aSub[nWhich].aSize; }
- inline BOOL IsFntChg() const { return bFntChg; }
- inline void SetFntChg( const BOOL bNew ) { bFntChg = bNew; }
+ inline sal_Bool IsFntChg() const { return bFntChg; }
+ inline void SetFntChg( const sal_Bool bNew ) { bFntChg = bNew; }
- // die gekapselten SV-Font-Methoden (setzen bFntChg auf TRUE)
+ // die gekapselten SV-Font-Methoden (setzen bFntChg auf sal_True)
inline void SetColor( const Color& rColor );
inline void SetFillColor( const Color& rColor );
inline void SetAlign( const FontAlign eAlign );
@@ -204,67 +204,67 @@ public:
inline void SetOverline( const FontUnderline eOverline );
inline void SetOverColor( const Color &rColor ) { aOverColor = rColor; }
inline void SetStrikeout( const FontStrikeout eStrikeout );
- inline void SetOutline( const BOOL bOutline );
- void SetVertical( USHORT nDir, const BOOL nVertLayout = FALSE );
- inline void SetShadow( const BOOL bShadow );
- inline void SetAutoKern( BYTE nAutoKern );
- inline void SetTransparent( const BOOL bTrans );
- inline void SetWordLineMode( const BOOL bWordLineMode );
+ inline void SetOutline( const sal_Bool bOutline );
+ void SetVertical( sal_uInt16 nDir, const sal_Bool nVertLayout = sal_False );
+ inline void SetShadow( const sal_Bool bShadow );
+ inline void SetAutoKern( sal_uInt8 nAutoKern );
+ inline void SetTransparent( const sal_Bool bTrans );
+ inline void SetWordLineMode( const sal_Bool bWordLineMode );
inline void SetFixKerning( const short nNewKern );
inline void SetCaseMap( const SvxCaseMap eNew );
inline void SetEmphasisMark( const FontEmphasisMark eValue );
// Methoden fuer die Hoch-/Tiefstellung
inline void SetEscapement( const short nNewEsc );
- inline void SetProportion( const BYTE nNewPropr );
-
- inline void SetPropWidth( const USHORT nNew );
-
- inline void SetFamily( const FontFamily eFamily, const BYTE nWhich );
- inline void SetName( const XubString& rName, const BYTE nWhich );
- inline void SetStyleName( const XubString& rStyleName, const BYTE nWhich );
- inline void SetSize( const Size& rSize, const BYTE nWhich );
- inline void SetWeight( const FontWeight eWeight, const BYTE nWhich );
- inline void SetItalic( const FontItalic eItalic, const BYTE nWhich );
- inline void SetLanguage( LanguageType eNewLang, const BYTE nWhich );
- inline void SetCharSet( const CharSet eCharSet, const BYTE nWhich );
- inline void SetPitch( const FontPitch ePitch, const BYTE nWhich );
+ inline void SetProportion( const sal_uInt8 nNewPropr );
+
+ inline void SetPropWidth( const sal_uInt16 nNew );
+
+ inline void SetFamily( const FontFamily eFamily, const sal_uInt8 nWhich );
+ inline void SetName( const XubString& rName, const sal_uInt8 nWhich );
+ inline void SetStyleName( const XubString& rStyleName, const sal_uInt8 nWhich );
+ inline void SetSize( const Size& rSize, const sal_uInt8 nWhich );
+ inline void SetWeight( const FontWeight eWeight, const sal_uInt8 nWhich );
+ inline void SetItalic( const FontItalic eItalic, const sal_uInt8 nWhich );
+ inline void SetLanguage( LanguageType eNewLang, const sal_uInt8 nWhich );
+ inline void SetCharSet( const CharSet eCharSet, const sal_uInt8 nWhich );
+ inline void SetPitch( const FontPitch ePitch, const sal_uInt8 nWhich );
inline void SetRelief( const FontRelief eNew );
// Get/Set-Methoden fuer die aktuelle Einstellung
- inline void SetNoHyph( const BOOL bNew );
- inline BOOL IsNoHyph() const { return bNoHyph; }
- inline void SetBlink( const BOOL bBlink );
- inline BOOL IsBlink() const { return bBlink; }
- inline BYTE &GetTox() { return nToxCnt; }
- inline BYTE GetTox() const { return nToxCnt; }
- inline BOOL IsTox() const { return ( 0 != nToxCnt ); }
- inline BYTE &GetRef() { return nRefCnt; }
- inline BYTE GetRef() const { return nRefCnt; }
- inline BOOL IsRef() const { return ( 0 != nRefCnt ); }
- inline BYTE &GetMeta() { return m_nMetaCount; }
- inline BYTE GetMeta() const { return m_nMetaCount; }
+ inline void SetNoHyph( const sal_Bool bNew );
+ inline sal_Bool IsNoHyph() const { return bNoHyph; }
+ inline void SetBlink( const sal_Bool bBlink );
+ inline sal_Bool IsBlink() const { return bBlink; }
+ inline sal_uInt8 &GetTox() { return nToxCnt; }
+ inline sal_uInt8 GetTox() const { return nToxCnt; }
+ inline sal_Bool IsTox() const { return ( 0 != nToxCnt ); }
+ inline sal_uInt8 &GetRef() { return nRefCnt; }
+ inline sal_uInt8 GetRef() const { return nRefCnt; }
+ inline sal_Bool IsRef() const { return ( 0 != nRefCnt ); }
+ inline sal_uInt8 &GetMeta() { return m_nMetaCount; }
+ inline sal_uInt8 GetMeta() const { return m_nMetaCount; }
inline bool IsMeta() const { return (0 != m_nMetaCount); }
- inline void SetURL( const BOOL bURL );
- inline BOOL IsURL() const { return bURL; }
- inline void SetGreyWave( const BOOL bNew );
- inline BOOL IsGreyWave() const { return bGreyWave; }
- inline void SetNoCol( const BOOL bNew );
- inline BOOL IsNoCol() const { return bNoColReplace; }
-
- inline void SetPaintBlank( const BOOL bNew );
- inline BOOL IsPaintBlank() const { return bPaintBlank; }
- inline void SetPaintWrong( const BOOL bNew );
- inline BOOL IsPaintWrong() const { return bPaintWrong; }
+ inline void SetURL( const sal_Bool bURL );
+ inline sal_Bool IsURL() const { return bURL; }
+ inline void SetGreyWave( const sal_Bool bNew );
+ inline sal_Bool IsGreyWave() const { return bGreyWave; }
+ inline void SetNoCol( const sal_Bool bNew );
+ inline sal_Bool IsNoCol() const { return bNoColReplace; }
+
+ inline void SetPaintBlank( const sal_Bool bNew );
+ inline sal_Bool IsPaintBlank() const { return bPaintBlank; }
+ inline void SetPaintWrong( const sal_Bool bNew );
+ inline sal_Bool IsPaintWrong() const { return bPaintWrong; }
// Setzen der Basisklasse Font fuer SwTxtCharFmt
void SetDiffFnt( const SfxItemSet* pSet,
const IDocumentSettingAccess* pIDocumentSettingAccess );
- inline const SvxFont &GetFnt( const BYTE nWhich ) const
+ inline const SvxFont &GetFnt( const sal_uInt8 nWhich ) const
{ return aSub[nWhich]; };
- BOOL IsSymbol( ViewShell *pSh )
+ sal_Bool IsSymbol( ViewShell *pSh )
{ return aSub[nActual].IsSymbol( pSh ); }
FontUnderline GetUnderline() const { return aSub[nActual].GetUnderline(); }
const Color& GetUnderColor() const { return aUnderColor; }
@@ -273,13 +273,13 @@ public:
short GetFixKerning() const { return aSub[nActual].GetFixKerning(); }
FontStrikeout GetStrikeout() const { return aSub[nActual].GetStrikeout(); }
const Color& GetColor() const { return aSub[nActual].GetColor(); }
- BOOL IsShadow() const { return aSub[nActual].IsShadow(); }
- BOOL IsWordLineMode() const { return aSub[nActual].IsWordLineMode(); }
- BOOL IsOutline() const { return aSub[nActual].IsOutline(); }
- BOOL IsKerning() const { return aSub[nActual].IsKerning(); }
+ sal_Bool IsShadow() const { return aSub[nActual].IsShadow(); }
+ sal_Bool IsWordLineMode() const { return aSub[nActual].IsWordLineMode(); }
+ sal_Bool IsOutline() const { return aSub[nActual].IsOutline(); }
+ sal_Bool IsKerning() const { return aSub[nActual].IsKerning(); }
short GetEscapement() const { return aSub[nActual].GetEscapement(); }
SvxCaseMap GetCaseMap() const { return aSub[nActual].GetCaseMap(); }
- BYTE GetPropr() const { return aSub[nActual].GetPropr(); }
+ sal_uInt8 GetPropr() const { return aSub[nActual].GetPropr(); }
FontItalic GetItalic() const { return aSub[nActual].GetItalic(); }
LanguageType GetLanguage() const { return aSub[nActual].GetLanguage(); }
FontAlign GetAlign() const { return aSub[nActual].GetAlign(); }
@@ -292,28 +292,28 @@ public:
FontWeight GetWeight() const { return aSub[nActual].GetWeight(); }
FontEmphasisMark GetEmphasisMark() const
{ return aSub[nActual].GetEmphasisMark(); }
- USHORT GetPropWidth() const { return aSub[nActual].GetPropWidth(); }
- USHORT GetOrientation( const BOOL nVertLayout = FALSE ) const;
+ sal_uInt16 GetPropWidth() const { return aSub[nActual].GetPropWidth(); }
+ sal_uInt16 GetOrientation( const sal_Bool nVertLayout = sal_False ) const;
- inline const XubString& GetName( const BYTE nWhich ) const
+ inline const XubString& GetName( const sal_uInt8 nWhich ) const
{ return aSub[nWhich].GetName(); }
- inline LanguageType GetLanguage( const BYTE nWhich ) const
+ inline LanguageType GetLanguage( const sal_uInt8 nWhich ) const
{ return aSub[nWhich].GetLanguage(); }
- inline const XubString& GetStyleName( const BYTE nWhich ) const
+ inline const XubString& GetStyleName( const sal_uInt8 nWhich ) const
{ return aSub[nWhich].GetStyleName(); }
- inline FontFamily GetFamily( const BYTE nWhich ) const
+ inline FontFamily GetFamily( const sal_uInt8 nWhich ) const
{ return aSub[nWhich].GetFamily(); }
- inline FontItalic GetItalic( const BYTE nWhich ) const
+ inline FontItalic GetItalic( const sal_uInt8 nWhich ) const
{ return aSub[nWhich].GetItalic(); }
- inline FontPitch GetPitch( const BYTE nWhich ) const
+ inline FontPitch GetPitch( const sal_uInt8 nWhich ) const
{ return aSub[nWhich].GetPitch(); }
- inline rtl_TextEncoding GetCharSet( const BYTE nWhich ) const
+ inline rtl_TextEncoding GetCharSet( const sal_uInt8 nWhich ) const
{ return aSub[nWhich].GetCharSet(); }
- inline long GetHeight( const BYTE nWhich ) const
+ inline long GetHeight( const sal_uInt8 nWhich ) const
{ return aSub[nWhich].GetSize().Height(); }
- inline FontWeight GetWeight( const BYTE nWhich ) const
+ inline FontWeight GetWeight( const sal_uInt8 nWhich ) const
{ return aSub[nWhich].GetWeight(); }
- inline FontEmphasisMark GetEmphasisMark( const BYTE nWhich ) const
+ inline FontEmphasisMark GetEmphasisMark( const sal_uInt8 nWhich ) const
{ return aSub[nWhich].GetEmphasisMark(); }
// Macht den logischen Font im OutputDevice wirksam.
@@ -356,18 +356,18 @@ public:
inline short CheckKerning()
{ return aSub[nActual].CheckKerning(); }
- inline USHORT GetAscent( ViewShell *pSh, const OutputDevice& rOut )
+ inline sal_uInt16 GetAscent( ViewShell *pSh, const OutputDevice& rOut )
{ return aSub[nActual].GetAscent( pSh, rOut ); }
- inline USHORT GetHeight( ViewShell *pSh, const OutputDevice& rOut )
+ inline sal_uInt16 GetHeight( ViewShell *pSh, const OutputDevice& rOut )
{ return aSub[nActual].GetHeight( pSh, rOut ); }
inline void Invalidate()
- { bFntChg = bOrgChg = TRUE; }
+ { bFntChg = bOrgChg = sal_True; }
};
inline void SwFont::SetColor( const Color& rColor )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetColor( rColor );
aSub[1].SetColor( rColor );
aSub[2].SetColor( rColor );
@@ -390,7 +390,7 @@ inline void SwSubFont::SetFillColor( const Color& rColor )
inline void SwFont::SetFillColor( const Color& rColor )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetFillColor( rColor );
aSub[1].SetFillColor( rColor );
aSub[2].SetFillColor( rColor );
@@ -403,9 +403,9 @@ inline void SwSubFont::SetFamily( const FontFamily eFamily )
Font::SetFamily( eFamily );
}
-inline void SwFont::SetFamily( const FontFamily eFamily, const BYTE nWhich )
+inline void SwFont::SetFamily( const FontFamily eFamily, const sal_uInt8 nWhich )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[nWhich].SetFamily( eFamily );
}
@@ -416,9 +416,9 @@ inline void SwSubFont::SetName( const XubString& rName )
Font::SetName( rName );
}
-inline void SwFont::SetName( const XubString& rName, const BYTE nWhich )
+inline void SwFont::SetName( const XubString& rName, const sal_uInt8 nWhich )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[nWhich].SetName( rName );
}
@@ -429,9 +429,9 @@ inline void SwSubFont::SetStyleName( const XubString& rStyleName )
Font::SetStyleName( rStyleName );
}
-inline void SwFont::SetStyleName( const XubString& rStyle, const BYTE nWhich )
+inline void SwFont::SetStyleName( const XubString& rStyle, const sal_uInt8 nWhich )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[nWhich].SetStyleName( rStyle );
}
@@ -442,9 +442,9 @@ inline void SwSubFont::SetCharSet( const CharSet eCharSet )
Font::SetCharSet( eCharSet );
}
-inline void SwFont::SetCharSet( const CharSet eCharSet, const BYTE nWhich )
+inline void SwFont::SetCharSet( const CharSet eCharSet, const sal_uInt8 nWhich )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[nWhich].SetCharSet( eCharSet );
}
@@ -456,9 +456,9 @@ inline void SwSubFont::SetPitch( const FontPitch ePitch )
}
// gekapselte SV-Font-Methode
-inline void SwFont::SetPitch( const FontPitch ePitch, const BYTE nWhich )
+inline void SwFont::SetPitch( const FontPitch ePitch, const sal_uInt8 nWhich )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[nWhich].SetPitch( ePitch );
}
@@ -471,7 +471,7 @@ inline void SwSubFont::SetAlign( const FontAlign eAlign )
inline void SwFont::SetAlign( const FontAlign eAlign )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetAlign( eAlign );
aSub[1].SetAlign( eAlign );
aSub[2].SetAlign( eAlign );
@@ -484,9 +484,9 @@ inline void SwSubFont::SetWeight( const FontWeight eWeight )
Font::SetWeight( eWeight );
}
-inline void SwFont::SetWeight( const FontWeight eWeight, const BYTE nWhich )
+inline void SwFont::SetWeight( const FontWeight eWeight, const sal_uInt8 nWhich )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[nWhich].SetWeight( eWeight );
}
@@ -499,7 +499,7 @@ inline void SwSubFont::SetUnderline( const FontUnderline eUnderline )
inline void SwFont::SetUnderline( const FontUnderline eUnderline )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetUnderline( eUnderline );
aSub[1].SetUnderline( eUnderline );
aSub[2].SetUnderline( eUnderline );
@@ -514,7 +514,7 @@ inline void SwSubFont::SetOverline( const FontUnderline eOverline )
inline void SwFont::SetOverline( const FontUnderline eOverline )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetOverline( eOverline );
aSub[1].SetOverline( eOverline );
aSub[2].SetOverline( eOverline );
@@ -529,7 +529,7 @@ inline void SwSubFont::SetStrikeout( const FontStrikeout eStrikeout )
inline void SwFont::SetStrikeout( const FontStrikeout eStrikeout )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetStrikeout( eStrikeout );
aSub[1].SetStrikeout( eStrikeout );
aSub[2].SetStrikeout( eStrikeout );
@@ -542,52 +542,52 @@ inline void SwSubFont::SetItalic( const FontItalic eItalic )
Font::SetItalic( eItalic );
}
-inline void SwFont::SetItalic( const FontItalic eItalic, const BYTE nWhich )
+inline void SwFont::SetItalic( const FontItalic eItalic, const sal_uInt8 nWhich )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[nWhich].SetItalic( eItalic );
}
// gekapselte SV-Font-Methode
-inline void SwSubFont::SetOutline( const BOOL bOutline )
+inline void SwSubFont::SetOutline( const sal_Bool bOutline )
{
pMagic = 0;
Font::SetOutline( bOutline );
}
-inline void SwFont::SetOutline( const BOOL bOutline )
+inline void SwFont::SetOutline( const sal_Bool bOutline )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetOutline( bOutline );
aSub[1].SetOutline( bOutline );
aSub[2].SetOutline( bOutline );
}
// gekapselte SV-Font-Methode
-inline void SwSubFont::SetShadow( const BOOL bShadow )
+inline void SwSubFont::SetShadow( const sal_Bool bShadow )
{
pMagic = 0;
Font::SetShadow( bShadow );
}
-inline void SwFont::SetShadow( const BOOL bShadow )
+inline void SwFont::SetShadow( const sal_Bool bShadow )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetShadow( bShadow );
aSub[1].SetShadow( bShadow );
aSub[2].SetShadow( bShadow );
}
// gekapselte SV-Font-Methode
-inline void SwSubFont::SetAutoKern( const BYTE nAutoKern )
+inline void SwSubFont::SetAutoKern( const sal_uInt8 nAutoKern )
{
pMagic = 0;
Font::SetKerning( nAutoKern );
}
-inline void SwFont::SetAutoKern( BYTE nAutoKern )
+inline void SwFont::SetAutoKern( sal_uInt8 nAutoKern )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[1].SetAutoKern( nAutoKern );
if( nAutoKern )
nAutoKern = KERNING_FONTSPECIFIC;
@@ -595,7 +595,7 @@ inline void SwFont::SetAutoKern( BYTE nAutoKern )
aSub[2].SetAutoKern( nAutoKern );
}
-inline void SwFont::SetTransparent( const BOOL bTrans )
+inline void SwFont::SetTransparent( const sal_Bool bTrans )
{
aSub[0].SetTransparent( bTrans );
aSub[1].SetTransparent( bTrans );
@@ -617,15 +617,15 @@ inline void SwFont::SetCaseMap( const SvxCaseMap eNew )
}
// gekapselte SV-Font-Methode
-inline void SwSubFont::SetWordLineMode( const BOOL bWordLineMode )
+inline void SwSubFont::SetWordLineMode( const sal_Bool bWordLineMode )
{
pMagic = 0;
Font::SetWordLineMode( bWordLineMode );
}
-inline void SwFont::SetWordLineMode( const BOOL bWordLineMode )
+inline void SwFont::SetWordLineMode( const sal_Bool bWordLineMode )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetWordLineMode( bWordLineMode );
aSub[1].SetWordLineMode( bWordLineMode );
aSub[2].SetWordLineMode( bWordLineMode );
@@ -639,17 +639,17 @@ inline void SwSubFont::SetEmphasisMark( const FontEmphasisMark eValue )
inline void SwFont::SetEmphasisMark( const FontEmphasisMark eValue )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetEmphasisMark( eValue );
aSub[1].SetEmphasisMark( eValue );
aSub[2].SetEmphasisMark( eValue );
}
-inline void SwFont::SetPropWidth( const USHORT nNew )
+inline void SwFont::SetPropWidth( const sal_uInt16 nNew )
{
if( nNew != aSub[0].GetPropWidth() )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetPropWidth( nNew );
aSub[1].SetPropWidth( nNew );
aSub[2].SetPropWidth( nNew );
@@ -667,7 +667,7 @@ inline void SwFont::SetRelief( const FontRelief eNew )
{
if( eNew != aSub[0].GetRelief() )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetRelief( eNew );
aSub[1].SetRelief( eNew );
aSub[2].SetRelief( eNew );
@@ -689,27 +689,27 @@ inline void SwSubFont::SetSize( const Size& rSize )
pMagic = 0;
}
-inline void SwFont::SetSize( const Size& rSize, const BYTE nWhich )
+inline void SwFont::SetSize( const Size& rSize, const sal_uInt8 nWhich )
{
if( aSub[nWhich].aSize != rSize )
{
aSub[nWhich].SetSize( rSize );
- bFntChg = TRUE;
- bOrgChg = TRUE;
+ bFntChg = sal_True;
+ bOrgChg = sal_True;
}
}
-inline void SwFont::SetActual( BYTE nNew )
+inline void SwFont::SetActual( sal_uInt8 nNew )
{
if ( nActual != nNew )
{
- bFntChg = TRUE;
- bOrgChg = TRUE;
+ bFntChg = sal_True;
+ bOrgChg = sal_True;
nActual = nNew;
}
}
-inline void SwSubFont::SetProportion( const BYTE nNewPropr )
+inline void SwSubFont::SetProportion( const sal_uInt8 nNewPropr )
{
pMagic = 0;
Font::SetSize( Size( (long) aSize.Width() * nNewPropr / 100L,
@@ -717,12 +717,12 @@ inline void SwSubFont::SetProportion( const BYTE nNewPropr )
SvxFont::SetPropr( nNewPropr );
}
-inline void SwFont::SetProportion( const BYTE nNewPropr )
+inline void SwFont::SetProportion( const sal_uInt8 nNewPropr )
{
if( nNewPropr != aSub[0].GetPropr() )
{
- bFntChg = TRUE;
- bOrgChg = TRUE;
+ bFntChg = sal_True;
+ bOrgChg = sal_True;
aSub[0].SetProportion( nNewPropr );
aSub[1].SetProportion( nNewPropr );
@@ -742,8 +742,8 @@ inline void SwFont::SetEscapement( const short nNewEsc )
{
// these have to be set, otherwise nOrgHeight and nOrgAscent will not
// be calculated
- bFntChg = TRUE;
- bOrgChg = TRUE;
+ bFntChg = sal_True;
+ bOrgChg = sal_True;
aSub[0].SetEscapement( nNewEsc );
aSub[1].SetEscapement( nNewEsc );
@@ -758,7 +758,7 @@ inline void SwSubFont::SetLanguage( LanguageType eNewLang )
SvxFont::SetLanguage( eNewLang );
}
-inline void SwFont::SetLanguage( const LanguageType eNewLang, const BYTE nWhich )
+inline void SwFont::SetLanguage( const LanguageType eNewLang, const sal_uInt8 nWhich )
{
aSub[nWhich].SetLanguage( eNewLang );
if( SW_CJK == nWhich )
@@ -769,42 +769,42 @@ inline void SwFont::SetLanguage( const LanguageType eNewLang, const BYTE nWhich
}
}
-inline void SwFont::SetPaintBlank( const BOOL bNew )
+inline void SwFont::SetPaintBlank( const sal_Bool bNew )
{
bPaintBlank = bNew;
}
-inline void SwFont::SetPaintWrong( const BOOL bNew )
+inline void SwFont::SetPaintWrong( const sal_Bool bNew )
{
bPaintWrong = bNew;
}
-inline void SwFont::SetNoHyph( const BOOL bNew )
+inline void SwFont::SetNoHyph( const sal_Bool bNew )
{
bNoHyph = bNew;
}
-inline void SwFont::SetBlink( const BOOL bNew )
+inline void SwFont::SetBlink( const sal_Bool bNew )
{
bBlink = bNew;
}
-inline void SwFont::SetURL( const BOOL bNew )
+inline void SwFont::SetURL( const sal_Bool bNew )
{
bURL = bNew;
}
-inline void SwFont::SetGreyWave( const BOOL bNew )
+inline void SwFont::SetGreyWave( const sal_Bool bNew )
{
bGreyWave = bNew;
}
-inline void SwFont::SetNoCol( const BOOL bNew )
+inline void SwFont::SetNoCol( const sal_Bool bNew )
{
bNoColReplace = bNew;
}
-inline void SwSubFont::SetVertical( const USHORT nDir, const BOOL bVertFormat )
+inline void SwSubFont::SetVertical( const sal_uInt16 nDir, const sal_Bool bVertFormat )
{
pMagic = 0;
Font::SetVertical( bVertFormat );
@@ -849,12 +849,12 @@ public:
class SvStatistics
{
public:
- USHORT nGetTextSize;
- USHORT nDrawText;
- USHORT nGetStretchTextSize;
- USHORT nDrawStretchText;
- USHORT nChangeFont;
- USHORT nGetFontMetric;
+ sal_uInt16 nGetTextSize;
+ sal_uInt16 nDrawText;
+ sal_uInt16 nGetStretchTextSize;
+ sal_uInt16 nDrawStretchText;
+ sal_uInt16 nChangeFont;
+ sal_uInt16 nGetFontMetric;
inline void Reset()
{
@@ -865,7 +865,7 @@ public:
inline SvStatistics() { Reset(); }
inline void PrintOn( SvStream &rOS ) const; //$ ostream
- inline BOOL IsEmpty() const
+ inline sal_Bool IsEmpty() const
{
return !( nGetTextSize || nDrawText ||
nDrawStretchText || nChangeFont || nGetFontMetric );
diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index 3ec749617aba..184e649b27ac 100644
--- a/sw/source/core/inc/tabfrm.hxx
+++ b/sw/source/core/inc/tabfrm.hxx
@@ -25,8 +25,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _TABFRM_HXX
-#define _TABFRM_HXX
+#ifndef SW_TABFRM_HXX
+#define SW_TABFRM_HXX
#include <tools/mempool.hxx>
#include "layfrm.hxx"
@@ -44,45 +44,45 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm
//Fuert Spezialbehandlung fuer _Get[Next|Prev]Leaf() durch.
using SwFrm::GetLeaf;
- SwLayoutFrm *GetLeaf( MakePageType eMakePage, BOOL bFwd );
+ SwLayoutFrm *GetLeaf( MakePageType eMakePage, sal_Bool bFwd );
SwTable* pTable;
- BOOL bComplete :1; //Eintrage als Repaint ohne das CompletePaint
+ sal_Bool bComplete :1; //Eintrage als Repaint ohne das CompletePaint
//der Basisklasse gesetzt werden muss. Damit
//sollen unertraegliche Tabellen-Repaints
//vermieden werden.
- BOOL bCalcLowers :1; //Im MakeAll auf jedenfall auch fuer Stabilitaet
+ sal_Bool bCalcLowers :1; //Im MakeAll auf jedenfall auch fuer Stabilitaet
//des Inhaltes sorgen.
- BOOL bLowersFormatted :1;//Kommunikation zwischen MakeAll und Layact
- BOOL bLockBackMove :1; //BackMove-Test hat der Master erledigt.
- BOOL bResizeHTMLTable :1; //Resize des HTMLTableLayout rufen im MakeAll
+ sal_Bool bLowersFormatted :1;//Kommunikation zwischen MakeAll und Layact
+ sal_Bool bLockBackMove :1; //BackMove-Test hat der Master erledigt.
+ sal_Bool bResizeHTMLTable :1; //Resize des HTMLTableLayout rufen im MakeAll
//Zur Optimierung, damit dies nicht im
//CntntFrm::Grow gerufen werden muss, denn dann
//wird es ggf. fuer jede Zelle gerufen #47483#
- BOOL bONECalcLowers :1; //Primaer fuer die StarONE-SS. Beim MakeAll werden
+ sal_Bool bONECalcLowers :1; //Primaer fuer die StarONE-SS. Beim MakeAll werden
//die Cntnts auf jedenfall per Calc() formatiert.
//es finden keine zusaetzlichen Invalidierungen
//statt und dieser Weg kann auch kaum garantien
//geben.
- BOOL bHasFollowFlowLine :1; // Means that the first line in the follow
+ sal_Bool bHasFollowFlowLine :1; // Means that the first line in the follow
// is indented to contain content from a broken
// cell
- BOOL bIsRebuildLastLine :1; // Means that currently the last line of the
+ sal_Bool bIsRebuildLastLine :1; // Means that currently the last line of the
// TabFrame is rebuilded. In this case we
// do not want any notification to the master
// table
- BOOL bRestrictTableGrowth :1; // Usually, the table may grow infinite,
+ sal_Bool bRestrictTableGrowth :1; // Usually, the table may grow infinite,
// because the table can be split in
// SwTabFrm::MakeAll. In MakeAll, this
// flag is set to indicate that the table
// may only grow inside its upper. This
// is necessary, in order to let the text
// flow into the FollowFlowLine
- BOOL bRemoveFollowFlowLinePending :1;
+ sal_Bool bRemoveFollowFlowLinePending :1;
// --> OD 2004-10-04 #i26945#
- BOOL bConsiderObjsForMinCellHeight :1; // Usually, the floating screen objects
+ sal_Bool bConsiderObjsForMinCellHeight :1; // Usually, the floating screen objects
// are considered on the calculation
// for the minimal cell height.
// For splitting table rows algorithm
@@ -92,10 +92,10 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm
// last table row.
// <--
// --> OD 2004-10-15 #i26945#
- BOOL bObjsDoesFit :1; // For splitting table rows algorithm, this boolean
+ sal_Bool bObjsDoesFit :1; // For splitting table rows algorithm, this boolean
// indicates, if the floating screen objects fits
// <--
- BOOL bDummy4 :1;
+ sal_Bool bDummy4 :1;
//Split() spaltet den Frm an der angegebenen Stelle, es wird ein
//Follow erzeugt und aufgebaut und direkt hinter this gepastet.
@@ -103,16 +103,16 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm
bool Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKeep );
bool Join();
- void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, BYTE &,
+ void _UpdateAttr( SfxPoolItem*, SfxPoolItem*, sal_uInt8 &,
SwAttrSetChg *pa = 0, SwAttrSetChg *pb = 0 );
- virtual BOOL ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL bHead, BOOL &rReformat );
+ virtual sal_Bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool bHead, sal_Bool &rReformat );
protected:
virtual void MakeAll();
virtual void Format( const SwBorderAttrs *pAttrs = 0 );
//Aendert nur die Framesize, nicht die PrtArea-SSize
- virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
+ virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
public:
SwTabFrm( SwTable & ); //Immer nach dem erzeugen _und_ pasten das
//Regist Flys rufen!
@@ -129,9 +129,10 @@ public:
SwTabFrm* FindMaster( bool bFirstMaster = false ) const;
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
- virtual BOOL GetInfo( SfxPoolItem &rHnt ) const;
- virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
- virtual void CheckDirection( BOOL bVert );
+ virtual sal_Bool GetInfo( SfxPoolItem &rHnt ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
+ virtual void CheckDirection( sal_Bool bVert );
virtual void Cut();
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 );
@@ -145,48 +146,48 @@ public:
const SwTable *GetTable() const { return pTable; }
SwTable *GetTable() { return pTable; }
- BOOL IsComplete() { return bComplete; }
- void SetComplete() { bComplete = TRUE; }
- void ResetComplete() { bComplete = FALSE; }
+ sal_Bool IsComplete() { return bComplete; }
+ void SetComplete() { bComplete = sal_True; }
+ void ResetComplete() { bComplete = sal_False; }
- BOOL IsLowersFormatted() const { return bLowersFormatted; }
- void SetLowersFormatted( BOOL b ) { bLowersFormatted = b; }
+ sal_Bool IsLowersFormatted() const { return bLowersFormatted; }
+ void SetLowersFormatted( sal_Bool b ) { bLowersFormatted = b; }
- void SetCalcLowers() { bCalcLowers = TRUE; } //Sparsam einsetzen!
- void SetResizeHTMLTable() { bResizeHTMLTable = TRUE; } //dito
- void SetONECalcLowers() { bONECalcLowers = TRUE; }
+ void SetCalcLowers() { bCalcLowers = sal_True; } //Sparsam einsetzen!
+ void SetResizeHTMLTable() { bResizeHTMLTable = sal_True; } //dito
+ void SetONECalcLowers() { bONECalcLowers = sal_True; }
//
// Start: New stuff for breaking table rows
//
- BOOL HasFollowFlowLine() const { return bHasFollowFlowLine; }
- void SetFollowFlowLine( BOOL bNew ) { bHasFollowFlowLine = bNew; }
+ sal_Bool HasFollowFlowLine() const { return bHasFollowFlowLine; }
+ void SetFollowFlowLine( sal_Bool bNew ) { bHasFollowFlowLine = bNew; }
- BOOL IsRebuildLastLine() const { return bIsRebuildLastLine; }
- void SetRebuildLastLine( BOOL bNew ) { bIsRebuildLastLine = bNew; }
+ sal_Bool IsRebuildLastLine() const { return bIsRebuildLastLine; }
+ void SetRebuildLastLine( sal_Bool bNew ) { bIsRebuildLastLine = bNew; }
- BOOL IsRestrictTableGrowth() const { return bRestrictTableGrowth; }
- void SetRestrictTableGrowth( BOOL bNew ) { bRestrictTableGrowth = bNew; }
+ sal_Bool IsRestrictTableGrowth() const { return bRestrictTableGrowth; }
+ void SetRestrictTableGrowth( sal_Bool bNew ) { bRestrictTableGrowth = bNew; }
- BOOL IsRemoveFollowFlowLinePending() const { return bRemoveFollowFlowLinePending; }
- void SetRemoveFollowFlowLinePending( BOOL bNew ) { bRemoveFollowFlowLinePending = bNew; }
+ sal_Bool IsRemoveFollowFlowLinePending() const { return bRemoveFollowFlowLinePending; }
+ void SetRemoveFollowFlowLinePending( sal_Bool bNew ) { bRemoveFollowFlowLinePending = bNew; }
// --> OD 2004-10-04 #i26945#
- BOOL IsConsiderObjsForMinCellHeight() const
+ sal_Bool IsConsiderObjsForMinCellHeight() const
{
return bConsiderObjsForMinCellHeight;
}
- void SetConsiderObjsForMinCellHeight( BOOL _bNewConsiderObjsForMinCellHeight )
+ void SetConsiderObjsForMinCellHeight( sal_Bool _bNewConsiderObjsForMinCellHeight )
{
bConsiderObjsForMinCellHeight = _bNewConsiderObjsForMinCellHeight;
}
// <--
// --> OD 2004-10-04 #i26945#
- BOOL DoesObjsFit() const
+ sal_Bool DoesObjsFit() const
{
return bObjsDoesFit;
}
- void SetDoesObjsFit( BOOL _bNewObjsDoesFit )
+ void SetDoesObjsFit( sal_Bool _bNewObjsDoesFit )
{
bObjsDoesFit = _bNewObjsDoesFit;
}
@@ -197,7 +198,7 @@ public:
// End: New stuff for breaking table rows
//
- BOOL CalcFlyOffsets( SwTwips& rUpper, long& rLeftOffset,
+ sal_Bool CalcFlyOffsets( SwTwips& rUpper, long& rLeftOffset,
long& rRightOffset ) const;
SwTwips CalcHeightOfFirstContentLine() const;
@@ -211,7 +212,7 @@ public:
bool IsCollapsingBorders() const;
// used for collapsing border lines:
- USHORT GetBottomLineSize() const;
+ sal_uInt16 GetBottomLineSize() const;
// <-- collapsing
DECL_FIXEDMEMPOOL_NEWDEL(SwTabFrm)
@@ -231,6 +232,6 @@ inline SwTabFrm *SwTabFrm::GetFollow()
return (SwTabFrm*)SwFlowFrm::GetFollow();
}
-#endif //_TABFRM_HXX
+#endif // SW_TABFRM_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/tblrwcl.hxx b/sw/source/core/inc/tblrwcl.hxx
index d4dae4dc4435..659ae318cc92 100644
--- a/sw/source/core/inc/tblrwcl.hxx
+++ b/sw/source/core/inc/tblrwcl.hxx
@@ -51,20 +51,20 @@ class SwShareBoxFmts;
class SwFmtFrmSize;
// Funktions Deklarationen:
-BOOL lcl_CopyRow( const _FndLine*& rpFndLine, void* pPara );
-BOOL lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara );
+sal_Bool lcl_CopyRow( const _FndLine*& rpFndLine, void* pPara );
+sal_Bool lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara );
-BOOL lcl_MergeGCBox( const SwTableBox*& rpBox, void* pPara );
-BOOL lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara );
+sal_Bool lcl_MergeGCBox( const SwTableBox*& rpBox, void* pPara );
+sal_Bool lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara );
-BOOL lcl_Merge_MoveBox( const _FndBox*& rpFndBox, void* pPara );
-BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara );
+sal_Bool lcl_Merge_MoveBox( const _FndBox*& rpFndBox, void* pPara );
+sal_Bool lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara );
-BOOL lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara );
-BOOL lcl_CopyLineToDoc( const _FndLine*& rpFndLn, void* pPara );
+sal_Bool lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara );
+sal_Bool lcl_CopyLineToDoc( const _FndLine*& rpFndLn, void* pPara );
-BOOL lcl_BoxSetHeadCondColl( const SwTableBox*& rpBox, void* pPara );
-BOOL lcl_LineSetHeadCondColl( const SwTableLine*& rpLine, void* pPara );
+sal_Bool lcl_BoxSetHeadCondColl( const SwTableBox*& rpBox, void* pPara );
+sal_Bool lcl_LineSetHeadCondColl( const SwTableLine*& rpLine, void* pPara );
#if OSL_DEBUG_LEVEL > 1
@@ -73,10 +73,10 @@ void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize );
void _InsTblBox( SwDoc* pDoc, SwTableNode* pTblNd,
SwTableLine* pLine, SwTableBoxFmt* pBoxFrmFmt,
- SwTableBox* pBox, USHORT nInsPos, USHORT nCnt = 1 );
+ SwTableBox* pBox, sal_uInt16 nInsPos, sal_uInt16 nCnt = 1 );
SW_DLLPUBLIC void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo = 0,
- BOOL bCalcNewSize = TRUE, const BOOL bCorrBorder = TRUE,
+ sal_Bool bCalcNewSize = sal_True, const sal_Bool bCorrBorder = sal_True,
SwShareBoxFmts* pShareFmts = 0 );
// Klasse fuers SplitTable
@@ -89,15 +89,15 @@ class SwCollectTblLineBoxes
SvUShorts aPosArr;
SwSelBoxes_SAR aBoxes;
SwHistory* pHst;
- USHORT nMode, nWidth;
- BOOL bGetFromTop : 1;
- BOOL bGetValues : 1;
+ sal_uInt16 nMode, nWidth;
+ sal_Bool bGetFromTop : 1;
+ sal_Bool bGetValues : 1;
public:
- SwCollectTblLineBoxes( BOOL bTop, USHORT nMd = 0, SwHistory* pHist=0 )
+ SwCollectTblLineBoxes( sal_Bool bTop, sal_uInt16 nMd = 0, SwHistory* pHist=0 )
: aPosArr( 16, 16 ), aBoxes( 16, 16 ),
pHst( pHist ), nMode( nMd ), nWidth( 0 ),
- bGetFromTop( bTop ), bGetValues( TRUE )
+ bGetFromTop( bTop ), bGetValues( sal_True )
{}
@@ -105,8 +105,8 @@ public:
const SwTableBox* GetBoxOfPos( const SwTableBox& rBox );
void AddToUndoHistory( const SwCntntNode& rNd );
- USHORT Count() const { return aBoxes.Count(); }
- const SwTableBox& GetBox( USHORT nPos, USHORT* pWidth = 0 ) const
+ sal_uInt16 Count() const { return aBoxes.Count(); }
+ const SwTableBox& GetBox( sal_uInt16 nPos, sal_uInt16* pWidth = 0 ) const
{
// hier wird die EndPos der Spalte benoetigt!
if( pWidth )
@@ -115,68 +115,68 @@ public:
return *aBoxes[ nPos ];
}
- BOOL IsGetFromTop() const { return bGetFromTop; }
- BOOL IsGetValues() const { return bGetValues; }
+ sal_Bool IsGetFromTop() const { return bGetFromTop; }
+ sal_Bool IsGetValues() const { return bGetValues; }
- USHORT GetMode() const { return nMode; }
- void SetValues( BOOL bFlag ) { bGetValues = FALSE; nWidth = 0;
+ sal_uInt16 GetMode() const { return nMode; }
+ void SetValues( sal_Bool bFlag ) { bGetValues = sal_False; nWidth = 0;
bGetFromTop = bFlag; }
- BOOL Resize( USHORT nOffset, USHORT nWidth );
+ sal_Bool Resize( sal_uInt16 nOffset, sal_uInt16 nWidth );
};
-BOOL lcl_Box_CollectBox( const SwTableBox*& rpBox, void* pPara );
-BOOL lcl_Line_CollectBox( const SwTableLine*& rpLine, void* pPara );
+sal_Bool lcl_Box_CollectBox( const SwTableBox*& rpBox, void* pPara );
+sal_Bool lcl_Line_CollectBox( const SwTableLine*& rpLine, void* pPara );
-BOOL lcl_BoxSetSplitBoxFmts( const SwTableBox*& rpBox, void* pPara );
+sal_Bool lcl_BoxSetSplitBoxFmts( const SwTableBox*& rpBox, void* pPara );
// This structure is needed by Undo to restore row span attributes
// when a table has been splitted into two tables
struct SwSaveRowSpan
{
- USHORT mnSplitLine; // the line number where the table has been splitted
+ sal_uInt16 mnSplitLine; // the line number where the table has been splitted
std::vector< long > mnRowSpans; // the row span attributes in this line
- SwSaveRowSpan( SwTableBoxes& rBoxes, USHORT nSplitLn );
+ SwSaveRowSpan( SwTableBoxes& rBoxes, sal_uInt16 nSplitLn );
};
struct _SwGCLineBorder
{
const SwTableLines* pLines;
SwShareBoxFmts* pShareFmts;
- USHORT nLinePos;
+ sal_uInt16 nLinePos;
_SwGCLineBorder( const SwTable& rTable )
: pLines( &rTable.GetTabLines() ), pShareFmts(0), nLinePos( 0 ) {}
_SwGCLineBorder( const SwTableBox& rBox )
: pLines( &rBox.GetTabLines() ), pShareFmts(0), nLinePos( 0 ) {}
- BOOL IsLastLine() const { return nLinePos + 1 >= pLines->Count(); }
+ sal_Bool IsLastLine() const { return nLinePos + 1 >= pLines->Count(); }
};
class _SwGCBorder_BoxBrd
{
const SvxBorderLine* pBrdLn;
- BOOL bAnyBorderFnd;
+ sal_Bool bAnyBorderFnd;
public:
- _SwGCBorder_BoxBrd() : pBrdLn( 0 ), bAnyBorderFnd( FALSE ) {}
+ _SwGCBorder_BoxBrd() : pBrdLn( 0 ), bAnyBorderFnd( sal_False ) {}
void SetBorder( const SvxBorderLine& rBorderLine )
- { pBrdLn = &rBorderLine; bAnyBorderFnd = FALSE; }
+ { pBrdLn = &rBorderLine; bAnyBorderFnd = sal_False; }
// checke, ob die linke Border dieselbe wie die gesetzte ist
- // returnt FALSE falls gar keine Border gesetzt ist
- BOOL CheckLeftBorderOfFormat( const SwFrmFmt& rFmt );
+ // returnt sal_False falls gar keine Border gesetzt ist
+ sal_Bool CheckLeftBorderOfFormat( const SwFrmFmt& rFmt );
- BOOL IsAnyBorderFound() const { return bAnyBorderFnd; }
+ sal_Bool IsAnyBorderFound() const { return bAnyBorderFnd; }
};
-BOOL lcl_GC_Line_Border( const SwTableLine*& , void* pPara );
-BOOL lcl_GC_Box_Border( const SwTableBox*& , void* pPara );
+sal_Bool lcl_GC_Line_Border( const SwTableLine*& , void* pPara );
+sal_Bool lcl_GC_Box_Border( const SwTableBox*& , void* pPara );
-BOOL lcl_GCBorder_ChkBoxBrd_L( const SwTableLine*& , void* pPara );
-BOOL lcl_GCBorder_ChkBoxBrd_B( const SwTableBox*& , void* pPara );
+sal_Bool lcl_GCBorder_ChkBoxBrd_L( const SwTableLine*& , void* pPara );
+sal_Bool lcl_GCBorder_ChkBoxBrd_B( const SwTableBox*& , void* pPara );
-BOOL lcl_GCBorder_GetLastBox_L( const SwTableLine*& , void* pPara );
-BOOL lcl_GCBorder_GetLastBox_B( const SwTableBox*& , void* pPara );
+sal_Bool lcl_GCBorder_GetLastBox_L( const SwTableLine*& , void* pPara );
+sal_Bool lcl_GCBorder_GetLastBox_B( const SwTableBox*& , void* pPara );
class SwShareBoxFmt
@@ -194,8 +194,8 @@ public:
SwFrmFmt* GetFormat( long nWidth ) const;
SwFrmFmt* GetFormat( const SfxPoolItem& rItem ) const;
void AddFormat( const SwFrmFmt& rFmt );
- // returnt TRUE, wenn geloescht werden kann
- BOOL RemoveFormat( const SwFrmFmt& rFmt );
+ // returnt sal_True, wenn geloescht werden kann
+ sal_Bool RemoveFormat( const SwFrmFmt& rFmt );
};
@@ -204,7 +204,7 @@ SV_DECL_PTRARR_DEL( _SwShareBoxFmts, SwShareBoxFmt*, 8, 8 )
class SwShareBoxFmts
{
_SwShareBoxFmts aShareArr;
- BOOL Seek_Entry( const SwFrmFmt& rFmt, USHORT* pPos ) const;
+ sal_Bool Seek_Entry( const SwFrmFmt& rFmt, sal_uInt16* pPos ) const;
void ChangeFrmFmt( SwTableBox* pBox, SwTableLine* pLn, SwFrmFmt& rFmt );
diff --git a/sw/source/core/inc/toxhlp.hxx b/sw/source/core/inc/toxhlp.hxx
index d3739196ddcd..b254874009bf 100644
--- a/sw/source/core/inc/toxhlp.hxx
+++ b/sw/source/core/inc/toxhlp.hxx
@@ -60,7 +60,7 @@ public:
String GetIndexKey( const String& rTxt, const String& rTxtReading,
const STAR_NMSPC::lang::Locale& rLocale ) const;
- String GetFollowingText( BOOL bMorePages ) const;
+ String GetFollowingText( sal_Bool bMorePages ) const;
STAR_NMSPC::uno::Sequence< ::rtl::OUString >
GetAlgorithmList( const STAR_NMSPC::lang::Locale& rLcl ) const;
diff --git a/sw/source/core/inc/txmsrt.hxx b/sw/source/core/inc/txmsrt.hxx
index dc65ace860f8..75ad22213c79 100644
--- a/sw/source/core/inc/txmsrt.hxx
+++ b/sw/source/core/inc/txmsrt.hxx
@@ -25,8 +25,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _TXMSRT_HXX
-#define _TXMSRT_HXX
+#ifndef SW_TXMSRT_HXX
+#define SW_TXMSRT_HXX
#include <i18npool/lang.h>
#include <tox.hxx>
@@ -56,10 +56,10 @@ struct SwTOXSource
{
const SwCntntNode* pNd;
xub_StrLen nPos;
- BOOL bMainEntry;
+ sal_Bool bMainEntry;
- SwTOXSource() : pNd(0), nPos(0), bMainEntry(FALSE) {}
- SwTOXSource( const SwCntntNode* pNode, xub_StrLen n, BOOL bMain )
+ SwTOXSource() : pNd(0), nPos(0), bMainEntry(sal_False) {}
+ SwTOXSource( const SwCntntNode* pNode, xub_StrLen n, sal_Bool bMain )
: pNd(pNode), nPos(n), bMainEntry(bMain)
{}
};
@@ -72,12 +72,12 @@ class SwTOXInternational
CharClass* pCharClass;
LanguageType eLang;
String sSortAlgorithm;
- USHORT nOptions;
+ sal_uInt16 nOptions;
void Init();
public:
- SwTOXInternational( LanguageType nLang, USHORT nOptions,
+ SwTOXInternational( LanguageType nLang, sal_uInt16 nOptions,
const String& rSortAlgorithm );
SwTOXInternational( const SwTOXInternational& );
~SwTOXInternational();
@@ -87,7 +87,7 @@ public:
const String& rTxt2, const String& rTxtReading2,
const ::com::sun::star::lang::Locale& rLocale2 ) const;
- inline BOOL IsEqual( const String& rTxt1, const String& rTxtReading1,
+ inline sal_Bool IsEqual( const String& rTxt1, const String& rTxtReading1,
const ::com::sun::star::lang::Locale& rLocale1,
const String& rTxt2, const String& rTxtReading2,
const ::com::sun::star::lang::Locale& rLocale2 ) const
@@ -96,7 +96,7 @@ public:
rTxt2, rTxtReading2, rLocale2 );
}
- inline BOOL IsLess( const String& rTxt1, const String& rTxtReading1,
+ inline sal_Bool IsLess( const String& rTxt1, const String& rTxtReading1,
const ::com::sun::star::lang::Locale& rLocale1,
const String& rTxt2, const String& rTxtReading2,
const ::com::sun::star::lang::Locale& rLocale2 ) const
@@ -108,10 +108,10 @@ public:
String GetIndexKey( const String& rTxt, const String& rTxtReading,
const ::com::sun::star::lang::Locale& rLcl ) const;
- String GetFollowingText( BOOL bMorePages ) const;
+ String GetFollowingText( sal_Bool bMorePages ) const;
String ToUpper( const String& rStr, xub_StrLen nPos ) const;
- inline BOOL IsNumeric( const String& rStr ) const;
+ inline sal_Bool IsNumeric( const String& rStr ) const;
};
/*--------------------------------------------------------------------
@@ -125,10 +125,10 @@ struct SwTOXSortTabBase
const SwTxtNode* pTOXNd;
const SwTxtTOXMark* pTxtMark;
const SwTOXInternational* pTOXIntl;
- ULONG nPos;
+ sal_uLong nPos;
xub_StrLen nCntPos;
- USHORT nType;
- static USHORT nOpt;
+ sal_uInt16 nType;
+ static sal_uInt16 nOpt;
SwTOXSortTabBase( TOXSortType nType,
const SwCntntNode* pTOXSrc,
@@ -137,13 +137,13 @@ struct SwTOXSortTabBase
const ::com::sun::star::lang::Locale* pLocale = NULL );
virtual ~SwTOXSortTabBase() {}
- USHORT GetType() const { return nType; }
- USHORT GetOptions() const { return nOpt; }
+ sal_uInt16 GetType() const { return nType; }
+ sal_uInt16 GetOptions() const { return nOpt; }
- virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT nAuthField = 0) const;
- virtual USHORT GetLevel() const = 0;
- virtual BOOL operator==( const SwTOXSortTabBase& );
- virtual BOOL operator<( const SwTOXSortTabBase& );
+ virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 nAuthField = 0) const;
+ virtual sal_uInt16 GetLevel() const = 0;
+ virtual sal_Bool operator==( const SwTOXSortTabBase& );
+ virtual sal_Bool operator<( const SwTOXSortTabBase& );
virtual String GetURL() const;
@@ -151,11 +151,11 @@ struct SwTOXSortTabBase
inline const ::com::sun::star::lang::Locale& GetLocale() const;
private:
- BOOL bValidTxt;
+ sal_Bool bValidTxt;
String sSortTxt;
String sSortTxtReading;
- virtual void _GetText( String&, String& ) = 0;
+ virtual void GetText_Impl( String&, String& ) const = 0;
};
inline void SwTOXSortTabBase::GetTxt( String& rSortTxt,
@@ -164,8 +164,8 @@ inline void SwTOXSortTabBase::GetTxt( String& rSortTxt,
if( !bValidTxt )
{
SwTOXSortTabBase* pThis = (SwTOXSortTabBase*)this;
- pThis->_GetText( pThis->sSortTxt, pThis->sSortTxtReading );
- pThis->bValidTxt = TRUE;
+ pThis->GetText_Impl( pThis->sSortTxt, pThis->sSortTxtReading );
+ pThis->bValidTxt = sal_True;
}
rSortTxt = sSortTxt;
@@ -183,40 +183,40 @@ inline const ::com::sun::star::lang::Locale& SwTOXSortTabBase::GetLocale() const
struct SwTOXIndex : public SwTOXSortTabBase
{
- SwTOXIndex( const SwTxtNode&, const SwTxtTOXMark*, USHORT nOptions, BYTE nKeyLevel,
+ SwTOXIndex( const SwTxtNode&, const SwTxtTOXMark*, sal_uInt16 nOptions, sal_uInt8 nKeyLevel,
const SwTOXInternational& rIntl,
const ::com::sun::star::lang::Locale& rLocale );
virtual ~SwTOXIndex() {}
- virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT nAuthField = 0 ) const;
- virtual USHORT GetLevel() const;
- virtual BOOL operator==( const SwTOXSortTabBase& );
- virtual BOOL operator<( const SwTOXSortTabBase& );
+ virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 nAuthField = 0 ) const;
+ virtual sal_uInt16 GetLevel() const;
+ virtual sal_Bool operator==( const SwTOXSortTabBase& );
+ virtual sal_Bool operator<( const SwTOXSortTabBase& );
private:
- virtual void _GetText( String&, String& );
+ virtual void GetText_Impl( String&, String& ) const;
- BYTE nKeyLevel;
+ sal_uInt8 nKeyLevel;
};
struct SwTOXCustom : public SwTOXSortTabBase
{
- SwTOXCustom( const String& rKey, const String& rReading, USHORT nLevel,
+ SwTOXCustom( const String& rKey, const String& rReading, sal_uInt16 nLevel,
const SwTOXInternational& rIntl,
const ::com::sun::star::lang::Locale& rLocale );
virtual ~SwTOXCustom() {}
- virtual USHORT GetLevel() const;
- virtual BOOL operator==( const SwTOXSortTabBase& );
- virtual BOOL operator<( const SwTOXSortTabBase& );
+ virtual sal_uInt16 GetLevel() const;
+ virtual sal_Bool operator==( const SwTOXSortTabBase& );
+ virtual sal_Bool operator<( const SwTOXSortTabBase& );
private:
- virtual void _GetText( String&, String& );
+ virtual void GetText_Impl( String&, String& ) const;
String aKey;
String sReading;
- USHORT nLev;
+ sal_uInt16 nLev;
};
/*--------------------------------------------------------------------
@@ -229,30 +229,30 @@ struct SwTOXContent : public SwTOXSortTabBase
const SwTOXInternational& rIntl );
virtual ~SwTOXContent() {}
- virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT nAuthField = 0 ) const;
- virtual USHORT GetLevel() const;
+ virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 nAuthField = 0 ) const;
+ virtual sal_uInt16 GetLevel() const;
private:
- virtual void _GetText( String&, String& );
+ virtual void GetText_Impl( String&, String& ) const;
};
struct SwTOXPara : public SwTOXSortTabBase
{
- SwTOXPara( const SwCntntNode&, SwTOXElement, USHORT nLevel = FORM_ALPHA_DELIMITTER );
+ SwTOXPara( const SwCntntNode&, SwTOXElement, sal_uInt16 nLevel = FORM_ALPHA_DELIMITTER );
virtual ~SwTOXPara() {}
void SetStartIndex( xub_StrLen nSet) { nStartIndex = nSet;}
void SetEndIndex( xub_StrLen nSet ) { nEndIndex = nSet;}
- virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT nAuthField = 0 ) const;
- virtual USHORT GetLevel() const;
+ virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 nAuthField = 0 ) const;
+ virtual sal_uInt16 GetLevel() const;
virtual String GetURL() const;
private:
- virtual void _GetText( String&, String& );
+ virtual void GetText_Impl( String&, String& ) const;
SwTOXElement eType;
- USHORT m_nLevel;
+ sal_uInt16 m_nLevel;
xub_StrLen nStartIndex;
xub_StrLen nEndIndex;
};
@@ -262,23 +262,23 @@ struct SwTOXTable : public SwTOXSortTabBase
SwTOXTable( const SwCntntNode& rNd );
virtual ~SwTOXTable() {}
- void SetLevel(USHORT nSet){nLevel = nSet;}
+ void SetLevel(sal_uInt16 nSet){nLevel = nSet;}
- virtual USHORT GetLevel() const;
+ virtual sal_uInt16 GetLevel() const;
virtual String GetURL() const;
private:
- virtual void _GetText( String&, String& );
+ virtual void GetText_Impl( String&, String& ) const;
- USHORT nLevel;
+ sal_uInt16 nLevel;
};
struct SwTOXAuthority : public SwTOXSortTabBase
{
private:
SwFmtFld& m_rField;
- virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT nAuthField = 0 ) const;
- virtual void _GetText( String&, String& );
+ virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 nAuthField = 0 ) const;
+ virtual void GetText_Impl( String&, String& ) const;
public:
SwTOXAuthority( const SwCntntNode& rNd, SwFmtFld& rField, const SwTOXInternational& rIntl );
@@ -286,12 +286,12 @@ public:
SwFmtFld& GetFldFmt() {return m_rField;}
- virtual BOOL operator==( const SwTOXSortTabBase& );
- virtual BOOL operator<( const SwTOXSortTabBase& );
- virtual USHORT GetLevel() const;
+ virtual sal_Bool operator==( const SwTOXSortTabBase& );
+ virtual sal_Bool operator<( const SwTOXSortTabBase& );
+ virtual sal_uInt16 GetLevel() const;
};
-#endif // _TXMSRT_HXX
+#endif // SW_TXMSRT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 59cb5d902fc2..fcb88f8b038c 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -25,8 +25,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _TXTFRM_HXX
-#define _TXTFRM_HXX
+#ifndef SW_TXTFRM_HXX
+#define SW_TXTFRM_HXX
+
#include <tools/mempool.hxx>
#include <tools/string.hxx>
#include "cntfrm.hxx"
@@ -66,14 +67,14 @@ class SwTxtFrm: public SwCntntFrm
friend class SwTestFormat;
friend class WidowsAndOrphans;
friend class SwTxtFrmLocker; // duerfen Lock()/Unlock()
- friend sal_Bool lcl_ChangeOffset( SwTxtFrm* pFrm, USHORT nNew );
+ friend sal_Bool lcl_ChangeOffset( SwTxtFrm* pFrm, sal_uInt16 nNew );
static SwCache *pTxtCache; //Pointer auf den Line-Cache
static long nMinPrtLine; //Diese Linie darf beim Drucken nicht
//unterschritten werden, Hack fuer Tabellenzellen ueber mehrere Seiten
- ULONG nAllLines :24;//Anzahl der Zeilen fuer das Paint (inkl. nThisLines)
- ULONG nThisLines :8; //Anzahl der Zeilen dieses Frames
+ sal_uLong nAllLines :24;//Anzahl der Zeilen fuer das Paint (inkl. nThisLines)
+ sal_uLong nThisLines :8; //Anzahl der Zeilen dieses Frames
// The x position for flys anchored at this paragraph.
// These values are calculated in SwTxtFrm::CalcBaseOfstForFly()
@@ -93,7 +94,7 @@ class SwTxtFrm: public SwCntntFrm
xub_StrLen nOfst; //nOfst gibt den Offset im Cntnt (Anzahl Zeichen) an.
- USHORT nCacheIdx; //Index in den Cache, USHRT_MAX wenn definitiv
+ sal_uInt16 nCacheIdx; //Index in den Cache, USHRT_MAX wenn definitiv
//kein passendes Objekt im Cache steht.
//Teilt den Master ab und erzeugt einen Follow oder passt die
@@ -114,7 +115,7 @@ class SwTxtFrm: public SwCntntFrm
// wertet in Format() die Preps aus.
sal_Bool CalcPreps();
- void PrepWidows( const USHORT nNeed, sal_Bool bNotify = sal_True );
+ void PrepWidows( const sal_uInt16 nNeed, sal_Bool bNotify = sal_True );
void _InvalidateRange( const SwCharRange &, const long = 0);
inline void InvalidateRange( const SwCharRange &, const long = 0);
@@ -234,11 +235,11 @@ public:
void Init();
// Wird von FormatSpelling( ) gerufen
- SwRect _AutoSpell( const SwCntntNode*, const SwViewOption&, USHORT );
+ SwRect _AutoSpell( const SwCntntNode*, const SwViewOption&, sal_uInt16 );
// is called from the FormatSpelling( ) method
- SwRect SmartTagScan( SwCntntNode* , USHORT );
+ SwRect SmartTagScan( SwCntntNode* , sal_uInt16 );
// Wird vom CollectAutoCmplWords gerufen
- void CollectAutoCmplWrds( SwCntntNode* , USHORT );
+ void CollectAutoCmplWrds( SwCntntNode* , sal_uInt16 );
// Returns the screen position of rPos. The values are relative to the upper
// left position of the page frame.
@@ -291,7 +292,8 @@ public:
void PaintExtraData( const SwRect & rRect ) const; //Seitennummer usw.
SwRect Paint();
- virtual void Paint( const SwRect &, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
virtual sal_Bool GetInfo( SfxPoolItem & ) const;
@@ -311,16 +313,16 @@ public:
// Prepares the cursor position for a visual cursor move (BiDi).
// The behaviour is different for insert and overwrite cursors
- void PrepareVisualMove( xub_StrLen& nPos, BYTE& nCrsrLevel,
+ void PrepareVisualMove( xub_StrLen& nPos, sal_uInt8& nCrsrLevel,
sal_Bool& bRight, sal_Bool bInsertCrsr );
// Methoden zur Verwaltung von FolgeFrames
SwCntntFrm *SplitFrm( const xub_StrLen nTxtPos );
SwCntntFrm *JoinFrm();
- inline USHORT GetOfst() const { return nOfst; }
- void _SetOfst( const USHORT nNewOfst );
- inline void SetOfst ( const USHORT nNewOfst );
- inline void ManipOfst ( const USHORT nNewOfst ){ nOfst = nNewOfst; }
+ inline sal_uInt16 GetOfst() const { return nOfst; }
+ void _SetOfst( const sal_uInt16 nNewOfst );
+ inline void SetOfst ( const sal_uInt16 nNewOfst );
+ inline void ManipOfst ( const sal_uInt16 nNewOfst ){ nOfst = nNewOfst; }
SwTxtFrm *GetFrmAtPos ( const SwPosition &rPos);
inline const SwTxtFrm *GetFrmAtPos ( const SwPosition &rPos) const;
// OD 07.10.2003 #110978# - return <reference> instead of <pointer>
@@ -441,10 +443,10 @@ public:
inline SwTwips GetRightMargin() const;
virtual void Format( const SwBorderAttrs *pAttrs = 0 );
- virtual void CheckDirection( BOOL bVert );
+ virtual void CheckDirection( sal_Bool bVert );
// Liefert die Summe der Zeilenhoehen in pLine zurueck.
- USHORT GetParHeight() const;
+ sal_uInt16 GetParHeight() const;
// Liefert die Resthoehe zurueck
inline SwTwips GetRstHeight() const;
@@ -481,8 +483,8 @@ public:
static long GetMinPrtLine() { return nMinPrtLine; }
static void SetMinPrtLine( long nNew ) { nMinPrtLine = nNew; }
- inline USHORT GetCacheIdx() const { return nCacheIdx; }
- inline void SetCacheIdx( const USHORT nNew ) { nCacheIdx = nNew; }
+ inline sal_uInt16 GetCacheIdx() const { return nCacheIdx; }
+ inline void SetCacheIdx( const sal_uInt16 nNew ) { nCacheIdx = nNew; }
//Entfert die Line-Informationen aus dem Cache.
void ClearPara();
@@ -516,23 +518,23 @@ public:
long GetLineSpace( const bool _bNoPropLineSpacing = false ) const;
// liefert die erste Zeilenhoehe zurueck
- USHORT FirstLineHeight() const;
+ sal_uInt16 FirstLineHeight() const;
// Haengt FlyInCntFrm um, wenn nEnd > Index >= nStart ist.
- void MoveFlyInCnt( SwTxtFrm *pNew, USHORT nStart, USHORT nEnd );
+ void MoveFlyInCnt( SwTxtFrm *pNew, sal_uInt16 nStart, sal_uInt16 nEnd );
// Berechnet die Position von FlyInCntFrms
- USHORT CalcFlyPos( SwFrmFmt* pSearch );
+ sal_uInt16 CalcFlyPos( SwFrmFmt* pSearch );
// Ermittelt die Startposition und Schrittweite des Registers
- sal_Bool FillRegister( SwTwips& rRegStart, USHORT& rRegDiff );
+ sal_Bool FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff );
- USHORT GetLineCount( USHORT nPos ); //Ermittelt die Zeilenanzahl
+ sal_uInt16 GetLineCount( sal_uInt16 nPos ); //Ermittelt die Zeilenanzahl
//Fuer die Anzeige der Zeilennummern.
- ULONG GetAllLines() const { return nAllLines; }
- ULONG GetThisLines() const { return nThisLines;}
+ sal_uLong GetAllLines() const { return nAllLines; }
+ sal_uLong GetThisLines() const { return nThisLines;}
void RecalcAllLines();
// Stoppt Animationen innerhalb von Numerierungen
diff --git a/sw/source/core/inc/txttypes.hxx b/sw/source/core/inc/txttypes.hxx
index 748ea9334a62..86d9e5cd07a6 100644
--- a/sw/source/core/inc/txttypes.hxx
+++ b/sw/source/core/inc/txttypes.hxx
@@ -32,10 +32,10 @@
// Ueberpruefte USHORTs, z.B. Indizes auf Arrays oder garantiert kleine
// Integerwerte, auch von aussen vorgegebene
-#define MSHORT USHORT
+#define MSHORT sal_uInt16
#define MSHRT_MAX USHRT_MAX
// Koordinaten: Breite, Hoehe und Offsets in X-/Y-Richtung sowie Ascent etc.
-#define KSHORT USHORT
+#define KSHORT sal_uInt16
#define KSHRT_MAX USHRT_MAX
// Portiontypen
diff --git a/sw/source/core/inc/undoflystrattr.hxx b/sw/source/core/inc/undoflystrattr.hxx
index c0fe45013246..9a44ae2310c3 100644
--- a/sw/source/core/inc/undoflystrattr.hxx
+++ b/sw/source/core/inc/undoflystrattr.hxx
@@ -25,8 +25,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _UNDO_FLY_STR_ATTR_HXX
-#define _UNDO_FLY_STR_ATTR_HXX
+#ifndef SW_UNDO_FLY_STR_ATTR_HXX
+#define SW_UNDO_FLY_STR_ATTR_HXX
#include <undobj.hxx>
#include <swundo.hxx>
@@ -43,9 +43,8 @@ class SwUndoFlyStrAttr : public SwUndo
const String& sNewStr );
virtual ~SwUndoFlyStrAttr();
- virtual void Undo( SwUndoIter & rIt );
- virtual void Redo( SwUndoIter & rIt );
- virtual void Repeat( SwUndoIter & rIt );
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
virtual SwRewriter GetRewriter() const;
@@ -55,6 +54,6 @@ class SwUndoFlyStrAttr : public SwUndo
const String msNewStr;
};
-#endif // _UNDO_FLY_STR_ATTR_HXX
+#endif // SW_UNDO_FLY_STR_ATTR_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/unometa.hxx b/sw/source/core/inc/unometa.hxx
index 391515bcf267..92333a46ca8a 100644
--- a/sw/source/core/inc/unometa.hxx
+++ b/sw/source/core/inc/unometa.hxx
@@ -85,7 +85,7 @@ protected:
virtual void SAL_CALL AttachImpl(
const ::com::sun::star::uno::Reference<
::com::sun::star::text::XTextRange > & xTextRange,
- const USHORT nWhich)
+ const sal_uInt16 nWhich)
throw (::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException);
diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx
index 7cb12e215d29..84a840f43bc3 100644
--- a/sw/source/core/inc/viewimp.hxx
+++ b/sw/source/core/inc/viewimp.hxx
@@ -25,8 +25,10 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _VIEWIMP_HXX
-#define _VIEWIMP_HXX
+#ifndef SW_VIEWIMP_HXX
+#define SW_VIEWIMP_HXX
+
+#include <vector>
#include <vcl/timer.hxx>
#include <tools/color.hxx>
@@ -53,10 +55,9 @@ struct SdrPaintProcRec;
class SwAccessibleMap;
class SdrObject;
class Fraction;
-class SwPrtOptions;
+class SwPrintData;
class SwPagePreviewLayout;
struct PrevwPage;
-#include <vector>
class SwTxtFrm;
class SwViewImp
@@ -89,15 +90,15 @@ class SwViewImp
mutable const SdrObject * pSdrObjCached;
mutable String sSdrObjCachedComment;
- BOOL bFirstPageInvalid :1; //Pointer auf erste Seite ungueltig?
+ sal_Bool bFirstPageInvalid :1; //Pointer auf erste Seite ungueltig?
- BOOL bResetHdlHiddenPaint:1;// -- "" --
+ sal_Bool bResetHdlHiddenPaint:1;// -- "" --
- BOOL bSmoothUpdate :1; //Meber fuer SmoothScroll
- BOOL bStopSmooth :1;
- BOOL bStopPrt :1; // Stop Printing
+ sal_Bool bSmoothUpdate :1; //Meber fuer SmoothScroll
+ sal_Bool bStopSmooth :1;
+ sal_Bool bStopPrt :1; // Stop Printing
- USHORT nRestoreActions ; //Die Anzahl der zu restaurierenden Actions (UNO)
+ sal_uInt16 nRestoreActions ; //Die Anzahl der zu restaurierenden Actions (UNO)
SwRect aSmoothRect;
SwPagePreviewLayout* mpPgPrevwLayout;
@@ -112,16 +113,16 @@ class SwViewImp
/**
Returns if printer shall be stopped.
- @retval TRUE The printer shall be stopped.
- @retval FALSE else
+ @retval sal_True The printer shall be stopped.
+ @retval sal_False else
*/
- BOOL IsStopPrt() { return bStopPrt; }
+ sal_Bool IsStopPrt() { return bStopPrt; }
/**
Resets signal for stopping printing.
*/
- void ResetStopPrt() { bStopPrt = FALSE; }
+ void ResetStopPrt() { bStopPrt = sal_False; }
void SetFirstVisPage(); //Neue Ermittlung der ersten sichtbaren Seite
@@ -182,14 +183,14 @@ public:
//Verwaltung zur ersten sichtbaren Seite
inline const SwPageFrm *GetFirstVisPage() const;
inline SwPageFrm *GetFirstVisPage();
- void SetFirstVisPageInvalid() { bFirstPageInvalid = TRUE; }
+ void SetFirstVisPageInvalid() { bFirstPageInvalid = sal_True; }
- BOOL AddPaintRect( const SwRect &rRect );
+ sal_Bool AddPaintRect( const SwRect &rRect );
SwRegionRects *GetRegion() { return pRegion; }
void DelRegion();
// neues Interface fuer StarView Drawing
- inline BOOL HasDrawView() const { return 0 != pDrawView; }
+ inline sal_Bool HasDrawView() const { return 0 != pDrawView; }
SwDrawView* GetDrawView() { return pDrawView; }
const SwDrawView* GetDrawView() const { return pDrawView; }
SdrPageView*GetPageView() { return pSdrPageView; }
@@ -207,7 +208,7 @@ public:
// correct type of 1st parameter
void PaintLayer( const SdrLayerID _nLayerID,
- const SwPrtOptions *pPrintData,
+ SwPrintData const*const pPrintData,
const SwRect& _rRect,
const Color* _pPageBackgrdColor = 0,
const bool _bIsPageRightToLeft = false ) const;
@@ -216,12 +217,12 @@ public:
//gepaintet wird oder nicht.
// Interface Drawing
- BOOL IsDragPossible( const Point &rPoint );
+ sal_Bool IsDragPossible( const Point &rPoint );
void NotifySizeChg( const Size &rNewSz );
//SS Fuer die Lay- bzw. IdleAction und verwandtes
- BOOL IsAction() const { return pLayAct != 0; }
- BOOL IsIdleAction() const { return pIdleAct != 0; }
+ sal_Bool IsAction() const { return pLayAct != 0; }
+ sal_Bool IsIdleAction() const { return pIdleAct != 0; }
SwLayAction &GetLayAction() { return *pLayAct; }
const SwLayAction &GetLayAction() const { return *pLayAct; }
SwLayIdle &GetIdleAction() { return *pIdleAct;}
@@ -230,13 +231,13 @@ public:
//Wenn eine Aktion laueft wird diese gebeten zu pruefen ob es
//an der zeit ist den WaitCrsr einzuschalten.
void CheckWaitCrsr();
- BOOL IsCalcLayoutProgress() const; //Fragt die LayAction wenn vorhanden.
- //TRUE wenn eine LayAction laeuft, dort wird dann auch das Flag fuer
+ sal_Bool IsCalcLayoutProgress() const; //Fragt die LayAction wenn vorhanden.
+ //sal_True wenn eine LayAction laeuft, dort wird dann auch das Flag fuer
//ExpressionFields gesetzt.
- BOOL IsUpdateExpFlds();
+ sal_Bool IsUpdateExpFlds();
- void SetRestoreActions(USHORT nSet){nRestoreActions = nSet;}
- USHORT GetRestoreActions() const{return nRestoreActions;}
+ void SetRestoreActions(sal_uInt16 nSet){nRestoreActions = nSet;}
+ sal_uInt16 GetRestoreActions() const{return nRestoreActions;}
void InitPagePreviewLayout();
@@ -347,6 +348,6 @@ inline void SwViewImp::AddAccessibleObj( const SdrObject *pObj )
SwRect aEmptyRect;
MoveAccessible( 0, pObj, aEmptyRect );
}
-#endif //_VIEWIMP_HXX
+#endif // SW_VIEWIMP_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/wrong.hxx b/sw/source/core/inc/wrong.hxx
index 1de852514a74..71e00c1c9e46 100644
--- a/sw/source/core/inc/wrong.hxx
+++ b/sw/source/core/inc/wrong.hxx
@@ -78,8 +78,8 @@ class SwWrongList
{ if( rPos >= nStart ) rPos += nStart - nEnd; }
void _Invalidate( xub_StrLen nBegin, xub_StrLen nEnd );
- void Insert(USHORT nWhere, std::vector<SwWrongArea>::iterator startPos, std::vector<SwWrongArea>::iterator endPos);
- void Remove( USHORT nIdx, USHORT nLen );
+ void Insert(sal_uInt16 nWhere, std::vector<SwWrongArea>::iterator startPos, std::vector<SwWrongArea>::iterator endPos);
+ void Remove( sal_uInt16 nIdx, sal_uInt16 nLen );
// forbidden and not implemented
SwWrongList& operator= (const SwWrongList &);
@@ -95,15 +95,15 @@ public:
inline WrongListType GetWrongListType() const { return meType; }
inline xub_StrLen GetBeginInv() const { return nBeginInvalid; }
inline xub_StrLen GetEndInv() const { return nEndInvalid; }
- inline BOOL InsideInvalid( xub_StrLen nChk ) const
+ inline sal_Bool InsideInvalid( xub_StrLen nChk ) const
{ return nChk >= nBeginInvalid && nChk <= nEndInvalid; }
void SetInvalid( xub_StrLen nBegin, xub_StrLen nEnd );
inline void Validate(){ nBeginInvalid = STRING_LEN; }
void Invalidate( xub_StrLen nBegin, xub_StrLen nEnd );
- BOOL InvalidateWrong();
- BOOL Fresh( xub_StrLen &rStart, xub_StrLen &rEnd, xub_StrLen nPos,
- xub_StrLen nLen, USHORT nIndex, xub_StrLen nCursorPos );
- USHORT GetWrongPos( xub_StrLen nValue ) const;
+ sal_Bool InvalidateWrong();
+ sal_Bool Fresh( xub_StrLen &rStart, xub_StrLen &rEnd, xub_StrLen nPos,
+ xub_StrLen nLen, sal_uInt16 nIndex, xub_StrLen nCursorPos );
+ sal_uInt16 GetWrongPos( xub_StrLen nValue ) const;
sal_Bool Check( xub_StrLen &rChk, xub_StrLen &rLn ) const;
sal_Bool InWrongWord( xub_StrLen &rChk, xub_StrLen &rLn ) const;
@@ -119,21 +119,21 @@ public:
// the other wrong list has to be inserted.
void JoinList( SwWrongList* pNext, xub_StrLen nInsertPos );
- inline xub_StrLen Len( USHORT nIdx ) const
+ inline xub_StrLen Len( sal_uInt16 nIdx ) const
{
return nIdx < maList.size() ? maList[nIdx].mnLen : 0;
}
- inline xub_StrLen Pos( USHORT nIdx ) const
+ inline xub_StrLen Pos( sal_uInt16 nIdx ) const
{
return nIdx < maList.size() ? maList[nIdx].mnPos : 0;
}
- inline USHORT Count() const { return (USHORT)maList.size(); }
+ inline sal_uInt16 Count() const { return (sal_uInt16)maList.size(); }
inline void Insert( const rtl::OUString& rType,
com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > xPropertyBag,
- xub_StrLen nNewPos, xub_StrLen nNewLen, USHORT nWhere )
+ xub_StrLen nNewPos, xub_StrLen nNewLen, sal_uInt16 nWhere )
{
std::vector<SwWrongArea>::iterator i = maList.begin();
if ( nWhere >= maList.size() )
@@ -147,14 +147,14 @@ public:
com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > xPropertyBag,
xub_StrLen nNewPos, xub_StrLen nNewLen );
- inline SwWrongList* SubList( USHORT nIdx ) const
+ inline SwWrongList* SubList( sal_uInt16 nIdx ) const
{
return nIdx < maList.size() ? maList[nIdx].mpSubList : 0;
}
- void InsertSubList( xub_StrLen nNewPos, xub_StrLen nNewLen, USHORT nWhere, SwWrongList* pSubList );
+ void InsertSubList( xub_StrLen nNewPos, xub_StrLen nNewLen, sal_uInt16 nWhere, SwWrongList* pSubList );
- inline const SwWrongArea* GetElement( USHORT nIdx ) const
+ inline const SwWrongArea* GetElement( sal_uInt16 nIdx ) const
{
return nIdx < maList.size() ? &maList[nIdx] : 0;
}
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx
index 18a1c5809152..c00f394c9a83 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -870,7 +870,7 @@ void SwAnchoredDrawObject::NotifyBackground( SwPageFrm* _pPageFrm,
const SwRect& _rRect,
PrepareHint _eHint )
{
- ::Notify_Background( GetDrawObj(), _pPageFrm, _rRect, _eHint, TRUE );
+ ::Notify_Background( GetDrawObj(), _pPageFrm, _rRect, _eHint, sal_True );
}
/** method to assure that anchored object is registered at the correct
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 0b88e9ec52c9..b92f1bccea80 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -79,6 +79,7 @@
#include <tgrditem.hxx>
#include <hfspacingitem.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pagefrm.hxx>
#include <rootfrm.hxx>
#include <cntfrm.hxx>
@@ -217,7 +218,7 @@ void DelHFFormat( SwClient *pToRemove, SwFrmFmt *pFmt )
// <--
//Wenn in einem der Nodes noch ein Crsr angemeldet ist, muss das
//ParkCrsr einer (beliebigen) Shell gerufen werden.
- pNode = pDoc->GetNodes()[ aIdx ];
+ pNode = & aIdx.GetNode();
sal_uInt32 nEnd = pNode->EndOfSectionIndex();
while ( aIdx < nEnd )
{
@@ -236,21 +237,17 @@ void DelHFFormat( SwClient *pToRemove, SwFrmFmt *pFmt )
} while ( aIter++ );
}
aIdx++;
- pNode = pDoc->GetNodes()[ aIdx ];
+ pNode = & aIdx.GetNode();
}
}
rCnt.SetNewCntntIdx( (const SwNodeIndex*)0 );
// beim Loeschen von Header/Footer-Formaten IMMER das Undo
// abschalten! (Bug 31069)
- sal_Bool bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( sal_False );
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
OSL_ENSURE( pNode, "Ein grosses Problem." );
pDoc->DeleteSection( pNode );
-
- if( bDoesUndo )
- pDoc->DoUndo( sal_True );
}
delete pFmt;
}
@@ -293,7 +290,7 @@ SfxPoolItem* SwFmtFrmSize::Clone( SfxItemPool* ) const
return new SwFmtFrmSize( *this );
}
-bool SwFmtFrmSize::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SwFmtFrmSize::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -315,13 +312,13 @@ bool SwFmtFrmSize::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
break;
case MID_FRMSIZE_IS_SYNC_HEIGHT_TO_WIDTH:
{
- BOOL bTmp = 0xFF == GetHeightPercent();
+ sal_Bool bTmp = 0xFF == GetHeightPercent();
rVal.setValue(&bTmp, ::getBooleanCppuType());
}
break;
case MID_FRMSIZE_IS_SYNC_WIDTH_TO_HEIGHT:
{
- BOOL bTmp = 0xFF == GetWidthPercent();
+ sal_Bool bTmp = 0xFF == GetWidthPercent();
rVal.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -340,7 +337,7 @@ bool SwFmtFrmSize::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
break;
case MID_FRMSIZE_IS_AUTO_HEIGHT:
{
- BOOL bTmp = ATT_FIX_SIZE != GetHeightSizeType();
+ sal_Bool bTmp = ATT_FIX_SIZE != GetHeightSizeType();
rVal.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -351,7 +348,7 @@ bool SwFmtFrmSize::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return true;
}
-bool SwFmtFrmSize::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SwFmtFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0 != (nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -383,7 +380,7 @@ bool SwFmtFrmSize::PutValue( const uno::Any& rVal, BYTE nMemberId )
sal_Int16 nSet = 0;
rVal >>= nSet;
if(nSet >= 0 && nSet <= 0xfe)
- SetHeightPercent((BYTE)nSet);
+ SetHeightPercent((sal_uInt8)nSet);
else
bRet = false;
}
@@ -393,7 +390,7 @@ bool SwFmtFrmSize::PutValue( const uno::Any& rVal, BYTE nMemberId )
sal_Int16 nSet = 0;
rVal >>= nSet;
if(nSet >= 0 && nSet <= 0xfe)
- SetWidthPercent((BYTE)nSet);
+ SetWidthPercent((sal_uInt8)nSet);
else
bRet = false;
}
@@ -696,7 +693,7 @@ void SwFmtPageDesc::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
}
}
-bool SwFmtPageDesc::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SwFmtPageDesc::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -727,7 +724,7 @@ bool SwFmtPageDesc::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return bRet;
}
-bool SwFmtPageDesc::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SwFmtPageDesc::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1002,7 +999,7 @@ void SwFmtCol::Calc( sal_uInt16 nGutterWidth, sal_uInt16 nAct )
}
}
-bool SwFmtCol::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SwFmtCol::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1018,7 +1015,7 @@ bool SwFmtCol::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return true;
}
-bool SwFmtCol::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SwFmtCol::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1046,10 +1043,10 @@ bool SwFmtCol::PutValue( const uno::Any& rVal, BYTE nMemberId )
for(sal_uInt16 i = 0; i < nCount; i++)
{
SwColumn* pCol = new SwColumn;
- pCol->SetWishWidth( static_cast<USHORT>(pArray[i].Width) );
- nWidthSum = static_cast<USHORT>(nWidthSum + pArray[i].Width);
- pCol->SetLeft ( static_cast<USHORT>(MM100_TO_TWIP(pArray[i].LeftMargin)) );
- pCol->SetRight( static_cast<USHORT>(MM100_TO_TWIP(pArray[i].RightMargin)) );
+ pCol->SetWishWidth( static_cast<sal_uInt16>(pArray[i].Width) );
+ nWidthSum = static_cast<sal_uInt16>(nWidthSum + pArray[i].Width);
+ pCol->SetLeft ( static_cast<sal_uInt16>(MM100_TO_TWIP(pArray[i].LeftMargin)) );
+ pCol->SetRight( static_cast<sal_uInt16>(MM100_TO_TWIP(pArray[i].RightMargin)) );
aColumns.Insert(pCol, i);
}
bRet = true;
@@ -1123,7 +1120,7 @@ sal_uInt16 SwFmtSurround::GetValueCount() const
}
-bool SwFmtSurround::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SwFmtSurround::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1135,19 +1132,19 @@ bool SwFmtSurround::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
break;
case MID_SURROUND_ANCHORONLY:
{
- BOOL bTmp = IsAnchorOnly();
+ sal_Bool bTmp = IsAnchorOnly();
rVal.setValue(&bTmp, ::getBooleanCppuType());
}
break;
case MID_SURROUND_CONTOUR:
{
- BOOL bTmp = IsContour();
+ sal_Bool bTmp = IsContour();
rVal.setValue(&bTmp, ::getBooleanCppuType());
}
break;
case MID_SURROUND_CONTOUROUTSIDE:
{
- BOOL bTmp = IsOutside();
+ sal_Bool bTmp = IsOutside();
rVal.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -1158,7 +1155,7 @@ bool SwFmtSurround::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return bRet;
}
-bool SwFmtSurround::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SwFmtSurround::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1169,7 +1166,7 @@ bool SwFmtSurround::PutValue( const uno::Any& rVal, BYTE nMemberId )
{
sal_Int32 eVal = SWUnoHelper::GetEnumAsInt32( rVal );
if( eVal >= 0 && eVal < (sal_Int16)SURROUND_END )
- SetValue( static_cast<USHORT>(eVal) );
+ SetValue( static_cast<sal_uInt16>(eVal) );
else {
//exception
;
@@ -1217,7 +1214,7 @@ SfxPoolItem* SwFmtVertOrient::Clone( SfxItemPool* ) const
return new SwFmtVertOrient( nYPos, eOrient, eRelation );
}
-bool SwFmtVertOrient::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SwFmtVertOrient::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1256,7 +1253,7 @@ bool SwFmtVertOrient::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return bRet;
}
-bool SwFmtVertOrient::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SwFmtVertOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0 != (nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -1331,7 +1328,7 @@ SfxPoolItem* SwFmtHoriOrient::Clone( SfxItemPool* ) const
return new SwFmtHoriOrient( nXPos, eOrient, eRelation, bPosToggle );
}
-bool SwFmtHoriOrient::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SwFmtHoriOrient::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1367,7 +1364,7 @@ bool SwFmtHoriOrient::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
break;
case MID_HORIORIENT_PAGETOGGLE:
{
- BOOL bTmp = IsPosToggle();
+ sal_Bool bTmp = IsPosToggle();
rVal.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -1378,7 +1375,7 @@ bool SwFmtHoriOrient::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return bRet;
}
-bool SwFmtHoriOrient::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SwFmtHoriOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0 != (nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -1513,7 +1510,7 @@ sal_uInt32 SwFmtAnchor::GetOrder() const
return mnOrder;
}
-bool SwFmtAnchor::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SwFmtAnchor::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1567,7 +1564,7 @@ bool SwFmtAnchor::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return bRet;
}
-bool SwFmtAnchor::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SwFmtAnchor::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1700,7 +1697,7 @@ void SwFmtURL::SetMap( const ImageMap *pM )
}
extern const SvEventDescription* lcl_GetSupportedMacroItems();
-bool SwFmtURL::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SwFmtURL::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1740,7 +1737,7 @@ bool SwFmtURL::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
break;
case MID_URL_SERVERMAP:
{
- BOOL bTmp = IsServerMap();
+ sal_Bool bTmp = IsServerMap();
rVal.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -1751,7 +1748,7 @@ bool SwFmtURL::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return bRet;
}
-bool SwFmtURL::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SwFmtURL::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -1862,7 +1859,7 @@ int SwFmtFtnEndAtTxtEnd::operator==( const SfxPoolItem& rItem ) const
sSuffix == rAttr.sSuffix;
}
-bool SwFmtFtnEndAtTxtEnd::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SwFmtFtnEndAtTxtEnd::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch(nMemberId)
@@ -1889,12 +1886,12 @@ bool SwFmtFtnEndAtTxtEnd::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
case MID_NUM_TYPE : rVal <<= aFmt.GetNumberingType(); break;
case MID_PREFIX : rVal <<= OUString(sPrefix); break;
case MID_SUFFIX : rVal <<= OUString(sSuffix); break;
- default: return FALSE;
+ default: return sal_False;
}
return true;
}
-bool SwFmtFtnEndAtTxtEnd::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SwFmtFtnEndAtTxtEnd::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
bool bRet = true;
nMemberId &= ~CONVERT_TWIPS;
@@ -2028,7 +2025,7 @@ void SwFmtChain::SetNext( SwFlyFrmFmt *pFmt )
((SwModify*)aNext.GetRegisteredIn())->Remove( &aNext );
}
-bool SwFmtChain::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SwFmtChain::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -2081,7 +2078,7 @@ SfxPoolItem* SwFmtLineNumber::Clone( SfxItemPool* ) const
return new SwFmtLineNumber( *this );
}
-bool SwFmtLineNumber::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SwFmtLineNumber::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -2090,7 +2087,7 @@ bool SwFmtLineNumber::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
{
case MID_LINENUMBER_COUNT:
{
- BOOL bTmp = IsCount();
+ sal_Bool bTmp = IsCount();
rVal.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -2104,7 +2101,7 @@ bool SwFmtLineNumber::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return bRet;
}
-bool SwFmtLineNumber::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SwFmtLineNumber::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
// hier wird immer konvertiert!
nMemberId &= ~CONVERT_TWIPS;
@@ -2184,7 +2181,7 @@ SwTextGridItem& SwTextGridItem::operator=( const SwTextGridItem& rCpy )
return *this;
}
-bool SwTextGridItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SwTextGridItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
bool bRet = true;
@@ -2256,7 +2253,7 @@ bool SwTextGridItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
return bRet;
}
-bool SwTextGridItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SwTextGridItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
bool bRet = true;
switch( nMemberId & ~CONVERT_TWIPS )
@@ -2299,11 +2296,11 @@ bool SwTextGridItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
nTmp = MM100_TO_TWIP( nTmp );
if( bRet && (nTmp >= 0) && ( nTmp <= USHRT_MAX) )
if( (nMemberId & ~CONVERT_TWIPS) == MID_GRID_BASEHEIGHT )
- SetBaseHeight( (USHORT)nTmp );
+ SetBaseHeight( (sal_uInt16)nTmp );
else if( (nMemberId & ~CONVERT_TWIPS) == MID_GRID_BASEWIDTH )
- SetBaseWidth( (USHORT)nTmp );
+ SetBaseWidth( (sal_uInt16)nTmp );
else
- SetRubyHeight( (USHORT)nTmp );
+ SetRubyHeight( (sal_uInt16)nTmp );
else
bRet = false;
}
@@ -2349,7 +2346,7 @@ bool SwTextGridItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
return bRet;
}
-void SwTextGridItem::SwitchPaperMode(BOOL bNew)
+void SwTextGridItem::SwitchPaperMode(sal_Bool bNew)
{
if( bNew == bSquaredMode )
{
@@ -2800,7 +2797,7 @@ void SwFlyFrmFmt::MakeFrms()
pFrm;
pFrm = (SwFrm*)aIter.Next() )
{
- BOOL bAdd = !pFrm->IsCntntFrm() ||
+ sal_Bool bAdd = !pFrm->IsCntntFrm() ||
!((SwCntntFrm*)pFrm)->IsFollow();
if ( FLY_AT_FLY == aAnchorAttr.GetAnchorId() && !pFrm->IsFlyFrm() )
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index af8ce04a7c99..3fb5505c57a1 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -79,7 +79,7 @@
|*************************************************************************/
-BOOL SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL & )
+sal_Bool SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool & )
{
if ( (SwFlowFrm::IsMoveBwdJump() || !IsPrevObjMove()))
{
@@ -104,12 +104,12 @@ BOOL SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL & )
//von Leerseiten), so muss in jedemfall gemoved werden - sonst wuerde,
//falls der Frm nicht in das Blatt passt, nicht mehr auf die
//dazwischenliegenden Blaetter geachtet werden.
- BYTE nMoveAnyway = 0;
+ sal_uInt8 nMoveAnyway = 0;
SwPageFrm * const pNewPage = pNewUpper->FindPageFrm();
SwPageFrm *pOldPage = FindPageFrm();
if ( SwFlowFrm::IsMoveBwdJump() )
- return TRUE;
+ return sal_True;
if( IsInFtn() && IsInSct() )
{
@@ -122,7 +122,7 @@ BOOL SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL & )
pSect = pSect->GetUpper()->FindSctFrm();
OSL_ENSURE( pSect, "Escaping footnote" );
if( pSect != pMySect )
- return FALSE;
+ return sal_False;
}
}
SWRECTFN( this )
@@ -188,7 +188,7 @@ BOOL SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL & )
( pNewUpper->IsColBodyFrm() &&
!pNewUpper->GetUpper()->GetPrev() &&
!pNewUpper->GetUpper()->GetNext() ) ) ) )
- nSpace += pNewUpper->Grow( LONG_MAX, TRUE );
+ nSpace += pNewUpper->Grow( LONG_MAX, sal_True );
if ( nMoveAnyway < 3 )
{
@@ -205,7 +205,7 @@ BOOL SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL & )
// dabei ist sogar die Breite egal, da ein TestFormat in der neuen Umgebung
// vorgenommen wird.
// --> OD 2007-11-26 #b6614158#
- const BYTE nBwdMoveNecessaryResult =
+ const sal_uInt8 nBwdMoveNecessaryResult =
BwdMoveNecessary( pNewPage, aRect);
const bool bObjsInNewUpper( nBwdMoveNecessaryResult == 2 ||
nBwdMoveNecessaryResult == 3 );
@@ -221,21 +221,21 @@ BOOL SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL & )
!(pNewUpper->Prt().*fnRectX->fnGetWidth)() &&
( pNewUpper->GetUpper()->GetPrev() ||
pNewUpper->GetUpper()->GetNext() ) )
- return TRUE;
+ return sal_True;
else
- return FALSE; // Kein Platz, dann ist es sinnlos, zurueckzufliessen
+ return sal_False; // Kein Platz, dann ist es sinnlos, zurueckzufliessen
}
else
{
// OD 2004-05-26 #i25904# - check for space left in new upper
if ( nSpace )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
}
}
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------------
@@ -293,10 +293,10 @@ void SwFrm::PrepareMake()
if ( !GetUpper() )
return;
- const BOOL bCnt = IsCntntFrm();
- const BOOL bTab = IsTabFrm();
- BOOL bNoSect = IsInSct();
- BOOL bOldTabLock = FALSE, bFoll = FALSE;
+ const sal_Bool bCnt = IsCntntFrm();
+ const sal_Bool bTab = IsTabFrm();
+ sal_Bool bNoSect = IsInSct();
+ sal_Bool bOldTabLock = sal_False, bFoll = sal_False;
SwFlowFrm* pThis = bCnt ? (SwCntntFrm*)this : NULL;
if ( bTab )
@@ -310,9 +310,9 @@ void SwFrm::PrepareMake()
{
pThis = (SwSectionFrm*)this;
bFoll = pThis->IsFollow();
- bNoSect = FALSE;
+ bNoSect = sal_False;
}
- else if ( bCnt && TRUE == (bFoll = pThis->IsFollow()) &&
+ else if ( bCnt && sal_True == (bFoll = pThis->IsFollow()) &&
GetPrev() )
{
//Wenn der Master gereade ein CalcFollow ruft braucht die Kette
@@ -425,11 +425,11 @@ void SwFrm::PrepareCrsr()
if ( !GetUpper() )
return;
- const BOOL bCnt = IsCntntFrm();
- const BOOL bTab = IsTabFrm();
- BOOL bNoSect = IsInSct();
+ const sal_Bool bCnt = IsCntntFrm();
+ const sal_Bool bTab = IsTabFrm();
+ sal_Bool bNoSect = IsInSct();
- BOOL bOldTabLock = FALSE, bFoll;
+ sal_Bool bOldTabLock = sal_False, bFoll;
SwFlowFrm* pThis = bCnt ? (SwCntntFrm*)this : NULL;
if ( bTab )
@@ -441,7 +441,7 @@ void SwFrm::PrepareCrsr()
else if( IsSctFrm() )
{
pThis = (SwSectionFrm*)this;
- bNoSect = FALSE;
+ bNoSect = sal_False;
}
bFoll = pThis && pThis->IsFollow();
@@ -500,7 +500,7 @@ void SwFrm::PrepareCrsr()
// Hier wird GetPrev() zurueckgegeben, allerdings werden
// dabei leere SectionFrms ueberlesen
-SwFrm* lcl_Prev( SwFrm* pFrm, BOOL bSectPrv = TRUE )
+SwFrm* lcl_Prev( SwFrm* pFrm, sal_Bool bSectPrv = sal_True )
{
SwFrm* pRet = pFrm->GetPrev();
if( !pRet && pFrm->GetUpper() && pFrm->GetUpper()->IsSctFrm() &&
@@ -526,8 +526,8 @@ void SwFrm::MakePos()
{
if ( !bValidPos )
{
- bValidPos = TRUE;
- BOOL bUseUpper = FALSE;
+ bValidPos = sal_True;
+ sal_Bool bUseUpper = sal_False;
SwFrm* pPrv = lcl_Prev( this );
if ( pPrv &&
( !pPrv->IsCntntFrm() ||
@@ -544,19 +544,19 @@ void SwFrm::MakePos()
}
else if ( pPrv->Frm().Top() == 0 )
{
- bUseUpper = TRUE;
+ bUseUpper = sal_True;
}
}
- pPrv = lcl_Prev( this, FALSE );
- USHORT nMyType = GetType();
+ pPrv = lcl_Prev( this, sal_False );
+ sal_uInt16 nMyType = GetType();
SWRECTFN( ( IsCellFrm() && GetUpper() ? GetUpper() : this ) )
if ( !bUseUpper && pPrv )
{
aFrm.Pos( pPrv->Frm().Pos() );
if( FRM_NEIGHBOUR & nMyType )
{
- BOOL bR2L = IsRightToLeft();
+ sal_Bool bR2L = IsRightToLeft();
if( bR2L )
(aFrm.*fnRect->fnSetPosX)( (aFrm.*fnRect->fnGetLeft)() -
(aFrm.*fnRect->fnGetWidth)() );
@@ -573,7 +573,13 @@ void SwFrm::MakePos()
if( bReverse )
aFrm.Pos().X() += pPrv->Frm().Width();
else
- aFrm.Pos().X() -= aFrm.Width();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ {
+ if ( bVertL2R )
+ aFrm.Pos().X() += pPrv->Frm().Width();
+ else
+ aFrm.Pos().X() -= aFrm.Width();
+ }
}
else
aFrm.Pos().Y() += pPrv->Frm().Height();
@@ -600,13 +606,13 @@ void SwFrm::MakePos()
GetUpper()->Calc();
}
// <--
- pPrv = lcl_Prev( this, FALSE );
+ pPrv = lcl_Prev( this, sal_False );
if ( !bUseUpper && pPrv )
{
aFrm.Pos( pPrv->Frm().Pos() );
if( FRM_NEIGHBOUR & nMyType )
{
- BOOL bR2L = IsRightToLeft();
+ sal_Bool bR2L = IsRightToLeft();
if( bR2L )
(aFrm.*fnRect->fnSetPosX)( (aFrm.*fnRect->fnGetLeft)() -
(aFrm.*fnRect->fnGetWidth)() );
@@ -641,15 +647,17 @@ void SwFrm::MakePos()
aFrm.Pos().X() += GetUpper()->Prt().Width()
- aFrm.Width();
}
- else if( bVert && FRM_NOTE_VERT & nMyType && !bReverse )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ else if( bVert && !bVertL2R && FRM_NOTE_VERT & nMyType && !bReverse )
aFrm.Pos().X() -= aFrm.Width() - GetUpper()->Prt().Width();
}
}
else
aFrm.Pos().X() = aFrm.Pos().Y() = 0;
- if( IsBodyFrm() && bVert && !bReverse && GetUpper() )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsBodyFrm() && bVert && !bVertL2R && !bReverse && GetUpper() )
aFrm.Pos().X() += GetUpper()->Prt().Width() - aFrm.Width();
- bValidPos = TRUE;
+ bValidPos = sal_True;
}
}
@@ -664,7 +672,7 @@ void lcl_CheckObjects( SwSortedObjs* pSortedObjs, SwFrm* pFrm, long& rBot )
//Und dann kann es natuerlich noch Absatzgebundene
//Rahmen geben, die unterhalb ihres Absatzes stehen.
long nMax = 0;
- for ( USHORT i = 0; i < pSortedObjs->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pSortedObjs->Count(); ++i )
{
// --> OD 2004-07-01 #i28701# - consider changed type of <SwSortedObjs>
// entries.
@@ -705,7 +713,7 @@ void SwPageFrm::MakeAll()
if ( !bValidPos )
{
// PAGES01
- bValidPos = TRUE; // positioning of the pages is taken care of by the root frame
+ bValidPos = sal_True; // positioning of the pages is taken care of by the root frame
}
if ( !bValidSize || !bValidPrtArea )
@@ -715,7 +723,7 @@ void SwPageFrm::MakeAll()
Frm().Width( 0 ); Prt().Width( 0 );
Frm().Height( 0 ); Prt().Height( 0 );
Prt().Left( 0 ); Prt().Top( 0 );
- bValidSize = bValidPrtArea = TRUE;
+ bValidSize = bValidPrtArea = sal_True;
}
else
{
@@ -822,7 +830,7 @@ void SwPageFrm::MakeAll()
Prt().Width( Frm().Width() - ( Prt().Left()
+ pAttrs->CalcRightLine() + aBorder.Width() ) );
Prt().Height( Frm().Height() - (nTop + nBottom) );
- bValidSize = bValidPrtArea = TRUE;
+ bValidSize = bValidPrtArea = sal_True;
}
else
{ //FixSize einstellen, bei Seiten nicht vom Upper sondern vom
@@ -862,8 +870,9 @@ void SwLayoutFrm::MakeAll()
//uebernimmt im DTor die Benachrichtigung
const SwLayNotify aNotify( this );
- BOOL bVert = IsVertical();
- SwRectFn fnRect = ( IsNeighbourFrm() == bVert )? fnRectHori : fnRectVert;
+ sal_Bool bVert = IsVertical();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ SwRectFn fnRect = ( IsNeighbourFrm() == bVert )? fnRectHori : ( IsVertLR() ? fnRectVertL2R : fnRectVert );
SwBorderAttrAccess *pAccess = 0;
const SwBorderAttrs*pAttrs = 0;
@@ -879,7 +888,7 @@ void SwLayoutFrm::MakeAll()
if ( IsLeaveUpperAllowed() )
{
if ( !bValidSize )
- bValidPrtArea = FALSE;
+ bValidPrtArea = sal_False;
}
else
{
@@ -887,7 +896,7 @@ void SwLayoutFrm::MakeAll()
{
//FixSize einstellen, die VarSize wird von Format() nach
//Berechnung der PrtArea eingestellt.
- bValidPrtArea = FALSE;
+ bValidPrtArea = sal_False;
SwTwips nPrtWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)();
if( bVert && ( IsBodyFrm() || IsFtnContFrm() ) )
@@ -916,7 +925,7 @@ void SwLayoutFrm::MakeAll()
// Don't leave your upper
const SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)();
if( (Frm().*fnRect->fnOverStep)( nDeadLine ) )
- bValidSize = FALSE;
+ bValidSize = sal_False;
}
}
}
@@ -942,7 +951,7 @@ void SwLayoutFrm::MakeAll()
bool SwTxtNode::IsCollapse() const
{
if ( GetDoc()->get( IDocumentSettingAccess::COLLAPSE_EMPTY_CELL_PARA ) && GetTxt().Len()==0 ) {
- ULONG nIdx=GetIndex();
+ sal_uLong nIdx=GetIndex();
const SwEndNode *pNdBefore=GetNodes()[nIdx-1]->GetEndNode();
const SwEndNode *pNdAfter=GetNodes()[nIdx+1]->GetEndNode();
@@ -976,16 +985,16 @@ bool SwFrm::IsCollapse() const
}
}
-BOOL SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
+sal_Bool SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
{
- BOOL bSizeChgd = FALSE;
+ sal_Bool bSizeChgd = sal_False;
if ( !bValidPrtArea )
{
- bValidPrtArea = TRUE;
+ bValidPrtArea = sal_True;
SWRECTFN( this )
- const BOOL bTxtFrm = IsTxtFrm();
+ const sal_Bool bTxtFrm = IsTxtFrm();
SwTwips nUpper = 0;
if ( bTxtFrm && ((SwTxtFrm*)this)->IsHiddenNow() )
{
@@ -1020,13 +1029,13 @@ BOOL SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
//geben kann (RootFrm::ImplCalcBrowseWidth())
long nMinWidth = 0;
- for (USHORT i = 0; GetDrawObjs() && i < GetDrawObjs()->Count();++i)
+ for (sal_uInt16 i = 0; GetDrawObjs() && i < GetDrawObjs()->Count();++i)
{
// --> OD 2004-07-01 #i28701# - consider changed type of
// <SwSortedObjs> entries
SwAnchoredObject* pObj = (*GetDrawObjs())[i];
const SwFrmFmt& rFmt = pObj->GetFrmFmt();
- const BOOL bFly = pObj->ISA(SwFlyFrm);
+ const sal_Bool bFly = pObj->ISA(SwFlyFrm);
if ((bFly && (WEIT_WECH == pObj->GetObjRect().Width()))
|| rFmt.GetFrmSize().GetWidthPercent())
{
@@ -1106,7 +1115,7 @@ BOOL SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
GrowFrm( nUpper );
else
ShrinkFrm( -nUpper );
- bSizeChgd = TRUE;
+ bSizeChgd = sal_True;
}
}
return bSizeChgd;
@@ -1127,8 +1136,8 @@ inline void ValidateSz( SwFrm *pFrm )
{
if ( pFrm )
{
- pFrm->bValidSize = TRUE;
- pFrm->bValidPrtArea = TRUE;
+ pFrm->bValidSize = sal_True;
+ pFrm->bValidPrtArea = sal_True;
}
}
@@ -1149,7 +1158,7 @@ void SwCntntFrm::MakeAll()
if ( ((SwTxtFrm*)this)->IsLocked() )
{
- OSL_ENSURE( FALSE, "Format fuer gelockten TxtFrm." );
+ OSL_ENSURE( sal_False, "Format fuer gelockten TxtFrm." );
return;
}
@@ -1178,31 +1187,31 @@ void SwCntntFrm::MakeAll()
//uebernimmt im DTor die Benachrichtigung
SwCntntNotify *pNotify = new SwCntntNotify( this );
- BOOL bMakePage = TRUE; //solange TRUE kann eine neue Seite
+ sal_Bool bMakePage = sal_True; //solange sal_True kann eine neue Seite
//angelegt werden (genau einmal)
- BOOL bMovedBwd = FALSE; //Wird TRUE wenn der Frame zurueckfliesst
- BOOL bMovedFwd = FALSE; //solange FALSE kann der Frm zurueck-
+ sal_Bool bMovedBwd = sal_False; //Wird sal_True wenn der Frame zurueckfliesst
+ sal_Bool bMovedFwd = sal_False; //solange sal_False kann der Frm zurueck-
//fliessen (solange, bis er einmal
//vorwaerts ge'moved wurde).
- BOOL bFormatted = FALSE; //Fuer die Witwen und Waisen Regelung
+ sal_Bool bFormatted = sal_False; //Fuer die Witwen und Waisen Regelung
//wird der letzte CntntFrm einer Kette
//u.U. zum Formatieren angeregt, dies
//braucht nur einmal zu passieren.
//Immer wenn der Frm gemoved wird muss
//das Flag zurueckgesetzt werden.
- BOOL bMustFit = FALSE; //Wenn einmal die Notbremse gezogen wurde,
+ sal_Bool bMustFit = sal_False; //Wenn einmal die Notbremse gezogen wurde,
//werden keine anderen Prepares mehr
//abgesetzt.
- BOOL bFitPromise = FALSE; //Wenn ein Absatz nicht passte, mit WouldFit
+ sal_Bool bFitPromise = sal_False; //Wenn ein Absatz nicht passte, mit WouldFit
//aber verspricht, dass er sich passend
//einstellt wird dieses Flag gesetzt.
//Wenn er dann sein Versprechen nicht haelt,
//kann kontrolliert verfahren werden.
- BOOL bMoveable;
- const BOOL bFly = IsInFly();
- const BOOL bTab = IsInTab();
- const BOOL bFtn = IsInFtn();
- const BOOL bSct = IsInSct();
+ sal_Bool bMoveable;
+ const sal_Bool bFly = IsInFly();
+ const sal_Bool bTab = IsInTab();
+ const sal_Bool bFtn = IsInFtn();
+ const sal_Bool bSct = IsInSct();
Point aOldFrmPos; //Damit bei Turnarounds jew. mit der
Point aOldPrtPos; //letzten Pos verglichen und geprueft
//werden kann, ob ein Prepare sinnvoll ist.
@@ -1216,7 +1225,7 @@ void SwCntntFrm::MakeAll()
pNotify->SetBordersJoinedWithPrev();
}
- const BOOL bKeep = IsKeep( rAttrs.GetAttrSet() );
+ const sal_Bool bKeep = IsKeep( rAttrs.GetAttrSet() );
SwSaveFtnHeight *pSaveFtn = 0;
if ( bFtn )
@@ -1261,8 +1270,8 @@ void SwCntntFrm::MakeAll()
GetUpper()->GetUpper()->IsCellFrm() ) ) &&
IsMoveable() )
{
- bMovedFwd = TRUE;
- MoveFwd( bMakePage, FALSE );
+ bMovedFwd = sal_True;
+ MoveFwd( bMakePage, sal_False );
}
// <--
}
@@ -1272,7 +1281,7 @@ void SwCntntFrm::MakeAll()
//gleich verschoben werden.
if ( lcl_Prev( this ) && ((SwTxtFrm*)this)->IsFollow() && IsMoveable() )
{
- bMovedFwd = TRUE;
+ bMovedFwd = sal_True;
// OD 2004-03-02 #106629# - If follow frame is in table, it's master
// will be the last in the current table cell. Thus, invalidate the
// printing area of the master,
@@ -1280,7 +1289,7 @@ void SwCntntFrm::MakeAll()
{
lcl_Prev( this )->InvalidatePrt();
}
- MoveFwd( bMakePage, FALSE );
+ MoveFwd( bMakePage, sal_False );
}
// OD 08.11.2002 #104840# - check footnote content for forward move.
@@ -1299,8 +1308,8 @@ void SwCntntFrm::MakeAll()
pFtnBossOfFtn != pFtnBossOfRef &&
pFtnBossOfFtn->IsBefore( pFtnBossOfRef ) )
{
- bMovedFwd = TRUE;
- MoveFwd( bMakePage, FALSE );
+ bMovedFwd = sal_True;
+ MoveFwd( bMakePage, sal_False );
}
}
}
@@ -1313,13 +1322,13 @@ void SwCntntFrm::MakeAll()
SwRect aOldFrm_StopFormat( Frm() );
SwRect aOldPrt_StopFormat( Prt() );
// <--
- if ( TRUE == (bMoveable = IsMoveable()) )
+ if ( sal_True == (bMoveable = IsMoveable()) )
{
SwFrm *pPre = GetIndPrev();
if ( CheckMoveFwd( bMakePage, bKeep, bMovedBwd ) )
{
SWREFRESHFN( this )
- bMovedFwd = TRUE;
+ bMovedFwd = sal_True;
if ( bMovedBwd )
{
//Beim zurueckfliessen wurde der Upper angeregt sich
@@ -1349,7 +1358,7 @@ void SwCntntFrm::MakeAll()
// - current frame width is 0.
// - current printing area width is 0.
// - frame width is adjusted to a value greater than 0.
- // - printing area flag is TRUE.
+ // - printing area flag is sal_True.
// Thus, it's assured that the printing area is adjusted, if the
// frame area width changes its width from 0 to something greater
// than 0.
@@ -1361,7 +1370,7 @@ void SwCntntFrm::MakeAll()
(Frm().*fnRect->fnGetWidth)() == 0 &&
(Prt().*fnRect->fnGetWidth)() == 0 )
{
- bValidPrtArea = FALSE;
+ bValidPrtArea = sal_False;
}
(Frm().*fnRect->fnSetWidth)( nNewFrmWidth );
@@ -1397,7 +1406,7 @@ void SwCntntFrm::MakeAll()
if ( !bNoPrepAdjustFrm )
{
Prepare( PREP_ADJUST_FRM );
- bValidSize = FALSE;
+ bValidSize = sal_False;
}
// <--
}
@@ -1411,32 +1420,32 @@ void SwCntntFrm::MakeAll()
//- Er muss mit der Unterkante der PrtArea des Upper ueberlappen.
if ( !bMustFit )
{
- BOOL bWidow = TRUE;
+ sal_Bool bWidow = sal_True;
const SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)();
if ( bMoveable && !bFormatted && ( GetFollow() ||
( (Frm().*fnRect->fnOverStep)( nDeadLine ) ) ) )
{
- Prepare( PREP_WIDOWS_ORPHANS, 0, FALSE );
- bValidSize = bWidow = FALSE;
+ Prepare( PREP_WIDOWS_ORPHANS, 0, sal_False );
+ bValidSize = bWidow = sal_False;
}
if( (Frm().*fnRect->fnGetPos)() != aOldFrmPos ||
(Prt().*fnRect->fnGetPos)() != aOldPrtPos )
{
// In diesem Prepare erfolgt ggf. ein _InvalidateSize().
- // bValidSize wird FALSE und das Format() wird gerufen.
- Prepare( PREP_POS_CHGD, (const void*)&bFormatted, FALSE );
+ // bValidSize wird sal_False und das Format() wird gerufen.
+ Prepare( PREP_POS_CHGD, (const void*)&bFormatted, sal_False );
if ( bWidow && GetFollow() )
- { Prepare( PREP_WIDOWS_ORPHANS, 0, FALSE );
- bValidSize = FALSE;
+ { Prepare( PREP_WIDOWS_ORPHANS, 0, sal_False );
+ bValidSize = sal_False;
}
}
}
if ( !bValidSize )
{
- bValidSize = bFormatted = TRUE;
+ bValidSize = bFormatted = sal_True;
++nFormatCount;
if( nFormatCount > STOP_FLY_FORMAT )
- SetFlyLock( TRUE );
+ SetFlyLock( sal_True );
// --> OD 2006-09-25 #b6448963# - loop prevention
// No format any longer, if <cnStopFormat> consequetive formats
// without change occur.
@@ -1457,7 +1466,7 @@ void SwCntntFrm::MakeAll()
//ich zurueckfliessen kann (wenn ich mich ueberhaupt bewegen soll).
//Damit es keine Oszillation gibt, darf ich nicht gerade vorwaerts
//geflossen sein.
- BOOL bDummy;
+ sal_Bool bDummy;
if ( !lcl_Prev( this ) &&
!bMovedFwd &&
( bMoveable || ( bFly && !bTab ) ) &&
@@ -1465,13 +1474,13 @@ void SwCntntFrm::MakeAll()
&& MoveBwd( bDummy ) )
{
SWREFRESHFN( this )
- bMovedBwd = TRUE;
- bFormatted = FALSE;
+ bMovedBwd = sal_True;
+ bFormatted = sal_False;
if ( bKeep && bMoveable )
{
- if( CheckMoveFwd( bMakePage, FALSE, bMovedBwd ) )
+ if( CheckMoveFwd( bMakePage, sal_False, bMovedBwd ) )
{
- bMovedFwd = TRUE;
+ bMovedFwd = sal_True;
bMoveable = IsMoveable();
SWREFRESHFN( this )
}
@@ -1479,7 +1488,7 @@ void SwCntntFrm::MakeAll()
MakePos();
if( aOldPos != (Frm().*fnRect->fnGetPos)() )
{
- Prepare( PREP_POS_CHGD, (const void*)&bFormatted, FALSE );
+ Prepare( PREP_POS_CHGD, (const void*)&bFormatted, sal_False );
if ( !bValidSize )
{
(Frm().*fnRect->fnSetWidth)( (GetUpper()->
@@ -1489,11 +1498,11 @@ void SwCntntFrm::MakeAll()
const long nOldW = (Prt().*fnRect->fnGetWidth)();
MakePrtArea( rAttrs );
if( nOldW != (Prt().*fnRect->fnGetWidth)() )
- Prepare( PREP_FIXSIZE_CHG, 0, FALSE );
+ Prepare( PREP_FIXSIZE_CHG, 0, sal_False );
}
if( GetFollow() )
- Prepare( PREP_WIDOWS_ORPHANS, 0, FALSE );
- bValidSize = bFormatted = TRUE;
+ Prepare( PREP_WIDOWS_ORPHANS, 0, sal_False );
+ bValidSize = bFormatted = sal_True;
Format();
}
}
@@ -1521,10 +1530,10 @@ void SwCntntFrm::MakeAll()
{
SwSectionFrm* pNxtSct = pNxt->FindSctFrm();
if( pNxtSct && pSct->IsAnFollow( pNxtSct ) )
- bValidPos = FALSE;
+ bValidPos = sal_False;
}
else
- bValidPos = FALSE;
+ bValidPos = sal_False;
}
}
}
@@ -1546,7 +1555,7 @@ void SwCntntFrm::MakeAll()
!GetDrawObjs() )
// <--
{
- bValidPos = FALSE;
+ bValidPos = sal_False;
MakePos();
aOldFrmPos = (Frm().*fnRect->fnGetPos)();
aOldPrtPos = (Prt().*fnRect->fnGetPos)();
@@ -1601,8 +1610,8 @@ void SwCntntFrm::MakeAll()
}
if ( pNxt )
{
- const BOOL bMoveFwdInvalid = 0 != GetIndNext();
- const BOOL bNxtNew =
+ const sal_Bool bMoveFwdInvalid = 0 != GetIndNext();
+ const sal_Bool bNxtNew =
( 0 == (pNxt->Prt().*fnRect->fnGetHeight)() ) &&
(!pNxt->IsTxtFrm() ||!((SwTxtFrm*)pNxt)->IsHiddenNow());
@@ -1614,7 +1623,7 @@ void SwCntntFrm::MakeAll()
{
if( bMovedFwd )
pNotify->SetInvaKeep();
- bMovedFwd = FALSE;
+ bMovedFwd = sal_False;
}
}
}
@@ -1650,8 +1659,8 @@ void SwCntntFrm::MakeAll()
//Wenn ich nicht passe und nicht Spaltbar (WouldFit()) bin, so schicke
//ich meinem TxtFrmanteil die Nachricht, dass eben falls moeglich
//trotz des Attributes 'nicht aufspalten' aufgespalten werden muss.
- BOOL bMoveOrFit = FALSE;
- BOOL bDontMoveMe = !GetIndPrev();
+ sal_Bool bMoveOrFit = sal_False;
+ sal_Bool bDontMoveMe = !GetIndPrev();
if( bDontMoveMe && IsInSct() )
{
SwFtnBossFrm* pBoss = FindFtnBossFrm();
@@ -1660,10 +1669,10 @@ void SwCntntFrm::MakeAll()
}
// Finally, we are able to split table rows. Therefore, bDontMoveMe
- // can be set to FALSE:
+ // can be set to sal_False:
if( bDontMoveMe && IsInTab() &&
0 != const_cast<SwCntntFrm*>(this)->GetNextCellLeaf( MAKEPAGE_NONE ) )
- bDontMoveMe = FALSE;
+ bDontMoveMe = sal_False;
if ( bDontMoveMe && (Frm().*fnRect->fnGetHeight)() >
(GetUpper()->Prt().*fnRect->fnGetHeight)() )
@@ -1672,12 +1681,12 @@ void SwCntntFrm::MakeAll()
{
SwTwips nTmp = (GetUpper()->Prt().*fnRect->fnGetHeight)() -
(Prt().*fnRect->fnGetTop)();
- BOOL bSplit = !IsFwdMoveAllowed();
+ sal_Bool bSplit = !IsFwdMoveAllowed();
if ( nTmp > 0 && WouldFit( nTmp, bSplit, sal_False ) )
{
- Prepare( PREP_WIDOWS_ORPHANS, 0, FALSE );
- bValidSize = FALSE;
- bFitPromise = TRUE;
+ Prepare( PREP_WIDOWS_ORPHANS, 0, sal_False );
+ bValidSize = sal_False;
+ bFitPromise = sal_True;
continue;
}
/* --------------------------------------------------
@@ -1693,12 +1702,12 @@ void SwCntntFrm::MakeAll()
else if ( !bFtn && bMoveable &&
( !bFly || !FindFlyFrm()->IsColLocked() ) &&
( !bSct || !FindSctFrm()->IsColLocked() ) )
- bMoveOrFit = TRUE;
+ bMoveOrFit = sal_True;
}
#if OSL_DEBUG_LEVEL > 1
else
{
- OSL_ENSURE( FALSE, "+TxtFrm hat WouldFit-Versprechen nicht eingehalten." );
+ OSL_ENSURE( sal_False, "+TxtFrm hat WouldFit-Versprechen nicht eingehalten." );
}
#endif
}
@@ -1717,13 +1726,13 @@ void SwCntntFrm::MakeAll()
pOldUp->GetUpper()->GetUpper()->IsSctFrm() &&
( pPre || pOldUp->GetUpper()->GetPrev() ) &&
((SwSectionFrm*)pOldUp->GetUpper()->GetUpper())->MoveAllowed(this) )
- bMovedFwd = FALSE;
+ bMovedFwd = sal_False;
const sal_Bool bCheckForGrownBody = pOldUp->IsBodyFrm();
const long nOldBodyHeight = (pOldUp->Frm().*fnRect->fnGetHeight)();
- if ( !bMovedFwd && !MoveFwd( bMakePage, FALSE ) )
- bMakePage = FALSE;
+ if ( !bMovedFwd && !MoveFwd( bMakePage, sal_False ) )
+ bMakePage = sal_False;
SWREFRESHFN( this )
// If MoveFwd moves the paragraph to the next page, a following
@@ -1734,19 +1743,19 @@ void SwCntntFrm::MakeAll()
// Therefore we only check for growing body frames.
if ( bCheckForGrownBody && ! bMovedBwd && pOldUp != GetUpper() &&
(pOldUp->Frm().*fnRect->fnGetHeight)() > nOldBodyHeight )
- bMovedFwd = FALSE;
+ bMovedFwd = sal_False;
else
- bMovedFwd = TRUE;
+ bMovedFwd = sal_True;
- bFormatted = FALSE;
+ bFormatted = sal_False;
if ( bMoveOrFit && GetUpper() == pOldUp )
{
// FME 2007-08-30 #i81146# new loop control
if ( nConsequetiveFormatsWithoutChange <= cnStopFormat )
{
- Prepare( PREP_MUST_FIT, 0, FALSE );
- bValidSize = FALSE;
- bMustFit = TRUE;
+ Prepare( PREP_MUST_FIT, 0, sal_False );
+ bValidSize = sal_False;
+ bMustFit = sal_True;
continue;
}
@@ -1795,7 +1804,7 @@ void SwCntntFrm::MakeAll()
pNotify->SetInvalidatePrevPrtArea();
}
delete pNotify;
- SetFlyLock( FALSE );
+ SetFlyLock( sal_False );
}
/*************************************************************************
@@ -1813,10 +1822,10 @@ void MakeNxt( SwFrm *pFrm, SwFrm *pNxt )
//Der erste Versuch, der Abbruch mit pFrm = 0 wenn !Valid,
//fuehrt leider zu dem Problem, dass das Keep dann u.U. nicht mehr
//korrekt beachtet wird (27417)
- const BOOL bOldPos = pFrm->GetValidPosFlag();
- const BOOL bOldSz = pFrm->GetValidSizeFlag();
- const BOOL bOldPrt = pFrm->GetValidPrtAreaFlag();
- pFrm->bValidPos = pFrm->bValidPrtArea = pFrm->bValidSize = TRUE;
+ const sal_Bool bOldPos = pFrm->GetValidPosFlag();
+ const sal_Bool bOldSz = pFrm->GetValidSizeFlag();
+ const sal_Bool bOldPrt = pFrm->GetValidPrtAreaFlag();
+ pFrm->bValidPos = pFrm->bValidPrtArea = pFrm->bValidSize = sal_True;
//fix(29272): Nicht MakeAll rufen, dort wird evtl. pFrm wieder invalidert
//und kommt rekursiv wieder herein.
@@ -1858,7 +1867,7 @@ void MakeNxt( SwFrm *pFrm, SwFrm *pNxt )
// Diese Routine ueberprueft, ob zwischen dem FtnBoss von pFrm und dem
// von pNxt keine anderen FtnBosse liegen
-BOOL lcl_IsNextFtnBoss( const SwFrm *pFrm, const SwFrm* pNxt )
+sal_Bool lcl_IsNextFtnBoss( const SwFrm *pFrm, const SwFrm* pNxt )
{
OSL_ENSURE( pFrm && pNxt, "lcl_IsNextFtnBoss: No Frames?" );
pFrm = pFrm->FindFtnBossFrm();
@@ -1874,9 +1883,9 @@ BOOL lcl_IsNextFtnBoss( const SwFrm *pFrm, const SwFrm* pNxt )
}
// --> OD 2007-11-26 #b6614158#
-BOOL SwCntntFrm::_WouldFit( SwTwips nSpace,
+sal_Bool SwCntntFrm::_WouldFit( SwTwips nSpace,
SwLayoutFrm *pNewUpper,
- BOOL bTstMove,
+ sal_Bool bTstMove,
const bool bObjsInNewUpper )
// <--
{
@@ -1888,12 +1897,12 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace,
if ( IsInFtn() )
{
if( !lcl_IsNextFtnBoss( pNewUpper, this ) )
- return TRUE;
+ return sal_True;
pFtnFrm = FindFtnFrm();
}
- BOOL bRet;
- BOOL bSplit = !pNewUpper->Lower();
+ sal_Bool bRet;
+ sal_Bool bSplit = !pNewUpper->Lower();
SwCntntFrm *pFrm = this;
const SwFrm *pTmpPrev = pNewUpper->Lower();
if( pTmpPrev && pTmpPrev->IsFtnFrm() )
@@ -1905,7 +1914,7 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace,
// --> FME 2005-03-31 #b6236853# #i46181#
SwTwips nSecondCheck = 0;
SwTwips nOldSpace = nSpace;
- BOOL bOldSplit = bSplit;
+ sal_Bool bOldSplit = bSplit;
// <--
if ( bTstMove || IsInFly() || ( IsInSct() &&
@@ -1938,7 +1947,7 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace,
)
)
{
- bTstMove = TRUE;
+ bTstMove = sal_True;
bRet = ((SwTxtFrm*)pFrm)->TestFormat( pTmpPrev, nSpace, bSplit );
}
else
@@ -2006,7 +2015,7 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace,
if ( nSpace < 0 )
{
- bRet = FALSE;
+ bRet = sal_False;
// --> FME 2005-03-31 #b6236853# #i46181#
if ( nSecondCheck > 0 )
@@ -2023,8 +2032,8 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace,
const bool bSecondRet = nOldSpace >= 0 && pFrm->WouldFit( nOldSpace, bOldSplit, sal_False );
if ( bSecondRet && bOldSplit && nOldSpace >= 0 )
{
- bRet = TRUE;
- bSplit = TRUE;
+ bRet = sal_True;
+ bSplit = sal_True;
}
}
// <--
@@ -2038,7 +2047,7 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace,
nSpace -= rAttrs.GetULSpace().GetLower();
if ( nSpace < 0 )
{
- bRet = FALSE;
+ bRet = sal_False;
}
}
@@ -2052,11 +2061,11 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace,
}
// OD 11.04.2003 #108824# - If last follow frame of <this> text
// frame isn't valid, a formatting of the next content frame
- // doesn't makes sense. Thus, return TRUE.
+ // doesn't makes sense. Thus, return sal_True.
if ( IsAnFollow( pFrm ) && !pFrm->IsValid() )
{
OSL_FAIL( "Only a warning for task 108824:/n<SwCntntFrm::_WouldFit(..) - follow not valid!" );
- return TRUE;
+ return sal_True;
}
}
SwFrm *pNxt;
@@ -2071,7 +2080,7 @@ BOOL SwCntntFrm::_WouldFit( SwTwips nSpace,
if ( bTstMove &&
( pNxt->GetDrawObjs() || bObjsInNewUpper ) )
{
- return TRUE;
+ return sal_True;
}
// <--
diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx
index 3eb74e6f267c..d4085359819f 100644
--- a/sw/source/core/layout/colfrm.cxx
+++ b/sw/source/core/layout/colfrm.cxx
@@ -48,7 +48,7 @@
#include "sectfrm.hxx" // wg. FtnAtEnd-Flag
// ftnfrm.cxx:
-void lcl_RemoveFtns( SwFtnBossFrm* pBoss, BOOL bPageOnly, BOOL bEndNotes );
+void lcl_RemoveFtns( SwFtnBossFrm* pBoss, sal_Bool bPageOnly, sal_Bool bEndNotes );
/*************************************************************************
@@ -84,20 +84,20 @@ SwColumnFrm::~SwColumnFrm()
|*
|*************************************************************************/
-void MA_FASTCALL lcl_RemoveColumns( SwLayoutFrm *pCont, USHORT nCnt )
+void MA_FASTCALL lcl_RemoveColumns( SwLayoutFrm *pCont, sal_uInt16 nCnt )
{
OSL_ENSURE( pCont && pCont->Lower() && pCont->Lower()->IsColumnFrm(),
"Keine Spalten zu entfernen." );
SwColumnFrm *pColumn = (SwColumnFrm*)pCont->Lower();
- ::lcl_RemoveFtns( pColumn, TRUE, TRUE );
+ ::lcl_RemoveFtns( pColumn, sal_True, sal_True );
while ( pColumn->GetNext() )
{
OSL_ENSURE( pColumn->GetNext()->IsColumnFrm(),
"Nachbar von ColFrm kein ColFrm." );
pColumn = (SwColumnFrm*)pColumn->GetNext();
}
- for ( USHORT i = 0; i < nCnt; ++i )
+ for ( sal_uInt16 i = 0; i < nCnt; ++i )
{
SwColumnFrm *pTmp = (SwColumnFrm*)pColumn->GetPrev();
pColumn->Cut();
@@ -106,7 +106,7 @@ void MA_FASTCALL lcl_RemoveColumns( SwLayoutFrm *pCont, USHORT nCnt )
}
}
-SwLayoutFrm * MA_FASTCALL lcl_FindColumns( SwLayoutFrm *pLay, USHORT nCount )
+SwLayoutFrm * MA_FASTCALL lcl_FindColumns( SwLayoutFrm *pLay, sal_uInt16 nCount )
{
SwFrm *pCol = pLay->Lower();
if ( pLay->IsPageFrm() )
@@ -115,7 +115,7 @@ SwLayoutFrm * MA_FASTCALL lcl_FindColumns( SwLayoutFrm *pLay, USHORT nCount )
if ( pCol && pCol->IsColumnFrm() )
{
SwFrm *pTmp = pCol;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; pTmp; pTmp = pTmp->GetNext(), ++i )
/* do nothing */;
return i == nCount ? (SwLayoutFrm*)pCol : 0;
@@ -124,10 +124,10 @@ SwLayoutFrm * MA_FASTCALL lcl_FindColumns( SwLayoutFrm *pLay, USHORT nCount )
}
-static BOOL lcl_AddColumns( SwLayoutFrm *pCont, USHORT nCount )
+static sal_Bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount )
{
SwDoc *pDoc = pCont->GetFmt()->GetDoc();
- const BOOL bMod = pDoc->IsModified();
+ const sal_Bool bMod = pDoc->IsModified();
//Format sollen soweit moeglich geshared werden. Wenn es also schon einen
//Nachbarn mit den selben Spalteneinstellungen gibt, so koennen die
@@ -141,7 +141,7 @@ static BOOL lcl_AddColumns( SwLayoutFrm *pCont, USHORT nCount )
SwClientIter aIter( *pAttrOwner->GetFmt() );
SwLayoutFrm *pNeighbour = (SwLayoutFrm*)aIter.First( TYPE(SwLayoutFrm) );
- USHORT nAdd = 0;
+ sal_uInt16 nAdd = 0;
SwFrm *pCol = pCont->Lower();
if ( pCol && pCol->IsColumnFrm() )
for ( nAdd = 1; pCol; pCol = pCol->GetNext(), ++nAdd )
@@ -155,19 +155,19 @@ static BOOL lcl_AddColumns( SwLayoutFrm *pCont, USHORT nCount )
pNeighbour = (SwLayoutFrm*)aIter.Next();
}
- BOOL bRet;
+ sal_Bool bRet;
SwTwips nMax = pCont->IsPageBodyFrm() ?
pCont->FindPageFrm()->GetMaxFtnHeight() : LONG_MAX;
if ( pNeighbourCol )
{
- bRet = FALSE;
+ bRet = sal_False;
SwFrm *pTmp = pCont->Lower();
while ( pTmp )
{
pTmp = pTmp->GetNext();
pNeighbourCol = (SwLayoutFrm*)pNeighbourCol->GetNext();
}
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
SwColumnFrm *pTmpCol = new SwColumnFrm( pNeighbourCol->GetFmt() );
pTmpCol->SetMaxFtnHeight( nMax );
@@ -177,8 +177,8 @@ static BOOL lcl_AddColumns( SwLayoutFrm *pCont, USHORT nCount )
}
else
{
- bRet = TRUE;
- for ( USHORT i = 0; i < nCount; ++i )
+ bRet = sal_True;
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
SwFrmFmt *pFmt = pDoc->MakeFrmFmt( aEmptyStr, pDoc->GetDfltFrmFmt());
SwColumnFrm *pTmp = new SwColumnFrm( pFmt );
@@ -201,7 +201,7 @@ static BOOL lcl_AddColumns( SwLayoutFrm *pCont, USHORT nCount )
* --------------------------------------------------*/
void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
- const BOOL bChgFtn )
+ const sal_Bool bChgFtn )
{
if ( rOld.GetNumCols() <= 1 && rNew.GetNumCols() <= 1 && !bChgFtn )
return;
@@ -214,7 +214,7 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
}
// <--
- USHORT nNewNum, nOldNum = 1;
+ sal_uInt16 nNewNum, nOldNum = 1;
if( Lower() && Lower()->IsColumnFrm() )
{
SwFrm* pCol = Lower();
@@ -224,14 +224,14 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
nNewNum = rNew.GetNumCols();
if( !nNewNum )
++nNewNum;
- BOOL bAtEnd;
+ sal_Bool bAtEnd;
if( IsSctFrm() )
bAtEnd = ((SwSectionFrm*)this)->IsAnyNoteAtEnd();
else
- bAtEnd = FALSE;
+ bAtEnd = sal_False;
//Einstellung der Spaltenbreiten ist nur bei neuen Formaten notwendig.
- BOOL bAdjustAttributes = nOldNum != rOld.GetNumCols();
+ sal_Bool bAdjustAttributes = nOldNum != rOld.GetNumCols();
//Wenn die Spaltenanzahl unterschiedlich ist, wird der Inhalt
//gesichert und restored.
@@ -243,7 +243,7 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
// SaveCntnt wuerde auch den Inhalt der Fussnotencontainer aufsaugen
// und im normalen Textfluss unterbringen.
if( IsPageBodyFrm() )
- pDoc->GetRootFrm()->RemoveFtns( (SwPageFrm*)GetUpper(), TRUE, FALSE );
+ pDoc->GetRootFrm()->RemoveFtns( (SwPageFrm*)GetUpper(), sal_True, sal_False );
pSave = ::SaveCntnt( this );
//Wenn Spalten existieren, jetzt aber eine Spaltenanzahl von
@@ -271,11 +271,11 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
if ( nOldNum > nNewNum )
{
::lcl_RemoveColumns( this, nOldNum - nNewNum );
- bAdjustAttributes = TRUE;
+ bAdjustAttributes = sal_True;
}
else if( nOldNum < nNewNum )
{
- USHORT nAdd = nNewNum - nOldNum;
+ sal_uInt16 nAdd = nNewNum - nOldNum;
bAdjustAttributes = lcl_AddColumns( this, nAdd );
}
}
@@ -285,14 +285,14 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
if ( rOld.GetLineWidth() != rNew.GetLineWidth() ||
rOld.GetWishWidth() != rNew.GetWishWidth() ||
rOld.IsOrtho() != rNew.IsOrtho() )
- bAdjustAttributes = TRUE;
+ bAdjustAttributes = sal_True;
else
{
- USHORT nCount = Min( rNew.GetColumns().Count(), rOld.GetColumns().Count() );
- for ( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = Min( rNew.GetColumns().Count(), rOld.GetColumns().Count() );
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
if ( !(*rOld.GetColumns()[i] == *rNew.GetColumns()[i]) )
{
- bAdjustAttributes = TRUE;
+ bAdjustAttributes = sal_True;
break;
}
}
@@ -319,7 +319,7 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
|*
|*************************************************************************/
-void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, BOOL bAdjustAttributes )
+void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, sal_Bool bAdjustAttributes )
{
if( !Lower()->GetNext() )
{
@@ -327,8 +327,9 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, BOOL bAdjustAttributes )
return;
}
- const BOOL bVert = IsVertical();
- SwRectFn fnRect = bVert ? fnRectVert : fnRectHori;
+ const sal_Bool bVert = IsVertical();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
//Ist ein Pointer da, oder sollen wir die Attribute einstellen,
//so stellen wir auf jeden Fall die Spaltenbreiten ein. Andernfalls
@@ -352,26 +353,26 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, BOOL bAdjustAttributes )
//Die Breiten werden mitgezaehlt, damit wir dem letzten den Rest geben
//koennen.
SwTwips nAvail = (Prt().*fnRect->fnGetWidth)();
- const BOOL bLine = pAttr->GetLineAdj() != COLADJ_NONE;
- const USHORT nMin = bLine ? USHORT( 20 + ( pAttr->GetLineWidth() / 2) ) : 0;
+ const sal_Bool bLine = pAttr->GetLineAdj() != COLADJ_NONE;
+ const sal_uInt16 nMin = bLine ? sal_uInt16( 20 + ( pAttr->GetLineWidth() / 2) ) : 0;
- const BOOL bR2L = IsRightToLeft();
+ const sal_Bool bR2L = IsRightToLeft();
SwFrm *pCol = bR2L ? GetLastLower() : Lower();
// --> FME 2004-07-16 #i27399#
// bOrtho means we have to adjust the column frames manually. Otherwise
// we may use the values returned by CalcColWidth:
- const BOOL bOrtho = pAttr->IsOrtho() && pAttr->GetNumCols() > 0;
+ const sal_Bool bOrtho = pAttr->IsOrtho() && pAttr->GetNumCols() > 0;
long nGutter = 0;
// <--
- for ( USHORT i = 0; i < pAttr->GetNumCols(); ++i )
+ for ( sal_uInt16 i = 0; i < pAttr->GetNumCols(); ++i )
{
if( !bOrtho )
{
const SwTwips nWidth = i == (pAttr->GetNumCols() - 1) ?
nAvail :
- pAttr->CalcColWidth( i, USHORT( (Prt().*fnRect->fnGetWidth)() ) );
+ pAttr->CalcColWidth( i, sal_uInt16( (Prt().*fnRect->fnGetWidth)() ) );
const Size aColSz = bVert ?
Size( Prt().Width(), nWidth ) :
@@ -399,8 +400,8 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, BOOL bAdjustAttributes )
//Beruecksichtigung finden. Ueberall wo zwei Spalten aufeinanderstossen
//wird jeweils rechts bzw. links ein Sicherheitsabstand von 20 plus
//der halben Penbreite einkalkuliert.
- const USHORT nLeft = pC->GetLeft();
- const USHORT nRight = pC->GetRight();
+ const sal_uInt16 nLeft = pC->GetLeft();
+ const sal_uInt16 nRight = pC->GetRight();
aLR.SetLeft ( nLeft );
aLR.SetRight( nRight );
@@ -442,7 +443,7 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, BOOL bAdjustAttributes )
{
long nInnerWidth = ( nAvail - nGutter ) / pAttr->GetNumCols();
pCol = Lower();
- for( USHORT i = 0; i < pAttr->GetNumCols(); pCol = pCol->GetNext(), ++i )
+ for( sal_uInt16 i = 0; i < pAttr->GetNumCols(); pCol = pCol->GetNext(), ++i )
{
SwTwips nWidth;
if ( i == pAttr->GetNumCols() - 1 )
diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx
index 24bf3e6fb21b..8f70b6925a0a 100644
--- a/sw/source/core/layout/dbg_lay.cxx
+++ b/sw/source/core/layout/dbg_lay.cxx
@@ -29,7 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-/* --------------------------------------------------
+#if OSL_DEBUG_LEVEL > 1
+
+/*
* Und hier die Beschreibung:
*
* Durch die PROTOCOL-Makros wird es ermoeglicht, Ereignisse im Frame-Methoden zu protokollieren.
@@ -131,13 +133,13 @@
// OD 2004-05-24 #i28701#
#include <sortedobjs.hxx>
-ULONG SwProtocol::nRecord = 0;
+sal_uLong SwProtocol::nRecord = 0;
SwImplProtocol* SwProtocol::pImpl = NULL;
-ULONG lcl_GetFrameId( const SwFrm* pFrm )
+sal_uLong lcl_GetFrameId( const SwFrm* pFrm )
{
#if OSL_DEBUG_LEVEL > 1
- static BOOL bFrameId = FALSE;
+ static sal_Bool bFrameId = sal_False;
if( bFrameId )
return pFrm->GetFrmId();
#endif
@@ -152,28 +154,28 @@ class SwImplProtocol
SvUShortsSort *pFrmIds; // welche FrmIds sollen aufgezeichnet werden ( NULL == alle )
std::vector<long> aVars; // Variables
ByteString aLayer; // Einrueckung der Ausgabe (" " pro Start/End)
- USHORT nTypes; // welche Typen sollen aufgezeichnet werden
- USHORT nLineCount; // Ausgegebene Zeilen
- USHORT nMaxLines; // Maximal auszugebende Zeilen
- BYTE nInitFile; // Bereich (FrmId,FrmType,Record) beim Einlesen der INI-Datei
- BYTE nTestMode; // Special fuer Testformatierung, es wird ggf. nur
+ sal_uInt16 nTypes; // welche Typen sollen aufgezeichnet werden
+ sal_uInt16 nLineCount; // Ausgegebene Zeilen
+ sal_uInt16 nMaxLines; // Maximal auszugebende Zeilen
+ sal_uInt8 nInitFile; // Bereich (FrmId,FrmType,Record) beim Einlesen der INI-Datei
+ sal_uInt8 nTestMode; // Special fuer Testformatierung, es wird ggf. nur
// innerhalb einer Testformatierung aufgezeichnet.
- void _Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, void* pParam );
- BOOL NewStream();
+ void _Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam );
+ sal_Bool NewStream();
void CheckLine( ByteString& rLine );
- void SectFunc( ByteString &rOut, const SwFrm* pFrm, ULONG nAct, void* pParam );
+ void SectFunc( ByteString &rOut, const SwFrm* pFrm, sal_uLong nAct, void* pParam );
public:
SwImplProtocol();
~SwImplProtocol();
// Aufzeichnen
- void Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, void* pParam )
+ void Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam )
{ if( pStream ) _Record( pFrm, nFunction, nAct, pParam ); }
- BOOL InsertFrm( USHORT nFrmId ); // FrmId aufnehmen zum Aufzeichnen
- BOOL DeleteFrm( USHORT nFrmId ); // FrmId entfernen, diesen nicht mehr Aufzeichnen
+ sal_Bool InsertFrm( sal_uInt16 nFrmId ); // FrmId aufnehmen zum Aufzeichnen
+ sal_Bool DeleteFrm( sal_uInt16 nFrmId ); // FrmId entfernen, diesen nicht mehr Aufzeichnen
void FileInit(); // Auslesen der INI-Datei
void ChkStream() { if( !pStream ) NewStream(); }
- void SnapShot( const SwFrm* pFrm, ULONG nFlags );
- void GetVar( const USHORT nNo, long& rVar )
+ void SnapShot( const SwFrm* pFrm, sal_uLong nFlags );
+ void GetVar( const sal_uInt16 nNo, long& rVar )
{ if( nNo < aVars.size() ) rVar = aVars[ nNo ]; }
};
@@ -196,10 +198,10 @@ class SwImplEnterLeave
{
protected:
const SwFrm* pFrm; // Der Frame,
- ULONG nFunction, nAction; // die Funktion, ggf. die Aktion
+ sal_uLong nFunction, nAction; // die Funktion, ggf. die Aktion
void* pParam; // und weitere Parameter
public:
- SwImplEnterLeave( const SwFrm* pF, ULONG nFunct, ULONG nAct, void* pPar )
+ SwImplEnterLeave( const SwFrm* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar )
: pFrm( pF ), nFunction( nFunct ), nAction( nAct ), pParam( pPar ) {}
virtual void Enter(); // Ausgabe beim Eintritt
virtual void Leave(); // Ausgabe beim Verlassen
@@ -209,16 +211,16 @@ class SwSizeEnterLeave : public SwImplEnterLeave
{
long nFrmHeight;
public:
- SwSizeEnterLeave( const SwFrm* pF, ULONG nFunct, ULONG nAct, void* pPar )
+ SwSizeEnterLeave( const SwFrm* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar )
: SwImplEnterLeave( pF, nFunct, nAct, pPar ), nFrmHeight( pF->Frm().Height() ) {}
virtual void Leave(); // Ausgabe der Groessenaenderung
};
class SwUpperEnterLeave : public SwImplEnterLeave
{
- USHORT nFrmId;
+ sal_uInt16 nFrmId;
public:
- SwUpperEnterLeave( const SwFrm* pF, ULONG nFunct, ULONG nAct, void* pPar )
+ SwUpperEnterLeave( const SwFrm* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar )
: SwImplEnterLeave( pF, nFunct, nAct, pPar ), nFrmId( 0 ) {}
virtual void Enter(); // Ausgabe
virtual void Leave(); // Ausgabe der FrmId des Uppers
@@ -228,17 +230,17 @@ class SwFrmChangesLeave : public SwImplEnterLeave
{
SwRect aFrm;
public:
- SwFrmChangesLeave( const SwFrm* pF, ULONG nFunct, ULONG nAct, void* pPar )
+ SwFrmChangesLeave( const SwFrm* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar )
: SwImplEnterLeave( pF, nFunct, nAct, pPar ), aFrm( pF->Frm() ) {}
virtual void Enter(); // keine Ausgabe
virtual void Leave(); // Ausgabe bei Aenderung der Frm-Area
};
-void SwProtocol::Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, void* pParam )
+void SwProtocol::Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam )
{
if( Start() )
{ // Hier landen wir, wenn im Debugger SwProtocol::nRecord mit PROT_INIT(0x1) oderiert wurde
- BOOL bFinit = FALSE; // Dies bietet im Debugger die Moeglichkeit,
+ sal_Bool bFinit = sal_False; // Dies bietet im Debugger die Moeglichkeit,
if( bFinit ) // die Aufzeichnung dieser Action zu beenden
{
nRecord &= ~nFunction; // Diese Funktion nicht mehr aufzeichnen
@@ -287,13 +289,13 @@ void SwProtocol::Stop()
// Creates a more or less detailed snapshot of the layout structur
-void SwProtocol::SnapShot( const SwFrm* pFrm, ULONG nFlags )
+void SwProtocol::SnapShot( const SwFrm* pFrm, sal_uLong nFlags )
{
if( pImpl )
pImpl->SnapShot( pFrm, nFlags );
}
-void SwProtocol::GetVar( const USHORT nNo, long& rVar )
+void SwProtocol::GetVar( const sal_uInt16 nNo, long& rVar )
{
if( pImpl )
pImpl->GetVar( nNo, rVar );
@@ -306,7 +308,7 @@ SwImplProtocol::SwImplProtocol()
NewStream();
}
-BOOL SwImplProtocol::NewStream()
+sal_Bool SwImplProtocol::NewStream()
{
XubString aName( "dbg_lay.out", RTL_TEXTENCODING_MS_1252 );
nLineCount = 0;
@@ -378,26 +380,26 @@ void SwImplProtocol::CheckLine( ByteString& rLine )
nInitFile = 0; // Nanu: Unbekannter Bereich?
rLine.Erase( 0, aTmp.Len() + 1 );
}
- USHORT nToks = rLine.GetTokenCount( ' ' ); // Blanks (oder Tabs) sind die Trenner
- for( USHORT i=0; i < nToks; ++i )
+ sal_uInt16 nToks = rLine.GetTokenCount( ' ' ); // Blanks (oder Tabs) sind die Trenner
+ for( sal_uInt16 i=0; i < nToks; ++i )
{
ByteString aTok = rLine.GetToken( i, ' ' );
- BOOL bNo = FALSE;
+ sal_Bool bNo = sal_False;
if( '!' == aTok.GetChar(0) )
{
- bNo = TRUE; // Diese(n) Funktion/Typ entfernen
+ bNo = sal_True; // Diese(n) Funktion/Typ entfernen
aTok.Erase( 0, 1 );
}
if( aTok.Len() )
{
- ULONG nVal;
+ sal_uLong nVal;
sscanf( aTok.GetBuffer(), "%li", &nVal );
switch ( nInitFile )
{
- case 1: InsertFrm( USHORT( nVal ) ); // FrmId aufnehmen
+ case 1: InsertFrm( sal_uInt16( nVal ) ); // FrmId aufnehmen
break;
case 2: {
- USHORT nNew = (USHORT)nVal;
+ sal_uInt16 nNew = (sal_uInt16)nVal;
if( bNo )
nTypes &= ~nNew; // Typ entfernen
else
@@ -405,7 +407,7 @@ void SwImplProtocol::CheckLine( ByteString& rLine )
}
break;
case 3: {
- ULONG nOld = SwProtocol::Record();
+ sal_uLong nOld = SwProtocol::Record();
if( bNo )
nOld &= ~nVal; // Funktion entfernen
else
@@ -414,14 +416,14 @@ void SwImplProtocol::CheckLine( ByteString& rLine )
}
break;
case 4: {
- BYTE nNew = (BYTE)nVal;
+ sal_uInt8 nNew = (sal_uInt8)nVal;
if( bNo )
nTestMode &= ~nNew; // TestMode zuruecksetzen
else
nTestMode |= nNew; // TestMode setzen
}
break;
- case 5: nMaxLines = (USHORT)nVal;
+ case 5: nMaxLines = (sal_uInt16)nVal;
break;
case 6: aVars.push_back( (long)nVal );
break;
@@ -467,7 +469,7 @@ void SwImplProtocol::FileInit()
* lcl_Start sorgt fuer Einrueckung um zwei Blanks bei ACT_START
* und nimmt diese bei ACT_END wieder zurueck.
* --------------------------------------------------*/
-void lcl_Start( ByteString& rOut, ByteString& rLay, ULONG nAction )
+void lcl_Start( ByteString& rOut, ByteString& rLay, sal_uLong nAction )
{
if( nAction == ACT_START )
{
@@ -556,12 +558,12 @@ void lcl_FrameType( ByteString& rOut, const SwFrm* pFrm )
* ob die FrmId und der FrameType zu den aufzuzeichnenden gehoeren.
* --------------------------------------------------*/
-void SwImplProtocol::_Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, void* pParam )
+void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam )
{
- USHORT nSpecial = 0;
+ sal_uInt16 nSpecial = 0;
if( nSpecial ) // Debugger-Manipulationsmoeglichkeit
{
- USHORT nId = USHORT(lcl_GetFrameId( pFrm ));
+ sal_uInt16 nId = sal_uInt16(lcl_GetFrameId( pFrm ));
switch ( nSpecial )
{
case 1: InsertFrm( nId ); break;
@@ -574,7 +576,7 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, vo
if( !pStream && !NewStream() )
return; // Immer noch kein Stream
- if( pFrmIds && !pFrmIds->Seek_Entry( USHORT(lcl_GetFrameId( pFrm )) ) )
+ if( pFrmIds && !pFrmIds->Seek_Entry( sal_uInt16(lcl_GetFrameId( pFrm )) ) )
return; // gehoert nicht zu den gewuenschten FrmIds
if( !(pFrm->GetType() & nTypes) )
@@ -582,7 +584,7 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, vo
if( 1 == nTestMode && nFunction != PROT_TESTFORMAT )
return; // Wir sollen nur innerhalb einer Testformatierung aufzeichnen
- BOOL bTmp = FALSE;
+ sal_Bool bTmp = sal_False;
ByteString aOut = aLayer;
aOut += ByteString::CreateFromInt64( lcl_GetFrameId( pFrm ) );
aOut += ' ';
@@ -596,13 +598,13 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, vo
if( nAct == ACT_START )
lcl_Flags( aOut, pFrm );
break;
- case PROT_MOVE_FWD: bTmp = TRUE; // NoBreak
+ case PROT_MOVE_FWD: bTmp = sal_True; // NoBreak
case PROT_MOVE_BWD: aOut += ( nFunction == bTmp ) ? "Fwd" : "Bwd";
lcl_Start( aOut, aLayer, nAct );
if( pParam )
{
aOut += ' ';
- aOut += ByteString::CreateFromInt32( *((USHORT*)pParam) );
+ aOut += ByteString::CreateFromInt32( *((sal_uInt16*)pParam) );
}
break;
case PROT_GROW_TST: if( ACT_START != nAct )
@@ -614,7 +616,7 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, vo
aOut += "TestShrink";
break;
case PROT_ADJUSTN :
- case PROT_SHRINK: bTmp = TRUE; // NoBreak
+ case PROT_SHRINK: bTmp = sal_True; // NoBreak
case PROT_GROW: aOut += !bTmp ? "Grow" :
( nFunction == PROT_SHRINK ? "Shrink" : "AdjustNgbhd" );
lcl_Start( aOut, aLayer, nAct );
@@ -647,7 +649,7 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, vo
break;
case PROT_SECTION: SectFunc( aOut, pFrm, nAct, pParam );
break;
- case PROT_CUT: bTmp = TRUE; // NoBreak
+ case PROT_CUT: bTmp = sal_True; // NoBreak
case PROT_PASTE: aOut += bTmp ? "Cut from " : "Paste to ";
aOut += ByteString::CreateFromInt64( lcl_GetFrameId( (SwFrm*)pParam ) );
break;
@@ -703,20 +705,20 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, ULONG nFunction, ULONG nAct, vo
* hier werden die Ausgaben rund um SectionFrms abgehandelt.
* --------------------------------------------------*/
-void SwImplProtocol::SectFunc( ByteString &rOut, const SwFrm* , ULONG nAct, void* pParam )
+void SwImplProtocol::SectFunc( ByteString &rOut, const SwFrm* , sal_uLong nAct, void* pParam )
{
- BOOL bTmp = FALSE;
+ sal_Bool bTmp = sal_False;
switch( nAct )
{
case ACT_MERGE: rOut += "Merge Section ";
rOut += ByteString::CreateFromInt64( lcl_GetFrameId( (SwFrm*)pParam ) );
break;
- case ACT_CREATE_MASTER: bTmp = TRUE; // NoBreak
+ case ACT_CREATE_MASTER: bTmp = sal_True; // NoBreak
case ACT_CREATE_FOLLOW: rOut += "Create Section ";
rOut += bTmp ? "Master to " : "Follow from ";
rOut += ByteString::CreateFromInt64( lcl_GetFrameId( (SwFrm*)pParam ) );
break;
- case ACT_DEL_MASTER: bTmp = TRUE; // NoBreak
+ case ACT_DEL_MASTER: bTmp = sal_True; // NoBreak
case ACT_DEL_FOLLOW: rOut += "Delete Section ";
rOut += bTmp ? "Master to " : "Follow from ";
rOut += ByteString::CreateFromInt64( lcl_GetFrameId( (SwFrm*)pParam ) );
@@ -730,34 +732,34 @@ void SwImplProtocol::SectFunc( ByteString &rOut, const SwFrm* , ULONG nAct, void
* pFrmIds angelegt wird, werden nur noch die enthaltenen FrmIds aufgezeichnet.
* --------------------------------------------------*/
-BOOL SwImplProtocol::InsertFrm( USHORT nId )
+sal_Bool SwImplProtocol::InsertFrm( sal_uInt16 nId )
{
if( !pFrmIds )
pFrmIds = new SvUShortsSort(5,5);
if( pFrmIds->Seek_Entry( nId ) )
- return FALSE;
+ return sal_False;
pFrmIds->Insert( nId );
- return TRUE;
+ return sal_True;
}
/* --------------------------------------------------
* SwImplProtocol::DeleteFrm(..) entfernt eine FrmId aus dem pFrmIds-Array,
* so dass diese Frame nicht mehr aufgezeichnet wird.
* --------------------------------------------------*/
-BOOL SwImplProtocol::DeleteFrm( USHORT nId )
+sal_Bool SwImplProtocol::DeleteFrm( sal_uInt16 nId )
{
- USHORT nPos;
+ sal_uInt16 nPos;
if( !pFrmIds || !pFrmIds->Seek_Entry( nId, &nPos ) )
- return FALSE;
+ return sal_False;
pFrmIds->Remove( nPos );
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------
* SwProtocol::SnapShot(..)
* creates a snapshot of the given frame and its content.
* --------------------------------------------------*/
-void SwImplProtocol::SnapShot( const SwFrm* pFrm, ULONG nFlags )
+void SwImplProtocol::SnapShot( const SwFrm* pFrm, sal_uLong nFlags )
{
while( pFrm )
{
@@ -766,7 +768,7 @@ void SwImplProtocol::SnapShot( const SwFrm* pFrm, ULONG nFlags )
{
aLayer += "[ ";
const SwSortedObjs &rObjs = *pFrm->GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pObj = rObjs[i];
if ( pObj->ISA(SwFlyFrm) )
@@ -793,7 +795,7 @@ void SwImplProtocol::SnapShot( const SwFrm* pFrm, ULONG nFlags )
* Die Aufgabe ist es abhaengig von der Funktion das richtige SwImplEnterLeave-Objekt
* zu erzeugen, alles weitere geschieht dann in dessen Ctor/Dtor.
* --------------------------------------------------*/
-void SwEnterLeave::Ctor( const SwFrm* pFrm, ULONG nFunc, ULONG nAct, void* pPar )
+void SwEnterLeave::Ctor( const SwFrm* pFrm, sal_uLong nFunc, sal_uLong nAct, void* pPar )
{
switch( nFunc )
{
@@ -841,13 +843,13 @@ void SwSizeEnterLeave::Leave()
void SwUpperEnterLeave::Enter()
{
- nFrmId = pFrm->GetUpper() ? USHORT(lcl_GetFrameId( pFrm->GetUpper() )) : 0;
+ nFrmId = pFrm->GetUpper() ? sal_uInt16(lcl_GetFrameId( pFrm->GetUpper() )) : 0;
SwProtocol::Record( pFrm, nFunction, ACT_START, &nFrmId );
}
void SwUpperEnterLeave::Leave()
{
- nFrmId = pFrm->GetUpper() ? USHORT(lcl_GetFrameId( pFrm->GetUpper() )) : 0;
+ nFrmId = pFrm->GetUpper() ? sal_uInt16(lcl_GetFrameId( pFrm->GetUpper() )) : 0;
SwProtocol::Record( pFrm, nFunction, ACT_END, &nFrmId );
}
@@ -861,5 +863,6 @@ void SwFrmChangesLeave::Leave()
SwProtocol::Record( pFrm, PROT_FRMCHANGES, 0, &aFrm );
}
+#endif // DBG_UTIL
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx
index 43e8be8bdc13..62f361402055 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -224,19 +224,19 @@ SwFrm* SwFrm::GetLower()
|* SwLayoutFrm::IsAnLower()
|*
|*************************************************************************/
-BOOL SwLayoutFrm::IsAnLower( const SwFrm *pAssumed ) const
+sal_Bool SwLayoutFrm::IsAnLower( const SwFrm *pAssumed ) const
{
const SwFrm *pUp = pAssumed;
while ( pUp )
{
if ( pUp == this )
- return TRUE;
+ return sal_True;
if ( pUp->IsFlyFrm() )
pUp = ((SwFlyFrm*)pUp)->GetAnchorFrm();
else
pUp = pUp->GetUpper();
}
- return FALSE;
+ return sal_False;
}
/** method to check relative position of layout frame to
@@ -405,10 +405,10 @@ const SwCntntFrm* SwCntntFrm::ImplGetNextCntntFrm( bool bFwd ) const
const SwFrm *pFrm = this;
// #100926#
SwCntntFrm *pCntntFrm = 0;
- BOOL bGoingUp = FALSE;
+ sal_Bool bGoingUp = sal_False;
do {
const SwFrm *p = 0;
- BOOL bGoingFwdOrBwd = FALSE, bGoingDown = FALSE;
+ sal_Bool bGoingFwdOrBwd = sal_False, bGoingDown = sal_False;
bGoingDown = ( !bGoingUp && ( 0 != ( p = lcl_GetLower( pFrm, true ) ) ) );
if ( !bGoingDown )
@@ -485,7 +485,7 @@ SwPageFrm* SwFrm::FindPageFrm()
return (SwPageFrm*)pRet;
}
-SwFtnBossFrm* SwFrm::FindFtnBossFrm( BOOL bFootnotes )
+SwFtnBossFrm* SwFrm::FindFtnBossFrm( sal_Bool bFootnotes )
{
SwFrm *pRet = this;
// Innerhalb einer Tabelle gibt es keine Fussnotenbosse, auch spaltige
@@ -513,7 +513,7 @@ SwFtnBossFrm* SwFrm::FindFtnBossFrm( BOOL bFootnotes )
SwSectionFrm* pSct = pRet->FindSctFrm();
OSL_ENSURE( pSct, "FindFtnBossFrm: Single column outside section?" );
if( !pSct->IsFtnAtEnd() )
- return pSct->FindFtnBossFrm( TRUE );
+ return pSct->FindFtnBossFrm( sal_True );
}
return (SwFtnBossFrm*)pRet;
}
@@ -633,7 +633,7 @@ const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, b
}
OSL_ENSURE( GetPageNum() <= maPageRects.size(), "number of pages differes from page rect array size" );
- USHORT nPageIdx = 0;
+ sal_uInt16 nPageIdx = 0;
while ( pPage && !pRet )
{
@@ -690,12 +690,12 @@ const SwAttrSet* SwFrm::GetAttrSet() const
SwFrm* lcl_NextFrm( SwFrm* pFrm )
{
SwFrm *pRet = 0;
- BOOL bGoingUp = FALSE;
+ sal_Bool bGoingUp = sal_False;
do {
SwFrm *p = 0;
- BOOL bGoingFwd = FALSE;
- BOOL bGoingDown = (!bGoingUp && ( 0 != (p = pFrm->IsLayoutFrm() ? ((SwLayoutFrm*)pFrm)->Lower() : 0)));
+ sal_Bool bGoingFwd = sal_False;
+ sal_Bool bGoingDown = (!bGoingUp && ( 0 != (p = pFrm->IsLayoutFrm() ? ((SwLayoutFrm*)pFrm)->Lower() : 0)));
if( !bGoingDown )
{
@@ -718,7 +718,7 @@ SwFrm* lcl_NextFrm( SwFrm* pFrm )
SwFrm *SwFrm::_FindNext()
{
- BOOL bIgnoreTab = FALSE;
+ sal_Bool bIgnoreTab = sal_False;
SwFrm *pThis = this;
if ( IsTabFrm() )
@@ -732,7 +732,7 @@ SwFrm *SwFrm::_FindNext()
pThis = ((SwTabFrm*)this)->FindLastCntnt();
if ( !pThis )
pThis = this;
- bIgnoreTab = TRUE;
+ bIgnoreTab = sal_True;
}
else if ( IsSctFrm() )
{
@@ -761,7 +761,7 @@ SwFrm *SwFrm::_FindNext()
return NULL;
SwFrm* pRet = NULL;
- const BOOL bFtn = pThis->IsInFtn();
+ const sal_Bool bFtn = pThis->IsInFtn();
if ( !bIgnoreTab && pThis->IsInTab() )
{
SwLayoutFrm *pUp = pThis->GetUpper();
@@ -782,7 +782,7 @@ SwFrm *SwFrm::_FindNext()
}
else
{
- const BOOL bBody = pThis->IsInDocBody();
+ const sal_Bool bBody = pThis->IsInDocBody();
SwFrm *pNxtCnt = lcl_NextFrm( pThis );
if ( pNxtCnt )
{
@@ -881,8 +881,8 @@ SwCntntFrm *SwFrm::_FindNextCnt( const bool _bInSameFtn )
if ( pThis->IsCntntFrm() )
{
- const BOOL bBody = pThis->IsInDocBody();
- const BOOL bFtn = pThis->IsInFtn();
+ const sal_Bool bBody = pThis->IsInDocBody();
+ const sal_Bool bFtn = pThis->IsInFtn();
SwCntntFrm *pNxtCnt = ((SwCntntFrm*)pThis)->GetNextCntntFrm();
if ( pNxtCnt )
{
@@ -1106,7 +1106,7 @@ SwCntntFrm* SwFrm::_FindPrevCnt( const bool _bInSameFtn )
SwFrm *SwFrm::_FindPrev()
{
- BOOL bIgnoreTab = FALSE;
+ sal_Bool bIgnoreTab = sal_False;
SwFrm *pThis = this;
if ( IsTabFrm() )
@@ -1118,7 +1118,7 @@ SwFrm *SwFrm::_FindPrev()
return ((SwTabFrm*)this)->FindMaster();
else
pThis = ((SwTabFrm*)this)->ContainsCntnt();
- bIgnoreTab = TRUE;
+ bIgnoreTab = sal_True;
}
if ( pThis && pThis->IsCntntFrm() )
@@ -1138,8 +1138,8 @@ SwFrm *SwFrm::_FindPrev()
else
{
SwFrm* pRet;
- const BOOL bBody = pThis->IsInDocBody();
- const BOOL bFtn = bBody ? FALSE : pThis->IsInFtn();
+ const sal_Bool bBody = pThis->IsInDocBody();
+ const sal_Bool bFtn = bBody ? sal_False : pThis->IsInFtn();
if ( bBody || bFtn )
{
while ( pPrvCnt )
@@ -1181,7 +1181,7 @@ SwFrm *SwFrm::_FindPrev()
return 0;
}
-void SwFrm::ImplInvalidateNextPos( BOOL bNoFtn )
+void SwFrm::ImplInvalidateNextPos( sal_Bool bNoFtn )
{
SwFrm *pFrm;
if ( 0 != (pFrm = _FindNext()) )
@@ -1279,25 +1279,25 @@ void SwFrm::InvalidateNextPrtArea()
/*************************************************************************
|*
|* lcl_IsInColSect()
-|* liefert nur TRUE, wenn der Frame _direkt_ in einem spaltigen Bereich steht,
+|* liefert nur sal_True, wenn der Frame _direkt_ in einem spaltigen Bereich steht,
|* nicht etwa, wenn er in einer Tabelle steht, die in einem spaltigen Bereich ist.
|*
|*************************************************************************/
-BOOL lcl_IsInColSct( const SwFrm *pUp )
+sal_Bool lcl_IsInColSct( const SwFrm *pUp )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
while( pUp )
{
if( pUp->IsColumnFrm() )
- bRet = TRUE;
+ bRet = sal_True;
else if( pUp->IsSctFrm() )
return bRet;
else if( pUp->IsTabFrm() )
- return FALSE;
+ return sal_False;
pUp = pUp->GetUpper();
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1308,7 +1308,7 @@ BOOL lcl_IsInColSct( const SwFrm *pUp )
/** determine, if frame is moveable in given environment
OD 08.08.2003 #110978#
- method replaced 'old' method <BOOL IsMoveable() const>.
+ method replaced 'old' method <sal_Bool IsMoveable() const>.
Determines, if frame is moveable in given environment. if no environment
is given (parameter _pLayoutFrm == 0L), the movability in the actual
environment (<this->GetUpper()) is checked.
@@ -1388,26 +1388,26 @@ void SwFrm::SetInfFlags()
if ( !IsFlyFrm() && !GetUpper() ) //noch nicht gepastet, keine Informationen
return; //lieferbar
- bInfInvalid = bInfBody = bInfTab = bInfFly = bInfFtn = bInfSct = FALSE;
+ bInfInvalid = bInfBody = bInfTab = bInfFly = bInfFtn = bInfSct = sal_False;
SwFrm *pFrm = this;
if( IsFtnContFrm() )
- bInfFtn = TRUE;
+ bInfFtn = sal_True;
do
{ // bInfBody wird nur am Seitenbody, nicht im ColumnBody gesetzt
if ( pFrm->IsBodyFrm() && !bInfFtn && pFrm->GetUpper()
&& pFrm->GetUpper()->IsPageFrm() )
- bInfBody = TRUE;
+ bInfBody = sal_True;
else if ( pFrm->IsTabFrm() || pFrm->IsCellFrm() )
{
- bInfTab = TRUE;
+ bInfTab = sal_True;
}
else if ( pFrm->IsFlyFrm() )
- bInfFly = TRUE;
+ bInfFly = sal_True;
else if ( pFrm->IsSctFrm() )
- bInfSct = TRUE;
+ bInfSct = sal_True;
else if ( pFrm->IsFtnFrm() )
- bInfFtn = TRUE;
+ bInfFtn = sal_True;
pFrm = pFrm->GetUpper();
@@ -1415,13 +1415,13 @@ void SwFrm::SetInfFlags()
}
/*-----------------22.8.2001 14:30------------------
- * SwFrm::SetDirFlags( BOOL )
+ * SwFrm::SetDirFlags( sal_Bool )
* actualizes the vertical or the righttoleft-flags.
* If the property is derived, it's from the upper or (for fly frames) from
* the anchor. Otherwise we've to call a virtual method to check the property.
* --------------------------------------------------*/
-void SwFrm::SetDirFlags( BOOL bVert )
+void SwFrm::SetDirFlags( sal_Bool bVert )
{
if( bVert )
{
@@ -1438,8 +1438,11 @@ void SwFrm::SetDirFlags( BOOL bVert )
{
bVertical = pAsk->IsVertical() ? 1 : 0;
bReverse = pAsk->IsReverse() ? 1 : 0;
+
+ bVertLR = pAsk->IsVertLR() ? 1 : 0;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
if ( !pAsk->bInvalidVert )
- bInvalidVert = FALSE;
+ bInvalidVert = sal_False;
}
}
else
@@ -1447,7 +1450,7 @@ void SwFrm::SetDirFlags( BOOL bVert )
}
else
{
- BOOL bInv = 0;
+ sal_Bool bInv = 0;
if( !bDerivedR2L ) // CheckDirection is able to set bDerivedR2L!
CheckDirection( bVert );
if( bDerivedR2L )
@@ -1642,7 +1645,7 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren
{
const SwTable* pTable = pTableFrm->GetTable();
- USHORT nMax = USHRT_MAX;
+ sal_uInt16 nMax = USHRT_MAX;
if ( bCurrentTableOnly )
{
const SwFrm* pCurrentRow = GetUpper();
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index 01dd8482f18a..0dbab953b1e7 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -72,7 +72,7 @@
#include <fmtfollowtextflow.hxx>
// <--
-BOOL SwFlowFrm::bMoveBwdJump = FALSE;
+sal_Bool SwFlowFrm::bMoveBwdJump = sal_False;
/*************************************************************************
@@ -87,14 +87,14 @@ SwFlowFrm::SwFlowFrm( SwFrm &rFrm ) :
pFollow( 0 )
{
bLockJoin = bIsFollow = bCntntLock = bOwnFtnNum =
- bFtnLock = bFlyLock = FALSE;
+ bFtnLock = bFlyLock = sal_False;
}
/*************************************************************************
|*
|* SwFlowFrm::IsFollowLocked()
-|* return TRUE if any follow has the JoinLocked flag
+|* return sal_True if any follow has the JoinLocked flag
|*
|*************************************************************************/
@@ -117,24 +117,24 @@ sal_Bool SwFlowFrm::HasLockedFollow() const
|*************************************************************************/
-BOOL SwFlowFrm::IsKeepFwdMoveAllowed()
+sal_Bool SwFlowFrm::IsKeepFwdMoveAllowed()
{
//Wenn der Vorgaenger das KeepAttribut traegt und auch dessen
//Vorgaenger usw. bis zum ersten der Kette und fuer diesen das
- //IsFwdMoveAllowed ein FALSE liefert, so ist das Moven eben nicht erlaubt.
+ //IsFwdMoveAllowed ein sal_False liefert, so ist das Moven eben nicht erlaubt.
SwFrm *pFrm = &rThis;
if ( !pFrm->IsInFtn() )
do
{ if ( pFrm->GetAttrSet()->GetKeep().GetValue() )
pFrm = pFrm->GetIndPrev();
else
- return TRUE;
+ return sal_True;
} while ( pFrm );
//Siehe IsFwdMoveAllowed()
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( pFrm && pFrm->GetIndPrev() )
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
@@ -159,8 +159,8 @@ void SwFlowFrm::CheckKeep()
return;
}
SwFrm* pTmp;
- BOOL bKeep;
- while ( TRUE == (bKeep = pPre->GetAttrSet()->GetKeep().GetValue()) &&
+ sal_Bool bKeep;
+ while ( sal_True == (bKeep = pPre->GetAttrSet()->GetKeep().GetValue()) &&
0 != ( pTmp = pPre->GetIndPrev() ) )
{
if( pTmp->IsSctFrm() )
@@ -183,7 +183,7 @@ void SwFlowFrm::CheckKeep()
|*
|*************************************************************************/
-BOOL SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep ) const
+sal_Bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep ) const
{
// 1. The keep attribute is ignored inside footnotes
// 2. For compatibility reasons, the keep attribute is
@@ -191,7 +191,7 @@ BOOL SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep
// 3. If bBreakCheck is set to true, this function only checks
// if there are any break after attributes set at rAttrs
// or break before attributes set for the next content (or next table)
- BOOL bKeep = bCheckIfLastRowShouldKeep ||
+ sal_Bool bKeep = bCheckIfLastRowShouldKeep ||
( !rThis.IsInFtn() &&
( !rThis.IsInTab() || rThis.IsTabFrm() ) &&
rAttrs.GetKeep().GetValue() );
@@ -209,7 +209,7 @@ BOOL SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep
case SVX_BREAK_PAGE_AFTER:
case SVX_BREAK_PAGE_BOTH:
{
- bKeep = FALSE;
+ bKeep = sal_False;
}
default: break;
}
@@ -236,7 +236,7 @@ BOOL SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep
pNextSection = pNextSectionFrm->GetSection();
if ( pThisSection != pNextSection )
- bKeep = FALSE;
+ bKeep = sal_False;
}
// <--
@@ -257,14 +257,14 @@ BOOL SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep
OSL_ENSURE( pSet, "No AttrSet to check keep attribute" );
if ( pSet->GetPageDesc().GetPageDesc() )
- bKeep = FALSE;
+ bKeep = sal_False;
else switch ( pSet->GetBreak().GetBreak() )
{
case SVX_BREAK_COLUMN_BEFORE:
case SVX_BREAK_COLUMN_BOTH:
case SVX_BREAK_PAGE_BEFORE:
case SVX_BREAK_PAGE_BOTH:
- bKeep = FALSE;
+ bKeep = sal_False;
default: break;
}
}
@@ -281,7 +281,7 @@ BOOL SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep
|*************************************************************************/
-BYTE SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect )
+sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect )
{
// Der return-Wert entscheidet mit,
// ob auf Zurueckgeflossen werden muss, (3)
@@ -301,7 +301,7 @@ BYTE SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect )
//#32639# Wenn das Objekt bei mir verankert ist kann ich es
//vernachlaessigen, weil es hoechstwahrscheinlich (!?) mitfliesst,
//eine TestFormatierung ist dann allerdings nicht erlaubt!
- BYTE nRet = 0;
+ sal_uInt8 nRet = 0;
SwFlowFrm *pTmp = this;
do
{ // Wenn an uns oder einem Follow Objekte haengen, so
@@ -316,8 +316,8 @@ BYTE SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect )
{
// --> OD 2004-07-01 #i28701# - new type <SwSortedObjs>
const SwSortedObjs &rObjs = *pPage->GetSortedObjs();
- ULONG nIndex = ULONG_MAX;
- for ( USHORT i = 0; nRet < 3 && i < rObjs.Count(); ++i )
+ sal_uLong nIndex = ULONG_MAX;
+ for ( sal_uInt16 i = 0; nRet < 3 && i < rObjs.Count(); ++i )
{
// --> OD 2004-07-01 #i28701# - consider changed type of
// <SwSortedObjs> entries.
@@ -351,7 +351,7 @@ BYTE SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect )
if ( rFmt.GetAnchor().GetAnchorId() == FLY_AT_PARA )
{
// Den Index des anderen erhalten wir immer ueber das Ankerattr.
- ULONG nTmpIndex = rFmt.GetAnchor().GetCntntAnchor()->nNode.GetIndex();
+ sal_uLong nTmpIndex = rFmt.GetAnchor().GetCntntAnchor()->nNode.GetIndex();
// Jetzt wird noch ueberprueft, ob der aktuelle Absatz vor dem
// Anker des verdraengenden Objekts im Text steht, dann wird
// nicht ausgewichen.
@@ -439,7 +439,7 @@ SwLayoutFrm *SwFlowFrm::CutTree( SwFrm *pStart )
}
else
{
- BOOL bUnlock = !((SwFtnFrm*)pLay)->IsBackMoveLocked();
+ sal_Bool bUnlock = !((SwFtnFrm*)pLay)->IsBackMoveLocked();
((SwFtnFrm*)pLay)->LockBackMove();
pLay->InvalidateSize();
pLay->Calc();
@@ -466,11 +466,11 @@ SwLayoutFrm *SwFlowFrm::CutTree( SwFrm *pStart )
-BOOL SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling,
+sal_Bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling,
SwFrm *pOldParent )
{
- //returnt TRUE wenn in der Kette ein LayoutFrm steht.
- BOOL bRet = FALSE;
+ //returnt sal_True wenn in der Kette ein LayoutFrm steht.
+ sal_Bool bRet = sal_False;
//Die mit pStart beginnende Kette wird vor den Sibling unter den Parent
//gehaengt. Fuer geeignete Invalidierung wird ebenfalls gesorgt.
@@ -543,7 +543,7 @@ BOOL SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling,
((SwTxtFrm*)pFloat)->Init(); //Ich bin sein Freund.
}
else
- bRet = TRUE;
+ bRet = sal_True;
nGrowVal += (pFloat->Frm().*fnRect->fnGetHeight)();
if ( pFloat->GetNext() )
@@ -589,7 +589,7 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling )
//Sparsamer benachrichtigen wenn eine Action laeuft.
ViewShell *pSh = rThis.GetShell();
const SwViewImp *pImp = pSh ? pSh->Imp() : 0;
- const BOOL bComplete = pImp && pImp->IsAction() && pImp->GetLayAction().IsComplete();
+ const sal_Bool bComplete = pImp && pImp->IsAction() && pImp->GetLayAction().IsComplete();
if ( !bComplete )
{
@@ -615,7 +615,7 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling )
SwPageFrm *pOldPage = rThis.FindPageFrm();
SwLayoutFrm *pOldParent = CutTree( &rThis );
- const BOOL bInvaLay = PasteTree( &rThis, pParent, pSibling, pOldParent );
+ const sal_Bool bInvaLay = PasteTree( &rThis, pParent, pSibling, pOldParent );
// Wenn durch das Cut&Paste ein leerer SectionFrm entstanden ist, sollte
// dieser automatisch verschwinden.
@@ -628,7 +628,7 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling )
!pSct->ContainsAny( true ) ) )
// <--
{
- pSct->DelEmpty( FALSE );
+ pSct->DelEmpty( sal_False );
}
// In einem spaltigen Bereich rufen wir lieber kein Calc "von unten"
@@ -638,11 +638,11 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling )
else if( rThis.GetUpper()->IsSctFrm() )
{
SwSectionFrm* pTmpSct = (SwSectionFrm*)rThis.GetUpper();
- BOOL bOld = pTmpSct->IsCntntLocked();
- pTmpSct->SetCntntLock( TRUE );
+ sal_Bool bOld = pTmpSct->IsCntntLocked();
+ pTmpSct->SetCntntLock( sal_True );
pTmpSct->Calc();
if( !bOld )
- pTmpSct->SetCntntLock( FALSE );
+ pTmpSct->SetCntntLock( sal_False );
}
SwPageFrm *pPage = rThis.FindPageFrm();
@@ -672,15 +672,15 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling )
|*************************************************************************/
-BOOL SwFlowFrm::IsAnFollow( const SwFlowFrm *pAssumed ) const
+sal_Bool SwFlowFrm::IsAnFollow( const SwFlowFrm *pAssumed ) const
{
const SwFlowFrm *pFoll = this;
do
{ if ( pAssumed == pFoll )
- return TRUE;
+ return sal_True;
pFoll = pFoll->GetFollow();
} while ( pFoll );
- return FALSE;
+ return sal_False;
}
@@ -706,7 +706,7 @@ SwTxtFrm* SwCntntFrm::FindMaster() const
pCnt = pCnt->GetPrevCntntFrm();
}
- OSL_ENSURE( FALSE, "Follow ist lost in Space." );
+ OSL_ENSURE( sal_False, "Follow ist lost in Space." );
return 0;
}
@@ -730,7 +730,7 @@ SwSectionFrm* SwSectionFrm::FindMaster() const
pLast = aIter++;
}
- OSL_ENSURE( FALSE, "Follow ist lost in Space." );
+ OSL_ENSURE( sal_False, "Follow ist lost in Space." );
return 0;
}
@@ -776,7 +776,7 @@ SwTabFrm* SwTabFrm::FindMaster( bool bFirstMaster ) const
pLast = aIter++;
}
- OSL_ENSURE( FALSE, "Follow ist lost in Space." );
+ OSL_ENSURE( sal_False, "Follow ist lost in Space." );
return 0;
}
@@ -792,7 +792,7 @@ SwTabFrm* SwTabFrm::FindMaster( bool bFirstMaster ) const
|*************************************************************************/
-const SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, BOOL bFwd,
+const SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, sal_Bool bFwd,
const SwFrm *pAnch ) const
{
//Ohne Fluss kein genuss...
@@ -800,7 +800,7 @@ const SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, BOOL bFwd,
return 0;
const SwFrm *pLeaf = this;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
do
{ pLeaf = ((SwFrm*)pLeaf)->GetLeaf( eMakePage, bFwd );
@@ -811,7 +811,7 @@ const SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, BOOL bFwd,
if ( pAnch->IsInDocBody() == pLeaf->IsInDocBody() &&
pAnch->IsInFtn() == pLeaf->IsInFtn() )
{
- bFound = TRUE;
+ bFound = sal_True;
}
}
} while ( !bFound && pLeaf );
@@ -828,7 +828,7 @@ const SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, BOOL bFwd,
|*************************************************************************/
-SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, BOOL bFwd )
+SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, sal_Bool bFwd )
{
if ( IsInFtn() )
return bFwd ? GetNextFtnLeaf( eMakePage ) : GetPrevFtnLeaf( eMakePage );
@@ -872,7 +872,7 @@ SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, BOOL bFwd )
-BOOL SwFrm::WrongPageDesc( SwPageFrm* pNew )
+sal_Bool SwFrm::WrongPageDesc( SwPageFrm* pNew )
{
//Jetzt wirds leider etwas kompliziert:
//Ich bringe ich evtl. selbst
@@ -902,7 +902,7 @@ BOOL SwFrm::WrongPageDesc( SwPageFrm* pNew )
//Mein Pagedesc zaehlt nicht, wenn ich ein Follow bin!
SwPageDesc *pDesc = 0;
- USHORT nTmp = 0;
+ sal_uInt16 nTmp = 0;
SwFlowFrm *pFlow = SwFlowFrm::CastFlowFrm( this );
if ( !pFlow || !pFlow->IsFollow() )
{
@@ -921,7 +921,7 @@ BOOL SwFrm::WrongPageDesc( SwPageFrm* pNew )
//Bringt der Cntnt einen Pagedesc mit oder muss zaehlt die
//virtuelle Seitennummer des neuen Layoutleafs?
// Bei Follows zaehlt der PageDesc nicht
- const BOOL bOdd = nTmp ? ( nTmp % 2 ? TRUE : FALSE )
+ const sal_Bool bOdd = nTmp ? ( nTmp % 2 ? sal_True : sal_False )
: pNew->OnRightPage();
if ( !pDesc )
pDesc = pNew->FindPageDesc();
@@ -954,7 +954,7 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
OSL_ENSURE( !IsInFtn(), "GetNextLeaf(), don't call me for Ftn." );
OSL_ENSURE( !IsInSct(), "GetNextLeaf(), don't call me for Sections." );
- const BOOL bBody = IsInDocBody(); //Wenn ich aus dem DocBody komme
+ const sal_Bool bBody = IsInDocBody(); //Wenn ich aus dem DocBody komme
//Will ich auch im Body landen.
// Bei Flys macht es keinen Sinn, Seiten einzufuegen, wir wollen lediglich
@@ -978,9 +978,9 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
SwLayoutFrm *pOldLayLeaf = 0; //Damit bei neu erzeugten Seiten
//nicht wieder vom Anfang gesucht
//wird.
- BOOL bNewPg = FALSE; //nur einmal eine neue Seite einfuegen.
+ sal_Bool bNewPg = sal_False; //nur einmal eine neue Seite einfuegen.
- while ( TRUE )
+ while ( sal_True )
{
if ( pLayLeaf )
{
@@ -1030,7 +1030,7 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
SwFtnFrm *pFtn = (SwFtnFrm*)pCont->Lower();
if( pFtn && pFtn->GetRef() )
{
- const USHORT nRefNum = pNew->GetPhyPageNum();
+ const sal_uInt16 nRefNum = pNew->GetPhyPageNum();
if( pFtn->GetRef()->GetPhyPageNum() < nRefNum )
break;
}
@@ -1039,7 +1039,7 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
//muss eine neue eingefuegt werden.
if ( eMakePage == MAKEPAGE_INSERT )
{
- bNewPg = TRUE;
+ bNewPg = sal_True;
SwPageFrm *pPg = pOldLayLeaf ?
pOldLayLeaf->FindPageFrm() : 0;
@@ -1050,7 +1050,7 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
if ( !pPg || pPg == pNew )
pPg = FindPageFrm();
- InsertPage( pPg, FALSE );
+ InsertPage( pPg, sal_False );
pLayLeaf = GetNextLayoutLeaf();
pOldLayLeaf = 0;
continue;
@@ -1069,7 +1069,7 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
{
InsertPage(
pOldLayLeaf ? pOldLayLeaf->FindPageFrm() : FindPageFrm(),
- FALSE );
+ sal_False );
//und nochmal das ganze
pLayLeaf = pOldLayLeaf ? pOldLayLeaf : GetNextLayoutLeaf();
@@ -1095,9 +1095,9 @@ SwLayoutFrm *SwFrm::GetPrevLeaf( MakePageType )
{
OSL_ENSURE( !IsInFtn(), "GetPrevLeaf(), don't call me for Ftn." );
- const BOOL bBody = IsInDocBody(); //Wenn ich aus dem DocBody komme
+ const sal_Bool bBody = IsInDocBody(); //Wenn ich aus dem DocBody komme
//will ich auch im Body landen.
- const BOOL bFly = IsInFly();
+ const sal_Bool bFly = IsInFly();
SwLayoutFrm *pLayLeaf = GetPrevLayoutLeaf();
SwLayoutFrm *pPrevLeaf = 0;
@@ -1114,7 +1114,7 @@ SwLayoutFrm *SwFrm::GetPrevLeaf( MakePageType )
pPrevLeaf = pLayLeaf;
pLayLeaf = pLayLeaf->GetPrevLayoutLeaf();
if ( pLayLeaf )
- SwFlowFrm::SetMoveBwdJump( TRUE );
+ SwFlowFrm::SetMoveBwdJump( sal_True );
}
else if ( bFly )
break; //Cntnts in Flys sollte jedes Layout-Blatt recht sein.
@@ -1131,14 +1131,14 @@ SwLayoutFrm *SwFrm::GetPrevLeaf( MakePageType )
|*************************************************************************/
-BOOL SwFlowFrm::IsPrevObjMove() const
+sal_Bool SwFlowFrm::IsPrevObjMove() const
{
- //TRUE der FlowFrm soll auf einen Rahmen des Vorgaengers Ruecksicht nehmen
+ //sal_True der FlowFrm soll auf einen Rahmen des Vorgaengers Ruecksicht nehmen
// und fuer diesen ggf. Umbrechen.
//!!!!!!!!!!!Hack!!!!!!!!!!!
if ( rThis.GetUpper()->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
- return FALSE;
+ return sal_False;
SwFrm *pPre = rThis.FindPrev();
@@ -1146,7 +1146,7 @@ BOOL SwFlowFrm::IsPrevObjMove() const
{
OSL_ENSURE( SwFlowFrm::CastFlowFrm( pPre ), "new flowfrm?" );
if( SwFlowFrm::CastFlowFrm( pPre )->IsAnFollow( this ) )
- return FALSE;
+ return sal_False;
SwLayoutFrm* pPreUp = pPre->GetUpper();
// Wenn der Upper ein SectionFrm oder die Spalte eines SectionFrms ist,
// duerfen wir aus diesem durchaus heraushaengen,
@@ -1162,7 +1162,7 @@ BOOL SwFlowFrm::IsPrevObjMove() const
// --> OD 2004-10-15 #i26945# - re-factoring:
// use <GetVertPosOrientFrm()> to determine, if object has followed the
// text flow to the next layout frame
- for ( USHORT i = 0; i < pPre->GetDrawObjs()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pPre->GetDrawObjs()->Count(); ++i )
{
// --> OD 2004-07-01 #i28701# - consider changed type of
// <SwSortedObjs> entries.
@@ -1180,23 +1180,23 @@ BOOL SwFlowFrm::IsPrevObjMove() const
pPreUp != pVertPosOrientFrm &&
!pPreUp->IsAnLower( pVertPosOrientFrm ) )
{
- return TRUE;
+ return sal_True;
}
}
}
// <--
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
|*
-|* BOOL SwFlowFrm::IsPageBreak()
+|* sal_Bool SwFlowFrm::IsPageBreak()
|*
|* Beschreibung Wenn vor dem Frm ein harter Seitenumbruch steht UND
-|* es einen Vorgaenger auf der gleichen Seite gibt, wird TRUE
-|* zurueckgeliefert (es muss ein PageBreak erzeugt werden) FALSE sonst.
-|* Wenn in bAct TRUE uebergeben wird, gibt die Funktion dann TRUE
+|* es einen Vorgaenger auf der gleichen Seite gibt, wird sal_True
+|* zurueckgeliefert (es muss ein PageBreak erzeugt werden) sal_False sonst.
+|* Wenn in bAct sal_True uebergeben wird, gibt die Funktion dann sal_True
|* zurueck, wenn ein PageBreak besteht.
|* Fuer Follows wird der harte Seitenumbruch natuerlich nicht
|* ausgewertet.
@@ -1211,7 +1211,7 @@ BOOL SwFlowFrm::IsPrevObjMove() const
|*************************************************************************/
-BOOL SwFlowFrm::IsPageBreak( BOOL bAct ) const
+sal_Bool SwFlowFrm::IsPageBreak( sal_Bool bAct ) const
{
if ( !IsFollow() && rThis.IsInDocBody() &&
( !rThis.IsInTab() || ( rThis.IsTabFrm() && !rThis.GetUpper()->IsInTab() ) ) && // i66968
@@ -1230,37 +1230,37 @@ BOOL SwFlowFrm::IsPageBreak( BOOL bAct ) const
OSL_ENSURE( pPrev->IsInDocBody(), "IsPageBreak: Not in DocBody?" );
if ( bAct )
{ if ( rThis.FindPageFrm() == pPrev->FindPageFrm() )
- return FALSE;
+ return sal_False;
}
else
{ if ( rThis.FindPageFrm() != pPrev->FindPageFrm() )
- return FALSE;
+ return sal_False;
}
const SvxBreak eBreak = pSet->GetBreak().GetBreak();
if ( eBreak == SVX_BREAK_PAGE_BEFORE || eBreak == SVX_BREAK_PAGE_BOTH )
- return TRUE;
+ return sal_True;
else
{
const SvxBreak &ePrB = pPrev->GetAttrSet()->GetBreak().GetBreak();
if ( ePrB == SVX_BREAK_PAGE_AFTER ||
ePrB == SVX_BREAK_PAGE_BOTH ||
pSet->GetPageDesc().GetPageDesc() )
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
|*
-|* BOOL SwFlowFrm::IsColBreak()
+|* sal_Bool SwFlowFrm::IsColBreak()
|*
|* Beschreibung Wenn vor dem Frm ein harter Spaltenumbruch steht UND
-|* es einen Vorgaenger in der gleichen Spalte gibt, wird TRUE
-|* zurueckgeliefert (es muss ein PageBreak erzeugt werden) FALSE sonst.
-|* Wenn in bAct TRUE uebergeben wird, gibt die Funktion dann TRUE
+|* es einen Vorgaenger in der gleichen Spalte gibt, wird sal_True
+|* zurueckgeliefert (es muss ein PageBreak erzeugt werden) sal_False sonst.
+|* Wenn in bAct sal_True uebergeben wird, gibt die Funktion dann sal_True
|* zurueck, wenn ein ColBreak besteht.
|* Fuer Follows wird der harte Spaltenumbruch natuerlich nicht
|* ausgewertet.
@@ -1272,7 +1272,7 @@ BOOL SwFlowFrm::IsPageBreak( BOOL bAct ) const
|*
|*************************************************************************/
-BOOL SwFlowFrm::IsColBreak( BOOL bAct ) const
+sal_Bool SwFlowFrm::IsColBreak( sal_Bool bAct ) const
{
if ( !IsFollow() && (rThis.IsMoveable() || bAct) )
{
@@ -1289,31 +1289,31 @@ BOOL SwFlowFrm::IsColBreak( BOOL bAct ) const
{
if ( bAct )
{ if ( pCol == pPrev->FindColFrm() )
- return FALSE;
+ return sal_False;
}
else
{ if ( pCol != pPrev->FindColFrm() )
- return FALSE;
+ return sal_False;
}
const SvxBreak eBreak = rThis.GetAttrSet()->GetBreak().GetBreak();
if ( eBreak == SVX_BREAK_COLUMN_BEFORE ||
eBreak == SVX_BREAK_COLUMN_BOTH )
- return TRUE;
+ return sal_True;
else
{
const SvxBreak &ePrB = pPrev->GetAttrSet()->GetBreak().GetBreak();
if ( ePrB == SVX_BREAK_COLUMN_AFTER ||
ePrB == SVX_BREAK_COLUMN_BOTH )
- return TRUE;
+ return sal_True;
}
}
}
}
- return FALSE;
+ return sal_False;
}
-BOOL SwFlowFrm::HasParaSpaceAtPages( BOOL bSct ) const
+sal_Bool SwFlowFrm::HasParaSpaceAtPages( sal_Bool bSct ) const
{
if( rThis.IsInSct() )
{
@@ -1323,26 +1323,26 @@ BOOL SwFlowFrm::HasParaSpaceAtPages( BOOL bSct ) const
if( pTmp->IsCellFrm() || pTmp->IsFlyFrm() ||
pTmp->IsFooterFrm() || pTmp->IsHeaderFrm() ||
( pTmp->IsFtnFrm() && !((SwFtnFrm*)pTmp)->GetMaster() ) )
- return TRUE;
+ return sal_True;
if( pTmp->IsPageFrm() )
- return ( pTmp->GetPrev() && !IsPageBreak(TRUE) ) ? FALSE : TRUE;
+ return ( pTmp->GetPrev() && !IsPageBreak(sal_True) ) ? sal_False : sal_True;
if( pTmp->IsColumnFrm() && pTmp->GetPrev() )
- return IsColBreak( TRUE );
+ return IsColBreak( sal_True );
if( pTmp->IsSctFrm() && ( !bSct || pTmp->GetPrev() ) )
- return FALSE;
+ return sal_False;
pTmp = pTmp->GetUpper();
}
- OSL_ENSURE( FALSE, "HasParaSpaceAtPages: Where's my page?" );
- return FALSE;
+ OSL_ENSURE( sal_False, "HasParaSpaceAtPages: Where's my page?" );
+ return sal_False;
}
if( !rThis.IsInDocBody() || ( rThis.IsInTab() && !rThis.IsTabFrm()) ||
- IsPageBreak( TRUE ) || ( rThis.FindColFrm() && IsColBreak( TRUE ) ) )
- return TRUE;
+ IsPageBreak( sal_True ) || ( rThis.FindColFrm() && IsColBreak( sal_True ) ) )
+ return sal_True;
const SwFrm* pTmp = rThis.FindColFrm();
if( pTmp )
{
if( pTmp->GetPrev() )
- return FALSE;
+ return sal_False;
}
else
pTmp = &rThis;
@@ -1802,7 +1802,7 @@ SwTwips SwFlowFrm::CalcAddLowerSpaceAsLastInTableCell(
/*************************************************************************
|*
-|* BOOL SwFlowFrm::CheckMoveFwd()
+|* sal_Bool SwFlowFrm::CheckMoveFwd()
|*
|* Beschreibung Moved den Frm vorwaerts wenn es durch die aktuellen
|* Bedingungen und Attribute notwendig erscheint.
@@ -1810,7 +1810,7 @@ SwTwips SwFlowFrm::CalcAddLowerSpaceAsLastInTableCell(
|*************************************************************************/
-BOOL SwFlowFrm::CheckMoveFwd( BOOL &rbMakePage, BOOL bKeep, BOOL )
+sal_Bool SwFlowFrm::CheckMoveFwd( sal_Bool &rbMakePage, sal_Bool bKeep, sal_Bool )
{
const SwFrm* pNxt = rThis.GetIndNext();
@@ -1833,61 +1833,61 @@ BOOL SwFlowFrm::CheckMoveFwd( BOOL &rbMakePage, BOOL bKeep, BOOL )
}
if( pNxt && pNxt->GetValidPosFlag() )
{
- BOOL bMove = FALSE;
+ sal_Bool bMove = sal_False;
const SwSectionFrm *pSct = rThis.FindSctFrm();
if( pSct && !pSct->GetValidSizeFlag() )
{
const SwSectionFrm* pNxtSct = pNxt->FindSctFrm();
if( pNxtSct && pSct->IsAnFollow( pNxtSct ) )
- bMove = TRUE;
+ bMove = sal_True;
}
else
- bMove = TRUE;
+ bMove = sal_True;
if( bMove )
{
//Keep together with the following frame
- MoveFwd( rbMakePage, FALSE );
- return TRUE;
+ MoveFwd( rbMakePage, sal_False );
+ return sal_True;
}
}
}
- BOOL bMovedFwd = FALSE;
+ sal_Bool bMovedFwd = sal_False;
if ( rThis.GetIndPrev() )
{
if ( IsPrevObjMove() ) //Auf Objekte des Prev Ruecksicht nehmen?
{
- bMovedFwd = TRUE;
- if ( !MoveFwd( rbMakePage, FALSE ) )
- rbMakePage = FALSE;
+ bMovedFwd = sal_True;
+ if ( !MoveFwd( rbMakePage, sal_False ) )
+ rbMakePage = sal_False;
}
else
{
- if ( IsPageBreak( FALSE ) )
+ if ( IsPageBreak( sal_False ) )
{
- while ( MoveFwd( rbMakePage, TRUE ) )
+ while ( MoveFwd( rbMakePage, sal_True ) )
/* do nothing */;
- rbMakePage = FALSE;
- bMovedFwd = TRUE;
+ rbMakePage = sal_False;
+ bMovedFwd = sal_True;
}
- else if ( IsColBreak ( FALSE ) )
+ else if ( IsColBreak ( sal_False ) )
{
const SwPageFrm *pPage = rThis.FindPageFrm();
SwFrm *pCol = rThis.FindColFrm();
do
- { MoveFwd( rbMakePage, FALSE );
+ { MoveFwd( rbMakePage, sal_False );
SwFrm *pTmp = rThis.FindColFrm();
if( pTmp != pCol )
{
- bMovedFwd = TRUE;
+ bMovedFwd = sal_True;
pCol = pTmp;
}
else
break;
- } while ( IsColBreak( FALSE ) );
+ } while ( IsColBreak( sal_False ) );
if ( pPage != rThis.FindPageFrm() )
- rbMakePage = FALSE;
+ rbMakePage = sal_False;
}
}
}
@@ -1896,14 +1896,14 @@ BOOL SwFlowFrm::CheckMoveFwd( BOOL &rbMakePage, BOOL bKeep, BOOL )
/*************************************************************************
|*
-|* BOOL SwFlowFrm::MoveFwd()
+|* sal_Bool SwFlowFrm::MoveFwd()
|*
|* Beschreibung Returnwert sagt, ob der Frm die Seite gewechselt hat.
|*
|*************************************************************************/
-BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
+sal_Bool SwFlowFrm::MoveFwd( sal_Bool bMakePage, sal_Bool bPageBreak, sal_Bool bMoveAlways )
{
//!!!!MoveFtnCntFwd muss ggf. mitgepflegt werden.
SwFtnBossFrm *pOldBoss = rThis.FindFtnBossFrm();
@@ -1912,7 +1912,7 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
if( !IsFwdMoveAllowed() && !bMoveAlways )
{
- BOOL bNoFwd = TRUE;
+ sal_Bool bNoFwd = sal_True;
if( rThis.IsInSct() )
{
SwFtnBossFrm* pBoss = rThis.FindFtnBossFrm();
@@ -1927,7 +1927,7 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
rThis.GetUpper()->FindTabFrm()->IsFwdMoveAllowed() ) ) &&
0 != const_cast<SwFrm&>(rThis).GetNextCellLeaf( MAKEPAGE_NONE ) )
{
- bNoFwd = FALSE;
+ bNoFwd = sal_False;
}
if( bNoFwd )
@@ -1935,17 +1935,17 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
//Fuer PageBreak ist das Moven erlaubt, wenn der Frm nicht
//bereits der erste der Seite ist.
if ( !bPageBreak )
- return FALSE;
+ return sal_False;
const SwFrm *pCol = rThis.FindColFrm();
if ( !pCol || !pCol->GetPrev() )
- return FALSE;
+ return sal_False;
}
}
- BOOL bSamePage = TRUE;
+ sal_Bool bSamePage = sal_True;
SwLayoutFrm *pNewUpper =
- rThis.GetLeaf( bMakePage ? MAKEPAGE_INSERT : MAKEPAGE_NONE, TRUE );
+ rThis.GetLeaf( bMakePage ? MAKEPAGE_INSERT : MAKEPAGE_NONE, sal_True );
if ( pNewUpper )
{
@@ -1957,7 +1957,7 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
// Wenn unser NewUpper in einem SectionFrm liegt, muessen wir
// verhindern, dass sich dieser im Calc selbst zerstoert
SwSectionFrm* pSect = pNewUpper->FindSctFrm();
- BOOL bUnlock = FALSE;
+ sal_Bool bUnlock = sal_False;
if( pSect )
{
// Wenn wir nur innerhalb unseres SectionFrms die Spalte wechseln,
@@ -1977,13 +1977,13 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
pNewUpper->Calc();
SwFtnBossFrm *pNewBoss = pNewUpper->FindFtnBossFrm();
- BOOL bBossChg = pNewBoss != pOldBoss;
- pNewBoss = pNewBoss->FindFtnBossFrm( TRUE );
- pOldBoss = pOldBoss->FindFtnBossFrm( TRUE );
+ sal_Bool bBossChg = pNewBoss != pOldBoss;
+ pNewBoss = pNewBoss->FindFtnBossFrm( sal_True );
+ pOldBoss = pOldBoss->FindFtnBossFrm( sal_True );
SwPageFrm* pNewPage = pOldPage;
// First, we move the footnotes.
- BOOL bFtnMoved = FALSE;
+ sal_Bool bFtnMoved = sal_False;
// --> FME 2004-07-15 #i26831#
// If pSect has just been created, the printing area of pSect has
@@ -2013,7 +2013,7 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
(SwLayoutFrm*)((SwTxtFrm*)pStart)->FindBodyFrm() : 0 ) : 0;
if( pBody )
bFtnMoved = pBody->MoveLowerFtns( pStart, pOldBoss, pNewBoss,
- FALSE);
+ sal_False);
}
// Bei SectionFrms ist es moeglich, dass wir selbst durch pNewUpper->Calc()
// bewegt wurden, z. B. in den pNewUpper.
@@ -2061,7 +2061,7 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
if( bBossChg )
{
- rThis.Prepare( PREP_BOSS_CHGD, 0, FALSE );
+ rThis.Prepare( PREP_BOSS_CHGD, 0, sal_False );
if( !bSamePage )
{
ViewShell *pSh = rThis.GetShell();
@@ -2084,7 +2084,7 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
( rThis.GetAttrSet()->GetPageDesc().GetPageDesc() ||
pOldPage->GetPageDesc()->GetFollow() != pNewPage->GetPageDesc() ) )
{
- SwFrm::CheckPageDescs( pNewPage, FALSE );
+ SwFrm::CheckPageDescs( pNewPage, sal_False );
}
// <--
}
@@ -2095,7 +2095,7 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
/*************************************************************************
|*
-|* BOOL SwFlowFrm::MoveBwd()
+|* sal_Bool SwFlowFrm::MoveBwd()
|*
|* Beschreibung Returnwert sagt, ob der Frm die Seite wechseln soll.
|* Sollte von abgeleiteten Klassen gerufen werden.
@@ -2103,13 +2103,13 @@ BOOL SwFlowFrm::MoveFwd( BOOL bMakePage, BOOL bPageBreak, BOOL bMoveAlways )
|*
|*************************************************************************/
-BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
+sal_Bool SwFlowFrm::MoveBwd( sal_Bool &rbReformat )
{
- SwFlowFrm::SetMoveBwdJump( FALSE );
+ SwFlowFrm::SetMoveBwdJump( sal_False );
SwFtnFrm* pFtn = rThis.FindFtnFrm();
if ( pFtn && pFtn->IsBackMoveLocked() )
- return FALSE;
+ return sal_False;
// --> OD 2004-11-29 #115759# - text frames, which are directly inside
// tables aren't allowed to move backward.
@@ -2120,7 +2120,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
{
if ( pUpperFrm->IsTabFrm() )
{
- return FALSE;
+ return sal_False;
}
else if ( pUpperFrm->IsColumnFrm() && pUpperFrm->IsInSct() )
{
@@ -2134,7 +2134,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
SwFtnBossFrm * pOldBoss = rThis.FindFtnBossFrm();
SwPageFrm * const pOldPage = pOldBoss->FindPageFrm();
SwLayoutFrm *pNewUpper = 0;
- BOOL bCheckPageDescs = FALSE;
+ sal_Bool bCheckPageDescs = sal_False;
bool bCheckPageDescOfNextPage = false;
if ( pFtn )
@@ -2160,16 +2160,16 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
OSL_ENSURE( pRef, "MoveBwd: Endnote for an empty section?" );
if( !bEndnote )
- pOldBoss = pOldBoss->FindFtnBossFrm( TRUE );
+ pOldBoss = pOldBoss->FindFtnBossFrm( sal_True );
SwFtnBossFrm *pRefBoss = pRef->FindFtnBossFrm( !bEndnote );
if ( pOldBoss != pRefBoss &&
// OD 08.11.2002 #104840# - use <SwLayoutFrm::IsBefore(..)>
( !bEndnote ||
pRefBoss->IsBefore( pOldBoss ) )
)
- pNewUpper = rThis.GetLeaf( MAKEPAGE_FTN, FALSE );
+ pNewUpper = rThis.GetLeaf( MAKEPAGE_FTN, sal_False );
}
- else if ( IsPageBreak( TRUE ) ) //PageBreak zu beachten?
+ else if ( IsPageBreak( sal_True ) ) //PageBreak zu beachten?
{
//Wenn auf der vorhergehenden Seite kein Frm im Body steht,
//so ist das Zurueckfliessen trotz Pagebreak sinnvoll
@@ -2191,7 +2191,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
nDiff -= 1;
if ( nDiff > 1 )
{
- pNewUpper = rThis.GetLeaf( MAKEPAGE_NONE, FALSE );
+ pNewUpper = rThis.GetLeaf( MAKEPAGE_NONE, sal_False );
// --> OD 2006-05-08 #i53139#
// Now <pNewUpper> is a previous layout frame, which contains
// content. But the new upper layout frame has to be the next one.
@@ -2216,7 +2216,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
// returns new upper on page 2.
if ( pNewUpper->Lower() )
{
- SwLayoutFrm* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NONE, TRUE );
+ SwLayoutFrm* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NONE, sal_True );
if ( pNewNextUpper &&
pNewNextUpper != rThis.GetUpper() &&
pNewNextUpper->GetType() == pNewUpper->GetType() &&
@@ -2232,19 +2232,19 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
}
// <--
- bCheckPageDescs = TRUE;
+ bCheckPageDescs = sal_True;
}
}
}
}
- else if ( IsColBreak( TRUE ) )
+ else if ( IsColBreak( sal_True ) )
{
//Wenn in der vorhergehenden Spalte kein CntntFrm steht, so ist
//das Zurueckfliessen trotz ColumnBreak sinnvoll
//(sonst: leere Spalte).
if( rThis.IsInSct() )
{
- pNewUpper = rThis.GetLeaf( MAKEPAGE_NONE, FALSE );
+ pNewUpper = rThis.GetLeaf( MAKEPAGE_NONE, sal_False );
if( pNewUpper && !SwFlowFrm::IsMoveBwdJump() &&
( pNewUpper->ContainsCntnt() ||
( ( !pNewUpper->IsColBodyFrm() ||
@@ -2269,7 +2269,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
// --> OD 2006-07-05 #136538# - another correction of fix for i53139
// Beside type check, check also, if proposed new next upper
// frame is inside the same frame types.
- SwLayoutFrm* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NOSECTION, TRUE );
+ SwLayoutFrm* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NOSECTION, sal_True );
if ( pNewNextUpper &&
pNewNextUpper->GetType() == pNewUpper->GetType() &&
pNewNextUpper->IsInDocBody() == pNewUpper->IsInDocBody() &&
@@ -2286,16 +2286,16 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
else
{
const SwFrm *pCol = rThis.FindColFrm();
- BOOL bGoOn = TRUE;
- BOOL bJump = FALSE;
+ sal_Bool bGoOn = sal_True;
+ sal_Bool bJump = sal_False;
do
{
if ( pCol->GetPrev() )
pCol = pCol->GetPrev();
else
{
- bGoOn = FALSE;
- pCol = rThis.GetLeaf( MAKEPAGE_NONE, FALSE );
+ bGoOn = sal_False;
+ pCol = rThis.GetLeaf( MAKEPAGE_NONE, sal_False );
}
if ( pCol )
{
@@ -2305,7 +2305,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
(SwLayoutFrm*)pCol;
if ( pColBody->ContainsCntnt() )
{
- bGoOn = FALSE; // Hier gibt's Inhalt, wir akzeptieren diese
+ bGoOn = sal_False; // Hier gibt's Inhalt, wir akzeptieren diese
// nur, wenn GetLeaf() das MoveBwdJump-Flag gesetzt hat.
if( SwFlowFrm::IsMoveBwdJump() )
{
@@ -2324,7 +2324,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
// --> OD 2006-11-02 #i71065#
// Check that the proposed new next upper layout
// frame isn't the current one.
- SwLayoutFrm* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NONE, TRUE );
+ SwLayoutFrm* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NONE, sal_True );
if ( pNewNextUpper &&
pNewNextUpper != rThis.GetUpper() &&
pNewNextUpper->GetType() == pNewUpper->GetType() &&
@@ -2342,18 +2342,18 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
else
{
if( pNewUpper ) // Wir hatten schon eine leere Spalte, haben
- bJump = TRUE; // also eine uebersprungen
+ bJump = sal_True; // also eine uebersprungen
pNewUpper = pColBody; // Diese leere Spalte kommt in Frage,
// trotzdem weitersuchen
}
}
} while( bGoOn );
if( bJump )
- SwFlowFrm::SetMoveBwdJump( TRUE );
+ SwFlowFrm::SetMoveBwdJump( sal_True );
}
}
else //Keine Breaks also kann ich zurueckfliessen
- pNewUpper = rThis.GetLeaf( MAKEPAGE_NONE, FALSE );
+ pNewUpper = rThis.GetLeaf( MAKEPAGE_NONE, sal_False );
// --> OD 2004-06-23 #i27801# - no move backward of 'master' text frame,
// if - due to its object positioning - it isn't allowed to be on the new page frame
@@ -2432,7 +2432,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
SwFrm *pFrm = pNewUpper->Lower();
while ( pFrm->GetNext() )
pFrm = pFrm->GetNext();
- pNewUpper = pFrm->GetLeaf( MAKEPAGE_INSERT, TRUE );
+ pNewUpper = pFrm->GetLeaf( MAKEPAGE_INSERT, sal_True );
if( pNewUpper == rThis.GetUpper() ) //Landen wir wieder an der gleichen Stelle?
pNewUpper = NULL; //dann eruebrigt sich das Moven
}
@@ -2441,7 +2441,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
}
// <--
}
- if ( pNewUpper && !ShouldBwdMoved( pNewUpper, TRUE, rbReformat ) )
+ if ( pNewUpper && !ShouldBwdMoved( pNewUpper, sal_True, rbReformat ) )
{
if( !pNewUpper->Lower() )
{
@@ -2459,9 +2459,9 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
!pSectFrm->ContainsCntnt() && !pSectFrm->ContainsAny( true ) )
// <--
{
- pSectFrm->DelEmpty( TRUE );
+ pSectFrm->DelEmpty( sal_True );
delete pSectFrm;
- rThis.bValidPos = TRUE;
+ rThis.bValidPos = sal_True;
}
}
}
@@ -2516,7 +2516,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
( !rThis.IsSctFrm() && rThis.IsInSct() )
? MAKEPAGE_NOSECTION
: MAKEPAGE_NONE,
- TRUE );
+ sal_True );
// --> OD 2007-01-10 #i73194# - make code robust
OSL_ENSURE( pNextNewUpper, "<SwFlowFrm::MoveBwd(..)> - missing next new upper" );
if ( pNextNewUpper &&
@@ -2573,7 +2573,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
pNewUpper = (SwSectionFrm*)pTmp;
else
{
- pSct = new SwSectionFrm( *pSct, TRUE );
+ pSct = new SwSectionFrm( *pSct, sal_True );
pSct->Paste( pNewUpper );
pSct->Init();
pNewUpper = pSct;
@@ -2581,8 +2581,8 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
}
}
}
- BOOL bUnlock = FALSE;
- BOOL bFollow = FALSE;
+ sal_Bool bUnlock = sal_False;
+ sal_Bool bFollow = sal_False;
//Section locken, sonst kann sie bei Fluss des einzigen Cntnt etwa
//von zweiter in die erste Spalte zerstoert werden.
SwSectionFrm* pSect = pNewUpper->FindSctFrm();
@@ -2621,7 +2621,7 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
SwPageFrm *pNewPage = rThis.FindPageFrm();
if( pNewPage != pOldPage )
{
- rThis.Prepare( PREP_BOSS_CHGD, (const void*)pOldPage, FALSE );
+ rThis.Prepare( PREP_BOSS_CHGD, (const void*)pOldPage, sal_False );
ViewShell *pSh = rThis.GetShell();
if ( pSh && !pSh->Imp()->IsUpdateExpFlds() )
pSh->GetDoc()->SetNewFldLst(true); //Wird von CalcLayout() hinterher eledigt!
@@ -2639,12 +2639,12 @@ BOOL SwFlowFrm::MoveBwd( BOOL &rbReformat )
SwPageFrm* pStartPage = bCheckPageDescOfNextPage ?
pNewPage :
(SwPageFrm*)pNewPage->GetNext();
- SwFrm::CheckPageDescs( pStartPage, FALSE);
+ SwFrm::CheckPageDescs( pStartPage, sal_False);
}
else if ( rThis.GetAttrSet()->GetPageDesc().GetPageDesc() )
{
//Erste Seite wird etwa durch Ausblenden eines Bereiches leer
- SwFrm::CheckPageDescs( (SwPageFrm*)pNewPage, FALSE);
+ SwFrm::CheckPageDescs( (SwPageFrm*)pNewPage, sal_False);
}
}
}
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index b239d8b0c378..41d5a33e86c4 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -119,30 +119,30 @@ SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
// aRelPos(),
pPrevLink( 0 ),
pNextLink( 0 ),
- bInCnt( FALSE ),
- bAtCnt( FALSE ),
- bLayout( FALSE ),
- bAutoPosition( FALSE ),
- bNoShrink( FALSE ),
- bLockDeleteContent( FALSE )
+ bInCnt( sal_False ),
+ bAtCnt( sal_False ),
+ bLayout( sal_False ),
+ bAutoPosition( sal_False ),
+ bNoShrink( sal_False ),
+ bLockDeleteContent( sal_False )
{
nType = FRMC_FLY;
- bInvalid = bNotifyBack = TRUE;
+ bInvalid = bNotifyBack = sal_True;
bLocked = bMinHeight =
- bHeightClipped = bWidthClipped = bFormatHeightOnly = FALSE;
+ bHeightClipped = bWidthClipped = bFormatHeightOnly = sal_False;
//Grosseneinstellung, Fixe groesse ist immer die Breite
const SwFmtFrmSize &rFrmSize = pFmt->GetFrmSize();
- BOOL bVert = FALSE;
- UINT16 nDir =
+ sal_Bool bVert = sal_False;
+ sal_uInt16 nDir =
((SvxFrameDirectionItem&)pFmt->GetFmtAttr( RES_FRAMEDIR )).GetValue();
if( FRMDIR_ENVIRONMENT == nDir )
{
bDerivedVert = 1;
bDerivedR2L = 1;
if( pAnch && pAnch->IsVertical() )
- bVert = TRUE;
+ bVert = sal_True;
}
else
{
@@ -151,9 +151,21 @@ SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
bDerivedR2L = 0;
if( FRMDIR_HORI_LEFT_TOP == nDir || FRMDIR_HORI_RIGHT_TOP == nDir
|| pFmt->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ {
bVertical = 0;
+ bVertLR = 0;
+ }
else
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ {
bVertical = 1;
+ if ( FRMDIR_VERT_TOP_LEFT == nDir )
+ bVertLR = 1;
+ else
+ bVertLR = 0;
+ }
+
bVert = bVertical;
bInvalidR2L = 0;
if( FRMDIR_HORI_RIGHT_TOP == nDir )
@@ -167,16 +179,16 @@ SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
//Hoehe Fix oder Variabel oder was?
if ( rFrmSize.GetHeightSizeType() == ATT_MIN_SIZE )
- bMinHeight = TRUE;
+ bMinHeight = sal_True;
else if ( rFrmSize.GetHeightSizeType() == ATT_FIX_SIZE )
- bFixSize = TRUE;
+ bFixSize = sal_True;
// OD 2004-02-12 #110582#-2 - insert columns, if necessary
InsertColumns();
//Erst das Init, dann den Inhalt, denn zum Inhalt koennen widerum
//Objekte/Rahmen gehoeren die dann angemeldet werden.
- InitDrawObj( FALSE );
+ InitDrawObj( sal_False );
// OD 2004-01-19 #110582#
Chain( pAnch );
@@ -228,7 +240,7 @@ void SwFlyFrm::InsertCnt()
{
const SwFmtCntnt& rCntnt = GetFmt()->GetCntnt();
OSL_ENSURE( rCntnt.GetCntntIdx(), ":-( no content prepared." );
- ULONG nIndex = rCntnt.GetCntntIdx()->GetIndex();
+ sal_uLong nIndex = rCntnt.GetCntntIdx()->GetIndex();
// Lower() bedeutet SwColumnFrm, eingefuegt werden muss der Inhalt dann in den (Column)BodyFrm
::_InsertCnt( Lower() ? (SwLayoutFrm*)((SwLayoutFrm*)Lower())->Lower() : (SwLayoutFrm*)this,
GetFmt()->GetDoc(), nIndex );
@@ -236,8 +248,8 @@ void SwFlyFrm::InsertCnt()
//NoTxt haben immer eine FixHeight.
if ( Lower() && Lower()->IsNoTxtFrm() )
{
- bFixSize = TRUE;
- bMinHeight = FALSE;
+ bFixSize = sal_True;
+ bMinHeight = sal_False;
}
}
}
@@ -373,7 +385,7 @@ void SwFlyFrm::DeleteCnt()
|* SwFlyFrm::InitDrawObj()
|*
|*************************************************************************/
-void SwFlyFrm::InitDrawObj( BOOL bNotify )
+void SwFlyFrm::InitDrawObj( sal_Bool bNotify )
{
//ContactObject aus dem Format suchen. Wenn bereits eines existiert, so
//braucht nur eine neue Ref erzeugt werden, anderfalls ist es jetzt an
@@ -548,7 +560,7 @@ void SwFlyFrm::UnchainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow )
//Der Follow muss mit seinem eigenen Inhalt versorgt werden.
const SwFmtCntnt &rCntnt = pFollow->GetFmt()->GetCntnt();
OSL_ENSURE( rCntnt.GetCntntIdx(), ":-( Kein Inhalt vorbereitet." );
- ULONG nIndex = rCntnt.GetCntntIdx()->GetIndex();
+ sal_uLong nIndex = rCntnt.GetCntntIdx()->GetIndex();
// Lower() bedeutet SwColumnFrm, dieser beinhaltet wieder einen SwBodyFrm
::_InsertCnt( pFollow->Lower() ? (SwLayoutFrm*)((SwLayoutFrm*)pFollow->Lower())->Lower()
: (SwLayoutFrm*)pFollow,
@@ -639,23 +651,23 @@ SwFrm *SwFlyFrm::FindLastLower()
|*
|*************************************************************************/
-BOOL SwFlyFrm::FrmSizeChg( const SwFmtFrmSize &rFrmSize )
+sal_Bool SwFlyFrm::FrmSizeChg( const SwFmtFrmSize &rFrmSize )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwTwips nDiffHeight = Frm().Height();
if ( rFrmSize.GetHeightSizeType() == ATT_VAR_SIZE )
- bFixSize = bMinHeight = FALSE;
+ bFixSize = bMinHeight = sal_False;
else
{
if ( rFrmSize.GetHeightSizeType() == ATT_FIX_SIZE )
{
- bFixSize = TRUE;
- bMinHeight = FALSE;
+ bFixSize = sal_True;
+ bMinHeight = sal_False;
}
else if ( rFrmSize.GetHeightSizeType() == ATT_MIN_SIZE )
{
- bFixSize = FALSE;
- bMinHeight = TRUE;
+ bFixSize = sal_False;
+ bMinHeight = sal_True;
}
nDiffHeight -= rFrmSize.GetHeight();
}
@@ -678,13 +690,13 @@ BOOL SwFlyFrm::FrmSizeChg( const SwFmtFrmSize &rFrmSize )
aPrt.Width ( aPrt.Width() - nDiffWidth );
ChgLowersProp( aOldSz );
::Notify( this, FindPageFrm(), aOld );
- bValidPos = FALSE;
- bRet = TRUE;
+ bValidPos = sal_False;
+ bRet = sal_True;
}
else if ( Lower()->IsNoTxtFrm() )
{
- bFixSize = TRUE;
- bMinHeight = FALSE;
+ bFixSize = sal_True;
+ bMinHeight = sal_False;
}
}
return bRet;
@@ -698,7 +710,7 @@ BOOL SwFlyFrm::FrmSizeChg( const SwFmtFrmSize &rFrmSize )
void SwFlyFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
{
- BYTE nInvFlags = 0;
+ sal_uInt8 nInvFlags = 0;
if( pNew && RES_ATTRSET_CHG == pNew->Which() )
{
@@ -706,7 +718,7 @@ void SwFlyFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
SfxItemIter aOIter( *((SwAttrSetChg*)pOld)->GetChgSet() );
SwAttrSetChg aOldSet( *(SwAttrSetChg*)pOld );
SwAttrSetChg aNewSet( *(SwAttrSetChg*)pNew );
- while( TRUE )
+ while( sal_True )
{
_UpdateAttr( (SfxPoolItem*)aOIter.GetCurItem(),
(SfxPoolItem*)aNIter.GetCurItem(), nInvFlags,
@@ -765,11 +777,11 @@ void SwFlyFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
}
void SwFlyFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
- BYTE &rInvFlags,
+ sal_uInt8 &rInvFlags,
SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet )
{
- BOOL bClear = TRUE;
- const USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_Bool bClear = sal_True;
+ const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
ViewShell *pSh = GetShell();
switch( nWhich )
{
@@ -864,7 +876,7 @@ void SwFlyFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
SwFmtCol aCol;
if ( Lower() && Lower()->IsColumnFrm() )
{
- USHORT nCol = 0;
+ sal_uInt16 nCol = 0;
SwFrm *pTmp = Lower();
do
{ ++nCol;
@@ -901,7 +913,7 @@ void SwFlyFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
if ( pSh )
pSh->InvalidateWindows( Frm() );
const IDocumentDrawModelAccess* pIDDMA = GetFmt()->getIDocumentDrawModelAccess();
- const BYTE nId = GetFmt()->GetOpaque().GetValue() ?
+ const sal_uInt8 nId = GetFmt()->GetOpaque().GetValue() ?
pIDDMA->GetHeavenId() :
pIDDMA->GetHellId();
GetVirtDrawObj()->SetLayer( nId );
@@ -961,8 +973,8 @@ void SwFlyFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
break;
case RES_FRAMEDIR :
- SetDerivedVert( FALSE );
- SetDerivedR2L( FALSE );
+ SetDerivedVert( sal_False );
+ SetDerivedR2L( sal_False );
CheckDirChange();
break;
@@ -972,7 +984,7 @@ void SwFlyFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
pSh->InvalidateWindows( Frm() );
const IDocumentDrawModelAccess* pIDDMA = GetFmt()->getIDocumentDrawModelAccess();
- const BYTE nId = ((SvxOpaqueItem*)pNew)->GetValue() ?
+ const sal_uInt8 nId = ((SvxOpaqueItem*)pNew)->GetValue() ?
pIDDMA->GetHeavenId() :
pIDDMA->GetHellId();
GetVirtDrawObj()->SetLayer( nId );
@@ -1050,7 +1062,7 @@ void SwFlyFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
}
default:
- bClear = FALSE;
+ bClear = sal_False;
}
if ( bClear )
{
@@ -1075,11 +1087,11 @@ void SwFlyFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
*************************************************************************/
// erfrage vom Modify Informationen
-BOOL SwFlyFrm::GetInfo( SfxPoolItem & rInfo ) const
+sal_Bool SwFlyFrm::GetInfo( SfxPoolItem & rInfo ) const
{
if( RES_AUTOFMT_DOCNODE == rInfo.Which() )
- return FALSE; // es gibt einen FlyFrm also wird er benutzt
- return TRUE; // weiter suchen
+ return sal_False; // es gibt einen FlyFrm also wird er benutzt
+ return sal_True; // weiter suchen
}
/*************************************************************************
@@ -1091,7 +1103,7 @@ BOOL SwFlyFrm::GetInfo( SfxPoolItem & rInfo ) const
void SwFlyFrm::_Invalidate( SwPageFrm *pPage )
{
InvalidatePage( pPage );
- bNotifyBack = bInvalid = TRUE;
+ bNotifyBack = bInvalid = sal_True;
SwFlyFrm *pFrm;
if ( GetAnchorFrm() && 0 != (pFrm = AnchorFrm()->FindFlyFrm()) )
@@ -1203,13 +1215,13 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos )
{
aHori.SetHoriOrient( text::HoriOrientation::NONE );
aHori.SetRelationOrient( text::RelOrientation::PAGE_FRAME );
- aHori.SetPosToggle( FALSE );
+ aHori.SetPosToggle( sal_False );
}
else if ( eAnchorType == FLY_AT_FLY )
{
aHori.SetHoriOrient( text::HoriOrientation::NONE );
aHori.SetRelationOrient( text::RelOrientation::FRAME );
- aHori.SetPosToggle( FALSE );
+ aHori.SetPosToggle( sal_False );
}
// <--
else if ( IsFlyAtCntFrm() || text::HoriOrientation::NONE != aHori.GetHoriOrient() )
@@ -1234,11 +1246,12 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos )
}
else
aHori.SetRelationOrient( text::RelOrientation::FRAME );
- aHori.SetPosToggle( FALSE );
+ aHori.SetPosToggle( sal_False );
}
aHori.SetPos( nTmpX );
aSet.Put( aHori );
}
+ SetCurrRelPos( rNewPos );
pFmt->GetDoc()->SetAttr( aSet, *pFmt );
}
}
@@ -1270,9 +1283,9 @@ void SwFlyFrm::Format( const SwBorderAttrs *pAttrs )
//Breite der Spalten pruefen und ggf. einstellen.
if ( Lower() && Lower()->IsColumnFrm() )
- AdjustColumns( 0, FALSE );
+ AdjustColumns( 0, sal_False );
- bValidSize = TRUE;
+ bValidSize = sal_True;
const SwTwips nUL = pAttrs->CalcTopLine() + pAttrs->CalcBottomLine();
const SwTwips nLR = pAttrs->CalcLeftLine() + pAttrs->CalcRightLine();
@@ -1327,7 +1340,7 @@ void SwFlyFrm::Format( const SwBorderAttrs *pAttrs )
SwTwips nTop = (Frm().*fnRect->fnGetTop)();
SwTwips nBorder = (Frm().*fnRect->fnGetHeight)() -
(Prt().*fnRect->fnGetHeight)();
- for ( USHORT i = 0; i < nCnt; ++i )
+ for ( sal_uInt16 i = 0; i < nCnt; ++i )
{
SwAnchoredObject* pAnchoredObj = (*GetDrawObjs())[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
@@ -1368,11 +1381,11 @@ void SwFlyFrm::Format( const SwBorderAttrs *pAttrs )
InvalidateObjRectWithSpaces();
}
// <--
- bValidSize = TRUE;
+ bValidSize = sal_True;
}
else
{
- bValidSize = TRUE; //Fixe Frms formatieren sich nicht.
+ bValidSize = sal_True; //Fixe Frms formatieren sich nicht.
//Flys stellen ihre Groesse anhand des Attr ein.
SwTwips nNewSize = bVert ? aRelSize.Width() : aRelSize.Height();
nNewSize -= nUL;
@@ -1435,19 +1448,19 @@ void SwFlyFrm::Format( const SwBorderAttrs *pAttrs )
// problems in method <SwCntntFrm::_WouldFit(..)>,
// which assumes that the follows are formatted.
// Thus, <bNoCalcFollow> no longer used by <FormatWidthCols(..)>.
-//void CalcCntnt( SwLayoutFrm *pLay, BOOL bNoColl )
+//void CalcCntnt( SwLayoutFrm *pLay, sal_Bool bNoColl )
void CalcCntnt( SwLayoutFrm *pLay,
bool bNoColl,
bool bNoCalcFollow )
{
SwSectionFrm* pSect;
- BOOL bCollect = FALSE;
+ sal_Bool bCollect = sal_False;
if( pLay->IsSctFrm() )
{
pSect = (SwSectionFrm*)pLay;
if( pSect->IsEndnAtEnd() && !bNoColl )
{
- bCollect = TRUE;
+ bCollect = sal_True;
SwLayouter::CollectEndnotes( pLay->GetFmt()->GetDoc(), pSect );
}
pSect->CalcFtnCntnt();
@@ -1468,8 +1481,8 @@ void CalcCntnt( SwLayoutFrm *pLay,
if( bCollect )
pLay->GetFmt()->GetDoc()->GetLayouter()->
InsertEndnotes( pSect );
- BOOL bLock = pSect->IsFtnLock();
- pSect->SetFtnLock( TRUE );
+ sal_Bool bLock = pSect->IsFtnLock();
+ pSect->SetFtnLock( sal_True );
pSect->CalcFtnCntnt();
pSect->CalcFtnCntnt();
pSect->SetFtnLock( bLock );
@@ -1490,8 +1503,8 @@ void CalcCntnt( SwLayoutFrm *pLay,
SwAnchoredObject* pAgainObj2 = 0;
// FME 2007-08-30 #i81146# new loop control
- USHORT nLoopControlRuns = 0;
- const USHORT nLoopControlMax = 20;
+ sal_uInt16 nLoopControlRuns = 0;
+ const sal_uInt16 nLoopControlMax = 20;
const SwFrm* pLoopControlCond = 0;
SwFrm* pLast;
@@ -1508,14 +1521,14 @@ void CalcCntnt( SwLayoutFrm *pLay,
if ( pFrm->IsTabFrm() )
{
- ((SwTabFrm*)pFrm)->bCalcLowers = TRUE;
+ ((SwTabFrm*)pFrm)->bCalcLowers = sal_True;
// OD 26.08.2003 #i18103# - lock move backward of follow table,
// if no section content is formatted or follow table belongs
// to the section, which content is formatted.
if ( ((SwTabFrm*)pFrm)->IsFollow() &&
( !pSect || pSect == pFrm->FindSctFrm() ) )
{
- ((SwTabFrm*)pFrm)->bLockBackMove = TRUE;
+ ((SwTabFrm*)pFrm)->bLockBackMove = sal_True;
}
}
@@ -1560,7 +1573,7 @@ void CalcCntnt( SwLayoutFrm *pLay,
bool bAgain = false;
SwPageFrm* pPageFrm = pFrm->FindPageFrm();
sal_uInt32 nCnt = pFrm->GetDrawObjs()->Count();
- for ( USHORT i = 0; i < nCnt; ++i )
+ for ( sal_uInt16 i = 0; i < nCnt; ++i )
{
// --> OD 2004-07-01 #i28701#
SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
@@ -1689,7 +1702,7 @@ void CalcCntnt( SwLayoutFrm *pLay,
if ( pFrm->IsTabFrm() )
{
if ( ((SwTabFrm*)pFrm)->IsFollow() )
- ((SwTabFrm*)pFrm)->bLockBackMove = FALSE;
+ ((SwTabFrm*)pFrm)->bLockBackMove = sal_False;
}
pFrm = bPrevInvalid ? pTmpPrev : pFrm->FindNext();
@@ -1740,14 +1753,14 @@ void CalcCntnt( SwLayoutFrm *pLay,
if( bCollect )
{
pFrm = pLay->ContainsAny();
- bCollect = FALSE;
+ bCollect = sal_False;
if( pFrm )
continue;
}
}
break;
}
- while( TRUE );
+ while( sal_True );
}
/*************************************************************************
@@ -1761,7 +1774,7 @@ void SwFlyFrm::MakeObjPos()
{
if ( !bValidPos )
{
- bValidPos = TRUE;
+ bValidPos = sal_True;
// OD 29.10.2003 #113049# - use new class to position object
GetAnchorFrm()->Calc();
@@ -1793,7 +1806,7 @@ void SwFlyFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
if ( !bValidPrtArea )
{
- bValidPrtArea = TRUE;
+ bValidPrtArea = sal_True;
// OD 31.07.2003 #110978# - consider vertical layout
SWRECTFN( this )
@@ -1810,7 +1823,7 @@ void SwFlyFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
|*
|*************************************************************************/
-SwTwips SwFlyFrm::_Grow( SwTwips nDist, BOOL bTst )
+SwTwips SwFlyFrm::_Grow( SwTwips nDist, sal_Bool bTst )
{
SWRECTFN( this )
if ( Lower() && !IsColLocked() && !HasFixSize() )
@@ -1839,7 +1852,7 @@ SwTwips SwFlyFrm::_Grow( SwTwips nDist, BOOL bTst )
{
const SwRect aOld( GetObjRectWithSpaces() );
_InvalidateSize();
- const BOOL bOldLock = bLocked;
+ const sal_Bool bOldLock = bLocked;
Unlock();
if ( IsFlyFreeFrm() )
{
@@ -1849,16 +1862,16 @@ SwTwips SwFlyFrm::_Grow( SwTwips nDist, BOOL bTst )
// Writer fly frames - inner Writer fly frames format its
// anchor, which grows/shrinks the outer Writer fly frame.
// Note: position will be invalidated below.
- bValidPos = TRUE;
+ bValidPos = sal_True;
// --> OD 2005-10-10 #i55416#
// Suppress format of width for autowidth frame, because the
// format of the width would call <SwTxtFrm::CalcFitToContent()>
// for the lower frame, which initiated this grow.
- const BOOL bOldFormatHeightOnly = bFormatHeightOnly;
+ const sal_Bool bOldFormatHeightOnly = bFormatHeightOnly;
const SwFmtFrmSize& rFrmSz = GetFmt()->GetFrmSize();
if ( rFrmSz.GetWidthSizeType() != ATT_FIX_SIZE )
{
- bFormatHeightOnly = TRUE;
+ bFormatHeightOnly = sal_True;
}
// <--
static_cast<SwFlyFreeFrm*>(this)->SetNoMoveOnCheckClip( true );
@@ -1888,7 +1901,7 @@ SwTwips SwFlyFrm::_Grow( SwTwips nDist, BOOL bTst )
return 0L;
}
-SwTwips SwFlyFrm::_Shrink( SwTwips nDist, BOOL bTst )
+SwTwips SwFlyFrm::_Shrink( SwTwips nDist, sal_Bool bTst )
{
if( Lower() && !IsColLocked() && !HasFixSize() && !IsNoShrink() )
{
@@ -1938,7 +1951,7 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, BOOL bTst )
{
const SwRect aOld( GetObjRectWithSpaces() );
_InvalidateSize();
- const BOOL bOldLocked = bLocked;
+ const sal_Bool bOldLocked = bLocked;
Unlock();
if ( IsFlyFreeFrm() )
{
@@ -1948,16 +1961,16 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, BOOL bTst )
// Writer fly frames - inner Writer fly frames format its
// anchor, which grows/shrinks the outer Writer fly frame.
// Note: position will be invalidated below.
- bValidPos = TRUE;
+ bValidPos = sal_True;
// --> OD 2005-10-10 #i55416#
// Suppress format of width for autowidth frame, because the
// format of the width would call <SwTxtFrm::CalcFitToContent()>
// for the lower frame, which initiated this shrink.
- const BOOL bOldFormatHeightOnly = bFormatHeightOnly;
+ const sal_Bool bOldFormatHeightOnly = bFormatHeightOnly;
const SwFmtFrmSize& rFrmSz = GetFmt()->GetFrmSize();
if ( rFrmSz.GetWidthSizeType() != ATT_FIX_SIZE )
{
- bFormatHeightOnly = TRUE;
+ bFormatHeightOnly = sal_True;
}
// <--
static_cast<SwFlyFreeFrm*>(this)->SetNoMoveOnCheckClip( true );
@@ -2011,7 +2024,7 @@ Size SwFlyFrm::ChgSize( const Size& aNewSize )
static_cast<SwNoTxtFrm*>(Lower())->GetNode()->GetOLENode() )
{
SwRect aClipRect;
- ::CalcClipRect( GetVirtDrawObj(), aClipRect, FALSE );
+ ::CalcClipRect( GetVirtDrawObj(), aClipRect, sal_False );
if ( aAdjustedNewSize.Width() > aClipRect.Width() )
{
aAdjustedNewSize.setWidth( aClipRect.Width() );
@@ -2048,19 +2061,19 @@ Size SwFlyFrm::ChgSize( const Size& aNewSize )
|*
|*************************************************************************/
-BOOL SwFlyFrm::IsLowerOf( const SwLayoutFrm* pUpperFrm ) const
+sal_Bool SwFlyFrm::IsLowerOf( const SwLayoutFrm* pUpperFrm ) const
{
OSL_ENSURE( GetAnchorFrm(), "8-( Fly is lost in Space." );
const SwFrm* pFrm = GetAnchorFrm();
do
{
if ( pFrm == pUpperFrm )
- return TRUE;
+ return sal_True;
pFrm = pFrm->IsFlyFrm()
? ((const SwFlyFrm*)pFrm)->GetAnchorFrm()
: pFrm->GetUpper();
} while ( pFrm );
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -2105,7 +2118,7 @@ void SwFrm::AppendFly( SwFlyFrm *pNew )
SwPageFrm *pTmp = pRoot->GetLastPage();
if ( pTmp->GetPhyPageNum() > 30 )
{
- for ( USHORT i = 0; i < 10; ++i )
+ for ( sal_uInt16 i = 0; i < 10; ++i )
{
pTmp = (SwPageFrm*)pTmp->GetPrev();
if( pTmp->GetPhyPageNum() <= pPage->GetPhyPageNum() )
@@ -2567,10 +2580,10 @@ SwTwips SwFlyFrm::CalcAutoWidth() const
|*************************************************************************/
/// OD 16.04.2003 #i13147# - If called for paint and the <SwNoTxtFrm> contains
/// a graphic, load of intrinsic graphic has to be avoided.
-BOOL SwFlyFrm::GetContour( PolyPolygon& rContour,
+sal_Bool SwFlyFrm::GetContour( PolyPolygon& rContour,
const sal_Bool _bForPaint ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( GetFmt()->GetSurround().IsContour() && Lower() &&
Lower()->IsNoTxtFrm() )
{
@@ -2596,7 +2609,7 @@ BOOL SwFlyFrm::GetContour( PolyPolygon& rContour,
if( !pNd->HasContour() )
{
// OD 16.04.2003 #i13147# - no <CreateContour> for a graphic
- // during paint. Thus, return (value of <bRet> should be <FALSE>).
+ // during paint. Thus, return (value of <bRet> should be <sal_False>).
if ( pGrfNd && _bForPaint )
{
OSL_FAIL( "SwFlyFrm::GetContour() - No Contour found at <SwNoTxtNode> during paint." );
@@ -2610,7 +2623,7 @@ BOOL SwFlyFrm::GetContour( PolyPolygon& rContour,
SwRect aClip;
SwRect aOrig;
Lower()->Calc();
- ((SwNoTxtFrm*)Lower())->GetGrfArea( aClip, &aOrig, FALSE );
+ ((SwNoTxtFrm*)Lower())->GetGrfArea( aClip, &aOrig, sal_False );
// OD 16.04.2003 #i13147# - copy method code <SvxContourDlg::ScaleContour(..)>
// in order to avoid that graphic has to be loaded for contour scale.
//SvxContourDlg::ScaleContour( rContour, aGrf, MAP_TWIP, aOrig.SSize() );
@@ -2621,7 +2634,7 @@ BOOL SwFlyFrm::GetContour( PolyPolygon& rContour,
const Size aGrfSize( pGrfObj->GetPrefSize() );
Size aOrgSize;
Point aNewPoint;
- BOOL bPixelMap = aGrfMap.GetMapUnit() == MAP_PIXEL;
+ sal_Bool bPixelMap = aGrfMap.GetMapUnit() == MAP_PIXEL;
if ( bPixelMap )
aOrgSize = pOutDev->PixelToLogic( aGrfSize, aDispMap );
@@ -2633,11 +2646,11 @@ BOOL SwFlyFrm::GetContour( PolyPolygon& rContour,
double fScaleX = (double) aOrig.Width() / aOrgSize.Width();
double fScaleY = (double) aOrig.Height() / aOrgSize.Height();
- for ( USHORT j = 0, nPolyCount = rContour.Count(); j < nPolyCount; j++ )
+ for ( sal_uInt16 j = 0, nPolyCount = rContour.Count(); j < nPolyCount; j++ )
{
Polygon& rPoly = rContour[ j ];
- for ( USHORT i = 0, nCount = rPoly.GetSize(); i < nCount; i++ )
+ for ( sal_uInt16 i = 0, nCount = rPoly.GetSize(); i < nCount; i++ )
{
if ( bPixelMap )
aNewPoint = pOutDev->PixelToLogic( rPoly[ i ], aDispMap );
@@ -2661,7 +2674,7 @@ BOOL SwFlyFrm::GetContour( PolyPolygon& rContour,
aClip.Height( 1 );
rContour.Clip( aClip.SVRect() );
rContour.Optimize(POLY_OPTIMIZE_CLOSE);
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -2758,4 +2771,14 @@ bool SwFlyFrm::IsFormatPossible() const
!IsLocked() && !IsColLocked();
}
+const SwFlyFrmFmt * SwFlyFrm::GetFmt() const
+{
+ return static_cast< const SwFlyFrmFmt * >( GetDep() );
+}
+
+SwFlyFrmFmt * SwFlyFrm::GetFmt()
+{
+ return static_cast< SwFlyFrmFmt * >( GetDep() );
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 6dff05318105..a25ce1dccb14 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -28,13 +28,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <tools/bigint.hxx>
#include "pagefrm.hxx"
#include "rootfrm.hxx"
#include "cntfrm.hxx"
#include "flyfrm.hxx"
#include "txtfrm.hxx"
-#include "doc.hxx"
+#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include "viewsh.hxx"
#include "viewimp.hxx"
#include "pam.hxx"
@@ -75,7 +77,7 @@ using namespace ::com::sun::star;
SwFlyAtCntFrm::SwFlyAtCntFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
SwFlyFreeFrm( pFmt, pAnch )
{
- bAtCnt = TRUE;
+ bAtCnt = sal_True;
bAutoPosition = (FLY_AT_CHAR == pFmt->GetAnchor().GetAnchorId());
}
@@ -89,11 +91,11 @@ TYPEINIT1(SwFlyAtCntFrm,SwFlyFreeFrm);
void SwFlyAtCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
- USHORT nWhich = pNew ? pNew->Which() : 0;
+ sal_uInt16 nWhich = pNew ? pNew->Which() : 0;
const SwFmtAnchor *pAnch = 0;
if( RES_ATTRSET_CHG == nWhich && SFX_ITEM_SET ==
- ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_ANCHOR, FALSE,
+ ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_ANCHOR, sal_False,
(const SfxPoolItem**)&pAnch ))
; // Beim GetItemState wird der AnkerPointer gesetzt !
@@ -117,7 +119,7 @@ void SwFlyAtCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
SwCntntFrm *pCntnt = (SwCntntFrm*)GetAnchorFrm();
AnchorFrm()->RemoveFly( this );
- const BOOL bBodyFtn = (pCntnt->IsInDocBody() || pCntnt->IsInFtn());
+ const sal_Bool bBodyFtn = (pCntnt->IsInDocBody() || pCntnt->IsInFtn());
//Den neuen Anker anhand des NodeIdx suchen, am alten und
//neuen NodeIdx kann auch erkannt werden, in welche Richtung
@@ -174,7 +176,7 @@ void SwFlyAtCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
if ( !pCntnt )
{
SwCntntNode *pNode = aNewIdx.GetNode().GetCntntNode();
- pCntnt = pNode->GetFrm( &pOldAnchor->Frm().Pos(), 0, FALSE );
+ pCntnt = pNode->GetFrm( &pOldAnchor->Frm().Pos(), 0, sal_False );
OSL_ENSURE( pCntnt, "Neuen Anker nicht gefunden" );
}
//Flys haengen niemals an einem Follow sondern immer am
@@ -245,7 +247,7 @@ public:
SwOszControl( const SwFlyFrm *pFrm );
~SwOszControl();
bool ChkOsz();
- static BOOL IsInProgress( const SwFlyFrm *pFly );
+ static sal_Bool IsInProgress( const SwFlyFrm *pFly );
};
const SwFlyFrm *SwOszControl::pStk1 = 0;
const SwFlyFrm *SwOszControl::pStk2 = 0;
@@ -292,19 +294,19 @@ SwOszControl::~SwOszControl()
}
}
-BOOL SwOszControl::IsInProgress( const SwFlyFrm *pFly )
+sal_Bool SwOszControl::IsInProgress( const SwFlyFrm *pFly )
{
if ( SwOszControl::pStk1 && !pFly->IsLowerOf( SwOszControl::pStk1 ) )
- return TRUE;
+ return sal_True;
if ( SwOszControl::pStk2 && !pFly->IsLowerOf( SwOszControl::pStk2 ) )
- return TRUE;
+ return sal_True;
if ( SwOszControl::pStk3 && !pFly->IsLowerOf( SwOszControl::pStk3 ) )
- return TRUE;
+ return sal_True;
if ( SwOszControl::pStk4 && !pFly->IsLowerOf( SwOszControl::pStk4 ) )
- return TRUE;
+ return sal_True;
if ( SwOszControl::pStk5 && !pFly->IsLowerOf( SwOszControl::pStk5 ) )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
bool SwOszControl::ChkOsz()
@@ -360,7 +362,7 @@ void SwFlyAtCntFrm::MakeAll()
// #i28701# - use new method <GetPageFrm()>
if( GetPageFrm() )
{
- bSetCompletePaintOnInvalidate = TRUE;
+ bSetCompletePaintOnInvalidate = sal_True;
{
SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt();
const SwFmtFrmSize &rFrmSz = GetFmt()->GetFrmSize();
@@ -393,7 +395,7 @@ void SwFlyAtCntFrm::MakeAll()
if( pFooter && !pFooter->IsFooterFrm() )
pFooter = NULL;
bool bOsz = false;
- BOOL bExtra = Lower() && Lower()->IsColumnFrm();
+ sal_Bool bExtra = Lower() && Lower()->IsColumnFrm();
// #i3317# - boolean, to apply temporarly the
// 'straightforward positioning process' for the frame due to its
// overlapping with a previous column.
@@ -510,7 +512,7 @@ void SwFlyAtCntFrm::MakeAll()
// Spalten hinterlaesst, so drehen wir lieber hier eine weitere
// Runde und formatieren unseren Inhalt via FormatWidthCols nochmal.
_InvalidateSize();
- bExtra = FALSE; // Sicherhaltshalber gibt es nur eine Ehrenrunde.
+ bExtra = sal_False; // Sicherhaltshalber gibt es nur eine Ehrenrunde.
}
} while ( !IsValid() && !bOsz &&
// #i3317#
@@ -550,7 +552,7 @@ void SwFlyAtCntFrm::MakeAll()
SetRestartLayoutProcess( true );
SetTmpConsiderWrapInfluenceOfOtherObjs( true );
}
- bSetCompletePaintOnInvalidate = FALSE;
+ bSetCompletePaintOnInvalidate = sal_False;
}
}
}
@@ -583,10 +585,10 @@ public:
SwDistance() { nMain = nSub = 0; }
SwDistance& operator=( const SwDistance &rTwo )
{ nMain = rTwo.nMain; nSub = rTwo.nSub; return *this; }
- BOOL operator<( const SwDistance& rTwo )
+ sal_Bool operator<( const SwDistance& rTwo )
{ return nMain < rTwo.nMain || ( nMain == rTwo.nMain && nSub &&
rTwo.nSub && nSub < rTwo.nSub ); }
- BOOL operator<=( const SwDistance& rTwo )
+ sal_Bool operator<=( const SwDistance& rTwo )
{ return nMain < rTwo.nMain || ( nMain == rTwo.nMain && ( !nSub ||
!rTwo.nSub || nSub <= rTwo.nSub ) ); }
};
@@ -610,13 +612,20 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
while( pUp->IsSctFrm() )
pUp = pUp->GetUpper();
const bool bVert = pUp->IsVertical();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ const bool bVertL2R = pUp->IsVertLR();
+
//Dem Textflus folgen.
// #i70582#
+ // --> OD 2009-03-05 - adopted for Support for Classical Mongolian Script
const SwTwips nTopForObjPos =
bVert
- ? ( pCnt->Frm().Left() +
- pCnt->Frm().Width() -
- pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() )
+ ? ( bVertL2R
+ ? ( pCnt->Frm().Left() +
+ pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() )
+ : ( pCnt->Frm().Left() +
+ pCnt->Frm().Width() -
+ pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ) )
: ( pCnt->Frm().Top() +
pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() );
if ( pUp->Frm().IsInside( rPt ) )
@@ -624,7 +633,13 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
// <rPt> point is inside environment of given content frame
// #i70582#
if( bVert )
- rRet.nMain = nTopForObjPos - rPt.X();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ {
+ if ( bVertL2R )
+ rRet.nMain = rPt.X() - nTopForObjPos;
+ else
+ rRet.nMain = nTopForObjPos - rPt.X();
+ }
else
rRet.nMain = rPt.Y() - nTopForObjPos;
return pCnt;
@@ -640,7 +655,7 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
{
// <rPt> point is left of environment of given content frame
// seems not to be correct for vertical layout!?
- const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, FALSE, pCnt );
+ const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, sal_False, pCnt );
if( !pLay ||
(bVert && (pLay->Frm().Top() + pLay->Prt().Bottom()) <rPt.Y())||
(!bVert && (pLay->Frm().Left() + pLay->Prt().Right())<rPt.X()) )
@@ -648,7 +663,13 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
// <rPt> point is in left border of environment
// #i70582#
if( bVert )
- rRet.nMain = nTopForObjPos - rPt.X();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ {
+ if ( bVertL2R )
+ rRet.nMain = rPt.X() - nTopForObjPos;
+ else
+ rRet.nMain = nTopForObjPos - rPt.X();
+ }
else
rRet.nMain = rPt.Y() - nTopForObjPos;
return pCnt;
@@ -658,16 +679,18 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
}
else
{
- // #i70582#
+ // Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
rRet.nMain = bVert
- ? nTopForObjPos - (pUp->Frm().Left() + pUp->Prt().Left())
- : (pUp->Frm().Top() + pUp->Prt().Bottom()) - nTopForObjPos;
+ ? ( bVertL2R
+ ? ( (pUp->Frm().Left() + pUp->Prt().Right()) - nTopForObjPos )
+ : ( nTopForObjPos - (pUp->Frm().Left() + pUp->Prt().Left() ) ) )
+ : ( (pUp->Frm().Top() + pUp->Prt().Bottom()) - nTopForObjPos );
const SwFrm *pPre = pCnt;
- const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, TRUE, pCnt );
+ const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, sal_True, pCnt );
SwTwips nFrmTop = 0;
SwTwips nPrtHeight = 0;
- BOOL bSct = FALSE;
+ sal_Bool bSct = sal_False;
const SwSectionFrm *pSect = pUp->FindSctFrm();
if( pSect )
{
@@ -676,13 +699,17 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
}
if( pSect && !pSect->IsAnLower( pLay ) )
{
- bSct = FALSE;
+ bSct = sal_False;
const SwSectionFrm* pNxtSect = pLay ? pLay->FindSctFrm() : 0;
if( pSect->IsAnFollow( pNxtSect ) )
{
if( pLay->IsVertical() )
{
- nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( pLay->IsVertLR() )
+ nFrmTop = pLay->Frm().Left();
+ else
+ nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
nPrtHeight = pLay->Prt().Width();
}
else
@@ -697,9 +724,20 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
pLay = pSect->GetUpper();
if( pLay->IsVertical() )
{
- nFrmTop = pSect->Frm().Left();
- nPrtHeight = pSect->Frm().Left() - pLay->Frm().Left()
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( pLay->IsVertLR() )
+ {
+ nFrmTop = pSect->Frm().Right();
+ nPrtHeight = pLay->Frm().Left() + pLay->Prt().Left()
+ + pLay->Prt().Width() - pSect->Frm().Left()
+ - pSect->Frm().Width();
+ }
+ else
+ {
+ nFrmTop = pSect->Frm().Left();
+ nPrtHeight = pSect->Frm().Left() - pLay->Frm().Left()
- pLay->Prt().Left();
+ }
}
else
{
@@ -715,8 +753,17 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
{
if( pLay->IsVertical() )
{
- nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
- nPrtHeight = pLay->Prt().Width();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( pLay->IsVertLR() )
+ {
+ nFrmTop = pLay->Frm().Left();
+ nPrtHeight = pLay->Prt().Width();
+ }
+ else
+ {
+ nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
+ nPrtHeight = pLay->Prt().Width();
+ }
}
else
{
@@ -748,20 +795,29 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
else
rRet.nMain += nPrtHeight;
pPre = pLay;
- pLay = pLay->GetLeaf( MAKEPAGE_NONE, TRUE, pCnt );
+ pLay = pLay->GetLeaf( MAKEPAGE_NONE, sal_True, pCnt );
if( pSect && !pSect->IsAnLower( pLay ) )
{ // If we're leaving a SwSectionFrm, the next Leaf-Frm
// is the part of the upper below the SectionFrm.
const SwSectionFrm* pNxtSect = pLay ?
pLay->FindSctFrm() : NULL;
- bSct = FALSE;
+ bSct = sal_False;
if( pSect->IsAnFollow( pNxtSect ) )
{
pSect = pNxtSect;
if( pLay->IsVertical() )
{
- nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
- nPrtHeight = pLay->Prt().Width();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( pLay->IsVertLR() )
+ {
+ nFrmTop = pLay->Frm().Left();
+ nPrtHeight = pLay->Prt().Width();
+ }
+ else
+ {
+ nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
+ nPrtHeight = pLay->Prt().Width();
+ }
}
else
{
@@ -774,9 +830,20 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
pLay = pSect->GetUpper();
if( pLay->IsVertical() )
{
- nFrmTop = pSect->Frm().Left();
- nPrtHeight = pSect->Frm().Left() -
- pLay->Frm().Left() - pLay->Prt().Left();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( pLay->IsVertLR() )
+ {
+ nFrmTop = pSect->Frm().Right();
+ nPrtHeight = pLay->Frm().Left()+pLay->Prt().Left()
+ + pLay->Prt().Width() - pSect->Frm().Left()
+ - pSect->Frm().Width();
+ }
+ else
+ {
+ nFrmTop = pSect->Frm().Left();
+ nPrtHeight = pSect->Frm().Left() -
+ pLay->Frm().Left() - pLay->Prt().Left();
+ }
}
else
{
@@ -792,8 +859,17 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
{
if( pLay->IsVertical() )
{
- nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
- nPrtHeight = pLay->Prt().Width();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( pLay->IsVertLR() )
+ {
+ nFrmTop = pLay->Frm().Left();
+ nPrtHeight = pLay->Prt().Width();
+ }
+ else
+ {
+ nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
+ nPrtHeight = pLay->Prt().Width();
+ }
}
else
{
@@ -808,7 +884,8 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
{
if ( pLay->Frm().IsInside( rPt ) )
{
- SwTwips nDiff = pLay->IsVertical() ? ( nFrmTop - rPt.X() )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ SwTwips nDiff = pLay->IsVertical() ? ( pLay->IsVertLR() ? ( rPt.X() - nFrmTop ) : ( nFrmTop - rPt.X() ) )
: ( rPt.Y() - nFrmTop );
if( bSct || pSect )
rRet.nSub += nDiff;
@@ -831,9 +908,9 @@ const SwFrm * MA_FASTCALL lcl_CalcDownDist( SwDistance &rRet,
return 0;
}
-ULONG MA_FASTCALL lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
+sal_uLong MA_FASTCALL lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
const SwCntntFrm *& rpCnt,
- const BOOL bBody, const BOOL bFtn )
+ const sal_Bool bBody, const sal_Bool bFtn )
{
//Sucht unterhalb von pLay den dichtesten Cnt zum Point. Der Bezugspunkt
//der Cntnts ist immer die linke obere Ecke.
@@ -844,8 +921,8 @@ ULONG MA_FASTCALL lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
#endif
rpCnt = 0;
- ULONG nDistance = ULONG_MAX;
- ULONG nNearest = ULONG_MAX;
+ sal_uLong nDistance = ULONG_MAX;
+ sal_uLong nNearest = ULONG_MAX;
const SwCntntFrm *pCnt = pLay->ContainsCntnt();
while ( pCnt && (bBody != pCnt->IsInDocBody() || bFtn != pCnt->IsInFtn()))
@@ -867,7 +944,7 @@ ULONG MA_FASTCALL lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
Min( pCnt->Frm().Top(), rPt.Y() );
BigInt dX1( dX ), dY1( dY );
dX1 *= dX1; dY1 *= dY1;
- const ULONG nDiff = ::SqRt( dX1 + dY1 );
+ const sal_uLong nDiff = ::SqRt( dX1 + dY1 );
if ( pCnt->Frm().Top() <= rPt.Y() )
{
if ( nDiff < nDistance )
@@ -896,7 +973,7 @@ ULONG MA_FASTCALL lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
}
const SwCntntFrm * MA_FASTCALL lcl_FindCnt( const Point &rPt, const SwCntntFrm *pCnt,
- const BOOL bBody, const BOOL bFtn )
+ const sal_Bool bBody, const sal_Bool bFtn )
{
//Sucht ausgehen von pCnt denjenigen CntntFrm, dessen linke obere
//Ecke am dichtesten am Point liegt.
@@ -910,7 +987,7 @@ const SwCntntFrm * MA_FASTCALL lcl_FindCnt( const Point &rPt, const SwCntntFrm *
//des Point sitzt.
const SwCntntFrm *pRet, *pNew;
const SwLayoutFrm *pLay = pCnt->FindPageFrm();
- ULONG nDist;
+ sal_uLong nDist;
nDist = ::lcl_FindCntDiff( rPt, pLay, pNew, bBody, bFtn );
if ( pNew )
@@ -920,16 +997,16 @@ const SwCntntFrm * MA_FASTCALL lcl_FindCnt( const Point &rPt, const SwCntntFrm *
nDist = ULONG_MAX;
}
const SwCntntFrm *pNearest = pRet;
- ULONG nNearest = nDist;
+ sal_uLong nNearest = nDist;
if ( pLay )
{
const SwLayoutFrm *pPge = pLay;
- ULONG nOldNew = ULONG_MAX;
- for ( USHORT i = 0; pPge->GetPrev() && (i < 3); ++i )
+ sal_uLong nOldNew = ULONG_MAX;
+ for ( sal_uInt16 i = 0; pPge->GetPrev() && (i < 3); ++i )
{
pPge = (SwLayoutFrm*)pPge->GetPrev();
- const ULONG nNew = ::lcl_FindCntDiff( rPt, pPge, pNew, bBody, bFtn );
+ const sal_uLong nNew = ::lcl_FindCntDiff( rPt, pPge, pNew, bBody, bFtn );
if ( nNew < nDist )
{
if ( pNew->Frm().Top() <= rPt.Y() )
@@ -951,10 +1028,10 @@ const SwCntntFrm * MA_FASTCALL lcl_FindCnt( const Point &rPt, const SwCntntFrm *
}
pPge = pLay;
nOldNew = ULONG_MAX;
- for ( USHORT j = 0; pPge->GetNext() && (j < 3); ++j )
+ for ( sal_uInt16 j = 0; pPge->GetNext() && (j < 3); ++j )
{
pPge = (SwLayoutFrm*)pPge->GetNext();
- const ULONG nNew = ::lcl_FindCntDiff( rPt, pPge, pNew, bBody, bFtn );
+ const sal_uLong nNew = ::lcl_FindCntDiff( rPt, pPge, pNew, bBody, bFtn );
if ( nNew < nDist )
{
if ( pNew->Frm().Top() <= rPt.Y() )
@@ -996,7 +1073,7 @@ void lcl_PointToPrt( Point &rPoint, const SwFrm *pFrm )
}
const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
- const BOOL bBodyOnly )
+ const sal_Bool bBodyOnly )
{
//Zu der angegebenen DokumentPosition wird der dichteste Cnt im
//Textfluss gesucht. AusgangsFrm ist der uebergebene Anker.
@@ -1014,14 +1091,14 @@ const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
SwRect aTmpRect( aTmp, Size(0,0) );
pTmpLay = (SwLayoutFrm*)::FindPage( aTmpRect, pTmpLay->Lower() );
}
- pCnt = pTmpLay->GetCntntPos( aTmp, FALSE, bBodyOnly );
+ pCnt = pTmpLay->GetCntntPos( aTmp, sal_False, bBodyOnly );
}
//Beim Suchen darauf achten, dass die Bereiche sinnvoll erhalten
//bleiben. D.h. in diesem Fall nicht in Header/Footer hinein und
//nicht aus Header/Footer hinaus.
- const BOOL bBody = pCnt->IsInDocBody() || bBodyOnly;
- const BOOL bFtn = !bBodyOnly && pCnt->IsInFtn();
+ const sal_Bool bBody = pCnt->IsInDocBody() || bBodyOnly;
+ const sal_Bool bFtn = !bBodyOnly && pCnt->IsInFtn();
Point aNew( rNew );
if ( bBody )
@@ -1043,7 +1120,7 @@ const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
//So gibt es kein Problem mit Spalten.
Point aTmp( aNew );
const SwCntntFrm *pTmp = pCnt->FindPageFrm()->
- GetCntntPos( aTmp, FALSE, TRUE, FALSE );
+ GetCntntPos( aTmp, sal_False, sal_True, sal_False );
if ( pTmp && pTmp->Frm().IsInside( aNew ) )
return pTmp;
}
@@ -1057,7 +1134,7 @@ const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
SwDistance nUp, nUpLst;
::lcl_CalcDownDist( nUp, aNew, pUpFrm );
SwDistance nDown = nUp;
- BOOL bNegAllowed = TRUE;//Einmal aus dem negativen Bereich heraus lassen.
+ sal_Bool bNegAllowed = sal_True;//Einmal aus dem negativen Bereich heraus lassen.
do
{
pUpLst = pUpFrm; nUpLst = nUp;
@@ -1085,7 +1162,7 @@ const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
nUp.nMain = LONG_MAX;
if ( nUp.nMain >= 0 && LONG_MAX != nUp.nMain )
{
- bNegAllowed = FALSE;
+ bNegAllowed = sal_False;
if ( nUpLst.nMain < 0 ) //nicht den falschen erwischen, wenn der Wert
//gerade von negativ auf positiv gekippt ist.
{ pUpLst = pUpFrm;
@@ -1161,9 +1238,8 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
SwPageFrm *pOldPage = FindPageFrm();
const SwRect aOld( GetObjRectWithSpaces() );
Point aNew( rNew );
-
- if( GetAnchorFrm()->IsVertical() || GetAnchorFrm()->IsRightToLeft() )
-
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( ( GetAnchorFrm()->IsVertical() && !GetAnchorFrm()->IsVertLR() ) || GetAnchorFrm()->IsRightToLeft() )
aNew.X() += Frm().Width();
SwCntntFrm *pCnt = (SwCntntFrm*)::FindAnchor( GetAnchorFrm(), aNew );
if( pCnt->IsProtected() )
@@ -1171,6 +1247,8 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
SwPageFrm *pTmpPage = 0;
const bool bVert = pCnt->IsVertical();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ const bool bVertL2R = pCnt->IsVertLR();
const sal_Bool bRTL = pCnt->IsRightToLeft();
if( ( !bVert != !GetAnchorFrm()->IsVertical() ) ||
@@ -1203,14 +1281,21 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
// #i70582#
const SwTwips nTopForObjPos =
bVert
- ? ( pCnt->Frm().Left() +
- pCnt->Frm().Width() -
- pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() )
+ ? ( bVertL2R
+ ? ( pCnt->Frm().Left() +
+ pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() )
+ : ( pCnt->Frm().Left() +
+ pCnt->Frm().Width() -
+ pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ) )
: ( pCnt->Frm().Top() +
pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() );
- if ( bVert )
+ if( bVert )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
{
- nY = nTopForObjPos - rNew.X() - Frm().Width();
+ if ( bVertL2R )
+ nY = rNew.X() - nTopForObjPos;
+ else
+ nY = nTopForObjPos - rNew.X() - Frm().Width();
}
else
{
@@ -1243,8 +1328,14 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
do
{ const SwFrm *pUp = pFollow->GetUpper();
if( pUp->IsVertical() )
- nDiff += pFollow->Frm().Left() + pFollow->Frm().Width()
- - pUp->Frm().Left() - pUp->Prt().Left();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ {
+ if ( pUp->IsVertLR() )
+ nDiff += pUp->Prt().Width() - pFollow->GetRelPos().X();
+ else
+ nDiff += pFollow->Frm().Left() + pFollow->Frm().Width()
+ - pUp->Frm().Left() - pUp->Prt().Left();
+ }
else
nDiff += pUp->Prt().Height() - pFollow->GetRelPos().Y();
pFollow = pFollow->GetFollow();
@@ -1261,14 +1352,21 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
// #i70582#
const SwTwips nTopForObjPos =
bVert
- ? ( pCnt->Frm().Left() +
- pCnt->Frm().Width() -
- pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() )
+ ? ( bVertL2R
+ ? ( pCnt->Frm().Left() +
+ pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() )
+ : ( pCnt->Frm().Left() +
+ pCnt->Frm().Width() -
+ pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() ) )
: ( pCnt->Frm().Top() +
pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() );
- if ( bVert )
+ if( bVert )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
{
- nY = nTopForObjPos - rNew.X();
+ if ( bVertL2R )
+ nY = rNew.X() - nTopForObjPos;
+ else
+ nY = nTopForObjPos - rNew.X();
}
else
{
@@ -1278,7 +1376,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt();
const SwFmtSurround& rSurround = pFmt->GetSurround();
- const BOOL bWrapThrough =
+ const sal_Bool bWrapThrough =
rSurround.GetSurround() == SURROUND_THROUGHT;
SwTwips nBaseOfstForFly = 0;
const SwFrm* pTmpFrm = pFrm ? pFrm : pCnt;
@@ -1312,7 +1410,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
nX = rNew.X() - pFrm->Frm().Left() - nBaseOfstForFly;
}
}
- GetFmt()->GetDoc()->StartUndo( UNDO_START, NULL );
+ GetFmt()->GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
if( pCnt != GetAnchorFrm() || ( IsAutoPos() && pCnt->IsTxtFrm() &&
GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::HTML_MODE)) )
@@ -1359,13 +1457,14 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
GetPageFrm()->MoveFly( this, pTmpPage );
const Point aRelPos = bVert ? Point( -nY, nX ) : Point( nX, nY );
+
ChgRelPos( aRelPos );
- GetFmt()->GetDoc()->EndUndo( UNDO_END, NULL );
+ GetFmt()->GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
if ( pOldPage != FindPageFrm() )
::Notify_Background( GetVirtDrawObj(), pOldPage, aOld, PREP_FLY_LEAVE,
- FALSE );
+ sal_False );
}
/** method to assure that anchored object is registered at the correct
@@ -1401,7 +1500,7 @@ void SwFlyAtCntFrm::MakeObjPos()
}
// #i26791# - validate position flag here.
- bValidPos = TRUE;
+ bValidPos = sal_True;
// #i35911# - no calculation of new position, if
// anchored object is marked that it clears its environment and its
diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx
index a7010c269c66..51df36b56ff9 100644
--- a/sw/source/core/layout/flyincnt.cxx
+++ b/sw/source/core/layout/flyincnt.cxx
@@ -53,7 +53,7 @@ void DeepCalc( const SwFrm *pFrm );
SwFlyInCntFrm::SwFlyInCntFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
SwFlyFrm( pFmt, pAnch )
{
- bInCnt = bInvalidLayout = bInvalidCntnt = TRUE;
+ bInCnt = bInvalidLayout = bInvalidCntnt = sal_True;
SwTwips nRel = pFmt->GetVertOrient().GetPos();
// OD 2004-05-27 #i26791# - member <aRelPos> moved to <SwAnchoredObject>
Point aRelPos;
@@ -103,8 +103,8 @@ void SwFlyInCntFrm::SetRefPoint( const Point& rPoint,
if( pNotify )
{
InvalidatePage();
- bValidPos = FALSE;
- bInvalid = TRUE;
+ bValidPos = sal_False;
+ bInvalid = sal_True;
Calc();
delete pNotify;
}
@@ -117,14 +117,14 @@ void SwFlyInCntFrm::SetRefPoint( const Point& rPoint,
|*************************************************************************/
void SwFlyInCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
- BOOL bCallPrepare = FALSE;
- USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_Bool bCallPrepare = sal_False;
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
if( RES_ATTRSET_CHG == nWhich )
{
if( SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->
- GetItemState( RES_SURROUND, FALSE ) ||
+ GetItemState( RES_SURROUND, sal_False ) ||
SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->
- GetItemState( RES_FRMMACRO, FALSE ) )
+ GetItemState( RES_FRMMACRO, sal_False ) )
{
SwAttrSetChg aOld( *(SwAttrSetChg*)pOld );
SwAttrSetChg aNew( *(SwAttrSetChg*)pNew );
@@ -136,19 +136,19 @@ void SwFlyInCntFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
if( aNew.Count() )
{
SwFlyFrm::Modify( &aOld, &aNew );
- bCallPrepare = TRUE;
+ bCallPrepare = sal_True;
}
}
else if( ((SwAttrSetChg*)pNew)->GetChgSet()->Count())
{
SwFlyFrm::Modify( pOld, pNew );
- bCallPrepare = TRUE;
+ bCallPrepare = sal_True;
}
}
else if( nWhich != RES_SURROUND && RES_FRMMACRO != nWhich )
{
SwFlyFrm::Modify( pOld, pNew );
- bCallPrepare = TRUE;
+ bCallPrepare = sal_True;
}
if ( bCallPrepare && GetAnchorFrm() )
@@ -190,7 +190,7 @@ void SwFlyInCntFrm::MakeObjPos()
{
if ( !bValidPos )
{
- bValidPos = TRUE;
+ bValidPos = sal_True;
SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt();
const SwFmtVertOrient &rVert = pFmt->GetVertOrient();
//Und ggf. noch die aktuellen Werte im Format updaten, dabei darf
@@ -281,14 +281,14 @@ void SwFlyInCntFrm::MakeAll()
const SwBorderAttrs &rAttrs = *aAccess.Get();
if ( IsClipped() )
- bValidSize = bHeightClipped = bWidthClipped = FALSE;
+ bValidSize = bHeightClipped = bWidthClipped = sal_False;
while ( !bValidPos || !bValidSize || !bValidPrtArea )
{
//Nur einstellen wenn das Flag gesetzt ist!!
if ( !bValidSize )
{
- bValidPrtArea = FALSE;
+ bValidPrtArea = sal_False;
/*
// This is also done in the Format function, so I think
// this code is not necessary anymore:
@@ -326,8 +326,8 @@ void SwFlyInCntFrm::MakeAll()
Frm().Width() > pFrm->Prt().Width() )
{
Frm().Width( pFrm->Prt().Width() );
- bValidPrtArea = FALSE;
- bWidthClipped = TRUE;
+ bValidPrtArea = sal_False;
+ bWidthClipped = sal_True;
}
}
// <--
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index bc008c768a66..2d452e0771c2 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -125,7 +125,7 @@ TYPEINIT1(SwFlyFreeFrm,SwFlyFrm);
void SwFlyFreeFrm::NotifyBackground( SwPageFrm *pPageFrm,
const SwRect& rRect, PrepareHint eHint )
{
- ::Notify_Background( GetVirtDrawObj(), pPageFrm, rRect, eHint, TRUE );
+ ::Notify_Background( GetVirtDrawObj(), pPageFrm, rRect, eHint, sal_True );
}
/*************************************************************************
@@ -161,7 +161,7 @@ void SwFlyFreeFrm::MakeAll()
if ( IsClipped() )
{
- bValidSize = bHeightClipped = bWidthClipped = FALSE;
+ bValidSize = bHeightClipped = bWidthClipped = sal_False;
// no invalidation of position,
// if anchored object is anchored inside a Writer fly frame,
// its position is already locked, and it follows the text flow.
@@ -172,13 +172,13 @@ void SwFlyFreeFrm::MakeAll()
GetAnchorFrm()->IsInFly() &&
GetFrmFmt().GetFollowTextFlow().GetValue() ) )
{
- bValidPos = FALSE;
+ bValidPos = sal_False;
}
}
// #i81146# new loop control
- USHORT nLoopControlRuns = 0;
- const USHORT nLoopControlMax = 10;
+ sal_uInt16 nLoopControlRuns = 0;
+ const sal_uInt16 nLoopControlMax = 10;
while ( !bValidPos || !bValidSize || !bValidPrtArea || bFormatHeightOnly )
{
@@ -193,7 +193,7 @@ void SwFlyFreeFrm::MakeAll()
//Nur einstellen wenn das Flag gesetzt ist!!
if ( !bValidSize )
{
- bValidPrtArea = FALSE;
+ bValidPrtArea = sal_False;
}
if ( !bValidPrtArea )
@@ -201,9 +201,9 @@ void SwFlyFreeFrm::MakeAll()
if ( !bValidSize || bFormatHeightOnly )
{
- bValidSize = FALSE;
+ bValidSize = sal_False;
Format( &rAttrs );
- bFormatHeightOnly = FALSE;
+ bFormatHeightOnly = sal_False;
}
if ( !bValidPos )
@@ -212,7 +212,7 @@ void SwFlyFreeFrm::MakeAll()
// #i26791# - use new method <MakeObjPos()>
// #i34753# - no positioning, if requested.
if ( IsNoMakePos() )
- bValidPos = TRUE;
+ bValidPos = sal_True;
else
// #i26791# - use new method <MakeObjPos()>
MakeObjPos();
@@ -220,10 +220,10 @@ void SwFlyFreeFrm::MakeAll()
{
if( !bValidPos && GetAnchorFrm()->IsInSct() &&
!GetAnchorFrm()->FindSctFrm()->IsValid() )
- bValidPos = TRUE;
+ bValidPos = sal_True;
}
else
- bValidSize = FALSE;
+ bValidSize = sal_False;
}
}
@@ -305,8 +305,8 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
const SwVirtFlyDrawObj *pObj = GetVirtDrawObj();
SwRect aClip, aTmpStretch;
- ::CalcClipRect( pObj, aClip, TRUE );
- ::CalcClipRect( pObj, aTmpStretch, FALSE );
+ ::CalcClipRect( pObj, aClip, sal_True );
+ ::CalcClipRect( pObj, aTmpStretch, sal_False );
aClip._Intersection( aTmpStretch );
const long nBot = Frm().Top() + Frm().Height();
@@ -314,11 +314,11 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
const long nClipBot = aClip.Top() + aClip.Height();
const long nClipRig = aClip.Left() + aClip.Width();
- const BOOL bBot = nBot > nClipBot;
- const BOOL bRig = nRig > nClipRig;
+ const sal_Bool bBot = nBot > nClipBot;
+ const sal_Bool bRig = nRig > nClipRig;
if ( bBot || bRig )
{
- BOOL bAgain = FALSE;
+ sal_Bool bAgain = sal_False;
// #i37068# - no move, if it's requested
if ( bBot && !IsNoMoveOnCheckClip() &&
!GetDrawObjs() && !GetAnchorFrm()->IsInTab() )
@@ -333,8 +333,8 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
const long nOld = Frm().Top();
Frm().Pos().Y() = Max( aClip.Top(), nClipBot - Frm().Height() );
if ( Frm().Top() != nOld )
- bAgain = TRUE;
- bHeightClipped = TRUE;
+ bAgain = sal_True;
+ bHeightClipped = sal_True;
}
}
if ( bRig )
@@ -349,12 +349,12 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
if( rH.GetHoriOrient() == text::HoriOrientation::LEFT )
Frm().Pos().X() = nOld;
else
- bAgain = TRUE;
+ bAgain = sal_True;
}
- bWidthClipped = TRUE;
+ bWidthClipped = sal_True;
}
if ( bAgain )
- bValidSize = FALSE;
+ bValidSize = sal_False;
else
{
//Wenn wir hier ankommen ragt der Frm in unerlaubte Bereiche
@@ -375,7 +375,7 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
nDiff -= aFrmRect.Top(); //nDiff ist die verfuegbare Strecke.
nDiff = aFrmRect.Height() - nDiff;
aFrmRect.Height( aFrmRect.Height() - nDiff );
- bHeightClipped = TRUE;
+ bHeightClipped = sal_True;
}
if ( bRig )
{
@@ -383,7 +383,7 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
nDiff -= aFrmRect.Left();//nDiff ist die verfuegbare Strecke.
nDiff = aFrmRect.Width() - nDiff;
aFrmRect.Width( aFrmRect.Width() - nDiff );
- bWidthClipped = TRUE;
+ bWidthClipped = sal_True;
}
// #i17297# - no proportional
@@ -417,14 +417,14 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
{
aFrmRect.Height( aFrmRect.Width() * aOldSize.Height() /
aOldSize.Width() );
- bHeightClipped = TRUE;
+ bHeightClipped = sal_True;
}
//Hoehe angepasst? - Breite dann proportional verkleinern
else if( aFrmRect.Height() != aOldSize.Height() )
{
aFrmRect.Width( aFrmRect.Height() * aOldSize.Width() /
aOldSize.Height() );
- bWidthClipped = TRUE;
+ bWidthClipped = sal_True;
}
// #i17297# - reactivate change
@@ -474,7 +474,7 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
::CalcCntnt( this );
ColUnlock();
if ( !bValidSize && !bWidthClipped )
- bFormatHeightOnly = bValidSize = TRUE;
+ bFormatHeightOnly = bValidSize = sal_True;
}
else
{
@@ -508,7 +508,7 @@ bool SwFlyFreeFrm::IsFormatPossible() const
SwFlyLayFrm::SwFlyLayFrm( SwFlyFrmFmt *pFmt, SwFrm *pAnch ) :
SwFlyFreeFrm( pFmt, pAnch )
{
- bLayout = TRUE;
+ bLayout = sal_True;
}
// #i28701#
@@ -521,11 +521,11 @@ TYPEINIT1(SwFlyLayFrm,SwFlyFreeFrm);
void SwFlyLayFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
- USHORT nWhich = pNew ? pNew->Which() : 0;
+ sal_uInt16 nWhich = pNew ? pNew->Which() : 0;
SwFmtAnchor *pAnch = 0;
if( RES_ATTRSET_CHG == nWhich && SFX_ITEM_SET ==
- ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_ANCHOR, FALSE,
+ ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_ANCHOR, sal_False,
(const SfxPoolItem**)&pAnch ))
; // Beim GetItemState wird der AnkerPointer gesetzt !
@@ -552,10 +552,10 @@ void SwFlyLayFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
if ( FLY_AT_PAGE == pAnch->GetAnchorId() )
{
- USHORT nPgNum = pAnch->GetPageNum();
+ sal_uInt16 nPgNum = pAnch->GetPageNum();
SwRootFrm *pRoot = FindRootFrm();
SwPageFrm *pTmpPage = (SwPageFrm*)pRoot->Lower();
- for ( USHORT i = 1; (i <= nPgNum) && pTmpPage; ++i,
+ for ( sal_uInt16 i = 1; (i <= nPgNum) && pTmpPage; ++i,
pTmpPage = (SwPageFrm*)pTmpPage->GetNext() )
{
if ( i == nPgNum )
@@ -574,7 +574,7 @@ void SwFlyLayFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
SwNodeIndex aIdx( pAnch->GetCntntAnchor()->nNode );
SwCntntFrm *pCntnt = GetFmt()->GetDoc()->GetNodes().GoNext( &aIdx )->
- GetCntntNode()->GetFrm( 0, 0, FALSE );
+ GetCntntNode()->GetFrm( 0, 0, sal_False );
if( pCntnt )
{
SwFlyFrm *pTmp = pCntnt->FindFlyFrm();
@@ -622,7 +622,7 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
const SwFlyFrm* pFly = pNew->GetAnchorFrm()->FindFlyFrm();
if ( pFly && pObj->GetOrdNum() < pFly->GetVirtDrawObj()->GetOrdNum() )
{
- UINT32 nNewNum = pFly->GetVirtDrawObj()->GetOrdNumDirect();
+ sal_uInt32 nNewNum = pFly->GetVirtDrawObj()->GetOrdNumDirect();
if ( pObj->GetPage() )
pObj->GetPage()->SetObjectOrdNum( pObj->GetOrdNumDirect(), nNewNum);
else
@@ -673,7 +673,7 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
if ( pNew->GetDrawObjs() )
{
SwSortedObjs &rObjs = *pNew->GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pTmpObj = rObjs[i];
if ( pTmpObj->ISA(SwFlyFrm) )
@@ -707,7 +707,7 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
void SwPageFrm::RemoveFlyFromPage( SwFlyFrm *pToRemove )
{
- const UINT32 nOrdNum = pToRemove->GetVirtDrawObj()->GetOrdNum();
+ const sal_uInt32 nOrdNum = pToRemove->GetVirtDrawObj()->GetOrdNum();
FindRootFrm()->GetDrawPage()->RemoveObject( nOrdNum );
pToRemove->GetVirtDrawObj()->ReferencedObj().SetOrdNum( nOrdNum );
@@ -883,7 +883,7 @@ void SwPageFrm::AppendDrawObjToPage( SwAnchoredObject& _rNewObj )
if ( pFlyFrm &&
_rNewObj.GetDrawObj()->GetOrdNum() < pFlyFrm->GetVirtDrawObj()->GetOrdNum() )
{
- UINT32 nNewNum = pFlyFrm->GetVirtDrawObj()->GetOrdNumDirect();
+ sal_uInt32 nNewNum = pFlyFrm->GetVirtDrawObj()->GetOrdNumDirect();
if ( _rNewObj.GetDrawObj()->GetPage() )
_rNewObj.DrawObj()->GetPage()->SetObjectOrdNum(
_rNewObj.GetDrawObj()->GetOrdNumDirect(), nNewNum);
@@ -993,9 +993,9 @@ void SwPageFrm::PlaceFly( SwFlyFrm* pFly, SwFlyFrmFmt* pFmt )
// #i28701# - if document compatibility option 'Consider
// wrapping style influence on object positioning' is ON, the clip area
// corresponds to the one as the object doesn't follows the text flow.
-BOOL CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, BOOL bMove )
+sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if ( pSdrObj->ISA(SwVirtFlyDrawObj) )
{
const SwFlyFrm* pFly = ((const SwVirtFlyDrawObj*)pSdrObj)->GetFlyFrm();
@@ -1115,7 +1115,7 @@ BOOL CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, BOOL bMove )
SWRECTFN( pClip )
const SwLayoutFrm *pUp = pClip->GetUpper();
const SwFrm *pCell = pUp->IsCellFrm() ? pUp : 0;
- USHORT nType = bMove ? FRM_ROOT | FRM_FLY | FRM_HEADER |
+ sal_uInt16 nType = bMove ? FRM_ROOT | FRM_FLY | FRM_HEADER |
FRM_FOOTER | FRM_FTN
: FRM_BODY | FRM_FLY | FRM_HEADER |
FRM_FOOTER | FRM_CELL| FRM_FTN;
@@ -1309,7 +1309,7 @@ BOOL CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, BOOL bMove )
}
else
{
- bRet = FALSE;
+ bRet = sal_False;
}
}
}
diff --git a/sw/source/core/layout/flypos.cxx b/sw/source/core/layout/flypos.cxx
index 8cb2d5a7fccd..6ac6bf772502 100644
--- a/sw/source/core/layout/flypos.cxx
+++ b/sw/source/core/layout/flypos.cxx
@@ -50,10 +50,10 @@
SV_IMPL_OP_PTRARR_SORT( SwPosFlyFrms, SwPosFlyFrmPtr )
SwPosFlyFrm::SwPosFlyFrm( const SwNodeIndex& rIdx, const SwFrmFmt* pFmt,
- USHORT nArrPos )
+ sal_uInt16 nArrPos )
: pFrmFmt( pFmt ), pNdIdx( (SwNodeIndex*) &rIdx )
{
- BOOL bFnd = FALSE;
+ sal_Bool bFnd = sal_False;
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
if (FLY_AT_PAGE == rAnchor.GetAnchorId())
{
@@ -67,14 +67,14 @@ SwPosFlyFrm::SwPosFlyFrm( const SwNodeIndex& rIdx, const SwFrmFmt* pFmt,
// Schauen, ob es ein SdrObject dafuer gibt
if( aIter.First( TYPE( SwFlyFrm) ) )
nOrdNum = ((SwFlyFrm*)aIter())->GetVirtDrawObj()->GetOrdNum(),
- bFnd = TRUE;
+ bFnd = sal_True;
}
else if( RES_DRAWFRMFMT == pFmt->Which() )
{
// Schauen, ob es ein SdrObject dafuer gibt
if( aIter.First( TYPE(SwDrawContact) ) )
nOrdNum = ((SwDrawContact*)aIter())->GetMaster()->GetOrdNum(),
- bFnd = TRUE;
+ bFnd = sal_True;
}
}
@@ -94,12 +94,12 @@ SwPosFlyFrm::~SwPosFlyFrm()
}
}
-BOOL SwPosFlyFrm::operator==( const SwPosFlyFrm& )
+sal_Bool SwPosFlyFrm::operator==( const SwPosFlyFrm& )
{
- return FALSE; // FlyFrames koennen auf der gleichen Position stehen
+ return sal_False; // FlyFrames koennen auf der gleichen Position stehen
}
-BOOL SwPosFlyFrm::operator<( const SwPosFlyFrm& rPosFly )
+sal_Bool SwPosFlyFrm::operator<( const SwPosFlyFrm& rPosFly )
{
if( pNdIdx->GetIndex() == rPosFly.pNdIdx->GetIndex() )
{
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 1c2e866e133b..05349725ab22 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -93,17 +93,17 @@
// <--
// ftnfrm.cxx:
-void lcl_RemoveFtns( SwFtnBossFrm* pBoss, BOOL bPageOnly, BOOL bEndNotes );
+void lcl_RemoveFtns( SwFtnBossFrm* pBoss, sal_Bool bPageOnly, sal_Bool bEndNotes );
using namespace ::com::sun::star;
-BOOL bObjsDirect = TRUE;
-BOOL bDontCreateObjects = FALSE;
-BOOL bSetCompletePaintOnInvalidate = FALSE;
+sal_Bool bObjsDirect = sal_True;
+sal_Bool bDontCreateObjects = sal_False;
+sal_Bool bSetCompletePaintOnInvalidate = sal_False;
-BYTE StackHack::nCnt = 0;
-BOOL StackHack::bLocked = FALSE;
+sal_uInt8 StackHack::nCnt = 0;
+sal_Bool StackHack::bLocked = sal_False;
@@ -117,7 +117,7 @@ SwFrmNotify::SwFrmNotify( SwFrm *pF ) :
pFrm( pF ),
aFrm( pF->Frm() ),
aPrt( pF->Prt() ),
- bInvaKeep( FALSE ),
+ bInvaKeep( sal_False ),
bValidSize( pF->GetValidSizeFlag() ),
// --> OD 2005-07-29 #i49383#
mbFrmDeleted( false )
@@ -135,8 +135,8 @@ SwFrmNotify::SwFrmNotify( SwFrm *pF ) :
}
bHadFollow = pF->IsCntntFrm() ?
- (((SwCntntFrm*)pF)->GetFollow() ? TRUE : FALSE) :
- FALSE;
+ (((SwCntntFrm*)pF)->GetFollow() ? sal_True : sal_False) :
+ sal_False;
}
/*************************************************************************
@@ -155,12 +155,12 @@ SwFrmNotify::~SwFrmNotify()
// <--
SWRECTFN( pFrm )
- const BOOL bAbsP = POS_DIFF( aFrm, pFrm->Frm() );
- const BOOL bChgWidth =
+ const sal_Bool bAbsP = POS_DIFF( aFrm, pFrm->Frm() );
+ const sal_Bool bChgWidth =
(aFrm.*fnRect->fnGetWidth)() != (pFrm->Frm().*fnRect->fnGetWidth)();
- const BOOL bChgHeight =
+ const sal_Bool bChgHeight =
(aFrm.*fnRect->fnGetHeight)()!=(pFrm->Frm().*fnRect->fnGetHeight)();
- const BOOL bChgFlyBasePos = pFrm->IsTxtFrm() &&
+ const sal_Bool bChgFlyBasePos = pFrm->IsTxtFrm() &&
( ( mnFlyAnchorOfst != ((SwTxtFrm*)pFrm)->GetBaseOfstForFly( sal_True ) ) ||
( mnFlyAnchorOfstNoWrap != ((SwTxtFrm*)pFrm)->GetBaseOfstForFly( sal_False ) ) );
@@ -243,9 +243,9 @@ SwFrmNotify::~SwFrmNotify()
}
//Fuer Hintergrundgrafiken muss bei Groessenaenderungen ein Repaint her.
- const BOOL bPrtWidth =
+ const sal_Bool bPrtWidth =
(aPrt.*fnRect->fnGetWidth)() != (pFrm->Prt().*fnRect->fnGetWidth)();
- const BOOL bPrtHeight =
+ const sal_Bool bPrtHeight =
(aPrt.*fnRect->fnGetHeight)()!=(pFrm->Prt().*fnRect->fnGetHeight)();
if ( bPrtWidth || bPrtHeight )
{
@@ -264,7 +264,7 @@ SwFrmNotify::~SwFrmNotify()
}
}
- const BOOL bPrtP = POS_DIFF( aPrt, pFrm->Prt() );
+ const sal_Bool bPrtP = POS_DIFF( aPrt, pFrm->Prt() );
if ( bAbsP || bPrtP || bChgWidth || bChgHeight ||
bPrtWidth || bPrtHeight || bChgFlyBasePos )
{
@@ -459,7 +459,7 @@ SwFrmNotify::~SwFrmNotify()
SwLayNotify::SwLayNotify( SwLayoutFrm *pLayFrm ) :
SwFrmNotify( pLayFrm ),
- bLowersComplete( FALSE )
+ bLowersComplete( sal_False )
{
}
@@ -509,22 +509,22 @@ SwLayNotify::~SwLayNotify()
SwLayoutFrm *pLay = GetLay();
SWRECTFN( pLay )
- BOOL bNotify = FALSE;
+ sal_Bool bNotify = sal_False;
if ( pLay->Prt().SSize() != aPrt.SSize() )
{
if ( !IsLowersComplete() )
{
- BOOL bInvaPercent;
+ sal_Bool bInvaPercent;
if ( pLay->IsRowFrm() )
{
- bInvaPercent = TRUE;
+ bInvaPercent = sal_True;
long nNew = (pLay->Prt().*fnRect->fnGetHeight)();
if( nNew != (aPrt.*fnRect->fnGetHeight)() )
- ((SwRowFrm*)pLay)->AdjustCells( nNew, TRUE);
+ ((SwRowFrm*)pLay)->AdjustCells( nNew, sal_True);
if( (pLay->Prt().*fnRect->fnGetWidth)()
!= (aPrt.*fnRect->fnGetWidth)() )
- ((SwRowFrm*)pLay)->AdjustCells( 0, FALSE );
+ ((SwRowFrm*)pLay)->AdjustCells( 0, sal_False );
}
else
{
@@ -534,7 +534,7 @@ SwLayNotify::~SwLayNotify()
//3. Wenn der Fly eine feste Hoehe hat und die Spalten in der
// Hoehe danebenliegen.
//4. niemals bei SectionFrms.
- BOOL bLow;
+ sal_Bool bLow;
if( pLay->IsFlyFrm() )
{
if ( pLay->Lower() )
@@ -544,7 +544,7 @@ SwLayNotify::~SwLayNotify()
!= (pLay->Prt().*fnRect->fnGetHeight)();
}
else
- bLow = FALSE;
+ bLow = sal_False;
}
else if( pLay->IsSctFrm() )
{
@@ -556,12 +556,12 @@ SwLayNotify::~SwLayNotify()
bLow = pLay->Prt().Width() != aPrt.Width();
}
else
- bLow = FALSE;
+ bLow = sal_False;
}
else if( pLay->IsFooterFrm() && !pLay->HasFixSize() )
bLow = pLay->Prt().Width() != aPrt.Width();
else
- bLow = TRUE;
+ bLow = sal_True;
bInvaPercent = bLow;
if ( bLow )
{
@@ -587,7 +587,7 @@ SwLayNotify::~SwLayNotify()
}
}
}
- bNotify = TRUE;
+ bNotify = sal_True;
//TEUER!! aber wie macht man es geschickter?
if( bInvaPercent )
pLay->InvaPercentLowers( pLay->Prt().Height() - aPrt.Height() );
@@ -604,9 +604,9 @@ SwLayNotify::~SwLayNotify()
}
//Lower benachrichtigen wenn sich die Position veraendert hat.
- const BOOL bPrtPos = POS_DIFF( aPrt, pLay->Prt() );
- const BOOL bPos = bPrtPos || POS_DIFF( aFrm, pLay->Frm() );
- const BOOL bSize = pLay->Frm().SSize() != aFrm.SSize();
+ const sal_Bool bPrtPos = POS_DIFF( aPrt, pLay->Prt() );
+ const sal_Bool bPos = bPrtPos || POS_DIFF( aFrm, pLay->Frm() );
+ const sal_Bool bSize = pLay->Frm().SSize() != aFrm.SSize();
if ( bPos && pLay->Lower() && !IsLowersComplete() )
pLay->Lower()->InvalidatePos();
@@ -915,7 +915,7 @@ SwCntntNotify::~SwCntntNotify()
}
}
- BOOL bFirst = (aFrm.*fnRect->fnGetWidth)() == 0;
+ sal_Bool bFirst = (aFrm.*fnRect->fnGetWidth)() == 0;
if ( pCnt->IsNoTxtFrm() )
{
@@ -962,7 +962,7 @@ SwCntntNotify::~SwCntntNotify()
if ( pFESh && pNd->IsOLESizeInvalid() )
{
- pNd->SetOLESizeInvalid( FALSE );
+ pNd->SetOLESizeInvalid( sal_False );
//TODO/LATER: needs OnDocumentPrinterChanged
//xObj->OnDocumentPrinterChanged( pNd->GetDoc()->getPrinter( false ) );
pFESh->CalcAndSetScale( xObj );//Client erzeugen lassen.
@@ -999,7 +999,7 @@ SwCntntNotify::~SwCntntNotify()
SwNodeIndex *pIdx = 0;
SwSpzFrmFmts *pTbl = pDoc->GetSpzFrmFmts();
- for ( USHORT i = 0; i < pTbl->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pTbl->Count(); ++i )
{
if ( !pPage )
pPage = pCnt->FindPageFrm();
@@ -1090,10 +1090,10 @@ SwCntntNotify::~SwCntntNotify()
|*
|*************************************************************************/
-void AppendObjs( const SwSpzFrmFmts *pTbl, ULONG nIndex,
+void AppendObjs( const SwSpzFrmFmts *pTbl, sal_uLong nIndex,
SwFrm *pFrm, SwPageFrm *pPage )
{
- for ( USHORT i = 0; i < pTbl->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pTbl->Count(); ++i )
{
SwFrmFmt *pFmt = (SwFrmFmt*)(*pTbl)[i];
const SwFmtAnchor &rAnch = pFmt->GetAnchor();
@@ -1168,7 +1168,7 @@ void AppendObjs( const SwSpzFrmFmts *pTbl, ULONG nIndex,
}
}
-BOOL MA_FASTCALL lcl_ObjConnected( SwFrmFmt *pFmt )
+sal_Bool MA_FASTCALL lcl_ObjConnected( SwFrmFmt *pFmt )
{
SwClientIter aIter( *pFmt );
if ( RES_FLYFRMFMT == pFmt->Which() )
@@ -1179,7 +1179,7 @@ BOOL MA_FASTCALL lcl_ObjConnected( SwFrmFmt *pFmt )
if ( 0 != (pContact = (SwDrawContact*)aIter.First( TYPE(SwDrawContact))))
return pContact->GetAnchorFrm() != 0;
}
- return FALSE;
+ return sal_False;
}
/** helper method to determine, if a <SwFrmFmt>, which has an object connected,
@@ -1217,24 +1217,24 @@ void AppendAllObjs( const SwSpzFrmFmts *pTbl )
SwSpzFrmFmts aCpy( 255, 255 );
aCpy.Insert( pTbl, 0 );
- USHORT nOldCnt = USHRT_MAX;
+ sal_uInt16 nOldCnt = USHRT_MAX;
while ( aCpy.Count() && aCpy.Count() != nOldCnt )
{
nOldCnt = aCpy.Count();
for ( int i = 0; i < int(aCpy.Count()); ++i )
{
- SwFrmFmt *pFmt = (SwFrmFmt*)aCpy[ USHORT(i) ];
+ SwFrmFmt *pFmt = (SwFrmFmt*)aCpy[ sal_uInt16(i) ];
const SwFmtAnchor &rAnch = pFmt->GetAnchor();
- BOOL bRemove = FALSE;
+ sal_Bool bRemove = sal_False;
if ((rAnch.GetAnchorId() == FLY_AT_PAGE) ||
(rAnch.GetAnchorId() == FLY_AS_CHAR))
{
//Seitengebunde sind bereits verankert, zeichengebundene
//will ich hier nicht.
- bRemove = TRUE;
+ bRemove = sal_True;
}
- else if ( FALSE == (bRemove = ::lcl_ObjConnected( pFmt )) ||
+ else if ( sal_False == (bRemove = ::lcl_ObjConnected( pFmt )) ||
::lcl_InHeaderOrFooter( *pFmt ) )
{
// OD 23.06.2003 #108784# - correction: for objects in header
@@ -1248,7 +1248,7 @@ void AppendAllObjs( const SwSpzFrmFmts *pTbl )
}
if ( bRemove )
{
- aCpy.Remove( USHORT(i) );
+ aCpy.Remove( sal_uInt16(i) );
--i;
}
}
@@ -1276,16 +1276,16 @@ void lcl_SetPos( SwFrm& _rNewFrm,
}
void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
- ULONG nIndex, BOOL bPages, ULONG nEndIndex,
+ sal_uLong nIndex, sal_Bool bPages, sal_uLong nEndIndex,
SwFrm *pPrv )
{
pDoc->BlockIdling();
SwRootFrm* pLayout = pDoc->GetRootFrm();
- const BOOL bOldCallbackActionEnabled = pLayout ? pLayout->IsCallbackActionEnabled() : sal_False;
+ const sal_Bool bOldCallbackActionEnabled = pLayout ? pLayout->IsCallbackActionEnabled() : sal_False;
if(pLayout)
- pLayout->SetCallbackActionEnabled( FALSE );
+ pLayout->SetCallbackActionEnabled( sal_False );
- //Bei der Erzeugung des Layouts wird bPages mit TRUE uebergeben. Dann
+ //Bei der Erzeugung des Layouts wird bPages mit sal_True uebergeben. Dann
//werden schon mal alle x Absaetze neue Seiten angelegt. Bei umbruechen
//und/oder Pagedescriptorwechseln werden gleich die entsprechenden Seiten
//angelegt.
@@ -1299,17 +1299,17 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
//Wenn in der DocStatistik eine brauchebare Seitenzahl angegeben ist
//(wird beim Schreiben gepflegt), so wird von dieser Seitenanzahl
//ausgegengen.
- const BOOL bStartPercent = bPages && !nEndIndex;
+ const sal_Bool bStartPercent = bPages && !nEndIndex;
SwPageFrm *pPage = pLay->FindPageFrm();
const SwSpzFrmFmts *pTbl = pDoc->GetSpzFrmFmts();
SwFrm *pFrm = 0;
- BOOL bBreakAfter = FALSE;
+ sal_Bool bBreakAfter = sal_False;
SwActualSection *pActualSection = 0;
SwLayHelper *pPageMaker;
- //Wenn das Layout erzeugt wird (bPages == TRUE) steuern wir den Progress
+ //Wenn das Layout erzeugt wird (bPages == sal_True) steuern wir den Progress
//an. Flys und DrawObjekte werden dann nicht gleich verbunden, dies
//passiert erst am Ende der Funktion.
if ( bPages )
@@ -1320,9 +1320,9 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
pActualSection, bBreakAfter, nIndex, 0 == nEndIndex );
if( bStartPercent )
{
- const ULONG nPageCount = pPageMaker->CalcPageCount();
+ const sal_uLong nPageCount = pPageMaker->CalcPageCount();
if( nPageCount )
- bObjsDirect = FALSE;
+ bObjsDirect = sal_False;
}
}
else
@@ -1356,7 +1356,7 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
//the SwActualSection class has a member, which points to an upper(section).
//When the "inner" section finishs, the upper will used instead.
- while( TRUE )
+ while( sal_True )
{
SwNode *pNd = pDoc->GetNodes()[nIndex];
if ( pNd->IsCntntNode() )
@@ -1495,7 +1495,7 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
if( pPrv->IsSctFrm() )
pPrv = ((SwSectionFrm*)pPrv)->ContainsCntnt();
if( pPrv && pPrv->IsTxtFrm() )
- ((SwTxtFrm*)pPrv)->Prepare( PREP_QUOVADIS, 0, FALSE );
+ ((SwTxtFrm*)pPrv)->Prepare( PREP_QUOVADIS, 0, sal_False );
}
}
// --> OD 2005-12-01 #i27138#
@@ -1599,7 +1599,7 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
if( ! pOuterSectionFrm->IsColLocked() &&
! pOuterSectionFrm->ContainsCntnt() )
{
- pOuterSectionFrm->DelEmpty( TRUE );
+ pOuterSectionFrm->DelEmpty( sal_True );
delete pOuterSectionFrm;
}
pActualSection->SetSectionFrm( (SwSectionFrm*)pFrm );
@@ -1655,7 +1655,7 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
{
if ( !bDontCreateObjects )
AppendAllObjs( pTbl );
- bObjsDirect = TRUE;
+ bObjsDirect = sal_True;
}
if( pPageMaker )
@@ -1680,29 +1680,29 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
const SwNodeIndex &rEndIdx )
{
- bObjsDirect = FALSE;
+ bObjsDirect = sal_False;
SwNodeIndex aTmp( rSttIdx );
- ULONG nEndIdx = rEndIdx.GetIndex();
+ sal_uLong nEndIdx = rEndIdx.GetIndex();
SwNode* pNd = pDoc->GetNodes().FindPrvNxtFrmNode( aTmp,
pDoc->GetNodes()[ nEndIdx-1 ]);
if ( pNd )
{
- BOOL bApres = aTmp < rSttIdx;
+ sal_Bool bApres = aTmp < rSttIdx;
SwNode2Layout aNode2Layout( *pNd, rSttIdx.GetIndex() );
SwFrm* pFrm;
while( 0 != (pFrm = aNode2Layout.NextFrm()) )
{
SwLayoutFrm *pUpper = pFrm->GetUpper();
SwFtnFrm* pFtnFrm = pUpper->FindFtnFrm();
- BOOL bOldLock, bOldFtn;
+ sal_Bool bOldLock, bOldFtn;
if( pFtnFrm )
{
bOldFtn = pFtnFrm->IsColLocked();
pFtnFrm->ColLock();
}
else
- bOldFtn = TRUE;
+ bOldFtn = sal_True;
SwSectionFrm* pSct = pUpper->FindSctFrm();
// Es sind innerhalb von Fussnoten nur die Bereiche interessant,
// die in den Fussnoten liegen, nicht etwa die (spaltigen) Bereiche,
@@ -1716,14 +1716,14 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
pSct->ColLock();
}
else
- bOldLock = TRUE;
+ bOldLock = sal_True;
// Wenn pFrm sich nicht bewegen kann, koennen wir auch niemanden
// auf die naechste Seite schieben. Innerhalb eines Rahmens auch
// nicht ( in der 1. Spalte eines Rahmens waere pFrm Moveable()! )
// Auch in spaltigen Bereichen in Tabellen waere pFrm Moveable.
- BOOL bMoveNext = nEndIdx - rSttIdx.GetIndex() > 120;
- BOOL bAllowMove = !pFrm->IsInFly() && pFrm->IsMoveable() &&
+ sal_Bool bMoveNext = nEndIdx - rSttIdx.GetIndex() > 120;
+ sal_Bool bAllowMove = !pFrm->IsInFly() && pFrm->IsMoveable() &&
(!pFrm->IsInTab() || pFrm->IsTabFrm() );
if ( bMoveNext && bAllowMove )
{
@@ -1812,12 +1812,12 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
if( pTmp )
{
SwFrm* pOldUp = pTmp->GetFrm()->GetUpper();
- // MoveFwd==TRUE bedeutet, dass wir auf der gleichen
+ // MoveFwd==sal_True bedeutet, dass wir auf der gleichen
// Seite geblieben sind, wir wollen aber die Seite wechseln,
// sofern dies moeglich ist
- BOOL bTmpOldLock = pTmp->IsJoinLocked();
+ sal_Bool bTmpOldLock = pTmp->IsJoinLocked();
pTmp->LockJoin();
- while( pTmp->MoveFwd( TRUE, FALSE, TRUE ) )
+ while( pTmp->MoveFwd( sal_True, sal_False, sal_True ) )
{
if( pOldUp == pTmp->GetFrm()->GetUpper() )
break;
@@ -1831,7 +1831,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
}
else
{
- BOOL bSplit;
+ sal_Bool bSplit;
SwFrm* pPrv = bApres ? pFrm : pFrm->GetPrev();
// Wenn in einen SectionFrm ein anderer eingefuegt wird,
// muss dieser aufgebrochen werden
@@ -1846,8 +1846,8 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
}
}
else
- bSplit = FALSE;
- ::_InsertCnt( pUpper, pDoc, rSttIdx.GetIndex(), FALSE,
+ bSplit = sal_False;
+ ::_InsertCnt( pUpper, pDoc, rSttIdx.GetIndex(), sal_False,
nEndIdx, pPrv );
// OD 23.06.2003 #108784# - correction: append objects doesn't
// depend on value of <bAllowMove>
@@ -1870,7 +1870,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
}
SwPageFrm *pPage = pUpper->FindPageFrm();
- SwFrm::CheckPageDescs( pPage, FALSE );
+ SwFrm::CheckPageDescs( pPage, sal_False );
if( !bOldFtn )
pFtnFrm->ColUnlock();
if( !bOldLock )
@@ -1881,7 +1881,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
// und damit ruhig zerstoert werden.
if( !pSct->ContainsCntnt() )
{
- pSct->DelEmpty( TRUE );
+ pSct->DelEmpty( sal_True );
pDoc->GetRootFrm()->RemoveFromList( pSct );
delete pSct;
}
@@ -1889,7 +1889,7 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
}
}
- bObjsDirect = TRUE;
+ bObjsDirect = sal_True;
}
@@ -1925,20 +1925,20 @@ SwBorderAttrs::SwBorderAttrs( const SwModify *pMod, const SwFrm *pConstructor )
//Muessen alle einmal berechnet werden:
bTopLine = bBottomLine = bLeftLine = bRightLine =
- bTop = bBottom = bLine = TRUE;
+ bTop = bBottom = bLine = sal_True;
- bCacheGetLine = bCachedGetTopLine = bCachedGetBottomLine = FALSE;
+ bCacheGetLine = bCachedGetTopLine = bCachedGetBottomLine = sal_False;
// OD 21.05.2003 #108789# - init cache status for values <bJoinedWithPrev>
// and <bJoinedWithNext>, which aren't initialized by default.
- bCachedJoinedWithPrev = FALSE;
- bCachedJoinedWithNext = FALSE;
+ bCachedJoinedWithPrev = sal_False;
+ bCachedJoinedWithNext = sal_False;
bBorderDist = 0 != (pConstructor->GetType() & (FRM_CELL));
}
SwBorderAttrs::~SwBorderAttrs()
{
- ((SwModify*)pOwner)->SetInCache( FALSE );
+ ((SwModify*)pOwner)->SetInCache( sal_False );
}
/*************************************************************************
@@ -1956,13 +1956,13 @@ SwBorderAttrs::~SwBorderAttrs()
void SwBorderAttrs::_CalcTop()
{
nTop = CalcTopLine() + rUL.GetUpper();
- bTop = FALSE;
+ bTop = sal_False;
}
void SwBorderAttrs::_CalcBottom()
{
nBottom = CalcBottomLine() + rUL.GetLower();
- bBottom = FALSE;
+ bBottom = sal_False;
}
long SwBorderAttrs::CalcRight( const SwFrm* pCaller ) const
@@ -2041,7 +2041,7 @@ void SwBorderAttrs::_CalcTopLine()
? rBox.GetDistance (BOX_LINE_TOP)
: rBox.CalcLineSpace(BOX_LINE_TOP);
nTopLine = nTopLine + rShadow.CalcShadowSpace(SHADOW_TOP);
- bTopLine = FALSE;
+ bTopLine = sal_False;
}
void SwBorderAttrs::_CalcBottomLine()
@@ -2050,7 +2050,7 @@ void SwBorderAttrs::_CalcBottomLine()
? rBox.GetDistance (BOX_LINE_BOTTOM)
: rBox.CalcLineSpace(BOX_LINE_BOTTOM);
nBottomLine = nBottomLine + rShadow.CalcShadowSpace(SHADOW_BOTTOM);
- bBottomLine = FALSE;
+ bBottomLine = sal_False;
}
void SwBorderAttrs::_CalcLeftLine()
@@ -2059,7 +2059,7 @@ void SwBorderAttrs::_CalcLeftLine()
? rBox.GetDistance (BOX_LINE_LEFT)
: rBox.CalcLineSpace(BOX_LINE_LEFT);
nLeftLine = nLeftLine + rShadow.CalcShadowSpace(SHADOW_LEFT);
- bLeftLine = FALSE;
+ bLeftLine = sal_False;
}
void SwBorderAttrs::_CalcRightLine()
@@ -2068,7 +2068,7 @@ void SwBorderAttrs::_CalcRightLine()
? rBox.GetDistance (BOX_LINE_RIGHT)
: rBox.CalcLineSpace(BOX_LINE_RIGHT);
nRightLine = nRightLine + rShadow.CalcShadowSpace(SHADOW_RIGHT);
- bRightLine = FALSE;
+ bRightLine = sal_False;
}
/*************************************************************************
@@ -2081,7 +2081,7 @@ void SwBorderAttrs::_IsLine()
{
bIsLine = rBox.GetTop() || rBox.GetBottom() ||
rBox.GetLeft()|| rBox.GetRight();
- bLine = FALSE;
+ bLine = sal_False;
}
/*************************************************************************
@@ -2112,7 +2112,7 @@ inline int CmpLines( const SvxBorderLine *pL1, const SvxBorderLine *pL2 )
// OD 21.05.2003 #108789# - compare <CalcRight()> and <rCmpAttrs.CalcRight()>
// instead of only the right LR-spacing, because R2L-layout has to be
// considered.
-BOOL SwBorderAttrs::CmpLeftRight( const SwBorderAttrs &rCmpAttrs,
+sal_Bool SwBorderAttrs::CmpLeftRight( const SwBorderAttrs &rCmpAttrs,
const SwFrm *pCaller,
const SwFrm *pCmp ) const
{
@@ -2123,10 +2123,10 @@ BOOL SwBorderAttrs::CmpLeftRight( const SwBorderAttrs &rCmpAttrs,
CalcRight( pCaller ) == rCmpAttrs.CalcRight( pCmp ) );
}
-BOOL SwBorderAttrs::_JoinWithCmp( const SwFrm& _rCallerFrm,
+sal_Bool SwBorderAttrs::_JoinWithCmp( const SwFrm& _rCallerFrm,
const SwFrm& _rCmpFrm ) const
{
- BOOL bReturnVal = FALSE;
+ sal_Bool bReturnVal = sal_False;
SwBorderAttrAccess aCmpAccess( SwFrm::GetCache(), &_rCmpFrm );
const SwBorderAttrs &rCmpAttrs = *aCmpAccess.Get();
@@ -2136,7 +2136,7 @@ BOOL SwBorderAttrs::_JoinWithCmp( const SwFrm& _rCallerFrm,
CmpLeftRight( rCmpAttrs, &_rCallerFrm, &_rCmpFrm )
)
{
- bReturnVal = TRUE;
+ bReturnVal = sal_True;
}
return bReturnVal;
@@ -2149,7 +2149,7 @@ void SwBorderAttrs::_CalcJoinedWithPrev( const SwFrm& _rFrm,
const SwFrm* _pPrevFrm )
{
// set default
- bJoinedWithPrev = FALSE;
+ bJoinedWithPrev = sal_False;
if ( _rFrm.IsTxtFrm() )
{
@@ -2183,7 +2183,7 @@ void SwBorderAttrs::_CalcJoinedWithPrev( const SwFrm& _rFrm,
void SwBorderAttrs::_CalcJoinedWithNext( const SwFrm& _rFrm )
{
// set default
- bJoinedWithNext = FALSE;
+ bJoinedWithNext = sal_False;
if ( _rFrm.IsTxtFrm() )
{
@@ -2211,7 +2211,7 @@ void SwBorderAttrs::_CalcJoinedWithNext( const SwFrm& _rFrm )
// OD 21.05.2003 #108789# - accessor for cached values <bJoinedWithPrev>
// OD 2004-02-26 #i25029# - add 2nd parameter <_pPrevFrm>, which is passed to
// method <_CalcJoindWithPrev(..)>.
-BOOL SwBorderAttrs::JoinedWithPrev( const SwFrm& _rFrm,
+sal_Bool SwBorderAttrs::JoinedWithPrev( const SwFrm& _rFrm,
const SwFrm* _pPrevFrm ) const
{
if ( !bCachedJoinedWithPrev || _pPrevFrm )
@@ -2223,7 +2223,7 @@ BOOL SwBorderAttrs::JoinedWithPrev( const SwFrm& _rFrm,
return bJoinedWithPrev;
}
-BOOL SwBorderAttrs::JoinedWithNext( const SwFrm& _rFrm ) const
+sal_Bool SwBorderAttrs::JoinedWithNext( const SwFrm& _rFrm ) const
{
if ( !bCachedJoinedWithNext )
{
@@ -2238,7 +2238,7 @@ BOOL SwBorderAttrs::JoinedWithNext( const SwFrm& _rFrm ) const
void SwBorderAttrs::_GetTopLine( const SwFrm& _rFrm,
const SwFrm* _pPrevFrm )
{
- USHORT nRet = CalcTopLine();
+ sal_uInt16 nRet = CalcTopLine();
// OD 21.05.2003 #108789# - use new method <JoinWithPrev()>
// OD 2004-02-26 #i25029# - add 2nd parameter
@@ -2254,7 +2254,7 @@ void SwBorderAttrs::_GetTopLine( const SwFrm& _rFrm,
void SwBorderAttrs::_GetBottomLine( const SwFrm& _rFrm )
{
- USHORT nRet = CalcBottomLine();
+ sal_uInt16 nRet = CalcBottomLine();
// OD 21.05.2003 #108789# - use new method <JoinWithPrev()>
if ( JoinedWithNext( _rFrm ) )
@@ -2277,7 +2277,7 @@ SwBorderAttrAccess::SwBorderAttrAccess( SwCache &rCach, const SwFrm *pFrm ) :
SwCacheAccess( rCach, (pFrm->IsCntntFrm() ?
(void*)((SwCntntFrm*)pFrm)->GetNode() :
(void*)((SwLayoutFrm*)pFrm)->GetFmt()),
- (BOOL)(pFrm->IsCntntFrm() ?
+ (sal_Bool)(pFrm->IsCntntFrm() ?
((SwModify*)((SwCntntFrm*)pFrm)->GetNode())->IsInCache() :
((SwModify*)((SwLayoutFrm*)pFrm)->GetFmt())->IsInCache()) ),
pConstructor( pFrm )
@@ -2292,7 +2292,7 @@ SwBorderAttrAccess::SwBorderAttrAccess( SwCache &rCach, const SwFrm *pFrm ) :
SwCacheObj *SwBorderAttrAccess::NewObj()
{
- ((SwModify*)pOwner)->SetInCache( TRUE );
+ ((SwModify*)pOwner)->SetInCache( sal_True );
return new SwBorderAttrs( (SwModify*)pOwner, pConstructor );
}
@@ -2307,7 +2307,7 @@ SwBorderAttrs *SwBorderAttrAccess::Get()
|*
|*************************************************************************/
-SwOrderIter::SwOrderIter( const SwPageFrm *pPg, BOOL bFlys ) :
+SwOrderIter::SwOrderIter( const SwPageFrm *pPg, sal_Bool bFlys ) :
pPage( pPg ),
pCurrent( 0 ),
bFlysOnly( bFlys )
@@ -2328,14 +2328,14 @@ const SdrObject *SwOrderIter::Top()
const SwSortedObjs *pObjs = pPage->GetSortedObjs();
if ( pObjs->Count() )
{
- UINT32 nTopOrd = 0;
+ sal_uInt32 nTopOrd = 0;
(*pObjs)[0]->GetDrawObj()->GetOrdNum(); //Aktualisieren erzwingen!
- for ( USHORT i = 0; i < pObjs->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
{
const SdrObject* pObj = (*pObjs)[i]->GetDrawObj();
if ( bFlysOnly && !pObj->ISA(SwVirtFlyDrawObj) )
continue;
- UINT32 nTmp = pObj->GetOrdNumDirect();
+ sal_uInt32 nTmp = pObj->GetOrdNumDirect();
if ( nTmp >= nTopOrd )
{
nTopOrd = nTmp;
@@ -2358,17 +2358,17 @@ const SdrObject *SwOrderIter::Bottom()
pCurrent = 0;
if ( pPage->GetSortedObjs() )
{
- UINT32 nBotOrd = USHRT_MAX;
+ sal_uInt32 nBotOrd = USHRT_MAX;
const SwSortedObjs *pObjs = pPage->GetSortedObjs();
if ( pObjs->Count() )
{
(*pObjs)[0]->GetDrawObj()->GetOrdNum(); //Aktualisieren erzwingen!
- for ( USHORT i = 0; i < pObjs->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
{
const SdrObject* pObj = (*pObjs)[i]->GetDrawObj();
if ( bFlysOnly && !pObj->ISA(SwVirtFlyDrawObj) )
continue;
- UINT32 nTmp = pObj->GetOrdNumDirect();
+ sal_uInt32 nTmp = pObj->GetOrdNumDirect();
if ( nTmp < nBotOrd )
{
nBotOrd = nTmp;
@@ -2388,21 +2388,21 @@ const SdrObject *SwOrderIter::Bottom()
const SdrObject *SwOrderIter::Next()
{
- const UINT32 nCurOrd = pCurrent ? pCurrent->GetOrdNumDirect() : 0;
+ const sal_uInt32 nCurOrd = pCurrent ? pCurrent->GetOrdNumDirect() : 0;
pCurrent = 0;
if ( pPage->GetSortedObjs() )
{
- UINT32 nOrd = USHRT_MAX;
+ sal_uInt32 nOrd = USHRT_MAX;
const SwSortedObjs *pObjs = pPage->GetSortedObjs();
if ( pObjs->Count() )
{
(*pObjs)[0]->GetDrawObj()->GetOrdNum(); //Aktualisieren erzwingen!
- for ( USHORT i = 0; i < pObjs->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
{
const SdrObject* pObj = (*pObjs)[i]->GetDrawObj();
if ( bFlysOnly && !pObj->ISA(SwVirtFlyDrawObj) )
continue;
- UINT32 nTmp = pObj->GetOrdNumDirect();
+ sal_uInt32 nTmp = pObj->GetOrdNumDirect();
if ( nTmp > nCurOrd && nTmp < nOrd )
{
nOrd = nTmp;
@@ -2422,21 +2422,21 @@ const SdrObject *SwOrderIter::Next()
const SdrObject *SwOrderIter::Prev()
{
- const UINT32 nCurOrd = pCurrent ? pCurrent->GetOrdNumDirect() : 0;
+ const sal_uInt32 nCurOrd = pCurrent ? pCurrent->GetOrdNumDirect() : 0;
pCurrent = 0;
if ( pPage->GetSortedObjs() )
{
const SwSortedObjs *pObjs = pPage->GetSortedObjs();
if ( pObjs->Count() )
{
- UINT32 nOrd = 0;
+ sal_uInt32 nOrd = 0;
(*pObjs)[0]->GetDrawObj()->GetOrdNum(); //Aktualisieren erzwingen!
- for ( USHORT i = 0; i < pObjs->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
{
const SdrObject* pObj = (*pObjs)[i]->GetDrawObj();
if ( bFlysOnly && !pObj->ISA(SwVirtFlyDrawObj) )
continue;
- UINT32 nTmp = pObj->GetOrdNumDirect();
+ sal_uInt32 nTmp = pObj->GetOrdNumDirect();
if ( nTmp < nCurOrd && nTmp >= nOrd )
{
nOrd = nTmp;
@@ -2473,7 +2473,7 @@ void MA_FASTCALL lcl_RemoveObjsFromPage( SwFrm* _pFrm )
{
OSL_ENSURE( _pFrm->GetDrawObjs(), "Keine DrawObjs fuer lcl_RemoveFlysFromPage." );
SwSortedObjs &rObjs = *_pFrm->GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pObj = rObjs[i];
// --> OD 2004-11-29 #115759# - reset member, at which the anchored
@@ -2527,7 +2527,7 @@ void MA_FASTCALL lcl_RemoveObjsFromPage( SwFrm* _pFrm )
SwFrm *SaveCntnt( SwLayoutFrm *pLay, SwFrm *pStart )
{
if( pLay->IsSctFrm() && pLay->Lower() && pLay->Lower()->IsColumnFrm() )
- lcl_RemoveFtns( (SwColumnFrm*)pLay->Lower(), TRUE, TRUE );
+ lcl_RemoveFtns( (SwColumnFrm*)pLay->Lower(), sal_True, sal_True );
SwFrm *pSav;
if ( 0 == (pSav = pLay->ContainsAny()) )
@@ -2562,7 +2562,7 @@ SwFrm *SaveCntnt( SwLayoutFrm *pLay, SwFrm *pStart )
SwFrm *pFloat = pSav;
if( !pStart )
pStart = pSav;
- BOOL bGo = pStart == pSav;
+ sal_Bool bGo = pStart == pSav;
do
{
if( bGo )
@@ -2601,7 +2601,7 @@ SwFrm *SaveCntnt( SwLayoutFrm *pLay, SwFrm *pStart )
pFloat = pFloat->GetNext();
if( !bGo && pFloat == pStart )
{
- bGo = TRUE;
+ bGo = sal_True;
pFloat->pPrev->pNext = NULL;
pFloat->pPrev = NULL;
}
@@ -2641,7 +2641,7 @@ void MA_FASTCALL lcl_AddObjsToPage( SwFrm* _pFrm, SwPageFrm* _pPage )
{
OSL_ENSURE( _pFrm->GetDrawObjs(), "Keine DrawObjs fuer lcl_AddFlysToPage." );
SwSortedObjs &rObjs = *_pFrm->GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pObj = rObjs[i];
@@ -2790,7 +2790,7 @@ void RestoreCntnt( SwFrm *pSav, SwLayoutFrm *pParent, SwFrm *pSibling, bool bGro
|*
|*************************************************************************/
-ULONG MA_FASTCALL SqRt( BigInt nX )
+sal_uLong MA_FASTCALL SqRt( BigInt nX )
{
BigInt nErg = 1;
@@ -2803,7 +2803,7 @@ ULONG MA_FASTCALL SqRt( BigInt nX )
nOldErg = nErg;
}
}
- return nErg >= BigInt(SAL_MAX_UINT32) ? ULONG_MAX : (ULONG)nErg;
+ return nErg >= BigInt(SAL_MAX_UINT32) ? ULONG_MAX : (sal_uLong)nErg;
}
/*************************************************************************
@@ -2813,7 +2813,7 @@ ULONG MA_FASTCALL SqRt( BigInt nX )
|*************************************************************************/
SwPageFrm * MA_FASTCALL InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper,
- BOOL bOdd, BOOL bInsertEmpty, BOOL bFtn,
+ sal_Bool bOdd, sal_Bool bInsertEmpty, sal_Bool bFtn,
SwFrm *pSibling )
{
SwPageFrm *pRet;
@@ -2855,7 +2855,7 @@ SwPageFrm * MA_FASTCALL InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper,
void MA_FASTCALL lcl_Regist( SwPageFrm *pPage, const SwFrm *pAnch )
{
SwSortedObjs *pObjs = (SwSortedObjs*)pAnch->GetDrawObjs();
- for ( USHORT i = 0; i < pObjs->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
{
SwAnchoredObject* pObj = (*pObjs)[i];
if ( pObj->ISA(SwFlyFrm) )
@@ -3050,7 +3050,7 @@ void MA_FASTCALL lcl_NotifyCntnt( const SdrObject *pThis, SwCntntFrm *pCnt,
if ( pCnt->GetDrawObjs() )
{
const SwSortedObjs &rObjs = *pCnt->GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pObj = rObjs[i];
if ( pObj->ISA(SwFlyFrm) )
@@ -3075,7 +3075,7 @@ void Notify_Background( const SdrObject* pObj,
SwPageFrm* pPage,
const SwRect& rRect,
const PrepareHint eHint,
- const BOOL bInva )
+ const sal_Bool bInva )
{
//Wenn der Frm gerade erstmalig sinnvoll positioniert wurde, braucht der
@@ -3180,7 +3180,7 @@ void Notify_Background( const SdrObject* pObj,
{
pObj->GetOrdNum();
const SwSortedObjs &rObjs = *pPage->GetSortedObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
@@ -3293,7 +3293,7 @@ const SwFrm* GetVirtualUpper( const SwFrm* pFrm, const Point& rPos )
|*
|*************************************************************************/
-BOOL Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj )
+sal_Bool Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj )
{
Point aPos;
const SwFrm* pFrm;
@@ -3312,7 +3312,7 @@ BOOL Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj )
pFrm = GetVirtualUpper( pFrm, aPos );
do
{ if ( pFrm == pCurrFrm )
- return TRUE;
+ return sal_True;
if( pFrm->IsFlyFrm() )
{
aPos = pFrm->Frm().Pos();
@@ -3321,14 +3321,14 @@ BOOL Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj )
else
pFrm = pFrm->GetUpper();
} while ( pFrm );
- return FALSE;
+ return sal_False;
}
-const SwFrm *FindKontext( const SwFrm *pFrm, USHORT nAdditionalKontextTyp )
+const SwFrm *FindKontext( const SwFrm *pFrm, sal_uInt16 nAdditionalKontextTyp )
{
//Liefert die Umgebung des Frm in die kein Fly aus einer anderen
//Umgebung hineinragen kann.
- const USHORT nTyp = FRM_ROOT | FRM_HEADER | FRM_FOOTER | FRM_FTNCONT |
+ const sal_uInt16 nTyp = FRM_ROOT | FRM_HEADER | FRM_FOOTER | FRM_FTNCONT |
FRM_FTN | FRM_FLY |
FRM_TAB | FRM_ROW | FRM_CELL |
nAdditionalKontextTyp;
@@ -3340,20 +3340,20 @@ const SwFrm *FindKontext( const SwFrm *pFrm, USHORT nAdditionalKontextTyp )
return pFrm;
}
-BOOL IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm )
+sal_Bool IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm )
{
const SwFrm *pKontext = FindKontext( pInnerFrm, 0 );
- const USHORT nTyp = FRM_ROOT | FRM_HEADER | FRM_FOOTER | FRM_FTNCONT |
+ const sal_uInt16 nTyp = FRM_ROOT | FRM_HEADER | FRM_FOOTER | FRM_FTNCONT |
FRM_FTN | FRM_FLY |
FRM_TAB | FRM_ROW | FRM_CELL;
do
{ if ( pFrm->GetType() & nTyp )
{
if( pFrm == pKontext )
- return TRUE;
+ return sal_True;
if( pFrm->IsCellFrm() )
- return FALSE;
+ return sal_False;
}
if( pFrm->IsFlyFrm() )
{
@@ -3364,7 +3364,7 @@ BOOL IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm )
pFrm = pFrm->GetUpper();
} while( pFrm );
- return FALSE;
+ return sal_False;
}
@@ -3439,8 +3439,8 @@ const SwFrm* MA_FASTCALL FindPage( const SwRect &rRect, const SwFrm *pPage )
return pPage;
}
-SwFrm* GetFrmOfModify( SwModify const& rMod, USHORT const nFrmType,
- const Point* pPoint, const SwPosition *pPos, const BOOL bCalcFrm )
+SwFrm* GetFrmOfModify( SwModify const& rMod, sal_uInt16 const nFrmType,
+ const Point* pPoint, const SwPosition *pPos, const sal_Bool bCalcFrm )
{
SwFrm *pMinFrm = 0, *pTmpFrm;
SwRect aCalcRect;
@@ -3540,7 +3540,7 @@ SwFrm* GetFrmOfModify( SwModify const& rMod, USHORT const nFrmType,
return pMinFrm;
}
-BOOL IsExtraData( const SwDoc *pDoc )
+sal_Bool IsExtraData( const SwDoc *pDoc )
{
const SwLineNumberInfo &rInf = pDoc->GetLineNumberInfo();
return rInf.IsPaintLineNumbers() ||
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index e8b463937731..98cdc5dda2fb 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -62,23 +62,23 @@
#define ENDNOTE 0x80000000
-ULONG MA_FASTCALL lcl_FindFtnPos( const SwDoc *pDoc, const SwTxtFtn *pAttr )
+sal_uLong MA_FASTCALL lcl_FindFtnPos( const SwDoc *pDoc, const SwTxtFtn *pAttr )
{
const SwFtnIdxs &rFtnIdxs = pDoc->GetFtnIdxs();
- USHORT nRet;
+ sal_uInt16 nRet;
SwTxtFtnPtr pBla = (SwTxtFtn*)pAttr;
if ( rFtnIdxs.Seek_Entry( pBla, &nRet ) )
{
if( pAttr->GetFtn().IsEndNote() )
- return ULONG(nRet) + ENDNOTE;
+ return sal_uLong(nRet) + ENDNOTE;
return nRet;
}
OSL_ENSURE( !pDoc, "FtnPos not found." );
return 0;
}
-BOOL SwFtnFrm::operator<( const SwTxtFtn* pTxtFtn ) const
+sal_Bool SwFtnFrm::operator<( const SwTxtFtn* pTxtFtn ) const
{
const SwDoc* pDoc = GetFmt()->GetDoc();
OSL_ENSURE( pDoc, "SwFtnFrm: Missing doc!" );
@@ -88,22 +88,22 @@ BOOL SwFtnFrm::operator<( const SwTxtFtn* pTxtFtn ) const
/*************************************************************************
|*
-|* BOOL lcl_NextFtnBoss( SwFtnBossFrm* pBoss, SwPageFrm* pPage)
+|* sal_Bool lcl_NextFtnBoss( SwFtnBossFrm* pBoss, SwPageFrm* pPage)
|* setzt pBoss auf den naechsten SwFtnBossFrm, das kann entweder eine Spalte
|* oder eine Seite (ohne Spalten) sein. Wenn die Seite dabei gewechselt wird
-|* enthaelt pPage die neue Seite und die Funktion liefert TRUE.
+|* enthaelt pPage die neue Seite und die Funktion liefert sal_True.
|*
|*************************************************************************/
-BOOL lcl_NextFtnBoss( SwFtnBossFrm* &rpBoss, SwPageFrm* &rpPage,
- BOOL bDontLeave )
+sal_Bool lcl_NextFtnBoss( SwFtnBossFrm* &rpBoss, SwPageFrm* &rpPage,
+ sal_Bool bDontLeave )
{
if( rpBoss->IsColumnFrm() )
{
if( rpBoss->GetNext() )
{
rpBoss = (SwFtnBossFrm*)rpBoss->GetNext(); //naechste Spalte
- return FALSE;
+ return sal_False;
}
if( rpBoss->IsInSct() )
{
@@ -121,7 +121,7 @@ BOOL lcl_NextFtnBoss( SwFtnBossFrm* &rpBoss, SwPageFrm* &rpPage,
{
rpPage = NULL;
rpBoss = NULL;
- return FALSE;
+ return sal_False;
}
}
}
@@ -133,20 +133,20 @@ BOOL lcl_NextFtnBoss( SwFtnBossFrm* &rpBoss, SwPageFrm* &rpPage,
if( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrm() )
rpBoss = (SwFtnBossFrm*)pBody->Lower(); // erste Spalte
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
|*
-|* USHORT lcl_ColumnNum( SwFrm* pBoss )
+|* sal_uInt16 lcl_ColumnNum( SwFrm* pBoss )
|* liefert die Spaltennummer, wenn pBoss eine Spalte ist,
|* sonst eine Null (bei Seiten).
|*
|*************************************************************************/
-USHORT lcl_ColumnNum( const SwFrm* pBoss )
+sal_uInt16 lcl_ColumnNum( const SwFrm* pBoss )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if( !pBoss->IsColumnFrm() )
return 0;
const SwFrm* pCol;
@@ -236,18 +236,18 @@ void SwFtnContFrm::Format( const SwBorderAttrs * )
SWRECTFN( this )
if ( !bValidPrtArea )
{
- bValidPrtArea = TRUE;
+ bValidPrtArea = sal_True;
(Prt().*fnRect->fnSetTop)( nBorder );
(Prt().*fnRect->fnSetWidth)( (Frm().*fnRect->fnGetWidth)() );
(Prt().*fnRect->fnSetHeight)((Frm().*fnRect->fnGetHeight)() - nBorder );
if( (Prt().*fnRect->fnGetHeight)() < 0 && !pPage->IsFtnPage() )
- bValidSize = FALSE;
+ bValidSize = sal_False;
}
if ( !bValidSize )
{
if ( pPage->IsFtnPage() && !GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
- Grow( LONG_MAX, FALSE );
+ Grow( LONG_MAX, sal_False );
else
{
//Die Groesse in der VarSize wird durch den Inhalt plus den
@@ -296,7 +296,7 @@ void SwFtnContFrm::Format( const SwBorderAttrs * )
}
}
}
- bValidSize = TRUE;
+ bValidSize = sal_True;
}
}
/*************************************************************************
@@ -305,7 +305,7 @@ void SwFtnContFrm::Format( const SwBorderAttrs * )
|*
|*************************************************************************/
-SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL )
+SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool )
{
//Keine Pruefung ob FixSize oder nicht, die FtnContainer sind immer bis
//zur Maximalhoehe variabel.
@@ -333,7 +333,7 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL )
// In a section, which has to maximize, a footnotecontainer is allowed
// to grow, when the section can't grow anymore.
if( !bTst && !pSect->IsColLocked() &&
- pSect->ToMaximize( FALSE ) && pSect->Growable() )
+ pSect->ToMaximize( sal_False ) && pSect->Growable() )
{
pSect->InvalidateSize();
return 0;
@@ -381,14 +381,15 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL )
if ( !bTst )
{
(Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() + nDist );
- if( IsVertical() && !IsReverse() )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsVertical() && !IsVertLR() && !IsReverse() )
Frm().Pos().X() -= nDist;
}
long nGrow = nDist - nAvail,
nReal = 0;
if ( nGrow > 0 )
{
- BYTE nAdjust = pBoss->NeighbourhoodAdjustment( this );
+ sal_uInt8 nAdjust = pBoss->NeighbourhoodAdjustment( this );
if( NA_ONLY_ADJUST == nAdjust )
nReal = AdjustNeighbourhood( nGrow, bTst );
else
@@ -423,7 +424,8 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL )
nDist -= nReal;
//Den masslosen Wunsch koennen wir leider nur in Grenzen erfuellen.
Frm().SSize().Height() -= nDist;
- if( IsVertical() && !IsReverse() )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsVertical() && !IsVertLR() && !IsReverse() )
Frm().Pos().X() += nDist;
}
@@ -440,7 +442,7 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL )
}
-SwTwips SwFtnContFrm::ShrinkFrm( SwTwips nDiff, BOOL bTst, BOOL bInfo )
+SwTwips SwFtnContFrm::ShrinkFrm( SwTwips nDiff, sal_Bool bTst, sal_Bool bInfo )
{
SwPageFrm *pPage = FindPageFrm();
if ( pPage &&
@@ -474,7 +476,7 @@ SwFtnFrm::SwFtnFrm( SwFrmFmt *pFmt, SwCntntFrm *pCnt, SwTxtFtn *pAt ):
pMaster( 0 ),
pRef( pCnt ),
pAttr( pAt ),
- bBackMoveLocked( FALSE ),
+ bBackMoveLocked( sal_False ),
// --> OD 2005-08-11 #i49383#
mbUnlockPosOfLowerObjs( true )
// <--
@@ -515,9 +517,9 @@ void SwFtnFrm::InvalidateNxtFtnCnts( SwPageFrm *pPage )
#if OSL_DEBUG_LEVEL > 1
-SwTwips SwFtnFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwFtnFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
- static USHORT nNum = USHRT_MAX;
+ static sal_uInt16 nNum = USHRT_MAX;
SwTxtFtn* pTxtFtn = GetAttr();
if ( pTxtFtn->GetFtn().GetNumber() == nNum )
{
@@ -529,9 +531,9 @@ SwTwips SwFtnFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
}
-SwTwips SwFtnFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwFtnFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
- static USHORT nNum = USHRT_MAX;
+ static sal_uInt16 nNum = USHRT_MAX;
if( nNum != USHRT_MAX )
{
SwTxtFtn* pTxtFtn = GetAttr();
@@ -591,7 +593,7 @@ void SwFtnFrm::Cut()
delete pUp;
// Wenn der letzte Fussnotencontainer aus einem spaltigen Bereich verschwindet,
// so kann dieser, falls er keinen Follow besitzt, zusammenschrumpfen.
- if( pSect && !pSect->ToMaximize( FALSE ) && !pSect->IsColLocked() )
+ if( pSect && !pSect->ToMaximize( sal_False ) && !pSect->IsColLocked() )
pSect->_InvalidateSize();
}
else
@@ -675,7 +677,7 @@ void SwFtnFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
|*
|* Beschreibung Liefert das naechste LayoutBlatt in den das
|* Frame gemoved werden kann.
-|* Neue Seiten werden nur dann erzeugt, wenn der Parameter TRUE ist.
+|* Neue Seiten werden nur dann erzeugt, wenn der Parameter sal_True ist.
|*
|*************************************************************************/
@@ -801,13 +803,13 @@ SwLayoutFrm *SwFrm::GetPrevFtnLeaf( MakePageType eMakeFtn )
pTmpRef = pFtn->GetRef();
SwFtnBossFrm* pStop = pTmpRef->FindFtnBossFrm( !bEndn );
- const USHORT nNum = pStop->GetPhyPageNum();
+ const sal_uInt16 nNum = pStop->GetPhyPageNum();
//Wenn die Fussnoten am Dokumentende angezeigt werden, so verlassen wir
//die Entsprechenden Seiten nicht.
//Selbiges gilt analog fuer die Endnotenseiten.
- const BOOL bEndNote = pOldPage->IsEndNotePage();
- const BOOL bFtnEndDoc = pOldPage->IsFtnPage();
+ const sal_Bool bEndNote = pOldPage->IsEndNotePage();
+ const sal_Bool bFtnEndDoc = pOldPage->IsFtnPage();
SwFtnBossFrm* pNxtBoss = pOldBoss;
SwSectionFrm *pSect = pNxtBoss->GetUpper()->IsSctFrm() ?
(SwSectionFrm*)pNxtBoss->GetUpper() : 0;
@@ -876,22 +878,22 @@ SwLayoutFrm *SwFrm::GetPrevFtnLeaf( MakePageType eMakeFtn )
if ( pRet )
{
const SwFtnBossFrm* pNewBoss = pRet->FindFtnBossFrm();
- BOOL bJump = FALSE;
+ sal_Bool bJump = sal_False;
if( pOldBoss->IsColumnFrm() && pOldBoss->GetPrev() ) // es gibt eine vorherige Spalte
bJump = pOldBoss->GetPrev() != (SwFrm*)pNewBoss; // sind wir darin gelandet?
else if( pNewBoss->IsColumnFrm() && pNewBoss->GetNext() )
- bJump = TRUE; // es gibt hinter dem neuen Boss noch eine Spalte, die aber nicht
+ bJump = sal_True; // es gibt hinter dem neuen Boss noch eine Spalte, die aber nicht
// der alte Boss sein kann, das haben wir ja bereits geprueft.
else // hier landen wir nur, wenn neuer und alter Boss entweder Seiten oder letzte (neu)
{ // bzw. erste (alt) Spalten einer Seite sind. In diesem Fall muss noch geprueft
// werden, ob Seiten ueberspringen wurden.
- USHORT nDiff = pOldPage->GetPhyPageNum() - pRet->FindPageFrm()->GetPhyPageNum();
+ sal_uInt16 nDiff = pOldPage->GetPhyPageNum() - pRet->FindPageFrm()->GetPhyPageNum();
if ( nDiff > 2 ||
(nDiff > 1 && !((SwPageFrm*)pOldPage->GetPrev())->IsEmptyPage()) )
- bJump = TRUE;
+ bJump = sal_True;
}
if( bJump )
- SwFlowFrm::SetMoveBwdJump( TRUE );
+ SwFlowFrm::SetMoveBwdJump( sal_True );
}
return pRet;
}
@@ -903,10 +905,10 @@ SwLayoutFrm *SwFrm::GetPrevFtnLeaf( MakePageType eMakeFtn )
|*************************************************************************/
-BOOL SwFrm::IsFtnAllowed() const
+sal_Bool SwFrm::IsFtnAllowed() const
{
if ( !IsInDocBody() )
- return FALSE;
+ return sal_False;
if ( IsInTab() )
{
@@ -915,7 +917,7 @@ BOOL SwFrm::IsFtnAllowed() const
if ( pTab->IsFollow() )
return !pTab->IsInHeadline( *this );
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -946,7 +948,7 @@ void SwRootFrm::UpdateFtnNums()
|*
|*************************************************************************/
-void lcl_RemoveFtns( SwFtnBossFrm* pBoss, BOOL bPageOnly, BOOL bEndNotes )
+void lcl_RemoveFtns( SwFtnBossFrm* pBoss, sal_Bool bPageOnly, sal_Bool bEndNotes )
{
do
{
@@ -1000,7 +1002,7 @@ void lcl_RemoveFtns( SwFtnBossFrm* pBoss, BOOL bPageOnly, BOOL bEndNotes )
} while( pBoss );
}
-void SwRootFrm::RemoveFtns( SwPageFrm *pPage, BOOL bPageOnly, BOOL bEndNotes )
+void SwRootFrm::RemoveFtns( SwPageFrm *pPage, sal_Bool bPageOnly, sal_Bool bEndNotes )
{
if ( !pPage )
pPage = (SwPageFrm*)Lower();
@@ -1039,7 +1041,7 @@ void SwRootFrm::RemoveFtns( SwPageFrm *pPage, BOOL bPageOnly, BOOL bEndNotes )
|*
|*************************************************************************/
-void SwRootFrm::CheckFtnPageDescs( BOOL bEndNote )
+void SwRootFrm::CheckFtnPageDescs( sal_Bool bEndNote )
{
SwPageFrm *pPage = (SwPageFrm*)Lower();
while ( pPage && !pPage->IsFtnPage() )
@@ -1047,7 +1049,7 @@ void SwRootFrm::CheckFtnPageDescs( BOOL bEndNote )
while ( pPage && pPage->IsEndNotePage() != bEndNote )
pPage = (SwPageFrm*)pPage->GetNext();
if ( pPage )
- SwFrm::CheckPageDescs( pPage, FALSE );
+ SwFrm::CheckPageDescs( pPage, sal_False );
}
@@ -1112,7 +1114,7 @@ SwFtnContFrm *SwFtnBossFrm::FindFtnCont()
|*
|*************************************************************************/
-SwFtnContFrm *SwFtnBossFrm::FindNearestFtnCont( BOOL bDontLeave )
+SwFtnContFrm *SwFtnBossFrm::FindNearestFtnCont( sal_Bool bDontLeave )
{
SwFtnContFrm *pCont = 0;
if ( GetFmt()->GetDoc()->GetFtnIdxs().Count() )
@@ -1122,10 +1124,10 @@ SwFtnContFrm *SwFtnBossFrm::FindNearestFtnCont( BOOL bDontLeave )
{
SwPageFrm *pPage = FindPageFrm();
SwFtnBossFrm* pBoss = this;
- BOOL bEndNote = pPage->IsEndNotePage();
+ sal_Bool bEndNote = pPage->IsEndNotePage();
do
{
- BOOL bChgPage = lcl_NextFtnBoss( pBoss, pPage, bDontLeave );
+ sal_Bool bChgPage = lcl_NextFtnBoss( pBoss, pPage, bDontLeave );
// Haben wir noch einen Boss gefunden? Bei einem Seitenwechsel muss
// zudem noch das EndNotenFlag uebereinstimmen
if( pBoss && ( !bChgPage || pPage->IsEndNotePage() == bEndNote ) )
@@ -1157,9 +1159,9 @@ SwFtnFrm *SwFtnBossFrm::FindFirstFtn()
//von der aktuellen Spalte (bzw. einspaltigen Seite) referenziert wird.
SwFtnFrm *pRet = (SwFtnFrm*)pCont->Lower();
- const USHORT nRefNum = FindPageFrm()->GetPhyPageNum();
- const USHORT nRefCol = lcl_ColumnNum( this );
- USHORT nPgNum, nColNum; //Seitennummer, Spaltennummer
+ const sal_uInt16 nRefNum = FindPageFrm()->GetPhyPageNum();
+ const sal_uInt16 nRefCol = lcl_ColumnNum( this );
+ sal_uInt16 nPgNum, nColNum; //Seitennummer, Spaltennummer
SwFtnBossFrm* pBoss;
SwPageFrm* pPage;
if( pRet )
@@ -1167,7 +1169,7 @@ SwFtnFrm *SwFtnBossFrm::FindFirstFtn()
pBoss = pRet->GetRef()->FindFtnBossFrm();
OSL_ENSURE( pBoss, "FindFirstFtn: No boss found" );
if( !pBoss )
- return FALSE; // ?There must be a bug, but no GPF
+ return sal_False; // ?There must be a bug, but no GPF
pPage = pBoss->FindPageFrm();
nPgNum = pPage->GetPhyPageNum();
if ( nPgNum == nRefNum )
@@ -1196,7 +1198,7 @@ SwFtnFrm *SwFtnBossFrm::FindFirstFtn()
{
pBoss = pRet->FindFtnBossFrm();
pPage = pBoss->FindPageFrm();
- lcl_NextFtnBoss( pBoss, pPage, FALSE ); // naechster FtnBoss
+ lcl_NextFtnBoss( pBoss, pPage, sal_False ); // naechster FtnBoss
pCont = pBoss ? pBoss->FindNearestFtnCont() : 0;
if ( pCont )
pNxt = (SwFtnFrm*)pCont->Lower();
@@ -1238,8 +1240,8 @@ const SwFtnFrm *SwFtnBossFrm::FindFirstFtn( SwCntntFrm *pCnt ) const
const SwFtnFrm *pRet = ((SwFtnBossFrm*)this)->FindFirstFtn();
if ( pRet )
{
- const USHORT nColNum = lcl_ColumnNum( this ); //Spaltennummer
- const USHORT nPageNum = GetPhyPageNum();
+ const sal_uInt16 nColNum = lcl_ColumnNum( this ); //Spaltennummer
+ const sal_uInt16 nPageNum = GetPhyPageNum();
while ( pRet && (pRet->GetRef() != pCnt) )
{
while ( pRet->GetFollow() )
@@ -1250,7 +1252,7 @@ const SwFtnFrm *SwFtnBossFrm::FindFirstFtn( SwCntntFrm *pCnt ) const
else
{ SwFtnBossFrm *pBoss = (SwFtnBossFrm*)pRet->FindFtnBossFrm();
SwPageFrm *pPage = pBoss->FindPageFrm();
- lcl_NextFtnBoss( pBoss, pPage, FALSE ); // naechster FtnBoss
+ lcl_NextFtnBoss( pBoss, pPage, sal_False ); // naechster FtnBoss
SwFtnContFrm *pCont = pBoss ? pBoss->FindNearestFtnCont() : 0;
pRet = pCont ? (SwFtnFrm*)pCont->Lower() : 0;
}
@@ -1283,7 +1285,7 @@ void SwFtnBossFrm::ResetFtn( const SwFtnFrm *pCheck )
SwCntntNode *pNd = aIdx.GetNode().GetCntntNode();
if ( !pNd )
pNd = pCheck->GetFmt()->GetDoc()->
- GetNodes().GoNextSection( &aIdx, TRUE, FALSE );
+ GetNodes().GoNextSection( &aIdx, sal_True, sal_False );
SwClientIter aIter( *pNd );
SwClient* pLast = aIter.GoStart();
while( pLast )
@@ -1333,7 +1335,7 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
ResetFtn( pNew );
SwFtnFrm *pSibling = FindFirstFtn();
- BOOL bDontLeave = FALSE;
+ sal_Bool bDontLeave = sal_False;
// Ok, a sibling has been found, but is the sibling in an acceptable
// environment?
@@ -1380,10 +1382,10 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
//Damit die Position herausgefunden werden kann.
SwDoc *pDoc = GetFmt()->GetDoc();
- const ULONG nStPos = ::lcl_FindFtnPos( pDoc, pNew->GetAttr() );
+ const sal_uLong nStPos = ::lcl_FindFtnPos( pDoc, pNew->GetAttr() );
- ULONG nCmpPos = 0;
- ULONG nLastPos = 0;
+ sal_uLong nCmpPos = 0;
+ sal_uLong nLastPos = 0;
SwFtnContFrm *pParent = 0;
if( pSibling )
{
@@ -1454,8 +1456,8 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
{
pNxtB = pSibling->FindFtnBossFrm();
SwPageFrm *pSibPage = pNxtB->FindPageFrm();
- BOOL bEndNote = pSibPage->IsEndNotePage();
- BOOL bChgPage = lcl_NextFtnBoss( pNxtB, pSibPage, bDontLeave );
+ sal_Bool bEndNote = pSibPage->IsEndNotePage();
+ sal_Bool bChgPage = lcl_NextFtnBoss( pNxtB, pSibPage, bDontLeave );
// Bei Seitenwechsel muss das EndNoteFlag ueberprueft werden.
SwFtnContFrm *pCont = pNxtB && ( !bChgPage ||
pSibPage->IsEndNotePage() == bEndNote )
@@ -1499,9 +1501,9 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
//dann der Vorgaenger.
SwFtnBossFrm* pBoss = pNew->GetRef()->FindFtnBossFrm(
!pNew->GetAttr()->GetFtn().IsEndNote() );
- USHORT nRefNum = pBoss->GetPhyPageNum(); // Die Seiten- und
- USHORT nRefCol = lcl_ColumnNum( pBoss ); // Spaltennummer der neuen Fussnote
- BOOL bEnd = FALSE;
+ sal_uInt16 nRefNum = pBoss->GetPhyPageNum(); // Die Seiten- und
+ sal_uInt16 nRefCol = lcl_ColumnNum( pBoss ); // Spaltennummer der neuen Fussnote
+ sal_Bool bEnd = sal_False;
SwFtnFrm *pLastSib = 0;
while ( pSibling && !bEnd && (nCmpPos <= nStPos) )
{
@@ -1516,20 +1518,20 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
{
pBoss = pSibling->GetRef()->FindFtnBossFrm( !pSibling->
GetAttr()->GetFtn().IsEndNote() );
- USHORT nTmpRef;
+ sal_uInt16 nTmpRef;
if( nStPos >= ENDNOTE ||
(nTmpRef = pBoss->GetPhyPageNum()) < nRefNum ||
( nTmpRef == nRefNum && lcl_ColumnNum( pBoss ) <= nRefCol ))
pSibling = pFoll;
else
- bEnd = TRUE;
+ bEnd = sal_True;
}
else
{
SwFtnBossFrm* pNxtB = pSibling->FindFtnBossFrm();
SwPageFrm *pSibPage = pNxtB->FindPageFrm();
- BOOL bEndNote = pSibPage->IsEndNotePage();
- BOOL bChgPage = lcl_NextFtnBoss( pNxtB, pSibPage, bDontLeave );
+ sal_Bool bEndNote = pSibPage->IsEndNotePage();
+ sal_Bool bChgPage = lcl_NextFtnBoss( pNxtB, pSibPage, bDontLeave );
// Bei Seitenwechsel muss das EndNoteFlag ueberprueft werden.
SwFtnContFrm *pCont = pNxtB && ( !bChgPage ||
pSibPage->IsEndNotePage() == bEndNote )
@@ -1537,7 +1539,7 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
if ( pCont )
pSibling = (SwFtnFrm*)pCont->Lower();
else
- bEnd = TRUE;
+ bEnd = sal_True;
}
if ( !bEnd && pSibling )
nCmpPos = ::lcl_FindFtnPos( pDoc, pSibling->GetAttr() );
@@ -1546,7 +1548,7 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
if ( (nLastPos < nCmpPos) && (nCmpPos > nStPos) )
{
pSibling = pLastSib;
- bEnd = TRUE;
+ bEnd = sal_True;
}
}
}
@@ -1567,7 +1569,7 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
{
if( ENDNOTE > nCmpPos || nStPos >= ENDNOTE )
{
- OSL_ENSURE( FALSE, "InsertFtn: Master expected II" );
+ OSL_ENSURE( sal_False, "InsertFtn: Master expected II" );
do
pSibling = pSibling->GetMaster();
while ( pSibling->GetMaster() );
@@ -1602,11 +1604,11 @@ void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr )
SwFtnBossFrm *pBoss = this;
SwPageFrm *pPage = FindPageFrm();
SwPageFrm *pMyPage = pPage;
- BOOL bChgPage = FALSE;
- BOOL bEnd = FALSE;
+ sal_Bool bChgPage = sal_False;
+ sal_Bool bEnd = sal_False;
if ( pAttr->GetFtn().IsEndNote() )
{
- bEnd = TRUE;
+ bEnd = sal_True;
if( GetUpper()->IsSctFrm() &&
((SwSectionFrm*)GetUpper())->IsEndnAtEnd() )
{
@@ -1623,15 +1625,15 @@ void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr )
while ( pPage->GetNext() && !pPage->IsEndNotePage() )
{
pPage = (SwPageFrm*)pPage->GetNext();
- bChgPage = TRUE;
+ bChgPage = sal_True;
}
if ( !pPage->IsEndNotePage() )
{
SwPageDesc *pDesc = pDoc->GetEndNoteInfo().GetPageDesc( *pDoc );
pPage = ::InsertNewPage( *pDesc, pPage->GetUpper(),
- !pPage->OnRightPage(), FALSE, TRUE, 0 );
- pPage->SetEndNotePage( TRUE );
- bChgPage = TRUE;
+ !pPage->OnRightPage(), sal_False, sal_True, 0 );
+ pPage->SetEndNotePage( sal_True );
+ bChgPage = sal_True;
}
else
{
@@ -1639,7 +1641,7 @@ void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr )
//suchen. Damit stellen wir sicher das wir auch bei hunderten
//Fussnoten noch in endlicher Zeit fertig werden.
SwPageFrm *pNxt = (SwPageFrm*)pPage->GetNext();
- const ULONG nStPos = ::lcl_FindFtnPos( pDoc, pAttr );
+ const sal_uLong nStPos = ::lcl_FindFtnPos( pDoc, pAttr );
while ( pNxt && pNxt->IsEndNotePage() )
{
SwFtnContFrm *pCont = pNxt->FindFtnCont();
@@ -1666,15 +1668,15 @@ void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr )
!((SwPageFrm*)pPage->GetNext())->IsEndNotePage() )
{
pPage = (SwPageFrm*)pPage->GetNext();
- bChgPage = TRUE;
+ bChgPage = sal_True;
}
if ( !pPage->IsFtnPage() )
{
SwPageDesc *pDesc = pDoc->GetFtnInfo().GetPageDesc( *pDoc );
pPage = ::InsertNewPage( *pDesc, pPage->GetUpper(),
- !pPage->OnRightPage(), FALSE, TRUE, pPage->GetNext() );
- bChgPage = TRUE;
+ !pPage->OnRightPage(), sal_False, sal_True, pPage->GetNext() );
+ bChgPage = sal_True;
}
else
{
@@ -1682,7 +1684,7 @@ void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr )
//suchen. Damit stellen wir sicher das wir auch bei hunderten
//Fussnoten noch in endlicher Zeit fertig werden.
SwPageFrm *pNxt = (SwPageFrm*)pPage->GetNext();
- const ULONG nStPos = ::lcl_FindFtnPos( pDoc, pAttr );
+ const sal_uLong nStPos = ::lcl_FindFtnPos( pDoc, pAttr );
while ( pNxt && pNxt->IsFtnPage() && !pNxt->IsEndNotePage() )
{
SwFtnContFrm *pCont = pNxt->FindFtnCont();
@@ -1827,7 +1829,7 @@ SwFtnFrm *SwFtnBossFrm::FindFtn( const SwCntntFrm *pRef, const SwTxtFtn *pAttr )
SwCntntNode *pNd = aIdx.GetNode().GetCntntNode();
if ( !pNd )
pNd = pRef->GetAttrSet()->GetDoc()->
- GetNodes().GoNextSection( &aIdx, TRUE, FALSE );
+ GetNodes().GoNextSection( &aIdx, sal_True, sal_False );
if ( !pNd )
return 0;
SwClientIter aIter( *pNd );
@@ -1868,7 +1870,7 @@ SwFtnFrm *SwFtnBossFrm::FindFtn( const SwCntntFrm *pRef, const SwTxtFtn *pAttr )
void SwFtnBossFrm::RemoveFtn( const SwCntntFrm *pRef, const SwTxtFtn *pAttr,
- BOOL bPrep )
+ sal_Bool bPrep )
{
SwFtnFrm *pFtn = FindFtn( pRef, pAttr );
if( pFtn )
@@ -2023,7 +2025,7 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
while ( _pFtn->GetMaster() )
_pFtn = _pFtn->GetMaster();
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
while ( _pFtn )
{
@@ -2040,7 +2042,7 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
SwPageFrm* pPage = pBoss->FindPageFrm();
do
{
- lcl_NextFtnBoss( pBoss, pPage, FALSE );
+ lcl_NextFtnBoss( pBoss, pPage, sal_False );
if( pBoss )
{
SwLayoutFrm* pCont = pBoss->FindFtnCont();
@@ -2065,7 +2067,7 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
}
if ( pNxtFtn == _pFtn )
{
- OSL_ENSURE( FALSE, "_CollectFtn: Devil's circle" );
+ OSL_ENSURE( sal_False, "_CollectFtn: Devil's circle" );
pNxtFtn = 0;
}
@@ -2116,7 +2118,7 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
}
_pFtn->Cut();
FtnInArr( _rFtnArr, _pFtn );
- bFound = TRUE;
+ bFound = sal_True;
}
else
{
@@ -2140,27 +2142,27 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef,
|*************************************************************************/
-void SwFtnBossFrm::_MoveFtns( SvPtrarr &rFtnArr, BOOL bCalc )
+void SwFtnBossFrm::_MoveFtns( SvPtrarr &rFtnArr, sal_Bool bCalc )
{
//Alle Fussnoten die von pRef referenziert werden muessen von der
//aktuellen Position, die sich durch die alte Spalte/Seite ergab, auf eine
//neue Position, bestimmt durch die neue Spalte/Seite, gemoved werden.
- const USHORT nMyNum = FindPageFrm()->GetPhyPageNum();
- const USHORT nMyCol = lcl_ColumnNum( this );
+ const sal_uInt16 nMyNum = FindPageFrm()->GetPhyPageNum();
+ const sal_uInt16 nMyCol = lcl_ColumnNum( this );
SWRECTFN( this )
// --> OD 2004-06-11 #i21478# - keep last inserted footnote in order to
// format the content of the following one.
SwFtnFrm* pLastInsertedFtn = 0L;
- for ( USHORT i = 0; i < rFtnArr.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rFtnArr.Count(); ++i )
{
SwFtnFrm *pFtn = (SwFtnFrm*)rFtnArr[i];
- SwFtnBossFrm* pRefBoss = pFtn->GetRef()->FindFtnBossFrm( TRUE );
+ SwFtnBossFrm* pRefBoss = pFtn->GetRef()->FindFtnBossFrm( sal_True );
if( pRefBoss != this )
{
- const USHORT nRefNum = pRefBoss->FindPageFrm()->GetPhyPageNum();
- const USHORT nRefCol = lcl_ColumnNum( this );
+ const sal_uInt16 nRefNum = pRefBoss->FindPageFrm()->GetPhyPageNum();
+ const sal_uInt16 nRefCol = lcl_ColumnNum( this );
if( nRefNum < nMyNum || ( nRefNum == nMyNum && nRefCol <= nMyCol ) )
pRefBoss = this;
}
@@ -2201,7 +2203,7 @@ void SwFtnBossFrm::_MoveFtns( SvPtrarr &rFtnArr, BOOL bCalc )
{
SwTxtFtn *pAttr = pFtn->GetAttr();
pCnt = pFtn->ContainsAny();
- BOOL bUnlock = !pFtn->IsBackMoveLocked();
+ sal_Bool bUnlock = !pFtn->IsBackMoveLocked();
pFtn->LockBackMove();
// --> OD 2005-05-18 #i49383# - disable unlock of position of
@@ -2295,7 +2297,7 @@ void SwFtnBossFrm::_MoveFtns( SvPtrarr &rFtnArr, BOOL bCalc )
SwTxtFtn* pAttr = pNextFtn->GetAttr();
SwFrm* pCnt = pNextFtn->ContainsAny();
- BOOL bUnlock = !pNextFtn->IsBackMoveLocked();
+ sal_Bool bUnlock = !pNextFtn->IsBackMoveLocked();
pNextFtn->LockBackMove();
// --> OD 2005-05-18 #i49383# - disable unlock of position of
// lower objects during format of footnote content.
@@ -2363,14 +2365,14 @@ void SwFtnBossFrm::MoveFtns( const SwCntntFrm *pSrc, SwCntntFrm *pDest,
|| pAttr->GetFtn().IsEndNote() )
return;
- OSL_ENSURE( this == pSrc->FindFtnBossFrm( TRUE ),
+ OSL_ENSURE( this == pSrc->FindFtnBossFrm( sal_True ),
"SwPageFrm::MoveFtns: source frame isn't on that FtnBoss" );
SwFtnFrm *pFtn = FindFirstFtn();
if( pFtn )
{
ChangeFtnRef( pSrc, pAttr, pDest );
- SwFtnBossFrm *pDestBoss = pDest->FindFtnBossFrm( TRUE );
+ SwFtnBossFrm *pDestBoss = pDest->FindFtnBossFrm( sal_True );
OSL_ENSURE( pDestBoss, "+SwPageFrm::MoveFtns: no destination boss" );
if( pDestBoss ) // robust
{
@@ -2378,7 +2380,7 @@ void SwFtnBossFrm::MoveFtns( const SwCntntFrm *pSrc, SwCntntFrm *pDest,
pDestBoss->_CollectFtns( pDest, pFtn, aFtnArr );
if ( aFtnArr.Count() )
{
- pDestBoss->_MoveFtns( aFtnArr, TRUE );
+ pDestBoss->_MoveFtns( aFtnArr, sal_True );
SwPageFrm* pSrcPage = FindPageFrm();
SwPageFrm* pDestPage = pDestBoss->FindPageFrm();
// Nur beim Seitenwechsel FtnNum Updaten
@@ -2400,7 +2402,7 @@ void SwFtnBossFrm::MoveFtns( const SwCntntFrm *pSrc, SwCntntFrm *pDest,
|*************************************************************************/
-void SwFtnBossFrm::RearrangeFtns( const SwTwips nDeadLine, const BOOL bLock,
+void SwFtnBossFrm::RearrangeFtns( const SwTwips nDeadLine, const sal_Bool bLock,
const SwTxtFtn *pAttr )
{
//Alle Fussnoten der Spalte/Seite dergestalt anformatieren,
@@ -2414,7 +2416,7 @@ void SwFtnBossFrm::RearrangeFtns( const SwTwips nDeadLine, const BOOL bLock,
SwFrm* pCntnt = pFirst->ContainsAny();
if( pCntnt )
{
- BOOL bUnlock = !pFirst->IsBackMoveLocked();
+ sal_Bool bUnlock = !pFirst->IsBackMoveLocked();
pFirst->LockBackMove();
pFirst->Calc();
pCntnt->Calc();
@@ -2431,12 +2433,12 @@ void SwFtnBossFrm::RearrangeFtns( const SwTwips nDeadLine, const BOOL bLock,
pFtn = FindFirstFtn();
}
SwDoc *pDoc = GetFmt()->GetDoc();
- const ULONG nFtnPos = pAttr ? ::lcl_FindFtnPos( pDoc, pAttr ) : 0;
+ const sal_uLong nFtnPos = pAttr ? ::lcl_FindFtnPos( pDoc, pAttr ) : 0;
SwFrm *pCnt = pFtn ? pFtn->ContainsAny() : 0;
if ( pCnt )
{
- BOOL bMore = TRUE;
- BOOL bStart = pAttr == 0; // wenn kein Attribut uebergeben wird, alle bearbeiten
+ sal_Bool bMore = sal_True;
+ sal_Bool bStart = pAttr == 0; // wenn kein Attribut uebergeben wird, alle bearbeiten
// --> OD 2005-05-18 #i49383# - disable unlock of position of
// lower objects during format of footnote and footnote content.
SwFtnFrm* pLastFtnFrm( 0L );
@@ -2511,7 +2513,7 @@ void SwFtnBossFrm::RearrangeFtns( const SwTwips nDeadLine, const BOOL bLock,
}
if ( bLock )
{
- BOOL bUnlock = !pFtnFrm->IsBackMoveLocked();
+ sal_Bool bUnlock = !pFtnFrm->IsBackMoveLocked();
pFtnFrm->LockBackMove();
pFtnFrm->Calc();
pCnt->Calc();
@@ -2586,10 +2588,10 @@ void SwFtnBossFrm::RearrangeFtns( const SwTwips nDeadLine, const BOOL bLock,
SwFtnFrm* pFtnFrm = pCnt->FindFtnFrm();
if( pFtnFrm->GetRef()->FindFtnBossFrm(
pFtnFrm->GetAttr()->GetFtn().IsEndNote() ) != this )
- bMore = FALSE;
+ bMore = sal_False;
}
else
- bMore = FALSE;
+ bMore = sal_False;
}
if( pDel )
{
@@ -2603,7 +2605,7 @@ void SwFtnBossFrm::RearrangeFtns( const SwTwips nDeadLine, const BOOL bLock,
if ( pAttr &&
(::lcl_FindFtnPos( pDoc,
pCnt->FindFtnFrm()->GetAttr()) > nFtnPos ) )
- bMore = FALSE;
+ bMore = sal_False;
}
} while ( bMore );
// --> OD 2005-05-18 #i49383#
@@ -2651,13 +2653,13 @@ void SwPageFrm::UpdateFtnNum()
return;
SwCntntFrm* pCntnt = pBody->ContainsCntnt();
- USHORT nNum = 0;
+ sal_uInt16 nNum = 0;
while( pCntnt && pCntnt->FindPageFrm() == this )
{
if( ((SwTxtFrm*)pCntnt)->HasFtn() )
{
- SwFtnBossFrm* pBoss = pCntnt->FindFtnBossFrm( TRUE );
+ SwFtnBossFrm* pBoss = pCntnt->FindFtnBossFrm( sal_True );
if( pBoss->GetUpper()->IsSctFrm() &&
((SwSectionFrm*)pBoss->GetUpper())->IsOwnFtnNum() )
pCntnt = ((SwSectionFrm*)pBoss->GetUpper())->FindLastCntnt();
@@ -2676,12 +2678,12 @@ void SwPageFrm::UpdateFtnNum()
pFtn = (SwFtnFrm*)pFtn->GetNext();
else
{
- SwFtnBossFrm* pTmpBoss = pFtn->FindFtnBossFrm( TRUE );
+ SwFtnBossFrm* pTmpBoss = pFtn->FindFtnBossFrm( sal_True );
if( pTmpBoss )
{
SwPageFrm* pPage = pTmpBoss->FindPageFrm();
pFtn = NULL;
- lcl_NextFtnBoss( pTmpBoss, pPage, FALSE );
+ lcl_NextFtnBoss( pTmpBoss, pPage, sal_False );
SwFtnContFrm *pCont = pTmpBoss->FindNearestFtnCont();
if ( pCont )
pFtn = (SwFtnFrm*)pCont->Lower();
@@ -2719,9 +2721,9 @@ void SwFtnBossFrm::SetFtnDeadLine( const SwTwips nDeadLine )
nMaxFtnHeight = -(pBody->Frm().*fnRect->fnBottomDist)( nDeadLine );
if ( GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
- nMaxFtnHeight += pBody->Grow( LONG_MAX, TRUE );
+ nMaxFtnHeight += pBody->Grow( LONG_MAX, sal_True );
if ( IsInSct() )
- nMaxFtnHeight += FindSctFrm()->Grow( LONG_MAX, TRUE );
+ nMaxFtnHeight += FindSctFrm()->Grow( LONG_MAX, sal_True );
if ( nMaxFtnHeight < 0 )
nMaxFtnHeight = 0;
@@ -2817,9 +2819,9 @@ SwTwips SwFtnBossFrm::GetVarSpace() const
|*
|*************************************************************************/
-BYTE SwFtnBossFrm::_NeighbourhoodAdjustment( const SwFrm* ) const
+sal_uInt8 SwFtnBossFrm::_NeighbourhoodAdjustment( const SwFrm* ) const
{
- BYTE nRet = NA_ONLY_ADJUST;
+ sal_uInt8 nRet = NA_ONLY_ADJUST;
if( GetUpper() && !GetUpper()->IsPageBodyFrm() )
{
// Spaltige Rahmen erfordern Grow/Shrink
@@ -2872,22 +2874,22 @@ void SwPageFrm::SetColMaxFtnHeight()
|*************************************************************************/
-BOOL SwLayoutFrm::MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
- SwFtnBossFrm *pNewBoss, const BOOL bFtnNums )
+sal_Bool SwLayoutFrm::MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
+ SwFtnBossFrm *pNewBoss, const sal_Bool bFtnNums )
{
SwDoc *pDoc = GetFmt()->GetDoc();
if ( !pDoc->GetFtnIdxs().Count() )
- return FALSE;
+ return sal_False;
if( pDoc->GetFtnInfo().ePos == FTNPOS_CHAPTER &&
( !IsInSct() || !FindSctFrm()->IsFtnAtEnd() ) )
- return TRUE;
+ return sal_True;
if ( !pNewBoss )
- pNewBoss = FindFtnBossFrm( TRUE );
+ pNewBoss = FindFtnBossFrm( sal_True );
if ( pNewBoss == pOldBoss )
- return FALSE;
+ return sal_False;
- BOOL bMoved = FALSE;
+ sal_Bool bMoved = sal_False;
if( !pStart )
pStart = ContainsCntnt();
@@ -2916,8 +2918,8 @@ BOOL SwLayoutFrm::MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
!= ( pNewChief = pNewBoss->FindSctFrm() ) )
{
pFtnArr = new SvPtrarr( 5, 5 );
- pOldChief = pOldBoss->FindFtnBossFrm( TRUE );
- pNewChief = pNewBoss->FindFtnBossFrm( TRUE );
+ pOldChief = pOldBoss->FindFtnBossFrm( sal_True );
+ pNewChief = pNewBoss->FindFtnBossFrm( sal_True );
while( pOldChief->IsAnLower( pStart ) )
{
if ( ((SwTxtFrm*)pStart)->HasFtn() )
@@ -2937,13 +2939,13 @@ BOOL SwLayoutFrm::MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
if ( aFtnArr.Count() || pFtnArr )
{
if( aFtnArr.Count() )
- pNewBoss->_MoveFtns( aFtnArr, TRUE );
+ pNewBoss->_MoveFtns( aFtnArr, sal_True );
if( pFtnArr )
{
- ((SwFtnBossFrm*)pNewChief)->_MoveFtns( *pFtnArr, TRUE );
+ ((SwFtnBossFrm*)pNewChief)->_MoveFtns( *pFtnArr, sal_True );
delete pFtnArr;
}
- bMoved = TRUE;
+ bMoved = sal_True;
// Nur bei einem Seitenwechsel muss die FtnNum neu berechnet werden
if ( bFtnNums )
@@ -2967,7 +2969,7 @@ BOOL SwLayoutFrm::MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss,
|*************************************************************************/
-BOOL SwCntntFrm::MoveFtnCntFwd( BOOL bMakePage, SwFtnBossFrm *pOldBoss )
+sal_Bool SwCntntFrm::MoveFtnCntFwd( sal_Bool bMakePage, SwFtnBossFrm *pOldBoss )
{
OSL_ENSURE( IsInFtn(), "Keine Ftn." );
SwLayoutFrm *pFtn = FindFtnFrm();
@@ -2980,7 +2982,7 @@ BOOL SwCntntFrm::MoveFtnCntFwd( BOOL bMakePage, SwFtnBossFrm *pOldBoss )
{
SwLayoutFrm* pBody = pOldBoss->FindBodyCont();
if( !pBody || !pBody->Lower() )
- return TRUE;
+ return sal_True;
}
//fix(9538): Wenn die Ftn noch Nachbarn hinter sich hat, so muessen
@@ -2997,21 +2999,21 @@ BOOL SwCntntFrm::MoveFtnCntFwd( BOOL bMakePage, SwFtnBossFrm *pOldBoss )
{ pLst = pNxt;
SwCntntFrm *pCnt = pNxt->ContainsCntnt();
if( pCnt )
- pCnt->MoveFtnCntFwd( TRUE, pOldBoss );
+ pCnt->MoveFtnCntFwd( sal_True, pOldBoss );
pNxt = (SwLayoutFrm*)pFtn->GetNext();
}
}
- BOOL bSamePage = TRUE;
+ sal_Bool bSamePage = sal_True;
SwLayoutFrm *pNewUpper =
- GetLeaf( bMakePage ? MAKEPAGE_INSERT : MAKEPAGE_NONE, TRUE );
+ GetLeaf( bMakePage ? MAKEPAGE_INSERT : MAKEPAGE_NONE, sal_True );
if ( pNewUpper )
{
- BOOL bSameBoss = TRUE;
+ sal_Bool bSameBoss = sal_True;
SwFtnBossFrm * const pNewBoss = pNewUpper->FindFtnBossFrm();
//Wechseln wir die Spalte/Seite?
- if ( FALSE == ( bSameBoss = pNewBoss == pOldBoss ) )
+ if ( sal_False == ( bSameBoss = pNewBoss == pOldBoss ) )
{
bSamePage = pOldBoss->FindPageFrm() == pNewBoss->FindPageFrm(); // Seitenwechsel?
pNewUpper->Calc();
@@ -3064,7 +3066,7 @@ BOOL SwCntntFrm::MoveFtnCntFwd( BOOL bMakePage, SwFtnBossFrm *pOldBoss )
pNewUp = (SwSectionFrm*)pTmpFtn->Lower();
else
{
- pNewUp = new SwSectionFrm( *pSect, FALSE );
+ pNewUp = new SwSectionFrm( *pSect, sal_False );
pNewUp->InsertBefore( pTmpFtn, pTmpFtn->Lower() );
static_cast<SwSectionFrm*>(pNewUp)->Init();
pNewUp->Frm().Pos() = pTmpFtn->Frm().Pos();
@@ -3165,7 +3167,7 @@ SwCntntFrm* SwFtnFrm::GetRefFromAttr()
OSL_ENSURE( pAttr, "invalid Attribute" );
SwTxtNode& rTNd = (SwTxtNode&)pAttr->GetTxtNode();
SwPosition aPos( rTNd, SwIndex( &rTNd, *pAttr->GetStart() ));
- SwCntntFrm* pCFrm = rTNd.GetFrm( 0, &aPos, FALSE );
+ SwCntntFrm* pCFrm = rTNd.GetFrm( 0, &aPos, sal_False );
return pCFrm;
}
diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx
index 6810499363a2..298761e901e1 100644
--- a/sw/source/core/layout/hffrm.cxx
+++ b/sw/source/core/layout/hffrm.cxx
@@ -50,7 +50,7 @@
#include <objectformatter.hxx>
// <--
-extern BOOL bObjsDirect; //frmtool.cxx
+extern sal_Bool bObjsDirect; //frmtool.cxx
static SwTwips lcl_GetFrmMinHeight(const SwLayoutFrm & rFrm)
{
@@ -78,7 +78,7 @@ static SwTwips lcl_CalcContentHeight(SwLayoutFrm & frm)
SwFrm* pFrm = frm.Lower();
SwTwips nRemaining = 0;
- USHORT nNum = 0;
+ sal_uInt16 nNum = 0;
pFrm = frm.Lower();
while ( pFrm )
{
@@ -117,20 +117,20 @@ static void lcl_LayoutFrmEnsureMinHeight(SwLayoutFrm & rFrm,
}
}
-SwHeadFootFrm::SwHeadFootFrm( SwFrmFmt * pFmt, USHORT nTypeIn)
+SwHeadFootFrm::SwHeadFootFrm( SwFrmFmt * pFmt, sal_uInt16 nTypeIn)
: SwLayoutFrm(pFmt)
{
nType = nTypeIn;
- SetDerivedVert( FALSE );
+ SetDerivedVert( sal_False );
const SwFmtCntnt &rCnt = pFmt->GetCntnt();
OSL_ENSURE( rCnt.GetCntntIdx(), "Kein Inhalt fuer Header." );
//Fuer Header Footer die Objekte gleich erzeugen lassen.
- BOOL bOld = bObjsDirect;
- bObjsDirect = TRUE;
- ULONG nIndex = rCnt.GetCntntIdx()->GetIndex();
+ sal_Bool bOld = bObjsDirect;
+ bObjsDirect = sal_True;
+ sal_uLong nIndex = rCnt.GetCntntIdx()->GetIndex();
::_InsertCnt( this, pFmt->GetDoc(), ++nIndex );
bObjsDirect = bOld;
}
@@ -232,7 +232,7 @@ void SwHeadFootFrm::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs)
}
- bValidPrtArea = TRUE;
+ bValidPrtArea = sal_True;
}
void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
@@ -241,7 +241,7 @@ void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
{
if( !IsColLocked() )
{
- bValidSize = bValidPrtArea = TRUE;
+ bValidSize = bValidPrtArea = sal_True;
const SwTwips nBorder = nUL;
SwTwips nMinHeight = lcl_GetFrmMinHeight(*this);
@@ -397,11 +397,11 @@ void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
Prt().SSize().Height() = Frm().Height() - nBorder;
}
}
- bValidSize = bValidPrtArea = TRUE;
+ bValidSize = bValidPrtArea = sal_True;
} while( nRemaining<=nMaxHeight && nOldHeight!=Prt().Height() );
ColUnlock();
}
- bValidSize = bValidPrtArea = TRUE;
+ bValidSize = bValidPrtArea = sal_True;
}
else //if ( GetType() & 0x0018 )
{
@@ -409,7 +409,7 @@ void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
{
if ( Frm().Height() != pAttrs->GetSize().Height() )
ChgSize( Size( Frm().Width(), pAttrs->GetSize().Height()));
- bValidSize = TRUE;
+ bValidSize = sal_True;
MakePos();
} while ( !bValidSize );
}
@@ -440,7 +440,7 @@ void SwHeadFootFrm::Format(const SwBorderAttrs * pAttrs)
}
}
-SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
SwTwips nResult;
@@ -542,7 +542,7 @@ SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
return nResult;
}
-SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
SwTwips nResult;
@@ -658,15 +658,15 @@ SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
return nResult;
}
-BOOL SwHeadFootFrm::GetEatSpacing() const
+sal_Bool SwHeadFootFrm::GetEatSpacing() const
{
const SwFrmFmt * pFmt = GetFmt();
OSL_ENSURE(pFmt, "SwHeadFootFrm: no format?");
if (pFmt->GetHeaderAndFooterEatSpacing().GetValue())
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
@@ -708,7 +708,7 @@ void SwPageFrm::PrepareHeader()
const SwFmtHeader &rH = ((SwFrmFmt*)pRegisteredIn)->GetHeader();
- const BOOL bOn = !((SwFrmFmt*)pRegisteredIn)->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_Bool bOn = !((SwFrmFmt*)pRegisteredIn)->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
if ( bOn && rH.IsActive() )
{ //Header einsetzen, vorher entfernen falls vorhanden.
@@ -756,7 +756,7 @@ void SwPageFrm::PrepareFooter()
while ( pLay->GetNext() )
pLay = (SwLayoutFrm*)pLay->GetNext();
- const BOOL bOn = !((SwFrmFmt*)pRegisteredIn)->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_Bool bOn = !((SwFrmFmt*)pRegisteredIn)->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
if ( bOn && rF.IsActive() )
{ //Footer einsetzen, vorher entfernen falls vorhanden.
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 36cff8b6a06e..0770717b258d 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -152,7 +152,7 @@ static void BreakPoint()
} \
}
-inline ULONG Ticks()
+inline sal_uLong Ticks()
{
return 1000 * clock() / CLOCKS_PER_SEC;
}
@@ -163,7 +163,7 @@ void SwLayAction::CheckWaitCrsr()
if ( !IsWait() && IsWaitAllowed() && IsPaint() &&
((Ticks() - GetStartTicks()) >= CLOCKS_PER_SEC/2) )
{
- pWait = new SwWait( *pRoot->GetFmt()->GetDoc()->GetDocShell(), TRUE );
+ pWait = new SwWait( *pRoot->GetFmt()->GetDoc()->GetDocShell(), sal_True );
}
}
@@ -184,7 +184,7 @@ inline void SwLayAction::CheckIdleEnd()
|* SwLayAction::SetStatBar()
|*
|*************************************************************************/
-void SwLayAction::SetStatBar( BOOL bNew )
+void SwLayAction::SetStatBar( sal_Bool bNew )
{
if ( bNew )
{
@@ -205,13 +205,13 @@ void SwLayAction::SetStatBar( BOOL bNew )
|* PaintCntnt: fuellt die Region,
|*
|*************************************************************************/
-BOOL SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwCntntFrm *pCnt,
+sal_Bool SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwCntntFrm *pCnt,
const SwPageFrm *pPage )
{
SwRegionRects aTmp( rRect );
const SwSortedObjs &rObjs = *pPage->GetSortedObjs();
const SwFlyFrm *pSelfFly = pCnt->FindFlyFrm();
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < rObjs.Count() && aTmp.Count(); ++i )
{
@@ -248,7 +248,7 @@ BOOL SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwCntntFrm *pCnt,
}
else
{
- const BOOL bLowerOfSelf = pFly->IsLowerOf( pSelfFly );
+ const sal_Bool bLowerOfSelf = pFly->IsLowerOf( pSelfFly );
if ( !bLowerOfSelf && !pFly->GetFmt()->GetOpaque().GetValue() )
//Aus anderem Layer interessieren uns nur nicht transparente
//oder innenliegende
@@ -281,14 +281,14 @@ BOOL SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwCntntFrm *pCnt,
aTmp -= pFly->Frm();
}
- BOOL bRetPaint = FALSE;
+ sal_Bool bRetPaint = sal_False;
const SwRect *pData = aTmp.GetData();
for ( i = 0; i < aTmp.Count(); ++pData, ++i )
bRetPaint |= pImp->GetShell()->AddPaintRect( *pData );
return bRetPaint;
}
-inline BOOL SwLayAction::_PaintCntnt( const SwCntntFrm *pCntnt,
+inline sal_Bool SwLayAction::_PaintCntnt( const SwCntntFrm *pCntnt,
const SwPageFrm *pPage,
const SwRect &rRect )
{
@@ -299,7 +299,7 @@ inline BOOL SwLayAction::_PaintCntnt( const SwCntntFrm *pCntnt,
else
return pImp->GetShell()->AddPaintRect( rRect );
}
- return FALSE;
+ return sal_False;
}
void SwLayAction::PaintCntnt( const SwCntntFrm *pCnt,
@@ -325,7 +325,7 @@ void SwLayAction::PaintCntnt( const SwCntntFrm *pCnt,
if( bHeightDiff )
{
// OD 05.11.2002 #94454# - consider whole potential paint area.
- //SwRect aDrawRect( pCnt->UnionFrm( TRUE ) );
+ //SwRect aDrawRect( pCnt->UnionFrm( sal_True ) );
SwRect aDrawRect( pCnt->PaintArea() );
if( nOldHeight > nNewHeight )
nOldBottom = (pCnt->*fnRect->fnGetPrtBottom)();
@@ -371,9 +371,9 @@ SwLayAction::SwLayAction( SwRootFrm *pRt, SwViewImp *pI ) :
nCheckPageNum( USHRT_MAX )
{
bPaintExtraData = ::IsExtraData( pImp->GetShell()->GetDoc() );
- bPaint = bComplete = bWaitAllowed = bCheckPages = TRUE;
+ bPaint = bComplete = bWaitAllowed = bCheckPages = sal_True;
bInput = bAgain = bNextCycle = bCalcLayout = bIdle = bReschedule =
- bUpdateExpFlds = bBrowseActionStop = bActionInProgress = FALSE;
+ bUpdateExpFlds = bBrowseActionStop = bActionInProgress = sal_False;
// OD 14.04.2003 #106346# - init new flag <mbFormatCntntOnInterrupt>.
mbFormatCntntOnInterrupt = sal_False;
@@ -397,9 +397,9 @@ void SwLayAction::Reset()
nStartTicks = Ticks();
nInputType = 0;
nEndPage = nPreInvaPage = nCheckPageNum = USHRT_MAX;
- bPaint = bComplete = bWaitAllowed = bCheckPages = TRUE;
+ bPaint = bComplete = bWaitAllowed = bCheckPages = sal_True;
bInput = bAgain = bNextCycle = bCalcLayout = bIdle = bReschedule =
- bUpdateExpFlds = bBrowseActionStop = FALSE;
+ bUpdateExpFlds = bBrowseActionStop = sal_False;
}
/*************************************************************************
@@ -408,11 +408,11 @@ void SwLayAction::Reset()
|*
|*************************************************************************/
-BOOL SwLayAction::RemoveEmptyBrowserPages()
+sal_Bool SwLayAction::RemoveEmptyBrowserPages()
{
//Beim umschalten vom normalen in den Browsermodus bleiben u.U. einige
//unangenehm lange stehen. Diese beseiten wir mal schnell.
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( pRoot->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
{
SwPageFrm *pPage = (SwPageFrm*)pRoot->Lower();
@@ -423,7 +423,7 @@ BOOL SwLayAction::RemoveEmptyBrowserPages()
pPage = (SwPageFrm*)pPage->GetNext();
else
{
- bRet = TRUE;
+ bRet = sal_True;
SwPageFrm *pDel = pPage;
pPage = (SwPageFrm*)pPage->GetNext();
pDel->Cut();
@@ -442,14 +442,14 @@ BOOL SwLayAction::RemoveEmptyBrowserPages()
|*************************************************************************/
void SwLayAction::Action()
{
- bActionInProgress = TRUE;
+ bActionInProgress = sal_True;
//TurboMode? Disqualifiziert fuer Idle-Format.
if ( IsPaint() && !IsIdle() && TurboAction() )
{
delete pWait, pWait = 0;
pRoot->ResetTurboFlag();
- bActionInProgress = FALSE;
+ bActionInProgress = sal_False;
pRoot->DeleteEmptySct();
return;
}
@@ -463,13 +463,13 @@ void SwLayAction::Action()
pRoot->DisallowTurbo();
if ( IsCalcLayout() )
- SetCheckPages( FALSE );
+ SetCheckPages( sal_False );
InternalAction();
bAgain |= RemoveEmptyBrowserPages();
while ( IsAgain() )
{
- bAgain = bNextCycle = FALSE;
+ bAgain = bNextCycle = sal_False;
InternalAction();
bAgain |= RemoveEmptyBrowserPages();
}
@@ -481,20 +481,20 @@ void SwLayAction::Action()
pRoot->ResetTurboFlag();
pRoot->ResetTurbo();
- SetCheckPages( TRUE );
+ SetCheckPages( sal_True );
- bActionInProgress = FALSE;
+ bActionInProgress = sal_False;
}
SwPageFrm* SwLayAction::CheckFirstVisPage( SwPageFrm *pPage )
{
SwCntntFrm *pCnt = pPage->FindFirstBodyCntnt();
SwCntntFrm *pChk = pCnt;
- BOOL bPageChgd = FALSE;
+ sal_Bool bPageChgd = sal_False;
while ( pCnt && pCnt->IsFollow() )
pCnt = static_cast<SwCntntFrm*>(pCnt)->FindMaster();
if ( pCnt && pChk != pCnt )
- { bPageChgd = TRUE;
+ { bPageChgd = sal_True;
pPage = pCnt->FindPageFrm();
}
@@ -581,14 +581,14 @@ void SwLayAction::InternalAction()
//Cntnt's
if ( !IsComplete() )
pPage = CheckFirstVisPage( pPage );
- USHORT nFirstPageNum = pPage->GetPhyPageNum();
+ sal_uInt16 nFirstPageNum = pPage->GetPhyPageNum();
while ( pPage && !pPage->IsInvalid() && !pPage->IsInvalidFly() )
pPage = (SwPageFrm*)pPage->GetNext();
IDocumentLayoutAccess *pLayoutAccess = pRoot->GetFmt()->getIDocumentLayoutAccess();
- BOOL bNoLoop = pPage ? SwLayouter::StartLoopControl( pRoot->GetFmt()->GetDoc(), pPage ) : FALSE;
- USHORT nPercentPageNum = 0;
+ sal_Bool bNoLoop = pPage ? SwLayouter::StartLoopControl( pRoot->GetFmt()->GetDoc(), pPage ) : sal_False;
+ sal_uInt16 nPercentPageNum = 0;
while ( (pPage && !IsInterrupt()) || nCheckPageNum != USHRT_MAX )
{
if ( !pPage && nCheckPageNum != USHRT_MAX &&
@@ -606,9 +606,9 @@ void SwLayAction::InternalAction()
}
SwPageFrm *pTmp = pPage->GetPrev() ?
(SwPageFrm*)pPage->GetPrev() : pPage;
- SetCheckPages( TRUE );
+ SetCheckPages( sal_True );
SwFrm::CheckPageDescs( pPage );
- SetCheckPages( FALSE );
+ SetCheckPages( sal_False );
nCheckPageNum = USHRT_MAX;
pPage = pTmp;
continue;
@@ -632,7 +632,7 @@ void SwLayAction::InternalAction()
pRoot->AssertFlyPages();
if ( pRoot->IsSuperfluous() )
{
- BOOL bOld = IsAgain();
+ sal_Bool bOld = IsAgain();
pRoot->RemoveSuperfluous();
bAgain = bOld;
}
@@ -683,8 +683,8 @@ void SwLayAction::InternalAction()
XCHECKPAGE;
// FME 2007-08-30 #i81146# new loop control
- USHORT nLoopControlRuns_1 = 0;
- const USHORT nLoopControlMax = 20;
+ sal_uInt16 nLoopControlRuns_1 = 0;
+ const sal_uInt16 nLoopControlMax = 20;
while ( !IsNextCycle() && pPage->IsInvalidLayout() )
{
@@ -723,7 +723,7 @@ void SwLayAction::InternalAction()
pPage->InvalidateFlyCntnt();
// <--
if ( IsBrowseActionStop() )
- bInput = TRUE;
+ bInput = sal_True;
}
}
if( bNoLoop )
@@ -744,7 +744,7 @@ void SwLayAction::InternalAction()
}
if ( !IsInterrupt() )
{
- SetNextCycle( FALSE );
+ SetNextCycle( sal_False );
if ( nPreInvaPage != USHRT_MAX )
{
@@ -792,7 +792,7 @@ void SwLayAction::InternalAction()
pRoot->AssertFlyPages();
if ( pRoot->IsSuperfluous() )
{
- BOOL bOld = IsAgain();
+ sal_Bool bOld = IsAgain();
pRoot->RemoveSuperfluous();
bAgain = bOld;
}
@@ -852,8 +852,8 @@ void SwLayAction::InternalAction()
XCHECKPAGE;
// FME 2007-08-30 #i81146# new loop control
- USHORT nLoopControlRuns_2 = 0;
- const USHORT nLoopControlMax = 20;
+ sal_uInt16 nLoopControlRuns_2 = 0;
+ const sal_uInt16 nLoopControlMax = 20;
// OD 14.04.2003 #106346# - special case: interrupt content formatting
// --> OD 2004-07-08 #i28701# - conditions, introduced by #106346#,
@@ -879,7 +879,7 @@ void SwLayAction::InternalAction()
// <--
// FME 2007-08-30 #i81146# new loop control
- USHORT nLoopControlRuns_3 = 0;
+ sal_uInt16 nLoopControlRuns_3 = 0;
while ( pPg->IsInvalidLayout() )
{
@@ -952,13 +952,13 @@ void SwLayAction::InternalAction()
|* SwLayAction::TurboAction(), _TurboAction()
|*
|*************************************************************************/
-BOOL SwLayAction::_TurboAction( const SwCntntFrm *pCnt )
+sal_Bool SwLayAction::_TurboAction( const SwCntntFrm *pCnt )
{
const SwPageFrm *pPage = 0;
if ( !pCnt->IsValid() || pCnt->IsCompletePaint() || pCnt->IsRetouche() )
{
- const SwRect aOldRect( pCnt->UnionFrm( TRUE ) );
+ const SwRect aOldRect( pCnt->UnionFrm( sal_True ) );
const long nOldBottom = pCnt->Frm().Top() + pCnt->Prt().Bottom();
pCnt->Calc();
if ( pCnt->Frm().Bottom() < aOldRect.Bottom() )
@@ -969,7 +969,7 @@ BOOL SwLayAction::_TurboAction( const SwCntntFrm *pCnt )
if ( !pCnt->GetValidLineNumFlag() && pCnt->IsTxtFrm() )
{
- const ULONG nAllLines = ((SwTxtFrm*)pCnt)->GetAllLines();
+ const sal_uLong nAllLines = ((SwTxtFrm*)pCnt)->GetAllLines();
((SwTxtFrm*)pCnt)->RecalcAllLines();
if ( nAllLines != ((SwTxtFrm*)pCnt)->GetAllLines() )
{
@@ -987,11 +987,11 @@ BOOL SwLayAction::_TurboAction( const SwCntntFrm *pCnt )
if ( pNxt )
pNxt->InvalidatePage();
}
- return FALSE;
+ return sal_False;
}
if ( pPage->IsInvalidLayout() || (IS_FLYS && IS_INVAFLY) )
- return FALSE;
+ return sal_False;
}
if ( !pPage )
pPage = pCnt->FindPageFrm();
@@ -1001,29 +1001,29 @@ BOOL SwLayAction::_TurboAction( const SwCntntFrm *pCnt )
!SwObjectFormatter::FormatObjsAtFrm( *(const_cast<SwCntntFrm*>(pCnt)),
*pPage, this ) )
{
- return FALSE;
+ return sal_False;
}
if ( pPage->IsInvalidCntnt() )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
-BOOL SwLayAction::TurboAction()
+sal_Bool SwLayAction::TurboAction()
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if ( pRoot->GetTurbo() )
{
if ( !_TurboAction( pRoot->GetTurbo() ) )
{
CheckIdleEnd();
- bRet = FALSE;
+ bRet = sal_False;
}
pRoot->ResetTurbo();
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
/*************************************************************************
@@ -1045,7 +1045,7 @@ static bool lcl_IsInvaLay( const SwFrm *pFrm, long nBottom )
{
if (
!pFrm->IsValid() ||
- (pFrm->IsCompletePaint() && pFrm->Frm().Top() < nBottom)
+ (pFrm->IsCompletePaint() && ( pFrm->Frm().Top() < nBottom ) )
)
{
return true;
@@ -1091,7 +1091,7 @@ static const SwFrm *lcl_FindFirstInvaCntnt( const SwLayoutFrm *pLay, long nBotto
if ( pCnt->GetDrawObjs() )
{
const SwSortedObjs &rObjs = *pCnt->GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
const SwAnchoredObject* pObj = rObjs[i];
if ( pObj->ISA(SwFlyFrm) )
@@ -1127,7 +1127,7 @@ static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage,
{
OSL_ENSURE( _pPage->GetSortedObjs(), "FindFirstInvaObj, no Objs" );
- for ( USHORT i = 0; i < _pPage->GetSortedObjs()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < _pPage->GetSortedObjs()->Count(); ++i )
{
const SwAnchoredObject* pObj = (*_pPage->GetSortedObjs())[i];
if ( pObj->ISA(SwFlyFrm) )
@@ -1156,10 +1156,10 @@ static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage,
}
// <--
-BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
+sal_Bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
{
- BOOL bRet = FALSE;
- const BOOL bBrowse = pRoot->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ sal_Bool bRet = sal_False;
+ const sal_Bool bBrowse = pRoot->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
//Wenn die Seite nicht Gueltig ist wird sie schnell formatiert, sonst
//gibts nix als Aerger.
@@ -1170,7 +1170,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
/// OD 15.10.2002 #103517# - format complete page
/// Thus, loop on all lowers of the page <prPage>, instead of only
/// format its first lower.
- /// NOTE: In online layout (bBrowse == TRUE) a page can contain
+ /// NOTE: In online layout (bBrowse == sal_True) a page can contain
/// a header frame and/or a footer frame beside the body frame.
prPage->Calc();
SwFrm* pPageLowerFrm = prPage->Lower();
@@ -1183,7 +1183,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
else
FormatLayout( prPage );
if ( IsAgain() )
- return FALSE;
+ return sal_False;
}
@@ -1191,7 +1191,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
if ( (prPage->Frm().Top() >= rVis.Bottom()) ||
(prPage->Frm().Left()>= rVis.Right()) )
{
- bRet = TRUE;
+ bRet = sal_True;
//Jetzt wird es ein bischen unangenehm: Der erste CntntFrm dieser Seite
//im Bodytext muss Formatiert werden, wenn er dabei die Seite
@@ -1224,7 +1224,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
}
if ( pCntnt )
{
- BOOL bTstCnt = TRUE;
+ sal_Bool bTstCnt = sal_True;
if ( bBrowse )
{
//Der Cnt davor schon nicht mehr sichtbar?
@@ -1238,7 +1238,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
(pLst->Frm().Top() >= rVis.Bottom() ||
pLst->Frm().Left()>= rVis.Right()) )
{
- bTstCnt = FALSE;
+ bTstCnt = sal_False;
}
}
@@ -1257,7 +1257,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
pSct->Calc();
pSct->SetCompletePaint();
if ( IsAgain() )
- return FALSE;
+ return sal_False;
// --> OD 2004-06-04 #i27756#
bPageChg = pCntnt->FindPageFrm() != p2ndPage &&
prPage->GetPrev();
@@ -1269,7 +1269,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
pCntnt->Calc();
pCntnt->SetCompletePaint();
if ( IsAgain() )
- return FALSE;
+ return sal_False;
// --> OD 2004-06-04 #i27756#
bPageChg = pCntnt->FindPageFrm() != p2ndPage &&
prPage->GetPrev();
@@ -1283,7 +1283,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
pTab->Calc();
pTab->SetCompletePaint();
if ( IsAgain() )
- return FALSE;
+ return sal_False;
// --> OD 2004-06-04 #i27756#
bPageChg = pCntnt->FindPageFrm() != p2ndPage &&
prPage->GetPrev();
@@ -1298,7 +1298,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
pSct->Calc();
pSct->SetCompletePaint();
if ( IsAgain() )
- return FALSE;
+ return sal_False;
// --> OD 2004-06-04 #i27756#
bPageChg = pCntnt->FindPageFrm() != p2ndPage &&
prPage->GetPrev();
@@ -1308,7 +1308,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
// --> OD 2004-06-04 #i27756#
if ( bPageChg )
{
- bRet = FALSE;
+ bRet = sal_False;
const SwPageFrm* pTmp = pCntnt->FindPageFrm();
if ( pTmp->GetPhyPageNum() < prPage->GetPhyPageNum() &&
pTmp->IsInvalid() )
@@ -1335,7 +1335,7 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
SwAnchoredObject* pObj = (*pObjs)[i];
if ( pObj->GetAnchorFrmContainingAnchPos() == pCntnt )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -1355,22 +1355,22 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
0 != (pObj = lcl_FindFirstInvaObj( prPage, nBottom )) &&
pObj->GetObjRect().Top() <= nBottom )
{
- return FALSE;
+ return sal_False;
}
const SwFrm* pFrm( 0L );
if ( prPage->IsInvalidLayout() &&
0 != (pFrm = lcl_FindFirstInvaLay( prPage, nBottom )) &&
pFrm->Frm().Top() <= nBottom )
{
- return FALSE;
+ return sal_False;
}
if ( (prPage->IsInvalidCntnt() || prPage->IsInvalidFlyInCnt()) &&
0 != (pFrm = lcl_FindFirstInvaCntnt( prPage, nBottom, 0 )) &&
pFrm->Frm().Top() <= nBottom )
{
- return FALSE;
+ return sal_False;
}
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
@@ -1381,14 +1381,14 @@ BOOL SwLayAction::IsShortCut( SwPageFrm *&prPage )
|*
|*************************************************************************/
// OD 15.11.2002 #105155# - introduce support for vertical layout
-BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect )
+sal_Bool SwLayAction::FormatLayout( SwLayoutFrm *pLay, sal_Bool bAddRect )
{
OSL_ENSURE( !IsAgain(), "Ungueltige Seite beachten." );
if ( IsAgain() )
- return FALSE;
+ return sal_False;
- BOOL bChanged = FALSE;
- BOOL bAlreadyPainted = FALSE;
+ sal_Bool bChanged = sal_False;
+ sal_Bool bAlreadyPainted = sal_False;
// OD 11.11.2002 #104414# - remember frame at complete paint
SwRect aFrmAtCompletePaint;
@@ -1400,9 +1400,9 @@ BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect )
SwRect aOldRect( pLay->Frm() );
pLay->Calc();
if ( aOldRect != pLay->Frm() )
- bChanged = TRUE;
+ bChanged = sal_True;
- BOOL bNoPaint = FALSE;
+ sal_Bool bNoPaint = sal_False;
if ( pLay->IsPageBodyFrm() &&
pLay->Frm().Pos() == aOldRect.Pos() &&
pLay->Lower() &&
@@ -1415,7 +1415,7 @@ BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect )
if ( !( pLay->IsCompletePaint() &&
pLay->FindPageFrm()->FindFtnCont() ) )
{
- bNoPaint = TRUE;
+ bNoPaint = sal_True;
}
}
@@ -1461,11 +1461,11 @@ BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect )
if ( pLay->IsCompletePaint() )
{
pImp->GetShell()->AddPaintRect( aPaint );
- bAddRect = FALSE;
+ bAddRect = sal_False;
}
else
{
- USHORT i;
+ sal_uInt16 i;
SwRegionRects aRegion( aOldRect );
aRegion -= aPaint;
@@ -1483,7 +1483,7 @@ BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect )
else
{
pImp->GetShell()->AddPaintRect( aPaint );
- bAlreadyPainted = TRUE;
+ bAlreadyPainted = sal_True;
// OD 11.11.2002 #104414# - remember frame at complete paint
aFrmAtCompletePaint = pLay->Frm();
}
@@ -1546,12 +1546,12 @@ BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect )
}
if( bAlreadyPainted )
- bAddRect = FALSE;
+ bAddRect = sal_False;
CheckWaitCrsr();
if ( IsAgain() )
- return FALSE;
+ return sal_False;
//Jetzt noch diejenigen Lowers versorgen die LayoutFrm's sind
@@ -1559,7 +1559,7 @@ BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect )
return bChanged;
SwFrm *pLow = pLay->Lower();
- BOOL bTabChanged = FALSE;
+ sal_Bool bTabChanged = sal_False;
while ( pLow && pLow->GetUpper() == pLay )
{
if ( pLow->IsLayoutFrm() )
@@ -1576,7 +1576,7 @@ BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect )
pLow->OptCalc();
if ( IsAgain() )
- return FALSE;
+ return sal_False;
pLow = pLow->GetNext();
}
// OD 11.11.2002 #104414# - add complete frame area as paint area, if frame
@@ -1592,14 +1592,14 @@ BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect )
return bChanged || bTabChanged;
}
-BOOL SwLayAction::FormatLayoutFly( SwFlyFrm* pFly )
+sal_Bool SwLayAction::FormatLayoutFly( SwFlyFrm* pFly )
{
OSL_ENSURE( !IsAgain(), "Ungueltige Seite beachten." );
if ( IsAgain() )
- return FALSE;
+ return sal_False;
- BOOL bChanged = false;
- BOOL bAddRect = true;
+ sal_Bool bChanged = false;
+ sal_Bool bAddRect = true;
if ( !pFly->IsValid() || pFly->IsCompletePaint() || pFly->IsInvalid() )
{
@@ -1609,22 +1609,30 @@ BOOL SwLayAction::FormatLayoutFly( SwFlyFrm* pFly )
bChanged = aOldRect != pFly->Frm();
if ( IsPaint() && (pFly->IsCompletePaint() || bChanged) &&
- pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 )
+ pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 )
pImp->GetShell()->AddPaintRect( pFly->Frm() );
if ( bChanged )
pFly->Invalidate();
else
pFly->Validate();
+/*
+ //mba: it's unclear why we should invalidate always, so I remove it
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( IsPaint() && bAddRect && pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 )
+ pImp->GetShell()->AddPaintRect( pFly->Frm() );
+
+ pFly->Invalidate();
+*/
bAddRect = false;
pFly->ResetCompletePaint();
}
if ( IsAgain() )
- return FALSE;
+ return sal_False;
//Jetzt noch diejenigen Lowers versorgen die LayoutFrm's sind
- BOOL bTabChanged = false;
+ sal_Bool bTabChanged = false;
SwFrm *pLow = pFly->Lower();
while ( pLow )
{
@@ -1642,17 +1650,17 @@ BOOL SwLayAction::FormatLayoutFly( SwFlyFrm* pFly )
// OD 31.10.2002 #104100#
// Implement vertical layout support
-BOOL SwLayAction::FormatLayoutTab( SwTabFrm *pTab, BOOL bAddRect )
+sal_Bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, sal_Bool bAddRect )
{
OSL_ENSURE( !IsAgain(), "8-) Ungueltige Seite beachten." );
if ( IsAgain() || !pTab->Lower() )
- return FALSE;
+ return sal_False;
IDocumentTimerAccess *pTimerAccess = pRoot->GetFmt()->getIDocumentTimerAccess();
pTimerAccess->BlockIdling();
- BOOL bChanged = FALSE;
- BOOL bPainted = FALSE;
+ sal_Bool bChanged = sal_False;
+ sal_Bool bPainted = sal_False;
const SwPageFrm *pOldPage = pTab->FindPageFrm();
@@ -1669,11 +1677,11 @@ BOOL SwLayAction::FormatLayoutTab( SwTabFrm *pTab, BOOL bAddRect )
}
const SwRect aOldRect( pTab->Frm() );
- pTab->SetLowersFormatted( FALSE );
+ pTab->SetLowersFormatted( sal_False );
pTab->Calc();
if ( aOldRect != pTab->Frm() )
{
- bChanged = TRUE;
+ bChanged = sal_True;
}
const SwRect aPaintFrm = pTab->PaintArea();
@@ -1724,8 +1732,8 @@ BOOL SwLayAction::FormatLayoutTab( SwTabFrm *pTab, BOOL bAddRect )
else if ( pTab->IsCompletePaint() )
{
pImp->GetShell()->AddPaintRect( aPaintFrm );
- bAddRect = FALSE;
- bPainted = TRUE;
+ bAddRect = sal_False;
+ bPainted = sal_True;
}
if ( pTab->IsRetouche() && !pTab->GetNext() )
@@ -1738,7 +1746,7 @@ BOOL SwLayAction::FormatLayoutTab( SwTabFrm *pTab, BOOL bAddRect )
}
}
else
- bAddRect = FALSE;
+ bAddRect = sal_False;
if ( pTab->IsCompletePaint() && !pOptTab )
pOptTab = pTab;
@@ -1763,16 +1771,16 @@ BOOL SwLayAction::FormatLayoutTab( SwTabFrm *pTab, BOOL bAddRect )
//Heftige Abkuerzung!
if ( pTab->IsLowersFormatted() &&
(bPainted || !pImp->GetShell()->VisArea().IsOver( pTab->Frm())) )
- return FALSE;
+ return sal_False;
//Jetzt noch die Lowers versorgen
if ( IsAgain() )
- return FALSE;
+ return sal_False;
// OD 20.10.2003 #112464# - for savety reasons:
// check page number before formatting lowers.
if ( pOldPage->GetPhyPageNum() > (pTab->FindPageFrm()->GetPhyPageNum() + 1) )
- SetNextCycle( TRUE );
+ SetNextCycle( sal_True );
// OD 20.10.2003 #112464# - format lowers, only if table frame is valid
if ( pTab->IsValid() )
@@ -1782,7 +1790,7 @@ BOOL SwLayAction::FormatLayoutTab( SwTabFrm *pTab, BOOL bAddRect )
{
bChanged |= FormatLayout( (SwLayoutFrm*)pLow, bAddRect );
if ( IsAgain() )
- return FALSE;
+ return sal_False;
pLow = (SwLayoutFrm*)pLow->GetNext();
}
}
@@ -1795,28 +1803,28 @@ BOOL SwLayAction::FormatLayoutTab( SwTabFrm *pTab, BOOL bAddRect )
|* SwLayAction::FormatCntnt()
|*
|*************************************************************************/
-BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
+sal_Bool SwLayAction::FormatCntnt( const SwPageFrm *pPage )
{
const SwCntntFrm *pCntnt = pPage->ContainsCntnt();
- const BOOL bBrowse = pRoot->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_Bool bBrowse = pRoot->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
while ( pCntnt && pPage->IsAnLower( pCntnt ) )
{
//Wenn der Cntnt sich eh nicht veraendert koennen wir ein paar
//Abkuerzungen nutzen.
- const BOOL bFull = !pCntnt->IsValid() || pCntnt->IsCompletePaint() ||
+ const sal_Bool bFull = !pCntnt->IsValid() || pCntnt->IsCompletePaint() ||
pCntnt->IsRetouche() || pCntnt->GetDrawObjs();
if ( bFull )
{
//Damit wir nacher nicht suchen muessen.
- const BOOL bNxtCnt = IsCalcLayout() && !pCntnt->GetFollow();
+ const sal_Bool bNxtCnt = IsCalcLayout() && !pCntnt->GetFollow();
const SwCntntFrm *pCntntNext = bNxtCnt ? pCntnt->GetNextCntntFrm() : 0;
const SwCntntFrm *pCntntPrev = pCntnt->GetPrev() ? pCntnt->GetPrevCntntFrm() : 0;
const SwLayoutFrm*pOldUpper = pCntnt->GetUpper();
const SwTabFrm *pTab = pCntnt->FindTabFrm();
- const BOOL bInValid = !pCntnt->IsValid() || pCntnt->IsCompletePaint();
- const BOOL bOldPaint = IsPaint();
+ const sal_Bool bInValid = !pCntnt->IsValid() || pCntnt->IsCompletePaint();
+ const sal_Bool bOldPaint = IsPaint();
bPaint = bOldPaint && !(pTab && pTab == pOptTab);
_FormatCntnt( pCntnt, pPage );
// --> OD 2004-11-05 #i26945# - reset <bPaint> before format objects
@@ -1836,12 +1844,12 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
*(pCntnt->FindPageFrm()), this ) )
// <--
{
- return FALSE;
+ return sal_False;
}
if ( !pCntnt->GetValidLineNumFlag() && pCntnt->IsTxtFrm() )
{
- const ULONG nAllLines = ((SwTxtFrm*)pCntnt)->GetAllLines();
+ const sal_uLong nAllLines = ((SwTxtFrm*)pCntnt)->GetAllLines();
((SwTxtFrm*)pCntnt)->RecalcAllLines();
if ( IsPaintExtraData() && IsPaint() &&
nAllLines != ((SwTxtFrm*)pCntnt)->GetAllLines() )
@@ -1849,7 +1857,7 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
}
if ( IsAgain() )
- return FALSE;
+ return sal_False;
//Wenn Layout oder Flys wieder Invalid sind breche ich die Verarbeitung
//vorlaeufig ab - allerdings nicht fuer die BrowseView, denn dort wird
@@ -1865,11 +1873,11 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
// OD 07.05.2003 #109435# - consider interrupt formatting
( IS_FLYS && IS_INVAFLY && !mbFormatCntntOnInterrupt )
)
- return FALSE;
+ return sal_False;
}
if ( pOldUpper != pCntnt->GetUpper() )
{
- const USHORT nCurNum = pCntnt->FindPageFrm()->GetPhyPageNum();
+ const sal_uInt16 nCurNum = pCntnt->FindPageFrm()->GetPhyPageNum();
if ( nCurNum < pPage->GetPhyPageNum() )
nPreInvaPage = nCurNum;
@@ -1877,11 +1885,11 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
//fangen wir nocheinmal von vorn an damit wir nichts auslassen.
if ( !IsCalcLayout() && pPage->GetPhyPageNum() > nCurNum+1 )
{
- SetNextCycle( TRUE );
+ SetNextCycle( sal_True );
// OD 07.05.2003 #109435# - consider interrupt formatting
if ( !mbFormatCntntOnInterrupt )
{
- return FALSE;
+ return sal_False;
}
}
}
@@ -1890,7 +1898,7 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
//So werden einerseits Vorgaenger erwischt, die jetzt f?r Retouche
//verantwortlich sind, andererseits werden die Fusszeilen
//auch angefasst.
- BOOL bSetCntnt = TRUE;
+ sal_Bool bSetCntnt = sal_True;
if ( pCntntPrev )
{
if ( !pCntntPrev->IsValid() && pPage->IsAnLower( pCntntPrev ) )
@@ -1899,7 +1907,7 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
pPage->GetPhyPageNum() < pCntnt->FindPageFrm()->GetPhyPageNum() )
{
pCntnt = pCntntPrev;
- bSetCntnt = FALSE;
+ bSetCntnt = sal_False;
}
}
if ( bSetCntnt )
@@ -1916,11 +1924,11 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
!lcl_FindFirstInvaObj( pPage, nBottom )) &&
(!pPage->IsInvalidLayout() ||
!lcl_FindFirstInvaLay( pPage, nBottom )))
- SetBrowseActionStop( TRUE );
+ SetBrowseActionStop( sal_True );
// OD 14.04.2003 #106346# - consider interrupt formatting.
if ( !mbFormatCntntOnInterrupt )
{
- return FALSE;
+ return sal_False;
}
}
}
@@ -1933,7 +1941,7 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
{
if ( !pCntnt->GetValidLineNumFlag() && pCntnt->IsTxtFrm() )
{
- const ULONG nAllLines = ((SwTxtFrm*)pCntnt)->GetAllLines();
+ const sal_uLong nAllLines = ((SwTxtFrm*)pCntnt)->GetAllLines();
((SwTxtFrm*)pCntnt)->RecalcAllLines();
if ( IsPaintExtraData() && IsPaint() &&
nAllLines != ((SwTxtFrm*)pCntnt)->GetAllLines() )
@@ -1949,7 +1957,7 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
CheckIdleEnd();
// OD 14.04.2003 #106346# - consider interrupt formatting.
if ( IsInterrupt() && !mbFormatCntntOnInterrupt )
- return FALSE;
+ return sal_False;
}
if ( bBrowse && !IsIdle() && !IsCalcLayout() && !IsComplete() &&
pCntnt->Frm().Top() > pImp->GetShell()->VisArea().Bottom())
@@ -1963,11 +1971,11 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
!lcl_FindFirstInvaObj( pPage, nBottom )) &&
(!pPage->IsInvalidLayout() ||
!lcl_FindFirstInvaLay( pPage, nBottom )))
- SetBrowseActionStop( TRUE );
+ SetBrowseActionStop( sal_True );
// OD 14.04.2003 #106346# - consider interrupt formatting.
if ( !mbFormatCntntOnInterrupt )
{
- return FALSE;
+ return sal_False;
}
}
}
@@ -1982,8 +1990,8 @@ BOOL SwLayAction::FormatCntnt( const SwPageFrm *pPage )
|*
|* SwLayAction::_FormatCntnt()
|*
-|* Beschreibung Returnt TRUE wenn der Absatz verarbeitet wurde,
-|* FALSE wenn es nichts zu verarbeiten gab.
+|* Beschreibung Returnt sal_True wenn der Absatz verarbeitet wurde,
+|* sal_False wenn es nichts zu verarbeiten gab.
|*
|*************************************************************************/
void SwLayAction::_FormatCntnt( const SwCntntFrm *pCntnt,
@@ -2021,11 +2029,11 @@ void SwLayAction::_FormatCntnt( const SwCntntFrm *pCntnt,
|* SwLayAction::_FormatFlyCntnt()
|*
|* Beschreibung:
-|* - Returnt TRUE wenn alle Cntnts des Flys vollstaendig verarbeitet
-|* wurden. FALSE wenn vorzeitig unterbrochen wurde.
+|* - Returnt sal_True wenn alle Cntnts des Flys vollstaendig verarbeitet
+|* wurden. sal_False wenn vorzeitig unterbrochen wurde.
|*
|*************************************************************************/
-BOOL SwLayAction::_FormatFlyCntnt( const SwFlyFrm *pFly )
+sal_Bool SwLayAction::_FormatFlyCntnt( const SwFlyFrm *pFly )
{
const SwCntntFrm *pCntnt = pFly->ContainsCntnt();
@@ -2052,7 +2060,7 @@ BOOL SwLayAction::_FormatFlyCntnt( const SwFlyFrm *pFly )
if ( !pCntnt->GetValidLineNumFlag() && pCntnt->IsTxtFrm() )
{
- const ULONG nAllLines = ((SwTxtFrm*)pCntnt)->GetAllLines();
+ const sal_uLong nAllLines = ((SwTxtFrm*)pCntnt)->GetAllLines();
((SwTxtFrm*)pCntnt)->RecalcAllLines();
if ( IsPaintExtraData() && IsPaint() &&
nAllLines != ((SwTxtFrm*)pCntnt)->GetAllLines() )
@@ -2060,7 +2068,7 @@ BOOL SwLayAction::_FormatFlyCntnt( const SwFlyFrm *pFly )
}
if ( IsAgain() )
- return FALSE;
+ return sal_False;
//wenn eine Eingabe anliegt breche ich die Verarbeitung ab.
if ( !pFly->IsFlyInCntFrm() )
@@ -2068,7 +2076,7 @@ BOOL SwLayAction::_FormatFlyCntnt( const SwFlyFrm *pFly )
CheckIdleEnd();
// OD 14.04.2003 #106346# - consider interrupt formatting.
if ( IsInterrupt() && !mbFormatCntntOnInterrupt )
- return FALSE;
+ return sal_False;
}
pCntnt = pCntnt->GetNextCntntFrm();
}
@@ -2077,9 +2085,9 @@ BOOL SwLayAction::_FormatFlyCntnt( const SwFlyFrm *pFly )
return !(IsInterrupt() && !mbFormatCntntOnInterrupt);
}
-BOOL SwLayAction::IsStopPrt() const
+sal_Bool SwLayAction::IsStopPrt() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
if (pImp != NULL && pProgress != NULL)
bResult = pImp->IsStopPrt();
@@ -2092,12 +2100,12 @@ BOOL SwLayAction::IsStopPrt() const
|* SwLayAction::FormatSpelling(), _FormatSpelling()
|*
|*************************************************************************/
-BOOL SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
+sal_Bool SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
{
OSL_ENSURE( pCnt->IsTxtFrm(), "NoTxt neighbour of Txt" );
// robust against misuse by e.g. #i52542#
if( !pCnt->IsTxtFrm() )
- return FALSE;
+ return sal_False;
const SwTxtNode* pTxtNode = pCnt->GetNode()->GetTxtNode();
@@ -2138,17 +2146,17 @@ BOOL SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
SwRect aRepaint( ((SwTxtFrm*)pCnt)->_AutoSpell( pCntntNode, *pSh->GetViewOptions(), nTxtPos ) );
bPageValid = bPageValid && !pTxtNode->IsWrongDirty();
if( !bPageValid )
- bAllValid = FALSE;
+ bAllValid = sal_False;
if ( aRepaint.HasArea() )
pImp->GetShell()->InvalidateWindows( aRepaint );
if ( Application::AnyInput( INPUT_MOUSEANDKEYBOARD|INPUT_OTHER|INPUT_PAINT ) )
- return TRUE;
+ return sal_True;
break;
}
case AUTOCOMPLETE_WORDS :
((SwTxtFrm*)pCnt)->CollectAutoCmplWrds( pCntntNode, nTxtPos );
if ( Application::AnyInput( INPUT_ANY ) )
- return TRUE;
+ return sal_True;
break;
case WORD_COUNT :
{
@@ -2156,7 +2164,7 @@ BOOL SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
SwDocStat aStat;
pTxtNode->CountWords( aStat, 0, nEnd );
if ( Application::AnyInput( INPUT_ANY ) )
- return TRUE;
+ return sal_True;
break;
}
case SMART_TAGS : // SMARTTAGS
@@ -2164,11 +2172,11 @@ BOOL SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
const SwRect aRepaint( ((SwTxtFrm*)pCnt)->SmartTagScan( pCntntNode, nTxtPos ) );
bPageValid = bPageValid && !pTxtNode->IsSmartTagDirty();
if( !bPageValid )
- bAllValid = FALSE;
+ bAllValid = sal_False;
if ( aRepaint.HasArea() )
pImp->GetShell()->InvalidateWindows( aRepaint );
if ( Application::AnyInput( INPUT_MOUSEANDKEYBOARD|INPUT_OTHER|INPUT_PAINT ) )
- return TRUE;
+ return sal_True;
break;
}
}
@@ -2178,7 +2186,7 @@ BOOL SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
if ( pCnt->GetDrawObjs() )
{
const SwSortedObjs &rObjs = *pCnt->GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pObj = rObjs[i];
if ( pObj->ISA(SwFlyFrm) )
@@ -2192,7 +2200,7 @@ BOOL SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
if ( pC->IsTxtFrm() )
{
if ( _DoIdleJob( pC, eJob ) )
- return TRUE;
+ return sal_True;
}
pC = pC->GetNextCntntFrm();
}
@@ -2200,10 +2208,10 @@ BOOL SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob )
}
}
}
- return FALSE;
+ return sal_False;
}
-BOOL SwLayIdle::DoIdleJob( IdleJobType eJob, BOOL bVisAreaOnly )
+sal_Bool SwLayIdle::DoIdleJob( IdleJobType eJob, sal_Bool bVisAreaOnly )
{
//Spellchecken aller Inhalte der Seiten. Entweder nur der sichtbaren
//Seiten oder eben aller.
@@ -2215,22 +2223,22 @@ BOOL SwLayIdle::DoIdleJob( IdleJobType eJob, BOOL bVisAreaOnly )
{
case ONLINE_SPELLING :
if( !pViewOptions->IsOnlineSpell() )
- return FALSE;
+ return sal_False;
break;
case AUTOCOMPLETE_WORDS :
if( !pViewOptions->IsAutoCompleteWords() ||
pDoc->GetAutoCompleteWords().IsLockWordLstLocked())
- return FALSE;
+ return sal_False;
break;
case WORD_COUNT :
if ( !pViewShell->getIDocumentStatistics()->GetDocStat().bModified )
- return FALSE;
+ return sal_False;
break;
case SMART_TAGS :
if ( pDoc->GetDocShell()->IsHelpDocument() ||
pDoc->isXForms() ||
!SwSmartTagMgr::Get().IsSmartTagsEnabled() )
- return FALSE;
+ return sal_False;
break;
default: OSL_FAIL( "Unknown idle job type" );
}
@@ -2246,17 +2254,17 @@ BOOL SwLayIdle::DoIdleJob( IdleJobType eJob, BOOL bVisAreaOnly )
while ( pPage )
{
- bPageValid = TRUE;
+ bPageValid = sal_True;
const SwCntntFrm *pCnt = pPage->ContainsCntnt();
while( pCnt && pPage->IsAnLower( pCnt ) )
{
if ( _DoIdleJob( pCnt, eJob ) )
- return TRUE;
+ return sal_True;
pCnt = pCnt->GetNextCntntFrm();
}
if ( pPage->GetSortedObjs() )
{
- for ( USHORT i = 0; pPage->GetSortedObjs() &&
+ for ( sal_uInt16 i = 0; pPage->GetSortedObjs() &&
i < pPage->GetSortedObjs()->Count(); ++i )
{
const SwAnchoredObject* pObj = (*pPage->GetSortedObjs())[i];
@@ -2269,7 +2277,7 @@ BOOL SwLayIdle::DoIdleJob( IdleJobType eJob, BOOL bVisAreaOnly )
if ( pC->IsTxtFrm() )
{
if ( _DoIdleJob( pC, eJob ) )
- return TRUE;
+ return sal_True;
}
pC = pC->GetNextCntntFrm();
}
@@ -2293,7 +2301,7 @@ BOOL SwLayIdle::DoIdleJob( IdleJobType eJob, BOOL bVisAreaOnly )
!pPage->Frm().IsOver( pImp->GetShell()->VisArea()))
break;
}
- return FALSE;
+ return sal_False;
}
@@ -2308,7 +2316,7 @@ void SwLayIdle::ShowIdle( ColorData eColorData )
{
if ( !bIndicator )
{
- bIndicator = TRUE;
+ bIndicator = sal_True;
Window *pWin = pImp->GetShell()->GetWin();
if ( pWin )
{
@@ -2337,20 +2345,20 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
pRoot( pRt ),
pImp( pI )
#if OSL_DEBUG_LEVEL > 1
- , bIndicator( FALSE )
+ , bIndicator( sal_False )
#endif
{
pImp->pIdleAct = this;
SHOW_IDLE( COL_LIGHTRED );
- pImp->GetShell()->EnableSmooth( FALSE );
+ pImp->GetShell()->EnableSmooth( sal_False );
//Zuerst den Sichtbaren Bereich Spellchecken, nur wenn dort nichts
//zu tun war wird das IdleFormat angestossen.
- if ( !DoIdleJob( SMART_TAGS, TRUE ) &&
- !DoIdleJob( ONLINE_SPELLING, TRUE ) &&
- !DoIdleJob( AUTOCOMPLETE_WORDS, TRUE ) ) // SMARTTAGS
+ if ( !DoIdleJob( SMART_TAGS, sal_True ) &&
+ !DoIdleJob( ONLINE_SPELLING, sal_True ) &&
+ !DoIdleJob( AUTOCOMPLETE_WORDS, sal_True ) ) // SMARTTAGS
{
//Formatieren und ggf. Repaint-Rechtecke an der ViewShell vormerken.
//Dabei muessen kuenstliche Actions laufen, damit es z.B. bei
@@ -2361,34 +2369,34 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
ViewShell *pSh = pImp->GetShell();
do
{ ++pSh->nStartAction;
- BOOL bVis = FALSE;
+ sal_Bool bVis = sal_False;
if ( pSh->ISA(SwCrsrShell) )
{
#ifdef SW_CRSR_TIMER
- ((SwCrsrShell*)pSh)->ChgCrsrTimerFlag( FALSE );
+ ((SwCrsrShell*)pSh)->ChgCrsrTimerFlag( sal_False );
#endif
bVis = ((SwCrsrShell*)pSh)->GetCharRect().IsOver(pSh->VisArea());
}
- aBools.push_back(bVis);
+ aBools.push_back( bVis );
pSh = (ViewShell*)pSh->GetNext();
} while ( pSh != pImp->GetShell() );
SwLayAction aAction( pRoot, pImp );
aAction.SetInputType( INPUT_ANY );
- aAction.SetIdle( TRUE );
- aAction.SetWaitAllowed( FALSE );
+ aAction.SetIdle( sal_True );
+ aAction.SetWaitAllowed( sal_False );
aAction.Action();
//Weitere Start-/EndActions nur auf wenn irgendwo Paints aufgelaufen
//sind oder wenn sich die Sichtbarkeit des CharRects veraendert hat.
- BOOL bActions = FALSE;
- USHORT nBoolIdx = 0;
+ sal_Bool bActions = sal_False;
+ sal_uInt16 nBoolIdx = 0;
do
{
--pSh->nStartAction;
if ( pSh->Imp()->GetRegion() )
- bActions = TRUE;
+ bActions = sal_True;
else
{
SwRect aTmp( pSh->VisArea() );
@@ -2420,7 +2428,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
nBoolIdx = 0;
do
{
- BOOL bCrsrShell = pSh->IsA( TYPE(SwCrsrShell) );
+ sal_Bool bCrsrShell = pSh->IsA( TYPE(SwCrsrShell) );
if ( bCrsrShell )
((SwCrsrShell*)pSh)->SttCrsrMove();
@@ -2432,20 +2440,20 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
//deren Loesung unverhaeltnissmaessig aufwendig waere.
//fix(18176):
SwViewImp *pViewImp = pSh->Imp();
- BOOL bUnlock = FALSE;
+ sal_Bool bUnlock = sal_False;
if ( pViewImp->GetRegion() )
{
pViewImp->DelRegion();
//Fuer Repaint mit virtuellem Device sorgen.
pSh->LockPaint();
- bUnlock = TRUE;
+ bUnlock = sal_True;
}
if ( bCrsrShell )
//Wenn der Crsr sichbar war wieder sichbar machen, sonst
- //EndCrsrMove mit TRUE fuer IdleEnd.
- ((SwCrsrShell*)pSh)->EndCrsrMove( TRUE^aBools[nBoolIdx] );
+ //EndCrsrMove mit sal_True fuer IdleEnd.
+ ((SwCrsrShell*)pSh)->EndCrsrMove( sal_True^aBools[nBoolIdx] );
// else
// pSh->EndAction();
if( bUnlock )
@@ -2458,11 +2466,11 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
// paint the selection! -> Set the focus flag at
// CrsrShell and it dont paint the selection.
((SwCrsrShell*)pSh)->ShLooseFcs();
- pSh->UnlockPaint( TRUE );
- ((SwCrsrShell*)pSh)->ShGetFcs( FALSE );
+ pSh->UnlockPaint( sal_True );
+ ((SwCrsrShell*)pSh)->ShGetFcs( sal_False );
}
else
- pSh->UnlockPaint( TRUE );
+ pSh->UnlockPaint( sal_True );
}
pSh = (ViewShell*)pSh->GetNext();
@@ -2473,20 +2481,20 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
if ( !aAction.IsInterrupt() )
{
- if ( !DoIdleJob( WORD_COUNT, FALSE ) )
- if ( !DoIdleJob( SMART_TAGS, FALSE ) )
- if ( !DoIdleJob( ONLINE_SPELLING, FALSE ) )
- DoIdleJob( AUTOCOMPLETE_WORDS, FALSE ); // SMARTTAGS
+ if ( !DoIdleJob( WORD_COUNT, sal_False ) )
+ if ( !DoIdleJob( SMART_TAGS, sal_False ) )
+ if ( !DoIdleJob( ONLINE_SPELLING, sal_False ) )
+ DoIdleJob( AUTOCOMPLETE_WORDS, sal_False ); // SMARTTAGS
}
bool bInValid = false;
const SwViewOption& rVOpt = *pImp->GetShell()->GetViewOptions();
const ViewShell* pViewShell = pImp->GetShell();
// See conditions in DoIdleJob()
- const BOOL bSpell = rVOpt.IsOnlineSpell();
- const BOOL bACmplWrd = rVOpt.IsAutoCompleteWords();
- const BOOL bWordCount = pViewShell->getIDocumentStatistics()->GetDocStat().bModified;
- const BOOL bSmartTags = !pViewShell->GetDoc()->GetDocShell()->IsHelpDocument() &&
+ const sal_Bool bSpell = rVOpt.IsOnlineSpell();
+ const sal_Bool bACmplWrd = rVOpt.IsAutoCompleteWords();
+ const sal_Bool bWordCount = pViewShell->getIDocumentStatistics()->GetDocStat().bModified;
+ const sal_Bool bSmartTags = !pViewShell->GetDoc()->GetDocShell()->IsHelpDocument() &&
!pViewShell->GetDoc()->isXForms() &&
SwSmartTagMgr::Get().IsSmartTagsEnabled(); // SMARTTAGS
@@ -2513,7 +2521,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
}
}
- pImp->GetShell()->EnableSmooth( TRUE );
+ pImp->GetShell()->EnableSmooth( sal_True );
if( pImp->IsAccessible() )
pImp->FireAccessibleEvents();
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index 900d989306b5..b0c49369ff2b 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -99,18 +99,18 @@ void SwLayoutCache::Read( SvStream &rStream )
//-----------------------------------------------------------------------------
-void SwLayCacheImpl::Insert( USHORT nType, ULONG nIndex, xub_StrLen nOffset )
+void SwLayCacheImpl::Insert( sal_uInt16 nType, sal_uLong nIndex, xub_StrLen nOffset )
{
aType.Insert( nType, aType.Count() );
SvULongs::Insert( nIndex, SvULongs::Count() );
- aOffset.Insert( nOffset, aOffset.Count() );
+ aOffset.push_back( nOffset );
}
-BOOL SwLayCacheImpl::Read( SvStream& rStream )
+sal_Bool SwLayCacheImpl::Read( SvStream& rStream )
{
- SwLayCacheIoImpl aIo( rStream, FALSE );
+ SwLayCacheIoImpl aIo( rStream, sal_False );
if( aIo.GetMajorVersion() > SW_LAYCACHE_IO_VERSION_MAJOR )
- return FALSE;
+ return sal_False;
// Due to an evil bug in the layout cache (#102759#), we cannot trust the
// sizes of fly frames which have been written using the "old" layout cache.
@@ -118,8 +118,8 @@ BOOL SwLayCacheImpl::Read( SvStream& rStream )
// height of fly frames
bUseFlyCache = aIo.GetMinorVersion() >= 1;
- BYTE cFlags;
- UINT32 nIndex, nOffset;
+ sal_uInt8 cFlags;
+ sal_uInt32 nIndex, nOffset;
aIo.OpenRec( SW_LAYCACHE_IO_REC_PAGES );
aIo.OpenFlagRec();
@@ -155,7 +155,7 @@ BOOL SwLayCacheImpl::Read( SvStream& rStream )
aIo.OpenFlagRec();
aIo.CloseFlagRec();
long nX, nY, nW, nH;
- USHORT nPgNum;
+ sal_uInt16 nPgNum;
aIo.GetStream() >> nPgNum >> nIndex
>> nX >> nY >> nW >> nH;
SwFlyCache* pFly = new SwFlyCache( nPgNum, nIndex, nX, nY, nW, nH );
@@ -189,10 +189,10 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
{
if( rDoc.GetRootFrm() ) // the layout itself ..
{
- SwLayCacheIoImpl aIo( rStream, TRUE );
+ SwLayCacheIoImpl aIo( rStream, sal_True );
// We want to save the relative index, so we need the index
// of the first content
- ULONG nStartOfContent = rDoc.GetNodes().GetEndOfContent().
+ sal_uLong nStartOfContent = rDoc.GetNodes().GetEndOfContent().
StartOfSectionNode()->GetIndex();
// The first page..
SwPageFrm* pPage = (SwPageFrm*)rDoc.GetRootFrm()->Lower();
@@ -215,12 +215,12 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
{
if( pTmp->IsTxtFrm() )
{
- ULONG nNdIdx = ((SwTxtFrm*)pTmp)->GetNode()->GetIndex();
+ sal_uLong nNdIdx = ((SwTxtFrm*)pTmp)->GetNode()->GetIndex();
if( nNdIdx > nStartOfContent )
{
/* Open Paragraph Record */
aIo.OpenRec( SW_LAYCACHE_IO_REC_PARA );
- BOOL bFollow = ((SwTxtFrm*)pTmp)->IsFollow();
+ sal_Bool bFollow = ((SwTxtFrm*)pTmp)->IsFollow();
aIo.OpenFlagRec( bFollow ? 0x01 : 0x00,
bFollow ? 8 : 4 );
nNdIdx -= nStartOfContent;
@@ -235,7 +235,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
else if( pTmp->IsTabFrm() )
{
SwTabFrm* pTab = (SwTabFrm*)pTmp;
- ULONG nOfst = STRING_LEN;
+ sal_uLong nOfst = STRING_LEN;
if( pTab->IsFollow() )
{
// If the table is a follow, we have to look for the
@@ -257,7 +257,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
}
do
{
- ULONG nNdIdx =
+ sal_uLong nNdIdx =
pTab->GetTable()->GetTableNode()->GetIndex();
if( nNdIdx > nStartOfContent )
{
@@ -307,7 +307,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
if( pPage->GetSortedObjs() )
{
SwSortedObjs &rObjs = *pPage->GetSortedObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
@@ -321,7 +321,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
if( pC )
{
sal_uInt32 nOrdNum = pAnchoredObj->GetDrawObj()->GetOrdNum();
- USHORT nPageNum = pPage->GetPhyPageNum();
+ sal_uInt16 nPageNum = pPage->GetPhyPageNum();
/* Open Fly Record */
aIo.OpenRec( SW_LAYCACHE_IO_REC_FLY );
aIo.OpenFlagRec( 0, 0 );
@@ -351,8 +351,8 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
sal_Bool bRet = sal_True;
if( pImpl && rDoc.GetRootFrm() )
{
- USHORT nIndex = 0;
- ULONG nStartOfContent = rDoc.GetNodes().GetEndOfContent().
+ sal_uInt16 nIndex = 0;
+ sal_uLong nStartOfContent = rDoc.GetNodes().GetEndOfContent().
StartOfSectionNode()->GetIndex();
SwPageFrm* pPage = (SwPageFrm*)rDoc.GetRootFrm()->Lower();
if( pPage )
@@ -373,10 +373,10 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
{
if( pTmp->IsTxtFrm() )
{
- ULONG nNdIdx = ((SwTxtFrm*)pTmp)->GetNode()->GetIndex();
+ sal_uLong nNdIdx = ((SwTxtFrm*)pTmp)->GetNode()->GetIndex();
if( nNdIdx > nStartOfContent )
{
- BOOL bFollow = ((SwTxtFrm*)pTmp)->IsFollow();
+ sal_Bool bFollow = ((SwTxtFrm*)pTmp)->IsFollow();
nNdIdx -= nStartOfContent;
if( pImpl->GetBreakIndex( nIndex ) != nNdIdx ||
SW_LAYCACHE_IO_REC_PARA !=
@@ -393,7 +393,7 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
else if( pTmp->IsTabFrm() )
{
SwTabFrm* pTab = (SwTabFrm*)pTmp;
- ULONG nOfst = STRING_LEN;
+ sal_uLong nOfst = STRING_LEN;
if( pTab->IsFollow() )
{
nOfst = 0;
@@ -412,7 +412,7 @@ sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
}
do
{
- ULONG nNdIdx =
+ sal_uLong nNdIdx =
pTab->GetTable()->GetTableNode()->GetIndex();
if( nNdIdx > nStartOfContent )
{
@@ -492,8 +492,7 @@ SwActualSection::SwActualSection( SwActualSection *pUp,
if ( !pSectNode )
{
const SwNodeIndex *pIndex = pSect->GetFmt()->GetCntnt().GetCntntIdx();
- pSectNode = pSect->GetFmt()->GetDoc()->GetNodes()[*pIndex]->
- FindSectionNode();
+ pSectNode = pIndex->GetNode().FindSectionNode();
}
}
@@ -507,8 +506,8 @@ SwActualSection::SwActualSection( SwActualSection *pUp,
* --------------------------------------------------*/
SwLayHelper::SwLayHelper( SwDoc *pD, SwFrm* &rpF, SwFrm* &rpP, SwPageFrm* &rpPg,
- SwLayoutFrm* &rpL, SwActualSection* &rpA, BOOL &rB,
- ULONG nNodeIndex, BOOL bCache )
+ SwLayoutFrm* &rpL, SwActualSection* &rpA, sal_Bool &rB,
+ sal_uLong nNodeIndex, sal_Bool bCache )
: rpFrm( rpF ), rpPrv( rpP ), rpPage( rpPg ), rpLay( rpL ),
rpActualSection( rpA ), rbBreakAfter(rB), pDoc(pD), nMaxParaPerPage( 25 ),
nParagraphCnt( bCache ? 0 : USHRT_MAX ), bFirst( bCache )
@@ -552,9 +551,9 @@ SwLayHelper::~SwLayHelper()
* otherwise it estimates the page count.
* --------------------------------------------------*/
-ULONG SwLayHelper::CalcPageCount()
+sal_uLong SwLayHelper::CalcPageCount()
{
- ULONG nPgCount;
+ sal_uLong nPgCount;
SwLayCacheImpl *pCache = pDoc->GetLayoutCache() ?
pDoc->GetLayoutCache()->LockImpl() : NULL;
if( pCache )
@@ -567,11 +566,11 @@ ULONG SwLayHelper::CalcPageCount()
nPgCount = pDoc->GetDocStat().nPage;
if ( nPgCount <= 10 ) // no page insertion for less than 10 pages
nPgCount = 0;
- ULONG nNdCount = pDoc->GetDocStat().nPara;
+ sal_uLong nNdCount = pDoc->GetDocStat().nPara;
if ( nNdCount <= 1 )
{
//Estimates the number of paragraphs.
- ULONG nTmp = pDoc->GetNodes().GetEndOfContent().GetIndex() -
+ sal_uLong nTmp = pDoc->GetNodes().GetEndOfContent().GetIndex() -
pDoc->GetNodes().GetEndOfExtras().GetIndex();
//Tables have a little overhead..
nTmp -= pDoc->GetTblFrmFmts()->Count() * 25;
@@ -587,12 +586,12 @@ ULONG SwLayHelper::CalcPageCount()
nMaxParaPerPage = nNdCount / nPgCount;
else
{
- nMaxParaPerPage = Max( ULONG(20),
- ULONG(20 + nNdCount / 1000 * 3) );
+ nMaxParaPerPage = Max( sal_uLong(20),
+ sal_uLong(20 + nNdCount / 1000 * 3) );
#ifdef PM2
- const ULONG nMax = 49;
+ const sal_uLong nMax = 49;
#else
- const ULONG nMax = 53;
+ const sal_uLong nMax = 53;
#endif
nMaxParaPerPage = Min( nMaxParaPerPage, nMax );
nPgCount = nNdCount / nMaxParaPerPage;
@@ -608,7 +607,7 @@ ULONG SwLayHelper::CalcPageCount()
/*-----------------23.5.2001 16:44------------------
* SwLayHelper::CheckInsertPage()
- * inserts a page and return TRUE, if
+ * inserts a page and return sal_True, if
* - the break after flag is set
* - the actual content wants a break before
* - the maximum count of paragraph/rows is reached
@@ -617,9 +616,9 @@ ULONG SwLayHelper::CalcPageCount()
* wants a break after.
* --------------------------------------------------*/
-BOOL SwLayHelper::CheckInsertPage()
+sal_Bool SwLayHelper::CheckInsertPage()
{
- BOOL bEnd = 0 == rpPage->GetNext();
+ sal_Bool bEnd = 0 == rpPage->GetNext();
const SwAttrSet* pAttr = rpFrm->GetAttrSet();
const SvxFmtBreakItem& rBrk = pAttr->GetBreak();
const SwFmtPageDesc& rDesc = pAttr->GetPageDesc();
@@ -631,7 +630,7 @@ BOOL SwLayHelper::CheckInsertPage()
rDesc.GetPageDesc();
// <--
- BOOL bBrk = nParagraphCnt > nMaxParaPerPage || rbBreakAfter;
+ sal_Bool bBrk = nParagraphCnt > nMaxParaPerPage || rbBreakAfter;
rbBreakAfter = rBrk.GetBreak() == SVX_BREAK_PAGE_AFTER ||
rBrk.GetBreak() == SVX_BREAK_PAGE_BOTH;
if ( !bBrk )
@@ -640,23 +639,23 @@ BOOL SwLayHelper::CheckInsertPage()
if ( bBrk || pDesc )
{
- USHORT nPgNum = 0;
+ sal_uInt16 nPgNum = 0;
if ( !pDesc )
pDesc = rpPage->GetPageDesc()->GetFollow();
else
{
if ( 0 != (nPgNum = rDesc.GetNumOffset()) )
- ((SwRootFrm*)rpPage->GetUpper())->SetVirtPageNum(TRUE);
+ ((SwRootFrm*)rpPage->GetUpper())->SetVirtPageNum(sal_True);
}
- BOOL bNextPageOdd = !rpPage->OnRightPage();
- BOOL bInsertEmpty = FALSE;
+ sal_Bool bNextPageOdd = !rpPage->OnRightPage();
+ sal_Bool bInsertEmpty = sal_False;
if( nPgNum && bNextPageOdd != ( ( nPgNum % 2 ) != 0 ) )
{
bNextPageOdd = !bNextPageOdd;
- bInsertEmpty = TRUE;
+ bInsertEmpty = sal_True;
}
::InsertNewPage( (SwPageDesc&)*pDesc, rpPage->GetUpper(),
- bNextPageOdd, bInsertEmpty, FALSE, rpPage->GetNext() );
+ bNextPageOdd, bInsertEmpty, sal_False, rpPage->GetNext() );
if ( bEnd )
{
OSL_ENSURE( rpPage->GetNext(), "Keine neue Seite?" );
@@ -677,9 +676,9 @@ BOOL SwLayHelper::CheckInsertPage()
rpLay = rpPage->FindBodyCont();
while( rpLay->Lower() )
rpLay = (SwLayoutFrm*)rpLay->Lower();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// --> OD 2006-03-22 #b6375613#
@@ -688,7 +687,7 @@ bool lcl_HasTextFrmAnchoredObjs( SwTxtFrm* p_pTxtFrm )
bool bHasTextFrmAnchoredObjs( false );
const SwSpzFrmFmts* pSpzFrmFmts = p_pTxtFrm->GetTxtNode()->GetDoc()->GetSpzFrmFmts();
- for ( USHORT i = 0; i < pSpzFrmFmts->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pSpzFrmFmts->Count(); ++i )
{
SwFrmFmt *pFmt = (SwFrmFmt*)(*pSpzFrmFmts)[i];
const SwFmtAnchor &rAnch = pFmt->GetAnchor();
@@ -756,13 +755,13 @@ void lcl_ApplyWorkaroundForB6375613( SwFrm* p_pFirstFrmOnNewPage )
* one page, in this case the needed count of pages will inserted.
* --------------------------------------------------*/
-BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
+sal_Bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
{
- BOOL bRet = FALSE;
- BOOL bLongTab = FALSE;
- ULONG nMaxRowPerPage( 0 );
+ sal_Bool bRet = sal_False;
+ sal_Bool bLongTab = sal_False;
+ sal_uLong nMaxRowPerPage( 0 );
nNodeIndex -= nStartOfContent;
- USHORT nRows( 0 );
+ sal_uInt16 nRows( 0 );
if( rpFrm->IsTabFrm() )
{
//Inside a table counts every row as a paragraph
@@ -791,15 +790,15 @@ BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
if( pTmp->GetNext() )
pTmp = pTmp->GetNext();
pTmp = ((SwRowFrm*)pTmp)->Lower();
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
do
{
++nCnt;
pTmp = pTmp->GetNext();
} while( pTmp );
- nMaxRowPerPage = Max( ULONG(2), nMaxParaPerPage / nCnt );
+ nMaxRowPerPage = Max( sal_uLong(2), nMaxParaPerPage / nCnt );
}
- bLongTab = TRUE;
+ bLongTab = sal_True;
}
}
else
@@ -809,9 +808,9 @@ BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
( pImpl->GetBreakOfst( nIndex ) < STRING_LEN ||
( ++nIndex < pImpl->Count() &&
pImpl->GetBreakIndex( nIndex ) == nNodeIndex ) ) )
- bFirst = FALSE;
+ bFirst = sal_False;
#if OSL_DEBUG_LEVEL > 1
- ULONG nBreakIndex = ( pImpl && nIndex < pImpl->Count() ) ?
+ sal_uLong nBreakIndex = ( pImpl && nIndex < pImpl->Count() ) ?
pImpl->GetBreakIndex(nIndex) : 0xffff;
(void)nBreakIndex;
#endif
@@ -820,18 +819,18 @@ BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
( rpFrm->IsTabFrm() && bLongTab )
)
{
- ULONG nRowCount = 0;
+ sal_uLong nRowCount = 0;
do
{
if( pImpl || bLongTab )
{
#if OSL_DEBUG_LEVEL > 1
- ULONG nBrkIndex = ( pImpl && nIndex < pImpl->Count() ) ?
+ sal_uLong nBrkIndex = ( pImpl && nIndex < pImpl->Count() ) ?
pImpl->GetBreakIndex(nIndex) : 0xffff;
(void)nBrkIndex;
#endif
xub_StrLen nOfst = STRING_LEN;
- USHORT nType = SW_LAYCACHE_IO_REC_PAGES;
+ sal_uInt16 nType = SW_LAYCACHE_IO_REC_PAGES;
if( bLongTab )
{
rbBreakAfter = sal_True;
@@ -854,7 +853,7 @@ BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
if( nOfst < STRING_LEN )
{
sal_Bool bSplit = sal_False;
- USHORT nRepeat( 0 );
+ sal_uInt16 nRepeat( 0 );
if( !bLongTab && rpFrm->IsTxtFrm() &&
SW_LAYCACHE_IO_REC_PARA == nType &&
nOfst<((SwTxtFrm*)rpFrm)->GetTxtNode()->GetTxt().Len() )
@@ -885,10 +884,10 @@ BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
SwFrm *pPrv;
if( nRepeat > 0 )
{
- bDontCreateObjects = TRUE; //frmtool
+ bDontCreateObjects = sal_True; //frmtool
// Insert new headlines:
- USHORT nRowIdx = 0;
+ sal_uInt16 nRowIdx = 0;
SwRowFrm* pHeadline = 0;
while( nRowIdx < nRepeat )
{
@@ -902,7 +901,7 @@ BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
++nRowIdx;
}
- bDontCreateObjects = FALSE;
+ bDontCreateObjects = sal_False;
pPrv = pHeadline;
nRows = nRows + nRepeat;
}
@@ -950,7 +949,7 @@ BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
if( rpPrv && rpPrv->IsTxtFrm() && !rpPrv->GetValidSizeFlag() )
rpPrv->Frm().Height( rpPrv->GetUpper()->Prt().Height() );
- bRet = TRUE;
+ bRet = sal_True;
rpPrv = 0;
nParagraphCnt = 0;
@@ -968,7 +967,7 @@ BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
else
{
pSct = new SwSectionFrm(
- *rpActualSection->GetSectionFrm(), FALSE );
+ *rpActualSection->GetSectionFrm(), sal_False );
rpActualSection->GetSectionFrm()->SimpleFormat();
bInit = true;
}
@@ -987,7 +986,7 @@ BOOL SwLayHelper::CheckInsert( ULONG nNodeIndex )
} while( bLongTab || ( pImpl && nIndex < pImpl->Count() &&
(*pImpl)[ nIndex ] == nNodeIndex ) );
}
- bFirst = FALSE;
+ bFirst = sal_False;
return bRet;
}
@@ -1018,12 +1017,12 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage )
{
if( !pImpl || !pPage )
return;
- USHORT nFlyCount = pImpl->GetFlyCount();
+ sal_uInt16 nFlyCount = pImpl->GetFlyCount();
// Any text frames at the page, fly cache avaiable?
if( pPage->GetSortedObjs() && nFlyIdx < nFlyCount )
{
SwSortedObjs &rObjs = *pPage->GetSortedObjs();
- USHORT nPgNum = pPage->GetPhyPageNum();
+ sal_uInt16 nPgNum = pPage->GetPhyPageNum();
//
// NOTE: Here we do not use the absolute ordnums but
@@ -1037,7 +1036,7 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage )
// sort cached objects on this page by ordnum
std::set< const SwFlyCache*, FlyCacheCompare > aFlyCacheSet;
- USHORT nIdx = nFlyIdx;
+ sal_uInt16 nIdx = nFlyIdx;
while( nIdx < nFlyCount && ( pFlyC = pImpl->
GetFlyCache( nIdx ) )->nPageNum == nPgNum )
@@ -1048,7 +1047,7 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage )
// sort objects on this page by ordnum
std::set< const SdrObject*, SdrObjectCompare > aFlySet;
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
if ( pAnchoredObj->ISA(SwFlyFrm) ) // a text frame?
@@ -1108,21 +1107,21 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage )
* the rpPage parameter to the right page, if possible.
* --------------------------------------------------*/
-BOOL SwLayHelper::CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly )
+sal_Bool SwLayHelper::CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly )
{
if( !pFly->GetAnchorFrm() || !pFly->GetVirtDrawObj() ||
pFly->GetAnchorFrm()->FindFooterOrHeader() )
- return FALSE;
- BOOL bRet = FALSE;
+ return sal_False;
+ sal_Bool bRet = sal_False;
SwDoc* pDoc = rpPage->GetFmt()->GetDoc();
SwLayCacheImpl *pCache = pDoc->GetLayoutCache() ?
pDoc->GetLayoutCache()->LockImpl() : NULL;
if( pCache )
{
- USHORT nPgNum = rpPage->GetPhyPageNum();
- USHORT nIdx = 0;
- USHORT nCnt = pCache->GetFlyCount();
- ULONG nOrdNum = pFly->GetVirtDrawObj()->GetOrdNum();
+ sal_uInt16 nPgNum = rpPage->GetPhyPageNum();
+ sal_uInt16 nIdx = 0;
+ sal_uInt16 nCnt = pCache->GetFlyCount();
+ sal_uLong nOrdNum = pFly->GetVirtDrawObj()->GetOrdNum();
SwFlyCache* pFlyC = 0;
// skip fly frames from pages before the current page
@@ -1157,7 +1156,7 @@ BOOL SwLayHelper::CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly )
pFly->Frm().Width( pFlyC->Width() );
pFly->Frm().Height( pFlyC->Height() );
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
pDoc->GetLayoutCache()->UnlockImpl();
@@ -1167,12 +1166,12 @@ BOOL SwLayHelper::CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly )
// -----------------------------------------------------------------------------
-SwLayCacheIoImpl::SwLayCacheIoImpl( SvStream& rStrm, BOOL bWrtMd ) :
+SwLayCacheIoImpl::SwLayCacheIoImpl( SvStream& rStrm, sal_Bool bWrtMd ) :
pStream( &rStrm ),
nMajorVersion(SW_LAYCACHE_IO_VERSION_MAJOR),
nMinorVersion(SW_LAYCACHE_IO_VERSION_MINOR),
bWriteMode( bWrtMd ),
- bError( FALSE )
+ bError( sal_False )
{
if( bWriteMode )
*pStream << nMajorVersion
@@ -1183,20 +1182,20 @@ SwLayCacheIoImpl::SwLayCacheIoImpl( SvStream& rStrm, BOOL bWrtMd ) :
>> nMinorVersion;
}
-BOOL SwLayCacheIoImpl::OpenRec( BYTE cType )
+sal_Bool SwLayCacheIoImpl::OpenRec( sal_uInt8 cType )
{
- BOOL bRes = TRUE;
- UINT32 nPos = pStream->Tell();
+ sal_Bool bRes = sal_True;
+ sal_uInt32 nPos = pStream->Tell();
if( bWriteMode )
{
aRecords.push_back( RecTypeSize(cType, nPos) );
- *pStream << (UINT32) 0;
+ *pStream << (sal_uInt32) 0;
}
else
{
- UINT32 nVal;
+ sal_uInt32 nVal;
*pStream >> nVal;
- BYTE cRecTyp = (BYTE)nVal;
+ sal_uInt8 cRecTyp = (sal_uInt8)nVal;
if( !nVal || cRecTyp != cType ||
pStream->GetErrorCode() != SVSTREAM_OK || pStream->IsEof() )
{
@@ -1204,7 +1203,7 @@ BOOL SwLayCacheIoImpl::OpenRec( BYTE cType )
OSL_ENSURE( cRecTyp == cType, "OpenRec: Wrong Record Type" );
aRecords.push_back( RecTypeSize(0, pStream->Tell()) );
bRes = sal_False;
- bError = TRUE;
+ bError = sal_True;
}
else
{
@@ -1217,71 +1216,71 @@ BOOL SwLayCacheIoImpl::OpenRec( BYTE cType )
// Close record
-BOOL SwLayCacheIoImpl::CloseRec( BYTE )
+sal_Bool SwLayCacheIoImpl::CloseRec( sal_uInt8 )
{
- BOOL bRes = TRUE;
+ sal_Bool bRes = sal_True;
OSL_ENSURE( !aRecords.empty(), "CloseRec: no levels" );
if( !aRecords.empty() )
{
- UINT32 nPos = pStream->Tell();
+ sal_uInt32 nPos = pStream->Tell();
if( bWriteMode )
{
- UINT32 nBgn = aRecords.back().size;
+ sal_uInt32 nBgn = aRecords.back().size;
pStream->Seek( nBgn );
- UINT32 nSize = nPos - nBgn;
- UINT32 nVal = ( nSize << 8 ) | aRecords.back().type;
+ sal_uInt32 nSize = nPos - nBgn;
+ sal_uInt32 nVal = ( nSize << 8 ) | aRecords.back().type;
*pStream << nVal;
pStream->Seek( nPos );
if( pStream->GetError() != SVSTREAM_OK )
- bRes = FALSE;
+ bRes = sal_False;
}
else
{
- UINT32 n = aRecords.back().size;
+ sal_uInt32 n = aRecords.back().size;
OSL_ENSURE( n >= nPos, "CloseRec: to much data read" );
if( n != nPos )
{
pStream->Seek( n );
if( n < nPos )
- bRes = FALSE;
+ bRes = sal_False;
}
if( pStream->GetErrorCode() != SVSTREAM_OK )
- bRes = FALSE;
+ bRes = sal_False;
}
aRecords.pop_back();
}
if( !bRes )
- bError = TRUE;
+ bError = sal_True;
return bRes;
}
-UINT32 SwLayCacheIoImpl::BytesLeft()
+sal_uInt32 SwLayCacheIoImpl::BytesLeft()
{
- UINT32 n = 0;
+ sal_uInt32 n = 0;
if( !bError && !aRecords.empty() )
{
- UINT32 nEndPos = aRecords.back().size;
- UINT32 nPos = pStream->Tell();
+ sal_uInt32 nEndPos = aRecords.back().size;
+ sal_uInt32 nPos = pStream->Tell();
if( nEndPos > nPos )
n = nEndPos - nPos;
}
return n;
}
-BYTE SwLayCacheIoImpl::Peek()
+sal_uInt8 SwLayCacheIoImpl::Peek()
{
- BYTE c = 0;
+ sal_uInt8 c = 0;
if( !bError )
{
- UINT32 nPos = pStream->Tell();
+ sal_uInt32 nPos = pStream->Tell();
*pStream >> c;
pStream->Seek( nPos );
if( pStream->GetErrorCode() != SVSTREAM_OK )
{
c = 0;
- bError = TRUE;
+ bError = sal_True;
}
}
return c;
@@ -1289,27 +1288,27 @@ BYTE SwLayCacheIoImpl::Peek()
void SwLayCacheIoImpl::SkipRec()
{
- BYTE c = Peek();
+ sal_uInt8 c = Peek();
OpenRec( c );
pStream->Seek( aRecords.back().size );
CloseRec( c );
}
-BYTE SwLayCacheIoImpl::OpenFlagRec()
+sal_uInt8 SwLayCacheIoImpl::OpenFlagRec()
{
OSL_ENSURE( !bWriteMode, "OpenFlagRec illegal in write mode" );
- BYTE cFlags;
+ sal_uInt8 cFlags;
*pStream >> cFlags;
nFlagRecEnd = pStream->Tell() + ( cFlags & 0x0F );
return (cFlags >> 4);
}
-void SwLayCacheIoImpl::OpenFlagRec( BYTE nFlags, BYTE nLen )
+void SwLayCacheIoImpl::OpenFlagRec( sal_uInt8 nFlags, sal_uInt8 nLen )
{
OSL_ENSURE( bWriteMode, "OpenFlagRec illegal in read mode" );
OSL_ENSURE( (nFlags & 0xF0) == 0, "illegal flags set" );
OSL_ENSURE( nLen < 16, "wrong flag record length" );
- BYTE cFlags = (nFlags << 4) + nLen;
+ sal_uInt8 cFlags = (nFlags << 4) + nLen;
*pStream << cFlags;
nFlagRecEnd = pStream->Tell() + nLen;
}
diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx
index 7d9f0402d2f7..d690940320d7 100644
--- a/sw/source/core/layout/layhelp.hxx
+++ b/sw/source/core/layout/layhelp.hxx
@@ -69,18 +69,18 @@ class SwLayCacheImpl : public SvULongs
SvUShorts aType;
SwPageFlyCache aFlyCache;
sal_Bool bUseFlyCache;
- void Insert( USHORT nType, ULONG nIndex, xub_StrLen nOffset );
+ void Insert( sal_uInt16 nType, sal_uLong nIndex, xub_StrLen nOffset );
public:
- SwLayCacheImpl() : SvULongs( 20, 10 ), aOffset( 20, 10 ), aType( 20, 10 ) {}
- BOOL Read( SvStream& rStream );
+ SwLayCacheImpl() : SvULongs( 20, 10 ), aType( 20, 10 ) {}
+ sal_Bool Read( SvStream& rStream );
- ULONG GetBreakIndex( USHORT nIdx ) const { return GetObject( nIdx ); }
- xub_StrLen GetBreakOfst( USHORT nIdx ) const { return aOffset[ nIdx ]; }
- USHORT GetBreakType( USHORT nIdx ) const { return aType[ nIdx ]; }
+ sal_uLong GetBreakIndex( sal_uInt16 nIdx ) const { return GetObject( nIdx ); }
+ xub_StrLen GetBreakOfst( size_t nIdx ) const { return aOffset[ nIdx ]; }
+ sal_uInt16 GetBreakType( sal_uInt16 nIdx ) const { return aType[ nIdx ]; }
- USHORT GetFlyCount() const { return aFlyCache.Count(); }
- SwFlyCache *GetFlyCache( USHORT nIdx ) const { return aFlyCache[ nIdx ]; }
+ sal_uInt16 GetFlyCount() const { return aFlyCache.Count(); }
+ SwFlyCache *GetFlyCache( sal_uInt16 nIdx ) const { return aFlyCache[ nIdx ]; }
sal_Bool IsUseFlyCache() const { return bUseFlyCache; }
};
@@ -120,26 +120,26 @@ class SwLayHelper
SwPageFrm* &rpPage;
SwLayoutFrm* &rpLay;
SwActualSection* &rpActualSection;
- BOOL &rbBreakAfter;
+ sal_Bool &rbBreakAfter;
SwDoc* pDoc;
SwLayCacheImpl* pImpl;
- ULONG nMaxParaPerPage;
- ULONG nParagraphCnt;
- ULONG nStartOfContent;
- USHORT nIndex; // the index in the page break array
- USHORT nFlyIdx; // the index in the fly cache array
- BOOL bFirst : 1;
+ sal_uLong nMaxParaPerPage;
+ sal_uLong nParagraphCnt;
+ sal_uLong nStartOfContent;
+ sal_uInt16 nIndex; // the index in the page break array
+ sal_uInt16 nFlyIdx; // the index in the fly cache array
+ sal_Bool bFirst : 1;
void _CheckFlyCache( SwPageFrm* pPage );
public:
SwLayHelper( SwDoc *pD, SwFrm* &rpF, SwFrm* &rpP, SwPageFrm* &rpPg,
- SwLayoutFrm* &rpL, SwActualSection* &rpA, BOOL &rBrk,
- ULONG nNodeIndex, BOOL bCache );
+ SwLayoutFrm* &rpL, SwActualSection* &rpA, sal_Bool &rBrk,
+ sal_uLong nNodeIndex, sal_Bool bCache );
~SwLayHelper();
- ULONG CalcPageCount();
- BOOL CheckInsert( ULONG nNodeIndex );
+ sal_uLong CalcPageCount();
+ sal_Bool CheckInsert( sal_uLong nNodeIndex );
- BOOL BreakPage( xub_StrLen& rOffs, ULONG nNodeIndex );
- BOOL CheckInsertPage();
+ sal_Bool BreakPage( xub_StrLen& rOffs, sal_uLong nNodeIndex );
+ sal_Bool CheckInsertPage();
// Look for fresh text frames at this (new) page and set them to the right
// position, if they are in the fly cache.
@@ -148,7 +148,7 @@ public:
// Look for this text frame and set it to the right position,
// if it's in the fly cache.
- static BOOL CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly );
+ static sal_Bool CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly );
};
/*************************************************************************
@@ -169,41 +169,41 @@ class SwLayCacheIoImpl
{
private:
struct RecTypeSize {
- BYTE type;
- ULONG size;
- RecTypeSize(BYTE typ, ULONG siz) : type(typ), size(siz) {}
+ sal_uInt8 type;
+ sal_uLong size;
+ RecTypeSize(sal_uInt8 typ, sal_uLong siz) : type(typ), size(siz) {}
};
std::vector<RecTypeSize> aRecords;
SvStream *pStream;
- ULONG nFlagRecEnd;
+ sal_uLong nFlagRecEnd;
- USHORT nMajorVersion;
- USHORT nMinorVersion;
+ sal_uInt16 nMajorVersion;
+ sal_uInt16 nMinorVersion;
- BOOL bWriteMode : 1;
- BOOL bError : 1;
+ sal_Bool bWriteMode : 1;
+ sal_Bool bError : 1;
public:
- SwLayCacheIoImpl( SvStream& rStrm, BOOL bWrtMd );
+ SwLayCacheIoImpl( SvStream& rStrm, sal_Bool bWrtMd );
// Get input or output stream
SvStream& GetStream() const { return *pStream; }
// Open a record of type "nType"
- BOOL OpenRec( BYTE nType );
+ sal_Bool OpenRec( sal_uInt8 nType );
// Close a record of type "nType". This skips any unread data that
// remains in the record.
- BOOL CloseRec( BYTE nType );
+ sal_Bool CloseRec( sal_uInt8 nType );
// Return the number of bytes contained in the current record that
// haven't been read by now.
- UINT32 BytesLeft();
+ sal_uInt32 BytesLeft();
// Return the current record's type
- BYTE Peek();
+ sal_uInt8 Peek();
// Skip the current record
void SkipRec();
@@ -211,27 +211,27 @@ public:
// Open a flag record for reading. The uppermost four bits are flags,
// while the lowermost are the flag record's size. Flag records cannot
// be nested.
- BYTE OpenFlagRec();
+ sal_uInt8 OpenFlagRec();
// Open flag record for writing;
- void OpenFlagRec( BYTE nFlags, BYTE nLen );
+ void OpenFlagRec( sal_uInt8 nFlags, sal_uInt8 nLen );
// Close a flag record. Any bytes left are skipped.
void CloseFlagRec();
- BOOL HasError() const { return bError; }
+ sal_Bool HasError() const { return bError; }
- USHORT GetMajorVersion() const { return nMajorVersion; }
- USHORT GetMinorVersion() const { return nMinorVersion; }
+ sal_uInt16 GetMajorVersion() const { return nMajorVersion; }
+ sal_uInt16 GetMinorVersion() const { return nMinorVersion; }
};
// Stored information about text frames:
class SwFlyCache : public SwRect // position and size
{
public:
- ULONG nOrdNum; // Id to recognize text frames
- USHORT nPageNum; // page number
- SwFlyCache( USHORT nP, ULONG nO, long nXL, long nYL, long nWL, long nHL ) :
+ sal_uLong nOrdNum; // Id to recognize text frames
+ sal_uInt16 nPageNum; // page number
+ SwFlyCache( sal_uInt16 nP, sal_uLong nO, long nXL, long nYL, long nWL, long nHL ) :
SwRect( nXL, nYL, nWL, nHL ), nOrdNum( nO ), nPageNum( nP ){}
};
diff --git a/sw/source/core/layout/layouter.cxx b/sw/source/core/layout/layouter.cxx
index ad63752f50ae..a02b17401c01 100644
--- a/sw/source/core/layout/layouter.cxx
+++ b/sw/source/core/layout/layouter.cxx
@@ -49,10 +49,10 @@
class SwLooping
{
- USHORT nMinPage;
- USHORT nMaxPage;
- USHORT nCount;
- USHORT mnLoopControlStage;
+ sal_uInt16 nMinPage;
+ sal_uInt16 nMaxPage;
+ sal_uInt16 nCount;
+ sal_uInt16 mnLoopControlStage;
public:
SwLooping( SwPageFrm* pPage );
void Control( SwPageFrm* pPage );
@@ -73,7 +73,7 @@ public:
void CollectEndnote( SwFtnFrm* pFtn );
const SwSectionFrm* GetSect() const { return pSect; }
void InsertEndnotes();
- BOOL HasEndnotes() const { return pEndArr && pEndArr->Count(); }
+ sal_Bool HasEndnotes() const { return pEndArr && pEndArr->Count(); }
};
void SwEndnoter::CollectEndnotes( SwSectionFrm* pSct )
@@ -121,7 +121,7 @@ void SwEndnoter::CollectEndnote( SwFtnFrm* pFtn )
}
else if( pEndArr )
{
- for ( USHORT i = 0; i < pEndArr->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pEndArr->Count(); ++i )
{
SwFtnFrm *pEndFtn = (SwFtnFrm*)((*pEndArr)[i]);
if( pEndFtn->GetAttr() == pFtn->GetAttr() )
@@ -178,7 +178,7 @@ void SwLooping::Control( SwPageFrm* pPage )
{
if( !pPage )
return;
- USHORT nNew = pPage->GetPhyPageNum();
+ sal_uInt16 nNew = pPage->GetPhyPageNum();
if( nNew > nMaxPage )
nMaxPage = nNew;
if( nNew < nMinPage )
@@ -198,7 +198,7 @@ void SwLooping::Control( SwPageFrm* pPage )
else if( ++nCount > LOOP_DETECT )
{
#if OSL_DEBUG_LEVEL > 1
- static BOOL bNoLouie = FALSE;
+ static sal_Bool bNoLouie = sal_False;
if( bNoLouie )
return;
@@ -258,7 +258,7 @@ void SwLayouter::_CollectEndnotes( SwSectionFrm* pSect )
pEndnoter->CollectEndnotes( pSect );
}
-BOOL SwLayouter::HasEndnotes() const
+sal_Bool SwLayouter::HasEndnotes() const
{
return pEndnoter->HasEndnotes();
}
@@ -275,7 +275,7 @@ void SwLayouter::InsertEndnotes( SwSectionFrm* pSect )
pEndnoter->InsertEndnotes();
}
-void SwLayouter::LoopControl( SwPageFrm* pPage, BYTE )
+void SwLayouter::LoopControl( SwPageFrm* pPage, sal_uInt8 )
{
OSL_ENSURE( pLooping, "Looping: Lost control" );
pLooping->Control( pPage );
@@ -292,12 +292,12 @@ void SwLayouter::LoopingLouieLight( const SwDoc& rDoc, const SwTxtFrm& rFrm )
}
}
-BOOL SwLayouter::StartLooping( SwPageFrm* pPage )
+sal_Bool SwLayouter::StartLooping( SwPageFrm* pPage )
{
if( pLooping )
- return FALSE;
+ return sal_False;
pLooping = new SwLooping( pPage );
- return TRUE;
+ return sal_True;
}
void SwLayouter::EndLoopControl()
@@ -314,10 +314,10 @@ void SwLayouter::CollectEndnotes( SwDoc* pDoc, SwSectionFrm* pSect )
pDoc->GetLayouter()->_CollectEndnotes( pSect );
}
-BOOL SwLayouter::Collecting( SwDoc* pDoc, SwSectionFrm* pSect, SwFtnFrm* pFtn )
+sal_Bool SwLayouter::Collecting( SwDoc* pDoc, SwSectionFrm* pSect, SwFtnFrm* pFtn )
{
if( !pDoc->GetLayouter() )
- return FALSE;
+ return sal_False;
SwLayouter *pLayouter = pDoc->GetLayouter();
if( pLayouter->pEndnoter && pLayouter->pEndnoter->GetSect() && pSect &&
( pLayouter->pEndnoter->GetSect()->IsAnFollow( pSect ) ||
@@ -325,12 +325,12 @@ BOOL SwLayouter::Collecting( SwDoc* pDoc, SwSectionFrm* pSect, SwFtnFrm* pFtn )
{
if( pFtn )
pLayouter->CollectEndnote( pFtn );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwLayouter::StartLoopControl( SwDoc* pDoc, SwPageFrm *pPage )
+sal_Bool SwLayouter::StartLoopControl( SwDoc* pDoc, SwPageFrm *pPage )
{
OSL_ENSURE( pDoc, "No doc, no fun" );
if( !pDoc->GetLayouter() )
diff --git a/sw/source/core/layout/makefile.mk b/sw/source/core/layout/makefile.mk
deleted file mode 100644
index 647059234b93..000000000000
--- a/sw/source/core/layout/makefile.mk
+++ /dev/null
@@ -1,105 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=layout
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(mydebug)" != ""
-CDEFS+=-Dmydebug
-.ENDIF
-
-.IF "$(madebug)" != ""
-CDEFS+=-DDEBUG
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES = \
- $(SLO)$/anchoreddrawobject.obj \
- $(SLO)$/anchoredobject.obj \
- $(SLO)$/atrfrm.obj \
- $(SLO)$/calcmove.obj \
- $(SLO)$/colfrm.obj \
- $(SLO)$/findfrm.obj \
- $(SLO)$/flowfrm.obj \
- $(SLO)$/fly.obj \
- $(SLO)$/flycnt.obj \
- $(SLO)$/flyincnt.obj \
- $(SLO)$/flylay.obj \
- $(SLO)$/flypos.obj \
- $(SLO)$/frmtool.obj \
- $(SLO)$/ftnfrm.obj \
- $(SLO)$/hffrm.obj \
- $(SLO)$/layact.obj \
- $(SLO)$/laycache.obj \
- $(SLO)$/layouter.obj \
- $(SLO)$/movedfwdfrmsbyobjpos.obj \
- $(SLO)$/newfrm.obj \
- $(SLO)$/objectformatter.obj \
- $(SLO)$/objstmpconsiderwrapinfl.obj \
- $(SLO)$/pagechg.obj \
- $(SLO)$/pagedesc.obj \
- $(SLO)$/paintfrm.obj \
- $(SLO)$/sectfrm.obj \
- $(SLO)$/softpagebreak.obj \
- $(SLO)$/sortedobjsimpl.obj \
- $(SLO)$/ssfrm.obj \
- $(SLO)$/tabfrm.obj \
- $(SLO)$/trvlfrm.obj \
- $(SLO)$/virtoutp.obj \
- $(SLO)$/wsfrm.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/objectformattertxtfrm.obj \
- $(SLO)$/objectformatterlayfrm.obj \
- $(SLO)$/sortedobjs.obj \
- $(SLO)$/swselectionlist.obj \
- $(SLO)$/unusedf.obj
-
-SRS1NAME=$(TARGET)
-SRC1FILES =\
- pagefrm.src
-
-.IF "$(DBG_LEVEL)">="2"
-SLOFILES += \
- $(SLO)$/dbg_lay.obj
-.ENDIF
-
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index eb542afc89bb..0c6001c4f94a 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -58,8 +58,8 @@
#include <viewopt.hxx>
SwLayVout *SwRootFrm::pVout = 0;
-BOOL SwRootFrm::bInPaint = FALSE;
-BOOL SwRootFrm::bNoVirDev = FALSE;
+sal_Bool SwRootFrm::bInPaint = sal_False;
+sal_Bool SwRootFrm::bNoVirDev = sal_False;
SwCache *SwFrm::pCache = 0;
@@ -291,9 +291,67 @@ static SwRectFnCollection aVerticalRightToLeft = {
&SwRect::SetBottomAndHeight,
&SwRect::SetLeftAndWidth
};
+//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+static SwRectFnCollection aVerticalLeftToRight = {
+ /* fnRectGet */
+ &SwRect::_Left,
+ &SwRect::_Right,
+ &SwRect::_Top,
+ &SwRect::_Bottom,
+ &SwRect::_Height,
+ &SwRect::_Width,
+ &SwRect::TopLeft,
+ &SwRect::SwappedSize,
+ /* fnRectSet */
+ &SwRect::_Left,
+ &SwRect::_Right,
+ &SwRect::_Top,
+ &SwRect::_Bottom,
+ &SwRect::_Height,
+ &SwRect::_Width,
+
+ &SwRect::SubLeft,
+ &SwRect::AddRight,
+ &SwRect::SubTop,
+ &SwRect::AddBottom,
+ &SwRect::AddHeight,
+ &SwRect::AddWidth,
+
+ &SwRect::SetPosY,
+ &SwRect::SetPosX,
+ &SwFrm::GetLeftMargin,
+ &SwFrm::GetRightMargin,
+ &SwFrm::GetTopMargin,
+ &SwFrm::GetBottomMargin,
+ &SwFrm::SetTopBottomMargins,
+ &SwFrm::SetLeftRightMargins,
+ &SwFrm::GetPrtLeft,
+ &SwFrm::GetPrtRight,
+ &SwFrm::GetPrtTop,
+ &SwFrm::GetPrtBottom,
+ &SwRect::GetLeftDistance,
+ &SwRect::GetRightDistance,
+ &SwRect::GetTopDistance,
+ &SwRect::GetBottomDistance,
+ &SwFrm::SetMaxRight,
+ &SwRect::OverStepRight,
+
+ &SwRect::SetUpperLeftCorner,
+ &SwFrm::MakeRightPos,
+ &FirstMinusSecond,
+ &FirstMinusSecond,
+ &SwIncrement,
+ &SwIncrement,
+ &SwRect::SetTopAndHeight,
+ &SwRect::SetLeftAndWidth
+};
+//End of SCMS
SwRectFn fnRectHori = &aHorizontal;
SwRectFn fnRectVert = &aVertical;
+//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+SwRectFn fnRectVertL2R = &aVerticalLeftToRight;
+//End of SCMS
SwRectFn fnRectB2T = &aBottomToTop;
SwRectFn fnRectVL2R = &aVerticalRightToLeft;
@@ -322,7 +380,7 @@ void _FrmFinit()
{
#if OSL_DEBUG_LEVEL > 1
// im Chache duerfen nur noch 0-Pointer stehen
- for( USHORT n = SwFrm::GetCachePtr()->Count(); n; )
+ for( sal_uInt16 n = SwFrm::GetCachePtr()->Count(); n; )
if( (*SwFrm::GetCachePtr())[ --n ] )
{
SwCacheObj* pObj = (*SwFrm::GetCachePtr())[ n ];
@@ -392,7 +450,7 @@ void SwRootFrm::DeRegisterShell( ViewShell *pSh )
pWaitingCurrShell = 0;
//Referenzen entfernen.
- for ( USHORT i = 0; i < pCurrShells->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pCurrShells->Count(); ++i )
{
CurrShell *pC = (*pCurrShells)[i];
if (pC->pPrev == pSh)
@@ -440,8 +498,8 @@ SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) :
nAccessibleShells( 0 )
{
nType = FRMC_ROOT;
- bIdleFormat = bTurboAllowed = bAssertFlyPages = bIsNewLayout = TRUE;
- bCheckSuperfluous = bBrowseWidthValid = FALSE;
+ bIdleFormat = bTurboAllowed = bAssertFlyPages = bIsNewLayout = sal_True;
+ bCheckSuperfluous = bBrowseWidthValid = sal_False;
InitCurrShells( this );
@@ -451,7 +509,7 @@ SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) :
const IDocumentSettingAccess *pSettingAccess = pFmt->getIDocumentSettingAccess();
pTimerAccess->StopIdling();
pLayoutAccess->SetRootFrm( this ); //Fuer das Erzeugen der Flys durch MakeFrms()
- bCallbackActionEnabled = FALSE; //vor Verlassen auf TRUE setzen!
+ bCallbackActionEnabled = sal_False; //vor Verlassen auf sal_True setzen!
SdrModel *pMd = pFmt->getIDocumentDrawModelAccess()->GetDrawModel();
@@ -468,7 +526,7 @@ SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) :
SwDoc* pDoc = pFmt->GetDoc();
SwNodeIndex aIndex( *pDoc->GetNodes().GetEndOfContent().StartOfSectionNode() );
- SwCntntNode *pNode = pDoc->GetNodes().GoNextSection( &aIndex, TRUE, FALSE );
+ SwCntntNode *pNode = pDoc->GetNodes().GoNextSection( &aIndex, sal_True, sal_False );
// --> FME 2005-05-25 #123067# pNode = 0 can really happen:
SwTableNode *pTblNd= pNode ? pNode->FindTableNode() : 0;
// <--
@@ -476,7 +534,7 @@ SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) :
//PageDesc besorgen (entweder vom FrmFmt des ersten Node oder den
//initialen.)
SwPageDesc *pDesc = 0;
- USHORT nPgNum = 1;
+ sal_uInt16 nPgNum = 1;
if ( pTblNd )
{
@@ -493,14 +551,14 @@ SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) :
bIsVirtPageNum = 0 != ( nPgNum = rDesc.GetNumOffset() );
}
else
- bIsVirtPageNum = FALSE;
+ bIsVirtPageNum = sal_False;
if ( !pDesc )
pDesc = (SwPageDesc*)
&const_cast<const SwDoc *>(pDoc)->GetPageDesc( 0 );
- const BOOL bOdd = !nPgNum || 0 != ( nPgNum % 2 );
+ const sal_Bool bOdd = !nPgNum || 0 != ( nPgNum % 2 );
//Eine Seite erzeugen und in das Layout stellen
- SwPageFrm *pPage = ::InsertNewPage( *pDesc, this, bOdd, FALSE, FALSE, 0 );
+ SwPageFrm *pPage = ::InsertNewPage( *pDesc, this, bOdd, sal_False, sal_False, 0 );
//Erstes Blatt im Bodytext-Bereich suchen.
SwLayoutFrm *pLay = pPage->FindBodyCont();
@@ -508,7 +566,7 @@ SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) :
pLay = (SwLayoutFrm*)pLay->Lower();
SwNodeIndex aTmp( *pDoc->GetNodes().GetEndOfContent().StartOfSectionNode(), 1 );
- ::_InsertCnt( pLay, pDoc, aTmp.GetIndex(), TRUE );
+ ::_InsertCnt( pLay, pDoc, aTmp.GetIndex(), sal_True );
//Noch nicht ersetzte Master aus der Liste entfernen.
RemoveMasterObjs( pDrawPage );
if( pSettingAccess->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) )
@@ -523,7 +581,7 @@ SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) :
// <---
pTimerAccess->StartIdling();
- bCallbackActionEnabled = TRUE;
+ bCallbackActionEnabled = sal_True;
ViewShell *pViewSh = GetCurrShell();
if (pViewSh)
@@ -540,7 +598,7 @@ SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, ViewShell * pSh ) :
SwRootFrm::~SwRootFrm()
{
- bTurboAllowed = FALSE;
+ bTurboAllowed = sal_False;
pTurbo = 0;
if(pBlink)
pBlink->FrmDelete( this );
@@ -548,7 +606,7 @@ SwRootFrm::~SwRootFrm()
delete pDestroy;
//Referenzen entfernen.
- for ( USHORT i = 0; i < pCurrShells->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pCurrShells->Count(); ++i )
(*pCurrShells)[i]->pRoot = 0;
delete pCurrShells;
@@ -566,7 +624,7 @@ SwRootFrm::~SwRootFrm()
void SwRootFrm::RemoveMasterObjs( SdrPage *pPg )
{
//Alle Masterobjekte aus der Page entfernen. Nicht loeschen!!
- for( ULONG i = pPg ? pPg->GetObjCount() : 0; i; )
+ for( sal_uLong i = pPg ? pPg->GetObjCount() : 0; i; )
{
SdrObject* pObj = pPg->GetObj( --i );
if( pObj->ISA(SwFlyDrawObj ) )
diff --git a/sw/source/core/layout/objectformatter.cxx b/sw/source/core/layout/objectformatter.cxx
index 0d1f57285a76..c9cebfd93ce6 100644
--- a/sw/source/core/layout/objectformatter.cxx
+++ b/sw/source/core/layout/objectformatter.cxx
@@ -357,8 +357,8 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj )
// <--
// #i81146# new loop control
- USHORT nLoopControlRuns = 0;
- const USHORT nLoopControlMax = 15;
+ sal_uInt16 nLoopControlRuns = 0;
+ const sal_uInt16 nLoopControlMax = 15;
do {
if ( mpLayAction )
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 24334e6905ae..29c51dff0725 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -125,18 +125,19 @@ void SwBodyFrm::Format( const SwBorderAttrs * )
if ( nHeight < 0 )
nHeight = 0;
Frm().Height( nHeight );
- if( IsVertical() && !IsReverse() && nWidth != Frm().Width() )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsVertical() && !IsVertLR() && !IsReverse() && nWidth != Frm().Width() )
Frm().Pos().X() += Frm().Width() - nWidth;
Frm().Width( nWidth );
}
- BOOL bNoGrid = TRUE;
+ sal_Bool bNoGrid = sal_True;
if( GetUpper()->IsPageFrm() && ((SwPageFrm*)GetUpper())->HasGrid() )
{
GETGRID( ((SwPageFrm*)GetUpper()) )
if( pGrid )
{
- bNoGrid = FALSE;
+ bNoGrid = sal_False;
long nSum = pGrid->GetBaseHeight() + pGrid->GetRubyHeight();
SWRECTFN( this )
long nSize = (Frm().*fnRect->fnGetWidth)();
@@ -179,10 +180,10 @@ void SwBodyFrm::Format( const SwBorderAttrs * )
Prt().Height( Frm().Height() );
Prt().Width( Frm().Width() );
}
- bValidSize = bValidPrtArea = TRUE;
+ bValidSize = bValidPrtArea = sal_True;
}
-void SwBodyFrm::Paint( const SwRect& rRect, const SwPrtOptions* ) const
+void SwBodyFrm::Paint( const SwRect& rRect, const SwPrintData* ) const
{
#if OSL_DEBUG_LAYOUT > 1
// Paint a red border around the SwBodyFrm in debug mode
@@ -211,22 +212,22 @@ SwPageFrm::SwPageFrm( SwFrmFmt *pFmt, SwPageDesc *pPgDsc ) :
// OD 2004-05-17 #i28701#
mbLayoutInProgress( false )
{
- SetDerivedVert( FALSE );
- SetDerivedR2L( FALSE );
+ SetDerivedVert( sal_False );
+ SetDerivedR2L( sal_False );
if( pDesc )
{
- bHasGrid = TRUE;
+ bHasGrid = sal_True;
GETGRID( this )
if( !pGrid )
- bHasGrid = FALSE;
+ bHasGrid = sal_False;
}
else
- bHasGrid = FALSE;
+ bHasGrid = sal_False;
SetMaxFtnHeight( pPgDsc->GetFtnInfo().GetHeight() ?
pPgDsc->GetFtnInfo().GetHeight() : LONG_MAX ),
nType = FRMC_PAGE;
- bInvalidLayout = bInvalidCntnt = bInvalidSpelling = bInvalidSmartTags = bInvalidAutoCmplWrds = bInvalidWordCount = TRUE;
- bInvalidFlyLayout = bInvalidFlyCntnt = bInvalidFlyInCnt = bFtnPage = bEndNotePage = FALSE;
+ bInvalidLayout = bInvalidCntnt = bInvalidSpelling = bInvalidSmartTags = bInvalidAutoCmplWrds = bInvalidWordCount = sal_True;
+ bInvalidFlyLayout = bInvalidFlyCntnt = bInvalidFlyInCnt = bFtnPage = bEndNotePage = sal_False;
const bool bBrowseMode = pFmt->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
if ( bBrowseMode )
@@ -244,9 +245,9 @@ SwPageFrm::SwPageFrm( SwFrmFmt *pFmt, SwPageDesc *pPgDsc ) :
//Body-Bereich erzeugen und einsetzen, aber nur wenn ich nicht gerade
//eine Leerseite bin.
SwDoc *pDoc = pFmt->GetDoc();
- if ( FALSE == (bEmptyPage = pFmt == pDoc->GetEmptyPageFmt()) )
+ if ( sal_False == (bEmptyPage = pFmt == pDoc->GetEmptyPageFmt()) )
{
- bEmptyPage = FALSE;
+ bEmptyPage = sal_False;
Calc(); //Damit die PrtArea stimmt.
SwBodyFrm *pBodyFrm = new SwBodyFrm( pDoc->GetDfltFrmFmt() );
pBodyFrm->ChgSize( Prt().SSize() );
@@ -283,7 +284,7 @@ SwPageFrm::~SwPageFrm()
//Objekte koennen (warum auch immer) auch an Seiten verankert sein,
//die vor Ihren Ankern stehen. Dann wuerde auf bereits freigegebenen
//Speicher zugegriffen.
- for ( USHORT i = 0; i < pSortedObjs->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pSortedObjs->Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pSortedObjs)[i];
pAnchoredObj->SetPageFrm( 0L );
@@ -317,10 +318,10 @@ SwPageFrm::~SwPageFrm()
}
-void SwPageFrm::CheckGrid( BOOL bInvalidate )
+void SwPageFrm::CheckGrid( sal_Bool bInvalidate )
{
- BOOL bOld = bHasGrid;
- bHasGrid = TRUE;
+ sal_Bool bOld = bHasGrid;
+ bHasGrid = sal_True;
GETGRID( this )
bHasGrid = 0 != pGrid;
if( bInvalidate || bOld != bHasGrid )
@@ -341,18 +342,27 @@ void SwPageFrm::CheckGrid( BOOL bInvalidate )
}
-void SwPageFrm::CheckDirection( BOOL bVert )
+void SwPageFrm::CheckDirection( sal_Bool bVert )
{
- UINT16 nDir =
+ sal_uInt16 nDir =
((SvxFrameDirectionItem&)GetFmt()->GetFmtAttr( RES_FRAMEDIR )).GetValue();
if( bVert )
{
if( FRMDIR_HORI_LEFT_TOP == nDir || FRMDIR_HORI_RIGHT_TOP == nDir ||
GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ {
bVertical = 0;
+ bVertLR = 0;
+ }
else
+ {
bVertical = 1;
-
+ if(FRMDIR_VERT_TOP_RIGHT == nDir)
+ bVertLR = 0;
+ else if(FRMDIR_VERT_TOP_LEFT==nDir)
+ bVertLR = 1;
+ }
bReverse = 0;
bInvalidVert = 0;
}
@@ -395,7 +405,7 @@ void MA_FASTCALL lcl_MakeObjs( const SwSpzFrmFmts &rTbl, SwPageFrm *pPage )
//Die Formate stehen in der SpzTbl (vom Dokument).
//Flys werden angelegt, DrawObjekte werden bei der Seite angemeldet.
- for ( USHORT i = 0; i < rTbl.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rTbl.Count(); ++i )
{
SdrObject *pSdrObj;
SwFrmFmt *pFmt = rTbl[i];
@@ -415,11 +425,11 @@ void MA_FASTCALL lcl_MakeObjs( const SwSpzFrmFmts &rTbl, SwPageFrm *pPage )
}
//Wird ein Rahmen oder ein SdrObject beschrieben?
- BOOL bSdrObj = RES_DRAWFRMFMT == pFmt->Which();
+ sal_Bool bSdrObj = RES_DRAWFRMFMT == pFmt->Which();
pSdrObj = 0;
if ( bSdrObj && 0 == (pSdrObj = pFmt->FindSdrObject()) )
{
- OSL_ENSURE( FALSE, "DrawObject not found." );
+ OSL_ENSURE( sal_False, "DrawObject not found." );
pFmt->GetDoc()->DelFrmFmt( pFmt );
--i;
continue;
@@ -474,7 +484,7 @@ void MA_FASTCALL lcl_MakeObjs( const SwSpzFrmFmts &rTbl, SwPageFrm *pPage )
}
}
-void SwPageFrm::PreparePage( BOOL bFtn )
+void SwPageFrm::PreparePage( sal_Bool bFtn )
{
SetFtnPage( bFtn );
@@ -533,7 +543,7 @@ void SwPageFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
ViewShell *pSh = GetShell();
if ( pSh )
pSh->SetFirstVisPageInvalid();
- BYTE nInvFlags = 0;
+ sal_uInt8 nInvFlags = 0;
if( pNew && RES_ATTRSET_CHG == pNew->Which() )
{
@@ -541,7 +551,7 @@ void SwPageFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
SfxItemIter aOIter( *((SwAttrSetChg*)pOld)->GetChgSet() );
SwAttrSetChg aOldSet( *(SwAttrSetChg*)pOld );
SwAttrSetChg aNewSet( *(SwAttrSetChg*)pNew );
- while( TRUE )
+ while( sal_True )
{
_UpdateAttr( (SfxPoolItem*)aOIter.GetCurItem(),
(SfxPoolItem*)aNIter.GetCurItem(), nInvFlags,
@@ -576,11 +586,11 @@ void SwPageFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
}
void SwPageFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
- BYTE &rInvFlags,
+ sal_uInt8 &rInvFlags,
SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet )
{
- BOOL bClear = TRUE;
- const USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_Bool bClear = sal_True;
+ const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
switch( nWhich )
{
case RES_FMT_CHG:
@@ -622,7 +632,7 @@ void SwPageFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
const SwRect aOldPageFrmRect( Frm() );
if ( GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
{
- bValidSize = FALSE;
+ bValidSize = sal_False;
// OD 28.10.2002 #97265# - Don't call <SwPageFrm::MakeAll()>
// Calculation of the page is not necessary, because its size is
// is invalidated here and further invalidation is done in the
@@ -692,14 +702,14 @@ void SwPageFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
SetMaxFtnHeight( LONG_MAX );
SetColMaxFtnHeight();
//Hier wird die Seite ggf. zerstoert!
- ((SwRootFrm*)GetUpper())->RemoveFtns( 0, FALSE, TRUE );
+ ((SwRootFrm*)GetUpper())->RemoveFtns( 0, sal_False, sal_True );
break;
case RES_FRAMEDIR :
CheckDirChange();
break;
default:
- bClear = FALSE;
+ bClear = sal_False;
}
if ( bClear )
{
@@ -723,14 +733,14 @@ void SwPageFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
|*
*************************************************************************/
// erfrage vom Modify Informationen
-BOOL SwPageFrm::GetInfo( SfxPoolItem & rInfo ) const
+sal_Bool SwPageFrm::GetInfo( SfxPoolItem & rInfo ) const
{
if( RES_AUTOFMT_DOCNODE == rInfo.Which() )
{
// es gibt einen PageFrm also wird er benutzt
- return FALSE;
+ return sal_False;
}
- return TRUE; // weiter suchen
+ return sal_True; // weiter suchen
}
/*************************************************************************
@@ -833,8 +843,8 @@ SwPageDesc *SwPageFrm::FindPageDesc()
//Wenn der RootFrm seine Groesse aendert muss benachrichtigt werden.
void AdjustSizeChgNotify( SwRootFrm *pRoot )
{
- const BOOL bOld = pRoot->IsSuperfluous();
- pRoot->bCheckSuperfluous = FALSE;
+ const sal_Bool bOld = pRoot->IsSuperfluous();
+ pRoot->bCheckSuperfluous = sal_False;
ViewShell *pSh = pRoot->GetCurrShell();
if ( pSh )
{
@@ -875,7 +885,7 @@ void SwPageFrm::Cut()
if ( GetSortedObjs() )
{
for ( int i = 0; GetSortedObjs() &&
- (USHORT)i < GetSortedObjs()->Count(); ++i )
+ (sal_uInt16)i < GetSortedObjs()->Count(); ++i )
{
// --> OD 2004-06-29 #i28701#
SwAnchoredObject* pAnchoredObj = (*GetSortedObjs())[i];
@@ -982,7 +992,7 @@ void lcl_PrepFlyInCntRegister( SwCntntFrm *pFrm )
pFrm->Prepare( PREP_REGISTER );
if( pFrm->GetDrawObjs() )
{
- for( USHORT i = 0; i < pFrm->GetDrawObjs()->Count(); ++i )
+ for( sal_uInt16 i = 0; i < pFrm->GetDrawObjs()->Count(); ++i )
{
// --> OD 2004-06-29 #i28701#
SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
@@ -1013,7 +1023,7 @@ void SwPageFrm::PrepareRegisterChg()
}
if( GetSortedObjs() )
{
- for( USHORT i = 0; i < GetSortedObjs()->Count(); ++i )
+ for( sal_uInt16 i = 0; i < GetSortedObjs()->Count(); ++i )
{
// --> OD 2004-06-29 #i28701#
SwAnchoredObject* pAnchoredObj = (*GetSortedObjs())[i];
@@ -1041,7 +1051,7 @@ void SwPageFrm::PrepareRegisterChg()
|* einfache zu bereinigen.
|*
|*************************************************************************/
-void SwFrm::CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields )
+void SwFrm::CheckPageDescs( SwPageFrm *pStart, sal_Bool bNotifyFields )
{
OSL_ENSURE( pStart, "Keine Startpage." );
@@ -1060,7 +1070,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields )
SwRootFrm *pRoot = (SwRootFrm*)pStart->GetUpper();
SwDoc* pDoc = pStart->GetFmt()->GetDoc();
- const BOOL bFtns = 0 != pDoc->GetFtnIdxs().Count();
+ const sal_Bool bFtns = 0 != pDoc->GetFtnIdxs().Count();
SwPageFrm *pPage = pStart;
if( pPage->GetPrev() && ((SwPageFrm*)pPage->GetPrev())->IsEmptyPage() )
@@ -1069,9 +1079,9 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields )
{
//gewuenschten PageDesc und FrmFmt festellen.
SwPageDesc *pDesc = pPage->FindPageDesc();
- BOOL bCheckEmpty = pPage->IsEmptyPage();
- BOOL bActOdd = pPage->OnRightPage();
- BOOL bOdd = pPage->WannaRightPage();
+ sal_Bool bCheckEmpty = pPage->IsEmptyPage();
+ sal_Bool bActOdd = pPage->OnRightPage();
+ sal_Bool bOdd = pPage->WannaRightPage();
SwFrmFmt *pFmtWish = bOdd ? pDesc->GetRightFmt()
: pDesc->GetLeftFmt();
@@ -1138,7 +1148,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields )
pDesc = ((SwPageFrm*)pPage->GetPrev())->GetPageDesc();
SwPageFrm *pTmp = new SwPageFrm( pDoc->GetEmptyPageFmt(),pDesc);
pTmp->Paste( pRoot, pPage );
- pTmp->PreparePage( FALSE );
+ pTmp->PreparePage( sal_False );
pPage = pTmp;
}
else if ( pPage->GetPageDesc() != pDesc ) //4.
@@ -1173,7 +1183,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields )
#if OSL_DEBUG_LEVEL > 1
else
{
- OSL_ENSURE( FALSE, "CheckPageDescs, missing solution" );
+ OSL_ENSURE( sal_False, "CheckPageDescs, missing solution" );
}
#endif
}
@@ -1218,7 +1228,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields )
//1. Keine zwei EmptyPages hintereinander.
//2. Alle PageDescs richtig?
- BOOL bEmpty = FALSE;
+ sal_Bool bEmpty = sal_False;
SwPageFrm *pPg = pStart;
while ( pPg )
{
@@ -1226,13 +1236,13 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields )
{
if ( bEmpty )
{
- OSL_ENSURE( FALSE, "Doppelte Leerseiten." );
+ OSL_ENSURE( sal_False, "Doppelte Leerseiten." );
break; //Einmal reicht.
}
- bEmpty = TRUE;
+ bEmpty = sal_True;
}
else
- bEmpty = FALSE;
+ bEmpty = sal_False;
//MA 21. Jun. 95: Kann zu testzwecken 'rein, ist aber bei zyklen durchaus
//moeglich: Ein paar Seiten, auf der ersten 'erste Seite' anwenden,
@@ -1251,7 +1261,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields )
|* SwFrm::InsertPage()
|*
|*************************************************************************/
-SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, BOOL bFtn )
+SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, sal_Bool bFtn )
{
SwRootFrm *pRoot = (SwRootFrm*)pPrevPage->GetUpper();
SwPageFrm *pSibling = (SwPageFrm*)pRoot->GetLower();
@@ -1259,8 +1269,8 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, BOOL bFtn )
pSibling = (SwPageFrm*)pPrevPage->GetNext();
//Rechte (ungerade) oder linke (gerade) Seite einfuegen?
- BOOL bNextOdd = !pPrevPage->OnRightPage();
- BOOL bWishedOdd = bNextOdd;
+ sal_Bool bNextOdd = !pPrevPage->OnRightPage();
+ sal_Bool bWishedOdd = bNextOdd;
//Welcher PageDesc gilt?
//Bei CntntFrm der aus dem Format wenn einer angegeben ist,
@@ -1271,9 +1281,9 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, BOOL bFtn )
pDesc = rDesc.GetPageDesc();
if ( rDesc.GetNumOffset() )
{
- bWishedOdd = rDesc.GetNumOffset() % 2 ? TRUE : FALSE;
+ bWishedOdd = rDesc.GetNumOffset() % 2 ? sal_True : sal_False;
//Die Gelegenheit nutzen wir um das Flag an der Root zu pflegen.
- pRoot->SetVirtPageNum( TRUE );
+ pRoot->SetVirtPageNum( sal_True );
}
}
if ( !pDesc )
@@ -1285,7 +1295,7 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, BOOL bFtn )
SwDoc *pDoc = pPrevPage->GetFmt()->GetDoc();
SwFrmFmt *pFmt;
- BOOL bCheckPages = FALSE;
+ sal_Bool bCheckPages = sal_False;
//Wenn ich kein FrmFmt fuer die Seite gefunden habe, muss ich eben eine
//Leerseite einfuegen.
if( bWishedOdd != bNextOdd )
@@ -1302,12 +1312,12 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, BOOL bFtn )
SwPageFrm *pDel = pSibling;
pSibling = (SwPageFrm*)pSibling->GetNext();
if ( pDoc->GetFtnIdxs().Count() )
- pRoot->RemoveFtns( pDel, TRUE );
+ pRoot->RemoveFtns( pDel, sal_True );
pDel->Cut();
delete pDel;
}
else
- bCheckPages = TRUE;
+ bCheckPages = sal_True;
}
pFmt = bWishedOdd ? pDesc->GetRightFmt() : pDesc->GetLeftFmt();
OSL_ENSURE( pFmt, "Descriptor without format." );
@@ -1322,23 +1332,23 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, BOOL bFtn )
SwPageFrm *pDel = pSibling;
pSibling = (SwPageFrm*)pSibling->GetNext();
if ( pDoc->GetFtnIdxs().Count() )
- pRoot->RemoveFtns( pDel, TRUE );
+ pRoot->RemoveFtns( pDel, sal_True );
pDel->Cut();
delete pDel;
}
else
- bCheckPages = TRUE;
+ bCheckPages = sal_True;
if ( pSibling )
{
if ( bCheckPages )
{
- CheckPageDescs( pSibling, FALSE );
+ CheckPageDescs( pSibling, sal_False );
ViewShell *pSh = GetShell();
SwViewImp *pImp = pSh ? pSh->Imp() : 0;
if ( pImp && pImp->IsAction() && !pImp->GetLayAction().IsCheckPages() )
{
- const USHORT nNum = pImp->GetLayAction().GetCheckPageNum();
+ const sal_uInt16 nNum = pImp->GetLayAction().GetCheckPageNum();
if ( nNum == pPrevPage->GetPhyPageNum() + 1 )
pImp->GetLayAction().SetCheckPageNumDirect(
pSibling->GetPhyPageNum() );
@@ -1387,7 +1397,7 @@ sw::sidebarwindows::SidebarPosition SwPageFrm::SidebarPosition() const
|*
|*************************************************************************/
-SwTwips SwRootFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL )
+SwTwips SwRootFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool )
{
if ( !bTst )
Frm().SSize().Height() += nDist;
@@ -1398,7 +1408,7 @@ SwTwips SwRootFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL )
|* SwRootFrm::ShrinkFrm()
|*
|*************************************************************************/
-SwTwips SwRootFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL )
+SwTwips SwRootFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool )
{
OSL_ENSURE( nDist >= 0, "nDist < 0." );
OSL_ENSURE( nDist <= Frm().Height(), "nDist > als aktuelle Groesse." );
@@ -1428,7 +1438,7 @@ void SwRootFrm::RemoveSuperfluous()
{
if ( !IsSuperfluous() )
return;
- bCheckSuperfluous = FALSE;
+ bCheckSuperfluous = sal_False;
SwPageFrm *pPage = GetLastPage();
long nDocPos = LONG_MAX;
@@ -1447,7 +1457,7 @@ void SwRootFrm::RemoveSuperfluous()
// header/footer are supported now.
bool bOnlySuperfluosObjs = true;
SwSortedObjs &rObjs = *pPage->GetSortedObjs();
- for ( USHORT i = 0; bOnlySuperfluosObjs && i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; bOnlySuperfluosObjs && i < rObjs.Count(); ++i )
{
// --> OD 2004-06-29 #i28701#
SwAnchoredObject* pAnchoredObj = rObjs[i];
@@ -1497,7 +1507,7 @@ void SwRootFrm::RemoveSuperfluous()
SwPageFrm *pEmpty = pPage;
pPage = (SwPageFrm*)pPage->GetPrev();
if ( GetFmt()->GetDoc()->GetFtnIdxs().Count() )
- RemoveFtns( pEmpty, TRUE );
+ RemoveFtns( pEmpty, sal_True );
pEmpty->Cut();
delete pEmpty;
nDocPos = pPage ? pPage->Frm().Top() : 0;
@@ -1526,14 +1536,14 @@ void SwRootFrm::AssertFlyPages()
{
if ( !IsAssertFlyPages() )
return;
- bAssertFlyPages = FALSE;
+ bAssertFlyPages = sal_False;
SwDoc *pDoc = GetFmt()->GetDoc();
const SwSpzFrmFmts *pTbl = pDoc->GetSpzFrmFmts();
//Auf welche Seite will der 'letzte' Fly?
- USHORT nMaxPg = 0;
- USHORT i;
+ sal_uInt16 nMaxPg = 0;
+ sal_uInt16 i;
for ( i = 0; i < pTbl->Count(); ++i )
{
@@ -1553,7 +1563,7 @@ void SwRootFrm::AssertFlyPages()
{
//Die Seiten werden ausgehend von der letzten Seite konsequent
//nach den Regeln der PageDescs weitergefuehrt.
- BOOL bOdd = pPage->GetPhyPageNum() % 2 ? TRUE : FALSE;
+ sal_Bool bOdd = pPage->GetPhyPageNum() % 2 ? sal_True : sal_False;
SwPageDesc *pDesc = pPage->GetPageDesc();
SwFrm *pSibling = pPage->GetNext();
for ( i = pPage->GetPhyPageNum(); i < nMaxPg; ++i )
@@ -1564,16 +1574,16 @@ void SwRootFrm::AssertFlyPages()
//der naechsten Seite aufgenommen!
pPage = new SwPageFrm( pDoc->GetEmptyPageFmt(), pDesc );
pPage->Paste( this, pSibling );
- pPage->PreparePage( FALSE );
- bOdd = bOdd ? FALSE : TRUE;
+ pPage->PreparePage( sal_False );
+ bOdd = bOdd ? sal_False : sal_True;
++i;
}
pPage = new
SwPageFrm( (bOdd ? pDesc->GetRightFmt() :
pDesc->GetLeftFmt()), pDesc );
pPage->Paste( this, pSibling );
- pPage->PreparePage( FALSE );
- bOdd = bOdd ? FALSE : TRUE;
+ pPage->PreparePage( sal_False );
+ bOdd = bOdd ? sal_False : sal_True;
pDesc = pDesc->GetFollow();
}
//Jetzt koennen die Endnotenseiten natuerlich wieder krumm sein;
@@ -1590,7 +1600,7 @@ void SwRootFrm::AssertFlyPages()
bOdd = pPage->OnRightPage();
if ( pPage->GetFmt() !=
(bOdd ? pTmpDesc->GetRightFmt() : pTmpDesc->GetLeftFmt()) )
- RemoveFtns( pPage, FALSE, TRUE );
+ RemoveFtns( pPage, sal_False, sal_True );
}
}
}
@@ -1613,13 +1623,13 @@ void SwRootFrm::AssertPageFlys( SwPageFrm *pPage )
{
pPage->GetSortedObjs();
for ( int i = 0;
- pPage->GetSortedObjs() && USHORT(i) < pPage->GetSortedObjs()->Count();
+ pPage->GetSortedObjs() && sal_uInt16(i) < pPage->GetSortedObjs()->Count();
++i)
{
// --> OD 2004-06-29 #i28701#
SwFrmFmt& rFmt = (*pPage->GetSortedObjs())[i]->GetFrmFmt();
const SwFmtAnchor &rAnch = rFmt.GetAnchor();
- const USHORT nPg = rAnch.GetPageNum();
+ const sal_uInt16 nPg = rAnch.GetPageNum();
if ((rAnch.GetAnchorId() == FLY_AT_PAGE) &&
nPg != pPage->GetPhyPageNum() )
{
@@ -1658,7 +1668,7 @@ Size SwRootFrm::ChgSize( const Size& aNewSize )
{
Frm().SSize() = aNewSize;
_InvalidatePrt();
- bFixSize = FALSE;
+ bFixSize = sal_False;
return Frm().SSize();
}
@@ -1670,17 +1680,17 @@ Size SwRootFrm::ChgSize( const Size& aNewSize )
void SwRootFrm::MakeAll()
{
if ( !bValidPos )
- { bValidPos = TRUE;
+ { bValidPos = sal_True;
aFrm.Pos().X() = aFrm.Pos().Y() = DOCUMENTBORDER;
}
if ( !bValidPrtArea )
- { bValidPrtArea = TRUE;
+ { bValidPrtArea = sal_True;
aPrt.Pos().X() = aPrt.Pos().Y() = 0;
aPrt.SSize( aFrm.SSize() );
}
if ( !bValidSize )
//SSize wird von den Seiten (Cut/Paste) eingestellt.
- bValidSize = TRUE;
+ bValidSize = sal_True;
}
/*************************************************************************
@@ -1690,7 +1700,7 @@ void SwRootFrm::MakeAll()
|*************************************************************************/
void SwRootFrm::ImplInvalidateBrowseWidth()
{
- bBrowseWidthValid = FALSE;
+ bBrowseWidthValid = sal_False;
SwFrm *pPg = Lower();
while ( pPg )
{
@@ -1723,7 +1733,7 @@ void SwRootFrm::ImplCalcBrowseWidth()
if ( !pFrm )
return;
- bBrowseWidthValid = TRUE;
+ bBrowseWidthValid = sal_True;
ViewShell *pSh = GetShell();
nBrowseWidth = pSh
? MINLAY + 2 * pSh->GetOut()->
@@ -1769,12 +1779,12 @@ void SwRootFrm::ImplCalcBrowseWidth()
}
else if ( pFrm->GetDrawObjs() )
{
- for ( USHORT i = 0; i < pFrm->GetDrawObjs()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pFrm->GetDrawObjs()->Count(); ++i )
{
// --> OD 2004-06-29 #i28701#
SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
const SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt();
- const BOOL bFly = pAnchoredObj->ISA(SwFlyFrm);
+ const sal_Bool bFly = pAnchoredObj->ISA(SwFlyFrm);
if ((bFly && (WEIT_WECH == pAnchoredObj->GetObjRect().Width()))
|| rFmt.GetFrmSize().GetWidthPercent())
{
@@ -1851,13 +1861,13 @@ void SwRootFrm::StartAllAction()
} while ( pSh != GetCurrShell() );
}
-void SwRootFrm::EndAllAction( BOOL bVirDev )
+void SwRootFrm::EndAllAction( sal_Bool bVirDev )
{
ViewShell *pSh = GetCurrShell();
if ( pSh )
do
{
- const BOOL bOldEndActionByVirDev = pSh->IsEndActionByVirDev();
+ const sal_Bool bOldEndActionByVirDev = pSh->IsEndActionByVirDev();
pSh->SetEndActionByVirDev( bVirDev );
if ( pSh->ISA( SwCrsrShell ) )
{
@@ -1886,9 +1896,9 @@ void SwRootFrm::UnoRemoveAllActions()
if ( !pSh->IsInEndAction() )
{
DBG_ASSERT(!pSh->GetRestoreActions(), "Restore action count is already set!");
- BOOL bCrsr = pSh->ISA( SwCrsrShell );
- BOOL bFE = pSh->ISA( SwFEShell );
- USHORT nRestore = 0;
+ sal_Bool bCrsr = pSh->ISA( SwCrsrShell );
+ sal_Bool bFE = pSh->ISA( SwFEShell );
+ sal_uInt16 nRestore = 0;
while( pSh->ActionCount() )
{
if( bCrsr )
@@ -1905,7 +1915,7 @@ void SwRootFrm::UnoRemoveAllActions()
pSh->SetRestoreActions(nRestore);
}
// <--
- pSh->LockView(TRUE);
+ pSh->LockView(sal_True);
pSh = (ViewShell*)pSh->GetNext();
} while ( pSh != GetCurrShell() );
@@ -1917,7 +1927,7 @@ void SwRootFrm::UnoRestoreAllActions()
if ( pSh )
do
{
- USHORT nActions = pSh->GetRestoreActions();
+ sal_uInt16 nActions = pSh->GetRestoreActions();
while( nActions-- )
{
if ( pSh->ISA( SwCrsrShell ) )
@@ -1926,7 +1936,7 @@ void SwRootFrm::UnoRestoreAllActions()
pSh->StartAction();
}
pSh->SetRestoreActions(0);
- pSh->LockView(FALSE);
+ pSh->LockView(sal_False);
pSh = (ViewShell*)pSh->GetNext();
} while ( pSh != GetCurrShell() );
@@ -1945,7 +1955,7 @@ void lcl_MoveAllLowerObjs( SwFrm* pFrm, const Point& rOffset )
else
pSortedObj = pFrm->GetDrawObjs();
- for ( USHORT i = 0; pSortedObj && i < pSortedObj->Count(); ++i)
+ for ( sal_uInt16 i = 0; pSortedObj && i < pSortedObj->Count(); ++i)
{
SwAnchoredObject* pAnchoredObj = (*pSortedObj)[i];
@@ -2073,7 +2083,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
{
OSL_ENSURE( pViewOpt, "CheckViewLayout required ViewOptions" );
- const USHORT nColumns = pViewOpt->GetViewLayoutColumns();
+ const sal_uInt16 nColumns = pViewOpt->GetViewLayoutColumns();
const bool bBookMode = pViewOpt->IsViewLayoutBookMode();
if ( nColumns == mnColumns && bBookMode == mbBookMode && pVisArea->Width() == mnViewWidth && !mbSidebarChanged )
@@ -2093,8 +2103,8 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
Calc();
- const BOOL bOldCallbackActionEnabled = IsCallbackActionEnabled();
- SetCallbackActionEnabled( FALSE );
+ const sal_Bool bOldCallbackActionEnabled = IsCallbackActionEnabled();
+ SetCallbackActionEnabled( sal_False );
maPageRects.clear();
@@ -2120,7 +2130,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
SwTwips nMinPageLeft = TWIPS_MAX;
SwTwips nMaxPageRight = 0;
SwPageFrm* pStartOfRow = pPageFrm;
- USHORT nNumberOfPagesInRow = mbBookMode ? 1 : 0; // in book view, start with right page
+ sal_uInt16 nNumberOfPagesInRow = mbBookMode ? 1 : 0; // in book view, start with right page
bool bFirstRow = true;
bool bPageChanged = false;
@@ -2199,8 +2209,8 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
pLastPageInCurrentRow = static_cast<const SwPageFrm*>(pLastPageInCurrentRow->GetPrev());
// check how many times the last page would still fit into the remaining space:
- USHORT nNumberOfVirtualPages = 0;
- const USHORT nMaxNumberOfVirtualPages = mnColumns > 0 ? mnColumns - nNumberOfPagesInRow : USHRT_MAX;
+ sal_uInt16 nNumberOfVirtualPages = 0;
+ const sal_uInt16 nMaxNumberOfVirtualPages = mnColumns > 0 ? mnColumns - nNumberOfPagesInRow : USHRT_MAX;
SwTwips nRemain = nWidthRemain;
SwTwips nVirtualPagesWidth = 0;
SwTwips nLastPageWidth = pLastPageInCurrentRow->Frm().Width() + nSidebarWidth;
diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx
index c51317108bc4..aeebee1294db 100644
--- a/sw/source/core/layout/pagedesc.cxx
+++ b/sw/source/core/layout/pagedesc.cxx
@@ -70,7 +70,7 @@ SwPageDesc::SwPageDesc( const String& rName, SwFrmFmt *pFmt, SwDoc *pDc ) :
nRegHeight( 0 ),
nRegAscent( 0 ),
eUse( (UseOnPage)(nsUseOnPage::PD_ALL | nsUseOnPage::PD_HEADERSHARE | nsUseOnPage::PD_FOOTERSHARE) ),
- bLandscape( FALSE ),
+ bLandscape( sal_False ),
aFtnInfo()
{
}
@@ -168,10 +168,10 @@ void SwPageDesc::ResetAllAttr( sal_Bool bLeft )
// erfrage vom Modify Informationen
-BOOL SwPageDesc::GetInfo( SfxPoolItem & rInfo ) const
+sal_Bool SwPageDesc::GetInfo( SfxPoolItem & rInfo ) const
{
if( !aMaster.GetInfo( rInfo ) )
- return FALSE; // gefunden
+ return sal_False; // found
return aLeft.GetInfo( rInfo );
}
@@ -271,7 +271,7 @@ void SwPageDesc::RegisterChange()
void SwPageDesc::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
- const USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
SwModify::Modify( pOld, pNew );
if ( (RES_ATTRSET_CHG == nWhich) || (RES_FMT_CHG == nWhich)
@@ -284,7 +284,7 @@ void SwPageDesc::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
static const SwFrm* lcl_GetFrmOfNode( const SwNode& rNd )
{
SwModify* pMod;
- USHORT nFrmType = FRM_CNTNT;
+ sal_uInt16 nFrmType = FRM_CNTNT;
if( rNd.IsCntntNode() )
{
@@ -299,7 +299,7 @@ static const SwFrm* lcl_GetFrmOfNode( const SwNode& rNd )
pMod = 0;
Point aNullPt;
- return pMod ? ::GetFrmOfModify( *pMod, nFrmType, &aNullPt, 0, FALSE )
+ return pMod ? ::GetFrmOfModify( *pMod, nFrmType, &aNullPt, 0, sal_False )
: 0;
}
@@ -313,7 +313,7 @@ const SwPageDesc* SwPageDesc::GetPageDescOfNode(const SwNode& rNd)
}
const SwFrmFmt* SwPageDesc::GetPageFmtOfNode( const SwNode& rNd,
- BOOL bCheckForThisPgDc ) const
+ sal_Bool bCheckForThisPgDc ) const
{
// welches PageDescFormat ist fuer diesen Node gueltig?
const SwFrmFmt* pRet;
@@ -339,9 +339,9 @@ const SwFrmFmt* SwPageDesc::GetPageFmtOfNode( const SwNode& rNd,
return pRet;
}
-BOOL SwPageDesc::IsFollowNextPageOfNode( const SwNode& rNd ) const
+sal_Bool SwPageDesc::IsFollowNextPageOfNode( const SwNode& rNd ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( GetFollow() && this != GetFollow() )
{
const SwFrm* pChkFrm = lcl_GetFrmOfNode( rNd );
@@ -350,7 +350,7 @@ BOOL SwPageDesc::IsFollowNextPageOfNode( const SwNode& rNd ) const
( !pChkFrm->GetNext() || GetFollow() ==
((SwPageFrm*)pChkFrm->GetNext())->GetPageDesc() ))
// die Seite gefunden, auf die der Follow verweist
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
@@ -417,7 +417,7 @@ SwPageFtnInfo &SwPageFtnInfo::operator=( const SwPageFtnInfo& rCpy )
-BOOL SwPageFtnInfo::operator==( const SwPageFtnInfo& rCmp ) const
+sal_Bool SwPageFtnInfo::operator==( const SwPageFtnInfo& rCmp ) const
{
return ( nMaxHeight == rCmp.GetHeight() &&
nLineWidth == rCmp.nLineWidth &&
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 9c21e3ec2a4c..300cad30c146 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -31,8 +31,6 @@
#include <com/sun/star/text/HoriOrientation.hpp>
-#include <hintids.hxx>
-
#include <vcl/sound.hxx>
#include <tools/poly.hxx>
#include <svl/svstdarr.hxx>
@@ -48,9 +46,9 @@
// <--
#include <vcl/graph.hxx>
#include <svx/svdpagv.hxx>
-#include <tgrditem.hxx>
-
+#include <hintids.hxx>
+#include <tgrditem.hxx>
#include <fmtsrnd.hxx>
#include <fmtclds.hxx>
#include <tools/shl.hxx>
@@ -155,44 +153,44 @@ class SwLineRect : public SwRect
const Color *pColor;
SvxBorderStyle nStyle;
const SwTabFrm *pTab;
- BYTE nSubColor; //Hilfslinien einfaerben
- BOOL bPainted; //schon gepaintet?
- BYTE nLock; //Um die Linien zum Hell-Layer abzugrenzen.
+ sal_uInt8 nSubColor; //Hilfslinien einfaerben
+ sal_Bool bPainted; //schon gepaintet?
+ sal_uInt8 nLock; //Um die Linien zum Hell-Layer abzugrenzen.
public:
SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyle,
- const SwTabFrm *pT , const BYTE nSCol );
+ const SwTabFrm *pT , const sal_uInt8 nSCol );
const Color *GetColor() const { return pColor;}
SvxBorderStyle GetStyle() const { return nStyle; }
const SwTabFrm *GetTab() const { return pTab; }
- void SetPainted() { bPainted = TRUE; }
- void Lock( BOOL bLock ) { if ( bLock )
+ void SetPainted() { bPainted = sal_True; }
+ void Lock( sal_Bool bLock ) { if ( bLock )
++nLock;
else if ( nLock )
--nLock;
}
- BOOL IsPainted() const { return bPainted; }
- BOOL IsLocked() const { return nLock != 0; }
- BYTE GetSubColor() const { return nSubColor;}
+ sal_Bool IsPainted() const { return bPainted; }
+ sal_Bool IsLocked() const { return nLock != 0; }
+ sal_uInt8 GetSubColor() const { return nSubColor;}
- BOOL MakeUnion( const SwRect &rRect );
+ sal_Bool MakeUnion( const SwRect &rRect );
};
SV_DECL_VARARR( SwLRects, SwLineRect, 100, 100 )
class SwLineRects : public SwLRects
{
- USHORT nLastCount; //unuetze Durchlaeufe im PaintLines verhindern.
+ sal_uInt16 nLastCount; //unuetze Durchlaeufe im PaintLines verhindern.
public:
SwLineRects() : nLastCount( 0 ) {}
void AddLineRect( const SwRect& rRect, const Color *pColor, const SvxBorderStyle nStyle,
- const SwTabFrm *pTab, const BYTE nSCol );
+ const SwTabFrm *pTab, const sal_uInt8 nSCol );
void ConnectEdges( OutputDevice *pOut );
void PaintLines ( OutputDevice *pOut );
- void LockLines( BOOL bLock );
+ void LockLines( sal_Bool bLock );
/// OD 13.08.2002 - correct type of function
- USHORT Free() const { return nFree; }
+ sal_uInt16 Free() const { return nFree; }
};
class SwSubsRects : public SwLineRects
@@ -201,7 +199,7 @@ class SwSubsRects : public SwLineRects
public:
void PaintSubsidiary( OutputDevice *pOut, const SwLineRects *pRects );
- inline void Ins( const SwRect &rRect, const BYTE nSCol );
+ inline void Ins( const SwRect &rRect, const sal_uInt8 nSCol );
};
//----------------- End Klassen Umrandungen ----------------------
@@ -210,11 +208,11 @@ static ViewShell *pGlobalShell = 0;
//Wenn durchsichtige FlyInCnts im PaintBackground gepainted werden so soll der
//Hintergrund nicht mehr retouchiert werden.
-//static BOOL bLockFlyBackground = FALSE;
+//static sal_Bool bLockFlyBackground = sal_False;
//Wenn vom Fly ein Metafile abgezogen wird, so soll nur der FlyInhalt und vor
//nur hintergrund vom FlyInhalt gepaintet werden.
-static BOOL bFlyMetafile = FALSE;
+static sal_Bool bFlyMetafile = sal_False;
static OutputDevice *pFlyMetafileOut = 0;
//Die Retouche fuer Durchsichtige Flys wird vom Hintergrund der Flys
@@ -241,7 +239,7 @@ static double aEdgeScale = 0.5;
//In pSubsLines werden Hilfslinien gesammelt und zusammengefasst. Diese
//werden vor der Ausgabe mit pLines abgeglichen, so dass moeglichst keine
//Umrandungen von den Hilfslinen verdeckt werden.
-//bTablines ist waerend des Paints einer Tabelle TRUE.
+//bTablines ist waerend des Paints einer Tabelle sal_True.
static SwLineRects *pLines = 0;
static SwSubsRects *pSubsLines = 0;
// OD 18.11.2002 #99672# - global variable for sub-lines of body, header, footer,
@@ -253,7 +251,7 @@ static SfxProgress *pProgress = 0;
static SwFlyFrm *pFlyOnlyDraw = 0;
//Damit die Flys auch fuer den Hack richtig gepaintet werden koennen.
-static BOOL bTableHack = FALSE;
+static sal_Bool bTableHack = sal_False;
//Um das teure Ermitteln der RetoucheColor zu optimieren
Color aGlobalRetoucheColor;
@@ -318,7 +316,7 @@ void SwCalcPixStatics( OutputDevice *pOut )
//Zum Sichern der statics, damit das Paint (quasi) reentrant wird.
class SwSavePaintStatics
{
- BOOL bSFlyMetafile,
+ sal_Bool bSFlyMetafile,
bSPageOnly;
ViewShell *pSGlobalShell;
OutputDevice *pSFlyMetafileOut;
@@ -368,7 +366,7 @@ SwSavePaintStatics::SwSavePaintStatics() :
aSScaleX ( aScaleX ),
aSScaleY ( aScaleY )
{
- bFlyMetafile = FALSE;
+ bFlyMetafile = sal_False;
pFlyMetafileOut = 0;
pRetoucheFly = 0;
pRetoucheFly2 = 0;
@@ -417,18 +415,18 @@ SV_IMPL_VARARR( SwLRects, SwLineRect );
SwLineRect::SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyl,
- const SwTabFrm *pT, const BYTE nSCol ) :
+ const SwTabFrm *pT, const sal_uInt8 nSCol ) :
SwRect( rRect ),
pColor( pCol ),
nStyle( nStyl ),
pTab( pT ),
nSubColor( nSCol ),
- bPainted( FALSE ),
+ bPainted( sal_False ),
nLock( 0 )
{
}
-BOOL SwLineRect::MakeUnion( const SwRect &rRect )
+sal_Bool SwLineRect::MakeUnion( const SwRect &rRect )
{
//Es wurde bereits ausserhalb geprueft, ob die Rechtecke die gleiche
//Ausrichtung (horizontal bzw. vertikal), Farbe usw. besitzen.
@@ -443,7 +441,7 @@ BOOL SwLineRect::MakeUnion( const SwRect &rRect )
{
Bottom( Max( Bottom(), rRect.Bottom() ) );
Top ( Min( Top(), rRect.Top() ) );
- return TRUE;
+ return sal_True;
}
}
}
@@ -458,19 +456,19 @@ BOOL SwLineRect::MakeUnion( const SwRect &rRect )
{
Right( Max( Right(), rRect.Right() ) );
Left ( Min( Left(), rRect.Left() ) );
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
void SwLineRects::AddLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyle,
- const SwTabFrm *pTab, const BYTE nSCol )
+ const SwTabFrm *pTab, const sal_uInt8 nSCol )
{
//Rueckwaerts durch, weil Linien die zusammengefasst werden koennen i.d.R.
//im gleichen Kontext gepaintet werden.
- for ( USHORT i = Count(); i ; )
+ for ( sal_uInt16 i = Count(); i ; )
{
SwLineRect &rLRect = operator[](--i);
//Pruefen von Ausrichtung, Farbe, Tabelle.
@@ -502,13 +500,13 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
for ( int i = 0; i < (int)Count(); ++i )
{
- SwLineRect &rL1 = operator[](USHORT(i));
+ SwLineRect &rL1 = operator[](sal_uInt16(i));
if ( !rL1.GetTab() || rL1.IsPainted() || rL1.IsLocked() )
continue;
aCheck.Remove( 0, aCheck.Count() );
- const BOOL bVert = rL1.Height() > rL1.Width();
+ const sal_Bool bVert = rL1.Height() > rL1.Width();
long nL1a, nL1b, nL1c, nL1d;
if ( bVert )
@@ -523,13 +521,13 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
}
//Alle moeglicherweise mit i1 zu verbindenden Linien einsammeln.
- for ( USHORT i2 = 0; i2 < Count(); ++i2 )
+ for ( sal_uInt16 i2 = 0; i2 < Count(); ++i2 )
{
SwLineRect &rL2 = operator[](i2);
if ( rL2.GetTab() != rL1.GetTab() ||
rL2.IsPainted() ||
rL2.IsLocked() ||
- bVert == (rL2.Height() > rL2.Width()) )
+ (bVert == (rL2.Height() > rL2.Width())) )
continue;
long nL2a, nL2b, nL2c, nL2d;
@@ -556,14 +554,14 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
if ( aCheck.Count() < 2 )
continue;
- BOOL bRemove = FALSE;
+ sal_Bool bRemove = sal_False;
//Fuer jede Linie jede alle folgenden checken.
- for ( USHORT k = 0; !bRemove && k < aCheck.Count(); ++k )
+ for ( sal_uInt16 k = 0; !bRemove && k < aCheck.Count(); ++k )
{
SwLineRect &rR1 = (SwLineRect&)*(SwLineRect*)aCheck[k];
- for ( USHORT k2 = k+1; !bRemove && k2 < aCheck.Count(); ++k2 )
+ for ( sal_uInt16 k2 = k+1; !bRemove && k2 < aCheck.Count(); ++k2 )
{
SwLineRect &rR2 = (SwLineRect&)*(SwLineRect*)aCheck[k2];
if ( bVert )
@@ -590,7 +588,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
aIns.Bottom( pLA->Bottom() );
if ( !rL1.IsInside( aIns ) )
continue;
- const USHORT nTmpFree = Free();
+ const sal_uInt16 nTmpFree = Free();
Insert( SwLineRect( aIns, rL1.GetColor(), SOLID,
rL1.GetTab(), SUBCOL_TAB ), Count() );
if ( !nTmpFree )
@@ -604,7 +602,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
if ( rL1.Bottom() > pLB->Bottom() )
rL1.Top( pLB->Top() ); //i1 nach oben verlaengern
else
- bRemove = TRUE; //abbrechen, i1 entfernen
+ bRemove = sal_True; //abbrechen, i1 entfernen
}
}
else
@@ -631,7 +629,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
aIns.Right( pLA->Right() );
if ( !rL1.IsInside( aIns ) )
continue;
- const USHORT nTmpFree = Free();
+ const sal_uInt16 nTmpFree = Free();
Insert( SwLineRect( aIns, rL1.GetColor(), SOLID,
rL1.GetTab(), SUBCOL_TAB ), Count() );
if ( !nTmpFree )
@@ -644,20 +642,20 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
if ( rL1.Right() > pLB->Right() )
rL1.Left( pLB->Left() );
else
- bRemove = TRUE;
+ bRemove = sal_True;
}
}
}
}
if ( bRemove )
{
- Remove( static_cast<USHORT>(i), 1 );
+ Remove( static_cast<sal_uInt16>(i), 1 );
--i; //keinen auslassen!
}
}
}
-inline void SwSubsRects::Ins( const SwRect &rRect, const BYTE nSCol )
+inline void SwSubsRects::Ins( const SwRect &rRect, const sal_uInt8 nSCol )
{
//Linien die kuerzer als die breiteste Linienbreite sind werden
//nicht aufgenommen.
@@ -669,7 +667,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects )
{
//Alle Hilfslinien, die sich mit irgendwelchen Umrandungen decken werden
//entfernt bzw. zerstueckelt..
- for ( USHORT i = 0; i < Count(); ++i )
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
{
// OD 18.11.2002 #99672# - get a copy instead of a reference, because
// an <insert> may destroy the object due to a necessary array resize.
@@ -693,7 +691,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects )
aSubsRect.Top ( aSubsRect.Top() - (nPixelSzH+nHalfPixelSzH) );
aSubsRect.Bottom( aSubsRect.Bottom() + (nPixelSzH+nHalfPixelSzH) );
}
- for ( USHORT k = 0; k < rRects.Count(); ++k )
+ for ( sal_uInt16 k = 0; k < rRects.Count(); ++k )
{
SwLineRect &rLine = rRects[k];
@@ -765,9 +763,9 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects )
}
}
-void SwLineRects::LockLines( BOOL bLock )
+void SwLineRects::LockLines( sal_Bool bLock )
{
- for ( USHORT i = 0; i < Count(); ++i )
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
operator[](i).Lock( bLock );
}
@@ -827,9 +825,9 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
ConnectEdges( pOut );
const Color *pLast = 0;
- BOOL bPaint2nd = FALSE;
- USHORT nMinCount = Count();
- USHORT i;
+ sal_Bool bPaint2nd = sal_False;
+ sal_uInt16 nMinCount = Count();
+ sal_uInt16 i;
for ( i = 0; i < Count(); ++i )
{
@@ -845,7 +843,7 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
}
//Jetzt malen oder erst in der zweiten Runde?
- BOOL bPaint = TRUE;
+ sal_Bool bPaint = sal_True;
if ( rLRect.GetTab() )
{
if ( rLRect.Height() > rLRect.Width() )
@@ -857,7 +855,7 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
nTRight = rLRect.GetTab()->Frm().Left() + rLRect.GetTab()->Prt().Right();
if ( (nTLeft >= nLLeft && nTLeft <= nLRight) ||
(nTRight>= nLLeft && nTRight<= nLRight) )
- bPaint = FALSE;
+ bPaint = sal_False;
}
else
{ //Waagerechte Kante, ueberlappt sie mit der Tabellenkante?
@@ -867,7 +865,7 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
nTBottom = rLRect.GetTab()->Frm().Top() + rLRect.GetTab()->Prt().Bottom();
if ( (nTTop >= nLTop && nTTop <= nLBottom) ||
(nTBottom >= nLTop && nTBottom <= nLBottom) )
- bPaint = FALSE;
+ bPaint = sal_False;
}
}
if ( bPaint )
@@ -876,7 +874,7 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
{
pLast = rLRect.GetColor();
- ULONG nOldDrawMode = pOut->GetDrawMode();
+ sal_uLong nOldDrawMode = pOut->GetDrawMode();
if( pGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
pOut->SetDrawMode( 0 );
@@ -890,7 +888,7 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
rLRect.SetPainted();
}
else
- bPaint2nd = TRUE;
+ bPaint2nd = sal_True;
}
if ( bPaint2nd )
for ( i = 0; i < Count(); ++i )
@@ -909,7 +907,7 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
{
pLast = rLRect.GetColor();
- ULONG nOldDrawMode = pOut->GetDrawMode();
+ sal_uLong nOldDrawMode = pOut->GetDrawMode();
if( pGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
@@ -938,12 +936,12 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut,
// <--
//Alle Hilfslinien, die sich fast decken entfernen (Tabellen)
- for ( USHORT i = 0; i < Count(); ++i )
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
{
SwLineRect &rLi = operator[](i);
const bool bVerticalSubs = rLi.Height() > rLi.Width();
- for ( USHORT k = i+1; k < Count(); ++k )
+ for ( sal_uInt16 k = i+1; k < Count(); ++k )
{
SwLineRect &rLk = operator[](k);
if ( rLi.SSize() == rLk.SSize() )
@@ -995,14 +993,14 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut,
// mode in order to get fill color set at output device.
// Recover draw mode after draw of lines.
// Necessary for the subsidiary lines painted by the fly frames.
- ULONG nOldDrawMode = pOut->GetDrawMode();
+ sal_uLong nOldDrawMode = pOut->GetDrawMode();
if( pGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
pOut->SetDrawMode( 0 );
}
- for ( USHORT i = 0; i < Count(); ++i )
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
{
SwLineRect &rLRect = operator[](i);
// OD 19.12.2002 #106318# - add condition <!rLRect.IsLocked()>
@@ -1239,7 +1237,7 @@ long MA_FASTCALL lcl_MinWidthDist( const long nDist )
//Ermittelt PrtArea plus Umrandung plus Schatten.
void MA_FASTCALL lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm,
const SwBorderAttrs &rAttrs,
- const BOOL bShadow )
+ const sal_Bool bShadow )
{
// OD 23.01.2003 #106386# - special handling for cell frames.
// The printing area of a cell frame is completely enclosed in the frame area
@@ -1263,9 +1261,11 @@ void MA_FASTCALL lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm,
if ( rAttrs.IsLine() || rAttrs.IsBorderDist() ||
(bShadow && rAttrs.GetShadow().GetLocation() != SVX_SHADOW_NONE) )
{
- SwRectFn fnRect = pFrm->IsVertical() ? fnRectVert : fnRectHori;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ SwRectFn fnRect = pFrm->IsVertical() ? ( pFrm->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
+
const SvxBoxItem &rBox = rAttrs.GetBox();
- const BOOL bTop = 0 != (pFrm->*fnRect->fnGetTopMargin)();
+ const sal_Bool bTop = 0 != (pFrm->*fnRect->fnGetTopMargin)();
if ( bTop )
{
SwTwips nDiff = rBox.GetTop() ?
@@ -1278,7 +1278,7 @@ void MA_FASTCALL lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm,
(rRect.*fnRect->fnSubTop)( nDiff );
}
- const BOOL bBottom = 0 != (pFrm->*fnRect->fnGetBottomMargin)();
+ const sal_Bool bBottom = 0 != (pFrm->*fnRect->fnGetBottomMargin)();
if ( bBottom )
{
SwTwips nDiff = 0;
@@ -1362,7 +1362,7 @@ void MA_FASTCALL lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
if ( !pRetoucheFly )
pRetoucheFly = pRetoucheFly2;
- for ( USHORT j = 0; (j < rObjs.Count()) && rRegion.Count(); ++j )
+ for ( sal_uInt16 j = 0; (j < rObjs.Count()) && rRegion.Count(); ++j )
{
const SwAnchoredObject* pAnchoredObj = rObjs[j];
const SdrObject* pSdrObj = pAnchoredObj->GetDrawObj();
@@ -1384,8 +1384,8 @@ void MA_FASTCALL lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
pGlobalShell->IsPreView()))
continue;
- const BOOL bLowerOfSelf = pSelfFly && pFly->IsLowerOf( pSelfFly ) ?
- TRUE : FALSE;
+ const sal_Bool bLowerOfSelf = pSelfFly && pFly->IsLowerOf( pSelfFly ) ?
+ sal_True : sal_False;
//Bei zeichengebundenem Fly nur diejenigen betrachten, in denen er
//nicht selbst verankert ist.
@@ -1410,7 +1410,7 @@ void MA_FASTCALL lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
}
#endif
- BOOL bStopOnHell = TRUE;
+ sal_Bool bStopOnHell = sal_True;
if ( pSelfFly )
{
const SdrObject *pTmp = pSelfFly->GetVirtDrawObj();
@@ -1426,7 +1426,7 @@ void MA_FASTCALL lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
//Aus anderem Layer interessieren uns nur nicht transparente
//oder innenliegende
continue;
- bStopOnHell = FALSE;
+ bStopOnHell = sal_False;
}
}
if ( pRetoucheFly )
@@ -1444,14 +1444,14 @@ void MA_FASTCALL lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
//Aus anderem Layer interessieren uns nur nicht transparente
//oder innenliegende
continue;
- bStopOnHell = FALSE;
+ bStopOnHell = sal_False;
}
}
//Wenn der Inhalt des Fly Transparent ist, wird er nicht abgezogen, es sei denn
//er steht im Hell-Layer (#31941#)
const IDocumentDrawModelAccess* pIDDMA = pFly->GetFmt()->getIDocumentDrawModelAccess();
- BOOL bHell = pSdrObj->GetLayer() == pIDDMA->GetHellId();
+ sal_Bool bHell = pSdrObj->GetLayer() == pIDDMA->GetHellId();
if ( (bStopOnHell && bHell) ||
/// OD 05.08.2002 - change internal order of condition
/// first check "!bHell", then "..->Lower()" and "..->IsNoTxtFrm()"
@@ -1489,7 +1489,7 @@ void MA_FASTCALL lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
SwRect aRect;
SwBorderAttrAccess aAccess( SwFrm::GetCache(), (SwFrm*)pFly );
const SwBorderAttrs &rAttrs = *aAccess.Get();
- ::lcl_CalcBorderRect( aRect, pFly, rAttrs, TRUE );
+ ::lcl_CalcBorderRect( aRect, pFly, rAttrs, sal_True );
rRegion -= aRect;
continue;
}
@@ -1510,7 +1510,7 @@ void MA_FASTCALL lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
SwRect aRect;
SwBorderAttrAccess aAccess( SwFrm::GetCache(), (SwFrm*)pFly );
const SwBorderAttrs &rAttrs = *aAccess.Get();
- ::lcl_CalcBorderRect( aRect, pFly, rAttrs, TRUE );
+ ::lcl_CalcBorderRect( aRect, pFly, rAttrs, sal_True );
rRegion -= aRect;
}
else
@@ -1638,7 +1638,7 @@ inline void lcl_DrawGraphicBackgrd( const SvxBrushItem& _rBackgrdBrush,
/// OD 25.09.2002 #99739# - pixel-align coordinations for drawing graphic.
/// OD 17.10.2002 #103876# - outsource code for drawing background of the graphic
/// with a background color in method <lcl_DrawGraphicBackgrd>
-/// Also, change type of <bGrfNum> and <bClip> from <BOOL> to <bool>.
+/// Also, change type of <bGrfNum> and <bClip> from <sal_Bool> to <bool>.
void lcl_DrawGraphic( const SvxBrushItem& rBrush, OutputDevice *pOut,
ViewShell &rSh, const SwRect &rGrf, const SwRect &rOut,
bool bClip, bool bGrfNum,
@@ -1652,7 +1652,7 @@ void lcl_DrawGraphic( const SvxBrushItem& rBrush, OutputDevice *pOut,
SwRect aAlignedGrfRect = rGrf;
::SwAlignRect( aAlignedGrfRect, &rSh );
- /// OD 17.10.2002 #103876# - change type from <BOOL> to <bool>.
+ /// OD 17.10.2002 #103876# - change type from <sal_Bool> to <bool>.
const bool bNotInside = bClip && !rOut.IsInside( aAlignedGrfRect );
if ( bNotInside )
{
@@ -1681,13 +1681,13 @@ void MA_FASTCALL DrawGraphic( const SvxBrushItem *pBrush,
OutputDevice *pOutDev,
const SwRect &rOrg,
const SwRect &rOut,
- const BYTE nGrfNum,
+ const sal_uInt8 nGrfNum,
const sal_Bool bConsiderBackgroundTransparency )
/// OD 05.08.2002 #99657# - add 6th parameter to indicate that method should
/// consider background transparency, saved in the color of the brush item
{
ViewShell &rSh = *pGlobalShell;
- /// OD 17.10.2002 #103876# - change type from <BOOL> to <bool>
+ /// OD 17.10.2002 #103876# - change type from <sal_Bool> to <bool>
bool bReplaceGrfNum = GRFNUM_REPLACE == nGrfNum;
bool bGrfNum = GRFNUM_NO != nGrfNum;
Size aGrfSize;
@@ -1724,8 +1724,8 @@ void MA_FASTCALL DrawGraphic( const SvxBrushItem *pBrush,
SwRect aGrf;
aGrf.SSize( aGrfSize );
- BOOL bDraw = TRUE;
- BOOL bRetouche = TRUE;
+ sal_Bool bDraw = sal_True;
+ sal_Bool bRetouche = sal_True;
switch ( ePos )
{
case GPOS_LT:
@@ -1844,12 +1844,12 @@ void MA_FASTCALL DrawGraphic( const SvxBrushItem *pBrush,
pOutDev->Pop();
// set <bDraw> and <bRetouche> to false, indicating that background
// graphic and background are already drawn.
- bDraw = bRetouche = FALSE;
+ bDraw = bRetouche = sal_False;
}
break;
case GPOS_NONE:
- bDraw = FALSE;
+ bDraw = sal_False;
break;
default: OSL_ENSURE( !pOutDev, "new Graphic position?" );
@@ -1920,7 +1920,7 @@ void MA_FASTCALL DrawGraphic( const SvxBrushItem *pBrush,
// --> OD 2008-06-02 #i75614#
// reset draw mode in high contrast mode in order to get fill color set
- const ULONG nOldDrawMode = pOutDev->GetDrawMode();
+ const sal_uLong nOldDrawMode = pOutDev->GetDrawMode();
if ( pGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
@@ -1991,7 +1991,7 @@ void MA_FASTCALL DrawGraphic( const SvxBrushItem *pBrush,
else
bGrfBackgrdAlreadyDrawn = true;
/// loop rectangles of background region, which has to be drawn
- for( USHORT i = 0; i < aRegion.Count(); ++i )
+ for( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
{
pOutDev->DrawRect( aRegion[i].SVRect() );
}
@@ -2279,7 +2279,7 @@ void SwTabFrmPainter::PaintLines( OutputDevice& rDev, const SwRect& rRect ) cons
// high contrast mode:
// overrides the color of non-subsidiary lines.
const Color* pHCColor = 0;
- ULONG nOldDrawMode = rDev.GetDrawMode();
+ sal_uLong nOldDrawMode = rDev.GetDrawMode();
if( pGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
@@ -2756,13 +2756,14 @@ void SwTabFrmPainter::Insert( SwLineEntry& rNew, bool bHori )
|*
|*************************************************************************/
-void SwRootFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) const
+void
+SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
{
OSL_ENSURE( Lower() && Lower()->IsPageFrm(), "Lower der Root keine Seite." );
PROTOCOL( this, PROT_FILE_INIT, 0, 0)
- BOOL bResetRootPaint = FALSE;
+ sal_Bool bResetRootPaint = sal_False;
ViewShell *pSh = pCurrShell;
if ( pSh->GetWin() )
@@ -2778,7 +2779,7 @@ void SwRootFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) con
}
}
else
- SwRootFrm::bInPaint = bResetRootPaint = TRUE;
+ SwRootFrm::bInPaint = bResetRootPaint = sal_True;
SwSavePaintStatics *pStatics = 0;
if ( pGlobalShell )
@@ -2817,9 +2818,9 @@ void SwRootFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) con
{
((SwRootFrm*)this)->ResetTurbo();
SwLayAction aAction( (SwRootFrm*)this, pSh->Imp() );
- aAction.SetPaint( FALSE );
- aAction.SetComplete( FALSE );
- aAction.SetReschedule( pProgress ? TRUE : FALSE );
+ aAction.SetPaint( sal_False );
+ aAction.SetComplete( sal_False );
+ aAction.SetReschedule( pProgress ? sal_True : sal_False );
aAction.Action();
((SwRootFrm*)this)->ResetTurboFlag();
if ( !pSh->ActionPend() )
@@ -2829,7 +2830,7 @@ void SwRootFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) con
SwRect aRect( rRect );
aRect.Intersection( pSh->VisArea() );
- const BOOL bExtraData = ::IsExtraData( GetFmt()->GetDoc() );
+ const sal_Bool bExtraData = ::IsExtraData( GetFmt()->GetDoc() );
pLines = new SwLineRects; //Sammler fuer Umrandungen.
@@ -2838,7 +2839,7 @@ void SwRootFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) con
// of the document. Dangerous! We better set this flag to
// avoid the reformat.
const sal_Bool bOldAction = IsCallbackActionEnabled();
- ((SwRootFrm*)this)->SetCallbackActionEnabled( FALSE );
+ ((SwRootFrm*)this)->SetCallbackActionEnabled( sal_False );
const SwPageFrm *pPage = pSh->Imp()->GetFirstVisPage();
@@ -2940,18 +2941,18 @@ void SwRootFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) con
/// calls, paint <hell> or <heaven>
const Color aPageBackgrdColor = pPage->GetDrawBackgrdColor();
- pPage->PaintBaBo( aPaintRect, pPage, TRUE );
+ pPage->PaintBaBo( aPaintRect, pPage, sal_True );
if ( pSh->Imp()->HasDrawView() )
{
- pLines->LockLines( TRUE );
+ pLines->LockLines( sal_True );
// OD 29.08.2002 #102450# - add 3rd parameter
// OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction.
const IDocumentDrawModelAccess* pIDDMA = pSh->getIDocumentDrawModelAccess();
pSh->Imp()->PaintLayer( pIDDMA->GetHellId(), pPrintData, aPaintRect,
&aPageBackgrdColor, (pPage->IsRightToLeft() ? true : false) );
pLines->PaintLines( pSh->GetOut() );
- pLines->LockLines( FALSE );
+ pLines->LockLines( sal_False );
}
if( pSh->GetWin() )
@@ -3080,7 +3081,7 @@ void SwRootFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) con
DELETEZ( pLines );
if ( bResetRootPaint )
- SwRootFrm::bInPaint = FALSE;
+ SwRootFrm::bInPaint = sal_False;
if ( pStatics )
delete pStatics;
else
@@ -3115,14 +3116,14 @@ class SwShortCut
long nLimit;
public:
SwShortCut( const SwFrm& rFrm, const SwRect& rRect );
- BOOL Stop( const SwRect& rRect ) const
+ sal_Bool Stop( const SwRect& rRect ) const
{ return (rRect.*fnCheck)( nLimit ) > 0; }
};
SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect )
{
- BOOL bVert = rFrm.IsVertical();
- BOOL bR2L = rFrm.IsRightToLeft();
+ sal_Bool bVert = rFrm.IsVertical();
+ sal_Bool bR2L = rFrm.IsRightToLeft();
if( rFrm.IsNeighbourFrm() && bVert == bR2L )
{
if( bVert )
@@ -3143,12 +3144,21 @@ SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect )
}
else
{
- fnCheck = &SwRect::GetRightDistance;
- nLimit = rRect.Left();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( rFrm.IsVertLR() )
+ {
+ fnCheck = &SwRect::GetLeftDistance;
+ nLimit = rRect.Right();
+ }
+ else
+ {
+ fnCheck = &SwRect::GetRightDistance;
+ nLimit = rRect.Left();
+ }
}
}
-void SwLayoutFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const
+void SwLayoutFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
ViewShell *pSh = GetShell();
@@ -3162,8 +3172,8 @@ void SwLayoutFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData
return;
SwShortCut aShortCut( *pFrm, rRect );
- BOOL bCnt;
- if ( TRUE == (bCnt = pFrm->IsCntntFrm()) )
+ sal_Bool bCnt;
+ if ( sal_True == (bCnt = pFrm->IsCntntFrm()) )
pFrm->Calc();
if ( pFrm->IsFtnContFrm() )
@@ -3173,7 +3183,7 @@ void SwLayoutFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData
}
const SwPageFrm *pPage = 0;
- const BOOL bWin = pGlobalShell->GetWin() ? TRUE : FALSE;
+ const sal_Bool bWin = pGlobalShell->GetWin() ? sal_True : sal_False;
while ( IsAnLower( pFrm ) )
{
@@ -3226,7 +3236,7 @@ void SwLayoutFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData
{
pGlobalShell->InvalidateWindows( aPaintRect );
pFrm = pFrm->GetNext();
- if ( pFrm && (TRUE == (bCnt = pFrm->IsCntntFrm())) )
+ if ( pFrm && (sal_True == (bCnt = pFrm->IsCntntFrm())) )
pFrm->Calc();
continue;
}
@@ -3257,7 +3267,7 @@ void SwLayoutFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData
::lcl_EmergencyFormatFtnCont( (SwFtnContFrm*)pFrm->GetNext() );
pFrm = pFrm->GetNext();
- if ( pFrm && (TRUE == (bCnt = pFrm->IsCntntFrm())) )
+ if ( pFrm && (sal_True == (bCnt = pFrm->IsCntntFrm())) )
pFrm->Calc();
}
}
@@ -3339,15 +3349,15 @@ sal_Bool SwFlyFrm::IsShadowTransparent() const
|*
|*************************************************************************/
-BOOL SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh )
+sal_Bool SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh )
{
SdrObjUserCall *pUserCall;
if ( 0 == ( pUserCall = GetUserCall(pObj) ) )
- return TRUE;
+ return sal_True;
//Attributabhaengig nicht fuer Drucker oder PreView painten
- BOOL bPaint = pFlyOnlyDraw ||
+ sal_Bool bPaint = pFlyOnlyDraw ||
((SwContact*)pUserCall)->GetFmt()->GetPrint().GetValue();
if ( !bPaint )
bPaint = pSh->GetWin() && !pSh->IsPreView();
@@ -3360,7 +3370,7 @@ BOOL SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh )
{
SwFlyFrm *pFly = ((SwVirtFlyDrawObj*)pObj)->GetFlyFrm();
if ( pFlyOnlyDraw && pFlyOnlyDraw == pFly )
- return TRUE;
+ return sal_True;
//Die Anzeige eines Zwischenstadiums vermeiden, Flys die nicht mit
//der Seite auf der sie verankert sind ueberlappen werden auch
@@ -3422,10 +3432,10 @@ BOOL SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh )
bPaint = SwFlyFrm::IsPaint( pAnch->FindFlyFrm()->GetVirtDrawObj(),
pSh );
else if ( pFlyOnlyDraw )
- bPaint = FALSE;
+ bPaint = sal_False;
}
else
- bPaint = FALSE;
+ bPaint = sal_False;
}
return bPaint;
}
@@ -3433,7 +3443,7 @@ BOOL SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh )
/*************************************************************************
|* SwCellFrm::Paint( const SwRect& ) const
|*************************************************************************/
-void SwCellFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const
+void SwCellFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
if ( GetLayoutRowSpan() >= 1 )
SwLayoutFrm::Paint( rRect );
@@ -3449,12 +3459,12 @@ void SwCellFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */
void MA_FASTCALL lcl_PaintLowerBorders( const SwLayoutFrm *pLay,
const SwRect &rRect, const SwPageFrm *pPage );
-void SwFlyFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const
+void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
//wegen der Ueberlappung von Rahmen und Zeichenobjekten muessen die
//Flys ihre Umrandung (und die der Innenliegenden) direkt ausgeben.
//z.B. #33066#
- pLines->LockLines(TRUE);
+ pLines->LockLines(sal_True);
SwRect aRect( rRect );
aRect._Intersection( Frm() );
@@ -3535,7 +3545,7 @@ void SwFlyFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */
const SwBorderAttrs &rAttrs = *aAccess.Get();
SwRect aPaintRect( aRect );
aPaintRect._Intersection( pParentFlyFrm->Frm() );
- pParentFlyFrm->PaintBackground( aPaintRect, pPage, rAttrs, FALSE, FALSE );
+ pParentFlyFrm->PaintBackground( aPaintRect, pPage, rAttrs, sal_False, sal_False );
pRetoucheFly2 = pOldRet;
}
@@ -3591,13 +3601,13 @@ void SwFlyFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */
{
pOut->SetClipRegion( aPoly );
}
- for ( USHORT i = 0; i < aRegion.Count(); ++i )
- PaintBackground( aRegion[i], pPage, rAttrs, FALSE, TRUE );
+ for ( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
+ PaintBackground( aRegion[i], pPage, rAttrs, sal_False, sal_True );
pOut->Pop();
}
else
- for ( USHORT i = 0; i < aRegion.Count(); ++i )
- PaintBackground( aRegion[i], pPage, rAttrs, FALSE, TRUE );
+ for ( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
+ PaintBackground( aRegion[i], pPage, rAttrs, sal_False, sal_True );
}
pOut->Pop();
@@ -3614,7 +3624,7 @@ void SwFlyFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */
if ( pSubsLines )
{
// Lock already existing subsidiary lines
- pSubsLines->LockLines( TRUE );
+ pSubsLines->LockLines( sal_True );
bSubsLineRectsCreated = false;
}
else
@@ -3628,7 +3638,7 @@ void SwFlyFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */
if ( pSpecSubsLines )
{
// Lock already existing special subsidiary lines
- pSpecSubsLines->LockLines( TRUE );
+ pSpecSubsLines->LockLines( sal_True );
bSpecSubsLineRectsCreated = false;
}
else
@@ -3644,14 +3654,14 @@ void SwFlyFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */
pSubsLines->PaintSubsidiary( pOut, pLines );
if ( !bSubsLineRectsCreated )
// unlock subsidiary lines
- pSubsLines->LockLines( FALSE );
+ pSubsLines->LockLines( sal_False );
else
// delete created subsidiary lines container
DELETEZ( pSubsLines );
if ( !bSpecSubsLineRectsCreated )
// unlock special subsidiary lines
- pSpecSubsLines->LockLines( FALSE );
+ pSpecSubsLines->LockLines( sal_False );
else
{
// delete created special subsidiary lines container
@@ -3666,7 +3676,7 @@ void SwFlyFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */
// OD 19.12.2002 #106318# - first paint lines added by fly frame paint
// and then unlock other lines.
pLines->PaintLines( pOut );
- pLines->LockLines( FALSE );
+ pLines->LockLines( sal_False );
pOut->Pop();
@@ -3679,7 +3689,7 @@ void SwFlyFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */
|*
|*************************************************************************/
-void SwTabFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const
+void SwTabFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
if ( pGlobalShell->GetViewOptions()->IsTable() )
{
@@ -3693,7 +3703,7 @@ void SwTabFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */
if ( rAttrs.GetShadow().GetLocation() != SVX_SHADOW_NONE )
{
SwRect aRect;
- ::lcl_CalcBorderRect( aRect, this, rAttrs, TRUE );
+ ::lcl_CalcBorderRect( aRect, this, rAttrs, sal_True );
PaintShadow( rRect, aRect, rAttrs );
}
@@ -3741,9 +3751,9 @@ void SwFrm::PaintShadow( const SwRect& rRect, SwRect& rOutRect,
SwRects aRegion( 2, 2 );
SwRect aOut( rOutRect );
- const BOOL bCnt = IsCntntFrm();
- const BOOL bTop = !bCnt || rAttrs.GetTopLine ( *(this) ) ? TRUE : FALSE;
- const BOOL bBottom = !bCnt || rAttrs.GetBottomLine( *(this) ) ? TRUE : FALSE;
+ const sal_Bool bCnt = IsCntntFrm();
+ const sal_Bool bTop = !bCnt || rAttrs.GetTopLine ( *(this) ) ? sal_True : sal_False;
+ const sal_Bool bBottom = !bCnt || rAttrs.GetBottomLine( *(this) ) ? sal_True : sal_False;
SvxShadowLocation eLoc = rShadow.GetLocation();
@@ -3891,7 +3901,7 @@ void SwFrm::PaintShadow( const SwRect& rRect, SwRect& rOutRect,
OutputDevice *pOut = pGlobalShell->GetOut();
- ULONG nOldDrawMode = pOut->GetDrawMode();
+ sal_uLong nOldDrawMode = pOut->GetDrawMode();
Color aShadowColor( rShadow.GetColor() );
if( aRegion.Count() && pGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
@@ -3909,7 +3919,7 @@ void SwFrm::PaintShadow( const SwRect& rRect, SwRect& rOutRect,
pOut->SetDrawMode( nOldDrawMode );
- for ( USHORT i = 0; i < aRegion.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
{
SwRect &rOut = aRegion[i];
aOut = rOut;
@@ -3949,7 +3959,7 @@ void SwFrm::PaintBorderLine( const SwRect& rRect,
aOut._Intersection( rRect );
const SwTabFrm *pTab = IsCellFrm() ? FindTabFrm() : 0;
- BYTE nSubCol = ( IsCellFrm() || IsRowFrm() ) ? SUBCOL_TAB :
+ sal_uInt8 nSubCol = ( IsCellFrm() || IsRowFrm() ) ? SUBCOL_TAB :
( IsInSct() ? SUBCOL_SECT :
( IsInFly() ? SUBCOL_FLY : SUBCOL_PAGE ) );
if( pColor && pGlobalShell->GetWin() &&
@@ -3962,7 +3972,7 @@ void SwFrm::PaintBorderLine( const SwRect& rRect,
{
SwRegionRects aRegion( aOut, 4, 1 );
::lcl_SubtractFlys( this, pPage, aOut, aRegion );
- for ( USHORT i = 0; i < aRegion.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
pLines->AddLineRect( aRegion[i], pColor, nStyle, pTab, nSubCol );
}
else
@@ -3990,7 +4000,7 @@ void MA_FASTCALL lcl_SubTopBottom( SwRect& _iorRect,
const SwRectFn& _rRectFn,
const sal_Bool _bPrtOutputDev )
{
- const BOOL bCnt = _rFrm.IsCntntFrm();
+ const sal_Bool bCnt = _rFrm.IsCntntFrm();
if ( _rBox.GetTop() && _rBox.GetTop()->GetInWidth() &&
( !bCnt || _rAttrs.GetTopLine( _rFrm ) )
)
@@ -4154,7 +4164,7 @@ void lcl_PaintLeftRightLine( const sal_Bool _bLeft,
(aRect.*_rRectFn->fnGetWidth)() );
}
- const BOOL bCnt = _rFrm.IsCntntFrm();
+ const sal_Bool bCnt = _rFrm.IsCntntFrm();
if ( bCnt )
{
@@ -4689,8 +4699,8 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
if ( !pPage )
pPage = FindPageFrm();
- ::lcl_CalcBorderRect( aRect, this, rAttrs, TRUE );
- rAttrs.SetGetCacheLine( TRUE );
+ ::lcl_CalcBorderRect( aRect, this, rAttrs, sal_True );
+ rAttrs.SetGetCacheLine( sal_True );
if ( bShadow )
PaintShadow( rRect, aRect, rAttrs );
// OD 27.09.2002 #103636# - suspend drawing of border
@@ -4739,7 +4749,7 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
}
}
}
- rAttrs.SetGetCacheLine( FALSE );
+ rAttrs.SetGetCacheLine( sal_False );
}
}
/*************************************************************************
@@ -4823,8 +4833,9 @@ void SwLayoutFrm::PaintColLines( const SwRect &rRect, const SwFmtCol &rFmtCol,
const SwFrm *pCol = Lower();
if ( !pCol || !pCol->IsColumnFrm() )
return;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ SwRectFn fnRect = pCol->IsVertical() ? ( pCol->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
- SwRectFn fnRect = pCol->IsVertical() ? fnRectVert : fnRectHori;
SwRect aLineRect = Prt();
aLineRect += Frm().Pos();
@@ -4886,8 +4897,8 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
aInter.Intersection( rRect );
if( aInter.HasArea() )
{
- BOOL bGrid = pGrid->GetRubyTextBelow();
- BOOL bCell = GRID_LINES_CHARS == pGrid->GetGridType();
+ sal_Bool bGrid = pGrid->GetRubyTextBelow();
+ sal_Bool bCell = GRID_LINES_CHARS == pGrid->GetGridType();
long nGrid = pGrid->GetBaseHeight();
const SwDoc* pDoc = GetFmt()->GetDoc();
long nGridWidth = GETGRIDWIDTH(pGrid,pDoc); //for textgrid refactor
@@ -4909,9 +4920,9 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
if( nX < aInter.Top() )
nX += nGrid;
SwTwips nGridBottom = aGrid.Top() + aGrid.Height();
- BOOL bLeft = aGrid.Top() >= aInter.Top();
- BOOL bRight = nGridBottom <= nBottom;
- BOOL bBorder = bLeft || bRight;
+ sal_Bool bLeft = aGrid.Top() >= aInter.Top();
+ sal_Bool bRight = nGridBottom <= nBottom;
+ sal_Bool bBorder = bLeft || bRight;
while( nY > nRight )
{
aTmp.Pos().X() = nY;
@@ -5040,9 +5051,9 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
if( nX < aInter.Left() )
nX += nGridWidth;
SwTwips nGridRight = aGrid.Left() + aGrid.Width();
- BOOL bLeft = aGrid.Left() >= aInter.Left();
- BOOL bRight = nGridRight <= nRight;
- BOOL bBorder = bLeft || bRight;
+ sal_Bool bLeft = aGrid.Left() >= aInter.Left();
+ sal_Bool bRight = nGridRight <= nRight;
+ sal_Bool bBorder = bLeft || bRight;
while( nY < aInter.Top() )
{
aTmp.Pos().Y() = nY;
@@ -5203,7 +5214,7 @@ void SwPageFrm::PaintMarginArea( const SwRect& _rOutputRect,
OutputDevice *pOut = _pViewShell->GetOut();
if ( pOut->GetFillColor() != aGlobalRetoucheColor )
pOut->SetFillColor( aGlobalRetoucheColor );
- for ( USHORT i = 0; i < aPgRegion.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aPgRegion.Count(); ++i )
{
if ( 1 < aPgRegion.Count() )
{
@@ -5363,7 +5374,7 @@ const sal_Int8 SwPageFrm::mnShadowPxWidth = 10;
//mod #i6193# paint sidebar for notes
//IMPORTANT: if you change the rects here, also change SwPostItMgr::ScrollbarHit
-/*static*/void SwPageFrm::PaintNotesSidebar(const SwRect& _rPageRect, ViewShell* _pViewShell, USHORT nPageNum, bool bRight)
+/*static*/void SwPageFrm::PaintNotesSidebar(const SwRect& _rPageRect, ViewShell* _pViewShell, sal_uInt16 nPageNum, bool bRight)
{
//TOOD: cut out scrollbar area and arrows out of sidepane rect, otherwise it could flicker when pressing arrow buttons
if (!_pViewShell )
@@ -5545,7 +5556,7 @@ const sal_Int8 SwPageFrm::mnShadowPxWidth = 10;
|*************************************************************************/
void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage,
- const BOOL bLowerBorder ) const
+ const sal_Bool bLowerBorder ) const
{
if ( !pPage )
pPage = FindPageFrm();
@@ -5582,7 +5593,7 @@ void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage,
// paint background
{
- PaintBackground( rRect, pPage, rAttrs, FALSE, bLowerBorder );
+ PaintBackground( rRect, pPage, rAttrs, sal_False, bLowerBorder );
}
pOut->Pop();
@@ -5598,8 +5609,8 @@ void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage,
/// calling <PaintBaBo> at the page or at the fly frame its anchored
void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
const SwBorderAttrs & rAttrs,
- const BOOL bLowerMode,
- const BOOL bLowerBorder ) const
+ const sal_Bool bLowerMode,
+ const sal_Bool bLowerBorder ) const
{
// OD 20.01.2003 #i1837# - no paint of table background, if corresponding
// option is *not* set.
@@ -5625,10 +5636,10 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
SvxBrushItem* pTmpBackBrush = 0;
const Color* pCol;
SwRect aOrigBackRect;
- const BOOL bPageFrm = IsPageFrm();
- BOOL bLowMode = TRUE;
+ const sal_Bool bPageFrm = IsPageFrm();
+ sal_Bool bLowMode = sal_True;
- BOOL bBack = GetBackgroundBrush( pItem, pCol, aOrigBackRect, bLowerMode );
+ sal_Bool bBack = GetBackgroundBrush( pItem, pCol, aOrigBackRect, bLowerMode );
//- Ausgabe wenn ein eigener Hintergrund mitgebracht wird.
bool bNoFlyBackground = !bFlyMetafile && !bBack && IsFlyFrm();
if ( bNoFlyBackground )
@@ -5642,7 +5653,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
}
// If still no background found for the fly frame, initialize the
// background brush <pItem> with global retouche color and set <bBack>
- // to TRUE, that fly frame will paint its background using this color.
+ // to sal_True, that fly frame will paint its background using this color.
if ( !bBack )
{
// OD 10.01.2003 #i6467# - on print output, pdf output and
@@ -5668,13 +5679,13 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
SwRect aPaintRect( Frm() );
if( IsTxtFrm() || IsSctFrm() )
- aPaintRect = UnionFrm( TRUE );
+ aPaintRect = UnionFrm( sal_True );
if ( aPaintRect.IsOver( rRect ) )
{
if ( bBack || bPageFrm || !bLowerMode )
{
- const BOOL bBrowse = pSh->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_Bool bBrowse = pSh->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
SwRect aRect;
if ( (bPageFrm && bBrowse) ||
@@ -5685,7 +5696,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
}
else
{
- ::lcl_CalcBorderRect( aRect, this, rAttrs, FALSE );
+ ::lcl_CalcBorderRect( aRect, this, rAttrs, sal_False );
if ( (IsTxtFrm() || IsTabFrm()) && GetPrev() )
{
if ( GetPrev()->GetAttrSet()->GetBackground() ==
@@ -5717,7 +5728,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
/// --> Status Quo: background transparency have to be
/// considered for fly frames
const sal_Bool bConsiderBackgroundTransparency = IsFlyFrm();
- for ( USHORT i = 0; i < aRegion.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
{
if ( 1 < aRegion.Count() )
{
@@ -5738,7 +5749,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
}
}
else
- bLowMode = bLowerMode ? TRUE : FALSE;
+ bLowMode = bLowerMode ? sal_True : sal_False;
}
/// OD 05.09.2002 #102912#
@@ -5799,13 +5810,13 @@ void SwPageFrm::RefreshSubsidiary( const SwRect &rRect ) const
{
//Beim Paint ueber die Root wird das Array von dort gesteuert.
//Anderfalls kuemmern wir uns selbst darum.
- BOOL bDelSubs = FALSE;
+ sal_Bool bDelSubs = sal_False;
if ( !pSubsLines )
{
pSubsLines = new SwSubsRects;
// OD 20.12.2002 #106318# - create container for special subsidiary lines
pSpecSubsLines = new SwSubsRects;
- bDelSubs = TRUE;
+ bDelSubs = sal_True;
}
RefreshLaySubsidiary( this, aRect );
@@ -5832,19 +5843,19 @@ void SwPageFrm::RefreshSubsidiary( const SwRect &rRect ) const
void SwLayoutFrm::RefreshLaySubsidiary( const SwPageFrm *pPage,
const SwRect &rRect ) const
{
- const BOOL bNoLowerColumn = !Lower() || !Lower()->IsColumnFrm();
- const BOOL bSubsOpt = IS_SUBS;
- const BOOL bSubsTable = ((GetType() & (FRM_ROW | FRM_CELL)) && IS_SUBS_TABLE);
- const BOOL bSubsOther = (GetType() & (FRM_HEADER | FRM_FOOTER | FRM_FTN )) && bSubsOpt;
- const BOOL bSubsSect = IsSctFrm() &&
+ const sal_Bool bNoLowerColumn = !Lower() || !Lower()->IsColumnFrm();
+ const sal_Bool bSubsOpt = IS_SUBS;
+ const sal_Bool bSubsTable = ((GetType() & (FRM_ROW | FRM_CELL)) && IS_SUBS_TABLE);
+ const sal_Bool bSubsOther = (GetType() & (FRM_HEADER | FRM_FOOTER | FRM_FTN )) && bSubsOpt;
+ const sal_Bool bSubsSect = IsSctFrm() &&
bNoLowerColumn &&
IS_SUBS_SECTION;
- const BOOL bSubsFly = IS_SUBS_FLYS &&
+ const sal_Bool bSubsFly = IS_SUBS_FLYS &&
(GetType() & FRM_FLY) &&
bNoLowerColumn &&
(!Lower() || !Lower()->IsNoTxtFrm() ||
!((SwNoTxtFrm*)Lower())->HasAnimation());
- BOOL bSubsBody = FALSE;
+ sal_Bool bSubsBody = sal_False;
if ( GetType() & FRM_BODY )
{
if ( IsPageBodyFrm() )
@@ -5921,7 +5932,7 @@ void MA_FASTCALL lcl_RefreshLine( const SwLayoutFrm *pLay,
const SwPageFrm *pPage,
const Point &rP1,
const Point &rP2,
- const BYTE nSubColor,
+ const sal_uInt8 nSubColor,
SwLineRects* _pSubsLines )
{
//In welche Richtung gehts? Kann nur Horizontal oder Vertikal sein.
@@ -6083,20 +6094,20 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage,
const Point aRB( nRight, nBottom );
const Point aLB( aOut.Left(), nBottom );
- BYTE nSubColor = ( bCell || IsRowFrm() ) ? SUBCOL_TAB :
+ sal_uInt8 nSubColor = ( bCell || IsRowFrm() ) ? SUBCOL_TAB :
( IsInSct() ? SUBCOL_SECT :
( IsInFly() ? SUBCOL_FLY : SUBCOL_PAGE ) );
// OD 05.11.2002 #102406# - body frames are responsible for page/column breaks.
- BOOL bBreak = FALSE;
+ sal_Bool bBreak = sal_False;
if ( IsBodyFrm() )
{
const SwCntntFrm *pCnt = ContainsCntnt();
if ( pCnt )
{
// OD 05.11.2002 #102406# - adjust setting of <bBreak>.
- bBreak = pCnt->IsPageBreak( TRUE ) ||
- ( IsColBodyFrm() && pCnt->IsColBreak( TRUE ) );
+ bBreak = pCnt->IsPageBreak( sal_True ) ||
+ ( IsColBodyFrm() && pCnt->IsColBreak( sal_True ) );
}
}
@@ -6188,7 +6199,7 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage,
void SwPageFrm::RefreshExtraData( const SwRect &rRect ) const
{
const SwLineNumberInfo &rInfo = GetFmt()->GetDoc()->GetLineNumberInfo();
- BOOL bLineInFly = (rInfo.IsPaintLineNumbers() && rInfo.IsCountInFlys())
+ sal_Bool bLineInFly = (rInfo.IsPaintLineNumbers() && rInfo.IsCountInFlys())
|| (sal_Int16)SW_MOD()->GetRedlineMarkPos() != text::HoriOrientation::NONE;
SwRect aRect( rRect );
@@ -6198,7 +6209,7 @@ void SwPageFrm::RefreshExtraData( const SwRect &rRect ) const
SwLayoutFrm::RefreshExtraData( aRect );
if ( bLineInFly && GetSortedObjs() )
- for ( USHORT i = 0; i < GetSortedObjs()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < GetSortedObjs()->Count(); ++i )
{
const SwAnchoredObject* pAnchoredObj = (*GetSortedObjs())[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
@@ -6216,7 +6227,7 @@ void SwLayoutFrm::RefreshExtraData( const SwRect &rRect ) const
{
const SwLineNumberInfo &rInfo = GetFmt()->GetDoc()->GetLineNumberInfo();
- BOOL bLineInBody = rInfo.IsPaintLineNumbers(),
+ sal_Bool bLineInBody = rInfo.IsPaintLineNumbers(),
bLineInFly = bLineInBody && rInfo.IsCountInFlys(),
bRedLine = (sal_Int16)SW_MOD()->GetRedlineMarkPos()!=text::HoriOrientation::NONE;
@@ -6292,7 +6303,7 @@ const Font& SwPageFrm::GetEmptyPageFont()
pEmptyPgFont->SetName( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "Helvetica" )) );
pEmptyPgFont->SetFamily( FAMILY_SWISS );
- pEmptyPgFont->SetTransparent( TRUE );
+ pEmptyPgFont->SetTransparent( sal_True );
pEmptyPgFont->SetColor( COL_GRAY );
}
@@ -6334,11 +6345,11 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *pSh->GetOut() );
// <--
- for ( USHORT i = 0; i < aRegion.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
{
SwRect &rRetouche = aRegion[i];
- GetUpper()->PaintBaBo( rRetouche, pPage, TRUE );
+ GetUpper()->PaintBaBo( rRetouche, pPage, sal_True );
//Hoelle und Himmel muessen auch refreshed werden.
//Um Rekursionen zu vermeiden muss mein Retouche Flag zuerst
@@ -6392,7 +6403,7 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
Beschreibung Liefert die Backgroundbrush fuer den Bereich des
des Frm. Die Brush wird entweder von ihm selbst oder von einem
Upper vorgegeben, die erste Brush wird benutzt.
- Ist fuer keinen Frm eine Brush angegeben, so wird FALSE zurueck-
+ Ist fuer keinen Frm eine Brush angegeben, so wird sal_False zurueck-
geliefert.
@param rpBrush
@@ -6413,10 +6424,10 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
@return true, if a background brush for the frame is found
*/
-BOOL SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush,
+sal_Bool SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush,
const Color*& rpCol,
SwRect &rOrigRect,
- BOOL bLowerMode ) const
+ sal_Bool bLowerMode ) const
{
const SwFrm *pFrm = this;
ViewShell *pSh = GetShell();
@@ -6425,7 +6436,7 @@ BOOL SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush,
rpCol = NULL;
do
{ if ( pFrm->IsPageFrm() && !pOpt->IsPageBack() )
- return FALSE;
+ return sal_False;
const SvxBrushItem &rBack = pFrm->GetAttrSet()->GetBackground();
if( pFrm->IsSctFrm() )
@@ -6483,7 +6494,7 @@ BOOL SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush,
{
SwBorderAttrAccess aAccess( SwFrm::GetCache(), pFrm );
const SwBorderAttrs &rAttrs = *aAccess.Get();
- ::lcl_CalcBorderRect( rOrigRect, pFrm, rAttrs, FALSE );
+ ::lcl_CalcBorderRect( rOrigRect, pFrm, rAttrs, sal_False );
}
else
{
@@ -6491,12 +6502,12 @@ BOOL SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush,
rOrigRect += pFrm->Frm().Pos();
}
}
- return TRUE;
+ return sal_True;
}
if ( bLowerMode )
/// Do not try to get background brush from parent (anchor/upper)
- return FALSE;
+ return sal_False;
/// get parent frame - anchor or upper - for next loop
if ( pFrm->IsFlyFrm() )
@@ -6508,7 +6519,7 @@ BOOL SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush,
} while ( pFrm );
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -6518,7 +6529,7 @@ BOOL SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush,
|*************************************************************************/
void SetOutDevAndWin( ViewShell *pSh, OutputDevice *pO,
- Window *pW, USHORT nZoom )
+ Window *pW, sal_uInt16 nZoom )
{
pSh->pOut = pO;
pSh->pWin = pW;
@@ -6542,8 +6553,8 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap )
ViewShell *pOldGlobal = pGlobalShell;
pGlobalShell = pSh;
- BOOL bNoteURL = pMap &&
- SFX_ITEM_SET != GetAttrSet().GetItemState( RES_URL, TRUE );
+ sal_Bool bNoteURL = pMap &&
+ SFX_ITEM_SET != GetAttrSet().GetItemState( RES_URL, sal_True );
if( bNoteURL )
{
OSL_ENSURE( !pNoteURL, "MakeGraphic: pNoteURL already used? " );
@@ -6553,7 +6564,7 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap )
OutputDevice *pOld = pSh->GetOut();
VirtualDevice aDev( *pOld );
- aDev.EnableOutput( FALSE );
+ aDev.EnableOutput( sal_False );
GDIMetaFile aMet;
MapMode aMap( pOld->GetMapMode().GetMapUnit() );
@@ -6582,9 +6593,9 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap )
pSh->DLPrePaint2(aRepaintRegion);
Window *pWin = pSh->GetWin();
- USHORT nZoom = pSh->GetViewOptions()->GetZoom();
+ sal_uInt16 nZoom = pSh->GetViewOptions()->GetZoom();
::SetOutDevAndWin( pSh, &aDev, 0, 100 );
- bFlyMetafile = TRUE;
+ bFlyMetafile = sal_True;
pFlyMetafileOut = pWin;
SwViewImp *pImp = pSh->Imp();
@@ -6614,7 +6625,7 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap )
pFlyOnlyDraw = 0;
pFlyMetafileOut = 0;
- bFlyMetafile = FALSE;
+ bFlyMetafile = sal_False;
::SetOutDevAndWin( pSh, pOld, pWin, nZoom );
// #i92711# end Pre/PostPaint encapsulation when pOut is back and content is painted
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index cb0fbcd9bde6..5c5d97f66b02 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -83,14 +83,14 @@ SwSectionFrm::SwSectionFrm( SwSection &rSect ) :
CalcEndAtEndFlag();
}
-SwSectionFrm::SwSectionFrm( SwSectionFrm &rSect, BOOL bMaster ) :
+SwSectionFrm::SwSectionFrm( SwSectionFrm &rSect, sal_Bool bMaster ) :
SwLayoutFrm( rSect.GetFmt() ),
SwFlowFrm( (SwFrm&)*this ),
pSection( rSect.GetSection() )
{
bFtnAtEnd = rSect.IsFtnAtEnd();
bEndnAtEnd = rSect.IsEndnAtEnd();
- bLockJoin = FALSE;
+ bLockJoin = sal_False;
nType = FRMC_SECTION;
PROTOCOL( this, PROT_SECTION, bMaster ? ACT_CREATE_MASTER : ACT_CREATE_FOLLOW, &rSect )
@@ -101,15 +101,15 @@ SwSectionFrm::SwSectionFrm( SwSectionFrm &rSect, BOOL bMaster ) :
{
SwSectionFrm* pMaster = rSect.FindMaster();
pMaster->SetFollow( this );
- bIsFollow = TRUE;
+ bIsFollow = sal_True;
}
else
- rSect.bIsFollow = TRUE;
+ rSect.bIsFollow = sal_True;
SetFollow( &rSect );
}
else
{
- bIsFollow = TRUE;
+ bIsFollow = sal_True;
SetFollow( rSect.GetFollow() );
rSect.SetFollow( this );
if( !GetFollow() )
@@ -170,7 +170,7 @@ SwSectionFrm::~SwSectionFrm()
else if( HasFollow() )
{
PROTOCOL( this, PROT_SECTION, ACT_DEL_MASTER, GetFollow() )
- GetFollow()->bIsFollow = FALSE;
+ GetFollow()->bIsFollow = sal_False;
}
}
}
@@ -181,7 +181,7 @@ SwSectionFrm::~SwSectionFrm()
|* SwSectionFrm::DelEmpty()
|*
|*************************************************************************/
-void SwSectionFrm::DelEmpty( BOOL bRemove )
+void SwSectionFrm::DelEmpty( sal_Bool bRemove )
{
if( IsColLocked() )
{
@@ -218,10 +218,10 @@ void SwSectionFrm::DelEmpty( BOOL bRemove )
// freigeben, deshalb wird die Size des Masters invalidiert.
if( !GetFollow() && !pMaster->IsColLocked() )
pMaster->InvalidateSize();
- bIsFollow = FALSE;
+ bIsFollow = sal_False;
}
else if( HasFollow() )
- GetFollow()->bIsFollow = FALSE;
+ GetFollow()->bIsFollow = sal_False;
pFollow = NULL;
if( pUp )
{
@@ -248,10 +248,10 @@ void SwSectionFrm::DelEmpty( BOOL bRemove )
|*************************************************************************/
void SwSectionFrm::Cut()
{
- _Cut( TRUE );
+ _Cut( sal_True );
}
-void SwSectionFrm::_Cut( BOOL bRemove )
+void SwSectionFrm::_Cut( sal_Bool bRemove )
{
OSL_ENSURE( GetUpper(), "Cut ohne Upper()." );
@@ -397,10 +397,10 @@ void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
InsertGroupBefore( pParent, pSibling, pSect );
pSect->Init();
- (pSect->*fnRect->fnMakePos)( pSect->GetUpper(), pSect->GetPrev(), TRUE);
+ (pSect->*fnRect->fnMakePos)( pSect->GetUpper(), pSect->GetPrev(), sal_True);
if( !((SwLayoutFrm*)pParent)->Lower() )
{
- SwSectionFrm::MoveCntntAndDelete( (SwSectionFrm*)pParent, FALSE );
+ SwSectionFrm::MoveCntntAndDelete( (SwSectionFrm*)pParent, sal_False );
pParent = this;
}
}
@@ -446,24 +446,24 @@ void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
|*
|*************************************************************************/
-BOOL SwSectionFrm::HasToBreak( const SwFrm* pFrm ) const
+sal_Bool SwSectionFrm::HasToBreak( const SwFrm* pFrm ) const
{
if( !pFrm->IsSctFrm() )
- return FALSE;
+ return sal_False;
SwSectionFmt *pTmp = (SwSectionFmt*)GetFmt();
// if( !pTmp->GetSect().GetValue() )
-// return FALSE;
+// return sal_False;
const SwFrmFmt *pOtherFmt = ((SwSectionFrm*)pFrm)->GetFmt();
do
{
pTmp = pTmp->GetParent();
if( !pTmp )
- return FALSE;
+ return sal_False;
if( pTmp == pOtherFmt )
- return TRUE;
- } while( TRUE ); // ( pTmp->GetSect().GetValue() );
+ return sal_True;
+ } while( sal_True ); // ( pTmp->GetSect().GetValue() );
}
/*************************************************************************
@@ -505,7 +505,7 @@ void SwSectionFrm::MergeNext( SwSectionFrm* pNxt )
}
SetFollow( pNxt->GetFollow() );
pNxt->SetFollow( NULL );
- pNxt->bIsFollow = FALSE;
+ pNxt->bIsFollow = sal_False;
pNxt->Cut();
delete pNxt;
InvalidateSize();
@@ -524,15 +524,15 @@ void SwSectionFrm::MergeNext( SwSectionFrm* pNxt )
|*
|*************************************************************************/
-BOOL SwSectionFrm::SplitSect( SwFrm* pFrm, BOOL bApres )
+sal_Bool SwSectionFrm::SplitSect( SwFrm* pFrm, sal_Bool bApres )
{
OSL_ENSURE( pFrm, "SplitSect: Why?" );
SwFrm* pOther = bApres ? pFrm->FindNext() : pFrm->FindPrev();
if( !pOther )
- return FALSE;
+ return sal_False;
SwSectionFrm* pSect = pOther->FindSctFrm();
if( pSect != this )
- return FALSE;
+ return sal_False;
// Den Inhalt zur Seite stellen
SwFrm* pSav = ::SaveCntnt( this, bApres ? pOther : pFrm );
OSL_ENSURE( pSav, "SplitSect: What's on?" );
@@ -542,7 +542,7 @@ BOOL SwSectionFrm::SplitSect( SwFrm* pFrm, BOOL bApres )
pNew->InsertBehind( pSect->GetUpper(), pSect );
pNew->Init();
SWRECTFN( this )
- (pNew->*fnRect->fnMakePos)( NULL, pSect, TRUE );
+ (pNew->*fnRect->fnMakePos)( NULL, pSect, sal_True );
// OD 25.03.2003 #108339# - restore content:
// determine layout frame for restoring content after the initialization
// of the section frame. In the section initialization the columns are
@@ -560,9 +560,9 @@ BOOL SwSectionFrm::SplitSect( SwFrm* pFrm, BOOL bApres )
pNew->SetFollow( GetFollow() );
SetFollow( NULL );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -579,7 +579,7 @@ BOOL SwSectionFrm::SplitSect( SwFrm* pFrm, BOOL bApres )
// Wenn ein mehrspaltiger Bereich aufgehoben wird, muessen die ContentFrms
// invalidiert werden
-void lcl_InvalidateInfFlags( SwFrm* pFrm, BOOL bInva )
+void lcl_InvalidateInfFlags( SwFrm* pFrm, sal_Bool bInva )
{
while ( pFrm )
{
@@ -591,7 +591,7 @@ void lcl_InvalidateInfFlags( SwFrm* pFrm, BOOL bInva )
pFrm->_InvalidatePrt();
}
if( pFrm->IsLayoutFrm() )
- lcl_InvalidateInfFlags( ((SwLayoutFrm*)pFrm)->GetLower(), FALSE );
+ lcl_InvalidateInfFlags( ((SwLayoutFrm*)pFrm)->GetLower(), sal_False );
pFrm = pFrm->GetNext();
}
}
@@ -616,10 +616,10 @@ SwCntntFrm* lcl_GetNextCntntFrm( const SwLayoutFrm* pLay, bool bFwd )
// #100926#
const SwFrm* pFrm = pLay;
SwCntntFrm *pCntntFrm = 0;
- BOOL bGoingUp = TRUE;
+ sal_Bool bGoingUp = sal_True;
do {
const SwFrm *p = 0;
- BOOL bGoingFwdOrBwd = FALSE, bGoingDown = FALSE;
+ sal_Bool bGoingFwdOrBwd = sal_False, bGoingDown = sal_False;
bGoingDown = !bGoingUp && ( 0 != ( p = pFrm->IsLayoutFrm() ? ((SwLayoutFrm*)pFrm)->Lower() : 0 ) );
if ( !bGoingDown )
@@ -651,9 +651,9 @@ SwCntntFrm* lcl_GetNextCntntFrm( const SwLayoutFrm* pLay, bool bFwd )
? pLayFrm->GetNextLayoutLeaf() \
: pLayFrm )
-void SwSectionFrm::MoveCntntAndDelete( SwSectionFrm* pDel, BOOL bSave )
+void SwSectionFrm::MoveCntntAndDelete( SwSectionFrm* pDel, sal_Bool bSave )
{
- BOOL bSize = pDel->Lower() && pDel->Lower()->IsColumnFrm();
+ sal_Bool bSize = pDel->Lower() && pDel->Lower()->IsColumnFrm();
SwFrm* pPrv = pDel->GetPrev();
SwLayoutFrm* pUp = pDel->GetUpper();
// OD 27.03.2003 #i12711# - initialize local pointer variables.
@@ -690,13 +690,13 @@ void SwSectionFrm::MoveCntntAndDelete( SwSectionFrm* pDel, BOOL bSave )
// Jetzt wird der Inhalt beseite gestellt und der Frame zerstoert
SwFrm *pSave = bSave ? ::SaveCntnt( pDel ) : NULL;
- BOOL bOldFtn = TRUE;
+ sal_Bool bOldFtn = sal_True;
if( pSave && pUp->IsFtnFrm() )
{
bOldFtn = ((SwFtnFrm*)pUp)->IsColLocked();
((SwFtnFrm*)pUp)->ColLock();
}
- pDel->DelEmpty( TRUE );
+ pDel->DelEmpty( sal_True );
delete pDel;
if( pParent )
{ // Hier wird die geeignete Einfuegeposition gesucht
@@ -733,7 +733,7 @@ void SwSectionFrm::MoveCntntAndDelete( SwSectionFrm* pDel, BOOL bSave )
pPrvSct->InsertBehind( pUp, pPrv );
pPrvSct->Init();
SWRECTFN( pUp )
- (pPrvSct->*fnRect->fnMakePos)( pUp, pPrv, TRUE );
+ (pPrvSct->*fnRect->fnMakePos)( pUp, pPrv, sal_True );
pUp = FIRSTLEAF( pPrvSct );
pPrv = NULL;
}
@@ -771,10 +771,10 @@ void SwSectionFrm::MakeAll()
if( GetUpper() )
{
SWRECTFN( GetUpper() )
- (this->*fnRect->fnMakePos)( GetUpper(), GetPrev(), FALSE );
+ (this->*fnRect->fnMakePos)( GetUpper(), GetPrev(), sal_False );
}
}
- bValidSize = bValidPos = bValidPrtArea = TRUE;
+ bValidSize = bValidPos = bValidPrtArea = sal_True;
return;
}
LockJoin(); //Ich lass mich nicht unterwegs vernichten.
@@ -803,8 +803,8 @@ void SwSectionFrm::MakeAll()
// Ein Bereich mit Follow nimmt allen Platz bis zur Unterkante des Uppers
// in Anspruch. Bewegt er sich, so kann seine Groesse zu- oder abnehmen...
- if( !bValidPos && ToMaximize( FALSE ) )
- bValidSize = FALSE;
+ if( !bValidPos && ToMaximize( sal_False ) )
+ bValidSize = sal_False;
#if OSL_DEBUG_LEVEL > 1
const SwFmtCol &rCol = GetFmt()->GetCol();
@@ -813,13 +813,13 @@ void SwSectionFrm::MakeAll()
SwLayoutFrm::MakeAll();
UnlockJoin();
if( pSection && IsSuperfluous() )
- DelEmpty( FALSE );
+ DelEmpty( sal_False );
}
-BOOL SwSectionFrm::ShouldBwdMoved( SwLayoutFrm *, BOOL , BOOL & )
+sal_Bool SwSectionFrm::ShouldBwdMoved( SwLayoutFrm *, sal_Bool , sal_Bool & )
{
- OSL_ENSURE( FALSE, "Hups, wo ist meine Tarnkappe?" );
- return FALSE;
+ OSL_ENSURE( sal_False, "Hups, wo ist meine Tarnkappe?" );
+ return sal_False;
}
const SwSectionFmt* SwSectionFrm::_GetEndSectFmt() const
@@ -836,7 +836,7 @@ const SwSectionFmt* SwSectionFrm::_GetEndSectFmt() const
}
void lcl_FindCntntFrm( SwCntntFrm* &rpCntntFrm, SwFtnFrm* &rpFtnFrm,
- SwFrm* pFrm, BOOL &rbChkFtn )
+ SwFrm* pFrm, sal_Bool &rbChkFtn )
{
if( pFrm )
{
@@ -865,7 +865,7 @@ void lcl_FindCntntFrm( SwCntntFrm* &rpCntntFrm, SwFtnFrm* &rpFtnFrm,
}
}
-SwCntntFrm *SwSectionFrm::FindLastCntnt( BYTE nMode )
+SwCntntFrm *SwSectionFrm::FindLastCntnt( sal_uInt8 nMode )
{
SwCntntFrm *pRet = NULL;
SwFtnFrm *pFtnFrm = NULL;
@@ -886,9 +886,9 @@ SwCntntFrm *SwSectionFrm::FindLastCntnt( BYTE nMode )
pSect = (SwSectionFrm*)pTmp;
else
break;
- } while( TRUE );
+ } while( sal_True );
}
- BOOL bFtnFound = nMode == FINDMODE_ENDNOTE;
+ sal_Bool bFtnFound = nMode == FINDMODE_ENDNOTE;
do
{
lcl_FindCntntFrm( pRet, pFtnFrm, pSect->Lower(), bFtnFound );
@@ -902,16 +902,16 @@ SwCntntFrm *SwSectionFrm::FindLastCntnt( BYTE nMode )
return pRet;
}
-BOOL SwSectionFrm::CalcMinDiff( SwTwips& rMinDiff ) const
+sal_Bool SwSectionFrm::CalcMinDiff( SwTwips& rMinDiff ) const
{
- if( ToMaximize( TRUE ) )
+ if( ToMaximize( sal_True ) )
{
SWRECTFN( this )
rMinDiff = (GetUpper()->*fnRect->fnGetPrtBottom)();
rMinDiff = (Frm().*fnRect->fnBottomDist)( rMinDiff );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -925,7 +925,7 @@ BOOL SwSectionFrm::CalcMinDiff( SwTwips& rMinDiff ) const
*
*************************************************************************/
-SwFtnFrm* lcl_FindEndnote( SwSectionFrm* &rpSect, BOOL &rbEmpty,
+SwFtnFrm* lcl_FindEndnote( SwSectionFrm* &rpSect, sal_Bool &rbEmpty,
SwLayouter *pLayouter )
{
// if rEmpty is set, the rpSect is already searched
@@ -967,16 +967,16 @@ SwFtnFrm* lcl_FindEndnote( SwSectionFrm* &rpSect, BOOL &rbEmpty,
}
rpSect = pSect;
pSect = pLayouter ? pSect->GetFollow() : NULL;
- rbEmpty = TRUE;
+ rbEmpty = sal_True;
}
return NULL;
}
-void lcl_ColumnRefresh( SwSectionFrm* pSect, BOOL bFollow )
+void lcl_ColumnRefresh( SwSectionFrm* pSect, sal_Bool bFollow )
{
while( pSect )
{
- BOOL bOldLock = pSect->IsColLocked();
+ sal_Bool bOldLock = pSect->IsColLocked();
pSect->ColLock();
if( pSect->Lower() && pSect->Lower()->IsColumnFrm() )
{
@@ -1007,19 +1007,19 @@ void SwSectionFrm::CollectEndnotes( SwLayouter* pLayouter )
SwSectionFrm* pSect = this;
SwFtnFrm* pFtn;
- BOOL bEmpty = FALSE;
+ sal_Bool bEmpty = sal_False;
// pSect is the last sectionfrm without endnotes or the this-pointer
// the first sectionfrm with endnotes may be destroyed, when the endnotes
// is cutted
while( 0 != (pFtn = lcl_FindEndnote( pSect, bEmpty, pLayouter )) )
pLayouter->CollectEndnote( pFtn );
if( pLayouter->HasEndnotes() )
- lcl_ColumnRefresh( this, TRUE );
+ lcl_ColumnRefresh( this, sal_True );
}
/*************************************************************************
|*
-|* SwSectionFrm::_CheckClipping( BOOL bGrow, BOOL bMaximize )
+|* SwSectionFrm::_CheckClipping( sal_Bool bGrow, sal_Bool bMaximize )
|*
|* Beschreibung: Passt die Groesse an die Umgebung an.
|* Wer einen Follow oder Fussnoten besitzt, soll bis zur Unterkante
@@ -1032,7 +1032,7 @@ void SwSectionFrm::CollectEndnotes( SwLayouter* pLayouter )
/// OD 18.09.2002 #100522#
/// perform calculation of content, only if height has changed.
-void SwSectionFrm::_CheckClipping( BOOL bGrow, BOOL bMaximize )
+void SwSectionFrm::_CheckClipping( sal_Bool bGrow, sal_Bool bMaximize )
{
SWRECTFN( this )
long nDiff;
@@ -1063,7 +1063,7 @@ void SwSectionFrm::_CheckClipping( BOOL bGrow, BOOL bMaximize )
if( !bCalc && !bGrow && IsAnyNoteAtEnd() && !IsInFtn() )
{
SwSectionFrm *pSect = this;
- BOOL bEmpty = FALSE;
+ sal_Bool bEmpty = sal_False;
SwLayoutFrm* pFtn = IsEndnAtEnd() ?
lcl_FindEndnote( pSect, bEmpty, NULL ) : NULL;
if( pFtn )
@@ -1111,7 +1111,7 @@ void SwSectionFrm::_CheckClipping( BOOL bGrow, BOOL bMaximize )
{
if( Lower()->IsColumnFrm() )
{
- lcl_ColumnRefresh( this, FALSE );
+ lcl_ColumnRefresh( this, sal_False );
::CalcCntnt( this );
}
else
@@ -1137,8 +1137,8 @@ void SwSectionFrm::SimpleFormat()
// assure notifications on position changes.
const SwLayNotify aNotify( this );
// <--
- (this->*fnRect->fnMakePos)( GetUpper(), GetPrev(), FALSE );
- bValidPos = TRUE;
+ (this->*fnRect->fnMakePos)( GetUpper(), GetPrev(), sal_False );
+ bValidPos = sal_True;
}
SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)();
// OD 22.10.2002 #97265# - call always method <lcl_ColumnRefresh(..)>, in
@@ -1152,7 +1152,7 @@ void SwSectionFrm::SimpleFormat()
nTop = nHeight;
(this->*fnRect->fnSetYMargins)( nTop, 0 );
}
- lcl_ColumnRefresh( this, FALSE );
+ lcl_ColumnRefresh( this, sal_False );
UnlockJoin();
}
@@ -1310,14 +1310,14 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
OSL_ENSURE( GetFmt()->GetDoc()->GetRootFrm()->IsInDelList( this ),
"SectionFrm without Section" );
#endif
- bValidSize = bValidPos = bValidPrtArea = TRUE;
+ bValidSize = bValidPos = bValidPrtArea = sal_True;
return;
}
SWRECTFN( this )
if ( !bValidPrtArea )
{
PROTOCOL( this, PROT_PRTAREA, 0, 0 )
- bValidPrtArea = TRUE;
+ bValidPrtArea = sal_True;
SwTwips nUpper = CalcUpperSpace();
// #109700# LRSpace for sections
@@ -1326,7 +1326,7 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
if( nUpper != (this->*fnRect->fnGetTopMargin)() )
{
- bValidSize = FALSE;
+ bValidSize = sal_False;
SwFrm* pOwn = ContainsAny();
if( pOwn )
pOwn->_InvalidatePos();
@@ -1338,16 +1338,16 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
{
PROTOCOL_ENTER( this, PROT_SIZE, 0, 0 )
const long nOldHeight = (Frm().*fnRect->fnGetHeight)();
- BOOL bOldLock = IsColLocked();
+ sal_Bool bOldLock = IsColLocked();
ColLock();
- bValidSize = TRUE;
+ bValidSize = sal_True;
//die Groesse wird nur dann vom Inhalt bestimmt, wenn der SectFrm
//keinen Follow hat. Anderfalls fuellt er immer den Upper bis
//zur Unterkante aus. Fuer den Textfluss ist nicht er, sondern sein
//Inhalt selbst verantwortlich.
- BOOL bMaximize = ToMaximize( FALSE );
+ sal_Bool bMaximize = ToMaximize( sal_False );
// OD 2004-05-17 #i28701# - If the wrapping style has to be considered
// on object positioning, an extra formatting has to be performed
@@ -1370,7 +1370,7 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
// which still have a width of 0.
const sal_Bool bHasColumns = Lower() && Lower()->IsColumnFrm();
if ( bHasColumns && Lower()->GetNext() )
- AdjustColumns( 0, FALSE );
+ AdjustColumns( 0, sal_False );
if( GetUpper() )
{
@@ -1386,8 +1386,8 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
// Thus, set <..IsBrowseMode()> as parameter <bGrow> on calling
// method <_CheckClipping(..)>.
_CheckClipping( GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE), bMaximize );
- bMaximize = ToMaximize( FALSE );
- bValidSize = TRUE;
+ bMaximize = ToMaximize( sal_False );
+ bValidSize = sal_True;
}
//Breite der Spalten pruefen und ggf. einstellen.
@@ -1416,11 +1416,11 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
// <--
{
SwFrm* pOld = GetFollow();
- GetFollow()->DelEmpty( FALSE );
+ GetFollow()->DelEmpty( sal_False );
if( pOld == GetFollow() )
break;
}
- bMaximize = ToMaximize( FALSE );
+ bMaximize = ToMaximize( sal_False );
nRemaining += (pFrm->Frm().*fnRect->fnGetHeight)();
}
else
@@ -1454,7 +1454,7 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
long nTmpDiff = (*fnRect->fnYDiff)( nBottom, nDeadLine );
if( nTmpDiff > 0 )
{
- nTmpDiff = GetUpper()->Grow( nTmpDiff, TRUE );
+ nTmpDiff = GetUpper()->Grow( nTmpDiff, sal_True );
nDeadLine = (*fnRect->fnYInc)( nDeadLine, nTmpDiff );
nTmpDiff = (*fnRect->fnYDiff)( nBottom, nDeadLine );
if( nTmpDiff > 0 )
@@ -1488,13 +1488,13 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
pFrm = ((SwLayoutFrm*)pFrm)->Lower();
CalcFtnCntnt();
}
- BOOL bUnderSz = FALSE;
+ sal_Bool bUnderSz = sal_False;
while( pFrm )
{
if( pFrm->IsTxtFrm() && ((SwTxtFrm*)pFrm)->IsUndersized() )
{
pFrm->Prepare( PREP_ADJUST_FRM );
- bUnderSz = TRUE;
+ bUnderSz = sal_True;
}
pFrm = pFrm->GetNext();
}
@@ -1507,7 +1507,7 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
//Unterkante des Uppers nicht ueberschreiten. Fuer Sections mit
//Follows die Unterkante auch nicht unterschreiten.
if ( GetUpper() )
- _CheckClipping( TRUE, bMaximize );
+ _CheckClipping( sal_True, bMaximize );
if( !bOldLock )
ColUnlock();
long nDiff = nOldHeight - (Frm().*fnRect->fnGetHeight)();
@@ -1519,7 +1519,7 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
GetUpper()->Shrink( nDiff );
}
if( IsUndersized() )
- bValidPrtArea = TRUE;
+ bValidPrtArea = sal_True;
}
}
@@ -1529,7 +1529,7 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
|*
|* Beschreibung Liefert das naechste Layoutblatt in das der Frame
|* gemoved werden kann.
-|* Neue Seiten werden nur dann erzeugt, wenn der Parameter TRUE ist.
+|* Neue Seiten werden nur dann erzeugt, wenn der Parameter sal_True ist.
|*
|*************************************************************************/
@@ -1556,7 +1556,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
//GetLeaf gerufen wird.
// SwSectionFrm *pSect = GetUpper()->FindSctFrm();
SwSectionFrm *pSect = FindSctFrm();
- BOOL bWrongPage = FALSE;
+ sal_Bool bWrongPage = sal_False;
OSL_ENSURE( pSect, "GetNextSctLeaf: Missing SectionFrm" );
// Hier eine Abkuerzung fuer Bereiche mit Follows,
@@ -1569,7 +1569,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
{
SwPageFrm *pPg = pSect->GetFollow()->FindPageFrm();
if( WrongPageDesc( pPg ) )
- bWrongPage = TRUE;
+ bWrongPage = sal_True;
else
return FIRSTLEAF( pSect->GetFollow() );
}
@@ -1597,7 +1597,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
SwPageFrm* pNxtPg = pUp->IsPageFrm() ?
(SwPageFrm*)pUp : pUp->FindPageFrm();
if( WrongPageDesc( pNxtPg ) )
- bWrongPage = TRUE;
+ bWrongPage = sal_True;
else
return FIRSTLEAF( pSect->GetFollow() );
}
@@ -1606,8 +1606,8 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
}
// Immer im gleichen Bereich landen: Body wieder in Body etc.
- const BOOL bBody = IsInDocBody();
- const BOOL bFtnPage = FindPageFrm()->IsFtnPage();
+ const sal_Bool bBody = IsInDocBody();
+ const sal_Bool bFtnPage = FindPageFrm()->IsFtnPage();
SwLayoutFrm *pLayLeaf;
// Eine Abkuerzung fuer TabFrms, damit nicht alle Zellen abgehuehnert werden
@@ -1632,7 +1632,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
//nicht wieder vom Anfang gesucht
//wird.
- while( TRUE )
+ while( sal_True )
{
if( pLayLeaf )
{
@@ -1663,7 +1663,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
if( bWrongPage )
break; // there's a column between me and my right page
pLayLeaf = 0;
- bWrongPage = TRUE;
+ bWrongPage = sal_True;
pOldLayLeaf = 0;
continue;
}
@@ -1675,7 +1675,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
( eMakePage == MAKEPAGE_APPEND || eMakePage == MAKEPAGE_INSERT ) )
{
InsertPage(pOldLayLeaf ? pOldLayLeaf->FindPageFrm() : FindPageFrm(),
- FALSE );
+ sal_False );
//und nochmal das ganze
pLayLeaf = pOldLayLeaf ? pOldLayLeaf : GetNextLayoutLeaf();
continue;
@@ -1701,11 +1701,11 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
return pLayLeaf;
else
{
- pNew = new SwSectionFrm( *pSect, FALSE );
+ pNew = new SwSectionFrm( *pSect, sal_False );
pNew->InsertBefore( pLayLeaf, pLayLeaf->Lower() );
pNew->Init();
SWRECTFN( pNew )
- (pNew->*fnRect->fnMakePos)( pLayLeaf, NULL, TRUE );
+ (pNew->*fnRect->fnMakePos)( pLayLeaf, NULL, sal_True );
// Wenn unser Bereichsframe einen Nachfolger hat, so muss dieser
// umgehaengt werden hinter den neuen Follow der Bereichsframes.
@@ -1739,13 +1739,13 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
}
if( pNxtCntnt )
{
- SwFtnBossFrm* pOldBoss = pSect->FindFtnBossFrm( TRUE );
- if( pOldBoss == pNxtCntnt->FindFtnBossFrm( TRUE ) )
+ SwFtnBossFrm* pOldBoss = pSect->FindFtnBossFrm( sal_True );
+ if( pOldBoss == pNxtCntnt->FindFtnBossFrm( sal_True ) )
{
SwSaveFtnHeight aHeight( pOldBoss,
pOldBoss->Frm().Top() + pOldBoss->Frm().Height() );
pSect->GetUpper()->MoveLowerFtns( pNxtCntnt, pOldBoss,
- pLayLeaf->FindFtnBossFrm( TRUE ), FALSE );
+ pLayLeaf->FindFtnBossFrm( sal_True ), sal_False );
}
}
((SwFlowFrm*)pNxt)->MoveSubTree( pLayLeaf, pNew->GetNext() );
@@ -1781,7 +1781,7 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
pCol = GetUpper()->GetUpper();
else
pCol = NULL;
- BOOL bJump = FALSE;
+ sal_Bool bJump = sal_False;
if( pCol )
{
if( pCol->GetPrev() )
@@ -1793,10 +1793,10 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
if( ((SwLayoutFrm*)pCol->Lower())->Lower() )
{
if( bJump ) // Haben wir eine leere Spalte uebersprungen?
- SwFlowFrm::SetMoveBwdJump( TRUE );
+ SwFlowFrm::SetMoveBwdJump( sal_True );
return (SwLayoutFrm*)pCol->Lower(); // Der Spaltenbody
}
- bJump = TRUE;
+ bJump = sal_True;
} while( pCol->GetPrev() );
// Hier landen wir, wenn alle Spalten leer sind,
@@ -1808,7 +1808,7 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
}
if( bJump ) // Haben wir eine leere Spalte uebersprungen?
- SwFlowFrm::SetMoveBwdJump( TRUE );
+ SwFlowFrm::SetMoveBwdJump( sal_True );
// Innerhalb von Bereichen in Tabellen oder Bereichen in Kopf/Fusszeilen kann
// nur ein Spaltenwechsel erfolgen, eine der oberen Abkuerzungen haette
@@ -1847,8 +1847,8 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
}
}
- const BOOL bBody = IsInDocBody();
- const BOOL bFly = IsInFly();
+ const sal_Bool bBody = IsInDocBody();
+ const sal_Bool bFly = IsInFly();
SwLayoutFrm *pLayLeaf = GetPrevLayoutLeaf();
SwLayoutFrm *pPrevLeaf = 0;
@@ -1886,7 +1886,7 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
pPrevLeaf = pLayLeaf;
pLayLeaf = pLayLeaf->GetPrevLayoutLeaf();
if ( pLayLeaf )
- SwFlowFrm::SetMoveBwdJump( TRUE );
+ SwFlowFrm::SetMoveBwdJump( sal_True );
}
else if ( bFly )
break; //Cntnts in Flys sollte jedes Layout-Blatt recht sein. Warum?
@@ -1919,11 +1919,11 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
}
if( !pNew )
{
- pNew = new SwSectionFrm( *pSect, TRUE );
+ pNew = new SwSectionFrm( *pSect, sal_True );
pNew->InsertBefore( pLayLeaf, NULL );
pNew->Init();
SWRECTFN( pNew )
- (pNew->*fnRect->fnMakePos)( pLayLeaf, pNew->GetPrev(), TRUE );
+ (pNew->*fnRect->fnMakePos)( pLayLeaf, pNew->GetPrev(), sal_True );
pLayLeaf = FIRSTLEAF( pNew );
if( !pNew->Lower() ) // einspaltige Bereiche formatieren
@@ -1952,7 +1952,7 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
if( pLayLeaf != pTmpLay )
{
pLayLeaf = pTmpLay;
- SwFlowFrm::SetMoveBwdJump( TRUE );
+ SwFlowFrm::SetMoveBwdJump( sal_True );
}
}
}
@@ -1980,14 +1980,14 @@ SwTwips lcl_DeadLine( const SwFrm* pFrm )
// SwSectionFrm::Growable(..) prueft, ob der SectionFrm noch wachsen kann,
// ggf. muss die Umgebung gefragt werden
-BOOL SwSectionFrm::Growable() const
+sal_Bool SwSectionFrm::Growable() const
{
SWRECTFN( this )
if( (*fnRect->fnYDiff)( lcl_DeadLine( this ),
(Frm().*fnRect->fnGetBottom)() ) > 0 )
- return TRUE;
+ return sal_True;
- return ( GetUpper() && ((SwFrm*)GetUpper())->Grow( LONG_MAX, TRUE ) );
+ return ( GetUpper() && ((SwFrm*)GetUpper())->Grow( LONG_MAX, sal_True ) );
}
/*************************************************************************
@@ -1996,7 +1996,7 @@ BOOL SwSectionFrm::Growable() const
|*
|*************************************************************************/
-SwTwips SwSectionFrm::_Grow( SwTwips nDist, BOOL bTst )
+SwTwips SwSectionFrm::_Grow( SwTwips nDist, sal_Bool bTst )
{
if ( !IsColLocked() && !HasFixSize() )
{
@@ -2008,7 +2008,7 @@ SwTwips SwSectionFrm::_Grow( SwTwips nDist, BOOL bTst )
if ( nDist <= 0L )
return 0L;
- BOOL bInCalcCntnt = GetUpper() && IsInFly() && FindFlyFrm()->IsLocked();
+ sal_Bool bInCalcCntnt = GetUpper() && IsInFly() && FindFlyFrm()->IsLocked();
// OD 2004-03-15 #116561# - allow grow in online layout
if ( !Lower() || !Lower()->IsColumnFrm() || !Lower()->GetNext() ||
GetSection()->GetFmt()->GetBalancedColumns().GetValue() ||
@@ -2025,7 +2025,7 @@ SwTwips SwSectionFrm::_Grow( SwTwips nDist, BOOL bTst )
}
SwTwips nSpace = nGrow;
if( !bInCalcCntnt && nGrow < nDist && GetUpper() )
- nGrow += GetUpper()->Grow( LONG_MAX, TRUE );
+ nGrow += GetUpper()->Grow( LONG_MAX, sal_True );
if( nGrow > nDist )
nGrow = nDist;
@@ -2045,7 +2045,7 @@ SwTwips SwSectionFrm::_Grow( SwTwips nDist, BOOL bTst )
if( bInCalcCntnt )
_InvalidateSize();
else if( nSpace < nGrow && nDist != nSpace + GetUpper()->
- Grow( nGrow - nSpace, FALSE ) )
+ Grow( nGrow - nSpace, sal_False ) )
InvalidateSize();
else
{
@@ -2110,11 +2110,11 @@ SwTwips SwSectionFrm::_Grow( SwTwips nDist, BOOL bTst )
return 0L;
}
-SwTwips SwSectionFrm::_Shrink( SwTwips nDist, BOOL bTst )
+SwTwips SwSectionFrm::_Shrink( SwTwips nDist, sal_Bool bTst )
{
if ( Lower() && !IsColLocked() && !HasFixSize() )
{
- if( ToMaximize( FALSE ) )
+ if( ToMaximize( sal_False ) )
{
if( !bTst )
InvalidateSize();
@@ -2210,12 +2210,12 @@ SwTwips SwSectionFrm::_Shrink( SwTwips nDist, BOOL bTst )
|*
|*************************************************************************/
-BOOL SwSectionFrm::MoveAllowed( const SwFrm* pFrm) const
+sal_Bool SwSectionFrm::MoveAllowed( const SwFrm* pFrm) const
{
// Gibt es einen Follow oder ist der Frame nicht in der letzten Spalte?
if( HasFollow() || ( pFrm->GetUpper()->IsColBodyFrm() &&
pFrm->GetUpper()->GetUpper()->GetNext() ) )
- return TRUE;
+ return sal_True;
if( pFrm->IsInFtn() )
{
if( IsInFtn() )
@@ -2223,11 +2223,11 @@ BOOL SwSectionFrm::MoveAllowed( const SwFrm* pFrm) const
if( GetUpper()->IsInSct() )
{
if( Growable() )
- return FALSE;
+ return sal_False;
return GetUpper()->FindSctFrm()->MoveAllowed( this );
}
else
- return TRUE;
+ return sal_True;
}
// The content of footnote inside a columned sectionfrm is moveable
// except in the last column
@@ -2237,30 +2237,30 @@ BOOL SwSectionFrm::MoveAllowed( const SwFrm* pFrm) const
// The first paragraph in the first footnote in the first column
// in the sectionfrm at the top of the page is not moveable,
// if the columnbody is empty.
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pLay->GetIndPrev() || pFrm->GetIndPrev() ||
pFrm->FindFtnFrm()->GetPrev() )
- bRet = TRUE;
+ bRet = sal_True;
else
{
SwLayoutFrm* pBody = ((SwColumnFrm*)pLay)->FindBodyCont();
if( pBody && pBody->Lower() )
- bRet = TRUE;
+ bRet = sal_True;
}
if( bRet && ( IsFtnAtEnd() || !Growable() ) )
- return TRUE;
+ return sal_True;
}
}
// Oder kann der Bereich noch wachsen?
if( !IsColLocked() && Growable() )
- return FALSE;
+ return sal_False;
// Jetzt muss untersucht werden, ob es ein Layoutblatt gibt, in dem
// ein Bereichsfollow erzeugt werden kann.
if( IsInTab() || ( !IsInDocBody() && FindFooterOrHeader() ) )
- return FALSE; // In Tabellen/Kopf/Fusszeilen geht es nicht
+ return sal_False; // In Tabellen/Kopf/Fusszeilen geht es nicht
if( IsInFly() ) // Bei spaltigen oder verketteten Rahmen
return 0 != ((SwFrm*)GetUpper())->GetNextLeaf( MAKEPAGE_NONE );
- return TRUE;
+ return sal_True;
}
/** Called for a frame inside a section with no direct previous frame (or only
@@ -2334,25 +2334,25 @@ SwFrm* SwFrm::_GetIndNext()
return NULL;
}
-BOOL SwSectionFrm::IsDescendantFrom( const SwSectionFmt* pFmt ) const
+sal_Bool SwSectionFrm::IsDescendantFrom( const SwSectionFmt* pFmt ) const
{
if( !pSection || !pFmt )
- return FALSE;
+ return sal_False;
const SwSectionFmt *pMyFmt = pSection->GetFmt();
while( pFmt != pMyFmt )
{
if( pMyFmt->GetRegisteredIn()->ISA( SwSectionFmt ) )
pMyFmt = (SwSectionFmt*)pMyFmt->GetRegisteredIn();
else
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
void SwSectionFrm::CalcFtnAtEndFlag()
{
SwSectionFmt *pFmt = GetSection()->GetFmt();
- USHORT nVal = pFmt->GetFtnAtTxtEnd( FALSE ).GetValue();
+ sal_uInt16 nVal = pFmt->GetFtnAtTxtEnd( sal_False ).GetValue();
bFtnAtEnd = FTNEND_ATPGORDOCEND != nVal;
bOwnFtnNum = FTNEND_ATTXTEND_OWNNUMSEQ == nVal ||
FTNEND_ATTXTEND_OWNNUMANDFMT == nVal;
@@ -2362,32 +2362,32 @@ void SwSectionFrm::CalcFtnAtEndFlag()
pFmt = (SwSectionFmt*)pFmt->GetRegisteredIn();
else
break;
- nVal = pFmt->GetFtnAtTxtEnd( FALSE ).GetValue();
+ nVal = pFmt->GetFtnAtTxtEnd( sal_False ).GetValue();
if( FTNEND_ATPGORDOCEND != nVal )
{
- bFtnAtEnd = TRUE;
+ bFtnAtEnd = sal_True;
bOwnFtnNum = bOwnFtnNum ||FTNEND_ATTXTEND_OWNNUMSEQ == nVal ||
FTNEND_ATTXTEND_OWNNUMANDFMT == nVal;
}
}
}
-BOOL SwSectionFrm::IsEndnoteAtMyEnd() const
+sal_Bool SwSectionFrm::IsEndnoteAtMyEnd() const
{
- return pSection->GetFmt()->GetEndAtTxtEnd( FALSE ).IsAtEnd();
+ return pSection->GetFmt()->GetEndAtTxtEnd( sal_False ).IsAtEnd();
}
void SwSectionFrm::CalcEndAtEndFlag()
{
SwSectionFmt *pFmt = GetSection()->GetFmt();
- bEndnAtEnd = pFmt->GetEndAtTxtEnd( FALSE ).IsAtEnd();
+ bEndnAtEnd = pFmt->GetEndAtTxtEnd( sal_False ).IsAtEnd();
while( !bEndnAtEnd )
{
if( pFmt->GetRegisteredIn()->ISA( SwSectionFmt ) )
pFmt = (SwSectionFmt*)pFmt->GetRegisteredIn();
else
break;
- bEndnAtEnd = pFmt->GetEndAtTxtEnd( FALSE ).IsAtEnd();
+ bEndnAtEnd = pFmt->GetEndAtTxtEnd( sal_False ).IsAtEnd();
}
}
@@ -2399,7 +2399,7 @@ void SwSectionFrm::CalcEndAtEndFlag()
void SwSectionFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
{
- BYTE nInvFlags = 0;
+ sal_uInt8 nInvFlags = 0;
if( pNew && RES_ATTRSET_CHG == pNew->Which() )
{
@@ -2407,7 +2407,7 @@ void SwSectionFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
SfxItemIter aOIter( *((SwAttrSetChg*)pOld)->GetChgSet() );
SwAttrSetChg aOldSet( *(SwAttrSetChg*)pOld );
SwAttrSetChg aNewSet( *(SwAttrSetChg*)pNew );
- while( TRUE )
+ while( sal_True )
{
_UpdateAttr( (SfxPoolItem*)aOIter.GetCurItem(),
(SfxPoolItem*)aNIter.GetCurItem(), nInvFlags,
@@ -2433,11 +2433,11 @@ void SwSectionFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
}
void SwSectionFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
- BYTE &rInvFlags,
+ sal_uInt8 &rInvFlags,
SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet )
{
- BOOL bClear = TRUE;
- const USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_Bool bClear = sal_True;
+ const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
switch( nWhich )
{ // Mehrspaltigkeit in Fussnoten unterdruecken...
case RES_FMT_CHG:
@@ -2452,7 +2452,7 @@ void SwSectionFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
SwFmtCol aCol;
if ( Lower() && Lower()->IsColumnFrm() )
{
- USHORT nCol = 0;
+ sal_uInt16 nCol = 0;
SwFrm *pTmp = Lower();
do
{ ++nCol;
@@ -2460,9 +2460,9 @@ void SwSectionFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
} while ( pTmp );
aCol.Init( nCol, 0, 1000 );
}
- BOOL bChgFtn = IsFtnAtEnd();
- BOOL bChgEndn = IsEndnAtEnd();
- BOOL bChgMyEndn = IsEndnoteAtMyEnd();
+ sal_Bool bChgFtn = IsFtnAtEnd();
+ sal_Bool bChgEndn = IsEndnAtEnd();
+ sal_Bool bChgMyEndn = IsEndnoteAtMyEnd();
CalcFtnAtEndFlag();
CalcEndAtEndFlag();
bChgFtn = ( bChgFtn != IsFtnAtEnd() ) ||
@@ -2472,7 +2472,7 @@ void SwSectionFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
rInvFlags |= 0x10;
}
rInvFlags |= 0x01;
- bClear = FALSE;
+ bClear = sal_False;
}
break;
@@ -2487,12 +2487,12 @@ void SwSectionFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
case RES_FTN_AT_TXTEND:
if( !IsInFtn() )
{
- BOOL bOld = IsFtnAtEnd();
+ sal_Bool bOld = IsFtnAtEnd();
CalcFtnAtEndFlag();
if( bOld != IsFtnAtEnd() )
{
const SwFmtCol& rNewCol = GetFmt()->GetCol();
- ChgColumns( rNewCol, rNewCol, TRUE );
+ ChgColumns( rNewCol, rNewCol, sal_True );
rInvFlags |= 0x01;
}
}
@@ -2501,13 +2501,13 @@ void SwSectionFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
case RES_END_AT_TXTEND:
if( !IsInFtn() )
{
- BOOL bOld = IsEndnAtEnd();
- BOOL bMyOld = IsEndnoteAtMyEnd();
+ sal_Bool bOld = IsEndnAtEnd();
+ sal_Bool bMyOld = IsEndnoteAtMyEnd();
CalcEndAtEndFlag();
if( bOld != IsEndnAtEnd() || bMyOld != IsEndnoteAtMyEnd())
{
const SwFmtCol& rNewCol = GetFmt()->GetCol();
- ChgColumns( rNewCol, rNewCol, TRUE );
+ ChgColumns( rNewCol, rNewCol, sal_True );
rInvFlags |= 0x01;
}
}
@@ -2530,7 +2530,7 @@ void SwSectionFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
break;
default:
- bClear = FALSE;
+ bClear = sal_False;
}
if ( bClear )
{
@@ -2551,28 +2551,28 @@ void SwSectionFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
* page causes a maximal Size of the sectionframe.
* --------------------------------------------------*/
-BOOL SwSectionFrm::ToMaximize( BOOL bCheckFollow ) const
+sal_Bool SwSectionFrm::ToMaximize( sal_Bool bCheckFollow ) const
{
if( HasFollow() )
{
if( !bCheckFollow ) // Don't check superfluous follows
- return TRUE;
+ return sal_True;
const SwSectionFrm* pFoll = GetFollow();
while( pFoll && pFoll->IsSuperfluous() )
pFoll = pFoll->GetFollow();
if( pFoll )
- return TRUE;
+ return sal_True;
}
if( IsFtnAtEnd() )
- return FALSE;
+ return sal_False;
const SwFtnContFrm* pCont = ContainsFtnCont();
if( !IsEndnAtEnd() )
return 0 != pCont;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
while( pCont && !bRet )
{
if( pCont->FindFootNote() )
- bRet = TRUE;
+ bRet = sal_True;
else
pCont = ContainsFtnCont( pCont );
}
@@ -2580,7 +2580,7 @@ BOOL SwSectionFrm::ToMaximize( BOOL bCheckFollow ) const
}
/*--------------------------------------------------
- * BOOL SwSectionFrm::ContainsFtnCont()
+ * sal_Bool SwSectionFrm::ContainsFtnCont()
* checks every Column for FtnContFrms.
* --------------------------------------------------*/
@@ -2630,13 +2630,13 @@ void SwSectionFrm::InvalidateFtnPos()
* Das Undersized-Flag wird ggf. korrigiert.
* --------------------------------------------------*/
-long SwSectionFrm::Undersize( BOOL bOverSize )
+long SwSectionFrm::Undersize( sal_Bool bOverSize )
{
- bUndersized = FALSE;
+ bUndersized = sal_False;
SWRECTFN( this )
long nRet = InnerHeight() - (Prt().*fnRect->fnGetHeight)();
if( nRet > 0 )
- bUndersized = TRUE;
+ bUndersized = sal_True;
else if( !bOverSize )
nRet = 0;
return nRet;
@@ -2695,7 +2695,7 @@ void SwRootFrm::InsertEmptySct( SwSectionFrm* pDel )
{
if( !pDestroy )
pDestroy = new SwDestroyList;
- USHORT nPos;
+ sal_uInt16 nPos;
if( !pDestroy->Seek_Entry( pDel, &nPos ) )
pDestroy->Insert( pDel );
}
@@ -2706,7 +2706,7 @@ void SwRootFrm::_DeleteEmptySct()
while( pDestroy->Count() )
{
SwSectionFrm* pSect = (*pDestroy)[0];
- pDestroy->Remove( USHORT(0) );
+ pDestroy->Remove( sal_uInt16(0) );
OSL_ENSURE( !pSect->IsColLocked() && !pSect->IsJoinLocked(),
"DeleteEmptySct: Locked SectionFrm" );
if( !pSect->Frm().HasArea() && !pSect->ContainsCntnt() )
@@ -2735,16 +2735,16 @@ void SwRootFrm::_DeleteEmptySct()
void SwRootFrm::_RemoveFromList( SwSectionFrm* pSct )
{
OSL_ENSURE( pDestroy, "Where's my list?" );
- USHORT nPos;
+ sal_uInt16 nPos;
if( pDestroy->Seek_Entry( pSct, &nPos ) )
pDestroy->Remove( nPos );
}
#if OSL_DEBUG_LEVEL > 1
-BOOL SwRootFrm::IsInDelList( SwSectionFrm* pSct ) const
+sal_Bool SwRootFrm::IsInDelList( SwSectionFrm* pSct ) const
{
- USHORT nPos;
+ sal_uInt16 nPos;
return ( pDestroy && pDestroy->Seek_Entry( pSct, &nPos ) );
}
diff --git a/sw/source/core/layout/softpagebreak.cxx b/sw/source/core/layout/softpagebreak.cxx
index 5248c0a4785e..b55a7f43dd0a 100644
--- a/sw/source/core/layout/softpagebreak.cxx
+++ b/sw/source/core/layout/softpagebreak.cxx
@@ -100,7 +100,7 @@ void SwTxtNode::fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const
}
}
else // No soft page break if there's a "hard" page break attribute
- if( pFirst2 == pFrm && !pFrm->IsPageBreak( TRUE ) )
+ if( pFirst2 == pFrm && !pFrm->IsPageBreak( sal_True ) )
rBreak.insert( pFrm->GetOfst() );
}
}
@@ -126,7 +126,7 @@ bool SwTableLine::hasSoftPageBreak() const
// master table frames with "hard" page break attribute
if( pTab->GetIndPrev() || pTab->FindFooterOrHeader()
|| pTab->IsInFly() || pTab->GetUpper()->IsInTab() ||
- ( !pTab->IsFollow() && pTab->IsPageBreak( TRUE ) ) )
+ ( !pTab->IsFollow() && pTab->IsPageBreak( sal_True ) ) )
return false;
const SwPageFrm* pPage = pTab->FindPageFrm();
// No soft page break at the first page of the document
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 91386c428ef2..56b65c7bfd48 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -77,55 +77,55 @@ long SwFrm::GetPrtRight() const
long SwFrm::GetPrtTop() const
{ return Frm().Top() + Prt().Top(); }
-BOOL SwFrm::SetMinLeft( long nDeadline )
+sal_Bool SwFrm::SetMinLeft( long nDeadline )
{
SwTwips nDiff = nDeadline - Frm().Left();
if( nDiff > 0 )
{
Frm().Left( nDeadline );
Prt().Width( Prt().Width() - nDiff );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwFrm::SetMaxBottom( long nDeadline )
+sal_Bool SwFrm::SetMaxBottom( long nDeadline )
{
SwTwips nDiff = Frm().Top() + Frm().Height() - nDeadline;
if( nDiff > 0 )
{
Frm().Height( Frm().Height() - nDiff );
Prt().Height( Prt().Height() - nDiff );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwFrm::SetMinTop( long nDeadline )
+sal_Bool SwFrm::SetMinTop( long nDeadline )
{
SwTwips nDiff = nDeadline - Frm().Top();
if( nDiff > 0 )
{
Frm().Top( nDeadline );
Prt().Height( Prt().Height() - nDiff );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwFrm::SetMaxRight( long nDeadline )
+sal_Bool SwFrm::SetMaxRight( long nDeadline )
{
SwTwips nDiff = Frm().Left() + Frm().Width() - nDeadline;
if( nDiff > 0 )
{
Frm().Width( Frm().Width() - nDiff );
Prt().Width( Prt().Width() - nDiff );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-void SwFrm::MakeBelowPos( const SwFrm* pUp, const SwFrm* pPrv, BOOL bNotify )
+void SwFrm::MakeBelowPos( const SwFrm* pUp, const SwFrm* pPrv, sal_Bool bNotify )
{
if( pPrv )
{
@@ -141,7 +141,7 @@ void SwFrm::MakeBelowPos( const SwFrm* pUp, const SwFrm* pPrv, BOOL bNotify )
aFrm.Pos().Y() += 1;
}
-void SwFrm::MakeUpperPos( const SwFrm* pUp, const SwFrm* pPrv, BOOL bNotify )
+void SwFrm::MakeUpperPos( const SwFrm* pUp, const SwFrm* pPrv, sal_Bool bNotify )
{
if( pPrv )
{
@@ -158,7 +158,7 @@ void SwFrm::MakeUpperPos( const SwFrm* pUp, const SwFrm* pPrv, BOOL bNotify )
aFrm.Pos().Y() -= 1;
}
-void SwFrm::MakeLeftPos( const SwFrm* pUp, const SwFrm* pPrv, BOOL bNotify )
+void SwFrm::MakeLeftPos( const SwFrm* pUp, const SwFrm* pPrv, sal_Bool bNotify )
{
if( pPrv )
{
@@ -175,7 +175,7 @@ void SwFrm::MakeLeftPos( const SwFrm* pUp, const SwFrm* pPrv, BOOL bNotify )
aFrm.Pos().X() -= 1;
}
-void SwFrm::MakeRightPos( const SwFrm* pUp, const SwFrm* pPrv, BOOL bNotify )
+void SwFrm::MakeRightPos( const SwFrm* pUp, const SwFrm* pPrv, sal_Bool bNotify )
{
if( pPrv )
{
@@ -215,7 +215,7 @@ void SwFrm::SetRightLeftMargins( long nRight, long nLeft)
Prt().Width( Frm().Width() - nLeft - nRight );
}
-const USHORT nMinVertCellHeight = 1135;
+const sal_uInt16 nMinVertCellHeight = 1135;
/*--------------------------------------------------
* SwFrm::CheckDirChange(..)
@@ -225,13 +225,15 @@ const USHORT nMinVertCellHeight = 1135;
void SwFrm::CheckDirChange()
{
- BOOL bOldVert = GetVerticalFlag();
- BOOL bOldRev = IsReverse();
- BOOL bOldR2L = GetRightToLeftFlag();
- SetInvalidVert( TRUE );
- SetInvalidR2L( TRUE );
- BOOL bChg = bOldR2L != IsRightToLeft();
- if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev )
+ sal_Bool bOldVert = GetVerticalFlag();
+ sal_Bool bOldRev = IsReverse();
+ sal_Bool bOldR2L = GetRightToLeftFlag();
+ SetInvalidVert( sal_True );
+ SetInvalidR2L( sal_True );
+ sal_Bool bChg = bOldR2L != IsRightToLeft();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ sal_Bool bOldVertL2R = IsVertLR();
+ if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev || bOldVertL2R != IsVertLR() )
{
InvalidateAll();
if( IsLayoutFrm() )
@@ -281,7 +283,7 @@ void SwFrm::CheckDirChange()
pFrm = pFrm->GetNext();
}
if( pCol )
- pBody->AdjustColumns( pCol, TRUE );
+ pBody->AdjustColumns( pCol, sal_True );
}
else if( IsTxtFrm() )
((SwTxtFrm*)this)->Prepare( PREP_CLEAR );
@@ -325,7 +327,8 @@ void SwFrm::CheckDirChange()
Point SwFrm::GetFrmAnchorPos( sal_Bool bIgnoreFlysAnchoredAtThisFrame ) const
{
Point aAnchor = Frm().Pos();
- if ( IsVertical() || IsRightToLeft() )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( ( IsVertical() && !IsVertLR() ) || IsRightToLeft() )
aAnchor.X() += Frm().Width();
if ( IsTxtFrm() )
@@ -412,6 +415,19 @@ SwFrm::~SwFrm()
#endif
}
+/*************************************************************************/
+
+const SwFrmFmt * SwLayoutFrm::GetFmt() const
+{
+ return static_cast< const SwFlyFrmFmt * >( GetDep() );
+}
+
+SwFrmFmt * SwLayoutFrm::GetFmt()
+{
+ return static_cast< SwFlyFrmFmt * >( GetDep() );
+}
+
+
/*************************************************************************
|*
|* SwLayoutFrm::SetFrmFmt()
@@ -459,8 +475,8 @@ SwCntntFrm::~SwCntntFrm()
{
SwTxtNode *pTxtNd = ((SwTxtFrm*)this)->GetTxtNode();
const SwFtnIdxs &rFtnIdxs = pCNd->GetDoc()->GetFtnIdxs();
- USHORT nPos;
- ULONG nIndex = pCNd->GetIndex();
+ sal_uInt16 nPos;
+ sal_uLong nIndex = pCNd->GetIndex();
rFtnIdxs.SeekEntry( *pTxtNd, &nPos );
SwTxtFtn* pTxtFtn;
if( nPos < rFtnIdxs.Count() )
@@ -588,13 +604,14 @@ const SwRect SwFrm::PaintArea() const
// NEW TABLES
// Cell frames may not leave their upper:
SwRect aRect = IsRowFrm() ? GetUpper()->Frm() : Frm();
- const BOOL bVert = IsVertical();
- SwRectFn fnRect = bVert ? fnRectVert : fnRectHori;
+ const sal_Bool bVert = IsVertical();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
long nRight = (aRect.*fnRect->fnGetRight)();
long nLeft = (aRect.*fnRect->fnGetLeft)();
const SwFrm* pTmp = this;
- BOOL bLeft = TRUE;
- BOOL bRight = TRUE;
+ sal_Bool bLeft = sal_True;
+ sal_Bool bRight = sal_True;
long nRowSpan = 0;
while( pTmp )
{
@@ -624,25 +641,25 @@ const SwRect SwFrm::PaintArea() const
nRight = nTmpRight;
if( pTmp->IsPageFrm() || pTmp->IsFlyFrm() || pTmp->IsRootFrm() )
break;
- bLeft = FALSE;
- bRight = FALSE;
+ bLeft = sal_False;
+ bRight = sal_False;
}
else if( pTmp->IsColumnFrm() ) // nobody enters neightbour columns
{
- BOOL bR2L = pTmp->IsRightToLeft();
+ sal_Bool bR2L = pTmp->IsRightToLeft();
// the first column has _no_ influence to the left range
if( bR2L ? pTmp->GetNext() : pTmp->GetPrev() )
{
if( bLeft || nLeft < nTmpLeft )
nLeft = nTmpLeft;
- bLeft = FALSE;
+ bLeft = sal_False;
}
// the last column has _no_ influence to the right range
if( bR2L ? pTmp->GetPrev() : pTmp->GetNext() )
{
if( bRight || nTmpRight < nRight )
nRight = nTmpRight;
- bRight = FALSE;
+ bRight = sal_False;
}
}
else if( bVert && pTmp->IsBodyFrm() )
@@ -656,14 +673,14 @@ const SwRect SwFrm::PaintArea() const
if( pTmp->GetPrev() && ( bLeft || nLeft < nTmpLeft ) )
{
nLeft = nTmpLeft;
- bLeft = FALSE;
+ bLeft = sal_False;
}
if( pTmp->GetNext() &&
( pTmp->GetNext()->IsFooterFrm() || pTmp->GetNext()->GetNext() )
&& ( bRight || nTmpRight < nRight ) )
{
nRight = nTmpRight;
- bRight = FALSE;
+ bRight = sal_False;
}
}
pTmp = pTmp->GetUpper();
@@ -682,10 +699,11 @@ const SwRect SwFrm::PaintArea() const
|*
|*************************************************************************/
-const SwRect SwFrm::UnionFrm( BOOL bBorder ) const
+const SwRect SwFrm::UnionFrm( sal_Bool bBorder ) const
{
- BOOL bVert = IsVertical();
- SwRectFn fnRect = bVert ? fnRectVert : fnRectHori;
+ sal_Bool bVert = IsVertical();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
long nLeft = (Frm().*fnRect->fnGetLeft)();
long nWidth = (Frm().*fnRect->fnGetWidth)();
long nPrtLeft = (Prt().*fnRect->fnGetLeft)();
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 8a45fc4e0dde..404bb570595a 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -82,7 +82,7 @@
#include <layouter.hxx>
// <--
-extern void AppendObjs( const SwSpzFrmFmts *pTbl, ULONG nIndex,
+extern void AppendObjs( const SwSpzFrmFmts *pTbl, sal_uLong nIndex,
SwFrm *pFrm, SwPageFrm *pPage );
using namespace ::com::sun::star;
@@ -100,18 +100,18 @@ SwTabFrm::SwTabFrm( SwTable &rTab ):
{
bComplete = bCalcLowers = bONECalcLowers = bLowersFormatted = bLockBackMove =
bResizeHTMLTable = bHasFollowFlowLine = bIsRebuildLastLine =
- bRestrictTableGrowth = bRemoveFollowFlowLinePending = FALSE;
+ bRestrictTableGrowth = bRemoveFollowFlowLinePending = sal_False;
// --> OD 2004-10-04 #i26945#
- bConsiderObjsForMinCellHeight = TRUE;
- bObjsDoesFit = TRUE;
+ bConsiderObjsForMinCellHeight = sal_True;
+ bObjsDoesFit = sal_True;
// <--
- bFixSize = FALSE; //Nicht nochmal auf die Importfilter hereinfallen.
+ bFixSize = sal_False; //Nicht nochmal auf die Importfilter hereinfallen.
nType = FRMC_TAB;
//Gleich die Zeilen erzeugen und einfuegen.
const SwTableLines &rLines = rTab.GetTabLines();
SwFrm *pTmpPrev = 0;
- for ( USHORT i = 0; i < rLines.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
{
SwRowFrm *pNew = new SwRowFrm( *rLines[i] );
if( pNew->Lower() )
@@ -130,15 +130,15 @@ SwTabFrm::SwTabFrm( SwTabFrm &rTab ) :
SwFlowFrm( (SwFrm&)*this ),
pTable( rTab.GetTable() )
{
- bIsFollow = TRUE;
+ bIsFollow = sal_True;
bLockJoin = bComplete = bONECalcLowers = bCalcLowers = bLowersFormatted = bLockBackMove =
bResizeHTMLTable = bHasFollowFlowLine = bIsRebuildLastLine =
- bRestrictTableGrowth = bRemoveFollowFlowLinePending = FALSE;
+ bRestrictTableGrowth = bRemoveFollowFlowLinePending = sal_False;
// --> OD 2004-10-04 #i26945#
- bConsiderObjsForMinCellHeight = TRUE;
- bObjsDoesFit = TRUE;
+ bConsiderObjsForMinCellHeight = sal_True;
+ bObjsDoesFit = sal_True;
// <--
- bFixSize = FALSE; //Nicht nochmal auf die Importfilter hereinfallen.
+ bFixSize = sal_False; //Nicht nochmal auf die Importfilter hereinfallen.
nType = FRMC_TAB;
SetFollow( rTab.GetFollow() );
@@ -212,10 +212,10 @@ void MA_FASTCALL SwInvalidateAll( SwFrm *pFrm, long nBottom );
bool MA_FASTCALL lcl_CalcLowers( SwLayoutFrm *pLay, const SwLayoutFrm* pDontLeave,
long nBottom, bool bSkipRowSpanCells );
void MA_FASTCALL lcl_RecalcRow( SwRowFrm& rRow, long nBottom );
-BOOL lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, BOOL bInva );
+sal_Bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, sal_Bool bInva );
// --> OD 2004-10-15 #i26945# - add parameter <_bOnlyRowsAndCells> to control
// that only row and cell frames are formatted.
-BOOL MA_FASTCALL lcl_InnerCalcLayout( SwFrm *pFrm,
+sal_Bool MA_FASTCALL lcl_InnerCalcLayout( SwFrm *pFrm,
long nBottom,
bool _bOnlyRowsAndCells = false );
// <--
@@ -224,7 +224,7 @@ BOOL MA_FASTCALL lcl_InnerCalcLayout( SwFrm *pFrm,
// control, if floating screen objects have to be considered for the minimal
// cell height.
SwTwips MA_FASTCALL lcl_CalcMinRowHeight( const SwRowFrm *pRow,
- const BOOL _bConsiderObjs );
+ const sal_Bool _bConsiderObjs );
// <--
SwTwips lcl_CalcTopAndBottomMargin( const SwLayoutFrm&, const SwBorderAttrs& );
@@ -265,7 +265,7 @@ SwRowFrm* lcl_InsertNewFollowFlowLine( SwTabFrm& rTab, const SwFrm& rTmpRow, boo
OSL_ENSURE( rTmpRow.IsRowFrm(), "No row frame to copy for FollowFlowLine" );
const SwRowFrm& rRow = (SwRowFrm&)rTmpRow;
- rTab.SetFollowFlowLine( TRUE );
+ rTab.SetFollowFlowLine( sal_True );
SwRowFrm *pFollowFlowLine = new SwRowFrm(*rRow.GetTabLine(), false );
pFollowFlowLine->SetRowSpanLine( bRowSpanLine );
SwFrm* pFirstRow = rTab.GetFollow()->GetFirstNonHeadlineRow();
@@ -303,7 +303,7 @@ void lcl_InvalidateLowerObjs( SwLayoutFrm& _rLayoutFrm,
}
if ( pLowerFrm->GetDrawObjs() )
{
- for ( USHORT i = 0; i < pLowerFrm->GetDrawObjs()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pLowerFrm->GetDrawObjs()->Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pLowerFrm->GetDrawObjs())[i];
@@ -496,9 +496,9 @@ void lcl_MoveFootnotes( SwTabFrm& rSource, SwTabFrm& rDest, SwLayoutFrm& rRowFrm
{
if ( 0 != rSource.GetFmt()->GetDoc()->GetFtnIdxs().Count() )
{
- SwFtnBossFrm* pOldBoss = rSource.FindFtnBossFrm( TRUE );
- SwFtnBossFrm* pNewBoss = rDest.FindFtnBossFrm( TRUE );
- rRowFrm.MoveLowerFtns( 0, pOldBoss, pNewBoss, TRUE );
+ SwFtnBossFrm* pOldBoss = rSource.FindFtnBossFrm( sal_True );
+ SwFtnBossFrm* pNewBoss = rDest.FindFtnBossFrm( sal_True );
+ rRowFrm.MoveLowerFtns( 0, pOldBoss, pNewBoss, sal_True );
}
}
@@ -682,9 +682,9 @@ bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine,
//
// Here the recalculation process starts:
//
- rTab.SetRebuildLastLine( TRUE );
+ rTab.SetRebuildLastLine( sal_True );
// --> OD 2004-10-15 #i26945#
- rTab.SetDoesObjsFit( TRUE );
+ rTab.SetDoesObjsFit( sal_True );
// <--
SWRECTFN( rTab.GetUpper() )
@@ -697,9 +697,9 @@ bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine,
//
// --> OD 2004-10-04 #i26945# - Do *not* consider floating screen objects
// for the minimal cell height.
- rTab.SetConsiderObjsForMinCellHeight( FALSE );
+ rTab.SetConsiderObjsForMinCellHeight( sal_False );
::lcl_ShrinkCellsAndAllContent( rLastLine );
- rTab.SetConsiderObjsForMinCellHeight( TRUE );
+ rTab.SetConsiderObjsForMinCellHeight( sal_True );
// <--
//
@@ -829,9 +829,9 @@ bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine,
::SwInvalidateAll( &rLastLine, LONG_MAX );
}
- rTab.SetRebuildLastLine( FALSE );
+ rTab.SetRebuildLastLine( sal_False );
// --> OD 2004-10-15 #i26945#
- rTab.SetDoesObjsFit( TRUE );
+ rTab.SetDoesObjsFit( sal_True );
// <--
return bRet;
@@ -916,7 +916,7 @@ bool SwTabFrm::RemoveFollowFlowLine()
// We have to reset the flag here, because lcl_MoveRowContent
// calls a GrowFrm(), which has a different bahavior if
// this flag is set.
- SetFollowFlowLine( FALSE );
+ SetFollowFlowLine( sal_False );
// --> FME 2007-07-19 #140081# Make code robust.
if ( !pFollowFlowLine || !pLastLine )
@@ -1033,8 +1033,8 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
if( !pRow )
return bRet;
- const USHORT nRepeat = GetTable()->GetRowsToRepeat();
- USHORT nRowCount = 0; // pRow currently points to the first row
+ const sal_uInt16 nRepeat = GetTable()->GetRowsToRepeat();
+ sal_uInt16 nRowCount = 0; // pRow currently points to the first row
SwTwips nRemainingSpaceForLastRow =
(*fnRect->fnYDiff)( nCutPos, (Frm().*fnRect->fnGetTop)() );
@@ -1205,16 +1205,16 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
//
// Build follow table if not already done:
//
- BOOL bNewFollow;
+ sal_Bool bNewFollow;
SwTabFrm *pFoll;
if ( GetFollow() )
{
pFoll = GetFollow();
- bNewFollow = FALSE;
+ bNewFollow = sal_False;
}
else
{
- bNewFollow = TRUE;
+ bNewFollow = sal_True;
pFoll = new SwTabFrm( *this );
//
@@ -1235,18 +1235,18 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
for ( nRowCount = 0; nRowCount < nRepeat; ++nRowCount )
{
// Insert new headlines:
- bDontCreateObjects = TRUE; //frmtool
+ bDontCreateObjects = sal_True; //frmtool
SwRowFrm* pHeadline = new SwRowFrm(
*GetTable()->GetTabLines()[ nRowCount ] );
pHeadline->SetRepeatedHeadline( true );
- bDontCreateObjects = FALSE;
+ bDontCreateObjects = sal_False;
pHeadline->InsertBefore( pFoll, 0 );
SwPageFrm *pPage = pHeadline->FindPageFrm();
const SwSpzFrmFmts *pTbl = GetFmt()->GetDoc()->GetSpzFrmFmts();
if( pTbl->Count() )
{
- ULONG nIndex;
+ sal_uLong nIndex;
SwCntntFrm* pFrm = pHeadline->ContainsCntnt();
while( pFrm )
{
@@ -1415,7 +1415,7 @@ bool SwTabFrm::Join()
void MA_FASTCALL SwInvalidatePositions( SwFrm *pFrm, long nBottom )
{
// LONG_MAX == nBottom means we have to calculate all
- BOOL bAll = LONG_MAX == nBottom;
+ sal_Bool bAll = LONG_MAX == nBottom;
SWRECTFN( pFrm )
do
{ pFrm->_InvalidatePos();
@@ -1441,7 +1441,7 @@ void MA_FASTCALL SwInvalidatePositions( SwFrm *pFrm, long nBottom )
void MA_FASTCALL SwInvalidateAll( SwFrm *pFrm, long nBottom )
{
// LONG_MAX == nBottom means we have to calculate all
- BOOL bAll = LONG_MAX == nBottom;
+ sal_Bool bAll = LONG_MAX == nBottom;
SWRECTFN( pFrm )
do
{
@@ -1502,17 +1502,17 @@ bool MA_FASTCALL lcl_CalcLowers( SwLayoutFrm* pLay, const SwLayoutFrm* pDontLeav
long nBottom, bool bSkipRowSpanCells )
{
if ( !pLay )
- return TRUE;
+ return sal_True;
// LONG_MAX == nBottom means we have to calculate all
bool bAll = LONG_MAX == nBottom;
- bool bRet = FALSE;
+ bool bRet = sal_False;
SwCntntFrm *pCnt = pLay->ContainsCntnt();
SWRECTFN( pLay )
// FME 2007-08-30 #i81146# new loop control
- USHORT nLoopControlRuns = 0;
- const USHORT nLoopControlMax = 10;
+ sal_uInt16 nLoopControlRuns = 0;
+ const sal_uInt16 nLoopControlMax = 10;
const SwModify* pLoopControlCond = 0;
while ( pCnt && pDontLeave->IsAnLower( pCnt ) )
@@ -1592,13 +1592,13 @@ bool MA_FASTCALL lcl_CalcLowers( SwLayoutFrm* pLay, const SwLayoutFrm* pDontLeav
// --> OD 2004-10-15 #i26945# - add parameter <_bOnlyRowsAndCells> to control
// that only row and cell frames are formatted.
-BOOL MA_FASTCALL lcl_InnerCalcLayout( SwFrm *pFrm,
+sal_Bool MA_FASTCALL lcl_InnerCalcLayout( SwFrm *pFrm,
long nBottom,
bool _bOnlyRowsAndCells )
{
// LONG_MAX == nBottom means we have to calculate all
- BOOL bAll = LONG_MAX == nBottom;
- BOOL bRet = FALSE;
+ sal_Bool bAll = LONG_MAX == nBottom;
+ sal_Bool bRet = sal_False;
const SwFrm* pOldUp = pFrm->GetUpper();
SWRECTFN( pFrm )
do
@@ -1650,16 +1650,16 @@ void MA_FASTCALL lcl_RecalcRow( SwRowFrm& rRow, long nBottom )
// <--
// FME 2007-08-30 #i81146# new loop control
- USHORT nLoopControlRuns_1 = 0;
- USHORT nLoopControlStage_1 = 0;
- const USHORT nLoopControlMax = 10;
+ sal_uInt16 nLoopControlRuns_1 = 0;
+ sal_uInt16 nLoopControlStage_1 = 0;
+ const sal_uInt16 nLoopControlMax = 10;
bool bCheck = true;
do
{
// FME 2007-08-30 #i81146# new loop control
- USHORT nLoopControlRuns_2 = 0;
- USHORT nLoopControlStage_2 = 0;
+ sal_uInt16 nLoopControlRuns_2 = 0;
+ sal_uInt16 nLoopControlStage_2 = 0;
while( lcl_InnerCalcLayout( &rRow, nBottom ) )
{
@@ -1746,7 +1746,7 @@ void MA_FASTCALL lcl_RecalcTable( SwTabFrm& rTab,
if ( !pFirstRow )
{
pFirstRow = (SwLayoutFrm*)rTab.Lower();
- rNotify.SetLowersComplete( TRUE );
+ rNotify.SetLowersComplete( sal_True );
}
::SwInvalidatePositions( pFirstRow, LONG_MAX );
lcl_RecalcRow( static_cast<SwRowFrm&>(*pFirstRow), LONG_MAX );
@@ -1864,7 +1864,7 @@ void SwTabFrm::MakeAll()
SwLayNotify aNotify( this ); //uebernimmt im DTor die Benachrichtigung
// If pos is invalid, we have to call a SetInvaKeep at aNotify.
// Otherwise the keep atribute would not work in front of a table.
- const BOOL bOldValidPos = GetValidPosFlag();
+ const sal_Bool bOldValidPos = GetValidPosFlag();
//Wenn mein direkter Nachbar gleichzeitig mein Follow ist
//verleibe ich mir das Teil ein.
@@ -1888,29 +1888,29 @@ void SwTabFrm::MakeAll()
{
if ( RemoveFollowFlowLine() )
Join();
- SetRemoveFollowFlowLinePending( FALSE );
+ SetRemoveFollowFlowLinePending( sal_False );
}
if ( bResizeHTMLTable ) //Optimiertes Zusammenspiel mit Grow/Shrink des Inhaltes
{
- bResizeHTMLTable = FALSE;
+ bResizeHTMLTable = sal_False;
SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout();
if ( pLayout )
bCalcLowers = pLayout->Resize(
- pLayout->GetBrowseWidthByTabFrm( *this ), FALSE );
+ pLayout->GetBrowseWidthByTabFrm( *this ), sal_False );
}
- BOOL bMakePage = TRUE; //solange TRUE kann eine neue Seite
+ sal_Bool bMakePage = sal_True; //solange sal_True kann eine neue Seite
//angelegt werden (genau einmal)
- BOOL bMovedBwd = FALSE; //Wird TRUE wenn der Frame zurueckfliesst
- BOOL bMovedFwd = FALSE; //solange FALSE kann der Frm zurueck-
+ sal_Bool bMovedBwd = sal_False; //Wird sal_True wenn der Frame zurueckfliesst
+ sal_Bool bMovedFwd = sal_False; //solange sal_False kann der Frm zurueck-
//fliessen (solange, bis er einmal
//vorwaerts ge'moved wurde).
- BOOL bSplit = FALSE; //Wird TRUE wenn der Frm gesplittet wurde.
- const BOOL bFtnsInDoc = 0 != GetFmt()->GetDoc()->GetFtnIdxs().Count();
- BOOL bMoveable;
- const BOOL bFly = IsInFly();
+ sal_Bool bSplit = sal_False; //Wird sal_True wenn der Frm gesplittet wurde.
+ const sal_Bool bFtnsInDoc = 0 != GetFmt()->GetDoc()->GetFtnIdxs().Count();
+ sal_Bool bMoveable;
+ const sal_Bool bFly = IsInFly();
SwBorderAttrAccess *pAccess= new SwBorderAttrAccess( SwFrm::GetCache(), this );
const SwBorderAttrs *pAttrs = pAccess->Get();
@@ -1924,7 +1924,7 @@ void SwTabFrm::MakeAll()
( !GetFmt()->GetLayoutSplit().GetValue() || bKeep );
// The number of repeated headlines
- const USHORT nRepeat = GetTable()->GetRowsToRepeat();
+ const sal_uInt16 nRepeat = GetTable()->GetRowsToRepeat();
// This flag indicates that we are allowed to try to split the
// table rows.
@@ -1984,9 +1984,9 @@ void SwTabFrm::MakeAll()
SwFrm *pPre = GetPrev();
if ( pPre && pPre->IsTabFrm() && ((SwTabFrm*)pPre)->GetFollow() == this)
{
- if ( !MoveFwd( bMakePage, FALSE ) )
- bMakePage = FALSE;
- bMovedFwd = TRUE;
+ if ( !MoveFwd( bMakePage, sal_False ) )
+ bMakePage = sal_False;
+ bMovedFwd = sal_True;
}
}
@@ -1994,15 +1994,15 @@ void SwTabFrm::MakeAll()
SWRECTFN( this )
while ( !bValidPos || !bValidSize || !bValidPrtArea )
{
- if ( TRUE == (bMoveable = IsMoveable()) )
+ if ( sal_True == (bMoveable = IsMoveable()) )
if ( CheckMoveFwd( bMakePage, bKeep && KEEPTAB, bMovedBwd ) )
{
- bMovedFwd = TRUE;
- bCalcLowers = TRUE;
+ bMovedFwd = sal_True;
+ bCalcLowers = sal_True;
// --> OD 2009-08-12 #i99267#
// reset <bSplit> after forward move to assure that follows
// can be joined, if further space is available.
- bSplit = FALSE;
+ bSplit = sal_False;
// <--
}
@@ -2018,23 +2018,23 @@ void SwTabFrm::MakeAll()
{
delete pAccess;
bCalcLowers |= pLayout->Resize(
- pLayout->GetBrowseWidthByTabFrm( *this ), FALSE );
+ pLayout->GetBrowseWidthByTabFrm( *this ), sal_False );
pAccess = new SwBorderAttrAccess( SwFrm::GetCache(), this );
pAttrs = pAccess->Get();
}
- bValidPrtArea = FALSE;
- aNotify.SetLowersComplete( FALSE );
+ bValidPrtArea = sal_False;
+ aNotify.SetLowersComplete( sal_False );
}
SwFrm *pPre;
if ( bKeep || (0 != (pPre = FindPrev()) &&
pPre->GetAttrSet()->GetKeep().GetValue()) )
{
- bCalcLowers = TRUE;
+ bCalcLowers = sal_True;
// --> OD 2009-03-06 #i99267#
// reset <bSplit> after forward move to assure that follows
// can be joined, if further space is available.
- bSplit = FALSE;
+ bSplit = sal_False;
// <--
}
}
@@ -2064,12 +2064,12 @@ void SwTabFrm::MakeAll()
{
delete pAccess;
bCalcLowers |= pLayout->Resize(
- pLayout->GetBrowseWidthByTabFrm( *this ), FALSE );
+ pLayout->GetBrowseWidthByTabFrm( *this ), sal_False );
pAccess= new SwBorderAttrAccess( SwFrm::GetCache(), this );
pAttrs = pAccess->Get();
}
if ( aOldPrtPos != (Prt().*fnRect->fnGetPos)() )
- aNotify.SetLowersComplete( FALSE );
+ aNotify.SetLowersComplete( sal_False );
}
//Wenn ich der erste einer Kette bin koennte ich mal sehen ob
@@ -2088,20 +2088,20 @@ void SwTabFrm::MakeAll()
if( pFrm && n1StLineHeight >(pFrm->Frm().*fnRect->fnGetHeight )() )
{
SwTabFrm *pMaster = (SwTabFrm*)FindMaster();
- BOOL bDummy;
- if ( ShouldBwdMoved( pMaster->GetUpper(), FALSE, bDummy ) )
+ sal_Bool bDummy;
+ if ( ShouldBwdMoved( pMaster->GetUpper(), sal_False, bDummy ) )
pMaster->InvalidatePos();
}
}
- SwFtnBossFrm *pOldBoss = bFtnsInDoc ? FindFtnBossFrm( TRUE ) : 0;
- BOOL bReformat;
+ SwFtnBossFrm *pOldBoss = bFtnsInDoc ? FindFtnBossFrm( sal_True ) : 0;
+ sal_Bool bReformat;
if ( MoveBwd( bReformat ) )
{
SWREFRESHFN( this )
- bMovedBwd = TRUE;
- aNotify.SetLowersComplete( FALSE );
+ bMovedBwd = sal_True;
+ aNotify.SetLowersComplete( sal_False );
if ( bFtnsInDoc )
- MoveLowerFtns( 0, pOldBoss, 0, TRUE );
+ MoveLowerFtns( 0, pOldBoss, 0, sal_True );
if ( bReformat || bKeep )
{
long nOldTop = (Frm().*fnRect->fnGetTop)();
@@ -2115,18 +2115,18 @@ void SwTabFrm::MakeAll()
delete pAccess;
bCalcLowers |= pHTMLLayout->Resize(
pHTMLLayout->GetBrowseWidthByTabFrm( *this ),
- FALSE );
+ sal_False );
pAccess= new SwBorderAttrAccess(
SwFrm::GetCache(), this );
pAttrs = pAccess->Get();
}
- bValidPrtArea = FALSE;
+ bValidPrtArea = sal_False;
Format( pAttrs );
}
lcl_RecalcTable( *this, 0, aNotify );
- bLowersFormatted = TRUE;
+ bLowersFormatted = sal_True;
if ( bKeep && KEEPTAB )
{
// --> OD 2005-09-28 #b6329202#
@@ -2138,7 +2138,7 @@ void SwTabFrm::MakeAll()
// content.
if ( 0 != lcl_FormatNextCntntForKeep( this ) && !GetNext() )
{
- bValidPos = FALSE;
+ bValidPos = sal_False;
}
// <--
}
@@ -2185,13 +2185,13 @@ void SwTabFrm::MakeAll()
// at least one further row of an existing follow.
if ( !bSplit && GetFollow() )
{
- BOOL bDummy;
- if ( GetFollow()->ShouldBwdMoved( GetUpper(), FALSE, bDummy ) )
+ sal_Bool bDummy;
+ if ( GetFollow()->ShouldBwdMoved( GetUpper(), sal_False, bDummy ) )
{
SwFrm *pTmp = GetUpper();
SwTwips nDeadLine = (pTmp->*fnRect->fnGetPrtBottom)();
if ( bBrowseMode )
- nDeadLine += pTmp->Grow( LONG_MAX, TRUE );
+ nDeadLine += pTmp->Grow( LONG_MAX, sal_True );
if( (Frm().*fnRect->fnBottomDist)( nDeadLine ) > 0 )
{
//
@@ -2205,9 +2205,9 @@ void SwTabFrm::MakeAll()
if ( pLastLine )
{
::SwInvalidateAll( pLastLine, LONG_MAX );
- SetRebuildLastLine( TRUE );
+ SetRebuildLastLine( sal_True );
lcl_RecalcRow( static_cast<SwRowFrm&>(*pLastLine), LONG_MAX );
- SetRebuildLastLine( FALSE );
+ SetRebuildLastLine( sal_False );
}
SwFrm* pRow = GetFollow()->GetFirstNonHeadlineRow();
@@ -2238,11 +2238,11 @@ void SwTabFrm::MakeAll()
while ( pRowToMove && nRowsToMove-- > 0 )
{
- const BOOL bMoveFtns = bFtnsInDoc && !GetFollow()->IsJoinLocked();
+ const sal_Bool bMoveFtns = bFtnsInDoc && !GetFollow()->IsJoinLocked();
SwFtnBossFrm *pOldBoss = 0;
if ( bMoveFtns )
- pOldBoss = pRowToMove->FindFtnBossFrm( TRUE );
+ pOldBoss = pRowToMove->FindFtnBossFrm( sal_True );
SwFrm* pNextRow = pRowToMove->GetNext();
@@ -2258,7 +2258,7 @@ void SwTabFrm::MakeAll()
//Die Fussnoten verschieben!
if ( bMoveFtns )
if ( ((SwLayoutFrm*)pRowToMove)->MoveLowerFtns(
- 0, pOldBoss, FindFtnBossFrm( TRUE ), TRUE ) )
+ 0, pOldBoss, FindFtnBossFrm( sal_True ), sal_True ) )
GetUpper()->Calc();
pRowToMove = pNextRow;
@@ -2316,7 +2316,7 @@ void SwTabFrm::MakeAll()
// In this case we do a magic trick:
if ( !bKeep && !GetNext() && pTmpNxt && pTmpNxt->IsValid() )
{
- bValidPos = FALSE;
+ bValidPos = sal_False;
bLastRowHasToMoveToFollow = true;
}
}
@@ -2327,13 +2327,13 @@ void SwTabFrm::MakeAll()
if ( bCalcLowers )
{
lcl_RecalcTable( *this, 0, aNotify );
- bLowersFormatted = TRUE;
- bCalcLowers = FALSE;
+ bLowersFormatted = sal_True;
+ bCalcLowers = sal_False;
}
else if ( bONECalcLowers )
{
lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), LONG_MAX );
- bONECalcLowers = FALSE;
+ bONECalcLowers = sal_False;
}
}
continue;
@@ -2351,13 +2351,13 @@ void SwTabFrm::MakeAll()
if ( bCalcLowers && IsValid() )
{
lcl_RecalcTable( *this, 0, aNotify );
- bLowersFormatted = TRUE;
- bCalcLowers = FALSE;
+ bLowersFormatted = sal_True;
+ bCalcLowers = sal_False;
}
else if ( bONECalcLowers )
{
lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), LONG_MAX );
- bONECalcLowers = FALSE;
+ bONECalcLowers = sal_False;
}
// It does not make sense to cut off the last line if we are
@@ -2370,8 +2370,8 @@ void SwTabFrm::MakeAll()
if ( bCalcLowers && IsValid() )
{
lcl_RecalcTable( *this, 0, aNotify );
- bLowersFormatted = TRUE;
- bCalcLowers = FALSE;
+ bLowersFormatted = sal_True;
+ bCalcLowers = sal_False;
if( !IsValid() )
continue;
}
@@ -2409,11 +2409,11 @@ void SwTabFrm::MakeAll()
SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)();
if( IsInSct() || GetUpper()->IsInTab() ) // TABLE IN TABLE)
nDeadLine = (*fnRect->fnYInc)( nDeadLine,
- GetUpper()->Grow( LONG_MAX, TRUE ) );
+ GetUpper()->Grow( LONG_MAX, sal_True ) );
::lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), nDeadLine );
- bLowersFormatted = TRUE;
- aNotify.SetLowersComplete( TRUE );
+ bLowersFormatted = sal_True;
+ aNotify.SetLowersComplete( sal_True );
// One more check if its really necessary to split the table.
// 1. The table either has to exceed the deadline or
@@ -2440,7 +2440,7 @@ void SwTabFrm::MakeAll()
}
// <--
- USHORT nMinNumOfLines = nRepeat;
+ sal_uInt16 nMinNumOfLines = nRepeat;
if ( bTableRowKeep )
{
@@ -2470,8 +2470,8 @@ void SwTabFrm::MakeAll()
// if we do not have an (in)direkt Prev, we split anyway.
if( (*fnRect->fnYDiff)(nDeadLine, nBreakLine) >=0 || !pIndPrev )
{
- aNotify.SetLowersComplete( FALSE );
- bSplit = TRUE;
+ aNotify.SetLowersComplete( sal_False );
+ bSplit = sal_True;
//
// An existing follow flow line has to be removed.
@@ -2507,7 +2507,7 @@ void SwTabFrm::MakeAll()
if ( bSplitError && bTryToSplit ) // no restart if we did not try to split: i72847, i79426
{
lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), LONG_MAX );
- bValidPos = FALSE;
+ bValidPos = sal_False;
bTryToSplit = false;
continue;
}
@@ -2532,7 +2532,7 @@ void SwTabFrm::MakeAll()
// <--
SWRECTFNX( GetFollow() )
- static BYTE nStack = 0;
+ static sal_uInt8 nStack = 0;
if ( !StackHack::IsLocked() && nStack < 4 )
{
++nStack;
@@ -2544,7 +2544,7 @@ void SwTabFrm::MakeAll()
pAccess= new SwBorderAttrAccess( SwFrm::GetCache(), this );
pAttrs = pAccess->Get();
- ((SwTabFrm*)GetFollow())->SetLowersFormatted(FALSE);
+ ((SwTabFrm*)GetFollow())->SetLowersFormatted(sal_False);
// --> OD 2005-03-30 #i43913# - lock follow table
// to avoid its formatting during the format of
// its content.
@@ -2588,7 +2588,7 @@ void SwTabFrm::MakeAll()
--nStack;
}
else if ( GetFollow() == GetNext() )
- ((SwTabFrm*)GetFollow())->MoveFwd( TRUE, FALSE );
+ ((SwTabFrm*)GetFollow())->MoveFwd( sal_True, sal_False );
}
continue;
}
@@ -2602,15 +2602,15 @@ void SwTabFrm::MakeAll()
GetUpper()->GetUpper()->GetUpper()->IsSctFrm() &&
( GetUpper()->GetUpper()->GetPrev() || GetIndPrev() ) &&
((SwSectionFrm*)GetUpper()->GetUpper()->GetUpper())->MoveAllowed(this) )
- bMovedFwd = FALSE;
+ bMovedFwd = sal_False;
// --> FME 2004-06-09 #i29771# Reset bTryToSplit flag on change of upper
const SwFrm* pOldUpper = GetUpper();
// <--
//Mal sehen ob ich irgenwo Platz finde...
- if ( !bMovedFwd && !MoveFwd( bMakePage, FALSE ) )
- bMakePage = FALSE;
+ if ( !bMovedFwd && !MoveFwd( bMakePage, sal_False ) )
+ bMakePage = sal_False;
// --> FME 2004-06-09 #i29771# Reset bSplitError flag on change of upper
if ( GetUpper() != pOldUpper )
@@ -2621,8 +2621,8 @@ void SwTabFrm::MakeAll()
// <--
SWREFRESHFN( this )
- bMovedFwd = bCalcLowers = TRUE;
- aNotify.SetLowersComplete( FALSE );
+ bMovedFwd = bCalcLowers = sal_True;
+ aNotify.SetLowersComplete( sal_False );
if ( IsFollow() )
{ //Um Oszillationen zu vermeiden sollte kein ungueltiger Master
//zurueckbleiben.
@@ -2630,7 +2630,7 @@ void SwTabFrm::MakeAll()
if ( pTab->GetUpper() )
pTab->GetUpper()->Calc();
pTab->Calc();
- pTab->SetLowersFormatted( FALSE );
+ pTab->SetLowersFormatted( sal_False );
}
//Wenn mein direkter Nachbar jetzt gleichzeitig mein Follow ist
@@ -2659,8 +2659,8 @@ void SwTabFrm::MakeAll()
if ( nDistToUpperPrtBottom >= 0 || bTryToSplit )
{
lcl_RecalcTable( *this, 0, aNotify );
- bLowersFormatted = TRUE;
- bCalcLowers = FALSE;
+ bLowersFormatted = sal_True;
+ bCalcLowers = sal_False;
}
#if OSL_DEBUG_LEVEL > 1
else
@@ -2682,7 +2682,7 @@ void SwTabFrm::MakeAll()
pPre->InvalidatePos();
}
- bCalcLowers = bONECalcLowers = FALSE;
+ bCalcLowers = bONECalcLowers = sal_False;
delete pAccess;
UnlockJoin();
if ( bMovedFwd || bMovedBwd || !bOldValidPos )
@@ -2697,11 +2697,11 @@ void SwTabFrm::MakeAll()
|* entstehen.
|*
|*************************************************************************/
-BOOL SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
+sal_Bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
long& rLeftOffset,
long& rRightOffset ) const
{
- BOOL bInvalidatePrtArea = FALSE;
+ sal_Bool bInvalidatePrtArea = sal_False;
const SwPageFrm *pPage = FindPageFrm();
const SwFlyFrm* pMyFly = FindFlyFrm();
@@ -2723,7 +2723,7 @@ BOOL SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
long nYDiff = (*fnRect->fnYDiff)( (Prt().*fnRect->fnGetTop)(), rUpper );
if( nYDiff > 0 )
(aRect.*fnRect->fnAddBottom)( -nYDiff );
- for ( USHORT i = 0; i < pPage->GetSortedObjs()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pPage->GetSortedObjs()->Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pPage->GetSortedObjs())[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
@@ -2803,7 +2803,7 @@ BOOL SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
long nBottom = (aFlyRect.*fnRect->fnGetBottom)();
if( (*fnRect->fnYDiff)( nPrtPos, nBottom ) < 0 )
nPrtPos = nBottom;
- bInvalidatePrtArea = TRUE;
+ bInvalidatePrtArea = sal_True;
}
if ( (SURROUND_RIGHT == rSur.GetSurround() ||
SURROUND_PARALLEL == rSur.GetSurround())&&
@@ -2813,7 +2813,7 @@ BOOL SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
(aFlyRect.*fnRect->fnGetRight)(),
(pFly->GetAnchorFrm()->Frm().*fnRect->fnGetLeft)() );
rLeftOffset = Max( rLeftOffset, nWidth );
- bInvalidatePrtArea = TRUE;
+ bInvalidatePrtArea = sal_True;
}
if ( (SURROUND_LEFT == rSur.GetSurround() ||
SURROUND_PARALLEL == rSur.GetSurround())&&
@@ -2823,7 +2823,7 @@ BOOL SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
(pFly->GetAnchorFrm()->Frm().*fnRect->fnGetRight)(),
(aFlyRect.*fnRect->fnGetLeft)() );
rRightOffset = Max( rRightOffset, nWidth );
- bInvalidatePrtArea = TRUE;
+ bInvalidatePrtArea = sal_True;
}
}
}
@@ -2869,7 +2869,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
long nTmpRight = -1000000,
nLeftOffset = 0;
if( CalcFlyOffsets( nUpper, nLeftOffset, nTmpRight ) )
- bValidPrtArea = FALSE;
+ bValidPrtArea = sal_False;
long nRightOffset = Max( 0L, nTmpRight );
SwTwips nLower = pAttrs->CalcBottomLine();
@@ -2879,7 +2879,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
// <-- collapsing
if ( !bValidPrtArea )
- { bValidPrtArea = TRUE;
+ { bValidPrtArea = sal_True;
//Die Breite der PrtArea wird vom FrmFmt vorgegeben, die Raender
//sind entsprechend einzustellen.
@@ -2901,9 +2901,9 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
//bezieht sie sich in der BrowseView auf die Bildschirmbreite.
const SwFmtFrmSize &rSz = GetFmt()->GetFrmSize();
// OD 14.03.2003 #i9040# - adjust variable name.
- const SwTwips nWishedTableWidth = CalcRel( rSz, TRUE );
+ const SwTwips nWishedTableWidth = CalcRel( rSz, sal_True );
- BOOL bCheckBrowseWidth = FALSE;
+ sal_Bool bCheckBrowseWidth = sal_False;
// OD 14.03.2003 #i9040# - insert new variables for left/right spacing.
SwTwips nLeftSpacing = 0;
@@ -2992,7 +2992,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
//Nur die fuer die Umrandung benoetigten Freiraeume
//werden beruecksichtigt.
//Die Attributwerte von LRSpace werden bewusst missachtet!
- bCheckBrowseWidth = TRUE;
+ bCheckBrowseWidth = sal_True;
nLeftSpacing = nLeftLine + nLeftOffset;
nRightSpacing = nRightLine + nRightOffset;
break;
@@ -3024,7 +3024,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
{
//Linker Rand und die Breite zaehlen (Word-Spezialitaet)
// OD 10.03.2003 #i9040# - no width alignment in online mode.
- //bCheckBrowseWidth = TRUE;
+ //bCheckBrowseWidth = sal_True;
nLeftSpacing = pAttrs->CalcLeft( this );
if( nLeftOffset )
{
@@ -3044,7 +3044,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
}
break;
default:
- OSL_ENSURE( FALSE, "Ungueltige orientation fuer Table." );
+ OSL_ENSURE( sal_False, "Ungueltige orientation fuer Table." );
}
// --> OD 2004-07-15 #i26250# - extend bottom printing area, if table
@@ -3077,12 +3077,12 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
}
if ( nOldHeight != (Prt().*fnRect->fnGetHeight)() )
- bValidSize = FALSE;
+ bValidSize = sal_False;
}
if ( !bValidSize )
{
- bValidSize = TRUE;
+ bValidSize = sal_True;
//Die Groesse wird durch den Inhalt plus den Raendern bestimmt.
SwTwips nRemaining = 0, nDiff;
@@ -3107,7 +3107,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
|* SwTabFrm::GrowFrm()
|*
|*************************************************************************/
-SwTwips SwTabFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwTabFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
SWRECTFN( this )
SwTwips nHeight =(Frm().*fnRect->fnGetHeight)();
@@ -3192,8 +3192,8 @@ SwTwips SwTabFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
|*************************************************************************/
void SwTabFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
{
- BYTE nInvFlags = 0;
- BOOL bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which();
+ sal_uInt8 nInvFlags = 0;
+ sal_Bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which();
if( bAttrSetChg )
{
@@ -3201,7 +3201,7 @@ void SwTabFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
SfxItemIter aOIter( *((SwAttrSetChg*)pOld)->GetChgSet() );
SwAttrSetChg aOldSet( *(SwAttrSetChg*)pOld );
SwAttrSetChg aNewSet( *(SwAttrSetChg*)pNew );
- while( TRUE )
+ while( sal_True )
{
_UpdateAttr( (SfxPoolItem*)aOIter.GetCurItem(),
(SfxPoolItem*)aNIter.GetCurItem(), nInvFlags,
@@ -3254,11 +3254,11 @@ void SwTabFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
}
void SwTabFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
- BYTE &rInvFlags,
+ sal_uInt8 &rInvFlags,
SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet )
{
- BOOL bClear = TRUE;
- const USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_Bool bClear = sal_True;
+ const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
switch( nWhich )
{
case RES_TBLHEADLINECHG:
@@ -3273,13 +3273,13 @@ void SwTabFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
}
// insert new headlines
- const USHORT nNewRepeat = GetTable()->GetRowsToRepeat();
- for ( USHORT nIdx = 0; nIdx < nNewRepeat; ++nIdx )
+ const sal_uInt16 nNewRepeat = GetTable()->GetRowsToRepeat();
+ for ( sal_uInt16 nIdx = 0; nIdx < nNewRepeat; ++nIdx )
{
- bDontCreateObjects = TRUE; //frmtool
+ bDontCreateObjects = sal_True; //frmtool
SwRowFrm* pHeadline = new SwRowFrm( *GetTable()->GetTabLines()[ nIdx ] );
pHeadline->SetRepeatedHeadline( true );
- bDontCreateObjects = FALSE;
+ bDontCreateObjects = sal_False;
pHeadline->Paste( this, pLowerRow );
}
}
@@ -3299,7 +3299,7 @@ void SwTabFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
if ( !GetPrev() )
CheckPageDescs( pPage );
if ( pPage && GetFmt()->GetPageDesc().GetNumOffset() )
- ((SwRootFrm*)pPage->GetUpper())->SetVirtPageNum( TRUE );
+ ((SwRootFrm*)pPage->GetUpper())->SetVirtPageNum( sal_True );
SwDocPosUpdate aMsgHnt( pPage->Frm().Top() );
GetFmt()->GetDoc()->UpdatePageFlds( &aMsgHnt );
}
@@ -3326,7 +3326,7 @@ void SwTabFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
/* kein Break hier */
default:
- bClear = FALSE;
+ bClear = sal_False;
}
if ( bClear )
{
@@ -3347,7 +3347,7 @@ void SwTabFrm::_UpdateAttr( SfxPoolItem *pOld, SfxPoolItem *pNew,
|* SwTabFrm::GetInfo()
|*
|*************************************************************************/
-BOOL SwTabFrm::GetInfo( SfxPoolItem &rHnt ) const
+sal_Bool SwTabFrm::GetInfo( SfxPoolItem &rHnt ) const
{
if ( RES_VIRTPAGENUM_INFO == rHnt.Which() && IsInDocBody() && !IsFollow() )
{
@@ -3360,7 +3360,7 @@ BOOL SwTabFrm::GetInfo( SfxPoolItem &rHnt ) const
//Das sollte er sein (kann allenfalls temporaer anders sein,
// sollte uns das beunruhigen?)
rInfo.SetInfo( pPage, this );
- return FALSE;
+ return sal_False;
}
if ( pPage->GetPhyPageNum() < rInfo.GetOrigPage()->GetPhyPageNum() &&
(!rInfo.GetPage() || pPage->GetPhyPageNum() > rInfo.GetPage()->GetPhyPageNum()))
@@ -3370,7 +3370,7 @@ BOOL SwTabFrm::GetInfo( SfxPoolItem &rHnt ) const
}
}
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -3453,7 +3453,7 @@ SwCntntFrm *SwTabFrm::FindLastCntnt()
|* SwTabFrm::GetLeaf()
|*
|*************************************************************************/
-SwLayoutFrm *SwTabFrm::GetLeaf( MakePageType eMakePage, BOOL bFwd )
+SwLayoutFrm *SwTabFrm::GetLeaf( MakePageType eMakePage, sal_Bool bFwd )
{
SwLayoutFrm *pRet;
if ( bFwd )
@@ -3476,9 +3476,9 @@ SwLayoutFrm *SwTabFrm::GetLeaf( MakePageType eMakePage, BOOL bFwd )
|* Beschreibung Returnwert sagt ob der Frm verschoben werden sollte
|*
|*************************************************************************/
-BOOL SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL &rReformat )
+sal_Bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool &rReformat )
{
- rReformat = FALSE;
+ rReformat = sal_False;
if ( (SwFlowFrm::IsMoveBwdJump() || !IsPrevObjMove()) )
{
//Das zurueckfliessen von Frm's ist leider etwas Zeitintensiv.
@@ -3500,7 +3500,7 @@ BOOL SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL &rReformat )
SwPageFrm *pOldPage = FindPageFrm(),
*pNewPage = pNewUpper->FindPageFrm();
- BOOL bMoveAnyway = FALSE;
+ sal_Bool bMoveAnyway = sal_False;
SwTwips nSpace = 0;
SWRECTFN( this )
@@ -3512,7 +3512,7 @@ BOOL SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL &rReformat )
long nNewWidth = (pNewUpper->Prt().*fnRectX->fnGetWidth)();
if( Abs( nNewWidth - nOldWidth ) < 2 )
{
- if( FALSE ==
+ if( sal_False ==
( bMoveAnyway = BwdMoveNecessary( pOldPage, Frm() ) > 1 ) )
{
SwRect aRect( pNewUpper->Prt() );
@@ -3539,17 +3539,17 @@ BOOL SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL &rReformat )
// <--
if ( GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
- nSpace += pNewUpper->Grow( LONG_MAX, TRUE );
+ nSpace += pNewUpper->Grow( LONG_MAX, sal_True );
}
}
else if( !bLockBackMove )
- bMoveAnyway = TRUE;
+ bMoveAnyway = sal_True;
}
else if( !bLockBackMove )
- bMoveAnyway = TRUE;
+ bMoveAnyway = sal_True;
if ( bMoveAnyway )
- return rReformat = TRUE;
+ return rReformat = sal_True;
else if ( !bLockBackMove && nSpace > 0 )
{
// --> OD 2004-10-05 #i26945# - check, if follow flow line
@@ -3561,7 +3561,7 @@ BOOL SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL &rReformat )
*(pFirstRow->GetFmt()->GetDoc()),
*(pFirstRow) ) )
{
- return FALSE;
+ return sal_False;
}
// <--
SwTwips nTmpHeight = CalcHeightOfFirstContentLine();
@@ -3575,7 +3575,7 @@ BOOL SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL, BOOL &rReformat )
// <--
}
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -3654,7 +3654,7 @@ void SwTabFrm::Cut()
{
if ( pUp->GetUpper() )
{
- pSct->DelEmpty( FALSE );
+ pSct->DelEmpty( sal_False );
pSct->_InvalidateSize();
}
}
@@ -3733,7 +3733,7 @@ void SwTabFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
(!pDesc && pPage->GetPageDesc() !=
&(const_cast<const SwDoc *>(GetFmt()->GetDoc())
->GetPageDesc(0))) )
- CheckPageDescs( pPage, TRUE );
+ CheckPageDescs( pPage, sal_True );
}
}
}
@@ -3743,7 +3743,7 @@ void SwTabFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
|* SwTabFrm::Prepare()
|*
|*************************************************************************/
-void SwTabFrm::Prepare( const PrepareHint eHint, const void *, BOOL )
+void SwTabFrm::Prepare( const PrepareHint eHint, const void *, sal_Bool )
{
if( PREP_BOSS_CHGD == eHint )
CheckDirChange();
@@ -3774,7 +3774,7 @@ SwRowFrm::SwRowFrm( const SwTableLine &rLine, bool bInsertContent ):
//Gleich die Boxen erzeugen und einfuegen.
const SwTableBoxes &rBoxes = rLine.GetTabBoxes();
SwFrm *pTmpPrev = 0;
- for ( USHORT i = 0; i < rBoxes.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{
SwCellFrm *pNew = new SwCellFrm( *rBoxes[i], bInsertContent );
pNew->InsertBehind( this, pTmpPrev );
@@ -3810,15 +3810,15 @@ void SwRowFrm::RegistFlys( SwPageFrm *pPage )
|*************************************************************************/
void SwRowFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
{
- BOOL bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which();
+ sal_Bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which();
const SfxPoolItem *pItem = 0;
if( bAttrSetChg )
{
const SwAttrSet* pChgSet = ((SwAttrSetChg*)pNew)->GetChgSet();
- pChgSet->GetItemState( RES_FRM_SIZE, FALSE, &pItem);
+ pChgSet->GetItemState( RES_FRM_SIZE, sal_False, &pItem);
if ( !pItem )
- pChgSet->GetItemState( RES_ROW_SPLIT, FALSE, &pItem);
+ pChgSet->GetItemState( RES_ROW_SPLIT, sal_False, &pItem);
}
else if ( RES_FRM_SIZE == pNew->Which() || RES_ROW_SPLIT == pNew->Which() )
pItem = pNew;
@@ -3855,7 +3855,7 @@ void SwRowFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
void SwRowFrm::MakeAll()
{
if ( !GetNext() )
- bValidSize = FALSE;
+ bValidSize = sal_False;
SwLayoutFrm::MakeAll();
}
@@ -3902,7 +3902,7 @@ long MA_FASTCALL CalcHeightWidthFlys( const SwFrm *pFrm )
if ( pObjs )
// <--
{
- for ( USHORT i = 0; i < pObjs->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
{
const SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
// --> OD 2004-10-08 #i26945# - if <pTmp> is follow, the
@@ -4005,7 +4005,7 @@ SwTwips lcl_CalcTopAndBottomMargin( const SwLayoutFrm& rCell, const SwBorderAttr
// control, if floating screen objects have to be considered for the minimal
// cell height.
SwTwips MA_FASTCALL lcl_CalcMinCellHeight( const SwLayoutFrm *_pCell,
- const BOOL _bConsiderObjs,
+ const sal_Bool _bConsiderObjs,
const SwBorderAttrs *pAttrs = 0 )
{
SWRECTFN( _pCell )
@@ -4064,7 +4064,7 @@ SwTwips MA_FASTCALL lcl_CalcMinCellHeight( const SwLayoutFrm *_pCell,
// --> OD 2004-10-04 #i26945# - add parameter <_bConsiderObjs> in order to control,
// if floating screen objects have to be considered for the minimal cell height
SwTwips MA_FASTCALL lcl_CalcMinRowHeight( const SwRowFrm* _pRow,
- const BOOL _bConsiderObjs )
+ const sal_Bool _bConsiderObjs )
{
SWRECTFN( _pRow )
@@ -4121,13 +4121,13 @@ SwTwips MA_FASTCALL lcl_CalcMinRowHeight( const SwRowFrm* _pRow,
// --> collapsing borders FME 2005-05-27 #i29550#
// Calculate the maximum of (TopLineSize + TopLineDist) over all lowers:
-USHORT lcl_GetTopSpace( const SwRowFrm& rRow )
+sal_uInt16 lcl_GetTopSpace( const SwRowFrm& rRow )
{
- USHORT nTopSpace = 0;
+ sal_uInt16 nTopSpace = 0;
for ( SwCellFrm* pCurrLower = (SwCellFrm*)rRow.Lower(); pCurrLower;
pCurrLower = (SwCellFrm*)pCurrLower->GetNext() )
{
- USHORT nTmpTopSpace = 0;
+ sal_uInt16 nTmpTopSpace = 0;
if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrm() )
nTmpTopSpace = lcl_GetTopSpace( *(SwRowFrm*)pCurrLower->Lower() );
else
@@ -4142,13 +4142,13 @@ USHORT lcl_GetTopSpace( const SwRowFrm& rRow )
}
// Calculate the maximum of TopLineDist over all lowers:
-USHORT lcl_GetTopLineDist( const SwRowFrm& rRow )
+sal_uInt16 lcl_GetTopLineDist( const SwRowFrm& rRow )
{
- USHORT nTopLineDist = 0;
+ sal_uInt16 nTopLineDist = 0;
for ( SwCellFrm* pCurrLower = (SwCellFrm*)rRow.Lower(); pCurrLower;
pCurrLower = (SwCellFrm*)pCurrLower->GetNext() )
{
- USHORT nTmpTopLineDist = 0;
+ sal_uInt16 nTmpTopLineDist = 0;
if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrm() )
nTmpTopLineDist = lcl_GetTopLineDist( *(SwRowFrm*)pCurrLower->Lower() );
else
@@ -4163,13 +4163,13 @@ USHORT lcl_GetTopLineDist( const SwRowFrm& rRow )
}
// Calculate the maximum of BottomLineSize over all lowers:
-USHORT lcl_GetBottomLineSize( const SwRowFrm& rRow )
+sal_uInt16 lcl_GetBottomLineSize( const SwRowFrm& rRow )
{
- USHORT nBottomLineSize = 0;
+ sal_uInt16 nBottomLineSize = 0;
for ( SwCellFrm* pCurrLower = (SwCellFrm*)rRow.Lower(); pCurrLower;
pCurrLower = (SwCellFrm*)pCurrLower->GetNext() )
{
- USHORT nTmpBottomLineSize = 0;
+ sal_uInt16 nTmpBottomLineSize = 0;
if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrm() )
{
const SwFrm* pRow = pCurrLower->GetLastLower();
@@ -4188,13 +4188,13 @@ USHORT lcl_GetBottomLineSize( const SwRowFrm& rRow )
}
// Calculate the maximum of BottomLineDist over all lowers:
-USHORT lcl_GetBottomLineDist( const SwRowFrm& rRow )
+sal_uInt16 lcl_GetBottomLineDist( const SwRowFrm& rRow )
{
- USHORT nBottomLineDist = 0;
+ sal_uInt16 nBottomLineDist = 0;
for ( SwCellFrm* pCurrLower = (SwCellFrm*)rRow.Lower(); pCurrLower;
pCurrLower = (SwCellFrm*)pCurrLower->GetNext() )
{
- USHORT nTmpBottomLineDist = 0;
+ sal_uInt16 nTmpBottomLineDist = 0;
if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrm() )
{
const SwFrm* pRow = pCurrLower->GetLastLower();
@@ -4218,13 +4218,13 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
SWRECTFN( this )
OSL_ENSURE( pAttrs, "SwRowFrm::Format ohne Attrs." );
- const BOOL bFix = bFixSize;
+ const sal_Bool bFix = bFixSize;
if ( !bValidPrtArea )
{
//RowFrms haben keine Umrandung usw. also entspricht die PrtArea immer
//dem Frm.
- bValidPrtArea = TRUE;
+ bValidPrtArea = sal_True;
aPrt.Left( 0 );
aPrt.Top( 0 );
aPrt.Width ( aFrm.Width() );
@@ -4235,10 +4235,10 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
SwTabFrm* pTabFrm = FindTabFrm();
if ( pTabFrm->IsCollapsingBorders() )
{
- const USHORT nTopSpace = lcl_GetTopSpace( *this );
- const USHORT nTopLineDist = lcl_GetTopLineDist( *this );
- const USHORT nBottomLineSize = lcl_GetBottomLineSize( *this );
- const USHORT nBottomLineDist = lcl_GetBottomLineDist( *this );
+ const sal_uInt16 nTopSpace = lcl_GetTopSpace( *this );
+ const sal_uInt16 nTopLineDist = lcl_GetTopLineDist( *this );
+ const sal_uInt16 nBottomLineSize = lcl_GetBottomLineSize( *this );
+ const sal_uInt16 nBottomLineDist = lcl_GetBottomLineDist( *this );
const SwRowFrm* pPreviousRow = 0;
@@ -4255,7 +4255,7 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
while ( pTmpRow && !pPrevTabLine )
{
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
const SwTableLines& rLines = pTmpRow->GetTabLine()->GetUpper() ?
pTmpRow->GetTabLine()->GetUpper()->GetTabLines() :
pTable->GetTabLines();
@@ -4303,10 +4303,10 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
}
// <--
- USHORT nTopPrtMargin = nTopSpace;
+ sal_uInt16 nTopPrtMargin = nTopSpace;
if ( pPreviousRow )
{
- const USHORT nTmpPrtMargin = pPreviousRow->GetBottomLineSize() + nTopLineDist;
+ const sal_uInt16 nTmpPrtMargin = pPreviousRow->GetBottomLineSize() + nTopLineDist;
if ( nTmpPrtMargin > nTopPrtMargin )
nTopPrtMargin = nTmpPrtMargin;
}
@@ -4340,7 +4340,7 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
while ( !bValidSize )
{
- bValidSize = TRUE;
+ bValidSize = sal_True;
#if OSL_DEBUG_LEVEL > 1
if ( HasFixSize() )
@@ -4358,9 +4358,9 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
// <--
if ( nDiff )
{
- bFixSize = FALSE;
+ bFixSize = sal_False;
if ( nDiff > 0 )
- Shrink( nDiff, FALSE, TRUE );
+ Shrink( nDiff, sal_False, sal_True );
else if ( nDiff < 0 )
Grow( -nDiff );
bFixSize = bFix;
@@ -4379,10 +4379,10 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
} while ( pSibling );
if ( nDiff > 0 )
{
- bFixSize = FALSE;
+ bFixSize = sal_False;
Grow( nDiff );
bFixSize = bFix;
- bValidSize = TRUE;
+ bValidSize = sal_True;
}
}
}
@@ -4392,7 +4392,7 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
|* SwRowFrm::AdjustCells()
|*
|*************************************************************************/
-void SwRowFrm::AdjustCells( const SwTwips nHeight, const BOOL bHeight )
+void SwRowFrm::AdjustCells( const SwTwips nHeight, const sal_Bool bHeight )
{
SwFrm *pFrm = Lower();
if ( bHeight )
@@ -4534,7 +4534,7 @@ void SwRowFrm::Cut()
|*************************************************************************/
-SwTwips SwRowFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwRowFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
SwTwips nReal = 0;
@@ -4571,7 +4571,7 @@ SwTwips SwRowFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
}
if ( bRestrictTableGrowth )
- pTab->SetRestrictTableGrowth( TRUE );
+ pTab->SetRestrictTableGrowth( sal_True );
else
{
// Ok, this looks like a hack, indeed, it is a hack.
@@ -4580,19 +4580,19 @@ SwTwips SwRowFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
// be allowed to grow. In fact, setting bRestrictTableGrowth
// to 'false' does not work, because the surrounding RowFrm
// would set this to 'true'.
- pTab->SetFollowFlowLine( FALSE );
+ pTab->SetFollowFlowLine( sal_False );
}
nReal += SwLayoutFrm::GrowFrm( nDist, bTst, bInfo);
- pTab->SetRestrictTableGrowth( FALSE );
+ pTab->SetRestrictTableGrowth( sal_False );
pTab->SetFollowFlowLine( bHasFollowFlowLine );
//Hoehe der Zellen auf den neuesten Stand bringen.
if ( !bTst )
{
SWRECTFNX( this )
- AdjustCells( (Prt().*fnRectX->fnGetHeight)() + nReal, TRUE );
+ AdjustCells( (Prt().*fnRectX->fnGetHeight)() + nReal, sal_True );
if ( nReal )
SetCompletePaint();
}
@@ -4605,18 +4605,18 @@ SwTwips SwRowFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
|* SwRowFrm::ShrinkFrm()
|*
|*************************************************************************/
-SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
SWRECTFN( this )
if( HasFixSize() )
{
- AdjustCells( (Prt().*fnRect->fnGetHeight)(), TRUE );
+ AdjustCells( (Prt().*fnRect->fnGetHeight)(), sal_True );
return 0L;
}
- //bInfo wird ggf. vom SwRowFrm::Format auf TRUE gesetzt, hier muss dann
+ //bInfo wird ggf. vom SwRowFrm::Format auf sal_True gesetzt, hier muss dann
//entsprechend reagiert werden
- const BOOL bShrinkAnyway = bInfo;
+ const sal_Bool bShrinkAnyway = bInfo;
//Nur soweit Shrinken, wie es der Inhalt der groessten Zelle zulaesst.
SwTwips nRealDist = nDist;
@@ -4651,7 +4651,8 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
{
SwTwips nHeight = (Frm().*fnRect->fnGetHeight)();
(Frm().*fnRect->fnSetHeight)( nHeight - nReal );
- if( IsVertical() && !bRev )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsVertical() && !IsVertLR() && !bRev )
Frm().Pos().X() += nReal;
}
@@ -4665,7 +4666,8 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
nReal -= nTmp;
SwTwips nHeight = (Frm().*fnRect->fnGetHeight)();
(Frm().*fnRect->fnSetHeight)( nHeight + nReal );
- if( IsVertical() && !bRev )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsVertical() && !IsVertLR() && !bRev )
Frm().Pos().X() -= nReal;
}
nReal = nTmp;
@@ -4691,7 +4693,7 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
pMasterTab->InvalidatePos();
}
}
- AdjustCells( (Prt().*fnRect->fnGetHeight)() - nReal, TRUE );
+ AdjustCells( (Prt().*fnRect->fnGetHeight)() - nReal, sal_True );
}
return nReal;
}
@@ -4759,14 +4761,14 @@ SwCellFrm::SwCellFrm( const SwTableBox &rBox, bool bInsertContent ) :
//angelegt.
if ( rBox.GetSttIdx() )
{
- ULONG nIndex = rBox.GetSttIdx();
+ sal_uLong nIndex = rBox.GetSttIdx();
::_InsertCnt( this, rBox.GetFrmFmt()->GetDoc(), ++nIndex );
}
else
{
const SwTableLines &rLines = rBox.GetTabLines();
SwFrm *pTmpPrev = 0;
- for ( USHORT i = 0; i < rLines.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
{
SwRowFrm *pNew = new SwRowFrm( *rLines[i], bInsertContent );
pNew->InsertBehind( this, pTmpPrev );
@@ -4800,9 +4802,9 @@ SwCellFrm::~SwCellFrm()
|* SwCellFrm::Format()
|*
|*************************************************************************/
-BOOL lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, BOOL bInva )
+sal_Bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, sal_Bool bInva )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwFrm *pFrm = pLay->Lower();
SWRECTFN( pLay )
while ( pFrm )
@@ -4810,7 +4812,7 @@ BOOL lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, BOOL bInva )
long nFrmTop = (pFrm->Frm().*fnRect->fnGetTop)();
if( nFrmTop != lYStart )
{
- bRet = TRUE;
+ bRet = sal_True;
const long lDiff = (*fnRect->fnYDiff)( lYStart, nFrmTop );
const long lDiffX = lYStart - nFrmTop;
(pFrm->Frm().*fnRect->fnSubTop)( -lDiff );
@@ -4826,7 +4828,7 @@ BOOL lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, BOOL bInva )
+ lDiffX, bInva );
if ( pFrm->GetDrawObjs() )
{
- for ( USHORT i = 0; i < pFrm->GetDrawObjs()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pFrm->GetDrawObjs()->Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
// --> OD 2004-10-08 #i26945# - check, if anchored object
@@ -5040,7 +5042,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
if ( !bValidPrtArea )
{
- bValidPrtArea = TRUE;
+ bValidPrtArea = sal_True;
//Position einstellen.
if ( Lower() )
@@ -5075,7 +5077,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
// <--
if ( !bValidSize )
{
- bValidSize = TRUE;
+ bValidSize = sal_True;
//Die VarSize der CellFrms ist immer die Breite.
//Tatsaechlich ist die Breite jedoch nicht Variabel, sie wird durch das
@@ -5109,7 +5111,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
const SwTableBox* pTmpBox = 0;
SwTwips nSumWidth = 0;
- USHORT i = 0;
+ sal_uInt16 i = 0;
do
{
pTmpBox = rBoxes[ i++ ];
@@ -5173,7 +5175,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
//Wieder validieren wenn kein Wachstum stattgefunden hat.
//Invalidiert wird durch AdjustCells von der Row.
if ( !Grow( nDiffHeight ) )
- bValidSize = bValidPrtArea = TRUE;
+ bValidSize = bValidPrtArea = sal_True;
}
else
{
@@ -5181,7 +5183,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
//geshrinkt wurde; das kann abgelehnt werden, weil alle
//nebeneinanderliegenden Zellen gleichgross sein muessen.
if ( !Shrink( -nDiffHeight ) )
- bValidSize = bValidPrtArea = TRUE;
+ bValidSize = bValidPrtArea = sal_True;
}
}
}
@@ -5208,7 +5210,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
OSL_ENSURE( !this, "VAlign an Zelle ohne Inhalt" );
return;
}
- BOOL bVertDir = TRUE;
+ sal_Bool bVertDir = sal_True;
// --> OD 2005-03-30 #i43913# - no vertical alignment, if wrapping
// style influence is considered on object positioning and
// an object is anchored inside the cell.
@@ -5218,7 +5220,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
if ( pPg->GetSortedObjs() )
{
SwRect aRect( Prt() ); aRect += Frm().Pos();
- for ( USHORT i = 0; i < pPg->GetSortedObjs()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pPg->GetSortedObjs()->Count(); ++i )
{
const SwAnchoredObject* pAnchoredObj = (*pPg->GetSortedObjs())[i];
SwRect aTmp( pAnchoredObj->GetObjRect() );
@@ -5251,7 +5253,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
!rAnchoredObjFrmFmt.GetFollowTextFlow().GetValue() )
// <--
{
- bVertDir = FALSE;
+ bVertDir = sal_False;
break;
}
}
@@ -5289,7 +5291,7 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
if ( Lower()->IsCntntFrm() )
{
const long lYStart = (this->*fnRect->fnGetPrtTop)();
- lcl_ArrangeLowers( this, lYStart, TRUE );
+ lcl_ArrangeLowers( this, lYStart, sal_True );
}
}
}
@@ -5302,24 +5304,24 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
void SwCellFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
{
- BOOL bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which();
+ sal_Bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which();
const SfxPoolItem *pItem = 0;
if( bAttrSetChg )
- ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_VERT_ORIENT, FALSE, &pItem);
+ ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_VERT_ORIENT, sal_False, &pItem);
else if ( RES_VERT_ORIENT == pNew->Which() )
pItem = pNew;
if ( pItem )
{
- BOOL bInva = TRUE;
+ sal_Bool bInva = sal_True;
if ( text::VertOrientation::NONE == ((SwFmtVertOrient*)pItem)->GetVertOrient() &&
// OD 04.11.2003 #112910#
Lower() && Lower()->IsCntntFrm() )
{
SWRECTFN( this )
const long lYStart = (this->*fnRect->fnGetPrtTop)();
- bInva = lcl_ArrangeLowers( this, lYStart, FALSE );
+ bInva = lcl_ArrangeLowers( this, lYStart, sal_False );
}
if ( bInva )
{
@@ -5329,7 +5331,7 @@ void SwCellFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
}
if ( ( bAttrSetChg &&
- SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_PROTECT, FALSE ) ) ||
+ SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_PROTECT, sal_False ) ) ||
RES_PROTECT == pNew->Which() )
{
ViewShell *pSh = GetShell();
@@ -5338,15 +5340,15 @@ void SwCellFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
}
if ( bAttrSetChg &&
- SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_FRAMEDIR, FALSE, &pItem ) )
+ SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_FRAMEDIR, sal_False, &pItem ) )
{
- SetDerivedVert( FALSE );
+ SetDerivedVert( sal_False );
CheckDirChange();
}
// --> collapsing borders FME 2005-05-27 #i29550#
if ( bAttrSetChg &&
- SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_BOX, FALSE, &pItem ) )
+ SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( RES_BOX, sal_False, &pItem ) )
{
SwFrm* pTmpUpper = GetUpper();
while ( pTmpUpper->GetUpper() && !pTmpUpper->GetUpper()->IsTabFrm() )
@@ -5447,7 +5449,7 @@ SwRowFrm* SwTabFrm::GetFirstNonHeadlineRow() const
}
else
{
- USHORT nRepeat = GetTable()->GetRowsToRepeat();
+ sal_uInt16 nRepeat = GetTable()->GetRowsToRepeat();
while ( pRet && nRepeat > 0 )
{
pRet = (SwRowFrm*)pRet->GetNext();
@@ -5464,7 +5466,7 @@ SwRowFrm* SwTabFrm::GetFirstNonHeadlineRow() const
*/
bool SwTable::IsHeadline( const SwTableLine& rLine ) const
{
- for ( USHORT i = 0; i < GetRowsToRepeat(); ++i )
+ for ( sal_uInt16 i = 0; i < GetRowsToRepeat(); ++i )
if ( GetTabLines()[ i ] == &rLine )
return true;
@@ -5478,7 +5480,7 @@ bool SwTabFrm::IsLayoutSplitAllowed() const
// --> collapsing borders FME 2005-05-27 #i29550#
-USHORT SwTabFrm::GetBottomLineSize() const
+sal_uInt16 SwTabFrm::GetBottomLineSize() const
{
OSL_ENSURE( IsCollapsingBorders(),
"BottomLineSize only required for collapsing borders" );
@@ -5676,7 +5678,7 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const
pFirstRow = static_cast<SwRowFrm*>(pFirstRow->GetNext());
// Calculate the height of the headlines:
- const USHORT nRepeat = GetTable()->GetRowsToRepeat();
+ const sal_uInt16 nRepeat = GetTable()->GetRowsToRepeat();
SwTwips nRepeatHeight = nRepeat ? lcl_GetHeightOfRows( GetLower(), nRepeat ) : 0;
// Calculate the height of the keeping lines
@@ -5684,7 +5686,7 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const
SwTwips nKeepHeight = nRepeatHeight;
if ( GetFmt()->GetDoc()->get(IDocumentSettingAccess::TABLE_ROW_KEEP) )
{
- USHORT nKeepRows = nRepeat;
+ sal_uInt16 nKeepRows = nRepeat;
// Check how many rows want to keep together
while ( pFirstRow && pFirstRow->ShouldRowKeepWithNext() )
@@ -5733,7 +5735,7 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const
{
if ( 1 == pLower2->GetTabBox()->getRowSpan() )
{
- const SwTwips nCellHeight = lcl_CalcMinCellHeight( pLower2, TRUE );
+ const SwTwips nCellHeight = lcl_CalcMinCellHeight( pLower2, sal_True );
nMaxHeight = Max( nCellHeight, nMaxHeight );
}
pLower2 = static_cast<const SwCellFrm*>(pLower2->GetNext());
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 09854c1e553e..b83bab70c8c4 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -78,14 +78,14 @@ public:
//public:
// SwCrsrOszControl() : pStk1( 0 ), pStk2( 0 ) {}; // ; <- ????
- BOOL ChkOsz( const SwFlyFrm *pFly )
+ sal_Bool ChkOsz( const SwFlyFrm *pFly )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if ( pFly != pStk1 && pFly != pStk2 )
{
pStk1 = pStk2;
pStk2 = pFly;
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
@@ -111,10 +111,10 @@ static SwCrsrOszControl aOszCtrl = { 0, 0, 0 };
|* PrtArea der Point liegt.
|*
|*************************************************************************/
-BOOL SwLayoutFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
+sal_Bool SwLayoutFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
SwCrsrMoveState* pCMS ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwFrm *pFrm = Lower();
while ( !bRet && pFrm )
{
@@ -129,11 +129,11 @@ BOOL SwLayoutFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
if ( aPaintRect.IsInside( rPoint ) &&
( bCntntCheck || pFrm->GetCrsrOfst( pPos, rPoint, pCMS ) ) )
- bRet = TRUE;
+ bRet = sal_True;
else
pFrm = pFrm->GetNext();
if ( pCMS && pCMS->bStop )
- return FALSE;
+ return sal_False;
}
return bRet;
}
@@ -147,10 +147,10 @@ BOOL SwLayoutFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
|*
|*************************************************************************/
-BOOL SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
+sal_Bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
SwCrsrMoveState* pCMS ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
Point aPoint( rPoint );
// check, if we have to adjust the point
@@ -175,16 +175,16 @@ BOOL SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
static_cast<const SwVirtFlyDrawObj*>(aIter());
const SwFlyFrm* pFly = pObj ? pObj->GetFlyFrm() : 0;
if ( pFly &&
- ( ( pCMS ? pCMS->bSetInReadOnly : FALSE ) ||
+ ( ( pCMS ? pCMS->bSetInReadOnly : sal_False ) ||
!pFly->IsProtected() ) &&
pFly->GetCrsrOfst( pPos, aPoint, pCMS ) )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
if ( pCMS && pCMS->bStop )
- return FALSE;
+ return sal_False;
aIter.Prev();
}
}
@@ -195,17 +195,17 @@ BOOL SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
//wir den StartPoint und fangen nochmal eine Seite vor der
//aktuellen an. Mit Flys ist es dann allerdings vorbei.
if ( SwLayoutFrm::GetCrsrOfst( pPos, aPoint, pCMS ) )
- bRet = TRUE;
+ bRet = sal_True;
else
{
if ( pCMS && (pCMS->bStop || pCMS->bExactOnly) )
{
- ((SwCrsrMoveState*)pCMS)->bStop = TRUE;
- return FALSE;
+ ((SwCrsrMoveState*)pCMS)->bStop = sal_True;
+ return sal_False;
}
- const SwCntntFrm *pCnt = GetCntntPos( aPoint, FALSE, FALSE, FALSE, pCMS, FALSE );
+ const SwCntntFrm *pCnt = GetCntntPos( aPoint, sal_False, sal_False, sal_False, pCMS, sal_False );
if ( pCMS && pCMS->bStop )
- return FALSE;
+ return sal_False;
OSL_ENSURE( pCnt, "Crsr is gone to a Black hole" );
if( pCMS && pCMS->pFill && pCnt->IsTxtFrm() )
@@ -218,7 +218,7 @@ BOOL SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
// Set point to pCnt, delete mark
// this may happen, if pCnt is hidden
*pPos = SwPosition( *pCnt->GetNode(), SwIndex( (SwTxtNode*)pCnt->GetNode(), 0 ) );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -253,7 +253,7 @@ bool SwPageFrm::FillSelection( SwSelectionList& rList, const SwRect& rRect ) con
if( GetSortedObjs() )
{
const SwSortedObjs &rObjs = *GetSortedObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
const SwAnchoredObject* pAnchoredObj = rObjs[i];
if( !pAnchoredObj->ISA(SwFlyFrm) )
@@ -291,17 +291,17 @@ bool SwRootFrm::FillSelection( SwSelectionList& aSelList, const SwRect& rRect) c
|*
|* Beschreibung: Reicht Primaer den Aufruf an die erste Seite weiter.
|* Wenn der 'reingereichte Point veraendert wird,
-|* so wird FALSE zurueckgegeben.
+|* so wird sal_False zurueckgegeben.
|*
|*************************************************************************/
-BOOL SwRootFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
+sal_Bool SwRootFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
SwCrsrMoveState* pCMS ) const
{
sal_Bool bOldAction = IsCallbackActionEnabled();
- ((SwRootFrm*)this)->SetCallbackActionEnabled( FALSE );
+ ((SwRootFrm*)this)->SetCallbackActionEnabled( sal_False );
OSL_ENSURE( (Lower() && Lower()->IsPageFrm()), "Keinen PageFrm gefunden." );
if( pCMS && pCMS->pFill )
- ((SwCrsrMoveState*)pCMS)->bFillRet = FALSE;
+ ((SwCrsrMoveState*)pCMS)->bFillRet = sal_False;
Point aOldPoint = rPoint;
// PAGES01
@@ -330,7 +330,7 @@ BOOL SwRootFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
if( pCMS )
{
if( pCMS->bStop )
- return FALSE;
+ return sal_False;
if( pCMS->pFill )
return pCMS->bFillRet;
}
@@ -347,24 +347,24 @@ BOOL SwRootFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
|* In geschuetzte Zellen gibt es hier keinen Eingang.
|*
|*************************************************************************/
-BOOL SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
+sal_Bool SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
SwCrsrMoveState* pCMS ) const
{
// cell frame does not necessarily have a lower (split table cell)
if ( !Lower() )
- return FALSE;
+ return sal_False;
- if ( !(pCMS?pCMS->bSetInReadOnly:FALSE) &&
+ if ( !(pCMS?pCMS->bSetInReadOnly:sal_False) &&
GetFmt()->GetProtect().IsCntntProtected() )
- return FALSE;
+ return sal_False;
if ( pCMS && pCMS->eState == MV_TBLSEL )
{
const SwTabFrm *pTab = FindTabFrm();
if ( pTab->IsFollow() && pTab->IsInHeadline( *this ) )
{
- ((SwCrsrMoveState*)pCMS)->bStop = TRUE;
- return FALSE;
+ ((SwCrsrMoveState*)pCMS)->bStop = sal_True;
+ return sal_False;
}
}
@@ -375,7 +375,7 @@ BOOL SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
else
{
Calc();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwFrm *pFrm = Lower();
while ( pFrm && !bRet )
@@ -385,14 +385,14 @@ BOOL SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
{
bRet = pFrm->GetCrsrOfst( pPos, rPoint, pCMS );
if ( pCMS && pCMS->bStop )
- return FALSE;
+ return sal_False;
}
pFrm = pFrm->GetNext();
}
if ( !bRet )
{
Point *pPoint = pCMS && pCMS->pFill ? new Point( rPoint ) : NULL;
- const SwCntntFrm *pCnt = GetCntntPos( rPoint, TRUE );
+ const SwCntntFrm *pCnt = GetCntntPos( rPoint, sal_True );
if( pPoint && pCnt->IsTxtFrm() )
{
pCnt->GetCrsrOfst( pPos, *pPoint, pCMS );
@@ -402,11 +402,11 @@ BOOL SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
pCnt->GetCrsrOfst( pPos, rPoint, pCMS );
delete pPoint;
}
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -424,7 +424,7 @@ BOOL SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
//GetCrsrOfst entscheidet sich bei einer Rekursion fuer denjenigen der
//am weitesten oben liegt.
-BOOL SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
+sal_Bool SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
SwCrsrMoveState* pCMS ) const
{
aOszCtrl.Entry( this );
@@ -435,14 +435,14 @@ BOOL SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
//innerhalb des aktuellen befindet, so wird fuer diesen das
//GetCrsrOfst gerufen.
Calc();
- BOOL bInside = Frm().IsInside( rPoint ) && Lower(),
- bRet = FALSE;
+ sal_Bool bInside = Frm().IsInside( rPoint ) && Lower(),
+ bRet = sal_False;
//Wenn der Frm eine Grafik enthaelt, aber nur Text gewuenscht ist, so
//nimmt er den Crsr grundsaetzlich nicht an.
if ( bInside && pCMS && pCMS->eState == MV_SETONLYTEXT &&
(!Lower() || Lower()->IsNoTxtFrm()) )
- bInside = FALSE;
+ bInside = sal_False;
const SwPageFrm *pPage = FindPageFrm();
if ( bInside && pPage && pPage->GetSortedObjs() )
@@ -457,10 +457,10 @@ BOOL SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
Frm().IsInside( pFly->Frm() ) )
{
if ( aOszCtrl.ChkOsz( pFly ) ||
- TRUE == (bRet = pFly->GetCrsrOfst( pPos, rPoint, pCMS )))
+ sal_True == (bRet = pFly->GetCrsrOfst( pPos, rPoint, pCMS )))
break;
if ( pCMS && pCMS->bStop )
- return FALSE;
+ return sal_False;
}
aIter.Next();
}
@@ -476,7 +476,7 @@ BOOL SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
{
bRet = pFrm->GetCrsrOfst( pPos, rPoint, pCMS );
if ( pCMS && pCMS->bStop )
- return FALSE;
+ return sal_False;
}
pFrm = pFrm->GetNext();
}
@@ -484,9 +484,9 @@ BOOL SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
{
Point *pPoint = pCMS && pCMS->pFill ? new Point( rPoint ) : NULL;
const SwCntntFrm *pCnt = GetCntntPos(
- rPoint, TRUE, FALSE, FALSE, pCMS );
+ rPoint, sal_True, sal_False, sal_False, pCMS );
if ( pCMS && pCMS->bStop )
- return FALSE;
+ return sal_False;
if( pPoint && pCnt->IsTxtFrm() )
{
pCnt->GetCrsrOfst( pPos, *pPoint, pCMS );
@@ -495,7 +495,7 @@ BOOL SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
else
pCnt->GetCrsrOfst( pPos, rPoint, pCMS );
delete pPoint;
- bRet = TRUE;
+ bRet = sal_True;
}
}
aOszCtrl.Exit( this );
@@ -507,22 +507,22 @@ BOOL SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
|* Beschreibung Layoutabhaengiges Cursortravelling
|*
|*************************************************************************/
-BOOL SwCntntFrm::LeftMargin(SwPaM *pPam) const
+sal_Bool SwCntntFrm::LeftMargin(SwPaM *pPam) const
{
if( pPam->GetNode() != (SwCntntNode*)GetNode() )
- return FALSE;
+ return sal_False;
((SwCntntNode*)GetNode())->
MakeStartIndex((SwIndex *) &pPam->GetPoint()->nContent);
- return TRUE;
+ return sal_True;
}
-BOOL SwCntntFrm::RightMargin(SwPaM *pPam, BOOL) const
+sal_Bool SwCntntFrm::RightMargin(SwPaM *pPam, sal_Bool) const
{
if( pPam->GetNode() != (SwCntntNode*)GetNode() )
- return FALSE;
+ return sal_False;
((SwCntntNode*)GetNode())->
MakeEndIndex((SwIndex *) &pPam->GetPoint()->nContent);
- return TRUE;
+ return sal_True;
}
const SwCntntFrm *lcl_GetNxtCnt( const SwCntntFrm* pCnt )
@@ -538,7 +538,7 @@ const SwCntntFrm *lcl_GetPrvCnt( const SwCntntFrm* pCnt )
typedef const SwCntntFrm *(*GetNxtPrvCnt)( const SwCntntFrm* );
//Frame in wiederholter Headline?
-BOOL lcl_IsInRepeatedHeadline( const SwFrm *pFrm,
+sal_Bool lcl_IsInRepeatedHeadline( const SwFrm *pFrm,
const SwTabFrm** ppTFrm = 0 )
{
const SwTabFrm *pTab = pFrm->FindTabFrm();
@@ -554,13 +554,13 @@ BOOL lcl_IsInRepeatedHeadline( const SwFrm *pFrm,
// FME: Skip follow flow cells
const SwCntntFrm * MA_FASTCALL lcl_MissProtectedFrames( const SwCntntFrm *pCnt,
GetNxtPrvCnt fnNxtPrv,
- BOOL bMissHeadline,
- BOOL bInReadOnly,
- BOOL bMissFollowFlowLine )
+ sal_Bool bMissHeadline,
+ sal_Bool bInReadOnly,
+ sal_Bool bMissFollowFlowLine )
{
if ( pCnt && pCnt->IsInTab() )
{
- BOOL bProtect = TRUE;
+ sal_Bool bProtect = sal_True;
while ( pCnt && bProtect )
{
const SwLayoutFrm *pCell = pCnt->GetUpper();
@@ -569,9 +569,9 @@ const SwCntntFrm * MA_FASTCALL lcl_MissProtectedFrames( const SwCntntFrm *pCnt,
if ( !pCell ||
(( ( bInReadOnly || !pCell->GetFmt()->GetProtect().IsCntntProtected() ) &&
( !bMissHeadline || !lcl_IsInRepeatedHeadline( pCell ) ) &&
- ( !bMissFollowFlowLine || !pCell->IsInFollowFlowRow() ) ) &&
- !pCell->IsCoveredCell()) )
- bProtect = FALSE;
+ ( !bMissFollowFlowLine || !pCell->IsInFollowFlowRow() ) &&
+ !pCell->IsCoveredCell()) ) )
+ bProtect = sal_False;
else
pCnt = (*fnNxtPrv)( pCnt );
}
@@ -583,8 +583,8 @@ const SwCntntFrm * MA_FASTCALL lcl_MissProtectedFrames( const SwCntntFrm *pCnt,
return pCnt;
}
-BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
- GetNxtPrvCnt fnNxtPrv, BOOL bInReadOnly )
+sal_Bool MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
+ GetNxtPrvCnt fnNxtPrv, sal_Bool bInReadOnly )
{
OSL_ENSURE( pPam->GetNode() == (SwCntntNode*)pStart->GetNode(),
"lcl_UpDown arbeitet nicht fuer andere." );
@@ -594,10 +594,10 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
//Wenn gerade eine Tabellenselection laeuft muss ein bischen getricktst
//werden: Beim hochlaufen an den Anfang der Zelle gehen, beim runterlaufen
//an das Ende der Zelle gehen.
- BOOL bTblSel = false;
+ sal_Bool bTblSel = false;
if ( pStart->IsInTab() &&
- pPam->GetNode( TRUE )->StartOfSectionNode() !=
- pPam->GetNode( FALSE )->StartOfSectionNode() )
+ pPam->GetNode( sal_True )->StartOfSectionNode() !=
+ pPam->GetNode( sal_False )->StartOfSectionNode() )
{
bTblSel = true;
const SwLayoutFrm *pCell = pStart->GetUpper();
@@ -630,13 +630,13 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
}
pCnt = (*fnNxtPrv)( pCnt ? pCnt : pStart );
- pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, TRUE, bInReadOnly, bTblSel );
+ pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, sal_True, bInReadOnly, bTblSel );
const SwTabFrm *pStTab = pStart->FindTabFrm();
const SwTabFrm *pTable = 0;
- const BOOL bTab = pStTab || (pCnt && pCnt->IsInTab()) ? TRUE : FALSE;
- BOOL bEnd = bTab ? FALSE : TRUE;
+ const sal_Bool bTab = pStTab || (pCnt && pCnt->IsInTab()) ? sal_True : sal_False;
+ sal_Bool bEnd = bTab ? sal_False : sal_True;
const SwFrm* pVertRefFrm = pStart;
if ( bTblSel && pStTab )
@@ -711,7 +711,7 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
(pCnt->IsTxtFrm() && ((SwTxtFrm*)pCnt)->IsHiddenNow())))
{
pCnt = (*fnNxtPrv)( pCnt );
- pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, TRUE, bInReadOnly, bTblSel );
+ pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, sal_True, bInReadOnly, bTblSel );
}
}
@@ -723,7 +723,7 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
(pCnt->IsTxtFrm() && ((SwTxtFrm*)pCnt)->IsHiddenNow())))
{
pCnt = (*fnNxtPrv)( pCnt );
- pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, TRUE, bInReadOnly, bTblSel );
+ pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, sal_True, bInReadOnly, bTblSel );
}
}
@@ -734,7 +734,7 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
if ( pCnt && pCnt->IsTxtFrm() && ((SwTxtFrm*)pCnt)->IsHiddenNow() )
{
pCnt = (*fnNxtPrv)( pCnt );
- pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, TRUE, bInReadOnly, bTblSel );
+ pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, sal_True, bInReadOnly, bTblSel );
}
}
@@ -745,11 +745,11 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
const SwFrm *pUp = pStart->GetUpper(); //Head/Foot
while ( pUp && pUp->GetUpper() && !(pUp->GetType() & 0x0018 ) )
pUp = pUp->GetUpper();
- BOOL bSame = FALSE;
+ sal_Bool bSame = sal_False;
const SwFrm *pCntUp = pCnt->GetUpper();
while ( pCntUp && !bSame )
{ if ( pUp == pCntUp )
- bSame = TRUE;
+ bSame = sal_True;
else
pCntUp = pCntUp->GetUpper();
}
@@ -758,18 +758,18 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
else if ( pCnt && pCnt->IsTxtFrm() && ((SwTxtFrm*)pCnt)->IsHiddenNow() ) // i73332
{
pCnt = (*fnNxtPrv)( pCnt );
- pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, TRUE, bInReadOnly, bTblSel );
+ pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, sal_True, bInReadOnly, bTblSel );
}
}
if ( bTab )
{
if ( !pCnt )
- bEnd = TRUE;
+ bEnd = sal_True;
else
{ const SwTabFrm *pTab = pCnt->FindTabFrm();
if( !pTab )
- bEnd = TRUE;
+ bEnd = sal_True;
else
{
if ( pTab != pTable )
@@ -816,7 +816,7 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
if ( pCell && pCell->Frm().IsInside( aInsideCell ) )
{
- bEnd = TRUE;
+ bEnd = sal_True;
//Jetzt noch schnell den richtigen Cntnt in der Zelle
//greifen.
if ( !pCnt->Frm().IsInside( aInsideCnt ) )
@@ -828,13 +828,13 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
}
}
else if ( pCnt->Frm().IsInside( aInsideCnt ) )
- bEnd = TRUE;
+ bEnd = sal_True;
}
}
if ( !bEnd )
{
pCnt = (*fnNxtPrv)( pCnt );
- pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, TRUE, bInReadOnly, bTblSel );
+ pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, sal_True, bInReadOnly, bTblSel );
}
}
@@ -849,17 +849,17 @@ BOOL MA_FASTCALL lcl_UpDown( SwPaM *pPam, const SwCntntFrm *pStart,
pCNd->MakeEndIndex( (SwIndex*)&pPam->GetPoint()->nContent );
else
pCNd->MakeStartIndex( (SwIndex*)&pPam->GetPoint()->nContent );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwCntntFrm::UnitUp( SwPaM* pPam, const SwTwips, BOOL bInReadOnly ) const
+sal_Bool SwCntntFrm::UnitUp( SwPaM* pPam, const SwTwips, sal_Bool bInReadOnly ) const
{
return ::lcl_UpDown( pPam, this, lcl_GetPrvCnt, bInReadOnly );
}
-BOOL SwCntntFrm::UnitDown( SwPaM* pPam, const SwTwips, BOOL bInReadOnly ) const
+sal_Bool SwCntntFrm::UnitDown( SwPaM* pPam, const SwTwips, sal_Bool bInReadOnly ) const
{
return ::lcl_UpDown( pPam, this, lcl_GetNxtCnt, bInReadOnly );
}
@@ -875,13 +875,13 @@ BOOL SwCntntFrm::UnitDown( SwPaM* pPam, const SwTwips, BOOL bInReadOnly ) const
|* Es wird nur auf den vorhandenen Seiten gearbeitet!
|*
|*************************************************************************/
-USHORT SwRootFrm::GetCurrPage( const SwPaM *pActualCrsr ) const
+sal_uInt16 SwRootFrm::GetCurrPage( const SwPaM *pActualCrsr ) const
{
OSL_ENSURE( pActualCrsr, "Welche Seite soll's denn sein?" );
- const SwFrm *pActFrm = GetFmt()->GetDoc()->GetNodes()[pActualCrsr->GetPoint()->nNode]->
+ SwFrm const*const pActFrm = pActualCrsr->GetPoint()->nNode.GetNode().
GetCntntNode()->GetFrm( 0,
pActualCrsr->GetPoint(),
- FALSE );
+ sal_False );
return pActFrm->FindPageFrm()->GetPhyPageNum();
}
@@ -897,12 +897,12 @@ USHORT SwRootFrm::GetCurrPage( const SwPaM *pActualCrsr ) const
|* gewaehlt wurde.
|*
|*************************************************************************/
-USHORT SwRootFrm::SetCurrPage( SwCursor* pToSet, USHORT nPageNum )
+sal_uInt16 SwRootFrm::SetCurrPage( SwCursor* pToSet, sal_uInt16 nPageNum )
{
OSL_ENSURE( Lower() && Lower()->IsPageFrm(), "Keine Seite vorhanden." );
SwPageFrm *pPage = (SwPageFrm*)Lower();
- BOOL bEnd =FALSE;
+ sal_Bool bEnd =sal_False;
while ( !bEnd && pPage->GetPhyPageNum() != nPageNum )
{ if ( pPage->GetNext() )
pPage = (SwPageFrm*)pPage->GetNext();
@@ -921,7 +921,7 @@ USHORT SwRootFrm::SetCurrPage( SwCursor* pToSet, USHORT nPageNum )
if ( pPage->GetNext() )
pPage = (SwPageFrm*)pPage->GetNext();
else
- bEnd = TRUE;
+ bEnd = sal_True;
}
}
//pPage zeigt jetzt auf die 'gewuenschte' Seite. Jetzt muss noch der
@@ -1018,18 +1018,18 @@ SwWhichPage fnPageNext = GetNextFrm;
//den Parameter fnPosPage) in der
//aktuellen/vorhergehenden/folgenden Seite (gesteuert durch den
//Parameter fnWhichPage).
-BOOL GetFrmInPage( const SwCntntFrm *pCnt, SwWhichPage fnWhichPage,
+sal_Bool GetFrmInPage( const SwCntntFrm *pCnt, SwWhichPage fnWhichPage,
SwPosPage fnPosPage, SwPaM *pPam )
{
//Erstmal die gewuenschte Seite besorgen, anfangs die aktuelle, dann
//die die per fnWichPage gewuenscht wurde
const SwLayoutFrm *pLayoutFrm = pCnt->FindPageFrm();
if ( !pLayoutFrm || (0 == (pLayoutFrm = (*fnWhichPage)(pLayoutFrm))) )
- return FALSE;
+ return sal_False;
//Jetzt den gewuenschen CntntFrm unterhalb der Seite
if( 0 == (pCnt = (*fnPosPage)(pLayoutFrm)) )
- return FALSE;
+ return sal_False;
else
{
// repeated headlines in tables
@@ -1049,7 +1049,7 @@ BOOL GetFrmInPage( const SwCntntFrm *pCnt, SwWhichPage fnWhichPage,
// of the next row
pCnt = pRow->ContainsCntnt();
if ( ! pCnt )
- return FALSE;
+ return sal_False;
}
}
}
@@ -1064,7 +1064,7 @@ BOOL GetFrmInPage( const SwCntntFrm *pCnt, SwWhichPage fnWhichPage,
nIdx = pCnt->GetFollow() ?
((SwTxtFrm*)pCnt)->GetFollow()->GetOfst()-1 : pCNd->Len();
pPam->GetPoint()->nContent.Assign( pCNd, nIdx );
- return TRUE;
+ return sal_True;
}
}
@@ -1081,7 +1081,7 @@ BOOL GetFrmInPage( const SwCntntFrm *pCnt, SwWhichPage fnWhichPage,
|* innerhalb der PrtArea des gefundenen CntntFrm
|*
|*************************************************************************/
-ULONG CalcDiff( const Point &rPt1, const Point &rPt2 )
+sal_uLong CalcDiff( const Point &rPt1, const Point &rPt2 )
{
//Jetzt die Entfernung zwischen den beiden Punkten berechnen.
//'Delta' X^2 + 'Delta'Y^2 = 'Entfernung'^2
@@ -1120,11 +1120,11 @@ const SwLayoutFrm* lcl_Inside( const SwCntntFrm *pCnt, Point& rPt )
}
const SwCntntFrm *SwLayoutFrm::GetCntntPos( Point& rPoint,
- const BOOL bDontLeave,
- const BOOL bBodyOnly,
- const BOOL bCalc,
+ const sal_Bool bDontLeave,
+ const sal_Bool bBodyOnly,
+ const sal_Bool bCalc,
const SwCrsrMoveState *pCMS,
- const BOOL bDefaultExpand ) const
+ const sal_Bool bDefaultExpand ) const
{
//Ersten CntntFrm ermitteln.
const SwLayoutFrm *pStart = (!bDontLeave && bDefaultExpand && GetPrev()) ?
@@ -1140,11 +1140,11 @@ const SwCntntFrm *SwLayoutFrm::GetCntntPos( Point& rPoint,
const SwCntntFrm *pActual= pCntnt;
const SwLayoutFrm *pInside = NULL;
- USHORT nMaxPage = GetPhyPageNum() + (bDefaultExpand ? 1 : 0);
+ sal_uInt16 nMaxPage = GetPhyPageNum() + (bDefaultExpand ? 1 : 0);
Point aPoint = rPoint;
- ULONG nDistance = ULONG_MAX;
+ sal_uLong nDistance = ULONG_MAX;
- while ( TRUE ) //Sicherheitsschleifchen, damit immer einer gefunden wird.
+ while ( sal_True ) //Sicherheitsschleifchen, damit immer einer gefunden wird.
{
while ( pCntnt &&
((!bDontLeave || IsAnLower( pCntnt )) &&
@@ -1156,8 +1156,8 @@ const SwCntntFrm *SwLayoutFrm::GetCntntPos( Point& rPoint,
//Wenn der Cntnt in einem geschuetzen Bereich (Zelle, Ftn, Section)
//liegt, wird der nachste Cntnt der nicht geschuetzt ist gesucht.
const SwCntntFrm *pComp = pCntnt;
- pCntnt = ::lcl_MissProtectedFrames( pCntnt, lcl_GetNxtCnt, FALSE,
- pCMS ? pCMS->bSetInReadOnly : FALSE, FALSE );
+ pCntnt = ::lcl_MissProtectedFrames( pCntnt, lcl_GetNxtCnt, sal_False,
+ pCMS ? pCMS->bSetInReadOnly : sal_False, sal_False );
if ( pComp != pCntnt )
continue;
@@ -1195,13 +1195,13 @@ const SwCntntFrm *SwLayoutFrm::GetCntntPos( Point& rPoint,
if( !pInside || ( pInside->IsAnLower( pCntnt ) &&
( !pCntnt->IsInFtn() || pInside->IsFtnContFrm() ) ) )
{
- const ULONG nDiff = ::CalcDiff( aCntntPoint, rPoint );
- BOOL bBetter = nDiff < nDistance; // Dichter dran
+ const sal_uLong nDiff = ::CalcDiff( aCntntPoint, rPoint );
+ sal_Bool bBetter = nDiff < nDistance; // Dichter dran
if( !pInside )
{
pInside = lcl_Inside( pCntnt, rPoint );
if( pInside ) // Im "richtigen" Seitenteil
- bBetter = TRUE;
+ bBetter = sal_True;
}
if( bBetter )
{
@@ -1276,7 +1276,7 @@ const SwCntntFrm *SwLayoutFrm::GetCntntPos( Point& rPoint,
const SwTabFrm *pTab = pActual->FindTabFrm();
if ( pTab->IsFollow() && pTab->IsInHeadline( *pActual ) )
{
- ((SwCrsrMoveState*)pCMS)->bStop = TRUE;
+ ((SwCrsrMoveState*)pCMS)->bStop = sal_True;
return 0;
}
}
@@ -1351,7 +1351,7 @@ void SwPageFrm::GetCntntPosition( const Point &rPt, SwPosition &rPos ) const
const SwCntntFrm *pAct = pCntnt;
Point aAct = rPt;
- ULONG nDist = ULONG_MAX;
+ sal_uLong nDist = ULONG_MAX;
while ( pCntnt )
{
@@ -1378,7 +1378,7 @@ void SwPageFrm::GetCntntPosition( const Point &rPt, SwPosition &rPos ) const
else if ( aCntFrm.Right() < rPt.X() )
aPoint.X() = aCntFrm.Right();
- const ULONG nDiff = ::CalcDiff( aPoint, rPt );
+ const sal_uLong nDiff = ::CalcDiff( aPoint, rPt );
if ( nDiff < nDist )
{
aAct = aPoint;
@@ -1435,14 +1435,14 @@ class DisableCallbackAction
{
private:
SwRootFrm& mrRootFrm;
- BOOL mbOldCallbackActionState;
+ sal_Bool mbOldCallbackActionState;
public:
DisableCallbackAction( const SwRootFrm& _rRootFrm ) :
mrRootFrm( const_cast<SwRootFrm&>(_rRootFrm) ),
mbOldCallbackActionState( _rRootFrm.IsCallbackActionEnabled() )
{
- mrRootFrm.SetCallbackActionEnabled( FALSE );
+ mrRootFrm.SetCallbackActionEnabled( sal_False );
}
~DisableCallbackAction()
@@ -1454,7 +1454,7 @@ class DisableCallbackAction
//!!!!! Es wird nur der vertikal naechstliegende gesucht.
//JP 11.10.2001: only in tables we try to find the right column - Bug 72294
-Point SwRootFrm::GetNextPrevCntntPos( const Point& rPoint, BOOL bNext ) const
+Point SwRootFrm::GetNextPrevCntntPos( const Point& rPoint, sal_Bool bNext ) const
{
// --> OD 2005-05-25 #123110# - disable creation of an action by a callback
// event during processing of this method. Needed because formatting is
@@ -1542,18 +1542,18 @@ Point SwRootFrm::GetNextPrevCntntPos( const Point& rPoint, BOOL bNext ) const
|*
|* Beschreibung: Liefert die absolute Dokumentpositon der gewuenschten
|* Seite.
-|* Formatiert wird nur soweit notwendig und nur dann wenn bFormat=TRUE
+|* Formatiert wird nur soweit notwendig und nur dann wenn bFormat=sal_True
|* Liefert Null, wenn die Operation nicht moeglich ist.
|* Die Pos ist die der letzten Seite, wenn die Seitenzahl zu gross
|* gewaehlt wurde.
|*
|*************************************************************************/
-Point SwRootFrm::GetPagePos( USHORT nPageNum ) const
+Point SwRootFrm::GetPagePos( sal_uInt16 nPageNum ) const
{
OSL_ENSURE( Lower() && Lower()->IsPageFrm(), "Keine Seite vorhanden." );
const SwPageFrm *pPage = (const SwPageFrm*)Lower();
- while ( TRUE )
+ while ( sal_True )
{
if ( pPage->GetPhyPageNum() >= nPageNum || !pPage->GetNext() )
break;
@@ -1588,20 +1588,20 @@ SwPageFrm* SwRootFrm::GetPageByPageNum( sal_uInt16 _nPageNum ) const
/*************************************************************************
|*
-|* SwRootFrm::IsDummyPage(USHORT)
+|* SwRootFrm::IsDummyPage(sal_uInt16)
|*
-|* Description: Returns TRUE, when the given physical pagenumber does't exist
+|* Description: Returns sal_True, when the given physical pagenumber does't exist
|* or this page is an empty page.
|*************************************************************************/
-BOOL SwRootFrm::IsDummyPage( USHORT nPageNum ) const
+sal_Bool SwRootFrm::IsDummyPage( sal_uInt16 nPageNum ) const
{
if( !Lower() || !nPageNum || nPageNum > GetPageNum() )
- return TRUE;
+ return sal_True;
const SwPageFrm *pPage = (const SwPageFrm*)Lower();
while( pPage && nPageNum < pPage->GetPhyPageNum() )
pPage = (const SwPageFrm*)pPage->GetNext();
- return pPage ? pPage->IsEmptyPage() : TRUE;
+ return pPage ? pPage->IsEmptyPage() : sal_True;
}
@@ -1615,7 +1615,7 @@ BOOL SwRootFrm::IsDummyPage( USHORT nPageNum ) const
|*
|*
|*************************************************************************/
-BOOL SwFrm::IsProtected() const
+sal_Bool SwFrm::IsProtected() const
{
if (this->IsCntntFrm() && ((SwCntntFrm*)this)->GetNode())
{
@@ -1623,7 +1623,7 @@ BOOL SwFrm::IsProtected() const
bool isFormProtected=pDoc->get(IDocumentSettingAccess::PROTECT_FORM );
if (isFormProtected)
{
- return FALSE; // TODO a hack for now, well deal with it laster, I we return true here we have a "double" locking
+ return sal_False; // TODO a hack for now, well deal with it laster, I we return true here we have a "double" locking
}
}
//Der Frm kann in Rahmen, Zellen oder Bereichen geschuetzt sein.
@@ -1635,16 +1635,16 @@ BOOL SwFrm::IsProtected() const
{
if ( ((SwCntntFrm*)pFrm)->GetNode() &&
((SwCntntFrm*)pFrm)->GetNode()->IsInProtectSect() )
- return TRUE;
+ return sal_True;
}
else
{
if ( ((SwLayoutFrm*)pFrm)->GetFmt() &&
((SwLayoutFrm*)pFrm)->GetFmt()->
GetProtect().IsCntntProtected() )
- return TRUE;
+ return sal_True;
if ( pFrm->IsCoveredCell() )
- return TRUE;
+ return sal_True;
}
if ( pFrm->IsFlyFrm() )
{
@@ -1657,7 +1657,7 @@ BOOL SwFrm::IsProtected() const
{ pMaster = pMaster->GetPrevLink();
} while ( pMaster->GetPrevLink() );
if ( pMaster->IsProtected() )
- return TRUE;
+ return sal_True;
}
pFrm = ((SwFlyFrm*)pFrm)->GetAnchorFrm();
}
@@ -1668,7 +1668,7 @@ BOOL SwFrm::IsProtected() const
} while ( pFrm );
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1678,7 +1678,7 @@ BOOL SwFrm::IsProtected() const
|*
|*
|*************************************************************************/
-USHORT SwFrm::GetPhyPageNum() const
+sal_uInt16 SwFrm::GetPhyPageNum() const
{
const SwPageFrm *pPage = FindPageFrm();
return pPage ? pPage->GetPhyPageNum() : 0;
@@ -1698,15 +1698,15 @@ USHORT SwFrm::GetPhyPageNum() const
* but a previous empty page don't count.
* --------------------------------------------------*/
-BOOL SwFrm::WannaRightPage() const
+sal_Bool SwFrm::WannaRightPage() const
{
const SwPageFrm *pPage = FindPageFrm();
if ( !pPage || !pPage->GetUpper() )
- return TRUE;
+ return sal_True;
const SwFrm *pFlow = pPage->FindFirstBodyCntnt();
SwPageDesc *pDesc = 0;
- USHORT nPgNum = 0;
+ sal_uInt16 nPgNum = 0;
if ( pFlow )
{
if ( pFlow->IsInTab() )
@@ -1733,9 +1733,9 @@ BOOL SwFrm::WannaRightPage() const
}
}
OSL_ENSURE( pDesc, "No pagedescriptor" );
- BOOL bOdd;
+ sal_Bool bOdd;
if( nPgNum )
- bOdd = nPgNum % 2 ? TRUE : FALSE;
+ bOdd = nPgNum % 2 ? sal_True : sal_False;
else
{
bOdd = pPage->OnRightPage();
@@ -1745,9 +1745,9 @@ BOOL SwFrm::WannaRightPage() const
if( !pPage->IsEmptyPage() )
{
if( !pDesc->GetRightFmt() )
- bOdd = FALSE;
+ bOdd = sal_False;
else if( !pDesc->GetLeftFmt() )
- bOdd = TRUE;
+ bOdd = sal_True;
}
return bOdd;
}
@@ -1758,13 +1758,13 @@ BOOL SwFrm::WannaRightPage() const
|* Beschreibung: Liefert die virtuelle Seitennummer mit Offset
|*
|*************************************************************************/
-USHORT SwFrm::GetVirtPageNum() const
+sal_uInt16 SwFrm::GetVirtPageNum() const
{
const SwPageFrm *pPage = FindPageFrm();
if ( !pPage || !pPage->GetUpper() )
return 0;
- USHORT nPhyPage = pPage->GetPhyPageNum();
+ sal_uInt16 nPhyPage = pPage->GetPhyPageNum();
if ( !((SwRootFrm*)pPage->GetUpper())->IsVirtPageNum() )
return nPhyPage;
@@ -1777,10 +1777,10 @@ USHORT SwFrm::GetVirtPageNum() const
const SwFrm *pFrm = 0;
const SfxItemPool &rPool = pPage->GetFmt()->GetDoc()->GetAttrPool();
const SfxPoolItem* pItem;
- USHORT nMaxItems = rPool.GetItemCount( RES_PAGEDESC );
- for( USHORT n = 0; n < nMaxItems; ++n )
+ sal_uInt32 nMaxItems = rPool.GetItemCount2( RES_PAGEDESC );
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
{
- if( 0 == (pItem = rPool.GetItem( RES_PAGEDESC, n ) ))
+ if( 0 == (pItem = rPool.GetItem2( RES_PAGEDESC, n ) ))
continue;
const SwFmtPageDesc *pDesc = (SwFmtPageDesc*)pItem;
@@ -1817,7 +1817,7 @@ USHORT SwFrm::GetVirtPageNum() const
bool SwRootFrm::MakeTblCrsrs( SwTableCursor& rTblCrsr )
{
//Union-Rects und Tabellen (Follows) der Selektion besorgen.
- OSL_ENSURE( rTblCrsr.GetCntntNode() && rTblCrsr.GetCntntNode( FALSE ),
+ OSL_ENSURE( rTblCrsr.GetCntntNode() && rTblCrsr.GetCntntNode( sal_False ),
"Tabselection nicht auf Cnt." );
bool bRet = false;
@@ -1839,10 +1839,10 @@ bool SwRootFrm::MakeTblCrsrs( SwTableCursor& rTblCrsr )
// --> FME 2008-01-14 #151012# Made code robust here:
const SwCntntNode* pTmpStartNode = rTblCrsr.GetCntntNode();
- const SwCntntNode* pTmpEndNode = rTblCrsr.GetCntntNode(FALSE);
+ const SwCntntNode* pTmpEndNode = rTblCrsr.GetCntntNode(sal_False);
- const SwFrm* pTmpStartFrm = pTmpStartNode ? pTmpStartNode->GetFrm( &aPtPt, 0, FALSE ) : 0;
- const SwFrm* pTmpEndFrm = pTmpEndNode ? pTmpEndNode->GetFrm( &aMkPt, 0, FALSE ) : 0;
+ const SwFrm* pTmpStartFrm = pTmpStartNode ? pTmpStartNode->GetFrm( &aPtPt, 0, sal_False ) : 0;
+ const SwFrm* pTmpEndFrm = pTmpEndNode ? pTmpEndNode->GetFrm( &aMkPt, 0, sal_False ) : 0;
const SwLayoutFrm* pStart = pTmpStartFrm ? pTmpStartFrm->GetUpper() : 0;
const SwLayoutFrm* pEnd = pTmpEndFrm ? pTmpEndFrm->GetUpper() : 0;
@@ -1860,9 +1860,9 @@ bool SwRootFrm::MakeTblCrsrs( SwTableCursor& rTblCrsr )
SwSelBoxes aNew;
- const BOOL bReadOnlyAvailable = rTblCrsr.IsReadOnlyAvailable();
+ const sal_Bool bReadOnlyAvailable = rTblCrsr.IsReadOnlyAvailable();
- for ( USHORT i = 0; i < aUnions.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aUnions.Count(); ++i )
{
SwSelUnion *pUnion = aUnions[i];
const SwTabFrm *pTable = pUnion->GetTable();
@@ -1969,9 +1969,8 @@ inline void Sub( SwRegionRects& rRegion, const SwRect& rRect )
rRegion -= rRect;
}
-void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode )
+void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, sal_Bool bIsTblMode )
{
- const SwNodes &rNds = GetFmt()->GetDoc()->GetNodes();
SwPosition *pStartPos = rCrsr.Start(),
*pEndPos = rCrsr.GetPoint() == pStartPos ?
rCrsr.GetMark() : rCrsr.GetPoint();
@@ -1994,10 +1993,10 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode )
//Erstmal die CntntFrms zum Start und End besorgen, die brauch ich auf
//jedenfall.
- const SwCntntFrm *pStartFrm = rNds[ pStartPos->nNode ]->
+ SwCntntFrm const* pStartFrm = pStartPos->nNode.GetNode().
GetCntntNode()->GetFrm( &rCrsr.GetSttPos(), pStartPos );
- const SwCntntFrm *pEndFrm = rNds[ pEndPos->nNode ]->
+ SwCntntFrm const* pEndFrm = pEndPos->nNode.GetNode().
GetCntntNode()->GetFrm( &rCrsr.GetEndPos(), pEndPos );
OSL_ENSURE( (pStartFrm && pEndFrm), "Keine CntntFrms gefunden." );
@@ -2033,7 +2032,7 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode )
// nicht erlaubt ist Header/Footer/TableHeadline ueber 2 Seiten
do { // middle check loop
const SwLayoutFrm* pSttLFrm = pStartFrm->GetUpper();
- const USHORT cHdFtTblHd = FRM_HEADER | FRM_FOOTER | FRM_TAB;
+ const sal_uInt16 cHdFtTblHd = FRM_HEADER | FRM_FOOTER | FRM_TAB;
while( pSttLFrm &&
! (cHdFtTblHd & pSttLFrm->GetType() ))
pSttLFrm = pSttLFrm->GetUpper();
@@ -2085,7 +2084,7 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode )
}
break;
}
- } while( FALSE );
+ } while( sal_False );
SwCrsrMoveState aTmpState( MV_NONE );
aTmpState.b2Lines = sal_True;
@@ -2109,8 +2108,8 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode )
if( pStartFrm != pEndFrm )
aEndFrm.Intersection( pEndFrm->PaintArea() );
SWRECTFN( pStartFrm )
- const BOOL bR2L = pStartFrm->IsRightToLeft();
- const BOOL bEndR2L = pEndFrm->IsRightToLeft();
+ const sal_Bool bR2L = pStartFrm->IsRightToLeft();
+ const sal_Bool bEndR2L = pEndFrm->IsRightToLeft();
// If there's no doubleline portion involved or start and end are both
// in the same doubleline portion, all works fine, but otherwise
@@ -2454,7 +2453,7 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode )
}
//Now the frames between, if there are any
- BOOL bBody = pStartFrm->IsInDocBody();
+ sal_Bool bBody = pStartFrm->IsInDocBody();
const SwTableBox* pCellBox = pStartFrm->GetUpper()->IsCellFrm() ?
((SwCellFrm*)pStartFrm->GetUpper())->GetTabBox() : 0;
const SwCntntFrm *pCntnt = pStartFrm->GetNextCntntFrm();
@@ -2514,7 +2513,8 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode )
//At least the endframe...
bVert = pEndFrm->IsVertical();
bRev = pEndFrm->IsReverse();
- fnRect = bVert ? ( bRev ? fnRectVL2R : fnRectVert ) :
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ fnRect = bVert ? ( bRev ? fnRectVL2R : ( pEndFrm->IsVertLR() ? fnRectVertL2R : fnRectVert ) ) :
( bRev ? fnRectB2T : fnRectHori );
nTmpTwips = (aEndRect.*fnRect->fnGetTop)();
if( (aEndFrm.*fnRect->fnGetTop)() != nTmpTwips )
@@ -2531,7 +2531,7 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode )
Sub( aRegion, aSubRect );
}
-// aRegion.Compress( FALSE );
+// aRegion.Compress( sal_False );
aRegion.Invert();
delete pSt2Pos;
delete pEnd2Pos;
@@ -2550,7 +2550,7 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode )
if ( pPage->GetSortedObjs() )
{
const SwSortedObjs &rObjs = *pPage->GetSortedObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
if ( !pAnchoredObj->ISA(SwFlyFrm) )
@@ -2565,16 +2565,16 @@ void SwRootFrm::CalcFrmRects( SwShellCrsr &rCrsr, BOOL bIsTblMode )
if ( aSortObjs.Contains( *pAnchoredObj ) )
continue;
- BOOL bSub = TRUE;
- const UINT32 nPos = pObj->GetOrdNum();
- for ( USHORT k = 0; bSub && k < aSortObjs.Count(); ++k )
+ sal_Bool bSub = sal_True;
+ const sal_uInt32 nPos = pObj->GetOrdNum();
+ for ( sal_uInt16 k = 0; bSub && k < aSortObjs.Count(); ++k )
{
OSL_ENSURE( aSortObjs[k]->ISA(SwFlyFrm),
"<SwRootFrm::CalcFrmRects(..)> - object in <aSortObjs> of unexcepted type" );
const SwFlyFrm* pTmp = static_cast<SwFlyFrm*>(aSortObjs[k]);
do
{ if ( nPos < pTmp->GetVirtDrawObj()->GetOrdNumDirect() )
- bSub = FALSE;
+ bSub = sal_False;
else
pTmp = pTmp->GetAnchorFrm()->FindFlyFrm();
} while ( bSub && pTmp );
diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx
index d16f10b8c95e..e55718128b15 100644
--- a/sw/source/core/layout/unusedf.cxx
+++ b/sw/source/core/layout/unusedf.cxx
@@ -29,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "rootfrm.hxx"
#include "cntfrm.hxx"
#include "flyfrm.hxx"
@@ -38,18 +36,18 @@
void SwFrm::Format( const SwBorderAttrs * )
{
- OSL_ENSURE( FALSE, "Format() der Basisklasse gerufen." );
+ OSL_ENSURE( sal_False, "Format() der Basisklasse gerufen." );
}
-void SwFrm::Paint(const SwRect &, const SwPrtOptions * ) const
+void SwFrm::Paint(SwRect const&, SwPrintData const*const) const
{
- OSL_ENSURE( FALSE, "Paint() der Basisklasse gerufen." );
+ OSL_ENSURE( sal_False, "Paint() der Basisklasse gerufen." );
}
sal_Bool SwCntntFrm::WouldFit( SwTwips &, sal_Bool&, sal_Bool )
{
- OSL_ENSURE( FALSE, "WouldFit des CntntFrm gerufen." );
- return FALSE;
+ OSL_ENSURE( sal_False, "WouldFit des CntntFrm gerufen." );
+ return sal_False;
}
bool SwFrm::FillSelection( SwSelectionList& , const SwRect& ) const
@@ -58,36 +56,36 @@ bool SwFrm::FillSelection( SwSelectionList& , const SwRect& ) const
return false;
}
-BOOL SwFrm::GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* ) const
+sal_Bool SwFrm::GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* ) const
{
- OSL_ENSURE( FALSE, "GetCrsrOfst der Basisklasse, hi!" );
- return FALSE;
+ OSL_ENSURE( sal_False, "GetCrsrOfst der Basisklasse, hi!" );
+ return sal_False;
}
#if OSL_DEBUG_LEVEL > 1
void SwRootFrm::Cut()
{
- OSL_ENSURE( FALSE, "Cut() des RootFrm gerufen." );
+ OSL_ENSURE( sal_False, "Cut() des RootFrm gerufen." );
}
void SwRootFrm::Paste( SwFrm *, SwFrm * )
{
- OSL_ENSURE( FALSE, "Paste() des RootFrm gerufen." );
+ OSL_ENSURE( sal_False, "Paste() des RootFrm gerufen." );
}
void SwFlyFrm::Paste( SwFrm *, SwFrm * )
{
- OSL_ENSURE( FALSE, "Paste() des FlyFrm gerufen." );
+ OSL_ENSURE( sal_False, "Paste() des FlyFrm gerufen." );
}
#endif
-BOOL SwFrm::GetCharRect( SwRect&, const SwPosition&,
+sal_Bool SwFrm::GetCharRect( SwRect&, const SwPosition&,
SwCrsrMoveState* ) const
{
- OSL_ENSURE( FALSE, "GetCharRect() der Basis gerufen." );
- return FALSE;
+ OSL_ENSURE( sal_False, "GetCharRect() der Basis gerufen." );
+ return sal_False;
}
diff --git a/sw/source/core/layout/virtoutp.cxx b/sw/source/core/layout/virtoutp.cxx
index 4a56c37497c2..d769f3c4987a 100644
--- a/sw/source/core/layout/virtoutp.cxx
+++ b/sw/source/core/layout/virtoutp.cxx
@@ -75,21 +75,21 @@ inline DbgRect::DbgRect( OutputDevice *pOutDev, const Rectangle &rRect,
* dieser wird in _FrmInit angelegt und in _FrmFinit zerstoert.
* */
-BOOL SwRootFrm::FlushVout()
+sal_Bool SwRootFrm::FlushVout()
{
if( SwRootFrm::pVout->IsFlushable() )
{
SwRootFrm::pVout->_Flush();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwRootFrm::HasSameRect( const SwRect& rRect )
+sal_Bool SwRootFrm::HasSameRect( const SwRect& rRect )
{
if( SwRootFrm::pVout->IsFlushable() )
return ( rRect == SwRootFrm::pVout->GetOrgRect() );
- return FALSE;
+ return sal_False;
}
/** method to set mapping/pixel offset for virtual output device
@@ -139,14 +139,14 @@ void SetMappingForVirtDev( const Point& _rNewOrigin,
*************************************************************************/
// rSize muss in Pixel-Koordinaten vorliegen!
-BOOL SwLayVout::DoesFit( const Size &rNew )
+sal_Bool SwLayVout::DoesFit( const Size &rNew )
{
if( rNew.Height() > VIRTUALHEIGHT )
- return FALSE;
+ return sal_False;
if( rNew.Width() <= 0 || rNew.Height() <= 0 )
- return FALSE;
+ return sal_False;
if( rNew.Width() <= aSize.Width() )
- return TRUE;
+ return sal_True;
if( !pVirDev )
{
pVirDev = new VirtualDevice();
@@ -166,10 +166,10 @@ BOOL SwLayVout::DoesFit( const Size &rNew )
delete pVirDev;
pVirDev = NULL;
aSize.Width() = 0;
- return FALSE;
+ return sal_False;
}
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -180,7 +180,7 @@ BOOL SwLayVout::DoesFit( const Size &rNew )
/// output is used.
/// <aRect> contains the rectangle that represents the area the virtual
/// output device is used for and that is flushed at the end.
-void SwLayVout::Enter( ViewShell *pShell, SwRect &rRect, BOOL bOn )
+void SwLayVout::Enter( ViewShell *pShell, SwRect &rRect, sal_Bool bOn )
{
Flush();
diff --git a/sw/source/core/layout/virtoutp.hxx b/sw/source/core/layout/virtoutp.hxx
index 04f6a67031de..f3f27a184150 100644
--- a/sw/source/core/layout/virtoutp.hxx
+++ b/sw/source/core/layout/virtoutp.hxx
@@ -50,22 +50,22 @@ private:
SwRect aRect;
SwRect aOrgRect;
Size aSize;
- USHORT nCount;
+ sal_uInt16 nCount;
- BOOL DoesFit( const Size &rOut );
+ sal_Bool DoesFit( const Size &rOut );
public:
SwLayVout() : pSh(0), pOut(0), pVirDev(0), aSize(0, VIRTUALHEIGHT), nCount(0) {}
~SwLayVout() { delete pVirDev; }
/// OD 27.09.2002 #103636# - change 2nd parameter <rRect> - no longer <const>
- void Enter( ViewShell *pShell, SwRect &rRect, BOOL bOn );
+ void Enter( ViewShell *pShell, SwRect &rRect, sal_Bool bOn );
void Leave() { --nCount; Flush(); }
void SetOrgRect( SwRect &rRect ) { aOrgRect = rRect; }
const SwRect& GetOrgRect() const { return aOrgRect; }
- BOOL IsFlushable() { return 0 != pOut; }
+ sal_Bool IsFlushable() { return 0 != pOut; }
void _Flush();
void Flush() { if( pOut ) _Flush(); }
};
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 6a2baac78f25..9497890b8979 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -93,11 +93,11 @@ SwFrm::SwFrm( SwModify *pMod ) :
pNext( 0 ),
pPrev( 0 ),
pDrawObjs( 0 )
- , bInfBody( FALSE )
- , bInfTab ( FALSE )
- , bInfFly ( FALSE )
- , bInfFtn ( FALSE )
- , bInfSct ( FALSE )
+ , bInfBody( sal_False )
+ , bInfTab ( sal_False )
+ , bInfFly ( sal_False )
+ , bInfFtn ( sal_False )
+ , bInfSct ( sal_False )
{
#if OSL_DEBUG_LEVEL > 1
bFlag01 = bFlag02 = bFlag03 = bFlag04 = bFlag05 = 0;
@@ -105,10 +105,12 @@ SwFrm::SwFrm( SwModify *pMod ) :
OSL_ENSURE( pMod, "Kein Frameformat uebergeben." );
bInvalidR2L = bInvalidVert = 1;
- bDerivedR2L = bDerivedVert = bRightToLeft = bVertical = bReverse = 0;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ bDerivedR2L = bDerivedVert = bRightToLeft = bVertical = bReverse = bVertLR = 0;
+
bValidPos = bValidPrtArea = bValidSize = bValidLineNum = bRetouche =
- bFixSize = bColLocked = FALSE;
- bCompletePaint = bInfInvalid = TRUE;
+ bFixSize = bColLocked = sal_False;
+ bCompletePaint = bInfInvalid = sal_True;
}
@@ -121,7 +123,7 @@ ViewShell * SwFrm::GetShell() const
}
-void SwFrm::CheckDir( UINT16 nDir, BOOL bVert, BOOL bOnlyBiDi, BOOL bBrowse )
+void SwFrm::CheckDir( sal_uInt16 nDir, sal_Bool bVert, sal_Bool bOnlyBiDi, sal_Bool bBrowse )
{
if( FRMDIR_ENVIRONMENT == nDir || ( bVert && bOnlyBiDi ) )
{
@@ -135,9 +137,19 @@ void SwFrm::CheckDir( UINT16 nDir, BOOL bVert, BOOL bOnlyBiDi, BOOL bBrowse )
bInvalidVert = 0;
if( FRMDIR_HORI_LEFT_TOP == nDir || FRMDIR_HORI_RIGHT_TOP == nDir
|| bBrowse )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ {
bVertical = 0;
+ bVertLR = 0;
+ }
else
+ {
bVertical = 1;
+ if(FRMDIR_VERT_TOP_RIGHT == nDir)
+ bVertLR = 0;
+ else if(FRMDIR_VERT_TOP_LEFT==nDir)
+ bVertLR = 1;
+ }
}
else
{
@@ -149,7 +161,7 @@ void SwFrm::CheckDir( UINT16 nDir, BOOL bVert, BOOL bOnlyBiDi, BOOL bBrowse )
}
}
-void SwFrm::CheckDirection( BOOL bVert )
+void SwFrm::CheckDirection( sal_Bool bVert )
{
if( bVert )
{
@@ -166,7 +178,7 @@ void SwFrm::CheckDirection( BOOL bVert )
}
}
-void SwSectionFrm::CheckDirection( BOOL bVert )
+void SwSectionFrm::CheckDirection( sal_Bool bVert )
{
const SwFrmFmt* pFmt = GetFmt();
if( pFmt )
@@ -177,7 +189,7 @@ void SwSectionFrm::CheckDirection( BOOL bVert )
SwFrm::CheckDirection( bVert );
}
-void SwFlyFrm::CheckDirection( BOOL bVert )
+void SwFlyFrm::CheckDirection( sal_Bool bVert )
{
const SwFrmFmt* pFmt = GetFmt();
if( pFmt )
@@ -188,7 +200,7 @@ void SwFlyFrm::CheckDirection( BOOL bVert )
SwFrm::CheckDirection( bVert );
}
-void SwTabFrm::CheckDirection( BOOL bVert )
+void SwTabFrm::CheckDirection( sal_Bool bVert )
{
const SwFrmFmt* pFmt = GetFmt();
if( pFmt )
@@ -199,7 +211,7 @@ void SwTabFrm::CheckDirection( BOOL bVert )
SwFrm::CheckDirection( bVert );
}
-void SwCellFrm::CheckDirection( BOOL bVert )
+void SwCellFrm::CheckDirection( sal_Bool bVert )
{
const SwFrmFmt* pFmt = GetFmt();
const SfxPoolItem* pItem;
@@ -207,7 +219,7 @@ void SwCellFrm::CheckDirection( BOOL bVert )
// using it. Otherwise the dynamic pool default is used, which may be set
// to LTR in case of OOo 1.0 documents.
// <--
- if( pFmt && SFX_ITEM_SET == pFmt->GetItemState( RES_FRAMEDIR, TRUE, &pItem ) )
+ if( pFmt && SFX_ITEM_SET == pFmt->GetItemState( RES_FRAMEDIR, sal_True, &pItem ) )
{
const SvxFrameDirectionItem* pFrmDirItem = static_cast<const SvxFrameDirectionItem*>(pItem);
CheckDir( pFrmDirItem->GetValue(), bVert, sal_False,
@@ -217,7 +229,7 @@ void SwCellFrm::CheckDirection( BOOL bVert )
SwFrm::CheckDirection( bVert );
}
-void SwTxtFrm::CheckDirection( BOOL bVert )
+void SwTxtFrm::CheckDirection( sal_Bool bVert )
{
CheckDir( GetTxtNode()->GetSwAttrSet().GetFrmDir().GetValue(), bVert,
sal_True,
@@ -231,13 +243,13 @@ void SwTxtFrm::CheckDirection( BOOL bVert )
|*************************************************************************/
void SwFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
{
- BYTE nInvFlags = 0;
+ sal_uInt8 nInvFlags = 0;
if( pNew && RES_ATTRSET_CHG == pNew->Which() )
{
SfxItemIter aNIter( *((SwAttrSetChg*)pNew)->GetChgSet() );
SfxItemIter aOIter( *((SwAttrSetChg*)pOld)->GetChgSet() );
- while( TRUE )
+ while( sal_True )
{
_UpdateAttrFrm( (SfxPoolItem*)aOIter.GetCurItem(),
(SfxPoolItem*)aNIter.GetCurItem(), nInvFlags );
@@ -279,9 +291,9 @@ void SwFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
}
void SwFrm::_UpdateAttrFrm( SfxPoolItem *pOld, SfxPoolItem *pNew,
- BYTE &rInvFlags )
+ sal_uInt8 &rInvFlags )
{
- USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
switch( nWhich )
{
case RES_BOX:
@@ -318,19 +330,19 @@ void SwFrm::_UpdateAttrFrm( SfxPoolItem *pOld, SfxPoolItem *pNew,
{
if ( IsRowFrm() )
{
- BOOL bInFollowFlowRow = 0 != IsInFollowFlowRow();
+ sal_Bool bInFollowFlowRow = 0 != IsInFollowFlowRow();
if ( bInFollowFlowRow || 0 != IsInSplitTableRow() )
{
SwTabFrm* pTab = FindTabFrm();
if ( bInFollowFlowRow )
pTab = pTab->FindMaster();
- pTab->SetRemoveFollowFlowLinePending( TRUE );
+ pTab->SetRemoveFollowFlowLinePending( sal_True );
}
}
break;
}
case RES_COL:
- OSL_ENSURE( FALSE, "Spalten fuer neuen FrmTyp?" );
+ OSL_ENSURE( sal_False, "Spalten fuer neuen FrmTyp?" );
break;
default:
@@ -343,7 +355,7 @@ void SwFrm::_UpdateAttrFrm( SfxPoolItem *pOld, SfxPoolItem *pNew,
|* SwFrm::Prepare()
|*
|*************************************************************************/
-void SwFrm::Prepare( const PrepareHint, const void *, BOOL )
+void SwFrm::Prepare( const PrepareHint, const void *, sal_Bool )
{
/* Do nothing */
}
@@ -461,7 +473,7 @@ void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const
{
const SwTxtNode *pTxtNode = pTxtFrm->GetTxtNode();
if (pTxtNode && pTxtNode->IsGrammarCheckDirty())
- pRoot->SetNeedGrammarCheck( TRUE );
+ pRoot->SetNeedGrammarCheck( sal_True );
}
}
}
@@ -473,7 +485,7 @@ void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const
|*************************************************************************/
Size SwFrm::ChgSize( const Size& aNewSize )
{
- bFixSize = TRUE;
+ bFixSize = sal_True;
const Size aOldSize( Frm().SSize() );
if ( aNewSize == aOldSize )
return aOldSize;
@@ -804,7 +816,7 @@ void SwCntntFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
if( pNxt->IsSctFrm() )
pNxt = ((SwSectionFrm*)pNxt)->ContainsCntnt();
if( pNxt && pNxt->IsTxtFrm() && pNxt->IsInFtn() )
- pNxt->Prepare( PREP_FTN, 0, FALSE );
+ pNxt->Prepare( PREP_FTN, 0, sal_False );
}
if ( Frm().Height() )
@@ -842,7 +854,7 @@ void SwCntntFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
if( pFrm && pFrm->IsSctFrm() )
pFrm = ((SwSectionFrm*)pFrm)->ContainsAny();
if( pFrm )
- pFrm->Prepare( PREP_QUOVADIS, 0, FALSE );
+ pFrm->Prepare( PREP_QUOVADIS, 0, sal_False );
if( !GetNext() )
{
pFrm = FindFtnFrm()->GetNext();
@@ -889,7 +901,7 @@ void SwCntntFrm::Cut()
{
pFrm->_InvalidatePrt();
if( IsInFtn() )
- pFrm->Prepare( PREP_QUOVADIS, 0, FALSE );
+ pFrm->Prepare( PREP_QUOVADIS, 0, sal_False );
}
// --> OD 2004-07-15 #i26250# - invalidate printing area of previous
// table frame.
@@ -933,7 +945,7 @@ void SwCntntFrm::Cut()
}
}
if( pFrm && IsInFtn() )
- pFrm->Prepare( PREP_ERGOSUM, 0, FALSE );
+ pFrm->Prepare( PREP_ERGOSUM, 0, sal_False );
if( IsInSct() && !GetPrev() )
{
SwSectionFrm* pSct = FindSctFrm();
@@ -983,7 +995,7 @@ void SwCntntFrm::Cut()
if ( pMasterTab )
{
pMasterTab->_InvalidatePos();
- pMasterTab->SetRemoveFollowFlowLinePending( TRUE );
+ pMasterTab->SetRemoveFollowFlowLinePending( sal_True );
}
}
// <--
@@ -1033,7 +1045,7 @@ void SwCntntFrm::Cut()
( pUp->IsFtnFrm() && pUp->IsColLocked() ) )
// <--
{
- pSct->DelEmpty( FALSE );
+ pSct->DelEmpty( sal_False );
// Wenn ein gelockter Bereich nicht geloescht werden darf,
// so ist zumindest seine Groesse durch das Entfernen seines
// letzten Contents ungueltig geworden.
@@ -1041,7 +1053,7 @@ void SwCntntFrm::Cut()
}
else
{
- pSct->DelEmpty( TRUE );
+ pSct->DelEmpty( sal_True );
delete pSct;
}
}
@@ -1104,9 +1116,12 @@ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
if ( IsHeaderFrm() || IsFooterFrm() )
fnRect = fnRectHori;
else if ( IsCellFrm() || IsColumnFrm() )
- fnRect = GetUpper()->IsVertical() ? fnRectHori : fnRectVert;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ fnRect = GetUpper()->IsVertical() ? fnRectHori : ( GetUpper()->IsVertLR() ? fnRectVertL2R : fnRectVert );
else
- fnRect = GetUpper()->IsVertical() ? fnRectVert : fnRectHori;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ fnRect = GetUpper()->IsVertical() ? ( GetUpper()->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
+
if( (Frm().*fnRect->fnGetWidth)() != (pParent->Prt().*fnRect->fnGetWidth)())
_InvalidateSize();
@@ -1124,7 +1139,7 @@ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
if( pFrm->IsSctFrm() )
pFrm = ((SwSectionFrm*)pFrm)->ContainsAny();
if( pFrm )
- pFrm->Prepare( PREP_ERGOSUM, 0, FALSE );
+ pFrm->Prepare( PREP_ERGOSUM, 0, sal_False );
}
}
if ( IsInFtn() && 0 != ( pFrm = GetIndPrev() ) )
@@ -1132,7 +1147,7 @@ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
if( pFrm->IsSctFrm() )
pFrm = ((SwSectionFrm*)pFrm)->ContainsAny();
if( pFrm )
- pFrm->Prepare( PREP_QUOVADIS, 0, FALSE );
+ pFrm->Prepare( PREP_QUOVADIS, 0, sal_False );
}
}
@@ -1140,7 +1155,7 @@ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
{
// AdjustNeighbourhood wird jetzt auch in Spalten aufgerufen,
// die sich nicht in Rahmen befinden
- BYTE nAdjust = GetUpper()->IsFtnBossFrm() ?
+ sal_uInt8 nAdjust = GetUpper()->IsFtnBossFrm() ?
((SwFtnBossFrm*)GetUpper())->NeighbourhoodAdjustment( this )
: NA_GROW_SHRINK;
SwTwips nGrow = (Frm().*fnRect->fnGetHeight)();
@@ -1185,7 +1200,7 @@ void SwLayoutFrm::Cut()
{
if( pUp->IsFtnBossFrm() )
{
- BYTE nAdjust= ((SwFtnBossFrm*)pUp)->NeighbourhoodAdjustment( this );
+ sal_uInt8 nAdjust= ((SwFtnBossFrm*)pUp)->NeighbourhoodAdjustment( this );
if( NA_ONLY_ADJUST == nAdjust )
AdjustNeighbourhood( -nShrink );
else
@@ -1226,7 +1241,7 @@ void SwLayoutFrm::Cut()
|* SwFrm::Grow()
|*
|*************************************************************************/
-SwTwips SwFrm::Grow( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwFrm::Grow( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
OSL_ENSURE( nDist >= 0, "Negatives Wachstum?" );
@@ -1275,7 +1290,7 @@ SwTwips SwFrm::Grow( SwTwips nDist, BOOL bTst, BOOL bInfo )
|* SwFrm::Shrink()
|*
|*************************************************************************/
-SwTwips SwFrm::Shrink( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwFrm::Shrink( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
OSL_ENSURE( nDist >= 0, "Negative Verkleinerung?" );
@@ -1343,14 +1358,14 @@ SwTwips SwFrm::Shrink( SwTwips nDist, BOOL bTst, BOOL bInfo )
|* Parameter: nDiff ist der Betrag, um den Platz geschaffen werden muss
|*
|*************************************************************************/
-SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, BOOL bTst )
+SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, sal_Bool bTst )
{
PROTOCOL_ENTER( this, PROT_ADJUSTN, 0, &nDiff );
if ( !nDiff || !GetUpper()->IsFtnBossFrm() ) // nur innerhalb von Seiten/Spalten
return 0L;
- BOOL bBrowse = GetUpper()->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ sal_Bool bBrowse = GetUpper()->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
//Der (Page)Body veraendert sich nur im BrowseMode, aber nicht wenn er
//Spalten enthaelt.
@@ -1471,7 +1486,7 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, BOOL bTst )
//Anpassung von Frm und Prt sorgen wird.
const long nOldFrmHeight = Frm().Height();
const long nOldPrtHeight = Prt().Height();
- const BOOL bOldComplete = IsCompletePaint();
+ const sal_Bool bOldComplete = IsCompletePaint();
if ( IsBodyFrm() )
Prt().SSize().Height() = nOldFrmHeight;
@@ -1513,13 +1528,13 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, BOOL bTst )
SwFtnContFrm* pCont = (SwFtnContFrm*)GetNext();
SwTwips nMinH = 0;
SwFtnFrm* pFtn = (SwFtnFrm*)pCont->Lower();
- BOOL bFtn = FALSE;
+ sal_Bool bFtn = sal_False;
while( pFtn )
{
if( !pFtn->GetAttr()->GetFtn().IsEndNote() )
{
nMinH += (pFtn->Frm().*fnRect->fnGetHeight)();
- bFtn = TRUE;
+ bFtn = sal_True;
}
pFtn = (SwFtnFrm*)pFtn->GetNext();
}
@@ -1541,7 +1556,7 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, BOOL bTst )
}
else
{
- const BOOL bFtnPage = pBoss->IsPageFrm() && ((SwPageFrm*)pBoss)->IsFtnPage();
+ const sal_Bool bFtnPage = pBoss->IsPageFrm() && ((SwPageFrm*)pBoss)->IsFtnPage();
if ( bFtnPage && !IsFtnContFrm() )
pFrm = (SwFrm*)pBoss->FindFtnCont();
if ( !pFrm )
@@ -1579,7 +1594,8 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, BOOL bTst )
if ( !bTst )
{
(pFrm->GetNext()->Frm().*fnRect->fnSetHeight)(nAddMax-nAdd);
- if( bVert && !bRev )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( bVert && !bVertL2R && !bRev )
pFrm->GetNext()->Frm().Pos().X() += nAdd;
pFrm->GetNext()->InvalidatePrt();
if ( pFrm->GetNext()->GetNext() )
@@ -1593,7 +1609,8 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, BOOL bTst )
{
SwTwips nTmp = (pFrm->Frm().*fnRect->fnGetHeight)();
(pFrm->Frm().*fnRect->fnSetHeight)( nTmp - nReal );
- if( bVert && !bRev )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( bVert && !bVertL2R && !bRev )
pFrm->Frm().Pos().X() += nReal;
pFrm->InvalidatePrt();
if ( pFrm->GetNext() )
@@ -1609,7 +1626,7 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, BOOL bTst )
{
const SwSortedObjs &rObjs = *pBoss->GetDrawObjs();
OSL_ENSURE( pBoss->IsPageFrm(), "Header/Footer out of page?" );
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
@@ -1672,7 +1689,7 @@ void SwFrm::ImplInvalidateSize()
{
if ( _InvalidationAllowed( INVALID_SIZE ) )
{
- bValidSize = FALSE;
+ bValidSize = sal_False;
if ( IsFlyFrm() )
((SwFlyFrm*)this)->_Invalidate();
else
@@ -1687,7 +1704,7 @@ void SwFrm::ImplInvalidatePrt()
{
if ( _InvalidationAllowed( INVALID_PRTAREA ) )
{
- bValidPrtArea = FALSE;
+ bValidPrtArea = sal_False;
if ( IsFlyFrm() )
((SwFlyFrm*)this)->_Invalidate();
else
@@ -1702,7 +1719,7 @@ void SwFrm::ImplInvalidatePos()
{
if ( _InvalidationAllowed( INVALID_POS ) )
{
- bValidPos = FALSE;
+ bValidPos = sal_False;
if ( IsFlyFrm() )
{
((SwFlyFrm*)this)->_Invalidate();
@@ -1721,7 +1738,7 @@ void SwFrm::ImplInvalidateLineNum()
{
if ( _InvalidationAllowed( INVALID_LINENUM ) )
{
- bValidLineNum = FALSE;
+ bValidLineNum = sal_False;
OSL_ENSURE( IsTxtFrm(), "line numbers are implemented for text only" );
InvalidatePage();
@@ -1741,7 +1758,7 @@ void SwFrm::ReinitializeFrmSizeAttrFlags()
if ( ATT_VAR_SIZE == rFmtSize.GetHeightSizeType() ||
ATT_MIN_SIZE == rFmtSize.GetHeightSizeType())
{
- bFixSize = FALSE;
+ bFixSize = sal_False;
if ( GetType() & (FRM_HEADER | FRM_FOOTER | FRM_ROW) )
{
SwFrm *pFrm = ((SwLayoutFrm*)this)->Lower();
@@ -1780,7 +1797,7 @@ void SwFrm::ReinitializeFrmSizeAttrFlags()
*
* FME 2007-08-30 #i81146# new loop control
|*************************************************************************/
-void SwFrm::ValidateThisAndAllLowers( const USHORT nStage )
+void SwFrm::ValidateThisAndAllLowers( const sal_uInt16 nStage )
{
// Stage 0: Only validate frames. Do not process any objects.
// Stage 1: Only validate fly frames and all of their contents.
@@ -1791,9 +1808,9 @@ void SwFrm::ValidateThisAndAllLowers( const USHORT nStage )
if ( !bOnlyObject || ISA(SwFlyFrm) )
{
- bValidSize = TRUE;
- bValidPrtArea = TRUE;
- bValidPos = TRUE;
+ bValidSize = sal_True;
+ bValidPrtArea = sal_True;
+ bValidPos = sal_True;
}
if ( bIncludeObjects )
@@ -1829,7 +1846,7 @@ void SwFrm::ValidateThisAndAllLowers( const USHORT nStage )
|* SwCntntFrm::GrowFrm()
|*
|*************************************************************************/
-SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
SWRECTFN( this )
@@ -1838,14 +1855,15 @@ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
nDist > (LONG_MAX - nFrmHeight ) )
nDist = LONG_MAX - nFrmHeight;
- const BOOL bBrowse = GetUpper()->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
- const USHORT nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse mit Body
+ const sal_Bool bBrowse = GetUpper()->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_uInt16 nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse mit Body
if( !(GetUpper()->GetType() & nTmpType) && GetUpper()->HasFixSize() )
{
if ( !bTst )
{
(Frm().*fnRect->fnSetHeight)( nFrmHeight + nDist );
- if( IsVertical() && !IsReverse() )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsVertical() && !IsVertLR() && !IsReverse() )
Frm().Pos().X() -= nDist;
if ( GetNext() )
{
@@ -1877,7 +1895,8 @@ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
//Cntnts werden immer auf den gewuenschten Wert gebracht.
long nOld = (Frm().*fnRect->fnGetHeight)();
(Frm().*fnRect->fnSetHeight)( nOld + nDist );
- if( IsVertical() && !IsReverse() )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsVertical()&& !IsVertLR() && !IsReverse() )
Frm().Pos().X() -= nDist;
if ( nOld && IsInTab() )
{
@@ -1938,7 +1957,7 @@ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
|* SwCntntFrm::ShrinkFrm()
|*
|*************************************************************************/
-SwTwips SwCntntFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwCntntFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
SWRECTFN( this )
OSL_ENSURE( nDist >= 0, "nDist < 0" );
@@ -1970,7 +1989,8 @@ SwTwips SwCntntFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
else
nRstHeight = nDist;
(Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() - nDist );
- if( IsVertical() )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsVertical() && !IsVertLR() )
Frm().Pos().X() += nDist;
nDist = nRstHeight;
if ( IsInTab() )
@@ -2008,7 +2028,7 @@ SwTwips SwCntntFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
const SwSortedObjs* pSorted = pPage ? pPage->GetSortedObjs() : 0;
if( pSorted )
{
- for ( USHORT i = 0; i < pSorted->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pSorted->Count(); ++i )
{
const SwAnchoredObject* pAnchoredObj = (*pSorted)[i];
const SwRect aBound( pAnchoredObj->GetObjRectWithSpaces() );
@@ -2059,7 +2079,7 @@ SwTwips SwCntntFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
|*************************************************************************/
void SwCntntFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
{
- BYTE nInvFlags = 0;
+ sal_uInt8 nInvFlags = 0;
if( pNew && RES_ATTRSET_CHG == pNew->Which() )
{
@@ -2067,7 +2087,7 @@ void SwCntntFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
SfxItemIter aOIter( *((SwAttrSetChg*)pOld)->GetChgSet() );
SwAttrSetChg aOldSet( *(SwAttrSetChg*)pOld );
SwAttrSetChg aNewSet( *(SwAttrSetChg*)pNew );
- while( TRUE )
+ while( sal_True )
{
_UpdateAttr( (SfxPoolItem*)aOIter.GetCurItem(),
(SfxPoolItem*)aNIter.GetCurItem(), nInvFlags,
@@ -2131,11 +2151,11 @@ void SwCntntFrm::Modify( SfxPoolItem * pOld, SfxPoolItem * pNew )
}
void SwCntntFrm::_UpdateAttr( SfxPoolItem* pOld, SfxPoolItem* pNew,
- BYTE &rInvFlags,
+ sal_uInt8 &rInvFlags,
SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet )
{
- BOOL bClear = TRUE;
- USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_Bool bClear = sal_True;
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
switch ( nWhich )
{
case RES_FMT_CHG:
@@ -2150,7 +2170,7 @@ void SwCntntFrm::_UpdateAttr( SfxPoolItem* pOld, SfxPoolItem* pNew,
if ( !GetPrev() )
CheckPageDescs( pPage );
if ( pPage && GetAttrSet()->GetPageDesc().GetNumOffset() )
- ((SwRootFrm*)pPage->GetUpper())->SetVirtPageNum( TRUE );
+ ((SwRootFrm*)pPage->GetUpper())->SetVirtPageNum( sal_True );
SwDocPosUpdate aMsgHnt( pPage->Frm().Top() );
pPage->GetFmt()->GetDoc()->UpdatePageFlds( &aMsgHnt );
}
@@ -2265,7 +2285,7 @@ void SwCntntFrm::_UpdateAttr( SfxPoolItem* pOld, SfxPoolItem* pNew,
/* no break here */
default:
- bClear = FALSE;
+ bClear = sal_False;
}
if ( bClear )
{
@@ -2292,7 +2312,7 @@ SwLayoutFrm::SwLayoutFrm( SwFrmFmt* pFmt ):
{
const SwFmtFrmSize &rFmtSize = pFmt->GetFrmSize();
if ( rFmtSize.GetHeightSizeType() == ATT_FIX_SIZE )
- bFixSize = TRUE;
+ bFixSize = sal_True;
}
// --> OD 2004-06-29 #i28701#
@@ -2345,10 +2365,10 @@ SwTwips SwLayoutFrm::InnerHeight() const
|* SwLayoutFrm::GrowFrm()
|*
|*************************************************************************/
-SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
- const BOOL bBrowse = GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
- const USHORT nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse mit Body
+ const sal_Bool bBrowse = GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_uInt16 nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse mit Body
if( !(GetType() & nTmpType) && HasFixSize() )
return 0;
@@ -2375,11 +2395,12 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
SwRect aOldFrm( Frm() );
sal_Bool bMoveAccFrm = sal_False;
- BOOL bChgPos = IsVertical() && !IsReverse();
+ sal_Bool bChgPos = IsVertical() && !IsReverse();
if ( !bTst )
{
(Frm().*fnRect->fnSetHeight)( nFrmHeight + nDist );
- if( bChgPos )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( bChgPos && !IsVertLR() )
Frm().Pos().X() -= nDist;
bMoveAccFrm = sal_True;
}
@@ -2389,7 +2410,7 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
{
if ( GetUpper() )
{ // AdjustNeighbourhood jetzt auch in Spalten (aber nicht in Rahmen)
- BYTE nAdjust = GetUpper()->IsFtnBossFrm() ?
+ sal_uInt8 nAdjust = GetUpper()->IsFtnBossFrm() ?
((SwFtnBossFrm*)GetUpper())->NeighbourhoodAdjustment( this )
: NA_GROW_SHRINK;
if( NA_ONLY_ADJUST == nAdjust )
@@ -2460,7 +2481,8 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
( !IsCellFrm() || static_cast<SwCellFrm*>(this)->GetLayoutRowSpan() > 1 ) )
{
(Frm().*fnRect->fnSetHeight)( nFrmHeight + nReal );
- if( bChgPos )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( bChgPos && !IsVertLR() )
Frm().Pos().X() = nFrmPos - nReal;
bMoveAccFrm = sal_True;
}
@@ -2508,10 +2530,10 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
|* SwLayoutFrm::ShrinkFrm()
|*
|*************************************************************************/
-SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
+SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo )
{
- const BOOL bBrowse = GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
- const USHORT nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse mit Body
+ const sal_Bool bBrowse = GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_uInt16 nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse mit Body
if( !(GetType() & nTmpType) && HasFixSize() )
return 0;
@@ -2522,7 +2544,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
nDist = nFrmHeight;
SwTwips nMin = 0;
- BOOL bChgPos = IsVertical() && !IsReverse();
+ sal_Bool bChgPos = IsVertical() && !IsReverse();
if ( Lower() )
{
if( !Lower()->IsNeighbourFrm() )
@@ -2548,12 +2570,13 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
if ( !bTst )
{
(Frm().*fnRect->fnSetHeight)( nFrmHeight - nReal );
- if( bChgPos )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( bChgPos && !IsVertLR() )
Frm().Pos().X() += nReal;
bMoveAccFrm = sal_True;
}
- BYTE nAdjust = GetUpper() && GetUpper()->IsFtnBossFrm() ?
+ sal_uInt8 nAdjust = GetUpper() && GetUpper()->IsFtnBossFrm() ?
((SwFtnBossFrm*)GetUpper())->NeighbourhoodAdjustment( this )
: NA_GROW_SHRINK;
@@ -2569,7 +2592,8 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
{
(Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)()
+ nRealDist - nReal );
- if( bChgPos )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( bChgPos && !IsVertLR() )
Frm().Pos().X() += nRealDist - nReal;
OSL_ENSURE( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" );
}
@@ -2582,7 +2606,8 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
{
(Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)()
+ nReal - nTmp );
- if( bChgPos )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( bChgPos && !IsVertLR() )
Frm().Pos().X() += nTmp - nReal;
OSL_ENSURE( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" );
nReal = nTmp;
@@ -2662,7 +2687,7 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
{ // Wenn wir sowieso schon in einer anderen Spalte/Seite sitzen
// als der Frame mit der Referenz, dann brauchen wir nicht
// auch noch seinen Master zu invalidieren.
- SwFrm *pTmp = pCnt->FindFtnBossFrm(TRUE) == FindFtnBossFrm(TRUE)
+ SwFrm *pTmp = pCnt->FindFtnBossFrm(sal_True) == FindFtnBossFrm(sal_True)
? pCnt->FindMaster()->GetFrm() : pCnt;
pTmp->Prepare( PREP_ADJUST_FRM );
pTmp->InvalidateSize();
@@ -2728,7 +2753,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
pLowerFrm = pLowerFrm->GetNext();
else
break;
- } while( TRUE );
+ } while( sal_True );
// If found last lower is a section frame containing no section
// (section frame isn't valid and will be deleted in the future),
// travel backwards.
@@ -2741,7 +2766,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
// contains invalid section frames.
if( pLowerFrm->IsSctFrm() )
pLowerFrm = ((SwSectionFrm*)pLowerFrm)->GetSection() &&
- !((SwSectionFrm*)pLowerFrm)->ToMaximize( FALSE ) ?
+ !((SwSectionFrm*)pLowerFrm)->ToMaximize( sal_False ) ?
((SwSectionFrm*)pLowerFrm)->FindLastCntnt() : NULL;
// continue with found last lower, probably the last content of a section
@@ -2772,7 +2797,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
pLowerFrm->InvalidatePage( pPage );
if( !pLowerFrm->IsFlowFrm() ||
!SwFlowFrm::CastFlowFrm( pLowerFrm )->HasFollow() )
- pLowerFrm->InvalidateNextPos( TRUE );
+ pLowerFrm->InvalidateNextPos( sal_True );
if ( pLowerFrm->IsTxtFrm() )
((SwCntntFrm*)pLowerFrm)->Prepare( PREP_ADJUST_FRM );
}
@@ -2853,7 +2878,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
// In vertical layout these are neighbour frames (cell and column frames),
// header frames and footer frames.
// In horizontal layout these are all frames, which aren't neighbour frames.
- const USHORT nFixWidth = bVert ? (FRM_NEIGHBOUR | FRM_HEADFOOT)
+ const sal_uInt16 nFixWidth = bVert ? (FRM_NEIGHBOUR | FRM_HEADFOOT)
: ~FRM_NEIGHBOUR;
// Declare const unsigned short <nFixHeight> and init it this frame types
@@ -2861,7 +2886,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
// In vertical layout these are all frames, which aren't neighbour frames,
// header frames, footer frames, body frames or foot note container frames.
// In horizontal layout these are neighbour frames.
- const USHORT nFixHeight= bVert ? ~(FRM_NEIGHBOUR | FRM_HEADFOOT | FRM_BODYFTNC)
+ const sal_uInt16 nFixHeight= bVert ? ~(FRM_NEIGHBOUR | FRM_HEADFOOT | FRM_BODYFTNC)
: FRM_NEIGHBOUR;
// Travel through all lowers using <GetNext()>
@@ -2879,7 +2904,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
{
// If lower isn't a table, row, cell or section frame, adjust its
// frame size.
- const USHORT nLowerType = pLowerFrm->GetType();
+ const sal_uInt16 nLowerType = pLowerFrm->GetType();
if ( !(nLowerType & (FRM_TAB|FRM_ROW|FRM_CELL|FRM_SECTION)) )
{
if ( bWidthChgd )
@@ -3056,7 +3081,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
// Finally adjust the columns if width is set to auto
// Possible optimisation: execute this code earlier in this function and
// return???
- if ( ( (bVert && bHeightChgd) || (!bVert && bWidthChgd) ) &&
+ if ( ( (bVert && bHeightChgd) || (! bVert && bWidthChgd) ) &&
Lower()->IsColumnFrm() )
{
// get column attribute
@@ -3092,16 +3117,17 @@ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs )
if ( bValidPrtArea && bValidSize )
return;
- const USHORT nLeft = (USHORT)pAttrs->CalcLeft( this );
- const USHORT nUpper = pAttrs->CalcTop();
+ const sal_uInt16 nLeft = (sal_uInt16)pAttrs->CalcLeft( this );
+ const sal_uInt16 nUpper = pAttrs->CalcTop();
- const USHORT nRight = (USHORT)((SwBorderAttrs*)pAttrs)->CalcRight( this );
- const USHORT nLower = pAttrs->CalcBottom();
- BOOL bVert = IsVertical() && !IsPageFrm();
- SwRectFn fnRect = bVert ? fnRectVert : fnRectHori;
+ const sal_uInt16 nRight = (sal_uInt16)((SwBorderAttrs*)pAttrs)->CalcRight( this );
+ const sal_uInt16 nLower = pAttrs->CalcBottom();
+ sal_Bool bVert = IsVertical() && !IsPageFrm();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
if ( !bValidPrtArea )
{
- bValidPrtArea = TRUE;
+ bValidPrtArea = sal_True;
(this->*fnRect->fnSetXMargins)( nLeft, nRight );
(this->*fnRect->fnSetYMargins)( nUpper, nLower );
}
@@ -3114,7 +3140,7 @@ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs )
const SwFmtFrmSize &rSz = GetFmt()->GetFrmSize();
SwTwips nMinHeight = rSz.GetHeightSizeType() == ATT_MIN_SIZE ? rSz.GetHeight() : 0;
do
- { bValidSize = TRUE;
+ { bValidSize = sal_True;
//Die Groesse in der VarSize wird durch den Inhalt plus den
//Raendern bestimmt.
@@ -3151,7 +3177,7 @@ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs )
if( (this->*fnRect->fnSetLimit)( nLimit ) &&
nOldLeft == (Frm().*fnRect->fnGetLeft)() &&
nOldTop == (Frm().*fnRect->fnGetTop)() )
- bValidSize = bValidPrtArea = TRUE;
+ bValidSize = bValidPrtArea = sal_True;
}
} while ( !bValidSize );
}
@@ -3160,12 +3186,12 @@ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs )
do
{ if ( Frm().Height() != pAttrs->GetSize().Height() )
ChgSize( Size( Frm().Width(), pAttrs->GetSize().Height()));
- bValidSize = TRUE;
+ bValidSize = sal_True;
MakePos();
} while ( !bValidSize );
}
else
- bValidSize = TRUE;
+ bValidSize = sal_True;
}
}
@@ -3177,7 +3203,7 @@ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs )
static void InvaPercentFlys( SwFrm *pFrm, SwTwips nDiff )
{
OSL_ENSURE( pFrm->GetDrawObjs(), "Can't find any Objects" );
- for ( USHORT i = 0; i < pFrm->GetDrawObjs()->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pFrm->GetDrawObjs()->Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
@@ -3186,7 +3212,7 @@ static void InvaPercentFlys( SwFrm *pFrm, SwTwips nDiff )
const SwFmtFrmSize &rSz = pFly->GetFmt()->GetFrmSize();
if ( rSz.GetWidthPercent() || rSz.GetHeightPercent() )
{
- BOOL bNotify = TRUE;
+ sal_Bool bNotify = sal_True;
// If we've a fly with more than 90% relative height...
if( rSz.GetHeightPercent() > 90 && pFly->GetAnchorFrm() &&
rSz.GetHeightPercent() != 0xFF && nDiff )
@@ -3201,7 +3227,7 @@ static void InvaPercentFlys( SwFrm *pFrm, SwTwips nDiff )
( nDiff + pRel->Prt().Height() )*9 &&
pFly->GetFmt()->GetSurround().GetSurround() !=
SURROUND_THROUGHT )
- bNotify = FALSE;
+ bNotify = sal_False;
}
if( bNotify )
pFly->InvalidateSize();
@@ -3244,7 +3270,7 @@ void SwLayoutFrm::InvaPercentLowers( SwTwips nDiff )
|* SwLayoutFrm::CalcRel()
|*
|*************************************************************************/
-long SwLayoutFrm::CalcRel( const SwFmtFrmSize &rSz, BOOL ) const
+long SwLayoutFrm::CalcRel( const SwFmtFrmSize &rSz, sal_Bool ) const
{
long nRet = rSz.GetWidth(),
nPercent = rSz.GetWidthPercent();
@@ -3303,7 +3329,7 @@ long MA_FASTCALL lcl_CalcMinColDiff( SwLayoutFrm *pLayFrm )
return nDiff ? nDiff : nFirstDiff ? nFirstDiff : 240;
}
-BOOL lcl_IsFlyHeightClipped( SwLayoutFrm *pLay )
+sal_Bool lcl_IsFlyHeightClipped( SwLayoutFrm *pLay )
{
SwFrm *pFrm = pLay->ContainsCntnt();
while ( pFrm )
@@ -3314,7 +3340,7 @@ BOOL lcl_IsFlyHeightClipped( SwLayoutFrm *pLay )
if ( pFrm->GetDrawObjs() )
{
sal_uInt32 nCnt = pFrm->GetDrawObjs()->Count();
- for ( USHORT i = 0; i < nCnt; ++i )
+ for ( sal_uInt16 i = 0; i < nCnt; ++i )
{
SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
@@ -3322,13 +3348,13 @@ BOOL lcl_IsFlyHeightClipped( SwLayoutFrm *pLay )
SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
if ( pFly->IsHeightClipped() &&
( !pFly->IsFlyFreeFrm() || pFly->GetPageFrm() ) )
- return TRUE;
+ return sal_True;
}
}
}
pFrm = pFrm->FindNextCnt();
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -3353,10 +3379,10 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
//3. Weiter mit 1. bis zur Stabilitaet.
const SwFmtCol &rCol = rAttrs.GetAttrSet().GetCol();
- const USHORT nNumCols = rCol.GetNumCols();
+ const sal_uInt16 nNumCols = rCol.GetNumCols();
- BOOL bEnd = FALSE;
- BOOL bBackLock = FALSE;
+ sal_Bool bEnd = sal_False;
+ sal_Bool bBackLock = sal_False;
SwViewImp *pImp = GetShell() ? GetShell()->Imp() : 0;
{
// Zugrunde liegender Algorithmus
@@ -3390,14 +3416,14 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
long nMinimum = nMinHeight;
long nMaximum;
- BOOL bNoBalance = FALSE;
+ sal_Bool bNoBalance = sal_False;
SWRECTFN( this )
if( IsSctFrm() )
{
nMaximum = (Frm().*fnRect->fnGetHeight)() - nBorder +
(Frm().*fnRect->fnBottomDist)(
(GetUpper()->*fnRect->fnGetPrtBottom)() );
- nMaximum += GetUpper()->Grow( LONG_MAX, TRUE );
+ nMaximum += GetUpper()->Grow( LONG_MAX, sal_True );
if( nMaximum < nMinimum )
{
if( nMaximum < 0 )
@@ -3432,8 +3458,8 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
SwFrm* pFtnAny = pFtnCont->ContainsAny();
if( pFtnAny && pFtnAny->IsValid() )
{
- bBackLock = TRUE;
- ((SwSectionFrm*)this)->SetFtnLock( TRUE );
+ bBackLock = sal_True;
+ ((SwSectionFrm*)this)->SetFtnLock( sal_True );
}
}
}
@@ -3465,7 +3491,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
if ( pImp )
pImp->CheckWaitCrsr();
- bValidSize = TRUE;
+ bValidSize = sal_True;
//Erstmal die Spalten formatieren, das entlastet den
//Stack ein wenig.
//Bei der Gelegenheit stellen wir auch gleich mal die
@@ -3478,7 +3504,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
AdjustColumns( &rCol, sal_False );
// <--
- for ( USHORT i = 0; i < nNumCols; ++i )
+ for ( sal_uInt16 i = 0; i < nNumCols; ++i )
{
pCol->Calc();
// ColumnFrms besitzen jetzt einen BodyFrm, der auch kalkuliert werden will
@@ -3493,7 +3519,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
pCol = (SwLayoutFrm*)Lower();
OSL_ENSURE( pCol && pCol->GetNext(), ":-( Spalten auf Urlaub?");
// bMinDiff wird gesetzt, wenn es keine leere Spalte gibt
- BOOL bMinDiff = TRUE;
+ sal_Bool bMinDiff = sal_True;
// OD 28.03.2003 #108446# - check for all column content and all columns
while ( bMinDiff && pCol )
{
@@ -3507,7 +3533,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
SwTwips nMaxFree = 0;
SwTwips nAllFree = LONG_MAX;
// bFoundLower wird gesetzt, wenn es mind. eine nichtleere Spalte gibt
- BOOL bFoundLower = FALSE;
+ sal_Bool bFoundLower = sal_False;
while( pCol )
{
SwLayoutFrm* pLay = (SwLayoutFrm*)pCol->Lower();
@@ -3515,7 +3541,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
(pLay->Prt().*fnRect->fnGetHeight)();
if( pLay->Lower() )
{
- bFoundLower = TRUE;
+ bFoundLower = sal_True;
nInnerHeight += pLay->InnerHeight();
}
else if( nInnerHeight < 0 )
@@ -3523,7 +3549,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
if( pLay->GetNext() )
{
- bFoundLower = TRUE;
+ bFoundLower = sal_True;
pLay = (SwLayoutFrm*)pLay->GetNext();
OSL_ENSURE( pLay->IsFtnContFrm(),"FtnContainer exspected" );
nInnerHeight += pLay->InnerHeight();
@@ -3684,10 +3710,10 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
}
}
else
- bEnd = TRUE;
+ bEnd = sal_True;
}
else
- bEnd = TRUE;
+ bEnd = sal_True;
} while ( !bEnd || !bValidSize );
}
@@ -3696,10 +3722,10 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
::CalcCntnt( this, true );
if( IsSctFrm() )
{
- // OD 14.03.2003 #i11760# - adjust 2nd parameter - TRUE --> true
+ // OD 14.03.2003 #i11760# - adjust 2nd parameter - sal_True --> true
::CalcCntnt( this, true );
if( bBackLock )
- ((SwSectionFrm*)this)->SetFtnLock( FALSE );
+ ((SwSectionFrm*)this)->SetFtnLock( sal_False );
}
}
@@ -3710,7 +3736,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
|*
|*************************************************************************/
-SwCntntFrm* lcl_InvalidateSection( SwFrm *pCnt, BYTE nInv )
+SwCntntFrm* lcl_InvalidateSection( SwFrm *pCnt, sal_uInt8 nInv )
{
SwSectionFrm* pSect = pCnt->FindSctFrm();
// Wenn unser CntntFrm in einer Tabelle oder Fussnote steht, sind nur
@@ -3733,7 +3759,7 @@ SwCntntFrm* lcl_InvalidateSection( SwFrm *pCnt, BYTE nInv )
return pRet;
}
-SwCntntFrm* lcl_InvalidateTable( SwTabFrm *pTable, BYTE nInv )
+SwCntntFrm* lcl_InvalidateTable( SwTabFrm *pTable, sal_uInt8 nInv )
{
if( ( nInv & INV_SECTION ) && pTable->IsInSct() )
lcl_InvalidateSection( pTable, nInv );
@@ -3746,9 +3772,9 @@ SwCntntFrm* lcl_InvalidateTable( SwTabFrm *pTable, BYTE nInv )
return pTable->FindLastCntnt();
}
-void lcl_InvalidateAllCntnt( SwCntntFrm *pCnt, BYTE nInv );
+void lcl_InvalidateAllCntnt( SwCntntFrm *pCnt, sal_uInt8 nInv );
-void lcl_InvalidateCntnt( SwCntntFrm *pCnt, BYTE nInv )
+void lcl_InvalidateCntnt( SwCntntFrm *pCnt, sal_uInt8 nInv )
{
SwCntntFrm *pLastTabCnt = NULL;
SwCntntFrm *pLastSctCnt = NULL;
@@ -3799,7 +3825,7 @@ void lcl_InvalidateCntnt( SwCntntFrm *pCnt, BYTE nInv )
}
if( nInv & INV_SIZE )
- pCnt->Prepare( PREP_CLEAR, 0, FALSE );
+ pCnt->Prepare( PREP_CLEAR, 0, sal_False );
if( nInv & INV_POS )
pCnt->_InvalidatePos();
if( nInv & INV_PRTAREA )
@@ -3812,10 +3838,10 @@ void lcl_InvalidateCntnt( SwCntntFrm *pCnt, BYTE nInv )
}
}
-void lcl_InvalidateAllCntnt( SwCntntFrm *pCnt, BYTE nInv )
+void lcl_InvalidateAllCntnt( SwCntntFrm *pCnt, sal_uInt8 nInv )
{
SwSortedObjs &rObjs = *pCnt->GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
@@ -3831,7 +3857,7 @@ void lcl_InvalidateAllCntnt( SwCntntFrm *pCnt, BYTE nInv )
}
}
-void SwRootFrm::InvalidateAllCntnt( BYTE nInv )
+void SwRootFrm::InvalidateAllCntnt( sal_uInt8 nInv )
{
// Erst werden alle Seitengebundenen FlyFrms abgearbeitet.
SwPageFrm *pPage = (SwPageFrm*)Lower();
@@ -3847,7 +3873,7 @@ void SwRootFrm::InvalidateAllCntnt( BYTE nInv )
if ( pPage->GetSortedObjs() )
{
const SwSortedObjs &rObjs = *pPage->GetSortedObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
if ( pAnchoredObj->ISA(SwFlyFrm) )
diff --git a/sw/source/core/makefile.mk b/sw/source/core/makefile.mk
deleted file mode 100644
index 028d6dc0d58c..000000000000
--- a/sw/source/core/makefile.mk
+++ /dev/null
@@ -1,99 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-PRJNAME=sw
-
-TARGET=core
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(CALLTARGETS)"=="core"
-RC_SUBDIRS=
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-
-SUBLIBS1= \
- $(SLB)$/access.lib \
- $(SLB)$/graphic.lib \
- $(SLB)$/para.lib \
- $(SLB)$/attr.lib \
- $(SLB)$/edit.lib \
- $(SLB)$/crsr.lib \
- $(SLB)$/view.lib
-
-
-SUBLIBS2= \
- $(SLB)$/draw.lib \
- $(SLB)$/sw3io.lib \
- $(SLB)$/swg.lib \
- $(SLB)$/layout.lib \
- $(SLB)$/text.lib \
- $(SLB)$/doc.lib \
- $(SLB)$/txtnode.lib
-
-SUBLIBS3= \
- $(SLB)$/docnode.lib \
- $(SLB)$/unocore.lib \
- $(SLB)$/objectpositioning.lib \
- $(SLB)$/SwNumberTree.lib \
- $(SLB)$/tablecore.lib
-
-SUBLIBS4= \
- $(SLB)$/frmedt.lib \
- $(SLB)$/ole.lib \
- $(SLB)$/fields.lib \
- $(SLB)$/tox.lib \
- $(SLB)$/undo.lib \
- $(SLB)$/bastyp.lib
-#-------------------------------------------------------------------------
-
-LIB1TARGET=$(SLB)$/core1.lib
-LIB1FILES= \
- $(SUBLIBS1)
-
-LIB2TARGET=$(SLB)$/core2.lib
-LIB2FILES= \
- $(SUBLIBS2)
-
-LIB3TARGET=$(SLB)$/core3.lib
-LIB3FILES= \
- $(SUBLIBS3)
-
-LIB4TARGET=$(SLB)$/core4.lib
-LIB4FILES= \
- $(SUBLIBS4)
-
-.INCLUDE : target.mk
-
-#-------------------------------------------------------------------------
diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
index be12cde92712..251bee71213e 100644
--- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
@@ -362,7 +362,12 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos(
break;
case text::VertOrientation::TOP:
{
- nRelPosY += bVert ? _rLRSpacing.GetRight() : _rULSpacing.GetUpper();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ nRelPosY += bVert
+ ? ( bVertL2R
+ ? _rLRSpacing.GetLeft()
+ : _rLRSpacing.GetRight() )
+ : _rULSpacing.GetUpper();
}
break;
case text::VertOrientation::CENTER:
@@ -372,8 +377,13 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos(
break;
case text::VertOrientation::BOTTOM:
{
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
nRelPosY += nAlignAreaHeight -
- ( nObjHeight + ( bVert ? _rLRSpacing.GetLeft() : _rULSpacing.GetLower() ) );
+ ( nObjHeight + ( bVert
+ ? ( bVertL2R
+ ? _rLRSpacing.GetRight()
+ : _rLRSpacing.GetLeft() )
+ : _rULSpacing.GetLower() ) );
}
break;
default:
@@ -395,17 +405,19 @@ SwTwips SwAnchoredObjectPosition::_GetVertRelPos(
#i31805# - add parameter <_bCheckBottom>
#i26945# - add parameter <_bFollowTextFlow>
#i62875# - method now private and renamed.
+ OD 2009-09-01 #mongolianlayout# - add parameter <bVertL2R>
@author OD
*/
-SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips _nTopOfAnch,
- const bool _bVert,
- const SwFrm& _rPageAlignLayFrm,
- const SwTwips _nProposedRelPosY,
- const bool _bFollowTextFlow,
- const bool _bCheckBottom ) const
+SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips nTopOfAnch,
+ const bool bVert,
+ const bool bVertL2R,
+ const SwFrm& rPageAlignLayFrm,
+ const SwTwips nProposedRelPosY,
+ const bool bFollowTextFlow,
+ const bool bCheckBottom ) const
{
- SwTwips nAdjustedRelPosY = _nProposedRelPosY;
+ SwTwips nAdjustedRelPosY = nProposedRelPosY;
const Size aObjSize( GetAnchoredObj().GetObjRect().SSize() );
@@ -422,48 +434,67 @@ SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips _nTopOfAn
// #i26945# - no extension of restricted area, if
// object's attribute follow text flow is set and its inside a table
if ( GetFrmFmt().getIDocumentSettingAccess()->get(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION) &&
- ( !_bFollowTextFlow ||
+ ( !bFollowTextFlow ||
!GetAnchoredObj().GetAnchorFrm()->IsInTab() ) )
{
- aPgAlignArea = _rPageAlignLayFrm.FindPageFrm()->Frm();
+ aPgAlignArea = rPageAlignLayFrm.FindPageFrm()->Frm();
}
else
{
- aPgAlignArea = _rPageAlignLayFrm.Frm();
+ aPgAlignArea = rPageAlignLayFrm.Frm();
}
}
- if ( _bVert )
+ if ( bVert )
{
// #i31805# - consider value of <_bCheckBottom>
- if ( _bCheckBottom &&
- _nTopOfAnch - nAdjustedRelPosY - aObjSize.Width() <
- aPgAlignArea.Left() )
+ if ( !bVertL2R )
+ // <--
{
- nAdjustedRelPosY = aPgAlignArea.Left() +
- _nTopOfAnch -
- aObjSize.Width();
- }
+ if ( bCheckBottom &&
+ nTopOfAnch - nAdjustedRelPosY - aObjSize.Width() <
+ aPgAlignArea.Left() )
+ {
+ nAdjustedRelPosY = aPgAlignArea.Left() +
+ nTopOfAnch -
+ aObjSize.Width();
+ }
// #i32964# - correction
- if ( _nTopOfAnch - nAdjustedRelPosY > aPgAlignArea.Right() )
+ if ( nTopOfAnch - nAdjustedRelPosY > aPgAlignArea.Right() )
+ {
+ nAdjustedRelPosY = nTopOfAnch - aPgAlignArea.Right();
+ }
+ }
+ else
{
- nAdjustedRelPosY = _nTopOfAnch - aPgAlignArea.Right();
+ if ( bCheckBottom &&
+ nTopOfAnch + nAdjustedRelPosY + aObjSize.Width() >
+ aPgAlignArea.Right() )
+ {
+ nAdjustedRelPosY = aPgAlignArea.Right() -
+ nTopOfAnch -
+ aObjSize.Width();
+ }
+ if ( nTopOfAnch + nAdjustedRelPosY < aPgAlignArea.Left() )
+ {
+ nAdjustedRelPosY = aPgAlignArea.Left() - nTopOfAnch;
+ }
}
}
else
{
- // #i31805# - consider value of <_bCheckBottom>
- if ( _bCheckBottom &&
- _nTopOfAnch + nAdjustedRelPosY + aObjSize.Height() >
+ // #i31805# - consider value of <bCheckBottom>
+ if ( bCheckBottom &&
+ nTopOfAnch + nAdjustedRelPosY + aObjSize.Height() >
aPgAlignArea.Top() + aPgAlignArea.Height() )
{
nAdjustedRelPosY = aPgAlignArea.Top() + aPgAlignArea.Height() -
- _nTopOfAnch -
+ nTopOfAnch -
aObjSize.Height();
}
- if ( _nTopOfAnch + nAdjustedRelPosY < aPgAlignArea.Top() )
+ if ( nTopOfAnch + nAdjustedRelPosY < aPgAlignArea.Top() )
{
- nAdjustedRelPosY = aPgAlignArea.Top() - _nTopOfAnch;
+ nAdjustedRelPosY = aPgAlignArea.Top() - nTopOfAnch;
}
}
@@ -892,11 +923,11 @@ SwTwips SwAnchoredObjectPosition::_AdjustHoriRelPosForDrawAside(
}
SwRect aTmpObjRect( aTmpPos, aObjBoundRect.SSize() );
- const UINT32 nObjOrdNum = GetObject().GetOrdNum();
+ const sal_uInt32 nObjOrdNum = GetObject().GetOrdNum();
const SwPageFrm* pObjPage = rFlyAtCntFrm.FindPageFrm();
const SwFrm* pObjContext = ::FindKontext( &rAnchorTxtFrm, FRM_COLUMN );
- ULONG nObjIndex = rAnchorTxtFrm.GetTxtNode()->GetIndex();
- SwOrderIter aIter( pObjPage, TRUE );
+ sal_uLong nObjIndex = rAnchorTxtFrm.GetTxtNode()->GetIndex();
+ SwOrderIter aIter( pObjPage, sal_True );
const SwFlyFrm* pFly = ((SwVirtFlyDrawObj*)aIter.Bottom())->GetFlyFrm();
while ( pFly && nObjOrdNum > pFly->GetVirtDrawObj()->GetOrdNumDirect() )
{
@@ -992,7 +1023,7 @@ SwTwips SwAnchoredObjectPosition::_AdjustHoriRelPosForDrawAside(
bool SwAnchoredObjectPosition::_DrawAsideFly( const SwFlyFrm* _pFly,
const SwRect& _rObjRect,
const SwFrm* _pObjContext,
- const ULONG _nObjIndex,
+ const sal_uLong _nObjIndex,
const bool _bEvenPage,
const sal_Int16 _eHoriOrient,
const sal_Int16 _eRelOrient
@@ -1007,7 +1038,7 @@ bool SwAnchoredObjectPosition::_DrawAsideFly( const SwFlyFrm* _pFly,
(_rObjRect.*fnRect->fnBottomDist)( (_pFly->Frm().*fnRect->fnGetTop)() ) < 0 &&
::FindKontext( _pFly->GetAnchorFrm(), FRM_COLUMN ) == _pObjContext )
{
- ULONG nOtherIndex =
+ sal_uLong nOtherIndex =
static_cast<const SwTxtFrm*>(_pFly->GetAnchorFrm())->GetTxtNode()->GetIndex();
if( _nObjIndex >= nOtherIndex )
{
@@ -1050,11 +1081,11 @@ bool SwAnchoredObjectPosition::_Minor( sal_Int16 _eRelOrient1,
// draw aside order for left horizontal position
//! one array entry for each value in text::RelOrientation
- static USHORT const aLeft[ 10 ] =
+ static sal_uInt16 const aLeft[ 10 ] =
{ 5, 6, 0, 1, 8, 4, 7, 2, 3, 9 };
// draw aside order for right horizontal position
//! one array entry for each value in text::RelOrientation
- static USHORT const aRight[ 10 ] =
+ static sal_uInt16 const aRight[ 10 ] =
{ 5, 6, 0, 8, 1, 7, 4, 2, 3, 9 };
// decide depending on given order, which frame has to draw aside another frame
diff --git a/sw/source/core/objectpositioning/makefile.mk b/sw/source/core/objectpositioning/makefile.mk
deleted file mode 100644
index 59d5e0201f0e..000000000000
--- a/sw/source/core/objectpositioning/makefile.mk
+++ /dev/null
@@ -1,62 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=objectpositioning
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(mydebug)" != ""
-CDEFS+=-Dmydebug
-.ENDIF
-
-.IF "$(madebug)" != ""
-CDEFS+=-DDEBUG
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/ascharanchoredobjectposition.obj \
- $(SLO)$/environmentofanchoredobject.obj \
- $(SLO)$/tolayoutanchoredobjectposition.obj
-
-EXCEPTIONSFILES = \
- $(SLO)$/anchoredobjectposition.obj \
- $(SLO)$/tocntntanchoredobjectposition.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
index 4711b70b8cbb..b4102c073e70 100644
--- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
@@ -119,13 +119,13 @@ bool lcl_DoesVertPosFits( const SwTwips _nRelPosY,
{
SwSectionFrm* pSctFrm =
const_cast<SwSectionFrm*>(_pUpperOfOrientFrm->FindSctFrm());
- bVertPosFits = pSctFrm->GetUpper()->Grow( _nRelPosY - _nAvail, TRUE ) > 0;
+ bVertPosFits = pSctFrm->GetUpper()->Grow( _nRelPosY - _nAvail, sal_True ) > 0;
// Note: do not provide a layout frame for a grow.
}
else
{
bVertPosFits = const_cast<SwLayoutFrm*>(_pUpperOfOrientFrm)->
- Grow( _nRelPosY - _nAvail, TRUE ) > 0;
+ Grow( _nRelPosY - _nAvail, sal_True ) > 0;
if ( bVertPosFits )
_orpLayoutFrmToGrow = const_cast<SwLayoutFrm*>(_pUpperOfOrientFrm);
}
@@ -135,7 +135,7 @@ bool lcl_DoesVertPosFits( const SwTwips _nRelPosY,
// #i45085# - check, if upper frame would grow the
// excepted amount of twips.
const SwTwips nTwipsGrown = const_cast<SwLayoutFrm*>(_pUpperOfOrientFrm)->
- Grow( _nRelPosY - _nAvail, TRUE ) > 0;
+ Grow( _nRelPosY - _nAvail, sal_True ) > 0;
bVertPosFits = ( nTwipsGrown == ( _nRelPosY - _nAvail ) );
if ( bVertPosFits )
_orpLayoutFrmToGrow = const_cast<SwLayoutFrm*>(_pUpperOfOrientFrm);
@@ -263,9 +263,20 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
// determine relative vertical position
SwTwips nRelPosY = nAlignAreaOffset;
- SwTwips nObjHeight = (aObjBoundRect.*fnRect->fnGetHeight)();
- SwTwips nUpperSpace = bVert ? rLR.GetRight() : rUL.GetUpper();
- SwTwips nLowerSpace = bVert ? rLR.GetLeft() : rUL.GetLower();
+ const SwTwips nObjHeight = (aObjBoundRect.*fnRect->fnGetHeight)();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ const SwTwips nUpperSpace = bVert
+ ? ( bVertL2R
+ ? rLR.GetLeft()
+ : rLR.GetRight() )
+ : rUL.GetUpper();
+ // --> OD 2009-08-31 #monglianlayout#
+ const SwTwips nLowerSpace = bVert
+ ? ( bVertL2R
+ ? rLR.GetLeft()
+ : rLR.GetRight() )
+ : rUL.GetLower();
+ // <--
switch ( aVert.GetVertOrient() )
{
case text::VertOrientation::CHAR_BOTTOM:
@@ -274,8 +285,11 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
{
// bottom (to character anchored)
nRelPosY += nAlignAreaHeight + nUpperSpace;
- if ( bVert )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( bVert && !bVertL2R )
+ {
nRelPosY += nObjHeight;
+ }
break;
}
}
@@ -394,7 +408,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
aEnvOfObj.GetVertEnvironmentLayoutFrm(
*(pOrientFrm->GetUpper()) );
const bool bCheckBottom = !DoesObjFollowsTextFlow();
- nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert,
+ nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, bVertL2R,
rVertEnvironLayFrm, nRelPosY,
DoesObjFollowsTextFlow(),
bCheckBottom );
@@ -574,7 +588,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
// anchored object would fit into environment layout frame, if
// anchored object has to follow the text flow.
const bool bCheckBottom = !DoesObjFollowsTextFlow();
- nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert,
+ nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, bVertL2R,
rVertEnvironLayFrm, nRelPosY,
DoesObjFollowsTextFlow(),
bCheckBottom );
@@ -614,7 +628,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
// anchored object would fit into environment layout
// frame, if anchored object has to follow the text flow.
const bool bCheckBottom = !DoesObjFollowsTextFlow();
- nTmpRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert,
+ nTmpRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, bVertL2R,
rVertEnvironLayFrm,
nTmpRelPosY,
DoesObjFollowsTextFlow(),
@@ -655,7 +669,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
eMakePage = MAKEPAGE_NOSECTION;
const SwLayoutFrm* pTmp =
- pUpperOfOrientFrm->GetLeaf( eMakePage, TRUE, &rAnchorTxtFrm );
+ pUpperOfOrientFrm->GetLeaf( eMakePage, sal_True, &rAnchorTxtFrm );
if ( pTmp &&
( !bInSct ||
pUpperOfOrientFrm->FindSctFrm()->IsAnFollow( pTmp->FindSctFrm() ) ) )
@@ -701,7 +715,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
// align at 'page areas', but stay inside given environment
const SwFrm& rVertEnvironLayFrm =
aEnvOfObj.GetVertEnvironmentLayoutFrm( *pUpperOfOrientFrm );
- nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert,
+ nRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, bVertL2R,
rVertEnvironLayFrm,
nRelPosY,
DoesObjFollowsTextFlow() );
@@ -722,9 +736,19 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
const SwTwips nTopOfAnch = _GetTopForObjPos( *pAnchorFrmForVertPos, fnRect, bVert );
if( bVert )
{
- GetAnchoredObj().SetObjLeft( nTopOfAnch -
- ( aRelPos.X() - nRelDiff ) -
- aObjBoundRect.Width() );
+ // --> OD 2009-08-31 #monglianlayout#
+ if ( !bVertL2R )
+ {
+ GetAnchoredObj().SetObjLeft( nTopOfAnch -
+ ( aRelPos.X() - nRelDiff ) -
+ aObjBoundRect.Width() );
+ }
+ else
+ {
+ GetAnchoredObj().SetObjLeft( nTopOfAnch +
+ ( aRelPos.X() - nRelDiff ) );
+ }
+ // <--
}
else
{
@@ -804,7 +828,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
!pOrientFrm->GetIndPrev() )
{
const_cast<SwTabFrm*>(pOrientFrm->FindTabFrm())
- ->SetDoesObjsFit( FALSE );
+ ->SetDoesObjsFit( sal_False );
}
else
{
@@ -815,7 +839,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
nTmpRelPosY = aRelPos.Y() + nDist;
const SwLayoutFrm& rVertEnvironLayFrm =
aEnvOfObj.GetVertEnvironmentLayoutFrm( *pUpperOfOrientFrm );
- nTmpRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert,
+ nTmpRelPosY = _AdjustVertRelPos( nTopOfAnch, bVert, bVertL2R,
rVertEnvironLayFrm,
nTmpRelPosY,
DoesObjFollowsTextFlow(),
@@ -823,9 +847,18 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
if ( bVert )
{
aRelPos.X() = nTmpRelPosY;
- GetAnchoredObj().SetObjLeft( nTopOfAnch -
- aRelPos.X() -
- aObjBoundRect.Width() );
+ // --> OD 2009-08-31 #mongolianlayout#
+ if ( !bVertL2R )
+ {
+ GetAnchoredObj().SetObjLeft( nTopOfAnch -
+ aRelPos.X() -
+ aObjBoundRect.Width() );
+ }
+ else
+ {
+ GetAnchoredObj().SetObjLeft( nTopOfAnch + aRelPos.X() );
+ }
+ // <--
}
else
{
@@ -841,7 +874,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
pOrientFrm == &rAnchorTxtFrm && !pOrientFrm->GetIndPrev() )
{
const_cast<SwTabFrm*>(pOrientFrm->FindTabFrm())
- ->SetDoesObjsFit( FALSE );
+ ->SetDoesObjsFit( sal_False );
}
}
}
@@ -877,7 +910,7 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
( bInSct
? MAKEPAGE_NOSECTION
: ( bInFtn ? MAKEPAGE_NONE : MAKEPAGE_APPEND ) ),
- TRUE, &rAnchorTxtFrm );
+ sal_True, &rAnchorTxtFrm );
// correction:
// If anchor is in footnote and proposed next layout environment
// isn't a footnote frame, object can't follow the text flow
@@ -903,9 +936,21 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
SWREFRESHFN( pUpperOfOrientFrm )
bMoveable = rAnchorTxtFrm.IsMoveable( (SwLayoutFrm*)pUpperOfOrientFrm );
if( bVertX )
- GetAnchoredObj().SetObjLeft( nTopOfAnch -
- aRelPos.X() -
- aObjBoundRect.Width() );
+ {
+ // --> OD 2009-08-31 #mongolianlayout#
+ if ( !bVertL2R )
+ {
+ GetAnchoredObj().SetObjLeft( nTopOfAnch -
+ aRelPos.X() -
+ aObjBoundRect.Width() );
+ }
+ else
+ {
+ GetAnchoredObj().SetObjLeft( nTopOfAnch +
+ aRelPos.X() );
+ }
+ // <--
+ }
else
GetAnchoredObj().SetObjTop( nTopOfAnch +
aRelPos.Y() );
@@ -956,8 +1001,19 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
// frame, the horizontal position is oriented at.
const SwTwips nTopOfAnch = _GetTopForObjPos( *pAnchorFrmForVertPos, fnRect, bVert );
if( bVert )
- GetAnchoredObj().SetObjLeft( nTopOfAnch -
- aRelPos.X() - aObjBoundRect.Width() );
+ {
+ // --> OD 2009-08-31 #mongolianlayout#
+ if ( !bVertL2R )
+ {
+ GetAnchoredObj().SetObjLeft( nTopOfAnch -
+ aRelPos.X() - aObjBoundRect.Width() );
+ }
+ else
+ {
+ GetAnchoredObj().SetObjLeft( nTopOfAnch + aRelPos.X() );
+ }
+ // <--
+ }
else
GetAnchoredObj().SetObjTop( nTopOfAnch + aRelPos.Y() );
@@ -1007,8 +1063,17 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
const SwTwips nTopOfAnch = _GetTopForObjPos( *pAnchorFrmForVertPos, fnRect, bVert );
if( bVert )
{
- GetAnchoredObj().SetObjLeft( nTopOfAnch -
- aRelPos.X() - aObjBoundRect.Width() );
+ // --> OD 2009-08-31 #mongolianlayout#
+ if ( !bVertL2R )
+ {
+ GetAnchoredObj().SetObjLeft( nTopOfAnch -
+ aRelPos.X() - aObjBoundRect.Width() );
+ }
+ else
+ {
+ GetAnchoredObj().SetObjLeft( nTopOfAnch + aRelPos.X() );
+ }
+ // <--
GetAnchoredObj().SetObjTop( rAnchorTxtFrm.Frm().Top() +
aRelPos.Y() );
}
diff --git a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
index 69f457f3d44d..9e3317db6a25 100644
--- a/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx
@@ -119,7 +119,11 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition()
if( bVert )
{
OSL_ENSURE( !bRev, "<SwToLayoutAnchoredObjectPosition::CalcPosition()> - reverse layout set." );
- aRelPos.X() = -nRelPosY - aObjBoundRect.Width();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( bVertL2R )
+ aRelPos.X() = nRelPosY;
+ else
+ aRelPos.X() = -nRelPosY - aObjBoundRect.Width();
maOffsetToFrmAnchorPos.X() = nVertOffsetToFrmAnchorPos;
}
else
@@ -203,8 +207,12 @@ void SwToLayoutAnchoredObjectPosition::CalcPosition()
// determine absolute 'horizontal' position, depending on layout-direction
// --> OD 2004-06-17 #i26791# - determine offset to 'horizontal' frame
// anchor position, depending on layout-direction
- if ( bVert )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ // --> OD 2009-09-04 #mongolianlayout#
+ if( bVert || bVertL2R )
+ // <--
{
+
aRelPos.Y() = nRelPosX;
maOffsetToFrmAnchorPos.Y() = nOffset;
}
diff --git a/sw/source/core/ole/makefile.mk b/sw/source/core/ole/makefile.mk
deleted file mode 100644
index 8aaf9ed419d2..000000000000
--- a/sw/source/core/ole/makefile.mk
+++ /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.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=ole
-
-AUTOSEG=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-CXXFILES = \
- ndole.cxx
-
-SLOFILES = \
- $(SLO)$/ndole.obj
-
-EXCEPTIONSFILES = \
- $(SLO)$/ndole.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index c17287566bec..fd80b1ec4b0a 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -85,7 +85,7 @@ public:
virtual void Commit();
void Load();
- void SetInUnload( BOOL bFlag ) { bInUnload = bFlag; }
+ void SetInUnload( sal_Bool bFlag ) { bInUnload = bFlag; }
using SvPtrarr::Count;
void InsertObj( SwOLEObj& rObj );
@@ -93,7 +93,7 @@ public:
void RemovePtr( SwOLEObj* pObj )
{
- USHORT nPos = SvPtrarr::GetPos( pObj );
+ sal_uInt16 nPos = SvPtrarr::GetPos( pObj );
if( USHRT_MAX != nPos )
SvPtrarr::Remove( nPos );
}
@@ -181,7 +181,7 @@ SwEmbedObjectLink::SwEmbedObjectLink(SwOLENode* pNode):
::sfx2::SvBaseLink( ::sfx2::LINKUPDATE_ONCALL, SOT_FORMATSTR_ID_SVXB ),
pOleNode(pNode)
{
- SetSynchron( FALSE );
+ SetSynchron( sal_False );
}
// -----------------------------------------------------------------------------
@@ -244,7 +244,7 @@ SwOLENode::SwOLENode( const SwNodeIndex &rWhere,
SwNoTxtNode( rWhere, ND_OLENODE, pGrfColl, pAutoAttr ),
aOLEObj( xObj ),
pGraphic(0),
- bOLESizeInvalid( FALSE ),
+ bOLESizeInvalid( sal_False ),
mpObjectLink( NULL )
{
aOLEObj.SetNode( this );
@@ -258,7 +258,7 @@ SwOLENode::SwOLENode( const SwNodeIndex &rWhere,
SwNoTxtNode( rWhere, ND_OLENODE, pGrfColl, pAutoAttr ),
aOLEObj( rString, nAspect ),
pGraphic(0),
- bOLESizeInvalid( FALSE ),
+ bOLESizeInvalid( sal_False ),
mpObjectLink( NULL )
{
aOLEObj.SetNode( this );
@@ -280,13 +280,13 @@ Graphic* SwOLENode::GetGraphic()
SwCntntNode *SwOLENode::SplitCntntNode( const SwPosition & )
{
// OLE-Objecte vervielfaeltigen ??
- OSL_ENSURE( FALSE, "OleNode: can't split." );
+ OSL_ENSURE( sal_False, "OleNode: can't split." );
return this;
}
// Laden eines in den Undo-Bereich verschobenen OLE-Objekts
-BOOL SwOLENode::RestorePersistentData()
+sal_Bool SwOLENode::RestorePersistentData()
{
DBG_ASSERT( aOLEObj.GetOleRef().is(), "No object to restore!" );
if ( aOLEObj.xOLERef.is() )
@@ -322,11 +322,11 @@ BOOL SwOLENode::RestorePersistentData()
}
}
- return TRUE;
+ return sal_True;
}
// OLE object is transported into UNDO area
-BOOL SwOLENode::SavePersistentData()
+sal_Bool SwOLENode::SavePersistentData()
{
if( aOLEObj.xOLERef.is() )
{
@@ -366,7 +366,7 @@ BOOL SwOLENode::SavePersistentData()
DisconnectFileLink_Impl();
- return TRUE;
+ return sal_True;
}
@@ -424,16 +424,14 @@ Size SwOLENode::GetTwipSize() const
SwCntntNode* SwOLENode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
{
// Falls bereits eine SvPersist-Instanz existiert, nehmen wir diese
- SfxObjectShell* p = pDoc->GetPersist();
- if( !p )
+ SfxObjectShell* pPersistShell = pDoc->GetPersist();
+ if( !pPersistShell )
{
- // TODO/LATER: reicht hier nicht ein EmbeddedObjectContainer? Was passiert mit
- // diesem Dokument?
- OSL_ENSURE( pDoc->GetRefForDocShell(),
- "wo ist die Ref-Klasse fuer die DocShell?");
- p = new SwDocShell( pDoc, SFX_CREATE_MODE_INTERNAL );
- *pDoc->GetRefForDocShell() = p;
- p->DoInitNew( NULL );
+ // TODO/LATER: is EmbeddedObjectContainer not enough?
+ // the created document will be closed by pDoc ( should use SfxObjectShellLock )
+ pPersistShell = new SwDocShell( pDoc, SFX_CREATE_MODE_INTERNAL );
+ pDoc->SetTmpDocShell( pPersistShell );
+ pPersistShell->DoInitNew( NULL );
}
// Wir hauen das Ding auf SvPersist-Ebene rein
@@ -441,7 +439,7 @@ SwCntntNode* SwOLENode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
::rtl::OUString aNewName/*( Sw3Io::UniqueName( p->GetStorage(), "Obj" ) )*/;
SfxObjectShell* pSrc = GetDoc()->GetPersist();
- p->GetEmbeddedObjectContainer().CopyAndGetEmbeddedObject(
+ pPersistShell->GetEmbeddedObjectContainer().CopyAndGetEmbeddedObject(
pSrc->GetEmbeddedObjectContainer(),
pSrc->GetEmbeddedObjectContainer().GetEmbeddedObject( aOLEObj.aName ),
aNewName );
@@ -456,32 +454,32 @@ SwCntntNode* SwOLENode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
pOLENd->SetContour( HasContour(), HasAutomaticContour() );
pOLENd->SetAspect( GetAspect() ); // the replacement image must be already copied
- pOLENd->SetOLESizeInvalid( TRUE );
+ pOLENd->SetOLESizeInvalid( sal_True );
pDoc->SetOLEPrtNotifyPending();
return pOLENd;
}
-BOOL SwOLENode::IsInGlobalDocSection() const
+sal_Bool SwOLENode::IsInGlobalDocSection() const
{
// suche den "Body Anchor"
- ULONG nEndExtraIdx = GetNodes().GetEndOfExtras().GetIndex();
+ sal_uLong nEndExtraIdx = GetNodes().GetEndOfExtras().GetIndex();
const SwNode* pAnchorNd = this;
do {
SwFrmFmt* pFlyFmt = pAnchorNd->GetFlyFmt();
if( !pFlyFmt )
- return FALSE;
+ return sal_False;
const SwFmtAnchor& rAnchor = pFlyFmt->GetAnchor();
if( !rAnchor.GetCntntAnchor() )
- return FALSE;
+ return sal_False;
pAnchorNd = &rAnchor.GetCntntAnchor()->nNode.GetNode();
} while( pAnchorNd->GetIndex() < nEndExtraIdx );
const SwSectionNode* pSectNd = pAnchorNd->FindSectionNode();
if( !pSectNd )
- return FALSE;
+ return sal_False;
while( pSectNd )
{
@@ -496,9 +494,9 @@ BOOL SwOLENode::IsInGlobalDocSection() const
pSectNd->GetIndex() > nEndExtraIdx;
}
-BOOL SwOLENode::IsOLEObjectDeleted() const
+sal_Bool SwOLENode::IsOLEObjectDeleted() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( aOLEObj.xOLERef.is() )
{
SfxObjectShell* p = GetDoc()->GetPersist();
@@ -646,7 +644,7 @@ SwOLEObj::SwOLEObj( const svt::EmbeddedObjectRef& xObj ) :
pListener( 0 ),
xOLERef( xObj )
{
- xOLERef.Lock( TRUE );
+ xOLERef.Lock( sal_True );
if ( xObj.is() )
{
pListener = new SwOLEListener_Impl( this );
@@ -661,7 +659,7 @@ SwOLEObj::SwOLEObj( const String &rString, sal_Int64 nAspect ) :
pListener( 0 ),
aName( rString )
{
- xOLERef.Lock( TRUE );
+ xOLERef.Lock( sal_True );
xOLERef.SetViewAspect( nAspect );
}
@@ -701,7 +699,7 @@ SwOLEObj::~SwOLEObj()
// unlock object so that object can be closed in RemoveEmbeddedObject
// successful closing of the object will automatically clear the reference then
- xOLERef.Lock(FALSE);
+ xOLERef.Lock(sal_False);
// Always remove object from conteiner it is connected to
try
@@ -760,12 +758,12 @@ void SwOLEObj::SetNode( SwOLENode* pNode )
}
}
-BOOL SwOLEObj::IsOleRef() const
+sal_Bool SwOLEObj::IsOleRef() const
{
return xOLERef.is();
}
-uno::Reference < embed::XEmbeddedObject > SwOLEObj::GetOleRef()
+const uno::Reference < embed::XEmbeddedObject > SwOLEObj::GetOleRef()
{
if( !xOLERef.is() )
{
@@ -823,9 +821,9 @@ svt::EmbeddedObjectRef& SwOLEObj::GetObject()
return xOLERef;
}
-BOOL SwOLEObj::UnloadObject()
+sal_Bool SwOLEObj::UnloadObject()
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if ( pOLENd )
{
const SwDoc* pDoc = pOLENd->GetDoc();
@@ -835,14 +833,14 @@ BOOL SwOLEObj::UnloadObject()
return bRet;
}
-BOOL SwOLEObj::UnloadObject( uno::Reference< embed::XEmbeddedObject > xObj, const SwDoc* pDoc, sal_Int64 nAspect )
+sal_Bool SwOLEObj::UnloadObject( uno::Reference< embed::XEmbeddedObject > xObj, const SwDoc* pDoc, sal_Int64 nAspect )
{
if ( !pDoc )
- return FALSE;
+ return sal_False;
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
sal_Int32 nState = xObj.is() ? xObj->getCurrentState() : embed::EmbedStates::LOADED;
- BOOL bIsActive = ( nState != embed::EmbedStates::LOADED && nState != embed::EmbedStates::RUNNING );
+ sal_Bool bIsActive = ( nState != embed::EmbedStates::LOADED && nState != embed::EmbedStates::RUNNING );
sal_Int64 nMiscStatus = xObj->getStatus( nAspect );
if( nState != embed::EmbedStates::LOADED && !pDoc->IsInDtor() && !bIsActive &&
@@ -872,11 +870,11 @@ BOOL SwOLEObj::UnloadObject( uno::Reference< embed::XEmbeddedObject > xObj, cons
}
catch ( uno::Exception& )
{
- bRet = FALSE;
+ bRet = sal_False;
}
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
}
@@ -944,8 +942,8 @@ void SwOLELRUCache::Load()
if( nVal < nLRU_InitSize )
{
// size of cache has been changed
- USHORT nCount = SvPtrarr::Count();
- USHORT nPos = nCount;
+ sal_uInt16 nCount = SvPtrarr::Count();
+ sal_uInt16 nPos = nCount;
// try to remove the last entries until new maximum size is reached
while( nCount > nVal )
@@ -959,14 +957,14 @@ void SwOLELRUCache::Load()
}
}
- nLRU_InitSize = (USHORT)nVal;
+ nLRU_InitSize = (sal_uInt16)nVal;
}
}
void SwOLELRUCache::InsertObj( SwOLEObj& rObj )
{
SwOLEObj* pObj = &rObj;
- USHORT nPos = SvPtrarr::GetPos( pObj );
+ sal_uInt16 nPos = SvPtrarr::GetPos( pObj );
if( nPos )
{
// object is currently not the first in cache
@@ -976,7 +974,7 @@ void SwOLELRUCache::InsertObj( SwOLEObj& rObj )
SvPtrarr::Insert( pObj, 0 );
// try to remove objects if necessary (of course not the freshly inserted one at nPos=0)
- USHORT nCount = SvPtrarr::Count();
+ sal_uInt16 nCount = SvPtrarr::Count();
nPos = nCount-1;
while( nPos && nCount > nLRU_InitSize )
{
@@ -989,7 +987,7 @@ void SwOLELRUCache::InsertObj( SwOLEObj& rObj )
void SwOLELRUCache::RemoveObj( SwOLEObj& rObj )
{
- USHORT nPos = SvPtrarr::GetPos( &rObj );
+ sal_uInt16 nPos = SvPtrarr::GetPos( &rObj );
if ( nPos != 0xFFFF )
SvPtrarr::Remove( nPos );
if( !Count() )
diff --git a/sw/source/core/para/makefile.mk b/sw/source/core/para/makefile.mk
deleted file mode 100644
index aee61949b530..000000000000
--- a/sw/source/core/para/makefile.mk
+++ /dev/null
@@ -1,57 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=para
-
-AUTOSEG=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-CXXFILES = \
- paratr.cxx
-
-
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-EXCEPTIONSFILES = \
- $(SLO)$/paratr.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/para/paratr.cxx b/sw/source/core/para/paratr.cxx
index 18a25e265eae..ea8da3f45cc6 100644
--- a/sw/source/core/para/paratr.cxx
+++ b/sw/source/core/para/paratr.cxx
@@ -197,7 +197,7 @@ bool SwFmtDrop::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
sal_Int8 nTemp = 0;
rVal >>= nTemp;
if(nTemp >=1 && nTemp < 0x7f)
- nLines = (BYTE)nTemp;
+ nLines = (sal_uInt8)nTemp;
}
break;
case MID_DROPCAP_COUNT :
@@ -205,7 +205,7 @@ bool SwFmtDrop::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
sal_Int16 nTemp = 0;
rVal >>= nTemp;
if(nTemp >=1 && nTemp < 0x7f)
- nChars = (BYTE)nTemp;
+ nChars = (sal_uInt8)nTemp;
}
break;
case MID_DROPCAP_DISTANCE :
@@ -260,14 +260,14 @@ int SwNumRuleItem::operator==( const SfxPoolItem& rAttr ) const
return GetValue() == ((SwNumRuleItem&)rAttr).GetValue();
}
-bool SwNumRuleItem::QueryValue( uno::Any& rVal, BYTE ) const
+bool SwNumRuleItem::QueryValue( uno::Any& rVal, sal_uInt8 ) const
{
rtl::OUString sRet = SwStyleNameMapper::GetProgName(GetValue(), nsSwGetPoolIdFromName::GET_POOLID_NUMRULE );
rVal <<= sRet;
return true;
}
-bool SwNumRuleItem::PutValue( const uno::Any& rVal, BYTE )
+bool SwNumRuleItem::PutValue( const uno::Any& rVal, sal_uInt8 )
{
rtl::OUString uName;
rVal >>= uName;
diff --git a/sw/source/core/sw3io/makefile.mk b/sw/source/core/sw3io/makefile.mk
deleted file mode 100644
index 352953e85b57..000000000000
--- a/sw/source/core/sw3io/makefile.mk
+++ /dev/null
@@ -1,52 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=sw3io
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES = \
- $(SLO)$/sw3convert.obj \
- $(SLO)$/swacorr.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/sw3io/sw3convert.cxx b/sw/source/core/sw3io/sw3convert.cxx
index ab39f7265aac..8605e23f6204 100644
--- a/sw/source/core/sw3io/sw3convert.cxx
+++ b/sw/source/core/sw3io/sw3convert.cxx
@@ -75,7 +75,7 @@ using namespace nsSwDocInfoSubType;
struct OldFormats
{
NfIndexTableOffset eFormatIdx;
- USHORT nOldFormat;
+ sal_uInt16 nOldFormat;
};
static OldFormats aOldDateFmt40[] =
@@ -194,9 +194,9 @@ static OldFormats aOldGetSetExpFmt30[] =
{ NF_NUMERIC_START, 0 } // Tabellenende
};
-SW_DLLPUBLIC void sw3io_ConvertFromOldField( SwDoc& rDoc, USHORT& rWhich,
- USHORT& rSubType, ULONG &rFmt,
- USHORT nVersion )
+SW_DLLPUBLIC void sw3io_ConvertFromOldField( SwDoc& rDoc, sal_uInt16& rWhich,
+ sal_uInt16& rSubType, sal_uLong &rFmt,
+ sal_uInt16 nVersion )
{
const OldFormats *pOldFmt = 0L;
@@ -259,10 +259,10 @@ SW_DLLPUBLIC void sw3io_ConvertFromOldField( SwDoc& rDoc, USHORT& rWhich,
// uns voruebergehend mal im Subtyp, sofern es
// ueberhaupt als entsprechendes Format in Frage kommt.
if( RES_SETEXPFLD==rWhich &&
- /*rFmt >= (USHORT)SVX_NUM_CHARS_UPPER_LETTER && always true*/
- rFmt <= (USHORT)SVX_NUM_BITMAP )
+ /*rFmt >= (sal_uInt16)SVX_NUM_CHARS_UPPER_LETTER && always true*/
+ rFmt <= (sal_uInt16)SVX_NUM_BITMAP )
{
- rSubType = (USHORT)rFmt;
+ rSubType = (sal_uInt16)rFmt;
}
pOldFmt = nVersion<SWG_INETBROWSER ? aOldGetSetExpFmt30
: aOldGetSetExpFmt40;
@@ -287,7 +287,7 @@ SW_DLLPUBLIC void sw3io_ConvertFromOldField( SwDoc& rDoc, USHORT& rWhich,
if( pOldFmt )
{
SvNumberFormatter *pFormatter = rDoc.GetNumberFormatter();
- USHORT i = 0;
+ sal_uInt16 i = 0;
while( pOldFmt[i].eFormatIdx != NF_NUMERIC_START ||
pOldFmt[i].nOldFormat)
@@ -301,11 +301,11 @@ SW_DLLPUBLIC void sw3io_ConvertFromOldField( SwDoc& rDoc, USHORT& rWhich,
}
}
}
-SW_DLLPUBLIC void sw3io_ConvertToOldField( const SwField* pFld, USHORT& rWhich,
- ULONG& rFmt, ULONG nFFVersion )
+SW_DLLPUBLIC void sw3io_ConvertToOldField( const SwField* pFld, sal_uInt16& rWhich,
+ sal_uLong& rFmt, sal_uLong nFFVersion )
{
const OldFormats *pOldFmt = 0L;
- ULONG nOldFmt = rFmt;
+ sal_uLong nOldFmt = rFmt;
switch( rWhich )
{
@@ -324,7 +324,7 @@ SW_DLLPUBLIC void sw3io_ConvertToOldField( const SwField* pFld, USHORT& rWhich,
case RES_DATETIMEFLD:
if( SOFFICE_FILEFORMAT_40 >= nFFVersion )
{
- USHORT nSubType = ((SwDateTimeField*) pFld)->GetSubType();
+ sal_uInt16 nSubType = ((SwDateTimeField*) pFld)->GetSubType();
switch( nSubType )
{
case DATEFLD: rWhich = RES_DATEFLD; break;
@@ -353,7 +353,7 @@ SW_DLLPUBLIC void sw3io_ConvertToOldField( const SwField* pFld, USHORT& rWhich,
case RES_USERFLD:
if( SOFFICE_FILEFORMAT_40 >= nFFVersion )
{
- USHORT nSubType = pFld->GetSubType();
+ sal_uInt16 nSubType = pFld->GetSubType();
if (nSubType & nsSwExtendedSubType::SUB_INVISIBLE)
rFmt = VVF_INVISIBLE;
@@ -392,11 +392,11 @@ SW_DLLPUBLIC void sw3io_ConvertToOldField( const SwField* pFld, USHORT& rWhich,
if( pEntry )
{
- USHORT i = 0;
+ sal_uInt16 i = 0;
while( pOldFmt[i].eFormatIdx != NF_NUMERIC_START ||
pOldFmt[i].nOldFormat )
{
- ULONG nKey = pFormatter->GetFormatIndex(
+ sal_uLong nKey = pFormatter->GetFormatIndex(
pOldFmt[i].eFormatIdx, pEntry->GetLanguage() );
if( nOldFmt == nKey )
diff --git a/sw/source/core/sw3io/swacorr.cxx b/sw/source/core/sw3io/swacorr.cxx
index b5377cb5345f..86bd02e76a30 100644
--- a/sw/source/core/sw3io/swacorr.cxx
+++ b/sw/source/core/sw3io/swacorr.cxx
@@ -49,9 +49,9 @@ TYPEINIT1( SwAutoCorrect, SvxAutoCorrect );
// koennen aus der Wortliste herausgeholt werden!)
// rShort ist der Stream-Name - gecryptet!
-BOOL SwAutoCorrect::GetLongText( const uno::Reference < embed::XStorage >& rStg, const String& rFileName, const String& rShort, String& rLong )
+sal_Bool SwAutoCorrect::GetLongText( const uno::Reference < embed::XStorage >& rStg, const String& rFileName, const String& rShort, String& rLong )
{
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if (rStg.is())
{
// mba: relative URLs don't make sense here
@@ -66,14 +66,14 @@ BOOL SwAutoCorrect::GetLongText( const uno::Reference < embed::XStorage >& rStg,
// - Text mit Attributierung (kann nur der SWG - SWG-Format!)
// rShort ist der Stream-Name - gecryptet!
-BOOL SwAutoCorrect::PutText( const uno::Reference < embed::XStorage >& rStg, const String& rFileName, const String& rShort,
+sal_Bool SwAutoCorrect::PutText( const uno::Reference < embed::XStorage >& rStg, const String& rFileName, const String& rShort,
SfxObjectShell& rObjSh, String& rLong )
{
if( !rObjSh.IsA( TYPE(SwDocShell) ) )
- return FALSE;
+ return sal_False;
SwDocShell& rDShell = (SwDocShell&)rObjSh;
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
// mba: relative URLs don't make sense here
SwXMLTextBlocks aBlk( rStg, rFileName );
@@ -84,7 +84,7 @@ BOOL SwAutoCorrect::PutText( const uno::Reference < embed::XStorage >& rStg, co
{
((SwEditShell*)rDShell.GetWrtShell())->_CopySelToDoc( pDoc );
nRet = aBlk.PutDoc();
- aBlk.AddName ( rShort, rShort, FALSE );
+ aBlk.AddName ( rShort, rShort, sal_False );
if( !IsError( nRet ) )
nRet = aBlk.GetText( rShort, rLong );
}
diff --git a/sw/source/core/swg/SwXMLBlockListContext.cxx b/sw/source/core/swg/SwXMLBlockListContext.cxx
index 23aa3b54370c..babaada52596 100644
--- a/sw/source/core/swg/SwXMLBlockListContext.cxx
+++ b/sw/source/core/swg/SwXMLBlockListContext.cxx
@@ -97,7 +97,7 @@ SwXMLBlockContext::SwXMLBlockContext(
{
static const CharClass & rCC = GetAppCharClass();
String aShort, aLong, aPackageName;
- BOOL bTextOnly = FALSE;
+ sal_Bool bTextOnly = sal_False;
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for (sal_Int16 i=0; i < nAttrCount; i++)
@@ -123,7 +123,7 @@ SwXMLBlockContext::SwXMLBlockContext(
else if ( IsXMLToken ( aLocalName, XML_UNFORMATTED_TEXT ) )
{
if ( IsXMLToken ( rAttrValue, XML_TRUE ) )
- bTextOnly = TRUE;
+ bTextOnly = sal_True;
}
}
}
diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx
index a0dccfac49bd..6126a3854f26 100644
--- a/sw/source/core/swg/SwXMLTextBlocks.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks.cxx
@@ -29,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <tools/urlobj.hxx>
@@ -40,6 +39,7 @@
#include <comphelper/storagehelper.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docsh.hxx>
#include <pam.hxx>
#include <swblocks.hxx>
@@ -47,6 +47,7 @@
#include <shellio.hxx>
#include <poolfmt.hxx>
#include <SwXMLTextBlocks.hxx>
+#include <errhdl.hxx>
#include <SwXMLBlockImport.hxx>
#include <SwXMLBlockExport.hxx>
#include <swerror.h>
@@ -70,16 +71,16 @@ void SwXMLTextBlocks::ResetBlockMode ( )
}
SwXMLTextBlocks::SwXMLTextBlocks( const String& rFile )
-: SwImpBlocks( rFile ), bAutocorrBlock( FALSE ), nFlags ( 0 )
+: SwImpBlocks( rFile ), bAutocorrBlock( sal_False ), nFlags ( 0 )
{
SwDocShell* pDocSh = new SwDocShell ( SFX_CREATE_MODE_INTERNAL );
if( !pDocSh->DoInitNew( 0 ) )
return;
- bReadOnly = TRUE;
+ bReadOnly = sal_True;
pDoc = pDocSh->GetDoc();
xDocShellRef = pDocSh;
pDoc->SetOle2Link( Link() );
- pDoc->DoUndo( FALSE ); // always FALSE
+ pDoc->GetIDocumentUndoRedo().DoUndo(false);
pDoc->acquire();
uno::Reference< embed::XStorage > refStg;
if( !aDateModified.GetDate() || !aTimeModified.GetTime() )
@@ -87,7 +88,7 @@ SwXMLTextBlocks::SwXMLTextBlocks( const String& rFile )
try
{
refStg = comphelper::OStorageHelper::GetStorageFromURL( rFile, embed::ElementModes::READWRITE );
- bReadOnly = FALSE;
+ bReadOnly = sal_False;
}
catch( const uno::Exception& )
{
@@ -107,27 +108,27 @@ SwXMLTextBlocks::SwXMLTextBlocks( const String& rFile )
InitBlockMode ( refStg );
ReadInfo();
ResetBlockMode ();
- bInfoChanged = FALSE;
+ bInfoChanged = sal_False;
}
SwXMLTextBlocks::SwXMLTextBlocks( const uno::Reference < embed::XStorage >& rStg, const String& rName )
: SwImpBlocks( rName )
-, bAutocorrBlock( TRUE )
+, bAutocorrBlock( sal_True )
, nFlags ( 0 )
{
SwDocShell* pDocSh = new SwDocShell ( SFX_CREATE_MODE_INTERNAL );
if( !pDocSh->DoInitNew( 0 ) )
return;
- bReadOnly = FALSE;
+ bReadOnly = sal_False;
pDoc = pDocSh->GetDoc();
xDocShellRef = pDocSh;
pDoc->SetOle2Link( Link() );
- pDoc->DoUndo( FALSE );
+ pDoc->GetIDocumentUndoRedo().DoUndo(false);
pDoc->acquire();
InitBlockMode ( rStg );
ReadInfo();
- bInfoChanged = FALSE;
+ bInfoChanged = sal_False;
}
SwXMLTextBlocks::~SwXMLTextBlocks()
@@ -151,35 +152,35 @@ void SwXMLTextBlocks::ClearDoc()
pDoc->ClearDoc();
pDocShell->ClearEmbeddedObjects();
}
-void SwXMLTextBlocks::AddName( const String& rShort, const String& rLong, BOOL bOnlyTxt )
+void SwXMLTextBlocks::AddName( const String& rShort, const String& rLong, sal_Bool bOnlyTxt )
{
- USHORT nIdx = GetIndex( rShort );
+ sal_uInt16 nIdx = GetIndex( rShort );
SwBlockName* pNew = NULL;
- if( nIdx != (USHORT) -1 )
+ if( nIdx != (sal_uInt16) -1 )
aNames.DeleteAndDestroy( nIdx );
GeneratePackageName( rShort, aPackageName );
pNew = new SwBlockName( rShort, rLong, aPackageName );
- pNew->bIsOnlyTxtFlagInit = TRUE;
+ pNew->bIsOnlyTxtFlagInit = sal_True;
pNew->bIsOnlyTxt = bOnlyTxt;
aNames.C40_PTR_INSERT( SwBlockName, pNew );
- bInfoChanged = TRUE;
+ bInfoChanged = sal_True;
}
void SwXMLTextBlocks::AddName( const String& rShort, const String& rLong,
- const String& rPackageName, BOOL bOnlyTxt )
+ const String& rPackageName, sal_Bool bOnlyTxt )
{
- USHORT nIdx = GetIndex( rShort );
- if( nIdx != (USHORT) -1 )
+ sal_uInt16 nIdx = GetIndex( rShort );
+ if( nIdx != (sal_uInt16) -1 )
aNames.DeleteAndDestroy( nIdx );
SwBlockName* pNew = new SwBlockName( rShort, rLong, rPackageName );
- pNew->bIsOnlyTxtFlagInit = TRUE;
+ pNew->bIsOnlyTxtFlagInit = sal_True;
pNew->bIsOnlyTxt = bOnlyTxt;
aNames.C40_PTR_INSERT( SwBlockName, pNew );
- bInfoChanged = TRUE;
+ bInfoChanged = sal_True;
}
-ULONG SwXMLTextBlocks::Delete( USHORT n )
+sal_uLong SwXMLTextBlocks::Delete( sal_uInt16 n )
{
String aPckName (aNames[ n ]->aPackageName);
uno::Reference < container::XNameAccess > xAccess( xBlkRoot, uno::UNO_QUERY );
@@ -202,7 +203,7 @@ ULONG SwXMLTextBlocks::Delete( USHORT n )
return 0;
}
-ULONG SwXMLTextBlocks::Rename( USHORT nIdx, const String& rNewShort, const String& )
+sal_uLong SwXMLTextBlocks::Rename( sal_uInt16 nIdx, const String& rNewShort, const String& )
{
DBG_ASSERT( xBlkRoot.is(), "No storage set" );
if(!xBlkRoot.is())
@@ -243,17 +244,17 @@ ULONG SwXMLTextBlocks::Rename( USHORT nIdx, const String& rNewShort, const Strin
return 0;
}
-ULONG SwXMLTextBlocks::CopyBlock( SwImpBlocks& rDestImp, String& rShort,
+sal_uLong SwXMLTextBlocks::CopyBlock( SwImpBlocks& rDestImp, String& rShort,
const String& rLong)
{
- ULONG nError = 0;
- OpenFile(TRUE);
- rDestImp.OpenFile(FALSE);
+ sal_uLong nError = 0;
+ OpenFile(sal_True);
+ rDestImp.OpenFile(sal_False);
String aGroup( rShort );
- BOOL bTextOnly = IsOnlyTextBlock ( rShort ) ;//pImp->pBlkRoot->IsStream( aGroup );
- USHORT nIndex = GetIndex ( rShort );
+ sal_Bool bTextOnly = IsOnlyTextBlock ( rShort ) ;//pImp->pBlkRoot->IsStream( aGroup );
+ sal_uInt16 nIndex = GetIndex ( rShort );
String sDestShortName( GetPackageName (nIndex) );
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
DBG_ASSERT( xBlkRoot.is(), "No storage set" );
if(!xBlkRoot.is())
@@ -296,7 +297,7 @@ ULONG SwXMLTextBlocks::CopyBlock( SwImpBlocks& rDestImp, String& rShort,
}
-ULONG SwXMLTextBlocks::StartPutBlock( const String& rShort, const String& rPackageName )
+sal_uLong SwXMLTextBlocks::StartPutBlock( const String& rShort, const String& rPackageName )
{
DBG_ASSERT( xBlkRoot.is(), "No storage set" );
if(!xBlkRoot.is())
@@ -316,20 +317,20 @@ ULONG SwXMLTextBlocks::StartPutBlock( const String& rShort, const String& rPacka
}
return 0;
}
-ULONG SwXMLTextBlocks::BeginPutDoc( const String& rShort, const String& rLong )
+sal_uLong SwXMLTextBlocks::BeginPutDoc( const String& rShort, const String& rLong )
{
// In der Basisklasse ablegen!
aShort = rShort;
aLong = rLong;
GeneratePackageName( rShort, aPackageName );
- SetIsTextOnly( rShort, FALSE);
+ SetIsTextOnly( rShort, sal_False);
return StartPutBlock (rShort, aPackageName);
}
-ULONG SwXMLTextBlocks::PutBlock( SwPaM& , const String& )
+sal_uLong SwXMLTextBlocks::PutBlock( SwPaM& , const String& )
{
- ULONG nRes = 0;
- USHORT nCommitFlags = nFlags & (SWXML_CONVBLOCK|SWXML_NOROOTCOMMIT);
+ sal_uLong nRes = 0;
+ sal_uInt16 nCommitFlags = nFlags & (SWXML_CONVBLOCK|SWXML_NOROOTCOMMIT);
nFlags |= nCommitFlags;
@@ -405,34 +406,34 @@ ULONG SwXMLTextBlocks::PutBlock( SwPaM& , const String& )
return 0;
}
-ULONG SwXMLTextBlocks::PutDoc()
+sal_uLong SwXMLTextBlocks::PutDoc()
{
SwPaM* pPaM = MakePaM();
- ULONG nErr = PutBlock(*pPaM, aLong);
+ sal_uLong nErr = PutBlock(*pPaM, aLong);
delete pPaM;
return nErr;
}
-ULONG SwXMLTextBlocks::GetText( USHORT nIdx, String& rText )
+sal_uLong SwXMLTextBlocks::GetText( sal_uInt16 nIdx, String& rText )
{
return GetBlockText( aNames[ nIdx ]->aShort, rText );
}
-ULONG SwXMLTextBlocks::GetText( const String& rShort, String& rText )
+sal_uLong SwXMLTextBlocks::GetText( const String& rShort, String& rText )
{
return GetBlockText( rShort, rText );
}
-ULONG SwXMLTextBlocks::MakeBlockList()
+sal_uLong SwXMLTextBlocks::MakeBlockList()
{
WriteInfo();
return 0;
}
-BOOL SwXMLTextBlocks::PutMuchEntries( BOOL bOn )
+sal_Bool SwXMLTextBlocks::PutMuchEntries( sal_Bool bOn )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( bOn )
{
if( bInPutMuchBlocks )
@@ -441,11 +442,11 @@ BOOL SwXMLTextBlocks::PutMuchEntries( BOOL bOn )
}
else if( !IsFileChanged() )
{
- bRet = 0 == OpenFile( FALSE );
+ bRet = 0 == OpenFile( sal_False );
if( bRet )
{
nFlags |= SWXML_NOROOTCOMMIT;
- bInPutMuchBlocks = TRUE;
+ bInPutMuchBlocks = sal_True;
}
}
}
@@ -462,8 +463,8 @@ BOOL SwXMLTextBlocks::PutMuchEntries( BOOL bOn )
MakeBlockList();
CloseFile();
Touch();
- bInPutMuchBlocks = FALSE;
- bRet = TRUE;
+ bInPutMuchBlocks = sal_False;
+ bRet = sal_True;
}
catch (uno::Exception&)
{
@@ -473,11 +474,11 @@ BOOL SwXMLTextBlocks::PutMuchEntries( BOOL bOn )
return bRet;
}
-ULONG SwXMLTextBlocks::OpenFile( BOOL bRdOnly )
+sal_uLong SwXMLTextBlocks::OpenFile( sal_Bool bRdOnly )
{
if( bAutocorrBlock )
return 0;
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
try
{
uno::Reference < embed::XStorage > refStg = comphelper::OStorageHelper::GetStorageFromURL( aFile,
@@ -503,34 +504,34 @@ void SwXMLTextBlocks::CloseFile()
}
}
-void SwXMLTextBlocks::SetIsTextOnly( const String& rShort, BOOL bNewValue )
+void SwXMLTextBlocks::SetIsTextOnly( const String& rShort, sal_Bool bNewValue )
{
- USHORT nIdx = GetIndex ( rShort );
- if (nIdx != (USHORT) -1 && nIdx != USHRT_MAX)
+ sal_uInt16 nIdx = GetIndex ( rShort );
+ if (nIdx != (sal_uInt16) -1 && nIdx != USHRT_MAX)
aNames[nIdx]->bIsOnlyTxt = bNewValue;
}
-void SwXMLTextBlocks::SetIsTextOnly( USHORT nIdx, BOOL bNewValue )
+void SwXMLTextBlocks::SetIsTextOnly( sal_uInt16 nIdx, sal_Bool bNewValue )
{
aNames[nIdx]->bIsOnlyTxt = bNewValue;
}
-BOOL SwXMLTextBlocks::IsOnlyTextBlock( const String& rShort ) const
+sal_Bool SwXMLTextBlocks::IsOnlyTextBlock( const String& rShort ) const
{
- USHORT nIdx = GetIndex ( rShort );
- BOOL bRet = FALSE;
- if (nIdx != (USHORT) -1 && nIdx != USHRT_MAX)
+ sal_uInt16 nIdx = GetIndex ( rShort );
+ sal_Bool bRet = sal_False;
+ if (nIdx != (sal_uInt16) -1 && nIdx != USHRT_MAX)
{
bRet = aNames[nIdx]->bIsOnlyTxt;
}
return bRet;
}
-BOOL SwXMLTextBlocks::IsOnlyTextBlock( USHORT nIdx ) const
+sal_Bool SwXMLTextBlocks::IsOnlyTextBlock( sal_uInt16 nIdx ) const
{
return aNames[nIdx]->bIsOnlyTxt;
}
-BOOL SwXMLTextBlocks::IsFileUCBStorage( const String & rFileName)
+sal_Bool SwXMLTextBlocks::IsFileUCBStorage( const String & rFileName)
{
String aName( rFileName );
INetURLObject aObj( aName );
@@ -543,7 +544,7 @@ BOOL SwXMLTextBlocks::IsFileUCBStorage( const String & rFileName)
}
SvStream * pStm = ::utl::UcbStreamHelper::CreateStream( aName, STREAM_STD_READ );
- BOOL bRet = UCBStorage::IsStorageFile( pStm );
+ sal_Bool bRet = UCBStorage::IsStorageFile( pStm );
delete pStm;
return bRet;
}
@@ -569,14 +570,14 @@ void SwXMLTextBlocks::GeneratePackageName ( const String& rShort, String& rPacka
}
}
-ULONG SwXMLTextBlocks::PutText( const String& rShort, const String& rName,
+sal_uLong SwXMLTextBlocks::PutText( const String& rShort, const String& rName,
const String& rText )
{
- ULONG nRes = 0;
+ sal_uLong nRes = 0;
aShort = rShort;
aLong = rName;
aCur = rText;
- SetIsTextOnly( aShort, TRUE );
+ SetIsTextOnly( aShort, sal_True );
GeneratePackageName( rShort, aPackageName );
ClearDoc();
nRes = PutBlockText( rShort, rName, rText, aPackageName );
diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx
index f0a5d28e6ea4..feaffd7adb03 100644
--- a/sw/source/core/swg/SwXMLTextBlocks1.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx
@@ -63,7 +63,7 @@ using ::xmloff::token::XML_BLOCK_LIST;
using ::xmloff::token::XML_UNFORMATTED_TEXT;
using ::xmloff::token::GetXMLToken;
-ULONG SwXMLTextBlocks::GetDoc( USHORT nIdx )
+sal_uLong SwXMLTextBlocks::GetDoc( sal_uInt16 nIdx )
{
String aFolderName ( GetPackageName ( nIdx ) );
@@ -157,7 +157,7 @@ ULONG SwXMLTextBlocks::GetDoc( USHORT nIdx )
// re throw ?
}
- bInfoChanged = FALSE;
+ bInfoChanged = sal_False;
MakeBlockText(aCur);
}
catch( uno::Exception& )
@@ -178,7 +178,7 @@ const struct SvEventDescription aAutotextEvents[] =
{ 0, NULL }
};
-ULONG SwXMLTextBlocks::GetMacroTable( USHORT nIdx,
+sal_uLong SwXMLTextBlocks::GetMacroTable( sal_uInt16 nIdx,
SvxMacroTableDtor& rMacroTbl,
sal_Bool bFileAlreadyOpen )
{
@@ -188,13 +188,13 @@ ULONG SwXMLTextBlocks::GetMacroTable( USHORT nIdx,
aLong = aNames[ nIdx ]->aLong;
aPackageName = aNames[ nIdx ]->aPackageName;
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
// open stream in proper sub-storage
if( !bFileAlreadyOpen )
{
CloseFile();
- nRet = OpenFile ( TRUE );
+ nRet = OpenFile ( sal_True );
}
if ( 0 == nRet )
{
@@ -312,9 +312,9 @@ ULONG SwXMLTextBlocks::GetMacroTable( USHORT nIdx,
}
-ULONG SwXMLTextBlocks::GetBlockText( const String& rShort, String& rText )
+sal_uLong SwXMLTextBlocks::GetBlockText( const String& rShort, String& rText )
{
- ULONG n = 0;
+ sal_uLong n = 0;
sal_Bool bTextOnly = sal_True;
String aFolderName;
GeneratePackageName ( rShort, aFolderName );
@@ -391,7 +391,7 @@ ULONG SwXMLTextBlocks::GetBlockText( const String& rShort, String& rText )
return n;
}
-ULONG SwXMLTextBlocks::PutBlockText( const String& rShort, const String& ,
+sal_uLong SwXMLTextBlocks::PutBlockText( const String& rShort, const String& ,
const String& rText, const String& rPackageName )
{
GetIndex ( rShort );
@@ -417,7 +417,7 @@ ULONG SwXMLTextBlocks::PutBlockText( const String& rShort, const String& ,
uno::Reference < XInterface > xWriter (xServiceFactory->createInstance(
OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer"))));
DBG_ASSERT(xWriter.is(),"com.sun.star.xml.sax.Writer service missing");
- ULONG nRes = 0;
+ sal_uLong nRes = 0;
try
{
@@ -464,8 +464,8 @@ ULONG SwXMLTextBlocks::PutBlockText( const String& rShort, const String& ,
//TODO/LATER: error handling
/*
- ULONG nErr = xBlkRoot->GetError();
- ULONG nRes = 0;
+ sal_uLong nErr = xBlkRoot->GetError();
+ sal_uLong nRes = 0;
if( nErr == SVSTREAM_DISK_FULL )
nRes = ERR_W4W_WRITE_FULL;
else if( nErr != SVSTREAM_OK )
@@ -544,7 +544,7 @@ void SwXMLTextBlocks::ReadInfo( void )
}
void SwXMLTextBlocks::WriteInfo( void )
{
- if ( xBlkRoot.is() || 0 == OpenFile ( FALSE ) )
+ if ( xBlkRoot.is() || 0 == OpenFile ( sal_False ) )
{
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
comphelper::getProcessServiceFactory();
@@ -597,13 +597,13 @@ void SwXMLTextBlocks::WriteInfo( void )
{
}
- bInfoChanged = FALSE;
+ bInfoChanged = sal_False;
return;
}
}
-ULONG SwXMLTextBlocks::SetMacroTable(
- USHORT nIdx,
+sal_uLong SwXMLTextBlocks::SetMacroTable(
+ sal_uInt16 nIdx,
const SvxMacroTableDtor& rMacroTbl,
sal_Bool bFileAlreadyOpen )
{
@@ -613,7 +613,7 @@ ULONG SwXMLTextBlocks::SetMacroTable(
aPackageName = aNames[ nIdx ]->aPackageName;
// start XML autotext event export
- ULONG nRes = 0;
+ sal_uLong nRes = 0;
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
comphelper::getProcessServiceFactory();
@@ -633,7 +633,7 @@ ULONG SwXMLTextBlocks::SetMacroTable(
if( !bFileAlreadyOpen )
{
CloseFile(); // close (it may be open in read-only-mode)
- nRes = OpenFile ( FALSE );
+ nRes = OpenFile ( sal_False );
}
if ( 0 == nRes )
diff --git a/sw/source/core/swg/makefile.mk b/sw/source/core/swg/makefile.mk
deleted file mode 100644
index 925eef3bc93f..000000000000
--- a/sw/source/core/swg/makefile.mk
+++ /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.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=swg
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-EXCEPTIONSFILES = \
- $(SLO)$/SwXMLBlockExport.obj \
- $(SLO)$/SwXMLBlockImport.obj \
- $(SLO)$/SwXMLBlockListContext.obj \
- $(SLO)$/SwXMLSectionList.obj \
- $(SLO)$/SwXMLTextBlocks.obj \
- $(SLO)$/SwXMLTextBlocks1.obj \
- $(SLO)$/swblocks.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx
index c9a17c611ebe..f673905dab26 100644
--- a/sw/source/core/swg/swblocks.cxx
+++ b/sw/source/core/swg/swblocks.cxx
@@ -58,9 +58,9 @@ SV_IMPL_OP_PTRARR_SORT( SwBlockNames, SwBlockName* );
// Hash-Code errechnen (muss nicht eindeutig sein)
-USHORT SwImpBlocks::Hash( const String& r )
+sal_uInt16 SwImpBlocks::Hash( const String& r )
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
xub_StrLen nLen = r.Len();
if( nLen > 8 )
nLen = 8;
@@ -73,14 +73,14 @@ USHORT SwImpBlocks::Hash( const String& r )
SwBlockName::SwBlockName( const String& rShort, const String& rLong, long n )
: nPos( n ), aShort( rShort ), aLong( rLong ), aPackageName (rShort),
- bIsOnlyTxtFlagInit( FALSE ), bIsOnlyTxt( FALSE )
+ bIsOnlyTxtFlagInit( sal_False ), bIsOnlyTxt( sal_False )
{
nHashS = SwImpBlocks::Hash( rShort );
nHashL = SwImpBlocks::Hash( rLong );
}
SwBlockName::SwBlockName( const String& rShort, const String& rLong, const String& rPackageName)
: nPos( 0 ), aShort( rShort ), aLong( rLong ), aPackageName (rPackageName),
- bIsOnlyTxtFlagInit( FALSE ), bIsOnlyTxt( FALSE )
+ bIsOnlyTxtFlagInit( sal_False ), bIsOnlyTxt( sal_False )
{
nHashS = SwImpBlocks::Hash( rShort );
nHashL = SwImpBlocks::Hash( rLong );
@@ -102,9 +102,9 @@ short SwImpBlocks::GetFileType( const String& rFile )
}
-SwImpBlocks::SwImpBlocks( const String& rFile, BOOL )
- : aFile( rFile ), pDoc( 0 ), nCur( (USHORT)-1 ),
- bReadOnly( TRUE ), bInPutMuchBlocks( FALSE )
+SwImpBlocks::SwImpBlocks( const String& rFile, sal_Bool )
+ : aFile( rFile ), pDoc( 0 ), nCur( (sal_uInt16)-1 ),
+ bReadOnly( sal_True ), bInPutMuchBlocks( sal_False )
{
FStatHelper::GetModifiedDateTimeOfFile( rFile,
&aDateModified, &aTimeModified );
@@ -125,7 +125,7 @@ void SwImpBlocks::ClearDoc()
pDoc->ClearDoc();
}
-ULONG SwImpBlocks::GetDocForConversion( USHORT n )
+sal_uLong SwImpBlocks::GetDocForConversion( sal_uInt16 n )
{
return GetDoc( n );
}
@@ -142,42 +142,42 @@ SwPaM* SwImpBlocks::MakePaM()
}
-USHORT SwImpBlocks::GetCount() const
+sal_uInt16 SwImpBlocks::GetCount() const
{
return aNames.Count();
}
// Case Insensitive
-USHORT SwImpBlocks::GetIndex( const String& rShort ) const
+sal_uInt16 SwImpBlocks::GetIndex( const String& rShort ) const
{
String s( GetAppCharClass().upper( rShort ) );
- USHORT nHash = Hash( s );
- for( USHORT i = 0; i < aNames.Count(); i++ )
+ sal_uInt16 nHash = Hash( s );
+ for( sal_uInt16 i = 0; i < aNames.Count(); i++ )
{
SwBlockName* pName = aNames[ i ];
if( pName->nHashS == nHash
&& pName->aShort == s )
return i;
}
- return (USHORT) -1;
+ return (sal_uInt16) -1;
}
-USHORT SwImpBlocks::GetLongIndex( const String& rLong ) const
+sal_uInt16 SwImpBlocks::GetLongIndex( const String& rLong ) const
{
- USHORT nHash = Hash( rLong );
- for( USHORT i = 0; i < aNames.Count(); i++ )
+ sal_uInt16 nHash = Hash( rLong );
+ for( sal_uInt16 i = 0; i < aNames.Count(); i++ )
{
SwBlockName* pName = aNames[ i ];
if( pName->nHashL == nHash
&& pName->aLong == rLong )
return i;
}
- return (USHORT) -1;
+ return (sal_uInt16) -1;
}
-const String& SwImpBlocks::GetShortName( USHORT n ) const
+const String& SwImpBlocks::GetShortName( sal_uInt16 n ) const
{
if( n < aNames.Count() )
return aNames[ n ]->aShort;
@@ -185,14 +185,14 @@ const String& SwImpBlocks::GetShortName( USHORT n ) const
}
-const String& SwImpBlocks::GetLongName( USHORT n ) const
+const String& SwImpBlocks::GetLongName( sal_uInt16 n ) const
{
if( n < aNames.Count() )
return aNames[ n ]->aLong;
return aEmptyStr;
}
-const String& SwImpBlocks::GetPackageName( USHORT n ) const
+const String& SwImpBlocks::GetPackageName( sal_uInt16 n ) const
{
if( n < aNames.Count() )
return aNames[ n ]->aPackageName;
@@ -200,20 +200,20 @@ const String& SwImpBlocks::GetPackageName( USHORT n ) const
}
void SwImpBlocks::AddName( const String& rShort, const String& rLong,
- BOOL bOnlyTxt )
+ sal_Bool bOnlyTxt )
{
- USHORT nIdx = GetIndex( rShort );
- if( nIdx != (USHORT) -1 )
+ sal_uInt16 nIdx = GetIndex( rShort );
+ if( nIdx != (sal_uInt16) -1 )
aNames.DeleteAndDestroy( nIdx );
SwBlockName* pNew = new SwBlockName( rShort, rLong, 0L );
- pNew->bIsOnlyTxtFlagInit = TRUE;
+ pNew->bIsOnlyTxtFlagInit = sal_True;
pNew->bIsOnlyTxt = bOnlyTxt;
aNames.C40_PTR_INSERT( SwBlockName, pNew );
}
-BOOL SwImpBlocks::IsFileChanged() const
+sal_Bool SwImpBlocks::IsFileChanged() const
{
Date aTempDateModified( aDateModified );
Time aTempTimeModified( aTimeModified );
@@ -230,25 +230,25 @@ void SwImpBlocks::Touch()
&aDateModified, &aTimeModified );
}
-BOOL SwImpBlocks::IsOnlyTextBlock( const String& ) const
+sal_Bool SwImpBlocks::IsOnlyTextBlock( const String& ) const
{
- return FALSE;
+ return sal_False;
}
-ULONG SwImpBlocks::GetMacroTable( USHORT, SvxMacroTableDtor&, sal_Bool )
+sal_uLong SwImpBlocks::GetMacroTable( sal_uInt16, SvxMacroTableDtor&, sal_Bool )
{
return 0;
}
-ULONG SwImpBlocks::SetMacroTable( USHORT ,
+sal_uLong SwImpBlocks::SetMacroTable( sal_uInt16 ,
const SvxMacroTableDtor& , sal_Bool )
{
return 0;
}
-BOOL SwImpBlocks::PutMuchEntries( BOOL )
+sal_Bool SwImpBlocks::PutMuchEntries( sal_Bool )
{
- return FALSE;
+ return sal_False;
}
////////////////////////////////////////////////////////////////////////////
@@ -286,37 +286,37 @@ void SwTextBlocks::SetName( const String& r )
}
-BOOL SwTextBlocks::IsOld() const
+sal_Bool SwTextBlocks::IsOld() const
{
if (pImp)
{
short nType = pImp->GetFileType();
if (SWBLK_SW3 == nType || SWBLK_SW2 == nType )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-USHORT SwTextBlocks::GetCount() const
+sal_uInt16 SwTextBlocks::GetCount() const
{
return pImp ? pImp->GetCount() : 0;
}
-USHORT SwTextBlocks::GetIndex( const String& r ) const
+sal_uInt16 SwTextBlocks::GetIndex( const String& r ) const
{
- return pImp ? pImp->GetIndex( r ) : (USHORT) -1;
+ return pImp ? pImp->GetIndex( r ) : (sal_uInt16) -1;
}
-USHORT SwTextBlocks::GetLongIndex( const String& r ) const
+sal_uInt16 SwTextBlocks::GetLongIndex( const String& r ) const
{
- return pImp ? (USHORT)(pImp->GetLongIndex( r )) : (USHORT) -1;
+ return pImp ? (sal_uInt16)(pImp->GetLongIndex( r )) : (sal_uInt16) -1;
}
-const String& SwTextBlocks::GetShortName( USHORT n ) const
+const String& SwTextBlocks::GetShortName( sal_uInt16 n ) const
{
if( pImp )
return pImp->GetShortName( n );
@@ -324,7 +324,7 @@ const String& SwTextBlocks::GetShortName( USHORT n ) const
}
-const String& SwTextBlocks::GetLongName( USHORT n ) const
+const String& SwTextBlocks::GetLongName( sal_uInt16 n ) const
{
if( pImp )
return pImp->GetLongName( n );
@@ -332,34 +332,34 @@ const String& SwTextBlocks::GetLongName( USHORT n ) const
}
-BOOL SwTextBlocks::Delete( USHORT n )
+sal_Bool SwTextBlocks::Delete( sal_uInt16 n )
{
if( pImp && !pImp->bInPutMuchBlocks )
{
if( pImp->IsFileChanged() )
nErr = ERR_TXTBLOCK_NEWFILE_ERROR;
- else if( 0 == (nErr = pImp->OpenFile( FALSE ) ))
+ else if( 0 == (nErr = pImp->OpenFile( sal_False ) ))
{
nErr = pImp->Delete( n );
if( !nErr )
pImp->aNames.DeleteAndDestroy( n );
if( n == pImp->nCur )
- pImp->nCur = (USHORT) -1;
+ pImp->nCur = (sal_uInt16) -1;
if( !nErr )
nErr = pImp->MakeBlockList();
}
pImp->CloseFile();
pImp->Touch();
- return BOOL( nErr == 0 );
+ return sal_Bool( nErr == 0 );
}
- return FALSE;
+ return sal_False;
}
-USHORT SwTextBlocks::Rename( USHORT n, const String* s, const String* l )
+sal_uInt16 SwTextBlocks::Rename( sal_uInt16 n, const String* s, const String* l )
{
- USHORT nIdx = (USHORT)-1;
+ sal_uInt16 nIdx = (sal_uInt16)-1;
if( pImp && !pImp->bInPutMuchBlocks )
{
pImp->nCur = nIdx;
@@ -371,19 +371,19 @@ USHORT SwTextBlocks::Rename( USHORT n, const String* s, const String* l )
if( !aNew.Len() )
{
OSL_ENSURE( !this, "Kein Kurzname in Rename angegeben" );
- nErr = ERR_SWG_INTERNAL_ERROR; return (USHORT) -1;
+ nErr = ERR_SWG_INTERNAL_ERROR; return (sal_uInt16) -1;
}
if( pImp->IsFileChanged() )
nErr = ERR_TXTBLOCK_NEWFILE_ERROR;
- else if( 0 == ( nErr = pImp->OpenFile( FALSE )))
+ else if( 0 == ( nErr = pImp->OpenFile( sal_False )))
{
// Vorher den neuen Eintrag in die Liste setzen!
GetAppCharClass().toUpper( aNew );
nErr = pImp->Rename( n, aNew, aLong );
if( !nErr )
{
- BOOL bOnlyTxt = pImp->aNames[ n ]->bIsOnlyTxt;
+ sal_Bool bOnlyTxt = pImp->aNames[ n ]->bIsOnlyTxt;
pImp->aNames.DeleteAndDestroy( n );
pImp->AddName( aNew, aLong, bOnlyTxt );
nErr = pImp->MakeBlockList();
@@ -397,15 +397,15 @@ USHORT SwTextBlocks::Rename( USHORT n, const String* s, const String* l )
return nIdx;
}
-ULONG SwTextBlocks::CopyBlock( SwTextBlocks& rSource, String& rSrcShort,
+sal_uLong SwTextBlocks::CopyBlock( SwTextBlocks& rSource, String& rSrcShort,
const String& rLong )
{
- BOOL bIsOld = FALSE;
+ sal_Bool bIsOld = sal_False;
if (rSource.pImp)
{
short nType = rSource.pImp->GetFileType();
if (SWBLK_SW2 == nType || SWBLK_SW3 == nType )
- bIsOld = TRUE;
+ bIsOld = sal_True;
}
if( bIsOld ) //rSource.IsOld() )
nErr = ERR_SWG_OLD_GLOSSARY;
@@ -416,29 +416,29 @@ ULONG SwTextBlocks::CopyBlock( SwTextBlocks& rSource, String& rSrcShort,
return nErr;
}
-BOOL SwTextBlocks::BeginGetDoc( USHORT n )
+sal_Bool SwTextBlocks::BeginGetDoc( sal_uInt16 n )
{
if( pImp && !pImp->bInPutMuchBlocks )
{
// diese Optimierierung darf es nicht mehr geben. OLE-Objecte muessen auf
// ihre SubStorages zugreifem koennen!
// if( n == pImp->nCur )
-// return TRUE;
+// return sal_True;
if( pImp->IsFileChanged() )
nErr = ERR_TXTBLOCK_NEWFILE_ERROR;
- else if( 0 == ( nErr = pImp->OpenFile( TRUE )))
+ else if( 0 == ( nErr = pImp->OpenFile( sal_True )))
{
pImp->ClearDoc();
nErr = pImp->GetDoc( n );
if( nErr )
- pImp->nCur = (USHORT)-1;
+ pImp->nCur = (sal_uInt16)-1;
else
pImp->nCur = n;
}
- return BOOL( nErr == 0 );
+ return sal_Bool( nErr == 0 );
}
- return FALSE;
+ return sal_False;
}
@@ -449,17 +449,17 @@ void SwTextBlocks::EndGetDoc()
}
-BOOL SwTextBlocks::BeginPutDoc( const String& s, const String& l )
+sal_Bool SwTextBlocks::BeginPutDoc( const String& s, const String& l )
{
if( pImp )
{
- BOOL bOk = pImp->bInPutMuchBlocks;
+ sal_Bool bOk = pImp->bInPutMuchBlocks;
if( !bOk )
{
if( pImp->IsFileChanged() )
nErr = ERR_TXTBLOCK_NEWFILE_ERROR;
else
- nErr = pImp->OpenFile( FALSE );
+ nErr = pImp->OpenFile( sal_False );
bOk = 0 == nErr;
}
if( bOk )
@@ -475,16 +475,16 @@ BOOL SwTextBlocks::BeginPutDoc( const String& s, const String& l )
}
-USHORT SwTextBlocks::PutDoc()
+sal_uInt16 SwTextBlocks::PutDoc()
{
- USHORT nIdx = (USHORT)-1;
+ sal_uInt16 nIdx = (sal_uInt16)-1;
if( pImp )
{
nErr = pImp->PutDoc();
if( !nErr )
{
pImp->nCur = GetIndex( pImp->aShort );
- if( pImp->nCur != (USHORT) -1 )
+ if( pImp->nCur != (sal_uInt16) -1 )
pImp->aNames[ pImp->nCur ]->aLong = pImp->aLong;
else
{
@@ -504,19 +504,19 @@ USHORT SwTextBlocks::PutDoc()
return nIdx;
}
-USHORT SwTextBlocks::PutText( const String& rShort, const String& rName,
+sal_uInt16 SwTextBlocks::PutText( const String& rShort, const String& rName,
const String& rTxt )
{
- USHORT nIdx = (USHORT) -1;
+ sal_uInt16 nIdx = (sal_uInt16) -1;
if( pImp )
{
- BOOL bOk = pImp->bInPutMuchBlocks;
+ sal_Bool bOk = pImp->bInPutMuchBlocks;
if( !bOk )
{
if( pImp->IsFileChanged() )
nErr = ERR_TXTBLOCK_NEWFILE_ERROR;
else
- nErr = pImp->OpenFile( FALSE );
+ nErr = pImp->OpenFile( sal_False );
bOk = 0 == nErr;
}
if( bOk )
@@ -524,15 +524,15 @@ USHORT SwTextBlocks::PutText( const String& rShort, const String& rName,
String aNew( rShort );
GetAppCharClass().toUpper( aNew );
nErr = pImp->PutText( aNew, rName, rTxt );
- pImp->nCur = (USHORT) -1;
+ pImp->nCur = (sal_uInt16) -1;
if( !nErr )
{
nIdx = GetIndex( pImp->aShort );
- if( nIdx != (USHORT) -1 )
+ if( nIdx != (sal_uInt16) -1 )
pImp->aNames[ nIdx ]->aLong = rName;
else
{
- pImp->AddName( pImp->aShort, rName, TRUE );
+ pImp->AddName( pImp->aShort, rName, sal_True );
nIdx = pImp->GetIndex( pImp->aShort );
}
if( !pImp->bInPutMuchBlocks )
@@ -561,7 +561,7 @@ void SwTextBlocks::ClearDoc()
{
if( pImp )
pImp->ClearDoc();
- pImp->nCur = (USHORT) -1;
+ pImp->nCur = (sal_uInt16) -1;
}
@@ -571,22 +571,22 @@ const String& SwTextBlocks::GetFileName() const
}
-BOOL SwTextBlocks::IsReadOnly() const
+sal_Bool SwTextBlocks::IsReadOnly() const
{
return pImp->bReadOnly;
}
-BOOL SwTextBlocks::IsOnlyTextBlock( USHORT nIdx ) const
+sal_Bool SwTextBlocks::IsOnlyTextBlock( sal_uInt16 nIdx ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pImp && !pImp->bInPutMuchBlocks )
{
SwBlockName* pBlkNm = pImp->aNames[ nIdx ];
if( !pBlkNm->bIsOnlyTxtFlagInit &&
- !pImp->IsFileChanged() && !pImp->OpenFile( TRUE ) )
+ !pImp->IsFileChanged() && !pImp->OpenFile( sal_True ) )
{
pBlkNm->bIsOnlyTxt = pImp->IsOnlyTextBlock( pBlkNm->aShort );
- pBlkNm->bIsOnlyTxtFlagInit = TRUE;
+ pBlkNm->bIsOnlyTxtFlagInit = sal_True;
pImp->CloseFile();
}
bRet = pBlkNm->bIsOnlyTxt;
@@ -594,9 +594,9 @@ BOOL SwTextBlocks::IsOnlyTextBlock( USHORT nIdx ) const
return bRet;
}
-BOOL SwTextBlocks::IsOnlyTextBlock( const String& rShort ) const
+sal_Bool SwTextBlocks::IsOnlyTextBlock( const String& rShort ) const
{
- USHORT nIdx = pImp->GetIndex( rShort );
+ sal_uInt16 nIdx = pImp->GetIndex( rShort );
if( USHRT_MAX != nIdx )
{
if( pImp->aNames[ nIdx ]->bIsOnlyTxtFlagInit )
@@ -605,38 +605,38 @@ BOOL SwTextBlocks::IsOnlyTextBlock( const String& rShort ) const
}
OSL_ENSURE( !this, "ungueltiger Name" );
- return FALSE;
+ return sal_False;
}
-BOOL SwTextBlocks::GetMacroTable( USHORT nIdx, SvxMacroTableDtor& rMacroTbl )
+sal_Bool SwTextBlocks::GetMacroTable( sal_uInt16 nIdx, SvxMacroTableDtor& rMacroTbl )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if ( pImp && !pImp->bInPutMuchBlocks )
bRet = ( 0 == pImp->GetMacroTable( nIdx, rMacroTbl ) );
return bRet;
}
-BOOL SwTextBlocks::SetMacroTable( USHORT nIdx,
+sal_Bool SwTextBlocks::SetMacroTable( sal_uInt16 nIdx,
const SvxMacroTableDtor& rMacroTbl )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if ( pImp && !pImp->bInPutMuchBlocks )
bRet = ( 0 == pImp->SetMacroTable( nIdx, rMacroTbl ) );
return bRet;
}
-BOOL SwTextBlocks::StartPutMuchBlockEntries()
+sal_Bool SwTextBlocks::StartPutMuchBlockEntries()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !IsOld() && pImp )
- bRet = pImp->PutMuchEntries( TRUE );
+ bRet = pImp->PutMuchEntries( sal_True );
return bRet;
}
void SwTextBlocks::EndPutMuchBlockEntries()
{
if( pImp )
- pImp->PutMuchEntries( FALSE );
+ pImp->PutMuchEntries( sal_False );
}
String SwTextBlocks::GetBaseURL() const
diff --git a/sw/source/core/table/makefile.mk b/sw/source/core/table/makefile.mk
deleted file mode 100644
index d63101e30a7e..000000000000
--- a/sw/source/core/table/makefile.mk
+++ /dev/null
@@ -1,48 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=tablecore
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/swtable.obj \
- $(SLO)$/swnewtable.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx
index c301d06b4f07..b184909ea25a 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -33,13 +33,14 @@
#include <tblsel.hxx>
#include <tblrwcl.hxx>
#include <node.hxx>
-#include <undobj.hxx>
+#include <UndoTable.hxx>
#include <pam.hxx>
#include <frmfmt.hxx>
#include <frmatr.hxx>
#include <cellfrm.hxx>
#include <fmtfsize.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <vector>
#include <set>
#include <list>
@@ -88,18 +89,18 @@ the boxes to remove
@param pUndo
the undo object to notify, maybe empty
-@return TRUE for compatibility reasons with OldMerge(..)
+@return sal_True for compatibility reasons with OldMerge(..)
*/
-BOOL SwTable::NewMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
+sal_Bool SwTable::NewMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
const SwSelBoxes& rMerged, SwTableBox*, SwUndoTblMerge* pUndo )
{
if( pUndo )
pUndo->SetSelBoxes( rBoxes );
- DeleteSel( pDoc, rBoxes, &rMerged, 0, TRUE, TRUE );
+ DeleteSel( pDoc, rBoxes, &rMerged, 0, sal_True, sal_True );
CHECK_TABLE( *this )
- return TRUE;
+ return sal_True;
}
/** lcl_CheckMinMax helps evaluating (horizontal) min/max of boxes
@@ -125,7 +126,7 @@ if bSet is true, rMin and rMax will be set to the left and right border of the b
*/
-void lcl_CheckMinMax( long& rMin, long& rMax, const SwTableLine& rLine, USHORT nCheck, bool bSet )
+void lcl_CheckMinMax( long& rMin, long& rMax, const SwTableLine& rLine, sal_uInt16 nCheck, bool bSet )
{
++nCheck;
if( rLine.GetTabBoxes().Count() < nCheck )
@@ -136,7 +137,7 @@ void lcl_CheckMinMax( long& rMin, long& rMax, const SwTableLine& rLine, USHORT n
long nNew = 0; // will be the right border of the current box
long nWidth = 0; // the width of the current box
- for( USHORT nCurrBox = 0; nCurrBox < nCheck; ++nCurrBox )
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nCheck; ++nCurrBox )
{
SwTableBox* pBox = rLine.GetTabBoxes()[nCurrBox];
OSL_ENSURE( pBox, "Missing table box" );
@@ -169,8 +170,8 @@ long lcl_Box2LeftBorder( const SwTableBox& rBox )
return 0;
long nLeft = 0;
const SwTableLine &rLine = *rBox.GetUpper();
- USHORT nCount = rLine.GetTabBoxes().Count();
- for( USHORT nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
+ sal_uInt16 nCount = rLine.GetTabBoxes().Count();
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
{
SwTableBox* pBox = rLine.GetTabBoxes()[nCurrBox];
OSL_ENSURE( pBox, "Missing table box" );
@@ -203,8 +204,8 @@ SwTableBox* lcl_LeftBorder2Box( long nLeft, const SwTableLine* pLine )
if( !pLine )
return 0;
long nCurrLeft = 0;
- USHORT nCount = pLine->GetTabBoxes().Count();
- for( USHORT nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
+ sal_uInt16 nCount = pLine->GetTabBoxes().Count();
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox];
OSL_ENSURE( pBox, "Missing table box" );
@@ -249,7 +250,7 @@ false is also needed for deleted rows
*/
void lcl_ChangeRowSpan( const SwTable& rTable, const long nDiff,
- USHORT nRowIdx, const bool bSingle )
+ sal_uInt16 nRowIdx, const bool bSingle )
{
if( !nDiff || nRowIdx >= rTable.GetTabLines().Count() )
return;
@@ -267,8 +268,8 @@ void lcl_ChangeRowSpan( const SwTable& rTable, const long nDiff,
bGoOn = false; // will be set to true if we found a non-master cell
// which has to be manipulated => we have to chekc the previous row, too.
const SwTableLine* pLine = rTable.GetTabLines()[ nRowIdx ];
- USHORT nBoxCount = pLine->GetTabBoxes().Count();
- for( USHORT nCurrBox = 0; nCurrBox < nBoxCount; ++nCurrBox )
+ sal_uInt16 nBoxCount = pLine->GetTabBoxes().Count();
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nBoxCount; ++nCurrBox )
{
long nRowSpan = pLine->GetTabBoxes()[nCurrBox]->getRowSpan();
long nAbsSpan = nRowSpan > 0 ? nRowSpan : -nRowSpan;
@@ -330,16 +331,16 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
if( !pStartNd || !pEndNd || pStartNd == pEndNd )
return 0;
- USHORT nLines = aLines.Count();
- USHORT nTop = 0, nBottom = 0;
+ sal_uInt16 nLines = aLines.Count();
+ sal_uInt16 nTop = 0, nBottom = 0;
long nMin = 0, nMax = 0;
int nFound = 0;
- for( USHORT nRow = 0; nFound < 2 && nRow < nLines; ++nRow )
+ for( sal_uInt16 nRow = 0; nFound < 2 && nRow < nLines; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
OSL_ENSURE( pLine, "Missing table line" );
- USHORT nCols = pLine->GetTabBoxes().Count();
- for( USHORT nCol = 0; nCol < nCols; ++nCol )
+ sal_uInt16 nCols = pLine->GetTabBoxes().Count();
+ for( sal_uInt16 nCol = 0; nCol < nCols; ++nCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCol];
OSL_ENSURE( pBox, "Missing table box" );
@@ -369,12 +370,12 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
SwBoxSelection* pRet = new SwBoxSelection();
std::list< std::pair< SwTableBox*, long > > aNewWidthList;
- USHORT nCheckBottom = nBottom;
+ sal_uInt16 nCheckBottom = nBottom;
long nLeftSpan = 0;
long nRightSpan = 0;
long nLeftSpanCnt = 0;
long nRightSpanCnt = 0;
- for( USHORT nRow = nTop; nRow <= nBottom && bOkay; ++nRow )
+ for( sal_uInt16 nRow = nTop; nRow <= nBottom && bOkay; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
OSL_ENSURE( pLine, "Missing table line" );
@@ -382,8 +383,8 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
long nLeft = 0;
long nRight = 0;
long nRowSpan = 1;
- USHORT nCount = pLine->GetTabBoxes().Count();
- for( USHORT nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
+ sal_uInt16 nCount = pLine->GetTabBoxes().Count();
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox];
OSL_ENSURE( pBox, "Missing table box" );
@@ -445,9 +446,9 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
break;
}
if( nRowSpan > 1 && nRow + nRowSpan - 1 > nBottom )
- nBottom = nRow + (USHORT)nRowSpan - 1;
+ nBottom = nRow + (sal_uInt16)nRowSpan - 1;
if( nRowSpan < -1 && nRow - nRowSpan - 1 > nBottom )
- nBottom = (USHORT)(nRow - nRowSpan - 1);
+ nBottom = (sal_uInt16)(nRow - nRowSpan - 1);
if( nRightSpanCnt && nRight == nMax )
bOkay = false;
}
@@ -482,9 +483,9 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
{
long nTmpSpan = pInnerBox->getRowSpan();
if( nTmpSpan > 1 )
- nBottom += (USHORT)nTmpSpan - 1;
+ nBottom += (sal_uInt16)nTmpSpan - 1;
else if( nTmpSpan < -1 )
- nBottom = (USHORT)( nBottom - nTmpSpan - 1 );
+ nBottom = (sal_uInt16)( nBottom - nTmpSpan - 1 );
}
SwTableBox* pOuterBox = pLeftBox;
do
@@ -494,7 +495,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
long nOutSpan = pOuterBox->getRowSpan();
if( nOutSpan != 1 )
{
- USHORT nCheck = nRow;
+ sal_uInt16 nCheck = nRow;
if( nOutSpan < 0 )
{
const SwTableBox& rBox =
@@ -532,7 +533,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
nRightSpanCnt = nOutSpan;
}
}
- nCheck += (USHORT)nOutSpan - 1;
+ nCheck += (sal_uInt16)nOutSpan - 1;
if( nCheck > nCheckBottom )
nCheckBottom = nCheck;
}
@@ -607,19 +608,19 @@ void lcl_InvalidateCellFrm( const SwTableBox& rBox )
when a selection of cells is given and returns the average cell widths
*/
-long lcl_InsertPosition( SwTable &rTable, std::vector<USHORT>& rInsPos,
- const SwSelBoxes& rBoxes, BOOL bBehind )
+long lcl_InsertPosition( SwTable &rTable, std::vector<sal_uInt16>& rInsPos,
+ const SwSelBoxes& rBoxes, sal_Bool bBehind )
{
sal_Int32 nAddWidth = 0;
long nCount = 0;
- for( USHORT j = 0; j < rBoxes.Count(); ++j )
+ for( sal_uInt16 j = 0; j < rBoxes.Count(); ++j )
{
SwTableBox *pBox = rBoxes[j];
SwTableLine* pLine = pBox->GetUpper();
long nWidth = rBoxes[j]->GetFrmFmt()->GetFrmSize().GetWidth();
nAddWidth += nWidth;
- USHORT nCurrBox = pLine->GetTabBoxes().C40_GETPOS(SwTableBox, pBox );
- USHORT nCurrLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pLine );
+ sal_uInt16 nCurrBox = pLine->GetTabBoxes().C40_GETPOS(SwTableBox, pBox );
+ sal_uInt16 nCurrLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pLine );
OSL_ENSURE( nCurrLine != USHRT_MAX, "Time to say Good-Bye.." );
if( rInsPos[ nCurrLine ] == USHRT_MAX )
{
@@ -653,18 +654,18 @@ insertion behind (true) or before (false) the selected boxes
*/
-BOOL SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
- USHORT nCnt, BOOL bBehind )
+sal_Bool SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
+ sal_uInt16 nCnt, sal_Bool bBehind )
{
if( !aLines.Count() || !nCnt )
- return FALSE;
+ return sal_False;
CHECK_TABLE( *this )
long nNewBoxWidth = 0;
- std::vector< USHORT > aInsPos( aLines.Count(), USHRT_MAX );
+ std::vector< sal_uInt16 > aInsPos( aLines.Count(), USHRT_MAX );
{ // Calculation of the insert positions and the width of the new boxes
sal_uInt64 nTableWidth = 0;
- for( USHORT i = 0; i < aLines[0]->GetTabBoxes().Count(); ++i )
+ for( sal_uInt16 i = 0; i < aLines[0]->GetTabBoxes().Count(); ++i )
nTableWidth += aLines[0]->GetTabBoxes()[i]->GetFrmFmt()->GetFrmSize().GetWidth();
// Fill the vector of insert positions and the (average) width to insert
@@ -679,12 +680,12 @@ BOOL SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
nAddWidth *= nCnt; // we have to insert nCnt boxes per line
sal_uInt64 nResultingWidth = nAddWidth + nTableWidth;
if( !nResultingWidth )
- return FALSE;
+ return sal_False;
nAddWidth = (nAddWidth * nTableWidth) / nResultingWidth;
nNewBoxWidth = long( nAddWidth / nCnt ); // Rounding
nAddWidth = nNewBoxWidth * nCnt; // Rounding
if( !nAddWidth || nAddWidth >= nTableWidth )
- return FALSE;
+ return sal_False;
AdjustWidths( static_cast< long >(nTableWidth), static_cast< long >(nTableWidth - nAddWidth) );
}
@@ -694,13 +695,13 @@ BOOL SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
SwTableNode* pTblNd = GetTableNode();
std::vector<SwTableBoxFmt*> aInsFormat( nCnt, 0 );
- USHORT nLastLine = USHRT_MAX;
+ sal_uInt16 nLastLine = USHRT_MAX;
long nLastRowSpan = 1;
- for( USHORT i = 0; i < aLines.Count(); ++i )
+ for( sal_uInt16 i = 0; i < aLines.Count(); ++i )
{
SwTableLine* pLine = aLines[ i ];
- USHORT nInsPos = aInsPos[i];
+ sal_uInt16 nInsPos = aInsPos[i];
OSL_ENSURE( nInsPos != USHRT_MAX, "Didn't found insert position" );
SwTableBox* pBox = pLine->GetTabBoxes()[ nInsPos ];
if( bBehind )
@@ -717,10 +718,10 @@ BOOL SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
while( nLastLine < i )
{
SwTableLine* pTmpLine = aLines[ nLastLine ];
- USHORT nTmpPos = aInsPos[nLastLine];
+ sal_uInt16 nTmpPos = aInsPos[nLastLine];
if( bBehind )
++nTmpPos;
- for( USHORT j = 0; j < nCnt; ++j )
+ for( sal_uInt16 j = 0; j < nCnt; ++j )
pTmpLine->GetTabBoxes()[nTmpPos+j]->setRowSpan( nDiff );
if( nDiff > 0 )
nDiff = -nDiff;
@@ -745,7 +746,7 @@ BOOL SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
pNoRightBorder = new SvxBoxItem( aSelBoxItem );
pNoRightBorder->SetLine( 0, BOX_LINE_RIGHT );
}
- for( USHORT j = 0; j < nCnt; ++j )
+ for( sal_uInt16 j = 0; j < nCnt; ++j )
{
SwTableBox *pCurrBox = pLine->GetTabBoxes()[nInsPos+j];
if( bNewSpan )
@@ -775,14 +776,14 @@ BOOL SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
{
const SwTableBoxes &rTabBoxes = aLines[0]->GetTabBoxes();
long nNewWidth = 0;
- for( USHORT i = 0; i < rTabBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rTabBoxes.Count(); ++i )
nNewWidth += rTabBoxes[i]->GetFrmFmt()->GetFrmSize().GetWidth();
OSL_ENSURE( nNewWidth > 0, "Very small" );
}
#endif
CHECK_TABLE( *this )
- return TRUE;
+ return sal_True;
}
/** SwTable::PrepareMerge(..) some preparation for the coming Merge(..)
@@ -842,7 +843,7 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
SwPosition aInsPos( *pMergeBox->GetSttNd()->EndOfSectionNode() );
SwPaM aChkPam( aInsPos );
// The number of lines in the selection rectangle: nLineCount
- const USHORT nLineCount = USHORT(pSel->aBoxes.size());
+ const sal_uInt16 nLineCount = sal_uInt16(pSel->aBoxes.size());
// BTW: nLineCount is the rowspan of the new master cell
long nRowSpan = nLineCount;
// We will need the first and last line of the selection
@@ -850,13 +851,13 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
SwTableLine* pFirstLn = 0;
SwTableLine* pLastLn = 0;
// Iteration over the lines of the selection...
- for( USHORT nCurrLine = 0; nCurrLine < nLineCount; ++nCurrLine )
+ for( sal_uInt16 nCurrLine = 0; nCurrLine < nLineCount; ++nCurrLine )
{
// The selected boxes in the current line
const SwSelBoxes* pBoxes = pSel->aBoxes[ nCurrLine ];
- USHORT nColCount = pBoxes->Count();
+ sal_uInt16 nColCount = pBoxes->Count();
// Iteration over the selected cell in the current row
- for( USHORT nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
+ for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pBox = (*pBoxes)[nCurrCol];
rMerged.Insert( pBox );
@@ -889,14 +890,19 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
SwPaM aPam( aInsPos );
aPam.GetPoint()->nNode.Assign( *pBox->GetSttNd()->EndOfSectionNode(), -1 );
SwCntntNode* pCNd = aPam.GetCntntNode();
- USHORT nL = pCNd ? pCNd->Len() : 0;
+ sal_uInt16 nL = pCNd ? pCNd->Len() : 0;
aPam.GetPoint()->nContent.Assign( pCNd, nL );
SwNodeIndex aSttNdIdx( *pBox->GetSttNd(), 1 );
+ bool const bUndo = pDoc->GetIDocumentUndoRedo().DoesUndo();
if( pUndo )
- pDoc->DoUndo( FALSE );
+ {
+ pDoc->GetIDocumentUndoRedo().DoUndo(false);
+ }
pDoc->AppendTxtNode( *aPam.GetPoint() );
if( pUndo )
- pDoc->DoUndo( TRUE );
+ {
+ pDoc->GetIDocumentUndoRedo().DoUndo(bUndo);
+ }
SwNodeRange aRg( aSttNdIdx, aPam.GetPoint()->nNode );
if( pUndo )
pUndo->MoveBoxCntnt( pDoc, aRg, rInsPosNd );
@@ -924,11 +930,11 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
// pNewFmt will be set to the new master box and the overlapped cells
SwFrmFmt* pNewFmt = pMergeBox->ClaimFrmFmt();
pNewFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, pSel->mnMergeWidth, 0 ) );
- for( USHORT nCurrLine = 0; nCurrLine < nLineCount; ++nCurrLine )
+ for( sal_uInt16 nCurrLine = 0; nCurrLine < nLineCount; ++nCurrLine )
{
const SwSelBoxes* pBoxes = pSel->aBoxes[ nCurrLine ];
- USHORT nColCount = pBoxes->Count();
- for( USHORT nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
+ sal_uInt16 nColCount = pBoxes->Count();
+ for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pBox = (*pBoxes)[nCurrCol];
if( nCurrCol )
@@ -974,15 +980,15 @@ void SwTable::_FindSuperfluousRows( SwSelBoxes& rBoxes,
pFirstLn = rBoxes[0]->GetUpper();
pLastLn = rBoxes[ rBoxes.Count() - 1 ]->GetUpper();
}
- USHORT nFirstLn = GetTabLines().C40_GETPOS(SwTableLine, pFirstLn );
- USHORT nLastLn = GetTabLines().C40_GETPOS(SwTableLine, pLastLn );
- for( USHORT nRow = nFirstLn; nRow <= nLastLn; ++nRow )
+ sal_uInt16 nFirstLn = GetTabLines().C40_GETPOS(SwTableLine, pFirstLn );
+ sal_uInt16 nLastLn = GetTabLines().C40_GETPOS(SwTableLine, pLastLn );
+ for( sal_uInt16 nRow = nFirstLn; nRow <= nLastLn; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
OSL_ENSURE( pLine, "Missing table line" );
- USHORT nCols = pLine->GetTabBoxes().Count();
+ sal_uInt16 nCols = pLine->GetTabBoxes().Count();
bool bSuperfl = true;
- for( USHORT nCol = 0; nCol < nCols; ++nCol )
+ for( sal_uInt16 nCol = 0; nCol < nCols; ++nCol )
{
SwTableBox *pBox = pLine->GetTabBoxes()[nCol];
if( pBox->getRowSpan() > 0 &&
@@ -994,7 +1000,7 @@ void SwTable::_FindSuperfluousRows( SwSelBoxes& rBoxes,
}
if( bSuperfl )
{
- for( USHORT nCol = 0; nCol < nCols; ++nCol )
+ for( sal_uInt16 nCol = 0; nCol < nCols; ++nCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCol];
rBoxes.Insert( pBox );
@@ -1007,7 +1013,7 @@ void SwTable::_FindSuperfluousRows( SwSelBoxes& rBoxes,
overlaps the given cell, it maybe the cell itself.
*/
-SwTableBox& SwTableBox::FindStartOfRowSpan( const SwTable& rTable, USHORT nMaxStep )
+SwTableBox& SwTableBox::FindStartOfRowSpan( const SwTable& rTable, sal_uInt16 nMaxStep )
{
if( getRowSpan() > 0 || !nMaxStep )
return *this;
@@ -1015,7 +1021,7 @@ SwTableBox& SwTableBox::FindStartOfRowSpan( const SwTable& rTable, USHORT nMaxSt
long nLeftBorder = lcl_Box2LeftBorder( *this );
SwTableBox* pBox = this;
const SwTableLine* pMyUpper = GetUpper();
- USHORT nLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pMyUpper );
+ sal_uInt16 nLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pMyUpper );
if( nLine && nLine < rTable.GetTabLines().Count() )
{
SwTableBox* pNext;
@@ -1034,7 +1040,7 @@ SwTableBox& SwTableBox::FindStartOfRowSpan( const SwTable& rTable, USHORT nMaxSt
any. Otherwise the cell itself will returned.
*/
-SwTableBox& SwTableBox::FindEndOfRowSpan( const SwTable& rTable, USHORT nMaxStep )
+SwTableBox& SwTableBox::FindEndOfRowSpan( const SwTable& rTable, sal_uInt16 nMaxStep )
{
long nAbsSpan = getRowSpan();
if( nAbsSpan < 0 )
@@ -1043,9 +1049,9 @@ SwTableBox& SwTableBox::FindEndOfRowSpan( const SwTable& rTable, USHORT nMaxStep
return *this;
if( nMaxStep > --nAbsSpan )
- nMaxStep = (USHORT)nAbsSpan;
+ nMaxStep = (sal_uInt16)nAbsSpan;
const SwTableLine* pMyUpper = GetUpper();
- USHORT nLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pMyUpper );
+ sal_uInt16 nLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pMyUpper );
nMaxStep = nLine + nMaxStep;
if( nMaxStep >= rTable.GetTabLines().Count() )
nMaxStep = rTable.GetTabLines().Count() - 1;
@@ -1069,9 +1075,9 @@ void lcl_getAllMergedBoxes( const SwTable& rTable, SwSelBoxes& rBoxes, SwTableBo
if( pBox->getRowSpan() == 1 )
return;
const SwTableLine* pMyUpper = pBox->GetUpper();
- USHORT nLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pMyUpper );
+ sal_uInt16 nLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pMyUpper );
long nLeftBorder = lcl_Box2LeftBorder( *pBox );
- USHORT nCount = rTable.GetTabLines().Count();
+ sal_uInt16 nCount = rTable.GetTabLines().Count();
while( ++nLine < nCount && pBox && pBox->getRowSpan() != -1 )
{
pBox = lcl_LeftBorder2Box( nLeftBorder, rTable.GetTabLines()[nLine] );
@@ -1084,22 +1090,22 @@ void lcl_getAllMergedBoxes( const SwTable& rTable, SwSelBoxes& rBoxes, SwTableBo
and its overlapped cells to split them into several pieces.
*/
-void lcl_UnMerge( const SwTable& rTable, SwTableBox& rBox, USHORT nCnt,
- BOOL bSameHeight )
+void lcl_UnMerge( const SwTable& rTable, SwTableBox& rBox, sal_uInt16 nCnt,
+ sal_Bool bSameHeight )
{
SwSelBoxes aBoxes;
lcl_getAllMergedBoxes( rTable, aBoxes, rBox );
- USHORT nCount = aBoxes.Count();
+ sal_uInt16 nCount = aBoxes.Count();
if( nCount < 2 )
return;
if( nCnt > nCount )
nCnt = nCount;
- USHORT *pSplitIdx = new USHORT[ nCnt ];
+ sal_uInt16 *pSplitIdx = new sal_uInt16[ nCnt ];
if( bSameHeight )
{
SwTwips *pHeights = new SwTwips[ nCount ];
SwTwips nHeight = 0;
- for( USHORT i = 0; i < nCount; ++i )
+ for( sal_uInt16 i = 0; i < nCount; ++i )
{
SwTableLine* pLine = aBoxes[ i ]->GetUpper();
SwFrmFmt *pRowFmt = pLine->GetFrmFmt();
@@ -1107,8 +1113,8 @@ void lcl_UnMerge( const SwTable& rTable, SwTableBox& rBox, USHORT nCnt,
nHeight += pHeights[ i ];
}
SwTwips nSumH = 0;
- USHORT nIdx = 0;
- for( USHORT i = 1; i <= nCnt; ++i )
+ sal_uInt16 nIdx = 0;
+ for( sal_uInt16 i = 1; i <= nCnt; ++i )
{
SwTwips nSplit = ( i * nHeight ) / nCnt;
while( nSumH < nSplit && nIdx < nCount )
@@ -1120,12 +1126,12 @@ void lcl_UnMerge( const SwTable& rTable, SwTableBox& rBox, USHORT nCnt,
else
{
for( long i = 1; i <= nCnt; ++i )
- pSplitIdx[ i - 1 ] = (USHORT)( ( i * nCount ) / nCnt );
+ pSplitIdx[ i - 1 ] = (sal_uInt16)( ( i * nCount ) / nCnt );
}
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
for( long i = 0; i < nCnt; ++i )
{
- USHORT nNextIdx = pSplitIdx[ i ];
+ sal_uInt16 nNextIdx = pSplitIdx[ i ];
aBoxes[ nIdx ]->setRowSpan( nNextIdx - nIdx );
lcl_InvalidateCellFrm( *aBoxes[ nIdx ] );
while( ++nIdx < nNextIdx )
@@ -1139,8 +1145,8 @@ void lcl_UnMerge( const SwTable& rTable, SwTableBox& rBox, USHORT nCnt,
void lcl_FillSelBoxes( SwSelBoxes &rBoxes, SwTableLine &rLine )
{
- USHORT nBoxCount = rLine.GetTabBoxes().Count();
- USHORT nCurrBox;
+ sal_uInt16 nBoxCount = rLine.GetTabBoxes().Count();
+ sal_uInt16 nCurrBox;
for( nCurrBox = 0; nCurrBox < nBoxCount; ++nCurrBox )
rBoxes.Insert( rLine.GetTabBoxes()[nCurrBox] );
}
@@ -1149,7 +1155,7 @@ void lcl_FillSelBoxes( SwSelBoxes &rBoxes, SwTableLine &rLine )
overlapped cells only. This is a preparation for an upcoming split.
*/
-void SwTable::InsertSpannedRow( SwDoc* pDoc, USHORT nRowIdx, USHORT nCnt )
+void SwTable::InsertSpannedRow( SwDoc* pDoc, sal_uInt16 nRowIdx, sal_uInt16 nCnt )
{
CHECK_TABLE( *this )
OSL_ENSURE( nCnt && nRowIdx < GetTabLines().Count(), "Wrong call of InsertSpannedRow" );
@@ -1166,12 +1172,12 @@ void SwTable::InsertSpannedRow( SwDoc* pDoc, USHORT nRowIdx, USHORT nCnt )
aFSz.SetHeight( nNewHeight );
pFrmFmt->SetFmtAttr( aFSz );
}
- _InsertRow( pDoc, aBoxes, nCnt, TRUE );
- USHORT nBoxCount = rLine.GetTabBoxes().Count();
- for( USHORT n = 0; n < nCnt; ++n )
+ _InsertRow( pDoc, aBoxes, nCnt, sal_True );
+ sal_uInt16 nBoxCount = rLine.GetTabBoxes().Count();
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
SwTableLine *pNewLine = GetTabLines()[ nRowIdx + nCnt - n ];
- for( USHORT nCurrBox = 0; nCurrBox < nBoxCount; ++nCurrBox )
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nBoxCount; ++nCurrBox )
{
long nRowSpan = rLine.GetTabBoxes()[nCurrBox]->getRowSpan();
if( nRowSpan > 0 )
@@ -1183,7 +1189,7 @@ void SwTable::InsertSpannedRow( SwDoc* pDoc, USHORT nRowIdx, USHORT nCnt )
CHECK_TABLE( *this )
}
-typedef std::pair< USHORT, USHORT > SwLineOffset;
+typedef std::pair< sal_uInt16, sal_uInt16 > SwLineOffset;
typedef std::list< SwLineOffset > SwLineOffsetArray;
/******************************************************************************
@@ -1200,24 +1206,24 @@ Output
******************************************************************************/
void lcl_SophisticatedFillLineIndices( SwLineOffsetArray &rArr,
- const SwTable& rTable, const SwSelBoxes& rBoxes, USHORT nCnt )
+ const SwTable& rTable, const SwSelBoxes& rBoxes, sal_uInt16 nCnt )
{
std::list< SwLineOffset > aBoxes;
SwLineOffset aLnOfs( USHRT_MAX, USHRT_MAX );
- for( USHORT i = 0; i < rBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{ // Collect all end line indices and the row spans
const SwTableBox &rBox = rBoxes[ i ]->FindStartOfRowSpan( rTable );
OSL_ENSURE( rBox.getRowSpan() > 0, "Didn't I say 'StartOfRowSpan' ??" );
if( nCnt > rBox.getRowSpan() )
{
const SwTableLine *pLine = rBox.GetUpper();
- const USHORT nEnd = USHORT( rBox.getRowSpan() +
+ const sal_uInt16 nEnd = sal_uInt16( rBox.getRowSpan() +
rTable.GetTabLines().C40_GETPOS( SwTableLine, pLine ) );
// The next if statement is a small optimization
if( aLnOfs.first != nEnd || aLnOfs.second != rBox.getRowSpan() )
{
aLnOfs.first = nEnd; // ok, this is the line behind the box
- aLnOfs.second = USHORT( rBox.getRowSpan() ); // the row span
+ aLnOfs.second = sal_uInt16( rBox.getRowSpan() ); // the row span
aBoxes.insert( aBoxes.end(), aLnOfs );
}
}
@@ -1225,7 +1231,7 @@ void lcl_SophisticatedFillLineIndices( SwLineOffsetArray &rArr,
// As I said, I noted the line index _behind_ the last line of the boxes
// in the resulting array the index has to be _on_ the line
// nSum is to evaluate the wished value
- USHORT nSum = 1;
+ sal_uInt16 nSum = 1;
while( aBoxes.size() )
{
// I. step:
@@ -1294,22 +1300,22 @@ typedef std::set< SwTwips > SwSplitLines;
to be splitted to fulfill the requested "split same height"
*/
-USHORT lcl_CalculateSplitLineHeights( SwSplitLines &rCurr, SwSplitLines &rNew,
- const SwTable& rTable, const SwSelBoxes& rBoxes, USHORT nCnt )
+sal_uInt16 lcl_CalculateSplitLineHeights( SwSplitLines &rCurr, SwSplitLines &rNew,
+ const SwTable& rTable, const SwSelBoxes& rBoxes, sal_uInt16 nCnt )
{
if( nCnt < 2 )
return 0;
std::list< SwLineOffset > aBoxes;
SwLineOffset aLnOfs( USHRT_MAX, USHRT_MAX );
- USHORT nFirst = USHRT_MAX; // becomes the index of the first line
- USHORT nLast = 0; // becomes the index of the last line of the splitting
- for( USHORT i = 0; i < rBoxes.Count(); ++i )
+ sal_uInt16 nFirst = USHRT_MAX; // becomes the index of the first line
+ sal_uInt16 nLast = 0; // becomes the index of the last line of the splitting
+ for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{ // Collect all pairs (start+end) of line indices to split
const SwTableBox &rBox = rBoxes[ i ]->FindStartOfRowSpan( rTable );
OSL_ENSURE( rBox.getRowSpan() > 0, "Didn't I say 'StartOfRowSpan' ??" );
const SwTableLine *pLine = rBox.GetUpper();
- const USHORT nStart = rTable.GetTabLines().C40_GETPOS( SwTableLine, pLine );
- const USHORT nEnd = USHORT( rBox.getRowSpan() + nStart - 1 );
+ const sal_uInt16 nStart = rTable.GetTabLines().C40_GETPOS( SwTableLine, pLine );
+ const sal_uInt16 nEnd = sal_uInt16( rBox.getRowSpan() + nStart - 1 );
// The next if statement is a small optimization
if( aLnOfs.first != nStart || aLnOfs.second != nEnd )
{
@@ -1327,7 +1333,7 @@ USHORT lcl_CalculateSplitLineHeights( SwSplitLines &rCurr, SwSplitLines &rNew,
return 0;
SwTwips nHeight = 0;
SwTwips* pLines = new SwTwips[ nLast + 1 - nFirst ];
- for( USHORT i = nFirst; i <= nLast; ++i )
+ for( sal_uInt16 i = nFirst; i <= nLast; ++i )
{
bool bLayoutAvailable = false;
nHeight += rTable.GetTabLines()[ i ]->GetTableLineHeight( bLayoutAvailable );
@@ -1340,7 +1346,7 @@ USHORT lcl_CalculateSplitLineHeights( SwSplitLines &rCurr, SwSplitLines &rNew,
SwTwips nBase = pSplit->first <= nFirst ? 0 :
pLines[ pSplit->first - nFirst - 1 ];
SwTwips nDiff = pLines[ pSplit->second - nFirst ] - nBase;
- for( USHORT i = 1; i < nCnt; ++i )
+ for( sal_uInt16 i = 1; i < nCnt; ++i )
{
SwTwips nSplit = nBase + ( i * nDiff ) / nCnt;
rNew.insert( nSplit );
@@ -1355,16 +1361,16 @@ USHORT lcl_CalculateSplitLineHeights( SwSplitLines &rCurr, SwSplitLines &rNew,
the box selection.
*/
-USHORT lcl_LineIndex( const SwTable& rTable, const SwSelBoxes& rBoxes,
+sal_uInt16 lcl_LineIndex( const SwTable& rTable, const SwSelBoxes& rBoxes,
bool bBehind )
{
- USHORT nDirect = USHRT_MAX;
- USHORT nSpan = USHRT_MAX;
- for( USHORT i = 0; i < rBoxes.Count(); ++i )
+ sal_uInt16 nDirect = USHRT_MAX;
+ sal_uInt16 nSpan = USHRT_MAX;
+ for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{
SwTableBox *pBox = rBoxes[i];
const SwTableLine* pLine = rBoxes[i]->GetUpper();
- USHORT nPos = rTable.GetTabLines().C40_GETPOS( SwTableLine, pLine );
+ sal_uInt16 nPos = rTable.GetTabLines().C40_GETPOS( SwTableLine, pLine );
if( USHRT_MAX != nPos )
{
if( bBehind )
@@ -1376,7 +1382,7 @@ USHORT lcl_LineIndex( const SwTable& rTable, const SwSelBoxes& rBoxes,
nSpan = 0;
else if( nSpan )
{
- USHORT nEndOfRowSpan = (USHORT)(nPos + nRowSpan - 1);
+ sal_uInt16 nEndOfRowSpan = (sal_uInt16)(nPos + nRowSpan - 1);
if( nEndOfRowSpan > nSpan || nSpan == USHRT_MAX )
nSpan = nEndOfRowSpan;
}
@@ -1393,8 +1399,8 @@ USHORT lcl_LineIndex( const SwTable& rTable, const SwSelBoxes& rBoxes,
/** SwTable::NewSplitRow(..) splits all selected boxes horizontally.
*/
-BOOL SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
- BOOL bSameHeight )
+sal_Bool SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt,
+ sal_Bool bSameHeight )
{
CHECK_TABLE( *this )
++nCnt;
@@ -1405,7 +1411,7 @@ BOOL SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
{
SwSplitLines aRowLines;
SwSplitLines aSplitLines;
- USHORT nFirst = lcl_CalculateSplitLineHeights( aRowLines, aSplitLines,
+ sal_uInt16 nFirst = lcl_CalculateSplitLineHeights( aRowLines, aSplitLines,
*this, rBoxes, nCnt );
aFndBox.DelFrms( *this );
SwTwips nLast = 0;
@@ -1442,7 +1448,7 @@ BOOL SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
else
{
aFndBox.DelFrms( *this );
- bSameHeight = FALSE;
+ bSameHeight = sal_False;
}
if( !bSameHeight )
{
@@ -1456,15 +1462,15 @@ BOOL SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
}
}
- std::set< USHORT> aIndices;
- for( USHORT i = 0; i < rBoxes.Count(); ++i )
+ std::set< sal_uInt16> aIndices;
+ for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{
OSL_ENSURE( rBoxes[i]->getRowSpan() != 1, "Forgot to split?" );
if( rBoxes[i]->getRowSpan() > 1 )
aIndices.insert( i );
}
- std::set< USHORT >::iterator pCurrBox = aIndices.begin();
+ std::set< sal_uInt16 >::iterator pCurrBox = aIndices.begin();
while( pCurrBox != aIndices.end() )
lcl_UnMerge( *this, *rBoxes[*pCurrBox++], nCnt, bSameHeight );
@@ -1472,21 +1478,21 @@ BOOL SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt,
//Layout updaten
aFndBox.MakeFrms( *this );
- return TRUE;
+ return sal_True;
}
/** SwTable::InsertRow(..) inserts one or more rows before or behind the selected
boxes.
*/
-BOOL SwTable::InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
- USHORT nCnt, BOOL bBehind )
+sal_Bool SwTable::InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
+ sal_uInt16 nCnt, sal_Bool bBehind )
{
bool bRet = false;
if( IsNewModel() )
{
CHECK_TABLE( *this )
- USHORT nRowIdx = lcl_LineIndex( *this, rBoxes, bBehind );
+ sal_uInt16 nRowIdx = lcl_LineIndex( *this, rBoxes, bBehind );
if( nRowIdx < USHRT_MAX )
{
_FndBox aFndBox( 0, 0 );
@@ -1498,12 +1504,12 @@ BOOL SwTable::InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
SwSelBoxes aLineBoxes;
lcl_FillSelBoxes( aLineBoxes, *pLine );
_InsertRow( pDoc, aLineBoxes, nCnt, bBehind );
- USHORT nBoxCount = pLine->GetTabBoxes().Count();
- USHORT nOfs = bBehind ? 0 : 1;
- for( USHORT n = 0; n < nCnt; ++n )
+ sal_uInt16 nBoxCount = pLine->GetTabBoxes().Count();
+ sal_uInt16 nOfs = bBehind ? 0 : 1;
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
SwTableLine *pNewLine = GetTabLines()[ nRowIdx+nCnt-n-nOfs];
- for( USHORT nCurrBox = 0; nCurrBox < nBoxCount; ++nCurrBox )
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nBoxCount; ++nCurrBox )
{
long nRowSpan = pLine->GetTabBoxes()[nCurrBox]->getRowSpan();
if( bBehind )
@@ -1545,7 +1551,7 @@ void SwTable::PrepareDelBoxes( const SwSelBoxes& rBoxes )
{
if( IsNewModel() )
{
- for( USHORT i = 0; i < rBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{
SwTableBox* pBox = rBoxes[i];
long nRowSpan = pBox->getRowSpan();
@@ -1553,7 +1559,7 @@ void SwTable::PrepareDelBoxes( const SwSelBoxes& rBoxes )
{
long nLeft = lcl_Box2LeftBorder( *pBox );
SwTableLine *pLine = pBox->GetUpper();
- USHORT nLinePos = GetTabLines().C40_GETPOS(SwTableLine, pLine);
+ sal_uInt16 nLinePos = GetTabLines().C40_GETPOS(SwTableLine, pLine);
OSL_ENSURE( nLinePos < USHRT_MAX, "Box/table mismatch" );
if( nRowSpan > 1 )
{
@@ -1605,8 +1611,8 @@ void lcl_SearchSelBox( const SwTable &rTable, SwSelBoxes& rBoxes, long nMin, lon
long nLeft = 0;
long nRight = 0;
long nMid = ( nMax + nMin )/ 2;
- USHORT nCount = rLine.GetTabBoxes().Count();
- for( USHORT nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
+ sal_uInt16 nCount = rLine.GetTabBoxes().Count();
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
{
SwTableBox* pBox = rLine.GetTabBoxes()[nCurrBox];
OSL_ENSURE( pBox, "Missing table box" );
@@ -1625,7 +1631,7 @@ void lcl_SearchSelBox( const SwTable &rTable, SwSelBoxes& rBoxes, long nMin, lon
( !bChkProtected ||
!pBox->GetFrmFmt()->GetProtect().IsCntntProtected() ) )
{
- USHORT nOldCnt = rBoxes.Count();
+ sal_uInt16 nOldCnt = rBoxes.Count();
rBoxes.Insert( pBox );
if( bColumn && nRowSpan != 1 && nOldCnt < rBoxes.Count() )
{
@@ -1668,13 +1674,13 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
if( rBoxes.Count() )
{
// aKeepBoxes.Insert( &rBoxes );
- rBoxes.Remove( USHORT(0), rBoxes.Count() );
+ rBoxes.Remove( sal_uInt16(0), rBoxes.Count() );
}
// Looking for start and end of the selection given by SwNode-pointer
- USHORT nLines = aLines.Count();
+ sal_uInt16 nLines = aLines.Count();
// nTop becomes the line number of the upper box
// nBottom becomes the line number of the lower box
- USHORT nTop = 0, nBottom = 0;
+ sal_uInt16 nTop = 0, nBottom = 0;
// nUpperMin becomes the left border value of the upper box
// nUpperMax becomes the right border of the upper box
// nLowerMin and nLowerMax the borders of the lower box
@@ -1683,12 +1689,12 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
// nFound will incremented if a box is found
// 0 => no box found; 1 => the upper box has been found; 2 => both found
int nFound = 0;
- for( USHORT nRow = 0; nFound < 2 && nRow < nLines; ++nRow )
+ for( sal_uInt16 nRow = 0; nFound < 2 && nRow < nLines; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
OSL_ENSURE( pLine, "Missing table line" );
- USHORT nCols = pLine->GetTabBoxes().Count();
- for( USHORT nCol = 0; nCol < nCols; ++nCol )
+ sal_uInt16 nCols = pLine->GetTabBoxes().Count();
+ for( sal_uInt16 nCol = 0; nCol < nCols; ++nCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCol];
OSL_ENSURE( pBox, "Missing table box" );
@@ -1728,12 +1734,12 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
// Selection of a row is quiet easy:
// every (unprotected) box between start and end line
// with a positive row span will be collected
- for( USHORT nRow = nTop; nRow <= nBottom; ++nRow )
+ for( sal_uInt16 nRow = nTop; nRow <= nBottom; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
OSL_ENSURE( pLine, "Missing table line" );
- USHORT nCount = pLine->GetTabBoxes().Count();
- for( USHORT nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
+ sal_uInt16 nCount = pLine->GetTabBoxes().Count();
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox];
OSL_ENSURE( pBox, "Missing table box" );
@@ -1772,7 +1778,7 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
const bool bColumn = eSearch == SEARCH_COL;
if( bColumn )
{
- for( USHORT i = 0; i < nTop; ++i )
+ for( sal_uInt16 i = 0; i < nTop; ++i )
lcl_SearchSelBox( *this, rBoxes, nUpperMin, nUpperMax,
*aLines[i], bChkProtected, bColumn );
}
@@ -1780,13 +1786,13 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
{
long nMin = nUpperMin < nLowerMin ? nUpperMin : nLowerMin;
long nMax = nUpperMax < nLowerMax ? nLowerMax : nUpperMax;
- for( USHORT i = nTop; i <= nBottom; ++i )
+ for( sal_uInt16 i = nTop; i <= nBottom; ++i )
lcl_SearchSelBox( *this, rBoxes, nMin, nMax, *aLines[i],
bChkProtected, bColumn );
}
if( bColumn )
{
- for( USHORT i = nBottom + 1; i < nLines; ++i )
+ for( sal_uInt16 i = nBottom + 1; i < nLines; ++i )
lcl_SearchSelBox( *this, rBoxes, nLowerMin, nLowerMax, *aLines[i],
bChkProtected, true );
}
@@ -1804,15 +1810,15 @@ void SwTable::ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax
if( !aLines.Count() || !rBoxes.Count() )
return;
- USHORT nLineCnt = aLines.Count();
- USHORT nBoxCnt = rBoxes.Count();
- USHORT nBox = 0;
- for( USHORT nRow = 0; nRow < nLineCnt && nBox < nBoxCnt; ++nRow )
+ sal_uInt16 nLineCnt = aLines.Count();
+ sal_uInt16 nBoxCnt = rBoxes.Count();
+ sal_uInt16 nBox = 0;
+ for( sal_uInt16 nRow = 0; nRow < nLineCnt && nBox < nBoxCnt; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
OSL_ENSURE( pLine, "Missing table line" );
- USHORT nCols = pLine->GetTabBoxes().Count();
- for( USHORT nCol = 0; nCol < nCols; ++nCol )
+ sal_uInt16 nCols = pLine->GetTabBoxes().Count();
+ for( sal_uInt16 nCol = 0; nCol < nCols; ++nCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCol];
OSL_ENSURE( pBox, "Missing table box" );
@@ -1825,13 +1831,13 @@ void SwTable::ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax
}
}
nBox = 0;
- for( USHORT nRow = 0; nRow < nLineCnt; ++nRow )
+ for( sal_uInt16 nRow = 0; nRow < nLineCnt; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
- USHORT nCols = pLine->GetTabBoxes().Count();
+ sal_uInt16 nCols = pLine->GetTabBoxes().Count();
long nLeft = 0;
long nRight = 0;
- for( USHORT nCurrBox = 0; nCurrBox < nCols; ++nCurrBox )
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nCols; ++nCurrBox )
{
nLeft = nRight;
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox];
@@ -1854,14 +1860,14 @@ void SwTable::PrepareDeleteCol( long nMin, long nMax )
const SwTwips nTabSize = GetFrmFmt()->GetFrmSize().GetWidth();
if( nTabSize == nMax )
nMid = nMax;
- USHORT nLineCnt = aLines.Count();
- for( USHORT nRow = 0; nRow < nLineCnt; ++nRow )
+ sal_uInt16 nLineCnt = aLines.Count();
+ for( sal_uInt16 nRow = 0; nRow < nLineCnt; ++nRow )
{
SwTableLine* pLine = aLines[nRow];
- USHORT nCols = pLine->GetTabBoxes().Count();
+ sal_uInt16 nCols = pLine->GetTabBoxes().Count();
long nLeft = 0;
long nRight = 0;
- for( USHORT nCurrBox = 0; nCurrBox < nCols; ++nCurrBox )
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nCols; ++nCurrBox )
{
nLeft = nRight;
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox];
@@ -1899,7 +1905,7 @@ void SwTable::PrepareDeleteCol( long nMin, long nMax )
void SwTable::ExpandSelection( SwSelBoxes& rBoxes ) const
{
- for( USHORT i = 0; i < rBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{
SwTableBox *pBox = rBoxes[i];
long nRowSpan = pBox->getRowSpan();
@@ -1919,7 +1925,7 @@ void SwTable::ExpandSelection( SwSelBoxes& rBoxes ) const
void SwTable::CheckRowSpan( SwTableLinePtr &rpLine, bool bUp ) const
{
OSL_ENSURE( IsNewModel(), "Don't call me for old tables" );
- USHORT nLineIdx = GetTabLines().C40_GETPOS( SwTableLine, rpLine );
+ sal_uInt16 nLineIdx = GetTabLines().C40_GETPOS( SwTableLine, rpLine );
OSL_ENSURE( nLineIdx < GetTabLines().Count(), "Start line out of range" );
bool bChange = true;
if( bUp )
@@ -1928,8 +1934,8 @@ void SwTable::CheckRowSpan( SwTableLinePtr &rpLine, bool bUp ) const
{
bChange = false;
rpLine = GetTabLines()[ nLineIdx ];
- USHORT nCols = rpLine->GetTabBoxes().Count();
- for( USHORT nCol = 0; !bChange && nCol < nCols; ++nCol )
+ sal_uInt16 nCols = rpLine->GetTabBoxes().Count();
+ for( sal_uInt16 nCol = 0; !bChange && nCol < nCols; ++nCol )
{
SwTableBox* pBox = rpLine->GetTabBoxes()[nCol];
if( pBox->getRowSpan() > 1 || pBox->getRowSpan() < -1 )
@@ -1949,13 +1955,13 @@ void SwTable::CheckRowSpan( SwTableLinePtr &rpLine, bool bUp ) const
}
else
{
- USHORT nMaxLine = GetTabLines().Count();
+ sal_uInt16 nMaxLine = GetTabLines().Count();
while( bChange )
{
bChange = false;
rpLine = GetTabLines()[ nLineIdx ];
- USHORT nCols = rpLine->GetTabBoxes().Count();
- for( USHORT nCol = 0; !bChange && nCol < nCols; ++nCol )
+ sal_uInt16 nCols = rpLine->GetTabBoxes().Count();
+ for( sal_uInt16 nCol = 0; !bChange && nCol < nCols; ++nCol )
{
SwTableBox* pBox = rpLine->GetTabBoxes()[nCol];
if( pBox->getRowSpan() < 0 )
@@ -1978,14 +1984,14 @@ void SwTable::CheckRowSpan( SwTableLinePtr &rpLine, bool bUp ) const
// In a top line no negative row span is allowed, so these have to be corrected.
// If there has been at least one correction, all values are stored
// and can be used by undo of table split
-SwSaveRowSpan::SwSaveRowSpan( SwTableBoxes& rBoxes, USHORT nSplitLn )
+SwSaveRowSpan::SwSaveRowSpan( SwTableBoxes& rBoxes, sal_uInt16 nSplitLn )
: mnSplitLine( nSplitLn )
{
bool bDontSave = true; // nothing changed, nothing to save
- USHORT nColCount = rBoxes.Count();
+ sal_uInt16 nColCount = rBoxes.Count();
OSL_ENSURE( nColCount, "Empty Table Line" );
mnRowSpans.resize( nColCount );
- for( USHORT nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
+ for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pBox = rBoxes[nCurrCol];
OSL_ENSURE( pBox, "Missing Table Box" );
@@ -2008,17 +2014,17 @@ void SwTable::RestoreRowSpan( const SwSaveRowSpan& rSave )
{
if( !IsNewModel() ) // for new model only
return;
- USHORT nLineCount = GetTabLines().Count();
+ sal_uInt16 nLineCount = GetTabLines().Count();
OSL_ENSURE( rSave.mnSplitLine < nLineCount, "Restore behind last line?" );
if( rSave.mnSplitLine < nLineCount )
{
SwTableLine* pLine = GetTabLines()[rSave.mnSplitLine];
- USHORT nColCount = pLine->GetTabBoxes().Count();
+ sal_uInt16 nColCount = pLine->GetTabBoxes().Count();
OSL_ENSURE( nColCount, "Empty Table Line" );
OSL_ENSURE( nColCount == rSave.mnRowSpans.size(), "Wrong row span store" );
if( nColCount == rSave.mnRowSpans.size() )
{
- for( USHORT nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
+ for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrCol];
OSL_ENSURE( pBox, "Missing Table Box" );
@@ -2029,7 +2035,7 @@ void SwTable::RestoreRowSpan( const SwSaveRowSpan& rSave )
OSL_ENSURE( rSave.mnRowSpans[ nCurrCol ] < 0, "Pardon me?!" );
pBox->setRowSpan( -nRowSp );
- USHORT nLine = rSave.mnSplitLine;
+ sal_uInt16 nLine = rSave.mnSplitLine;
if( nLine )
{
long nLeftBorder = lcl_Box2LeftBorder( *pBox );
@@ -2058,7 +2064,7 @@ void SwTable::RestoreRowSpan( const SwSaveRowSpan& rSave )
}
}
-SwSaveRowSpan* SwTable::CleanUpTopRowSpan( USHORT nSplitLine )
+SwSaveRowSpan* SwTable::CleanUpTopRowSpan( sal_uInt16 nSplitLine )
{
SwSaveRowSpan* pRet = 0;
if( !IsNewModel() )
@@ -2072,15 +2078,15 @@ SwSaveRowSpan* SwTable::CleanUpTopRowSpan( USHORT nSplitLine )
return pRet;
}
-void SwTable::CleanUpBottomRowSpan( USHORT nDelLines )
+void SwTable::CleanUpBottomRowSpan( sal_uInt16 nDelLines )
{
if( !IsNewModel() )
return;
- USHORT nLastLine = GetTabLines().Count()-1;
+ sal_uInt16 nLastLine = GetTabLines().Count()-1;
SwTableLine* pLine = GetTabLines()[nLastLine];
- USHORT nColCount = pLine->GetTabBoxes().Count();
+ sal_uInt16 nColCount = pLine->GetTabBoxes().Count();
OSL_ENSURE( nColCount, "Empty Table Line" );
- for( USHORT nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
+ for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrCol];
OSL_ENSURE( pBox, "Missing Table Box" );
@@ -2108,19 +2114,19 @@ void SwTable::CheckConsistency() const
{
if( !IsNewModel() )
return;
- USHORT nLineCount = GetTabLines().Count();
+ sal_uInt16 nLineCount = GetTabLines().Count();
const SwTwips nTabSize = GetFrmFmt()->GetFrmSize().GetWidth();
SwTwips nLineWidth = 0;
std::list< RowSpanCheck > aRowSpanCells;
std::list< RowSpanCheck >::iterator aIter = aRowSpanCells.end();
- for( USHORT nCurrLine = 0; nCurrLine < nLineCount; ++nCurrLine )
+ for( sal_uInt16 nCurrLine = 0; nCurrLine < nLineCount; ++nCurrLine )
{
SwTwips nWidth = 0;
SwTableLine* pLine = GetTabLines()[nCurrLine];
OSL_ENSURE( pLine, "Missing Table Line" );
- USHORT nColCount = pLine->GetTabBoxes().Count();
+ sal_uInt16 nColCount = pLine->GetTabBoxes().Count();
OSL_ENSURE( nColCount, "Empty Table Line" );
- for( USHORT nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
+ for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrCol];
OSL_ENSURE( pBox, "Missing Table Box" );
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index f13e38719ce1..48caff480c7d 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -93,7 +93,7 @@ SV_IMPL_REF( SwServerObject )
#define COLFUZZY 20
void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol,
- BOOL bChgAlign,ULONG nNdPos );
+ sal_Bool bChgAlign,sal_uLong nNdPos );
//----------------------------------
class SwTableBox_Impl
@@ -210,7 +210,7 @@ String& lcl_DelTabsAtSttEnd( String& rTxt )
void _InsTblBox( SwDoc* pDoc, SwTableNode* pTblNd,
SwTableLine* pLine, SwTableBoxFmt* pBoxFrmFmt,
SwTableBox* pBox,
- USHORT nInsPos, USHORT nCnt )
+ sal_uInt16 nInsPos, sal_uInt16 nCnt )
{
OSL_ENSURE( pBox->GetSttNd(), "Box ohne Start-Node" );
SwNodeIndex aIdx( *pBox->GetSttNd(), +1 );
@@ -247,7 +247,7 @@ void _InsTblBox( SwDoc* pDoc, SwTableNode* pTblNd,
if( nRowSpan != 1 )
{
SwTableBoxes& rTblBoxes = pLine->GetTabBoxes();
- for( USHORT i = 0; i < nCnt; ++i )
+ for( sal_uInt16 i = 0; i < nCnt; ++i )
{
pBox = rTblBoxes[ i + nInsPos ];
pBox->setRowSpan( nRowSpan );
@@ -266,8 +266,8 @@ SwTable::SwTable( SwTableFmt* pFmt )
pTableNode( 0 ),
nGrfsThatResize( 0 ),
nRowsToRepeat( 1 ),
- bModifyLocked( FALSE ),
- bNewModel( TRUE )
+ bModifyLocked( sal_False ),
+ bNewModel( sal_True )
{
// default value set in the options
eTblChgMode = (TblChgMode)GetTblChgDefaultMode();
@@ -280,14 +280,14 @@ SwTable::SwTable( const SwTable& rTable )
eTblChgMode( rTable.eTblChgMode ),
nGrfsThatResize( 0 ),
nRowsToRepeat( rTable.GetRowsToRepeat() ),
- bModifyLocked( FALSE ),
+ bModifyLocked( sal_False ),
bNewModel( rTable.bNewModel )
{
}
void DelBoxNode( SwTableSortBoxes& rSortCntBoxes )
{
- for( USHORT n = 0; n < rSortCntBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rSortCntBoxes.Count(); ++n )
rSortCntBoxes[ n ]->pSttNd = 0;
}
@@ -316,7 +316,7 @@ SwTable::~SwTable()
//JP: reicht leider nicht, es muessen die Pointer auf den StartNode
// der Section geloescht werden
DelBoxNode( aSortCntBoxes );
- aSortCntBoxes.Remove( (USHORT)0, aSortCntBoxes.Count() );
+ aSortCntBoxes.Remove( (sal_uInt16)0, aSortCntBoxes.Count() );
delete pHTMLLayout;
}
@@ -328,7 +328,7 @@ SwTable::~SwTable()
|*************************************************************************/
inline void FmtInArr( SvPtrarr& rFmtArr, SwFmt* pBoxFmt )
{
- BOOL bRet = USHRT_MAX != rFmtArr.GetPos( (VoidPtr)pBoxFmt );
+ sal_Bool bRet = USHRT_MAX != rFmtArr.GetPos( (VoidPtr)pBoxFmt );
if( !bRet )
rFmtArr.Insert( (VoidPtr)pBoxFmt, rFmtArr.Count() );
}
@@ -339,11 +339,11 @@ void lcl_ModifyBoxes( SwTableBoxes &rBoxes, const long nOld,
void lcl_ModifyLines( SwTableLines &rLines, const long nOld,
const long nNew, SvPtrarr& rFmtArr, const bool bCheckSum )
{
- for ( USHORT i = 0; i < rLines.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
::lcl_ModifyBoxes( rLines[i]->GetTabBoxes(), nOld, nNew, rFmtArr );
if( bCheckSum )
{
- for( USHORT i = 0; i < rFmtArr.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rFmtArr.Count(); ++i )
{
SwFmt* pFmt = (SwFmt*)rFmtArr[i];
sal_uInt64 nBox = pFmt->GetFrmSize().GetWidth();
@@ -362,7 +362,7 @@ void lcl_ModifyBoxes( SwTableBoxes &rBoxes, const long nOld,
{
sal_uInt64 nSum = 0; // To avoid rounding errors we summarize all box widths
sal_uInt64 nOriginalSum = 0; // Sum of original widths
- for ( USHORT i = 0; i < rBoxes.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{
SwTableBox &rBox = *rBoxes[i];
if ( rBox.GetTabLines().Count() )
@@ -404,13 +404,13 @@ void lcl_ModifyBoxes( SwTableBoxes &rBoxes, const long nOld,
void SwTable::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
// fange SSize Aenderungen ab, um die Lines/Boxen anzupassen
- USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
const SwFmtFrmSize* pNewSize = 0, *pOldSize = 0;
if( RES_ATTRSET_CHG == nWhich )
{
if( SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState(
- RES_FRM_SIZE, FALSE, (const SfxPoolItem**)&pNewSize ))
+ RES_FRM_SIZE, sal_False, (const SfxPoolItem**)&pNewSize ))
pOldSize = &((SwAttrSetChg*)pOld)->GetChgSet()->GetFrmSize();
}
else if( RES_FRM_SIZE == nWhich )
@@ -435,7 +435,7 @@ void SwTable::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
void SwTable::AdjustWidths( const long nOld, const long nNew )
{
- SvPtrarr aFmtArr( (BYTE)aLines[0]->GetTabBoxes().Count(), 1 );
+ SvPtrarr aFmtArr( (sal_uInt8)aLines[0]->GetTabBoxes().Count(), 1 );
::lcl_ModifyLines( aLines, nOld, nNew, aFmtArr, true );
}
@@ -444,20 +444,20 @@ void SwTable::AdjustWidths( const long nOld, const long nNew )
|* SwTable::GetTabCols()
|*
|*************************************************************************/
-void lcl_RefreshHidden( SwTabCols &rToFill, USHORT nPos )
+void lcl_RefreshHidden( SwTabCols &rToFill, sal_uInt16 nPos )
{
- for ( USHORT i = 0; i < rToFill.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rToFill.Count(); ++i )
{
if ( Abs((long)(nPos - rToFill[i])) <= COLFUZZY )
{
- rToFill.SetHidden( i, FALSE );
+ rToFill.SetHidden( i, sal_False );
break;
}
}
}
void lcl_SortedTabColInsert( SwTabCols &rToFill, const SwTableBox *pBox,
- const SwFrmFmt *pTabFmt, const BOOL bHidden,
+ const SwFrmFmt *pTabFmt, const sal_Bool bHidden,
const bool bRefreshHidden )
{
const long nWish = pTabFmt->GetFrmSize().GetWidth();
@@ -465,32 +465,32 @@ void lcl_SortedTabColInsert( SwTabCols &rToFill, const SwTableBox *pBox,
//Der Wert fuer die linke Kante der Box errechnet sich aus den
//Breiten der vorhergehenden Boxen.
- USHORT nPos = 0;
- USHORT nSum = 0;
- USHORT nLeftMin = 0;
- USHORT nRightMax = 0;
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nSum = 0;
+ sal_uInt16 nLeftMin = 0;
+ sal_uInt16 nRightMax = 0;
const SwTableBox *pCur = pBox;
const SwTableLine *pLine = pBox->GetUpper();
while ( pLine )
{ const SwTableBoxes &rBoxes = pLine->GetTabBoxes();
- for ( USHORT i = 0; i < rBoxes.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
{
SwTwips nWidth = rBoxes[i]->GetFrmFmt()->GetFrmSize().GetWidth();
- nSum = (USHORT)(nSum + nWidth);
+ nSum = (sal_uInt16)(nSum + nWidth);
sal_uInt64 nTmp = nSum;
nTmp *= nAct;
nTmp /= nWish;
if (rBoxes[i] != pCur)
{
if ( pLine == pBox->GetUpper() || 0 == nLeftMin )
- nLeftMin = (USHORT)(nTmp - nPos);
- nPos = (USHORT)nTmp;
+ nLeftMin = (sal_uInt16)(nTmp - nPos);
+ nPos = (sal_uInt16)nTmp;
}
else
{
- nSum = (USHORT)(nSum - nWidth);
+ nSum = (sal_uInt16)(nSum - nWidth);
if ( 0 == nRightMax )
- nRightMax = (USHORT)(nTmp - nPos);
+ nRightMax = (sal_uInt16)(nTmp - nPos);
break;
}
}
@@ -498,18 +498,18 @@ void lcl_SortedTabColInsert( SwTabCols &rToFill, const SwTableBox *pBox,
pLine = pCur ? pCur->GetUpper() : 0;
}
- BOOL bInsert = !bRefreshHidden;
- for ( USHORT j = 0; bInsert && (j < rToFill.Count()); ++j )
+ sal_Bool bInsert = !bRefreshHidden;
+ for ( sal_uInt16 j = 0; bInsert && (j < rToFill.Count()); ++j )
{
long nCmp = rToFill[j];
if ( (nPos >= ((nCmp >= COLFUZZY) ? nCmp - COLFUZZY : nCmp)) &&
(nPos <= (nCmp + COLFUZZY)) )
{
- bInsert = FALSE; //Hat ihn schon.
+ bInsert = sal_False; //Hat ihn schon.
}
else if ( nPos < nCmp )
{
- bInsert = FALSE;
+ bInsert = sal_False;
rToFill.Insert( nPos, bHidden, j );
}
}
@@ -527,7 +527,7 @@ void lcl_SortedTabColInsert( SwTabCols &rToFill, const SwTableBox *pBox,
// check if nPos is entry:
bool bFoundPos = false;
bool bFoundMax = false;
- for ( USHORT j = 0; !(bFoundPos && bFoundMax ) && j < rToFill.Count(); ++j )
+ for ( sal_uInt16 j = 0; !(bFoundPos && bFoundMax ) && j < rToFill.Count(); ++j )
{
SwTabColsEntry& rEntry = rToFill.GetEntry( j );
long nCmp = rToFill[j];
@@ -566,26 +566,26 @@ void lcl_ProcessBoxGet( const SwTableBox *pBox, SwTabCols &rToFill,
if ( pBox->GetTabLines().Count() )
{
const SwTableLines &rLines = pBox->GetTabLines();
- for ( USHORT i = 0; i < rLines.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
{ const SwTableBoxes &rBoxes = rLines[i]->GetTabBoxes();
- for ( USHORT j = 0; j < rBoxes.Count(); ++j )
+ for ( sal_uInt16 j = 0; j < rBoxes.Count(); ++j )
::lcl_ProcessBoxGet( rBoxes[j], rToFill, pTabFmt, bRefreshHidden);
}
}
else
- ::lcl_SortedTabColInsert( rToFill, pBox, pTabFmt, FALSE, bRefreshHidden );
+ ::lcl_SortedTabColInsert( rToFill, pBox, pTabFmt, sal_False, bRefreshHidden );
}
void lcl_ProcessLineGet( const SwTableLine *pLine, SwTabCols &rToFill,
const SwFrmFmt *pTabFmt )
{
- for ( USHORT i = 0; i < pLine->GetTabBoxes().Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pLine->GetTabBoxes().Count(); ++i )
{
const SwTableBox *pBox = pLine->GetTabBoxes()[i];
if ( pBox->GetSttNd() )
- ::lcl_SortedTabColInsert( rToFill, pBox, pTabFmt, TRUE, FALSE );
+ ::lcl_SortedTabColInsert( rToFill, pBox, pTabFmt, sal_True, sal_False );
else
- for ( USHORT j = 0; j < pBox->GetTabLines().Count(); ++j )
+ for ( sal_uInt16 j = 0; j < pBox->GetTabLines().Count(); ++j )
::lcl_ProcessLineGet( pBox->GetTabLines()[j], rToFill, pTabFmt );
}
}
@@ -597,14 +597,14 @@ void lcl_ProcessLineGet( const SwTableLine *pLine, SwTabCols &rToFill,
#endif
void SwTable::GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
- BOOL bRefreshHidden, BOOL bCurRowOnly ) const
+ sal_Bool bRefreshHidden, sal_Bool bCurRowOnly ) const
{
//MA 30. Nov. 95: Opt: wenn bHidden gesetzt ist, wird nur das Hidden
//Array aktualisiert.
if ( bRefreshHidden )
{
// remove corrections
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < rToFill.Count(); ++i )
{
SwTabColsEntry& rEntry = rToFill.GetEntry( i );
@@ -615,7 +615,7 @@ void SwTable::GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
//Alle sind hidden, dann die sichtbaren eintragen.
for ( i = 0; i < rToFill.Count(); ++i )
- rToFill.SetHidden( i, TRUE );
+ rToFill.SetHidden( i, sal_True );
}
else
{
@@ -645,7 +645,7 @@ void SwTable::GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
//1.
const SwTableBoxes &rBoxes = pStart->GetUpper()->GetTabBoxes();
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < rBoxes.Count(); ++i )
::lcl_ProcessBoxGet( rBoxes[i], rToFill, pTabFmt, bRefreshHidden );
@@ -655,9 +655,9 @@ void SwTable::GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
while ( pLine )
{
const SwTableBoxes &rBoxes2 = pLine->GetTabBoxes();
- for ( USHORT k = 0; k < rBoxes2.Count(); ++k )
+ for ( sal_uInt16 k = 0; k < rBoxes2.Count(); ++k )
::lcl_SortedTabColInsert( rToFill, rBoxes2[k],
- pTabFmt, FALSE, bRefreshHidden );
+ pTabFmt, sal_False, bRefreshHidden );
pLine = pLine->GetUpper() ? pLine->GetUpper()->GetUpper() : 0;
}
@@ -708,9 +708,9 @@ struct Parm
Parm( const SwTabCols &rN, const SwTabCols &rO ) :
rNew( rN ), rOld( rO ), nNewWish(0), nOldWish(0), aBoxArr( 10, 1 ){}
};
-inline BOOL BoxInArr( SvPtrarr& rArr, SwTableBox* pBox )
+inline sal_Bool BoxInArr( SvPtrarr& rArr, SwTableBox* pBox )
{
- BOOL bRet = USHRT_MAX != rArr.GetPos( (VoidPtr)pBox );
+ sal_Bool bRet = USHRT_MAX != rArr.GetPos( (VoidPtr)pBox );
if( !bRet )
rArr.Insert( (VoidPtr)pBox, rArr.Count() );
return bRet;
@@ -722,7 +722,7 @@ void lcl_ProcessLine( SwTableLine *pLine, Parm &rParm )
{
SwTableBoxes &rBoxes = pLine->GetTabBoxes();
for ( int i = rBoxes.Count()-1; i >= 0; --i )
- ::lcl_ProcessBoxSet( rBoxes[ static_cast< USHORT >(i) ], rParm );
+ ::lcl_ProcessBoxSet( rBoxes[ static_cast< sal_uInt16 >(i) ], rParm );
}
void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm )
@@ -730,7 +730,7 @@ void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm )
if ( pBox->GetTabLines().Count() )
{ SwTableLines &rLines = pBox->GetTabLines();
for ( int i = rLines.Count()-1; i >= 0; --i )
- lcl_ProcessLine( rLines[ static_cast< USHORT >(i) ], rParm );
+ lcl_ProcessLine( rLines[ static_cast< sal_uInt16 >(i) ], rParm );
}
else
{
@@ -751,13 +751,13 @@ void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm )
while ( pLine )
{ const SwTableBoxes &rBoxes = pLine->GetTabBoxes();
- for ( USHORT i = 0; (i < rBoxes.Count()) && (rBoxes[i] != pCur); ++i)
+ for ( sal_uInt16 i = 0; (i < rBoxes.Count()) && (rBoxes[i] != pCur); ++i)
{
sal_uInt64 nWidth = rBoxes[i]->GetFrmFmt()->
GetFrmSize().GetWidth();
nWidth *= nOldAct;
nWidth /= rParm.nOldWish;
- nLeft += (USHORT)nWidth;
+ nLeft += (sal_uInt16)nWidth;
}
pCur = pLine->GetUpper();
pLine = pCur ? pCur->GetUpper() : 0;
@@ -771,9 +771,9 @@ void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm )
nWidth *= nOldAct;
nWidth /= rParm.nOldWish;
long nRight = nLeft + (long)nWidth;
- USHORT nLeftPos = USHRT_MAX,
+ sal_uInt16 nLeftPos = USHRT_MAX,
nRightPos = USHRT_MAX;
- for ( USHORT i = 0; i < rParm.rOld.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rParm.rOld.Count(); ++i )
{
if ( nLeft >= (rParm.rOld[i] - COLFUZZY) &&
nLeft <= (rParm.rOld[i] + COLFUZZY) )
@@ -799,8 +799,8 @@ void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm )
nWidth /= rParm.nOldWish;
long nTmp = (long)nWidth;
nTmp += rParm.rOld.GetLeft();
- USHORT nLeftPos = USHRT_MAX;
- for ( USHORT i = 0; i < rParm.rOld.Count() &&
+ sal_uInt16 nLeftPos = USHRT_MAX;
+ for ( sal_uInt16 i = 0; i < rParm.rOld.Count() &&
nLeftPos == USHRT_MAX; ++i )
{
if ( nTmp >= (rParm.rOld[i] - COLFUZZY) &&
@@ -816,7 +816,7 @@ void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm )
if( pBox->getRowSpan() == 1 )
{
SwTableBoxes& rTblBoxes = pBox->GetUpper()->GetTabBoxes();
- USHORT nPos = rTblBoxes.C40_GETPOS( SwTableBox, pBox );
+ sal_uInt16 nPos = rTblBoxes.C40_GETPOS( SwTableBox, pBox );
if( nPos && rTblBoxes[ nPos - 1 ]->getRowSpan() != 1 )
nLeftDiff = 0;
if( nPos + 1 < rTblBoxes.Count() &&
@@ -874,15 +874,15 @@ void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm )
}
void lcl_ProcessBoxPtr( SwTableBox *pBox, SvPtrarr &rBoxArr,
- BOOL bBefore )
+ sal_Bool bBefore )
{
if ( pBox->GetTabLines().Count() )
{
const SwTableLines &rLines = pBox->GetTabLines();
- for ( USHORT i = 0; i < rLines.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
{
const SwTableBoxes &rBoxes = rLines[i]->GetTabBoxes();
- for ( USHORT j = 0; j < rBoxes.Count(); ++j )
+ for ( sal_uInt16 j = 0; j < rBoxes.Count(); ++j )
::lcl_ProcessBoxPtr( rBoxes[j], rBoxArr, bBefore );
}
}
@@ -896,7 +896,7 @@ void lcl_AdjustBox( SwTableBox *pBox, const long nDiff, Parm &rParm );
void lcl_AdjustLines( SwTableLines &rLines, const long nDiff, Parm &rParm )
{
- for ( USHORT i = 0; i < rLines.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
{
SwTableBox *pBox = rLines[i]->GetTabBoxes()
[rLines[i]->GetTabBoxes().Count()-1];
@@ -917,7 +917,7 @@ void lcl_AdjustBox( SwTableBox *pBox, const long nDiff, Parm &rParm )
}
void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
- const SwTableBox *pStart, BOOL bCurRowOnly )
+ const SwTableBox *pStart, sal_Bool bCurRowOnly )
{
CHECK_TABLE( *this )
@@ -958,8 +958,8 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
SwFmtHoriOrient aOri( pFmt->GetHoriOrient() );
if(text::HoriOrientation::NONE != aOri.GetHoriOrient())
{
- const BOOL bLeftDist = rNew.GetLeft() != nShLeft;
- const BOOL bRightDist = rNew.GetRight() + nShRight != rNew.GetRightMax();
+ const sal_Bool bLeftDist = rNew.GetLeft() != nShLeft;
+ const sal_Bool bRightDist = rNew.GetRight() + nShRight != rNew.GetRightMax();
if(!bLeftDist && !bRightDist)
aOri.SetHoriOrient( text::HoriOrientation::FULL );
else if(!bRightDist && rNew.GetLeft() > nShLeft )
@@ -1023,8 +1023,8 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
//entsprechenden Boxen in einem PtrArray vorzumerken.
const SwTableBoxes &rBoxes = pStart->GetUpper()->GetTabBoxes();
- for ( USHORT i = 0; i < rBoxes.Count(); ++i )
- ::lcl_ProcessBoxPtr( rBoxes[i], aParm.aBoxArr, FALSE );
+ for ( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
+ ::lcl_ProcessBoxPtr( rBoxes[i], aParm.aBoxArr, sal_False );
const SwTableLine *pLine = pStart->GetUpper()->GetUpper() ?
pStart->GetUpper()->GetUpper()->GetUpper() : 0;
@@ -1032,13 +1032,13 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
while ( pLine )
{
const SwTableBoxes &rBoxes2 = pLine->GetTabBoxes();
- BOOL bBefore = TRUE;
- for ( USHORT i = 0; i < rBoxes2.Count(); ++i )
+ sal_Bool bBefore = sal_True;
+ for ( sal_uInt16 i = 0; i < rBoxes2.Count(); ++i )
{
if ( rBoxes2[i] != pExcl )
::lcl_ProcessBoxPtr( rBoxes2[i], aParm.aBoxArr, bBefore );
else
- bBefore = FALSE;
+ bBefore = sal_False;
}
pExcl = pLine->GetUpper();
pLine = pLine->GetUpper() ? pLine->GetUpper()->GetUpper() : 0;
@@ -1048,7 +1048,7 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
//verarbeitet zu werden.
for ( int j = aParm.aBoxArr.Count()-1; j >= 0; --j )
{
- SwTableBox *pBox = (SwTableBox*)aParm.aBoxArr[ static_cast< USHORT >(j)];
+ SwTableBox *pBox = (SwTableBox*)aParm.aBoxArr[ static_cast< sal_uInt16 >(j)];
::lcl_ProcessBoxSet( pBox, aParm );
}
}
@@ -1060,7 +1060,7 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
//gearbeitet werden!
SwTableLines &rLines = GetTabLines();
for ( int i = rLines.Count()-1; i >= 0; --i )
- ::lcl_ProcessLine( rLines[ static_cast< USHORT >(i) ], aParm );
+ ::lcl_ProcessLine( rLines[ static_cast< sal_uInt16 >(i) ], aParm );
}
}
@@ -1070,23 +1070,23 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
extern void _CheckBoxWidth( const SwTableLine&, SwTwips );
// checke doch mal ob die Tabellen korrekte Breiten haben
SwTwips nSize = GetFrmFmt()->GetFrmSize().GetWidth();
- for( USHORT n = 0; n < aLines.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aLines.Count(); ++n )
_CheckBoxWidth( *aLines[ n ], nSize );
}
#endif
}
-typedef std::pair<USHORT, USHORT> ColChange;
+typedef std::pair<sal_uInt16, sal_uInt16> ColChange;
typedef std::list< ColChange > ChangeList;
static void lcl_AdjustWidthsInLine( SwTableLine* pLine, ChangeList& rOldNew,
- Parm& rParm, USHORT nColFuzzy )
+ Parm& rParm, sal_uInt16 nColFuzzy )
{
ChangeList::iterator pCurr = rOldNew.begin();
if( pCurr == rOldNew.end() )
return;
- USHORT nCount = pLine->GetTabBoxes().Count();
- USHORT i = 0;
+ sal_uInt16 nCount = pLine->GetTabBoxes().Count();
+ sal_uInt16 i = 0;
SwTwips nBorder = 0;
SwTwips nRest = 0;
while( i < nCount )
@@ -1129,7 +1129,7 @@ static void lcl_AdjustWidthsInLine( SwTableLine* pLine, ChangeList& rOldNew,
}
}
-static void lcl_CalcNewWidths( std::list<USHORT> &rSpanPos, ChangeList& rChanges,
+static void lcl_CalcNewWidths( std::list<sal_uInt16> &rSpanPos, ChangeList& rChanges,
SwTableLine* pLine, long nWish, long nWidth, bool bTop )
{
if( !rChanges.size() )
@@ -1142,17 +1142,17 @@ static void lcl_CalcNewWidths( std::list<USHORT> &rSpanPos, ChangeList& rChanges
rChanges.clear();
return;
}
- std::list<USHORT> aNewSpanPos;
+ std::list<sal_uInt16> aNewSpanPos;
ChangeList aNewChanges;
ChangeList::iterator pCurr = rChanges.begin();
aNewChanges.push_back( *pCurr ); // Nullposition
- std::list<USHORT>::iterator pSpan = rSpanPos.begin();
- USHORT nCurr = 0;
- USHORT nOrgSum = 0;
+ std::list<sal_uInt16>::iterator pSpan = rSpanPos.begin();
+ sal_uInt16 nCurr = 0;
+ sal_uInt16 nOrgSum = 0;
bool bRowSpan = false;
- USHORT nRowSpanCount = 0;
- USHORT nCount = pLine->GetTabBoxes().Count();
- for( USHORT nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
+ sal_uInt16 nRowSpanCount = 0;
+ sal_uInt16 nCount = pLine->GetTabBoxes().Count();
+ for( sal_uInt16 nCurrBox = 0; nCurrBox < nCount; ++nCurrBox )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox];
SwTwips nCurrWidth = pBox->GetFrmFmt()->GetFrmSize().GetWidth();
@@ -1162,17 +1162,17 @@ static void lcl_CalcNewWidths( std::list<USHORT> &rSpanPos, ChangeList& rChanges
if( bRowSpan || bCurrRowSpan )
aNewSpanPos.push_back( nRowSpanCount );
bRowSpan = bCurrRowSpan;
- nOrgSum = (USHORT)(nOrgSum + nCurrWidth);
+ nOrgSum = (sal_uInt16)(nOrgSum + nCurrWidth);
sal_uInt64 nSum = nOrgSum;
nSum *= nWidth;
nSum /= nWish;
nSum *= nWish;
nSum /= nWidth;
- USHORT nPos = (USHORT)nSum;
+ sal_uInt16 nPos = (sal_uInt16)nSum;
while( pCurr != rChanges.end() && pCurr->first < nPos )
{
#if OSL_DEBUG_LEVEL > 1
- USHORT nTemp = pCurr->first;
+ sal_uInt16 nTemp = pCurr->first;
nTemp = pCurr->second;
#endif
++nCurr;
@@ -1221,7 +1221,7 @@ static void lcl_CalcNewWidths( std::list<USHORT> &rSpanPos, ChangeList& rChanges
nTmp *= pLeftMove->second - pLast->second;
nTmp /= pLeftMove->first - pLast->first;
nTmp += pLast->second;
- pCurr->second = (USHORT)nTmp;
+ pCurr->second = (sal_uInt16)nTmp;
}
}
pLast = pCurr;
@@ -1245,7 +1245,7 @@ static void lcl_CalcNewWidths( std::list<USHORT> &rSpanPos, ChangeList& rChanges
nTmp *= pNext->second - pLast->second;
nTmp /= pNext->first - pLast->first;
nTmp += pLast->second;
- pCurr->second = (USHORT)nTmp;
+ pCurr->second = (sal_uInt16)nTmp;
}
++pCurr;
}
@@ -1263,13 +1263,13 @@ static void lcl_CalcNewWidths( std::list<USHORT> &rSpanPos, ChangeList& rChanges
while( pCopy != aNewChanges.end() )
rChanges.push_back( *pCopy++ );
rSpanPos.clear();
- std::list<USHORT>::iterator pSpCopy = aNewSpanPos.begin();
+ std::list<sal_uInt16>::iterator pSpCopy = aNewSpanPos.begin();
while( pSpCopy != aNewSpanPos.end() )
rSpanPos.push_back( *pSpCopy++ );
}
void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
- const SwTabCols &rOld, const SwTableBox *pStart, BOOL bCurRowOnly )
+ const SwTabCols &rOld, const SwTableBox *pStart, sal_Bool bCurRowOnly )
{
#if OSL_DEBUG_LEVEL > 1
static int nCallCount = 0;
@@ -1281,7 +1281,7 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
const long nOldWidth = rParm.rOld.GetRight() - rParm.rOld.GetLeft();
if( nNewWidth < 1 || nOldWidth < 1 )
return;
- for( USHORT i = 0; i <= rOld.Count(); ++i )
+ for( sal_uInt16 i = 0; i <= rOld.Count(); ++i )
{
sal_uInt64 nNewPos;
sal_uInt64 nOldPos;
@@ -1301,7 +1301,7 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
nOldPos /= nOldWidth;
if( nOldPos != nNewPos && nNewPos > 0 && nOldPos > 0 )
{
- ColChange aChg( (USHORT)nOldPos, (USHORT)nNewPos );
+ ColChange aChg( (sal_uInt16)nOldPos, (sal_uInt16)nNewPos );
aOldNew.push_back( aChg );
}
}
@@ -1313,18 +1313,18 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
if( bCurRowOnly )
{
const SwTableLine* pCurrLine = pStart->GetUpper();
- USHORT nCurr = rLines.C40_GETPOS( SwTableLine, pCurrLine );
+ sal_uInt16 nCurr = rLines.C40_GETPOS( SwTableLine, pCurrLine );
if( nCurr >= USHRT_MAX )
return;
ColChange aChg( 0, 0 );
aOldNew.push_front( aChg );
- std::list<USHORT> aRowSpanPos;
+ std::list<sal_uInt16> aRowSpanPos;
if( nCurr )
{
ChangeList aCopy;
ChangeList::iterator pCop = aOldNew.begin();
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while( pCop != aOldNew.end() )
{
aCopy.push_back( *pCop );
@@ -1334,7 +1334,7 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
lcl_CalcNewWidths( aRowSpanPos, aCopy, rLines[nCurr],
rParm.nOldWish, nOldWidth, true );
bool bGoOn = aRowSpanPos.size() > 0;
- USHORT j = nCurr;
+ sal_uInt16 j = nCurr;
while( bGoOn )
{
lcl_CalcNewWidths( aRowSpanPos, aCopy, rLines[--j],
@@ -1348,7 +1348,7 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
{
ChangeList aCopy;
ChangeList::iterator pCop = aOldNew.begin();
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while( pCop != aOldNew.end() )
{
aCopy.push_back( *pCop );
@@ -1358,7 +1358,7 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
lcl_CalcNewWidths( aRowSpanPos, aCopy, rLines[nCurr],
rParm.nOldWish, nOldWidth, false );
bool bGoOn = aRowSpanPos.size() > 0;
- USHORT j = nCurr;
+ sal_uInt16 j = nCurr;
while( bGoOn )
{
lcl_CalcNewWidths( aRowSpanPos, aCopy, rLines[++j],
@@ -1369,7 +1369,7 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
}
::lcl_AdjustWidthsInLine( rLines[nCurr], aOldNew, rParm, 1 );
}
- else for( USHORT i = 0; i < rLines.Count(); ++i )
+ else for( sal_uInt16 i = 0; i < rLines.Count(); ++i )
::lcl_AdjustWidthsInLine( rLines[i], aOldNew, rParm, COLFUZZY );
CHECK_TABLE( *this )
}
@@ -1382,31 +1382,31 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
|*
|*************************************************************************/
-BOOL IsValidRowName( const String& rStr )
+sal_Bool IsValidRowName( const String& rStr )
{
- BOOL bIsValid = TRUE;
+ sal_Bool bIsValid = sal_True;
xub_StrLen nLen = rStr.Len();
for (xub_StrLen i = 0; i < nLen && bIsValid; ++i)
{
const sal_Unicode cChar = rStr.GetChar(i);
if (cChar < '0' || cChar > '9')
- bIsValid = FALSE;
+ bIsValid = sal_False;
}
return bIsValid;
}
// --> OD 2007-08-03 #i80314#
// add 3rd parameter and its handling
-USHORT SwTable::_GetBoxNum( String& rStr, BOOL bFirstPart,
+sal_uInt16 SwTable::_GetBoxNum( String& rStr, sal_Bool bFirstPart,
const bool bPerformValidCheck )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
xub_StrLen nPos = 0;
- if( bFirstPart ) // TRUE == column; FALSE == row
+ if( bFirstPart ) // sal_True == column; sal_False == row
{
// die 1. ist mit Buchstaben addressiert!
sal_Unicode cChar;
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
while( 0 != ( cChar = rStr.GetChar( nPos )) &&
( (cChar >= 'A' && cChar <= 'Z') ||
(cChar >= 'a' && cChar <= 'z') ) )
@@ -1414,7 +1414,7 @@ USHORT SwTable::_GetBoxNum( String& rStr, BOOL bFirstPart,
if( (cChar -= 'A') >= 26 )
cChar -= 'a' - '[';
if( bFirst )
- bFirst = FALSE;
+ bFirst = sal_False;
else
++nRet;
nRet = nRet * 52 + cChar;
@@ -1427,7 +1427,7 @@ USHORT SwTable::_GetBoxNum( String& rStr, BOOL bFirstPart,
nRet = 0;
if ( !bPerformValidCheck || IsValidRowName( rStr ) )
{
- nRet = static_cast<USHORT>(rStr.ToInt32());
+ nRet = static_cast<sal_uInt16>(rStr.ToInt32());
}
rStr.Erase();
}
@@ -1437,7 +1437,7 @@ USHORT SwTable::_GetBoxNum( String& rStr, BOOL bFirstPart,
String aTxt( rStr.Copy( 0, nPos ) );
if ( !bPerformValidCheck || IsValidRowName( aTxt ) )
{
- nRet = static_cast<USHORT>(aTxt.ToInt32());
+ nRet = static_cast<sal_uInt16>(aTxt.ToInt32());
}
rStr.Erase( 0, nPos+1 );
}
@@ -1455,7 +1455,7 @@ const SwTableBox* SwTable::GetTblBox( const String& rName,
const SwTableLines* pLines;
const SwTableBoxes* pBoxes;
- USHORT nLine, nBox;
+ sal_uInt16 nLine, nBox;
String aNm( rName );
while( aNm.Len() )
{
@@ -1470,7 +1470,7 @@ const SwTableBox* SwTable::GetTblBox( const String& rName,
--nBox;
}
- nLine = SwTable::_GetBoxNum( aNm, FALSE, bPerformValidCheck );
+ nLine = SwTable::_GetBoxNum( aNm, sal_False, bPerformValidCheck );
// bestimme die Line
if( !nLine || nLine > pLines->Count() )
@@ -1488,7 +1488,7 @@ const SwTableBox* SwTable::GetTblBox( const String& rName,
// Box ist ??
if( pBox && !pBox->GetSttNd() )
{
- OSL_ENSURE( FALSE, "Box ohne Inhalt, suche die naechste !!" );
+ OSL_ENSURE( sal_False, "Box ohne Inhalt, suche die naechste !!" );
// "herunterfallen lassen" bis zur ersten Box
while( pBox->GetTabLines().Count() )
pBox = pBox->GetTabLines()[0]->GetTabBoxes()[0];
@@ -1496,7 +1496,7 @@ const SwTableBox* SwTable::GetTblBox( const String& rName,
return pBox;
}
-SwTableBox* SwTable::GetTblBox( ULONG nSttIdx )
+SwTableBox* SwTable::GetTblBox( sal_uLong nSttIdx )
{
//MA: Zur Optimierung nicht immer umstaendlich das ganze SortArray abhuenern.
//OS: #102675# converting text to table tries und certain conditions
@@ -1505,7 +1505,7 @@ SwTableBox* SwTable::GetTblBox( ULONG nSttIdx )
return 0;
SwTableBox* pRet = 0;
SwNodes& rNds = GetFrmFmt()->GetDoc()->GetNodes();
- ULONG nIndex = nSttIdx + 1;
+ sal_uLong nIndex = nSttIdx + 1;
SwCntntNode* pCNd = 0;
SwTableNode* pTblNd = 0;
@@ -1541,22 +1541,22 @@ SwTableBox* SwTable::GetTblBox( ULONG nSttIdx )
//Falls es das Layout noch nicht gibt oder sonstwie etwas schieft geht.
if ( !pRet )
{
- for( USHORT n = aSortCntBoxes.Count(); n; )
+ for( sal_uInt16 n = aSortCntBoxes.Count(); n; )
if( aSortCntBoxes[ --n ]->GetSttIdx() == nSttIdx )
return aSortCntBoxes[ n ];
}
return pRet;
}
-BOOL SwTable::IsTblComplex() const
+sal_Bool SwTable::IsTblComplex() const
{
- // returnt TRUE wenn sich in der Tabelle Verschachtelungen befinden
+ // returnt sal_True wenn sich in der Tabelle Verschachtelungen befinden
// steht eine Box nicht in der obersten Line, da wurde gesplittet/
// gemergt und die Struktur ist komplexer.
- for( USHORT n = 0; n < aSortCntBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aSortCntBoxes.Count(); ++n )
if( aSortCntBoxes[ n ]->GetUpper()->GetUpper() )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
@@ -1566,10 +1566,10 @@ BOOL SwTable::IsTblComplex() const
|* SwTableLine::SwTableLine()
|*
|*************************************************************************/
-SwTableLine::SwTableLine( SwTableLineFmt *pFmt, USHORT nBoxes,
+SwTableLine::SwTableLine( SwTableLineFmt *pFmt, sal_uInt16 nBoxes,
SwTableBox *pUp )
: SwClient( pFmt ),
- aBoxes( (BYTE)nBoxes, 1 ),
+ aBoxes( (sal_uInt8)nBoxes, 1 ),
pUpper( pUp )
{
}
@@ -1654,7 +1654,7 @@ void SwTableLine::ChgFrmFmt( SwTableLineFmt *pNewFmt )
if ( bInFirstNonHeadlineRow || bInFollowFlowRow )
pTab = pTab->FindMaster();
- pTab->SetRemoveFollowFlowLinePending( TRUE );
+ pTab->SetRemoveFollowFlowLinePending( sal_True );
pTab->InvalidatePos();
}
// <--
@@ -1713,9 +1713,9 @@ SwTwips SwTableLine::GetTableLineHeight( bool& bLayoutAvailable ) const
|* SwTableBox::SwTableBox()
|*
|*************************************************************************/
-SwTableBox::SwTableBox( SwTableBoxFmt* pFmt, USHORT nLines, SwTableLine *pUp )
+SwTableBox::SwTableBox( SwTableBoxFmt* pFmt, sal_uInt16 nLines, SwTableLine *pUp )
: SwClient( 0 ),
- aLines( (BYTE)nLines, 1 ),
+ aLines( (sal_uInt8)nLines, 1 ),
pSttNd( 0 ),
pUpper( pUp ),
pImpl( 0 )
@@ -1730,10 +1730,9 @@ SwTableBox::SwTableBox( SwTableBoxFmt* pFmt, const SwNodeIndex &rIdx,
pUpper( pUp ),
pImpl( 0 )
{
- SwDoc* pDoc = pFmt->GetDoc();
CheckBoxFmt( pFmt )->Add( this );
- pSttNd = pDoc->GetNodes()[ rIdx ]->GetStartNode();
+ pSttNd = rIdx.GetNode().GetStartNode();
// an der Table eintragen
const SwTableNode* pTblNd = pSttNd->FindTableNode();
@@ -1790,8 +1789,8 @@ SwTableBoxFmt* SwTableBox::CheckBoxFmt( SwTableBoxFmt* pFmt )
{
// sollte das Format eine Formel oder einen Value tragen, dann muss die
// Box alleine am Format haengen. Ggfs. muss ein neues angelegt werden.
- if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_VALUE, FALSE ) ||
- SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMULA, FALSE ) )
+ if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_VALUE, sal_False ) ||
+ SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMULA, sal_False ) )
{
SwClient* pOther = SwClientIter( *pFmt ).First( TYPE( SwTableBox ));
if( pOther )
@@ -1867,7 +1866,7 @@ void SwTableBox::ChgFrmFmt( SwTableBoxFmt* pNewFmt )
pCell->InvalidateSize();
pCell->_InvalidatePrt();
pCell->SetCompletePaint();
- pCell->SetDerivedVert( FALSE );
+ pCell->SetDerivedVert( sal_False );
pCell->CheckDirChange();
// --> FME 2005-04-15 #i47489#
@@ -1899,10 +1898,10 @@ void SwTableBox::ChgFrmFmt( SwTableBoxFmt* pNewFmt )
|* und ergibt sich aus der Position in den Lines/Boxen/Tabelle
|*
|*************************************************************************/
-void lcl_GetTblBoxColStr( USHORT nCol, String& rNm )
+void lcl_GetTblBoxColStr( sal_uInt16 nCol, String& rNm )
{
- const USHORT coDiff = 52; // 'A'-'Z' 'a' - 'z'
- USHORT nCalc;
+ const sal_uInt16 coDiff = 52; // 'A'-'Z' 'a' - 'z'
+ sal_uInt16 nCalc;
do {
nCalc = nCol % coDiff;
@@ -1927,7 +1926,7 @@ String SwTableBox::GetName() const
}
const SwTable& rTbl = pSttNd->FindTableNode()->GetTable();
- USHORT nPos;
+ sal_uInt16 nPos;
String sNm, sTmp;
const SwTableBox* pBox = this;
do {
@@ -1953,10 +1952,10 @@ String SwTableBox::GetName() const
return sNm;
}
-BOOL SwTableBox::IsInHeadline( const SwTable* pTbl ) const
+sal_Bool SwTableBox::IsInHeadline( const SwTable* pTbl ) const
{
if( !GetUpper() ) // sollte nur beim Merge vorkommen.
- return FALSE;
+ return sal_False;
if( !pTbl )
pTbl = &pSttNd->FindTableNode()->GetTable();
@@ -1971,14 +1970,14 @@ BOOL SwTableBox::IsInHeadline( const SwTable* pTbl ) const
#if OSL_DEBUG_LEVEL > 1
-ULONG SwTableBox::GetSttIdx() const
+sal_uLong SwTableBox::GetSttIdx() const
{
return pSttNd ? pSttNd->GetIndex() : 0;
}
#endif
// erfrage vom Client Informationen
-BOOL SwTable::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwTable::GetInfo( SfxPoolItem& rInfo ) const
{
switch( rInfo.Which() )
{
@@ -1993,7 +1992,7 @@ BOOL SwTable::GetInfo( SfxPoolItem& rInfo ) const
((SwAutoFmtGetDocNode&)rInfo).pCntntNode =
GetFrmFmt()->GetDoc()->GetNodes().GoNext( &aIdx );
}
- return FALSE;
+ return sal_False;
}
break;
}
@@ -2011,9 +2010,9 @@ BOOL SwTable::GetInfo( SfxPoolItem& rInfo ) const
((SwPtrMsgPoolItem&)rInfo).pObject =
SwClientIter( *GetFrmFmt() ).First( TYPE(SwFrm) );
}
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
SwTable * SwTable::FindTable( SwFrmFmt const*const pFmt )
@@ -2046,13 +2045,13 @@ void SwTable::SetHTMLTableLayout( SwHTMLTableLayout *p )
}
void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol,
- BOOL bChgAlign )
+ sal_Bool bChgAlign )
{
- ULONG nNdPos = rBox.IsValidNumTxtNd( TRUE );
+ sal_uLong nNdPos = rBox.IsValidNumTxtNd( sal_True );
ChgTextToNum( rBox,rTxt,pCol,bChgAlign,nNdPos);
}
void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol,
- BOOL bChgAlign,ULONG nNdPos )
+ sal_Bool bChgAlign,sal_uLong nNdPos )
{
if( ULONG_MAX != nNdPos )
@@ -2076,7 +2075,7 @@ void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol,
// Farbe umsetzen oder "Benutzer Farbe" sichern
if( !pTNd->GetpSwAttrSet() || SFX_ITEM_SET != pTNd->GetpSwAttrSet()->
- GetItemState( RES_CHRATR_COLOR, FALSE, &pItem ))
+ GetItemState( RES_CHRATR_COLOR, sal_False, &pItem ))
pItem = 0;
const Color* pOldNumFmtColor = rBox.GetSaveNumFmtColor();
@@ -2133,7 +2132,7 @@ void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol,
// zuruecksetzen, damit sie wieder aufgespannt werden
{
SwIndex aResetIdx( aIdx, n );
- pTNd->DontExpandFmt( aResetIdx, FALSE, FALSE );
+ pTNd->DontExpandFmt( aResetIdx, sal_False, sal_False );
}
if( !pDoc->IsIgnoreRedline() && pDoc->GetRedlineTbl().Count() )
@@ -2157,7 +2156,7 @@ void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol,
// vertikale Ausrichtung umsetzen
if( bChgAlign &&
( SFX_ITEM_SET != rBox.GetFrmFmt()->GetItemState(
- RES_VERT_ORIENT, TRUE, &pItem ) ||
+ RES_VERT_ORIENT, sal_True, &pItem ) ||
text::VertOrientation::TOP == ((SwFmtVertOrient*)pItem)->GetVertOrient() ))
{
rBox.GetFrmFmt()->SetFmtAttr( SwFmtVertOrient( 0, text::VertOrientation::BOTTOM ));
@@ -2165,14 +2164,14 @@ void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol,
}
}
-void ChgNumToText( SwTableBox& rBox, ULONG nFmt )
+void ChgNumToText( SwTableBox& rBox, sal_uLong nFmt )
{
- ULONG nNdPos = rBox.IsValidNumTxtNd( FALSE );
+ sal_uLong nNdPos = rBox.IsValidNumTxtNd( sal_False );
if( ULONG_MAX != nNdPos )
{
SwDoc* pDoc = rBox.GetFrmFmt()->GetDoc();
SwTxtNode* pTNd = pDoc->GetNodes()[ nNdPos ]->GetTxtNode();
- BOOL bChgAlign = pDoc->IsInsTblAlignNum();
+ sal_Bool bChgAlign = pDoc->IsInsTblAlignNum();
const SfxPoolItem* pItem;
Color* pCol = 0;
@@ -2187,7 +2186,7 @@ void ChgNumToText( SwTableBox& rBox, ULONG nFmt )
SwIndex aIdx( pTNd, sTxt.Len() );
//JP 06.04.99: Bug 64321 - DontExpand-Flags vorm Austauschen
// zuruecksetzen, damit sie wieder aufgespannt werden
- pTNd->DontExpandFmt( aIdx, FALSE, FALSE );
+ pTNd->DontExpandFmt( aIdx, sal_False, sal_False );
aIdx = 0;
pTNd->EraseText( aIdx, STRING_LEN,
IDocumentContentOperations::INS_EMPTYEXPAND );
@@ -2200,7 +2199,7 @@ void ChgNumToText( SwTableBox& rBox, ULONG nFmt )
// Ausrichtung umsetzen
if( bChgAlign && pAttrSet && SFX_ITEM_SET == pAttrSet->GetItemState(
- RES_PARATR_ADJUST, FALSE, &pItem ) &&
+ RES_PARATR_ADJUST, sal_False, &pItem ) &&
SVX_ADJUST_RIGHT == ((SvxAdjustItem*)pItem)->GetAdjust() )
{
pTNd->SetAttr( SvxAdjustItem( SVX_ADJUST_LEFT, RES_PARATR_ADJUST ) );
@@ -2208,7 +2207,7 @@ void ChgNumToText( SwTableBox& rBox, ULONG nFmt )
// Farbe umsetzen oder "Benutzer Farbe" sichern
if( !pAttrSet || SFX_ITEM_SET != pAttrSet->
- GetItemState( RES_CHRATR_COLOR, FALSE, &pItem ))
+ GetItemState( RES_CHRATR_COLOR, sal_False, &pItem ))
pItem = 0;
const Color* pOldNumFmtColor = rBox.GetSaveNumFmtColor();
@@ -2249,7 +2248,7 @@ void ChgNumToText( SwTableBox& rBox, ULONG nFmt )
// vertikale Ausrichtung umsetzen
if( bChgAlign &&
SFX_ITEM_SET == rBox.GetFrmFmt()->GetItemState(
- RES_VERT_ORIENT, FALSE, &pItem ) &&
+ RES_VERT_ORIENT, sal_False, &pItem ) &&
text::VertOrientation::BOTTOM == ((SwFmtVertOrient*)pItem)->GetVertOrient() )
{
rBox.GetFrmFmt()->SetFmtAttr( SwFmtVertOrient( 0, text::VertOrientation::TOP ));
@@ -2266,7 +2265,7 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
const SwTblBoxFormula *pNewFml = 0;
const SwTblBoxValue *pNewVal = 0;
double aOldValue = 0;
- ULONG nOldFmt = NUMBERFORMAT_TEXT;
+ sal_uLong nOldFmt = NUMBERFORMAT_TEXT;
switch( pNew ? pNew->Which() : 0 )
{
@@ -2274,13 +2273,13 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
const SfxItemSet& rSet = *((SwAttrSetChg*)pNew)->GetChgSet();
if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT,
- FALSE, (const SfxPoolItem**)&pNewFmt ) )
+ sal_False, (const SfxPoolItem**)&pNewFmt ) )
nOldFmt = ((SwTblBoxNumFormat&)((SwAttrSetChg*)pOld)->
GetChgSet()->Get( RES_BOXATR_FORMAT )).GetValue();
- rSet.GetItemState( RES_BOXATR_FORMULA, FALSE,
+ rSet.GetItemState( RES_BOXATR_FORMULA, sal_False,
(const SfxPoolItem**)&pNewFml );
if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_VALUE,
- FALSE, (const SfxPoolItem**)&pNewVal ) )
+ sal_False, (const SfxPoolItem**)&pNewVal ) )
aOldValue = ((SwTblBoxValue&)((SwAttrSetChg*)pOld)->
GetChgSet()->Get( RES_BOXATR_VALUE )).GetValue();
}
@@ -2305,9 +2304,9 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
GetDoc()->SetFieldsDirty(true, NULL, 0);
- if( SFX_ITEM_SET == GetItemState( RES_BOXATR_FORMAT, FALSE ) ||
- SFX_ITEM_SET == GetItemState( RES_BOXATR_VALUE, FALSE ) ||
- SFX_ITEM_SET == GetItemState( RES_BOXATR_FORMULA, FALSE ) )
+ if( SFX_ITEM_SET == GetItemState( RES_BOXATR_FORMAT, sal_False ) ||
+ SFX_ITEM_SET == GetItemState( RES_BOXATR_VALUE, sal_False ) ||
+ SFX_ITEM_SET == GetItemState( RES_BOXATR_FORMULA, sal_False ) )
{
// die Box holen
SwClientIter aIter( *this );
@@ -2316,19 +2315,19 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
OSL_ENSURE( !aIter.Next(), "keine Box oder mehrere am Format" );
- ULONG nNewFmt;
+ sal_uLong nNewFmt;
if( pNewFmt )
{
nNewFmt = pNewFmt->GetValue();
// neu Formatieren
// ist es neuer oder wurde der akt. entfernt?
- if( SFX_ITEM_SET != GetItemState( RES_BOXATR_VALUE, FALSE ))
+ if( SFX_ITEM_SET != GetItemState( RES_BOXATR_VALUE, sal_False ))
pNewFmt = 0;
}
else
{
// das akt. Item besorgen
- GetItemState( RES_BOXATR_FORMAT, FALSE,
+ GetItemState( RES_BOXATR_FORMAT, sal_False,
(const SfxPoolItem**)&pNewFmt );
nOldFmt = GetTblBoxNumFmt().GetValue();
nNewFmt = pNewFmt ? pNewFmt->GetValue() : nOldFmt;
@@ -2340,7 +2339,7 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
if( NUMBERFORMAT_TEXT != nNewFmt )
{
if( SFX_ITEM_SET == GetItemState(
- RES_BOXATR_VALUE, FALSE ))
+ RES_BOXATR_VALUE, sal_False ))
nOldFmt = NUMBERFORMAT_TEXT;
else
nNewFmt = NUMBERFORMAT_TEXT;
@@ -2362,26 +2361,26 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
// - vertikale Ausrichtung auf OEBN, wenn UNTEN gesetzt ist
SvNumberFormatter* pNumFmtr = GetDoc()->GetNumberFormatter();
- BOOL bNewIsTxtFmt = pNumFmtr->IsTextFormat( nNewFmt ) ||
+ sal_Bool bNewIsTxtFmt = pNumFmtr->IsTextFormat( nNewFmt ) ||
NUMBERFORMAT_TEXT == nNewFmt;
if( (!bNewIsTxtFmt && nOldFmt != nNewFmt) || pNewFml )
{
- BOOL bChgTxt = TRUE;
+ sal_Bool bChgTxt = sal_True;
double fVal = 0;
if( !pNewVal && SFX_ITEM_SET != GetItemState(
- RES_BOXATR_VALUE, FALSE, (const SfxPoolItem**)&pNewVal ))
+ RES_BOXATR_VALUE, sal_False, (const SfxPoolItem**)&pNewVal ))
{
// es wurde noch nie ein Wert gesetzt, dann versuche
// doch mal den Inhalt auszuwerten
- ULONG nNdPos = pBox->IsValidNumTxtNd( TRUE );
+ sal_uLong nNdPos = pBox->IsValidNumTxtNd( sal_True );
if( ULONG_MAX != nNdPos )
{
sal_uInt32 nTmpFmtIdx = nNewFmt;
String aTxt( GetDoc()->GetNodes()[ nNdPos ]
->GetTxtNode()->GetRedlineTxt());
if( !aTxt.Len() )
- bChgTxt = FALSE;
+ bChgTxt = sal_False;
else
{
//JP 15.09.98: Bug 55741 - Tabs beibehalten
@@ -2389,7 +2388,7 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
// JP 22.04.98: Bug 49659 -
// Sonderbehandlung fuer Prozent
- BOOL bIsNumFmt = FALSE;
+ sal_Bool bIsNumFmt = sal_False;
if( NUMBERFORMAT_PERCENT ==
pNumFmtr->GetType( nNewFmt ))
{
@@ -2456,11 +2455,11 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
SwFrmFmt::Modify( pOld, pNew );
}
-BOOL SwTableBox::HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
- BOOL& rIsEmptyTxtNd ) const
+sal_Bool SwTableBox::HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
+ sal_Bool& rIsEmptyTxtNd ) const
{
- BOOL bRet = FALSE;
- ULONG nNdPos = IsValidNumTxtNd( TRUE );
+ sal_Bool bRet = sal_False;
+ sal_uLong nNdPos = IsValidNumTxtNd( sal_True );
if( ULONG_MAX != nNdPos )
{
String aTxt( pSttNd->GetNodes()[ nNdPos ]->GetTxtNode()->
@@ -2472,7 +2471,7 @@ BOOL SwTableBox::HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
rFmtIndex = ((SwTblBoxNumFormat*)pItem)->GetValue();
// JP 22.04.98: Bug 49659 - Sonderbehandlung fuer Prozent
@@ -2491,29 +2490,29 @@ BOOL SwTableBox::HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
bRet = pNumFmtr->IsNumberFormat( aTxt, rFmtIndex, rNum );
}
else
- rIsEmptyTxtNd = FALSE;
+ rIsEmptyTxtNd = sal_False;
return bRet;
}
-BOOL SwTableBox::IsNumberChanged() const
+sal_Bool SwTableBox::IsNumberChanged() const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
- if( SFX_ITEM_SET == GetFrmFmt()->GetItemState( RES_BOXATR_FORMULA, FALSE ))
+ if( SFX_ITEM_SET == GetFrmFmt()->GetItemState( RES_BOXATR_FORMULA, sal_False ))
{
const SwTblBoxNumFormat *pNumFmt;
const SwTblBoxValue *pValue;
- if( SFX_ITEM_SET != GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, FALSE,
+ if( SFX_ITEM_SET != GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, sal_False,
(const SfxPoolItem**)&pValue ))
pValue = 0;
- if( SFX_ITEM_SET != GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT, FALSE,
+ if( SFX_ITEM_SET != GetFrmFmt()->GetItemState( RES_BOXATR_FORMAT, sal_False,
(const SfxPoolItem**)&pNumFmt ))
pNumFmt = 0;
- ULONG nNdPos;
+ sal_uLong nNdPos;
if( pNumFmt && pValue &&
- ULONG_MAX != ( nNdPos = IsValidNumTxtNd( TRUE ) ) )
+ ULONG_MAX != ( nNdPos = IsValidNumTxtNd( sal_True ) ) )
{
String sNewTxt, sOldTxt( pSttNd->GetNodes()[ nNdPos ]->
GetTxtNode()->GetRedlineTxt() );
@@ -2532,14 +2531,14 @@ BOOL SwTableBox::IsNumberChanged() const
return bRet;
}
-ULONG SwTableBox::IsValidNumTxtNd( BOOL bCheckAttr ) const
+sal_uLong SwTableBox::IsValidNumTxtNd( sal_Bool bCheckAttr ) const
{
- ULONG nPos = ULONG_MAX;
+ sal_uLong nPos = ULONG_MAX;
if( pSttNd )
{
SwNodeIndex aIdx( *pSttNd );
- ULONG nIndex = aIdx.GetIndex();
- const ULONG nIndexEnd = pSttNd->GetNodes()[ nIndex ]->EndOfSectionIndex();
+ sal_uLong nIndex = aIdx.GetIndex();
+ const sal_uLong nIndexEnd = pSttNd->GetNodes()[ nIndex ]->EndOfSectionIndex();
const SwTxtNode *pTextNode = 0;
while( ++nIndex < nIndexEnd )
{
@@ -2573,7 +2572,7 @@ ULONG SwTableBox::IsValidNumTxtNd( BOOL bCheckAttr ) const
// Flys/Felder/..
if( pHts )
{
- for( USHORT n = 0; n < pHts->Count(); ++n )
+ for( sal_uInt16 n = 0; n < pHts->Count(); ++n )
{
const SwTxtAttr* pAttr = (*pHts)[ n ];
if( RES_TXTATR_NOEND_BEGIN <= pAttr->Which() ||
@@ -2602,14 +2601,14 @@ ULONG SwTableBox::IsValidNumTxtNd( BOOL bCheckAttr ) const
}
// ist das eine FormelBox oder eine Box mit numerischen Inhalt (AutoSum)
-USHORT SwTableBox::IsFormulaOrValueBox() const
+sal_uInt16 SwTableBox::IsFormulaOrValueBox() const
{
- USHORT nWhich = 0;
+ sal_uInt16 nWhich = 0;
const SwTxtNode* pTNd;
SwFrmFmt* pFmt = GetFrmFmt();
- if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMULA, FALSE ))
+ if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMULA, sal_False ))
nWhich = RES_BOXATR_FORMULA;
- else if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_VALUE, FALSE ) &&
+ else if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_VALUE, sal_False ) &&
!pFmt->GetDoc()->GetNumberFormatter()->IsTextFormat(
pFmt->GetTblBoxNumFmt().GetValue() ))
nWhich = RES_BOXATR_VALUE;
@@ -2625,15 +2624,15 @@ void SwTableBox::ActualiseValueBox()
{
const SfxPoolItem *pFmtItem, *pValItem;
SwFrmFmt* pFmt = GetFrmFmt();
- if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMAT, TRUE, &pFmtItem )
- && SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_VALUE, TRUE, &pValItem ))
+ if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMAT, sal_True, &pFmtItem )
+ && SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_VALUE, sal_True, &pValItem ))
{
- const ULONG nFmtId = ((SwTblBoxNumFormat*)pFmtItem)->GetValue();
- ULONG nNdPos = ULONG_MAX;
+ const sal_uLong nFmtId = ((SwTblBoxNumFormat*)pFmtItem)->GetValue();
+ sal_uLong nNdPos = ULONG_MAX;
SvNumberFormatter* pNumFmtr = pFmt->GetDoc()->GetNumberFormatter();
if( !pNumFmtr->IsTextFormat( nFmtId ) &&
- ULONG_MAX != (nNdPos = IsValidNumTxtNd( TRUE )) )
+ ULONG_MAX != (nNdPos = IsValidNumTxtNd( sal_True )) )
{
double fVal = ((SwTblBoxValue*)pValItem)->GetValue();
Color* pCol = 0;
@@ -2642,7 +2641,7 @@ void SwTableBox::ActualiseValueBox()
const String& rTxt = pSttNd->GetNodes()[ nNdPos ]->GetTxtNode()->GetTxt();
if( rTxt != sNewTxt )
- ChgTextToNum( *this, sNewTxt, pCol, FALSE ,nNdPos);
+ ChgTextToNum( *this, sNewTxt, pCol, sal_False ,nNdPos);
}
}
}
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index ca950953084e..dc6db207b65a 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -102,7 +102,7 @@ LanguageType SwEnhancedPDFExportHelper::eLanguageDefault = 0;
#if OSL_DEBUG_LEVEL > 1
-static std::vector< USHORT > aStructStack;
+static std::vector< sal_uInt16 > aStructStack;
void lcl_DBGCheckStack()
{
@@ -119,8 +119,8 @@ void lcl_DBGCheckStack()
* Formula = 35 Form = 36 Continued frame = 99
*/
- USHORT nElement;
- std::vector< USHORT >::iterator aIter;
+ sal_uInt16 nElement;
+ std::vector< sal_uInt16 >::iterator aIter;
for ( aIter = aStructStack.begin(); aIter != aStructStack.end(); ++aIter )
{
nElement = *aIter;
@@ -436,7 +436,7 @@ void SwTaggedPDFHelper::BeginTag( vcl::PDFWriter::StructElement eType, const Str
++nEndStructureElement;
#if OSL_DEBUG_LEVEL > 1
- aStructStack.push_back( static_cast<USHORT>(eType) );
+ aStructStack.push_back( static_cast<sal_uInt16>(eType) );
#endif
// Store the id of the current structure element if
@@ -1017,7 +1017,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
if ( CheckReopenTag() )
return;
- USHORT nPDFType = USHRT_MAX;
+ sal_uInt16 nPDFType = USHRT_MAX;
String aPDFType;
switch ( pFrm->GetType() )
@@ -1115,7 +1115,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
// This is the default. If the paragraph could not be mapped to
// any of the standard pdf tags, we write a user defined tag
// <stylename> with role = P
- nPDFType = static_cast<USHORT>(vcl::PDFWriter::Paragraph);
+ nPDFType = static_cast<sal_uInt16>(vcl::PDFWriter::Paragraph);
aPDFType = sStyleName;
//
@@ -1123,7 +1123,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
//
if ( sStyleName == aQuotations )
{
- nPDFType = static_cast<USHORT>(vcl::PDFWriter::BlockQuote);
+ nPDFType = static_cast<sal_uInt16>(vcl::PDFWriter::BlockQuote);
aPDFType = aBlockQuoteString;
}
@@ -1132,7 +1132,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
//
else if ( sStyleName == aCaption)
{
- nPDFType = static_cast<USHORT>(vcl::PDFWriter::Caption);
+ nPDFType = static_cast<sal_uInt16>(vcl::PDFWriter::Caption);
aPDFType = aCaptionString;
}
@@ -1141,7 +1141,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
//
else if ( sParentStyleName == aCaption)
{
- nPDFType = static_cast<USHORT>(vcl::PDFWriter::Caption);
+ nPDFType = static_cast<sal_uInt16>(vcl::PDFWriter::Caption);
aPDFType = sStyleName.Append(aCaptionString);
}
@@ -1150,7 +1150,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
//
else if ( sStyleName == aHeading )
{
- nPDFType = static_cast<USHORT>(vcl::PDFWriter::Heading);
+ nPDFType = static_cast<sal_uInt16>(vcl::PDFWriter::Heading);
aPDFType = aHString;
}
@@ -1163,7 +1163,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
int nRealLevel = pTxtNd->GetAttrOutlineLevel()-1; //<-end,zhaojianwei
nRealLevel = nRealLevel > 5 ? 5 : nRealLevel;
- nPDFType = static_cast<USHORT>(vcl::PDFWriter::H1 + nRealLevel);
+ nPDFType = static_cast<sal_uInt16>(vcl::PDFWriter::H1 + nRealLevel);
switch(nRealLevel)
{
case 0 :
@@ -1376,7 +1376,7 @@ void SwTaggedPDFHelper::BeginInlineStructureElements()
if ( lcl_IsInNonStructEnv( *pFrm ) )
return;
- USHORT nPDFType = USHRT_MAX;
+ sal_uInt16 nPDFType = USHRT_MAX;
String aPDFType;
switch ( pPor->GetWhichPor() )
@@ -1428,7 +1428,7 @@ void SwTaggedPDFHelper::BeginInlineStructureElements()
else
{
const LanguageType nCurrentLanguage = rInf.GetFont()->GetLanguage();
- const USHORT nFont = rInf.GetFont()->GetActual();
+ const sal_uInt16 nFont = rInf.GetFont()->GetActual();
const LanguageType nDefaultLang = SwEnhancedPDFExportHelper::GetDefaultLanguage();
if ( UNDERLINE_NONE != rInf.GetFont()->GetUnderline() ||
@@ -1530,8 +1530,8 @@ SwEnhancedPDFExportHelper::SwEnhancedPDFExportHelper( SwEditShell& rSh,
aStructStack.clear();
#endif
- const BYTE nScript = (BYTE)GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() );
- USHORT nLangRes = RES_CHRATR_LANGUAGE;
+ const sal_uInt8 nScript = (sal_uInt8)GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
+ sal_uInt16 nLangRes = RES_CHRATR_LANGUAGE;
if ( i18n::ScriptType::ASIAN == nScript )
nLangRes = RES_CHRATR_CJK_LANGUAGE;
@@ -1579,8 +1579,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
SwDoc* pDoc = mrSh.GetDoc();
mrSh.SwCrsrShell::Push();
mrSh.SwCrsrShell::ClearMark();
- const BOOL bOldLockView = mrSh.IsViewLocked();
- mrSh.LockView( TRUE );
+ const sal_Bool bOldLockView = mrSh.IsViewLocked();
+ mrSh.LockView( sal_True );
if ( !mbEditEngineOnly )
{
@@ -1623,7 +1623,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
SvNumberFormatter* pNumFormatter = pDoc->GetNumberFormatter();
const Date aDateDiff( pField->GetDate() -
*pNumFormatter->GetNullDate() );
- const ULONG nFormat =
+ const sal_uLong nFormat =
pNumFormatter->GetStandardFormat( NUMBERFORMAT_DATE, pField->GetLanguage() );
String sDate;
Color* pColor;
@@ -1718,8 +1718,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// <--
// Create links for all selected rectangles:
- const USHORT nNumOfRects = aTmp.Count();
- for ( USHORT i = 0; i < nNumOfRects; ++i )
+ const sal_uInt16 nNumOfRects = aTmp.Count();
+ for ( sal_uInt16 i = 0; i < nNumOfRects; ++i )
{
// Link Rectangle
const SwRect& rLinkRect( aTmp[ i ] );
@@ -1765,7 +1765,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
const SwFrmFmt* pFrmFmt = (*pTbl)[n];
const SfxPoolItem* pItem;
if ( RES_DRAWFRMFMT != pFrmFmt->Which() &&
- SFX_ITEM_SET == pFrmFmt->GetAttrSet().GetItemState( RES_URL, TRUE, &pItem ) )
+ SFX_ITEM_SET == pFrmFmt->GetAttrSet().GetItemState( RES_URL, sal_True, &pItem ) )
{
String aURL( static_cast<const SwFmtURL*>(pItem)->GetURL() );
const bool bIntern = '#' == aURL.GetChar( 0 );
@@ -1882,8 +1882,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// <--
// Create links for all selected rectangles:
- const USHORT nNumOfRects = aTmp.Count();
- for ( USHORT i = 0; i < nNumOfRects; ++i )
+ const sal_uInt16 nNumOfRects = aTmp.Count();
+ for ( sal_uInt16 i = 0; i < nNumOfRects; ++i )
{
// Link rectangle
const SwRect& rLinkRect( aTmp[ i ] );
@@ -1923,8 +1923,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
//
// FOOTNOTES
//
- const USHORT nFtnCount = pDoc->GetFtnIdxs().Count();
- for ( USHORT nIdx = 0; nIdx < nFtnCount; ++nIdx )
+ const sal_uInt16 nFtnCount = pDoc->GetFtnIdxs().Count();
+ for ( sal_uInt16 nIdx = 0; nIdx < nFtnCount; ++nIdx )
{
// Set cursor to text node that contains the footnote:
const SwTxtFtn* pTxtFtn = pDoc->GetFtnIdxs()[ nIdx ];
@@ -2125,7 +2125,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// Restore view, cursor, and outdev:
mrSh.LockView( bOldLockView );
- mrSh.SwCrsrShell::Pop( FALSE );
+ mrSh.SwCrsrShell::Pop( sal_False );
mrOut.Pop();
}
diff --git a/sw/source/core/text/atrhndl.hxx b/sw/source/core/text/atrhndl.hxx
index c22dbeef3e9e..1befde44e5d5 100644
--- a/sw/source/core/text/atrhndl.hxx
+++ b/sw/source/core/text/atrhndl.hxx
@@ -39,7 +39,7 @@ class SwAttrSet;
class IDocumentSettingAccess;
class ViewShell;
class SfxPoolItem;
-extern const BYTE StackPos[];
+extern const sal_uInt8 StackPos[];
/*************************************************************************
* class SwAttrHandler
@@ -63,8 +63,8 @@ private:
private:
SwTxtAttr* pInitialArray[ INITIAL_NUM_ATTR ];
SwTxtAttr** pArray;
- USHORT nCount; // number of elements on stack
- USHORT nSize; // number of positions in Array
+ sal_uInt16 nCount; // number of elements on stack
+ sal_uInt16 nSize; // number of positions in Array
public:
// Ctor, Dtor
@@ -79,7 +79,7 @@ private:
inline void Push( const SwTxtAttr& rAttr ) { Insert( rAttr, nCount ); };
// insert at specified position, take care for not inserting behind
// the value returned by Count()
- void Insert( const SwTxtAttr& rAttr, const USHORT nPos );
+ void Insert( const SwTxtAttr& rAttr, const sal_uInt16 nPos );
// remove specified attribute
void Remove( const SwTxtAttr& rAttr );
@@ -88,11 +88,11 @@ private:
const SwTxtAttr* Top() const;
// number of elements on stack
- inline USHORT Count() const { return nCount; };
+ inline sal_uInt16 Count() const { return nCount; };
// returns position of rAttr on Stack if found, otherwise USHRT_MAX
// can be used for Remove of an attribute
- USHORT Pos( const SwTxtAttr& rAttr ) const;
+ sal_uInt16 Pos( const SwTxtAttr& rAttr ) const;
};
SwAttrStack aAttrStack[ NUM_ATTRIBUTE_STACKS ]; // stack collection
@@ -115,7 +115,7 @@ private:
sal_Bool Push( const SwTxtAttr& rAttr, const SfxPoolItem& rItem );
// apply top attribute on stack to font
- void ActivateTop( SwFont& rFnt, USHORT nStackPos );
+ void ActivateTop( SwFont& rFnt, sal_uInt16 nStackPos );
public:
// Ctor
@@ -142,21 +142,21 @@ public:
void Pop( const SwTxtAttr& rAttr );
// apply script dependent attributes
-// void ChangeScript( SwFont& rFnt, const BYTE nScr );
+// void ChangeScript( SwFont& rFnt, const sal_uInt8 nScr );
// returns the default value for stack nStack
- inline const SfxPoolItem& GetDefault( const USHORT nAttribID ) const;
+ inline const SfxPoolItem& GetDefault( const sal_uInt16 nAttribID ) const;
// do not call these if you only used the small init function
inline void ResetFont( SwFont& rFnt ) const;
inline const SwFont* GetFont() const;
void GetDefaultAscentAndHeight(ViewShell* pShell,
OutputDevice& rOut,
- USHORT& nAscent,
- USHORT& nHeight) const;
+ sal_uInt16& nAscent,
+ sal_uInt16& nHeight) const;
};
-inline const SfxPoolItem& SwAttrHandler::GetDefault( const USHORT nAttribID ) const
+inline const SfxPoolItem& SwAttrHandler::GetDefault( const sal_uInt16 nAttribID ) const
{
OSL_ENSURE( nAttribID < RES_TXTATR_END,
"this attrib does not ex."
diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx
index fdff264a8e7c..92e88ecde74a 100644
--- a/sw/source/core/text/atrstck.cxx
+++ b/sw/source/core/text/atrstck.cxx
@@ -81,8 +81,8 @@
* Also adjust NUM_ATTRIBUTE_STACKS in atrhndl.hxx.
*************************************************************************/
-const BYTE StackPos[ static_cast<USHORT>(RES_TXTATR_WITHEND_END) -
- static_cast<USHORT>(RES_CHRATR_BEGIN) + 1 ] =
+const sal_uInt8 StackPos[ static_cast<sal_uInt16>(RES_TXTATR_WITHEND_END) -
+ static_cast<sal_uInt16>(RES_CHRATR_BEGIN) + 1 ] =
{
0, // // 0
1, // RES_CHRATR_CASEMAP = RES_CHRATR_BEGIN // 1
@@ -173,7 +173,7 @@ const SfxItemSet* GetItemSet( const SfxPoolItem& rAttr )
* extracts pool item of type nWhich from rAttr
*************************************************************************/
-const SfxPoolItem* GetItem( const SwTxtAttr& rAttr, USHORT nWhich )
+const SfxPoolItem* GetItem( const SwTxtAttr& rAttr, sal_uInt16 nWhich )
{
if ( RES_TXTATR_INETFMT == rAttr.Which() ||
RES_TXTATR_CHARFMT == rAttr.Which() ||
@@ -184,7 +184,7 @@ const SfxPoolItem* GetItem( const SwTxtAttr& rAttr, USHORT nWhich )
bool bInParent = RES_TXTATR_AUTOFMT != rAttr.Which();
const SfxPoolItem* pItem;
- BOOL bRet = SFX_ITEM_SET == pSet->GetItemState( nWhich, bInParent, &pItem );
+ sal_Bool bRet = SFX_ITEM_SET == pSet->GetItemState( nWhich, bInParent, &pItem );
return bRet ? pItem : 0;
}
@@ -197,13 +197,13 @@ const SfxPoolItem* GetItem( const SwTxtAttr& rAttr, USHORT nWhich )
* checks if item is included in character/inet/auto style
*************************************************************************/
-BOOL IsItemIncluded( const USHORT nWhich, const SwTxtAttr *pAttr )
+sal_Bool IsItemIncluded( const sal_uInt16 nWhich, const SwTxtAttr *pAttr )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SfxItemSet* pItemSet = CharFmt::GetItemSet( pAttr->GetAttr() );
if ( pItemSet )
- bRet = SFX_ITEM_SET == pItemSet->GetItemState( nWhich, TRUE );
+ bRet = SFX_ITEM_SET == pItemSet->GetItemState( nWhich, sal_True );
return bRet;
}
@@ -248,7 +248,7 @@ bool lcl_ChgHyperLinkColor( const SwTxtAttr& rAttr,
rInetAttr.SetVisited( false );
const SwCharFmt* pTmpFmt = ((SwTxtINetFmt&)rAttr).GetCharFmt();
const SfxPoolItem* pItem;
- pTmpFmt->GetItemState( RES_CHRATR_COLOR, TRUE, &pItem );
+ pTmpFmt->GetItemState( RES_CHRATR_COLOR, sal_True, &pItem );
*pColor = ((SvxColorItem*)pItem)->GetValue();
rInetAttr.SetVisited( true );
}
@@ -304,7 +304,7 @@ inline SwAttrHandler::SwAttrStack::SwAttrStack()
* SwAttrHandler::SwAttrStack::Insert()
*************************************************************************/
-void SwAttrHandler::SwAttrStack::Insert( const SwTxtAttr& rAttr, const USHORT nPos )
+void SwAttrHandler::SwAttrStack::Insert( const SwTxtAttr& rAttr, const sal_uInt16 nPos )
{
// do we still have enough space?
if ( nCount >= nSize )
@@ -349,7 +349,7 @@ void SwAttrHandler::SwAttrStack::Insert( const SwTxtAttr& rAttr, const USHORT nP
void SwAttrHandler::SwAttrStack::Remove( const SwTxtAttr& rAttr )
{
- USHORT nPos = Pos( rAttr );
+ sal_uInt16 nPos = Pos( rAttr );
if ( nPos < nCount )
{
memmove( pArray + nPos, pArray + nPos + 1,
@@ -372,13 +372,13 @@ const SwTxtAttr* SwAttrHandler::SwAttrStack::Top() const
* SwAttrHandler::SwAttrStack::Pos()
*************************************************************************/
-USHORT SwAttrHandler::SwAttrStack::Pos( const SwTxtAttr& rAttr ) const
+sal_uInt16 SwAttrHandler::SwAttrStack::Pos( const SwTxtAttr& rAttr ) const
{
if ( ! nCount )
// empty stack
return USHRT_MAX;
- for ( USHORT nIdx = nCount; nIdx > 0; )
+ for ( sal_uInt16 nIdx = nCount; nIdx > 0; )
{
if ( &rAttr == pArray[ --nIdx ] )
return nIdx;
@@ -414,8 +414,8 @@ void SwAttrHandler::Init( const SwAttrSet& rAttrSet,
mpIDocumentSettingAccess = &rIDocumentSettingAcces;
mpShell = pSh;
- for ( USHORT i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++ )
- pDefaultArray[ StackPos[ i ] ] = &rAttrSet.Get( i, TRUE );
+ for ( sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++ )
+ pDefaultArray[ StackPos[ i ] ] = &rAttrSet.Get( i, sal_True );
}
void SwAttrHandler::Init( const SfxPoolItem** pPoolItem, const SwAttrSet* pAS,
@@ -436,9 +436,9 @@ void SwAttrHandler::Init( const SfxPoolItem** pPoolItem, const SwAttrSet* pAS,
if ( pAS && pAS->Count() )
{
SfxItemIter aIter( *pAS );
- USHORT nWhich;
+ sal_uInt16 nWhich;
const SfxPoolItem* pItem = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
nWhich = pItem->Which();
if (isCHRATR(nWhich))
@@ -462,7 +462,7 @@ void SwAttrHandler::Init( const SfxPoolItem** pPoolItem, const SwAttrSet* pAS,
void SwAttrHandler::Reset( )
{
- for ( USHORT i = 0; i < NUM_ATTRIBUTE_STACKS; i++ )
+ for ( sal_uInt16 i = 0; i < NUM_ATTRIBUTE_STACKS; i++ )
aAttrStack[ i ].Reset();
}
@@ -481,10 +481,10 @@ void SwAttrHandler::PushAndChg( const SwTxtAttr& rAttr, SwFont& rFnt )
const SfxItemSet* pSet = CharFmt::GetItemSet( rAttr.GetAttr() );
if ( !pSet ) return;
- for ( USHORT i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++)
+ for ( sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++)
{
const SfxPoolItem* pItem;
- BOOL bRet = SFX_ITEM_SET == pSet->GetItemState( i, rAttr.Which() != RES_TXTATR_AUTOFMT, &pItem );
+ sal_Bool bRet = SFX_ITEM_SET == pSet->GetItemState( i, rAttr.Which() != RES_TXTATR_AUTOFMT, &pItem );
if ( bRet )
{
@@ -527,7 +527,7 @@ sal_Bool SwAttrHandler::Push( const SwTxtAttr& rAttr, const SfxPoolItem& rItem )
if ( RES_TXTATR_WITHEND_END <= rItem.Which() )
return sal_False;
- USHORT nStack = StackPos[ rItem.Which() ];
+ sal_uInt16 nStack = StackPos[ rItem.Which() ];
// attributes originating from redlining have highest priority
// second priority are hyperlink attributes, which have a color replacement
@@ -540,7 +540,7 @@ sal_Bool SwAttrHandler::Push( const SwTxtAttr& rAttr, const SfxPoolItem& rItem )
return sal_True;
}
- USHORT nPos = aAttrStack[ nStack ].Count();
+ sal_uInt16 nPos = aAttrStack[ nStack ].Count();
OSL_ENSURE( nPos, "empty stack?" );
aAttrStack[ nStack ].Insert( rAttr, nPos - 1 );
return sal_False;
@@ -564,14 +564,14 @@ void SwAttrHandler::PopAndChg( const SwTxtAttr& rAttr, SwFont& rFnt )
const SfxItemSet* pSet = CharFmt::GetItemSet( rAttr.GetAttr() );
if ( !pSet ) return;
- for ( USHORT i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++)
+ for ( sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++)
{
const SfxPoolItem* pItem;
- BOOL bRet = SFX_ITEM_SET == pSet->GetItemState( i, RES_TXTATR_AUTOFMT != rAttr.Which(), &pItem );
+ sal_Bool bRet = SFX_ITEM_SET == pSet->GetItemState( i, RES_TXTATR_AUTOFMT != rAttr.Which(), &pItem );
if ( bRet )
{
// we remove rAttr from the appropriate stack
- USHORT nStackPos = StackPos[ i ];
+ sal_uInt16 nStackPos = StackPos[ i ];
aAttrStack[ nStackPos ].Remove( rAttr );
// reset font according to attribute on top of stack
// or default value
@@ -610,12 +610,12 @@ void SwAttrHandler::Pop( const SwTxtAttr& rAttr )
/*************************************************************************
* SwAttrHandler::ActivateTop()
*************************************************************************/
-void SwAttrHandler::ActivateTop( SwFont& rFnt, const USHORT nAttr )
+void SwAttrHandler::ActivateTop( SwFont& rFnt, const sal_uInt16 nAttr )
{
OSL_ENSURE( nAttr < RES_TXTATR_WITHEND_END,
"I cannot activate this attribute, nWhich >= RES_TXTATR_WITHEND_END" );
- const USHORT nStackPos = StackPos[ nAttr ];
+ const sal_uInt16 nStackPos = StackPos[ nAttr ];
const SwTxtAttr* pTopAt = aAttrStack[ nStackPos ].Top();
if ( pTopAt )
{
@@ -656,7 +656,7 @@ void SwAttrHandler::ActivateTop( SwFont& rFnt, const USHORT nAttr )
{
// ruby stack has no more attributes
// check, if an rotation attribute has to be applied
- USHORT nTwoLineStack = StackPos[ RES_CHRATR_TWO_LINES ];
+ sal_uInt16 nTwoLineStack = StackPos[ RES_CHRATR_TWO_LINES ];
sal_Bool bTwoLineAct = sal_False;
const SfxPoolItem* pTwoLineItem = 0;
const SwTxtAttr* pTwoLineAttr = aAttrStack[ nTwoLineStack ].Top();
@@ -674,7 +674,7 @@ void SwAttrHandler::ActivateTop( SwFont& rFnt, const USHORT nAttr )
return;
// eventually, an rotate attribute has to be activated
- USHORT nRotateStack = StackPos[ RES_CHRATR_ROTATE ];
+ sal_uInt16 nRotateStack = StackPos[ RES_CHRATR_ROTATE ];
const SfxPoolItem* pRotateItem = 0;
const SwTxtAttr* pRotateAttr = aAttrStack[ nRotateStack ].Top();
@@ -744,7 +744,7 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, sal_Bool bPu
break;
case RES_CHRATR_UNDERLINE :
{
- const USHORT nStackPos = StackPos[ RES_CHRATR_HIDDEN ];
+ const sal_uInt16 nStackPos = StackPos[ RES_CHRATR_HIDDEN ];
const SwTxtAttr* pTopAt = aAttrStack[ nStackPos ].Top();
const SfxPoolItem* pTmpItem = pTopAt ?
@@ -856,7 +856,7 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, sal_Bool bPu
if ( bRuby )
break;
- USHORT nTwoLineStack = StackPos[ RES_CHRATR_TWO_LINES ];
+ sal_uInt16 nTwoLineStack = StackPos[ RES_CHRATR_TWO_LINES ];
sal_Bool bTwoLineAct = sal_False;
const SfxPoolItem* pTwoLineItem = 0;
const SwTxtAttr* pTwoLineAttr = aAttrStack[ nTwoLineStack ].Top();
@@ -898,7 +898,7 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, sal_Bool bPu
if ( bRuby )
break;
- USHORT nRotateStack = StackPos[ RES_CHRATR_ROTATE ];
+ sal_uInt16 nRotateStack = StackPos[ RES_CHRATR_ROTATE ];
const SfxPoolItem* pRotateItem = 0;
const SwTxtAttr* pRotateAttr = aAttrStack[ nRotateStack ].Top();
@@ -942,7 +942,7 @@ void SwAttrHandler::FontChg(const SfxPoolItem& rItem, SwFont& rFnt, sal_Bool bPu
// Takes the default font and calculated the ascent and height
void SwAttrHandler::GetDefaultAscentAndHeight( ViewShell* pShell, OutputDevice& rOut,
- USHORT& nAscent, USHORT& nHeight ) const
+ sal_uInt16& nAscent, sal_uInt16& nHeight ) const
{
OSL_ENSURE( pFnt, "No font available for GetDefaultAscentAndHeight" );
diff --git a/sw/source/core/text/blink.cxx b/sw/source/core/text/blink.cxx
index 3c22e748608e..596820a3ab0d 100644
--- a/sw/source/core/text/blink.cxx
+++ b/sw/source/core/text/blink.cxx
@@ -137,7 +137,7 @@ IMPL_LINK( SwBlink, Blinker, Timer *, EMPTYARG )
}
void SwBlink::Insert( const Point& rPoint, const SwLinePortion* pPor,
- const SwTxtFrm *pTxtFrm, USHORT nDir )
+ const SwTxtFrm *pTxtFrm, sal_uInt16 nDir )
{
SwBlinkPortion *pBlinkPor = new SwBlinkPortion( pPor, nDir );
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 47b3f5a6d437..87b56063b87a 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -79,7 +79,7 @@ using namespace ::com::sun::star;
*************************************************************************/
SwTxtFrm *GetAdjFrmAtPos( SwTxtFrm *pFrm, const SwPosition &rPos,
- const sal_Bool bRightMargin, const sal_Bool bNoScroll = TRUE )
+ const sal_Bool bRightMargin, const sal_Bool bNoScroll = sal_True )
{
// 8810: vgl. 1170, RightMargin in der letzten Masterzeile...
const xub_StrLen nOffset = rPos.nContent.GetIndex();
@@ -224,8 +224,9 @@ sal_Bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos,
const SwTwips nFrmMaxY = (pFrm->*fnRect->fnGetPrtBottom)();
// nMaxY is an absolute value
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
SwTwips nMaxY = bVert ?
- Max( nFrmMaxY, nUpperMaxY ) :
+ ( bVertL2R ? Min( nFrmMaxY, nUpperMaxY ) : Max( nFrmMaxY, nUpperMaxY ) ) :
Min( nFrmMaxY, nUpperMaxY );
sal_Bool bRet = sal_False;
@@ -242,8 +243,8 @@ sal_Bool SwTxtFrm::GetCharRect( SwRect& rOrig, const SwPosition &rPos,
{
if( nFirstOffset > 0 )
aPnt1.Y() += nFirstOffset;
-
- if ( aPnt1.X() < nMaxY )
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( aPnt1.X() < nMaxY && !bVertL2R )
aPnt1.X() = nMaxY;
aPnt2.X() = aPnt1.X() + pFrm->Prt().Width();
aPnt2.Y() = aPnt1.Y();
@@ -396,8 +397,9 @@ sal_Bool SwTxtFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const
SwTwips nUpperMaxY = (pTmpFrm->*fnRect->fnGetPrtBottom)();
// nMaxY is in absolute value
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
SwTwips nMaxY = bVert ?
- Max( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ) :
+ ( bVertL2R ? Min( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ) : Max( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY ) ) :
Min( (pFrm->*fnRect->fnGetPrtBottom)(), nUpperMaxY );
if ( pFrm->IsEmpty() || ! (pFrm->Prt().*fnRect->fnGetHeight)() )
@@ -406,8 +408,9 @@ sal_Bool SwTxtFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const
Point aPnt2;
if ( bVert )
{
- if ( aPnt1.X() < nMaxY )
+ if ( aPnt1.X() < nMaxY && !bVertL2R )
aPnt1.X() = nMaxY;
+
aPnt2.X() = aPnt1.X() + pFrm->Prt().Width();
aPnt2.Y() = aPnt1.Y();
if( aPnt2.X() < nMaxY )
@@ -437,7 +440,7 @@ sal_Bool SwTxtFrm::GetAutoPos( SwRect& rOrig, const SwPosition &rPos ) const
SwTxtSizeInfo aInf( pFrm );
SwTxtCursor aLine( pFrm, &aInf );
SwCrsrMoveState aTmpState( MV_SETONLYTEXT );
- aTmpState.bRealHeight = TRUE;
+ aTmpState.bRealHeight = sal_True;
if( aLine.GetCharRect( &rOrig, nOffset, &aTmpState, nMaxY ) )
{
if( aTmpState.aRealHeight.X() >= 0 )
@@ -779,7 +782,7 @@ sal_Bool SwTxtFrm::RightMargin(SwPaM *pPam, sal_Bool bAPI) const
if( aLine.GetCurr()->GetLen() &&
CH_BREAK == aInf.GetTxt().GetChar( nRightMargin - 1 ) )
--nRightMargin;
- if( !bAPI && (aLine.GetNext() || pFrm->GetFollow()) )
+ else if( !bAPI && (aLine.GetNext() || pFrm->GetFollow()) )
{
while( nRightMargin > aLine.GetStart() &&
' ' == aInf.GetTxt().GetChar( nRightMargin - 1 ) )
@@ -884,7 +887,7 @@ sal_Bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
// siehe Kommentar in SwTxtFrm::GetCrsrOfst()
#if OSL_DEBUG_LEVEL > 1
- const ULONG nOldNode = pPam->GetPoint()->nNode.GetIndex();
+ const sal_uLong nOldNode = pPam->GetPoint()->nNode.GetIndex();
#endif
// Der Node soll nicht gewechselt werden
xub_StrLen nTmpOfst = aLine.GetCrsrOfst( pPam->GetPoint(),
@@ -955,7 +958,7 @@ sal_Bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
// current position
void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, xub_StrLen nIdx,
xub_StrLen& nPos, sal_Bool& bRight,
- BYTE& nCrsrLevel, BYTE nDefaultDir )
+ sal_uInt8& nCrsrLevel, sal_uInt8 nDefaultDir )
{
const SwLinePortion* pPor = rCurrLine.GetFirstPortion();
const SwLinePortion* pLast = 0;
@@ -1010,7 +1013,7 @@ void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, xub_StrLen nIdx,
const SwLineLayout& rLine = ((SwMultiPortion*)pPor)->GetRoot();
xub_StrLen nTmpPos = nPos - nIdx;
sal_Bool bTmpForward = ! bRight;
- BYTE nTmpCrsrLevel = nCrsrLevel;
+ sal_uInt8 nTmpCrsrLevel = nCrsrLevel;
lcl_VisualMoveRecursion( rLine, 0, nTmpPos, bTmpForward,
nTmpCrsrLevel, nDefaultDir + 1 );
@@ -1069,7 +1072,7 @@ void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, xub_StrLen nIdx,
const SwLineLayout& rLine = ((SwMultiPortion*)pPor)->GetRoot();
xub_StrLen nTmpPos = nPos - nIdx;
sal_Bool bTmpForward = ! bRight;
- BYTE nTmpCrsrLevel = nCrsrLevel;
+ sal_uInt8 nTmpCrsrLevel = nCrsrLevel;
lcl_VisualMoveRecursion( rLine, 0, nTmpPos, bTmpForward,
nTmpCrsrLevel, nDefaultDir + 1 );
@@ -1098,7 +1101,7 @@ void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, xub_StrLen nIdx,
}
}
-void SwTxtFrm::PrepareVisualMove( xub_StrLen& nPos, BYTE& nCrsrLevel,
+void SwTxtFrm::PrepareVisualMove( xub_StrLen& nPos, sal_uInt8& nCrsrLevel,
sal_Bool& bForward, sal_Bool bInsertCrsr )
{
if( IsEmpty() || IsHiddenNow() )
@@ -1134,7 +1137,7 @@ void SwTxtFrm::PrepareVisualMove( xub_StrLen& nPos, BYTE& nCrsrLevel,
return;
}
- const BYTE nDefaultDir = static_cast<BYTE>(IsRightToLeft() ? UBIDI_RTL : UBIDI_LTR);
+ const sal_uInt8 nDefaultDir = static_cast<sal_uInt8>(IsRightToLeft() ? UBIDI_RTL : UBIDI_LTR);
const sal_Bool bVisualRight = ( nDefaultDir == UBIDI_LTR && bForward ) ||
( nDefaultDir == UBIDI_RTL && ! bForward );
@@ -1253,7 +1256,7 @@ sal_Bool SwTxtFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
aCharBox.SSize().Width() /= 2;
#if OSL_DEBUG_LEVEL > 1
// siehe Kommentar in SwTxtFrm::GetCrsrOfst()
- const ULONG nOldNode = pPam->GetPoint()->nNode.GetIndex();
+ const sal_uLong nOldNode = pPam->GetPoint()->nNode.GetIndex();
#endif
if ( pNextLine && ! bFirstOfDouble )
aLine.NextLine();
@@ -1474,7 +1477,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
nFirst = 0;
}
else if( nDist < nFirst )
- nFirst = nFirst - (USHORT)nDist;
+ nFirst = nFirst - (sal_uInt16)nDist;
else
nFirst = 0;
nDist = Max( nDist, long( GetLineSpace() ) );
@@ -1484,7 +1487,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
if( nDiff > 0 )
{
nDiff /= nDist;
- rFill.Fill().nParaCnt = static_cast<USHORT>(nDiff + 1);
+ rFill.Fill().nParaCnt = static_cast<sal_uInt16>(nDiff + 1);
rFill.nLineWidth = 0;
rFill.bInner = sal_False;
rFill.bEmpty = sal_True;
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 648ca13d3794..5ac6d2e685ec 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -467,9 +467,17 @@ void SwTxtFrm::AdjustFrm( const SwTwips nChgHght, sal_Bool bHasToFit )
if ( IsVertical() )
{
OSL_ENSURE( ! IsSwapped(),"Swapped frame while calculating nRstHeight" );
- nRstHeight = Frm().Left() + Frm().Width() -
- ( GetUpper()->Frm().Left() + GetUpper()->Prt().Left() );
- }
+
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( IsVertLR() )
+ nRstHeight = GetUpper()->Frm().Left()
+ + GetUpper()->Prt().Left()
+ + GetUpper()->Prt().Width()
+ - Frm().Left();
+ else
+ nRstHeight = Frm().Left() + Frm().Width() -
+ ( GetUpper()->Frm().Left() + GetUpper()->Prt().Left() );
+ }
else
nRstHeight = GetUpper()->Frm().Top()
+ GetUpper()->Prt().Top()
@@ -625,7 +633,7 @@ SwCntntFrm *SwTxtFrm::JoinFrm()
{
SwFtnBossFrm *pFtnBoss = 0;
SwFtnBossFrm *pEndBoss = 0;
- for ( USHORT i = 0; i < pHints->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pHints->Count(); ++i )
{
const SwTxtAttr *pHt = (*pHints)[i];
if( RES_TXTATR_FTN==pHt->Which() && *pHt->GetStart()>=nStart )
@@ -658,7 +666,7 @@ SwCntntFrm *SwTxtFrm::JoinFrm()
#endif
pFoll->MoveFlyInCnt( this, nStart, STRING_LEN );
- pFoll->SetFtn( FALSE );
+ pFoll->SetFtn( sal_False );
// --> OD 2005-12-01 #i27138#
// notify accessibility paragraphs objects about changed CONTENT_FLOWS_FROM/_TO relation.
// Relation CONTENT_FLOWS_FROM for current next paragraph will change
@@ -725,7 +733,7 @@ SwCntntFrm *SwTxtFrm::SplitFrm( const xub_StrLen nTxtPos )
{
SwFtnBossFrm *pFtnBoss = 0;
SwFtnBossFrm *pEndBoss = 0;
- for ( USHORT i = 0; i < pHints->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pHints->Count(); ++i )
{
const SwTxtAttr *pHt = (*pHints)[i];
if( RES_TXTATR_FTN==pHt->Which() && *pHt->GetStart()>=nTxtPos )
@@ -1114,7 +1122,9 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
// If the frame grows (or shirks) the repaint rectangle cannot simply
// be rotated back after formatting, because we use the upper left point
// of the frame for rotation. This point changes when growing/shrinking.
- if ( IsVertical() && nChg )
+
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( IsVertical() && !IsVertLR() && nChg )
{
SwRect &rRepaint = *(pPara->GetRepaint());
rRepaint.Left( rRepaint.Left() - nChg );
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 5727f96d3a6c..f8b6fe93cdd0 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -94,7 +94,7 @@ class SwExtraPainter
const SwLineNumberInfo &rLineInf;
SwTwips nX;
SwTwips nRedX;
- ULONG nLineNr;
+ sal_uLong nLineNr;
MSHORT nDivider;
sal_Bool bGoLeft;
sal_Bool bLineNum;
@@ -448,6 +448,10 @@ SwRect SwTxtFrm::Paint()
// d.h. als linken Rand den berechneten PaintOfst!
SwRepaint *pRepaint = GetPara()->GetRepaint();
long l;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( IsVertLR() ) // mba: the following line was added, but we don't need it for the existing directions; kept for IsVertLR(), but should be checked
+ pRepaint->Chg( ( GetUpper()->Frm() ).Pos() + ( GetUpper()->Prt() ).Pos(), ( GetUpper()->Prt() ).SSize() );
+
if( pRepaint->GetOfst() )
pRepaint->Left( pRepaint->GetOfst() );
@@ -596,7 +600,7 @@ sal_Bool SwTxtFrm::PaintEmpty( const SwRect &rRect, sal_Bool bCheck ) const
* SwTxtFrm::Paint()
*************************************************************************/
-void SwTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/ ) const
+void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
ResetRepaint();
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index 6a969f82aa9f..31e0a4d8ed73 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -77,13 +77,13 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
OSL_ENSURE( nPorHeight, "+SwTxtGuess::Guess: no height" );
- USHORT nMinSize;
- USHORT nMaxSizeDiff;
+ sal_uInt16 nMinSize;
+ sal_uInt16 nMaxSizeDiff;
const SwScriptInfo& rSI =
((SwParaPortion*)rInf.GetParaPortion())->GetScriptInfo();
- USHORT nMaxComp = ( SW_CJK == rInf.GetFont()->GetActual() ) &&
+ sal_uInt16 nMaxComp = ( SW_CJK == rInf.GetFont()->GetActual() ) &&
rSI.CountCompChg() &&
! rInf.IsMulti() &&
! rPor.InFldGrp() &&
@@ -149,7 +149,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// save maximum width for later use
if ( nMaxSizeDiff )
- rInf.SetMaxWidthDiff( (ULONG)&rPor, nMaxSizeDiff );
+ rInf.SetMaxWidthDiff( (sal_uLong)&rPor, nMaxSizeDiff );
return sal_True;
}
@@ -200,7 +200,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// save maximum width for later use
if ( nMaxSizeDiff )
- rInf.SetMaxWidthDiff( (ULONG)&rPor, nMaxSizeDiff );
+ rInf.SetMaxWidthDiff( (sal_uLong)&rPor, nMaxSizeDiff );
return sal_True;
}
@@ -326,7 +326,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// we have to check the script type of the last "real" character
if ( nLangIndex < rInf.GetIdx() )
{
- USHORT nScript = pBreakIt->GetRealScriptOfText( rInf.GetTxt(),
+ sal_uInt16 nScript = pBreakIt->GetRealScriptOfText( rInf.GetTxt(),
nLangIndex );
OSL_ENSURE( nScript, "Script is not between 1 and 4" );
@@ -393,10 +393,10 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// e.g., Schiff-fahrt, referes to the word after hyphenation
const String aHyphenatedWord = xHyphWord->getHyphenatedWord();
// e.g., Schif-fahrt: 5, referes to our string
- const USHORT nHyphenationPos = xHyphWord->getHyphenationPos();
+ const sal_uInt16 nHyphenationPos = xHyphWord->getHyphenationPos();
(void)nHyphenationPos;
// e.g., Schiff-fahrt: 6, referes to the word after hyphenation
- const USHORT nHyphenPos = xHyphWord->getHyphenPos();
+ const sal_uInt16 nHyphenPos = xHyphWord->getHyphenPos();
(void)nHyphenPos;
#endif
@@ -503,7 +503,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
// save maximum width for later use
if ( nMaxSizeDiff )
- rInf.SetMaxWidthDiff( (ULONG)&rPor, nMaxSizeDiff );
+ rInf.SetMaxWidthDiff( (sal_uLong)&rPor, nMaxSizeDiff );
nBreakWidth = nItalic + nMinSize;
}
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 3f3c4461c982..17bd0d0ceedb 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -163,7 +163,7 @@ void SwLineInfo::CtorInitLineInfo( const SwAttrSet& rAttrSet,
pRuler->Insert( aListTabStop );
// remove default tab stops, which are before the inserted list tab stop
- for ( USHORT i = 0; i < pRuler->Count(); i++ )
+ for ( sal_uInt16 i = 0; i < pRuler->Count(); i++ )
{
if ( (*pRuler)[i].GetTabPos() < nListTabStopPosition &&
(*pRuler)[i].GetAdjustment() == SVX_TAB_ADJUST_DEFAULT )
@@ -177,7 +177,7 @@ void SwLineInfo::CtorInitLineInfo( const SwAttrSet& rAttrSet,
if ( !rTxtNode.getIDocumentSettingAccess()->get(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT) )
{
// remove default tab stop at position 0
- for ( USHORT i = 0; i < pRuler->Count(); i++ )
+ for ( sal_uInt16 i = 0; i < pRuler->Count(); i++ )
{
if ( (*pRuler)[i].GetTabPos() == 0 &&
(*pRuler)[i].GetAdjustment() == SVX_TAB_ADJUST_DEFAULT )
@@ -423,7 +423,7 @@ SwPosSize SwTxtSizeInfo::GetTxtSize( OutputDevice* pOutDev,
const XubString& rTxt,
const xub_StrLen nIndex,
const xub_StrLen nLength,
- const USHORT nComp ) const
+ const sal_uInt16 nComp ) const
{
SwDrawTextInfo aDrawInf( pVsh, *pOutDev, pSI, rTxt, nIndex, nLength );
aDrawInf.SetFrm( pFrm );
@@ -445,7 +445,7 @@ SwPosSize SwTxtSizeInfo::GetTxtSize() const
// in some cases, compression is not allowed or surpressed for
// performance reasons
- USHORT nComp =( SW_CJK == GetFont()->GetActual() &&
+ sal_uInt16 nComp =( SW_CJK == GetFont()->GetActual() &&
rSI.CountCompChg() &&
! IsMulti() ) ?
GetKanaComp() :
@@ -464,8 +464,8 @@ SwPosSize SwTxtSizeInfo::GetTxtSize() const
*************************************************************************/
void SwTxtSizeInfo::GetTxtSize( const SwScriptInfo* pSI, const xub_StrLen nIndex,
- const xub_StrLen nLength, const USHORT nComp,
- USHORT& nMinSize, USHORT& nMaxSizeDiff ) const
+ const xub_StrLen nLength, const sal_uInt16 nComp,
+ sal_uInt16& nMinSize, sal_uInt16& nMaxSizeDiff ) const
{
SwDrawTextInfo aDrawInf( pVsh, *pOut, pSI, *pTxt, nIndex, nLength );
aDrawInf.SetFrm( pFrm );
@@ -473,7 +473,7 @@ void SwTxtSizeInfo::GetTxtSize( const SwScriptInfo* pSI, const xub_StrLen nIndex
aDrawInf.SetSnapToGrid( SnapToGrid() );
aDrawInf.SetKanaComp( nComp );
SwPosSize aSize = pFnt->_GetTxtSize( aDrawInf );
- nMaxSizeDiff = (USHORT)aDrawInf.GetKanaDiff();
+ nMaxSizeDiff = (sal_uInt16)aDrawInf.GetKanaDiff();
nMinSize = aSize.Width();
}
@@ -483,7 +483,7 @@ void SwTxtSizeInfo::GetTxtSize( const SwScriptInfo* pSI, const xub_StrLen nIndex
xub_StrLen SwTxtSizeInfo::GetTxtBreak( const long nLineWidth,
const xub_StrLen nMaxLen,
- const USHORT nComp ) const
+ const sal_uInt16 nComp ) const
{
const SwScriptInfo& rScriptInfo =
( (SwParaPortion*)GetParaPortion() )->GetScriptInfo();
@@ -506,7 +506,7 @@ xub_StrLen SwTxtSizeInfo::GetTxtBreak( const long nLineWidth,
xub_StrLen SwTxtSizeInfo::GetTxtBreak( const long nLineWidth,
const xub_StrLen nMaxLen,
- const USHORT nComp,
+ const sal_uInt16 nComp,
xub_StrLen& rExtraCharPos ) const
{
const SwScriptInfo& rScriptInfo =
@@ -594,7 +594,7 @@ sal_Bool lcl_IsDarkBackground( const SwTxtPaintInfo& rInf )
/// OD 21.08.2002 #99657#
/// There is a background color, if there is a background brush and
/// its color is *not* "no fill"/"auto fill".
- if( rInf.GetTxtFrm()->GetBackgroundBrush( pItem, pCol, aOrigBackRect, FALSE ) )
+ if( rInf.GetTxtFrm()->GetBackgroundBrush( pItem, pCol, aOrigBackRect, sal_False ) )
{
if ( !pCol )
pCol = &pItem->GetColor();
@@ -668,7 +668,7 @@ void SwTxtPaintInfo::_DrawText( const XubString &rText, const SwLinePortion &rPo
// in some cases, kana compression is not allowed or surpressed for
// performance reasons
- USHORT nComp = 0;
+ sal_uInt16 nComp = 0;
if ( ! IsMulti() )
nComp = GetKanaComp();
@@ -784,12 +784,16 @@ void SwTxtPaintInfo::CalcRect( const SwLinePortion& rPor,
else
{
aPoint.A() = X();
- aPoint.B() = Y() - rPor.GetAscent();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( GetTxtFrm()->IsVertLR() )
+ aPoint.B() = Y() - rPor.Height() + rPor.GetAscent();
+ else
+ aPoint.B() = Y() - rPor.GetAscent();
}
// Adjust x coordinate if we are inside a bidi portion
- const BOOL bFrmDir = GetTxtFrm()->IsRightToLeft();
- BOOL bCounterDir = ( ! bFrmDir && DIR_RIGHT2LEFT == GetDirection() ) ||
+ const sal_Bool bFrmDir = GetTxtFrm()->IsRightToLeft();
+ sal_Bool bCounterDir = ( ! bFrmDir && DIR_RIGHT2LEFT == GetDirection() ) ||
( bFrmDir && DIR_LEFT2RIGHT == GetDirection() );
if ( bCounterDir )
@@ -833,7 +837,7 @@ void SwTxtPaintInfo::CalcRect( const SwLinePortion& rPor,
static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rPor,
SwRect& rRect, const Color* pCol, sal_Unicode cChar,
- BYTE nOptions )
+ sal_uInt8 nOptions )
{
sal_Bool bCenter = 0 != ( nOptions & DRAW_SPECIAL_OPTIONS_CENTER );
sal_Bool bRotate = 0 != ( nOptions & DRAW_SPECIAL_OPTIONS_ROTATE );
@@ -874,7 +878,7 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
((SwTxtPaintInfo&)rInf).SetFont( pFnt );
// The maximum width depends on the current orientation
- const USHORT nDir = pFnt->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
+ const sal_uInt16 nDir = pFnt->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
SwTwips nMaxWidth = 0;
switch ( nDir )
{
@@ -899,7 +903,7 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
const SwTwips nOldWidth = aFontSize.Width();
// new height for font
- const BYTE nAct = pFnt->GetActual();
+ const sal_uInt8 nAct = pFnt->GetActual();
aFontSize.Height() = ( 100 * pFnt->GetSize( nAct ).Height() ) / nFactor;
aFontSize.Width() = ( 100 * pFnt->GetSize( nAct).Width() ) / nFactor;
@@ -940,8 +944,8 @@ static void lcl_DrawSpecial( const SwTxtPaintInfo& rInf, const SwLinePortion& rP
Point aTmpPos( nX, nY );
((SwTxtPaintInfo&)rInf).SetPos( aTmpPos );
- USHORT nOldWidth = rPor.Width();
- ((SwLinePortion&)rPor).Width( (USHORT)aFontSize.Width() );
+ sal_uInt16 nOldWidth = rPor.Width();
+ ((SwLinePortion&)rPor).Width( (sal_uInt16)aFontSize.Width() );
rInf.DrawText( aTmp, rPor );
((SwLinePortion&)rPor).Width( nOldWidth );
((SwTxtPaintInfo&)rInf).SetFont( (SwFont*)pOldFnt );
@@ -986,7 +990,7 @@ void SwTxtPaintInfo::DrawTab( const SwLinePortion &rPor ) const
const sal_Unicode cChar = GetTxtFrm()->IsRightToLeft() ?
CHAR_TAB_RTL : CHAR_TAB;
- const BYTE nOptions = DRAW_SPECIAL_OPTIONS_CENTER |
+ const sal_uInt8 nOptions = DRAW_SPECIAL_OPTIONS_CENTER |
DRAW_SPECIAL_OPTIONS_ROTATE;
lcl_DrawSpecial( *this, rPor, aRect, 0, cChar, nOptions );
}
@@ -1010,7 +1014,7 @@ void SwTxtPaintInfo::DrawLineBreak( const SwLinePortion &rPor ) const
{
const sal_Unicode cChar = GetTxtFrm()->IsRightToLeft() ?
CHAR_LINEBREAK_RTL : CHAR_LINEBREAK;
- const BYTE nOptions = 0;
+ const sal_uInt8 nOptions = 0;
lcl_DrawSpecial( *this, rPor, aRect, 0, cChar, nOptions );
}
@@ -1052,7 +1056,7 @@ void SwTxtPaintInfo::DrawRedArrow( const SwLinePortion &rPor ) const
if( aRect.HasArea() )
{
- const BYTE nOptions = 0;
+ const sal_uInt8 nOptions = 0;
lcl_DrawSpecial( *this, rPor, aRect, &aCol, cChar, nOptions );
}
}
@@ -1069,9 +1073,9 @@ void SwTxtPaintInfo::DrawPostIts( const SwLinePortion&, sal_Bool bScript ) const
Size aSize;
Point aTmp;
- const USHORT nPostItsWidth = pOpt->GetPostItsWidth( GetOut() );
- const USHORT nFontHeight = pFnt->GetHeight( pVsh, *GetOut() );
- const USHORT nFontAscent = pFnt->GetAscent( pVsh, *GetOut() );
+ const sal_uInt16 nPostItsWidth = pOpt->GetPostItsWidth( GetOut() );
+ const sal_uInt16 nFontHeight = pFnt->GetHeight( pVsh, *GetOut() );
+ const sal_uInt16 nFontAscent = pFnt->GetAscent( pVsh, *GetOut() );
switch ( pFnt->GetOrientation( GetTxtFrm()->IsVertical() ) )
{
@@ -1309,9 +1313,9 @@ void SwTxtPaintInfo::_NotifyURL( const SwLinePortion &rPor ) const
*************************************************************************/
static void lcl_InitHyphValues( PropertyValues &rVals,
- INT16 nMinLeading, INT16 nMinTrailing )
+ sal_Int16 nMinLeading, sal_Int16 nMinTrailing )
{
- INT32 nLen = rVals.getLength();
+ sal_Int32 nLen = rVals.getLength();
if (0 == nLen) // yet to be initialized?
{
@@ -1366,8 +1370,8 @@ sal_Bool SwTxtFormatInfo::InitHyph( const sal_Bool bAutoHyphen )
nHyphStart = nHyphWrdStart = STRING_LEN;
nHyphWrdLen = 0;
- const INT16 nMinimalLeading = Max(rAttr.GetMinLead(), sal_uInt8(2));
- const INT16 nMinimalTrailing = rAttr.GetMinTrail();
+ const sal_Int16 nMinimalLeading = Max(rAttr.GetMinLead(), sal_uInt8(2));
+ const sal_Int16 nMinimalTrailing = rAttr.GetMinTrail();
lcl_InitHyphValues( aHyphVals, nMinimalLeading, nMinimalTrailing);
}
return bAuto;
@@ -1528,23 +1532,23 @@ SwTxtFormatInfo::SwTxtFormatInfo( const SwTxtFormatInfo& rInf,
nMinLeading = 0;
nMinTrailing = 0;
nMinWordLength = 0;
- bFull = FALSE;
- bFtnDone = TRUE;
- bErgoDone = TRUE;
- bNumDone = TRUE;
- bArrowDone = TRUE;
- bStop = FALSE;
- bNewLine = TRUE;
- bShift = FALSE;
- bUnderFlow = FALSE;
- bInterHyph = FALSE;
- bAutoHyph = FALSE;
- bDropInit = FALSE;
+ bFull = sal_False;
+ bFtnDone = sal_True;
+ bErgoDone = sal_True;
+ bNumDone = sal_True;
+ bArrowDone = sal_True;
+ bStop = sal_False;
+ bNewLine = sal_True;
+ bShift = sal_False;
+ bUnderFlow = sal_False;
+ bInterHyph = sal_False;
+ bAutoHyph = sal_False;
+ bDropInit = sal_False;
bQuick = rInf.bQuick;
- bNoEndHyph = FALSE;
- bNoMidHyph = FALSE;
- bIgnoreFly = FALSE;
- bFakeLineStart = FALSE;
+ bNoEndHyph = sal_False;
+ bNoMidHyph = sal_False;
+ bIgnoreFly = sal_False;
+ bFakeLineStart = sal_False;
cTabDecimal = 0;
cHookChar = 0;
@@ -1680,15 +1684,15 @@ xub_StrLen SwTxtFormatInfo::ScanPortionEnd( const xub_StrLen nStart,
return i;
}
-BOOL SwTxtFormatInfo::LastKernPortion()
+sal_Bool SwTxtFormatInfo::LastKernPortion()
{
if( GetLast() )
{
if( GetLast()->IsKernPortion() )
- return TRUE;
+ return sal_True;
if( GetLast()->Width() || ( GetLast()->GetLen() &&
!GetLast()->IsHolePortion() ) )
- return FALSE;
+ return sal_False;
}
SwLinePortion* pPor = GetRoot();
SwLinePortion *pKern = NULL;
@@ -1703,9 +1707,9 @@ BOOL SwTxtFormatInfo::LastKernPortion()
if( pKern )
{
SetLast( pKern );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1744,7 +1748,7 @@ SwTxtSlot::SwTxtSlot( const SwTxtSizeInfo *pNew, const SwLinePortion *pPor,
pOldSmartTagList = static_cast<SwTxtPaintInfo*>(pInf)->GetSmartTags();
if ( pOldSmartTagList )
{
- const USHORT nPos = pOldSmartTagList->GetWrongPos(nIdx);
+ const sal_uInt16 nPos = pOldSmartTagList->GetWrongPos(nIdx);
const xub_StrLen nListPos = pOldSmartTagList->Pos(nPos);
if( nListPos == nIdx )
((SwTxtPaintInfo*)pInf)->SetSmartTags( pOldSmartTagList->SubList( nPos ) );
@@ -1760,7 +1764,7 @@ SwTxtSlot::SwTxtSlot( const SwTxtSizeInfo *pNew, const SwLinePortion *pPor,
pOldGrammarCheckList = static_cast<SwTxtPaintInfo*>(pInf)->GetGrammarCheckList();
if ( pOldGrammarCheckList )
{
- const USHORT nPos = pOldGrammarCheckList->GetWrongPos(nIdx);
+ const sal_uInt16 nPos = pOldGrammarCheckList->GetWrongPos(nIdx);
const xub_StrLen nListPos = pOldGrammarCheckList->Pos(nPos);
if( nListPos == nIdx )
((SwTxtPaintInfo*)pInf)->SetGrammarCheckList( pOldGrammarCheckList->SubList( nPos ) );
@@ -1865,7 +1869,7 @@ SwFontSave::~SwFontSave()
SwDefFontSave::SwDefFontSave( const SwTxtSizeInfo &rInf )
: pFnt( ((SwTxtSizeInfo&)rInf).GetFont() )
{
- const BOOL bTmpAlter = pFnt->GetFixKerning() ||
+ const sal_Bool bTmpAlter = pFnt->GetFixKerning() ||
( RTL_TEXTENCODING_SYMBOL == pFnt->GetCharSet(pFnt->GetActual()) )
;
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 7670ad819d6b..45f153c53612 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -96,7 +96,7 @@ class SwLineInfo
SvxTabStopItem* pRuler;
const SvxLineSpacingItem *pSpace;
- USHORT nVertAlign;
+ sal_uInt16 nVertAlign;
KSHORT nDefTabStop;
bool bListTabStopIncluded;
long nListTabStopPosition;
@@ -118,14 +118,14 @@ public:
{ ( (SwLineInfo*)this )->nDefTabStop = nNew; }
// vertical alignment
- inline USHORT GetVertAlign() const { return nVertAlign; }
+ inline sal_uInt16 GetVertAlign() const { return nVertAlign; }
inline sal_Bool HasSpecialAlign( sal_Bool bVert ) const
{ return bVert ?
( SvxParaVertAlignItem::BASELINE != nVertAlign ) :
( SvxParaVertAlignItem::BASELINE != nVertAlign &&
SvxParaVertAlignItem::AUTOMATIC != nVertAlign ); }
- USHORT NumberOfTabStops() const;
+ sal_uInt16 NumberOfTabStops() const;
inline bool IsListTabStopIncluded() const
{
@@ -192,7 +192,7 @@ protected:
const SwViewOption *pOpt;
const XubString *pTxt;
xub_StrLen nIdx, nLen;
- USHORT nKanaIdx;
+ sal_uInt16 nKanaIdx;
sal_Bool bOnWin : 1;
sal_Bool bNotEOL : 1;
sal_Bool bURLNotify : 1;
@@ -292,13 +292,13 @@ public:
//
SwPosSize GetTxtSize( OutputDevice* pOut, const SwScriptInfo* pSI,
const XubString& rTxt, const xub_StrLen nIdx,
- const xub_StrLen nLen, const USHORT nComp ) const;
+ const xub_StrLen nLen, const sal_uInt16 nComp ) const;
SwPosSize GetTxtSize() const;
void GetTxtSize( const SwScriptInfo* pSI, const xub_StrLen nIdx,
- const xub_StrLen nLen, const USHORT nComp,
- USHORT& nMinSize, USHORT& nMaxSizeDiff ) const;
+ const xub_StrLen nLen, const sal_uInt16 nComp,
+ sal_uInt16& nMinSize, sal_uInt16& nMaxSizeDiff ) const;
inline SwPosSize GetTxtSize( const SwScriptInfo* pSI, const xub_StrLen nIdx,
- const xub_StrLen nLen, const USHORT nComp ) const;
+ const xub_StrLen nLen, const sal_uInt16 nComp ) const;
inline SwPosSize GetTxtSize( const XubString &rTxt ) const;
//
@@ -306,10 +306,10 @@ public:
//
xub_StrLen GetTxtBreak( const long nLineWidth,
const xub_StrLen nMaxLen,
- const USHORT nComp ) const;
+ const sal_uInt16 nComp ) const;
xub_StrLen GetTxtBreak( const long nLineWidth,
const xub_StrLen nMaxLen,
- const USHORT nComp,
+ const sal_uInt16 nComp,
xub_StrLen& rExtraCharPos ) const;
inline KSHORT GetAscent() const;
@@ -341,13 +341,13 @@ public:
// space among compressed kanas.
// During formatting, the maximum values of compressable portions are
// stored in aMaxWidth and discarded after a line has been formatted.
- inline void SetMaxWidthDiff( ULONG nKey, USHORT nVal )
+ inline void SetMaxWidthDiff( sal_uLong nKey, sal_uInt16 nVal )
{
aMaxWidth.Insert( nKey, nVal );
};
- inline USHORT GetMaxWidthDiff( ULONG nKey )
+ inline sal_uInt16 GetMaxWidthDiff( sal_uLong nKey )
{
- return (USHORT)aMaxWidth.Get( nKey );
+ return (sal_uInt16)aMaxWidth.Get( nKey );
};
inline void ResetMaxWidthDiff()
{
@@ -367,7 +367,7 @@ public:
inline void IncKanaIdx() { ++nKanaIdx; }
inline void SetKanaComp( SvUShorts *pNew ){ pKanaComp = pNew; }
inline SvUShorts* GetpKanaComp() const { return pKanaComp; }
- inline USHORT GetKanaComp() const
+ inline sal_uInt16 GetKanaComp() const
{ return ( pKanaComp && nKanaIdx < pKanaComp->Count() )
? (*pKanaComp)[nKanaIdx] : 0; }
@@ -532,7 +532,7 @@ class SwTxtFormatInfo : public SwTxtPaintInfo
xub_StrLen nHyphWrdLen; // gefundene Wort-Laenge
xub_StrLen nLineStart; // aktueller Zeilenbeginn im rTxt
xub_StrLen nUnderScorePos; // enlarge repaint if underscore has been found
- // --> FME 2004-11-25 #i34348# Changed type from USHORT to SwTwips
+ // --> FME 2004-11-25 #i34348# Changed type from sal_uInt16 to SwTwips
SwTwips nLeft; // linker Rand
SwTwips nRight; // rechter Rand
SwTwips nFirst; // EZE
@@ -543,9 +543,9 @@ class SwTxtFormatInfo : public SwTxtPaintInfo
KSHORT nLineNettoHeight; // line height without spacing
KSHORT nForcedLeftMargin; // Verschiebung des linken Rands wg. Rahmen
- INT16 nMinLeading; // minimum number of chars before hyphenation point
- INT16 nMinTrailing; // minimum number of chars after hyphenation point
- INT16 nMinWordLength; // minimum length of word to be hyphenated
+ sal_Int16 nMinLeading; // minimum number of chars before hyphenation point
+ sal_Int16 nMinTrailing; // minimum number of chars after hyphenation point
+ sal_Int16 nMinWordLength; // minimum length of word to be hyphenated
sal_Bool bFull : 1; // Zeile ist voll
sal_Bool bFtnDone : 1; // Ftn bereits formatiert
@@ -713,7 +713,7 @@ public:
// ruft HyphenateWord() des Hyphenators
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XHyphenatedWord >
- HyphWord( const String &rTxt, const USHORT nMinTrail );
+ HyphWord( const String &rTxt, const sal_uInt16 nMinTrail );
const com::sun::star::beans::PropertyValues &
GetHyphValues() const;
@@ -727,7 +727,7 @@ public:
void Reset( const SwTxtFrm *pFrame); // , const sal_Bool bAll );
// Sets the last SwKernPortion as pLast, if it is followed by empty portions
- BOOL LastKernPortion();
+ sal_Bool LastKernPortion();
// Sucht ab nIdx bis nEnd nach Tabs, TabDec, TXTATR und BRK.
// Return: gefundene Position, setzt ggf. cHookChar
@@ -821,7 +821,7 @@ inline SwPosSize SwTxtSizeInfo::GetTxtSize( const XubString &rTxt ) const
inline SwPosSize SwTxtSizeInfo::GetTxtSize( const SwScriptInfo* pSI,
const xub_StrLen nNewIdx,
const xub_StrLen nNewLen,
- const USHORT nCompress ) const
+ const sal_uInt16 nCompress ) const
{
return GetTxtSize( pOut, pSI, *pTxt, nNewIdx, nNewLen, nCompress );
}
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index 43b70f10dc1b..9323716fd6b2 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -174,7 +174,7 @@ bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTxtSizeInfo& rInf, SwTxtIte
}
else
{
- ULONG nOldLayout = rInf.GetOut()->GetLayoutMode();
+ sal_uLong nOldLayout = rInf.GetOut()->GetLayoutMode();
rInf.GetOut()->SetLayoutMode ( nOldLayout | TEXT_LAYOUT_BIDI_RTL );
nKashidasDropped = rInf.GetOut()->ValidateKashidas ( rInf.GetTxt(), nIdx, nNext - nIdx,
nKashidasInAttr, pKashidaPos + nKashidaIdx,
@@ -427,7 +427,7 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
SvUShorts *pNewKana = new SvUShorts;
pCurrent->SetKanaComp( pNewKana );
- const USHORT nNull = 0;
+ const sal_uInt16 nNull = 0;
MSHORT nKanaIdx = 0;
long nKanaDiffSum = 0;
SwTwips nRepaintOfst = 0;
@@ -446,11 +446,11 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
{
// get maximum portion width from info structure, calculated
// during text formatting
- USHORT nMaxWidthDiff = GetInfo().GetMaxWidthDiff( (ULONG)pPos );
+ sal_uInt16 nMaxWidthDiff = GetInfo().GetMaxWidthDiff( (sal_uLong)pPos );
// check, if information is stored under other key
if ( !nMaxWidthDiff && pPos == pCurrent->GetFirstPortion() )
- nMaxWidthDiff = GetInfo().GetMaxWidthDiff( (ULONG)pCurrent );
+ nMaxWidthDiff = GetInfo().GetMaxWidthDiff( (sal_uLong)pCurrent );
// calculate difference between portion width and max. width
nKanaDiffSum += nMaxWidthDiff;
@@ -465,7 +465,7 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
if ( nKanaIdx == pCurrent->GetKanaComp().Count() )
pCurrent->GetKanaComp().Insert( nNull, nKanaIdx );
- USHORT nRest;
+ sal_uInt16 nRest;
if ( pPos->InTabGrp() )
{
@@ -490,7 +490,7 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
if( nKanaDiffSum )
{
- ULONG nCompress = ( 10000 * nRest ) / nKanaDiffSum;
+ sal_uLong nCompress = ( 10000 * nRest ) / nKanaDiffSum;
if ( nCompress >= 10000 )
// kanas can be expanded to 100%, and there is still
@@ -500,7 +500,7 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
else
nCompress = 10000 - nCompress;
- ( pCurrent->GetKanaComp() )[ nKanaIdx ] = (USHORT)nCompress;
+ ( pCurrent->GetKanaComp() )[ nKanaIdx ] = (sal_uInt16)nCompress;
nKanaDiffSum = 0;
}
@@ -513,7 +513,7 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
// set portion width
nKanaIdx = 0;
- USHORT nCompress = ( pCurrent->GetKanaComp() )[ nKanaIdx ];
+ sal_uInt16 nCompress = ( pCurrent->GetKanaComp() )[ nKanaIdx ];
pPos = pCurrent->GetPortion();
long nDecompress = 0;
nKanaDiffSum = 0;
@@ -522,15 +522,15 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
{
if ( pPos->InTxtGrp() )
{
- const USHORT nMinWidth = pPos->Width();
+ const sal_uInt16 nMinWidth = pPos->Width();
// get maximum portion width from info structure, calculated
// during text formatting
- USHORT nMaxWidthDiff = GetInfo().GetMaxWidthDiff( (ULONG)pPos );
+ sal_uInt16 nMaxWidthDiff = GetInfo().GetMaxWidthDiff( (sal_uLong)pPos );
// check, if information is stored under other key
if ( !nMaxWidthDiff && pPos == pCurrent->GetFirstPortion() )
- nMaxWidthDiff = GetInfo().GetMaxWidthDiff( (ULONG)pCurrent );
+ nMaxWidthDiff = GetInfo().GetMaxWidthDiff( (sal_uLong)pCurrent );
nKanaDiffSum += nMaxWidthDiff;
pPos->Width( nMinWidth +
( ( 10000 - nCompress ) * nMaxWidthDiff ) / 10000 );
@@ -544,7 +544,7 @@ SwTwips SwTxtAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
nKanaDiffSum /= 10000;
}
- pPos->Width( static_cast<USHORT>(pPos->Width() - nDecompress) );
+ pPos->Width( static_cast<sal_uInt16>(pPos->Width() - nDecompress) );
if ( pPos->InTabGrp() )
// set fix width to width
@@ -571,8 +571,8 @@ SwMarginPortion *SwTxtAdjuster::CalcRightMargin( SwLineLayout *pCurrent,
SwTwips nReal )
{
long nRealWidth;
- const USHORT nRealHeight = GetLineHeight();
- const USHORT nLineHeight = pCurrent->Height();
+ const sal_uInt16 nRealHeight = GetLineHeight();
+ const sal_uInt16 nLineHeight = pCurrent->Height();
KSHORT nPrtWidth = pCurrent->PrtWidth();
SwLinePortion *pLast = pCurrent->FindLastPortion();
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 2348f7469190..354de3eca96b 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -332,7 +332,7 @@ xub_StrLen SwAttrIter::GetNextAttr( ) const
if (m_pTxtNode!=NULL) {
//TODO maybe use hints like FieldHints for this instead of looking at the text...
int l=(nNext<m_pTxtNode->Len()?nNext:m_pTxtNode->Len());
- USHORT p=nPos;
+ sal_uInt16 p=nPos;
const sal_Unicode *txt=m_pTxtNode->GetTxt().GetBuffer();
while(p<l && txt[p]!=CH_TXT_ATR_FIELDSTART && txt[p]!=CH_TXT_ATR_FIELDEND && txt[p]!=CH_TXT_ATR_FORMELEMENT) p++;
if ((p<l && p>nPos) || nNext<=p)
@@ -362,14 +362,14 @@ class SwMinMaxArgs
public:
OutputDevice* pOut;
ViewShell* pSh;
- ULONG &rMin;
- ULONG &rMax;
- ULONG &rAbsMin;
+ sal_uLong &rMin;
+ sal_uLong &rMax;
+ sal_uLong &rAbsMin;
long nRowWidth;
long nWordWidth;
long nWordAdd;
xub_StrLen nNoLineBreak;
- SwMinMaxArgs( OutputDevice* pOutI, ViewShell* pShI, ULONG& rMinI, ULONG &rMaxI, ULONG &rAbsI )
+ SwMinMaxArgs( OutputDevice* pOutI, ViewShell* pShI, sal_uLong& rMinI, sal_uLong &rMaxI, sal_uLong &rAbsI )
: pOut( pOutI ), pSh( pShI ), rMin( rMinI ), rMax( rMaxI ), rAbsMin( rAbsI )
{ nRowWidth = nWordWidth = nWordAdd = 0; nNoLineBreak = STRING_LEN; }
void Minimum( long nNew ) const { if( (long)rMin < nNew ) rMin = nNew; }
@@ -390,7 +390,7 @@ sal_Bool lcl_MinMaxString( SwMinMaxArgs& rArg, SwFont* pFnt, const XubString &rT
bClear = CH_BLANK == rTxt.GetChar( nStop );
Boundary aBndry( pBreakIt->GetBreakIter()->getWordBoundary( rTxt, nIdx,
pBreakIt->GetLocale( eLang ),
- WordType::DICTIONARY_WORD, TRUE ) );
+ WordType::DICTIONARY_WORD, sal_True ) );
nStop = (xub_StrLen)aBndry.endPos;
if( nIdx <= aBndry.startPos && nIdx && nIdx-1 != rArg.nNoLineBreak )
rArg.NewWord();
@@ -444,13 +444,13 @@ sal_Bool SwTxtNode::IsSymbol( const xub_StrLen nBegin ) const
class SwMinMaxNodeArgs
{
public:
- ULONG nMaxWidth; // Summe aller Rahmenbreite
+ sal_uLong nMaxWidth; // Summe aller Rahmenbreite
long nMinWidth; // Breitester Rahmen
long nLeftRest; // noch nicht von Rahmen ueberdeckter Platz im l. Rand
long nRightRest; // noch nicht von Rahmen ueberdeckter Platz im r. Rand
long nLeftDiff; // Min/Max-Differenz des Rahmens im linken Rand
long nRightDiff; // Min/Max-Differenz des Rahmens im rechten Rand
- ULONG nIndx; // Indexnummer des Nodes
+ sal_uLong nIndx; // Indexnummer des Nodes
void Minimum( long nNew ) { if( nNew > nMinWidth ) nMinWidth = nNew; }
};
@@ -484,7 +484,7 @@ sal_Bool lcl_MinMaxNode( const SwFrmFmtPtr& rpNd, void* pArgs )
// Enthaelt der Rahmen zu Beginn oder am Ende eine Tabelle?
const SwNodes& rNodes = static_cast<SwFrmFmt*>(rpNd)->GetDoc()->GetNodes();
const SwFmtCntnt& rFlyCntnt = ((SwFrmFmt*)rpNd)->GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
SwTableNode* pTblNd = rNodes[nStt+1]->GetTableNode();
if( !pTblNd )
{
@@ -590,8 +590,8 @@ sal_Bool lcl_MinMaxNode( const SwFrmFmtPtr& rpNd, void* pArgs )
// changing this method very likely requires changing of
// "GetScalingOfSelectedText"
-void SwTxtNode::GetMinMaxSize( ULONG nIndex, ULONG& rMin, ULONG &rMax,
- ULONG& rAbsMin, OutputDevice* pOut ) const
+void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMax,
+ sal_uLong& rAbsMin, OutputDevice* pOut ) const
{
ViewShell* pSh = 0;
GetDoc()->GetEditShell( &pSh );
@@ -780,7 +780,7 @@ void SwTxtNode::GetMinMaxSize( ULONG nIndex, ULONG& rMin, ULONG &rMax,
case RES_TXTATR_FIELD :
{
SwField *pFld = (SwField*)pHint->GetFld().GetFld();
- const String aTxt = pFld->GetCntnt( FALSE );
+ const String aTxt = pFld->ExpandField(true);
if( lcl_MinMaxString( aArg, aIter.GetFnt(), aTxt, 0,
aTxt.Len() ) )
nAdd = 20;
@@ -828,7 +828,7 @@ void SwTxtNode::GetMinMaxSize( ULONG nIndex, ULONG& rMin, ULONG &rMax,
* changing this method very likely requires changing of "GetMinMaxSize"
*************************************************************************/
-USHORT SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd )
+sal_uInt16 SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd )
const
{
ViewShell* pSh = NULL;
@@ -896,8 +896,8 @@ USHORT SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd )
xub_StrLen nIdx = nStt;
- ULONG nWidth = 0;
- ULONG nProWidth = 0;
+ sal_uLong nWidth = 0;
+ sal_uLong nProWidth = 0;
while( nIdx < nEnd )
{
@@ -983,7 +983,7 @@ USHORT SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd )
case RES_TXTATR_FIELD :
{
SwField *pFld = (SwField*)pHint->GetFld().GetFld();
- const String aTxt = pFld->GetCntnt( FALSE );
+ String const aTxt = pFld->ExpandField(true);
SwDrawTextInfo aDrawInf( pSh, *pOut, 0, aTxt, 0, aTxt.Len() );
nProWidth += aIter.GetFnt()->_GetTxtSize( aDrawInf ).Width();
@@ -1028,7 +1028,7 @@ USHORT SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd )
SwTxtIter aLine( pFrm, &aInf );
aLine.CharToLine( nStt );
pOut->SetMapMode( aOldMap );
- return (USHORT)( nWidth ?
+ return (sal_uInt16)( nWidth ?
( ( 100 * aLine.GetCurr()->Height() ) / nWidth ) : 0 );
}
// no frame or no paragraph, we take the height of the character
@@ -1038,13 +1038,13 @@ USHORT SwTxtNode::GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd )
pOut->SetMapMode( aOldMap );
SwDrawTextInfo aDrawInf( pSh, *pOut, 0, GetTxt(), nStt, 1 );
- return (USHORT)
+ return (sal_uInt16)
( nWidth ? ((100 * aIter.GetFnt()->_GetTxtSize( aDrawInf ).Height()) / nWidth ) : 0 );
}
-USHORT SwTxtNode::GetWidthOfLeadingTabs() const
+sal_uInt16 SwTxtNode::GetWidthOfLeadingTabs() const
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
xub_StrLen nIdx = 0;
sal_Unicode cCh;
@@ -1073,7 +1073,7 @@ USHORT SwTxtNode::GetWidthOfLeadingTabs() const
SWRECTFN( pFrm )
SwRect aRect;
pFrm->GetCharRect( aRect, aPos );
- nRet = (USHORT)
+ nRet = (sal_uInt16)
( pFrm->IsRightToLeft() ?
(pFrm->*fnRect->fnGetPrtRight)() - (aRect.*fnRect->fnGetRight)() :
(aRect.*fnRect->fnGetLeft)() - (pFrm->*fnRect->fnGetPrtLeft)() );
diff --git a/sw/source/core/text/itratr.hxx b/sw/source/core/text/itratr.hxx
index a5f63cf0b15a..a9e5b455e1f9 100644
--- a/sw/source/core/text/itratr.hxx
+++ b/sw/source/core/text/itratr.hxx
@@ -68,7 +68,7 @@ private:
MSHORT nChgCnt;
SwRedlineItr *pRedln;
xub_StrLen nStartIndex, nEndIndex, nPos;
- BYTE nPropFont;
+ sal_uInt8 nPropFont;
void SeekFwd( const xub_StrLen nPos );
inline void SetFnt( SwFont* pNew ) { pFnt = pNew; }
const void* aMagicNo[ SW_SCRIPTS ];
@@ -121,8 +121,8 @@ public:
inline SwFont *GetFnt() { return pFnt; }
inline const SwFont *GetFnt() const { return pFnt; }
- inline BYTE GetPropFont() const { return nPropFont; }
- inline void SetPropFont( const BYTE nNew ) { nPropFont = nNew; }
+ inline sal_uInt8 GetPropFont() const { return nPropFont; }
+ inline void SetPropFont( const sal_uInt8 nNew ) { nPropFont = nNew; }
inline SwAttrHandler& GetAttrHandler() { return aAttrHandler; }
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index ce47edc98337..b480f2cff520 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -80,9 +80,9 @@ void lcl_GetCharRectInsideField( SwTxtSizeInfo& rInf, SwRect& rOrig,
if ( rPor.InFldGrp() && ((SwFldPortion&)rPor).GetExp().Len() )
{
- const USHORT nCharOfst = rCMS.pSpecialPos->nCharOfst;
- USHORT nFldIdx = 0;
- USHORT nFldLen = 0;
+ const sal_uInt16 nCharOfst = rCMS.pSpecialPos->nCharOfst;
+ sal_uInt16 nFldIdx = 0;
+ sal_uInt16 nFldLen = 0;
const XubString* pString = 0;
const SwLinePortion* pPor = &rPor;
@@ -106,10 +106,10 @@ void lcl_GetCharRectInsideField( SwTxtSizeInfo& rInf, SwRect& rOrig,
rOrig.Pos().X() += pPor->Width();
pPor = pPor->GetPortion();
- } while ( TRUE );
+ } while ( sal_True );
OSL_ENSURE( nCharOfst >= nFldIdx, "Request of position inside field failed" );
- USHORT nLen = nCharOfst - nFldIdx + 1;
+ sal_uInt16 nLen = nCharOfst - nFldIdx + 1;
if ( pString )
{
@@ -154,7 +154,7 @@ namespace {
if ( rTxtNode.AreListLevelIndentsApplicable() )
{
const SwNumFmt& rNumFmt =
- rTxtNode.GetNumRule()->Get( static_cast<USHORT>(rTxtNode.GetActualListLevel()) );
+ rTxtNode.GetNumRule()->Get( static_cast<sal_uInt16>(rTxtNode.GetActualListLevel()) );
if ( rNumFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
bRet = true;
@@ -346,7 +346,7 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
nFirst = nRight - 1;
}
const SvxAdjustItem& rAdjust = pFrm->GetTxtNode()->GetSwAttrSet().GetAdjust();
- nAdjust = static_cast<USHORT>(rAdjust.GetAdjust());
+ nAdjust = static_cast<sal_uInt16>(rAdjust.GetAdjust());
// left is left and right is right
if ( pFrm->IsRightToLeft() )
@@ -640,7 +640,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
// For common portions (including BidiPortions) we want to add
// the portion width to nX. For MultiPortions, nExtra = 0,
// therefore we go to the 'else' branch and start a recursion.
- const BYTE nExtra = pPor->IsMultiPortion() &&
+ const sal_uInt8 nExtra = pPor->IsMultiPortion() &&
! ((SwMultiPortion*)pPor)->IsBidi() &&
! bWidth ? 0 : 1;
if ( aInf.GetIdx() + pPor->GetLen() < nOfst + nExtra )
@@ -752,7 +752,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
// of the multi-portion.
xub_StrLen nOldStart = nStart;
SwTwips nOldY = nY;
- BYTE nOldProp = GetPropFont();
+ sal_uInt8 nOldProp = GetPropFont();
nStart = aInf.GetIdx();
SwLineLayout* pOldCurr = pCurr;
pCurr = &((SwMultiPortion*)pPor)->GetRoot();
@@ -761,14 +761,14 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
GETGRID( GetTxtFrm()->FindPageFrm() )
const sal_Bool bHasGrid = pGrid && GetInfo().SnapToGrid();
- const USHORT nRubyHeight = bHasGrid ?
+ const sal_uInt16 nRubyHeight = bHasGrid ?
pGrid->GetRubyHeight() : 0;
if( nStart + pCurr->GetLen() <= nOfst && GetNext() &&
( ! ((SwMultiPortion*)pPor)->IsRuby() ||
((SwMultiPortion*)pPor)->OnTop() ) )
{
- USHORT nOffset;
+ sal_uInt16 nOffset;
// in grid mode we may only add the height of the
// ruby line if ruby line is on top
if ( bHasGrid &&
@@ -790,8 +790,8 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
// temporarily set the inner line height to the
// outer line height because that value is needed
// for the adjustment inside the recursion
- const USHORT nOldRubyHeight = pCurr->Height();
- const USHORT nOldRubyRealHeight = pCurr->GetRealHeight();
+ const sal_uInt16 nOldRubyHeight = pCurr->Height();
+ const sal_uInt16 nOldRubyRealHeight = pCurr->GetRealHeight();
const sal_Bool bChgHeight =
((SwMultiPortion*)pPor)->IsRuby() && bHasGrid;
@@ -1066,7 +1066,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
if( nTmpHeight < pOrig->Height() )
{
nTmpAscent = nPorAscent;
- nTmpHeight = USHORT( pOrig->Height() );
+ nTmpHeight = sal_uInt16( pOrig->Height() );
}
}
if( bWidth && pPor->PrtWidth() && pPor->GetLen() &&
@@ -1126,7 +1126,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
// the bidi portion
if ( pLastBidiPor )
{
- const BYTE nPortionLevel = pLastBidiPor->GetLevel();
+ const sal_uInt8 nPortionLevel = pLastBidiPor->GetLevel();
if ( pCMS->nCursorBidiLevel >= nPortionLevel )
{
@@ -1153,7 +1153,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
}
else
{
- const BYTE nPortionLevel = ((SwBidiPortion*)pPor)->GetLevel();
+ const sal_uInt8 nPortionLevel = ((SwBidiPortion*)pPor)->GetLevel();
if ( pCMS->nCursorBidiLevel >= nPortionLevel )
{
@@ -1199,7 +1199,7 @@ sal_Bool SwTxtCursor::GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
if ( bSpecialPos )
{
- const BYTE nExtendRange = pCMS->pSpecialPos->nExtendRange;
+ const sal_uInt8 nExtendRange = pCMS->pSpecialPos->nExtendRange;
OSL_ENSURE( ! pCMS->pSpecialPos->nLineOfst || SP_EXTEND_RANGE_BEFORE != nExtendRange,
"LineOffset AND Number Portion?" );
@@ -1209,7 +1209,7 @@ sal_Bool SwTxtCursor::GetCharRect( SwRect* pOrig, const xub_StrLen nOfst,
++nFindOfst;
// skip lines for fields which cover more than one line
- for ( USHORT i = 0; i < pCMS->pSpecialPos->nLineOfst; i++ )
+ for ( sal_uInt16 i = 0; i < pCMS->pSpecialPos->nLineOfst; i++ )
Next();
}
@@ -1328,7 +1328,7 @@ xub_StrLen SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
if ( pPor->InSpaceGrp() && nSpaceAdd )
{
((SwTxtSizeInfo&)GetInfo()).SetIdx( nCurrStart );
- nWidth = nWidth + USHORT( pPor->CalcSpacing( nSpaceAdd, GetInfo() ) );
+ nWidth = nWidth + sal_uInt16( pPor->CalcSpacing( nSpaceAdd, GetInfo() ) );
}
if( ( pPor->InFixMargGrp() && ! pPor->IsMarginPortion() ) ||
( pPor->IsMultiPortion() && ((SwMultiPortion*)pPor)->HasTabulator() )
@@ -1372,7 +1372,7 @@ xub_StrLen SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
if ( pPor->InSpaceGrp() && nSpaceAdd )
{
((SwTxtSizeInfo&)GetInfo()).SetIdx( nCurrStart );
- nWidth = nWidth + USHORT( pPor->CalcSpacing( nSpaceAdd, GetInfo() ) );
+ nWidth = nWidth + sal_uInt16( pPor->CalcSpacing( nSpaceAdd, GetInfo() ) );
}
if( ( pPor->InFixMargGrp() && ! pPor->IsMarginPortion() ) ||
@@ -1577,7 +1577,7 @@ xub_StrLen SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
SwLayoutModeModifier aLayoutModeModifier( *GetInfo().GetOut() );
if ( ((SwMultiPortion*)pPor)->IsBidi() )
{
- const BYTE nBidiLevel = ((SwBidiPortion*)pPor)->GetLevel();
+ const sal_uInt8 nBidiLevel = ((SwBidiPortion*)pPor)->GetLevel();
aLayoutModeModifier.Modify( nBidiLevel % 2 );
}
@@ -1593,7 +1593,7 @@ xub_StrLen SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
if( ((SwMultiPortion*)pPor)->HasBrackets() )
{
- USHORT nPreWidth = ((SwDoubleLinePortion*)pPor)->PreWidth();
+ sal_uInt16 nPreWidth = ((SwDoubleLinePortion*)pPor)->PreWidth();
if ( nX > nPreWidth )
nX = nX - nPreWidth;
else
@@ -1605,7 +1605,7 @@ xub_StrLen SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
}
if( pPor->InTxtGrp() )
{
- BYTE nOldProp;
+ sal_uInt8 nOldProp;
if( GetPropFont() )
{
((SwFont*)GetFnt())->SetProportion( GetPropFont() );
@@ -1864,7 +1864,7 @@ bool SwTxtFrm::FillSelection( SwSelectionList& rSelList, const SwRect& rRect ) c
if( GetDrawObjs() )
{
const SwSortedObjs &rObjs = *GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
const SwAnchoredObject* pAnchoredObj = rObjs[i];
if( !pAnchoredObj->ISA(SwFlyFrm) )
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 79bd3cb289bd..882e8277eee1 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -288,7 +288,7 @@ SwLinePortion *SwTxtFormatter::UnderFlow( SwTxtFormatInfo &rInf )
// line width is adjusted, so that pPor does not fit to current
// line anymore
- rInf.Width( (USHORT)(rInf.X() + (pPor->Width() ? pPor->Width() - 1 : 0)) );
+ rInf.Width( (sal_uInt16)(rInf.X() + (pPor->Width() ? pPor->Width() - 1 : 0)) );
rInf.SetLen( pPor->GetLen() );
rInf.SetFull( sal_False );
if( pFly )
@@ -424,7 +424,7 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
GRID_LINES_CHARS == pGrid->GetGridType();
const SwDoc *pDoc = rInf.GetTxtFrm()->GetNode()->GetDoc();
- const USHORT nGridWidth = bHasGrid ?
+ const sal_uInt16 nGridWidth = bHasGrid ?
GETGRIDWIDTH(pGrid,pDoc) : 0; //for textgrid refactor
// used for grid mode only:
@@ -451,9 +451,9 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
rInf.GetLast() && rInf.GetLast()->InTxtGrp() &&
rInf.GetLast()->Width() && !rInf.GetLast()->InNumberGrp() )
{
- BYTE nNxtActual = rInf.GetFont()->GetActual();
- BYTE nLstActual = nNxtActual;
- USHORT nLstHeight = (USHORT)rInf.GetFont()->GetHeight();
+ sal_uInt8 nNxtActual = rInf.GetFont()->GetActual();
+ sal_uInt8 nLstActual = nNxtActual;
+ sal_uInt16 nLstHeight = (sal_uInt16)rInf.GetFont()->GetHeight();
sal_Bool bAllowBefore = sal_False;
sal_Bool bAllowBehind = sal_False;
const CharClass& rCC = GetAppCharClass();
@@ -491,7 +491,7 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
if ( pTmpFnt )
{
nLstActual = pTmpFnt->GetActual();
- nLstHeight = (USHORT)pTmpFnt->GetHeight();
+ nLstHeight = (sal_uInt16)pTmpFnt->GetHeight();
}
}
}
@@ -545,14 +545,14 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
const SwTwips nOfst = nStartX - nGridOrigin;
if ( nOfst )
{
- const ULONG i = ( nOfst > 0 ) ?
+ const sal_uLong i = ( nOfst > 0 ) ?
( ( nOfst - 1 ) / nGridWidth + 1 ) :
0;
const SwTwips nKernWidth = i * nGridWidth - nOfst;
const SwTwips nRestWidth = rInf.Width() - rInf.X();
if ( nKernWidth <= nRestWidth )
- pGridKernPortion->Width( (USHORT)nKernWidth );
+ pGridKernPortion->Width( (sal_uInt16)nKernWidth );
}
if ( pGridKernPortion != pPor )
@@ -635,7 +635,7 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
if( nTmp == pScriptInfo->NextScriptChg( nTmp - 1 ) &&
nTmp != rInf.GetTxt().Len() )
{
- USHORT nDist = (USHORT)(rInf.GetFont()->GetHeight()/5);
+ sal_uInt16 nDist = (sal_uInt16)(rInf.GetFont()->GetHeight()/5);
if( nDist )
{
@@ -661,8 +661,8 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
xub_StrLen nTmp = rInf.GetIdx() + pPor->GetLen();
const SwTwips nRestWidth = rInf.Width() - rInf.X() - pPor->Width();
- const BYTE nCurrScript = pFnt->GetActual(); // pScriptInfo->ScriptType( rInf.GetIdx() );
- const BYTE nNextScript = nTmp >= rInf.GetTxt().Len() ?
+ const sal_uInt8 nCurrScript = pFnt->GetActual(); // pScriptInfo->ScriptType( rInf.GetIdx() );
+ const sal_uInt8 nNextScript = nTmp >= rInf.GetTxt().Len() ?
SW_CJK :
SwScriptInfo::WhichFont( nTmp, 0, pScriptInfo );
@@ -677,20 +677,20 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
// calculate size
SwLinePortion* pTmpPor = pGridKernPortion->GetPortion();
- USHORT nSumWidth = pPor->Width();
+ sal_uInt16 nSumWidth = pPor->Width();
while ( pTmpPor )
{
nSumWidth = nSumWidth + pTmpPor->Width();
pTmpPor = pTmpPor->GetPortion();
}
- const USHORT i = nSumWidth ?
+ const sal_uInt16 i = nSumWidth ?
( nSumWidth - 1 ) / nGridWidth + 1 :
0;
const SwTwips nTmpWidth = i * nGridWidth;
const SwTwips nKernWidth = Min( (SwTwips)(nTmpWidth - nSumWidth),
nRestWidth );
- const USHORT nKernWidth_1 = (USHORT)(nKernWidth / 2);
+ const sal_uInt16 nKernWidth_1 = (sal_uInt16)(nKernWidth / 2);
OSL_ENSURE( nKernWidth <= nRestWidth,
"Not enough space left for adjusting non-asian text in grid mode" );
@@ -961,7 +961,7 @@ SwTxtPortion *SwTxtFormatter::NewTxtPortion( SwTxtFormatInfo &rInf )
KSHORT( pPor->GetAscent() ) ) / 8;
if ( !nExpect )
nExpect = 1;
- nExpect = (USHORT)(rInf.GetIdx() + ((rInf.Width() - rInf.X()) / nExpect));
+ nExpect = (sal_uInt16)(rInf.GetIdx() + ((rInf.Width() - rInf.X()) / nExpect));
if( nExpect > rInf.GetIdx() && nNextChg > nExpect )
nNextChg = Min( nExpect, rInf.GetTxt().Len() );
@@ -1354,7 +1354,7 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
POR_TABDECIMAL == pLastTabPortion->GetWhichPor() )
{
OSL_ENSURE( rInf.X() >= pLastTabPortion->Fix(), "Decimal tab stop position cannot be calculated" );
- const USHORT nWidthOfPortionsUpToDecimalPosition = (USHORT)(rInf.X() - pLastTabPortion->Fix() );
+ const sal_uInt16 nWidthOfPortionsUpToDecimalPosition = (sal_uInt16)(rInf.X() - pLastTabPortion->Fix() );
static_cast<SwTabDecimalPortion*>(pLastTabPortion)->SetWidthOfPortionsUpToDecimalPosition( nWidthOfPortionsUpToDecimalPosition );
rInf.SetTabDecimal( 0 );
}
@@ -1418,7 +1418,7 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
const SwAttrSet& rSet = pInfo->GetAnchorCharFmt((SwDoc&)*pDoc)->GetAttrSet();
const SfxPoolItem* pItem;
- USHORT nDir = 0;
+ sal_uInt16 nDir = 0;
if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_ROTATE,
sal_True, &pItem ))
nDir = ((SvxCharRotateItem*)pItem)->GetValue();
@@ -1438,7 +1438,7 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
if ( pNumFnt )
{
- USHORT nDir = pNumFnt->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
+ sal_uInt16 nDir = pNumFnt->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
if ( 0 != nDir )
{
delete pPor;
@@ -1695,12 +1695,12 @@ void SwTxtFormatter::CalcRealHeight( sal_Bool bNewLine )
GETGRID( pFrm->FindPageFrm() )
if ( pGrid && GetInfo().SnapToGrid() )
{
- const USHORT nGridWidth = pGrid->GetBaseHeight();
- const USHORT nRubyHeight = pGrid->GetRubyHeight();
+ const sal_uInt16 nGridWidth = pGrid->GetBaseHeight();
+ const sal_uInt16 nRubyHeight = pGrid->GetRubyHeight();
const sal_Bool bRubyTop = ! pGrid->GetRubyTextBelow();
nLineHeight = nGridWidth + nRubyHeight;
- USHORT nLineDist = nLineHeight;
+ sal_uInt16 nLineDist = nLineHeight;
while ( pCurr->Height() > nLineHeight )
nLineHeight = nLineHeight + nLineDist;
@@ -1719,13 +1719,13 @@ void SwTxtFormatter::CalcRealHeight( sal_Bool bNewLine )
if ( ! IsParaLine() && pSpace &&
SVX_INTER_LINE_SPACE_PROP == pSpace->GetInterLineSpaceRule() )
{
- ULONG nTmp = pSpace->GetPropLineSpace();
+ sal_uLong nTmp = pSpace->GetPropLineSpace();
if( nTmp < 100 )
nTmp = 100;
nTmp *= nLineHeight;
- nLineHeight = (USHORT)(nTmp / 100);
+ nLineHeight = (sal_uInt16)(nTmp / 100);
}
pCurr->SetRealHeight( nLineHeight );
@@ -1852,7 +1852,7 @@ void SwTxtFormatter::FeedInf( SwTxtFormatInfo &rInf ) const
rInf.SetIdx( nStart );
// Handle overflows:
- // --> FME 2004-11-25 #i34348# Changed type from USHORT to SwTwips
+ // --> FME 2004-11-25 #i34348# Changed type from sal_uInt16 to SwTwips
SwTwips nTmpLeft = Left();
SwTwips nTmpRight = Right();
SwTwips nTmpFirst = FirstLeft();
@@ -2104,9 +2104,9 @@ namespace {
// if anything has changed, we carefully have to adjust the right
// repaint position
long nPOfst = 0;
- USHORT nCnt = 0;
- USHORT nX = 0;
- USHORT nIdx = txtFmtInfo.GetLineStart();
+ sal_uInt16 nCnt = 0;
+ sal_uInt16 nX = 0;
+ sal_uInt16 nIdx = rThis.GetInfo().GetLineStart();
SwLinePortion* pPor = rCurr.GetFirstPortion();
while ( pPor )
@@ -2140,7 +2140,7 @@ namespace {
// Only if hidden text should not be shown:
// if ( rInf.GetVsh() && rInf.GetVsh()->GetWin() && rInf.GetOpt().IsShowHiddenChar() )
const bool bShowInDocView = rInf.GetVsh() && rInf.GetVsh()->GetWin() && rInf.GetOpt().IsShowHiddenChar();
- const bool bShowForPrinting = rInf.GetOpt().IsShowHiddenChar( TRUE ) && rInf.GetOpt().IsPrinting();
+ const bool bShowForPrinting = rInf.GetOpt().IsShowHiddenChar( sal_True ) && rInf.GetOpt().IsPrinting();
if (bShowInDocView || bShowForPrinting)
return false;
diff --git a/sw/source/core/text/itrform2.hxx b/sw/source/core/text/itrform2.hxx
index 92172b090985..a838806a11c8 100644
--- a/sw/source/core/text/itrform2.hxx
+++ b/sw/source/core/text/itrform2.hxx
@@ -57,7 +57,7 @@ class SwTxtFormatter : public SwTxtPainter
sal_Bool bChanges : 1; // Flag, fuer die Berechnung des Repaint-Rechtecks
sal_Bool bTruncLines : 1; // Flag, Repaint-Rechtecks ggf. erweitern
sal_Bool bUnclipped : 1; // Flag, ob Repaint groesser als feste Zeilenhoehe
- USHORT m_nHintEndIndex; // HACK for TryNewNoLengthPortion
+ sal_uInt16 m_nHintEndIndex; // HACK for TryNewNoLengthPortion
SwLinePortion *NewPortion( SwTxtFormatInfo &rInf );
SwTxtPortion *NewTxtPortion( SwTxtFormatInfo &rInf );
SwLinePortion *NewExtraPortion( SwTxtFormatInfo &rInf );
@@ -77,7 +77,7 @@ class SwTxtFormatter : public SwTxtPainter
// Das Herzstueck der Formatierung
void BuildPortions( SwTxtFormatInfo &rInf );
- BOOL BuildMultiPortion( SwTxtFormatInfo &rInf, SwMultiPortion& rMulti );
+ sal_Bool BuildMultiPortion( SwTxtFormatInfo &rInf, SwMultiPortion& rMulti );
// Berechnung des emulierten rechten Rands
void CalcFlyWidth( SwTxtFormatInfo &rInf );
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index b8c1f0e25ae3..0571efb8a5d3 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -171,8 +171,8 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
const sal_Bool bUnderSz )
{
#if OSL_DEBUG_LEVEL > 1
-// USHORT nFntHeight = GetInfo().GetFont()->GetHeight( GetInfo().GetVsh(), GetInfo().GetOut() );
-// USHORT nFntAscent = GetInfo().GetFont()->GetAscent( GetInfo().GetVsh(), GetInfo().GetOut() );
+// sal_uInt16 nFntHeight = GetInfo().GetFont()->GetHeight( GetInfo().GetVsh(), GetInfo().GetOut() );
+// sal_uInt16 nFntAscent = GetInfo().GetFont()->GetAscent( GetInfo().GetVsh(), GetInfo().GetOut() );
#endif
// Adjustierung ggf. nachholen
@@ -606,11 +606,11 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
rScriptInfo );
xub_StrLen nTmpIdx = nIndx;
- ULONG nSumWidth = 0;
- ULONG nSumHeight = 0;
- ULONG nBold = 0;
- USHORT nMaxBaseLineOfst = 0;
- USHORT nNumberOfPortions = 0;
+ sal_uLong nSumWidth = 0;
+ sal_uLong nSumHeight = 0;
+ sal_uLong nBold = 0;
+ sal_uInt16 nMaxBaseLineOfst = 0;
+ sal_uInt16 nNumberOfPortions = 0;
while( nTmpIdx <= nUnderEnd && pPor )
{
@@ -629,13 +629,13 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
if ( !aIter.GetFnt()->GetEscapement() )
{
nSumWidth += pPor->Width();
- const ULONG nFontHeight = aIter.GetFnt()->GetHeight();
+ const sal_uLong nFontHeight = aIter.GetFnt()->GetHeight();
// If we do not have a common baseline we take the baseline
// and the font of the lowest portion.
if ( nAdjustBaseLine )
{
- USHORT nTmpBaseLineOfst = AdjustBaseLine( *pCurr, pPor );
+ sal_uInt16 nTmpBaseLineOfst = AdjustBaseLine( *pCurr, pPor );
if ( nMaxBaseLineOfst < nTmpBaseLineOfst )
{
nMaxBaseLineOfst = nTmpBaseLineOfst;
@@ -659,14 +659,14 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor,
// resulting height
if ( nNumberOfPortions > 1 && nSumWidth )
{
- const ULONG nNewFontHeight = nAdjustBaseLine ?
+ const sal_uLong nNewFontHeight = nAdjustBaseLine ?
nSumHeight :
nSumHeight / nSumWidth;
pUnderlineFnt = new SwFont( *GetInfo().GetFont() );
// font height
- const BYTE nActual = pUnderlineFnt->GetActual();
+ const sal_uInt8 nActual = pUnderlineFnt->GetActual();
pUnderlineFnt->SetSize( Size( pUnderlineFnt->GetSize( nActual ).Width(),
nNewFontHeight ), nActual );
diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx
index 2d0b14c5140f..93cba310f3be 100644
--- a/sw/source/core/text/itrtxt.cxx
+++ b/sw/source/core/text/itrtxt.cxx
@@ -288,9 +288,9 @@ const SwLineLayout *SwTxtCursor::CharCrsrToLine( const xub_StrLen nPosition )
* SwTxtCrsr::AdjustBaseLine()
*************************************************************************/
-USHORT SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine,
+sal_uInt16 SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine,
const SwLinePortion* pPor,
- USHORT nPorHeight, USHORT nPorAscent,
+ sal_uInt16 nPorHeight, sal_uInt16 nPorAscent,
const sal_Bool bAutoToCentered ) const
{
if ( pPor )
@@ -299,14 +299,14 @@ USHORT SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine,
nPorAscent = pPor->GetAscent();
}
- USHORT nOfst = rLine.GetRealHeight() - rLine.Height();
+ sal_uInt16 nOfst = rLine.GetRealHeight() - rLine.Height();
GETGRID( pFrm->FindPageFrm() )
const sal_Bool bHasGrid = pGrid && GetInfo().SnapToGrid();
if ( bHasGrid )
{
- const USHORT nRubyHeight = pGrid->GetRubyHeight();
+ const sal_uInt16 nRubyHeight = pGrid->GetRubyHeight();
const sal_Bool bRubyTop = ! pGrid->GetRubyTextBelow();
if ( GetInfo().IsMulti() )
@@ -326,8 +326,8 @@ USHORT SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine,
// centered inside the whole line.
//for text refactor
- const USHORT nLineNetto = rLine.Height() - nRubyHeight;
- //const USHORT nLineNetto = ( nPorHeight > nGridWidth ) ?
+ const sal_uInt16 nLineNetto = rLine.Height() - nRubyHeight;
+ //const sal_uInt16 nLineNetto = ( nPorHeight > nGridWidth ) ?
// rLine.Height() - nRubyHeight :
// nGridWidth;
nOfst += ( nLineNetto - nPorHeight ) / 2;
@@ -352,7 +352,11 @@ USHORT SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine,
case SvxParaVertAlignItem::AUTOMATIC :
if ( bAutoToCentered || GetInfo().GetTxtFrm()->IsVertical() )
{
- nOfst += ( rLine.Height() - nPorHeight ) / 2 + nPorAscent;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( GetInfo().GetTxtFrm()->IsVertLR() )
+ nOfst += rLine.Height() - ( rLine.Height() - nPorHeight ) / 2 - nPorAscent;
+ else
+ nOfst += ( rLine.Height() - nPorHeight ) / 2 + nPorAscent;
break;
}
case SvxParaVertAlignItem::BASELINE :
@@ -430,13 +434,13 @@ void SwTxtIter::TruncLines( sal_Bool bNoteFollow )
SwpHints* pTmpHints = GetTxtFrm()->GetTxtNode()->GetpSwpHints();
// examine hints in range nEnd - (nEnd + nRangeChar)
- for( USHORT i = 0; i < pTmpHints->Count(); i++ )
+ for( sal_uInt16 i = 0; i < pTmpHints->Count(); i++ )
{
const SwTxtAttr* pHt = pTmpHints->GetTextHint( i );
if( RES_TXTATR_FLYCNT == pHt->Which() )
{
// check, if hint is in our range
- const USHORT nTmpPos = *pHt->GetStart();
+ const sal_uInt16 nTmpPos = *pHt->GetStart();
if ( nEnd <= nTmpPos && nTmpPos < nRangeEnd )
pFollow->_InvalidateRange(
SwCharRange( nTmpPos, nTmpPos ), 0 );
diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx
index 12968ffd5e6c..46ec8cfd7964 100644
--- a/sw/source/core/text/itrtxt.hxx
+++ b/sw/source/core/text/itrtxt.hxx
@@ -284,8 +284,8 @@ public:
// calculates baseline for portion rPor
// bAutoToCentered indicates, if AUTOMATIC mode means CENTERED or BASELINE
- USHORT AdjustBaseLine( const SwLineLayout& rLine, const SwLinePortion* pPor,
- USHORT nPorHeight = 0, USHORT nAscent = 0,
+ sal_uInt16 AdjustBaseLine( const SwLineLayout& rLine, const SwLinePortion* pPor,
+ sal_uInt16 nPorHeight = 0, sal_uInt16 nAscent = 0,
const sal_Bool bAutoToCentered = sal_False ) const;
static inline void SetRightMargin( const sal_Bool bNew ){ bRightMargin = bNew; }
diff --git a/sw/source/core/text/makefile.mk b/sw/source/core/text/makefile.mk
deleted file mode 100644
index 7e1cc176ddfd..000000000000
--- a/sw/source/core/text/makefile.mk
+++ /dev/null
@@ -1,104 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=text
-
-AUTOSEG=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(mydebug)" != ""
-CDEFS+=-Dmydebug
-.ENDIF
-
-.IF "$(ENABLE_GRAPHITE)" == "TRUE"
-CFLAGS+=-DENABLE_GRAPHITE
-.ENDIF
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/txtcache.obj \
- $(SLO)$/txtinit.obj
-
-.IF "$(DBG_LEVEL)">="2"
-SLOFILES += \
- $(SLO)$/xmldump.obj \
- $(SLO)$/txtio.obj
-.ENDIF
-
-EXCEPTIONSFILES = \
- $(SLO)$/EnhancedPDFExportHelper.obj \
- $(SLO)$/SwGrammarMarkUp.obj \
- $(SLO)$/atrstck.obj \
- $(SLO)$/blink.obj \
- $(SLO)$/frmcrsr.obj \
- $(SLO)$/frmform.obj \
- $(SLO)$/frminf.obj \
- $(SLO)$/frmpaint.obj \
- $(SLO)$/guess.obj \
- $(SLO)$/inftxt.obj \
- $(SLO)$/itradj.obj \
- $(SLO)$/itratr.obj \
- $(SLO)$/itrcrsr.obj \
- $(SLO)$/itrform2.obj \
- $(SLO)$/itrpaint.obj \
- $(SLO)$/itrtxt.obj \
- $(SLO)$/noteurl.obj \
- $(SLO)$/porexp.obj \
- $(SLO)$/porfld.obj \
- $(SLO)$/porfly.obj \
- $(SLO)$/porglue.obj \
- $(SLO)$/porlay.obj \
- $(SLO)$/porlin.obj \
- $(SLO)$/pormulti.obj \
- $(SLO)$/porref.obj \
- $(SLO)$/porrst.obj \
- $(SLO)$/portox.obj \
- $(SLO)$/portxt.obj \
- $(SLO)$/redlnitr.obj \
- $(SLO)$/txtdrop.obj \
- $(SLO)$/txtfld.obj \
- $(SLO)$/txtfly.obj \
- $(SLO)$/txtfrm.obj \
- $(SLO)$/txtftn.obj \
- $(SLO)$/txthyph.obj \
- $(SLO)$/txtpaint.obj \
- $(SLO)$/txttab.obj \
- $(SLO)$/widorp.obj \
- $(SLO)$/wrong.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/text/pordrop.hxx b/sw/source/core/text/pordrop.hxx
index fbf17d07f26a..41179f534f4f 100644
--- a/sw/source/core/text/pordrop.hxx
+++ b/sw/source/core/text/pordrop.hxx
@@ -50,7 +50,7 @@ class SwDropPortionPart
SwDropPortionPart* pFollow;
SwFont* pFnt;
xub_StrLen nLen;
- USHORT nWidth;
+ sal_uInt16 nWidth;
public:
SwDropPortionPart( SwFont& rFont, const xub_StrLen nL )
@@ -61,8 +61,8 @@ public:
inline void SetFollow( SwDropPortionPart* pNew ) { pFollow = pNew; };
inline SwFont& GetFont() const { return *pFnt; }
inline xub_StrLen GetLen() const { return nLen; }
- inline USHORT GetWidth() const { return nWidth; }
- inline void SetWidth( USHORT nNew ) { nWidth = nNew; }
+ inline sal_uInt16 GetWidth() const { return nWidth; }
+ inline void SetWidth( sal_uInt16 nNew ) { nWidth = nNew; }
};
/*************************************************************************
diff --git a/sw/source/core/text/porexp.hxx b/sw/source/core/text/porexp.hxx
index f9275b8a92ee..5761431810f5 100644
--- a/sw/source/core/text/porexp.hxx
+++ b/sw/source/core/text/porexp.hxx
@@ -59,14 +59,14 @@ public:
class SwBlankPortion : public SwExpandPortion
{
xub_Unicode cChar;
- BOOL bMulti; // For multiportion brackets
+ sal_Bool bMulti; // For multiportion brackets
public:
- inline SwBlankPortion( xub_Unicode cCh, BOOL bMult = sal_False )
+ inline SwBlankPortion( xub_Unicode cCh, sal_Bool bMult = sal_False )
: cChar( cCh ), bMulti( bMult )
{ cChar = cCh; SetLen(1); SetWhichPor( POR_BLANK ); }
- BOOL IsMulti() const { return bMulti; }
- void SetMulti( BOOL bNew ) { bMulti = bNew; }
+ sal_Bool IsMulti() const { return bMulti; }
+ void SetMulti( sal_Bool bNew ) { bMulti = bNew; }
virtual SwLinePortion *Compress();
virtual sal_Bool GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt ) const;
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index e6b76af6bc75..d806a9316a9c 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -212,8 +212,8 @@ void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf )
String aTxt;
if( GetExpTxt( rInf, aTxt ) && aTxt.Len() && pBreakIt->GetBreakIter().is() )
{
- BYTE nActual = pFnt ? pFnt->GetActual() : rInf.GetFont()->GetActual();
- USHORT nScript;
+ sal_uInt8 nActual = pFnt ? pFnt->GetActual() : rInf.GetFont()->GetActual();
+ sal_uInt16 nScript;
{
nScript = pBreakIt->GetBreakIter()->getScriptType( aTxt, 0 );
xub_StrLen nChg = 0;
@@ -233,7 +233,7 @@ void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf )
nNextScriptChg = aTxt.Len();
}
- BYTE nTmp;
+ sal_uInt8 nTmp;
switch ( nScript ) {
case i18n::ScriptType::LATIN : nTmp = SW_LATIN; break;
case i18n::ScriptType::ASIAN : nTmp = SW_CJK; break;
@@ -244,8 +244,8 @@ void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf )
// #i16354# Change script type for RTL text to CTL.
const SwScriptInfo& rSI = rInf.GetParaPortion()->GetScriptInfo();
// --> OD 2009-01-29 #i98418#
-// const BYTE nFldDir = IsNumberPortion() ?
- const BYTE nFldDir = ( IsNumberPortion() || IsFtnNumPortion() ) ?
+// const sal_uInt8 nFldDir = IsNumberPortion() ?
+ const sal_uInt8 nFldDir = ( IsNumberPortion() || IsFtnNumPortion() ) ?
rSI.GetDefaultDir() :
rSI.DirType( IsFollow() ? rInf.GetIdx() - 1 : rInf.GetIdx() );
// <--
@@ -685,8 +685,8 @@ void SwNumberPortion::Paint( const SwTxtPaintInfo &rInf ) const
// calculate the width of the number portion, including follows
const KSHORT nOldWidth = Width();
- USHORT nSumWidth = 0;
- USHORT nOffset = 0;
+ sal_uInt16 nSumWidth = 0;
+ sal_uInt16 nOffset = 0;
const SwLinePortion* pTmp = this;
while ( pTmp && pTmp->InNumberGrp() )
@@ -845,7 +845,7 @@ SwGrfNumPortion::SwGrfNumPortion(
nYPos = 0;
eOrient = text::VertOrientation::TOP;
}
- Width( static_cast<USHORT>(rGrfSize.Width() + 2 * GRFNUM_SECURE) );
+ Width( static_cast<sal_uInt16>(rGrfSize.Width() + 2 * GRFNUM_SECURE) );
nFixWidth = Width();
nGrfHeight = rGrfSize.Height() + 2 * GRFNUM_SECURE;
Height( KSHORT(nGrfHeight) );
@@ -881,7 +881,7 @@ sal_Bool SwGrfNumPortion::Format( SwTxtFormatInfo &rInf )
const sal_Bool bFull = rInf.Width() < rInf.X() + Width();
const sal_Bool bFly = rInf.GetFly() ||
( rInf.GetLast() && rInf.GetLast()->IsFlyPortion() );
- SetAscent( static_cast<USHORT>(GetRelPos() > 0 ? GetRelPos() : 0) );
+ SetAscent( static_cast<sal_uInt16>(GetRelPos() > 0 ? GetRelPos() : 0) );
if( GetAscent() > Height() )
Height( GetAscent() );
@@ -1116,10 +1116,10 @@ SwCombinedPortion::SwCombinedPortion( const XubString &rTxt )
// the arrays of width and position are filled by the format function
if( pBreakIt->GetBreakIter().is() )
{
- BYTE nScr = SW_SCRIPTS;
- for( USHORT i = 0; i < rTxt.Len(); ++i )
+ sal_uInt8 nScr = SW_SCRIPTS;
+ for( sal_uInt16 i = 0; i < rTxt.Len(); ++i )
{
- USHORT nScript = pBreakIt->GetBreakIter()->getScriptType( rTxt, i );
+ sal_uInt16 nScript = pBreakIt->GetBreakIter()->getScriptType( rTxt, i );
switch ( nScript ) {
case i18n::ScriptType::LATIN : nScr = SW_LATIN; break;
case i18n::ScriptType::ASIAN : nScr = SW_CJK; break;
@@ -1130,7 +1130,7 @@ SwCombinedPortion::SwCombinedPortion( const XubString &rTxt )
}
else
{
- for( USHORT i = 0; i < 6; aScrType[i++] = 0 )
+ for( sal_uInt16 i = 0; i < 6; aScrType[i++] = 0 )
; // nothing
}
memset( &aWidth, 0, sizeof(aWidth) );
@@ -1152,19 +1152,19 @@ void SwCombinedPortion::Paint( const SwTxtPaintInfo &rInf ) const
if( rInf.OnWin() && pPortion && !pPortion->Width() )
pPortion->PrePaint( rInf, this );
- USHORT nCount = aExpand.Len();
+ sal_uInt16 nCount = aExpand.Len();
if( !nCount )
return;
OSL_ENSURE( nCount < 7, "Too much combined characters" );
// the first character of the second row
- USHORT nTop = ( nCount + 1 ) / 2;
+ sal_uInt16 nTop = ( nCount + 1 ) / 2;
SwFont aTmpFont( *rInf.GetFont() );
aTmpFont.SetProportion( nProportion ); // a smaller font
SwFontSave aFontSave( rInf, &aTmpFont );
- USHORT i = 0;
+ sal_uInt16 i = 0;
Point aOldPos = rInf.GetPos();
Point aOutPos( aOldPos.X(), aOldPos.Y() - nUpPos );// Y of the first row
while( i < nCount )
@@ -1172,7 +1172,7 @@ void SwCombinedPortion::Paint( const SwTxtPaintInfo &rInf ) const
if( i == nTop ) // change the row
aOutPos.Y() = aOldPos.Y() + nLowPos; // Y of the second row
aOutPos.X() = aOldPos.X() + aPos[i]; // X position
- const BYTE nAct = aScrType[i]; // script type
+ const sal_uInt8 nAct = aScrType[i]; // script type
aTmpFont.SetActual( nAct );
// if there're more than 4 characters to display, we choose fonts
// with 2/3 of the original font width.
@@ -1200,7 +1200,7 @@ void SwCombinedPortion::Paint( const SwTxtPaintInfo &rInf ) const
sal_Bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
{
- USHORT nCount = aExpand.Len();
+ sal_uInt16 nCount = aExpand.Len();
if( !nCount )
{
Width( 0 );
@@ -1210,7 +1210,7 @@ sal_Bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
OSL_ENSURE( nCount < 7, "Too much combined characters" );
// If there are leading "weak"-scripttyped characters in this portion,
// they get the actual scripttype.
- USHORT i = 0;
+ sal_uInt16 i = 0;
while( i < nCount && SW_SCRIPTS == aScrType[i] )
aScrType[i++] = rInf.GetFont()->GetActual();
if( nCount > 4 )
@@ -1224,22 +1224,22 @@ sal_Bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
{
rInf.GetOut()->SetFont( rInf.GetFont()->GetFnt( aScrType[i] ) );
aWidth[ aScrType[i] ] =
- static_cast<USHORT>(2 * rInf.GetOut()->GetFontMetric().GetSize().Width() / 3);
+ static_cast<sal_uInt16>(2 * rInf.GetOut()->GetFontMetric().GetSize().Width() / 3);
}
++i;
}
}
- USHORT nTop = ( nCount + 1 ) / 2; // the first character of the second line
+ sal_uInt16 nTop = ( nCount + 1 ) / 2; // the first character of the second line
ViewShell *pSh = rInf.GetTxtFrm()->GetShell();
SwFont aTmpFont( *rInf.GetFont() );
SwFontSave aFontSave( rInf, &aTmpFont );
nProportion = 55;
// In nMainAscent/Descent we store the ascent and descent
// of the original surrounding font
- USHORT nMaxDescent, nMaxAscent, nMaxWidth;
- USHORT nMainDescent = rInf.GetFont()->GetHeight( pSh, *rInf.GetOut() );
- const USHORT nMainAscent = rInf.GetFont()->GetAscent( pSh, *rInf.GetOut() );
+ sal_uInt16 nMaxDescent, nMaxAscent, nMaxWidth;
+ sal_uInt16 nMainDescent = rInf.GetFont()->GetHeight( pSh, *rInf.GetOut() );
+ const sal_uInt16 nMainAscent = rInf.GetFont()->GetAscent( pSh, *rInf.GetOut() );
nMainDescent = nMainDescent - nMainAscent;
// we start with a 50% font, but if we notice that the combined portion
// becomes bigger than the surrounding font, we check 45% and maybe 40%.
@@ -1261,7 +1261,7 @@ sal_Bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
// local nMaxAscent, nMaxDescent and nMaxWidth variables.
while( i < nCount )
{
- BYTE nScrp = aScrType[i];
+ sal_uInt8 nScrp = aScrType[i];
aTmpFont.SetActual( nScrp );
if( aWidth[ nScrp ] )
{
@@ -1272,8 +1272,8 @@ sal_Bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
SwDrawTextInfo aDrawInf( pSh, *rInf.GetOut(), 0, aExpand, i, 1 );
Size aSize = aTmpFont._GetTxtSize( aDrawInf );
- USHORT nAsc = aTmpFont.GetAscent( pSh, *rInf.GetOut() );
- aPos[ i ] = (USHORT)aSize.Width();
+ sal_uInt16 nAsc = aTmpFont.GetAscent( pSh, *rInf.GetOut() );
+ aPos[ i ] = (sal_uInt16)aSize.Width();
if( i == nTop ) // enter the second line
{
nLowPos = nMaxDescent;
@@ -1288,7 +1288,7 @@ sal_Bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
if( nAsc > nMaxAscent )
nMaxAscent = nAsc;
if( aSize.Height() - nAsc > nMaxDescent )
- nMaxDescent = static_cast<USHORT>(aSize.Height() - nAsc);
+ nMaxDescent = static_cast<sal_uInt16>(aSize.Height() - nAsc);
}
// for one or two characters we double the width of the portion
if( nCount < 3 )
@@ -1317,8 +1317,8 @@ sal_Bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
Height( nMainAscent + nMainDescent );
// We calculate the x positions of the characters in both lines..
- USHORT nTopDiff = 0;
- USHORT nBotDiff = 0;
+ sal_uInt16 nTopDiff = 0;
+ sal_uInt16 nBotDiff = 0;
if( nMaxWidth > Width() )
{
nTopDiff = ( nMaxWidth - Width() ) / 2;
@@ -1347,7 +1347,7 @@ sal_Bool SwCombinedPortion::Format( SwTxtFormatInfo &rInf )
{
if( rInf.GetLineStart() == rInf.GetIdx() && (!rInf.GetLast()->InFldGrp()
|| !((SwFldPortion*)rInf.GetLast())->IsFollow() ) )
- Width( (USHORT)( rInf.Width() - rInf.X() ) );
+ Width( (sal_uInt16)( rInf.Width() - rInf.X() ) );
else
{
Truncate();
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index 27a07197e84e..47890c7d05ea 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -242,12 +242,12 @@ public:
class SwCombinedPortion : public SwFldPortion
{
- USHORT aPos[6]; // up to six X positions
- USHORT aWidth[3]; // one width for every scripttype
- BYTE aScrType[6]; // scripttype of every character
- USHORT nUpPos; // the Y position of the upper baseline
- USHORT nLowPos; // the Y position of the lower baseline
- BYTE nProportion; // relative font height
+ sal_uInt16 aPos[6]; // up to six X positions
+ sal_uInt16 aWidth[3]; // one width for every scripttype
+ sal_uInt8 aScrType[6]; // scripttype of every character
+ sal_uInt16 nUpPos; // the Y position of the upper baseline
+ sal_uInt16 nLowPos; // the Y position of the lower baseline
+ sal_uInt8 nProportion; // relative font height
public:
SwCombinedPortion( const XubString &rExpand );
virtual void Paint( const SwTxtPaintInfo &rInf ) const;
diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx
index ebc44c68e987..1d2f700f0fcc 100644
--- a/sw/source/core/text/porfly.cxx
+++ b/sw/source/core/text/porfly.cxx
@@ -76,7 +76,7 @@ sal_Bool SwFlyPortion::Format( SwTxtFormatInfo &rInf )
// Der Glue wird aufgespannt.
rInf.GetLast()->FormatEOL( rInf );
- PrtWidth( static_cast<USHORT>(Fix() - rInf.X() + PrtWidth()) );
+ PrtWidth( static_cast<sal_uInt16>(Fix() - rInf.X() + PrtWidth()) );
if( !Width() )
{
OSL_ENSURE( Width(), "+SwFlyPortion::Format: a fly is a fly is a fly" );
@@ -99,7 +99,7 @@ sal_Bool SwFlyPortion::Format( SwTxtFormatInfo &rInf )
SetLen( 1 );
}
- const USHORT nNewWidth = static_cast<USHORT>(rInf.X() + PrtWidth());
+ const sal_uInt16 nNewWidth = static_cast<sal_uInt16>(rInf.X() + PrtWidth());
if( rInf.Width() <= nNewWidth )
{
Truncate();
@@ -129,7 +129,7 @@ sal_Bool SwFlyCntPortion::Format( SwTxtFormatInfo &rInf )
// KerningPortions at beginning of line, e.g., for grid layout
// must be considered.
const SwLinePortion* pLastPor = rInf.GetLast();
- const USHORT nLeft = ( pLastPor &&
+ const sal_uInt16 nLeft = ( pLastPor &&
( pLastPor->IsKernPortion() ||
pLastPor->IsErgoSumPortion() ) ) ?
pLastPor->Width() :
@@ -209,7 +209,7 @@ xub_StrLen SwTxtFrm::CalcFlyPos( SwFrmFmt* pSearch )
if( !pHints )
return STRING_LEN;
SwTxtAttr* pFound = NULL;
- for ( USHORT i = 0; i < pHints->Count(); i++)
+ for ( sal_uInt16 i = 0; i < pHints->Count(); i++)
{
SwTxtAttr *pHt = pHints->GetTextHint( i );
if( RES_TXTATR_FLYCNT == pHt->Which() )
@@ -408,14 +408,14 @@ void SwFlyCntPortion::SetBase( const SwTxtFrm& rFrm, const Point &rBase,
SwTwips nRelPos = aObjPositioning.GetRelPosY();
if ( nRelPos < 0 )
{
- nAscent = static_cast<USHORT>(-nRelPos);
+ nAscent = static_cast<sal_uInt16>(-nRelPos);
if( nAscent > Height() )
Height( nAscent );
}
else
{
nAscent = 0;
- Height( Height() + static_cast<USHORT>(nRelPos) );
+ Height( Height() + static_cast<sal_uInt16>(nRelPos) );
}
}
else
diff --git a/sw/source/core/text/porftn.hxx b/sw/source/core/text/porftn.hxx
index fb564098bfd7..384577d627ab 100644
--- a/sw/source/core/text/porftn.hxx
+++ b/sw/source/core/text/porftn.hxx
@@ -44,7 +44,7 @@ class SwFtnPortion : public SwFldPortion
KSHORT nOrigHeight;
// --> OD 2009-01-29 #i98418#
bool mbPreferredScriptTypeSet;
- BYTE mnPreferredScriptType;
+ sal_uInt8 mnPreferredScriptType;
// <--
public:
SwFtnPortion( const XubString &rExpand, SwTxtFrm *pFrm, SwTxtFtn *pFtn,
@@ -57,7 +57,7 @@ public:
virtual sal_Bool Format( SwTxtFormatInfo &rInf );
// --> OD 2009-01-29 #i98418#
- void SetPreferredScriptType( BYTE nPreferredScriptType );
+ void SetPreferredScriptType( sal_uInt8 nPreferredScriptType );
// <--
const SwTxtFtn* GetTxtFtn() const { return pFtn; };
diff --git a/sw/source/core/text/porglue.cxx b/sw/source/core/text/porglue.cxx
index 8a1fb7d50395..f36a2e9d6539 100644
--- a/sw/source/core/text/porglue.cxx
+++ b/sw/source/core/text/porglue.cxx
@@ -214,7 +214,7 @@ SwMarginPortion::SwMarginPortion( const KSHORT nFixedWidth )
void SwMarginPortion::AdjustRight( const SwLineLayout *pCurr )
{
SwGluePortion *pRight = 0;
- BOOL bNoMove = 0 != pCurr->GetpKanaComp();
+ sal_Bool bNoMove = 0 != pCurr->GetpKanaComp();
while( pRight != this )
{
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 5a26fe11142d..984b8f3ce580 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -638,8 +638,8 @@ void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
// --> FME 2006-03-01 #i3952#
if ( bHasBlankPortion && bHasOnlyBlankPortions )
{
- USHORT nTmpAscent = GetAscent();
- USHORT nTmpHeight = Height();
+ sal_uInt16 nTmpAscent = GetAscent();
+ sal_uInt16 nTmpHeight = Height();
rLine.GetAttrHandler().GetDefaultAscentAndHeight( rInf.GetVsh(), *rInf.GetOut(), nTmpAscent, nTmpHeight );
SetAscent( nTmpAscent );
Height( nTmpHeight );
@@ -752,10 +752,10 @@ SwScriptInfo::~SwScriptInfo()
* Converts i18n Script Type (LATIN, ASIAN, COMPLEX, WEAK) to
* Sw Script Types (SW_LATIN, SW_CJK, SW_CTL), used to identify the font
*************************************************************************/
-BYTE SwScriptInfo::WhichFont( xub_StrLen nIdx, const String* pTxt, const SwScriptInfo* pSI )
+sal_uInt8 SwScriptInfo::WhichFont( xub_StrLen nIdx, const String* pTxt, const SwScriptInfo* pSI )
{
OSL_ENSURE( pTxt || pSI,"How should I determine the script type?" );
- USHORT nScript;
+ sal_uInt16 nScript;
// First we try to use our SwScriptInfo
if ( pSI )
@@ -799,17 +799,16 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
MultiSelection aHiddenMulti( aRange );
CalcHiddenRanges( rNode, aHiddenMulti );
- aHiddenChg.Remove( 0, aHiddenChg.Count() );
- USHORT nHiddenIdx = 0;
- USHORT i = 0;
+ aHiddenChg.clear();
+ sal_uInt16 i = 0;
for( i = 0; i < aHiddenMulti.GetRangeCount(); ++i )
{
const Range& rRange = aHiddenMulti.GetRange( i );
const xub_StrLen nStart = (xub_StrLen)rRange.Min();
const xub_StrLen nEnd = (xub_StrLen)rRange.Max() + 1;
- aHiddenChg.Insert( nStart, nHiddenIdx++ );
- aHiddenChg.Insert( nEnd, nHiddenIdx++ );
+ aHiddenChg.push_back( nStart );
+ aHiddenChg.push_back( nEnd );
}
//
@@ -822,16 +821,16 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
nInvalidityPos = STRING_LEN;
// this is the default direction
- nDefaultDir = static_cast<BYTE>(bRTL ? UBIDI_RTL : UBIDI_LTR);
+ nDefaultDir = static_cast<sal_uInt8>(bRTL ? UBIDI_RTL : UBIDI_LTR);
// counter for script info arrays
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
// counter for compression information arrays
- USHORT nCntComp = 0;
+ sal_uInt16 nCntComp = 0;
// counter for kashida array
- USHORT nCntKash = 0;
+ sal_uInt16 nCntKash = 0;
- BYTE nScript = i18n::ScriptType::LATIN;
+ sal_uInt8 nScript = i18n::ScriptType::LATIN;
// compression type
const SwCharCompressType aCompEnum = rNode.getIDocumentSettingAccess()->getCharacterCompressionType();
@@ -902,7 +901,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// If we are at the start of a group, we do not trust nScript,
// we better get nScript from the breakiterator:
if ( nChg == nGrpStart )
- nScript = (BYTE)pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg );
+ nScript = (sal_uInt8)pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg );
//
// INVALID DATA FROM THE SCRIPT INFO ARRAYS HAS TO BE DELETED:
@@ -912,7 +911,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
aScriptChanges.erase( aScriptChanges.begin() + nCnt, aScriptChanges.end() );
// get the start of the last compression group
- USHORT nLastCompression = nChg;
+ sal_uInt16 nLastCompression = nChg;
if( nCntComp )
{
--nCntComp;
@@ -928,7 +927,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
aCompressionChanges.erase(aCompressionChanges.begin() + nCntComp, aCompressionChanges.end() );
// get the start of the last kashida group
- USHORT nLastKashida = nChg;
+ sal_uInt16 nLastKashida = nChg;
if( nCntKash && i18n::ScriptType::COMPLEX == nScript )
{
--nCntKash;
@@ -936,7 +935,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
}
// remove invalid entries from kashida array
- aKashida.Remove( nCntKash, aKashida.Count() - nCntKash );
+ aKashida.erase( aKashida.begin() + nCntKash, aKashida.end() );
//
// TAKE CARE OF WEAK CHARACTERS: WE MUST FIND AN APPROPRIATE
@@ -955,7 +954,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
if( nEnd > rTxt.Len() )
nEnd = rTxt.Len();
- nScript = (BYTE)GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() );
+ nScript = (sal_uInt8)GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
OSL_ENSURE( i18n::ScriptType::LATIN == nScript ||
i18n::ScriptType::ASIAN == nScript ||
@@ -964,9 +963,9 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
nChg = nEnd;
// Get next script type or set to weak in order to exit
- BYTE nNextScript = ( nEnd < rTxt.Len() ) ?
- (BYTE)pBreakIt->GetBreakIter()->getScriptType( rTxt, nEnd ) :
- (BYTE)WEAK;
+ sal_uInt8 nNextScript = ( nEnd < rTxt.Len() ) ?
+ (sal_uInt8)pBreakIt->GetBreakIter()->getScriptType( rTxt, nEnd ) :
+ (sal_uInt8)WEAK;
if ( nScript != nNextScript )
{
@@ -1039,9 +1038,9 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
if ( CHARCOMPRESS_NONE != aCompEnum &&
i18n::ScriptType::ASIAN == nScript )
{
- BYTE ePrevState = NONE;
- BYTE eState;
- USHORT nPrevChg = nLastCompression;
+ sal_uInt8 ePrevState = NONE;
+ sal_uInt8 eState;
+ sal_uInt16 nPrevChg = nLastCompression;
while ( nLastCompression < nChg )
{
@@ -1064,7 +1063,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
eState = SPECIAL_RIGHT;
break;
default:
- eState = static_cast<BYTE>( ( 0x3040 <= cChar && 0x3100 > cChar ) ? KANA : NONE );
+ eState = static_cast<sal_uInt8>( ( 0x3040 <= cChar && 0x3100 > cChar ) ? KANA : NONE );
}
// insert range of compressable characters
@@ -1116,7 +1115,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
xub_Unicode cCh;
xub_Unicode cPrevCh = 0;
- USHORT nPriorityLevel = 7; // 0..6 = level found
+ sal_uInt16 nPriorityLevel = 7; // 0..6 = level found
// 7 not found
xub_StrLen nWordLen = rWord.Len();
@@ -1260,12 +1259,15 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
} // end of current word
if ( STRING_LEN != nKashidaPos )
- aKashida.Insert( nKashidaPos, nCntKash++ );
+ {
+ aKashida.insert( aKashida.begin() + nCntKash, nKashidaPos);
+ nCntKash++;
+ }
} // end of kashida search
}
if ( nChg < rTxt.Len() )
- nScript = (BYTE)pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg );
+ nScript = (sal_uInt8)pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg );
nLastCompression = nChg;
nLastKashida = nChg;
@@ -1275,7 +1277,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// check kashida data
long nTmpKashidaPos = -1;
sal_Bool bWrongKash = sal_False;
- for (i = 0; i < aKashida.Count(); ++i )
+ for (i = 0; i < aKashida.size(); ++i )
{
long nCurrKashidaPos = GetKashida( i );
if ( nCurrKashidaPos <= nTmpKashidaPos )
@@ -1309,9 +1311,9 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// 1. All text in RTL runs will use the CTL font
// #i89825# change the script type also to CTL (hennerdrewes)
// 2. Text in embedded LTR runs that does not have any strong LTR characters (numbers!)
- for ( USHORT nDirIdx = 0; nDirIdx < aDirectionChanges.size(); ++nDirIdx )
+ for ( sal_uInt32 nDirIdx = 0; nDirIdx < aDirectionChanges.size(); ++nDirIdx )
{
- const BYTE nCurrDirType = GetDirType( nDirIdx );
+ const sal_uInt8 nCurrDirType = GetDirType( nDirIdx );
// nStart ist start of RTL run:
const xub_StrLen nStart = nDirIdx > 0 ? GetDirChg( nDirIdx - 1 ) : 0;
// nEnd is end of RTL run:
@@ -1321,7 +1323,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
( nCurrDirType > UBIDI_LTR && !lcl_HasStrongLTR( rTxt, nStart, nEnd ) ) ) // non-strong text in embedded LTR run
{
// nScriptIdx points into the ScriptArrays:
- USHORT nScriptIdx = 0;
+ size_t nScriptIdx = 0;
// Skip entries in ScriptArray which are not inside the RTL run:
// Make nScriptIdx become the index of the script group with
@@ -1331,7 +1333,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
++nScriptIdx;
const xub_StrLen nStartPosOfGroup = nScriptIdx ? GetScriptChg( nScriptIdx - 1 ) : 0;
- const BYTE nScriptTypeOfGroup = GetScriptType( nScriptIdx );
+ const sal_uInt8 nScriptTypeOfGroup = GetScriptType( nScriptIdx );
OSL_ENSURE( nStartPosOfGroup <= nStart && GetScriptChg( nScriptIdx ) > nStart,
"Script override with CTL font trouble" );
@@ -1359,7 +1361,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
#if OSL_DEBUG_LEVEL > 1
// Check that ScriptChangeInfos are in increasing order of
// position and that we don't have "empty" changes.
- BYTE nLastTyp = i18n::ScriptType::WEAK;
+ sal_uInt8 nLastTyp = i18n::ScriptType::WEAK;
xub_StrLen nLastPos = 0;
for (std::vector<ScriptChangeInfo>::const_iterator i2 = aScriptChanges.begin(); i2 < aScriptChanges.end(); ++i2)
{
@@ -1393,7 +1395,7 @@ void SwScriptInfo::UpdateBidiInfo( const String& rTxt )
int32_t nStart = 0;
int32_t nEnd;
UBiDiLevel nCurrDir;
- for ( USHORT nIdx = 0; nIdx < nCount; ++nIdx )
+ for ( sal_uInt16 nIdx = 0; nIdx < nCount; ++nIdx )
{
ubidi_getLogicalRun( pBidi, nStart, &nEnd, &nCurrDir );
aDirectionChanges.push_back( DirectionChangeInfo(nEnd, nCurrDir) );
@@ -1417,8 +1419,8 @@ void SwScriptInfo::UpdateBidiInfo( const String& rTxt )
xub_StrLen SwScriptInfo::NextScriptChg( const xub_StrLen nPos ) const
{
- USHORT nEnd = CountScriptChg();
- for( USHORT nX = 0; nX < nEnd; ++nX )
+ sal_uInt16 nEnd = CountScriptChg();
+ for( sal_uInt16 nX = 0; nX < nEnd; ++nX )
{
if( nPos < GetScriptChg( nX ) )
return GetScriptChg( nX );
@@ -1432,25 +1434,25 @@ xub_StrLen SwScriptInfo::NextScriptChg( const xub_StrLen nPos ) const
* returns the script of the character at the input position
*************************************************************************/
-BYTE SwScriptInfo::ScriptType( const xub_StrLen nPos ) const
+sal_uInt8 SwScriptInfo::ScriptType( const xub_StrLen nPos ) const
{
- USHORT nEnd = CountScriptChg();
- for( USHORT nX = 0; nX < nEnd; ++nX )
+ sal_uInt16 nEnd = CountScriptChg();
+ for( sal_uInt16 nX = 0; nX < nEnd; ++nX )
{
if( nPos < GetScriptChg( nX ) )
return GetScriptType( nX );
}
// the default is the application language script
- return (BYTE)GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() );
+ return (sal_uInt8)GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
}
xub_StrLen SwScriptInfo::NextDirChg( const xub_StrLen nPos,
- const BYTE* pLevel ) const
+ const sal_uInt8* pLevel ) const
{
- BYTE nCurrDir = pLevel ? *pLevel : 62;
- USHORT nEnd = CountDirChg();
- for( USHORT nX = 0; nX < nEnd; ++nX )
+ sal_uInt8 nCurrDir = pLevel ? *pLevel : 62;
+ sal_uInt16 nEnd = CountDirChg();
+ for( sal_uInt16 nX = 0; nX < nEnd; ++nX )
{
if( nPos < GetDirChg( nX ) &&
( nX + 1 == nEnd || GetDirType( nX + 1 ) <= nCurrDir ) )
@@ -1460,10 +1462,10 @@ xub_StrLen SwScriptInfo::NextDirChg( const xub_StrLen nPos,
return STRING_LEN;
}
-BYTE SwScriptInfo::DirType( const xub_StrLen nPos ) const
+sal_uInt8 SwScriptInfo::DirType( const xub_StrLen nPos ) const
{
- USHORT nEnd = CountDirChg();
- for( USHORT nX = 0; nX < nEnd; ++nX )
+ sal_uInt16 nEnd = CountDirChg();
+ for( sal_uInt16 nX = 0; nX < nEnd; ++nX )
{
if( nPos < GetDirChg( nX ) )
return GetDirType( nX );
@@ -1477,7 +1479,7 @@ BYTE SwScriptInfo::DirType( const xub_StrLen nPos ) const
* Takes a string and replaced the hidden ranges with cChar.
**************************************************************************/
-USHORT SwScriptInfo::MaskHiddenRanges( const SwTxtNode& rNode, XubString& rText,
+sal_uInt16 SwScriptInfo::MaskHiddenRanges( const SwTxtNode& rNode, XubString& rText,
const xub_StrLen nStt, const xub_StrLen nEnd,
const xub_Unicode cChar )
{
@@ -1486,7 +1488,7 @@ USHORT SwScriptInfo::MaskHiddenRanges( const SwTxtNode& rNode, XubString& rText,
PositionList aList;
xub_StrLen nHiddenStart;
xub_StrLen nHiddenEnd;
- USHORT nNumOfHiddenChars = 0;
+ sal_uInt16 nNumOfHiddenChars = 0;
GetBoundsOfHiddenRange( rNode, 0, nHiddenStart, nHiddenEnd, &aList );
PositionList::const_reverse_iterator rFirst( aList.end() );
PositionList::const_reverse_iterator rLast( aList.begin() );
@@ -1591,7 +1593,7 @@ bool SwScriptInfo::GetBoundsOfHiddenRange( const SwTxtNode& rNode, xub_StrLen nP
Range aRange( 0, rNode.GetTxt().Len() ? rNode.GetTxt().Len() - 1 : 0 );
MultiSelection aHiddenMulti( aRange );
SwScriptInfo::CalcHiddenRanges( rNode, aHiddenMulti );
- for( USHORT i = 0; i < aHiddenMulti.GetRangeCount(); ++i )
+ for( sal_uInt16 i = 0; i < aHiddenMulti.GetRangeCount(); ++i )
{
const Range& rRange = aHiddenMulti.GetRange( i );
const xub_StrLen nHiddenStart = (xub_StrLen)rRange.Min();
@@ -1609,7 +1611,7 @@ bool SwScriptInfo::GetBoundsOfHiddenRange( const SwTxtNode& rNode, xub_StrLen nP
if ( pList )
{
- for( USHORT i = 0; i < aHiddenMulti.GetRangeCount(); ++i )
+ for( sal_uInt16 i = 0; i < aHiddenMulti.GetRangeCount(); ++i )
{
const Range& rRange = aHiddenMulti.GetRange( i );
pList->push_back( (xub_StrLen)rRange.Min() );
@@ -1634,8 +1636,8 @@ bool SwScriptInfo::GetBoundsOfHiddenRange( xub_StrLen nPos, xub_StrLen& rnStartP
rnStartPos = STRING_LEN;
rnEndPos = 0;
- USHORT nEnd = CountHiddenChg();
- for( USHORT nX = 0; nX < nEnd; ++nX )
+ sal_uInt16 nEnd = CountHiddenChg();
+ for( sal_uInt16 nX = 0; nX < nEnd; ++nX )
{
const xub_StrLen nHiddenStart = GetHiddenChg( nX++ );
const xub_StrLen nHiddenEnd = GetHiddenChg( nX );
@@ -1652,7 +1654,7 @@ bool SwScriptInfo::GetBoundsOfHiddenRange( xub_StrLen nPos, xub_StrLen& rnStartP
if ( pList )
{
- for( USHORT nX = 0; nX < nEnd; ++nX )
+ for( sal_uInt16 nX = 0; nX < nEnd; ++nX )
{
pList->push_back( GetHiddenChg( nX++ ) );
pList->push_back( GetHiddenChg( nX ) );
@@ -1681,10 +1683,10 @@ bool SwScriptInfo::IsInHiddenRange( const SwTxtNode& rNode, xub_StrLen nPos )
* returns the type of the compressed character
*************************************************************************/
-BYTE SwScriptInfo::CompType( const xub_StrLen nPos ) const
+sal_uInt8 SwScriptInfo::CompType( const xub_StrLen nPos ) const
{
- USHORT nEnd = CountCompChg();
- for( USHORT nX = 0; nX < nEnd; ++nX )
+ sal_uInt16 nEnd = CountCompChg();
+ for( sal_uInt16 nX = 0; nX < nEnd; ++nX )
{
xub_StrLen nChg = GetCompStart( nX );
@@ -1704,12 +1706,12 @@ BYTE SwScriptInfo::CompType( const xub_StrLen nPos ) const
* betwenn nStart and nEnd
*************************************************************************/
-USHORT SwScriptInfo::HasKana( xub_StrLen nStart, const xub_StrLen nLen ) const
+sal_uInt16 SwScriptInfo::HasKana( xub_StrLen nStart, const xub_StrLen nLen ) const
{
- USHORT nCnt = CountCompChg();
+ sal_uInt16 nCnt = CountCompChg();
xub_StrLen nEnd = nStart + nLen;
- for( USHORT nX = 0; nX < nCnt; ++nX )
+ for( sal_uInt16 nX = 0; nX < nCnt; ++nX )
{
xub_StrLen nKanaStart = GetCompStart( nX );
xub_StrLen nKanaEnd = nKanaStart + GetCompLen( nX );
@@ -1729,26 +1731,26 @@ USHORT SwScriptInfo::HasKana( xub_StrLen nStart, const xub_StrLen nLen ) const
*************************************************************************/
long SwScriptInfo::Compress( sal_Int32* pKernArray, xub_StrLen nIdx, xub_StrLen nLen,
- const USHORT nCompress, const USHORT nFontHeight,
+ const sal_uInt16 nCompress, const sal_uInt16 nFontHeight,
Point* pPoint ) const
{
OSL_ENSURE( nCompress, "Compression without compression?!" );
OSL_ENSURE( nLen, "Compression without text?!" );
- USHORT nCompCount = CountCompChg();
+ sal_uInt16 nCompCount = CountCompChg();
// In asian typography, there are full width and half width characters.
// Full width punctuation characters can be compressed by 50 %
// to determine this, we compare the font width with 75 % of its height
- USHORT nMinWidth = ( 3 * nFontHeight ) / 4;
+ sal_uInt16 nMinWidth = ( 3 * nFontHeight ) / 4;
- USHORT nCompIdx = HasKana( nIdx, nLen );
+ sal_uInt16 nCompIdx = HasKana( nIdx, nLen );
if ( USHRT_MAX == nCompIdx )
return 0;
xub_StrLen nChg = GetCompStart( nCompIdx );
xub_StrLen nCompLen = GetCompLen( nCompIdx );
- USHORT nI = 0;
+ sal_uInt16 nI = 0;
nLen = nLen + nIdx;
if( nChg > nIdx )
@@ -1766,7 +1768,7 @@ long SwScriptInfo::Compress( sal_Int32* pKernArray, xub_StrLen nIdx, xub_StrLen
long nLast = nI ? pKernArray[ nI - 1 ] : 0;
do
{
- USHORT nType = GetCompType( nCompIdx );
+ sal_uInt16 nType = GetCompType( nCompIdx );
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE( nType == CompType( nIdx ), "Gimme the right type!" );
#endif
@@ -1849,7 +1851,7 @@ long SwScriptInfo::Compress( sal_Int32* pKernArray, xub_StrLen nIdx, xub_StrLen
// total number of kashida positions, or the number of kashida positions after some positions
// have been dropped, depending on the state of the aKashidaInvalid array.
-USHORT SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
+sal_uInt16 SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
sal_Int32* pScrArray,
xub_StrLen nStt,
xub_StrLen nLen,
@@ -1862,7 +1864,7 @@ USHORT SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
// evaluate kashida informatin in collected in SwScriptInfo
- USHORT nCntKash = 0;
+ sal_uInt16 nCntKash = 0;
while( nCntKash < CountKashida() )
{
if ( nStt <= GetKashida( nCntKash ) )
@@ -1873,7 +1875,7 @@ USHORT SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
const xub_StrLen nEnd = nStt + nLen;
- USHORT nCntKashEnd = nCntKash;
+ sal_uInt16 nCntKashEnd = nCntKash;
while ( nCntKashEnd < CountKashida() )
{
if ( nEnd <= GetKashida( nCntKashEnd ) )
@@ -1882,8 +1884,8 @@ USHORT SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
nCntKashEnd++;
}
- USHORT nActualKashCount = nCntKashEnd - nCntKash;
- for ( USHORT i = nCntKash; i < nCntKashEnd; ++i )
+ sal_uInt16 nActualKashCount = nCntKashEnd - nCntKash;
+ for ( sal_uInt16 i = nCntKash; i < nCntKashEnd; ++i )
{
if ( nActualKashCount && !IsKashidaValid ( i ) )
--nActualKashCount;
@@ -1905,7 +1907,7 @@ USHORT SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
while ( nIdx < nEnd )
{
- USHORT nArrayPos = nIdx - nStt;
+ sal_uInt16 nArrayPos = nIdx - nStt;
// next kashida position
++nCntKash;
@@ -1916,7 +1918,7 @@ USHORT SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
if ( nIdx > nEnd )
nIdx = nEnd;
- const USHORT nArrayEnd = nIdx - nStt;
+ const sal_uInt16 nArrayEnd = nIdx - nStt;
while ( nArrayPos < nArrayEnd )
{
@@ -1981,7 +1983,7 @@ sal_Bool SwScriptInfo::IsArabicText( const XubString& rTxt, xub_StrLen nStt, xub
sal_Bool SwScriptInfo::IsKashidaValid ( xub_StrLen nKashPos ) const
{
- for ( xub_StrLen i = 0; i < aKashidaInvalid.Count(); ++i )
+ for ( size_t i = 0; i < aKashidaInvalid.size(); ++i )
{
if ( aKashidaInvalid [ i ] == nKashPos )
return false;
@@ -1993,13 +1995,13 @@ sal_Bool SwScriptInfo::IsKashidaValid ( xub_StrLen nKashPos ) const
* SwScriptInfo::ClearKashidaInvalid()
*************************************************************************/
-void SwScriptInfo::ClearKashidaInvalid ( xub_StrLen nKashPos )
+void SwScriptInfo::ClearKashidaInvalid ( xub_StrLen nKashPos )
{
- for ( xub_StrLen i = 0; i < aKashidaInvalid.Count(); ++i )
+ for ( size_t i = 0; i < aKashidaInvalid.size(); ++i )
{
if ( aKashidaInvalid [ i ] == nKashPos )
{
- aKashidaInvalid.Remove (i, 1);
+ aKashidaInvalid.erase ( aKashidaInvalid.begin() + i );
return;
}
}
@@ -2016,7 +2018,7 @@ void SwScriptInfo::ClearKashidaInvalid ( xub_StrLen nKashPos )
bool SwScriptInfo::MarkOrClearKashidaInvalid ( xub_StrLen nStt, xub_StrLen nLen, bool bMark, xub_StrLen nMarkCount )
{
- USHORT nCntKash = 0;
+ sal_uInt16 nCntKash = 0;
while( nCntKash < CountKashida() )
{
if ( nStt <= GetKashida( nCntKash ) )
@@ -2055,17 +2057,17 @@ bool SwScriptInfo::MarkOrClearKashidaInvalid ( xub_StrLen nStt, xub_StrLen nLen,
void SwScriptInfo::MarkKashidaInvalid ( xub_StrLen nKashPos )
{
- aKashidaInvalid.Insert( nKashPos, aKashidaInvalid.Count() );
+ aKashidaInvalid.push_back( nKashPos );
}
/*************************************************************************
* SwScriptInfo::GetKashidaPositions()
*************************************************************************/
// retrieve the kashida positions in the given text range
-USHORT SwScriptInfo::GetKashidaPositions ( xub_StrLen nStt, xub_StrLen nLen,
+sal_uInt16 SwScriptInfo::GetKashidaPositions ( xub_StrLen nStt, xub_StrLen nLen,
xub_StrLen* pKashidaPosition )
{
- USHORT nCntKash = 0;
+ sal_uInt16 nCntKash = 0;
while( nCntKash < CountKashida() )
{
if ( nStt <= GetKashida( nCntKash ) )
@@ -2076,7 +2078,7 @@ USHORT SwScriptInfo::GetKashidaPositions ( xub_StrLen nStt, xub_StrLen nLen,
const xub_StrLen nEnd = nStt + nLen;
- USHORT nCntKashEnd = nCntKash;
+ sal_uInt16 nCntKashEnd = nCntKash;
while ( nCntKashEnd < CountKashida() )
{
if ( nEnd <= GetKashida( nCntKashEnd ) )
@@ -2092,8 +2094,8 @@ USHORT SwScriptInfo::GetKashidaPositions ( xub_StrLen nStt, xub_StrLen nLen,
void SwScriptInfo::SetNoKashidaLine ( xub_StrLen nStt, xub_StrLen nLen )
{
- aNoKashidaLine.Insert( nStt, aNoKashidaLine.Count());
- aNoKashidaLineEnd.Insert( nStt+nLen, aNoKashidaLineEnd.Count());
+ aNoKashidaLine.push_back( nStt );
+ aNoKashidaLineEnd.push_back( nStt+nLen );
}
/*************************************************************************
@@ -2103,7 +2105,7 @@ void SwScriptInfo::SetNoKashidaLine ( xub_StrLen nStt, xub_StrLen nLen )
bool SwScriptInfo::IsKashidaLine ( xub_StrLen nCharIdx ) const
{
- for( xub_StrLen i = 0; i < aNoKashidaLine.Count(); ++i )
+ for( size_t i = 0; i < aNoKashidaLine.size(); ++i )
{
if( nCharIdx >= aNoKashidaLine[ i ] && nCharIdx < aNoKashidaLineEnd[ i ])
return false;
@@ -2116,13 +2118,13 @@ bool SwScriptInfo::IsKashidaLine ( xub_StrLen nCharIdx ) const
void SwScriptInfo::ClearNoKashidaLine ( xub_StrLen nStt, xub_StrLen nLen )
{
- xub_StrLen i = 0;
- while( i < aNoKashidaLine.Count())
+ size_t i = 0;
+ while( i < aNoKashidaLine.size())
{
if( nStt + nLen >= aNoKashidaLine[ i ] && nStt < aNoKashidaLineEnd [ i ] )
{
- aNoKashidaLine.Remove(i, 1);
- aNoKashidaLineEnd.Remove(i, 1);
+ aNoKashidaLine.erase(aNoKashidaLine.begin() + i);
+ aNoKashidaLineEnd.erase(aNoKashidaLineEnd.begin() + i);
}
else
++i;
@@ -2137,7 +2139,7 @@ bool SwScriptInfo::MarkKashidasInvalid ( xub_StrLen nCnt, xub_StrLen* pKashidaPo
{
OSL_ENSURE( pKashidaPositions && nCnt > 0, "Where are kashidas?" );
- USHORT nCntKash = 0;
+ sal_uInt16 nCntKash = 0;
xub_StrLen nKashidaPosIdx = 0;
while ( nCntKash < CountKashida() && nKashidaPosIdx < nCnt )
@@ -2163,7 +2165,7 @@ bool SwScriptInfo::MarkKashidasInvalid ( xub_StrLen nCnt, xub_StrLen* pKashidaPo
* SwScriptInfo::ThaiJustify()
*************************************************************************/
-USHORT SwScriptInfo::ThaiJustify( const XubString& rTxt, sal_Int32* pKernArray,
+sal_uInt16 SwScriptInfo::ThaiJustify( const XubString& rTxt, sal_Int32* pKernArray,
sal_Int32* pScrArray, xub_StrLen nStt,
xub_StrLen nLen, xub_StrLen nNumberOfBlanks,
long nSpaceAdd )
@@ -2174,9 +2176,9 @@ USHORT SwScriptInfo::ThaiJustify( const XubString& rTxt, sal_Int32* pKernArray,
SPACING_PRECISION_FACTOR;
long nSpaceSum = 0;
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
- for ( USHORT nI = 0; nI < nLen; ++nI )
+ for ( sal_uInt16 nI = 0; nI < nLen; ++nI )
{
const xub_Unicode cCh = rTxt.GetChar( nStt + nI );
@@ -2307,7 +2309,7 @@ void SwLineLayout::Init( SwLinePortion* pNextPortion )
SwTwips SwLineLayout::_GetHangingMargin() const
{
SwLinePortion* pPor = GetPortion();
- BOOL bFound = sal_False;
+ sal_Bool bFound = sal_False;
SwTwips nDiff = 0;
while( pPor)
{
@@ -2357,7 +2359,7 @@ SwTwips SwTxtFrm::HangingMargin() const
void SwScriptInfo::CalcHiddenRanges( const SwTxtNode& rNode, MultiSelection& rHiddenMulti )
{
const SfxPoolItem* pItem = 0;
- if( SFX_ITEM_SET == rNode.GetSwAttrSet().GetItemState( RES_CHRATR_HIDDEN, TRUE, &pItem ) &&
+ if( SFX_ITEM_SET == rNode.GetSwAttrSet().GetItemState( RES_CHRATR_HIDDEN, sal_True, &pItem ) &&
((SvxCharHiddenItem*)pItem)->GetValue() )
{
rHiddenMulti.SelectAll();
@@ -2392,7 +2394,7 @@ void SwScriptInfo::CalcHiddenRanges( const SwTxtNode& rNode, MultiSelection& rHi
const IDocumentRedlineAccess& rIDRA = *rNode.getIDocumentRedlineAccess();
if ( rHiddenMulti.GetRangeCount() && IDocumentRedlineAccess::IsShowChanges( rIDRA.GetRedlineMode() ) )
{
- USHORT nAct = rIDRA.GetRedlinePos( rNode, USHRT_MAX );
+ sal_uInt16 nAct = rIDRA.GetRedlinePos( rNode, USHRT_MAX );
for ( ; nAct < rIDRA.GetRedlineTbl().Count(); nAct++ )
{
diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx
index db11bbc87f31..fb9ffd504152 100644
--- a/sw/source/core/text/porlay.hxx
+++ b/sw/source/core/text/porlay.hxx
@@ -195,15 +195,15 @@ public:
void InitSpaceAdd(); // Creates pLLSpaceAdd if necessary
void CreateSpaceAdd( const long nInit = 0 );
inline void FinishSpaceAdd() { delete pLLSpaceAdd; pLLSpaceAdd = NULL; }
- inline USHORT GetLLSpaceAddCount() const { return sal::static_int_cast< USHORT >(pLLSpaceAdd->size()); }
- inline void SetLLSpaceAdd( long nNew, USHORT nIdx )
+ inline sal_uInt16 GetLLSpaceAddCount() const { return sal::static_int_cast< sal_uInt16 >(pLLSpaceAdd->size()); }
+ inline void SetLLSpaceAdd( long nNew, sal_uInt16 nIdx )
{
if ( nIdx == GetLLSpaceAddCount() )
pLLSpaceAdd->push_back( nNew );
else
(*pLLSpaceAdd)[ nIdx ] = nNew;
}
- inline long GetLLSpaceAdd( USHORT nIdx ) { return (*pLLSpaceAdd)[ nIdx ]; }
+ inline long GetLLSpaceAdd( sal_uInt16 nIdx ) { return (*pLLSpaceAdd)[ nIdx ]; }
inline void RemoveFirstLLSpaceAdd() { pLLSpaceAdd->erase( pLLSpaceAdd->begin() ); }
inline std::vector<long>* GetpLLSpaceAdd() const { return pLLSpaceAdd; }
@@ -260,7 +260,7 @@ public:
void DebugPortions( SvStream &rOs, const XubString &rTxt,
const xub_StrLen nStart ); //$ ostream
- void dumpLineAsXml(xmlTextWriter* writer, USHORT& ofs, String& aText);
+ void dumpLineAsXml(xmlTextWriter* writer, sal_uInt16& ofs, String& aText);
#endif
OUTPUT_OPERATOR
diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx
index e2c2284eebff..da677f83c077 100644
--- a/sw/source/core/text/porlin.cxx
+++ b/sw/source/core/text/porlin.cxx
@@ -112,18 +112,18 @@ void SwLinePortion::PrePaint( const SwTxtPaintInfo& rInf,
return;
const KSHORT nHalfView = nViewWidth / 2;
- USHORT nLastWidth = pLast->Width();
+ sal_uInt16 nLastWidth = pLast->Width();
if ( pLast->InSpaceGrp() && rInf.GetSpaceAdd() )
- nLastWidth = nLastWidth + (USHORT)pLast->CalcSpacing( rInf.GetSpaceAdd(), rInf );
+ nLastWidth = nLastWidth + (sal_uInt16)pLast->CalcSpacing( rInf.GetSpaceAdd(), rInf );
KSHORT nPos;
SwTxtPaintInfo aInf( rInf );
- const BOOL bBidiPor = ( rInf.GetTxtFrm()->IsRightToLeft() ) !=
+ const sal_Bool bBidiPor = ( rInf.GetTxtFrm()->IsRightToLeft() ) !=
( 0 != ( TEXT_LAYOUT_BIDI_RTL & rInf.GetOut()->GetLayoutMode() ) );
- USHORT nDir = bBidiPor ?
+ sal_uInt16 nDir = bBidiPor ?
1800 :
rInf.GetFont()->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
@@ -325,7 +325,7 @@ sal_Bool SwLinePortion::Format( SwTxtFormatInfo &rInf )
const SwLinePortion *pLast = rInf.GetLast();
Height( pLast->Height() );
SetAscent( pLast->GetAscent() );
- const KSHORT nNewWidth = static_cast<USHORT>(rInf.X() + PrtWidth());
+ const KSHORT nNewWidth = static_cast<sal_uInt16>(rInf.X() + PrtWidth());
// Nur Portions mit echter Breite koennen ein sal_True zurueckliefern
// Notizen beispielsweise setzen niemals bFull==sal_True
if( rInf.Width() <= nNewWidth && PrtWidth() && ! IsKernPortion() )
@@ -354,9 +354,9 @@ void SwLinePortion::FormatEOL( SwTxtFormatInfo & )
void SwLinePortion::Move( SwTxtPaintInfo &rInf )
{
- BOOL bB2T = rInf.GetDirection() == DIR_BOTTOM2TOP;
- const BOOL bFrmDir = rInf.GetTxtFrm()->IsRightToLeft();
- BOOL bCounterDir = ( ! bFrmDir && DIR_RIGHT2LEFT == rInf.GetDirection() ) ||
+ sal_Bool bB2T = rInf.GetDirection() == DIR_BOTTOM2TOP;
+ const sal_Bool bFrmDir = rInf.GetTxtFrm()->IsRightToLeft();
+ sal_Bool bCounterDir = ( ! bFrmDir && DIR_RIGHT2LEFT == rInf.GetDirection() ) ||
( bFrmDir && DIR_LEFT2RIGHT == rInf.GetDirection() );
if ( InSpaceGrp() && rInf.GetSpaceAdd() )
diff --git a/sw/source/core/text/porlin.hxx b/sw/source/core/text/porlin.hxx
index efa942a4cbcc..a4f887113173 100644
--- a/sw/source/core/text/porlin.hxx
+++ b/sw/source/core/text/porlin.hxx
@@ -201,7 +201,7 @@ public:
virtual void HandlePortion( SwPortionHandler& rPH ) const;
#if OSL_DEBUG_LEVEL > 1
- void dumpPortionAsXml(USHORT ofs, String& aText, xmlTextWriter* writer);
+ void dumpPortionAsXml(sal_uInt16 ofs, String& aText, xmlTextWriter* writer);
#endif
OUTPUT_OPERATOR
};
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 96d125c168c9..222a669bd44e 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -80,7 +80,7 @@ SwMultiPortion::~SwMultiPortion()
void SwMultiPortion::Paint( const SwTxtPaintInfo & ) const
{
- OSL_ENSURE( FALSE,
+ OSL_ENSURE( sal_False,
"Don't try SwMultiPortion::Paint, try SwTxtPainter::PaintMultiPortion" );
}
@@ -213,7 +213,7 @@ SwRotatedPortion::SwRotatedPortion( const SwMultiCreator& rCreate,
* SwBidiPortion::SwBidiPortion(..)
* --------------------------------------------------*/
-SwBidiPortion::SwBidiPortion( xub_StrLen nEnd, BYTE nLv )
+SwBidiPortion::SwBidiPortion( xub_StrLen nEnd, sal_uInt8 nLv )
: SwMultiPortion( nEnd ), nLevel( nLv )
{
SetBidi();
@@ -330,7 +330,7 @@ SwDoubleLinePortion::SwDoubleLinePortion( const SwMultiCreator& rCreate,
pBracket->cPre = 0;
pBracket->cPost = 0;
}
- BYTE nTmp = SW_SCRIPTS;
+ sal_uInt8 nTmp = SW_SCRIPTS;
if( pBracket->cPre > 255 )
{
String aTxt( pBracket->cPre );
@@ -387,7 +387,7 @@ void SwDoubleLinePortion::PaintBracket( SwTxtPaintInfo &rInf,
aBlank.Height( pBracket->nHeight );
{
SwFont* pTmpFnt = new SwFont( *rInf.GetFont() );
- BYTE nAct = bOpen ? pBracket->nPreScript : pBracket->nPostScript;
+ sal_uInt8 nAct = bOpen ? pBracket->nPreScript : pBracket->nPostScript;
if( SW_SCRIPTS > nAct )
pTmpFnt->SetActual( nAct );
pTmpFnt->SetProportion( 100 );
@@ -434,7 +434,7 @@ void SwDoubleLinePortion::FormatBrackets( SwTxtFormatInfo &rInf, SwTwips& nMaxWi
if( pBracket->cPre )
{
String aStr( pBracket->cPre );
- BYTE nActualScr = pTmpFnt->GetActual();
+ sal_uInt8 nActualScr = pTmpFnt->GetActual();
if( SW_SCRIPTS > pBracket->nPreScript )
pTmpFnt->SetActual( pBracket->nPreScript );
SwFontSave aSave( rInf, pTmpFnt );
@@ -714,11 +714,11 @@ void SwRubyPortion::_Adjust( SwTxtFormatInfo &rInf )
}
KSHORT nLeft = 0; // the space in front of the first letter
KSHORT nRight = 0; // the space at the end of the last letter
- USHORT nSub = 0;
+ sal_uInt16 nSub = 0;
switch ( nAdjustment )
{
- case 1: nRight = static_cast<USHORT>(nLineDiff / 2); // no break
- case 2: nLeft = static_cast<USHORT>(nLineDiff - nRight); break;
+ case 1: nRight = static_cast<sal_uInt16>(nLineDiff / 2); // no break
+ case 2: nLeft = static_cast<sal_uInt16>(nLineDiff - nRight); break;
case 3: nSub = 1; // no break
case 4:
{
@@ -744,8 +744,8 @@ void SwRubyPortion::_Adjust( SwTxtFormatInfo &rInf )
}
if( nLineDiff > 1 )
{
- nRight = static_cast<USHORT>(nLineDiff / 2);
- nLeft = static_cast<USHORT>(nLineDiff - nRight);
+ nRight = static_cast<sal_uInt16>(nLineDiff / 2);
+ nLeft = static_cast<sal_uInt16>(nLineDiff - nRight);
}
break;
}
@@ -825,7 +825,7 @@ void SwRubyPortion::CalcRubyOffset()
* lcl_Has2Lines(..)
* is a little help function for GetMultiCreator(..)
* It extracts the 2-line-format from a 2-line-attribute or a character style.
- * The rValue is set to TRUE, if the 2-line-attribute's value is set and
+ * The rValue is set to sal_True, if the 2-line-attribute's value is set and
* no 2-line-format reference is passed. If there is a 2-line-format reference,
* then the rValue is set only, if the 2-line-attribute's value is set _and_
* the 2-line-formats has the same brackets.
@@ -854,7 +854,7 @@ sal_Bool lcl_Has2Lines( const SwTxtAttr& rAttr, const SvxTwoLinesItem* &rpRef,
* lcl_HasRotation(..)
* is a little help function for GetMultiCreator(..)
* It extracts the charrotation from a charrotate-attribute or a character style.
- * The rValue is set to TRUE, if the charrotate-attribute's value is set and
+ * The rValue is set to sal_True, if the charrotate-attribute's value is set and
* no charrotate-format reference is passed.
* If there is a charrotate-format reference, then the rValue is set only,
* if the charrotate-attribute's value is set _and_ identical
@@ -885,7 +885,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
SwScriptInfo& rSI = ((SwParaPortion*)GetParaPortion())->GetScriptInfo();
// get the last embedding level
- BYTE nCurrLevel;
+ sal_uInt8 nCurrLevel;
if ( pMulti )
{
OSL_ENSURE( pMulti->IsBidi(), "Nested MultiPortion is not BidiPortion" );
@@ -897,7 +897,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
nCurrLevel = GetTxtFrm()->IsRightToLeft() ? 1 : 0;
// check if there is a field at rPos:
- BYTE nNextLevel = nCurrLevel;
+ sal_uInt8 nNextLevel = nCurrLevel;
sal_Bool bFldBidi = sal_False;
if ( CH_TXTATR_BREAKWORD == GetChar( rPos ) )
@@ -943,7 +943,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
const SvxCharRotateItem* pRotate = NULL;
const SfxPoolItem* pRotItem;
if( SFX_ITEM_SET == pFrm->GetTxtNode()->GetSwAttrSet().
- GetItemState( RES_CHRATR_ROTATE, TRUE, &pRotItem ) &&
+ GetItemState( RES_CHRATR_ROTATE, sal_True, &pRotItem ) &&
((SvxCharRotateItem*)pRotItem)->GetValue() )
pRotate = (SvxCharRotateItem*)pRotItem;
else
@@ -951,7 +951,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
const SvxTwoLinesItem* p2Lines = NULL;
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pFrm->GetTxtNode()->GetSwAttrSet().
- GetItemState( RES_CHRATR_TWO_LINES, TRUE, &pItem ) &&
+ GetItemState( RES_CHRATR_TWO_LINES, sal_True, &pItem ) &&
((SvxTwoLinesItem*)pItem)->GetValue() )
p2Lines = (SvxTwoLinesItem*)pItem;
else
@@ -963,10 +963,10 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
const SwTxtAttr *pRuby = NULL;
sal_Bool bTwo = sal_False;
sal_Bool bRot = sal_False;
- USHORT n2Lines = USHRT_MAX;
- USHORT nRotate = USHRT_MAX;
- USHORT nCount = pHints ? pHints->Count() : 0;
- USHORT i;
+ sal_uInt16 n2Lines = USHRT_MAX;
+ sal_uInt16 nRotate = USHRT_MAX;
+ sal_uInt16 nCount = pHints ? pHints->Count() : 0;
+ sal_uInt16 i;
for( i = 0; i < nCount; ++i )
{
const SwTxtAttr *pTmp = (*pHints)[i];
@@ -1023,10 +1023,10 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
{
pRet->pItem = NULL;
pRet->pAttr = (*pHints)[n2Lines];
- aEnd.Insert( *pRet->pAttr->GetEnd(), 0 );
+ aEnd.push_front( *pRet->pAttr->GetEnd() );
if( pItem )
{
- aEnd[ 0 ] = GetTxt().Len();
+ aEnd.front() = GetTxt().Len();
bOn = ((SvxTwoLinesItem*)pItem)->GetEndBracket() ==
p2Lines->GetEndBracket() &&
((SvxTwoLinesItem*)pItem)->GetStartBracket() ==
@@ -1037,7 +1037,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
{
pRet->pItem = pItem;
pRet->pAttr = NULL;
- aEnd.Insert( GetTxt().Len(), 0 );
+ aEnd.push_front( GetTxt().Len() );
}
pRet->nId = SW_MC_DOUBLE;
pRet->nLevel = GetTxtFrm()->IsRightToLeft() ? 1 : 0;
@@ -1066,28 +1066,28 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
continue;
if( rPos < *pTmp->GetStart() )
{
- // If bOn is FALSE and the next attribute starts later than rPos
+ // If bOn is sal_False and the next attribute starts later than rPos
// the winner attribute is interrupted at rPos.
// If the start of the next atribute is behind the end of
// the last attribute on the aEnd-stack, this is the endposition
// on the stack is the end of the 2-line portion.
- if( !bOn || aEnd[ aEnd.Count()-1 ] < *pTmp->GetStart() )
+ if( !bOn || aEnd.back() < *pTmp->GetStart() )
break;
- // At this moment, bOn is TRUE and the next attribute starts
+ // At this moment, bOn is sal_True and the next attribute starts
// behind rPos, so we could move rPos to the next startpoint
rPos = *pTmp->GetStart();
// We clean up the aEnd-stack, endpositions equal to rPos are
// superfluous.
- while( aEnd.Count() && aEnd[ aEnd.Count()-1 ] <= rPos )
+ while( !aEnd.empty() && aEnd.back() <= rPos )
{
bOn = !bOn;
- aEnd.Remove( aEnd.Count()-1, 1 );
+ aEnd.pop_back();
}
// If the endstack is empty, we simulate an attribute with
- // state TRUE and endposition rPos
- if( !aEnd.Count() )
+ // state sal_True and endposition rPos
+ if( aEnd.empty() )
{
- aEnd.Insert( rPos, 0 );
+ aEnd.push_front( rPos );
bOn = sal_True;
}
}
@@ -1099,8 +1099,8 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
if( bTwo == bOn )
{ // .. with the same state, so the last attribute could
// be continued.
- if( aEnd[ aEnd.Count()-1 ] < *pTmp->GetEnd() )
- aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd();
+ if( aEnd.back() < *pTmp->GetEnd() )
+ aEnd.back() = *pTmp->GetEnd();
}
else
{ // .. with a different state.
@@ -1108,17 +1108,17 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
// If this is smaller than the last on the stack, we put
// it on the stack. If it has the same endposition, the last
// could be removed.
- if( aEnd[ aEnd.Count()-1 ] > *pTmp->GetEnd() )
- aEnd.Insert( *pTmp->GetEnd(), aEnd.Count() );
- else if( aEnd.Count() > 1 )
- aEnd.Remove( aEnd.Count()-1, 1 );
+ if( aEnd.back() > *pTmp->GetEnd() )
+ aEnd.push_back( *pTmp->GetEnd() );
+ else if( aEnd.size() > 1 )
+ aEnd.pop_back();
else
- aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd();
+ aEnd.back() = *pTmp->GetEnd();
}
}
}
- if( bOn && aEnd.Count() )
- rPos = aEnd[ aEnd.Count()-1 ];
+ if( bOn && !aEnd.empty() )
+ rPos = aEnd.back();
return pRet;
}
if( nRotate < nCount || ( pRotItem && pRotItem == pRotate &&
@@ -1134,7 +1134,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
// The bOn flag signs the state of the last 2-line attribute in the
// aEnd-stack, which could interrupts the winning rotation attribute.
sal_Bool bOn = pItem ? sal_True : sal_False;
- aEnd.Insert( GetTxt().Len(), 0 );
+ aEnd.push_front( GetTxt().Len() );
// n2Lines is the index of the last 2-line-attribute, which contains
// the actual position.
i = 0;
@@ -1146,17 +1146,17 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
continue;
if( n2Start < *pTmp->GetStart() )
{
- if( bOn || aEnd[ aEnd.Count()-1 ] < *pTmp->GetStart() )
+ if( bOn || aEnd.back() < *pTmp->GetStart() )
break;
n2Start = *pTmp->GetStart();
- while( aEnd.Count() && aEnd[ aEnd.Count()-1 ] <= n2Start )
+ while( !aEnd.empty() && aEnd.back() <= n2Start )
{
bOn = !bOn;
- aEnd.Remove( aEnd.Count()-1, 1 );
+ aEnd.pop_back();
}
- if( !aEnd.Count() )
+ if( aEnd.empty() )
{
- aEnd.Insert( n2Start, 0 );
+ aEnd.push_front( n2Start );
bOn = sal_False;
}
}
@@ -1171,36 +1171,36 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
{
if( bTwo == bOn )
{
- if( aEnd[ aEnd.Count()-1 ] < *pTmp->GetEnd() )
- aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd();
+ if( aEnd.back() < *pTmp->GetEnd() )
+ aEnd.back() = *pTmp->GetEnd();
}
else
{
bOn = bTwo;
- if( aEnd[ aEnd.Count()-1 ] > *pTmp->GetEnd() )
- aEnd.Insert( *pTmp->GetEnd(), aEnd.Count() );
- else if( aEnd.Count() > 1 )
- aEnd.Remove( aEnd.Count()-1, 1 );
+ if( aEnd.back() > *pTmp->GetEnd() )
+ aEnd.push_back( *pTmp->GetEnd() );
+ else if( aEnd.size() > 1 )
+ aEnd.pop_back();
else
- aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd();
+ aEnd.back() = *pTmp->GetEnd();
}
}
}
- if( !bOn && aEnd.Count() )
- n2Start = aEnd[ aEnd.Count()-1 ];
+ if( !bOn && !aEnd.empty() )
+ n2Start = aEnd.back();
- if( aEnd.Count() )
- aEnd.Remove( 0, aEnd.Count() );
+ if( !aEnd.empty() )
+ aEnd.clear();
bOn = sal_True;
if( nRotate < nCount )
{
pRet->pItem = NULL;
pRet->pAttr = (*pHints)[nRotate];
- aEnd.Insert( *pRet->pAttr->GetEnd(), 0 );
+ aEnd.push_front( *pRet->pAttr->GetEnd() );
if( pRotItem )
{
- aEnd[ 0 ] = GetTxt().Len();
+ aEnd.front() = GetTxt().Len();
bOn = ((SvxCharRotateItem*)pRotItem)->GetValue() ==
pRotate->GetValue();
}
@@ -1209,7 +1209,7 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
{
pRet->pItem = pRotItem;
pRet->pAttr = NULL;
- aEnd.Insert( GetTxt().Len(), 0 );
+ aEnd.push_front( GetTxt().Len() );
}
i = 0;
while( i < nCount )
@@ -1219,17 +1219,17 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
continue;
if( rPos < *pTmp->GetStart() )
{
- if( !bOn || aEnd[ aEnd.Count()-1 ] < *pTmp->GetStart() )
+ if( !bOn || aEnd.back() < *pTmp->GetStart() )
break;
rPos = *pTmp->GetStart();
- while( aEnd.Count() && aEnd[ aEnd.Count()-1 ] <= rPos )
+ while( !aEnd.empty() && aEnd.back() <= rPos )
{
bOn = !bOn;
- aEnd.Remove( aEnd.Count()-1, 1 );
+ aEnd.pop_back();
}
- if( !aEnd.Count() )
+ if( aEnd.empty() )
{
- aEnd.Insert( rPos, 0 );
+ aEnd.push_front( rPos );
bOn = sal_True;
}
}
@@ -1242,23 +1242,23 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( xub_StrLen &rPos,
{
if( bTwo == bOn )
{
- if( aEnd[ aEnd.Count()-1 ] < *pTmp->GetEnd() )
- aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd();
+ if( aEnd.back() < *pTmp->GetEnd() )
+ aEnd.back() = *pTmp->GetEnd();
}
else
{
bOn = bTwo;
- if( aEnd[ aEnd.Count()-1 ] > *pTmp->GetEnd() )
- aEnd.Insert( *pTmp->GetEnd(), aEnd.Count() );
- else if( aEnd.Count() > 1 )
- aEnd.Remove( aEnd.Count()-1, 1 );
+ if( aEnd.back() > *pTmp->GetEnd() )
+ aEnd.push_back( *pTmp->GetEnd() );
+ else if( aEnd.size() > 1 )
+ aEnd.pop_back();
else
- aEnd[ aEnd.Count()-1 ] = *pTmp->GetEnd();
+ aEnd.back() = *pTmp->GetEnd();
}
}
}
- if( bOn && aEnd.Count() )
- rPos = aEnd[ aEnd.Count()-1 ];
+ if( bOn && !aEnd.empty() )
+ rPos = aEnd.back();
if( rPos > n2Start )
rPos = n2Start;
return pRet;
@@ -1367,7 +1367,7 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
{
GETGRID( pFrm->FindPageFrm() )
const sal_Bool bHasGrid = pGrid && GetInfo().SnapToGrid();
- USHORT nRubyHeight = 0;
+ sal_uInt16 nRubyHeight = 0;
sal_Bool bRubyTop = sal_False;
if ( bHasGrid )
@@ -1379,7 +1379,7 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
// do not allow grid mode for first line in ruby portion
const sal_Bool bRubyInGrid = bHasGrid && rMulti.IsRuby();
- const USHORT nOldHeight = rMulti.Height();
+ const sal_uInt16 nOldHeight = rMulti.Height();
const sal_Bool bOldGridModeAllowed = GetInfo().SnapToGrid();
if ( bRubyInGrid )
@@ -1389,9 +1389,9 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
}
SwLayoutModeModifier aLayoutModeModifier( *GetInfo().GetOut() );
- BYTE nEnvDir = 0;
- BYTE nThisDir = 0;
- BYTE nFrmDir = 0;
+ sal_uInt8 nEnvDir = 0;
+ sal_uInt8 nThisDir = 0;
+ sal_uInt8 nFrmDir = 0;
if ( rMulti.IsBidi() )
{
// these values are needed for the calculation of the x coordinate
@@ -1510,7 +1510,7 @@ void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
{
if( rMulti.HasRotation() )
{
- const USHORT nAdjustment = ( pLay->Height() - pPor->Height() ) / 2 +
+ const sal_uInt16 nAdjustment = ( pLay->Height() - pPor->Height() ) / 2 +
pPor->GetAscent();
if( rMulti.IsRevers() )
GetInfo().X( nOfst - nAdjustment );
@@ -1743,7 +1743,7 @@ void lcl_TruncateMultiPortion( SwMultiPortion& rMulti, SwTxtFormatInfo& rInf,
* SwTxtFrm::_Format with multiple BuildPortions
*---------------------------------------------------------------------------*/
-BOOL SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
+sal_Bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
SwMultiPortion& rMulti )
{
SwTwips nMaxWidth = rInf.Width();
@@ -1867,7 +1867,7 @@ BOOL SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
SwLinePortion *pNextFirst = NULL;
SwLinePortion *pNextSecond = NULL;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
GETGRID( pFrm->FindPageFrm() )
const sal_Bool bHasGrid = pGrid && GRID_LINES_CHARS == pGrid->GetGridType();
@@ -1881,7 +1881,7 @@ BOOL SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
{
pCurr = &rMulti.GetRoot();
nStart = nStartIdx;
- bRet = FALSE;
+ bRet = sal_False;
FormatReset( aInf );
aInf.X( nTmpX );
aInf.Width( KSHORT(nActWidth) );
@@ -2009,7 +2009,7 @@ BOOL SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
}
delete pNextFirst;
pNextFirst = NULL;
- } while ( TRUE );
+ } while ( sal_True );
pMulti = pOldMulti;
@@ -2354,7 +2354,7 @@ SwLinePortion* SwTxtFormatter::MakeRestPortion( const SwLineLayout* pLine,
SwTxtCursorSave::SwTxtCursorSave( SwTxtCursor* pTxtCursor,
SwMultiPortion* pMulti,
SwTwips nY,
- USHORT& nX,
+ sal_uInt16& nX,
xub_StrLen nCurrStart,
long nSpaceAdd )
{
@@ -2373,7 +2373,7 @@ SwTxtCursorSave::SwTxtCursorSave( SwTxtCursor* pTxtCursor,
{
bSpaceChg = pMulti->ChgSpaceAdd( pTxtCursor->pCurr, nSpaceAdd );
- USHORT nSpaceCnt;
+ sal_uInt16 nSpaceCnt;
if ( pMulti->IsDouble() )
{
pTxtCursor->SetPropFont( 50 );
@@ -2388,7 +2388,7 @@ SwTxtCursorSave::SwTxtCursorSave( SwTxtCursor* pTxtCursor,
}
if( nSpaceAdd > 0 && !pMulti->HasTabulator() )
- pTxtCursor->pCurr->Width( static_cast<USHORT>(nWidth + nSpaceAdd * nSpaceCnt / SPACING_PRECISION_FACTOR ) );
+ pTxtCursor->pCurr->Width( static_cast<sal_uInt16>(nWidth + nSpaceAdd * nSpaceCnt / SPACING_PRECISION_FACTOR ) );
// For a BidiPortion we have to calculate the offset from the
// end of the portion
diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx
index 042d9871f66d..4facac70a342 100644
--- a/sw/source/core/text/pormulti.hxx
+++ b/sw/source/core/text/pormulti.hxx
@@ -57,8 +57,8 @@ struct SwMultiCreator
{
const SwTxtAttr* pAttr;
const SfxPoolItem* pItem;
- BYTE nId;
- BYTE nLevel;
+ sal_uInt8 nId;
+ sal_uInt8 nLevel;
};
/*--------------------------------------------------
@@ -75,8 +75,8 @@ struct SwBracket
KSHORT nPostWidth; // Width of the closing bracket
sal_Unicode cPre; // Initial character, e.g. '('
sal_Unicode cPost; // Final character, e.g. ')'
- BYTE nPreScript; // Script of the initial character
- BYTE nPostScript; // Script of the final character
+ sal_uInt8 nPreScript; // Script of the initial character
+ sal_uInt8 nPostScript; // Script of the final character
};
/*--------------------------------------------------
@@ -148,7 +148,7 @@ public:
inline sal_Bool HasRotation() const { return 0 != (1 & nDirection); }
inline sal_Bool IsRevers() const { return 0 != (2 & nDirection); }
inline sal_uInt8 GetDirection() const { return nDirection; }
- inline USHORT GetFontRotation() const
+ inline sal_uInt16 GetFontRotation() const
{ return ( HasRotation() ? ( IsRevers() ? 2700 : 900 ) : 0 ); }
// Accessibility: pass information about this portion to the PortionHandler
@@ -195,7 +195,7 @@ public:
class SwRubyPortion : public SwMultiPortion
{
xub_StrLen nRubyOffset;
- USHORT nAdjustment;
+ sal_uInt16 nAdjustment;
void _Adjust( SwTxtFormatInfo &rInf);
public:
SwRubyPortion( const SwRubyPortion& rRuby, xub_StrLen nEnd );
@@ -208,7 +208,7 @@ public:
void CalcRubyOffset();
inline void Adjust( SwTxtFormatInfo &rInf )
{ if(nAdjustment && GetRoot().GetNext()) _Adjust(rInf); }
- inline USHORT GetAdjustment() const { return nAdjustment; }
+ inline sal_uInt16 GetAdjustment() const { return nAdjustment; }
inline xub_StrLen GetRubyOffset() const { return nRubyOffset; }
};
@@ -223,12 +223,12 @@ public:
class SwBidiPortion : public SwMultiPortion
{
- BYTE nLevel;
+ sal_uInt8 nLevel;
public:
- SwBidiPortion( xub_StrLen nEnd, BYTE nLv );
+ SwBidiPortion( xub_StrLen nEnd, sal_uInt8 nLv );
- inline BYTE GetLevel() const { return nLevel; }
+ inline sal_uInt8 GetLevel() const { return nLevel; }
// Get number of blanks for justified alignment
xub_StrLen GetSpaceCnt( const SwTxtSizeInfo &rInf ) const;
// Calculates extra spacing based on number of blanks
@@ -245,11 +245,11 @@ class SwTxtCursorSave
SwLineLayout* pCurr;
SwTwips nWidth;
xub_StrLen nStart;
- BYTE nOldProp;
+ sal_uInt8 nOldProp;
sal_Bool bSpaceChg;
public:
SwTxtCursorSave( SwTxtCursor* pTxtCursor, SwMultiPortion* pMulti,
- SwTwips nY, USHORT& nX, xub_StrLen nCurrStart, long nSpaceAdd );
+ SwTwips nY, sal_uInt16& nX, xub_StrLen nCurrStart, long nSpaceAdd );
~SwTxtCursorSave();
};
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index d690ed66028d..75bc6831035e 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -213,7 +213,7 @@ SwArrowPortion::SwArrowPortion( const SwLinePortion &rPortion ) :
SwArrowPortion::SwArrowPortion( const SwTxtPaintInfo &rInf )
: bLeft( sal_False )
{
- Height( (USHORT)(rInf.GetTxtFrm()->Prt().Height()) );
+ Height( (sal_uInt16)(rInf.GetTxtFrm()->Prt().Height()) );
aPos.X() = rInf.GetTxtFrm()->Frm().Left() +
rInf.GetTxtFrm()->Prt().Right();
aPos.Y() = rInf.GetTxtFrm()->Frm().Top() +
@@ -537,7 +537,7 @@ void SwControlCharPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
SwFont aTmpFont( *rInf.GetFont() );
aTmpFont.SetEscapement( CHAR_ZWSP == mcChar ? DFLT_ESC_AUTO_SUB : -25 );
- const USHORT nProp = 40;
+ const sal_uInt16 nProp = 40;
aTmpFont.SetProportion( nProp ); // a smaller font
SwFontSave aFontSave( rInf, &aTmpFont );
diff --git a/sw/source/core/text/porrst.hxx b/sw/source/core/text/porrst.hxx
index d9b1da7b6807..1c1d2dd48893 100644
--- a/sw/source/core/text/porrst.hxx
+++ b/sw/source/core/text/porrst.hxx
@@ -157,8 +157,8 @@ class SwControlCharPortion : public SwLinePortion
{
private:
- mutable USHORT mnViewWidth; // used to cache a calculated value
- mutable USHORT mnHalfCharWidth; // used to cache a calculated value
+ mutable sal_uInt16 mnViewWidth; // used to cache a calculated value
+ mutable sal_uInt16 mnHalfCharWidth; // used to cache a calculated value
sal_Unicode mcChar;
public:
diff --git a/sw/source/core/text/portab.hxx b/sw/source/core/text/portab.hxx
index 957f1394d6f7..3cda7b9d1f96 100644
--- a/sw/source/core/text/portab.hxx
+++ b/sw/source/core/text/portab.hxx
@@ -108,7 +108,7 @@ class SwTabDecimalPortion : public SwTabPortion
* following the tab stop up to the decimal position. This value is
* evaluated during pLastTab->FormatEOL. FME 2006-01-06 #127428#.
*/
- USHORT mnWidthOfPortionsUpTpDecimalPosition;
+ sal_uInt16 mnWidthOfPortionsUpTpDecimalPosition;
public:
inline SwTabDecimalPortion( const KSHORT nTabPosVal, const xub_Unicode cTab,
@@ -120,11 +120,11 @@ public:
inline xub_Unicode GetTabDecimal() const { return mcTab; }
- inline void SetWidthOfPortionsUpToDecimalPosition( USHORT nNew )
+ inline void SetWidthOfPortionsUpToDecimalPosition( sal_uInt16 nNew )
{
mnWidthOfPortionsUpTpDecimalPosition = nNew;
}
- inline USHORT GetWidthOfPortionsUpToDecimalPosition() const
+ inline sal_uInt16 GetWidthOfPortionsUpToDecimalPosition() const
{
return mnWidthOfPortionsUpTpDecimalPosition;
}
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 1ebea407e54f..c72c22fb02f9 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -61,7 +61,7 @@ using namespace ::com::sun::star::i18n::ScriptType;
* (for justified alignment).
*************************************************************************/
-USHORT lcl_AddSpace( const SwTxtSizeInfo &rInf, const XubString* pStr,
+sal_uInt16 lcl_AddSpace( const SwTxtSizeInfo &rInf, const XubString* pStr,
const SwLinePortion& rPor )
{
xub_StrLen nPos, nEnd;
@@ -81,8 +81,8 @@ USHORT lcl_AddSpace( const SwTxtSizeInfo &rInf, const XubString* pStr,
pSI = &((SwParaPortion*)rInf.GetParaPortion())->GetScriptInfo();
}
- USHORT nCnt = 0;
- BYTE nScript = 0;
+ sal_uInt16 nCnt = 0;
+ sal_uInt8 nScript = 0;
// If portion consists of Asian characters and language is not
// Korean, we add extra space to each character.
@@ -90,7 +90,7 @@ USHORT lcl_AddSpace( const SwTxtSizeInfo &rInf, const XubString* pStr,
if ( pSI )
nScript = pSI->ScriptType( nPos );
else if ( pBreakIt->GetBreakIter().is() )
- nScript = (BYTE)pBreakIt->GetBreakIter()->getScriptType( *pStr, nPos );
+ nScript = (sal_uInt8)pBreakIt->GetBreakIter()->getScriptType( *pStr, nPos );
// Note: rInf.GetIdx() can differ from nPos,
// e.g., when rPor is a field portion. nPos referes to the string passed
@@ -128,7 +128,7 @@ USHORT lcl_AddSpace( const SwTxtSizeInfo &rInf, const XubString* pStr,
{
if ( SwScriptInfo::IsArabicText( *pStr, nPos, nEnd - nPos ) && pSI->CountKashida() )
{
- const USHORT nKashRes = pSI->KashidaJustify( 0, 0, nPos, nEnd - nPos );
+ const sal_uInt16 nKashRes = pSI->KashidaJustify( 0, 0, nPos, nEnd - nPos );
// i60591: need to check result of KashidaJustify
// determine if kashida justification is applicable
if( nKashRes != STRING_LEN )
@@ -185,7 +185,7 @@ USHORT lcl_AddSpace( const SwTxtSizeInfo &rInf, const XubString* pStr,
nPos = rInf.GetIdx() + rPor.GetLen();
if ( nPos < rInf.GetTxt().Len() )
{
- BYTE nNextScript = 0;
+ sal_uInt8 nNextScript = 0;
const SwLinePortion* pPor = rPor.GetPortion();
if ( pPor && pPor->IsKernPortion() )
pPor = pPor->GetPortion();
@@ -203,10 +203,10 @@ USHORT lcl_AddSpace( const SwTxtSizeInfo &rInf, const XubString* pStr,
pPor->GetExpTxt( rInf, aStr );
((SwTxtSizeInfo &)rInf).SetOnWin( bOldOnWin );
- nNextScript = (BYTE)pBreakIt->GetBreakIter()->getScriptType( aStr, 0 );
+ nNextScript = (sal_uInt8)pBreakIt->GetBreakIter()->getScriptType( aStr, 0 );
}
else
- nNextScript = (BYTE)pBreakIt->GetBreakIter()->getScriptType( rInf.GetTxt(), nPos );
+ nNextScript = (sal_uInt8)pBreakIt->GetBreakIter()->getScriptType( rInf.GetTxt(), nPos );
if( ASIAN == nNextScript )
{
@@ -516,7 +516,7 @@ void SwTxtPortion::FormatEOL( SwTxtFormatInfo &rInf )
{
// calculate number of blanks
xub_StrLen nX = rInf.GetIdx() - 1;
- USHORT nHoleLen = 1;
+ sal_uInt16 nHoleLen = 1;
while( nX && nHoleLen < GetLen() && CH_BLANK == rInf.GetChar( --nX ) )
nHoleLen++;
diff --git a/sw/source/core/text/portxt.hxx b/sw/source/core/text/portxt.hxx
index 3b00ec7ffedb..8a201cf1f87e 100644
--- a/sw/source/core/text/portxt.hxx
+++ b/sw/source/core/text/portxt.hxx
@@ -68,7 +68,7 @@ public:
virtual void HandlePortion( SwPortionHandler& rPH ) const;
#if OSL_DEBUG_LEVEL > 1
- void dumpPortionAsXml(USHORT ofs, String& aText, xmlTextWriter* writer);
+ void dumpPortionAsXml(sal_uInt16 ofs, String& aText, xmlTextWriter* writer);
#endif
OUTPUT_OPERATOR
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index e94bdc873d5a..78ec78789c52 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -109,13 +109,13 @@ void SwAttrIter::CtorInitAttrIter( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf, S
pFnt->SetActual( SwScriptInfo::WhichFont( 0, 0, pScriptInfo ) );
xub_StrLen nChg = 0;
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
do
{
nChg = pScriptInfo->GetScriptChg( nCnt );
- USHORT nScript = pScriptInfo->GetScriptType( nCnt++ );
- BYTE nTmp = 4;
+ sal_uInt16 nScript = pScriptInfo->GetScriptType( nCnt++ );
+ sal_uInt8 nTmp = 4;
switch ( nScript ) {
case i18n::ScriptType::ASIAN :
if( !aMagicNo[SW_CJK] ) nTmp = SW_CJK; break;
diff --git a/sw/source/core/text/redlnitr.hxx b/sw/source/core/text/redlnitr.hxx
index 13c701ca8d3d..0fd14acd302f 100644
--- a/sw/source/core/text/redlnitr.hxx
+++ b/sw/source/core/text/redlnitr.hxx
@@ -75,7 +75,7 @@ class SwRedlineItr
SwAttrHandler& rAttrHandler;
SfxItemSet *pSet;
SwExtend *pExt;
- ULONG nNdIdx;
+ sal_uLong nNdIdx;
xub_StrLen nFirst;
xub_StrLen nAct;
xub_StrLen nStart;
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index 5adec0f06166..2012d2c221e8 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -62,7 +62,7 @@ using namespace ::com::sun::star;
*************************************************************************/
sal_Bool lcl_IsDropFlyInter( const SwTxtFormatInfo &rInf,
- USHORT nWidth, USHORT nHeight )
+ sal_uInt16 nWidth, sal_uInt16 nHeight )
{
const SwTxtFly *pTxtFly = rInf.GetTxtFly();
if( pTxtFly && pTxtFly->IsOn() )
@@ -167,7 +167,7 @@ MSHORT SwTxtNode::GetDropLen( MSHORT nWishLen ) const
{
// find first word
const SwAttrSet& rAttrSet = GetSwAttrSet();
- const USHORT nTxtScript = pBreakIt->GetRealScriptOfText( GetTxt(), 0 );
+ const sal_uInt16 nTxtScript = pBreakIt->GetRealScriptOfText( GetTxt(), 0 );
LanguageType eLanguage;
@@ -269,7 +269,7 @@ bool SwTxtNode::GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescen
if (rFontHeight==0 && rDropHeight==0 && rDropDescent==0)
{
- const USHORT nLines = rDrop.GetLines();
+ const sal_uInt16 nLines = rDrop.GetLines();
const SvxFontHeightItem& rItem = (SvxFontHeightItem&)rSet.Get( RES_CHRATR_FONTSIZE );
rFontHeight = rItem.GetHeight();
@@ -432,7 +432,7 @@ sal_Bool SwDropPortion::FormatTxt( SwTxtFormatInfo &rInf )
SwPosSize SwDropPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
{
- USHORT nMyX = 0;
+ sal_uInt16 nMyX = 0;
xub_StrLen nIdx = 0;
const SwDropPortionPart* pCurrPart = GetPart();
@@ -713,7 +713,7 @@ class SwDropCapCache
{
long aMagicNo[ DROP_CACHE_SIZE ];
XubString aTxt[ DROP_CACHE_SIZE ];
- USHORT aFactor[ DROP_CACHE_SIZE ];
+ sal_uInt16 aFactor[ DROP_CACHE_SIZE ];
KSHORT aWishedHeight[ DROP_CACHE_SIZE ];
short aDescent[ DROP_CACHE_SIZE ];
MSHORT nIndex;
@@ -805,7 +805,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
aTxt[ nTmpIdx ] = aStr;
aWishedHeight[ nTmpIdx ] = KSHORT(nWishedHeight);
// save initial scaling factor
- aFactor[ nTmpIdx ] = (USHORT)nFactor;
+ aFactor[ nTmpIdx ] = (sal_uInt16)nFactor;
}
sal_Bool bGrow = ( pDrop->GetLen() != 0 );
@@ -841,11 +841,11 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
SwFont& rFnt = pCurrPart->GetFont();
// Get height including proportion
- const USHORT nCurrHeight =
- (USHORT)rFnt.GetHeight( rFnt.GetActual() );
+ const sal_uInt16 nCurrHeight =
+ (sal_uInt16)rFnt.GetHeight( rFnt.GetActual() );
// Get without proportion
- const BYTE nOldProp = rFnt.GetPropr();
+ const sal_uInt8 nOldProp = rFnt.GetPropr();
rFnt.SetProportion( 100 );
Size aOldSize = Size( 0, rFnt.GetHeight( rFnt.GetActual() ) );
@@ -938,7 +938,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
else
{
if ( bUseCache )
- aFactor[ nTmpIdx ] = (USHORT)nFactor;
+ aFactor[ nTmpIdx ] = (sal_uInt16)nFactor;
nMin = nFactor;
}
@@ -982,7 +982,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
SwFont& rFnt = pCurrPart->GetFont();
Size aNewSize( 0, ( nFactor * rFnt.GetHeight( rFnt.GetActual() ) ) / 1000 );
- const BYTE nOldProp = rFnt.GetPropr();
+ const sal_uInt8 nOldProp = rFnt.GetPropr();
rFnt.SetProportion( 100 );
rFnt.SetSize( aNewSize, rFnt.GetActual() );
rFnt.SetProportion( nOldProp );
@@ -999,7 +999,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
sal_Bool SwDropPortion::Format( SwTxtFormatInfo &rInf )
{
sal_Bool bFull = sal_False;
- Fix( (USHORT)rInf.X() );
+ Fix( (sal_uInt16)rInf.X() );
SwLayoutModeModifier aLayoutModeModifier( *rInf.GetOut() );
aLayoutModeModifier.SetAuto();
@@ -1035,7 +1035,7 @@ sal_Bool SwDropPortion::Format( SwTxtFormatInfo &rInf )
Width();
// set values
- pCurrPart->SetWidth( (USHORT)nTmpWidth );
+ pCurrPart->SetWidth( (sal_uInt16)nTmpWidth );
// Move
rInf.SetIdx( rInf.GetIdx() + pCurrPart->GetLen() );
@@ -1043,7 +1043,7 @@ sal_Bool SwDropPortion::Format( SwTxtFormatInfo &rInf )
pCurrPart = pCurrPart->GetFollow();
}
- Width( (USHORT)(rInf.X() - nOldX) );
+ Width( (sal_uInt16)(rInf.X() - nOldX) );
}
// reset my length
@@ -1081,7 +1081,7 @@ sal_Bool SwDropPortion::Format( SwTxtFormatInfo &rInf )
else
{
const KSHORT nWant = Width() + GetDistance();
- const KSHORT nRest = (USHORT)(rInf.Width() - rInf.X());
+ const KSHORT nRest = (sal_uInt16)(rInf.Width() - rInf.X());
if( ( nWant > nRest ) ||
lcl_IsDropFlyInter( rInf, Width() + GetDistance(), nDropHeight ) )
nDistance = 0;
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index dee5a9597060..f99a2e334387 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -106,6 +106,8 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
}
ViewShell *pSh = rInf.GetVsh();
+ SwDoc *const pDoc( (pSh) ? pSh->GetDoc() : 0 );
+ bool const bInClipboard( (pDoc) ? pDoc->IsClipBoard() : true );
sal_Bool bPlaceHolder = sal_False;
switch( pFld->GetTyp()->Which() )
@@ -117,16 +119,26 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
case RES_COMBINED_CHARS:
{
- String sStr( pFld->GetCntnt( bName ));
if( bName )
- pRet = new SwFldPortion( sStr );
+ {
+ String const sName( pFld->GetFieldName() );
+ pRet = new SwFldPortion(sName);
+ }
else
- pRet = new SwCombinedPortion( sStr );
+ {
+ String const sContent( pFld->ExpandField(bInClipboard) );
+ pRet = new SwCombinedPortion(sContent);
+ }
}
break;
case RES_HIDDENTXTFLD:
- pRet = new SwHiddenPortion(pFld->GetCntnt( bName ));
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwHiddenPortion(str);
+ }
break;
case RES_CHAPTERFLD:
@@ -135,13 +147,25 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
((SwChapterField*)pFld)->ChangeExpansion( pFrame,
&((SwTxtFld*)pHint)->GetTxtNode() );
}
- pRet = new SwFldPortion( pFld->GetCntnt( bName ) );
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwFldPortion( str );
+ }
break;
case RES_DOCSTATFLD:
if( !bName && pSh && !pSh->Imp()->IsUpdateExpFlds() )
+ {
((SwDocStatField*)pFld)->ChangeExpansion( pFrame );
- pRet = new SwFldPortion( pFld->GetCntnt( bName ) );
+ }
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwFldPortion( str );
+ }
break;
case RES_PAGENUMBERFLD:
@@ -153,7 +177,6 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
const SwRootFrm* pTmpRootFrm = pSh->GetLayout();
const sal_Bool bVirt = pTmpRootFrm->IsVirtPageNum();
- SwDoc* pDoc = pSh->GetDoc();
MSHORT nVirtNum = pFrame->GetVirtPageNum();
MSHORT nNumPages = pTmpRootFrm->GetPageNum();
sal_Int16 nNumFmt = -1;
@@ -163,7 +186,12 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
pPageNr->ChangeExpansion( pDoc, nVirtNum, nNumPages,
bVirt, nNumFmt > -1 ? &nNumFmt : 0);
}
- pRet = new SwFldPortion( pFld->GetCntnt( bName ) );
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwFldPortion( str );
+ }
break;
}
case RES_GETEXPFLD:
@@ -183,7 +211,12 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
pExpFld->ChgBodyTxtFlag( sal_True );
}
}
- pRet = new SwFldPortion( pFld->GetCntnt( bName ) );
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwFldPortion( str );
+ }
break;
}
case RES_DBFLD:
@@ -193,13 +226,25 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
SwDBField* pDBFld = (SwDBField*)pFld;
pDBFld->ChgBodyTxtFlag( ::lcl_IsInBody( pFrame ) );
}
- pRet = new SwFldPortion( pFld->GetCntnt( bName ) );
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwFldPortion(str);
+ }
break;
}
case RES_REFPAGEGETFLD:
if( !bName && pSh && !pSh->Imp()->IsUpdateExpFlds() )
+ {
((SwRefPageGetField*)pFld)->ChangeExpansion( pFrame, (SwTxtFld*)pHint );
- pRet = new SwFldPortion( pFld->GetCntnt( bName ) );
+ }
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwFldPortion(str);
+ }
break;
case RES_JUMPEDITFLD:
@@ -210,9 +255,12 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
break;
default:
- {
- pRet = new SwFldPortion(pFld->GetCntnt( bName ) );
- }
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwFldPortion(str);
+ }
}
if( bNewFlyPor )
@@ -235,7 +283,12 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
else
pTmpFnt->SetDiffFnt( &pChFmt->GetAttrSet(), pFrm->GetTxtNode()->getIDocumentSettingAccess() );
}
- pRet = new SwFldPortion( pFld->GetCntnt( bName ), pTmpFnt, bPlaceHolder );
+ {
+ String const str( (bName)
+ ? pFld->GetFieldName()
+ : pFld->ExpandField(bInClipboard) );
+ pRet = new SwFldPortion(str, pTmpFnt, bPlaceHolder);
+ }
}
return pRet;
@@ -373,7 +426,7 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
// hat ein "gueltige" Nummer ?
if( pTxtNd->IsNumbered() && pTxtNd->IsCountedInList())
{
- const SwNumFmt &rNumFmt = pNumRule->Get( static_cast<USHORT>(pTxtNd->GetActualListLevel()) );
+ const SwNumFmt &rNumFmt = pNumRule->Get( static_cast<sal_uInt16>(pTxtNd->GetActualListLevel()) );
const sal_Bool bLeft = SVX_ADJUST_LEFT == rNumFmt.GetNumAdjust();
const sal_Bool bCenter = SVX_ADJUST_CENTER == rNumFmt.GetNumAdjust();
const bool bLabelAlignmentPosAndSpaceModeActive(
@@ -442,7 +495,7 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
if ( pFmtFnt )
{
- const BYTE nAct = pNumFnt->GetActual();
+ const sal_uInt8 nAct = pNumFnt->GetActual();
pNumFnt->SetFamily( pFmtFnt->GetFamily(), nAct );
pNumFnt->SetName( pFmtFnt->GetName(), nAct );
pNumFnt->SetStyleName( pFmtFnt->GetStyleName(), nAct );
@@ -464,12 +517,7 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
}
else
{
- // --> OD 2006-06-02 #b6432095#
- // use method <SwNumRule::MakeNumString(..)> instead of
- // method <SwTxtNode::GetNumString()>, because for levels with
- // numbering none the prefix and the suffix strings have to be provided.
- XubString aTxt( pNumRule->MakeNumString( *(pTxtNd->GetNum()) ) );
- // <--
+ XubString aTxt( pTxtNd->GetNumString() );
if ( aTxt.Len() > 0 )
{
aTxt.Insert( pTxtNd->GetLabelFollowedBy() );
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index dfaef2302e8d..b8b8476e4553 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -537,7 +537,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
if( bForced )
{
pCurr->SetForcedLeftMargin( sal_True );
- rInf.ForcedLeftMargin( (USHORT)aInter.Width() );
+ rInf.ForcedLeftMargin( (sal_uInt16)aInter.Width() );
}
if( bFullLine )
@@ -610,7 +610,7 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
(pPageFrm->*fnRect->fnGetPrtLeft)();
const SwDoc *pDoc = rInf.GetTxtFrm()->GetNode()->GetDoc();
- const USHORT nGridWidth = GETGRIDWIDTH( pGrid, pDoc); //for textgrid refactor
+ const sal_uInt16 nGridWidth = GETGRIDWIDTH( pGrid, pDoc); //for textgrid refactor
SwTwips nStartX = GetLeftMargin();
if ( bVert )
@@ -623,11 +623,11 @@ void SwTxtFormatter::CalcFlyWidth( SwTxtFormatInfo &rInf )
const SwTwips nOfst = nStartX - nGridOrigin;
const SwTwips nTmpWidth = rInf.Width() + nOfst;
- const ULONG i = nTmpWidth / nGridWidth + 1;
+ const sal_uLong i = nTmpWidth / nGridWidth + 1;
const long nNewWidth = ( i - 1 ) * nGridWidth - nOfst;
if ( nNewWidth > 0 )
- rInf.Width( (USHORT)nNewWidth );
+ rInf.Width( (sal_uInt16)nNewWidth );
else
rInf.Width( 0 );
}
@@ -678,7 +678,7 @@ SwFlyCntPortion *SwTxtFormatter::NewFlyCntPortion( SwTxtFormatInfo &rInf,
pFly->GetRefPoint().Y() );
if ( bUseFlyAscent )
- nAscent = static_cast<USHORT>( Abs( int( bTxtFrmVertical ?
+ nAscent = static_cast<sal_uInt16>( Abs( int( bTxtFrmVertical ?
pFly->GetRelPos().X() :
pFly->GetRelPos().Y() ) ) );
@@ -944,7 +944,7 @@ sal_Bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
sal_Bool bOpaque = sal_False;
// --> OD 2006-08-15 #i68520#
- const UINT32 nCurrOrd = mpCurrAnchoredObj
+ const sal_uInt32 nCurrOrd = mpCurrAnchoredObj
? mpCurrAnchoredObj->GetDrawObj()->GetOrdNum()
: SAL_MAX_UINT32;
// <--
@@ -1139,8 +1139,8 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
// #102344# Ignore connectors which have one or more connections
if(pNew && pNew->ISA(SdrEdgeObj))
{
- if(((SdrEdgeObj*)pNew)->GetConnectedNode(TRUE)
- || ((SdrEdgeObj*)pNew)->GetConnectedNode(FALSE))
+ if(((SdrEdgeObj*)pNew)->GetConnectedNode(sal_True)
+ || ((SdrEdgeObj*)pNew)->GetConnectedNode(sal_False))
{
return sal_False;
}
@@ -1160,7 +1160,7 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
if ( bInFooterOrHeader )
{
SwFmtVertOrient aVert( rFrmFmt.GetVertOrient() );
- BOOL bVertPrt = aVert.GetRelationOrient() == text::RelOrientation::PRINT_AREA ||
+ sal_Bool bVertPrt = aVert.GetRelationOrient() == text::RelOrientation::PRINT_AREA ||
aVert.GetRelationOrient() == text::RelOrientation::PAGE_PRINT_AREA;
if( bVertPrt )
return sal_False;
@@ -1330,7 +1330,7 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj,
// Compare indices:
// Den Index des anderen erhalten wir immer ueber das Ankerattr.
- ULONG nTmpIndex = rNewA.GetCntntAnchor()->nNode.GetIndex();
+ sal_uLong nTmpIndex = rNewA.GetCntntAnchor()->nNode.GetIndex();
// Jetzt wird noch ueberprueft, ob der aktuelle Absatz vor dem
// Anker des verdraengenden Objekts im Text steht, dann wird
// nicht ausgewichen.
@@ -1789,7 +1789,7 @@ const SwRect SwContourCache::ContourRect( const SwFmt* pFmt,
pSdrObj[ 0 ] = pObj; // Wg. #37347 darf das Object erst nach dem
// GetContour() eingetragen werden.
pTextRanger[ 0 ] = new TextRanger( aPolyPolygon, pPolyPolygon, 20,
- (USHORT)rLRSpace.GetLeft(), (USHORT)rLRSpace.GetRight(),
+ (sal_uInt16)rLRSpace.GetLeft(), (sal_uInt16)rLRSpace.GetRight(),
pFmt->GetSurround().IsOutside(), sal_False, pFrm->IsVertical() );
pTextRanger[ 0 ]->SetUpper( rULSpace.GetUpper() );
pTextRanger[ 0 ]->SetLower( rULSpace.GetLower() );
@@ -1923,7 +1923,7 @@ void SwContourCache::ShowContour( OutputDevice* pOut, const SdrObject* pObj,
void SwTxtFly::ShowContour( OutputDevice* pOut )
{
MSHORT nFlyCount;
- if( bOn && ( 0 != ( nFlyCount = static_cast<USHORT>(GetAnchoredObjList()->size() ) ) ) )
+ if( bOn && ( 0 != ( nFlyCount = static_cast<sal_uInt16>(GetAnchoredObjList()->size() ) ) ) )
{
Color aRedColor( COL_LIGHTRED );
Color aGreenColor( COL_LIGHTGREEN );
diff --git a/sw/source/core/text/txtfly.hxx b/sw/source/core/text/txtfly.hxx
index 53076e5567de..1b0120e10a24 100644
--- a/sw/source/core/text/txtfly.hxx
+++ b/sw/source/core/text/txtfly.hxx
@@ -108,7 +108,7 @@ class SwTxtFly
SwAnchoredObjList* mpAnchoredObjList;
long nMinBottom;
long nNextTop; // Hier wird die Oberkante des "naechsten" Rahmens gespeichert
- ULONG nIndex;
+ sal_uLong nIndex;
sal_Bool bOn : 1;
sal_Bool bLeftSide : 1;
sal_Bool bTopRule: 1;
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 458d48381412..0b90971528e9 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -102,13 +102,22 @@ void SwTxtFrm::SwapWidthAndHeight()
{
const long nPrtOfstX = Prt().Pos().X();
Prt().Pos().X() = Prt().Pos().Y();
- Prt().Pos().Y() = Frm().Width() - ( nPrtOfstX + Prt().Width() );
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsVertLR() )
+ Prt().Pos().Y() = nPrtOfstX;
+ else
+ Prt().Pos().Y() = Frm().Width() - ( nPrtOfstX + Prt().Width() );
+
}
else
{
const long nPrtOfstY = Prt().Pos().Y();
Prt().Pos().Y() = Prt().Pos().X();
- Prt().Pos().X() = Frm().Height() - ( nPrtOfstY + Prt().Height() );
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if( IsVertLR() )
+ Prt().Pos().X() = nPrtOfstY;
+ else
+ Prt().Pos().X() = Frm().Height() - ( nPrtOfstY + Prt().Height() );
}
const long nFrmWidth = Frm().Width();
@@ -126,16 +135,33 @@ void SwTxtFrm::SwapWidthAndHeight()
void SwTxtFrm::SwitchHorizontalToVertical( SwRect& rRect ) const
{
// calc offset inside frame
- const long nOfstX = rRect.Left() - Frm().Left();
- const long nOfstY = rRect.Top() + rRect.Height() - Frm().Top();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ long nOfstX, nOfstY;
+ if ( IsVertLR() )
+ {
+ nOfstX = rRect.Left() - Frm().Left();
+ nOfstY = rRect.Top() - Frm().Top();
+ }
+ else
+ {
+ nOfstX = rRect.Left() - Frm().Left();
+ nOfstY = rRect.Top() + rRect.Height() - Frm().Top();
+ }
+
const long nWidth = rRect.Width();
const long nHeight = rRect.Height();
- if ( bIsSwapped )
- rRect.Left( Frm().Left() + Frm().Height() - nOfstY );
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( IsVertLR() )
+ rRect.Left(Frm().Left() + nOfstY);
else
- // frame is rotated
- rRect.Left( Frm().Left() + Frm().Width() - nOfstY );
+ {
+ if ( bIsSwapped )
+ rRect.Left( Frm().Left() + Frm().Height() - nOfstY );
+ else
+ // frame is rotated
+ rRect.Left( Frm().Left() + Frm().Width() - nOfstY );
+ }
rRect.Top( Frm().Top() + nOfstX );
rRect.Width( nHeight );
@@ -149,12 +175,17 @@ void SwTxtFrm::SwitchHorizontalToVertical( Point& rPoint ) const
// calc offset inside frame
const long nOfstX = rPoint.X() - Frm().Left();
const long nOfstY = rPoint.Y() - Frm().Top();
-
- if ( bIsSwapped )
- rPoint.X() = Frm().Left() + Frm().Height() - nOfstY;
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( IsVertLR() )
+ rPoint.X() = Frm().Left() + nOfstY;
else
- // calc rotated coords
- rPoint.X() = Frm().Left() + Frm().Width() - nOfstY;
+ {
+ if ( bIsSwapped )
+ rPoint.X() = Frm().Left() + Frm().Height() - nOfstY;
+ else
+ // calc rotated coords
+ rPoint.X() = Frm().Left() + Frm().Width() - nOfstY;
+ }
rPoint.Y() = Frm().Top() + nOfstX;
}
@@ -175,10 +206,17 @@ void SwTxtFrm::SwitchVerticalToHorizontal( SwRect& rRect ) const
long nOfstX;
// calc offset inside frame
- if ( bIsSwapped )
- nOfstX = Frm().Left() + Frm().Height() - ( rRect.Left() + rRect.Width() );
+
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( IsVertLR() )
+ nOfstX = rRect.Left() - Frm().Left();
else
- nOfstX = Frm().Left() + Frm().Width() - ( rRect.Left() + rRect.Width() );
+ {
+ if ( bIsSwapped )
+ nOfstX = Frm().Left() + Frm().Height() - ( rRect.Left() + rRect.Width() );
+ else
+ nOfstX = Frm().Left() + Frm().Width() - ( rRect.Left() + rRect.Width() );
+ }
const long nOfstY = rRect.Top() - Frm().Top();
const long nWidth = rRect.Height();
@@ -198,10 +236,17 @@ void SwTxtFrm::SwitchVerticalToHorizontal( Point& rPoint ) const
long nOfstX;
// calc offset inside frame
- if ( bIsSwapped )
- nOfstX = Frm().Left() + Frm().Height() - rPoint.X();
+
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ if ( IsVertLR() )
+ nOfstX = rPoint.X() - Frm().Left();
else
- nOfstX = Frm().Left() + Frm().Width() - rPoint.X();
+ {
+ if ( bIsSwapped )
+ nOfstX = Frm().Left() + Frm().Height() - rPoint.X();
+ else
+ nOfstX = Frm().Left() + Frm().Width() - rPoint.X();
+ }
const long nOfstY = rPoint.Y() - Frm().Top();
@@ -278,7 +323,7 @@ void SwLayoutModeModifier::Modify( sal_Bool bChgToRTL )
void SwLayoutModeModifier::SetAuto()
{
- const ULONG nNewLayoutMode = nOldLayoutMode & ~TEXT_LAYOUT_BIDI_STRONG;
+ const sal_uLong nNewLayoutMode = nOldLayoutMode & ~TEXT_LAYOUT_BIDI_STRONG;
((OutputDevice&)rOut).SetLayoutMode( nNewLayoutMode );
}
@@ -441,9 +486,9 @@ void SwTxtFrm::HideFootnotes( xub_StrLen nStart, xub_StrLen nEnd )
const SwpHints *pHints = GetTxtNode()->GetpSwpHints();
if( pHints )
{
- const USHORT nSize = pHints->Count();
+ const sal_uInt16 nSize = pHints->Count();
SwPageFrm *pPage = 0;
- for ( USHORT i = 0; i < nSize; ++i )
+ for ( sal_uInt16 i = 0; i < nSize; ++i )
{
const SwTxtAttr *pHt = (*pHints)[i];
if ( pHt->Which() == RES_TXTATR_FTN )
@@ -839,13 +884,13 @@ void lcl_SetWrong( SwTxtFrm& rFrm, xub_StrLen nPos, long nCnt, bool bMove )
if ( !pTxtNode->GetWrong() && !pTxtNode->IsWrongDirty() )
{
pTxtNode->SetWrong( new SwWrongList( WRONGLIST_SPELL ) );
- pTxtNode->GetWrong()->SetInvalid( nPos, nPos + (USHORT)( nCnt > 0 ? nCnt : 1 ) );
+ pTxtNode->GetWrong()->SetInvalid( nPos, nPos + (sal_uInt16)( nCnt > 0 ? nCnt : 1 ) );
}
if ( !pTxtNode->GetSmartTags() && !pTxtNode->IsSmartTagDirty() )
{
// SMARTTAGS
pTxtNode->SetSmartTags( new SwWrongList( WRONGLIST_SMARTTAG ) );
- pTxtNode->GetSmartTags()->SetInvalid( nPos, nPos + (USHORT)( nCnt > 0 ? nCnt : 1 ) );
+ pTxtNode->GetSmartTags()->SetInvalid( nPos, nPos + (sal_uInt16)( nCnt > 0 ? nCnt : 1 ) );
}
pTxtNode->SetWrongDirty( true );
pTxtNode->SetGrammarCheckDirty( true );
@@ -858,7 +903,7 @@ void lcl_SetWrong( SwTxtFrm& rFrm, xub_StrLen nPos, long nCnt, bool bMove )
SwRootFrm *pRootFrm = rFrm.FindRootFrm();
if (pRootFrm)
{
- pRootFrm->SetNeedGrammarCheck( TRUE );
+ pRootFrm->SetNeedGrammarCheck( sal_True );
}
SwPageFrm *pPage = rFrm.FindPageFrm();
@@ -1482,7 +1527,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
switch ( ePrep )
{
case PREP_BOSS_CHGD:
- SetInvalidVert( TRUE ); // Test
+ SetInvalidVert( sal_True ); // Test
case PREP_WIDOWS_ORPHANS:
case PREP_WIDOWS:
case PREP_FTN_GONE : return;
@@ -1528,7 +1573,7 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
if( !HasPara() && PREP_MUST_FIT != ePrep )
{
- SetInvalidVert( TRUE ); // Test
+ SetInvalidVert( sal_True ); // Test
OSL_ENSURE( !IsLocked(), "SwTxtFrm::Prepare: three of a perfect pair" );
if ( bNotify )
InvalidateSize();
@@ -1608,9 +1653,9 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
{
// Test
{
- SetInvalidVert( FALSE );
- BOOL bOld = IsVertical();
- SetInvalidVert( TRUE );
+ SetInvalidVert( sal_False );
+ sal_Bool bOld = IsVertical();
+ SetInvalidVert( sal_True );
if( bOld != IsVertical() )
InvalidateRange( SwCharRange( GetOfst(), STRING_LEN ) );
}
@@ -1635,10 +1680,10 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
SwpHints *pHints = GetTxtNode()->GetpSwpHints();
if( pHints )
{
- const USHORT nSize = pHints->Count();
+ const sal_uInt16 nSize = pHints->Count();
const xub_StrLen nEnd = GetFollow() ?
GetFollow()->GetOfst() : STRING_LEN;
- for ( USHORT i = 0; i < nSize; ++i )
+ for ( sal_uInt16 i = 0; i < nSize; ++i )
{
const SwTxtAttr *pHt = (*pHints)[i];
const xub_StrLen nStart = *pHt->GetStart();
@@ -2190,7 +2235,7 @@ void SwTxtFrm::CalcAdditionalFirstLineOffset()
pTxtNode->GetNumRule() )
{
const SwNumFmt& rNumFmt =
- pTxtNode->GetNumRule()->Get( static_cast<USHORT>(pTxtNode->GetActualListLevel()) );
+ pTxtNode->GetNumRule()->Get( static_cast<sal_uInt16>(pTxtNode->GetActualListLevel()) );
if ( rNumFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
// keep current paragraph portion and apply dummy paragraph portion
@@ -2490,7 +2535,7 @@ void SwTxtFrm::ChgThisLines()
{
//not necassary to format here (GerFormatted etc.), because we have to come from there!
- ULONG nNew = 0;
+ sal_uLong nNew = 0;
const SwLineNumberInfo &rInf = GetNode()->getIDocumentLineNumberAccess()->GetLineNumberInfo();
if ( GetTxt().Len() && HasPara() )
{
@@ -2499,7 +2544,7 @@ void SwTxtFrm::ChgThisLines()
if ( rInf.IsCountBlankLines() )
{
aLine.Bottom();
- nNew = (ULONG)aLine.GetLineNr();
+ nNew = (sal_uLong)aLine.GetLineNr();
}
else
{
@@ -2540,6 +2585,12 @@ void SwTxtFrm::ChgThisLines()
else //Paragraphs which are not counted should not manipulate the AllLines.
nThisLines = nNew;
}
+
+ //mba: invalidating is not necessary; if mongolian script has a problem, it should be fixed at the ritgh place
+ //with invalidating we probably get too much flickering
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ //Ugly. How can we hack if better?
+ //InvalidatePage();
}
@@ -2551,9 +2602,9 @@ void SwTxtFrm::RecalcAllLines()
if ( !IsInTab() )
{
- const ULONG nOld = GetAllLines();
+ const sal_uLong nOld = GetAllLines();
const SwFmtLineNumber &rLineNum = pAttrSet->GetLineNumber();
- ULONG nNewNum;
+ sal_uLong nNewNum;
const bool bRestart = GetTxtNode()->getIDocumentLineNumberAccess()->GetLineNumberInfo().IsRestartEachPage();
if ( !IsFollow() && rLineNum.GetStartValue() && rLineNum.IsCount() )
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index 312112ffb8c7..5f474354be45 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -113,7 +113,7 @@ void SwTxtFrm::CalcFtnFlag()
if( !pHints )
return;
- const USHORT nSize = pHints->Count();
+ const sal_uInt16 nSize = pHints->Count();
#if OSL_DEBUG_LEVEL > 1
const xub_StrLen nEnd = nStop != STRING_LEN ? nStop
@@ -122,7 +122,7 @@ void SwTxtFrm::CalcFtnFlag()
const xub_StrLen nEnd = GetFollow() ? GetFollow()->GetOfst() : STRING_LEN;
#endif
- for ( USHORT i = 0; i < nSize; ++i )
+ for ( sal_uInt16 i = 0; i < nSize; ++i )
{
const SwTxtAttr *pHt = (*pHints)[i];
if ( pHt->Which() == RES_TXTATR_FTN )
@@ -223,7 +223,7 @@ SwTwips lcl_GetFtnLower( const SwTxtFrm* pFrm, SwTwips nLower )
OSL_ENSURE( pTabFrm && pRow &&
pRow->GetUpper()->IsTabFrm(), "Upper of row should be tab" );
- const BOOL bDontSplit = !pTabFrm->IsFollow() &&
+ const sal_Bool bDontSplit = !pTabFrm->IsFollow() &&
!pTabFrm->IsLayoutSplitAllowed();
SwTwips nMin = 0;
@@ -259,7 +259,7 @@ SwTwips lcl_GetFtnLower( const SwTxtFrm* pFrm, SwTwips nLower )
if ( pStartFrm->GetDrawObjs() )
{
const SwSortedObjs &rObjs = *pStartFrm->GetDrawObjs();
- for ( USHORT i = 0; i < rObjs.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
SwRect aRect( pAnchoredObj->GetObjRect() );
@@ -447,7 +447,7 @@ void SwTxtFrm::RemoveFtn( const xub_StrLen nStart, const xub_StrLen nLen )
return;
sal_Bool bRollBack = nLen != STRING_LEN;
- USHORT nSize = pHints->Count();
+ sal_uInt16 nSize = pHints->Count();
xub_StrLen nEnd;
SwTxtFrm* pSource;
if( bRollBack )
@@ -471,7 +471,7 @@ void SwTxtFrm::RemoveFtn( const xub_StrLen nStart, const xub_StrLen nLen )
SwFtnBossFrm *pEndBoss = 0;
sal_Bool bFtnEndDoc
= FTNPOS_CHAPTER == GetNode()->GetDoc()->GetFtnInfo().ePos;
- for ( USHORT i = nSize; i; )
+ for ( sal_uInt16 i = nSize; i; )
{
SwTxtAttr *pHt = pHints->GetTextHint(--i);
if ( RES_TXTATR_FTN != pHt->Which() )
@@ -1157,7 +1157,7 @@ xub_StrLen SwTxtFormatter::FormatQuoVadis( const xub_StrLen nOffset )
pQuo->SetAscent( rInf.GetAscent() );
pQuo->Height( rInf.GetTxtHeight() );
pQuo->Format( rInf );
- USHORT nQuoWidth = pQuo->Width();
+ sal_uInt16 nQuoWidth = pQuo->Width();
SwLinePortion* pCurrPor = pQuo;
while ( rInf.GetRest() )
@@ -1236,12 +1236,12 @@ xub_StrLen SwTxtFormatter::FormatQuoVadis( const xub_StrLen nOffset )
if( nDiff < 0 )
{
nLastLeft = pQuo->GetAscent();
- nQuoWidth = (USHORT)(-nDiff + nLastLeft);
+ nQuoWidth = (sal_uInt16)(-nDiff + nLastLeft);
}
else
{
nQuoWidth = 0;
- nLastLeft = USHORT(( pQuo->GetAscent() + nDiff ) / 2);
+ nLastLeft = sal_uInt16(( pQuo->GetAscent() + nDiff ) / 2);
}
break;
}
@@ -1328,7 +1328,7 @@ public:
SwFtnSave( const SwTxtSizeInfo &rInf,
const SwTxtFtn *pTxtFtn,
const bool bApplyGivenScriptType,
- const BYTE nGivenScriptType );
+ const sal_uInt8 nGivenScriptType );
~SwFtnSave();
};
@@ -1339,7 +1339,7 @@ public:
SwFtnSave::SwFtnSave( const SwTxtSizeInfo &rInf,
const SwTxtFtn* pTxtFtn,
const bool bApplyGivenScriptType,
- const BYTE nGivenScriptType )
+ const sal_uInt8 nGivenScriptType )
: pInf( &((SwTxtSizeInfo&)rInf) )
, pFnt( 0 )
, pOld( 0 )
@@ -1497,7 +1497,7 @@ SwPosSize SwFtnPortion::GetTxtSize( const SwTxtSizeInfo &rInfo ) const
}
// --> OD 2009-01-29 #i98418#
-void SwFtnPortion::SetPreferredScriptType( BYTE nPreferredScriptType )
+void SwFtnPortion::SetPreferredScriptType( sal_uInt8 nPreferredScriptType )
{
mbPreferredScriptTypeSet = true;
mnPreferredScriptType = nPreferredScriptType;
@@ -1537,7 +1537,7 @@ sal_Bool SwQuoVadisPortion::Format( SwTxtFormatInfo &rInf )
SetLen( 0 );
if( bFull )
// dritter Versuch, es langt: jetzt wird gestaucht:
- Width( USHORT(rInf.Width() - rInf.X()) );
+ Width( sal_uInt16(rInf.Width() - rInf.X()) );
// 8317: keine mehrzeiligen Felder bei QuoVadis und ErgoSum
if( rInf.GetRest() )
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index 6d8449f1caa4..d4edea3cc0e7 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -632,7 +632,7 @@ sal_Bool SwSoftHyphPortion::GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTx
void SwSoftHyphPortion::HandlePortion( SwPortionHandler& rPH ) const
{
const String aString( '-' );
- const USHORT nWhich = ! Width() ?
+ const sal_uInt16 nWhich = ! Width() ?
POR_SOFTHYPH_COMP :
GetWhichPor();
rPH.Special( GetLen(), aString, nWhich );
diff --git a/sw/source/core/text/txtio.cxx b/sw/source/core/text/txtio.cxx
index f5c8dda61cc4..b6cf8144cfa3 100644
--- a/sw/source/core/text/txtio.cxx
+++ b/sw/source/core/text/txtio.cxx
@@ -29,10 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-#if !defined(OSL_DEBUG_LEVEL) || OSL_DEBUG_LEVEL == 0
-#error Who broke the makefiles?
-#endif
+#if OSL_DEBUG_LEVEL > 1
#include "viewsh.hxx" // IsDbg()
#include "viewopt.hxx" // IsDbg()
@@ -723,7 +720,8 @@ SvStream &SwDropPortion::operator<<( SvStream &rOs ) const //$ ostream
return rOs;
}
-#endif /* OSL_DEBUG_LEVEL */
+#endif
+#endif /* OSL_DEBUG_LEVEL */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index 5ecca1819e13..d1091eaf9c86 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -74,7 +74,7 @@ const SvxTabStop *SwLineInfo::GetTabStop( const SwTwips nSearchPos,
* SwLineInfo::NumberOfTabStops()
*************************************************************************/
-USHORT SwLineInfo::NumberOfTabStops() const
+sal_uInt16 SwLineInfo::NumberOfTabStops() const
{
return pRuler->Count();
}
@@ -138,7 +138,12 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
nLinePos - nTabPos :
nLinePos + nTabPos;
- SwTwips nMyRight = Right();
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ SwTwips nMyRight;
+ if ( pFrm->IsVertLR() )
+ nMyRight = Left();
+ else
+ nMyRight = Right();
if ( pFrm->IsVertical() )
{
@@ -373,14 +378,14 @@ sal_Bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
OSL_ENSURE( rInf.X() <= GetTabPos(), "SwTabPortion::PreFormat: rush hour" );
// Hier lassen wir uns nieder...
- Fix( static_cast<USHORT>(rInf.X()) );
+ Fix( static_cast<sal_uInt16>(rInf.X()) );
const bool bTabCompat = rInf.GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TAB_COMPAT);
// Die Mindestbreite eines Tabs ist immer mindestens ein Blank
// --> FME 2004-11-25 #i37686# In compatibility mode, the minimum width
// should be 1, even for non-left tab stops.
- USHORT nMinimumTabWidth = 1;
+ sal_uInt16 nMinimumTabWidth = 1;
// <--
if ( !bTabCompat )
{
@@ -410,7 +415,7 @@ sal_Bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
rInf.Width() <= rInf.X() + PrtWidth();
// #95477# Rotated tab stops get the width of one blank
- const USHORT nDir = rInf.GetFont()->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
+ const sal_uInt16 nDir = rInf.GetFont()->GetOrientation( rInf.GetTxtFrm()->IsVertical() );
if( ! bFull && 0 == nDir )
{
@@ -429,7 +434,7 @@ sal_Bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
}
case POR_TABLEFT:
{
- PrtWidth( static_cast<USHORT>(GetTabPos() - rInf.X()) );
+ PrtWidth( static_cast<sal_uInt16>(GetTabPos() - rInf.X()) );
bFull = rInf.Width() <= rInf.X() + PrtWidth();
// In tabulator compatibility mode, we reset the bFull flag
@@ -456,7 +461,7 @@ sal_Bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
!rInf.GetFly() )
// <--
{
- PrtWidth( static_cast<USHORT>(rInf.Width() - rInf.X()) );
+ PrtWidth( static_cast<sal_uInt16>(rInf.Width() - rInf.X()) );
SetFixWidth( PrtWidth() );
}
else
diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx
index a44d5c35ad2a..55ec68509498 100644
--- a/sw/source/core/text/widorp.cxx
+++ b/sw/source/core/text/widorp.cxx
@@ -222,9 +222,17 @@ void SwTxtFrmBreak::SetRstHeight( const SwTxtMargin &rLine )
{
// OD, FME 2004-02-27 #106629# - consider bottom margin
SWRECTFN( pFrm )
+
nRstHeight = (pFrm->*fnRect->fnGetBottomMargin)();
+
if ( bVert )
- nRstHeight += nOrigin - pFrm->SwitchHorizontalToVertical( rLine.Y() );
+ //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
+ {
+ if ( pFrm->IsVertLR() )
+ nRstHeight = (*fnRect->fnYDiff)( pFrm->SwitchHorizontalToVertical( rLine.Y() ) , nOrigin );
+ else
+ nRstHeight += nOrigin - pFrm->SwitchHorizontalToVertical( rLine.Y() );
+ }
else
nRstHeight += rLine.Y() - nOrigin;
}
@@ -486,7 +494,7 @@ sal_Bool WidowsAndOrphans::FindWidows( SwTxtFrm *pFrame, SwTxtMargin &rLine )
// --> FME 2008-09-16 #i91421#
if ( !pMaster->GetIndPrev() )
{
- ULONG nLines = pMaster->GetThisLines();
+ sal_uLong nLines = pMaster->GetThisLines();
if(nLines == 0 && pMaster->HasPara())
{
const SwParaPortion *pMasterPara = pMaster->GetPara();
diff --git a/sw/source/core/text/wrong.cxx b/sw/source/core/text/wrong.cxx
index 0eb058c60356..873ab995b0af 100644
--- a/sw/source/core/text/wrong.cxx
+++ b/sw/source/core/text/wrong.cxx
@@ -471,7 +471,7 @@ void SwWrongList::JoinList( SwWrongList* pNext, xub_StrLen nInsertPos )
}
if( pNext )
{
- USHORT nCnt = Count();
+ sal_uInt16 nCnt = Count();
pNext->Move( 0, nInsertPos );
Insert(nCnt, pNext->maList.begin(), pNext->maList.end());
@@ -499,7 +499,7 @@ void SwWrongList::JoinList( SwWrongList* pNext, xub_StrLen nInsertPos )
}
-void SwWrongList::InsertSubList( xub_StrLen nNewPos, xub_StrLen nNewLen, USHORT nWhere, SwWrongList* pSubList )
+void SwWrongList::InsertSubList( xub_StrLen nNewPos, xub_StrLen nNewLen, sal_uInt16 nWhere, SwWrongList* pSubList )
{
if (pSubList)
{
@@ -515,7 +515,7 @@ void SwWrongList::InsertSubList( xub_StrLen nNewPos, xub_StrLen nNewLen, USHORT
// New functions: Necessary because SwWrongList has been changed to use std::vector
-void SwWrongList::Insert(USHORT nWhere, std::vector<SwWrongArea>::iterator startPos, std::vector<SwWrongArea>::iterator endPos)
+void SwWrongList::Insert(sal_uInt16 nWhere, std::vector<SwWrongArea>::iterator startPos, std::vector<SwWrongArea>::iterator endPos)
{
std::vector<SwWrongArea>::iterator i = maList.begin();
if ( nWhere >= maList.size() )
@@ -533,14 +533,14 @@ void SwWrongList::Insert(USHORT nWhere, std::vector<SwWrongArea>::iterator start
}
}
-void SwWrongList::Remove(USHORT nIdx, USHORT nLen )
+void SwWrongList::Remove(sal_uInt16 nIdx, sal_uInt16 nLen )
{
if ( nIdx >= maList.size() ) return;
std::vector<SwWrongArea>::iterator i1 = maList.begin();
i1 += nIdx;
std::vector<SwWrongArea>::iterator i2 = i1;
- if ( nIdx + nLen >= static_cast<USHORT>(maList.size()) )
+ if ( nIdx + nLen >= static_cast<sal_uInt16>(maList.size()) )
i2 = maList.end(); // robust
else
i2 += nLen;
@@ -566,8 +566,8 @@ void SwWrongList::Remove(USHORT nIdx, USHORT nLen )
}
void SwWrongList::RemoveEntry( xub_StrLen nBegin, xub_StrLen nEnd ) {
- USHORT nDelPos = 0;
- USHORT nDel = 0;
+ sal_uInt16 nDelPos = 0;
+ sal_uInt16 nDel = 0;
std::vector<SwWrongArea>::iterator aIter = maList.begin();
while( aIter != maList.end() && (*aIter).mnPos < nBegin )
{
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index a92bb46a4c99..3209fbadac52 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -33,15 +33,14 @@
#include "porlin.hxx"
#include "porlay.hxx"
#include "portxt.hxx"
+#include <libxml/xmlwriter.h>
#include <SwPortionHandler.hxx>
-
-
class XmlPortionDumper:public SwPortionHandler
{
private:
xmlTextWriterPtr writer;
- USHORT ofs;
+ sal_uInt16 ofs;
public:
XmlPortionDumper( xmlTextWriterPtr some_writer ):writer( some_writer ), ofs( 0 )
@@ -58,8 +57,8 @@ class XmlPortionDumper:public SwPortionHandler
@param rText
text which is painted on-screen
*/
- virtual void Text( USHORT nLength,
- USHORT nType )
+ virtual void Text( sal_uInt16 nLength,
+ sal_uInt16 nType )
{
ofs += nLength;
xmlTextWriterStartElement( writer, BAD_CAST( "Text" ) );
@@ -80,9 +79,9 @@ class XmlPortionDumper:public SwPortionHandler
@param nType
type of this portion
*/
- virtual void Special( USHORT nLength,
+ virtual void Special( sal_uInt16 nLength,
const String & rText,
- USHORT nType )
+ sal_uInt16 nType )
{
xmlTextWriterStartElement( writer, BAD_CAST( "Special" ) );
xmlTextWriterWriteFormatAttribute( writer,
@@ -111,7 +110,7 @@ class XmlPortionDumper:public SwPortionHandler
* @param nLength
* number of 'model string' characters to be skipped
*/
- virtual void Skip( USHORT nLength )
+ virtual void Skip( sal_uInt16 nLength )
{
xmlTextWriterStartElement( writer, BAD_CAST( "Skip" ) );
xmlTextWriterWriteFormatAttribute( writer,
@@ -129,6 +128,7 @@ class XmlPortionDumper:public SwPortionHandler
};
+#if OSL_DEBUG_LEVEL > 1
void SwTxtPortion::dumpPortionAsXml( xub_StrLen ofs, XubString & /*aText */,
xmlTextWriterPtr writer )
@@ -313,4 +313,6 @@ void SwTxtFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer )
xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%p", GetFollow() );
}
+#endif
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/tox/makefile.mk b/sw/source/core/tox/makefile.mk
deleted file mode 100644
index 3bbc9866b56e..000000000000
--- a/sw/source/core/tox/makefile.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=tox
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(mydebug)" != ""
-CDEFS+=-Dmydebug
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-EXCEPTIONSFILES= \
- $(SLO)$/tox.obj \
- $(SLO)$/toxhlp.obj \
- $(SLO)$/txmsrt.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index 8fc4cedd56bc..2ab959490252 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -64,16 +64,16 @@ const sal_Char* SwForm::aFormEntryTxt = "<ET>";
const sal_Char* SwForm::aFormChapterMark= "<C>";
const sal_Char* SwForm::aFormText = "<X>";
const sal_Char* SwForm::aFormAuth = "<A>";
-BYTE SwForm::nFormTabLen = 3;
-BYTE SwForm::nFormEntryLen = 3;
-BYTE SwForm::nFormPageNumsLen = 3;
-BYTE SwForm::nFormLinkSttLen = 4;
-BYTE SwForm::nFormLinkEndLen = 4;
-BYTE SwForm::nFormEntryNumLen = 4;
-BYTE SwForm::nFormEntryTxtLen = 4;
-BYTE SwForm::nFormChapterMarkLen = 3;
-BYTE SwForm::nFormTextLen = 3;
-BYTE SwForm::nFormAuthLen = 5;
+sal_uInt8 SwForm::nFormTabLen = 3;
+sal_uInt8 SwForm::nFormEntryLen = 3;
+sal_uInt8 SwForm::nFormPageNumsLen = 3;
+sal_uInt8 SwForm::nFormLinkSttLen = 4;
+sal_uInt8 SwForm::nFormLinkEndLen = 4;
+sal_uInt8 SwForm::nFormEntryNumLen = 4;
+sal_uInt8 SwForm::nFormEntryTxtLen = 4;
+sal_uInt8 SwForm::nFormChapterMarkLen = 3;
+sal_uInt8 SwForm::nFormTextLen = 3;
+sal_uInt8 SwForm::nFormAuthLen = 5;
SV_IMPL_PTRARR(SwTOXMarks, SwTOXMark*)
@@ -81,11 +81,11 @@ TYPEINIT2( SwTOXMark, SfxPoolItem, SwClient ); // fuers rtti
struct PatternIni
{
- USHORT n1;
- USHORT n2;
- USHORT n3;
- USHORT n4;
- USHORT n5;
+ sal_uInt16 n1;
+ sal_uInt16 n2;
+ sal_uInt16 n3;
+ sal_uInt16 n4;
+ sal_uInt16 n5;
};
const PatternIni aPatternIni[] =
{
@@ -123,13 +123,13 @@ const PatternIni aPatternIni[] =
};
// -> #i21237#
-SwFormTokens lcl_GetAuthPattern(USHORT nTypeId)
+SwFormTokens lcl_GetAuthPattern(sal_uInt16 nTypeId)
{
SwFormTokens aRet; // #i21237#
PatternIni aIni = aPatternIni[nTypeId];
- USHORT nVals[5];
+ sal_uInt16 nVals[5];
nVals[0] = aIni.n1;
nVals[1] = aIni.n2;
nVals[2] = aIni.n3;
@@ -145,7 +145,7 @@ SwFormTokens lcl_GetAuthPattern(USHORT nTypeId)
SwFormToken aTextToken( TOKEN_TEXT );
aTextToken.sText = String::CreateFromAscii( ", " );
- for(USHORT i = 0; i < 5 ; i++)
+ for(sal_uInt16 i = 0; i < 5 ; i++)
{
if(nVals[i] == USHRT_MAX)
break;
@@ -173,8 +173,8 @@ SwTOXMark::SwTOXMark()
, SwModify( 0 )
,
pTxtAttr( 0 ),
- bAutoGenerated(FALSE),
- bMainEntry(FALSE)
+ bAutoGenerated(sal_False),
+ bMainEntry(sal_False)
{
}
@@ -184,8 +184,8 @@ SwTOXMark::SwTOXMark( const SwTOXType* pTyp )
, SwModify( const_cast<SwTOXType*>(pTyp) )
,
pTxtAttr( 0 ), nLevel( 0 ),
- bAutoGenerated(FALSE),
- bMainEntry(FALSE)
+ bAutoGenerated(sal_False),
+ bMainEntry(sal_False)
{
}
@@ -285,18 +285,18 @@ SwTOXType::SwTOXType(const SwTOXType& rCopy)
SwForm::SwForm( TOXTypes eTyp ) // #i21237#
: eType( eTyp ), nFormMaxLevel( SwForm::GetFormMaxLevel( eTyp )),
// nFirstTabPos( lNumIndent ),
- bCommaSeparated(FALSE)
+ bCommaSeparated(sal_False)
{
//bHasFirstTabPos =
- bGenerateTabPos = FALSE;
- bIsRelTabPos = TRUE;
+ bGenerateTabPos = sal_False;
+ bIsRelTabPos = sal_True;
// Inhaltsverzeichnis hat entsprechend Anzahl Headlines + Ueberschrift
// Benutzer hat 10 Ebenen + Ueberschrift
// Stichwort hat 3 Ebenen + Ueberschrift + Trenner
// indexes of tables, objects illustrations and authorities consist of a heading and one level
- USHORT nPoolId;
+ sal_uInt16 nPoolId;
switch( eType )
{
case TOX_INDEX: nPoolId = STR_POOLCOLL_TOX_IDXH; break;
@@ -338,7 +338,7 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237#
if(TOX_INDEX == eType)
{
- for( USHORT i = 1; i < 5; ++i )
+ for( sal_uInt16 i = 1; i < 5; ++i )
{
if(1 == i)
{
@@ -357,7 +357,7 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237#
}
}
else
- for( USHORT i = 1; i < GetFormMax(); ++i, ++nPoolId ) // Nr 0 ist der Titel
+ for( sal_uInt16 i = 1; i < GetFormMax(); ++i, ++nPoolId ) // Nr 0 ist der Titel
{
if(TOX_AUTHORITIES == eType)
SetPattern(i, lcl_GetAuthPattern(i));
@@ -391,7 +391,7 @@ SwForm& SwForm::operator=(const SwForm& rForm)
bGenerateTabPos = rForm.bGenerateTabPos;
bIsRelTabPos = rForm.bIsRelTabPos;
bCommaSeparated = rForm.bCommaSeparated;
- for(USHORT i=0; i < nFormMaxLevel; ++i)
+ for(sal_uInt16 i=0; i < nFormMaxLevel; ++i)
{
aPattern[i] = rForm.aPattern[i];
aTemplate[i] = rForm.aTemplate[i];
@@ -399,9 +399,9 @@ SwForm& SwForm::operator=(const SwForm& rForm)
return *this;
}
-USHORT SwForm::GetFormMaxLevel( TOXTypes eTOXType )
+sal_uInt16 SwForm::GetFormMaxLevel( TOXTypes eTOXType )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
switch( eTOXType )
{
case TOX_INDEX: nRet = 5; break;
@@ -422,34 +422,34 @@ bool operator == (const SwFormToken & rToken, FormTokenType eType)
}
//-----------------------------------------------------------------------------
-void SwForm::AdjustTabStops(SwDoc& rDoc, BOOL bInsertNewTapStops) // #i21237#
+void SwForm::AdjustTabStops(SwDoc& rDoc, sal_Bool bInsertNewTapStops) // #i21237#
{
- for(USHORT nLevel = 1; nLevel < GetFormMax(); nLevel++)
+ for(sal_uInt16 nLevel = 1; nLevel < GetFormMax(); nLevel++)
{
const String& sTemplateName = GetTemplate(nLevel);
SwTxtFmtColl* pColl = rDoc.FindTxtFmtCollByName( sTemplateName );
if( !pColl )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName
( sTemplateName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL ); // #i21237#
if( USHRT_MAX != nId )
pColl = rDoc.GetTxtCollFromPool( nId );
}
const SvxTabStopItem* pTabStops = 0;
- USHORT nTabCount = 0;
+ sal_uInt16 nTabCount = 0;
if( pColl &&
- 0 != ( pTabStops = &pColl->GetTabStops(FALSE) ) &&
+ 0 != ( pTabStops = &pColl->GetTabStops(sal_False) ) &&
0 != ( nTabCount = pTabStops->Count() ) )
{
// #i21237#
SwFormTokens aCurrentPattern = GetPattern(nLevel);
SwFormTokens::iterator aIt = aCurrentPattern.begin();
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
- for(USHORT nTab = 0; nTab < nTabCount; ++nTab)
+ for(sal_uInt16 nTab = 0; nTab < nTabCount; ++nTab)
{
const SvxTabStop& rTab = (*pTabStops)[nTab];
@@ -460,9 +460,9 @@ void SwForm::AdjustTabStops(SwDoc& rDoc, BOOL bInsertNewTapStops) // #i21237#
{
if ( SVX_TAB_ADJUST_DEFAULT != rTab.GetAdjustment() )
{
- bChanged = TRUE;
+ bChanged = sal_True;
SwFormToken aToken(TOKEN_TAB_STOP);
- aToken.bWithTab = FALSE;
+ aToken.bWithTab = sal_False;
aToken.nTabStopPosition = rTab.GetTabPos();
aToken.eTabAlign = rTab.GetAdjustment();
aToken.cTabFillChar = rTab.GetFill();
@@ -477,7 +477,7 @@ void SwForm::AdjustTabStops(SwDoc& rDoc, BOOL bInsertNewTapStops) // #i21237#
(TOKEN_TAB_STOP));
if ( aIt != aCurrentPattern.end() )
{
- bChanged = TRUE;
+ bChanged = sal_True;
aIt->nTabStopPosition = rTab.GetTabPos();
aIt->eTabAlign = nTab == nTabCount - 1 &&
SVX_TAB_ADJUST_RIGHT == rTab.GetAdjustment() ?
@@ -503,7 +503,7 @@ void SwForm::AdjustTabStops(SwDoc& rDoc, BOOL bInsertNewTapStops) // #i21237#
SwTOXBase::SwTOXBase(const SwTOXType* pTyp, const SwForm& rForm,
- USHORT nCreaType, const String& rTitle )
+ sal_uInt16 nCreaType, const String& rTitle )
: SwClient((SwModify*)pTyp),
aForm(rForm),
aTitle(rTitle),
@@ -511,10 +511,10 @@ SwTOXBase::SwTOXBase(const SwTOXType* pTyp, const SwForm& rForm,
nCreateType(nCreaType),
nOLEOptions(0),
eCaptionDisplay(CAPTION_COMPLETE),
- bProtected( TRUE ),
- bFromChapter(FALSE),
- bFromObjectNames(FALSE),
- bLevelFromChapter(FALSE)
+ bProtected( sal_True ),
+ bFromChapter(sal_False),
+ bFromObjectNames(sal_False),
+ bLevelFromChapter(sal_False)
{
aData.nOptions = 0;
}
@@ -533,15 +533,15 @@ SwTOXBase& SwTOXBase::CopyTOXBase( SwDoc* pDoc, const SwTOXBase& rSource )
{
// type not in pDoc, so create it now
const SwTOXTypes& rTypes = pDoc->GetTOXTypes();
- BOOL bFound = FALSE;
- for( USHORT n = rTypes.Count(); n; )
+ sal_Bool bFound = sal_False;
+ for( sal_uInt16 n = rTypes.Count(); n; )
{
const SwTOXType* pCmp = rTypes[ --n ];
if( pCmp->GetType() == pType->GetType() &&
pCmp->GetTypeName() == pType->GetTypeName() )
{
pType = (SwTOXType*)pCmp;
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -564,7 +564,7 @@ SwTOXBase& SwTOXBase::CopyTOXBase( SwDoc* pDoc, const SwTOXBase& rSource )
eLanguage = rSource.eLanguage;
sSortAlgorithm = rSource.sSortAlgorithm;
- for( USHORT i = 0; i < MAXLEVEL; ++i )
+ for( sal_uInt16 i = 0; i < MAXLEVEL; ++i )
aStyleNames[i] = rSource.aStyleNames[i];
// its the same data type!
@@ -601,7 +601,7 @@ SwTOXBase & SwTOXBase::operator = (const SwTOXBase & rSource)
aName = rSource.aName;
aTitle = rSource.aTitle;
sMainEntryCharStyle = rSource.sMainEntryCharStyle;
- for(USHORT nLevel = 0; nLevel < MAXLEVEL; nLevel++)
+ for(sal_uInt16 nLevel = 0; nLevel < MAXLEVEL; nLevel++)
aStyleNames[nLevel] = rSource.aStyleNames[nLevel];
sSequenceName = rSource.sSequenceName;
eLanguage = rSource.eLanguage;
@@ -625,7 +625,7 @@ String SwFormToken::GetString() const
{
String sRet;
- BOOL bAppend = TRUE;
+ sal_Bool bAppend = sal_True;
switch( eTokenType )
{
case TOKEN_ENTRY_NO:
@@ -704,7 +704,7 @@ String SwFormToken::GetString() const
sRet += TOX_STYLE_DELIMITER;
}
else
- bAppend = FALSE;
+ bAppend = sal_False;
}
else if(TOKEN_ENTRY_NO == eTokenType)
{
@@ -761,16 +761,16 @@ SwFormToken SwFormTokensHelper::BuildToken( const String & sPattern,
eRet.sCharStyleName = sToken.GetToken( 0, ',');
String sTmp( sToken.GetToken( 1, ',' ));
if( sTmp.Len() )
- eRet.nPoolId = static_cast<USHORT>(sTmp.ToInt32());
+ eRet.nPoolId = static_cast<sal_uInt16>(sTmp.ToInt32());
switch( eTokenType )
{
//i53420
case TOKEN_ENTRY_NO:
if( (sTmp = sToken.GetToken( 2, ',' ) ).Len() )
- eRet.nChapterFormat = static_cast<USHORT>(sTmp.ToInt32());
+ eRet.nChapterFormat = static_cast<sal_uInt16>(sTmp.ToInt32());
if( (sTmp = sToken.GetToken( 3, ',' ) ).Len() )
- eRet.nOutlineLevel = static_cast<USHORT>(sTmp.ToInt32()); //the maximum outline level to examine
+ eRet.nOutlineLevel = static_cast<sal_uInt16>(sTmp.ToInt32()); //the maximum outline level to examine
break;
case TOKEN_TEXT:
@@ -805,15 +805,15 @@ SwFormToken SwFormTokensHelper::BuildToken( const String & sPattern,
case TOKEN_CHAPTER_INFO:
if( (sTmp = sToken.GetToken( 2, ',' ) ).Len() )
- eRet.nChapterFormat = static_cast<USHORT>(sTmp.ToInt32()); //SwChapterFormat;
+ eRet.nChapterFormat = static_cast<sal_uInt16>(sTmp.ToInt32()); //SwChapterFormat;
//i53420
if( (sTmp = sToken.GetToken( 3, ',' ) ).Len() )
- eRet.nOutlineLevel = static_cast<USHORT>(sTmp.ToInt32()); //the maximum outline level to examine
+ eRet.nOutlineLevel = static_cast<sal_uInt16>(sTmp.ToInt32()); //the maximum outline level to examine
break;
case TOKEN_AUTHORITY:
- eRet.nAuthorityField = static_cast<USHORT>(sAuthFieldEnum.ToInt32());
+ eRet.nAuthorityField = static_cast<sal_uInt16>(sAuthFieldEnum.ToInt32());
break;
default: break;
}
@@ -824,7 +824,7 @@ String SwFormTokensHelper::SearchNextToken( const String & sPattern,
xub_StrLen nStt ) const
{
//it's not so easy - it doesn't work if the text part contains a '>'
- //USHORT nTokenEnd = sPattern.Search('>');
+ //sal_uInt16 nTokenEnd = sPattern.Search('>');
String aResult;
@@ -859,8 +859,8 @@ FormTokenType SwFormTokensHelper::GetTokenType(const String & sToken,
static struct
{
const sal_Char* pNm;
- USHORT nLen;
- USHORT nOffset;
+ sal_uInt16 nLen;
+ sal_uInt16 nOffset;
FormTokenType eToken;
} const aTokenArr[] = {
{ SwForm::aFormTab, SwForm::nFormEntryLen, 1, TOKEN_TAB_STOP },
@@ -897,13 +897,13 @@ FormTokenType SwFormTokensHelper::GetTokenType(const String & sToken,
// <- #i21237#
-void SwForm::SetPattern(USHORT nLevel, const SwFormTokens& rTokens)
+void SwForm::SetPattern(sal_uInt16 nLevel, const SwFormTokens& rTokens)
{
OSL_ENSURE(nLevel < GetFormMax(), "Index >= FORM_MAX");
aPattern[nLevel] = rTokens;
}
-void SwForm::SetPattern(USHORT nLevel, const String & rStr)
+void SwForm::SetPattern(sal_uInt16 nLevel, const String & rStr)
{
OSL_ENSURE(nLevel < GetFormMax(), "Index >= FORM_MAX");
@@ -911,7 +911,7 @@ void SwForm::SetPattern(USHORT nLevel, const String & rStr)
aPattern[nLevel] = aHelper.GetTokens();
}
-const SwFormTokens& SwForm::GetPattern(USHORT nLevel) const
+const SwFormTokens& SwForm::GetPattern(sal_uInt16 nLevel) const
{
OSL_ENSURE(nLevel < GetFormMax(), "Index >= FORM_MAX");
return aPattern[nLevel];
diff --git a/sw/source/core/tox/toxhlp.cxx b/sw/source/core/tox/toxhlp.cxx
index fb9b97a265b4..02364b36cf8a 100644
--- a/sw/source/core/tox/toxhlp.cxx
+++ b/sw/source/core/tox/toxhlp.cxx
@@ -98,7 +98,7 @@ String IndexEntrySupplierWrapper::GetIndexKey( const String& rTxt,
return sRet;
}
-String IndexEntrySupplierWrapper::GetFollowingText( BOOL bMorePages ) const
+String IndexEntrySupplierWrapper::GetFollowingText( sal_Bool bMorePages ) const
{
String sRet;
try {
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index acc0700374de..7ca2ae0adbc0 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -54,7 +54,7 @@
#include <comcore.hrc>
#include <numrule.hxx>
-extern BOOL IsFrameBehind( const SwTxtNode& rMyNd, xub_StrLen nMySttPos,
+extern sal_Bool IsFrameBehind( const SwTxtNode& rMyNd, xub_StrLen nMySttPos,
const SwTxtNode& rBehindNd, xub_StrLen nSttPos );
using namespace ::com::sun::star;
@@ -64,12 +64,12 @@ using ::rtl::OUString;
Beschreibung: Strings initialisieren
--------------------------------------------------------------------*/
-USHORT SwTOXSortTabBase::nOpt = 0;
+sal_uInt16 SwTOXSortTabBase::nOpt = 0;
SV_IMPL_VARARR( SwTOXSources, SwTOXSource )
-SwTOXInternational::SwTOXInternational( LanguageType nLang, USHORT nOpt,
+SwTOXInternational::SwTOXInternational( LanguageType nLang, sal_uInt16 nOpt,
const String& rSortAlgorithm ) :
eLang( nLang ),
sSortAlgorithm(rSortAlgorithm),
@@ -119,7 +119,7 @@ String SwTOXInternational::ToUpper( const String& rStr, xub_StrLen nPos ) const
{
return pCharClass->toUpper( rStr, nPos, 1 );
}
-inline BOOL SwTOXInternational::IsNumeric( const String& rStr ) const
+inline sal_Bool SwTOXInternational::IsNumeric( const String& rStr ) const
{
return pCharClass->isNumeric( rStr );
}
@@ -139,7 +139,7 @@ String SwTOXInternational::GetIndexKey( const String& rTxt, const String& rTxtRe
return pIndexWrapper->GetIndexKey( rTxt, rTxtReading, rLocale );
}
-String SwTOXInternational::GetFollowingText( BOOL bMorePages ) const
+String SwTOXInternational::GetFollowingText( sal_Bool bMorePages ) const
{
return pIndexWrapper->GetFollowingText( bMorePages );
}
@@ -154,7 +154,7 @@ SwTOXSortTabBase::SwTOXSortTabBase( TOXSortType nTyp, const SwCntntNode* pNd,
const SwTOXInternational* pInter,
const lang::Locale* pLocale )
: pTOXNd( 0 ), pTxtMark( pMark ), pTOXIntl( pInter ),
- nPos( 0 ), nCntPos( 0 ), nType( static_cast<USHORT>(nTyp) ), bValidTxt( FALSE )
+ nPos( 0 ), nCntPos( 0 ), nType( static_cast<sal_uInt16>(nTyp) ), bValidTxt( sal_False )
{
if ( pLocale )
aLocale = *pLocale;
@@ -165,7 +165,7 @@ SwTOXSortTabBase::SwTOXSortTabBase( TOXSortType nTyp, const SwCntntNode* pNd,
if( pTxtMark )
n = *pTxtMark->GetStart();
SwTOXSource aTmp( pNd, n,
- pTxtMark ? pTxtMark->GetTOXMark().IsMainEntry() : FALSE );
+ pTxtMark ? pTxtMark->GetTOXMark().IsMainEntry() : sal_False );
aTOXSources.Insert( aTmp, aTOXSources.Count() );
nPos = pNd->GetIndex();
@@ -181,7 +181,7 @@ SwTOXSortTabBase::SwTOXSortTabBase( TOXSortType nTyp, const SwCntntNode* pNd,
{
// dann die "Anker" (Body) Position holen.
Point aPt;
- const SwCntntFrm* pFrm = pNd->GetFrm( &aPt, 0, FALSE );
+ const SwCntntFrm* pFrm = pNd->GetFrm( &aPt, 0, sal_False );
if( pFrm )
{
SwPosition aPos( *pNd );
@@ -211,7 +211,7 @@ String SwTOXSortTabBase::GetURL() const
}
void SwTOXSortTabBase::FillText( SwTxtNode& rNd, const SwIndex& rInsPos,
- USHORT ) const
+ sal_uInt16 ) const
{
String sMyTxt;
String sMyTxtReading;
@@ -221,9 +221,9 @@ void SwTOXSortTabBase::FillText( SwTxtNode& rNd, const SwIndex& rInsPos,
rNd.InsertText( sMyTxt, rInsPos );
}
-BOOL SwTOXSortTabBase::operator==( const SwTOXSortTabBase& rCmp )
+sal_Bool SwTOXSortTabBase::operator==( const SwTOXSortTabBase& rCmp )
{
- BOOL bRet = nPos == rCmp.nPos && nCntPos == rCmp.nCntPos &&
+ sal_Bool bRet = nPos == rCmp.nPos && nCntPos == rCmp.nCntPos &&
(!aTOXSources[0].pNd || !rCmp.aTOXSources[0].pNd ||
aTOXSources[0].pNd == rCmp.aTOXSources[0].pNd );
@@ -255,15 +255,15 @@ BOOL SwTOXSortTabBase::operator==( const SwTOXSortTabBase& rCmp )
return bRet;
}
-BOOL SwTOXSortTabBase::operator<( const SwTOXSortTabBase& rCmp )
+sal_Bool SwTOXSortTabBase::operator<( const SwTOXSortTabBase& rCmp )
{
if( nPos < rCmp.nPos )
- return TRUE;
+ return sal_True;
if( nPos == rCmp.nPos )
{
if( nCntPos < rCmp.nCntPos )
- return TRUE;
+ return sal_True;
if( nCntPos == rCmp.nCntPos )
{
@@ -275,7 +275,7 @@ BOOL SwTOXSortTabBase::operator<( const SwTOXSortTabBase& rCmp )
if( TOX_SORT_CONTENT == nType && pTxtMark && rCmp.pTxtMark )
{
if( *pTxtMark->GetStart() < *rCmp.pTxtMark->GetStart() )
- return TRUE;
+ return sal_True;
if( *pTxtMark->GetStart() == *rCmp.pTxtMark->GetStart() )
{
@@ -297,7 +297,7 @@ BOOL SwTOXSortTabBase::operator<( const SwTOXSortTabBase& rCmp )
sOtherTxt, sOtherTxtReading, rCmp.GetLocale() );
if( pEnd && !pEndCmp )
- return TRUE;
+ return sal_True;
}
}
}
@@ -307,7 +307,7 @@ BOOL SwTOXSortTabBase::operator<( const SwTOXSortTabBase& rCmp )
*(SwTxtNode*)pFirst, nCntPos );
}
}
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -316,8 +316,8 @@ BOOL SwTOXSortTabBase::operator<( const SwTOXSortTabBase& rCmp )
SwTOXIndex::SwTOXIndex( const SwTxtNode& rNd,
- const SwTxtTOXMark* pMark, USHORT nOptions,
- BYTE nKyLevel,
+ const SwTxtTOXMark* pMark, sal_uInt16 nOptions,
+ sal_uInt8 nKyLevel,
const SwTOXInternational& rIntl,
const lang::Locale& rLocale )
: SwTOXSortTabBase( TOX_SORT_INDEX, &rNd, pMark, &rIntl, &rLocale ),
@@ -332,13 +332,13 @@ SwTOXIndex::SwTOXIndex( const SwTxtNode& rNd,
//
-BOOL SwTOXIndex::operator==( const SwTOXSortTabBase& rCmpBase )
+sal_Bool SwTOXIndex::operator==( const SwTOXSortTabBase& rCmpBase )
{
SwTOXIndex& rCmp = (SwTOXIndex&)rCmpBase;
// In Abhaengigkeit von den Optionen Grosskleinschreibung beachten
if(GetLevel() != rCmp.GetLevel() || nKeyLevel != rCmp.nKeyLevel)
- return FALSE;
+ return sal_False;
OSL_ENSURE(pTxtMark, "pTxtMark == 0, Kein Stichwort");
@@ -350,7 +350,7 @@ BOOL SwTOXIndex::operator==( const SwTOXSortTabBase& rCmpBase )
String sOtherTxtReading;
rCmp.GetTxt( sOtherTxt, sOtherTxtReading );
- BOOL bRet = pTOXIntl->IsEqual( sMyTxt, sMyTxtReading, GetLocale(),
+ sal_Bool bRet = pTOXIntl->IsEqual( sMyTxt, sMyTxtReading, GetLocale(),
sOtherTxt, sOtherTxtReading, rCmp.GetLocale() );
// Wenn nicht zusammengefasst wird muss die Pos aus gewertet werden
@@ -363,7 +363,7 @@ BOOL SwTOXIndex::operator==( const SwTOXSortTabBase& rCmpBase )
//
// kleiner haengt nur vom Text ab
-BOOL SwTOXIndex::operator<( const SwTOXSortTabBase& rCmpBase )
+sal_Bool SwTOXIndex::operator<( const SwTOXSortTabBase& rCmpBase )
{
SwTOXIndex& rCmp = (SwTOXIndex&)rCmpBase;
@@ -377,7 +377,7 @@ BOOL SwTOXIndex::operator<( const SwTOXSortTabBase& rCmpBase )
String sOtherTxtReading;
rCmp.GetTxt( sOtherTxt, sOtherTxtReading );
- BOOL bRet = GetLevel() == rCmp.GetLevel() &&
+ sal_Bool bRet = GetLevel() == rCmp.GetLevel() &&
pTOXIntl->IsLess( sMyTxt, sMyTxtReading, GetLocale(),
sOtherTxt, sOtherTxtReading, rCmp.GetLocale() );
@@ -395,7 +395,7 @@ BOOL SwTOXIndex::operator<( const SwTOXSortTabBase& rCmpBase )
//
// Das Stichwort selbst
-void SwTOXIndex::_GetText( String& rTxt, String& rTxtReading )
+void SwTOXIndex::GetText_Impl( String& rTxt, String& rTxtReading ) const
{
OSL_ENSURE(pTxtMark, "pTxtMark == 0, Kein Stichwort");
const SwTOXMark& rTOXMark = pTxtMark->GetTOXMark();
@@ -428,7 +428,7 @@ void SwTOXIndex::_GetText( String& rTxt, String& rTxtReading )
}
}
-void SwTOXIndex::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT ) const
+void SwTOXIndex::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 ) const
{
const xub_StrLen* pEnd = pTxtMark->GetEnd();
String sTmp;
@@ -453,11 +453,11 @@ void SwTOXIndex::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT ) cons
-USHORT SwTOXIndex::GetLevel() const
+sal_uInt16 SwTOXIndex::GetLevel() const
{
OSL_ENSURE(pTxtMark, "pTxtMark == 0, Kein Stichwort");
- USHORT nForm = FORM_PRIMARY_KEY;
+ sal_uInt16 nForm = FORM_PRIMARY_KEY;
if( 0 == (GetOptions() & nsSwTOIOptions::TOI_KEY_AS_ENTRY)&&
pTxtMark->GetTOXMark().GetPrimaryKey().Len() )
@@ -475,7 +475,7 @@ USHORT SwTOXIndex::GetLevel() const
SwTOXCustom::SwTOXCustom(const String& rStr, const String& rReading,
- USHORT nLevel,
+ sal_uInt16 nLevel,
const SwTOXInternational& rIntl,
const lang::Locale& rLocale )
: SwTOXSortTabBase( TOX_SORT_CUSTOM, 0, 0, &rIntl, &rLocale ),
@@ -484,7 +484,7 @@ SwTOXCustom::SwTOXCustom(const String& rStr, const String& rReading,
}
-BOOL SwTOXCustom::operator==(const SwTOXSortTabBase& rCmpBase)
+sal_Bool SwTOXCustom::operator==(const SwTOXSortTabBase& rCmpBase)
{
String sMyTxt;
String sMyTxtReading;
@@ -500,7 +500,7 @@ BOOL SwTOXCustom::operator==(const SwTOXSortTabBase& rCmpBase)
}
-BOOL SwTOXCustom::operator < (const SwTOXSortTabBase& rCmpBase)
+sal_Bool SwTOXCustom::operator < (const SwTOXSortTabBase& rCmpBase)
{
String sMyTxt;
String sMyTxtReading;
@@ -516,13 +516,13 @@ BOOL SwTOXCustom::operator < (const SwTOXSortTabBase& rCmpBase)
}
-USHORT SwTOXCustom::GetLevel() const
+sal_uInt16 SwTOXCustom::GetLevel() const
{
return nLev;
}
-void SwTOXCustom::_GetText( String& rTxt, String &rTxtReading )
+void SwTOXCustom::GetText_Impl( String& rTxt, String &rTxtReading ) const
{
rTxt = aKey;
rTxtReading = sReading;
@@ -544,7 +544,7 @@ SwTOXContent::SwTOXContent( const SwTxtNode& rNd, const SwTxtTOXMark* pMark,
// Der Text des Inhalts
//
-void SwTOXContent::_GetText( String& rTxt, String& rTxtReading )
+void SwTOXContent::GetText_Impl( String& rTxt, String& rTxtReading ) const
{
const xub_StrLen* pEnd = pTxtMark->GetEnd();
if( pEnd && !pTxtMark->GetTOXMark().IsAlternativeText() )
@@ -559,7 +559,7 @@ void SwTOXContent::_GetText( String& rTxt, String& rTxtReading )
rTxt = pTxtMark->GetTOXMark().GetAlternativeText();
}
-void SwTOXContent::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT ) const
+void SwTOXContent::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 ) const
{
const xub_StrLen* pEnd = pTxtMark->GetEnd();
if( pEnd && !pTxtMark->GetTOXMark().IsAlternativeText() )
@@ -579,7 +579,7 @@ void SwTOXContent::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT ) co
//
-USHORT SwTOXContent::GetLevel() const
+sal_uInt16 SwTOXContent::GetLevel() const
{
return pTxtMark->GetTOXMark().GetLevel();
}
@@ -593,7 +593,7 @@ USHORT SwTOXContent::GetLevel() const
// sondern muss die vom "Henkel" sein !!
-SwTOXPara::SwTOXPara( const SwCntntNode& rNd, SwTOXElement eT, USHORT nLevel )
+SwTOXPara::SwTOXPara( const SwCntntNode& rNd, SwTOXElement eT, sal_uInt16 nLevel )
: SwTOXSortTabBase( TOX_SORT_PARA, &rNd, 0, 0 ),
eType( eT ),
m_nLevel(nLevel),
@@ -603,7 +603,7 @@ SwTOXPara::SwTOXPara( const SwCntntNode& rNd, SwTOXElement eT, USHORT nLevel )
}
-void SwTOXPara::_GetText( String& rTxt, String& )
+void SwTOXPara::GetText_Impl( String& rTxt, String& ) const
{
const SwCntntNode* pNd = aTOXSources[0].pNd;
switch( eType )
@@ -630,7 +630,7 @@ void SwTOXPara::_GetText( String& rTxt, String& )
else
{
OSL_ENSURE( !this, "Grafik/Object ohne Namen" );
- USHORT nId = nsSwTOXElement::TOX_OLE == eType
+ sal_uInt16 nId = nsSwTOXElement::TOX_OLE == eType
? STR_OBJECT_DEFNAME
: nsSwTOXElement::TOX_GRAPHIC == eType
? STR_GRAPHIC_DEFNAME
@@ -643,7 +643,7 @@ void SwTOXPara::_GetText( String& rTxt, String& )
}
}
-void SwTOXPara::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT ) const
+void SwTOXPara::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 ) const
{
if( nsSwTOXElement::TOX_TEMPLATE == eType || nsSwTOXElement::TOX_SEQUENCE == eType || nsSwTOXElement::TOX_OUTLINELEVEL == eType)
{
@@ -651,7 +651,7 @@ void SwTOXPara::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT ) const
xub_StrLen nStt = nStartIndex;
pSrc->GetExpandTxt( rNd, &rInsPos, nStt,
nEndIndex == STRING_LEN ? STRING_LEN : nEndIndex - nStt,
- FALSE, FALSE, TRUE );
+ sal_False, sal_False, sal_True );
}
else
{
@@ -663,16 +663,16 @@ void SwTOXPara::FillText( SwTxtNode& rNd, const SwIndex& rInsPos, USHORT ) const
}
-USHORT SwTOXPara::GetLevel() const
+sal_uInt16 SwTOXPara::GetLevel() const
{
- USHORT nRet = m_nLevel;
+ sal_uInt16 nRet = m_nLevel;
const SwCntntNode* pNd = aTOXSources[0].pNd;
if( nsSwTOXElement::TOX_OUTLINELEVEL == eType && pNd->GetTxtNode() )
{
const int nTmp = ((SwTxtNode*)pNd)->GetAttrOutlineLevel();//#outline level,zhaojianwei????
if(nTmp != 0 )
- nRet = static_cast<USHORT>(nTmp);
+ nRet = static_cast<sal_uInt16>(nTmp);
}
return nRet;
}
@@ -739,7 +739,7 @@ SwTOXTable::SwTOXTable( const SwCntntNode& rNd )
}
-void SwTOXTable::_GetText( String& rTxt, String& )
+void SwTOXTable::GetText_Impl( String& rTxt, String& ) const
{
const SwNode* pNd = aTOXSources[0].pNd;
if( pNd && 0 != ( pNd = pNd->FindTableNode() ) )
@@ -753,7 +753,7 @@ void SwTOXTable::_GetText( String& rTxt, String& )
}
}
-USHORT SwTOXTable::GetLevel() const
+sal_uInt16 SwTOXTable::GetLevel() const
{
return nLevel;
}
@@ -784,15 +784,15 @@ SwTOXAuthority::SwTOXAuthority( const SwCntntNode& rNd,
nCntPos = *rField.GetTxtFld()->GetStart();
}
-USHORT SwTOXAuthority::GetLevel() const
+sal_uInt16 SwTOXAuthority::GetLevel() const
{
String sText(((SwAuthorityField*)m_rField.GetFld())->
GetFieldText(AUTH_FIELD_AUTHORITY_TYPE));
//#i18655# the level '0' is the heading level therefor the values are incremented here
- USHORT nRet = 1;
+ sal_uInt16 nRet = 1;
if( pTOXIntl->IsNumeric( sText ) )
{
- nRet = (USHORT)sText.ToInt32();
+ nRet = (sal_uInt16)sText.ToInt32();
nRet++;
}
//illegal values are also set to 'ARTICLE' as non-numeric values are
@@ -801,21 +801,24 @@ USHORT SwTOXAuthority::GetLevel() const
return nRet;
}
-void SwTOXAuthority::_GetText( String& rTxt, String& )
+static String lcl_GetText(SwFmtFld const& rField)
{
- bool const isClipBoard(
- m_rField.GetTxtFld()->GetTxtNode().GetDoc()->IsClipBoard());
- rTxt = m_rField.GetFld()->ExpandField(isClipBoard);
+ return rField.GetFld()->ExpandField(true);
+}
+
+void SwTOXAuthority::GetText_Impl( String& rTxt, String& ) const
+{
+ rTxt = lcl_GetText(m_rField);
}
void SwTOXAuthority::FillText( SwTxtNode& rNd,
- const SwIndex& rInsPos, USHORT nAuthField ) const
+ const SwIndex& rInsPos, sal_uInt16 nAuthField ) const
{
SwAuthorityField* pField = (SwAuthorityField*)m_rField.GetFld();
String sText;
if(AUTH_FIELD_IDENTIFIER == nAuthField)
{
- sText = pField->Expand();
+ sText = lcl_GetText(m_rField);
const SwAuthorityFieldType* pType = (const SwAuthorityFieldType*)pField->GetTyp();
sal_Unicode cChar = pType->GetPrefix();
if(cChar && cChar != ' ')
@@ -826,7 +829,7 @@ void SwTOXAuthority::FillText( SwTxtNode& rNd,
}
else if(AUTH_FIELD_AUTHORITY_TYPE == nAuthField)
{
- USHORT nLevel = GetLevel();
+ sal_uInt16 nLevel = GetLevel();
if(nLevel)
sText = SwAuthorityFieldType::GetAuthTypeName((ToxAuthorityType) --nLevel);
}
@@ -835,16 +838,16 @@ void SwTOXAuthority::FillText( SwTxtNode& rNd,
rNd.InsertText( sText, rInsPos );
}
-BOOL SwTOXAuthority::operator==( const SwTOXSortTabBase& rCmp)
+sal_Bool SwTOXAuthority::operator==( const SwTOXSortTabBase& rCmp)
{
return nType == rCmp.nType &&
((SwAuthorityField*)m_rField.GetFld())->GetHandle() ==
((SwAuthorityField*)((SwTOXAuthority&)rCmp).m_rField.GetFld())->GetHandle();
}
-BOOL SwTOXAuthority::operator<( const SwTOXSortTabBase& rBase)
+sal_Bool SwTOXAuthority::operator<( const SwTOXSortTabBase& rBase)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwAuthorityField* pField = (SwAuthorityField*)m_rField.GetFld();
SwAuthorityFieldType* pType = (SwAuthorityFieldType*)
pField->GetTyp();
@@ -856,7 +859,7 @@ BOOL SwTOXAuthority::operator<( const SwTOXSortTabBase& rBase)
((SwTOXAuthority&)rBase).m_rField.GetFld();
- for(USHORT i = 0; i < pType->GetSortKeyCount(); i++)
+ for(sal_uInt16 i = 0; i < pType->GetSortKeyCount(); i++)
{
const SwTOXSortKey* pKey = pType->GetSortKey(i);
String sMyTxt = pField->GetFieldText(pKey->eField);
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index 78f6c352d606..20d739bfc8b3 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -102,7 +102,7 @@ SwFmtFld::~SwFmtFld()
// bei einige FeldTypen muessen wir den FeldTypen noch loeschen
if( pType && pType->IsLastDepend() )
{
- BOOL bDel = FALSE;
+ sal_Bool bDel = sal_False;
switch( pType->Which() )
{
case RES_USERFLD:
@@ -223,27 +223,27 @@ void SwFmtFld::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
pTxtAttr->Expand();
}
-BOOL SwFmtFld::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwFmtFld::GetInfo( SfxPoolItem& rInfo ) const
{
const SwTxtNode* pTxtNd;
if( RES_AUTOFMT_DOCNODE != rInfo.Which() ||
!pTxtAttr || 0 == ( pTxtNd = pTxtAttr->GetpTxtNode() ) ||
&pTxtNd->GetNodes() != ((SwAutoFmtGetDocNode&)rInfo).pNodes )
- return TRUE;
+ return sal_True;
((SwAutoFmtGetDocNode&)rInfo).pCntntNode = pTxtNd;
- return FALSE;
+ return sal_False;
}
-BOOL SwFmtFld::IsFldInDoc() const
+sal_Bool SwFmtFld::IsFldInDoc() const
{
const SwTxtNode* pTxtNd;
return pTxtAttr && 0 != ( pTxtNd = pTxtAttr->GetpTxtNode() ) &&
pTxtNd->GetNodes().IsDocNodes();
}
-BOOL SwFmtFld::IsProtect() const
+sal_Bool SwFmtFld::IsProtect() const
{
const SwTxtNode* pTxtNd;
return pTxtAttr && 0 != ( pTxtNd = pTxtAttr->GetpTxtNode() ) &&
@@ -258,10 +258,9 @@ BOOL SwFmtFld::IsProtect() const
|*
*************************************************************************/
-SwTxtFld::SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStartPos,
- bool const bInClipboard)
+SwTxtFld::SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStartPos)
: SwTxtAttr( rAttr, nStartPos )
- , m_aExpand( rAttr.GetFld()->ExpandField(bInClipboard) )
+ , m_aExpand( rAttr.GetFld()->ExpandField(true) )
, m_pTxtNode( 0 )
{
rAttr.pTxtAttr = this;
@@ -297,7 +296,7 @@ void SwTxtFld::Expand() const
if( aNewExpand == m_aExpand )
{
// Bei Seitennummernfeldern
- const USHORT nWhich = pFld->GetTyp()->Which();
+ const sal_uInt16 nWhich = pFld->GetTyp()->Which();
if( RES_CHAPTERFLD != nWhich && RES_PAGENUMBERFLD != nWhich &&
RES_REFPAGEGETFLD != nWhich &&
// --> FME 2005-05-23 #122919# Page count fields to not use aExpand
@@ -337,7 +336,7 @@ void SwTxtFld::CopyFld( SwTxtFld *pDest ) const
IDocumentFieldsAccess* pDestIDFA = pDest->m_pTxtNode->getIDocumentFieldsAccess();
SwFmtFld& rFmtFld = (SwFmtFld&)pDest->GetFld();
- const USHORT nFldWhich = rFmtFld.GetFld()->GetTyp()->Which();
+ const sal_uInt16 nFldWhich = rFmtFld.GetFld()->GetTyp()->Which();
if( pIDFA != pDestIDFA )
{
diff --git a/sw/source/core/txtnode/atrflyin.cxx b/sw/source/core/txtnode/atrflyin.cxx
index 547e391520f8..59295172de57 100644
--- a/sw/source/core/txtnode/atrflyin.cxx
+++ b/sw/source/core/txtnode/atrflyin.cxx
@@ -29,11 +29,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "hintids.hxx"
#include "cntfrm.hxx" // _GetFly
#include "doc.hxx"
+#include <IDocumentUndoRedo.hxx>
#include "pam.hxx" // fuer SwTxtFlyCnt
#include "flyfrm.hxx" // fuer SwTxtFlyCnt
#include "ndtxt.hxx" // SwFlyFrmFmt
@@ -118,9 +117,8 @@ void SwTxtFlyCnt::CopyFlyFmt( SwDoc* pDoc )
// In CopyLayoutFmt (siehe doclay.cxx) wird das FlyFrmFmt erzeugt
// und der Inhalt dupliziert.
- // fuers kopieren vom Attribut das Undo immer abschalten
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ // disable undo while copying attribute
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
SwFmtAnchor aAnchor( pFmt->GetAnchor() );
if ((FLY_AT_PAGE != aAnchor.GetAnchorId()) &&
(pDoc != pFmt->GetDoc())) // different documents?
@@ -147,7 +145,6 @@ void SwTxtFlyCnt::CopyFlyFmt( SwDoc* pDoc )
}
SwFrmFmt* pNew = pDoc->CopyLayoutFmt( *pFmt, aAnchor, false, false );
- pDoc->DoUndo( bUndo );
((SwFmtFlyCnt&)GetFlyCnt()).SetFlyFmt( pNew );
}
@@ -194,16 +191,13 @@ void SwTxtFlyCnt::SetAnchor( const SwTxtNode *pNode )
// stehen wir noch im falschen Dokument ?
if( pDoc != pFmt->GetDoc() )
{
- // fuers kopieren vom Attribut das Undo immer abschalten
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ // disable undo while copying attribute
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
SwFrmFmt* pNew = pDoc->CopyLayoutFmt( *pFmt, aAnchor, false, false );
- pDoc->DoUndo( bUndo );
- bUndo = pFmt->GetDoc()->DoesUndo();
- pFmt->GetDoc()->DoUndo( FALSE );
+ ::sw::UndoGuard const undoGuardFmt(
+ pFmt->GetDoc()->GetIDocumentUndoRedo());
pFmt->GetDoc()->DelLayoutFmt( pFmt );
- pFmt->GetDoc()->DoUndo( bUndo );
((SwFmtFlyCnt&)GetFlyCnt()).SetFlyFmt( pNew );
}
else if( pNode->GetpSwpHints() &&
diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx
index eee5c1825648..3e67e6d759e2 100644
--- a/sw/source/core/txtnode/atrftn.cxx
+++ b/sw/source/core/txtnode/atrftn.cxx
@@ -115,14 +115,14 @@ void SwFmtFtn::GetFtnText( XubString& rStr ) const
}
// returnt den anzuzeigenden String der Fuss-/Endnote
-XubString SwFmtFtn::GetViewNumStr( const SwDoc& rDoc, BOOL bInclStrings ) const
+XubString SwFmtFtn::GetViewNumStr( const SwDoc& rDoc, sal_Bool bInclStrings ) const
{
XubString sRet( GetNumStr() );
if( !sRet.Len() )
{
// dann ist die Nummer von Interesse, also ueber die Info diese
// besorgen.
- BOOL bMakeNum = TRUE;
+ sal_Bool bMakeNum = sal_True;
const SwSectionNode* pSectNd = pTxtAttr
? SwUpdFtnEndNtAtEnd::FindSectNdWithEndAttr( *pTxtAttr )
: 0;
@@ -132,12 +132,12 @@ XubString SwFmtFtn::GetViewNumStr( const SwDoc& rDoc, BOOL bInclStrings ) const
const SwFmtFtnEndAtTxtEnd& rFtnEnd = (SwFmtFtnEndAtTxtEnd&)
pSectNd->GetSection().GetFmt()->GetFmtAttr(
IsEndNote() ?
- static_cast<USHORT>(RES_END_AT_TXTEND) :
- static_cast<USHORT>(RES_FTN_AT_TXTEND) );
+ static_cast<sal_uInt16>(RES_END_AT_TXTEND) :
+ static_cast<sal_uInt16>(RES_FTN_AT_TXTEND) );
if( FTNEND_ATTXTEND_OWNNUMANDFMT == rFtnEnd.GetValue() )
{
- bMakeNum = FALSE;
+ bMakeNum = sal_False;
sRet = rFtnEnd.GetSwNumType().GetNumStr( GetNumber() );
if( bInclStrings )
{
@@ -187,7 +187,7 @@ SwTxtFtn::~SwTxtFtn()
-void SwTxtFtn::SetStartNode( const SwNodeIndex *pNewNode, BOOL bDelNode )
+void SwTxtFtn::SetStartNode( const SwNodeIndex *pNewNode, sal_Bool bDelNode )
{
if( pNewNode )
{
@@ -240,7 +240,7 @@ void SwTxtFtn::SetStartNode( const SwNodeIndex *pNewNode, BOOL bDelNode )
DELETEZ( m_pStartNode );
// loesche die Fussnote noch aus dem Array am Dokument
- for( USHORT n = 0; n < pDoc->GetFtnIdxs().Count(); ++n )
+ for( sal_uInt16 n = 0; n < pDoc->GetFtnIdxs().Count(); ++n )
if( this == pDoc->GetFtnIdxs()[n] )
{
pDoc->GetFtnIdxs().Remove( n );
@@ -256,7 +256,7 @@ void SwTxtFtn::SetStartNode( const SwNodeIndex *pNewNode, BOOL bDelNode )
}
-void SwTxtFtn::SetNumber( const USHORT nNewNum, const XubString* pStr )
+void SwTxtFtn::SetNumber( const sal_uInt16 nNewNum, const XubString* pStr )
{
SwFmtFtn& rFtn = (SwFmtFtn&)GetFtn();
if( pStr && pStr->Len() )
@@ -274,8 +274,8 @@ void SwTxtFtn::SetNumber( const USHORT nNewNum, const XubString* pStr )
{
// must iterate over all TxtNodes because of footnotes on other pages
SwNode* pNd;
- ULONG nSttIdx = m_pStartNode->GetIndex() + 1;
- ULONG nEndIdx = m_pStartNode->GetNode().EndOfSectionIndex();
+ sal_uLong nSttIdx = m_pStartNode->GetIndex() + 1;
+ sal_uLong nEndIdx = m_pStartNode->GetNode().EndOfSectionIndex();
for( ; nSttIdx < nEndIdx; ++nSttIdx )
{
// Es koennen ja auch Grafiken in der Fussnote stehen ...
@@ -308,9 +308,9 @@ void SwTxtFtn::CopyFtn(SwTxtFtn & rDest, SwTxtNode & rDestNode) const
// nDestLen contains number of CntntNodes in rDest _before_ copy.
SwNodeIndex aStart( *(rDest.GetStartNode()) );
SwNodeIndex aEnd( *aStart.GetNode().EndOfSectionNode() );
- ULONG nDestLen = aEnd.GetIndex() - aStart.GetIndex() - 1;
+ sal_uLong nDestLen = aEnd.GetIndex() - aStart.GetIndex() - 1;
- m_pTxtNode->GetDoc()->CopyWithFlyInFly( aRg, 0, aEnd, TRUE );
+ m_pTxtNode->GetDoc()->CopyWithFlyInFly( aRg, 0, aEnd, sal_True );
// in case the destination section was not empty, delete the old nodes
// before: Src: SxxxE, Dst: SnE
@@ -337,7 +337,7 @@ void SwTxtFtn::MakeNewTextSection( SwNodes& rNodes )
// Nun verpassen wir dem TxtNode noch die Fussnotenvorlage.
SwTxtFmtColl *pFmtColl;
const SwEndNoteInfo* pInfo;
- USHORT nPoolId;
+ sal_uInt16 nPoolId;
if( GetFtn().IsEndNote() )
{
@@ -366,7 +366,7 @@ void SwTxtFtn::DelFrms()
if ( !m_pTxtNode )
return;
- BOOL bFrmFnd = FALSE;
+ sal_Bool bFrmFnd = sal_False;
{
SwClientIter aIter( *m_pTxtNode );
for( SwCntntFrm* pFnd = (SwCntntFrm*)aIter.First( TYPE( SwCntntFrm ));
@@ -376,7 +376,7 @@ void SwTxtFtn::DelFrms()
if( pPage )
{
pPage->RemoveFtn( pFnd, this );
- bFrmFnd = TRUE;
+ bFrmFnd = sal_True;
}
}
}
@@ -421,7 +421,7 @@ void SwTxtFtn::DelFrms()
}
-USHORT SwTxtFtn::SetSeqRefNo()
+sal_uInt16 SwTxtFtn::SetSeqRefNo()
{
if( !m_pTxtNode )
return USHRT_MAX;
@@ -430,9 +430,9 @@ USHORT SwTxtFtn::SetSeqRefNo()
if( pDoc->IsInReading() )
return USHRT_MAX;
- USHORT n, nFtnCnt = pDoc->GetFtnIdxs().Count();
+ sal_uInt16 n, nFtnCnt = pDoc->GetFtnIdxs().Count();
- const BYTE nTmp = 255 < nFtnCnt ? 255 : static_cast<BYTE>(nFtnCnt);
+ const sal_uInt8 nTmp = 255 < nFtnCnt ? 255 : static_cast<sal_uInt8>(nFtnCnt);
SvUShortsSort aArr( nTmp, nTmp );
// dann testmal, ob die Nummer schon vergeben ist oder ob eine neue
@@ -478,9 +478,9 @@ USHORT SwTxtFtn::SetSeqRefNo()
void SwTxtFtn::SetUniqueSeqRefNo( SwDoc& rDoc )
{
- USHORT n, nStt = 0, nFtnCnt = rDoc.GetFtnIdxs().Count();
+ sal_uInt16 n, nStt = 0, nFtnCnt = rDoc.GetFtnIdxs().Count();
- const BYTE nTmp = 255 < nFtnCnt ? 255 : static_cast<BYTE>(nFtnCnt);
+ const sal_uInt8 nTmp = 255 < nFtnCnt ? 255 : static_cast<sal_uInt8>(nFtnCnt);
SvUShortsSort aArr( nTmp, nTmp );
// dann alle Nummern zusammensammeln die schon existieren
diff --git a/sw/source/core/txtnode/atrtox.cxx b/sw/source/core/txtnode/atrtox.cxx
index 31820ab10978..20d63bc495be 100644
--- a/sw/source/core/txtnode/atrtox.cxx
+++ b/sw/source/core/txtnode/atrtox.cxx
@@ -69,13 +69,13 @@ void SwTxtTOXMark::CopyTOXMark( SwDoc* pDoc )
{
SwTOXMark& rTOX = (SwTOXMark&)GetTOXMark();
TOXTypes eType = rTOX.GetTOXType()->GetType();
- USHORT nCount = pDoc->GetTOXTypeCount( eType );
+ sal_uInt16 nCount = pDoc->GetTOXTypeCount( eType );
const SwTOXType* pType = 0;
const XubString& rNm = rTOX.GetTOXType()->GetTypeName();
// kein entsprechender Verzeichnistyp vorhanden -> anlegen
// sonst verwenden
- for(USHORT i=0; i < nCount; ++i)
+ for(sal_uInt16 i=0; i < nCount; ++i)
{
const SwTOXType* pSrcType = pDoc->GetTOXType(eType, i);
if(pSrcType->GetTypeName() == rNm )
diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx
index 56209442d31e..660c150eeac2 100644
--- a/sw/source/core/txtnode/fmtatr2.cxx
+++ b/sw/source/core/txtnode/fmtatr2.cxx
@@ -121,11 +121,11 @@ void SwFmtCharFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
// weiterleiten an das TextAttribut
-BOOL SwFmtCharFmt::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwFmtCharFmt::GetInfo( SfxPoolItem& rInfo ) const
{
- return pTxtAttr ? pTxtAttr->GetInfo( rInfo ) : FALSE;
+ return pTxtAttr ? pTxtAttr->GetInfo( rInfo ) : sal_False;
}
-bool SwFmtCharFmt::QueryValue( uno::Any& rVal, BYTE ) const
+bool SwFmtCharFmt::QueryValue( uno::Any& rVal, sal_uInt8 ) const
{
String sCharFmtName;
if(GetCharFmt())
@@ -133,7 +133,7 @@ bool SwFmtCharFmt::QueryValue( uno::Any& rVal, BYTE ) const
rVal <<= OUString( sCharFmtName );
return true;
}
-bool SwFmtCharFmt::PutValue( const uno::Any& , BYTE )
+bool SwFmtCharFmt::PutValue( const uno::Any& , sal_uInt8 )
{
OSL_FAIL("Zeichenvorlage kann mit PutValue nicht gesetzt werden!");
return false;
@@ -145,7 +145,7 @@ bool SwFmtCharFmt::PutValue( const uno::Any& , BYTE )
|*
*************************************************************************/
-SwFmtAutoFmt::SwFmtAutoFmt( USHORT nInitWhich )
+SwFmtAutoFmt::SwFmtAutoFmt( sal_uInt16 nInitWhich )
: SfxPoolItem( nInitWhich )
{
}
@@ -170,14 +170,14 @@ SfxPoolItem* SwFmtAutoFmt::Clone( SfxItemPool* ) const
return new SwFmtAutoFmt( *this );
}
-bool SwFmtAutoFmt::QueryValue( uno::Any& rVal, BYTE ) const
+bool SwFmtAutoFmt::QueryValue( uno::Any& rVal, sal_uInt8 ) const
{
String sCharFmtName = StylePool::nameOf( mpHandle );
rVal <<= OUString( sCharFmtName );
return true;
}
-bool SwFmtAutoFmt::PutValue( const uno::Any& , BYTE )
+bool SwFmtAutoFmt::PutValue( const uno::Any& , sal_uInt8 )
{
//the format is not renameable via API
return false;
@@ -234,7 +234,7 @@ SwFmtINetFmt::~SwFmtINetFmt()
int SwFmtINetFmt::operator==( const SfxPoolItem& rAttr ) const
{
OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
- BOOL bRet = SfxPoolItem::operator==( (SfxPoolItem&) rAttr )
+ sal_Bool bRet = SfxPoolItem::operator==( (SfxPoolItem&) rAttr )
&& aURL == ((SwFmtINetFmt&)rAttr).aURL
&& aName == ((SwFmtINetFmt&)rAttr).aName
&& aTargetFrame == ((SwFmtINetFmt&)rAttr).aTargetFrame
@@ -244,7 +244,7 @@ int SwFmtINetFmt::operator==( const SfxPoolItem& rAttr ) const
&& nVisitedId == ((SwFmtINetFmt&)rAttr).nVisitedId;
if( !bRet )
- return FALSE;
+ return sal_False;
const SvxMacroTableDtor* pOther = ((SwFmtINetFmt&)rAttr).pMacroTbl;
if( !pMacroTbl )
@@ -257,19 +257,19 @@ int SwFmtINetFmt::operator==( const SfxPoolItem& rAttr ) const
// Anzahl unterschiedlich => auf jeden Fall ungleich
if( rOwn.Count() != rOther.Count() )
- return FALSE;
+ return sal_False;
// einzeln vergleichen; wegen Performance ist die Reihenfolge wichtig
- for( USHORT nNo = 0; nNo < rOwn.Count(); ++nNo )
+ for( sal_uInt16 nNo = 0; nNo < rOwn.Count(); ++nNo )
{
const SvxMacro *pOwnMac = rOwn.GetObject(nNo);
const SvxMacro *pOtherMac = rOther.GetObject(nNo);
if ( rOwn.GetKey(pOwnMac) != rOther.GetKey(pOtherMac) ||
pOwnMac->GetLibName() != pOtherMac->GetLibName() ||
pOwnMac->GetMacName() != pOtherMac->GetMacName() )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
@@ -296,7 +296,7 @@ void SwFmtINetFmt::SetMacroTbl( const SvxMacroTableDtor* pNewTbl )
-void SwFmtINetFmt::SetMacro( USHORT nEvent, const SvxMacro& rMacro )
+void SwFmtINetFmt::SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro )
{
if( !pMacroTbl )
pMacroTbl = new SvxMacroTableDtor;
@@ -313,7 +313,7 @@ void SwFmtINetFmt::SetMacro( USHORT nEvent, const SvxMacro& rMacro )
-const SvxMacro* SwFmtINetFmt::GetMacro( USHORT nEvent ) const
+const SvxMacro* SwFmtINetFmt::GetMacro( sal_uInt16 nEvent ) const
{
const SvxMacro* pRet = 0;
if( pMacroTbl && pMacroTbl->IsKeyValid( nEvent ) )
@@ -323,7 +323,7 @@ const SvxMacro* SwFmtINetFmt::GetMacro( USHORT nEvent ) const
-bool SwFmtINetFmt::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool SwFmtINetFmt::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
bool bRet = true;
XubString sVal;
@@ -371,7 +371,7 @@ bool SwFmtINetFmt::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
rVal <<= OUString(sVal);
return bRet;
}
-bool SwFmtINetFmt::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool SwFmtINetFmt::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
bool bRet = true;
nMemberId &= ~CONVERT_TWIPS;
@@ -496,7 +496,7 @@ SfxPoolItem* SwFmtRuby::Clone( SfxItemPool* ) const
}
bool SwFmtRuby::QueryValue( uno::Any& rVal,
- BYTE nMemberId ) const
+ sal_uInt8 nMemberId ) const
{
bool bRet = true;
nMemberId &= ~CONVERT_TWIPS;
@@ -523,7 +523,7 @@ bool SwFmtRuby::QueryValue( uno::Any& rVal,
return bRet;
}
bool SwFmtRuby::PutValue( const uno::Any& rVal,
- BYTE nMemberId )
+ sal_uInt8 nMemberId )
{
bool bRet = true;
nMemberId &= ~CONVERT_TWIPS;
@@ -575,12 +575,12 @@ bool SwFmtRuby::PutValue( const uno::Any& rVal,
class SwFmtMeta
************************************************************************/
-SwFmtMeta * SwFmtMeta::CreatePoolDefault(const USHORT i_nWhich)
+SwFmtMeta * SwFmtMeta::CreatePoolDefault(const sal_uInt16 i_nWhich)
{
return new SwFmtMeta(i_nWhich);
}
-SwFmtMeta::SwFmtMeta(const USHORT i_nWhich)
+SwFmtMeta::SwFmtMeta(const sal_uInt16 i_nWhich)
: SfxPoolItem( i_nWhich )
, m_pMeta()
, m_pTxtAttr( 0 )
@@ -590,7 +590,7 @@ SwFmtMeta::SwFmtMeta(const USHORT i_nWhich)
}
SwFmtMeta::SwFmtMeta( ::boost::shared_ptr< ::sw::Meta > const & i_pMeta,
- const USHORT i_nWhich )
+ const sal_uInt16 i_nWhich )
: SfxPoolItem( i_nWhich )
, m_pMeta( i_pMeta )
, m_pTxtAttr( 0 )
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index c8bb0f22b057..c92c795f51e7 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -69,7 +69,7 @@ SwFntCache *pFntCache = NULL;
// Letzter Font, der durch ChgFntCache eingestellt wurde.
SwFntObj *pLastFont = NULL;
// Die "MagicNumber", die den Fonts zur Identifizierung verpasst wird
-BYTE* pMagicNo = NULL;
+sal_uInt8* pMagicNo = NULL;
Color *pWaveCol = 0;
@@ -77,8 +77,8 @@ long SwFntObj::nPixWidth;
MapMode* SwFntObj::pPixMap = NULL;
OutputDevice* SwFntObj::pPixOut = NULL;
-extern USHORT UnMapDirection( USHORT nDir, const BOOL bVertFormat );
-USHORT GetDefaultFontHeight( SwDrawTextInfo &rInf )
+extern sal_uInt16 UnMapDirection( sal_uInt16 nDir, const sal_Bool bVertFormat );
+sal_uInt16 GetDefaultFontHeight( SwDrawTextInfo &rInf )
{
SwDocShell* pDocShell = rInf.GetShell()->GetDoc()->GetDocShell();
SfxStyleSheetBasePool* pBasePool = pDocShell->GetStyleSheetPool();
@@ -88,7 +88,7 @@ USHORT GetDefaultFontHeight( SwDrawTextInfo &rInf )
SfxStyleSheetBase* pStyle = pBasePool->Find( aString, (SfxStyleFamily)SFX_STYLE_FAMILY_PARA );
SfxItemSet& aTmpSet = pStyle->GetItemSet();
SvxFontHeightItem &aDefaultFontItem = (SvxFontHeightItem&)aTmpSet.Get(RES_CHRATR_CJK_FONTSIZE);
- return (USHORT)aDefaultFontItem.GetHeight();
+ return (sal_uInt16)aDefaultFontItem.GetHeight();
}
@@ -195,15 +195,15 @@ struct CalcLinePosData
SwDrawTextInfo& rInf;
Font& rFont;
xub_StrLen nCnt;
- const BOOL bSwitchH2V;
- const BOOL bSwitchL2R;
+ const sal_Bool bSwitchH2V;
+ const sal_Bool bSwitchL2R;
long nHalfSpace;
sal_Int32* pKernArray;
- const BOOL bBidiPor;
+ const sal_Bool bBidiPor;
CalcLinePosData( SwDrawTextInfo& _rInf, Font& _rFont,
- xub_StrLen _nCnt, const BOOL _bSwitchH2V, const BOOL _bSwitchL2R,
- long _nHalfSpace, sal_Int32* _pKernArray, const BOOL _bBidiPor) :
+ xub_StrLen _nCnt, const sal_Bool _bSwitchH2V, const sal_Bool _bSwitchL2R,
+ long _nHalfSpace, sal_Int32* _pKernArray, const sal_Bool _bBidiPor) :
rInf( _rInf ),
rFont( _rFont ),
nCnt( _nCnt ),
@@ -239,10 +239,10 @@ void lcl_calcLinePos( const CalcLinePosData &rData,
}
// determine start, end and length of wave line
- sal_Int32 nKernStart = nStart ? rData.pKernArray[ USHORT( nStart - 1 ) ] : 0;
- sal_Int32 nKernEnd = rData.pKernArray[ USHORT( nEnd - 1 ) ];
+ sal_Int32 nKernStart = nStart ? rData.pKernArray[ sal_uInt16( nStart - 1 ) ] : 0;
+ sal_Int32 nKernEnd = rData.pKernArray[ sal_uInt16( nEnd - 1 ) ];
- USHORT nDir = rData.bBidiPor ? 1800 :
+ sal_uInt16 nDir = rData.bBidiPor ? 1800 :
UnMapDirection( rData.rFont.GetOrientation(), rData.bSwitchH2V );
switch ( nDir )
@@ -284,16 +284,16 @@ void lcl_calcLinePos( const CalcLinePosData &rData,
/*************************************************************************
*
- * USHORT SwFntObj::GetFontAscent( const OutputDevice& rOut )
+ * sal_uInt16 SwFntObj::GetFontAscent( const OutputDevice& rOut )
*
* Beschreibung: liefern den Ascent des Fonts auf dem
* gewuenschten Outputdevice zurueck, ggf. muss der Bildschirmfont erst
* erzeugt werden.
*************************************************************************/
-USHORT SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice& rOut )
+sal_uInt16 SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice& rOut )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
const OutputDevice& rRefDev = pSh ? pSh->GetRefDev() : rOut;
if ( pSh && lcl_IsFontAdjustNecessary( rOut, rRefDev ) )
@@ -310,7 +310,7 @@ USHORT SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice& rOut )
const Font aOldFnt( rRefDev.GetFont() );
((OutputDevice&)rRefDev).SetFont( *pPrtFont );
const FontMetric aOutMet( rRefDev.GetFontMetric() );
- nPrtAscent = (USHORT) aOutMet.GetAscent();
+ nPrtAscent = (sal_uInt16) aOutMet.GetAscent();
( (OutputDevice&)rRefDev).SetFont( aOldFnt );
}
@@ -328,16 +328,16 @@ USHORT SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice& rOut )
/*************************************************************************
*
- * USHORT SwFntObj::GetFontHeight( const OutputDevice* pOut )
+ * sal_uInt16 SwFntObj::GetFontHeight( const OutputDevice* pOut )
*
* Beschreibung: liefern die H?he des Fonts auf dem
* gewuenschten Outputdevice zurueck, ggf. muss der Bildschirmfont erst
* erzeugt werden.
*************************************************************************/
-USHORT SwFntObj::GetFontHeight( const ViewShell* pSh, const OutputDevice& rOut )
+sal_uInt16 SwFntObj::GetFontHeight( const ViewShell* pSh, const OutputDevice& rOut )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
const OutputDevice& rRefDev = pSh ? pSh->GetRefDev() : rOut;
if ( pSh && lcl_IsFontAdjustNecessary( rOut, rRefDev ) )
@@ -353,12 +353,12 @@ USHORT SwFntObj::GetFontHeight( const ViewShell* pSh, const OutputDevice& rOut )
CreatePrtFont( rOut );
const Font aOldFnt( rRefDev.GetFont() );
((OutputDevice&)rRefDev).SetFont( *pPrtFont );
- nPrtHeight = static_cast<USHORT>(rRefDev.GetTextHeight());
+ nPrtHeight = static_cast<sal_uInt16>(rRefDev.GetTextHeight());
#if OSL_DEBUG_LEVEL > 1
// Check if vcl did not change the meading of GetTextHeight
const FontMetric aOutMet( rRefDev.GetFontMetric() );
- long nTmpPrtHeight = (USHORT)aOutMet.GetAscent() + aOutMet.GetDescent();
+ long nTmpPrtHeight = (sal_uInt16)aOutMet.GetAscent() + aOutMet.GetDescent();
(void) nTmpPrtHeight;
// #i106098#: do not compare with == here due to rounding error
OSL_ENSURE( abs(nTmpPrtHeight - nPrtHeight) < 3,
@@ -375,9 +375,9 @@ USHORT SwFntObj::GetFontHeight( const ViewShell* pSh, const OutputDevice& rOut )
return nRet;
}
-USHORT SwFntObj::GetFontLeading( const ViewShell *pSh, const OutputDevice& rOut )
+sal_uInt16 SwFntObj::GetFontLeading( const ViewShell *pSh, const OutputDevice& rOut )
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if ( pSh )
{
@@ -389,7 +389,7 @@ USHORT SwFntObj::GetFontLeading( const ViewShell *pSh, const OutputDevice& rOut
((OutputDevice&)rOut).SetFont( aOldFnt );
bSymbol = RTL_TEXTENCODING_SYMBOL == aMet.GetCharSet();
GuessLeading( *pSh, aMet );
- nExtLeading = static_cast<USHORT>(aMet.GetExtLeading());
+ nExtLeading = static_cast<sal_uInt16>(aMet.GetExtLeading());
}
const IDocumentSettingAccess& rIDSA = *pSh->getIDocumentSettingAccess();
@@ -464,7 +464,7 @@ void SwFntObj::CreateScrFont( const ViewShell& rSh, const OutputDevice& rOut )
GuessLeading( rSh, aMet );
if ( USHRT_MAX == nExtLeading )
- nExtLeading = static_cast<USHORT>(aMet.GetExtLeading());
+ nExtLeading = static_cast<sal_uInt16>(aMet.GetExtLeading());
// reset the original reference device font
pPrt->SetFont( aOldPrtFnt );
@@ -502,9 +502,9 @@ void SwFntObj::CreateScrFont( const ViewShell& rSh, const OutputDevice& rOut )
nZoom = USHRT_MAX - 1;
}
- nScrAscent = (USHORT)pOut->GetFontMetric().GetAscent();
+ nScrAscent = (sal_uInt16)pOut->GetFontMetric().GetAscent();
if ( USHRT_MAX == nScrHeight )
- nScrHeight = (USHORT)pOut->GetTextHeight();
+ nScrHeight = (sal_uInt16)pOut->GetTextHeight();
// reset original output device font
pOut->SetFont( aOldOutFont );
@@ -512,7 +512,7 @@ void SwFntObj::CreateScrFont( const ViewShell& rSh, const OutputDevice& rOut )
void SwFntObj::GuessLeading( const ViewShell&
-#if defined(WNT) || defined(WIN) || defined(PM2)
+#if defined(WNT) || defined(PM2)
rSh
#endif
, const FontMetric& rMet )
@@ -525,7 +525,7 @@ void SwFntObj::GuessLeading( const ViewShell&
return;
}
-#if defined(WNT) || defined(WIN) || defined(PM2)
+#if defined(WNT) || defined(PM2)
OutputDevice *pWin = rSh.GetWin() ?
rSh.GetWin() :
GetpApp()->GetDefaultDevice();
@@ -537,7 +537,7 @@ void SwFntObj::GuessLeading( const ViewShell&
const Font aOldFnt( pWin->GetFont() );
pWin->SetFont( *pPrtFont );
const FontMetric aWinMet( pWin->GetFontMetric() );
- const USHORT nWinHeight = USHORT( aWinMet.GetSize().Height() );
+ const sal_uInt16 nWinHeight = sal_uInt16( aWinMet.GetSize().Height() );
if( pPrtFont->GetName().Search( aWinMet.GetName() ) < USHRT_MAX )
{
// Wenn das Leading auf dem Window auch 0 ist, dann
@@ -551,11 +551,11 @@ void SwFntObj::GuessLeading( const ViewShell&
if( nTmpLeading < 0 )
nGuessedLeading = 0;
else
- nGuessedLeading = USHORT(nTmpLeading);
+ nGuessedLeading = sal_uInt16(nTmpLeading);
}
else
{
- nGuessedLeading = USHORT(nTmpLeading);
+ nGuessedLeading = sal_uInt16(nTmpLeading);
// Manta-Hack #50153#:
// Wer beim Leading luegt, luegt moeglicherweise auch beim
// Ascent/Descent, deshalb wird hier ggf. der Font ein wenig
@@ -566,7 +566,7 @@ void SwFntObj::GuessLeading( const ViewShell&
{
OSL_ENSURE( nPrtAscent < USHRT_MAX, "GuessLeading: PrtAscent-Fault" );
if ( nPrtAscent < USHRT_MAX )
- nPrtAscent = nPrtAscent + (USHORT)(( 2 * nDiff ) / 5);
+ nPrtAscent = nPrtAscent + (sal_uInt16)(( 2 * nDiff ) / 5);
}
}
}
@@ -632,7 +632,7 @@ void SwFntObj::SetDevFont( const ViewShell *pSh, OutputDevice& rOut )
*
*************************************************************************/
-BYTE lcl_WhichPunctuation( xub_Unicode cChar )
+sal_uInt8 lcl_WhichPunctuation( xub_Unicode cChar )
{
if ( ( cChar < 0x3001 || cChar > 0x3002 ) &&
( cChar < 0x3008 || cChar > 0x3011 ) &&
@@ -712,7 +712,7 @@ static void lcl_DrawLineForWrongListData(
rInf.GetOut().Push();
const Color aCol( rInf.GetOut().GetLineColor() );
- const BOOL bColSave = aCol != aLineColor;
+ const sal_Bool bColSave = aCol != aLineColor;
if (bColSave)
rInf.GetOut().SetLineColor( aLineColor );
@@ -771,7 +771,7 @@ static void lcl_DrawLineForWrongListData(
else // draw wavy lines for spell or grammar errors
{
// get wavy line type to use
- USHORT nWave =
+ sal_uInt16 nWave =
WRONG_SHOW_MEDIUM < nHght ? WAVE_NORMAL :
( WRONG_SHOW_SMALL < nHght ? WAVE_SMALL : WAVE_FLAT );
@@ -803,9 +803,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
const IDocumentSettingAccess* pIDSA = rInf.GetShell()->getIDocumentSettingAccess();
// true if pOut is the printer and the printer has been used for formatting
- const BOOL bPrt = OUTDEV_PRINTER == rInf.GetOut().GetOutDevType() &&
+ const sal_Bool bPrt = OUTDEV_PRINTER == rInf.GetOut().GetOutDevType() &&
OUTDEV_PRINTER == rRefDev.GetOutDevType();
- const BOOL bBrowse = ( pWin &&
+ const sal_Bool bBrowse = ( pWin &&
pIDSA->get(IDocumentSettingAccess::BROWSE_MODE) &&
!rInf.GetShell()->GetViewOptions()->IsPrtFormat() &&
!rInf.GetBullet() &&
@@ -817,10 +817,10 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// bDirectPrint indicates that we can enter the branch which calls
// the DrawText functions instead of calling the DrawTextArray functions
- const BOOL bDirectPrint = bPrt || bBrowse;
+ const sal_Bool bDirectPrint = bPrt || bBrowse;
// Condition for output font / refdev font adjustment
- const BOOL bUseScrFont =
+ const sal_Bool bUseScrFont =
lcl_IsFontAdjustNecessary( rInf.GetOut(), rRefDev );
Font* pTmpFont = bUseScrFont ? pScrFont : pPrtFont;
@@ -842,7 +842,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
#if OSL_DEBUG_LEVEL > 1
- const BOOL bNoAdjust = bPrt ||
+ const sal_Bool bNoAdjust = bPrt ||
( pWin &&
pIDSA->get(IDocumentSettingAccess::BROWSE_MODE) &&
!rInf.GetShell()->GetViewOptions()->IsPrtFormat() );
@@ -916,11 +916,11 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// wird die graue Wellenlinie des ExtendedAttributSets zunaechst
// in der Fontfarbe erscheinen.
- const BOOL bSwitchH2V = rInf.GetFrm() && rInf.GetFrm()->IsVertical();
- const BOOL bSwitchL2R = rInf.GetFrm() && rInf.GetFrm()->IsRightToLeft() &&
+ const sal_Bool bSwitchH2V = rInf.GetFrm() && rInf.GetFrm()->IsVertical();
+ const sal_Bool bSwitchL2R = rInf.GetFrm() && rInf.GetFrm()->IsRightToLeft() &&
! rInf.IsIgnoreFrmRTL();
- const ULONG nMode = rInf.GetOut().GetLayoutMode();
- const BOOL bBidiPor = ( bSwitchL2R !=
+ const sal_uLong nMode = rInf.GetOut().GetLayoutMode();
+ const sal_Bool bBidiPor = ( bSwitchL2R !=
( 0 != ( TEXT_LAYOUT_BIDI_RTL & nMode ) ) );
// be sure to have the correct layout mode at the printer
@@ -966,9 +966,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && pGrid->IsSnapToChars())
{
//for textgrid refactor
- //const USHORT nGridWidth = pGrid->GetBaseHeight();
+ //const sal_uInt16 nGridWidth = pGrid->GetBaseHeight();
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
- const USHORT nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
+ const sal_uInt16 nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
sal_Int32* pKernArray = new sal_Int32[rInf.GetLen()];
if ( pPrinter )
@@ -980,7 +980,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
long nWidthPerChar = pKernArray[ rInf.GetLen() - 1 ] / rInf.GetLen();
- const ULONG i = nWidthPerChar ?
+ const sal_uLong i = nWidthPerChar ?
( nWidthPerChar - 1 ) / nGridWidth + 1:
1;
@@ -988,13 +988,13 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// position of first character, we take the printer position
long nCharWidth = pKernArray[ 0 ];
- ULONG nHalfWidth = nWidthPerChar / 2;
+ sal_uLong nHalfWidth = nWidthPerChar / 2;
long nNextFix;
// punctuation characters are not centered
xub_Unicode cChar = rInf.GetText().GetChar( rInf.GetIdx() );
- BYTE nType = lcl_WhichPunctuation( cChar );
+ sal_uInt8 nType = lcl_WhichPunctuation( cChar );
switch ( nType )
{
case SwScriptInfo::NONE :
@@ -1056,7 +1056,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && !pGrid->IsSnapToChars() )
{
- const USHORT nDefaultFontHeight = GetDefaultFontHeight( rInf );
+ const sal_uInt16 nDefaultFontHeight = GetDefaultFontHeight( rInf );
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
long nGridWidthAdd = GETGRIDWIDTH(pGrid, pDoc);
@@ -1082,14 +1082,14 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( rInf.GetFont() && rInf.GetLen() )
{
const SwScriptInfo* pSI = rInf.GetScriptInfo();
- const BYTE nActual = rInf.GetFont()->GetActual();
+ const sal_uInt8 nActual = rInf.GetFont()->GetActual();
///Kana Compression
if( SW_CJK == nActual && rInf.GetKanaComp() &&
pSI && pSI->CountCompChg() &&
lcl_IsMonoSpaceFont( *(rInf.GetpOut()) ) )
{
pSI->Compress( pKernArray,rInf.GetIdx(), rInf.GetLen(),
- rInf.GetKanaComp(), (USHORT)aFont.GetSize().Height(),&aPos );
+ rInf.GetKanaComp(), (sal_uInt16)aFont.GetSize().Height(),&aPos );
bSpecialJust = sal_True;
}
///Asian Justification
@@ -1099,7 +1099,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( LANGUAGE_KOREAN != aLang && LANGUAGE_KOREAN_JOHAB != aLang)
{
long nSpaceSum = nSpaceAdd;
- for ( USHORT nI = 0; nI < rInf.GetLen(); ++nI )
+ for ( sal_uInt16 nI = 0; nI < rInf.GetLen(); ++nI )
{
pKernArray[ nI ] += nSpaceSum;
nSpaceSum += nSpaceAdd;
@@ -1197,7 +1197,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( bDirectPrint )
{
const Fraction aTmp( 1, 1 );
- BOOL bStretch = rInf.GetWidth() && ( rInf.GetLen() > 1 ) && bPrt
+ sal_Bool bStretch = rInf.GetWidth() && ( rInf.GetLen() > 1 ) && bPrt
&& ( aTmp != rInf.GetOut().GetMapMode().GetScaleX() );
if ( bSwitchL2R )
@@ -1254,7 +1254,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( rInf.GetFont() && rInf.GetLen() )
{
const SwScriptInfo* pSI = rInf.GetScriptInfo();
- const BYTE nActual = rInf.GetFont()->GetActual();
+ const sal_uInt8 nActual = rInf.GetFont()->GetActual();
// Kana Compression
if ( SW_CJK == nActual && rInf.GetKanaComp() &&
@@ -1263,7 +1263,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
{
pSI->Compress( pKernArray, rInf.GetIdx(), rInf.GetLen(),
rInf.GetKanaComp(),
- (USHORT)aFont.GetSize().Height(), &aPos );
+ (sal_uInt16)aFont.GetSize().Height(), &aPos );
bSpecialJust = sal_True;
}
@@ -1275,7 +1275,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( LANGUAGE_KOREAN != aLang && LANGUAGE_KOREAN_JOHAB != aLang )
{
long nSpaceSum = nSpaceAdd;
- for ( USHORT nI = 0; nI < rInf.GetLen(); ++nI )
+ for ( sal_uInt16 nI = 0; nI < rInf.GetLen(); ++nI )
{
pKernArray[ nI ] += nSpaceSum;
nSpaceSum += nSpaceAdd;
@@ -1407,7 +1407,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
pTmpFont->SetColor( aSaveColor );
}
- rInf.GetOut().DrawStretchText( aPos, (USHORT)nTmpWidth,
+ rInf.GetOut().DrawStretchText( aPos, (sal_uInt16)nTmpWidth,
rInf.GetText(), rInf.GetIdx(), rInf.GetLen() );
}
else
@@ -1423,9 +1423,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
{
const String* pStr = &rInf.GetText();
String aStr( aEmptyStr );
- BOOL bBullet = rInf.GetBullet();
+ sal_Bool bBullet = rInf.GetBullet();
if( bSymbol )
- bBullet = FALSE;
+ bBullet = sal_False;
sal_Int32 *pKernArray = new sal_Int32[ rInf.GetLen() ];
CreateScrFont( *rInf.GetShell(), rInf.GetOut() );
long nScrPos;
@@ -1462,7 +1462,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( rInf.GetFont() && rInf.GetLen() )
{
- const BYTE nActual = rInf.GetFont()->GetActual();
+ const sal_uInt8 nActual = rInf.GetFont()->GetActual();
const SwScriptInfo* pSI = rInf.GetScriptInfo();
// Kana Compression
@@ -1473,10 +1473,10 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
Point aTmpPos( aPos );
pSI->Compress( pScrArray, rInf.GetIdx(), rInf.GetLen(),
rInf.GetKanaComp(),
- (USHORT)aFont.GetSize().Height(), &aTmpPos );
+ (sal_uInt16)aFont.GetSize().Height(), &aTmpPos );
pSI->Compress( pKernArray, rInf.GetIdx(), rInf.GetLen(),
rInf.GetKanaComp(),
- (USHORT)aFont.GetSize().Height(), &aPos );
+ (sal_uInt16)aFont.GetSize().Height(), &aPos );
}
// Asian Justification
@@ -1487,7 +1487,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( LANGUAGE_KOREAN != aLang && LANGUAGE_KOREAN_JOHAB != aLang )
{
long nSpaceSum = nSpaceAdd;
- for ( USHORT nI = 0; nI < rInf.GetLen(); ++nI )
+ for ( sal_uInt16 nI = 0; nI < rInf.GetLen(); ++nI )
{
pKernArray[ nI ] += nSpaceSum;
pScrArray[ nI ] += nSpaceSum;
@@ -1588,12 +1588,12 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
xub_Unicode nCh;
// Bei Pairkerning waechst der Printereinfluss auf die Positionierung
- USHORT nMul = 3;
+ sal_uInt16 nMul = 3;
if ( pPrtFont->GetKerning() )
nMul = 1;
- const USHORT nDiv = nMul+1;
+ const sal_uInt16 nDiv = nMul+1;
// In nSpaceSum wird der durch Blocksatz auf die Spaces verteilte
// Zwischenraum aufsummiert.
@@ -1674,19 +1674,19 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( rInf.GetOut().GetConnectMetaFile() )
rInf.GetOut().Push();
- USHORT nWave =
+ sal_uInt16 nWave =
WRONG_SHOW_MEDIUM < nHght ? WAVE_NORMAL :
( WRONG_SHOW_SMALL < nHght ? WAVE_SMALL :
WAVE_FLAT );
Color aCol( rInf.GetOut().GetLineColor() );
- BOOL bColSave = aCol != *pWaveCol;
+ sal_Bool bColSave = aCol != *pWaveCol;
if ( bColSave )
rInf.GetOut().SetLineColor( *pWaveCol );
Point aEnd;
- long nKernVal = pKernArray[ USHORT( rInf.GetLen() - 1 ) ];
+ long nKernVal = pKernArray[ sal_uInt16( rInf.GetLen() - 1 ) ];
- USHORT nDir = bBidiPor ?
+ sal_uInt16 nDir = bBidiPor ?
1800 :
UnMapDirection(
GetFont()->GetOrientation(),
@@ -1795,7 +1795,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
/*************************************************************************
*
* Size SwFntObj::GetTextSize( const OutputDevice *pOut, const String &rTxt,
- * const USHORT nIdx, const USHORT nLen, const short nKern = 0 );
+ * const sal_uInt16 nIdx, const sal_uInt16 nLen, const short nKern = 0 );
*
* Beschreibung: ermittelt die TextSize (des Druckers)
*
@@ -1821,7 +1821,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && pGrid->IsSnapToChars() )
{
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
- const USHORT nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
+ const sal_uInt16 nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
OutputDevice* pOutDev;
@@ -1845,7 +1845,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
long nWidthPerChar = aTxtSize.Width() / nLn;
- const ULONG i = nWidthPerChar ?
+ const sal_uLong i = nWidthPerChar ?
( nWidthPerChar - 1 ) / nGridWidth + 1:
1;
@@ -1862,7 +1862,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
GETGRID( rInf.GetFrm()->FindPageFrm() )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && !pGrid->IsSnapToChars() )
{
- const USHORT nDefaultFontHeight = GetDefaultFontHeight( rInf );
+ const sal_uInt16 nDefaultFontHeight = GetDefaultFontHeight( rInf );
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
long nGridWidthAdd = GETGRIDWIDTH(pGrid, pDoc);
@@ -1891,7 +1891,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
}
}
- const BOOL bCompress = rInf.GetKanaComp() && nLn &&
+ const sal_Bool bCompress = rInf.GetKanaComp() && nLn &&
rInf.GetFont() &&
SW_CJK == rInf.GetFont()->GetActual() &&
rInf.GetScriptInfo() &&
@@ -1920,7 +1920,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
if( bCompress )
rInf.SetKanaDiff( rInf.GetScriptInfo()->Compress( pKernArray,
rInf.GetIdx(), nLn, rInf.GetKanaComp(),
- (USHORT)aFont.GetSize().Height() ) );
+ (sal_uInt16)aFont.GetSize().Height() ) );
else
rInf.SetKanaDiff( 0 );
@@ -1943,10 +1943,10 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
xub_Unicode nCh;
// Bei Pairkerning waechst der Printereinfluss auf die Positionierung
- USHORT nMul = 3;
+ sal_uInt16 nMul = 3;
if ( pPrtFont->GetKerning() )
nMul = 1;
- const USHORT nDiv = nMul+1;
+ const sal_uInt16 nDiv = nMul+1;
for( xub_StrLen i=1; i<nCnt; i++ )
{
nCh = rInf.GetText().GetChar( rInf.GetIdx() + i );
@@ -1984,7 +1984,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
rInf.GetIdx(), nLn );
rInf.SetKanaDiff( rInf.GetScriptInfo()->Compress( pKernArray,
rInf.GetIdx(), nLn, rInf.GetKanaComp(),
- (USHORT) aFont.GetSize().Height() ) );
+ (sal_uInt16) aFont.GetSize().Height() ) );
aTxtSize.Width() = pKernArray[ nLn - 1 ];
delete[] pKernArray;
}
@@ -2035,7 +2035,7 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
const SwScriptInfo* pSI = rInf.GetScriptInfo();
if ( rInf.GetFont() && rInf.GetLen() )
{
- const BYTE nActual = rInf.GetFont()->GetActual();
+ const sal_uInt8 nActual = rInf.GetFont()->GetActual();
// Kana Compression
if ( SW_CJK == nActual && rInf.GetKanaComp() &&
@@ -2044,7 +2044,7 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
{
pSI->Compress( pKernArray, rInf.GetIdx(), rInf.GetLen(),
rInf.GetKanaComp(),
- (USHORT) aFont.GetSize().Height() );
+ (sal_uInt16) aFont.GetSize().Height() );
}
// Asian Justification
@@ -2055,7 +2055,7 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
if ( LANGUAGE_KOREAN != aLang && LANGUAGE_KOREAN_JOHAB != aLang )
{
long nSpaceSum = nSpaceAdd;
- for ( USHORT nI = 0; nI < rInf.GetLen(); ++nI )
+ for ( sal_uInt16 nI = 0; nI < rInf.GetLen(); ++nI )
{
pKernArray[ nI ] += nSpaceSum;
nSpaceSum += nSpaceAdd;
@@ -2109,17 +2109,17 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && pGrid->IsSnapToChars() )
{
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
- const USHORT nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
+ const sal_uInt16 nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
long nWidthPerChar = pKernArray[ rInf.GetLen() - 1 ] / rInf.GetLen();
- ULONG i = nWidthPerChar ?
+ sal_uLong i = nWidthPerChar ?
( nWidthPerChar - 1 ) / nGridWidth + 1:
1;
nWidthPerChar = i * nGridWidth;
- nCnt = (USHORT)(rInf.GetOfst() / nWidthPerChar);
+ nCnt = (sal_uInt16)(rInf.GetOfst() / nWidthPerChar);
if ( 2 * ( rInf.GetOfst() - nCnt * nWidthPerChar ) > nWidthPerChar )
++nCnt;
@@ -2136,7 +2136,7 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && !pGrid->IsSnapToChars() )
{
- const USHORT nDefaultFontHeight = GetDefaultFontHeight( rInf );
+ const sal_uInt16 nDefaultFontHeight = GetDefaultFontHeight( rInf );
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
long nGridWidthAdd = GETGRIDWIDTH(pGrid, pDoc);
@@ -2225,8 +2225,8 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
|*************************************************************************/
SwFntAccess::SwFntAccess( const void* &rMagic,
- USHORT &rIndex, const void *pOwn, ViewShell *pSh,
- BOOL bCheck ) :
+ sal_uInt16 &rIndex, const void *pOwn, ViewShell *pSh,
+ sal_Bool bCheck ) :
SwCacheAccess( *pFntCache, rMagic, rIndex ),
pShell( pSh )
{
@@ -2243,12 +2243,12 @@ SwFntAccess::SwFntAccess( const void* &rMagic,
}
else
// Hier ist der Font nicht bekannt, muss also gesucht werden.
- bCheck = FALSE;
+ bCheck = sal_False;
{
OutputDevice* pOut = 0;
- USHORT nZoom = USHRT_MAX;
+ sal_uInt16 nZoom = USHRT_MAX;
// Get the reference device
if ( pSh )
@@ -2344,7 +2344,7 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
{
ChgFnt( rInf.GetShell(), rInf.GetOut() );
- const BOOL bCompress = rInf.GetKanaComp() && rInf.GetLen() &&
+ const sal_Bool bCompress = rInf.GetKanaComp() && rInf.GetLen() &&
SW_CJK == GetActual() &&
rInf.GetScriptInfo() &&
rInf.GetScriptInfo()->CountCompChg() &&
@@ -2353,10 +2353,10 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
OSL_ENSURE( !bCompress || ( rInf.GetScriptInfo() && rInf.GetScriptInfo()->
CountCompChg()), "Compression without info" );
- USHORT nTxtBreak = 0;
+ sal_uInt16 nTxtBreak = 0;
long nKern = 0;
- USHORT nLn = ( rInf.GetLen() == STRING_LEN ? rInf.GetText().Len()
+ sal_uInt16 nLn = ( rInf.GetLen() == STRING_LEN ? rInf.GetText().Len()
: rInf.GetLen() );
if ( rInf.GetFrm() && nLn && rInf.SnapToGrid() &&
@@ -2366,7 +2366,7 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && pGrid->IsSnapToChars() )
{
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
- const USHORT nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
+ const sal_uInt16 nGridWidth = GETGRIDWIDTH(pGrid, pDoc);
sal_Int32* pKernArray = new sal_Int32[rInf.GetLen()];
rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray,
@@ -2374,7 +2374,7 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
long nWidthPerChar = pKernArray[ rInf.GetLen() - 1 ] / rInf.GetLen();
- const ULONG i = nWidthPerChar ?
+ const sal_uLong i = nWidthPerChar ?
( nWidthPerChar - 1 ) / nGridWidth + 1:
1;
@@ -2399,7 +2399,7 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
GETGRID( rInf.GetFrm()->FindPageFrm() )
if ( pGrid && GRID_LINES_CHARS == pGrid->GetGridType() && !pGrid->IsSnapToChars() )
{
- const USHORT nDefaultFontHeight = GetDefaultFontHeight( rInf );
+ const sal_uInt16 nDefaultFontHeight = GetDefaultFontHeight( rInf );
const SwDoc* pDoc = rInf.GetShell()->GetDoc();
long nGridWidthAdd = GETGRIDWIDTH(pGrid, pDoc);
@@ -2504,7 +2504,7 @@ xub_StrLen SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth )
rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray,
rInf.GetIdx(), nLn );
if( rInf.GetScriptInfo()->Compress( pKernArray, rInf.GetIdx(), nLn,
- rInf.GetKanaComp(), (USHORT)GetHeight( nActual ) ) )
+ rInf.GetKanaComp(), (sal_uInt16)GetHeight( nActual ) ) )
{
long nKernAdd = nKern;
xub_StrLen nTmpBreak = nTxtBreak;
@@ -2571,7 +2571,7 @@ sal_Bool SwDrawTextInfo::ApplyAutoColor( Font* pFont )
/// OD 21.08.2002 #99657#
/// There is a user defined setting for the background, if there
/// is a background brush and its color is *not* "no fill"/"auto fill".
- if( GetFrm()->GetBackgroundBrush( pItem, pCol, aOrigBackRect, FALSE ) )
+ if( GetFrm()->GetBackgroundBrush( pItem, pCol, aOrigBackRect, sal_False ) )
{
if ( !pCol )
{
diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx
index 3796dd0ae94b..8a40614a3d93 100644
--- a/sw/source/core/txtnode/fntcap.cxx
+++ b/sw/source/core/txtnode/fntcap.cxx
@@ -170,7 +170,7 @@ Size SwSubFont::GetCapitalSize( SwDrawTextInfo& rInf )
Point aPos;
rInf.SetPos( aPos );
rInf.SetSpace( 0 );
- rInf.SetDrawSpace( FALSE );
+ rInf.SetDrawSpace( sal_False );
SwDoGetCapitalSize aDo( rInf );
DoOnCapitals( aDo );
Size aTxtSize( aDo.GetSize() );
@@ -261,13 +261,13 @@ xub_StrLen SwFont::GetCapitalBreak( ViewShell* pSh, const OutputDevice* pOut,
// Start:
Point aPos( 0, 0 );
SwDrawTextInfo aInfo(pSh, *(OutputDevice*)pOut, pScript, rTxt, nIdx, nLen,
- 0, FALSE);
+ 0, sal_False);
aInfo.SetPos( aPos );
aInfo.SetSpace( 0 );
aInfo.SetWrong( NULL );
aInfo.SetGrammarCheck( NULL );
aInfo.SetSmartTags( NULL ); // SMARTTAGS
- aInfo.SetDrawSpace( FALSE );
+ aInfo.SetDrawSpace( sal_False );
aInfo.SetKern( CheckKerning() );
aInfo.SetKanaComp( pScript ? 0 : 100 );
aInfo.SetFont( this );
@@ -304,14 +304,14 @@ void SwDoDrawCapital::Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont )
void SwDoDrawCapital::Do()
{
SV_STAT( nDrawText );
- USHORT nOrgWidth = rInf.GetWidth();
- rInf.SetWidth( USHORT(rInf.GetSize().Width()) );
+ sal_uInt16 nOrgWidth = rInf.GetWidth();
+ rInf.SetWidth( sal_uInt16(rInf.GetSize().Width()) );
if ( rInf.GetUpper() )
pUpperFnt->DrawText( rInf );
else
{
- BOOL bOldBullet = rInf.GetBullet();
- rInf.SetBullet( FALSE );
+ sal_Bool bOldBullet = rInf.GetBullet();
+ rInf.SetBullet( sal_False );
pLowerFnt->DrawText( rInf );
rInf.SetBullet( bOldBullet );
}
@@ -332,15 +332,15 @@ void SwDoDrawCapital::DrawSpace( Point &rPos )
long nDiff = rInf.GetPos().X() - rPos.X();
Point aPos( rPos );
- const BOOL bSwitchL2R = rInf.GetFrm()->IsRightToLeft() &&
+ const sal_Bool bSwitchL2R = rInf.GetFrm()->IsRightToLeft() &&
! rInf.IsIgnoreFrmRTL();
if ( bSwitchL2R )
rInf.GetFrm()->SwitchLTRtoRTL( aPos );
- const ULONG nMode = rInf.GetpOut()->GetLayoutMode();
- const BOOL bBidiPor = ( bSwitchL2R !=
+ const sal_uLong nMode = rInf.GetpOut()->GetLayoutMode();
+ const sal_Bool bBidiPor = ( bSwitchL2R !=
( 0 != ( TEXT_LAYOUT_BIDI_RTL & nMode ) ) );
if ( bBidiPor )
@@ -383,9 +383,9 @@ protected:
SwFntObj *pUpperFnt;
SwFntObj *pLowerFnt;
xub_StrLen nCrsr;
- USHORT nOfst;
+ sal_uInt16 nOfst;
public:
- SwDoCapitalCrsrOfst( SwDrawTextInfo &rInfo, const USHORT nOfs ) :
+ SwDoCapitalCrsrOfst( SwDrawTextInfo &rInfo, const sal_uInt16 nOfs ) :
SwDoCapitals( rInfo ), pUpperFnt(0), pLowerFnt(0), nCrsr( 0 ), nOfst( nOfs )
{ }
virtual void Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont );
@@ -407,7 +407,7 @@ void SwDoCapitalCrsrOfst::Do()
{
if ( nOfst > rInf.GetSize().Width() )
{
- nOfst = nOfst - USHORT(rInf.GetSize().Width());
+ nOfst = nOfst - sal_uInt16(rInf.GetSize().Width());
nCrsr = nCrsr + rInf.GetLen();
}
else
@@ -416,7 +416,7 @@ void SwDoCapitalCrsrOfst::Do()
rInf.GetScriptInfo(),
rInf.GetText(),
rInf.GetIdx(),
- rInf.GetLen(), 0, FALSE );
+ rInf.GetLen(), 0, sal_False );
aDrawInf.SetOfst( nOfst );
aDrawInf.SetKern( rInf.GetKern() );
aDrawInf.SetKanaComp( rInf.GetKanaComp() );
@@ -449,7 +449,7 @@ xub_StrLen SwSubFont::GetCapitalCrsrOfst( SwDrawTextInfo& rInf )
SwDoCapitalCrsrOfst aDo( rInf, rInf.GetOfst() );
Point aPos;
rInf.SetPos( aPos );
- rInf.SetDrawSpace( FALSE );
+ rInf.SetDrawSpace( sal_False );
DoOnCapitals( aDo );
rInf.SetKern( nOldKern );
return aDo.GetCrsr();
@@ -462,12 +462,12 @@ xub_StrLen SwSubFont::GetCapitalCrsrOfst( SwDrawTextInfo& rInf )
class SwDoDrawStretchCapital : public SwDoDrawCapital
{
const xub_StrLen nStrLen;
- const USHORT nCapWidth;
- const USHORT nOrgWidth;
+ const sal_uInt16 nCapWidth;
+ const sal_uInt16 nOrgWidth;
public:
virtual void Do();
- SwDoDrawStretchCapital( SwDrawTextInfo &rInfo, const USHORT nCapitalWidth )
+ SwDoDrawStretchCapital( SwDrawTextInfo &rInfo, const sal_uInt16 nCapitalWidth )
: SwDoDrawCapital( rInfo ),
nStrLen( rInfo.GetLen() ),
nCapWidth( nCapitalWidth ),
@@ -482,7 +482,7 @@ public:
void SwDoDrawStretchCapital::Do()
{
SV_STAT( nDrawStretchText );
- USHORT nPartWidth = USHORT(rInf.GetSize().Width());
+ sal_uInt16 nPartWidth = sal_uInt16(rInf.GetSize().Width());
if( rInf.GetLen() )
{
@@ -494,13 +494,13 @@ void SwDoDrawStretchCapital::Do()
nDiff /= (long) nStrLen;
nDiff += nPartWidth;
if( 0 < nDiff )
- nPartWidth = USHORT(nDiff);
+ nPartWidth = sal_uInt16(nDiff);
}
rInf.ApplyAutoColor();
Point aPos( rInf.GetPos() );
- const BOOL bSwitchL2R = rInf.GetFrm()->IsRightToLeft() &&
+ const sal_Bool bSwitchL2R = rInf.GetFrm()->IsRightToLeft() &&
! rInf.IsIgnoreFrmRTL();
if ( bSwitchL2R )
@@ -533,7 +533,7 @@ void SwSubFont::DrawStretchCapital( SwDrawTextInfo &rInf )
rInf.SetLen( rInf.GetText().Len() );
const Point& rOldPos = rInf.GetPos();
- const USHORT nCapWidth = (USHORT)( GetCapitalSize( rInf ).Width() );
+ const sal_uInt16 nCapWidth = (sal_uInt16)( GetCapitalSize( rInf ).Width() );
rInf.SetPos( rOldPos );
rInf.SetDrawSpace( GetUnderline() != UNDERLINE_NONE ||
@@ -559,7 +559,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
Size aPartSize;
long nKana = 0;
const XubString aTxt( CalcCaseMap( rDo.GetInf().GetText() ) );
- xub_StrLen nMaxPos = Min( USHORT(rDo.GetInf().GetText().Len()
+ xub_StrLen nMaxPos = Min( sal_uInt16(rDo.GetInf().GetText().Len()
- rDo.GetInf().GetIdx()), rDo.GetInf().GetLen() );
rDo.GetInf().SetLen( nMaxPos );
@@ -586,14 +586,14 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
SwFntObj *pSpaceFont = NULL;
const void *pMagic2 = NULL;
- USHORT nIndex2 = 0;
+ sal_uInt16 nIndex2 = 0;
SwSubFont aFont( *this );
Point aStartPos( rDo.GetInf().GetPos() );
- const BOOL bTextLines = aFont.GetUnderline() != UNDERLINE_NONE
+ const sal_Bool bTextLines = aFont.GetUnderline() != UNDERLINE_NONE
|| aFont.GetOverline() != UNDERLINE_NONE
|| aFont.GetStrikeout() != STRIKEOUT_NONE;
- const BOOL bWordWise = bTextLines && aFont.IsWordLineMode() &&
+ const sal_Bool bWordWise = bTextLines && aFont.IsWordLineMode() &&
rDo.GetInf().GetDrawSpace();
const long nTmpKern = rDo.GetInf().GetKern();
@@ -601,7 +601,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
{
if ( bWordWise )
{
- aFont.SetWordLineMode( FALSE );
+ aFont.SetWordLineMode( sal_False );
pSpaceFontAccess = new SwFntAccess( pMagic2, nIndex2, &aFont,
rDo.GetInf().GetShell() );
pSpaceFont = pSpaceFontAccess->Get();
@@ -623,7 +623,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
pBigFont = pLastFont;
// Hier entsteht der Kleinbuchstabenfont:
- aFont.SetProportion( BYTE( (aFont.GetPropr() * SMALL_CAPS_PERCENTAGE ) / 100L) );
+ aFont.SetProportion( sal_uInt8 (aFont.GetPropr() * SMALL_CAPS_PERCENTAGE ) / 100L);
pMagic2 = NULL;
nIndex2 = 0;
SwFntAccess *pSmallFontAccess = new SwFntAccess( pMagic2, nIndex2, &aFont,
@@ -679,7 +679,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
rDo.GetInf().SetLen( nPos - nOldPos );
}
- rDo.GetInf().SetUpper( FALSE );
+ rDo.GetInf().SetUpper( sal_False );
rDo.GetInf().SetOut( *pOutSize );
aPartSize = pSmallFont->GetTextSize( rDo.GetInf() );
nKana += rDo.GetInf().GetKanaDiff();
@@ -705,7 +705,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
do
{
- rDo.GetInf().SetUpper( TRUE );
+ rDo.GetInf().SetUpper( sal_True );
pLastFont = pBigFont;
pLastFont->SetDevFont( rDo.GetInf().GetShell(), rDo.GetOut() );
xub_StrLen nTmp;
diff --git a/sw/source/core/txtnode/makefile.mk b/sw/source/core/txtnode/makefile.mk
deleted file mode 100644
index 066abd7517ac..000000000000
--- a/sw/source/core/txtnode/makefile.mk
+++ /dev/null
@@ -1,77 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=txtnode
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(mydebug)" != ""
-CDEFS+=-Dmydebug
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/atrref.obj \
- $(SLO)$/chrfmt.obj \
- $(SLO)$/modeltoviewhelper.obj \
- $(SLO)$/ndhints.obj \
- $(SLO)$/txatbase.obj
-
-EXCEPTIONSFILES = \
- $(SLO)$/SwGrammarContact.obj \
- $(SLO)$/atrfld.obj \
- $(SLO)$/atrflyin.obj \
- $(SLO)$/atrftn.obj \
- $(SLO)$/atrtox.obj \
- $(SLO)$/fmtatr2.obj \
- $(SLO)$/fntcache.obj \
- $(SLO)$/fntcap.obj \
- $(SLO)$/ndtxt.obj \
- $(SLO)$/swfntcch.obj \
- $(SLO)$/swfont.obj \
- $(SLO)$/thints.obj \
- $(SLO)$/txatritr.obj \
- $(SLO)$/txtatr2.obj \
- $(SLO)$/txtedt.obj
-
-.IF "$(dbutil)" != ""
-OFILES+=$(SLO)$/dbchratr.$(QBJX)
-.ENDIF
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/txtnode/ndhints.cxx b/sw/source/core/txtnode/ndhints.cxx
index f8c80d481b5e..d0e0974f2ed0 100644
--- a/sw/source/core/txtnode/ndhints.cxx
+++ b/sw/source/core/txtnode/ndhints.cxx
@@ -47,7 +47,7 @@ inline void DumpHints(const SwpHtStart &, const SwpHtEnd &) { }
* inline IsEqual()
*************************************************************************/
-inline BOOL IsEqual( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
+inline sal_Bool IsEqual( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
{
return (long)(&rHt1) == (long)(&rHt2);
}
@@ -63,7 +63,7 @@ inline BOOL IsEqual( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
// Sortierreihenfolge: Start, Ende (umgekehrt!), Which-Wert (umgekehrt!),
// als letztes die Adresse selbst
-static BOOL lcl_IsLessStart( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
+static sal_Bool lcl_IsLessStart( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
{
if ( *rHt1.GetStart() == *rHt2.GetStart() )
{
@@ -71,14 +71,14 @@ static BOOL lcl_IsLessStart( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
const xub_StrLen nHt2 = *rHt2.GetAnyEnd();
if ( nHt1 == nHt2 )
{
- const USHORT nWhich1 = rHt1.Which();
- const USHORT nWhich2 = rHt2.Which();
+ const sal_uInt16 nWhich1 = rHt1.Which();
+ const sal_uInt16 nWhich2 = rHt2.Which();
if ( nWhich1 == nWhich2 )
{
if ( RES_TXTATR_CHARFMT == nWhich1 )
{
- const USHORT nS1 = static_cast<const SwTxtCharFmt&>(rHt1).GetSortNumber();
- const USHORT nS2 = static_cast<const SwTxtCharFmt&>(rHt2).GetSortNumber();
+ const sal_uInt16 nS1 = static_cast<const SwTxtCharFmt&>(rHt1).GetSortNumber();
+ const sal_uInt16 nS2 = static_cast<const SwTxtCharFmt&>(rHt2).GetSortNumber();
OSL_ENSURE( nS1 != nS2, "AUTOSTYLES: lcl_IsLessStart trouble" );
if ( nS1 != nS2 ) // robust
return nS1 < nS2;
@@ -99,7 +99,7 @@ static BOOL lcl_IsLessStart( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
*************************************************************************/
// Zuerst nach Ende danach nach Ptr
-static BOOL lcl_IsLessEnd( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
+static sal_Bool lcl_IsLessEnd( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
{
const xub_StrLen nHt1 = *rHt1.GetAnyEnd();
const xub_StrLen nHt2 = *rHt2.GetAnyEnd();
@@ -107,14 +107,14 @@ static BOOL lcl_IsLessEnd( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
{
if ( *rHt1.GetStart() == *rHt2.GetStart() )
{
- const USHORT nWhich1 = rHt1.Which();
- const USHORT nWhich2 = rHt2.Which();
+ const sal_uInt16 nWhich1 = rHt1.Which();
+ const sal_uInt16 nWhich2 = rHt2.Which();
if ( nWhich1 == nWhich2 )
{
if ( RES_TXTATR_CHARFMT == nWhich1 )
{
- const USHORT nS1 = static_cast<const SwTxtCharFmt&>(rHt1).GetSortNumber();
- const USHORT nS2 = static_cast<const SwTxtCharFmt&>(rHt2).GetSortNumber();
+ const sal_uInt16 nS1 = static_cast<const SwTxtCharFmt&>(rHt1).GetSortNumber();
+ const sal_uInt16 nS2 = static_cast<const SwTxtCharFmt&>(rHt2).GetSortNumber();
OSL_ENSURE( nS1 != nS2, "AUTOSTYLES: lcl_IsLessEnd trouble" );
if ( nS1 != nS2 ) // robust
return nS1 > nS2;
@@ -135,9 +135,9 @@ static BOOL lcl_IsLessEnd( const SwTxtAttr &rHt1, const SwTxtAttr &rHt2 )
* SwpHtStart::Seek_Entry()
*************************************************************************/
-BOOL SwpHtStart::Seek_Entry( const SwTxtAttr *pElement, USHORT *pPos ) const
+sal_Bool SwpHtStart::Seek_Entry( const SwTxtAttr *pElement, sal_uInt16 *pPos ) const
{
- USHORT nOben = Count(), nMitte, nUnten = 0;
+ sal_uInt16 nOben = Count(), nMitte, nUnten = 0;
if( nOben > 0 )
{
nOben--;
@@ -148,7 +148,7 @@ BOOL SwpHtStart::Seek_Entry( const SwTxtAttr *pElement, USHORT *pPos ) const
if( IsEqual( *pMitte, *pElement ) )
{
*pPos = nMitte;
- return TRUE;
+ return sal_True;
}
else
if( lcl_IsLessStart( *pMitte, *pElement ) )
@@ -157,23 +157,23 @@ BOOL SwpHtStart::Seek_Entry( const SwTxtAttr *pElement, USHORT *pPos ) const
if( nMitte == 0 )
{
*pPos = nUnten;
- return FALSE;
+ return sal_False;
}
else
nOben = nMitte - 1;
}
}
*pPos = nUnten;
- return FALSE;
+ return sal_False;
}
/*************************************************************************
* SwpHtEnd::Seek_Entry()
*************************************************************************/
-BOOL SwpHtEnd::Seek_Entry( const SwTxtAttr *pElement, USHORT *pPos ) const
+sal_Bool SwpHtEnd::Seek_Entry( const SwTxtAttr *pElement, sal_uInt16 *pPos ) const
{
- USHORT nOben = Count(), nMitte, nUnten = 0;
+ sal_uInt16 nOben = Count(), nMitte, nUnten = 0;
if( nOben > 0 )
{
nOben--;
@@ -184,7 +184,7 @@ BOOL SwpHtEnd::Seek_Entry( const SwTxtAttr *pElement, USHORT *pPos ) const
if( IsEqual( *pMitte, *pElement ) )
{
*pPos = nMitte;
- return TRUE;
+ return sal_True;
}
else
if( lcl_IsLessEnd( *pMitte, *pElement ) )
@@ -193,14 +193,14 @@ BOOL SwpHtEnd::Seek_Entry( const SwTxtAttr *pElement, USHORT *pPos ) const
if( nMitte == 0 )
{
*pPos = nUnten;
- return FALSE;
+ return sal_False;
}
else
nOben = nMitte - 1;
}
}
*pPos = nUnten;
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -211,7 +211,7 @@ void SwpHintsArray::Insert( const SwTxtAttr *pHt )
{
Resort();
#if OSL_DEBUG_LEVEL > 1
- USHORT nPos;
+ sal_uInt16 nPos;
OSL_ENSURE(!m_HintStarts.Seek_Entry( pHt, &nPos ),
"Insert: hint already in HtStart");
OSL_ENSURE(!m_HintEnds.Seek_Entry( pHt, &nPos ),
@@ -221,7 +221,7 @@ void SwpHintsArray::Insert( const SwTxtAttr *pHt )
m_HintEnds.Insert( pHt );
}
-void SwpHintsArray::DeleteAtPos( const USHORT nPos )
+void SwpHintsArray::DeleteAtPos( const sal_uInt16 nPos )
{
// optimization: nPos is the position in the Starts array
const SwTxtAttr *pHt = m_HintStarts[ nPos ];
@@ -229,7 +229,7 @@ void SwpHintsArray::DeleteAtPos( const USHORT nPos )
Resort();
- USHORT nEndPos;
+ sal_uInt16 nEndPos;
m_HintEnds.Seek_Entry( pHt, &nEndPos );
m_HintEnds.Remove( nEndPos );
}
@@ -260,7 +260,7 @@ bool SwpHintsArray::Check() const
const SwTxtAttr *pLastStart = 0;
const SwTxtAttr *pLastEnd = 0;
- for( USHORT i = 0; i < Count(); ++i )
+ for( sal_uInt16 i = 0; i < Count(); ++i )
{
// --- Start-Kontrolle ---
@@ -312,7 +312,7 @@ bool SwpHintsArray::Check() const
CHECK_ERR( STRING_LEN != nIdx, "HintsCheck: no GetEndOf" );
// 7a) character attributes in array?
- USHORT nWhich = pHt->Which();
+ sal_uInt16 nWhich = pHt->Which();
CHECK_ERR( !isCHRATR(nWhich),
"HintsCheck: Character attribute in start array" );
@@ -343,7 +343,7 @@ bool SwpHintsArray::Check() const
// 9) nesting portion check
if (pHtThis->IsNesting())
{
- for ( USHORT j = 0; j < Count(); ++j )
+ for ( sal_uInt16 j = 0; j < Count(); ++j )
{
SwTxtAttr const * const pOther( m_HintStarts[j] );
if ( pOther->IsNesting() && (i != j) )
@@ -361,7 +361,7 @@ bool SwpHintsArray::Check() const
// 10) dummy char check (unfortunately cannot check SwTxtNode::m_Text)
if (pHtThis->HasDummyChar())
{
- for ( USHORT j = 0; j < i; ++j )
+ for ( sal_uInt16 j = 0; j < i; ++j )
{
SwTxtAttr const * const pOther( m_HintStarts[j] );
if (pOther->HasDummyChar())
@@ -390,7 +390,7 @@ bool SwpHintsArray::Resort()
{
bool bResort = false;
const SwTxtAttr *pLast = 0;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < m_HintStarts.Count(); ++i )
{
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index f94f708a0c6a..1a7dced519fb 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -63,6 +63,7 @@
#include <charfmt.hxx>
#include <ndtxt.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docary.hxx>
#include <pam.hxx> // fuer SwPosition
#include <fldbas.hxx>
@@ -92,6 +93,10 @@
#include <svl/intitem.hxx>
#include <list.hxx>
+
+using namespace ::com::sun::star;
+
+
SV_DECL_PTRARR( TmpHints, SwTxtAttr*, 0, 4 )
TYPEINIT1( SwTxtNode, SwCntntNode )
@@ -142,8 +147,8 @@ SwTxtNode *SwNodes::MakeTxtNode( const SwNodeIndex & rWhere,
// 1. den Nachfolger nehmen
// 2. den Vorgaenger
- SwNode *pNd;
- switch( ( pNd = (*this)[aTmp] )->GetNodeType() )
+ SwNode * pNd = & aTmp.GetNode();
+ switch (pNd->GetNodeType())
{
case ND_TABLENODE:
((SwTableNode*)pNd)->MakeFrms( aIdx );
@@ -175,7 +180,7 @@ SwTxtNode *SwNodes::MakeTxtNode( const SwNodeIndex & rWhere,
{
if( pNd->StartOfSectionNode()->GetSectionNode()->GetSection().IsHiddenFlag())
{
- if( !GoPrevSection( &aTmp, TRUE, FALSE ) ||
+ if( !GoPrevSection( &aTmp, sal_True, sal_False ) ||
aTmp.GetNode().FindTableNode() !=
pNode->FindTableNode() )
return pNode; // schade, das wars
@@ -199,7 +204,7 @@ SwTxtNode *SwNodes::MakeTxtNode( const SwNodeIndex & rWhere,
return pNode;
break;
}
- } while( TRUE );
+ } while( sal_True );
}
// --------------------
@@ -255,7 +260,7 @@ SwTxtNode::~SwTxtNode()
SwpHints* pTmpHints = m_pSwpHints;
m_pSwpHints = 0;
- for( USHORT j = pTmpHints->Count(); j; )
+ for( sal_uInt16 j = pTmpHints->Count(); j; )
// erst muss das Attribut aus dem Array entfernt werden,
// denn sonst wuerde es sich selbst loeschen (Felder) !!!!
DestroyAttr( pTmpHints->GetTextHint( --j ) );
@@ -296,7 +301,7 @@ void lcl_ChangeFtnRef( SwTxtNode &rNode )
// of node <rNode> in order to invalidate position of its first content.
// Thus, in its <MakeAll()> it will checked its position relative to its reference.
SwFtnFrm* pFirstFtnOfNode = 0;
- for( USHORT j = pSwpHints->Count(); j; )
+ for( sal_uInt16 j = pSwpHints->Count(); j; )
{
pHt = pSwpHints->GetTextHint(--j);
if (RES_TXTATR_FTN == pHt->Which())
@@ -314,7 +319,7 @@ void lcl_ChangeFtnRef( SwTxtNode &rNode )
SwCntntNode *pNd = aIdx.GetNode().GetCntntNode();
if ( !pNd )
pNd = pFrm->GetAttrSet()->GetDoc()->
- GetNodes().GoNextSection( &aIdx, TRUE, FALSE );
+ GetNodes().GoNextSection( &aIdx, sal_True, sal_False );
if ( !pNd )
continue;
SwClientIter aIter( *pNd );
@@ -334,7 +339,7 @@ void lcl_ChangeFtnRef( SwTxtNode &rNode )
{
pFtn->SetRef( pFrm );
pFtn = pFtn->GetFollow();
- ((SwTxtFrm*)pFrm)->SetFtn( TRUE );
+ ((SwTxtFrm*)pFrm)->SetFtn( sal_True );
}
}
#if OSL_DEBUG_LEVEL > 1
@@ -368,7 +373,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
const xub_StrLen nSplitPos = rPos.nContent.GetIndex();
const xub_StrLen nTxtLen = m_Text.Len();
SwTxtNode* const pNode =
- _MakeNewTxtNode( rPos.nNode, FALSE, nSplitPos==nTxtLen );
+ _MakeNewTxtNode( rPos.nNode, sal_False, nSplitPos==nTxtLen );
// the first paragraph gets the XmlId,
// _except_ if it is empty and the second is not empty
@@ -451,7 +456,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
// Attribute loeschen
if ( HasHints() )
{
- for ( USHORT j = m_pSwpHints->Count(); j; )
+ for ( sal_uInt16 j = m_pSwpHints->Count(); j; )
{
SwTxtAttr* const pHt = m_pSwpHints->GetTextHint( --j );
if ( RES_TXTATR_FLYCNT == pHt ->Which() )
@@ -493,7 +498,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
if ( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
UnlockModify(); // Benachrichtigungen wieder freischalten
@@ -549,7 +554,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
// Attribute loeschen
if ( HasHints() )
{
- for ( USHORT j = m_pSwpHints->Count(); j; )
+ for ( sal_uInt16 j = m_pSwpHints->Count(); j; )
{
SwTxtAttr* const pHt = m_pSwpHints->GetTextHint( --j );
const xub_StrLen* const pEnd = pHt->GetEnd();
@@ -596,7 +601,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
//muesten. #56977# #55001# #56135#
const SfxPoolItem *pItem;
if( GetDepends() && SFX_ITEM_SET == pNode->GetSwAttrSet().
- GetItemState( RES_PAGEDESC, TRUE, &pItem ) )
+ GetItemState( RES_PAGEDESC, sal_True, &pItem ) )
{
pNode->Modify( (SfxPoolItem*)pItem, (SfxPoolItem*)pItem );
}
@@ -607,7 +612,7 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
void SwTxtNode::MoveTxtAttr_To_AttrSet()
{
OSL_ENSURE( m_pSwpHints, "MoveTxtAttr_To_AttrSet without SwpHints?" );
- for ( USHORT i = 0; m_pSwpHints && i < m_pSwpHints->Count(); ++i )
+ for ( sal_uInt16 i = 0; m_pSwpHints && i < m_pSwpHints->Count(); ++i )
{
SwTxtAttr *pHt = m_pSwpHints->GetTextHint(i);
@@ -713,7 +718,7 @@ SwCntntNode *SwTxtNode::JoinNext()
if( pTxtNode->HasAnyIndex() )
{
// alle Crsr/StkCrsr/UnoCrsr aus dem Loeschbereich verschieben
- pDoc->CorrAbs( aIdx, SwPosition( *this ), nOldLen, TRUE );
+ pDoc->CorrAbs( aIdx, SwPosition( *this ), nOldLen, sal_True );
}
rNds.Delete(aIdx);
SetWrong( pList, false );
@@ -722,7 +727,7 @@ SwCntntNode *SwTxtNode::JoinNext()
InvalidateNumRule();
}
else {
- OSL_ENSURE( FALSE, "kein TxtNode." );
+ OSL_ENSURE( sal_False, "kein TxtNode." );
}
return this;
@@ -808,7 +813,7 @@ SwCntntNode *SwTxtNode::JoinPrev()
if( pTxtNode->HasAnyIndex() )
{
// alle Crsr/StkCrsr/UnoCrsr aus dem Loeschbereich verschieben
- pDoc->CorrAbs( aIdx, SwPosition( *this ), nLen, TRUE );
+ pDoc->CorrAbs( aIdx, SwPosition( *this ), nLen, sal_True );
}
rNds.Delete(aIdx);
SetWrong( pList, false );
@@ -817,7 +822,7 @@ SwCntntNode *SwTxtNode::JoinPrev()
InvalidateNumRule();
}
else {
- OSL_ENSURE( FALSE, "kein TxtNode." );
+ OSL_ENSURE( sal_False, "kein TxtNode." );
}
return this;
@@ -850,7 +855,7 @@ void SwTxtNode::NewAttrSet( SwAttrPool& rPool )
void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
const bool bNegative, const bool bDelete )
{
- SetAutoCompleteWordDirty( TRUE );
+ SetAutoCompleteWordDirty( sal_True );
::std::auto_ptr<TmpHints> pCollector;
const xub_StrLen nChangePos = rPos.GetIndex();
@@ -860,7 +865,7 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
if ( bNegative )
{
const xub_StrLen nChangeEnd = nChangePos + nChangeLen;
- for ( USHORT n = 0; n < m_pSwpHints->Count(); ++n )
+ for ( sal_uInt16 n = 0; n < m_pSwpHints->Count(); ++n )
{
SwTxtAttr * const pHint = m_pSwpHints->GetTextHint(n);
xub_StrLen * const pStart = pHint->GetStart();
@@ -899,13 +904,13 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
{
bool bNoExp = false;
bool bResort = false;
- const USHORT coArrSz = static_cast<USHORT>(RES_TXTATR_WITHEND_END) -
- static_cast<USHORT>(RES_CHRATR_BEGIN);
+ const sal_uInt16 coArrSz = static_cast<sal_uInt16>(RES_TXTATR_WITHEND_END) -
+ static_cast<sal_uInt16>(RES_CHRATR_BEGIN);
- BOOL aDontExp[ coArrSz ];
- memset( &aDontExp, 0, coArrSz * sizeof(BOOL) );
+ sal_Bool aDontExp[ coArrSz ];
+ memset( &aDontExp, 0, coArrSz * sizeof(sal_Bool) );
- for ( USHORT n = 0; n < m_pSwpHints->Count(); ++n )
+ for ( sal_uInt16 n = 0; n < m_pSwpHints->Count(); ++n )
{
SwTxtAttr * const pHint = m_pSwpHints->GetTextHint(n);
xub_StrLen * const pStart = pHint->GetStart();
@@ -926,13 +931,13 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
}
else // *pEnd == nChangePos
{
- USHORT nWhPos;
- const USHORT nWhich = pHint->Which();
+ sal_uInt16 nWhPos;
+ const sal_uInt16 nWhich = pHint->Which();
OSL_ENSURE(!isCHRATR(nWhich), "Update: char attr hint?");
if (isCHRATR(nWhich) || isTXTATR_WITHEND(nWhich))
{
- nWhPos = static_cast<USHORT>(nWhich -
+ nWhPos = static_cast<sal_uInt16>(nWhich -
RES_CHRATR_BEGIN);
}
else
@@ -948,13 +953,13 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
if ( pHint->IsCharFmtAttr() )
{
bNoExp = true;
- aDontExp[ static_cast<USHORT>(RES_TXTATR_CHARFMT) - static_cast<USHORT>(RES_CHRATR_BEGIN) ]
- = TRUE;
- aDontExp[ static_cast<USHORT>(RES_TXTATR_INETFMT) - static_cast<USHORT>(RES_CHRATR_BEGIN) ]
- = TRUE;
+ aDontExp[ static_cast<sal_uInt16>(RES_TXTATR_CHARFMT) - static_cast<sal_uInt16>(RES_CHRATR_BEGIN) ]
+ = sal_True;
+ aDontExp[ static_cast<sal_uInt16>(RES_TXTATR_INETFMT) - static_cast<sal_uInt16>(RES_CHRATR_BEGIN) ]
+ = sal_True;
}
else
- aDontExp[ nWhPos ] = TRUE;
+ aDontExp[ nWhPos ] = sal_True;
}
else if( bNoExp )
{
@@ -962,8 +967,8 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
{
pCollector.reset( new TmpHints );
}
- USHORT nCollCnt = pCollector->Count();
- for( USHORT i = 0; i < nCollCnt; ++i )
+ sal_uInt16 nCollCnt = pCollector->Count();
+ for( sal_uInt16 i = 0; i < nCollCnt; ++i )
{
SwTxtAttr *pTmp = (*pCollector)[ i ];
if( nWhich == pTmp->Which() )
@@ -997,7 +1002,7 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
if ( !bNegative && !bDelete )
{
const SwRedlineTbl& rTbl = GetDoc()->GetRedlineTbl();
- for ( USHORT i = 0; i < rTbl.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rTbl.Count(); ++i )
{
SwRedline *const pRedl = rTbl[ i ];
if ( pRedl->HasMark() )
@@ -1062,8 +1067,8 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
if ( pCollector.get() )
{
- const USHORT nCount = pCollector->Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ const sal_uInt16 nCount = pCollector->Count();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
m_pSwpHints->TryInsertHint( (*pCollector)[ i ], *this );
}
@@ -1116,8 +1121,8 @@ void SwTxtNode::_ChgTxtCollUpdateNum( const SwTxtFmtColl *pOldColl,
// Wenn man sich genau am Ende einer Text- bzw. INetvorlage befindet,
// bekommt diese das DontExpand-Flag verpasst
-BOOL SwTxtNode::DontExpandFmt( const SwIndex& rIdx, bool bFlag,
- BOOL bFmtToTxtAttributes )
+sal_Bool SwTxtNode::DontExpandFmt( const SwIndex& rIdx, bool bFlag,
+ sal_Bool bFmtToTxtAttributes )
{
const xub_StrLen nIdx = rIdx.GetIndex();
if ( bFmtToTxtAttributes && nIdx == m_Text.Len() )
@@ -1125,11 +1130,11 @@ BOOL SwTxtNode::DontExpandFmt( const SwIndex& rIdx, bool bFlag,
FmtToTxtAttr( this );
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( HasHints() )
{
- const USHORT nEndCnt = m_pSwpHints->GetEndCount();
- USHORT nPos = nEndCnt;
+ const sal_uInt16 nEndCnt = m_pSwpHints->GetEndCount();
+ sal_uInt16 nPos = nEndCnt;
while( nPos )
{
SwTxtAttr *pTmp = m_pSwpHints->GetEnd( --nPos );
@@ -1141,7 +1146,7 @@ BOOL SwTxtNode::DontExpandFmt( const SwIndex& rIdx, bool bFlag,
else if( bFlag != pTmp->DontExpand() && !pTmp->IsLockExpandFlag()
&& *pEnd > *pTmp->GetStart())
{
- bRet = TRUE;
+ bRet = sal_True;
m_pSwpHints->NoteInHistory( pTmp );
pTmp->SetDontExpand( bFlag );
}
@@ -1173,7 +1178,7 @@ lcl_GetTxtAttrs(
xub_StrLen const nIndex, RES_TXTATR const nWhich,
enum SwTxtNode::GetTxtAttrMode const eMode)
{
- USHORT const nSize = (pSwpHints) ? pSwpHints->Count() : 0;
+ sal_uInt16 const nSize = (pSwpHints) ? pSwpHints->Count() : 0;
xub_StrLen nPreviousIndex(0); // index of last hint with nWhich
bool (*pMatchFunc)(xub_StrLen const, xub_StrLen const, xub_StrLen const)=0;
switch (eMode)
@@ -1184,7 +1189,7 @@ lcl_GetTxtAttrs(
default: OSL_ASSERT(false);
}
- for( USHORT i = 0; i < nSize; ++i )
+ for( sal_uInt16 i = 0; i < nSize; ++i )
{
SwTxtAttr *const pHint = pSwpHints->GetTextHint(i);
xub_StrLen const nHintStart( *(pHint->GetStart()) );
@@ -1264,8 +1269,8 @@ SwCharFmt* lcl_FindCharFmt( const SwCharFmts* pCharFmts, const XubString& rName
if( rName.Len() )
{
SwCharFmt* pFmt;
- USHORT nArrLen = pCharFmts->Count();
- for( USHORT i = 1; i < nArrLen; i++ )
+ sal_uInt16 nArrLen = pCharFmts->Count();
+ for( sal_uInt16 i = 1; i < nArrLen; i++ )
{
pFmt = (*pCharFmts)[ i ];
if( pFmt->GetName().CompareTo( rName ) == COMPARE_EQUAL )
@@ -1275,7 +1280,7 @@ SwCharFmt* lcl_FindCharFmt( const SwCharFmts* pCharFmts, const XubString& rName
return NULL;
}
-void lcl_CopyHint( const USHORT nWhich, const SwTxtAttr * const pHt,
+void lcl_CopyHint( const sal_uInt16 nWhich, const SwTxtAttr * const pHt,
SwTxtAttr *const pNewHt, SwDoc *const pOtherDoc, SwTxtNode *const pDest )
{
OSL_ENSURE( nWhich == pHt->Which(), "Falsche Hint-Id" );
@@ -1414,7 +1419,7 @@ void SwTxtNode::CopyAttr( SwTxtNode *pDest, const xub_StrLen nTxtStartIdx,
SwDoc* const pOtherDoc = (pDest->GetDoc() != GetDoc()) ?
pDest->GetDoc() : 0;
- for ( USHORT i = 0; i < m_pSwpHints->Count(); i++ )
+ for ( sal_uInt16 i = 0; i < m_pSwpHints->Count(); i++ )
{
SwTxtAttr *const pHt = m_pSwpHints->GetTextHint(i);
xub_StrLen const nAttrStartIdx = *pHt->GetStart();
@@ -1428,7 +1433,7 @@ void SwTxtNode::CopyAttr( SwTxtNode *pDest, const xub_StrLen nTxtStartIdx,
( *pEndIdx == nTxtStartIdx &&
nAttrStartIdx == nTxtStartIdx ) ) )
{
- USHORT const nWhich = pHt->Which();
+ sal_uInt16 const nWhich = pHt->Which();
if ( RES_TXTATR_REFMARK != nWhich )
{
// attribute in the area => copy
@@ -1576,7 +1581,8 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
}
}
- const bool bUndoNodes = !pOtherDoc && GetDoc()->GetUndoNds() == &GetNodes();
+ bool const bUndoNodes = !pOtherDoc
+ && GetDoc()->GetIDocumentUndoRedo().IsUndoNodes(GetNodes());
// Ende erst jetzt holen, weil beim Kopieren in sich selbst der
// Start-Index und alle Attribute vorher aktualisiert werden.
@@ -1586,7 +1592,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
// 2. Attribute kopieren
// durch das Attribute-Array, bis der Anfang des Geltungsbereiches
// des Attributs hinter dem zu kopierenden Bereich liegt
- const USHORT nSize = m_pSwpHints ? m_pSwpHints->Count() : 0;
+ const sal_uInt16 nSize = m_pSwpHints ? m_pSwpHints->Count() : 0;
// wird in sich selbst kopiert, dann kann beim Einfuegen ein
// Attribut geloescht werden. Darum erst ins Tmp-Array kopieren und
@@ -1596,9 +1602,9 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
// Del-Array fuer alle RefMarks ohne Ausdehnung
SwpHts aRefMrkArr;
- USHORT nDeletedDummyChars(0);
+ sal_uInt16 nDeletedDummyChars(0);
//Achtung: kann ungueltig sein!!
- for (USHORT n = 0; ( n < nSize ); ++n)
+ for (sal_uInt16 n = 0; ( n < nSize ); ++n)
{
const xub_StrLen nAttrStartIdx = *(*m_pSwpHints)[n]->GetStart();
if (!( nAttrStartIdx < nEnd))
@@ -1606,7 +1612,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(n);
const xub_StrLen * const pEndIdx = pHt->GetEnd();
- const USHORT nWhich = pHt->Which();
+ const sal_uInt16 nWhich = pHt->Which();
// JP 26.04.94: REFMARK's werden nie kopiert. Hat das Refmark aber
// keinen Bereich umspannt, so steht im Text ein 255
@@ -1696,14 +1702,14 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
// nur falls im Array Attribute stehen (kann nur beim Kopieren
// sich selbst passieren!!)
- for ( USHORT i = 0; i < aArr.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aArr.Count(); ++i )
{
InsertHint( aArr[ i ], nsSetAttrMode::SETATTR_NOTXTATRCHR );
}
if( pDest->GetpSwpHints() )
{
- for ( USHORT i = 0; i < aRefMrkArr.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aRefMrkArr.Count(); ++i )
{
SwTxtAttr * const pNewHt = aRefMrkArr[i];
if( pNewHt->GetEnd() )
@@ -1727,7 +1733,7 @@ void SwTxtNode::InsertText( const XubString & rStr, const SwIndex & rIdx,
const IDocumentContentOperations::InsertFlags nMode )
{
OSL_ENSURE( rIdx <= m_Text.Len(), "SwTxtNode::InsertText: invalid index." );
- OSL_ENSURE( (ULONG)m_Text.Len() + (ULONG)rStr.Len() <= STRING_LEN,
+ OSL_ENSURE( (sal_uLong)m_Text.Len() + (sal_uLong)rStr.Len() <= STRING_LEN,
"SwTxtNode::InsertText: node text with insertion > STRING_LEN." );
xub_StrLen aPos = rIdx.GetIndex();
@@ -1737,10 +1743,10 @@ void SwTxtNode::InsertText( const XubString & rStr, const SwIndex & rIdx,
if ( !nLen ) return;
- BOOL bOldExpFlg = IsIgnoreDontExpand();
+ sal_Bool bOldExpFlg = IsIgnoreDontExpand();
if (nMode & IDocumentContentOperations::INS_FORCEHINTEXPAND)
{
- SetIgnoreDontExpand( TRUE );
+ SetIgnoreDontExpand( sal_True );
}
Update( rIdx, nLen ); // text content changed!
@@ -1752,11 +1758,11 @@ void SwTxtNode::InsertText( const XubString & rStr, const SwIndex & rIdx,
// analog zu Insert(char) in txtedt.cxx:
// 1) bei bHintExp leere Hints an rIdx.GetIndex suchen und aufspannen
- // 2) bei bHintExp == FALSE mitgezogene Feldattribute zuruecksetzen
+ // 2) bei bHintExp == sal_False mitgezogene Feldattribute zuruecksetzen
if ( HasHints() )
{
- for ( USHORT i = 0; i < m_pSwpHints->Count() &&
+ for ( sal_uInt16 i = 0; i < m_pSwpHints->Count() &&
rIdx >= *(*m_pSwpHints)[i]->GetStart(); ++i )
{
SwTxtAttr * const pHt = m_pSwpHints->GetTextHint( i );
@@ -1782,7 +1788,7 @@ void SwTxtNode::InsertText( const XubString & rStr, const SwIndex & rIdx,
&& (*pEndIdx == *pHt->GetStart()) )
{
*pHt->GetStart() = *pHt->GetStart() - nLen;
- const USHORT nAktLen = m_pSwpHints->Count();
+ const sal_uInt16 nAktLen = m_pSwpHints->Count();
m_pSwpHints->DeleteAtPos(i);
InsertHint( pHt/* AUTOSTYLES:, nsSetAttrMode::SETATTR_NOHINTADJUST*/ );
if ( nAktLen > m_pSwpHints->Count() && i )
@@ -1894,7 +1900,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
// 2. Attribute verschieben
// durch das Attribute-Array, bis der Anfang des Geltungsbereiches
// des Attributs hinter dem zu verschiebenden Bereich liegt
- USHORT nAttrCnt = 0;
+ sal_uInt16 nAttrCnt = 0;
while ( m_pSwpHints && nAttrCnt < m_pSwpHints->Count() )
{
SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(nAttrCnt);
@@ -1902,7 +1908,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
if (!( nAttrStartIdx < nEnd ))
break;
const xub_StrLen * const pEndIdx = pHt->GetEnd();
- const USHORT nWhich = pHt->Which();
+ const sal_uInt16 nWhich = pHt->Which();
SwTxtAttr *pNewHt = 0;
if(nAttrStartIdx < nTxtStartIdx)
@@ -1956,12 +1962,12 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
if( bUpdate )
{
// Update aller Indizies
- Update( rDestStart, nLen, FALSE, TRUE );
+ Update( rDestStart, nLen, sal_False, sal_True );
}
CHECK_SWPHINTS(this);
- Update( rStart, nLen, TRUE, TRUE );
+ Update( rStart, nLen, sal_True, sal_True );
CHECK_SWPHINTS(this);
@@ -1975,7 +1981,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
nDestStart = nDestStart - nLen;
}
- for ( USHORT n = 0; n < aArr.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < aArr.Count(); ++n )
{
SwTxtAttr *const pNewHt = aArr[n];
*pNewHt->GetStart() = nDestStart + *pNewHt->GetStart();
@@ -1998,7 +2004,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
if( bUpdate )
{
// Update aller Indizies
- pDest->Update( rDestStart, nLen, FALSE, TRUE);
+ pDest->Update( rDestStart, nLen, sal_False, sal_True);
}
CHECK_SWPHINTS(pDest);
@@ -2006,8 +2012,8 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
const xub_StrLen nEnd = rStart.GetIndex() + nLen;
SwDoc* const pOtherDoc = (pDest->GetDoc() != GetDoc())
? pDest->GetDoc() : 0;
- const bool bUndoNodes =
- !pOtherDoc && GetDoc()->GetUndoNds() == &GetNodes();
+ bool const bUndoNodes = !pOtherDoc
+ && GetDoc()->GetIDocumentUndoRedo().IsUndoNodes(GetNodes());
OSL_ENSURE(!pOtherDoc,
"mst: entering dead and bitrotted code; fasten your seatbelts!");
@@ -2038,7 +2044,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
// 2. Attribute verschieben
// durch das Attribute-Array, bis der Anfang des Geltungsbereiches
// des Attributs hinter dem zu verschiebenden Bereich liegt
- USHORT nAttrCnt = 0;
+ sal_uInt16 nAttrCnt = 0;
while ( m_pSwpHints && (nAttrCnt < m_pSwpHints->Count()) )
{
SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(nAttrCnt);
@@ -2046,7 +2052,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
if (!( nAttrStartIdx < nEnd ))
break;
const xub_StrLen * const pEndIdx = pHt->GetEnd();
- const USHORT nWhich = pHt->Which();
+ const sal_uInt16 nWhich = pHt->Which();
SwTxtAttr *pNewHt = 0;
// if the hint has a dummy character, then it must not be split!
@@ -2145,9 +2151,9 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
++nAttrCnt;
}
}
- Update( rStart, nLen, TRUE, TRUE );
+ Update( rStart, nLen, sal_True, sal_True );
- for ( USHORT n = 0; n < aArr.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < aArr.Count(); ++n )
{
SwTxtAttr * const pHt = aArr[ n ];
*pHt->GetStart() = *pHt->GetEnd() = rStart.GetIndex();
@@ -2156,7 +2162,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
}
else
{
- Update( rStart, nLen, TRUE, TRUE );
+ Update( rStart, nLen, sal_True, sal_True );
}
CHECK_SWPHINTS(this);
@@ -2188,7 +2194,7 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const xub_StrLen nCount,
* die im Bereich liegen und nicht am Ende des Bereiches liegen
*/
- for ( USHORT i = 0; m_pSwpHints && i < m_pSwpHints->Count(); ++i )
+ for ( sal_uInt16 i = 0; m_pSwpHints && i < m_pSwpHints->Count(); ++i )
{
SwTxtAttr *pHt = m_pSwpHints->GetTextHint(i);
@@ -2201,7 +2207,7 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const xub_StrLen nCount,
break; // hints are sorted by end, so break here
const xub_StrLen* pHtEndIdx = pHt->GetEnd();
- const USHORT nWhich = pHt->Which();
+ const sal_uInt16 nWhich = pHt->Which();
if( !pHtEndIdx )
{
@@ -2253,7 +2259,7 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const xub_StrLen nCount,
TryDeleteSwpHints();
- Update( rIdx, nCnt, TRUE );
+ Update( rIdx, nCnt, sal_True );
if( 1 == nCnt )
{
@@ -2289,12 +2295,12 @@ void SwTxtNode::GCAttr()
return;
bool bChanged = false;
- USHORT nMin = m_Text.Len(),
+ sal_uInt16 nMin = m_Text.Len(),
nMax = 0;
- BOOL bAll = nMin != 0; // Bei leeren Absaetzen werden nur die
+ sal_Bool bAll = nMin != 0; // Bei leeren Absaetzen werden nur die
// INet-Formate entfernt.
- for ( USHORT i = 0; m_pSwpHints && i < m_pSwpHints->Count(); ++i )
+ for ( sal_uInt16 i = 0; m_pSwpHints && i < m_pSwpHints->Count(); ++i )
{
SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(i);
@@ -2327,7 +2333,7 @@ void SwTxtNode::GCAttr()
}
// #i23726#
-SwNumRule* SwTxtNode::_GetNumRule(BOOL bInParent) const
+SwNumRule* SwTxtNode::_GetNumRule(sal_Bool bInParent) const
{
SwNumRule* pRet = 0;
@@ -2349,12 +2355,12 @@ SwNumRule* SwTxtNode::_GetNumRule(BOOL bInParent) const
if ( pRet && pRet == GetDoc()->GetOutlineNumRule() &&
( !HasSwAttrSet() ||
SFX_ITEM_SET !=
- GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, FALSE ) ) )
+ GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, sal_False ) ) )
{
SwTxtFmtColl* pColl = GetTxtColl();
if ( pColl )
{
- const SwNumRuleItem& rDirectItem = pColl->GetNumRule( FALSE );
+ const SwNumRuleItem& rDirectItem = pColl->GetNumRule( sal_False );
if ( rDirectItem.GetValue().Len() == 0 )
{
pRet = 0L;
@@ -2366,7 +2372,7 @@ SwNumRule* SwTxtNode::_GetNumRule(BOOL bInParent) const
return pRet;
}
-SwNumRule* SwTxtNode::GetNumRule(BOOL bInParent) const
+SwNumRule* SwTxtNode::GetNumRule(sal_Bool bInParent) const
{
SwNumRule * pRet = _GetNumRule(bInParent);
@@ -2387,23 +2393,28 @@ void SwTxtNode::NumRuleChgd()
if( IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
- SetInSwFntCache( FALSE );
-
- SvxLRSpaceItem& rLR = (SvxLRSpaceItem&)GetSwAttrSet().GetLRSpace();
+ SetInSwFntCache( sal_False );
- SwModify::Modify( &rLR, &rLR );
+ // Sending "noop" modify in order to cause invalidations of registered
+ // <SwTxtFrm> instances to get the list style change respectively the change
+ // in the list tree reflected in the layout.
+ // Important note:
+ {
+ SvxLRSpaceItem& rLR = (SvxLRSpaceItem&)GetSwAttrSet().GetLRSpace();
+ SwModify::Modify( &rLR, &rLR );
+ }
}
// -> #i27615#
-BOOL SwTxtNode::IsNumbered() const
+sal_Bool SwTxtNode::IsNumbered() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
if ( pRule && IsCountedInList() )
- bResult = TRUE;
+ bResult = sal_True;
return bResult;
}
@@ -2422,8 +2433,8 @@ bool SwTxtNode::HasMarkedLabel() const
}
// <- #i27615#
-SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, BOOL bNext,
- BOOL bChgFollow )
+SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, sal_Bool bNext,
+ sal_Bool bChgFollow )
{
/* hartes PageBreak/PageDesc/ColumnBreak aus AUTO-Set ignorieren */
SwAttrSet* pNewAttrSet = 0;
@@ -2439,38 +2450,38 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, BOOL bNext,
pTmpSet = pNewAttrSet;
// PageBreaks/PageDesc/ColBreak rausschmeissen.
- BOOL bRemoveFromCache = FALSE;
- std::vector<USHORT> aClearWhichIds;
+ sal_Bool bRemoveFromCache = sal_False;
+ std::vector<sal_uInt16> aClearWhichIds;
if ( bNext )
bRemoveFromCache = ( 0 != pNewAttrSet->ClearItem( RES_PAGEDESC ) );
else
aClearWhichIds.push_back( RES_PAGEDESC );
- if( SFX_ITEM_SET == pTmpSet->GetItemState( RES_BREAK, FALSE ) )
+ if( SFX_ITEM_SET == pTmpSet->GetItemState( RES_BREAK, sal_False ) )
{
if ( bNext )
pNewAttrSet->ClearItem( RES_BREAK );
else
aClearWhichIds.push_back( RES_BREAK );
- bRemoveFromCache = TRUE;
+ bRemoveFromCache = sal_True;
}
- if( SFX_ITEM_SET == pTmpSet->GetItemState( RES_KEEP, FALSE ) )
+ if( SFX_ITEM_SET == pTmpSet->GetItemState( RES_KEEP, sal_False ) )
{
if ( bNext )
pNewAttrSet->ClearItem( RES_KEEP );
else
aClearWhichIds.push_back( RES_KEEP );
- bRemoveFromCache = TRUE;
+ bRemoveFromCache = sal_True;
}
- if( SFX_ITEM_SET == pTmpSet->GetItemState( RES_PARATR_SPLIT, FALSE ) )
+ if( SFX_ITEM_SET == pTmpSet->GetItemState( RES_PARATR_SPLIT, sal_False ) )
{
if ( bNext )
pNewAttrSet->ClearItem( RES_PARATR_SPLIT );
else
aClearWhichIds.push_back( RES_PARATR_SPLIT );
- bRemoveFromCache = TRUE;
+ bRemoveFromCache = sal_True;
}
- if(SFX_ITEM_SET == pTmpSet->GetItemState(RES_PARATR_NUMRULE, FALSE))
+ if(SFX_ITEM_SET == pTmpSet->GetItemState(RES_PARATR_NUMRULE, sal_False))
{
SwNumRule * pRule = GetNumRule();
@@ -2486,7 +2497,7 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, BOOL bNext,
bClearHardSetNumRuleWhenFmtCollChanges = true;
// <--
}
- bRemoveFromCache = TRUE;
+ bRemoveFromCache = sal_True;
}
}
@@ -2496,7 +2507,7 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, BOOL bNext,
if( !bNext && bRemoveFromCache && IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
}
SwNodes& rNds = GetNodes();
@@ -2538,12 +2549,12 @@ SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, BOOL bNext,
// --> OD 2007-07-10 #i75353#
if ( bClearHardSetNumRuleWhenFmtCollChanges )
{
- std::vector<USHORT> aClearWhichIds;
+ std::vector<sal_uInt16> aClearWhichIds;
aClearWhichIds.push_back( RES_PARATR_NUMRULE );
if ( ClearItemsFromAttrSet( aClearWhichIds ) != 0 && IsInCache() )
{
SwFrm::GetCache().Delete( this );
- SetInCache( FALSE );
+ SetInCache( sal_False );
}
}
// <--
@@ -2558,7 +2569,7 @@ SwCntntNode* SwTxtNode::AppendNode( const SwPosition & rPos )
{
// Position hinter dem eingefuegt wird
SwNodeIndex aIdx( rPos.nNode, 1 );
- SwTxtNode* pNew = _MakeNewTxtNode( aIdx, TRUE );
+ SwTxtNode* pNew = _MakeNewTxtNode( aIdx, sal_True );
// reset list attributes at appended text node
pNew->ResetAttr( RES_PARATR_LIST_ISRESTART );
@@ -2589,7 +2600,7 @@ SwTxtAttr * SwTxtNode::GetTxtAttrForCharAt( const xub_StrLen nIndex,
{
if ( HasHints() )
{
- for ( USHORT i = 0; i < m_pSwpHints->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < m_pSwpHints->Count(); ++i )
{
SwTxtAttr * const pHint = m_pSwpHints->GetTextHint(i);
const xub_StrLen nStartPos = *pHint->GetStart();
@@ -2608,14 +2619,14 @@ SwTxtAttr * SwTxtNode::GetTxtAttrForCharAt( const xub_StrLen nIndex,
}
// -> #i29560#
-BOOL SwTxtNode::HasNumber() const
+sal_Bool SwTxtNode::HasNumber() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
if ( pRule )
{
- SwNumFmt aFmt(pRule->Get( static_cast<USHORT>(GetActualListLevel())));
+ SwNumFmt aFmt(pRule->Get( static_cast<sal_uInt16>(GetActualListLevel())));
// #i40041#
bResult = aFmt.IsEnumeration() &&
@@ -2625,14 +2636,14 @@ BOOL SwTxtNode::HasNumber() const
return bResult;
}
-BOOL SwTxtNode::HasBullet() const
+sal_Bool SwTxtNode::HasBullet() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
if ( pRule )
{
- SwNumFmt aFmt(pRule->Get( static_cast<USHORT>(GetActualListLevel())));
+ SwNumFmt aFmt(pRule->Get( static_cast<sal_uInt16>(GetActualListLevel())));
bResult = aFmt.IsItemize();
}
@@ -2652,25 +2663,31 @@ XubString SwTxtNode::GetNumString( const bool _bInclPrefixAndSuffixStrings, cons
}
const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
if ( pRule &&
- IsCountedInList() &&
- pRule->Get( static_cast<USHORT>(GetActualListLevel()) ).IsTxtFmt() )
+ IsCountedInList() )
{
- return pRule->MakeNumString( GetNum()->GetNumberVector(),
- _bInclPrefixAndSuffixStrings ? TRUE : FALSE,
- FALSE,
+ SvxNumberType const& rNumberType(
+ pRule->Get( static_cast<sal_uInt16>(GetActualListLevel()) ) );
+ if (rNumberType.IsTxtFmt() ||
+ // #b6432095#
+ (style::NumberingType::NUMBER_NONE == rNumberType.GetNumberingType()))
+ {
+ return pRule->MakeNumString( GetNum()->GetNumberVector(),
+ _bInclPrefixAndSuffixStrings ? sal_True : sal_False,
+ sal_False,
_nRestrictToThisLevel );
+ }
}
return aEmptyStr;
}
-long SwTxtNode::GetLeftMarginWithNum( BOOL bTxtLeft ) const
+long SwTxtNode::GetLeftMarginWithNum( sal_Bool bTxtLeft ) const
{
long nRet = 0;
const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
if( pRule )
{
- const SwNumFmt& rFmt = pRule->Get(static_cast<USHORT>(GetActualListLevel()));
+ const SwNumFmt& rFmt = pRule->Get(static_cast<sal_uInt16>(GetActualListLevel()));
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
@@ -2707,9 +2724,9 @@ long SwTxtNode::GetLeftMarginWithNum( BOOL bTxtLeft ) const
return nRet;
}
-BOOL SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const
+sal_Bool SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const
{
- BOOL bRet( FALSE );
+ sal_Bool bRet( sal_False );
// --> OD 2009-09-08 #i95907#, #b6879723#
rFLOffset = 0;
// <--
@@ -2720,10 +2737,10 @@ BOOL SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const
{
if ( IsCountedInList() )
{
- const SwNumFmt& rFmt = pRule->Get(static_cast<USHORT>(GetActualListLevel()));
+ const SwNumFmt& rFmt = pRule->Get(static_cast<sal_uInt16>(GetActualListLevel()));
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
- rFLOffset = pRule->Get( static_cast<USHORT>(GetActualListLevel() )).GetFirstLineOffset();
+ rFLOffset = pRule->Get( static_cast<sal_uInt16>(GetActualListLevel() )).GetFirstLineOffset();
if (!getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING))
{
@@ -2735,7 +2752,7 @@ BOOL SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const
{
if ( AreListLevelIndentsApplicable() )
{
- rFLOffset = static_cast<USHORT>(rFmt.GetFirstLineIndent());
+ rFLOffset = static_cast<sal_uInt16>(rFmt.GetFirstLineIndent());
}
else if (!getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING))
{
@@ -2745,7 +2762,7 @@ BOOL SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -2763,7 +2780,7 @@ SwTwips SwTxtNode::GetAdditionalIndentForStartingNewList() const
const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
if ( pRule )
{
- const SwNumFmt& rFmt = pRule->Get(static_cast<USHORT>(GetActualListLevel()));
+ const SwNumFmt& rFmt = pRule->Get(static_cast<sal_uInt16>(GetActualListLevel()));
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
nAdditionalIndent = GetSwAttrSet().GetLRSpace().GetLeft();
@@ -2807,7 +2824,7 @@ void SwTxtNode::ClearLRSpaceItemDueToListLevelIndents( SvxLRSpaceItem& o_rLRSpac
const SwNumRule* pRule = GetNumRule();
if ( pRule && GetActualListLevel() >= 0 )
{
- const SwNumFmt& rFmt = pRule->Get(static_cast<USHORT>(GetActualListLevel()));
+ const SwNumFmt& rFmt = pRule->Get(static_cast<sal_uInt16>(GetActualListLevel()));
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
SvxLRSpaceItem aLR( RES_LR_SPACE );
@@ -2826,7 +2843,7 @@ long SwTxtNode::GetLeftMarginForTabCalculation() const
const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0;
if( pRule )
{
- const SwNumFmt& rFmt = pRule->Get(static_cast<USHORT>(GetActualListLevel()));
+ const SwNumFmt& rFmt = pRule->Get(static_cast<sal_uInt16>(GetActualListLevel()));
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
if ( AreListLevelIndentsApplicable() )
@@ -2845,7 +2862,7 @@ long SwTxtNode::GetLeftMarginForTabCalculation() const
}
void SwTxtNode::Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt,
- xub_StrLen nEndPos, BOOL bExpandFlds ) const
+ xub_StrLen nEndPos, sal_Bool bExpandFlds ) const
{
if( GetpSwpHints() )
{
@@ -2868,8 +2885,7 @@ void SwTxtNode::Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt,
{
const XubString aExpand(
static_cast<SwTxtFld const*>(pAttr)->GetFld()
- .GetFld()->ExpandField(
- GetDoc()->IsClipBoard()));
+ .GetFld()->ExpandField(true));
rTxt.Insert( aExpand, nPos );
nPos = nPos + aExpand.Len();
nEndPos = nEndPos + aExpand.Len();
@@ -2924,7 +2940,7 @@ XubString SwTxtNode::GetExpandTxt( const xub_StrLen nIdx,
{
XubString aTxt( GetTxt().Copy( nIdx, nLen ) );
xub_StrLen nTxtStt = nIdx;
- Replace0xFF( aTxt, nTxtStt, aTxt.Len(), TRUE );
+ Replace0xFF( aTxt, nTxtStt, aTxt.Len(), sal_True );
if( bWithNum )
{
XubString aListLabelStr = GetNumString();
@@ -2954,12 +2970,12 @@ XubString SwTxtNode::GetExpandTxt( const xub_StrLen nIdx,
return aTxt;
}
-BOOL SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
- xub_StrLen nIdx, xub_StrLen nLen, BOOL bWithNum,
- BOOL bWithFtn, BOOL bReplaceTabsWithSpaces ) const
+sal_Bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
+ xub_StrLen nIdx, xub_StrLen nLen, sal_Bool bWithNum,
+ sal_Bool bWithFtn, sal_Bool bReplaceTabsWithSpaces ) const
{
if( &rDestNd == this )
- return FALSE;
+ return sal_False;
SwIndex aDestIdx( &rDestNd, rDestNd.GetTxt().Len() );
if( pDestIdx )
@@ -2973,7 +2989,7 @@ BOOL SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
// mask hidden characters
const xub_Unicode cChar = CH_TXTATR_BREAKWORD;
- USHORT nHiddenChrs =
+ sal_uInt16 nHiddenChrs =
SwScriptInfo::MaskHiddenRanges( *this, sTmpText, 0, sTmpText.Len(), cChar );
sTmpText = sTmpText.Copy( nIdx, nLen );
@@ -2984,11 +3000,11 @@ BOOL SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
if ( HasHints() )
{
xub_StrLen nInsPos = nDestStt - nIdx;
- for ( USHORT i = 0; i < m_pSwpHints->Count(); i++ )
+ for ( sal_uInt16 i = 0; i < m_pSwpHints->Count(); i++ )
{
const SwTxtAttr* pHt = (*m_pSwpHints)[i];
const xub_StrLen nAttrStartIdx = *pHt->GetStart();
- const USHORT nWhich = pHt->Which();
+ const sal_uInt16 nWhich = pHt->Which();
if (nIdx + nLen <= nAttrStartIdx)
break; // ueber das Textende
@@ -3017,7 +3033,7 @@ BOOL SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
{
XubString const aExpand(
static_cast<SwTxtFld const*>(pHt)->GetFld().GetFld()
- ->ExpandField(GetDoc()->IsClipBoard()));
+ ->ExpandField(true));
if( aExpand.Len() )
{
aDestIdx++; // dahinter einfuegen;
@@ -3095,7 +3111,7 @@ BOOL SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
}
}
- return TRUE;
+ return sal_True;
}
const ModelToViewHelper::ConversionMap*
@@ -3108,14 +3124,14 @@ const ModelToViewHelper::ConversionMap*
const SwpHints* pSwpHints2 = GetpSwpHints();
xub_StrLen nPos = 0;
- for ( USHORT i = 0; pSwpHints2 && i < pSwpHints2->Count(); ++i )
+ for ( sal_uInt16 i = 0; pSwpHints2 && i < pSwpHints2->Count(); ++i )
{
const SwTxtAttr* pAttr = (*pSwpHints2)[i];
if ( RES_TXTATR_FIELD == pAttr->Which() )
{
const XubString aExpand(
static_cast<SwTxtFld const*>(pAttr)->GetFld().GetFld()
- ->ExpandField(GetDoc()->IsClipBoard()));
+ ->ExpandField(true));
if ( aExpand.Len() > 0 )
{
const xub_StrLen nFieldPos = *pAttr->GetStart();
@@ -3139,15 +3155,15 @@ const ModelToViewHelper::ConversionMap*
}
XubString SwTxtNode::GetRedlineTxt( xub_StrLen nIdx, xub_StrLen nLen,
- BOOL bExpandFlds, BOOL bWithNum ) const
+ sal_Bool bExpandFlds, sal_Bool bWithNum ) const
{
SvUShorts aRedlArr;
const SwDoc* pDoc = GetDoc();
- USHORT nRedlPos = pDoc->GetRedlinePos( *this, nsRedlineType_t::REDLINE_DELETE );
+ sal_uInt16 nRedlPos = pDoc->GetRedlinePos( *this, nsRedlineType_t::REDLINE_DELETE );
if( USHRT_MAX != nRedlPos )
{
// es existiert fuer den Node irgendein Redline-Delete-Object
- const ULONG nNdIdx = GetIndex();
+ const sal_uLong nNdIdx = GetIndex();
for( ; nRedlPos < pDoc->GetRedlineTbl().Count() ; ++nRedlPos )
{
const SwRedline* pTmp = pDoc->GetRedlineTbl()[ nRedlPos ];
@@ -3186,7 +3202,7 @@ XubString SwTxtNode::GetRedlineTxt( xub_StrLen nIdx, xub_StrLen nLen,
XubString aTxt( GetTxt().Copy( nIdx, nLen ) );
xub_StrLen nTxtStt = nIdx, nIdxEnd = nIdx + aTxt.Len();
- for( USHORT n = 0; n < aRedlArr.Count(); n += 2 )
+ for( sal_uInt16 n = 0; n < aRedlArr.Count(); n += 2 )
{
xub_StrLen nStt = aRedlArr[ n ], nEnd = aRedlArr[ n+1 ];
if( ( nIdx <= nStt && nStt <= nIdxEnd ) ||
@@ -3242,8 +3258,8 @@ void SwTxtNode::ReplaceText( const SwIndex& rStart, const xub_StrLen nDelLen,
}
}
- BOOL bOldExpFlg = IsIgnoreDontExpand();
- SetIgnoreDontExpand( TRUE );
+ sal_Bool bOldExpFlg = IsIgnoreDontExpand();
+ SetIgnoreDontExpand( sal_True );
if( nLen && rText.Len() )
{
@@ -3290,7 +3306,7 @@ namespace {
const SfxPoolItem* pOldValue,
const SfxPoolItem* pNewValue )
{
- const USHORT nWhich = pOldValue ? pOldValue->Which() :
+ const sal_uInt16 nWhich = pOldValue ? pOldValue->Which() :
pNewValue ? pNewValue->Which() : 0 ;
bool bNumRuleSet = false;
bool bParagraphStyleChanged = false;
@@ -3340,7 +3356,7 @@ namespace {
sOldNumRule = pFormerNumRuleAtTxtNode->GetName();
}
- if ( dynamic_cast<const SwAttrSetChg*>(pNewValue)->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, FALSE, &pItem ) ==
+ if ( dynamic_cast<const SwAttrSetChg*>(pNewValue)->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, sal_False, &pItem ) ==
SFX_ITEM_SET )
{
// #i70748#
@@ -3447,7 +3463,7 @@ namespace {
false );
// <--
// --> OD 2008-11-19 #i70748#
- if ( dynamic_cast<const SfxUInt16Item &>(rTxtNode.GetAttr( RES_PARATR_OUTLINELEVEL, FALSE )).GetValue() > 0 )
+ if ( dynamic_cast<const SfxUInt16Item &>(rTxtNode.GetAttr( RES_PARATR_OUTLINELEVEL, sal_False )).GetValue() > 0 )
{
rTxtNode.SetEmptyListStyleDueToSetOutlineLevelAttr();
}
@@ -3603,7 +3619,7 @@ void SwTxtNode::SetAttrOutlineLevel(int nLevel)
if ( 0 <= nLevel && nLevel <= MAXLEVEL )
{
SetAttr( SfxUInt16Item( RES_PARATR_OUTLINELEVEL,
- static_cast<UINT16>(nLevel) ) );
+ static_cast<sal_uInt16>(nLevel) ) );
}
}
//<-end
@@ -3643,14 +3659,14 @@ void SwTxtNode::SetAttrListLevel( int nLevel )
}
SfxInt16Item aNewListLevelItem( RES_PARATR_LIST_LEVEL,
- static_cast<INT16>(nLevel) );
+ static_cast<sal_Int16>(nLevel) );
SetAttr( aNewListLevelItem );
}
bool SwTxtNode::HasAttrListLevel() const
{
return GetpSwAttrSet() &&
- GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_LEVEL, FALSE ) == SFX_ITEM_SET;
+ GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_LEVEL, sal_False ) == SFX_ITEM_SET;
}
int SwTxtNode::GetAttrListLevel() const
@@ -3681,7 +3697,7 @@ void SwTxtNode::SetListRestart( bool bRestart )
else
{
SfxBoolItem aNewIsRestartItem( RES_PARATR_LIST_ISRESTART,
- TRUE );
+ sal_True );
SetAttr( aNewIsRestartItem );
}
}
@@ -3709,7 +3725,7 @@ bool SwTxtNode::HasVisibleNumberingOrBullet() const
// --> OD 2008-03-19 #i87154#
// Correction of #newlistlevelattrs#:
// The numbering type has to be checked for bullet lists.
- const SwNumFmt& rFmt = pRule->Get( static_cast<USHORT>(GetActualListLevel() ));
+ const SwNumFmt& rFmt = pRule->Get( static_cast<sal_uInt16>(GetActualListLevel() ));
if ( SVX_NUM_NUMBER_NONE != rFmt.GetNumberingType() ||
pRule->MakeNumString( *(GetNum()) ).Len() > 0 )
{
@@ -3737,7 +3753,7 @@ void SwTxtNode::SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNumber
else
{
SfxInt16Item aNewListRestartValueItem( RES_PARATR_LIST_RESTARTVALUE,
- static_cast<INT16>(nNumber) );
+ static_cast<sal_Int16>(nNumber) );
SetAttr( aNewListRestartValueItem );
}
}
@@ -3746,7 +3762,7 @@ void SwTxtNode::SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNumber
bool SwTxtNode::HasAttrListRestartValue() const
{
return GetpSwAttrSet() &&
- GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_RESTARTVALUE, FALSE ) == SFX_ITEM_SET;
+ GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_RESTARTVALUE, sal_False ) == SFX_ITEM_SET;
}
SwNumberTree::tSwNumTreeNumber SwTxtNode::GetAttrListRestartValue() const
{
@@ -3773,7 +3789,7 @@ SwNumberTree::tSwNumTreeNumber SwTxtNode::GetActualListStartValue() const
if ( pRule )
{
const SwNumFmt* pFmt =
- pRule->GetNumFmt( static_cast<USHORT>(GetAttrListLevel()) );
+ pRule->GetNumFmt( static_cast<sal_uInt16>(GetAttrListLevel()) );
if ( pFmt )
{
nListRestartValue = pFmt->GetStart();
@@ -3810,7 +3826,7 @@ void SwTxtNode::SetCountedInList( bool bCounted )
}
else
{
- SfxBoolItem aIsCountedInListItem( RES_PARATR_LIST_ISCOUNTED, FALSE );
+ SfxBoolItem aIsCountedInListItem( RES_PARATR_LIST_ISCOUNTED, sal_False );
SetAttr( aIsCountedInListItem );
}
}
@@ -3946,13 +3962,13 @@ bool SwTxtNode::AreListLevelIndentsApplicable() const
bAreListLevelIndentsApplicable = false;
}
else if ( HasSwAttrSet() &&
- GetpSwAttrSet()->GetItemState( RES_LR_SPACE, FALSE ) == SFX_ITEM_SET )
+ GetpSwAttrSet()->GetItemState( RES_LR_SPACE, sal_False ) == SFX_ITEM_SET )
{
// paragraph has hard-set indent attributes
bAreListLevelIndentsApplicable = false;
}
else if ( HasSwAttrSet() &&
- GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, FALSE ) == SFX_ITEM_SET )
+ GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, sal_False ) == SFX_ITEM_SET )
{
// list style is directly applied to paragraph and paragraph has no
// hard-set indent attributes
@@ -3967,14 +3983,14 @@ bool SwTxtNode::AreListLevelIndentsApplicable() const
const SwTxtFmtColl* pColl = GetTxtColl();
while ( pColl )
{
- if ( pColl->GetAttrSet().GetItemState( RES_LR_SPACE, FALSE ) == SFX_ITEM_SET )
+ if ( pColl->GetAttrSet().GetItemState( RES_LR_SPACE, sal_False ) == SFX_ITEM_SET )
{
// indent attributes found in the paragraph style hierarchy.
bAreListLevelIndentsApplicable = false;
break;
}
- if ( pColl->GetAttrSet().GetItemState( RES_PARATR_NUMRULE, FALSE ) == SFX_ITEM_SET )
+ if ( pColl->GetAttrSet().GetItemState( RES_PARATR_NUMRULE, sal_False ) == SFX_ITEM_SET )
{
// paragraph style with the list style found and until now no
// indent attributes are found in the paragraph style hierarchy.
@@ -4008,7 +4024,7 @@ bool SwTxtNode::GetListTabStopPosition( long& nListTabStopPosition ) const
const SwNumRule* pNumRule = GetNum() ? GetNum()->GetNumRule() : 0;
if ( pNumRule && HasVisibleNumberingOrBullet() && GetActualListLevel() >= 0 )
{
- const SwNumFmt& rFmt = pNumRule->Get( static_cast<USHORT>(GetActualListLevel()) );
+ const SwNumFmt& rFmt = pNumRule->Get( static_cast<sal_uInt16>(GetActualListLevel()) );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT &&
rFmt.GetLabelFollowedBy() == SvxNumberFormat::LISTTAB )
{
@@ -4049,7 +4065,7 @@ XubString SwTxtNode::GetLabelFollowedBy() const
const SwNumRule* pNumRule = GetNum() ? GetNum()->GetNumRule() : 0;
if ( pNumRule && HasVisibleNumberingOrBullet() && GetActualListLevel() >= 0 )
{
- const SwNumFmt& rFmt = pNumRule->Get( static_cast<USHORT>(GetActualListLevel()) );
+ const SwNumFmt& rFmt = pNumRule->Get( static_cast<sal_uInt16>(GetActualListLevel()) );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
switch ( rFmt.GetLabelFollowedBy() )
@@ -4220,7 +4236,7 @@ namespace {
const SfxBoolItem& aListIsRestartItem =
dynamic_cast<const SfxBoolItem&>(pItem);
if ( aListIsRestartItem.GetValue() !=
- (mrTxtNode.IsListRestart() ? TRUE : FALSE) )
+ (mrTxtNode.IsListRestart() ? sal_True : sal_False) )
{
mbUpdateListRestart = true;
}
@@ -4246,7 +4262,7 @@ namespace {
const SfxBoolItem& aIsCountedInListItem =
dynamic_cast<const SfxBoolItem&>(pItem);
if ( aIsCountedInListItem.GetValue() !=
- (mrTxtNode.IsCountedInList() ? TRUE : FALSE) )
+ (mrTxtNode.IsCountedInList() ? sal_True : sal_False) )
{
mbUpdateListCount = true;
}
@@ -4283,7 +4299,7 @@ namespace {
{
const SfxPoolItem* pItem = 0;
// handle RES_PARATR_NUMRULE
- if ( rItemSet.GetItemState( RES_PARATR_NUMRULE, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_NUMRULE, sal_False, &pItem ) == SFX_ITEM_SET )
{
mrTxtNode.RemoveFromList();
@@ -4299,7 +4315,7 @@ namespace {
}
// handle RES_PARATR_LIST_ID
- if ( rItemSet.GetItemState( RES_PARATR_LIST_ID, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_LIST_ID, sal_False, &pItem ) == SFX_ITEM_SET )
{
const SfxStringItem* pListIdItem =
dynamic_cast<const SfxStringItem*>(pItem);
@@ -4316,7 +4332,7 @@ namespace {
}
// handle RES_PARATR_LIST_LEVEL
- if ( rItemSet.GetItemState( RES_PARATR_LIST_LEVEL, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_LIST_LEVEL, sal_False, &pItem ) == SFX_ITEM_SET )
{
const SfxInt16Item* pListLevelItem =
dynamic_cast<const SfxInt16Item*>(pItem);
@@ -4327,19 +4343,19 @@ namespace {
}
// handle RES_PARATR_LIST_ISRESTART
- if ( rItemSet.GetItemState( RES_PARATR_LIST_ISRESTART, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_LIST_ISRESTART, sal_False, &pItem ) == SFX_ITEM_SET )
{
const SfxBoolItem* pListIsRestartItem =
dynamic_cast<const SfxBoolItem*>(pItem);
if ( pListIsRestartItem->GetValue() !=
- (mrTxtNode.IsListRestart() ? TRUE : FALSE) )
+ (mrTxtNode.IsListRestart() ? sal_True : sal_False) )
{
mbUpdateListRestart = true;
}
}
// handle RES_PARATR_LIST_RESTARTVALUE
- if ( rItemSet.GetItemState( RES_PARATR_LIST_RESTARTVALUE, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_LIST_RESTARTVALUE, sal_False, &pItem ) == SFX_ITEM_SET )
{
const SfxInt16Item* pListRestartValueItem =
dynamic_cast<const SfxInt16Item*>(pItem);
@@ -4351,12 +4367,12 @@ namespace {
}
// handle RES_PARATR_LIST_ISCOUNTED
- if ( rItemSet.GetItemState( RES_PARATR_LIST_ISCOUNTED, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_LIST_ISCOUNTED, sal_False, &pItem ) == SFX_ITEM_SET )
{
const SfxBoolItem* pIsCountedInListItem =
dynamic_cast<const SfxBoolItem*>(pItem);
if ( pIsCountedInListItem->GetValue() !=
- (mrTxtNode.IsCountedInList() ? TRUE : FALSE) )
+ (mrTxtNode.IsCountedInList() ? sal_True : sal_False) )
{
mbUpdateListCount = true;
}
@@ -4364,7 +4380,7 @@ namespace {
// --> OD 2008-11-19 #i70748#
// handle RES_PARATR_OUTLINELEVEL
- if ( rItemSet.GetItemState( RES_PARATR_OUTLINELEVEL, FALSE, &pItem ) == SFX_ITEM_SET )
+ if ( rItemSet.GetItemState( RES_PARATR_OUTLINELEVEL, sal_False, &pItem ) == SFX_ITEM_SET )
{
const SfxUInt16Item* pOutlineLevelItem =
dynamic_cast<const SfxUInt16Item*>(pItem);
@@ -4418,7 +4434,7 @@ namespace {
{
const SfxPoolItem* pItem = 0;
if ( mrTxtNode.GetSwAttrSet().GetItemState( RES_PARATR_NUMRULE,
- TRUE, &pItem )
+ sal_True, &pItem )
!= SFX_ITEM_SET )
{
mrTxtNode.SetEmptyListStyleDueToSetOutlineLevelAttr();
@@ -4430,28 +4446,28 @@ namespace {
// End of class <HandleSetAttrAtTxtNode>
}
-BOOL SwTxtNode::SetAttr( const SfxPoolItem& pItem )
+sal_Bool SwTxtNode::SetAttr( const SfxPoolItem& pItem )
{
const bool bOldIsSetOrResetAttr( mbInSetOrResetAttr );
mbInSetOrResetAttr = true;
HandleSetAttrAtTxtNode aHandleSetAttr( *this, pItem );
- BOOL bRet = SwCntntNode::SetAttr( pItem );
+ sal_Bool bRet = SwCntntNode::SetAttr( pItem );
mbInSetOrResetAttr = bOldIsSetOrResetAttr;
return bRet;
}
-BOOL SwTxtNode::SetAttr( const SfxItemSet& rSet )
+sal_Bool SwTxtNode::SetAttr( const SfxItemSet& rSet )
{
const bool bOldIsSetOrResetAttr( mbInSetOrResetAttr );
mbInSetOrResetAttr = true;
HandleSetAttrAtTxtNode aHandleSetAttr( *this, rSet );
- BOOL bRet = SwCntntNode::SetAttr( rSet );
+ sal_Bool bRet = SwCntntNode::SetAttr( rSet );
mbInSetOrResetAttr = bOldIsSetOrResetAttr;
@@ -4479,8 +4495,8 @@ namespace {
{
public:
HandleResetAttrAtTxtNode( SwTxtNode& rTxtNode,
- const USHORT nWhich1,
- const USHORT nWhich2 );
+ const sal_uInt16 nWhich1,
+ const sal_uInt16 nWhich2 );
HandleResetAttrAtTxtNode( SwTxtNode& rTxtNode,
const SvUShorts& rWhichArr );
HandleResetAttrAtTxtNode( SwTxtNode& rTxtNode );
@@ -4496,8 +4512,8 @@ namespace {
};
HandleResetAttrAtTxtNode::HandleResetAttrAtTxtNode( SwTxtNode& rTxtNode,
- const USHORT nWhich1,
- const USHORT nWhich2 )
+ const sal_uInt16 nWhich1,
+ const sal_uInt16 nWhich2 )
: mrTxtNode( rTxtNode ),
mbListStyleOrIdReset( false ),
mbUpdateListLevel( false ),
@@ -4516,7 +4532,7 @@ namespace {
else if ( nWhich1 <= RES_PARATR_LIST_ID && RES_PARATR_LIST_ID <= nWhich2 )
{
bRemoveFromList = mrTxtNode.GetpSwAttrSet() &&
- mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, FALSE ) == SFX_ITEM_SET;
+ mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, sal_False ) == SFX_ITEM_SET;
// --> OD 2008-10-20 #i92898#
mbListStyleOrIdReset = true;
// <--
@@ -4561,7 +4577,7 @@ namespace {
else if ( nWhich1 == RES_PARATR_LIST_ID )
{
bRemoveFromList = mrTxtNode.GetpSwAttrSet() &&
- mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, FALSE ) == SFX_ITEM_SET;
+ mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, sal_False ) == SFX_ITEM_SET;
// --> OD 2008-10-20 #i92898#
mbListStyleOrIdReset = true;
// <--
@@ -4608,8 +4624,8 @@ namespace {
{
bool bRemoveFromList( false );
{
- const USHORT nEnd = rWhichArr.Count();
- for ( USHORT n = 0; n < nEnd; ++n )
+ const sal_uInt16 nEnd = rWhichArr.Count();
+ for ( sal_uInt16 n = 0; n < nEnd; ++n )
{
// RES_PARATR_NUMRULE and RES_PARATR_LIST_ID
if ( rWhichArr[ n ] == RES_PARATR_NUMRULE )
@@ -4622,7 +4638,7 @@ namespace {
{
bRemoveFromList = bRemoveFromList ||
( mrTxtNode.GetpSwAttrSet() &&
- mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, FALSE ) == SFX_ITEM_SET );
+ mrTxtNode.GetpSwAttrSet()->GetItemState( RES_PARATR_LIST_ID, sal_False ) == SFX_ITEM_SET );
// --> OD 2008-10-20 #i92898#
mbListStyleOrIdReset = true;
// <--
@@ -4709,7 +4725,7 @@ namespace {
// --> OD 2008-11-19 #i70748#
// --> OD 2010-05-12 #i105562#
else if ( mrTxtNode.GetpSwAttrSet() &&
- dynamic_cast<const SfxUInt16Item &>(mrTxtNode.GetAttr( RES_PARATR_OUTLINELEVEL, FALSE )).GetValue() > 0 )
+ dynamic_cast<const SfxUInt16Item &>(mrTxtNode.GetAttr( RES_PARATR_OUTLINELEVEL, sal_False )).GetValue() > 0 )
{
mrTxtNode.SetEmptyListStyleDueToSetOutlineLevelAttr();
}
@@ -4741,42 +4757,42 @@ namespace {
// End of class <HandleResetAttrAtTxtNode>
}
-BOOL SwTxtNode::ResetAttr( USHORT nWhich1, USHORT nWhich2 )
+sal_Bool SwTxtNode::ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 )
{
const bool bOldIsSetOrResetAttr( mbInSetOrResetAttr );
mbInSetOrResetAttr = true;
HandleResetAttrAtTxtNode aHandleResetAttr( *this, nWhich1, nWhich2 );
- BOOL bRet = SwCntntNode::ResetAttr( nWhich1, nWhich2 );
+ sal_Bool bRet = SwCntntNode::ResetAttr( nWhich1, nWhich2 );
mbInSetOrResetAttr = bOldIsSetOrResetAttr;
return bRet;
}
-BOOL SwTxtNode::ResetAttr( const SvUShorts& rWhichArr )
+sal_Bool SwTxtNode::ResetAttr( const SvUShorts& rWhichArr )
{
const bool bOldIsSetOrResetAttr( mbInSetOrResetAttr );
mbInSetOrResetAttr = true;
HandleResetAttrAtTxtNode aHandleResetAttr( *this, rWhichArr );
- BOOL bRet = SwCntntNode::ResetAttr( rWhichArr );
+ sal_Bool bRet = SwCntntNode::ResetAttr( rWhichArr );
mbInSetOrResetAttr = bOldIsSetOrResetAttr;
return bRet;
}
-USHORT SwTxtNode::ResetAllAttr()
+sal_uInt16 SwTxtNode::ResetAllAttr()
{
const bool bOldIsSetOrResetAttr( mbInSetOrResetAttr );
mbInSetOrResetAttr = true;
HandleResetAttrAtTxtNode aHandleResetAttr( *this );
- USHORT nRet = SwCntntNode::ResetAllAttr();
+ sal_uInt16 nRet = SwCntntNode::ResetAllAttr();
mbInSetOrResetAttr = bOldIsSetOrResetAttr;
@@ -4798,7 +4814,7 @@ bool SwTxtNode::IsInClipboard() const
bool SwTxtNode::IsInUndo() const
{
- return &GetNodes() == GetDoc()->GetUndoNds();
+ return GetDoc()->GetIDocumentUndoRedo().IsUndoNodes(GetNodes());
}
bool SwTxtNode::IsInContent() const
@@ -4808,8 +4824,6 @@ bool SwTxtNode::IsInContent() const
#include <unoparagraph.hxx>
-using namespace ::com::sun::star;
-
uno::Reference< rdf::XMetadatable >
SwTxtNode::MakeUnoObject()
{
diff --git a/sw/source/core/txtnode/swfntcch.cxx b/sw/source/core/txtnode/swfntcch.cxx
index e1efb8c42ad4..8a421ba1ff79 100644
--- a/sw/source/core/txtnode/swfntcch.cxx
+++ b/sw/source/core/txtnode/swfntcch.cxx
@@ -36,7 +36,7 @@
#include "swfont.hxx"
// aus atrstck.cxx
-extern const BYTE StackPos[];
+extern const sal_uInt8 StackPos[];
// globale Variablen, werden in SwFntCch.Hxx bekanntgegeben
// Der FontCache wird in TxtInit.Cxx _TXTINIT erzeugt und in _TXTEXIT geloescht
@@ -54,8 +54,8 @@ SwFontObj::SwFontObj( const void *pOwn, ViewShell *pSh ) :
{
aSwFont.GoMagic( pSh, aSwFont.GetActual() );
const SwAttrSet& rAttrSet = ((SwTxtFmtColl *)pOwn)->GetAttrSet();
- for (USHORT i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++)
- pDefaultArray[ StackPos[ i ] ] = &rAttrSet.Get( i, TRUE );
+ for (sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++)
+ pDefaultArray[ StackPos[ i ] ] = &rAttrSet.Get( i, sal_True );
}
SwFontObj::~SwFontObj()
@@ -82,7 +82,7 @@ SwFontObj *SwFontAccess::Get( )
SwCacheObj *SwFontAccess::NewObj( )
{
- ((SwTxtFmtColl*)pOwner)->SetInSwFntCache( TRUE );
+ ((SwTxtFmtColl*)pOwner)->SetInSwFntCache( sal_True );
return new SwFontObj( pOwner, pShell );
}
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 981a4e621376..4578eac81f76 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -70,11 +70,11 @@
#include <txtfrm.hxx> // SwTxtFrm
#include <scriptinfo.hxx>
-#if defined(WIN) || defined(WNT) || defined(PM2)
+#if defined(WNT) || defined(PM2)
#define FNT_LEADING_HACK
#endif
-#if defined(WIN) || defined(WNT)
+#if defined(WNT)
#define FNT_ATM_HACK
#endif
@@ -93,12 +93,12 @@ void SwFont::SetBackColor( Color* pNewColor )
{
delete pBackColor;
pBackColor = pNewColor;
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[SW_LATIN].pMagic = aSub[SW_CJK].pMagic = aSub[SW_CTL].pMagic = 0;
}
// maps directions for vertical layout
-USHORT MapDirection( USHORT nDir, const BOOL bVertFormat )
+sal_uInt16 MapDirection( sal_uInt16 nDir, const sal_Bool bVertFormat )
{
if ( bVertFormat )
{
@@ -125,7 +125,7 @@ USHORT MapDirection( USHORT nDir, const BOOL bVertFormat )
// maps the absolute direction set at the font to its logical conterpart
// in the rotated environment
-USHORT UnMapDirection( USHORT nDir, const BOOL bVertFormat )
+sal_uInt16 UnMapDirection( sal_uInt16 nDir, const sal_Bool bVertFormat )
{
if ( bVertFormat )
{
@@ -150,19 +150,19 @@ USHORT UnMapDirection( USHORT nDir, const BOOL bVertFormat )
return nDir;
}
-USHORT SwFont::GetOrientation( const BOOL bVertFormat ) const
+sal_uInt16 SwFont::GetOrientation( const sal_Bool bVertFormat ) const
{
return UnMapDirection( aSub[nActual].GetOrientation(), bVertFormat );
}
-void SwFont::SetVertical( USHORT nDir, const BOOL bVertFormat )
+void SwFont::SetVertical( sal_uInt16 nDir, const sal_Bool bVertFormat )
{
// map direction if frame has vertical layout
nDir = MapDirection( nDir, bVertFormat );
if( nDir != aSub[0].GetOrientation() )
{
- bFntChg = TRUE;
+ bFntChg = sal_True;
aSub[0].SetVertical( nDir, bVertFormat );
aSub[1].SetVertical( nDir, bVertFormat || nDir > 1000 );
aSub[2].SetVertical( nDir, bVertFormat );
@@ -198,11 +198,11 @@ void SwFont::SetVertical( USHORT nDir, const BOOL bVertFormat )
*************************************************************************/
/*************************************************************************
- * SwSubFont::CalcEscAscent( const USHORT nOldAscent )
+ * SwSubFont::CalcEscAscent( const sal_uInt16 nOldAscent )
*************************************************************************/
// nEsc ist der Prozentwert
-USHORT SwSubFont::CalcEscAscent( const USHORT nOldAscent ) const
+sal_uInt16 SwSubFont::CalcEscAscent( const sal_uInt16 nOldAscent ) const
{
if( DFLT_ESC_AUTO_SUPER != GetEscapement() &&
DFLT_ESC_AUTO_SUB != GetEscapement() )
@@ -210,7 +210,7 @@ USHORT SwSubFont::CalcEscAscent( const USHORT nOldAscent ) const
const long nAscent = nOldAscent +
( (long) nOrgHeight * GetEscapement() ) / 100L;
if ( nAscent>0 )
- return ( Max( USHORT (nAscent), nOrgAscent ));
+ return ( Max( sal_uInt16 (nAscent), nOrgAscent ));
}
return nOrgAscent;
}
@@ -229,7 +229,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_FONT,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
const SvxFontItem *pFont = (const SvxFontItem *)pItem;
aSub[SW_LATIN].SetFamily( pFont->GetFamily() );
@@ -239,7 +239,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
aSub[SW_LATIN].Font::SetCharSet( pFont->GetCharSet() );
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_FONTSIZE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
const SvxFontHeightItem *pHeight = (const SvxFontHeightItem *)pItem;
aSub[SW_LATIN].SvxFont::SetPropr( 100 );
@@ -249,17 +249,17 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
aSub[SW_LATIN].SetSize( aTmpSize );
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_POSTURE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
aSub[SW_LATIN].Font::SetItalic( ((SvxPostureItem*)pItem)->GetPosture() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_WEIGHT,
- TRUE, &pItem ))
+ sal_True, &pItem ))
aSub[SW_LATIN].Font::SetWeight( ((SvxWeightItem*)pItem)->GetWeight() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_LANGUAGE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
aSub[SW_LATIN].SetLanguage( ((SvxLanguageItem*)pItem)->GetLanguage() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CJK_FONT,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
const SvxFontItem *pFont = (const SvxFontItem *)pItem;
aSub[SW_CJK].SetFamily( pFont->GetFamily() );
@@ -269,7 +269,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
aSub[SW_CJK].Font::SetCharSet( pFont->GetCharSet() );
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CJK_FONTSIZE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
const SvxFontHeightItem *pHeight = (const SvxFontHeightItem *)pItem;
aSub[SW_CJK].SvxFont::SetPropr( 100 );
@@ -279,13 +279,13 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
aSub[SW_CJK].SetSize( aTmpSize );
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CJK_POSTURE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
aSub[SW_CJK].Font::SetItalic( ((SvxPostureItem*)pItem)->GetPosture() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CJK_WEIGHT,
- TRUE, &pItem ))
+ sal_True, &pItem ))
aSub[SW_CJK].Font::SetWeight( ((SvxWeightItem*)pItem)->GetWeight() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CJK_LANGUAGE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
LanguageType eNewLang = ((SvxLanguageItem*)pItem)->GetLanguage();
aSub[SW_CJK].SetLanguage( eNewLang );
@@ -295,7 +295,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CTL_FONT,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
const SvxFontItem *pFont = (const SvxFontItem *)pItem;
aSub[SW_CTL].SetFamily( pFont->GetFamily() );
@@ -305,7 +305,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
aSub[SW_CTL].Font::SetCharSet( pFont->GetCharSet() );
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CTL_FONTSIZE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
const SvxFontHeightItem *pHeight = (const SvxFontHeightItem *)pItem;
aSub[SW_CTL].SvxFont::SetPropr( 100 );
@@ -315,53 +315,53 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
aSub[SW_CTL].SetSize( aTmpSize );
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CTL_POSTURE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
aSub[SW_CTL].Font::SetItalic( ((SvxPostureItem*)pItem)->GetPosture() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CTL_WEIGHT,
- TRUE, &pItem ))
+ sal_True, &pItem ))
aSub[SW_CTL].Font::SetWeight( ((SvxWeightItem*)pItem)->GetWeight() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CTL_LANGUAGE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
aSub[SW_CTL].SetLanguage( ((SvxLanguageItem*)pItem)->GetLanguage() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_UNDERLINE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
SetUnderline( ((SvxUnderlineItem*)pItem)->GetLineStyle() );
SetUnderColor( ((SvxUnderlineItem*)pItem)->GetColor() );
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_OVERLINE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
SetOverline( ((SvxOverlineItem*)pItem)->GetLineStyle() );
SetOverColor( ((SvxOverlineItem*)pItem)->GetColor() );
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CROSSEDOUT,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetStrikeout( ((SvxCrossedOutItem*)pItem)->GetStrikeout() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_COLOR,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetColor( ((SvxColorItem*)pItem)->GetValue() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_EMPHASIS_MARK,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetEmphasisMark( ((SvxEmphasisMarkItem*)pItem)->GetEmphasisMark() );
- SetTransparent( TRUE );
+ SetTransparent( sal_True );
SetAlign( ALIGN_BASELINE );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CONTOUR,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetOutline( ((SvxContourItem*)pItem)->GetValue() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_SHADOWED,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetShadow( ((SvxShadowedItem*)pItem)->GetValue() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_RELIEF,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetRelief( (FontRelief)((SvxCharReliefItem*)pItem)->GetValue() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_SHADOWED,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetPropWidth(((SvxShadowedItem*)pItem)->GetValue() ? 50 : 100 );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_AUTOKERN,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
if( ((SvxAutoKernItem*)pItem)->GetValue() )
{
@@ -374,11 +374,11 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
SetAutoKern( 0 );
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_WORDLINEMODE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetWordLineMode( ((SvxWordLineModeItem*)pItem)->GetValue() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_ESCAPEMENT,
- TRUE, &pItem ))
+ sal_True, &pItem ))
{
const SvxEscapementItem *pEsc = (const SvxEscapementItem *)pItem;
SetEscapement( pEsc->GetEsc() );
@@ -386,39 +386,39 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
SetProportion( pEsc->GetProp() );
}
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_CASEMAP,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetCaseMap( ((SvxCaseMapItem*)pItem)->GetCaseMap() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_KERNING,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetFixKerning( ((SvxKerningItem*)pItem)->GetValue() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_NOHYPHEN,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetNoHyph( ((SvxNoHyphenItem*)pItem)->GetValue() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BLINK,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetBlink( ((SvxBlinkItem*)pItem)->GetValue() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_ROTATE,
- TRUE, &pItem ))
+ sal_True, &pItem ))
SetVertical( ((SvxCharRotateItem*)pItem)->GetValue() );
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BACKGROUND,
- TRUE, &pItem ))
+ sal_True, &pItem ))
pBackColor = new Color( ((SvxBrushItem*)pItem)->GetColor() );
else
pBackColor = NULL;
const SfxPoolItem* pTwoLinesItem = 0;
if( SFX_ITEM_SET ==
- pAttrSet->GetItemState( RES_CHRATR_TWO_LINES, TRUE, &pTwoLinesItem ))
+ pAttrSet->GetItemState( RES_CHRATR_TWO_LINES, sal_True, &pTwoLinesItem ))
if ( ((SvxTwoLinesItem*)pTwoLinesItem)->GetValue() )
SetVertical( 0 );
}
else
{
Invalidate();
- bNoHyph = FALSE;
- bBlink = FALSE;
+ bNoHyph = sal_False;
+ bBlink = sal_False;
}
- bPaintBlank = FALSE;
- bPaintWrong = FALSE;
+ bPaintBlank = sal_False;
+ bPaintWrong = sal_False;
OSL_ENSURE( aSub[SW_LATIN].IsTransparent(), "SwFont: Transparent revolution" );
}
@@ -441,7 +441,7 @@ SwFont::SwFont( const SwFont &rFont )
bFntChg = rFont.bFntChg;
bOrgChg = rFont.bOrgChg;
bPaintBlank = rFont.bPaintBlank;
- bPaintWrong = FALSE;
+ bPaintWrong = sal_False;
bURL = rFont.bURL;
bGreyWave = rFont.bGreyWave;
bNoColReplace = rFont.bNoColReplace;
@@ -456,14 +456,14 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
nToxCnt = 0;
nRefCnt = 0;
m_nMetaCount = 0;
- bPaintBlank = FALSE;
- bPaintWrong = FALSE;
- bURL = FALSE;
- bGreyWave = FALSE;
- bNoColReplace = FALSE;
+ bPaintBlank = sal_False;
+ bPaintWrong = sal_False;
+ bURL = sal_False;
+ bGreyWave = sal_False;
+ bNoColReplace = sal_False;
bNoHyph = pAttrSet->GetNoHyphenHere().GetValue();
bBlink = pAttrSet->GetBlink().GetValue();
- bOrgChg = TRUE;
+ bOrgChg = sal_True;
{
const SvxFontItem& rFont = pAttrSet->GetFont();
aSub[SW_LATIN].SetFamily( rFont.GetFamily() );
@@ -527,7 +527,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
SetEmphasisMark( pAttrSet->GetEmphasisMark().GetEmphasisMark() );
SetStrikeout( pAttrSet->GetCrossedOut().GetStrikeout() );
SetColor( pAttrSet->GetColor().GetValue() );
- SetTransparent( TRUE );
+ SetTransparent( sal_True );
SetAlign( ALIGN_BASELINE );
SetOutline( pAttrSet->GetContour().GetValue() );
SetShadow( pAttrSet->GetShadowed().GetValue() );
@@ -551,7 +551,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
SetFixKerning( pAttrSet->GetKerning().GetValue() );
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pAttrSet->GetItemState( RES_CHRATR_BACKGROUND,
- TRUE, &pItem ))
+ sal_True, &pItem ))
pBackColor = new Color( ((SvxBrushItem*)pItem)->GetColor() );
else
pBackColor = NULL;
@@ -590,7 +590,7 @@ SwFont& SwFont::operator=( const SwFont &rFont )
bFntChg = rFont.bFntChg;
bOrgChg = rFont.bOrgChg;
bPaintBlank = rFont.bPaintBlank;
- bPaintWrong = FALSE;
+ bPaintWrong = sal_False;
bURL = rFont.bURL;
bGreyWave = rFont.bGreyWave;
bNoColReplace = rFont.bNoColReplace;
@@ -603,19 +603,19 @@ SwFont& SwFont::operator=( const SwFont &rFont )
* SwFont::GoMagic()
*************************************************************************/
-void SwFont::GoMagic( ViewShell *pSh, BYTE nWhich )
+void SwFont::GoMagic( ViewShell *pSh, sal_uInt8 nWhich )
{
SwFntAccess aFntAccess( aSub[nWhich].pMagic, aSub[nWhich].nFntIndex,
- &aSub[nWhich], pSh, TRUE );
+ &aSub[nWhich], pSh, sal_True );
}
/*************************************************************************
* SwSubFont::IsSymbol()
*************************************************************************/
-BOOL SwSubFont::IsSymbol( ViewShell *pSh )
+sal_Bool SwSubFont::IsSymbol( ViewShell *pSh )
{
- SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh, FALSE );
+ SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh, sal_False );
return aFntAccess.Get()->IsSymbol();
}
@@ -623,11 +623,11 @@ BOOL SwSubFont::IsSymbol( ViewShell *pSh )
* SwSubFont::ChgFnt()
*************************************************************************/
-BOOL SwSubFont::ChgFnt( ViewShell *pSh, OutputDevice& rOut )
+sal_Bool SwSubFont::ChgFnt( ViewShell *pSh, OutputDevice& rOut )
{
if ( pLastFont )
pLastFont->Unlock();
- SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh, TRUE );
+ SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh, sal_True );
SV_STAT( nChangeFont );
pLastFont = aFntAccess.Get();
@@ -648,7 +648,7 @@ void SwFont::ChgPhysFnt( ViewShell *pSh, OutputDevice& rOut )
{
if( bOrgChg && aSub[nActual].IsEsc() )
{
- const BYTE nOldProp = aSub[nActual].GetPropr();
+ const sal_uInt8 nOldProp = aSub[nActual].GetPropr();
SetProportion( 100 );
ChgFnt( pSh, rOut );
SwFntAccess aFntAccess( aSub[nActual].pMagic, aSub[nActual].nFntIndex,
@@ -656,7 +656,7 @@ void SwFont::ChgPhysFnt( ViewShell *pSh, OutputDevice& rOut )
aSub[nActual].nOrgHeight = aFntAccess.Get()->GetFontHeight( pSh, rOut );
aSub[nActual].nOrgAscent = aFntAccess.Get()->GetFontAscent( pSh, rOut );
SetProportion( nOldProp );
- bOrgChg = FALSE;
+ bOrgChg = sal_False;
}
if( bFntChg )
@@ -678,16 +678,16 @@ void SwFont::ChgPhysFnt( ViewShell *pSh, OutputDevice& rOut )
* T2_height-T2_ascent - (Esc * T1_height)
*************************************************************************/
-USHORT SwSubFont::CalcEscHeight( const USHORT nOldHeight,
- const USHORT nOldAscent ) const
+sal_uInt16 SwSubFont::CalcEscHeight( const sal_uInt16 nOldHeight,
+ const sal_uInt16 nOldAscent ) const
{
if( DFLT_ESC_AUTO_SUPER != GetEscapement() &&
DFLT_ESC_AUTO_SUB != GetEscapement() )
{
long nDescent = nOldHeight - nOldAscent -
( (long) nOrgHeight * GetEscapement() ) / 100L;
- const USHORT nDesc = ( nDescent>0 ) ? Max ( USHORT(nDescent),
- USHORT(nOrgHeight - nOrgAscent) ) : nOrgHeight - nOrgAscent;
+ const sal_uInt16 nDesc = ( nDescent>0 ) ? Max ( sal_uInt16(nDescent),
+ sal_uInt16(nOrgHeight - nOrgAscent) ) : nOrgHeight - nOrgAscent;
return ( nDesc + CalcEscAscent( nOldAscent ) );
}
return nOrgHeight;
@@ -706,9 +706,9 @@ short SwSubFont::_CheckKerning( )
* SwSubFont::GetAscent()
*************************************************************************/
-USHORT SwSubFont::GetAscent( ViewShell *pSh, const OutputDevice& rOut )
+sal_uInt16 SwSubFont::GetAscent( ViewShell *pSh, const OutputDevice& rOut )
{
- USHORT nAscent;
+ sal_uInt16 nAscent;
SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh );
nAscent = aFntAccess.Get()->GetFontAscent( pSh, rOut );
if( GetEscapement() )
@@ -720,14 +720,14 @@ USHORT SwSubFont::GetAscent( ViewShell *pSh, const OutputDevice& rOut )
* SwSubFont::GetHeight()
*************************************************************************/
-USHORT SwSubFont::GetHeight( ViewShell *pSh, const OutputDevice& rOut )
+sal_uInt16 SwSubFont::GetHeight( ViewShell *pSh, const OutputDevice& rOut )
{
SV_STAT( nGetTextSize );
SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh );
- const USHORT nHeight = aFntAccess.Get()->GetFontHeight( pSh, rOut );
+ const sal_uInt16 nHeight = aFntAccess.Get()->GetFontHeight( pSh, rOut );
if ( GetEscapement() )
{
- const USHORT nAscent = aFntAccess.Get()->GetFontAscent( pSh, rOut );
+ const sal_uInt16 nAscent = aFntAccess.Get()->GetFontAscent( pSh, rOut );
return CalcEscHeight( nHeight, nAscent ); // + nLeading;
}
return nHeight; // + nLeading;
@@ -800,10 +800,10 @@ Size SwSubFont::_GetTxtSize( SwDrawTextInfo& rInf )
// hochgestellt, muss seine effektive Hoehe melden.
if( GetEscapement() )
{
- const USHORT nAscent = pLastFont->GetFontAscent( rInf.GetShell(),
+ const sal_uInt16 nAscent = pLastFont->GetFontAscent( rInf.GetShell(),
rInf.GetOut() );
aTxtSize.Height() =
- (long)CalcEscHeight( (USHORT)aTxtSize.Height(), nAscent);
+ (long)CalcEscHeight( (sal_uInt16)aTxtSize.Height(), nAscent);
}
}
@@ -839,7 +839,7 @@ Size SwSubFont::_GetTxtSize( SwDrawTextInfo& rInf )
* SwSubFont::_DrawText()
*************************************************************************/
-void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const BOOL bGrey )
+void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const sal_Bool bGrey )
{
rInf.SetGreyWave( bGrey );
xub_StrLen nLn = rInf.GetText().Len();
@@ -951,7 +951,7 @@ static sal_Char const sDoubleSpace[] = " ";
nSpace *= rInf.GetSpace() / SPACING_PRECISION_FACTOR;
}
- rInf.SetWidth( USHORT(aFontSize.Width() + nSpace) );
+ rInf.SetWidth( sal_uInt16(aFontSize.Width() + nSpace) );
rInf.SetText( aStr );
rInf.SetIdx( 0 );
rInf.SetLen( 2 );
@@ -1098,7 +1098,7 @@ void SwSubFont::CalcEsc( SwDrawTextInfo& rInf, Point& rPos )
{
long nOfst;
- USHORT nDir = UnMapDirection(
+ sal_uInt16 nDir = UnMapDirection(
GetOrientation(), rInf.GetFrm() && rInf.GetFrm()->IsVertical() );
switch ( GetEscapement() )
@@ -1160,14 +1160,14 @@ void SwSubFont::CalcEsc( SwDrawTextInfo& rInf, Point& rPos )
}
// used during painting of small capitals
-void SwDrawTextInfo::Shift( USHORT nDir )
+void SwDrawTextInfo::Shift( sal_uInt16 nDir )
{
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE( bPos, "DrawTextInfo: Undefined Position" );
OSL_ENSURE( bSize, "DrawTextInfo: Undefined Width" );
#endif
- const BOOL bBidiPor = ( GetFrm() && GetFrm()->IsRightToLeft() ) !=
+ const sal_Bool bBidiPor = ( GetFrm() && GetFrm()->IsRightToLeft() ) !=
( 0 != ( TEXT_LAYOUT_BIDI_RTL & GetpOut()->GetLayoutMode() ) );
nDir = bBidiPor ?
@@ -1214,7 +1214,7 @@ long AttrSetToLineHeight( const IDocumentSettingAccess& rIDocumentSettingAccess,
const OutputDevice &rOut, sal_Int16 nScript)
{
SwFont aFont(&rSet, &rIDocumentSettingAccess);
- BYTE nActual;
+ sal_uInt8 nActual;
switch (nScript)
{
default:
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 29d7362705a2..a7ccc96265cf 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -64,6 +64,7 @@
#include <fmtmeta.hxx>
#include <breakit.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <fldbas.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
@@ -165,7 +166,7 @@ bool isNestedAny(const xub_StrLen nStart1, const xub_StrLen nEnd1,
}
static
-bool isSelfNestable(const USHORT nWhich)
+bool isSelfNestable(const sal_uInt16 nWhich)
{
if ((RES_TXTATR_INETFMT == nWhich) ||
(RES_TXTATR_CJK_RUBY == nWhich))
@@ -176,7 +177,7 @@ bool isSelfNestable(const USHORT nWhich)
}
static
-bool isSplittable(const USHORT nWhich)
+bool isSplittable(const sal_uInt16 nWhich)
{
if ((RES_TXTATR_INETFMT == nWhich) ||
(RES_TXTATR_CJK_RUBY == nWhich))
@@ -192,7 +193,7 @@ enum Split_t { FAIL, SPLIT_NEW, SPLIT_OTHER };
hint is inserted, and what kind of existing hint overlaps.
*/
static Split_t
-splitPolicy(const USHORT nWhichNew, const USHORT nWhichOther)
+splitPolicy(const sal_uInt16 nWhichNew, const sal_uInt16 nWhichOther)
{
if (!isSplittable(nWhichOther))
{
@@ -362,7 +363,7 @@ bool
SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
{
// INVARIANT: the nestable hints in the array are properly nested
- const USHORT nNewWhich( rNewHint.Which() );
+ const sal_uInt16 nNewWhich( rNewHint.Which() );
const xub_StrLen nNewStart( *rNewHint.GetStart() );
const xub_StrLen nNewEnd ( *rNewHint.GetEnd() );
//??? const bool bNoLengthAttribute( nNewStart == nNewEnd );
@@ -381,13 +382,13 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
SplitNew.push_back(& rNewHint);
// pass 1: split the inserted hint into fragments if necessary
- for ( USHORT i = 0; i < GetEndCount(); ++i )
+ for ( sal_uInt16 i = 0; i < GetEndCount(); ++i )
{
SwTxtAttr * const pOther = GetEnd(i);
if (pOther->IsNesting())
{
- const USHORT nOtherWhich( pOther->Which() );
+ const sal_uInt16 nOtherWhich( pOther->Which() );
const xub_StrLen nOtherStart( *(pOther)->GetStart() );
const xub_StrLen nOtherEnd ( *(pOther)->GetEnd() );
if (isOverlap(nNewStart, nNewEnd, nOtherStart, nOtherEnd ))
@@ -590,7 +591,7 @@ SwpHints::TryInsertNesting( SwTxtNode & rNode, SwTxtAttrNesting & rNewHint )
void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
const SetAttrMode nMode )
{
- const USHORT nWhich = rNewHint.Which();
+ const sal_uInt16 nWhich = rNewHint.Which();
const xub_StrLen nThisStart = *rNewHint.GetStart();
const xub_StrLen nThisEnd = *rNewHint.GetEnd();
@@ -609,7 +610,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
//
if ( !bNoLengthAttribute ) // nothing to do for no length attributes
{
- for ( USHORT i = 0; i < Count(); ++i )
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
{
SwTxtAttr* pOther = GetTextHint(i);
@@ -675,7 +676,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
if ( !bNoLengthAttribute ) // nothing to do for no length attributes
{
- for ( USHORT i = 0; i < Count(); ++i )
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
{
const SwTxtAttr* pOther = GetTextHint(i);
@@ -708,7 +709,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
aInsDelHints.clear();
// Get all hints that are in [nPorStart, nPorEnd[:
- for ( USHORT i = 0; i < Count(); ++i )
+ for ( sal_uInt16 i = 0; i < Count(); ++i )
{
SwTxtAttr *pOther = GetTextHint(i);
@@ -734,7 +735,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
// pNewHint can be inserted after calculating the sort value.
// This should ensure, that pNewHint comes behind the already present
// character style
- USHORT nCharStyleCount = 0;
+ sal_uInt16 nCharStyleCount = 0;
aIter = aInsDelHints.begin();
while ( aIter != aInsDelHints.end() )
{
@@ -775,7 +776,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
aCharAutoFmtSetRange);
SfxItemIter aItemIter( *pOldStyle );
const SfxPoolItem* pItem = aItemIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
if ( !CharFmt::IsItemIncluded( pItem->Which(), &rNewHint ) )
{
@@ -855,7 +856,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
do
{
const SfxPoolItem* pTmpItem = 0;
- if ( SFX_ITEM_SET == rWholeParaAttrSet.GetItemState( pItem->Which(), FALSE, &pTmpItem ) &&
+ if ( SFX_ITEM_SET == rWholeParaAttrSet.GetItemState( pItem->Which(), sal_False, &pTmpItem ) &&
pTmpItem == pItem )
{
// Do not clear item if the attribute is set in a character format:
@@ -893,14 +894,14 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
do
{
const SfxPoolItem* pTmpItem = 0;
- if ( SFX_ITEM_SET == rWholeParaAttrSet.GetItemState( pItem->Which(), FALSE, &pTmpItem ) &&
+ if ( SFX_ITEM_SET == rWholeParaAttrSet.GetItemState( pItem->Which(), sal_False, &pTmpItem ) &&
pTmpItem == pItem )
{
// Do not clear item if the attribute is set in a character format:
if ( !pCurrentCharFmt || 0 == CharFmt::GetItem( *pCurrentCharFmt, pItem->Which() ) )
{
if ( !pNewSet )
- pNewSet = pNewStyle->Clone( TRUE );
+ pNewSet = pNewStyle->Clone( sal_True );
pNewSet->ClearItem( pItem->Which() );
}
}
@@ -1013,7 +1014,7 @@ SwTxtAttr* MakeTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr,
// different from rDoc's pool, we have to correct this:
const StylePool::SfxItemSet_Pointer_t pAutoStyle = static_cast<const SwFmtAutoFmt&>(rAttr).GetStyleHandle();
::std::auto_ptr<const SfxItemSet> pNewSet(
- pAutoStyle->SfxItemSet::Clone( TRUE, &rDoc.GetAttrPool() ));
+ pAutoStyle->SfxItemSet::Clone( sal_True, &rDoc.GetAttrPool() ));
SwTxtAttr* pNew = MakeTxtAttr( rDoc, *pNewSet, nStt, nEnd );
return pNew;
}
@@ -1041,8 +1042,7 @@ SwTxtAttr* MakeTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr,
pNew = new SwTxtINetFmt( (SwFmtINetFmt&)rNew, nStt, nEnd );
break;
case RES_TXTATR_FIELD:
- pNew = new SwTxtFld( static_cast<SwFmtFld &>(rNew), nStt,
- rDoc.IsClipBoard() );
+ pNew = new SwTxtFld( static_cast<SwFmtFld &>(rNew), nStt );
break;
case RES_TXTATR_FLYCNT:
{
@@ -1105,7 +1105,7 @@ void SwTxtNode::DestroyAttr( SwTxtAttr* pAttr )
{
// einige Sachen muessen vorm Loeschen der "Format-Attribute" erfolgen
SwDoc* pDoc = GetDoc();
- USHORT nDelMsg = 0;
+ sal_uInt16 nDelMsg = 0;
switch( pAttr->Which() )
{
case RES_TXTATR_FLYCNT:
@@ -1153,7 +1153,7 @@ void SwTxtNode::DestroyAttr( SwTxtAttr* pAttr )
case RES_DBNUMSETFLD:
case RES_DBNEXTSETFLD:
if( !pDoc->IsNewFldLst() && GetNodes().IsDocNodes() )
- pDoc->InsDelFldInFldLst( FALSE, *(SwTxtFld*)pAttr );
+ pDoc->InsDelFldInFldLst( sal_False, *(SwTxtFld*)pAttr );
break;
case RES_DDEFLD:
if( GetNodes().IsDocNodes() &&
@@ -1229,7 +1229,7 @@ SwTxtNode::InsertItem( SfxPoolItem& rAttr,
// take ownership of pAttr; if insertion fails, delete pAttr
bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
{
- BOOL bHiddenPara = FALSE;
+ sal_Bool bHiddenPara = sal_False;
OSL_ENSURE( pAttr && *pAttr->GetStart() <= Len(), "StartIdx out of bounds!" );
OSL_ENSURE( !pAttr->GetEnd() || (*pAttr->GetEnd() <= Len()),
@@ -1248,7 +1248,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
const bool bDummyChar( pAttr->HasDummyChar() );
if (bDummyChar)
{
- USHORT nInsMode = nMode;
+ sal_uInt16 nInsMode = nMode;
switch( pAttr->Which() )
{
case RES_TXTATR_FLYCNT:
@@ -1264,7 +1264,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
// des Zeichens. Sonst muesste das immer ausserhalb
// erfolgen (Fehleranfaellig !)
const SwFmtAnchor* pAnchor = 0;
- pFmt->GetItemState( RES_ANCHOR, FALSE,
+ pFmt->GetItemState( RES_ANCHOR, sal_False,
(const SfxPoolItem**)&pAnchor );
SwIndex aIdx( this, *pAttr->GetStart() );
@@ -1315,13 +1315,11 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
m_Text.Erase( *pAttr->GetStart(), 1 );
// Indizies Updaten
SwIndex aTmpIdx( this, *pAttr->GetStart() );
- Update( aTmpIdx, 1, TRUE );
+ Update( aTmpIdx, 1, sal_True );
}
- // Format loeschen nicht ins Undo aufnehmen!!
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ // do not record deletion of Format!
+ ::sw::UndoGuard const ug(pDoc->GetIDocumentUndoRedo());
DestroyAttr( pAttr );
- pDoc->DoUndo( bUndo );
return false;
}
}
@@ -1353,14 +1351,14 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
m_Text.Erase( *pAttr->GetStart(), 1 );
// Indizies Updaten
SwIndex aTmpIdx( this, *pAttr->GetStart() );
- Update( aTmpIdx, 1, TRUE );
+ Update( aTmpIdx, 1, sal_True );
}
DestroyAttr( pAttr );
return false;
}
// wird eine neue Fussnote eingefuegt ??
- BOOL bNewFtn = 0 == ((SwTxtFtn*)pAttr)->GetStartNode();
+ sal_Bool bNewFtn = 0 == ((SwTxtFtn*)pAttr)->GetStartNode();
if( bNewFtn )
{
((SwTxtFtn*)pAttr)->MakeNewTextSection( GetNodes() );
@@ -1372,9 +1370,9 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
else if ( !GetpSwpHints() || !GetpSwpHints()->IsInSplitNode() )
{
// loesche alle Frames der Section, auf die der StartNode zeigt
- ULONG nSttIdx =
+ sal_uLong nSttIdx =
((SwTxtFtn*)pAttr)->GetStartNode()->GetIndex();
- ULONG nEndIdx = rNodes[ nSttIdx++ ]->EndOfSectionIndex();
+ sal_uLong nEndIdx = rNodes[ nSttIdx++ ]->EndOfSectionIndex();
SwCntntNode* pCNd;
for( ; nSttIdx < nEndIdx; ++nSttIdx )
if( 0 != ( pCNd = rNodes[ nSttIdx ]->GetCntntNode() ))
@@ -1397,7 +1395,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
if( !bNewFtn )
{
// eine alte Ftn wird umgehaengt (z.B. SplitNode)
- for( USHORT n = 0; n < pDoc->GetFtnIdxs().Count(); ++n )
+ for( sal_uInt16 n = 0; n < pDoc->GetFtnIdxs().Count(); ++n )
if( pAttr == pDoc->GetFtnIdxs()[n] )
{
// neuen Index zuweisen, dafuer aus dem SortArray
@@ -1420,7 +1418,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
if( StartOfSectionIndex() > rNodes.GetEndOfRedlines().GetIndex() )
{
#if OSL_DEBUG_LEVEL > 1
- const BOOL bSuccess =
+ const sal_Bool bSuccess =
#endif
pDoc->GetFtnIdxs().Insert( pTxtFtn );
#if OSL_DEBUG_LEVEL > 1
@@ -1439,7 +1437,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
// anwerfen
if( RES_HIDDENPARAFLD ==
pAttr->GetFld().GetFld()->GetTyp()->Which() )
- bHiddenPara = TRUE;
+ bHiddenPara = sal_True;
}
break;
@@ -1529,13 +1527,13 @@ void SwTxtNode::DeleteAttribute( SwTxtAttr * const pAttr )
*************************************************************************/
//FIXME: this does NOT respect SORT NUMBER (for CHARFMT)!
-void SwTxtNode::DeleteAttributes( const USHORT nWhich,
+void SwTxtNode::DeleteAttributes( const sal_uInt16 nWhich,
const xub_StrLen nStart, const xub_StrLen nEnd )
{
if ( !HasHints() )
return;
- for ( USHORT nPos = 0; m_pSwpHints && nPos < m_pSwpHints->Count(); nPos++ )
+ for ( sal_uInt16 nPos = 0; m_pSwpHints && nPos < m_pSwpHints->Count(); nPos++ )
{
SwTxtAttr * const pTxtHt = m_pSwpHints->GetTextHint( nPos );
const xub_StrLen nHintStart = *(pTxtHt->GetStart());
@@ -1555,7 +1553,7 @@ void SwTxtNode::DeleteAttributes( const USHORT nWhich,
// Check if character format contains hidden attribute:
const SwCharFmt* pFmt = pTxtHt->GetCharFmt().GetCharFmt();
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == pFmt->GetItemState( RES_CHRATR_HIDDEN, TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == pFmt->GetItemState( RES_CHRATR_HIDDEN, sal_True, &pItem ) )
SetCalcHiddenCharFlags();
}
// --> FME 2007-03-16 #i75430# Recalc hidden flags if necessary
@@ -1612,11 +1610,11 @@ void SwTxtNode::DelSoftHyph( const xub_StrLen nStt, const xub_StrLen nEnd )
// setze diese Attribute am TextNode. Wird der gesamte Bereich umspannt,
// dann setze sie nur im AutoAttrSet (SwCntntNode:: SetAttr)
-BOOL SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
+sal_Bool SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
xub_StrLen nEnd, const SetAttrMode nMode )
{
if( !rSet.Count() )
- return FALSE;
+ return sal_False;
// teil die Sets auf (fuer Selektion in Nodes)
const SfxItemSet* pSet = &rSet;
@@ -1628,14 +1626,14 @@ BOOL SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
{
// sind am Node schon Zeichenvorlagen gesetzt, muss man diese Attribute
// (rSet) immer als TextAttribute setzen, damit sie angezeigt werden.
- int bHasCharFmts = FALSE;
+ int bHasCharFmts = sal_False;
if ( HasHints() )
{
- for ( USHORT n = 0; n < m_pSwpHints->Count(); ++n )
+ for ( sal_uInt16 n = 0; n < m_pSwpHints->Count(); ++n )
{
if ( (*m_pSwpHints)[ n ]->IsCharFmtAttr() )
{
- bHasCharFmts = TRUE;
+ bHasCharFmts = sal_True;
break;
}
}
@@ -1648,18 +1646,18 @@ BOOL SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
// we want to set them at the paragraph:
if( aTxtSet.Count() != rSet.Count() )
{
- BOOL bRet = SetAttr( rSet );
+ sal_Bool bRet = SetAttr( rSet );
if( !aTxtSet.Count() )
return bRet;
}
// check for auto style:
const SfxPoolItem* pItem;
- const bool bAutoStyle = SFX_ITEM_SET == aTxtSet.GetItemState( RES_TXTATR_AUTOFMT, FALSE, &pItem );
+ const bool bAutoStyle = SFX_ITEM_SET == aTxtSet.GetItemState( RES_TXTATR_AUTOFMT, sal_False, &pItem );
if ( bAutoStyle )
{
boost::shared_ptr<SfxItemSet> pAutoStyleSet = static_cast<const SwFmtAutoFmt*>(pItem)->GetStyleHandle();
- BOOL bRet = SetAttr( *pAutoStyleSet );
+ sal_Bool bRet = SetAttr( *pAutoStyleSet );
if( 1 == aTxtSet.Count() )
return bRet;
}
@@ -1673,7 +1671,7 @@ BOOL SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
SfxItemSet aCharSet( *rSet.GetPool(), aCharAutoFmtSetRange );
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
SfxItemIter aIter( *pSet );
const SfxPoolItem* pItem = aIter.GetCurItem();
@@ -1681,7 +1679,7 @@ BOOL SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
{
if ( pItem && (reinterpret_cast<SfxPoolItem*>(-1) != pItem))
{
- const USHORT nWhich = pItem->Which();
+ const sal_uInt16 nWhich = pItem->Which();
OSL_ENSURE( isCHRATR(nWhich) || isTXTATR(nWhich),
"SwTxtNode::SetAttr(): unknown attribute" );
if ( isCHRATR(nWhich) || isTXTATR(nWhich) )
@@ -1738,7 +1736,7 @@ BOOL SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
TryDeleteSwpHints();
- return nCount ? TRUE : FALSE;
+ return nCount ? sal_True : sal_False;
}
void lcl_MergeAttr( SfxItemSet& rSet, const SfxPoolItem& rAttr )
@@ -1749,12 +1747,12 @@ void lcl_MergeAttr( SfxItemSet& rSet, const SfxPoolItem& rAttr )
if ( !pCFSet )
return;
SfxWhichIter aIter( *pCFSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
if( ( nWhich < RES_CHRATR_END ||
RES_TXTATR_UNKNOWN_CONTAINER == nWhich ) &&
- ( SFX_ITEM_SET == pCFSet->GetItemState( nWhich, TRUE ) ) )
+ ( SFX_ITEM_SET == pCFSet->GetItemState( nWhich, sal_True ) ) )
rSet.Put( pCFSet->Get( nWhich ) );
nWhich = aIter.NextWhich();
}
@@ -1774,12 +1772,12 @@ void lcl_MergeAttr_ExpandChrFmt( SfxItemSet& rSet, const SfxPoolItem& rAttr )
if ( pCFSet )
{
SfxWhichIter aIter( *pCFSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
if( ( nWhich < RES_CHRATR_END ||
( RES_TXTATR_AUTOFMT == rAttr.Which() && RES_TXTATR_UNKNOWN_CONTAINER == nWhich ) ) &&
- ( SFX_ITEM_SET == pCFSet->GetItemState( nWhich, TRUE ) ) )
+ ( SFX_ITEM_SET == pCFSet->GetItemState( nWhich, sal_True ) ) )
rSet.Put( pCFSet->Get( nWhich ) );
nWhich = aIter.NextWhich();
}
@@ -1816,7 +1814,7 @@ void lcl_MergeListLevelIndentAsLRSpaceItem( const SwTxtNode& rTxtNode,
const SwNumRule* pRule = rTxtNode.GetNumRule();
if ( pRule && rTxtNode.GetActualListLevel() >= 0 )
{
- const SwNumFmt& rFmt = pRule->Get(static_cast<USHORT>(rTxtNode.GetActualListLevel()));
+ const SwNumFmt& rFmt = pRule->Get(static_cast<sal_uInt16>(rTxtNode.GetActualListLevel()));
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
SvxLRSpaceItem aLR( RES_LR_SPACE );
@@ -1829,8 +1827,8 @@ void lcl_MergeListLevelIndentAsLRSpaceItem( const SwTxtNode& rTxtNode,
}
// erfrage die Attribute vom TextNode ueber den Bereich
-BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
- BOOL bOnlyTxtAttr, BOOL bGetFromChrFmt,
+sal_Bool SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
+ sal_Bool bOnlyTxtAttr, sal_Bool bGetFromChrFmt,
const bool bMergeIndentValuesOfNumRule ) const
{
if( HasHints() )
@@ -1862,11 +1860,11 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
}
}
- const USHORT nSize = m_pSwpHints->Count();
+ const sal_uInt16 nSize = m_pSwpHints->Count();
if( nStt == nEnd ) // kein Bereich:
{
- for (USHORT n = 0; n < nSize; ++n)
+ for (sal_uInt16 n = 0; n < nSize; ++n)
{
const SwTxtAttr* pHt = (*m_pSwpHints)[n];
const xub_StrLen nAttrStart = *pHt->GetStart();
@@ -1891,10 +1889,10 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
::std::auto_ptr< std::vector< SwPoolItemEndPair > > pAttrArr;
// <--
- const USHORT coArrSz = static_cast<USHORT>(RES_TXTATR_WITHEND_END) -
- static_cast<USHORT>(RES_CHRATR_BEGIN);
+ const sal_uInt16 coArrSz = static_cast<sal_uInt16>(RES_TXTATR_WITHEND_END) -
+ static_cast<sal_uInt16>(RES_CHRATR_BEGIN);
- for (USHORT n = 0; n < nSize; ++n)
+ for (sal_uInt16 n = 0; n < nSize; ++n)
{
const SwTxtAttr* pHt = (*m_pSwpHints)[n];
const xub_StrLen nAttrStart = *pHt->GetStart();
@@ -1905,7 +1903,7 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
if ( ! pAttrEnd ) // no attributes without end
continue;
- BOOL bChkInvalid = FALSE;
+ sal_Bool bChkInvalid = sal_False;
if( nAttrStart <= nStt ) // vor oder genau Start
{
if( *pAttrEnd <= nStt ) // liegt davor
@@ -1916,11 +1914,11 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
else
// else if( pHt->GetAttr() != aFmtSet.Get( pHt->Which() ) )
// uneindeutig
- bChkInvalid = TRUE;
+ bChkInvalid = sal_True;
}
else if( nAttrStart < nEnd // reicht in den Bereich
)// && pHt->GetAttr() != aFmtSet.Get( pHt->Which() ) )
- bChkInvalid = TRUE;
+ bChkInvalid = sal_True;
if( bChkInvalid )
{
@@ -1940,11 +1938,11 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
else
pItem = &pHt->GetAttr();
- const USHORT nHintEnd = *pAttrEnd;
+ const sal_uInt16 nHintEnd = *pAttrEnd;
while ( pItem )
{
- const USHORT nHintWhich = pItem->Which();
+ const sal_uInt16 nHintWhich = pItem->Which();
OSL_ENSURE(!isUNKNOWNATR(nHintWhich),
"SwTxtNode::GetAttr(): unknown attribute?");
@@ -2011,13 +2009,13 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
if ( pAttrArr.get() )
{
- for (USHORT n = 0; n < coArrSz; ++n)
+ for (sal_uInt16 n = 0; n < coArrSz; ++n)
{
const SwPoolItemEndPair& rItemPair = (*pAttrArr)[ n ];
if( (0 != rItemPair.mpItem) && ((SfxPoolItem*)-1 != rItemPair.mpItem) )
{
- const USHORT nWh =
- static_cast<USHORT>(n + RES_CHRATR_BEGIN);
+ const sal_uInt16 nWh =
+ static_cast<sal_uInt16>(n + RES_CHRATR_BEGIN);
if( nEnd <= rItemPair.mnEndPos ) // hinter oder genau Ende
{
@@ -2049,14 +2047,14 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
}
}
- return rSet.Count() ? TRUE : FALSE;
+ return rSet.Count() ? sal_True : sal_False;
}
namespace
{
-typedef std::pair<USHORT, USHORT> AttrSpan_t;
+typedef std::pair<sal_uInt16, sal_uInt16> AttrSpan_t;
typedef std::multimap<AttrSpan_t, const SwTxtAttr*> AttrSpanMap_t;
@@ -2095,7 +2093,7 @@ struct RemovePresentAttrs
const SfxPoolItem* pItem(aIter.GetCurItem());
while (pItem)
{
- const USHORT nWhich(pItem->Which());
+ const sal_uInt16 nWhich(pItem->Which());
if (CharFmt::IsItemIncluded(nWhich, pAutoStyle))
{
m_rAttrSet.ClearItem(nWhich);
@@ -2121,15 +2119,15 @@ private:
that tries to access the pointer has to check if it's non-null!
*/
void
-lcl_CollectHintSpans(const SwpHints& i_rHints, const USHORT nLength,
+lcl_CollectHintSpans(const SwpHints& i_rHints, const sal_uInt16 nLength,
AttrSpanMap_t& o_rSpanMap)
{
- USHORT nLastEnd(0);
+ sal_uInt16 nLastEnd(0);
- for (USHORT i(0); i != i_rHints.Count(); ++i)
+ for (sal_uInt16 i(0); i != i_rHints.Count(); ++i)
{
const SwTxtAttr* const pHint(i_rHints[i]);
- const USHORT nWhich(pHint->Which());
+ const sal_uInt16 nWhich(pHint->Which());
if (nWhich == RES_TXTATR_CHARFMT || nWhich == RES_TXTATR_AUTOFMT)
{
const AttrSpan_t aSpan(*pHint->GetStart(), *pHint->GetEnd());
@@ -2156,7 +2154,7 @@ lcl_CollectHintSpans(const SwpHints& i_rHints, const USHORT nLength,
void
-lcl_FillWhichIds(const SfxItemSet& i_rAttrSet, std::vector<USHORT>& o_rClearIds)
+lcl_FillWhichIds(const SfxItemSet& i_rAttrSet, std::vector<sal_uInt16>& o_rClearIds)
{
o_rClearIds.reserve(i_rAttrSet.Count());
SfxItemIter aIter(i_rAttrSet);
@@ -2177,7 +2175,7 @@ struct SfxItemSetClearer
{
SfxItemSet & m_rItemSet;
SfxItemSetClearer(SfxItemSet & rItemSet) : m_rItemSet(rItemSet) { }
- void operator()(USHORT const nWhich) { m_rItemSet.ClearItem(nWhich); }
+ void operator()(sal_uInt16 const nWhich) { m_rItemSet.ClearItem(nWhich); }
};
}
@@ -2245,7 +2243,7 @@ SwTxtNode::impl_FmtToTxtAttr(const SfxItemSet& i_rAttrSet)
}
// 3. Clear items from the node
- std::vector<USHORT> aClearedIds;
+ std::vector<sal_uInt16> aClearedIds;
lcl_FillWhichIds(i_rAttrSet, aClearedIds);
ClearItemsFromAttrSet(aClearedIds);
}
@@ -2281,18 +2279,18 @@ void SwTxtNode::FmtToTxtAttr( SwTxtNode* pNd )
pNd->GetOrCreateSwpHints();
- std::vector<USHORT> aProcessedIds;
+ std::vector<sal_uInt16> aProcessedIds;
if( aThisSet.Count() )
{
SfxItemIter aIter( aThisSet );
const SfxPoolItem* pItem = aIter.GetCurItem(), *pNdItem = 0;
SfxItemSet aConvertSet( GetDoc()->GetAttrPool(), aCharFmtSetRange );
- std::vector<USHORT> aClearWhichIds;
+ std::vector<sal_uInt16> aClearWhichIds;
while( true )
{
- if( SFX_ITEM_SET == aNdSet.GetItemState( pItem->Which(), FALSE, &pNdItem ) )
+ if( SFX_ITEM_SET == aNdSet.GetItemState( pItem->Which(), sal_False, &pNdItem ) )
{
if (*pItem == *pNdItem) // 4
{
@@ -2348,9 +2346,9 @@ void SwTxtNode::FmtToTxtAttr( SwTxtNode* pNd )
void SwpHints::CalcFlags()
{
m_bDDEFields = m_bFootnote = false;
- const USHORT nSize = Count();
+ const sal_uInt16 nSize = Count();
const SwTxtAttr* pAttr;
- for( USHORT nPos = 0; nPos < nSize; ++nPos )
+ for( sal_uInt16 nPos = 0; nPos < nSize; ++nPos )
{
switch( ( pAttr = (*this)[ nPos ])->Which() )
{
@@ -2383,13 +2381,13 @@ bool SwpHints::CalcHiddenParaField()
m_bCalcHiddenParaField = false;
bool bOldHasHiddenParaField = m_bHasHiddenParaField;
bool bNewHasHiddenParaField = false;
- const USHORT nSize = Count();
+ const sal_uInt16 nSize = Count();
const SwTxtAttr *pTxtHt;
- for( USHORT nPos = 0; nPos < nSize; ++nPos )
+ for( sal_uInt16 nPos = 0; nPos < nSize; ++nPos )
{
pTxtHt = (*this)[ nPos ];
- const USHORT nWhich = pTxtHt->Which();
+ const sal_uInt16 nWhich = pTxtHt->Which();
if( RES_TXTATR_FIELD == nWhich )
{
@@ -2438,7 +2436,7 @@ bool SwpHints::MergePortions( SwTxtNode& rNode )
typedef std::multimap< int, SwTxtAttr* > PortionMap;
PortionMap aPortionMap;
xub_StrLen nLastPorStart = STRING_LEN;
- USHORT i = 0;
+ sal_uInt16 i = 0;
int nKey = 0;
// get portions by start position:
@@ -2469,8 +2467,8 @@ bool SwpHints::MergePortions( SwTxtNode& rNode )
PortionMap::iterator aIter2 = aRange2.first;
bool bMerge = true;
- const USHORT nAttributesInPor1 = static_cast<USHORT>(std::distance( aRange1.first, aRange1.second ));
- const USHORT nAttributesInPor2 = static_cast<USHORT>(std::distance( aRange2.first, aRange2.second ));
+ const sal_uInt16 nAttributesInPor1 = static_cast<sal_uInt16>(std::distance( aRange1.first, aRange1.second ));
+ const sal_uInt16 nAttributesInPor2 = static_cast<sal_uInt16>(std::distance( aRange2.first, aRange2.second ));
if ( nAttributesInPor1 == nAttributesInPor2 && nAttributesInPor1 != 0 )
{
@@ -2501,7 +2499,7 @@ bool SwpHints::MergePortions( SwTxtNode& rNode )
SwTxtAttr* p2 = (*aIter2).second;
nNewPortionEnd = *p2->GetEnd();
- const USHORT nCountBeforeDelete = Count();
+ const sal_uInt16 nCountBeforeDelete = Count();
Delete( p2 );
// robust: check if deletion actually took place before destroying attribute:
@@ -2542,9 +2540,9 @@ void lcl_CheckSortNumber( const SwpHints& rHints, SwTxtCharFmt& rNewCharFmt )
{
const xub_StrLen nHtStart = *rNewCharFmt.GetStart();
const xub_StrLen nHtEnd = *rNewCharFmt.GetEnd();
- USHORT nSortNumber = 0;
+ sal_uInt16 nSortNumber = 0;
- for ( USHORT i = 0; i < rHints.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rHints.Count(); ++i )
{
const SwTxtAttr* pOtherHt = rHints[i];
@@ -2559,7 +2557,7 @@ void lcl_CheckSortNumber( const SwpHints& rHints, SwTxtCharFmt& rNewCharFmt )
if ( nOtherStart == nHtStart && nOtherEnd == nHtEnd )
{
- const USHORT nOtherSortNum = static_cast<const SwTxtCharFmt*>(pOtherHt)->GetSortNumber();
+ const sal_uInt16 nOtherSortNum = static_cast<const SwTxtCharFmt*>(pOtherHt)->GetSortNumber();
nSortNumber = nOtherSortNum + 1;
}
}
@@ -2596,7 +2594,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
// Wir koennen also auf die while-Schleife verzichten
xub_StrLen *pHtEnd = pHint->GetEnd();
- USHORT nWhich = pHint->Which();
+ sal_uInt16 nWhich = pHint->Which();
switch( nWhich )
{
@@ -2605,7 +2603,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
// Check if character format contains hidden attribute:
const SwCharFmt* pFmt = pHint->GetCharFmt().GetCharFmt();
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == pFmt->GetItemState( RES_CHRATR_HIDDEN, TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == pFmt->GetItemState( RES_CHRATR_HIDDEN, sal_True, &pItem ) )
rNode.SetCalcHiddenCharFlags();
((SwTxtCharFmt*)pHint)->ChgTxtNode( &rNode );
@@ -2626,7 +2624,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
break;
case RES_TXTATR_FIELD:
{
- BOOL bDelFirst = 0 != ((SwTxtFld*)pHint)->GetpTxtNode();
+ sal_Bool bDelFirst = 0 != ((SwTxtFld*)pHint)->GetpTxtNode();
((SwTxtFld*)pHint)->ChgTxtNode( &rNode );
SwDoc* pDoc = rNode.GetDoc();
const SwField* pFld = ((SwTxtFld*)pHint)->GetFld().GetFld();
@@ -2645,9 +2643,9 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
case RES_DBNEXTSETFLD:
{
if( bDelFirst )
- pDoc->InsDelFldInFldLst( FALSE, *(SwTxtFld*)pHint );
+ pDoc->InsDelFldInFldLst( sal_False, *(SwTxtFld*)pHint );
if( rNode.GetNodes().IsDocNodes() )
- pDoc->InsDelFldInFldLst( TRUE, *(SwTxtFld*)pHint );
+ pDoc->InsDelFldInFldLst( sal_True, *(SwTxtFld*)pHint );
}
break;
case RES_DDEFLD:
@@ -2660,7 +2658,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
// gehts ins normale Nodes-Array?
if( rNode.GetNodes().IsDocNodes() )
{
- BOOL bInsFldType = FALSE;
+ sal_Bool bInsFldType = sal_False;
switch( pFld->GetTyp()->Which() )
{
case RES_SETEXPFLD:
@@ -2711,7 +2709,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
// search for a reference with the same name
SwTxtAttr* pTmpHt;
xub_StrLen *pTmpHtEnd, *pTmpHintEnd;
- for( USHORT n = 0, nEnd = Count(); n < nEnd; ++n )
+ for( sal_uInt16 n = 0, nEnd = Count(); n < nEnd; ++n )
{
if (RES_TXTATR_REFMARK == (pTmpHt = GetTextHint(n))->Which() &&
pHint->GetAttr() == pTmpHt->GetAttr() &&
@@ -2721,18 +2719,18 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
SwComparePosition eCmp = ::ComparePosition(
*pTmpHt->GetStart(), *pTmpHtEnd,
*pHint->GetStart(), *pTmpHintEnd );
- BOOL bDelOld = TRUE, bChgStart = FALSE, bChgEnd = FALSE;
+ sal_Bool bDelOld = sal_True, bChgStart = sal_False, bChgEnd = sal_False;
switch( eCmp )
{
case POS_BEFORE:
- case POS_BEHIND: bDelOld = FALSE; break;
+ case POS_BEHIND: bDelOld = sal_False; break;
- case POS_OUTSIDE: bChgStart = bChgEnd = TRUE; break;
+ case POS_OUTSIDE: bChgStart = bChgEnd = sal_True; break;
case POS_COLLIDE_END:
- case POS_OVERLAP_BEFORE: bChgStart = TRUE; break;
+ case POS_OVERLAP_BEFORE: bChgStart = sal_True; break;
case POS_COLLIDE_START:
- case POS_OVERLAP_BEHIND: bChgEnd = TRUE; break;
+ case POS_OVERLAP_BEHIND: bChgEnd = sal_True; break;
default: break;
}
@@ -2770,7 +2768,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
}
if( nsSetAttrMode::SETATTR_DONTEXPAND & nMode )
- pHint->SetDontExpand( TRUE );
+ pHint->SetDontExpand( sal_True );
// SwTxtAttrs ohne Ende werden sonderbehandelt:
// Sie werden natuerlich in das Array insertet, aber sie werden nicht
@@ -2886,7 +2884,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
* SwpHints::DeleteAtPos()
*************************************************************************/
-void SwpHints::DeleteAtPos( const USHORT nPos )
+void SwpHints::DeleteAtPos( const sal_uInt16 nPos )
{
SwTxtAttr *pHint = GetTextHint(nPos);
// ChainDelete( pHint );
@@ -2924,7 +2922,7 @@ void SwpHints::DeleteAtPos( const USHORT nPos )
void SwpHints::Delete( SwTxtAttr* pTxtHt )
{
// Attr 2.0: SwpHintsArr::Delete( pTxtHt );
- const USHORT nPos = GetStartOf( pTxtHt );
+ const sal_uInt16 nPos = GetStartOf( pTxtHt );
OSL_ENSURE( USHRT_MAX != nPos, "Attribut nicht im Attribut-Array!" );
if( USHRT_MAX != nPos )
DeleteAtPos( nPos );
@@ -2934,7 +2932,7 @@ void SwTxtNode::ClearSwpHintsArr( bool bDelFields )
{
if ( HasHints() )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while ( nPos < m_pSwpHints->Count() )
{
SwTxtAttr* pDel = m_pSwpHints->GetTextHint( nPos );
@@ -2965,10 +2963,10 @@ void SwTxtNode::ClearSwpHintsArr( bool bDelFields )
}
}
-USHORT SwTxtNode::GetLang( const xub_StrLen nBegin, const xub_StrLen nLen,
- USHORT nScript ) const
+sal_uInt16 SwTxtNode::GetLang( const xub_StrLen nBegin, const xub_StrLen nLen,
+ sal_uInt16 nScript ) const
{
- USHORT nRet = LANGUAGE_DONTKNOW;
+ sal_uInt16 nRet = LANGUAGE_DONTKNOW;
if ( ! nScript )
{
@@ -2976,13 +2974,13 @@ USHORT SwTxtNode::GetLang( const xub_StrLen nBegin, const xub_StrLen nLen,
}
// --> FME 2008-09-29 #i91465# hennerdrewes: Consider nScript if pSwpHints == 0
- const USHORT nWhichId = GetWhichOfScript( RES_CHRATR_LANGUAGE, nScript );
+ const sal_uInt16 nWhichId = GetWhichOfScript( RES_CHRATR_LANGUAGE, nScript );
// <--
if ( HasHints() )
{
const xub_StrLen nEnd = nBegin + nLen;
- for ( USHORT i = 0, nSize = m_pSwpHints->Count(); i < nSize; ++i )
+ for ( sal_uInt16 i = 0, nSize = m_pSwpHints->Count(); i < nSize; ++i )
{
// ist der Attribut-Anfang schon groesser als der Idx ?
const SwTxtAttr *pHt = m_pSwpHints->operator[](i);
@@ -2990,7 +2988,7 @@ USHORT SwTxtNode::GetLang( const xub_StrLen nBegin, const xub_StrLen nLen,
if( nEnd < nAttrStart )
break;
- const USHORT nWhich = pHt->Which();
+ const sal_uInt16 nWhich = pHt->Which();
if( nWhichId == nWhich ||
( ( pHt->IsCharFmtAttr() || RES_TXTATR_AUTOFMT == nWhich ) && CharFmt::IsItemIncluded( nWhichId, pHt ) ) )
@@ -3007,7 +3005,7 @@ USHORT SwTxtNode::GetLang( const xub_StrLen nBegin, const xub_StrLen nLen,
( nAttrStart == *pEndIdx || !nBegin ))) )
{
const SfxPoolItem* pItem = CharFmt::GetItem( *pHt, nWhichId );
- USHORT nLng = ((SvxLanguageItem*)pItem)->GetLanguage();
+ sal_uInt16 nLng = ((SvxLanguageItem*)pItem)->GetLanguage();
// Umfasst das Attribut den Bereich komplett?
if( nAttrStart <= nBegin && nEnd <= *pEndIdx )
@@ -3022,7 +3020,7 @@ USHORT SwTxtNode::GetLang( const xub_StrLen nBegin, const xub_StrLen nLen,
{
nRet = ((SvxLanguageItem&)GetSwAttrSet().Get( nWhichId )).GetLanguage();
if( LANGUAGE_DONTKNOW == nRet )
- nRet = static_cast<USHORT>(GetAppLanguage());
+ nRet = static_cast<sal_uInt16>(GetAppLanguage());
}
return nRet;
}
@@ -3039,12 +3037,19 @@ sal_Unicode GetCharOfTxtAttr( const SwTxtAttr& rAttr )
case RES_TXTATR_META:
case RES_TXTATR_METAFIELD:
cRet = CH_TXTATR_INWORD;
- break;
+ break;
case RES_TXTATR_FIELD:
case RES_TXTATR_FLYCNT:
+ {
cRet = CH_TXTATR_BREAKWORD;
- break;
+
+ // #i78149: PostIt fields should not break words for spell and grammar checking
+ if (rAttr.Which() == RES_TXTATR_FIELD &&
+ RES_POSTITFLD == rAttr.GetFld().GetFld()->GetTyp()->Which())
+ cRet = CH_TXTATR_INWORD;
+ }
+ break;
default:
OSL_FAIL("GetCharOfTxtAttr: unknown attr");
diff --git a/sw/source/core/txtnode/txatritr.cxx b/sw/source/core/txtnode/txatritr.cxx
index 9122b2d42e08..5bbab28687ce 100644
--- a/sw/source/core/txtnode/txatritr.cxx
+++ b/sw/source/core/txtnode/txatritr.cxx
@@ -106,7 +106,7 @@ sal_Bool SwScriptIterator::Next()
// --------------------------------------------------------------------
-SwTxtAttrIterator::SwTxtAttrIterator( const SwTxtNode& rTNd, USHORT nWhchId,
+SwTxtAttrIterator::SwTxtAttrIterator( const SwTxtNode& rTNd, sal_uInt16 nWhchId,
xub_StrLen nStt,
sal_Bool bUseGetWhichOfScript )
: aSIter( rTNd.GetTxt(), nStt ), rTxtNd( rTNd ),
@@ -126,7 +126,7 @@ sal_Bool SwTxtAttrIterator::Next()
{
do {
const SwTxtAttr* pHt = (SwTxtAttr*)aStack[ 0 ];
- USHORT nEndPos = *pHt->GetEnd();
+ sal_uInt16 nEndPos = *pHt->GetEnd();
if( nChgPos >= nEndPos )
aStack.Remove( 0 );
else
@@ -141,7 +141,7 @@ sal_Bool SwTxtAttrIterator::Next()
if( aStack.Count() )
{
const SwTxtAttr* pHt = (SwTxtAttr*)aStack[ 0 ];
- USHORT nEndPos = *pHt->GetEnd();
+ sal_uInt16 nEndPos = *pHt->GetEnd();
if( nChgPos >= nEndPos )
{
nChgPos = nEndPos;
@@ -170,7 +170,7 @@ sal_Bool SwTxtAttrIterator::Next()
void SwTxtAttrIterator::AddToStack( const SwTxtAttr& rAttr )
{
void* pAdd = (void*)&rAttr;
- USHORT nIns = 0, nEndPos = *rAttr.GetEnd();
+ sal_uInt16 nIns = 0, nEndPos = *rAttr.GetEnd();
for( ; nIns < aStack.Count(); ++nIns )
if( *((SwTxtAttr*)aStack[ nIns ] )->GetEnd() > nEndPos )
break;
@@ -180,7 +180,7 @@ void SwTxtAttrIterator::AddToStack( const SwTxtAttr& rAttr )
void SwTxtAttrIterator::SearchNextChg()
{
- USHORT nWh = 0;
+ sal_uInt16 nWh = 0;
if( nChgPos == aSIter.GetScriptChgPos() )
{
aSIter.Next();
@@ -216,8 +216,8 @@ void SwTxtAttrIterator::SearchNextChg()
for( ; nAttrPos < pHts->Count(); ++nAttrPos )
{
const SwTxtAttr* pHt = (*pHts)[ nAttrPos ];
- const USHORT* pEnd = pHt->GetEnd();
- const USHORT nHtStt = *pHt->GetStart();
+ const sal_uInt16* pEnd = pHt->GetEnd();
+ const sal_uInt16 nHtStt = *pHt->GetStart();
if( nHtStt < nStt && ( !pEnd || *pEnd <= nStt ))
continue;
diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx
index 0e4434679d7b..599d0853b1c1 100644
--- a/sw/source/core/txtnode/txtatr2.cxx
+++ b/sw/source/core/txtnode/txtatr2.cxx
@@ -61,7 +61,7 @@ SwTxtCharFmt::SwTxtCharFmt( SwFmtCharFmt& rAttr,
, m_nSortNumber( 0 )
{
rAttr.pTxtAttr = this;
- SetCharFmtAttr( TRUE );
+ SetCharFmtAttr( sal_True );
}
SwTxtCharFmt::~SwTxtCharFmt( )
@@ -70,7 +70,7 @@ SwTxtCharFmt::~SwTxtCharFmt( )
void SwTxtCharFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
- USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
OSL_ENSURE( isCHRATR(nWhich) || (RES_OBJECTDYING == nWhich)
|| (RES_ATTRSET_CHG == nWhich) || (RES_FMT_CHG == nWhich),
"SwTxtCharFmt::Modify(): unknown Modify");
@@ -83,16 +83,16 @@ void SwTxtCharFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
}
// erfrage vom Modify Informationen
-BOOL SwTxtCharFmt::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwTxtCharFmt::GetInfo( SfxPoolItem& rInfo ) const
{
if ( RES_AUTOFMT_DOCNODE != rInfo.Which() || !m_pTxtNode ||
&m_pTxtNode->GetNodes() != static_cast<SwAutoFmtGetDocNode&>(rInfo).pNodes )
{
- return TRUE;
+ return sal_True;
}
static_cast<SwAutoFmtGetDocNode&>(rInfo).pCntntNode = m_pTxtNode;
- return FALSE;
+ return sal_False;
}
@@ -150,17 +150,17 @@ SwCharFmt* SwTxtINetFmt::GetCharFmt()
SetVisited( pDoc->IsVisitedURL( rFmt.GetValue() ) );
SetVisitedValid( true );
}
- USHORT nId;
+ sal_uInt16 nId;
const String& rStr = IsVisited() ? rFmt.GetVisitedFmt()
: rFmt.GetINetFmt();
if( rStr.Len() )
nId = IsVisited() ? rFmt.GetVisitedFmtId() : rFmt.GetINetFmtId();
else
- nId = static_cast<USHORT>(IsVisited() ? RES_POOLCHR_INET_VISIT : RES_POOLCHR_INET_NORMAL);
+ nId = static_cast<sal_uInt16>(IsVisited() ? RES_POOLCHR_INET_VISIT : RES_POOLCHR_INET_NORMAL);
// JP 10.02.2000, Bug 72806: dont modify the doc for getting the
// correct charstyle.
- BOOL bResetMod = !pDoc->IsModified();
+ sal_Bool bResetMod = !pDoc->IsModified();
Link aOle2Lnk;
if( bResetMod )
{
@@ -189,7 +189,7 @@ SwCharFmt* SwTxtINetFmt::GetCharFmt()
void SwTxtINetFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
- USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
OSL_ENSURE( isCHRATR(nWhich) || (RES_OBJECTDYING == nWhich)
|| (RES_ATTRSET_CHG == nWhich) || (RES_FMT_CHG == nWhich),
"SwTxtINetFmt::Modify(): unknown Modify");
@@ -202,19 +202,19 @@ void SwTxtINetFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
}
// erfrage vom Modify Informationen
-BOOL SwTxtINetFmt::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwTxtINetFmt::GetInfo( SfxPoolItem& rInfo ) const
{
if ( RES_AUTOFMT_DOCNODE != rInfo.Which() || !m_pTxtNode ||
&m_pTxtNode->GetNodes() != static_cast<SwAutoFmtGetDocNode&>(rInfo).pNodes )
{
- return TRUE;
+ return sal_True;
}
static_cast<SwAutoFmtGetDocNode&>(rInfo).pCntntNode = m_pTxtNode;
- return FALSE;
+ return sal_False;
}
-BOOL SwTxtINetFmt::IsProtect( ) const
+sal_Bool SwTxtINetFmt::IsProtect( ) const
{
return m_pTxtNode && m_pTxtNode->IsProtect();
}
@@ -238,7 +238,7 @@ SwTxtRuby::~SwTxtRuby()
void SwTxtRuby::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
{
- USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
+ sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
OSL_ENSURE( isCHRATR(nWhich) || (RES_OBJECTDYING == nWhich)
|| (RES_ATTRSET_CHG == nWhich) || (RES_FMT_CHG == nWhich),
"SwTxtRuby::Modify(): unknown Modify");
@@ -250,16 +250,16 @@ void SwTxtRuby::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
}
}
-BOOL SwTxtRuby::GetInfo( SfxPoolItem& rInfo ) const
+sal_Bool SwTxtRuby::GetInfo( SfxPoolItem& rInfo ) const
{
if( RES_AUTOFMT_DOCNODE != rInfo.Which() || !m_pTxtNode ||
&m_pTxtNode->GetNodes() != static_cast<SwAutoFmtGetDocNode&>(rInfo).pNodes )
{
- return TRUE;
+ return sal_True;
}
static_cast<SwAutoFmtGetDocNode&>(rInfo).pCntntNode = m_pTxtNode;
- return FALSE;
+ return sal_False;
}
SwCharFmt* SwTxtRuby::GetCharFmt()
@@ -271,13 +271,13 @@ SwCharFmt* SwTxtRuby::GetCharFmt()
{
const SwDoc* pDoc = GetTxtNode().GetDoc();
const String& rStr = rFmt.GetCharFmtName();
- USHORT nId = RES_POOLCHR_RUBYTEXT;
+ sal_uInt16 nId = RES_POOLCHR_RUBYTEXT;
if ( rStr.Len() )
nId = rFmt.GetCharFmtId();
// JP 10.02.2000, Bug 72806: dont modify the doc for getting the
// correct charstyle.
- BOOL bResetMod = !pDoc->IsModified();
+ sal_Bool bResetMod = !pDoc->IsModified();
Link aOle2Lnk;
if( bResetMod )
{
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 6ab9545e451e..bfb76e8a552d 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -62,7 +62,7 @@
#include <txttypes.hxx>
#include <breakit.hxx>
#include <crstate.hxx>
-#include <undobj.hxx>
+#include <UndoOverwrite.hxx>
#include <txatritr.hxx>
#include <redline.hxx> // SwRedline
#include <docary.hxx> // SwRedlineTbl
@@ -111,14 +111,14 @@ bool lcl_IsSkippableWhiteSpace( xub_Unicode cCh )
* only for deleted redlines
*/
-USHORT lcl_MaskRedlines( const SwTxtNode& rNode, XubString& rText,
+sal_uInt16 lcl_MaskRedlines( const SwTxtNode& rNode, XubString& rText,
const xub_StrLen nStt, const xub_StrLen nEnd,
const xub_Unicode cChar )
{
- USHORT nNumOfMaskedRedlines = 0;
+ sal_uInt16 nNumOfMaskedRedlines = 0;
const SwDoc& rDoc = *rNode.GetDoc();
- USHORT nAct = rDoc.GetRedlinePos( rNode, USHRT_MAX );
+ sal_uInt16 nAct = rDoc.GetRedlinePos( rNode, USHRT_MAX );
for ( ; nAct < rDoc.GetRedlineTbl().Count(); nAct++ )
{
@@ -156,13 +156,13 @@ USHORT lcl_MaskRedlines( const SwTxtNode& rNode, XubString& rText,
* Used for spell checking. Deleted redlines and hidden characters are masked
*/
-USHORT lcl_MaskRedlinesAndHiddenText( const SwTxtNode& rNode, XubString& rText,
+sal_uInt16 lcl_MaskRedlinesAndHiddenText( const SwTxtNode& rNode, XubString& rText,
const xub_StrLen nStt, const xub_StrLen nEnd,
const xub_Unicode cChar = CH_TXTATR_INWORD,
bool bCheckShowHiddenChar = true )
{
- USHORT nRedlinesMasked = 0;
- USHORT nHiddenCharsMasked = 0;
+ sal_uInt16 nRedlinesMasked = 0;
+ sal_uInt16 nHiddenCharsMasked = 0;
const SwDoc& rDoc = *rNode.GetDoc();
const bool bShowChg = 0 != IDocumentRedlineAccess::IsShowChanges( rDoc.GetRedlineMode() );
@@ -258,13 +258,13 @@ static SwRect lcl_CalculateRepaintRect( SwTxtFrm& rTxtFrm, xub_StrLen nChgStart,
delete pSt2Pos;
}
- BOOL bSameFrame = TRUE;
+ sal_Bool bSameFrame = sal_True;
if( rTxtFrm.HasFollow() )
{
if( pEndFrm != pStartFrm )
{
- bSameFrame = FALSE;
+ bSameFrame = sal_False;
SwRect aStFrm( pStartFrm->PaintArea() );
{
SWRECTFN( pStartFrm )
@@ -280,7 +280,7 @@ static SwRect lcl_CalculateRepaintRect( SwTxtFrm& rTxtFrm, xub_StrLen nChgStart,
(aRect.*fnRect->fnSetRight)( (aStFrm.*fnRect->fnGetRight)() );
}
aRect.Union( aTmp );
- while( TRUE )
+ while( sal_True )
{
pStartFrm = pStartFrm->GetFollow();
if( pStartFrm == pEndFrm )
@@ -315,7 +315,7 @@ static SwRect lcl_CalculateRepaintRect( SwTxtFrm& rTxtFrm, xub_StrLen nChgStart,
static bool lcl_HaveCommonAttributes( IStyleAccess& rStyleAccess,
const SfxItemSet* pSet1,
- USHORT nWhichId,
+ sal_uInt16 nWhichId,
const SfxItemSet& rSet2,
boost::shared_ptr<SfxItemSet>& pStyleHandle )
{
@@ -326,9 +326,9 @@ static bool lcl_HaveCommonAttributes( IStyleAccess& rStyleAccess,
if ( !pSet1 )
{
OSL_ENSURE( nWhichId, "lcl_HaveCommonAttributes not used correctly" );
- if ( SFX_ITEM_SET == rSet2.GetItemState( nWhichId, FALSE ) )
+ if ( SFX_ITEM_SET == rSet2.GetItemState( nWhichId, sal_False ) )
{
- pNewSet = rSet2.Clone( TRUE );
+ pNewSet = rSet2.Clone( sal_True );
pNewSet->ClearItem( nWhichId );
}
}
@@ -336,12 +336,12 @@ static bool lcl_HaveCommonAttributes( IStyleAccess& rStyleAccess,
{
SfxItemIter aIter( *pSet1 );
const SfxPoolItem* pItem = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
- if ( SFX_ITEM_SET == rSet2.GetItemState( pItem->Which(), FALSE ) )
+ if ( SFX_ITEM_SET == rSet2.GetItemState( pItem->Which(), sal_False ) )
{
if ( !pNewSet )
- pNewSet = rSet2.Clone( TRUE );
+ pNewSet = rSet2.Clone( sal_True );
pNewSet->ClearItem( pItem->Which() );
}
@@ -363,12 +363,12 @@ static bool lcl_HaveCommonAttributes( IStyleAccess& rStyleAccess,
return bRet;
}
-inline BOOL InRange(xub_StrLen nIdx, xub_StrLen nStart, xub_StrLen nEnd) {
+inline sal_Bool InRange(xub_StrLen nIdx, xub_StrLen nStart, xub_StrLen nEnd) {
return ((nIdx >=nStart) && (nIdx <= nEnd));
}
/*
- * void SwTxtNode::RstAttr(const SwIndex &rIdx, USHORT nLen)
+ * void SwTxtNode::RstAttr(const SwIndex &rIdx, sal_uInt16 nLen)
*
* Deletes all attributes, starting at position rIdx, for length nLen.
*/
@@ -388,26 +388,26 @@ inline BOOL InRange(xub_StrLen nIdx, xub_StrLen nStart, xub_StrLen nEnd) {
* -> nothing to do
*/
-void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich,
- const SfxItemSet* pSet, BOOL bInclRefToxMark )
+void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, sal_uInt16 nWhich,
+ const SfxItemSet* pSet, sal_Bool bInclRefToxMark )
{
// Attribute?
if ( !GetpSwpHints() )
return;
- USHORT i = 0;
+ sal_uInt16 i = 0;
xub_StrLen nStt = rIdx.GetIndex();
xub_StrLen nEnd = nStt + nLen;
xub_StrLen nAttrStart;
SwTxtAttr *pHt;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
// nMin and nMax initialized to maximum / minimum (inverse)
xub_StrLen nMin = m_Text.Len();
xub_StrLen nMax = nStt;
- const BOOL bNoLen = !nMin;
+ const sal_Bool bNoLen = !nMin;
// We have to remember the "new" attributes, which have
// been introduced by splitting surrounding attributes (case 4).
@@ -436,7 +436,7 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich,
// 1. case: We want to reset only the attributes listed in pSet:
if ( pSet )
{
- bSkipAttr = SFX_ITEM_SET != pSet->GetItemState( pHt->Which(), FALSE );
+ bSkipAttr = SFX_ITEM_SET != pSet->GetItemState( pHt->Which(), sal_False );
if ( bSkipAttr && RES_TXTATR_AUTOFMT == pHt->Which() )
{
// if the current attribute is an autostyle, we have to check if the autostyle
@@ -517,7 +517,7 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich,
{
m_pSwpHints->NoteInHistory( pHt );
*pHt->GetStart() = nEnd;
- m_pSwpHints->NoteInHistory( pHt, TRUE );
+ m_pSwpHints->NoteInHistory( pHt, sal_True );
if ( pStyleHandle.get() && nAttrStart < nEnd )
{
@@ -526,7 +526,7 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich,
InsertHint( pNew, nsSetAttrMode::SETATTR_NOHINTADJUST );
}
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
}
@@ -539,13 +539,13 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich,
nMin = nAttrStart;
if ( nMax < *pAttrEnd )
nMax = *pAttrEnd;
- bChanged = TRUE;
+ bChanged = sal_True;
const xub_StrLen nAttrEnd = *pAttrEnd;
m_pSwpHints->NoteInHistory( pHt );
*pAttrEnd = nStt;
- m_pSwpHints->NoteInHistory( pHt, TRUE );
+ m_pSwpHints->NoteInHistory( pHt, sal_True );
if ( pStyleHandle.get() )
{
@@ -561,11 +561,11 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich,
nMin = nAttrStart;
if ( nMax < *pAttrEnd )
nMax = *pAttrEnd;
- bChanged = TRUE;
+ bChanged = sal_True;
xub_StrLen nTmpEnd = *pAttrEnd;
m_pSwpHints->NoteInHistory( pHt );
*pAttrEnd = nStt;
- m_pSwpHints->NoteInHistory( pHt, TRUE );
+ m_pSwpHints->NoteInHistory( pHt, sal_True );
if ( pStyleHandle.get() && nStt < nEnd )
{
@@ -637,13 +637,13 @@ XubString SwTxtNode::GetCurWord( xub_StrLen nPos ) const
sal_Int16 nWordType = WordType::DICTIONARY_WORD;
lang::Locale aLocale( pBreakIt->GetLocale( GetLang( nPos ) ) );
#ifdef DEBUG
- BOOL bBegin = rxBreak->isBeginWord( m_Text, nPos, aLocale, nWordType );
- BOOL bEnd = rxBreak->isEndWord ( m_Text, nPos, aLocale, nWordType );
+ sal_Bool bBegin = rxBreak->isBeginWord( m_Text, nPos, aLocale, nWordType );
+ sal_Bool bEnd = rxBreak->isEndWord ( m_Text, nPos, aLocale, nWordType );
(void)bBegin;
(void)bEnd;
#endif
aBndry =
- rxBreak->getWordBoundary( m_Text, nPos, aLocale, nWordType, TRUE );
+ rxBreak->getWordBoundary( m_Text, nPos, aLocale, nWordType, sal_True );
// if no word was found use previous word (if any)
if (aBndry.startPos == aBndry.endPos)
@@ -663,7 +663,7 @@ XubString SwTxtNode::GetCurWord( xub_StrLen nPos ) const
SwScanner::SwScanner( const SwTxtNode& rNd, const String& rTxt, const LanguageType* pLang,
const ModelToViewHelper::ConversionMap* pConvMap,
- USHORT nType, xub_StrLen nStart, xub_StrLen nEnde, BOOL bClp )
+ sal_uInt16 nType, xub_StrLen nStart, xub_StrLen nEnde, sal_Bool bClp )
: rNode( rNd ), rText( rTxt), pLanguage( pLang ), pConversionMap( pConvMap ), nLen( 0 ), nWordType( nType ), bClip( bClp )
{
OSL_ENSURE( rText.Len(), "SwScanner: EmptyString" );
@@ -682,7 +682,7 @@ SwScanner::SwScanner( const SwTxtNode& rNd, const String& rTxt, const LanguageTy
}
}
-BOOL SwScanner::NextWord()
+sal_Bool SwScanner::NextWord()
{
nBegin = nBegin + nLen;
Boundary aBound;
@@ -699,7 +699,7 @@ BOOL SwScanner::NextWord()
{
if ( !pLanguage )
{
- const USHORT nNextScriptType = pBreakIt->GetBreakIter()->getScriptType( rText, nBegin );
+ const sal_uInt16 nNextScriptType = pBreakIt->GetBreakIter()->getScriptType( rText, nBegin );
ModelToViewHelper::ModelPosition aModelBeginPos = ModelToViewHelper::ConvertToModelPosition( pConversionMap, nBegin );
const xub_StrLen nBeginModelPos = (xub_StrLen)aModelBeginPos.mnPos;
aCurrLang = rNode.GetLang( nBeginModelPos, 1, nNextScriptType );
@@ -718,15 +718,16 @@ BOOL SwScanner::NextWord()
}
if ( nBegin >= rText.Len() || nBegin >= nEndPos )
- return FALSE;
+ return sal_False;
// get the word boundaries
aBound = pBreakIt->GetBreakIter()->getWordBoundary( rText, nBegin,
pBreakIt->GetLocale( aCurrLang ), nWordType, sal_True );
+ OSL_ENSURE( aBound.endPos >= aBound.startPos, "broken aBound result" );
//no word boundaries could be found
if(aBound.endPos == aBound.startPos)
- return FALSE;
+ return sal_False;
//if a word before is found it has to be searched for the next
if(aBound.endPos == nBegin)
@@ -737,46 +738,54 @@ BOOL SwScanner::NextWord()
rCC.setLocale( aOldLocale );
- // we have to differenciate between these cases:
- if ( aBound.startPos <= nBegin )
+ // #i89042, as discussed with HDU: don't evaluate script changes for word count. Use whole word.
+ if ( nWordType == i18n::WordType::WORD_COUNT )
{
+ nBegin = Max( static_cast< xub_StrLen >(aBound.startPos), nBegin );
+ nLen = 0;
+ if (static_cast< xub_StrLen >(aBound.endPos) > nBegin)
+ nLen = static_cast< xub_StrLen >(aBound.endPos) - nBegin;
+ }
+ else
+ {
+ // we have to differenciate between these cases:
+ if ( aBound.startPos <= nBegin )
+ {
OSL_ENSURE( aBound.endPos >= nBegin, "Unexpected aBound result" );
- // restrict boundaries to script boundaries and nEndPos
- const USHORT nCurrScript =
- pBreakIt->GetBreakIter()->getScriptType( rText, nBegin );
+ // restrict boundaries to script boundaries and nEndPos
+ const sal_uInt16 nCurrScript = pBreakIt->GetBreakIter()->getScriptType( rText, nBegin );
+ XubString aTmpWord = rText.Copy( nBegin, static_cast<xub_StrLen>(aBound.endPos - nBegin) );
+ const sal_Int32 nScriptEnd = nBegin +
+ pBreakIt->GetBreakIter()->endOfScript( aTmpWord, 0, nCurrScript );
+ const sal_Int32 nEnd = Min( aBound.endPos, nScriptEnd );
- XubString aTmpWord = rText.Copy( nBegin, static_cast<xub_StrLen>(aBound.endPos - nBegin) );
- const sal_Int32 nScriptEnd = nBegin +
- pBreakIt->GetBreakIter()->endOfScript( aTmpWord, 0, nCurrScript );
- const sal_Int32 nEnd = Min( aBound.endPos, nScriptEnd );
+ // restrict word start to last script change position
+ sal_Int32 nScriptBegin = 0;
+ if ( aBound.startPos < nBegin )
+ {
+ // search from nBegin backwards until the next script change
+ aTmpWord = rText.Copy( static_cast<xub_StrLen>(aBound.startPos),
+ static_cast<xub_StrLen>(nBegin - aBound.startPos + 1) );
+ nScriptBegin = aBound.startPos +
+ pBreakIt->GetBreakIter()->beginOfScript( aTmpWord, nBegin - aBound.startPos,
+ nCurrScript );
+ }
- // restrict word start to last script change position
- sal_Int32 nScriptBegin = 0;
- if ( aBound.startPos < nBegin )
+ nBegin = (xub_StrLen)Max( aBound.startPos, nScriptBegin );
+ nLen = (xub_StrLen)(nEnd - nBegin);
+ }
+ else
{
- // search from nBegin backwards until the next script change
- aTmpWord = rText.Copy( static_cast<xub_StrLen>(aBound.startPos),
- static_cast<xub_StrLen>(nBegin - aBound.startPos + 1) );
- nScriptBegin = aBound.startPos +
- pBreakIt->GetBreakIter()->beginOfScript( aTmpWord, nBegin - aBound.startPos,
- nCurrScript );
+ const sal_uInt16 nCurrScript = pBreakIt->GetBreakIter()->getScriptType( rText, aBound.startPos );
+ XubString aTmpWord = rText.Copy( static_cast<xub_StrLen>(aBound.startPos),
+ static_cast<xub_StrLen>(aBound.endPos - aBound.startPos) );
+ const sal_Int32 nScriptEnd = aBound.startPos +
+ pBreakIt->GetBreakIter()->endOfScript( aTmpWord, 0, nCurrScript );
+ const sal_Int32 nEnd = Min( aBound.endPos, nScriptEnd );
+ nBegin = (xub_StrLen)aBound.startPos;
+ nLen = (xub_StrLen)(nEnd - nBegin);
}
-
- nBegin = (xub_StrLen)Max( aBound.startPos, nScriptBegin );
- nLen = (xub_StrLen)(nEnd - nBegin);
- }
- else
- {
- const USHORT nCurrScript =
- pBreakIt->GetBreakIter()->getScriptType( rText, aBound.startPos );
- XubString aTmpWord = rText.Copy( static_cast<xub_StrLen>(aBound.startPos),
- static_cast<xub_StrLen>(aBound.endPos - aBound.startPos) );
- const sal_Int32 nScriptEnd = aBound.startPos +
- pBreakIt->GetBreakIter()->endOfScript( aTmpWord, 0, nCurrScript );
- const sal_Int32 nEnd = Min( aBound.endPos, nScriptEnd );
- nBegin = (xub_StrLen)aBound.startPos;
- nLen = (xub_StrLen)(nEnd - nBegin);
}
// optionally clip the result of getWordBoundaries:
@@ -789,14 +798,14 @@ BOOL SwScanner::NextWord()
}
if( ! nLen )
- return FALSE;
+ return sal_False;
aWord = rText.Copy( nBegin, nLen );
- return TRUE;
+ return sal_True;
}
-USHORT SwTxtNode::Spell(SwSpellArgs* pArgs)
+sal_uInt16 SwTxtNode::Spell(SwSpellArgs* pArgs)
{
// Die Aehnlichkeiten zu SwTxtFrm::_AutoSpell sind beabsichtigt ...
// ACHTUNG: Ev. Bugs in beiden Routinen fixen!
@@ -924,8 +933,8 @@ USHORT SwTxtNode::Spell(SwSpellArgs* pArgs)
}
void SwTxtNode::SetLanguageAndFont( const SwPaM &rPaM,
- LanguageType nLang, USHORT nLangWhichId,
- const Font *pFont, USHORT nFontWhichId )
+ LanguageType nLang, sal_uInt16 nLangWhichId,
+ const Font *pFont, sal_uInt16 nFontWhichId )
{
sal_uInt16 aRanges[] = {
nLangWhichId, nLangWhichId,
@@ -958,7 +967,7 @@ void SwTxtNode::SetLanguageAndFont( const SwPaM &rPaM,
}
-USHORT SwTxtNode::Convert( SwConversionArgs &rArgs )
+sal_uInt16 SwTxtNode::Convert( SwConversionArgs &rArgs )
{
// get range of text within node to be converted
// (either all the text or the the text within the selection
@@ -1089,7 +1098,7 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, const SwViewOption& rV
{
SwRect aRect;
#if OSL_DEBUG_LEVEL > 1
- static BOOL bStop = FALSE;
+ static sal_Bool bStop = sal_False;
if ( bStop )
return aRect;
#endif
@@ -1144,7 +1153,7 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, const SwViewOption& rV
Boundary aBound =
pBreakIt->GetBreakIter()->getWordBoundary( pNode->GetTxt(), nBegin,
pBreakIt->GetLocale( eActLang ),
- WordType::DICTIONARY_WORD, TRUE );
+ WordType::DICTIONARY_WORD, sal_True );
nBegin = xub_StrLen(aBound.startPos);
}
@@ -1158,7 +1167,7 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, const SwViewOption& rV
nInsertPos++;
}
- BOOL bFresh = nBegin < nEnd;
+ sal_Bool bFresh = nBegin < nEnd;
if( nBegin < nEnd )
{
@@ -1184,8 +1193,8 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, const SwViewOption& rV
// within the word
LanguageType eActLang = aScanner.GetCurrentLanguage();
- BOOL bSpell = TRUE;
- bSpell = xSpell.is() ? xSpell->hasLanguage( eActLang ) : FALSE;
+ sal_Bool bSpell = sal_True;
+ bSpell = xSpell.is() ? xSpell->hasLanguage( eActLang ) : sal_False;
if( bSpell && rWord.Len() > 0 )
{
// check for: bAlter => xHyphWord.is()
@@ -1304,16 +1313,16 @@ SwRect SwTxtFrm::SmartTagScan( SwCntntNode* /*pActNode*/, xub_StrLen /*nActPos*/
}
}
- const USHORT nNumberOfEntries = pSmartTagList ? pSmartTagList->Count() : 0;
- USHORT nNumberOfRemovedEntries = 0;
- USHORT nNumberOfInsertedEntries = 0;
+ const sal_uInt16 nNumberOfEntries = pSmartTagList ? pSmartTagList->Count() : 0;
+ sal_uInt16 nNumberOfRemovedEntries = 0;
+ sal_uInt16 nNumberOfInsertedEntries = 0;
// clear smart tag list between nBegin and nEnd:
if ( 0 != nNumberOfEntries )
{
xub_StrLen nChgStart = STRING_LEN;
xub_StrLen nChgEnd = 0;
- const USHORT nCurrentIndex = pSmartTagList->GetWrongPos( nBegin );
+ const sal_uInt16 nCurrentIndex = pSmartTagList->GetWrongPos( nBegin );
pSmartTagList->Fresh( nChgStart, nChgEnd, nBegin, nEnd - nBegin, nCurrentIndex, STRING_LEN );
nNumberOfRemovedEntries = nNumberOfEntries - pSmartTagList->Count();
}
@@ -1354,7 +1363,7 @@ SwRect SwTxtFrm::SmartTagScan( SwCntntNode* /*pActNode*/, xub_StrLen /*nActPos*/
pSmartTagList = pNode->GetSmartTags();
- const USHORT nNumberOfEntriesAfterRecognize = pSmartTagList ? pSmartTagList->Count() : 0;
+ const sal_uInt16 nNumberOfEntriesAfterRecognize = pSmartTagList ? pSmartTagList->Count() : 0;
nNumberOfInsertedEntries = nNumberOfEntriesAfterRecognize - ( nNumberOfEntries - nNumberOfRemovedEntries );
}
@@ -1373,7 +1382,7 @@ SwRect SwTxtFrm::SmartTagScan( SwCntntNode* /*pActNode*/, xub_StrLen /*nActPos*/
// Calculate repaint area:
//
#if OSL_DEBUG_LEVEL > 1
- const USHORT nNumberOfEntriesAfterRecognize2 = pSmartTagList->Count();
+ const sal_uInt16 nNumberOfEntriesAfterRecognize2 = pSmartTagList->Count();
(void) nNumberOfEntriesAfterRecognize2;
#endif
if ( nBegin < nEnd && ( 0 != nNumberOfRemovedEntries ||
@@ -1401,11 +1410,11 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, xub_StrLen nActPos )
xub_StrLen nBegin = 0;
xub_StrLen nEnd = pNode->GetTxt().Len();
xub_StrLen nLen;
- BOOL bACWDirty = FALSE, bAnyWrd = FALSE;
+ sal_Bool bACWDirty = sal_False, bAnyWrd = sal_False;
if( nBegin < nEnd )
{
- USHORT nCnt = 200;
+ sal_uInt16 nCnt = 200;
SwScanner aScanner( *pNode, pNode->GetTxt(), 0, 0,
WordType::DICTIONARY_WORD, nBegin, nEnd );
while( aScanner.NextWord() )
@@ -1420,10 +1429,10 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, xub_StrLen nActPos )
{
if( rACW.GetMinWordLen() <= rWord.Len() )
rACW.InsertWord( rWord, *pDoc );
- bAnyWrd = TRUE;
+ bAnyWrd = sal_True;
}
else
- bACWDirty = TRUE;
+ bACWDirty = sal_True;
}
if( !--nCnt )
{
@@ -1435,7 +1444,7 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, xub_StrLen nActPos )
}
if( bAnyWrd && !bACWDirty )
- pNode->SetAutoCompleteWordDirty( FALSE );
+ pNode->SetAutoCompleteWordDirty( sal_False );
}
/*************************************************************************
@@ -1443,15 +1452,15 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, xub_StrLen nActPos )
*************************************************************************/
// Findet den TxtFrm und sucht dessen CalcHyph
-BOOL SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
+sal_Bool SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
{
// Abkuerzung: am Absatz ist keine Sprache eingestellt:
- if ( LANGUAGE_NONE == USHORT( GetSwAttrSet().GetLanguage().GetLanguage() )
+ if ( LANGUAGE_NONE == sal_uInt16( GetSwAttrSet().GetLanguage().GetLanguage() )
&& USHRT_MAX == GetLang( 0, m_Text.Len() ) )
{
if( !rHyphInf.IsCheck() )
- rHyphInf.SetNoLang( TRUE );
- return FALSE;
+ rHyphInf.SetNoLang( sal_True );
+ return sal_False;
}
if( pLinguNode != this )
@@ -1470,7 +1479,7 @@ BOOL SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE( pFrm, "!SwTxtNode::Hyphenate: can't find any frame" );
#endif
- return FALSE;
+ return sal_False;
}
while( pFrm )
@@ -1481,7 +1490,7 @@ BOOL SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
// (7821, 7662, 7408); vgl. layact.cxx,
// SwLayAction::_TurboAction(), if( !pCnt->IsValid() ...
pFrm->SetCompletePaint();
- return TRUE;
+ return sal_True;
}
pFrm = (SwTxtFrm*)(pFrm->GetFollow());
if( pFrm )
@@ -1490,7 +1499,7 @@ BOOL SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
rHyphInf.nStart = pFrm->GetOfst();
}
}
- return FALSE;
+ return sal_False;
}
struct TransliterationChgData
@@ -1535,12 +1544,12 @@ void SwTxtNode::TransliterateText(
GetTxt(), nStt,
pBreakIt->GetLocale( GetLang( nStt ) ),
nWordType,
- TRUE /*prefer forward direction*/);
+ sal_True /*prefer forward direction*/);
aEndBndry = pBreakIt->GetBreakIter()->getWordBoundary(
GetTxt(), nEnd,
pBreakIt->GetLocale( GetLang( nEnd ) ),
nWordType,
- FALSE /*prefer backward direction*/);
+ sal_False /*prefer backward direction*/);
// prevent backtracking to the previous word if selection is at word boundary
if (aSttBndry.endPos <= nStt)
@@ -1756,7 +1765,7 @@ void SwTxtNode::ReplaceTextOnly( xub_StrLen nPos, xub_StrLen nLen,
while( nI + nCnt < nTLen && nOff == pOffsets[ nI + nCnt ] )
++nCnt;
- Update( SwIndex( this, nMyOff ), nCnt, FALSE );
+ Update( SwIndex( this, nMyOff ), nCnt, sal_False );
nMyOff = nOff;
//nMyOff -= nCnt;
nI += nCnt - 1;
@@ -1764,13 +1773,13 @@ void SwTxtNode::ReplaceTextOnly( xub_StrLen nPos, xub_StrLen nLen,
else if( nOff > nMyOff )
{
// something is deleted
- Update( SwIndex( this, nMyOff+1 ), nOff - nMyOff, TRUE );
+ Update( SwIndex( this, nMyOff+1 ), nOff - nMyOff, sal_True );
nMyOff = nOff;
}
}
if( nMyOff < nLen )
// something is deleted at the end
- Update( SwIndex( this, nMyOff ), nLen - nMyOff, TRUE );
+ Update( SwIndex( this, nMyOff ), nLen - nMyOff, sal_True );
// notify the layout!
SwDelTxt aDelHint( nPos, nTLen );
@@ -1809,7 +1818,7 @@ void SwTxtNode::CountWords( SwDocStat& rStat,
// mask out the redlined and hidden text with ' '
const xub_Unicode cChar(' ');
- const USHORT nNumOfMaskedChars = lcl_MaskRedlinesAndHiddenText( *this, rTextCopy, nStt, nEnd, cChar, false );
+ const sal_uInt16 nNumOfMaskedChars = lcl_MaskRedlinesAndHiddenText( *this, rTextCopy, nStt, nEnd, cChar, false );
// expand text into pConversionMap for scanner
rtl::OUString aExpandText;
@@ -1916,9 +1925,9 @@ struct SwParaIdleData_Impl
SwWrongList* pWrong; // for spell checking
SwGrammarMarkUp* pGrammarCheck; // for grammar checking / proof reading
SwWrongList* pSmartTags;
- ULONG nNumberOfWords;
- ULONG nNumberOfChars;
- ULONG nNumberOfCharsExcludingSpaces;
+ sal_uLong nNumberOfWords;
+ sal_uLong nNumberOfChars;
+ sal_uLong nNumberOfCharsExcludingSpaces;
bool bWordCountDirty;
bool bWrongDirty; // Ist das Wrong-Feld auf invalid?
bool bGrammarCheckDirty;
@@ -2016,25 +2025,25 @@ SwWrongList* SwTxtNode::GetSmartTags()
return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->pSmartTags : 0;
}
-void SwTxtNode::SetParaNumberOfWords( ULONG nNew ) const
+void SwTxtNode::SetParaNumberOfWords( sal_uLong nNew ) const
{
if ( m_pParaIdleData_Impl )
{
m_pParaIdleData_Impl->nNumberOfWords = nNew;
}
}
-ULONG SwTxtNode::GetParaNumberOfWords() const
+sal_uLong SwTxtNode::GetParaNumberOfWords() const
{
return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->nNumberOfWords : 0;
}
-void SwTxtNode::SetParaNumberOfChars( ULONG nNew ) const
+void SwTxtNode::SetParaNumberOfChars( sal_uLong nNew ) const
{
if ( m_pParaIdleData_Impl )
{
m_pParaIdleData_Impl->nNumberOfChars = nNew;
}
}
-ULONG SwTxtNode::GetParaNumberOfChars() const
+sal_uLong SwTxtNode::GetParaNumberOfChars() const
{
return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->nNumberOfChars : 0;
}
@@ -2046,12 +2055,12 @@ void SwTxtNode::SetWordCountDirty( bool bNew ) const
}
}
-ULONG SwTxtNode::GetParaNumberOfCharsExcludingSpaces() const
+sal_uLong SwTxtNode::GetParaNumberOfCharsExcludingSpaces() const
{
return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->nNumberOfCharsExcludingSpaces : 0;
}
-void SwTxtNode::SetParaNumberOfCharsExcludingSpaces( ULONG nNew ) const
+void SwTxtNode::SetParaNumberOfCharsExcludingSpaces( sal_uLong nNew ) const
{
if ( m_pParaIdleData_Impl )
{
diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx
index 24607494d7de..b89f38dc23c4 100644
--- a/sw/source/core/undo/SwUndoField.cxx
+++ b/sw/source/core/undo/SwUndoField.cxx
@@ -28,10 +28,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <tools/rtti.hxx>
+
#include <SwUndoField.hxx>
#include <swundo.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <txtfld.hxx>
#include <fldbas.hxx>
#include <ndtxt.hxx>
@@ -66,7 +69,7 @@ SwPosition SwUndoField::GetPosition()
SwUndoFieldFromDoc::SwUndoFieldFromDoc(const SwPosition & rPos,
const SwField & rOldField,
const SwField & rNewField,
- SwMsgPoolItem * _pHnt, BOOL _bUpdate, SwUndoId _nId)
+ SwMsgPoolItem * _pHnt, sal_Bool _bUpdate, SwUndoId _nId)
: SwUndoField(rPos,_nId)
, pOldField(rOldField.CopyField())
, pNewField(rNewField.CopyField())
@@ -84,7 +87,7 @@ SwUndoFieldFromDoc::~SwUndoFieldFromDoc()
delete pNewField;
}
-void SwUndoFieldFromDoc::Undo( SwUndoIter& )
+void SwUndoFieldFromDoc::UndoImpl(::sw::UndoRedoContext &)
{
SwTxtFld * pTxtFld = SwDoc::GetTxtFld(GetPosition());
@@ -92,41 +95,39 @@ void SwUndoFieldFromDoc::Undo( SwUndoIter& )
if (pField)
{
- BOOL bUndo = pDoc->DoesUndo();
-
- pDoc->DoUndo(FALSE);
pDoc->UpdateFld(pTxtFld, *pOldField, pHnt, bUpdate);
- pDoc->DoUndo(bUndo);
}
}
-void SwUndoFieldFromDoc::Redo( SwUndoIter& )
+void SwUndoFieldFromDoc::DoImpl()
{
SwTxtFld * pTxtFld = SwDoc::GetTxtFld(GetPosition());
const SwField * pField = pTxtFld ? pTxtFld->GetFld().GetFld() : NULL;
if (pField)
{
- BOOL bUndo = pDoc->DoesUndo();
-
- pDoc->DoUndo(FALSE);
pDoc->UpdateFld(pTxtFld, *pNewField, pHnt, bUpdate);
SwFmtFld* pDstFmtFld = (SwFmtFld*)&pTxtFld->GetFld();
if ( pDoc->GetFldType(RES_POSTITFLD, aEmptyStr,false) == pDstFmtFld->GetFld()->GetTyp() )
pDoc->GetDocShell()->Broadcast( SwFmtFldHint( pDstFmtFld, SWFMTFLD_INSERTED ) );
- pDoc->DoUndo(bUndo);
}
}
-void SwUndoFieldFromDoc::Repeat(SwUndoIter & rIt)
+void SwUndoFieldFromDoc::RedoImpl(::sw::UndoRedoContext &)
{
- Redo(rIt);
+ DoImpl();
+}
+
+void SwUndoFieldFromDoc::RepeatImpl(::sw::RepeatContext &)
+{
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
+ DoImpl();
}
SwUndoFieldFromAPI::SwUndoFieldFromAPI(const SwPosition & rPos,
const Any & rOldVal, const Any & rNewVal,
- USHORT _nWhich)
+ sal_uInt16 _nWhich)
: SwUndoField(rPos), aOldVal(rOldVal), aNewVal(rNewVal), nWhich(_nWhich)
{
}
@@ -135,7 +136,7 @@ SwUndoFieldFromAPI::~SwUndoFieldFromAPI()
{
}
-void SwUndoFieldFromAPI::Undo( SwUndoIter& )
+void SwUndoFieldFromAPI::UndoImpl(::sw::UndoRedoContext &)
{
SwField * pField = SwDoc::GetField(GetPosition());
@@ -143,7 +144,7 @@ void SwUndoFieldFromAPI::Undo( SwUndoIter& )
pField->PutValue(aOldVal, nWhich);
}
-void SwUndoFieldFromAPI::Redo( SwUndoIter& )
+void SwUndoFieldFromAPI::DoImpl()
{
SwField * pField = SwDoc::GetField(GetPosition());
@@ -151,10 +152,14 @@ void SwUndoFieldFromAPI::Redo( SwUndoIter& )
pField->PutValue(aNewVal, nWhich);
}
+void SwUndoFieldFromAPI::RedoImpl(::sw::UndoRedoContext &)
+{
+ DoImpl();
+}
-void SwUndoFieldFromAPI::Repeat(SwUndoIter & rIter)
+void SwUndoFieldFromAPI::RepeatImpl(::sw::RepeatContext &)
{
- Redo(rIter);
+ DoImpl();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/SwUndoFmt.cxx b/sw/source/core/undo/SwUndoFmt.cxx
index f054abe32e71..a63b09519bc3 100644
--- a/sw/source/core/undo/SwUndoFmt.cxx
+++ b/sw/source/core/undo/SwUndoFmt.cxx
@@ -30,6 +30,8 @@
#include "precompiled_sw.hxx"
#include <tools/resid.hxx>
+#include <tools/string.hxx>
+
#include <poolfmt.hxx>
#include <charfmt.hxx>
#include <frmfmt.hxx>
@@ -38,14 +40,14 @@
#include <swundo.hxx>
#include <undobj.hxx>
#include <fmtcol.hxx>
-#include <tools/string.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <comcore.hrc>
SwUndoFmtCreate::SwUndoFmtCreate
(SwUndoId nUndoId, SwFmt * _pNew, SwFmt * _pDerivedFrom, SwDoc * _pDoc)
: SwUndo(nUndoId), pNew(_pNew),
- pDoc(_pDoc), pNewSet(NULL), nId(0), bAuto(FALSE)
+ pDoc(_pDoc), pNewSet(NULL), nId(0), bAuto(sal_False)
{
if (_pDerivedFrom)
sDerivedFrom = _pDerivedFrom->GetName();
@@ -55,7 +57,7 @@ SwUndoFmtCreate::~SwUndoFmtCreate()
{
}
-void SwUndoFmtCreate::Undo(SwUndoIter &)
+void SwUndoFmtCreate::UndoImpl(::sw::UndoRedoContext &)
{
if (pNew)
{
@@ -71,20 +73,13 @@ void SwUndoFmtCreate::Undo(SwUndoIter &)
nId = pNew->GetPoolFmtId() & COLL_GET_RANGE_BITS;
bAuto = pNew->IsAuto();
- BOOL bDoesUndo = pDoc->DoesUndo();
-
- pDoc->DoUndo(FALSE);
Delete();
- pDoc->DoUndo(bDoesUndo);
}
}
}
-void SwUndoFmtCreate::Redo(SwUndoIter &)
+void SwUndoFmtCreate::RedoImpl(::sw::UndoRedoContext &)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
-
- pDoc->DoUndo(FALSE);
SwFmt * pDerivedFrom = Find(sDerivedFrom);
SwFmt * pFmt = Create(pDerivedFrom);
@@ -100,8 +95,6 @@ void SwUndoFmtCreate::Redo(SwUndoIter &)
}
else
pNew = NULL;
-
- pDoc->DoUndo(bDoesUndo);
}
SwRewriter SwUndoFmtCreate::GetRewriter() const
@@ -131,12 +124,8 @@ SwUndoFmtDelete::~SwUndoFmtDelete()
{
}
-void SwUndoFmtDelete::Undo(SwUndoIter &)
+void SwUndoFmtDelete::UndoImpl(::sw::UndoRedoContext &)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
-
- pDoc->DoUndo(FALSE);
-
SwFmt * pDerivedFrom = Find(sDerivedFrom);
SwFmt * pFmt = Create(pDerivedFrom);
@@ -148,23 +137,16 @@ void SwUndoFmtDelete::Undo(SwUndoIter &)
pFmt->SetPoolFmtId((pFmt->GetPoolFmtId() &
~COLL_GET_RANGE_BITS)
| nId);
-
}
-
- pDoc->DoUndo(bDoesUndo);
}
-void SwUndoFmtDelete::Redo(SwUndoIter &)
+void SwUndoFmtDelete::RedoImpl(::sw::UndoRedoContext &)
{
SwFmt * pOld = Find(sOldName);
if (pOld)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
-
- pDoc->DoUndo(FALSE);
Delete(pOld);
- pDoc->DoUndo(bDoesUndo);
}
}
@@ -191,31 +173,23 @@ SwUndoRenameFmt::~SwUndoRenameFmt()
{
}
-void SwUndoRenameFmt::Undo(SwUndoIter &)
+void SwUndoRenameFmt::UndoImpl(::sw::UndoRedoContext &)
{
SwFmt * pFmt = Find(sNewName);
if (pFmt)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
-
- pDoc->DoUndo(FALSE);
- pDoc->RenameFmt(*pFmt, sOldName, TRUE);
- pDoc->DoUndo(bDoesUndo);
+ pDoc->RenameFmt(*pFmt, sOldName, sal_True);
}
}
-void SwUndoRenameFmt::Redo(SwUndoIter &)
+void SwUndoRenameFmt::RedoImpl(::sw::UndoRedoContext &)
{
SwFmt * pFmt = Find(sOldName);
if (pFmt)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
-
- pDoc->DoUndo(FALSE);
- pDoc->RenameFmt(*pFmt, sNewName, TRUE);
- pDoc->DoUndo(bDoesUndo);
+ pDoc->RenameFmt(*pFmt, sNewName, sal_True);
}
}
@@ -238,12 +212,12 @@ SwUndoTxtFmtCollCreate::SwUndoTxtFmtCollCreate
SwFmt * SwUndoTxtFmtCollCreate::Create(SwFmt * pDerivedFrom)
{
- return pDoc->MakeTxtFmtColl(sNewName, (SwTxtFmtColl *)pDerivedFrom, TRUE);
+ return pDoc->MakeTxtFmtColl(sNewName, (SwTxtFmtColl *)pDerivedFrom, sal_True);
}
void SwUndoTxtFmtCollCreate::Delete()
{
- pDoc->DelTxtFmtColl((SwTxtFmtColl *) pNew, TRUE);
+ pDoc->DelTxtFmtColl((SwTxtFmtColl *) pNew, sal_True);
}
SwFmt * SwUndoTxtFmtCollCreate::Find(const String & rName) const
@@ -259,12 +233,12 @@ SwUndoTxtFmtCollDelete::SwUndoTxtFmtCollDelete(SwTxtFmtColl * _pOld,
SwFmt * SwUndoTxtFmtCollDelete::Create(SwFmt * pDerivedFrom)
{
- return pDoc->MakeTxtFmtColl(sOldName, (SwTxtFmtColl *) pDerivedFrom, TRUE);
+ return pDoc->MakeTxtFmtColl(sOldName, (SwTxtFmtColl *) pDerivedFrom, sal_True);
}
void SwUndoTxtFmtCollDelete::Delete(SwFmt * pOld)
{
- pDoc->DelTxtFmtColl((SwTxtFmtColl *) pOld, TRUE);
+ pDoc->DelTxtFmtColl((SwTxtFmtColl *) pOld, sal_True);
}
SwFmt * SwUndoTxtFmtCollDelete::Find(const String & rName) const
@@ -293,12 +267,12 @@ SwUndoCharFmtCreate::SwUndoCharFmtCreate(SwCharFmt * pNewFmt,
SwFmt * SwUndoCharFmtCreate::Create(SwFmt * pDerivedFrom)
{
- return pDoc->MakeCharFmt(sNewName, (SwCharFmt *) pDerivedFrom, TRUE);
+ return pDoc->MakeCharFmt(sNewName, (SwCharFmt *) pDerivedFrom, sal_True);
}
void SwUndoCharFmtCreate::Delete()
{
- pDoc->DelCharFmt((SwCharFmt *) pNew, TRUE);
+ pDoc->DelCharFmt((SwCharFmt *) pNew, sal_True);
}
SwFmt * SwUndoCharFmtCreate::Find(const String & rName) const
@@ -313,12 +287,12 @@ SwUndoCharFmtDelete::SwUndoCharFmtDelete(SwCharFmt * pOld, SwDoc * pDocument)
SwFmt * SwUndoCharFmtDelete::Create(SwFmt * pDerivedFrom)
{
- return pDoc->MakeCharFmt(sOldName, (SwCharFmt *) pDerivedFrom, TRUE);
+ return pDoc->MakeCharFmt(sOldName, (SwCharFmt *) pDerivedFrom, sal_True);
}
void SwUndoCharFmtDelete::Delete(SwFmt * pFmt)
{
- pDoc->DelCharFmt((SwCharFmt *) pFmt, TRUE);
+ pDoc->DelCharFmt((SwCharFmt *) pFmt, sal_True);
}
SwFmt * SwUndoCharFmtDelete::Find(const String & rName) const
@@ -348,12 +322,12 @@ SwUndoFrmFmtCreate::SwUndoFrmFmtCreate(SwFrmFmt * pNewFmt,
SwFmt * SwUndoFrmFmtCreate::Create(SwFmt * pDerivedFrom)
{
- return pDoc->MakeFrmFmt(sNewName, (SwFrmFmt *) pDerivedFrom, TRUE, bAuto);
+ return pDoc->MakeFrmFmt(sNewName, (SwFrmFmt *) pDerivedFrom, sal_True, bAuto);
}
void SwUndoFrmFmtCreate::Delete()
{
- pDoc->DelFrmFmt((SwFrmFmt *) pNew, TRUE);
+ pDoc->DelFrmFmt((SwFrmFmt *) pNew, sal_True);
}
SwFmt * SwUndoFrmFmtCreate::Find(const String & rName) const
@@ -368,12 +342,12 @@ SwUndoFrmFmtDelete::SwUndoFrmFmtDelete(SwFrmFmt * pOld, SwDoc * pDocument)
SwFmt * SwUndoFrmFmtDelete::Create(SwFmt * pDerivedFrom)
{
- return pDoc->MakeFrmFmt(sOldName, (SwFrmFmt *) pDerivedFrom, TRUE);
+ return pDoc->MakeFrmFmt(sOldName, (SwFrmFmt *) pDerivedFrom, sal_True);
}
void SwUndoFrmFmtDelete::Delete(SwFmt * pFmt)
{
- pDoc->DelFrmFmt((SwFrmFmt *) pFmt, TRUE);
+ pDoc->DelFrmFmt((SwFrmFmt *) pFmt, sal_True);
}
SwFmt * SwUndoFrmFmtDelete::Find(const String & rName) const
@@ -400,29 +374,20 @@ SwUndoNumruleCreate::SwUndoNumruleCreate(const SwNumRule * _pNew,
{
}
-void SwUndoNumruleCreate::Undo(SwUndoIter &)
+void SwUndoNumruleCreate::UndoImpl(::sw::UndoRedoContext &)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
-
- pDoc->DoUndo(FALSE);
-
if (! bInitialized)
{
aNew = *pNew;
bInitialized = true;
}
- pDoc->DelNumRule(aNew.GetName(), TRUE);
- pDoc->DoUndo(bDoesUndo);
+ pDoc->DelNumRule(aNew.GetName(), sal_True);
}
-void SwUndoNumruleCreate::Redo(SwUndoIter &)
+void SwUndoNumruleCreate::RedoImpl(::sw::UndoRedoContext &)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
-
- pDoc->DoUndo(FALSE);
- pDoc->MakeNumRule(aNew.GetName(), &aNew, TRUE);
- pDoc->DoUndo(bDoesUndo);
+ pDoc->MakeNumRule(aNew.GetName(), &aNew, sal_True);
}
SwRewriter SwUndoNumruleCreate::GetRewriter() const
@@ -446,22 +411,14 @@ SwUndoNumruleDelete::SwUndoNumruleDelete(const SwNumRule & rRule,
{
}
-void SwUndoNumruleDelete::Undo(SwUndoIter &)
+void SwUndoNumruleDelete::UndoImpl(::sw::UndoRedoContext &)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
-
- pDoc->DoUndo(FALSE);
- pDoc->MakeNumRule(aOld.GetName(), &aOld, TRUE);
- pDoc->DoUndo(bDoesUndo);
+ pDoc->MakeNumRule(aOld.GetName(), &aOld, sal_True);
}
-void SwUndoNumruleDelete::Redo(SwUndoIter &)
+void SwUndoNumruleDelete::RedoImpl(::sw::UndoRedoContext &)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
-
- pDoc->DoUndo(FALSE);
- pDoc->DelNumRule(aOld.GetName(), TRUE);
- pDoc->DoUndo(bDoesUndo);
+ pDoc->DelNumRule(aOld.GetName(), sal_True);
}
SwRewriter SwUndoNumruleDelete::GetRewriter() const
@@ -481,22 +438,14 @@ SwUndoNumruleRename::SwUndoNumruleRename(const String & _aOldName,
{
}
-void SwUndoNumruleRename::Undo(SwUndoIter &)
+void SwUndoNumruleRename::UndoImpl(::sw::UndoRedoContext &)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
-
- pDoc->DoUndo(FALSE);
- pDoc->RenameNumRule(aNewName, aOldName, TRUE);
- pDoc->DoUndo(bDoesUndo);
+ pDoc->RenameNumRule(aNewName, aOldName, sal_True);
}
-void SwUndoNumruleRename::Redo(SwUndoIter &)
+void SwUndoNumruleRename::RedoImpl(::sw::UndoRedoContext &)
{
- BOOL bDoesUndo = pDoc->DoesUndo();
-
- pDoc->DoUndo(FALSE);
- pDoc->RenameNumRule(aOldName, aNewName, TRUE);
- pDoc->DoUndo(bDoesUndo);
+ pDoc->RenameNumRule(aOldName, aNewName, sal_True);
}
SwRewriter SwUndoNumruleRename::GetRewriter() const
diff --git a/sw/source/core/undo/SwUndoPageDesc.cxx b/sw/source/core/undo/SwUndoPageDesc.cxx
index 851e0f7aac9e..49bcb0d4175e 100644
--- a/sw/source/core/undo/SwUndoPageDesc.cxx
+++ b/sw/source/core/undo/SwUndoPageDesc.cxx
@@ -31,6 +31,7 @@
#include <tools/resid.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <swundo.hxx>
#include <pagedesc.hxx>
#include <SwUndoPageDesc.hxx>
@@ -49,10 +50,10 @@
// Pure debug help function to have a quick look at the header/footer attributes.
void DebugHeaderFooterContent( const SwPageDesc& rPageDesc )
{
- ULONG nHeaderMaster = ULONG_MAX;
- ULONG nHeaderLeft = ULONG_MAX;
- ULONG nFooterMaster = ULONG_MAX;
- ULONG nFooterLeft = ULONG_MAX;
+ sal_uLong nHeaderMaster = ULONG_MAX;
+ sal_uLong nHeaderLeft = ULONG_MAX;
+ sal_uLong nFooterMaster = ULONG_MAX;
+ sal_uLong nFooterLeft = ULONG_MAX;
SwFmtHeader& rHead = (SwFmtHeader&)rPageDesc.GetMaster().GetHeader();
SwFmtFooter& rFoot = (SwFmtFooter&)rPageDesc.GetMaster().GetFooter();
@@ -240,7 +241,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
// Let the destination page descrition point to the source node position,
// from now on this descriptor is responsible for the content nodes!
const SfxPoolItem* pItem;
- rDest.GetMaster().GetAttrSet().GetItemState( RES_HEADER, FALSE, &pItem );
+ rDest.GetMaster().GetAttrSet().GetItemState( RES_HEADER, sal_False, &pItem );
SfxPoolItem *pNewItem = pItem->Clone();
SwFrmFmt* pNewFmt = ((SwFmtHeader*)pNewItem)->GetHeaderFmt();
#ifdef DEBUG
@@ -254,7 +255,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
// Let the source page description point to zero node position,
// it loses the responsible and can be destroyed without removing the content nodes.
- rSource.GetMaster().GetAttrSet().GetItemState( RES_HEADER, FALSE, &pItem );
+ rSource.GetMaster().GetAttrSet().GetItemState( RES_HEADER, sal_False, &pItem );
pNewItem = pItem->Clone();
pNewFmt = ((SwFmtHeader*)pNewItem)->GetHeaderFmt();
pNewFmt->SetFmtAttr( SwFmtCntnt() );
@@ -264,7 +265,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
{
// Same procedure for unshared header..
const SwFmtHeader& rSourceLeftHead = rSource.GetLeft().GetHeader();
- rDest.GetLeft().GetAttrSet().GetItemState( RES_HEADER, FALSE, &pItem );
+ rDest.GetLeft().GetAttrSet().GetItemState( RES_HEADER, sal_False, &pItem );
pNewItem = pItem->Clone();
pNewFmt = ((SwFmtHeader*)pNewItem)->GetHeaderFmt();
#ifdef DEBUG
@@ -275,7 +276,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
#endif
pNewFmt->SetFmtAttr( rSourceLeftHead.GetHeaderFmt()->GetCntnt() );
delete pNewItem;
- rSource.GetLeft().GetAttrSet().GetItemState( RES_HEADER, FALSE, &pItem );
+ rSource.GetLeft().GetAttrSet().GetItemState( RES_HEADER, sal_False, &pItem );
pNewItem = pItem->Clone();
pNewFmt = ((SwFmtHeader*)pNewItem)->GetHeaderFmt();
pNewFmt->SetFmtAttr( SwFmtCntnt() );
@@ -288,7 +289,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
if( rDestFoot.IsActive() )
{
const SfxPoolItem* pItem;
- rDest.GetMaster().GetAttrSet().GetItemState( RES_FOOTER, FALSE, &pItem );
+ rDest.GetMaster().GetAttrSet().GetItemState( RES_FOOTER, sal_False, &pItem );
SfxPoolItem *pNewItem = pItem->Clone();
SwFrmFmt *pNewFmt = ((SwFmtFooter*)pNewItem)->GetFooterFmt();
pNewFmt->SetFmtAttr( rSourceFoot.GetFooterFmt()->GetCntnt() );
@@ -300,7 +301,7 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
const SwFmtCntnt& rFooterDestCntnt = rDestFoot.GetFooterFmt()->GetCntnt();
(void)rFooterDestCntnt;
#endif
- rSource.GetMaster().GetAttrSet().GetItemState( RES_FOOTER, FALSE, &pItem );
+ rSource.GetMaster().GetAttrSet().GetItemState( RES_FOOTER, sal_False, &pItem );
pNewItem = pItem->Clone();
pNewFmt = ((SwFmtFooter*)pNewItem)->GetFooterFmt();
pNewFmt->SetFmtAttr( SwFmtCntnt() );
@@ -316,12 +317,12 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
(void)rFooterSourceCntnt2;
(void)rFooterDestCntnt2;
#endif
- rDest.GetLeft().GetAttrSet().GetItemState( RES_FOOTER, FALSE, &pItem );
+ rDest.GetLeft().GetAttrSet().GetItemState( RES_FOOTER, sal_False, &pItem );
pNewItem = pItem->Clone();
pNewFmt = ((SwFmtFooter*)pNewItem)->GetFooterFmt();
pNewFmt->SetFmtAttr( rSourceLeftFoot.GetFooterFmt()->GetCntnt() );
delete pNewItem;
- rSource.GetLeft().GetAttrSet().GetItemState( RES_FOOTER, FALSE, &pItem );
+ rSource.GetLeft().GetAttrSet().GetItemState( RES_FOOTER, sal_False, &pItem );
pNewItem = pItem->Clone();
pNewFmt = ((SwFmtFooter*)pNewItem)->GetFooterFmt();
pNewFmt->SetFmtAttr( SwFmtCntnt() );
@@ -330,34 +331,20 @@ void SwUndoPageDesc::ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDes
}
}
-void SwUndoPageDesc::Undo(SwUndoIter &)
+void SwUndoPageDesc::UndoImpl(::sw::UndoRedoContext &)
{
- BOOL bUndo = pDoc->DoesUndo();
-
- pDoc->DoUndo(FALSE);
-
// Move (header/footer)content node responsibility from new page descriptor to old one again.
if( bExchange )
ExchangeContentNodes( (SwPageDesc&)aNew, (SwPageDesc&)aOld );
pDoc->ChgPageDesc(aOld.GetName(), aOld);
- pDoc->DoUndo(bUndo);
}
-void SwUndoPageDesc::Redo(SwUndoIter &)
+void SwUndoPageDesc::RedoImpl(::sw::UndoRedoContext &)
{
- BOOL bUndo = pDoc->DoesUndo();
-
- pDoc->DoUndo(FALSE);
-
// Move (header/footer)content node responsibility from old page descriptor to new one again.
if( bExchange )
ExchangeContentNodes( (SwPageDesc&)aOld, (SwPageDesc&)aNew );
pDoc->ChgPageDesc(aNew.GetName(), aNew);
- pDoc->DoUndo(bUndo);
-}
-
-void SwUndoPageDesc::Repeat(SwUndoIter &)
-{
}
SwRewriter SwUndoPageDesc::GetRewriter() const
@@ -384,12 +371,8 @@ SwUndoPageDescCreate::~SwUndoPageDescCreate()
{
}
-void SwUndoPageDescCreate::Undo(SwUndoIter &)
+void SwUndoPageDescCreate::UndoImpl(::sw::UndoRedoContext &)
{
- BOOL bUndo = pDoc->DoesUndo();
-
- pDoc->DoUndo(FALSE);
-
// -> #116530#
if (pDesc)
{
@@ -398,26 +381,24 @@ void SwUndoPageDescCreate::Undo(SwUndoIter &)
}
// <- #116530#
- pDoc->DelPageDesc(aNew.GetName(), TRUE);
- pDoc->DoUndo(bUndo);
+ pDoc->DelPageDesc(aNew.GetName(), sal_True);
}
-
-void SwUndoPageDescCreate::Redo(SwUndoIter &)
+void SwUndoPageDescCreate::DoImpl()
{
- BOOL bUndo = pDoc->DoesUndo();
-
- pDoc->DoUndo(FALSE);
-
SwPageDesc aPageDesc = aNew;
- pDoc->MakePageDesc(aNew.GetName(), &aPageDesc, FALSE, TRUE); // #116530#
+ pDoc->MakePageDesc(aNew.GetName(), &aPageDesc, sal_False, sal_True); // #116530#
+}
- pDoc->DoUndo(bUndo);
+void SwUndoPageDescCreate::RedoImpl(::sw::UndoRedoContext &)
+{
+ DoImpl();
}
-void SwUndoPageDescCreate::Repeat(SwUndoIter & rIt)
+void SwUndoPageDescCreate::RepeatImpl(::sw::RepeatContext &)
{
- Redo(rIt);
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
+ DoImpl();
}
SwRewriter SwUndoPageDescCreate::GetRewriter() const
@@ -444,29 +425,26 @@ SwUndoPageDescDelete::~SwUndoPageDescDelete()
{
}
-void SwUndoPageDescDelete::Undo(SwUndoIter &)
+void SwUndoPageDescDelete::UndoImpl(::sw::UndoRedoContext &)
{
- BOOL bUndo = pDoc->DoesUndo();
-
- pDoc->DoUndo(FALSE);
-
SwPageDesc aPageDesc = aOld;
- pDoc->MakePageDesc(aOld.GetName(), &aPageDesc, FALSE, TRUE); // #116530#
- pDoc->DoUndo(bUndo);
+ pDoc->MakePageDesc(aOld.GetName(), &aPageDesc, sal_False, sal_True); // #116530#
}
-void SwUndoPageDescDelete::Redo(SwUndoIter &)
+void SwUndoPageDescDelete::DoImpl()
{
- BOOL bUndo = pDoc->DoesUndo();
+ pDoc->DelPageDesc(aOld.GetName(), sal_True); // #116530#
+}
- pDoc->DoUndo(FALSE);
- pDoc->DelPageDesc(aOld.GetName(), TRUE); // #116530#
- pDoc->DoUndo(bUndo);
+void SwUndoPageDescDelete::RedoImpl(::sw::UndoRedoContext &)
+{
+ DoImpl();
}
-void SwUndoPageDescDelete::Repeat(SwUndoIter & rIt)
+void SwUndoPageDescDelete::RepeatImpl(::sw::RepeatContext &)
{
- Redo(rIt);
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
+ DoImpl();
}
SwRewriter SwUndoPageDescDelete::GetRewriter() const
diff --git a/sw/source/core/undo/SwUndoTOXChange.cxx b/sw/source/core/undo/SwUndoTOXChange.cxx
index f4f55422e809..8b5b8c254090 100644
--- a/sw/source/core/undo/SwUndoTOXChange.cxx
+++ b/sw/source/core/undo/SwUndoTOXChange.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <SwUndoTOXChange.hxx>
#include <swundo.hxx>
#include <doctxm.hxx>
@@ -46,29 +47,33 @@ void SwUndoTOXChange::UpdateTOXBaseSection()
if (pTOX->ISA(SwTOXBaseSection))
{
SwTOXBaseSection * pTOXBase = static_cast<SwTOXBaseSection *>(pTOX);
-
pTOXBase->Update();
pTOXBase->UpdatePageNum();
}
}
-void SwUndoTOXChange::Undo(SwUndoIter &)
+void SwUndoTOXChange::UndoImpl(::sw::UndoRedoContext &)
{
*pTOX = aOld;
UpdateTOXBaseSection();
}
-void SwUndoTOXChange::Redo(SwUndoIter &)
+void SwUndoTOXChange::DoImpl()
{
*pTOX = aNew;
UpdateTOXBaseSection();
}
-void SwUndoTOXChange::Repeat(SwUndoIter & rIter)
+void SwUndoTOXChange::RedoImpl(::sw::UndoRedoContext &)
+{
+ DoImpl();
+}
+
+void SwUndoTOXChange::RepeatImpl(::sw::RepeatContext &)
{
- Redo(rIter);
+ DoImpl();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx
index 00a11f7eea95..441bf84096a4 100644
--- a/sw/source/core/undo/docundo.cxx
+++ b/sw/source/core/undo/docundo.cxx
@@ -29,993 +29,553 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#include <svx/svdmodel.hxx>
+#include <UndoManager.hxx>
+
+#include <unotools/undoopt.hxx>
#include <vcl/wrkwin.hxx>
+
+#include <svx/svdmodel.hxx>
+
+#include <swmodule.hxx>
#include <doc.hxx>
+#include <ndarr.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
-#include <swundo.hxx> // fuer die UndoIds
-#include <undobj.hxx>
+#include <swundo.hxx>
+#include <UndoCore.hxx>
#include <rolbck.hxx>
-#include <docary.hxx>
#include <undo.hrc>
+#include <editsh.hxx>
+#include <unobaseclass.hxx>
+#include <limits>
using namespace ::com::sun::star;
-USHORT SwDoc::nUndoActions = UNDO_ACTION_COUNT; // anzahl von Undo-Action
-
// the undo array should never grow beyond this limit:
#define UNDO_ACTION_LIMIT (USHRT_MAX - 1000)
-SV_IMPL_PTRARR( SwUndoIds, SwUndoIdAndNamePtr )
-
-//#define _SHOW_UNDORANGE
-#ifdef _SHOW_UNDORANGE
+// UndoManager ///////////////////////////////////////////////////////////
+namespace sw {
-class UndoArrStatus : public WorkWindow
+UndoManager::UndoManager(::std::auto_ptr<SwNodes> pUndoNodes,
+ IDocumentDrawModelAccess & rDrawModelAccess,
+ IDocumentRedlineAccess & rRedlineAccess,
+ IDocumentState & rState)
+ : m_rDrawModelAccess(rDrawModelAccess)
+ , m_rRedlineAccess(rRedlineAccess)
+ , m_rState(rState)
+ , m_pUndoNodes(pUndoNodes)
+ , m_bGroupUndo(true)
+ , m_bDrawUndo(true)
+ , m_bLockUndoNoModifiedPosition(false)
+ , m_UndoSaveMark(MARK_INVALID)
{
- USHORT nUndo, nUndoNds;
- virtual void Paint( const Rectangle& );
-public:
- UndoArrStatus();
- void Set( USHORT, USHORT );
-};
-static UndoArrStatus* pUndoMsgWin = 0;
-
-
-UndoArrStatus::UndoArrStatus()
- : WorkWindow( APP_GETAPPWINDOW() ), nUndo(0), nUndoNds(0)
-{
- SetSizePixel( Size( 200, 100 ));
- SetFont( Font( "Courier", Size( 0, 10 )) );
- Show();
+ OSL_ASSERT(m_pUndoNodes.get());
+ // writer expects it to be disabled initially
+ // Undo is enabled by SwEditShell constructor
+ SfxUndoManager::EnableUndo(false);
}
-
-void UndoArrStatus::Set( USHORT n1, USHORT n2 )
+SwNodes const& UndoManager::GetUndoNodes() const
{
- nUndo = n1; nUndoNds = n2;
- Invalidate();
+ return *m_pUndoNodes;
}
-
-void UndoArrStatus::Paint( const Rectangle& )
+SwNodes & UndoManager::GetUndoNodes()
{
- String s;
- DrawRect( Rectangle( Point(0,0), GetOutputSize() ));
- ( s = "Undos: " ) += nUndo;
- DrawText( Point( 0, 0 ), s );
- ( s = "UndoNodes: " ) += nUndoNds;
- DrawText( Point( 0, 15 ), s );
+ return *m_pUndoNodes;
}
-#endif
-
-void SwDoc::SetUndoNoResetModified()
+bool UndoManager::IsUndoNodes(SwNodes const& rNodes) const
{
- nUndoSavePos = USHRT_MAX;
+ return & rNodes == m_pUndoNodes.get();
}
-bool SwDoc::IsUndoNoResetModified() const
+void UndoManager::DoUndo(bool const bDoUndo)
{
- return USHRT_MAX == nUndoSavePos;
-}
+ EnableUndo(bDoUndo);
-void SwDoc::DoUndo(bool bUn)
-{
- mbUndo = bUn;
-
- SdrModel* pSdrModel = GetDrawModel();
+ SdrModel *const pSdrModel = m_rDrawModelAccess.GetDrawModel();
if( pSdrModel )
- pSdrModel->EnableUndo(bUn);
+ {
+ pSdrModel->EnableUndo(bDoUndo);
+ }
}
-bool SwDoc::DoesUndo() const
+bool UndoManager::DoesUndo() const
{
- return mbUndo;
+ return IsUndoEnabled();
}
-void SwDoc::DoGroupUndo(bool bUn)
+void UndoManager::DoGroupUndo(bool const bDoUndo)
{
- mbGroupUndo = bUn;
+ m_bGroupUndo = bDoUndo;
}
-bool SwDoc::DoesGroupUndo() const
+bool UndoManager::DoesGroupUndo() const
{
- return mbGroupUndo;
+ return m_bGroupUndo;
}
-sal_uInt16 SwDoc::GetUndoActionCount()
+void UndoManager::DoDrawUndo(bool const bDoUndo)
{
- return nUndoActions;
+ m_bDrawUndo = bDoUndo;
}
-void SwDoc::SetUndoActionCount( sal_uInt16 nNew )
+bool UndoManager::DoesDrawUndo() const
{
- nUndoActions = nNew;
+ return m_bDrawUndo;
}
-const SwNodes* SwDoc::GetUndoNds() const
+
+bool UndoManager::IsUndoNoResetModified() const
{
- return &aUndoNodes;
+ return MARK_INVALID == m_UndoSaveMark;
}
-void SwDoc::AppendUndo( SwUndo* pUndo )
+void UndoManager::SetUndoNoResetModified()
{
- if( nsRedlineMode_t::REDLINE_NONE == pUndo->GetRedlineMode() )
- pUndo->SetRedlineMode( GetRedlineMode() );
-
- // Unfortunately, the silly SvPtrArr can only store a little less than
- // USHRT_MAX elements. Of course it doesn't see any necessity for asserting
- // or even doing error handling. pUndos should definitely be replaced by an
- // STL container that doesn't have this problem. cf #95884#
- DBG_ASSERT( pUndos->Count() < USHRT_MAX - 16,
- "Writer will crash soon. I apologize for the inconvenience." );
-
- pUndos->Insert( pUndo, nUndoPos );
- ++nUndoPos;
- switch( pUndo->GetId() )
- {
- case UNDO_START: ++nUndoSttEnd;
- break;
-
- case UNDO_END: OSL_ENSURE( nUndoSttEnd, "Undo-Ende ohne Start" );
- --nUndoSttEnd;
- // kein break !!!
- default:
- if( pUndos->Count() != nUndoPos && UNDO_END != pUndo->GetId() )
- ClearRedo();
- else {
- OSL_ENSURE( pUndos->Count() == nUndoPos || UNDO_END == pUndo->GetId(),
- "Redo history not deleted!" );
- }
- if( !nUndoSttEnd )
- ++nUndoCnt;
- break;
- }
-
-#ifdef _SHOW_UNDORANGE
- // zur Anzeige der aktuellen Undo-Groessen
- if( !pUndoMsgWin )
- pUndoMsgWin = new UndoArrStatus;
- pUndoMsgWin->Set( pUndos->Count(), aUndoNodes.Count() );
-#endif
-
- // noch eine offene Klammerung, kann man sich den Rest schenken
- if( nUndoSttEnd )
- return;
-
- // folgende Array-Grenzen muessen ueberwacht werden:
- // - Undo, Grenze: fester Wert oder USHRT_MAX - 1000
- // - UndoNodes, Grenze: USHRT_MAX - 1000
- // - AttrHistory Grenze: USHRT_MAX - 1000
- // (defined in UNDO_ACTION_LIMIT at the top of this file)
-
- USHORT nEnde = UNDO_ACTION_LIMIT;
-
-// nur zum Testen der neuen DOC-Member
-#if OSL_DEBUG_LEVEL > 1
-{
- SwUndoId nId = UNDO_EMPTY;
- USHORT nUndosCnt = 0, nSttEndCnt = 0;
- for( USHORT nCnt = 0; nCnt < nUndoPos; ++nCnt )
- {
- if( UNDO_START == ( nId = (*pUndos)[ nCnt ]->GetId()) )
- ++nSttEndCnt;
- else if( UNDO_END == nId )
- --nSttEndCnt;
- if( !nSttEndCnt )
- ++nUndosCnt;
- }
- OSL_ENSURE( nSttEndCnt == nUndoSttEnd, "Start-Ende Count ungleich" );
- OSL_ENSURE( nUndosCnt == nUndoCnt, "Undo Count ungleich" );
-}
-#endif
-
- if( SwDoc::nUndoActions < nUndoCnt )
- // immer 1/10 loeschen
- //JP 23.09.95: oder wenn neu eingestellt wurde um die Differenz
- //JP 29.5.2001: Task #83891#: remove only the overlapping actions
- DelUndoObj( nUndoCnt - SwDoc::nUndoActions );
- else
+ if (MARK_INVALID != m_UndoSaveMark)
{
- USHORT nUndosCnt = nUndoCnt;
- // immer 1/10 loeschen bis der "Ausloeser" behoben ist
- while( aUndoNodes.Count() && nEnde < aUndoNodes.Count() )
- DelUndoObj( nUndosCnt / 10 );
+ RemoveMark(m_UndoSaveMark);
+ m_UndoSaveMark = MARK_INVALID;
}
}
-
-
-void SwDoc::ClearRedo()
+void UndoManager::SetUndoNoModifiedPosition()
{
- if( DoesUndo() && nUndoPos != pUndos->Count() )
+ if (!m_bLockUndoNoModifiedPosition)
{
-//?? why ?? if( !nUndoSttEnd )
- {
- // setze UndoCnt auf den neuen Wert
- SwUndo* pUndo;
- for( USHORT nCnt = pUndos->Count(); nUndoPos < nCnt; --nUndoCnt )
- // Klammerung ueberspringen
- if( UNDO_END == (pUndo = (*pUndos)[ --nCnt ])->GetId() )
- nCnt = nCnt - ((SwUndoEnd*)pUndo)->GetSttOffset();
- }
-
- // loesche die Undo-Aktionen (immer von hinten !)
- pUndos->DeleteAndDestroy( nUndoPos, pUndos->Count() - nUndoPos );
+ m_UndoSaveMark = MarkTopUndoAction();
}
}
-
- // loescht die gesamten UndoObjecte
-void SwDoc::DelAllUndoObj()
+void UndoManager::LockUndoNoModifiedPosition()
{
- ClearRedo();
-
- DoUndo( FALSE );
-
- // Offene Undo-Klammerungen erhalten !!
- SwUndo* pUndo;
- USHORT nSize = pUndos->Count();
- while( nSize )
- if( UNDO_START != ( pUndo = (*pUndos)[ --nSize ] )->GetId() ||
- ((SwUndoStart*)pUndo)->GetEndOffset() )
- // keine offenen Gruppierung ?
- pUndos->DeleteAndDestroy( nSize, 1 );
-
- nUndoCnt = 0;
- nUndoPos = pUndos->Count();
-
-/*
- while( nUndoPos )
- aUndos.DelDtor( --nUndoPos, 1 );
- nUndoCnt = nUndoSttEnd = nUndoPos = 0;
-*/
- nUndoSavePos = USHRT_MAX;
- DoUndo( TRUE );
+ m_bLockUndoNoModifiedPosition = true;
}
-
- // loescht alle UndoObjecte vom Anfang bis zum angegebenen Ende
-BOOL SwDoc::DelUndoObj( USHORT nEnde )
+void UndoManager::UnLockUndoNoModifiedPosition()
{
- if( !nEnde ) // sollte mal 0 uebergeben werden,
- {
- if( !pUndos->Count() )
- return FALSE;
- ++nEnde; // dann korrigiere es auf 1
- }
-
- DoUndo( FALSE );
-
- // pruefe erstmal, wo das Ende steht
- SwUndoId nId = UNDO_EMPTY;
- USHORT nSttEndCnt = 0;
- USHORT nCnt;
-
- for( nCnt = 0; nEnde && nCnt < nUndoPos; ++nCnt )
- {
- if( UNDO_START == ( nId = (*pUndos)[ nCnt ]->GetId() ))
- ++nSttEndCnt;
- else if( UNDO_END == nId )
- --nSttEndCnt;
- if( !nSttEndCnt )
- --nEnde, --nUndoCnt;
- }
-
- OSL_ENSURE( nCnt < nUndoPos || nUndoPos == pUndos->Count(),
- "Undo-Del-Ende liegt in einer Redo-Aktion" );
-
- // dann setze ab Ende bis Undo-Ende bei allen Undo-Objecte die Werte um
- nSttEndCnt = nCnt; // Position merken
- if( nUndoSavePos < nSttEndCnt ) // SavePos wird aufgegeben
- nUndoSavePos = USHRT_MAX;
- else if( nUndoSavePos != USHRT_MAX )
- nUndoSavePos = nUndoSavePos - nSttEndCnt;
-
- while( nSttEndCnt )
- pUndos->DeleteAndDestroy( --nSttEndCnt, 1 );
- nUndoPos = pUndos->Count();
-
- DoUndo( TRUE );
- return TRUE;
+ m_bLockUndoNoModifiedPosition = false;
}
-/**************** UNDO ******************/
-void SwDoc::setUndoNoModifiedPosition( SwUndoNoModifiedPosition nNew )
+SwUndo* UndoManager::GetLastUndo()
{
- nUndoSavePos = nNew;
- if( !pUndos->Count() || nUndoSavePos > pUndos->Count() - 1 )
- nUndoSavePos = USHRT_MAX;
+ if (!SfxUndoManager::GetUndoActionCount(CurrentLevel))
+ {
+ return 0;
+ }
+ SfxUndoAction *const pAction( SfxUndoManager::GetUndoAction(0) );
+ return dynamic_cast<SwUndo*>(pAction);
}
-SwUndoNoModifiedPosition SwDoc::getUndoNoModifiedPosition() const
+void UndoManager::AppendUndo(SwUndo *const pUndo)
{
- return nUndoSavePos;
+ AddUndoAction(pUndo);
}
-
-bool SwDoc::HasUndoId(SwUndoId eId) const
+void UndoManager::ClearRedo()
{
- USHORT nSize = nUndoPos;
- SwUndo * pUndo;
- while( nSize-- )
- if( ( pUndo = (*pUndos)[nSize])->GetId() == eId ||
- ( UNDO_START == pUndo->GetId() &&
- ((SwUndoStart*)pUndo)->GetUserId() == eId )
- || ( UNDO_END == pUndo->GetId() &&
- ((SwUndoEnd*)pUndo)->GetUserId() == eId ) )
- {
- return TRUE;
- }
-
- return FALSE;
+ return SfxUndoManager::ImplClearRedo_NoLock(TopLevel);
}
-
-bool SwDoc::Undo( SwUndoIter& rUndoIter )
+void UndoManager::DelAllUndoObj()
{
- if ( (rUndoIter.GetId()!=0) && (!HasUndoId(rUndoIter.GetId())) )
- {
- rUndoIter.bWeiter = FALSE;
- return FALSE;
- }
- if( !nUndoPos )
- {
- rUndoIter.bWeiter = FALSE;
- return FALSE;
- }
-
- SwUndo *pUndo = (*pUndos)[ --nUndoPos ];
-
- RedlineMode_t eOld = GetRedlineMode();
- RedlineMode_t eTmpMode = (RedlineMode_t)pUndo->GetRedlineMode();
- if( (nsRedlineMode_t::REDLINE_SHOW_MASK & eTmpMode) != (nsRedlineMode_t::REDLINE_SHOW_MASK & eOld) &&
- UNDO_START != pUndo->GetId() && UNDO_END != pUndo->GetId() )
- SetRedlineMode( eTmpMode );
-
- SetRedlineMode_intern((RedlineMode_t)(eTmpMode | nsRedlineMode_t::REDLINE_IGNORE));
- // Undo ausfuehren
-
- // zum spaeteren ueberpruefen
- SwUndoId nAktId = pUndo->GetId();
- //JP 11.05.98: FlyFormate ueber die EditShell selektieren, nicht aus dem
- // Undo heraus
- switch( nAktId )
- {
- case UNDO_START:
- case UNDO_END:
- case UNDO_INSDRAWFMT:
- break;
-
- default:
- rUndoIter.ClearSelections();
- }
-
- pUndo->Undo( rUndoIter );
-
- SetRedlineMode( eOld );
-
- // Besonderheit von Undo-Replace (interne History)
- if( UNDO_REPLACE == nAktId && ((SwUndoReplace*)pUndo)->nAktPos )
- {
- ++nUndoPos;
- return TRUE;
- }
-
- // Objekt aus History entfernen und zerstoeren
- if( nUndoPos && !rUndoIter.bWeiter &&
- UNDO_START == ( pUndo = (*pUndos)[ nUndoPos-1 ] )->GetId() )
- --nUndoPos;
+ ::sw::UndoGuard const undoGuard(*this);
- // JP 29.10.96: Start und End setzen kein Modify-Flag.
- // Sonst gibt es Probleme mit der autom. Aufnahme von Ausnahmen
- // bei der Autokorrektur
- if( UNDO_START != nAktId && UNDO_END != nAktId )
- SetModified(); // default: immer setzen, kann zurueck gesetzt werden
+ SfxUndoManager::ClearAllLevels();
- // ist die History leer und wurde nicht wegen Speichermangel
- // verworfen, so kann das Dokument als unveraendert gelten
- if( nUndoSavePos == nUndoPos )
- ResetModified();
-
- return TRUE;
+ m_UndoSaveMark = MARK_INVALID;
}
-// setzt Undoklammerung auf, liefert nUndoId der Klammerung
-
+/**************** UNDO ******************/
-SwUndoId SwDoc::StartUndo( SwUndoId eUndoId, const SwRewriter * pRewriter )
+SwUndoId
+UndoManager::StartUndo(SwUndoId const i_eUndoId,
+ SwRewriter const*const pRewriter)
{
- if( !mbUndo )
+ if (!IsUndoEnabled())
+ {
return UNDO_EMPTY;
+ }
- if( !eUndoId )
- eUndoId = UNDO_START;
-
- SwUndoStart * pUndo = new SwUndoStart( eUndoId );
+ SwUndoId const eUndoId( (0 == i_eUndoId) ? UNDO_START : i_eUndoId );
+ OSL_ASSERT(UNDO_END != eUndoId);
+ String comment( (UNDO_START == eUndoId)
+ ? String("??", RTL_TEXTENCODING_ASCII_US)
+ : String(SW_RES(UNDO_BASE + eUndoId)) );
if (pRewriter)
- pUndo->SetRewriter(*pRewriter);
+ {
+ OSL_ASSERT(UNDO_START != eUndoId);
+ comment = pRewriter->Apply(comment);
+ }
- AppendUndo(pUndo);
+ SfxUndoManager::EnterListAction(comment, comment, eUndoId);
return eUndoId;
}
-// schliesst Klammerung der nUndoId, nicht vom UI benutzt
-SwUndoId SwDoc::EndUndo(SwUndoId eUndoId, const SwRewriter * pRewriter)
+SwUndoId
+UndoManager::EndUndo(SwUndoId const i_eUndoId, SwRewriter const*const pRewriter)
{
- USHORT nSize = nUndoPos;
- if( !mbUndo || !nSize-- )
- return UNDO_EMPTY;
-
- if( UNDO_START == eUndoId || !eUndoId )
- eUndoId = UNDO_END;
-
- SwUndo* pUndo = (*pUndos)[ nSize ];
- if( UNDO_START == pUndo->GetId() )
+ if (!IsUndoEnabled())
{
- // leere Start/End-Klammerung ??
- pUndos->DeleteAndDestroy( nSize );
- --nUndoPos;
- --nUndoSttEnd;
return UNDO_EMPTY;
}
- // exist above any redo objects? If yes, delete them
- if( nUndoPos != pUndos->Count() )
- {
- // setze UndoCnt auf den neuen Wert
- for( USHORT nCnt = pUndos->Count(); nUndoPos < nCnt; --nUndoCnt )
- // Klammerung ueberspringen
- if( UNDO_END == (pUndo = (*pUndos)[ --nCnt ])->GetId() )
- nCnt = nCnt - ((SwUndoEnd*)pUndo)->GetSttOffset();
-
- pUndos->DeleteAndDestroy( nUndoPos, pUndos->Count() - nUndoPos );
- }
-
- // suche den Anfang dieser Klammerung
- SwUndoId nId = UNDO_EMPTY;
- while( nSize )
- if( UNDO_START == ( nId = (pUndo = (*pUndos)[ --nSize ] )->GetId()) &&
- !((SwUndoStart*)pUndo)->GetEndOffset() )
- break; // Start gefunden
-
- if( nId != UNDO_START )
- {
- // kann eigentlich nur beim Abspielen von Macros passieren, die
- // Undo/Redo/Repeat benutzen und die eine exitierende Selection
- // durch Einfuegen loeschen
- OSL_ENSURE( !this, "kein entsprechendes Ende gefunden" );
- // kein entsprechenden Start gefunden -> Ende nicht einfuegen
- // und die Member am Doc updaten
+ SwUndoId const eUndoId( ((0 == i_eUndoId) || (UNDO_START == i_eUndoId))
+ ? UNDO_END : i_eUndoId );
+ OSL_ENSURE(!((UNDO_END == eUndoId) && pRewriter),
+ "EndUndo(): no Undo ID, but rewriter given?");
- nUndoSttEnd = 0;
- nUndoCnt = 0;
- // setze UndoCnt auf den neuen Wert
- SwUndo* pTmpUndo;
- for( USHORT nCnt = 0; nCnt < pUndos->Count(); ++nCnt, ++nUndoCnt )
- // Klammerung ueberspringen
- if( UNDO_START == (pTmpUndo = (*pUndos)[ nCnt ])->GetId() )
- nCnt = nCnt + ((SwUndoStart*)pTmpUndo)->GetEndOffset();
- return UNDO_EMPTY;
+ SfxUndoAction *const pLastUndo(
+ (0 == SfxUndoManager::GetUndoActionCount(CurrentLevel))
+ ? 0 : SfxUndoManager::GetUndoAction(0) );
- }
+ int const nCount = LeaveListAction();
- // Klammerung um eine einzelne Action muss nicht sein!
- // Aussnahme: es ist eine eigene ID definiert
- if( 2 == pUndos->Count() - nSize &&
- (UNDO_END == eUndoId || eUndoId == (*pUndos)[ nSize+1 ]->GetId() ))
+ if (nCount) // otherwise: empty list action not inserted!
{
- pUndos->DeleteAndDestroy( nSize );
- nUndoPos = pUndos->Count();
- if( !--nUndoSttEnd )
+ OSL_ASSERT(pLastUndo);
+ OSL_ASSERT(UNDO_START != eUndoId);
+ SfxUndoAction *const pUndoAction(SfxUndoManager::GetUndoAction(0));
+ SfxListUndoAction *const pListAction(
+ dynamic_cast<SfxListUndoAction*>(pUndoAction));
+ OSL_ASSERT(pListAction);
+ if (pListAction)
{
- ++nUndoCnt;
- if( SwDoc::nUndoActions < nUndoCnt )
- // immer 1/10 loeschen
- //JP 23.09.95: oder wenn neu eingestellt wurde um die Differenz
- //JP 29.5.2001: Task #83891#: remove only the overlapping actions
- DelUndoObj( nUndoCnt - SwDoc::nUndoActions );
+ if (UNDO_END != eUndoId)
+ {
+ OSL_ENSURE(pListAction->GetId() == eUndoId,
+ "EndUndo(): given ID different from StartUndo()");
+ // comment set by caller of EndUndo
+ String comment = String(SW_RES(UNDO_BASE + eUndoId));
+ if (pRewriter)
+ {
+ comment = pRewriter->Apply(comment);
+ }
+ pListAction->SetComment(comment);
+ }
+ else if ((UNDO_START != pListAction->GetId()))
+ {
+ // comment set by caller of StartUndo: nothing to do here
+ }
+ else if (pLastUndo)
+ {
+ // comment was not set at StartUndo or EndUndo:
+ // take comment of last contained action
+ // (note that this works recursively, i.e. the last contained
+ // action may be a list action created by StartUndo/EndUndo)
+ String const comment(pLastUndo->GetComment());
+ pListAction->SetComment(comment);
+ }
else
{
- USHORT nEnde = USHRT_MAX - 1000;
- USHORT nUndosCnt = nUndoCnt;
- // immer 1/10 loeschen bis der "Ausloeser" behoben ist
- while( aUndoNodes.Count() && nEnde < aUndoNodes.Count() )
- DelUndoObj( nUndosCnt / 10 );
+ OSL_ENSURE(false, "EndUndo(): no comment?");
}
}
- return eUndoId;
}
- // setze die Klammerung am Start/End-Undo
- nSize = pUndos->Count() - nSize;
- ((SwUndoStart*)pUndo)->SetEndOffset( nSize );
-
- SwUndoEnd* pUndoEnd = new SwUndoEnd( eUndoId );
- pUndoEnd->SetSttOffset( nSize );
+ return eUndoId;
+}
-// nur zum Testen der Start/End-Verpointerung vom Start/End Undo
-#if OSL_DEBUG_LEVEL > 1
+bool
+UndoManager::GetLastUndoInfo(
+ ::rtl::OUString *const o_pStr, SwUndoId *const o_pId) const
+{
+ // this is actually expected to work on the current level,
+ // but that was really not obvious from the previous implementation...
+ if (!SfxUndoManager::GetUndoActionCount(CurrentLevel))
{
- USHORT nEndCnt = 1, nCnt = pUndos->Count();
- SwUndoId nTmpId = UNDO_EMPTY;
- while( nCnt )
- {
- if( UNDO_START == ( nTmpId = (*pUndos)[ --nCnt ]->GetId()) )
- {
- if( !nEndCnt ) // falls mal ein Start ohne Ende vorhanden ist
- continue;
- --nEndCnt;
- if( !nEndCnt ) // hier ist der Anfang
- break;
- }
- else if( UNDO_END == nTmpId )
- ++nEndCnt;
- else if( !nEndCnt )
- break;
- }
- OSL_ENSURE( nCnt == pUndos->Count() - nSize,
- "Start-Ende falsch geklammert" );
+ return false;
}
-#endif
- if (pRewriter)
+ SfxUndoAction *const pAction( SfxUndoManager::GetUndoAction(0) );
+ if (o_pStr)
{
- ((SwUndoStart *) pUndo)->SetRewriter(*pRewriter);
- pUndoEnd->SetRewriter(*pRewriter);
+ *o_pStr = pAction->GetComment();
+ }
+ if (o_pId)
+ {
+ sal_uInt16 const nId(pAction->GetId());
+ *o_pId = static_cast<SwUndoId>(nId);
}
- else
- pUndoEnd->SetRewriter(((SwUndoStart *) pUndo)->GetRewriter());
- AppendUndo( pUndoEnd );
- return eUndoId;
+ return true;
}
-// liefert die Id der letzten Undofaehigen Aktion zurueck oder 0
-// fuellt ggf. VARARR mit User-UndoIds
-
-String SwDoc::GetUndoIdsStr( String* pStr, SwUndoIds *pUndoIds) const
+SwUndoComments_t UndoManager::GetUndoComments() const
{
- String aTmpStr;
+ OSL_ENSURE(!SfxUndoManager::IsInListAction(),
+ "GetUndoComments() called while in list action?");
- if (pStr != NULL)
+ SwUndoComments_t ret;
+ sal_uInt16 const nUndoCount(SfxUndoManager::GetUndoActionCount(TopLevel));
+ for (sal_uInt16 n = 0; n < nUndoCount; ++n)
{
- GetUndoIds( pStr, pUndoIds);
- aTmpStr = *pStr;
+ ::rtl::OUString const comment(
+ SfxUndoManager::GetUndoActionComment(n, TopLevel));
+ ret.push_back(comment);
}
- else
- GetUndoIds( &aTmpStr, pUndoIds);
- return aTmpStr;
+ return ret;
}
-sal_Bool SwDoc::RestoreInvisibleContent()
+
+/**************** REDO ******************/
+bool UndoManager::GetFirstRedoInfo(::rtl::OUString *const o_pStr) const
{
- sal_Bool bRet = sal_False;
- if(nUndoPos > 0 )
+ if (!SfxUndoManager::GetRedoActionCount(CurrentLevel))
{
- SwUndo * pUndo = (*pUndos)[ nUndoPos - 1 ];
- if( ( pUndo->GetId() == UNDO_END &&
- static_cast<SwUndoEnd *>(pUndo)->GetUserId() == UNDO_UI_DELETE_INVISIBLECNTNT) )
- {
- SwPaM aPam( GetNodes().GetEndOfPostIts() );
- SwUndoIter aUndoIter( &aPam );
- do
- {
- Undo( aUndoIter );
- }
- while ( aUndoIter.IsNextUndo() );
- ClearRedo();
- bRet = sal_True;
- }
+ return false;
}
- return bRet;
-}
-
-
-/**
- Returns id and comment for a certain undo object in an undo stack.
-
- Remark: In the following the object type referred to is always the
- effective object type. If an UNDO_START or UNDO_END has a user type
- it is referred to as this type.
-
- If the queried object is an UNDO_END and has no user id the result
- is taken from the first object that is not an UNDO_END nor an
- UNDO_START preceeding the queried object.
-
- If the queried object is an UNDO_START and has no user id the
- result is taken from the first object that is not an UNDO_END nor
- an UNDO_START preceeding the UNDO_END object belonging to the
- queried object.
-
- In all other cases the result is taken from the queried object.
- @param rUndos the undo stack
- @param nPos position of the undo object to query
-
- @return SwUndoIdAndName object containing the query result
- */
-SwUndoIdAndName * lcl_GetUndoIdAndName(const SwUndos & rUndos, sal_uInt16 nPos )
-{
- SwUndo * pUndo = rUndos[ nPos ];
- SwUndoId nId = UNDO_EMPTY;
- String sStr("??", RTL_TEXTENCODING_ASCII_US);
-
- OSL_ENSURE( nPos < rUndos.Count(), "nPos out of range");
-
- switch (pUndo->GetId())
+ if (o_pStr)
{
- case UNDO_START:
- {
- SwUndoStart * pUndoStart = (SwUndoStart *) pUndo;
- nId = pUndoStart->GetUserId();
-
- if (nId <= UNDO_END)
- {
- /**
- Start at the according UNDO_END. Search backwards
- for first objects that is not a UNDO_END.
- */
- int nTmpPos = nPos + pUndoStart->GetEndOffset();
- if ( nTmpPos > 0 ) // #i105457# Segmentation Fault opening graphics placeholder
- {
- int nSubstitute = -1;
- SwUndo * pTmpUndo;
- do
- {
- nTmpPos--;
- pTmpUndo = rUndos[ static_cast<USHORT>(nTmpPos) ];
-
- if (pTmpUndo->GetEffectiveId() > UNDO_END)
- nSubstitute = nTmpPos;
- }
- while (nSubstitute < 0 && nTmpPos > nPos);
-
- if (nSubstitute >= 0)
- {
- SwUndo * pSubUndo = rUndos[ static_cast<USHORT>(nSubstitute) ];
- nId = pSubUndo->GetEffectiveId();
- sStr = pSubUndo->GetComment();
- }
- }
- }
- else
- sStr = pUndo->GetComment();
- }
-
- break;
-
- case UNDO_END:
- {
- SwUndoEnd * pUndoEnd = (SwUndoEnd *) pUndo;
- nId = pUndoEnd->GetUserId();
-
- if (nId <= UNDO_END)
- {
- /**
- Start at this UNDO_END. Search backwards
- for first objects that is not a UNDO_END.
- */
-
- int nTmpPos = nPos;
-
- if (nTmpPos > 0)
- {
- int nUndoStart = nTmpPos - pUndoEnd->GetSttOffset();
- int nSubstitute = -1;
- SwUndo * pTmpUndo;
-
- do
- {
- nTmpPos--;
- pTmpUndo = rUndos[ static_cast<USHORT>(nTmpPos) ];
-
- if (pTmpUndo->GetEffectiveId() > UNDO_END)
- nSubstitute = nTmpPos;
- }
- while (nSubstitute < 0 && nTmpPos > nUndoStart);
-
- if (nSubstitute >= 0)
- {
- SwUndo * pSubUndo = rUndos[ static_cast<USHORT>(nSubstitute) ];
- nId = pSubUndo->GetEffectiveId();
- sStr = pSubUndo->GetComment();
- }
- }
- }
- else
- sStr = pUndo->GetComment();
- }
-
- break;
-
- default:
- nId = pUndo->GetId();
- sStr = pUndo->GetComment();
+ *o_pStr = SfxUndoManager::GetRedoActionComment(0, CurrentLevel);
}
- return new SwUndoIdAndName(nId, &sStr);
+ return true;
}
-SwUndoId SwDoc::GetUndoIds( String* pStr, SwUndoIds *pUndoIds) const
+
+SwUndoComments_t UndoManager::GetRedoComments() const
{
- int nTmpPos = nUndoPos - 1;
- SwUndoId nId = UNDO_EMPTY;
+ OSL_ENSURE(!SfxUndoManager::IsInListAction(),
+ "GetRedoComments() called while in list action?");
- while (nTmpPos >= 0)
+ SwUndoComments_t ret;
+ sal_uInt16 const nRedoCount(SfxUndoManager::GetRedoActionCount(TopLevel));
+ for (sal_uInt16 n = 0; n < nRedoCount; ++n)
{
- SwUndo * pUndo = (*pUndos)[ static_cast<USHORT>(nTmpPos) ];
-
- SwUndoIdAndName * pIdAndName = lcl_GetUndoIdAndName( *pUndos, static_cast<sal_uInt16>(nTmpPos) );
-
- if (nTmpPos == nUndoPos - 1)
- {
- nId = pIdAndName->GetUndoId();
-
- if (pStr)
- *pStr = *pIdAndName->GetUndoStr();
- }
-
- if (pUndoIds)
- pUndoIds->Insert(pIdAndName, pUndoIds->Count());
- else
- break;
-
- if (pUndo->GetId() == UNDO_END)
- nTmpPos -= ((SwUndoEnd *) pUndo)->GetSttOffset();
-
- nTmpPos--;
+ ::rtl::OUString const comment(
+ SfxUndoManager::GetRedoActionComment(n, TopLevel));
+ ret.push_back(comment);
}
- return nId;
+ return ret;
}
-bool SwDoc::HasTooManyUndos() const
-{
- // AppendUndo checks the UNDO_ACTION_LIMIT, unless there's a nested undo.
- // So HasTooManyUndos() may only occur when undos are nested; else
- // AppendUndo has some sort of bug.
- DBG_ASSERT( (nUndoSttEnd != 0) || (pUndos->Count() < UNDO_ACTION_LIMIT),
- "non-nested undos should have been handled in AppendUndo" );
- return (pUndos->Count() >= UNDO_ACTION_LIMIT);
-}
-
-
-/**************** REDO ******************/
-
+/**************** REPEAT ******************/
-bool SwDoc::Redo( SwUndoIter& rUndoIter )
+SwUndoId UndoManager::GetRepeatInfo(::rtl::OUString *const o_pStr) const
{
- if( rUndoIter.GetId() && !HasUndoId( rUndoIter.GetId() ) )
+ SwUndoId nRepeatId(UNDO_EMPTY);
+ GetLastUndoInfo(o_pStr, & nRepeatId);
+ if( REPEAT_START <= nRepeatId && REPEAT_END > nRepeatId )
{
- rUndoIter.bWeiter = FALSE;
- return FALSE;
+ return nRepeatId;
}
- if( nUndoPos == pUndos->Count() )
+ if (o_pStr) // not repeatable -> clear comment
{
- rUndoIter.bWeiter = FALSE;
- return FALSE;
+ *o_pStr = String();
}
+ return UNDO_EMPTY;
+}
- SwUndo *pUndo = (*pUndos)[ nUndoPos++ ];
-
- RedlineMode_t eOld = GetRedlineMode();
- RedlineMode_t eTmpMode = (RedlineMode_t)pUndo->GetRedlineMode();
- if( (nsRedlineMode_t::REDLINE_SHOW_MASK & eTmpMode) != (nsRedlineMode_t::REDLINE_SHOW_MASK & eOld) &&
- UNDO_START != pUndo->GetId() && UNDO_END != pUndo->GetId() )
- SetRedlineMode( eTmpMode );
- SetRedlineMode_intern( (RedlineMode_t)(eTmpMode | nsRedlineMode_t::REDLINE_IGNORE));
-
- //JP 11.05.98: FlyFormate ueber die EditShell selektieren, nicht aus dem
- // Undo heraus
- if( UNDO_START != pUndo->GetId() && UNDO_END != pUndo->GetId() )
- rUndoIter.ClearSelections();
-
- pUndo->Redo( rUndoIter );
-
- SetRedlineMode( eOld );
-
- // Besonderheit von Undo-Replace (interne History)
- if( UNDO_REPLACE == pUndo->GetId() &&
- USHRT_MAX != ((SwUndoReplace*)pUndo)->nAktPos )
+SwUndo * UndoManager::RemoveLastUndo()
+{
+ if (SfxUndoManager::GetRedoActionCount(CurrentLevel) ||
+ SfxUndoManager::GetRedoActionCount(TopLevel))
{
- --nUndoPos;
- return TRUE;
+ OSL_ENSURE(false, "RemoveLastUndoAction(): there are Redo actions?");
+ return 0;
}
-
- if( rUndoIter.bWeiter && nUndoPos >= pUndos->Count() )
- rUndoIter.bWeiter = FALSE;
-
- // ist die History leer und wurde nicht wegen Speichermangel
- // verworfen, so kann das Dokument als unveraendert gelten
- if( nUndoSavePos == nUndoPos )
- ResetModified();
- else
- SetModified();
- return TRUE;
+ if (!SfxUndoManager::GetUndoActionCount(CurrentLevel))
+ {
+ OSL_ENSURE(false, "RemoveLastUndoAction(): no Undo actions");
+ return 0;
+ }
+ SfxUndoAction *const pLastUndo(GetUndoAction(0));
+ SfxUndoManager::RemoveLastUndoAction();
+ return dynamic_cast<SwUndo *>(pLastUndo);
}
+// svl::IUndoManager /////////////////////////////////////////////////////
-// liefert die Id der letzten Redofaehigen Aktion zurueck oder 0
-// fuellt ggf. VARARR mit User-RedoIds
-
-String SwDoc::GetRedoIdsStr( String* pStr, SwUndoIds *pRedoIds ) const
+void UndoManager::EnableUndo(bool bEnable)
{
- String aTmpStr;
-
- if (pStr != NULL)
+ // UGLY: SfxUndoManager has a counter to match enable/disable calls
+ // but the writer code expects that a single call switches
+ while (IsUndoEnabled() != bEnable)
{
- GetRedoIds( pStr, pRedoIds );
- aTmpStr = *pStr;
+ SfxUndoManager::EnableUndo(bEnable);
}
- else
- GetRedoIds( &aTmpStr, pRedoIds );
-
-
- return aTmpStr;
}
-
-SwUndoId SwDoc::GetRedoIds( String* pStr, SwUndoIds *pRedoIds ) const
+void UndoManager::AddUndoAction(SfxUndoAction *pAction, sal_Bool bTryMerge)
{
- sal_uInt16 nTmpPos = nUndoPos;
- SwUndoId nId = UNDO_EMPTY;
-
- while (nTmpPos < pUndos->Count())
+ SwUndo *const pUndo( dynamic_cast<SwUndo *>(pAction) );
+ if (pUndo)
{
- SwUndo * pUndo = (*pUndos)[nTmpPos];
-
- SwUndoIdAndName * pIdAndName = lcl_GetUndoIdAndName(*pUndos, nTmpPos);
-
- if (nTmpPos == nUndoPos)
+ if (nsRedlineMode_t::REDLINE_NONE == pUndo->GetRedlineMode())
{
- nId = pIdAndName->GetUndoId();
-
- if (pStr)
- *pStr = *pIdAndName->GetUndoStr();
+ pUndo->SetRedlineMode( m_rRedlineAccess.GetRedlineMode() );
}
-
- if (pRedoIds)
- pRedoIds->Insert(pIdAndName, pRedoIds->Count());
- else
- break;
-
- if (pUndo->GetId() == UNDO_START)
- nTmpPos = nTmpPos + ((SwUndoStart *) pUndo)->GetEndOffset();
-
- nTmpPos++;
}
-
- return nId;
+ SfxUndoManager::AddUndoAction(pAction, bTryMerge);
+ // if the undo nodes array is too large, delete some actions
+ while (UNDO_ACTION_LIMIT < GetUndoNodes().Count())
+ {
+ RemoveOldestUndoActions(1);
+ }
}
-/**************** REPEAT ******************/
-
-
-bool SwDoc::Repeat( SwUndoIter& rUndoIter, sal_uInt16 nRepeatCnt )
+class CursorGuard
{
- if( rUndoIter.GetId() && !HasUndoId( rUndoIter.GetId() ) )
+public:
+ CursorGuard(SwEditShell & rShell, bool const bSave)
+ : m_rShell(rShell)
+ , m_bSaveCursor(bSave)
{
- rUndoIter.bWeiter = FALSE;
- return FALSE;
+ if (m_bSaveCursor)
+ {
+ m_rShell.Push(); // prevent modification of current cursor
+ }
}
- USHORT nSize = nUndoPos;
- if( !nSize )
+ ~CursorGuard()
{
- rUndoIter.bWeiter = FALSE;
- return FALSE;
+ if (m_bSaveCursor)
+ {
+ m_rShell.Pop();
+ }
}
+private:
+ SwEditShell & m_rShell;
+ bool const m_bSaveCursor;
+};
- // dann suche jetzt ueber die End/Start-Gruppen die gueltige Repeat-Aktion
- SwUndo *pUndo = (*pUndos)[ --nSize ];
- if( UNDO_END == pUndo->GetId() )
- nSize = nSize - ((SwUndoEnd*)pUndo)->GetSttOffset();
+bool UndoManager::impl_DoUndoRedo(UndoOrRedo_t const undoOrRedo)
+{
+ SwDoc & rDoc(*GetUndoNodes().GetDoc());
- USHORT nEndCnt = nUndoPos;
- BOOL bOneUndo = nSize + 1 == nUndoPos;
+ UnoActionContext c(& rDoc); // exception-safe StartAllAction/EndAllAction
- SwPaM* pTmpCrsr = rUndoIter.pAktPam;
- SwUndoId nId = UNDO_EMPTY;
+ SwEditShell *const pEditShell( rDoc.GetEditShell() );
- if( pTmpCrsr != pTmpCrsr->GetNext() || !bOneUndo ) // Undo-Klammerung aufbauen
+ OSL_ENSURE(pEditShell, "sw::UndoManager needs a SwEditShell!");
+ if (!pEditShell)
{
- if (pUndo->GetId() == UNDO_END)
- {
- SwUndoStart * pStartUndo =
- (SwUndoStart *) (*pUndos)[nSize];
-
- nId = pStartUndo->GetUserId();
- }
-
- StartUndo( nId, NULL );
+ throw uno::RuntimeException();
}
- do { // dann durchlaufe mal den gesamten Ring
- for( USHORT nRptCnt = nRepeatCnt; nRptCnt > 0; --nRptCnt )
- {
- rUndoIter.pLastUndoObj = 0;
- for( USHORT nCnt = nSize; nCnt < nEndCnt; ++nCnt )
- (*pUndos)[ nCnt ]->Repeat( rUndoIter ); // Repeat ausfuehren
- }
- } while( pTmpCrsr !=
- ( rUndoIter.pAktPam = (SwPaM*)rUndoIter.pAktPam->GetNext() ));
- if( pTmpCrsr != pTmpCrsr->GetNext() || !bOneUndo )
- EndUndo( nId, NULL );
- return TRUE;
-}
+ // in case the model has controllers locked, the Undo should not
+ // change the view cursors!
+ bool const bSaveCursors(pEditShell->CursorsLocked());
+ CursorGuard(*pEditShell, bSaveCursors);
+ if (!bSaveCursors)
+ {
+ // (in case Undo was called via API) clear the cursors:
+ pEditShell->KillPams();
+ pEditShell->SetMark();
+ pEditShell->ClearMark();
+ }
-// liefert die Id der letzten Repeatfaehigen Aktion zurueck oder 0
-// fuellt ggf. VARARR mit User-RedoIds
+ bool bRet(false);
-String SwDoc::GetRepeatIdsStr(String* pStr, SwUndoIds *pRepeatIds) const
-{
- String aTmpStr;
- SwUndoId nId;
+ ::sw::UndoRedoContext context(rDoc, *pEditShell);
- if ( pStr != NULL)
+ // N.B. these may throw!
+ if (UNDO == undoOrRedo)
{
- nId = GetRepeatIds(pStr, pRepeatIds);
- aTmpStr = *pStr;
+ bRet = SfxUndoManager::UndoWithContext(context);
}
else
- nId = GetRepeatIds(&aTmpStr, pRepeatIds);
+ {
+ bRet = SfxUndoManager::RedoWithContext(context);
+ }
- if (nId <= UNDO_END)
- return String();
+ if (bRet)
+ {
+ // if we are at the "last save" position, the document is not modified
+ if (SfxUndoManager::HasTopUndoActionMark(m_UndoSaveMark))
+ {
+ m_rState.ResetModified();
+ }
+ else
+ {
+ m_rState.SetModified();
+ }
+ }
+
+ pEditShell->HandleUndoRedoContext(context);
- return aTmpStr;
+ return bRet;
}
-SwUndoId SwDoc::GetRepeatIds(String* pStr, SwUndoIds *pRepeatIds) const
+sal_Bool UndoManager::Undo()
{
- SwUndoId nRepeatId = GetUndoIds( pStr, pRepeatIds );
- if( REPEAT_START <= nRepeatId && REPEAT_END > nRepeatId )
- return nRepeatId;
- return UNDO_EMPTY;
+ bool const bRet = impl_DoUndoRedo(UNDO);
+ return bRet;
}
+sal_Bool UndoManager::Redo()
+{
+ bool const bRet = impl_DoUndoRedo(REDO);
+ return bRet;
+}
-SwUndo* SwDoc::RemoveLastUndo( SwUndoId eUndoId )
+/** N.B.: this does _not_ call SfxUndoManager::Repeat because it is not
+ possible to wrap a list action around it:
+ calling EnterListAction here will cause SfxUndoManager::Repeat
+ to repeat the list action!
+ */
+bool
+UndoManager::Repeat(::sw::RepeatContext & rContext,
+ sal_uInt16 const nRepeatCount)
{
- SwUndo* pUndo = (*pUndos)[ nUndoPos - 1 ];
- if( eUndoId == pUndo->GetId() && nUndoPos == pUndos->Count() )
+ if (SfxUndoManager::IsInListAction())
{
- if( !nUndoSttEnd )
- --nUndoCnt;
- --nUndoPos;
- pUndos->Remove( nUndoPos, 1 );
+ OSL_ENSURE(false, "repeat in open list action???");
+ return false;
}
- else
+ if (!SfxUndoManager::GetUndoActionCount(TopLevel))
{
- pUndo = 0;
- OSL_ENSURE( !this, "falsches Undo-Object" );
+ return false;
+ }
+ SfxUndoAction *const pRepeatAction(GetUndoAction(0));
+ OSL_ASSERT(pRepeatAction);
+ if (!pRepeatAction || !pRepeatAction->CanRepeat(rContext))
+ {
+ return false;
}
- return pUndo;
-}
-SwUndoIdAndName::SwUndoIdAndName( SwUndoId nId, const String* pStr )
- : eUndoId( nId ), pUndoStr( pStr ? new String( *pStr ) : 0 )
-{
-}
+ ::rtl::OUString const comment(pRepeatAction->GetComment());
+ ::rtl::OUString const rcomment(pRepeatAction->GetRepeatComment(rContext));
+ sal_uInt16 const nId(pRepeatAction->GetId());
+ if (DoesUndo())
+ {
+ EnterListAction(comment, rcomment, nId);
+ }
-SwUndoIdAndName::~SwUndoIdAndName()
-{
- delete pUndoStr;
-}
+ SwPaM *const pFirstCursor(& rContext.GetRepeatPaM());
+ do { // iterate over ring
+ for (sal_uInt16 nRptCnt = nRepeatCount; nRptCnt > 0; --nRptCnt)
+ {
+ pRepeatAction->Repeat(rContext);
+ }
+ rContext.m_bDeleteRepeated = false; // reset for next PaM
+ rContext.m_pCurrentPaM =
+ static_cast<SwPaM*>(rContext.m_pCurrentPaM->GetNext());
+ } while (pFirstCursor != & rContext.GetRepeatPaM());
+ if (DoesUndo())
+ {
+ LeaveListAction();
+ }
+ return true;
+}
+} // namespace sw
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/makefile.mk b/sw/source/core/undo/makefile.mk
deleted file mode 100644
index d48ec2d4bbf7..000000000000
--- a/sw/source/core/undo/makefile.mk
+++ /dev/null
@@ -1,81 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=undo
-
-AUTOSEG=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- undo.src
-
-EXCEPTIONSFILES = \
- $(SLO)$/SwRewriter.obj \
- $(SLO)$/SwUndoField.obj \
- $(SLO)$/SwUndoFmt.obj \
- $(SLO)$/SwUndoPageDesc.obj \
- $(SLO)$/SwUndoTOXChange.obj \
- $(SLO)$/docundo.obj \
- $(SLO)$/rolbck.obj \
- $(SLO)$/unattr.obj \
- $(SLO)$/unbkmk.obj \
- $(SLO)$/undel.obj \
- $(SLO)$/undobj.obj \
- $(SLO)$/undobj1.obj \
- $(SLO)$/undoflystrattr.obj \
- $(SLO)$/undraw.obj \
- $(SLO)$/unfmco.obj \
- $(SLO)$/unins.obj \
- $(SLO)$/unmove.obj \
- $(SLO)$/unnum.obj \
- $(SLO)$/unoutl.obj \
- $(SLO)$/unovwr.obj \
- $(SLO)$/unredln.obj \
- $(SLO)$/unsect.obj \
- $(SLO)$/unsort.obj \
- $(SLO)$/unspnd.obj \
- $(SLO)$/untbl.obj \
- $(SLO)$/untblk.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index 7137b31343f7..a58c21d2e619 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -29,9 +29,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <rolbck.hxx>
+
+#include <tools/resid.hxx>
-#include <hintids.hxx>
#include <svl/itemiter.hxx>
+
+#include <editeng/brkitem.hxx>
+
+#include <hints.hxx>
+#include <hintids.hxx>
#include <fmtftn.hxx>
#include <fchrfmt.hxx>
#include <fmtflcnt.hxx>
@@ -48,6 +55,7 @@
#include <frmfmt.hxx>
#include <ftnidx.hxx>
#include <doc.hxx> // SwDoc.GetNodes()
+#include <IDocumentUndoRedo.hxx>
#include <docary.hxx>
#include <ndtxt.hxx> // SwTxtNode
#include <paratr.hxx> //
@@ -55,15 +63,12 @@
#include <fldbas.hxx> // fuer Felder
#include <pam.hxx> // fuer SwPaM
#include <swtable.hxx>
-#include <rolbck.hxx>
#include <ndgrf.hxx> // SwGrfNode
-#include <undobj.hxx> // fuer UndoDelete
+#include <UndoCore.hxx>
#include <IMark.hxx> // fuer SwBookmark
#include <charfmt.hxx> // #i27615#
#include <comcore.hrc>
-#include <tools/resid.hxx>
#include <undo.hrc>
-#include <editeng/brkitem.hxx>
#include <bookmrk.hxx>
SV_IMPL_PTRARR( SwpHstry, SwHistoryHintPtr)
@@ -74,7 +79,7 @@ String SwHistoryHint::GetDescription() const
}
-SwHistorySetFmt::SwHistorySetFmt( const SfxPoolItem* pFmtHt, ULONG nNd )
+SwHistorySetFmt::SwHistorySetFmt( const SfxPoolItem* pFmtHt, sal_uLong nNd )
: SwHistoryHint( HSTRY_SETFMTHNT )
, m_pAttr( pFmtHt->Clone() )
, m_nNodeIndex( nNd )
@@ -118,7 +123,7 @@ String SwHistorySetFmt::GetDescription() const
{
String aResult ;
- USHORT nWhich = m_pAttr->Which();
+ sal_uInt16 nWhich = m_pAttr->Which();
switch (nWhich)
{
case RES_BREAK:
@@ -184,7 +189,7 @@ SwHistorySetFmt::~SwHistorySetFmt()
}
-SwHistoryResetFmt::SwHistoryResetFmt(const SfxPoolItem* pFmtHt, ULONG nNodeIdx)
+SwHistoryResetFmt::SwHistoryResetFmt(const SfxPoolItem* pFmtHt, sal_uLong nNodeIdx)
: SwHistoryHint( HSTRY_RESETFMTHNT )
, m_nNodeIndex( nNodeIdx )
, m_nWhich( pFmtHt->Which() )
@@ -207,7 +212,7 @@ void SwHistoryResetFmt::SetInDoc( SwDoc* pDoc, bool )
}
-SwHistorySetTxt::SwHistorySetTxt( SwTxtAttr* pTxtHt, ULONG nNodePos )
+SwHistorySetTxt::SwHistorySetTxt( SwTxtAttr* pTxtHt, sal_uLong nNodePos )
: SwHistoryHint( HSTRY_SETTXTHNT )
, m_nNodeIndex( nNodePos )
, m_nStart( *pTxtHt->GetStart() )
@@ -219,7 +224,7 @@ SwHistorySetTxt::SwHistorySetTxt( SwTxtAttr* pTxtHt, ULONG nNodePos )
// ein bisschen kompliziert, aber ist Ok so: erst vom default
// eine Kopie und dann die Werte aus dem Text Attribut zuweisen
- USHORT nWhich = pTxtHt->Which();
+ sal_uInt16 nWhich = pTxtHt->Which();
if ( RES_TXTATR_CHARFMT == nWhich )
{
m_pAttr.reset( new SwFmtCharFmt( pTxtHt->GetCharFmt().GetCharFmt() ) );
@@ -261,7 +266,7 @@ void SwHistorySetTxt::SetInDoc( SwDoc* pDoc, bool )
}
-SwHistorySetTxtFld::SwHistorySetTxtFld( SwTxtFld* pTxtFld, ULONG nNodePos )
+SwHistorySetTxtFld::SwHistorySetTxtFld( SwTxtFld* pTxtFld, sal_uLong nNodePos )
: SwHistoryHint( HSTRY_SETTXTFLDHNT )
, m_pFldType( 0 )
, m_pFld( new SwFmtFld( *pTxtFld->GetFld().GetFld() ) )
@@ -323,7 +328,7 @@ void SwHistorySetTxtFld::SetInDoc( SwDoc* pDoc, bool )
-SwHistorySetRefMark::SwHistorySetRefMark( SwTxtRefMark* pTxtHt, ULONG nNodePos )
+SwHistorySetRefMark::SwHistorySetRefMark( SwTxtRefMark* pTxtHt, sal_uLong nNodePos )
: SwHistoryHint( HSTRY_SETREFMARKHNT )
, m_RefName( pTxtHt->GetRefMark().GetRefName() )
, m_nNodeIndex( nNodePos )
@@ -352,7 +357,7 @@ void SwHistorySetRefMark::SetInDoc( SwDoc* pDoc, bool )
}
-SwHistorySetTOXMark::SwHistorySetTOXMark( SwTxtTOXMark* pTxtHt, ULONG nNodePos )
+SwHistorySetTOXMark::SwHistorySetTOXMark( SwTxtTOXMark* pTxtHt, sal_uLong nNodePos )
: SwHistoryHint( HSTRY_SETTOXMARKHNT )
, m_TOXMark( pTxtHt->GetTOXMark() )
, m_TOXName( m_TOXMark.GetTOXType()->GetTypeName() )
@@ -373,9 +378,9 @@ void SwHistorySetTOXMark::SetInDoc( SwDoc* pDoc, bool )
return;
// search for respective TOX type
- USHORT nCnt = pDoc->GetTOXTypeCount( m_eTOXTypes );
+ sal_uInt16 nCnt = pDoc->GetTOXTypeCount( m_eTOXTypes );
SwTOXType* pToxType = 0;
- for ( USHORT n = 0; n < nCnt; ++n )
+ for ( sal_uInt16 n = 0; n < nCnt; ++n )
{
pToxType = const_cast<SwTOXType*>(pDoc->GetTOXType( m_eTOXTypes, n ));
if ( pToxType->GetTypeName() == m_TOXName )
@@ -410,8 +415,8 @@ int SwHistorySetTOXMark::IsEqual( const SwTOXMark& rCmp ) const
}
-SwHistoryResetTxt::SwHistoryResetTxt( USHORT nWhich,
- xub_StrLen nAttrStart, xub_StrLen nAttrEnd, ULONG nNodePos )
+SwHistoryResetTxt::SwHistoryResetTxt( sal_uInt16 nWhich,
+ xub_StrLen nAttrStart, xub_StrLen nAttrEnd, sal_uLong nNodePos )
: SwHistoryHint( HSTRY_RESETTXTHNT )
, m_nNodeIndex( nNodePos ), m_nStart( nAttrStart ), m_nEnd( nAttrEnd )
, m_nAttr( nWhich )
@@ -430,7 +435,7 @@ void SwHistoryResetTxt::SetInDoc( SwDoc* pDoc, bool )
}
-SwHistorySetFootnote::SwHistorySetFootnote( SwTxtFtn* pTxtFtn, ULONG nNodePos )
+SwHistorySetFootnote::SwHistorySetFootnote( SwTxtFtn* pTxtFtn, sal_uLong nNodePos )
: SwHistoryHint( HSTRY_SETFTNHNT )
, m_pUndo( new SwUndoSaveSection )
, m_FootnoteNumber( pTxtFtn->GetFtn().GetNumStr() )
@@ -449,7 +454,7 @@ SwHistorySetFootnote::SwHistorySetFootnote( SwTxtFtn* pTxtFtn, ULONG nNodePos )
//Pointer auf StartNode der FtnSection merken und erstmal den Pointer im
//Attribut zuruecksetzen -> Damit werden automatisch die Frms vernichtet.
SwNodeIndex aSttIdx( *pTxtFtn->GetStartNode() );
- pTxtFtn->SetStartNode( 0, FALSE );
+ pTxtFtn->SetStartNode( 0, sal_False );
m_pUndo->SaveSection( pDoc, aSttIdx );
m_nNodeIndex = pSaveNd->GetIndex();
@@ -524,8 +529,8 @@ void SwHistorySetFootnote::SetInDoc( SwDoc* pDoc, bool )
}
-SwHistoryChangeFmtColl::SwHistoryChangeFmtColl( SwFmtColl* pFmtColl, ULONG nNd,
- BYTE nNodeWhich )
+SwHistoryChangeFmtColl::SwHistoryChangeFmtColl( SwFmtColl* pFmtColl, sal_uLong nNd,
+ sal_uInt8 nNodeWhich )
: SwHistoryHint( HSTRY_CHGFMTCOLL )
, m_pColl( pFmtColl )
, m_nNodeIndex( nNd )
@@ -564,7 +569,7 @@ SwHistoryTxtFlyCnt::SwHistoryTxtFlyCnt( SwFrmFmt* const pFlyFmt )
, m_pUndo( new SwUndoDelLayFmt( pFlyFmt ) )
{
OSL_ENSURE( pFlyFmt, "SwHistoryTxtFlyCnt: no Format" );
- m_pUndo->ChgShowSel( FALSE );
+ m_pUndo->ChgShowSel( sal_False );
}
@@ -575,9 +580,10 @@ SwHistoryTxtFlyCnt::~SwHistoryTxtFlyCnt()
void SwHistoryTxtFlyCnt::SetInDoc( SwDoc* pDoc, bool )
{
- SwPaM aPam( pDoc->GetNodes().GetEndOfPostIts() );
- SwUndoIter aUndoIter( &aPam );
- m_pUndo->Undo( aUndoIter );
+ ::sw::IShellCursorSupplier *const pISCS(pDoc->GetIShellCursorSupplier());
+ OSL_ASSERT(pISCS);
+ ::sw::UndoRedoContext context(*pDoc, *pISCS);
+ m_pUndo->UndoImpl(context);
}
@@ -621,8 +627,7 @@ SwHistoryBookmark::SwHistoryBookmark(
void SwHistoryBookmark::SetInDoc( SwDoc* pDoc, bool )
{
- bool bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo(false);
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
SwNodes& rNds = pDoc->GetNodes();
IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
@@ -693,7 +698,6 @@ void SwHistoryBookmark::SetInDoc( SwDoc* pDoc, bool )
}
}
}
- pDoc->DoUndo(bDoesUndo);
}
@@ -713,7 +717,7 @@ const ::rtl::OUString& SwHistoryBookmark::GetName() const
SwHistorySetAttrSet::SwHistorySetAttrSet( const SfxItemSet& rSet,
- ULONG nNodePos, const SvUShortsSort& rSetArr )
+ sal_uLong nNodePos, const SvUShortsSort& rSetArr )
: SwHistoryHint( HSTRY_SETATTRSET )
, m_OldSet( rSet )
, m_ResetArray( 0, 4 )
@@ -783,13 +787,12 @@ SwHistorySetAttrSet::SwHistorySetAttrSet( const SfxItemSet& rSet,
break;
pItem = aIter.NextItem();
pOrigItem = aOrigIter.NextItem();
- } while( TRUE );
+ } while( sal_True );
}
void SwHistorySetAttrSet::SetInDoc( SwDoc* pDoc, bool )
{
- BOOL bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
SwNode * pNode = pDoc->GetNodes()[ m_nNodeIndex ];
if ( pNode->IsCntntNode() )
@@ -810,25 +813,23 @@ void SwHistorySetAttrSet::SetInDoc( SwDoc* pDoc, bool )
rFmt.ResetFmtAttr( *m_ResetArray.GetData() );
}
}
-
- pDoc->DoUndo( bDoesUndo );
}
/*************************************************************************/
SwHistoryResetAttrSet::SwHistoryResetAttrSet( const SfxItemSet& rSet,
- ULONG nNodePos, xub_StrLen nAttrStt, xub_StrLen nAttrEnd )
+ sal_uLong nNodePos, xub_StrLen nAttrStt, xub_StrLen nAttrEnd )
: SwHistoryHint( HSTRY_RESETATTRSET )
, m_nNodeIndex( nNodePos ), m_nStart( nAttrStt ), m_nEnd( nAttrEnd )
- , m_Array( (BYTE)rSet.Count() )
+ , m_Array( (sal_uInt8)rSet.Count() )
{
SfxItemIter aIter( rSet );
bool bAutoStyle = false;
- while( TRUE )
+ while( sal_True )
{
- const USHORT nWhich = aIter.GetCurItem()->Which();
+ const sal_uInt16 nWhich = aIter.GetCurItem()->Which();
#ifndef PRODUCT
switch (nWhich)
@@ -874,19 +875,18 @@ SwHistoryResetAttrSet::SwHistoryResetAttrSet( const SfxItemSet& rSet,
void SwHistoryResetAttrSet::SetInDoc( SwDoc* pDoc, bool )
{
- BOOL bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
SwCntntNode * pCntntNd = pDoc->GetNodes()[ m_nNodeIndex ]->GetCntntNode();
OSL_ENSURE( pCntntNd, "SwHistoryResetAttrSet: no CntntNode" );
if (pCntntNd)
{
- const USHORT* pArr = m_Array.GetData();
+ const sal_uInt16* pArr = m_Array.GetData();
if ( USHRT_MAX == m_nEnd && USHRT_MAX == m_nStart )
{
// no area: use ContentNode
- for ( USHORT n = m_Array.Count(); n; --n, ++pArr )
+ for ( sal_uInt16 n = m_Array.Count(); n; --n, ++pArr )
{
pCntntNd->ResetAttr( *pArr );
}
@@ -894,15 +894,13 @@ void SwHistoryResetAttrSet::SetInDoc( SwDoc* pDoc, bool )
else
{
// area: use TextNode
- for ( USHORT n = m_Array.Count(); n; --n, ++pArr )
+ for ( sal_uInt16 n = m_Array.Count(); n; --n, ++pArr )
{
static_cast<SwTxtNode*>(pCntntNd)->
DeleteAttributes( *pArr, m_nStart, m_nEnd );
}
}
}
-
- pDoc->DoUndo( bDoesUndo );
}
@@ -922,10 +920,9 @@ SwHistoryChangeFlyAnchor::SwHistoryChangeFlyAnchor( SwFrmFmt& rFmt )
void SwHistoryChangeFlyAnchor::SetInDoc( SwDoc* pDoc, bool )
{
- BOOL bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
- USHORT nPos = pDoc->GetSpzFrmFmts()->GetPos( &m_rFmt );
+ sal_uInt16 nPos = pDoc->GetSpzFrmFmts()->GetPos( &m_rFmt );
if ( USHRT_MAX != nPos ) // Format does still exist
{
SwFmtAnchor aTmp( m_rFmt.GetAnchor() );
@@ -944,14 +941,13 @@ void SwHistoryChangeFlyAnchor::SetInDoc( SwDoc* pDoc, bool )
aTmp.SetAnchor( &aPos );
// so the Layout does not get confused
- if ( !pCNd || !pCNd->GetFrm( 0, 0, FALSE ) )
+ if ( !pCNd || !pCNd->GetFrm( 0, 0, sal_False ) )
{
m_rFmt.DelFrms();
}
m_rFmt.SetFmtAttr( aTmp );
}
- pDoc->DoUndo( bDoesUndo );
}
@@ -1021,8 +1017,8 @@ void SwHistoryChangeCharFmt::SetInDoc(SwDoc * pDoc, bool )
/* */
-SwHistory::SwHistory( USHORT nInitSz, USHORT nGrowSz )
- : m_SwpHstry( (BYTE)nInitSz, (BYTE)nGrowSz )
+SwHistory::SwHistory( sal_uInt16 nInitSz, sal_uInt16 nGrowSz )
+ : m_SwpHstry( (sal_uInt8)nInitSz, (sal_uInt8)nGrowSz )
, m_nEndDiff( 0 )
{}
@@ -1042,11 +1038,11 @@ SwHistory::~SwHistory()
*************************************************************************/
void SwHistory::Add( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue,
- ULONG nNodeIdx )
+ sal_uLong nNodeIdx )
{
OSL_ENSURE( !m_nEndDiff, "History was not deleted after REDO" );
- USHORT nWhich = pNewValue->Which();
+ sal_uInt16 nWhich = pNewValue->Which();
if( (nWhich >= POOLATTR_END) || (nWhich == RES_TXTATR_FIELD) )
return;
@@ -1064,12 +1060,12 @@ void SwHistory::Add( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue,
}
-void SwHistory::Add( SwTxtAttr* pHint, ULONG nNodeIdx, bool bNewAttr )
+void SwHistory::Add( SwTxtAttr* pHint, sal_uLong nNodeIdx, bool bNewAttr )
{
OSL_ENSURE( !m_nEndDiff, "History was not deleted after REDO" );
SwHistoryHint * pHt;
- USHORT nAttrWhich = pHint->Which();
+ sal_uInt16 nAttrWhich = pHint->Which();
if( !bNewAttr )
{
@@ -1109,7 +1105,7 @@ void SwHistory::Add( SwTxtAttr* pHint, ULONG nNodeIdx, bool bNewAttr )
}
-void SwHistory::Add( SwFmtColl* pColl, ULONG nNodeIdx, BYTE nWhichNd )
+void SwHistory::Add( SwFmtColl* pColl, sal_uLong nNodeIdx, sal_uInt8 nWhichNd )
{
OSL_ENSURE( !m_nEndDiff, "History was not deleted after REDO" );
@@ -1134,19 +1130,19 @@ void SwHistory::Add( SwFrmFmt& rFmt )
m_SwpHstry.Insert( pHt, Count() );
}
-void SwHistory::Add( SwFlyFrmFmt& rFmt, USHORT& rSetPos )
+void SwHistory::Add( SwFlyFrmFmt& rFmt, sal_uInt16& rSetPos )
{
OSL_ENSURE( !m_nEndDiff, "History was not deleted after REDO" );
SwHistoryHint * pHint;
- const USHORT nWh = rFmt.Which();
+ const sal_uInt16 nWh = rFmt.Which();
if( RES_FLYFRMFMT == nWh || RES_DRAWFRMFMT == nWh )
{
pHint = new SwHistoryTxtFlyCnt( &rFmt );
m_SwpHstry.Insert( pHint, Count() );
const SwFmtChain* pChainItem;
- if( SFX_ITEM_SET == rFmt.GetItemState( RES_CHAIN, FALSE,
+ if( SFX_ITEM_SET == rFmt.GetItemState( RES_CHAIN, sal_False,
(const SfxPoolItem**)&pChainItem ))
{
if( pChainItem->GetNext() || pChainItem->GetPrev() )
@@ -1187,20 +1183,20 @@ void SwHistory::Add(const SfxItemSet & rSet, const SwCharFmt & rFmt)
/*************************************************************************
|*
-|* BOOL SwHistory::Rollback()
+|* sal_Bool SwHistory::Rollback()
|*
|* Beschreibung Dokument 1.0
|*
*************************************************************************/
-bool SwHistory::Rollback( SwDoc* pDoc, USHORT nStart )
+bool SwHistory::Rollback( SwDoc* pDoc, sal_uInt16 nStart )
{
if ( !Count() )
return false;
SwHistoryHint * pHHt;
- USHORT i;
+ sal_uInt16 i;
for ( i = Count(); i > nStart ; )
{
pHHt = m_SwpHstry[ --i ];
@@ -1214,9 +1210,9 @@ bool SwHistory::Rollback( SwDoc* pDoc, USHORT nStart )
-bool SwHistory::TmpRollback( SwDoc* pDoc, USHORT nStart, bool bToFirst )
+bool SwHistory::TmpRollback( SwDoc* pDoc, sal_uInt16 nStart, bool bToFirst )
{
- USHORT nEnd = Count() - m_nEndDiff;
+ sal_uInt16 nEnd = Count() - m_nEndDiff;
if ( !Count() || !nEnd || nStart >= nEnd )
return false;
@@ -1241,9 +1237,9 @@ bool SwHistory::TmpRollback( SwDoc* pDoc, USHORT nStart, bool bToFirst )
}
-void SwHistory::Delete( USHORT nStart )
+void SwHistory::Delete( sal_uInt16 nStart )
{
- for ( USHORT n = Count(); n > nStart; )
+ for ( sal_uInt16 n = Count(); n > nStart; )
{
m_SwpHstry.DeleteAndDestroy( --n, 1 );
}
@@ -1251,28 +1247,28 @@ void SwHistory::Delete( USHORT nStart )
}
-USHORT SwHistory::SetTmpEnd( USHORT nNewTmpEnd )
+sal_uInt16 SwHistory::SetTmpEnd( sal_uInt16 nNewTmpEnd )
{
OSL_ENSURE( nNewTmpEnd <= Count(), "SwHistory::SetTmpEnd: out of bounds" );
- USHORT nOld = Count() - m_nEndDiff;
+ sal_uInt16 nOld = Count() - m_nEndDiff;
m_nEndDiff = Count() - nNewTmpEnd;
// for every SwHistoryFlyCnt, call the Redo of its UndoObject.
// this saves the formats of the flys!
- for ( USHORT n = nOld; n < nNewTmpEnd; n++ )
+ for ( sal_uInt16 n = nOld; n < nNewTmpEnd; n++ )
{
if ( HSTRY_FLYCNT == (*this)[ n ]->Which() )
{
static_cast<SwHistoryTxtFlyCnt*>((*this)[ n ])
- ->GetUDelLFmt()->Redo();
+ ->GetUDelLFmt()->RedoForRollback();
}
}
return nOld;
}
-void SwHistory::CopyFmtAttr( const SfxItemSet& rSet, ULONG nNodeIdx )
+void SwHistory::CopyFmtAttr( const SfxItemSet& rSet, sal_uLong nNodeIdx )
{
if( rSet.Count() )
{
@@ -1286,11 +1282,11 @@ void SwHistory::CopyFmtAttr( const SfxItemSet& rSet, ULONG nNodeIdx )
if( aIter.IsAtEnd() )
break;
aIter.NextItem();
- } while( TRUE );
+ } while( sal_True );
}
}
-void SwHistory::CopyAttr( SwpHints* pHts, ULONG nNodeIdx,
+void SwHistory::CopyAttr( SwpHints* pHts, sal_uLong nNodeIdx,
xub_StrLen nStart, xub_StrLen nEnd, bool bFields )
{
if( !pHts )
@@ -1300,7 +1296,7 @@ void SwHistory::CopyAttr( SwpHints* pHts, ULONG nNodeIdx,
SwTxtAttr* pHt;
xub_StrLen nAttrStt;
const xub_StrLen * pEndIdx;
- for( USHORT n = 0; n < pHts->Count(); n++ )
+ for( sal_uInt16 n = 0; n < pHts->Count(); n++ )
{
// BP: nAttrStt muss auch bei !pEndIdx gesetzt werden
pHt = pHts->GetTextHint(n);
@@ -1311,17 +1307,17 @@ void SwHistory::CopyAttr( SwpHints* pHts, ULONG nNodeIdx,
break;
// Flys und Ftn nie kopieren !!
- BOOL bNextAttr = FALSE;
+ sal_Bool bNextAttr = sal_False;
switch( pHt->Which() )
{
case RES_TXTATR_FIELD:
// keine Felder, .. kopieren ??
if( !bFields )
- bNextAttr = TRUE;
+ bNextAttr = sal_True;
break;
case RES_TXTATR_FLYCNT:
case RES_TXTATR_FTN:
- bNextAttr = TRUE;
+ bNextAttr = sal_True;
break;
}
@@ -1378,7 +1374,13 @@ SwRegHistory::SwRegHistory( const SwNode& rNd, SwHistory* pHst )
void SwRegHistory::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
- if ( m_pHistory && ( pOld || pNew ) )
+ // --> OD 2010-10-05 #i114861#
+ // Do not handle a "noop" modify
+ // - e.g. <SwTxtNode::NumRuleChgd()> uses such a "noop" modify
+// if ( m_pHistory && ( pOld || pNew ) )
+ if ( m_pHistory && ( pOld || pNew ) &&
+ pOld != pNew )
+ // <--
{
if ( pNew->Which() < POOLATTR_END )
{
@@ -1499,8 +1501,8 @@ void SwRegHistory::_MakeSetWhichIds()
if( pSet && pSet->Count() )
{
SfxItemIter aIter( *pSet );
- USHORT nW = aIter.FirstItem()->Which();
- while( TRUE )
+ sal_uInt16 nW = aIter.FirstItem()->Which();
+ while( sal_True )
{
m_WhichIdSet.Insert( nW );
if( aIter.IsAtEnd() )
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index f943fb2fb983..14a3d1e776cc 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -29,16 +29,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#define _SVSTDARR_USHORTS
#define _SVSTDARR_USHORTSSORT
-#include <hintids.hxx>
-#include <svx/svdmodel.hxx>
-#include <editeng/tstpitem.hxx>
-#include <svx/svdpage.hxx>
+#include <UndoAttribute.hxx>
+
#include <svl/itemiter.hxx>
+#include <editeng/tstpitem.hxx>
+#include <svx/svdmodel.hxx>
+#include <svx/svdpage.hxx>
+
+#include <hintids.hxx>
#include <fmtflcnt.hxx>
#include <txtftn.hxx>
#include <fmtornt.hxx>
@@ -48,13 +50,16 @@
#include <fmtcntnt.hxx>
#include <ftnidx.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
+#include <IShellCursorSupplier.hxx>
#include <docary.hxx>
#include <swundo.hxx> // fuer die UndoIds
#include <pam.hxx>
#include <ndtxt.hxx>
#include <swtable.hxx>
#include <swtblfmt.hxx>
-#include <undobj.hxx>
+#include <UndoCore.hxx>
+#include <hints.hxx>
#include <rolbck.hxx>
#include <ndnotxt.hxx>
#include <dcontact.hxx>
@@ -65,9 +70,6 @@
-inline SwDoc& SwUndoIter::GetDoc() const
-{ return *pAktPam->GetDoc(); }
-
// -----------------------------------------------------
SwUndoFmtAttrHelper::SwUndoFmtAttrHelper( SwFmt& rFmt, bool bSvDrwPt )
@@ -143,7 +145,7 @@ SwUndoFmtAttr::SwUndoFmtAttr( const SfxPoolItem& rItem, SwFmt& rChgFmt,
bool bSaveDrawPt )
: SwUndo( UNDO_INSFMTATTR )
, m_pFmt( &rChgFmt )
- , m_pOldSet( m_pFmt->GetAttrSet().Clone( FALSE ) )
+ , m_pOldSet( m_pFmt->GetAttrSet().Clone( sal_False ) )
, m_nNodeIndex( 0 )
, m_nFmtWhich( rChgFmt.Which() )
, m_bSaveDrawPt( bSaveDrawPt )
@@ -155,7 +157,7 @@ SwUndoFmtAttr::SwUndoFmtAttr( const SfxPoolItem& rItem, SwFmt& rChgFmt,
void SwUndoFmtAttr::Init()
{
// treat change of anchor specially
- if ( SFX_ITEM_SET == m_pOldSet->GetItemState( RES_ANCHOR, FALSE ))
+ if ( SFX_ITEM_SET == m_pOldSet->GetItemState( RES_ANCHOR, sal_False ))
{
SaveFlyAnchor( m_bSaveDrawPt );
}
@@ -195,21 +197,21 @@ SwUndoFmtAttr::~SwUndoFmtAttr()
{
}
-void SwUndoFmtAttr::Undo( SwUndoIter& rUndoIter)
+void SwUndoFmtAttr::UndoImpl(::sw::UndoRedoContext & rContext)
{
// OD 2004-10-26 #i35443#
// Important note: <Undo(..)> also called by <ReDo(..)>
- if ( !m_pOldSet.get() || !m_pFmt || !IsFmtInDoc( &rUndoIter.GetDoc() ))
+ if ( !m_pOldSet.get() || !m_pFmt || !IsFmtInDoc( &rContext.GetDoc() ))
return;
// --> OD 2004-10-26 #i35443# - If anchor attribute has been successfull
// restored, all other attributes are also restored.
// Thus, keep track of its restoration
bool bAnchorAttrRestored( false );
- if ( SFX_ITEM_SET == m_pOldSet->GetItemState( RES_ANCHOR, FALSE ))
+ if ( SFX_ITEM_SET == m_pOldSet->GetItemState( RES_ANCHOR, sal_False ))
{
- bAnchorAttrRestored = RestoreFlyAnchor( rUndoIter );
+ bAnchorAttrRestored = RestoreFlyAnchor(rContext);
if ( bAnchorAttrRestored )
{
// Anchor attribute successfull restored.
@@ -241,7 +243,7 @@ void SwUndoFmtAttr::Undo( SwUndoIter& rUndoIter)
if ( RES_FLYFRMFMT == m_nFmtWhich || RES_DRAWFRMFMT == m_nFmtWhich )
{
- rUndoIter.pSelFmt = static_cast<SwFrmFmt*>(m_pFmt);
+ rContext.SetSelections(static_cast<SwFrmFmt*>(m_pFmt), 0);
}
}
}
@@ -250,7 +252,7 @@ bool SwUndoFmtAttr::IsFmtInDoc( SwDoc* pDoc )
{
// search for the Format in the Document; if it does not exist any more,
// the attribute is not restored!
- USHORT nPos = USHRT_MAX;
+ sal_uInt16 nPos = USHRT_MAX;
switch ( m_nFmtWhich )
{
case RES_TXTFMTCOLL:
@@ -331,49 +333,41 @@ SwFmt* SwUndoFmtAttr::GetFmt( SwDoc& rDoc )
return m_pFmt && IsFmtInDoc( &rDoc ) ? m_pFmt : 0;
}
-void SwUndoFmtAttr::Redo( SwUndoIter& rUndoIter)
+void SwUndoFmtAttr::RedoImpl(::sw::UndoRedoContext & rContext)
{
// --> OD 2004-10-26 #i35443# - Because the undo stores the attributes for
// redo, the same code as for <Undo(..)> can be applied for <Redo(..)>
- Undo( rUndoIter );
+ UndoImpl(rContext);
// <--
}
-void SwUndoFmtAttr::Repeat( SwUndoIter& rUndoIter)
+void SwUndoFmtAttr::RepeatImpl(::sw::RepeatContext & rContext)
{
if ( !m_pOldSet.get() )
return;
- if ( UNDO_INSFMTATTR == rUndoIter.GetLastUndoId())
- {
- SwUndoFmtAttr* pLast
- = static_cast<SwUndoFmtAttr*>(rUndoIter.pLastUndoObj);
- if (pLast->m_pOldSet.get() && pLast->m_pFmt)
- {
- return;
- }
- }
+ SwDoc & rDoc(rContext.GetDoc());
switch ( m_nFmtWhich )
{
case RES_GRFFMTCOLL:
{
- SwNoTxtNode * pNd = rUndoIter.pAktPam->GetNode()->GetNoTxtNode();
+ SwNoTxtNode *const pNd =
+ rContext.GetRepeatPaM().GetNode()->GetNoTxtNode();
if( pNd )
{
- rUndoIter.GetDoc().SetAttr( m_pFmt->GetAttrSet(),
- *pNd->GetFmtColl() );
+ rDoc.SetAttr( m_pFmt->GetAttrSet(), *pNd->GetFmtColl() );
}
}
break;
case RES_TXTFMTCOLL:
{
- SwTxtNode * pNd = rUndoIter.pAktPam->GetNode()->GetTxtNode();
+ SwTxtNode *const pNd =
+ rContext.GetRepeatPaM().GetNode()->GetTxtNode();
if( pNd )
{
- rUndoIter.GetDoc().SetAttr( m_pFmt->GetAttrSet(),
- *pNd->GetFmtColl() );
+ rDoc.SetAttr( m_pFmt->GetAttrSet(), *pNd->GetFmtColl() );
}
}
break;
@@ -387,7 +381,8 @@ void SwUndoFmtAttr::Repeat( SwUndoIter& rUndoIter)
// Rahmen steht. Der Weg ist: suche in allen FlyFrmFormaten
// nach dem FlyCntnt-Attribut und teste ob der Cursor in der
// entsprechenden Section liegt.
- SwFrmFmt* pFly = rUndoIter.pAktPam->GetNode()->GetFlyFmt();
+ SwFrmFmt *const pFly =
+ rContext.GetRepeatPaM().GetNode()->GetFlyFmt();
if( pFly )
{
// Bug 43672: es duerfen nicht alle Attribute gesetzt werden!
@@ -397,18 +392,18 @@ void SwUndoFmtAttr::Repeat( SwUndoIter& rUndoIter)
SfxItemSet aTmpSet( m_pFmt->GetAttrSet() );
aTmpSet.ClearItem( RES_CNTNT );
if( aTmpSet.Count() )
- rUndoIter.GetDoc().SetAttr( aTmpSet, *pFly );
+ {
+ rDoc.SetAttr( aTmpSet, *pFly );
+ }
}
else
{
- rUndoIter.GetDoc().SetAttr( m_pFmt->GetAttrSet(), *pFly );
+ rDoc.SetAttr( m_pFmt->GetAttrSet(), *pFly );
}
}
break;
}
}
-
- rUndoIter.pLastUndoObj = this;
}
SwRewriter SwUndoFmtAttr::GetRewriter() const
@@ -452,7 +447,7 @@ void SwUndoFmtAttr::SaveFlyAnchor( bool bSvDrwPt )
*/ }
const SwFmtAnchor& rAnchor =
- static_cast<const SwFmtAnchor&>( m_pOldSet->Get( RES_ANCHOR, FALSE ) );
+ static_cast<const SwFmtAnchor&>( m_pOldSet->Get( RES_ANCHOR, sal_False ) );
if( !rAnchor.GetCntntAnchor() )
return;
@@ -478,12 +473,12 @@ void SwUndoFmtAttr::SaveFlyAnchor( bool bSvDrwPt )
// Return value indicates, if anchor attribute is restored.
// Note: If anchor attribute is restored, all other existing attributes
// are also restored.
-bool SwUndoFmtAttr::RestoreFlyAnchor( SwUndoIter& rIter )
+bool SwUndoFmtAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext)
{
- SwDoc* pDoc = &rIter.GetDoc();
+ SwDoc *const pDoc = & rContext.GetDoc();
SwFlyFrmFmt* pFrmFmt = static_cast<SwFlyFrmFmt*>(m_pFmt);
const SwFmtAnchor& rAnchor =
- static_cast<const SwFmtAnchor&>( m_pOldSet->Get( RES_ANCHOR, FALSE ) );
+ static_cast<const SwFmtAnchor&>( m_pOldSet->Get( RES_ANCHOR, sal_False ) );
SwFmtAnchor aNewAnchor( rAnchor.GetAnchorId() );
if (FLY_AT_PAGE != rAnchor.GetAnchorId())
@@ -623,7 +618,7 @@ bool SwUndoFmtAttr::RestoreFlyAnchor( SwUndoIter& rIter )
if( RES_DRAWFRMFMT != pFrmFmt->Which() )
pFrmFmt->MakeFrms();
- rIter.pSelFmt = pFrmFmt;
+ rContext.SetSelections(pFrmFmt, 0);
// --> OD 2004-10-26 #i35443# - anchor attribute restored.
return true;
@@ -632,14 +627,14 @@ bool SwUndoFmtAttr::RestoreFlyAnchor( SwUndoIter& rIter )
// -----------------------------------------------------
SwUndoFmtResetAttr::SwUndoFmtResetAttr( SwFmt& rChangedFormat,
- const USHORT nWhichId )
+ const sal_uInt16 nWhichId )
: SwUndo( UNDO_RESETATTR )
, m_pChangedFormat( &rChangedFormat )
, m_nWhichId( nWhichId )
, m_pOldItem( 0 )
{
const SfxPoolItem* pItem = 0;
- if (rChangedFormat.GetItemState( nWhichId, FALSE, &pItem ) == SFX_ITEM_SET)
+ if (rChangedFormat.GetItemState( nWhichId, sal_False, &pItem ) == SFX_ITEM_SET)
{
m_pOldItem.reset( pItem->Clone() );
}
@@ -649,7 +644,7 @@ SwUndoFmtResetAttr::~SwUndoFmtResetAttr()
{
}
-void SwUndoFmtResetAttr::Undo( SwUndoIter& )
+void SwUndoFmtResetAttr::UndoImpl(::sw::UndoRedoContext &)
{
if ( m_pOldItem.get() )
{
@@ -657,7 +652,7 @@ void SwUndoFmtResetAttr::Undo( SwUndoIter& )
}
}
-void SwUndoFmtResetAttr::Redo( SwUndoIter& )
+void SwUndoFmtResetAttr::RedoImpl(::sw::UndoRedoContext &)
{
if ( m_pOldItem.get() )
{
@@ -668,14 +663,14 @@ void SwUndoFmtResetAttr::Redo( SwUndoIter& )
// -----------------------------------------------------
-SwUndoResetAttr::SwUndoResetAttr( const SwPaM& rRange, USHORT nFmtId )
+SwUndoResetAttr::SwUndoResetAttr( const SwPaM& rRange, sal_uInt16 nFmtId )
: SwUndo( UNDO_RESETATTR ), SwUndRng( rRange )
, m_pHistory( new SwHistory )
, m_nFormatId( nFmtId )
{
}
-SwUndoResetAttr::SwUndoResetAttr( const SwPosition& rPos, USHORT nFmtId )
+SwUndoResetAttr::SwUndoResetAttr( const SwPosition& rPos, sal_uInt16 nFmtId )
: SwUndo( UNDO_RESETATTR )
, m_pHistory( new SwHistory )
, m_nFormatId( nFmtId )
@@ -688,10 +683,10 @@ SwUndoResetAttr::~SwUndoResetAttr()
{
}
-void SwUndoResetAttr::Undo( SwUndoIter& rUndoIter )
+void SwUndoResetAttr::UndoImpl(::sw::UndoRedoContext & rContext)
{
// reset old values
- SwDoc& rDoc = rUndoIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
m_pHistory->TmpRollback( &rDoc, 0 );
m_pHistory->SetTmpEnd( m_pHistory->Count() );
@@ -702,32 +697,29 @@ void SwUndoResetAttr::Undo( SwUndoIter& rUndoIter )
if( pTNd )
{
SwIndex aIdx( pTNd, nSttCntnt );
- pTNd->DontExpandFmt( aIdx, FALSE );
+ pTNd->DontExpandFmt( aIdx, sal_False );
}
}
- // setze noch den Cursor auf den Undo-Bereich
- SetPaM( rUndoIter );
+ AddUndoRedoPaM(rContext);
}
-void SwUndoResetAttr::Redo( SwUndoIter& rUndoIter )
+void SwUndoResetAttr::RedoImpl(::sw::UndoRedoContext & rContext)
{
- // setze Attribut in dem Bereich:
- SetPaM( rUndoIter );
- SwDoc& rDoc = rUndoIter.GetDoc();
- rUndoIter.pLastUndoObj = 0;
+ SwDoc & rDoc = rContext.GetDoc();
+ SwPaM & rPam = AddUndoRedoPaM(rContext);
SvUShortsSort* pIdArr = m_Ids.Count() ? &m_Ids : 0;
switch ( m_nFormatId )
{
case RES_CHRFMT:
- rUndoIter.GetDoc().RstTxtAttrs( *rUndoIter.pAktPam );
+ rDoc.RstTxtAttrs(rPam);
break;
case RES_TXTFMTCOLL:
- rUndoIter.GetDoc().ResetAttrs( *rUndoIter.pAktPam, FALSE, pIdArr );
+ rDoc.ResetAttrs(rPam, sal_False, pIdArr );
break;
case RES_CONDTXTFMTCOLL:
- rUndoIter.GetDoc().ResetAttrs( *rUndoIter.pAktPam, TRUE, pIdArr );
+ rDoc.ResetAttrs(rPam, sal_True, pIdArr );
break;
case RES_TXTATR_TOXMARK:
@@ -738,7 +730,7 @@ void SwUndoResetAttr::Redo( SwUndoIter& rUndoIter )
SwPosition aPos( aIdx, SwIndex( aIdx.GetNode().GetCntntNode(),
nSttCntnt ));
- USHORT nCnt = rDoc.GetCurTOXMark( aPos, aArr );
+ sal_uInt16 nCnt = rDoc.GetCurTOXMark( aPos, aArr );
if( nCnt )
{
if( 1 < nCnt )
@@ -769,15 +761,11 @@ void SwUndoResetAttr::Redo( SwUndoIter& rUndoIter )
}
break;
}
- rUndoIter.pLastUndoObj = 0;
}
-void SwUndoResetAttr::Repeat( SwUndoIter& rUndoIter )
+void SwUndoResetAttr::RepeatImpl(::sw::RepeatContext & rContext)
{
- if ( (RES_FMT_BEGIN > m_nFormatId) ||
- ( (UNDO_RESETATTR == rUndoIter.GetLastUndoId()) &&
- (m_nFormatId == static_cast<SwUndoResetAttr*>(rUndoIter.pLastUndoObj)
- ->m_nFormatId) ) )
+ if (m_nFormatId < RES_FMT_BEGIN)
{
return;
}
@@ -786,16 +774,15 @@ void SwUndoResetAttr::Repeat( SwUndoIter& rUndoIter )
switch ( m_nFormatId )
{
case RES_CHRFMT:
- rUndoIter.GetDoc().RstTxtAttrs( *rUndoIter.pAktPam );
+ rContext.GetDoc().RstTxtAttrs(rContext.GetRepeatPaM());
break;
case RES_TXTFMTCOLL:
- rUndoIter.GetDoc().ResetAttrs( *rUndoIter.pAktPam, FALSE, pIdArr );
+ rContext.GetDoc().ResetAttrs(rContext.GetRepeatPaM(), false, pIdArr);
break;
case RES_CONDTXTFMTCOLL:
- rUndoIter.GetDoc().ResetAttrs( *rUndoIter.pAktPam, TRUE, pIdArr );
+ rContext.GetDoc().ResetAttrs(rContext.GetRepeatPaM(), true, pIdArr);
break;
}
- rUndoIter.pLastUndoObj = this;
}
@@ -840,7 +827,7 @@ SwUndoAttr::~SwUndoAttr()
{
}
-void SwUndoAttr::SaveRedlineData( const SwPaM& rPam, BOOL bIsCntnt )
+void SwUndoAttr::SaveRedlineData( const SwPaM& rPam, sal_Bool bIsCntnt )
{
SwDoc* pDoc = rPam.GetDoc();
if ( pDoc->IsRedlineOn() )
@@ -864,29 +851,29 @@ void SwUndoAttr::SaveRedlineData( const SwPaM& rPam, BOOL bIsCntnt )
}
}
-void SwUndoAttr::Undo( SwUndoIter& rUndoIter )
+void SwUndoAttr::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc* pDoc = &rUndoIter.GetDoc();
+ SwDoc *const pDoc = & rContext.GetDoc();
RemoveIdx( *pDoc );
if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ) )
{
- SwPaM& rPam = *rUndoIter.pAktPam;
+ SwPaM aPam(pDoc->GetNodes().GetEndOfContent());
if ( ULONG_MAX != m_nNodeIndex )
{
- rPam.DeleteMark();
- rPam.GetPoint()->nNode = m_nNodeIndex;
- rPam.GetPoint()->nContent.Assign( rPam.GetCntntNode(), nSttCntnt );
- rPam.SetMark();
- rPam.GetPoint()->nContent++;
- pDoc->DeleteRedline( rPam, false, USHRT_MAX );
+ aPam.DeleteMark();
+ aPam.GetPoint()->nNode = m_nNodeIndex;
+ aPam.GetPoint()->nContent.Assign( aPam.GetCntntNode(), nSttCntnt );
+ aPam.SetMark();
+ aPam.GetPoint()->nContent++;
+ pDoc->DeleteRedline(aPam, false, USHRT_MAX);
}
else
{
// alle Format-Redlines entfernen, werden ggfs. neu gesetzt
- SetPaM( rUndoIter );
- pDoc->DeleteRedline( rPam, false, nsRedlineType_t::REDLINE_FORMAT );
+ SetPaM(aPam);
+ pDoc->DeleteRedline(aPam, false, nsRedlineType_t::REDLINE_FORMAT);
if ( m_pRedlineSaveData.get() )
{
SetSaveData( *pDoc, *m_pRedlineSaveData );
@@ -903,67 +890,30 @@ void SwUndoAttr::Undo( SwUndoIter& rUndoIter )
m_pHistory->SetTmpEnd( m_pHistory->Count() );
// set cursor onto Undo area
- SetPaM( rUndoIter );
+ AddUndoRedoPaM(rContext);
}
-int lcl_HasEqualItems( const SfxItemSet& rSet1, const SfxItemSet& rSet2 )
+void SwUndoAttr::RepeatImpl(::sw::RepeatContext & rContext)
{
- int nRet = -1;
- SfxItemIter aIter1( rSet1 ), aIter2( rSet2 );
- const SfxPoolItem *pI1 = aIter1.FirstItem(), *pI2 = aIter2.FirstItem();
-
- while( pI1 && pI2 )
- {
- if( pI1->Which() != pI2->Which() ||
- aIter1.IsAtEnd() != aIter2.IsAtEnd() )
- {
- nRet = 0;
- break;
- }
- if( aIter1.IsAtEnd() )
- break;
- pI1 = aIter1.NextItem();
- pI2 = aIter2.NextItem();
- }
- return nRet;
-}
-
-void SwUndoAttr::Repeat( SwUndoIter& rUndoIter )
-{
- if ( UNDO_INSATTR == rUndoIter.GetLastUndoId() )
- {
- SwUndoAttr* pLast = static_cast<SwUndoAttr*>(rUndoIter.pLastUndoObj);
- if ((pLast->m_AttrSet.Count() == m_AttrSet.Count()) &&
- (pLast->m_nInsertFlags == m_nInsertFlags ) &&
- lcl_HasEqualItems( m_AttrSet, pLast->m_AttrSet ))
- {
- return;
- }
- }
-
-
// RefMarks are not repeat capable
- if ( SFX_ITEM_SET != m_AttrSet.GetItemState( RES_TXTATR_REFMARK, FALSE ) )
+ if ( SFX_ITEM_SET != m_AttrSet.GetItemState( RES_TXTATR_REFMARK, sal_False ) )
{
- rUndoIter.GetDoc().InsertItemSet( *rUndoIter.pAktPam,
+ rContext.GetDoc().InsertItemSet( rContext.GetRepeatPaM(),
m_AttrSet, m_nInsertFlags );
}
else if ( 1 < m_AttrSet.Count() )
{
SfxItemSet aTmpSet( m_AttrSet );
aTmpSet.ClearItem( RES_TXTATR_REFMARK );
- rUndoIter.GetDoc().InsertItemSet( *rUndoIter.pAktPam,
+ rContext.GetDoc().InsertItemSet( rContext.GetRepeatPaM(),
aTmpSet, m_nInsertFlags );
}
- rUndoIter.pLastUndoObj = this;
}
-void SwUndoAttr::Redo( SwUndoIter& rUndoIter )
+void SwUndoAttr::RedoImpl(::sw::UndoRedoContext & rContext)
{
- // setze Attribut in dem Bereich:
- SetPaM( rUndoIter );
- SwPaM& rPam = *rUndoIter.pAktPam;
- SwDoc& rDoc = rUndoIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
+ SwPaM & rPam = AddUndoRedoPaM(rContext);
if ( m_pRedlineData.get() &&
IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ) )
@@ -994,22 +944,20 @@ void SwUndoAttr::Redo( SwUndoIter& rUndoIter )
{
rDoc.InsertItemSet( rPam, m_AttrSet, m_nInsertFlags );
}
-
- rUndoIter.pLastUndoObj = 0;
}
void SwUndoAttr::RemoveIdx( SwDoc& rDoc )
{
- if ( SFX_ITEM_SET != m_AttrSet.GetItemState( RES_TXTATR_FTN, FALSE ))
+ if ( SFX_ITEM_SET != m_AttrSet.GetItemState( RES_TXTATR_FTN, sal_False ))
return ;
SwHistoryHint* pHstHnt;
SwNodes& rNds = rDoc.GetNodes();
- for ( USHORT n = 0; n < m_pHistory->Count(); ++n )
+ for ( sal_uInt16 n = 0; n < m_pHistory->Count(); ++n )
{
xub_StrLen nCntnt = 0;
- ULONG nNode = 0;
+ sal_uLong nNode = 0;
pHstHnt = (*m_pHistory)[ n ];
switch ( pHstHnt->Which() )
{
@@ -1033,7 +981,7 @@ void SwUndoAttr::RemoveIdx( SwDoc& rDoc )
if ( STRING_MAXLEN != nCntnt )
{
const SvUShorts& rArr = pHistoryHint->GetArr();
- for ( USHORT i = rArr.Count(); i; )
+ for ( sal_uInt16 i = rArr.Count(); i; )
{
if ( RES_TXTATR_FTN == rArr[ --i ] )
{
@@ -1076,7 +1024,7 @@ SwUndoDefaultAttr::SwUndoDefaultAttr( const SfxItemSet& rSet )
, m_pTabStop( 0 )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_TABSTOP, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_TABSTOP, sal_False, &pItem ) )
{
// store separately, because it may change!
m_pTabStop.reset( static_cast<SvxTabStopItem*>(pItem->Clone()) );
@@ -1095,9 +1043,9 @@ SwUndoDefaultAttr::~SwUndoDefaultAttr()
{
}
-void SwUndoDefaultAttr::Undo( SwUndoIter& rUndoIter)
+void SwUndoDefaultAttr::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
if ( m_pOldSet.get() )
{
SwUndoFmtAttrHelper aTmp(
@@ -1119,15 +1067,15 @@ void SwUndoDefaultAttr::Undo( SwUndoIter& rUndoIter)
}
}
-void SwUndoDefaultAttr::Redo( SwUndoIter& rUndoIter)
+void SwUndoDefaultAttr::RedoImpl(::sw::UndoRedoContext & rContext)
{
- Undo( rUndoIter );
+ UndoImpl(rContext);
}
// -----------------------------------------------------
SwUndoMoveLeftMargin::SwUndoMoveLeftMargin(
- const SwPaM& rPam, BOOL bFlag, BOOL bMod )
+ const SwPaM& rPam, sal_Bool bFlag, sal_Bool bMod )
: SwUndo( bFlag ? UNDO_INC_LEFTMARGIN : UNDO_DEC_LEFTMARGIN )
, SwUndRng( rPam )
, m_pHistory( new SwHistory )
@@ -1139,41 +1087,38 @@ SwUndoMoveLeftMargin::~SwUndoMoveLeftMargin()
{
}
-void SwUndoMoveLeftMargin::Undo( SwUndoIter& rIter )
+void SwUndoMoveLeftMargin::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc* pDoc = &rIter.GetDoc();
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ SwDoc & rDoc = rContext.GetDoc();
// restore old values
- m_pHistory->TmpRollback( pDoc, 0 );
+ m_pHistory->TmpRollback( & rDoc, 0 );
m_pHistory->SetTmpEnd( m_pHistory->Count() );
- pDoc->DoUndo( bUndo );
- SetPaM( rIter );
+ AddUndoRedoPaM(rContext);
}
-void SwUndoMoveLeftMargin::Redo( SwUndoIter& rIter )
+void SwUndoMoveLeftMargin::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc* pDoc = &rIter.GetDoc();
- SetPaM( rIter );
- pDoc->MoveLeftMargin( *rIter.pAktPam, GetId() == UNDO_INC_LEFTMARGIN,
- m_bModulus );
+ SwDoc & rDoc = rContext.GetDoc();
+ SwPaM & rPam = AddUndoRedoPaM(rContext);
+
+ rDoc.MoveLeftMargin( rPam,
+ GetId() == UNDO_INC_LEFTMARGIN, m_bModulus );
}
-void SwUndoMoveLeftMargin::Repeat( SwUndoIter& rIter )
+void SwUndoMoveLeftMargin::RepeatImpl(::sw::RepeatContext & rContext)
{
- SwDoc* pDoc = &rIter.GetDoc();
- pDoc->MoveLeftMargin( *rIter.pAktPam, GetId() == UNDO_INC_LEFTMARGIN,
+ SwDoc & rDoc = rContext.GetDoc();
+ rDoc.MoveLeftMargin(rContext.GetRepeatPaM(), GetId() == UNDO_INC_LEFTMARGIN,
m_bModulus );
- rIter.pLastUndoObj = this;
}
// -----------------------------------------------------
SwUndoChangeFootNote::SwUndoChangeFootNote(
const SwPaM& rRange, const String& rTxt,
- USHORT nNum, bool bIsEndNote )
+ sal_uInt16 nNum, bool bIsEndNote )
: SwUndo( UNDO_CHGFTN ), SwUndRng( rRange )
, m_pHistory( new SwHistory() )
, m_Text( rTxt )
@@ -1186,35 +1131,30 @@ SwUndoChangeFootNote::~SwUndoChangeFootNote()
{
}
-void SwUndoChangeFootNote::Undo( SwUndoIter& rIter )
+void SwUndoChangeFootNote::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rIter.GetDoc();
- SetPaM( rIter );
-
- BOOL bUndo = rDoc.DoesUndo();
- rDoc.DoUndo( FALSE );
+ SwDoc & rDoc = rContext.GetDoc();
m_pHistory->TmpRollback( &rDoc, 0 );
m_pHistory->SetTmpEnd( m_pHistory->Count() );
rDoc.GetFtnIdxs().UpdateAllFtn();
- SetPaM( rIter );
- rDoc.DoUndo( bUndo );
+ AddUndoRedoPaM(rContext);
}
-void SwUndoChangeFootNote::Redo( SwUndoIter& rIter )
+void SwUndoChangeFootNote::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SetPaM( rIter );
- rIter.GetDoc().SetCurFtn( *rIter.pAktPam, m_Text, m_nNumber, m_bEndNote );
- SetPaM( rIter );
+ SwDoc & rDoc( rContext.GetDoc() );
+ SwPaM & rPaM = AddUndoRedoPaM(rContext);
+ rDoc.SetCurFtn(rPaM, m_Text, m_nNumber, m_bEndNote);
+ SetPaM(rPaM);
}
-void SwUndoChangeFootNote::Repeat( SwUndoIter& rIter )
+void SwUndoChangeFootNote::RepeatImpl(::sw::RepeatContext & rContext)
{
- SwDoc& rDoc = rIter.GetDoc();
- rDoc.SetCurFtn( *rIter.pAktPam, m_Text, m_nNumber, m_bEndNote );
- rIter.pLastUndoObj = this;
+ SwDoc & rDoc = rContext.GetDoc();
+ rDoc.SetCurFtn( rContext.GetRepeatPaM(), m_Text, m_nNumber, m_bEndNote );
}
@@ -1231,17 +1171,17 @@ SwUndoFootNoteInfo::~SwUndoFootNoteInfo()
{
}
-void SwUndoFootNoteInfo::Undo( SwUndoIter &rIter )
+void SwUndoFootNoteInfo::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc &rDoc = rIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
SwFtnInfo *pInf = new SwFtnInfo( rDoc.GetFtnInfo() );
rDoc.SetFtnInfo( *m_pFootNoteInfo );
m_pFootNoteInfo.reset( pInf );
}
-void SwUndoFootNoteInfo::Redo( SwUndoIter &rIter )
+void SwUndoFootNoteInfo::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc &rDoc = rIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
SwFtnInfo *pInf = new SwFtnInfo( rDoc.GetFtnInfo() );
rDoc.SetFtnInfo( *m_pFootNoteInfo );
m_pFootNoteInfo.reset( pInf );
@@ -1260,17 +1200,17 @@ SwUndoEndNoteInfo::~SwUndoEndNoteInfo()
{
}
-void SwUndoEndNoteInfo::Undo( SwUndoIter &rIter )
+void SwUndoEndNoteInfo::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc &rDoc = rIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
SwEndNoteInfo *pInf = new SwEndNoteInfo( rDoc.GetEndNoteInfo() );
rDoc.SetEndNoteInfo( *m_pEndNoteInfo );
m_pEndNoteInfo.reset( pInf );
}
-void SwUndoEndNoteInfo::Redo( SwUndoIter &rIter )
+void SwUndoEndNoteInfo::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc &rDoc = rIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
SwEndNoteInfo *pInf = new SwEndNoteInfo( rDoc.GetEndNoteInfo() );
rDoc.SetEndNoteInfo( *m_pEndNoteInfo );
m_pEndNoteInfo.reset( pInf );
@@ -1285,22 +1225,22 @@ SwUndoDontExpandFmt::SwUndoDontExpandFmt( const SwPosition& rPos )
{
}
-void SwUndoDontExpandFmt::Undo( SwUndoIter& rIter )
+void SwUndoDontExpandFmt::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwPaM* pPam = rIter.pAktPam;
- SwDoc* pDoc = pPam->GetDoc();
+ SwPaM *const pPam(& rContext.GetCursorSupplier().CreateNewShellCursor());
+ SwDoc *const pDoc = & rContext.GetDoc();
SwPosition& rPos = *pPam->GetPoint();
rPos.nNode = m_nNodeIndex;
rPos.nContent.Assign( rPos.nNode.GetNode().GetCntntNode(), m_nContentIndex);
- pDoc->DontExpandFmt( rPos, FALSE );
+ pDoc->DontExpandFmt( rPos, sal_False );
}
-void SwUndoDontExpandFmt::Redo( SwUndoIter& rIter )
+void SwUndoDontExpandFmt::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwPaM* pPam = rIter.pAktPam;
- SwDoc* pDoc = pPam->GetDoc();
+ SwPaM *const pPam(& rContext.GetCursorSupplier().CreateNewShellCursor());
+ SwDoc *const pDoc = & rContext.GetDoc();
SwPosition& rPos = *pPam->GetPoint();
rPos.nNode = m_nNodeIndex;
@@ -1308,11 +1248,11 @@ void SwUndoDontExpandFmt::Redo( SwUndoIter& rIter )
pDoc->DontExpandFmt( rPos );
}
-void SwUndoDontExpandFmt::Repeat( SwUndoIter& rIter )
+void SwUndoDontExpandFmt::RepeatImpl(::sw::RepeatContext & rContext)
{
- SwPaM* pPam = rIter.pAktPam;
- SwDoc* pDoc = pPam->GetDoc();
- pDoc->DontExpandFmt( *pPam->GetPoint() );
+ SwPaM & rPam = rContext.GetRepeatPaM();
+ SwDoc & rDoc = rContext.GetDoc();
+ rDoc.DontExpandFmt( *rPam.GetPoint() );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/unbkmk.cxx b/sw/source/core/undo/unbkmk.cxx
index 8382444d6a5f..26dfc0b1c256 100644
--- a/sw/source/core/undo/unbkmk.cxx
+++ b/sw/source/core/undo/unbkmk.cxx
@@ -29,22 +29,20 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <UndoBookmark.hxx>
#include "doc.hxx"
#include "docary.hxx"
#include "swundo.hxx" // fuer die UndoIds
#include "pam.hxx"
-#include "undobj.hxx"
+#include <UndoCore.hxx>
#include "IMark.hxx"
#include "rolbck.hxx"
#include "SwRewriter.hxx"
-inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
-
-
SwUndoBookmark::SwUndoBookmark( SwUndoId nUndoId,
const ::sw::mark::IMark& rBkmk )
: SwUndo( nUndoId )
@@ -61,7 +59,6 @@ void SwUndoBookmark::SetInDoc( SwDoc* pDoc )
m_pHistoryBookmark->SetInDoc( pDoc, false );
}
-
void SwUndoBookmark::ResetInDoc( SwDoc* pDoc )
{
IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
@@ -96,16 +93,15 @@ SwUndoInsBookmark::SwUndoInsBookmark( const ::sw::mark::IMark& rBkmk )
}
-void SwUndoInsBookmark::Undo( SwUndoIter& rUndoIter )
+void SwUndoInsBookmark::UndoImpl(::sw::UndoRedoContext & rContext)
{
- ResetInDoc( &rUndoIter.GetDoc() );
+ ResetInDoc( &rContext.GetDoc() );
}
-
-void SwUndoInsBookmark::Redo( SwUndoIter& rUndoIter )
+void SwUndoInsBookmark::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SetInDoc( &rUndoIter.GetDoc() );
+ SetInDoc( &rContext.GetDoc() );
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index db29014d8149..6c296013e966 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -29,6 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <UndoDelete.hxx>
#include <hintids.hxx>
#include <unotools/charclass.hxx>
#include <editeng/brkitem.hxx>
@@ -36,11 +37,12 @@
#include <frmfmt.hxx>
#include <fmtanchr.hxx>
#include <doc.hxx>
+#include <UndoManager.hxx>
#include <swtable.hxx>
#include <swundo.hxx> // fuer die UndoIds
#include <pam.hxx>
#include <ndtxt.hxx>
-#include <undobj.hxx>
+#include <UndoCore.hxx>
#include <rolbck.hxx>
#include <poolfmt.hxx>
#include <mvsave.hxx>
@@ -53,21 +55,19 @@
#include <comcore.hrc> // #111827#
#include <undo.hrc>
-inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
-
// DELETE
/* lcl_MakeAutoFrms has to call MakeFrms for objects bounded "AtChar" ( == AUTO ),
if the anchor frame has be moved via _MoveNodes(..) and DelFrms(..)
*/
-void lcl_MakeAutoFrms( const SwSpzFrmFmts& rSpzArr, ULONG nMovedIndex )
+void lcl_MakeAutoFrms( const SwSpzFrmFmts& rSpzArr, sal_uLong nMovedIndex )
{
if( rSpzArr.Count() )
{
SwFlyFrmFmt* pFmt;
const SwFmtAnchor* pAnchor;
- for( USHORT n = 0; n < rSpzArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rSpzArr.Count(); ++n )
{
pFmt = (SwFlyFrmFmt*)rSpzArr[n];
pAnchor = &pFmt->GetAnchor();
@@ -103,12 +103,12 @@ section and the end paragraph not. Then we have to move the paragraph into this
record this in nSectDiff.
*/
-SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy )
+SwUndoDelete::SwUndoDelete( SwPaM& rPam, sal_Bool bFullPara, sal_Bool bCalledByTblCpy )
: SwUndo(UNDO_DELETE), SwUndRng( rPam ),
pMvStt( 0 ), pSttStr(0), pEndStr(0), pRedlData(0), pRedlSaveData(0),
nNode(0), nNdDiff(0), nSectDiff(0), nReplaceDummy(0), nSetPos(0),
- bGroup( FALSE ), bBackSp( FALSE ), bJoinNext( FALSE ), bTblDelLastNd( FALSE ),
- bDelFullPara( bFullPara ), bResetPgDesc( FALSE ), bResetPgBrk( FALSE ),
+ bGroup( sal_False ), bBackSp( sal_False ), bJoinNext( sal_False ), bTblDelLastNd( sal_False ),
+ bDelFullPara( bFullPara ), bResetPgDesc( sal_False ), bResetPgBrk( sal_False ),
bFromTableCopy( bCalledByTblCpy )
{
bDelFullPara = bFullPara; // This is set e.g. if an empty paragraph before a table is deleted
@@ -140,10 +140,8 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy )
DelCntntIndex( *rPam.GetMark(), *rPam.GetPoint(),
DelCntntType(nsDelCntntType::DELCNT_ALL | nsDelCntntType::DELCNT_CHKNOCNTNT) );
- BOOL bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
_DelBookmarks(pStt->nNode, pEnd->nNode);
- pDoc->DoUndo( bDoesUndo );
}
else
DelCntntIndex( *rPam.GetMark(), *rPam.GetPoint() );
@@ -165,8 +163,8 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy )
: pEnd->nNode.GetNode().GetTxtNode();
}
- BOOL bMoveNds = *pStt == *pEnd // noch ein Bereich vorhanden ??
- ? FALSE
+ sal_Bool bMoveNds = *pStt == *pEnd // noch ein Bereich vorhanden ??
+ ? sal_False
: ( SaveCntnt( pStt, pEnd, pSttTxtNd, pEndTxtNd ) || bFromTableCopy );
if( pSttTxtNd && pEndTxtNd && pSttTxtNd != pEndTxtNd )
@@ -186,11 +184,11 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy )
{
SwRegHistory aRegHist( *pEndTxtNd, pHistory );
if( SFX_ITEM_SET == pEndTxtNd->GetpSwAttrSet()->GetItemState(
- RES_BREAK, FALSE ) )
+ RES_BREAK, sal_False ) )
pEndTxtNd->ResetAttr( RES_BREAK );
if( pEndTxtNd->HasSwAttrSet() &&
SFX_ITEM_SET == pEndTxtNd->GetpSwAttrSet()->GetItemState(
- RES_PAGEDESC, FALSE ) )
+ RES_PAGEDESC, sal_False ) )
pEndTxtNd->ResetAttr( RES_PAGEDESC );
}
}
@@ -213,7 +211,7 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy )
if( bMoveNds ) // sind noch Nodes zu verschieben ?
{
- SwNodes& rNds = (SwNodes&)*pDoc->GetUndoNds();
+ SwNodes& rNds = pDoc->GetUndoManager().GetUndoNodes();
SwNodes& rDocNds = pDoc->GetNodes();
SwNodeRange aRg( rDocNds, nSttNode - nNdDiff,
rDocNds, nEndNode - nNdDiff );
@@ -246,11 +244,9 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy )
++nReplaceDummy;
SwNodeRange aMvRg( *pEndTxtNd, 0, *pEndTxtNd, 1 );
SwPosition aSplitPos( *pEndTxtNd );
- BOOL bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ ::sw::UndoGuard const ug(pDoc->GetIDocumentUndoRedo());
pDoc->SplitNode( aSplitPos, false );
- rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aEnd, TRUE );
- pDoc->DoUndo( bDoesUndo );
+ rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aEnd, sal_True );
aRg.aEnd--;
}
else
@@ -272,11 +268,9 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy )
{
SwNodeRange aMvRg( *pSttTxtNd, 0, *pSttTxtNd, 1 );
SwPosition aSplitPos( *pSttTxtNd );
- BOOL bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ ::sw::UndoGuard const ug(pDoc->GetIDocumentUndoRedo());
pDoc->SplitNode( aSplitPos, false );
- rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aStart, TRUE );
- pDoc->DoUndo( bDoesUndo );
+ rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aStart, sal_True );
aRg.aStart--;
}
}
@@ -312,12 +306,12 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy )
if( bJoinNext )
{
SwNodeRange aMvRg( *pEndTxtNd, 0, *pEndTxtNd, 1 );
- rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aStart, TRUE );
+ rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aStart, sal_True );
}
else
{
SwNodeRange aMvRg( *pSttTxtNd, 0, *pSttTxtNd, 1 );
- rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aEnd, TRUE );
+ rDocNds._MoveNodes( aMvRg, rDocNds, aRg.aEnd, sal_True );
}
}
}
@@ -350,14 +344,14 @@ SwUndoDelete::SwUndoDelete( SwPaM& rPam, BOOL bFullPara, BOOL bCalledByTblCpy )
DELETEZ( pHistory );
}
-BOOL SwUndoDelete::SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd,
+sal_Bool SwUndoDelete::SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd,
SwTxtNode* pSttTxtNd, SwTxtNode* pEndTxtNd )
{
- ULONG nNdIdx = pStt->nNode.GetIndex();
+ sal_uLong nNdIdx = pStt->nNode.GetIndex();
// 1 - kopiere den Anfang in den Start-String
if( pSttTxtNd )
{
- BOOL bOneNode = nSttNode == nEndNode;
+ sal_Bool bOneNode = nSttNode == nEndNode;
xub_StrLen nLen = bOneNode ? nEndCntnt - nSttCntnt
: pSttTxtNd->GetTxt().Len() - nSttCntnt;
SwRegHistory aRHst( *pSttTxtNd, pHistory );
@@ -390,7 +384,7 @@ BOOL SwUndoDelete::SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd,
}
if( bOneNode )
- return FALSE; // keine Nodes mehr verschieben
+ return sal_False; // keine Nodes mehr verschieben
}
@@ -428,21 +422,21 @@ BOOL SwUndoDelete::SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd,
// sind es nur zwei Nodes, dann ist schon alles erledigt.
if( ( pSttTxtNd || pEndTxtNd ) && nSttNode + 1 == nEndNode )
- return FALSE; // keine Nodes mehr verschieben
+ return sal_False; // keine Nodes mehr verschieben
- return TRUE; // verschiebe die dazwischen liegenden Nodes
+ return sal_True; // verschiebe die dazwischen liegenden Nodes
}
-BOOL SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
+sal_Bool SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
{
// ist das Undo groesser als 1 Node ? (sprich: Start und EndString)
- if( pSttStr ? !pSttStr->Len() || pEndStr : TRUE )
- return FALSE;
+ if( pSttStr ? !pSttStr->Len() || pEndStr : sal_True )
+ return sal_False;
// es kann nur das Loeschen von einzelnen char's zusammengefasst werden
if( nSttNode != nEndNode || ( !bGroup && nSttCntnt+1 != nEndCntnt ))
- return FALSE;
+ return sal_False;
const SwPosition *pStt = rDelPam.Start(),
*pEnd = rDelPam.GetPoint() == pStt
@@ -452,26 +446,26 @@ BOOL SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
if( pStt->nNode != pEnd->nNode ||
pStt->nContent.GetIndex()+1 != pEnd->nContent.GetIndex() ||
pEnd->nNode != nSttNode )
- return FALSE;
+ return sal_False;
// untercheide zwischen BackSpace und Delete. Es muss dann das
// Undo-Array unterschiedlich aufgebaut werden !!
if( pEnd->nContent == nSttCntnt )
{
- if( bGroup && !bBackSp ) return FALSE;
- bBackSp = TRUE;
+ if( bGroup && !bBackSp ) return sal_False;
+ bBackSp = sal_True;
}
else if( pStt->nContent == nSttCntnt )
{
- if( bGroup && bBackSp ) return FALSE;
- bBackSp = FALSE;
+ if( bGroup && bBackSp ) return sal_False;
+ bBackSp = sal_False;
}
else
- return FALSE;
+ return sal_False;
// sind die beiden Nodes (Nodes-/Undo-Array) ueberhaupt TextNodes?
SwTxtNode * pDelTxtNd = pStt->nNode.GetNode().GetTxtNode();
- if( !pDelTxtNd ) return FALSE;
+ if( !pDelTxtNd ) return sal_False;
xub_StrLen nUChrPos = bBackSp ? 0 : pSttStr->Len()-1;
sal_Unicode cDelChar = pDelTxtNd->GetTxt().GetChar( pStt->nContent.GetIndex() );
@@ -479,19 +473,19 @@ BOOL SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
if( ( CH_TXTATR_BREAKWORD == cDelChar || CH_TXTATR_INWORD == cDelChar ) ||
rCC.isLetterNumeric( String( cDelChar ), 0 ) !=
rCC.isLetterNumeric( *pSttStr, nUChrPos ) )
- return FALSE;
+ return sal_False;
{
SwRedlineSaveDatas* pTmpSav = new SwRedlineSaveDatas;
- if( !FillSaveData( rDelPam, *pTmpSav, FALSE ))
+ if( !FillSaveData( rDelPam, *pTmpSav, sal_False ))
delete pTmpSav, pTmpSav = 0;
- BOOL bOk = ( !pRedlSaveData && !pTmpSav ) ||
+ sal_Bool bOk = ( !pRedlSaveData && !pTmpSav ) ||
( pRedlSaveData && pTmpSav &&
SwUndo::CanRedlineGroup( *pRedlSaveData, *pTmpSav, bBackSp ));
delete pTmpSav;
if( !bOk )
- return FALSE;
+ return sal_False;
pDoc->DeleteRedline( rDelPam, false, USHRT_MAX );
}
@@ -508,8 +502,8 @@ BOOL SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
pSttStr->Insert( cDelChar, nUChrPos );
pDelTxtNd->EraseText( pStt->nContent, 1 );
- bGroup = TRUE;
- return TRUE;
+ bGroup = sal_True;
+ return sal_True;
}
@@ -534,7 +528,7 @@ static SwRewriter lcl_RewriterFromHistory(SwHistory & rHistory)
bool bDone = false;
- for ( USHORT n = 0; n < rHistory.Count(); n++)
+ for ( sal_uInt16 n = 0; n < rHistory.Count(); n++)
{
String aDescr = rHistory[n]->GetDescription();
@@ -616,14 +610,14 @@ SwRewriter SwUndoDelete::GetRewriter() const
}
// Every object, anchored "AtCntnt" will be reanchored at rPos
-void lcl_ReAnchorAtCntntFlyFrames( const SwSpzFrmFmts& rSpzArr, SwPosition &rPos, ULONG nOldIdx )
+void lcl_ReAnchorAtCntntFlyFrames( const SwSpzFrmFmts& rSpzArr, SwPosition &rPos, sal_uLong nOldIdx )
{
if( rSpzArr.Count() )
{
SwFlyFrmFmt* pFmt;
const SwFmtAnchor* pAnchor;
const SwPosition* pAPos;
- for( USHORT n = 0; n < rSpzArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rSpzArr.Count(); ++n )
{
pFmt = (SwFlyFrmFmt*)rSpzArr[n];
pAnchor = &pFmt->GetAnchor();
@@ -641,13 +635,11 @@ void lcl_ReAnchorAtCntntFlyFrames( const SwSpzFrmFmts& rSpzArr, SwPosition &rPos
}
}
-void SwUndoDelete::Undo( SwUndoIter& rUndoIter )
+void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc* pDoc = &rUndoIter.GetDoc();
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ SwDoc *const pDoc = & rContext.GetDoc();
- ULONG nCalcStt = nSttNode - nNdDiff;
+ sal_uLong nCalcStt = nSttNode - nNdDiff;
if( nSectDiff && bBackSp )
nCalcStt += nSectDiff;
@@ -679,8 +671,7 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter )
else
pInsNd = 0; // Node nicht loeschen !!
- SwNodes* pUNds = (SwNodes*)pDoc->GetUndoNds();
- BOOL bNodeMove = 0 != nNode;
+ sal_Bool bNodeMove = 0 != nNode;
if( pEndStr )
{
@@ -695,7 +686,7 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter )
if( pSttStr && !bFromTableCopy )
{
- ULONG nOldIdx = aPos.nNode.GetIndex();
+ sal_uLong nOldIdx = aPos.nNode.GetIndex();
pDoc->SplitNode( aPos, false );
// After the split all objects are anchored at the first paragraph,
// but the pHistory of the fly frame formats relies on anchoring at
@@ -719,7 +710,7 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter )
{
if( nSttCntnt < pNd->GetTxt().Len() )
{
- ULONG nOldIdx = aPos.nNode.GetIndex();
+ sal_uLong nOldIdx = aPos.nNode.GetIndex();
pDoc->SplitNode( aPos, false );
if( bBackSp )
lcl_ReAnchorAtCntntFlyFrames( *pDoc->GetSpzFrmFmts(), aPos, nOldIdx );
@@ -731,7 +722,7 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter )
SwNode* pMovedNode = NULL;
if( nSectDiff )
{
- ULONG nMoveIndex = aPos.nNode.GetIndex();
+ sal_uLong nMoveIndex = aPos.nNode.GetIndex();
int nDiff = 0;
if( bJoinNext )
{
@@ -748,7 +739,7 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter )
aPos.nNode--;
if( !bJoinNext )
pMovedNode = &aPos.nNode.GetNode();
- pDoc->GetNodes()._MoveNodes( aRg, pDoc->GetNodes(), aMvIdx, TRUE );
+ pDoc->GetNodes()._MoveNodes( aRg, pDoc->GetNodes(), aMvIdx, sal_True );
aPos.nNode++;
}
@@ -756,11 +747,11 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter )
{
SwNodeRange aRange( *pMvStt, 0, *pMvStt, nNode );
SwNodeIndex aCopyIndex( aPos.nNode, -1 );
- pUNds->_Copy( aRange, aPos.nNode );
+ pDoc->GetUndoManager().GetUndoNodes()._Copy( aRange, aPos.nNode );
if( nReplaceDummy )
{
- ULONG nMoveIndex;
+ sal_uLong nMoveIndex;
if( bJoinNext )
{
nMoveIndex = nEndNode - nNdDiff;
@@ -774,7 +765,7 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter )
SwNodeIndex aMvIdx( pDoc->GetNodes(), nMoveIndex );
SwNodeRange aRg( aPos.nNode, 0, aPos.nNode, 1 );
pMovedNode = &aPos.nNode.GetNode();
- pDoc->GetNodes()._MoveNodes( aRg, pDoc->GetNodes(), aMvIdx, TRUE );
+ pDoc->GetNodes()._MoveNodes( aRg, pDoc->GetNodes(), aMvIdx, sal_True );
pDoc->GetNodes().Delete( aMvIdx, 1 );
}
}
@@ -831,8 +822,8 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter )
if( bResetPgDesc || bResetPgBrk )
{
- USHORT nStt = static_cast<USHORT>( bResetPgDesc ? RES_PAGEDESC : RES_BREAK );
- USHORT nEnd = static_cast<USHORT>( bResetPgBrk ? RES_BREAK : RES_PAGEDESC );
+ sal_uInt16 nStt = static_cast<sal_uInt16>( bResetPgDesc ? RES_PAGEDESC : RES_BREAK );
+ sal_uInt16 nEnd = static_cast<sal_uInt16>( bResetPgBrk ? RES_BREAK : RES_PAGEDESC );
SwNode* pNode = pDoc->GetNodes()[ nEndNode + 1 ];
if( pNode->IsCntntNode() )
@@ -847,22 +838,17 @@ void SwUndoDelete::Undo( SwUndoIter& rUndoIter )
if( pRedlSaveData )
SetSaveData( *pDoc, *pRedlSaveData );
- pDoc->DoUndo( bUndo ); // Undo wieder einschalten
- SetPaM( rUndoIter, TRUE );
+ AddUndoRedoPaM(rContext, true);
}
-void SwUndoDelete::Redo( SwUndoIter& rUndoIter )
+void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext)
{
- rUndoIter.SetUpdateAttr( TRUE );
-
- SwPaM& rPam = *rUndoIter.pAktPam;
+ SwPaM & rPam = AddUndoRedoPaM(rContext);
SwDoc& rDoc = *rPam.GetDoc();
- SetPaM( rPam );
-
if( pRedlSaveData )
{
- bool bSuccess = FillSaveData(rPam, *pRedlSaveData, TRUE);
+ bool bSuccess = FillSaveData(rPam, *pRedlSaveData, sal_True);
OSL_ENSURE(bSuccess,
"SwUndoDelete::Redo: used to have redline data, but now none?");
if (!bSuccess)
@@ -874,7 +860,7 @@ void SwUndoDelete::Redo( SwUndoIter& rUndoIter )
if( !bDelFullPara )
{
SwUndRng aTmpRng( rPam );
- RemoveIdxFromRange( rPam, FALSE );
+ RemoveIdxFromRange( rPam, sal_False );
aTmpRng.SetPaM( rPam );
if( !bJoinNext ) // Dann Selektion von unten nach oben
@@ -940,11 +926,11 @@ void SwUndoDelete::Redo( SwUndoIter& rUndoIter )
const SfxPoolItem *pItem;
if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
pNextNd->SetAttr( *pItem );
if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
pNextNd->SetAttr( *pItem );
}
pTblNd->DelFrms();
@@ -974,15 +960,16 @@ void SwUndoDelete::Redo( SwUndoIter& rUndoIter )
rDoc.DeleteAndJoin( rPam );
}
-void SwUndoDelete::Repeat( SwUndoIter& rUndoIter )
+void SwUndoDelete::RepeatImpl(::sw::RepeatContext & rContext)
{
- if( UNDO_DELETE == rUndoIter.GetLastUndoId() )
+ // this action does not seem idempotent,
+ // so make sure it is only executed once on repeat
+ if (rContext.m_bDeleteRepeated)
return;
- SwPaM& rPam = *rUndoIter.pAktPam;
+ SwPaM & rPam = rContext.GetRepeatPaM();
SwDoc& rDoc = *rPam.GetDoc();
- BOOL bGroupUndo = rDoc.DoesGroupUndo();
- rDoc.DoGroupUndo( FALSE );
+ ::sw::GroupUndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo());
if( !rPam.HasMark() )
{
rPam.SetMark();
@@ -992,8 +979,7 @@ void SwUndoDelete::Repeat( SwUndoIter& rUndoIter )
rDoc.DelFullPara( rPam );
else
rDoc.DeleteAndJoin( rPam );
- rDoc.DoGroupUndo( bGroupUndo );
- rUndoIter.pLastUndoObj = this;
+ rContext.m_bDeleteRepeated = true;
}
diff --git a/sw/source/core/undo/undo.src b/sw/source/core/undo/undo.src
index 1035d8cb0d0f..c394da3e8e87 100644
--- a/sw/source/core/undo/undo.src
+++ b/sw/source/core/undo/undo.src
@@ -394,7 +394,7 @@ String STR_UNDO_SETRUBYATTR
{
Text [ en-US ] = "Ruby Setting";
};
-#102505#
+// #102505#
String STR_UNDO_TMPAUTOCORR
{
Text [ en-US ] = "AutoCorrect" ;
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 3f12a8e66561..6292f1a72da4 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -30,16 +30,18 @@
#include "precompiled_sw.hxx"
+#include <IShellCursorSupplier.hxx>
#include <txtftn.hxx>
#include <fmtanchr.hxx>
#include <ftnidx.hxx>
#include <frmfmt.hxx>
#include <doc.hxx>
+#include <UndoManager.hxx>
#include <docary.hxx>
#include <swundo.hxx> // fuer die UndoIds
#include <pam.hxx>
#include <ndtxt.hxx>
-#include <undobj.hxx>
+#include <UndoCore.hxx>
#include <rolbck.hxx>
#include <ndnotxt.hxx>
#include <IMark.hxx>
@@ -56,35 +58,23 @@ class SwRedlineSaveData : public SwUndRng, public SwRedlineData,
public:
SwRedlineSaveData( SwComparePosition eCmpPos,
const SwPosition& rSttPos, const SwPosition& rEndPos,
- SwRedline& rRedl, BOOL bCopyNext );
+ SwRedline& rRedl, sal_Bool bCopyNext );
~SwRedlineSaveData();
void RedlineToDoc( SwPaM& rPam );
SwNodeIndex* GetMvSttIdx() const
{ return SwUndoSaveSection::GetMvSttIdx(); }
#if OSL_DEBUG_LEVEL > 1
- USHORT nRedlineCount;
+ sal_uInt16 nRedlineCount;
#endif
};
-SV_IMPL_PTRARR( SwUndos, SwUndo*)
SV_IMPL_PTRARR( SwRedlineSaveDatas, SwRedlineSaveDataPtr )
-SwUndoIter::SwUndoIter( SwPaM* pPam, SwUndoId nId )
-{
- nUndoId = nId;
- bWeiter = nId ? TRUE : FALSE;
- bUpdateAttr = FALSE;
- pAktPam = pPam;
- nEndCnt = 0;
- pSelFmt = 0;
- pMarkList = 0;
-}
-inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
//------------------------------------------------------------
-// Diese Klasse speichert den Pam als USHORT's und kann diese wieder zu
+// Diese Klasse speichert den Pam als sal_uInt16's und kann diese wieder zu
// einem PaM zusammensetzen
SwUndRng::SwUndRng()
@@ -116,7 +106,7 @@ void SwUndRng::SetValues( const SwPaM& rPam )
nSttCntnt = pStt->nContent.GetIndex();
}
-void SwUndRng::SetPaM( SwPaM & rPam, BOOL bCorrToCntnt ) const
+void SwUndRng::SetPaM( SwPaM & rPam, sal_Bool bCorrToCntnt ) const
{
rPam.DeleteMark();
rPam.GetPoint()->nNode = nSttNode;
@@ -144,26 +134,29 @@ void SwUndRng::SetPaM( SwPaM & rPam, BOOL bCorrToCntnt ) const
rPam.GetPoint()->nContent.Assign( 0, 0 );
}
-void SwUndRng::SetPaM( SwUndoIter& rIter, BOOL bCorrToCntnt ) const
+SwPaM & SwUndRng::AddUndoRedoPaM(
+ ::sw::UndoRedoContext & rContext, bool bCorrToCntnt) const
{
- if( rIter.pAktPam )
- SetPaM( *rIter.pAktPam, bCorrToCntnt );
+ SwPaM & rPaM( rContext.GetCursorSupplier().CreateNewShellCursor() );
+ SetPaM( rPaM, bCorrToCntnt );
+ return rPaM;
}
+
//------------------------------------------------------------
-void SwUndo::RemoveIdxFromSection( SwDoc& rDoc, ULONG nSttIdx,
- ULONG* pEndIdx )
+void SwUndo::RemoveIdxFromSection( SwDoc& rDoc, sal_uLong nSttIdx,
+ sal_uLong* pEndIdx )
{
SwNodeIndex aIdx( rDoc.GetNodes(), nSttIdx );
SwNodeIndex aEndIdx( rDoc.GetNodes(), pEndIdx ? *pEndIdx
: aIdx.GetNode().EndOfSectionIndex() );
SwPosition aPos( rDoc.GetNodes().GetEndOfPostIts() );
- rDoc.CorrAbs( aIdx, aEndIdx, aPos, TRUE );
+ rDoc.CorrAbs( aIdx, aEndIdx, aPos, sal_True );
}
-void SwUndo::RemoveIdxFromRange( SwPaM& rPam, BOOL bMoveNext )
+void SwUndo::RemoveIdxFromRange( SwPaM& rPam, sal_Bool bMoveNext )
{
const SwPosition* pEnd = rPam.End();
if( bMoveNext )
@@ -184,13 +177,13 @@ void SwUndo::RemoveIdxFromRange( SwPaM& rPam, BOOL bMoveNext )
}
}
- rPam.GetDoc()->CorrAbs( aStt, aEnd, *rPam.GetPoint(), TRUE );
+ rPam.GetDoc()->CorrAbs( aStt, aEnd, *rPam.GetPoint(), sal_True );
}
else
- rPam.GetDoc()->CorrAbs( rPam, *pEnd, TRUE );
+ rPam.GetDoc()->CorrAbs( rPam, *pEnd, sal_True );
}
-void SwUndo::RemoveIdxRel( ULONG nIdx, const SwPosition& rPos )
+void SwUndo::RemoveIdxRel( sal_uLong nIdx, const SwPosition& rPos )
{
// nur die Crsr verschieben; die Bookmarks/TOXMarks/.. werden vom
// entsp. JoinNext/JoinPrev erledigt!
@@ -198,8 +191,8 @@ void SwUndo::RemoveIdxRel( ULONG nIdx, const SwPosition& rPos )
::PaMCorrRel( aIdx, rPos );
}
-SwUndo::SwUndo( SwUndoId nI )
- : nId(nI), nOrigRedlineMode(nsRedlineMode_t::REDLINE_NONE),
+SwUndo::SwUndo(SwUndoId const nId)
+ : m_nId(nId), nOrigRedlineMode(nsRedlineMode_t::REDLINE_NONE),
bCacheComment(true), pComment(NULL)
{
}
@@ -215,9 +208,89 @@ SwUndo::~SwUndo()
delete pComment;
}
-void SwUndo::Repeat( SwUndoIter& rIter )
+
+class UndoRedoRedlineGuard
+{
+public:
+ UndoRedoRedlineGuard(::sw::UndoRedoContext & rContext, SwUndo & rUndo)
+ : m_rRedlineAccess(rContext.GetDoc())
+ , m_eMode(m_rRedlineAccess.GetRedlineMode())
+ {
+ RedlineMode_t const eTmpMode =
+ static_cast<RedlineMode_t>(rUndo.GetRedlineMode());
+ if ((nsRedlineMode_t::REDLINE_SHOW_MASK & eTmpMode) !=
+ (nsRedlineMode_t::REDLINE_SHOW_MASK & m_eMode))
+ {
+ m_rRedlineAccess.SetRedlineMode( eTmpMode );
+ }
+ m_rRedlineAccess.SetRedlineMode_intern( static_cast<RedlineMode_t>(
+ eTmpMode | nsRedlineMode_t::REDLINE_IGNORE) );
+ }
+ ~UndoRedoRedlineGuard()
+ {
+ m_rRedlineAccess.SetRedlineMode(m_eMode);
+ }
+private:
+ IDocumentRedlineAccess & m_rRedlineAccess;
+ RedlineMode_t const m_eMode;
+};
+
+void SwUndo::Undo()
{
- rIter.pLastUndoObj = this;
+ OSL_ENSURE(false, "SwUndo::Undo(): ERROR: must call Undo(context) instead");
+}
+
+void SwUndo::Redo()
+{
+ OSL_ENSURE(false, "SwUndo::Redo(): ERROR: must call Redo(context) instead");
+}
+
+void SwUndo::UndoWithContext(SfxUndoContext & rContext)
+{
+ ::sw::UndoRedoContext *const pContext(
+ dynamic_cast< ::sw::UndoRedoContext * >(& rContext));
+ OSL_ASSERT(pContext);
+ if (!pContext) { return; }
+ UndoRedoRedlineGuard(*pContext, *this);
+ UndoImpl(*pContext);
+}
+
+void SwUndo::RedoWithContext(SfxUndoContext & rContext)
+{
+ ::sw::UndoRedoContext *const pContext(
+ dynamic_cast< ::sw::UndoRedoContext * >(& rContext));
+ OSL_ASSERT(pContext);
+ if (!pContext) { return; }
+ UndoRedoRedlineGuard(*pContext, *this);
+ RedoImpl(*pContext);
+}
+
+void SwUndo::Repeat(SfxRepeatTarget & rContext)
+{
+ ::sw::RepeatContext *const pRepeatContext(
+ dynamic_cast< ::sw::RepeatContext * >(& rContext));
+ OSL_ASSERT(pRepeatContext);
+ if (!pRepeatContext) { return; }
+ RepeatImpl(*pRepeatContext);
+}
+
+sal_Bool SwUndo::CanRepeat(SfxRepeatTarget & rContext) const
+{
+ ::sw::RepeatContext *const pRepeatContext(
+ dynamic_cast< ::sw::RepeatContext * >(& rContext));
+ OSL_ASSERT(pRepeatContext);
+ if (!pRepeatContext) { return false; }
+ return CanRepeatImpl(*pRepeatContext);
+}
+
+void SwUndo::RepeatImpl( ::sw::RepeatContext & )
+{
+}
+
+bool SwUndo::CanRepeatImpl( ::sw::RepeatContext & ) const
+{
+// return false;
+ return ((REPEAT_START <= GetId()) && (GetId() < REPEAT_END));
}
String SwUndo::GetComment() const
@@ -228,7 +301,7 @@ String SwUndo::GetComment() const
{
if (! pComment)
{
- pComment = new String(SW_RES(UNDO_BASE + nId));
+ pComment = new String(SW_RES(UNDO_BASE + GetId()));
SwRewriter aRewriter = GetRewriter();
@@ -239,7 +312,7 @@ String SwUndo::GetComment() const
}
else
{
- aResult = String(SW_RES(UNDO_BASE + nId));
+ aResult = String(SW_RES(UNDO_BASE + GetId()));
SwRewriter aRewriter = GetRewriter();
@@ -249,11 +322,6 @@ String SwUndo::GetComment() const
return aResult;
}
-SwUndoId SwUndo::GetEffectiveId() const
-{
- return GetId();
-}
-
SwRewriter SwUndo::GetRewriter() const
{
SwRewriter aResult;
@@ -261,6 +329,7 @@ SwRewriter SwUndo::GetRewriter() const
return aResult;
}
+
//------------------------------------------------------------
SwUndoSaveCntnt::SwUndoSaveCntnt()
@@ -283,16 +352,15 @@ SwUndoSaveCntnt::~SwUndoSaveCntnt()
// aufgerufen. Dann soll die gesamte Section verschoben werden.
void SwUndoSaveCntnt::MoveToUndoNds( SwPaM& rPaM, SwNodeIndex* pNodeIdx,
- SwIndex* pCntIdx, ULONG* pEndNdIdx, xub_StrLen* pEndCntIdx )
+ SwIndex* pCntIdx, sal_uLong* pEndNdIdx, xub_StrLen* pEndCntIdx )
{
SwDoc& rDoc = *rPaM.GetDoc();
- BOOL bUndo = rDoc.DoesUndo();
- rDoc.DoUndo( FALSE );
+ ::sw::UndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo());
SwNoTxtNode* pCpyNd = rPaM.GetNode()->GetNoTxtNode();
// jetzt kommt das eigentliche Loeschen(Verschieben)
- SwNodes& rNds = (SwNodes&)*rDoc.GetUndoNds();
+ SwNodes & rNds = rDoc.GetUndoManager().GetUndoNodes();
SwPosition aPos( pEndNdIdx ? rNds.GetEndOfPostIts()
: rNds.GetEndOfExtras() );
aPos.nNode--;
@@ -311,14 +379,14 @@ void SwUndoSaveCntnt::MoveToUndoNds( SwPaM& rPaM, SwNodeIndex* pNodeIdx,
else
aPos.nNode.GetNode().GetCntntNode()->MakeEndIndex( &aPos.nContent );
- // als USHORT merken; die Indizies verschieben sich !!
- ULONG nTmpMvNode = aPos.nNode.GetIndex();
+ // als sal_uInt16 merken; die Indizies verschieben sich !!
+ sal_uLong nTmpMvNode = aPos.nNode.GetIndex();
xub_StrLen nTmpMvCntnt = aPos.nContent.GetIndex();
if( pCpyNd || pEndNdIdx )
{
SwNodeRange aRg( pStt->nNode, 0, pEnd->nNode, 1 );
- rDoc.GetNodes()._MoveNodes( aRg, rNds, aPos.nNode, FALSE );
+ rDoc.GetNodes()._MoveNodes( aRg, rNds, aPos.nNode, sal_False );
aPos.nContent = 0;
aPos.nNode--;
}
@@ -368,21 +436,18 @@ void SwUndoSaveCntnt::MoveToUndoNds( SwPaM& rPaM, SwNodeIndex* pNodeIdx,
else
pCntIdx->Assign( 0, 0 );
}
-
- rDoc.DoUndo( bUndo );
}
-void SwUndoSaveCntnt::MoveFromUndoNds( SwDoc& rDoc, ULONG nNodeIdx,
+void SwUndoSaveCntnt::MoveFromUndoNds( SwDoc& rDoc, sal_uLong nNodeIdx,
xub_StrLen nCntIdx, SwPosition& rInsPos,
- ULONG* pEndNdIdx, xub_StrLen* pEndCntIdx )
+ sal_uLong* pEndNdIdx, xub_StrLen* pEndCntIdx )
{
// jetzt kommt das wiederherstellen
- SwNodes& rNds = (SwNodes&)*rDoc.GetUndoNds();
+ SwNodes & rNds = rDoc.GetUndoManager().GetUndoNodes();
if( nNodeIdx == rNds.GetEndOfPostIts().GetIndex() )
return; // nichts gespeichert
- BOOL bUndo = rDoc.DoesUndo();
- rDoc.DoUndo( FALSE );
+ ::sw::UndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo());
SwPaM aPaM( rInsPos );
if( pEndNdIdx ) // dann hole aus diesem den Bereich
@@ -435,10 +500,8 @@ void SwUndoSaveCntnt::MoveFromUndoNds( SwDoc& rDoc, ULONG nNodeIdx,
}
else {
- OSL_ENSURE( FALSE, "was ist es denn nun?" );
+ OSL_ENSURE( sal_False, "was ist es denn nun?" );
}
-
- rDoc.DoUndo( bUndo );
}
// diese beiden Methoden bewegen den Point vom Pam zurueck/vor. Damit
@@ -446,21 +509,21 @@ void SwUndoSaveCntnt::MoveFromUndoNds( SwDoc& rDoc, ULONG nNodeIdx,
// Point liegt dann vor dem manipuliertem Bereich !!)
// Das Flag gibt an, ob noch vorm Point Inhalt steht.
-BOOL SwUndoSaveCntnt::MovePtBackward( SwPaM& rPam )
+sal_Bool SwUndoSaveCntnt::MovePtBackward( SwPaM& rPam )
{
rPam.SetMark();
if( rPam.Move( fnMoveBackward ))
- return TRUE;
+ return sal_True;
// gibt es nach vorne keinen Inhalt mehr, so setze den Point einfach
// auf die vorherige Position (Node und Content, damit der Content
// abgemeldet wird !!)
rPam.GetPoint()->nNode--;
rPam.GetPoint()->nContent.Assign( 0, 0 );
- return FALSE;
+ return sal_False;
}
-void SwUndoSaveCntnt::MovePtForward( SwPaM& rPam, BOOL bMvBkwrd )
+void SwUndoSaveCntnt::MovePtForward( SwPaM& rPam, sal_Bool bMvBkwrd )
{
// gab es noch Inhalt vor der Position ?
if( bMvBkwrd )
@@ -498,8 +561,7 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark,
SwDoc* pDoc = rMark.nNode.GetNode().GetDoc();
- BOOL bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
// 1. Fussnoten
if( nsDelCntntType::DELCNT_FTN & nDelCntntType )
@@ -508,7 +570,7 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark,
if( rFtnArr.Count() )
{
const SwNode* pFtnNd;
- USHORT nPos;
+ sal_uInt16 nPos;
rFtnArr.SeekEntry( pStt->nNode, &nPos );
SwTxtFtn* pSrch;
@@ -571,14 +633,14 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark,
// 2. Flys
if( nsDelCntntType::DELCNT_FLY & nDelCntntType )
{
- USHORT nChainInsPos = pHistory ? pHistory->Count() : 0;
+ sal_uInt16 nChainInsPos = pHistory ? pHistory->Count() : 0;
const SwSpzFrmFmts& rSpzArr = *pDoc->GetSpzFrmFmts();
if( rSpzArr.Count() )
{
- const BOOL bDelFwrd = rMark.nNode.GetIndex() <= rPoint.nNode.GetIndex();
+ const sal_Bool bDelFwrd = rMark.nNode.GetIndex() <= rPoint.nNode.GetIndex();
SwFlyFrmFmt* pFmt;
const SwFmtAnchor* pAnchor;
- USHORT n = rSpzArr.Count();
+ sal_uInt16 n = rSpzArr.Count();
const SwPosition* pAPos;
while( n && rSpzArr.Count() )
@@ -596,7 +658,8 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark,
{
if( !pHistory )
pHistory = new SwHistory;
- SwTxtNode* pTxtNd = pDoc->GetNodes()[ pAPos->nNode]->GetTxtNode();
+ SwTxtNode *const pTxtNd =
+ pAPos->nNode.GetNode().GetTxtNode();
SwTxtAttr* const pFlyHnt = pTxtNd->GetTxtAttrForCharAt(
pAPos->nContent.GetIndex());
OSL_ENSURE( pFlyHnt, "kein FlyAttribut" );
@@ -711,7 +774,7 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark,
if( pMarkAccess->getMarksCount() )
{
- for( USHORT n = 0; n < pMarkAccess->getMarksCount(); ++n )
+ for( sal_uInt16 n = 0; n < pMarkAccess->getMarksCount(); ++n )
{
// --> OD 2007-10-17 #i81002#
bool bSavePos = false;
@@ -810,8 +873,6 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark,
}
}
}
-
- pDoc->DoUndo( bDoesUndo );
}
@@ -850,7 +911,7 @@ void SwUndoSaveSection::SaveSection( SwDoc* , const SwNodeRange& rRange )
DelCntntIndex( *aPam.GetMark(), *aPam.GetPoint() );
pRedlSaveData = new SwRedlineSaveDatas;
- if( !SwUndo::FillSaveData( aPam, *pRedlSaveData, TRUE, TRUE ))
+ if( !SwUndo::FillSaveData( aPam, *pRedlSaveData, sal_True, sal_True ))
delete pRedlSaveData, pRedlSaveData = 0;
nStartPos = rRange.aStart.GetIndex();
@@ -858,29 +919,29 @@ void SwUndoSaveSection::SaveSection( SwDoc* , const SwNodeRange& rRange )
aPam.GetPoint()->nNode--;
aPam.GetMark()->nNode++;
- SwCntntNode* pCNd = aPam.GetCntntNode( FALSE );
+ SwCntntNode* pCNd = aPam.GetCntntNode( sal_False );
if( pCNd )
aPam.GetMark()->nContent.Assign( pCNd, 0 );
- if( 0 != ( pCNd = aPam.GetCntntNode( TRUE )) )
+ if( 0 != ( pCNd = aPam.GetCntntNode( sal_True )) )
aPam.GetPoint()->nContent.Assign( pCNd, pCNd->Len() );
// Positionen als SwIndex merken, damit im DTOR dieser Bereich
// entfernt werden kann !!
- ULONG nEnd;
+ sal_uLong nEnd;
pMvStt = new SwNodeIndex( rRange.aStart );
MoveToUndoNds( aPam, pMvStt, 0, &nEnd, 0 );
nMvLen = nEnd - pMvStt->GetIndex() + 1;
}
void SwUndoSaveSection::RestoreSection( SwDoc* pDoc, SwNodeIndex* pIdx,
- USHORT nSectType )
+ sal_uInt16 nSectType )
{
if( ULONG_MAX != nStartPos ) // gab es ueberhaupt Inhalt ?
{
// ueberpruefe, ob der Inhalt an der alten Position steht
SwNodeIndex aSttIdx( pDoc->GetNodes(), nStartPos );
- OSL_ENSURE( !pDoc->GetNodes()[ aSttIdx ]->GetCntntNode(),
- "Position in irgendeiner Section" );
+// OSL_ENSURE( !pDoc->GetNodes()[ aSttIdx ]->GetCntntNode(),
+// "RestoreSection(): Position on content node");
// move den Inhalt aus dem UndoNodes-Array in den Fly
SwStartNode* pSttNd = pDoc->GetNodes().MakeEmptySection( aSttIdx,
@@ -898,7 +959,7 @@ void SwUndoSaveSection::RestoreSection( SwDoc* pDoc, const SwNodeIndex& rInsPos
if( ULONG_MAX != nStartPos ) // gab es ueberhaupt Inhalt ?
{
SwPosition aInsPos( rInsPos );
- ULONG nEnd = pMvStt->GetIndex() + nMvLen - 1;
+ sal_uLong nEnd = pMvStt->GetIndex() + nMvLen - 1;
MoveFromUndoNds( *pDoc, pMvStt->GetIndex(), 0, aInsPos, &nEnd, 0 );
// Indizies wieder zerstoren, Inhalt ist aus dem UndoNodes-Array
@@ -914,135 +975,13 @@ void SwUndoSaveSection::RestoreSection( SwDoc* pDoc, const SwNodeIndex& rInsPos
}
}
-// START
-SwUndoStart::SwUndoStart( SwUndoId nInitId )
- : SwUndo( UNDO_START ), nUserId( nInitId ), nEndOffset( 0 )
-{
-}
-
-void SwUndoStart::Undo( SwUndoIter& rUndoIter )
-{
- if( !( --rUndoIter.nEndCnt ) && rUndoIter.bWeiter &&
- ( rUndoIter.GetId() ? ( rUndoIter.GetId() == nUserId ||
- ( UNDO_END == rUndoIter.GetId() && UNDO_START == GetId() )) : TRUE ))
- rUndoIter.bWeiter = FALSE;
-}
-
-void SwUndoStart::Redo( SwUndoIter& rUndoIter )
-{
- rUndoIter.bWeiter = TRUE;
- ++rUndoIter.nEndCnt;
-}
-
-void SwUndoStart::Repeat( SwUndoIter& rUndoIter )
-{
- rUndoIter.bWeiter = FALSE;
-}
-
-String SwUndoStart::GetComment() const
-{
- String sResult;
-
- switch (nUserId)
- {
- case UNDO_START:
- case UNDO_END:
- sResult = String("??", RTL_TEXTENCODING_ASCII_US);
-
- break;
-
- default:
- sResult = String(SW_RES(UNDO_BASE + nUserId));
- sResult = GetRewriter().Apply(sResult);
- }
-
- return sResult;
-}
-
-SwRewriter SwUndoStart::GetRewriter() const
-{
- return mRewriter;
-}
-
-SwUndoId SwUndoStart::GetEffectiveId() const
-{
- return GetUserId();
-}
-
-void SwUndoStart::SetRewriter(const SwRewriter & rRewriter)
-{
- mRewriter = rRewriter;
-}
-
-// END
-SwUndoEnd::SwUndoEnd( SwUndoId nInitId )
- : SwUndo( UNDO_END ), nUserId( nInitId ), nSttOffset( 0 )
-{
-}
-
-void SwUndoEnd::Undo( SwUndoIter& rUndoIter )
-{
- if( rUndoIter.GetId() == GetId() || !rUndoIter.GetId() )
- rUndoIter.bWeiter = TRUE;
- if( rUndoIter.bWeiter )
- ++rUndoIter.nEndCnt;
-}
-
-void SwUndoEnd::Redo( SwUndoIter& rUndoIter )
-{
- if( !( --rUndoIter.nEndCnt ) && rUndoIter.bWeiter &&
- ( rUndoIter.GetId() ? ( rUndoIter.GetId() == nUserId ||
- ( UNDO_END == rUndoIter.GetId() && UNDO_START == GetId() )) : TRUE ))
- rUndoIter.bWeiter = FALSE;
-}
-
-void SwUndoEnd::Repeat( SwUndoIter& rUndoIter )
-{
- rUndoIter.bWeiter = FALSE;
-}
-
-String SwUndoEnd::GetComment() const
-{
- String sResult;
-
- switch (nUserId)
- {
- case UNDO_START:
- case UNDO_END:
- sResult = String("??", RTL_TEXTENCODING_ASCII_US);
-
- break;
- default:
- sResult = SW_RES(UNDO_BASE + nUserId);
- sResult = GetRewriter().Apply(sResult);
- }
-
- return sResult;
-}
-
-void SwUndoEnd::SetRewriter(const SwRewriter & rRewriter)
-{
- mRewriter = rRewriter;
-}
-
-SwUndoId SwUndoEnd::GetEffectiveId() const
-{
- return GetUserId();
-}
-
-SwRewriter SwUndoEnd::GetRewriter() const
-{
- return mRewriter;
-}
-
-/* */
// sicher und setze die RedlineDaten
SwRedlineSaveData::SwRedlineSaveData( SwComparePosition eCmpPos,
const SwPosition& rSttPos,
const SwPosition& rEndPos,
SwRedline& rRedl,
- BOOL bCopyNext )
+ sal_Bool bCopyNext )
: SwUndRng( rRedl ),
SwRedlineData( rRedl.GetRedlineData(), bCopyNext )
{
@@ -1126,8 +1065,8 @@ void SwRedlineSaveData::RedlineToDoc( SwPaM& rPam )
rDoc.SetRedlineMode_intern( eOld );
}
-BOOL SwUndo::FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData,
- BOOL bDelRange, BOOL bCopyNext )
+sal_Bool SwUndo::FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData,
+ sal_Bool bDelRange, sal_Bool bCopyNext )
{
if( rSData.Count() )
rSData.DeleteAndDestroy( 0, rSData.Count() );
@@ -1135,7 +1074,7 @@ BOOL SwUndo::FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData,
SwRedlineSaveData* pNewData;
const SwPosition *pStt = rRange.Start(), *pEnd = rRange.End();
const SwRedlineTbl& rTbl = rRange.GetDoc()->GetRedlineTbl();
- USHORT n = 0;
+ sal_uInt16 n = 0;
rRange.GetDoc()->GetRedline( *pStt, &n );
for( ; n < rTbl.Count(); ++n )
{
@@ -1156,7 +1095,7 @@ BOOL SwUndo::FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData,
return 0 != rSData.Count();
}
-BOOL SwUndo::FillSaveDataForFmt( const SwPaM& rRange, SwRedlineSaveDatas& rSData )
+sal_Bool SwUndo::FillSaveDataForFmt( const SwPaM& rRange, SwRedlineSaveDatas& rSData )
{
if( rSData.Count() )
rSData.DeleteAndDestroy( 0, rSData.Count() );
@@ -1164,7 +1103,7 @@ BOOL SwUndo::FillSaveDataForFmt( const SwPaM& rRange, SwRedlineSaveDatas& rSData
SwRedlineSaveData* pNewData;
const SwPosition *pStt = rRange.Start(), *pEnd = rRange.End();
const SwRedlineTbl& rTbl = rRange.GetDoc()->GetRedlineTbl();
- USHORT n = 0;
+ sal_uInt16 n = 0;
rRange.GetDoc()->GetRedline( *pStt, &n );
for( ; n < rTbl.Count(); ++n )
{
@@ -1178,7 +1117,7 @@ BOOL SwUndo::FillSaveDataForFmt( const SwPaM& rRange, SwRedlineSaveDatas& rSData
POS_COLLIDE_END != eCmpPos && POS_COLLIDE_START != eCmpPos )
{
pNewData = new SwRedlineSaveData( eCmpPos, *pStt, *pEnd,
- *pRedl, TRUE );
+ *pRedl, sal_True );
rSData.Insert( pNewData, rSData.Count() );
}
@@ -1194,7 +1133,7 @@ void SwUndo::SetSaveData( SwDoc& rDoc, const SwRedlineSaveDatas& rSData )
rDoc.SetRedlineMode_intern( (RedlineMode_t)(( eOld & ~nsRedlineMode_t::REDLINE_IGNORE) | nsRedlineMode_t::REDLINE_ON ));
SwPaM aPam( rDoc.GetNodes().GetEndOfContent() );
- for( USHORT n = rSData.Count(); n; )
+ for( sal_uInt16 n = rSData.Count(); n; )
rSData[ --n ]->RedlineToDoc( aPam );
#if OSL_DEBUG_LEVEL > 1
@@ -1207,23 +1146,23 @@ void SwUndo::SetSaveData( SwDoc& rDoc, const SwRedlineSaveDatas& rSData )
rDoc.SetRedlineMode_intern( eOld );
}
-BOOL SwUndo::HasHiddenRedlines( const SwRedlineSaveDatas& rSData )
+sal_Bool SwUndo::HasHiddenRedlines( const SwRedlineSaveDatas& rSData )
{
- for( USHORT n = rSData.Count(); n; )
+ for( sal_uInt16 n = rSData.Count(); n; )
if( rSData[ --n ]->GetMvSttIdx() )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
-BOOL SwUndo::CanRedlineGroup( SwRedlineSaveDatas& rCurr,
- const SwRedlineSaveDatas& rCheck, BOOL bCurrIsEnd )
+sal_Bool SwUndo::CanRedlineGroup( SwRedlineSaveDatas& rCurr,
+ const SwRedlineSaveDatas& rCheck, sal_Bool bCurrIsEnd )
{
- BOOL bRet = FALSE;
- USHORT n;
+ sal_Bool bRet = sal_False;
+ sal_uInt16 n;
if( rCurr.Count() == rCheck.Count() )
{
- bRet = TRUE;
+ bRet = sal_True;
for( n = 0; n < rCurr.Count(); ++n )
{
const SwRedlineSaveData& rSet = *rCurr[ n ];
@@ -1234,7 +1173,7 @@ BOOL SwUndo::CanRedlineGroup( SwRedlineSaveDatas& rCurr,
: rSet.nEndCntnt != rGet.nSttCntnt ) ||
!rGet.CanCombine( rSet ) )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index 08673ba275e5..ac622f1c9601 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -29,16 +29,18 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <svl/itemiter.hxx>
#include <hintids.hxx>
-#include <svl/itemiter.hxx>
+#include <hints.hxx>
#include <fmtflcnt.hxx>
#include <fmtanchr.hxx>
#include <fmtcntnt.hxx>
#include <txtflcnt.hxx>
#include <frmfmt.hxx>
#include <flyfrm.hxx>
-#include <undobj.hxx>
+#include <UndoCore.hxx>
+#include <UndoDraw.hxx>
#include <rolbck.hxx> // fuer die Attribut History
#include <doc.hxx>
#include <docary.hxx>
@@ -50,10 +52,9 @@
#include <dcontact.hxx>
#include <ndole.hxx>
-// Inline Methode vom UndoIter
-inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
//---------------------------------------------------------------------
+// SwUndoLayBase /////////////////////////////////////////////////////////
SwUndoFlyBase::SwUndoFlyBase( SwFrmFmt* pFormat, SwUndoId nUndoId )
: SwUndo( nUndoId ), pFrmFmt( pFormat )
@@ -66,9 +67,9 @@ SwUndoFlyBase::~SwUndoFlyBase()
delete pFrmFmt;
}
-void SwUndoFlyBase::InsFly( SwUndoIter& rUndoIter, BOOL bShowSelFrm )
+void SwUndoFlyBase::InsFly(::sw::UndoRedoContext & rContext, bool bShowSelFrm)
{
- SwDoc* pDoc = &rUndoIter.GetDoc();
+ SwDoc *const pDoc = & rContext.GetDoc();
// ins Array wieder eintragen
SwSpzFrmFmts& rFlyFmts = *(SwSpzFrmFmts*)pDoc->GetSpzFrmFmts();
@@ -93,11 +94,11 @@ void SwUndoFlyBase::InsFly( SwUndoIter& rUndoIter, BOOL bShowSelFrm )
if (FLY_AT_PAGE == nRndId)
{
- aAnchor.SetPageNum( (USHORT)nNdPgPos );
+ aAnchor.SetPageNum( (sal_uInt16)nNdPgPos );
}
else
{
- SwPosition aNewPos( *rUndoIter.pAktPam->GetPoint() );
+ SwPosition aNewPos(pDoc->GetNodes().GetEndOfContent());
aNewPos.nNode = nNdPgPos;
if ((FLY_AS_CHAR == nRndId) || (FLY_AT_CHAR == nRndId))
{
@@ -133,7 +134,9 @@ void SwUndoFlyBase::InsFly( SwUndoIter& rUndoIter, BOOL bShowSelFrm )
pFrmFmt->MakeFrms();
if( bShowSelFrm )
- rUndoIter.pSelFmt = pFrmFmt;
+ {
+ rContext.SetSelections(pFrmFmt, 0);
+ }
if( GetHistory() )
GetHistory()->Rollback( pDoc );
@@ -158,12 +161,12 @@ void SwUndoFlyBase::InsFly( SwUndoIter& rUndoIter, BOOL bShowSelFrm )
case FLY_AT_PAGE:
break;
}
- bDelFmt = FALSE;
+ bDelFmt = sal_False;
}
void SwUndoFlyBase::DelFly( SwDoc* pDoc )
{
- bDelFmt = TRUE; // im DTOR das Format loeschen
+ bDelFmt = sal_True; // im DTOR das Format loeschen
pFrmFmt->DelFrms(); // Frms vernichten.
// alle Uno-Objecte sollten sich jetzt abmelden
@@ -195,12 +198,12 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc )
const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
const SwPosition* pPos = rAnchor.GetCntntAnchor();
// die Positionen im Nodes-Array haben sich verschoben
- nRndId = static_cast<USHORT>(rAnchor.GetAnchorId());
+ nRndId = static_cast<sal_uInt16>(rAnchor.GetAnchorId());
if (FLY_AS_CHAR == nRndId)
{
nNdPgPos = pPos->nNode.GetIndex();
nCntPos = pPos->nContent.GetIndex();
- SwTxtNode *pTxtNd = pDoc->GetNodes()[ pPos->nNode ]->GetTxtNode();
+ SwTxtNode *const pTxtNd = pPos->nNode.GetNode().GetTxtNode();
OSL_ENSURE( pTxtNd, "Kein Textnode gefunden" );
SwTxtFlyCnt* const pAttr = static_cast<SwTxtFlyCnt*>(
pTxtNd->GetTxtAttrForCharAt( nCntPos, RES_TXTATR_FLYCNT ) );
@@ -235,16 +238,16 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc )
rFlyFmts.Remove( rFlyFmts.GetPos( pFrmFmt ));
}
-// ----- Undo-InsertFly ------
+// SwUndoInsLayFmt ///////////////////////////////////////////////////////
-SwUndoInsLayFmt::SwUndoInsLayFmt( SwFrmFmt* pFormat, ULONG nNodeIdx, xub_StrLen nCntIdx )
+SwUndoInsLayFmt::SwUndoInsLayFmt( SwFrmFmt* pFormat, sal_uLong nNodeIdx, xub_StrLen nCntIdx )
: SwUndoFlyBase( pFormat, RES_DRAWFRMFMT == pFormat->Which() ?
UNDO_INSDRAWFMT : UNDO_INSLAYFMT ),
mnCrsrSaveIndexPara( nNodeIdx ), mnCrsrSaveIndexPos( nCntIdx )
{
const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
- nRndId = static_cast<USHORT>(rAnchor.GetAnchorId());
- bDelFmt = FALSE;
+ nRndId = static_cast<sal_uInt16>(rAnchor.GetAnchorId());
+ bDelFmt = sal_False;
switch( nRndId )
{
case FLY_AT_PAGE:
@@ -263,7 +266,7 @@ SwUndoInsLayFmt::SwUndoInsLayFmt( SwFrmFmt* pFormat, ULONG nNodeIdx, xub_StrLen
}
break;
default:
- OSL_ENSURE( FALSE, "Was denn fuer ein FlyFrame?" );
+ OSL_ENSURE( sal_False, "Was denn fuer ein FlyFrame?" );
}
}
@@ -271,52 +274,52 @@ SwUndoInsLayFmt::~SwUndoInsLayFmt()
{
}
-void SwUndoInsLayFmt::Undo( SwUndoIter& rUndoIter )
+void SwUndoInsLayFmt::UndoImpl(::sw::UndoRedoContext & rContext)
{
+ SwDoc & rDoc(rContext.GetDoc());
const SwFmtCntnt& rCntnt = pFrmFmt->GetCntnt();
if( rCntnt.GetCntntIdx() ) // kein Inhalt
{
bool bRemoveIdx = true;
if( mnCrsrSaveIndexPara > 0 )
{
- SwTxtNode *pNode = rUndoIter.GetDoc().GetNodes()[mnCrsrSaveIndexPara]->GetTxtNode();
+ SwTxtNode *const pNode =
+ rDoc.GetNodes()[mnCrsrSaveIndexPara]->GetTxtNode();
if( pNode )
{
- SwNodeIndex aIdx( rUndoIter.GetDoc().GetNodes(), rCntnt.GetCntntIdx()->GetIndex() );
- SwNodeIndex aEndIdx( rUndoIter.GetDoc().GetNodes(), aIdx.GetNode().EndOfSectionIndex() );
+ SwNodeIndex aIdx( rDoc.GetNodes(),
+ rCntnt.GetCntntIdx()->GetIndex() );
+ SwNodeIndex aEndIdx( rDoc.GetNodes(),
+ aIdx.GetNode().EndOfSectionIndex() );
SwIndex aIndex( pNode, mnCrsrSaveIndexPos );
SwPosition aPos( *pNode, aIndex );
- rUndoIter.GetDoc().CorrAbs( aIdx, aEndIdx, aPos, TRUE );
+ rDoc.CorrAbs( aIdx, aEndIdx, aPos, sal_True );
bRemoveIdx = false;
}
}
if( bRemoveIdx )
- RemoveIdxFromSection( rUndoIter.GetDoc(),
- rCntnt.GetCntntIdx()->GetIndex() );
+ {
+ RemoveIdxFromSection( rDoc, rCntnt.GetCntntIdx()->GetIndex() );
+ }
}
- DelFly( &rUndoIter.GetDoc() );
+ DelFly(& rDoc);
}
-void SwUndoInsLayFmt::Redo( SwUndoIter& rUndoIter )
+void SwUndoInsLayFmt::RedoImpl(::sw::UndoRedoContext & rContext)
{
- rUndoIter.pLastUndoObj = 0;
- InsFly( rUndoIter );
+ InsFly(rContext);
}
-void SwUndoInsLayFmt::Repeat( SwUndoIter& rUndoIter )
+void SwUndoInsLayFmt::RepeatImpl(::sw::RepeatContext & rContext)
{
- if( UNDO_INSLAYFMT == rUndoIter.GetLastUndoId() &&
- pFrmFmt == ((SwUndoInsLayFmt*)rUndoIter.pLastUndoObj)->pFrmFmt )
- return;
-
- SwDoc* pDoc = &rUndoIter.GetDoc();
+ SwDoc *const pDoc = & rContext.GetDoc();
// erfrage und setze den Anker neu
SwFmtAnchor aAnchor( pFrmFmt->GetAnchor() );
if ((FLY_AT_PARA == aAnchor.GetAnchorId()) ||
(FLY_AT_CHAR == aAnchor.GetAnchorId()) ||
(FLY_AS_CHAR == aAnchor.GetAnchorId()))
{
- SwPosition aPos( *rUndoIter.pAktPam->GetPoint() );
+ SwPosition aPos( *rContext.GetRepeatPaM().GetPoint() );
if (FLY_AT_PARA == aAnchor.GetAnchorId())
{
aPos.nContent.Assign( 0, 0 );
@@ -325,7 +328,8 @@ void SwUndoInsLayFmt::Repeat( SwUndoIter& rUndoIter )
}
else if( FLY_AT_FLY == aAnchor.GetAnchorId() )
{
- const SwStartNode* pSttNd = rUndoIter.pAktPam->GetNode()->FindFlyStartNode();
+ SwStartNode const*const pSttNd =
+ rContext.GetRepeatPaM().GetNode()->FindFlyStartNode();
if( pSttNd )
{
SwPosition aPos( *pSttNd );
@@ -333,23 +337,22 @@ void SwUndoInsLayFmt::Repeat( SwUndoIter& rUndoIter )
}
else
{
- rUndoIter.pLastUndoObj = this;
return ;
}
}
else if (FLY_AT_PAGE == aAnchor.GetAnchorId())
{
- aAnchor.SetPageNum( pDoc->GetRootFrm()->GetCurrPage(
- rUndoIter.pAktPam ));
+ aAnchor.SetPageNum(
+ pDoc->GetRootFrm()->GetCurrPage(& rContext.GetRepeatPaM()) );
}
else {
- OSL_ENSURE( FALSE, "was fuer ein Anker ist es denn nun?" );
+ OSL_ENSURE( sal_False, "was fuer ein Anker ist es denn nun?" );
}
SwFrmFmt* pFlyFmt = pDoc->CopyLayoutFmt( *pFrmFmt, aAnchor, true, true );
- rUndoIter.pSelFmt = pFlyFmt;
-
- rUndoIter.pLastUndoObj = this;
+ (void) pFlyFmt;
+//FIXME nobody ever did anything with this selection:
+// rContext.SetSelections(pFlyFmt, 0);
}
// #111827#
@@ -357,7 +360,12 @@ String SwUndoInsLayFmt::GetComment() const
{
String aResult;
- if (! pComment)
+ // HACK: disable caching:
+ // the SfxUndoManager calls GetComment() too early: the pFrmFmt does not
+ // have a SwDrawContact yet, so it will fall back to SwUndo::GetComment(),
+ // which sets pComment to a wrong value.
+// if (! pComment)
+ if (true)
{
/*
If frame format is present and has an SdrObject use the undo
@@ -384,28 +392,37 @@ String SwUndoInsLayFmt::GetComment() const
return aResult;
}
-// ----- Undo-DeleteFly ------
+// SwUndoDelLayFmt ///////////////////////////////////////////////////////
-SwUndoDelLayFmt::SwUndoDelLayFmt( SwFrmFmt* pFormat )
- : SwUndoFlyBase( pFormat, UNDO_DELLAYFMT ), bShowSelFrm( TRUE )
+static SwUndoId
+lcl_GetSwUndoId(SwFrmFmt *const pFrmFmt)
{
- SwDoc* pDoc = pFormat->GetDoc();
- DelFly( pDoc );
-
- SwNodeIndex* pIdx = GetMvSttIdx();
- SwNode* pNd;
- if( 1 == GetMvNodeCnt() && pIdx &&
- ( pNd = (*pDoc->GetUndoNds())[ *pIdx ] )->IsNoTxtNode() )
+ if (RES_DRAWFRMFMT != pFrmFmt->Which())
{
- // dann setze eine andere Undo-ID; Grafik oder OLE
- if( pNd->IsGrfNode() )
- SetId( UNDO_DELGRF );
- else if( pNd->IsOLENode() )
- {
- SetId( UNDO_DELETE );
+ const SwFmtCntnt& rCntnt = pFrmFmt->GetCntnt();
+ OSL_ENSURE( rCntnt.GetCntntIdx(), "Fly without content" );
+ SwNodeIndex firstNode(*rCntnt.GetCntntIdx(), 1);
+ SwNoTxtNode *const pNoTxtNode(firstNode.GetNode().GetNoTxtNode());
+ if (pNoTxtNode && pNoTxtNode->IsGrfNode())
+ {
+ return UNDO_DELGRF;
+ }
+ else if (pNoTxtNode && pNoTxtNode->IsOLENode())
+ {
+ // surprisingly not UNDO_DELOLE, which does not seem to work
+ return UNDO_DELETE;
}
}
+ return UNDO_DELLAYFMT;
+}
+
+SwUndoDelLayFmt::SwUndoDelLayFmt( SwFrmFmt* pFormat )
+ : SwUndoFlyBase( pFormat, lcl_GetSwUndoId(pFormat) )
+ , bShowSelFrm( sal_True )
+{
+ SwDoc* pDoc = pFormat->GetDoc();
+ DelFly( pDoc );
}
SwRewriter SwUndoDelLayFmt::GetRewriter() const
@@ -419,7 +436,7 @@ SwRewriter SwUndoDelLayFmt::GetRewriter() const
SwNodeIndex* pIdx = GetMvSttIdx();
if( 1 == GetMvNodeCnt() && pIdx)
{
- SwNode * pNd = (*pDoc->GetUndoNds())[ *pIdx ];
+ SwNode *const pNd = & pIdx->GetNode();
if ( pNd->IsNoTxtNode() && pNd->IsOLENode())
{
@@ -433,22 +450,24 @@ SwRewriter SwUndoDelLayFmt::GetRewriter() const
return aRewriter;
}
-void SwUndoDelLayFmt::Undo( SwUndoIter& rUndoIter )
+void SwUndoDelLayFmt::UndoImpl(::sw::UndoRedoContext & rContext)
{
- InsFly( rUndoIter, bShowSelFrm );
+ InsFly( rContext, bShowSelFrm );
}
-void SwUndoDelLayFmt::Redo( SwUndoIter& rUndoIter )
+void SwUndoDelLayFmt::RedoImpl(::sw::UndoRedoContext & rContext)
{
+ SwDoc & rDoc(rContext.GetDoc());
const SwFmtCntnt& rCntnt = pFrmFmt->GetCntnt();
if( rCntnt.GetCntntIdx() ) // kein Inhalt
- RemoveIdxFromSection( rUndoIter.GetDoc(),
- rCntnt.GetCntntIdx()->GetIndex() );
+ {
+ RemoveIdxFromSection(rDoc, rCntnt.GetCntntIdx()->GetIndex());
+ }
- DelFly( &rUndoIter.GetDoc() );
+ DelFly(& rDoc);
}
-void SwUndoDelLayFmt::Redo()
+void SwUndoDelLayFmt::RedoForRollback()
{
const SwFmtCntnt& rCntnt = pFrmFmt->GetCntnt();
if( rCntnt.GetCntntIdx() ) // kein Inhalt
@@ -458,7 +477,7 @@ void SwUndoDelLayFmt::Redo()
DelFly( pFrmFmt->GetDoc() );
}
-/* */
+// SwUndoSetFlyFmt ///////////////////////////////////////////////////////
SwUndoSetFlyFmt::SwUndoSetFlyFmt( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFrmFmt )
: SwUndo( UNDO_SETFLYFRMFMT ), SwClient( &rFlyFmt ), pFrmFmt( &rFlyFmt ),
@@ -467,7 +486,7 @@ SwUndoSetFlyFmt::SwUndoSetFlyFmt( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFrmFmt )
rFlyFmt.GetAttrSet().GetRanges() )),
nOldNode( 0 ), nNewNode( 0 ),
nOldCntnt( 0 ), nNewCntnt( 0 ),
- nOldAnchorTyp( 0 ), nNewAnchorTyp( 0 ), bAnchorChgd( FALSE )
+ nOldAnchorTyp( 0 ), nNewAnchorTyp( 0 ), bAnchorChgd( sal_False )
{
}
@@ -488,7 +507,7 @@ SwUndoSetFlyFmt::~SwUndoSetFlyFmt()
}
void SwUndoSetFlyFmt::GetAnchor( SwFmtAnchor& rAnchor,
- ULONG nNode, xub_StrLen nCntnt )
+ sal_uLong nNode, xub_StrLen nCntnt )
{
RndStdIds nAnchorTyp = rAnchor.GetAnchorId();
if (FLY_AT_PAGE != nAnchorTyp)
@@ -534,9 +553,9 @@ void SwUndoSetFlyFmt::GetAnchor( SwFmtAnchor& rAnchor,
rAnchor.SetPageNum( nCntnt );
}
-void SwUndoSetFlyFmt::Undo( SwUndoIter& rIter )
+void SwUndoSetFlyFmt::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
// ist das neue Format noch vorhanden ??
if( USHRT_MAX != rDoc.GetFrmFmts()->GetPos( (const SwFrmFmtPtr)pOldFmt ) )
@@ -604,13 +623,13 @@ void SwUndoSetFlyFmt::Undo( SwUndoIter& rIter )
pFrmFmt->MakeFrms();
}
- rIter.pSelFmt = pFrmFmt;
+ rContext.SetSelections(pFrmFmt, 0);
}
}
-void SwUndoSetFlyFmt::Redo( SwUndoIter& rIter )
+void SwUndoSetFlyFmt::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
// ist das neue Format noch vorhanden ??
if( USHRT_MAX != rDoc.GetFrmFmts()->GetPos( (const SwFrmFmtPtr)pNewFmt ) )
@@ -627,11 +646,11 @@ void SwUndoSetFlyFmt::Redo( SwUndoIter& rIter )
else
rDoc.SetFrmFmtToFly( *pFrmFmt, *pNewFmt, 0 );
- rIter.pSelFmt = pFrmFmt;
+ rContext.SetSelections(pFrmFmt, 0);
}
}
-void SwUndoSetFlyFmt::PutAttr( USHORT nWhich, const SfxPoolItem* pItem )
+void SwUndoSetFlyFmt::PutAttr( sal_uInt16 nWhich, const SfxPoolItem* pItem )
{
if( pItem && pItem != GetDfltAttr( nWhich ) )
{
@@ -641,10 +660,10 @@ void SwUndoSetFlyFmt::PutAttr( USHORT nWhich, const SfxPoolItem* pItem )
// nur den 1. Ankerwechsel vermerken
OSL_ENSURE( !bAnchorChgd, "mehrfacher Ankerwechsel nicht erlaubt!" );
- bAnchorChgd = TRUE;
+ bAnchorChgd = sal_True;
const SwFmtAnchor* pAnchor = (SwFmtAnchor*)pItem;
- switch( nOldAnchorTyp = static_cast<USHORT>(pAnchor->GetAnchorId()) )
+ switch( nOldAnchorTyp = static_cast<sal_uInt16>(pAnchor->GetAnchorId()) )
{
case FLY_AS_CHAR:
case FLY_AT_CHAR:
@@ -659,7 +678,7 @@ void SwUndoSetFlyFmt::PutAttr( USHORT nWhich, const SfxPoolItem* pItem )
}
pAnchor = (SwFmtAnchor*)&pFrmFmt->GetAnchor();
- switch( nNewAnchorTyp = static_cast<USHORT>(pAnchor->GetAnchorId()) )
+ switch( nNewAnchorTyp = static_cast<sal_uInt16>(pAnchor->GetAnchorId()) )
{
case FLY_AS_CHAR:
case FLY_AT_CHAR:
@@ -684,7 +703,7 @@ void SwUndoSetFlyFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* )
{
if( pOld )
{
- USHORT nWhich = pOld->Which();
+ sal_uInt16 nWhich = pOld->Which();
if( nWhich < POOLATTR_END )
PutAttr( nWhich, pOld );
diff --git a/sw/source/core/undo/undoflystrattr.cxx b/sw/source/core/undo/undoflystrattr.cxx
index 3facce917f88..8358603fbed4 100644
--- a/sw/source/core/undo/undoflystrattr.cxx
+++ b/sw/source/core/undo/undoflystrattr.cxx
@@ -50,7 +50,7 @@ SwUndoFlyStrAttr::~SwUndoFlyStrAttr()
{
}
-void SwUndoFlyStrAttr::Undo( SwUndoIter& )
+void SwUndoFlyStrAttr::UndoImpl(::sw::UndoRedoContext &)
{
switch ( GetId() )
{
@@ -70,7 +70,7 @@ void SwUndoFlyStrAttr::Undo( SwUndoIter& )
}
}
-void SwUndoFlyStrAttr::Redo( SwUndoIter& )
+void SwUndoFlyStrAttr::RedoImpl(::sw::UndoRedoContext &)
{
switch ( GetId() )
{
@@ -90,11 +90,6 @@ void SwUndoFlyStrAttr::Redo( SwUndoIter& )
}
}
-void SwUndoFlyStrAttr::Repeat( SwUndoIter& )
-{
- // no repeat
-}
-
SwRewriter SwUndoFlyStrAttr::GetRewriter() const
{
SwRewriter aResult;
diff --git a/sw/source/core/undo/undraw.cxx b/sw/source/core/undo/undraw.cxx
index 81f6dce132b1..2c93d6a55045 100644
--- a/sw/source/core/undo/undraw.cxx
+++ b/sw/source/core/undo/undraw.cxx
@@ -29,25 +29,30 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <UndoDraw.hxx>
+
#include <rtl/string.h>
#include <rtl/memory.h>
-#include <hintids.hxx>
#include <svx/svdogrp.hxx>
#include <svx/svdundo.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdmark.hxx>
+
+#include <hintids.hxx>
+#include <hints.hxx>
#include <fmtanchr.hxx>
#include <fmtflcnt.hxx>
#include <txtflcnt.hxx>
#include <frmfmt.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docary.hxx>
#include <frame.hxx>
#include <swundo.hxx> // fuer die UndoIds
#include <pam.hxx>
#include <ndtxt.hxx>
-#include <undobj.hxx>
+#include <UndoCore.hxx>
#include <dcontact.hxx>
#include <dview.hxx>
#include <rootfrm.hxx>
@@ -58,34 +63,32 @@ struct SwUndoGroupObjImpl
{
SwDrawFrmFmt* pFmt;
SdrObject* pObj;
- ULONG nNodeIdx;
+ sal_uLong nNodeIdx;
// OD 2004-04-15 #i26791# - keeping the anchor and the relative position
// of drawing objects no longer needed
};
-inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
-
// Draw-Objecte
IMPL_LINK( SwDoc, AddDrawUndo, SdrUndoAction *, pUndo )
{
#if OSL_DEBUG_LEVEL > 1
- USHORT nId = pUndo->GetId();
+ sal_uInt16 nId = pUndo->GetId();
(void)nId;
String sComment( pUndo->GetComment() );
#endif
- if( DoesUndo() && !IsNoDrawUndoObj() )
+ if (GetIDocumentUndoRedo().DoesUndo() &&
+ GetIDocumentUndoRedo().DoesDrawUndo())
{
- ClearRedo();
const SdrMarkList* pMarkList = 0;
ViewShell* pSh = GetRootFrm() ? GetRootFrm()->GetCurrShell() : 0;
if( pSh && pSh->HasDrawView() )
pMarkList = &pSh->GetDrawView()->GetMarkedObjectList();
- AppendUndo( new SwSdrUndo( pUndo, pMarkList ) );
+ GetIDocumentUndoRedo().AppendUndo( new SwSdrUndo(pUndo, pMarkList) );
}
else
delete pUndo;
@@ -107,16 +110,16 @@ SwSdrUndo::~SwSdrUndo()
delete pMarkList;
}
-void SwSdrUndo::Undo( SwUndoIter& rUndoIter )
+void SwSdrUndo::UndoImpl(::sw::UndoRedoContext & rContext)
{
pSdrUndo->Undo();
- rUndoIter.pMarkList = pMarkList;
+ rContext.SetSelections(0, pMarkList);
}
-void SwSdrUndo::Redo( SwUndoIter& rUndoIter )
+void SwSdrUndo::RedoImpl(::sw::UndoRedoContext & rContext)
{
pSdrUndo->Redo();
- rUndoIter.pMarkList = pMarkList;
+ rContext.SetSelections(0, pMarkList);
}
String SwSdrUndo::GetComment() const
@@ -132,7 +135,7 @@ void lcl_SendRemoveToUno( SwFmt& rFmt )
rFmt.Modify( &aMsgHint, &aMsgHint );
}
-void lcl_SaveAnchor( SwFrmFmt* pFmt, ULONG& rNodePos )
+void lcl_SaveAnchor( SwFrmFmt* pFmt, sal_uLong& rNodePos )
{
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
@@ -170,7 +173,7 @@ void lcl_SaveAnchor( SwFrmFmt* pFmt, ULONG& rNodePos )
}
}
-void lcl_RestoreAnchor( SwFrmFmt* pFmt, ULONG& rNodePos )
+void lcl_RestoreAnchor( SwFrmFmt* pFmt, sal_uLong& rNodePos )
{
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
@@ -203,8 +206,8 @@ void lcl_RestoreAnchor( SwFrmFmt* pFmt, ULONG& rNodePos )
}
}
-SwUndoDrawGroup::SwUndoDrawGroup( USHORT nCnt )
- : SwUndo( UNDO_DRAWGROUP ), nSize( nCnt + 1 ), bDelFmt( TRUE )
+SwUndoDrawGroup::SwUndoDrawGroup( sal_uInt16 nCnt )
+ : SwUndo( UNDO_DRAWGROUP ), nSize( nCnt + 1 ), bDelFmt( sal_True )
{
pObjArr = new SwUndoGroupObjImpl[ nSize ];
}
@@ -214,7 +217,7 @@ SwUndoDrawGroup::~SwUndoDrawGroup()
if( bDelFmt )
{
SwUndoGroupObjImpl* pTmp = pObjArr + 1;
- for( USHORT n = 1; n < nSize; ++n, ++pTmp )
+ for( sal_uInt16 n = 1; n < nSize; ++n, ++pTmp )
delete pTmp->pFmt;
}
else
@@ -223,9 +226,9 @@ SwUndoDrawGroup::~SwUndoDrawGroup()
delete [] pObjArr;
}
-void SwUndoDrawGroup::Undo( SwUndoIter& )
+void SwUndoDrawGroup::UndoImpl(::sw::UndoRedoContext &)
{
- bDelFmt = FALSE;
+ bDelFmt = sal_False;
// das Group-Object sichern
SwDrawFrmFmt* pFmt = pObjArr->pFmt;
@@ -247,7 +250,7 @@ void SwUndoDrawGroup::Undo( SwUndoIter& )
SwSpzFrmFmts& rFlyFmts = *(SwSpzFrmFmts*)pDoc->GetSpzFrmFmts();
rFlyFmts.Remove( rFlyFmts.GetPos( pFmt ));
- for( USHORT n = 1; n < nSize; ++n )
+ for( sal_uInt16 n = 1; n < nSize; ++n )
{
SwUndoGroupObjImpl& rSave = *( pObjArr + n );
@@ -274,16 +277,16 @@ void SwUndoDrawGroup::Undo( SwUndoIter& )
}
}
-void SwUndoDrawGroup::Redo( SwUndoIter& )
+void SwUndoDrawGroup::RedoImpl(::sw::UndoRedoContext &)
{
- bDelFmt = TRUE;
+ bDelFmt = sal_True;
// aus dem Array austragen
SwDoc* pDoc = pObjArr->pFmt->GetDoc();
SwSpzFrmFmts& rFlyFmts = *(SwSpzFrmFmts*)pDoc->GetSpzFrmFmts();
SdrObject* pObj;
- for( USHORT n = 1; n < nSize; ++n )
+ for( sal_uInt16 n = 1; n < nSize; ++n )
{
SwUndoGroupObjImpl& rSave = *( pObjArr + n );
@@ -324,7 +327,7 @@ void SwUndoDrawGroup::Redo( SwUndoIter& )
// <--
}
-void SwUndoDrawGroup::AddObj( USHORT nPos, SwDrawFrmFmt* pFmt, SdrObject* pObj )
+void SwUndoDrawGroup::AddObj( sal_uInt16 nPos, SwDrawFrmFmt* pFmt, SdrObject* pObj )
{
SwUndoGroupObjImpl& rSave = *( pObjArr + nPos + 1 );
rSave.pObj = pObj;
@@ -349,9 +352,9 @@ void SwUndoDrawGroup::SetGroupFmt( SwDrawFrmFmt* pFmt )
// ------------------------------
SwUndoDrawUnGroup::SwUndoDrawUnGroup( SdrObjGroup* pObj )
- : SwUndo( UNDO_DRAWUNGROUP ), bDelFmt( FALSE )
+ : SwUndo( UNDO_DRAWUNGROUP ), bDelFmt( sal_False )
{
- nSize = (USHORT)pObj->GetSubList()->GetObjCount() + 1;
+ nSize = (sal_uInt16)pObj->GetSubList()->GetObjCount() + 1;
pObjArr = new SwUndoGroupObjImpl[ nSize ];
SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj);
@@ -379,7 +382,7 @@ SwUndoDrawUnGroup::~SwUndoDrawUnGroup()
if( bDelFmt )
{
SwUndoGroupObjImpl* pTmp = pObjArr + 1;
- for( USHORT n = 1; n < nSize; ++n, ++pTmp )
+ for( sal_uInt16 n = 1; n < nSize; ++n, ++pTmp )
delete pTmp->pFmt;
}
else
@@ -388,15 +391,15 @@ SwUndoDrawUnGroup::~SwUndoDrawUnGroup()
delete [] pObjArr;
}
-void SwUndoDrawUnGroup::Undo( SwUndoIter& rIter )
+void SwUndoDrawUnGroup::UndoImpl(::sw::UndoRedoContext & rContext)
{
- bDelFmt = TRUE;
+ bDelFmt = sal_True;
- // aus dem Array austragen
- SwDoc* pDoc = &rIter.GetDoc();
+ SwDoc *const pDoc = & rContext.GetDoc();
SwSpzFrmFmts& rFlyFmts = *(SwSpzFrmFmts*)pDoc->GetSpzFrmFmts();
- for( USHORT n = 1; n < nSize; ++n )
+ // remove from array
+ for( sal_uInt16 n = 1; n < nSize; ++n )
{
SwUndoGroupObjImpl& rSave = *( pObjArr + n );
@@ -440,9 +443,9 @@ void SwUndoDrawUnGroup::Undo( SwUndoIter& rIter )
// <--
}
-void SwUndoDrawUnGroup::Redo( SwUndoIter& )
+void SwUndoDrawUnGroup::RedoImpl(::sw::UndoRedoContext &)
{
- bDelFmt = FALSE;
+ bDelFmt = sal_False;
// das Group-Object sichern
SwDrawFrmFmt* pFmt = pObjArr->pFmt;
@@ -463,7 +466,7 @@ void SwUndoDrawUnGroup::Redo( SwUndoIter& )
SwSpzFrmFmts& rFlyFmts = *(SwSpzFrmFmts*)pDoc->GetSpzFrmFmts();
rFlyFmts.Remove( rFlyFmts.GetPos( pFmt ));
- for( USHORT n = 1; n < nSize; ++n )
+ for( sal_uInt16 n = 1; n < nSize; ++n )
{
SwUndoGroupObjImpl& rSave = *( pObjArr + n );
@@ -492,7 +495,7 @@ void SwUndoDrawUnGroup::Redo( SwUndoIter& )
}
}
-void SwUndoDrawUnGroup::AddObj( USHORT nPos, SwDrawFrmFmt* pFmt )
+void SwUndoDrawUnGroup::AddObj( sal_uInt16 nPos, SwDrawFrmFmt* pFmt )
{
SwUndoGroupObjImpl& rSave = *( pObjArr + nPos + 1 );
rSave.pFmt = pFmt;
@@ -510,7 +513,8 @@ SwUndoDrawUnGroupConnectToLayout::~SwUndoDrawUnGroupConnectToLayout()
{
}
-void SwUndoDrawUnGroupConnectToLayout::Undo( SwUndoIter& )
+void
+SwUndoDrawUnGroupConnectToLayout::UndoImpl(::sw::UndoRedoContext &)
{
for ( std::vector< SdrObject >::size_type i = 0;
i < aDrawFmtsAndObjs.size(); ++i )
@@ -529,7 +533,8 @@ void SwUndoDrawUnGroupConnectToLayout::Undo( SwUndoIter& )
}
}
-void SwUndoDrawUnGroupConnectToLayout::Redo( SwUndoIter& )
+void
+SwUndoDrawUnGroupConnectToLayout::RedoImpl(::sw::UndoRedoContext &)
{
for ( std::vector< std::pair< SwDrawFrmFmt*, SdrObject* > >::size_type i = 0;
i < aDrawFmtsAndObjs.size(); ++i )
@@ -552,8 +557,8 @@ void SwUndoDrawUnGroupConnectToLayout::AddFmtAndObj( SwDrawFrmFmt* pDrawFrmFmt,
//-------------------------------------
-SwUndoDrawDelete::SwUndoDrawDelete( USHORT nCnt )
- : SwUndo( UNDO_DRAWDELETE ), nSize( nCnt ), bDelFmt( TRUE )
+SwUndoDrawDelete::SwUndoDrawDelete( sal_uInt16 nCnt )
+ : SwUndo( UNDO_DRAWDELETE ), nSize( nCnt ), bDelFmt( sal_True )
{
pObjArr = new SwUndoGroupObjImpl[ nSize ];
pMarkLst = new SdrMarkList();
@@ -564,18 +569,18 @@ SwUndoDrawDelete::~SwUndoDrawDelete()
if( bDelFmt )
{
SwUndoGroupObjImpl* pTmp = pObjArr;
- for( USHORT n = 0; n < pMarkLst->GetMarkCount(); ++n, ++pTmp )
+ for( sal_uInt16 n = 0; n < pMarkLst->GetMarkCount(); ++n, ++pTmp )
delete pTmp->pFmt;
}
delete [] pObjArr;
delete pMarkLst;
}
-void SwUndoDrawDelete::Undo( SwUndoIter &rIter )
+void SwUndoDrawDelete::UndoImpl(::sw::UndoRedoContext & rContext)
{
- bDelFmt = FALSE;
- SwSpzFrmFmts& rFlyFmts = *rIter.GetDoc().GetSpzFrmFmts();
- for( USHORT n = 0; n < pMarkLst->GetMarkCount(); ++n )
+ bDelFmt = sal_False;
+ SwSpzFrmFmts & rFlyFmts = *rContext.GetDoc().GetSpzFrmFmts();
+ for( sal_uInt16 n = 0; n < pMarkLst->GetMarkCount(); ++n )
{
SwUndoGroupObjImpl& rSave = *( pObjArr + n );
::lcl_RestoreAnchor( rSave.pFmt, rSave.nNodeIdx );
@@ -597,14 +602,14 @@ void SwUndoDrawDelete::Undo( SwUndoIter &rIter )
}
// <--
}
- rIter.pMarkList = pMarkLst;
+ rContext.SetSelections(0, pMarkLst);
}
-void SwUndoDrawDelete::Redo( SwUndoIter &rIter )
+void SwUndoDrawDelete::RedoImpl(::sw::UndoRedoContext & rContext)
{
- bDelFmt = TRUE;
- SwSpzFrmFmts& rFlyFmts = *rIter.GetDoc().GetSpzFrmFmts();
- for( USHORT n = 0; n < pMarkLst->GetMarkCount(); ++n )
+ bDelFmt = sal_True;
+ SwSpzFrmFmts & rFlyFmts = *rContext.GetDoc().GetSpzFrmFmts();
+ for( sal_uInt16 n = 0; n < pMarkLst->GetMarkCount(); ++n )
{
SwUndoGroupObjImpl& rSave = *( pObjArr + n );
SdrObject *pObj = rSave.pObj;
@@ -622,7 +627,7 @@ void SwUndoDrawDelete::Redo( SwUndoIter &rIter )
}
}
-void SwUndoDrawDelete::AddObj( USHORT , SwDrawFrmFmt* pFmt,
+void SwUndoDrawDelete::AddObj( sal_uInt16 , SwDrawFrmFmt* pFmt,
const SdrMark& rMark )
{
SwUndoGroupObjImpl& rSave = *( pObjArr + pMarkLst->GetMarkCount() );
diff --git a/sw/source/core/undo/unfmco.cxx b/sw/source/core/undo/unfmco.cxx
index 330238bbc6f1..4ba736443dba 100644
--- a/sw/source/core/undo/unfmco.cxx
+++ b/sw/source/core/undo/unfmco.cxx
@@ -36,12 +36,10 @@
#include "pam.hxx"
#include "ndtxt.hxx"
-#include "undobj.hxx"
+#include <UndoCore.hxx>
#include "rolbck.hxx"
-inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
-
//--------------------------------------------------
@@ -69,49 +67,43 @@ SwUndoFmtColl::~SwUndoFmtColl()
}
-void SwUndoFmtColl::Undo( SwUndoIter& rUndoIter )
+void SwUndoFmtColl::UndoImpl(::sw::UndoRedoContext & rContext)
{
- // die alten Werte wieder zurueck
- pHistory->TmpRollback( &rUndoIter.GetDoc(), 0 );
+ // restore old values
+ pHistory->TmpRollback(& rContext.GetDoc(), 0);
pHistory->SetTmpEnd( pHistory->Count() );
- // setze noch den Cursor auf den Undo-Bereich
- SetPaM( rUndoIter );
+ // create cursor for undo range
+ AddUndoRedoPaM(rContext);
}
-void SwUndoFmtColl::Redo( SwUndoIter& rUndoIter )
+void SwUndoFmtColl::RedoImpl(::sw::UndoRedoContext & rContext)
{
- // setze Attribut in dem Bereich:
- SetPaM( rUndoIter );
- rUndoIter.pLastUndoObj = 0;
-
- Repeat( rUndoIter ); // Collection setzen
+ SwPaM & rPam = AddUndoRedoPaM(rContext);
- rUndoIter.pLastUndoObj = 0;
+ DoSetFmtColl(rContext.GetDoc(), rPam);
}
-
-void SwUndoFmtColl::Repeat( SwUndoIter& rUndoIter )
+void SwUndoFmtColl::RepeatImpl(::sw::RepeatContext & rContext)
{
- if( UNDO_SETFMTCOLL == rUndoIter.GetLastUndoId() &&
- pFmtColl == ((SwUndoFmtColl*)rUndoIter.pLastUndoObj)->pFmtColl )
- return;
+ DoSetFmtColl(rContext.GetDoc(), rContext.GetRepeatPaM());
+}
+void SwUndoFmtColl::DoSetFmtColl(SwDoc & rDoc, SwPaM & rPaM)
+{
// es kann nur eine TextFmtColl auf einen Bereich angewendet werden,
// also erfrage auch nur in dem Array
- USHORT nPos = rUndoIter.GetDoc().GetTxtFmtColls()->GetPos(
+ sal_uInt16 const nPos = rDoc.GetTxtFmtColls()->GetPos(
(SwTxtFmtColl*)pFmtColl );
- // ist das Format ueberhaupt noch vorhanden?
+ // does the format still exist?
if( USHRT_MAX != nPos )
{
- rUndoIter.GetDoc().SetTxtFmtColl( *rUndoIter.pAktPam,
+ rDoc.SetTxtFmtColl(rPaM,
(SwTxtFmtColl*)pFmtColl,
mbReset,
mbResetListAttrs );
}
-
- rUndoIter.pLastUndoObj = this;
}
SwRewriter SwUndoFmtColl::GetRewriter() const
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 8fd74df0151f..4d3fc535d95e 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -28,6 +28,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
+#include <UndoInsert.hxx>
+
#include <hintids.hxx>
#include <unotools/charclass.hxx>
#include <sot/storage.hxx>
@@ -39,10 +42,13 @@
#include <fmtanchr.hxx>
#include <frmfmt.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <swundo.hxx> // fuer die UndoIds
#include <pam.hxx>
#include <ndtxt.hxx>
-#include <undobj.hxx>
+#include <UndoCore.hxx>
+#include <UndoDelete.hxx>
+#include <UndoAttribute.hxx>
#include <rolbck.hxx>
#include <ndgrf.hxx>
#include <ndole.hxx>
@@ -62,42 +68,6 @@
using namespace ::com::sun::star;
-class _UnReplaceData : private SwUndoSaveCntnt
-{
- String m_sOld, m_sIns;
- ULONG m_nSttNd, m_nEndNd, m_nOffset;
- xub_StrLen m_nSttCnt, m_nEndCnt, m_nSetPos, m_nSelEnd;
- BOOL m_bSplitNext : 1;
- BOOL m_bRegExp : 1;
- // metadata references for paragraph and following para (if m_bSplitNext)
- ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoStart;
- ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoEnd;
-
-public:
- _UnReplaceData( const SwPaM& rPam, const String& rIns, BOOL bRegExp );
- ~_UnReplaceData();
-
- void Undo( SwUndoIter& rIter );
- void Redo( SwUndoIter& rIter );
- void SetEnd( const SwPaM& rPam );
-
- const String & GetOld() const { return m_sOld; }
- const String & GetIns() const { return m_sIns; }
-};
-
-
-SV_IMPL_PTRARR( _UnReplaceDatas, _UnReplaceData* )
-
-//------------------------------------------------------------------
-
-inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
-
-// zwei Zugriffs-Funktionen
-inline SwPosition* IterPt( SwUndoIter& rUIter )
-{ return rUIter.pAktPam->GetPoint(); }
-inline SwPosition* IterMk( SwUndoIter& rUIter )
-{ return rUIter.pAktPam->GetMark(); }
-
//------------------------------------------------------------
// INSERT
@@ -142,10 +112,10 @@ void SwUndoInsert::Init(const SwNodeIndex & rNd)
SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd, xub_StrLen nCnt,
xub_StrLen nL,
const IDocumentContentOperations::InsertFlags nInsertFlags,
- BOOL bWDelim )
+ sal_Bool bWDelim )
: SwUndo(UNDO_TYPING), pPos( 0 ), pTxt( 0 ), pRedlData( 0 ),
nNode( rNd.GetIndex() ), nCntnt(nCnt), nLen(nL),
- bIsWordDelim( bWDelim ), bIsAppend( FALSE )
+ bIsWordDelim( bWDelim ), bIsAppend( sal_False )
, m_nInsertFlags(nInsertFlags)
{
Init(rNd);
@@ -155,7 +125,7 @@ SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd, xub_StrLen nCnt,
SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd )
: SwUndo(UNDO_SPLITNODE), pPos( 0 ), pTxt( 0 ),
pRedlData( 0 ), nNode( rNd.GetIndex() ), nCntnt(0), nLen(1),
- bIsWordDelim( FALSE ), bIsAppend( TRUE )
+ bIsWordDelim( sal_False ), bIsAppend( sal_True )
, m_nInsertFlags(IDocumentContentOperations::INS_EMPTYEXPAND)
{
Init(rNd);
@@ -165,7 +135,7 @@ SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd )
// werden kann. Wenn ja, dann aender die Laenge und die InsPos.
// Dann wird von SwDoc::Insert kein neues Object in die Undoliste gestellt.
-BOOL SwUndoInsert::CanGrouping( sal_Unicode cIns )
+sal_Bool SwUndoInsert::CanGrouping( sal_Unicode cIns )
{
if( !bIsAppend && bIsWordDelim ==
!GetAppCharClass().isLetterNumeric( String( cIns )) )
@@ -176,14 +146,14 @@ BOOL SwUndoInsert::CanGrouping( sal_Unicode cIns )
if (pUndoTxt)
pUndoTxt->Insert(cIns);
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwUndoInsert::CanGrouping( const SwPosition& rPos )
+sal_Bool SwUndoInsert::CanGrouping( const SwPosition& rPos )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( nNode == rPos.nNode.GetIndex() &&
nCntnt == rPos.nContent.GetIndex() )
{
@@ -192,7 +162,7 @@ BOOL SwUndoInsert::CanGrouping( const SwPosition& rPos )
if( ( ~nsRedlineMode_t::REDLINE_SHOW_MASK & rDoc.GetRedlineMode() ) ==
( ~nsRedlineMode_t::REDLINE_SHOW_MASK & GetRedlineMode() ) )
{
- bRet = TRUE;
+ bRet = sal_True;
// dann war oder ist noch Redline an:
// pruefe, ob an der InsPosition ein anderer Redline
@@ -204,7 +174,7 @@ BOOL SwUndoInsert::CanGrouping( const SwPosition& rPos )
SwRedlineData aRData( nsRedlineType_t::REDLINE_INSERT, rDoc.GetRedlineAuthor() );
const SwIndexReg* pIReg = rPos.nContent.GetIdxReg();
SwIndex* pIdx;
- for( USHORT i = 0; i < rTbl.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rTbl.Count(); ++i )
{
SwRedline* pRedl = rTbl[ i ];
if( pIReg == (pIdx = &pRedl->End()->nContent)->GetIdxReg() &&
@@ -213,7 +183,7 @@ BOOL SwUndoInsert::CanGrouping( const SwPosition& rPos )
if( !pRedl->HasMark() || !pRedlData ||
*pRedl != *pRedlData || *pRedl != aRData )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -249,13 +219,13 @@ SwUndoInsert::~SwUndoInsert()
-void SwUndoInsert::Undo( SwUndoIter& rUndoIter )
+void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc* pTmpDoc = &rUndoIter.GetDoc();
+ SwDoc *const pTmpDoc = & rContext.GetDoc();
+ SwPaM *const pPam(& rContext.GetCursorSupplier().CreateNewShellCursor());
if( bIsAppend )
{
- SwPaM* pPam = rUndoIter.pAktPam;
pPam->GetPoint()->nNode = nNode;
if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ))
@@ -272,7 +242,7 @@ void SwUndoInsert::Undo( SwUndoIter& rUndoIter )
}
else
{
- ULONG nNd = nNode;
+ sal_uLong nNd = nNode;
xub_StrLen nCnt = nCntnt;
if( nLen )
{
@@ -288,7 +258,7 @@ void SwUndoInsert::Undo( SwUndoIter& rUndoIter )
aPaM.GetPoint()->nContent -= nLen;
if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ))
pTmpDoc->DeleteRedline( aPaM, true, USHRT_MAX );
- RemoveIdxFromRange( aPaM, FALSE );
+ RemoveIdxFromRange( aPaM, sal_False );
pTxt = new String( pTxtNode->GetTxt().Copy(nCntnt-nLen, nLen) );
pTxtNode->EraseText( aPaM.GetPoint()->nContent, nLen );
}
@@ -297,7 +267,7 @@ void SwUndoInsert::Undo( SwUndoIter& rUndoIter )
aPaM.Move(fnMoveBackward);
if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ))
pTmpDoc->DeleteRedline( aPaM, true, USHRT_MAX );
- RemoveIdxFromRange( aPaM, FALSE );
+ RemoveIdxFromRange( aPaM, sal_False );
}
nNd = aPaM.GetPoint()->nNode.GetIndex();
@@ -312,24 +282,22 @@ void SwUndoInsert::Undo( SwUndoIter& rUndoIter )
nCntnt = aPaM.GetPoint()->nContent.GetIndex();
}
- // setze noch den Cursor auf den Undo-Bereich
- rUndoIter.pAktPam->DeleteMark();
+ // set cursor to Undo range
+ pPam->DeleteMark();
- IterPt(rUndoIter)->nNode = nNd;
- IterPt(rUndoIter)->nContent.Assign( pTmpDoc->GetNodes()[
- IterPt(rUndoIter)->nNode ]->GetCntntNode(), nCnt );
- // SPoint und GetMark auf der gleichen Position
+ pPam->GetPoint()->nNode = nNd;
+ pPam->GetPoint()->nContent.Assign(
+ pPam->GetPoint()->nNode.GetNode().GetCntntNode(), nCnt );
}
DELETEZ(pUndoTxt);
}
-void SwUndoInsert::Redo( SwUndoIter& rUndoIter )
+void SwUndoInsert::RedoImpl(::sw::UndoRedoContext & rContext)
{
- // setze noch den Cursor auf den Redo-Bereich
- SwPaM* pPam = rUndoIter.pAktPam;
- SwDoc* pTmpDoc = pPam->GetDoc();
+ SwDoc *const pTmpDoc = & rContext.GetDoc();
+ SwPaM *const pPam(& rContext.GetCursorSupplier().CreateNewShellCursor());
pPam->DeleteMark();
if( bIsAppend )
@@ -357,12 +325,13 @@ void SwUndoInsert::Redo( SwUndoIter& rUndoIter )
else
{
pPam->GetPoint()->nNode = nNode;
- SwCntntNode* pCNd = pTmpDoc->GetNodes()[ pPam->GetPoint()->nNode ]->GetCntntNode();
+ SwCntntNode *const pCNd =
+ pPam->GetPoint()->nNode.GetNode().GetCntntNode();
pPam->GetPoint()->nContent.Assign( pCNd, nCntnt );
if( nLen )
{
- BOOL bMvBkwrd = MovePtBackward( *pPam );
+ sal_Bool bMvBkwrd = MovePtBackward( *pPam );
if( pTxt )
{
@@ -375,7 +344,7 @@ void SwUndoInsert::Redo( SwUndoIter& rUndoIter )
else
{
// Inhalt wieder einfuegen. (erst pPos abmelden !!)
- ULONG nMvNd = pPos->nNode.GetIndex();
+ sal_uLong nMvNd = pPos->nNode.GetIndex();
xub_StrLen nMvCnt = pPos->nContent.GetIndex();
DELETEZ( pPos );
MoveFromUndoNds( *pTmpDoc, nMvNd, nMvCnt, *pPam->GetMark() );
@@ -384,18 +353,18 @@ void SwUndoInsert::Redo( SwUndoIter& rUndoIter )
nCntnt = pPam->GetMark()->nContent.GetIndex();
MovePtForward( *pPam, bMvBkwrd );
- rUndoIter.pAktPam->Exchange();
+ pPam->Exchange();
if( pRedlData && IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ))
{
RedlineMode_t eOld = pTmpDoc->GetRedlineMode();
pTmpDoc->SetRedlineMode_intern((RedlineMode_t)(eOld & ~nsRedlineMode_t::REDLINE_IGNORE));
pTmpDoc->AppendRedline( new SwRedline( *pRedlData,
- *rUndoIter.pAktPam ), true);
+ *pPam ), true);
pTmpDoc->SetRedlineMode_intern( eOld );
}
else if( !( nsRedlineMode_t::REDLINE_IGNORE & GetRedlineMode() ) &&
pTmpDoc->GetRedlineTbl().Count() )
- pTmpDoc->SplitRedline( *rUndoIter.pAktPam );
+ pTmpDoc->SplitRedline(*pPam);
}
}
@@ -403,13 +372,12 @@ void SwUndoInsert::Redo( SwUndoIter& rUndoIter )
}
-void SwUndoInsert::Repeat( SwUndoIter& rUndoIter )
+void SwUndoInsert::RepeatImpl(::sw::RepeatContext & rContext)
{
- rUndoIter.pLastUndoObj = this;
if( !nLen )
return;
- SwDoc& rDoc = rUndoIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
SwNodeIndex aNd( rDoc.GetNodes(), nNode );
SwCntntNode* pCNd = aNd.GetNode().GetCntntNode();;
@@ -427,15 +395,15 @@ void SwUndoInsert::Repeat( SwUndoIter& rUndoIter )
{
case ND_TEXTNODE:
if( bIsAppend )
- rDoc.AppendTxtNode( *rUndoIter.pAktPam->GetPoint() );
+ {
+ rDoc.AppendTxtNode( *rContext.GetRepeatPaM().GetPoint() );
+ }
else
{
String aTxt( ((SwTxtNode*)pCNd)->GetTxt() );
- BOOL bGroupUndo = rDoc.DoesGroupUndo();
- rDoc.DoGroupUndo( FALSE );
- rDoc.InsertString( *rUndoIter.pAktPam,
+ ::sw::GroupUndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo());
+ rDoc.InsertString( rContext.GetRepeatPaM(),
aTxt.Copy( nCntnt - nLen, nLen ) );
- rDoc.DoGroupUndo( bGroupUndo );
}
break;
case ND_GRFNODE:
@@ -445,7 +413,7 @@ void SwUndoInsert::Repeat( SwUndoIter& rUndoIter )
if( pGrfNd->IsGrfLink() )
pGrfNd->GetFileFilterNms( &sFile, &sFilter );
- rDoc.Insert( *rUndoIter.pAktPam, sFile, sFilter,
+ rDoc.Insert( rContext.GetRepeatPaM(), sFile, sFilter,
&pGrfNd->GetGrf(),
0/* Grafik-Collection*/, NULL, NULL );
}
@@ -465,7 +433,10 @@ void SwUndoInsert::Repeat( SwUndoIter& rUndoIter )
if ( aCnt.StoreEmbeddedObject( rSwOLE.GetOleRef(), aName, sal_True ) )
{
uno::Reference < embed::XEmbeddedObject > aNew = aCnt.GetEmbeddedObject( aName );
- rDoc.Insert( *rUndoIter.pAktPam, svt::EmbeddedObjectRef( aNew, ((SwOLENode*)pCNd)->GetAspect() ), NULL, NULL, NULL );
+ rDoc.Insert( rContext.GetRepeatPaM(),
+ svt::EmbeddedObjectRef( aNew,
+ static_cast<SwOLENode*>(pCNd)->GetAspect() ),
+ NULL, NULL, NULL );
}
break;
@@ -505,82 +476,85 @@ SwRewriter SwUndoInsert::GetRewriter() const
}
-/* */
+// SwUndoReplace /////////////////////////////////////////////////////////
-SwUndoReplace::SwUndoReplace()
- : SwUndo( UNDO_REPLACE ), nAktPos( USHRT_MAX )
-{
-}
-SwUndoReplace::~SwUndoReplace()
+class SwUndoReplace::Impl
+ : private SwUndoSaveCntnt
{
-}
+ ::rtl::OUString m_sOld;
+ ::rtl::OUString m_sIns;
+ sal_uLong m_nSttNd, m_nEndNd, m_nOffset;
+ xub_StrLen m_nSttCnt, m_nEndCnt, m_nSetPos, m_nSelEnd;
+ bool m_bSplitNext : 1;
+ bool m_bRegExp : 1;
+ // metadata references for paragraph and following para (if m_bSplitNext)
+ ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoStart;
+ ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoEnd;
-void SwUndoReplace::Undo( SwUndoIter& rUndoIter )
-{
- // war dieses nicht die letze Undo-Aktion, dann setze den
- // Count neu
- if( rUndoIter.pLastUndoObj != this )
+public:
+ Impl(SwPaM const& rPam, ::rtl::OUString const& rIns, bool const bRegExp);
+ virtual ~Impl()
{
- nAktPos = aArr.Count();
- rUndoIter.pLastUndoObj = this;
- bOldIterFlag = rUndoIter.bWeiter;
- rUndoIter.bWeiter = TRUE;
}
- aArr[ --nAktPos ]->Undo( rUndoIter );
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
- if( !nAktPos ) // alten Status wieder zurueck
- rUndoIter.bWeiter = bOldIterFlag;
-}
+ void SetEnd(SwPaM const& rPam);
+
+ ::rtl::OUString const& GetOld() const { return m_sOld; }
+ ::rtl::OUString const& GetIns() const { return m_sIns; }
+};
-void SwUndoReplace::Redo( SwUndoIter& rUndoIter )
+SwUndoReplace::SwUndoReplace(SwPaM const& rPam,
+ ::rtl::OUString const& rIns, bool const bRegExp)
+ : SwUndo( UNDO_REPLACE )
+ , m_pImpl(new Impl(rPam, rIns, bRegExp))
{
- // war dieses nicht die letze Undo-Aktion, dann setze den
- // Count neu
- if( rUndoIter.pLastUndoObj != this )
- {
- OSL_ENSURE( !nAktPos, "Redo ohne vorheriges Undo??" );
- rUndoIter.pLastUndoObj = this;
- bOldIterFlag = rUndoIter.bWeiter;
- rUndoIter.bWeiter = TRUE;
- }
+}
- aArr[ nAktPos ]->Redo( rUndoIter );
+SwUndoReplace::~SwUndoReplace()
+{
+}
- if( ++nAktPos >= aArr.Count() ) // alten Status wieder zurueck
- {
- nAktPos = USHRT_MAX;
- rUndoIter.bWeiter = bOldIterFlag;
- }
+void SwUndoReplace::UndoImpl(::sw::UndoRedoContext & rContext)
+{
+ m_pImpl->UndoImpl(rContext);
}
-// #111827#
-SwRewriter SwUndoReplace::GetRewriter() const
+void SwUndoReplace::RedoImpl(::sw::UndoRedoContext & rContext)
+{
+ m_pImpl->RedoImpl(rContext);
+}
+
+SwRewriter
+MakeUndoReplaceRewriter(sal_uLong const occurrences,
+ ::rtl::OUString const& sOld, ::rtl::OUString const& sNew)
{
SwRewriter aResult;
- if (aArr.Count() > 1)
+ if (1 < occurrences)
{
- aResult.AddRule(UNDO_ARG1, String::CreateFromInt32(aArr.Count()));
+ aResult.AddRule(UNDO_ARG1, String::CreateFromInt32(occurrences));
aResult.AddRule(UNDO_ARG2, String(SW_RES(STR_OCCURRENCES_OF)));
String aTmpStr;
aTmpStr += String(SW_RES(STR_START_QUOTE));
- aTmpStr += ShortenString(aArr[0]->GetOld(), nUndoStringLength,
+ aTmpStr += ShortenString(sOld, nUndoStringLength,
SW_RES(STR_LDOTS));
aTmpStr += String(SW_RES(STR_END_QUOTE));
aResult.AddRule(UNDO_ARG3, aTmpStr);
}
- else if (aArr.Count() == 1)
+ else if (1 == occurrences)
{
{
String aTmpStr;
aTmpStr += String(SW_RES(STR_START_QUOTE));
// #i33488 #
- aTmpStr += ShortenString(aArr[0]->GetOld(), nUndoStringLength,
+ aTmpStr += ShortenString(sOld, nUndoStringLength,
SW_RES(STR_LDOTS));
aTmpStr += String(SW_RES(STR_END_QUOTE));
aResult.AddRule(UNDO_ARG1, aTmpStr);
@@ -593,7 +567,7 @@ SwRewriter SwUndoReplace::GetRewriter() const
aTmpStr += String(SW_RES(STR_START_QUOTE));
// #i33488 #
- aTmpStr += ShortenString(aArr[0]->GetIns(), nUndoStringLength,
+ aTmpStr += ShortenString(sNew, nUndoStringLength,
SW_RES(STR_LDOTS));
aTmpStr += String(SW_RES(STR_END_QUOTE));
aResult.AddRule(UNDO_ARG3, aTmpStr);
@@ -603,24 +577,23 @@ SwRewriter SwUndoReplace::GetRewriter() const
return aResult;
}
-void SwUndoReplace::AddEntry( const SwPaM& rPam, const String& rInsert,
- BOOL bRegExp )
+// #111827#
+SwRewriter SwUndoReplace::GetRewriter() const
{
- _UnReplaceData* pNew = new _UnReplaceData( rPam, rInsert, bRegExp );
- aArr.C40_INSERT(_UnReplaceData, pNew, aArr.Count() );
+ return MakeUndoReplaceRewriter(1, m_pImpl->GetOld(), m_pImpl->GetIns());
}
-void SwUndoReplace::SetEntryEnd( const SwPaM& rPam )
+void SwUndoReplace::SetEnd(SwPaM const& rPam)
{
- _UnReplaceData* pEntry = aArr[ aArr.Count()-1 ];
- pEntry->SetEnd( rPam );
+ m_pImpl->SetEnd(rPam);
}
-_UnReplaceData::_UnReplaceData( const SwPaM& rPam, const String& rIns,
- BOOL bRgExp )
- : m_sIns( rIns ), m_nOffset( 0 )
+SwUndoReplace::Impl::Impl(
+ SwPaM const& rPam, ::rtl::OUString const& rIns, bool const bRegExp)
+ : m_sIns( rIns )
+ , m_nOffset( 0 )
+ , m_bRegExp(bRegExp)
{
- m_bRegExp = bRgExp;
const SwPosition * pStt( rPam.Start() );
const SwPosition * pEnd( rPam.End() );
@@ -639,7 +612,7 @@ _UnReplaceData::_UnReplaceData( const SwPaM& rPam, const String& rIns,
m_nSetPos = pHistory->Count();
- ULONG nNewPos = pStt->nNode.GetIndex();
+ sal_uLong nNewPos = pStt->nNode.GetIndex();
m_nOffset = m_nSttNd - nNewPos;
if ( pNd->GetpSwpHints() )
@@ -655,7 +628,7 @@ _UnReplaceData::_UnReplaceData( const SwPaM& rPam, const String& rIns,
pHistory->Add( pNd->GetTxtColl(), nNewPos, ND_TEXTNODE );
SwTxtNode* pNext = pEnd->nNode.GetNode().GetTxtNode();
- ULONG nTmp = pNext->GetIndex();
+ sal_uLong nTmp = pNext->GetIndex();
pHistory->CopyAttr( pNext->GetpSwpHints(), nTmp, 0,
pNext->GetTxt().Len(), true );
if( pNext->HasSwAttrSet() )
@@ -674,14 +647,10 @@ _UnReplaceData::_UnReplaceData( const SwPaM& rPam, const String& rIns,
m_sOld = pNd->GetTxt().Copy( m_nSttCnt, nECnt - m_nSttCnt );
}
-_UnReplaceData::~_UnReplaceData()
-{
-}
-
-void _UnReplaceData::Undo( SwUndoIter& rIter )
+void SwUndoReplace::Impl::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc* pDoc = &rIter.GetDoc();
- SwPaM& rPam = *rIter.pAktPam;
+ SwDoc *const pDoc = & rContext.GetDoc();
+ SwPaM & rPam(rContext.GetCursorSupplier().CreateNewShellCursor());
rPam.DeleteMark();
SwTxtNode* pNd = pDoc->GetNodes()[ m_nSttNd - m_nOffset ]->GetTxtNode();
@@ -690,18 +659,18 @@ void _UnReplaceData::Undo( SwUndoIter& rIter )
SwAutoCorrExceptWord* pACEWord = pDoc->GetAutoCorrExceptWord();
if( pACEWord )
{
- if( 1 == m_sIns.Len() && 1 == m_sOld.Len() )
+ if ((1 == m_sIns.getLength()) && (1 == m_sOld.getLength()))
{
SwPosition aPos( *pNd ); aPos.nContent.Assign( pNd, m_nSttCnt );
- pACEWord->CheckChar( aPos, m_sOld.GetChar( 0 ) );
+ pACEWord->CheckChar( aPos, m_sOld[ 0 ] );
}
pDoc->SetAutoCorrExceptWord( 0 );
}
- SwIndex aIdx( pNd, m_nSttCnt );
+ SwIndex aIdx( pNd, sal_uInt16( m_nSttCnt ) );
if( m_nSttNd == m_nEndNd )
{
- pNd->EraseText( aIdx, m_sIns.Len() );
+ pNd->EraseText( aIdx, sal_uInt16( m_sIns.getLength() ) );
}
else
{
@@ -729,7 +698,7 @@ void _UnReplaceData::Undo( SwUndoIter& rIter )
pNd->RestoreMetadata(m_pMetadataUndoStart);
}
- if( m_sOld.Len() )
+ if (m_sOld.getLength())
{
pNd->InsertText( m_sOld, aIdx );
}
@@ -763,13 +732,10 @@ void _UnReplaceData::Undo( SwUndoIter& rIter )
rPam.GetPoint()->nContent = aIdx;
}
-void _UnReplaceData::Redo( SwUndoIter& rIter )
+void SwUndoReplace::Impl::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rIter.GetDoc();
- BOOL bUndo = rDoc.DoesUndo();
- rDoc.DoUndo( FALSE );
-
- SwPaM& rPam = *rIter.pAktPam;
+ SwDoc & rDoc = rContext.GetDoc();
+ SwPaM & rPam(rContext.GetCursorSupplier().CreateNewShellCursor());
rPam.DeleteMark();
rPam.GetPoint()->nNode = m_nSttNd;
@@ -806,21 +772,21 @@ void _UnReplaceData::Redo( SwUndoIter& rIter )
rDoc.ReplaceRange( rPam, m_sIns, m_bRegExp );
rPam.DeleteMark();
- rDoc.DoUndo( bUndo );
}
-void _UnReplaceData::SetEnd( const SwPaM& rPam )
+void SwUndoReplace::Impl::SetEnd(SwPaM const& rPam)
{
if( rPam.GetPoint()->nNode != rPam.GetMark()->nNode )
{
- // es wurden mehrere Absaetze eingefuegt
+ // multiple paragraphs were inserted
const SwPosition* pEnd = rPam.End();
m_nEndNd = m_nOffset + pEnd->nNode.GetIndex();
m_nEndCnt = pEnd->nContent.GetIndex();
}
}
-/* */
+
+// SwUndoReRead //////////////////////////////////////////////////////////
SwUndoReRead::SwUndoReRead( const SwPaM& rPam, const SwGrfNode& rGrfNd )
@@ -838,9 +804,9 @@ SwUndoReRead::~SwUndoReRead()
}
-void SwUndoReRead::SetAndSave( SwUndoIter& rIter )
+void SwUndoReRead::SetAndSave(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
SwGrfNode* pGrfNd = rDoc.GetNodes()[ nPos ]->GetGrfNode();
if( !pGrfNd )
@@ -850,37 +816,37 @@ void SwUndoReRead::SetAndSave( SwUndoIter& rIter )
Graphic* pOldGrf = pGrf;
String* pOldNm = pNm;
String* pOldFltr = pFltr;
- USHORT nOldMirr = nMirr;
+ sal_uInt16 nOldMirr = nMirr;
SaveGraphicData( *pGrfNd );
if( pOldNm )
{
- pGrfNd->ReRead( *pOldNm, pFltr ? *pFltr : aEmptyStr, 0, 0, TRUE );
+ pGrfNd->ReRead( *pOldNm, pFltr ? *pFltr : aEmptyStr, 0, 0, sal_True );
delete pOldNm;
delete pOldFltr;
}
else
{
- pGrfNd->ReRead( aEmptyStr, aEmptyStr, pOldGrf, 0, TRUE );
+ pGrfNd->ReRead( aEmptyStr, aEmptyStr, pOldGrf, 0, sal_True );
delete pOldGrf;
}
if( RES_MIRROR_GRAPH_DONT != nOldMirr )
pGrfNd->SetAttr( SwMirrorGrf() );
- rIter.pSelFmt = pGrfNd->GetFlyFmt();
+ rContext.SetSelections(pGrfNd->GetFlyFmt(), 0);
}
-void SwUndoReRead::Undo( SwUndoIter& rIter )
+void SwUndoReRead::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SetAndSave( rIter );
+ SetAndSave(rContext);
}
-void SwUndoReRead::Redo( SwUndoIter& rIter )
+void SwUndoReRead::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SetAndSave( rIter );
+ SetAndSave(rContext);
}
@@ -895,7 +861,7 @@ void SwUndoReRead::SaveGraphicData( const SwGrfNode& rGrfNd )
}
else
{
- ((SwGrfNode&)rGrfNd).SwapIn( TRUE );
+ ((SwGrfNode&)rGrfNd).SwapIn( sal_True );
pGrf = new Graphic( rGrfNd.GetGrf() );
pNm = pFltr = 0;
}
@@ -908,10 +874,10 @@ SwUndoInsertLabel::SwUndoInsertLabel( const SwLabelType eTyp,
const String &rTxt,
const String& rSeparator,
const String& rNumberSeparator,
- const BOOL bBef,
- const USHORT nInitId,
+ const sal_Bool bBef,
+ const sal_uInt16 nInitId,
const String& rCharacterStyle,
- const BOOL bCpyBorder )
+ const sal_Bool bCpyBorder )
: SwUndo( UNDO_INSERTLABEL ),
sText( rTxt ),
sSeparator( rSeparator ),
@@ -923,7 +889,7 @@ SwUndoInsertLabel::SwUndoInsertLabel( const SwLabelType eTyp,
bBefore( bBef ),
bCpyBrd( bCpyBorder )
{
- bUndoKeep = FALSE;
+ bUndoKeep = sal_False;
OBJECT.pUndoFly = 0;
OBJECT.pUndoAttr = 0;
}
@@ -939,9 +905,9 @@ SwUndoInsertLabel::~SwUndoInsertLabel()
delete NODE.pUndoInsNd;
}
-void SwUndoInsertLabel::Undo( SwUndoIter& rIter )
+void SwUndoInsertLabel::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
if( LTYPE_OBJECT == eType || LTYPE_DRAW == eType )
{
@@ -953,8 +919,8 @@ void SwUndoInsertLabel::Undo( SwUndoIter& rIter )
( LTYPE_DRAW != eType ||
0 != (pSdrObj = pFmt->FindSdrObject()) ) )
{
- OBJECT.pUndoAttr->Undo( rIter );
- OBJECT.pUndoFly->Undo( rIter );
+ OBJECT.pUndoAttr->UndoImpl(rContext);
+ OBJECT.pUndoFly->UndoImpl(rContext);
if( LTYPE_DRAW == eType )
{
pSdrObj->SetLayer( nLayerId );
@@ -970,18 +936,18 @@ void SwUndoInsertLabel::Undo( SwUndoIter& rIter )
if ( pNd )
pNd->GetTable().GetFrmFmt()->ResetFmtAttr( RES_KEEP );
}
- SwPaM aPam( *rIter.pAktPam->GetPoint() );
+ SwPaM aPam( rDoc.GetNodes().GetEndOfContent() );
aPam.GetPoint()->nNode = NODE.nNode;
aPam.SetMark();
aPam.GetPoint()->nNode = NODE.nNode + 1;
- NODE.pUndoInsNd = new SwUndoDelete( aPam, TRUE );
+ NODE.pUndoInsNd = new SwUndoDelete( aPam, sal_True );
}
}
-void SwUndoInsertLabel::Redo( SwUndoIter& rIter )
+void SwUndoInsertLabel::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
if( LTYPE_OBJECT == eType || LTYPE_DRAW == eType )
{
@@ -993,8 +959,8 @@ void SwUndoInsertLabel::Redo( SwUndoIter& rIter )
( LTYPE_DRAW != eType ||
0 != (pSdrObj = pFmt->FindSdrObject()) ) )
{
- OBJECT.pUndoFly->Redo( rIter );
- OBJECT.pUndoAttr->Redo( rIter );
+ OBJECT.pUndoFly->RedoImpl(rContext);
+ OBJECT.pUndoAttr->RedoImpl(rContext);
if( LTYPE_DRAW == eType )
{
pSdrObj->SetLayer( nLayerId );
@@ -1013,19 +979,19 @@ void SwUndoInsertLabel::Redo( SwUndoIter& rIter )
SwTableNode *pNd = rDoc.GetNodes()[
rDoc.GetNodes()[NODE.nNode-1]->StartOfSectionIndex()]->GetTableNode();
if ( pNd )
- pNd->GetTable().GetFrmFmt()->SetFmtAttr( SvxFmtKeepItem(TRUE, RES_KEEP) );
+ pNd->GetTable().GetFrmFmt()->SetFmtAttr( SvxFmtKeepItem(sal_True, RES_KEEP) );
}
- NODE.pUndoInsNd->Undo( rIter );
+ NODE.pUndoInsNd->UndoImpl(rContext);
delete NODE.pUndoInsNd, NODE.pUndoInsNd = 0;
}
}
-void SwUndoInsertLabel::Repeat( SwUndoIter& rIter )
+void SwUndoInsertLabel::RepeatImpl(::sw::RepeatContext & rContext)
{
- SwDoc& rDoc = rIter.GetDoc();
- const SwPosition& rPos = *rIter.pAktPam->GetPoint();
+ SwDoc & rDoc = rContext.GetDoc();
+ const SwPosition& rPos = *rContext.GetRepeatPaM().GetPoint();
- ULONG nIdx = 0;
+ sal_uLong nIdx = 0;
SwCntntNode* pCNd = rPos.nNode.GetNode().GetCntntNode();
if( pCNd )
@@ -1091,7 +1057,7 @@ void SwUndoInsertLabel::SetFlys( SwFrmFmt& rOldFly, SfxItemSet& rChgSet,
}
}
-void SwUndoInsertLabel::SetDrawObj( BYTE nLId )
+void SwUndoInsertLabel::SetDrawObj( sal_uInt8 nLId )
{
if( LTYPE_DRAW == eType )
{
diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx
index 8e2bcdf547b5..f7b01da4caa2 100644
--- a/sw/source/core/undo/unmove.cxx
+++ b/sw/source/core/undo/unmove.cxx
@@ -29,17 +29,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <UndoSplitMove.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pam.hxx>
#include <swundo.hxx> // fuer die UndoIds
#include <ndtxt.hxx>
-#include <undobj.hxx>
+#include <UndoCore.hxx>
#include <rolbck.hxx>
-inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
-
// MOVE
SwUndoMove::SwUndoMove( const SwPaM& rRange, const SwPosition& rMvPos )
@@ -48,7 +48,7 @@ SwUndoMove::SwUndoMove( const SwPaM& rRange, const SwPosition& rMvPos )
nMvDestCntnt( rMvPos.nContent.GetIndex() ),
bMoveRedlines( false )
{
- bMoveRange = bJoinNext = bJoinPrev = FALSE;
+ bMoveRange = bJoinNext = bJoinPrev = sal_False;
// StartNode vorm loeschen von Fussnoten besorgen!
SwDoc* pDoc = rRange.GetDoc();
@@ -80,7 +80,8 @@ SwUndoMove::SwUndoMove( const SwPaM& rRange, const SwPosition& rMvPos )
pHistory->CopyFmtAttr( *pEndTxtNd->GetpSwAttrSet(), nEndNode );
}
- if( 0 != (pTxtNd = rRange.GetDoc()->GetNodes()[ rMvPos.nNode ]->GetTxtNode() ))
+ pTxtNd = rMvPos.nNode.GetNode().GetTxtNode();
+ if (0 != pTxtNd)
{
pHistory->Add( pTxtNd->GetTxtColl(), nMvDestNode, ND_TEXTNODE );
if ( pTxtNd->GetpSwpHints() )
@@ -107,8 +108,8 @@ SwUndoMove::SwUndoMove( SwDoc* pDoc, const SwNodeRange& rRg,
nMvDestNode( rMvPos.GetIndex() ),
bMoveRedlines( false )
{
- bMoveRange = TRUE;
- bJoinNext = bJoinPrev = FALSE;
+ bMoveRange = sal_True;
+ bJoinNext = bJoinPrev = sal_False;
nSttCntnt = nEndCntnt = nMvDestCntnt = STRING_MAXLEN;
@@ -118,7 +119,7 @@ SwUndoMove::SwUndoMove( SwDoc* pDoc, const SwNodeRange& rRg,
// DelFtn( rRange );
// wird aus dem CntntBereich in den Sonderbereich verschoben ?
- ULONG nCntntStt = pDoc->GetNodes().GetEndOfAutotext().GetIndex();
+ sal_uLong nCntntStt = pDoc->GetNodes().GetEndOfAutotext().GetIndex();
if( nMvDestNode < nCntntStt && rRg.aStart.GetIndex() > nCntntStt )
{
// loesche alle Fussnoten. Diese sind dort nicht erwuenscht.
@@ -143,7 +144,7 @@ SwUndoMove::SwUndoMove( SwDoc* pDoc, const SwNodeRange& rRg,
void SwUndoMove::SetDestRange( const SwPaM& rRange,
const SwPosition& rInsPos,
- BOOL bJoin, BOOL bCorrPam )
+ sal_Bool bJoin, sal_Bool bCorrPam )
{
const SwPosition *pStt = rRange.Start(),
*pEnd = rRange.GetPoint() == pStt
@@ -188,11 +189,9 @@ void SwUndoMove::SetDestRange( const SwNodeIndex& rStt,
}
-void SwUndoMove::Undo( SwUndoIter& rUndoIter )
+void SwUndoMove::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc* pDoc = &rUndoIter.GetDoc();
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ SwDoc *const pDoc = & rContext.GetDoc();
// Block, damit aus diesem gesprungen werden kann
do {
@@ -218,7 +217,7 @@ void SwUndoMove::Undo( SwUndoIter& rUndoIter )
// #i17764# if redlines are to be moved, we may not remove them before
// pDoc->Move gets a chance to handle them
if( ! bMoveRedlines )
- RemoveIdxFromRange( aPam, FALSE );
+ RemoveIdxFromRange( aPam, sal_False );
SwPosition aPos( *pDoc->GetNodes()[ nInsPosNode] );
SwCntntNode* pCNd = aPos.nNode.GetNode().GetCntntNode();
@@ -239,7 +238,7 @@ void SwUndoMove::Undo( SwUndoIter& rUndoIter )
aPam.Exchange();
aPam.DeleteMark();
-// pDoc->ResetAttr( aPam, FALSE );
+// pDoc->ResetAttr( aPam, sal_False );
if( aPam.GetNode()->IsCntntNode() )
aPam.GetNode()->GetCntntNode()->ResetAllAttr();
// der Pam wird jetzt aufgegeben.
@@ -267,7 +266,7 @@ void SwUndoMove::Undo( SwUndoIter& rUndoIter )
pTxtNd->JoinNext();
}
- } while( FALSE );
+ } while( sal_False );
if( pHistory )
{
@@ -277,18 +276,18 @@ void SwUndoMove::Undo( SwUndoIter& rUndoIter )
pHistory->SetTmpEnd( pHistory->Count() );
}
- pDoc->DoUndo( bUndo );
-
// setze noch den Cursor auf den Undo-Bereich
if( !bMoveRange )
- SetPaM( rUndoIter );
+ {
+ AddUndoRedoPaM(rContext);
+ }
}
-void SwUndoMove::Redo( SwUndoIter& rUndoIter )
+void SwUndoMove::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwPaM* pPam = rUndoIter.pAktPam;
- SwDoc& rDoc = *pPam->GetDoc();
+ SwPaM *const pPam = & AddUndoRedoPaM(rContext);
+ SwDoc & rDoc = rContext.GetDoc();
SwNodes& rNds = rDoc.GetNodes();
SwNodeIndex aIdx( rNds, nMvDestNode );
@@ -309,10 +308,10 @@ void SwUndoMove::Redo( SwUndoIter& rUndoIter )
nMvDestCntnt ));
DelFtn( aPam );
- RemoveIdxFromRange( aPam, FALSE );
+ RemoveIdxFromRange( aPam, sal_False );
aIdx = aPam.Start()->nNode;
- BOOL bJoinTxt = aIdx.GetNode().IsTxtNode();
+ sal_Bool bJoinTxt = aIdx.GetNode().IsTxtNode();
aIdx--;
rDoc.MoveRange( aPam, aMvPos,
@@ -342,7 +341,7 @@ void SwUndoMove::DelFtn( const SwPaM& rRange )
{
// wird aus dem CntntBereich in den Sonderbereich verschoben ?
SwDoc* pDoc = rRange.GetDoc();
- ULONG nCntntStt = pDoc->GetNodes().GetEndOfAutotext().GetIndex();
+ sal_uLong nCntntStt = pDoc->GetNodes().GetEndOfAutotext().GetIndex();
if( nMvDestNode < nCntntStt &&
rRange.GetPoint()->nNode.GetIndex() >= nCntntStt )
{
diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx
index d2ba712e5107..c775da164d01 100644
--- a/sw/source/core/undo/unnum.cxx
+++ b/sw/source/core/undo/unnum.cxx
@@ -29,21 +29,22 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <UndoNumbering.hxx>
#include <hintids.hxx>
#include <editeng/lrspitem.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <swundo.hxx> // fuer die UndoIds
#include <pam.hxx>
#include <ndtxt.hxx>
-#include <undobj.hxx>
+#include <UndoCore.hxx>
#include <rolbck.hxx>
SV_DECL_PTRARR_DEL( _SfxPoolItems, SfxPoolItem*, 16, 16 )
SV_IMPL_PTRARR( _SfxPoolItems, SfxPoolItem* );
-inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
SwUndoInsNum::SwUndoInsNum( const SwNumRule& rOldRule,
const SwNumRule& rNewRule,
@@ -88,14 +89,9 @@ SwRewriter SwUndoInsNum::GetRewriter() const
return aResult;
}
-void SwUndoInsNum::Undo( SwUndoIter& rUndoIter )
+void SwUndoInsNum::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
- if( nSttNode )
- SetPaM( rUndoIter );
-
- BOOL bUndo = rDoc.DoesUndo();
- rDoc.DoUndo( FALSE );
+ SwDoc & rDoc = rContext.GetDoc();
if( pOldNumRule )
rDoc.ChgNumRuleFmts( *pOldNumRule );
@@ -105,7 +101,7 @@ void SwUndoInsNum::Undo( SwUndoIter& rUndoIter )
SwTxtNode* pNd;
if( ULONG_MAX != nSttSet &&
0 != ( pNd = rDoc.GetNodes()[ nSttSet ]->GetTxtNode() ))
- pNd->SetListRestart( TRUE );
+ pNd->SetListRestart( sal_True );
else
pNd = 0;
@@ -125,28 +121,30 @@ void SwUndoInsNum::Undo( SwUndoIter& rUndoIter )
pHistory->SetTmpEnd( pHistory->Count() );
}
- if( nSttNode )
- SetPaM( rUndoIter );
- rDoc.DoUndo( bUndo );
+ if (nSttNode)
+ {
+ AddUndoRedoPaM(rContext);
+ }
}
-
-void SwUndoInsNum::Redo( SwUndoIter& rUndoIter )
+void SwUndoInsNum::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
if( pOldNumRule )
rDoc.ChgNumRuleFmts( aNumRule );
else if( pHistory )
{
- SetPaM( rUndoIter );
+ SwPaM & rPam( AddUndoRedoPaM(rContext) );
if( sReplaceRule.Len() )
- rDoc.ReplaceNumRule( *rUndoIter.pAktPam->GetPoint(),
+ {
+ rDoc.ReplaceNumRule(*rPam.GetPoint(),
sReplaceRule, aNumRule.GetName() );
+ }
else
{
// --> OD 2005-02-25 #i42921# - adapt to changed signature
- rDoc.SetNumRule( *rUndoIter.pAktPam, aNumRule, false );
+ rDoc.SetNumRule(rPam, aNumRule, false);
// <--
}
}
@@ -158,19 +156,22 @@ void SwUndoInsNum::SetLRSpaceEndPos()
nLRSavePos = pHistory->Count();
}
-void SwUndoInsNum::Repeat( SwUndoIter& rUndoIter )
+void SwUndoInsNum::RepeatImpl(::sw::RepeatContext & rContext)
{
+ SwDoc & rDoc(rContext.GetDoc());
if( nSttNode )
{
if( !sReplaceRule.Len() )
{
// --> OD 2005-02-25 #i42921# - adapt to changed signature
- rUndoIter.GetDoc().SetNumRule( *rUndoIter.pAktPam, aNumRule, false );
+ rDoc.SetNumRule(rContext.GetRepeatPaM(), aNumRule, false);
// <--
}
}
else
- rUndoIter.GetDoc().ChgNumRuleFmts( aNumRule );
+ {
+ rDoc.ChgNumRuleFmts( aNumRule );
+ }
}
SwHistory* SwUndoInsNum::GetHistory()
@@ -186,7 +187,7 @@ void SwUndoInsNum::SaveOldNumRule( const SwNumRule& rOld )
pOldNumRule = new SwNumRule( rOld );
}
-/* */
+/* */
SwUndoDelNum::SwUndoDelNum( const SwPaM& rPam )
@@ -196,20 +197,14 @@ SwUndoDelNum::SwUndoDelNum( const SwPaM& rPam )
pHistory = new SwHistory;
}
-
SwUndoDelNum::~SwUndoDelNum()
{
delete pHistory;
}
-
-void SwUndoDelNum::Undo( SwUndoIter& rUndoIter )
+void SwUndoDelNum::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
- SetPaM( rUndoIter );
-
- BOOL bUndo = rDoc.DoesUndo();
- rDoc.DoUndo( FALSE );
+ SwDoc & rDoc = rContext.GetDoc();
pHistory->TmpRollback( &rDoc, 0 );
pHistory->SetTmpEnd( pHistory->Count() );
@@ -224,25 +219,21 @@ void SwUndoDelNum::Undo( SwUndoIter& rUndoIter )
pNd->ChkCondColl();
}
- SetPaM( rUndoIter );
- rDoc.DoUndo( bUndo );
+ AddUndoRedoPaM(rContext);
}
-
-void SwUndoDelNum::Redo( SwUndoIter& rUndoIter )
+void SwUndoDelNum::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SetPaM( rUndoIter );
- rUndoIter.GetDoc().DelNumRules( *rUndoIter.pAktPam );
+ SwPaM & rPam( AddUndoRedoPaM(rContext) );
+ rContext.GetDoc().DelNumRules(rPam);
}
-
-void SwUndoDelNum::Repeat( SwUndoIter& rUndoIter )
+void SwUndoDelNum::RepeatImpl(::sw::RepeatContext & rContext)
{
- SetPaM( rUndoIter );
- rUndoIter.GetDoc().DelNumRules( *rUndoIter.pAktPam );
+ rContext.GetDoc().DelNumRules(rContext.GetRepeatPaM());
}
-void SwUndoDelNum::AddNode( const SwTxtNode& rNd, BOOL )
+void SwUndoDelNum::AddNode( const SwTxtNode& rNd, sal_Bool )
{
if( rNd.GetNumRule() )
{
@@ -251,10 +242,10 @@ void SwUndoDelNum::AddNode( const SwTxtNode& rNd, BOOL )
}
-/* */
+/* */
-SwUndoMoveNum::SwUndoMoveNum( const SwPaM& rPam, long nOff, BOOL bIsOutlMv )
+SwUndoMoveNum::SwUndoMoveNum( const SwPaM& rPam, long nOff, sal_Bool bIsOutlMv )
: SwUndo( bIsOutlMv ? UNDO_OUTLINE_UD : UNDO_MOVENUM ),
SwUndRng( rPam ),
nNewStt( 0 ), nOffset( nOff )
@@ -263,10 +254,9 @@ SwUndoMoveNum::SwUndoMoveNum( const SwPaM& rPam, long nOff, BOOL bIsOutlMv )
// nach oben => -1
}
-
-void SwUndoMoveNum::Undo( SwUndoIter& rUndoIter )
+void SwUndoMoveNum::UndoImpl(::sw::UndoRedoContext & rContext)
{
- ULONG nTmpStt = nSttNode, nTmpEnd = nEndNode;
+ sal_uLong nTmpStt = nSttNode, nTmpEnd = nEndNode;
if( nEndNode || USHRT_MAX != nEndCntnt ) // Bereich ?
{
@@ -279,38 +269,40 @@ void SwUndoMoveNum::Undo( SwUndoIter& rUndoIter )
//JP 22.06.95: wird wollen die Bookmarks/Verzeichnisse behalten, oder?
// SetPaM( rUndoIter );
-// RemoveIdxFromRange( *rUndoIter.pAktPam, TRUE );
+// RemoveIdxFromRange( *rUndoIter.pAktPam, sal_True );
- SetPaM( rUndoIter );
- rUndoIter.GetDoc().MoveParagraph( *rUndoIter.pAktPam, -nOffset,
+ SwPaM & rPam( AddUndoRedoPaM(rContext) );
+ rContext.GetDoc().MoveParagraph( rPam, -nOffset,
UNDO_OUTLINE_UD == GetId() );
nSttNode = nTmpStt;
nEndNode = nTmpEnd;
}
-
-void SwUndoMoveNum::Redo( SwUndoIter& rUndoIter )
+void SwUndoMoveNum::RedoImpl(::sw::UndoRedoContext & rContext)
{
//JP 22.06.95: wird wollen die Bookmarks/Verzeichnisse behalten, oder?
// SetPaM( rUndoIter );
-// RemoveIdxFromRange( *rUndoIter.pAktPam, TRUE );
+// RemoveIdxFromRange( *rUndoIter.pAktPam, sal_True );
- SetPaM( rUndoIter );
- rUndoIter.GetDoc().MoveParagraph( *rUndoIter.pAktPam, nOffset,
- UNDO_OUTLINE_UD == GetId() );
+ SwPaM & rPam( AddUndoRedoPaM(rContext) );
+ rContext.GetDoc().MoveParagraph(rPam, nOffset, UNDO_OUTLINE_UD == GetId());
}
-
-void SwUndoMoveNum::Repeat( SwUndoIter& rUndoIter )
+void SwUndoMoveNum::RepeatImpl(::sw::RepeatContext & rContext)
{
+ SwDoc & rDoc = rContext.GetDoc();
if( UNDO_OUTLINE_UD == GetId() )
- rUndoIter.GetDoc().MoveOutlinePara( *rUndoIter.pAktPam,
+ {
+ rDoc.MoveOutlinePara(rContext.GetRepeatPaM(),
0 < nOffset ? 1 : -1 );
+ }
else
- rUndoIter.GetDoc().MoveParagraph( *rUndoIter.pAktPam, nOffset, FALSE );
+ {
+ rDoc.MoveParagraph(rContext.GetRepeatPaM(), nOffset, sal_False);
+ }
}
-/* */
+/* */
SwUndoNumUpDown::SwUndoNumUpDown( const SwPaM& rPam, short nOff )
@@ -321,40 +313,37 @@ SwUndoNumUpDown::SwUndoNumUpDown( const SwPaM& rPam, short nOff )
// Up => -1
}
-
-void SwUndoNumUpDown::Undo( SwUndoIter& rUndoIter )
+void SwUndoNumUpDown::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SetPaM( rUndoIter );
- rUndoIter.GetDoc().NumUpDown( *rUndoIter.pAktPam, 1 != nOffset );
+ SwPaM & rPam( AddUndoRedoPaM(rContext) );
+ rContext.GetDoc().NumUpDown(rPam, 1 != nOffset );
}
-
-void SwUndoNumUpDown::Redo( SwUndoIter& rUndoIter )
+void SwUndoNumUpDown::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SetPaM( rUndoIter );
- rUndoIter.GetDoc().NumUpDown( *rUndoIter.pAktPam, 1 == nOffset );
+ SwPaM & rPam( AddUndoRedoPaM(rContext) );
+ rContext.GetDoc().NumUpDown(rPam, 1 == nOffset);
}
-
-void SwUndoNumUpDown::Repeat( SwUndoIter& rUndoIter )
+void SwUndoNumUpDown::RepeatImpl(::sw::RepeatContext & rContext)
{
- rUndoIter.GetDoc().NumUpDown( *rUndoIter.pAktPam, 1 == nOffset );
+ rContext.GetDoc().NumUpDown(rContext.GetRepeatPaM(), 1 == nOffset);
}
-/* */
+/* */
// #115901#
-SwUndoNumOrNoNum::SwUndoNumOrNoNum( const SwNodeIndex& rIdx, BOOL bOldNum,
- BOOL bNewNum)
+SwUndoNumOrNoNum::SwUndoNumOrNoNum( const SwNodeIndex& rIdx, sal_Bool bOldNum,
+ sal_Bool bNewNum)
: SwUndo( UNDO_NUMORNONUM ), nIdx( rIdx.GetIndex() ), mbNewNum(bNewNum),
mbOldNum(bOldNum)
{
}
// #115901#, #i40034#
-void SwUndoNumOrNoNum::Undo( SwUndoIter& rUndoIter )
+void SwUndoNumOrNoNum::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwNodeIndex aIdx( rUndoIter.GetDoc().GetNodes(), nIdx );
+ SwNodeIndex aIdx( rContext.GetDoc().GetNodes(), nIdx );
SwTxtNode * pTxtNd = aIdx.GetNode().GetTxtNode();
if (NULL != pTxtNd)
@@ -364,9 +353,9 @@ void SwUndoNumOrNoNum::Undo( SwUndoIter& rUndoIter )
}
// #115901#, #i40034#
-void SwUndoNumOrNoNum::Redo( SwUndoIter& rUndoIter )
+void SwUndoNumOrNoNum::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwNodeIndex aIdx( rUndoIter.GetDoc().GetNodes(), nIdx );
+ SwNodeIndex aIdx( rContext.GetDoc().GetNodes(), nIdx );
SwTxtNode * pTxtNd = aIdx.GetNode().GetTxtNode();
if (NULL != pTxtNd)
@@ -376,37 +365,39 @@ void SwUndoNumOrNoNum::Redo( SwUndoIter& rUndoIter )
}
// #115901#
-void SwUndoNumOrNoNum::Repeat( SwUndoIter& rUndoIter )
+void SwUndoNumOrNoNum::RepeatImpl(::sw::RepeatContext & rContext)
{
-
+ SwDoc & rDoc = rContext.GetDoc();
if (mbOldNum && ! mbNewNum)
- rUndoIter.GetDoc().NumOrNoNum( rUndoIter.pAktPam->GetPoint()->nNode,
- FALSE);
+ {
+ rDoc.NumOrNoNum(rContext.GetRepeatPaM().GetPoint()->nNode, sal_False);
+ }
else if ( ! mbOldNum && mbNewNum )
- rUndoIter.GetDoc().NumOrNoNum( rUndoIter.pAktPam->GetPoint()->nNode,
- TRUE);
+ {
+ rDoc.NumOrNoNum(rContext.GetRepeatPaM().GetPoint()->nNode, sal_True);
+ }
}
-/* */
+/* */
-SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, BOOL bFlg )
+SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, sal_Bool bFlg )
: SwUndo( UNDO_SETNUMRULESTART ),
nIdx( rPos.nNode.GetIndex() ), nOldStt( USHRT_MAX ),
- nNewStt( USHRT_MAX ), bSetSttValue( FALSE ), bFlag( bFlg )
+ nNewStt( USHRT_MAX ), bSetSttValue( sal_False ), bFlag( bFlg )
{
}
-SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, USHORT nStt )
+SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, sal_uInt16 nStt )
: SwUndo( UNDO_SETNUMRULESTART ),
nIdx( rPos.nNode.GetIndex() ),
- nOldStt( USHRT_MAX ), nNewStt( nStt ), bSetSttValue( TRUE )
+ nOldStt( USHRT_MAX ), nNewStt( nStt ), bSetSttValue( sal_True )
{
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
if ( pTxtNd )
{
if ( pTxtNd->HasAttrListRestartValue() )
{
- nOldStt = static_cast<USHORT>(pTxtNd->GetAttrListRestartValue());
+ nOldStt = static_cast<sal_uInt16>(pTxtNd->GetAttrListRestartValue());
}
else
{
@@ -416,34 +407,47 @@ SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, USHORT nStt )
}
-void SwUndoNumRuleStart::Undo( SwUndoIter& rUndoIter )
+void SwUndoNumRuleStart::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwPosition aPos( *rUndoIter.GetDoc().GetNodes()[ nIdx ] );
+ SwDoc & rDoc = rContext.GetDoc();
+ SwPosition const aPos( *rDoc.GetNodes()[ nIdx ] );
if( bSetSttValue )
- rUndoIter.GetDoc().SetNodeNumStart( aPos, nOldStt );
+ {
+ rDoc.SetNodeNumStart( aPos, nOldStt );
+ }
else
- rUndoIter.GetDoc().SetNumRuleStart( aPos, !bFlag );
+ {
+ rDoc.SetNumRuleStart( aPos, !bFlag );
+ }
}
-void SwUndoNumRuleStart::Redo( SwUndoIter& rUndoIter )
+void SwUndoNumRuleStart::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
-
- SwPosition aPos( *rDoc.GetNodes()[ nIdx ] );
+ SwDoc & rDoc = rContext.GetDoc();
+ SwPosition const aPos( *rDoc.GetNodes()[ nIdx ] );
if( bSetSttValue )
+ {
rDoc.SetNodeNumStart( aPos, nNewStt );
+ }
else
+ {
rDoc.SetNumRuleStart( aPos, bFlag );
+ }
}
-void SwUndoNumRuleStart::Repeat( SwUndoIter& rUndoIter )
+void SwUndoNumRuleStart::RepeatImpl(::sw::RepeatContext & rContext)
{
+ SwDoc & rDoc = rContext.GetDoc();
if( bSetSttValue )
- rUndoIter.GetDoc().SetNodeNumStart( *rUndoIter.pAktPam->GetPoint(), nNewStt );
+ {
+ rDoc.SetNodeNumStart(*rContext.GetRepeatPaM().GetPoint(), nNewStt);
+ }
else
- rUndoIter.GetDoc().SetNumRuleStart( *rUndoIter.pAktPam->GetPoint(), bFlag );
+ {
+ rDoc.SetNumRuleStart(*rContext.GetRepeatPaM().GetPoint(), bFlag);
+ }
}
diff --git a/sw/source/core/undo/unoutl.cxx b/sw/source/core/undo/unoutl.cxx
index d30aba417043..109387765fc6 100644
--- a/sw/source/core/undo/unoutl.cxx
+++ b/sw/source/core/undo/unoutl.cxx
@@ -29,44 +29,36 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "doc.hxx"
#include "swundo.hxx" // fuer die UndoIds
#include "pam.hxx"
#include "ndtxt.hxx"
-#include "undobj.hxx"
+#include <UndoCore.hxx>
-inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
-
SwUndoOutlineLeftRight::SwUndoOutlineLeftRight( const SwPaM& rPam,
short nOff )
: SwUndo( UNDO_OUTLINE_LR ), SwUndRng( rPam ), nOffset( nOff )
{
}
-
-void SwUndoOutlineLeftRight::Undo( SwUndoIter& rUndoIter )
+void SwUndoOutlineLeftRight::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SetPaM( rUndoIter );
- rUndoIter.GetDoc().OutlineUpDown( *rUndoIter.pAktPam, -nOffset );
+ SwPaM & rPaM( AddUndoRedoPaM(rContext) );
+ rContext.GetDoc().OutlineUpDown(rPaM, -nOffset);
}
-
-void SwUndoOutlineLeftRight::Redo( SwUndoIter& rUndoIter )
+void SwUndoOutlineLeftRight::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SetPaM( rUndoIter );
- rUndoIter.GetDoc().OutlineUpDown( *rUndoIter.pAktPam, nOffset );
+ SwPaM & rPaM( AddUndoRedoPaM(rContext) );
+ rContext.GetDoc().OutlineUpDown(rPaM, nOffset);
}
-
-void SwUndoOutlineLeftRight::Repeat( SwUndoIter& rUndoIter )
+void SwUndoOutlineLeftRight::RepeatImpl(::sw::RepeatContext & rContext)
{
- rUndoIter.GetDoc().OutlineUpDown( *rUndoIter.pAktPam, nOffset );
+ rContext.GetDoc().OutlineUpDown(rContext.GetRepeatPaM(), nOffset);
}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index eb1ff8b846ec..f2f83a06fd42 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -29,20 +29,26 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <UndoOverwrite.hxx>
+
+#include <tools/resid.hxx>
#include <unotools/charclass.hxx>
#include <unotools/transliterationwrapper.hxx>
+
#include <comphelper/processfactory.hxx>
+
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
+#include <IShellCursorSupplier.hxx>
#include <swundo.hxx> // fuer die UndoIds
#include <pam.hxx>
#include <ndtxt.hxx>
-#include <undobj.hxx>
+#include <UndoCore.hxx>
#include <rolbck.hxx>
#include <acorrect.hxx>
#include <docary.hxx>
-#include <tools/resid.hxx>
#include <comcore.hrc> // #111827#
#include <undo.hrc>
@@ -50,33 +56,23 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::i18n;
using namespace ::com::sun::star::uno;
-//------------------------------------------------------------------
-
-// zwei Zugriffs-Funktionen
-inline SwPosition* IterPt( SwUndoIter& rUIter )
-{ return rUIter.pAktPam->GetPoint(); }
-inline SwPosition* IterMk( SwUndoIter& rUIter )
-{ return rUIter.pAktPam->GetMark(); }
-
-inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
//------------------------------------------------------------
-
// OVERWRITE
SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos,
sal_Unicode cIns )
: SwUndo(UNDO_OVERWRITE),
- pRedlSaveData( 0 ), bGroup( FALSE )
+ pRedlSaveData( 0 ), bGroup( sal_False )
{
if( !pDoc->IsIgnoreRedline() && pDoc->GetRedlineTbl().Count() )
{
SwPaM aPam( rPos.nNode, rPos.nContent.GetIndex(),
rPos.nNode, rPos.nContent.GetIndex()+1 );
pRedlSaveData = new SwRedlineSaveDatas;
- if( !FillSaveData( aPam, *pRedlSaveData, FALSE ))
+ if( !FillSaveData( aPam, *pRedlSaveData, sal_False ))
delete pRedlSaveData, pRedlSaveData = 0;
}
@@ -86,7 +82,7 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos,
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
OSL_ENSURE( pTxtNd, "Overwrite nicht im TextNode?" );
- bInsChar = TRUE;
+ bInsChar = sal_True;
xub_StrLen nTxtNdLen = pTxtNd->GetTxt().Len();
if( nSttCntnt < nTxtNdLen ) // kein reines Einfuegen ?
{
@@ -97,11 +93,11 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos,
pHistory->CopyAttr( pTxtNd->GetpSwpHints(), nSttNode, 0,
nTxtNdLen, false );
rPos.nContent++;
- bInsChar = FALSE;
+ bInsChar = sal_False;
}
- BOOL bOldExpFlg = pTxtNd->IsIgnoreDontExpand();
- pTxtNd->SetIgnoreDontExpand( TRUE );
+ sal_Bool bOldExpFlg = pTxtNd->IsIgnoreDontExpand();
+ pTxtNd->SetIgnoreDontExpand( sal_True );
pTxtNd->InsertText( cIns, rPos.nContent,
IDocumentContentOperations::INS_EMPTYEXPAND );
@@ -122,7 +118,7 @@ SwUndoOverwrite::~SwUndoOverwrite()
delete pRedlSaveData;
}
-BOOL SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
+sal_Bool SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
sal_Unicode cIns )
{
/// ?? was ist mit nur eingefuegten Charaktern ???
@@ -130,14 +126,14 @@ BOOL SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
// es kann nur das Loeschen von einzelnen char's zusammengefasst werden
if( rPos.nNode != nSttNode || !aInsStr.Len() ||
( !bGroup && aInsStr.Len() != 1 ))
- return FALSE;
+ return sal_False;
// ist der Node ueberhaupt ein TextNode?
SwTxtNode * pDelTxtNd = rPos.nNode.GetNode().GetTxtNode();
if( !pDelTxtNd ||
( pDelTxtNd->GetTxt().Len() != rPos.nContent.GetIndex() &&
rPos.nContent.GetIndex() != ( nSttCntnt + aInsStr.Len() )))
- return FALSE;
+ return sal_False;
CharClass& rCC = GetAppCharClass();
@@ -145,23 +141,23 @@ BOOL SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
if (( CH_TXTATR_BREAKWORD == cIns || CH_TXTATR_INWORD == cIns ) ||
rCC.isLetterNumeric( String( cIns ), 0 ) !=
rCC.isLetterNumeric( aInsStr, aInsStr.Len()-1 ) )
- return FALSE;
+ return sal_False;
{
SwRedlineSaveDatas* pTmpSav = new SwRedlineSaveDatas;
SwPaM aPam( rPos.nNode, rPos.nContent.GetIndex(),
rPos.nNode, rPos.nContent.GetIndex()+1 );
- if( !FillSaveData( aPam, *pTmpSav, FALSE ))
+ if( !FillSaveData( aPam, *pTmpSav, sal_False ))
delete pTmpSav, pTmpSav = 0;
- BOOL bOk = ( !pRedlSaveData && !pTmpSav ) ||
+ sal_Bool bOk = ( !pRedlSaveData && !pTmpSav ) ||
( pRedlSaveData && pTmpSav &&
SwUndo::CanRedlineGroup( *pRedlSaveData, *pTmpSav,
nSttCntnt > rPos.nContent.GetIndex() ));
delete pTmpSav;
if( !bOk )
- return FALSE;
+ return sal_False;
pDoc->DeleteRedline( aPam, false, USHRT_MAX );
}
@@ -176,11 +172,11 @@ BOOL SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
rPos.nContent++;
}
else
- bInsChar = TRUE;
+ bInsChar = sal_True;
}
- BOOL bOldExpFlg = pDelTxtNd->IsIgnoreDontExpand();
- pDelTxtNd->SetIgnoreDontExpand( TRUE );
+ sal_Bool bOldExpFlg = pDelTxtNd->IsIgnoreDontExpand();
+ pDelTxtNd->SetIgnoreDontExpand( sal_True );
pDelTxtNd->InsertText( cIns, rPos.nContent,
IDocumentContentOperations::INS_EMPTYEXPAND );
@@ -193,18 +189,19 @@ BOOL SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
}
pDelTxtNd->SetIgnoreDontExpand( bOldExpFlg );
- bGroup = TRUE;
- return TRUE;
+ bGroup = sal_True;
+ return sal_True;
}
-void SwUndoOverwrite::Undo( SwUndoIter& rUndoIter )
+void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwPaM* pAktPam = rUndoIter.pAktPam;
- SwDoc* pDoc = pAktPam->GetDoc();
+ SwDoc *const pDoc = & rContext.GetDoc();
+ SwPaM *const pAktPam(& rContext.GetCursorSupplier().CreateNewShellCursor());
+
pAktPam->DeleteMark();
pAktPam->GetPoint()->nNode = nSttNode;
SwTxtNode* pTxtNd = pAktPam->GetNode()->GetTxtNode();
@@ -234,8 +231,8 @@ void SwUndoOverwrite::Undo( SwUndoIter& rUndoIter )
String aTmpStr( '1' );
sal_Unicode* pTmpStr = aTmpStr.GetBufferAccess();
- BOOL bOldExpFlg = pTxtNd->IsIgnoreDontExpand();
- pTxtNd->SetIgnoreDontExpand( TRUE );
+ sal_Bool bOldExpFlg = pTxtNd->IsIgnoreDontExpand();
+ pTxtNd->SetIgnoreDontExpand( sal_True );
rIdx++;
for( xub_StrLen n = 0; n < aDelStr.Len(); n++ )
@@ -267,29 +264,27 @@ void SwUndoOverwrite::Undo( SwUndoIter& rUndoIter )
SetSaveData( *pDoc, *pRedlSaveData );
}
-void SwUndoOverwrite::Repeat( SwUndoIter& rUndoIter )
+void SwUndoOverwrite::RepeatImpl(::sw::RepeatContext & rContext)
{
- rUndoIter.pLastUndoObj = this;
- SwPaM* pAktPam = rUndoIter.pAktPam;
+ SwPaM *const pAktPam = & rContext.GetRepeatPaM();
if( !aInsStr.Len() || pAktPam->HasMark() )
return;
- SwDoc& rDoc = *pAktPam->GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
- BOOL bGroupUndo = rDoc.DoesGroupUndo();
- rDoc.DoGroupUndo( FALSE );
- rDoc.Overwrite( *pAktPam, aInsStr.GetChar( 0 ));
- rDoc.DoGroupUndo( bGroupUndo );
+ {
+ ::sw::GroupUndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo());
+ rDoc.Overwrite(*pAktPam, aInsStr.GetChar(0));
+ }
for( xub_StrLen n = 1; n < aInsStr.Len(); ++n )
rDoc.Overwrite( *pAktPam, aInsStr.GetChar( n ) );
}
-
-
-void SwUndoOverwrite::Redo( SwUndoIter& rUndoIter )
+void SwUndoOverwrite::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwPaM* pAktPam = rUndoIter.pAktPam;
- SwDoc* pDoc = pAktPam->GetDoc();
+ SwDoc *const pDoc = & rContext.GetDoc();
+ SwPaM *const pAktPam(& rContext.GetCursorSupplier().CreateNewShellCursor());
+
pAktPam->DeleteMark();
pAktPam->GetPoint()->nNode = nSttNode;
SwTxtNode* pTxtNd = pAktPam->GetNode()->GetTxtNode();
@@ -306,8 +301,8 @@ void SwUndoOverwrite::Redo( SwUndoIter& rUndoIter )
}
rIdx.Assign( pTxtNd, aDelStr.Len() ? nSttCntnt+1 : nSttCntnt );
- BOOL bOldExpFlg = pTxtNd->IsIgnoreDontExpand();
- pTxtNd->SetIgnoreDontExpand( TRUE );
+ sal_Bool bOldExpFlg = pTxtNd->IsIgnoreDontExpand();
+ pTxtNd->SetIgnoreDontExpand( sal_True );
for( xub_StrLen n = 0; n < aInsStr.Len(); n++ )
{
@@ -356,10 +351,10 @@ struct _UndoTransliterate_Data
String sText;
SwHistory* pHistory;
Sequence< sal_Int32 >* pOffsets;
- ULONG nNdIdx;
+ sal_uLong nNdIdx;
xub_StrLen nStart, nLen;
- _UndoTransliterate_Data( ULONG nNd, xub_StrLen nStt, xub_StrLen nStrLen, const String& rTxt )
+ _UndoTransliterate_Data( sal_uLong nNd, xub_StrLen nStt, xub_StrLen nStrLen, const String& rTxt )
: sText( rTxt ), pHistory( 0 ), pOffsets( 0 ),
nNdIdx( nNd ), nStart( nStt ), nLen( nStrLen )
{}
@@ -381,11 +376,9 @@ SwUndoTransliterate::~SwUndoTransliterate()
delete aChanges[i];
}
-void SwUndoTransliterate::Undo( SwUndoIter& rUndoIter )
+void SwUndoTransliterate::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
- BOOL bUndo = rDoc.DoesUndo();
- rDoc.DoUndo( FALSE );
+ SwDoc & rDoc = rContext.GetDoc();
// since the changes were added to the vector from the end of the string/node towards
// the start, we need to revert them from the start towards the end now to keep the
@@ -394,27 +387,24 @@ void SwUndoTransliterate::Undo( SwUndoIter& rUndoIter )
for (sal_Int32 i = aChanges.size() - 1; i >= 0; --i)
aChanges[i]->SetChangeAtNode( rDoc );
- rDoc.DoUndo( bUndo );
- SetPaM( rUndoIter, TRUE );
+ AddUndoRedoPaM(rContext, true);
}
-void SwUndoTransliterate::Redo( SwUndoIter& rUndoIter )
+void SwUndoTransliterate::RedoImpl(::sw::UndoRedoContext & rContext)
{
-/* ??? */ rUndoIter.SetUpdateAttr( TRUE );
-
- SetPaM( *rUndoIter.pAktPam );
- Repeat( rUndoIter );
+ SwPaM & rPam( AddUndoRedoPaM(rContext) );
+ DoTransliterate(rContext.GetDoc(), rPam);
}
-void SwUndoTransliterate::Repeat( SwUndoIter& rUndoIter )
+void SwUndoTransliterate::RepeatImpl(::sw::RepeatContext & rContext)
{
- SwPaM& rPam = *rUndoIter.pAktPam;
- SwDoc& rDoc = rUndoIter.GetDoc();
+ DoTransliterate(rContext.GetDoc(), rContext.GetRepeatPaM());
+}
+void SwUndoTransliterate::DoTransliterate(SwDoc & rDoc, SwPaM & rPam)
+{
utl::TransliterationWrapper aTrans( ::comphelper::getProcessServiceFactory(), nType );
rDoc.TransliterateText( rPam, aTrans );
-
- rUndoIter.pLastUndoObj = this;
}
void SwUndoTransliterate::AddChanges( SwTxtNode& rTNd,
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index a994e5e1faa9..90d8d261e604 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -29,6 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <UndoRedline.hxx>
#include <hintids.hxx>
#include <unotools/charclass.hxx>
@@ -36,24 +37,22 @@
#include <swundo.hxx> // fuer die UndoIds
#include <pam.hxx>
#include <ndtxt.hxx>
-#include <undobj.hxx>
+#include <UndoCore.hxx>
+#include <UndoDelete.hxx>
#include <rolbck.hxx>
#include <redline.hxx>
#include <docary.hxx>
#include <sortopt.hxx>
-extern void lcl_JoinText( SwPaM& rPam, BOOL bJoinPrev );
-extern void lcl_GetJoinFlags( SwPaM& rPam, BOOL& rJoinTxt, BOOL& rJoinPrev );
+extern void lcl_JoinText( SwPaM& rPam, sal_Bool bJoinPrev );
+extern void lcl_GetJoinFlags( SwPaM& rPam, sal_Bool& rJoinTxt, sal_Bool& rJoinPrev );
//------------------------------------------------------------------
-inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
-
-
SwUndoRedline::SwUndoRedline( SwUndoId nUsrId, const SwPaM& rRange )
: SwUndo( UNDO_REDLINE ), SwUndRng( rRange ),
pRedlData( 0 ), pRedlSaveData( 0 ), nUserId( nUsrId ),
- bHiddenRedlines( FALSE )
+ bHiddenRedlines( sal_False )
{
// Redline beachten
SwDoc& rDoc = *rRange.GetDoc();
@@ -71,10 +70,10 @@ SwUndoRedline::SwUndoRedline( SwUndoId nUsrId, const SwPaM& rRange )
SetRedlineMode( rDoc.GetRedlineMode() );
}
- ULONG nEndExtra = rDoc.GetNodes().GetEndOfExtras().GetIndex();
+ sal_uLong nEndExtra = rDoc.GetNodes().GetEndOfExtras().GetIndex();
pRedlSaveData = new SwRedlineSaveDatas;
- if( !FillSaveData( rRange, *pRedlSaveData, FALSE,
+ if( !FillSaveData( rRange, *pRedlSaveData, sal_False,
UNDO_REJECT_REDLINE != nUserId ))
delete pRedlSaveData, pRedlSaveData = 0;
else
@@ -95,17 +94,22 @@ SwUndoRedline::~SwUndoRedline()
delete pRedlSaveData;
}
-void SwUndoRedline::Undo( SwUndoIter& rIter )
+sal_uInt16 SwUndoRedline::GetRedlSaveCount() const
{
- SwDoc* pDoc = &rIter.GetDoc();
- SetPaM( *rIter.pAktPam );
+ return pRedlSaveData ? pRedlSaveData->Count() : 0;
+}
-// RedlineMode setzen?
- _Undo( rIter );
+
+void SwUndoRedline::UndoImpl(::sw::UndoRedoContext & rContext)
+{
+ SwDoc *const pDoc = & rContext.GetDoc();
+ SwPaM & rPam( AddUndoRedoPaM(rContext) );
+
+ UndoRedlineImpl(*pDoc, rPam);
if( pRedlSaveData )
{
- ULONG nEndExtra = pDoc->GetNodes().GetEndOfExtras().GetIndex();
+ sal_uLong nEndExtra = pDoc->GetNodes().GetEndOfExtras().GetIndex();
SetSaveData( *pDoc, *pRedlSaveData );
if( bHiddenRedlines )
{
@@ -115,51 +119,51 @@ void SwUndoRedline::Undo( SwUndoIter& rIter )
nSttNode += nEndExtra;
nEndNode += nEndExtra;
}
- SetPaM( *rIter.pAktPam, TRUE );
+ SetPaM(rPam, true);
}
}
-void SwUndoRedline::Redo( SwUndoIter& rIter )
+void SwUndoRedline::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc* pDoc = &rIter.GetDoc();
+ SwDoc *const pDoc = & rContext.GetDoc();
RedlineMode_t eOld = pDoc->GetRedlineMode();
pDoc->SetRedlineMode_intern((RedlineMode_t)(( eOld & ~nsRedlineMode_t::REDLINE_IGNORE) | nsRedlineMode_t::REDLINE_ON ));
- SetPaM( *rIter.pAktPam );
+ SwPaM & rPam( AddUndoRedoPaM(rContext) );
if( pRedlSaveData && bHiddenRedlines )
{
- ULONG nEndExtra = pDoc->GetNodes().GetEndOfExtras().GetIndex();
- FillSaveData( *rIter.pAktPam, *pRedlSaveData, FALSE,
+ sal_uLong nEndExtra = pDoc->GetNodes().GetEndOfExtras().GetIndex();
+ FillSaveData(rPam, *pRedlSaveData, sal_False,
UNDO_REJECT_REDLINE != nUserId );
nEndExtra -= pDoc->GetNodes().GetEndOfExtras().GetIndex();
nSttNode -= nEndExtra;
nEndNode -= nEndExtra;
}
- _Redo( rIter );
- SetPaM( *rIter.pAktPam, TRUE );
+ RedoRedlineImpl(*pDoc, rPam);
+
+ SetPaM(rPam, true);
pDoc->SetRedlineMode_intern( eOld );
}
-// default ist leer
-void SwUndoRedline::_Undo( SwUndoIter& )
+void SwUndoRedline::UndoRedlineImpl(SwDoc &, SwPaM &)
{
}
-// default ist Redlines entfernen
-void SwUndoRedline::_Redo( SwUndoIter& rIter )
+// default: remove redlines
+void SwUndoRedline::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
{
- rIter.GetDoc().DeleteRedline( *rIter.pAktPam, true, USHRT_MAX );
+ rDoc.DeleteRedline(rPam, true, USHRT_MAX);
}
-/* */
+// SwUndoRedlineDelete ///////////////////////////////////////////////////
SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUsrId )
: SwUndoRedline( nUsrId = (nUsrId ? nUsrId : UNDO_DELETE), rRange ),
- bCanGroup( FALSE ), bIsDelim( FALSE ), bIsBackspace( FALSE )
+ bCanGroup( sal_False ), bIsDelim( sal_False ), bIsBackspace( sal_False )
{
const SwTxtNode* pTNd;
if( UNDO_DELETE == nUserId &&
@@ -169,7 +173,7 @@ SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUsrId )
sal_Unicode cCh = pTNd->GetTxt().GetChar( nSttCntnt );
if( CH_TXTATR_BREAKWORD != cCh && CH_TXTATR_INWORD != cCh )
{
- bCanGroup = TRUE;
+ bCanGroup = sal_True;
bIsDelim = !GetAppCharClass().isLetterNumeric( pTNd->GetTxt(),
nSttCntnt );
bIsBackspace = nSttCntnt == rRange.GetPoint()->nContent.GetIndex();
@@ -179,20 +183,22 @@ SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUsrId )
bCacheComment = false;
}
-void SwUndoRedlineDelete::_Undo( SwUndoIter& rIter )
+void SwUndoRedlineDelete::UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
{
- rIter.GetDoc().DeleteRedline( *rIter.pAktPam, true, USHRT_MAX );
+ rDoc.DeleteRedline(rPam, true, USHRT_MAX);
}
-void SwUndoRedlineDelete::_Redo( SwUndoIter& rIter )
+void SwUndoRedlineDelete::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
{
- if( *rIter.pAktPam->GetPoint() != *rIter.pAktPam->GetMark() )
- rIter.GetDoc().AppendRedline( new SwRedline( *pRedlData, *rIter.pAktPam ), FALSE );
+ if (rPam.GetPoint() != rPam.GetMark())
+ {
+ rDoc.AppendRedline( new SwRedline(*pRedlData, rPam), sal_False );
+ }
}
-BOOL SwUndoRedlineDelete::CanGrouping( const SwUndoRedlineDelete& rNext )
+sal_Bool SwUndoRedlineDelete::CanGrouping( const SwUndoRedlineDelete& rNext )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( UNDO_DELETE == nUserId && nUserId == rNext.nUserId &&
bCanGroup == rNext.bCanGroup &&
bIsDelim == rNext.bIsDelim &&
@@ -218,7 +224,7 @@ BOOL SwUndoRedlineDelete::CanGrouping( const SwUndoRedlineDelete& rNext )
nEndCntnt = rNext.nEndCntnt;
else
nSttCntnt = rNext.nSttCntnt;
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -239,17 +245,16 @@ SwUndoRedlineSort::~SwUndoRedlineSort()
delete pOpt;
}
-void SwUndoRedlineSort::_Undo( SwUndoIter& rIter )
+void SwUndoRedlineSort::UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
{
- // im rIter.pAktPam ist der sortiete Bereich,
- // im aSaveRange steht der kopierte, sprich der originale.
- SwDoc& rDoc = rIter.GetDoc();
+ // rPam contains the sorted range
+ // aSaveRange contains copied (i.e. original) range
- SwPosition* pStart = rIter.pAktPam->Start();
- SwPosition* pEnd = rIter.pAktPam->End();
+ SwPosition *const pStart = rPam.Start();
+ SwPosition *const pEnd = rPam.End();
SwNodeIndex aPrevIdx( pStart->nNode, -1 );
- ULONG nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
+ sal_uLong nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
if( 0 == ( nsRedlineMode_t::REDLINE_SHOW_DELETE & rDoc.GetRedlineMode()) )
{
@@ -257,7 +262,7 @@ void SwUndoRedlineSort::_Undo( SwUndoIter& rIter )
// damit die Nodes wieder uebereinstimmen!
// das Geloeschte ist versteckt, also suche das INSERT
// Redline Object. Dahinter steht das Geloeschte
- USHORT nFnd = rDoc.GetRedlinePos(
+ sal_uInt16 nFnd = rDoc.GetRedlinePos(
*rDoc.GetNodes()[ nSttNode + 1 ],
nsRedlineType_t::REDLINE_INSERT );
OSL_ENSURE( USHRT_MAX != nFnd && nFnd+1 < rDoc.GetRedlineTbl().Count(),
@@ -267,7 +272,7 @@ void SwUndoRedlineSort::_Undo( SwUndoIter& rIter )
}
{
- SwPaM aTmp( *rIter.pAktPam->GetMark() );
+ SwPaM aTmp( *rPam.GetMark() );
aTmp.GetMark()->nContent = 0;
aTmp.SetMark();
aTmp.GetPoint()->nNode = nSaveEndNode;
@@ -275,9 +280,9 @@ void SwUndoRedlineSort::_Undo( SwUndoIter& rIter )
rDoc.DeleteRedline( aTmp, true, USHRT_MAX );
}
- rDoc.DelFullPara( *rIter.pAktPam );
+ rDoc.DelFullPara(rPam);
- SwPaM* pPam = rIter.pAktPam;
+ SwPaM *const pPam = & rPam;
pPam->DeleteMark();
pPam->GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 );
SwCntntNode* pCNd = pPam->GetCntntNode();
@@ -290,22 +295,20 @@ void SwUndoRedlineSort::_Undo( SwUndoIter& rIter )
SetValues( *pPam );
- SetPaM( *rIter.pAktPam );
+ SetPaM(rPam);
}
-void SwUndoRedlineSort::_Redo( SwUndoIter& rIter )
+void SwUndoRedlineSort::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
{
- SwPaM& rPam = *rIter.pAktPam;
-
SwPaM* pPam = &rPam;
SwPosition* pStart = pPam->Start();
SwPosition* pEnd = pPam->End();
SwNodeIndex aPrevIdx( pStart->nNode, -1 );
- ULONG nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
+ sal_uLong nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
xub_StrLen nCntStt = pStart->nContent.GetIndex();
- rIter.GetDoc().SortText( rPam, *pOpt );
+ rDoc.SortText(rPam, *pOpt);
pPam->DeleteMark();
pPam->GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 );
@@ -327,9 +330,9 @@ void SwUndoRedlineSort::_Redo( SwUndoIter& rIter )
rPam.GetPoint()->nContent.Assign( rPam.GetCntntNode(), nSaveEndCntnt );
}
-void SwUndoRedlineSort::Repeat( SwUndoIter& rIter )
+void SwUndoRedlineSort::RepeatImpl(::sw::RepeatContext & rContext)
{
- rIter.GetDoc().SortText( *rIter.pAktPam, *pOpt );
+ rContext.GetDoc().SortText( rContext.GetRepeatPaM(), *pOpt );
}
void SwUndoRedlineSort::SetSaveRange( const SwPaM& rRange )
@@ -344,21 +347,21 @@ void SwUndoRedlineSort::SetOffset( const SwNodeIndex& rIdx )
nOffset = rIdx.GetIndex() - nSttNode;
}
-/* */
+// SwUndoAcceptRedline ///////////////////////////////////////////////////
SwUndoAcceptRedline::SwUndoAcceptRedline( const SwPaM& rRange )
: SwUndoRedline( UNDO_ACCEPT_REDLINE, rRange )
{
}
-void SwUndoAcceptRedline::_Redo( SwUndoIter& rIter )
+void SwUndoAcceptRedline::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
{
- rIter.GetDoc().AcceptRedline( *rIter.pAktPam, false );
+ rDoc.AcceptRedline(rPam, false);
}
-void SwUndoAcceptRedline::Repeat( SwUndoIter& rIter )
+void SwUndoAcceptRedline::RepeatImpl(::sw::RepeatContext & rContext)
{
- rIter.GetDoc().AcceptRedline( *rIter.pAktPam, true );
+ rContext.GetDoc().AcceptRedline(rContext.GetRepeatPaM(), true);
}
SwUndoRejectRedline::SwUndoRejectRedline( const SwPaM& rRange )
@@ -366,19 +369,19 @@ SwUndoRejectRedline::SwUndoRejectRedline( const SwPaM& rRange )
{
}
-void SwUndoRejectRedline::_Redo( SwUndoIter& rIter )
+void SwUndoRejectRedline::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
{
- rIter.GetDoc().RejectRedline( *rIter.pAktPam, false );
+ rDoc.RejectRedline(rPam, false);
}
-void SwUndoRejectRedline::Repeat( SwUndoIter& rIter )
+void SwUndoRejectRedline::RepeatImpl(::sw::RepeatContext & rContext)
{
- rIter.GetDoc().RejectRedline( *rIter.pAktPam, true );
+ rContext.GetDoc().RejectRedline(rContext.GetRepeatPaM(), true);
}
-/* */
+// SwUndoCompDoc /////////////////////////////////////////////////////////
-SwUndoCompDoc::SwUndoCompDoc( const SwPaM& rRg, BOOL bIns )
+SwUndoCompDoc::SwUndoCompDoc( const SwPaM& rRg, sal_Bool bIns )
: SwUndo( UNDO_COMPAREDOC ), SwUndRng( rRg ), pRedlData( 0 ),
pUnDel( 0 ), pUnDel2( 0 ), pRedlSaveData( 0 ), bInsert( bIns )
{
@@ -405,7 +408,7 @@ SwUndoCompDoc::SwUndoCompDoc( const SwRedline& rRedl )
}
pRedlSaveData = new SwRedlineSaveDatas;
- if( !FillSaveData( rRedl, *pRedlSaveData, FALSE, TRUE ))
+ if( !FillSaveData( rRedl, *pRedlSaveData, sal_False, sal_True ))
delete pRedlSaveData, pRedlSaveData = 0;
}
@@ -417,12 +420,10 @@ SwUndoCompDoc::~SwUndoCompDoc()
delete pRedlSaveData;
}
-void SwUndoCompDoc::Undo( SwUndoIter& rIter )
+void SwUndoCompDoc::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwPaM* pPam = rIter.pAktPam;
- SwDoc* pDoc = pPam->GetDoc();
-
- SetPaM( *pPam );
+ SwDoc *const pDoc = & rContext.GetDoc();
+ SwPaM *const pPam( & AddUndoRedoPaM(rContext) );
if( !bInsert )
{
@@ -435,8 +436,8 @@ void SwUndoCompDoc::Undo( SwUndoIter& rIter )
pDoc->SetRedlineMode_intern( eOld );
//per definition Point is end (in SwUndRng!)
- SwCntntNode* pCSttNd = pPam->GetCntntNode( FALSE );
- SwCntntNode* pCEndNd = pPam->GetCntntNode( TRUE );
+ SwCntntNode* pCSttNd = pPam->GetCntntNode( sal_False );
+ SwCntntNode* pCEndNd = pPam->GetCntntNode( sal_True );
// if start- and end-content is zero, then the doc-compare moves
// complete nodes into the current doc. And then the selection
@@ -445,10 +446,10 @@ void SwUndoCompDoc::Undo( SwUndoIter& rIter )
if( !nSttCntnt && !nEndCntnt )
pPam->Exchange();
- BOOL bJoinTxt, bJoinPrev;
+ sal_Bool bJoinTxt, bJoinPrev;
::lcl_GetJoinFlags( *pPam, bJoinTxt, bJoinPrev );
- pUnDel = new SwUndoDelete( *pPam, FALSE );
+ pUnDel = new SwUndoDelete( *pPam, sal_False );
if( bJoinTxt )
::lcl_JoinText( *pPam, bJoinPrev );
@@ -456,7 +457,7 @@ void SwUndoCompDoc::Undo( SwUndoIter& rIter )
if( pCSttNd && !pCEndNd)
{
// #112139# Do not step behind the end of content.
- SwNode * pTmp = pPam->GetNode(TRUE);
+ SwNode * pTmp = pPam->GetNode(sal_True);
if (pTmp)
{
SwNode * pEnd = pDoc->GetNodes().DocumentSectionEndNode(pTmp);
@@ -465,9 +466,9 @@ void SwUndoCompDoc::Undo( SwUndoIter& rIter )
{
pPam->SetMark();
pPam->GetPoint()->nNode++;
- pPam->GetBound( TRUE ).nContent.Assign( 0, 0 );
- pPam->GetBound( FALSE ).nContent.Assign( 0, 0 );
- pUnDel2 = new SwUndoDelete( *pPam, TRUE );
+ pPam->GetBound( sal_True ).nContent.Assign( 0, 0 );
+ pPam->GetBound( sal_False ).nContent.Assign( 0, 0 );
+ pUnDel2 = new SwUndoDelete( *pPam, sal_True );
}
}
}
@@ -482,22 +483,17 @@ void SwUndoCompDoc::Undo( SwUndoIter& rIter )
if( pRedlSaveData )
SetSaveData( *pDoc, *pRedlSaveData );
}
- SetPaM( rIter, TRUE );
+ SetPaM(*pPam, true);
}
}
-void SwUndoCompDoc::Redo( SwUndoIter& rIter )
+void SwUndoCompDoc::RedoImpl(::sw::UndoRedoContext & rContext)
{
- // setze noch den Cursor auf den Redo-Bereich
- SwPaM* pPam = rIter.pAktPam;
- SwDoc* pDoc = pPam->GetDoc();
-
- rIter.pLastUndoObj = 0;
+ SwDoc *const pDoc = & rContext.GetDoc();
+ SwPaM *const pPam( & AddUndoRedoPaM(rContext) );
if( bInsert )
{
- SetPaM( *pPam );
-
if( pRedlData && IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ))
{
SwRedline* pTmp = new SwRedline( *pRedlData, *pPam );
@@ -522,10 +518,10 @@ void SwUndoCompDoc::Redo( SwUndoIter& rIter )
if( pUnDel2 )
{
- pUnDel2->Undo( rIter );
+ pUnDel2->UndoImpl(rContext);
delete pUnDel2, pUnDel2 = 0;
}
- pUnDel->Undo( rIter );
+ pUnDel->UndoImpl(rContext);
delete pUnDel, pUnDel = 0;
SetPaM( *pPam );
@@ -538,8 +534,8 @@ void SwUndoCompDoc::Redo( SwUndoIter& rIter )
// pDoc->SetRedlineMode_intern( eOld );
}
- SetPaM( rIter, TRUE );
+ SetPaM(*pPam, true);
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx
index a78f911f30f0..dd9a6ce93c62 100644
--- a/sw/source/core/undo/unsect.cxx
+++ b/sw/source/core/undo/unsect.cxx
@@ -29,6 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <UndoSection.hxx>
#include <sfx2/linkmgr.hxx>
#include <fmtcntnt.hxx>
@@ -37,7 +38,7 @@
#include <swundo.hxx> // fuer die UndoIds
#include <pam.hxx>
#include <ndtxt.hxx>
-#include <undobj.hxx>
+#include <UndoCore.hxx>
#include <section.hxx>
#include <rolbck.hxx>
#include <redline.hxx>
@@ -49,8 +50,6 @@
#include <calc.hxx>
-inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
-
SfxItemSet* lcl_GetAttrSet( const SwSection& rSect )
{
// Attribute des Formate sichern (Spalten, Farbe, ... )
@@ -59,7 +58,7 @@ SfxItemSet* lcl_GetAttrSet( const SwSection& rSect )
SfxItemSet* pAttr = 0;
if( rSect.GetFmt() )
{
- USHORT nCnt = 1;
+ sal_uInt16 nCnt = 1;
if( rSect.IsProtect() )
++nCnt;
@@ -123,9 +122,9 @@ SwUndoInsSection::~SwUndoInsSection()
{
}
-void SwUndoInsSection::Undo( SwUndoIter& rUndoIter )
+void SwUndoInsSection::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
RemoveIdxFromSection( rDoc, m_nSectionNodePos );
@@ -168,25 +167,23 @@ void SwUndoInsSection::Undo( SwUndoIter& rUndoIter )
rDoc.GetFtnIdxs().UpdateFtn( aIdx );
}
- SetPaM( rUndoIter );
+ AddUndoRedoPaM(rContext);
}
-
-void SwUndoInsSection::Redo( SwUndoIter& rUndoIter )
+void SwUndoInsSection::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
- SetPaM( rUndoIter );
+ SwDoc & rDoc = rContext.GetDoc();
+ SwPaM & rPam( AddUndoRedoPaM(rContext) );
const SwTOXBaseSection* pUpdateTOX = 0;
if (m_pTOXBase.get())
{
- pUpdateTOX = rDoc.InsertTableOf( *rUndoIter.pAktPam->GetPoint(),
+ pUpdateTOX = rDoc.InsertTableOf( *rPam.GetPoint(),
*m_pTOXBase, m_pAttrSet.get(), true);
}
else
{
- rDoc.InsertSwSection(*rUndoIter.pAktPam,
- *m_pSectionData, 0, m_pAttrSet.get(), true);
+ rDoc.InsertSwSection(rPam, *m_pSectionData, 0, m_pAttrSet.get(), true);
}
if (m_pHistory.get())
@@ -225,23 +222,22 @@ void SwUndoInsSection::Redo( SwUndoIter& rUndoIter )
}
}
-
-void SwUndoInsSection::Repeat( SwUndoIter& rUndoIter )
+void SwUndoInsSection::RepeatImpl(::sw::RepeatContext & rContext)
{
+ SwDoc & rDoc = rContext.GetDoc();
if (m_pTOXBase.get())
{
- rUndoIter.GetDoc().InsertTableOf( *rUndoIter.pAktPam->GetPoint(),
+ rDoc.InsertTableOf(*rContext.GetRepeatPaM().GetPoint(),
*m_pTOXBase, m_pAttrSet.get(), true);
}
else
{
- rUndoIter.GetDoc().InsertSwSection( *rUndoIter.pAktPam,
+ rDoc.InsertSwSection(rContext.GetRepeatPaM(),
*m_pSectionData, 0, m_pAttrSet.get());
}
}
-
-void SwUndoInsSection::Join( SwDoc& rDoc, ULONG nNode )
+void SwUndoInsSection::Join( SwDoc& rDoc, sal_uLong nNode )
{
SwNodeIndex aIdx( rDoc.GetNodes(), nNode );
SwTxtNode* pTxtNd = aIdx.GetNode().GetTxtNode();
@@ -295,15 +291,17 @@ private:
::std::auto_ptr<SwTOXBase> const m_pTOXBase; /// set iff section is TOX
::std::auto_ptr<SfxItemSet> const m_pAttrSet;
::boost::shared_ptr< ::sfx2::MetadatableUndo > const m_pMetadataUndo;
- ULONG const m_nStartNode;
- ULONG const m_nEndNode;
+ sal_uLong const m_nStartNode;
+ sal_uLong const m_nEndNode;
public:
SwUndoDelSection(
SwSectionFmt const&, SwSection const&, SwNodeIndex const*const);
+
virtual ~SwUndoDelSection();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
};
SW_DLLPRIVATE SwUndo * MakeUndoDelSection(SwSectionFmt const& rFormat)
@@ -331,9 +329,9 @@ SwUndoDelSection::~SwUndoDelSection()
{
}
-void SwUndoDelSection::Undo( SwUndoIter& rUndoIter )
+void SwUndoDelSection::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
if (m_pTOXBase.get())
{
@@ -384,9 +382,9 @@ void SwUndoDelSection::Undo( SwUndoIter& rUndoIter )
}
}
-void SwUndoDelSection::Redo( SwUndoIter& rUndoIter )
+void SwUndoDelSection::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
SwSectionNode *const pNd =
rDoc.GetNodes()[ m_nStartNode ]->GetSectionNode();
@@ -404,15 +402,17 @@ class SwUndoUpdateSection
private:
::std::auto_ptr<SwSectionData> m_pSectionData;
::std::auto_ptr<SfxItemSet> m_pAttrSet;
- ULONG const m_nStartNode;
+ sal_uLong const m_nStartNode;
bool const m_bOnlyAttrChanged;
public:
SwUndoUpdateSection(
SwSection const&, SwNodeIndex const*const, bool const bOnlyAttr);
+
virtual ~SwUndoUpdateSection();
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
+
+ virtual void UndoImpl( ::sw::UndoRedoContext & );
+ virtual void RedoImpl( ::sw::UndoRedoContext & );
};
SW_DLLPRIVATE SwUndo *
@@ -437,9 +437,9 @@ SwUndoUpdateSection::~SwUndoUpdateSection()
{
}
-void SwUndoUpdateSection::Undo( SwUndoIter& rUndoIter )
+void SwUndoUpdateSection::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
SwSectionNode *const pSectNd =
rDoc.GetNodes()[ m_nStartNode ]->GetSectionNode();
OSL_ENSURE( pSectNd, "wo ist mein SectionNode?" );
@@ -453,7 +453,7 @@ void SwUndoUpdateSection::Undo( SwUndoIter& rUndoIter )
// das Content- und Protect-Item muss bestehen bleiben
const SfxPoolItem* pItem;
m_pAttrSet->Put( pFmt->GetFmtAttr( RES_CNTNT ));
- if( SFX_ITEM_SET == pFmt->GetItemState( RES_PROTECT, TRUE, &pItem ))
+ if( SFX_ITEM_SET == pFmt->GetItemState( RES_PROTECT, sal_True, &pItem ))
{
m_pAttrSet->Put( *pItem );
}
@@ -493,9 +493,9 @@ void SwUndoUpdateSection::Undo( SwUndoIter& rUndoIter )
}
}
-void SwUndoUpdateSection::Redo( SwUndoIter& rUndoIter )
+void SwUndoUpdateSection::RedoImpl(::sw::UndoRedoContext & rContext)
{
- Undo( rUndoIter );
+ UndoImpl(rContext);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/unsort.cxx b/sw/source/core/undo/unsort.cxx
index b89c08d9bed3..1b72dba58572 100644
--- a/sw/source/core/undo/unsort.cxx
+++ b/sw/source/core/undo/unsort.cxx
@@ -28,18 +28,21 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
+#include <UndoSort.hxx>
+
#include <doc.hxx>
#include <swundo.hxx> // fuer die UndoIds
#include <pam.hxx>
#include <swtable.hxx>
#include <ndtxt.hxx>
-#include <undobj.hxx>
+#include <UndoCore.hxx>
+#include <UndoTable.hxx>
#include <sortopt.hxx>
#include <docsort.hxx>
#include <redline.hxx>
#include <node2lay.hxx>
-inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
/*--------------------------------------------------------------------
Beschreibung: Undo fuers Sorting
@@ -68,9 +71,8 @@ SwUndoSort::SwUndoSort(const SwPaM& rRg, const SwSortOptions& rOpt)
pSortOpt = new SwSortOptions(rOpt);
}
-
-SwUndoSort::SwUndoSort( ULONG nStt, ULONG nEnd, const SwTableNode& rTblNd,
- const SwSortOptions& rOpt, BOOL bSaveTable )
+SwUndoSort::SwUndoSort( sal_uLong nStt, sal_uLong nEnd, const SwTableNode& rTblNd,
+ const SwSortOptions& rOpt, sal_Bool bSaveTable )
: SwUndo(UNDO_SORT_TBL), pUndoTblAttr( 0 ), pRedlData( 0 )
{
nSttNode = nStt;
@@ -82,8 +84,6 @@ SwUndoSort::SwUndoSort( ULONG nStt, ULONG nEnd, const SwTableNode& rTblNd,
pUndoTblAttr = new SwUndoAttrTbl( rTblNd );
}
-
-
SwUndoSort::~SwUndoSort()
{
delete pSortOpt;
@@ -91,18 +91,18 @@ SwUndoSort::~SwUndoSort()
delete pRedlData;
}
-
-
-void SwUndoSort::Undo( SwUndoIter& rIter)
+void SwUndoSort::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
if(pSortOpt->bTable)
{
// Undo Tabelle
RemoveIdxFromSection( rDoc, nSttNode, &nEndNode );
if( pUndoTblAttr )
- pUndoTblAttr->Undo( rIter );
+ {
+ pUndoTblAttr->UndoImpl(rContext);
+ }
SwTableNode* pTblNd = rDoc.GetNodes()[ nTblNd ]->GetTableNode();
@@ -115,7 +115,7 @@ void SwUndoSort::Undo( SwUndoIter& rIter)
const SwTable& rTbl = pTblNd->GetTable();
SwMovedBoxes aMovedList;
- for( USHORT i=0; i < aSortList.Count(); i++)
+ for( sal_uInt16 i=0; i < aSortList.Count(); i++)
{
const SwTableBox* pSource = rTbl.GetTblBox(
*aSortList[i]->SORT_TXT_TBL.TBL.pSource );
@@ -133,23 +133,24 @@ void SwUndoSort::Undo( SwUndoIter& rIter)
// Restore table frames:
// --> FME 2004-11-26 #i37739# A simple 'MakeFrms' after the node sorting
// does not work if the table is inside a frame and has no prev/next.
- const ULONG nIdx = pTblNd->GetIndex();
+ const sal_uLong nIdx = pTblNd->GetIndex();
aNode2Layout.RestoreUpperFrms( rDoc.GetNodes(), nIdx, nIdx + 1 );
// <--
}
else
{
// Undo Text
- RemoveIdx( *rIter.pAktPam );
+ SwPaM & rPam( AddUndoRedoPaM(rContext) );
+ RemoveIdxFromRange(rPam, true);
// fuer die sorted Positions einen Index anlegen.
// JP 25.11.97: Die IndexList muss aber nach SourcePosition
// aufsteigend sortiert aufgebaut werden
- SwUndoSortList aIdxList( (BYTE)aSortList.Count() );
- USHORT i;
+ SwUndoSortList aIdxList( (sal_uInt8)aSortList.Count() );
+ sal_uInt16 i;
for( i = 0; i < aSortList.Count(); ++i)
- for( USHORT ii=0; ii < aSortList.Count(); ++ii )
+ for( sal_uInt16 ii=0; ii < aSortList.Count(); ++ii )
if( aSortList[ii]->SORT_TXT_TBL.TXT.nSource == nSttNode + i )
{
SwNodeIndex* pIdx = new SwNodeIndex( rDoc.GetNodes(),
@@ -167,14 +168,13 @@ void SwUndoSort::Undo( SwUndoIter& rIter)
}
// Indixes loeschen
aIdxList.DeleteAndDestroy(0, aIdxList.Count());
- SetPaM( rIter, TRUE );
+ SetPaM(rPam, true);
}
}
-
-void SwUndoSort::Redo( SwUndoIter& rIter)
+void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
if(pSortOpt->bTable)
{
@@ -192,7 +192,7 @@ void SwUndoSort::Redo( SwUndoIter& rIter)
const SwTable& rTbl = pTblNd->GetTable();
SwMovedBoxes aMovedList;
- for(USHORT i=0; i < aSortList.Count(); ++i)
+ for(sal_uInt16 i=0; i < aSortList.Count(); ++i)
{
const SwTableBox* pSource = rTbl.GetTblBox(
(const String&) *aSortList[i]->SORT_TXT_TBL.TBL.pSource );
@@ -207,22 +207,26 @@ void SwUndoSort::Redo( SwUndoIter& rIter)
}
if( pUndoTblAttr )
- pUndoTblAttr->Redo( rIter );
+ {
+ pUndoTblAttr->RedoImpl(rContext);
+ }
// Restore table frames:
// --> FME 2004-11-26 #i37739# A simple 'MakeFrms' after the node sorting
// does not work if the table is inside a frame and has no prev/next.
- const ULONG nIdx = pTblNd->GetIndex();
+ const sal_uLong nIdx = pTblNd->GetIndex();
aNode2Layout.RestoreUpperFrms( rDoc.GetNodes(), nIdx, nIdx + 1 );
// <--
}
else
{
- // Redo bei Text
- RemoveIdx( *rIter.pAktPam );
+ // Redo for Text
+ SwPaM & rPam( AddUndoRedoPaM(rContext) );
+ SetPaM(rPam);
+ RemoveIdxFromRange(rPam, true);
- SwUndoSortList aIdxList( (BYTE)aSortList.Count() );
- USHORT i;
+ SwUndoSortList aIdxList( (sal_uInt8)aSortList.Count() );
+ sal_uInt16 i;
for( i = 0; i < aSortList.Count(); ++i)
{ // aktuelle Pos ist die Ausgangslage
@@ -240,63 +244,39 @@ void SwUndoSort::Redo( SwUndoIter& rIter)
}
// Indixes loeschen
aIdxList.DeleteAndDestroy(0, aIdxList.Count());
- SetPaM( rIter, TRUE );
- const SwTxtNode* pTNd = rIter.pAktPam->GetNode()->GetTxtNode();
+ SetPaM(rPam, true);
+ SwTxtNode const*const pTNd = rPam.GetNode()->GetTxtNode();
if( pTNd )
- rIter.pAktPam->GetPoint()->nContent = pTNd->GetTxt().Len();
+ {
+ rPam.GetPoint()->nContent = pTNd->GetTxt().Len();
+ }
}
}
-
-void SwUndoSort::Repeat(SwUndoIter& rIter)
+void SwUndoSort::RepeatImpl(::sw::RepeatContext & rContext)
{
+ // table not repeat capable
if(!pSortOpt->bTable)
{
- SwPaM* pPam = rIter.pAktPam;
+ SwPaM *const pPam = & rContext.GetRepeatPaM();
SwDoc& rDoc = *pPam->GetDoc();
if( !rDoc.IsIdxInTbl( pPam->Start()->nNode ) )
rDoc.SortText(*pPam, *pSortOpt);
}
- // Tabelle ist nicht Repeat-Faehig
- rIter.pLastUndoObj = this;
-}
-
-
-void SwUndoSort::RemoveIdx( SwPaM& rPam )
-{
- rPam.DeleteMark();
- rPam.GetPoint()->nNode = nSttNode;
-
- SwCntntNode* pCNd = rPam.GetCntntNode();
- xub_StrLen nLen = pCNd->Len();
- if( nLen >= nSttCntnt )
- nLen = nSttCntnt;
- rPam.GetPoint()->nContent.Assign(pCNd, nLen );
- rPam.SetMark();
-
- rPam.GetPoint()->nNode = nEndNode;
- pCNd = rPam.GetCntntNode();
- nLen = pCNd->Len();
- if( nLen >= nEndCntnt )
- nLen = nEndCntnt;
- rPam.GetPoint()->nContent.Assign(pCNd, nLen );
- RemoveIdxFromRange( rPam, TRUE );
}
-
void SwUndoSort::Insert( const String& rOrgPos, const String& rNewPos)
{
SwSortUndoElement* pEle = new SwSortUndoElement(rOrgPos, rNewPos);
aSortList.C40_INSERT( SwSortUndoElement, pEle, aSortList.Count() );
}
-
-void SwUndoSort::Insert( ULONG nOrgPos, ULONG nNewPos)
+void SwUndoSort::Insert( sal_uLong nOrgPos, sal_uLong nNewPos)
{
SwSortUndoElement* pEle = new SwSortUndoElement(nOrgPos, nNewPos);
aSortList.C40_INSERT( SwSortUndoElement, pEle, aSortList.Count() );
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sw/source/core/undo/unspnd.cxx b/sw/source/core/undo/unspnd.cxx
index f1fd1fda60da..317d1baa4652 100644
--- a/sw/source/core/undo/unspnd.cxx
+++ b/sw/source/core/undo/unspnd.cxx
@@ -29,6 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <UndoSplitMove.hxx>
#include "doc.hxx"
#include "pam.hxx"
@@ -38,13 +39,11 @@
#include <editeng/brkitem.hxx>
#include <fmtpdsc.hxx>
#include <frmfmt.hxx>
-#include "undobj.hxx"
+#include <UndoCore.hxx>
#include "rolbck.hxx"
#include "redline.hxx"
#include "docary.hxx"
-
-
-inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
+#include <IShellCursorSupplier.hxx>
//------------------------------------------------------------------
@@ -53,12 +52,12 @@ inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
SwUndoSplitNode::SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos,
- BOOL bChkTable )
+ sal_Bool bChkTable )
: SwUndo( UNDO_SPLITNODE ), pHistory( 0 ), pRedlData( 0 ), nNode( rPos.nNode.GetIndex() ),
nCntnt( rPos.nContent.GetIndex() ),
- bTblFlag( FALSE ), bChkTblStt( bChkTable )
+ bTblFlag( sal_False ), bChkTblStt( bChkTable )
{
- SwTxtNode* pTxtNd = pDoc->GetNodes()[ rPos.nNode ]->GetTxtNode();
+ SwTxtNode *const pTxtNd = rPos.nNode.GetNode().GetTxtNode();
OSL_ENSURE( pTxtNd, "nur beim TextNode rufen!" );
if( pTxtNd->GetpSwpHints() )
{
@@ -76,21 +75,16 @@ SwUndoSplitNode::SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos,
}
}
-
-
-
SwUndoSplitNode::~SwUndoSplitNode()
{
delete pHistory;
delete pRedlData;
}
-
-
-void SwUndoSplitNode::Undo( SwUndoIter& rUndoIter )
+void SwUndoSplitNode::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc* pDoc = &rUndoIter.GetDoc();
- SwPaM& rPam = *rUndoIter.pAktPam;
+ SwDoc *const pDoc = & rContext.GetDoc();
+ SwPaM & rPam( rContext.GetCursorSupplier().CreateNewShellCursor() );
rPam.DeleteMark();
if( bTblFlag )
{
@@ -109,11 +103,11 @@ void SwUndoSplitNode::Undo( SwUndoIter& rUndoIter )
if( pNdSet )
{
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == pNdSet->GetItemState( RES_PAGEDESC, FALSE,
+ if( SFX_ITEM_SET == pNdSet->GetItemState( RES_PAGEDESC, sal_False,
&pItem ) )
pTableFmt->SetFmtAttr( *pItem );
- if( SFX_ITEM_SET == pNdSet->GetItemState( RES_BREAK, FALSE,
+ if( SFX_ITEM_SET == pNdSet->GetItemState( RES_BREAK, sal_False,
&pItem ) )
pTableFmt->SetFmtAttr( *pItem );
}
@@ -152,7 +146,7 @@ void SwUndoSplitNode::Undo( SwUndoIter& rUndoIter )
rPam.SetMark();
rPam.GetPoint()->nContent = pTNd->GetTxt().Len();
- pDoc->RstTxtAttrs( rPam, TRUE );
+ pDoc->RstTxtAttrs( rPam, sal_True );
pHistory->TmpRollback( pDoc, 0, false );
}
}
@@ -164,23 +158,13 @@ void SwUndoSplitNode::Undo( SwUndoIter& rUndoIter )
rPam.GetPoint()->nContent.Assign( rPam.GetCntntNode(), nCntnt );
}
-
-void SwUndoSplitNode::Repeat( SwUndoIter& rUndoIter )
-{
- if( UNDO_SPLITNODE == rUndoIter.GetLastUndoId() )
- return;
- rUndoIter.GetDoc().SplitNode( *rUndoIter.pAktPam->GetPoint(), bChkTblStt );
- rUndoIter.pLastUndoObj = this;
-}
-
-
-void SwUndoSplitNode::Redo( SwUndoIter& rUndoIter )
+void SwUndoSplitNode::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwPaM& rPam = *rUndoIter.pAktPam;
- ULONG nOldNode = rPam.GetPoint()->nNode.GetIndex();
+ SwPaM & rPam( rContext.GetCursorSupplier().CreateNewShellCursor() );
rPam.GetPoint()->nNode = nNode;
SwTxtNode * pTNd = rPam.GetNode()->GetTxtNode();
- if( pTNd ) // sollte eigentlich immer ein TextNode sein !!
+ OSL_ENSURE(pTNd, "SwUndoSplitNode::RedoImpl(): SwTxtNode expected");
+ if (pTNd)
{
rPam.GetPoint()->nContent.Assign( pTNd, nCntnt );
@@ -211,8 +195,12 @@ void SwUndoSplitNode::Redo( SwUndoIter& rUndoIter )
rPam.DeleteMark();
}
}
- else
- rPam.GetPoint()->nNode = nOldNode;
+}
+
+void SwUndoSplitNode::RepeatImpl(::sw::RepeatContext & rContext)
+{
+ rContext.GetDoc().SplitNode(
+ *rContext.GetRepeatPaM().GetPoint(), bChkTblStt );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 0f51798d22b9..07e2e7a9ad47 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -29,12 +29,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <UndoTable.hxx>
+#include <UndoRedline.hxx>
+#include <UndoDelete.hxx>
+#include <UndoSplitMove.hxx>
+#include <UndoCore.hxx>
#include <hintids.hxx>
+#include <hints.hxx>
#include <editeng/brkitem.hxx>
#include <fmtornt.hxx>
#include <fmtpdsc.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <editsh.hxx>
#include <docary.hxx>
#include <ndtxt.hxx>
@@ -43,7 +50,6 @@
#include <cntfrm.hxx>
#include <tblsel.hxx>
#include <swundo.hxx> // fuer die UndoIds
-#include <undobj.hxx>
#include <rolbck.hxx>
#include <ddefld.hxx>
#include <tabcol.hxx>
@@ -77,7 +83,6 @@
#define _DEBUG_REDLINE( pDoc )
#endif
-inline SwDoc& SwUndoIter::GetDoc() const { return *pAktPam->GetDoc(); }
extern void ClearFEShellTabCols();
typedef SfxItemSet* SfxItemSetPtr;
@@ -95,7 +100,7 @@ SV_DECL_PTRARR_DEL( SwTblToTxtSaves, SwTblToTxtSavePtr, 0, 10 )
struct _UndoTblCpyTbl_Entry
{
- ULONG nBoxIdx, nOffset;
+ sal_uLong nBoxIdx, nOffset;
SfxItemSet* pBoxNumAttr;
SwUndo* pUndo;
@@ -120,25 +125,25 @@ class _SaveTable
const SwTable* pSwTable;
SfxItemSets aSets;
SwFrmFmts aFrmFmts;
- USHORT nLineCount;
- BOOL bModifyBox : 1;
- BOOL bSaveFormula : 1;
- BOOL bNewModel : 1;
+ sal_uInt16 nLineCount;
+ sal_Bool bModifyBox : 1;
+ sal_Bool bSaveFormula : 1;
+ sal_Bool bNewModel : 1;
public:
- _SaveTable( const SwTable& rTbl, USHORT nLnCnt = USHRT_MAX,
- BOOL bSaveFml = TRUE );
+ _SaveTable( const SwTable& rTbl, sal_uInt16 nLnCnt = USHRT_MAX,
+ sal_Bool bSaveFml = sal_True );
~_SaveTable();
- USHORT AddFmt( SwFrmFmt* pFmt, bool bIsLine );
- void NewFrmFmt( const SwClient* pLnBx, BOOL bIsLine, USHORT nFmtPos,
+ sal_uInt16 AddFmt( SwFrmFmt* pFmt, bool bIsLine );
+ void NewFrmFmt( const SwClient* pLnBx, sal_Bool bIsLine, sal_uInt16 nFmtPos,
SwFrmFmt* pOldFmt );
- void RestoreAttr( SwTable& rTbl, BOOL bModifyBox = FALSE );
+ void RestoreAttr( SwTable& rTbl, sal_Bool bModifyBox = sal_False );
void SaveCntntAttrs( SwDoc* pDoc );
- void CreateNew( SwTable& rTbl, BOOL bCreateFrms = TRUE,
- BOOL bRestoreChart = TRUE );
- BOOL IsNewModel() const { return bNewModel; }
+ void CreateNew( SwTable& rTbl, sal_Bool bCreateFrms = sal_True,
+ sal_Bool bRestoreChart = sal_True );
+ sal_Bool IsNewModel() const { return bNewModel; }
};
class _SaveLine
@@ -148,7 +153,7 @@ class _SaveLine
_SaveLine* pNext;
_SaveBox* pBox;
- USHORT nItemSet;
+ sal_uInt16 nItemSet;
public:
@@ -166,9 +171,9 @@ class _SaveBox
friend class _SaveLine;
_SaveBox* pNext;
- ULONG nSttNode;
+ sal_uLong nSttNode;
long nRowSpan;
- USHORT nItemSet;
+ sal_uInt16 nItemSet;
union
{
SfxItemSets* pCntntAttrs;
@@ -185,8 +190,8 @@ public:
void CreateNew( SwTable& rTbl, SwTableLine& rParent, _SaveTable& rSTbl );
};
-void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos = 0 );
-void InsertSort( SvULongs& rArr, ULONG nIdx, USHORT* pInsPos = 0 );
+void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos = 0 );
+void InsertSort( SvULongs& rArr, sal_uLong nIdx, sal_uInt16* pInsPos = 0 );
#if OSL_DEBUG_LEVEL > 1
#include "shellio.hxx"
@@ -204,15 +209,15 @@ So we need to remember not only the start node position but the end node positio
struct SwTblToTxtSave
{
- ULONG m_nSttNd;
- ULONG m_nEndNd;
+ sal_uLong m_nSttNd;
+ sal_uLong m_nEndNd;
xub_StrLen m_nCntnt;
SwHistory* m_pHstry;
// metadata references for first and last paragraph in cell
::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoStart;
::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoEnd;
- SwTblToTxtSave( SwDoc& rDoc, ULONG nNd, ULONG nEndIdx, xub_StrLen nCntnt );
+ SwTblToTxtSave( SwDoc& rDoc, sal_uLong nNd, sal_uLong nEndIdx, xub_StrLen nCntnt );
~SwTblToTxtSave() { delete m_pHstry; }
};
@@ -222,7 +227,7 @@ SV_IMPL_PTRARR( SwUndoMoves, SwUndoMovePtr )
SV_IMPL_PTRARR( SwTblToTxtSaves, SwTblToTxtSavePtr )
SV_IMPL_PTRARR( _UndoTblCpyTbl_Entries, _UndoTblCpyTbl_EntryPtr )
-USHORT aSave_BoxCntntSet[] = {
+sal_uInt16 aSave_BoxCntntSet[] = {
RES_CHRATR_COLOR, RES_CHRATR_CROSSEDOUT,
RES_CHRATR_FONT, RES_CHRATR_FONTSIZE,
RES_CHRATR_POSTURE, RES_CHRATR_POSTURE,
@@ -232,8 +237,8 @@ USHORT aSave_BoxCntntSet[] = {
-SwUndoInsTbl::SwUndoInsTbl( const SwPosition& rPos, USHORT nCl, USHORT nRw,
- USHORT nAdj, const SwInsertTableOptions& rInsTblOpts,
+SwUndoInsTbl::SwUndoInsTbl( const SwPosition& rPos, sal_uInt16 nCl, sal_uInt16 nRw,
+ sal_uInt16 nAdj, const SwInsertTableOptions& rInsTblOpts,
const SwTableAutoFmt* pTAFmt,
const SvUShorts* pColArr,
const String & rName)
@@ -269,9 +274,9 @@ SwUndoInsTbl::~SwUndoInsTbl()
delete pAutoFmt;
}
-void SwUndoInsTbl::Undo( SwUndoIter& rUndoIter )
+void SwUndoInsTbl::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
SwNodeIndex aIdx( rDoc.GetNodes(), nSttNode );
SwTableNode* pTblNd = aIdx.GetNode().GetTableNode();
@@ -290,11 +295,11 @@ void SwUndoInsTbl::Undo( SwUndoIter& rUndoIter )
const SfxPoolItem *pItem;
if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
pNextNd->SetAttr( *pItem );
if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
pNextNd->SetAttr( *pItem );
}
@@ -307,19 +312,18 @@ void SwUndoInsTbl::Undo( SwUndoIter& rUndoIter )
rDoc.GetNodes().Delete( aIdx, pTblNd->EndOfSectionIndex() -
aIdx.GetIndex() + 1 );
- rUndoIter.pAktPam->DeleteMark();
- rUndoIter.pAktPam->GetPoint()->nNode = aIdx;
- rUndoIter.pAktPam->GetPoint()->nContent.Assign(
- rUndoIter.pAktPam->GetCntntNode(), 0 );
+ SwPaM & rPam( rContext.GetCursorSupplier().CreateNewShellCursor() );
+ rPam.DeleteMark();
+ rPam.GetPoint()->nNode = aIdx;
+ rPam.GetPoint()->nContent.Assign( rPam.GetCntntNode(), 0 );
}
-void SwUndoInsTbl::Redo( SwUndoIter& rUndoIter )
+void SwUndoInsTbl::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
- SwPosition aPos( *rUndoIter.pAktPam->GetPoint() );
- aPos.nNode = nSttNode;
+ SwPosition const aPos(SwNodeIndex(rDoc.GetNodes(), nSttNode));
const SwTable* pTbl = rDoc.InsertTable( aInsTblOpts, aPos, nRows, nCols,
nAdjust,
pAutoFmt, pColWidth );
@@ -340,7 +344,7 @@ void SwUndoInsTbl::Redo( SwUndoIter& rUndoIter )
rDoc.GetRedlineTbl().Count() ))
{
SwPaM aPam( *pTblNode->EndOfSectionNode(), *pTblNode, 1 );
- SwCntntNode* pCNd = aPam.GetCntntNode( FALSE );
+ SwCntntNode* pCNd = aPam.GetCntntNode( sal_False );
if( pCNd )
aPam.GetMark()->nContent.Assign( pCNd, 0 );
@@ -358,11 +362,11 @@ void SwUndoInsTbl::Redo( SwUndoIter& rUndoIter )
}
-void SwUndoInsTbl::Repeat( SwUndoIter& rUndoIter )
+void SwUndoInsTbl::RepeatImpl(::sw::RepeatContext & rContext)
{
- rUndoIter.GetDoc().InsertTable( aInsTblOpts, *rUndoIter.pAktPam->GetPoint(),
- nRows, nCols, nAdjust,
- pAutoFmt, pColWidth );
+ rContext.GetDoc().InsertTable(
+ aInsTblOpts, *rContext.GetRepeatPaM().GetPoint(),
+ nRows, nCols, nAdjust, pAutoFmt, pColWidth );
}
SwRewriter SwUndoInsTbl::GetRewriter() const
@@ -378,7 +382,7 @@ SwRewriter SwUndoInsTbl::GetRewriter() const
// -----------------------------------------------------
-SwTblToTxtSave::SwTblToTxtSave( SwDoc& rDoc, ULONG nNd, ULONG nEndIdx, xub_StrLen nCnt )
+SwTblToTxtSave::SwTblToTxtSave( SwDoc& rDoc, sal_uLong nNd, sal_uLong nEndIdx, xub_StrLen nCnt )
: m_nSttNd( nNd ), m_nEndNd( nEndIdx), m_nCntnt( nCnt ), m_pHstry( 0 )
{
// Attributierung des gejointen Node merken.
@@ -421,11 +425,11 @@ SwUndoTblToTxt::SwUndoTblToTxt( const SwTable& rTbl, sal_Unicode cCh )
: SwUndo( UNDO_TABLETOTEXT ),
sTblNm( rTbl.GetFrmFmt()->GetName() ), pDDEFldType( 0 ), pHistory( 0 ),
nSttNd( 0 ), nEndNd( 0 ),
- nAdjust( static_cast<USHORT>(rTbl.GetFrmFmt()->GetHoriOrient().GetHoriOrient()) ),
+ nAdjust( static_cast<sal_uInt16>(rTbl.GetFrmFmt()->GetHoriOrient().GetHoriOrient()) ),
cTrenner( cCh ), nHdlnRpt( rTbl.GetRowsToRepeat() )
{
pTblSave = new _SaveTable( rTbl );
- pBoxSaves = new SwTblToTxtSaves( (BYTE)rTbl.GetTabSortBoxes().Count() );
+ pBoxSaves = new SwTblToTxtSaves( (sal_uInt8)rTbl.GetTabSortBoxes().Count() );
if( rTbl.IsA( TYPE( SwDDETable ) ) )
pDDEFldType = (SwDDEFieldType*)((SwDDETable&)rTbl).GetDDEFldType()->Copy();
@@ -434,10 +438,10 @@ SwUndoTblToTxt::SwUndoTblToTxt( const SwTable& rTbl, sal_Unicode cCh )
pHistory = new SwHistory;
const SwTableNode* pTblNd = rTbl.GetTableNode();
- ULONG nTblStt = pTblNd->GetIndex(), nTblEnd = pTblNd->EndOfSectionIndex();
+ sal_uLong nTblStt = pTblNd->GetIndex(), nTblEnd = pTblNd->EndOfSectionIndex();
const SwSpzFrmFmts& rFrmFmtTbl = *pTblNd->GetDoc()->GetSpzFrmFmts();
- for( USHORT n = 0; n < rFrmFmtTbl.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rFrmFmtTbl.Count(); ++n )
{
SwFrmFmt* pFmt = rFrmFmtTbl[ n ];
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -467,10 +471,10 @@ SwUndoTblToTxt::~SwUndoTblToTxt()
-void SwUndoTblToTxt::Undo( SwUndoIter& rUndoIter )
+void SwUndoTblToTxt::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
- SwPaM* pPam = rUndoIter.pAktPam;
+ SwDoc & rDoc = rContext.GetDoc();
+ SwPaM *const pPam(& rContext.GetCursorSupplier().CreateNewShellCursor());
SwNodeIndex aFrmIdx( rDoc.GetNodes(), nSttNd );
SwNodeIndex aEndIdx( rDoc.GetNodes(), nEndNd );
@@ -499,20 +503,20 @@ void SwUndoTblToTxt::Undo( SwUndoIter& rUndoIter )
SwDDEFieldType* pNewType = (SwDDEFieldType*)rDoc.InsertFldType(
*pDDEFldType);
SwDDETable* pDDETbl = new SwDDETable( pTblNd->GetTable(), pNewType );
- pTblNd->SetNewTable( pDDETbl, FALSE ); // setze die DDE-Tabelle
+ pTblNd->SetNewTable( pDDETbl, sal_False ); // setze die DDE-Tabelle
delete pDDEFldType, pDDEFldType = 0;
}
if( bCheckNumFmt )
{
SwTableSortBoxes& rBxs = pTblNd->GetTable().GetTabSortBoxes();
- for( USHORT nBoxes = rBxs.Count(); nBoxes; )
- rDoc.ChkBoxNumFmt( *rBxs[ --nBoxes ], FALSE );
+ for( sal_uInt16 nBoxes = rBxs.Count(); nBoxes; )
+ rDoc.ChkBoxNumFmt( *rBxs[ --nBoxes ], sal_False );
}
if( pHistory )
{
- USHORT nTmpEnd = pHistory->GetTmpEnd();
+ sal_uInt16 nTmpEnd = pHistory->GetTmpEnd();
pHistory->TmpRollback( &rDoc, 0 );
pHistory->SetTmpEnd( nTmpEnd );
}
@@ -533,7 +537,7 @@ void SwUndoTblToTxt::Undo( SwUndoIter& rUndoIter )
}
// steht im untbl.cxx und darf nur vom Undoobject gerufen werden
-SwTableNode* SwNodes::UndoTableToText( ULONG nSttNd, ULONG nEndNd,
+SwTableNode* SwNodes::UndoTableToText( sal_uLong nSttNd, sal_uLong nEndNd,
const SwTblToTxtSaves& rSavedData )
{
SwNodeIndex aSttIdx( *this, nSttNd );
@@ -548,7 +552,7 @@ SwTableNode* SwNodes::UndoTableToText( ULONG nSttNd, ULONG nEndNd,
Delete all Frames attached to the nodes in that range. */
SwNode* pNd;
{
- ULONG n, nTmpEnd = aEndIdx.GetIndex();
+ sal_uLong n, nTmpEnd = aEndIdx.GetIndex();
for( n = pTblNd->GetIndex() + 1; n < nTmpEnd; ++n )
{
if( ( pNd = (*this)[ n ] )->IsCntntNode() )
@@ -566,7 +570,7 @@ SwTableNode* SwNodes::UndoTableToText( ULONG nSttNd, ULONG nEndNd,
pTblNd->GetTable().GetTabLines().C40_INSERT( SwTableLine, pLine, 0 );
SvULongs aBkmkArr( 0, 4 );
- for( USHORT n = rSavedData.Count(); n; )
+ for( sal_uInt16 n = rSavedData.Count(); n; )
{
SwTblToTxtSave* pSave = rSavedData[ --n ];
// if the start node was merged with last from prev. cell,
@@ -610,7 +614,7 @@ SwTableNode* SwNodes::UndoTableToText( ULONG nSttNd, ULONG nEndNd,
if( pSave->m_pHstry )
{
- USHORT nTmpEnd = pSave->m_pHstry->GetTmpEnd();
+ sal_uInt16 nTmpEnd = pSave->m_pHstry->GetTmpEnd();
pSave->m_pHstry->TmpRollback( GetDoc(), 0 );
pSave->m_pHstry->SetTmpEnd( nTmpEnd );
}
@@ -632,7 +636,7 @@ SwTableNode* SwNodes::UndoTableToText( ULONG nSttNd, ULONG nEndNd,
pSttNd->pStartOfSection = pTblNd;
new SwEndNode( aEndIdx, *pSttNd );
- for( ULONG i = aSttIdx.GetIndex(); i < aEndIdx.GetIndex()-1; ++i )
+ for( sal_uLong i = aSttIdx.GetIndex(); i < aEndIdx.GetIndex()-1; ++i )
{
pNd = (*this)[ i ];
pNd->pStartOfSection = pSttNd;
@@ -647,11 +651,10 @@ SwTableNode* SwNodes::UndoTableToText( ULONG nSttNd, ULONG nEndNd,
}
-void SwUndoTblToTxt::Redo( SwUndoIter& rUndoIter )
+void SwUndoTblToTxt::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
- SwPaM* pPam = rUndoIter.pAktPam;
-
+ SwDoc & rDoc = rContext.GetDoc();
+ SwPaM *const pPam(& rContext.GetCursorSupplier().CreateNewShellCursor());
pPam->GetPoint()->nNode = nSttNd;
pPam->GetPoint()->nContent.Assign( 0, 0 );
@@ -674,7 +677,7 @@ void SwUndoTblToTxt::Redo( SwUndoIter& rUndoIter )
if( !pCNd && 0 == ( pCNd = rDoc.GetNodes().GoNext( &aSaveIdx ) ) &&
0 == ( pCNd = rDoc.GetNodes().GoPrevious( &aSaveIdx )) )
{
- OSL_ENSURE( FALSE, "wo steht denn nun der TextNode" );
+ OSL_ENSURE( sal_False, "wo steht denn nun der TextNode" );
}
pPam->GetPoint()->nNode = aSaveIdx;
@@ -685,19 +688,19 @@ void SwUndoTblToTxt::Redo( SwUndoIter& rUndoIter )
}
-void SwUndoTblToTxt::Repeat( SwUndoIter& rUndoIter )
+void SwUndoTblToTxt::RepeatImpl(::sw::RepeatContext & rContext)
{
- SwTableNode* pTblNd = rUndoIter.pAktPam->GetNode()->FindTableNode();
+ SwPaM *const pPam = & rContext.GetRepeatPaM();
+ SwTableNode *const pTblNd = pPam->GetNode()->FindTableNode();
if( pTblNd )
{
- // bewege den Cursor aus der Tabelle
- SwPaM* pPam = rUndoIter.pAktPam;
+ // move cursor out of table
pPam->GetPoint()->nNode = *pTblNd->EndOfSectionNode();
pPam->Move( fnMoveForward, fnGoCntnt );
pPam->SetMark();
pPam->DeleteMark();
- rUndoIter.GetDoc().TableToText( pTblNd, cTrenner );
+ rContext.GetDoc().TableToText( pTblNd, cTrenner );
}
}
@@ -707,7 +710,7 @@ void SwUndoTblToTxt::SetRange( const SwNodeRange& rRg )
nEndNd = rRg.aEnd.GetIndex();
}
-void SwUndoTblToTxt::AddBoxPos( SwDoc& rDoc, ULONG nNdIdx, ULONG nEndIdx, xub_StrLen nCntntIdx )
+void SwUndoTblToTxt::AddBoxPos( SwDoc& rDoc, sal_uLong nNdIdx, sal_uLong nEndIdx, xub_StrLen nCntntIdx )
{
SwTblToTxtSave* pNew = new SwTblToTxtSave( rDoc, nNdIdx, nEndIdx, nCntntIdx );
pBoxSaves->Insert( pNew, pBoxSaves->Count() );
@@ -717,7 +720,7 @@ void SwUndoTblToTxt::AddBoxPos( SwDoc& rDoc, ULONG nNdIdx, ULONG nEndIdx, xub_St
SwUndoTxtToTbl::SwUndoTxtToTbl( const SwPaM& rRg,
const SwInsertTableOptions& rInsTblOpts,
- sal_Unicode cCh, USHORT nAdj,
+ sal_Unicode cCh, sal_uInt16 nAdj,
const SwTableAutoFmt* pAFmt )
: SwUndo( UNDO_TEXTTOTABLE ), SwUndRng( rRg ), aInsTblOpts( rInsTblOpts ),
pDelBoxes( 0 ), pAutoFmt( 0 ),
@@ -739,15 +742,15 @@ SwUndoTxtToTbl::~SwUndoTxtToTbl()
delete pAutoFmt;
}
-void SwUndoTxtToTbl::Undo( SwUndoIter& rUndoIter )
+void SwUndoTxtToTbl::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
- ULONG nTblNd = nSttNode;
+ sal_uLong nTblNd = nSttNode;
if( nSttCntnt )
++nTblNd; // Node wurde vorher gesplittet
SwNodeIndex aIdx( rDoc.GetNodes(), nTblNd );
- SwTableNode* pTNd = rDoc.GetNodes()[ aIdx ]->GetTableNode();
+ SwTableNode *const pTNd = aIdx.GetNode().GetTableNode();
OSL_ENSURE( pTNd, "keinen Tabellen-Node gefunden" );
RemoveIdxFromSection( rDoc, nTblNd );
@@ -763,11 +766,11 @@ void SwUndoTxtToTbl::Undo( SwUndoIter& rUndoIter )
if( pDelBoxes )
{
SwTable& rTbl = pTNd->GetTable();
- for( USHORT n = pDelBoxes->Count(); n; )
+ for( sal_uInt16 n = pDelBoxes->Count(); n; )
{
SwTableBox* pBox = rTbl.GetTblBox( (*pDelBoxes)[ --n ] );
if( pBox )
- ::_DeleteBox( rTbl, pBox, 0, FALSE, FALSE );
+ ::_DeleteBox( rTbl, pBox, 0, sal_False, sal_False );
else {
OSL_ENSURE( !this, "Wo ist die Box geblieben?" );
}
@@ -777,15 +780,16 @@ void SwUndoTxtToTbl::Undo( SwUndoIter& rUndoIter )
SwNodeIndex aEndIdx( *pTNd->EndOfSectionNode() );
rDoc.TableToText( pTNd, 0x0b == cTrenner ? 0x09 : cTrenner );
- // am Start wieder zusammenfuegen ?
- SwPosition* pPos = rUndoIter.pAktPam->GetPoint();
+ // join again at start?
+ SwPaM aPam(rDoc.GetNodes().GetEndOfContent());
+ SwPosition *const pPos = aPam.GetPoint();
if( nSttCntnt )
{
pPos->nNode = nTblNd;
- pPos->nContent.Assign( rDoc.GetNodes()[ pPos->nNode ]->GetCntntNode(), 0 );
- if( rUndoIter.pAktPam->Move( fnMoveBackward, fnGoCntnt))
+ pPos->nContent.Assign(pPos->nNode.GetNode().GetCntntNode(), 0);
+ if (aPam.Move(fnMoveBackward, fnGoCntnt))
{
- SwNodeIndex& rIdx = rUndoIter.pAktPam->GetPoint()->nNode;
+ SwNodeIndex & rIdx = aPam.GetPoint()->nNode;
// dann die Crsr/etc. nochmal relativ verschieben
RemoveIdxRel( rIdx.GetIndex()+1, *pPos );
@@ -794,7 +798,7 @@ void SwUndoTxtToTbl::Undo( SwUndoIter& rUndoIter )
}
}
- // am Ende wieder zusammenfuegen ?
+ // join again at end?
if( bSplitEnd )
{
SwNodeIndex& rIdx = pPos->nNode;
@@ -802,8 +806,8 @@ void SwUndoTxtToTbl::Undo( SwUndoIter& rUndoIter )
SwTxtNode* pTxtNd = rIdx.GetNode().GetTxtNode();
if( pTxtNd && pTxtNd->CanJoinNext() )
{
- rUndoIter.pAktPam->GetMark()->nContent.Assign( 0, 0 );
- rUndoIter.pAktPam->GetPoint()->nContent.Assign( 0, 0 );
+ aPam.GetMark()->nContent.Assign( 0, 0 );
+ aPam.GetPoint()->nContent.Assign( 0, 0 );
// dann die Crsr/etc. nochmal relativ verschieben
pPos->nContent.Assign( pTxtNd, pTxtNd->GetTxt().Len() );
@@ -813,30 +817,31 @@ void SwUndoTxtToTbl::Undo( SwUndoIter& rUndoIter )
}
}
- SetPaM( rUndoIter ); // manipulierten Bereich selectieren
+ AddUndoRedoPaM(rContext);
}
-void SwUndoTxtToTbl::Redo( SwUndoIter& rUndoIter )
+void SwUndoTxtToTbl::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SetPaM( rUndoIter );
- RemoveIdxFromRange( *rUndoIter.pAktPam, FALSE );
- SetPaM( rUndoIter );
+ SwPaM & rPam( AddUndoRedoPaM(rContext) );
+ RemoveIdxFromRange(rPam, false);
+ SetPaM(rPam);
- const SwTable* pTable = rUndoIter.GetDoc().TextToTable(
- aInsTblOpts, *rUndoIter.pAktPam, cTrenner,
- nAdjust, pAutoFmt );
+ SwTable const*const pTable = rContext.GetDoc().TextToTable(
+ aInsTblOpts, rPam, cTrenner, nAdjust, pAutoFmt );
((SwFrmFmt*)pTable->GetFrmFmt())->SetName( sTblNm );
}
-void SwUndoTxtToTbl::Repeat( SwUndoIter& rUndoIter )
+void SwUndoTxtToTbl::RepeatImpl(::sw::RepeatContext & rContext)
{
- // keine TABLE IN TABLE
- if( !rUndoIter.pAktPam->GetNode()->FindTableNode() )
- rUndoIter.GetDoc().TextToTable( aInsTblOpts, *rUndoIter.pAktPam,
+ // no Table In Table
+ if (!rContext.GetRepeatPaM().GetNode()->FindTableNode())
+ {
+ rContext.GetDoc().TextToTable( aInsTblOpts, rContext.GetRepeatPaM(),
cTrenner, nAdjust,
pAutoFmt );
+ }
}
void SwUndoTxtToTbl::AddFillBox( const SwTableBox& rBox )
@@ -855,8 +860,8 @@ SwHistory& SwUndoTxtToTbl::GetHistory()
// -----------------------------------------------------
-SwUndoTblHeadline::SwUndoTblHeadline( const SwTable& rTbl, USHORT nOldHdl,
- USHORT nNewHdl )
+SwUndoTblHeadline::SwUndoTblHeadline( const SwTable& rTbl, sal_uInt16 nOldHdl,
+ sal_uInt16 nNewHdl )
: SwUndo( UNDO_TABLEHEADLINE ),
nOldHeadline( nOldHdl ),
nNewHeadline( nNewHdl )
@@ -868,20 +873,18 @@ SwUndoTblHeadline::SwUndoTblHeadline( const SwTable& rTbl, USHORT nOldHdl,
nTblNd = pSttNd->StartOfSectionIndex();
}
-
-void SwUndoTblHeadline::Undo( SwUndoIter& rUndoIter )
+void SwUndoTblHeadline::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
SwTableNode* pTNd = rDoc.GetNodes()[ nTblNd ]->GetTableNode();
OSL_ENSURE( pTNd, "keinen Tabellen-Node gefunden" );
rDoc.SetRowsToRepeat( pTNd->GetTable(), nOldHeadline );
}
-
-void SwUndoTblHeadline::Redo( SwUndoIter& rUndoIter )
+void SwUndoTblHeadline::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
SwTableNode* pTNd = rDoc.GetNodes()[ nTblNd ]->GetTableNode();
OSL_ENSURE( pTNd, "keinen Tabellen-Node gefunden" );
@@ -889,24 +892,25 @@ void SwUndoTblHeadline::Redo( SwUndoIter& rUndoIter )
rDoc.SetRowsToRepeat( pTNd->GetTable(), nNewHeadline );
}
-
-void SwUndoTblHeadline::Repeat( SwUndoIter& rUndoIter )
+void SwUndoTblHeadline::RepeatImpl(::sw::RepeatContext & rContext)
{
- SwTableNode* pTblNd = rUndoIter.pAktPam->GetNode()->FindTableNode();
+ SwTableNode *const pTblNd =
+ rContext.GetRepeatPaM().GetNode()->FindTableNode();
if( pTblNd )
- rUndoIter.GetDoc().SetRowsToRepeat( pTblNd->GetTable(), nNewHeadline );
+ {
+ rContext.GetDoc().SetRowsToRepeat( pTblNd->GetTable(), nNewHeadline );
+ }
}
-/* */
-
+//////////////////////////////////////////////////////////////////////////
-_SaveTable::_SaveTable( const SwTable& rTbl, USHORT nLnCnt, BOOL bSaveFml )
+_SaveTable::_SaveTable( const SwTable& rTbl, sal_uInt16 nLnCnt, sal_Bool bSaveFml )
: aTblSet( *rTbl.GetFrmFmt()->GetAttrSet().GetPool(), aTableSetRange ),
pSwTable( &rTbl ), nLineCount( nLnCnt ), bSaveFormula( bSaveFml )
{
- bModifyBox = FALSE;
+ bModifyBox = sal_False;
bNewModel = rTbl.IsNewModel();
aTblSet.Put( rTbl.GetFrmFmt()->GetAttrSet() );
pLine = new _SaveLine( 0, *rTbl.GetTabLines()[ 0 ], *this );
@@ -914,7 +918,7 @@ _SaveTable::_SaveTable( const SwTable& rTbl, USHORT nLnCnt, BOOL bSaveFml )
_SaveLine* pLn = pLine;
if( USHRT_MAX == nLnCnt )
nLnCnt = rTbl.GetTabLines().Count();
- for( USHORT n = 1; n < nLnCnt; ++n )
+ for( sal_uInt16 n = 1; n < nLnCnt; ++n )
pLn = new _SaveLine( pLn, *rTbl.GetTabLines()[ n ], *this );
aFrmFmts.Remove( 0, aFrmFmts.Count() );
@@ -928,9 +932,9 @@ _SaveTable::~_SaveTable()
}
-USHORT _SaveTable::AddFmt( SwFrmFmt* pFmt, bool bIsLine )
+sal_uInt16 _SaveTable::AddFmt( SwFrmFmt* pFmt, bool bIsLine )
{
- USHORT nRet = aFrmFmts.GetPos( pFmt );
+ sal_uInt16 nRet = aFrmFmts.GetPos( pFmt );
if( USHRT_MAX == nRet )
{
// Kopie vom ItemSet anlegen
@@ -942,7 +946,7 @@ USHORT _SaveTable::AddFmt( SwFrmFmt* pFmt, bool bIsLine )
// errechnet werden!
//JP 30.07.98: Bug 54295 - Formeln immer im Klartext speichern
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_BOXATR_FORMULA, TRUE, &pItem ))
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_BOXATR_FORMULA, sal_True, &pItem ))
{
pSet->ClearItem( RES_BOXATR_VALUE );
if( pSwTable && bSaveFormula )
@@ -961,9 +965,9 @@ USHORT _SaveTable::AddFmt( SwFrmFmt* pFmt, bool bIsLine )
}
-void _SaveTable::RestoreAttr( SwTable& rTbl, BOOL bMdfyBox )
+void _SaveTable::RestoreAttr( SwTable& rTbl, sal_Bool bMdfyBox )
{
- USHORT n;
+ sal_uInt16 n;
bModifyBox = bMdfyBox;
@@ -976,7 +980,7 @@ void _SaveTable::RestoreAttr( SwTable& rTbl, BOOL bMdfyBox )
if( pFmt->IsInCache() )
{
SwFrm::GetCache().Delete( pFmt );
- pFmt->SetInCache( FALSE );
+ pFmt->SetInCache( sal_False );
}
// zur Sicherheit alle Tableframes invalidieren
@@ -993,7 +997,7 @@ void _SaveTable::RestoreAttr( SwTable& rTbl, BOOL bMdfyBox )
for( n = aSets.Count(); n; --n )
aFrmFmts.Insert( pFmt, aFrmFmts.Count() );
- USHORT nLnCnt = nLineCount;
+ sal_uInt16 nLnCnt = nLineCount;
if( USHRT_MAX == nLnCnt )
nLnCnt = rTbl.GetTabLines().Count();
@@ -1010,7 +1014,7 @@ void _SaveTable::RestoreAttr( SwTable& rTbl, BOOL bMdfyBox )
}
aFrmFmts.Remove( 0, aFrmFmts.Count() );
- bModifyBox = FALSE;
+ bModifyBox = sal_False;
}
@@ -1020,10 +1024,10 @@ void _SaveTable::SaveCntntAttrs( SwDoc* pDoc )
}
-void _SaveTable::CreateNew( SwTable& rTbl, BOOL bCreateFrms,
- BOOL bRestoreChart )
+void _SaveTable::CreateNew( SwTable& rTbl, sal_Bool bCreateFrms,
+ sal_Bool bRestoreChart )
{
- USHORT n;
+ sal_uInt16 n;
_FndBox aTmpBox( 0, 0 );
//if( bRestoreChart )
@@ -1039,7 +1043,7 @@ void _SaveTable::CreateNew( SwTable& rTbl, BOOL bCreateFrms,
if( pFmt->IsInCache() )
{
SwFrm::GetCache().Delete( pFmt );
- pFmt->SetInCache( FALSE );
+ pFmt->SetInCache( sal_False );
}
// SwTableBox muss ein Format haben!!
@@ -1054,7 +1058,7 @@ void _SaveTable::CreateNew( SwTable& rTbl, BOOL bCreateFrms,
aFrmFmts.Remove( 0, aFrmFmts.Count() );
// die neuen Lines eintragen, die alten loeschen
- USHORT nOldLines = nLineCount;
+ sal_uInt16 nOldLines = nLineCount;
if( USHRT_MAX == nLineCount )
nOldLines = rTbl.GetTabLines().Count();
@@ -1070,8 +1074,8 @@ void _SaveTable::CreateNew( SwTable& rTbl, BOOL bCreateFrms,
// TL_CHART2: notify chart about boxes to be removed
const SwTableBoxes &rBoxes = pOld->GetTabBoxes();
- USHORT nBoxes = rBoxes.Count();
- for (USHORT k = 0; k < nBoxes; ++k)
+ sal_uInt16 nBoxes = rBoxes.Count();
+ for (sal_uInt16 k = 0; k < nBoxes; ++k)
{
SwTableBox *pBox = rBoxes[k];
if (pPCD)
@@ -1089,11 +1093,11 @@ void _SaveTable::CreateNew( SwTable& rTbl, BOOL bCreateFrms,
{
// remove remaining lines...
- for (USHORT k1 = 0; k1 < nOldLines - n; ++k1)
+ for (sal_uInt16 k1 = 0; k1 < nOldLines - n; ++k1)
{
const SwTableBoxes &rBoxes = rTbl.GetTabLines()[n + k1]->GetTabBoxes();
- USHORT nBoxes = rBoxes.Count();
- for (USHORT k2 = 0; k2 < nBoxes; ++k2)
+ sal_uInt16 nBoxes = rBoxes.Count();
+ for (sal_uInt16 k2 = 0; k2 < nBoxes; ++k2)
{
SwTableBox *pBox = rBoxes[k2];
// TL_CHART2: notify chart about boxes to be removed
@@ -1117,8 +1121,8 @@ void _SaveTable::CreateNew( SwTable& rTbl, BOOL bCreateFrms,
}
-void _SaveTable::NewFrmFmt( const SwClient* pLnBx, BOOL bIsLine,
- USHORT nFmtPos, SwFrmFmt* pOldFmt )
+void _SaveTable::NewFrmFmt( const SwClient* pLnBx, sal_Bool bIsLine,
+ sal_uInt16 nFmtPos, SwFrmFmt* pOldFmt )
{
SwDoc* pDoc = pOldFmt->GetDoc();
@@ -1145,7 +1149,7 @@ void _SaveTable::NewFrmFmt( const SwClient* pLnBx, BOOL bIsLine,
((SwFrm*)pLast)->ReinitializeFrmSizeAttrFlags();
if ( !bIsLine )
{
- ((SwCellFrm*)pLast)->SetDerivedVert( FALSE );
+ ((SwCellFrm*)pLast)->SetDerivedVert( sal_False );
((SwCellFrm*)pLast)->CheckDirChange();
}
}
@@ -1178,7 +1182,7 @@ _SaveLine::_SaveLine( _SaveLine* pPrev, const SwTableLine& rLine, _SaveTable& rS
pBox = new _SaveBox( 0, *rLine.GetTabBoxes()[ 0 ], rSTbl );
_SaveBox* pBx = pBox;
- for( USHORT n = 1; n < rLine.GetTabBoxes().Count(); ++n )
+ for( sal_uInt16 n = 1; n < rLine.GetTabBoxes().Count(); ++n )
pBx = new _SaveBox( pBx, *rLine.GetTabBoxes()[ n ], rSTbl );
}
@@ -1192,10 +1196,10 @@ _SaveLine::~_SaveLine()
void _SaveLine::RestoreAttr( SwTableLine& rLine, _SaveTable& rSTbl )
{
- rSTbl.NewFrmFmt( &rLine, TRUE, nItemSet, rLine.GetFrmFmt() );
+ rSTbl.NewFrmFmt( &rLine, sal_True, nItemSet, rLine.GetFrmFmt() );
_SaveBox* pBx = pBox;
- for( USHORT n = 0; n < rLine.GetTabBoxes().Count(); ++n, pBx = pBx->pNext )
+ for( sal_uInt16 n = 0; n < rLine.GetTabBoxes().Count(); ++n, pBx = pBx->pNext )
{
if( !pBx )
{
@@ -1264,7 +1268,7 @@ _SaveBox::_SaveBox( _SaveBox* pPrev, const SwTableBox& rBox, _SaveTable& rSTbl )
Ptrs.pLine = new _SaveLine( 0, *rBox.GetTabLines()[ 0 ], rSTbl );
_SaveLine* pLn = Ptrs.pLine;
- for( USHORT n = 1; n < rBox.GetTabLines().Count(); ++n )
+ for( sal_uInt16 n = 1; n < rBox.GetTabLines().Count(); ++n )
pLn = new _SaveLine( pLn, *rBox.GetTabLines()[ n ], rSTbl );
}
}
@@ -1282,7 +1286,7 @@ _SaveBox::~_SaveBox()
void _SaveBox::RestoreAttr( SwTableBox& rBox, _SaveTable& rSTbl )
{
- rSTbl.NewFrmFmt( &rBox, FALSE, nItemSet, rBox.GetFrmFmt() );
+ rSTbl.NewFrmFmt( &rBox, sal_False, nItemSet, rBox.GetFrmFmt() );
if( ULONG_MAX == nSttNode ) // keine EndBox
{
@@ -1293,7 +1297,7 @@ void _SaveBox::RestoreAttr( SwTableBox& rBox, _SaveTable& rSTbl )
else
{
_SaveLine* pLn = Ptrs.pLine;
- for( USHORT n = 0; n < rBox.GetTabLines().Count(); ++n, pLn = pLn->pNext )
+ for( sal_uInt16 n = 0; n < rBox.GetTabLines().Count(); ++n, pLn = pLn->pNext )
{
if( !pLn )
{
@@ -1310,9 +1314,9 @@ void _SaveBox::RestoreAttr( SwTableBox& rBox, _SaveTable& rSTbl )
if( Ptrs.pCntntAttrs )
{
SwNodes& rNds = rBox.GetFrmFmt()->GetDoc()->GetNodes();
- USHORT nSet = 0;
- ULONG nEnd = rBox.GetSttNd()->EndOfSectionIndex();
- for( ULONG n = nSttNode + 1; n < nEnd; ++n )
+ sal_uInt16 nSet = 0;
+ sal_uLong nEnd = rBox.GetSttNd()->EndOfSectionIndex();
+ for( sal_uLong n = nSttNode + 1; n < nEnd; ++n )
{
SwCntntNode* pCNd = rNds[ n ]->GetCntntNode();
if( pCNd )
@@ -1320,7 +1324,7 @@ void _SaveBox::RestoreAttr( SwTableBox& rBox, _SaveTable& rSTbl )
SfxItemSet* pSet = (*Ptrs.pCntntAttrs)[ nSet++ ];
if( pSet )
{
- USHORT *pRstAttr = aSave_BoxCntntSet;
+ sal_uInt16 *pRstAttr = aSave_BoxCntntSet;
while( *pRstAttr )
{
pCNd->ResetAttr( *pRstAttr, *(pRstAttr+1) );
@@ -1350,9 +1354,9 @@ void _SaveBox::SaveCntntAttrs( SwDoc* pDoc )
}
else
{
- ULONG nEnd = pDoc->GetNodes()[ nSttNode ]->EndOfSectionIndex();
- Ptrs.pCntntAttrs = new SfxItemSets( (BYTE)(nEnd - nSttNode - 1 ), 5 );
- for( ULONG n = nSttNode + 1; n < nEnd; ++n )
+ sal_uLong nEnd = pDoc->GetNodes()[ nSttNode ]->EndOfSectionIndex();
+ Ptrs.pCntntAttrs = new SfxItemSets( (sal_uInt8)(nEnd - nSttNode - 1 ), 5 );
+ for( sal_uLong n = nSttNode + 1; n < nEnd; ++n )
{
SwCntntNode* pCNd = pDoc->GetNodes()[ n ]->GetCntntNode();
if( pCNd )
@@ -1418,12 +1422,12 @@ void _SaveBox::CreateNew( SwTable& rTbl, SwTableLine& rParent, _SaveTable& rSTbl
}
-/* */
+//////////////////////////////////////////////////////////////////////////
// UndoObject fuer Attribut Aenderung an der Tabelle
-SwUndoAttrTbl::SwUndoAttrTbl( const SwTableNode& rTblNd, BOOL bClearTabCols )
+SwUndoAttrTbl::SwUndoAttrTbl( const SwTableNode& rTblNd, sal_Bool bClearTabCols )
: SwUndo( UNDO_TABLE_ATTR ),
nSttNode( rTblNd.GetIndex() )
{
@@ -1431,17 +1435,14 @@ SwUndoAttrTbl::SwUndoAttrTbl( const SwTableNode& rTblNd, BOOL bClearTabCols )
pSaveTbl = new _SaveTable( rTblNd.GetTable() );
}
-
SwUndoAttrTbl::~SwUndoAttrTbl()
{
delete pSaveTbl;
}
-
-
-void SwUndoAttrTbl::Undo( SwUndoIter& rUndoIter )
+void SwUndoAttrTbl::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
SwTableNode* pTblNd = rDoc.GetNodes()[ nSttNode ]->GetTableNode();
OSL_ENSURE( pTblNd, "kein TabellenNode" );
@@ -1457,14 +1458,13 @@ void SwUndoAttrTbl::Undo( SwUndoIter& rUndoIter )
ClearFEShellTabCols();
}
-
-void SwUndoAttrTbl::Redo( SwUndoIter& rUndoIter )
+void SwUndoAttrTbl::RedoImpl(::sw::UndoRedoContext & rContext)
{
- Undo( rUndoIter );
+ UndoImpl(rContext);
}
-/* */
+//////////////////////////////////////////////////////////////////////////
// UndoObject fuer AutoFormat an der Tabelle
@@ -1472,8 +1472,8 @@ void SwUndoAttrTbl::Redo( SwUndoIter& rUndoIter )
SwUndoTblAutoFmt::SwUndoTblAutoFmt( const SwTableNode& rTblNd,
const SwTableAutoFmt& rAFmt )
: SwUndo( UNDO_TABLE_AUTOFMT ),
- nSttNode( rTblNd.GetIndex() ), pUndos( 0 ),
- bSaveCntntAttr( FALSE )
+ nSttNode( rTblNd.GetIndex() ),
+ bSaveCntntAttr( sal_False )
{
pSaveTbl = new _SaveTable( rTblNd.GetTable() );
@@ -1482,29 +1482,26 @@ SwUndoTblAutoFmt::SwUndoTblAutoFmt( const SwTableNode& rTblNd,
// dann auch noch ueber die ContentNodes der EndBoxen und
// und alle Absatz-Attribute zusammen sammeln
pSaveTbl->SaveCntntAttrs( (SwDoc*)rTblNd.GetDoc() );
- bSaveCntntAttr = TRUE;
+ bSaveCntntAttr = sal_True;
}
}
-
SwUndoTblAutoFmt::~SwUndoTblAutoFmt()
{
- delete pUndos;
delete pSaveTbl;
}
void SwUndoTblAutoFmt::SaveBoxCntnt( const SwTableBox& rBox )
{
- SwUndoTblNumFmt* p = new SwUndoTblNumFmt( rBox );
- if( !pUndos )
- pUndos = new SwUndos( 8, 8 );
- pUndos->Insert( p, pUndos->Count() );
+ ::boost::shared_ptr<SwUndoTblNumFmt> const p(new SwUndoTblNumFmt(rBox));
+ m_Undos.push_back(p);
}
-void SwUndoTblAutoFmt::UndoRedo( BOOL bUndo, SwUndoIter& rUndoIter )
+void
+SwUndoTblAutoFmt::UndoRedo(bool const bUndo, ::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
SwTableNode* pTblNd = rDoc.GetNodes()[ nSttNode ]->GetTableNode();
OSL_ENSURE( pTblNd, "kein TabellenNode" );
@@ -1514,37 +1511,39 @@ void SwUndoTblAutoFmt::UndoRedo( BOOL bUndo, SwUndoIter& rUndoIter )
if( bSaveCntntAttr )
pOrig->SaveCntntAttrs( &rDoc );
- if( pUndos && bUndo )
- for( USHORT n = pUndos->Count(); n; )
- pUndos->GetObject( --n )->Undo( rUndoIter );
+ if (bUndo)
+ {
+ for (size_t n = m_Undos.size(); 0 < n; --n)
+ {
+ m_Undos.at(n-1)->UndoImpl(rContext);
+ }
+ }
pSaveTbl->RestoreAttr( pTblNd->GetTable(), !bUndo );
delete pSaveTbl;
pSaveTbl = pOrig;
}
-void SwUndoTblAutoFmt::Undo( SwUndoIter& rUndoIter )
+void SwUndoTblAutoFmt::UndoImpl(::sw::UndoRedoContext & rContext)
{
- UndoRedo( TRUE, rUndoIter );
+ UndoRedo(true, rContext);
}
-
-void SwUndoTblAutoFmt::Redo( SwUndoIter& rUndoIter )
+void SwUndoTblAutoFmt::RedoImpl(::sw::UndoRedoContext & rContext)
{
- UndoRedo( FALSE, rUndoIter );
+ UndoRedo(false, rContext);
}
-/* */
-
+//////////////////////////////////////////////////////////////////////////
SwUndoTblNdsChg::SwUndoTblNdsChg( SwUndoId nAction,
const SwSelBoxes& rBoxes,
const SwTableNode& rTblNd,
long nMn, long nMx,
- USHORT nCnt, BOOL bFlg, BOOL bSmHght )
+ sal_uInt16 nCnt, sal_Bool bFlg, sal_Bool bSmHght )
: SwUndo( nAction ),
- aBoxes( rBoxes.Count() < 255 ? (BYTE)rBoxes.Count() : 255, 10 ),
+ aBoxes( rBoxes.Count() < 255 ? (sal_uInt8)rBoxes.Count() : 255, 10 ),
nMin( nMn ), nMax( nMx ),
nSttNode( rTblNd.GetIndex() ), nCurrBox( 0 ),
nCount( nCnt ), nRelDiff( 0 ), nAbsDiff( 0 ),
@@ -1558,7 +1557,7 @@ SwUndoTblNdsChg::SwUndoTblNdsChg( SwUndoId nAction,
pSaveTbl = new _SaveTable( rTbl );
// und die Selektion merken
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
aBoxes.Insert( rBoxes[n]->GetSttIdx(), n );
}
@@ -1567,13 +1566,13 @@ SwUndoTblNdsChg::SwUndoTblNdsChg( SwUndoId nAction,
const SwSelBoxes& rBoxes,
const SwTableNode& rTblNd )
: SwUndo( nAction ),
- aBoxes( rBoxes.Count() < 255 ? (BYTE)rBoxes.Count() : 255, 10 ),
+ aBoxes( rBoxes.Count() < 255 ? (sal_uInt8)rBoxes.Count() : 255, 10 ),
nMin( 0 ), nMax( 0 ),
nSttNode( rTblNd.GetIndex() ), nCurrBox( 0 ),
nCount( 0 ), nRelDiff( 0 ), nAbsDiff( 0 ),
nSetColType( USHRT_MAX ),
- bFlag( FALSE ),
- bSameHeight( FALSE )
+ bFlag( sal_False ),
+ bSameHeight( sal_False )
{
Ptrs.pNewSttNds = 0;
@@ -1581,7 +1580,7 @@ SwUndoTblNdsChg::SwUndoTblNdsChg( SwUndoId nAction,
pSaveTbl = new _SaveTable( rTbl );
// und die Selektion merken
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
aBoxes.Insert( rBoxes[n]->GetSttIdx(), n );
}
@@ -1590,7 +1589,7 @@ void SwUndoTblNdsChg::ReNewBoxes( const SwSelBoxes& rBoxes )
if( rBoxes.Count() != aBoxes.Count() )
{
aBoxes.Remove( 0, aBoxes.Count() );
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
aBoxes.Insert( rBoxes[n]->GetSttIdx(), n );
}
}
@@ -1610,11 +1609,11 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
{
const SwTable& rTbl = rTblNd.GetTable();
const SwTableSortBoxes& rTblBoxes = rTbl.GetTabSortBoxes();
- USHORT n;
- USHORT i;
+ sal_uInt16 n;
+ sal_uInt16 i;
OSL_ENSURE( ! IsDelBox(), "falsche Action" );
- Ptrs.pNewSttNds = new SvULongs( (BYTE)(rTblBoxes.Count() - rOld.Count()), 5 );
+ Ptrs.pNewSttNds = new SvULongs( (sal_uInt8)(rTblBoxes.Count() - rOld.Count()), 5 );
for( n = 0, i = 0; n < rOld.Count(); ++i )
{
@@ -1640,7 +1639,7 @@ SwTableLine* lcl_FindTableLine( const SwTable& rTable,
rBox.GetUpper()->GetUpper()->GetTabLines()
: rTable.GetTabLines();
const SwTableLine* pLine = rBox.GetUpper();
- USHORT nLineNo = rTableLines.C40_GETPOS( SwTableLine, pLine );
+ sal_uInt16 nLineNo = rTableLines.C40_GETPOS( SwTableLine, pLine );
pRet = rTableLines[nLineNo - 1];
return pRet;
@@ -1667,12 +1666,12 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
const SwTableSortBoxes& rTblBoxes = rTbl.GetTabSortBoxes();
OSL_ENSURE( ! IsDelBox(), "falsche Action" );
- Ptrs.pNewSttNds = new SvULongs( (BYTE)(rTblBoxes.Count() - rOld.Count()), 5 );
+ Ptrs.pNewSttNds = new SvULongs( (sal_uInt8)(rTblBoxes.Count() - rOld.Count()), 5 );
OSL_ENSURE( rTbl.IsNewModel() || rOld.Count() + nCount * rBoxes.Count() == rTblBoxes.Count(),
"unexpected boxes" );
OSL_ENSURE( rOld.Count() <= rTblBoxes.Count(), "more unexpected boxes" );
- for( USHORT n = 0, i = 0; i < rTblBoxes.Count(); ++i )
+ for( sal_uInt16 n = 0, i = 0; i < rTblBoxes.Count(); ++i )
{
if( ( n < rOld.Count() ) &&
( rOld[ n ] == rTblBoxes[ i ] ) )
@@ -1683,7 +1682,7 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
else
{
// new box found: insert (obey sort order)
- USHORT nInsPos;
+ sal_uInt16 nInsPos;
const SwTableBox* pBox = rTblBoxes[ i ];
InsertSort( *Ptrs.pNewSttNds, pBox->GetSttIdx(), &nInsPos );
@@ -1694,15 +1693,15 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
const SwTableBox* pSourceBox = NULL;
const SwTableBox* pCheckBox = NULL;
const SwTableLine* pBoxLine = pBox->GetUpper();
- USHORT nLineDiff = lcl_FindParentLines(rTbl,*pBox).C40_GETPOS(SwTableLine,pBoxLine);
- USHORT nLineNo = 0;
- for( USHORT j = 0; j < rBoxes.Count(); ++j )
+ sal_uInt16 nLineDiff = lcl_FindParentLines(rTbl,*pBox).C40_GETPOS(SwTableLine,pBoxLine);
+ sal_uInt16 nLineNo = 0;
+ for( sal_uInt16 j = 0; j < rBoxes.Count(); ++j )
{
pCheckBox = rBoxes[j];
if( pCheckBox->GetUpper()->GetUpper() == pBox->GetUpper()->GetUpper() )
{
const SwTableLine* pCheckLine = pCheckBox->GetUpper();
- USHORT nCheckLine = lcl_FindParentLines( rTbl, *pCheckBox ).
+ sal_uInt16 nCheckLine = lcl_FindParentLines( rTbl, *pCheckBox ).
C40_GETPOS( SwTableLine, pCheckLine );
if( ( !pSourceBox || nCheckLine > nLineNo ) && nCheckLine < nLineDiff )
{
@@ -1718,10 +1717,10 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
OSL_ENSURE( pSourceBox, "Splitted source box not found!" );
// find out how many nodes the source box used to have
// (to help determine bNodesMoved flag below)
- USHORT nNdsPos = 0;
+ sal_uInt16 nNdsPos = 0;
while( rBoxes[ nNdsPos ] != pSourceBox )
++nNdsPos;
- ULONG nNodes = rNodeCnts[ nNdsPos ];
+ sal_uLong nNodes = rNodeCnts[ nNdsPos ];
// When a new table cell is created, it either gets a new
// node, or it gets node(s) from elsewhere. The undo must
@@ -1735,7 +1734,7 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
// The bNodesMoved flag is stored in a seperate array
// which mirrors Ptrs.pNewSttNds, i.e. Ptrs.pNewSttNds[i]
// and aMvBoxes[i] belong together.
- BOOL bNodesMoved =
+ sal_Bool bNodesMoved =
( nNodes != ( pSourceBox->GetSttNd()->EndOfSectionIndex() -
pSourceBox->GetSttIdx() ) )
&& ( nNodes - 1 > nLineDiff );
@@ -1760,12 +1759,12 @@ void SwUndoTblNdsChg::SaveSection( SwStartNode* pSttNd )
}
-void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter )
+void SwUndoTblNdsChg::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
SwNodeIndex aIdx( rDoc.GetNodes(), nSttNode );
- SwTableNode* pTblNd = rDoc.GetNodes()[ aIdx ]->GetTableNode();
+ SwTableNode *const pTblNd = aIdx.GetNode().GetTableNode();
OSL_ENSURE( pTblNd, "kein TabellenNode" );
SwTableFmlUpdate aMsgHnt( &pTblNd->GetTable() );
@@ -1787,7 +1786,7 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter )
SwTableBoxes& rLnBoxes = pCpyBox->GetUpper()->GetTabBoxes();
// die Sections wieder herstellen
- for( USHORT n = Ptrs.pDelSects->Count(); n; )
+ for( sal_uInt16 n = Ptrs.pDelSects->Count(); n; )
{
SwUndoSaveSection* pSave = (*Ptrs.pDelSects)[ --n ];
pSave->RestoreSection( &rDoc, &aIdx, SwTableBoxStartNode );
@@ -1807,10 +1806,10 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter )
aTmp.Insert( Ptrs.pNewSttNds, 0 );
// von hinten anfangen
- for( USHORT n = aTmp.Count(); n; )
+ for( sal_uInt16 n = aTmp.Count(); n; )
{
// Box aus der Tabellen-Struktur entfernen
- ULONG nIdx = aTmp[ --n ];
+ sal_uLong nIdx = aTmp[ --n ];
SwTableBox* pBox = pTblNd->GetTable().GetTblBox( nIdx );
OSL_ENSURE( pBox, "Wo ist meine TabellenBox geblieben?" );
@@ -1827,8 +1826,8 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter )
SwNodeIndex aInsPos( *(pLine->GetTabBoxes()[0]->GetSttNd()), 2 );
// alle StartNode Indizies anpassen
- USHORT i = n;
- ULONG nSttIdx = aInsPos.GetIndex() - 2,
+ sal_uInt16 i = n;
+ sal_uLong nSttIdx = aInsPos.GetIndex() - 2,
nNdCnt = aRg.aEnd.GetIndex() - aRg.aStart.GetIndex();
while( i && aTmp[ --i ] > nSttIdx )
aTmp[ i ] += nNdCnt;
@@ -1836,7 +1835,7 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter )
// erst die Box loeschen
delete pBox;
// dann die Nodes verschieben,
- rDoc.GetNodes()._MoveNodes( aRg, rDoc.GetNodes(), aInsPos, FALSE );
+ rDoc.GetNodes()._MoveNodes( aRg, rDoc.GetNodes(), aInsPos, sal_False );
}
else
rDoc.DeleteSection( rDoc.GetNodes()[ nIdx ] );
@@ -1846,9 +1845,9 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter )
else
{
// Remove nodes from nodes array (backwards!)
- for( USHORT n = Ptrs.pNewSttNds->Count(); n; )
+ for( sal_uInt16 n = Ptrs.pNewSttNds->Count(); n; )
{
- ULONG nIdx = (*Ptrs.pNewSttNds)[ --n ];
+ sal_uLong nIdx = (*Ptrs.pNewSttNds)[ --n ];
SwTableBox* pBox = pTblNd->GetTable().GetTblBox( nIdx );
OSL_ENSURE( pBox, "Where's my table box?" );
// TL_CHART2: notify chart about box to be removed
@@ -1859,7 +1858,7 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter )
}
}
// Remove boxes from table structure
- for( USHORT n = 0; n < aDelBoxes.size(); ++n )
+ for( sal_uInt16 n = 0; n < aDelBoxes.size(); ++n )
{
SwTableBox* pCurrBox = aDelBoxes[n];
SwTableBoxes* pTBoxes = &pCurrBox->GetUpper()->GetTabBoxes();
@@ -1867,7 +1866,7 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter )
delete pCurrBox;
}
- pSaveTbl->CreateNew( pTblNd->GetTable(), TRUE, FALSE );
+ pSaveTbl->CreateNew( pTblNd->GetTable(), sal_True, sal_False );
// TL_CHART2: need to inform chart of probably changed cell names
rDoc.UpdateCharts( pTblNd->GetTable().GetFrmFmt()->GetName() );
@@ -1879,16 +1878,16 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter )
}
-void SwUndoTblNdsChg::Redo( SwUndoIter& rUndoIter )
+void SwUndoTblNdsChg::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
SwTableNode* pTblNd = rDoc.GetNodes()[ nSttNode ]->GetTableNode();
OSL_ENSURE( pTblNd, "kein TabellenNode" );
CHECK_TABLE( pTblNd->GetTable() )
SwSelBoxes aSelBoxes;
- for( USHORT n = 0; n < aBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aBoxes.Count(); ++n )
{
SwTableBox* pBox = pTblNd->GetTable().GetTblBox( aBoxes[ n ] );
aSelBoxes.Insert( pBox );
@@ -1936,7 +1935,7 @@ void SwUndoTblNdsChg::Redo( SwUndoIter& rUndoIter )
SwTable &rTable = pTblNd->GetTable();
if( nMax > nMin && rTable.IsNewModel() )
rTable.PrepareDeleteCol( nMin, nMax );
- rTable.DeleteSel( &rDoc, aSelBoxes, 0, this, TRUE, TRUE );
+ rTable.DeleteSel( &rDoc, aSelBoxes, 0, this, sal_True, sal_True );
}
else
{
@@ -1950,7 +1949,8 @@ void SwUndoTblNdsChg::Redo( SwUndoIter& rUndoIter )
TblChgMode eOldMode = rTbl.GetTblChgMode();
rTbl.SetTblChgMode( (TblChgMode)nCount );
- rDoc.DoUndo( TRUE ); // wir brauchen die SaveSections!
+ // need the SaveSections!
+ rDoc.GetIDocumentUndoRedo().DoUndo( true );
SwUndoTblNdsChg* pUndo = 0;
switch( nSetColType & 0xff )
@@ -1978,7 +1978,7 @@ void SwUndoTblNdsChg::Redo( SwUndoIter& rUndoIter )
delete pUndo;
}
- rDoc.DoUndo( FALSE );
+ rDoc.GetIDocumentUndoRedo().DoUndo( false );
rTbl.SetTblChgMode( eOldMode );
}
@@ -1992,8 +1992,7 @@ void SwUndoTblNdsChg::Redo( SwUndoIter& rUndoIter )
}
-/* */
-
+//////////////////////////////////////////////////////////////////////////
SwUndoTblMerge::SwUndoTblMerge( const SwPaM& rTblSel )
: SwUndo( UNDO_TABLE_MERGE ), SwUndRng( rTblSel ), pHistory( 0 )
@@ -2005,7 +2004,6 @@ SwUndoTblMerge::SwUndoTblMerge( const SwPaM& rTblSel )
nTblNode = pTblNd->GetIndex();
}
-
SwUndoTblMerge::~SwUndoTblMerge()
{
delete pSaveTbl;
@@ -2013,13 +2011,12 @@ SwUndoTblMerge::~SwUndoTblMerge()
delete pHistory;
}
-
-void SwUndoTblMerge::Undo( SwUndoIter& rUndoIter )
+void SwUndoTblMerge::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rUndoIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
SwNodeIndex aIdx( rDoc.GetNodes(), nTblNode );
- SwTableNode* pTblNd = rDoc.GetNodes()[ aIdx ]->GetTableNode();
+ SwTableNode *const pTblNd = aIdx.GetNode().GetTableNode();
OSL_ENSURE( pTblNd, "kein TabellenNode" );
SwTableFmlUpdate aMsgHnt( &pTblNd->GetTable() );
@@ -2041,7 +2038,7 @@ CHECKTABLE(pTblNd->GetTable())
SwSelBoxes aSelBoxes;
SwTxtFmtColl* pColl = rDoc.GetTxtCollFromPool( RES_POOLCOLL_STANDARD );
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < aBoxes.Count(); ++n )
{
@@ -2063,7 +2060,7 @@ CHECKTABLE(pTblNd->GetTable())
for( n = aNewSttNds.Count(); n; )
{
// Box aus der Tabellen-Struktur entfernen
- ULONG nIdx = aNewSttNds[ --n ];
+ sal_uLong nIdx = aNewSttNds[ --n ];
if( !nIdx && n )
{
@@ -2076,17 +2073,17 @@ CHECKTABLE(pTblNd->GetTable())
*pBox->GetSttNd()->EndOfSectionNode() ), pColl );
// das war der Trenner, -> die verschobenen herstellen
- for( USHORT i = pMoves->Count(); i; )
+ for( sal_uInt16 i = pMoves->Count(); i; )
{
SwTxtNode* pTxtNd = 0;
- USHORT nDelPos = 0;
+ sal_uInt16 nDelPos = 0;
SwUndoMove* pUndo = (*pMoves)[ --i ];
if( !pUndo->IsMoveRange() )
{
pTxtNd = rDoc.GetNodes()[ pUndo->GetDestSttNode() ]->GetTxtNode();
nDelPos = pUndo->GetDestSttCntnt() - 1;
}
- pUndo->Undo( rUndoIter );
+ pUndo->UndoImpl(rContext);
if( pUndo->IsMoveRange() )
{
// den ueberfluessigen Node loeschen
@@ -2132,7 +2129,7 @@ CHECKTABLE(pTblNd->GetTable())
SwNodeIndex aTmpIdx( *pBox->GetSttNd() );
rDoc.CorrAbs( SwNodeIndex( aTmpIdx, 1 ),
SwNodeIndex( *aTmpIdx.GetNode().EndOfSectionNode() ),
- SwPosition( aTmpIdx, SwIndex( 0, 0 )), TRUE );
+ SwPosition( aTmpIdx, SwIndex( 0, 0 )), sal_True );
}
delete pBox;
@@ -2142,7 +2139,7 @@ CHECKTABLE(pTblNd->GetTable())
CHECKTABLE(pTblNd->GetTable())
- pSaveTbl->CreateNew( pTblNd->GetTable(), TRUE, FALSE );
+ pSaveTbl->CreateNew( pTblNd->GetTable(), sal_True, sal_False );
// TL_CHART2: need to inform chart of probably changed cell names
rDoc.UpdateCharts( pTblNd->GetTable().GetFrmFmt()->GetName() );
@@ -2154,7 +2151,7 @@ CHECKTABLE(pTblNd->GetTable())
}
// nTblNode = pTblNd->GetIndex();
- SwPaM* pPam = rUndoIter.pAktPam;
+ SwPaM *const pPam(& rContext.GetCursorSupplier().CreateNewShellCursor());
pPam->DeleteMark();
pPam->GetPoint()->nNode = nSttNode;
pPam->GetPoint()->nContent.Assign( pPam->GetCntntNode(), nSttCntnt );
@@ -2165,27 +2162,21 @@ CHECKTABLE(pTblNd->GetTable())
ClearFEShellTabCols();
}
-
-void SwUndoTblMerge::Redo( SwUndoIter& rUndoIter )
+void SwUndoTblMerge::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwPaM* pPam = rUndoIter.pAktPam;
- SwDoc& rDoc = *pPam->GetDoc();
-
- SetPaM( *pPam );
- rDoc.MergeTbl( *pPam );
+ SwDoc & rDoc = rContext.GetDoc();
+ SwPaM & rPam( AddUndoRedoPaM(rContext) );
+ rDoc.MergeTbl(rPam);
}
void SwUndoTblMerge::MoveBoxCntnt( SwDoc* pDoc, SwNodeRange& rRg, SwNodeIndex& rPos )
{
SwNodeIndex aTmp( rRg.aStart, -1 ), aTmp2( rPos, -1 );
SwUndoMove* pUndo = new SwUndoMove( pDoc, rRg, rPos );
- sal_Bool bDoesUndo = pDoc->DoesUndo();
- pDoc->DoUndo( sal_False );
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
pDoc->MoveNodeRange( rRg, rPos, (pSaveTbl->IsNewModel()) ?
IDocumentContentOperations::DOC_NO_DELFRMS :
IDocumentContentOperations::DOC_MOVEDEFAULT );
- if( bDoesUndo )
- pDoc->DoUndo( sal_True );
aTmp++;
aTmp2++;
pUndo->SetDestRange( aTmp2, rPos, aTmp );
@@ -2193,15 +2184,14 @@ void SwUndoTblMerge::MoveBoxCntnt( SwDoc* pDoc, SwNodeRange& rRg, SwNodeIndex& r
pMoves->Insert( pUndo, pMoves->Count() );
}
-
void SwUndoTblMerge::SetSelBoxes( const SwSelBoxes& rBoxes )
{
// die Selektion merken
- for( USHORT n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
InsertSort( aBoxes, rBoxes[n]->GetSttIdx() );
// als Trennung fuers einfuegen neuer Boxen nach dem Verschieben!
- aNewSttNds.Insert( (ULONG)0, aNewSttNds.Count() );
+ aNewSttNds.Insert( (sal_uLong)0, aNewSttNds.Count() );
// The new table model does not delete overlapped cells (by row span),
// so the rBoxes array might be empty even some cells have been merged.
@@ -2224,15 +2214,15 @@ void SwUndoTblMerge::SaveCollection( const SwTableBox& rBox )
pHistory->CopyFmtAttr( *pCNd->GetpSwAttrSet(), aIdx.GetIndex() );
}
-/* */
+//////////////////////////////////////////////////////////////////////////
SwUndoTblNumFmt::SwUndoTblNumFmt( const SwTableBox& rBox,
const SfxItemSet* pNewSet )
: SwUndo( UNDO_TBLNUMFMT ),
pBoxSet( 0 ), pHistory( 0 ), nFmtIdx( NUMBERFORMAT_TEXT )
{
- bNewFmt = bNewFml = bNewValue = FALSE;
+ bNewFmt = bNewFml = bNewValue = sal_False;
nNode = rBox.GetSttIdx();
nNdPos = rBox.IsValidNumTxtNd( 0 == pNewSet );
@@ -2264,21 +2254,21 @@ SwUndoTblNumFmt::SwUndoTblNumFmt( const SwTableBox& rBox,
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pNewSet->GetItemState( RES_BOXATR_FORMAT,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
- bNewFmt = TRUE;
+ bNewFmt = sal_True;
nNewFmtIdx = ((SwTblBoxNumFormat*)pItem)->GetValue();
}
if( SFX_ITEM_SET == pNewSet->GetItemState( RES_BOXATR_FORMULA,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
- bNewFml = TRUE;
+ bNewFml = sal_True;
aNewFml = ((SwTblBoxFormula*)pItem)->GetFormula();
}
if( SFX_ITEM_SET == pNewSet->GetItemState( RES_BOXATR_VALUE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
- bNewValue = TRUE;
+ bNewValue = sal_True;
fNewNum = ((SwTblBoxValue*)pItem)->GetValue();
}
}
@@ -2288,18 +2278,17 @@ SwUndoTblNumFmt::SwUndoTblNumFmt( const SwTableBox& rBox,
DELETEZ( pHistory );
}
-
SwUndoTblNumFmt::~SwUndoTblNumFmt()
{
delete pHistory;
delete pBoxSet;
}
-void SwUndoTblNumFmt::Undo( SwUndoIter& rIter )
+void SwUndoTblNumFmt::UndoImpl(::sw::UndoRedoContext & rContext)
{
OSL_ENSURE( pBoxSet, "Where's the stored item set?" );
- SwDoc& rDoc = rIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
SwStartNode* pSttNd = rDoc.GetNodes()[ nNode ]->
FindSttNodeByType( SwTableBoxStartNode );
OSL_ENSURE( pSttNd, "ohne StartNode kein TabellenBox" );
@@ -2340,12 +2329,12 @@ void SwUndoTblNumFmt::Undo( SwUndoIter& rIter )
if( pHistory )
{
- USHORT nTmpEnd = pHistory->GetTmpEnd();
+ sal_uInt16 nTmpEnd = pHistory->GetTmpEnd();
pHistory->TmpRollback( &rDoc, 0 );
pHistory->SetTmpEnd( nTmpEnd );
}
- SwPaM* pPam = rIter.pAktPam;
+ SwPaM *const pPam(& rContext.GetCursorSupplier().CreateNewShellCursor());
pPam->DeleteMark();
pPam->GetPoint()->nNode = nNode + 1;
pPam->GetPoint()->nContent.Assign( pTxtNd, 0 );
@@ -2388,19 +2377,19 @@ RedlineModeInternGuard::~RedlineModeInternGuard()
-void SwUndoTblNumFmt::Redo( SwUndoIter& rIter )
+void SwUndoTblNumFmt::RedoImpl(::sw::UndoRedoContext & rContext)
{
// konnte die Box veraendert werden ?
if( !pBoxSet )
return ;
- SwDoc& rDoc = rIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
+ SwPaM *const pPam(& rContext.GetCursorSupplier().CreateNewShellCursor());
- SwPaM* pPam = rIter.pAktPam;
pPam->DeleteMark();
pPam->GetPoint()->nNode = nNode;
- SwNode* pNd = rDoc.GetNodes()[ pPam->GetPoint()->nNode ];
+ SwNode * pNd = & pPam->GetPoint()->nNode.GetNode();
SwStartNode* pSttNd = pNd->FindSttNodeByType( SwTableBoxStartNode );
OSL_ENSURE( pSttNd, "ohne StartNode kein TabellenBox" );
SwTableBox* pBox = pSttNd->FindTableNode()->GetTable().GetTblBox(
@@ -2488,7 +2477,8 @@ void SwUndoTblNumFmt::SetBox( const SwTableBox& rBox )
nNode = rBox.GetSttIdx();
}
-/* */
+
+//////////////////////////////////////////////////////////////////////////
_UndoTblCpyTbl_Entry::_UndoTblCpyTbl_Entry( const SwTableBox& rBox )
: nBoxIdx( rBox.GetSttIdx() ), nOffset( 0 ),
@@ -2515,16 +2505,16 @@ SwUndoTblCpyTbl::~SwUndoTblCpyTbl()
delete pInsRowUndo;
}
-void SwUndoTblCpyTbl::Undo( SwUndoIter& rIter )
+void SwUndoTblCpyTbl::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
_DEBUG_REDLINE( &rDoc )
SwTableNode* pTblNd = 0;
- for( USHORT n = pArr->Count(); n; )
+ for( sal_uInt16 n = pArr->Count(); n; )
{
_UndoTblCpyTbl_Entry* pEntry = (*pArr)[ --n ];
- ULONG nSttPos = pEntry->nBoxIdx + pEntry->nOffset;
+ sal_uLong nSttPos = pEntry->nBoxIdx + pEntry->nOffset;
SwStartNode* pSNd = rDoc.GetNodes()[ nSttPos ]->StartOfSectionNode();
if( !pTblNd )
pTblNd = pSNd->FindTableNode();
@@ -2546,23 +2536,29 @@ void SwUndoTblCpyTbl::Undo( SwUndoIter& rIter )
// There are a couple of different situations to consider during redlining
if( pEntry->pUndo )
{
- SwUndoDelete *pUnDel = (SwUndoDelete*)pEntry->pUndo;
- if( UNDO_REDLINE == pUnDel->GetId() )
+ SwUndoDelete *const pUndoDelete =
+ dynamic_cast<SwUndoDelete*>(pEntry->pUndo);
+ SwUndoRedlineDelete *const pUndoRedlineDelete =
+ dynamic_cast<SwUndoRedlineDelete*>(pEntry->pUndo);
+ OSL_ASSERT(pUndoDelete || pUndoRedlineDelete);
+ if (pUndoRedlineDelete)
{
// The old content was not empty or he has been merged with the new content
bDeleteCompleteParagraph = !pEntry->bJoin; // bJoin is set when merged
// Set aTmpIdx to the beginning fo the old content
- SwNodeIndex aTmpIdx( *pEndNode, pUnDel->NodeDiff()-1 );
+ SwNodeIndex aTmpIdx( *pEndNode,
+ pUndoRedlineDelete->NodeDiff()-1 );
SwTxtNode *pTxt = aTmpIdx.GetNode().GetTxtNode();
if( pTxt )
{
aPam.GetPoint()->nNode = *pTxt;
- aPam.GetPoint()->nContent.Assign( pTxt, pUnDel->ContentStart() );
+ aPam.GetPoint()->nContent.Assign( pTxt,
+ pUndoRedlineDelete->ContentStart() );
}
else
*aPam.GetPoint() = SwPosition( aTmpIdx );
}
- else if( pUnDel->IsDelFullPara() )
+ else if (pUndoDelete && pUndoDelete->IsDelFullPara())
{
// When the old content was an empty paragraph, but could not be joined
// with the new content (e.g. because of a section or table)
@@ -2586,8 +2582,9 @@ void SwUndoTblCpyTbl::Undo( SwUndoIter& rIter )
if( pEntry->pUndo )
{
- pEntry->pUndo->Undo( rIter );
+ pEntry->pUndo->UndoImpl(rContext);
delete pEntry->pUndo;
+ pEntry->pUndo = 0;
}
if( bShiftPam )
{
@@ -2603,15 +2600,16 @@ void SwUndoTblCpyTbl::Undo( SwUndoIter& rIter )
else
*aPam.GetPoint() = SwPosition( aTmpIdx );
}
- pUndo = new SwUndoDelete( aPam, bDeleteCompleteParagraph, TRUE );
+ pUndo = new SwUndoDelete( aPam, bDeleteCompleteParagraph, sal_True );
}
else
{
pUndo = new SwUndoDelete( aPam, true );
if( pEntry->pUndo )
{
- pEntry->pUndo->Undo( rIter );
+ pEntry->pUndo->UndoImpl(rContext);
delete pEntry->pUndo;
+ pEntry->pUndo = 0;
}
}
pEntry->pUndo = pUndo;
@@ -2647,23 +2645,27 @@ void SwUndoTblCpyTbl::Undo( SwUndoIter& rIter )
}
if( pInsRowUndo )
- pInsRowUndo->Undo( rIter );
+ {
+ pInsRowUndo->UndoImpl(rContext);
+ }
_DEBUG_REDLINE( &rDoc )
}
-void SwUndoTblCpyTbl::Redo( SwUndoIter& rIter )
+void SwUndoTblCpyTbl::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
_DEBUG_REDLINE( &rDoc )
if( pInsRowUndo )
- pInsRowUndo->Redo( rIter );
+ {
+ pInsRowUndo->RedoImpl(rContext);
+ }
SwTableNode* pTblNd = 0;
- for( USHORT n = 0; n < pArr->Count(); ++n )
+ for( sal_uInt16 n = 0; n < pArr->Count(); ++n )
{
_UndoTblCpyTbl_Entry* pEntry = (*pArr)[ n ];
- ULONG nSttPos = pEntry->nBoxIdx + pEntry->nOffset;
+ sal_uLong nSttPos = pEntry->nBoxIdx + pEntry->nOffset;
SwStartNode* pSNd = rDoc.GetNodes()[ nSttPos ]->StartOfSectionNode();
if( !pTblNd )
pTblNd = pSNd->FindTableNode();
@@ -2675,10 +2677,10 @@ void SwUndoTblCpyTbl::Redo( SwUndoIter& rIter )
// b62341295: Redline for copying tables - Start.
rDoc.GetNodes().MakeTxtNode( aInsIdx, (SwTxtFmtColl*)rDoc.GetDfltTxtFmtColl() );
SwPaM aPam( aInsIdx.GetNode(), *rBox.GetSttNd()->EndOfSectionNode());
- SwUndo* pUndo = IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ) ? 0 : new SwUndoDelete( aPam, TRUE );
+ SwUndo* pUndo = IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ) ? 0 : new SwUndoDelete( aPam, sal_True );
if( pEntry->pUndo )
{
- pEntry->pUndo->Undo( rIter );
+ pEntry->pUndo->UndoImpl(rContext);
if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ) )
{
// PrepareRedline has to be called with the beginning of the old content
@@ -2686,8 +2688,12 @@ void SwUndoTblCpyTbl::Redo( SwUndoIter& rIter )
// by the Undo operation to this point.
// Otherwise aInsIdx has been moved during the Undo operation
if( pEntry->bJoin )
- pUndo = PrepareRedline( &rDoc, rBox, *rIter.pAktPam->GetPoint(),
+ {
+ SwPaM const& rLastPam =
+ rContext.GetCursorSupplier().GetCurrentShellCursor();
+ pUndo = PrepareRedline( &rDoc, rBox, *rLastPam.GetPoint(),
pEntry->bJoin, true );
+ }
else
{
SwPosition aTmpPos( aInsIdx );
@@ -2695,6 +2701,7 @@ void SwUndoTblCpyTbl::Redo( SwUndoIter& rIter )
}
}
delete pEntry->pUndo;
+ pEntry->pUndo = 0;
}
pEntry->pUndo = pUndo;
// b62341295: Redline for copying tables - End.
@@ -2730,7 +2737,7 @@ void SwUndoTblCpyTbl::Redo( SwUndoIter& rIter )
_DEBUG_REDLINE( &rDoc )
}
-void SwUndoTblCpyTbl::AddBoxBefore( const SwTableBox& rBox, BOOL bDelCntnt )
+void SwUndoTblCpyTbl::AddBoxBefore( const SwTableBox& rBox, sal_Bool bDelCntnt )
{
if( pArr->Count() && !bDelCntnt )
return;
@@ -2747,7 +2754,7 @@ void SwUndoTblCpyTbl::AddBoxBefore( const SwTableBox& rBox, BOOL bDelCntnt )
SwPaM aPam( aInsIdx.GetNode(), *rBox.GetSttNd()->EndOfSectionNode() );
if( !pDoc->IsRedlineOn() )
- pEntry->pUndo = new SwUndoDelete( aPam, TRUE );
+ pEntry->pUndo = new SwUndoDelete( aPam, sal_True );
}
pEntry->pBoxNumAttr = new SfxItemSet( pDoc->GetAttrPool(),
@@ -2759,7 +2766,7 @@ void SwUndoTblCpyTbl::AddBoxBefore( const SwTableBox& rBox, BOOL bDelCntnt )
_DEBUG_REDLINE( pDoc )
}
-void SwUndoTblCpyTbl::AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex& rIdx, BOOL bDelCntnt )
+void SwUndoTblCpyTbl::AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex& rIdx, sal_Bool bDelCntnt )
{
_UndoTblCpyTbl_Entry* pEntry = (*pArr)[ pArr->Count() - 1 ];
@@ -2845,7 +2852,7 @@ SwUndo* SwUndoTblCpyTbl::PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox,
aCellEnd = SwPosition(
SwNodeIndex( *rBox.GetSttNd()->EndOfSectionNode() ));
SwPaM aTmpPam( aDeleteStart, aCellEnd );
- pUndo = new SwUndoDelete( aTmpPam, TRUE );
+ pUndo = new SwUndoDelete( aTmpPam, sal_True );
}
SwPosition aCellStart( SwNodeIndex( *rBox.GetSttNd(), 2 ) );
pTxt = aCellStart.nNode.GetNode().GetTxtNode();
@@ -2862,18 +2869,18 @@ SwUndo* SwUndoTblCpyTbl::PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox,
}
-BOOL SwUndoTblCpyTbl::InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes,
- USHORT nCnt )
+sal_Bool SwUndoTblCpyTbl::InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes,
+ sal_uInt16 nCnt )
{
SwTableNode* pTblNd = (SwTableNode*)rTbl.GetTabSortBoxes()[0]->
GetSttNd()->FindTableNode();
SwTableSortBoxes aTmpLst( 0, 5 );
pInsRowUndo = new SwUndoTblNdsChg( UNDO_TABLE_INSROW, rBoxes, *pTblNd,
- 0, 0, nCnt, TRUE, FALSE );
+ 0, 0, nCnt, sal_True, sal_False );
aTmpLst.Insert( &rTbl.GetTabSortBoxes(), 0, rTbl.GetTabSortBoxes().Count() );
- BOOL bRet = rTbl.InsertRow( rTbl.GetFrmFmt()->GetDoc(), rBoxes, nCnt, TRUE );
+ sal_Bool bRet = rTbl.InsertRow( rTbl.GetFrmFmt()->GetDoc(), rBoxes, nCnt, sal_True );
if( bRet )
pInsRowUndo->SaveNewBoxes( *pTblNd, aTmpLst );
else
@@ -2881,12 +2888,13 @@ BOOL SwUndoTblCpyTbl::InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes,
return bRet;
}
-BOOL SwUndoTblCpyTbl::IsEmpty() const
+sal_Bool SwUndoTblCpyTbl::IsEmpty() const
{
return !pInsRowUndo && !pArr->Count();
}
-/* */
+
+//////////////////////////////////////////////////////////////////////////
SwUndoCpyTbl::SwUndoCpyTbl()
: SwUndo( UNDO_CPYTBL ), pDel( 0 ), nTblNode( 0 )
@@ -2898,9 +2906,9 @@ SwUndoCpyTbl::~SwUndoCpyTbl()
delete pDel;
}
-void SwUndoCpyTbl::Undo( SwUndoIter& rIter )
+void SwUndoCpyTbl::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwDoc& rDoc = rIter.GetDoc();
+ SwDoc & rDoc = rContext.GetDoc();
SwTableNode* pTNd = rDoc.GetNodes()[ nTblNode ]->GetTableNode();
// harte SeitenUmbrueche am nachfolgenden Node verschieben
@@ -2911,29 +2919,29 @@ void SwUndoCpyTbl::Undo( SwUndoIter& rIter )
const SfxPoolItem *pItem;
if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_PAGEDESC,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
pNextNd->SetAttr( *pItem );
if( SFX_ITEM_SET == pTableFmt->GetItemState( RES_BREAK,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
pNextNd->SetAttr( *pItem );
}
SwPaM aPam( *pTNd, *pTNd->EndOfSectionNode(), 0 , 1 );
- pDel = new SwUndoDelete( aPam, TRUE );
+ pDel = new SwUndoDelete( aPam, sal_True );
}
-void SwUndoCpyTbl::Redo( SwUndoIter& rIter )
+void SwUndoCpyTbl::RedoImpl(::sw::UndoRedoContext & rContext)
{
- pDel->Undo( rIter );
+ pDel->UndoImpl(rContext);
delete pDel, pDel = 0;
}
-/* */
+//////////////////////////////////////////////////////////////////////////
SwUndoSplitTbl::SwUndoSplitTbl( const SwTableNode& rTblNd,
- SwSaveRowSpan* pRowSp, USHORT eMode, BOOL bNewSize )
+ SwSaveRowSpan* pRowSp, sal_uInt16 eMode, sal_Bool bNewSize )
: SwUndo( UNDO_SPLIT_TABLE ),
nTblNode( rTblNd.GetIndex() ), nOffset( 0 ), mpSaveRowSpan( pRowSp ), pSavTbl( 0 ),
pHistory( 0 ), nMode( eMode ), nFmlEnd( 0 ), bCalcNewSize( bNewSize )
@@ -2945,7 +2953,7 @@ SwUndoSplitTbl::SwUndoSplitTbl( const SwTableNode& rTblNd,
// kein break;
case HEADLINE_BORDERCOPY:
case HEADLINE_BOXATTRCOPY:
- pSavTbl = new _SaveTable( rTblNd.GetTable(), 1, FALSE );
+ pSavTbl = new _SaveTable( rTblNd.GetTable(), 1, sal_False );
break;
}
}
@@ -2957,10 +2965,10 @@ SwUndoSplitTbl::~SwUndoSplitTbl()
delete mpSaveRowSpan;
}
-void SwUndoSplitTbl::Undo( SwUndoIter& rIter )
+void SwUndoSplitTbl::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwPaM* pPam = rIter.pAktPam;
- SwDoc* pDoc = pPam->GetDoc();
+ SwDoc *const pDoc = & rContext.GetDoc();
+ SwPaM *const pPam(& rContext.GetCursorSupplier().CreateNewShellCursor());
pPam->DeleteMark();
SwNodeIndex& rIdx = pPam->GetPoint()->nNode;
@@ -2987,7 +2995,7 @@ void SwUndoSplitTbl::Undo( SwUndoIter& rIter )
case HEADLINE_BOXATTRCOPY:
case HEADLINE_BORDERCOPY:
{
- pSavTbl->CreateNew( rTbl, FALSE );
+ pSavTbl->CreateNew( rTbl, sal_False );
pSavTbl->RestoreAttr( rTbl );
}
break;
@@ -2997,11 +3005,11 @@ void SwUndoSplitTbl::Undo( SwUndoIter& rIter )
{
SwSelBoxes aSelBoxes;
SwTableBox* pBox = rTbl.GetTblBox( nTblNode + nOffset + 1 );
- rTbl.SelLineFromBox( pBox, aSelBoxes, TRUE );
+ rTbl.SelLineFromBox( pBox, aSelBoxes, sal_True );
_FndBox aTmpBox( 0, 0 );
aTmpBox.SetTableLines( aSelBoxes, rTbl );
aTmpBox.DelFrms( rTbl );
- rTbl.DeleteSel( pDoc, aSelBoxes, 0, 0, FALSE, FALSE );
+ rTbl.DeleteSel( pDoc, aSelBoxes, 0, 0, sal_False, sal_False );
}
break;
}
@@ -3022,10 +3030,10 @@ void SwUndoSplitTbl::Undo( SwUndoIter& rIter )
ClearFEShellTabCols();
}
-void SwUndoSplitTbl::Redo( SwUndoIter& rIter )
+void SwUndoSplitTbl::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwPaM* pPam = rIter.pAktPam;
- SwDoc* pDoc = pPam->GetDoc();
+ SwDoc *const pDoc = & rContext.GetDoc();
+ SwPaM *const pPam(& rContext.GetCursorSupplier().CreateNewShellCursor());
pPam->DeleteMark();
pPam->GetPoint()->nNode = nTblNode;
@@ -3034,10 +3042,10 @@ void SwUndoSplitTbl::Redo( SwUndoIter& rIter )
ClearFEShellTabCols();
}
-void SwUndoSplitTbl::Repeat( SwUndoIter& rIter )
+void SwUndoSplitTbl::RepeatImpl(::sw::RepeatContext & rContext)
{
- SwPaM* pPam = rIter.pAktPam;
- SwDoc* pDoc = pPam->GetDoc();
+ SwPaM *const pPam = & rContext.GetRepeatPaM();
+ SwDoc *const pDoc = & rContext.GetDoc();
pDoc->SplitTable( *pPam->GetPoint(), nMode, bCalcNewSize );
ClearFEShellTabCols();
@@ -3052,11 +3060,12 @@ void SwUndoSplitTbl::SaveFormula( SwHistory& rHistory )
pHistory->Move( 0, &rHistory );
}
-/* */
+
+//////////////////////////////////////////////////////////////////////////
SwUndoMergeTbl::SwUndoMergeTbl( const SwTableNode& rTblNd,
const SwTableNode& rDelTblNd,
- BOOL bWithPrv, USHORT nMd )
+ sal_Bool bWithPrv, sal_uInt16 nMd )
: SwUndo( UNDO_MERGE_TABLE ), pSavTbl( 0 ),
pHistory( 0 ), nMode( nMd ), bWithPrev( bWithPrv )
{
@@ -3079,10 +3088,10 @@ SwUndoMergeTbl::~SwUndoMergeTbl()
delete pHistory;
}
-void SwUndoMergeTbl::Undo( SwUndoIter& rIter )
+void SwUndoMergeTbl::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwPaM* pPam = rIter.pAktPam;
- SwDoc* pDoc = pPam->GetDoc();
+ SwDoc *const pDoc = & rContext.GetDoc();
+ SwPaM *const pPam(& rContext.GetCursorSupplier().CreateNewShellCursor());
pPam->DeleteMark();
SwNodeIndex& rIdx = pPam->GetPoint()->nNode;
@@ -3101,7 +3110,7 @@ void SwUndoMergeTbl::Undo( SwUndoIter& rIter )
aFndBox.DelFrms( *pTbl );
// ? TL_CHART2: notification or locking of controller required ?
- SwTableNode* pNew = pDoc->GetNodes().SplitTable( rIdx, TRUE, FALSE );
+ SwTableNode* pNew = pDoc->GetNodes().SplitTable( rIdx, sal_True, sal_False );
//Layout updaten
aFndBox.MakeFrms( *pTbl );
@@ -3117,7 +3126,7 @@ void SwUndoMergeTbl::Undo( SwUndoIter& rIter )
pTbl = &pNew->GetTable();
pTbl->GetFrmFmt()->SetName( aName );
-// pSavTbl->CreateNew( *pTbl, FALSE );
+// pSavTbl->CreateNew( *pTbl, sal_False );
pSavTbl->RestoreAttr( *pTbl );
@@ -3146,10 +3155,10 @@ void SwUndoMergeTbl::Undo( SwUndoIter& rIter )
}
}
-void SwUndoMergeTbl::Redo( SwUndoIter& rIter )
+void SwUndoMergeTbl::RedoImpl(::sw::UndoRedoContext & rContext)
{
- SwPaM* pPam = rIter.pAktPam;
- SwDoc* pDoc = pPam->GetDoc();
+ SwDoc *const pDoc = & rContext.GetDoc();
+ SwPaM *const pPam(& rContext.GetCursorSupplier().CreateNewShellCursor());
pPam->DeleteMark();
pPam->GetPoint()->nNode = nTblNode;
@@ -3163,10 +3172,10 @@ void SwUndoMergeTbl::Redo( SwUndoIter& rIter )
ClearFEShellTabCols();
}
-void SwUndoMergeTbl::Repeat( SwUndoIter& rIter )
+void SwUndoMergeTbl::RepeatImpl(::sw::RepeatContext & rContext)
{
- SwPaM* pPam = rIter.pAktPam;
- SwDoc* pDoc = pPam->GetDoc();
+ SwDoc *const pDoc = & rContext.GetDoc();
+ SwPaM *const pPam = & rContext.GetRepeatPaM();
pDoc->MergeTable( *pPam->GetPoint(), bWithPrev, nMode );
ClearFEShellTabCols();
@@ -3179,12 +3188,12 @@ void SwUndoMergeTbl::SaveFormula( SwHistory& rHistory )
pHistory->Move( 0, &rHistory );
}
-/* */
+//////////////////////////////////////////////////////////////////////////
-void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos )
+void InsertSort( SvUShorts& rArr, sal_uInt16 nIdx, sal_uInt16* pInsPos )
{
- USHORT nO = rArr.Count(), nM, nU = 0;
+ sal_uInt16 nO = rArr.Count(), nM, nU = 0;
if( nO > 0 )
{
nO--;
@@ -3193,7 +3202,7 @@ void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos )
nM = nU + ( nO - nU ) / 2;
if( *(rArr.GetData() + nM) == nIdx )
{
- OSL_ENSURE( FALSE, "Index already exists. This should never happen." );
+ OSL_ENSURE( sal_False, "Index already exists. This should never happen." );
return;
}
if( *(rArr.GetData() + nM) < nIdx )
@@ -3209,9 +3218,9 @@ void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos )
*pInsPos = nU;
}
-void InsertSort( SvULongs& rArr, ULONG nIdx, USHORT* pInsPos )
+void InsertSort( SvULongs& rArr, sal_uLong nIdx, sal_uInt16* pInsPos )
{
- USHORT nO = rArr.Count(), nM, nU = 0;
+ sal_uInt16 nO = rArr.Count(), nM, nU = 0;
if( nO > 0 )
{
nO--;
@@ -3220,7 +3229,7 @@ void InsertSort( SvULongs& rArr, ULONG nIdx, USHORT* pInsPos )
nM = nU + ( nO - nU ) / 2;
if( *(rArr.GetData() + nM) == nIdx )
{
- OSL_ENSURE( FALSE, "Index ist schon vorhanden, darf nie sein!" );
+ OSL_ENSURE( sal_False, "Index ist schon vorhanden, darf nie sein!" );
return;
}
if( *(rArr.GetData() + nM) < nIdx )
@@ -3243,7 +3252,7 @@ void CheckTable( const SwTable& rTbl )
{
const SwNodes& rNds = rTbl.GetFrmFmt()->GetDoc()->GetNodes();
const SwTableSortBoxes& rSrtArr = rTbl.GetTabSortBoxes();
- for( USHORT n = 0; n < rSrtArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rSrtArr.Count(); ++n )
{
const SwTableBox* pBox = rSrtArr[ n ];
const SwNode* pNd = pBox->GetSttNd();
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index f3d7dbecb785..ca6f3359ab53 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -29,16 +29,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <hintids.hxx>
#include <fmtanchr.hxx>
#include <frmfmt.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docary.hxx>
#include <swundo.hxx> // fuer die UndoIds
#include <pam.hxx>
#include <ndtxt.hxx>
-#include <undobj.hxx>
+#include <UndoCore.hxx>
#include <rolbck.hxx>
#include <redline.hxx>
@@ -46,8 +46,8 @@
SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& rPam )
: SwUndo( nUndoId ), SwUndRng( rPam ),
- pTxtFmtColl( 0 ), pLastNdColl(0), pFrmFmts( 0 ), pFlyUndos(0), pRedlData( 0 ),
- bSttWasTxtNd( TRUE ), nNdDiff( 0 ), pPos( 0 ), nSetPos( 0 )
+ pTxtFmtColl( 0 ), pLastNdColl(0), pFrmFmts( 0 ), pRedlData( 0 ),
+ bSttWasTxtNd( sal_True ), nNdDiff( 0 ), pPos( 0 ), nSetPos( 0 )
{
pHistory = new SwHistory;
SwDoc* pDoc = (SwDoc*)rPam.GetDoc();
@@ -63,8 +63,8 @@ SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& rPam )
if( !nSttCntnt ) // dann werden Flys mitgenommen !!
{
- USHORT nArrLen = pDoc->GetSpzFrmFmts()->Count();
- for( USHORT n = 0; n < nArrLen; ++n )
+ sal_uInt16 nArrLen = pDoc->GetSpzFrmFmts()->Count();
+ for( sal_uInt16 n = 0; n < nArrLen; ++n )
{
SwFrmFmt* pFmt = (*pDoc->GetSpzFrmFmts())[n];
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -90,8 +90,8 @@ SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& rPam )
// setze den Destination-Bereich nach dem Einlesen.
-void SwUndoInserts::SetInsertRange( const SwPaM& rPam, BOOL bScanFlys,
- BOOL bSttIsTxtNd )
+void SwUndoInserts::SetInsertRange( const SwPaM& rPam, sal_Bool bScanFlys,
+ sal_Bool bSttIsTxtNd )
{
const SwPosition* pTmpPos = rPam.End();
nEndNode = pTmpPos->nNode.GetIndex();
@@ -109,7 +109,7 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, BOOL bScanFlys,
if( !bSttIsTxtNd ) // wird eine Tabellenselektion eingefuegt,
{
++nSttNode; // dann stimmt der CopyPam nicht ganz
- bSttWasTxtNd = FALSE;
+ bSttWasTxtNd = sal_False;
}
}
@@ -117,9 +117,8 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, BOOL bScanFlys,
{
// dann alle neuen Flys zusammen sammeln !!
SwDoc* pDoc = (SwDoc*)rPam.GetDoc();
- pFlyUndos = new SwUndos();
- USHORT nFndPos, nArrLen = pDoc->GetSpzFrmFmts()->Count();
- for( USHORT n = 0; n < nArrLen; ++n )
+ sal_uInt16 nFndPos, nArrLen = pDoc->GetSpzFrmFmts()->Count();
+ for( sal_uInt16 n = 0; n < nArrLen; ++n )
{
SwFrmFmt* pFmt = (*pDoc->GetSpzFrmFmts())[n];
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -131,16 +130,15 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, BOOL bScanFlys,
if( !pFrmFmts ||
USHRT_MAX == ( nFndPos = pFrmFmts->GetPos( pFmt ) ) )
{
- SwUndoInsLayFmt* pFlyUndo = new SwUndoInsLayFmt( pFmt,0,0 );
- pFlyUndos->Insert( pFlyUndo, pFlyUndos->Count() );
+ ::boost::shared_ptr<SwUndoInsLayFmt> const pFlyUndo(
+ new SwUndoInsLayFmt(pFmt, 0, 0));
+ m_FlyUndos.push_back(pFlyUndo);
}
else
pFrmFmts->Remove( nFndPos );
}
}
delete pFrmFmts, pFrmFmts = 0;
- if( !pFlyUndos->Count() )
- delete pFlyUndos, pFlyUndos = 0;
}
}
@@ -167,25 +165,21 @@ SwUndoInserts::~SwUndoInserts()
delete pPos;
}
delete pFrmFmts;
- delete pFlyUndos;
delete pRedlData;
}
-void SwUndoInserts::Undo( SwUndoIter& rUndoIter )
+void SwUndoInserts::UndoImpl(::sw::UndoRedoContext & rContext)
{
- SwPaM * pPam = rUndoIter.pAktPam;
- SwDoc* pDoc = pPam->GetDoc();
- SetPaM( rUndoIter );
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ SwDoc *const pDoc = & rContext.GetDoc();
+ SwPaM *const pPam = & AddUndoRedoPaM(rContext);
if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ))
pDoc->DeleteRedline( *pPam, true, USHRT_MAX );
// sind an Point/Mark 2 unterschiedliche TextNodes, dann muss ein
// JoinNext ausgefuehrt werden.
- BOOL bJoinNext = nSttNode != nEndNode &&
+ sal_Bool bJoinNext = nSttNode != nEndNode &&
pPam->GetMark()->nNode.GetNode().GetTxtNode() &&
pPam->GetPoint()->nNode.GetNode().GetTxtNode();
@@ -200,8 +194,8 @@ void SwUndoInserts::Undo( SwUndoIter& rUndoIter )
pLastNdColl = pTxtNd->GetTxtColl();
}
- RemoveIdxFromRange( *pPam, FALSE );
- SetPaM( rUndoIter );
+ RemoveIdxFromRange( *pPam, sal_False );
+ SetPaM(*pPam);
// sind Fussnoten oder CntntFlyFrames im Text ??
nSetPos = pHistory->Count();
@@ -219,11 +213,13 @@ void SwUndoInserts::Undo( SwUndoIter& rUndoIter )
}
}
- if( pFlyUndos )
+ if (m_FlyUndos.size())
{
- ULONG nTmp = pPam->GetPoint()->nNode.GetIndex();
- for( USHORT n = pFlyUndos->Count(); n; )
- (*pFlyUndos)[ --n ]->Undo( rUndoIter );
+ sal_uLong nTmp = pPam->GetPoint()->nNode.GetIndex();
+ for (size_t n = m_FlyUndos.size(); 0 < n; --n)
+ {
+ m_FlyUndos[ n-1 ]->UndoImpl(rContext);
+ }
nNdDiff += nTmp - pPam->GetPoint()->nNode.GetIndex();
}
@@ -269,16 +265,12 @@ void SwUndoInserts::Undo( SwUndoIter& rUndoIter )
pHistory->TmpRollback( pDoc, 0, false );
}
}
-
- pDoc->DoUndo( bUndo );
- if( pPam != rUndoIter.pAktPam )
- delete pPam;
}
-void SwUndoInserts::Redo( SwUndoIter& rUndoIter )
+void SwUndoInserts::RedoImpl(::sw::UndoRedoContext & rContext)
{
// setze noch den Cursor auf den Redo-Bereich
- SwPaM* pPam = rUndoIter.pAktPam;
+ SwPaM *const pPam = & AddUndoRedoPaM(rContext);
SwDoc* pDoc = pPam->GetDoc();
pPam->DeleteMark();
pPam->GetPoint()->nNode = nSttNode - nNdDiff;
@@ -294,10 +286,10 @@ void SwUndoInserts::Redo( SwUndoIter& rUndoIter )
// alte Anfangs-Position fuers Rollback zurueckholen
if( ( nSttNode != nEndNode || nSttCntnt != nEndCntnt ) && pPos )
{
- BOOL bMvBkwrd = MovePtBackward( *pPam );
+ sal_Bool bMvBkwrd = MovePtBackward( *pPam );
// Inhalt wieder einfuegen. (erst pPos abmelden !!)
- ULONG nMvNd = pPos->nNode.GetIndex();
+ sal_uLong nMvNd = pPos->nNode.GetIndex();
xub_StrLen nMvCnt = pPos->nContent.GetIndex();
DELETEZ( pPos );
MoveFromUndoNds( *pDoc, nMvNd, nMvCnt, *pPam->GetMark() );
@@ -322,9 +314,10 @@ void SwUndoInserts::Redo( SwUndoIter& rUndoIter )
pTxtNd->ChgFmtColl( pLastNdColl );
}
- if( pFlyUndos )
- for( USHORT n = pFlyUndos->Count(); n; )
- (*pFlyUndos)[ --n ]->Redo( rUndoIter );
+ for (size_t n = m_FlyUndos.size(); 0 < n; --n)
+ {
+ m_FlyUndos[ n-1 ]->RedoImpl(rContext);
+ }
pHistory->Rollback( pDoc, nSetPos );
@@ -340,21 +333,16 @@ void SwUndoInserts::Redo( SwUndoIter& rUndoIter )
pDoc->SplitRedline( *pPam );
}
-void SwUndoInserts::Repeat( SwUndoIter& rUndoIter )
+void SwUndoInserts::RepeatImpl(::sw::RepeatContext & rContext)
{
- if( GetId() == rUndoIter.GetLastUndoId() )
- return;
-
- SwPaM aPam( *rUndoIter.pAktPam->GetPoint() );
+ SwPaM aPam( rContext.GetDoc().GetNodes().GetEndOfContent() );
SetPaM( aPam );
- aPam.GetDoc()->CopyRange( aPam, *rUndoIter.pAktPam->GetPoint(), false );
-
- rUndoIter.pLastUndoObj = this;
+ SwPaM & rRepeatPaM( rContext.GetRepeatPaM() );
+ aPam.GetDoc()->CopyRange( aPam, *rRepeatPaM.GetPoint(), false );
}
-/* */
-
+//////////////////////////////////////////////////////////////////////////
SwUndoInsDoc::SwUndoInsDoc( const SwPaM& rPam )
: SwUndoInserts( UNDO_INSDOKUMENT, rPam )
diff --git a/sw/source/core/unocore/makefile.mk b/sw/source/core/unocore/makefile.mk
deleted file mode 100644
index 305075fd984f..000000000000
--- a/sw/source/core/unocore/makefile.mk
+++ /dev/null
@@ -1,122 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=unocore
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES= \
- $(SLO)$/swunohelper.obj\
- $(SLO)$/SwXTextDefaults.obj\
- $(SLO)$/unobkm.obj\
- $(SLO)$/unochart.obj\
- $(SLO)$/unoevent.obj\
- $(SLO)$/unocrsrhelper.obj\
- $(SLO)$/unoevtlstnr.obj\
- $(SLO)$/unoftn.obj\
- $(SLO)$/unorefmk.obj\
- $(SLO)$/unosect.obj\
- $(SLO)$/unosett.obj\
- $(SLO)$/unocoll.obj\
- $(SLO)$/unodraw.obj\
- $(SLO)$/unofield.obj\
- $(SLO)$/unoframe.obj\
- $(SLO)$/unoidx.obj\
- $(SLO)$/unoobj.obj\
- $(SLO)$/unoobj2.obj\
- $(SLO)$/unoparagraph.obj\
- $(SLO)$/unoport.obj\
- $(SLO)$/unoredline.obj\
- $(SLO)$/unoredlines.obj\
- $(SLO)$/unosrch.obj\
- $(SLO)$/unostyle.obj\
- $(SLO)$/unotbl.obj \
- $(SLO)$/unoflatpara.obj\
- $(SLO)$/unotextmarkup.obj\
- $(SLO)$/TextCursorHelper.obj \
- $(SLO)$/unotext.obj
-
-.IF "$(GUI)$(COM)$(CPU)" == "WNTMSCI"
-EXCEPTIONSNOOPTFILES =$(SLO)$/unoportenum.obj
-.ELSE
-EXCEPTIONSFILES +=$(SLO)$/unoportenum.obj
-.ENDIF
-
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- unocore.src
-
-SLOFILES = \
- $(SLO)$/swunohelper.obj\
- $(SLO)$/SwXTextDefaults.obj\
- $(SLO)$/unoportenum.obj\
- $(SLO)$/unobkm.obj\
- $(SLO)$/unochart.obj\
- $(SLO)$/unoevent.obj\
- $(SLO)$/unocrsrhelper.obj\
- $(SLO)$/unoevtlstnr.obj\
- $(SLO)$/unoftn.obj\
- $(SLO)$/unorefmk.obj\
- $(SLO)$/unosect.obj\
- $(SLO)$/unosett.obj\
- $(SLO)$/unocoll.obj\
- $(SLO)$/unodraw.obj\
- $(SLO)$/unofield.obj\
- $(SLO)$/unoframe.obj\
- $(SLO)$/unoidx.obj\
- $(SLO)$/unoobj.obj\
- $(SLO)$/unoobj2.obj\
- $(SLO)$/unoparagraph.obj\
- $(SLO)$/unoport.obj\
- $(SLO)$/unoredline.obj\
- $(SLO)$/unoredlines.obj\
- $(SLO)$/unosrch.obj\
- $(SLO)$/unostyle.obj\
- $(SLO)$/unotbl.obj \
- $(SLO)$/unoflatpara.obj\
- $(SLO)$/unotextmarkup.obj\
- $(SLO)$/TextCursorHelper.obj \
- $(SLO)$/unotext.obj\
- $(SLO)$/unomap.obj\
- $(SLO)$/unoprnms.obj\
- $(SLO)$/XMLRangeHelper.obj
-
-
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx
index 054b9b16834c..3f9d4a0f54a5 100644
--- a/sw/source/core/unocore/swunohelper.cxx
+++ b/sw/source/core/unocore/swunohelper.cxx
@@ -64,16 +64,16 @@ sal_Int32 GetEnumAsInt32( const UNO_NMSPC::Any& rVal )
catch( UNO_NMSPC::Exception & )
{
eVal = 0;
- OSL_ENSURE( FALSE, "can't get EnumAsInt32" );
+ OSL_ENSURE( sal_False, "can't get EnumAsInt32" );
}
return eVal;
}
// methods for UCB actions
-BOOL UCB_DeleteFile( const String& rURL )
+sal_Bool UCB_DeleteFile( const String& rURL )
{
- BOOL bRemoved;
+ sal_Bool bRemoved;
try
{
ucbhelper::Content aTempContent( rURL,
@@ -81,19 +81,19 @@ BOOL UCB_DeleteFile( const String& rURL )
aTempContent.executeCommand(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")),
UNO_NMSPC::makeAny( sal_Bool( sal_True ) ) );
- bRemoved = TRUE;
+ bRemoved = sal_True;
}
catch( UNO_NMSPC::Exception& )
{
- bRemoved = FALSE;
- OSL_ENSURE( FALSE, "Exeception from executeCommand( delete )" );
+ bRemoved = sal_False;
+ OSL_ENSURE( sal_False, "Exeception from executeCommand( delete )" );
}
return bRemoved;
}
-BOOL UCB_CopyFile( const String& rURL, const String& rNewURL, BOOL bCopyIsMove )
+sal_Bool UCB_CopyFile( const String& rURL, const String& rNewURL, sal_Bool bCopyIsMove )
{
- BOOL bCopyCompleted = TRUE;
+ sal_Bool bCopyCompleted = sal_True;
try
{
INetURLObject aURL( rNewURL );
@@ -117,15 +117,15 @@ BOOL UCB_CopyFile( const String& rURL, const String& rNewURL, BOOL bCopyIsMove )
}
catch( UNO_NMSPC::Exception& )
{
- OSL_ENSURE( FALSE, "Exeception from executeCommand( transfer )" );
- bCopyCompleted = FALSE;
+ OSL_ENSURE( sal_False, "Exeception from executeCommand( transfer )" );
+ bCopyCompleted = sal_False;
}
return bCopyCompleted;
}
-BOOL UCB_IsCaseSensitiveFileName( const String& rURL )
+sal_Bool UCB_IsCaseSensitiveFileName( const String& rURL )
{
- BOOL bCaseSensitive;
+ sal_Bool bCaseSensitive;
try
{
STAR_REFERENCE( lang::XMultiServiceFactory ) xMSF =
@@ -150,15 +150,15 @@ BOOL UCB_IsCaseSensitiveFileName( const String& rURL )
}
catch( UNO_NMSPC::Exception& )
{
- bCaseSensitive = FALSE;
- OSL_ENSURE( FALSE, "Exeception from compareContentIds()" );
+ bCaseSensitive = sal_False;
+ OSL_ENSURE( sal_False, "Exeception from compareContentIds()" );
}
return bCaseSensitive;
}
-BOOL UCB_IsReadOnlyFileName( const String& rURL )
+sal_Bool UCB_IsReadOnlyFileName( const String& rURL )
{
- BOOL bIsReadOnly = FALSE;
+ sal_Bool bIsReadOnly = sal_False;
try
{
ucbhelper::Content aCnt( rURL, STAR_REFERENCE( ucb::XCommandEnvironment )());
@@ -169,14 +169,14 @@ BOOL UCB_IsReadOnlyFileName( const String& rURL )
}
catch( UNO_NMSPC::Exception& )
{
- bIsReadOnly = FALSE;
+ bIsReadOnly = sal_False;
}
return bIsReadOnly;
}
-BOOL UCB_IsFile( const String& rURL )
+sal_Bool UCB_IsFile( const String& rURL )
{
- BOOL bExists = FALSE;
+ sal_Bool bExists = sal_False;
try
{
::ucbhelper::Content aContent( rURL, STAR_REFERENCE( ucb::XCommandEnvironment )() );
@@ -188,9 +188,9 @@ BOOL UCB_IsFile( const String& rURL )
return bExists;
}
-BOOL UCB_IsDirectory( const String& rURL )
+sal_Bool UCB_IsDirectory( const String& rURL )
{
- BOOL bExists = FALSE;
+ sal_Bool bExists = sal_False;
try
{
::ucbhelper::Content aContent( rURL, STAR_REFERENCE( ucb::XCommandEnvironment )() );
@@ -207,17 +207,17 @@ BOOL UCB_IsDirectory( const String& rURL )
// pDateTime != 0 -> returns also the modified date/time of
// the files in a SvPtrarr -->
// !! objects must be deleted from the caller!!
-BOOL UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList,
+sal_Bool UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList,
const String* pExtension,
SvPtrarr* pDateTimeList )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
try
{
ucbhelper::Content aCnt( rURL, STAR_REFERENCE( ucb::XCommandEnvironment )());
STAR_REFERENCE( sdbc::XResultSet ) xResultSet;
- USHORT nSeqSize = pDateTimeList ? 2 : 1;
+ sal_uInt16 nSeqSize = pDateTimeList ? 2 : 1;
UNO_NMSPC::Sequence < rtl::OUString > aProps( nSeqSize );
rtl::OUString* pProps = aProps.getArray();
pProps[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title"));
@@ -270,7 +270,7 @@ BOOL UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList,
} while( xResultSet->next() );
}
- bOk = TRUE;
+ bOk = sal_True;
}
catch( UNO_NMSPC::Exception& )
{
@@ -281,7 +281,7 @@ BOOL UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList,
catch( UNO_NMSPC::Exception& )
{
DBG_ERRORFILE( "Exception caught!" );
- bOk = FALSE;
+ bOk = sal_False;
}
return bOk;
}
diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx
index 500b2b9463d4..f243d93fde2d 100644
--- a/sw/source/core/unocore/unobkm.cxx
+++ b/sw/source/core/unocore/unobkm.cxx
@@ -41,10 +41,11 @@
#include <IMark.hxx>
#include <crossrefbookmark.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docary.hxx>
#include <swundo.hxx>
#include <comcore.hrc>
-#include <undobj.hxx>
+#include <SwRewriter.hxx>
#include <docsh.hxx>
#include <xmloff/odffields.hxx>
@@ -379,9 +380,11 @@ throw (uno::RuntimeException)
aRewriter.AddRule(UNDO_ARG2, SW_RES(STR_YIELDS));
aRewriter.AddRule(UNDO_ARG3, lcl_QuoteName(rName));
- m_pImpl->m_pDoc->StartUndo(UNDO_BOOKMARK_RENAME, &aRewriter);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().StartUndo(
+ UNDO_BOOKMARK_RENAME, &aRewriter);
pMarkAccess->renameMark(m_pImpl->m_pRegisteredBookmark, rName);
- m_pImpl->m_pDoc->EndUndo(UNDO_BOOKMARK_RENAME, NULL);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().EndUndo(
+ UNDO_BOOKMARK_RENAME, &aRewriter);
}
OUString SAL_CALL
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 194274c575f3..a727886c5a27 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -153,7 +153,7 @@ void SwChartLockController_Helper::LockUnlockAllCharts( sal_Bool bLock )
return;
const SwFrmFmts& rTblFmts = *pDoc->GetTblFrmFmts();
- for( USHORT n = 0; n < rTblFmts.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rTblFmts.Count(); ++n )
{
SwTable* pTmpTbl;
const SwTableNode* pTblNd;
@@ -650,7 +650,7 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData
String aChartTableName;
const SwNodes& rNodes = pDoc->GetNodes();
- for( ULONG nN = rNodes.Count(); nN--; )
+ for( sal_uLong nN = rNodes.Count(); nN--; )
{
SwNodePtr pNode = rNodes[nN];
if( !pNode )
@@ -1688,12 +1688,12 @@ void SwChartDataProvider::DisposeAllDataSequences( const SwTable *pTable )
void SwChartDataProvider::AddRowCols(
const SwTable &rTable,
const SwSelBoxes& rBoxes,
- USHORT nLines, BOOL bBehind )
+ sal_uInt16 nLines, sal_Bool bBehind )
{
if (rTable.IsTblComplex())
return;
- const USHORT nBoxes = rBoxes.Count();
+ const sal_uInt16 nBoxes = rBoxes.Count();
if (nBoxes < 1 || nLines < 1)
return;
@@ -1785,7 +1785,7 @@ rtl::OUString SAL_CALL SwChartDataProvider::convertRangeToXML( const rtl::OUStri
// "Table1.A1:A4;Table1.C2:C5" the same table must be used in all ranges!
xub_StrLen nNumRanges = aRangeRepresentation.GetTokenCount( ';' );
SwTable* pFirstFoundTable = 0; // to check that only one table will be used
- for (USHORT i = 0; i < nNumRanges; ++i)
+ for (sal_uInt16 i = 0; i < nNumRanges; ++i)
{
String aRange( aRangeRepresentation.GetToken(i, ';') );
SwFrmFmt *pTblFmt = 0; // pointer to table format
@@ -1853,7 +1853,7 @@ rtl::OUString SAL_CALL SwChartDataProvider::convertRangeFromXML( const rtl::OUSt
// "Table1.$A$1:.$A$4 Table1.$C$2:.$C$5" the same table must be used in all ranges!
xub_StrLen nNumRanges = aXMLRange.GetTokenCount( ' ' );
rtl::OUString aFirstFoundTable; // to check that only one table will be used
- for (USHORT i = 0; i < nNumRanges; ++i)
+ for (sal_uInt16 i = 0; i < nNumRanges; ++i)
{
String aRange( aXMLRange.GetToken(i, ' ') );
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index c93fffca885c..5b96e7247070 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -1095,12 +1095,12 @@ SwXFrameEnumeration<T>::SwXFrameEnumeration(const SwDoc* const pDoc)
return;
// --> OD 2009-09-10 #i104937#
// const SwFrmFmt* const pFmtsEnd = (*pFmts)[pFmts->Count()];
- const USHORT nSize = pFmts->Count();
+ const sal_uInt16 nSize = pFmts->Count();
// <--
::std::insert_iterator<frmcontainer_t> pInserter = ::std::insert_iterator<frmcontainer_t>(m_aFrames, m_aFrames.begin());
// --> OD 2009-09-10 #i104937#
SwFrmFmt* pFmt( 0 );
- for( USHORT i = 0; i < nSize; ++i )
+ for( sal_uInt16 i = 0; i < nSize; ++i )
// for(SwFrmFmt* pFmt = (*pFmts)[0]; pFmt < pFmtsEnd; ++pFmt)
// <--
{
@@ -1742,7 +1742,7 @@ uno::Any SwXNumberingRulesCollection::getByIndex(sal_Int32 nIndex)
uno::Reference< XIndexReplace > xRef;
if ( nIndex < GetDoc()->GetNumRuleTbl().Count() )
{
- xRef = new SwXNumberingRules( *GetDoc()->GetNumRuleTbl()[ static_cast< USHORT >(nIndex) ] );
+ xRef = new SwXNumberingRules( *GetDoc()->GetNumRuleTbl()[ static_cast< sal_uInt16 >(nIndex) ] );
aRet.setValue(&xRef, ::getCppuType((uno::Reference<XIndexReplace>*)0));
}
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index b6349ee6f1fd..ad9c05593c95 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -44,6 +44,7 @@
#include <unoframe.hxx>
#include <unocrsr.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <IDocumentRedlineAccess.hxx>
#include <fmtftn.hxx>
#include <fmtpdsc.hxx>
@@ -257,7 +258,7 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
*pAny <<= (sal_Int16)(pTxtNd->GetActualListLevel());
else if(rEntry.nWID == FN_UNO_IS_NUMBER)
{
- BOOL bIsNumber = pTxtNd->IsCountedInList();
+ sal_Bool bIsNumber = pTxtNd->IsCountedInList();
pAny->setValue(&bIsNumber, ::getBooleanCppuType());
}
// #i91601#
@@ -268,7 +269,7 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
}
else /*if(rEntry.nWID == UNO_NAME_PARA_IS_NUMBERING_RESTART)*/
{
- BOOL bIsRestart = pTxtNd->IsListRestart();
+ sal_Bool bIsRestart = pTxtNd->IsListRestart();
pAny->setValue(&bIsRestart, ::getBooleanCppuType());
}
}
@@ -496,26 +497,26 @@ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
{
SwTxtNode* pTxtNode;
- if((pTxtNode = (SwTxtNode*)rPam.GetNode( TRUE )) == rPam.GetNode(FALSE) &&
+ if((pTxtNode = (SwTxtNode*)rPam.GetNode( sal_True )) == rPam.GetNode(sal_False) &&
pTxtNode->GetpSwpHints())
{
- USHORT nPaMStart = rPam.GetPoint()->nContent.GetIndex();
- USHORT nPaMEnd = rPam.GetMark() ? rPam.GetMark()->nContent.GetIndex() : nPaMStart;
+ sal_uInt16 nPaMStart = rPam.GetPoint()->nContent.GetIndex();
+ sal_uInt16 nPaMEnd = rPam.GetMark() ? rPam.GetMark()->nContent.GetIndex() : nPaMStart;
if(nPaMStart > nPaMEnd)
{
- USHORT nTmp = nPaMStart;
+ sal_uInt16 nTmp = nPaMStart;
nPaMStart = nPaMEnd;
nPaMEnd = nTmp;
}
Sequence< ::rtl::OUString> aCharStyles;
SwpHints* pHints = pTxtNode->GetpSwpHints();
- for(USHORT nAttr = 0; nAttr < pHints->GetStartCount(); nAttr++ )
+ for(sal_uInt16 nAttr = 0; nAttr < pHints->GetStartCount(); nAttr++ )
{
SwTxtAttr* pAttr = pHints->GetStart( nAttr );
if(pAttr->Which() != RES_TXTATR_CHARFMT)
continue;
- USHORT nAttrStart = *pAttr->GetStart();
- USHORT nAttrEnd = *pAttr->GetEnd();
+ sal_uInt16 nAttrStart = *pAttr->GetStart();
+ sal_uInt16 nAttrEnd = *pAttr->GetEnd();
//check if the attribute touches the selection
if( ( nAttrEnd > nPaMStart && nAttrStart < nPaMEnd ) ||
( !nAttrStart && !nAttrEnd && !nPaMStart && !nPaMEnd ) )
@@ -666,7 +667,7 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
if( rPam.GetNext() != &rPam ) // Multiple selection?
{
- pDoc->StartUndo( UNDO_START, NULL );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( rPam );
SwPaM aPam( *rPam.GetPoint() );
for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
@@ -674,7 +675,7 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam)
// no start of a new list
pDoc->SetNumRule( aRangeArr.SetPam( n, aPam ), aRule, false );
}
- pDoc->EndUndo( UNDO_END, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
}
else
{
@@ -751,12 +752,12 @@ void resetCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry, SwPaM& rPa
if( rPam.GetNext() != &rPam ) // Multiple selection?
{
- pDoc->StartUndo( UNDO_START, NULL );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( rPam );
SwPaM aPam( *rPam.GetPoint() );
for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
pDoc->SetNodeNumStart( *aRangeArr.SetPam( n, aPam ).GetPoint(), 1 );
- pDoc->EndUndo( UNDO_END, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
}
else
pDoc->SetNodeNumStart( *rPam.GetPoint(), 0 );
@@ -879,6 +880,7 @@ void InsertFile(SwUnoCrsr* pUnoCrsr,
if( !pMed )
return;
+ // this sourcecode is not responsible for the lifetime of the shell, SfxObjectShellLock should not be used
SfxObjectShellRef aRef( pDocSh );
pDocSh->RegisterTransfer( *pMed );
@@ -940,6 +942,8 @@ sal_Bool DocInsertStringSplitCR(
IDocumentContentOperations::INS_EMPTYEXPAND)
: IDocumentContentOperations::INS_EMPTYEXPAND;
+ // grouping done in InsertString is intended for typing, not API calls
+ ::sw::GroupUndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo());
OUString aTxt;
xub_StrLen nStartIdx = 0;
SwTxtNode* const pTxtNd =
@@ -1003,7 +1007,7 @@ void makeRedline( SwPaM& rPaM,
comphelper::SequenceAsHashMap aPropMap( rRedlineProperties );
uno::Any aAuthorValue;
aAuthorValue = aPropMap.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RedlineAuthor")), aAuthorValue);
- USHORT nAuthor = 0;
+ sal_uInt16 nAuthor = 0;
::rtl::OUString sAuthor;
if( aAuthorValue >>= sAuthor )
nAuthor = pRedlineAccess->InsertRedlineAuthor(sAuthor);
@@ -1045,7 +1049,7 @@ SwAnyMapHelper::~SwAnyMapHelper()
}
}
-void SwAnyMapHelper::SetValue( USHORT nWhichId, USHORT nMemberId, const uno::Any& rAny )
+void SwAnyMapHelper::SetValue( sal_uInt16 nWhichId, sal_uInt16 nMemberId, const uno::Any& rAny )
{
sal_uInt32 nKey = (nWhichId << 16) + nMemberId;
AnyMapHelper_t::iterator aIt = find( nKey );
@@ -1057,7 +1061,7 @@ void SwAnyMapHelper::SetValue( USHORT nWhichId, USHORT nMemberId, const uno::Any
insert( value_type(nKey, new uno::Any( rAny )) );
}
-bool SwAnyMapHelper::FillValue( USHORT nWhichId, USHORT nMemberId, const uno::Any*& pAny )
+bool SwAnyMapHelper::FillValue( sal_uInt16 nWhichId, sal_uInt16 nMemberId, const uno::Any*& pAny )
{
bool bRet = false;
sal_uInt32 nKey = (nWhichId << 16) + nMemberId;
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 2f2b33b2b13d..aaa58b411b14 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -43,6 +43,7 @@
#include <svx/svditer.hxx>
#include <swunohelper.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <fmtcntnt.hxx>
#include <fmtflcnt.hxx>
#include <txtatr.hxx>
@@ -127,7 +128,7 @@ public:
pLRSpace(0),
bOpaque(sal_False),
// #i26791#
- mpFollowTextFlow( new SwFmtFollowTextFlow( FALSE ) ),
+ mpFollowTextFlow( new SwFmtFollowTextFlow( sal_False ) ),
// #i28701# #i35017#
pWrapInfluenceOnObjPos( new SwFmtWrapInfluenceOnObjPos(
text::WrapInfluenceOnPosition::ONCE_CONCURRENT ) ),
@@ -218,7 +219,7 @@ public:
SwFmtFollowTextFlow* GetFollowTextFlow( sal_Bool _bCreate = sal_False )
{
if ( _bCreate && !mpFollowTextFlow )
- mpFollowTextFlow = new SwFmtFollowTextFlow( FALSE );
+ mpFollowTextFlow = new SwFmtFollowTextFlow( sal_False );
return mpFollowTextFlow;
}
void RemoveFollowTextFlow()
@@ -414,7 +415,7 @@ namespace
SwXShapesEnumeration(SwXDrawPage* const pDrawPage);
//XEnumeration
- virtual BOOL SAL_CALL hasMoreElements(void) throw(uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasMoreElements(void) throw(uno::RuntimeException);
virtual uno::Any SAL_CALL nextElement(void) throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
//XServiceInfo
@@ -437,7 +438,7 @@ SwXShapesEnumeration::SwXShapesEnumeration(SwXDrawPage* const pDrawPage)
}
}
-BOOL SwXShapesEnumeration::hasMoreElements(void) throw(uno::RuntimeException)
+sal_Bool SwXShapesEnumeration::hasMoreElements(void) throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
return !m_aShapes.empty();
@@ -803,7 +804,7 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference<
if( !bFlyInCnt )
{
UnoActionContext aContext(pDoc);
- pDoc->StartUndo( UNDO_START, NULL );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
SwDrawContact* pContact = pDoc->GroupSelection( *pPage->GetDrawView() );
pDoc->ChgAnchor(
@@ -817,7 +818,7 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference<
uno::Reference< uno::XInterface > xInt = pPage->GetInterface( pContact->GetMaster() );
xRet = uno::Reference< drawing::XShapeGroup >(xInt, uno::UNO_QUERY);
}
- pDoc->EndUndo( UNDO_END, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
}
}
pPage->RemovePageView();
@@ -838,13 +839,13 @@ void SwXDrawPage::ungroup(const uno::Reference< drawing::XShapeGroup > & xShapeG
{
pPage->PreUnGroup(xShapeGroup);
UnoActionContext aContext(pDoc);
- pDoc->StartUndo( UNDO_START, NULL );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
pDoc->UnGroupSelection( *pPage->GetDrawView() );
pDoc->ChgAnchor( pPage->GetDrawView()->GetMarkedObjectList(),
FLY_AT_PARA/*int eAnchorId*/,
sal_True, sal_False );
- pDoc->EndUndo( UNDO_END, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
}
pPage->RemovePageView();
}
@@ -1751,7 +1752,7 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
else if(pFmt)
{
const SwAttrSet& rSet = pFmt->GetAttrSet();
- SfxItemState eItemState = rSet.GetItemState(pEntry->nWID, FALSE);
+ SfxItemState eItemState = rSet.GetItemState(pEntry->nWID, sal_False);
if(SFX_ITEM_SET == eItemState)
pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
diff --git a/sw/source/core/unocore/unoevent.cxx b/sw/source/core/unocore/unoevent.cxx
index 51897bea4d2d..c58728e40b68 100644
--- a/sw/source/core/unocore/unoevent.cxx
+++ b/sw/source/core/unocore/unoevent.cxx
@@ -161,7 +161,7 @@ void SwHyperlinkEventDescriptor::copyMacrosFromINetFmt(
{
for(sal_Int16 i = 0; mpSupportedMacroItems[i].mnEvent != 0; i++)
{
- USHORT nEvent = mpSupportedMacroItems[i].mnEvent;
+ sal_uInt16 nEvent = mpSupportedMacroItems[i].mnEvent;
const SvxMacro* aMacro = aFmt.GetMacro(nEvent);
if (NULL != aMacro)
replaceByName(nEvent, *aMacro);
@@ -173,7 +173,7 @@ void SwHyperlinkEventDescriptor::copyMacrosIntoINetFmt(
{
for(sal_Int16 i = 0; mpSupportedMacroItems[i].mnEvent != 0; i++)
{
- USHORT nEvent = mpSupportedMacroItems[i].mnEvent;
+ sal_uInt16 nEvent = mpSupportedMacroItems[i].mnEvent;
if (hasByName(nEvent))
{
SvxMacro aMacro(sEmpty, sEmpty);
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 172457c1fde7..34d473ee4199 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -128,8 +128,8 @@ static const sal_uInt16 aDocInfoSubTypeFromService[] =
struct ServiceIdResId
{
- USHORT nResId;
- USHORT nServiceId;
+ sal_uInt16 nResId;
+ sal_uInt16 nServiceId;
};
static const ServiceIdResId aServiceToRes[] =
@@ -214,7 +214,7 @@ sal_uInt16 lcl_GetServiceForField( const SwField& rFld )
case RES_DOCINFOFLD:
{
- USHORT nSubType = rFld.GetSubType();
+ sal_uInt16 nSubType = rFld.GetSubType();
switch( (nSubType & 0xff))
{
case DI_CHANGE:
@@ -281,7 +281,7 @@ sal_uInt16 lcl_GetServiceForField( const SwField& rFld )
return nSrvId;
}
-sal_uInt16 lcl_GetPropMapIdForFieldType( USHORT nWhich )
+sal_uInt16 lcl_GetPropMapIdForFieldType( sal_uInt16 nWhich )
{
sal_uInt16 nId;
switch( nWhich )
@@ -296,9 +296,9 @@ sal_uInt16 lcl_GetPropMapIdForFieldType( USHORT nWhich )
return nId;
}
-USHORT GetFieldTypeMId( const OUString& rProperty, const SwFieldType& rTyp )
+sal_uInt16 GetFieldTypeMId( const OUString& rProperty, const SwFieldType& rTyp )
{
- USHORT nId = lcl_GetPropMapIdForFieldType( rTyp.Which() );
+ sal_uInt16 nId = lcl_GetPropMapIdForFieldType( rTyp.Which() );
const SfxItemPropertySet* pSet = aSwMapProvider.GetPropertySet( nId );
if( !pSet )
nId = USHRT_MAX;
@@ -310,9 +310,9 @@ USHORT GetFieldTypeMId( const OUString& rProperty, const SwFieldType& rTyp )
return nId;
}
-USHORT lcl_GetPropertyMapOfService( USHORT nServiceId )
+sal_uInt16 lcl_GetPropertyMapOfService( sal_uInt16 nServiceId )
{
- USHORT nRet;
+ sal_uInt16 nRet;
switch ( nServiceId)
{
case SW_SERVICE_FIELDTYPE_DATETIME: nRet = PROPERTY_MAP_FLDTYP_DATETIME; break;
@@ -479,7 +479,7 @@ SwXFieldMaster::SwXFieldMaster(SwDoc* pDoc, sal_uInt16 nResId) :
m_bIsDescriptor(sal_True),
fParam1(0.),
nParam1(-1),
- bParam1(FALSE),
+ bParam1(sal_False),
nParam2(0)
{
pDoc->GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
@@ -493,7 +493,7 @@ SwXFieldMaster::SwXFieldMaster(SwFieldType& rType, SwDoc* pDoc) :
m_bIsDescriptor(sal_False),
fParam1(0.),
nParam1(-1),
- bParam1(FALSE)
+ bParam1(sal_False)
{
}
@@ -551,7 +551,7 @@ void SwXFieldMaster::setPropertyValue( const OUString& rPropertyName,
// We just call PutValue (empty string is allowed).
// Thus the last property set will be used as Data Source.
- USHORT nMId = GetFieldTypeMId( rPropertyName, *pType );
+ sal_uInt16 nMId = GetFieldTypeMId( rPropertyName, *pType );
if( USHRT_MAX != nMId )
pType->PutValue( rValue, nMId );
else
@@ -594,7 +594,7 @@ void SwXFieldMaster::setPropertyValue( const OUString& rPropertyName,
case RES_DDEFLD :
{
SwDDEFieldType aType(sTypeName, sParam1,
- sal::static_int_cast< USHORT >(bParam1 ? sfx2::LINKUPDATE_ALWAYS : sfx2::LINKUPDATE_ONCALL));
+ sal::static_int_cast< sal_uInt16 >(bParam1 ? sfx2::LINKUPDATE_ALWAYS : sfx2::LINKUPDATE_ONCALL));
pType2 = m_pDoc->InsertFldType(aType);
}
break;
@@ -671,7 +671,7 @@ void SwXFieldMaster::setPropertyValue( const OUString& rPropertyName,
break;
case RES_DDEFLD:
{
- USHORT nPart = rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DDE_COMMAND_TYPE)) ? 0 :
+ sal_uInt16 nPart = rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DDE_COMMAND_TYPE)) ? 0 :
rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DDE_COMMAND_FILE)) ? 1 :
rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DDE_COMMAND_ELEMENT)) ? 2 :
rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_AUTOMATIC_UPDATE)) ? 3 : USHRT_MAX;
@@ -760,7 +760,7 @@ uno::Any SwXFieldMaster::getPropertyValue(const OUString& rPropertyName)
}
uno::Sequence<uno::Reference <text::XDependentTextField> > aRetSeq(aFldArr.Count());
uno::Reference<text::XDependentTextField>* pRetSeq = aRetSeq.getArray();
- for(USHORT i = 0; i < aFldArr.Count(); i++)
+ for(sal_uInt16 i = 0; i < aFldArr.Count(); i++)
{
pFld = aFldArr.GetObject(i);
SwXTextField * pInsert = CreateSwXTextField(*GetDoc(), *pFld);
@@ -772,7 +772,7 @@ uno::Any SwXFieldMaster::getPropertyValue(const OUString& rPropertyName)
else if(pType)
{
//TODO: Properties fuer die uebrigen Feldtypen einbauen
- USHORT nMId = GetFieldTypeMId( rPropertyName, *pType );
+ sal_uInt16 nMId = GetFieldTypeMId( rPropertyName, *pType );
if( USHRT_MAX != nMId )
{
pType->QueryValue( aRet, nMId );
@@ -788,7 +788,7 @@ uno::Any SwXFieldMaster::getPropertyValue(const OUString& rPropertyName)
// a non-empty string.
INetURLObject aObj;
aObj.SetURL( aDataSource );
- BOOL bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
+ sal_Bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
if (bIsURL && rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DATA_BASE_URL)))
pStr = &aDataSource; // DataBaseURL
else if (!bIsURL && rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DATA_BASE_NAME)))
@@ -838,7 +838,7 @@ uno::Any SwXFieldMaster::getPropertyValue(const OUString& rPropertyName)
// a non-empty string.
INetURLObject aObj;
aObj.SetURL( sParam5 ); // SetSmartURL
- BOOL bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
+ sal_Bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
if (bIsURL && rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DATA_BASE_URL)))
pStr = &sParam5; // DataBaseURL
else if ( rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DATA_BASE_NAME)))
@@ -857,7 +857,7 @@ uno::Any SwXFieldMaster::getPropertyValue(const OUString& rPropertyName)
break;
case RES_DDEFLD:
{
- USHORT nPart = rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DDE_COMMAND_TYPE)) ? 0 :
+ sal_uInt16 nPart = rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DDE_COMMAND_TYPE)) ? 0 :
rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DDE_COMMAND_FILE)) ? 1 :
rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DDE_COMMAND_ELEMENT)) ? 2 :
rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_AUTOMATIC_UPDATE)) ? 3 : USHRT_MAX;
@@ -1179,13 +1179,16 @@ uno::Reference< beans::XPropertySet > SwXTextField::getTextFieldMaster(void) th
OUString SwXTextField::getPresentation(sal_Bool bShowCommand) throw( uno::RuntimeException )
{
SolarMutexGuard aGuard;
- OUString sRet;
- const SwField* pField = GetField();
- if(pField)
- sRet = pField->GetCntnt(bShowCommand);
- else
+
+ SwField const*const pField = GetField();
+ if (!pField)
+ {
throw uno::RuntimeException();
- return sRet;
+ }
+ ::rtl::OUString const ret( (bShowCommand)
+ ? pField->GetFieldName()
+ : pField->ExpandField(true) );
+ return ret;
}
void SwXTextField::attachToRange(
@@ -1318,7 +1321,7 @@ void SwXTextField::attachToRange(
pFld = new SwHiddenTxtField(((SwHiddenTxtFieldType*)pFldType),
m_pProps->sPar1,
m_pProps->sPar2, m_pProps->sPar3,
- static_cast< USHORT >(SW_SERVICE_FIELDTYPE_HIDDEN_TEXT == m_nServiceId ?
+ static_cast< sal_uInt16 >(SW_SERVICE_FIELDTYPE_HIDDEN_TEXT == m_nServiceId ?
TYP_HIDDENTXTFLD : TYP_CONDTXTFLD));
((SwHiddenTxtField*)pFld)->SetValue(m_pProps->bBool1);
uno::Any aVal; aVal <<= (OUString)m_pProps->sPar4;
@@ -1415,7 +1418,7 @@ void SwXTextField::attachToRange(
SwFieldType* pFldType = pDoc->GetFldType(RES_USERFLD, m_sTypeName, sal_True);
if(!pFldType)
throw uno::RuntimeException();
- USHORT nUserSubType = m_pProps->bBool1 ? nsSwExtendedSubType::SUB_INVISIBLE : 0;
+ sal_uInt16 nUserSubType = m_pProps->bBool1 ? nsSwExtendedSubType::SUB_INVISIBLE : 0;
if(m_pProps->bBool2)
nUserSubType |= nsSwExtendedSubType::SUB_CMD;
if(m_pProps->bFormatIsDefault &&
@@ -1615,7 +1618,7 @@ void SwXTextField::attachToRange(
SwFieldType* pFldType = pDoc->GetFldType(RES_INPUTFLD, m_sTypeName, sal_True);
if(!pFldType)
throw uno::RuntimeException();
- USHORT nInpSubType = sal::static_int_cast< USHORT >(SW_SERVICE_FIELDTYPE_INPUT_USER == m_nServiceId ? INP_USR : INP_TXT);
+ sal_uInt16 nInpSubType = sal::static_int_cast< sal_uInt16 >(SW_SERVICE_FIELDTYPE_INPUT_USER == m_nServiceId ? INP_USR : INP_TXT);
SwInputField * pTxtField =
new SwInputField((SwInputFieldType*)pFldType,
m_pProps->sPar1, m_pProps->sPar2,
@@ -1700,7 +1703,7 @@ void SwXTextField::attachToRange(
{
// create field
- USHORT nType = nsSwGetSetExpType::GSE_FORMULA;
+ sal_uInt16 nType = nsSwGetSetExpType::GSE_FORMULA;
if(m_pProps->bBool1)
{
nType |= nsSwExtendedSubType::SUB_CMD;
@@ -1915,7 +1918,7 @@ void SwXTextField::setPropertyValue(const OUString& rPropertyName, const uno::An
else if(m_pProps)
{
String* pStr = 0;
- BOOL* pBool = 0;
+ sal_Bool* pBool = 0;
switch(pEntry->nWID)
{
case FIELD_PROP_PAR1:
@@ -2431,7 +2434,7 @@ sal_uInt16 lcl_GetIdByName( String& rName, String& rTypeName )
else if(rTypeName.EqualsAscii("DataBase"))
{
rName.Erase( 0, RTL_CONSTASCII_LENGTH( "DataBase." ));
- USHORT nDotCount = rName.GetTokenCount('.');
+ sal_uInt16 nDotCount = rName.GetTokenCount('.');
if( 2 <= nDotCount )
{
// #i51815#
@@ -2722,7 +2725,7 @@ SwXFieldEnumeration::SwXFieldEnumeration(SwDoc* pDc) :
const SwTxtFld *pTxtFld = pCurFldFmt->GetTxtFld();
// skip fields that are currently not in the document
// e.g. fields in undo or redo array
- BOOL bSkip = !pTxtFld ||
+ sal_Bool bSkip = !pTxtFld ||
!pTxtFld->GetpTxtNode()->GetNodes().IsDocNodes();
if (!bSkip)
pItems[ nFillPos++ ] = new SwXTextField(*pCurFldFmt, pDoc);
diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx
index 7a311aaf114a..97e92598e38a 100644
--- a/sw/source/core/unocore/unoflatpara.cxx
+++ b/sw/source/core/unocore/unoflatpara.cxx
@@ -185,7 +185,7 @@ lang::Locale SAL_CALL SwXFlatParagraph::getLanguageOfText(::sal_Int32 nPos, ::sa
if (!mpTxtNode)
return SvxCreateLocale( LANGUAGE_NONE );
- const lang::Locale aLocale( SW_BREAKITER()->GetLocale( mpTxtNode->GetLang( static_cast<USHORT>(nPos), static_cast<USHORT>(nLen) ) ) );
+ const lang::Locale aLocale( SW_BREAKITER()->GetLocale( mpTxtNode->GetLang( static_cast<sal_uInt16>(nPos), static_cast<sal_uInt16>(nLen) ) ) );
return aLocale;
}
@@ -198,7 +198,7 @@ lang::Locale SAL_CALL SwXFlatParagraph::getPrimaryLanguageOfText(::sal_Int32 nPo
if (!mpTxtNode)
return SvxCreateLocale( LANGUAGE_NONE );
- const lang::Locale aLocale( SW_BREAKITER()->GetLocale( mpTxtNode->GetLang( static_cast<USHORT>(nPos), static_cast<USHORT>(nLen) ) ) );
+ const lang::Locale aLocale( SW_BREAKITER()->GetLocale( mpTxtNode->GetLang( static_cast<sal_uInt16>(nPos), static_cast<sal_uInt16>(nLen) ) ) );
return aLocale;
}
@@ -212,7 +212,7 @@ void SAL_CALL SwXFlatParagraph::changeText(::sal_Int32 nPos, ::sal_Int32 nLen, c
SwTxtNode* pOldTxtNode = mpTxtNode;
- SwPaM aPaM( *mpTxtNode, static_cast<USHORT>(nPos), *mpTxtNode, static_cast<USHORT>(nPos + nLen) );
+ SwPaM aPaM( *mpTxtNode, static_cast<sal_uInt16>(nPos), *mpTxtNode, static_cast<sal_uInt16>(nPos + nLen) );
UnoActionContext aAction( mpTxtNode->GetDoc() );
@@ -222,7 +222,7 @@ void SAL_CALL SwXFlatParagraph::changeText(::sal_Int32 nPos, ::sal_Int32 nLen, c
uno::Reference< beans::XPropertySet > xPropSet( xRange, uno::UNO_QUERY );
if ( xPropSet.is() )
{
- for ( USHORT i = 0; i < aAttributes.getLength(); ++i )
+ for ( sal_uInt16 i = 0; i < aAttributes.getLength(); ++i )
xPropSet->setPropertyValue( aAttributes[i].Name, aAttributes[i].Value );
}
@@ -242,7 +242,7 @@ void SAL_CALL SwXFlatParagraph::changeAttributes(::sal_Int32 nPos, ::sal_Int32 n
if ( !mpTxtNode )
return;
- SwPaM aPaM( *mpTxtNode, static_cast<USHORT>(nPos), *mpTxtNode, static_cast<USHORT>(nPos + nLen) );
+ SwPaM aPaM( *mpTxtNode, static_cast<sal_uInt16>(nPos), *mpTxtNode, static_cast<sal_uInt16>(nPos + nLen) );
UnoActionContext aAction( mpTxtNode->GetDoc() );
@@ -252,7 +252,7 @@ void SAL_CALL SwXFlatParagraph::changeAttributes(::sal_Int32 nPos, ::sal_Int32 n
uno::Reference< beans::XPropertySet > xPropSet( xRange, uno::UNO_QUERY );
if ( xPropSet.is() )
{
- for ( USHORT i = 0; i < aAttributes.getLength(); ++i )
+ for ( sal_uInt16 i = 0; i < aAttributes.getLength(); ++i )
xPropSet->setPropertyValue( aAttributes[i].Name, aAttributes[i].Value );
}
@@ -395,7 +395,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getNextPara()
else // non-automatic checking
{
const SwNodes& rNodes = mpDoc->GetNodes();
- const ULONG nMaxNodes = rNodes.Count();
+ const sal_uLong nMaxNodes = rNodes.Count();
while ( mnCurrentNode < mnEndNode && mnCurrentNode < nMaxNodes )
{
@@ -460,7 +460,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaAfter(co
SwTxtNode* pNextTxtNode = 0;
const SwNodes& rNodes = pCurrentNode->GetDoc()->GetNodes();
- for( ULONG nCurrentNode = pCurrentNode->GetIndex() + 1; nCurrentNode < rNodes.Count(); ++nCurrentNode )
+ for( sal_uLong nCurrentNode = pCurrentNode->GetIndex() + 1; nCurrentNode < rNodes.Count(); ++nCurrentNode )
{
SwNode* pNd = rNodes[ nCurrentNode ];
pNextTxtNode = dynamic_cast<SwTxtNode*>(pNd);
@@ -507,7 +507,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaBefore(c
SwTxtNode* pPrevTxtNode = 0;
const SwNodes& rNodes = pCurrentNode->GetDoc()->GetNodes();
- for( ULONG nCurrentNode = pCurrentNode->GetIndex() - 1; nCurrentNode > 0; --nCurrentNode )
+ for( sal_uLong nCurrentNode = pCurrentNode->GetIndex() - 1; nCurrentNode > 0; --nCurrentNode )
{
SwNode* pNd = rNodes[ nCurrentNode ];
pPrevTxtNode = dynamic_cast<SwTxtNode*>(pNd);
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index a8223575d5ab..93b80196d9ef 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -46,6 +46,7 @@
#include <memory>
#include <hints.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docsh.hxx>
#include <editsh.hxx>
#include <swcli.hxx>
@@ -143,8 +144,8 @@ class BaseFrameProperties_Impl
public:
virtual ~BaseFrameProperties_Impl();
- void SetProperty(USHORT nWID, BYTE nMemberId, const uno::Any& rVal);
- bool GetProperty(USHORT nWID, BYTE nMemberId, const uno::Any*& pAny );
+ void SetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId, const uno::Any& rVal);
+ bool GetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId, const uno::Any*& pAny );
bool FillBaseProperties(SfxItemSet& rToSet, const SfxItemSet &rFromSet, bool& rSizeFound);
virtual bool AnyToItemSet( SwDoc* pDoc, SfxItemSet& rFrmSet, SfxItemSet& rSet, bool& rSizeFound) = 0;
@@ -155,12 +156,12 @@ BaseFrameProperties_Impl::~BaseFrameProperties_Impl()
{
}
-void BaseFrameProperties_Impl::SetProperty(USHORT nWID, BYTE nMemberId, const uno::Any& rVal)
+void BaseFrameProperties_Impl::SetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId, const uno::Any& rVal)
{
aAnyMap.SetValue( nWID, nMemberId, rVal );
}
-bool BaseFrameProperties_Impl::GetProperty(USHORT nWID, BYTE nMemberId, const uno::Any*& rpAny)
+bool BaseFrameProperties_Impl::GetProperty(sal_uInt16 nWID, sal_uInt8 nMemberId, const uno::Any*& rpAny)
{
return aAnyMap.FillValue( nWID, nMemberId, rpAny );
}
@@ -650,7 +651,7 @@ bool SwGraphicProperties_Impl::AnyToItemSet(
}
- static const :: USHORT nIDs[] =
+ static const :: sal_uInt16 nIDs[] =
{
RES_GRFATR_CROPGRF,
RES_GRFATR_ROTATION,
@@ -668,7 +669,7 @@ bool SwGraphicProperties_Impl::AnyToItemSet(
const ::uno::Any* pAny;
for(sal_Int16 nIndex = 0; nIDs[nIndex]; nIndex++)
{
- BYTE nMId = RES_GRFATR_CROPGRF == nIDs[nIndex] ? CONVERT_TWIPS : 0;
+ sal_uInt8 nMId = RES_GRFATR_CROPGRF == nIDs[nIndex] ? CONVERT_TWIPS : 0;
if(GetProperty(nIDs[nIndex], nMId, pAny ))
{
SfxPoolItem* pItem = ::GetDfltAttr( nIDs[nIndex] )->Clone();
@@ -696,10 +697,10 @@ bool SwOLEProperties_Impl::AnyToItemSet(
{
const ::uno::Any* pTemp;
if(!GetProperty(FN_UNO_CLSID, 0, pTemp) && !GetProperty(FN_UNO_STREAM_NAME, 0, pTemp) )
- return FALSE;
+ return sal_False;
SwFrameProperties_Impl::AnyToItemSet( pDoc, rFrmSet, rSet, rSizeFound);
//
- return TRUE;
+ return sal_True;
}
/******************************************************************
@@ -970,17 +971,17 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
pNoTxt->SetContour(0);
else if(aValue >>= aParam)
{
- PolyPolygon aPoly((USHORT)aParam.getLength());
+ PolyPolygon aPoly((sal_uInt16)aParam.getLength());
for(sal_Int32 i = 0; i < aParam.getLength(); i++)
{
const :: drawing::PointSequence* pPointSeq = aParam.getConstArray();
sal_Int32 nPoints = pPointSeq[i].getLength();
const :: awt::Point* pPoints = pPointSeq[i].getConstArray();
- Polygon aSet( (USHORT)nPoints );
+ Polygon aSet( (sal_uInt16)nPoints );
for(sal_Int32 j = 0; j < nPoints; j++)
{
Point aPoint(pPoints[j].X, pPoints[j].Y);
- aSet.SetPoint(aPoint, (USHORT)j);
+ aSet.SetPoint(aPoint, (sal_uInt16)j);
}
// Close polygon if it isn't closed already.
aSet.Optimize( POLY_OPTIMIZE_CLOSE );
@@ -1091,7 +1092,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
}
// <--
- pFmt->GetDoc()->SetFrmFmtToFly( *pFmt, *pFrmFmt, pSet, FALSE );
+ pFmt->GetDoc()->SetFrmFmtToFly( *pFmt, *pFrmFmt, pSet, sal_False );
delete pSet;
}
else
@@ -1445,12 +1446,12 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
{
drawing::PointSequenceSequence aPtSeq(aContour.Count());
drawing::PointSequence* pPSeq = aPtSeq.getArray();
- for(USHORT i = 0; i < aContour.Count(); i++)
+ for(sal_uInt16 i = 0; i < aContour.Count(); i++)
{
const Polygon& rPoly = aContour.GetObject(i);
pPSeq[i].realloc(rPoly.GetSize());
awt::Point* pPoints = pPSeq[i].getArray();
- for(USHORT j = 0; j < rPoly.GetSize(); j++)
+ for(sal_uInt16 j = 0; j < rPoly.GetSize(); j++)
{
const Point& rPoint = rPoly.GetPoint(j);
pPoints[j].X = rPoint.X();
@@ -1586,7 +1587,8 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
}
}
else if(FN_UNO_CLSID == pEntry->nWID || FN_UNO_MODEL == pEntry->nWID||
- FN_UNO_COMPONENT == pEntry->nWID ||FN_UNO_STREAM_NAME == pEntry->nWID)
+ FN_UNO_COMPONENT == pEntry->nWID ||FN_UNO_STREAM_NAME == pEntry->nWID||
+ FN_EMBEDDED_OBJECT == pEntry->nWID)
{
SwDoc* pDoc = pFmt->GetDoc();
const SwFmtCntnt* pCnt = &pFmt->GetCntnt();
@@ -1607,7 +1609,15 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
{
uno::Reference < lang::XComponent > xComp( xIP->getComponent(), uno::UNO_QUERY );
uno::Reference < frame::XModel > xModel( xComp, uno::UNO_QUERY );
- if ( xModel.is() )
+ if ( FN_EMBEDDED_OBJECT == pEntry->nWID )
+ {
+ // ensure the
+ OSL_ENSURE( pDoc->GetDocShell(), "no doc shell => no client site" );
+ if ( pDoc->GetDocShell() )
+ pDoc->GetDocShell()->GetIPClient( svt::EmbeddedObjectRef( xIP, embed::Aspects::MSOLE_CONTENT ) );
+ aAny <<= xIP;
+ }
+ else if ( xModel.is() )
aAny <<= xModel;
else if ( FN_UNO_COMPONENT == pEntry->nWID )
aAny <<= xComp;
@@ -1743,13 +1753,13 @@ uno::Sequence< beans::PropertyState > SwXFrame::getPropertyStates(
SwNoTxtNode* pNoTxt = aIdx.GetNode().GetNoTxtNode();
SfxItemSet aSet(pNoTxt->GetSwAttrSet());
aSet.GetItemState(pEntry->nWID);
- if(SFX_ITEM_SET == aSet.GetItemState( pEntry->nWID, FALSE ))
+ if(SFX_ITEM_SET == aSet.GetItemState( pEntry->nWID, sal_False ))
pStates[i] = beans::PropertyState_DIRECT_VALUE;
}
}
else
{
- if(SFX_ITEM_SET == rFmtSet.GetItemState( pEntry->nWID, FALSE ))
+ if(SFX_ITEM_SET == rFmtSet.GetItemState( pEntry->nWID, sal_False ))
pStates[i] = beans::PropertyState_DIRECT_VALUE;
else
pStates[i] = beans::PropertyState_DEFAULT_VALUE;
@@ -2207,7 +2217,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
// xIPObj->OnDocumentPrinterChanged( pDoc->getPrinter( false ) );
UnoActionContext aAction(pDoc);
- pDoc->StartUndo(UNDO_INSERT, NULL);
+ pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, NULL);
if(!bSizeFound)
{
//TODO/LATER: from where do I get a ViewAspect? And how do I transport it to the OLENode?
@@ -2254,7 +2264,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
pFmt2 = pDoc->Insert(aPam, xObjRef, &aFrmSet, NULL, NULL );
OSL_ENSURE( pFmt2, "Doc->Insert(notxt) failed." );
- pDoc->EndUndo(UNDO_INSERT, NULL);
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL);
pFmt2->Add(this);
if(sName.Len())
pDoc->SetFlyName((SwFlyFrmFmt&)*pFmt2, sName);
@@ -2264,11 +2274,11 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
{
::rtl::OUString sStreamName;
(*pStreamName) >>= sStreamName;
- pDoc->StartUndo(UNDO_INSERT, NULL);
+ pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, NULL);
SwFlyFrmFmt* pFrmFmt = 0;
pFrmFmt = pDoc->InsertOLE( aPam, sStreamName, embed::Aspects::MSOLE_CONTENT, &aFrmSet, NULL, NULL );
- pDoc->EndUndo(UNDO_INSERT, NULL);
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL);
pFrmFmt->Add(this);
if(sName.Len())
pDoc->SetFlyName((SwFlyFrmFmt&)*pFrmFmt, sName);
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index 6d08f5f0cec2..57eb3486ef7a 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -517,7 +517,7 @@ throw (uno::RuntimeException)
{
SolarMutexGuard g;
- USHORT nObjectType = SW_SERVICE_TYPE_INDEX;
+ sal_uInt16 nObjectType = SW_SERVICE_TYPE_INDEX;
switch (m_pImpl->m_eTOXType)
{
// case TOX_INDEX: break;
@@ -933,8 +933,8 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
{
SwSections aSectArr;
pSectionFmt->GetChildSections(aSectArr,
- SORTSECT_NOT, FALSE);
- for(USHORT i = 0; i < aSectArr.Count(); i++)
+ SORTSECT_NOT, sal_False);
+ for(sal_uInt16 i = 0; i < aSectArr.Count(); i++)
{
SwSection* pSect = aSectArr[i];
if(pSect->GetType() == TOX_HEADER_SECTION)
@@ -1206,7 +1206,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
aXMarks(aMarks.Count());
uno::Reference<text::XDocumentIndexMark>* pxMarks =
aXMarks.getArray();
- for(USHORT i = 0; i < aMarks.Count(); i++)
+ for(sal_uInt16 i = 0; i < aMarks.Count(); i++)
{
pMark = aMarks.GetObject(i);
pxMarks[i] = SwXDocumentIndexMark::CreateXDocumentIndexMark(
@@ -1918,7 +1918,7 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(
// n.b.: toxmarks must have either alternative text or an extent
if (bMark && rMark.GetAlternativeText().Len())
{
- rPam.Normalize(TRUE);
+ rPam.Normalize(sal_True);
rPam.DeleteMark();
bMark = false;
}
@@ -3083,7 +3083,7 @@ throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException,
if(SVX_TAB_ADJUST_END == aToken.eTabAlign)
{
pArr[1].Name = C2U("TabStopRightAligned");
- BOOL bTemp = sal_True;
+ sal_Bool bTemp = sal_True;
pArr[1].Value.setValue(&bTemp, ::getCppuBooleanType());
}
else
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index 6a1122322ae0..b6ed84989dbf 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -1117,6 +1117,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{ SW_PROP_NMID(UNO_NAME_GRAPHIC_URL), FN_UNO_REPLACEMENT_GRAPHIC_URL, CPPU_E2T(CPPUTYPE_OUSTRING), PropertyAttribute::MAYBEVOID, 0 },
{ SW_PROP_NMID(UNO_NAME_GRAPHIC), FN_UNO_REPLACEMENT_GRAPHIC, CPPU_E2T(CPPUTYPE_REFXGRAPHIC), PropertyAttribute::MAYBEVOID, 0 },
{ SW_PROP_NMID(UNO_NAME_COMPONENT),FN_UNO_COMPONENT, CPPU_E2T(CPPUTYPE_REFCOMPONENT), PropertyAttribute::READONLY, 0},
+ { SW_PROP_NMID(UNO_NAME_EMBEDDED_OBJECT),FN_EMBEDDED_OBJECT, CPPU_E2T(CPPUTPYE_REFEMBEDDEDOBJECT), PropertyAttribute::READONLY, 0},
{0,0,0,0,0,0}
};
aMapEntriesArr[nPropertyId] = aEmbeddedPropertyMap_Impl;
@@ -2443,7 +2444,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
for( ; p->pName; ++p, ++i )
{
// set the name
- const SwPropNameLen& rPropNm = GetPropName( (USHORT)(long)p->pName );
+ const SwPropNameLen& rPropNm = GetPropName( (sal_uInt16)(long)p->pName );
p->pName = rPropNm.pName;
p->nNameLen = rPropNm.nNameLen;
// get the cppu type from the comphelper
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 732ee5a6892a..0948ddadcbae 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -41,6 +41,7 @@
#include <IMark.hxx>
#include <frmfmt.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <istyleaccess.hxx>
#include <ndtxt.hxx>
#include <ndnotxt.hxx>
@@ -216,10 +217,10 @@ void SwUnoCursorHelper::GetTextFromPam(SwPaM & rPam, OUString & rBuffer)
SwAsciiOptions aOpt = xWrt->GetAsciiOptions();
aOpt.SetCharSet( RTL_TEXTENCODING_UNICODE );
xWrt->SetAsciiOptions( aOpt );
- xWrt->bUCS2_WithStartChar = FALSE;
+ xWrt->bUCS2_WithStartChar = sal_False;
// --> FME #i68522#
- const BOOL bOldShowProgress = xWrt->bShowProgress;
- xWrt->bShowProgress = FALSE;
+ const sal_Bool bOldShowProgress = xWrt->bShowProgress;
+ xWrt->bShowProgress = sal_False;
// <--
long lLen;
@@ -300,8 +301,8 @@ throw (lang::IllegalArgumentException)
if(pStyle.get())
{
SwFmtAutoFmt aFmt( (bPara)
- ? sal::static_int_cast< USHORT >(RES_AUTO_STYLE)
- : sal::static_int_cast< USHORT >(RES_TXTATR_AUTOFMT) );
+ ? sal::static_int_cast< sal_uInt16 >(RES_AUTO_STYLE)
+ : sal::static_int_cast< sal_uInt16 >(RES_TXTATR_AUTOFMT) );
aFmt.SetStyleHandle( pStyle );
rSet.Put(aFmt);
}
@@ -333,13 +334,13 @@ throw (lang::IllegalArgumentException)
SwTxtFmtColl *const pLocal = pStyle->GetCollection();
UnoActionContext aAction(pDoc);
- pDoc->StartUndo( UNDO_START, NULL );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
SwPaM *pTmpCrsr = &rPaM;
do {
pDoc->SetTxtFmtColl(*pTmpCrsr, pLocal);
pTmpCrsr = static_cast<SwPaM*>(pTmpCrsr->GetNext());
} while ( pTmpCrsr != &rPaM );
- pDoc->EndUndo( UNDO_END, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
}
bool
@@ -404,7 +405,7 @@ lcl_SetNodeNumStart(SwPaM & rCrsr, uno::Any const& rValue)
if( rCrsr.GetNext() != &rCrsr ) // Mehrfachselektion ?
{
- pDoc->StartUndo( UNDO_START, NULL );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
SwPamRanges aRangeArr( rCrsr );
SwPaM aPam( *rCrsr.GetPoint() );
for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
@@ -413,7 +414,7 @@ lcl_SetNodeNumStart(SwPaM & rCrsr, uno::Any const& rValue)
pDoc->SetNodeNumStart(*aRangeArr.SetPam( n, aPam ).GetPoint(),
nStt );
}
- pDoc->EndUndo( UNDO_END, NULL);
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
}
else
{
@@ -434,7 +435,7 @@ lcl_setCharFmtSequence(SwPaM & rPam, uno::Any const& rValue)
for (sal_Int32 nStyle = 0; nStyle < aCharStyles.getLength(); nStyle++)
{
uno::Any aStyle;
- rPam.GetDoc()->StartUndo(UNDO_START, NULL);
+ rPam.GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_START, NULL);
aStyle <<= aCharStyles.getConstArray()[nStyle];
// create a local set and apply each format directly
SfxItemSet aSet(rPam.GetDoc()->GetAttrPool(),
@@ -445,7 +446,7 @@ lcl_setCharFmtSequence(SwPaM & rPam, uno::Any const& rValue)
SwUnoCursorHelper::SetCrsrAttr(rPam, aSet, (nStyle)
? nsSetAttrMode::SETATTR_DONTREPLACE
: nsSetAttrMode::SETATTR_DEFAULT);
- rPam.GetDoc()->EndUndo(UNDO_START, NULL);
+ rPam.GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_START, NULL);
}
return true;
}
@@ -668,8 +669,8 @@ SwUnoCursorHelper::GetCurTxtFmtColl(SwPaM & rPaM, const bool bConditional)
SwPaM *pTmpCrsr = &rPaM;
do
{
- const ULONG nSttNd = pTmpCrsr->Start()->nNode.GetIndex();
- const ULONG nEndNd = pTmpCrsr->End()->nNode.GetIndex();
+ const sal_uLong nSttNd = pTmpCrsr->Start()->nNode.GetIndex();
+ const sal_uLong nEndNd = pTmpCrsr->End()->nNode.GetIndex();
if( nEndNd - nSttNd >= nMaxLookup )
{
@@ -678,7 +679,7 @@ SwUnoCursorHelper::GetCurTxtFmtColl(SwPaM & rPaM, const bool bConditional)
}
const SwNodes& rNds = rPaM.GetDoc()->GetNodes();
- for( ULONG n = nSttNd; n <= nEndNd; ++n )
+ for( sal_uLong n = nSttNd; n <= nEndNd; ++n )
{
SwTxtNode const*const pNd = rNds[ n ]->GetTxtNode();
if( pNd )
@@ -875,7 +876,7 @@ void SwXTextCursor::DeleteAndInsert(const ::rtl::OUString& rText,
SwDoc* pDoc = pUnoCrsr->GetDoc();
UnoActionContext aAction(pDoc);
const xub_StrLen nTxtLen = rText.getLength();
- pDoc->StartUndo(UNDO_INSERT, NULL);
+ pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, NULL);
SwCursor * pCurrent = pUnoCrsr;
do
{
@@ -893,11 +894,11 @@ void SwXTextCursor::DeleteAndInsert(const ::rtl::OUString& rText,
SwUnoCursorHelper::SelectPam(*pUnoCrsr, true);
pCurrent->Left(rText.getLength(),
- CRSR_SKIP_CHARS, FALSE, FALSE);
+ CRSR_SKIP_CHARS, sal_False, sal_False);
}
pCurrent = static_cast<SwCursor *>(pCurrent->GetNext());
} while (pCurrent != pUnoCrsr);
- pDoc->EndUndo(UNDO_INSERT, NULL);
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL);
}
}
@@ -1079,7 +1080,7 @@ throw (uno::RuntimeException)
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
SwUnoCursorHelper::SelectPam(rUnoCursor, Expand);
- sal_Bool bRet = rUnoCursor.Left( nCount, CRSR_SKIP_CHARS, FALSE, FALSE);
+ sal_Bool bRet = rUnoCursor.Left( nCount, CRSR_SKIP_CHARS, sal_False, sal_False);
if (CURSOR_META == m_pImpl->m_eType)
{
bRet = lcl_ForceIntoMeta(rUnoCursor, m_pImpl->m_xParentText,
@@ -1098,7 +1099,7 @@ throw (uno::RuntimeException)
SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
SwUnoCursorHelper::SelectPam(rUnoCursor, Expand);
- sal_Bool bRet = rUnoCursor.Right(nCount, CRSR_SKIP_CHARS, FALSE, FALSE);
+ sal_Bool bRet = rUnoCursor.Right(nCount, CRSR_SKIP_CHARS, sal_False, sal_False);
if (CURSOR_META == m_pImpl->m_eType)
{
bRet = lcl_ForceIntoMeta(rUnoCursor, m_pImpl->m_xParentText,
@@ -1361,7 +1362,7 @@ SwXTextCursor::gotoNextWord(sal_Bool Expand) throw (uno::RuntimeException)
if (rUnoCursor.GetCntntNode() &&
(pPoint->nContent == rUnoCursor.GetCntntNode()->Len()))
{
- rUnoCursor.Right(1, CRSR_SKIP_CHARS, FALSE, FALSE);
+ rUnoCursor.Right(1, CRSR_SKIP_CHARS, sal_False, sal_False);
}
else
{
@@ -1404,14 +1405,14 @@ SwXTextCursor::gotoPreviousWord(sal_Bool Expand) throw (uno::RuntimeException)
// start of paragraph?
if (pPoint->nContent == 0)
{
- rUnoCursor.Left(1, CRSR_SKIP_CHARS, FALSE, FALSE);
+ rUnoCursor.Left(1, CRSR_SKIP_CHARS, sal_False, sal_False);
}
else
{
rUnoCursor.GoPrevWordWT( i18n::WordType::DICTIONARY_WORD );
if (pPoint->nContent == 0)
{
- rUnoCursor.Left(1, CRSR_SKIP_CHARS, FALSE, FALSE);
+ rUnoCursor.Left(1, CRSR_SKIP_CHARS, sal_False, sal_False);
}
}
@@ -2024,10 +2025,10 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
{
if (!pSetParent.get())
{
- pSetParent.reset( pSet->Clone( FALSE ) );
+ pSetParent.reset( pSet->Clone( sal_False ) );
// --> OD 2006-07-12 #i63870#
SwUnoCursorHelper::GetCrsrAttr(
- rPaM, *pSetParent, TRUE, FALSE );
+ rPaM, *pSetParent, sal_True, sal_False );
// <--
}
@@ -2061,7 +2062,7 @@ lcl_SelectParaAndReset( SwPaM &rPaM, SwDoc & rDoc,
// if we are reseting paragraph attributes, we need to select the full paragraph first
SwPosition aStart = *rPaM.Start();
SwPosition aEnd = *rPaM.End();
- ::std::auto_ptr< SwUnoCrsr > pTemp ( rDoc.CreateUnoCrsr(aStart, FALSE) );
+ ::std::auto_ptr< SwUnoCrsr > pTemp ( rDoc.CreateUnoCrsr(aStart, sal_False) );
if(!SwUnoCursorHelper::IsStartOfPara(*pTemp))
{
pTemp->MovePara(fnParaCurr, fnParaStart);
@@ -2320,7 +2321,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
}
// para specific attribut ranges
-static USHORT g_ParaResetableSetRange[] = {
+static sal_uInt16 g_ParaResetableSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1,
@@ -2329,7 +2330,7 @@ static USHORT g_ParaResetableSetRange[] = {
};
// selection specific attribut ranges
-static USHORT g_ResetableSetRange[] = {
+static sal_uInt16 g_ResetableSetRange[] = {
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
@@ -2339,13 +2340,13 @@ static USHORT g_ResetableSetRange[] = {
};
static void
-lcl_EnumerateIds(USHORT const* pIdRange, SvUShortsSort & rWhichIds)
+lcl_EnumerateIds(sal_uInt16 const* pIdRange, SvUShortsSort & rWhichIds)
{
while (*pIdRange)
{
- const USHORT nStart = sal::static_int_cast<USHORT>(*pIdRange++);
- const USHORT nEnd = sal::static_int_cast<USHORT>(*pIdRange++);
- for (USHORT nId = nStart + 1; nId <= nEnd; ++nId)
+ const sal_uInt16 nStart = sal::static_int_cast<sal_uInt16>(*pIdRange++);
+ const sal_uInt16 nEnd = sal::static_int_cast<sal_uInt16>(*pIdRange++);
+ for (sal_uInt16 nId = nStart + 1; nId <= nEnd; ++nId)
{
rWhichIds.Insert( nId );
}
@@ -2609,17 +2610,17 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties(
SwSortKey* pKey1 = new SwSortKey;
pKey1->nColumnId = USHRT_MAX;
- pKey1->bIsNumeric = TRUE;
+ pKey1->bIsNumeric = sal_True;
pKey1->eSortOrder = SRT_ASCENDING;
SwSortKey* pKey2 = new SwSortKey;
pKey2->nColumnId = USHRT_MAX;
- pKey2->bIsNumeric = TRUE;
+ pKey2->bIsNumeric = sal_True;
pKey2->eSortOrder = SRT_ASCENDING;
SwSortKey* pKey3 = new SwSortKey;
pKey3->nColumnId = USHRT_MAX;
- pKey3->bIsNumeric = TRUE;
+ pKey3->bIsNumeric = sal_True;
pKey3->eSortOrder = SRT_ASCENDING;
SwSortKey* aKeys[3] = {pKey1, pKey2, pKey3};
@@ -2801,7 +2802,7 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties(
SvxLocaleToLanguage( pFields[i].CollatorLocale );
aKeys[i]->sSortType = pFields[i].CollatorAlgorithm;
aKeys[i]->nColumnId =
- static_cast<USHORT>(pFields[i].Field);
+ static_cast<sal_uInt16>(pFields[i].Field);
aKeys[i]->bIsNumeric = (pFields[i].FieldType ==
table::TableSortFieldType_NUMERIC);
aKeys[i]->eSortOrder = (pFields[i].IsAscending)
@@ -2864,7 +2865,7 @@ throw (uno::RuntimeException)
SwPosition & rEnd = *rUnoCursor.End();
SwNodeIndex aPrevIdx( rStart.nNode, -1 );
- const ULONG nOffset = rEnd.nNode.GetIndex() - rStart.nNode.GetIndex();
+ const sal_uLong nOffset = rEnd.nNode.GetIndex() - rStart.nNode.GetIndex();
const xub_StrLen nCntStt = rStart.nContent.GetIndex();
rUnoCursor.GetDoc()->SortText(rUnoCursor, aSortOpt);
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index d810112b1dec..b64d3141f32a 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -38,6 +38,7 @@
#include <bookmrk.hxx>
#include <frmfmt.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <ndtxt.hxx>
#include <ndnotxt.hxx>
#include <unocrsr.hxx>
@@ -200,14 +201,14 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
const bool _bAtCharAnchoredObjs )
{
// _bAtCharAnchoredObjs:
- // <TRUE>: at-character anchored objects are collected
- // <FALSE>: at-paragraph anchored objects are collected
+ // <sal_True>: at-character anchored objects are collected
+ // <sal_False>: at-paragraph anchored objects are collected
// alle Rahmen, Grafiken und OLEs suchen, die an diesem Absatz
// gebunden sind
SwDoc* pDoc = rIdx.GetNode().GetDoc();
- USHORT nChkType = static_cast< USHORT >((_bAtCharAnchoredObjs)
+ sal_uInt16 nChkType = static_cast< sal_uInt16 >((_bAtCharAnchoredObjs)
? FLY_AT_CHAR : FLY_AT_PARA);
const SwCntntFrm* pCFrm;
const SwCntntNode* pCNd;
@@ -217,7 +218,7 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
{
const SwSortedObjs *pObjs = pCFrm->GetDrawObjs();
if( pObjs )
- for( USHORT i = 0; i < pObjs->Count(); ++i )
+ for( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt();
@@ -239,8 +240,8 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
else
{
const SwSpzFrmFmts& rFmts = *pDoc->GetSpzFrmFmts();
- USHORT nSize = rFmts.Count();
- for ( USHORT i = 0; i < nSize; i++)
+ sal_uInt16 nSize = rFmts.Count();
+ for ( sal_uInt16 i = 0; i < nSize; i++)
{
const SwFrmFmt* pFmt = rFmts[ i ];
const SwFmtAnchor& rAnchor = pFmt->GetAnchor();
@@ -342,7 +343,7 @@ void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam,
UnoActionContext aAction(pDoc);
if (rPam.GetNext() != &rPam) // Ring of Cursors
{
- pDoc->StartUndo(UNDO_INSATTR, NULL);
+ pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, NULL);
SwPaM *pCurrent = &rPam;
do
@@ -356,7 +357,7 @@ void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam,
pCurrent= static_cast<SwPaM *>(pCurrent->GetNext());
} while (pCurrent != &rPam);
- pDoc->EndUndo(UNDO_INSATTR, NULL);
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSATTR, NULL);
}
else
{
@@ -390,8 +391,8 @@ void SwUnoCursorHelper::GetCrsrAttr(SwPaM & rPam,
{
SwPosition const & rStart( *pCurrent->Start() );
SwPosition const & rEnd( *pCurrent->End() );
- const ULONG nSttNd = rStart.nNode.GetIndex();
- const ULONG nEndNd = rEnd .nNode.GetIndex();
+ const sal_uLong nSttNd = rStart.nNode.GetIndex();
+ const sal_uLong nEndNd = rEnd .nNode.GetIndex();
if (nEndNd - nSttNd >= nMaxLookup)
{
@@ -402,7 +403,7 @@ void SwUnoCursorHelper::GetCrsrAttr(SwPaM & rPam,
// the first node inserts the values into the get set
// all other nodes merge their values into the get set
- for (ULONG n = nSttNd; n <= nEndNd; ++n)
+ for (sal_uLong n = nSttNd; n <= nEndNd; ++n)
{
SwNode *const pNd = rPam.GetDoc()->GetNodes()[ n ];
switch (pNd->GetNodeType())
@@ -461,7 +462,7 @@ public:
/// embedded tables.
SwStartNode const*const m_pOwnStartNode;
SwTable const*const m_pOwnTable;
- const ULONG m_nEndIndex;
+ const sal_uLong m_nEndIndex;
sal_Int32 m_nFirstParaStart;
sal_Int32 m_nLastParaEnd;
bool m_bFirstParagraph;
@@ -881,7 +882,7 @@ throw (uno::RuntimeException)
if (GetPositions(aCursor))
{
UnoActionContext aAction(& m_pImpl->m_rDoc);
- m_pImpl->m_rDoc.StartUndo(UNDO_INSERT, NULL);
+ m_pImpl->m_rDoc.GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, NULL);
if (aCursor.HasMark())
{
m_pImpl->m_rDoc.DeleteAndJoin(aCursor);
@@ -893,10 +894,10 @@ throw (uno::RuntimeException)
m_pImpl->m_rDoc, aCursor, rText, bForceExpandHints);
SwUnoCursorHelper::SelectPam(aCursor, true);
- aCursor.Left(rText.getLength(), CRSR_SKIP_CHARS, FALSE, FALSE);
+ aCursor.Left(rText.getLength(), CRSR_SKIP_CHARS, sal_False, sal_False);
}
SetPositions(aCursor);
- m_pImpl->m_rDoc.EndUndo(UNDO_INSERT, NULL);
+ m_pImpl->m_rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL);
}
}
@@ -1150,7 +1151,7 @@ lcl_IsStartNodeInFormat(const bool bHeader, SwStartNode *const pSttNode,
const SfxItemSet& rSet = pFrmFmt->GetAttrSet();
const SfxPoolItem* pItem;
if (SFX_ITEM_SET == rSet.GetItemState(
- static_cast<USHORT>(bHeader ? RES_HEADER : RES_FOOTER),
+ static_cast<sal_uInt16>(bHeader ? RES_HEADER : RES_FOOTER),
sal_True, &pItem))
{
SfxPoolItem *const pItemNonConst(const_cast<SfxPoolItem *>(pItem));
@@ -1319,7 +1320,7 @@ throw (uno::RuntimeException)
}
const SwPosition aPos(GetDoc()->GetNodes().GetEndOfContent());
const ::std::auto_ptr<SwUnoCrsr> pNewCrsr(
- m_pImpl->m_rDoc.CreateUnoCrsr(aPos, FALSE));
+ m_pImpl->m_rDoc.CreateUnoCrsr(aPos, sal_False));
if (!GetPositions(*pNewCrsr))
{
throw uno::RuntimeException();
@@ -1341,7 +1342,7 @@ SwXTextRange::createEnumeration() throw (uno::RuntimeException)
}
const SwPosition aPos(GetDoc()->GetNodes().GetEndOfContent());
::std::auto_ptr<SwUnoCrsr> pNewCrsr(
- m_pImpl->m_rDoc.CreateUnoCrsr(aPos, FALSE));
+ m_pImpl->m_rDoc.CreateUnoCrsr(aPos, sal_False));
if (!GetPositions(*pNewCrsr))
{
throw uno::RuntimeException();
@@ -1711,7 +1712,7 @@ void SwUnoCursorHelper::SetString(SwCursor & rCursor, const OUString& rString)
// Start/EndAction
SwDoc *const pDoc = rCursor.GetDoc();
UnoActionContext aAction(pDoc);
- pDoc->StartUndo(UNDO_INSERT, NULL);
+ pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, NULL);
if (rCursor.HasMark())
{
pDoc->DeleteAndJoin(rCursor);
@@ -1724,9 +1725,9 @@ void SwUnoCursorHelper::SetString(SwCursor & rCursor, const OUString& rString)
DBG_ASSERT( bSuccess, "DocInsertStringSplitCR" );
(void) bSuccess;
SwUnoCursorHelper::SelectPam(rCursor, true);
- rCursor.Left(rString.getLength(), CRSR_SKIP_CHARS, FALSE, FALSE);
+ rCursor.Left(rString.getLength(), CRSR_SKIP_CHARS, sal_False, sal_False);
}
- pDoc->EndUndo(UNDO_INSERT, NULL);
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL);
}
/******************************************************************
@@ -1882,7 +1883,7 @@ SwXParaFrameEnumeration::SwXParaFrameEnumeration(
SwPosFlyFrms aFlyFrms;
//get all frames that are bound at paragraph or at character
rPaM.GetDoc()->GetAllFlyFmts(aFlyFrms, m_pImpl->GetCursor());
- for(USHORT i = 0; i < aFlyFrms.Count(); i++)
+ for(sal_uInt16 i = 0; i < aFlyFrms.Count(); i++)
{
SwPosFlyFrm* pPosFly = aFlyFrms[i];
SwFrmFmt *const pFrmFmt =
@@ -1902,7 +1903,7 @@ SwXParaFrameEnumeration::SwXParaFrameEnumeration(
lcl_FillFrame(*m_pImpl.get(), *m_pImpl->GetCursor(),
m_pImpl->m_Frames);
m_pImpl->GetCursor()->Right(
- 1, CRSR_SKIP_CHARS, FALSE, FALSE);
+ 1, CRSR_SKIP_CHARS, sal_False, sal_False);
}
while (*m_pImpl->GetCursor()->GetPoint() <
*m_pImpl->GetCursor()->GetMark());
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index a48f4bf2c3f8..7633c2bdb3ab 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -551,7 +551,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
//SwNode& rTxtNode = pUnoCrsr->GetPoint()->nNode.GetNode();
//const SwAttrSet& rAttrSet = ((SwTxtNode&)rTxtNode).GetSwAttrSet();
- //USHORT nAttrCount = rAttrSet.Count();
+ //sal_uInt16 nAttrCount = rAttrSet.Count();
const sal_Int32 nProps = rPropertyNames.getLength();
const OUString *pProp = rPropertyNames.getConstArray();
@@ -780,7 +780,7 @@ throw (uno::RuntimeException)
}
bool ::sw::GetDefaultTextContentValue(
- uno::Any& rAny, const OUString& rPropertyName, USHORT nWID)
+ uno::Any& rAny, const OUString& rPropertyName, sal_uInt16 nWID)
{
if(!nWID)
{
@@ -791,7 +791,7 @@ bool ::sw::GetDefaultTextContentValue(
else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_TEXT_WRAP)))
nWID = FN_UNO_TEXT_WRAP;
else
- return FALSE;
+ return sal_False;
}
switch(nWID)
@@ -806,9 +806,9 @@ bool ::sw::GetDefaultTextContentValue(
}
break;
default:
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
void SAL_CALL
@@ -903,7 +903,7 @@ throw (beans::UnknownPropertyException)
break;
lcl_SwXParagraph_getPropertyStateDEFAULT:
default:
- if((*ppSet) && SFX_ITEM_SET == (*ppSet)->GetItemState(rEntry.nWID, FALSE))
+ if((*ppSet) && SFX_ITEM_SET == (*ppSet)->GetItemState(rEntry.nWID, sal_False))
eRet = beans::PropertyState_DIRECT_VALUE;
break;
}
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
index 3016d7b0d21b..28bd86c51759 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -340,7 +340,7 @@ void SwXTextPortion::GetPropertyValue(
break;
case FN_UNO_IS_START:
{
- BOOL bStart = TRUE, bPut = TRUE;
+ sal_Bool bStart = sal_True, bPut = sal_True;
switch (m_ePortionType)
{
case PORTION_REFMARK_START:
@@ -357,10 +357,10 @@ void SwXTextPortion::GetPropertyValue(
case PORTION_REDLINE_END:
case PORTION_RUBY_END:
case PORTION_FIELD_END:
- bStart = FALSE;
+ bStart = sal_False;
break;
default:
- bPut = FALSE;
+ bPut = sal_False;
}
if(bPut)
rVal.setValue(&bStart, ::getBooleanCppuType());
@@ -382,7 +382,7 @@ void SwXTextPortion::GetPropertyValue(
break;
default:
beans::PropertyState eTemp;
- BOOL bDone = SwUnoCursorHelper::getCrsrPropertyValue(
+ sal_Bool bDone = SwUnoCursorHelper::getCrsrPropertyValue(
rEntry, *pUnoCrsr, &(rVal), eTemp );
if(!bDone)
{
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index a056b8033148..fe3e74b68050 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -86,24 +86,24 @@ static void lcl_CreatePortions(
namespace
{
- static const BYTE BKM_TYPE_START = 0;
- static const BYTE BKM_TYPE_END = 1;
- static const BYTE BKM_TYPE_START_END = 2;
+ static const sal_uInt8 BKM_TYPE_START = 0;
+ static const sal_uInt8 BKM_TYPE_END = 1;
+ static const sal_uInt8 BKM_TYPE_START_END = 2;
struct SwXBookmarkPortion_Impl
{
Reference<XTextContent> xBookmark;
- BYTE nBkmType;
+ sal_uInt8 nBkmType;
const SwPosition aPosition;
SwXBookmarkPortion_Impl(uno::Reference<text::XTextContent> const& xMark,
- const BYTE nType, SwPosition const& rPosition)
+ const sal_uInt8 nType, SwPosition const& rPosition)
: xBookmark ( xMark )
, nBkmType ( nType )
, aPosition ( rPosition )
{
}
- ULONG getIndex ()
+ sal_uLong getIndex ()
{
return aPosition.nContent.GetIndex();
}
@@ -160,7 +160,7 @@ namespace
const SwPosition& rStartPos = pBkmk->GetMarkStart();
if(rStartPos.nNode == nOwnNode)
{
- const BYTE nType = hasOther ? BKM_TYPE_START : BKM_TYPE_START_END;
+ const sal_uInt8 nType = hasOther ? BKM_TYPE_START : BKM_TYPE_START_END;
rBkmArr.insert(SwXBookmarkPortion_ImplSharedPtr(
new SwXBookmarkPortion_Impl(
SwXBookmark::CreateXBookmark(rDoc, *pBkmk),
@@ -332,7 +332,7 @@ lcl_ExportFieldMark(
OSL_ENSURE(pUnoCrsr->End()->nContent.GetIndex() == start,
"hmm --- why is this different");
- pUnoCrsr->Right(1, CRSR_SKIP_CHARS, FALSE, FALSE);
+ pUnoCrsr->Right(1, CRSR_SKIP_CHARS, sal_False, sal_False);
if ( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() )
{
OSL_FAIL("cannot move cursor?");
@@ -492,7 +492,7 @@ lcl_ExportBookmark(
TextRangeList_t & rPortions,
Reference<XText> const& xParent,
const SwUnoCrsr * const pUnoCrsr,
- SwXBookmarkPortion_ImplList& rBkmArr, const ULONG nIndex)
+ SwXBookmarkPortion_ImplList& rBkmArr, const sal_uLong nIndex)
{
for ( SwXBookmarkPortion_ImplList::iterator aIter = rBkmArr.begin(), aEnd = rBkmArr.end();
aIter != aEnd; )
@@ -534,7 +534,7 @@ lcl_ExportSoftPageBreak(
TextRangeList_t & rPortions,
Reference<XText> const& xParent,
const SwUnoCrsr * const pUnoCrsr,
- SwSoftPageBreakList& rBreakArr, const ULONG nIndex)
+ SwSoftPageBreakList& rBreakArr, const sal_uLong nIndex)
{
for ( SwSoftPageBreakList::iterator aIter = rBreakArr.begin(),
aEnd = rBreakArr.end();
@@ -571,7 +571,7 @@ struct SwXRedlinePortion_Impl
{
}
- ULONG getRealIndex ()
+ sal_uLong getRealIndex ()
{
return m_bStart ? m_pRedline->Start()->nContent.GetIndex()
: m_pRedline->End() ->nContent.GetIndex();
@@ -627,7 +627,7 @@ lcl_ExportHints(
SwTxtAttr * const pAttr = pHints->GetEnd(nEndIndex);
if (nNextEnd == nCurrentIndex)
{
- const USHORT nWhich( pAttr->Which() );
+ const sal_uInt16 nWhich( pAttr->Which() );
switch (nWhich)
{
case RES_TXTATR_TOXMARK:
@@ -703,7 +703,7 @@ lcl_ExportHints(
nCurrentIndex >= (nNextStart = (*pHints->GetStart(nStartIndex)->GetStart())))
{
SwTxtAttr * const pAttr = pHints->GetStart(nStartIndex);
- USHORT nAttrWhich = pAttr->Which();
+ sal_uInt16 nAttrWhich = pAttr->Which();
if (nNextStart == nCurrentIndex)
{
switch( nAttrWhich )
@@ -711,7 +711,7 @@ lcl_ExportHints(
case RES_TXTATR_FIELD:
if(!bRightMoveForbidden)
{
- pUnoCrsr->Right(1,CRSR_SKIP_CHARS,FALSE,FALSE);
+ pUnoCrsr->Right(1,CRSR_SKIP_CHARS,sal_False,sal_False);
if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() )
break;
SwXTextPortion* pPortion;
@@ -725,7 +725,7 @@ lcl_ExportHints(
case RES_TXTATR_FLYCNT :
if(!bRightMoveForbidden)
{
- pUnoCrsr->Right(1,CRSR_SKIP_CHARS,FALSE,FALSE);
+ pUnoCrsr->Right(1,CRSR_SKIP_CHARS,sal_False,sal_False);
if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() )
break; // Robust #i81708 content in covered cells
pUnoCrsr->Exchange();
@@ -737,7 +737,7 @@ lcl_ExportHints(
{
if(!bRightMoveForbidden)
{
- pUnoCrsr->Right(1,CRSR_SKIP_CHARS,FALSE,FALSE);
+ pUnoCrsr->Right(1,CRSR_SKIP_CHARS,sal_False,sal_False);
if( *pUnoCrsr->GetMark() == *pUnoCrsr->GetPoint() )
break;
SwXTextPortion* pPortion;
@@ -757,7 +757,7 @@ lcl_ExportHints(
{
if (bIsPoint)
{
- pUnoCrsr->Right(1,CRSR_SKIP_CHARS,FALSE,FALSE);
+ pUnoCrsr->Right(1,CRSR_SKIP_CHARS,sal_False,sal_False);
}
Reference<XTextRange> xTmp =
(RES_TXTATR_REFMARK == nAttrWhich)
@@ -767,7 +767,7 @@ lcl_ExportHints(
xParent, pUnoCrsr, *pAttr, false);
if (bIsPoint) // consume CH_TXTATR!
{
- pUnoCrsr->Normalize(FALSE);
+ pUnoCrsr->Normalize(sal_False);
pUnoCrsr->DeleteMark();
xRef = xTmp;
}
@@ -792,7 +792,7 @@ lcl_ExportHints(
{
if (!bRightMoveForbidden)
{
- pUnoCrsr->Right(1,CRSR_SKIP_CHARS,FALSE,FALSE);
+ pUnoCrsr->Right(1,CRSR_SKIP_CHARS,sal_False,sal_False);
o_rbCursorMoved = true;
// only if the end is included in selection!
if ((i_nEndPos < 0) ||
@@ -884,7 +884,7 @@ void lcl_MoveCursor( SwUnoCrsr * const pUnoCrsr,
if (nMovePos > nCurrentIndex)
{
// pUnoCrsr->Right(nMovePos - nCurrentIndex);
- pUnoCrsr->GetPoint()->nContent = static_cast<USHORT>(nMovePos);
+ pUnoCrsr->GetPoint()->nContent = static_cast<sal_uInt16>(nMovePos);
}
}
@@ -893,14 +893,14 @@ lcl_FillRedlineArray(SwDoc const & rDoc, SwUnoCrsr const & rUnoCrsr,
SwXRedlinePortion_ImplList& rRedArr )
{
const SwRedlineTbl& rRedTbl = rDoc.GetRedlineTbl();
- USHORT nRedTblCount = rRedTbl.Count();
+ sal_uInt16 nRedTblCount = rRedTbl.Count();
if ( nRedTblCount > 0 )
{
const SwPosition* pStart = rUnoCrsr.GetPoint();
const SwNodeIndex nOwnNode = pStart->nNode;
- for(USHORT nRed = 0; nRed < nRedTblCount; nRed++)
+ for(sal_uInt16 nRed = 0; nRed < nRedTblCount; nRed++)
{
const SwRedline* pRedline = rRedTbl[nRed];
const SwPosition* pRedStart = pRedline->Start();
@@ -930,7 +930,7 @@ lcl_ExportRedline(
TextRangeList_t & rPortions,
Reference<XText> const& xParent,
const SwUnoCrsr * const pUnoCrsr,
- SwXRedlinePortion_ImplList& rRedlineArr, const ULONG nIndex)
+ SwXRedlinePortion_ImplList& rRedlineArr, const sal_uLong nIndex)
{
// MTG: 23/11/05: We want this loop to iterate over all red lines in this
@@ -939,7 +939,7 @@ lcl_ExportRedline(
aIter != aEnd; )
{
SwXRedlinePortion_ImplSharedPtr pPtr = (*aIter );
- ULONG nRealIndex = pPtr->getRealIndex();
+ sal_uLong nRealIndex = pPtr->getRealIndex();
// MTG: 23/11/05: If there are elements before nIndex, remove them
if ( nIndex > nRealIndex )
rRedlineArr.erase ( aIter++ );
@@ -964,7 +964,7 @@ lcl_ExportBkmAndRedline(
SwXBookmarkPortion_ImplList& rBkmArr,
SwXRedlinePortion_ImplList& rRedlineArr,
SwSoftPageBreakList& rBreakArr,
- const ULONG nIndex)
+ const sal_uLong nIndex)
{
if (rBkmArr.size())
lcl_ExportBookmark(rPortions, xParent, pUnoCrsr, rBkmArr, nIndex);
@@ -1051,7 +1051,7 @@ lcl_CreatePortions(
GetTxt().Len()), "Incorrect start position" );
// ??? should this be i_nStartPos - current position ?
pUnoCrsr->Right(static_cast<xub_StrLen>(i_nStartPos),
- CRSR_SKIP_CHARS, FALSE, FALSE);
+ CRSR_SKIP_CHARS, sal_False, sal_False);
}
FieldMarks_t FieldMarks;
@@ -1073,7 +1073,7 @@ lcl_CreatePortions(
{
if (pUnoCrsr->HasMark())
{
- pUnoCrsr->Normalize(FALSE);
+ pUnoCrsr->Normalize(sal_False);
pUnoCrsr->DeleteMark();
}
diff --git a/sw/source/core/unocore/unoprnms.cxx b/sw/source/core/unocore/unoprnms.cxx
index f60afcce4982..9e3437915ee5 100644
--- a/sw/source/core/unocore/unoprnms.cxx
+++ b/sw/source/core/unocore/unoprnms.cxx
@@ -779,17 +779,19 @@ const SwPropNameTab aPropNameTab = {
/* 0736 UNO_NAME_OUTLINE_LEVEL */ {MAP_CHAR_LEN("OutlineLevel")},//#outline level,add<-zhaojianwei Outlinelevel
/* 0737 UNO_NAME_DESCRIPTION */ {MAP_CHAR_LEN("Description")},
/* 0738 UNO_NAME_META */ {MAP_CHAR_LEN("InContentMetadata")},
+// FIXME: these numbers are not correct post merge ...
/* 0739 UNO_NAME_IS_TEMPLATE */ {MAP_CHAR_LEN("IsTemplate")},
+/* 0740 UNO_NAME_EMBEDDED_OBJECT */ {MAP_CHAR_LEN("EmbeddedObject")},
/* 0740 UNO_NAME_VBA_DOCOBJ */ {MAP_CHAR_LEN("ThisVBADocObj")},
/* 0741 UNO_NAME_NESTED_TEXT_CONTENT */ {MAP_CHAR_LEN("NestedTextContent")},
};
-const SwPropNameLen& SwGetPropName( USHORT nId )
+const SwPropNameLen& SwGetPropName( sal_uInt16 nId )
{
return GetPropName( nId );
}
-const SwPropNameLen& GetPropName( USHORT nId )
+const SwPropNameLen& GetPropName( sal_uInt16 nId )
{
DBG_ASSERT( SW_PROPNAME_BEGIN <= nId && nId < SW_PROPNAME_END,
"GetPropName(): Wrong index" );
diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx
index a996fe11f084..18b30f77df44 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -195,7 +195,7 @@ sal_Bool SwXRedlineText::hasElements( ) throw(uno::RuntimeException)
SwXRedlinePortion::SwXRedlinePortion( const SwRedline* pRed,
const SwUnoCrsr* pPortionCrsr,
- uno::Reference< text::XText > xParent, BOOL bStart) :
+ uno::Reference< text::XText > xParent, sal_Bool bStart) :
SwXTextPortion(pPortionCrsr, xParent, bStart ? PORTION_REDLINE_START : PORTION_REDLINE_END),
pRedline(pRed)
{
@@ -295,8 +295,8 @@ void SwXRedlinePortion::Validate() throw( uno::RuntimeException )
//search for the redline
SwDoc* pDoc = pUnoCrsr->GetDoc();
const SwRedlineTbl& rRedTbl = pDoc->GetRedlineTbl();
- sal_Bool bFound = FALSE;
- for(USHORT nRed = 0; nRed < rRedTbl.Count() && !bFound; nRed++)
+ sal_Bool bFound = sal_False;
+ for(sal_uInt16 nRed = 0; nRed < rRedTbl.Count() && !bFound; nRed++)
bFound = pRedline == rRedTbl[nRed];
if(!bFound)
throw uno::RuntimeException();
@@ -473,14 +473,14 @@ uno::Any SwXRedline::getPropertyValue( const OUString& rPropertyName )
if(!pDoc)
throw uno::RuntimeException();
uno::Any aRet;
- BOOL bStart = rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_REDLINE_START));
+ sal_Bool bStart = rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_REDLINE_START));
if(bStart ||
rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_REDLINE_END)))
{
uno::Reference<XInterface> xRet;
SwNode* pNode = pRedline->GetNode();
if(!bStart && pRedline->HasMark())
- pNode = pRedline->GetNode(FALSE);
+ pNode = pRedline->GetNode(sal_False);
switch(pNode->GetNodeType())
{
case ND_SECTIONNODE:
diff --git a/sw/source/core/unocore/unoredlines.cxx b/sw/source/core/unocore/unoredlines.cxx
index 73348c3ce4a9..332cfc406b4b 100644
--- a/sw/source/core/unocore/unoredlines.cxx
+++ b/sw/source/core/unocore/unoredlines.cxx
@@ -76,7 +76,7 @@ uno::Any SwXRedlines::getByIndex(sal_Int32 nIndex)
uno::Any aRet;
if(rRedTbl.Count() > nIndex && nIndex >= 0)
{
- uno::Reference <beans::XPropertySet> xRet = SwXRedlines::GetObject( *rRedTbl.GetObject((USHORT)nIndex), *GetDoc() );
+ uno::Reference <beans::XPropertySet> xRet = SwXRedlines::GetObject( *rRedTbl.GetObject((sal_uInt16)nIndex), *GetDoc() );
aRet <<= xRet;
}
else
@@ -153,7 +153,7 @@ SwXRedlineEnumeration::~SwXRedlineEnumeration()
{
}
-BOOL SwXRedlineEnumeration::hasMoreElements(void) throw( uno::RuntimeException )
+sal_Bool SwXRedlineEnumeration::hasMoreElements(void) throw( uno::RuntimeException )
{
if(!pDoc)
throw uno::RuntimeException();
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index 1e8863b1ab68..f55c3c6b3037 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -988,7 +988,7 @@ SwXMeta::dispose() throw (uno::RuntimeException)
void SAL_CALL
SwXMeta::AttachImpl(const uno::Reference< text::XTextRange > & i_xTextRange,
- const USHORT i_nWhich)
+ const sal_uInt16 i_nWhich)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
SolarMutexGuard g;
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index f32d78f2641d..96d340287f2e 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -51,6 +51,7 @@
#include <unocrsr.hxx>
#include <section.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docsh.hxx>
#include <sfx2/docfile.hxx>
#include <docary.hxx>
@@ -288,7 +289,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
//das muss jetzt sal_True liefern
::sw::XTextRangeToSwPaM(aPam, xTextRange);
UnoActionContext aCont(pDoc);
- pDoc->StartUndo( UNDO_INSSECTION, NULL );
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_INSSECTION, NULL );
if (!m_pImpl->m_sName.getLength())
{
@@ -408,13 +409,13 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
{
pRet->CreateLink(CREATE_CONNECT);
}
- pRet->SetUpdateType( static_cast< USHORT >(
+ pRet->SetUpdateType( static_cast< sal_uInt16 >(
(m_pImpl->m_pProps->m_bUpdateType) ?
sfx2::LINKUPDATE_ALWAYS : sfx2::LINKUPDATE_ONCALL) );
}
// Undo-Klammerung hier beenden
- pDoc->EndUndo( UNDO_INSSECTION, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_INSSECTION, NULL );
m_pImpl->m_pProps.reset();
m_pImpl->m_bIsDescriptor = false;
}
@@ -503,7 +504,7 @@ lcl_UpdateLinkType(SwSection & rSection, bool const bLinkUpdateAlways = true)
{
rSection.CreateLink(CREATE_CONNECT);
}
- rSection.SetUpdateType( static_cast< USHORT >((bLinkUpdateAlways)
+ rSection.SetUpdateType( static_cast< sal_uInt16 >((bLinkUpdateAlways)
? sfx2::LINKUPDATE_ALWAYS : sfx2::LINKUPDATE_ONCALL) );
}
}
@@ -1150,11 +1151,11 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
}
const SwRedlineTbl& rRedTbl =
pFmt->GetDoc()->GetRedlineTbl();
- for (USHORT nRed = 0; nRed < rRedTbl.Count(); nRed++)
+ for (sal_uInt16 nRed = 0; nRed < rRedTbl.Count(); nRed++)
{
const SwRedline* pRedline = rRedTbl[nRed];
- SwNode const*const pRedPointNode = pRedline->GetNode(TRUE);
- SwNode const*const pRedMarkNode = pRedline->GetNode(FALSE);
+ SwNode const*const pRedPointNode = pRedline->GetNode(sal_True);
+ SwNode const*const pRedMarkNode = pRedline->GetNode(sal_False);
if ((pRedPointNode == pSectNode) ||
(pRedMarkNode == pSectNode))
{
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index e177d14c6029..dc407cbed2bb 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -360,7 +360,7 @@ void SwXFootnoteProperties::setPropertyValue(const OUString& rPropertyName, cons
break;
case WID_NUMBERING_TYPE :
{
- INT16 nTmp = 0;
+ sal_Int16 nTmp = 0;
aValue >>= nTmp;
if(nTmp >= 0 &&
(nTmp <= SVX_NUM_ARABIC ||
@@ -372,14 +372,14 @@ void SwXFootnoteProperties::setPropertyValue(const OUString& rPropertyName, cons
break;
case WID_START_AT:
{
- INT16 nTmp = 0;
+ sal_Int16 nTmp = 0;
aValue >>= nTmp;
aFtnInfo.nFtnOffset = nTmp;
}
break;
case WID_FOOTNOTE_COUNTING :
{
- INT16 nTmp = 0;
+ sal_Int16 nTmp = 0;
aValue >>= nTmp;
switch(nTmp)
{
@@ -671,14 +671,14 @@ void SwXEndnoteProperties::setPropertyValue(const OUString& rPropertyName, const
break;
case WID_NUMBERING_TYPE :
{
- INT16 nTmp = 0;
+ sal_Int16 nTmp = 0;
aValue >>= nTmp;
aEndInfo.aFmt.SetNumberingType(nTmp);
}
break;
case WID_START_AT:
{
- INT16 nTmp = 0;
+ sal_Int16 nTmp = 0;
aValue >>= nTmp;
aEndInfo.nFtnOffset = nTmp;
}
@@ -903,7 +903,7 @@ void SwXLineNumberingProperties::setPropertyValue(
case WID_NUMBERING_TYPE :
{
SvxNumberType aNumType(aInfo.GetNumType());
- INT16 nTmp = 0;
+ sal_Int16 nTmp = 0;
aValue >>= nTmp;
aNumType.SetNumberingType(nTmp);
aInfo.SetNumType(aNumType);
@@ -911,7 +911,7 @@ void SwXLineNumberingProperties::setPropertyValue(
break;
case WID_NUMBER_POSITION :
{
- INT16 nTmp = 0;
+ sal_Int16 nTmp = 0;
aValue >>= nTmp;
switch(nTmp)
{
@@ -932,17 +932,17 @@ void SwXLineNumberingProperties::setPropertyValue(
break;
case WID_DISTANCE :
{
- INT32 nVal = 0;
+ sal_Int32 nVal = 0;
aValue >>= nVal;
- INT32 nTmp = MM100_TO_TWIP(nVal);
+ sal_Int32 nTmp = MM100_TO_TWIP(nVal);
if (nTmp > USHRT_MAX)
nTmp = USHRT_MAX;
- aInfo.SetPosFromLeft( static_cast< USHORT >(nTmp) );
+ aInfo.SetPosFromLeft( static_cast< sal_uInt16 >(nTmp) );
}
break;
case WID_INTERVAL :
{
- INT16 nTmp = 0;
+ sal_Int16 nTmp = 0;
aValue >>= nTmp;
if( nTmp > 0)
aInfo.SetCountBy(nTmp);
@@ -957,7 +957,7 @@ void SwXLineNumberingProperties::setPropertyValue(
break;
case WID_SEPARATOR_INTERVAL:
{
- INT16 nTmp = 0;
+ sal_Int16 nTmp = 0;
aValue >>= nTmp;
if( nTmp >= 0)
aInfo.SetDividerCountBy(nTmp);
@@ -1167,7 +1167,7 @@ SwXNumberingRules::SwXNumberingRules(const SwNumRule& rRule) :
pDocShell(0),
pNumRule(new SwNumRule(rRule)),
m_pPropertySet(GetNumberingRulesSet()),
- bOwnNumRuleCreated(TRUE)
+ bOwnNumRuleCreated(sal_True)
{
sal_uInt16 i;
@@ -1197,7 +1197,7 @@ SwXNumberingRules::SwXNumberingRules(SwDocShell& rDocSh) :
pDocShell(&rDocSh),
pNumRule(0),
m_pPropertySet(GetNumberingRulesSet()),
- bOwnNumRuleCreated(FALSE)
+ bOwnNumRuleCreated(sal_False)
{
pDocShell->GetDoc()->GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
}
@@ -1207,14 +1207,14 @@ SwXNumberingRules::SwXNumberingRules(SwDoc& rDoc) :
pDocShell(0),
pNumRule(0),
m_pPropertySet(GetNumberingRulesSet()),
- bOwnNumRuleCreated(FALSE)
+ bOwnNumRuleCreated(sal_False)
{
rDoc.GetPageDescFromPool(RES_POOLPAGE_STANDARD)->Add(this);
sCreatedNumRuleName = rDoc.GetUniqueNumRuleName();
#if OSL_DEBUG_LEVEL > 1
sal_uInt16 nIndex =
#endif
- rDoc.MakeNumRule( sCreatedNumRuleName, 0, FALSE,
+ rDoc.MakeNumRule( sCreatedNumRuleName, 0, sal_False,
// --> OD 2008-06-06 #i89178#
numfunc::GetDefaultPositionAndSpaceMode() );
// <--
@@ -1691,7 +1691,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
SvxBrushItem* pSetBrush = 0;
Size* pSetSize = 0;
SwFmtVertOrient* pSetVOrient = 0;
- BOOL bCharStyleNameSet = FALSE;
+ sal_Bool bCharStyleNameSet = sal_False;
for(sal_uInt16 i = 0; i < nPropNameCount && !bExcept && !bWrongArg; i++)
{
@@ -1719,7 +1719,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
sal_Int16 nSet = 0;
pData->aVal >>= nSet;
if(nSet >= 0 && MAXLEVEL >= nSet)
- aFmt.SetIncludeUpperLevels( static_cast< BYTE >(nSet) );
+ aFmt.SetIncludeUpperLevels( static_cast< sal_uInt8 >(nSet) );
}
break;
case 2: //"Prefix",
@@ -1738,7 +1738,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
break;
case 4: //"CharStyleName",
{
- bCharStyleNameSet = TRUE;
+ bCharStyleNameSet = sal_True;
OUString uTmp;
pData->aVal >>= uTmp;
String sCharFmtName;
@@ -1789,7 +1789,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
break;
case 5: //"StartWith",
{
- INT16 nVal = 0;
+ sal_Int16 nVal = 0;
pData->aVal >>= nVal;
aFmt.SetStart(nVal);
}
@@ -2139,13 +2139,13 @@ void SwXNumberingRules::setPropertyValue( const OUString& rPropertyName, const A
if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_AUTOMATIC)))
{
- BOOL bVal = *(sal_Bool*)rValue.getValue();
+ sal_Bool bVal = *(sal_Bool*)rValue.getValue();
if(!pCreatedRule)
pDocRule ? pDocRule->SetAutoRule(bVal) : pNumRule->SetAutoRule(bVal);
}
else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_CONTINUOUS_NUMBERING)))
{
- BOOL bVal = *(sal_Bool*)rValue.getValue();
+ sal_Bool bVal = *(sal_Bool*)rValue.getValue();
pDocRule ? pDocRule->SetContinusNum(bVal) :
pCreatedRule ? pCreatedRule->SetContinusNum(bVal) : pNumRule->SetContinusNum(bVal);
}
@@ -2156,13 +2156,13 @@ void SwXNumberingRules::setPropertyValue( const OUString& rPropertyName, const A
}
else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_ABSOLUTE_MARGINS)))
{
- BOOL bVal = *(sal_Bool*)rValue.getValue();
+ sal_Bool bVal = *(sal_Bool*)rValue.getValue();
pDocRule ? pDocRule->SetAbsSpaces(bVal) :
pCreatedRule ? pCreatedRule->SetAbsSpaces(bVal) : pNumRule->SetAbsSpaces(bVal);
}
else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_NUMBERING_IS_OUTLINE)))
{
- BOOL bVal = *(sal_Bool*)rValue.getValue();
+ sal_Bool bVal = *(sal_Bool*)rValue.getValue();
SwNumRuleType eNumRuleType = bVal ? OUTLINE_RULE : NUM_RULE;
pDocRule ? pDocRule->SetRuleType(eNumRuleType) :
pCreatedRule ? pCreatedRule->SetRuleType(eNumRuleType) : pNumRule->SetRuleType(eNumRuleType);
@@ -2200,24 +2200,24 @@ Any SwXNumberingRules::getPropertyValue( const OUString& rPropertyName )
if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_AUTOMATIC)))
{
- BOOL bVal = pRule->IsAutoRule();
+ sal_Bool bVal = pRule->IsAutoRule();
aRet.setValue(&bVal, ::getBooleanCppuType());
}
else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_CONTINUOUS_NUMBERING)))
{
- BOOL bVal = pRule->IsContinusNum();
+ sal_Bool bVal = pRule->IsContinusNum();
aRet.setValue(&bVal, ::getBooleanCppuType());
}
else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_NAME)))
aRet <<= OUString(pRule->GetName());
else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_IS_ABSOLUTE_MARGINS)))
{
- BOOL bVal = pRule->IsAbsSpaces();
+ sal_Bool bVal = pRule->IsAbsSpaces();
aRet.setValue(&bVal, ::getBooleanCppuType());
}
else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_NUMBERING_IS_OUTLINE)))
{
- BOOL bVal = pRule->IsOutlineRule();
+ sal_Bool bVal = pRule->IsOutlineRule();
aRet.setValue(&bVal, ::getBooleanCppuType());
}
else if(rPropertyName.equalsAsciiL( SW_PROP_NAME(UNO_NAME_DEFAULT_LIST_ID)))
@@ -2366,7 +2366,7 @@ SwXTextColumns::SwXTextColumns(const SwFmtCol& rFmtCol) :
bIsAutomaticWidth(rFmtCol.IsOrtho()),
m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_COLUMS))
{
- USHORT nItemGutterWidth = rFmtCol.GetGutterWidth();
+ sal_uInt16 nItemGutterWidth = rFmtCol.GetGutterWidth();
nAutoDistance = bIsAutomaticWidth ?
USHRT_MAX == nItemGutterWidth ? DEF_GUTTER_WIDTH : (sal_Int32)nItemGutterWidth
: 0;
diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx
index ded8f5ca3592..5d531b17d899 100644
--- a/sw/source/core/unocore/unosrch.cxx
+++ b/sw/source/core/unocore/unosrch.cxx
@@ -169,7 +169,17 @@ void SwSearchProperties_Impl::FillItemSet(SfxItemSet& rSet, sal_Bool bIsValueSea
*pContourItem = 0,
*pCharColorItem = 0,
*pCasemapItem = 0,
- *pBrushItem = 0;
+ *pBrushItem = 0,
+ *pFontCJKItem = 0,
+ *pFontSizeCJKItem = 0,
+ *pCJKLangItem = 0,
+ *pCJKPostureItem = 0,
+ *pCJKWeightItem = 0,
+ *pFontCTLItem = 0,
+ *pFontSizeCTLItem = 0,
+ *pCTLLangItem = 0,
+ *pCTLPostureItem = 0,
+ *pCTLWeightItem = 0;
PropertyEntryVector_t::const_iterator aIt = aPropertyEntries.begin();
for(sal_uInt32 i = 0; i < nArrLen; i++, ++aIt)
@@ -354,6 +364,56 @@ void SwSearchProperties_Impl::FillItemSet(SfxItemSet& rSet, sal_Bool bIsValueSea
pWLineItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone();
pTempItem = pWLineItem;
break;
+ case RES_CHRATR_CJK_FONT:
+ if(!pFontCJKItem )
+ pFontCJKItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone();
+ pTempItem = pFontCJKItem;
+ break;
+ case RES_CHRATR_CJK_FONTSIZE:
+ if(!pFontSizeCJKItem )
+ pFontSizeCJKItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone();
+ pTempItem = pFontSizeCJKItem;
+ break;
+ case RES_CHRATR_CJK_LANGUAGE:
+ if(!pCJKLangItem )
+ pCJKLangItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone();
+ pTempItem = pCJKLangItem;
+ break;
+ case RES_CHRATR_CJK_POSTURE:
+ if(!pCJKPostureItem )
+ pCJKPostureItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone();
+ pTempItem = pCJKPostureItem;
+ break;
+ case RES_CHRATR_CJK_WEIGHT:
+ if(!pCJKWeightItem )
+ pCJKWeightItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone();
+ pTempItem = pCJKWeightItem;
+ break;
+ case RES_CHRATR_CTL_FONT:
+ if(!pFontCTLItem )
+ pFontCTLItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone();
+ pTempItem = pFontCTLItem;
+ break;
+ case RES_CHRATR_CTL_FONTSIZE:
+ if(!pFontSizeCTLItem )
+ pFontSizeCTLItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone();
+ pTempItem = pFontSizeCTLItem;
+ break;
+ case RES_CHRATR_CTL_LANGUAGE:
+ if(!pCTLLangItem )
+ pCTLLangItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone();
+ pTempItem = pCTLLangItem;
+ break;
+ case RES_CHRATR_CTL_POSTURE:
+ if(!pCTLPostureItem )
+ pCTLPostureItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone();
+ pTempItem = pCTLPostureItem;
+ break;
+ case RES_CHRATR_CTL_WEIGHT:
+ if(!pCTLWeightItem )
+ pCTLWeightItem = rSet.GetPool()->GetDefaultItem(aIt->nWID).Clone();
+ pTempItem = pCTLWeightItem;
+ break;
}
if(pTempItem)
{
@@ -497,7 +557,7 @@ void SwXTextSearch::setPropertyValue(const OUString& rPropertyName, const uno::A
{
if ( pEntry->nFlags & beans::PropertyAttribute::READONLY)
throw beans::PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
- sal_Bool bVal = FALSE;
+ sal_Bool bVal = sal_False;
if(aValue.getValueType() == ::getBooleanCppuType())
bVal = *(sal_Bool*)aValue.getValue();
switch(pEntry->nWID)
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index cd92c4273c0f..3fc84350cd5c 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -48,6 +48,7 @@
#include <editeng/paperinf.hxx>
#include <pagedesc.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docary.hxx>
#include <charfmt.hxx>
#include <cmdid.h>
@@ -410,7 +411,7 @@ void SwXStyleFamilies::loadStylesFromURL(const OUString& rURL,
aOpt.SetNumRules( bLoadStyleNumbering );
aOpt.SetMerge( !bLoadStyleOverwrite );
- ULONG nErr = pDocShell->LoadStylesFromFile( rURL, aOpt, TRUE );
+ sal_uLong nErr = pDocShell->LoadStylesFromFile( rURL, aOpt, sal_True );
if( nErr )
throw io::IOException();
}
@@ -585,7 +586,7 @@ sal_Int32 lcl_GetCountOrName ( const SwDoc &rDoc, SfxStyleFamily eFamily, String
sal_uInt16 nBaseCount = RES_POOLNUMRULE_END - RES_POOLNUMRULE_BEGIN;
nIndex = nIndex - nBaseCount;
const SwNumRuleTbl& rNumTbl = rDoc.GetNumRuleTbl();
- for(USHORT i = 0; i < rNumTbl.Count(); ++i)
+ for(sal_uInt16 i = 0; i < rNumTbl.Count(); ++i)
{
const SwNumRule& rRule = *rNumTbl[ i ];
if( rRule.IsAutoRule() )
@@ -1257,7 +1258,7 @@ uno::Sequence< OUString > SwXStyle::getSupportedServiceNames(void) throw( uno::R
return aRet;
}
-SwXStyle::SwXStyle( SwDoc *pDoc, SfxStyleFamily eFam, BOOL bConditional) :
+SwXStyle::SwXStyle( SwDoc *pDoc, SfxStyleFamily eFam, sal_Bool bConditional) :
m_pDoc( pDoc ),
pBasePool(0),
eFamily(eFam),
@@ -1470,7 +1471,7 @@ void SwXStyle::setParentStyle(const OUString& rParentStyle)
if(pBasePool)
{
pBasePool->SetSearchMask(eFamily);
- BOOL bExcept = FALSE;
+ sal_Bool bExcept = sal_False;
SfxStyleSheetBase* pBase = pBasePool->Find(sStyleName);
if(pBase)
{
@@ -1483,7 +1484,7 @@ void SwXStyle::setParentStyle(const OUString& rParentStyle)
}
}
else
- bExcept = TRUE;
+ bExcept = sal_True;
if(bExcept)
throw uno::RuntimeException();
}
@@ -1873,7 +1874,7 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
break;
case FN_UNO_IS_AUTO_UPDATE:
{
- BOOL bAuto = *(sal_Bool*)rValue.getValue();
+ sal_Bool bAuto = *(sal_Bool*)rValue.getValue();
if(SFX_STYLE_FAMILY_PARA == eFamily)
rBase.mxNewBase->GetCollection()->SetAutoUpdateFmt(bAuto);
else if(SFX_STYLE_FAMILY_FRAME == eFamily)
@@ -1893,7 +1894,7 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
sal_Bool bFailed = sal_False;
SwCondCollItem aCondItem;
- for(USHORT i = 0; i < nLen; i++)
+ for(sal_uInt16 i = 0; i < nLen; i++)
{
OUString aTmp;
if ((pSeq[i].Value >>= aTmp))
@@ -2169,7 +2170,7 @@ uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
uno::Any aRet;
if(FN_UNO_IS_PHYSICAL == rEntry.nWID)
{
- BOOL bPhys = pBase != 0;
+ sal_Bool bPhys = pBase != 0;
if(pBase)
{
bPhys = ((SwDocStyleSheet*)pBase)->IsPhysical();
@@ -2177,7 +2178,7 @@ uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
if( bPhys && SFX_STYLE_FAMILY_CHAR == eFamily &&
((SwDocStyleSheet*)pBase)->GetCharFmt() &&
((SwDocStyleSheet*)pBase)->GetCharFmt()->IsDefault() )
- bPhys = FALSE;
+ bPhys = sal_False;
}
aRet.setValue(&bPhys, ::getBooleanCppuType());
}
@@ -2247,7 +2248,7 @@ uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
break;
case FN_UNO_IS_AUTO_UPDATE:
{
- BOOL bAuto = FALSE;
+ sal_Bool bAuto = sal_False;
if(SFX_STYLE_FAMILY_PARA == eFamily)
bAuto = rBase.mxNewBase->GetCollection()->IsAutoUpdateFmt();
else if(SFX_STYLE_FAMILY_FRAME == eFamily)
@@ -2270,7 +2271,7 @@ uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
SwFmt *pFmt = ((SwDocStyleSheet*)pBase)->GetCollection();
const CommandStruct *pCmds = SwCondCollItem::GetCmds();
- for (USHORT n = 0; n < COND_COMMAND_COUNT; ++n)
+ for (sal_uInt16 n = 0; n < COND_COMMAND_COUNT; ++n)
{
String aStyleName;
@@ -2592,7 +2593,7 @@ uno::Sequence< beans::PropertyState > SwXStyle::getPropertyStates(
|| rPropName.EqualsAscii("Footer", 0, 6)))
{
sal_uInt16 nResId = lcl_ConvertFNToRES(pEntry->nWID);
- BOOL bFooter = rPropName.EqualsAscii("Footer", 0, 6);
+ sal_Bool bFooter = rPropName.EqualsAscii("Footer", 0, 6);
const SvxSetItem* pSetItem;
if(SFX_ITEM_SET == aSet.GetItemState(
bFooter ? SID_ATTR_PAGE_FOOTERSET : SID_ATTR_PAGE_HEADERSET,
@@ -3155,15 +3156,13 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
}
if(aBaseImpl.HasItemSet())
{
- BOOL bDoesUndo = GetDoc()->DoesUndo();
- if( bDoesUndo )
+ ::sw::UndoGuard const undoGuard(GetDoc()->GetIDocumentUndoRedo());
+ if (undoGuard.UndoWasEnabled())
{
// Fix i64460: as long as Undo of page styles with header/footer causes trouble...
- GetDoc()->DelAllUndoObj();
- GetDoc()->DoUndo( FALSE );
+ GetDoc()->GetIDocumentUndoRedo().DelAllUndoObj();
}
aBaseImpl.mxNewBase->SetItemSet(aBaseImpl.GetItemSet());
- GetDoc()->DoUndo( bDoesUndo );
}
}
@@ -3286,7 +3285,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
case FN_UNO_HEADER_ON:
{
//falls das SetItem nicht da ist, dann ist der Wert sal_False
- BOOL bRet = sal_False;
+ sal_Bool bRet = sal_False;
pRet[nProp].setValue(&bRet, ::getCppuBooleanType());
nRes = SID_ATTR_PAGE_ON;
}
@@ -3364,8 +3363,8 @@ MakeObject:
{
const SwPageDesc& rDesc = aBase.GetOldPageDesc();
const SwFrmFmt* pFrmFmt = 0;
- sal_Bool bShare = (bHeader && rDesc.IsHeaderShared()) ||
- (!bHeader && rDesc.IsFooterShared());
+ sal_Bool bShare = (bHeader && rDesc.IsHeaderShared())||
+ (!bHeader && rDesc.IsFooterShared());
// TextLeft returns the left content if there is one,
// Text and TextRight return the master content.
// TextRight does the same as Text and is for
@@ -3459,7 +3458,7 @@ void SwXPageStyle::setPropertyValue(const OUString& rPropertyName, const uno::An
}
SwXFrameStyle::SwXFrameStyle ( SwDoc *pDoc )
-: SwXStyle ( pDoc, SFX_STYLE_FAMILY_FRAME, FALSE)
+: SwXStyle ( pDoc, SFX_STYLE_FAMILY_FRAME, sal_False)
{
}
@@ -3622,7 +3621,7 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle(
{
if( !pDocShell )
throw uno::RuntimeException();
- const USHORT* pRange = 0;
+ const sal_uInt16* pRange = 0;
const SfxItemPropertySet* pPropSet = 0;
switch( eFamily )
{
@@ -3697,16 +3696,16 @@ SwAutoStylesEnumImpl::SwAutoStylesEnumImpl( SwDoc* pInitDoc, IStyleAccess::SwAut
// special case for ruby auto styles:
if ( IStyleAccess::AUTO_STYLE_RUBY == eFam )
{
- std::set< std::pair< USHORT, USHORT > > aRubyMap;
+ std::set< std::pair< sal_uInt16, sal_uInt16 > > aRubyMap;
SwAttrPool& rAttrPool = pDoc->GetAttrPool();
- USHORT nCount = rAttrPool.GetItemCount( RES_TXTATR_CJK_RUBY );
+ sal_uInt32 nCount = rAttrPool.GetItemCount2( RES_TXTATR_CJK_RUBY );
- for ( USHORT nI = 0; nI < nCount; ++nI )
+ for ( sal_uInt32 nI = 0; nI < nCount; ++nI )
{
- const SwFmtRuby* pItem = static_cast<const SwFmtRuby*>(rAttrPool.GetItem( RES_TXTATR_CJK_RUBY, nI ));
+ const SwFmtRuby* pItem = static_cast<const SwFmtRuby*>(rAttrPool.GetItem2( RES_TXTATR_CJK_RUBY, nI ));
if ( pItem && pItem->GetTxtRuby() )
{
- std::pair< USHORT, USHORT > aPair( pItem->GetPosition(), pItem->GetAdjustment() );
+ std::pair< sal_uInt16, sal_uInt16 > aPair( pItem->GetPosition(), pItem->GetAdjustment() );
if ( aRubyMap.find( aPair ) == aRubyMap.end() )
{
aRubyMap.insert( aPair );
@@ -4093,7 +4092,7 @@ uno::Sequence< beans::PropertyValue > SwXAutoStyle::getProperties() throw (uno::
while ( pItem )
{
- const USHORT nWID = pItem->Which();
+ const sal_uInt16 nWID = pItem->Which();
// TODO: Optimize - and fix! the old iteration filled each WhichId
// only once but there are more properties than WhichIds
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 3822fce8f238..217723790591 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -46,6 +46,7 @@
#include <hints.hxx>
#include <swtblfmt.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <shellres.hxx>
#include <docary.hxx>
#include <ndole.hxx>
@@ -158,7 +159,7 @@ void lcl_SetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimpleEntry* pE
sal_Int32 nRepeat = 0;
aValue >>= nRepeat;
if( nRepeat >= 0 && nRepeat < USHRT_MAX )
- pFmt->GetDoc()->SetRowsToRepeat( *pTable, (USHORT) nRepeat );
+ pFmt->GetDoc()->SetRowsToRepeat( *pTable, (sal_uInt16) nRepeat );
}
}
}
@@ -180,7 +181,7 @@ void lcl_SetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimpleEntry* pE
sal_Int16 nSet = 0;
aValue >>= nSet;
if(nSet && nSet <=100)
- aSz.SetWidthPercent( (BYTE)nSet );
+ aSz.SetWidthPercent( (sal_uInt8)nSet );
}
else if(FN_TABLE_IS_RELATIVE_WIDTH == pEntry->nWID)
{
@@ -226,10 +227,10 @@ uno::Any lcl_GetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimpleEntry
case FN_TABLE_HEADLINE_COUNT:
{
SwTable* pTable = SwTable::FindTable( pFmt );
- USHORT nRepeat = pTable->GetRowsToRepeat();
+ sal_uInt16 nRepeat = pTable->GetRowsToRepeat();
if(pEntry->nWID == FN_TABLE_HEADLINE_REPEAT)
{
- BOOL bTemp = nRepeat > 0;
+ sal_Bool bTemp = nRepeat > 0;
aRet.setValue(&bTemp, ::getCppuBooleanType());
}
else
@@ -247,7 +248,7 @@ uno::Any lcl_GetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimpleEntry
rSz.QueryValue(aRet, MID_FRMSIZE_REL_WIDTH);
else
{
- BOOL bTemp = 0 != rSz.GetWidthPercent();
+ sal_Bool bTemp = 0 != rSz.GetWidthPercent();
aRet.setValue(&bTemp, ::getBooleanCppuType());
}
}
@@ -295,16 +296,16 @@ uno::Any lcl_GetSpecialProperty(SwFrmFmt* pFmt, const SfxItemPropertySimpleEntry
if(FN_UNO_REDLINE_NODE_END == pEntry->nWID)
pTblNode = pTblNode->EndOfSectionNode();
const SwRedlineTbl& rRedTbl = pFmt->GetDoc()->GetRedlineTbl();
- for(USHORT nRed = 0; nRed < rRedTbl.Count(); nRed++)
+ for(sal_uInt16 nRed = 0; nRed < rRedTbl.Count(); nRed++)
{
const SwRedline* pRedline = rRedTbl[nRed];
- const SwNode* pRedPointNode = pRedline->GetNode(TRUE);
- const SwNode* pRedMarkNode = pRedline->GetNode(FALSE);
+ const SwNode* pRedPointNode = pRedline->GetNode(sal_True);
+ const SwNode* pRedMarkNode = pRedline->GetNode(sal_False);
if(pRedPointNode == pTblNode || pRedMarkNode == pTblNode)
{
const SwNode* pStartOfRedline = SwNodeIndex(*pRedPointNode) <= SwNodeIndex(*pRedMarkNode) ?
pRedPointNode : pRedMarkNode;
- BOOL bIsStart = pStartOfRedline == pTblNode;
+ sal_Bool bIsStart = pStartOfRedline == pTblNode;
aRet <<= SwXRedlinePortion::CreateRedlineProperties(*pRedline, bIsStart);
break;
}
@@ -466,7 +467,7 @@ String lcl_GetCellName( sal_Int32 nColumn, sal_Int32 nRow )
String sCellName;
if (nColumn < 0 || nRow < 0)
return sCellName;
- lcl_GetTblBoxColStr( static_cast< USHORT >(nColumn), sCellName );
+ lcl_GetTblBoxColStr( static_cast< sal_uInt16 >(nColumn), sCellName );
sCellName += String::CreateFromInt32( nRow + 1 );
return sCellName;
}
@@ -659,7 +660,7 @@ void lcl_SetTblSeparators(const uno::Any& rVal, SwTable* pTable, SwTableBox* pBo
{
aCols[i] = pArray[i].Position;
if(pArray[i].IsVisible == aCols.IsHidden(i) ||
- (!bRow && aCols.IsHidden(i)) ||
+ (!bRow && aCols.IsHidden(i)) ||
long(aCols[i] - long(nLastValue)) < 0 ||
UNO_TABLE_COLUMN_SUM < aCols[i] )
{
@@ -685,7 +686,7 @@ inline rtl::OUString lcl_getString( SwXCell &rCell )
* non UNO function call to set string in SwXCell
* --------------------------------------------------*/
void lcl_setString( SwXCell &rCell, const rtl::OUString &rTxt,
- BOOL bKeepNumberFmt )
+ sal_Bool bKeepNumberFmt )
{
if(rCell.IsValid())
{
@@ -721,9 +722,9 @@ void lcl_setValue( SwXCell &rCell, double nVal )
if(rCell.IsValid())
{
// Der Text mu? zunaechst (vielleicht) geloescht werden
- ULONG nNdPos = rCell.pBox->IsValidNumTxtNd( sal_True );
+ sal_uLong nNdPos = rCell.pBox->IsValidNumTxtNd( sal_True );
if(ULONG_MAX != nNdPos)
- lcl_setString( rCell, OUString(), TRUE ); // TRUE == keep number format
+ lcl_setString( rCell, OUString(), sal_True ); // sal_True == keep number format
SwDoc* pDoc = rCell.GetDoc();
UnoActionContext aAction(pDoc);
SwFrmFmt* pBoxFmt = rCell.pBox->ClaimFrmFmt();
@@ -913,7 +914,7 @@ void SwXCell::setFormula(const OUString& rFormula) throw( uno::RuntimeException
// Der Text mu? zunaechst (vielleicht) geloescht werden
sal_uInt32 nNdPos = pBox->IsValidNumTxtNd( sal_True );
if(USHRT_MAX == nNdPos)
- lcl_setString( *this, OUString(), TRUE );
+ lcl_setString( *this, OUString(), sal_True );
String sFml(rFormula);
if( sFml.EraseLeadingChars().Len() && '=' == sFml.GetChar( 0 ) )
sFml.Erase( 0, 1 );
@@ -1414,7 +1415,7 @@ uno::Any SwXTextTableRow::getPropertyValue(const OUString& rPropertyName) throw(
const SwFmtFrmSize& rSize = pLn->GetFrmFmt()->GetFrmSize();
if(FN_UNO_ROW_AUTO_HEIGHT== pEntry->nWID)
{
- BOOL bTmp = ATT_VAR_SIZE == rSize.GetHeightSizeType();
+ sal_Bool bTmp = ATT_VAR_SIZE == rSize.GetHeightSizeType();
aRet.setValue(&bTmp, ::getCppuBooleanType());
}
else
@@ -1613,7 +1614,7 @@ sal_Bool SwXTextTableCursor::goLeft(sal_Int16 Count, sal_Bool Expand) throw( uno
{
SwUnoTableCrsr* pTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
lcl_CrsrSelect( pTblCrsr, Expand );
- bRet = pTblCrsr->Left( Count,CRSR_SKIP_CHARS, FALSE, FALSE);
+ bRet = pTblCrsr->Left( Count,CRSR_SKIP_CHARS, sal_False, sal_False);
}
return bRet;
}
@@ -1627,7 +1628,7 @@ sal_Bool SwXTextTableCursor::goRight(sal_Int16 Count, sal_Bool Expand) throw( un
{
SwUnoTableCrsr* pTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
lcl_CrsrSelect( pTblCrsr, Expand );
- bRet = pTblCrsr->Right( Count, CRSR_SKIP_CHARS, FALSE, FALSE);
+ bRet = pTblCrsr->Right( Count, CRSR_SKIP_CHARS, sal_False, sal_False);
}
return bRet;
}
@@ -1703,7 +1704,7 @@ sal_Bool SwXTextTableCursor::mergeRange(void) throw( uno::RuntimeException )
bRet = TBLMERGE_OK == pTblCrsr->GetDoc()->MergeTbl(*pTblCrsr);
if(bRet)
{
- USHORT nCount = pTblCrsr->GetBoxesCount();
+ sal_uInt16 nCount = pTblCrsr->GetBoxesCount();
while(nCount--)
pTblCrsr->DeleteBox(nCount);
}
@@ -1843,7 +1844,7 @@ uno::Any SwXTextTableCursor::getPropertyValue(const OUString& rPropertyName)
case FN_UNO_PARA_STYLE:
{
SwFmtColl *const pFmt =
- SwUnoCursorHelper::GetCurTxtFmtColl(*pUnoCrsr, FALSE);
+ SwUnoCursorHelper::GetCurTxtFmtColl(*pUnoCrsr, sal_False);
OUString sRet;
if(pFmt)
sRet = pFmt->GetName();
@@ -1907,8 +1908,8 @@ public:
SwTableProperties_Impl();
~SwTableProperties_Impl();
- void SetProperty(USHORT nWhichId, USHORT nMemberId, const uno::Any& aVal);
- sal_Bool GetProperty(USHORT nWhichId, USHORT nMemberId, const uno::Any*& rpAny);
+ void SetProperty(sal_uInt16 nWhichId, sal_uInt16 nMemberId, const uno::Any& aVal);
+ sal_Bool GetProperty(sal_uInt16 nWhichId, sal_uInt16 nMemberId, const uno::Any*& rpAny);
void ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc);
};
@@ -1921,12 +1922,12 @@ SwTableProperties_Impl::~SwTableProperties_Impl()
{
}
-void SwTableProperties_Impl::SetProperty(USHORT nWhichId, USHORT nMemberId, const uno::Any& rVal)
+void SwTableProperties_Impl::SetProperty(sal_uInt16 nWhichId, sal_uInt16 nMemberId, const uno::Any& rVal)
{
aAnyMap.SetValue( nWhichId, nMemberId, rVal );
}
-sal_Bool SwTableProperties_Impl::GetProperty(USHORT nWhichId, USHORT nMemberId, const uno::Any*& rpAny )
+sal_Bool SwTableProperties_Impl::GetProperty(sal_uInt16 nWhichId, sal_uInt16 nMemberId, const uno::Any*& rpAny )
{
return aAnyMap.FillValue( nWhichId, nMemberId, rpAny );
}
@@ -1996,7 +1997,7 @@ void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
const uno::Any* pPgNo;
if(GetProperty(RES_PAGEDESC, MID_PAGEDESC_PAGENUMOFFSET, pPgNo ))
{
- INT16 nTmp = 0;
+ sal_Int16 nTmp = 0;
(*pPgNo) >>= nTmp;
aDesc.SetNumOffset( nTmp );
}
@@ -2050,7 +2051,7 @@ void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
((SfxPoolItem&)aSz).PutValue(*pWidth, MID_FRMSIZE_WIDTH);
bPutSize = sal_True;
}
- sal_Bool bTemp = pSzRel ? *(sal_Bool*)pSzRel->getValue() : FALSE;
+ sal_Bool bTemp = pSzRel ? *(sal_Bool*)pSzRel->getValue() : sal_False;
if(pSzRel && bTemp && pRelWidth)
{
((SfxPoolItem&)aSz).PutValue(*pRelWidth, MID_FRMSIZE_REL_WIDTH|CONVERT_TWIPS);
@@ -2106,7 +2107,6 @@ void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
rDoc.SetAttr( aSet, *rTbl.GetFrmFmt() );
}
}
-
const uno::Sequence< sal_Int8 > & SwXTextTable::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
@@ -2299,7 +2299,7 @@ void SwXTextTable::attachToRange(const uno::Reference< text::XTextRange > & xTex
{
UnoActionContext aCont( pDoc );
- pDoc->StartUndo(UNDO_EMPTY, NULL);
+ pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_EMPTY, NULL);
const SwTable *pTable = 0;
if( 0 != aPam.Start()->nContent.GetIndex() )
{
@@ -2358,9 +2358,8 @@ void SwXTextTable::attachToRange(const uno::Reference< text::XTextRange > & xTex
bIsDescriptor = sal_False;
DELETEZ(pTableProps);
}
- pDoc->EndUndo( UNDO_END, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
}
-
}
else
throw lang::IllegalArgumentException();
@@ -2576,10 +2575,10 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXTextTable::getDataArray()
{
// check if table box value item is set
SwFrmFmt* pBoxFmt = pBox->GetFrmFmt();
- BOOL bIsNum = pBoxFmt->GetItemState( RES_BOXATR_VALUE, FALSE ) == SFX_ITEM_SET;
+ sal_Bool bIsNum = pBoxFmt->GetItemState( RES_BOXATR_VALUE, sal_False ) == SFX_ITEM_SET;
//const SfxPoolItem* pItem;
//SwDoc* pDoc = pXCell->GetDoc();
- //BOOL bIsText = (SFX_ITEM_SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, sal_True, &pItem)
+ //sal_Bool bIsText = (SFX_ITEM_SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, sal_True, &pItem)
// || pDoc->GetNumberFormatter()->IsTextFormat(((SwTblBoxNumFormat*)pItem)->GetValue())
// || ((SwTblBoxNumFormat*)pItem)->GetValue() == NUMBERFORMAT_TEXT);
@@ -2656,7 +2655,7 @@ void SAL_CALL SwXTextTable::setDataArray(
if( (rAny >>= d) )
lcl_setValue( *pXCell, d );
else
- lcl_setString( *pXCell, OUString(), TRUE );
+ lcl_setString( *pXCell, OUString(), sal_True );
}
}
@@ -3152,14 +3151,14 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName,
!aTableBorderDistances.IsBottomDistanceValid ))
break;
- USHORT nLeftDistance = MM100_TO_TWIP_UNSIGNED( aTableBorderDistances.LeftDistance);
- USHORT nRightDistance = MM100_TO_TWIP_UNSIGNED( aTableBorderDistances.RightDistance);
- USHORT nTopDistance = MM100_TO_TWIP_UNSIGNED( aTableBorderDistances.TopDistance);
- USHORT nBottomDistance = MM100_TO_TWIP_UNSIGNED( aTableBorderDistances.BottomDistance);
+ sal_uInt16 nLeftDistance = MM100_TO_TWIP_UNSIGNED( aTableBorderDistances.LeftDistance);
+ sal_uInt16 nRightDistance = MM100_TO_TWIP_UNSIGNED( aTableBorderDistances.RightDistance);
+ sal_uInt16 nTopDistance = MM100_TO_TWIP_UNSIGNED( aTableBorderDistances.TopDistance);
+ sal_uInt16 nBottomDistance = MM100_TO_TWIP_UNSIGNED( aTableBorderDistances.BottomDistance);
SwDoc* pDoc = pFmt->GetDoc();
SwTable* pTable = SwTable::FindTable( pFmt );
SwTableLines &rLines = pTable->GetTabLines();
- pDoc->StartUndo(UNDO_START, NULL);
+ pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_START, NULL);
for(sal_uInt16 i = 0; i < rLines.Count(); i++)
{
SwTableLine* pLine = rLines.GetObject(i);
@@ -3170,9 +3169,9 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName,
const SwFrmFmt* pBoxFmt = pBox->GetFrmFmt();
const SvxBoxItem& rBox = pBoxFmt->GetBox();
if(
- (aTableBorderDistances.IsLeftDistanceValid && nLeftDistance != rBox.GetDistance( BOX_LINE_LEFT )) ||
- (aTableBorderDistances.IsRightDistanceValid && nRightDistance != rBox.GetDistance( BOX_LINE_RIGHT )) ||
- (aTableBorderDistances.IsTopDistanceValid && nTopDistance != rBox.GetDistance( BOX_LINE_TOP )) ||
+ (aTableBorderDistances.IsLeftDistanceValid && nLeftDistance != rBox.GetDistance( BOX_LINE_LEFT )) ||
+ (aTableBorderDistances.IsRightDistanceValid && nRightDistance != rBox.GetDistance( BOX_LINE_RIGHT )) ||
+ (aTableBorderDistances.IsTopDistanceValid && nTopDistance != rBox.GetDistance( BOX_LINE_TOP )) ||
(aTableBorderDistances.IsBottomDistanceValid && nBottomDistance != rBox.GetDistance( BOX_LINE_BOTTOM )))
{
SvxBoxItem aSetBox( rBox );
@@ -3189,7 +3188,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName,
}
}
}
- pDoc->EndUndo(UNDO_END, NULL);
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_END, NULL);
}
break;
case FN_UNO_TABLE_COLUMN_SEPARATORS:
@@ -3326,10 +3325,10 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be
SwTable* pTable = SwTable::FindTable( pFmt );
const SwTableLines &rLines = pTable->GetTabLines();
bool bFirst = true;
- USHORT nLeftDistance = 0;
- USHORT nRightDistance = 0;
- USHORT nTopDistance = 0;
- USHORT nBottomDistance = 0;
+ sal_uInt16 nLeftDistance = 0;
+ sal_uInt16 nRightDistance = 0;
+ sal_uInt16 nTopDistance = 0;
+ sal_uInt16 nBottomDistance = 0;
for(sal_uInt16 i = 0; i < rLines.Count(); i++)
{
@@ -3390,7 +3389,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be
}
break;
case FN_UNO_TABLE_COLUMN_RELATIVE_SUM:
- aRet <<= (INT16) UNO_TABLE_COLUMN_SUM;
+ aRet <<= (sal_Int16) UNO_TABLE_COLUMN_SUM;
break;
case RES_ANCHOR:
//AnchorType ist readonly und maybevoid und wird nicht geliefert
@@ -3505,7 +3504,7 @@ void SwXTextTable::setName(const OUString& rName) throw( uno::RuntimeException )
while ( 0 != (pStNd = aIdx.GetNode().GetStartNode()) )
{
aIdx++;
- SwNode *pNd = pFmt->GetDoc()->GetNodes()[aIdx];
+ SwNode *const pNd = & aIdx.GetNode();
if ( pNd->IsOLENode() &&
aOldName == ((SwOLENode*)pNd)->GetChartTblName() )
{
@@ -3817,8 +3816,8 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
0);
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
- aBoxInfo.SetValid(0xff, FALSE);
- BYTE nValid = 0;
+ aBoxInfo.SetValid(0xff, sal_False);
+ sal_uInt8 nValid = 0;
switch(pEntry->nMemberId & ~CONVERT_TWIPS)
{
case LEFT_BORDER : nValid = VALID_LEFT; break;
@@ -3832,7 +3831,7 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName,
nValid = VALID_DISTANCE;
break;
}
- aBoxInfo.SetValid(nValid, TRUE);
+ aBoxInfo.SetValid(nValid, sal_True);
aSet.Put(aBoxInfo);
@@ -3953,7 +3952,7 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName) throw( be
case FN_UNO_PARA_STYLE:
{
SwFmtColl *const pTmpFmt =
- SwUnoCursorHelper::GetCurTxtFmtColl(*pTblCrsr, FALSE);
+ SwUnoCursorHelper::GetCurTxtFmtColl(*pTblCrsr, sal_False);
OUString sRet;
if(pFmt)
sRet = pTmpFmt->GetName();
@@ -4079,8 +4078,8 @@ void SwXCellRange::GetDataSequence(
if (pAnyData)
{
// check if table box value item is set
- BOOL bIsNum = pBox->GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, FALSE ) == SFX_ITEM_SET;
- //ULONG nNdPos = pBox->IsValidNumTxtNd( sal_True );
+ sal_Bool bIsNum = pBox->GetFrmFmt()->GetItemState( RES_BOXATR_VALUE, sal_False ) == SFX_ITEM_SET;
+ //sal_uLong nNdPos = pBox->IsValidNumTxtNd( sal_True );
if (!bIsNum/* && ULONG_MAX == nNdPos*/)
pAnyData[nDtaCnt++] <<= lcl_getString(*pXCell);
else
@@ -4199,10 +4198,10 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXCellRange::getDataArray()
{
// check if table box value item is set
SwFrmFmt* pBoxFmt = pBox->GetFrmFmt();
- BOOL bIsNum = pBoxFmt->GetItemState( RES_BOXATR_VALUE, FALSE ) == SFX_ITEM_SET;
+ sal_Bool bIsNum = pBoxFmt->GetItemState( RES_BOXATR_VALUE, sal_False ) == SFX_ITEM_SET;
//const SfxPoolItem* pItem;
//SwDoc* pDoc = pXCell->GetDoc();
- //BOOL bIsText = (SFX_ITEM_SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, sal_True, &pItem)
+ //sal_Bool bIsText = (SFX_ITEM_SET != pBoxFmt->GetAttrSet().GetItemState(RES_BOXATR_FORMAT, sal_True, &pItem)
// || pDoc->GetNumberFormatter()->IsTextFormat(((SwTblBoxNumFormat*)pItem)->GetValue())
// || ((SwTblBoxNumFormat*)pItem)->GetValue() == NUMBERFORMAT_TEXT);
@@ -4276,7 +4275,7 @@ void SAL_CALL SwXCellRange::setDataArray(
if( (rAny >>= d) )
lcl_setValue( *pXCell, d );
else
- lcl_setString( *pXCell, OUString(), TRUE );
+ lcl_setString( *pXCell, OUString(), sal_True );
}
}
}
@@ -4759,7 +4758,7 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( uno:
throw uno::RuntimeException();
else
{
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = sal_False;
SwTable* pTable = SwTable::FindTable( pFrmFmt );
if(!pTable->IsTblComplex())
{
@@ -4791,7 +4790,7 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( uno:
UnoActionContext aAction(pFrmFmt->GetDoc());
pFrmFmt->GetDoc()->DeleteRow(*pUnoCrsr);
delete pUnoCrsr;
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
{
// hier muessen die Actions aufgehoben werden
@@ -4876,7 +4875,7 @@ uno::Any SwXTableColumns::getByIndex(sal_Int32 nIndex)
throw uno::RuntimeException();
else
{
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
SwTable* pTable = SwTable::FindTable( pFrmFmt );
if(!pTable->IsTblComplex())
{
@@ -4968,7 +4967,7 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( u
throw uno::RuntimeException();
else
{
- BOOL bSuccess = FALSE;
+ sal_Bool bSuccess = sal_False;
SwTable* pTable = SwTable::FindTable( pFrmFmt );
if(!pTable->IsTblComplex())
{
@@ -5000,7 +4999,7 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( u
UnoActionContext aAction(pFrmFmt->GetDoc());
pFrmFmt->GetDoc()->DeleteCol(*pUnoCrsr);
delete pUnoCrsr;
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
{
// hier muessen die Actions aufgehoben werden
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index f7967065b757..86c2226a9a57 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -29,6 +29,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <stdlib.h>
+
+#include <memory>
+#include <iostream>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/text/ControlCharacter.hpp>
@@ -58,12 +62,12 @@
#include <unoredline.hxx>
#include <unomap.hxx>
#include <unoprnms.hxx>
-#include <undobj.hxx>
#include <unoparagraph.hxx>
#include <unocrsrhelper.hxx>
#include <docsh.hxx>
#include <docary.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <redline.hxx>
#include <swundo.hxx>
#include <section.hxx>
@@ -73,10 +77,7 @@
#include <crsskip.hxx>
#include <ndtxt.hxx>
-#include <memory>
-#include <stdlib.h>
-#include <iostream>
using namespace ::com::sun::star;
using ::rtl::OUString;
@@ -390,12 +391,9 @@ throw (uno::RuntimeException)
// so the text is inserted before
UnoActionContext aContext(GetDoc());
SwPaM aInsertPam(*pPam->Start());
- const sal_Bool bGroupUndo = GetDoc()->DoesGroupUndo();
- GetDoc()->DoGroupUndo(sal_False);
-
+ ::sw::GroupUndoGuard const undoGuard(GetDoc()->GetIDocumentUndoRedo());
SwUnoCursorHelper::DocInsertStringSplitCR(
*GetDoc(), aInsertPam, rString, bForceExpandHints );
- GetDoc()->DoGroupUndo(bGroupUndo);
}
}
@@ -489,7 +487,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
SwCursor aCrsr(*aTmp.GetPoint(),0,false);
SwUnoCursorHelper::SelectPam(aCrsr, true);
- aCrsr.Left(1, CRSR_SKIP_CHARS, FALSE, FALSE);
+ aCrsr.Left(1, CRSR_SKIP_CHARS, sal_False, sal_False);
//hier muss der uebergebene PaM umgesetzt werden:
if (pRange)
{
@@ -943,7 +941,7 @@ SwXText::setString(const OUString& rString) throw (uno::RuntimeException)
throw uno::RuntimeException();
}
- GetDoc()->StartUndo(UNDO_START, NULL);
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_START, NULL);
//insert an empty paragraph at the start and at the end to ensure that
//all tables and sections can be removed by the selecting text::XTextCursor
if (CURSOR_META != m_pImpl->m_eType)
@@ -955,7 +953,7 @@ SwXText::setString(const OUString& rString) throw (uno::RuntimeException)
//the inserting of nodes should only be done if really necessary
//to prevent #97924# (removes paragraph attributes when setting the text
//e.g. of a table cell
- BOOL bInsertNodes = FALSE;
+ sal_Bool bInsertNodes = sal_False;
SwNodeIndex aStartIdx(*pStartNode);
do
{
@@ -964,7 +962,7 @@ SwXText::setString(const OUString& rString) throw (uno::RuntimeException)
if(rCurrentNode.GetNodeType() == ND_SECTIONNODE
||rCurrentNode.GetNodeType() == ND_TABLENODE)
{
- bInsertNodes = TRUE;
+ bInsertNodes = sal_True;
break;
}
}
@@ -981,14 +979,14 @@ SwXText::setString(const OUString& rString) throw (uno::RuntimeException)
const uno::Reference< text::XTextCursor > xRet = CreateCursor();
if(!xRet.is())
{
- GetDoc()->EndUndo(UNDO_END, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_END, NULL);
uno::RuntimeException aRuntime;
aRuntime.Message = C2U(cInvalidObject);
throw aRuntime;
}
xRet->gotoEnd(sal_True);
xRet->setString(rString);
- GetDoc()->EndUndo(UNDO_END, NULL);
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_END, NULL);
}
//FIXME why is CheckForOwnMember duplicated in some insert methods?
@@ -1168,12 +1166,12 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
case FN_UNO_REDLINE_NODE_END:
{
const SwRedlineTbl& rRedTbl = GetDoc()->GetRedlineTbl();
- const USHORT nRedTblCount = rRedTbl.Count();
+ const sal_uInt16 nRedTblCount = rRedTbl.Count();
if (nRedTblCount > 0)
{
SwStartNode const*const pStartNode = GetStartNode();
- const ULONG nOwnIndex = pStartNode->EndOfSectionIndex();
- for (USHORT nRed = 0; nRed < nRedTblCount; nRed++)
+ const sal_uLong nOwnIndex = pStartNode->EndOfSectionIndex();
+ for (sal_uInt16 nRed = 0; nRed < nRedTblCount; nRed++)
{
SwRedline const*const pRedline = rRedTbl[nRed];
SwPosition const*const pRedStart = pRedline->Start();
@@ -1181,7 +1179,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
if (nOwnIndex == nRedNode.GetIndex())
{
aRet <<= SwXRedlinePortion::CreateRedlineProperties(
- *pRedline, TRUE);
+ *pRedline, sal_True);
break;
}
}
@@ -1286,7 +1284,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
bool bIllegalException = false;
bool bRuntimeException = false;
::rtl::OUString sMessage;
- m_pDoc->StartUndo(UNDO_START , NULL);
+ m_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_START , NULL);
// find end node, go backward - don't skip tables because the new
// paragraph has to be the last node
//aPam.Move( fnMoveBackward, fnGoNode );
@@ -1338,11 +1336,10 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
}
}
}
- m_pDoc->EndUndo(UNDO_END, NULL);
+ m_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_END, NULL);
if (bIllegalException || bRuntimeException)
{
- SwUndoIter aUndoIter( &aPam, UNDO_EMPTY );
- m_pDoc->Undo(aUndoIter);
+ m_pDoc->GetIDocumentUndoRedo().Undo();
if (bIllegalException)
{
lang::IllegalArgumentException aEx;
@@ -1396,7 +1393,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
bool bIllegalException = false;
bool bRuntimeException = false;
::rtl::OUString sMessage;
- m_pImpl->m_pDoc->StartUndo(UNDO_INSERT, NULL);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, NULL);
// SwPaM aPam(*pStartNode->EndOfSectionNode());
//aPam.Move( fnMoveBackward, fnGoNode );
@@ -1451,11 +1448,10 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
}
}
}
- m_pImpl->m_pDoc->EndUndo(UNDO_INSERT, NULL);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL);
if (bIllegalException || bRuntimeException)
{
- SwUndoIter aUndoIter( pCursor, UNDO_EMPTY );
- m_pImpl->m_pDoc->Undo(aUndoIter);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().Undo();
if (bIllegalException)
{
lang::IllegalArgumentException aEx;
@@ -1497,7 +1493,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
}
uno::Reference< text::XTextRange > xRet;
- m_pImpl->m_pDoc->StartUndo(UNDO_INSERT, NULL);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, NULL);
// find end node, go backward - don't skip tables because the
// new paragraph has to be the last node
SwPaM aPam(*pStartNode->EndOfSectionNode());
@@ -1532,7 +1528,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
throw uno::RuntimeException();
}
}
- m_pImpl->m_pDoc->EndUndo(UNDO_INSERT, NULL);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, NULL);
return xRet;
}
@@ -1579,7 +1575,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
pEndRange->Invalidate();
}
- m_pImpl->m_pDoc->StartUndo( UNDO_START, NULL );
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
bool bIllegalException = false;
bool bRuntimeException = false;
::rtl::OUString sMessage;
@@ -1739,11 +1735,10 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
}
}
- m_pImpl->m_pDoc->EndUndo(UNDO_END, NULL);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_END, NULL);
if (bIllegalException || bRuntimeException)
{
- SwUndoIter aUndoIter( &aStartPam, UNDO_EMPTY );
- m_pImpl->m_pDoc->Undo(aUndoIter);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().Undo();
if (bIllegalException)
{
lang::IllegalArgumentException aEx;
@@ -1903,10 +1898,10 @@ void SwXText::Impl::ConvertCell(
else
{
// check the predecessor
- const ULONG nLastNodeIndex = rLastPaM.End()->nNode.GetIndex();
- const ULONG nStartCellNodeIndex =
+ const sal_uLong nLastNodeIndex = rLastPaM.End()->nNode.GetIndex();
+ const sal_uLong nStartCellNodeIndex =
aStartCellPam.Start()->nNode.GetIndex();
- const ULONG nLastNodeEndIndex = rLastPaM.End()->nNode.GetIndex();
+ const sal_uLong nLastNodeEndIndex = rLastPaM.End()->nNode.GetIndex();
if (nLastNodeIndex == nStartCellNodeIndex)
{
// same node as predecessor then equal nContent?
@@ -2220,8 +2215,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
if(bExcept)
{
- SwUndoIter aUndoIter( &aLastPaM, UNDO_EMPTY );
- m_pImpl->m_pDoc->Undo(aUndoIter);
+ m_pImpl->m_pDoc->GetIDocumentUndoRedo().Undo();
throw lang::IllegalArgumentException();
}
diff --git a/sw/source/core/unocore/unotextmarkup.cxx b/sw/source/core/unocore/unotextmarkup.cxx
index cc43a30ccfc6..bbc66172162f 100644
--- a/sw/source/core/unocore/unotextmarkup.cxx
+++ b/sw/source/core/unocore/unotextmarkup.cxx
@@ -145,7 +145,7 @@ void SAL_CALL SwXTextMarkup::commitTextMarkup(
{
nStart = aStartPos.mnSubPos;
const xub_StrLen nFieldPosModel = static_cast< xub_StrLen >(aStartPos.mnPos);
- const USHORT nInsertPos = pWList->GetWrongPos( nFieldPosModel );
+ const sal_uInt16 nInsertPos = pWList->GetWrongPos( nFieldPosModel );
SwWrongList* pSubList = pWList->SubList( nInsertPos );
if ( !pSubList )
@@ -174,7 +174,7 @@ void SAL_CALL SwXTextMarkup::commitTextMarkup(
if( bStartInField && nType != text::TextMarkupType::SENTENCE )
{
const xub_StrLen nFieldPosModel = static_cast< xub_StrLen >(aStartPos.mnPos);
- const USHORT nInsertPos = pWList->GetWrongPos( nFieldPosModel );
+ const sal_uInt16 nInsertPos = pWList->GetWrongPos( nFieldPosModel );
SwWrongList* pSubList = pWList->SubList( nInsertPos );
if ( !pSubList )
{
@@ -200,7 +200,7 @@ void SAL_CALL SwXTextMarkup::commitTextMarkup(
if( bEndInField && nType != text::TextMarkupType::SENTENCE )
{
const xub_StrLen nFieldPosModel = static_cast< xub_StrLen >(aEndPos.mnPos);
- const USHORT nInsertPos = pWList->GetWrongPos( nFieldPosModel );
+ const sal_uInt16 nInsertPos = pWList->GetWrongPos( nFieldPosModel );
SwWrongList* pSubList = pWList->SubList( nInsertPos );
if ( !pSubList )
{
@@ -255,7 +255,7 @@ void lcl_commitGrammarMarkUp(
{
nStart = aStartPos.mnSubPos;
const xub_StrLen nFieldPosModel = static_cast< xub_StrLen >(aStartPos.mnPos);
- const USHORT nInsertPos = pWList->GetWrongPos( nFieldPosModel );
+ const sal_uInt16 nInsertPos = pWList->GetWrongPos( nFieldPosModel );
SwGrammarMarkUp* pSubList = (SwGrammarMarkUp*)pWList->SubList( nInsertPos );
if ( !pSubList )
@@ -281,7 +281,7 @@ void lcl_commitGrammarMarkUp(
if( bStartInField && nType != text::TextMarkupType::SENTENCE )
{
const xub_StrLen nFieldPosModel = static_cast< xub_StrLen >(aStartPos.mnPos);
- const USHORT nInsertPos = pWList->GetWrongPos( nFieldPosModel );
+ const sal_uInt16 nInsertPos = pWList->GetWrongPos( nFieldPosModel );
SwGrammarMarkUp* pSubList = (SwGrammarMarkUp*)pWList->SubList( nInsertPos );
if ( !pSubList )
{
@@ -299,7 +299,7 @@ void lcl_commitGrammarMarkUp(
if( bEndInField && nType != text::TextMarkupType::SENTENCE )
{
const xub_StrLen nFieldPosModel = static_cast< xub_StrLen >(aEndPos.mnPos);
- const USHORT nInsertPos = pWList->GetWrongPos( nFieldPosModel );
+ const sal_uInt16 nInsertPos = pWList->GetWrongPos( nFieldPosModel );
SwGrammarMarkUp* pSubList = (SwGrammarMarkUp*)pWList->SubList( nInsertPos );
if ( !pSubList )
{
diff --git a/sw/source/core/view/makefile.mk b/sw/source/core/view/makefile.mk
deleted file mode 100644
index 0ac0e0d106cb..000000000000
--- a/sw/source/core/view/makefile.mk
+++ /dev/null
@@ -1,61 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=view
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/vdraw.obj \
- $(SLO)$/viewimp.obj \
- $(SLO)$/viewsh.obj \
- $(SLO)$/pagepreviewlayout.obj \
- $(SLO)$/printdata.obj \
- $(SLO)$/viewpg.obj \
- $(SLO)$/vnew.obj \
- $(SLO)$/vprint.obj
-
-
-
-EXCEPTIONSFILES = \
- $(SLO)$/pagepreviewlayout.obj
-
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index e9bcc5df18cd..eae56dde8d50 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -65,8 +65,7 @@ SwPagePreviewLayout::SwPagePreviewLayout( ViewShell& _rParentViewShell,
mbBookPreview = false;
mbBookPreviewModeToggled = false;
- const SwPrintData* pPrintData = mrParentViewShell.getIDocumentDeviceAccess()->getPrintData();
- mbPrintEmptyPages = pPrintData ? pPrintData->IsPrintEmptyPages() : true;
+ mbPrintEmptyPages = mrParentViewShell.getIDocumentDeviceAccess()->getPrintData().IsPrintEmptyPages();
}
void SwPagePreviewLayout::_Clear()
@@ -995,7 +994,7 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
// prepare paint
if ( maPrevwPages.size() > 0 )
{
- mrParentViewShell.Imp()->bFirstPageInvalid = FALSE;
+ mrParentViewShell.Imp()->bFirstPageInvalid = sal_False;
mrParentViewShell.Imp()->pFirstVisPage =
const_cast<SwPageFrm*>(maPrevwPages[0]->pPage);
}
@@ -1134,7 +1133,7 @@ void SwPagePreviewLayout::Repaint( const Rectangle _aInvalidCoreRect ) const
// prepare paint
if ( maPrevwPages.size() > 0 )
{
- mrParentViewShell.Imp()->bFirstPageInvalid = FALSE;
+ mrParentViewShell.Imp()->bFirstPageInvalid = sal_False;
mrParentViewShell.Imp()->pFirstVisPage =
const_cast<SwPageFrm*>(maPrevwPages[0]->pPage);
}
@@ -1377,7 +1376,7 @@ sal_uInt16 SwPagePreviewLayout::ConvertRelativeToAbsolutePageNum( sal_uInt16 _nR
const SwPageFrm* pTmpPage = static_cast<const SwPageFrm*>(mrLayoutRootFrm.Lower());
const SwPageFrm* pRet = 0;
- USHORT i = 0;
+ sal_uInt16 i = 0;
while( pTmpPage && i != _nRelPageNum )
{
if ( !pTmpPage->IsEmptyPage() )
diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx
index a8c1bbc05c6e..19193935cb76 100644
--- a/sw/source/core/view/printdata.cxx
+++ b/sw/source/core/view/printdata.cxx
@@ -38,7 +38,6 @@
#include <wdocsh.hxx>
#include <viewsh.hxx>
#include <docfld.hxx>
-#include <swprtopt.hxx>
#include <svl/languageoptions.hxx>
#include <toolkit/awt/vclxdevice.hxx>
@@ -90,7 +89,7 @@ void SwRenderData::CreatePostItData( SwDoc *pDoc, const SwViewOption *pViewOpt,
//!! Otherwise the grammar checker might process it and crash if we later on
//!! simply delete this document while he is still at it.
SwViewOption aViewOpt( *pViewOpt );
- aViewOpt.SetOnlineSpell( FALSE );
+ aViewOpt.SetOnlineSpell( sal_False );
m_pPostItShell = new ViewShell( *m_pPostItDoc, 0, &aViewOpt, pOutDev );
}
@@ -125,7 +124,7 @@ void SwRenderData::ViewOptionAdjustStart( SwWrtShell &rSh, const SwViewOption &r
}
-void SwRenderData::ViewOptionAdjust( const SwPrtOptions *pPrtOptions )
+void SwRenderData::ViewOptionAdjust(SwPrintData const*const pPrtOptions)
{
m_pViewOptionAdjust->AdjustViewOptions( pPrtOptions );
}
@@ -142,7 +141,7 @@ void SwRenderData::ViewOptionAdjustStop()
void SwRenderData::MakeSwPrtOptions(
- SwPrtOptions &rOptions,
+ SwPrintData & rOptions,
const SwDocShell *pDocShell,
const SwPrintUIOptions *pOpt,
const SwRenderData *pData,
@@ -153,8 +152,8 @@ void SwRenderData::MakeSwPrtOptions(
// get default print options
const TypeId aSwWebDocShellTypeId = TYPE(SwWebDocShell);
- BOOL bWeb = pDocShell->IsA( aSwWebDocShellTypeId );
- rOptions.MakeOptions( bWeb );
+ sal_Bool bWeb = pDocShell->IsA( aSwWebDocShellTypeId );
+ ::sw::InitPrintOptionsFromApplication(rOptions, bWeb);
// get print options to use from provided properties
rOptions.bPrintGraphic = pOpt->IsPrintGraphics();
@@ -181,17 +180,6 @@ void SwRenderData::MakeSwPrtOptions(
//! function will destroy the pointers
rOptions.SetPrintUIOptions( pOpt );
rOptions.SetRenderData( pData );
-
- // rOptions.aMulti is not used anymore in the XRenderable API
- // Thus we set it to a dummy value here.
- rOptions.aMulti = MultiSelection( Range( 1, 1 ) );
-
- //! Note: Since for PDF export of (multi-)selection a temporary
- //! document is created that contains only the selects parts,
- //! and thus that document is to printed in whole the,
- //! rOptions.bPrintSelection parameter will be false.
- if (bIsPDFExport)
- rOptions.bPrintSelection = FALSE;
}
@@ -208,8 +196,8 @@ SwPrintUIOptions::SwPrintUIOptions(
{
ResStringArray aLocalizedStrings( SW_RES( STR_PRINTOPTUI ) );
- DBG_ASSERT( aLocalizedStrings.Count() >= 44, "resource incomplete" );
- if( aLocalizedStrings.Count() < 44 ) // bad resource ?
+ DBG_ASSERT( aLocalizedStrings.Count() >= 30, "resource incomplete" );
+ if( aLocalizedStrings.Count() < 30 ) // bad resource ?
return;
// printing HTML sources does not have any valid UI options.
@@ -236,7 +224,7 @@ SwPrintUIOptions::SwPrintUIOptions(
String aAppGroupname( aLocalizedStrings.GetString( 0 ) );
aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ),
aModOpt.GetModuleName( SvtModuleOptions::E_SWRITER ) );
- m_aUIProperties[ nIdx++ ].Value = getGroupControlOpt( aAppGroupname, rtl::OUString() );
+ m_aUIProperties[ nIdx++ ].Value = getGroupControlOpt( aAppGroupname, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:TabPage:AppPage" ) ) );
// create sub section for Contents
m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 1 ), rtl::OUString() );
@@ -244,105 +232,109 @@ SwPrintUIOptions::SwPrintUIOptions(
// create a bool option for background
bool bDefaultVal = rDefaultPrintData.IsPrintPageBackground();
m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 2 ),
- aLocalizedStrings.GetString( 3 ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPageBackground" ) ),
- bDefaultVal );
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintPageBackground:CheckBox" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPageBackground" ) ),
+ bDefaultVal );
// create a bool option for pictures/graphics AND OLE and drawing objects as well
bDefaultVal = rDefaultPrintData.IsPrintGraphic() || rDefaultPrintData.IsPrintDraw();
- m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ),
- aLocalizedStrings.GetString( 5 ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPicturesAndObjects" ) ),
- bDefaultVal );
+ m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 3 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintPicturesAndObjects:CheckBox" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPicturesAndObjects" ) ),
+ bDefaultVal );
if (!bWeb)
{
// create a bool option for hidden text
bDefaultVal = rDefaultPrintData.IsPrintHiddenText();
- m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 6 ),
- aLocalizedStrings.GetString( 7 ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintHiddenText" ) ),
- bDefaultVal );
+ m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintHiddenText:CheckBox" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintHiddenText" ) ),
+ bDefaultVal );
// create a bool option for place holder
bDefaultVal = rDefaultPrintData.IsPrintTextPlaceholder();
- m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 8 ),
- aLocalizedStrings.GetString( 9 ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintTextPlaceholder" ) ),
- bDefaultVal );
+ m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 5 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintTextPlaceholder:CheckBox" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintTextPlaceholder" ) ),
+ bDefaultVal );
}
// create a bool option for controls
bDefaultVal = rDefaultPrintData.IsPrintControl();
- m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 10 ),
- aLocalizedStrings.GetString( 11 ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintControls" ) ),
- bDefaultVal );
+ m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 6 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintControls:CheckBox" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintControls" ) ),
+ bDefaultVal );
// create sub section for Color
- m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 12 ), rtl::OUString() );
+ m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 7 ), rtl::OUString() );
// create a bool option for printing text with black font color
bDefaultVal = rDefaultPrintData.IsPrintBlackFont();
- m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 13 ),
- aLocalizedStrings.GetString( 14 ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintBlackFonts" ) ),
- bDefaultVal );
+ m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 8 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintBlackFonts:CheckBox" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintBlackFonts" ) ),
+ bDefaultVal );
if (!bWeb)
{
// create subgroup for misc options
- m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 15 ) ), rtl::OUString() );
+ m_aUIProperties[ nIdx++ ].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 9 ) ), rtl::OUString() );
// create a bool option for printing automatically inserted blank pages
bDefaultVal = rDefaultPrintData.IsPrintEmptyPages();
- m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 16 ),
- aLocalizedStrings.GetString( 17 ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintEmptyPages" ) ),
- bDefaultVal );
+ m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 10 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintEmptyPages:CheckBox" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintEmptyPages" ) ),
+ bDefaultVal );
}
// create a bool option for paper tray
bDefaultVal = rDefaultPrintData.IsPaperFromSetup();
vcl::PrinterOptionsHelper::UIControlOptions aPaperTrayOpt;
aPaperTrayOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OptionsPageOptGroup" ) );
- m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 18 ),
- aLocalizedStrings.GetString( 19 ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPaperFromSetup" ) ),
- bDefaultVal,
- aPaperTrayOpt
- );
+ m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 11 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintPaperFromSetup:CheckBox" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPaperFromSetup" ) ),
+ bDefaultVal,
+ aPaperTrayOpt
+ );
// print range selection
vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt;
aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) );
aPrintRangeOpt.mbInternalOnly = sal_True;
- m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 37 ) ),
+ m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 26 ) ),
rtl::OUString(),
aPrintRangeOpt
);
// create a choice for the content to create
rtl::OUString aPrintRangeName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) );
- uno::Sequence< rtl::OUString > aChoices( bHasSelection ? 3 : 2 );
- uno::Sequence< rtl::OUString > aHelpText( bHasSelection ? 3 : 2 );
- aChoices[0] = aLocalizedStrings.GetString( 38 );
- aHelpText[0] = aLocalizedStrings.GetString( 39 );
- aChoices[1] = aLocalizedStrings.GetString( 40 );
- aHelpText[1] = aLocalizedStrings.GetString( 41 );
- if (bHasSelection)
- {
- aChoices[2] = aLocalizedStrings.GetString( 42 );
- aHelpText[2] = aLocalizedStrings.GetString( 43 );
- }
+ uno::Sequence< rtl::OUString > aChoices( 3 );
+ uno::Sequence< sal_Bool > aChoicesDisabled( 3 );
+ uno::Sequence< rtl::OUString > aHelpIds( 3 );
+ aChoices[0] = aLocalizedStrings.GetString( 27 );
+ aChoicesDisabled[0] = sal_False;
+ aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ) );
+ aChoices[1] = aLocalizedStrings.GetString( 28 );
+ aChoicesDisabled[1] = sal_False;
+ aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ) );
+ aChoices[2] = aLocalizedStrings.GetString( 29 );
+ aChoicesDisabled[2] = sal_Bool(! bHasSelection);
+ aHelpIds[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2" ) );
m_aUIProperties[nIdx++].Value = getChoiceControlOpt( rtl::OUString(),
- aHelpText,
+ aHelpIds,
aPrintRangeName,
aChoices,
- bHasSelection ? 2 /*enable 'Selection' radio button*/ : 0 /* enable 'All pages' */);
+ bHasSelection ? 2 /*enable 'Selection' radio button*/ : 0 /* enable 'All pages' */,
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Radio" ) ),
+ aChoicesDisabled
+ );
// create a an Edit dependent on "Pages" selected
vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True );
m_aUIProperties[nIdx++].Value = getEditControlOpt( rtl::OUString(),
- rtl::OUString(),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PageRange:Edit" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ),
rtl::OUString(),
aPageRangeOpt
@@ -350,30 +342,31 @@ SwPrintUIOptions::SwPrintUIOptions(
// print content selection
vcl::PrinterOptionsHelper::UIControlOptions aContentsOpt;
aContentsOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "JobPage" ) );
- m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 20 ) ),
+ m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 12 ) ),
rtl::OUString(),
aContentsOpt
);
// create a list box for notes content
const sal_Int16 nPrintPostIts = rDefaultPrintData.GetPrintPostIts();
aChoices.realloc( 4 );
- aChoices[0] = aLocalizedStrings.GetString( 21 );
- aChoices[1] = aLocalizedStrings.GetString( 22 );
- aChoices[2] = aLocalizedStrings.GetString( 23 );
- aChoices[3] = aLocalizedStrings.GetString( 24 );
- aHelpText.realloc( 2 );
- aHelpText[0] = aLocalizedStrings.GetString( 25 );
- aHelpText[1] = aLocalizedStrings.GetString( 25 );
+ aChoices[0] = aLocalizedStrings.GetString( 13 );
+ aChoices[1] = aLocalizedStrings.GetString( 14 );
+ aChoices[2] = aLocalizedStrings.GetString( 15 );
+ aChoices[3] = aLocalizedStrings.GetString( 16 );
+ aHelpIds.realloc( 2 );
+ aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintAnnotationMode:FixedText" ) );
+ aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintAnnotationMode:ListBox" ) );
vcl::PrinterOptionsHelper::UIControlOptions aAnnotOpt( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) ), 0, sal_False );
aAnnotOpt.mbEnabled = bHasPostIts;
- m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 26 ),
- aHelpText,
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintAnnotationMode" ) ),
- aChoices,
- nPrintPostIts,
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ),
- aAnnotOpt
- );
+ m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 17 ),
+ aHelpIds,
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintAnnotationMode" ) ),
+ aChoices,
+ nPrintPostIts,
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ),
+ uno::Sequence< sal_Bool >(),
+ aAnnotOpt
+ );
// create subsection for Page settings
vcl::PrinterOptionsHelper::UIControlOptions aPageSetOpt;
@@ -381,16 +374,16 @@ SwPrintUIOptions::SwPrintUIOptions(
if (!bWeb)
{
- m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 27 ) ),
+ m_aUIProperties[nIdx++].Value = getSubgroupControlOpt( rtl::OUString( aLocalizedStrings.GetString( 18 ) ),
rtl::OUString(),
aPageSetOpt
);
uno::Sequence< rtl::OUString > aRLChoices( 3 );
- aRLChoices[0] = aLocalizedStrings.GetString( 28 );
- aRLChoices[1] = aLocalizedStrings.GetString( 29 );
- aRLChoices[2] = aLocalizedStrings.GetString( 30 );
+ aRLChoices[0] = aLocalizedStrings.GetString( 19 );
+ aRLChoices[1] = aLocalizedStrings.GetString( 20 );
+ aRLChoices[2] = aLocalizedStrings.GetString( 21 );
uno::Sequence< rtl::OUString > aRLHelp( 1 );
- aRLHelp[0] = aLocalizedStrings.GetString( 31 );
+ aRLHelp[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintLeftRightPages:ListBox" ) );
// create a choice option for all/left/right pages
// 0 : all pages (left & right)
// 1 : left pages
@@ -402,7 +395,7 @@ SwPrintUIOptions::SwPrintUIOptions(
nPagesChoice = 1;
else if (!rDefaultPrintData.IsPrintLeftPage() && rDefaultPrintData.IsPrintRightPage())
nPagesChoice = 2;
- m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 32 ),
+ m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( aLocalizedStrings.GetString( 22 ),
aRLHelp,
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintLeftRightPages" ) ),
aRLChoices,
@@ -414,31 +407,34 @@ SwPrintUIOptions::SwPrintUIOptions(
// create a bool option for brochure
bDefaultVal = rDefaultPrintData.IsPrintProspect();
rtl::OUString aBrochurePropertyName( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) );
- m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 33 ),
- aLocalizedStrings.GetString( 34 ),
- aBrochurePropertyName,
- bDefaultVal,
- aPageSetOpt
- );
+ m_aUIProperties[ nIdx++ ].Value = getBoolControlOpt( aLocalizedStrings.GetString( 23 ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintProspect:CheckBox" ) ),
+ aBrochurePropertyName,
+ bDefaultVal,
+ aPageSetOpt
+ );
if (bCTL)
{
// create a bool option for brochure RTL dependent on brochure
uno::Sequence< rtl::OUString > aBRTLChoices( 2 );
- aBRTLChoices[0] = aLocalizedStrings.GetString( 35 );
- aBRTLChoices[1] = aLocalizedStrings.GetString( 36 );
+ aBRTLChoices[0] = aLocalizedStrings.GetString( 24 );
+ aBRTLChoices[1] = aLocalizedStrings.GetString( 25 );
vcl::PrinterOptionsHelper::UIControlOptions aBrochureRTLOpt( aBrochurePropertyName, -1, sal_True );
+ uno::Sequence< rtl::OUString > aBRTLHelpIds( 1 );
+ aBRTLHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintProspectRTL:ListBox" ) );
aBrochureRTLOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutPage" ) );
// RTL brochure choices
// 0 : left-to-right
// 1 : right-to-left
const sal_Int16 nBRTLChoice = rDefaultPrintData.IsPrintProspectRTL() ? 1 : 0;
m_aUIProperties[ nIdx++ ].Value = getChoiceControlOpt( rtl::OUString(),
- uno::Sequence< rtl::OUString >(),
+ aBRTLHelpIds,
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspectRTL" ) ),
aBRTLChoices,
nBRTLChoice,
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ),
+ uno::Sequence< sal_Bool >(),
aBrochureRTLOpt
);
}
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index 351382dbdb00..d787806203de 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -51,7 +51,7 @@
#include "viewimp.hxx"
#include "dflyobj.hxx"
#include "viewopt.hxx"
-#include "swprtopt.hxx"
+#include "printdata.hxx"
#include "dcontact.hxx"
#include "dview.hxx"
#include "flyfrm.hxx"
@@ -89,7 +89,7 @@ void SwViewImp::LockPaint()
}
else
{
- bResetHdlHiddenPaint = FALSE;
+ bResetHdlHiddenPaint = sal_False;
}
}
@@ -100,7 +100,7 @@ void SwViewImp::UnlockPaint()
}
void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
- const SwPrtOptions * _pPrintData,
+ SwPrintData const*const pPrintData,
const SwRect& ,
const Color* _pPageBackgrdColor,
const bool _bIsPageRightToLeft ) const
@@ -109,7 +109,7 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
{
//change the draw mode in high contrast mode
OutputDevice* pOutDev = GetShell()->GetOut();
- ULONG nOldDrawMode = pOutDev->GetDrawMode();
+ sal_uLong nOldDrawMode = pOutDev->GetDrawMode();
if( GetShell()->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() &&
(!GetShell()->IsPreView()||SW_MOD()->GetAccessibilityOptions().GetIsForPagePreviews()))
@@ -144,11 +144,11 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
}
pOutDev->Push( PUSH_LINECOLOR ); // #114231#
- if (_pPrintData)
+ if (pPrintData)
{
// hide drawings but not form controls (form controls are handled elsewhere)
SdrView &rSdrView = const_cast< SdrView & >(GetPageView()->GetView());
- rSdrView.setHideDraw( !_pPrintData->IsPrintDraw() );
+ rSdrView.setHideDraw( !pPrintData->IsPrintDraw() );
}
GetPageView()->DrawLayer(_nLayerID, pOutDev);
pOutDev->Pop();
@@ -168,23 +168,23 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
#define WIEDUWILLST 400
-BOOL SwViewImp::IsDragPossible( const Point &rPoint )
+sal_Bool SwViewImp::IsDragPossible( const Point &rPoint )
{
if ( !HasDrawView() )
- return FALSE;
+ return sal_False;
const SdrMarkList &rMrkList = GetDrawView()->GetMarkedObjectList();
if( !rMrkList.GetMarkCount() )
- return FALSE;
+ return sal_False;
SdrObject *pO = rMrkList.GetMark(rMrkList.GetMarkCount()-1)->GetMarkedSdrObj();
SwRect aRect;
- if( ::CalcClipRect( pO, aRect, FALSE ) )
+ if( ::CalcClipRect( pO, aRect, sal_False ) )
{
SwRect aTmp;
- ::CalcClipRect( pO, aTmp, TRUE );
+ ::CalcClipRect( pO, aTmp, sal_True );
aRect.Union( aTmp );
}
else
@@ -207,11 +207,11 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
const Rectangle aRect( Point( DOCUMENTBORDER, DOCUMENTBORDER ), rNewSz );
const Rectangle &rOldWork = GetDrawView()->GetWorkArea();
- BOOL bCheckDrawObjs = FALSE;
+ sal_Bool bCheckDrawObjs = sal_False;
if ( aRect != rOldWork )
{
if ( rOldWork.Bottom() > aRect.Bottom() || rOldWork.Right() > aRect.Right())
- bCheckDrawObjs = TRUE;
+ bCheckDrawObjs = sal_True;
GetDrawView()->SetWorkArea( aRect );
}
if ( !bCheckDrawObjs )
@@ -219,8 +219,8 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
OSL_ENSURE( pSh->getIDocumentDrawModelAccess()->GetDrawModel(), "NotifySizeChg without DrawModel" );
SdrPage* pPage = pSh->getIDocumentDrawModelAccess()->GetDrawModel()->GetPage( 0 );
- const ULONG nObjs = pPage->GetObjCount();
- for( ULONG nObj = 0; nObj < nObjs; ++nObj )
+ const sal_uLong nObjs = pPage->GetObjCount();
+ for( sal_uLong nObj = 0; nObj < nObjs; ++nObj )
{
SdrObject *pObj = pPage->GetObj( nObj );
if( !pObj->ISA(SwVirtFlyDrawObj) )
diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index d3ceaa305305..aa60644f8adb 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -90,9 +90,9 @@ void SwViewImp::Init( const SwViewOption *pNewOpt )
pDrawView->SetWorkArea( pRoot->Frm().SVRect() );
if ( GetShell()->IsPreView() )
- pDrawView->SetAnimationEnabled( FALSE );
+ pDrawView->SetAnimationEnabled( sal_False );
- pDrawView->SetUseIncompatiblePathCreateInterface( FALSE );
+ pDrawView->SetUseIncompatiblePathCreateInterface( sal_False );
pDrawView->SetSolidMarkHdl(pNewOpt->IsSolidMarkHdl());
// it's a JOE interface !
@@ -113,8 +113,8 @@ SwViewImp::SwViewImp( ViewShell *pParent ) :
mpPgPrevwLayout( 0 )
{
bResetHdlHiddenPaint =
- bSmoothUpdate = bStopSmooth = bStopPrt = FALSE;
- bFirstPageInvalid = TRUE;
+ bSmoothUpdate = bStopSmooth = bStopPrt = sal_False;
+ bFirstPageInvalid = sal_True;
}
SwViewImp::~SwViewImp()
@@ -139,16 +139,16 @@ void SwViewImp::DelRegion()
DELETEZ(pRegion);
}
-BOOL SwViewImp::AddPaintRect( const SwRect &rRect )
+sal_Bool SwViewImp::AddPaintRect( const SwRect &rRect )
{
if ( rRect.IsOver( pSh->VisArea() ) )
{
if ( !pRegion )
pRegion = new SwRegionRects( pSh->VisArea() );
(*pRegion) -= rRect;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void SwViewImp::CheckWaitCrsr()
@@ -157,21 +157,21 @@ void SwViewImp::CheckWaitCrsr()
pLayAct->CheckWaitCrsr();
}
-BOOL SwViewImp::IsCalcLayoutProgress() const
+sal_Bool SwViewImp::IsCalcLayoutProgress() const
{
if ( pLayAct )
return pLayAct->IsCalcLayout();
- return FALSE;
+ return sal_False;
}
-BOOL SwViewImp::IsUpdateExpFlds()
+sal_Bool SwViewImp::IsUpdateExpFlds()
{
if ( pLayAct && pLayAct->IsCalcLayout() )
{
pLayAct->SetUpdateExpFlds();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void SwViewImp::SetFirstVisPage()
@@ -206,7 +206,7 @@ void SwViewImp::SetFirstVisPage()
}
pFirstVisPage = pPage ? pPage : (SwPageFrm*)pSh->GetLayout()->Lower();
}
- bFirstPageInvalid = FALSE;
+ bFirstPageInvalid = sal_False;
}
void SwViewImp::MakeDrawView()
@@ -468,7 +468,7 @@ void SwViewImp::FireAccessibleEvents()
IMPL_LINK(SwViewImp, SetStopPrt, void *, EMPTYARG)
{
- bStopPrt = TRUE;
+ bStopPrt = sal_True;
return 0;
}
diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx
index aa5a0f5b3fcf..b2d866f96c4c 100644
--- a/sw/source/core/view/viewpg.cxx
+++ b/sw/source/core/view/viewpg.cxx
@@ -42,7 +42,7 @@
#include <rootfrm.hxx>
#include <viewimp.hxx>
#include <viewopt.hxx>
-#include <swprtopt.hxx> // SwPrtOptions
+#include <printdata.hxx>
#include <fldbas.hxx>
#include <ptqueue.hxx>
#include <swregion.hxx>
@@ -70,7 +70,7 @@ void ViewShell::ShowPreViewSelection( sal_uInt16 nSelPage )
}
//#i6467# adjust view options for page preview
-void ViewShell::AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions )
+void ViewShell::AdjustOptionsForPagePreview(SwPrintData const& rPrintOptions)
{
if ( !IsPreView() )
{
@@ -78,7 +78,7 @@ void ViewShell::AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions
return;
}
- PrepareForPrint( _rPrintOptions );
+ PrepareForPrint( rPrintOptions );
return;
}
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 08c8aa3dd69d..afeaa33de325 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -82,13 +82,13 @@
#include <svx/sdrpaintwindow.hxx>
-BOOL ViewShell::bLstAct = FALSE;
+sal_Bool ViewShell::bLstAct = sal_False;
ShellResource *ViewShell::pShellRes = 0;
Window *ViewShell::pCareWindow = 0;
BitmapEx* ViewShell::pErrorBmp = NULL;
BitmapEx* ViewShell::pReplaceBmp = NULL;
-BOOL bInSizeNotify = FALSE;
+sal_Bool bInSizeNotify = sal_False;
DBG_NAME(LayoutIdle)
@@ -164,25 +164,25 @@ void ViewShell::DLPostPaint2(bool bPaintFormLayer)
//////////////////////////////////////////////////////////////////////////////
-void ViewShell::ImplEndAction( const BOOL bIdleEnd )
+void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
{
//There is nothing to do here for the printer
if ( !GetWin() || IsPreView() )
{
- bPaintWorks = TRUE;
+ bPaintWorks = sal_True;
UISizeNotify();
return;
}
- bInEndAction = TRUE;
+ bInEndAction = sal_True;
- ViewShell::bLstAct = TRUE;
+ ViewShell::bLstAct = sal_True;
ViewShell *pSh = (ViewShell*)this->GetNext();
while ( pSh != this )
{
if ( pSh->ActionPend() )
{
- ViewShell::bLstAct = FALSE;
+ ViewShell::bLstAct = sal_False;
pSh = this;
}
else
@@ -198,14 +198,14 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
if ( Imp()->GetRegion() && Imp()->GetRegion()->GetOrigin() != VisArea() )
Imp()->DelRegion();
- const BOOL bExtraData = ::IsExtraData( GetDoc() );
+ const sal_Bool bExtraData = ::IsExtraData( GetDoc() );
if ( !bIdleEnd )
{
SwLayAction aAction( GetLayout(), Imp() );
- aAction.SetComplete( FALSE );
+ aAction.SetComplete( sal_False );
if ( nLockPaint )
- aAction.SetPaint( FALSE );
+ aAction.SetPaint( sal_False );
aAction.SetInputType( INPUT_KEYBOARD );
aAction.Action();
}
@@ -221,7 +221,7 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
{
if ( !nLockPaint )
{
- BOOL bPaintsFromSystem = aInvalidRect.HasArea();
+ sal_Bool bPaintsFromSystem = aInvalidRect.HasArea();
GetWin()->Update();
if ( aInvalidRect.HasArea() )
{
@@ -229,13 +229,13 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
Imp()->AddPaintRect( aInvalidRect );
ResetInvalidRect();
- bPaintsFromSystem = TRUE;
+ bPaintsFromSystem = sal_True;
}
- bPaintWorks = TRUE;
+ bPaintWorks = sal_True;
SwRegionRects *pRegion = Imp()->GetRegion();
- BOOL bShowCrsr = pRegion && IsA( TYPE(SwCrsrShell) );
+ sal_Bool bShowCrsr = pRegion && IsA( TYPE(SwCrsrShell) );
if( bShowCrsr )
((SwCrsrShell*)this)->HideCrsrs();
@@ -256,7 +256,7 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
SwRect aRect( (*pRegion)[ pRegion->Count() - 1 ] );
pRegion->Remove( pRegion->Count() - 1 );
- BOOL bPaint = TRUE;
+ sal_Bool bPaint = sal_True;
if ( IsEndActionByVirDev() )
{
if ( !pVout )
@@ -264,7 +264,7 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
MapMode aMapMode( GetOut()->GetMapMode() );
pVout->SetMapMode( aMapMode );
- BOOL bSizeOK = TRUE;
+ sal_Bool bSizeOK = sal_True;
Rectangle aTmp1( aRect.SVRect() );
aTmp1 = GetOut()->LogicToPixel( aTmp1 );
@@ -286,7 +286,7 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
}
if ( bSizeOK )
{
- bPaint = FALSE;
+ bPaint = sal_False;
// #i72754# start Pre/PostPaint encapsulation before pOut is changed to the buffering VDev
const Region aRepaintRegion(aRect.SVRect());
@@ -366,19 +366,19 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
Imp()->DelRegion();
}
if( bShowCrsr )
- ((SwCrsrShell*)this)->ShowCrsrs( TRUE );
+ ((SwCrsrShell*)this)->ShowCrsrs( sal_True );
}
else
{
Imp()->DelRegion();
- bPaintWorks = TRUE;
+ bPaintWorks = sal_True;
}
}
else
- bPaintWorks = TRUE;
+ bPaintWorks = sal_True;
- bInEndAction = FALSE;
- ViewShell::bLstAct = FALSE;
+ bInEndAction = sal_False;
+ ViewShell::bLstAct = sal_False;
Imp()->EndAction();
@@ -392,19 +392,19 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
void ViewShell::ImplStartAction()
{
- bPaintWorks = FALSE;
+ bPaintWorks = sal_False;
Imp()->StartAction();
}
void ViewShell::ImplLockPaint()
{
if ( GetWin() && GetWin()->IsVisible() )
- GetWin()->EnablePaint( FALSE );
+ GetWin()->EnablePaint( sal_False );
Imp()->LockPaint();
}
-void ViewShell::ImplUnlockPaint( BOOL bVirDev )
+void ViewShell::ImplUnlockPaint( sal_Bool bVirDev )
{
SET_CURR_SHELL( this );
if ( GetWin() && GetWin()->IsVisible() )
@@ -419,7 +419,7 @@ void ViewShell::ImplUnlockPaint( BOOL bVirDev )
aSize.Height()+= 20;
if( pVout->SetOutputSize( aSize ) )
{
- GetWin()->EnablePaint( TRUE );
+ GetWin()->EnablePaint( sal_True );
GetWin()->Validate();
Imp()->UnlockPaint();
@@ -443,7 +443,7 @@ void ViewShell::ImplUnlockPaint( BOOL bVirDev )
else
{
Imp()->UnlockPaint();
- GetWin()->EnablePaint( TRUE );
+ GetWin()->EnablePaint( sal_True );
GetWin()->Invalidate( INVALIDATE_CHILDREN );
}
delete pVout;
@@ -451,7 +451,7 @@ void ViewShell::ImplUnlockPaint( BOOL bVirDev )
else
{
Imp()->UnlockPaint();
- GetWin()->EnablePaint( TRUE );
+ GetWin()->EnablePaint( sal_True );
GetWin()->Invalidate( INVALIDATE_CHILDREN );
}
}
@@ -459,9 +459,9 @@ void ViewShell::ImplUnlockPaint( BOOL bVirDev )
Imp()->UnlockPaint();
}
-BOOL ViewShell::AddPaintRect( const SwRect & rRect )
+sal_Bool ViewShell::AddPaintRect( const SwRect & rRect )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
ViewShell *pSh = this;
do
{
@@ -528,7 +528,7 @@ Window* ViewShell::CareChildWin(ViewShell& rVSh)
{
if(rVSh.pSfxViewShell)
{
- const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId();
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
SfxViewFrame* pVFrame = rVSh.pSfxViewShell->GetViewFrame();
const SfxChildWindow* pChWin = pVFrame->GetChildWindow( nId );
Window *pWin = pChWin ? pChWin->GetWindow() : NULL;
@@ -538,28 +538,28 @@ Window* ViewShell::CareChildWin(ViewShell& rVSh)
return NULL;
}
-Point ViewShell::GetPagePos( USHORT nPageNum ) const
+Point ViewShell::GetPagePos( sal_uInt16 nPageNum ) const
{
return GetLayout()->GetPagePos( nPageNum );
}
-USHORT ViewShell::GetNumPages()
+sal_uInt16 ViewShell::GetNumPages()
{
//It can happen that there still no Layout exists due to the
//method being called from the Root ctor.
return GetLayout() ? GetLayout()->GetPageNum() : 0;
}
-sal_Bool ViewShell::IsDummyPage( USHORT nPageNum ) const
+sal_Bool ViewShell::IsDummyPage( sal_uInt16 nPageNum ) const
{
return GetLayout() ? GetLayout()->IsDummyPage( nPageNum ) : 0;
}
-void ViewShell::UpdateFlds(BOOL bCloseDB)
+void ViewShell::UpdateFlds(sal_Bool bCloseDB)
{
SET_CURR_SHELL( this );
- BOOL bCrsr = ISA(SwCrsrShell);
+ sal_Bool bCrsr = ISA(SwCrsrShell);
if ( bCrsr )
((SwCrsrShell*)this)->StartAction();
else
@@ -581,9 +581,9 @@ void ViewShell::UpdateAllCharts()
GetDoc()->UpdateAllCharts();
}
-BOOL ViewShell::HasCharts() const
+sal_Bool ViewShell::HasCharts() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwStartNode *pStNd;
SwNodeIndex aIdx( *GetDoc()->GetNodes().GetEndOfAutotext().
StartOfSectionNode(), 1 );
@@ -593,7 +593,7 @@ BOOL ViewShell::HasCharts() const
const SwOLENode *pNd = aIdx.GetNode().GetOLENode();
if( pNd && pNd->GetChartTblName().Len() )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
}
@@ -644,9 +644,9 @@ void ViewShell::LayoutIdle()
|*
*************************************************************************/
-void lcl_InvalidateAllCntnt( ViewShell& rSh, BYTE nInv )
+void lcl_InvalidateAllCntnt( ViewShell& rSh, sal_uInt8 nInv )
{
- BOOL bCrsr = rSh.ISA(SwCrsrShell);
+ sal_Bool bCrsr = rSh.ISA(SwCrsrShell);
if ( bCrsr )
((SwCrsrShell&)rSh).StartAction();
else
@@ -691,9 +691,9 @@ void ViewShell::SetParaSpaceMax( bool bNew )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if( pIDSA->get(IDocumentSettingAccess::PARA_SPACE_MAX) != bNew )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::PARA_SPACE_MAX, bNew );
- const BYTE nInv = INV_PRTAREA | INV_TABLE | INV_SECTION;
+ const sal_uInt8 nInv = INV_PRTAREA | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -703,9 +703,9 @@ void ViewShell::SetParaSpaceMaxAtPages( bool bNew )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if( pIDSA->get(IDocumentSettingAccess::PARA_SPACE_MAX_AT_PAGES) != bNew )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::PARA_SPACE_MAX_AT_PAGES, bNew );
- const BYTE nInv = INV_PRTAREA | INV_TABLE | INV_SECTION;
+ const sal_uInt8 nInv = INV_PRTAREA | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -715,9 +715,9 @@ void ViewShell::SetTabCompat( bool bNew )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if( pIDSA->get(IDocumentSettingAccess::TAB_COMPAT) != bNew )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::TAB_COMPAT, bNew );
- const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
+ const sal_uInt8 nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -727,12 +727,12 @@ void ViewShell::SetAddExtLeading( bool bNew )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::ADD_EXT_LEADING) != bNew )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::ADD_EXT_LEADING, bNew );
SdrModel* pTmpDrawModel = getIDocumentDrawModelAccess()->GetDrawModel();
if ( pTmpDrawModel )
pTmpDrawModel->SetAddExtLeading( bNew );
- const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
+ const sal_uInt8 nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -742,7 +742,7 @@ void ViewShell::SetUseVirDev( bool bNewVirtual )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::USE_VIRTUAL_DEVICE) != bNewVirtual )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
// this sets the flag at the document and calls PrtDataChanged
IDocumentDeviceAccess* pIDDA = getIDocumentDeviceAccess();
pIDDA->setReferenceDeviceType( bNewVirtual, true );
@@ -754,9 +754,9 @@ void ViewShell::SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS) != _bAddParaSpacingToTableCells )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS, _bAddParaSpacingToTableCells );
- const BYTE nInv = INV_PRTAREA;
+ const sal_uInt8 nInv = INV_PRTAREA;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -768,9 +768,9 @@ void ViewShell::SetUseFormerLineSpacing( bool _bUseFormerLineSpacing )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::OLD_LINE_SPACING) != _bUseFormerLineSpacing )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::OLD_LINE_SPACING, _bUseFormerLineSpacing );
- const BYTE nInv = INV_PRTAREA;
+ const sal_uInt8 nInv = INV_PRTAREA;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -781,7 +781,7 @@ void ViewShell::SetUseFormerObjectPositioning( bool _bUseFormerObjPos )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::USE_FORMER_OBJECT_POS) != _bUseFormerObjPos )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::USE_FORMER_OBJECT_POS, _bUseFormerObjPos );
lcl_InvalidateAllObjPos( *this );
}
@@ -793,7 +793,7 @@ void ViewShell::SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION) != _bConsiderWrapOnObjPos )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION, _bConsiderWrapOnObjPos );
lcl_InvalidateAllObjPos( *this );
}
@@ -804,9 +804,9 @@ void ViewShell::SetUseFormerTextWrapping( bool _bUseFormerTextWrapping )
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING) != _bUseFormerTextWrapping )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING, _bUseFormerTextWrapping );
- const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
+ const sal_uInt8 nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
@@ -817,16 +817,16 @@ void ViewShell::SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWit
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK) != _bDoNotJustifyLinesWithManualBreak )
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
pIDSA->set(IDocumentSettingAccess::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK, _bDoNotJustifyLinesWithManualBreak );
- const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
+ const sal_uInt8 nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
lcl_InvalidateAllCntnt( *this, nInv );
}
}
void ViewShell::Reformat()
{
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
#ifdef FNTMET
aFntMetList.Flush();
@@ -854,24 +854,24 @@ void ViewShell::Reformat()
void ViewShell::CalcLayout()
{
SET_CURR_SHELL( this );
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *GetDoc()->GetDocShell(), sal_True );
SwSaveSetLRUOfst aSaveLRU( *SwTxtFrm::GetTxtCache(),
SwTxtFrm::GetTxtCache()->GetCurMax() - 50 );
- const BOOL bEndProgress = SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) == 0;
+ const sal_Bool bEndProgress = SfxProgress::GetActiveProgress( GetDoc()->GetDocShell() ) == 0;
if ( bEndProgress )
{
- USHORT nEndPage = GetLayout()->GetPageNum();
+ sal_uInt16 nEndPage = GetLayout()->GetPageNum();
nEndPage += nEndPage * 10 / 100;
::StartProgress( STR_STATSTR_REFORMAT, 0, nEndPage, GetDoc()->GetDocShell() );
}
SwLayAction aAction( GetLayout(), Imp() );
- aAction.SetPaint( FALSE );
- aAction.SetStatBar( TRUE );
- aAction.SetCalcLayout( TRUE );
- aAction.SetReschedule( TRUE );
+ aAction.SetPaint( sal_False );
+ aAction.SetStatBar( sal_True );
+ aAction.SetCalcLayout( sal_True );
+ aAction.SetReschedule( sal_True );
GetDoc()->LockExpFlds();
aAction.Action();
GetDoc()->UnlockExpFlds();
@@ -881,9 +881,9 @@ void ViewShell::CalcLayout()
if ( aAction.IsExpFlds() )
{
aAction.Reset();
- aAction.SetPaint( FALSE );
- aAction.SetStatBar( TRUE );
- aAction.SetReschedule( TRUE );
+ aAction.SetPaint( sal_False );
+ aAction.SetStatBar( sal_True );
+ aAction.SetReschedule( sal_True );
SwDocPosUpdate aMsgHnt( 0 );
GetDoc()->UpdatePageFlds( &aMsgHnt );
@@ -911,18 +911,18 @@ void ViewShell::SetFirstVisPageInvalid()
void ViewShell::SizeChgNotify()
{
if ( !pWin )
- bDocSizeChgd = TRUE;
+ bDocSizeChgd = sal_True;
else if( ActionPend() || Imp()->IsCalcLayoutProgress() || bPaintInProgress )
{
- bDocSizeChgd = TRUE;
+ bDocSizeChgd = sal_True;
if ( !Imp()->IsCalcLayoutProgress() && ISA( SwCrsrShell ) )
{
- const SwFrm *pCnt = ((SwCrsrShell*)this)->GetCurrFrm( FALSE );
+ const SwFrm *pCnt = ((SwCrsrShell*)this)->GetCurrFrm( sal_False );
const SwPageFrm *pPage;
if ( pCnt && 0 != (pPage = pCnt->FindPageFrm()) )
{
- USHORT nVirtNum = pPage->GetVirtPageNum();
+ sal_uInt16 nVirtNum = pPage->GetVirtPageNum();
const SvxNumberType& rNum = pPage->GetPageDesc()->GetNumType();
String sDisplay = rNum.GetNumStr( nVirtNum );
PageNumNotify( this, pCnt->GetPhyPageNum(), nVirtNum, sDisplay );
@@ -931,7 +931,7 @@ void ViewShell::SizeChgNotify()
}
else
{
- bDocSizeChgd = FALSE;
+ bDocSizeChgd = sal_False;
::SizeNotify( this, GetDocSize() );
}
}
@@ -953,7 +953,7 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
const SwFrm *pOldPage = Imp()->GetFirstVisPage();
const SwRect aPrevArea( VisArea() );
- const BOOL bFull = aPrevArea.IsEmpty();
+ const sal_Bool bFull = aPrevArea.IsEmpty();
aVisArea = rRect;
SetFirstVisPageInvalid();
@@ -1036,7 +1036,7 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
{
const long nOfst = GetOut()->PixelToLogic(
Size(Imp()->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width();
- for ( USHORT i = 0;
+ for ( sal_uInt16 i = 0;
i < pPage->GetSortedObjs()->Count(); ++i )
{
SwAnchoredObject* pObj = (*pPage->GetSortedObjs())[i];
@@ -1108,9 +1108,9 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
}
-BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
+sal_Bool ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
{
- const ULONG nColCnt = pOut->GetColorCount();
+ const sal_uLong nColCnt = pOut->GetColorCount();
long lMult = 1, lMax = LONG_MAX;
if ( nColCnt == 65536 )
{
@@ -1151,7 +1151,7 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
if(bSmoothScrollAllowed && bAllowedForSelection && bAllowedForMultipleCursors)
{
- Imp()->bStopSmooth = FALSE;
+ Imp()->bStopSmooth = sal_False;
const SwRect aOldVis( VisArea() );
@@ -1212,9 +1212,9 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
// SW paint stuff
PaintDesktop( aRect );
- ViewShell::bLstAct = TRUE;
+ ViewShell::bLstAct = sal_True;
GetLayout()->Paint( aRect );
- ViewShell::bLstAct = FALSE;
+ ViewShell::bLstAct = sal_False;
// end paint and destroy ObjectContact again
DLPostPaint2(true);
@@ -1287,9 +1287,9 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
Imp()->aSmoothRect.Top( VisArea().Bottom() + lScroll - aPixSz.Height());
}
- Imp()->bSmoothUpdate = TRUE;
+ Imp()->bSmoothUpdate = sal_True;
GetWin()->Update();
- Imp()->bSmoothUpdate = FALSE;
+ Imp()->bSmoothUpdate = sal_False;
if(!Imp()->bStopSmooth)
{
@@ -1331,7 +1331,7 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
if ( !Imp()->bStopSmooth )
--nLockPaint;
SetFirstVisPageInvalid();
- return TRUE;
+ return sal_True;
}
delete pVout;
}
@@ -1342,14 +1342,14 @@ BOOL ViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect )
GetWin()->Scroll( lXDiff, lYDiff, *pRect, SCROLL_CHILDREN);
else
GetWin()->Scroll( lXDiff, lYDiff, SCROLL_CHILDREN);
- return FALSE;
+ return sal_False;
}
void ViewShell::PaintDesktop( const SwRect &rRect )
{
if ( !GetWin() && !GetOut()->GetConnectMetaFile() )
return;
- BOOL bBorderOnly = FALSE;
+ sal_Bool bBorderOnly = sal_False;
const SwRootFrm *pRoot = GetDoc()->GetRootFrm();
if ( rRect.Top() > pRoot->Frm().Bottom() )
{
@@ -1357,7 +1357,7 @@ void ViewShell::PaintDesktop( const SwRect &rRect )
while ( pPg && pPg->GetNext() )
pPg = pPg->GetNext();
if ( !pPg || !pPg->Frm().IsOver( VisArea() ) )
- bBorderOnly = TRUE;
+ bBorderOnly = sal_True;
}
const bool bBookMode = GetViewOptions()->IsViewLayoutBookMode();
@@ -1427,7 +1427,7 @@ void ViewShell::_PaintDesktop( const SwRegionRects &rRegion )
GetOut()->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
GetOut()->SetLineColor();
- for ( USHORT i = 0; i < rRegion.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rRegion.Count(); ++i )
{
const Rectangle aRectangle(rRegion[i].SVRect());
@@ -1472,20 +1472,20 @@ void ViewShell::_PaintDesktop( const SwRegionRects &rRegion )
GetOut()->Pop();
}
-BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
+sal_Bool ViewShell::CheckInvalidForPaint( const SwRect &rRect )
{
if ( !GetWin() )
- return FALSE;
+ return sal_False;
const SwPageFrm *pPage = Imp()->GetFirstVisPage();
const SwTwips nBottom = VisArea().Bottom();
const SwTwips nRight = VisArea().Right();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
while ( !bRet && pPage && !((pPage->Frm().Top() > nBottom) ||
(pPage->Frm().Left() > nRight)))
{
if ( pPage->IsInvalid() || pPage->IsInvalidFly() )
- bRet = TRUE;
+ bRet = sal_True;
pPage = (SwPageFrm*)pPage->GetNext();
}
@@ -1499,7 +1499,7 @@ BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
Imp()->DelRegion();
SwLayAction aAction( GetLayout(), Imp() );
- aAction.SetComplete( FALSE );
+ aAction.SetComplete( sal_False );
// We increment the action counter to avoid a recursive call of actions
// e.g. from a SwFEShell::RequestObjectResize(..) in bug 95829.
// A recursive call of actions is no good idea because the inner action
@@ -1512,11 +1512,11 @@ BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
SwRegionRects *pRegion = Imp()->GetRegion();
if ( pRegion && aAction.IsBrowseActionStop() )
{
- BOOL bStop = TRUE;
- for ( USHORT i = 0; i < pRegion->Count(); ++i )
+ sal_Bool bStop = sal_True;
+ for ( sal_uInt16 i = 0; i < pRegion->Count(); ++i )
{
const SwRect &rTmp = (*pRegion)[i];
- if ( FALSE == (bStop = rTmp.IsOver( VisArea() )) )
+ if ( sal_False == (bStop = rTmp.IsOver( VisArea() )) )
break;
}
if ( bStop )
@@ -1531,24 +1531,24 @@ BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
//First Invert, then Compress, never the other way round!
pRegion->Invert();
pRegion->Compress();
- bRet = FALSE;
+ bRet = sal_False;
if ( pRegion->Count() )
{
SwRegionRects aRegion( rRect );
- for ( USHORT i = 0; i < pRegion->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pRegion->Count(); ++i )
{ const SwRect &rTmp = (*pRegion)[i];
if ( !rRect.IsInside( rTmp ) )
{
InvalidateWindows( rTmp );
if ( rTmp.IsOver( VisArea() ) )
{ aRegion -= rTmp;
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
if ( bRet )
{
- for ( USHORT i = 0; i < aRegion.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aRegion.Count(); ++i )
GetWin()->Invalidate( aRegion[i].SVRect() );
if ( rRect != VisArea() )
@@ -1565,11 +1565,11 @@ BOOL ViewShell::CheckInvalidForPaint( const SwRect &rRect )
}
}
else
- bRet = FALSE;
+ bRet = sal_False;
Imp()->DelRegion();
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
@@ -1582,7 +1582,7 @@ void ViewShell::Paint(const Rectangle &rRect)
{
SwRect aTmp( rRect );
if ( !Imp()->aSmoothRect.IsInside( aTmp ) )
- Imp()->bStopSmooth = TRUE;
+ Imp()->bStopSmooth = sal_True;
else
{
Imp()->aSmoothRect = aTmp;
@@ -1615,9 +1615,9 @@ void ViewShell::Paint(const Rectangle &rRect)
return;
}
- bPaintInProgress = TRUE;
+ bPaintInProgress = sal_True;
SET_CURR_SHELL( this );
- SwRootFrm::SetNoVirDev( TRUE );
+ SwRootFrm::SetNoVirDev( sal_True );
//Wir wollen nicht staendig hin und her Clippen, wir verlassen
//uns darauf, das sich alle auf das Rechteck beschraeken und
@@ -1634,9 +1634,9 @@ void ViewShell::Paint(const Rectangle &rRect)
//vernichten.
if ( aRect.IsInside( aInvalidRect ) )
ResetInvalidRect();
- ViewShell::bLstAct = TRUE;
+ ViewShell::bLstAct = sal_True;
GetLayout()->Paint( aRect );
- ViewShell::bLstAct = FALSE;
+ ViewShell::bLstAct = sal_False;
}
else
{
@@ -1650,16 +1650,16 @@ void ViewShell::Paint(const Rectangle &rRect)
if ( aRect.IsInside( aInvalidRect ) )
ResetInvalidRect();
- ViewShell::bLstAct = TRUE;
+ ViewShell::bLstAct = sal_True;
GetLayout()->Paint( aRect );
- ViewShell::bLstAct = FALSE;
+ ViewShell::bLstAct = sal_False;
// #i101192# end Pre/PostPaint encapsulation
DLPostPaint2(true);
}
}
- SwRootFrm::SetNoVirDev( FALSE );
- bPaintInProgress = FALSE;
+ SwRootFrm::SetNoVirDev( sal_False );
+ bPaintInProgress = sal_False;
UISizeNotify();
}
}
@@ -1704,7 +1704,7 @@ void ViewShell::SetBrowseBorder( const Size& rNew )
{
aBrowseBorder = rNew;
if ( aVisArea.HasArea() )
- CheckBrowseView( FALSE );
+ CheckBrowseView( sal_False );
}
}
@@ -1727,7 +1727,7 @@ sal_Int32 ViewShell::GetBrowseWidth() const
return aVisArea.Width() - 2 * GetOut()->PixelToLogic(aBrowseBorder).Width();
}
-void ViewShell::CheckBrowseView( BOOL bBrowseChgd )
+void ViewShell::CheckBrowseView( sal_Bool bBrowseChgd )
{
if ( !bBrowseChgd &&
!getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
@@ -1772,7 +1772,7 @@ void ViewShell::CheckBrowseView( BOOL bBrowseChgd )
// Wenn sich die Groessenverhaeltnise im BrowseModus aendern,
// muss die Position und PrtArea der Cntnt- und Tab-Frames invalidiert werden.
- BYTE nInv = INV_PRTAREA | INV_TABLE | INV_POS;
+ sal_uInt8 nInv = INV_PRTAREA | INV_TABLE | INV_POS;
// Beim BrowseModus-Wechsel benoetigen die CntntFrms
// wg. der Drucker/Bildschirmformatierung eine Size-Invalidierung
if( bBrowseChgd )
@@ -1883,13 +1883,13 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
SET_CURR_SHELL( this );
- BOOL bReformat = FALSE;
+ sal_Bool bReformat = sal_False;
if( pOpt->IsShowHiddenField() != rOpt.IsShowHiddenField() )
{
((SwHiddenTxtFieldType*)pDoc->GetSysFldType( RES_HIDDENTXTFLD ))->
SetHiddenFlag( !rOpt.IsShowHiddenField() );
- bReformat = TRUE;
+ bReformat = sal_True;
}
if ( pOpt->IsShowHiddenPara() != rOpt.IsShowHiddenPara() )
{
@@ -1900,14 +1900,14 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
SwMsgPoolItem aHnt( RES_HIDDENPARA_PRINT );
pFldType->Modify( &aHnt, 0);
}
- bReformat = TRUE;
+ bReformat = sal_True;
}
if ( !bReformat && pOpt->IsShowHiddenChar() != rOpt.IsShowHiddenChar() )
{
bReformat = GetDoc()->ContainsHiddenChars();
}
- // bReformat wird TRUE, wenn ...
+ // bReformat wird sal_True, wenn ...
// - Feldnamen anzeigen oder nicht ...
// ( - SwEndPortion muessen _nicht_ mehr generiert werden. )
// - Das Window ist natuerlich was ganz anderes als der Drucker...
@@ -1925,12 +1925,12 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
// sondern der Bildschirm, muss bei Zoomfaktoraenderung neu formatiert
// werden.
if( getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
- bReformat = TRUE;
+ bReformat = sal_True;
}
if ( getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) &&
pOpt->IsPrtFormat() != rOpt.IsPrtFormat() )
- bReformat = TRUE;
+ bReformat = sal_True;
if ( HasDrawView() || rOpt.IsGridVisible() )
{
@@ -1966,7 +1966,7 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
pDView->SetMarkHdlSizePixel(rOpt.IsBigMarkHdl() ? 9 : 7);
}
- BOOL bOnlineSpellChgd = pOpt->IsOnlineSpell() != rOpt.IsOnlineSpell();
+ sal_Bool bOnlineSpellChgd = pOpt->IsOnlineSpell() != rOpt.IsOnlineSpell();
*pOpt = rOpt;
pOpt->SetUIOptions(rOpt);
@@ -1986,7 +1986,7 @@ void ViewShell::ImplApplyViewOptions( const SwViewOption &rOpt )
if( bOnlineSpellChgd )
{
ViewShell *pSh = (ViewShell*)this->GetNext();
- BOOL bOnlineSpl = rOpt.IsOnlineSpell();
+ sal_Bool bOnlineSpl = rOpt.IsOnlineSpell();
while( pSh != this )
{ pSh->pOpt->SetOnlineSpell( bOnlineSpl );
Window *pTmpWin = pSh->GetWin();
@@ -2004,18 +2004,18 @@ void ViewShell::SetUIOptions( const SwViewOption &rOpt )
//the API-Flag of the view options is set but never reset
//it is required to set scroll bars in readonly documents
if(rOpt.IsStarOneSetting())
- pOpt->SetStarOneSetting(TRUE);
+ pOpt->SetStarOneSetting(sal_True);
pOpt->SetSymbolFont(rOpt.GetSymbolFont());
}
-void ViewShell::SetReadonlyOption(BOOL bSet)
+void ViewShell::SetReadonlyOption(sal_Bool bSet)
{
if( bSet != pOpt->IsReadonly() )
{
- pOpt->SetReadonly( FALSE );
+ pOpt->SetReadonly( sal_False );
- BOOL bReformat = pOpt->IsFldName();
+ sal_Bool bReformat = pOpt->IsFldName();
pOpt->SetReadonly( bSet );
@@ -2040,7 +2040,7 @@ void ViewShell::SetPDFExportOption(sal_Bool bSet)
{
if( bSet &&
getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
- pOpt->SetPrtFormat( TRUE );
+ pOpt->SetPrtFormat( sal_True );
pOpt->SetPDFExport(bSet);
}
}
@@ -2053,7 +2053,7 @@ void ViewShell::SetReadonlySelectionOption(sal_Bool bSet)
}
}
-void ViewShell::SetPrtFormatOption( BOOL bSet )
+void ViewShell::SetPrtFormatOption( sal_Bool bSet )
{
pOpt->SetPrtFormat( bSet );
}
@@ -2062,26 +2062,26 @@ void ViewShell::UISizeNotify()
{
if ( bDocSizeChgd )
{
- bDocSizeChgd = FALSE;
- BOOL bOld = bInSizeNotify;
- bInSizeNotify = TRUE;
+ bDocSizeChgd = sal_False;
+ sal_Bool bOld = bInSizeNotify;
+ bInSizeNotify = sal_True;
::SizeNotify( this, GetDocSize() );
bInSizeNotify = bOld;
}
}
-void ViewShell::SetRestoreActions(USHORT nSet)
+void ViewShell::SetRestoreActions(sal_uInt16 nSet)
{
DBG_ASSERT(!GetRestoreActions()||!nSet, "mehrfaches Restore der Actions ?");
Imp()->SetRestoreActions(nSet);
}
-USHORT ViewShell::GetRestoreActions() const
+sal_uInt16 ViewShell::GetRestoreActions() const
{
return Imp()->GetRestoreActions();
}
-BOOL ViewShell::IsNewLayout() const
+sal_Bool ViewShell::IsNewLayout() const
{
return GetLayout()->IsNewLayout();
}
@@ -2230,7 +2230,7 @@ sal_Int32 ViewShell::GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwR
const BitmapEx& ViewShell::GetReplacementBitmap( bool bIsErrorState )
{
BitmapEx** ppRet;
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
if( bIsErrorState )
{
ppRet = &pErrorBmp;
@@ -2283,7 +2283,12 @@ const IDocumentFieldsAccess* ViewShell::getIDocumentFieldsAccess() const { retur
IDocumentContentOperations* ViewShell::getIDocumentContentOperations() { return pDoc; }
IDocumentStylePoolAccess* ViewShell::getIDocumentStylePoolAccess() { return pDoc; }
const IDocumentStatistics* ViewShell::getIDocumentStatistics() const { return pDoc; }
-IDocumentUndoRedo* ViewShell::getIDocumentUndoRedoAccess() { return pDoc; }
+
+IDocumentUndoRedo & ViewShell::GetIDocumentUndoRedo()
+{ return pDoc->GetIDocumentUndoRedo(); }
+IDocumentUndoRedo const& ViewShell::GetIDocumentUndoRedo() const
+{ return pDoc->GetIDocumentUndoRedo(); }
+
// #i83479#
const IDocumentListItems* ViewShell::getIDocumentListItemsAccess() const
{
diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx
index c0aaf60485e4..56ab8dd12671 100644
--- a/sw/source/core/view/vnew.cxx
+++ b/sw/source/core/view/vnew.cxx
@@ -33,6 +33,7 @@
#include <sfx2/printer.hxx>
#include <rtl/logfile.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docsh.hxx>
#include <viewsh.hxx>
#include <rootfrm.hxx>
@@ -52,7 +53,7 @@ void ViewShell::Init( const SwViewOption *pNewOpt )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "ViewShell::Init" );
- bDocSizeChgd = FALSE;
+ bDocSizeChgd = sal_False;
pFntCache->Flush( );
@@ -78,7 +79,7 @@ void ViewShell::Init( const SwViewOption *pNewOpt )
pDoc->set(IDocumentSettingAccess::HTML_MODE, 0 != ::GetHtmlMode( pDShell ) );
if( pDShell && pDShell->IsReadOnly() )
- pOpt->SetReadonly( TRUE );
+ pOpt->SetReadonly( sal_True );
RTL_LOGFILE_CONTEXT_TRACE( aLog, "View::Init - before InitPrt" );
@@ -157,8 +158,8 @@ ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow,
mbInConstructor = true;
bPaintInProgress = bViewLocked = bInEndAction = bFrameView =
- bEndActionByVirDev = FALSE;
- bPaintWorks = bEnableSmooth = TRUE;
+ bEndActionByVirDev = sal_False;
+ bPaintWorks = bEnableSmooth = sal_True;
bPreView = 0 !=( VSHELLFLAG_ISPREVIEW & nFlags );
// #i38810# Do not reset modified state of document, if it's already been modified.
@@ -181,7 +182,8 @@ ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow,
SetHiddenFlag( !pOpt->IsShowHiddenField() );
// #i38810#
- if ( !pDoc->IsUndoNoResetModified() && !bIsDocModified )
+ if ( !pDoc->GetIDocumentUndoRedo().IsUndoNoResetModified()
+ && !bIsDocModified )
{
pDoc->ResetModified();
}
@@ -223,9 +225,9 @@ ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
// <SwDrawContact::Changed> during contruction of <ViewShell> instance
mbInConstructor = true;
- bPaintWorks = bEnableSmooth = TRUE;
+ bPaintWorks = bEnableSmooth = sal_True;
bPaintInProgress = bViewLocked = bInEndAction = bFrameView =
- bEndActionByVirDev = FALSE;
+ bEndActionByVirDev = sal_False;
bPreView = 0 !=( VSHELLFLAG_ISPREVIEW & nFlags );
if ( bPreView )
@@ -234,7 +236,7 @@ ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
SET_CURR_SHELL( this );
pDoc->acquire();
- BOOL bModified = pDoc->IsModified();
+ sal_Bool bModified = pDoc->IsModified();
pOutput = pOut;
Init( rShell.GetViewOptions() );
@@ -243,8 +245,10 @@ ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
((SwHiddenTxtFieldType*)pDoc->GetSysFldType( RES_HIDDENTXTFLD ))->
SetHiddenFlag( !pOpt->IsShowHiddenField() );
- if( !bModified && !pDoc->IsUndoNoResetModified() )
+ if( !bModified && !pDoc->GetIDocumentUndoRedo().IsUndoNoResetModified() )
+ {
pDoc->ResetModified();
+ }
if ( SwTxtFrm::GetTxtCache()->GetCurMax() < 2550 )
SwTxtFrm::GetTxtCache()->IncreaseMax( 100 );
@@ -260,7 +264,7 @@ ViewShell::~ViewShell()
{
{
SET_CURR_SHELL( this );
- bPaintWorks = FALSE;
+ bPaintWorks = sal_False;
// #i9684#Stopping the animated graphics is not
// necessary during printing or pdf export, because the animation
@@ -322,7 +326,7 @@ ViewShell::~ViewShell()
delete pAccOptions;
}
-BOOL ViewShell::HasDrawView() const
+sal_Bool ViewShell::HasDrawView() const
{
return Imp()->HasDrawView();
}
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 6e1d1f772005..ad2f92b9c1f6 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -60,6 +60,7 @@
#include <pagefrm.hxx>
#include <cntfrm.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <wdocsh.hxx>
#include <fesh.hxx>
#include <pam.hxx>
@@ -71,7 +72,7 @@
#include <docufld.hxx> // PostItFld /-Type
#include <shellres.hxx>
#include <viewopt.hxx>
-#include <swprtopt.hxx> // SwPrtOptions
+#include <printdata.hxx> // SwPrintData
#include <pagedesc.hxx>
#include <poolfmt.hxx>
#include <mdiexp.hxx>
@@ -191,7 +192,7 @@ void SwPaintQueue::Remove( ViewShell *pSh )
}
}
-void SetSwVisArea( ViewShell *pSh, const SwRect &rRect, BOOL /*bPDFExport*/ )
+void SetSwVisArea( ViewShell *pSh, const SwRect &rRect, sal_Bool /*bPDFExport*/ )
{
OSL_ENSURE( !pSh->GetWin(), "Drucken mit Window?" );
pSh->aVisArea = rRect;
@@ -238,15 +239,15 @@ void ViewShell::InitPrt( OutputDevice *pOutDev )
pOut = pOutDev; //Oder was sonst?
}
-void ViewShell::ChgAllPageOrientation( USHORT eOri )
+void ViewShell::ChgAllPageOrientation( sal_uInt16 eOri )
{
OSL_ENSURE( nStartAction, "missing an Action" );
SET_CURR_SHELL( this );
- USHORT nAll = GetDoc()->GetPageDescCnt();
- BOOL bNewOri = Orientation(eOri) == ORIENTATION_PORTRAIT ? FALSE : TRUE;
+ sal_uInt16 nAll = GetDoc()->GetPageDescCnt();
+ sal_Bool bNewOri = Orientation(eOri) == ORIENTATION_PORTRAIT ? sal_False : sal_True;
- for( USHORT i = 0; i < nAll; ++ i )
+ for( sal_uInt16 i = 0; i < nAll; ++ i )
{
const SwPageDesc& rOld =
const_cast<const SwDoc *>(GetDoc())->GetPageDesc( i );
@@ -254,10 +255,10 @@ void ViewShell::ChgAllPageOrientation( USHORT eOri )
if( rOld.GetLandscape() != bNewOri )
{
SwPageDesc aNew( rOld );
- const sal_Bool bDoesUndo( GetDoc()->DoesUndo() );
- GetDoc()->DoUndo( sal_False );
- GetDoc()->CopyPageDesc(rOld, aNew);
- GetDoc()->DoUndo( bDoesUndo );
+ {
+ ::sw::UndoGuard const ug(GetDoc()->GetIDocumentUndoRedo());
+ GetDoc()->CopyPageDesc(rOld, aNew);
+ }
aNew.SetLandscape( bNewOri );
SwFrmFmt& rFmt = aNew.GetMaster();
SwFmtFrmSize aSz( rFmt.GetFrmSize() );
@@ -280,19 +281,19 @@ void ViewShell::ChgAllPageSize( Size &rSz )
SET_CURR_SHELL( this );
SwDoc* pMyDoc = GetDoc();
- USHORT nAll = pMyDoc->GetPageDescCnt();
+ sal_uInt16 nAll = pMyDoc->GetPageDescCnt();
- for( USHORT i = 0; i < nAll; ++i )
+ for( sal_uInt16 i = 0; i < nAll; ++i )
{
const SwPageDesc &rOld = const_cast<const SwDoc *>(pMyDoc)->GetPageDesc( i );
SwPageDesc aNew( rOld );
- const sal_Bool bDoesUndo( GetDoc()->DoesUndo() );
- GetDoc()->DoUndo( sal_False );
- GetDoc()->CopyPageDesc( rOld, aNew );
- GetDoc()->DoUndo( bDoesUndo );
+ {
+ ::sw::UndoGuard const ug(GetDoc()->GetIDocumentUndoRedo());
+ GetDoc()->CopyPageDesc( rOld, aNew );
+ }
SwFrmFmt& rPgFmt = aNew.GetMaster();
Size aSz( rSz );
- const BOOL bOri = aNew.GetLandscape();
+ const sal_Bool bOri = aNew.GetLandscape();
if( bOri ? aSz.Height() > aSz.Width()
: aSz.Height() < aSz.Width() )
{
@@ -309,7 +310,7 @@ void ViewShell::ChgAllPageSize( Size &rSz )
}
-void ViewShell::CalcPagesForPrint( USHORT nMax )
+void ViewShell::CalcPagesForPrint( sal_uInt16 nMax )
{
SET_CURR_SHELL( this );
@@ -319,16 +320,16 @@ void ViewShell::CalcPagesForPrint( USHORT nMax )
SwLayAction aAction( pLayout, Imp() );
pLayout->StartAllAction();
- for ( USHORT i = 1; pPage && i <= nMax; pPage = pPage->GetNext(), ++i )
+ for ( sal_uInt16 i = 1; pPage && i <= nMax; pPage = pPage->GetNext(), ++i )
{
pPage->Calc();
SwRect aOldVis( VisArea() );
aVisArea = pPage->Frm();
Imp()->SetFirstVisPageInvalid();
aAction.Reset();
- aAction.SetPaint( FALSE );
- aAction.SetWaitAllowed( FALSE );
- aAction.SetReschedule( TRUE );
+ aAction.SetPaint( sal_False );
+ aAction.SetWaitAllowed( sal_False );
+ aAction.SetReschedule( sal_True );
aAction.Action();
@@ -341,100 +342,6 @@ void ViewShell::CalcPagesForPrint( USHORT nMax )
/******************************************************************************/
-SwDoc * ViewShell::CreatePrtDoc( SfxObjectShellRef &rDocShellRef)
-{
- OSL_ENSURE( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only");
- SwFEShell* pFESh = (SwFEShell*)this;
-
- SwDoc *pPrtDoc = new SwDoc;
- pPrtDoc->acquire();
- pPrtDoc->SetRefForDocShell( (SfxObjectShellRef*)&(long&)rDocShellRef );
- pPrtDoc->LockExpFlds();
-
- const SfxPoolItem* pCpyItem;
- const SfxItemPool& rPool = GetAttrPool();
- for( USHORT nWh = POOLATTR_BEGIN; nWh < POOLATTR_END; ++nWh )
- if( 0 != ( pCpyItem = rPool.GetPoolDefaultItem( nWh ) ) )
- pPrtDoc->GetAttrPool().SetPoolDefaultItem( *pCpyItem );
-
- pPrtDoc->ReplaceStyles( *GetDoc() );
-
- SwShellCrsr *pActCrsr = pFESh->_GetCrsr();
- SwShellCrsr *pFirstCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetNext());
- if( !pActCrsr->HasMark() )
- {
- pActCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetPrev());
- }
-
- Point aSelPoint;
- if( pFESh->IsTableMode() )
- {
- SwShellTableCrsr* pShellTblCrsr = pFESh->GetTableCrsr();
-
- const SwCntntNode* pCntntNode = pShellTblCrsr->GetNode()->GetCntntNode();
- const SwCntntFrm *pCntntFrm = pCntntNode ? pCntntNode->GetFrm( 0, pShellTblCrsr->Start() ) : 0;
- if( pCntntFrm )
- {
- SwRect aCharRect;
- SwCrsrMoveState aTmpState( MV_NONE );
- pCntntFrm->GetCharRect( aCharRect, *pShellTblCrsr->Start(), &aTmpState );
- aSelPoint = Point( aCharRect.Left(), aCharRect.Top() );
- }
- }
- else
- {
- aSelPoint = pFirstCrsr->GetSttPos();
- }
-
- const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aSelPoint );
- OSL_ENSURE( pPage, "no page found!" );
-
- // get page descriptor - fall back to the first one if pPage could not be found
- const SwPageDesc* pPageDesc = pPage ? pPrtDoc->FindPageDescByName(
- pPage->GetPageDesc()->GetName() ) : &pPrtDoc->_GetPageDesc( (sal_uInt16)0 );
-
- if( !pFESh->IsTableMode() && pActCrsr->HasMark() )
- {
- SwNodeIndex aNodeIdx( *pPrtDoc->GetNodes().GetEndOfContent().StartOfSectionNode() );
- SwTxtNode* pTxtNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx )->GetTxtNode();
- SwCntntNode *pLastNd =
- pActCrsr->GetCntntNode( (*pActCrsr->GetMark()) <= (*pActCrsr->GetPoint()) );
-
- if( pLastNd && pLastNd->IsTxtNode() )
- ((SwTxtNode*)pLastNd)->CopyCollFmt( *pTxtNd );
- }
-
-
- pFESh->Copy( pPrtDoc );
-
- {
- SwNodeIndex aNodeIdx( *pPrtDoc->GetNodes().GetEndOfContent().StartOfSectionNode() );
- SwCntntNode* pCNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx );
- if( pFESh->IsTableMode() )
- {
- SwTableNode* pTNd = pCNd->FindTableNode();
- if( pTNd )
- pTNd->GetTable().GetFrmFmt()->SetFmtAttr( SwFmtPageDesc( pPageDesc ) );
- }
- else
- {
- pCNd->SetAttr( SwFmtPageDesc( pPageDesc ) );
- if( pFirstCrsr->HasMark() )
- {
- SwTxtNode *pTxtNd = pCNd->GetTxtNode();
- if( pTxtNd )
- {
- SwCntntNode *pFirstNd =
- pFirstCrsr->GetCntntNode( (*pFirstCrsr->GetMark()) > (*pFirstCrsr->GetPoint()) );
- if( pFirstNd && pFirstNd->IsTxtNode() )
- ((SwTxtNode*)pFirstNd)->CopyCollFmt( *pTxtNd );
- }
- }
- }
- }
- return pPrtDoc;
-}
-
SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
{
OSL_ENSURE( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only");
@@ -448,7 +355,7 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
const SfxPoolItem* pCpyItem;
const SfxItemPool& rPool = GetAttrPool();
- for( USHORT nWh = POOLATTR_BEGIN; nWh < POOLATTR_END; ++nWh )
+ for( sal_uInt16 nWh = POOLATTR_BEGIN; nWh < POOLATTR_END; ++nWh )
if( 0 != ( pCpyItem = rPool.GetPoolDefaultItem( nWh ) ) )
pPrtDoc->GetAttrPool().SetPoolDefaultItem( *pCpyItem );
@@ -533,7 +440,7 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
sal_Bool ViewShell::PrintOrPDFExport(
OutputDevice *pOutDev,
- const SwPrtOptions &rPrintData,
+ SwPrintData const& rPrintData,
sal_Int32 nRenderer /* the index in the vector of pages to be printed */ )
{
@@ -551,32 +458,14 @@ sal_Bool ViewShell::PrintOrPDFExport(
ViewShell *pShell;
SwDoc *pOutDevDoc;
- SfxObjectShellRef aDocShellRef;
-
- //! Note: Since for PDF export of (multi-)selection a temporary
- //! document is created that contains only the selects parts,
- //! and thus that document is to printed in whole the,
- //! rPrintData.bPrintSelection parameter will be false.
- BOOL bSelection = rPrintData.bPrintSelection;
-
- // PDF export for (multi-)selection has already generated a temporary document
- // with the selected text. (see XRenderable implementation in unotxdoc.cxx)
- // Thus we like to go in the 'else' part here in that case.
- // Is is implemented this way because PDF export calls this Prt function
+ // Print/PDF export for (multi-)selection has already generated a
+ // temporary document with the selected text.
+ // (see XRenderable implementation in unotxdoc.cxx)
+ // It is implemented this way because PDF export calls this Prt function
// once per page and we do not like to always have the temporary document
- // to be created that often here in the 'then' part.
- if ( bSelection )
- {
- pOutDevDoc = CreatePrtDoc( aDocShellRef );
-
- pShell = new ViewShell( *pOutDevDoc, 0, pOpt, pOutDev );
- pOutDevDoc->SetRefForDocShell( 0 );
- }
- else
- {
- pOutDevDoc = GetDoc();
- pShell = new ViewShell( *this, 0, pOutDev );
- }
+ // to be created that often here.
+ pOutDevDoc = GetDoc();
+ pShell = new ViewShell( *this, 0, pOutDev );
SdrView *pDrawView = pShell->GetDrawView();
if (pDrawView)
@@ -590,7 +479,7 @@ sal_Bool ViewShell::PrintOrPDFExport(
if( pOpt->IsReadonly() )
- pShell->pOpt->SetReadonly( TRUE );
+ pShell->pOpt->SetReadonly( sal_True );
// save options at draw view:
SwDrawViewSave aDrawViewSave( pShell->GetDrawView() );
@@ -624,7 +513,8 @@ sal_Bool ViewShell::PrintOrPDFExport(
rPrintData.GetRenderData().m_pPostItShell : pShell;
::SetSwVisArea( pViewSh2, pStPage->Frm() );
-
+// FIXME disabled because rPrintData.aOffset is always (0,0)
+#if 0
if( pStPage->GetFmt()->GetPoolFmtId() == RES_POOLPAGE_JAKET )
{
Point aNewOrigin = pOutDev->GetMapMode().GetOrigin();
@@ -633,6 +523,7 @@ sal_Bool ViewShell::PrintOrPDFExport(
aTmp.SetOrigin( aNewOrigin );
pOutDev->SetMapMode( aTmp );
}
+#endif
pShell->InitPrt( pOutDev );
@@ -647,12 +538,6 @@ sal_Bool ViewShell::PrintOrPDFExport(
delete pShell;
- if (bSelection )
- {
- if ( !pOutDevDoc->release() )
- delete pOutDevDoc;
- }
-
// restore settings of OutputDevice (should be done always now since the
// output device is now provided by a call from outside the Writer)
pOutDev->Pop();
@@ -672,7 +557,7 @@ void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintDat
{
SET_CURR_SHELL( pSh );
pSh->PrepareForPrint( rOptions );
- pSh->SetPrtFormatOption( TRUE );
+ pSh->SetPrtFormatOption( sal_True );
SwRect aSwRect( rRect );
pSh->aVisArea = aSwRect;
@@ -680,7 +565,7 @@ void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintDat
if ( pSh->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) &&
pSh->GetNext() == pSh )
{
- pSh->CheckBrowseView( FALSE );
+ pSh->CheckBrowseView( sal_False );
pDoc->GetRootFrm()->Lower()->InvalidateSize();
}
@@ -701,21 +586,21 @@ void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintDat
delete pSh;
}
-BOOL ViewShell::IsAnyFieldInDoc() const
+sal_Bool ViewShell::IsAnyFieldInDoc() const
{
const SfxPoolItem* pItem;
- USHORT nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_TXTATR_FIELD );
- for( USHORT n = 0; n < nMaxItems; ++n )
- if( 0 != (pItem = pDoc->GetAttrPool().GetItem( RES_TXTATR_FIELD, n )))
+ sal_uInt32 nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_FIELD );
+ for( sal_uInt32 n = 0; n < nMaxItems; ++n )
+ if( 0 != (pItem = pDoc->GetAttrPool().GetItem2( RES_TXTATR_FIELD, n )))
{
const SwFmtFld* pFmtFld = (SwFmtFld*)pItem;
const SwTxtFld* pTxtFld = pFmtFld->GetTxtFld();
//#i101026# do not include postits in field check
const SwField* pFld = pFmtFld->GetFld();
if( pTxtFld && pTxtFld->GetTxtNode().GetNodes().IsDocNodes() && (pFld->Which() != RES_POSTITFLD))
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
SwDrawViewSave::SwDrawViewSave( SdrView* pSdrView )
@@ -740,12 +625,12 @@ SwDrawViewSave::~SwDrawViewSave()
// #i6467# - method also called for page preview
void ViewShell::PrepareForPrint( const SwPrintData &rOptions )
{
- pOpt->SetGraphic ( TRUE == rOptions.bPrintGraphic );
- pOpt->SetTable ( TRUE == rOptions.bPrintTable );
- pOpt->SetDraw ( TRUE == rOptions.bPrintDraw );
- pOpt->SetControl ( TRUE == rOptions.bPrintControl );
- pOpt->SetPageBack( TRUE == rOptions.bPrintPageBackground );
- pOpt->SetBlackFont( TRUE == rOptions.bPrintBlackFont );
+ pOpt->SetGraphic ( sal_True == rOptions.bPrintGraphic );
+ pOpt->SetTable ( sal_True == rOptions.bPrintTable );
+ pOpt->SetDraw ( sal_True == rOptions.bPrintDraw );
+ pOpt->SetControl ( sal_True == rOptions.bPrintControl );
+ pOpt->SetPageBack( sal_True == rOptions.bPrintPageBackground );
+ pOpt->SetBlackFont( sal_True == rOptions.bPrintBlackFont );
if ( HasDrawView() )
{
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx
index 2a21ee899db5..9142689b1c87 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -68,7 +68,7 @@ public:
void NextPos() { nAktSwPos = SearchNext( nAktSwPos + 1 ); }
xub_StrLen WhereNext() const { return nAktSwPos; }
- BOOL OutAttr( xub_StrLen nSwPos );
+ sal_Bool OutAttr( xub_StrLen nSwPos );
};
@@ -89,7 +89,7 @@ xub_StrLen SwASC_AttrIter::SearchNext( xub_StrLen nStartPos )
// kann noch optimiert werden, wenn ausgenutzt wird, dass die TxtAttrs
// nach der Anfangsposition geordnet sind. Dann muessten
// allerdings noch 2 Indices gemerkt werden
- for ( USHORT i = 0; i < pTxtAttrs->Count(); i++ )
+ for ( sal_uInt16 i = 0; i < pTxtAttrs->Count(); i++ )
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
if (pHt->HasDummyChar())
@@ -108,25 +108,25 @@ xub_StrLen SwASC_AttrIter::SearchNext( xub_StrLen nStartPos )
}
-BOOL SwASC_AttrIter::OutAttr( xub_StrLen nSwPos )
+sal_Bool SwASC_AttrIter::OutAttr( xub_StrLen nSwPos )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwpHints* pTxtAttrs = rNd.GetpSwpHints();
if( pTxtAttrs )
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < pTxtAttrs->Count(); i++ )
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
if ( pHt->HasDummyChar() && nSwPos == *pHt->GetStart() )
{
- bRet = TRUE;
+ bRet = sal_True;
String sOut;
switch( pHt->Which() )
{
case RES_TXTATR_FIELD:
sOut = static_cast<SwTxtFld const*>(pHt)->GetFld().GetFld()
- ->ExpandField(rWrt.pDoc->IsClipBoard());
+ ->ExpandField(true);
break;
case RES_TXTATR_FTN:
@@ -164,7 +164,7 @@ static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& rNode )
xub_StrLen nStrPos = rWrt.pCurPam->GetPoint()->nContent.GetIndex();
xub_StrLen nNodeEnde = rNd.Len(), nEnde = nNodeEnde;
- BOOL bLastNd = rWrt.pCurPam->GetPoint()->nNode == rWrt.pCurPam->GetMark()->nNode;
+ sal_Bool bLastNd = rWrt.pCurPam->GetPoint()->nNode == rWrt.pCurPam->GetMark()->nNode;
if( bLastNd )
nEnde = rWrt.pCurPam->GetMark()->nContent.GetIndex();
@@ -206,8 +206,8 @@ static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& rNode )
} while( nStrPos < nEnde );
if( !bLastNd ||
- (( !rWrt.bWriteClipboardDoc && !rWrt.bASCII_NoLastLineEnd )
- && !nStrPos && nEnde == nNodeEnde ))
+ ( ( !rWrt.bWriteClipboardDoc && !rWrt.bASCII_NoLastLineEnd )
+ && !nStrPos && nEnde == nNodeEnde ) )
rWrt.Strm().WriteUnicodeOrByteText( ((SwASCWriter&)rWrt).GetLineEnd());
return rWrt;
diff --git a/sw/source/filter/ascii/makefile.mk b/sw/source/filter/ascii/makefile.mk
deleted file mode 100644
index 4bc8bfacd49e..000000000000
--- a/sw/source/filter/ascii/makefile.mk
+++ /dev/null
@@ -1,57 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=ascii
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-CXXFILES = \
- ascatr.cxx \
- parasc.cxx \
- wrtasc.cxx
-
-EXCEPTIONSFILES = \
- $(SLO)$/ascatr.obj \
- $(SLO)$/parasc.obj \
- $(SLO)$/wrtasc.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx
index ff537818a13f..fd4ab7226e1a 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -51,6 +51,8 @@
#include <mdiexp.hxx> // ...Percent()
#include <poolfmt.hxx>
+#include "vcl/metric.hxx"
+
#define ASC_BUFFLEN 4096
class SwASCIIParser
@@ -62,10 +64,10 @@ class SwASCIIParser
const SwAsciiOptions& rOpt;
SfxItemSet* pItemSet;
long nFileSize;
- USHORT nScript;
+ sal_uInt16 nScript;
bool bNewDoc;
- ULONG ReadChars();
+ sal_uLong ReadChars();
void InsertText( const String& rStr );
public:
@@ -73,12 +75,12 @@ public:
int bReadNewDoc, const SwAsciiOptions& rOpts );
~SwASCIIParser();
- ULONG CallParser();
+ sal_uLong CallParser();
};
// Aufruf fuer die allg. Reader-Schnittstelle
-ULONG AsciiReader::Read( SwDoc &rDoc, const String&, SwPaM &rPam, const String & )
+sal_uLong AsciiReader::Read( SwDoc &rDoc, const String&, SwPaM &rPam, const String & )
{
if( !pStrm )
{
@@ -93,7 +95,7 @@ ULONG AsciiReader::Read( SwDoc &rDoc, const String&, SwPaM &rPam, const String &
SwASCIIParser* pParser = new SwASCIIParser( &rDoc, rPam, *pStrm,
!bInsertMode, aOpt.GetASCIIOpts() );
- ULONG nRet = pParser->CallParser();
+ sal_uLong nRet = pParser->CallParser();
delete pParser;
// after Read reset the options
@@ -126,24 +128,14 @@ SwASCIIParser::SwASCIIParser(SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
}
if( rOpt.GetFontName().Len() )
{
- bool bDelete = false;
- const SfxFont* pFnt = 0;
+ Font aTextFont( rOpt.GetFontName(), Size( 0, 10 ) );
if( pDoc->getPrinter( false ) )
- pFnt = pDoc->getPrinter( false )->GetFontByName( rOpt.GetFontName() );
-
- if( !pFnt )
- {
- pFnt = new SfxFont( FAMILY_DONTKNOW, rOpt.GetFontName() );
- bDelete = true;
- }
- SvxFontItem aFont( pFnt->GetFamily(), pFnt->GetName(),
- aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), RES_CHRATR_FONT );
+ aTextFont = pDoc->getPrinter( false )->GetFontMetric( aTextFont );
+ SvxFontItem aFont( aTextFont.GetFamily(), aTextFont.GetName(),
+ aEmptyStr, aTextFont.GetPitch(), aTextFont.GetCharSet(), RES_CHRATR_FONT );
pItemSet->Put( aFont );
pItemSet->Put( aFont, RES_CHRATR_CJK_FONT );
pItemSet->Put( aFont, RES_CHRATR_CTL_FONT );
-
- if( bDelete )
- delete (SfxFont*)pFnt;
}
}
@@ -156,7 +148,7 @@ SwASCIIParser::~SwASCIIParser()
// Aufruf des Parsers
-ULONG SwASCIIParser::CallParser()
+sal_uLong SwASCIIParser::CallParser()
{
rInput.Seek(STREAM_SEEK_TO_END);
rInput.ResetError();
@@ -187,7 +179,7 @@ ULONG SwASCIIParser::CallParser()
pDoc->SetTxtFmtColl(*pPam, pColl);
}
- ULONG nError = ReadChars();
+ sal_uLong nError = ReadChars();
if( pItemSet )
{
@@ -268,7 +260,7 @@ ULONG SwASCIIParser::CallParser()
return nError;
}
-ULONG SwASCIIParser::ReadChars()
+sal_uLong SwASCIIParser::ReadChars()
{
sal_Unicode *pStt = 0, *pEnd = 0, *pLastStt = 0;
long nReadCnt = 0, nLineLen = 0;
@@ -283,7 +275,7 @@ ULONG SwASCIIParser::ReadChars()
aEmpty.GetLanguage() == rOpt.GetLanguage() &&
aEmpty.GetParaFlags() == rOpt.GetParaFlags())
{
- ULONG nLen, nOrig;
+ sal_uLong nLen, nOrig;
nOrig = nLen = rInput.Read(pArr, ASC_BUFFLEN);
CharSet eCharSet;
bool bRet = SwIoSystem::IsDetectableText(pArr, nLen, &eCharSet, &bSwapUnicode);
@@ -315,12 +307,12 @@ ULONG SwASCIIParser::ReadChars()
}
else if (pUseMe != &aEmpty) //Already successfully figured out type
{
- rInput.StartReadingUnicodeText();
+ rInput.StartReadingUnicodeText( currentCharSet );
bSwapUnicode = rInput.IsEndianSwap();
}
String sWork;
- ULONG nArrOffset = 0;
+ sal_uLong nArrOffset = 0;
do {
if( pStt >= pEnd )
@@ -329,7 +321,7 @@ ULONG SwASCIIParser::ReadChars()
InsertText( String( pLastStt ));
// lese einen neuen Block ein
- ULONG lGCount;
+ sal_uLong lGCount;
if( SVSTREAM_OK != rInput.GetError() || 0 == (lGCount =
rInput.Read( pArr + nArrOffset,
ASC_BUFFLEN - nArrOffset )))
@@ -374,7 +366,7 @@ ULONG SwASCIIParser::ReadChars()
if( bSwapUnicode )
{
sal_Char* pF = pArr, *pN = pArr + 1;
- for( ULONG n = 0; n < lGCount; n += 2, pF += 2, pN += 2 )
+ for( sal_uLong n = 0; n < lGCount; n += 2, pF += 2, pN += 2 )
{
sal_Char c = *pF;
*pF = *pN;
diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx
index 3962e094e84b..656fa2e40eeb 100644
--- a/sw/source/filter/ascii/wrtasc.cxx
+++ b/sw/source/filter/ascii/wrtasc.cxx
@@ -68,7 +68,7 @@ SwASCWriter::SwASCWriter( const String& rFltNm )
break;
case 'A':
-#if !defined(WIN) && !defined(WNT)
+#if !defined(WNT)
aNewOpts.SetCharSet( RTL_TEXTENCODING_MS_1252 );
aNewOpts.SetParaFlags( LINEEND_CRLF );
#endif
@@ -98,7 +98,7 @@ SwASCWriter::SwASCWriter( const String& rFltNm )
SwASCWriter::~SwASCWriter() {}
-ULONG SwASCWriter::WriteStream()
+sal_uLong SwASCWriter::WriteStream()
{
sal_Char cLineEnd[ 3 ];
sal_Char* pCEnd = cLineEnd;
@@ -124,7 +124,7 @@ ULONG SwASCWriter::WriteStream()
SwPaM* pPam = pOrigPam;
- BOOL bWriteSttTag = bUCS2_WithStartChar &&
+ sal_Bool bWriteSttTag = bUCS2_WithStartChar &&
(RTL_TEXTENCODING_UCS2 == GetAsciiOptions().GetCharSet() ||
RTL_TEXTENCODING_UTF8 == GetAsciiOptions().GetCharSet());
@@ -133,7 +133,7 @@ ULONG SwASCWriter::WriteStream()
// gebe alle Bereich des Pams in das ASC-File aus.
do {
- BOOL bTstFly = TRUE;
+ sal_Bool bTstFly = sal_True;
while( pCurPam->GetPoint()->nNode.GetIndex() < pCurPam->GetMark()->nNode.GetIndex() ||
(pCurPam->GetPoint()->nNode.GetIndex() == pCurPam->GetMark()->nNode.GetIndex() &&
pCurPam->GetPoint()->nContent.GetIndex() <= pCurPam->GetMark()->nContent.GetIndex()) )
@@ -176,24 +176,24 @@ ULONG SwASCWriter::WriteStream()
switch(GetAsciiOptions().GetCharSet())
{
case RTL_TEXTENCODING_UTF8:
- Strm() << BYTE(0xEF) << BYTE(0xBB) <<
- BYTE(0xBF);
+ Strm() << sal_uInt8(0xEF) << sal_uInt8(0xBB) <<
+ sal_uInt8(0xBF);
break;
case RTL_TEXTENCODING_UCS2:
- Strm().SetEndianSwap(FALSE);
+ Strm().SetEndianSwap(sal_False);
#ifdef OSL_LITENDIAN
- Strm() << BYTE(0xFF) << BYTE(0xFE);
+ Strm() << sal_uInt8(0xFF) << sal_uInt8(0xFE);
#else
- Strm() << BYTE(0xFE) << BYTE(0xFF);
+ Strm() << sal_uInt8(0xFE) << sal_uInt8(0xFF);
#endif
break;
}
- bWriteSttTag = FALSE;
+ bWriteSttTag = sal_False;
}
Out( aASCNodeFnTab, *pNd, *this );
}
- bTstFly = FALSE; // eimal Testen reicht
+ bTstFly = sal_False; // eimal Testen reicht
}
if( !pCurPam->Move( fnMoveForward, fnGoNode ) )
diff --git a/sw/source/filter/ascii/wrtasc.hxx b/sw/source/filter/ascii/wrtasc.hxx
index e260f9546c81..c073dddbc337 100644
--- a/sw/source/filter/ascii/wrtasc.hxx
+++ b/sw/source/filter/ascii/wrtasc.hxx
@@ -40,7 +40,7 @@ class SwASCWriter : public Writer
{
String sLineEnd;
- virtual ULONG WriteStream();
+ virtual sal_uLong WriteStream();
public:
SwASCWriter( const String& rFilterName );
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index 49e993581649..7d0b8a816f03 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -31,7 +31,7 @@
#define _SVSTDARR_STRINGS
#include <string.h>
-#include <stdio.h> // sscanf
+#include <stdio.h> // sscanf
#include <hintids.hxx>
#include <i18npool/lang.h>
#include <i18npool/mslangid.hxx>
@@ -78,7 +78,7 @@ using namespace com::sun::star::uno;
using namespace com::sun::star;
SwRead ReadAscii = 0, /*ReadSwg = 0, ReadSw3 = 0,*/
- ReadHTML = 0, ReadXML = 0;
+ ReadHTML = 0, ReadXML = 0;
Reader* GetRTFReader();
Reader* GetWW8Reader();
@@ -87,17 +87,17 @@ Reader* GetWW8Reader();
// ReaderWriterEnum and aFilterDetect in shellio.hxx
SwReaderWriterEntry aReaderWriter[] =
{
- SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, TRUE ),
- SwReaderWriterEntry( 0, &::GetASCWriter, FALSE ),
- SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, TRUE ),
- SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, TRUE ),
- SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, TRUE ),
- SwReaderWriterEntry( 0, &::GetHTMLWriter, TRUE ),
- SwReaderWriterEntry( 0, 0, TRUE ),
- SwReaderWriterEntry( &::GetWW8Reader, 0, TRUE ),
- SwReaderWriterEntry( 0, &::GetXMLWriter, TRUE ),
- SwReaderWriterEntry( 0, &::GetASCWriter, TRUE ),
- SwReaderWriterEntry( 0, &::GetASCWriter, TRUE )
+ SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, sal_True ),
+ SwReaderWriterEntry( 0, &::GetASCWriter, sal_False ),
+ SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, sal_True ),
+ SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, sal_True ),
+ SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, sal_True ),
+ SwReaderWriterEntry( 0, &::GetHTMLWriter, sal_True ),
+ SwReaderWriterEntry( 0, 0, sal_True ),
+ SwReaderWriterEntry( &::GetWW8Reader, 0, sal_True ),
+ SwReaderWriterEntry( 0, &::GetXMLWriter, sal_True ),
+ SwReaderWriterEntry( 0, &::GetASCWriter, sal_True ),
+ SwReaderWriterEntry( 0, &::GetASCWriter, sal_True )
};
Reader* SwReaderWriterEntry::GetReader()
@@ -122,7 +122,7 @@ void SwReaderWriterEntry::GetWriter( const String& rNm, const String& rBaseURL,
SwRead SwGetReaderXML() // SW_DLLPUBLIC
{
- return ReadXML;
+ return ReadXML;
}
bool IsDocShellRegistered()
@@ -130,9 +130,9 @@ bool IsDocShellRegistered()
return 0 != SwDocShell::_GetInterface();
}
-inline void _SetFltPtr( USHORT rPos, SwRead pReader )
+inline void _SetFltPtr( sal_uInt16 rPos, SwRead pReader )
{
- aReaderWriter[ rPos ].pReader = pReader;
+ aReaderWriter[ rPos ].pReader = pReader;
}
void _InitFilter()
@@ -147,13 +147,13 @@ void _InitFilter()
void _FinitFilter()
{
- // die Reader vernichten
- for( USHORT n = 0; n < MAXFILTER; ++n )
- {
- SwReaderWriterEntry& rEntry = aReaderWriter[n];
- if( rEntry.bDelReader && rEntry.pReader )
- delete rEntry.pReader, rEntry.pReader = NULL;
- }
+ // die Reader vernichten
+ for( sal_uInt16 n = 0; n < MAXFILTER; ++n )
+ {
+ SwReaderWriterEntry& rEntry = aReaderWriter[n];
+ if( rEntry.bDelReader && rEntry.pReader )
+ delete rEntry.pReader, rEntry.pReader = NULL;
+ }
}
@@ -168,27 +168,27 @@ Reader* GetReader( ReaderWriterEnum eReader )
void GetWriter( const String& rFltName, const String& rBaseURL, WriterRef& xRet )
{
- for( USHORT n = 0; n < MAXFILTER; ++n )
- if( aFilterDetect[n].IsFilter( rFltName ) )
- {
+ for( sal_uInt16 n = 0; n < MAXFILTER; ++n )
+ if( aFilterDetect[n].IsFilter( rFltName ) )
+ {
aReaderWriter[n].GetWriter( rFltName, rBaseURL, xRet );
- break;
- }
+ break;
+ }
}
SwRead GetReader( const String& rFltName )
{
- SwRead pRead = 0;
- for( USHORT n = 0; n < MAXFILTER; ++n )
- if( aFilterDetect[n].IsFilter( rFltName ) )
- {
- pRead = aReaderWriter[n].GetReader();
- // fuer einige Reader noch eine Sonderbehandlung:
- if ( pRead )
- pRead->SetFltName( rFltName );
- break;
- }
- return pRead;
+ SwRead pRead = 0;
+ for( sal_uInt16 n = 0; n < MAXFILTER; ++n )
+ if( aFilterDetect[n].IsFilter( rFltName ) )
+ {
+ pRead = aReaderWriter[n].GetReader();
+ // fuer einige Reader noch eine Sonderbehandlung:
+ if ( pRead )
+ pRead->SetFltName( rFltName );
+ break;
+ }
+ return pRead;
}
} // namespace SwReaderWriter
@@ -199,24 +199,24 @@ void Writer::SetPasswd( const String& ) {}
void Writer::SetVersion( const String&, long ) {}
-BOOL Writer::IsStgWriter() const { return FALSE; }
+sal_Bool Writer::IsStgWriter() const { return sal_False; }
-BOOL StgWriter::IsStgWriter() const { return TRUE; }
+sal_Bool StgWriter::IsStgWriter() const { return sal_True; }
/* */
-BOOL SwReader::NeedsPasswd( const Reader& /*rOptions*/ )
+sal_Bool SwReader::NeedsPasswd( const Reader& /*rOptions*/ )
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
return bRes;
}
-BOOL SwReader::CheckPasswd( const String& /*rPasswd*/, const Reader& /*rOptions*/ )
+sal_Bool SwReader::CheckPasswd( const String& /*rPasswd*/, const Reader& /*rOptions*/ )
{
- return TRUE;
+ return sal_True;
}
@@ -261,38 +261,38 @@ BOOL SwReader::CheckPasswd( const String& /*rPasswd*/, const Reader& /*rOptions*
</FilterFlags>
*/
-#define FILTER_OPTION_ROOT String::CreateFromAscii( \
- RTL_CONSTASCII_STRINGPARAM( "Office.Writer/FilterFlags" ) )
+#define FILTER_OPTION_ROOT String::CreateFromAscii( \
+ RTL_CONSTASCII_STRINGPARAM( "Office.Writer/FilterFlags" ) )
SwFilterOptions::SwFilterOptions( sal_uInt16 nCnt, const sal_Char** ppNames,
- sal_uInt32* pValues )
- : ConfigItem( FILTER_OPTION_ROOT )
+ sal_uInt32* pValues )
+ : ConfigItem( FILTER_OPTION_ROOT )
{
- GetValues( nCnt, ppNames, pValues );
+ GetValues( nCnt, ppNames, pValues );
}
void SwFilterOptions::GetValues( sal_uInt16 nCnt, const sal_Char** ppNames,
- sal_uInt32* pValues )
+ sal_uInt32* pValues )
{
- Sequence<OUString> aNames( nCnt );
- OUString* pNames = aNames.getArray();
- USHORT n;
-
- for( n = 0; n < nCnt; ++n )
- pNames[ n ] = OUString::createFromAscii( ppNames[ n ] );
- Sequence<Any> aValues = GetProperties( aNames );
+ Sequence<OUString> aNames( nCnt );
+ OUString* pNames = aNames.getArray();
+ sal_uInt16 n;
- if( nCnt == aValues.getLength() )
- {
- const Any* pAnyValues = aValues.getConstArray();
for( n = 0; n < nCnt; ++n )
- pValues[ n ] = pAnyValues[ n ].hasValue()
- ? *(sal_uInt32*)pAnyValues[ n ].getValue()
- : 0;
- }
- else
- for( n = 0; n < nCnt; ++n )
- pValues[ n ] = 0;
+ pNames[ n ] = OUString::createFromAscii( ppNames[ n ] );
+ Sequence<Any> aValues = GetProperties( aNames );
+
+ if( nCnt == aValues.getLength() )
+ {
+ const Any* pAnyValues = aValues.getConstArray();
+ for( n = 0; n < nCnt; ++n )
+ pValues[ n ] = pAnyValues[ n ].hasValue()
+ ? *(sal_uInt32*)pAnyValues[ n ].getValue()
+ : 0;
+ }
+ else
+ for( n = 0; n < nCnt; ++n )
+ pValues[ n ] = 0;
}
void SwFilterOptions::Commit() {}
@@ -303,66 +303,66 @@ void SwFilterOptions::Notify( const ::com::sun::star::uno::Sequence< rtl::OUStri
void StgReader::SetFltName( const String& rFltNm )
{
- if( SW_STORAGE_READER & GetReaderType() )
- aFltName = rFltNm;
+ if( SW_STORAGE_READER & GetReaderType() )
+ aFltName = rFltNm;
}
/* */
-SwRelNumRuleSpaces::SwRelNumRuleSpaces( SwDoc& rDoc, BOOL bNDoc )
- : bNewDoc( bNDoc )
+SwRelNumRuleSpaces::SwRelNumRuleSpaces( SwDoc& rDoc, sal_Bool bNDoc )
+ : bNewDoc( bNDoc )
{
- pNumRuleTbl = new SwNumRuleTbl( 8, 8 );
- if( !bNDoc )
- pNumRuleTbl->Insert( &rDoc.GetNumRuleTbl(), 0 );
+ pNumRuleTbl = new SwNumRuleTbl( 8, 8 );
+ if( !bNDoc )
+ pNumRuleTbl->Insert( &rDoc.GetNumRuleTbl(), 0 );
}
SwRelNumRuleSpaces::~SwRelNumRuleSpaces()
{
- if( pNumRuleTbl )
- {
- pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
- delete pNumRuleTbl;
- }
+ if( pNumRuleTbl )
+ {
+ pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
+ delete pNumRuleTbl;
+ }
}
void SwRelNumRuleSpaces::SetNumRelSpaces( SwDoc& rDoc )
{
- const SwNumRuleTbl* pRuleTbl = NULL;
+ const SwNumRuleTbl* pRuleTbl = NULL;
- if( !bNewDoc )
- {
- // jetzt alle schon vorhanden NumRules aus dem Array entfernen,
- // damit nur die neuen angepasst werden
- SwNumRuleTbl aNumRuleTbl;
- aNumRuleTbl.Insert( pNumRuleTbl, 0 );
- pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
- const SwNumRuleTbl& rRuleTbl = rDoc.GetNumRuleTbl();
- SwNumRule* pRule;
+ if( !bNewDoc )
+ {
+ // jetzt alle schon vorhanden NumRules aus dem Array entfernen,
+ // damit nur die neuen angepasst werden
+ SwNumRuleTbl aNumRuleTbl;
+ aNumRuleTbl.Insert( pNumRuleTbl, 0 );
+ pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
+ const SwNumRuleTbl& rRuleTbl = rDoc.GetNumRuleTbl();
+ SwNumRule* pRule;
- for( USHORT n = 0; n < rRuleTbl.Count(); ++n )
- if( USHRT_MAX == aNumRuleTbl.GetPos( ( pRule = rRuleTbl[ n ] )))
- // war noch nicht vorhanden, also neu
- pNumRuleTbl->Insert( pRule, pNumRuleTbl->Count() );
+ for( sal_uInt16 n = 0; n < rRuleTbl.Count(); ++n )
+ if( USHRT_MAX == aNumRuleTbl.GetPos( ( pRule = rRuleTbl[ n ] )))
+ // war noch nicht vorhanden, also neu
+ pNumRuleTbl->Insert( pRule, pNumRuleTbl->Count() );
- aNumRuleTbl.Remove( 0, aNumRuleTbl.Count() );
+ aNumRuleTbl.Remove( 0, aNumRuleTbl.Count() );
pRuleTbl = pNumRuleTbl;
- }
+ }
else
{
pRuleTbl = &rDoc.GetNumRuleTbl();
}
- if( pRuleTbl )
- {
- for( USHORT n = pRuleTbl->Count(); n; )
+ if( pRuleTbl )
{
- SwNumRule* pRule = (*pRuleTbl)[ --n ];
- // Rule noch gueltig und am Doc vorhanden?
- if( USHRT_MAX != rDoc.GetNumRuleTbl().GetPos( pRule ))
- {
+ for( sal_uInt16 n = pRuleTbl->Count(); n; )
+ {
+ SwNumRule* pRule = (*pRuleTbl)[ --n ];
+ // Rule noch gueltig und am Doc vorhanden?
+ if( USHRT_MAX != rDoc.GetNumRuleTbl().GetPos( pRule ))
+ {
SwNumRule::tTxtNodeList aTxtNodeList;
pRule->GetTxtNodeList( aTxtNodeList );
for ( SwNumRule::tTxtNodeList::iterator aIter = aTxtNodeList.begin();
@@ -371,220 +371,220 @@ void SwRelNumRuleSpaces::SetNumRelSpaces( SwDoc& rDoc )
SwTxtNode* pNd = *aIter;
SetNumLSpace( *pNd, *pRule );
}
- }
+ }
+ }
}
- }
- if( pNumRuleTbl )
- {
- pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
- delete pNumRuleTbl, pNumRuleTbl = 0;
- }
+ if( pNumRuleTbl )
+ {
+ pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
+ delete pNumRuleTbl, pNumRuleTbl = 0;
+ }
- if( bNewDoc )
- {
- SetOultineRelSpaces( SwNodeIndex( rDoc.GetNodes() ),
- SwNodeIndex( rDoc.GetNodes().GetEndOfContent()));
- }
+ if( bNewDoc )
+ {
+ SetOultineRelSpaces( SwNodeIndex( rDoc.GetNodes() ),
+ SwNodeIndex( rDoc.GetNodes().GetEndOfContent()));
+ }
}
void SwRelNumRuleSpaces::SetOultineRelSpaces( const SwNodeIndex& rStt,
- const SwNodeIndex& rEnd )
+ const SwNodeIndex& rEnd )
{
- SwDoc* pDoc = rStt.GetNode().GetDoc();
- const SwOutlineNodes& rOutlNds = pDoc->GetNodes().GetOutLineNds();
- if( rOutlNds.Count() )
- {
- USHORT nPos;
- rOutlNds.Seek_Entry( &rStt.GetNode(), &nPos );
- for( ; nPos < rOutlNds.Count() &&
- rOutlNds[ nPos ]->GetIndex() < rEnd.GetIndex(); ++nPos )
+ SwDoc* pDoc = rStt.GetNode().GetDoc();
+ const SwOutlineNodes& rOutlNds = pDoc->GetNodes().GetOutLineNds();
+ if( rOutlNds.Count() )
{
- SwTxtNode* pNd = rOutlNds[ nPos ]->GetTxtNode();
- if( pNd->IsOutline() && !pNd->GetNumRule() )
- SetNumLSpace( *pNd, *pDoc->GetOutlineNumRule() );
+ sal_uInt16 nPos;
+ rOutlNds.Seek_Entry( &rStt.GetNode(), &nPos );
+ for( ; nPos < rOutlNds.Count() &&
+ rOutlNds[ nPos ]->GetIndex() < rEnd.GetIndex(); ++nPos )
+ {
+ SwTxtNode* pNd = rOutlNds[ nPos ]->GetTxtNode();
+ if( pNd->IsOutline() && !pNd->GetNumRule() )
+ SetNumLSpace( *pNd, *pDoc->GetOutlineNumRule() );
+ }
}
- }
}
void SwRelNumRuleSpaces::SetNumLSpace( SwTxtNode& rNd, const SwNumRule& rRule )
{
- BOOL bOutlineRule = OUTLINE_RULE == rRule.GetRuleType();
+ sal_Bool bOutlineRule = OUTLINE_RULE == rRule.GetRuleType();
// correction of refactoring done by cws swnumtree:
// - assure a correct level for retrieving numbering format.
- BYTE nLvl = 0;
+ sal_uInt8 nLvl = 0;
if ( rNd.GetActualListLevel() >= 0 && rNd.GetActualListLevel() < MAXLEVEL )
{
- nLvl = static_cast< BYTE >(rNd.GetActualListLevel());
+ nLvl = static_cast< sal_uInt8 >(rNd.GetActualListLevel());
}
- const SwNumFmt& rFmt = rRule.Get( nLvl );
- const SvxLRSpaceItem& rLR = rNd.GetSwAttrSet().GetLRSpace();
+ const SwNumFmt& rFmt = rRule.Get( nLvl );
+ const SvxLRSpaceItem& rLR = rNd.GetSwAttrSet().GetLRSpace();
- SvxLRSpaceItem aLR( rLR );
- aLR.SetTxtFirstLineOfst( 0 );
+ SvxLRSpaceItem aLR( rLR );
+ aLR.SetTxtFirstLineOfst( 0 );
- // sagt der Node, das die Numerierung den Wert vorgibt?
- if( !bOutlineRule && rNd.IsSetNumLSpace() )
- aLR.SetTxtLeft( 0 );
- else
- {
- long nLeft = rFmt.GetAbsLSpace(), nParaLeft = rLR.GetTxtLeft();
- if( 0 < rLR.GetTxtFirstLineOfst() )
- nParaLeft += rLR.GetTxtFirstLineOfst();
- else if( nParaLeft >= nLeft )
- // set correct paragraph indent
- nParaLeft -= nLeft;
+ // sagt der Node, das die Numerierung den Wert vorgibt?
+ if( !bOutlineRule && rNd.IsSetNumLSpace() )
+ aLR.SetTxtLeft( 0 );
else
- nParaLeft = rLR.GetTxtLeft()+rLR.GetTxtFirstLineOfst();
- aLR.SetTxtLeft( nParaLeft );
- }
+ {
+ long nLeft = rFmt.GetAbsLSpace(), nParaLeft = rLR.GetTxtLeft();
+ if( 0 < rLR.GetTxtFirstLineOfst() )
+ nParaLeft += rLR.GetTxtFirstLineOfst();
+ else if( nParaLeft >= nLeft )
+ // set correct paragraph indent
+ nParaLeft -= nLeft;
+ else
+ nParaLeft = rLR.GetTxtLeft()+rLR.GetTxtFirstLineOfst();
+ aLR.SetTxtLeft( nParaLeft );
+ }
- if( aLR.GetTxtLeft() != rLR.GetTxtLeft() )
- {
- //bevor rLR geloescht wird!
- long nOffset = rLR.GetTxtLeft() - aLR.GetTxtLeft();
+ if( aLR.GetTxtLeft() != rLR.GetTxtLeft() )
+ {
+ //bevor rLR geloescht wird!
+ long nOffset = rLR.GetTxtLeft() - aLR.GetTxtLeft();
rNd.SetAttr( aLR );
- // Tabs anpassen !!
- const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rNd.GetSwAttrSet().GetItemState(
- RES_PARATR_TABSTOP, TRUE, &pItem ))
- {
- SvxTabStopItem aTStop( *(SvxTabStopItem*)pItem );
- for( USHORT n = 0; n < aTStop.Count(); ++n )
- {
- SvxTabStop& rTab = (SvxTabStop&)aTStop[ n ];
- if( SVX_TAB_ADJUST_DEFAULT != rTab.GetAdjustment() )
+ // Tabs anpassen !!
+ const SfxPoolItem* pItem;
+ if( SFX_ITEM_SET == rNd.GetSwAttrSet().GetItemState(
+ RES_PARATR_TABSTOP, sal_True, &pItem ))
{
- if( !rTab.GetTabPos() )
- {
- aTStop.Remove( n );
- --n;
- }
- else
- rTab.GetTabPos() += nOffset;
- }
- }
+ SvxTabStopItem aTStop( *(SvxTabStopItem*)pItem );
+ for( sal_uInt16 n = 0; n < aTStop.Count(); ++n )
+ {
+ SvxTabStop& rTab = (SvxTabStop&)aTStop[ n ];
+ if( SVX_TAB_ADJUST_DEFAULT != rTab.GetAdjustment() )
+ {
+ if( !rTab.GetTabPos() )
+ {
+ aTStop.Remove( n );
+ --n;
+ }
+ else
+ rTab.GetTabPos() += nOffset;
+ }
+ }
rNd.SetAttr( aTStop );
+ }
}
- }
}
/* */
void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor,
- SwTwips nPageWidth)
+ SwTwips nPageWidth)
{
- const SfxPoolItem* pItem = 0;
- if( SFX_ITEM_SET != rFlySet.GetItemState( RES_FRM_SIZE, TRUE, &pItem ) ||
- MINFLY > ((SwFmtFrmSize*)pItem)->GetWidth() )
- {
- SwFmtFrmSize aSz((SwFmtFrmSize&)rFlySet.Get(RES_FRM_SIZE, TRUE));
- if (pItem)
- aSz = (SwFmtFrmSize&)(*pItem);
-
- SwTwips nWidth;
- // dann die Breite des Flys selbst bestimmen. Ist eine Tabelle
- // defininiert, dann benutze deren Breite, sonst die Breite der
- // Seite
- const SwTableNode* pTblNd = rAnchor.GetNode().FindTableNode();
- if( pTblNd )
- nWidth = pTblNd->GetTable().GetFrmFmt()->GetFrmSize().GetWidth();
- else
- nWidth = nPageWidth;
-
- const SwNodeIndex* pSttNd = ((SwFmtCntnt&)rFlySet.Get( RES_CNTNT )).
- GetCntntIdx();
- if( pSttNd )
+ const SfxPoolItem* pItem = 0;
+ if( SFX_ITEM_SET != rFlySet.GetItemState( RES_FRM_SIZE, sal_True, &pItem ) ||
+ MINFLY > ((SwFmtFrmSize*)pItem)->GetWidth() )
{
- BOOL bOnlyOneNode = TRUE;
- ULONG nMinFrm = 0;
- ULONG nMaxFrm = 0;
- SwTxtNode* pFirstTxtNd = 0;
- SwNodeIndex aIdx( *pSttNd, 1 );
- SwNodeIndex aEnd( *pSttNd->GetNode().EndOfSectionNode() );
- while( aIdx < aEnd )
- {
- SwTxtNode *pTxtNd = aIdx.GetNode().GetTxtNode();
- if( pTxtNd )
- {
- if( !pFirstTxtNd )
- pFirstTxtNd = pTxtNd;
- else if( pFirstTxtNd != pTxtNd )
- {
- // forget it
- bOnlyOneNode = FALSE;
- break;
- }
-
- ULONG nAbsMinCnts;
- pTxtNd->GetMinMaxSize( aIdx.GetIndex(), nMinFrm,
- nMaxFrm, nAbsMinCnts );
- }
- aIdx++;
- }
+ SwFmtFrmSize aSz((SwFmtFrmSize&)rFlySet.Get(RES_FRM_SIZE, sal_True));
+ if (pItem)
+ aSz = (SwFmtFrmSize&)(*pItem);
+
+ SwTwips nWidth;
+ // dann die Breite des Flys selbst bestimmen. Ist eine Tabelle
+ // defininiert, dann benutze deren Breite, sonst die Breite der
+ // Seite
+ const SwTableNode* pTblNd = rAnchor.GetNode().FindTableNode();
+ if( pTblNd )
+ nWidth = pTblNd->GetTable().GetFrmFmt()->GetFrmSize().GetWidth();
+ else
+ nWidth = nPageWidth;
- if( bOnlyOneNode )
- {
- if( nMinFrm < MINLAY && pFirstTxtNd )
+ const SwNodeIndex* pSttNd = ((SwFmtCntnt&)rFlySet.Get( RES_CNTNT )).
+ GetCntntIdx();
+ if( pSttNd )
{
- // if the first node dont contained any content, then
- // insert one char in it calc again and delete once again
- SwIndex aNdIdx( pFirstTxtNd );
+ sal_Bool bOnlyOneNode = sal_True;
+ sal_uLong nMinFrm = 0;
+ sal_uLong nMaxFrm = 0;
+ SwTxtNode* pFirstTxtNd = 0;
+ SwNodeIndex aIdx( *pSttNd, 1 );
+ SwNodeIndex aEnd( *pSttNd->GetNode().EndOfSectionNode() );
+ while( aIdx < aEnd )
+ {
+ SwTxtNode *pTxtNd = aIdx.GetNode().GetTxtNode();
+ if( pTxtNd )
+ {
+ if( !pFirstTxtNd )
+ pFirstTxtNd = pTxtNd;
+ else if( pFirstTxtNd != pTxtNd )
+ {
+ // forget it
+ bOnlyOneNode = sal_False;
+ break;
+ }
+
+ sal_uLong nAbsMinCnts;
+ pTxtNd->GetMinMaxSize( aIdx.GetIndex(), nMinFrm,
+ nMaxFrm, nAbsMinCnts );
+ }
+ aIdx++;
+ }
+
+ if( bOnlyOneNode )
+ {
+ if( nMinFrm < MINLAY && pFirstTxtNd )
+ {
+ // if the first node dont contained any content, then
+ // insert one char in it calc again and delete once again
+ SwIndex aNdIdx( pFirstTxtNd );
pFirstTxtNd->InsertText( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "MM" )), aNdIdx );
- ULONG nAbsMinCnts;
- pFirstTxtNd->GetMinMaxSize( pFirstTxtNd->GetIndex(),
- nMinFrm, nMaxFrm, nAbsMinCnts );
- aNdIdx -= 2;
+ sal_uLong nAbsMinCnts;
+ pFirstTxtNd->GetMinMaxSize( pFirstTxtNd->GetIndex(),
+ nMinFrm, nMaxFrm, nAbsMinCnts );
+ aNdIdx -= 2;
pFirstTxtNd->EraseText( aNdIdx, 2 );
}
- // Umrandung und Abstand zum Inhalt beachten
- const SvxBoxItem& rBoxItem = (SvxBoxItem&)rFlySet.Get( RES_BOX );
- USHORT nLine = BOX_LINE_LEFT;
- for( int i = 0; i < 2; ++i )
- {
- const SvxBorderLine* pLn = rBoxItem.GetLine( nLine );
- if( pLn )
- {
- USHORT nWidthTmp = pLn->GetOutWidth() + pLn->GetInWidth();
+ // Umrandung und Abstand zum Inhalt beachten
+ const SvxBoxItem& rBoxItem = (SvxBoxItem&)rFlySet.Get( RES_BOX );
+ sal_uInt16 nLine = BOX_LINE_LEFT;
+ for( int i = 0; i < 2; ++i )
+ {
+ const SvxBorderLine* pLn = rBoxItem.GetLine( nLine );
+ if( pLn )
+ {
+ sal_uInt16 nWidthTmp = pLn->GetOutWidth() + pLn->GetInWidth();
nWidthTmp = nWidthTmp + rBoxItem.GetDistance( nLine );
- nMinFrm += nWidthTmp;
- nMaxFrm += nWidthTmp;
- }
- nLine = BOX_LINE_RIGHT;
+ nMinFrm += nWidthTmp;
+ nMaxFrm += nWidthTmp;
+ }
+ nLine = BOX_LINE_RIGHT;
+ }
+
+ // Mindestbreite fuer Inhalt einhalten
+ if( nMinFrm < MINLAY )
+ nMinFrm = MINLAY;
+ if( nMaxFrm < MINLAY )
+ nMaxFrm = MINLAY;
+
+ if( nWidth > (sal_uInt16)nMaxFrm )
+ nWidth = nMaxFrm;
+ else if( nWidth > (sal_uInt16)nMinFrm )
+ nWidth = nMinFrm;
+ }
}
- // Mindestbreite fuer Inhalt einhalten
- if( nMinFrm < MINLAY )
- nMinFrm = MINLAY;
- if( nMaxFrm < MINLAY )
- nMaxFrm = MINLAY;
-
- if( nWidth > (USHORT)nMaxFrm )
- nWidth = nMaxFrm;
- else if( nWidth > (USHORT)nMinFrm )
- nWidth = nMinFrm;
- }
- }
-
- if( MINFLY > nWidth )
- nWidth = MINFLY;
+ if( MINFLY > nWidth )
+ nWidth = MINFLY;
- aSz.SetWidth( nWidth );
- if( MINFLY > aSz.GetHeight() )
- aSz.SetHeight( MINFLY );
- rFlySet.Put( aSz );
- }
- else if( MINFLY > ((SwFmtFrmSize*)pItem)->GetHeight() )
- {
- SwFmtFrmSize aSz( *(SwFmtFrmSize*)pItem );
- aSz.SetHeight( MINFLY );
- rFlySet.Put( aSz );
- }
+ aSz.SetWidth( nWidth );
+ if( MINFLY > aSz.GetHeight() )
+ aSz.SetHeight( MINFLY );
+ rFlySet.Put( aSz );
+ }
+ else if( MINFLY > ((SwFmtFrmSize*)pItem)->GetHeight() )
+ {
+ SwFmtFrmSize aSz( *(SwFmtFrmSize*)pItem );
+ aSz.SetHeight( MINFLY );
+ rFlySet.Put( aSz );
+ }
}
/* */
@@ -714,7 +714,7 @@ rtl_TextEncoding CharSetFromName(const String& rChrSetStr)
OSL_ENSURE(nRet != pStart->eCode, "TXT: That was an unknown language!");
- return nRet;
+ return nRet;
}
@@ -743,55 +743,55 @@ String NameFromCharSet(rtl_TextEncoding nChrSet)
// for the automatic conversion (mail/news/...)
// The user data contains the options for the ascii import/export filter.
// The format is:
-// 1. CharSet - as ascii chars
-// 2. LineEnd - as CR/LR/CRLF
-// 3. Fontname
-// 4. Language
+// 1. CharSet - as ascii chars
+// 2. LineEnd - as CR/LR/CRLF
+// 3. Fontname
+// 4. Language
// the delimetercharacter is ","
//
void SwAsciiOptions::ReadUserData( const String& rStr )
{
- xub_StrLen nToken = 0;
- USHORT nCnt = 0;
- String sToken;
- do {
- if( 0 != (sToken = rStr.GetToken( 0, ',', nToken )).Len() )
- {
- switch( nCnt )
- {
- case 0: // CharSet
+ xub_StrLen nToken = 0;
+ sal_uInt16 nCnt = 0;
+ String sToken;
+ do {
+ if( 0 != (sToken = rStr.GetToken( 0, ',', nToken )).Len() )
+ {
+ switch( nCnt )
+ {
+ case 0: // CharSet
eCharSet = CharSetFromName(sToken);
- break;
- case 1: // LineEnd
- if( sToken.EqualsIgnoreCaseAscii( "CRLF" ))
- eCRLF_Flag = LINEEND_CRLF;
- else if( sToken.EqualsIgnoreCaseAscii( "LF" ))
- eCRLF_Flag = LINEEND_LF;
- else
- eCRLF_Flag = LINEEND_CR;
- break;
- case 2: // fontname
- sFont = sToken;
- break;
- case 3: // Language
+ break;
+ case 1: // LineEnd
+ if( sToken.EqualsIgnoreCaseAscii( "CRLF" ))
+ eCRLF_Flag = LINEEND_CRLF;
+ else if( sToken.EqualsIgnoreCaseAscii( "LF" ))
+ eCRLF_Flag = LINEEND_LF;
+ else
+ eCRLF_Flag = LINEEND_CR;
+ break;
+ case 2: // fontname
+ sFont = sToken;
+ break;
+ case 3: // Language
nLanguage = MsLangId::convertIsoStringToLanguage( sToken );
- break;
- }
- }
- ++nCnt;
- } while( STRING_NOTFOUND != nToken );
+ break;
+ }
+ }
+ ++nCnt;
+ } while( STRING_NOTFOUND != nToken );
}
void SwAsciiOptions::WriteUserData( String& rStr )
{
- // 1. charset
- rStr = NameFromCharSet(eCharSet);
- rStr += ',';
+ // 1. charset
+ rStr = NameFromCharSet(eCharSet);
+ rStr += ',';
- // 2. LineEnd
- switch(eCRLF_Flag)
- {
+ // 2. LineEnd
+ switch(eCRLF_Flag)
+ {
case LINEEND_CRLF:
rStr.AppendAscii( "CRLF" );
break;
@@ -801,20 +801,20 @@ void SwAsciiOptions::WriteUserData( String& rStr )
case LINEEND_LF:
rStr.AppendAscii( "LF" );
break;
- }
- rStr += ',';
+ }
+ rStr += ',';
- // 3. Fontname
- rStr += sFont;
- rStr += ',';
+ // 3. Fontname
+ rStr += sFont;
+ rStr += ',';
- // 4. Language
- if (nLanguage)
- {
+ // 4. Language
+ if (nLanguage)
+ {
rtl::OUString sTmp = MsLangId::convertLanguageToIsoString( nLanguage );
rStr += (String)sTmp;
- }
- rStr += ',';
+ }
+ rStr += ',';
}
extern "C" { static void SAL_CALL thisModule() {} }
@@ -822,11 +822,11 @@ extern "C" { static void SAL_CALL thisModule() {} }
static oslGenericFunction GetMswordLibSymbol( const char *pSymbol )
{
static ::osl::Module aModule;
- static sal_Bool bLoaded = sal_False;
+ static sal_Bool bLoaded = sal_False;
static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "msword" ) ) );
- if (!bLoaded)
- bLoaded = SvLibrary::LoadModule( aModule, aLibName, &thisModule );
- if (bLoaded)
+ if (!bLoaded)
+ bLoaded = SvLibrary::LoadModule( aModule, aLibName, &thisModule );
+ if (bLoaded)
return aModule.getFunctionSymbol( ::rtl::OUString::createFromAscii( pSymbol ) );
return NULL;
}
@@ -871,23 +871,23 @@ void GetWW8Writer( const String& rFltName, const String& rBaseURL, WriterRef& xR
xRet = WriterRef(0);
}
-typedef ULONG ( __LOADONCALLAPI *SaveOrDel )( SfxObjectShell&, SotStorage&, BOOL, const String& );
-typedef ULONG ( __LOADONCALLAPI *GetSaveWarning )( SfxObjectShell& );
+typedef sal_uLong ( __LOADONCALLAPI *SaveOrDel )( SfxObjectShell&, SotStorage&, sal_Bool, const String& );
+typedef sal_uLong ( __LOADONCALLAPI *GetSaveWarning )( SfxObjectShell& );
-ULONG SaveOrDelMSVBAStorage( SfxObjectShell& rDoc, SotStorage& rStor, BOOL bSaveInto, const String& rStorageName )
+sal_uLong SaveOrDelMSVBAStorage( SfxObjectShell& rDoc, SotStorage& rStor, sal_Bool bSaveInto, const String& rStorageName )
{
SaveOrDel pFunction = reinterpret_cast<SaveOrDel>( GetMswordLibSymbol( "SaveOrDelMSVBAStorage_ww8" ) );
if( pFunction )
- return pFunction( rDoc, rStor, bSaveInto, rStorageName );
- return ERRCODE_NONE;
+ return pFunction( rDoc, rStor, bSaveInto, rStorageName );
+ return ERRCODE_NONE;
}
-ULONG GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS )
+sal_uLong GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS )
{
GetSaveWarning pFunction = reinterpret_cast<GetSaveWarning>( GetMswordLibSymbol( "GetSaveWarningOfMSVBAStorage_ww8" ) );
if( pFunction )
- return pFunction( rDocS );
- return ERRCODE_NONE;
+ return pFunction( rDocS );
+ return ERRCODE_NONE;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index 8fcb6dd99fa5..81012d99768c 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -53,7 +53,7 @@ SwIoDetect aFilterDetect[] =
SwIoDetect( FILTER_TEXT, 4 )
};
-const sal_Char* SwIoDetect::IsReader(const sal_Char* pHeader, ULONG nLen_,
+const sal_Char* SwIoDetect::IsReader(const sal_Char* pHeader, sal_uLong nLen_,
const String & /*rFileName*/, const String& /*rUserData*/) const
{
// Filter erkennung
@@ -66,17 +66,17 @@ const sal_Char* SwIoDetect::IsReader(const sal_Char* pHeader, ULONG nLen_,
SVBT16 pnNext; // 0x8
SVBT16 fFlags;
- USHORT nFibGet() { return SVBT16ToShort(nFib); }
- USHORT wIdentGet() { return SVBT16ToShort(wIdent); }
- USHORT fFlagsGet() { return SVBT16ToShort(fFlags); }
+ sal_uInt16 nFibGet() { return SVBT16ToShort(nFib); }
+ sal_uInt16 wIdentGet() { return SVBT16ToShort(wIdent); }
+ sal_uInt16 fFlagsGet() { return SVBT16ToShort(fFlags); }
// SVBT16 fComplex :1;// 0004 when 1, file is in complex, fast-saved format.
- BOOL fComplexGet() { return static_cast< BOOL >((fFlagsGet() >> 2) & 1); }
+ sal_Bool fComplexGet() { return static_cast< sal_Bool >((fFlagsGet() >> 2) & 1); }
};
- int bRet = FALSE;
+ int bRet = sal_False;
rtl::OString aName( pName );
if ( sHTML == aName )
- bRet = HTMLParser::IsHTMLFormat( pHeader, TRUE, RTL_TEXTENCODING_DONTKNOW );
+ bRet = HTMLParser::IsHTMLFormat( pHeader, sal_True, RTL_TEXTENCODING_DONTKNOW );
else if ( FILTER_RTF == aName )
bRet = 0 == strncmp( "{\\rtf", pHeader, 5 );
else if ( sWW5 == aName )
@@ -138,16 +138,16 @@ const SfxFilter* SwIoSystem::GetFilterOfFormat(const String& rFmtNm,
if( pCnt || pFltCnt == &aCntSwWeb )
break;
pFltCnt = &aCntSwWeb;
- } while( TRUE );
+ } while( sal_True );
return 0;
}
-BOOL SwIoSystem::IsValidStgFilter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const SfxFilter& rFilter)
+sal_Bool SwIoSystem::IsValidStgFilter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const SfxFilter& rFilter)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
try
{
- ULONG nStgFmtId = SotStorage::GetFormatID( rStg );
+ sal_uLong nStgFmtId = SotStorage::GetFormatID( rStg );
bRet = rStg->isStreamElement( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("content.xml")) );
if ( bRet )
bRet = ( nStgFmtId && ( rFilter.GetFormat() == nStgFmtId ) );
@@ -159,9 +159,9 @@ BOOL SwIoSystem::IsValidStgFilter( const com::sun::star::uno::Reference < com::s
return bRet;
}
-BOOL SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter)
+sal_Bool SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter)
{
- ULONG nStgFmtId = rStg.GetFormat();
+ sal_uLong nStgFmtId = rStg.GetFormat();
/*#i8409# We cannot trust the clipboard id anymore :-(*/
if( rFilter.GetUserData().EqualsAscii(FILTER_WW8) ||
rFilter.GetUserData().EqualsAscii(sWW6) )
@@ -169,7 +169,7 @@ BOOL SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter)
nStgFmtId = 0;
}
- BOOL bRet = SVSTREAM_OK == rStg.GetError() &&
+ sal_Bool bRet = SVSTREAM_OK == rStg.GetError() &&
( !nStgFmtId || rFilter.GetFormat() == nStgFmtId ) &&
( rStg.IsContained( SwIoSystem::GetSubStorageName( rFilter )) );
if( bRet )
@@ -188,7 +188,7 @@ BOOL SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter)
rStg.OpenSotStream(String::CreateFromAscii("WordDocument"),
STREAM_STD_READ | STREAM_NOCREATE );
xRef->Seek(10);
- BYTE nByte;
+ sal_uInt8 nByte;
*xRef >> nByte;
bRet = !(nByte & 1);
}
@@ -197,7 +197,7 @@ BOOL SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter)
return bRet;
}
-void TerminateBuffer(sal_Char *pBuffer, ULONG nBytesRead, ULONG nBufferLen)
+void TerminateBuffer(sal_Char *pBuffer, sal_uLong nBytesRead, sal_uLong nBufferLen)
{
OSL_ENSURE(nBytesRead <= nBufferLen - 2,
"what you read must be less than the max + null termination");
@@ -213,10 +213,10 @@ void TerminateBuffer(sal_Char *pBuffer, ULONG nBytesRead, ULONG nBufferLen)
/* Feststellen ob das File in dem entsprechenden Format vorliegt. */
/* Z.z werden nur unsere eigene Filter unterstuetzt */
-BOOL SwIoSystem::IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
+sal_Bool SwIoSystem::IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
const SfxFilter** ppFilter )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SfxFilterContainer aCntSw( String::CreateFromAscii( sSWRITER ) );
SfxFilterContainer aCntSwWeb( String::CreateFromAscii( sSWRITERWEB ) );
@@ -230,7 +230,7 @@ BOOL SwIoSystem::IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
{
SvStream* pStream = rMedium.GetInStream();
if ( pStream && SotStorage::IsStorageFile(pStream) )
- xStg = new SotStorage( pStream, FALSE );
+ xStg = new SotStorage( pStream, sal_False );
}
SfxFilterMatcher aMatcher( rFltContainer.GetName() );
@@ -255,11 +255,11 @@ BOOL SwIoSystem::IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
if( pStrm && !pStrm->GetError() )
{
sal_Char aBuffer[4098];
- const ULONG nMaxRead = sizeof(aBuffer) - 2;
- ULONG nBytesRead = pStrm->Read(aBuffer, nMaxRead);
+ const sal_uLong nMaxRead = sizeof(aBuffer) - 2;
+ sal_uLong nBytesRead = pStrm->Read(aBuffer, nMaxRead);
pStrm->Seek(STREAM_SEEK_TO_BEGIN);
TerminateBuffer(aBuffer, nBytesRead, sizeof(aBuffer));
- for (USHORT i = 0; i < MAXFILTER; ++i)
+ for (sal_uInt16 i = 0; i < MAXFILTER; ++i)
{
if (aFilterDetect[i].IsFilter(rFmtName))
{
@@ -312,13 +312,13 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName,
INetURLObject aObj;
aObj.SetSmartProtocol( INET_PROT_FILE );
aObj.SetSmartURL( rFileName );
- pMedium = new SfxMedium( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READ, FALSE );
+ pMedium = new SfxMedium( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READ, sal_False );
}
// templates should not get precedence over "normal" filters (#i35508, #i33168)
const SfxFilter* pTemplateFilter = 0;
const SfxFilter* pOldFilter = pFCntnr->GetFilter4FilterName( rPrefFltName );
- BOOL bLookForTemplate = pOldFilter && pOldFilter->IsOwnTemplateFormat();
+ sal_Bool bLookForTemplate = pOldFilter && pOldFilter->IsOwnTemplateFormat();
if ( pMedium->IsStorage() )
{
com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStor = pMedium->GetStorage();
@@ -347,7 +347,7 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName,
{
SvStream* pStream = pMedium->GetInStream();
if ( pStream && SotStorage::IsStorageFile(pStream) )
- xStg = new SotStorage( pStream, FALSE );
+ xStg = new SotStorage( pStream, sal_False );
if( xStg.Is() && ( xStg->GetError() == SVSTREAM_OK ) )
{
@@ -376,14 +376,14 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName,
}
sal_Char aBuffer[4098];
- const ULONG nMaxRead = sizeof(aBuffer) - 2;
- ULONG nBytesRead = 0;
+ const sal_uLong nMaxRead = sizeof(aBuffer) - 2;
+ sal_uLong nBytesRead = 0;
if (pMedium)
{
SvStream* pIStrm = pMedium->GetInStream();
if( !pIStrm || SVSTREAM_OK != pIStrm->GetError() )
return 0;
- ULONG nCurrPos = pIStrm->Tell();
+ sal_uLong nCurrPos = pIStrm->Tell();
nBytesRead = pIStrm->Read(aBuffer, nMaxRead);
pIStrm->Seek( nCurrPos );
}
@@ -400,7 +400,7 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName,
{
const SfxFilter* pFilterTmp = 0;
const sal_Char* pNm;
- for( USHORT n = 0; n < MAXFILTER; ++n )
+ for( sal_uInt16 n = 0; n < MAXFILTER; ++n )
{
String sEmptyUserData;
pNm = aFilterDetect[n].IsReader(aBuffer, nBytesRead, rFileName, sEmptyUserData);
@@ -423,7 +423,7 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName,
return SwIoSystem::GetTextFilter( aBuffer, nBytesRead);
}
-bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen,
+bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, sal_uLong &rLen,
CharSet *pCharSet, bool *pSwap, LineEnd *pLineEnd, bool bEncodedFilter)
{
bool bSwap = false;
@@ -432,20 +432,20 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen,
/*See if its a known unicode type*/
if (rLen >= 2)
{
- ULONG nHead=0;
- if (rLen > 2 && BYTE(pBuf[0]) == 0xEF && BYTE(pBuf[1]) == 0xBB &&
- BYTE(pBuf[2]) == 0xBF)
+ sal_uLong nHead=0;
+ if (rLen > 2 && sal_uInt8(pBuf[0]) == 0xEF && sal_uInt8(pBuf[1]) == 0xBB &&
+ sal_uInt8(pBuf[2]) == 0xBF)
{
eCharSet = RTL_TEXTENCODING_UTF8;
nHead = 3;
}
- else if (BYTE(pBuf[0]) == 0xFE && BYTE(pBuf[1]) == 0xFF)
+ else if (sal_uInt8(pBuf[0]) == 0xFE && sal_uInt8(pBuf[1]) == 0xFF)
{
eCharSet = RTL_TEXTENCODING_UCS2;
bLE = false;
nHead = 2;
}
- else if (BYTE(pBuf[1]) == 0xFE && BYTE(pBuf[0]) == 0xFF)
+ else if (sal_uInt8(pBuf[1]) == 0xFE && sal_uInt8(pBuf[0]) == 0xFF)
{
eCharSet = RTL_TEXTENCODING_UCS2;
nHead = 2;
@@ -506,7 +506,7 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen,
sWork.ReleaseBufferAccess( static_cast< xub_StrLen >(nNewLen) );
pNewBuf = sWork.GetBufferAccess();
- for (ULONG nCnt = 0; nCnt < nNewLen; ++nCnt, ++pNewBuf)
+ for (sal_uLong nCnt = 0; nCnt < nNewLen; ++nCnt, ++pNewBuf)
{
switch (*pNewBuf)
{
@@ -523,7 +523,7 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen,
}
else
{
- for( ULONG nCnt = 0; nCnt < rLen; ++nCnt, ++pBuf )
+ for( sal_uLong nCnt = 0; nCnt < rLen; ++nCnt, ++pBuf )
{
switch (*pBuf)
{
@@ -565,7 +565,7 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen,
return bEncodedFilter || (!bIsBareUnicode && eSysLE == eLineEnd);
}
-const SfxFilter* SwIoSystem::GetTextFilter( const sal_Char* pBuf, ULONG nLen)
+const SfxFilter* SwIoSystem::GetTextFilter( const sal_Char* pBuf, sal_uLong nLen)
{
bool bAuto = IsDetectableText(pBuf, nLen);
const sal_Char* pNm = bAuto ? FILTER_TEXT : FILTER_TEXT_DLG;
diff --git a/sw/source/filter/basflt/makefile.mk b/sw/source/filter/basflt/makefile.mk
deleted file mode 100644
index e52622717426..000000000000
--- a/sw/source/filter/basflt/makefile.mk
+++ /dev/null
@@ -1,57 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=basflt
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(mydebug)" != ""
-CDEFS+=-Dmydebug
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
-
-EXCEPTIONSFILES = \
- $(SLO)$/docfact.obj \
- $(SLO)$/fltini.obj \
- $(SLO)$/iodetect.obj \
- $(SLO)$/shellio.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index 6a3d12bca014..aeb5946a6aa7 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
#include <tools/date.hxx>
#include <tools/time.hxx>
@@ -47,6 +48,7 @@
#include <swtypes.hxx>
#include <shellio.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pam.hxx>
#include <editsh.hxx>
#include <undobj.hxx> // fuer Undo Insert-Dokument
@@ -68,7 +70,7 @@ using namespace ::com::sun::star;
//////////////////////////////////////////////////////////////////////////
-ULONG SwReader::Read( const Reader& rOptions )
+sal_uLong SwReader::Read( const Reader& rOptions )
{
// Variable uebertragen
Reader* po = (Reader*) &rOptions;
@@ -81,14 +83,14 @@ ULONG SwReader::Read( const Reader& rOptions )
if( 0 != (po->pMedium = pMedium ) &&
!po->SetStrmStgPtr() )
{
- po->SetReadUTF8( FALSE );
- po->SetBlockMode( FALSE );
- po->SetOrganizerMode( FALSE );
- po->SetIgnoreHTMLComments( FALSE );
+ po->SetReadUTF8( sal_False );
+ po->SetBlockMode( sal_False );
+ po->SetOrganizerMode( sal_False );
+ po->SetIgnoreHTMLComments( sal_False );
return ERR_SWG_FILE_FORMAT_ERROR;
}
- ULONG nError = 0L;
+ sal_uLong nError = 0L;
GetDoc();
@@ -122,24 +124,24 @@ ULONG SwReader::Read( const Reader& rOptions )
SwPaM *pEnd = pPam;
SwUndoInsDoc* pUndo = 0;
- BOOL bReadPageDescs = FALSE;
- BOOL bDocUndo = pDoc->DoesUndo();
- BOOL bSaveUndo = bDocUndo && pCrsr;
+ sal_Bool bReadPageDescs = sal_False;
+ bool const bDocUndo = pDoc->GetIDocumentUndoRedo().DoesUndo();
+ sal_Bool bSaveUndo = bDocUndo && pCrsr;
if( bSaveUndo )
{
// das Einlesen von Seitenvorlagen ist nicht Undofaehig!
if( 0 != ( bReadPageDescs = po->aOpt.IsPageDescs() ) )
{
- bSaveUndo = FALSE;
- pDoc->DelAllUndoObj();
+ bSaveUndo = sal_False;
+ pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
}
else
{
- pDoc->ClearRedo();
- pDoc->StartUndo( UNDO_INSDOKUMENT, NULL );
+ pDoc->GetIDocumentUndoRedo().ClearRedo();
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_INSDOKUMENT, NULL );
}
}
- pDoc->DoUndo( FALSE );
+ pDoc->GetIDocumentUndoRedo().DoUndo(false);
SwNodeIndex aSplitIdx( pDoc->GetNodes() );
@@ -149,9 +151,9 @@ ULONG SwReader::Read( const Reader& rOptions )
// Array von FlyFormaten
SwSpzFrmFmts aFlyFrmArr;
// only read templates? then ignore multi selection!
- BOOL bFmtsOnly = po->aOpt.IsFmtsOnly();
+ sal_Bool bFmtsOnly = po->aOpt.IsFmtsOnly();
- while( TRUE )
+ while( sal_True )
{
if( bSaveUndo )
pUndo = new SwUndoInsDoc( *pPam );
@@ -208,7 +210,7 @@ ULONG SwReader::Read( const Reader& rOptions )
SwTableBox* pBox = pTblBoxStart->GetTblBox();
if ( pBox )
{
- pDoc->ChkBoxNumFmt( *pBox, TRUE );
+ pDoc->ChkBoxNumFmt( *pBox, sal_True );
}
}
}
@@ -229,7 +231,7 @@ ULONG SwReader::Read( const Reader& rOptions )
// Suche alle neuen Fly's und speicher sie als einzelne Undo
// Objecte
- for( USHORT n = 0; n < pDoc->GetSpzFrmFmts()->Count(); ++n )
+ for( sal_uInt16 n = 0; n < pDoc->GetSpzFrmFmts()->Count(); ++n )
{
SwFrmFmt* pFrmFmt = (*pDoc->GetSpzFrmFmts())[ n ];
const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
@@ -272,7 +274,11 @@ ULONG SwReader::Read( const Reader& rOptions )
if( bSaveUndo )
{
pDoc->SetRedlineMode_intern( eOld );
- pDoc->AppendUndo( new SwUndoInsLayFmt( pFrmFmt,0,0 ) );
+ // UGLY: temp. enable undo
+ pDoc->GetIDocumentUndoRedo().DoUndo(true);
+ pDoc->GetIDocumentUndoRedo().AppendUndo(
+ new SwUndoInsLayFmt( pFrmFmt,0,0 ) );
+ pDoc->GetIDocumentUndoRedo().DoUndo(false);
pDoc->SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE );
}
if( pFrmFmt->GetDepends() )
@@ -293,7 +299,7 @@ ULONG SwReader::Read( const Reader& rOptions )
// seitengebundene Flys eingefuegt, dann schalte
// die Optimierungs-Flags vom SwDoc ab. Sonst
// werden die Flys nicht an der Position erzeugt.
- pDoc->SetLoaded( FALSE );
+ pDoc->SetLoaded( sal_False );
}
}
else
@@ -315,8 +321,11 @@ ULONG SwReader::Read( const Reader& rOptions )
if( bSaveUndo )
{
pDoc->SetRedlineMode_intern( eOld );
- pUndo->SetInsertRange( *pUndoPam, FALSE );
- pDoc->AppendUndo( pUndo );
+ pUndo->SetInsertRange( *pUndoPam, sal_False );
+ // UGLY: temp. enable undo
+ pDoc->GetIDocumentUndoRedo().DoUndo(true);
+ pDoc->GetIDocumentUndoRedo().AppendUndo( pUndo );
+ pDoc->GetIDocumentUndoRedo().DoUndo(false);
pDoc->SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE );
}
@@ -350,15 +359,13 @@ ULONG SwReader::Read( const Reader& rOptions )
pDoc->ChkCondColls();
pDoc->SetAllUniqueFlyNames();
- if( bReadPageDescs )
- pDoc->DoUndo( TRUE );
- else
+ pDoc->GetIDocumentUndoRedo().DoUndo(bDocUndo);
+ if (!bReadPageDescs)
{
- pDoc->DoUndo( bDocUndo );
if( bSaveUndo )
{
pDoc->SetRedlineMode_intern( eOld );
- pDoc->EndUndo( UNDO_INSDOKUMENT, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_INSDOKUMENT, NULL );
pDoc->SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE );
}
}
@@ -371,7 +378,7 @@ ULONG SwReader::Read( const Reader& rOptions )
// #i42634# Moved common code of SwReader::Read() and
// SwDocShell::UpdateLinks() to new SwDoc::UpdateLinks():
// ATM still with Update
- pDoc->UpdateLinks( TRUE );
+ pDoc->UpdateLinks( sal_True );
// <--
// not insert: set the redline mode read from settings.xml
@@ -395,10 +402,10 @@ ULONG SwReader::Read( const Reader& rOptions )
pDoc->SetModified();
}
- po->SetReadUTF8( FALSE );
- po->SetBlockMode( FALSE );
- po->SetOrganizerMode( FALSE );
- po->SetIgnoreHTMLComments( FALSE );
+ po->SetReadUTF8( sal_False );
+ po->SetBlockMode( sal_False );
+ po->SetOrganizerMode( sal_False );
+ po->SetIgnoreHTMLComments( sal_False );
return nError;
}
@@ -459,7 +466,7 @@ SwDoc* Reader::GetTemplateDoc()
if( !bHasAskTemplateName )
{
SetTemplateName( GetTemplateName() );
- bHasAskTemplateName = TRUE;
+ bHasAskTemplateName = sal_True;
}
if( !aTemplateNm.Len() )
@@ -470,7 +477,7 @@ SwDoc* Reader::GetTemplateDoc()
String aFileName = aTDir.GetMainURL( INetURLObject::NO_DECODE );
DBG_ASSERT( !aTDir.HasError(), "No absolute path for template name!" );
DateTime aCurrDateTime;
- BOOL bLoad = FALSE;
+ sal_Bool bLoad = sal_False;
// Wenn das Template schon mal geladen wurde, nur einmal pro
// Minute nachschauen, ob es geaendert wurde.
@@ -483,7 +490,7 @@ SwDoc* Reader::GetTemplateDoc()
&aTstDate, &aTstTime ) &&
( !pTemplate || aDStamp != aTstDate || aTStamp != aTstTime ))
{
- bLoad = TRUE;
+ bLoad = sal_True;
aDStamp = aTstDate;
aTStamp = aTstTime;
}
@@ -508,20 +515,21 @@ SwDoc* Reader::GetTemplateDoc()
{
SwDocShell *pDocSh =
new SwDocShell ( SFX_CREATE_MODE_INTERNAL );
- SfxObjectShellRef xDocSh = pDocSh;
+ SfxObjectShellLock xDocSh = pDocSh;
if( pDocSh->DoInitNew( 0 ) )
{
pTemplate = pDocSh->GetDoc();
pTemplate->SetOle2Link( Link() );
- pTemplate->DoUndo( FALSE ); // always FALSE
+ // always FALSE
+ pTemplate->GetIDocumentUndoRedo().DoUndo( false );
pTemplate->set(IDocumentSettingAccess::BROWSE_MODE, bTmplBrowseMode );
pTemplate->RemoveAllFmtLanguageDependencies();
- ReadXML->SetOrganizerMode( TRUE );
- SfxMedium aMedium( aFileName, FALSE );
+ ReadXML->SetOrganizerMode( sal_True );
+ SfxMedium aMedium( aFileName, sal_False );
SwReader aRdr( aMedium, aEmptyStr, pTemplate );
aRdr.Read( *ReadXML );
- ReadXML->SetOrganizerMode( FALSE );
+ ReadXML->SetOrganizerMode( sal_False );
pTemplate->acquire();
}
@@ -536,9 +544,9 @@ SwDoc* Reader::GetTemplateDoc()
return pTemplate;
}
-BOOL Reader::SetTemplate( SwDoc& rDoc )
+sal_Bool Reader::SetTemplate( SwDoc& rDoc )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
GetTemplateDoc();
if( pTemplate )
@@ -546,7 +554,7 @@ BOOL Reader::SetTemplate( SwDoc& rDoc )
rDoc.RemoveAllFmtLanguageDependencies();
rDoc.ReplaceStyles( *pTemplate );
rDoc.SetFixFields(false, NULL);
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -594,7 +602,7 @@ int Reader::SetStrmStgPtr()
if( SW_STORAGE_READER & GetReaderType() )
{
xStg = pMedium->GetStorage();
- return TRUE;
+ return sal_True;
}
}
else
@@ -608,12 +616,12 @@ int Reader::SetStrmStgPtr()
else if ( !(SW_STREAM_READER & GetReaderType()) )
{
pStrm = NULL;
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -644,9 +652,9 @@ void Reader::ResetFrmFmtAttrs( SfxItemSet &rFrmSet )
void Reader::ResetFrmFmts( SwDoc& rDoc )
{
- for (USHORT i=0; i<3; ++i)
+ for (sal_uInt16 i=0; i<3; ++i)
{
- USHORT nPoolId;
+ sal_uInt16 nPoolId;
switch (i)
{
default:
@@ -673,51 +681,51 @@ void Reader::ResetFrmFmts( SwDoc& rDoc )
// read the sections of the document, which is equal to the medium.
// returns the count of it
-USHORT Reader::GetSectionList( SfxMedium&, SvStrings& ) const
+sal_uInt16 Reader::GetSectionList( SfxMedium&, SvStrings& ) const
{
return 0;
}
// ------------------------------------------------
-BOOL SwReader::HasGlossaries( const Reader& rOptions )
+sal_Bool SwReader::HasGlossaries( const Reader& rOptions )
{
// Variable uebertragen
Reader* po = (Reader*) &rOptions;
po->pStrm = pStrm;
po->pStg = pStg;
- po->bInsertMode = FALSE;
+ po->bInsertMode = sal_False;
// ist ein Medium angegeben, dann aus diesem die Streams besorgen
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !( 0 != (po->pMedium = pMedium ) && !po->SetStrmStgPtr() ))
bRet = po->HasGlossaries();
return bRet;
}
-BOOL SwReader::ReadGlossaries( const Reader& rOptions,
- SwTextBlocks& rBlocks, BOOL bSaveRelFiles )
+sal_Bool SwReader::ReadGlossaries( const Reader& rOptions,
+ SwTextBlocks& rBlocks, sal_Bool bSaveRelFiles )
{
// Variable uebertragen
Reader* po = (Reader*) &rOptions;
po->pStrm = pStrm;
po->pStg = pStg;
- po->bInsertMode = FALSE;
+ po->bInsertMode = sal_False;
// ist ein Medium angegeben, dann aus diesem die Streams besorgen
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !( 0 != (po->pMedium = pMedium ) && !po->SetStrmStgPtr() ))
bRet = po->ReadGlossaries( rBlocks, bSaveRelFiles );
return bRet;
}
-BOOL Reader::HasGlossaries() const
+sal_Bool Reader::HasGlossaries() const
{
- return FALSE;
+ return sal_False;
}
-BOOL Reader::ReadGlossaries( SwTextBlocks&, BOOL ) const
+sal_Bool Reader::ReadGlossaries( SwTextBlocks&, sal_Bool ) const
{
- return FALSE;
+ return sal_False;
}
// ------------------------------------------------
@@ -738,7 +746,7 @@ int StgReader::GetReaderType()
* Konstruktoren, Destruktoren sind inline (inc/shellio.hxx).
*/
-SwWriter::SwWriter(SvStream& rStrm, SwCrsrShell &rShell, BOOL bInWriteAll)
+SwWriter::SwWriter(SvStream& rStrm, SwCrsrShell &rShell, sal_Bool bInWriteAll)
: pStrm(&rStrm), pMedium(0), pOutPam(0), pShell(&rShell),
rDoc(*rShell.GetDoc()), bWriteAll(bInWriteAll)
{
@@ -750,7 +758,7 @@ SwWriter::SwWriter(SvStream& rStrm,SwDoc &rDocument)
{
}
-SwWriter::SwWriter(SvStream& rStrm, SwPaM& rPam, BOOL bInWriteAll)
+SwWriter::SwWriter(SvStream& rStrm, SwPaM& rPam, sal_Bool bInWriteAll)
: pStrm(&rStrm), pMedium(0), pOutPam(&rPam), pShell(0),
rDoc(*rPam.GetDoc()), bWriteAll(bInWriteAll)
{
@@ -761,7 +769,7 @@ SwWriter::SwWriter( const uno::Reference < embed::XStorage >& rStg, SwDoc &rDocu
{
}
-SwWriter::SwWriter(SfxMedium& rMedium, SwCrsrShell &rShell, BOOL bInWriteAll)
+SwWriter::SwWriter(SfxMedium& rMedium, SwCrsrShell &rShell, sal_Bool bInWriteAll)
: pStrm(0), pMedium(&rMedium), pOutPam(0), pShell(&rShell),
rDoc(*rShell.GetDoc()), bWriteAll(bInWriteAll)
{
@@ -773,24 +781,21 @@ SwWriter::SwWriter(SfxMedium& rMedium, SwDoc &rDocument)
{
}
-ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
+sal_uLong SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
{
// #i73788#
SwPauseThreadStarting aPauseThreadStarting;
- BOOL bHasMark = FALSE;
+ sal_Bool bHasMark = sal_False;
SwPaM * pPam;
SwDoc *pDoc = 0;
- SfxObjectShellRef* pRefForDocSh = 0;
if ( pShell && !bWriteAll && pShell->IsTableMode() )
{
- bWriteAll = TRUE;
+ bWriteAll = sal_True;
pDoc = new SwDoc;
pDoc->acquire();
- pRefForDocSh = new SfxObjectShellRef();
- pDoc->SetRefForDocShell( pRefForDocSh );
// kopiere Teile aus einer Tabelle: lege eine Tabelle mit der Breite
// von der Originalen an und kopiere die selectierten Boxen.
@@ -817,7 +822,7 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
SwPaM *pEnd = pPam;
// Erste Runde: Nachsehen, ob eine Selektion besteht.
- while(TRUE)
+ while(sal_True)
{
bHasMark = bHasMark || pPam->HasMark();
pPam = (SwPaM *) pPam->GetNext();
@@ -831,9 +836,9 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
if( pShell )
{
pShell->Push();
- pShell->SttEndDoc(TRUE);
+ pShell->SttEndDoc(sal_True);
pShell->SetMark();
- pShell->SttEndDoc(FALSE);
+ pShell->SttEndDoc(sal_False);
}
else
{
@@ -890,19 +895,19 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
}
}
- BOOL bLockedView(FALSE);
+ sal_Bool bLockedView(sal_False);
SwEditShell* pESh = pOutDoc->GetEditShell();
if( pESh )
{
bLockedView = pESh->IsViewLocked();
- pESh->LockView( TRUE ); //lock visible section
+ pESh->LockView( sal_True ); //lock visible section
pESh->StartAllAction();
}
- BOOL bWasPurgeOle = pOutDoc->get(IDocumentSettingAccess::PURGE_OLE);
+ sal_Bool bWasPurgeOle = pOutDoc->get(IDocumentSettingAccess::PURGE_OLE);
pOutDoc->set(IDocumentSettingAccess::PURGE_OLE, false);
- ULONG nError = 0;
+ sal_uLong nError = 0;
if( pMedium )
nError = rxWriter->Write( *pPam, *pMedium, pRealFileName );
else if( pStg )
@@ -927,7 +932,7 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
if(!bHasMark)
{
if( pShell )
- pShell->Pop( FALSE );
+ pShell->Pop( sal_False );
else
delete pPam;
}
@@ -946,10 +951,9 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
if ( pDoc )
{
- delete pRefForDocSh;
if ( !pDoc->release() )
delete pDoc;
- bWriteAll = FALSE;
+ bWriteAll = sal_False;
}
return nError;
@@ -961,13 +965,13 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
// ----------------------------------------------------------------------
-BOOL SetHTMLTemplate( SwDoc & rDoc )
+sal_Bool SetHTMLTemplate( SwDoc & rDoc )
{
// Vorlagennamen von den Sfx-HTML-Filter besorgen!!!
if( !ReadHTML->GetTemplateDoc() )
ReadHTML->MakeHTMLDummyTemplateDoc();
- BOOL bRet = ReadHTML->SetTemplate( rDoc );
+ sal_Bool bRet = ReadHTML->SetTemplate( rDoc );
SwNodes& rNds = rDoc.GetNodes();
SwNodeIndex aIdx( rNds.GetEndOfExtras(), 1 );
diff --git a/sw/source/filter/html/SwAppletImpl.cxx b/sw/source/filter/html/SwAppletImpl.cxx
index 3c10b4c30aa9..5891531d53c1 100644
--- a/sw/source/filter/html/SwAppletImpl.cxx
+++ b/sw/source/filter/html/SwAppletImpl.cxx
@@ -49,9 +49,9 @@ static char const sHTML_O_Object[] = "OBJECT";
}
-USHORT SwApplet_Impl::GetOptionType( const String& rName, BOOL bApplet )
+sal_uInt16 SwApplet_Impl::GetOptionType( const String& rName, sal_Bool bApplet )
{
- USHORT nType = bApplet ? SWHTML_OPTTYPE_PARAM : SWHTML_OPTTYPE_TAG;
+ sal_uInt16 nType = bApplet ? SWHTML_OPTTYPE_PARAM : SWHTML_OPTTYPE_TAG;
switch( rName.GetChar(0) )
{
@@ -125,13 +125,13 @@ USHORT SwApplet_Impl::GetOptionType( const String& rName, BOOL bApplet )
return nType;
}
-SwApplet_Impl::SwApplet_Impl( SfxItemPool& rPool, USHORT nWhich1, USHORT nWhich2 ) :
+SwApplet_Impl::SwApplet_Impl( SfxItemPool& rPool, sal_uInt16 nWhich1, sal_uInt16 nWhich2 ) :
aItemSet( rPool, nWhich1, nWhich2 )
{
}
void SwApplet_Impl::CreateApplet( const String& rCode, const String& rName,
- BOOL bMayScript, const String& rCodeBase,
+ sal_Bool bMayScript, const String& rCodeBase,
const String& rDocumentBaseURL )
{
comphelper::EmbeddedObjectContainer aCnt;
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 82678f47ed3b..c6bcc0cb50f1 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -151,10 +151,10 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
IDocumentStylePoolAccess /*SwDoc*/ *pDoc, SwDoc *pTemplate );
static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rFmt,
IDocumentStylePoolAccess /*SwDoc*/ *pDoc, SwDoc *pTemplate,
- USHORT nRefPoolId, BOOL bExtRef,
- BOOL bPseudo=TRUE );
+ sal_uInt16 nRefPoolId, sal_Bool bExtRef,
+ sal_Bool bPseudo=sal_True );
static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo,
- SwDoc *pDoc, USHORT nNotes, BOOL bEndNote );
+ SwDoc *pDoc, sal_uInt16 nNotes, sal_Bool bEndNote );
static void OutCSS1_SwFmtDropAttrs( SwHTMLWriter& rHWrt,
const SwFmtDrop& rDrop,
const SfxItemSet *pCharFmtItemSet=0 );
@@ -172,24 +172,24 @@ static Writer& OutCSS1_SvxULSpace_SvxLRSpace( Writer& rWrt,
const SvxLRSpaceItem *pLRSpace );
static Writer& OutCSS1_SvxULSpace_SvxLRSpace( Writer& rWrt,
const SfxItemSet& rItemSet,
- BOOL bDeep );
+ sal_Bool bDeep );
static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt,
- USHORT nMode, const String *pGrfName );
+ sal_uInt16 nMode, const String *pGrfName );
static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt );
static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
- USHORT nMode );
+ sal_uInt16 nMode );
static Writer& OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( Writer& rWrt,
const SfxItemSet& rItemSet,
- BOOL bDeep );
+ sal_Bool bDeep );
static Writer& OutCSS1_SwFmtLayoutSplit( Writer& rWrt, const SfxPoolItem& rHt );
-static void ConvToHex( USHORT nHex, ByteString& rStr )
+static void ConvToHex( sal_uInt16 nHex, ByteString& rStr )
{
sal_Char aNToABuf[] = "00";
// Pointer an das Bufferende setzen
sal_Char *pStr = aNToABuf + (sizeof(aNToABuf)-1);
- for( BYTE n = 0; n < 2; ++n )
+ for( sal_uInt8 n = 0; n < 2; ++n )
{
*(--pStr) = (sal_Char)(nHex & 0xf ) + 48;
if( *pStr > '9' )
@@ -212,18 +212,18 @@ static void GetCSS1Color( const Color& rColor, ByteString& rStr )
class SwCSS1OutMode
{
SwHTMLWriter& rWrt;
- USHORT nOldMode;
+ sal_uInt16 nOldMode;
public:
- SwCSS1OutMode( SwHTMLWriter& rHWrt, USHORT nMode, BOOL bStartFirst=TRUE,
+ SwCSS1OutMode( SwHTMLWriter& rHWrt, sal_uInt16 nMode, sal_Bool bStartFirst=sal_True,
const String *pSelector=0 ) :
rWrt( rHWrt ),
nOldMode( rHWrt.nCSS1OutMode )
{
rWrt.nCSS1OutMode = nMode;
if( bStartFirst )
- rWrt.bFirstCSS1Property = TRUE;
+ rWrt.bFirstCSS1Property = sal_True;
if( pSelector )
rWrt.aCSS1Selector = *pSelector;
}
@@ -244,7 +244,7 @@ void SwHTMLWriter::OutCSS1_Property( const sal_Char *pProp,
if( bFirstCSS1Rule && (nCSS1OutMode & CSS1_OUTMODE_RULE_ON)!=0 )
{
- bFirstCSS1Rule = FALSE;
+ bFirstCSS1Rule = sal_False;
OutNewLine();
((((sOut += '<') += OOO_STRING_SVTOOLS_HTML_style) += ' ') += OOO_STRING_SVTOOLS_HTML_O_type) += "=\"text/css\">";
Strm() << sOut.GetBuffer();
@@ -267,7 +267,7 @@ void SwHTMLWriter::OutCSS1_Property( const sal_Char *pProp,
}
else
{
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_span, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_span, sal_False );
return;
}
break;
@@ -284,7 +284,7 @@ void SwHTMLWriter::OutCSS1_Property( const sal_Char *pProp,
((sOut = ' ') += OOO_STRING_SVTOOLS_HTML_O_style) += "=\"";
break;
}
- bFirstCSS1Property = FALSE;
+ bFirstCSS1Property = sal_False;
}
else
{
@@ -392,7 +392,7 @@ static void AddUnitPropertyValue( long nVal, FieldUnit eUnit, ByteString& rOut )
}
long nLongVal = 0;
- BOOL bOutLongVal = TRUE;
+ sal_Bool bOutLongVal = sal_True;
if( nVal > LONG_MAX / nMul )
{
// Zum Unrechnen der Einheit wird ein BigInt benoetigt
@@ -423,7 +423,7 @@ static void AddUnitPropertyValue( long nVal, FieldUnit eUnit, ByteString& rOut )
rOut += (int)((nBigVal / nBigFac) % nBig10 );
}
}
- bOutLongVal = FALSE;
+ bOutLongVal = sal_False;
}
#else
sal_Int64 nBigVal( nVal );
@@ -450,7 +450,7 @@ static void AddUnitPropertyValue( long nVal, FieldUnit eUnit, ByteString& rOut )
(nBigVal / (sal_Int64)nFac) % (sal_Int64)10 );
}
}
- bOutLongVal = FALSE;
+ bOutLongVal = sal_False;
}
#endif
}
@@ -487,7 +487,7 @@ void SwHTMLWriter::OutCSS1_UnitProperty( const sal_Char *pProp, long nVal )
}
void SwHTMLWriter::OutCSS1_PixelProperty( const sal_Char *pProp, long nVal,
- BOOL bVert )
+ sal_Bool bVert )
{
if( nVal && Application::GetDefaultDevice() )
{
@@ -504,7 +504,7 @@ void SwHTMLWriter::OutCSS1_PixelProperty( const sal_Char *pProp, long nVal,
}
void SwHTMLWriter::OutCSS1_SfxItemSet( const SfxItemSet& rItemSet,
- BOOL bDeep )
+ sal_Bool bDeep )
{
// den ItemSet ausgeben, und zwar inklusive aller Attribute
Out_SfxItemSet( aCSS1AttrFnTab, *this, rItemSet, bDeep );
@@ -565,16 +565,16 @@ void SwHTMLWriter::OutCSS1_SfxItemSet( const SfxItemSet& rItemSet,
}
}
-void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
+void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, sal_Bool bUsed )
{
- bFirstCSS1Rule = TRUE;
+ bFirstCSS1Rule = sal_True;
// Feature: PrintExt
if( IsHTMLMode(HTMLMODE_PRINT_EXT) )
{
const SwPageDesc *pFirstPageDesc = 0;
- USHORT nFirstRefPoolId = RES_POOLPAGE_HTML;
- bCSS1IgnoreFirstPageDesc = TRUE;
+ sal_uInt16 nFirstRefPoolId = RES_POOLPAGE_HTML;
+ bCSS1IgnoreFirstPageDesc = sal_True;
// Erstmal versuchen wir zu erraten, wie das Dokument so augebaut ist.
// Erlaubt sind nur die Vorlagen HTML, erste Seite, linke Seite und
@@ -605,7 +605,7 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
// Die Attributierung wird relativ zur HTML-Seitenvorlage
// aus der HTML-Vorlage exportiert.
OutCSS1_SwPageDesc( *this, *pPageDesc, pStylePoolAccess, pTemplate,
- RES_POOLPAGE_HTML, TRUE, FALSE );
+ RES_POOLPAGE_HTML, sal_True, sal_False );
nFirstRefPoolId = pFollow->GetPoolFmtId();
}
else if( (RES_POOLPAGE_LEFT == pPageDesc->GetPoolFmtId() &&
@@ -615,17 +615,17 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
{
// Das Dokument ist zweiseitig
OutCSS1_SwPageDesc( *this, *pPageDesc, pStylePoolAccess, pTemplate,
- RES_POOLPAGE_HTML, TRUE );
+ RES_POOLPAGE_HTML, sal_True );
OutCSS1_SwPageDesc( *this, *pFollow, pStylePoolAccess, pTemplate,
- RES_POOLPAGE_HTML, TRUE );
+ RES_POOLPAGE_HTML, sal_True );
nFirstRefPoolId = RES_POOLPAGE_RIGHT;
- bCSS1IgnoreFirstPageDesc = FALSE;
+ bCSS1IgnoreFirstPageDesc = sal_False;
}
// Alles andere bekommen wir nicht hin.
if( pFirstPageDesc )
OutCSS1_SwPageDesc( *this, *pFirstPageDesc, pStylePoolAccess, pTemplate,
- nFirstRefPoolId, FALSE );
+ nFirstRefPoolId, sal_False );
}
// /Feature: PrintExt
@@ -637,13 +637,13 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
// das Default-TextStyle wir nicht mit ausgegeben !!
// das 0-Style ist das Default, wird nie ausgegeben !!
- USHORT nArrLen = pDoc->GetTxtFmtColls()->Count();
- USHORT i;
+ sal_uInt16 nArrLen = pDoc->GetTxtFmtColls()->Count();
+ sal_uInt16 i;
for( i = 1; i < nArrLen; i++ )
{
const SwTxtFmtColl* pColl = (*pDoc->GetTxtFmtColls())[i];
- USHORT nPoolId = pColl->GetPoolFmtId();
+ sal_uInt16 nPoolId = pColl->GetPoolFmtId();
if( !bUsed || nPoolId == RES_POOLCOLL_TEXT ||
pDoc->IsUsed( *pColl ) )
OutCSS1_SwFmt( *this, *pColl, pDoc, pTemplate );
@@ -654,7 +654,7 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
for( i=1; i<nArrLen; i++ )
{
const SwCharFmt *pCFmt = (*pDoc->GetCharFmts())[i];
- USHORT nPoolId = pCFmt->GetPoolFmtId();
+ sal_uInt16 nPoolId = pCFmt->GetPoolFmtId();
if( !bUsed || nPoolId == RES_POOLCHR_INET_NORMAL ||
nPoolId == RES_POOLCHR_INET_VISIT ||
pDoc->IsUsed( *pCFmt ) )
@@ -663,7 +663,7 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
const SwFtnIdxs& rIdxs = pDoc->GetFtnIdxs();
nArrLen = rIdxs.Count();
- USHORT nEnd = 0, nFtn = 0;
+ sal_uInt16 nEnd = 0, nFtn = 0;
for( i=0; i < nArrLen; i++ )
{
if( rIdxs[i]->GetFtn().IsEndNote() )
@@ -671,8 +671,8 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
else
nFtn++;
}
- OutCSS1_SwFtnInfo( *this, pDoc->GetFtnInfo(), pDoc, nFtn, FALSE );
- OutCSS1_SwFtnInfo( *this, pDoc->GetEndNoteInfo(), pDoc, nEnd, TRUE );
+ OutCSS1_SwFtnInfo( *this, pDoc->GetFtnInfo(), pDoc, nFtn, sal_False );
+ OutCSS1_SwFtnInfo( *this, pDoc->GetEndNoteInfo(), pDoc, nEnd, sal_True );
if( !bFirstCSS1Rule )
{
@@ -681,11 +681,11 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
Strm() << "-->";
OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_style, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_style, sal_False );
}
else
{
- bFirstCSS1Rule = FALSE;
+ bFirstCSS1Rule = sal_False;
}
nDfltTopMargin = 0;
@@ -696,25 +696,25 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
// wenn pPseudo gesetzt ist werden Styles-Sheets ausgegeben,
// sonst wird nur nach Token und Class fuer ein Format gesucht
-USHORT SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken,
- String& rClass, USHORT& rRefPoolId,
+sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken,
+ String& rClass, sal_uInt16& rRefPoolId,
String *pPseudo )
{
- USHORT nDeep = 0;
+ sal_uInt16 nDeep = 0;
rToken.Erase(); rClass.Erase();
rRefPoolId = 0;
if( pPseudo )
pPseudo->Erase();
- BOOL bChrFmt = RES_CHRFMT==pFmt->Which();
+ sal_Bool bChrFmt = RES_CHRFMT==pFmt->Which();
// Nach oben die Formate abklappern, bis man auf eine Standard-
// oder eine HTML-Tag-Vorlage trifft
const SwFmt *pPFmt = pFmt;
while( pPFmt && !pPFmt->IsDefault() )
{
- BOOL bStop = FALSE;
- USHORT nPoolId = pPFmt->GetPoolFmtId();
+ sal_Bool bStop = sal_False;
+ sal_uInt16 nPoolId = pPFmt->GetPoolFmtId();
if( USER_FMT & nPoolId )
{
// Benutzer-Vorlagen
@@ -756,7 +756,7 @@ USHORT SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken,
}
else if( !bChrFmt )
{
- USHORT nDefListLvl = GetDefListLvl( rNm, nPoolId );
+ sal_uInt16 nDefListLvl = GetDefListLvl( rNm, nPoolId );
// Die Vorlagen DD 1/DT 1 werden ausgegeben,
// aber keine von ihnen abgeleiteten Vorlagen,
// auch nicht DD 2/DT 2 etc.
@@ -765,7 +765,7 @@ USHORT SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken,
if( pPseudo &&
(nDeep || (nDefListLvl & 0x0fff) > 1) )
{
- bStop = TRUE;
+ bStop = sal_True;
}
else if( nDefListLvl & HTML_DLCOLL_DD )
{
@@ -1045,14 +1045,14 @@ USHORT SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken,
return nDeep;
}
-static USHORT GetCSS1Selector( const SwFmt *pFmt, String& rSelector,
- USHORT& rRefPoolId )
+static sal_uInt16 GetCSS1Selector( const SwFmt *pFmt, String& rSelector,
+ sal_uInt16& rRefPoolId )
{
ByteString aToken;
String aClass;
String aPseudo;
- USHORT nDeep = SwHTMLWriter::GetCSS1Selector( pFmt, aToken, aClass,
+ sal_uInt16 nDeep = SwHTMLWriter::GetCSS1Selector( pFmt, aToken, aClass,
rRefPoolId, &aPseudo );
if( nDeep )
{
@@ -1070,7 +1070,7 @@ static USHORT GetCSS1Selector( const SwFmt *pFmt, String& rSelector,
return nDeep;
}
-const SwFmt *SwHTMLWriter::GetTemplateFmt( USHORT nPoolFmtId,
+const SwFmt *SwHTMLWriter::GetTemplateFmt( sal_uInt16 nPoolFmtId,
IDocumentStylePoolAccess* pTemplate /*SwDoc *pTemplate*/)
{
const SwFmt *pRefFmt = 0;
@@ -1088,7 +1088,7 @@ const SwFmt *SwHTMLWriter::GetTemplateFmt( USHORT nPoolFmtId,
return pRefFmt;
}
-const SwFmt *SwHTMLWriter::GetParentFmt( const SwFmt& rFmt, USHORT nDeep )
+const SwFmt *SwHTMLWriter::GetParentFmt( const SwFmt& rFmt, sal_uInt16 nDeep )
{
OSL_ENSURE( nDeep != USHRT_MAX, "GetParent fuer HTML-Vorlage aufgerufen!" );
const SwFmt *pRefFmt = 0;
@@ -1098,7 +1098,7 @@ const SwFmt *SwHTMLWriter::GetParentFmt( const SwFmt& rFmt, USHORT nDeep )
// hier wird die HTML-Tag-Vorlage, von der die Vorlage abgeleitet
// ist als Referenz geholt
pRefFmt = &rFmt;
- for( USHORT i=nDeep; i>0; i-- )
+ for( sal_uInt16 i=nDeep; i>0; i-- )
pRefFmt = pRefFmt->DerivedFrom();
if( pRefFmt && pRefFmt->IsDefault() )
@@ -1108,7 +1108,7 @@ const SwFmt *SwHTMLWriter::GetParentFmt( const SwFmt& rFmt, USHORT nDeep )
return pRefFmt;
}
-BOOL lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 )
+sal_Bool lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 )
{
return ((const SvxFontItem &)r1).GetFamilyName() ==
((const SvxFontItem &)r2).GetFamilyName() &&
@@ -1118,8 +1118,8 @@ BOOL lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 )
void SwHTMLWriter::SubtractItemSet( SfxItemSet& rItemSet,
const SfxItemSet& rRefItemSet,
- BOOL bSetDefaults,
- BOOL bClearSame,
+ sal_Bool bSetDefaults,
+ sal_Bool bClearSame,
const SfxItemSet *pRefScriptItemSet )
{
OSL_ENSURE( bSetDefaults || bClearSame,
@@ -1129,13 +1129,13 @@ void SwHTMLWriter::SubtractItemSet( SfxItemSet& rItemSet,
// und mit dem Attr-Set der Vorlage vergleichen
SfxWhichIter aIter( rItemSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
const SfxPoolItem *pRefItem, *pItem;
- BOOL bItemSet = ( SFX_ITEM_SET ==
- rItemSet.GetItemState( nWhich, FALSE, &pItem) );
- BOOL bRefItemSet;
+ sal_Bool bItemSet = ( SFX_ITEM_SET ==
+ rItemSet.GetItemState( nWhich, sal_False, &pItem) );
+ sal_Bool bRefItemSet;
if( pRefScriptItemSet )
{
@@ -1157,18 +1157,18 @@ void SwHTMLWriter::SubtractItemSet( SfxItemSet& rItemSet,
case RES_CHRATR_CTL_POSTURE:
case RES_CHRATR_CTL_WEIGHT:
bRefItemSet = ( SFX_ITEM_SET ==
- pRefScriptItemSet->GetItemState( nWhich, TRUE, &pRefItem) );
+ pRefScriptItemSet->GetItemState( nWhich, sal_True, &pRefItem) );
break;
default:
bRefItemSet = ( SFX_ITEM_SET ==
- aRefItemSet.GetItemState( nWhich, FALSE, &pRefItem) );
+ aRefItemSet.GetItemState( nWhich, sal_False, &pRefItem) );
break;
}
}
else
{
bRefItemSet = ( SFX_ITEM_SET ==
- aRefItemSet.GetItemState( nWhich, FALSE, &pRefItem) );
+ aRefItemSet.GetItemState( nWhich, sal_False, &pRefItem) );
}
if( bItemSet )
@@ -1201,11 +1201,11 @@ void SwHTMLWriter::SubtractItemSet( SfxItemSet& rItemSet,
void SwHTMLWriter::PrepareFontList( const SvxFontItem& rFontItem,
String& rNames,
- sal_Unicode cQuote, BOOL bGeneric )
+ sal_Unicode cQuote, sal_Bool bGeneric )
{
rNames = aEmptyStr;
const String& rName = rFontItem.GetFamilyName();
- BOOL bContainsKeyword = FALSE;
+ sal_Bool bContainsKeyword = sal_False;
if( rName.Len() )
{
xub_StrLen nStrPos = 0;
@@ -1216,7 +1216,7 @@ void SwHTMLWriter::PrepareFontList( const SvxFontItem& rFontItem,
if( !aName.Len() )
continue;
- BOOL bIsKeyword = FALSE;
+ sal_Bool bIsKeyword = sal_False;
switch( aName.GetChar( 0 ) )
{
case 'c':
@@ -1395,8 +1395,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
// some class rule for the additional style dependen properties
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_NO_SCRIPT|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &rSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, FALSE );
+ sal_True, &rSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, sal_False );
}
SfxItemSet aScriptItemSet( *rItemSet.GetPool(),
@@ -1412,8 +1412,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_WESTERN|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aNewSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( aScriptItemSet, FALSE );
+ sal_True, &aNewSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( aScriptItemSet, sal_False );
}
aNewSelector = aSelector;
@@ -1421,8 +1421,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CJK|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aNewSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( aScriptItemSet, FALSE );
+ sal_True, &aNewSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( aScriptItemSet, sal_False );
}
aNewSelector = aSelector;
@@ -1430,8 +1430,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CTL|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aNewSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( aScriptItemSet, FALSE );
+ sal_True, &aNewSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( aScriptItemSet, sal_False );
}
}
else
@@ -1444,8 +1444,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_WESTERN|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aNewSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, FALSE );
+ sal_True, &aNewSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, sal_False );
}
aNewSelector = aSelector;
@@ -1453,8 +1453,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CJK|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aNewSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, FALSE );
+ sal_True, &aNewSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, sal_False );
}
aNewSelector = aSelector;
@@ -1462,8 +1462,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CTL|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aNewSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, FALSE );
+ sal_True, &aNewSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, sal_False );
}
}
}
@@ -1475,8 +1475,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
// script dependencies by now.
SwCSS1OutMode aMode( rHTMLWrt,
rHTMLWrt.nCSS1Script|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &rSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, FALSE );
+ sal_True, &rSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, sal_False );
}
return bScriptDependent;
@@ -1508,7 +1508,7 @@ static void OutCSS1DropCapRule(
// some class rule for the additional style dependen properties
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_NO_SCRIPT|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &rSelector );
+ sal_True, &rSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop );
}
@@ -1526,7 +1526,7 @@ static void OutCSS1DropCapRule(
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_WESTERN|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &aNewSelector );
+ sal_True, &aNewSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop, &aScriptItemSet );
}
@@ -1535,7 +1535,7 @@ static void OutCSS1DropCapRule(
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CJK|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &aNewSelector );
+ sal_True, &aNewSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop, &aScriptItemSet );
}
@@ -1544,7 +1544,7 @@ static void OutCSS1DropCapRule(
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CTL|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &aNewSelector );
+ sal_True, &aNewSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop, &aScriptItemSet );
}
}
@@ -1558,7 +1558,7 @@ static void OutCSS1DropCapRule(
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_WESTERN|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &aNewSelector );
+ sal_True, &aNewSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop );
}
@@ -1567,7 +1567,7 @@ static void OutCSS1DropCapRule(
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CJK|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &aNewSelector );
+ sal_True, &aNewSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop );
}
@@ -1576,7 +1576,7 @@ static void OutCSS1DropCapRule(
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CTL|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &aNewSelector );
+ sal_True, &aNewSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop );
}
}
@@ -1589,7 +1589,7 @@ static void OutCSS1DropCapRule(
// script dependencies by now.
SwCSS1OutMode aMode( rHTMLWrt,
rHTMLWrt.nCSS1Script|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &rSelector );
+ sal_True, &rSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop );
}
}
@@ -1599,11 +1599,11 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
- BOOL bCharFmt = FALSE;
+ sal_Bool bCharFmt = sal_False;
switch( rFmt.Which() )
{
case RES_CHRFMT:
- bCharFmt = TRUE;
+ bCharFmt = sal_True;
break;
case RES_TXTFMTCOLL:
@@ -1618,12 +1618,12 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// den Selector und die auszugebende Attr-Set-Tiefe ermitteln
String aSelector;
- USHORT nRefPoolId = 0;
- USHORT nDeep = GetCSS1Selector( &rFmt, aSelector, nRefPoolId );
+ sal_uInt16 nRefPoolId = 0;
+ sal_uInt16 nDeep = GetCSS1Selector( &rFmt, aSelector, nRefPoolId );
if( !nDeep )
return rWrt; // von keiner HTML-Vorlage abgeleitet
- USHORT nPoolFmtId = rFmt.GetPoolFmtId();
+ sal_uInt16 nPoolFmtId = rFmt.GetPoolFmtId();
// Den auszugebenden Attr-Set bestimmen. Hier muessen 3 Faelle
// unterschieden werden:
@@ -1645,11 +1645,11 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// (ausser fuer nDeep==1)
const SfxItemSet& rFmtItemSet = rFmt.GetAttrSet();
SfxItemSet aItemSet( *rFmtItemSet.GetPool(), rFmtItemSet.GetRanges() );
- aItemSet.Set( rFmtItemSet, TRUE ); // Was nDeep!=1 that is not working
+ aItemSet.Set( rFmtItemSet, sal_True ); // Was nDeep!=1 that is not working
// for script dependent items buts should
// not make a deifference for any other
- BOOL bSetDefaults = TRUE, bClearSame = TRUE;
+ sal_Bool bSetDefaults = sal_True, bClearSame = sal_True;
const SwFmt *pRefFmt = 0;
const SwFmt *pRefFmtScript = 0;
switch( nDeep )
@@ -1660,12 +1660,12 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
case CSS1_FMT_CMPREF:
pRefFmt = SwHTMLWriter::GetTemplateFmt( nRefPoolId, pDoc );
pRefFmtScript = SwHTMLWriter::GetTemplateFmt( nRefPoolId, pTemplate );
- bClearSame = FALSE;
+ bClearSame = sal_False;
break;
default:
pRefFmt = SwHTMLWriter::GetParentFmt( rFmt, nDeep );
pRefFmtScript = SwHTMLWriter::GetTemplateFmt( nRefPoolId, pTemplate );
- bSetDefaults = FALSE;
+ bSetDefaults = sal_False;
break;
}
@@ -1767,12 +1767,12 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
}
if( nPoolFmtId==RES_POOLCOLL_TEXT && !rHTMLWrt.bFirstCSS1Property )
- rHTMLWrt.bPoolCollTextModified = TRUE;
+ rHTMLWrt.bPoolCollTextModified = sal_True;
// Drop-Caps ausgeben
const SfxPoolItem *pItem;
if( rHTMLWrt.IsHTMLMode(HTMLMODE_DROPCAPS) &&
- SFX_ITEM_SET==aItemSet.GetItemState( RES_PARATR_DROP, FALSE, &pItem ))
+ SFX_ITEM_SET==aItemSet.GetItemState( RES_PARATR_DROP, sal_False, &pItem ))
{
String sOut( aSelector );
sOut.Append( ':');
@@ -1786,8 +1786,8 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
IDocumentStylePoolAccess/*SwDoc*/ *pDoc, SwDoc *pTemplate,
- USHORT nRefPoolId, BOOL bExtRef,
- BOOL bPseudo )
+ sal_uInt16 nRefPoolId, sal_Bool bExtRef,
+ sal_Bool bPseudo )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -1817,12 +1817,12 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
}
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_RULE_ON|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aSelector );
+ sal_True, &aSelector );
// Die Groesse: Wenn sie sich nur durch das Landscape-Flag unterscheidet,
// wird nur Portrait oder Landscape exportiert. Sonst wird die Groesse
// exportiert.
- BOOL bRefLandscape = pRefPageDesc ? pRefPageDesc->GetLandscape() : FALSE;
+ sal_Bool bRefLandscape = pRefPageDesc ? pRefPageDesc->GetLandscape() : sal_False;
Size aRefSz;
const Size& rSz = rPageDesc.GetMaster().GetFrmSize().GetSize();
if( pRefPageDesc )
@@ -1866,16 +1866,16 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
const SwFrmFmt &rMaster = rPageDesc.GetMaster();
SfxItemSet aItemSet( *rMaster.GetAttrSet().GetPool(),
RES_LR_SPACE, RES_UL_SPACE );
- aItemSet.Set( rMaster.GetAttrSet(), TRUE );
+ aItemSet.Set( rMaster.GetAttrSet(), sal_True );
if( pRefPageDesc )
{
SwHTMLWriter::SubtractItemSet( aItemSet,
pRefPageDesc->GetMaster().GetAttrSet(),
- TRUE );
+ sal_True );
}
- OutCSS1_SvxULSpace_SvxLRSpace( rWrt, aItemSet, FALSE );
+ OutCSS1_SvxULSpace_SvxLRSpace( rWrt, aItemSet, sal_False );
// Wenn fuer einen Pseudo-Selektor keine Property ausgegeben wurde, muessen
// wir trotzdem etwas ausgeben, damit beim Import die entsprechende
@@ -1885,7 +1885,7 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
rHTMLWrt.OutNewLine();
ByteString sTmp( aSelector, rHTMLWrt.eDestEnc );
rWrt.Strm() << sTmp.GetBuffer() << " {";
- rHTMLWrt.bFirstCSS1Property = FALSE;
+ rHTMLWrt.bFirstCSS1Property = sal_False;
}
if( !rHTMLWrt.bFirstCSS1Property )
@@ -1895,7 +1895,7 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
}
static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo,
- SwDoc *pDoc, USHORT nNotes, BOOL bEndNote )
+ SwDoc *pDoc, sal_uInt16 nNotes, sal_Bool bEndNote )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -1908,7 +1908,7 @@ static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo,
aSelector.AppendAscii( bEndNote ? OOO_STRING_SVTOOLS_HTML_sdendnote_anc
: OOO_STRING_SVTOOLS_HTML_sdfootnote_anc );
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aSelector );
+ sal_True, &aSelector );
rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_font_size,
sHTML_FTN_fontheight );
rHTMLWrt.Strm() << sCSS1_rule_end;
@@ -1919,7 +1919,7 @@ static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo,
{
const SfxItemSet& rFmtItemSet = pSymCharFmt->GetAttrSet();
SfxItemSet aItemSet( *rFmtItemSet.GetPool(), rFmtItemSet.GetRanges() );
- aItemSet.Set( rFmtItemSet, TRUE );
+ aItemSet.Set( rFmtItemSet, sal_True );
// Wenn es Fuss- bzw. Endnoten gibt, dann muessen alles Attribute
// ausgegeben werden, damit Netscape das Dokument richtig anzeigt.
@@ -1931,7 +1931,7 @@ static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo,
static_cast< sal_uInt16 >(bEndNote ? RES_POOLCHR_ENDNOTE : RES_POOLCHR_FOOTNOTE) );
if( pRefFmt )
SwHTMLWriter::SubtractItemSet( aItemSet, pRefFmt->GetAttrSet(),
- TRUE );
+ sal_True );
}
if( aItemSet.Count() )
{
@@ -1961,14 +1961,14 @@ Writer& OutCSS1_BodyTagStyleOpt( Writer& rWrt, const SfxItemSet& rItemSet,
// Export der Absatz-Vorlagen beruecksichtigt.
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, sal_False,
&pItem ) )
{
OutCSS1_SvxBrush( rWrt, *pItem, CSS1_BACKGROUND_PAGE,
&aEmbBGGrfName );
}
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, sal_False,
&pItem ))
{
OutCSS1_SvxBox( rWrt, *pItem );
@@ -1990,7 +1990,7 @@ Writer& OutCSS1_ParaTagStyleOpt( Writer& rWrt, const SfxItemSet& rItemSet )
SwCSS1OutMode aMode( rHTMLWrt, rHTMLWrt.nCSS1Script|CSS1_OUTMODE_STYLE_OPT |
CSS1_OUTMODE_ENCODE|CSS1_OUTMODE_PARA );
- rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, FALSE );
+ rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, sal_False );
return rWrt;
}
@@ -2044,7 +2044,7 @@ Writer& OutCSS1_TableBGStyleOpt( Writer& rWrt, const SfxPoolItem& rHt )
Writer& OutCSS1_NumBulListStyleOpt( Writer& rWrt, const SwNumRule& rNumRule,
- BYTE nLevel )
+ sal_uInt8 nLevel )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -2128,7 +2128,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
// top
long nXPos=0, nYPos=0;
- BOOL bOutXPos = FALSE, bOutYPos = FALSE;
+ sal_Bool bOutXPos = sal_False, bOutYPos = sal_False;
if( RES_DRAWFRMFMT == rFrmFmt.Which() )
{
OSL_ENSURE( pSdrObj, "Kein SdrObject uebergeben. Ineffizient" );
@@ -2141,7 +2141,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
nXPos = aPos.A();
nYPos = aPos.B();
}
- bOutXPos = bOutYPos = TRUE;
+ bOutXPos = bOutYPos = sal_True;
}
else
{
@@ -2162,7 +2162,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
nYPos -= aULItem.GetUpper();
if( nYPos < 0 )
{
- aULItem.SetUpper( (USHORT)(aULItem.GetUpper() + nYPos) );
+ aULItem.SetUpper( (sal_uInt16)(aULItem.GetUpper() + nYPos) );
nYPos = 0;
}
}
@@ -2178,7 +2178,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
nXPos -= aLRItem.GetLeft();
if( nXPos < 0 )
{
- aLRItem.SetLeft( (USHORT)(aLRItem.GetLeft() + nXPos) );
+ aLRItem.SetLeft( (sal_uInt16)(aLRItem.GetLeft() + nXPos) );
nXPos = 0;
}
}
@@ -2209,7 +2209,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
{
if( nFrmOpts & HTML_FRMOPT_S_PIXSIZE )
OutCSS1_PixelProperty( sCSS1_P_width, aTwipSz.Width(),
- FALSE );
+ sal_False );
else
OutCSS1_UnitProperty( sCSS1_P_width, aTwipSz.Width() );
}
@@ -2217,7 +2217,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
{
if( nFrmOpts & HTML_FRMOPT_S_PIXSIZE )
OutCSS1_PixelProperty( sCSS1_P_height, aTwipSz.Height(),
- TRUE );
+ sal_True );
else
OutCSS1_UnitProperty( sCSS1_P_height, aTwipSz.Height() );
}
@@ -2229,7 +2229,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
"Absolute Groesse wird exportiert" );
OSL_ENSURE( HTML_FRMOPT_ANYSIZE & nFrmOpts,
"Jede Groesse wird exportiert" );
- USHORT nMode = 0;
+ sal_uInt16 nMode = 0;
if( nFrmOpts & HTML_FRMOPT_S_WIDTH )
nMode |= CSS1_FRMSIZE_WIDTH;
if( nFrmOpts & HTML_FRMOPT_S_HEIGHT )
@@ -2248,9 +2248,9 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
{
const SvxLRSpaceItem *pLRItem = 0;
const SvxULSpaceItem *pULItem = 0;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, TRUE ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, sal_True ) )
pLRItem = &aLRItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_UL_SPACE, TRUE ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_UL_SPACE, sal_True ) )
pULItem = &aULItem;
if( pLRItem || pULItem )
OutCSS1_SvxULSpace_SvxLRSpace( *this, pULItem, pLRItem );
@@ -2262,7 +2262,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
const SfxPoolItem* pItem;
if( nFrmOpts & HTML_FRMOPT_S_NOBORDER )
OutCSS1_SvxBox( *this, rFrmFmt.GetBox() );
- else if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BOX, TRUE, &pItem ) )
+ else if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BOX, sal_True, &pItem ) )
OutCSS1_SvxBox( *this, *pItem );
}
@@ -2271,7 +2271,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
OutCSS1_FrmFmtBackground( rFrmFmt );
if( pItemSet )
- OutCSS1_SfxItemSet( *pItemSet, FALSE );
+ OutCSS1_SfxItemSet( *pItemSet, sal_False );
if( !bFirstCSS1Property )
Strm() << '\"';
@@ -2285,13 +2285,13 @@ void SwHTMLWriter::OutCSS1_TableFrmFmtOptions( const SwFrmFmt& rFrmFmt )
const SfxPoolItem *pItem;
const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet();
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, FALSE, &pItem ) )
+ if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, sal_False, &pItem ) )
OutCSS1_SvxBrush( *this, *pItem, CSS1_BACKGROUND_TABLE, 0 );
if( IsHTMLMode( HTMLMODE_PRINT_EXT ) )
- OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( *this, rItemSet, FALSE );
+ OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( *this, rItemSet, sal_False );
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_LAYOUT_SPLIT, FALSE, &pItem ) )
+ if( SFX_ITEM_SET==rItemSet.GetItemState( RES_LAYOUT_SPLIT, sal_False, &pItem ) )
OutCSS1_SwFmtLayoutSplit( *this, *pItem );
if( !bFirstCSS1Property )
@@ -2306,17 +2306,17 @@ void SwHTMLWriter::OutCSS1_SectionFmtOptions( const SwFrmFmt& rFrmFmt )
const SfxPoolItem *pItem;
const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet();
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, FALSE, &pItem ) )
+ if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, sal_False, &pItem ) )
OutCSS1_SvxBrush( *this, *pItem, CSS1_BACKGROUND_SECTION, 0 );
if( !bFirstCSS1Property )
Strm() << '\"';
}
-static BOOL OutCSS1_FrmFmtBrush( SwHTMLWriter& rWrt,
+static sal_Bool OutCSS1_FrmFmtBrush( SwHTMLWriter& rWrt,
const SvxBrushItem& rBrushItem )
{
- BOOL bWritten = FALSE;
+ sal_Bool bWritten = sal_False;
/// output brush of frame format, if its background color is not "no fill"/"auto fill"
/// or it has a background graphic.
if( rBrushItem.GetColor() != COL_TRANSPARENT ||
@@ -2324,7 +2324,7 @@ static BOOL OutCSS1_FrmFmtBrush( SwHTMLWriter& rWrt,
0 != rBrushItem.GetGraphicPos() )
{
OutCSS1_SvxBrush( rWrt, rBrushItem, CSS1_BACKGROUND_FLY, 0 );
- bWritten = TRUE;
+ bWritten = sal_True;
}
return bWritten;
}
@@ -2431,7 +2431,7 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt,
const SvxBlinkItem *pBItem )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
- BOOL bNone = FALSE;
+ sal_Bool bNone = sal_False;
const sal_Char *pUStr = 0;
if( pUItem )
@@ -2439,7 +2439,7 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt,
switch( pUItem->GetLineStyle() )
{
case UNDERLINE_NONE:
- bNone = TRUE;
+ bNone = sal_True;
break;
case UNDERLINE_DONTKNOW:
break;
@@ -2462,7 +2462,7 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt,
switch( pOItem->GetLineStyle() )
{
case UNDERLINE_NONE:
- bNone = TRUE;
+ bNone = sal_True;
break;
case UNDERLINE_DONTKNOW:
break;
@@ -2485,7 +2485,7 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt,
switch( pCOItem->GetStrikeout() )
{
case STRIKEOUT_NONE:
- bNone = TRUE;
+ bNone = sal_True;
break;
case STRIKEOUT_DONTKNOW:
break;
@@ -2507,7 +2507,7 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt,
{
if( !pBItem->GetValue() )
{
- bNone = TRUE;
+ bNone = sal_True;
}
else if( !rHTMLWrt.IsCSS1Source( CSS1_OUTMODE_PARA ) )
{
@@ -2637,10 +2637,10 @@ static Writer& OutCSS1_SvxFont( Writer& rWrt, const SfxPoolItem& rHt )
String sOut;
// MS IE3b1 hat mit einfachen Haekchen Probleme
- USHORT nMode = rHTMLWrt.nCSS1OutMode & CSS1_OUTMODE_ANY_ON;
+ sal_uInt16 nMode = rHTMLWrt.nCSS1OutMode & CSS1_OUTMODE_ANY_ON;
sal_Unicode cQuote = nMode == CSS1_OUTMODE_RULE_ON ? '\"' : '\'';
SwHTMLWriter::PrepareFontList( ((const SvxFontItem&)rHt), sOut, cQuote,
- TRUE );
+ sal_True );
rHTMLWrt.OutCSS1_Property( sCSS1_P_font_family, sOut );
@@ -2666,11 +2666,11 @@ static Writer& OutCSS1_SvxFontHeight( Writer& rWrt, const SfxPoolItem& rHt )
if( !rHTMLWrt.IsCSS1Script( nScript ) )
return rWrt;
- UINT32 nHeight = ((const SvxFontHeightItem&)rHt).GetHeight();
+ sal_uInt32 nHeight = ((const SvxFontHeightItem&)rHt).GetHeight();
if( rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT) )
{
// einen Hint nur dann ausgeben wenn es auch was bringt
- USHORT nSize = rHTMLWrt.GetHTMLFontSize( nHeight );
+ sal_uInt16 nSize = rHTMLWrt.GetHTMLFontSize( nHeight );
if( rHTMLWrt.aFontHeights[nSize-1] == nHeight )
return rWrt;
}
@@ -2729,7 +2729,7 @@ static Writer& OutCSS1_SvxKerning( Writer& rWrt, const SfxPoolItem& rHt )
if( !rHTMLWrt.IsHTMLMode(HTMLMODE_FULL_STYLES) )
return rWrt;
- INT16 nValue = ((const SvxKerningItem&)rHt).GetValue();
+ sal_Int16 nValue = ((const SvxKerningItem&)rHt).GetValue();
if( nValue )
{
ByteString sOut;
@@ -2881,8 +2881,8 @@ static Writer& OutCSS1_SvxLineSpacing( Writer& rWrt, const SfxPoolItem& rHt )
const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)rHt;
- USHORT nHeight = 0;
- USHORT nPrcHeight = 0;
+ sal_uInt16 nHeight = 0;
+ sal_uInt16 nPrcHeight = 0;
SvxLineSpace eLineSpace = rLSItem.GetLineSpaceRule();
switch( rLSItem.GetInterLineSpaceRule() )
{
@@ -3011,7 +3011,7 @@ static void OutCSS1_SwFmtDropAttrs( SwHTMLWriter& rHWrt,
rHWrt.OutCSS1_PropertyAscii( sCSS1_P_font_size, sOut );
// Abstand zum Text = rechter Rand
- USHORT nDistance = rDrop.GetDistance();
+ sal_uInt16 nDistance = rDrop.GetDistance();
if( nDistance > 0 )
rHWrt.OutCSS1_UnitProperty( sCSS1_P_margin_right, nDistance );
@@ -3044,14 +3044,14 @@ static Writer& OutCSS1_SwFmtDrop( Writer& rWrt, const SfxPoolItem& rHt )
}
else
{
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_span, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_span, sal_False );
}
return rWrt;
}
static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
- USHORT nMode )
+ sal_uInt16 nMode )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -3060,7 +3060,7 @@ static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
if( nMode & CSS1_FRMSIZE_WIDTH )
{
- BYTE nPrcWidth = rFSItem.GetWidthPercent();
+ sal_uInt8 nPrcWidth = rFSItem.GetWidthPercent();
if( nPrcWidth )
{
(sOut = ByteString::CreateFromInt32( nPrcWidth) ) += '%';
@@ -3069,7 +3069,7 @@ static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
else if( nMode & CSS1_FRMSIZE_PIXEL )
{
rHTMLWrt.OutCSS1_PixelProperty( sCSS1_P_width,
- rFSItem.GetSize().Width(), FALSE );
+ rFSItem.GetSize().Width(), sal_False );
}
else
{
@@ -3080,7 +3080,7 @@ static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
if( nMode & CSS1_FRMSIZE_ANYHEIGHT )
{
- BOOL bOutHeight = FALSE;
+ sal_Bool bOutHeight = sal_False;
switch( rFSItem.GetHeightSizeType() )
{
case ATT_FIX_SIZE:
@@ -3099,7 +3099,7 @@ static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
if( bOutHeight )
{
- BYTE nPrcHeight = rFSItem.GetHeightPercent();
+ sal_uInt8 nPrcHeight = rFSItem.GetHeightPercent();
if( nPrcHeight )
{
(sOut = ByteString::CreateFromInt32( nPrcHeight ) ) += '%';
@@ -3109,7 +3109,7 @@ static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
{
rHTMLWrt.OutCSS1_PixelProperty( sCSS1_P_height,
rFSItem.GetSize().Width(),
- TRUE );
+ sal_True );
}
else
{
@@ -3209,7 +3209,7 @@ static Writer& OutCSS1_SvxULSpace_SvxLRSpace( Writer& rWrt,
static Writer& OutCSS1_SvxULSpace_SvxLRSpace( Writer& rWrt,
const SfxItemSet& rItemSet,
- BOOL bDeep )
+ sal_Bool bDeep )
{
const SvxULSpaceItem *pULSpace = 0;
const SvxLRSpaceItem *pLRSpace = 0;
@@ -3295,7 +3295,7 @@ static Writer& OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( Writer& rWrt,
static Writer& OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( Writer& rWrt,
const SfxItemSet& rItemSet,
- BOOL bDeep )
+ sal_Bool bDeep )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
const SfxPoolItem *pItem;
@@ -3331,7 +3331,7 @@ static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt )
static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt,
- USHORT nMode, const String *pGrfName )
+ sal_uInt16 nMode, const String *pGrfName )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -3358,14 +3358,14 @@ static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt,
}
// Erstmal die Farbe holen
- BOOL bColor = FALSE;
- /// set <bTransparent> to TRUE, if color is "no fill"/"auto fill"
- BOOL bTransparent = (rColor.GetColor() == COL_TRANSPARENT);
+ sal_Bool bColor = sal_False;
+ /// set <bTransparent> to sal_True, if color is "no fill"/"auto fill"
+ sal_Bool bTransparent = (rColor.GetColor() == COL_TRANSPARENT);
Color aColor;
if( !bTransparent )
{
aColor = rColor;
- bColor = TRUE;
+ bColor = sal_True;
}
// und jetzt eine Grafik
@@ -3381,7 +3381,7 @@ static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt,
const String* pTempFileName = rHTMLWrt.GetOrigFileName();
if( pTempFileName )
sGrfNm = *pTempFileName;
- USHORT nErr = XOutBitmap::WriteGraphic( *pGrf, sGrfNm,
+ sal_uInt16 nErr = XOutBitmap::WriteGraphic( *pGrf, sGrfNm,
String::CreateFromAscii("JPG"),
XOUTBMP_USE_NATIVE_IF_POSSIBLE );
if( !nErr ) // fehlerhaft, da ist nichts auszugeben
@@ -3539,13 +3539,13 @@ static void OutCSS1_SvxBorderLine( SwHTMLWriter& rHTMLWrt,
return;
}
- BOOL bDouble = FALSE;
- INT32 nWidth = pLine->GetOutWidth();
+ sal_Bool bDouble = sal_False;
+ sal_Int32 nWidth = pLine->GetOutWidth();
if( pLine->GetInWidth() )
{
nWidth += pLine->GetDistance();
nWidth += pLine->GetInWidth();
- bDouble = TRUE;
+ bDouble = sal_True;
}
ByteString sOut;
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 5aeee781d6ec..1747205b5fb6 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -135,7 +135,7 @@ HTMLOutEvent aAnchorEventTable[] =
static Writer& OutHTML_SvxAdjust( Writer& rWrt, const SfxPoolItem& rHt );
-static Writer& OutHTML_HoriSpacer( Writer& rWrt, INT16 nSize )
+static Writer& OutHTML_HoriSpacer( Writer& rWrt, sal_Int16 nSize )
{
OSL_ENSURE( nSize>0, "horizontaler SPACER mit negativem Wert?" );
if( nSize <= 0 )
@@ -143,7 +143,7 @@ static Writer& OutHTML_HoriSpacer( Writer& rWrt, INT16 nSize )
if( Application::GetDefaultDevice() )
{
- nSize = (INT16)Application::GetDefaultDevice()
+ nSize = (sal_Int16)Application::GetDefaultDevice()
->LogicToPixel( Size(nSize,0), MapMode(MAP_TWIP) ).Width();
}
@@ -158,7 +158,7 @@ static Writer& OutHTML_HoriSpacer( Writer& rWrt, INT16 nSize )
return rWrt;
}
-USHORT SwHTMLWriter::GetDefListLvl( const String& rNm, USHORT nPoolId )
+sal_uInt16 SwHTMLWriter::GetDefListLvl( const String& rNm, sal_uInt16 nPoolId )
{
if( nPoolId == RES_POOLCOLL_HTML_DD )
{
@@ -173,18 +173,18 @@ USHORT SwHTMLWriter::GetDefListLvl( const String& rNm, USHORT nPoolId )
sDTDD += ' ';
if( COMPARE_EQUAL == sDTDD.CompareTo( rNm, sDTDD.Len() ) )
// DefinitionList - term
- return (USHORT)rNm.Copy( sDTDD.Len() ).ToInt32() | HTML_DLCOLL_DT;
+ return (sal_uInt16)rNm.Copy( sDTDD.Len() ).ToInt32() | HTML_DLCOLL_DT;
sDTDD.AssignAscii( OOO_STRING_SVTOOLS_HTML_dd );
sDTDD += ' ';
if( COMPARE_EQUAL == sDTDD.CompareTo( rNm, sDTDD.Len() ) )
// DefinitionList - definition
- return (USHORT)rNm.Copy( sDTDD.Len() ).ToInt32() | HTML_DLCOLL_DD;
+ return (sal_uInt16)rNm.Copy( sDTDD.Len() ).ToInt32() | HTML_DLCOLL_DD;
return 0;
}
-void SwHTMLWriter::OutAndSetDefList( USHORT nNewLvl )
+void SwHTMLWriter::OutAndSetDefList( sal_uInt16 nNewLvl )
{
// eventuell muss erst mal eine Liste aufgemacht werden
if( nDefListLvl < nNewLvl )
@@ -198,24 +198,24 @@ void SwHTMLWriter::OutAndSetDefList( USHORT nNewLvl )
ChangeParaToken( 0 );
// entsprechend dem Level-Unterschied schreiben!
- for( USHORT i=nDefListLvl; i<nNewLvl; i++ )
+ for( sal_uInt16 i=nDefListLvl; i<nNewLvl; i++ )
{
if( bLFPossible )
OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_deflist, TRUE );
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_deflist, sal_True );
IncIndentLevel();
- bLFPossible = TRUE;
+ bLFPossible = sal_True;
}
}
else if( nDefListLvl > nNewLvl )
{
- for( USHORT i=nNewLvl ; i < nDefListLvl; i++ )
+ for( sal_uInt16 i=nNewLvl ; i < nDefListLvl; i++ )
{
DecIndentLevel();
if( bLFPossible )
OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_deflist, FALSE );
- bLFPossible = TRUE;
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_deflist, sal_False );
+ bLFPossible = sal_True;
}
}
@@ -223,12 +223,12 @@ void SwHTMLWriter::OutAndSetDefList( USHORT nNewLvl )
}
-void SwHTMLWriter::ChangeParaToken( USHORT nNew )
+void SwHTMLWriter::ChangeParaToken( sal_uInt16 nNew )
{
if( nNew != nLastParaToken && HTML_PREFORMTXT_ON == nLastParaToken )
{
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_preformtxt, FALSE );
- bLFPossible = TRUE;
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_preformtxt, sal_False );
+ bLFPossible = sal_True;
}
nLastParaToken = nNew;
}
@@ -273,23 +273,23 @@ struct SwHTMLTxtCollOutputInfo
ByteString aToken; // auszugendens End-Token
SfxItemSet *pItemSet; // harte Attributierung
- BOOL bInNumBulList; // in einer Aufzaehlungs-Liste;
- BOOL bParaPossible; // ein </P> darf zusaetzlich ausgegeben werden
- BOOL bOutPara; // ein </P> soll ausgegeben werden
- BOOL bOutDiv; // write a </DIV>
+ sal_Bool bInNumBulList; // in einer Aufzaehlungs-Liste;
+ sal_Bool bParaPossible; // ein </P> darf zusaetzlich ausgegeben werden
+ sal_Bool bOutPara; // ein </P> soll ausgegeben werden
+ sal_Bool bOutDiv; // write a </DIV>
SwHTMLTxtCollOutputInfo() :
pItemSet( 0 ),
- bInNumBulList( FALSE ),
- bParaPossible( FALSE ),
- bOutPara( FALSE ),
- bOutDiv( FALSE )
+ bInNumBulList( sal_False ),
+ bParaPossible( sal_False ),
+ bOutPara( sal_False ),
+ bOutDiv( sal_False )
{}
~SwHTMLTxtCollOutputInfo();
- BOOL HasParaToken() const { return aToken.Len()==1 && aToken.GetChar(0)=='P'; }
- BOOL ShouldOutputToken() const { return bOutPara || !HasParaToken(); }
+ sal_Bool HasParaToken() const { return aToken.Len()==1 && aToken.GetChar(0)=='P'; }
+ sal_Bool ShouldOutputToken() const { return bOutPara || !HasParaToken(); }
};
SwHTMLTxtCollOutputInfo::~SwHTMLTxtCollOutputInfo()
@@ -311,8 +311,8 @@ struct SwHTMLFmtInfo
sal_Int32 nRightMargin; // Absatz-Vorlagen
short nFirstLineIndent;
- USHORT nTopMargin;
- USHORT nBottomMargin;
+ sal_uInt16 nTopMargin;
+ sal_uInt16 nBottomMargin;
sal_Bool bScriptDependent;
@@ -324,18 +324,18 @@ struct SwHTMLFmtInfo
// Konstruktor zum Erstellen der Format-Info
SwHTMLFmtInfo( const SwFmt *pFmt, SwDoc *pDoc, SwDoc *pTemlate,
- BOOL bOutStyles, LanguageType eDfltLang=LANGUAGE_DONTKNOW,
+ sal_Bool bOutStyles, LanguageType eDfltLang=LANGUAGE_DONTKNOW,
sal_uInt16 nScript=CSS1_OUTMODE_ANY_SCRIPT,
- BOOL bHardDrop=FALSE );
+ sal_Bool bHardDrop=sal_False );
~SwHTMLFmtInfo();
- friend BOOL operator==( const SwHTMLFmtInfo& rInfo1,
+ friend sal_Bool operator==( const SwHTMLFmtInfo& rInfo1,
const SwHTMLFmtInfo& rInfo2 )
{
return (long)rInfo1.pFmt == (long)rInfo2.pFmt;
}
- friend BOOL operator<( const SwHTMLFmtInfo& rInfo1,
+ friend sal_Bool operator<( const SwHTMLFmtInfo& rInfo1,
const SwHTMLFmtInfo& rInfo2 )
{
return (long)rInfo1.pFmt < (long)rInfo2.pFmt;
@@ -346,21 +346,21 @@ struct SwHTMLFmtInfo
SV_IMPL_OP_PTRARR_SORT( SwHTMLFmtInfos, SwHTMLFmtInfo* )
SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate,
- BOOL bOutStyles,
+ sal_Bool bOutStyles,
LanguageType eDfltLang,
- sal_uInt16 nCSS1Script, BOOL bHardDrop ) :
+ sal_uInt16 nCSS1Script, sal_Bool bHardDrop ) :
pFmt( pF ), pRefFmt(0), pItemSet( 0 ), bScriptDependent( sal_False )
{
- USHORT nRefPoolId = 0;
+ sal_uInt16 nRefPoolId = 0;
// Den Selektor des Formats holen
- USHORT nDeep = SwHTMLWriter::GetCSS1Selector( pFmt, aToken, aClass,
+ sal_uInt16 nDeep = SwHTMLWriter::GetCSS1Selector( pFmt, aToken, aClass,
nRefPoolId );
OSL_ENSURE( nDeep ? aToken.Len()>0 : aToken.Len()==0,
"Hier stimmt doch was mit dem Token nicht!" );
OSL_ENSURE( nDeep ? nRefPoolId : !nRefPoolId,
"Hier stimmt doch was mit der Vergleichs-Vorlage nicht!" );
- BOOL bTxtColl = pFmt->Which() == RES_TXTFMTCOLL ||
+ sal_Bool bTxtColl = pFmt->Which() == RES_TXTFMTCOLL ||
pFmt->Which() == RES_CONDTXTFMTCOLL;
const SwFmt *pReferenceFmt = 0; // Vergleichs-Format
@@ -415,7 +415,7 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate,
// sollen ist harte Attributierung noetig. Fuer Vorlagen, die
// nicht von HTML-Tag-Vorlagen abgeleitet sind, gilt das immer
- pItemSet->Set( pFmt->GetAttrSet(), TRUE );
+ pItemSet->Set( pFmt->GetAttrSet(), sal_True );
if( pReferenceFmt )
SwHTMLWriter::SubtractItemSet( *pItemSet, pReferenceFmt->GetAttrSet(),
@@ -488,16 +488,16 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate,
{
const SfxPoolItem *pItem;
if( SFX_ITEM_SET==pFmt->GetAttrSet().GetItemState(
- RES_PARATR_DROP, TRUE, &pItem ) )
+ RES_PARATR_DROP, sal_True, &pItem ) )
{
- BOOL bPut = TRUE;
+ sal_Bool bPut = sal_True;
if( pTemplate )
{
pReferenceFmt = SwHTMLWriter::GetTemplateFmt( nRefPoolId, pTemplate );
const SfxPoolItem *pRefItem;
- BOOL bRefItemSet =
+ sal_Bool bRefItemSet =
SFX_ITEM_SET==pReferenceFmt->GetAttrSet().GetItemState(
- RES_PARATR_DROP, TRUE, &pRefItem );
+ RES_PARATR_DROP, sal_True, &pRefItem );
bPut = !bRefItemSet || *pItem!=*pRefItem;
}
if( bPut )
@@ -574,19 +574,19 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
SwHTMLWriter & rHWrt = (SwHTMLWriter&)rWrt;
// Erstmal ein par Flags ...
- USHORT nNewDefListLvl = 0;
- USHORT nNumStart = USHRT_MAX;
- BOOL bForceDL = FALSE;
- BOOL bDT = FALSE;
- rInfo.bInNumBulList = FALSE; // Wir sind in einer Liste?
- BOOL bNumbered = FALSE; // Der aktuelle Absatz ist numeriert
- BOOL bPara = FALSE; // das aktuelle Token ist <P>
- rInfo.bParaPossible = FALSE; // ein <P> darf zusaetzlich ausgegeben werden
- BOOL bNoEndTag = FALSE; // kein End-Tag ausgeben
-
- rHWrt.bNoAlign = FALSE; // kein ALIGN=... moeglich
- BOOL bNoStyle = FALSE; // kein STYLE=... moeglich
- BYTE nBulletGrfLvl = 255; // Die auszugebende Bullet-Grafik
+ sal_uInt16 nNewDefListLvl = 0;
+ sal_uInt16 nNumStart = USHRT_MAX;
+ sal_Bool bForceDL = sal_False;
+ sal_Bool bDT = sal_False;
+ rInfo.bInNumBulList = sal_False; // Wir sind in einer Liste?
+ sal_Bool bNumbered = sal_False; // Der aktuelle Absatz ist numeriert
+ sal_Bool bPara = sal_False; // das aktuelle Token ist <P>
+ rInfo.bParaPossible = sal_False; // ein <P> darf zusaetzlich ausgegeben werden
+ sal_Bool bNoEndTag = sal_False; // kein End-Tag ausgeben
+
+ rHWrt.bNoAlign = sal_False; // kein ALIGN=... moeglich
+ sal_Bool bNoStyle = sal_False; // kein STYLE=... moeglich
+ sal_uInt8 nBulletGrfLvl = 255; // Die auszugebende Bullet-Grafik
// Sind wir in einer Aufzaehlungs- oder Numerierungliste?
const SwTxtNode* pTxtNd = rWrt.pCurPam->GetNode()->GetTxtNode();
@@ -604,16 +604,16 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
if( aNumInfo.GetNumRule() )
{
- rInfo.bInNumBulList = TRUE;
+ rInfo.bInNumBulList = sal_True;
nNewDefListLvl = 0;
// ist der aktuelle Absatz numeriert?
bNumbered = aNumInfo.IsNumbered();
- BYTE nLvl = aNumInfo.GetLevel();
+ sal_uInt8 nLvl = aNumInfo.GetLevel();
OSL_ENSURE( pTxtNd->GetActualListLevel() == nLvl,
"Gemerkter Num-Level ist falsch" );
- OSL_ENSURE( bNumbered == static_cast< BOOL >(pTxtNd->IsCountedInList()),
+ OSL_ENSURE( bNumbered == static_cast< sal_Bool >(pTxtNd->IsCountedInList()),
"Gemerkter Numerierungs-Zustand ist falsch" );
if( bNumbered )
@@ -626,7 +626,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// indicates, that no additional restart value has to be written.
if ( pTxtNd->IsListRestart() )
{
- nNumStart = static_cast< USHORT >(pTxtNd->GetActualListStartValue());
+ nNumStart = static_cast< sal_uInt16 >(pTxtNd->GetActualListStartValue());
}
// <--
DBG_ASSERT( rHWrt.nLastParaToken == 0,
@@ -636,7 +636,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// Jetzt holen wir das Token und ggf. die Klasse
SwHTMLFmtInfo aFmtInfo( &rFmt );
- USHORT nArrayPos;
+ sal_uInt16 nArrayPos;
const SwHTMLFmtInfo *pFmtInfo;
if( rHWrt.aTxtCollInfos.Seek_Entry( &aFmtInfo, &nArrayPos ) )
{
@@ -655,8 +655,8 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
}
// Jetzt wird festgelegt, was aufgrund des Tokens so moeglich ist
- USHORT nToken = 0; // Token fuer Tag-Wechsel
- BOOL bOutNewLine = FALSE; // nur ein LF ausgeben?
+ sal_uInt16 nToken = 0; // Token fuer Tag-Wechsel
+ sal_Bool bOutNewLine = sal_False; // nur ein LF ausgeben?
if( pFmtInfo->aToken.Len() )
{
// Es ist eine HTML-Tag-Vorlage oder die Vorlage ist von einer
@@ -668,19 +668,19 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
{
case 'A': OSL_ENSURE( rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_address),
"Doch kein ADDRESS?" );
- rInfo.bParaPossible = TRUE;
- rHWrt.bNoAlign = TRUE;
+ rInfo.bParaPossible = sal_True;
+ rHWrt.bNoAlign = sal_True;
break;
case 'B': OSL_ENSURE( rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_blockquote),
"Doch kein BLOCKQUOTE?" );
- rInfo.bParaPossible = TRUE;
- rHWrt.bNoAlign = TRUE;
+ rInfo.bParaPossible = sal_True;
+ rHWrt.bNoAlign = sal_True;
break;
case 'P': if( rInfo.aToken.Len() == 1 )
{
- bPara = TRUE;
+ bPara = sal_True;
}
else
{
@@ -688,13 +688,13 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
"Doch kein PRE?" );
if( HTML_PREFORMTXT_ON == rHWrt.nLastParaToken )
{
- bOutNewLine = TRUE;
+ bOutNewLine = sal_True;
}
else
{
nToken = HTML_PREFORMTXT_ON;
- rHWrt.bNoAlign = TRUE;
- bNoEndTag = TRUE;
+ rHWrt.bNoAlign = sal_True;
+ bNoEndTag = sal_True;
}
}
break;
@@ -704,8 +704,8 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
"Doch kein DD/DT?" );
bDT = rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_dt);
rInfo.bParaPossible = !bDT;
- rHWrt.bNoAlign = TRUE;
- bForceDL = TRUE;
+ rHWrt.bNoAlign = sal_True;
+ bForceDL = sal_True;
break;
}
}
@@ -715,7 +715,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// diesem abgeleitet sind, werden als <P> exportiert
rInfo.aToken = OOO_STRING_SVTOOLS_HTML_parabreak;
- bPara = TRUE;
+ bPara = sal_True;
}
// Falls noetig, die harte Attributierung der Vorlage uebernehmen
@@ -759,8 +759,8 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
RES_UL_SPACE, RES_UL_SPACE );
rInfo.pItemSet->Put( aULSpaceItem );
}
- rHWrt.bOutHeader = FALSE;
- rHWrt.bOutFooter = FALSE;
+ rHWrt.bOutHeader = sal_False;
+ rHWrt.bOutFooter = sal_False;
}
if( bOutNewLine )
@@ -780,14 +780,14 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
if( rInfo.pItemSet &&
SFX_ITEM_SET == rInfo.pItemSet->GetItemState( RES_PARATR_ADJUST,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
pAdjItem = pItem;
}
// Unteren Absatz-Abstand beachten ? (nie im letzen Absatz von
// Tabellen)
- BOOL bUseParSpace = !rHWrt.bOutTable ||
+ sal_Bool bUseParSpace = !rHWrt.bOutTable ||
(rWrt.pCurPam->GetPoint()->nNode.GetIndex() !=
rWrt.pCurPam->GetMark()->nNode.GetIndex());
// Wenn Styles exportiert werden, wird aus eingerueckten Absaetzen
@@ -807,7 +807,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
if( nLeftMargin > 0 && rHWrt.nDefListMargin > 0 )
{
- nNewDefListLvl = static_cast< USHORT >((nLeftMargin + (rHWrt.nDefListMargin/2)) /
+ nNewDefListLvl = static_cast< sal_uInt16 >((nLeftMargin + (rHWrt.nDefListMargin/2)) /
rHWrt.nDefListMargin);
if( nNewDefListLvl == 0 && bForceDL && !bDT )
nNewDefListLvl = 1;
@@ -820,7 +820,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
nNewDefListLvl = (bForceDL&& !bDT) ? 1 : 0;
}
- BOOL bIsNextTxtNode =
+ sal_Bool bIsNextTxtNode =
rWrt.pDoc->GetNodes()[rWrt.pCurPam->GetPoint()->nNode.GetIndex()+1]
->IsTxtNode();
@@ -838,9 +838,9 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
{
// Absaetze ohne unteren Abstand als DT exportieren
nNewDefListLvl = 1;
- bDT = TRUE;
- rInfo.bParaPossible = FALSE;
- rHWrt.bNoAlign = TRUE;
+ bDT = sal_True;
+ rInfo.bParaPossible = sal_False;
+ rHWrt.bNoAlign = sal_True;
}
}
@@ -856,7 +856,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
if( bNumbered )
{
if( rHWrt.aBulletGrfs[nBulletGrfLvl].Len() )
- bNumbered = FALSE;
+ bNumbered = sal_False;
else
nBulletGrfLvl = 255;
}
@@ -911,12 +911,12 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
if( rHWrt.bLFPossible )
rHWrt.OutNewLine(); // Absatz-Tag in neue Zeile
- rInfo.bOutPara = FALSE;
+ rInfo.bOutPara = sal_False;
// das ist jetzt unser neues Token
rHWrt.ChangeParaToken( nToken );
- BOOL bHasParSpace = bUseParSpace && rULSpace.GetLower() > 0;
+ sal_Bool bHasParSpace = bUseParSpace && rULSpace.GetLower() > 0;
// ggf ein List-Item aufmachen
if( rInfo.bInNumBulList && bNumbered )
@@ -946,15 +946,15 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
sOut += OOO_STRING_SVTOOLS_HTML_division;
rWrt.Strm() << sOut.GetBuffer();
- rHWrt.bTxtAttr = FALSE;
- rHWrt.bOutOpts = TRUE;
+ rHWrt.bTxtAttr = sal_False;
+ rHWrt.bOutOpts = sal_True;
OutHTML_SvxAdjust( rWrt, *pAdjItem );
rWrt.Strm() << '>';
pAdjItem = 0;
- rHWrt.bNoAlign = FALSE;
- rInfo.bOutDiv = TRUE;
+ rHWrt.bNoAlign = sal_False;
+ rInfo.bOutDiv = sal_True;
rHWrt.IncIndentLevel();
- rHWrt.bLFPossible = TRUE;
+ rHWrt.bLFPossible = sal_True;
rHWrt.OutNewLine();
}
@@ -968,9 +968,9 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
{
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), rInfo.aToken.GetBuffer() );
aToken = OOO_STRING_SVTOOLS_HTML_parabreak;
- bPara = TRUE;
- rHWrt.bNoAlign = FALSE;
- bNoStyle = FALSE;
+ bPara = sal_True;
+ rHWrt.bNoAlign = sal_False;
+ bNoStyle = sal_False;
}
LanguageType eLang = rInfo.pItemSet
@@ -1018,8 +1018,8 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
rHWrt.bCfgOutStyles )
{
// jetzt werden Optionen ausgegeben
- rHWrt.bTxtAttr = FALSE;
- rHWrt.bOutOpts = TRUE;
+ rHWrt.bTxtAttr = sal_False;
+ rHWrt.bOutOpts = sal_True;
ByteString sOut( '<' );
sOut += aToken;
@@ -1157,17 +1157,17 @@ void OutHTML_SwFmtOff( Writer& rWrt, const SwHTMLTxtCollOutputInfo& rInfo )
if( rInfo.ShouldOutputToken() )
{
if( rHWrt.bLFPossible )
- rHWrt.OutNewLine( TRUE );
+ rHWrt.OutNewLine( sal_True );
// fuer BLOCKQUOTE, ADDRESS und DD wird ggf noch ein
// Absatz-Token ausgegeben, wenn
// - keine Styles geschrieben werden, und
// - ein untere Abstand existiert
if( rInfo.bParaPossible && rInfo.bOutPara )
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_parabreak, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_parabreak, sal_False );
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), rInfo.aToken.GetBuffer(),
- FALSE );
+ sal_False );
rHWrt.bLFPossible = !rInfo.aToken.Equals( OOO_STRING_SVTOOLS_HTML_dt ) &&
!rInfo.aToken.Equals( OOO_STRING_SVTOOLS_HTML_dd ) &&
!rInfo.aToken.Equals( OOO_STRING_SVTOOLS_HTML_li );
@@ -1177,8 +1177,8 @@ void OutHTML_SwFmtOff( Writer& rWrt, const SwHTMLTxtCollOutputInfo& rInfo )
rHWrt.DecIndentLevel();
if( rHWrt.bLFPossible )
rHWrt.OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_division, FALSE );
- rHWrt.bLFPossible = TRUE;
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_division, sal_False );
+ rHWrt.bLFPossible = sal_True;
}
// ggf. eine Aufzaehlung- oder Numerierungsliste beenden
@@ -1243,41 +1243,42 @@ class HTMLEndPosLst
SvXub_StrLens aScriptChgLst; // positions where script changes
// 0 is not contained in this list,
// but the text length
- SvUShorts aScriptLst; // the script that is valif up to the position
- // contained in aScriptChgList at the same index
+ // the script that is valif up to the position
+ // contained in aScriptChgList at the same index
+ ::std::vector<sal_uInt16> aScriptLst;
SwDoc *pDoc; // das aktuelle Dokument
SwDoc* pTemplate; // die HTML-Vorlage (oder 0)
const Color* pDfltColor;// die Default-Vordergrund-Farbe
SvStringsSortDtor& rScriptTxtStyles; //
- ULONG nHTMLMode;
- BOOL bOutStyles : 1; // werden Styles exportiert
+ sal_uLong nHTMLMode;
+ sal_Bool bOutStyles : 1; // werden Styles exportiert
// die Position eines Items in der Start-/Ende-Liste suchen
- USHORT _FindStartPos( const HTMLSttEndPos *pPos ) const;
- USHORT _FindEndPos( const HTMLSttEndPos *pPos ) const;
+ sal_uInt16 _FindStartPos( const HTMLSttEndPos *pPos ) const;
+ sal_uInt16 _FindEndPos( const HTMLSttEndPos *pPos ) const;
// Eine SttEndPos in die Start- und Ende-Listen eintragen bzw. aus
// ihnen loeschen, wobei die Ende-Position bekannt ist
- void _InsertItem( HTMLSttEndPos *pPos, USHORT nEndPos );
- void _RemoveItem( USHORT nEndPos );
+ void _InsertItem( HTMLSttEndPos *pPos, sal_uInt16 nEndPos );
+ void _RemoveItem( sal_uInt16 nEndPos );
// die "Art" es Attributs ermitteln
HTMLOnOffState GetHTMLItemState( const SfxPoolItem& rItem );
// Existiert ein bestimmtes On-Tag-Item
- BOOL ExistsOnTagItem( USHORT nWhich, xub_StrLen nPos );
+ sal_Bool ExistsOnTagItem( sal_uInt16 nWhich, xub_StrLen nPos );
// Existiert ein Item zum ausschalten eines Attributs, das genauso
// exportiert wird wie das uebergebene Item im gleichen Bereich?
- BOOL ExistsOffTagItem( USHORT nWhich, xub_StrLen nStartPos,
+ sal_Bool ExistsOffTagItem( sal_uInt16 nWhich, xub_StrLen nStartPos,
xub_StrLen nEndPos );
// das Ende eines gesplitteten Items anpassen
- void FixSplittedItem( HTMLSttEndPos *pPos, USHORT nStartPos,
+ void FixSplittedItem( HTMLSttEndPos *pPos, sal_uInt16 nStartPos,
xub_StrLen nNewEnd );
// Ein Attribut in die Listen eintragen und ggf. aufteilen
@@ -1291,7 +1292,7 @@ class HTMLEndPosLst
// Insert without taking care of script
void InsertNoScript( const SfxPoolItem& rItem, xub_StrLen nStart,
xub_StrLen nEnd, SwHTMLFmtInfos& rFmtInfos,
- BOOL bParaAttrs=FALSE );
+ sal_Bool bParaAttrs=sal_False );
const SwHTMLFmtInfo *GetFmtInfo( const SwFmt& rFmt,
SwHTMLFmtInfos& rFmtInfos );
@@ -1299,16 +1300,16 @@ class HTMLEndPosLst
public:
HTMLEndPosLst( SwDoc *pDoc, SwDoc* pTemplate, const Color* pDfltColor,
- BOOL bOutStyles, ULONG nHTMLMode,
+ sal_Bool bOutStyles, sal_uLong nHTMLMode,
const String& rText, SvStringsSortDtor& rStyles );
~HTMLEndPosLst();
// Ein Attribut einfuegen
void Insert( const SfxPoolItem& rItem, xub_StrLen nStart, xub_StrLen nEnd,
- SwHTMLFmtInfos& rFmtInfos, BOOL bParaAttrs=FALSE );
+ SwHTMLFmtInfos& rFmtInfos, sal_Bool bParaAttrs=sal_False );
void Insert( const SfxItemSet& rItemSet, xub_StrLen nStart, xub_StrLen nEnd,
- SwHTMLFmtInfos& rFmtInfos, BOOL bDeep,
- BOOL bParaAttrs=FALSE );
+ SwHTMLFmtInfos& rFmtInfos, sal_Bool bDeep,
+ sal_Bool bParaAttrs=sal_False );
void Insert( const SwDrawFrmFmt& rFmt, xub_StrLen nPos,
SwHTMLFmtInfos& rFmtInfos );
@@ -1320,15 +1321,15 @@ public:
void OutEndAttrs( SwHTMLWriter& rHWrt, xub_StrLen nPos,
HTMLOutContext *pContext = 0 );
- USHORT Count() const { return aEndLst.Count(); }
+ sal_uInt16 Count() const { return aEndLst.Count(); }
- BOOL IsHTMLMode( ULONG nMode ) const { return (nHTMLMode & nMode) != 0; }
+ sal_Bool IsHTMLMode( sal_uLong nMode ) const { return (nHTMLMode & nMode) != 0; }
};
-USHORT HTMLEndPosLst::_FindStartPos( const HTMLSttEndPos *pPos ) const
+sal_uInt16 HTMLEndPosLst::_FindStartPos( const HTMLSttEndPos *pPos ) const
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < aStartLst.Count() && aStartLst[i] != pPos; i++ )
;
@@ -1337,9 +1338,9 @@ USHORT HTMLEndPosLst::_FindStartPos( const HTMLSttEndPos *pPos ) const
return i==aStartLst.Count() ? USHRT_MAX : i;
}
-USHORT HTMLEndPosLst::_FindEndPos( const HTMLSttEndPos *pPos ) const
+sal_uInt16 HTMLEndPosLst::_FindEndPos( const HTMLSttEndPos *pPos ) const
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < aEndLst.Count() && aEndLst[i] != pPos; i++ )
;
@@ -1350,12 +1351,12 @@ USHORT HTMLEndPosLst::_FindEndPos( const HTMLSttEndPos *pPos ) const
}
-void HTMLEndPosLst::_InsertItem( HTMLSttEndPos *pPos, USHORT nEndPos )
+void HTMLEndPosLst::_InsertItem( HTMLSttEndPos *pPos, sal_uInt16 nEndPos )
{
// In der Start-Liste das Attribut hinter allen vorher und an
// der gleichen Position gestarteten Attributen einfuegen
xub_StrLen nStart = pPos->GetStart();
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < aStartLst.Count() &&
aStartLst[i]->GetStart() <= nStart; i++ )
@@ -1366,12 +1367,12 @@ void HTMLEndPosLst::_InsertItem( HTMLSttEndPos *pPos, USHORT nEndPos )
aEndLst.Insert( pPos, nEndPos );
}
-void HTMLEndPosLst::_RemoveItem( USHORT nEndPos )
+void HTMLEndPosLst::_RemoveItem( sal_uInt16 nEndPos )
{
HTMLSttEndPos *pPos = aEndLst[nEndPos];
// jetzt Suchen wir es in der Start-Liste
- USHORT nStartPos = _FindStartPos( pPos );
+ sal_uInt16 nStartPos = _FindStartPos( pPos );
if( nStartPos != USHRT_MAX )
aStartLst.Remove( nStartPos, 1 );
@@ -1526,9 +1527,9 @@ HTMLOnOffState HTMLEndPosLst::GetHTMLItemState( const SfxPoolItem& rItem )
return eState;
}
-BOOL HTMLEndPosLst::ExistsOnTagItem( USHORT nWhich, xub_StrLen nPos )
+sal_Bool HTMLEndPosLst::ExistsOnTagItem( sal_uInt16 nWhich, xub_StrLen nPos )
{
- for( USHORT i=0; i<aStartLst.Count(); i++ )
+ for( sal_uInt16 i=0; i<aStartLst.Count(); i++ )
{
HTMLSttEndPos *pTest = aStartLst[i];
@@ -1546,25 +1547,25 @@ BOOL HTMLEndPosLst::ExistsOnTagItem( USHORT nWhich, xub_StrLen nPos )
HTML_ON_VALUE == GetHTMLItemState(*pItem) )
{
// ein On-Tag-Attibut wurde gefunden
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
-BOOL HTMLEndPosLst::ExistsOffTagItem( USHORT nWhich, xub_StrLen nStartPos,
+sal_Bool HTMLEndPosLst::ExistsOffTagItem( sal_uInt16 nWhich, xub_StrLen nStartPos,
xub_StrLen nEndPos )
{
if( nWhich != RES_CHRATR_CROSSEDOUT &&
nWhich != RES_CHRATR_UNDERLINE &&
nWhich != RES_CHRATR_BLINK )
{
- return FALSE;
+ return sal_False;
}
- for( USHORT i=0; i<aStartLst.Count(); i++ )
+ for( sal_uInt16 i=0; i<aStartLst.Count(); i++ )
{
HTMLSttEndPos *pTest = aStartLst[i];
@@ -1579,7 +1580,7 @@ BOOL HTMLEndPosLst::ExistsOffTagItem( USHORT nWhich, xub_StrLen nStartPos,
// das Attribut beginnt vor oder an der aktuellen Position
// und endet hinter ihr
const SfxPoolItem *pItem = pTest->GetItem();
- USHORT nTstWhich = pItem->Which() ;
+ sal_uInt16 nTstWhich = pItem->Which() ;
if( (nTstWhich == RES_CHRATR_CROSSEDOUT ||
nTstWhich == RES_CHRATR_UNDERLINE ||
nTstWhich == RES_CHRATR_BLINK) &&
@@ -1587,22 +1588,22 @@ BOOL HTMLEndPosLst::ExistsOffTagItem( USHORT nWhich, xub_StrLen nStartPos,
{
// Ein Off-Tag-Attibut wurde gefunden, das genauso
// exportiert wird, wie das aktuelle Item
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
void HTMLEndPosLst::FixSplittedItem( HTMLSttEndPos *pPos, xub_StrLen nNewEnd,
- USHORT nStartPos )
+ sal_uInt16 nStartPos )
{
// die End-Position entsprechend fixen
pPos->SetEnd( nNewEnd );
// das Item aus der End-Liste entfernen
- USHORT nEndPos = _FindEndPos( pPos );
+ sal_uInt16 nEndPos = _FindEndPos( pPos );
if( nEndPos != USHRT_MAX )
aEndLst.Remove( nEndPos, 1 );
@@ -1614,7 +1615,7 @@ void HTMLEndPosLst::FixSplittedItem( HTMLSttEndPos *pPos, xub_StrLen nNewEnd,
aEndLst.Insert( pPos, nEndPos );
// jetzt noch die spaeter gestarteten Attribute anpassen
- for( USHORT i=nStartPos+1; i<aStartLst.Count(); i++ )
+ for( sal_uInt16 i=nStartPos+1; i<aStartLst.Count(); i++ )
{
HTMLSttEndPos *pTest = aStartLst[i];
xub_StrLen nTestEnd = pTest->GetEnd();
@@ -1633,7 +1634,7 @@ void HTMLEndPosLst::FixSplittedItem( HTMLSttEndPos *pPos, xub_StrLen nNewEnd,
pTest->SetEnd( nNewEnd );
// das Attribut aus der End-Liste entfernen
- USHORT nEPos = _FindEndPos( pTest );
+ sal_uInt16 nEPos = _FindEndPos( pTest );
if( nEPos != USHRT_MAX )
aEndLst.Remove( nEPos, 1 );
@@ -1651,7 +1652,7 @@ void HTMLEndPosLst::FixSplittedItem( HTMLSttEndPos *pPos, xub_StrLen nNewEnd,
void HTMLEndPosLst::InsertItem( const SfxPoolItem& rItem, xub_StrLen nStart,
xub_StrLen nEnd )
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < aEndLst.Count(); i++ )
{
HTMLSttEndPos *pTest = aEndLst[i];
@@ -1685,12 +1686,12 @@ void HTMLEndPosLst::InsertItem( const SfxPoolItem& rItem, xub_StrLen nStart,
void HTMLEndPosLst::SplitItem( const SfxPoolItem& rItem, xub_StrLen nStart,
xub_StrLen nEnd )
{
- USHORT nWhich = rItem.Which();
+ sal_uInt16 nWhich = rItem.Which();
// erstmal muessen wir die alten Items anhand der Startliste suchen
// und die neuen Item-Bereiche festlegen
- for( USHORT i=0; i<aStartLst.Count(); i++ )
+ for( sal_uInt16 i=0; i<aStartLst.Count(); i++ )
{
HTMLSttEndPos *pTest = aStartLst[i];
xub_StrLen nTestStart = pTest->GetStart();
@@ -1711,14 +1712,14 @@ void HTMLEndPosLst::SplitItem( const SfxPoolItem& rItem, xub_StrLen nStart,
if( pItem->Which() == nWhich &&
HTML_ON_VALUE == GetHTMLItemState( *pItem ) )
{
- BOOL bDelete = TRUE;
+ sal_Bool bDelete = sal_True;
if( nTestStart < nStart )
{
// der Start des neuen Attribut entspricht
// dem neuen Ende des Attribts
FixSplittedItem( pTest, nStart, i );
- bDelete = FALSE;
+ bDelete = sal_False;
}
else
{
@@ -1728,7 +1729,7 @@ void HTMLEndPosLst::SplitItem( const SfxPoolItem& rItem, xub_StrLen nStart,
aStartLst.Remove( i, 1 );
i--;
- USHORT nEndPos = _FindEndPos( pTest );
+ sal_uInt16 nEndPos = _FindEndPos( pTest );
if( nEndPos != USHRT_MAX )
aEndLst.Remove( nEndPos, 1 );
}
@@ -1751,7 +1752,7 @@ const SwHTMLFmtInfo *HTMLEndPosLst::GetFmtInfo( const SwFmt& rFmt,
{
const SwHTMLFmtInfo *pFmtInfo;
SwHTMLFmtInfo aFmtInfo( &rFmt );
- USHORT nPos;
+ sal_uInt16 nPos;
if( rFmtInfos.Seek_Entry( &aFmtInfo, &nPos ) )
{
pFmtInfo = rFmtInfos[nPos];
@@ -1770,8 +1771,8 @@ const SwHTMLFmtInfo *HTMLEndPosLst::GetFmtInfo( const SwFmt& rFmt,
}
HTMLEndPosLst::HTMLEndPosLst( SwDoc *pD, SwDoc* pTempl,
- const Color* pDfltCol, BOOL bStyles,
- ULONG nMode, const String& rText,
+ const Color* pDfltCol, sal_Bool bStyles,
+ sal_uLong nMode, const String& rText,
SvStringsSortDtor& rStyles ):
pDoc( pD ),
pTemplate( pTempl ),
@@ -1786,8 +1787,8 @@ HTMLEndPosLst::HTMLEndPosLst( SwDoc *pD, SwDoc* pTempl,
{
sal_uInt16 nScript = pBreakIt->GetBreakIter()->getScriptType( rText, nPos );
nPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript( rText, nPos, nScript );
- aScriptChgLst.Insert( nPos, aScriptChgLst.Count() );
- aScriptLst.Insert( nScript, aScriptLst.Count() );
+ aScriptChgLst.push_back( nPos );
+ aScriptLst.push_back( nScript );
}
}
@@ -1801,19 +1802,19 @@ HTMLEndPosLst::~HTMLEndPosLst()
void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
xub_StrLen nStart, xub_StrLen nEnd,
- SwHTMLFmtInfos& rFmtInfos, BOOL bParaAttrs )
+ SwHTMLFmtInfos& rFmtInfos, sal_Bool bParaAttrs )
{
// kein Bereich ?? dann nicht aufnehmen, wird nie wirksam !!
if( nStart != nEnd )
{
- BOOL bSet = FALSE, bSplit = FALSE;
+ sal_Bool bSet = sal_False, bSplit = sal_False;
switch( GetHTMLItemState(rItem) )
{
case HTML_ON_VALUE:
// das Attribut wird ausgegeben, wenn es nicht sowieso
// schon an ist
if( !ExistsOnTagItem( rItem.Which(), nStart ) )
- bSet = TRUE;
+ bSet = sal_True;
break;
case HTML_OFF_VALUE:
@@ -1822,14 +1823,14 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
// am ganzen Absatz gesetzt ist, weil es dann ja schon mit dem
// ABsatz-Tag ausgegeben wurde.
if( ExistsOnTagItem( rItem.Which(), nStart ) )
- bSplit = TRUE;
+ bSplit = sal_True;
bSet = bOutStyles && !bParaAttrs &&
!ExistsOffTagItem( rItem.Which(), nStart, nEnd );
break;
case HTML_REAL_VALUE:
// das Attribut kann immer ausgegeben werden
- bSet = TRUE;
+ bSet = sal_True;
break;
case HTML_STYLE_VALUE:
@@ -1861,7 +1862,7 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
if( pFmtInfo->pItemSet )
{
Insert( *pFmtInfo->pItemSet, nStart, nEnd,
- rFmtInfos, TRUE, bParaAttrs );
+ rFmtInfos, sal_True, bParaAttrs );
}
}
break;
@@ -1871,7 +1872,7 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
const SwFmtAutoFmt& rAutoFmt = (const SwFmtAutoFmt&)rItem;
const boost::shared_ptr<SfxItemSet> pSet = rAutoFmt.GetStyleHandle();
if( pSet.get() )
- Insert( *pSet.get(), nStart, nEnd, rFmtInfos, TRUE, bParaAttrs );
+ Insert( *pSet.get(), nStart, nEnd, rFmtInfos, sal_True, bParaAttrs );
}
break;
@@ -1902,12 +1903,12 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
if( pCharFmt )
{
Insert( pCharFmt->GetAttrSet(), nStart, nEnd,
- rFmtInfos, TRUE, bParaAttrs );
+ rFmtInfos, sal_True, bParaAttrs );
}
}
else
{
- bSet = TRUE;
+ bSet = sal_True;
}
}
break;
@@ -1924,7 +1925,7 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
void HTMLEndPosLst::Insert( const SfxPoolItem& rItem,
xub_StrLen nStart, xub_StrLen nEnd,
- SwHTMLFmtInfos& rFmtInfos, BOOL bParaAttrs )
+ SwHTMLFmtInfos& rFmtInfos, sal_Bool bParaAttrs )
{
sal_Bool bDependsOnScript = sal_False, bDependsOnAnyScript = sal_False;
sal_uInt16 nScript = i18n::ScriptType::LATIN;
@@ -1984,9 +1985,8 @@ void HTMLEndPosLst::Insert( const SfxPoolItem& rItem,
if( bDependsOnScript )
{
- sal_uInt16 nScriptChgs = aScriptChgLst.Count();
xub_StrLen nPos = nStart;
- for( sal_uInt16 i=0; i < nScriptChgs; i++ )
+ for( size_t i=0; i < aScriptChgLst.size(); i++ )
{
xub_StrLen nChgPos = aScriptChgLst[i];
if( nPos >= nChgPos )
@@ -2023,11 +2023,11 @@ void HTMLEndPosLst::Insert( const SfxPoolItem& rItem,
void HTMLEndPosLst::Insert( const SfxItemSet& rItemSet,
xub_StrLen nStart, xub_StrLen nEnd,
SwHTMLFmtInfos& rFmtInfos,
- BOOL bDeep, BOOL bParaAttrs )
+ sal_Bool bDeep, sal_Bool bParaAttrs )
{
SfxWhichIter aIter( rItemSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
const SfxPoolItem *pItem;
@@ -2056,10 +2056,10 @@ void HTMLEndPosLst::Insert( const SwDrawFrmFmt& rFmt, xub_StrLen nPos,
const SfxItemSet& rFmtItemSet = rFmt.GetAttrSet();
SfxItemSet aItemSet( *rFmtItemSet.GetPool(), RES_CHRATR_BEGIN,
RES_CHRATR_END );
- SwHTMLWriter::GetEEAttrsFromDrwObj( aItemSet, pTextObj, TRUE );
- BOOL bOutStylesOld = bOutStyles;
- bOutStyles = FALSE;
- Insert( aItemSet, nPos, nPos+1, rFmtInfos, FALSE, FALSE );
+ SwHTMLWriter::GetEEAttrsFromDrwObj( aItemSet, pTextObj, sal_True );
+ sal_Bool bOutStylesOld = bOutStyles;
+ bOutStyles = sal_False;
+ Insert( aItemSet, nPos, nPos+1, rFmtInfos, sal_False, sal_False );
bOutStyles = bOutStylesOld;
}
}
@@ -2069,8 +2069,8 @@ sal_uInt16 HTMLEndPosLst::GetScriptAtPos( xub_StrLen nPos ,
{
sal_uInt16 nRet = CSS1_OUTMODE_ANY_SCRIPT;
- sal_uInt16 nScriptChgs = aScriptChgLst.Count();
- sal_uInt16 i=0;
+ size_t nScriptChgs = aScriptChgLst.size();
+ size_t i=0;
while( i < nScriptChgs && nPos >= aScriptChgLst[i] )
i++;
OSL_ENSURE( i < nScriptChgs, "script list is to short" );
@@ -2088,10 +2088,10 @@ sal_uInt16 HTMLEndPosLst::GetScriptAtPos( xub_StrLen nPos ,
void HTMLEndPosLst::OutStartAttrs( SwHTMLWriter& rHWrt, xub_StrLen nPos,
HTMLOutContext *pContext )
{
- rHWrt.bTagOn = TRUE;
+ rHWrt.bTagOn = sal_True;
// die Attribute in der Start-Liste sind aufsteigend sortiert
- for( USHORT i=0; i< aStartLst.Count(); i++ )
+ for( sal_uInt16 i=0; i< aStartLst.Count(); i++ )
{
HTMLSttEndPos *pPos = aStartLst[i];
xub_StrLen nStart = pPos->GetStart();
@@ -2125,10 +2125,10 @@ void HTMLEndPosLst::OutStartAttrs( SwHTMLWriter& rHWrt, xub_StrLen nPos,
void HTMLEndPosLst::OutEndAttrs( SwHTMLWriter& rHWrt, xub_StrLen nPos,
HTMLOutContext *pContext )
{
- rHWrt.bTagOn = FALSE;
+ rHWrt.bTagOn = sal_False;
// die Attribute in der End-Liste sind aufsteigend sortiert
- USHORT i=0;
+ sal_uInt16 i=0;
while( i < aEndLst.Count() )
{
HTMLSttEndPos *pPos = aEndLst[i];
@@ -2172,7 +2172,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
// Besonderheit: leere Node und HR-Vorlage (horizontaler Strich)
// nur ein <HR> ausgeben
- USHORT nPoolId = pNd->GetAnyFmtColl().GetPoolFmtId();
+ sal_uInt16 nPoolId = pNd->GetAnyFmtColl().GetPoolFmtId();
if( !nEnde && (RES_POOLCOLL_HTML_HR==nPoolId ||
pNd->GetAnyFmtColl().GetName().EqualsAscii( OOO_STRING_SVTOOLS_HTML_horzrule) ) )
@@ -2189,7 +2189,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
if( rHTMLWrt.bLFPossible )
rHTMLWrt.OutNewLine(); // Absatz-Tag in eine neue Zeile
- rHTMLWrt.bLFPossible = TRUE;
+ rHTMLWrt.bLFPossible = sal_True;
ByteString sOut( '<' );
sOut += OOO_STRING_SVTOOLS_HTML_horzrule;
@@ -2201,7 +2201,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
return rHTMLWrt;
}
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pItemSet->GetItemState( RES_LR_SPACE, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pItemSet->GetItemState( RES_LR_SPACE, sal_False, &pItem ))
{
sal_Int32 nLeft = ((SvxLRSpaceItem*)pItem)->GetLeft();
sal_Int32 nRight = ((SvxLRSpaceItem*)pItem)->GetRight();
@@ -2242,13 +2242,13 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
}
}
rWrt.Strm() << sOut.GetBuffer();
- if( SFX_ITEM_SET == pItemSet->GetItemState( RES_BOX, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pItemSet->GetItemState( RES_BOX, sal_False, &pItem ))
{
const SvxBoxItem* pBoxItem = (const SvxBoxItem*)pItem;
const SvxBorderLine* pBorderLine = pBoxItem->GetBottom();
if( pBorderLine )
{
- USHORT nWidth = pBorderLine->GetOutWidth() +
+ sal_uInt16 nWidth = pBorderLine->GetOutWidth() +
pBorderLine->GetInWidth() +
pBorderLine->GetDistance();
((sOut = ' ') += OOO_STRING_SVTOOLS_HTML_O_size) += '=';
@@ -2287,14 +2287,14 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
const SfxPoolItem* pItem;
const SfxItemSet *pItemSet = pNd->GetpSwAttrSet();
if( pItemSet && pItemSet->Count() &&
- SFX_ITEM_SET == pItemSet->GetItemState( RES_CHRATR_FONTSIZE, FALSE, &pItem ) &&
+ SFX_ITEM_SET == pItemSet->GetItemState( RES_CHRATR_FONTSIZE, sal_False, &pItem ) &&
40 == ((const SvxFontHeightItem *)pItem)->GetHeight() )
{
// ... ausserdem ist die 2pt Schrift eingestellt ...
- ULONG nNdPos = rWrt.pCurPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nNdPos = rWrt.pCurPam->GetPoint()->nNode.GetIndex();
const SwNode *pNextNd = rWrt.pDoc->GetNodes()[nNdPos+1];
const SwNode *pPrevNd = rWrt.pDoc->GetNodes()[nNdPos-1];
- BOOL bStdColl = nPoolId == RES_POOLCOLL_STANDARD;
+ sal_Bool bStdColl = nPoolId == RES_POOLCOLL_STANDARD;
if( ( bStdColl && (pNextNd->IsTableNode() ||
pNextNd->IsSectionNode()) ) ||
( !bStdColl && pNextNd->IsEndNode() &&
@@ -2308,7 +2308,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
// Alle an dem Node verankerten Rahmen ausgeben
rHTMLWrt.OutFlyFrm( rNode.GetIndex(), 0, HTML_POS_ANY );
- rHTMLWrt.bLFPossible = FALSE;
+ rHTMLWrt.bLFPossible = sal_False;
return rWrt;
}
@@ -2316,36 +2316,36 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
}
// PagePreaks uns PagDescs abfangen
- BOOL bPageBreakBehind = FALSE;
+ sal_Bool bPageBreakBehind = sal_False;
if( rHTMLWrt.bCfgFormFeed &&
!(rHTMLWrt.bOutTable || rHTMLWrt.bOutFlyFrame) &&
rHTMLWrt.pStartNdIdx->GetIndex() !=
rHTMLWrt.pCurPam->GetPoint()->nNode.GetIndex() )
{
- BOOL bPageBreakBefore = FALSE;
+ sal_Bool bPageBreakBefore = sal_False;
const SfxPoolItem* pItem;
const SfxItemSet* pItemSet = pNd->GetpSwAttrSet();
if( pItemSet )
{
if( SFX_ITEM_SET ==
- pItemSet->GetItemState( RES_PAGEDESC, TRUE, &pItem ) &&
+ pItemSet->GetItemState( RES_PAGEDESC, sal_True, &pItem ) &&
((SwFmtPageDesc *)pItem)->GetPageDesc() )
- bPageBreakBefore = TRUE;
+ bPageBreakBefore = sal_True;
else if( SFX_ITEM_SET ==
- pItemSet->GetItemState( RES_BREAK, TRUE, &pItem ) )
+ pItemSet->GetItemState( RES_BREAK, sal_True, &pItem ) )
{
switch( ((SvxFmtBreakItem *)pItem)->GetBreak() )
{
case SVX_BREAK_PAGE_BEFORE:
- bPageBreakBefore = TRUE;
+ bPageBreakBefore = sal_True;
break;
case SVX_BREAK_PAGE_AFTER:
- bPageBreakBehind = TRUE;
+ bPageBreakBehind = sal_True;
break;
case SVX_BREAK_PAGE_BOTH:
- bPageBreakBefore = TRUE;
- bPageBreakBehind = TRUE;
+ bPageBreakBefore = sal_True;
+ bPageBreakBehind = sal_True;
break;
default:
;
@@ -2361,7 +2361,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
rHTMLWrt.OutForm();
// An dem Node "verankerte" Seitenegebunde Rahmen ausgeben
- BOOL bFlysLeft = rHTMLWrt.OutFlyFrm( rNode.GetIndex(),
+ sal_Bool bFlysLeft = rHTMLWrt.OutFlyFrm( rNode.GetIndex(),
0, HTML_POS_PREFIX );
// An dem Node verankerte Rahmen ausgeben, die vor dem
// Absatz-Tag geschrieben werden sollen.
@@ -2373,12 +2373,12 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
nEnde = rHTMLWrt.pCurPam->GetMark()->nContent.GetIndex();
// gibt es harte Attribute, die als Optionen geschrieben werden muessen?
- rHTMLWrt.bTagOn = TRUE;
+ rHTMLWrt.bTagOn = sal_True;
// jetzt das Tag des Absatzes ausgeben
const SwFmt& rFmt = pNd->GetAnyFmtColl();
SwHTMLTxtCollOutputInfo aFmtInfo;
- BOOL bOldLFPossible = rHTMLWrt.bLFPossible;
+ sal_Bool bOldLFPossible = rHTMLWrt.bLFPossible;
OutHTML_SwFmt( rWrt, rFmt, pNd->GetpSwAttrSet(), aFmtInfo );
// Wenn vor dem Absatz-Tag keine neue Zeile aufgemacht wurde, dann
@@ -2389,7 +2389,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
// dann die Bookmarks (inkl. End-Tag)
- rHTMLWrt.bOutOpts = FALSE;
+ rHTMLWrt.bOutOpts = sal_False;
rHTMLWrt.OutBookmarks();
// jetzt ist noch mal eine gute Gelegenheit fuer ein LF, sofern es noch
@@ -2399,7 +2399,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
{
rHTMLWrt.OutNewLine();
}
- rHTMLWrt.bLFPossible = FALSE;
+ rHTMLWrt.bLFPossible = sal_False;
// Text, der aus einer Outline-Numerierung kommt ermitteln
xub_StrLen nOffset = 0;
@@ -2433,7 +2433,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
if( aFmtInfo.pItemSet )
{
aEndPosLst.Insert( *aFmtInfo.pItemSet, 0, nEnde + nOffset,
- rHTMLWrt.aChrFmtInfos, FALSE, TRUE );
+ rHTMLWrt.aChrFmtInfos, sal_False, sal_True );
}
@@ -2461,13 +2461,13 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
// erstmal den Start berichtigen. D.h. wird nur ein Teil vom Satz
// ausgegeben, so muessen auch da die Attribute stimmen!!
- rHTMLWrt.bTxtAttr = TRUE;
+ rHTMLWrt.bTxtAttr = sal_True;
- USHORT nAttrPos = 0;
+ sal_uInt16 nAttrPos = 0;
xub_StrLen nStrPos = rHTMLWrt.pCurPam->GetPoint()->nContent.GetIndex();
const SwTxtAttr * pHt = 0;
- USHORT nCntAttr = pNd->HasHints() ? pNd->GetSwpHints().Count() : 0;
+ sal_uInt16 nCntAttr = pNd->HasHints() ? pNd->GetSwpHints().Count() : 0;
if( nCntAttr && nStrPos > *( pHt = pNd->GetSwpHints()[ 0 ] )->GetStart() )
{
// Ok, es gibt vorher Attribute, die ausgegeben werden muessen
@@ -2514,9 +2514,9 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
aEndPosLst.OutStartAttrs( rHTMLWrt, nStrPos + nOffset );
}
- BOOL bWriteBreak = (HTML_PREFORMTXT_ON != rHTMLWrt.nLastParaToken);
+ sal_Bool bWriteBreak = (HTML_PREFORMTXT_ON != rHTMLWrt.nLastParaToken);
if( bWriteBreak && pNd->GetNumRule() )
- bWriteBreak = FALSE;
+ bWriteBreak = sal_False;
{
HTMLOutContext aContext( rHTMLWrt.eDestEnc );
@@ -2532,7 +2532,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
nStrPos, HTML_POS_INSIDE,
&aContext );
- BOOL bOutChar = TRUE;
+ sal_Bool bOutChar = sal_True;
const SwTxtAttr * pTxtHt = 0;
if( nAttrPos < nCntAttr && *pHt->GetStart() == nStrPos
&& nStrPos != nEnde )
@@ -2548,8 +2548,8 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
{
// Wenn erlaubt, wird das Ding als Spacer exportiert
- bOutChar = FALSE; // Space nicht ausgeben
- bWriteBreak = FALSE; // der Absatz ist aber auch nicht leer
+ bOutChar = sal_False; // Space nicht ausgeben
+ bWriteBreak = sal_False; // der Absatz ist aber auch nicht leer
HTMLOutFuncs::FlushToAscii( rWrt.Strm(), aContext );
OutHTML_HoriSpacer( rWrt,
((const SvxKerningItem&)pHt->GetAttr()).GetValue() );
@@ -2579,13 +2579,13 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
else
{
pTxtHt = pHt;
- USHORT nFldWhich;
+ sal_uInt16 nFldWhich;
if( RES_TXTATR_FIELD != pHt->Which() ||
( RES_POSTITFLD != (nFldWhich = ((const SwFmtFld&)pHt->GetAttr()).GetFld()->Which()) &&
RES_SCRIPTFLD != nFldWhich ) )
- bWriteBreak = FALSE;
+ bWriteBreak = sal_False;
}
- bOutChar = FALSE; // keine 255 ausgeben
+ bOutChar = sal_False; // keine 255 ausgeben
}
} while( ++nAttrPos < nCntAttr && nStrPos ==
*( pHt = pNd->GetSwpHints()[ nAttrPos ] )->GetStart() );
@@ -2616,7 +2616,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
HTMLOutFuncs::FlushToAscii( rWrt.Strm(), aContext );
Out( aHTMLAttrFnTab, pTxtHt->GetAttr(), rHTMLWrt );
rHTMLWrt.nCSS1Script = nCSS1Script;
- rHTMLWrt.bLFPossible = FALSE;
+ rHTMLWrt.bLFPossible = sal_False;
}
if( bOutChar )
@@ -2642,7 +2642,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
{
HTMLOutFuncs::FlushToAscii( rWrt.Strm(), aContext );
rHTMLWrt.OutNewLine();
- bOutChar = FALSE;
+ bOutChar = sal_False;
if( rHTMLWrt.nLastParaToken )
nPreSplitPos = nStrPos+1;
}
@@ -2678,11 +2678,11 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
nEnde, HTML_POS_INSIDE );
OSL_ENSURE( !bFlysLeft, "Es wurden nicht alle Rahmen gespeichert!" );
- rHTMLWrt.bTxtAttr = FALSE;
+ rHTMLWrt.bTxtAttr = sal_False;
if( bWriteBreak )
{
- BOOL bEndOfCell = rHTMLWrt.bOutTable &&
+ sal_Bool bEndOfCell = rHTMLWrt.bOutTable &&
rWrt.pCurPam->GetPoint()->nNode.GetIndex() ==
rWrt.pCurPam->GetMark()->nNode.GetIndex();
@@ -2702,7 +2702,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
if( rULSpace.GetLower() > 0 && !bEndOfCell &&
!rHTMLWrt.IsHTMLMode(HTMLMODE_NO_BR_AT_PAREND) )
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_linebreak );
- rHTMLWrt.bLFPossible = TRUE;
+ rHTMLWrt.bLFPossible = sal_True;
}
}
@@ -2723,23 +2723,23 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
(((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_clear) += '=') += pStr;
HTMLOutFuncs::Out_AsciiTag( rHTMLWrt.Strm(), sOut.GetBuffer() );
- rHTMLWrt.bClearLeft = FALSE;
- rHTMLWrt.bClearRight = FALSE;
+ rHTMLWrt.bClearLeft = sal_False;
+ rHTMLWrt.bClearRight = sal_False;
- rHTMLWrt.bLFPossible = TRUE;
+ rHTMLWrt.bLFPossible = sal_True;
}
// wenn ein LF nicht schon erlaubt ist wird es erlaubt, wenn der
// Absatz mit einem ' ' endet
if( !rHTMLWrt.bLFPossible && !rHTMLWrt.nLastParaToken &&
nEnde > 0 && ' ' == rStr.GetChar(nEnde-1) )
- rHTMLWrt.bLFPossible = TRUE;
+ rHTMLWrt.bLFPossible = sal_True;
- rHTMLWrt.bTagOn = FALSE;
+ rHTMLWrt.bTagOn = sal_False;
OutHTML_SwFmtOff( rWrt, aFmtInfo );
// eventuell eine Form schliessen
- rHTMLWrt.OutForm( FALSE );
+ rHTMLWrt.OutForm( sal_False );
if( bPageBreakBehind )
rWrt.Strm() << '\f';
@@ -2800,7 +2800,7 @@ static Writer& OutHTML_SvxColor( Writer& rWrt, const SfxPoolItem& rHt )
HTMLOutFuncs::Out_Color( rWrt.Strm(), aColor, rHTMLWrt.eDestEnc ) << '>';
}
else
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_font, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_font, sal_False );
return rWrt;
}
@@ -2844,7 +2844,7 @@ static Writer& OutHTML_SvxFont( Writer& rWrt, const SfxPoolItem& rHt )
<< "\">";
}
else
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_font , FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_font , sal_False );
return rWrt;
}
@@ -2860,8 +2860,8 @@ static Writer& OutHTML_SvxFontHeight( Writer& rWrt, const SfxPoolItem& rHt )
ByteString sOut( '<' );
sOut += OOO_STRING_SVTOOLS_HTML_font;
- UINT32 nHeight = ((const SvxFontHeightItem&)rHt).GetHeight();
- USHORT nSize = rHTMLWrt.GetHTMLFontSize( nHeight );
+ sal_uInt32 nHeight = ((const SvxFontHeightItem&)rHt).GetHeight();
+ sal_uInt16 nSize = rHTMLWrt.GetHTMLFontSize( nHeight );
(((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_size) += '=')
+= ByteString::CreateFromInt32( nSize );
rWrt.Strm() << sOut.GetBuffer();
@@ -2877,7 +2877,7 @@ static Writer& OutHTML_SvxFontHeight( Writer& rWrt, const SfxPoolItem& rHt )
}
else
{
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_font, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_font, sal_False );
}
return rWrt;
@@ -2903,7 +2903,7 @@ static Writer& OutHTML_SvxLanguage( Writer& rWrt, const SfxPoolItem& rHt )
}
else
{
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_span, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_span, sal_False );
}
return rWrt;
@@ -3014,14 +3014,14 @@ static Writer& OutHTML_SwFlyCnt( Writer& rWrt, const SfxPoolItem& rHt )
SwHTMLFrmType eType =
(SwHTMLFrmType)rHTMLWrt.GuessFrmType( rFmt, pSdrObj );
- BYTE nMode = aHTMLOutFrmAsCharTable[eType][rHTMLWrt.nExportMode];
+ sal_uInt8 nMode = aHTMLOutFrmAsCharTable[eType][rHTMLWrt.nExportMode];
rHTMLWrt.OutFrmFmt( nMode, rFmt, pSdrObj );
return rWrt;
}
// Das ist jetzt unser Blink-Item. Blinkend wird eingeschaltet, indem man
-// das Item auf TRUE setzt!
+// das Item auf sal_True setzt!
static Writer& OutHTML_SwBlink( Writer& rWrt, const SfxPoolItem& rHt )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -3041,13 +3041,13 @@ static Writer& OutHTML_SwBlink( Writer& rWrt, const SfxPoolItem& rHt )
return rWrt;
}
-Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, BOOL bOn )
+Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, sal_Bool bOn )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
String aURL( rINetFmt.GetValue() );
const SvxMacroTableDtor *pMacTable = rINetFmt.GetMacroTbl();
- BOOL bEvents = pMacTable != 0 && pMacTable->Count() > 0;
+ sal_Bool bEvents = pMacTable != 0 && pMacTable->Count() > 0;
// Gibt es ueberhaupt etwas auszugeben?
if( !aURL.Len() && !bEvents && !rINetFmt.GetName().Len() )
@@ -3056,7 +3056,7 @@ Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, BOOL bOn )
// Tag aus? Dann nur ein </A> ausgeben.
if( !bOn )
{
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_anchor, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_anchor, sal_False );
return rWrt;
}
@@ -3068,7 +3068,7 @@ Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, BOOL bOn )
const SwCharFmt* pFmt = rWrt.pDoc->GetCharFmtFromPool(
RES_POOLCHR_INET_NORMAL );
SwHTMLFmtInfo aFmtInfo( pFmt );
- USHORT nPos;
+ sal_uInt16 nPos;
if( rHTMLWrt.aChrFmtInfos.Seek_Entry( &aFmtInfo, &nPos ) )
{
bScriptDependent = rHTMLWrt.aChrFmtInfos[nPos]->bScriptDependent;
@@ -3079,7 +3079,7 @@ Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, BOOL bOn )
const SwCharFmt* pFmt = rWrt.pDoc->GetCharFmtFromPool(
RES_POOLCHR_INET_VISIT );
SwHTMLFmtInfo aFmtInfo( pFmt );
- USHORT nPos;
+ sal_uInt16 nPos;
if( rHTMLWrt.aChrFmtInfos.Seek_Entry( &aFmtInfo, &nPos ) )
{
bScriptDependent = rHTMLWrt.aChrFmtInfos[nPos]->bScriptDependent;
@@ -3177,11 +3177,11 @@ static Writer& OutHTML_SwFmtINetFmt( Writer& rWrt, const SfxPoolItem& rHt )
{
SwFmtINetFmt *pINetFmt =
rHTMLWrt.aINetFmts[ rHTMLWrt.aINetFmts.Count()-1 ];
- OutHTML_INetFmt( rWrt, *pINetFmt, FALSE );
+ OutHTML_INetFmt( rWrt, *pINetFmt, sal_False );
}
// jetzt das neue aufmachen
- OutHTML_INetFmt( rWrt, rINetFmt, TRUE );
+ OutHTML_INetFmt( rWrt, rINetFmt, sal_True );
// und merken
const SwFmtINetFmt *pINetFmt = new SwFmtINetFmt( rINetFmt );
@@ -3191,7 +3191,7 @@ static Writer& OutHTML_SwFmtINetFmt( Writer& rWrt, const SfxPoolItem& rHt )
else
{
// das
- OutHTML_INetFmt( rWrt, rINetFmt, FALSE );
+ OutHTML_INetFmt( rWrt, rINetFmt, sal_False );
OSL_ENSURE( rHTMLWrt.aINetFmts.Count(), "da fehlt doch ein URL-Attribut" );
if( rHTMLWrt.aINetFmts.Count() )
@@ -3210,7 +3210,7 @@ static Writer& OutHTML_SwFmtINetFmt( Writer& rWrt, const SfxPoolItem& rHt )
// werden muss
SwFmtINetFmt *pINetFmt =
rHTMLWrt.aINetFmts[ rHTMLWrt.aINetFmts.Count()-1 ];
- OutHTML_INetFmt( rWrt, *pINetFmt, TRUE );
+ OutHTML_INetFmt( rWrt, *pINetFmt, sal_True );
}
}
@@ -3232,7 +3232,7 @@ static Writer& OutHTML_SwTxtCharFmt( Writer& rWrt, const SfxPoolItem& rHt )
}
SwHTMLFmtInfo aFmtInfo( pFmt );
- USHORT nPos;
+ sal_uInt16 nPos;
if( !rHTMLWrt.aChrFmtInfos.Seek_Entry( &aFmtInfo, &nPos ) )
return rWrt;
@@ -3281,7 +3281,7 @@ static Writer& OutHTML_SwTxtCharFmt( Writer& rWrt, const SfxPoolItem& rHt )
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(),
pFmtInfo->aToken.Len() ? pFmtInfo->aToken.GetBuffer()
: OOO_STRING_SVTOOLS_HTML_span,
- FALSE );
+ sal_False );
}
return rWrt;
diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx
index b0db17a7da3c..339b4da73042 100644
--- a/sw/source/filter/html/htmlbas.cxx
+++ b/sw/source/filter/html/htmlbas.cxx
@@ -81,26 +81,26 @@ void SwHTMLParser::NewScript()
if( aScriptURL.Len() )
{
// Den Inhalt des Script-Tags ignorieren
- bIgnoreRawData = TRUE;
+ bIgnoreRawData = sal_True;
}
}
void SwHTMLParser::EndScript()
{
- BOOL bInsIntoBasic = FALSE,
- bInsSrcIntoFld = FALSE;
+ sal_Bool bInsIntoBasic = sal_False,
+ bInsSrcIntoFld = sal_False;
switch( eScriptLang )
{
case HTML_SL_STARBASIC:
- bInsIntoBasic = TRUE;
+ bInsIntoBasic = sal_True;
break;
default:
- bInsSrcIntoFld = TRUE;
+ bInsSrcIntoFld = sal_True;
break;
}
- bIgnoreRawData = FALSE;
+ bIgnoreRawData = sal_False;
aScriptSource.ConvertLineEnd();
// Ausser StarBasic und unbenutzem JavaScript jedes Script oder den
@@ -122,7 +122,7 @@ void SwHTMLParser::EndScript()
{
// Fuer JavaScript und StarBasic noch ein Basic-Modul anlegen
// Das Basic entfernt natuerlich weiterhin keine SGML-Kommentare
- RemoveSGMLComment( aScriptSource, TRUE );
+ RemoveSGMLComment( aScriptSource, sal_True );
// get library name
::rtl::OUString aLibName;
@@ -154,7 +154,7 @@ void SwHTMLParser::EndScript()
if( !aBasicModule.Len() )
{
// create module name
- BOOL bFound = TRUE;
+ sal_Bool bFound = sal_True;
while( bFound )
{
aBasicModule.AssignAscii( "Modul" );
@@ -268,8 +268,7 @@ void SwHTMLParser::InsertBasicDocEvent( rtl::OUString aEvent, const String& rNam
rtl::OUString aEventName;
- SfxEventConfiguration* pECfg = SFX_APP()->GetEventConfig();
- pECfg->ConfigureEvent( aEvent, SvxMacro( sEvent, sScriptType, eScrType ),
+ SfxEventConfiguration::ConfigureEvent( aEvent, SvxMacro( sEvent, sScriptType, eScrType ),
pDocSh );
}
@@ -278,26 +277,23 @@ void SwHTMLWriter::OutBasic()
if( !bCfgStarBasic )
return;
- SFX_APP()->EnterBasicCall();
-
BasicManager *pBasicMan = pDoc->GetDocShell()->GetBasicManager();
OSL_ENSURE( pBasicMan, "Wo ist der Basic-Manager?" );
// nur das DocumentBasic schreiben
if( !pBasicMan || pBasicMan == SFX_APP()->GetBasicManager() )
{
- SFX_APP()->LeaveBasicCall();
return;
}
// und jetzt alle StarBasic-Module und alle unbenutzen JavaSrript-Module
// ausgeben
- for( USHORT i=0; i<pBasicMan->GetLibCount(); i++ )
+ for( sal_uInt16 i=0; i<pBasicMan->GetLibCount(); i++ )
{
StarBASIC *pBasic = pBasicMan->GetLib( i );
const String& rLibName = pBasic->GetName();
SbxArray *pModules = pBasic->GetModules();
- for( USHORT j=0; j<pModules->Count(); j++ )
+ for( sal_uInt16 j=0; j<pModules->Count(); j++ )
{
const SbModule *pModule = PTR_CAST( SbModule, pModules->Get(j) );
OSL_ENSURE( pModule, "Wo ist das Modul?" );
@@ -332,8 +328,6 @@ void SwHTMLWriter::OutBasic()
eDestEnc, &aNonConvertableCharacters );
}
}
-
- SFX_APP()->LeaveBasicCall();
}
static const char* aEventNames[] =
@@ -353,7 +347,7 @@ void SwHTMLWriter::OutBasicBodyEvents()
uno::Reference < container::XNameReplace > xEvents = xSup->getEvents();
for ( sal_Int32 i=0; i<4; i++ )
{
- SvxMacro* pMacro = SfxEventConfiguration::ConvertToMacro( xEvents->getByName( ::rtl::OUString::createFromAscii(aEventNames[i]) ), pDocSh, TRUE );
+ SvxMacro* pMacro = SfxEventConfiguration::ConvertToMacro( xEvents->getByName( ::rtl::OUString::createFromAscii(aEventNames[i]) ), pDocSh, sal_True );
if ( pMacro )
pDocTable->Insert( aBodyEventTable[i].nEvent, pMacro );
}
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 91d535cf24c6..a8b8d5b03411 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -89,9 +89,9 @@ void lcl_swcss1_setEncoding( SwFmt& rFmt, rtl_TextEncoding eEnc );
// Implementierung des SwCSS1Parsers (eigentlich swcss1.cxx)
static struct SwCSS1ItemIds
{
- USHORT nFmtBreak;
- USHORT nFmtPageDesc;
- USHORT nFmtKeep;
+ sal_uInt16 nFmtBreak;
+ sal_uInt16 nFmtPageDesc;
+ sal_uInt16 nFmtKeep;
SwCSS1ItemIds() :
nFmtBreak( RES_BREAK ),
@@ -104,8 +104,8 @@ static struct SwCSS1ItemIds
void SwCSS1Parser::ChgPageDesc( const SwPageDesc *pPageDesc,
const SwPageDesc& rNewPageDesc )
{
- USHORT nPageDescs = pDoc->GetPageDescCnt();
- USHORT i;
+ sal_uInt16 nPageDescs = pDoc->GetPageDescCnt();
+ sal_uInt16 i;
for( i=0; i<nPageDescs; i++ )
if( pPageDesc == &(const_cast<const SwDoc *>(pDoc)->GetPageDesc(i)) )
{
@@ -116,22 +116,22 @@ void SwCSS1Parser::ChgPageDesc( const SwPageDesc *pPageDesc,
OSL_ENSURE( i<nPageDescs, "Seitenvorlage nicht gefunden" );
}
-SwCSS1Parser::SwCSS1Parser( SwDoc *pD, sal_uInt32 aFHeights[7], const String& rBaseURL, BOOL bNewDoc ) :
+SwCSS1Parser::SwCSS1Parser( SwDoc *pD, sal_uInt32 aFHeights[7], const String& rBaseURL, sal_Bool bNewDoc ) :
SvxCSS1Parser( pD->GetAttrPool(), rBaseURL, MM50/2,
- (USHORT*)&aItemIds, sizeof(aItemIds) / sizeof(USHORT) ),
+ (sal_uInt16*)&aItemIds, sizeof(aItemIds) / sizeof(sal_uInt16) ),
pDoc( pD ),
nDropCapCnt( 0 ),
bIsNewDoc( bNewDoc ),
- bBodyBGColorSet( FALSE ),
- bBodyBackgroundSet( FALSE ),
- bBodyTextSet( FALSE ),
- bBodyLinkSet( FALSE ),
- bBodyVLinkSet( FALSE ),
- bSetFirstPageDesc( FALSE ),
- bSetRightPageDesc( FALSE ),
- bTableHeaderTxtCollSet( FALSE ),
- bTableTxtCollSet( FALSE ),
- bLinkCharFmtsSet( FALSE )
+ bBodyBGColorSet( sal_False ),
+ bBodyBackgroundSet( sal_False ),
+ bBodyTextSet( sal_False ),
+ bBodyLinkSet( sal_False ),
+ bBodyVLinkSet( sal_False ),
+ bSetFirstPageDesc( sal_False ),
+ bSetRightPageDesc( sal_False ),
+ bTableHeaderTxtCollSet( sal_False ),
+ bTableTxtCollSet( sal_False ),
+ bLinkCharFmtsSet( sal_False )
{
aFontHeights[0] = aFHeights[0];
aFontHeights[1] = aFHeights[1];
@@ -150,29 +150,29 @@ SwCSS1Parser::~SwCSS1Parser()
/* */
// Feature: PrintExt
-BOOL SwCSS1Parser::SetFmtBreak( SfxItemSet& rItemSet,
+sal_Bool SwCSS1Parser::SetFmtBreak( SfxItemSet& rItemSet,
const SvxCSS1PropertyInfo& rPropInfo )
{
SvxBreak eBreak = SVX_BREAK_NONE;
- BOOL bKeep = FALSE;
- BOOL bSetKeep = FALSE, bSetBreak = FALSE, bSetPageDesc = FALSE;
+ sal_Bool bKeep = sal_False;
+ sal_Bool bSetKeep = sal_False, bSetBreak = sal_False, bSetPageDesc = sal_False;
const SwPageDesc *pPageDesc = 0;
switch( rPropInfo.ePageBreakBefore )
{
case SVX_CSS1_PBREAK_ALWAYS:
eBreak = SVX_BREAK_PAGE_BEFORE;
- bSetBreak = TRUE;
+ bSetBreak = sal_True;
break;
case SVX_CSS1_PBREAK_LEFT:
- pPageDesc = GetLeftPageDesc( TRUE );
- bSetPageDesc = TRUE;
+ pPageDesc = GetLeftPageDesc( sal_True );
+ bSetPageDesc = sal_True;
break;
case SVX_CSS1_PBREAK_RIGHT:
- pPageDesc = GetRightPageDesc( TRUE );
- bSetPageDesc = TRUE;
+ pPageDesc = GetRightPageDesc( sal_True );
+ bSetPageDesc = sal_True;
break;
case SVX_CSS1_PBREAK_AUTO:
- bSetBreak = bSetPageDesc = TRUE;
+ bSetBreak = bSetPageDesc = sal_True;
break;
default:
;
@@ -184,13 +184,13 @@ BOOL SwCSS1Parser::SetFmtBreak( SfxItemSet& rItemSet,
case SVX_CSS1_PBREAK_RIGHT:
// LEFT/RIGHT koennte man auch am Absatz davor setzen
eBreak = SVX_BREAK_PAGE_AFTER;
- bSetBreak = TRUE;
+ bSetBreak = sal_True;
break;
case SVX_CSS1_PBREAK_AUTO:
- bSetBreak = bSetKeep = bSetPageDesc = TRUE;
+ bSetBreak = bSetKeep = bSetPageDesc = sal_True;
break;
case SVX_CSS1_PBREAK_AVOID:
- bKeep = bSetKeep = TRUE;
+ bKeep = bSetKeep = sal_True;
break;
default:
;
@@ -210,11 +210,11 @@ BOOL SwCSS1Parser::SetFmtBreak( SfxItemSet& rItemSet,
static void SetCharFmtAttrs( SwCharFmt *pCharFmt, SfxItemSet& rItemSet )
{
const SfxPoolItem *pItem;
- static USHORT aWhichIds[3] = { RES_CHRATR_FONTSIZE,RES_CHRATR_CJK_FONTSIZE,
+ static sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONTSIZE,RES_CHRATR_CJK_FONTSIZE,
RES_CHRATR_CTL_FONTSIZE };
- for( USHORT i=0; i<3; i++ )
+ for( sal_uInt16 i=0; i<3; i++ )
{
- if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], sal_False,
&pItem ) &&
((const SvxFontHeightItem *)pItem)->GetProp() != 100)
{
@@ -225,7 +225,7 @@ static void SetCharFmtAttrs( SwCharFmt *pCharFmt, SfxItemSet& rItemSet )
pCharFmt->SetFmtAttr( rItemSet );
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, sal_False, &pItem ) )
{
// Ein Brush-Item mit RES_BACKGROUND muss noch in eines mit
// RES_CHRATR_BACKGROUND gewandelt werden
@@ -246,8 +246,8 @@ void SwCSS1Parser::SetLinkCharFmts()
if( pStyleEntry )
{
SfxItemSet& rItemSet = pStyleEntry->GetItemSet();
- BOOL bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
- FALSE));
+ sal_Bool bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
+ sal_False));
pUnvisited = GetCharFmtFromPool( RES_POOLCHR_INET_NORMAL );
SetCharFmtAttrs( pUnvisited, rItemSet );
bBodyLinkSet |= bColorSet;
@@ -264,8 +264,8 @@ void SwCSS1Parser::SetLinkCharFmts()
if( pStyleEntry )
{
SfxItemSet& rItemSet = pStyleEntry->GetItemSet();
- BOOL bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
- FALSE));
+ sal_Bool bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
+ sal_False));
if( !pUnvisited )
pUnvisited = GetCharFmtFromPool( RES_POOLCHR_INET_NORMAL );
SetCharFmtAttrs( pUnvisited, rItemSet );
@@ -279,15 +279,15 @@ void SwCSS1Parser::SetLinkCharFmts()
if( pStyleEntry )
{
SfxItemSet& rItemSet = pStyleEntry->GetItemSet();
- BOOL bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
- FALSE));
+ sal_Bool bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
+ sal_False));
if( !pVisited )
pVisited = GetCharFmtFromPool( RES_POOLCHR_INET_VISIT );
SetCharFmtAttrs( pVisited, rItemSet );
bBodyVLinkSet |= bColorSet;
}
- bLinkCharFmtsSet = TRUE;
+ bLinkCharFmtsSet = sal_True;
}
static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet,
@@ -302,8 +302,8 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet,
rPropInfo.bTextIndent) &&
(!rPropInfo.bLeftMargin || !rPropInfo.bRightMargin ||
!rPropInfo.bTextIndent) &&
- SFX_ITEM_SET == rCollItemSet.GetItemState(RES_LR_SPACE,TRUE,&pCollItem) &&
- SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,FALSE,&pItem) )
+ SFX_ITEM_SET == rCollItemSet.GetItemState(RES_LR_SPACE,sal_True,&pCollItem) &&
+ SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,sal_False,&pItem) )
{
const SvxLRSpaceItem *pLRItem = (const SvxLRSpaceItem *)pItem;
@@ -321,9 +321,9 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet,
// oberer und unterer Rand
if( (rPropInfo.bTopMargin || rPropInfo.bBottomMargin) &&
(!rPropInfo.bTopMargin || !rPropInfo.bBottomMargin) &&
- SFX_ITEM_SET == rCollItemSet.GetItemState(RES_UL_SPACE,TRUE,
+ SFX_ITEM_SET == rCollItemSet.GetItemState(RES_UL_SPACE,sal_True,
&pCollItem) &&
- SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,FALSE,&pItem) )
+ SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,sal_False,&pItem) )
{
const SvxULSpaceItem *pULItem = (const SvxULSpaceItem *)pItem;
@@ -336,11 +336,11 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet,
rItemSet.Put( aULItem );
}
- static USHORT aWhichIds[3] = { RES_CHRATR_FONTSIZE,RES_CHRATR_CJK_FONTSIZE,
+ static sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONTSIZE,RES_CHRATR_CJK_FONTSIZE,
RES_CHRATR_CTL_FONTSIZE };
- for( USHORT i=0; i<3; i++ )
+ for( sal_uInt16 i=0; i<3; i++ )
{
- if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], sal_False,
&pItem ) &&
((const SvxFontHeightItem *)pItem)->GetProp() != 100)
{
@@ -356,12 +356,12 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet,
pColl->SetFmtAttr( rItemSet );
}
-void SwCSS1Parser::SetTableTxtColl( BOOL bHeader )
+void SwCSS1Parser::SetTableTxtColl( sal_Bool bHeader )
{
OSL_ENSURE( !(bHeader ? bTableHeaderTxtCollSet : bTableTxtCollSet),
"Aufruf von SetTableTxtColl unnoetig" );
- USHORT nPoolId;
+ sal_uInt16 nPoolId;
String sTag;
if( bHeader )
{
@@ -398,9 +398,9 @@ void SwCSS1Parser::SetTableTxtColl( BOOL bHeader )
}
if( bHeader )
- bTableHeaderTxtCollSet = TRUE;
+ bTableHeaderTxtCollSet = sal_True;
else
- bTableTxtCollSet = TRUE;
+ bTableTxtCollSet = sal_True;
}
void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush,
@@ -409,54 +409,54 @@ void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush,
SvxBrushItem aBrushItem( RES_BACKGROUND );
SvxBoxItem aBoxItem( RES_BOX );
SvxFrameDirectionItem aFrmDirItem(FRMDIR_ENVIRONMENT, RES_FRAMEDIR);
- BOOL bSetBrush = pBrush!=0, bSetBox = FALSE, bSetFrmDir = FALSE;
+ sal_Bool bSetBrush = pBrush!=0, bSetBox = sal_False, bSetFrmDir = sal_False;
if( pBrush )
aBrushItem = *pBrush;
if( pItemSet2 )
{
const SfxPoolItem *pItem = 0;
- if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BACKGROUND, FALSE,
+ if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BACKGROUND, sal_False,
&pItem ) )
{
// ein Hintergrund wird gesetzt
aBrushItem = *((const SvxBrushItem *)pItem);
pItemSet2->ClearItem( RES_BACKGROUND );
- bSetBrush = TRUE;
+ bSetBrush = sal_True;
}
- if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BOX, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BOX, sal_False, &pItem ) )
{
// eine Umrandung wird gesetzt
aBoxItem = *((const SvxBoxItem *)pItem);
pItemSet2->ClearItem( RES_BOX );
- bSetBox = TRUE;
+ bSetBox = sal_True;
}
- if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BOX, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BOX, sal_False, &pItem ) )
{
// eine Umrandung wird gesetzt
aBoxItem = *((const SvxBoxItem *)pItem);
pItemSet2->ClearItem( RES_BOX );
- bSetBox = TRUE;
+ bSetBox = sal_True;
}
- if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_FRAMEDIR, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_FRAMEDIR, sal_False, &pItem ) )
{
// eine Umrandung wird gesetzt
aFrmDirItem = *static_cast< const SvxFrameDirectionItem *>( pItem );
pItemSet2->ClearItem( RES_FRAMEDIR );
- bSetFrmDir = TRUE;
+ bSetFrmDir = sal_True;
}
}
if( bSetBrush || bSetBox || bSetFrmDir )
{
- static USHORT aPoolIds[] = { RES_POOLPAGE_HTML, RES_POOLPAGE_FIRST,
+ static sal_uInt16 aPoolIds[] = { RES_POOLPAGE_HTML, RES_POOLPAGE_FIRST,
RES_POOLPAGE_LEFT, RES_POOLPAGE_RIGHT };
- for( USHORT i=0; i<4; i++ )
+ for( sal_uInt16 i=0; i<4; i++ )
{
- const SwPageDesc *pPageDesc = GetPageDesc( aPoolIds[i], FALSE );
+ const SwPageDesc *pPageDesc = GetPageDesc( aPoolIds[i], sal_False );
if( pPageDesc )
{
SwPageDesc aNewPageDesc( *pPageDesc );
@@ -486,15 +486,15 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
SwFrmFmt &rMaster = aNewPageDesc.GetMaster();
const SfxItemSet& rPageItemSet = rMaster.GetAttrSet();
const SfxPoolItem *pPageItem, *pItem;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
// linker, rechter Rand und Erstzeilen-Einzug
if( (rPropInfo.bLeftMargin || rPropInfo.bRightMargin) &&
- SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,FALSE,&pItem) )
+ SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,sal_False,&pItem) )
{
if( (!rPropInfo.bLeftMargin || !rPropInfo.bRightMargin) &&
SFX_ITEM_SET == rPageItemSet.GetItemState(RES_LR_SPACE,
- TRUE,&pPageItem) )
+ sal_True,&pPageItem) )
{
const SvxLRSpaceItem *pLRItem = (const SvxLRSpaceItem *)pItem;
@@ -510,16 +510,16 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
{
rMaster.SetFmtAttr( *pItem );
}
- bChanged = TRUE;
+ bChanged = sal_True;
}
// oberer und unterer Rand
if( (rPropInfo.bTopMargin || rPropInfo.bBottomMargin) &&
- SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,FALSE,&pItem) )
+ SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,sal_False,&pItem) )
{
if( (!rPropInfo.bTopMargin || !rPropInfo.bBottomMargin) &&
SFX_ITEM_SET == rPageItemSet.GetItemState(RES_UL_SPACE,
- TRUE,&pPageItem) )
+ sal_True,&pPageItem) )
{
const SvxULSpaceItem *pULItem = (const SvxULSpaceItem *)pItem;
@@ -535,7 +535,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
{
rMaster.SetFmtAttr( *pItem );
}
- bChanged = TRUE;
+ bChanged = sal_True;
}
// die Groesse
@@ -545,7 +545,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
{
rMaster.SetFmtAttr( SwFmtFrmSize( ATT_FIX_SIZE, rPropInfo.nWidth,
rPropInfo.nHeight ) );
- bChanged = TRUE;
+ bChanged = sal_True;
}
else
{
@@ -554,7 +554,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
// wird das Landscape-Flag gesetzt und evtl. die Breite/Hoehe
// vertauscht.
SwFmtFrmSize aFrmSz( rMaster.GetFrmSize() );
- BOOL bLandscape = aNewPageDesc.GetLandscape();
+ sal_Bool bLandscape = aNewPageDesc.GetLandscape();
if( ( bLandscape &&
rPropInfo.eSizeType == SVX_CSS1_STYPE_PORTRAIT ) ||
( !bLandscape &&
@@ -565,18 +565,18 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
aFrmSz.SetWidth( nTmp );
rMaster.SetFmtAttr( aFrmSz );
aNewPageDesc.SetLandscape( !bLandscape );
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
}
// Geht das wirklich?
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, sal_False, &pItem ) )
{
// eine Umrandung wird gesetzt
rMaster.SetFmtAttr( *pItem );
rItemSet.ClearItem( RES_BACKGROUND );
- bChanged = TRUE;
+ bChanged = sal_True;
}
if( bChanged )
@@ -671,7 +671,7 @@ static CSS1SelectorType GetTokenAndClass( const CSS1Selector *pSelector,
return eType;
}
-extern BOOL lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 );
+extern sal_Bool lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 );
static void RemoveScriptItems( SfxItemSet& rItemSet, sal_uInt16 nScript,
const SfxItemSet *pParentItemSet = 0 )
@@ -723,12 +723,12 @@ static void RemoveScriptItems( SfxItemSet& rItemSet, sal_uInt16 nScript,
}
}
-BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
+sal_Bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
SfxItemSet& rItemSet,
SvxCSS1PropertyInfo& rPropInfo )
{
if( !bIsNewDoc )
- return TRUE;
+ return sal_True;
CSS1SelectorType eSelType = pSelector->GetType();
const CSS1Selector *pNext = pSelector->GetNext();
@@ -771,7 +771,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
if( CSS1_SELTYPE_ELEMENT != eSelType &&
CSS1_SELTYPE_ELEM_CLASS != eSelType)
- return TRUE;
+ return sal_True;
// Token und Class zu dem Selektor holen
String aToken2, aClass;
@@ -792,7 +792,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
if( !pNext )
{
InsertTag( aToken2, rItemSet, rPropInfo );
- return FALSE;
+ return sal_False;
}
else if( pNext && CSS1_SELTYPE_PSEUDO == eNextType )
{
@@ -801,19 +801,19 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
String aPseudo( pNext->GetString() );
aPseudo.ToLowerAscii();
- BOOL bInsert = FALSE;
+ sal_Bool bInsert = sal_False;
switch( aPseudo.GetChar( 0 ))
{
case 'l':
if( aPseudo.EqualsAscii(sCSS1_link) )
{
- bInsert = TRUE;
+ bInsert = sal_True;
}
break;
case 'v':
if( aPseudo.EqualsAscii(sCSS1_visited) )
{
- bInsert = TRUE;
+ bInsert = sal_True;
}
break;
}
@@ -831,7 +831,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
{
InsertTag( sTmp, rItemSet, rPropInfo );
}
- return FALSE;
+ return sal_False;
}
}
break;
@@ -843,16 +843,16 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
// Den Hintergrund muessen wir vor dem Setzen abfragen,
// denn in SetPageDescAttrs wird er geloescht.
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET==rItemSet.GetItemState(RES_BACKGROUND,FALSE,&pItem) )
+ if( SFX_ITEM_SET==rItemSet.GetItemState(RES_BACKGROUND,sal_False,&pItem) )
{
const SvxBrushItem *pBrushItem =
(const SvxBrushItem *)pItem;
/// Body has a background color, if it is not "no fill"/"auto fill"
if( pBrushItem->GetColor() != COL_TRANSPARENT )
- bBodyBGColorSet = TRUE;
+ bBodyBGColorSet = sal_True;
if( GPOS_NONE != pBrushItem->GetGraphicPos() )
- bBodyBackgroundSet = TRUE;
+ bBodyBackgroundSet = sal_True;
}
// Border and Padding
@@ -864,13 +864,13 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
// alle noch uebrigen Optionen koennen an der Standard-Vorlage
// gesetzt werden und gelten dann automatisch als defaults
- if( SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,FALSE) )
- bBodyTextSet = TRUE;
+ if( SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,sal_False) )
+ bBodyTextSet = sal_True;
SetTxtCollAttrs(
GetTxtCollFromPool( RES_POOLCOLL_STANDARD ),
rItemSet, rPropInfo, this );
- return FALSE;
+ return sal_False;
}
break;
}
@@ -879,7 +879,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
!pNext && aClass.Len() >= 9 &&
('s' == aClass.GetChar(0) || 'S' == aClass.GetChar(0)) )
{
- USHORT nPoolFmtId = 0;
+ sal_uInt16 nPoolFmtId = 0;
if( aClass.EqualsIgnoreCaseAscii(OOO_STRING_SVTOOLS_HTML_sdendnote_sym) )
nPoolFmtId = RES_POOLCHR_ENDNOTE;
else if( aClass.EqualsIgnoreCaseAscii(OOO_STRING_SVTOOLS_HTML_sdfootnote_sym) )
@@ -897,13 +897,13 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
SetCharFmtAttrs( GetCharFmtFromPool(nPoolFmtId),
aScriptItemSet);
}
- return FALSE;
+ return sal_False;
}
}
// Jetzt werden die Selektoren verarbeitet, die zu einer Absatz-Vorlage
// gehoehren
- USHORT nPoolCollId = 0;
+ sal_uInt16 nPoolCollId = 0;
switch( nToken2 )
{
case HTML_HEAD1_ON:
@@ -963,7 +963,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
if( CSS1_SELTYPE_ELEMENT==eSelType && !pNext )
{
InsertTag( aToken2, rItemSet, rPropInfo );
- return FALSE;
+ return sal_False;
}
else if( CSS1_SELTYPE_ELEMENT==eSelType && pNext &&
(CSS1_SELTYPE_ELEMENT==eNextType ||
@@ -980,7 +980,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
if( aClass.Len() || pNext )
{
- nPoolCollId = static_cast< USHORT >(
+ nPoolCollId = static_cast< sal_uInt16 >(
HTML_TABLEHEADER_ON == nToken2 ? RES_POOLCOLL_TABLE_HDLN
: RES_POOLCOLL_TABLE );
}
@@ -1001,7 +1001,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
InsertTag( sTmp, aScriptItemSet, rPropInfo );
}
- return FALSE;
+ return sal_False;
}
}
}
@@ -1040,7 +1040,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
const SfxPoolItem *pItem;
const SvxBoxItem *pBoxItem = 0;
if( SFX_ITEM_SET ==
- pColl->GetAttrSet().GetItemState(RES_BOX,TRUE,&pItem) )
+ pColl->GetAttrSet().GetItemState(RES_BOX,sal_True,&pItem) )
pBoxItem = (const SvxBoxItem *)pItem;
rPropInfo.SetBoxItem( rItemSet, MIN_BORDER_DIST, pBoxItem );
if( CSS1_SCRIPT_ALL == nScript && !pParentColl )
@@ -1105,18 +1105,18 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
}
}
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// Jetzt werden die Selektoten verarbeitet, die zu einer Zechenvorlage
// gehoehren. Zusammengesetzte gibt es hier allerdings nich nicht.
if( pNext )
- return TRUE;
+ return sal_True;
- SwCharFmt *pCFmt = GetChrFmt( static_cast< USHORT >(nToken2), aEmptyStr );
+ SwCharFmt *pCFmt = GetChrFmt( static_cast< sal_uInt16 >(nToken2), aEmptyStr );
if( pCFmt )
{
SwCharFmt *pParentCFmt = 0;
@@ -1130,7 +1130,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
if( !pCFmt )
{
pCFmt = pDoc->MakeCharFmt( aName, pParentCFmt );
- pCFmt->SetAuto( FALSE );
+ pCFmt->SetAuto( sal_False );
}
}
@@ -1145,13 +1145,13 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
pParentCFmt ? &pParentCFmt->GetAttrSet() : 0 );
SetCharFmtAttrs( pCFmt, aScriptItemSet );
}
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
-sal_uInt32 SwCSS1Parser::GetFontHeight( USHORT nSize ) const
+sal_uInt32 SwCSS1Parser::GetFontHeight( sal_uInt16 nSize ) const
{
return aFontHeights[ nSize>6 ? 6 : nSize ];
}
@@ -1173,10 +1173,10 @@ const FontList *SwCSS1Parser::GetFontList() const
/* */
-SwCharFmt* SwCSS1Parser::GetChrFmt( USHORT nToken2, const String& rClass ) const
+SwCharFmt* SwCSS1Parser::GetChrFmt( sal_uInt16 nToken2, const String& rClass ) const
{
// die entsprechende Vorlage suchen
- USHORT nPoolId = 0;
+ sal_uInt16 nPoolId = 0;
const sal_Char* sName = 0;
switch( nToken2 )
{
@@ -1217,7 +1217,7 @@ SwCharFmt* SwCSS1Parser::GetChrFmt( USHORT nToken2, const String& rClass ) const
if( !pCFmt )
{
pCFmt = pDoc->MakeCharFmt( sCName, pDoc->GetDfltCharFmt() );
- pCFmt->SetAuto( FALSE );
+ pCFmt->SetAuto( sal_False );
}
}
@@ -1242,7 +1242,7 @@ SwCharFmt* SwCSS1Parser::GetChrFmt( USHORT nToken2, const String& rClass ) const
if( pClass )
{
pCFmt = pDoc->MakeCharFmt( aTmp, pCFmt );
- pCFmt->SetAuto( FALSE );
+ pCFmt->SetAuto( sal_False );
SfxItemSet aItemSet( pClass->GetItemSet() );
SetCharFmtAttrs( pCFmt, aItemSet );
}
@@ -1255,16 +1255,16 @@ SwCharFmt* SwCSS1Parser::GetChrFmt( USHORT nToken2, const String& rClass ) const
/* */
-SwTxtFmtColl *SwCSS1Parser::GetTxtCollFromPool( USHORT nPoolId ) const
+SwTxtFmtColl *SwCSS1Parser::GetTxtCollFromPool( sal_uInt16 nPoolId ) const
{
- USHORT nOldArrLen = pDoc->GetTxtFmtColls()->Count();
+ sal_uInt16 nOldArrLen = pDoc->GetTxtFmtColls()->Count();
SwTxtFmtColl *pColl = pDoc->GetTxtCollFromPool( nPoolId, false );
if( bIsNewDoc )
{
- USHORT nArrLen = pDoc->GetTxtFmtColls()->Count();
- for( USHORT i=nOldArrLen; i<nArrLen; i++ )
+ sal_uInt16 nArrLen = pDoc->GetTxtFmtColls()->Count();
+ for( sal_uInt16 i=nOldArrLen; i<nArrLen; i++ )
lcl_swcss1_setEncoding( *(*pDoc->GetTxtFmtColls())[i],
GetDfltEncoding() );
}
@@ -1272,17 +1272,17 @@ SwTxtFmtColl *SwCSS1Parser::GetTxtCollFromPool( USHORT nPoolId ) const
return pColl;
}
-SwCharFmt *SwCSS1Parser::GetCharFmtFromPool( USHORT nPoolId ) const
+SwCharFmt *SwCSS1Parser::GetCharFmtFromPool( sal_uInt16 nPoolId ) const
{
- USHORT nOldArrLen = pDoc->GetCharFmts()->Count();
+ sal_uInt16 nOldArrLen = pDoc->GetCharFmts()->Count();
SwCharFmt *pCharFmt = pDoc->GetCharFmtFromPool( nPoolId );
if( bIsNewDoc )
{
- USHORT nArrLen = pDoc->GetCharFmts()->Count();
+ sal_uInt16 nArrLen = pDoc->GetCharFmts()->Count();
- for( USHORT i=nOldArrLen; i<nArrLen; i++ )
+ for( sal_uInt16 i=nOldArrLen; i<nArrLen; i++ )
lcl_swcss1_setEncoding( *(*pDoc->GetCharFmts())[i],
GetDfltEncoding() );
}
@@ -1290,7 +1290,7 @@ SwCharFmt *SwCSS1Parser::GetCharFmtFromPool( USHORT nPoolId ) const
return pCharFmt;
}
-SwTxtFmtColl *SwCSS1Parser::GetTxtFmtColl( USHORT nTxtColl,
+SwTxtFmtColl *SwCSS1Parser::GetTxtFmtColl( sal_uInt16 nTxtColl,
const String& rClass )
{
SwTxtFmtColl* pColl = 0;
@@ -1357,7 +1357,7 @@ SwTxtFmtColl *SwCSS1Parser::GetTxtFmtColl( USHORT nTxtColl,
SfxItemSet aItemSet( pClass->GetItemSet() );
SvxCSS1PropertyInfo aPropInfo( pClass->GetPropertyInfo() );
aPropInfo.SetBoxItem( aItemSet, MIN_BORDER_DIST );
- BOOL bPositioned = MayBePositioned( pClass->GetPropertyInfo() );
+ sal_Bool bPositioned = MayBePositioned( pClass->GetPropertyInfo() );
if( bPositioned )
aItemSet.ClearItem( RES_BACKGROUND );
SetTxtCollAttrs( pColl, aItemSet, aPropInfo,
@@ -1378,9 +1378,9 @@ SwPageDesc *SwCSS1Parser::GetMasterPageDesc()
return pDoc->GetPageDescFromPool( RES_POOLPAGE_HTML, false );
}
-static SwPageDesc *FindPageDesc( SwDoc *pDoc, USHORT nPoolId, USHORT& rPage )
+static SwPageDesc *FindPageDesc( SwDoc *pDoc, sal_uInt16 nPoolId, sal_uInt16& rPage )
{
- USHORT nPageDescs = pDoc->GetPageDescCnt();
+ sal_uInt16 nPageDescs = pDoc->GetPageDescCnt();
for( rPage=0; rPage < nPageDescs &&
const_cast<const SwDoc *>(pDoc)->
GetPageDesc(rPage).GetPoolFmtId() != nPoolId; rPage++ )
@@ -1389,12 +1389,12 @@ static SwPageDesc *FindPageDesc( SwDoc *pDoc, USHORT nPoolId, USHORT& rPage )
return rPage < nPageDescs ? &pDoc->_GetPageDesc( rPage ) : 0;
}
-const SwPageDesc *SwCSS1Parser::GetPageDesc( USHORT nPoolId, BOOL bCreate )
+const SwPageDesc *SwCSS1Parser::GetPageDesc( sal_uInt16 nPoolId, sal_Bool bCreate )
{
if( RES_POOLPAGE_HTML == nPoolId )
return pDoc->GetPageDescFromPool( RES_POOLPAGE_HTML, false );
- USHORT nPage;
+ sal_uInt16 nPage;
const SwPageDesc *pPageDesc = FindPageDesc( pDoc, nPoolId, nPage );
if( !pPageDesc && bCreate )
{
@@ -1414,11 +1414,11 @@ const SwPageDesc *SwCSS1Parser::GetPageDesc( USHORT nPoolId, BOOL bCreate )
pPageDesc = FindPageDesc( pDoc, nPoolId, nPage );
OSL_ENSURE( pPageDesc==pNewPageDesc, "Seitenvorlage nicht gefunden" );
- pDoc->CopyPageDesc( *pMasterPageDesc, *pNewPageDesc, FALSE );
+ pDoc->CopyPageDesc( *pMasterPageDesc, *pNewPageDesc, sal_False );
// Die Vorlagen an ihren neuen Zweck anpassen.
const SwPageDesc *pFollow = 0;
- BOOL bSetFollowFollow = FALSE;
+ sal_Bool bSetFollowFollow = sal_False;
switch( nPoolId )
{
case RES_POOLPAGE_FIRST:
@@ -1433,7 +1433,7 @@ const SwPageDesc *SwCSS1Parser::GetPageDesc( USHORT nPoolId, BOOL bCreate )
// Wenn die linke Vorlage schon angelegt ist, passiert hier gar
// nichts. Sonst wird die linke Vorlage angelegt und sorgt auch
// fuer die richtige Verkettung mit der rechten Voralge.
- GetLeftPageDesc( TRUE );
+ GetLeftPageDesc( sal_True );
break;
case RES_POOLPAGE_LEFT:
@@ -1441,8 +1441,8 @@ const SwPageDesc *SwCSS1Parser::GetPageDesc( USHORT nPoolId, BOOL bCreate )
// Es findet aber keine Verkettung statt.
// Wenn schon eine erste Seitenvorlage existiert, wird die linke
// Vorlage die Folge-Vorlage der ersten Seite.
- pFollow = GetRightPageDesc( TRUE );
- bSetFollowFollow = TRUE;
+ pFollow = GetRightPageDesc( sal_True );
+ bSetFollowFollow = sal_True;
{
const SwPageDesc *pFirstPageDesc = GetFirstPageDesc();
if( pFirstPageDesc )
@@ -1475,8 +1475,8 @@ const SwPageDesc *SwCSS1Parser::GetPageDesc( USHORT nPoolId, BOOL bCreate )
}
-BOOL SwCSS1Parser::MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo,
- BOOL bAutoWidth )
+sal_Bool SwCSS1Parser::MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo,
+ sal_Bool bAutoWidth )
{
// abs-pos
// left/top none auto twip perc
@@ -1519,12 +1519,12 @@ void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop,
{
// die Anzahl der Zeilen entspricht in etwa einer %-Angabe
// fuer die Hoehe (was passiert mit absoluten Hoehen???)
- BYTE nLines = rDrop.GetLines();
+ sal_uInt8 nLines = rDrop.GetLines();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_CHRATR_FONTSIZE, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_CHRATR_FONTSIZE, sal_False, &pItem ) )
{
- USHORT nProp = ((const SvxFontHeightItem *)pItem)->GetProp();
- nLines = (BYTE)((nProp + 50) / 100);
+ sal_uInt16 nProp = ((const SvxFontHeightItem *)pItem)->GetProp();
+ nLines = (sal_uInt8)((nProp + 50) / 100);
if( nLines < 1 )
nLines = 1;
else if( nLines > MAX_DROPCAP_LINES )
@@ -1548,9 +1548,9 @@ void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop,
rDrop.GetLines() = nLines;
// ein rechter Rand wird der Abstand zum Text!
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, sal_False, &pItem ) )
{
- rDrop.GetDistance() = static_cast< USHORT >(
+ rDrop.GetDistance() = static_cast< sal_uInt16 >(
((const SvxLRSpaceItem *)pItem)->GetRight() );
rItemSet.ClearItem( RES_LR_SPACE );
}
@@ -1581,7 +1581,7 @@ void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop,
if( !pCFmt )
{
pCFmt = pDoc->MakeCharFmt( aName, pDoc->GetDfltCharFmt() );
- pCFmt->SetAuto( FALSE );
+ pCFmt->SetAuto( sal_False );
}
SetCharFmtAttrs( pCFmt, rItemSet );
@@ -1596,7 +1596,7 @@ void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop,
// CSS1-sezifisches des SwHTMLParsers
-_HTMLAttr **SwHTMLParser::GetAttrTabEntry( USHORT nWhich )
+_HTMLAttr **SwHTMLParser::GetAttrTabEntry( sal_uInt16 nWhich )
{
// den zu dem Item gehoehrenden Tabellen-Eintrag ermitteln ...
_HTMLAttr **ppAttr = 0;
@@ -1724,7 +1724,7 @@ void SwHTMLParser::NewStyle()
String sType;
const HTMLOptions *pOptions2 = GetOptions();
- for( USHORT i = pOptions2->Count(); i; )
+ for( sal_uInt16 i = pOptions2->Count(); i; )
{
const HTMLOption *pOption = (*pOptions2)[--i];
if( HTML_O_TYPE==pOption->GetToken() )
@@ -1737,7 +1737,7 @@ void SwHTMLParser::NewStyle()
void SwHTMLParser::EndStyle()
{
- bIgnoreRawData = FALSE;
+ bIgnoreRawData = sal_False;
if( aStyleSource.Len() )
{
@@ -1746,14 +1746,14 @@ void SwHTMLParser::EndStyle()
}
}
-BOOL SwHTMLParser::FileDownload( const String& rURL,
+sal_Bool SwHTMLParser::FileDownload( const String& rURL,
String& rStr )
{
// View wegschmeissen (wegen Reschedule)
ViewShell *pOldVSh = CallEndAction();
// Ein Medium anlegen
- SfxMedium aDLMedium( rURL, STREAM_READ | STREAM_SHARE_DENYWRITE, FALSE );
+ SfxMedium aDLMedium( rURL, STREAM_READ | STREAM_SHARE_DENYWRITE, sal_False );
// Medium registrieren, damit abgebrochen werden kann
if( pDoc->GetDocShell() )
@@ -1801,7 +1801,7 @@ BOOL SwHTMLParser::FileDownload( const String& rURL,
void SwHTMLParser::InsertLink()
{
- BOOL bFinishDownload = FALSE;
+ sal_Bool bFinishDownload = sal_False;
if( pPendStack )
{
OSL_ENSURE( ShouldFinishFileDownload(),
@@ -1812,14 +1812,14 @@ void SwHTMLParser::InsertLink()
pPendStack = pTmp;
OSL_ENSURE( !pPendStack, "Wo kommt der Pending-Stack her?" );
- bFinishDownload = TRUE;
+ bFinishDownload = sal_True;
}
else
{
String sRel, sHRef, sType;
const HTMLOptions *pOptions2 = GetOptions();
- for( USHORT i = pOptions2->Count(); i; )
+ for( sal_uInt16 i = pOptions2->Count(); i; )
{
const HTMLOption *pOption = (*pOptions2)[--i];
switch( pOption->GetToken() )
@@ -1848,7 +1848,7 @@ void SwHTMLParser::InsertLink()
{
// Der Style wurde synchron geladen und wir koennen
// es direkt aufrufen.
- bFinishDownload = TRUE;
+ bFinishDownload = sal_True;
}
else
{
@@ -1876,15 +1876,15 @@ void SwHTMLParser::InsertLink()
}
}
-BOOL SwCSS1Parser::ParseStyleSheet( const String& rIn )
+sal_Bool SwCSS1Parser::ParseStyleSheet( const String& rIn )
{
if( !SvxCSS1Parser::ParseStyleSheet( rIn ) )
- return FALSE;
+ return sal_False;
SwPageDesc *pMasterPageDesc =
pDoc->GetPageDescFromPool( RES_POOLPAGE_HTML, false );
- SvxCSS1MapEntry *pPageEntry = GetPage( aEmptyStr, FALSE );
+ SvxCSS1MapEntry *pPageEntry = GetPage( aEmptyStr, sal_False );
if( pPageEntry )
{
// @page (wirkt auf alle Seiten, die es schon gibt
@@ -1904,31 +1904,31 @@ BOOL SwCSS1Parser::ParseStyleSheet( const String& rIn )
}
- pPageEntry = GetPage( String::CreateFromAscii(sCSS1_first), TRUE );
+ pPageEntry = GetPage( String::CreateFromAscii(sCSS1_first), sal_True );
if( pPageEntry )
{
- SetPageDescAttrs( GetFirstPageDesc(TRUE), pPageEntry->GetItemSet(),
+ SetPageDescAttrs( GetFirstPageDesc(sal_True), pPageEntry->GetItemSet(),
pPageEntry->GetPropertyInfo() );
- bSetFirstPageDesc = TRUE;
+ bSetFirstPageDesc = sal_True;
}
- pPageEntry = GetPage( String::CreateFromAscii(sCSS1_right), TRUE );
+ pPageEntry = GetPage( String::CreateFromAscii(sCSS1_right), sal_True );
if( pPageEntry )
{
- SetPageDescAttrs( GetRightPageDesc(TRUE), pPageEntry->GetItemSet(),
+ SetPageDescAttrs( GetRightPageDesc(sal_True), pPageEntry->GetItemSet(),
pPageEntry->GetPropertyInfo() );
- bSetRightPageDesc = TRUE;
+ bSetRightPageDesc = sal_True;
}
- pPageEntry = GetPage( String::CreateFromAscii(sCSS1_left), TRUE );
+ pPageEntry = GetPage( String::CreateFromAscii(sCSS1_left), sal_True );
if( pPageEntry )
- SetPageDescAttrs( GetLeftPageDesc(TRUE), pPageEntry->GetItemSet(),
+ SetPageDescAttrs( GetLeftPageDesc(sal_True), pPageEntry->GetItemSet(),
pPageEntry->GetPropertyInfo() );
- return TRUE;
+ return sal_True;
}
-BOOL SwHTMLParser::ParseStyleOptions( const String &rStyle,
+sal_Bool SwHTMLParser::ParseStyleOptions( const String &rStyle,
const String &rId,
const String &rClass,
SfxItemSet &rItemSet,
@@ -1936,7 +1936,7 @@ BOOL SwHTMLParser::ParseStyleOptions( const String &rStyle,
const String *pLang,
const String *pDir )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rClass.Len() )
{
@@ -1947,8 +1947,8 @@ BOOL SwHTMLParser::ParseStyleOptions( const String &rStyle,
{
pCSS1Parser->MergeStyles( pClass->GetItemSet(),
pClass->GetPropertyInfo(),
- rItemSet, rPropInfo, FALSE );
- bRet = TRUE;
+ rItemSet, rPropInfo, sal_False );
+ bRet = sal_True;
}
}
@@ -1960,13 +1960,13 @@ BOOL SwHTMLParser::ParseStyleOptions( const String &rStyle,
pId->GetPropertyInfo(),
rItemSet, rPropInfo, rClass.Len()!=0 );
rPropInfo.aId = rId;
- bRet = TRUE;
+ bRet = sal_True;
}
if( rStyle.Len() )
{
pCSS1Parser->ParseStyleOption( rStyle, rItemSet, rPropInfo );
- bRet = TRUE;
+ bRet = sal_True;
}
if( bRet )
@@ -2030,7 +2030,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/,
// sie nicht schon in einem Rahmen stehen und sonst
// Rahmengebunden.
const SwStartNode *pFlySttNd =
- pDoc->GetNodes()[pPam->GetPoint()->nNode]->FindFlyStartNode();
+ pPam->GetPoint()->nNode.GetNode().FindFlyStartNode();
if( pFlySttNd )
{
aAnchor.SetType( FLY_AT_FLY );
@@ -2090,7 +2090,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/,
if( nCntnt )
pPam->Move( fnMoveForward );
- USHORT nLeftSpace = 0, nRightSpace = 0;
+ sal_uInt16 nLeftSpace = 0, nRightSpace = 0;
short nIndent = 0;
GetMarginsFromContextWithNumBul( nLeftSpace, nRightSpace, nIndent );
@@ -2118,15 +2118,15 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/,
void SwHTMLParser::SetVarSize( SfxItemSet & /*rItemSet*/,
SvxCSS1PropertyInfo &rPropInfo,
SfxItemSet &rFrmItemSet,
- SwTwips nDfltWidth, BYTE nDfltPrcWidth )
+ SwTwips nDfltWidth, sal_uInt8 nDfltPrcWidth )
{
SwFrmSize eSize = ATT_MIN_SIZE;
SwTwips nWidth = nDfltWidth, nHeight = MINFLY;
- BYTE nPrcWidth = nDfltPrcWidth, nPrcHeight = 0;
+ sal_uInt8 nPrcWidth = nDfltPrcWidth, nPrcHeight = 0;
switch( rPropInfo.eWidthType )
{
case SVX_CSS1_LTYPE_PERCENTAGE:
- nPrcWidth = rPropInfo.nWidth > 0 ? (BYTE)rPropInfo.nWidth : 1;
+ nPrcWidth = rPropInfo.nWidth > 0 ? (sal_uInt8)rPropInfo.nWidth : 1;
nWidth = MINFLY;
break;
case SVX_CSS1_LTYPE_TWIP:
@@ -2139,7 +2139,7 @@ void SwHTMLParser::SetVarSize( SfxItemSet & /*rItemSet*/,
switch( rPropInfo.eHeightType )
{
case SVX_CSS1_LTYPE_PERCENTAGE:
- nPrcHeight = rPropInfo.nHeight > 0 ? (BYTE)rPropInfo.nHeight : 1;
+ nPrcHeight = rPropInfo.nHeight > 0 ? (sal_uInt8)rPropInfo.nHeight : 1;
break;
case SVX_CSS1_LTYPE_TWIP:
// Netscape und MS-IE interpretieren die Hoehe regelwiedrig
@@ -2158,12 +2158,12 @@ void SwHTMLParser::SetVarSize( SfxItemSet & /*rItemSet*/,
void SwHTMLParser::SetFrmFmtAttrs( SfxItemSet &rItemSet,
SvxCSS1PropertyInfo & /*rPropInfo*/,
- USHORT nFlags,
+ sal_uInt16 nFlags,
SfxItemSet &rFrmItemSet )
{
const SfxPoolItem *pItem;
if( (nFlags & HTML_FF_BOX) != 0 &&
- SFX_ITEM_SET==rItemSet.GetItemState( RES_BOX, TRUE, &pItem ) )
+ SFX_ITEM_SET==rItemSet.GetItemState( RES_BOX, sal_True, &pItem ) )
{
if( (nFlags & HTML_FF_PADDING) == 0 )
{
@@ -2180,14 +2180,14 @@ void SwHTMLParser::SetFrmFmtAttrs( SfxItemSet &rItemSet,
}
if( (nFlags & HTML_FF_BACKGROUND) != 0 &&
- SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, TRUE, &pItem ) )
+ SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, sal_True, &pItem ) )
{
rFrmItemSet.Put( *pItem );
rItemSet.ClearItem( RES_BACKGROUND );
}
if( (nFlags & HTML_FF_DIRECTION) != 0 &&
- SFX_ITEM_SET==rItemSet.GetItemState( RES_FRAMEDIR, TRUE, &pItem ) )
+ SFX_ITEM_SET==rItemSet.GetItemState( RES_FRAMEDIR, sal_True, &pItem ) )
{
rFrmItemSet.Put( *pItem );
rItemSet.ClearItem( RES_FRAMEDIR );
@@ -2197,23 +2197,23 @@ void SwHTMLParser::SetFrmFmtAttrs( SfxItemSet &rItemSet,
/* */
-_HTMLAttrContext *SwHTMLParser::PopContext( USHORT nToken, USHORT nLimit,
- BOOL bRemove )
+_HTMLAttrContext *SwHTMLParser::PopContext( sal_uInt16 nToken, sal_uInt16 nLimit,
+ sal_Bool bRemove )
{
- USHORT nPos = aContexts.Count();
+ sal_uInt16 nPos = aContexts.Count();
if( nPos <= nContextStMin )
return 0;
- BOOL bFound = 0==nToken;
+ sal_Bool bFound = 0==nToken;
if( nToken )
{
// Stack-Eintrag zu dem Token suchen
while( nPos > nContextStMin )
{
- USHORT nCntxtToken = aContexts[--nPos]->GetToken();
+ sal_uInt16 nCntxtToken = aContexts[--nPos]->GetToken();
if( nCntxtToken == nToken )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
else if( nCntxtToken == nLimit ) // 0 als Token kommt nicht vor
@@ -2238,16 +2238,16 @@ _HTMLAttrContext *SwHTMLParser::PopContext( USHORT nToken, USHORT nLimit,
return pCntxt;
}
-BOOL SwHTMLParser::GetMarginsFromContext( USHORT& nLeft,
- USHORT& nRight,
+sal_Bool SwHTMLParser::GetMarginsFromContext( sal_uInt16& nLeft,
+ sal_uInt16& nRight,
short& nIndent,
- BOOL bIgnoreTopContext ) const
+ sal_Bool bIgnoreTopContext ) const
{
- USHORT nPos = aContexts.Count();
+ sal_uInt16 nPos = aContexts.Count();
if( bIgnoreTopContext )
{
if( !nPos )
- return FALSE;
+ return sal_False;
else
nPos--;
}
@@ -2258,22 +2258,22 @@ BOOL SwHTMLParser::GetMarginsFromContext( USHORT& nLeft,
if( pCntxt->IsLRSpaceChanged() )
{
pCntxt->GetMargins( nLeft, nRight, nIndent );
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
-BOOL SwHTMLParser::GetMarginsFromContextWithNumBul( USHORT& nLeft,
- USHORT& nRight,
+sal_Bool SwHTMLParser::GetMarginsFromContextWithNumBul( sal_uInt16& nLeft,
+ sal_uInt16& nRight,
short& nIndent ) const
{
- BOOL bRet = GetMarginsFromContext( nLeft, nRight, nIndent );
+ sal_Bool bRet = GetMarginsFromContext( nLeft, nRight, nIndent );
const SwHTMLNumRuleInfo& rInfo = ((SwHTMLParser*)this)->GetNumInfo();
if( rInfo.GetDepth() )
{
- BYTE nLevel = (BYTE)( (rInfo.GetDepth() <= MAXLEVEL ? rInfo.GetDepth()
+ sal_uInt8 nLevel = (sal_uInt8)( (rInfo.GetDepth() <= MAXLEVEL ? rInfo.GetDepth()
: MAXLEVEL) - 1 );
const SwNumFmt& rNumFmt = rInfo.GetNumRule()->Get(nLevel);
nLeft = nLeft + rNumFmt.GetAbsLSpace();
@@ -2283,13 +2283,13 @@ BOOL SwHTMLParser::GetMarginsFromContextWithNumBul( USHORT& nLeft,
return bRet;
}
-void SwHTMLParser::GetULSpaceFromContext( USHORT& nUpper,
- USHORT& nLower ) const
+void SwHTMLParser::GetULSpaceFromContext( sal_uInt16& nUpper,
+ sal_uInt16& nLower ) const
{
- USHORT nDfltColl = 0;
+ sal_uInt16 nDfltColl = 0;
String aDfltClass;
- USHORT nPos = aContexts.Count();
+ sal_uInt16 nPos = aContexts.Count();
while( nPos > nContextStAttrMin )
{
const _HTMLAttrContext *pCntxt = aContexts[--nPos];
@@ -2316,10 +2316,10 @@ void SwHTMLParser::GetULSpaceFromContext( USHORT& nUpper,
nLower = rULSpace.GetLower();
}
-void SwHTMLParser::EndContextAttrs( _HTMLAttrContext *pContext, BOOL bRemove )
+void SwHTMLParser::EndContextAttrs( _HTMLAttrContext *pContext, sal_Bool bRemove )
{
_HTMLAttrs &rAttrs = pContext->GetAttrs();
- for( USHORT i=0; i<rAttrs.Count(); i++ )
+ for( sal_uInt16 i=0; i<rAttrs.Count(); i++ )
{
_HTMLAttr *pAttr = rAttrs[i];
@@ -2333,7 +2333,7 @@ void SwHTMLParser::EndContextAttrs( _HTMLAttrContext *pContext, BOOL bRemove )
pAttr->Invalidate();
else if( nChars > MAX_DROPCAP_CHARS )
nChars = MAX_DROPCAP_CHARS;
- ((SwFmtDrop&)pAttr->GetItem()).GetChars() = (BYTE)nChars;
+ ((SwFmtDrop&)pAttr->GetItem()).GetChars() = (sal_uInt8)nChars;
}
EndAttr( pAttr );
@@ -2351,7 +2351,7 @@ void SwHTMLParser::InsertParaAttrs( const SfxItemSet& rItemSet )
while( pItem )
{
// den zu dem Item gehoehrenden Tabellen-Eintrag ermitteln ...
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
_HTMLAttr **ppAttr = GetAttrTabEntry( nWhich );
if( ppAttr )
@@ -2360,7 +2360,7 @@ void SwHTMLParser::InsertParaAttrs( const SfxItemSet& rItemSet )
if( RES_PARATR_BEGIN > nWhich )
(*ppAttr)->SetLikePara();
aParaAttrs.Insert( *ppAttr, aParaAttrs.Count() );
- EndAttr( *ppAttr, 0, FALSE );
+ EndAttr( *ppAttr, 0, sal_False );
}
pItem = aIter.NextItem();
@@ -2373,12 +2373,12 @@ void lcl_swcss1_setEncoding( SwFmt& rFmt, rtl_TextEncoding eEnc )
return;
const SfxItemSet& rItemSet = rFmt.GetAttrSet();
- static USHORT aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT,
+ static sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT,
RES_CHRATR_CTL_FONT };
const SfxPoolItem *pItem;
- for( USHORT i=0; i<3; i++ )
+ for( sal_uInt16 i=0; i<3; i++ )
{
- if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], FALSE,&pItem ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], sal_False,&pItem ) )
{
const SvxFontItem& rFont = *(const SvxFontItem *)pItem;
if( RTL_TEXTENCODING_SYMBOL != rFont.GetCharSet() )
@@ -2399,9 +2399,9 @@ void SwCSS1Parser::SetDfltEncoding( rtl_TextEncoding eEnc )
if( bIsNewDoc )
{
// Set new encoding as pool default
- static USHORT aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT,
+ static sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT,
RES_CHRATR_CTL_FONT };
- USHORT i;
+ sal_uInt16 i;
for( i=0; i<3; i++ )
{
const SvxFontItem& rDfltFont =
@@ -2415,7 +2415,7 @@ void SwCSS1Parser::SetDfltEncoding( rtl_TextEncoding eEnc )
}
// Change all paragraph styles that do specify a font.
- USHORT nArrLen = pDoc->GetTxtFmtColls()->Count();
+ sal_uInt16 nArrLen = pDoc->GetTxtFmtColls()->Count();
for( i=1; i<nArrLen; i++ )
lcl_swcss1_setEncoding( *(*pDoc->GetTxtFmtColls())[i], eEnc );
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index f69256f453c6..3717496db121 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -63,28 +63,28 @@ class _HTMLAttrContext_SaveDoc
// wenn Attributierung nicht
// beibehalten werden soll.
- USHORT nContextStMin; // In Umgebung gueltige Stack-
+ sal_uInt16 nContextStMin; // In Umgebung gueltige Stack-
// Untergrenze, wenn der Stack
// geschuetzt werden soll.
- USHORT nContextStAttrMin; // In Umgebung gueltige Stack-
+ sal_uInt16 nContextStAttrMin; // In Umgebung gueltige Stack-
// Untergrenze, wenn die Attribute
// nicht beibehalten werden sollen.
- BOOL bStripTrailingPara : 1; // letzen Absatz entfernen?
- BOOL bKeepNumRules : 1; // Numerierung beibehalten?
- BOOL bPopStack : 1; // Stack-Elemente oberhalb des
+ sal_Bool bStripTrailingPara : 1; // letzen Absatz entfernen?
+ sal_Bool bKeepNumRules : 1; // Numerierung beibehalten?
+ sal_Bool bPopStack : 1; // Stack-Elemente oberhalb des
// zu schliessenden entfernen?
- BOOL bFixHeaderDist : 1;
- BOOL bFixFooterDist : 1;
+ sal_Bool bFixHeaderDist : 1;
+ sal_Bool bFixFooterDist : 1;
public:
_HTMLAttrContext_SaveDoc() :
pPos( 0 ), pAttrTab( 0 ),
nContextStMin( USHRT_MAX ), nContextStAttrMin( USHRT_MAX ),
- bStripTrailingPara( FALSE ), bKeepNumRules( FALSE ),
- bPopStack( FALSE ),
- bFixHeaderDist( FALSE ), bFixFooterDist( FALSE )
+ bStripTrailingPara( sal_False ), bKeepNumRules( sal_False ),
+ bPopStack( sal_False ),
+ bFixHeaderDist( sal_False ), bFixFooterDist( sal_False )
{}
~_HTMLAttrContext_SaveDoc() { delete pPos; delete pAttrTab; }
@@ -97,28 +97,28 @@ public:
void SetNumInfo( const SwHTMLNumRuleInfo& rInf ) { aNumRuleInfo.Set(rInf); }
const SwHTMLNumRuleInfo& GetNumInfo() const { return aNumRuleInfo; }
- _HTMLAttrTable *GetAttrTab( BOOL bCreate= FALSE );
+ _HTMLAttrTable *GetAttrTab( sal_Bool bCreate= sal_False );
- void SetContextStMin( USHORT nMin ) { nContextStMin = nMin; }
- USHORT GetContextStMin() const { return nContextStMin; }
+ void SetContextStMin( sal_uInt16 nMin ) { nContextStMin = nMin; }
+ sal_uInt16 GetContextStMin() const { return nContextStMin; }
- void SetContextStAttrMin( USHORT nMin ) { nContextStAttrMin = nMin; }
- USHORT GetContextStAttrMin() const { return nContextStAttrMin; }
+ void SetContextStAttrMin( sal_uInt16 nMin ) { nContextStAttrMin = nMin; }
+ sal_uInt16 GetContextStAttrMin() const { return nContextStAttrMin; }
- void SetStripTrailingPara( BOOL bSet ) { bStripTrailingPara = bSet; }
- BOOL GetStripTrailingPara() const { return bStripTrailingPara; }
+ void SetStripTrailingPara( sal_Bool bSet ) { bStripTrailingPara = bSet; }
+ sal_Bool GetStripTrailingPara() const { return bStripTrailingPara; }
- void SetKeepNumRules( BOOL bSet ) { bKeepNumRules = bSet; }
- BOOL GetKeepNumRules() const { return bKeepNumRules; }
+ void SetKeepNumRules( sal_Bool bSet ) { bKeepNumRules = bSet; }
+ sal_Bool GetKeepNumRules() const { return bKeepNumRules; }
- void SetFixHeaderDist( BOOL bSet ) { bFixHeaderDist = bSet; }
- BOOL GetFixHeaderDist() const { return bFixHeaderDist; }
+ void SetFixHeaderDist( sal_Bool bSet ) { bFixHeaderDist = bSet; }
+ sal_Bool GetFixHeaderDist() const { return bFixHeaderDist; }
- void SetFixFooterDist( BOOL bSet ) { bFixFooterDist = bSet; }
- BOOL GetFixFooterDist() const { return bFixFooterDist; }
+ void SetFixFooterDist( sal_Bool bSet ) { bFixFooterDist = bSet; }
+ sal_Bool GetFixFooterDist() const { return bFixFooterDist; }
};
-_HTMLAttrTable *_HTMLAttrContext_SaveDoc::GetAttrTab( BOOL bCreate )
+_HTMLAttrTable *_HTMLAttrContext_SaveDoc::GetAttrTab( sal_Bool bCreate )
{
if( !pAttrTab && bCreate )
{
@@ -130,7 +130,7 @@ _HTMLAttrTable *_HTMLAttrContext_SaveDoc::GetAttrTab( BOOL bCreate )
/* */
-_HTMLAttrContext_SaveDoc *_HTMLAttrContext::GetSaveDocContext( BOOL bCreate )
+_HTMLAttrContext_SaveDoc *_HTMLAttrContext::GetSaveDocContext( sal_Bool bCreate )
{
if( !pSaveDocContext && bCreate )
pSaveDocContext = new _HTMLAttrContext_SaveDoc;
@@ -161,12 +161,12 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
const SwNodeIndex& rNewSttPara = rNewPos.nNode;
xub_StrLen nNewSttCnt = rNewPos.nContent.GetIndex();
- BOOL bMoveBack = FALSE;
+ sal_Bool bMoveBack = sal_False;
// alle noch offenen Attribute beenden und hinter der Tabelle
// neu aufspannen
_HTMLAttr** pTbl = (_HTMLAttr**)&aAttrTab;
- for( USHORT nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
+ for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
nCnt--; ++pTbl )
{
_HTMLAttr *pAttr = *pTbl;
@@ -175,7 +175,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
_HTMLAttr *pNext = pAttr->GetNext();
_HTMLAttr *pPrev = pAttr->GetPrev();
- USHORT nWhich = pAttr->pItem->Which();
+ sal_uInt16 nWhich = pAttr->pItem->Which();
if( !nOldEndCnt && RES_PARATR_BEGIN <= nWhich &&
pAttr->GetSttParaIdx() < pOldEndPara->GetIndex() )
{
@@ -209,7 +209,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
pNext->InsertPrev( pSetAttr );
else
{
- USHORT nTmp =
+ sal_uInt16 nTmp =
pSetAttr->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pSetAttr, nTmp );
}
@@ -223,7 +223,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
pNext->InsertPrev( pPrev );
else
{
- USHORT nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pPrev, nTmp );
}
}
@@ -245,10 +245,10 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
}
void SwHTMLParser::SaveDocContext( _HTMLAttrContext *pCntxt,
- USHORT nFlags,
+ sal_uInt16 nFlags,
const SwPosition *pNewPos )
{
- _HTMLAttrContext_SaveDoc *pSave = pCntxt->GetSaveDocContext( TRUE );
+ _HTMLAttrContext_SaveDoc *pSave = pCntxt->GetSaveDocContext( sal_True );
pSave->SetStripTrailingPara( (HTML_CNTXT_STRIP_PARA & nFlags) != 0 );
pSave->SetKeepNumRules( (HTML_CNTXT_KEEP_NUMRULE & nFlags) != 0 );
pSave->SetFixHeaderDist( (HTML_CNTXT_HEADER_DIST & nFlags) != 0 );
@@ -274,7 +274,7 @@ void SwHTMLParser::SaveDocContext( _HTMLAttrContext *pCntxt,
}
else
{
- _HTMLAttrTable *pSaveAttrTab = pSave->GetAttrTab( TRUE );
+ _HTMLAttrTable *pSaveAttrTab = pSave->GetAttrTab( sal_True );
SaveAttrTab( *pSaveAttrTab );
}
@@ -404,7 +404,7 @@ void SwHTMLParser::EndContext( _HTMLAttrContext *pContext )
void SwHTMLParser::ClearContext( _HTMLAttrContext *pContext )
{
_HTMLAttrs &rAttrs = pContext->GetAttrs();
- for( USHORT i=0; i<rAttrs.Count(); i++ )
+ for( sal_uInt16 i=0; i<rAttrs.Count(); i++ )
{
// einfaches Loeschen reicht hier nicht, weil das
// Attribut auch aus seiner Liste ausgetragen werden
@@ -436,11 +436,11 @@ void SwHTMLParser::ClearContext( _HTMLAttrContext *pContext )
/* */
-BOOL SwHTMLParser::DoPositioning( SfxItemSet &rItemSet,
+sal_Bool SwHTMLParser::DoPositioning( SfxItemSet &rItemSet,
SvxCSS1PropertyInfo &rPropInfo,
_HTMLAttrContext *pContext )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// Unter folgenden Umstaenden wird jetzt ein Rahmen aufgemacht:
// - das Tag wird absolut positioniert und left/top sind beide
@@ -471,20 +471,20 @@ BOOL SwHTMLParser::DoPositioning( SfxItemSet &rItemSet,
InsertFlyFrame( aFrmItemSet, pContext, rPropInfo.aId,
CONTEXT_FLAGS_ABSPOS );
- pContext->SetPopStack( TRUE );
+ pContext->SetPopStack( sal_True );
rPropInfo.aId.Erase();
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
-BOOL SwHTMLParser::CreateContainer( const String& rClass,
+sal_Bool SwHTMLParser::CreateContainer( const String& rClass,
SfxItemSet &rItemSet,
SvxCSS1PropertyInfo &rPropInfo,
_HTMLAttrContext *pContext )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rClass.EqualsIgnoreCaseAscii(sCSS1_class_abs_pos) &&
pCSS1Parser->MayBePositioned( rPropInfo ) )
{
@@ -496,13 +496,13 @@ BOOL SwHTMLParser::CreateContainer( const String& rClass,
SetAnchorAndAdjustment( text::VertOrientation::NONE, text::HoriOrientation::NONE,
rItemSet, rPropInfo, *pFrmItemSet );
Size aDummy(0,0);
- SetFixSize( aDummy, aDummy, FALSE, FALSE, rItemSet, rPropInfo,
+ SetFixSize( aDummy, aDummy, sal_False, sal_False, rItemSet, rPropInfo,
*pFrmItemSet );
SetSpace( aDummy, rItemSet, rPropInfo, *pFrmItemSet );
SetFrmFmtAttrs( rItemSet, rPropInfo, HTML_FF_BOX|HTML_FF_BACKGROUND|HTML_FF_DIRECTION,
*pFrmItemSet );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -513,7 +513,7 @@ BOOL SwHTMLParser::CreateContainer( const String& rClass,
void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
SvxCSS1PropertyInfo &rPropInfo,
_HTMLAttrContext *pContext,
- BOOL bCharLvl )
+ sal_Bool bCharLvl )
{
// Ein DropCap-Attribut basteln, wenn auf Zeichen-Ebene vor dem
// ersten Zeichen ein float: left vorkommt
@@ -567,16 +567,16 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
// die bisherigen Absatz-Abstaende holen (ohne die vom
// obersten Kontext, denn den veraendern wir ja gerade) ...
- USHORT nOldLeft = 0, nOldRight = 0;
+ sal_uInt16 nOldLeft = 0, nOldRight = 0;
short nOldIndent = 0;
- BOOL bIgnoreTop = aContexts.Count() > nContextStMin &&
+ sal_Bool bIgnoreTop = aContexts.Count() > nContextStMin &&
aContexts[aContexts.Count()-1] == pContext;
GetMarginsFromContext( nOldLeft, nOldRight, nOldIndent,
bIgnoreTop );
// und noch die aktuell gueltigen
- USHORT nLeft = nOldLeft, nRight = nOldRight;
+ sal_uInt16 nLeft = nOldLeft, nRight = nOldRight;
short nIndent = nOldIndent;
pContext->GetMargins( nLeft, nRight, nIndent );
@@ -595,7 +595,7 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
-rPropInfo.nLeftMargin > nOldLeft )
nLeft = 0;
else
- nLeft = nOldLeft + static_cast< USHORT >(rPropInfo.nLeftMargin);
+ nLeft = nOldLeft + static_cast< sal_uInt16 >(rPropInfo.nLeftMargin);
}
if( rPropInfo.bRightMargin )
{
@@ -606,7 +606,7 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
-rPropInfo.nRightMargin > nOldRight )
nRight = 0;
else
- nRight = nOldRight + static_cast< USHORT >(rPropInfo.nRightMargin);
+ nRight = nOldRight + static_cast< sal_uInt16 >(rPropInfo.nRightMargin);
}
if( rPropInfo.bTextIndent )
nIndent = pLRItem->GetTxtFirstLineOfst();
@@ -620,14 +620,14 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
aLRItem.SetTxtLeft( nLeft );
aLRItem.SetRight( nRight );
NewAttr( &aAttrTab.pLRSpace, aLRItem );
- EndAttr( aAttrTab.pLRSpace, 0, FALSE );
+ EndAttr( aAttrTab.pLRSpace, 0, sal_False );
}
break;
case RES_UL_SPACE:
if( !rPropInfo.bTopMargin || !rPropInfo.bBottomMargin )
{
- USHORT nUpper = 0, nLower = 0;
+ sal_uInt16 nUpper = 0, nLower = 0;
GetULSpaceFromContext( nUpper, nLower );
SvxULSpaceItem aULSpace( *((const SvxULSpaceItem *)pItem) );
if( !rPropInfo.bTopMargin )
@@ -730,15 +730,15 @@ void SwHTMLParser::InsertAttr( _HTMLAttr **ppAttr, const SfxPoolItem & rItem,
void SwHTMLParser::SplitPREListingXMP( _HTMLAttrContext *pCntxt )
{
// PRE/Listing/XMP soll beim beenden des Kontexts beendet werden.
- pCntxt->SetFinishPREListingXMP( TRUE );
+ pCntxt->SetFinishPREListingXMP( sal_True );
// Und die jetzt gueltigen Flags sollen wieder gesetzt werden.
if( IsReadPRE() )
- pCntxt->SetRestartPRE( TRUE );
+ pCntxt->SetRestartPRE( sal_True );
if( IsReadXMP() )
- pCntxt->SetRestartXMP( TRUE );
+ pCntxt->SetRestartXMP( sal_True );
if( IsReadListing() )
- pCntxt->SetRestartListing( TRUE );
+ pCntxt->SetRestartListing( sal_True );
// PRE/Listing/XMP wird auuserdem sofort beendet
FinishPREListingXMP();
diff --git a/sw/source/filter/html/htmldraw.cxx b/sw/source/filter/html/htmldraw.cxx
index 92338694f31a..ac895745bdfa 100644
--- a/sw/source/filter/html/htmldraw.cxx
+++ b/sw/source/filter/html/htmldraw.cxx
@@ -184,7 +184,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
SVX_CSS1_LTYPE_TWIP == rCSS1PropInfo.eTopType )
{
const SwStartNode *pFlySttNd =
- pDoc->GetNodes()[pPam->GetPoint()->nNode]->FindFlyStartNode();
+ pPam->GetPoint()->nNode.GetNode().FindFlyStartNode();
if( pFlySttNd )
{
@@ -447,8 +447,8 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable )
RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT,
0
};
- const SwTxtNode *pTxtNd = pDoc->GetNodes()[pPam->GetPoint()->nNode]
- ->GetTxtNode();
+ SwTxtNode const*const pTxtNd =
+ pPam->GetPoint()->nNode.GetNode().GetTxtNode();
if( pTxtNd )
{
const SfxItemSet& rItemSet = pTxtNd->GetAnyFmtColl().GetAttrSet();
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index 46e0b444b6b0..3f5c753e117e 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -206,9 +206,9 @@ static HTMLOptionEnum aHTMLFileNameFldFmtTable[] =
/* */
-USHORT SwHTMLParser::GetNumType( const String& rStr, USHORT nDfltType )
+sal_uInt16 SwHTMLParser::GetNumType( const String& rStr, sal_uInt16 nDfltType )
{
- USHORT nType = nDfltType;
+ sal_uInt16 nType = nDfltType;
const HTMLOptionEnum *pOptEnums = aHTMLPageNumFldFmtTable;
while( pOptEnums->pName )
if( !rStr.EqualsIgnoreCaseAscii( pOptEnums->pName ) )
@@ -225,14 +225,14 @@ USHORT SwHTMLParser::GetNumType( const String& rStr, USHORT nDfltType )
void SwHTMLParser::NewField()
{
- BOOL bKnownType = FALSE, bFixed = FALSE,
- bHasNumFmt = FALSE, bHasNumValue = FALSE;
- USHORT nType = 0;
+ sal_Bool bKnownType = sal_False, bFixed = sal_False,
+ bHasNumFmt = sal_False, bHasNumValue = sal_False;
+ sal_uInt16 nType = 0;
String aValue, aNumFmt, aNumValue, aName;
const HTMLOption *pSubOption=0, *pFmtOption=0;
const HTMLOptions *pHTMLOptions = GetOptions();
- USHORT i;
+ sal_uInt16 i;
for( i = pHTMLOptions->Count(); i; )
{
@@ -256,14 +256,14 @@ void SwHTMLParser::NewField()
break;
case HTML_O_SDNUM:
aNumFmt = pOption->GetString();
- bHasNumFmt = TRUE;
+ bHasNumFmt = sal_True;
break;
case HTML_O_SDVAL:
aNumValue = pOption->GetString();
- bHasNumValue = TRUE;
+ bHasNumValue = sal_True;
break;
case HTML_O_SDFIXED:
- bFixed = TRUE;
+ bFixed = sal_True;
break;
}
}
@@ -293,29 +293,29 @@ void SwHTMLParser::NewField()
const String& rCreated = xDocProps->getAuthor();
if( !rUser.Len() ||
(rChanged.Len() ? rUser != rChanged : rUser != rCreated) )
- bFixed = TRUE;
+ bFixed = sal_True;
}
}
- USHORT nWhich = nType;
+ sal_uInt16 nWhich = nType;
if( RES_DATEFLD==nType || RES_TIMEFLD==nType )
nWhich = RES_DATETIMEFLD;
SwFieldType* pType = pDoc->GetSysFldType( nWhich );
SwField *pFld = 0;
- BOOL bInsOnEndTag = FALSE;
+ sal_Bool bInsOnEndTag = sal_False;
switch( (RES_FIELDS)nType )
{
case RES_EXTUSERFLD:
if( pSubOption )
{
- USHORT nSub;
- ULONG nFmt = 0;
+ sal_uInt16 nSub;
+ sal_uLong nFmt = 0;
if( bFixed )
{
nFmt |= AF_FIXED;
- bInsOnEndTag = TRUE;
+ bInsOnEndTag = sal_True;
}
if( pSubOption->GetEnum( nSub, aHTMLExtUsrFldSubTable ) )
pFld = new SwExtUserField( (SwExtUserFieldType*)pType,
@@ -325,13 +325,13 @@ void SwHTMLParser::NewField()
case RES_AUTHORFLD:
{
- USHORT nFmt = AF_NAME;
+ sal_uInt16 nFmt = AF_NAME;
if( pFmtOption )
pFmtOption->GetEnum( nFmt, aHTMLAuthorFldFmtTable );
if( bFixed )
{
nFmt |= AF_FIXED;
- bInsOnEndTag = TRUE;
+ bInsOnEndTag = sal_True;
}
pFld = new SwAuthorField( (SwAuthorFieldType *)pType, nFmt );
@@ -341,10 +341,10 @@ void SwHTMLParser::NewField()
case RES_DATEFLD:
case RES_TIMEFLD:
{
- ULONG nNumFmt = 0;
- ULONG nTime = Time().GetTime(), nDate = Date().GetDate();
- USHORT nSub = 0;
- BOOL bValidFmt = FALSE;
+ sal_uLong nNumFmt = 0;
+ sal_uLong nTime = Time().GetTime(), nDate = Date().GetDate();
+ sal_uInt16 nSub = 0;
+ sal_Bool bValidFmt = sal_False;
HTMLNumFmtTblEntry * pFmtTbl;
if( RES_DATEFLD==nType )
@@ -352,14 +352,14 @@ void SwHTMLParser::NewField()
nSub = DATEFLD;
pFmtTbl = aHTMLDateFldFmtTable;
if( aValue.Len() )
- nDate = (ULONG)aValue.ToInt32();
+ nDate = (sal_uLong)aValue.ToInt32();
}
else
{
nSub = TIMEFLD;
pFmtTbl = aHTMLTimeFldFmtTable;
if( aValue.Len() )
- nTime = (ULONG)aValue.ToInt32();
+ nTime = (sal_uLong)aValue.ToInt32();
}
if( aValue.Len() )
nSub |= FIXEDFLD;
@@ -368,13 +368,13 @@ void SwHTMLParser::NewField()
if( pFmtOption )
{
const String& rFmt = pFmtOption->GetString();
- for( USHORT k = 0; pFmtTbl[k].pName; k++ )
+ for( sal_uInt16 k = 0; pFmtTbl[k].pName; k++ )
{
if( rFmt.EqualsIgnoreCaseAscii( pFmtTbl[k].pName ) )
{
nNumFmt = pFormatter->GetFormatIndex(
pFmtTbl[k].eFmt, LANGUAGE_SYSTEM);
- bValidFmt = TRUE;
+ bValidFmt = sal_True;
break;
}
}
@@ -394,7 +394,7 @@ void SwHTMLParser::NewField()
case RES_DATETIMEFLD:
if( bHasNumFmt )
{
- USHORT nSub = 0;
+ sal_uInt16 nSub = 0;
SvNumberFormatter *pFormatter = pDoc->GetNumberFormatter();
sal_uInt32 nNumFmt;
@@ -425,10 +425,10 @@ void SwHTMLParser::NewField()
case RES_PAGENUMBERFLD:
if( pSubOption )
{
- USHORT nSub;
+ sal_uInt16 nSub;
if( pSubOption->GetEnum( nSub, aHTMLPageNumFldSubTable ) )
{
- USHORT nFmt = SVX_NUM_PAGEDESC;
+ sal_uInt16 nFmt = SVX_NUM_PAGEDESC;
if( pFmtOption )
pFmtOption->GetEnum( nFmt, aHTMLPageNumFldFmtTable );
@@ -455,10 +455,10 @@ void SwHTMLParser::NewField()
case RES_DOCINFOFLD:
if( pSubOption )
{
- USHORT nSub;
+ sal_uInt16 nSub;
if( pSubOption->GetEnum( nSub, aHTMLDocInfoFldSubTable ) )
{
- USHORT nExtSub = 0;
+ sal_uInt16 nExtSub = 0;
if( DI_CREATE==(SwDocInfoSubType)nSub ||
DI_CHANGE==(SwDocInfoSubType)nSub )
{
@@ -479,7 +479,7 @@ void SwHTMLParser::NewField()
bFixed &= bHasNumValue;
}
else
- bHasNumValue = FALSE;
+ bHasNumValue = sal_False;
if( nSub >= DI_INFO1 && nSub <= DI_INFO4 && aName.Len() == 0 )
{
@@ -492,7 +492,7 @@ void SwHTMLParser::NewField()
if( bFixed )
{
nSub |= DI_SUB_FIXED;
- bInsOnEndTag = TRUE;
+ bInsOnEndTag = sal_True;
}
pFld = new SwDocInfoField( (SwDocInfoFieldType *)pType,
@@ -506,10 +506,10 @@ void SwHTMLParser::NewField()
case RES_DOCSTATFLD:
if( pSubOption )
{
- USHORT nSub;
+ sal_uInt16 nSub;
if( pSubOption->GetEnum( nSub, aHTMLDocStatFldSubTable ) )
{
- USHORT nFmt = SVX_NUM_ARABIC;
+ sal_uInt16 nFmt = SVX_NUM_ARABIC;
if( pFmtOption )
pFmtOption->GetEnum( nFmt, aHTMLPageNumFldFmtTable );
pFld = new SwDocStatField( (SwDocStatFieldType *)pType,
@@ -521,13 +521,13 @@ void SwHTMLParser::NewField()
case RES_FILENAMEFLD:
{
- USHORT nFmt = FF_NAME;
+ sal_uInt16 nFmt = FF_NAME;
if( pFmtOption )
pFmtOption->GetEnum( nFmt, aHTMLFileNameFldFmtTable );
if( bFixed )
{
nFmt |= FF_FIXED;
- bInsOnEndTag = TRUE;
+ bInsOnEndTag = sal_True;
}
pFld = new SwFileNameField( (SwFileNameFieldType *)pType, nFmt );
@@ -548,7 +548,7 @@ void SwHTMLParser::NewField()
pDoc->InsertPoolItem( *pPam, SwFmtFld(*pFld), 0 );
delete pFld;
}
- bInField = TRUE;
+ bInField = sal_True;
}
}
@@ -588,7 +588,7 @@ void SwHTMLParser::EndField()
pField = 0;
}
- bInField = FALSE;
+ bInField = sal_False;
aContents.Erase();
}
@@ -603,7 +603,7 @@ void SwHTMLParser::InsertFieldText()
void SwHTMLParser::InsertCommentText( const sal_Char *pTag )
{
- BOOL bEmpty = aContents.Len() == 0;
+ sal_Bool bEmpty = aContents.Len() == 0;
if( !bEmpty )
aContents += '\n';
@@ -633,14 +633,14 @@ void SwHTMLParser::InsertComment( const String& rComment, const sal_Char *pTag )
// weniger Probleme beim Formatieren (bug #40483#)
xub_StrLen nPos = pPam->GetPoint()->nContent.GetIndex();
SwTxtNode *pTxtNd = pPam->GetNode()->GetTxtNode();
- BOOL bMoveFwd = FALSE;
+ sal_Bool bMoveFwd = sal_False;
if( nPos>0 && pTxtNd && ' '==pTxtNd->GetTxt().GetChar(nPos-1) )
{
- bMoveFwd = TRUE;
+ bMoveFwd = sal_True;
- ULONG nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
xub_StrLen nIdx = pPam->GetPoint()->nContent.GetIndex();
- for( USHORT i = aSetAttrTab.Count(); i > 0; )
+ for( sal_uInt16 i = aSetAttrTab.Count(); i > 0; )
{
_HTMLAttr *pAttr = aSetAttrTab[--i];
if( pAttr->GetSttParaIdx() != nNodeIdx ||
@@ -651,7 +651,7 @@ void SwHTMLParser::InsertComment( const String& rComment, const sal_Char *pTag )
RES_SCRIPTFLD == ((const SwFmtFld *)pAttr->pItem)->GetFld()
->GetTyp()->Which() )
{
- bMoveFwd = FALSE;
+ bMoveFwd = sal_False;
break;
}
}
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index e86060f85d59..1d2def315b93 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -48,7 +48,7 @@
using namespace nsSwDocInfoSubType;
-const sal_Char *SwHTMLWriter::GetNumFormat( USHORT nFmt )
+const sal_Char *SwHTMLWriter::GetNumFormat( sal_uInt16 nFmt )
{
const sal_Char *pFmtStr = 0;
@@ -71,24 +71,24 @@ const sal_Char *SwHTMLWriter::GetNumFormat( USHORT nFmt )
return pFmtStr;
}
-extern BOOL lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 );
+extern sal_Bool lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 );
static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
const SwTxtNode& rTxtNd, xub_StrLen nFldPos )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
const SwFieldType* pFldTyp = pFld->GetTyp();
- USHORT nField = pFldTyp->Which();
- ULONG nFmt = pFld->GetFormat();
+ sal_uInt16 nField = pFldTyp->Which();
+ sal_uLong nFmt = pFld->GetFormat();
const sal_Char *pTypeStr=0, // TYPE
*pSubStr=0, // SUBTYPE
*pFmtStr=0; // FORMAT (SW)
String aValue; // VALUE (SW)
- BOOL bNumFmt=FALSE; // SDNUM (Number-Formatter-Format)
- BOOL bNumValue=FALSE; // SDVAL (Number-Formatter-Value)
+ sal_Bool bNumFmt=sal_False; // SDNUM (Number-Formatter-Format)
+ sal_Bool bNumValue=sal_False; // SDVAL (Number-Formatter-Value)
double dNumValue = 0.0; // SDVAL (Number-Formatter-Value)
- BOOL bFixed=FALSE; // SDFIXED
+ sal_Bool bFixed=sal_False; // SDFIXED
String aName; // NAME (CUSTOM)
switch( nField )
@@ -132,10 +132,10 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
case RES_DATETIMEFLD:
pTypeStr = OOO_STRING_SW_HTML_FT_datetime;
- bNumFmt = TRUE;
+ bNumFmt = sal_True;
if( ((SwDateTimeField*)pFld)->IsFixed() )
{
- bNumValue = TRUE;
+ bNumValue = sal_True;
dNumValue = ((SwDateTimeField*)pFld)->GetValue();
}
break;
@@ -172,9 +172,9 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
break;
case RES_DOCINFOFLD:
{
- USHORT nSubType = pFld->GetSubType();
+ sal_uInt16 nSubType = pFld->GetSubType();
pTypeStr = OOO_STRING_SW_HTML_FT_docinfo;
- USHORT nExtSubType = nSubType & 0x0f00;
+ sal_uInt16 nExtSubType = nSubType & 0x0f00;
nSubType &= 0x00ff;
switch( nSubType )
@@ -202,11 +202,11 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
break;
case DI_SUB_TIME:
pFmtStr = OOO_STRING_SW_HTML_FF_time;
- bNumFmt = TRUE;
+ bNumFmt = sal_True;
break;
case DI_SUB_DATE:
pFmtStr = OOO_STRING_SW_HTML_FF_date;
- bNumFmt = TRUE;
+ bNumFmt = sal_True;
break;
}
}
@@ -219,13 +219,13 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
// Fixe Felder ohne Zahlenformate sollte es
// eigentlich nicht geben. OSL_ENSURE(ist unten.
dNumValue = ((const SwDocInfoField*)pFld)->GetValue();
- bNumValue = TRUE;
+ bNumValue = sal_True;
}
else if( !nFmt )
{
// Nicht fixe Felder muessen kein Zahlenformat haben,
// wenn sie aus 4.0-Dokumenten stammen.
- bNumFmt = FALSE;
+ bNumFmt = sal_False;
}
}
}
@@ -234,7 +234,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
case RES_DOCSTATFLD:
{
pTypeStr = OOO_STRING_SW_HTML_FT_docstat;
- USHORT nSubType = pFld->GetSubType();
+ sal_uInt16 nSubType = pFld->GetSubType();
switch( nSubType )
{
case DS_PAGE: pSubStr = OOO_STRING_SW_HTML_FS_page; break;
@@ -306,7 +306,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
}
// Inhalt des Feldes ausgeben
- String const sExpand( pFld->ExpandField(rWrt.pDoc->IsClipBoard()) );
+ String const sExpand( pFld->ExpandField(true) );
sal_Bool bNeedsCJKProcessing = sal_False;
if( sExpand.Len() )
{
@@ -375,7 +375,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
case CSS1_OUTMODE_CTL: pWhichIds = aCTLWhichIds; break;
}
- rHTMLWrt.bTagOn = TRUE;
+ rHTMLWrt.bTagOn = sal_True;
const SfxPoolItem *aItems[5];
sal_uInt16 nItems = 0;
for( sal_uInt16 i=0; i<4; i++ )
@@ -396,7 +396,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
HTMLOutFuncs::Out_String( rWrt.Strm(), sExpand.Copy( nPos, nEndPos ),
rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
- rHTMLWrt.bTagOn = FALSE;
+ rHTMLWrt.bTagOn = sal_False;
while( nItems )
Out( aHTMLAttrFnTab, *aItems[--nItems], rHTMLWrt );
@@ -418,7 +418,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
// Off-Tag ausgeben
if( pTypeStr )
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_sdfield, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_sdfield, sal_False );
return rWrt;
}
@@ -433,9 +433,9 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
if( RES_SETEXPFLD == pFldTyp->Which() &&
(nsSwGetSetExpType::GSE_STRING & pFld->GetSubType()) )
{
- int bOn = FALSE;
+ int bOn = sal_False;
if( pFldTyp->GetName().EqualsAscii("HTML_ON" ) )
- bOn = TRUE;
+ bOn = sal_True;
else if( !pFldTyp->GetName().EqualsAscii( "HTML_OFF" ) )
return rWrt;
@@ -454,7 +454,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
// Kommentare werden im ANSI-Zeichensetz, aber mit System-Zeilen-
// Umbruechen gesschrieben.
const String& rComment = pFld->GetPar2();
- BOOL bWritten = FALSE;
+ sal_Bool bWritten = sal_False;
if( (rComment.Len() >= 6 && '<' == rComment.GetChar(0) &&
'>' == rComment.GetChar(rComment.Len()-1) &&
@@ -470,7 +470,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
// characters not contained in the destination encoding are lost!
ByteString sTmp( sComment, ((SwHTMLWriter&)rWrt).eDestEnc );
rWrt.Strm() << sTmp.GetBuffer();
- bWritten = TRUE;
+ bWritten = sal_True;
}
else if( rComment.Len() >= 7 &&
'>' == rComment.GetChar(rComment.Len()-1) &&
@@ -486,7 +486,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
// lost!
ByteString sTmp( sComment, ((SwHTMLWriter&)rWrt).eDestEnc );
rWrt.Strm() << sTmp.GetBuffer();
- bWritten = TRUE;
+ bWritten = sal_True;
}
}
@@ -508,9 +508,9 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
if( rHTMLWrt.bLFPossible )
- rHTMLWrt.OutNewLine( TRUE );
+ rHTMLWrt.OutNewLine( sal_True );
- BOOL bURL = ((const SwScriptField *)pFld)->IsCodeURL();
+ sal_Bool bURL = ((const SwScriptField *)pFld)->IsCodeURL();
const String& rType = pFld->GetPar1();
String aContents, aURL;
if(bURL)
@@ -524,7 +524,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
aURL, 0, 0, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
if( rHTMLWrt.bLFPossible )
- rHTMLWrt.OutNewLine( TRUE );
+ rHTMLWrt.OutNewLine( sal_True );
}
else
{
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index 2e3b4549ae71..0fc846d0dab8 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -78,25 +78,25 @@ using namespace ::com::sun::star;
////////////////////////////////////////////////////////////
-const ULONG HTML_FRMOPTS_IMG_ALL =
+const sal_uLong HTML_FRMOPTS_IMG_ALL =
HTML_FRMOPT_ALT |
HTML_FRMOPT_SIZE |
HTML_FRMOPT_ANYSIZE |
HTML_FRMOPT_BORDER |
HTML_FRMOPT_NAME;
-const ULONG HTML_FRMOPTS_IMG_CNTNR =
+const sal_uLong HTML_FRMOPTS_IMG_CNTNR =
HTML_FRMOPTS_IMG_ALL |
HTML_FRMOPT_ABSSIZE;
-const ULONG HTML_FRMOPTS_IMG =
+const sal_uLong HTML_FRMOPTS_IMG =
HTML_FRMOPTS_IMG_ALL |
HTML_FRMOPT_ALIGN |
HTML_FRMOPT_SPACE |
HTML_FRMOPT_BRCLEAR;
-const ULONG HTML_FRMOPTS_IMG_CSS1 =
+const sal_uLong HTML_FRMOPTS_IMG_CSS1 =
HTML_FRMOPT_S_ALIGN |
HTML_FRMOPT_S_SPACE;
-const ULONG HTML_FRMOPTS_DIV =
+const sal_uLong HTML_FRMOPTS_DIV =
HTML_FRMOPT_ID |
HTML_FRMOPT_S_ALIGN |
HTML_FRMOPT_S_SIZE |
@@ -108,22 +108,22 @@ const ULONG HTML_FRMOPTS_DIV =
HTML_FRMOPT_BRCLEAR |
HTML_FRMOPT_DIR;
-const ULONG HTML_FRMOPTS_MULTICOL =
+const sal_uLong HTML_FRMOPTS_MULTICOL =
HTML_FRMOPT_ID |
HTML_FRMOPT_WIDTH |
HTML_FRMOPT_ANYSIZE |
HTML_FRMOPT_ABSSIZE |
HTML_FRMOPT_DIR;
-const ULONG HTML_FRMOPTS_MULTICOL_CNTNR =
+const sal_uLong HTML_FRMOPTS_MULTICOL_CNTNR =
HTML_FRMOPTS_MULTICOL;
-const ULONG HTML_FRMOPTS_MULTICOL_CSS1 =
+const sal_uLong HTML_FRMOPTS_MULTICOL_CSS1 =
HTML_FRMOPT_S_ALIGN |
HTML_FRMOPT_S_SIZE |
HTML_FRMOPT_S_SPACE |
HTML_FRMOPT_S_BORDER|
HTML_FRMOPT_S_BACKGROUND;
-const ULONG HTML_FRMOPTS_SPACER =
+const sal_uLong HTML_FRMOPTS_SPACER =
HTML_FRMOPT_ALIGN |
HTML_FRMOPT_SIZE |
HTML_FRMOPT_ANYSIZE |
@@ -131,7 +131,7 @@ const ULONG HTML_FRMOPTS_SPACER =
HTML_FRMOPT_MARGINSIZE |
HTML_FRMOPT_ABSSIZE;
-const ULONG HTML_FRMOPTS_CNTNR =
+const sal_uLong HTML_FRMOPTS_CNTNR =
HTML_FRMOPT_S_ALIGN |
HTML_FRMOPT_S_SPACE |
HTML_FRMOPT_S_WIDTH |
@@ -142,15 +142,15 @@ const ULONG HTML_FRMOPTS_CNTNR =
static Writer& OutHTML_FrmFmtTableNode( Writer& rWrt, const SwFrmFmt& rFrmFmt );
static Writer& OutHTML_FrmFmtAsMulticol( Writer& rWrt, const SwFrmFmt& rFmt,
- BOOL bInCntnr );
+ sal_Bool bInCntnr );
static Writer& OutHTML_FrmFmtAsSpacer( Writer& rWrt, const SwFrmFmt& rFmt );
static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
- const SwFrmFmt& rFrmFmt, BOOL bSpan );
+ const SwFrmFmt& rFrmFmt, sal_Bool bSpan );
static Writer& OutHTML_FrmFmtAsImage( Writer& rWrt, const SwFrmFmt& rFmt,
- BOOL bInCntnr );
+ sal_Bool bInCntnr );
static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFmt,
- BOOL bInCntnr );
+ sal_Bool bInCntnr );
static Writer& OutHTML_FrmFmtAsMarquee( Writer& rWrt, const SwFrmFmt& rFrmFmt,
const SdrObject& rSdrObj );
@@ -177,7 +177,7 @@ static HTMLOutEvent aIMapEventTable[] =
SV_IMPL_OP_PTRARR_SORT( SwHTMLPosFlyFrms, SwHTMLPosFlyFrmPtr )
-USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
+sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
const SdrObject*& rpSdrObj )
{
SwHTMLFrmType eType;
@@ -213,7 +213,7 @@ USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
eType = HTML_FRMTYPE_TEXT;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
const SwNode* pNd = pDoc->GetNodes()[ nStt ];
if( pNd->IsGrfNode() )
@@ -228,12 +228,12 @@ USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
}
else
{
- ULONG nEnd = pDoc->GetNodes()[nStt-1]->EndOfSectionIndex();
+ sal_uLong nEnd = pDoc->GetNodes()[nStt-1]->EndOfSectionIndex();
const SfxPoolItem* pItem;
const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet();
if( SFX_ITEM_SET == rItemSet.GetItemState( RES_COL,
- TRUE, &pItem ) &&
+ sal_True, &pItem ) &&
((const SwFmtCol *)pItem)->GetNumCols() > 1 )
{
// spaltiger Rahmen
@@ -242,7 +242,7 @@ USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
else if( pNd->IsTableNode() )
{
const SwTableNode *pTblNd = pNd->GetTableNode();
- ULONG nTblEnd = pTblNd->EndOfSectionIndex();
+ sal_uLong nTblEnd = pTblNd->EndOfSectionIndex();
if( nTblEnd+1 == nEnd )
{
@@ -259,17 +259,17 @@ USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
{
const SwTxtNode *pTxtNd = pNd->GetTxtNode();
- BOOL bEmpty = FALSE;
+ sal_Bool bEmpty = sal_False;
if( nStt==nEnd-1 && !pTxtNd->Len() )
{
// leerer Rahmen? Nur wenn kein Rahmen am
// Text- oder Start-Node verankert ist.
- bEmpty = TRUE;
+ bEmpty = sal_True;
if( pHTMLPosFlyFrms )
{
- for( USHORT i=0; i<pHTMLPosFlyFrms->Count(); i++ )
+ for( sal_uInt16 i=0; i<pHTMLPosFlyFrms->Count(); i++ )
{
- ULONG nIdx = (*pHTMLPosFlyFrms)[i]
+ sal_uLong nIdx = (*pHTMLPosFlyFrms)[i]
->GetNdIndex().GetIndex();
bEmpty = (nIdx != nStt) && (nIdx != nStt-1);
if( !bEmpty || nIdx > nStt )
@@ -284,7 +284,7 @@ USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
/// or its background color is not "no fill"/"auto fill".
if( GPOS_NONE != rBrush.GetGraphicPos() ||
rBrush.GetColor() != COL_TRANSPARENT )
- bEmpty = FALSE;
+ bEmpty = sal_False;
}
if( bEmpty )
{
@@ -305,7 +305,7 @@ USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
}
}
- return static_cast< USHORT >(eType);
+ return static_cast< sal_uInt16 >(eType);
}
void SwHTMLWriter::CollectFlyFrms()
@@ -313,11 +313,11 @@ void SwHTMLWriter::CollectFlyFrms()
OSL_ENSURE( HTML_CFG_MAX+1 == MAX_BROWSERS,
"number of browser configurations has changed" );
- BYTE nSz = (BYTE)Min( pDoc->GetSpzFrmFmts()->Count(), USHORT(255) );
+ sal_uInt8 nSz = (sal_uInt8)Min( pDoc->GetSpzFrmFmts()->Count(), sal_uInt16(255) );
SwPosFlyFrms aFlyPos( nSz, nSz );
- pDoc->GetAllFlyFmts( aFlyPos, bWriteAll ? 0 : pCurPam, TRUE );
+ pDoc->GetAllFlyFmts( aFlyPos, bWriteAll ? 0 : pCurPam, sal_True );
- for( USHORT i=0; i< aFlyPos.Count(); i++ )
+ for( sal_uInt16 i=0; i< aFlyPos.Count(); i++ )
{
const SwFrmFmt& rFrmFmt = aFlyPos[i]->GetFmt();
const SdrObject *pSdrObj = 0;
@@ -325,7 +325,7 @@ void SwHTMLWriter::CollectFlyFrms()
const SwCntntNode *pACNd;
SwHTMLFrmType eType = (SwHTMLFrmType)GuessFrmType( rFrmFmt, pSdrObj );
- BYTE nMode;
+ sal_uInt8 nMode;
const SwFmtAnchor& rAnchor = rFrmFmt.GetAnchor();
sal_Int16 eHoriRel = rFrmFmt.GetHoriOrient().GetRelationOrient();
switch( rAnchor.GetAnchorId() )
@@ -375,21 +375,21 @@ void SwHTMLWriter::CollectFlyFrms()
}
}
-BOOL SwHTMLWriter::OutFlyFrm( ULONG nNdIdx, xub_StrLen nCntntIdx, BYTE nPos,
+sal_Bool SwHTMLWriter::OutFlyFrm( sal_uLong nNdIdx, xub_StrLen nCntntIdx, sal_uInt8 nPos,
HTMLOutContext *pContext )
{
- BOOL bFlysLeft = FALSE; // Noch Flys an aktueller Node-Position da?
+ sal_Bool bFlysLeft = sal_False; // Noch Flys an aktueller Node-Position da?
// OutFlyFrm kan rekursiv aufgerufen werden. Deshalb muss man
// manchmal wieder von vorne anfangen, nachdem ein Fly ausgegeben
// wurde.
- BOOL bRestart = TRUE;
+ sal_Bool bRestart = sal_True;
while( pHTMLPosFlyFrms && bRestart )
{
- bFlysLeft = bRestart = FALSE;
+ bFlysLeft = bRestart = sal_False;
// suche nach dem Anfang der FlyFrames
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < pHTMLPosFlyFrms->Count() &&
(*pHTMLPosFlyFrms)[i]->GetNdIndex().GetIndex() < nNdIdx; i++ )
@@ -411,7 +411,7 @@ BOOL SwHTMLWriter::OutFlyFrm( ULONG nNdIdx, xub_StrLen nCntntIdx, BYTE nPos,
{
delete pHTMLPosFlyFrms;
pHTMLPosFlyFrms = 0;
- bRestart = TRUE; // nicht wirklich, nur raus
+ bRestart = sal_True; // nicht wirklich, nur raus
// aus der Schleife
}
@@ -429,14 +429,14 @@ BOOL SwHTMLWriter::OutFlyFrm( ULONG nNdIdx, xub_StrLen nCntntIdx, BYTE nPos,
case HTML_OUT_SPAN:
case HTML_OUT_MULTICOL:
case HTML_OUT_TBLNODE:
- bRestart = TRUE; // Hier wird's evtl rekursiv
+ bRestart = sal_True; // Hier wird's evtl rekursiv
break;
}
delete pPosFly;
}
else
{
- bFlysLeft = TRUE;
+ bFlysLeft = sal_True;
}
}
}
@@ -444,11 +444,11 @@ BOOL SwHTMLWriter::OutFlyFrm( ULONG nNdIdx, xub_StrLen nCntntIdx, BYTE nPos,
return bFlysLeft;
}
-void SwHTMLWriter::OutFrmFmt( BYTE nMode, const SwFrmFmt& rFrmFmt,
+void SwHTMLWriter::OutFrmFmt( sal_uInt8 nMode, const SwFrmFmt& rFrmFmt,
const SdrObject *pSdrObject )
{
- BYTE nCntnrMode = SwHTMLPosFlyFrm::GetOutCntnr( nMode );
- BYTE nOutMode = SwHTMLPosFlyFrm::GetOutFn(nMode);
+ sal_uInt8 nCntnrMode = SwHTMLPosFlyFrm::GetOutCntnr( nMode );
+ sal_uInt8 nOutMode = SwHTMLPosFlyFrm::GetOutFn(nMode);
const sal_Char *pCntnrStr = 0;
if( HTML_CNTNR_NONE != nCntnrMode )
{
@@ -466,7 +466,7 @@ void SwHTMLWriter::OutFrmFmt( BYTE nMode, const SwFrmFmt& rFrmFmt,
Strm() << sOut.GetBuffer();
// Fuer Nicht-Zeichenobekte eine Breite ausgeben
- ULONG nFrmFlags = HTML_FRMOPTS_CNTNR;
+ sal_uLong nFrmFlags = HTML_FRMOPTS_CNTNR;
// Fuer spaltige Rahmen koennen wir auch noch den Hintergrund ausgeben.
if( HTML_OUT_MULTICOL == nOutMode )
@@ -480,7 +480,7 @@ void SwHTMLWriter::OutFrmFmt( BYTE nMode, const SwFrmFmt& rFrmFmt,
if( HTML_CNTNR_DIV == nCntnrMode )
{
IncIndentLevel();
- bLFPossible = TRUE;
+ bLFPossible = sal_True;
}
}
@@ -534,11 +534,11 @@ void SwHTMLWriter::OutFrmFmt( BYTE nMode, const SwFrmFmt& rFrmFmt,
DecIndentLevel();
if( bLFPossible )
OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_division, FALSE );
- bLFPossible = TRUE;
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_division, sal_False );
+ bLFPossible = sal_True;
}
else if( HTML_CNTNR_SPAN == nCntnrMode )
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_span, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_span, sal_False );
}
@@ -604,7 +604,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
if( (nFrmOpts & HTML_FRMOPT_ALIGN) && !pStr &&
( (nFrmOpts & HTML_FRMOPT_S_ALIGN) == 0 ||
(FLY_AS_CHAR == eAnchorId) ) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, sal_True, &pItem ))
{
switch( ((SwFmtVertOrient*)pItem)->GetVertOrient() )
{
@@ -627,7 +627,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
// HSPACE und VSPACE
Size aTwipSpc( 0, 0 );
if( (nFrmOpts & (HTML_FRMOPT_SPACE|HTML_FRMOPT_MARGINSIZE)) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, sal_True, &pItem ))
{
aTwipSpc.Width() =
( ((SvxLRSpaceItem*)pItem)->GetLeft() +
@@ -635,12 +635,12 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
nDfltLeftMargin = nDfltRightMargin = aTwipSpc.Width();
}
if( (nFrmOpts & (HTML_FRMOPT_SPACE|HTML_FRMOPT_MARGINSIZE)) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_UL_SPACE, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_UL_SPACE, sal_True, &pItem ))
{
aTwipSpc.Height() =
( ((SvxULSpaceItem*)pItem)->GetUpper() +
((SvxULSpaceItem*)pItem)->GetLower() ) / 2;
- nDfltTopMargin = nDfltBottomMargin = (USHORT)aTwipSpc.Height();
+ nDfltTopMargin = nDfltBottomMargin = (sal_uInt16)aTwipSpc.Height();
}
if( (nFrmOpts & HTML_FRMOPT_SPACE) &&
@@ -682,7 +682,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
}
if( !(nFrmOpts & HTML_FRMOPT_ABSSIZE) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, sal_True, &pItem ))
{
const SvxBoxItem* pBoxItem = (const SvxBoxItem*)pItem;
@@ -695,13 +695,13 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
// WIDTH und/oder HEIGHT
// ATT_VAR_SIZE/ATT_MIN_SIZE nur ausgeben, wenn ANYSIZE gesezut ist
if( (nFrmOpts & HTML_FRMOPT_SIZE) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, TRUE, &pItem ) &&
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, sal_True, &pItem ) &&
( (nFrmOpts & HTML_FRMOPT_ANYSIZE) ||
ATT_FIX_SIZE == ((const SwFmtFrmSize *)pItem)->GetHeightSizeType()) )
{
const SwFmtFrmSize *pFSItem = (const SwFmtFrmSize *)pItem;
- BYTE nPrcWidth = pFSItem->GetWidthPercent();
- BYTE nPrcHeight = pFSItem->GetHeightPercent();
+ sal_uInt8 nPrcWidth = pFSItem->GetWidthPercent();
+ sal_uInt8 nPrcHeight = pFSItem->GetHeightPercent();
// Groesse des Objekts Twips ohne Raender
Size aTwipSz( (nPrcWidth ? 0
@@ -758,13 +758,13 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
if( (nFrmOpts & HTML_FRMOPT_BRCLEAR) &&
((FLY_AT_PARA == rFrmFmt.GetAnchor().GetAnchorId()) ||
(FLY_AT_CHAR == rFrmFmt.GetAnchor().GetAnchorId())) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_SURROUND, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_SURROUND, sal_True, &pItem ))
{
const SwFmtSurround* pSurround = (const SwFmtSurround*)pItem;
sal_Int16 eHoriOri = rFrmFmt.GetHoriOrient().GetHoriOrient();
pStr = 0;
SwSurround eSurround = pSurround->GetSurround();
- BOOL bAnchorOnly = pSurround->IsAnchorOnly();
+ sal_Bool bAnchorOnly = pSurround->IsAnchorOnly();
switch( eHoriOri )
{
case text::HoriOrientation::RIGHT:
@@ -778,7 +778,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
case SURROUND_LEFT:
case SURROUND_PARALLEL:
if( bAnchorOnly )
- bClearRight = TRUE;
+ bClearRight = sal_True;
break;
default:
;
@@ -799,7 +799,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
case SURROUND_RIGHT:
case SURROUND_PARALLEL:
if( bAnchorOnly )
- bClearLeft = TRUE;
+ bClearLeft = sal_True;
break;
default:
;
@@ -832,7 +832,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
{
SwFmtINetFmt *pINetFmt =
rHTMLWrt.aINetFmts[ rHTMLWrt.aINetFmts.Count()-1 ];
- OutHTML_INetFmt( rWrt, *pINetFmt, FALSE );
+ OutHTML_INetFmt( rWrt, *pINetFmt, sal_False );
}
String aGrfNm( rGrfName );
@@ -847,7 +847,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
// das URL-Attribut nur beruecksichtigen, wenn keine Image-Map
// uebergeben wurde
if( !pAltImgMap &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_URL, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_URL, sal_True, &pItem ))
{
pURLItem = (const SwFmtURL *)pItem;
}
@@ -873,17 +873,17 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
(aIMapName = aNameBase)
+= String::CreateFromInt32( rHTMLWrt.nImgMapCnt );
- BOOL bFound;
+ sal_Bool bFound;
do
{
- bFound = FALSE;
- for( USHORT i=0; i<rHTMLWrt.aImgMapNames.Count(); i++ )
+ bFound = sal_False;
+ for( sal_uInt16 i=0; i<rHTMLWrt.aImgMapNames.Count(); i++ )
{
// TODO: Unicode: Comparison is case insensitive for ASCII
// characters only now!
if( aIMapName.EqualsIgnoreCaseAscii(*rHTMLWrt.aImgMapNames[i]) )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -896,7 +896,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
} while( bFound );
- BOOL bScale = FALSE;
+ sal_Bool bScale = sal_False;
Fraction aScaleX( 1, 1 );
Fraction aScaleY( 1, 1 );
@@ -916,7 +916,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
if( rRealSize.Width() != nWidth )
{
aScaleX = Fraction( nWidth, rRealSize.Width() );
- bScale = TRUE;
+ bScale = sal_True;
}
}
if( !rFrmSize.GetHeightPercent() && rRealSize.Height() )
@@ -932,7 +932,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
if( rRealSize.Height() != nHeight )
{
aScaleY = Fraction( nHeight, rRealSize.Height() );
- bScale = TRUE;
+ bScale = sal_True;
}
}
@@ -947,7 +947,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
if( rHTMLWrt.bLFPossible )
{
- rHTMLWrt.OutNewLine( TRUE );
+ rHTMLWrt.OutNewLine( sal_True );
rHTMLWrt.GetIndentString( aIndMap );
rHTMLWrt.GetIndentString( aIndArea, 1 );
#if defined(UNX)
@@ -984,7 +984,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
// wenn meoglich vor der Grafik einen Zeilen-Umbruch ausgeben
if( rHTMLWrt.bLFPossible )
- rHTMLWrt.OutNewLine( TRUE );
+ rHTMLWrt.OutNewLine( sal_True );
// Attribute die ausserhelb der Grafik geschreiben werden muessen sammeln
ByteString sOut;
@@ -996,7 +996,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
// URL -> <A>...<IMG ... >...</A>
const SvxMacroItem *pMacItem = 0;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRMMACRO, TRUE, &pItem ))
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRMMACRO, sal_True, &pItem ))
pMacItem = (const SvxMacroItem *)pItem;
if( pURLItem || pMacItem )
@@ -1010,7 +1010,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
aName = pURLItem->GetName();
aTarget = pURLItem->GetTargetFrameName();
}
- BOOL bEvents = pMacItem && pMacItem->GetMacroTable().Count();
+ sal_Bool bEvents = pMacItem && pMacItem->GetMacroTable().Count();
if( aMapURL.Len() || aName.Len() || aTarget.Len() || bEvents )
{
@@ -1066,9 +1066,9 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
}
// Umrandung -> <FONT COLOR = ...>...<IMG ... >...</FONT>
- USHORT nBorderWidth = 0;
+ sal_uInt16 nBorderWidth = 0;
if( (nFrmOpts & HTML_FRMOPT_BORDER) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, sal_True, &pItem ))
{
Size aTwipBorder( 0, 0 );
const SvxBoxItem* pBoxItem = (const SvxBoxItem*)pItem;
@@ -1120,7 +1120,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
aPixelBorder.Height() = 0;
nBorderWidth =
- (USHORT)(aPixelBorder.Width() + aPixelBorder.Height());
+ (sal_uInt16)(aPixelBorder.Width() + aPixelBorder.Height());
}
if( pColBorderLine )
@@ -1143,7 +1143,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
// Events
sOut.Erase();
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRMMACRO, TRUE, &pItem ))
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRMMACRO, sal_True, &pItem ))
{
const SvxMacroTableDtor& rMacTable =
((const SvxMacroItem *)pItem)->GetMacroTable();
@@ -1189,7 +1189,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
// werden muss
SwFmtINetFmt *pINetFmt =
rHTMLWrt.aINetFmts[ rHTMLWrt.aINetFmts.Count()-1 ];
- OutHTML_INetFmt( rWrt, *pINetFmt, TRUE );
+ OutHTML_INetFmt( rWrt, *pINetFmt, sal_True );
}
return rHTMLWrt;
@@ -1219,7 +1219,7 @@ Writer& OutHTML_BulletImage( Writer& rWrt,
// Grafik als (JPG-)File speichern
if( rHTMLWrt.GetOrigFileName() )
rGrfName = *rHTMLWrt.GetOrigFileName();
- USHORT nErr = XOutBitmap::WriteGraphic( *pGrf, rGrfName,
+ sal_uInt16 nErr = XOutBitmap::WriteGraphic( *pGrf, rGrfName,
String::CreateFromAscii("JPG"),
(XOUTBMP_USE_GIF_IF_SENSIBLE |
XOUTBMP_USE_NATIVE_IF_POSSIBLE));
@@ -1323,11 +1323,11 @@ static Writer& OutHTML_FrmFmtTableNode( Writer& rWrt, const SwFrmFmt& rFrmFmt )
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
- ULONG nEnd = rHTMLWrt.pDoc->GetNodes()[nStt-1]->EndOfSectionIndex();
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
+ sal_uLong nEnd = rHTMLWrt.pDoc->GetNodes()[nStt-1]->EndOfSectionIndex();
String aCaption;
- BOOL bTopCaption = FALSE;
+ sal_Bool bTopCaption = sal_False;
// Nicht const, weil GetTable spater mal nicht const ist
SwNode *pNd = rHTMLWrt.pDoc->GetNodes()[ nStt ];
@@ -1336,13 +1336,13 @@ static Writer& OutHTML_FrmFmtTableNode( Writer& rWrt, const SwFrmFmt& rFrmFmt )
if( !pTblNd && pTxtNd )
{
// Tabelle mit Ueberschrift
- bTopCaption = TRUE;
+ bTopCaption = sal_True;
pTblNd = rHTMLWrt.pDoc->GetNodes()[nStt+1]->GetTableNode();
}
OSL_ENSURE( pTblNd, "Rahmen enthaelt keine Tabelle" );
if( pTblNd )
{
- ULONG nTblEnd = pTblNd->EndOfSectionIndex();
+ sal_uLong nTblEnd = pTblNd->EndOfSectionIndex();
OSL_ENSURE( nTblEnd == nEnd - 1 ||
(nTblEnd == nEnd - 2 && !bTopCaption),
"Ungeuelter Rahmen-Inhalt fuer Tabelle" );
@@ -1367,7 +1367,7 @@ static Writer& OutHTML_FrmFmtTableNode( Writer& rWrt, const SwFrmFmt& rFrmFmt )
static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt,
const SwFrmFmt& rFrmFmt,
- BOOL bInCntnr )
+ sal_Bool bInCntnr )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -1386,18 +1386,18 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt,
const SwFmtCol& rFmtCol = rFrmFmt.GetCol();
// die Anzahl der Spalten als COLS ausgeben
- USHORT nCols = rFmtCol.GetNumCols();
+ sal_uInt16 nCols = rFmtCol.GetNumCols();
if( nCols )
(((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_cols) += '=')
+= ByteString::CreateFromInt32( nCols );
// die Gutter-Breite (Minimalwert) als GUTTER
- USHORT nGutter = rFmtCol.GetGutterWidth( TRUE );
+ sal_uInt16 nGutter = rFmtCol.GetGutterWidth( sal_True );
if( nGutter!=USHRT_MAX )
{
if( nGutter && Application::GetDefaultDevice() )
{
- nGutter = (USHORT)Application::GetDefaultDevice()
+ nGutter = (sal_uInt16)Application::GetDefaultDevice()
->LogicToPixel( Size(nGutter,0),
MapMode(MAP_TWIP) ).Width();
}
@@ -1408,7 +1408,7 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt,
rWrt.Strm() << sOut.GetBuffer();
// WIDTH
- ULONG nFrmFlags = bInCntnr ? HTML_FRMOPTS_MULTICOL_CNTNR
+ sal_uLong nFrmFlags = bInCntnr ? HTML_FRMOPTS_MULTICOL_CNTNR
: HTML_FRMOPTS_MULTICOL;
if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bInCntnr )
nFrmFlags |= HTML_FRMOPTS_MULTICOL_CSS1;
@@ -1419,11 +1419,11 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt,
rWrt.Strm() << '>';
- rHTMLWrt.bLFPossible = TRUE;
+ rHTMLWrt.bLFPossible = sal_True;
rHTMLWrt.IncIndentLevel(); // den Inhalt von Multicol einruecken;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
const SwStartNode* pSttNd = rWrt.pDoc->GetNodes()[nStt]->GetStartNode();
OSL_ENSURE( pSttNd, "Wo ist der Start-Node" );
@@ -1440,8 +1440,8 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt,
rHTMLWrt.DecIndentLevel(); // den Inhalt von Multicol einruecken;
if( rHTMLWrt.bLFPossible )
rHTMLWrt.OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_multicol, FALSE );
- rHTMLWrt.bLFPossible = TRUE;
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_multicol, sal_False );
+ rHTMLWrt.bLFPossible = sal_True;
return rWrt;
}
@@ -1452,7 +1452,7 @@ static Writer& OutHTML_FrmFmtAsSpacer( Writer& rWrt, const SwFrmFmt& rFrmFmt )
// wenn meoglich vor der Grafik einen Zeilen-Umbruch ausgeben
if( rHTMLWrt.bLFPossible )
- rHTMLWrt.OutNewLine( TRUE );
+ rHTMLWrt.OutNewLine( sal_True );
ByteString sOut('<');
((((sOut += OOO_STRING_SVTOOLS_HTML_spacer) += ' ') += OOO_STRING_SVTOOLS_HTML_O_type) += '=')
@@ -1472,7 +1472,7 @@ static Writer& OutHTML_FrmFmtAsSpacer( Writer& rWrt, const SwFrmFmt& rFrmFmt )
}
static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
- const SwFrmFmt& rFrmFmt, BOOL bSpan)
+ const SwFrmFmt& rFrmFmt, sal_Bool bSpan)
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -1497,7 +1497,7 @@ static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
rWrt.Strm() << sOut.GetBuffer();
ByteString aEndTags;
- ULONG nFrmFlags = HTML_FRMOPTS_DIV;
+ sal_uLong nFrmFlags = HTML_FRMOPTS_DIV;
if( rHTMLWrt.IsHTMLMode( HTMLMODE_BORDER_NONE ) )
nFrmFlags |= HTML_FRMOPT_S_NOBORDER;
rHTMLWrt.OutFrmFmtOptions( rFrmFmt, aEmptyStr, aEndTags, nFrmFlags );
@@ -1505,10 +1505,10 @@ static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
rWrt.Strm() << '>';
rHTMLWrt.IncIndentLevel(); // den Inhalt einruecken
- rHTMLWrt.bLFPossible = TRUE;
+ rHTMLWrt.bLFPossible = sal_True;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
// Am Start-Node verankerte Rahmen-gebundene Rahmen ausgeben
rHTMLWrt.OutFlyFrm( nStt, 0, HTML_POS_ANY );
@@ -1529,7 +1529,7 @@ static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
rHTMLWrt.DecIndentLevel(); // den Inhalt von Multicol einruecken;
if( rHTMLWrt.bLFPossible )
rHTMLWrt.OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), pStr, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), pStr, sal_False );
if( aEndTags.Len() )
rWrt.Strm() << aEndTags.GetBuffer();
@@ -1538,7 +1538,7 @@ static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
}
static Writer & OutHTML_FrmFmtAsImage( Writer& rWrt, const SwFrmFmt& rFrmFmt,
- BOOL /*bInCntnr*/ )
+ sal_Bool /*bInCntnr*/ )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -1571,12 +1571,12 @@ static Writer & OutHTML_FrmFmtAsImage( Writer& rWrt, const SwFrmFmt& rFrmFmt,
static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
- BOOL bInCntnr )
+ sal_Bool bInCntnr )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
SwGrfNode *pGrfNd = rHTMLWrt.pDoc->GetNodes()[ nStt ]->GetGrfNode();
OSL_ENSURE( pGrfNd, "Grf-Node erwartet" );
if( !pGrfNd )
@@ -1590,9 +1590,9 @@ static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
// Grafik als File-Referenz speichern (als JPEG-Grafik speichern)
if( rHTMLWrt.GetOrigFileName() )
aGrfNm = *rHTMLWrt.GetOrigFileName();
- pGrfNd->SwapIn( TRUE );
+ pGrfNd->SwapIn( sal_True );
- ULONG nFlags = XOUTBMP_USE_GIF_IF_SENSIBLE |
+ sal_uLong nFlags = XOUTBMP_USE_GIF_IF_SENSIBLE |
XOUTBMP_USE_NATIVE_IF_POSSIBLE;
switch( rMirror.GetValue() )
{
@@ -1608,7 +1608,7 @@ static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
aMM100Size = OutputDevice::LogicToLogic( rSize.GetSize(),
MapMode( MAP_TWIP ), MapMode( MAP_100TH_MM ));
- USHORT nErr = XOutBitmap::WriteGraphic( pGrfNd->GetGrf(), aGrfNm,
+ sal_uInt16 nErr = XOutBitmap::WriteGraphic( pGrfNd->GetGrf(), aGrfNm,
String::CreateFromAscii("JPG"), nFlags, &aMM100Size );
if( nErr ) // fehlerhaft, da ist nichts auszugeben
{
@@ -1626,7 +1626,7 @@ static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
rWrt.CopyLocalFileToINet( aGrfNm );
}
- ULONG nFrmFlags = bInCntnr ? HTML_FRMOPTS_IMG_CNTNR : HTML_FRMOPTS_IMG;
+ sal_uLong nFrmFlags = bInCntnr ? HTML_FRMOPTS_IMG_CNTNR : HTML_FRMOPTS_IMG;
if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bInCntnr )
nFrmFlags |= HTML_FRMOPTS_IMG_CSS1;
OutHTML_Image( rWrt, rFrmFmt, aGrfNm, pGrfNd->GetTitle(),
@@ -1646,21 +1646,21 @@ static Writer& OutHTML_FrmFmtAsMarquee( Writer& rWrt, const SwFrmFmt& rFrmFmt,
const SfxItemSet& rFmtItemSet = rFrmFmt.GetAttrSet();
SfxItemSet aItemSet( *rFmtItemSet.GetPool(), RES_CHRATR_BEGIN,
RES_CHRATR_END );
- SwHTMLWriter::GetEEAttrsFromDrwObj( aItemSet, &rSdrObj, TRUE );
- BOOL bCfgOutStylesOld = rHTMLWrt.bCfgOutStyles;
- rHTMLWrt.bCfgOutStyles = FALSE;
- rHTMLWrt.bTxtAttr = TRUE;
- rHTMLWrt.bTagOn = TRUE;
- Out_SfxItemSet( aHTMLAttrFnTab, rWrt, aItemSet, FALSE );
- rHTMLWrt.bTxtAttr = FALSE;
+ SwHTMLWriter::GetEEAttrsFromDrwObj( aItemSet, &rSdrObj, sal_True );
+ sal_Bool bCfgOutStylesOld = rHTMLWrt.bCfgOutStyles;
+ rHTMLWrt.bCfgOutStyles = sal_False;
+ rHTMLWrt.bTxtAttr = sal_True;
+ rHTMLWrt.bTagOn = sal_True;
+ Out_SfxItemSet( aHTMLAttrFnTab, rWrt, aItemSet, sal_False );
+ rHTMLWrt.bTxtAttr = sal_False;
OutHTML_DrawFrmFmtAsMarquee( rHTMLWrt,
(const SwDrawFrmFmt &)rFrmFmt,
rSdrObj );
- rHTMLWrt.bTxtAttr = TRUE;
- rHTMLWrt.bTagOn = FALSE;
- Out_SfxItemSet( aHTMLAttrFnTab, rWrt, aItemSet, FALSE );
- rHTMLWrt.bTxtAttr = FALSE;
+ rHTMLWrt.bTxtAttr = sal_True;
+ rHTMLWrt.bTagOn = sal_False;
+ Out_SfxItemSet( aHTMLAttrFnTab, rWrt, aItemSet, sal_False );
+ rHTMLWrt.bTxtAttr = sal_False;
rHTMLWrt.bCfgOutStyles = bCfgOutStylesOld;
return rWrt;
@@ -1669,7 +1669,7 @@ static Writer& OutHTML_FrmFmtAsMarquee( Writer& rWrt, const SwFrmFmt& rFrmFmt,
//-----------------------------------------------------------------------
Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
- BOOL bHeader )
+ sal_Bool bHeader )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -1686,7 +1686,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
// <DL> bzw. </DL> immer einer Absatz-Abstand entsteht, wird der
// ggf. abgezogen.
const SvxULSpaceItem& rULSpace = rFrmFmt.GetULSpace();
- USHORT nSize = bHeader ? rULSpace.GetLower() : rULSpace.GetUpper();
+ sal_uInt16 nSize = bHeader ? rULSpace.GetLower() : rULSpace.GetUpper();
rHTMLWrt.nHeaderFooterSpace = nSize;
ByteString aSpacer;
@@ -1694,7 +1694,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
nSize > HTML_PARSPACE && Application::GetDefaultDevice() )
{
nSize -= HTML_PARSPACE;
- nSize = (INT16)Application::GetDefaultDevice()
+ nSize = (sal_Int16)Application::GetDefaultDevice()
->LogicToPixel( Size(nSize,0), MapMode(MAP_TWIP) ).Width();
((((((((aSpacer = OOO_STRING_SVTOOLS_HTML_spacer) += ' ')
@@ -1703,7 +1703,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
}
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
const SwStartNode* pSttNd = rWrt.pDoc->GetNodes()[nStt]->GetStartNode();
OSL_ENSURE( pSttNd, "Wo ist der Start-Node" );
@@ -1721,9 +1721,9 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
pSttNd->EndOfSectionIndex() );
if( bHeader )
- rHTMLWrt.bOutHeader = TRUE;
+ rHTMLWrt.bOutHeader = sal_True;
else
- rHTMLWrt.bOutFooter = TRUE;
+ rHTMLWrt.bOutFooter = sal_True;
rHTMLWrt.Out_SwDoc( rWrt.pCurPam );
}
@@ -1736,7 +1736,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
rHTMLWrt.DecIndentLevel(); // den Inhalt von Multicol einruecken;
rHTMLWrt.OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_division, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_division, sal_False );
rHTMLWrt.nHeaderFooterSpace = 0;
@@ -1799,14 +1799,14 @@ void SwHTMLWriter::AddLinkTarget( const String& rURL )
else if( sCmp.EqualsAscii( pMarkToOutline ) )
{
// Hier brauchen wir Position und Name. Deshalb sortieren wir
- // ein USHORT und ein String-Array selbst
+ // ein sal_uInt16 und ein String-Array selbst
String aOutline( aURL.Copy( 0, nPos-1 ) );
SwPosition aPos( *pCurPam->GetPoint() );
if( pDoc->GotoOutline( aPos, aOutline ) )
{
- ULONG nIdx = aPos.nNode.GetIndex();
+ sal_uLong nIdx = aPos.nNode.GetIndex();
- USHORT nIns=0;
+ sal_uInt16 nIns=0;
while( nIns < aOutlineMarkPoss.Count() &&
aOutlineMarkPoss[nIns] < nIdx )
nIns++;
@@ -1832,10 +1832,10 @@ void SwHTMLWriter::CollectLinkTargets()
const SwTxtINetFmt* pTxtAttr;
const SwTxtNode* pTxtNd;
- USHORT n, nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_TXTATR_INETFMT );
+ sal_uInt32 n, nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT );
for( n = 0; n < nMaxItems; ++n )
{
- if( 0 != (pINetFmt = (SwFmtINetFmt*)pDoc->GetAttrPool().GetItem(
+ if( 0 != (pINetFmt = (SwFmtINetFmt*)pDoc->GetAttrPool().GetItem2(
RES_TXTATR_INETFMT, n ) ) &&
0 != ( pTxtAttr = pINetFmt->GetTxtINetFmt()) &&
0 != ( pTxtNd = pTxtAttr->GetpTxtNode() ) &&
@@ -1846,17 +1846,17 @@ void SwHTMLWriter::CollectLinkTargets()
}
const SwFmtURL *pURL;
- nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_URL );
+ nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_URL );
for( n = 0; n < nMaxItems; ++n )
{
- if( 0 != (pURL = (SwFmtURL*)pDoc->GetAttrPool().GetItem(
+ if( 0 != (pURL = (SwFmtURL*)pDoc->GetAttrPool().GetItem2(
RES_URL, n ) ) )
{
AddLinkTarget( pURL->GetURL() );
const ImageMap *pIMap = pURL->GetMap();
if( pIMap )
{
- for( USHORT i=0; i<pIMap->GetIMapObjectCount(); i++ )
+ for( sal_uInt16 i=0; i<pIMap->GetIMapObjectCount(); i++ )
{
const IMapObject* pObj = pIMap->GetIMapObject( i );
if( pObj )
@@ -1873,7 +1873,7 @@ void SwHTMLWriter::CollectLinkTargets()
SwHTMLPosFlyFrm::SwHTMLPosFlyFrm( const SwPosFlyFrm& rPosFly,
const SdrObject *pSdrObj,
- BYTE nOutMode ) :
+ sal_uInt8 nOutMode ) :
pFrmFmt( &rPosFly.GetFmt() ),
pSdrObject( pSdrObj ),
pNdIdx( new SwNodeIndex( rPosFly.GetNdIndex() ) ),
@@ -1905,7 +1905,7 @@ SwHTMLPosFlyFrm::SwHTMLPosFlyFrm( const SwPosFlyFrm& rPosFly,
}
}
-BOOL SwHTMLPosFlyFrm::operator<( const SwHTMLPosFlyFrm& rFrm ) const
+sal_Bool SwHTMLPosFlyFrm::operator<( const SwHTMLPosFlyFrm& rFrm ) const
{
if( pNdIdx->GetIndex() == rFrm.pNdIdx->GetIndex() )
{
diff --git a/sw/source/filter/html/htmlfly.hxx b/sw/source/filter/html/htmlfly.hxx
index 0eb14de5d311..e18cfcc100f1 100644
--- a/sw/source/filter/html/htmlfly.hxx
+++ b/sw/source/filter/html/htmlfly.hxx
@@ -85,31 +85,31 @@ enum SwHTMLFrmType
#define HTML_CNTNR_MASK 0xc0
-const USHORT MAX_FRMTYPES = HTML_FRMTYPE_END;
-const USHORT MAX_BROWSERS = 4;
+const sal_uInt16 MAX_FRMTYPES = HTML_FRMTYPE_END;
+const sal_uInt16 MAX_BROWSERS = 4;
-extern BYTE aHTMLOutFrmPageFlyTable[MAX_FRMTYPES][MAX_BROWSERS];
-extern BYTE aHTMLOutFrmParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS];
-extern BYTE aHTMLOutFrmParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS];
-extern BYTE aHTMLOutFrmParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS];
-extern BYTE aHTMLOutFrmAsCharTable[MAX_FRMTYPES][MAX_BROWSERS];
+extern sal_uInt8 aHTMLOutFrmPageFlyTable[MAX_FRMTYPES][MAX_BROWSERS];
+extern sal_uInt8 aHTMLOutFrmParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS];
+extern sal_uInt8 aHTMLOutFrmParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS];
+extern sal_uInt8 aHTMLOutFrmParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS];
+extern sal_uInt8 aHTMLOutFrmAsCharTable[MAX_FRMTYPES][MAX_BROWSERS];
class SwHTMLPosFlyFrm
{
const SwFrmFmt *pFrmFmt; // der Rahmen
const SdrObject *pSdrObject; // ggf. Sdr-Objekt
SwNodeIndex *pNdIdx; // Node-Index
- UINT32 nOrdNum; // Aus SwPosFlyFrm
+ sal_uInt32 nOrdNum; // Aus SwPosFlyFrm
xub_StrLen nCntntIdx; // seine Position im Content
- BYTE nOutputMode; // Ausgabe-Infos
+ sal_uInt8 nOutputMode; // Ausgabe-Infos
public:
SwHTMLPosFlyFrm( const SwPosFlyFrm& rPosFly,
- const SdrObject *pSdrObj, BYTE nOutMode );
+ const SdrObject *pSdrObj, sal_uInt8 nOutMode );
- BOOL operator==( const SwHTMLPosFlyFrm& ) const { return FALSE; }
- BOOL operator<( const SwHTMLPosFlyFrm& ) const;
+ sal_Bool operator==( const SwHTMLPosFlyFrm& ) const { return sal_False; }
+ sal_Bool operator<( const SwHTMLPosFlyFrm& ) const;
const SwFrmFmt& GetFmt() const { return *pFrmFmt; }
const SdrObject *GetSdrObject() const { return pSdrObject; }
@@ -118,15 +118,15 @@ public:
xub_StrLen GetCntntIndex() const { return nCntntIdx; }
- BYTE GetOutMode() const { return nOutputMode; }
+ sal_uInt8 GetOutMode() const { return nOutputMode; }
- static BYTE GetOutFn( BYTE nMode ) { return nMode & HTML_OUT_MASK; }
- static BYTE GetOutPos( BYTE nMode ) { return nMode & HTML_POS_MASK; }
- static BYTE GetOutCntnr( BYTE nMode ) { return nMode & HTML_CNTNR_MASK; }
+ static sal_uInt8 GetOutFn( sal_uInt8 nMode ) { return nMode & HTML_OUT_MASK; }
+ static sal_uInt8 GetOutPos( sal_uInt8 nMode ) { return nMode & HTML_POS_MASK; }
+ static sal_uInt8 GetOutCntnr( sal_uInt8 nMode ) { return nMode & HTML_CNTNR_MASK; }
- BYTE GetOutFn() const { return nOutputMode & HTML_OUT_MASK; }
- BYTE GetOutPos() const { return nOutputMode & HTML_POS_MASK; }
- BYTE GetOutCntnr() const { return nOutputMode & HTML_CNTNR_MASK; }
+ sal_uInt8 GetOutFn() const { return nOutputMode & HTML_OUT_MASK; }
+ sal_uInt8 GetOutPos() const { return nOutputMode & HTML_POS_MASK; }
+ sal_uInt8 GetOutCntnr() const { return nOutputMode & HTML_CNTNR_MASK; }
};
typedef SwHTMLPosFlyFrm *SwHTMLPosFlyFrmPtr;
diff --git a/sw/source/filter/html/htmlflyt.cxx b/sw/source/filter/html/htmlflyt.cxx
index 454faca19a88..5e5023b2470d 100644
--- a/sw/source/filter/html/htmlflyt.cxx
+++ b/sw/source/filter/html/htmlflyt.cxx
@@ -32,9 +32,9 @@
#include "htmlfly.hxx"
-#define TE(t,p,c) (BYTE)( HTML_OUT_##t | HTML_POS_##p | HTML_CNTNR_##c )
+#define TE(t,p,c) (sal_uInt8)( HTML_OUT_##t | HTML_POS_##p | HTML_CNTNR_##c )
-BYTE aHTMLOutFrmPageFlyTable[MAX_FRMTYPES][MAX_BROWSERS] =
+sal_uInt8 aHTMLOutFrmPageFlyTable[MAX_FRMTYPES][MAX_BROWSERS] =
{
{
// Textrahmen mit Tabelle
@@ -130,7 +130,7 @@ BYTE aHTMLOutFrmPageFlyTable[MAX_FRMTYPES][MAX_BROWSERS] =
}
};
-BYTE aHTMLOutFrmParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS] =
+sal_uInt8 aHTMLOutFrmParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS] =
{
{
// Textrahmen mit Tabelle
@@ -227,7 +227,7 @@ BYTE aHTMLOutFrmParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS] =
}
};
-BYTE aHTMLOutFrmParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS] =
+sal_uInt8 aHTMLOutFrmParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS] =
{
{
// Textrahmen mit Tabelle
@@ -323,7 +323,7 @@ BYTE aHTMLOutFrmParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS] =
}
};
-BYTE aHTMLOutFrmParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS] =
+sal_uInt8 aHTMLOutFrmParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS] =
{
{
// Textrahmen mit Tabelle
@@ -419,7 +419,7 @@ BYTE aHTMLOutFrmParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS] =
}
};
-BYTE aHTMLOutFrmAsCharTable[MAX_FRMTYPES][MAX_BROWSERS] =
+sal_uInt8 aHTMLOutFrmAsCharTable[MAX_FRMTYPES][MAX_BROWSERS] =
{
{
// Textrahmen mit Tabelle
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index efd1441e82b4..4b3b6fb0034d 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -545,7 +545,7 @@ void SwHTMLImageWatcher::init( sal_Int32 Width, sal_Int32 Height )
SwNode *pANd;
SwTableNode *pTblNd;
if( pAPos &&
- 0 != (pANd = pDoc->GetNodes()[pAPos->nNode]) &&
+ 0 != (pANd = & pAPos->nNode.GetNode()) &&
0 != (pTblNd = pANd->FindTableNode()) )
{
const sal_Bool bLastGrf = !pTblNd->GetTable().DecGrfsThatResize();
@@ -1167,7 +1167,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
SVX_CSS1_LTYPE_TWIP == rCSS1PropInfo.eTopType )
{
const SwStartNode *pFlySttNd =
- pDoc->GetNodes()[pPam->GetPoint()->nNode]->FindFlyStartNode();
+ pPam->GetPoint()->nNode.GetNode().FindFlyStartNode();
if( pFlySttNd )
{
@@ -1347,7 +1347,7 @@ void SwHTMLParser::NewForm( sal_Bool bAppend )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
ScriptType eScriptType2 = eDfltScriptType;
- sal_uInt16 nEvent;
+ sal_uInt16 nEvent = 0;
sal_Bool bSetEvent = sal_False;
switch( pOption->GetToken() )
@@ -1521,7 +1521,7 @@ void SwHTMLParser::InsertInput()
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
ScriptType eScriptType2 = eDfltScriptType;
- sal_uInt16 nEvent;
+ sal_uInt16 nEvent = 0;
sal_Bool bSetEvent = sal_False;
switch( pOption->GetToken() )
@@ -1734,7 +1734,7 @@ void SwHTMLParser::InsertInput()
if( bDisabled )
{
- BOOL bFalse = sal_False;
+ sal_Bool bFalse = sal_False;
aTmp.setValue(&bFalse, ::getBooleanCppuType() );
xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")), aTmp );
}
@@ -2012,7 +2012,7 @@ void SwHTMLParser::NewTextArea()
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
ScriptType eScriptType2 = eDfltScriptType;
- sal_uInt16 nEvent;
+ sal_uInt16 nEvent = 0;
sal_Bool bSetEvent = sal_False;
switch( pOption->GetToken() )
@@ -2127,7 +2127,7 @@ void SwHTMLParser::NewTextArea()
aTmp <<= OUString(sName);
xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), aTmp );
- BOOL bTrue = sal_True;
+ sal_Bool bTrue = sal_True;
aTmp.setValue( &bTrue, ::getBooleanCppuType() );
xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("MultiLine")),
aTmp );
@@ -2150,7 +2150,7 @@ void SwHTMLParser::NewTextArea()
if( bDisabled )
{
- BOOL bFalse = sal_False;
+ sal_Bool bFalse = sal_False;
aTmp.setValue( &bFalse, ::getBooleanCppuType() );
xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")),
aTmp );
@@ -2302,7 +2302,7 @@ void SwHTMLParser::NewSelect()
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
ScriptType eScriptType2 = eDfltScriptType;
- sal_uInt16 nEvent;
+ sal_uInt16 nEvent = 0;
sal_Bool bSetEvent = sal_False;
switch( pOption->GetToken() )
@@ -2415,7 +2415,7 @@ void SwHTMLParser::NewSelect()
if( bDisabled )
{
- BOOL bFalse = sal_False;
+ sal_Bool bFalse = sal_False;
aTmp.setValue( &bFalse, ::getBooleanCppuType() );
xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")),
aTmp );
@@ -2425,7 +2425,7 @@ void SwHTMLParser::NewSelect()
sal_Bool bMinWidth = sal_True, bMinHeight = sal_True;
if( !bMultiple && 1==nSelectEntryCnt )
{
- BOOL bTrue = sal_True;
+ sal_Bool bTrue = sal_True;
aTmp.setValue( &bTrue, ::getBooleanCppuType() );
xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Dropdown")),
aTmp );
@@ -2437,7 +2437,7 @@ void SwHTMLParser::NewSelect()
if( bMultiple )
{
- BOOL bTrue = sal_True;
+ sal_Bool bTrue = sal_True;
aTmp.setValue( &bTrue, ::getBooleanCppuType() );
xPropSet->setPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("MultiSelection")), aTmp );
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index 67e4e3020a74..47ce516701f2 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -100,7 +100,7 @@ struct HTMLControl
{
// die Form, zu der das Control gehoert
uno::Reference< container::XIndexContainer > xFormComps;
- ULONG nNdIdx; // der Node, in dem es verankert ist
+ sal_uLong nNdIdx; // der Node, in dem es verankert ist
xub_StrLen nCount; // wie viele Controls sind in dem Node
HTMLControl( const uno::Reference< container::XIndexContainer > & rForm,
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index 286d3210ded5..700c1233378b 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -56,8 +56,8 @@ struct SwHTMLFootEndNote_Impl
String sName;
String sContent; // Infos fuer die letzte Fussnote
- BOOL bEndNote;
- BOOL bFixed;
+ sal_Bool bEndNote;
+ sal_Bool bFixed;
};
@@ -72,7 +72,7 @@ xub_StrLen lcl_html_getNextPart( String& rPart, const String& rContent,
}
else
{
- BOOL bQuoted = FALSE, bDone = FALSE;
+ sal_Bool bQuoted = sal_False, bDone = sal_False;
for( ; nPos < nLen && !bDone; nPos++ )
{
sal_Unicode c = rContent.GetChar( nPos );
@@ -88,13 +88,13 @@ xub_StrLen lcl_html_getNextPart( String& rPart, const String& rContent,
if( bQuoted )
rPart += c;
else
- bDone = TRUE;
- bQuoted = FALSE;
+ bDone = sal_True;
+ bQuoted = sal_False;
break;
default:
rPart += c;
- bQuoted = FALSE;
+ bQuoted = sal_False;
break;
}
}
@@ -105,10 +105,10 @@ xub_StrLen lcl_html_getNextPart( String& rPart, const String& rContent,
xub_StrLen lcl_html_getEndNoteInfo( SwEndNoteInfo& rInfo,
const String& rContent,
- BOOL bEndNote )
+ sal_Bool bEndNote )
{
xub_StrLen nStrPos = 0;
- for( USHORT nPart = 0; nPart < 4; nPart++ )
+ for( sal_uInt16 nPart = 0; nPart < 4; nPart++ )
{
String aPart;
if( STRING_MAXLEN != nStrPos )
@@ -124,7 +124,7 @@ xub_StrLen lcl_html_getEndNoteInfo( SwEndNoteInfo& rInfo,
break;
case 1:
- rInfo.nFtnOffset = aPart.Len() == 0 ? 0 : (USHORT)aPart.ToInt32();
+ rInfo.nFtnOffset = aPart.Len() == 0 ? 0 : (sal_uInt16)aPart.ToInt32();
break;
case 2:
@@ -143,7 +143,7 @@ xub_StrLen lcl_html_getEndNoteInfo( SwEndNoteInfo& rInfo,
void SwHTMLParser::FillEndNoteInfo( const String& rContent )
{
SwEndNoteInfo aInfo( pDoc->GetEndNoteInfo() );
- lcl_html_getEndNoteInfo( aInfo, rContent, TRUE );
+ lcl_html_getEndNoteInfo( aInfo, rContent, sal_True );
pDoc->SetEndNoteInfo( aInfo );
}
@@ -151,9 +151,9 @@ void SwHTMLParser::FillFootNoteInfo( const String& rContent )
{
SwFtnInfo aInfo( pDoc->GetFtnInfo() );
- xub_StrLen nStrPos = lcl_html_getEndNoteInfo( aInfo, rContent, FALSE );
+ xub_StrLen nStrPos = lcl_html_getEndNoteInfo( aInfo, rContent, sal_False );
- for( USHORT nPart = 4; nPart < 8; nPart++ )
+ for( sal_uInt16 nPart = 4; nPart < 8; nPart++ )
{
String aPart;
if( STRING_MAXLEN != nStrPos )
@@ -199,8 +199,8 @@ void SwHTMLParser::FillFootNoteInfo( const String& rContent )
pDoc->SetFtnInfo( aInfo );
}
-void SwHTMLParser::InsertFootEndNote( const String& rName, BOOL bEndNote,
- BOOL bFixed )
+void SwHTMLParser::InsertFootEndNote( const String& rName, sal_Bool bEndNote,
+ sal_Bool bFixed )
{
if( !pFootEndNoteImpl )
pFootEndNoteImpl = new SwHTMLFootEndNote_Impl;
@@ -240,7 +240,7 @@ void SwHTMLParser::FinishFootEndNote()
}
pFootEndNoteImpl->sName = aEmptyStr;
pFootEndNoteImpl->sContent = aEmptyStr;
- pFootEndNoteImpl->bFixed = FALSE;
+ pFootEndNoteImpl->bFixed = sal_False;
}
void SwHTMLParser::InsertFootEndNoteText()
@@ -265,8 +265,8 @@ SwNodeIndex *SwHTMLParser::GetFootEndNoteSection( const String& rName )
// TODO: ToUpperAscii
aName.ToUpperAscii();
- USHORT nCount = pFootEndNoteImpl->aNames.Count();
- for( USHORT i=0; i<nCount; i++ )
+ sal_uInt16 nCount = pFootEndNoteImpl->aNames.Count();
+ for( sal_uInt16 i=0; i<nCount; i++ )
{
if( *pFootEndNoteImpl->aNames[i] == aName )
{
@@ -297,7 +297,7 @@ Writer& OutHTML_SwFmtFtn( Writer& rWrt, const SfxPoolItem& rHt )
return rWrt;
String sFtnName, sClass;
- USHORT nPos;
+ sal_uInt16 nPos;
if( rFmtFtn.IsEndNote() )
{
nPos = rHTMLWrt.pFootEndNotes ? rHTMLWrt.pFootEndNotes->Count() : 0;
@@ -334,12 +334,12 @@ Writer& OutHTML_SwFmtFtn( Writer& rWrt, const SfxPoolItem& rHt )
(sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_sdfixed;
sOut += '>';
rWrt.Strm() << sOut.GetBuffer();
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_superscript, TRUE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_superscript, sal_True );
HTMLOutFuncs::Out_String( rWrt.Strm(), rFmtFtn.GetViewNumStr(*rWrt.pDoc),
rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_superscript, FALSE );
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_anchor, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_superscript, sal_False );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_anchor, sal_False );
return rWrt;
}
@@ -352,11 +352,11 @@ void SwHTMLWriter::OutFootEndNotes()
return;
#if OSL_DEBUG_LEVEL > 1
- USHORT nFtn = nFootNote, nEn = nEndNote;
+ sal_uInt16 nFtn = nFootNote, nEn = nEndNote;
#endif
nFootNote = 0, nEndNote = 0;
- for( USHORT i=0; i<pFootEndNotes->Count(); i++ )
+ for( sal_uInt16 i=0; i<pFootEndNotes->Count(); i++ )
{
SwTxtFtn *pTxtFtn = (*pFootEndNotes)[i];
pFmtFtn = &pTxtFtn->GetFtn();
@@ -383,7 +383,7 @@ void SwHTMLWriter::OutFootEndNotes()
HTMLOutFuncs::Out_String( Strm(), sFtnName, eDestEnc, &aNonConvertableCharacters );
Strm() << "\">";
- bLFPossible = TRUE;
+ bLFPossible = sal_True;
IncIndentLevel(); // Inhalt von <DIV> einruecken
OSL_ENSURE( pTxtFtn, "SwHTMLWriter::OutFootEndNotes: SwTxtFtn fehlt" );
@@ -393,15 +393,15 @@ void SwHTMLWriter::OutFootEndNotes()
if( pSttNdIdx )
{
HTMLSaveData aSaveData( *this, pSttNdIdx->GetIndex()+1,
- pSttNdIdx->GetNode().EndOfSectionIndex(), FALSE );
+ pSttNdIdx->GetNode().EndOfSectionIndex(), sal_False );
Out_SwDoc( pCurPam );
}
DecIndentLevel(); // Inhalt von <DIV> einruecken
if( bLFPossible )
OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_division, FALSE );
- bLFPossible = TRUE;
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_division, sal_False );
+ bLFPossible = sal_True;
OSL_ENSURE( !pFmtFtn,
"SwHTMLWriter::OutFootEndNotes: Ftn wurde nicht ausgegeben" );
@@ -498,14 +498,14 @@ void SwHTMLWriter::OutFootEndNoteSym( const SwFmtFtn& rFmtFtn,
Strm() << sOut.GetBuffer();
HTMLOutFuncs::Out_String( Strm(), rNum, eDestEnc, &aNonConvertableCharacters );
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_anchor, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_anchor, sal_False );
}
-USHORT lcl_html_fillEndNoteInfo( const SwEndNoteInfo& rInfo,
+sal_uInt16 lcl_html_fillEndNoteInfo( const SwEndNoteInfo& rInfo,
String *pParts,
- BOOL bEndNote )
+ sal_Bool bEndNote )
{
- USHORT nParts = 0;
+ sal_uInt16 nParts = 0;
sal_Int16 eFmt = rInfo.aFmt.GetNumberingType();
if( (bEndNote ? SVX_NUM_ROMAN_LOWER : SVX_NUM_ARABIC) != eFmt )
{
@@ -536,12 +536,12 @@ USHORT lcl_html_fillEndNoteInfo( const SwEndNoteInfo& rInfo,
}
void lcl_html_outFootEndNoteInfo( Writer& rWrt, String *pParts,
- USHORT nParts, const sal_Char *pName )
+ sal_uInt16 nParts, const sal_Char *pName )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
String aContent;
- for( USHORT i=0; i<nParts; i++ )
+ for( sal_uInt16 i=0; i<nParts; i++ )
{
xub_StrLen nPos = 0;
String aTmp( pParts[i] );
@@ -583,7 +583,7 @@ void SwHTMLWriter::OutFootEndNoteInfo()
{
const SwFtnInfo& rInfo = pDoc->GetFtnInfo();
String aParts[8];
- USHORT nParts = lcl_html_fillEndNoteInfo( rInfo, aParts, FALSE );
+ sal_uInt16 nParts = lcl_html_fillEndNoteInfo( rInfo, aParts, sal_False );
if( rInfo.eNum != FTNNUM_DOC )
{
aParts[4] = rInfo.eNum == FTNNUM_CHAPTER ? 'C' : 'P';
@@ -612,7 +612,7 @@ void SwHTMLWriter::OutFootEndNoteInfo()
{
const SwEndNoteInfo& rInfo = pDoc->GetEndNoteInfo();
String aParts[4];
- USHORT nParts = lcl_html_fillEndNoteInfo( rInfo, aParts, TRUE );
+ sal_uInt16 nParts = lcl_html_fillEndNoteInfo( rInfo, aParts, sal_True );
if( nParts > 0 )
lcl_html_outFootEndNoteInfo( *this, aParts, nParts,
OOO_STRING_SVTOOLS_HTML_META_sdendnote );
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 34d446ad5306..82c2e41aa403 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -112,7 +112,7 @@ ImageMap *SwHTMLParser::FindImageMap( const String& rName ) const
if( pImageMaps )
{
- for( USHORT i=0; i<pImageMaps->Count(); i++ )
+ for( sal_uInt16 i=0; i<pImageMaps->Count(); i++ )
{
ImageMap *pIMap = (*pImageMaps)[i];
if( rName.EqualsIgnoreCaseAscii( pIMap->GetName() ) )
@@ -129,8 +129,8 @@ void SwHTMLParser::ConnectImageMaps()
{
SwNodes& rNds = pDoc->GetNodes();
// auf den Start-Node der 1. Section
- ULONG nIdx = rNds.GetEndOfAutotext().StartOfSectionIndex() + 1;
- ULONG nEndIdx = rNds.GetEndOfAutotext().GetIndex();
+ sal_uLong nIdx = rNds.GetEndOfAutotext().StartOfSectionIndex() + 1;
+ sal_uLong nEndIdx = rNds.GetEndOfAutotext().GetIndex();
SwGrfNode* pGrfNd;
while( nMissingImgMaps > 0 && nIdx < nEndIdx )
@@ -164,7 +164,7 @@ void SwHTMLParser::ConnectImageMaps()
}
-/* */
+/* */
void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
sal_Int16 eHoriOri,
@@ -173,7 +173,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
SfxItemSet& rFrmItemSet )
{
const SfxItemSet *pCntnrItemSet = 0;
- USHORT i = aContexts.Count();
+ sal_uInt16 i = aContexts.Count();
while( !pCntnrItemSet && i > nContextStMin )
pCntnrItemSet = aContexts[--i]->GetFrmItemSet();
@@ -183,7 +183,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
// des Containers uebernommen.
rFrmItemSet.Put( *pCntnrItemSet );
}
- else if( pCSS1Parser->MayBePositioned( rCSS1PropInfo, TRUE ) )
+ else if( pCSS1Parser->MayBePositioned( rCSS1PropInfo, sal_True ) )
{
// Wenn die Ausrichtung anhand der CSS1-Optionen gesetzt werden kann
// werden die benutzt.
@@ -200,16 +200,16 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
sal_Int16 eHoriOri,
SfxItemSet& rFrmSet,
- BOOL bDontAppend )
+ sal_Bool bDontAppend )
{
- BOOL bMoveBackward = FALSE;
+ sal_Bool bMoveBackward = sal_False;
SwFmtAnchor aAnchor( FLY_AS_CHAR );
sal_Int16 eVertRel = text::RelOrientation::FRAME;
if( text::HoriOrientation::NONE != eHoriOri )
{
// den Absatz-Einzug bestimmen
- USHORT nLeftSpace = 0, nRightSpace = 0;
+ sal_uInt16 nLeftSpace = 0, nRightSpace = 0;
short nIndent = 0;
GetMarginsFromContextWithNumBul( nLeftSpace, nRightSpace, nIndent );
@@ -238,15 +238,15 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
// Einen neuen Absatz aufmachen, wenn der aktuelle
// absatzgebundene Rahmen ohne Umlauf enthaelt.
- if( !bDontAppend && HasCurrentParaFlys( TRUE ) )
+ if( !bDontAppend && HasCurrentParaFlys( sal_True ) )
{
// Wenn der Absatz nur Grafiken enthaelt, braucht er
// auch keinen unteren Absatz-Abstand. Da hier auch bei
// Verwendung von Styles kein Abstand enstehen soll, wird
// hier auch geweohnlich attributiert !!!
- USHORT nUpper=0, nLower=0;
+ sal_uInt16 nUpper=0, nLower=0;
GetULSpaceFromContext( nUpper, nLower );
- InsertAttr( SvxULSpaceItem( nUpper, 0, RES_UL_SPACE ), FALSE, TRUE );
+ InsertAttr( SvxULSpaceItem( nUpper, 0, RES_UL_SPACE ), sal_False, sal_True );
AppendTxtNode( AM_NOSPACE );
@@ -254,7 +254,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
{
NewAttr( &aAttrTab.pULSpace, SvxULSpaceItem( 0, nLower, RES_UL_SPACE ) );
aParaAttrs.Insert( aAttrTab.pULSpace, aParaAttrs.Count() );
- EndAttr( aAttrTab.pULSpace, 0, FALSE );
+ EndAttr( aAttrTab.pULSpace, 0, sal_False );
}
}
@@ -263,7 +263,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
if( nCntnt )
{
aAnchor.SetType( FLY_AT_CHAR );
- bMoveBackward = TRUE;
+ bMoveBackward = sal_True;
eVertOri = text::VertOrientation::CHAR_BOTTOM;
eVertRel = text::RelOrientation::CHAR;
}
@@ -300,12 +300,11 @@ void SwHTMLParser::RegisterFlyFrm( SwFrmFmt *pFlyFmt )
SURROUND_THROUGHT == pFlyFmt->GetSurround().GetSurround() )
{
aMoveFlyFrms.Insert( pFlyFmt, aMoveFlyFrms.Count() );
- aMoveFlyCnts.Insert( pPam->GetPoint()->nContent.GetIndex(),
- aMoveFlyCnts.Count() );
+ aMoveFlyCnts.push_back( pPam->GetPoint()->nContent.GetIndex() );
}
}
-/* */
+/* */
void SwHTMLParser::GetDefaultScriptType( ScriptType& rType,
String& rTypeStr ) const
@@ -317,7 +316,7 @@ void SwHTMLParser::GetDefaultScriptType( ScriptType& rType,
rTypeStr = GetScriptTypeString( pHeaderAttrs );
}
-/* */
+/* */
void SwHTMLParser::InsertImage()
{
@@ -328,10 +327,10 @@ void SwHTMLParser::InsertImage()
long nWidth=0, nHeight=0;
long nVSpace=0, nHSpace=0;
- USHORT nBorder = (aAttrTab.pINetFmt ? 1 : 0);
- BOOL bIsMap = FALSE;
- BOOL bPrcWidth = FALSE;
- BOOL bPrcHeight = FALSE;
+ sal_uInt16 nBorder = (aAttrTab.pINetFmt ? 1 : 0);
+ sal_Bool bIsMap = sal_False;
+ sal_Bool bPrcWidth = sal_False;
+ sal_Bool bPrcHeight = sal_False;
SvxMacroItem aMacroItem(RES_FRMMACRO);
ScriptType eDfltScriptType;
@@ -339,9 +338,9 @@ void SwHTMLParser::InsertImage()
GetDefaultScriptType( eDfltScriptType, sDfltScriptType );
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
- USHORT nEvent = 0;
+ sal_uInt16 nEvent = 0;
ScriptType eScriptType2 = eDfltScriptType;
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -392,10 +391,10 @@ void SwHTMLParser::InsertImage()
sAltNm = pOption->GetString();
break;
case HTML_O_BORDER:
- nBorder = (USHORT)pOption->GetNumber();
+ nBorder = (sal_uInt16)pOption->GetNumber();
break;
case HTML_O_ISMAP:
- bIsMap = TRUE;
+ bIsMap = sal_True;
break;
case HTML_O_USEMAP:
aMap = pOption->GetString();
@@ -461,7 +460,7 @@ IMAGE_SETEVENT:
// Rule invalisieren ist noetig, weil zwischem dem einlesen
// des LI und der Grafik ein EndAction gerufen worden sein kann.
if( GetNumInfo().GetNumRule() )
- GetNumInfo().GetNumRule()->SetInvalidRule( TRUE );
+ GetNumInfo().GetNumRule()->SetInvalidRule( sal_True );
// Die Vorlage novh mal setzen. Ist noetig, damit der
// Erstzeilen-Einzug stimmt.
@@ -493,12 +492,12 @@ IMAGE_SETEVENT:
SvxBorderLine aVBorderLine;
SvxCSS1Parser::SetBorderWidth( aHBorderLine,
- (USHORT)nHBorderWidth, FALSE );
+ (sal_uInt16)nHBorderWidth, sal_False );
if( nHBorderWidth == nVBorderWidth )
aVBorderLine.SetOutWidth( aHBorderLine.GetOutWidth() );
else
SvxCSS1Parser::SetBorderWidth( aVBorderLine,
- (USHORT)nVBorderWidth, FALSE );
+ (sal_uInt16)nVBorderWidth, sal_False );
// die tatsaechlich gesetzter Rahmenbreite benutzen und nicht die
// Wunschbreite!
@@ -511,7 +510,7 @@ IMAGE_SETEVENT:
((const SwFmtINetFmt&)aAttrTab.pINetFmt->GetItem()).GetValue();
pCSS1Parser->SetATagStyles();
- USHORT nPoolId = static_cast< USHORT >(pDoc->IsVisitedURL( rURL )
+ sal_uInt16 nPoolId = static_cast< sal_uInt16 >(pDoc->IsVisitedURL( rURL )
? RES_POOLCHR_INET_VISIT
: RES_POOLCHR_INET_NORMAL);
const SwCharFmt *pCharFmt = pCSS1Parser->GetCharFmtFromPool( nPoolId );
@@ -558,12 +557,12 @@ IMAGE_SETEVENT:
case SVX_CSS1_LTYPE_TWIP:
aTwipSz.Width() = aPropInfo.nWidth;
nWidth = 1; // != 0
- bPrcWidth = FALSE;
+ bPrcWidth = sal_False;
break;
case SVX_CSS1_LTYPE_PERCENTAGE:
aTwipSz.Width() = 0;
nWidth = aPropInfo.nWidth;
- bPrcWidth = TRUE;
+ bPrcWidth = sal_True;
break;
default:
;
@@ -573,23 +572,23 @@ IMAGE_SETEVENT:
case SVX_CSS1_LTYPE_TWIP:
aTwipSz.Height() = aPropInfo.nHeight;
nHeight = 1; // != 0
- bPrcHeight = FALSE;
+ bPrcHeight = sal_False;
break;
case SVX_CSS1_LTYPE_PERCENTAGE:
aTwipSz.Height() = 0;
nHeight = aPropInfo.nHeight;
- bPrcHeight = TRUE;
+ bPrcHeight = sal_True;
break;
default:
;
}
Size aGrfSz( 0, 0 );
- BOOL bSetTwipSize = TRUE; // Twip-Size am Node setzen?
- BOOL bChangeFrmSize = FALSE; // Frame-Format nachtraeglich anpassen?
- BOOL bRequestGrfNow = FALSE;
- BOOL bSetScaleImageMap = FALSE;
- BYTE nPrcWidth = 0, nPrcHeight = 0;
+ sal_Bool bSetTwipSize = sal_True; // Twip-Size am Node setzen?
+ sal_Bool bChangeFrmSize = sal_False; // Frame-Format nachtraeglich anpassen?
+ sal_Bool bRequestGrfNow = sal_False;
+ sal_Bool bSetScaleImageMap = sal_False;
+ sal_uInt8 nPrcWidth = 0, nPrcHeight = 0;
if( !nWidth || !nHeight )
{
@@ -599,12 +598,12 @@ IMAGE_SETEVENT:
// Tabelle layoutet wird.
if( pTable!=0 && !nWidth )
{
- bRequestGrfNow = TRUE;
+ bRequestGrfNow = sal_True;
IncGrfsThatResizeTable();
}
// Die Groesse des Rahmens wird nachtraeglich gesetzt
- bChangeFrmSize = TRUE;
+ bChangeFrmSize = sal_True;
aGrfSz = aTwipSz;
if( !nWidth && !nHeight )
{
@@ -616,7 +615,7 @@ IMAGE_SETEVENT:
// eine %-Angabe
if( bPrcWidth )
{
- nPrcWidth = (BYTE)nWidth;
+ nPrcWidth = (sal_uInt8)nWidth;
nPrcHeight = 255;
}
else
@@ -628,7 +627,7 @@ IMAGE_SETEVENT:
{
if( bPrcHeight )
{
- nPrcHeight = (BYTE)nHeight;
+ nPrcHeight = (sal_uInt8)nHeight;
nPrcWidth = 255;
}
else
@@ -641,13 +640,13 @@ IMAGE_SETEVENT:
{
// Breite und Hoehe wurden angegeben und brauchen nicht gesetzt
// zu werden
- bSetTwipSize = FALSE;
+ bSetTwipSize = sal_False;
if( bPrcWidth )
- nPrcWidth = (BYTE)nWidth;
+ nPrcWidth = (sal_uInt8)nWidth;
if( bPrcHeight )
- nPrcHeight = (BYTE)nHeight;
+ nPrcHeight = (sal_uInt8)nHeight;
}
// Image-Map setzen
@@ -732,7 +731,7 @@ IMAGE_SETEVENT:
// ggfs. eine Grafik anspringen
if( JUMPTO_GRAPHIC == eJumpTo && sHTMLGrfName == sJmpMark )
{
- bChkJumpMark = TRUE;
+ bChkJumpMark = sal_True;
eJumpTo = JUMPTO_NONE;
}
}
@@ -746,7 +745,7 @@ IMAGE_SETEVENT:
pGrfNd->SetChgTwipSize( bChangeFrmSize, bChangeFrmSize );
if( bSetScaleImageMap )
- pGrfNd->SetScaleImageMap( TRUE );
+ pGrfNd->SetScaleImageMap( sal_True );
if( aAttrTab.pINetFmt )
{
@@ -762,13 +761,13 @@ IMAGE_SETEVENT:
{
const SvxMacro *pMacro;
- static USHORT const aEvents[] = {
+ static sal_uInt16 aEvents[] = {
SFX_EVENT_MOUSEOVER_OBJECT,
SFX_EVENT_MOUSECLICK_OBJECT,
SFX_EVENT_MOUSEOUT_OBJECT,
0 };
- for( USHORT n = 0; aEvents[ n ]; ++n )
+ for( sal_uInt16 n = 0; aEvents[ n ]; ++n )
if( 0 != ( pMacro = rINetFmt.GetMacro( aEvents[ n ] ) ))
aMacroItem.SetMacro( aEvents[ n ], *pMacro );
}
@@ -814,7 +813,7 @@ IMAGE_SETEVENT:
InsertBookmark( aId );
}
-/* */
+/* */
void SwHTMLParser::InsertBodyOptions()
{
@@ -823,20 +822,20 @@ void SwHTMLParser::InsertBodyOptions()
String aBackGround, aId, aStyle, aLang, aDir;
Color aBGColor, aTextColor, aLinkColor, aVLinkColor;
- BOOL bBGColor=FALSE, bTextColor=FALSE;
- BOOL bLinkColor=FALSE, bVLinkColor=FALSE;
+ sal_Bool bBGColor=sal_False, bTextColor=sal_False;
+ sal_Bool bLinkColor=sal_False, bVLinkColor=sal_False;
ScriptType eDfltScriptType;
String sDfltScriptType;
GetDefaultScriptType( eDfltScriptType, sDfltScriptType );
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
ScriptType eScriptType2 = eDfltScriptType;
rtl::OUString aEvent;
- BOOL bSetEvent = FALSE;
+ sal_Bool bSetEvent = sal_False;
switch( pOption->GetToken() )
{
@@ -848,47 +847,47 @@ void SwHTMLParser::InsertBodyOptions()
break;
case HTML_O_BGCOLOR:
pOption->GetColor( aBGColor );
- bBGColor = TRUE;
+ bBGColor = sal_True;
break;
case HTML_O_TEXT:
pOption->GetColor( aTextColor );
- bTextColor = TRUE;
+ bTextColor = sal_True;
break;
case HTML_O_LINK:
pOption->GetColor( aLinkColor );
- bLinkColor = TRUE;
+ bLinkColor = sal_True;
break;
case HTML_O_VLINK:
pOption->GetColor( aVLinkColor );
- bVLinkColor = TRUE;
+ bVLinkColor = sal_True;
break;
case HTML_O_SDONLOAD:
eScriptType2 = STARBASIC;
case HTML_O_ONLOAD:
aEvent = GlobalEventConfig::GetEventName( STR_EVENT_OPENDOC );
- bSetEvent = TRUE;
+ bSetEvent = sal_True;
break;
case HTML_O_SDONUNLOAD:
eScriptType2 = STARBASIC;
case HTML_O_ONUNLOAD:
aEvent = GlobalEventConfig::GetEventName( STR_EVENT_PREPARECLOSEDOC );
- bSetEvent = TRUE;
+ bSetEvent = sal_True;
break;
case HTML_O_SDONFOCUS:
eScriptType2 = STARBASIC;
case HTML_O_ONFOCUS:
aEvent = GlobalEventConfig::GetEventName( STR_EVENT_ACTIVATEDOC );
- bSetEvent = TRUE;
+ bSetEvent = sal_True;
break;
case HTML_O_SDONBLUR:
eScriptType2 = STARBASIC;
case HTML_O_ONBLUR:
aEvent = GlobalEventConfig::GetEventName( STR_EVENT_DEACTIVATEDOC );
- bSetEvent = TRUE;
+ bSetEvent = sal_True;
break;
case HTML_O_ONERROR:
@@ -896,7 +895,7 @@ void SwHTMLParser::InsertBodyOptions()
case HTML_O_STYLE:
aStyle = pOption->GetString();
- bTextColor = TRUE;
+ bTextColor = sal_True;
break;
case HTML_O_LANG:
aLang = pOption->GetString();
@@ -927,7 +926,7 @@ void SwHTMLParser::InsertBodyOptions()
// Die Item fuer die Seitenvorlage vorbereiten (Hintergrund, Umrandung)
// Beim BrushItem muessen schon gesetzte werte erhalten bleiben!
SvxBrushItem aBrushItem( pCSS1Parser->GetPageDescBackground() );
- BOOL bSetBrush = FALSE;
+ sal_Bool bSetBrush = sal_False;
if( bBGColor && !pCSS1Parser->IsBodyBGColorSet() )
{
@@ -944,7 +943,7 @@ void SwHTMLParser::InsertBodyOptions()
aBrushItem.SetGraphicLink( aLink );
aBrushItem.SetGraphicPos( ePos );
}
- bSetBrush = TRUE;
+ bSetBrush = sal_True;
pCSS1Parser->SetBodyBGColorSet();
}
@@ -953,7 +952,7 @@ void SwHTMLParser::InsertBodyOptions()
// Hintergrundgrafik aus "BACKGROUND"
aBrushItem.SetGraphicLink( INetURLObject::GetAbsURL( sBaseURL, aBackGround ) );
aBrushItem.SetGraphicPos( GPOS_TILED );
- bSetBrush = TRUE;
+ bSetBrush = sal_True;
pCSS1Parser->SetBodyBackgroundSet();
}
@@ -970,12 +969,12 @@ void SwHTMLParser::InsertBodyOptions()
&aItemSet );
const SfxPoolItem *pItem;
- static USHORT aWhichIds[3] = { RES_CHRATR_FONTSIZE,
+ static sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONTSIZE,
RES_CHRATR_CJK_FONTSIZE,
RES_CHRATR_CTL_FONTSIZE };
- for( USHORT i=0; i<3; i++ )
+ for( sal_uInt16 i=0; i<3; i++ )
{
- if( SFX_ITEM_SET == aItemSet.GetItemState( aWhichIds[i], FALSE,
+ if( SFX_ITEM_SET == aItemSet.GetItemState( aWhichIds[i], sal_False,
&pItem ) &&
static_cast <const SvxFontHeightItem * >(pItem)->GetProp() != 100)
{
@@ -1042,7 +1041,7 @@ void SwHTMLParser::InsertBodyOptions()
InsertBookmark( aId );
}
-/* */
+/* */
void SwHTMLParser::NewAnchor()
{
@@ -1058,16 +1057,16 @@ void SwHTMLParser::NewAnchor()
SvxMacroTableDtor aMacroTbl;
String sHRef, aName, sTarget;
String aId, aStyle, aClass, aLang, aDir;
- BOOL bHasHRef = FALSE, bFixed = FALSE;
+ sal_Bool bHasHRef = sal_False, bFixed = sal_False;
ScriptType eDfltScriptType;
String sDfltScriptType;
GetDefaultScriptType( eDfltScriptType, sDfltScriptType );
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
- USHORT nEvent = 0;
+ sal_uInt16 nEvent = 0;
ScriptType eScriptType2 = eDfltScriptType;
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -1078,7 +1077,7 @@ void SwHTMLParser::NewAnchor()
case HTML_O_HREF:
sHRef = pOption->GetString();
- bHasHRef = TRUE;
+ bHasHRef = sal_True;
break;
case HTML_O_TARGET:
sTarget = pOption->GetString();
@@ -1094,7 +1093,7 @@ void SwHTMLParser::NewAnchor()
aClass = pOption->GetString();
break;
case HTML_O_SDFIXED:
- bFixed = TRUE;
+ bFixed = sal_True;
break;
case HTML_O_LANG:
aLang = pOption->GetString();
@@ -1170,7 +1169,7 @@ ANCHOR_SETEVENT:
// einen neuen Kontext anlegen
_HTMLAttrContext *pCntxt = new _HTMLAttrContext( HTML_ANCHOR_ON );
- BOOL bEnAnchor = FALSE, bFtnAnchor = FALSE, bFtnEnSymbol = FALSE;
+ sal_Bool bEnAnchor = sal_False, bFtnAnchor = sal_False, bFtnEnSymbol = sal_False;
String aFtnName;
String aStrippedClass( aClass );
SwCSS1Parser::GetScriptFromClass( aStrippedClass, sal_False );
@@ -1179,17 +1178,17 @@ ANCHOR_SETEVENT:
('d' == aStrippedClass.GetChar(1) || 'D' == aStrippedClass.GetChar(1)) )
{
if( aStrippedClass.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_sdendnote_anc ) )
- bEnAnchor = TRUE;
+ bEnAnchor = sal_True;
else if( aStrippedClass.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_sdfootnote_anc ) )
- bFtnAnchor = TRUE;
+ bFtnAnchor = sal_True;
else if( aStrippedClass.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_sdendnote_sym ) ||
aStrippedClass.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_sdfootnote_sym ) )
- bFtnEnSymbol = TRUE;
+ bFtnEnSymbol = sal_True;
if( bEnAnchor || bFtnAnchor || bFtnEnSymbol )
{
aFtnName = sHRef.Copy( 1 );
aClass = aStrippedClass = aName = aEmptyStr;
- bHasHRef = FALSE;
+ bHasHRef = sal_False;
}
}
@@ -1202,7 +1201,7 @@ ANCHOR_SETEVENT:
if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo, &aLang, &aDir ) )
{
DoPositioning( aItemSet, aPropInfo, pCntxt );
- InsertAttrs( aItemSet, aPropInfo, pCntxt, TRUE );
+ InsertAttrs( aItemSet, aPropInfo, pCntxt, sal_True );
}
}
@@ -1237,11 +1236,11 @@ ANCHOR_SETEVENT:
if( bEnAnchor || bFtnAnchor )
{
InsertFootEndNote( aFtnName, bEnAnchor, bFixed );
- bInFootEndNoteAnchor = bCallNextToken = TRUE;
+ bInFootEndNoteAnchor = bCallNextToken = sal_True;
}
else if( bFtnEnSymbol )
{
- bInFootEndNoteSymbol = bCallNextToken = TRUE;
+ bInFootEndNoteSymbol = bCallNextToken = sal_True;
}
// den Kontext merken
@@ -1253,17 +1252,17 @@ void SwHTMLParser::EndAnchor()
if( bInFootEndNoteAnchor )
{
FinishFootEndNote();
- bInFootEndNoteAnchor = FALSE;
+ bInFootEndNoteAnchor = sal_False;
}
else if( bInFootEndNoteSymbol )
{
- bInFootEndNoteSymbol = FALSE;
+ bInFootEndNoteSymbol = sal_False;
}
EndTag( HTML_ANCHOR_OFF );
}
-/* */
+/* */
void SwHTMLParser::InsertBookmark( const String& rName )
{
@@ -1272,10 +1271,10 @@ void SwHTMLParser::InsertBookmark( const String& rName )
aSetAttrTab.Insert( pTmp, aSetAttrTab.Count() );
}
-BOOL SwHTMLParser::HasCurrentParaBookmarks( BOOL bIgnoreStack ) const
+sal_Bool SwHTMLParser::HasCurrentParaBookmarks( sal_Bool bIgnoreStack ) const
{
- BOOL bHasMarks = FALSE;
- ULONG nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
+ sal_Bool bHasMarks = sal_False;
+ sal_uLong nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
// first step: are there still bookmark in the attribute-stack?
// bookmarks are added to the end of the stack - thus we only have
@@ -1283,13 +1282,13 @@ BOOL SwHTMLParser::HasCurrentParaBookmarks( BOOL bIgnoreStack ) const
if( !bIgnoreStack )
{
_HTMLAttr* pAttr;
- for( USHORT i = aSetAttrTab.Count(); i; )
+ for( sal_uInt16 i = aSetAttrTab.Count(); i; )
{
pAttr = aSetAttrTab[ --i ];
if( RES_FLTR_BOOKMARK == pAttr->pItem->Which() )
{
if( pAttr->GetSttParaIdx() == nNodeIdx )
- bHasMarks = TRUE;
+ bHasMarks = sal_True;
break;
}
}
@@ -1305,10 +1304,10 @@ BOOL SwHTMLParser::HasCurrentParaBookmarks( BOOL bIgnoreStack ) const
ppMark++)
{
const ::sw::mark::IMark* pBookmark = ppMark->get();
- ULONG nBookNdIdx = pBookmark->GetMarkPos().nNode.GetIndex();
+ sal_uLong nBookNdIdx = pBookmark->GetMarkPos().nNode.GetIndex();
if( nBookNdIdx==nNodeIdx )
{
- bHasMarks = TRUE;
+ bHasMarks = sal_True;
break;
}
else if( nBookNdIdx > nNodeIdx )
@@ -1319,11 +1318,11 @@ BOOL SwHTMLParser::HasCurrentParaBookmarks( BOOL bIgnoreStack ) const
return bHasMarks;
}
-/* */
+/* */
void SwHTMLParser::StripTrailingPara()
{
- BOOL bSetSmallFont = FALSE;
+ sal_Bool bSetSmallFont = sal_False;
SwCntntNode* pCNd = pPam->GetCntntNode();
if( !pPam->GetPoint()->nContent.GetIndex() )
@@ -1331,11 +1330,11 @@ void SwHTMLParser::StripTrailingPara()
if( pCNd && pCNd->StartOfSectionIndex()+2 <
pCNd->EndOfSectionIndex() )
{
- ULONG nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts();
- for( USHORT i=0; i<rFrmFmtTbl.Count(); i++ )
+ for( sal_uInt16 i=0; i<rFrmFmtTbl.Count(); i++ )
{
SwFrmFmt const*const pFmt = rFrmFmtTbl[i];
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -1348,7 +1347,7 @@ void SwHTMLParser::StripTrailingPara()
return; // den Knoten duerfen wir nicht loeschen
}
- SetAttr( FALSE ); // die noch offenen Attribute muessen
+ SetAttr( sal_False ); // die noch offenen Attribute muessen
// beendet werden, bevor der Node
// geloescht wird, weil sonst der
// End-Index in die Botanik zeigt
@@ -1373,7 +1372,7 @@ void SwHTMLParser::StripTrailingPara()
ppMark++)
{
::sw::mark::IMark* pMark = ppMark->get();
- ULONG nBookNdIdx = pMark->GetMarkPos().nNode.GetIndex();
+ sal_uLong nBookNdIdx = pMark->GetMarkPos().nNode.GetIndex();
if(nBookNdIdx==nNodeIdx)
{
SwNodeIndex nNewNdIdx(pPam->GetPoint()->nNode);
@@ -1408,7 +1407,7 @@ void SwHTMLParser::StripTrailingPara()
// In leeren Zellen stellen wir einen kleinen Font ein, damit die
// Zelle nicht hoeher wird als die Grafik bzw. so niedrig wie
// moeglich bleibt.
- bSetSmallFont = TRUE;
+ bSetSmallFont = sal_True;
}
}
else if( pCNd && pCNd->IsTxtNode() && pTable &&
@@ -1417,7 +1416,7 @@ void SwHTMLParser::StripTrailingPara()
{
// Wenn die Zelle nur zeichengebundene Grafiken/Rahmen enthaelt
// stellen wir ebenfalls einen kleinen Font ein.
- bSetSmallFont = TRUE;
+ bSetSmallFont = sal_True;
SwTxtNode* pTxtNd = pCNd->GetTxtNode();
xub_StrLen nPos = pPam->GetPoint()->nContent.GetIndex();
diff --git a/sw/source/filter/html/htmlnum.cxx b/sw/source/filter/html/htmlnum.cxx
index 6677e82e7299..05001d4c3808 100644
--- a/sw/source/filter/html/htmlnum.cxx
+++ b/sw/source/filter/html/htmlnum.cxx
@@ -300,7 +300,7 @@ void SwHTMLParser::NewNumBulList( int nToken )
// den aktuellen Absatz erst einmal nicht numerieren
{
- BYTE nLvl = nLevel;
+ sal_uInt8 nLvl = nLevel;
SetNodeNum( nLvl, false );
}
@@ -681,7 +681,7 @@ void SwHTMLWriter::FillNextNumInfo()
{
pNextNumRuleInfo = 0;
- ULONG nPos = pCurPam->GetPoint()->nNode.GetIndex() + 1;
+ sal_uLong nPos = pCurPam->GetPoint()->nNode.GetIndex() + 1;
sal_Bool bTable = sal_False;
do
@@ -755,7 +755,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
bStartValue = sal_True;
if( rInfo.GetDepth() > 1 )
{
- ULONG nPos =
+ sal_uLong nPos =
rWrt.pCurPam->GetPoint()->nNode.GetIndex() + 1;
do
{
@@ -897,7 +897,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
rWrt.Strm() << sOut.GetBuffer();
if( rWrt.bCfgOutStyles )
- OutCSS1_NumBulListStyleOpt( rWrt, *rInfo.GetNumRule(), (BYTE)i );
+ OutCSS1_NumBulListStyleOpt( rWrt, *rInfo.GetNumRule(), (sal_uInt8)i );
rWrt.Strm() << '>';
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index 5cf6a7b93496..6c82e8141d88 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -78,53 +78,53 @@ using namespace com::sun::star;
namespace {
-static char const sHTML_O_Hidden_False[] = "FALSE";
+static char const sHTML_O_Hidden_False[] = "sal_False";
}
-const ULONG HTML_FRMOPTS_EMBED_ALL =
+const sal_uLong HTML_FRMOPTS_EMBED_ALL =
HTML_FRMOPT_ALT |
HTML_FRMOPT_SIZE |
HTML_FRMOPT_NAME;
-const ULONG HTML_FRMOPTS_EMBED_CNTNR =
+const sal_uLong HTML_FRMOPTS_EMBED_CNTNR =
HTML_FRMOPTS_EMBED_ALL |
HTML_FRMOPT_ABSSIZE;
-const ULONG HTML_FRMOPTS_EMBED =
+const sal_uLong HTML_FRMOPTS_EMBED =
HTML_FRMOPTS_EMBED_ALL |
HTML_FRMOPT_ALIGN |
HTML_FRMOPT_SPACE |
HTML_FRMOPT_BRCLEAR |
HTML_FRMOPT_NAME;
-const ULONG HTML_FRMOPTS_HIDDEN_EMBED =
+const sal_uLong HTML_FRMOPTS_HIDDEN_EMBED =
HTML_FRMOPT_ALT |
HTML_FRMOPT_NAME;
-const ULONG HTML_FRMOPTS_APPLET_ALL =
+const sal_uLong HTML_FRMOPTS_APPLET_ALL =
HTML_FRMOPT_ALT |
HTML_FRMOPT_SIZE;
-const ULONG HTML_FRMOPTS_APPLET_CNTNR =
+const sal_uLong HTML_FRMOPTS_APPLET_CNTNR =
HTML_FRMOPTS_APPLET_ALL |
HTML_FRMOPT_ABSSIZE;
-const ULONG HTML_FRMOPTS_APPLET =
+const sal_uLong HTML_FRMOPTS_APPLET =
HTML_FRMOPTS_APPLET_ALL |
HTML_FRMOPT_ALIGN |
HTML_FRMOPT_SPACE |
HTML_FRMOPT_BRCLEAR;
-const ULONG HTML_FRMOPTS_IFRAME_ALL =
+const sal_uLong HTML_FRMOPTS_IFRAME_ALL =
HTML_FRMOPT_ALT |
HTML_FRMOPT_SIZE;
-const ULONG HTML_FRMOPTS_IFRAME_CNTNR =
+const sal_uLong HTML_FRMOPTS_IFRAME_CNTNR =
HTML_FRMOPTS_IFRAME_ALL |
HTML_FRMOPT_ABSSIZE;
-const ULONG HTML_FRMOPTS_IFRAME =
+const sal_uLong HTML_FRMOPTS_IFRAME =
HTML_FRMOPTS_IFRAME_ALL |
HTML_FRMOPT_ALIGN |
HTML_FRMOPT_SPACE |
HTML_FRMOPT_BORDER |
HTML_FRMOPT_BRCLEAR;
-const ULONG HTML_FRMOPTS_OLE_CSS1 =
+const sal_uLong HTML_FRMOPTS_OLE_CSS1 =
HTML_FRMOPT_S_ALIGN |
HTML_FRMOPT_S_SPACE;
@@ -132,13 +132,13 @@ const ULONG HTML_FRMOPTS_OLE_CSS1 =
void SwHTMLParser::SetFixSize( const Size& rPixSize,
const Size& rTwipDfltSize,
- BOOL bPrcWidth, BOOL bPrcHeight,
+ sal_Bool bPrcWidth, sal_Bool bPrcHeight,
SfxItemSet& /*rCSS1ItemSet*/,
SvxCSS1PropertyInfo& rCSS1PropInfo,
SfxItemSet& rFlyItemSet )
{
// absolulte Groessenangaben in Twip umrechnen
- BYTE nPrcWidth = 0, nPrcHeight = 0;
+ sal_uInt8 nPrcWidth = 0, nPrcHeight = 0;
Size aTwipSz( bPrcWidth || USHRT_MAX==rPixSize.Width() ? 0 : rPixSize.Width(),
bPrcHeight || USHRT_MAX==rPixSize.Height() ? 0 : rPixSize.Height() );
if( (aTwipSz.Width() || aTwipSz.Height()) && Application::GetDefaultDevice() )
@@ -151,7 +151,7 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize,
// die Breite bearbeiten
if( SVX_CSS1_LTYPE_PERCENTAGE == rCSS1PropInfo.eWidthType )
{
- nPrcWidth = (BYTE)rCSS1PropInfo.nWidth;
+ nPrcWidth = (sal_uInt8)rCSS1PropInfo.nWidth;
aTwipSz.Width() = rTwipDfltSize.Width();
}
else if( SVX_CSS1_LTYPE_TWIP== rCSS1PropInfo.eWidthType )
@@ -160,7 +160,7 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize,
}
else if( bPrcWidth && rPixSize.Width() )
{
- nPrcWidth = (BYTE)rPixSize.Width();
+ nPrcWidth = (sal_uInt8)rPixSize.Width();
if( nPrcWidth > 100 )
nPrcWidth = 100;
@@ -178,7 +178,7 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize,
// Hoehe bearbeiten
if( SVX_CSS1_LTYPE_PERCENTAGE == rCSS1PropInfo.eHeightType )
{
- nPrcHeight = (BYTE)rCSS1PropInfo.nHeight;
+ nPrcHeight = (sal_uInt8)rCSS1PropInfo.nHeight;
aTwipSz.Height() = rTwipDfltSize.Height();
}
else if( SVX_CSS1_LTYPE_TWIP== rCSS1PropInfo.eHeightType )
@@ -187,7 +187,7 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize,
}
else if( bPrcHeight && rPixSize.Height() )
{
- nPrcHeight = (BYTE)rPixSize.Height();
+ nPrcHeight = (sal_uInt8)rPixSize.Height();
if( nPrcHeight > 100 )
nPrcHeight = 100;
@@ -223,12 +223,12 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace,
Application::GetDefaultDevice()->PixelToLogic( aTwipSpc,
MapMode(MAP_TWIP) );
nLeftSpace = nRightSpace = aTwipSpc.Width();
- nUpperSpace = nLowerSpace = (USHORT)aTwipSpc.Height();
+ nUpperSpace = nLowerSpace = (sal_uInt16)aTwipSpc.Height();
}
// linken/rechten Rand setzen
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_LR_SPACE, TRUE, &pItem ) )
+ if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_LR_SPACE, sal_True, &pItem ) )
{
// Ggf. den Erstzeilen-Einzug noch plaetten
const SvxLRSpaceItem *pLRItem = (const SvxLRSpaceItem *)pItem;
@@ -237,12 +237,12 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace,
if( rCSS1PropInfo.bLeftMargin )
{
nLeftSpace = aLRItem.GetLeft();
- rCSS1PropInfo.bLeftMargin = FALSE;
+ rCSS1PropInfo.bLeftMargin = sal_False;
}
if( rCSS1PropInfo.bRightMargin )
{
nRightSpace = aLRItem.GetRight();
- rCSS1PropInfo.bRightMargin = FALSE;
+ rCSS1PropInfo.bRightMargin = sal_False;
}
rCSS1ItemSet.ClearItem( RES_LR_SPACE );
}
@@ -266,19 +266,19 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace,
}
// oberen/unteren Rand setzen
- if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_UL_SPACE, TRUE, &pItem ) )
+ if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_UL_SPACE, sal_True, &pItem ) )
{
// Ggf. den Erstzeilen-Einzug noch plaetten
const SvxULSpaceItem *pULItem = (const SvxULSpaceItem *)pItem;
if( rCSS1PropInfo.bTopMargin )
{
nUpperSpace = pULItem->GetUpper();
- rCSS1PropInfo.bTopMargin = FALSE;
+ rCSS1PropInfo.bTopMargin = sal_False;
}
if( rCSS1PropInfo.bBottomMargin )
{
nLowerSpace = pULItem->GetLower();
- rCSS1PropInfo.bBottomMargin = FALSE;
+ rCSS1PropInfo.bBottomMargin = sal_False;
}
rCSS1ItemSet.ClearItem( RES_UL_SPACE );
}
@@ -309,7 +309,7 @@ void SwHTMLParser::InsertEmbed()
String aURL, aType, aName, aAlt, aId, aStyle, aClass;
Size aSize( USHRT_MAX, USHRT_MAX );
Size aSpace( USHRT_MAX, USHRT_MAX );
- BOOL bPrcWidth = FALSE, bPrcHeight = FALSE, bHidden = FALSE;
+ sal_Bool bPrcWidth = sal_False, bPrcHeight = sal_False, bHidden = sal_False;
sal_Int16 eVertOri = text::VertOrientation::NONE;
sal_Int16 eHoriOri = text::HoriOrientation::NONE;
SvCommandList aCmdLst;
@@ -318,8 +318,8 @@ void SwHTMLParser::InsertEmbed()
// Die Optionen werden vorwaerts gelesen, weil die Plugins sie in
// dieser Reihenfolge erwarten. Trotzdem darf immer nur der erste
// Wert einer Option beruecksichtigt werden.
- USHORT nArrLen = pHTMLOptions->Count();
- for( USHORT i=0; i<nArrLen; i++ )
+ sal_uInt16 nArrLen = pHTMLOptions->Count();
+ for( sal_uInt16 i=0; i<nArrLen; i++ )
{
const HTMLOption *pOption = (*pHTMLOptions)[i];
switch( pOption->GetToken() )
@@ -405,7 +405,7 @@ void SwHTMLParser::InsertEmbed()
// Size (0,0) wird in SetFrmSize auf (MINFLY, MINFLY) umgebogen
aSize.Width() = 0; aSize.Height() = 0;
aSpace.Width() = 0; aSpace.Height() = 0;
- bPrcWidth = bPrcHeight = FALSE;
+ bPrcWidth = bPrcHeight = sal_False;
}
// die URL aufbereiten
@@ -514,7 +514,7 @@ void SwHTMLParser::NewObject()
RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -673,7 +673,7 @@ void SwHTMLParser::InsertApplet()
String aCodeBase, aCode, aName, aAlt, aId, aStyle, aClass;
Size aSize( USHRT_MAX, USHRT_MAX );
Size aSpace( 0, 0 );
- BOOL bPrcWidth = FALSE, bPrcHeight = FALSE, bMayScript = FALSE;
+ sal_Bool bPrcWidth = sal_False, bPrcHeight = sal_False, bMayScript = sal_False;
sal_Int16 eVertOri = text::VertOrientation::TOP;
sal_Int16 eHoriOri = text::HoriOrientation::NONE;
@@ -683,7 +683,7 @@ void SwHTMLParser::InsertApplet()
pAppletImpl = new SwApplet_Impl( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -728,7 +728,7 @@ void SwHTMLParser::InsertApplet()
aSpace.Height() = (long)pOption->GetNumber();
break;
case HTML_O_MAYSCRIPT:
- bMayScript = TRUE;
+ bMayScript = sal_True;
break;
}
@@ -808,7 +808,7 @@ void SwHTMLParser::InsertParam()
String aName, aValue;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -837,15 +837,15 @@ void SwHTMLParser::InsertFloatingFrame()
String aAlt, aId, aStyle, aClass;
Size aSize( USHRT_MAX, USHRT_MAX );
Size aSpace( 0, 0 );
- BOOL bPrcWidth = FALSE, bPrcHeight = FALSE;
+ sal_Bool bPrcWidth = sal_False, bPrcHeight = sal_False;
sal_Int16 eVertOri = text::VertOrientation::TOP;
sal_Int16 eHoriOri = text::HoriOrientation::NONE;
const HTMLOptions *pHTMLOptions = GetOptions();
// Erstmal die Optionen f?r das Writer-Frame-Format holen
- USHORT nArrLen = pHTMLOptions->Count();
- for ( USHORT i=0; i<nArrLen; i++ )
+ sal_uInt16 nArrLen = pHTMLOptions->Count();
+ for ( sal_uInt16 i=0; i<nArrLen; i++ )
{
const HTMLOption *pOption = (*pHTMLOptions)[i];
switch( pOption->GetToken() )
@@ -964,12 +964,12 @@ void SwHTMLParser::InsertFloatingFrame()
// Ggf Frames anlegen und auto-geb. Rahmen registrieren
RegisterFlyFrm( pFlyFmt );
- bInFloatingFrame = TRUE;
+ bInFloatingFrame = sal_True;
}
/* */
-USHORT SwHTMLWriter::GuessOLENodeFrmType( const SwNode& rNode )
+sal_uInt16 SwHTMLWriter::GuessOLENodeFrmType( const SwNode& rNode )
{
SwOLEObj& rObj = ((SwOLENode*)rNode.GetOLENode())->GetOLEObj();
@@ -992,16 +992,16 @@ USHORT SwHTMLWriter::GuessOLENodeFrmType( const SwNode& rNode )
}
#endif
- return static_cast< USHORT >(eType);
+ return static_cast< sal_uInt16 >(eType);
}
Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
- BOOL bInCntnr )
+ sal_Bool bInCntnr )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
SwOLENode *pOLENd = rHTMLWrt.pDoc->GetNodes()[ nStt ]->GetOLENode();
OSL_ENSURE( pOLENd, "OLE-Node erwartet" );
@@ -1015,7 +1015,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
return rWrt;
uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY );
- BOOL bHiddenEmbed = FALSE;
+ sal_Bool bHiddenEmbed = sal_False;
if( !xSet.is() )
{
@@ -1024,11 +1024,11 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
}
ByteString aEndTags;
- ULONG nFrmOpts;
+ sal_uLong nFrmOpts;
// wenn meoglich vor dem "Objekt" einen Zeilen-Umbruch ausgeben
if( rHTMLWrt.bLFPossible )
- rHTMLWrt.OutNewLine( TRUE );
+ rHTMLWrt.OutNewLine( sal_True );
if( rFrmFmt.GetName().Len() )
rHTMLWrt.OutImplicitMark( rFrmFmt.GetName(),
@@ -1074,7 +1074,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
// Das Plugin ist HIDDEN
(sOut += ' ') += OOO_STRING_SW_HTML_O_Hidden;
nFrmOpts = HTML_FRMOPTS_HIDDEN_EMBED;
- bHiddenEmbed = TRUE;
+ bHiddenEmbed = sal_True;
}
else
{
@@ -1172,12 +1172,12 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
SvCommandList aCommands;
aCommands.FillFromSequence( aProps );
SvULongs aParams;
- ULONG i = aCommands.Count();
+ sal_uLong i = aCommands.Count();
while( i > 0 )
{
const SvCommand& rCommand = aCommands[ --i ];
const String& rName = rCommand.GetCommand();
- USHORT nType = SwApplet_Impl::GetOptionType( rName, TRUE );
+ sal_uInt16 nType = SwApplet_Impl::GetOptionType( rName, sal_True );
if( SWHTML_OPTTYPE_TAG == nType )
{
const String& rValue = rCommand.GetArgument();
@@ -1196,7 +1196,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
rHTMLWrt.IncIndentLevel(); // Inhalt von Applet einruecken
- USHORT ii = aParams.Count();
+ sal_uInt16 ii = aParams.Count();
while( ii > 0 )
{
const SvCommand& rCommand = aCommands[ aParams[--ii] ];
@@ -1215,7 +1215,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
rHTMLWrt.DecIndentLevel(); // Inhalt von Applet einruecken
if( aCommands.Count() )
rHTMLWrt.OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_applet, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_applet, sal_False );
}
else
if( aGlobName == SvGlobalName( SO3_PLUGIN_CLASSID ) )
@@ -1228,12 +1228,12 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
SvCommandList aCommands;
aCommands.FillFromSequence( aProps );
- for( ULONG i=0; i<aCommands.Count(); i++ )
+ for( sal_uLong i=0; i<aCommands.Count(); i++ )
{
const SvCommand& rCommand = aCommands[ i ];
const String& rName = rCommand.GetCommand();
- if( SwApplet_Impl::GetOptionType( rName, FALSE ) == SWHTML_OPTTYPE_TAG )
+ if( SwApplet_Impl::GetOptionType( rName, sal_False ) == SWHTML_OPTTYPE_TAG )
{
const String& rValue = rCommand.GetArgument();
rWrt.Strm() << ' ';
@@ -1250,7 +1250,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
// ausgeben
rHTMLWrt.Strm() << '>';
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_iframe, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_iframe, sal_False );
}
if( aEndTags.Len() )
@@ -1260,12 +1260,12 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
}
Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt,
- BOOL bInCntnr )
+ sal_Bool bInCntnr )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
SwOLENode *pOLENd = rHTMLWrt.pDoc->GetNodes()[ nStt ]->GetOLENode();
OSL_ENSURE( pOLENd, "OLE-Node erwartet" );
@@ -1279,7 +1279,7 @@ Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt,
if(pTempFileName)
aGrfNm = *pTempFileName;
- USHORT nErr = XOutBitmap::WriteGraphic( aGrf, aGrfNm,
+ sal_uInt16 nErr = XOutBitmap::WriteGraphic( aGrf, aGrfNm,
String::CreateFromAscii("JPG"),
(XOUTBMP_USE_GIF_IF_POSSIBLE |
XOUTBMP_USE_NATIVE_IF_POSSIBLE) );
@@ -1291,7 +1291,7 @@ Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt,
aGrfNm = URIHelper::SmartRel2Abs(
INetURLObject(rWrt.GetBaseURL()), aGrfNm,
URIHelper::GetMaybeFileHdl() );
- ULONG nFlags = bInCntnr ? HTML_FRMOPTS_GENIMG_CNTNR
+ sal_uLong nFlags = bInCntnr ? HTML_FRMOPTS_GENIMG_CNTNR
: HTML_FRMOPTS_GENIMG;
OutHTML_Image( rWrt, rFrmFmt, aGrfNm,
pOLENd->GetTitle(), pOLENd->GetTwipSize(),
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index 46d8d6a0c05f..e1bf61ee49ed 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -204,7 +204,7 @@ void SwHTMLParser::NewDivision( int nToken )
aDelPam.SetMark();
const SwStartNode *pStNd =
- (const SwStartNode *)pDoc->GetNodes()[rCntntStIdx];
+ (const SwStartNode *) &rCntntStIdx.GetNode();
aDelPam.GetPoint()->nNode = pStNd->EndOfSectionIndex() - 1;
pDoc->DelFullPara( aDelPam );
@@ -261,7 +261,7 @@ void SwHTMLParser::NewDivision( int nToken )
if( !bAppended )
{
SwNodeIndex aPrvNdIdx( pPam->GetPoint()->nNode, -1 );
- if( (pDoc->GetNodes()[aPrvNdIdx])->IsSectionNode() )
+ if (aPrvNdIdx.GetNode().IsSectionNode())
{
AppendTxtNode();
bAppended = sal_True;
@@ -350,8 +350,7 @@ void SwHTMLParser::NewDivision( int nToken )
}
SwTxtNode* pOldTxtNd =
- bAppended ? 0 : pDoc->GetNodes()[pPam->GetPoint()->nNode]
- ->GetTxtNode();
+ (bAppended) ? 0 : pPam->GetPoint()->nNode.GetNode().GetTxtNode();
pPam->Move( fnMoveBackward );
@@ -435,10 +434,10 @@ void SwHTMLParser::FixHeaderFooterDistance( sal_Bool bHeader,
const SwFmtCntnt& rFlyCntnt = pHdFtFmt->GetCntnt();
const SwNodeIndex& rCntntStIdx = *rFlyCntnt.GetCntntIdx();
- ULONG nPrvNxtIdx;
+ sal_uLong nPrvNxtIdx;
if( bHeader )
{
- nPrvNxtIdx = pDoc->GetNodes()[rCntntStIdx]->EndOfSectionIndex()-1;
+ nPrvNxtIdx = rCntntStIdx.GetNode().EndOfSectionIndex()-1;
}
else
{
@@ -689,7 +688,7 @@ void SwHTMLParser::NewMultiCol()
// node must be inserted. Otherwise, the new section will be
// inserted in front of the old one.
SwNodeIndex aPrvNdIdx( pPam->GetPoint()->nNode, -1 );
- if( (pDoc->GetNodes()[aPrvNdIdx])->IsSectionNode() )
+ if (aPrvNdIdx.GetNode().IsSectionNode())
{
AppendTxtNode();
bAppended = sal_True;
@@ -745,8 +744,7 @@ void SwHTMLParser::NewMultiCol()
}
SwTxtNode* pOldTxtNd =
- bAppended ? 0 : pDoc->GetNodes()[pPam->GetPoint()->nNode]
- ->GetTxtNode();
+ (bAppended) ? 0 : pPam->GetPoint()->nNode.GetNode().GetTxtNode();
pPam->Move( fnMoveBackward );
@@ -810,7 +808,7 @@ void SwHTMLParser::InsertFlyFrame( const SfxItemSet& rItemSet,
/* */
void SwHTMLParser::MovePageDescAttrs( SwNode *pSrcNd,
- ULONG nDestIdx,
+ sal_uLong nDestIdx,
sal_Bool bFmtBreak )
{
SwCntntNode* pDestCntntNd =
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 31797ba1599c..d2cbded94ee0 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -2728,7 +2728,7 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail,
if( GetBGBrush() )
pSwTable->GetFrmFmt()->SetFmtAttr( *GetBGBrush() );
- ((SwTable *)pSwTable)->SetRowsToRepeat( static_cast< USHORT >(nHeadlineRepeat) );
+ ((SwTable *)pSwTable)->SetRowsToRepeat( static_cast< sal_uInt16 >(nHeadlineRepeat) );
((SwTable *)pSwTable)->GCLines();
sal_Bool bIsInFlyFrame = pContext && pContext->GetFrmFmt();
@@ -2887,7 +2887,7 @@ const SwStartNode *SwHTMLParser::InsertTableSection
const SwStartNode *pStNd;
if( pTable && pTable->bFirstCell )
{
- SwNode *pNd = pDoc->GetNodes()[pPam->GetPoint()->nNode];
+ SwNode *const pNd = & pPam->GetPoint()->nNode.GetNode();
pNd->GetTxtNode()->ChgFmtColl( pColl );
pStNd = pNd->FindTableBoxStartNode();
pTable->bFirstCell = sal_False;
@@ -2930,7 +2930,7 @@ const SwStartNode *SwHTMLParser::InsertTableSection( sal_uInt16 nPoolId )
SwTxtFmtColl *pColl = pCSS1Parser->GetTxtCollFromPool( nPoolId );
- SwNode *pNd = pDoc->GetNodes()[pPam->GetPoint()->nNode];
+ SwNode *const pNd = & pPam->GetPoint()->nNode.GetNode();
const SwStartNode *pStNd;
if( pTable && pTable->bFirstCell )
{
@@ -3438,7 +3438,7 @@ void _CellSaveStruct::EndNoBreak( const SwPosition& rPos )
}
}
-void _CellSaveStruct::CheckNoBreak( const SwPosition& rPos, SwDoc *pDoc )
+void _CellSaveStruct::CheckNoBreak( const SwPosition& rPos, SwDoc * /*pDoc*/ )
{
if( pCnts && pCurrCnts==pCnts )
{
@@ -3457,8 +3457,7 @@ void _CellSaveStruct::CheckNoBreak( const SwPosition& rPos, SwDoc *pDoc )
}
else if( nNoBreakEndCntntPos + 1 == rPos.nContent.GetIndex() )
{
- const SwTxtNode *pTxtNd =
- pDoc->GetNodes()[rPos.nNode]->GetTxtNode();
+ SwTxtNode const*const pTxtNd(rPos.nNode.GetNode().GetTxtNode());
if( pTxtNd )
{
sal_Unicode cLast =
@@ -3482,13 +3481,13 @@ HTMLTableCnts *SwHTMLParser::InsertTableContents(
{
// eine neue Section anlegen, der PaM steht dann darin
const SwStartNode *pStNd =
- InsertTableSection( static_cast< USHORT >(bHead ? RES_POOLCOLL_TABLE_HDLN
+ InsertTableSection( static_cast< sal_uInt16 >(bHead ? RES_POOLCOLL_TABLE_HDLN
: RES_POOLCOLL_TABLE) );
if( GetNumInfo().GetNumRule() )
{
// 1. Absatz auf nicht numeriert setzen
- BYTE nLvl = GetNumInfo().GetLevel();
+ sal_uInt8 nLvl = GetNumInfo().GetLevel();
SetNodeNum( nLvl, false );
}
@@ -3836,11 +3835,11 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
pPam->Move( fnMoveBackward );
}
- const SwNode *pNd = pDoc->GetNodes()[pPam->GetPoint()->nNode];
+ SwNode const*const pNd = & pPam->GetPoint()->nNode.GetNode();
if( !bAppended && !bForceFrame )
{
- SwTxtNode* pOldTxtNd =
- pDoc->GetNodes()[pSavePos->nNode]->GetTxtNode();
+ SwTxtNode *const pOldTxtNd =
+ pSavePos->nNode.GetNode().GetTxtNode();
OSL_ENSURE( pOldTxtNd, "Wieso stehen wir in keinem Txt-Node?" );
SwFrmFmt *pFrmFmt = pSwTable->GetFrmFmt();
@@ -3909,7 +3908,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
}
}
- const SwNode *pNd = pDoc->GetNodes()[pPam->GetPoint()->nNode];
+ SwNode const*const pNd = & pPam->GetPoint()->nNode.GetNode();
const SwStartNode *pStNd = (pTable->bFirstCell ? pNd->FindTableNode()
: pNd->FindTableBoxStartNode() );
@@ -4013,8 +4012,8 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
// koennen wir erneut eine echte Tabelle aufmachen.
// Wir erkennen das daran, dass wir keinen
// Tabellen-Node mehr finden.
- bTopTable = pDoc->GetNodes()[pPam->GetPoint()->nNode]
- ->FindTableNode() == 0;
+ bTopTable = (0 ==
+ pPam->GetPoint()->nNode.GetNode().FindTableNode());
// Wenn im aktuellen Absatz Flys verankert sind,
// muss die neue Tabelle in einen Rahmen.
@@ -4174,7 +4173,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
!pSaveStruct->IsInSection(),
"Section oder nicht, das ist hier die Frage" );
const SwStartNode *pStNd =
- InsertTableSection( static_cast< USHORT >(pSaveStruct->IsHeaderCell()
+ InsertTableSection( static_cast< sal_uInt16 >(pSaveStruct->IsHeaderCell()
? RES_POOLCOLL_TABLE_HDLN
: RES_POOLCOLL_TABLE ));
const SwEndNode *pEndNd = pStNd->EndOfSectionNode();
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index 445369af2fcf..82628e810b8c 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -67,6 +67,7 @@
#include <viewsh.hxx>
#include <viewopt.hxx>
#endif
+#include <sal/types.h>
#define MAX_DEPTH (3)
@@ -94,8 +95,8 @@ class SwHTMLWrtTable : public SwWriteTable
sal_Bool bTop, sal_Bool bBottom, sal_Bool bLeft, sal_Bool bRight );
public:
- SwHTMLWrtTable( const SwTableLines& rLines, long nWidth, sal_uInt16 nBWidth,
- sal_Bool bRel, USHORT nNumOfRowsToRepeat,
+ SwHTMLWrtTable( const SwTableLines& rLines, long nWidth, sal_uInt32 nBWidth,
+ sal_Bool bRel, sal_uInt16 nNumOfRowsToRepeat,
sal_uInt16 nLeftSub=0, sal_uInt16 nRightSub=0 );
SwHTMLWrtTable( const SwHTMLTableLayout *pLayoutInfo );
@@ -107,7 +108,7 @@ public:
SwHTMLWrtTable::SwHTMLWrtTable( const SwTableLines& rLines, long nWidth,
- sal_uInt16 nBWidth, sal_Bool bRel, USHORT nNumOfRowsToRepeat,
+ sal_uInt32 nBWidth, sal_Bool bRel, sal_uInt16 nNumOfRowsToRepeat,
sal_uInt16 nLSub, sal_uInt16 nRSub )
: SwWriteTable( rLines, nWidth, nBWidth, bRel, MAX_DEPTH, nLSub, nRSub, nNumOfRowsToRepeat )
{
@@ -287,7 +288,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
sal_Bool bHead = sal_False;
if( pSttNd )
{
- ULONG nNdPos = pSttNd->GetIndex()+1;
+ sal_uLong nNdPos = pSttNd->GetIndex()+1;
// Art der Zelle (TD/TH) bestimmen
SwNode* pNd;
@@ -332,7 +333,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
#ifndef PURE_HTML
long nWidth = 0;
- sal_uInt16 nPrcWidth = USHRT_MAX;
+ sal_uInt32 nPrcWidth = USHRT_MAX;
if( bOutWidth )
{
if( bLayoutExport )
@@ -471,7 +472,9 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
}
else
{
- sal_uInt16 nTWidth, nBWidth, nLSub, nRSub;
+ sal_uInt16 nTWidth;
+ sal_uInt32 nBWidth;
+ sal_uInt16 nLSub, nRSub;
if( HasRelWidths() )
{
nTWidth = 100;
@@ -829,7 +832,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
ByteString sOutStr( '<' );
sOutStr += OOO_STRING_SVTOOLS_HTML_col;
- sal_uInt16 nWidth;
+ sal_uInt32 nWidth;
sal_Bool bRel;
if( bLayoutExport )
{
diff --git a/sw/source/filter/html/makefile.mk b/sw/source/filter/html/makefile.mk
deleted file mode 100644
index f64a6d593fd2..000000000000
--- a/sw/source/filter/html/makefile.mk
+++ /dev/null
@@ -1,79 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=html
-
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(mydebug)" != ""
-CDEFS=$(CDEFS) -Dmydebug
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/css1kywd.obj \
- $(SLO)$/htmlflyt.obj
-
-EXCEPTIONSFILES = \
- $(SLO)$/SwAppletImpl.obj \
- $(SLO)$/css1atr.obj \
- $(SLO)$/htmlatr.obj \
- $(SLO)$/htmlbas.obj \
- $(SLO)$/htmlcss1.obj \
- $(SLO)$/htmlctxt.obj \
- $(SLO)$/htmldraw.obj \
- $(SLO)$/htmlfld.obj \
- $(SLO)$/htmlfldw.obj \
- $(SLO)$/htmlfly.obj \
- $(SLO)$/htmlform.obj \
- $(SLO)$/htmlforw.obj \
- $(SLO)$/htmlftn.obj \
- $(SLO)$/htmlgrin.obj \
- $(SLO)$/htmlnum.obj \
- $(SLO)$/htmlplug.obj \
- $(SLO)$/htmlsect.obj \
- $(SLO)$/htmltab.obj \
- $(SLO)$/htmltabw.obj \
- $(SLO)$/parcss1.obj \
- $(SLO)$/svxcss1.obj \
- $(SLO)$/swhtml.obj \
- $(SLO)$/wrthtml.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/filter/html/parcss1.cxx b/sw/source/filter/html/parcss1.cxx
index 6f2b4bfd2cd6..d8743e92ab85 100644
--- a/sw/source/filter/html/parcss1.cxx
+++ b/sw/source/filter/html/parcss1.cxx
@@ -77,8 +77,8 @@ void CSS1Parser::InitRead( const String& rIn )
nlLineNr = 0;
nlLinePos = 0;
- bWhiteSpace = TRUE; // Wenn noch nichts gelesen wurde ist das wie WS
- bEOF = FALSE;
+ bWhiteSpace = sal_True; // Wenn noch nichts gelesen wurde ist das wie WS
+ bEOF = sal_False;
eState = CSS1_PAR_WORKING;
nValue = 0.;
@@ -92,7 +92,7 @@ sal_Unicode CSS1Parser::GetNextChar()
{
if( nInPos >= aIn.Len() )
{
- bEOF = TRUE;
+ bEOF = sal_True;
return (sal_Unicode)EOF;
}
@@ -125,10 +125,10 @@ CSS1Token CSS1Parser::GetNextToken()
do {
// Merken, ob davor White-Space gelesen wurde
- BOOL bPrevWhiteSpace = bWhiteSpace;
- bWhiteSpace = FALSE;
+ sal_Bool bPrevWhiteSpace = bWhiteSpace;
+ bWhiteSpace = sal_False;
- BOOL bNextCh = TRUE;
+ sal_Bool bNextCh = sal_True;
switch( cNextCh )
{
case '/': // COMMENT | '/'
@@ -139,7 +139,7 @@ CSS1Token CSS1Parser::GetNextToken()
// COMMENT
cNextCh = GetNextChar();
- BOOL bAsterix = FALSE;
+ sal_Bool bAsterix = sal_False;
while( !(bAsterix && '/'==cNextCh) && !IsEOF() )
{
bAsterix = ('*'==cNextCh);
@@ -149,7 +149,7 @@ CSS1Token CSS1Parser::GetNextToken()
else
{
// '/'
- bNextCh = FALSE;
+ bNextCh = sal_False;
nRet = CSS1_SLASH;
}
}
@@ -196,13 +196,13 @@ CSS1Token CSS1Parser::GetNextToken()
if( CSS1_NULL==nRet )
{
aToken.Erase();
- USHORT nBlockLvl = 0;
+ sal_uInt16 nBlockLvl = 0;
sal_Unicode cQuoteCh = 0;
- BOOL bDone = FALSE, bEscape = FALSE;
+ sal_Bool bDone = sal_False, bEscape = sal_False;
while( !bDone && !IsEOF() )
{
- BOOL bOldEscape = bEscape;
- bEscape = FALSE;
+ sal_Bool bOldEscape = bEscape;
+ bEscape = sal_False;
switch( cNextCh )
{
case '{':
@@ -234,14 +234,14 @@ CSS1Token CSS1Parser::GetNextToken()
break;
case '\\':
if( !bOldEscape )
- bEscape = TRUE;
+ bEscape = sal_True;
break;
}
cNextCh = GetNextChar();
}
}
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
}
break;
@@ -253,7 +253,7 @@ CSS1Token CSS1Parser::GetNextToken()
while( ( ' ' == cNextCh ||
(cNextCh >= 0x09 && cNextCh <= 0x0d) ) && !IsEOF() )
{
- bWhiteSpace = TRUE;
+ bWhiteSpace = sal_True;
cNextCh = GetNextChar();
}
@@ -283,13 +283,13 @@ CSS1Token CSS1Parser::GetNextToken()
nRet = CSS1_IDENT;
}
- bWhiteSpace = FALSE;
- bNextCh = FALSE;
+ bWhiteSpace = sal_False;
+ bNextCh = sal_False;
}
else
{
// Fehlerbehandlung: '!' ignorieren
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
}
break;
@@ -329,7 +329,7 @@ CSS1Token CSS1Parser::GetNextToken()
sal_Unicode cNextChSave = cNextCh;
sal_uInt32 nlLineNrSave = nlLineNr;
sal_uInt32 nlLinePosSave = nlLinePos;
- BOOL bEOFSave = bEOF;
+ sal_Bool bEOFSave = bEOF;
// erstmal versuchen eine Hex-Zahl zu scannen
::rtl::OUStringBuffer sTmpBuffer( 16 );
@@ -347,7 +347,7 @@ CSS1Token CSS1Parser::GetNextToken()
// wir haben eine hexadezimale Farbe gefunden
aToken += String(sTmpBuffer.makeStringAndClear());
nRet = CSS1_HEXCOLOR;
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
@@ -374,7 +374,7 @@ CSS1Token CSS1Parser::GetNextToken()
while( ( ' ' == cNextCh ||
(cNextCh >= 0x09 && cNextCh <= 0x0d) ) && !IsEOF() )
{
- bWhiteSpace = TRUE;
+ bWhiteSpace = sal_True;
cNextCh = GetNextChar();
}
@@ -382,7 +382,7 @@ CSS1Token CSS1Parser::GetNextToken()
switch( cNextCh )
{
case '%': // PERCENTAGE
- bWhiteSpace = FALSE;
+ bWhiteSpace = sal_False;
nRet = CSS1_PERCENTAGE;
break;
@@ -400,9 +400,9 @@ CSS1Token CSS1Parser::GetNextToken()
// die aktuelle Position retten
xub_StrLen nInPosOld = nInPos;
sal_Unicode cNextChOld = cNextCh;
- ULONG nlLineNrOld = nlLineNr;
- ULONG nlLinePosOld = nlLinePos;
- BOOL bEOFOld = bEOF;
+ sal_uLong nlLineNrOld = nlLineNr;
+ sal_uLong nlLinePosOld = nlLinePos;
+ sal_Bool bEOFOld = bEOF;
// den naechsten Identifer scannen
String aIdent;
@@ -498,13 +498,13 @@ CSS1Token CSS1Parser::GetNextToken()
}
else
{
- bWhiteSpace = FALSE;
+ bWhiteSpace = sal_False;
}
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
break;
default: // NUMBER IDENT
- bNextCh = FALSE;
+ bNextCh = sal_False;
nRet = CSS1_NUMBER;
break;
}
@@ -553,9 +553,9 @@ CSS1Token CSS1Parser::GetNextToken()
// die aktuelle Position retten
xub_StrLen nInPosSave = nInPos;
sal_Unicode cNextChSave = cNextCh;
- ULONG nlLineNrSave = nlLineNr;
- ULONG nlLinePosSave = nlLinePos;
- BOOL bEOFSave = bEOF;
+ sal_uLong nlLineNrSave = nlLineNr;
+ sal_uLong nlLinePosSave = nlLinePos;
+ sal_Bool bEOFSave = bEOF;
// erstmal versuchen eine Hex-Zahl zu scannen
::rtl::OUStringBuffer sTmpBuffer( 6L );
@@ -573,7 +573,7 @@ CSS1Token CSS1Parser::GetNextToken()
// wir haben eine hexadezimale Farbe gefunden
aToken += String(sTmpBuffer.makeStringAndClear());
nRet = CSS1_HEXCOLOR;
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
@@ -587,21 +587,21 @@ CSS1Token CSS1Parser::GetNextToken()
}
nRet = CSS1_HASH;
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
case ' ':
case '\t':
case '\r':
case '\n': // White-Space
- bWhiteSpace = TRUE;
+ bWhiteSpace = sal_True;
break;
case (sal_Unicode)EOF:
if( IsEOF() )
{
eState = CSS1_PAR_ACCEPTED;
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
// kein break;
@@ -613,7 +613,7 @@ CSS1Token CSS1Parser::GetNextToken()
{
// IDENT
- BOOL bHexColor = TRUE;
+ sal_Bool bHexColor = sal_True;
// den naechsten Identifer scannen
::rtl::OUStringBuffer sTmpBuffer( 64L );
@@ -638,7 +638,7 @@ CSS1Token CSS1Parser::GetNextToken()
if( bHexColor && sTmpBuffer.getLength()==6 )
{
- bNextCh = FALSE;
+ bNextCh = sal_False;
nRet = CSS1_HEXCOLOR;
break;
@@ -649,7 +649,7 @@ CSS1Token CSS1Parser::GetNextToken()
(('r'==aToken.GetChar(0) || 'R'==aToken.GetChar(0)) &&
aToken.EqualsIgnoreCaseAscii(sCSS1_rgb)) ) )
{
- USHORT nNestCnt = 0;
+ sal_uInt16 nNestCnt = 0;
::rtl::OUStringBuffer sTmpBuffer2( 64L );
do {
sTmpBuffer2.append( cNextCh );
@@ -662,14 +662,14 @@ CSS1Token CSS1Parser::GetNextToken()
} while( (nNestCnt>1 || ')'!=cNextCh) && !IsEOF() );
sTmpBuffer2.append( cNextCh );
aToken += String(sTmpBuffer2.makeStringAndClear());
- bNextCh = TRUE;
+ bNextCh = sal_True;
nRet = 'u'==aToken.GetChar(0) || 'U'==aToken.GetChar(0)
? CSS1_URL
: CSS1_RGB;
}
else
{
- bNextCh = FALSE;
+ bNextCh = sal_False;
nRet = CSS1_IDENT;
}
}
@@ -707,7 +707,7 @@ void CSS1Parser::ParseStyleSheet()
LOOP_CHECK_DECL
// import*
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
while( !bDone && IsParserWorking() )
{
LOOP_CHECK_CHECK( "Endlos-Schleife in ParseStyleSheet()/import *" )
@@ -726,7 +726,7 @@ void CSS1Parser::ParseStyleSheet()
case CSS1_PAGE_SYM:
// /Feature: PrintExt
// rule
- bDone = TRUE;
+ bDone = sal_True;
break;
default:
// Fehlerbehandlung: ueberlesen
@@ -775,7 +775,7 @@ void CSS1Parser::ParseRule()
return;
// Selektor verarbeiten
- if( SelectorParsed( pSelector, TRUE ) )
+ if( SelectorParsed( pSelector, sal_True ) )
delete pSelector;
LOOP_CHECK_DECL
@@ -794,7 +794,7 @@ void CSS1Parser::ParseRule()
return;
// Selektor verarbeiten
- if( SelectorParsed( pSelector, FALSE ) )
+ if( SelectorParsed( pSelector, sal_False ) )
delete pSelector;
}
@@ -865,7 +865,7 @@ CSS1Selector *CSS1Parser::ParseSelector()
{
CSS1Selector *pRoot = 0, *pLast = 0;
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
CSS1Selector *pNew = 0;
LOOP_CHECK_DECL
@@ -875,7 +875,7 @@ CSS1Selector *CSS1Parser::ParseSelector()
{
LOOP_CHECK_CHECK( "Endlos-Schleife in ParseSelector()" )
- BOOL bNextToken = TRUE;
+ sal_Bool bNextToken = sal_True;
switch( nToken )
{
@@ -908,7 +908,7 @@ CSS1Selector *CSS1Parser::ParseSelector()
else
{
// das war jetzt ein Look-Ahead
- bNextToken = FALSE;
+ bNextToken = sal_False;
}
pNew = new CSS1Selector( eType, aElement );
}
@@ -959,7 +959,7 @@ CSS1Selector *CSS1Parser::ParseSelector()
default:
// wir wissen nicht was kommt, also aufhoehren
- bDone = TRUE;
+ bDone = sal_True;
break;
}
@@ -1056,7 +1056,7 @@ CSS1Expression *CSS1Parser::ParseDeclaration( String& rProperty )
// term [operator term]*
// hier sind wir sehr lax, was die Syntax angeht, sollte aber kein
// Problem sein
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
sal_Unicode cSign = 0, cOp = 0;
CSS1Expression *pNew = 0;
@@ -1106,7 +1106,7 @@ CSS1Expression *CSS1Parser::ParseDeclaration( String& rProperty )
break;
default:
- bDone = TRUE;
+ bDone = sal_True;
break;
}
@@ -1157,7 +1157,7 @@ CSS1Parser::~CSS1Parser()
}
-BOOL CSS1Parser::ParseStyleSheet( const String& rIn )
+sal_Bool CSS1Parser::ParseStyleSheet( const String& rIn )
{
String aTmp( rIn );
@@ -1180,20 +1180,20 @@ BOOL CSS1Parser::ParseStyleSheet( const String& rIn )
aTmp.Erase( aTmp.Len()-3 );
if( !aTmp.Len() )
- return TRUE;
+ return sal_True;
InitRead( aTmp );
ParseStyleSheet();
- return TRUE;
+ return sal_True;
}
-BOOL CSS1Parser::ParseStyleOption( const String& rIn )
+sal_Bool CSS1Parser::ParseStyleOption( const String& rIn )
{
if( !rIn.Len() )
- return TRUE;
+ return sal_True;
InitRead( rIn );
@@ -1201,7 +1201,7 @@ BOOL CSS1Parser::ParseStyleOption( const String& rIn )
CSS1Expression *pExpr = ParseDeclaration( aProperty );
if( !pExpr )
{
- return FALSE;
+ return sal_False;
}
// expression verarbeiten
@@ -1228,20 +1228,20 @@ BOOL CSS1Parser::ParseStyleOption( const String& rIn )
}
}
- return TRUE;
+ return sal_True;
}
-BOOL CSS1Parser::SelectorParsed( const CSS1Selector * /* pSelector */, BOOL /*bFirst*/ )
+sal_Bool CSS1Parser::SelectorParsed( const CSS1Selector * /* pSelector */, sal_Bool /*bFirst*/ )
{
// Selektor loeschen
- return TRUE;
+ return sal_True;
}
-BOOL CSS1Parser::DeclarationParsed( const String& /*rProperty*/,
+sal_Bool CSS1Parser::DeclarationParsed( const String& /*rProperty*/,
const CSS1Expression * /* pExpr */ )
{
// Deklaration loeschen
- return TRUE;
+ return sal_True;
}
@@ -1257,7 +1257,7 @@ CSS1Expression::~CSS1Expression()
delete pNext;
}
-BOOL CSS1Expression::GetURL( String& rURL ) const
+sal_Bool CSS1Expression::GetURL( String& rURL ) const
{
DBG_ASSERT( CSS1_URL==eType, "CSS1-Ausruck ist keine Farbe URL" );
@@ -1268,33 +1268,33 @@ BOOL CSS1Expression::GetURL( String& rURL ) const
')' == aValue.GetChar(aValue.Len()-1),
"keine gueltiges URL(...)" );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( aValue.Len() > 5 )
{
rURL = aValue.Copy( 4, aValue.Len()-5 );
rURL.EraseTrailingChars();
rURL.EraseLeadingChars();
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
-BOOL CSS1Expression::GetColor( Color &rColor ) const
+sal_Bool CSS1Expression::GetColor( Color &rColor ) const
{
DBG_ASSERT( CSS1_IDENT==eType || CSS1_RGB==eType ||
CSS1_HEXCOLOR==eType || CSS1_STRING==eType,
"CSS1-Ausruck kann keine Farbe sein" );
- BOOL bRet = FALSE;
- ULONG nColor = ULONG_MAX;
+ sal_Bool bRet = sal_False;
+ sal_uLong nColor = ULONG_MAX;
switch( eType )
{
case CSS1_RGB:
{
- BYTE aColors[3] = { 0, 0, 0 };
+ sal_uInt8 aColors[3] = { 0, 0, 0 };
DBG_ASSERT( aValue.CompareIgnoreCaseToAscii( sCSS1_rgb, 3 )
== COMPARE_EQUAL &&
@@ -1306,7 +1306,7 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
String aColorStr( aValue.Copy( 4, aValue.Len()-1 ) );
xub_StrLen nPos = 0;
- USHORT nCol = 0;
+ sal_uInt16 nCol = 0;
while( nCol < 3 && nPos < aColorStr.Len() )
{
@@ -1329,7 +1329,7 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
nPos = nEnd+1;
}
- USHORT nNumber = (USHORT)aNumber.ToInt32();
+ sal_uInt16 nNumber = (sal_uInt16)aNumber.ToInt32();
if( aNumber.Search('%') != STRING_NOTFOUND )
{
if( nNumber > 100 )
@@ -1340,7 +1340,7 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
else if( nNumber > 255 )
nNumber = 255;
- aColors[nCol] = (BYTE)nNumber;
+ aColors[nCol] = (sal_uInt8)nNumber;
nCol ++;
}
@@ -1348,7 +1348,7 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
rColor.SetGreen( aColors[1] );
rColor.SetBlue( aColors[2] );
- bRet = TRUE; // etwas anderes als eine Farbe kann es nicht sein
+ bRet = sal_True; // etwas anderes als eine Farbe kann es nicht sein
}
break;
@@ -1368,7 +1368,7 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
{
// HACK fuer MS-IE: DIe Farbe kann auch in einem String stehen
xub_StrLen nOffset = CSS1_STRING==eType ? 1 : 0;
- BOOL bDouble = aValue.Len()-nOffset == 3;
+ sal_Bool bDouble = aValue.Len()-nOffset == 3;
xub_StrLen i = nOffset, nEnd = (bDouble ? 3 : 6) + nOffset;
nColor = 0;
@@ -1395,7 +1395,7 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
nColor += c;
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
break;
default:
@@ -1405,9 +1405,9 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
if( bRet && nColor!=ULONG_MAX )
{
- rColor.SetRed( (BYTE)((nColor & 0x00ff0000UL) >> 16) );
- rColor.SetGreen( (BYTE)((nColor & 0x0000ff00UL) >> 8) );
- rColor.SetBlue( (BYTE)(nColor & 0x000000ffUL) );
+ rColor.SetRed( (sal_uInt8)((nColor & 0x00ff0000UL) >> 16) );
+ rColor.SetGreen( (sal_uInt8)((nColor & 0x0000ff00UL) >> 8) );
+ rColor.SetBlue( (sal_uInt8)(nColor & 0x000000ffUL) );
}
return bRet;
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index 64517351f524..b9ce6940a08d 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -259,13 +259,13 @@ static CSS1PropertyEnum const aPageBreakTable[] =
DEF_DOUBLE_LINE##n##_DIST
-static USHORT const aSBorderWidths[] =
+static sal_uInt16 aSBorderWidths[] =
{
SBORDER_ENTRY( 0 ), SBORDER_ENTRY( 1 ), SBORDER_ENTRY( 2 ),
SBORDER_ENTRY( 3 ), SBORDER_ENTRY( 4 )
};
-static USHORT const aDBorderWidths[] =
+static sal_uInt16 aDBorderWidths[] =
{
DBORDER_ENTRY( 0 ),
DBORDER_ENTRY( 7 ),
@@ -279,7 +279,7 @@ static USHORT const aDBorderWidths[] =
DBORDER_ENTRY( 5 )
};
-static USHORT const aTDBorderWidths[] =
+static sal_uInt16 aTDBorderWidths[] =
{
TDBORDER_ENTRY( 7 ), TDBORDER_ENTRY( 8 ), TDBORDER_ENTRY( 9 ),
TDBORDER_ENTRY( 10 )
@@ -292,41 +292,41 @@ static USHORT const aTDBorderWidths[] =
struct SvxCSS1ItemIds
{
- USHORT nFont;
- USHORT nFontCJK;
- USHORT nFontCTL;
- USHORT nPosture;
- USHORT nPostureCJK;
- USHORT nPostureCTL;
- USHORT nWeight;
- USHORT nWeightCJK;
- USHORT nWeightCTL;
- USHORT nFontHeight;
- USHORT nFontHeightCJK;
- USHORT nFontHeightCTL;
- USHORT nUnderline;
- USHORT nOverline;
- USHORT nCrossedOut;
- USHORT nColor;
- USHORT nKerning;
- USHORT nCaseMap;
- USHORT nBlink;
-
- USHORT nLineSpacing;
- USHORT nAdjust;
- USHORT nWidows;
- USHORT nOrphans;
- USHORT nFmtSplit;
-
- USHORT nLRSpace;
- USHORT nULSpace;
- USHORT nBox;
- USHORT nBrush;
-
- USHORT nLanguage;
- USHORT nLanguageCJK;
- USHORT nLanguageCTL;
- USHORT nDirection;
+ sal_uInt16 nFont;
+ sal_uInt16 nFontCJK;
+ sal_uInt16 nFontCTL;
+ sal_uInt16 nPosture;
+ sal_uInt16 nPostureCJK;
+ sal_uInt16 nPostureCTL;
+ sal_uInt16 nWeight;
+ sal_uInt16 nWeightCJK;
+ sal_uInt16 nWeightCTL;
+ sal_uInt16 nFontHeight;
+ sal_uInt16 nFontHeightCJK;
+ sal_uInt16 nFontHeightCTL;
+ sal_uInt16 nUnderline;
+ sal_uInt16 nOverline;
+ sal_uInt16 nCrossedOut;
+ sal_uInt16 nColor;
+ sal_uInt16 nKerning;
+ sal_uInt16 nCaseMap;
+ sal_uInt16 nBlink;
+
+ sal_uInt16 nLineSpacing;
+ sal_uInt16 nAdjust;
+ sal_uInt16 nWidows;
+ sal_uInt16 nOrphans;
+ sal_uInt16 nFmtSplit;
+
+ sal_uInt16 nLRSpace;
+ sal_uInt16 nULSpace;
+ sal_uInt16 nBox;
+ sal_uInt16 nBrush;
+
+ sal_uInt16 nLanguage;
+ sal_uInt16 nLanguageCJK;
+ sal_uInt16 nLanguageCTL;
+ sal_uInt16 nDirection;
};
@@ -338,8 +338,8 @@ static SvxCSS1ItemIds aItemIds;
struct SvxCSS1BorderInfo
{
Color aColor;
- USHORT nAbsWidth;
- USHORT nNamedWidth;
+ sal_uInt16 nAbsWidth;
+ sal_uInt16 nNamedWidth;
CSS1BorderStyle eStyle;
SvxCSS1BorderInfo() :
@@ -352,10 +352,10 @@ struct SvxCSS1BorderInfo
nNamedWidth( rInfo.nNamedWidth ), eStyle( rInfo.eStyle )
{}
- void SetBorderLine( USHORT nLine, SvxBoxItem &rBoxItem ) const;
+ void SetBorderLine( sal_uInt16 nLine, SvxBoxItem &rBoxItem ) const;
};
-void SvxCSS1BorderInfo::SetBorderLine( USHORT nLine, SvxBoxItem &rBoxItem ) const
+void SvxCSS1BorderInfo::SetBorderLine( sal_uInt16 nLine, SvxBoxItem &rBoxItem ) const
{
if( CSS1_BS_NONE==eStyle || nAbsWidth==0 ||
(nAbsWidth==USHRT_MAX && nNamedWidth==USHRT_MAX) )
@@ -367,7 +367,7 @@ void SvxCSS1BorderInfo::SetBorderLine( USHORT nLine, SvxBoxItem &rBoxItem ) cons
SvxBorderLine aBorderLine( &aColor );
// Linien-Stil doppelt oder einfach?
- BOOL bDouble = eStyle == CSS1_BS_DOUBLE;
+ sal_Bool bDouble = eStyle == CSS1_BS_DOUBLE;
if ( eStyle == CSS1_BS_DOTTED )
aBorderLine.SetStyle( DOTTED );
else if ( eStyle == CSS1_BS_DASHED )
@@ -378,8 +378,8 @@ void SvxCSS1BorderInfo::SetBorderLine( USHORT nLine, SvxBoxItem &rBoxItem ) cons
// benannte Breite umrechnenen, wenn keine absolute gegeben ist
if( nAbsWidth==USHRT_MAX )
{
- const USHORT *aWidths = bDouble ? aDBorderWidths : aSBorderWidths;
- USHORT nNWidth = nNamedWidth * 4;
+ const sal_uInt16 *aWidths = bDouble ? aDBorderWidths : aSBorderWidths;
+ sal_uInt16 nNWidth = nNamedWidth * 4;
aBorderLine.SetOutWidth( aWidths[nNWidth+1] );
aBorderLine.SetInWidth( aWidths[nNWidth+2] );
aBorderLine.SetDistance( aWidths[nNWidth+3] );
@@ -397,7 +397,7 @@ void SvxCSS1BorderInfo::SetBorderLine( USHORT nLine, SvxBoxItem &rBoxItem ) cons
SvxCSS1PropertyInfo::SvxCSS1PropertyInfo()
{
- for( USHORT i=0; i<4; i++ )
+ for( sal_uInt16 i=0; i<4; i++ )
aBorderInfos[i] = 0;
Clear();
@@ -432,7 +432,7 @@ SvxCSS1PropertyInfo::SvxCSS1PropertyInfo( const SvxCSS1PropertyInfo& rProp ) :
ePageBreakAfter( rProp.ePageBreakAfter )
// /Feature: PrintExt
{
- for( USHORT i=0; i<4; i++ )
+ for( sal_uInt16 i=0; i<4; i++ )
aBorderInfos[i] = rProp.aBorderInfos[i]
? new SvxCSS1BorderInfo( *rProp.aBorderInfos[i] )
: 0;
@@ -445,7 +445,7 @@ SvxCSS1PropertyInfo::~SvxCSS1PropertyInfo()
void SvxCSS1PropertyInfo::DestroyBorderInfos()
{
- for( USHORT i=0; i<4; i++ )
+ for( sal_uInt16 i=0; i<4; i++ )
{
delete aBorderInfos[i];
aBorderInfos[i] = 0;
@@ -455,8 +455,8 @@ void SvxCSS1PropertyInfo::DestroyBorderInfos()
void SvxCSS1PropertyInfo::Clear()
{
aId.Erase();
- bTopMargin = bBottomMargin = FALSE;
- bLeftMargin = bRightMargin = bTextIndent = FALSE;
+ bTopMargin = bBottomMargin = sal_False;
+ bLeftMargin = bRightMargin = bTextIndent = sal_False;
nLeftMargin = nRightMargin = 0;
eFloat = SVX_ADJUST_END;
@@ -477,24 +477,24 @@ void SvxCSS1PropertyInfo::Clear()
void SvxCSS1PropertyInfo::Merge( const SvxCSS1PropertyInfo& rProp )
{
if( rProp.bTopMargin )
- bTopMargin = TRUE;
+ bTopMargin = sal_True;
if( rProp.bBottomMargin )
- bBottomMargin = TRUE;
+ bBottomMargin = sal_True;
if( rProp.bLeftMargin )
{
- bLeftMargin = TRUE;
+ bLeftMargin = sal_True;
nLeftMargin = rProp.nLeftMargin;
}
if( rProp.bRightMargin )
{
- bRightMargin = TRUE;
+ bRightMargin = sal_True;
nRightMargin = rProp.nRightMargin;
}
if( rProp.bTextIndent )
- bTextIndent = TRUE;
+ bTextIndent = sal_True;
- for( USHORT i=0; i<4; i++ )
+ for( sal_uInt16 i=0; i<4; i++ )
{
if( rProp.aBorderInfos[i] )
{
@@ -561,9 +561,9 @@ void SvxCSS1PropertyInfo::Merge( const SvxCSS1PropertyInfo& rProp )
}
}
-SvxCSS1BorderInfo *SvxCSS1PropertyInfo::GetBorderInfo( USHORT nLine, BOOL bCreate )
+SvxCSS1BorderInfo *SvxCSS1PropertyInfo::GetBorderInfo( sal_uInt16 nLine, sal_Bool bCreate )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
switch( nLine )
{
case BOX_LINE_TOP: nPos = 0; break;
@@ -578,10 +578,10 @@ SvxCSS1BorderInfo *SvxCSS1PropertyInfo::GetBorderInfo( USHORT nLine, BOOL bCreat
return aBorderInfos[nPos];
}
-void SvxCSS1PropertyInfo::CopyBorderInfo( USHORT nSrcLine, USHORT nDstLine,
- USHORT nWhat )
+void SvxCSS1PropertyInfo::CopyBorderInfo( sal_uInt16 nSrcLine, sal_uInt16 nDstLine,
+ sal_uInt16 nWhat )
{
- SvxCSS1BorderInfo *pSrcInfo = GetBorderInfo( nSrcLine, FALSE );
+ SvxCSS1BorderInfo *pSrcInfo = GetBorderInfo( nSrcLine, sal_False );
if( !pSrcInfo )
return;
@@ -599,7 +599,7 @@ void SvxCSS1PropertyInfo::CopyBorderInfo( USHORT nSrcLine, USHORT nDstLine,
pDstInfo->eStyle = pSrcInfo->eStyle;
}
-void SvxCSS1PropertyInfo::CopyBorderInfo( USHORT nCount, USHORT nWhat )
+void SvxCSS1PropertyInfo::CopyBorderInfo( sal_uInt16 nCount, sal_uInt16 nWhat )
{
if( nCount==0 )
{
@@ -613,15 +613,15 @@ void SvxCSS1PropertyInfo::CopyBorderInfo( USHORT nCount, USHORT nWhat )
}
void SvxCSS1PropertyInfo::SetBoxItem( SfxItemSet& rItemSet,
- USHORT nMinBorderDist,
+ sal_uInt16 nMinBorderDist,
const SvxBoxItem *pDfltItem,
- BOOL bTable )
+ sal_Bool bTable )
{
- BOOL bChg = nTopBorderDistance != USHRT_MAX ||
+ sal_Bool bChg = nTopBorderDistance != USHRT_MAX ||
nBottomBorderDistance != USHRT_MAX ||
nLeftBorderDistance != USHRT_MAX ||
nRightBorderDistance != USHRT_MAX;
- USHORT i;
+ sal_uInt16 i;
for( i = 0; !bChg && i < 4; i++ )
bChg = aBorderInfos[i]!=0;
@@ -633,25 +633,25 @@ void SvxCSS1PropertyInfo::SetBoxItem( SfxItemSet& rItemSet,
if( pDfltItem )
aBoxItem = *pDfltItem;
- SvxCSS1BorderInfo *pInfo = GetBorderInfo( BOX_LINE_TOP, FALSE );
+ SvxCSS1BorderInfo *pInfo = GetBorderInfo( BOX_LINE_TOP, sal_False );
if( pInfo )
pInfo->SetBorderLine( BOX_LINE_TOP, aBoxItem );
- pInfo = GetBorderInfo( BOX_LINE_BOTTOM, FALSE );
+ pInfo = GetBorderInfo( BOX_LINE_BOTTOM, sal_False );
if( pInfo )
pInfo->SetBorderLine( BOX_LINE_BOTTOM, aBoxItem );
- pInfo = GetBorderInfo( BOX_LINE_LEFT, FALSE );
+ pInfo = GetBorderInfo( BOX_LINE_LEFT, sal_False );
if( pInfo )
pInfo->SetBorderLine( BOX_LINE_LEFT, aBoxItem );
- pInfo = GetBorderInfo( BOX_LINE_RIGHT, FALSE );
+ pInfo = GetBorderInfo( BOX_LINE_RIGHT, sal_False );
if( pInfo )
pInfo->SetBorderLine( BOX_LINE_RIGHT, aBoxItem );
for( i=0; i<4; i++ )
{
- USHORT nLine = BOX_LINE_TOP, nDist = 0;
+ sal_uInt16 nLine = BOX_LINE_TOP, nDist = 0;
switch( i )
{
case 0: nLine = BOX_LINE_TOP;
@@ -713,12 +713,12 @@ SvxCSS1MapEntry::SvxCSS1MapEntry( const String& rKey, const SfxItemSet& rItemSet
}
#if defined( ICC )
-BOOL operator==( const SvxCSS1MapEntry& rE1, const SvxCSS1MapEntry& rE2 )
+sal_Bool operator==( const SvxCSS1MapEntry& rE1, const SvxCSS1MapEntry& rE2 )
{
return rE1.aKey==rE2.aKey;
}
-BOOL operator<( const SvxCSS1MapEntry& rE1, const SvxCSS1MapEntry& rE2 )
+sal_Bool operator<( const SvxCSS1MapEntry& rE1, const SvxCSS1MapEntry& rE2 )
{
return rE1.aKey<rE2.aKey;
}
@@ -728,16 +728,16 @@ SV_IMPL_OP_PTRARR_SORT( SvxCSS1Map, SvxCSS1MapEntryPtr )
/* */
-BOOL SvxCSS1Parser::StyleParsed( const CSS1Selector * /*pSelector*/,
+sal_Bool SvxCSS1Parser::StyleParsed( const CSS1Selector * /*pSelector*/,
SfxItemSet& /*rItemSet*/,
SvxCSS1PropertyInfo& /*rPropInfo*/ )
{
// wie man sieht passiert hier gar nichts
- return TRUE;
+ return sal_True;
}
-BOOL SvxCSS1Parser::SelectorParsed( const CSS1Selector *pSelector,
- BOOL bFirst )
+sal_Bool SvxCSS1Parser::SelectorParsed( const CSS1Selector *pSelector,
+ sal_Bool bFirst )
{
if( bFirst )
{
@@ -746,7 +746,7 @@ BOOL SvxCSS1Parser::SelectorParsed( const CSS1Selector *pSelector,
// Dieses ist der erste Selektor einer Rule, also muessen
// die bisher geparsten Items auf die Styles verteilt werden
// pSheetPropInfo->CreateBoxItem( *pSheetItemSet, GetDfltBorderDist() );
- for( USHORT i=0; i<aSelectors.Count(); i++ )
+ for( sal_uInt16 i=0; i<aSelectors.Count(); i++ )
{
StyleParsed( aSelectors[i], *pSheetItemSet, *pSheetPropInfo );
}
@@ -760,27 +760,27 @@ BOOL SvxCSS1Parser::SelectorParsed( const CSS1Selector *pSelector,
aSelectors.C40_INSERT( CSS1Selector, pSelector, aSelectors.Count() );
- return FALSE; // den Selektor haben wir gespeichert. Loeschen toedlich!
+ return sal_False; // den Selektor haben wir gespeichert. Loeschen toedlich!
}
-BOOL SvxCSS1Parser::DeclarationParsed( const String& rProperty,
+sal_Bool SvxCSS1Parser::DeclarationParsed( const String& rProperty,
const CSS1Expression *pExpr )
{
DBG_ASSERT( pExpr, "DeclarationParsed() without Expression" );
if( !pExpr )
- return TRUE;
+ return sal_True;
ParseProperty( rProperty, pExpr );
- return TRUE; // die Deklaration brauchen wir nicht mehr. Loeschen!
+ return sal_True; // die Deklaration brauchen wir nicht mehr. Loeschen!
}
/* */
-SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, const String& rBaseURL, USHORT nMinFixLineSp,
- USHORT *pWhichIds, USHORT nWhichIds ) :
+SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, const String& rBaseURL, sal_uInt16 nMinFixLineSp,
+ sal_uInt16 *pWhichIds, sal_uInt16 nWhichIds ) :
CSS1Parser(),
sBaseURL( rBaseURL ),
pSheetItemSet(0),
@@ -789,48 +789,48 @@ SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, const String& rBaseURL, USHORT
nMinFixLineSpace( nMinFixLineSp ),
eDfltEnc( RTL_TEXTENCODING_DONTKNOW ),
nScriptFlags( CSS1_SCRIPT_ALL ),
- bIgnoreFontFamily( FALSE )
+ bIgnoreFontFamily( sal_False )
{
// Item-Ids auch initialisieren
- aItemIds.nFont = rPool.GetTrueWhich( SID_ATTR_CHAR_FONT, FALSE );
- aItemIds.nFontCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONT, FALSE );
- aItemIds.nFontCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONT, FALSE );
- aItemIds.nPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_POSTURE, FALSE );
- aItemIds.nPostureCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_POSTURE, FALSE );
- aItemIds.nPostureCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_POSTURE, FALSE );
- aItemIds.nWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_WEIGHT, FALSE );
- aItemIds.nWeightCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_WEIGHT, FALSE );
- aItemIds.nWeightCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_WEIGHT, FALSE );
- aItemIds.nFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_FONTHEIGHT, FALSE );
- aItemIds.nFontHeightCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONTHEIGHT, FALSE );
- aItemIds.nFontHeightCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONTHEIGHT, FALSE );
- aItemIds.nUnderline = rPool.GetTrueWhich( SID_ATTR_CHAR_UNDERLINE, FALSE );
- aItemIds.nOverline = rPool.GetTrueWhich( SID_ATTR_CHAR_OVERLINE, FALSE );
- aItemIds.nCrossedOut = rPool.GetTrueWhich( SID_ATTR_CHAR_STRIKEOUT, FALSE );
- aItemIds.nColor = rPool.GetTrueWhich( SID_ATTR_CHAR_COLOR, FALSE );
- aItemIds.nKerning = rPool.GetTrueWhich( SID_ATTR_CHAR_KERNING, FALSE );
- aItemIds.nCaseMap = rPool.GetTrueWhich( SID_ATTR_CHAR_CASEMAP, FALSE );
- aItemIds.nBlink = rPool.GetTrueWhich( SID_ATTR_FLASH, FALSE );
-
- aItemIds.nLineSpacing = rPool.GetTrueWhich( SID_ATTR_PARA_LINESPACE, FALSE );
- aItemIds.nAdjust = rPool.GetTrueWhich( SID_ATTR_PARA_ADJUST, FALSE );
- aItemIds.nWidows = rPool.GetTrueWhich( SID_ATTR_PARA_WIDOWS, FALSE );
- aItemIds.nOrphans = rPool.GetTrueWhich( SID_ATTR_PARA_ORPHANS, FALSE );
- aItemIds.nFmtSplit = rPool.GetTrueWhich( SID_ATTR_PARA_SPLIT, FALSE );
-
- aItemIds.nLRSpace = rPool.GetTrueWhich( SID_ATTR_LRSPACE, FALSE );
- aItemIds.nULSpace = rPool.GetTrueWhich( SID_ATTR_ULSPACE, FALSE );
- aItemIds.nBox = rPool.GetTrueWhich( SID_ATTR_BORDER_OUTER, FALSE );
- aItemIds.nBrush = rPool.GetTrueWhich( SID_ATTR_BRUSH, FALSE );
-
- aItemIds.nLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_LANGUAGE, FALSE );
- aItemIds.nLanguageCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_LANGUAGE, FALSE );
- aItemIds.nLanguageCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_LANGUAGE, FALSE );
- aItemIds.nDirection = rPool.GetTrueWhich( SID_ATTR_FRAMEDIRECTION, FALSE );
-
- aWhichMap.Insert( (USHORT)0, (USHORT)0 );
- SvParser::BuildWhichTbl( aWhichMap, (USHORT *)&aItemIds,
- sizeof(aItemIds) / sizeof(USHORT) );
+ aItemIds.nFont = rPool.GetTrueWhich( SID_ATTR_CHAR_FONT, sal_False );
+ aItemIds.nFontCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONT, sal_False );
+ aItemIds.nFontCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONT, sal_False );
+ aItemIds.nPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_POSTURE, sal_False );
+ aItemIds.nPostureCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_POSTURE, sal_False );
+ aItemIds.nPostureCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_POSTURE, sal_False );
+ aItemIds.nWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_WEIGHT, sal_False );
+ aItemIds.nWeightCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_WEIGHT, sal_False );
+ aItemIds.nWeightCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_WEIGHT, sal_False );
+ aItemIds.nFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_FONTHEIGHT, sal_False );
+ aItemIds.nFontHeightCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONTHEIGHT, sal_False );
+ aItemIds.nFontHeightCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONTHEIGHT, sal_False );
+ aItemIds.nUnderline = rPool.GetTrueWhich( SID_ATTR_CHAR_UNDERLINE, sal_False );
+ aItemIds.nOverline = rPool.GetTrueWhich( SID_ATTR_CHAR_OVERLINE, sal_False );
+ aItemIds.nCrossedOut = rPool.GetTrueWhich( SID_ATTR_CHAR_STRIKEOUT, sal_False );
+ aItemIds.nColor = rPool.GetTrueWhich( SID_ATTR_CHAR_COLOR, sal_False );
+ aItemIds.nKerning = rPool.GetTrueWhich( SID_ATTR_CHAR_KERNING, sal_False );
+ aItemIds.nCaseMap = rPool.GetTrueWhich( SID_ATTR_CHAR_CASEMAP, sal_False );
+ aItemIds.nBlink = rPool.GetTrueWhich( SID_ATTR_FLASH, sal_False );
+
+ aItemIds.nLineSpacing = rPool.GetTrueWhich( SID_ATTR_PARA_LINESPACE, sal_False );
+ aItemIds.nAdjust = rPool.GetTrueWhich( SID_ATTR_PARA_ADJUST, sal_False );
+ aItemIds.nWidows = rPool.GetTrueWhich( SID_ATTR_PARA_WIDOWS, sal_False );
+ aItemIds.nOrphans = rPool.GetTrueWhich( SID_ATTR_PARA_ORPHANS, sal_False );
+ aItemIds.nFmtSplit = rPool.GetTrueWhich( SID_ATTR_PARA_SPLIT, sal_False );
+
+ aItemIds.nLRSpace = rPool.GetTrueWhich( SID_ATTR_LRSPACE, sal_False );
+ aItemIds.nULSpace = rPool.GetTrueWhich( SID_ATTR_ULSPACE, sal_False );
+ aItemIds.nBox = rPool.GetTrueWhich( SID_ATTR_BORDER_OUTER, sal_False );
+ aItemIds.nBrush = rPool.GetTrueWhich( SID_ATTR_BRUSH, sal_False );
+
+ aItemIds.nLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_LANGUAGE, sal_False );
+ aItemIds.nLanguageCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_LANGUAGE, sal_False );
+ aItemIds.nLanguageCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_LANGUAGE, sal_False );
+ aItemIds.nDirection = rPool.GetTrueWhich( SID_ATTR_FRAMEDIRECTION, sal_False );
+
+ aWhichMap.Insert( (sal_uInt16)0, (sal_uInt16)0 );
+ SvParser::BuildWhichTbl( aWhichMap, (sal_uInt16 *)&aItemIds,
+ sizeof(aItemIds) / sizeof(sal_uInt16) );
if( pWhichIds && nWhichIds )
SvParser::BuildWhichTbl( aWhichMap, pWhichIds, nWhichIds );
@@ -849,14 +849,14 @@ SvxCSS1Parser::~SvxCSS1Parser()
/* */
-BOOL SvxCSS1Parser::ParseStyleSheet( const String& rIn )
+sal_Bool SvxCSS1Parser::ParseStyleSheet( const String& rIn )
{
pItemSet = pSheetItemSet;
pPropInfo = pSheetPropInfo;
- BOOL bSuccess = CSS1Parser::ParseStyleSheet( rIn );
+ sal_Bool bSuccess = CSS1Parser::ParseStyleSheet( rIn );
- for( USHORT i=0; i<aSelectors.Count(); i++ )
+ for( sal_uInt16 i=0; i<aSelectors.Count(); i++ )
{
StyleParsed( aSelectors[i], *pSheetItemSet, *pSheetPropInfo );
}
@@ -873,14 +873,14 @@ BOOL SvxCSS1Parser::ParseStyleSheet( const String& rIn )
return bSuccess;
}
-BOOL SvxCSS1Parser::ParseStyleOption( const String& rIn,
+sal_Bool SvxCSS1Parser::ParseStyleOption( const String& rIn,
SfxItemSet& rItemSet,
SvxCSS1PropertyInfo& rPropInfo )
{
pItemSet = &rItemSet;
pPropInfo = &rPropInfo;
- BOOL bSuccess = CSS1Parser::ParseStyleOption( rIn );
+ sal_Bool bSuccess = CSS1Parser::ParseStyleOption( rIn );
rItemSet.ClearItem( aItemIds.nDirection );
pItemSet = 0;
@@ -891,8 +891,8 @@ BOOL SvxCSS1Parser::ParseStyleOption( const String& rIn,
/* */
-BOOL SvxCSS1Parser::GetEnum( const CSS1PropertyEnum *pPropTable,
- const String &rValue, USHORT& rEnum )
+sal_Bool SvxCSS1Parser::GetEnum( const CSS1PropertyEnum *pPropTable,
+ const String &rValue, sal_uInt16& rEnum )
{
String aValue( rValue );
aValue.ToLowerAscii();
@@ -923,11 +923,11 @@ void SvxCSS1Parser::PixelToTwip( long &rWidth, long &rHeight )
}
}
-void SvxCSS1Parser::SetBorderWidth( SvxBorderLine& aBorderLine, USHORT nWidth,
- BOOL bDouble, BOOL bTable )
+void SvxCSS1Parser::SetBorderWidth( SvxBorderLine& aBorderLine, sal_uInt16 nWidth,
+ sal_Bool bDouble, sal_Bool bTable )
{
- const USHORT *aWidths;
- USHORT nSize;
+ const sal_uInt16 *aWidths;
+ sal_uInt16 nSize;
if( !bDouble )
{
aWidths = aSBorderWidths;
@@ -944,7 +944,7 @@ void SvxCSS1Parser::SetBorderWidth( SvxBorderLine& aBorderLine, USHORT nWidth,
nSize = sizeof( aDBorderWidths );
}
- USHORT i = (nSize / sizeof(USHORT)) - 4;
+ sal_uInt16 i = (nSize / sizeof(sal_uInt16)) - 4;
while( i>0 &&
nWidth <= ((aWidths[i] + aWidths[i-4]) / 2) )
{
@@ -958,9 +958,9 @@ void SvxCSS1Parser::SetBorderWidth( SvxBorderLine& aBorderLine, USHORT nWidth,
aBorderLine.SetDistance( aWidths[i+3] );
}
-sal_uInt32 SvxCSS1Parser::GetFontHeight( USHORT nSize ) const
+sal_uInt32 SvxCSS1Parser::GetFontHeight( sal_uInt16 nSize ) const
{
- USHORT nHeight;
+ sal_uInt16 nHeight;
switch( nSize )
{
@@ -988,7 +988,7 @@ SvxCSS1MapEntry *SvxCSS1Parser::GetMapEntry( const String& rKey,
pSearchEntry->SetKey( rKey );
SvxCSS1MapEntry *pRet = 0;
- USHORT nPos;
+ sal_uInt16 nPos;
if( rMap.Seek_Entry( pSearchEntry, &nPos ) )
pRet = rMap[nPos];
@@ -1004,7 +1004,7 @@ void SvxCSS1Parser::InsertMapEntry( const String& rKey,
if( pEntry )
{
MergeStyles( rItemSet, rProp,
- pEntry->GetItemSet(), pEntry->GetPropertyInfo(), TRUE );
+ pEntry->GetItemSet(), pEntry->GetPropertyInfo(), sal_True );
}
else
{
@@ -1017,7 +1017,7 @@ void SvxCSS1Parser::MergeStyles( const SfxItemSet& rSrcSet,
const SvxCSS1PropertyInfo& rSrcInfo,
SfxItemSet& rTargetSet,
SvxCSS1PropertyInfo& rTargetInfo,
- BOOL bSmart )
+ sal_Bool bSmart )
{
if( !bSmart )
{
@@ -1078,8 +1078,8 @@ static void ParseCSS1_font_size( const CSS1Expression *pExpr,
{
DBG_ASSERT( pExpr, "no expression" );
- ULONG nHeight = 0;
- USHORT nPropHeight = 100;
+ sal_uLong nHeight = 0;
+ sal_uInt16 nPropHeight = 100;
switch( pExpr->GetType() )
{
@@ -1091,16 +1091,16 @@ static void ParseCSS1_font_size( const CSS1Expression *pExpr,
long nPWidth = 0;
long nPHeight = (long)pExpr->GetNumber();
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- nHeight = (ULONG)nPHeight;
+ nHeight = (sal_uLong)nPHeight;
}
break;
case CSS1_PERCENTAGE:
// nur fuer Drop-Caps!
- nPropHeight = (USHORT)pExpr->GetNumber();
+ nPropHeight = (sal_uInt16)pExpr->GetNumber();
break;
case CSS1_IDENT:
{
- USHORT nSize;
+ sal_uInt16 nSize;
if( SvxCSS1Parser::GetEnum( aFontSizeTable, pExpr->GetString(),
nSize ) )
@@ -1148,8 +1148,8 @@ static void ParseCSS1_font_family( const CSS1Expression *pExpr,
FontPitch ePitch = PITCH_DONTKNOW;
rtl_TextEncoding eEnc = rParser.GetDfltEncoding();
const FontList *pFList = rParser.GetFontList();
- BOOL bFirst = TRUE;
- BOOL bFound = FALSE;
+ sal_Bool bFirst = sal_True;
+ sal_Bool bFound = sal_False;
while( pExpr && (bFirst || ','==pExpr->GetOp() || !pExpr->GetOp()) )
{
CSS1Token eType = pExpr->GetType();
@@ -1180,7 +1180,7 @@ static void ParseCSS1_font_family( const CSS1Expression *pExpr,
const FontInfo& rFInfo = pFList->GetFontInfo( hFont );
if( RTL_TEXTENCODING_DONTKNOW != rFInfo.GetCharSet() )
{
- bFound = TRUE;
+ bFound = sal_True;
if( RTL_TEXTENCODING_SYMBOL == rFInfo.GetCharSet() )
eEnc = RTL_TEXTENCODING_SYMBOL;
}
@@ -1193,7 +1193,7 @@ static void ParseCSS1_font_family( const CSS1Expression *pExpr,
}
pExpr = pExpr->GetNext();
- bFirst = FALSE;
+ bFirst = sal_False;
}
if( aName.Len() && !rParser.IsIgnoreFontFamily() )
@@ -1229,7 +1229,7 @@ static void ParseCSS1_font_weight( const CSS1Expression *pExpr,
case CSS1_IDENT:
case CSS1_STRING: // MS-IE, was sonst
{
- USHORT nWeight;
+ sal_uInt16 nWeight;
if( SvxCSS1Parser::GetEnum( aFontWeightTable, pExpr->GetString(),
nWeight ) )
{
@@ -1251,7 +1251,7 @@ static void ParseCSS1_font_weight( const CSS1Expression *pExpr,
break;
case CSS1_NUMBER:
{
- USHORT nWeight = (USHORT)pExpr->GetNumber();
+ sal_uInt16 nWeight = (sal_uInt16)pExpr->GetNumber();
SvxWeightItem aWeight( nWeight>400 ? WEIGHT_BOLD : WEIGHT_NORMAL,
aItemIds.nWeight );
if( rParser.IsSetWesternProps() )
@@ -1283,8 +1283,8 @@ static void ParseCSS1_font_style( const CSS1Expression *pExpr,
{
DBG_ASSERT( pExpr, "no expression" );
- BOOL bPosture = FALSE;
- BOOL bCaseMap = FALSE;
+ sal_Bool bPosture = sal_False;
+ sal_Bool bCaseMap = sal_False;
FontItalic eItalic = ITALIC_NONE;
SvxCaseMap eCaseMap = SVX_CASEMAP_NOT_MAPPED;
@@ -1292,7 +1292,7 @@ static void ParseCSS1_font_style( const CSS1Expression *pExpr,
// (wobei nor noch normal | italic und oblique zulaessig sind
// der Wert kann zwei Werte enthalten!
- for( USHORT i=0; pExpr && i<2; i++ )
+ for( sal_uInt16 i=0; pExpr && i<2; i++ )
{
// Auch hier hinterlaesst MS-IEs Parser seine Spuren
if( (CSS1_IDENT==pExpr->GetType() || CSS1_STRING==pExpr->GetType()) &&
@@ -1300,7 +1300,7 @@ static void ParseCSS1_font_style( const CSS1Expression *pExpr,
{
const String& rValue = pExpr->GetString();
// erstmal pruefen, ob es ein Italic-Wert oder 'normal' ist
- USHORT nItalic;
+ sal_uInt16 nItalic;
if( SvxCSS1Parser::GetEnum( aFontStyleTable, rValue, nItalic ) )
{
eItalic = (FontItalic)nItalic;
@@ -1308,15 +1308,15 @@ static void ParseCSS1_font_style( const CSS1Expression *pExpr,
{
// fuer 'normal' muessen wir auch die case-map aussch.
eCaseMap = SVX_CASEMAP_NOT_MAPPED;
- bCaseMap = TRUE;
+ bCaseMap = sal_True;
}
- bPosture = TRUE;
+ bPosture = sal_True;
}
else if( !bCaseMap &&
rValue.EqualsIgnoreCaseAscii(sCSS1_PV_small_caps) )
{
eCaseMap = SVX_CASEMAP_KAPITAELCHEN;
- bCaseMap = TRUE;
+ bCaseMap = sal_True;
}
}
@@ -1360,7 +1360,7 @@ static void ParseCSS1_font_variant( const CSS1Expression *pExpr,
{
case CSS1_IDENT:
{
- USHORT nCaseMap;
+ sal_uInt16 nCaseMap;
if( SvxCSS1Parser::GetEnum( aFontVariantTable, pExpr->GetString(),
nCaseMap ) )
{
@@ -1496,10 +1496,10 @@ static void ParseCSS1_background( const CSS1Expression *pExpr,
Color aColor;
String aURL;
- BOOL bColor = FALSE, bTransparent = FALSE;
+ sal_Bool bColor = sal_False, bTransparent = sal_False;
SvxGraphicPosition eRepeat = GPOS_TILED;
SvxGraphicPosition ePos = GPOS_LT;
- BOOL bHori = FALSE, bVert = FALSE;
+ sal_Bool bHori = sal_False, bVert = sal_False;
while( pExpr && !pExpr->GetOp() )
{
@@ -1521,16 +1521,16 @@ static void ParseCSS1_background( const CSS1Expression *pExpr,
// koennen Pixel auch wie alle anderen Einheiten behandelt
// werden.
- ULONG nLength = (ULONG)pExpr->GetNumber();
+ sal_uLong nLength = (sal_uLong)pExpr->GetNumber();
if( !bHori )
{
ePos = nLength ? GPOS_MM : GPOS_LT;
- bHori = TRUE;
+ bHori = sal_True;
}
else if( !bVert )
{
MergeVert( ePos, (nLength ? GPOS_LM : GPOS_LT) );
- bVert = TRUE;
+ bVert = sal_True;
}
}
break;
@@ -1539,7 +1539,7 @@ static void ParseCSS1_background( const CSS1Expression *pExpr,
{
// die %-Angabe wird auf den enum abgebildet
- USHORT nPerc = (USHORT)pExpr->GetNumber();
+ sal_uInt16 nPerc = (sal_uInt16)pExpr->GetNumber();
if( !bHori )
{
ePos = nPerc < 25 ? GPOS_LT
@@ -1560,11 +1560,11 @@ static void ParseCSS1_background( const CSS1Expression *pExpr,
case CSS1_HEXCOLOR:
case CSS1_STRING: // Wegen MS-IE
{
- USHORT nEnum;
+ sal_uInt16 nEnum;
const String &rValue = pExpr->GetString();
if( rValue.EqualsIgnoreCaseAscii( sCSS1_PV_transparent ) )
{
- bTransparent = TRUE;
+ bTransparent = sal_True;
}
if( SvxCSS1Parser::GetEnum( aBGRepeatTable, rValue, nEnum ) )
{
@@ -1599,7 +1599,7 @@ static void ParseCSS1_background( const CSS1Expression *pExpr,
// transparent schlaegt alles
if( bTransparent )
{
- bColor = FALSE;
+ bColor = sal_False;
aURL.Erase();
}
@@ -1635,7 +1635,7 @@ static void ParseCSS1_background_color( const CSS1Expression *pExpr,
Color aColor;
- BOOL bColor = FALSE, bTransparent = FALSE;
+ sal_Bool bColor = sal_False, bTransparent = sal_False;
switch( pExpr->GetType() )
{
@@ -1647,7 +1647,7 @@ static void ParseCSS1_background_color( const CSS1Expression *pExpr,
case CSS1_STRING: // Wegen MS-IE
if( pExpr->GetString().EqualsIgnoreCaseAscii( sCSS1_PV_transparent ) )
{
- bTransparent = TRUE;
+ bTransparent = sal_True;
}
else
{
@@ -1681,32 +1681,32 @@ static void ParseCSS1_line_height( const CSS1Expression *pExpr,
{
DBG_ASSERT( pExpr, "no expression" );
- USHORT nHeight = 0;
- BYTE nPropHeight = 0;
+ sal_uInt16 nHeight = 0;
+ sal_uInt8 nPropHeight = 0;
switch( pExpr->GetType() )
{
case CSS1_LENGTH:
- nHeight = (USHORT)pExpr->GetULength();
+ nHeight = (sal_uInt16)pExpr->GetULength();
break;
case CSS1_PIXLENGTH:
{
long nPWidth = 0;
long nPHeight = (long)pExpr->GetNumber();
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- nHeight = (USHORT)nPHeight;
+ nHeight = (sal_uInt16)nPHeight;
}
break;
case CSS1_PERCENTAGE:
{
- USHORT nPHeight = (USHORT)pExpr->GetNumber();
- nPropHeight = nPHeight <= 200 ? (BYTE)nPHeight : 200;
+ sal_uInt16 nPHeight = (sal_uInt16)pExpr->GetNumber();
+ nPropHeight = nPHeight <= 200 ? (sal_uInt8)nPHeight : 200;
}
break;
case CSS1_NUMBER:
{
- USHORT nPHeight = (USHORT)(pExpr->GetNumber() * 100);
- nPropHeight = nPHeight <= 200 ? (BYTE)nPHeight : 200;
+ sal_uInt16 nPHeight = (sal_uInt16)(pExpr->GetNumber() * 100);
+ nPropHeight = nPHeight <= 200 ? (sal_uInt8)nPHeight : 200;
}
break;
default:
@@ -1762,7 +1762,7 @@ static void ParseCSS1_font( const CSS1Expression *pExpr,
{
const String& rValue = pExpr->GetString();
- USHORT nEnum;
+ sal_uInt16 nEnum;
if( SvxCSS1Parser::GetEnum( aFontStyleTable, rValue, nEnum ) )
{
@@ -1779,7 +1779,7 @@ static void ParseCSS1_font( const CSS1Expression *pExpr,
}
else
{
- eWeight = (USHORT)pExpr->GetNumber() > 400 ? WEIGHT_BOLD
+ eWeight = (sal_uInt16)pExpr->GetNumber() > 400 ? WEIGHT_BOLD
: WEIGHT_NORMAL;
}
@@ -1902,11 +1902,11 @@ static void ParseCSS1_text_decoration( const CSS1Expression *pExpr,
{
DBG_ASSERT( pExpr, "no expression" );
- BOOL bUnderline = FALSE;
- BOOL bOverline = FALSE;
- BOOL bCrossedOut = FALSE;
- BOOL bBlink = FALSE;
- BOOL bBlinkOn = FALSE;
+ sal_Bool bUnderline = sal_False;
+ sal_Bool bOverline = sal_False;
+ sal_Bool bCrossedOut = sal_False;
+ sal_Bool bBlink = sal_False;
+ sal_Bool bBlinkOn = sal_False;
FontUnderline eUnderline = UNDERLINE_NONE;
FontUnderline eOverline = UNDERLINE_NONE;
FontStrikeout eCrossedOut = STRIKEOUT_NONE;
@@ -1917,73 +1917,73 @@ static void ParseCSS1_text_decoration( const CSS1Expression *pExpr,
{
String aValue = pExpr->GetString();
aValue.ToLowerAscii();
- BOOL bKnown = FALSE;
+ sal_Bool bKnown = sal_False;
switch( aValue.GetChar( 0 ) )
{
case 'n':
if( aValue.EqualsAscii( sCSS1_PV_none ) )
{
- bUnderline = TRUE;
+ bUnderline = sal_True;
eUnderline = UNDERLINE_NONE;
- bOverline = TRUE;
+ bOverline = sal_True;
eOverline = UNDERLINE_NONE;
- bCrossedOut = TRUE;
+ bCrossedOut = sal_True;
eCrossedOut = STRIKEOUT_NONE;
- bBlink = TRUE;
- bBlinkOn = FALSE;
+ bBlink = sal_True;
+ bBlinkOn = sal_False;
- bKnown = TRUE;
+ bKnown = sal_True;
}
break;
case 'u':
if( aValue.EqualsAscii( sCSS1_PV_underline ) )
{
- bUnderline = TRUE;
+ bUnderline = sal_True;
eUnderline = UNDERLINE_SINGLE;
- bKnown = TRUE;
+ bKnown = sal_True;
}
break;
case 'o':
if( aValue.EqualsAscii( sCSS1_PV_overline ) )
{
- bOverline = TRUE;
+ bOverline = sal_True;
eOverline = UNDERLINE_SINGLE;
- bKnown = TRUE;
+ bKnown = sal_True;
}
break;
case 'l':
if( aValue.EqualsAscii( sCSS1_PV_line_through ) )
{
- bCrossedOut = TRUE;
+ bCrossedOut = sal_True;
eCrossedOut = STRIKEOUT_SINGLE;
- bKnown = TRUE;
+ bKnown = sal_True;
}
break;
case 'b':
if( aValue.EqualsAscii( sCSS1_PV_blink ) )
{
- bBlink = TRUE;
- bBlinkOn = TRUE;
+ bBlink = sal_True;
+ bBlinkOn = sal_True;
- bKnown = TRUE;
+ bKnown = sal_True;
}
break;
}
if( !bKnown )
{
- bUnderline = TRUE;
+ bUnderline = sal_True;
eUnderline = UNDERLINE_SINGLE;
}
@@ -2015,7 +2015,7 @@ static void ParseCSS1_text_align( const CSS1Expression *pExpr,
if( CSS1_IDENT==pExpr->GetType() ||
CSS1_STRING==pExpr->GetType() ) // MS-IE, mal wieder
{
- USHORT nAdjust;
+ sal_uInt16 nAdjust;
if( SvxCSS1Parser::GetEnum( aTextAlignTable, pExpr->GetString(),
nAdjust ) )
{
@@ -2035,12 +2035,12 @@ static void ParseCSS1_text_indent( const CSS1Expression *pExpr,
DBG_ASSERT( pExpr, "no expression" );
short nIndent = 0;
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
switch( pExpr->GetType() )
{
case CSS1_LENGTH:
nIndent = (short)pExpr->GetSLength();
- bSet = TRUE;
+ bSet = sal_True;
break;
case CSS1_PIXLENGTH:
{
@@ -2048,7 +2048,7 @@ static void ParseCSS1_text_indent( const CSS1Expression *pExpr,
long nPHeight = 0;
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
nIndent = (short)nPWidth;
- bSet = TRUE;
+ bSet = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2061,7 +2061,7 @@ static void ParseCSS1_text_indent( const CSS1Expression *pExpr,
if( bSet )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, sal_False,
&pItem ) )
{
SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) );
@@ -2074,7 +2074,7 @@ static void ParseCSS1_text_indent( const CSS1Expression *pExpr,
aLRItem.SetTxtFirstLineOfst( nIndent );
rItemSet.Put( aLRItem );
}
- rPropInfo.bTextIndent = TRUE;
+ rPropInfo.bTextIndent = sal_True;
}
}
@@ -2088,13 +2088,13 @@ static void ParseCSS1_margin_left( const CSS1Expression *pExpr,
DBG_ASSERT( pExpr, "no expression" );
long nLeft = 0;
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
switch( pExpr->GetType() )
{
case CSS1_LENGTH:
{
nLeft = pExpr->GetSLength();
- bSet = TRUE;
+ bSet = sal_True;
}
break;
case CSS1_PIXLENGTH:
@@ -2102,7 +2102,7 @@ static void ParseCSS1_margin_left( const CSS1Expression *pExpr,
nLeft = (long)pExpr->GetNumber();
long nPHeight = 0;
SvxCSS1Parser::PixelToTwip( nLeft, nPHeight );
- bSet = TRUE;
+ bSet = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2118,20 +2118,20 @@ static void ParseCSS1_margin_left( const CSS1Expression *pExpr,
if( nLeft < 0 )
nLeft = 0;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, sal_False,
&pItem ) )
{
SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) );
- aLRItem.SetTxtLeft( (USHORT)nLeft );
+ aLRItem.SetTxtLeft( (sal_uInt16)nLeft );
rItemSet.Put( aLRItem );
}
else
{
SvxLRSpaceItem aLRItem( aItemIds.nLRSpace );
- aLRItem.SetTxtLeft( (USHORT)nLeft );
+ aLRItem.SetTxtLeft( (sal_uInt16)nLeft );
rItemSet.Put( aLRItem );
}
- rPropInfo.bLeftMargin = TRUE;
+ rPropInfo.bLeftMargin = sal_True;
}
}
@@ -2145,13 +2145,13 @@ static void ParseCSS1_margin_right( const CSS1Expression *pExpr,
DBG_ASSERT( pExpr, "no expression" );
long nRight = 0;
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
switch( pExpr->GetType() )
{
case CSS1_LENGTH:
{
nRight = pExpr->GetSLength();
- bSet = TRUE;
+ bSet = sal_True;
}
break;
case CSS1_PIXLENGTH:
@@ -2159,7 +2159,7 @@ static void ParseCSS1_margin_right( const CSS1Expression *pExpr,
nRight = (long)pExpr->GetNumber();
long nPHeight = 0;
SvxCSS1Parser::PixelToTwip( nRight, nPHeight );
- bSet = TRUE;
+ bSet = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2175,20 +2175,20 @@ static void ParseCSS1_margin_right( const CSS1Expression *pExpr,
if( nRight < 0 )
nRight = 0;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, sal_False,
&pItem ) )
{
SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) );
- aLRItem.SetRight( (USHORT)nRight );
+ aLRItem.SetRight( (sal_uInt16)nRight );
rItemSet.Put( aLRItem );
}
else
{
SvxLRSpaceItem aLRItem( aItemIds.nLRSpace );
- aLRItem.SetRight( (USHORT)nRight );
+ aLRItem.SetRight( (sal_uInt16)nRight );
rItemSet.Put( aLRItem );
}
- rPropInfo.bRightMargin = TRUE;
+ rPropInfo.bRightMargin = sal_True;
}
}
@@ -2201,8 +2201,8 @@ static void ParseCSS1_margin_top( const CSS1Expression *pExpr,
{
DBG_ASSERT( pExpr, "no expression" );
- USHORT nUpper = 0;
- BOOL bSet = FALSE;
+ sal_uInt16 nUpper = 0;
+ sal_Bool bSet = sal_False;
switch( pExpr->GetType() )
{
case CSS1_LENGTH:
@@ -2210,8 +2210,8 @@ static void ParseCSS1_margin_top( const CSS1Expression *pExpr,
long nTmp = pExpr->GetSLength();
if( nTmp < 0 )
nTmp = 0;
- nUpper = (USHORT)nTmp;
- bSet = TRUE;
+ nUpper = (sal_uInt16)nTmp;
+ bSet = sal_True;
}
break;
case CSS1_PIXLENGTH:
@@ -2221,8 +2221,8 @@ static void ParseCSS1_margin_top( const CSS1Expression *pExpr,
if( nPHeight < 0 )
nPHeight = 0;
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- nUpper = (USHORT)nPHeight;
- bSet = TRUE;
+ nUpper = (sal_uInt16)nPHeight;
+ bSet = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2235,7 +2235,7 @@ static void ParseCSS1_margin_top( const CSS1Expression *pExpr,
if( bSet )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, sal_False,
&pItem ) )
{
SvxULSpaceItem aULItem( *((const SvxULSpaceItem*)pItem) );
@@ -2248,7 +2248,7 @@ static void ParseCSS1_margin_top( const CSS1Expression *pExpr,
aULItem.SetUpper( nUpper );
rItemSet.Put( aULItem );
}
- rPropInfo.bTopMargin = TRUE;
+ rPropInfo.bTopMargin = sal_True;
}
}
@@ -2261,8 +2261,8 @@ static void ParseCSS1_margin_bottom( const CSS1Expression *pExpr,
{
DBG_ASSERT( pExpr, "no expression" );
- USHORT nLower = 0;
- BOOL bSet = FALSE;
+ sal_uInt16 nLower = 0;
+ sal_Bool bSet = sal_False;
switch( pExpr->GetType() )
{
case CSS1_LENGTH:
@@ -2270,8 +2270,8 @@ static void ParseCSS1_margin_bottom( const CSS1Expression *pExpr,
long nTmp = pExpr->GetSLength();
if( nTmp < 0 )
nTmp = 0;
- nLower = (USHORT)nTmp;
- bSet = TRUE;
+ nLower = (sal_uInt16)nTmp;
+ bSet = sal_True;
}
break;
case CSS1_PIXLENGTH:
@@ -2281,8 +2281,8 @@ static void ParseCSS1_margin_bottom( const CSS1Expression *pExpr,
if( nPHeight < 0 )
nPHeight = 0;
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- nLower = (USHORT)nPHeight;
- bSet = TRUE;
+ nLower = (sal_uInt16)nPHeight;
+ bSet = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2295,7 +2295,7 @@ static void ParseCSS1_margin_bottom( const CSS1Expression *pExpr,
if( bSet )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, sal_False,
&pItem ) )
{
SvxULSpaceItem aULItem( *((const SvxULSpaceItem*)pItem) );
@@ -2308,7 +2308,7 @@ static void ParseCSS1_margin_bottom( const CSS1Expression *pExpr,
aULItem.SetLower( nLower );
rItemSet.Put( aULItem );
}
- rPropInfo.bBottomMargin = TRUE;
+ rPropInfo.bBottomMargin = sal_True;
}
}
@@ -2322,11 +2322,11 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
DBG_ASSERT( pExpr, "no expression" );
long nMargins[4] = { 0, 0, 0, 0 };
- BOOL bSetMargins[4] = { FALSE, FALSE, FALSE, FALSE };
+ sal_Bool bSetMargins[4] = { sal_False, sal_False, sal_False, sal_False };
- for( USHORT i=0; pExpr && i<4 && !pExpr->GetOp(); i++ )
+ for( sal_uInt16 i=0; pExpr && i<4 && !pExpr->GetOp(); i++ )
{
- BOOL bSetThis = FALSE;
+ sal_Bool bSetThis = sal_False;
long nMargin = 0;
switch( pExpr->GetType() )
@@ -2334,7 +2334,7 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
case CSS1_LENGTH:
{
nMargin = pExpr->GetSLength();
- bSetThis = TRUE;
+ bSetThis = sal_True;
}
break;
case CSS1_PIXLENGTH:
@@ -2342,7 +2342,7 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
long nPWidth = 0;
nMargin = (long)pExpr->GetNumber();
SvxCSS1Parser::PixelToTwip( nPWidth, nMargin );
- bSetThis = TRUE;
+ bSetThis = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2363,19 +2363,19 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
case 0:
nMargins[0] = nMargins[1] =nMargins[2] = nMargins[3] = nMargin;
bSetMargins[0] = bSetMargins[1] =
- bSetMargins[2] = bSetMargins[3] = TRUE;
+ bSetMargins[2] = bSetMargins[3] = sal_True;
break;
case 1:
nMargins[1] = nMargins[3] = nMargin; // right + left
- bSetMargins[1] = bSetMargins[3] = TRUE;
+ bSetMargins[1] = bSetMargins[3] = sal_True;
break;
case 2:
nMargins[2] = nMargin; // bottom
- bSetMargins[2] = TRUE;
+ bSetMargins[2] = sal_True;
break;
case 3:
nMargins[3] = nMargin; // left
- bSetMargins[3] = TRUE;
+ bSetMargins[3] = sal_True;
break;
}
}
@@ -2386,37 +2386,37 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
{
if( bSetMargins[3] )
{
- rPropInfo.bLeftMargin = TRUE;
+ rPropInfo.bLeftMargin = sal_True;
rPropInfo.nLeftMargin = nMargins[3];
if( nMargins[3] < 0 )
nMargins[3] = 0;
}
if( bSetMargins[1] )
{
- rPropInfo.bRightMargin = TRUE;
+ rPropInfo.bRightMargin = sal_True;
rPropInfo.nRightMargin = nMargins[1];
if( nMargins[1] < 0 )
nMargins[1] = 0;
}
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, sal_False,
&pItem ) )
{
SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) );
if( bSetMargins[3] )
- aLRItem.SetLeft( (USHORT)nMargins[3] );
+ aLRItem.SetLeft( (sal_uInt16)nMargins[3] );
if( bSetMargins[1] )
- aLRItem.SetRight( (USHORT)nMargins[1] );
+ aLRItem.SetRight( (sal_uInt16)nMargins[1] );
rItemSet.Put( aLRItem );
}
else
{
SvxLRSpaceItem aLRItem( aItemIds.nLRSpace );
if( bSetMargins[3] )
- aLRItem.SetLeft( (USHORT)nMargins[3] );
+ aLRItem.SetLeft( (sal_uInt16)nMargins[3] );
if( bSetMargins[1] )
- aLRItem.SetRight( (USHORT)nMargins[1] );
+ aLRItem.SetRight( (sal_uInt16)nMargins[1] );
rItemSet.Put( aLRItem );
}
}
@@ -2429,23 +2429,23 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
nMargins[2] = 0;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, sal_False,
&pItem ) )
{
SvxULSpaceItem aULItem( *((const SvxULSpaceItem*)pItem) );
if( bSetMargins[0] )
- aULItem.SetUpper( (USHORT)nMargins[0] );
+ aULItem.SetUpper( (sal_uInt16)nMargins[0] );
if( bSetMargins[2] )
- aULItem.SetLower( (USHORT)nMargins[2] );
+ aULItem.SetLower( (sal_uInt16)nMargins[2] );
rItemSet.Put( aULItem );
}
else
{
SvxULSpaceItem aULItem( aItemIds.nULSpace );
if( bSetMargins[0] )
- aULItem.SetUpper( (USHORT)nMargins[0] );
+ aULItem.SetUpper( (sal_uInt16)nMargins[0] );
if( bSetMargins[2] )
- aULItem.SetLower( (USHORT)nMargins[2] );
+ aULItem.SetLower( (sal_uInt16)nMargins[2] );
rItemSet.Put( aULItem );
}
@@ -2456,16 +2456,16 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
/* */
-static BOOL ParseCSS1_padding_xxx( const CSS1Expression *pExpr,
+static sal_Bool ParseCSS1_padding_xxx( const CSS1Expression *pExpr,
SfxItemSet & /*rItemSet*/,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/,
- USHORT nWhichLine )
+ sal_uInt16 nWhichLine )
{
DBG_ASSERT( pExpr, "no expression" );
- BOOL bSet = FALSE;
- USHORT nDist = 0;
+ sal_Bool bSet = sal_False;
+ sal_uInt16 nDist = 0;
switch( pExpr->GetType() )
{
@@ -2476,8 +2476,8 @@ static BOOL ParseCSS1_padding_xxx( const CSS1Expression *pExpr,
nTmp = 0;
else if( nTmp > USHRT_MAX-1 )
nTmp = USHRT_MAX-1;
- nDist = (USHORT)nTmp;
- bSet = TRUE;
+ nDist = (sal_uInt16)nTmp;
+ bSet = sal_True;
}
break;
case CSS1_PIXLENGTH:
@@ -2489,8 +2489,8 @@ static BOOL ParseCSS1_padding_xxx( const CSS1Expression *pExpr,
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
if( nPWidth > USHRT_MAX-1 )
nPWidth = USHRT_MAX-1;
- nDist = (USHORT)nPWidth;
- bSet = TRUE;
+ nDist = (sal_uInt16)nPWidth;
+ bSet = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2555,10 +2555,10 @@ static void ParseCSS1_padding( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- USHORT n=0;
+ sal_uInt16 n=0;
while( n<4 && pExpr && !pExpr->GetOp() )
{
- USHORT nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
+ sal_uInt16 nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
if( ParseCSS1_padding_xxx( pExpr, rItemSet, rPropInfo, rParser,
nLine ) )
{
@@ -2582,15 +2582,15 @@ static void ParseCSS1_border_xxx( const CSS1Expression *pExpr,
SfxItemSet & /*rItemSet*/,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/,
- USHORT nWhichLine, BOOL bAll )
+ sal_uInt16 nWhichLine, sal_Bool bAll )
{
DBG_ASSERT( pExpr, "no expression" );
- USHORT nWidth = USHRT_MAX; // die Linien-Dicke
- USHORT nNWidth = 1; // benannte Linien-Dicke (und default)
+ sal_uInt16 nWidth = USHRT_MAX; // die Linien-Dicke
+ sal_uInt16 nNWidth = 1; // benannte Linien-Dicke (und default)
CSS1BorderStyle eStyle = CSS1_BS_NONE; // Linien-Style
Color aColor;
- BOOL bColor = FALSE;
+ sal_Bool bColor = sal_False;
while( pExpr && !pExpr->GetOp() )
{
@@ -2599,13 +2599,13 @@ static void ParseCSS1_border_xxx( const CSS1Expression *pExpr,
case CSS1_RGB:
case CSS1_HEXCOLOR:
if( pExpr->GetColor( aColor ) )
- bColor = TRUE;
+ bColor = sal_True;
break;
case CSS1_IDENT:
{
const String& rValue = pExpr->GetString();
- USHORT nValue;
+ sal_uInt16 nValue;
if( SvxCSS1Parser::GetEnum( aBorderWidthTable, rValue, nValue ) )
{
nNWidth = nValue;
@@ -2616,18 +2616,18 @@ static void ParseCSS1_border_xxx( const CSS1Expression *pExpr,
}
else if( pExpr->GetColor( aColor ) )
{
- bColor = TRUE;
+ bColor = sal_True;
}
}
break;
case CSS1_LENGTH:
- nWidth = (USHORT)pExpr->GetULength();
+ nWidth = (sal_uInt16)pExpr->GetULength();
break;
case CSS1_PIXLENGTH:
{
- BOOL bHori = nWhichLine == BOX_LINE_TOP ||
+ sal_Bool bHori = nWhichLine == BOX_LINE_TOP ||
nWhichLine == BOX_LINE_BOTTOM;
// Ein Pixel wird zur Haarlinie (ist huebscher)
long nWidthL = (long)pExpr->GetNumber();
@@ -2636,7 +2636,7 @@ static void ParseCSS1_border_xxx( const CSS1Expression *pExpr,
long nPWidth = bHori ? 0 : nWidthL;
long nPHeight = bHori ? nWidthL : 0;
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- nWidth = (USHORT)(bHori ? nPHeight : nPWidth);
+ nWidth = (sal_uInt16)(bHori ? nPHeight : nPWidth);
}
else
nWidth = 1;
@@ -2650,9 +2650,9 @@ static void ParseCSS1_border_xxx( const CSS1Expression *pExpr,
pExpr = pExpr->GetNext();
}
- for( USHORT i=0; i<4; i++ )
+ for( sal_uInt16 i=0; i<4; i++ )
{
- USHORT nLine = 0;
+ sal_uInt16 nLine = 0;
switch( i )
{
case 0: nLine = BOX_LINE_TOP; break;
@@ -2677,18 +2677,18 @@ static void ParseCSS1_border_xxx_width( const CSS1Expression *pExpr,
SfxItemSet & /*rItemSet*/,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/,
- USHORT nWhichLine )
+ sal_uInt16 nWhichLine )
{
DBG_ASSERT( pExpr, "no expression" );
- USHORT nWidth = USHRT_MAX; // die Linien-Dicke
- USHORT nNWidth = 1; // benannte Linien-Dicke (und default)
+ sal_uInt16 nWidth = USHRT_MAX; // die Linien-Dicke
+ sal_uInt16 nNWidth = 1; // benannte Linien-Dicke (und default)
switch( pExpr->GetType() )
{
case CSS1_IDENT:
{
- USHORT nValue;
+ sal_uInt16 nValue;
if( SvxCSS1Parser::GetEnum( aBorderWidthTable, pExpr->GetString(), nValue ) )
{
nNWidth = nValue;
@@ -2697,18 +2697,18 @@ static void ParseCSS1_border_xxx_width( const CSS1Expression *pExpr,
break;
case CSS1_LENGTH:
- nWidth = (USHORT)pExpr->GetULength();
+ nWidth = (sal_uInt16)pExpr->GetULength();
break;
case CSS1_PIXLENGTH:
{
- BOOL bHori = nWhichLine == BOX_LINE_TOP ||
+ sal_Bool bHori = nWhichLine == BOX_LINE_TOP ||
nWhichLine == BOX_LINE_BOTTOM;
long nWidthL = (long)pExpr->GetNumber();
long nPWidth = bHori ? 0 : nWidthL;
long nPHeight = bHori ? nWidthL : 0;
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- nWidth = (USHORT)(bHori ? nPHeight : nPWidth);
+ nWidth = (sal_uInt16)(bHori ? nPHeight : nPWidth);
}
break;
@@ -2760,10 +2760,10 @@ static void ParseCSS1_border_width( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- USHORT n=0;
+ sal_uInt16 n=0;
while( n<4 && pExpr && !pExpr->GetOp() )
{
- USHORT nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
+ sal_uInt16 nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
ParseCSS1_border_xxx_width( pExpr, rItemSet, rPropInfo, rParser, nLine );
rPropInfo.CopyBorderInfo( n, SVX_CSS1_BORDERINFO_WIDTH );
@@ -2777,10 +2777,10 @@ static void ParseCSS1_border_color( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- USHORT n=0;
+ sal_uInt16 n=0;
while( n<4 && pExpr && !pExpr->GetOp() )
{
- USHORT nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
+ sal_uInt16 nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
Color aColor;
switch( pExpr->GetType() )
{
@@ -2805,11 +2805,11 @@ static void ParseCSS1_border_style( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- USHORT n=0;
+ sal_uInt16 n=0;
while( n<4 && pExpr && !pExpr->GetOp() )
{
- USHORT nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
- USHORT nValue;
+ sal_uInt16 nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
+ sal_uInt16 nValue;
if( CSS1_IDENT==pExpr->GetType() &&
SvxCSS1Parser::GetEnum( aBorderStyleTable, pExpr->GetString(),
nValue ) )
@@ -2829,7 +2829,7 @@ static void ParseCSS1_border_top( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_TOP, FALSE );
+ ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_TOP, sal_False );
}
static void ParseCSS1_border_right( const CSS1Expression *pExpr,
@@ -2837,7 +2837,7 @@ static void ParseCSS1_border_right( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_RIGHT, FALSE );
+ ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_RIGHT, sal_False );
}
static void ParseCSS1_border_bottom( const CSS1Expression *pExpr,
@@ -2845,7 +2845,7 @@ static void ParseCSS1_border_bottom( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_BOTTOM, FALSE );
+ ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_BOTTOM, sal_False );
}
static void ParseCSS1_border_left( const CSS1Expression *pExpr,
@@ -2853,7 +2853,7 @@ static void ParseCSS1_border_left( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_LEFT, FALSE );
+ ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_LEFT, sal_False );
}
static void ParseCSS1_border( const CSS1Expression *pExpr,
@@ -2861,7 +2861,7 @@ static void ParseCSS1_border( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, 0, TRUE );
+ ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, 0, sal_True );
}
/* */
@@ -2875,7 +2875,7 @@ static void ParseCSS1_float( const CSS1Expression *pExpr,
if( CSS1_IDENT==pExpr->GetType() )
{
- USHORT nFloat;
+ sal_uInt16 nFloat;
if( SvxCSS1Parser::GetEnum( aFloatTable, pExpr->GetString(), nFloat ) )
rPropInfo.eFloat = (SvxAdjust)nFloat;
}
@@ -2893,7 +2893,7 @@ static void ParseCSS1_position( const CSS1Expression *pExpr,
if( CSS1_IDENT==pExpr->GetType() )
{
- USHORT nPos;
+ sal_uInt16 nPos;
if( SvxCSS1Parser::GetEnum( aPositionTable, pExpr->GetString(), nPos ) )
rPropInfo.ePosition = (SvxCSS1Position)nPos;
}
@@ -2904,7 +2904,7 @@ static void ParseCSS1_position( const CSS1Expression *pExpr,
static void ParseCSS1_length( const CSS1Expression *pExpr,
long& rLength,
SvxCSS1LengthType& rLengthType,
- BOOL bHori )
+ sal_Bool bHori )
{
switch( pExpr->GetType() )
{
@@ -2952,7 +2952,7 @@ static void ParseCSS1_width( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- ParseCSS1_length( pExpr, rPropInfo.nWidth, rPropInfo.eWidthType, TRUE );
+ ParseCSS1_length( pExpr, rPropInfo.nWidth, rPropInfo.eWidthType, sal_True );
}
static void ParseCSS1_height( const CSS1Expression *pExpr,
@@ -2960,7 +2960,7 @@ static void ParseCSS1_height( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- ParseCSS1_length( pExpr, rPropInfo.nHeight, rPropInfo.eHeightType, FALSE );
+ ParseCSS1_length( pExpr, rPropInfo.nHeight, rPropInfo.eHeightType, sal_False );
}
static void ParseCSS1_left( const CSS1Expression *pExpr,
@@ -2968,7 +2968,7 @@ static void ParseCSS1_left( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- ParseCSS1_length( pExpr, rPropInfo.nLeft, rPropInfo.eLeftType, TRUE );
+ ParseCSS1_length( pExpr, rPropInfo.nLeft, rPropInfo.eLeftType, sal_True );
}
static void ParseCSS1_top( const CSS1Expression *pExpr,
@@ -2976,7 +2976,7 @@ static void ParseCSS1_top( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- ParseCSS1_length( pExpr, rPropInfo.nTop, rPropInfo.eTopType, FALSE );
+ ParseCSS1_length( pExpr, rPropInfo.nTop, rPropInfo.eTopType, sal_False );
}
/* */
@@ -2987,14 +2987,14 @@ static void ParseCSS1_size( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- USHORT n=0;
+ sal_uInt16 n=0;
while( n<2 && pExpr && !pExpr->GetOp() )
{
switch( pExpr->GetType() )
{
case CSS1_IDENT:
{
- USHORT nValue;
+ sal_uInt16 nValue;
if( SvxCSS1Parser::GetEnum( aSizeTable, pExpr->GetString(),
nValue ) )
{
@@ -3042,7 +3042,7 @@ static void ParseCSS1_page_break_xxx( const CSS1Expression *pExpr,
{
if( CSS1_IDENT == pExpr->GetType() )
{
- USHORT nValue;
+ sal_uInt16 nValue;
if( SvxCSS1Parser::GetEnum( aPageBreakTable, pExpr->GetString(),
nValue ) )
{
@@ -3075,15 +3075,15 @@ static void ParseCSS1_page_break_inside( const CSS1Expression *pExpr,
SvxCSS1PageBreak eBreak(SVX_CSS1_PBREAK_NONE);
ParseCSS1_page_break_xxx( pExpr, eBreak );
- BOOL bSetSplit = FALSE, bSplit = TRUE;
+ sal_Bool bSetSplit = sal_False, bSplit = sal_True;
switch( eBreak )
{
case SVX_CSS1_PBREAK_AUTO:
- bSetSplit = TRUE;
+ bSetSplit = sal_True;
break;
case SVX_CSS1_PBREAK_AVOID:
- bSplit = FALSE;
- bSetSplit = TRUE;
+ bSplit = sal_False;
+ bSetSplit = sal_True;
break;
default:
;
@@ -3100,8 +3100,8 @@ static void ParseCSS1_widows( const CSS1Expression *pExpr,
{
if( CSS1_NUMBER == pExpr->GetType() )
{
- BYTE nVal = pExpr->GetNumber() <= 255
- ? (BYTE)pExpr->GetNumber()
+ sal_uInt8 nVal = pExpr->GetNumber() <= 255
+ ? (sal_uInt8)pExpr->GetNumber()
: 255;
SvxWidowsItem aWidowsItem( nVal, aItemIds.nWidows );
rItemSet.Put( aWidowsItem );
@@ -3115,8 +3115,8 @@ static void ParseCSS1_orphans( const CSS1Expression *pExpr,
{
if( CSS1_NUMBER == pExpr->GetType() )
{
- BYTE nVal = pExpr->GetNumber() <= 255
- ? (BYTE)pExpr->GetNumber()
+ sal_uInt8 nVal = pExpr->GetNumber() <= 255
+ ? (sal_uInt8)pExpr->GetNumber()
: 255;
SvxOrphansItem aOrphansItem( nVal, aItemIds.nOrphans );
rItemSet.Put( aOrphansItem );
@@ -3228,7 +3228,7 @@ static CSS1PropEntry aCSS1PropFnTab[] =
/* */
-static int bSortedPropFns = FALSE;
+static int bSortedPropFns = sal_False;
extern "C"
{
@@ -3276,7 +3276,7 @@ void SvxCSS1Parser::ParseProperty( const String& rProperty,
sizeof( aCSS1PropFnTab ) / sizeof( CSS1PropEntry ),
sizeof( CSS1PropEntry ),
CSS1PropEntryCompare );
- bSortedPropFns = TRUE;
+ bSortedPropFns = sal_True;
}
String aTmp( rProperty );
diff --git a/sw/source/filter/html/swcss1.hxx b/sw/source/filter/html/swcss1.hxx
index 3551d8357cd8..8c7265016e71 100644
--- a/sw/source/filter/html/swcss1.hxx
+++ b/sw/source/filter/html/swcss1.hxx
@@ -50,64 +50,64 @@ class SwCSS1Parser : public SvxCSS1Parser
{
SwDoc *pDoc;
- ULONG aFontHeights[7];
+ sal_uLong aFontHeights[7];
- USHORT nDropCapCnt;
+ sal_uInt16 nDropCapCnt;
- BOOL bIsNewDoc : 1;
+ sal_Bool bIsNewDoc : 1;
- BOOL bBodyBGColorSet : 1;
- BOOL bBodyBackgroundSet : 1;
- BOOL bBodyTextSet : 1;
- BOOL bBodyLinkSet : 1;
- BOOL bBodyVLinkSet : 1;
+ sal_Bool bBodyBGColorSet : 1;
+ sal_Bool bBodyBackgroundSet : 1;
+ sal_Bool bBodyTextSet : 1;
+ sal_Bool bBodyLinkSet : 1;
+ sal_Bool bBodyVLinkSet : 1;
- BOOL bSetFirstPageDesc : 1;
- BOOL bSetRightPageDesc : 1;
+ sal_Bool bSetFirstPageDesc : 1;
+ sal_Bool bSetRightPageDesc : 1;
- BOOL bTableHeaderTxtCollSet : 1;
- BOOL bTableTxtCollSet : 1;
+ sal_Bool bTableHeaderTxtCollSet : 1;
+ sal_Bool bTableTxtCollSet : 1;
- BOOL bLinkCharFmtsSet : 1;
+ sal_Bool bLinkCharFmtsSet : 1;
// die Vorlagen fuer DL anlegen
- SwTxtFmtColl* GetDefListTxtFmtColl( USHORT nCollId, USHORT nDeep );
+ SwTxtFmtColl* GetDefListTxtFmtColl( sal_uInt16 nCollId, sal_uInt16 nDeep );
- const SwPageDesc* GetPageDesc( USHORT nPoolId, BOOL bCreate );
+ const SwPageDesc* GetPageDesc( sal_uInt16 nPoolId, sal_Bool bCreate );
- void SetTableTxtColl( BOOL bHeader );
+ void SetTableTxtColl( sal_Bool bHeader );
void SetLinkCharFmts();
protected:
- virtual BOOL StyleParsed( const CSS1Selector *pSelector,
+ virtual sal_Bool StyleParsed( const CSS1Selector *pSelector,
SfxItemSet& rItemSet,
SvxCSS1PropertyInfo& rPropInfo );
using CSS1Parser::ParseStyleSheet;
public:
- SwCSS1Parser( SwDoc *pDoc, sal_uInt32 aFHeight[7], const String& rBaseURL, BOOL bNewDoc );
+ SwCSS1Parser( SwDoc *pDoc, sal_uInt32 aFHeight[7], const String& rBaseURL, sal_Bool bNewDoc );
virtual ~SwCSS1Parser();
- virtual BOOL ParseStyleSheet( const String& rIn );
+ virtual sal_Bool ParseStyleSheet( const String& rIn );
// Die Font-Hoehe fuer eine bestimmte Font-Groesse (0-6) ermitteln
- virtual sal_uInt32 GetFontHeight( USHORT nSize ) const;
+ virtual sal_uInt32 GetFontHeight( sal_uInt16 nSize ) const;
// Die aktuelle Font-Liste holen (auch 0 ist erlaubt)
virtual const FontList *GetFontList() const;
// das Zeichen-Format zu einem Token und einer ggf leeren Klasse
// ermitteln
- SwCharFmt* GetChrFmt( USHORT nToken, const String& rClass ) const;
+ SwCharFmt* GetChrFmt( sal_uInt16 nToken, const String& rClass ) const;
// eine TextFmtColl zu einer Pool-Id ermitteln
- SwTxtFmtColl *GetTxtFmtColl( USHORT nTxtColl, const String& rClass );
+ SwTxtFmtColl *GetTxtFmtColl( sal_uInt16 nTxtColl, const String& rClass );
// This methods do the same as the one of SwDoc, but change the
// encoding if required.
- SwTxtFmtColl *GetTxtCollFromPool( USHORT nPoolId ) const;
- SwCharFmt *GetCharFmtFromPool( USHORT nPoolId ) const;
+ SwTxtFmtColl *GetTxtCollFromPool( sal_uInt16 nPoolId ) const;
+ SwCharFmt *GetCharFmtFromPool( sal_uInt16 nPoolId ) const;
// Die linke oder rechte Seiten-Vorlage holen. In Dokumenten mit nur
// einer Vorlage gibt es nur eine rechtee Seite.
@@ -115,9 +115,9 @@ public:
// eine Benutzter-Vorlage, die on-demand angelegt wird, wenn
// bCreate gesetzt ist.
SwPageDesc* GetMasterPageDesc();
- inline const SwPageDesc* GetFirstPageDesc( BOOL bCreate=FALSE );
- inline const SwPageDesc* GetRightPageDesc( BOOL bCreate=FALSE );
- inline const SwPageDesc* GetLeftPageDesc( BOOL bCreate=FALSE );
+ inline const SwPageDesc* GetFirstPageDesc( sal_Bool bCreate=sal_False );
+ inline const SwPageDesc* GetRightPageDesc( sal_Bool bCreate=sal_False );
+ inline const SwPageDesc* GetLeftPageDesc( sal_Bool bCreate=sal_False );
// Attribute an der HTML-Seitenvorlage setzen (gesetzte Attribute
// werden aus dem Item-Set geloescht ). Wird fuer's BODY-Tag
@@ -136,7 +136,7 @@ public:
void FillDropCap( SwFmtDrop& rDrop, SfxItemSet& rItemSet,
const String *pName=0 );
- BOOL SetFmtBreak( SfxItemSet& rItemSet,
+ sal_Bool SetFmtBreak( SfxItemSet& rItemSet,
const SvxCSS1PropertyInfo& rPropInfo );
@@ -144,26 +144,26 @@ public:
static inline void AddFirstLetterExt( String& rFmtName );
- static BOOL MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo,
- BOOL bAutoWidth=FALSE );
+ static sal_Bool MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo,
+ sal_Bool bAutoWidth=sal_False );
static sal_uInt16 GetScriptFromClass( String& rClass,
sal_Bool bSubClassOnly = sal_True );
- BOOL IsBodyBGColorSet() const { return bBodyBGColorSet; }
- BOOL IsBodyBackgroundSet() const { return bBodyBackgroundSet; }
- BOOL IsBodyTextSet() const { return bBodyTextSet; }
- BOOL IsBodyLinkSet() const { return bBodyLinkSet; }
- BOOL IsBodyVLinkSet() const { return bBodyVLinkSet; }
+ sal_Bool IsBodyBGColorSet() const { return bBodyBGColorSet; }
+ sal_Bool IsBodyBackgroundSet() const { return bBodyBackgroundSet; }
+ sal_Bool IsBodyTextSet() const { return bBodyTextSet; }
+ sal_Bool IsBodyLinkSet() const { return bBodyLinkSet; }
+ sal_Bool IsBodyVLinkSet() const { return bBodyVLinkSet; }
- BOOL IsSetFirstPageDesc() const { return bSetFirstPageDesc; }
- BOOL IsSetRightPageDesc() const { return bSetRightPageDesc; }
+ sal_Bool IsSetFirstPageDesc() const { return bSetFirstPageDesc; }
+ sal_Bool IsSetRightPageDesc() const { return bSetRightPageDesc; }
- void SetBodyBGColorSet() { bBodyBGColorSet = TRUE; }
- void SetBodyBackgroundSet() { bBodyBackgroundSet = TRUE; }
- void SetBodyTextSet() { bBodyTextSet = TRUE; }
- void SetBodyLinkSet() { bBodyLinkSet = TRUE; }
- void SetBodyVLinkSet() { bBodyVLinkSet = TRUE; }
+ void SetBodyBGColorSet() { bBodyBGColorSet = sal_True; }
+ void SetBodyBackgroundSet() { bBodyBackgroundSet = sal_True; }
+ void SetBodyTextSet() { bBodyTextSet = sal_True; }
+ void SetBodyLinkSet() { bBodyLinkSet = sal_True; }
+ void SetBodyVLinkSet() { bBodyVLinkSet = sal_True; }
const SvxBrushItem& GetPageDescBackground() const;
@@ -181,17 +181,17 @@ inline void SwCSS1Parser::AddFirstLetterExt( String& rFmtName )
rFmtName.AppendAscii( ".FL", 3 ); // first letter
}
-inline const SwPageDesc* SwCSS1Parser::GetFirstPageDesc( BOOL bCreate )
+inline const SwPageDesc* SwCSS1Parser::GetFirstPageDesc( sal_Bool bCreate )
{
return GetPageDesc( RES_POOLPAGE_FIRST, bCreate );
}
-inline const SwPageDesc* SwCSS1Parser::GetRightPageDesc( BOOL bCreate )
+inline const SwPageDesc* SwCSS1Parser::GetRightPageDesc( sal_Bool bCreate )
{
return GetPageDesc( RES_POOLPAGE_RIGHT, bCreate );
}
-inline const SwPageDesc* SwCSS1Parser::GetLeftPageDesc( BOOL bCreate )
+inline const SwPageDesc* SwCSS1Parser::GetLeftPageDesc( sal_Bool bCreate )
{
return GetPageDesc( RES_POOLPAGE_LEFT, bCreate );
}
@@ -199,13 +199,13 @@ inline const SwPageDesc* SwCSS1Parser::GetLeftPageDesc( BOOL bCreate )
inline void SwCSS1Parser::SetTHTagStyles()
{
if( !bTableHeaderTxtCollSet )
- SetTableTxtColl( TRUE );
+ SetTableTxtColl( sal_True );
}
inline void SwCSS1Parser::SetTDTagStyles()
{
if( !bTableTxtCollSet )
- SetTableTxtColl( FALSE );
+ SetTableTxtColl( sal_False );
}
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 744689b8d5c8..1d7de83e37f9 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -88,6 +88,7 @@
#include <docary.hxx>
#include <docstat.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
#include <mdiexp.hxx> // ...Percent()
@@ -157,7 +158,7 @@ SV_IMPL_PTRARR( _HTMLAttrs, _HTMLAttrPtr )
HTMLReader::HTMLReader()
{
- bTmplBrowseMode = TRUE;
+ bTmplBrowseMode = sal_True;
}
String HTMLReader::GetTemplateName() const
@@ -174,7 +175,7 @@ String HTMLReader::GetTemplateName() const
SvtPathOptions aPathOpt;
// OpenDocument Writer/Web template (extension .oth)
- BOOL bSet = aPathOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE );
+ sal_Bool bSet = aPathOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE );
#ifndef MAC_WITHOUT_EXT
if( !bSet )
@@ -206,14 +207,14 @@ int HTMLReader::SetStrmStgPtr()
if( pMedium->IsRemote() || !pMedium->IsStorage() )
{
pStrm = pMedium->GetInStream();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// Aufruf fuer die allg. Reader-Schnittstelle
-ULONG HTMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String & rName )
+sal_uLong HTMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String & rName )
{
if( !pStrm )
{
@@ -237,7 +238,7 @@ ULONG HTMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const
// damit keiner das Doc klaut!
rDoc.acquire();
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
SvParserRef xParser = new SwHTMLParser( &rDoc, rPam, *pStrm,
rName, rBaseURL, !bInsertMode, pMedium,
IsReadUTF8(),
@@ -269,9 +270,9 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
const String& rPath,
const String& rBaseURL,
int bReadNewDoc,
- SfxMedium* pMed, BOOL bReadUTF8,
+ SfxMedium* pMed, sal_Bool bReadUTF8,
sal_Bool bNoHTMLComments )
- : SfxHTMLParser( rIn, static_cast< BOOL >(bReadNewDoc), pMed ),
+ : SfxHTMLParser( rIn, static_cast< sal_Bool >(bReadNewDoc), pMed ),
SwClient( 0 ),
aPathToFile( rPath ),
sBaseURL( rBaseURL ),
@@ -307,32 +308,32 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
nContinue( 0 ),
#endif
eParaAdjust( SVX_ADJUST_END ),
- bDocInitalized( FALSE ),
- bSetModEnabled( FALSE ),
- bInFloatingFrame( FALSE ),
- bInField( FALSE ),
- bCallNextToken( FALSE ),
- bIgnoreRawData( FALSE ),
- bNoParSpace( FALSE ),
- bInNoEmbed( FALSE ),
- bInTitle( FALSE ),
- bUpdateDocStat( FALSE ),
- bFixSelectWidth( FALSE ),
- bFixSelectHeight( FALSE ),
- bTextArea( FALSE ),
- bSelect( FALSE ),
- bInFootEndNoteAnchor( FALSE ),
- bInFootEndNoteSymbol( FALSE ),
+ bDocInitalized( sal_False ),
+ bSetModEnabled( sal_False ),
+ bInFloatingFrame( sal_False ),
+ bInField( sal_False ),
+ bCallNextToken( sal_False ),
+ bIgnoreRawData( sal_False ),
+ bNoParSpace( sal_False ),
+ bInNoEmbed( sal_False ),
+ bInTitle( sal_False ),
+ bUpdateDocStat( sal_False ),
+ bFixSelectWidth( sal_False ),
+ bFixSelectHeight( sal_False ),
+ bTextArea( sal_False ),
+ bSelect( sal_False ),
+ bInFootEndNoteAnchor( sal_False ),
+ bInFootEndNoteSymbol( sal_False ),
bIgnoreHTMLComments( bNoHTMLComments ),
- bRemoveHidden( FALSE ),
+ bRemoveHidden( sal_False ),
pTempViewFrame(0)
{
nEventId = 0;
bUpperSpace = bViewCreated = bChkJumpMark =
- bSetCrsr = FALSE;
+ bSetCrsr = sal_False;
eScriptLang = HTML_SL_UNKNOWN;
- bAnyStarBasic = TRUE;
+ bAnyStarBasic = sal_True;
pPam = new SwPaM( *rCrsr.GetPoint() );
memset( &aAttrTab, 0, sizeof( _HTMLAttrTable ));
@@ -385,7 +386,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
SwDocShell* pDocSh = pDoc->GetDocShell();
if( pDocSh )
{
- bViewCreated = TRUE; // nicht, synchron laden
+ bViewCreated = sal_True; // nicht, synchron laden
// es ist ein Sprungziel vorgegeben.
@@ -435,8 +436,8 @@ SwHTMLParser::~SwHTMLParser()
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE( !nContinue, "DTOR im Continue - Das geht schief!!!" );
#endif
- BOOL bAsync = pDoc->IsInLoadAsynchron();
- pDoc->SetInLoadAsynchron( FALSE );
+ sal_Bool bAsync = pDoc->IsInLoadAsynchron();
+ pDoc->SetInLoadAsynchron( sal_False );
pDoc->set(IDocumentSettingAccess::HTML_MODE, bOldIsHTMLMode);
if( pDoc->GetDocShell() && nEventId )
@@ -447,11 +448,11 @@ SwHTMLParser::~SwHTMLParser()
if( pDoc->GetDocShell() )
{
// Gelinkte Bereiche updaten
- USHORT nLinkMode = pDoc->getLinkUpdateMode( true );
+ sal_uInt16 nLinkMode = pDoc->getLinkUpdateMode( true );
if( nLinkMode != NEVER && bAsync &&
SFX_CREATE_MODE_INTERNAL!=pDoc->GetDocShell()->GetCreateMode() )
pDoc->GetLinkManager().UpdateAllLinks( nLinkMode == MANUAL,
- TRUE, FALSE );
+ sal_True, sal_False );
if ( pDoc->GetDocShell()->IsLoading() )
{
@@ -557,7 +558,7 @@ SvParserState SwHTMLParser::CallParser()
}
else
{
- bViewCreated = TRUE;
+ bViewCreated = sal_True;
nEventId = 0;
}
}
@@ -605,8 +606,8 @@ void SwHTMLParser::Continue( int nToken )
// An dieser Stelle wurde im CallParser gerade mal ein Zeichen
// gelesen und ein SaveState(0) gerufen.
eState = SVPAR_PENDING;
- bViewCreated = TRUE;
- pDoc->SetInLoadAsynchron( TRUE );
+ bViewCreated = sal_True;
+ pDoc->SetInLoadAsynchron( sal_True );
#if OSL_DEBUG_LEVEL > 1
nContinue--;
@@ -615,20 +616,20 @@ void SwHTMLParser::Continue( int nToken )
return;
}
- bSetModEnabled = FALSE;
+ bSetModEnabled = sal_False;
if( pDoc->GetDocShell() &&
0 != (bSetModEnabled = pDoc->GetDocShell()->IsEnableSetModified()) )
{
- pDoc->GetDocShell()->EnableSetModified( FALSE );
+ pDoc->GetDocShell()->EnableSetModified( sal_False );
}
// waehrend des einlesens kein OLE-Modified rufen
Link aOLELink( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
- BOOL bModified = pDoc->IsModified();
- BOOL bWasUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bModified = pDoc->IsModified();
+ bool const bWasUndo = pDoc->GetIDocumentUndoRedo().DoesUndo();
+ pDoc->GetIDocumentUndoRedo().DoUndo(false);
// Wenn der Import abgebrochen wird, kein Continue mehr rufen.
// Falls ein Pending-Stack existiert aber durch einen Aufruf
@@ -651,7 +652,7 @@ void SwHTMLParser::Continue( int nToken )
// Laufbalken wieder abschalten
EndProgress( pDoc->GetDocShell() );
- BOOL bLFStripped = FALSE;
+ sal_Bool bLFStripped = sal_False;
if( SVPAR_PENDING != GetStatus() )
{
// noch die letzten Attribute setzen
@@ -662,7 +663,7 @@ void SwHTMLParser::Continue( int nToken )
(SwScriptFieldType*)pDoc->GetSysFldType( RES_SCRIPTFLD );
SwScriptField aFld( pType, aScriptType, aScriptSource,
- FALSE );
+ sal_False );
InsertAttr( SwFmtFld( aFld ) );
}
@@ -697,7 +698,7 @@ void SwHTMLParser::Continue( int nToken )
if( aParaAttrs.Count() )
aParaAttrs.Remove( 0, aParaAttrs.Count() );
- SetAttr( FALSE );
+ SetAttr( sal_False );
// Noch die erst verzoegert gesetzten Styles setzen
pCSS1Parser->SetDelayedStyles();
@@ -720,21 +721,21 @@ void SwHTMLParser::Continue( int nToken )
#if OSL_DEBUG_LEVEL > 1
// !!! sollte nicht moeglich sein, oder ??
-OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( TRUE ).nNode.GetIndex(),
+OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( sal_True ).nNode.GetIndex(),
"Pam.Bound1 steht noch im Node" );
-OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( FALSE ).nNode.GetIndex(),
+OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( sal_False ).nNode.GetIndex(),
"Pam.Bound2 steht noch im Node" );
-if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( TRUE ).nNode.GetIndex() )
+if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_True ).nNode.GetIndex() )
{
- xub_StrLen nCntPos = pPam->GetBound( TRUE ).nContent.GetIndex();
- pPam->GetBound( TRUE ).nContent.Assign( pTxtNode,
+ xub_StrLen nCntPos = pPam->GetBound( sal_True ).nContent.GetIndex();
+ pPam->GetBound( sal_True ).nContent.Assign( pTxtNode,
pTxtNode->GetTxt().Len() + nCntPos );
}
-if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
+if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_False ).nNode.GetIndex() )
{
- xub_StrLen nCntPos = pPam->GetBound( FALSE ).nContent.GetIndex();
- pPam->GetBound( FALSE ).nContent.Assign( pTxtNode,
+ xub_StrLen nCntPos = pPam->GetBound( sal_False ).nContent.GetIndex();
+ pPam->GetBound( sal_False ).nContent.Assign( pTxtNode,
pTxtNode->GetTxt().Len() + nCntPos );
}
#endif
@@ -763,10 +764,10 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
if( !pPos->nContent.GetIndex() && !bLFStripped )
{
SwTxtNode* pAktNd;
- ULONG nNodeIdx = pPos->nNode.GetIndex();
+ sal_uLong nNodeIdx = pPos->nNode.GetIndex();
- BOOL bHasFlysOrMarks =
- HasCurrentParaFlys() || HasCurrentParaBookmarks( TRUE );
+ sal_Bool bHasFlysOrMarks =
+ HasCurrentParaFlys() || HasCurrentParaBookmarks( sal_True );
if( IsNewDoc() )
{
@@ -792,8 +793,8 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
pCrsrSh->SetMark();
pCrsrSh->ClearMark();
}
- pPam->GetBound(TRUE).nContent.Assign( 0, 0 );
- pPam->GetBound(FALSE).nContent.Assign( 0, 0 );
+ pPam->GetBound(sal_True).nContent.Assign( 0, 0 );
+ pPam->GetBound(sal_False).nContent.Assign( 0, 0 );
pDoc->GetNodes().Delete( pPam->GetPoint()->nNode );
}
}
@@ -841,10 +842,10 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
if( pPrev->HasSwAttrSet() )
pTxtNode->SetAttr( *pPrev->GetpSwAttrSet() );
- if( &pPam->GetBound(TRUE).nNode.GetNode() == pPrev )
- pPam->GetBound(TRUE).nContent.Assign( pTxtNode, 0 );
- if( &pPam->GetBound(FALSE).nNode.GetNode() == pPrev )
- pPam->GetBound(FALSE).nContent.Assign( pTxtNode, 0 );
+ if( &pPam->GetBound(sal_True).nNode.GetNode() == pPrev )
+ pPam->GetBound(sal_True).nContent.Assign( pTxtNode, 0 );
+ if( &pPam->GetBound(sal_False).nNode.GetNode() == pPrev )
+ pPam->GetBound(sal_False).nContent.Assign( pTxtNode, 0 );
pTxtNode->JoinPrev();
}
@@ -885,8 +886,8 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
{
if( bWasUndo )
{
- pDoc->DelAllUndoObj();
- pDoc->DoUndo( TRUE );
+ pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
+ pDoc->GetIDocumentUndoRedo().DoUndo(true);
}
else if( !pInitVSh )
{
@@ -896,7 +897,9 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
// wir muessen das Undo noch anschalten.
ViewShell *pTmpVSh = CheckActionViewShell();
if( pTmpVSh )
- pDoc->DoUndo( TRUE );
+ {
+ pDoc->GetIDocumentUndoRedo().DoUndo(true);
+ }
}
pDoc->SetOle2Link( aOLELink );
@@ -904,8 +907,8 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
pDoc->ResetModified();
if( bSetModEnabled && pDoc->GetDocShell() )
{
- pDoc->GetDocShell()->EnableSetModified( TRUE );
- bSetModEnabled = FALSE; // this is unnecessary here
+ pDoc->GetDocShell()->EnableSetModified( sal_True );
+ bSetModEnabled = sal_False; // this is unnecessary here
}
}
@@ -914,7 +917,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
// offen ist (muss bei Abbruch nicht sein), die Action beenden,
// uns von der Shell abmelden und schliesslich die alte Shell
// wieder rekonstruieren.
- CallEndAction( TRUE );
+ CallEndAction( sal_True );
#if OSL_DEBUG_LEVEL > 1
nContinue--;
@@ -939,15 +942,15 @@ void SwHTMLParser::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
void SwHTMLParser::DocumentDetected()
{
OSL_ENSURE( !bDocInitalized, "DocumentDetected mehrfach aufgerufen" );
- bDocInitalized = TRUE;
+ bDocInitalized = sal_True;
if( IsNewDoc() )
{
if( IsInHeader() )
- FinishHeader( TRUE );
+ FinishHeader( sal_True );
- CallEndAction( TRUE, TRUE );
+ CallEndAction( sal_True, sal_True );
- pDoc->DoUndo( FALSE );
+ pDoc->GetIDocumentUndoRedo().DoUndo(false);
// Durch das DocumentDetected wurde im allgemeinen eine
// ViewShell angelegt. Es kann aber auch sein, dass sie
// erst spaeter angelegt wird, naemlich dann, wenn die UI
@@ -1020,7 +1023,7 @@ void SwHTMLParser::NextToken( int nToken )
pDoc->GetDocShell()->SetTitle( sTitle );
}
}
- bInTitle = FALSE;
+ bInTitle = sal_False;
sTitle.Erase();
break;
@@ -1060,9 +1063,9 @@ void SwHTMLParser::NextToken( int nToken )
if( !bDocInitalized )
DocumentDetected();
- BOOL bGetIDOption = FALSE, bInsertUnknown = FALSE;
- BOOL bUpperSpaceSave = bUpperSpace;
- bUpperSpace = FALSE;
+ sal_Bool bGetIDOption = sal_False, bInsertUnknown = sal_False;
+ sal_Bool bUpperSpaceSave = bUpperSpace;
+ bUpperSpace = sal_False;
// The following special cases may or have to be treated after the
// filter detection
@@ -1074,7 +1077,7 @@ void SwHTMLParser::NextToken( int nToken )
// Applets as well
if( HTML_IFRAME_OFF == nToken )
{
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndFloatingFrame();
}
@@ -1088,8 +1091,8 @@ void SwHTMLParser::NextToken( int nToken )
aContents.ConvertLineEnd();
InsertComment( aContents, OOO_STRING_SVTOOLS_HTML_noembed );
aContents.Erase();
- bCallNextToken = FALSE;
- bInNoEmbed = FALSE;
+ bCallNextToken = sal_False;
+ bInNoEmbed = sal_False;
break;
case HTML_RAWDATA:
@@ -1112,11 +1115,11 @@ void SwHTMLParser::NextToken( int nToken )
switch( nToken )
{
case HTML_APPLET_OFF:
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndApplet();
break;
case HTML_OBJECT_OFF:
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndObject();
break;
@@ -1135,7 +1138,7 @@ void SwHTMLParser::NextToken( int nToken )
switch( nToken )
{
case HTML_TEXTAREA_OFF:
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndTextArea();
break;
@@ -1152,7 +1155,7 @@ void SwHTMLParser::NextToken( int nToken )
switch( nToken )
{
case HTML_SELECT_OFF:
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndSelect();
return;
@@ -1186,7 +1189,7 @@ void SwHTMLParser::NextToken( int nToken )
switch( nToken )
{
case HTML_MARQUEE_OFF:
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndMarquee();
break;
@@ -1202,7 +1205,7 @@ void SwHTMLParser::NextToken( int nToken )
switch( nToken )
{
case HTML_SDFIELD_OFF:
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndField();
break;
@@ -1219,7 +1222,7 @@ void SwHTMLParser::NextToken( int nToken )
{
case HTML_ANCHOR_OFF:
EndAnchor();
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
break;
case HTML_TEXTTOKEN:
@@ -1301,7 +1304,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_BASE:
{
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[ --i ];
switch( pOption->GetToken() )
@@ -1359,7 +1362,7 @@ void SwHTMLParser::NextToken( int nToken )
break;
case HTML_TITLE_ON:
- bInTitle = TRUE;
+ bInTitle = sal_True;
break;
case HTML_SCRIPT_ON:
@@ -1372,7 +1375,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_NOSCRIPT_ON:
case HTML_NOSCRIPT_OFF:
- bInsertUnknown = TRUE;
+ bInsertUnknown = sal_True;
break;
case HTML_STYLE_ON:
@@ -1425,7 +1428,7 @@ void SwHTMLParser::NextToken( int nToken )
break;
}
else
- bGetIDOption = TRUE;
+ bGetIDOption = sal_True;
// <BR>s in <PRE> resemble true LFs, hence no break
case HTML_NEWPARA:
@@ -1458,7 +1461,7 @@ void SwHTMLParser::NextToken( int nToken )
if( !pTable && !pDoc->IsInHeaderFooter( pPam->GetPoint()->nNode ) )
{
NewAttr( &aAttrTab.pBreak, SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) );
- EndAttr( aAttrTab.pBreak, 0, FALSE );
+ EndAttr( aAttrTab.pBreak, 0, sal_False );
}
break;
@@ -1470,8 +1473,7 @@ void SwHTMLParser::NextToken( int nToken )
if( nPos )
{
const String& rText =
- pDoc->GetNodes()[ pPam->GetPoint()->nNode ]->GetTxtNode()
- ->GetTxt();
+ pPam->GetPoint()->nNode.GetNode().GetTxtNode()->GetTxt();
sal_Unicode cLast = rText.GetChar(--nPos);
if( ' ' == cLast || '\x0a' == cLast)
aToken.Erase(0,1);
@@ -1525,7 +1527,7 @@ void SwHTMLParser::NextToken( int nToken )
break;
case HTML_NOEMBED_ON:
- bInNoEmbed = TRUE;
+ bInNoEmbed = sal_True;
bCallNextToken = pTable!=0;
ReadRawData( OOO_STRING_SVTOOLS_HTML_noembed );
break;
@@ -1538,7 +1540,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_DEFLIST_OFF:
if( nOpenParaToken )
EndPara();
- EndDefListItem( 0, FALSE, 1==nDefListDeep );
+ EndDefListItem( 0, sal_False, 1==nDefListDeep );
EndDefList();
break;
@@ -1546,7 +1548,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_DT_ON:
if( nOpenParaToken )
EndPara();
- EndDefListItem( 0, FALSE );// close <DD>/<DT> and set no template
+ EndDefListItem( 0, sal_False );// close <DD>/<DT> and set no template
NewDefListItem( nToken );
break;
@@ -1555,7 +1557,7 @@ void SwHTMLParser::NextToken( int nToken )
// c.f. HTML_LI_OFF
// Actually we should close a DD/DT now.
// But neither Netscape nor Microsoft do this and so don't we.
- EndDefListItem( nToken, FALSE );
+ EndDefListItem( nToken, sal_False );
break;
// divisions
@@ -1610,12 +1612,12 @@ void SwHTMLParser::NextToken( int nToken )
// templates
case HTML_PARABREAK_ON:
if( nOpenParaToken )
- EndPara( TRUE );
+ EndPara( sal_True );
NewPara();
break;
case HTML_PARABREAK_OFF:
- EndPara( TRUE );
+ EndPara( sal_True );
break;
case HTML_ADDRESS_ON:
@@ -1653,7 +1655,7 @@ void SwHTMLParser::NextToken( int nToken )
break;
case HTML_PREFORMTXT_OFF:
- bNoParSpace = TRUE; // the last PRE-paragraph gets a spacing
+ bNoParSpace = sal_True; // the last PRE-paragraph gets a spacing
EndTxtFmtColl( HTML_PREFORMTXT_OFF );
break;
@@ -1730,7 +1732,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_UNORDERLIST_OFF:
if( nOpenParaToken )
EndPara();
- EndNumBulListItem( 0, TRUE, GetNumInfo().GetDepth()==1 );
+ EndNumBulListItem( 0, sal_True, GetNumInfo().GetDepth()==1 );
EndNumBulList( nToken );
break;
@@ -1744,13 +1746,13 @@ void SwHTMLParser::NextToken( int nToken )
EndPara();
}
- EndNumBulListItem( 0, FALSE );// close <LI>/<LH> and don't set a template
+ EndNumBulListItem( 0, sal_False );// close <LI>/<LH> and don't set a template
NewNumBulListItem( nToken );
break;
case HTML_LI_OFF:
case HTML_LISTHEADER_OFF:
- EndNumBulListItem( nToken, FALSE );
+ EndNumBulListItem( nToken, sal_False );
break;
// Attribute :
@@ -1811,7 +1813,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_BLINK_ON:
{
NewStdAttr( HTML_BLINK_ON, &aAttrTab.pBlink,
- SvxBlinkItem( TRUE, RES_CHRATR_BLINK ) );
+ SvxBlinkItem( sal_True, RES_CHRATR_BLINK ) );
}
break;
@@ -1916,7 +1918,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_HTML_ON:
{
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[ --i ];
if( HTML_O_DIR == pOption->GetToken() )
@@ -2017,7 +2019,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_NOFRAMES_ON:
if( IsInHeader() )
- FinishHeader( TRUE );
+ FinishHeader( sal_True );
bInsertUnknown = bKeepUnknown;
break;
@@ -2061,7 +2063,7 @@ void SwHTMLParser::NextToken( int nToken )
}
-extern BOOL lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 );
+extern sal_Bool lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 );
void lcl_swhtml_getItemInfo( const _HTMLAttr& rAttr,
sal_Bool& rScriptDependent, sal_Bool& rFont,
@@ -2104,7 +2106,7 @@ void lcl_swhtml_getItemInfo( const _HTMLAttr& rAttr,
}
}
-BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
+sal_Bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, sal_Bool bUpdateNum )
{
// Ein harter Zeilen-Umbruch am Ende muss immer entfernt werden.
// Einen zweiten ersetzen wir durch einen Absatz-Abstand.
@@ -2119,12 +2121,12 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
if( AM_SPACE==eMode || AM_NOSPACE==eMode )
{
SwTxtNode *pTxtNode =
- pDoc->GetNodes()[pPam->GetPoint()->nNode]->GetTxtNode();
+ pPam->GetPoint()->nNode.GetNode().GetTxtNode();
const SvxULSpaceItem& rULSpace =
(const SvxULSpaceItem&)pTxtNode->SwCntntNode::GetAttr( RES_UL_SPACE );
- BOOL bChange = AM_NOSPACE==eMode ? rULSpace.GetLower() > 0
+ sal_Bool bChange = AM_NOSPACE==eMode ? rULSpace.GetLower() > 0
: rULSpace.GetLower() == 0;
if( bChange )
@@ -2132,7 +2134,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
const SvxULSpaceItem& rCollULSpace =
pTxtNode->GetAnyFmtColl().GetULSpace();
- BOOL bMayReset = AM_NOSPACE==eMode ? rCollULSpace.GetLower() == 0
+ sal_Bool bMayReset = AM_NOSPACE==eMode ? rCollULSpace.GetLower() == 0
: rCollULSpace.GetLower() > 0;
if( bMayReset &&
@@ -2152,7 +2154,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
SwPosition aOldPos( *pPam->GetPoint() );
- BOOL bRet = pDoc->AppendTxtNode( *pPam->GetPoint() );
+ sal_Bool bRet = pDoc->AppendTxtNode( *pPam->GetPoint() );
// Zeichen-Attribute aufspalten und ggf keine setzen, die ueber den
// ganzen Absatz gesetzt sind
@@ -2161,13 +2163,13 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
const SwPosition& rPos = *pPam->GetPoint();
_HTMLAttr** pTbl = (_HTMLAttr**)&aAttrTab;
- for( USHORT nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
+ for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
nCnt--; ++pTbl )
{
_HTMLAttr *pAttr = *pTbl;
if( pAttr && pAttr->GetItem().Which() < RES_PARATR_BEGIN )
{
- BOOL bWholePara = FALSE;
+ sal_Bool bWholePara = sal_False;
while( pAttr )
{
@@ -2211,7 +2213,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
pSetAttr->ClearPrev();
if( !pNext || bWholePara )
{
- USHORT nTmp = pSetAttr->bInsAtStart ? 0
+ sal_uInt16 nTmp = pSetAttr->bInsAtStart ? 0
: aSetAttrTab.Count();
aSetAttrTab.Insert( pSetAttr, nTmp );
}
@@ -2241,7 +2243,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
// wenn Felder ins Rennen kommen
if( !pNext || bWholePara )
{
- USHORT nTmp = pSetAttr->bInsAtStart ? 0
+ sal_uInt16 nTmp = pSetAttr->bInsAtStart ? 0
: aSetAttrTab.Count();
aSetAttrTab.Insert( pSetAttr, nTmp );
}
@@ -2256,7 +2258,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
// Die Previous-Attribute muessen trotzdem gesetzt werden.
if( !pNext || bWholePara )
{
- USHORT nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pPrev, nTmp );
}
else
@@ -2276,7 +2278,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
{
if( GetNumInfo().GetDepth() )
{
- BYTE nLvl = GetNumInfo().GetLevel();
+ sal_uInt8 nLvl = GetNumInfo().GetLevel();
SetNodeNum( nLvl, false );
}
else
@@ -2312,7 +2314,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
if( RES_CHRATR_CJK_FONT <= nWhich &&
nWhich <= RES_CHRATR_CTL_WEIGHT )
{
- nIdx = static_cast< USHORT >(nWhich - RES_CHRATR_CJK_FONT + 5);
+ nIdx = static_cast< sal_uInt16 >(nWhich - RES_CHRATR_CJK_FONT + 5);
}
else switch( nWhich )
{
@@ -2375,9 +2377,9 @@ void SwHTMLParser::AddParSpace()
if( !bNoParSpace )
return;
- bNoParSpace = FALSE;
+ bNoParSpace = sal_False;
- ULONG nNdIdx = pPam->GetPoint()->nNode.GetIndex() - 1;
+ sal_uLong nNdIdx = pPam->GetPoint()->nNode.GetIndex() - 1;
SwTxtNode *pTxtNode = pDoc->GetNodes()[nNdIdx]->GetTxtNode();
if( !pTxtNode )
@@ -2430,8 +2432,10 @@ void SwHTMLParser::Show()
// ist der aktuelle Node nicht mehr sichtbar, dann benutzen wir
// eine groessere Schrittweite
if( pVSh )
- nParaCnt = pDoc->GetNodes()[pPam->GetPoint()->nNode]
- ->IsInVisibleArea(pVSh) ? 5 : 50;
+ {
+ nParaCnt = (pPam->GetPoint()->nNode.GetNode().IsInVisibleArea(pVSh))
+ ? 5 : 50;
+ }
}
void SwHTMLParser::ShowStatline()
@@ -2461,13 +2465,13 @@ void SwHTMLParser::ShowStatline()
ViewShell *pVSh = CheckActionViewShell();
if( pVSh && pVSh->HasInvalidRect() )
{
- CallEndAction( FALSE, FALSE );
- CallStartAction( pVSh, FALSE );
+ CallEndAction( sal_False, sal_False );
+ CallStartAction( pVSh, sal_False );
}
}
}
-ViewShell *SwHTMLParser::CallStartAction( ViewShell *pVSh, BOOL bChkPtr )
+ViewShell *SwHTMLParser::CallStartAction( ViewShell *pVSh, sal_Bool bChkPtr )
{
OSL_ENSURE( !pActionViewShell, "CallStartAction: ViewShell schon gesetzt" );
@@ -2496,7 +2500,7 @@ ViewShell *SwHTMLParser::CallStartAction( ViewShell *pVSh, BOOL bChkPtr )
return pActionViewShell;
}
-ViewShell *SwHTMLParser::CallEndAction( BOOL bChkAction, BOOL bChkPtr )
+ViewShell *SwHTMLParser::CallEndAction( sal_Bool bChkAction, sal_Bool bChkPtr )
{
if( bChkPtr )
{
@@ -2521,19 +2525,19 @@ ViewShell *SwHTMLParser::CallEndAction( BOOL bChkAction, BOOL bChkPtr )
ViewShell *pSh = pActionViewShell;
do {
if( pSh->IsA( TYPE( SwCrsrShell ) ) )
- ((SwCrsrShell*)pSh)->SttEndDoc(TRUE);
+ ((SwCrsrShell*)pSh)->SttEndDoc(sal_True);
pSh = (ViewShell *)pSh->GetNext();
} while( pSh != pActionViewShell );
- bSetCrsr = FALSE;
+ bSetCrsr = sal_False;
}
if( pActionViewShell->ISA( SwEditShell ) )
{
//Schon gescrollt?, dann dafuer sorgen, dass die View sich nicht bewegt!
- const BOOL bOldLock = pActionViewShell->IsViewLocked();
- pActionViewShell->LockView( TRUE );
- const BOOL bOldEndActionByVirDev = pActionViewShell->IsEndActionByVirDev();
- pActionViewShell->SetEndActionByVirDev( TRUE );;
+ const sal_Bool bOldLock = pActionViewShell->IsViewLocked();
+ pActionViewShell->LockView( sal_True );
+ const sal_Bool bOldEndActionByVirDev = pActionViewShell->IsEndActionByVirDev();
+ pActionViewShell->SetEndActionByVirDev( sal_True );;
((SwEditShell*)pActionViewShell)->EndAction();
pActionViewShell->SetEndActionByVirDev( bOldEndActionByVirDev );
pActionViewShell->LockView( bOldLock );
@@ -2545,7 +2549,7 @@ ViewShell *SwHTMLParser::CallEndAction( BOOL bChkAction, BOOL bChkPtr )
if( GetMedium() && aVisSttPos == pActionViewShell->VisArea().Pos() )
::JumpToSwMark( pActionViewShell,
GetMedium()->GetURLObject().GetMark() );
- bChkJumpMark = FALSE;
+ bChkJumpMark = sal_False;
}
}
else
@@ -2582,7 +2586,7 @@ ViewShell *SwHTMLParser::CheckActionViewShell()
/* */
-void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
+void SwHTMLParser::_SetAttr( sal_Bool bChkEnd, sal_Bool bBeforeTable,
_HTMLAttrs *pPostIts )
{
SwPaM* pAttrPam = new SwPaM( *pPam->GetPoint() );
@@ -2590,17 +2594,17 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
xub_StrLen nEndCnt = pPam->GetPoint()->nContent.GetIndex();
_HTMLAttr* pAttr;
SwCntntNode* pCNd;
- USHORT n;
+ sal_uInt16 n;
_HTMLAttrs aFields( 5, 5 );
for( n = aSetAttrTab.Count(); n; )
{
pAttr = aSetAttrTab[ --n ];
- USHORT nWhich = pAttr->pItem->Which();
+ sal_uInt16 nWhich = pAttr->pItem->Which();
- ULONG nEndParaIdx = pAttr->GetEndParaIdx();
- BOOL bSetAttr;
+ sal_uLong nEndParaIdx = pAttr->GetEndParaIdx();
+ sal_Bool bSetAttr;
if( bChkEnd )
{
// Zechen-Attribute mit Ende moeglich frueh,
@@ -2626,7 +2630,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
// Attribiute im Content-Bereich duerfen nicht gesetzt
// werden, wenn wir in einem Sonderbereich stehen, aber
// umgekekehrt schon.
- ULONG nEndOfIcons = pDoc->GetNodes().GetEndOfExtras().GetIndex();
+ sal_uLong nEndOfIcons = pDoc->GetNodes().GetEndOfExtras().GetIndex();
bSetAttr = nEndParaIdx < rEndIdx.GetIndex() ||
rEndIdx.GetIndex() > nEndOfIcons ||
nEndParaIdx <= nEndOfIcons;
@@ -2636,7 +2640,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
{
// Das Attribute darf nicht in der liste der vorlaeufigen
// Absatz-Attribute stehen, weil es sonst geloescht wurde.
- USHORT ii = aParaAttrs.Count();
+ sal_uInt16 ii = aParaAttrs.Count();
while( ii-- )
{
OSL_ENSURE( pAttr != aParaAttrs[ii],
@@ -2660,7 +2664,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
}
- pCNd = pDoc->GetNodes()[ pAttr->nSttPara ]->GetCntntNode();
+ pCNd = pAttr->nSttPara.GetNode().GetCntntNode();
if( !pCNd )
{
// durch die elende Loescherei von Nodes kann auch mal
@@ -2700,7 +2704,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
if ( (pAttr->GetSttPara() != pAttr->GetEndPara()) &&
!isTXTATR_NOEND(nWhich) )
{
- pCNd = pDoc->GetNodes()[ pAttr->nEndPara ]->GetCntntNode();
+ pCNd = pAttr->nEndPara.GetNode().GetCntntNode();
if( !pCNd )
{
pCNd = pDoc->GetNodes().GoPrevious( &(pAttr->nEndPara) );
@@ -2776,14 +2780,14 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
// jump to bookmark
if( JUMPTO_MARK == eJumpTo && pNewMark->GetName() == ::rtl::OUString(sJmpMark) )
{
- bChkJumpMark = TRUE;
+ bChkJumpMark = sal_True;
eJumpTo = JUMPTO_NONE;
}
}
break;
case RES_TXTATR_FIELD:
{
- USHORT nFldWhich =
+ sal_uInt16 nFldWhich =
pPostIts ? ((const SwFmtFld *)pAttr->pItem)
->GetFld()->GetTyp()->Which() : 0;
if( pPostIts && (RES_POSTITFLD == nFldWhich ||
@@ -2820,7 +2824,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
JUMPTO_MARK == eJumpTo &&
sJmpMark == ((SwFmtINetFmt*)pAttr->pItem)->GetName() )
{
- bChkJumpMark = TRUE;
+ bChkJumpMark = sal_True;
eJumpTo = JUMPTO_NONE;
}
@@ -2842,8 +2846,8 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
OSL_ENSURE( FLY_AT_PARA == rAnchor.GetAnchorId(),
"Nur Auto-Rahmen brauchen eine Spezialbehandlung" );
const SwPosition *pFlyPos = rAnchor.GetCntntAnchor();
- ULONG nFlyParaIdx = pFlyPos->nNode.GetIndex();
- BOOL bMoveFly;
+ sal_uLong nFlyParaIdx = pFlyPos->nNode.GetIndex();
+ sal_Bool bMoveFly;
if( bChkEnd )
{
bMoveFly = nFlyParaIdx < rEndIdx.GetIndex() ||
@@ -2852,7 +2856,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
}
else
{
- ULONG nEndOfIcons = pDoc->GetNodes().GetEndOfExtras().GetIndex();
+ sal_uLong nEndOfIcons = pDoc->GetNodes().GetEndOfExtras().GetIndex();
bMoveFly = nFlyParaIdx < rEndIdx.GetIndex() ||
rEndIdx.GetIndex() > nEndOfIcons ||
nFlyParaIdx <= nEndOfIcons;
@@ -2885,14 +2889,14 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
pFrmFmt->MakeFrms();
aMoveFlyFrms.Remove( n, 1 );
- aMoveFlyCnts.Remove( n, 1 );
+ aMoveFlyCnts.erase( aMoveFlyCnts.begin() + n );
}
}
while( aFields.Count() )
{
pAttr = aFields[0];
- pCNd = pDoc->GetNodes()[ pAttr->nSttPara ]->GetCntntNode();
+ pCNd = pAttr->nSttPara.GetNode().GetCntntNode();
pAttrPam->GetPoint()->nNode = pAttr->nSttPara;
pAttrPam->GetPoint()->nContent.Assign( pCNd, pAttr->nSttCntnt );
@@ -2935,7 +2939,7 @@ void SwHTMLParser::NewAttr( _HTMLAttr **ppAttr, const SfxPoolItem& rItem )
void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
- BOOL bChkEmpty )
+ sal_Bool bChkEmpty )
{
OSL_ENSURE( !ppDepAttr, "SwHTMLParser::EndAttr: ppDepAttr-Feature ungetestet?" );
// Der Listenkopf ist im Attribut gespeichert
@@ -2964,8 +2968,8 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
OSL_ENSURE( pLast, "Attribut nicht in eigener Liste gefunden!" );
}
- BOOL bMoveBack = FALSE;
- USHORT nWhich = pAttr->pItem->Which();
+ sal_Bool bMoveBack = sal_False;
+ sal_uInt16 nWhich = pAttr->pItem->Which();
if( !nEndCnt && RES_PARATR_BEGIN <= nWhich &&
*pEndIdx != pAttr->GetSttPara() )
{
@@ -3019,7 +3023,7 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
pNext->InsertPrev( pSetAttr );
else
{
- USHORT nTmp = pSetAttr->bInsAtStart ? 0
+ sal_uInt16 nTmp = pSetAttr->bInsAtStart ? 0
: aSetAttrTab.Count();
aSetAttrTab.Insert( pSetAttr, nTmp );
}
@@ -3049,7 +3053,7 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
(*ppDepAttr)->InsertPrev( pAttr );
else
{
- USHORT nTmp = pAttr->bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = pAttr->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pAttr, nTmp );
}
}
@@ -3078,7 +3082,7 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
pNext->InsertPrev( pPrev );
else
{
- USHORT nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pPrev, nTmp );
}
}
@@ -3139,7 +3143,7 @@ void SwHTMLParser::DeleteAttr( _HTMLAttr* pAttr )
pNext->InsertPrev( pPrev );
else
{
- USHORT nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pPrev, nTmp );
}
}
@@ -3164,7 +3168,7 @@ void SwHTMLParser::SaveAttrTab( _HTMLAttrTable& rNewAttrTab )
_HTMLAttr** pTbl = (_HTMLAttr**)&aAttrTab;
_HTMLAttr** pSaveTbl = (_HTMLAttr**)&rNewAttrTab;
- for( USHORT nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
+ for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
nCnt--; (++pTbl, ++pSaveTbl) )
{
*pSaveTbl = *pTbl;
@@ -3181,7 +3185,7 @@ void SwHTMLParser::SaveAttrTab( _HTMLAttrTable& rNewAttrTab )
}
void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
- BOOL bMoveEndBack )
+ sal_Bool bMoveEndBack )
{
// Hier darf es keine vorlauefigen Absatz-Attribute geben, den die
// koennten jetzt gesetzt werden und dann sind die Zeiger ungueltig!!!
@@ -3197,14 +3201,14 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
// neu aufspannen
_HTMLAttr** pTbl = (_HTMLAttr**)&aAttrTab;
_HTMLAttr** pSaveTbl = (_HTMLAttr**)&rNewAttrTab;
- BOOL bSetAttr = TRUE;
+ sal_Bool bSetAttr = sal_True;
xub_StrLen nSttCnt = pPam->GetPoint()->nContent.GetIndex();
xub_StrLen nEndCnt = nSttCnt;
if( bMoveEndBack )
{
- ULONG nOldEnd = nEndIdx.GetIndex();
- ULONG nTmpIdx;
+ sal_uLong nOldEnd = nEndIdx.GetIndex();
+ sal_uLong nTmpIdx;
if( ( nTmpIdx = pDoc->GetNodes().GetEndOfExtras().GetIndex()) >= nOldEnd ||
( nTmpIdx = pDoc->GetNodes().GetEndOfAutotext().GetIndex()) >= nOldEnd )
{
@@ -3218,7 +3222,7 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
nEndCnt = (bSetAttr ? pCNd->Len() : 0);
}
- for( USHORT nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
+ for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
nCnt--; (++pTbl, ++pSaveTbl) )
{
_HTMLAttr *pAttr = *pTbl;
@@ -3244,7 +3248,7 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
pNext->InsertPrev( pSetAttr );
else
{
- USHORT nTmp = pSetAttr->bInsAtStart ? 0
+ sal_uInt16 nTmp = pSetAttr->bInsAtStart ? 0
: aSetAttrTab.Count();
aSetAttrTab.Insert( pSetAttr, nTmp );
}
@@ -3258,7 +3262,7 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
pNext->InsertPrev( pPrev );
else
{
- USHORT nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pPrev, nTmp );
}
}
@@ -3285,7 +3289,7 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
}
void SwHTMLParser::RestoreAttrTab( const _HTMLAttrTable& rNewAttrTab,
- BOOL bSetNewStart )
+ sal_Bool bSetNewStart )
{
// Hier darf es keine vorlauefigen Absatz-Attribute geben, den die
// koennten jetzt gesetzt werden und dann sind die Zeiger ungueltig!!!
@@ -3297,7 +3301,7 @@ void SwHTMLParser::RestoreAttrTab( const _HTMLAttrTable& rNewAttrTab,
_HTMLAttr** pTbl = (_HTMLAttr**)&aAttrTab;
_HTMLAttr** pSaveTbl = (_HTMLAttr**)&rNewAttrTab;
- for( USHORT nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
+ for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
nCnt--; (++pTbl, ++pSaveTbl) )
{
OSL_ENSURE( !*pTbl, "Die Attribut-Tabelle ist nicht leer!" );
@@ -3328,14 +3332,14 @@ void SwHTMLParser::RestoreAttrTab( const _HTMLAttrTable& rNewAttrTab,
}
}
-void SwHTMLParser::InsertAttr( const SfxPoolItem& rItem, BOOL bLikePara,
- BOOL bInsAtStart )
+void SwHTMLParser::InsertAttr( const SfxPoolItem& rItem, sal_Bool bLikePara,
+ sal_Bool bInsAtStart )
{
_HTMLAttr* pTmp = new _HTMLAttr( *pPam->GetPoint(),
rItem );
if( bLikePara )
pTmp->SetLikePara();
- USHORT nTmp = bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pTmp, nTmp );
}
@@ -3357,7 +3361,7 @@ void SwHTMLParser::NewStdAttr( int nToken )
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -3394,7 +3398,7 @@ void SwHTMLParser::NewStdAttr( int nToken )
if( HTML_SPAN_ON != nToken || !aClass.Len() ||
!CreateContainer( aClass, aItemSet, aPropInfo, pCntxt ) )
DoPositioning( aItemSet, aPropInfo, pCntxt );
- InsertAttrs( aItemSet, aPropInfo, pCntxt, TRUE );
+ InsertAttrs( aItemSet, aPropInfo, pCntxt, sal_True );
}
}
@@ -3410,7 +3414,7 @@ void SwHTMLParser::NewStdAttr( int nToken,
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -3451,7 +3455,7 @@ void SwHTMLParser::NewStdAttr( int nToken,
if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo, &aLang, &aDir ) )
DoPositioning( aItemSet, aPropInfo, pCntxt );
- InsertAttrs( aItemSet, aPropInfo, pCntxt, TRUE );
+ InsertAttrs( aItemSet, aPropInfo, pCntxt, sal_True );
}
else
{
@@ -3488,16 +3492,16 @@ void SwHTMLParser::EndTag( int nToken )
void SwHTMLParser::NewBasefontAttr()
{
String aId, aStyle, aClass, aLang, aDir;
- USHORT nSize = 3;
+ sal_uInt16 nSize = 3;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
{
case HTML_O_SIZE:
- nSize = (USHORT)pOption->GetNumber();
+ nSize = (sal_uInt16)pOption->GetNumber();
break;
case HTML_O_ID:
aId = pOption->GetString();
@@ -3542,7 +3546,7 @@ void SwHTMLParser::NewBasefontAttr()
if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo, &aLang, &aDir ) )
DoPositioning( aItemSet, aPropInfo, pCntxt );
- InsertAttrs( aItemSet, aPropInfo, pCntxt, TRUE );
+ InsertAttrs( aItemSet, aPropInfo, pCntxt, sal_True );
}
else
{
@@ -3572,23 +3576,23 @@ void SwHTMLParser::EndBasefontAttr()
void SwHTMLParser::NewFontAttr( int nToken )
{
- USHORT nBaseSize =
+ sal_uInt16 nBaseSize =
( aBaseFontStack.Count() > nBaseFontStMin
? (aBaseFontStack[aBaseFontStack.Count()-1] & FONTSIZE_MASK)
: 3 );
- USHORT nFontSize =
+ sal_uInt16 nFontSize =
( aFontStack.Count() > nFontStMin
? (aFontStack[aFontStack.Count()-1] & FONTSIZE_MASK)
: nBaseSize );
String aFace, aId, aStyle, aClass, aLang, aDir;
Color aColor;
- ULONG nFontHeight = 0; // tatsaechlich einzustellende Font-Hoehe
- USHORT nSize = 0; // Fontgroesse in Netscape-Notation (1-7)
- BOOL bColor = FALSE;
+ sal_uLong nFontHeight = 0; // tatsaechlich einzustellende Font-Hoehe
+ sal_uInt16 nSize = 0; // Fontgroesse in Netscape-Notation (1-7)
+ sal_Bool bColor = sal_False;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -3596,19 +3600,19 @@ void SwHTMLParser::NewFontAttr( int nToken )
case HTML_O_SIZE:
if( HTML_FONT_ON==nToken && pOption->GetString().Len() )
{
- INT32 nSSize;
+ sal_Int32 nSSize;
if( '+' == pOption->GetString().GetChar(0) ||
'-' == pOption->GetString().GetChar(0) )
nSSize = nBaseSize + pOption->GetSNumber();
else
- nSSize = (INT32)pOption->GetNumber();
+ nSSize = (sal_Int32)pOption->GetNumber();
if( nSSize < 1 )
nSSize = 1;
else if( nSSize > 7 )
nSSize = 7;
- nSize = (USHORT)nSSize;
+ nSize = (sal_uInt16)nSSize;
nFontHeight = aFontHeights[nSize-1];
}
break;
@@ -3616,7 +3620,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
if( HTML_FONT_ON==nToken )
{
pOption->GetColor( aColor );
- bColor = TRUE;
+ bColor = sal_True;
}
break;
case HTML_O_FACE:
@@ -3647,14 +3651,14 @@ void SwHTMLParser::NewFontAttr( int nToken )
// in Ueberschriften bestimmt die aktuelle Ueberschrift
// die Font-Hoehe und nicht BASEFONT
- USHORT nPoolId = GetCurrFmtColl()->GetPoolFmtId();
+ sal_uInt16 nPoolId = GetCurrFmtColl()->GetPoolFmtId();
if( (nPoolId>=RES_POOLCOLL_HEADLINE1 &&
nPoolId<=RES_POOLCOLL_HEADLINE6) )
{
// wenn die Schriftgroesse in der Ueberschrift noch
// nicht veraendert ist, die aus der Vorlage nehmen
if( nFontStHeadStart==aFontStack.Count() )
- nFontSize = static_cast< USHORT >(6 - (nPoolId - RES_POOLCOLL_HEADLINE1));
+ nFontSize = static_cast< sal_uInt16 >(6 - (nPoolId - RES_POOLCOLL_HEADLINE1));
}
else
nPoolId = 0;
@@ -3693,7 +3697,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
pFList = pFListItem->GetFontList();
}
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
xub_StrLen nStrPos = 0;
while( nStrPos!=STRING_NOTFOUND )
{
@@ -3709,7 +3713,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
const FontInfo& rFInfo = pFList->GetFontInfo( hFont );
if( RTL_TEXTENCODING_DONTKNOW != rFInfo.GetCharSet() )
{
- bFound = TRUE;
+ bFound = sal_True;
if( RTL_TEXTENCODING_SYMBOL == rFInfo.GetCharSet() )
eEnc = RTL_TEXTENCODING_SYMBOL;
}
@@ -3757,7 +3761,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo, &aLang, &aDir ) )
DoPositioning( aItemSet, aPropInfo, pCntxt );
- InsertAttrs( aItemSet, aPropInfo, pCntxt, TRUE );
+ InsertAttrs( aItemSet, aPropInfo, pCntxt, sal_True );
}
else
{
@@ -3811,7 +3815,7 @@ void SwHTMLParser::NewPara()
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -3875,7 +3879,7 @@ void SwHTMLParser::NewPara()
nOpenParaToken = HTML_PARABREAK_ON;
}
-void SwHTMLParser::EndPara( BOOL bReal )
+void SwHTMLParser::EndPara( sal_Bool bReal )
{
if( HTML_LI_ON==nOpenParaToken && pTable )
{
@@ -3931,7 +3935,7 @@ void SwHTMLParser::NewHeading( int nToken )
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -3964,7 +3968,7 @@ void SwHTMLParser::NewHeading( int nToken )
AddParSpace();
// die passende Vorlage suchen
- USHORT nTxtColl;
+ sal_uInt16 nTxtColl;
switch( nToken )
{
case HTML_HEAD1_ON: nTxtColl = RES_POOLCOLL_HEADLINE1; break;
@@ -4019,7 +4023,7 @@ void SwHTMLParser::EndHeading()
// Kontext zu dem Token suchen und vom Stack holen
_HTMLAttrContext *pCntxt = 0;
- USHORT nPos = aContexts.Count();
+ sal_uInt16 nPos = aContexts.Count();
while( !pCntxt && nPos>nContextStMin )
{
switch( aContexts[--nPos]->GetToken() )
@@ -4052,12 +4056,12 @@ void SwHTMLParser::EndHeading()
/* */
-void SwHTMLParser::NewTxtFmtColl( int nToken, USHORT nColl )
+void SwHTMLParser::NewTxtFmtColl( int nToken, sal_uInt16 nColl )
{
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -4186,7 +4190,7 @@ void SwHTMLParser::NewDefList()
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -4210,7 +4214,7 @@ void SwHTMLParser::NewDefList()
}
// einen neuen Absatz aufmachen
- BOOL bSpace = (GetNumInfo().GetDepth() + nDefListDeep) == 0;
+ sal_Bool bSpace = (GetNumInfo().GetDepth() + nDefListDeep) == 0;
if( pPam->GetPoint()->nContent.GetIndex() )
AppendTxtNode( bSpace ? AM_SPACE : AM_SOFTNOSPACE );
else if( bSpace )
@@ -4220,11 +4224,11 @@ void SwHTMLParser::NewDefList()
nDefListDeep++;
- BOOL bInDD = FALSE, bNotInDD = FALSE;
- USHORT nPos = aContexts.Count();
+ sal_Bool bInDD = sal_False, bNotInDD = sal_False;
+ sal_uInt16 nPos = aContexts.Count();
while( !bInDD && !bNotInDD && nPos>nContextStMin )
{
- USHORT nCntxtToken = aContexts[--nPos]->GetToken();
+ sal_uInt16 nCntxtToken = aContexts[--nPos]->GetToken();
switch( nCntxtToken )
{
case HTML_DEFLIST_ON:
@@ -4232,10 +4236,10 @@ void SwHTMLParser::NewDefList()
case HTML_MENULIST_ON:
case HTML_ORDERLIST_ON:
case HTML_UNORDERLIST_ON:
- bNotInDD = TRUE;
+ bNotInDD = sal_True;
break;
case HTML_DD_ON:
- bInDD = TRUE;
+ bInDD = sal_True;
break;
}
}
@@ -4287,7 +4291,7 @@ void SwHTMLParser::NewDefList()
void SwHTMLParser::EndDefList()
{
- BOOL bSpace = (GetNumInfo().GetDepth() + nDefListDeep) == 1;
+ sal_Bool bSpace = (GetNumInfo().GetDepth() + nDefListDeep) == 1;
if( pPam->GetPoint()->nContent.GetIndex() )
AppendTxtNode( bSpace ? AM_SPACE : AM_SOFTNOSPACE );
else if( bSpace )
@@ -4315,21 +4319,21 @@ void SwHTMLParser::EndDefList()
void SwHTMLParser::NewDefListItem( int nToken )
{
// festellen, ob das DD/DT in einer DL vorkommt
- BOOL bInDefList = FALSE, bNotInDefList = FALSE;
- USHORT nPos = aContexts.Count();
+ sal_Bool bInDefList = sal_False, bNotInDefList = sal_False;
+ sal_uInt16 nPos = aContexts.Count();
while( !bInDefList && !bNotInDefList && nPos>nContextStMin )
{
- USHORT nCntxtToken = aContexts[--nPos]->GetToken();
+ sal_uInt16 nCntxtToken = aContexts[--nPos]->GetToken();
switch( nCntxtToken )
{
case HTML_DEFLIST_ON:
- bInDefList = TRUE;
+ bInDefList = sal_True;
break;
case HTML_DIRLIST_ON:
case HTML_MENULIST_ON:
case HTML_ORDERLIST_ON:
case HTML_UNORDERLIST_ON:
- bNotInDefList = TRUE;
+ bNotInDefList = sal_True;
break;
}
}
@@ -4343,12 +4347,12 @@ void SwHTMLParser::NewDefListItem( int nToken )
nOpenParaToken = static_cast< sal_uInt16 >(nToken);
}
- NewTxtFmtColl( nToken, static_cast< USHORT >(nToken==HTML_DD_ON ? RES_POOLCOLL_HTML_DD
+ NewTxtFmtColl( nToken, static_cast< sal_uInt16 >(nToken==HTML_DD_ON ? RES_POOLCOLL_HTML_DD
: RES_POOLCOLL_HTML_DT) );
}
-void SwHTMLParser::EndDefListItem( int nToken, BOOL bSetColl,
- BOOL /*bLastPara*/ )
+void SwHTMLParser::EndDefListItem( int nToken, sal_Bool bSetColl,
+ sal_Bool /*bLastPara*/ )
{
// einen neuen Absatz aufmachen
if( !nToken && pPam->GetPoint()->nContent.GetIndex() )
@@ -4357,10 +4361,10 @@ void SwHTMLParser::EndDefListItem( int nToken, BOOL bSetColl,
// Kontext zu dem Token suchen und vom Stack holen
nToken &= ~1;
_HTMLAttrContext *pCntxt = 0;
- USHORT nPos = aContexts.Count();
+ sal_uInt16 nPos = aContexts.Count();
while( !pCntxt && nPos>nContextStMin )
{
- USHORT nCntxtToken = aContexts[--nPos]->GetToken();
+ sal_uInt16 nCntxtToken = aContexts[--nPos]->GetToken();
switch( nCntxtToken )
{
case HTML_DD_ON:
@@ -4398,8 +4402,8 @@ void SwHTMLParser::EndDefListItem( int nToken, BOOL bSetColl,
/* */
-BOOL SwHTMLParser::HasCurrentParaFlys( BOOL bNoSurroundOnly,
- BOOL bSurroundOnly ) const
+sal_Bool SwHTMLParser::HasCurrentParaFlys( sal_Bool bNoSurroundOnly,
+ sal_Bool bSurroundOnly ) const
{
// bNoSurroundOnly: Der Absatz enthaelt mindestens einen Rahmen
// ohne Umlauf
@@ -4410,8 +4414,8 @@ BOOL SwHTMLParser::HasCurrentParaFlys( BOOL bNoSurroundOnly,
const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts();
- BOOL bFound = FALSE;
- for ( USHORT i=0; i<rFrmFmtTbl.Count(); i++ )
+ sal_Bool bFound = sal_False;
+ for ( sal_uInt16 i=0; i<rFrmFmtTbl.Count(); i++ )
{
SwFrmFmt *const pFmt = rFrmFmtTbl[i];
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -4429,7 +4433,7 @@ BOOL SwHTMLParser::HasCurrentParaFlys( BOOL bNoSurroundOnly,
{
if( !(bNoSurroundOnly || bSurroundOnly) )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
else
@@ -4443,7 +4447,7 @@ BOOL SwHTMLParser::HasCurrentParaFlys( BOOL bNoSurroundOnly,
{
if( SURROUND_NONE==eSurround )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -4451,12 +4455,12 @@ BOOL SwHTMLParser::HasCurrentParaFlys( BOOL bNoSurroundOnly,
{
if( SURROUND_NONE==eSurround )
{
- bFound = FALSE;
+ bFound = sal_False;
break;
}
else if( SURROUND_THROUGHT!=eSurround )
{
- bFound = TRUE;
+ bFound = sal_True;
// weitersuchen: Es koennten ja noch welche ohne
// Umlauf kommen ...
}
@@ -4483,45 +4487,45 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
{
SwTxtFmtColl *pCollToSet = 0; // die zu setzende Vorlage
SfxItemSet *pItemSet = 0; // der Set fuer harte Attrs
- USHORT nTopColl = pContext ? pContext->GetTxtFmtColl() : 0;
+ sal_uInt16 nTopColl = pContext ? pContext->GetTxtFmtColl() : 0;
const String& rTopClass = pContext ? pContext->GetClass() : (const String&) aEmptyStr;
- USHORT nDfltColl = RES_POOLCOLL_TEXT;
+ sal_uInt16 nDfltColl = RES_POOLCOLL_TEXT;
- BOOL bInPRE=FALSE; // etwas Kontext Info
+ sal_Bool bInPRE=sal_False; // etwas Kontext Info
- USHORT nLeftMargin = 0, nRightMargin = 0; // die Einzuege und
+ sal_uInt16 nLeftMargin = 0, nRightMargin = 0; // die Einzuege und
short nFirstLineIndent = 0; // Abstaende
- USHORT i;
+ sal_uInt16 i;
for( i = nContextStAttrMin; i < aContexts.Count(); i++ )
{
const _HTMLAttrContext *pCntxt = aContexts[i];
- USHORT nColl = pCntxt->GetTxtFmtColl();
+ sal_uInt16 nColl = pCntxt->GetTxtFmtColl();
if( nColl )
{
// Es gibt eine Vorlage, die zu setzen ist. Dann
// muss zunaechst einmal entschieden werden,
// ob die Vorlage auch gesetzt werden kann
- BOOL bSetThis = TRUE;
+ sal_Bool bSetThis = sal_True;
switch( nColl )
{
- case USHORT(RES_POOLCOLL_HTML_PRE):
- bInPRE = TRUE;
+ case sal_uInt16(RES_POOLCOLL_HTML_PRE):
+ bInPRE = sal_True;
break;
- case USHORT(RES_POOLCOLL_TEXT):
+ case sal_uInt16(RES_POOLCOLL_TEXT):
// <TD><P CLASS=xxx> muss TD.xxx werden
if( nDfltColl==RES_POOLCOLL_TABLE ||
nDfltColl==RES_POOLCOLL_TABLE_HDLN )
nColl = nDfltColl;
break;
- case USHORT(RES_POOLCOLL_HTML_HR):
+ case sal_uInt16(RES_POOLCOLL_HTML_HR):
// <HR> auch in <PRE> als Vorlage setzen, sonst kann man sie
// nicht mehr exportieren
break;
default:
if( bInPRE )
- bSetThis = FALSE;
+ bSetThis = sal_False;
break;
}
@@ -4582,7 +4586,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
// ggf. neue Absatz-Einzuege holen
if( pCntxt->IsLRSpaceChanged() )
{
- USHORT nLeft=0, nRight=0;
+ sal_uInt16 nLeft=0, nRight=0;
pCntxt->GetMargins( nLeft, nRight, nFirstLineIndent );
nLeftMargin = nLeft;
@@ -4604,7 +4608,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
pCSS1Parser->GetTxtFmtColl( nTopColl, rTopClass );
const SfxItemSet& rItemSet = pTopColl->GetAttrSet();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,TRUE, &pItem) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,sal_True, &pItem) )
{
const SvxLRSpaceItem *pLRItem =
(const SvxLRSpaceItem *)pItem;
@@ -4636,7 +4640,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
pContext->SetMargins( nLeftMargin, nRightMargin,
nFirstLineIndent );
}
- if( SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,TRUE, &pItem) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,sal_True, &pItem) )
{
const SvxULSpaceItem *pULItem =
(const SvxULSpaceItem *)pItem;
@@ -4671,7 +4675,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
// ggf. noch den Absatz-Einzug korrigieren
const SvxLRSpaceItem& rLRItem = pCollToSet->GetLRSpace();
- BOOL bSetLRSpace;
+ sal_Bool bSetLRSpace;
bSetLRSpace = nLeftMargin != rLRItem.GetTxtLeft() ||
nFirstLineIndent != rLRItem.GetTxtFirstLineOfst() ||
@@ -4690,7 +4694,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
NewAttr( &aAttrTab.pLRSpace, aLRItem );
aAttrTab.pLRSpace->SetLikePara();
aParaAttrs.Insert( aAttrTab.pLRSpace, aParaAttrs.Count() );
- EndAttr( aAttrTab.pLRSpace, 0, FALSE );
+ EndAttr( aAttrTab.pLRSpace, 0, sal_False );
}
}
@@ -4709,7 +4713,7 @@ void SwHTMLParser::NewCharFmt( int nToken )
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -4751,7 +4755,7 @@ void SwHTMLParser::NewCharFmt( int nToken )
OSL_ENSURE( !aClass.Len() || !pCSS1Parser->GetClass( aClass ),
"Class wird nicht beruecksichtigt" );
DoPositioning( aItemSet, aPropInfo, pCntxt );
- InsertAttrs( aItemSet, aPropInfo, pCntxt, TRUE );
+ InsertAttrs( aItemSet, aPropInfo, pCntxt, sal_True );
}
}
@@ -4776,12 +4780,12 @@ void SwHTMLParser::InsertSpacer()
sal_Int16 eHoriOri = text::HoriOrientation::NONE;
Size aSize( 0, 0);
long nSize = 0;
- BOOL bPrcWidth = FALSE;
- BOOL bPrcHeight = FALSE;
- USHORT nType = HTML_SPTYPE_HORI;
+ sal_Bool bPrcWidth = sal_False;
+ sal_Bool bPrcHeight = sal_False;
+ sal_uInt16 nType = HTML_SPTYPE_HORI;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -4845,7 +4849,7 @@ void SwHTMLParser::InsertSpacer()
// den Inhalt schuetzen
SvxProtectItem aProtectItem( RES_PROTECT) ;
- aProtectItem.SetCntntProtect( TRUE );
+ aProtectItem.SetCntntProtect( sal_True );
aFrmSet.Put( aProtectItem );
// der Rahmen anlegen
@@ -4890,13 +4894,13 @@ void SwHTMLParser::InsertSpacer()
{
SvxULSpaceItem aULSpace( (const SvxULSpaceItem&)pTxtNode
->SwCntntNode::GetAttr( RES_UL_SPACE ) );
- aULSpace.SetLower( aULSpace.GetLower() + (USHORT)nSize );
+ aULSpace.SetLower( aULSpace.GetLower() + (sal_uInt16)nSize );
pTxtNode->SetAttr( aULSpace );
}
else
{
- NewAttr( &aAttrTab.pULSpace, SvxULSpaceItem( 0, (USHORT)nSize, RES_UL_SPACE ) );
- EndAttr( aAttrTab.pULSpace, 0, FALSE );
+ NewAttr( &aAttrTab.pULSpace, SvxULSpaceItem( 0, (sal_uInt16)nSize, RES_UL_SPACE ) );
+ EndAttr( aAttrTab.pULSpace, 0, sal_False );
AppendTxtNode(); // nicht am Abstand drehen!
}
@@ -4917,7 +4921,7 @@ void SwHTMLParser::InsertSpacer()
if( !pPam->GetPoint()->nContent.GetIndex() )
{
- USHORT nLeft=0, nRight=0;
+ sal_uInt16 nLeft=0, nRight=0;
short nIndent = 0;
GetMarginsFromContextWithNumBul( nLeft, nRight, nIndent );
@@ -4929,7 +4933,7 @@ void SwHTMLParser::InsertSpacer()
aLRItem.SetTxtFirstLineOfst( nIndent );
NewAttr( &aAttrTab.pLRSpace, aLRItem );
- EndAttr( aAttrTab.pLRSpace, 0, FALSE );
+ EndAttr( aAttrTab.pLRSpace, 0, sal_False );
}
else
{
@@ -4942,13 +4946,13 @@ void SwHTMLParser::InsertSpacer()
}
}
-USHORT SwHTMLParser::ToTwips( USHORT nPixel ) const
+sal_uInt16 SwHTMLParser::ToTwips( sal_uInt16 nPixel ) const
{
if( nPixel && Application::GetDefaultDevice() )
{
long nTwips = Application::GetDefaultDevice()->PixelToLogic(
Size( nPixel, nPixel ), MapMode( MAP_TWIP ) ).Width();
- return nTwips <= USHRT_MAX ? (USHORT)nTwips : USHRT_MAX;
+ return nTwips <= USHRT_MAX ? (sal_uInt16)nTwips : USHRT_MAX;
}
else
return nPixel;
@@ -4986,7 +4990,7 @@ void SwHTMLParser::InsertIDOption()
{
String aId;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
if( HTML_O_ID==pOption->GetToken() )
@@ -5023,12 +5027,12 @@ void SwHTMLParser::InsertLineBreak()
// harter Zeilenumbruch eingefuegt
String aId, aStyle, aClass; // die ID der Bookmark
- BOOL bClearLeft = FALSE, bClearRight = FALSE;
- BOOL bCleared = FALSE; // wurde ein CLEAR ausgefuehrt?
+ sal_Bool bClearLeft = sal_False, bClearRight = sal_False;
+ sal_Bool bCleared = sal_False; // wurde ein CLEAR ausgefuehrt?
// dann holen wir mal die Optionen
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -5038,13 +5042,13 @@ void SwHTMLParser::InsertLineBreak()
const String &aClear = pOption->GetString();
if( aClear.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_all ) )
{
- bClearLeft = TRUE;
- bClearRight = TRUE;
+ bClearLeft = sal_True;
+ bClearRight = sal_True;
}
else if( aClear.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_left ) )
- bClearLeft = TRUE;
+ bClearLeft = sal_True;
else if( aClear.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_right ) )
- bClearRight = TRUE;
+ bClearRight = sal_True;
}
break;
case HTML_O_ID:
@@ -5068,7 +5072,7 @@ void SwHTMLParser::InsertLineBreak()
{
const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts();
- for( USHORT i=0; i<rFrmFmtTbl.Count(); i++ )
+ for( sal_uInt16 i=0; i<rFrmFmtTbl.Count(); i++ )
{
SwFrmFmt *const pFmt = rFrmFmtTbl[i];
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -5101,9 +5105,9 @@ void SwHTMLParser::InsertLineBreak()
{
SwFmtSurround aSurround( eSurround );
if( SURROUND_NONE != eSurround )
- aSurround.SetAnchorOnly( TRUE );
+ aSurround.SetAnchorOnly( sal_True );
pFmt->SetFmtAttr( aSurround );
- bCleared = TRUE;
+ bCleared = sal_True;
}
} // Anker ist nicht im Node
} // Schleife ueber Fly-Frames
@@ -5112,7 +5116,7 @@ void SwHTMLParser::InsertLineBreak()
// Styles parsen
SvxFmtBreakItem aBreakItem( SVX_BREAK_NONE, RES_BREAK );
- BOOL bBreakItem = FALSE;
+ sal_Bool bBreakItem = sal_False;
if( HasStyleOptions( aStyle, aId, aClass ) )
{
SfxItemSet aItemSet( pDoc->GetAttrPool(), pCSS1Parser->GetWhichMap() );
@@ -5123,7 +5127,7 @@ void SwHTMLParser::InsertLineBreak()
if( pCSS1Parser->SetFmtBreak( aItemSet, aPropInfo ) )
{
aBreakItem = (const SvxFmtBreakItem &)aItemSet.Get( RES_BREAK );
- bBreakItem = TRUE;
+ bBreakItem = sal_True;
}
if( aPropInfo.aId.Len() )
InsertBookmark( aPropInfo.aId );
@@ -5133,7 +5137,7 @@ void SwHTMLParser::InsertLineBreak()
if( bBreakItem && SVX_BREAK_PAGE_AFTER==aBreakItem.GetBreak() )
{
NewAttr( &aAttrTab.pBreak, aBreakItem );
- EndAttr( aAttrTab.pBreak, 0, FALSE );
+ EndAttr( aAttrTab.pBreak, 0, sal_False );
}
if( !bCleared && !bBreakItem )
@@ -5155,27 +5159,27 @@ void SwHTMLParser::InsertLineBreak()
if( bBreakItem && SVX_BREAK_PAGE_BEFORE==aBreakItem.GetBreak() )
{
NewAttr( &aAttrTab.pBreak, aBreakItem );
- EndAttr( aAttrTab.pBreak, 0, FALSE );
+ EndAttr( aAttrTab.pBreak, 0, sal_False );
}
}
void SwHTMLParser::InsertHorzRule()
{
- USHORT nSize = 0;
- USHORT nWidth = 0;
+ sal_uInt16 nSize = 0;
+ sal_uInt16 nWidth = 0;
SvxAdjust eAdjust = SVX_ADJUST_END;
- BOOL bPrcWidth = FALSE;
- BOOL bNoShade = FALSE;
- BOOL bColor = FALSE;
+ sal_Bool bPrcWidth = sal_False;
+ sal_Bool bNoShade = sal_False;
+ sal_Bool bColor = sal_False;
Color aColor;
String aId;
// dann holen wir mal die Optionen
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -5184,16 +5188,16 @@ void SwHTMLParser::InsertHorzRule()
aId = pOption->GetString();
break;
case HTML_O_SIZE:
- nSize = (USHORT)pOption->GetNumber();
+ nSize = (sal_uInt16)pOption->GetNumber();
break;
case HTML_O_WIDTH:
bPrcWidth = (pOption->GetString().Search('%') != STRING_NOTFOUND);
- nWidth = (USHORT)pOption->GetNumber();
+ nWidth = (sal_uInt16)pOption->GetNumber();
if( bPrcWidth && nWidth>=100 )
{
// 100%-Linien sind der default-Fall (keine Attrs neotig)
nWidth = 0;
- bPrcWidth = FALSE;
+ bPrcWidth = sal_False;
}
break;
case HTML_O_ALIGN:
@@ -5201,11 +5205,11 @@ void SwHTMLParser::InsertHorzRule()
(SvxAdjust)pOption->GetEnum( aHTMLPAlignTable, static_cast< sal_uInt16 >(eAdjust) );
break;
case HTML_O_NOSHADE:
- bNoShade = TRUE;
+ bNoShade = sal_True;
break;
case HTML_O_COLOR:
pOption->GetColor( aColor );
- bColor = TRUE;
+ bColor = sal_True;
break;
}
}
@@ -5242,7 +5246,7 @@ void SwHTMLParser::InsertHorzRule()
long nPWidth = 0;
long nPHeight = (long)nSize;
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- SvxCSS1Parser::SetBorderWidth( aBorderLine, (USHORT)nPHeight,
+ SvxCSS1Parser::SetBorderWidth( aBorderLine, (sal_uInt16)nPHeight,
!bNoShade );
}
else if( bNoShade )
@@ -5272,8 +5276,8 @@ void SwHTMLParser::InsertHorzRule()
{
// Laenge und Ausrichtung der Linie ueber Absatz-Einzuege "tuerken"
long nBrowseWidth = GetCurrentBrowseWidth();
- nWidth = bPrcWidth ? (USHORT)((nWidth*nBrowseWidth) / 100)
- : ToTwips( (USHORT)nBrowseWidth );
+ nWidth = bPrcWidth ? (sal_uInt16)((nWidth*nBrowseWidth) / 100)
+ : ToTwips( (sal_uInt16)nBrowseWidth );
if( nWidth < MINLAY )
nWidth = MINLAY;
@@ -5286,16 +5290,16 @@ void SwHTMLParser::InsertHorzRule()
switch( eAdjust )
{
case SVX_ADJUST_RIGHT:
- aLRItem.SetTxtLeft( (USHORT)nDist );
+ aLRItem.SetTxtLeft( (sal_uInt16)nDist );
break;
case SVX_ADJUST_LEFT:
- aLRItem.SetRight( (USHORT)nDist );
+ aLRItem.SetRight( (sal_uInt16)nDist );
break;
case SVX_ADJUST_CENTER:
default:
nDist /= 2;
- aLRItem.SetTxtLeft( (USHORT)nDist );
- aLRItem.SetRight( (USHORT)nDist );
+ aLRItem.SetTxtLeft( (sal_uInt16)nDist );
+ aLRItem.SetRight( (sal_uInt16)nDist );
break;
}
@@ -5323,21 +5327,21 @@ void SwHTMLParser::InsertHorzRule()
void SwHTMLParser::ParseMoreMetaOptions()
{
String aName, aContent;
- BOOL bHTTPEquiv = FALSE;
+ sal_Bool bHTTPEquiv = sal_False;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[ --i ];
switch( pOption->GetToken() )
{
case HTML_O_NAME:
aName = pOption->GetString();
- bHTTPEquiv = FALSE;
+ bHTTPEquiv = sal_False;
break;
case HTML_O_HTTPEQUIV:
aName = pOption->GetString();
- bHTTPEquiv = TRUE;
+ bHTTPEquiv = sal_True;
break;
case HTML_O_CONTENT:
aContent = pOption->GetString();
@@ -5401,9 +5405,9 @@ _HTMLAttr::_HTMLAttr( const SwPosition& rPos, const SfxPoolItem& rItem,
nEndPara( rPos.nNode ),
nSttCntnt( rPos.nContent.GetIndex() ),
nEndCntnt(rPos.nContent.GetIndex() ),
- bInsAtStart( TRUE ),
- bLikePara( FALSE ),
- bValid( TRUE ),
+ bInsAtStart( sal_True ),
+ bLikePara( sal_False ),
+ bValid( sal_True ),
nCount( 1 ),
pNext( 0 ),
pPrev( 0 ),
@@ -5413,7 +5417,7 @@ _HTMLAttr::_HTMLAttr( const SwPosition& rPos, const SfxPoolItem& rItem,
}
_HTMLAttr::_HTMLAttr( const _HTMLAttr &rAttr, const SwNodeIndex &rEndPara,
- USHORT nEndCnt, _HTMLAttr **ppHd ) :
+ sal_uInt16 nEndCnt, _HTMLAttr **ppHd ) :
nSttPara( rAttr.nSttPara ),
nEndPara( rEndPara ),
nSttCntnt( rAttr.nSttCntnt ),
@@ -5434,7 +5438,7 @@ _HTMLAttr::~_HTMLAttr()
delete pItem;
}
-_HTMLAttr *_HTMLAttr::Clone( const SwNodeIndex& rEndPara, USHORT nEndCnt ) const
+_HTMLAttr *_HTMLAttr::Clone( const SwNodeIndex& rEndPara, sal_uInt16 nEndCnt ) const
{
// das Attribut mit der alten Start-Position neu anlegen
_HTMLAttr *pNew = new _HTMLAttr( *this, rEndPara, nEndCnt, ppHead );
@@ -5445,7 +5449,7 @@ _HTMLAttr *_HTMLAttr::Clone( const SwNodeIndex& rEndPara, USHORT nEndCnt ) const
return pNew;
}
-void _HTMLAttr::Reset( const SwNodeIndex& rSttPara, USHORT nSttCnt,
+void _HTMLAttr::Reset( const SwNodeIndex& rSttPara, sal_uInt16 nSttCnt,
_HTMLAttr **ppHd )
{
// den Anfang (und das Ende) neu setzen
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 597e10177319..ae072aa7ec2e 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -404,8 +404,8 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
_HTMLAttrs aParaAttrs; // vorlauefige Absatz-Attribute
_HTMLAttrTable aAttrTab; // "offene" Attribute
_HTMLAttrContexts aContexts;// der aktuelle Attribut/Token-Kontext
- SwHTMLFrmFmts aMoveFlyFrms;// Fly-Frames, deren Anker verschoben wird
- SvXub_StrLens aMoveFlyCnts;// und deren Content-Positionen
+ SwHTMLFrmFmts aMoveFlyFrms;// Fly-Frames, the anchor is moved
+ SvXub_StrLens aMoveFlyCnts;// and the Content-Positions
SwApplet_Impl *pAppletImpl; // das aktuelle Applet
@@ -431,7 +431,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
sal_uInt32 aFontHeights[7]; // die Font-Hoehen 1-7
sal_uInt32 nScriptStartLineNr; // Zeilennummer eines Script-Blocks
- ULONG nEventId;
+ sal_uLong nEventId;
sal_uInt16 nBaseFontStMin; //
sal_uInt16 nFontStMin; //
@@ -597,7 +597,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
void GetULSpaceFromContext( sal_uInt16 &rUpper, sal_uInt16 &rLower ) const;
- void MovePageDescAttrs( SwNode *pSrcNd, ULONG nDestIdx, sal_Bool bFmtBreak );
+ void MovePageDescAttrs( SwNode *pSrcNd, sal_uLong nDestIdx, sal_Bool bFmtBreak );
// Behandlung von Tags auf Absatz-Ebene
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index a7abc69664fa..f8adde26bbc3 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -124,7 +124,7 @@ SwHTMLWriter::~SwHTMLWriter()
delete pNumRuleInfo;
}
-ULONG SwHTMLWriter::WriteStream()
+sal_uLong SwHTMLWriter::WriteStream()
{
// neue Konfiguration setzen
SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get();
@@ -486,7 +486,7 @@ const SwFmtCol *lcl_html_GetFmtCol( const SwHTMLWriter& rHTMLWrt,
return pCol;
}
-sal_Bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, ULONG nIndex )
+sal_Bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, sal_uLong nIndex )
{
sal_Bool bRet = sal_False;
const SwSectionNode *pSectNd =
@@ -502,7 +502,7 @@ sal_Bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, ULONG nIndex )
return bRet;
}
-sal_Bool lcl_html_IsMultiColEnd( const SwHTMLWriter& rHTMLWrt, ULONG nIndex )
+sal_Bool lcl_html_IsMultiColEnd( const SwHTMLWriter& rHTMLWrt, sal_uLong nIndex )
{
sal_Bool bRet = sal_False;
const SwEndNode *pEndNd = rHTMLWrt.pDoc->GetNodes()[nIndex]->GetEndNode();
@@ -865,8 +865,8 @@ static void OutBodyColor( const sal_Char *pTag, const SwFmt *pFmt,
sal_uInt16 SwHTMLWriter::OutHeaderAttrs()
{
- ULONG nIdx = pCurPam->GetPoint()->nNode.GetIndex();
- ULONG nEndIdx = pCurPam->GetMark()->nNode.GetIndex();
+ sal_uLong nIdx = pCurPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nEndIdx = pCurPam->GetMark()->nNode.GetIndex();
SwTxtNode *pTxtNd = 0;
while( nIdx<=nEndIdx &&
@@ -948,7 +948,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs )
// In Nicht-HTML-Dokumenten wird die erste gesetzte Seitenvorlage
// exportiert und wenn keine gesetzt ist die Standard-Vorlage
- ULONG nNodeIdx = pCurPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nNodeIdx = pCurPam->GetPoint()->nNode.GetIndex();
while( nNodeIdx < pDoc->GetNodes().Count() )
{
@@ -1325,8 +1325,8 @@ sal_uInt16 SwHTMLWriter::GetHTMLFontSize( sal_uInt32 nHeight ) const
// Struktur speichert die aktuellen Daten des Writers zwischen, um
// einen anderen Dokument-Teil auszugeben, wie z.B. Header/Footer
-HTMLSaveData::HTMLSaveData( SwHTMLWriter& rWriter, ULONG nStt,
- ULONG nEnd, sal_Bool bSaveNum,
+HTMLSaveData::HTMLSaveData( SwHTMLWriter& rWriter, sal_uLong nStt,
+ sal_uLong nEnd, sal_Bool bSaveNum,
const SwFrmFmt *pFrmFmt ) :
rWrt( rWriter ),
pOldPam( rWrt.pCurPam ),
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index 761ca1894922..61b7e99a9bf3 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -216,7 +216,7 @@ class SwHTMLWriter : public Writer
void CollectLinkTargets();
protected:
- ULONG WriteStream();
+ sal_uLong WriteStream();
public:
#if defined(UNX)
@@ -348,7 +348,7 @@ public:
void OutHyperlinkHRefValue( const String& rURL );
// gebe die evt. an der akt. Position stehenden FlyFrame aus.
- sal_Bool OutFlyFrm( ULONG nNdIdx, xub_StrLen nCntntIdx,
+ sal_Bool OutFlyFrm( sal_uLong nNdIdx, xub_StrLen nCntntIdx,
sal_uInt8 nPos, HTMLOutContext *pContext = 0 );
void OutFrmFmt( sal_uInt8 nType, const SwFrmFmt& rFmt,
const SdrObject *pSdrObj );
@@ -541,7 +541,7 @@ struct HTMLSaveData
sal_Bool bOldOutFlyFrame : 1;
const SwFlyFrmFmt* pOldFlyFmt;
- HTMLSaveData( SwHTMLWriter&, ULONG nStt, ULONG nEnd,
+ HTMLSaveData( SwHTMLWriter&, sal_uLong nStt, sal_uLong nEnd,
sal_Bool bSaveNum=sal_True,
const SwFrmFmt *pFrmFmt=0 );
~HTMLSaveData();
diff --git a/sw/source/filter/inc/fltbase.hxx b/sw/source/filter/inc/fltbase.hxx
index 6665ebd7a449..c53613c983e6 100644
--- a/sw/source/filter/inc/fltbase.hxx
+++ b/sw/source/filter/inc/fltbase.hxx
@@ -36,23 +36,23 @@ class SwFilterBase
protected:
SvStream *pIn;
sal_Char *pReadBuff; // Groessenangabe
- INT32 nBytesLeft; // noch zu lesende Bytes des aktuelle Records
+ sal_Int32 nBytesLeft; // noch zu lesende Bytes des aktuelle Records
CharSet eQuellChar; // Quell-Zeichensatz (interner Zeichensatz)
// CharSet eZielChar; // Ziel-Zeichensatz
- USHORT nTab; // z.Zt. bearbeitete Tabelle
- USHORT nReadBuffSize;// temporaerer Lesepuffer mit
+ sal_uInt16 nTab; // z.Zt. bearbeitete Tabelle
+ sal_uInt16 nReadBuffSize;// temporaerer Lesepuffer mit
// ----------------------------------------------------------
inline void ReadChar( char &rC );
- inline void ReadByte( BYTE &rN );
+ inline void ReadByte( sal_uInt8 &rN );
inline void Read( short &rN );
inline void ReadUnicode( sal_Unicode &rU );
- inline void Read( BYTE &rN0, USHORT &rN1, USHORT &rN2 );
- inline void Read( USHORT &rN );
- inline void Read( USHORT &rN1, USHORT &rN2 );
- inline void Read( USHORT &rN1, USHORT &rN2, USHORT &rN3, USHORT &rN4 );
+ inline void Read( sal_uInt8 &rN0, sal_uInt16 &rN1, sal_uInt16 &rN2 );
+ inline void Read( sal_uInt16 &rN );
+ inline void Read( sal_uInt16 &rN1, sal_uInt16 &rN2 );
+ inline void Read( sal_uInt16 &rN1, sal_uInt16 &rN2, sal_uInt16 &rN3, sal_uInt16 &rN4 );
inline void Read( double &rF );
void Read( String &rS ); // liest 0-terminierten C-String!
inline void ClearBytesLeft( void );
@@ -65,7 +65,7 @@ inline void SwFilterBase::ReadChar( char &rC )
nBytesLeft--;
}
-inline void SwFilterBase::ReadByte( BYTE &rN )
+inline void SwFilterBase::ReadByte( sal_uInt8 &rN )
{
*pIn >> rN;
nBytesLeft--;
@@ -87,25 +87,25 @@ inline void SwFilterBase::Read( short &rN )
nBytesLeft -= 2;
}
-inline void SwFilterBase::Read( BYTE &rN0, USHORT &rN1, USHORT &rN2 )
+inline void SwFilterBase::Read( sal_uInt8 &rN0, sal_uInt16 &rN1, sal_uInt16 &rN2 )
{
*pIn >> rN0 >> rN1 >> rN2;
nBytesLeft -= 5;
}
-inline void SwFilterBase::Read( USHORT &rN )
+inline void SwFilterBase::Read( sal_uInt16 &rN )
{
*pIn >> rN;
nBytesLeft -= 2;
}
-inline void SwFilterBase::Read( USHORT &rN1, USHORT &rN2 )
+inline void SwFilterBase::Read( sal_uInt16 &rN1, sal_uInt16 &rN2 )
{
*pIn >> rN1 >> rN2;
nBytesLeft -= 4;
}
-inline void SwFilterBase::Read( USHORT &rN1, USHORT &rN2, USHORT &rN3, USHORT &rN4 )
+inline void SwFilterBase::Read( sal_uInt16 &rN1, sal_uInt16 &rN2, sal_uInt16 &rN3, sal_uInt16 &rN4 )
{
*pIn >> rN1 >> rN2 >> rN3 >> rN4;
nBytesLeft -= 8;
diff --git a/sw/source/filter/inc/fltglbls.hxx b/sw/source/filter/inc/fltglbls.hxx
index 97fd88e6f7a9..773c47b27fc4 100644
--- a/sw/source/filter/inc/fltglbls.hxx
+++ b/sw/source/filter/inc/fltglbls.hxx
@@ -55,12 +55,12 @@ class FilterGlobals
{
protected:
SvPtrarr aTblFmts;
- USHORT nColStart;
- USHORT nColEnd;
- USHORT nRowStart;
- USHORT nRowEnd;
- USHORT nAnzCols;
- USHORT nAnzRows;
+ sal_uInt16 nColStart;
+ sal_uInt16 nColEnd;
+ sal_uInt16 nRowStart;
+ sal_uInt16 nRowEnd;
+ sal_uInt16 nAnzCols;
+ sal_uInt16 nAnzRows;
public:
FilterGlobals( SwDoc& rDoc, const SwPaM& rPam );
@@ -72,41 +72,41 @@ public:
SvNumberFormatter *pNumFormatter;
LanguageType eDefLanguage;
- ULONG nStandard;
- ULONG nDefFormat; // = 0xFFFFFFFF
+ sal_uLong nStandard;
+ sal_uLong nDefFormat; // = 0xFFFFFFFF
- void SetRange( USHORT nCS, USHORT nCE, USHORT nRS, USHORT nRE );
+ void SetRange( sal_uInt16 nCS, sal_uInt16 nCE, sal_uInt16 nRS, sal_uInt16 nRE );
- BOOL IsInColRange( USHORT nCol )
+ sal_Bool IsInColRange( sal_uInt16 nCol )
{ return ( nCol >= nColStart && nCol <= nColEnd ); }
- BOOL IsInRowRange( USHORT nRow )
+ sal_Bool IsInRowRange( sal_uInt16 nRow )
{ return ( nRow >= nRowStart && nRow <= nRowEnd ); }
- BOOL IsInRange( USHORT nCol, USHORT nRow )
+ sal_Bool IsInRange( sal_uInt16 nCol, sal_uInt16 nRow )
{ return IsInRowRange(nRow) && IsInColRange(nCol); }
- void NormalizeCol( USHORT &rCol ) { rCol -= nColStart; }
- void NormalizeRow( USHORT &rRow ) { rRow -= nRowStart; }
- void Normalize( USHORT &rCol, USHORT &rRow )
+ void NormalizeCol( sal_uInt16 &rCol ) { rCol -= nColStart; }
+ void NormalizeRow( sal_uInt16 &rRow ) { rRow -= nRowStart; }
+ void Normalize( sal_uInt16 &rCol, sal_uInt16 &rRow )
{ NormalizeCol( rCol ); NormalizeRow( rRow ); }
- USHORT AnzCols() const { return nAnzCols; }
- USHORT AnzRows() const { return nAnzRows; }
+ sal_uInt16 AnzCols() const { return nAnzCols; }
+ sal_uInt16 AnzRows() const { return nAnzRows; }
- BOOL ColRangeLimitter( USHORT &rCS, USHORT &rCE );
+ sal_Bool ColRangeLimitter( sal_uInt16 &rCS, sal_uInt16 &rCE );
- void InsertText( USHORT nCol, USHORT nRow, const String& rStr );
+ void InsertText( sal_uInt16 nCol, sal_uInt16 nRow, const String& rStr );
void CreateTable();
void InsertAttr( const SfxPoolItem& rItem );
- inline void ColLimitter( USHORT &rCol );
- inline void RowLimitter( USHORT &rRow );
+ inline void ColLimitter( sal_uInt16 &rCol );
+ inline void RowLimitter( sal_uInt16 &rRow );
};
-inline void FilterGlobals::ColLimitter( USHORT &rCol )
+inline void FilterGlobals::ColLimitter( sal_uInt16 &rCol )
{
if( rCol < nColStart )
rCol = nColStart;
@@ -114,7 +114,7 @@ inline void FilterGlobals::ColLimitter( USHORT &rCol )
rCol = nColEnd;
}
-inline void FilterGlobals::RowLimitter( USHORT &rRow )
+inline void FilterGlobals::RowLimitter( sal_uInt16 &rRow )
{
if( rRow < nRowStart )
rRow = nRowStart;
diff --git a/sw/source/filter/inc/fltini.hxx b/sw/source/filter/inc/fltini.hxx
index d512ba18a866..5b546c031895 100644
--- a/sw/source/filter/inc/fltini.hxx
+++ b/sw/source/filter/inc/fltini.hxx
@@ -43,7 +43,7 @@ class HTMLReader: public Reader
{
// wir wollen die Streams / Storages nicht geoeffnet haben
virtual int SetStrmStgPtr();
- virtual ULONG Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+ virtual sal_uLong Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
virtual String GetTemplateName() const;
public:
HTMLReader();
@@ -51,12 +51,12 @@ public:
class WW1Reader : public Reader
{
- virtual ULONG Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+ virtual sal_uLong Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
};
class XMLReader : public Reader
{
- virtual ULONG Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+ virtual sal_uLong Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
public:
virtual int GetReaderType();
@@ -64,7 +64,7 @@ public:
// read the sections of the document, which is equal to the medium.
// returns the count of it
- virtual USHORT GetSectionList( SfxMedium& rMedium,
+ virtual sal_uInt16 GetSectionList( SfxMedium& rMedium,
SvStrings& rStrings ) const;
};
@@ -81,12 +81,12 @@ void GetWW8Writer( const String&, const String&, WriterRef& );
class SW_DLLPUBLIC SwRelNumRuleSpaces
{
SwNumRuleTbl* pNumRuleTbl; // Liste aller benannten NumRules
- BOOL bNewDoc;
+ sal_Bool bNewDoc;
void SetNumLSpace( SwTxtNode& rNd, const SwNumRule& rRule );
public:
- SwRelNumRuleSpaces( SwDoc& rDoc, BOOL bNewDoc );
+ SwRelNumRuleSpaces( SwDoc& rDoc, sal_Bool bNewDoc );
~SwRelNumRuleSpaces();
void SetNumRelSpaces( SwDoc& rDoc );
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
index 775febaa3b81..61208b30c445 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -53,13 +53,13 @@ class SwPaM;
using namespace com::sun::star;
-inline void SwFltClearFlag(ULONG& rFieldFlags, int no)
+inline void SwFltClearFlag(sal_uLong& rFieldFlags, int no)
{ rFieldFlags &= ~(1L << no); }
-inline void SwFltSetFlag(ULONG& rFieldFlags, int no)
+inline void SwFltSetFlag(sal_uLong& rFieldFlags, int no)
{ rFieldFlags |= 1L << no; }
-inline BOOL SwFltGetFlag(ULONG nFieldFlags, int no)
+inline sal_Bool SwFltGetFlag(sal_uLong nFieldFlags, int no)
{ return (nFieldFlags & (1L << no)) != 0; }
// Stack-Eintrag fuer die Attribute Es werden immer Pointer auf neue Attribute uebergeben.
@@ -73,10 +73,10 @@ public:
xub_StrLen nMkCntnt;// Nachbildung von Mark()
xub_StrLen nPtCntnt;// Nachbildung von GetPoint()
- BOOL bOld; // to mark Attributes *before* skipping field results
- BOOL bLocked;
- BOOL bCopied;
- BOOL bConsumedByField;
+ sal_Bool bOld; // to mark Attributes *before* skipping field results
+ sal_Bool bLocked;
+ sal_Bool bCopied;
+ sal_Bool bConsumedByField;
SW_DLLPUBLIC SwFltStackEntry(const SwPosition & rStartPos, SfxPoolItem* pHt );
SW_DLLPUBLIC SwFltStackEntry(const SwFltStackEntry& rEntry);
@@ -84,7 +84,7 @@ public:
void SetStartPos(const SwPosition & rStartPos);
SW_DLLPUBLIC void SetEndPos( const SwPosition & rEndPos);
- SW_DLLPUBLIC BOOL MakeRegion(SwDoc* pDoc, SwPaM& rRegion, BOOL bCheck );
+ SW_DLLPUBLIC sal_Bool MakeRegion(SwDoc* pDoc, SwPaM& rRegion, sal_Bool bCheck );
};
class SW_DLLPUBLIC SwFltControlStack
@@ -94,12 +94,12 @@ class SW_DLLPUBLIC SwFltControlStack
Entries maEntries;
friend class SwFltShell;
- ULONG nFieldFlags;
+ sal_uLong nFieldFlags;
KeyCode aEmptyKeyCode; // fuer Bookmarks
protected:
SwDoc* pDoc;
- BOOL bIsEndStack;
+ sal_Bool bIsEndStack;
void MoveAttrs( const SwPosition& rPos );
virtual void SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry* pEntry);
@@ -118,20 +118,20 @@ public:
DONT_HARD_PROTECT
};
- SwFltControlStack(SwDoc* pDo, ULONG nFieldFl);
+ SwFltControlStack(SwDoc* pDo, sal_uLong nFieldFl);
virtual ~SwFltControlStack();
- BOOL IsFlagSet(Flags no) const { return ::SwFltGetFlag(nFieldFlags, no);}
+ sal_Bool IsFlagSet(Flags no) const { return ::SwFltGetFlag(nFieldFlags, no);}
void NewAttr(const SwPosition& rPos, const SfxPoolItem & rAttr );
- virtual void SetAttr(const SwPosition& rPos, USHORT nAttrId=0, BOOL bTstEnde=TRUE, long nHand = LONG_MAX, BOOL consumedByField=FALSE);
+ virtual void SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId=0, sal_Bool bTstEnde=sal_True, long nHand = LONG_MAX, sal_Bool consumedByField=sal_False);
- void StealAttr(const SwPosition* pPos, USHORT nAttrId = 0);
+ void StealAttr(const SwPosition* pPos, sal_uInt16 nAttrId = 0);
void MarkAllAttrsOld();
void KillUnlockedAttrs(const SwPosition& pPos);
- SfxPoolItem* GetFmtStackAttr(USHORT nWhich, USHORT * pPos = 0);
- const SfxPoolItem* GetFmtAttr(const SwPosition& rPos, USHORT nWhich);
+ SfxPoolItem* GetFmtStackAttr(sal_uInt16 nWhich, sal_uInt16 * pPos = 0);
+ const SfxPoolItem* GetFmtAttr(const SwPosition& rPos, sal_uInt16 nWhich);
void Delete(const SwPaM &rPam);
Entries::size_type Count() { return maEntries.size(); }
@@ -178,14 +178,14 @@ public:
DateTime aStampPrev;
RedlineType_t eType;
RedlineType_t eTypePrev;
- USHORT nAutorNo;
- USHORT nAutorNoPrev;
+ sal_uInt16 nAutorNo;
+ sal_uInt16 nAutorNoPrev;
SwFltRedline(RedlineType_t eType_,
- USHORT nAutorNo_,
+ sal_uInt16 nAutorNo_,
const DateTime& rStamp_,
RedlineType_t eTypePrev_ = nsRedlineType_t::REDLINE_INSERT,
- USHORT nAutorNoPrev_ = USHRT_MAX,
+ sal_uInt16 nAutorNoPrev_ = USHRT_MAX,
const DateTime* pStampPrev_ = 0)
: SfxPoolItem(RES_FLTR_REDLINE), aStamp(rStamp_), eType(eType_),
eTypePrev(eTypePrev_), nAutorNo(nAutorNo_), nAutorNoPrev(nAutorNoPrev_)
@@ -214,44 +214,44 @@ class SW_DLLPUBLIC SwFltBookmark : public SfxPoolItem
long nHandle;
String aName;
String aVal;
- BOOL bOnlyRef; // "FRAGE"-Feld, Ref/Seitenrf oder nichts
- BOOL bRef;
- BOOL bPgRef;
+ sal_Bool bOnlyRef; // "FRAGE"-Feld, Ref/Seitenrf oder nichts
+ sal_Bool bRef;
+ sal_Bool bPgRef;
public:
SwFltBookmark( const String& rNa, const String& rVa,
- long nHand, BOOL bOnlyR );
+ long nHand, sal_Bool bOnlyR );
SwFltBookmark( const SwFltBookmark& );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==(const SfxPoolItem&) const;
virtual SfxPoolItem* Clone(SfxItemPool* = 0) const;
const String& GetName() const { return aName; }
const String& GetValSys() const { return aVal; }
- BOOL IsOnlyRef() const { return bOnlyRef; }
- BOOL IsRef() const { return bRef; }
- void SetRef(BOOL b = TRUE) { bRef = b; }
- BOOL IsPgRef() const { return bPgRef; }
- void SetPgRef(BOOL b = TRUE) { bPgRef = b; }
+ sal_Bool IsOnlyRef() const { return bOnlyRef; }
+ sal_Bool IsRef() const { return bRef; }
+ void SetRef(sal_Bool b = sal_True) { bRef = b; }
+ sal_Bool IsPgRef() const { return bPgRef; }
+ void SetPgRef(sal_Bool b = sal_True) { bPgRef = b; }
long GetHandle() const { return nHandle; }
};
class SW_DLLPUBLIC SwFltTOX : public SfxPoolItem
{
SwTOXBase* pTOXBase;
- USHORT nCols;
- BOOL bHadBreakItem; // there was a break item BEFORE insertion of the TOX
- BOOL bHadPageDescItem; // ...
+ sal_uInt16 nCols;
+ sal_Bool bHadBreakItem; // there was a break item BEFORE insertion of the TOX
+ sal_Bool bHadPageDescItem; // ...
public:
- SwFltTOX(SwTOXBase* pBase, USHORT _nCols = 0);
+ SwFltTOX(SwTOXBase* pBase, sal_uInt16 _nCols = 0);
SwFltTOX(const SwFltTOX&);
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==(const SfxPoolItem&) const;
virtual SfxPoolItem* Clone(SfxItemPool* = 0) const;
SwTOXBase* GetBase() { return pTOXBase; }
- USHORT GetCols() const { return nCols; }
- void SetHadBreakItem( BOOL bVal ) { bHadBreakItem = bVal; }
- void SetHadPageDescItem( BOOL bVal ) { bHadPageDescItem = bVal; }
- BOOL HadBreakItem() const { return bHadBreakItem; }
- BOOL HadPageDescItem() const { return bHadPageDescItem; }
+ sal_uInt16 GetCols() const { return nCols; }
+ void SetHadBreakItem( sal_Bool bVal ) { bHadBreakItem = bVal; }
+ void SetHadPageDescItem( sal_Bool bVal ) { bHadPageDescItem = bVal; }
+ sal_Bool HadBreakItem() const { return bHadBreakItem; }
+ sal_Bool HadPageDescItem() const { return bHadPageDescItem; }
};
class SwFltSection : public SfxPoolItem
@@ -272,10 +272,10 @@ public:
class SwFltEndStack : public SwFltControlStack
{
public:
- SwFltEndStack(SwDoc* pDo, ULONG nFieldFl)
+ SwFltEndStack(SwDoc* pDo, sal_uLong nFieldFl)
:SwFltControlStack(pDo, nFieldFl)
{
- bIsEndStack = TRUE;
+ bIsEndStack = sal_True;
}
};
@@ -298,7 +298,7 @@ class SwFltOutBase
SwDoc& rDoc;
protected:
RndStdIds eFlyAnchor;
- BOOL bFlyAbsPos;
+ sal_Bool bFlyAbsPos;
SwDoc& GetDoc() { return rDoc; }
SfxItemSet* NewFlyDefaults();
@@ -307,26 +307,26 @@ protected:
public:
virtual SwFltOutBase& operator << (const SfxPoolItem& rItem) = 0;
- virtual const SfxPoolItem& GetAttr(USHORT nWhich) = 0;
- virtual const SfxPoolItem& GetNodeOrStyAttr(USHORT nWhich) = 0;
+ virtual const SfxPoolItem& GetAttr(sal_uInt16 nWhich) = 0;
+ virtual const SfxPoolItem& GetNodeOrStyAttr(sal_uInt16 nWhich) = 0;
- virtual const SfxPoolItem& GetCellAttr(USHORT nWhich);
- virtual BOOL BeginTable();
+ virtual const SfxPoolItem& GetCellAttr(sal_uInt16 nWhich);
+ virtual sal_Bool BeginTable();
virtual void NextTableCell();
virtual void NextTableRow();
virtual void SetTableWidth(SwTwips nW);
virtual void SetTableOrient(sal_Int16 eOri);
- virtual void SetCellWidth(SwTwips nWidth, USHORT nCell);
+ virtual void SetCellWidth(SwTwips nWidth, sal_uInt16 nCell);
virtual void SetCellHeight(SwTwips nH);
- virtual void SetCellBorder(const SvxBoxItem& rFmtBox, USHORT nCell);
- virtual void SetCellSpace(USHORT nSp);
- virtual void DeleteCell(USHORT nCell);
+ virtual void SetCellBorder(const SvxBoxItem& rFmtBox, sal_uInt16 nCell);
+ virtual void SetCellSpace(sal_uInt16 nSp);
+ virtual void DeleteCell(sal_uInt16 nCell);
virtual void EndTable();
- virtual BOOL IsInFly() = 0;
+ virtual sal_Bool IsInFly() = 0;
virtual void SetFlyFrmAttr(const SfxPoolItem& rAttr) = 0;
- virtual const SfxPoolItem& GetFlyFrmAttr(USHORT nWhich) = 0;
- virtual BOOL BeginFly( RndStdIds eAnchor, BOOL bAbsolutePos,
+ virtual const SfxPoolItem& GetFlyFrmAttr(sal_uInt16 nWhich) = 0;
+ virtual sal_Bool BeginFly( RndStdIds eAnchor, sal_Bool bAbsolutePos,
const SfxItemSet* pMoreAttrs = 0 );
virtual void SetFlyAnchor( RndStdIds eAnchor );
virtual void EndFly();
@@ -343,48 +343,48 @@ class SwFltOutDoc : public SwFltOutBase
SwPosition* pTabSavedPos; // set when in table
SwPosition* pFlySavedPos; // set when in fly
SwTwips nTableWidth;
- USHORT usTableX;
- USHORT usTableY;
- BOOL bReadNoTbl; // Keine Tabellen
+ sal_uInt16 usTableX;
+ sal_uInt16 usTableY;
+ sal_Bool bReadNoTbl; // Keine Tabellen
- SwTableBox* GetBox(USHORT ny, USHORT nx = USHRT_MAX);
- BOOL SeekCell( short nRow, short nCol, BOOL bPam );
+ SwTableBox* GetBox(sal_uInt16 ny, sal_uInt16 nx = USHRT_MAX);
+ sal_Bool SeekCell( short nRow, short nCol, sal_Bool bPam );
void SplitTable();
public:
SwFltOutDoc(SwDoc& rDocu, SwPaM* pP, SwFltControlStack& rStk,
SwFltEndStack& rEStk)
: SwFltOutBase(rDocu), rStack(rStk), rEndStack(rEStk), pPaM(pP),
pFly(0), pTable(0), pTabSavedPos(0), pFlySavedPos(0),
- nTableWidth(0), bReadNoTbl(FALSE)
+ nTableWidth(0), bReadNoTbl(sal_False)
{}
- void SetReadNoTable() { bReadNoTbl = TRUE; }
- BOOL IsTableWidthSet() const { return 0 != nTableWidth; }
+ void SetReadNoTable() { bReadNoTbl = sal_True; }
+ sal_Bool IsTableWidthSet() const { return 0 != nTableWidth; }
virtual SwFltOutBase& operator << (const SfxPoolItem& rItem);
- virtual const SfxPoolItem& GetAttr(USHORT nWhich);
- virtual const SfxPoolItem& GetNodeOrStyAttr(USHORT nWhich);
+ virtual const SfxPoolItem& GetAttr(sal_uInt16 nWhich);
+ virtual const SfxPoolItem& GetNodeOrStyAttr(sal_uInt16 nWhich);
- BOOL IsInTable();
- virtual const SfxPoolItem& GetCellAttr(USHORT nWhich);
- virtual BOOL BeginTable();
+ sal_Bool IsInTable();
+ virtual const SfxPoolItem& GetCellAttr(sal_uInt16 nWhich);
+ virtual sal_Bool BeginTable();
virtual void NextTableCell();
virtual void NextTableRow();
virtual void SetTableWidth(SwTwips nW);
virtual void SetTableOrient(sal_Int16 eOri);
- virtual void SetCellWidth(SwTwips nWidth, USHORT nCell);
+ virtual void SetCellWidth(SwTwips nWidth, sal_uInt16 nCell);
virtual void SetCellHeight(SwTwips nH);
- virtual void SetCellBorder(const SvxBoxItem& rFmtBox, USHORT nCell);
- virtual void SetCellSpace(USHORT nSp);
- virtual void DeleteCell(USHORT nCell);
+ virtual void SetCellBorder(const SvxBoxItem& rFmtBox, sal_uInt16 nCell);
+ virtual void SetCellSpace(sal_uInt16 nSp);
+ virtual void DeleteCell(sal_uInt16 nCell);
virtual void EndTable();
SwFrmFmt* MakeFly( RndStdIds eAnchor, SfxItemSet* pSet );
- virtual BOOL IsInFly();
+ virtual sal_Bool IsInFly();
virtual void SetFlyFrmAttr(const SfxPoolItem& rAttr);
- virtual const SfxPoolItem& GetFlyFrmAttr(USHORT nWhich);
- virtual BOOL BeginFly( RndStdIds eAnchor, BOOL bAbsolutePos,
+ virtual const SfxPoolItem& GetFlyFrmAttr(sal_uInt16 nWhich);
+ virtual sal_Bool BeginFly( RndStdIds eAnchor, sal_Bool bAbsolutePos,
const SfxItemSet* pMoreAttrs = 0 );
virtual void EndFly();
};
@@ -393,7 +393,7 @@ class SwFltFormatCollection : public SwFltOutBase
{
SwTxtFmtColl* pColl;
SfxItemSet* pFlyAttrs; // Simulation der Flys in Styles
- BOOL bHasFly;
+ sal_Bool bHasFly;
public:
SwFltFormatCollection(SwDoc&, RES_POOL_COLLFMT_TYPE nType);
SwFltFormatCollection(SwDoc&, const String& rName );
@@ -404,26 +404,26 @@ public:
// #i73790# - method renamed
pColl->ResetAllFmtAttr();
// <--
- pColl->SetAuto(FALSE); // nach Empfehlung JP
+ pColl->SetAuto(sal_False); // nach Empfehlung JP
}
void Derived(SwTxtFmtColl* pBase)
{ pColl->SetDerivedFrom(pBase); }
// SwTxtFmtColl* Search(String, CharSet eSrc);
SwTxtFmtColl* GetColl() { return pColl; }
- void SetHasFly() { bHasFly = TRUE; }
+ void SetHasFly() { bHasFly = sal_True; }
SfxItemSet* GetpFlyAttrs() { return pFlyAttrs; }
virtual SwFltOutBase& operator << (const SfxPoolItem& rItem);
- virtual const SfxPoolItem& GetAttr(USHORT nWhich);
- virtual const SfxPoolItem& GetNodeOrStyAttr(USHORT nWhich);
+ virtual const SfxPoolItem& GetAttr(sal_uInt16 nWhich);
+ virtual const SfxPoolItem& GetNodeOrStyAttr(sal_uInt16 nWhich);
- virtual BOOL IsInFly();
+ virtual sal_Bool IsInFly();
virtual void SetFlyFrmAttr(const SfxPoolItem& rAttr);
- virtual const SfxPoolItem& GetFlyFrmAttr(USHORT nWhich);
- virtual BOOL BeginFly( RndStdIds eAnchor, BOOL bAbsolutePos,
+ virtual const SfxPoolItem& GetFlyFrmAttr(sal_uInt16 nWhich);
+ virtual sal_Bool BeginFly( RndStdIds eAnchor, sal_Bool bAbsolutePos,
const SfxItemSet* pMoreAttrs = 0 );
- BOOL BeginStyleFly( SwFltOutDoc* pOutDoc );
+ sal_Bool BeginStyleFly( SwFltOutDoc* pOutDoc );
virtual void EndFly();
};
@@ -462,22 +462,22 @@ class SwFltShell
} eSubMode;
// Fly items:
- USHORT nAktStyle; // zur Indizierung pStyleFlyTable
+ sal_uInt16 nAktStyle; // zur Indizierung pStyleFlyTable
//
SwFltControlStack aStack;
SwFltEndStack aEndStack;
SwPaM* pPaM;
//
String sBaseURL;
- USHORT nPageDescOffset; // fuers update der pagedescs
+ sal_uInt16 nPageDescOffset; // fuers update der pagedescs
CharSet eSrcCharSet; // charset der quelle
friend class SwFltControlStack;
- BOOL bNewDoc;
- BOOL bStdPD;
- BOOL bProtect;
+ sal_Bool bNewDoc;
+ sal_Bool bStdPD;
+ sal_Bool bProtect;
public:
- SwFltShell(SwDoc* , SwPaM& , const String& rBaseURL, BOOL bNew, ULONG = 0);
+ SwFltShell(SwDoc* , SwPaM& , const String& rBaseURL, sal_Bool bNew, sal_uLong = 0);
~SwFltShell();
SwDoc& GetDoc() { return *aStack.pDoc; }
@@ -486,20 +486,20 @@ public:
eSrcCharSet = eNew;
return eOld;
}
- void SetUseStdPageDesc() { bStdPD = TRUE; }
- void SetProtect() { bProtect = TRUE; }
+ void SetUseStdPageDesc() { bStdPD = sal_True; }
+ void SetProtect() { bProtect = sal_True; }
SwPageDesc* MakePageDesc(SwPageDesc* pFirstPageDesc = NULL);
SwPageDesc& GetPageDesc() { return *pCurrentPageDesc; }
- void NextTab() { (*this) << BYTE(0x09); }
- void NextLine() { (*this) << BYTE(0x0a); }
+ void NextTab() { (*this) << sal_uInt8(0x09); }
+ void NextLine() { (*this) << sal_uInt8(0x0a); }
void NextParagraph();
void NextPage();
void NextSection() { pCurrentPageDesc = MakePageDesc(); }
SwFltShell& AddGraphic( const String& rPicName );
SwFltShell& AddError( const sal_Char* pErr );
- SwFltShell& EndItem( USHORT nId );
- SwFltShell& SetStyle( USHORT nStyle );
+ SwFltShell& EndItem( sal_uInt16 nId );
+ SwFltShell& SetStyle( sal_uInt16 nStyle );
SwFltShell& operator << ( Graphic& );
SwFltShell& operator << ( SwFltBookmark& aBook );
@@ -521,12 +521,12 @@ public:
void BeginFootnote();
void EndFootnote();
// methoden zur verwaltung von Tabellen
- BOOL IsInTable() {
+ sal_Bool IsInTable() {
return ( pOut == pOutDoc ) ? pOutDoc->IsInTable() : 0; }
- const SfxPoolItem& GetCellAttr(USHORT nWhich) {
+ const SfxPoolItem& GetCellAttr(sal_uInt16 nWhich) {
return pOut->GetCellAttr(nWhich); }
- BOOL BeginTable() {
- BOOL b = pOut->BeginTable();
+ sal_Bool BeginTable() {
+ sal_Bool b = pOut->BeginTable();
if(b) eSubMode = Table;
return b; }
void NextTableCell() {
@@ -535,25 +535,25 @@ public:
pOut->NextTableRow(); }
void SetTableWidth(SwTwips nW) {
pOut->SetTableWidth(nW); }
- BOOL IsTableWidthSet() {
+ sal_Bool IsTableWidthSet() {
return pOutDoc->IsTableWidthSet(); }
void SetTableOrient(sal_Int16 eOri) {
pOut->SetTableOrient(eOri); }
- void SetCellWidth(SwTwips nWidth, USHORT nCell = USHRT_MAX ) {
+ void SetCellWidth(SwTwips nWidth, sal_uInt16 nCell = USHRT_MAX ) {
pOut->SetCellWidth(nWidth, nCell); }
void SetCellHeight(SwTwips nH) {
pOut->SetCellHeight(nH); }
- void SetCellBorder(const SvxBoxItem& rFmtBox, USHORT nCell = USHRT_MAX ){
+ void SetCellBorder(const SvxBoxItem& rFmtBox, sal_uInt16 nCell = USHRT_MAX ){
pOut->SetCellBorder(rFmtBox, nCell); }
- void SetCellSpace(USHORT nSp) {
+ void SetCellSpace(sal_uInt16 nSp) {
pOut->SetCellSpace(nSp); }
- void DeleteCell(USHORT nCell = USHRT_MAX) {
+ void DeleteCell(sal_uInt16 nCell = USHRT_MAX) {
pOut->DeleteCell(nCell); }
void EndTable() {
pOut->EndTable(); }
// methoden zur verwaltung von Flys
- BOOL IsInFly() { return pOut->IsInFly(); }
- BOOL BeginFly( RndStdIds eAnchor = FLY_AT_PARA, BOOL bAbsolutePos = FALSE );
+ sal_Bool IsInFly() { return pOut->IsInFly(); }
+ sal_Bool BeginFly( RndStdIds eAnchor = FLY_AT_PARA, sal_Bool bAbsolutePos = sal_False );
void SetFlyAnchor( RndStdIds eAnchor )
{ pOut->SetFlyAnchor( eAnchor ); }
void SetFlyXPos( short nXPos, sal_Int16 eHRel = com::sun::star::text::RelOrientation::FRAME,
@@ -564,7 +564,7 @@ public:
pOut->SetFlyFrmAttr( rAttr ); }
void EndFly();
// methoden zur verwaltung von styles:
- void BeginStyle(USHORT nUserCode, RES_POOL_COLLFMT_TYPE aType)
+ void BeginStyle(sal_uInt16 nUserCode, RES_POOL_COLLFMT_TYPE aType)
{
OSL_ENSURE(nUserCode<sizeof(pColls)/sizeof(*pColls), "code out of bounds");
OSL_ENSURE(pColls[nUserCode] == NULL, "user codes dublicate");
@@ -574,7 +574,7 @@ public:
nAktStyle = nUserCode;
eSubMode = Style;
}
- void BeginStyle( USHORT nUserCode, const String& rName )
+ void BeginStyle( sal_uInt16 nUserCode, const String& rName )
{
OSL_ENSURE(nUserCode<sizeof(pColls)/sizeof(*pColls), "code out of bounds");
OSL_ENSURE(pColls[nUserCode] == NULL, "user codes dublicate");
@@ -584,16 +584,16 @@ public:
nAktStyle = nUserCode;
eSubMode = Style;
}
- BOOL IsStyleImported(USHORT nUserCode)
+ sal_Bool IsStyleImported(sal_uInt16 nUserCode)
{ return pColls[nUserCode] != 0; }
- void BaseStyle(USHORT nBased)
+ void BaseStyle(sal_uInt16 nBased)
{
OSL_ENSURE(eSubMode == Style, "wrong state for style");
OSL_ENSURE(pColls[nBased], "Style based on noexistent style" );
if( eSubMode == Style && pColls[nBased]->GetColl() )
((SwFltFormatCollection*)pOut)->Derived(pColls[nBased]->GetColl());
}
- void NextStyle(USHORT nWhich, USHORT nNext);
+ void NextStyle(sal_uInt16 nWhich, sal_uInt16 nNext);
void EndStyle()
{
@@ -603,22 +603,22 @@ public:
eSubMode = None;
}
- BOOL IsFlagSet(SwFltControlStack::Flags no) const
+ sal_Bool IsFlagSet(SwFltControlStack::Flags no) const
{ return aStack.IsFlagSet(no); }
void ConvertUStr( String& rInOut );
String QuoteStr( const String& rIn );
// folgende status kann die shell verwalten:
- const SfxPoolItem& GetNodeOrStyAttr(USHORT nWhich);
- const SfxPoolItem& GetAttr(USHORT nWhich);
- const SfxPoolItem& GetFlyFrmAttr(USHORT nWhich);
- SwFieldType* GetSysFldType(USHORT eWhich);
- BOOL GetWeightBold();
- BOOL GetPostureItalic();
- BOOL GetCrossedOut();
- BOOL GetContour();
- BOOL GetCaseKapitaelchen();
- BOOL GetCaseVersalien();
+ const SfxPoolItem& GetNodeOrStyAttr(sal_uInt16 nWhich);
+ const SfxPoolItem& GetAttr(sal_uInt16 nWhich);
+ const SfxPoolItem& GetFlyFrmAttr(sal_uInt16 nWhich);
+ SwFieldType* GetSysFldType(sal_uInt16 eWhich);
+ sal_Bool GetWeightBold();
+ sal_Bool GetPostureItalic();
+ sal_Bool GetCrossedOut();
+ sal_Bool GetContour();
+ sal_Bool GetCaseKapitaelchen();
+ sal_Bool GetCaseVersalien();
const String& GetBaseURL() const { return sBaseURL; }
};
diff --git a/sw/source/filter/inc/msfilter.hxx b/sw/source/filter/inc/msfilter.hxx
index 56507948e10e..f7b72790a37d 100644
--- a/sw/source/filter/inc/msfilter.hxx
+++ b/sw/source/filter/inc/msfilter.hxx
@@ -119,7 +119,7 @@ namespace sw
@author
<a href="mailto:mmaher@openoffice.org">Martin Maher</a
*/
- ULONG MSDateTimeFormatToSwFormat(String& rParams, SvNumberFormatter *pFormatter, USHORT &rLang, bool bHijri, USHORT nDocLang);
+ sal_uLong MSDateTimeFormatToSwFormat(String& rParams, SvNumberFormatter *pFormatter, sal_uInt16 &rLang, bool bHijri, sal_uInt16 nDocLang);
/** Used by MSDateTimeFormatToSwFormat to identify AM time fields
@@ -145,10 +145,10 @@ namespace sw
/// Redlining Authors
struct AuthorInfo
{
- USHORT nWWAuthorId;
- USHORT nOurId;
+ sal_uInt16 nWWAuthorId;
+ sal_uInt16 nOurId;
- AuthorInfo(USHORT nWWAuthorId_, USHORT nOurId_ = 0):
+ AuthorInfo(sal_uInt16 nWWAuthorId_, sal_uInt16 nOurId_ = 0):
nWWAuthorId( nWWAuthorId_ ),
nOurId( nOurId_ )
{}
@@ -437,7 +437,7 @@ namespace sw
protected:
std::vector<String> maAuthors; // Array of Sw - Bookmarknames
- USHORT GetPos( const String& rNm );
+ sal_uInt16 GetPos( const String& rNm );
//No copying
WrtRedlineAuthor(const WrtRedlineAuthor&);
@@ -446,7 +446,7 @@ namespace sw
WrtRedlineAuthor() {}
virtual ~WrtRedlineAuthor() {}
- USHORT AddName( const String& rNm );
+ sal_uInt16 AddName( const String& rNm );
virtual void Write(Writer &rWrt) = 0;
// std::vector<String> GetNames();
};
diff --git a/sw/source/filter/inc/rtf.hxx b/sw/source/filter/inc/rtf.hxx
index 1e96a5fc4b3a..e138cc3a4399 100644
--- a/sw/source/filter/inc/rtf.hxx
+++ b/sw/source/filter/inc/rtf.hxx
@@ -35,23 +35,23 @@ class RTFVertOrient
{
union {
struct {
- USHORT nOrient : 4;
- USHORT nRelOrient : 1;
+ sal_uInt16 nOrient : 4;
+ sal_uInt16 nRelOrient : 1;
} Flags;
- USHORT nVal;
+ sal_uInt16 nVal;
} Value;
public:
- RTFVertOrient( USHORT nValue ) { Value.nVal = nValue; }
+ RTFVertOrient( sal_uInt16 nValue ) { Value.nVal = nValue; }
- RTFVertOrient( USHORT nOrient, USHORT nRelOrient ) {
+ RTFVertOrient( sal_uInt16 nOrient, sal_uInt16 nRelOrient ) {
Value.Flags.nOrient = nOrient;
Value.Flags.nRelOrient = nRelOrient;
}
- USHORT GetOrient() const { return Value.Flags.nOrient; }
- USHORT GetRelation() const { return Value.Flags.nRelOrient; }
- USHORT GetValue() const { return Value.nVal; }
+ sal_uInt16 GetOrient() const { return Value.Flags.nOrient; }
+ sal_uInt16 GetRelation() const { return Value.Flags.nRelOrient; }
+ sal_uInt16 GetValue() const { return Value.nVal; }
};
@@ -59,50 +59,50 @@ class RTFHoriOrient
{
union {
struct {
- USHORT nOrient : 4;
- USHORT nRelAnchor : 4;
- USHORT nRelOrient : 1;
+ sal_uInt16 nOrient : 4;
+ sal_uInt16 nRelAnchor : 4;
+ sal_uInt16 nRelOrient : 1;
} Flags;
- USHORT nVal;
+ sal_uInt16 nVal;
} Value;
public:
- RTFHoriOrient( USHORT nValue ) { Value.nVal = nValue; }
+ RTFHoriOrient( sal_uInt16 nValue ) { Value.nVal = nValue; }
- RTFHoriOrient( USHORT nOrient, USHORT nRelOrient ) {
+ RTFHoriOrient( sal_uInt16 nOrient, sal_uInt16 nRelOrient ) {
Value.Flags.nOrient = nOrient;
Value.Flags.nRelOrient = nRelOrient;
Value.Flags.nRelAnchor = 0;
}
- USHORT GetOrient() const { return Value.Flags.nOrient; }
- USHORT GetRelation() const { return Value.Flags.nRelOrient; }
- USHORT GetValue() const { return Value.nVal; }
+ sal_uInt16 GetOrient() const { return Value.Flags.nOrient; }
+ sal_uInt16 GetRelation() const { return Value.Flags.nRelOrient; }
+ sal_uInt16 GetValue() const { return Value.nVal; }
};
class RTFProtect
{
union {
struct {
- BOOL bCntnt : 1;
- BOOL bSize : 1;
- BOOL bPos : 1;
+ sal_Bool bCntnt : 1;
+ sal_Bool bSize : 1;
+ sal_Bool bPos : 1;
} Flags;
- BYTE nVal;
+ sal_uInt8 nVal;
} Value;
public:
- RTFProtect( BYTE nValue ) { Value.nVal = nValue; }
+ RTFProtect( sal_uInt8 nValue ) { Value.nVal = nValue; }
- RTFProtect( BOOL bCntnt, BOOL bSize, BOOL bPos ) {
+ RTFProtect( sal_Bool bCntnt, sal_Bool bSize, sal_Bool bPos ) {
Value.Flags.bCntnt = bCntnt;
Value.Flags.bSize = bSize;
Value.Flags.bPos = bPos;
}
- BOOL GetCntnt() const { return Value.Flags.bCntnt; }
- BOOL GetSize() const { return Value.Flags.bSize; }
- BOOL GetPos() const { return Value.Flags.bPos; }
- USHORT GetValue() const { return Value.nVal; }
+ sal_Bool GetCntnt() const { return Value.Flags.bCntnt; }
+ sal_Bool GetSize() const { return Value.Flags.bSize; }
+ sal_Bool GetPos() const { return Value.Flags.bPos; }
+ sal_uInt16 GetValue() const { return Value.nVal; }
};
@@ -110,22 +110,22 @@ class RTFSurround
{
union {
struct {
- USHORT nGoldCut : 1;
- USHORT nOrder : 4;
+ sal_uInt16 nGoldCut : 1;
+ sal_uInt16 nOrder : 4;
} Flags;
- BYTE nVal;
+ sal_uInt8 nVal;
} Value;
public:
- RTFSurround( BYTE nValue ) { Value.nVal = nValue; }
+ RTFSurround( sal_uInt8 nValue ) { Value.nVal = nValue; }
- RTFSurround( BOOL bGoldCut, BYTE nOrder ) {
+ RTFSurround( sal_Bool bGoldCut, sal_uInt8 nOrder ) {
Value.Flags.nOrder = nOrder;
Value.Flags.nGoldCut = bGoldCut;
}
- BYTE GetOrder() const { return (BYTE)Value.Flags.nOrder; }
- BOOL GetGoldCut() const { return (BOOL)Value.Flags.nGoldCut; }
- USHORT GetValue() const { return Value.nVal; }
+ sal_uInt8 GetOrder() const { return (sal_uInt8)Value.Flags.nOrder; }
+ sal_Bool GetGoldCut() const { return (sal_Bool)Value.Flags.nGoldCut; }
+ sal_uInt16 GetValue() const { return Value.nVal; }
};
#endif // _RTF_HXX
diff --git a/sw/source/filter/inc/wrt_fn.hxx b/sw/source/filter/inc/wrt_fn.hxx
index c4790db74c12..05f724707235 100644
--- a/sw/source/filter/inc/wrt_fn.hxx
+++ b/sw/source/filter/inc/wrt_fn.hxx
@@ -42,7 +42,7 @@ typedef FnAttrOut SwAttrFnTab[ POOLATTR_END - POOLATTR_BEGIN ];
SW_DLLPUBLIC Writer& Out( const SwAttrFnTab, const SfxPoolItem&, Writer& );
SW_DLLPUBLIC Writer& Out_SfxItemSet( const SwAttrFnTab, Writer&, const SfxItemSet&,
- BOOL bDeep, BOOL bTstForDefault = TRUE );
+ sal_Bool bDeep, sal_Bool bTstForDefault = sal_True );
/* Funktionspointer auf die Node-Write-Funktionen */
diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx
index 8bf5424e3408..3ab7614986db 100644
--- a/sw/source/filter/inc/wrtswtbl.hxx
+++ b/sw/source/filter/inc/wrtswtbl.hxx
@@ -62,46 +62,46 @@ class SwWriteTableCell
long nHeight; // fixe/Mindest-Hoehe der Zeile
- USHORT nWidthOpt; // Breite aus Option;
+ sal_uInt32 nWidthOpt; // Breite aus Option;
- USHORT nRow; // Start-Zeile
- USHORT nCol; // Start-Spalte
+ sal_uInt16 nRow; // Start-Zeile
+ sal_uInt16 nCol; // Start-Spalte
- USHORT nRowSpan; // ueberspannte Zeilen
- USHORT nColSpan; // ueberspannte Spalten
+ sal_uInt16 nRowSpan; // ueberspannte Zeilen
+ sal_uInt16 nColSpan; // ueberspannte Spalten
- BOOL bPrcWidthOpt;
+ sal_Bool bPrcWidthOpt;
public:
- SwWriteTableCell(const SwTableBox *pB, USHORT nR, USHORT nC, USHORT nRSpan,
- USHORT nCSpan, long nHght, const SvxBrushItem *pBGround)
+ SwWriteTableCell(const SwTableBox *pB, sal_uInt16 nR, sal_uInt16 nC, sal_uInt16 nRSpan,
+ sal_uInt16 nCSpan, long nHght, const SvxBrushItem *pBGround)
: pBox( pB ), pBackground( pBGround ), nHeight( nHght ), nWidthOpt( 0 ),
nRow( nR ), nCol( nC ), nRowSpan( nRSpan ), nColSpan( nCSpan ),
- bPrcWidthOpt( FALSE )
+ bPrcWidthOpt( sal_False )
{}
const SwTableBox *GetBox() const { return pBox; }
- USHORT GetRow() const { return nRow; }
- USHORT GetCol() const { return nCol; }
+ sal_uInt16 GetRow() const { return nRow; }
+ sal_uInt16 GetCol() const { return nCol; }
- USHORT GetRowSpan() const { return nRowSpan; }
- USHORT GetColSpan() const { return nColSpan; }
+ sal_uInt16 GetRowSpan() const { return nRowSpan; }
+ sal_uInt16 GetColSpan() const { return nColSpan; }
long GetHeight() const { return nHeight; }
sal_Int16 GetVertOri() const;
const SvxBrushItem *GetBackground() const { return pBackground; }
- void SetWidthOpt( USHORT nWidth, BOOL bPrc )
+ void SetWidthOpt( sal_uInt16 nWidth, sal_Bool bPrc )
{
nWidthOpt = nWidth; bPrcWidthOpt = bPrc;
}
- USHORT GetWidthOpt() const { return nWidthOpt; }
- BOOL HasPrcWidthOpt() const { return bPrcWidthOpt; }
+ sal_uInt32 GetWidthOpt() const { return nWidthOpt; }
+ sal_Bool HasPrcWidthOpt() const { return bPrcWidthOpt; }
};
typedef SwWriteTableCell *SwWriteTableCellPtr;
@@ -116,7 +116,7 @@ class SwWriteTableRow
const SvxBrushItem *pBackground;// Hintergrund
long nPos; // End-Position (twips) der Zeile
- BOOL mbUseLayoutHeights;
+ sal_Bool mbUseLayoutHeights;
// Forbidden and not implemented.
SwWriteTableRow();
@@ -129,17 +129,17 @@ protected:
public:
- USHORT nTopBorder; // Dicke der oberen/unteren Umrandugen
- USHORT nBottomBorder;
+ sal_uInt16 nTopBorder; // Dicke der oberen/unteren Umrandugen
+ sal_uInt16 nBottomBorder;
- BOOL bTopBorder : 1; // Welche Umrandungen sind da?
- BOOL bBottomBorder : 1;
+ sal_Bool bTopBorder : 1; // Welche Umrandungen sind da?
+ sal_Bool bBottomBorder : 1;
- SwWriteTableRow( long nPos, BOOL bUseLayoutHeights );
+ SwWriteTableRow( long nPos, sal_Bool bUseLayoutHeights );
SwWriteTableCell *AddCell( const SwTableBox *pBox,
- USHORT nRow, USHORT nCol,
- USHORT nRowSpan, USHORT nColSpan,
+ sal_uInt16 nRow, sal_uInt16 nCol,
+ sal_uInt16 nRowSpan, sal_uInt16 nColSpan,
long nHeight,
const SvxBrushItem *pBackground );
@@ -149,8 +149,8 @@ public:
}
const SvxBrushItem *GetBackground() const { return pBackground; }
- BOOL HasTopBorder() const { return bTopBorder; }
- BOOL HasBottomBorder() const { return bBottomBorder; }
+ sal_Bool HasTopBorder() const { return bTopBorder; }
+ sal_Bool HasBottomBorder() const { return bBottomBorder; }
long GetPos() const { return nPos; }
const SwWriteTableCells& GetCells() const { return aCells; }
@@ -181,39 +181,39 @@ SV_DECL_PTRARR_SORT_DEL( SwWriteTableRows, SwWriteTableRowPtr, 5, 5 )
class SwWriteTableCol
{
- USHORT nPos; // End Position der Spalte
+ sal_uInt32 nPos; // End Position der Spalte
- USHORT nWidthOpt;
+ sal_uInt32 nWidthOpt;
- BOOL bRelWidthOpt : 1;
- BOOL bOutWidth : 1; // Spaltenbreite ausgeben?
+ sal_Bool bRelWidthOpt : 1;
+ sal_Bool bOutWidth : 1; // Spaltenbreite ausgeben?
public:
- BOOL bLeftBorder : 1; // Welche Umrandungen sind da?
- BOOL bRightBorder : 1;
+ sal_Bool bLeftBorder : 1; // Welche Umrandungen sind da?
+ sal_Bool bRightBorder : 1;
- SwWriteTableCol( USHORT nPosition );
+ SwWriteTableCol( sal_uInt32 nPosition );
- USHORT GetPos() const { return nPos; }
+ sal_uInt32 GetPos() const { return nPos; }
- void SetLeftBorder( BOOL bBorder ) { bLeftBorder = bBorder; }
- BOOL HasLeftBorder() const { return bLeftBorder; }
+ void SetLeftBorder( sal_Bool bBorder ) { bLeftBorder = bBorder; }
+ sal_Bool HasLeftBorder() const { return bLeftBorder; }
- void SetRightBorder( BOOL bBorder ) { bRightBorder = bBorder; }
- BOOL HasRightBorder() const { return bRightBorder; }
+ void SetRightBorder( sal_Bool bBorder ) { bRightBorder = bBorder; }
+ sal_Bool HasRightBorder() const { return bRightBorder; }
- void SetOutWidth( BOOL bSet ) { bOutWidth = bSet; }
- BOOL GetOutWidth() const { return bOutWidth; }
+ void SetOutWidth( sal_Bool bSet ) { bOutWidth = bSet; }
+ sal_Bool GetOutWidth() const { return bOutWidth; }
inline int operator==( const SwWriteTableCol& rCol ) const;
inline int operator<( const SwWriteTableCol& rCol ) const;
- void SetWidthOpt( USHORT nWidth, BOOL bRel )
+ void SetWidthOpt( sal_uInt32 nWidth, sal_Bool bRel )
{
nWidthOpt = nWidth; bRelWidthOpt = bRel;
}
- USHORT GetWidthOpt() const { return nWidthOpt; }
- BOOL HasRelWidthOpt() const { return bRelWidthOpt; }
+ sal_uInt32 GetWidthOpt() const { return nWidthOpt; }
+ sal_Bool HasRelWidthOpt() const { return bRelWidthOpt; }
};
inline int SwWriteTableCol::operator==( const SwWriteTableCol& rCol ) const
@@ -242,70 +242,70 @@ protected:
SwWriteTableCols aCols; // alle Spalten
SwWriteTableRows aRows; // alle Zellen
- UINT32 nBorderColor; // Umrandungsfarbe
+ sal_uInt32 nBorderColor; // Umrandungsfarbe
- USHORT nCellSpacing; // Dicke der inneren Umrandung
- USHORT nCellPadding; // Absatnd Umrandung-Inhalt
+ sal_uInt16 nCellSpacing; // Dicke der inneren Umrandung
+ sal_uInt16 nCellPadding; // Absatnd Umrandung-Inhalt
- USHORT nBorder; // Dicke der ausseren Umrandung
- USHORT nInnerBorder; // Dicke der inneren Umrandung
- USHORT nBaseWidth; // Bezugsgroesse fur Breiten SwFmtFrmSize
+ sal_uInt16 nBorder; // Dicke der ausseren Umrandung
+ sal_uInt16 nInnerBorder; // Dicke der inneren Umrandung
+ sal_uInt32 nBaseWidth; // Bezugsgroesse fur Breiten SwFmtFrmSize
- USHORT nHeadEndRow; // letzte Zeile des Tabellen-Kopfes
+ sal_uInt16 nHeadEndRow; // letzte Zeile des Tabellen-Kopfes
- USHORT nLeftSub;
- USHORT nRightSub;
+ sal_uInt16 nLeftSub;
+ sal_uInt16 nRightSub;
- long nTabWidth; // Absolute/Relative Breite der Tabelle
+ sal_uInt32 nTabWidth; // Absolute/Relative Breite der Tabelle
- BOOL bRelWidths : 1; // Breiten relativ ausgeben?
- BOOL bUseLayoutHeights : 1; // Layout zur Hoehenbestimmung nehmen?
+ sal_Bool bRelWidths : 1; // Breiten relativ ausgeben?
+ sal_Bool bUseLayoutHeights : 1; // Layout zur Hoehenbestimmung nehmen?
#if OSL_DEBUG_LEVEL > 1
- BOOL bGetLineHeightCalled : 1;
+ sal_Bool bGetLineHeightCalled : 1;
#endif
- BOOL bColsOption : 1;
- BOOL bColTags : 1;
- BOOL bLayoutExport : 1;
- BOOL bCollectBorderWidth : 1;
+ sal_Bool bColsOption : 1;
+ sal_Bool bColTags : 1;
+ sal_Bool bLayoutExport : 1;
+ sal_Bool bCollectBorderWidth : 1;
- virtual BOOL ShouldExpandSub( const SwTableBox *pBox,
- BOOL bExpandedBefore, USHORT nDepth ) const;
+ virtual sal_Bool ShouldExpandSub( const SwTableBox *pBox,
+ sal_Bool bExpandedBefore, sal_uInt16 nDepth ) const;
- void CollectTableRowsCols( long nStartRPos, USHORT nStartCPos,
+ void CollectTableRowsCols( long nStartRPos, sal_uInt32 nStartCPos,
long nParentLineHeight,
- USHORT nParentLineWidth,
+ sal_uInt32 nParentLineWidth,
const SwTableLines& rLines,
- USHORT nDepth );
+ sal_uInt16 nDepth );
- void FillTableRowsCols( long nStartRPos, USHORT nStartRow,
- USHORT nStartCPos, USHORT nStartCol,
+ void FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
+ sal_uInt32 nStartCPos, sal_uInt16 nStartCol,
long nParentLineHeight,
- USHORT nParentLineWidth,
+ sal_uInt32 nParentLineWidth,
const SwTableLines& rLines,
const SvxBrushItem* pLineBrush,
- USHORT nDepth,
+ sal_uInt16 nDepth,
sal_uInt16 nNumOfHeaderRows );
- void MergeBorders( const SvxBorderLine* pBorderLine, BOOL bTable );
+ void MergeBorders( const SvxBorderLine* pBorderLine, sal_Bool bTable );
- USHORT MergeBoxBorders( const SwTableBox *pBox, USHORT nRow, USHORT nCol,
- USHORT nRowSpan, USHORT nColSpan,
- USHORT &rTopBorder, USHORT &rBottomBorder );
+ sal_uInt16 MergeBoxBorders( const SwTableBox *pBox, sal_uInt16 nRow, sal_uInt16 nCol,
+ sal_uInt16 nRowSpan, sal_uInt16 nColSpan,
+ sal_uInt16 &rTopBorder, sal_uInt16 &rBottomBorder );
- USHORT GetBaseWidth() const { return nBaseWidth; }
+ sal_uInt32 GetBaseWidth() const { return nBaseWidth; }
- BOOL HasRelWidths() const { return bRelWidths; }
+ sal_Bool HasRelWidths() const { return bRelWidths; }
public:
- static long GetBoxWidth( const SwTableBox *pBox );
+ static sal_uInt32 GetBoxWidth( const SwTableBox *pBox );
- USHORT GetRawWidth( USHORT nCol, USHORT nColSpan ) const;
- USHORT GetAbsWidth( USHORT nCol, USHORT nColSpan ) const;
- USHORT GetRelWidth( USHORT nCol, USHORT nColSpan ) const;
- USHORT GetPrcWidth( USHORT nCol, USHORT nColSpan ) const;
+ sal_uInt32 GetRawWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
+ sal_uInt16 GetAbsWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
+ sal_uInt16 GetRelWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
+ sal_uInt16 GetPrcWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
- long GetAbsHeight( long nRawWidth, USHORT nRow, USHORT nRowSpan ) const;
+ long GetAbsHeight( long nRawWidth, sal_uInt16 nRow, sal_uInt16 nRowSpan ) const;
protected:
long GetLineHeight( const SwTableLine *pLine );
@@ -313,14 +313,14 @@ protected:
const SvxBrushItem *GetLineBrush( const SwTableBox *pBox,
SwWriteTableRow *pRow );
- USHORT GetLeftSpace( USHORT nCol ) const;
- USHORT GetRightSpace( USHORT nCol, USHORT nColSpan ) const;
+ sal_uInt16 GetLeftSpace( sal_uInt16 nCol ) const;
+ sal_uInt16 GetRightSpace( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
public:
- SwWriteTable( const SwTableLines& rLines, long nWidth, USHORT nBWidth,
- BOOL bRel, USHORT nMaxDepth = USHRT_MAX,
- USHORT nLeftSub=0, USHORT nRightSub=0, sal_uInt32 nNumOfRowsToRepeat=0 );
+ SwWriteTable( const SwTableLines& rLines, long nWidth, sal_uInt32 nBWidth,
+ sal_Bool bRel, sal_uInt16 nMaxDepth = USHRT_MAX,
+ sal_uInt16 nLeftSub=0, sal_uInt16 nRightSub=0, sal_uInt32 nNumOfRowsToRepeat=0 );
SwWriteTable( const SwHTMLTableLayout *pLayoutInfo );
virtual ~SwWriteTable();
diff --git a/sw/source/filter/makefile.mk b/sw/source/filter/makefile.mk
deleted file mode 100644
index c2b343eb8bc6..000000000000
--- a/sw/source/filter/makefile.mk
+++ /dev/null
@@ -1,67 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=sw
-TARGET=filter
-
-.IF "$(CALLTARGETS)"=="filter"
-RC_SUBDIRS=
-.ENDIF
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-
-SUBLIBS= \
- $(SLB)$/ascii.lib \
- $(SLB)$/basflt.lib \
- $(SLB)$/html.lib \
- $(SLB)$/writer.lib \
- $(SLB)$/ww1.lib \
- $(SLB)$/xml.lib
-
-# -----------------------------------------------------------
-
-
-################################################################
-
-LIB1TARGET=$(SLB)$/filter.lib
-LIB1FILES= \
- $(SUBLIBS)
-
-.INCLUDE : target.mk
-
-################################################################
-
-
diff --git a/sw/source/filter/rtf/makefile.mk b/sw/source/filter/rtf/makefile.mk
deleted file mode 100644
index 5b073faa2c1c..000000000000
--- a/sw/source/filter/rtf/makefile.mk
+++ /dev/null
@@ -1,60 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=rtf
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-MAKING_LIBMSWORD=TRUE
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(mydebug)" != ""
-CDEFS=$(CDEFS) -Dmydebug
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES= \
- $(SLO)$/rtffld.obj \
- $(SLO)$/rtffly.obj \
- $(SLO)$/rtfnum.obj \
- $(SLO)$/rtftbl.obj \
- $(SLO)$/swparrtf.obj
-
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/filter/rtf/rtffld.cxx b/sw/source/filter/rtf/rtffld.cxx
index c1c3ac14d3f4..e0e32329b1af 100644
--- a/sw/source/filter/rtf/rtffld.cxx
+++ b/sw/source/filter/rtf/rtffld.cxx
@@ -166,7 +166,7 @@ static RTF_FLD_TYPES _WhichFld( String& rName, String& rNext )
return RTFFLD_UNKNOWN; // nichts gefunden.
}
-static USHORT CheckNumberFmtStr( const String& rNStr )
+static sal_uInt16 CheckNumberFmtStr( const String& rNStr )
{
const static sal_Char* aNumberTypeTab[] =
{
@@ -183,12 +183,12 @@ static USHORT CheckNumberFmtStr( const String& rNStr )
OSL_ENSURE(sizeof(aNumberTypeTab) / sizeof(sal_Char *)
>= SVX_NUM_PAGEDESC - SVX_NUM_CHARS_UPPER_LETTER, "impossible");
- for (USHORT n = SVX_NUM_CHARS_UPPER_LETTER; n <= SVX_NUM_PAGEDESC; ++n)
+ for (sal_uInt16 n = SVX_NUM_CHARS_UPPER_LETTER; n <= SVX_NUM_PAGEDESC; ++n)
{
const sal_Char* pCmp = aNumberTypeTab[n - SVX_NUM_CHARS_UPPER_LETTER];
int nLen = *pCmp++;
if( rNStr.EqualsAscii( pCmp, 0, static_cast< xub_StrLen >(nLen) ))
- return static_cast< USHORT >(2 <= n ? n : (n + SVX_NUM_CHARS_UPPER_LETTER_N));
+ return static_cast< sal_uInt16 >(2 <= n ? n : (n + SVX_NUM_CHARS_UPPER_LETTER_N));
}
return SVX_NUM_PAGEDESC; // default-Wert
}
@@ -201,7 +201,7 @@ public:
RtfFieldSwitch( const String& rParam );
sal_Unicode GetSwitch( String& rParam );
- BOOL IsAtEnd() const { return nCurPos >= sParam.Len(); }
+ sal_Bool IsAtEnd() const { return nCurPos >= sParam.Len(); }
xub_StrLen GetCurPos() const { return nCurPos; }
void Erase( xub_StrLen nEndPos ) { sParam.Erase( 0, nEndPos ); }
void Insert( const String& rIns ) { sParam.Insert( rIns, 0 ); }
@@ -232,7 +232,7 @@ sal_Unicode RtfFieldSwitch::GetSwitch( String& rParam )
// dann alles in Hochkommatas oder bis zum naechsten // als
// Param returnen
- USHORT nOffset;
+ sal_uInt16 nOffset;
if( '"' != c && '\'' != c )
c = '\\', nOffset = 0;
else
@@ -290,7 +290,7 @@ void lcl_ScanEquationField( const String& rStr, RTF_EquationData& rData,
else if( 1 < nSubSupFlag )
nSubSupFlag = 0;
- BOOL bCheckBracket = FALSE;
+ sal_Bool bCheckBracket = sal_False;
switch( cKey )
{
case 0:
@@ -324,7 +324,7 @@ void lcl_ScanEquationField( const String& rStr, RTF_EquationData& rData,
2 == nSubSupFlag )
{
rData.nUp = sParam.Copy( 1 ).ToInt32();
- bCheckBracket = TRUE;
+ bCheckBracket = sal_True;
}
break;
@@ -333,12 +333,12 @@ void lcl_ScanEquationField( const String& rStr, RTF_EquationData& rData,
2 == nSubSupFlag )
{
rData.nDown = sParam.Copy( 1 ).ToInt32();
- bCheckBracket = TRUE;
+ bCheckBracket = sal_True;
}
break;
default:
- bCheckBracket = TRUE;
+ bCheckBracket = sal_True;
cKey = 0;
break;
}
@@ -486,11 +486,11 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
// and get the rtf filter to use it
SwField *pFld = 0;
short nNumFmtType = NUMBERFORMAT_UNDEFINED;
- ULONG nFmtIdx = NUMBERFORMAT_UNDEFINED;
+ sal_uLong nFmtIdx = NUMBERFORMAT_UNDEFINED;
- USHORT rLang(0);
+ sal_uInt16 rLang(0);
RES_CHRATR eLang = maPageDefaults.mbRTLdoc ? RES_CHRATR_CTL_LANGUAGE : RES_CHRATR_LANGUAGE;
- const SvxLanguageItem *pLang = (SvxLanguageItem*)&pDoc->GetAttrPool().GetDefaultItem( static_cast< USHORT >(eLang) );
+ const SvxLanguageItem *pLang = (SvxLanguageItem*)&pDoc->GetAttrPool().GetDefaultItem( static_cast< sal_uInt16 >(eLang) );
rLang = pLang ? pLang->GetValue() : LANGUAGE_ENGLISH_US;
SvNumberFormatter* pFormatter = pDoc->GetNumberFormatter();
@@ -531,7 +531,7 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
// werden:
// \\data -> Datenbank-Name als Field
// DATA -> Datenbank-Info
- BOOL bField = rFieldStr.GetChar( 0 ) != 'D';
+ sal_Bool bField = rFieldStr.GetChar( 0 ) != 'D';
// nur der Name interressiert
if( STRING_NOTFOUND != (nPos = aSaveStr.Search( '.' )) )
@@ -567,11 +567,11 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
// loesche fuehrende Blanks
if( IsNewGroup() )
GetAttrSet();
- SetNewGroup( TRUE );
+ SetNewGroup( sal_True );
SfxItemSet& rSet = GetAttrSet();
- BOOL bCharIns = FALSE;
+ sal_Bool bCharIns = sal_False;
RtfFieldSwitch aRFS( aSaveStr );
while( !aRFS.IsAtEnd() )
{
@@ -587,7 +587,7 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
if( nChar )
{
pDoc->InsertString( *pPam, nChar );
- bCharIns = TRUE;
+ bCharIns = sal_True;
}
}
break;
@@ -617,7 +617,7 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
case 's': case 'S':
// Fontsize setzen
{
- const USHORT nVal = (USHORT)(sParam.ToInt32() * 20);
+ const sal_uInt16 nVal = (sal_uInt16)(sParam.ToInt32() * 20);
rSet.Put( SvxFontHeightItem( nVal,
100, RES_CHRATR_FONTSIZE ));
}
@@ -626,7 +626,7 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
}
if( !IsNewGroup() ) AttrGroupEnd();
- SetNewGroup( FALSE );
+ SetNewGroup( sal_False );
SkipGroup(); // ueberlese den Rest
}
@@ -694,22 +694,22 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
if( !pCharFmt )
{
//Make a guess at which of asian of western we should be setting
- USHORT nScript;
+ sal_uInt16 nScript;
if (pBreakIt->GetBreakIter().is())
nScript = pBreakIt->GetBreakIter()->getScriptType( aData.sUp, 0);
else
nScript = i18n::ScriptType::ASIAN;
- USHORT nFntHWhich = GetWhichOfScript( RES_CHRATR_FONTSIZE, nScript ),
+ sal_uInt16 nFntHWhich = GetWhichOfScript( RES_CHRATR_FONTSIZE, nScript ),
nFntWhich = GetWhichOfScript( RES_CHRATR_FONT, nScript );
//Check to see if we already have a ruby charstyle that this fits
- for(USHORT i=0; i < aRubyCharFmts.Count(); ++i )
+ for(sal_uInt16 i=0; i < aRubyCharFmts.Count(); ++i )
{
SwCharFmt *pFmt = (SwCharFmt *)aRubyCharFmts[i];
const SvxFontHeightItem &rF = (const SvxFontHeightItem &)
pFmt->GetFmtAttr( nFntHWhich );
- if( rF.GetHeight() == USHORT(aData.nFontSize * 10 ))
+ if( rF.GetHeight() == sal_uInt16(aData.nFontSize * 10 ))
{
const SvxFontItem &rFI = (const SvxFontItem &)
pFmt->GetFmtAttr( nFntWhich );
@@ -747,7 +747,7 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
//Set the charstyle and justification
aRuby.SetCharFmtName( pCharFmt->GetName() );
aRuby.SetCharFmtId( pCharFmt->GetPoolFmtId() );
- aRuby.SetAdjustment( (USHORT)aData.nJustificationCode );
+ aRuby.SetAdjustment( (sal_uInt16)aData.nJustificationCode );
// im FieldStr steht der anzuzeigenden Text, im
pDoc->InsertString( *pPam, aData.sText );
@@ -886,7 +886,7 @@ void SwRTFParser::ReadXEField()
bReadSwFly = false; //#it may be that any uses of this need to be removed and replaced
int nNumOpenBrakets = 1;
String sFieldStr;
- BYTE cCh;
+ sal_uInt8 cCh;
int nToken;
while (nNumOpenBrakets && IsParserWorking())
@@ -910,7 +910,7 @@ void SwRTFParser::ReadXEField()
if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_HIDDEN, sal_True, &pItem ) )
{
SvxCharHiddenItem aCharHidden(*(SvxCharHiddenItem*)pItem);
- aCharHidden.SetValue(FALSE);
+ aCharHidden.SetValue(sal_False);
rSet.Put(aCharHidden);
}
@@ -994,9 +994,9 @@ void SwRTFParser::ReadField()
bReadSwFly = false; //#it may be that any uses of this need to be removed and replaced
int nRet = 0;
int nNumOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
- int bFldInst = FALSE, bFldRslt = FALSE;
+ int bFldInst = sal_False, bFldRslt = sal_False;
String sFieldStr, sFieldNm;
- BYTE cCh;
+ sal_uInt8 cCh;
int nToken;
while (nNumOpenBrakets && IsParserWorking())
@@ -1128,11 +1128,11 @@ void SwRTFParser::ReadField()
break;
case RTF_FLDINST:
- bFldInst = TRUE;
+ bFldInst = sal_True;
break;
case RTF_FLDRSLT:
- bFldRslt = TRUE;
+ bFldRslt = sal_True;
break;
case RTF_U:
diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx
index 1c27c844884d..3d2adf049cdf 100644
--- a/sw/source/filter/rtf/rtffly.cxx
+++ b/sw/source/filter/rtf/rtffly.cxx
@@ -76,11 +76,11 @@ using namespace ::com::sun::star;
#define ANCHOR(p) ((SwFmtAnchor*)p)
// steht in shellio.hxx
-extern SwCntntNode* GoNextNds( SwNodeIndex * pIdx, BOOL bChk );
+extern SwCntntNode* GoNextNds( SwNodeIndex * pIdx, sal_Bool bChk );
SV_IMPL_PTRARR( SwFlySaveArr, SwFlySave* )
-inline const SwFmtFrmSize GetFrmSize(const SfxItemSet& rSet, BOOL bInP=TRUE)
+inline const SwFmtFrmSize GetFrmSize(const SfxItemSet& rSet, sal_Bool bInP=sal_True)
{
return (const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE,bInP);
}
@@ -94,29 +94,29 @@ SwFlySave::SwFlySave(const SwPaM& rPam, SfxItemSet& rSet)
int SwFlySave::IsEqualFly( const SwPaM& rPos, SfxItemSet& rSet )
{
if( rSet.Count() != aFlySet.Count() || nDropAnchor )
- return FALSE;
+ return sal_False;
// nur TextNodes zusammenfassen
if( nSttNd == nEndNd && nEndNd.GetNode().IsNoTxtNode() )
- return FALSE;
+ return sal_False;
// teste auf gleiche / naechste Position
if( rPos.GetPoint()->nNode.GetIndex() == nEndNd.GetIndex() )
{
if( 1 < (rPos.GetPoint()->nContent.GetIndex() - nEndCnt) )
- return FALSE;
+ return sal_False;
}
else if( rPos.GetPoint()->nContent.GetIndex() )
- return FALSE;
+ return sal_False;
else
{
SwNodeIndex aIdx( nEndNd );
- SwCntntNode* pCNd = rPos.GetDoc()->GetNodes()[ aIdx ]->GetCntntNode();
- if( !GoNextNds( &aIdx, TRUE ) ||
+ SwCntntNode *const pCNd = aIdx.GetNode().GetCntntNode();
+ if( !GoNextNds( &aIdx, sal_True ) ||
aIdx.GetIndex() != rPos.GetPoint()->nNode.GetIndex() ||
( pCNd && pCNd->Len() != nEndCnt ))
{
- return FALSE;
+ return sal_False;
}
}
@@ -124,23 +124,23 @@ int SwFlySave::IsEqualFly( const SwPaM& rPos, SfxItemSet& rSet )
{
SfxItemIter aIter( rSet );
const SfxPoolItem *pItem, *pCurr = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
if( SFX_ITEM_SET != aFlySet.GetItemState( pCurr->Which(),
- FALSE, &pItem ) ||
+ sal_False, &pItem ) ||
// Ankerattribute gesondert behandeln
( RES_ANCHOR == pCurr->Which()
? (ANCHOR(pCurr)->GetAnchorId() != ANCHOR(pItem)->GetAnchorId() ||
ANCHOR(pCurr)->GetPageNum() != ANCHOR(pItem)->GetPageNum())
: *pItem != *pCurr ))
- return FALSE;
+ return sal_False;
if( aIter.IsAtEnd() )
break;
pCurr = aIter.NextItem();
}
}
- return TRUE;
+ return sal_True;
}
void SwFlySave::SetFlySize( const SwTableNode& rTblNd )
@@ -153,17 +153,17 @@ void SwFlySave::SetFlySize( const SwTableNode& rTblNd )
aFlySet.Put( SwFmtFrmSize( rSz.GetHeightSizeType(), nWidth, rSz.GetHeight() ));
}
-BOOL lcl_HasBreakAttrs( const SwCntntNode& rNd )
+sal_Bool lcl_HasBreakAttrs( const SwCntntNode& rNd )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SfxItemSet& rSet = rNd.GetSwAttrSet();
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BREAK, TRUE, &pItem ) &&
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_BREAK, sal_True, &pItem ) &&
SVX_BREAK_NONE != ((SvxFmtBreakItem*)pItem)->GetBreak() )
- bRet = TRUE;
- else if( SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC, TRUE, &pItem )&&
+ bRet = sal_True;
+ else if( SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC, sal_True, &pItem )&&
0 != ((SwFmtPageDesc*)pItem)->GetPageDesc() )
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
@@ -177,11 +177,11 @@ void lcl_CpyBreakAttrs( SwCntntNode* pSrcNd, SwCntntNode* pDstNd,
const SfxPoolItem *pDescItem, *pBreakItem;
if( SFX_ITEM_SET != pSet->GetItemState( RES_BREAK,
- FALSE, &pBreakItem ) )
+ sal_False, &pBreakItem ) )
pBreakItem = 0;
if( SFX_ITEM_SET != pSet->GetItemState( RES_PAGEDESC,
- FALSE, &pDescItem ) )
+ sal_False, &pDescItem ) )
pDescItem = 0;
if( pDescItem || pBreakItem )
@@ -229,7 +229,7 @@ void SwRTFParser::SetFlysInDoc()
rtfFmtMap aPrevFmts;
SwFrmFmt* pParent = pDoc->GetFrmFmtFromPool( RES_POOLFRM_FRAME );
- for( USHORT n = 0; n < aFlyArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aFlyArr.Count(); ++n )
{
SwFlySave* pFlySave = aFlyArr[ n ];
@@ -251,10 +251,10 @@ void SwRTFParser::SetFlysInDoc()
pSttNd->GetIndex() + 1 == pEndNd->GetIndex()
&& pSttNd->GetTxt().Len()>0 /* #i38227# leave drop caps with no content as fly frames */ )
{
- ULONG nPos = pSttNd->GetIndex();
+ sal_uLong nPos = pSttNd->GetIndex();
SwDoc * pDoc1 = pSttNd->GetDoc();
- BOOL bJoined;
+ sal_Bool bJoined;
{
SwPaM aTmp( *pSttNd, pSttNd->GetTxt().Len(), *pEndNd, 0 );
bJoined = pDoc1->DeleteAndJoin( aTmp );
@@ -265,7 +265,7 @@ void SwRTFParser::SetFlysInDoc()
if( bJoined && pNd != NULL)
{
SwFmtDrop aDropCap;
- aDropCap.GetLines() = (BYTE)pFlySave->nDropLines;
+ aDropCap.GetLines() = (sal_uInt8)pFlySave->nDropLines;
aDropCap.GetChars() = 1;
SwIndex aIdx( pEndNd );
@@ -282,7 +282,7 @@ void SwRTFParser::SetFlysInDoc()
if( n + 1 < aFlyArr.Count() && pFlySave->nEndCnt &&
pFlySave->nEndNd == aFlyArr[ n + 1 ]->nSttNd )
{
- SwCntntNode* pCNd = rNds[ pFlySave->nEndNd ]->GetCntntNode();
+ SwCntntNode *const pCNd = pFlySave->nEndNd.GetNode().GetCntntNode();
if( pCNd )
{
SwPosition aPos( pFlySave->nEndNd,
@@ -308,7 +308,7 @@ void SwRTFParser::SetFlysInDoc()
// die Size muss noch korrigiert werden!
nAktPageDesc = 0; // Standart PageDesc
if( SFX_ITEM_SET != pFlySave->aFlySet.GetItemState(
- RES_FRM_SIZE, FALSE ) )
+ RES_FRM_SIZE, sal_False ) )
_SetPictureSize( *(SwNoTxtNode*)pNd, aRg.aStart,
pFlySave->aFlySet );
if( 0 != ( pNd = pNd->FindTableNode() ) )
@@ -324,7 +324,7 @@ void SwRTFParser::SetFlysInDoc()
if( bMakeEmptySection )
{
pNd = &aRg.aEnd.GetNode();
- ULONG nSectEnd = pNd->EndOfSectionIndex()+1;
+ sal_uLong nSectEnd = pNd->EndOfSectionIndex()+1;
if (!pNd->IsTableNode() && 0 !=(pNd = pNd->FindTableNode())
&& (pNd->GetIndex() >= aRg.aStart.GetNode().GetIndex()) )
@@ -346,7 +346,7 @@ void SwRTFParser::SetFlysInDoc()
else
{
// Tabelle ist noch groesser, also splitte sie hier.
- rNds.SplitTable( aRg.aEnd, TRUE );
+ rNds.SplitTable( aRg.aEnd, sal_True );
aRg.aEnd = pNd->EndOfSectionIndex() + 1;
}
}
@@ -413,7 +413,7 @@ void SwRTFParser::SetFlysInDoc()
SwCntntNode* pSrcNd = pDoc->GetNodes()[ pSttNd->GetIndex() + 1 ]->GetCntntNode();
SfxItemSet aTmpSet( pDoc->GetAttrPool(),
RES_BACKGROUND, RES_BOX );
- const SvxBrushItem* pBackgroundBrush = (const SvxBrushItem*)pFlySave->aFlySet.GetItem(RES_BACKGROUND, FALSE);
+ const SvxBrushItem* pBackgroundBrush = (const SvxBrushItem*)pFlySave->aFlySet.GetItem(RES_BACKGROUND, sal_False);
if( pSrcNd && pSrcNd->HasSwAttrSet() )
aTmpSet.Put( *pSrcNd->GetpSwAttrSet() );
if (pBackgroundBrush)
@@ -422,7 +422,7 @@ void SwRTFParser::SetFlysInDoc()
}
else
{
- pBackgroundBrush = (const SvxBrushItem*)aTmpSet.GetItem(RES_BACKGROUND, FALSE);
+ pBackgroundBrush = (const SvxBrushItem*)aTmpSet.GetItem(RES_BACKGROUND, sal_False);
if (pBackgroundBrush)
{
Color& rBackgroundColor = const_cast<SvxBrushItem*>(pBackgroundBrush)->GetColor();
@@ -561,11 +561,11 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
SvxFrameDirectionItem aFrmDir( FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR );
- USHORT nCols = USHRT_MAX, nColSpace = USHRT_MAX, nAktCol = 0;
+ sal_uInt16 nCols = USHRT_MAX, nColSpace = USHRT_MAX, nAktCol = 0;
SvUShorts aColumns;
- BOOL bChkDropCap = 0 == pSet;
- USHORT nDropCapLines = 0, nDropCapAnchor = 0;
+ sal_Bool bChkDropCap = 0 == pSet;
+ sal_uInt16 nDropCapLines = 0, nDropCapAnchor = 0;
int nNumOpenBrakets = GetOpenBrakets();
if( !pSet )
@@ -581,10 +581,10 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
}
// dann sammel mal alle Attribute zusammen
- int bWeiter = TRUE;
+ int bWeiter = sal_True;
int nAppliedProps=0;
do {
- USHORT nVal = USHORT(nTokenValue);
+ sal_uInt16 nVal = sal_uInt16(nTokenValue);
/*
#i5263#
Assume that a property genuinely contributes towards creating a frame,
@@ -597,7 +597,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
{
SwFmtFrmSize aSz( ATT_MIN_SIZE, nTokenValue, 0 );
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_FRM_SIZE, TRUE,
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_FRM_SIZE, sal_True,
&pItem ))
{
aSz.SetHeightSizeType( ((SwFmtFrmSize*)pItem)->GetHeightSizeType() );
@@ -611,7 +611,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
{
SwFmtFrmSize aSz( ATT_MIN_SIZE, 0, MINFLY );
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_FRM_SIZE, TRUE,
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_FRM_SIZE, sal_True,
&pItem ))
{
aSz.SetWidth( ((SwFmtFrmSize*)pItem)->GetWidth() );
@@ -665,10 +665,10 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
break;
case RTF_POSXC: aHori.SetHoriOrient( text::HoriOrientation::CENTER ); break;
case RTF_POSXI: aHori.SetHoriOrient( text::HoriOrientation::LEFT );
- aHori.SetPosToggle( TRUE );
+ aHori.SetPosToggle( sal_True );
break;
case RTF_POSXO: aHori.SetHoriOrient( text::HoriOrientation::RIGHT );
- aHori.SetPosToggle( TRUE );
+ aHori.SetPosToggle( sal_True );
break;
case RTF_POSXL: aHori.SetHoriOrient( text::HoriOrientation::LEFT ); break;
case RTF_POSXR: aHori.SetHoriOrient( text::HoriOrientation::RIGHT ); break;
@@ -714,7 +714,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
case RTF_DROPCAPLI: // Dropcaps !!
if( bChkDropCap )
{
- nDropCapLines = USHORT( nTokenValue );
+ nDropCapLines = sal_uInt16( nTokenValue );
if( !nDropCapAnchor )
nDropCapAnchor = 1;
}
@@ -722,7 +722,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
case RTF_DROPCAPT:
if( bChkDropCap )
{
- nDropCapAnchor = USHORT( nTokenValue );
+ nDropCapAnchor = sal_uInt16( nTokenValue );
if( !nDropCapLines )
nDropCapLines = 3;
}
@@ -731,15 +731,15 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
// fuer die "alten" Writer - haben die Spaltigkeit falsch heraus-
// geschrieben
- case RTF_COLS: nCols = USHORT( nTokenValue ); break;
- case RTF_COLSX: nColSpace = USHORT( nTokenValue ); break;
+ case RTF_COLS: nCols = sal_uInt16( nTokenValue ); break;
+ case RTF_COLSX: nColSpace = sal_uInt16( nTokenValue ); break;
case RTF_COLNO:
- nAktCol = USHORT( nTokenValue );
+ nAktCol = sal_uInt16( nTokenValue );
if( RTF_COLW == GetNextToken() )
{
- USHORT nWidth = USHORT( nTokenValue ), nSpace = 0;
+ sal_uInt16 nWidth = sal_uInt16( nTokenValue ), nSpace = 0;
if( RTF_COLSR == GetNextToken() )
- nSpace = USHORT( nTokenValue );
+ nSpace = sal_uInt16( nTokenValue );
else
SkipToken( -1 ); // wieder zurueck
@@ -773,24 +773,24 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
nCols = USHRT_MAX; // neu aufsetzen
nColSpace = USHRT_MAX;
do {
- nVal = USHORT(nTokenValue);
+ nVal = sal_uInt16(nTokenValue);
switch( nToken )
{
// Swg-Frame-Tokens
case RTF_FLYPRINT:
{
- pSet->Put( SvxPrintItem( RES_PRINT, FALSE ));
+ pSet->Put( SvxPrintItem( RES_PRINT, sal_False ));
}
break;
case RTF_FLYOPAQUE:
{
- pSet->Put( SvxOpaqueItem( RES_OPAQUE, FALSE ));
+ pSet->Put( SvxOpaqueItem( RES_OPAQUE, sal_False ));
}
break;
case RTF_FLYPRTCTD:
{
- RTFProtect aP( (BYTE)nTokenValue );
+ RTFProtect aP( (sal_uInt8)nTokenValue );
SvxProtectItem aProtectItem( RES_PROTECT );
aProtectItem.SetCntntProtect( aP.GetCntnt() );
aProtectItem.SetSizeProtect( aP.GetSize() );
@@ -801,7 +801,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
case RTF_FLYMAINCNT:
{
- RTFSurround aMC( (BYTE)nTokenValue );
+ RTFSurround aMC( (sal_uInt8)nTokenValue );
SwFmtSurround aSurr( (SwSurround)aMC.GetOrder());
if( aMC.GetGoldCut() )
aSurr.SetSurround( SURROUND_IDEAL );
@@ -831,7 +831,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
{
case RTF_FLY_PAGE:
aAnchor.SetType( FLY_AT_PAGE );
- aAnchor.SetPageNum( USHORT(nTokenValue));
+ aAnchor.SetPageNum( sal_uInt16(nTokenValue));
aAnchor.SetAnchor( 0 );
break;
@@ -849,15 +849,15 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
// case RTF_FLY_COLUMN:
}
break;
- case RTF_COLS: nCols = USHORT( nTokenValue ); break;
- case RTF_COLSX: nColSpace = USHORT( nTokenValue ); break;
+ case RTF_COLS: nCols = sal_uInt16( nTokenValue ); break;
+ case RTF_COLSX: nColSpace = sal_uInt16( nTokenValue ); break;
case RTF_COLNO:
- nAktCol = USHORT( nTokenValue );
+ nAktCol = sal_uInt16( nTokenValue );
if( RTF_COLW == GetNextToken() )
{
- USHORT nWidth = USHORT( nTokenValue ), nSpace = 0;
+ sal_uInt16 nWidth = sal_uInt16( nTokenValue ), nSpace = 0;
if( RTF_COLSR == GetNextToken() )
- nSpace = USHORT( nTokenValue );
+ nSpace = sal_uInt16( nTokenValue );
else
SkipToken( -1 ); // wieder zurueck
@@ -876,20 +876,20 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
ReadBackgroundAttr( nToken, aSet );
else if( RTF_IGNOREFLAG == nToken )
{
- int bSkipGrp = TRUE;
+ int bSkipGrp = sal_True;
switch( nToken = GetNextToken() )
{
case RTF_SHADOW:
case RTF_BRDBOX:
ReadAttr( SkipToken( -2 ), &aSet );
- bSkipGrp = FALSE;
+ bSkipGrp = sal_False;
break;
case RTF_BRDRT:
case RTF_BRDRB:
case RTF_BRDRR:
case RTF_BRDRL:
- bSkipGrp = FALSE;
+ bSkipGrp = sal_False;
ReadBorderAttr( SkipToken( -2 ), aSet );
break;
}
@@ -927,14 +927,14 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
if( nSkip )
{
nToken = SkipToken( nSkip );
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
break;
default:
--nAppliedProps; //Not sufficient to make a frame
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
if( bWeiter )
@@ -951,7 +951,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ));
// <--
- SwFmtFollowTextFlow aFollowTextFlow( FALSE );
+ SwFmtFollowTextFlow aFollowTextFlow( sal_False );
pSet->Put( aFollowTextFlow );
if( !( aFrmDir == pSet->Get( RES_FRAMEDIR )) )
@@ -963,17 +963,17 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
if( USHRT_MAX == nColSpace )
nColSpace = 720;
- ULONG nWidth = USHRT_MAX;
- aCol.Init( nCols, nColSpace, USHORT( nWidth ) );
+ sal_uLong nWidth = USHRT_MAX;
+ aCol.Init( nCols, nColSpace, sal_uInt16( nWidth ) );
if( nCols == ( aColumns.Count() / 2 ) )
{
- for( USHORT n = 0, i = 0; n < aColumns.Count(); n += 2, ++i )
+ for( sal_uInt16 n = 0, i = 0; n < aColumns.Count(); n += 2, ++i )
{
SwColumn* pCol = aCol.GetColumns()[ i ];
- ULONG nTmp = aColumns[ n ];
+ sal_uLong nTmp = aColumns[ n ];
nTmp *= USHRT_MAX;
nTmp /= nWidth;
- pCol->SetWishWidth( USHORT(nTmp) );
+ pCol->SetWishWidth( sal_uInt16(nTmp) );
}
}
pSet->Put( aCol );
@@ -985,7 +985,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
// ein neues FlyFormat anlegen oder das alte benutzen ?
// (teste ob es die selben Attribute besitzt!)
SwFlySave* pFlySave = 0;
- USHORT nFlyArrCnt = aFlyArr.Count();
+ sal_uInt16 nFlyArrCnt = aFlyArr.Count();
/*
#i5263#
There were not enough frame properties found to actually justify creating
@@ -1019,7 +1019,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
}
}
- SetPardTokenRead( FALSE );
+ SetPardTokenRead( sal_False );
const SwTableNode* pTblNd = pPam->GetNode()->FindTableNode();
while( !IsPardTokenRead() && IsParserWorking() )
@@ -1034,7 +1034,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
// Added support for transparent frames.
if (nToken == RTF_CBPAT && nFlyArrCnt > 0)
{
- USHORT _index=USHORT(nTokenValue);
+ sal_uInt16 _index=sal_uInt16(nTokenValue);
const Color& rColor = GetColor(_index);
SvxBrushItem aBrush(rColor, RES_BACKGROUND);
SwFlySave* pFS = aFlyArr[nFlyArrCnt-1];
@@ -1101,7 +1101,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
}
else
{
- BOOL bMovePaM = 0 != pTblNd;
+ sal_Bool bMovePaM = 0 != pTblNd;
pFlySave->nEndNd = pPam->GetPoint()->nNode;
pFlySave->nEndCnt = pPam->GetPoint()->nContent.GetIndex();
@@ -1179,15 +1179,15 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
aDiffs.Differentiate( pFlySave->aFlySet );
pFlySave->aFlySet.Put( aDiffs );
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
if( aSz1.GetHeight() && !aSz2.GetHeight() )
{
- bSet = TRUE;
+ bSet = sal_True;
aSz2.SetHeight( aSz1.GetHeight() );
}
if( aSz1.GetWidth() && !aSz2.GetWidth() )
{
- bSet = TRUE;
+ bSet = sal_True;
aSz2.SetWidth( aSz1.GetWidth() );
}
if( bSet )
@@ -1264,7 +1264,7 @@ void SwRTFParser::InsPicture( const String& rGrfNm, const Graphic* pGrf,
if (pDoc->IsInHeaderFooter(pPos->nNode))
{
- SvxOpaqueItem aOpaqueItem(RES_OPAQUE, FALSE);
+ SvxOpaqueItem aOpaqueItem(RES_OPAQUE, sal_False);
SwFmtSurround aSurroundItem(SURROUND_THROUGHT);
aFlySet.Put(aOpaqueItem);
aFlySet.Put(aSurroundItem);
@@ -1351,7 +1351,7 @@ void SwRTFParser::_SetPictureSize( const SwNoTxtNode& rNd,
}
//steht der Fly etwa in einer Tabelle ?
- const SwNode* pAnchorNd = pDoc->GetNodes()[ rAnchor ];
+ const SwNode* pAnchorNd = & rAnchor.GetNode();
const SwTableNode* pTblNd = pAnchorNd->FindTableNode();
if( pTblNd )
{
@@ -1370,7 +1370,7 @@ void SwRTFParser::_SetPictureSize( const SwNoTxtNode& rNd,
SwGrfNode* pGrfNd;
if( !aSize.Width() && !aSize.Height() &&
0 != (pGrfNd = (SwGrfNode*)rNd.GetGrfNode() ) && pGrfNd->IsGrfLink() )
- pGrfNd->SetChgTwipSize( TRUE );
+ pGrfNd->SetChgTwipSize( sal_True );
// min. Werte einhalten !!
if( aSize.Width() < MINFLY )
@@ -1380,28 +1380,28 @@ void SwRTFParser::_SetPictureSize( const SwNoTxtNode& rNd,
if( pPicType )
{
- BOOL bChg = FALSE;
+ sal_Bool bChg = sal_False;
SwCropGrf aCrop;
if( pPicType->nCropT )
{
aCrop.SetTop( pPicType->nCropT );
- bChg = TRUE;
+ bChg = sal_True;
}
if( pPicType->nCropB )
{
aCrop.SetBottom( pPicType->nCropB );
- bChg = TRUE;
+ bChg = sal_True;
}
if( pPicType->nCropL )
{
aCrop.SetLeft( pPicType->nCropL );
- bChg = TRUE;
+ bChg = sal_True;
}
if( pPicType->nCropR )
{
aCrop.SetRight( pPicType->nCropR );
- bChg = TRUE;
+ bChg = sal_True;
}
if( bChg )
@@ -1451,7 +1451,7 @@ void SwRTFParser::ReadOLEData()
Graphic aGrf;
SvxRTFPictureType aPicType, aOleType;
- int nToken, bValidOle = TRUE, bWeiter = TRUE;
+ int nToken, bValidOle = sal_True, bWeiter = sal_True;
int nOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
String* pStr = 0;
@@ -1460,7 +1460,7 @@ void SwRTFParser::ReadOLEData()
while( nOpenBrakets && IsParserWorking() && bWeiter && bValidOle )
{
nToken = GetNextToken();
- USHORT nVal = USHORT( nTokenValue );
+ sal_uInt16 nVal = sal_uInt16( nTokenValue );
switch( nToken )
{
case '}': --nOpenBrakets; pStr = 0; break;
@@ -1504,7 +1504,7 @@ void SwRTFParser::ReadOLEData()
case RTF_OBJHTML:
case RTF_OBJALIAS:
case RTF_OBJSECT:
- bValidOle = FALSE; // diese Typen koennen wir nicht
+ bValidOle = sal_False; // diese Typen koennen wir nicht
break;
case RTF_OBJCLASS:
@@ -1524,7 +1524,7 @@ void SwRTFParser::ReadOLEData()
case RTF_RESULT:
{
// hier weitermachen, wenn das OLE-Object ungueltig ist
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
break;
case RTF_RSLTBMP: // diese sollten wir ignorieren
@@ -1550,7 +1550,7 @@ void SwRTFParser::ReadOLEData()
{
xub_StrLen nHexLen = HexToBin( aToken );
if( STRING_NOTFOUND != nHexLen )
- bValidOle = FALSE;
+ bValidOle = sal_False;
else
{
aTmpFile.Write( (sal_Char*)aToken.GetBuffer(), nHexLen );
@@ -1566,7 +1566,7 @@ void SwRTFParser::ReadOLEData()
if( bValidOle )
{
- bValidOle = FALSE; // erstmal
+ bValidOle = sal_False; // erstmal
}
if( !bWeiter ) // dann stehen wir noch im Result
@@ -1577,7 +1577,7 @@ void SwRTFParser::ReadOLEData()
// ansonsten alle Token verarbeiten, bis zur letzten
// schliessenden Klammer
- bWeiter = TRUE;
+ bWeiter = sal_True;
while( nOpenBrakets && IsParserWorking() && bWeiter )
{
switch( nToken = GetNextToken() )
diff --git a/sw/source/filter/rtf/rtfnum.cxx b/sw/source/filter/rtf/rtfnum.cxx
index ab935979b08c..5552ed7c5cb5 100644
--- a/sw/source/filter/rtf/rtfnum.cxx
+++ b/sw/source/filter/rtf/rtfnum.cxx
@@ -35,13 +35,10 @@
#define RTF_NUMRULE_NAME "RTF_Num"
-SV_IMPL_VARARR( SwListArr, SwListEntry )
-
-
void lcl_ExpandNumFmts( SwNumRule& rRule )
{
// dann noch das NumFormat in alle Ebenen setzen
- for( BYTE n = 1; n < MAXLEVEL; ++n )
+ for( sal_uInt8 n = 1; n < MAXLEVEL; ++n )
if( !rRule.GetNumFmt( n ) )
{
SwNumFmt aNumFmt( rRule.Get( 0 ));
@@ -50,7 +47,7 @@ void lcl_ExpandNumFmts( SwNumRule& rRule )
}
}
-SfxItemSet& GetNumChrFmt( SwDoc& rDoc, SwNumRule& rRule, BYTE nNumLvl )
+SfxItemSet& GetNumChrFmt( SwDoc& rDoc, SwNumRule& rRule, sal_uInt8 nNumLvl )
{
SwCharFmt* pChrFmt = rRule.Get( nNumLvl ).GetCharFmt();
if( !pChrFmt )
@@ -65,7 +62,7 @@ SfxItemSet& GetNumChrFmt( SwDoc& rDoc, SwNumRule& rRule, BYTE nNumLvl )
return (SfxItemSet&)pChrFmt->GetAttrSet();
}
-void SwRTFParser::ReadListLevel( SwNumRule& rRule, BYTE nNumLvl )
+void SwRTFParser::ReadListLevel( SwNumRule& rRule, sal_uInt8 nNumLvl )
{
int nToken;
int nNumOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
@@ -94,7 +91,7 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, BYTE nNumLvl )
{
if( DelCharAtEnd( sLvlText, ';' ).Len() &&
sLvlText.Len() && sLvlText.Len() ==
- (USHORT)(sLvlText.GetChar( 0 )) + 1 )
+ (sal_uInt16)(sLvlText.GetChar( 0 )) + 1 )
sLvlText.Erase( 0, 1 );
nLvlTxtLevel = 0;
}
@@ -160,7 +157,7 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, BYTE nNumLvl )
case RTF_LEVELSTARTAT:
if( pCurNumFmt && -1 != nTokenValue )
- pCurNumFmt->SetStart( USHORT( nTokenValue ));
+ pCurNumFmt->SetStart( sal_uInt16( nTokenValue ));
break;
case RTF_LEVELTEXT:
@@ -230,7 +227,7 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, BYTE nNumLvl )
// values on the numrule format
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == aSet.GetItemState( RES_LR_SPACE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
const SvxLRSpaceItem& rLR = *(SvxLRSpaceItem*)pItem;
pCurNumFmt->SetListtabPos( rLR.GetTxtLeft( ) );
@@ -264,11 +261,11 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, BYTE nNumLvl )
// in sLvlText steht der Text, in sLvlNumber die Position
// der Ebenen in sLvlText
pCurNumFmt->SetPrefix(
- sLvlText.Copy( 0, USHORT( sLvlNumber.GetChar( 0 ))-1 ));
+ sLvlText.Copy( 0, sal_uInt16( sLvlNumber.GetChar( 0 ))-1 ));
pCurNumFmt->SetSuffix( sLvlText.Copy(
- USHORT( sLvlNumber.GetChar( sLvlNumber.Len()-1 )) ));
+ sal_uInt16( sLvlNumber.GetChar( sLvlNumber.Len()-1 )) ));
// wieviele Levels stehen im String?
- pCurNumFmt->SetIncludeUpperLevels( (BYTE)sLvlNumber.Len() );
+ pCurNumFmt->SetIncludeUpperLevels( (sal_uInt8)sLvlNumber.Len() );
}
else
{
@@ -292,9 +289,9 @@ void SwRTFParser::ReadListTable()
{
int nToken;
int nNumOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
- bNewNumList = TRUE;
+ bNewNumList = sal_True;
- BYTE nNumLvl = 0;
+ sal_uInt8 nNumLvl = 0;
SwNumRule* pCurRule = 0;
SwListEntry aEntry;
@@ -310,7 +307,7 @@ void SwRTFParser::ReadListTable()
if( 1 == nNumOpenBrakets )
{
if( aEntry.nListId )
- aListArr.Insert( aEntry, aListArr.Count() );
+ aListArr.push_back( aEntry );
aEntry.Clear();
}
}
@@ -344,14 +341,14 @@ void SwRTFParser::ReadListTable()
String sTmp( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( RTF_NUMRULE_NAME " 1" )));
- aEntry.nListDocPos = pDoc->MakeNumRule( sTmp, 0, FALSE, SvxNumberFormat::LABEL_ALIGNMENT );
+ aEntry.nListDocPos = pDoc->MakeNumRule( sTmp, 0, sal_False, SvxNumberFormat::LABEL_ALIGNMENT );
pCurRule = pDoc->GetNumRuleTbl()[ aEntry.nListDocPos ];
// #i91400#
- pCurRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, FALSE ),
+ pCurRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, sal_False ),
*pDoc );
- pCurRule->SetAutoRule( FALSE );
- nNumLvl = (BYTE)-1;
+ pCurRule->SetAutoRule( sal_False );
+ nNumLvl = (sal_uInt8)-1;
}
break;
@@ -375,7 +372,7 @@ void SwRTFParser::ReadListTable()
break;
case RTF_LISTSIMPLE:
- pCurRule->SetContinusNum( TRUE );
+ pCurRule->SetContinusNum( sal_True );
break;
case RTF_LISTLEVEL:
@@ -394,16 +391,16 @@ void SwRTFParser::ReadListTable()
SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet
}
-BOOL lcl_IsEqual( SwNumRule* pOrigRule, SwNumRule* pRule )
+sal_Bool lcl_IsEqual( SwNumRule* pOrigRule, SwNumRule* pRule )
{
- BOOL bRet = 0;
+ sal_Bool bRet = 0;
if( pOrigRule && pRule )
{
bRet = pOrigRule->GetRuleType() == pRule->GetRuleType() &&
pOrigRule->IsContinusNum() == pRule->IsContinusNum() &&
pOrigRule->IsAbsSpaces() == pRule->IsAbsSpaces();
if( bRet )
- for( BYTE n = 0; bRet && n < MAXLEVEL; ++n )
+ for( sal_uInt8 n = 0; bRet && n < MAXLEVEL; ++n )
{
const SwNumFmt* pOFmt = pOrigRule->GetNumFmt( n ),
* pFmt = pRule->GetNumFmt( n );
@@ -439,8 +436,8 @@ void SwRTFParser::ReadListOverrideTable()
int nNumOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
SwListEntry aEntry;
SwNumRule* pRule = 0, *pOrigRule = 0;
- BYTE nNumLvl = 0;
- BOOL bOverrideFormat = FALSE, bOverrideStart = FALSE;
+ sal_uInt8 nNumLvl = 0;
+ sal_Bool bOverrideFormat = sal_False, bOverrideStart = sal_False;
while( nNumOpenBrakets && IsParserWorking() )
{
@@ -455,7 +452,7 @@ void SwRTFParser::ReadListOverrideTable()
if( 1 == nNumOpenBrakets )
{
- bOverrideFormat = FALSE, bOverrideStart = FALSE;
+ bOverrideFormat = sal_False, bOverrideStart = sal_False;
if( pRule )
{
if( lcl_IsEqual( pOrigRule, pRule ))
@@ -473,7 +470,7 @@ void SwRTFParser::ReadListOverrideTable()
if( aEntry.nListId && aEntry.nListNo )
{
int nMatch=-1;
- for( USHORT n = aListArr.Count(); n; )
+ for( size_t n = aListArr.size(); n; )
{
if( aListArr[ --n ].nListId == aEntry.nListId)
{
@@ -483,7 +480,7 @@ void SwRTFParser::ReadListOverrideTable()
}
if(nMatch>=0)
{
- USHORT nMatch2 = static_cast< USHORT >(nMatch);
+ sal_uInt16 nMatch2 = static_cast< sal_uInt16 >(nMatch);
if (!aListArr[nMatch2].nListNo )
{
aListArr[nMatch2].nListNo = aEntry.nListNo;
@@ -492,7 +489,7 @@ void SwRTFParser::ReadListOverrideTable()
{
aEntry.nListDocPos=aListArr[nMatch2].nListDocPos;
aEntry.nListTemplateId=aListArr[nMatch2].nListTemplateId;
- aListArr.Insert(aEntry, aListArr.Count());
+ aListArr.push_back( aEntry );
}
if(pOrigRule)
aListArr[nMatch2].nListDocPos = aEntry.nListDocPos;
@@ -536,7 +533,7 @@ void SwRTFParser::ReadListOverrideTable()
// dann erzeugen wir mal schnell eine Kopie von der NumRule,
// denn diese wird jetzt mal kurz veraendert.
if( aEntry.nListId )
- for( USHORT n = 0; n < aListArr.Count(); ++n )
+ for( size_t n = 0; n < aListArr.size(); ++n )
if( aListArr[ n ].nListId == aEntry.nListId )
{
pRule = pDoc->GetNumRuleTbl()[
@@ -548,12 +545,12 @@ void SwRTFParser::ReadListOverrideTable()
aEntry.nListDocPos = pDoc->MakeNumRule( sTmp, pRule );
pRule = pDoc->GetNumRuleTbl()[ aEntry.nListDocPos ];
// #i91400#
- pRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, FALSE ),
+ pRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, sal_False ),
*pDoc );
- pRule->SetAutoRule( FALSE );
- nNumLvl = (BYTE)-1;
- aListArr.Insert( aEntry, aListArr.Count() );
+ pRule->SetAutoRule( sal_False );
+ nNumLvl = (sal_uInt8)-1;
+ aListArr.push_back( aEntry );
break;
}
@@ -576,11 +573,11 @@ void SwRTFParser::ReadListOverrideTable()
break;
case RTF_LISTOVERRIDESTART:
- bOverrideStart = TRUE;
+ bOverrideStart = sal_True;
break;
case RTF_LISTOVERRIDEFORMAT:
- bOverrideFormat = TRUE;
+ bOverrideFormat = sal_True;
break;
case RTF_LFOLEVEL:
@@ -597,17 +594,17 @@ void SwRTFParser::ReadListOverrideTable()
const SfxPoolItem* pItem( 0 );
const SwTxtFmtColl* pColl( 0 );
- USHORT nRulePos( USHRT_MAX );
+ sal_uInt16 nRulePos( USHRT_MAX );
const SwNumRule *pNumRule = 0;
SvxRTFStyleType* pStyle = GetStyleTbl().First();
do {
if ( MAXLEVEL > pStyle->nOutlineNo )
{
- pColl = aTxtCollTbl.Get( (USHORT)GetStyleTbl().GetCurKey() );
+ pColl = aTxtCollTbl.Get( (sal_uInt16)GetStyleTbl().GetCurKey() );
if ( pColl )
{
const SfxItemState eItemState =
- pColl->GetItemState( RES_PARATR_NUMRULE, FALSE, &pItem );
+ pColl->GetItemState( RES_PARATR_NUMRULE, sal_False, &pItem );
if ( eItemState == SFX_ITEM_SET )
{
nRulePos = pDoc->FindNumRule( ((SwNumRuleItem*)pItem)->GetValue() );
@@ -623,11 +620,11 @@ void SwRTFParser::ReadListOverrideTable()
// now decrement all position in the listtable, which will
// behind the doc-rule position
- for( USHORT n = aListArr.Count(); n; )
+ for( size_t n = aListArr.size(); n; )
{
SwListEntry& rEntry = aListArr[ --n ];
if( rEntry.nListDocPos == nRulePos )
- aListArr.Remove( n );
+ aListArr.erase( aListArr.begin()+n );
else if( rEntry.nListDocPos > nRulePos )
--rEntry.nListDocPos;
}
@@ -647,18 +644,18 @@ void SwRTFParser::ReadListOverrideTable()
SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet
}
-SwNumRule* SwRTFParser::GetNumRuleOfListNo( long nListNo, BOOL bRemoveFromList )
+SwNumRule* SwRTFParser::GetNumRuleOfListNo( long nListNo, sal_Bool bRemoveFromList )
{
SwNumRule* pRet = 0;
SwListEntry* pEntry;
- for( USHORT n = aListArr.Count(); n; )
+ for( size_t n = aListArr.size(); n; )
if( ( pEntry = &aListArr[ --n ])->nListNo == nListNo )
{
if( bRemoveFromList )
- aListArr.Remove( n );
+ aListArr.erase( aListArr.begin()+n );
else
{
- pEntry->bRuleUsed = TRUE;
+ pEntry->bRuleUsed = sal_True;
pRet = pDoc->GetNumRuleTbl()[ pEntry->nListDocPos ];
}
break;
@@ -670,7 +667,7 @@ void SwRTFParser::RemoveUnusedNumRule( SwNumRule* pRule )
{
if( pRule )
{
- for ( BYTE nLvl = 0; nLvl < MAXLEVEL; ++nLvl )
+ for ( sal_uInt8 nLvl = 0; nLvl < MAXLEVEL; ++nLvl )
{
SwNumFmt& rNFmt = (SwNumFmt&)pRule->Get( nLvl );
SwCharFmt* pCFmt = rNFmt.GetCharFmt();
@@ -695,14 +692,14 @@ void SwRTFParser::RemoveUnusedNumRules()
{
SwListEntry* pEntry;
SvPtrarr aDelArr;
- USHORT n;
- for( n = aListArr.Count(); n; )
+ size_t n;
+ for( n = aListArr.size(); n; )
{
if( !( pEntry = &aListArr[ --n ])->bRuleUsed )
{
// really *NOT* used by anyone else?
- BOOL unused=TRUE;
- for(USHORT j = 0; j < aListArr.Count(); ++j)
+ sal_Bool unused=sal_True;
+ for(size_t j = 0; j < aListArr.size(); ++j)
{
if (aListArr[n].nListNo==aListArr[j].nListNo)
unused&=!aListArr[j].bRuleUsed;
@@ -749,27 +746,27 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
{
// lese die \pnseclvl - Gruppe
// nTokenValue gibt schon den richtigen Level vor 1 - 9!
- BYTE nLevel = 0;
+ sal_uInt8 nLevel = 0;
long nListNo = 0;
- BOOL bContinus = TRUE;
+ sal_Bool bContinus = sal_True;
if( RTF_PNSECLVL == nToken )
{
// suche die Rule - steht unter Nummer 3
nListNo = 3;
- bContinus = FALSE;
+ bContinus = sal_False;
nLevel = MAXLEVEL <= (unsigned long) nTokenValue ? MAXLEVEL - 1
- : (!nTokenValue ? 0 : BYTE( nTokenValue - 1 ));
+ : (!nTokenValue ? 0 : sal_uInt8( nTokenValue - 1 ));
}
else
{
switch( nToken = GetNextToken() )
{
case RTF_PNLVL: nListNo = 3;
- bContinus = FALSE;
+ bContinus = sal_False;
nLevel = MAXLEVEL <= (unsigned long) nTokenValue
? MAXLEVEL - 1
- : (!nTokenValue ? 0 : BYTE( nTokenValue-1 ));
+ : (!nTokenValue ? 0 : sal_uInt8( nTokenValue-1 ));
break;
case RTF_PNLVLBODY:
@@ -788,7 +785,7 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
}
// suche die Rule - steht unter Nummer 3
- USHORT nNewFlag = static_cast< USHORT >(1 << nListNo);
+ sal_uInt16 nNewFlag = static_cast< sal_uInt16 >(1 << nListNo);
SwNumRule* pCurRule = GetNumRuleOfListNo( nListNo,
0 != ( nNewNumSectDef & nNewFlag ) );
if( !pCurRule )
@@ -799,12 +796,12 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
RTL_CONSTASCII_STRINGPARAM( RTF_NUMRULE_NAME " 1" )));
SwListEntry aEntry( nListNo, 0, pDoc->MakeNumRule( sTmp ));
aEntry.nListNo = nListNo;
- aListArr.Insert( aEntry, aListArr.Count() );
+ aListArr.push_back( aEntry );
pCurRule = pDoc->GetNumRuleTbl()[ aEntry.nListDocPos ];
// #i91400#
- pCurRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, FALSE ), *pDoc );
+ pCurRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, sal_False ), *pDoc );
- pCurRule->SetAutoRule( FALSE );
+ pCurRule->SetAutoRule( sal_False );
pCurRule->SetContinusNum( bContinus );
}
@@ -822,10 +819,10 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
// dann den akt. Lvl und Rule am Absatz setzen.
// Dieses muss aber in den vorherigen "Kontext", sprich in den vor
// der Klammer offenen Attrset. Darum das SetNewGroup davor und dahinter
- SetNewGroup( FALSE );
+ SetNewGroup( sal_False );
GetAttrSet().Put( SfxUInt16Item( FN_PARAM_NUM_LEVEL, nLevel ));
GetAttrSet().Put( SwNumRuleItem( pCurRule->GetName() ));
- SetNewGroup( TRUE );
+ SetNewGroup( sal_True );
}
FontUnderline eUnderline;
@@ -875,7 +872,7 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
case RTF_PNF:
{
- const Font& rSVFont = GetFont( USHORT(nTokenValue) );
+ const Font& rSVFont = GetFont( sal_uInt16(nTokenValue) );
GetNumChrFmt( *pDoc, *pCurRule, nLevel ).Put(
SvxFontItem( rSVFont.GetFamily(),
rSVFont.GetName(), rSVFont.GetStyleName(),
@@ -892,7 +889,7 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
else
nTokenValue *= 10;
GetNumChrFmt( *pDoc, *pCurRule, nLevel ).Put(
- SvxFontHeightItem( (const USHORT)nTokenValue, 100, RES_CHRATR_FONTSIZE ));
+ SvxFontHeightItem( (const sal_uInt16)nTokenValue, 100, RES_CHRATR_FONTSIZE ));
}
break;
@@ -928,7 +925,7 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
case RTF_PNCF:
{
GetNumChrFmt( *pDoc, *pCurRule, nLevel ).Put( SvxColorItem(
- GetColor( USHORT(nTokenValue) ), RES_CHRATR_COLOR ));
+ GetColor( sal_uInt16(nTokenValue) ), RES_CHRATR_COLOR ));
}
break;
@@ -948,7 +945,7 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
case RTF_PNULW:
{
GetNumChrFmt( *pDoc, *pCurRule, nLevel ).Put(
- SvxWordLineModeItem( TRUE, RES_CHRATR_WORDLINEMODE ));
+ SvxWordLineModeItem( sal_True, RES_CHRATR_WORDLINEMODE ));
}
eUnderline = UNDERLINE_SINGLE;
goto NUMATTR_SETUNDERLINE;
@@ -967,13 +964,13 @@ NUMATTR_SETUNDERLINE:
pCurNumFmt->SetIndentAt( (nLevel + 1 ) * nTokenValue );
break;
case RTF_PNSP:
- pCurNumFmt->SetCharTextDistance( USHORT( nTokenValue ));
+ pCurNumFmt->SetCharTextDistance( sal_uInt16( nTokenValue ));
break;
case RTF_PNPREV:
if( nLevel )
{
- BYTE nPrev = 2, nLast = nLevel;
+ sal_uInt8 nPrev = 2, nLast = nLevel;
while( nLast && 1 < pCurRule->Get( --nLast ).GetIncludeUpperLevels() )
++nPrev;
pCurNumFmt->SetIncludeUpperLevels( nPrev );
@@ -985,7 +982,7 @@ NUMATTR_SETUNDERLINE:
case RTF_PNQR: pCurNumFmt->SetNumAdjust( SVX_ADJUST_RIGHT ); break;
case RTF_PNSTART:
- pCurNumFmt->SetStart( USHORT( nTokenValue ));
+ pCurNumFmt->SetStart( sal_uInt16( nTokenValue ));
break;
case RTF_PNNUMONCE:
@@ -1040,7 +1037,7 @@ NUMATTR_SETUNDERLINE:
pCurNumFmt->SetPrefix( aEmptyStr );
// den Font oder sogar das gesamte CharFormat loeschen?
- if( SFX_ITEM_SET == pChFmt->GetItemState( RES_CHRATR_FONT, FALSE ))
+ if( SFX_ITEM_SET == pChFmt->GetItemState( RES_CHRATR_FONT, sal_False ))
{
if( 1 == pChFmt->GetAttrSet().Count() )
{
diff --git a/sw/source/filter/rtf/rtftbl.cxx b/sw/source/filter/rtf/rtftbl.cxx
index f62e78692d76..5adb998937a9 100644
--- a/sw/source/filter/rtf/rtftbl.cxx
+++ b/sw/source/filter/rtf/rtftbl.cxx
@@ -56,13 +56,13 @@ SV_DECL_PTRARR( SwBoxFrmFmts, SwTableBoxFmtPtr, 25, 50 )
class SwShareBoxFmts;
extern void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* = 0,
- BOOL = TRUE, const BOOL = TRUE, SwShareBoxFmts* = 0 );
+ sal_Bool = sal_True, const sal_Bool = sal_True, SwShareBoxFmts* = 0 );
struct Row
{
bool mbUseLeftRowPad, mbUseRightRowPad, mbUseTopRowPad, mbUseBottomRowPad;
long mnLeftRowPad, mnRightRowPad, mnTopRowPad, mnBottomRowPad;
- USHORT mnBrdDist;
+ sal_uInt16 mnBrdDist;
Row() :
mbUseLeftRowPad(false), mbUseRightRowPad(false),
mbUseTopRowPad(false), mbUseBottomRowPad(false),
@@ -75,22 +75,22 @@ static void SetRowBorder(SfxItemSet& rSet, const Row &rRow)
{
#if 1
SvxBoxItem aBox((const SvxBoxItem&)rSet.Get(RES_BOX, false));
- aBox.SetDistance( static_cast< USHORT >(rRow.mbUseLeftRowPad ? rRow.mnLeftRowPad : rRow.mnBrdDist),
+ aBox.SetDistance( static_cast< sal_uInt16 >(rRow.mbUseLeftRowPad ? rRow.mnLeftRowPad : rRow.mnBrdDist),
BOX_LINE_LEFT);
- aBox.SetDistance( static_cast< USHORT >(rRow.mbUseRightRowPad ? rRow.mnRightRowPad : rRow.mnBrdDist),
+ aBox.SetDistance( static_cast< sal_uInt16 >(rRow.mbUseRightRowPad ? rRow.mnRightRowPad : rRow.mnBrdDist),
BOX_LINE_RIGHT);
- aBox.SetDistance( static_cast< USHORT >(rRow.mbUseTopRowPad ? rRow.mnTopRowPad : 0),
+ aBox.SetDistance( static_cast< sal_uInt16 >(rRow.mbUseTopRowPad ? rRow.mnTopRowPad : 0),
BOX_LINE_TOP);
- aBox.SetDistance( static_cast< USHORT >(rRow.mbUseBottomRowPad ? rRow.mnBottomRowPad : 0),
+ aBox.SetDistance( static_cast< sal_uInt16 >(rRow.mbUseBottomRowPad ? rRow.mnBottomRowPad : 0),
BOX_LINE_BOTTOM);
rSet.Put(aBox);
#else
const SfxPoolItem* pItem;
- if (SFX_ITEM_SET == rSet.GetItemState(RES_BOX, FALSE, &pItem))
+ if (SFX_ITEM_SET == rSet.GetItemState(RES_BOX, sal_False, &pItem))
{
SvxBoxItem aBox( *(SvxBoxItem*)pItem );
aBox.SetDistance(rRow.mbUseLeftRowPad ? rRow.mnLeftRowPad : rRow.mnBrdDist,
@@ -158,7 +158,7 @@ void SwRTFParser::ReadTable( int nToken )
// verhinder Tabelle in Tabelle/Footnote
SwTwips nTblSz = 0;
- int bReadNewCell = FALSE, bChkExistTbl = FALSE;
+ int bReadNewCell = sal_False, bChkExistTbl = sal_False;
enum Limits {eMAXCELLS=64000};
@@ -172,28 +172,28 @@ void SwRTFParser::ReadTable( int nToken )
if( RTF_TROWD == nToken )
nToken = GetNextToken(); // RTF_TROWD ueberlesen
- // Flags fuer die gemergten Boxen loeschen
+ // Flag for delete merged boxes
aMergeBoxes.clear();
aMergeBoxes.push_back(false);
- nAktBox = 0;
+ m_nCurrentBox = 0;
// wenn schon in einer Tabellen, dann splitte oder benutze
// die bisherigen Boxen weiter
- bChkExistTbl = 0 != pDoc->GetNodes()[ pPam->GetPoint()->nNode ]->FindTableNode();
+ bChkExistTbl = 0 != pPam->GetPoint()->nNode.GetNode().FindTableNode();
}
else
{
- bReadNewCell = TRUE;
+ bReadNewCell = sal_True;
SwTableLines& rLns = pTableNode->GetTable().GetTabLines();
SwTableLine* pLine = rLns[ rLns.Count()-1 ];
// very robust to avoid crashes like bug 127425 + crash reports 118743
if( pLine )
{
- USHORT nTmpBox = nAktBox;
+ sal_uInt16 nTmpBox = m_nCurrentBox;
if( nTmpBox > pLine->GetTabBoxes().Count() )
nTmpBox = pLine->GetTabBoxes().Count();
- for( USHORT n = nTmpBox; n; )
+ for (sal_uInt16 n = nTmpBox; n; )
{
const SwTableBox *pTmp = pLine->GetTabBoxes()[ --n ];
if( pTmp )
@@ -223,7 +223,7 @@ void SwRTFParser::ReadTable( int nToken )
SvxFrameDirection eDir = FRMDIR_HORI_LEFT_TOP;
bool bCantSplit = false;
- int bWeiter = TRUE;
+ int bWeiter = sal_True;
do {
switch( nToken )
{
@@ -286,12 +286,13 @@ void SwRTFParser::ReadTable( int nToken )
// the first cell cannot be merged with earlier ones.
if (aMergeBoxes.size() > 1)
{
- aMergeBoxes.back() = TRUE;
+ aMergeBoxes.back() = sal_True;
}
break;
case RTF_CELLX:
- if (!bTrowdRead) {
+ if (!bTrowdRead && (aMergeBoxes.size() < (SAL_MAX_UINT16 - 1)))
+ {
SwTableBoxFmt* pFmt = pBoxFmt;
SwTwips nSize = nTokenValue - nTblSz;
if( aMergeBoxes.back() )
@@ -302,9 +303,12 @@ void SwRTFParser::ReadTable( int nToken )
{
SwTableLines& rLns = pTableNode->GetTable().GetTabLines();
SwTableLine* pLine = rLns[ rLns.Count()-1 ];
- if(nAktBox!=0)
- --nAktBox;
- pFmt = (SwTableBoxFmt*)pLine->GetTabBoxes()[ nAktBox ]->GetFrmFmt();
+ if (m_nCurrentBox != 0)
+ {
+ --m_nCurrentBox;
+ }
+ pFmt = static_cast<SwTableBoxFmt*>(
+ pLine->GetTabBoxes()[ m_nCurrentBox ]->GetFrmFmt());
}
else
pFmt = aBoxFmts[ aBoxFmts.Count()-1 ];
@@ -319,7 +323,7 @@ void SwRTFParser::ReadTable( int nToken )
//
if (nSize<=2*aRow.mnBrdDist) {
aRow.mnRightRowPad=0;
- aRow.mbUseRightRowPad=TRUE;
+ aRow.mbUseRightRowPad=sal_True;
}
SetRowBorder((SfxItemSet&)pBoxFmt->GetAttrSet(), aRow);
aBoxFmts.Insert( pBoxFmt, aBoxFmts.Count() );
@@ -330,21 +334,21 @@ void SwRTFParser::ReadTable( int nToken )
nSize = COL_DFLT_WIDTH;
pFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nSize, 0 ));
nTblSz = nTokenValue;
- aMergeBoxes.push_back(FALSE);
+ aMergeBoxes.push_back(sal_False);
SvxBoxItem aBox(pFmt->GetBox());
if (bUseRightCellPad)
- aBox.SetDistance( static_cast< USHORT >(nRightCellPad), BOX_LINE_RIGHT);
+ aBox.SetDistance( static_cast< sal_uInt16 >(nRightCellPad), BOX_LINE_RIGHT);
if (bUseBottomCellPad)
- aBox.SetDistance( static_cast< USHORT >(nBottomCellPad), BOX_LINE_BOTTOM);
+ aBox.SetDistance( static_cast< sal_uInt16 >(nBottomCellPad), BOX_LINE_BOTTOM);
//Yes, these are the wrong way around, there appears to
//be a bug in word where these are swapped.
if (bUseLeftCellPad)
- aBox.SetDistance( static_cast< USHORT >(nLeftCellPad), BOX_LINE_TOP);
+ aBox.SetDistance( static_cast< sal_uInt16 >(nLeftCellPad), BOX_LINE_TOP);
if (bUseTopCellPad)
- aBox.SetDistance( static_cast< USHORT >(nTopCellPad), BOX_LINE_LEFT);
+ aBox.SetDistance( static_cast< sal_uInt16 >(nTopCellPad), BOX_LINE_LEFT);
pFmt->SetFmtAttr(aBox);
@@ -358,7 +362,7 @@ void SwRTFParser::ReadTable( int nToken )
case RTF_TRGAPH:
//bug: RTF: wrong internal table cell margin imported (A13)
- aRow.mnBrdDist = (nTokenValue>0?(USHORT)nTokenValue:0); // filter out negative values of \trgaph
+ aRow.mnBrdDist = (nTokenValue>0?(sal_uInt16)nTokenValue:0); // filter out negative values of \trgaph
break;
case RTF_TRQL: eAdjust = text::HoriOrientation::LEFT; break;
@@ -412,7 +416,7 @@ void SwRTFParser::ReadTable( int nToken )
if( aMergeBoxes.back() )
break;
ReadBackgroundAttr( nToken,
- (SfxItemSet&)pBoxFmt->GetAttrSet(), TRUE );
+ (SfxItemSet&)pBoxFmt->GetAttrSet(), sal_True );
}
else if( ( nToken & ~(0xff | RTF_TABLEDEF) ) == RTF_BRDRDEF ||
IsBorderToken(nToken))
@@ -422,7 +426,7 @@ void SwRTFParser::ReadTable( int nToken )
SfxItemSet& rSet = (SfxItemSet&)pBoxFmt->GetAttrSet();
if(!IsBorderToken( nToken ))
- ReadBorderAttr( nToken, rSet, TRUE );
+ ReadBorderAttr( nToken, rSet, sal_True );
else
NextToken( nToken );
}
@@ -431,7 +435,7 @@ void SwRTFParser::ReadTable( int nToken )
if( RTF_UNKNOWNCONTROL == nToken )
NextToken( nToken );
else
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
break;
}
@@ -449,17 +453,16 @@ void SwRTFParser::ReadTable( int nToken )
// das letzte temp. BoxFmt loeschen
delete pBoxFmt;
- // es wurde keine einzige Box erkannt
- if( nAktBox == aMergeBoxes.size()-1 || ( bReadNewCell && !pTableNode ))
+ // It has been recognized as not single box
+ if( m_nCurrentBox == aMergeBoxes.size()-1 || ( bReadNewCell && !pTableNode ))
{
aMergeBoxes.insert(aMergeBoxes.begin(), aMergeBackup.begin(), aMergeBackup.end());
- SkipToken( -1 ); // zum Letzen gueltigen zurueck
return;
}
nTblSz -= nLSpace;
- int bNewTbl = TRUE;
+ int bNewTbl = sal_True;
SwTableLine* pNewLine;
bTrowdRead=true;
@@ -528,7 +531,7 @@ void SwRTFParser::ReadTable( int nToken )
pBox = (*pLns)[ 0 ]->GetTabBoxes()[ 0 ];
SwNodeIndex aTmpIdx( *pBox->GetSttNd() );
- pDoc->GetNodes().SplitTable( aTmpIdx, HEADLINE_NONE, FALSE );
+ pDoc->GetNodes().SplitTable( aTmpIdx, HEADLINE_NONE, sal_False );
pTableNode = pPam->GetNode()->FindTableNode();
pFmt = pTableNode->GetTable().GetFrmFmt();
@@ -548,8 +551,8 @@ void SwRTFParser::ReadTable( int nToken )
pNewLine = (*pLns)[ pLns->Count() - 1 ];
// jetzt die Boxen abgleichen
- USHORT nBoxes = Min( pNewLine->GetTabBoxes().Count(), aBoxFmts.Count() );
- USHORT n;
+ sal_uInt16 nBoxes = Min( pNewLine->GetTabBoxes().Count(), aBoxFmts.Count() );
+ sal_uInt16 n;
for( n = 0; n < nBoxes; ++n )
{
@@ -560,18 +563,20 @@ void SwRTFParser::ReadTable( int nToken )
aBoxFmts.Remove( 0, n );
if( aBoxFmts.Count() ) // es muessen noch neue zugefuegt werden
- nAktBox = n;
+ {
+ m_nCurrentBox = n;
+ }
else // es mussen noch Boxen geloescht werden
{
// remove ContentIndex of other Bound
pPam->SetMark(); pPam->DeleteMark();
while( n < pNewLine->GetTabBoxes().Count() )
_DeleteBox( pTableNode->GetTable(),
- pNewLine->GetTabBoxes()[ n ], 0, FALSE, FALSE );
+ pNewLine->GetTabBoxes()[ n ], 0, sal_False, sal_False );
}
pOldTblNd = pTableNode;
- bNewTbl = FALSE;
+ bNewTbl = sal_False;
{
//TabellenUmrandungen optimieren
@@ -632,7 +637,7 @@ void SwRTFParser::ReadTable( int nToken )
pNewLine->GetFrmFmt()->ResetFmtAttr( RES_FRM_SIZE );
rLns.C40_INSERT( SwTableLine, pNewLine, rLns.Count() );
}
- bNewTbl = FALSE;
+ bNewTbl = sal_False;
}
else
{
@@ -640,7 +645,7 @@ void SwRTFParser::ReadTable( int nToken )
const SwTable *pTable =
pDoc->InsertTable(
SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 0 ),
- *pPam->GetPoint(), 1, 1, eAdjust, 0, 0, FALSE, FALSE );
+ *pPam->GetPoint(), 1, 1, eAdjust, 0, 0, sal_False, sal_False );
bContainsTablePara=true;
pTableNode = pTable ? pTable->GetTableNode() : 0;
@@ -670,7 +675,7 @@ void SwRTFParser::ReadTable( int nToken )
((SfxItemSet&)pFmt->GetAttrSet()).Put( aL );
}
- nAktBox = 0;
+ m_nCurrentBox = 0;
pOldTblNd = pTableNode;
{
@@ -700,7 +705,7 @@ void SwRTFParser::ReadTable( int nToken )
if( !pColl )
pColl = pDoc->GetTxtCollFromPool( RES_POOLCOLL_STANDARD, false );
- USHORT nStt = 0;
+ sal_uInt16 nStt = 0;
if( bNewTbl )
{
SwTableBox* pBox = pNewLine->GetTabBoxes()[0];
@@ -722,12 +727,14 @@ void SwRTFParser::ReadTable( int nToken )
aBoxFmts[ nStt ],
// Formate fuer den TextNode der Box
pColl, 0,
- nAktBox + nStt, 1 );
+ m_nCurrentBox + nStt, 1 );
}
}
if( bChkExistTbl )
- nAktBox = 0;
+ {
+ m_nCurrentBox = 0;
+ }
maInsertedTables.InsertTable(*pTableNode, *pPam);
@@ -739,7 +746,8 @@ void SwRTFParser::ReadTable( int nToken )
if (pNewLine)
{
SwTableBoxes &rBoxes = pNewLine->GetTabBoxes();
- if (SwTableBox* pBox = (nAktBox < rBoxes.Count() ? rBoxes[nAktBox] : 0))
+ if (SwTableBox* pBox = ((m_nCurrentBox < rBoxes.Count())
+ ? rBoxes[m_nCurrentBox] : 0))
{
if (const SwStartNode *pStart = pBox->GetSttNd())
{
@@ -785,7 +793,7 @@ void SwRTFParser::ReadTable( int nToken )
//which were intended to be inside the tablerow are now left outside
//the table after the row was placed before the current insertion point
SvxRTFItemStack& rAttrStk = GetAttrStack();
- for (USHORT n = 0; n < rAttrStk.Count(); ++n)
+ for (size_t n = 0; n < rAttrStk.size(); ++n)
{
SvxRTFItemStackType* pStk = rAttrStk[n];
pStk->MoveFullNode(aOldPos, aNewPos);
@@ -809,16 +817,16 @@ void SwRTFParser::GotoNextBox()
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
SwTableBox* pBox = rBoxes[ rBoxes.Count()-1 ];
- if( ++nAktBox >= aMergeBoxes.size() )
- nAktBox = aMergeBoxes.size()-1;
+ if( ++m_nCurrentBox >= aMergeBoxes.size() )
+ m_nCurrentBox = aMergeBoxes.size()-1;
- if( !aMergeBoxes[ nAktBox ] )
+ if (!aMergeBoxes[ m_nCurrentBox ])
{
- int bMove = TRUE;
+ int bMove = sal_True;
if( pBox->GetSttIdx() > pPam->GetPoint()->nNode.GetIndex() )
{
- USHORT nRealBox = 0;
- for( USHORT nTmp = 0; nTmp < nAktBox; ++nTmp )
+ sal_uInt16 nRealBox = 0;
+ for (sal_uInt16 nTmp = 0; nTmp < m_nCurrentBox; ++nTmp)
if( !aMergeBoxes[ nTmp ] )
++nRealBox;
@@ -826,15 +834,15 @@ void SwRTFParser::GotoNextBox()
{
pPam->GetPoint()->nNode = *rBoxes[ nRealBox ]->GetSttNd()->EndOfSectionNode();
pPam->Move( fnMoveBackward, fnGoCntnt );
- bMove = FALSE;
+ bMove = sal_False;
}
}
- if( bMove && nAktBox + 1U == aMergeBoxes.size() )
+ if( bMove && m_nCurrentBox + 1U == aMergeBoxes.size() )
// dann hinter die Tabelle
pPam->Move( fnMoveForward, fnGoNode );
}
- else if( !pDoc->GetNodes()[ pPam->GetPoint()->nNode ]->IsCntntNode() )
+ else if (pPam->GetPoint()->nNode.GetNode().IsCntntNode())
// dann in die vorherige ans Ende
pPam->Move( fnMoveBackward, fnGoCntnt );
}
@@ -845,7 +853,7 @@ void SwRTFParser::NewTblLine()
nInsTblRow = USHRT_MAX;
// erweiter die aktuelle um eine neue Line
- BOOL bMakeCopy = FALSE;
+ sal_Bool bMakeCopy = sal_False;
SwNode* pNd = pDoc->GetNodes()[ pPam->GetPoint()->nNode.GetIndex()-1 ];
if( !pNd->IsEndNode() ||
!(pNd = pNd->StartOfSectionNode())->IsTableNode() )
@@ -853,7 +861,7 @@ void SwRTFParser::NewTblLine()
if( !pOldTblNd )
return ;
- bMakeCopy = TRUE;
+ bMakeCopy = sal_True;
pNd = pOldTblNd;
}
pTableNode = (SwTableNode*)pNd;
@@ -869,7 +877,7 @@ void SwRTFParser::NewTblLine()
if( !bMakeCopy &&
64000 < pTableNode->GetTable().GetTabSortBoxes().Count() )
{
- bMakeCopy = TRUE; // spaetestens jetzt eine neue anfangen!
+ bMakeCopy = sal_True; // spaetestens jetzt eine neue anfangen!
}
if( bMakeCopy )
@@ -878,8 +886,8 @@ void SwRTFParser::NewTblLine()
SwSelBoxes aBoxes;
pTableNode->GetTable().SelLineFromBox( pBox, aBoxes );
pTableNode->GetTable().MakeCopy( pDoc, *pPam->GetPoint(),
- aBoxes, FALSE );
- ULONG nNd = pPam->GetPoint()->nNode.GetIndex()-1;
+ aBoxes, sal_False );
+ sal_uLong nNd = pPam->GetPoint()->nNode.GetIndex()-1;
pTableNode = pDoc->GetNodes()[ nNd ]->FindTableNode();
pOldTblNd = pTableNode;
@@ -892,10 +900,10 @@ void SwRTFParser::NewTblLine()
pBox = (*pLns)[ pLns->Count()-1 ]->GetTabBoxes()[0];
- ULONG nOldPos = pPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nOldPos = pPam->GetPoint()->nNode.GetIndex();
pPam->GetPoint()->nNode = *pBox->GetSttNd();
pPam->Move( fnMoveForward );
- nAktBox = 0;
+ m_nCurrentBox = 0;
// alle Nodes in den Boxen auf die "default" Vorlage setzten
{
@@ -925,12 +933,11 @@ void SwRTFParser::NewTblLine()
pPam->DeleteMark();
}
- // alle Attribute, die schon auf den nachfolgen zeigen auf die neue
- // Box umsetzen !!
+ // all attributes which will be displayed in new Box
SvxRTFItemStack& rAttrStk = GetAttrStack();
const SvxRTFItemStackType* pStk;
- for( USHORT n = 0; n < rAttrStk.Count(); ++n )
- if( ( pStk = rAttrStk[ n ])->GetSttNodeIdx() == ULONG(nOldPos) &&
+ for( size_t n = 0; n < rAttrStk.size(); ++n )
+ if( ( pStk = rAttrStk[ n ])->GetSttNodeIdx() == sal_uLong(nOldPos) &&
!pStk->GetSttCnt() )
((SvxRTFItemStackType*)pStk)->SetStartPos( SwxPosition( pPam ) );
}
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index c4c7998fccd3..ce32501188ac 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -119,9 +119,9 @@ using namespace ::com::sun::star;
// einige Hilfs-Funktionen
// char
-inline const SvxFontHeightItem& GetSize(const SfxItemSet& rSet,BOOL bInP=TRUE)
+inline const SvxFontHeightItem& GetSize(const SfxItemSet& rSet,sal_Bool bInP=sal_True)
{ return (const SvxFontHeightItem&)rSet.Get( RES_CHRATR_FONTSIZE,bInP); }
-inline const SvxLRSpaceItem& GetLRSpace(const SfxItemSet& rSet,BOOL bInP=TRUE)
+inline const SvxLRSpaceItem& GetLRSpace(const SfxItemSet& rSet,sal_Bool bInP=sal_True)
{ return (const SvxLRSpaceItem&)rSet.Get( RES_LR_SPACE,bInP); }
/* */
@@ -132,11 +132,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT Reader* SAL_CALL ImportRTF()
}
// Aufruf fuer die allg. Reader-Schnittstelle
-ULONG RtfReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String &)
+sal_uLong RtfReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String &)
{
if( !pStrm )
{
- OSL_ENSURE( FALSE, "RTF-Read ohne Stream" );
+ OSL_ENSURE( sal_False, "RTF-Read ohne Stream" );
return ERR_SWG_READ_ERROR;
}
@@ -151,7 +151,7 @@ ULONG RtfReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const S
Reader::ResetFrmFmts( rDoc );
}
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
SwDocShell *pDocShell(rDoc.GetDocShell());
DBG_ASSERT(pDocShell, "no SwDocShell");
uno::Reference<document::XDocumentProperties> xDocProps;
@@ -178,7 +178,7 @@ ULONG RtfReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const S
return nRet;
}
-ULONG RtfReader::Read(SvStream* pStream, SwDoc& rDoc, const String& rBaseURL, SwPaM& rPam)
+sal_uLong RtfReader::Read(SvStream* pStream, SwDoc& rDoc, const String& rBaseURL, SwPaM& rPam)
{
pStrm = pStream;
return Read(rDoc, rBaseURL, rPam, rBaseURL);
@@ -203,13 +203,13 @@ SwRTFParser::SwRTFParser(SwDoc* pD,
pSttNdIdx(0),
pRegionEndIdx(0),
pDoc(pD),
- pRelNumRule(new SwRelNumRuleSpaces(*pD, static_cast< BOOL >(bReadNewDoc))),
+ pRelNumRule(new SwRelNumRuleSpaces(*pD, static_cast< sal_Bool >(bReadNewDoc))),
pRedlineInsert(0),
pRedlineDelete(0),
sBaseURL( rBaseURL ),
nAktPageDesc(0),
nAktFirstPageDesc(0),
- nAktBox(0),
+ m_nCurrentBox(0),
nInsTblRow(USHRT_MAX),
nNewNumSectDef(USHRT_MAX),
nRowsToRepeat(0),
@@ -230,11 +230,11 @@ SwRTFParser::SwRTFParser(SwDoc* pD,
pPam = new SwPaM( *rCrsr.GetPoint() );
SetInsPos( SwxPosition( pPam ) );
SetChkStyleAttr( 0 != bReadNewDoc );
- SetCalcValue( FALSE );
- SetReadDocInfo( TRUE );
+ SetCalcValue( sal_False );
+ SetReadDocInfo( sal_True );
// diese sollen zusaetzlich ueber \pard zurueck gesetzt werden
- USHORT temp;
+ sal_uInt16 temp;
temp = RES_TXTATR_CHARFMT; AddPlainAttr( temp );
temp = RES_PAGEDESC; AddPardAttr( temp );
temp = RES_BREAK; AddPardAttr( temp );
@@ -263,8 +263,8 @@ bool lcl_UsedPara(SwPaM &rPam)
if( rPam.GetPoint()->nContent.GetIndex() ||
( 0 != ( pCNd = rPam.GetCntntNode()) &&
0 != ( pSet = pCNd->GetpSwAttrSet()) &&
- ( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, FALSE ) ||
- SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, FALSE ))))
+ ( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False ) ||
+ SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, sal_False ))))
return true;
return false;
}
@@ -273,7 +273,7 @@ void SwRTFParser::Continue( int nToken )
{
if( bFirstContinue )
{
- bFirstContinue = FALSE;
+ bFirstContinue = sal_False;
if (IsNewDoc())
{
@@ -331,14 +331,14 @@ void SwRTFParser::Continue( int nToken )
( RES_POOLCOLL_STANDARD, false ));
// verhinder das einlesen von Tabellen in Fussnoten / Tabellen
- ULONG nNd = pPos->nNode.GetIndex();
+ sal_uLong nNd = pPos->nNode.GetIndex();
mbReadNoTbl = 0 != pSttNd->FindTableNode() ||
( nNd < pDoc->GetNodes().GetEndOfInserts().GetIndex() &&
pDoc->GetNodes().GetEndOfInserts().StartOfSectionIndex() < nNd );
}
// Laufbalken anzeigen, aber nur bei synchronem Call
- ULONG nCurrPos = rInput.Tell();
+ sal_uLong nCurrPos = rInput.Tell();
rInput.Seek(STREAM_SEEK_TO_END);
rInput.ResetError();
::StartProgress( STR_STATSTR_W4WREAD, 0, rInput.Tell(), pDoc->GetDocShell());
@@ -379,21 +379,21 @@ void SwRTFParser::Continue( int nToken )
#if OSL_DEBUG_LEVEL > 1
// !!! sollte nicht moeglich sein, oder ??
- OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( TRUE ).nNode.GetIndex(),
+ OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( sal_True ).nNode.GetIndex(),
"Pam.Bound1 steht noch im Node" );
- OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( FALSE ).nNode.GetIndex(),
+ OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( sal_False ).nNode.GetIndex(),
"Pam.Bound2 steht noch im Node" );
-if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( TRUE ).nNode.GetIndex() )
+if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_True ).nNode.GetIndex() )
{
- xub_StrLen nCntPos = pPam->GetBound( TRUE ).nContent.GetIndex();
- pPam->GetBound( TRUE ).nContent.Assign( pTxtNode,
+ xub_StrLen nCntPos = pPam->GetBound( sal_True ).nContent.GetIndex();
+ pPam->GetBound( sal_True ).nContent.Assign( pTxtNode,
pTxtNode->GetTxt().Len() + nCntPos );
}
-if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
+if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_False ).nNode.GetIndex() )
{
- xub_StrLen nCntPos = pPam->GetBound( FALSE ).nContent.GetIndex();
- pPam->GetBound( FALSE ).nContent.Assign( pTxtNode,
+ xub_StrLen nCntPos = pPam->GetBound( sal_False ).nContent.GetIndex();
+ pPam->GetBound( sal_False ).nContent.Assign( pTxtNode,
pTxtNode->GetTxt().Len() + nCntPos );
}
#endif
@@ -419,7 +419,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
StartOfSectionNode()->GetSectionNode();
if( pSectNd )
pSectNd->GetSection().GetFmt()->SetFmtAttr(
- SwFmtNoBalancedColumns( TRUE ) );
+ SwFmtNoBalancedColumns( sal_True ) );
}
DelLastNode();
@@ -445,7 +445,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
if( !pPos->nContent.GetIndex() )
{
SwTxtNode* pAktNd;
- ULONG nNodeIdx = pPos->nNode.GetIndex();
+ sal_uLong nNodeIdx = pPos->nNode.GetIndex();
if( IsNewDoc() )
{
SwNode* pTmp = pDoc->GetNodes()[ nNodeIdx -1 ];
@@ -456,7 +456,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
const SwSpzFrmFmts* pFrmFmts = pDoc->GetSpzFrmFmts();
if ( pFrmFmts && pFrmFmts->Count() )
{
- for ( USHORT nI = pFrmFmts->Count(); nI; --nI )
+ for ( sal_uInt16 nI = pFrmFmts->Count(); nI; --nI )
{
const SwFmtAnchor & rAnchor = (*pFrmFmts)[ nI - 1 ]->GetAnchor();
if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
@@ -521,10 +521,10 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
if( pPrev->HasSwAttrSet() )
pTxtNode->SetAttr( *pPrev->GetpSwAttrSet() );
- if( &pPam->GetBound(TRUE).nNode.GetNode() == pPrev )
- pPam->GetBound(TRUE).nContent.Assign( pTxtNode, 0 );
- if( &pPam->GetBound(FALSE).nNode.GetNode() == pPrev )
- pPam->GetBound(FALSE).nContent.Assign( pTxtNode, 0 );
+ if( &pPam->GetBound(sal_True).nNode.GetNode() == pPrev )
+ pPam->GetBound(sal_True).nContent.Assign( pTxtNode, 0 );
+ if( &pPam->GetBound(sal_False).nNode.GetNode() == pPrev )
+ pPam->GetBound(sal_False).nContent.Assign( pTxtNode, 0 );
pTxtNode->JoinPrev();
}
@@ -542,10 +542,10 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
}
bool rtfSections::SetCols(SwFrmFmt &rFmt, const rtfSection &rSection,
- USHORT nNettoWidth)
+ sal_uInt16 nNettoWidth)
{
//sprmSCcolumns - Anzahl der Spalten - 1
- USHORT nCols = static_cast< USHORT >(rSection.NoCols());
+ sal_uInt16 nCols = static_cast< sal_uInt16 >(rSection.NoCols());
if (nCols < 2)
return false; // keine oder bloedsinnige Spalten
@@ -553,7 +553,7 @@ bool rtfSections::SetCols(SwFrmFmt &rFmt, const rtfSection &rSection,
SwFmtCol aCol; // Erzeuge SwFmtCol
//sprmSDxaColumns - Default-Abstand 1.25 cm
- USHORT nColSpace = static_cast< USHORT >(rSection.StandardColSeperation());
+ sal_uInt16 nColSpace = static_cast< sal_uInt16 >(rSection.StandardColSeperation());
aCol.Init( nCols, nColSpace, nNettoWidth );
@@ -561,15 +561,15 @@ bool rtfSections::SetCols(SwFrmFmt &rFmt, const rtfSection &rSection,
if (rSection.maPageInfo.maColumns.size())
{
aCol._SetOrtho(false);
- USHORT nWishWidth = 0, nHalfPrev = 0;
- for(USHORT n=0, i=0; n < rSection.maPageInfo.maColumns.size() && i < nCols; n += 2, ++i )
+ sal_uInt16 nWishWidth = 0, nHalfPrev = 0;
+ for(sal_uInt16 n=0, i=0; n < rSection.maPageInfo.maColumns.size() && i < nCols; n += 2, ++i )
{
SwColumn* pCol = aCol.GetColumns()[ i ];
pCol->SetLeft( nHalfPrev );
- USHORT nSp = static_cast< USHORT >(rSection.maPageInfo.maColumns[ n+1 ]);
+ sal_uInt16 nSp = static_cast< sal_uInt16 >(rSection.maPageInfo.maColumns[ n+1 ]);
nHalfPrev = nSp / 2;
pCol->SetRight( nSp - nHalfPrev );
- pCol->SetWishWidth( static_cast< USHORT >(rSection.maPageInfo.maColumns[ n ]) +
+ pCol->SetWishWidth( static_cast< sal_uInt16 >(rSection.maPageInfo.maColumns[ n ]) +
pCol->GetLeft() + pCol->GetRight());
nWishWidth = nWishWidth + pCol->GetWishWidth();
}
@@ -597,7 +597,7 @@ void rtfSections::SetPage(SwPageDesc &rInPageDesc, SwFrmFmt &rFmt,
if (!bIgnoreCols)
{
- SetCols(rFmt, rSection, static_cast< USHORT >(rSection.GetPageWidth() -
+ SetCols(rFmt, rSection, static_cast< sal_uInt16 >(rSection.GetPageWidth() -
rSection.GetPageLeft() - rSection.GetPageRight()));
}
@@ -866,7 +866,7 @@ SwSectionFmt *rtfSections::InsertSection(SwPaM& rMyPaM, rtfSection &rSection)
OSL_ENSURE(pFmt, "impossible");
if (!pFmt)
return 0;
- SetCols(*pFmt, rSection, (USHORT)(nWidth - nLeft - nRight) );
+ SetCols(*pFmt, rSection, (sal_uInt16)(nWidth - nLeft - nRight) );
return pFmt;
}
@@ -916,7 +916,7 @@ void rtfSections::InsertSegments(bool bNewDoc)
}
else
{
- USHORT nPos = mrReader.pDoc->MakePageDesc(
+ sal_uInt16 nPos = mrReader.pDoc->MakePageDesc(
ViewShell::GetShellRes()->GetPageDescName(nDesc, ShellResource::NORMAL_PAGE)
, 0, false);
aIter->mpTitlePage = &mrReader.pDoc->_GetPageDesc(nPos);
@@ -937,7 +937,7 @@ void rtfSections::InsertSegments(bool bNewDoc)
}
else
{
- USHORT nPos = mrReader.pDoc->MakePageDesc(
+ sal_uInt16 nPos = mrReader.pDoc->MakePageDesc(
ViewShell::GetShellRes()->GetPageDescName(nDesc,
aIter->HasTitlePage() ? ShellResource::FIRST_PAGE : ShellResource::NORMAL_PAGE),
aIter->mpTitlePage, false);
@@ -961,7 +961,7 @@ void rtfSections::InsertSegments(bool bNewDoc)
if (aIter->PageRestartNo() ||
((aIter == aStart) && aIter->PageStartAt() != 1))
- aPgDesc.SetNumOffset( static_cast< USHORT >(aIter->PageStartAt()) );
+ aPgDesc.SetNumOffset( static_cast< sal_uInt16 >(aIter->PageStartAt()) );
/*
If its a table here, apply the pagebreak to the table
@@ -1004,8 +1004,7 @@ void rtfSections::InsertSegments(bool bNewDoc)
}
const SwPosition* pPos = aSectPaM.GetPoint();
- const SwTxtNode* pSttNd =
- mrReader.pDoc->GetNodes()[ pPos->nNode ]->GetTxtNode();
+ SwTxtNode const*const pSttNd = pPos->nNode.GetNode().GetTxtNode();
const SwTableNode* pTableNd = pSttNd ? pSttNd->FindTableNode() : 0;
if (pTableNd)
{
@@ -1238,7 +1237,7 @@ void SwRTFParser::ReadDrawingObject()
aSur.SetContour( false );
aSur.SetOutside(true);
aFlySet.Put( aSur );
- SwFmtFollowTextFlow aFollowTextFlow( FALSE );
+ SwFmtFollowTextFlow aFollowTextFlow( sal_False );
aFlySet.Put( aFollowTextFlow );
SwFmtAnchor aAnchor( FLY_AT_PARA );
@@ -1268,7 +1267,7 @@ void SwRTFParser::InsertShpObject(SdrObject* pStroke, int _nZOrder)
aSur.SetContour( false );
aSur.SetOutside(true);
aFlySet.Put( aSur );
- SwFmtFollowTextFlow aFollowTextFlow( FALSE );
+ SwFmtFollowTextFlow aFollowTextFlow( sal_False );
aFlySet.Put( aFollowTextFlow );
SwFmtAnchor aAnchor( FLY_AT_PARA );
@@ -1508,14 +1507,14 @@ void SwRTFParser::ReadShapeObject()
}
}
-extern void sw3io_ConvertFromOldField( SwDoc& rDoc, USHORT& rWhich,
- USHORT& rSubType, ULONG &rFmt,
- USHORT nVersion );
+extern void sw3io_ConvertFromOldField( SwDoc& rDoc, sal_uInt16& rWhich,
+ sal_uInt16& rSubType, sal_uLong &rFmt,
+ sal_uInt16 nVersion );
-USHORT SwRTFParser::ReadRevTbl()
+sal_uInt16 SwRTFParser::ReadRevTbl()
{
int nNumOpenBrakets = 1, nToken; // die erste wurde schon vorher erkannt !!
- USHORT nAuthorTableIndex = 0;
+ sal_uInt16 nAuthorTableIndex = 0;
while( nNumOpenBrakets && IsParserWorking() )
{
@@ -1543,7 +1542,7 @@ USHORT SwRTFParser::ReadRevTbl()
case RTF_TEXTTOKEN:
aToken.EraseTrailingChars(';');
- USHORT nSWId = pDoc->InsertRedlineAuthor(aToken);
+ sal_uInt16 nSWId = pDoc->InsertRedlineAuthor(aToken);
// Store matchpair
if( !pAuthorInfos )
pAuthorInfos = new sw::util::AuthorInfos;
@@ -1562,19 +1561,34 @@ USHORT SwRTFParser::ReadRevTbl()
void SwRTFParser::NextToken( int nToken )
{
- USHORT eDateFmt;
+ sal_uInt16 eDateFmt;
switch( nToken )
{
case RTF_FOOTNOTE:
+ {
//We can only insert a footnote if we're not inside a footnote. e.g.
//#i7713#
- if (!mbIsFootnote)
+
+ // in insert mode it's also possible to be inside of a footnote!
+ bool bInsertIntoFootnote = false;
+ if( !IsNewDoc() )
+ {
+ SwStartNode* pSttNode = pPam->GetNode()->StartOfSectionNode();
+ while(pSttNode && pSttNode->IsSectionNode())
+ {
+ pSttNode = pSttNode->StartOfSectionNode();
+ }
+ if( SwFootnoteStartNode == pSttNode->GetStartNodeType() )
+ bInsertIntoFootnote = true;
+ }
+ if (!mbIsFootnote && !bInsertIntoFootnote)
{
ReadHeaderFooter( nToken );
SkipToken( -1 ); // Klammer wieder zurueck
}
- break;
+ }
+ break;
case RTF_SWG_PRTDATA:
ReadPrtData();
break;
@@ -1622,12 +1636,12 @@ void SwRTFParser::NextToken( int nToken )
SkipGroup();
else
{
- bStyleTabValid = TRUE;
+ bStyleTabValid = sal_True;
if (SwNumRule* pRule = ReadNumSecLevel( nToken ))
{
GetAttrSet().Put( SwNumRuleItem( pRule->GetName() ));
- if( SFX_ITEM_SET != GetAttrSet().GetItemState( FN_PARAM_NUM_LEVEL, FALSE ))
+ if( SFX_ITEM_SET != GetAttrSet().GetItemState( FN_PARAM_NUM_LEVEL, sal_False ))
GetAttrSet().Put( SfxUInt16Item( FN_PARAM_NUM_LEVEL, 0 ));
}
}
@@ -1718,7 +1732,7 @@ void SwRTFParser::NextToken( int nToken )
if (!CantUseTables())
{
// aus der Line raus
- nAktBox = 0;
+ m_nCurrentBox = 0;
pTableNode = 0;
// noch in der Tabelle drin?
SwNodeIndex& rIdx = pPam->GetPoint()->nNode;
@@ -1735,8 +1749,8 @@ void SwRTFParser::NextToken( int nToken )
rIdx = *pBox->GetSttNd()->EndOfSectionNode();
pPam->Move( fnMoveForward, fnGoNode );
}
- nInsTblRow = static_cast< USHORT >(GetOpenBrakets());
- SetPardTokenRead( FALSE );
+ nInsTblRow = static_cast< sal_uInt16 >(GetOpenBrakets());
+ SetPardTokenRead( sal_False );
SwPaM aTmp(*pPam);
aTmp.Move( fnMoveBackward, fnGoNode );
}
@@ -1780,8 +1794,8 @@ void SwRTFParser::NextToken( int nToken )
case RTF_REVAUTH:
{
- sw::util::AuthorInfo aEntry( static_cast< USHORT >(nTokenValue) );
- USHORT nPos;
+ sw::util::AuthorInfo aEntry( static_cast< sal_uInt16 >(nTokenValue) );
+ sal_uInt16 nPos;
if(pRedlineInsert)
{
@@ -1799,7 +1813,7 @@ void SwRTFParser::NextToken( int nToken )
case RTF_REVAUTHDEL:
{
sw::util::AuthorInfo aEntry( static_cast< short >(nTokenValue) );
- USHORT nPos;
+ sal_uInt16 nPos;
if(pRedlineDelete)
{
@@ -1831,17 +1845,17 @@ void SwRTFParser::NextToken( int nToken )
{
// Zeichengebundener Fly in Fly
ReadHeaderFooter( nToken );
- SetPardTokenRead( FALSE );
+ SetPardTokenRead( sal_False );
}
break;
case RTF_PGDSCNO:
if( IsNewDoc() && bSwPageDesc &&
- USHORT(nTokenValue) < pDoc->GetPageDescCnt() )
+ sal_uInt16(nTokenValue) < pDoc->GetPageDescCnt() )
{
const SwPageDesc* pPgDsc =
&const_cast<const SwDoc *>(pDoc)
- ->GetPageDesc( USHORT(nTokenValue) );
+ ->GetPageDesc( sal_uInt16(nTokenValue) );
CheckInsNewTblLine();
pDoc->InsertPoolItem(*pPam, SwFmtPageDesc( pPgDsc ), 0);
}
@@ -1862,8 +1876,8 @@ void SwRTFParser::NextToken( int nToken )
case RTF_CHDATEL: eDateFmt = DF_LSYS; goto SETCHDATEFIELD;
SETCHDATEFIELD:
{
- USHORT nSubType = DATEFLD, nWhich = RES_DATEFLD;
- ULONG nFormat = eDateFmt;
+ sal_uInt16 nSubType = DATEFLD, nWhich = RES_DATEFLD;
+ sal_uLong nFormat = eDateFmt;
sw3io_ConvertFromOldField( *pDoc, nWhich, nSubType, nFormat, 0x0110 );
SwDateTimeField aDateFld( (SwDateTimeFieldType*)
@@ -1875,8 +1889,8 @@ SETCHDATEFIELD:
case RTF_CHTIME:
{
- USHORT nSubType = TIMEFLD, nWhich = RES_TIMEFLD;
- ULONG nFormat = TF_SSMM_24;
+ sal_uInt16 nSubType = TIMEFLD, nWhich = RES_TIMEFLD;
+ sal_uLong nFormat = TF_SSMM_24;
sw3io_ConvertFromOldField( *pDoc, nWhich, nSubType, nFormat, 0x0110 );
SwDateTimeField aTimeFld( (SwDateTimeFieldType*)
pDoc->GetSysFldType( RES_DATETIMEFLD ), TIMEFLD, nFormat);
@@ -1896,21 +1910,21 @@ SETCHDATEFIELD:
break;
case RTF_CHFTN:
- bFootnoteAutoNum = TRUE;
+ bFootnoteAutoNum = sal_True;
break;
case RTF_NOFPAGES:
if( IsNewDoc() && nTokenValue && -1 != nTokenValue )
- ((SwDocStat&)pDoc->GetDocStat()).nPage = (USHORT)nTokenValue;
+ ((SwDocStat&)pDoc->GetDocStat()).nPage = (sal_uInt16)nTokenValue;
break;
case RTF_NOFWORDS:
if( IsNewDoc() && nTokenValue && -1 != nTokenValue )
- ((SwDocStat&)pDoc->GetDocStat()).nWord = (USHORT)nTokenValue;
+ ((SwDocStat&)pDoc->GetDocStat()).nWord = (sal_uInt16)nTokenValue;
break;
case RTF_NOFCHARS:
if( IsNewDoc() && nTokenValue && -1 != nTokenValue )
- ((SwDocStat&)pDoc->GetDocStat()).nChar = (USHORT)nTokenValue;
+ ((SwDocStat&)pDoc->GetDocStat()).nChar = (sal_uInt16)nTokenValue;
break;
case RTF_LYTPRTMET:
if (IsNewDoc())
@@ -2053,7 +2067,7 @@ bool SwRTFParser::UncompressableStackEntry(const SvxRTFItemStackType &rSet)
{
if (SFX_ITEM_SET ==
- rSet.GetAttrSet().GetItemState(RES_TXTATR_CHARFMT, FALSE))
+ rSet.GetAttrSet().GetItemState(RES_TXTATR_CHARFMT, sal_False))
{
bRet = true;
}
@@ -2067,7 +2081,7 @@ void SwRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos, xub_StrLen& rCntPos )
SwCntntNode* pNode = pDoc->GetNodes().GoPrevious( &aIdx );
if( !pNode )
{
- OSL_ENSURE( FALSE, "keinen vorherigen ContentNode gefunden" );
+ OSL_ENSURE( sal_False, "keinen vorherigen ContentNode gefunden" );
}
rpNodePos = new SwNodeIdx( aIdx );
@@ -2076,7 +2090,7 @@ void SwRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos, xub_StrLen& rCntPos )
void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
{
- ULONG nSNd = rSet.GetSttNodeIdx(), nENd = rSet.GetEndNodeIdx();
+ sal_uLong nSNd = rSet.GetSttNodeIdx(), nENd = rSet.GetEndNodeIdx();
xub_StrLen nSCnt = rSet.GetSttCnt(), nECnt = rSet.GetEndCnt();
SwPaM aPam( *pPam->GetPoint() );
@@ -2122,7 +2136,7 @@ void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
// aus dem Set loeschen. Sonst sind diese doppelt, was man ja
// nicht will.
if( SFX_ITEM_SET == rSet.GetAttrSet().GetItemState(
- RES_TXTATR_CHARFMT, FALSE, &pCharFmt ) &&
+ RES_TXTATR_CHARFMT, sal_False, &pCharFmt ) &&
((SwFmtCharFmt*)pCharFmt)->GetCharFmt() )
{
const String& rName = ((SwFmtCharFmt*)pCharFmt)->GetCharFmt()->GetName();
@@ -2135,12 +2149,12 @@ void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
SfxItemSet &rAttrSet = rSet.GetAttrSet(),
&rStyleSet = pStyle->aAttrSet;
SfxItemIter aIter( rAttrSet );
- USHORT nWhich = aIter.GetCurItem()->Which();
- while( TRUE )
+ sal_uInt16 nWhich = aIter.GetCurItem()->Which();
+ while( sal_True )
{
const SfxPoolItem* pI;
if( SFX_ITEM_SET == rStyleSet.GetItemState(
- nWhich, FALSE, &pI ) && *pI == *aIter.GetCurItem())
+ nWhich, sal_False, &pI ) && *pI == *aIter.GetCurItem())
rAttrSet.ClearItem( nWhich ); // loeschen
if( aIter.IsAtEnd() )
@@ -2164,22 +2178,22 @@ void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
}
if( SFX_ITEM_SET == rSet.GetAttrSet().GetItemState(
- FN_PARAM_NUM_LEVEL, FALSE, &pItem ))
+ FN_PARAM_NUM_LEVEL, sal_False, &pItem ))
{
// dann ueber den Bereich an den Nodes das NodeNum setzen
- for( ULONG n = nSNd; n <= nENd; ++n )
+ for( sal_uLong n = nSNd; n <= nENd; ++n )
{
SwTxtNode* pTxtNd = pDoc->GetNodes()[ n ]->GetTxtNode();
if( pTxtNd )
{
- pTxtNd->SetAttrListLevel((BYTE) ((SfxUInt16Item*)pItem)->GetValue());
+ pTxtNd->SetAttrListLevel((sal_uInt8) ((SfxUInt16Item*)pItem)->GetValue());
// Update vom LR-Space abschalten?
}
}
}
if( SFX_ITEM_SET == rSet.GetAttrSet().GetItemState(
- RES_PARATR_NUMRULE, FALSE, &pItem ))
+ RES_PARATR_NUMRULE, sal_False, &pItem ))
{
const SwNumRule* pRule = pDoc->FindNumRulePtr(
((SwNumRuleItem*)pItem)->GetValue() );
@@ -2188,13 +2202,13 @@ void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
// diese Rule hat keinen Level, also muss die Einrueckung
// erhalten bleiben!
// dann ueber den Bereich an den Nodes das Flag zuruecksetzen
- for( ULONG n = nSNd; n <= nENd; ++n )
+ for( sal_uLong n = nSNd; n <= nENd; ++n )
{
SwTxtNode* pTxtNd = pDoc->GetNodes()[ n ]->GetTxtNode();
if( pTxtNd )
{
// Update vom LR-Space abschalten
- pTxtNd->SetNumLSpace( FALSE );
+ pTxtNd->SetNumLSpace( sal_False );
}
}
}
@@ -2211,7 +2225,7 @@ void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
if (bNoNum)
{
- for( ULONG n = nSNd; n <= nENd; ++n )
+ for( sal_uLong n = nSNd; n <= nENd; ++n )
{
SwTxtNode* pTxtNd = pDoc->GetNodes()[ n ]->GetTxtNode();
if( pTxtNd )
@@ -2288,8 +2302,8 @@ void SwRTFParser::SetPageInformationAsDefault(const DocPageInformation &rInfo)
{
SwFmtFrmSize aFrmSize(ATT_FIX_SIZE, rInfo.mnPaperw, rInfo.mnPaperh);
- SvxLRSpaceItem aLR( static_cast< USHORT >(rInfo.mnMargl), static_cast< USHORT >(rInfo.mnMargr), 0, 0, RES_LR_SPACE );
- SvxULSpaceItem aUL( static_cast< USHORT >(rInfo.mnMargt), static_cast< USHORT >(rInfo.mnMargb), RES_UL_SPACE );
+ SvxLRSpaceItem aLR( static_cast< sal_uInt16 >(rInfo.mnMargl), static_cast< sal_uInt16 >(rInfo.mnMargr), 0, 0, RES_LR_SPACE );
+ SvxULSpaceItem aUL( static_cast< sal_uInt16 >(rInfo.mnMargt), static_cast< sal_uInt16 >(rInfo.mnMargb), RES_UL_SPACE );
UseOnPage eUseOn;
if (rInfo.mbFacingp)
@@ -2297,7 +2311,7 @@ void SwRTFParser::SetPageInformationAsDefault(const DocPageInformation &rInfo)
else
eUseOn = UseOnPage(nsUseOnPage::PD_ALL | nsUseOnPage::PD_HEADERSHARE | nsUseOnPage::PD_FOOTERSHARE);
- USHORT nPgStart = static_cast< USHORT >(rInfo.mnPgnStart);
+ sal_uInt16 nPgStart = static_cast< sal_uInt16 >(rInfo.mnPgnStart);
SvxFrameDirectionItem aFrmDir(rInfo.mbRTLdoc ?
FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR);
@@ -2331,7 +2345,7 @@ void SwRTFParser::SetBorderLine(SvxBoxItem& rBox, sal_uInt16 nLine)
int bWeiter = true;
short nLineThickness = 1;
short nPageDistance = 0;
- BYTE nCol = 0;
+ sal_uInt8 nCol = 0;
short nIdx = 0;
int nToken = GetNextToken();
@@ -2444,10 +2458,10 @@ void SwRTFParser::ReadDocControls( int nToken )
SwEndNoteInfo aEndInfo;
bool bSetHyph = false;
- BOOL bEndInfoChgd = FALSE, bFtnInfoChgd = FALSE;
+ sal_Bool bEndInfoChgd = sal_False, bFtnInfoChgd = sal_False;
do {
- USHORT nValue = USHORT( nTokenValue );
+ sal_uInt16 nValue = sal_uInt16( nTokenValue );
switch( nToken )
{
case RTF_RTLDOC:
@@ -2491,11 +2505,11 @@ void SwRTFParser::ReadDocControls( int nToken )
break;
case RTF_ENDDOC:
case RTF_ENDNOTES:
- aFtnInfo.ePos = FTNPOS_CHAPTER; bFtnInfoChgd = TRUE;
+ aFtnInfo.ePos = FTNPOS_CHAPTER; bFtnInfoChgd = sal_True;
break;
case RTF_FTNTJ:
case RTF_FTNBJ:
- aFtnInfo.ePos = FTNPOS_PAGE; bFtnInfoChgd = TRUE;
+ aFtnInfo.ePos = FTNPOS_PAGE; bFtnInfoChgd = sal_True;
break;
case RTF_AENDDOC:
@@ -2510,60 +2524,60 @@ void SwRTFParser::ReadDocControls( int nToken )
if( nValue )
{
aFtnInfo.nFtnOffset = nValue-1;
- bFtnInfoChgd = TRUE;
+ bFtnInfoChgd = sal_True;
}
break;
case RTF_AFTNSTART:
if( nValue )
{
aEndInfo.nFtnOffset = nValue-1;
- bEndInfoChgd = TRUE;
+ bEndInfoChgd = sal_True;
}
break;
case RTF_FTNRSTPG:
- aFtnInfo.eNum = FTNNUM_PAGE; bFtnInfoChgd = TRUE;
+ aFtnInfo.eNum = FTNNUM_PAGE; bFtnInfoChgd = sal_True;
break;
case RTF_FTNRESTART:
- aFtnInfo.eNum = FTNNUM_CHAPTER; bFtnInfoChgd = TRUE;
+ aFtnInfo.eNum = FTNNUM_CHAPTER; bFtnInfoChgd = sal_True;
break;
case RTF_FTNRSTCONT:
- aFtnInfo.eNum = FTNNUM_DOC; bFtnInfoChgd = TRUE;
+ aFtnInfo.eNum = FTNNUM_DOC; bFtnInfoChgd = sal_True;
break;
case RTF_FTNNAR:
- aFtnInfo.aFmt.SetNumberingType(SVX_NUM_ARABIC); bFtnInfoChgd = TRUE; break;
+ aFtnInfo.aFmt.SetNumberingType(SVX_NUM_ARABIC); bFtnInfoChgd = sal_True; break;
case RTF_FTNNALC:
- aFtnInfo.aFmt.SetNumberingType(SVX_NUM_CHARS_LOWER_LETTER_N); bFtnInfoChgd = TRUE; break;
+ aFtnInfo.aFmt.SetNumberingType(SVX_NUM_CHARS_LOWER_LETTER_N); bFtnInfoChgd = sal_True; break;
case RTF_FTNNAUC:
- aFtnInfo.aFmt.SetNumberingType(SVX_NUM_CHARS_UPPER_LETTER_N); bFtnInfoChgd = TRUE; break;
+ aFtnInfo.aFmt.SetNumberingType(SVX_NUM_CHARS_UPPER_LETTER_N); bFtnInfoChgd = sal_True; break;
case RTF_FTNNRLC:
- aFtnInfo.aFmt.SetNumberingType(SVX_NUM_ROMAN_LOWER); bFtnInfoChgd = TRUE; break;
+ aFtnInfo.aFmt.SetNumberingType(SVX_NUM_ROMAN_LOWER); bFtnInfoChgd = sal_True; break;
case RTF_FTNNRUC:
- aFtnInfo.aFmt.SetNumberingType(SVX_NUM_ROMAN_UPPER); bFtnInfoChgd = TRUE; break;
+ aFtnInfo.aFmt.SetNumberingType(SVX_NUM_ROMAN_UPPER); bFtnInfoChgd = sal_True; break;
case RTF_FTNNCHI:
- aFtnInfo.aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL); bFtnInfoChgd = TRUE; break;
+ aFtnInfo.aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL); bFtnInfoChgd = sal_True; break;
case RTF_AFTNNAR:
- aEndInfo.aFmt.SetNumberingType(SVX_NUM_ARABIC); bEndInfoChgd = TRUE; break;
+ aEndInfo.aFmt.SetNumberingType(SVX_NUM_ARABIC); bEndInfoChgd = sal_True; break;
case RTF_AFTNNALC:
aEndInfo.aFmt.SetNumberingType(SVX_NUM_CHARS_LOWER_LETTER_N);
- bEndInfoChgd = TRUE;
+ bEndInfoChgd = sal_True;
break;
case RTF_AFTNNAUC:
aEndInfo.aFmt.SetNumberingType(SVX_NUM_CHARS_UPPER_LETTER_N);
- bEndInfoChgd = TRUE;
+ bEndInfoChgd = sal_True;
break;
case RTF_AFTNNRLC:
aEndInfo.aFmt.SetNumberingType(SVX_NUM_ROMAN_LOWER);
- bEndInfoChgd = TRUE;
+ bEndInfoChgd = sal_True;
break;
case RTF_AFTNNRUC:
aEndInfo.aFmt.SetNumberingType(SVX_NUM_ROMAN_UPPER);
- bEndInfoChgd = TRUE;
+ bEndInfoChgd = sal_True;
break;
case RTF_AFTNNCHI:
aEndInfo.aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
- bEndInfoChgd = TRUE;
+ bEndInfoChgd = sal_True;
break;
case RTF_HYPHAUTO:
if (nTokenValue)
@@ -2603,7 +2617,7 @@ void SwRTFParser::ReadDocControls( int nToken )
if( nSkip )
{
SkipToken( nSkip ); // Ignore wieder zurueck
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
break;
@@ -2613,7 +2627,7 @@ void SwRTFParser::ReadDocControls( int nToken )
RTF_UNKNOWNCONTROL == nToken )
SvxRTFParser::NextToken( nToken );
else
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
if( bWeiter )
@@ -2665,19 +2679,19 @@ void SwRTFParser::MakeStyleTab()
// dann erzeuge aus der SvxStyle-Tabelle die Swg-Collections
if( GetStyleTbl().Count() )
{
- USHORT nValidOutlineLevels = 0;
+ sal_uInt16 nValidOutlineLevels = 0;
if( !IsNewDoc() )
{
// search all outlined collections
const SwTxtFmtColls& rColls = *pDoc->GetTxtFmtColls();
- for( USHORT n = rColls.Count(); n; )
+ for( sal_uInt16 n = rColls.Count(); n; )
if( rColls[ --n ]->IsAssignedToListLevelOfOutlineStyle())
nValidOutlineLevels |= 1 << rColls[ n ]->GetAssignedOutlineStyleLevel();//<-end,zhaojianwei
}
SvxRTFStyleType* pStyle = GetStyleTbl().First();
do {
- USHORT nNo = USHORT( GetStyleTbl().GetCurKey() );
+ sal_uInt16 nNo = sal_uInt16( GetStyleTbl().GetCurKey() );
if( pStyle->bIsCharFmt )
{
if( !aCharFmtTbl.Get( nNo ) )
@@ -2691,14 +2705,14 @@ void SwRTFParser::MakeStyleTab()
}
} while( 0 != (pStyle = GetStyleTbl().Next()) );
- bStyleTabValid = TRUE;
+ bStyleTabValid = sal_True;
}
}
-BOOL lcl_SetFmtCol( SwFmt& rFmt, USHORT nCols, USHORT nColSpace,
+sal_Bool lcl_SetFmtCol( SwFmt& rFmt, sal_uInt16 nCols, sal_uInt16 nColSpace,
const SvUShorts& rColumns )
{
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
if( nCols && USHRT_MAX != nCols )
{
SwFmtCol aCol;
@@ -2708,13 +2722,13 @@ BOOL lcl_SetFmtCol( SwFmt& rFmt, USHORT nCols, USHORT nColSpace,
aCol.Init( nCols, nColSpace, USHRT_MAX );
if( nCols == ( rColumns.Count() / 2 ) )
{
- aCol._SetOrtho( FALSE );
- USHORT nWishWidth = 0, nHalfPrev = 0;
- for( USHORT n = 0, i = 0; n < rColumns.Count(); n += 2, ++i )
+ aCol._SetOrtho( sal_False );
+ sal_uInt16 nWishWidth = 0, nHalfPrev = 0;
+ for( sal_uInt16 n = 0, i = 0; n < rColumns.Count(); n += 2, ++i )
{
SwColumn* pCol = aCol.GetColumns()[ i ];
pCol->SetLeft( nHalfPrev );
- USHORT nSp = rColumns[ n+1 ];
+ sal_uInt16 nSp = rColumns[ n+1 ];
nHalfPrev = nSp / 2;
pCol->SetRight( nSp - nHalfPrev );
pCol->SetWishWidth( rColumns[ n ] +
@@ -2724,14 +2738,14 @@ BOOL lcl_SetFmtCol( SwFmt& rFmt, USHORT nCols, USHORT nColSpace,
aCol.SetWishWidth( nWishWidth );
}
rFmt.SetFmtAttr( aCol );
- bSet = TRUE;
+ bSet = sal_True;
}
return bSet;
}
void SwRTFParser::DoHairyWriterPageDesc(int nToken)
{
- int bWeiter = TRUE;
+ int bWeiter = sal_True;
do {
if( '{' == nToken )
{
@@ -2742,7 +2756,7 @@ void SwRTFParser::DoHairyWriterPageDesc(int nToken)
& ~(0xff | RTF_SWGDEFS)) )
{
SkipToken( -2 ); // Ignore und Token wieder zurueck
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
// kein break, Gruppe ueberspringen
@@ -2762,7 +2776,7 @@ void SwRTFParser::DoHairyWriterPageDesc(int nToken)
default:
SkipToken( -1 ); // Ignore wieder zurueck
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
}
@@ -2770,7 +2784,7 @@ void SwRTFParser::DoHairyWriterPageDesc(int nToken)
RTF_UNKNOWNCONTROL == nToken )
SvxRTFParser::NextToken( nToken );
else
- bWeiter = FALSE;
+ bWeiter = sal_False;
if( bWeiter )
nToken = GetNextToken();
} while( bWeiter && IsParserWorking() );
@@ -2806,7 +2820,7 @@ void SwRTFParser::ReadSectControls( int nToken )
int bWeiter = true;
bool bKeepFooter = false;
do {
- USHORT nValue = USHORT( nTokenValue );
+ sal_uInt16 nValue = sal_uInt16( nTokenValue );
switch( nToken )
{
case RTF_SECT:
@@ -3175,10 +3189,10 @@ void SwRTFParser::ReadPageDescTbl()
int nToken, bSaveChkStyleAttr = IsChkStyleAttr();
int nNumOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
- SetChkStyleAttr(FALSE); // Attribute nicht gegen die Styles checken
+ SetChkStyleAttr(sal_False); // Attribute nicht gegen die Styles checken
bInPgDscTbl = true;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
SwPageDesc* pPg = 0;
SwFrmFmt* pPgFmt = 0;
@@ -3190,7 +3204,7 @@ void SwRTFParser::ReadPageDescTbl()
SvxFrameDirectionItem aFrmDir(FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR);
- USHORT nCols = USHRT_MAX, nColSpace = USHRT_MAX, nAktCol = 0;
+ sal_uInt16 nCols = USHRT_MAX, nColSpace = USHRT_MAX, nAktCol = 0;
SvUShorts aColumns;
while( nNumOpenBrakets && IsParserWorking() )
@@ -3239,11 +3253,11 @@ void SwRTFParser::ReadPageDescTbl()
if (nPos != pDoc->MakePageDesc(
String::CreateFromInt32(nTokenValue)))
{
- OSL_ENSURE( FALSE, "PageDesc an falscher Position" );
+ OSL_ENSURE( sal_False, "PageDesc an falscher Position" );
}
}
pPg = &pDoc->_GetPageDesc(nPos);
- pPg->SetLandscape( FALSE );
+ pPg->SetLandscape( sal_False );
pPgFmt = &pPg->GetMaster();
SETPAGEDESC_DEFAULTS();
@@ -3298,24 +3312,24 @@ void SwRTFParser::ReadPageDescTbl()
// alt: LI/RI/SA/SB, neu: MARG?SXN
case RTF_MARGLSXN:
- case RTF_LI: aLR.SetLeft( (USHORT)nTokenValue ); break;
+ case RTF_LI: aLR.SetLeft( (sal_uInt16)nTokenValue ); break;
case RTF_MARGRSXN:
- case RTF_RI: aLR.SetRight( (USHORT)nTokenValue ); break;
+ case RTF_RI: aLR.SetRight( (sal_uInt16)nTokenValue ); break;
case RTF_MARGTSXN:
- case RTF_SA: aUL.SetUpper( (USHORT)nTokenValue ); break;
+ case RTF_SA: aUL.SetUpper( (sal_uInt16)nTokenValue ); break;
case RTF_MARGBSXN:
- case RTF_SB: aUL.SetLower( (USHORT)nTokenValue ); break;
+ case RTF_SB: aUL.SetLower( (sal_uInt16)nTokenValue ); break;
case RTF_PGWSXN: aSz.SetWidth( nTokenValue ); break;
case RTF_PGHSXN: aSz.SetHeight( nTokenValue ); break;
- case RTF_HEADERY: aHUL.SetUpper( (USHORT)nTokenValue ); break;
- case RTF_HEADER_YB: aHUL.SetLower( (USHORT)nTokenValue ); break;
- case RTF_HEADER_XL: aHLR.SetLeft( (USHORT)nTokenValue ); break;
- case RTF_HEADER_XR: aHLR.SetRight( (USHORT)nTokenValue ); break;
- case RTF_FOOTERY: aFUL.SetLower( (USHORT)nTokenValue ); break;
- case RTF_FOOTER_YT: aFUL.SetUpper( (USHORT)nTokenValue ); break;
- case RTF_FOOTER_XL: aFLR.SetLeft( (USHORT)nTokenValue ); break;
- case RTF_FOOTER_XR: aFLR.SetRight( (USHORT)nTokenValue ); break;
+ case RTF_HEADERY: aHUL.SetUpper( (sal_uInt16)nTokenValue ); break;
+ case RTF_HEADER_YB: aHUL.SetLower( (sal_uInt16)nTokenValue ); break;
+ case RTF_HEADER_XL: aHLR.SetLeft( (sal_uInt16)nTokenValue ); break;
+ case RTF_HEADER_XR: aHLR.SetRight( (sal_uInt16)nTokenValue ); break;
+ case RTF_FOOTERY: aFUL.SetLower( (sal_uInt16)nTokenValue ); break;
+ case RTF_FOOTER_YT: aFUL.SetUpper( (sal_uInt16)nTokenValue ); break;
+ case RTF_FOOTER_XL: aFLR.SetLeft( (sal_uInt16)nTokenValue ); break;
+ case RTF_FOOTER_XR: aFLR.SetRight( (sal_uInt16)nTokenValue ); break;
case RTF_HEADER_YH:
if( 0 > nTokenValue )
@@ -3323,7 +3337,7 @@ void SwRTFParser::ReadPageDescTbl()
aHSz.SetHeightSizeType( ATT_FIX_SIZE );
nTokenValue = -nTokenValue;
}
- aHSz.SetHeight( (USHORT)nTokenValue );
+ aHSz.SetHeight( (sal_uInt16)nTokenValue );
break;
case RTF_FOOTER_YH:
@@ -3332,22 +3346,22 @@ void SwRTFParser::ReadPageDescTbl()
aFSz.SetHeightSizeType( ATT_FIX_SIZE );
nTokenValue = -nTokenValue;
}
- aFSz.SetHeight( (USHORT)nTokenValue );
+ aFSz.SetHeight( (sal_uInt16)nTokenValue );
break;
- case RTF_LNDSCPSXN: pPg->SetLandscape( TRUE ); break;
+ case RTF_LNDSCPSXN: pPg->SetLandscape( sal_True ); break;
- case RTF_COLS: nCols = (USHORT)nTokenValue; break;
- case RTF_COLSX: nColSpace = (USHORT)nTokenValue; break;
+ case RTF_COLS: nCols = (sal_uInt16)nTokenValue; break;
+ case RTF_COLSX: nColSpace = (sal_uInt16)nTokenValue; break;
case RTF_COLNO:
- nAktCol = (USHORT)nTokenValue;
+ nAktCol = (sal_uInt16)nTokenValue;
if( RTF_COLW == GetNextToken() )
{
- USHORT nWidth = USHORT( nTokenValue ), nSpace = 0;
+ sal_uInt16 nWidth = sal_uInt16( nTokenValue ), nSpace = 0;
if( RTF_COLSR == GetNextToken() )
- nSpace = USHORT( nTokenValue );
+ nSpace = sal_uInt16( nTokenValue );
else
SkipToken( -1 ); // wieder zurueck
@@ -3385,7 +3399,7 @@ void SwRTFParser::ReadPageDescTbl()
pPg->SetName(aToken);
// sollte es eine Vorlage aus dem Pool sein ??
- USHORT n = SwStyleNameMapper::GetPoolIdFromUIName(aToken,
+ sal_uInt16 n = SwStyleNameMapper::GetPoolIdFromUIName(aToken,
nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC);
if (USHRT_MAX != n)
{
@@ -3426,9 +3440,9 @@ void SwRTFParser::ReadPageDescTbl()
for( nPos = 0; nPos < pDoc->GetPageDescCnt(); ++nPos )
{
SwPageDesc* pPgDsc = &pDoc->_GetPageDesc( nPos );
- if( (USHORT)(long)pPgDsc->GetFollow() < pDoc->GetPageDescCnt() )
+ if( (sal_uInt16)(long)pPgDsc->GetFollow() < pDoc->GetPageDescCnt() )
pPgDsc->SetFollow(& const_cast<const SwDoc *>(pDoc)
- ->GetPageDesc((USHORT)(long)
+ ->GetPageDesc((sal_uInt16)(long)
pPgDsc->GetFollow()));
}
@@ -3453,7 +3467,7 @@ void SwRTFParser::ReadPrtData()
SkipToken( -1 ); // schliessende Klammer wieder zurueck!!
}
-static const SwNodeIndex* SetHeader(SwFrmFmt* pHdFtFmt, BOOL bReuseOld)
+static const SwNodeIndex* SetHeader(SwFrmFmt* pHdFtFmt, sal_Bool bReuseOld)
{
OSL_ENSURE(pHdFtFmt, "Impossible, no header");
const SwFrmFmt* pExisting = bReuseOld ?
@@ -3461,13 +3475,13 @@ static const SwNodeIndex* SetHeader(SwFrmFmt* pHdFtFmt, BOOL bReuseOld)
if (!pExisting)
{
//No existing header, create a new one
- pHdFtFmt->SetFmtAttr(SwFmtHeader(TRUE));
+ pHdFtFmt->SetFmtAttr(SwFmtHeader(sal_True));
pExisting = pHdFtFmt->GetHeader().GetHeaderFmt();
}
return pExisting->GetCntnt().GetCntntIdx();
}
-static const SwNodeIndex* SetFooter(SwFrmFmt* pHdFtFmt, BOOL bReuseOld)
+static const SwNodeIndex* SetFooter(SwFrmFmt* pHdFtFmt, sal_Bool bReuseOld)
{
OSL_ENSURE(pHdFtFmt, "Impossible, no footer");
const SwFrmFmt* pExisting = bReuseOld ?
@@ -3475,7 +3489,7 @@ static const SwNodeIndex* SetFooter(SwFrmFmt* pHdFtFmt, BOOL bReuseOld)
if (!pExisting)
{
//No exist footer, create a new one
- pHdFtFmt->SetFmtAttr(SwFmtFooter(TRUE));
+ pHdFtFmt->SetFmtAttr(SwFmtFooter(sal_True));
pExisting = pHdFtFmt->GetFooter().GetFooterFmt();
}
return pExisting->GetCntnt().GetCntntIdx();
@@ -3486,28 +3500,27 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
{
OSL_ENSURE( RTF_FOOTNOTE == nToken ||
RTF_FLY_INPARA == nToken ||
- pPageDesc, "PageDesc fehlt" );
+ pPageDesc, "PageDesc is missing" );
bool bContainsParaCache = bContainsPara;
- // alle wichtigen Sachen sichern
+ // backup all important data
SwPosition aSavePos( *pPam->GetPoint() );
- SvxRTFItemStack aSaveStack;
- aSaveStack.Insert( &GetAttrStack(), 0 );
- GetAttrStack().Remove( 0, GetAttrStack().Count() );
+ SvxRTFItemStack aSaveStack(GetAttrStack());
+ GetAttrStack().clear();
// save the fly array - after read, all flys may be set into
// the header/footer
SwFlySaveArr aSaveArray( 255 < aFlyArr.Count() ? aFlyArr.Count() : 255 );
aSaveArray.Insert( &aFlyArr, 0 );
aFlyArr.Remove( 0, aFlyArr.Count() );
- BOOL bSetFlyInDoc = TRUE;
+ sal_Bool bSetFlyInDoc = sal_True;
const SwNodeIndex* pSttIdx = 0;
SwFrmFmt* pHdFtFmt = 0;
SwTxtAttr* pTxtAttr = 0;
- int bDelFirstChar = FALSE;
+ int bDelFirstChar = sal_False;
bool bOldIsFootnote = mbIsFootnote;
- BOOL bOldGrpStt = sal::static_int_cast< BOOL, int >(IsNewGroup());
+ sal_Bool bOldGrpStt = sal::static_int_cast< sal_Bool, int >(IsNewGroup());
int nNumOpenBrakets = GetOpenBrakets() - 1;
@@ -3529,7 +3542,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
nPos--;
aFtnNote.SetNumStr( pTxtNd->GetTxt().GetChar( nPos ) );
((String&)pTxtNd->GetTxt()).SetChar( nPos, CH_TXTATR_INWORD );
- bDelFirstChar = TRUE;
+ bDelFirstChar = sal_True;
}
pTxtAttr = pTxtNd->InsertItem( aFtnNote, nPos, nPos,
@@ -3543,7 +3556,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
// wurde an der Position ein Escapement aufgespannt, so entferne
// das jetzt. Fussnoten sind bei uns immer hochgestellt.
- SvxRTFItemStackTypePtr pTmp = aSaveStack.Top();
+ SvxRTFItemStackTypePtr pTmp = aSaveStack.empty() ? 0 : aSaveStack.back();
if( pTmp && pTmp->GetSttNodeIdx() ==
pPam->GetPoint()->nNode.GetIndex() &&
pTmp->GetSttCnt() == nPos )
@@ -3565,7 +3578,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
OSL_ENSURE( pTxtAttr, "konnte den Fly nicht einfuegen/finden" );
pSttIdx = pHdFtFmt->GetCntnt().GetCntntIdx();
- bSetFlyInDoc = FALSE;
+ bSetFlyInDoc = sal_False;
}
break;
@@ -3573,50 +3586,50 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
case RTF_HEADER:
pPageDesc->WriteUseOn( (UseOnPage)(pPageDesc->ReadUseOn() | nsUseOnPage::PD_HEADERSHARE) );
pHdFtFmt = &pPageDesc->GetMaster();
- pSttIdx = SetHeader( pHdFtFmt, FALSE );
+ pSttIdx = SetHeader( pHdFtFmt, sal_False );
break;
case RTF_HEADERL:
// we cannot have left or right, must have always both
pPageDesc->WriteUseOn( (UseOnPage)((pPageDesc->ReadUseOn() & ~nsUseOnPage::PD_HEADERSHARE) | nsUseOnPage::PD_ALL));
- SetHeader( pPageDesc->GetRightFmt(), TRUE );
+ SetHeader( pPageDesc->GetRightFmt(), sal_True );
pHdFtFmt = pPageDesc->GetLeftFmt();
- pSttIdx = SetHeader(pHdFtFmt, FALSE );
+ pSttIdx = SetHeader(pHdFtFmt, sal_False );
break;
case RTF_HEADERR:
// we cannot have left or right, must have always both
pPageDesc->WriteUseOn( (UseOnPage)((pPageDesc->ReadUseOn() & ~nsUseOnPage::PD_HEADERSHARE) | nsUseOnPage::PD_ALL));
- SetHeader( pPageDesc->GetLeftFmt(), TRUE );
+ SetHeader( pPageDesc->GetLeftFmt(), sal_True );
pHdFtFmt = pPageDesc->GetRightFmt();
- pSttIdx = SetHeader(pHdFtFmt, FALSE );
+ pSttIdx = SetHeader(pHdFtFmt, sal_False );
break;
case RTF_FOOTERF:
case RTF_FOOTER:
pPageDesc->WriteUseOn( (UseOnPage)(pPageDesc->ReadUseOn() | nsUseOnPage::PD_FOOTERSHARE) );
pHdFtFmt = &pPageDesc->GetMaster();
- pSttIdx = SetFooter(pHdFtFmt, FALSE );
+ pSttIdx = SetFooter(pHdFtFmt, sal_False );
break;
case RTF_FOOTERL:
// we cannot have left or right, must have always both
pPageDesc->WriteUseOn( (UseOnPage)((pPageDesc->ReadUseOn() & ~nsUseOnPage::PD_FOOTERSHARE) | nsUseOnPage::PD_ALL));
- SetFooter( pPageDesc->GetRightFmt(), TRUE );
+ SetFooter( pPageDesc->GetRightFmt(), sal_True );
pHdFtFmt = pPageDesc->GetLeftFmt();
- pSttIdx = SetFooter(pHdFtFmt, FALSE );
+ pSttIdx = SetFooter(pHdFtFmt, sal_False );
break;
case RTF_FOOTERR:
// we cannot have left or right, must have always both
pPageDesc->WriteUseOn( (UseOnPage)((pPageDesc->ReadUseOn() & ~nsUseOnPage::PD_FOOTERSHARE) | nsUseOnPage::PD_ALL));
- SetFooter( pPageDesc->GetLeftFmt(), TRUE );
+ SetFooter( pPageDesc->GetLeftFmt(), sal_True );
pHdFtFmt = pPageDesc->GetRightFmt();
- pSttIdx = SetFooter(pHdFtFmt, FALSE );
+ pSttIdx = SetFooter(pHdFtFmt, sal_False );
break;
}
- USHORT nOldFlyArrCnt = aFlyArr.Count();
+ sal_uInt16 nOldFlyArrCnt = aFlyArr.Count();
if( !pSttIdx )
SkipGroup();
else
@@ -3636,7 +3649,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
pColl = pDoc->GetTxtCollFromPool( RES_POOLCOLL_STANDARD, false );
pDoc->SetTxtFmtColl( *pPam, pColl );
- SetNewGroup( TRUE );
+ SetNewGroup( sal_True );
while( !( nNumOpenBrakets == GetOpenBrakets() && !GetStackPos()) && IsParserWorking() )
{
@@ -3645,7 +3658,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
case RTF_U:
if( bDelFirstChar )
{
- bDelFirstChar = FALSE;
+ bDelFirstChar = sal_False;
nToken = 0;
}
break;
@@ -3655,7 +3668,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
{
if( !aToken.Erase( 0, 1 ).Len() )
nToken = 0;
- bDelFirstChar = FALSE;
+ bDelFirstChar = sal_False;
}
break;
}
@@ -3693,16 +3706,16 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
}
}
- bFootnoteAutoNum = FALSE; // default auf aus!
+ bFootnoteAutoNum = sal_False; // default auf aus!
// und alles wieder zurueck
*pPam->GetPoint() = aSavePos;
if (mbIsFootnote)
SetNewGroup( bOldGrpStt ); // Status wieder zurueck
else
- SetNewGroup( FALSE ); // { - Klammer war kein Group-Start!
+ SetNewGroup( sal_False ); // { - Klammer war kein Group-Start!
mbIsFootnote = bOldIsFootnote;
- GetAttrStack().Insert( &aSaveStack, 0 );
+ GetAttrStack() = aSaveStack;
aFlyArr.Insert( &aSaveArray, 0 );
aSaveArray.Remove( 0, aSaveArray.Count() );
@@ -3713,7 +3726,7 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
{
const SfxPoolItem* pItem;
// Escapement korrigieren
- if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_ESCAPEMENT, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_ESCAPEMENT, sal_False, &pItem ))
{
/* prozentuale Veraenderung errechnen !
* Formel : (FontSize * 1/20 ) pts Escapement * 2
@@ -3738,7 +3751,7 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
}
// TabStops anpassen
- if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_TABSTOP, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_TABSTOP, sal_False, &pItem ))
{
const SvxLRSpaceItem& rLR = GetLRSpace( rSet );
SvxTabStopItem aTStop( *(SvxTabStopItem*)pItem );
@@ -3748,7 +3761,7 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
{
// Tabs anpassen !!
SvxTabStop* pTabs = (SvxTabStop*)aTStop.GetStart();
- for( USHORT n = aTStop.Count(); n; --n, ++pTabs)
+ for( sal_uInt16 n = aTStop.Count(); n; --n, ++pTabs)
if( SVX_TAB_ADJUST_DEFAULT != pTabs->GetAdjustment() )
pTabs->GetTabPos() -= nOffset;
@@ -3766,7 +3779,7 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
}
rSet.Put( aTStop );
}
- else if( SFX_ITEM_SET == rSet.GetItemState( RES_LR_SPACE, FALSE, &pItem )
+ else if( SFX_ITEM_SET == rSet.GetItemState( RES_LR_SPACE, sal_False, &pItem )
&& ((SvxLRSpaceItem*)pItem)->GetTxtFirstLineOfst() < 0 )
{
// negativer Einzug, dann auf 0 Pos einen Tab setzen
@@ -3775,7 +3788,7 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
// NumRules anpassen
if( !bStyleTabValid &&
- SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, FALSE, &pItem ))
+ SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, sal_False, &pItem ))
{
// dann steht im Namen nur ein Verweis in das ListArray
SwNumRule* pRule = GetNumRuleOfListNo( ((SwNumRuleItem*)pItem)->
@@ -3790,10 +3803,10 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
}
-SwTxtFmtColl* SwRTFParser::MakeColl(const String& rName, USHORT nPos,
- BYTE nOutlineLevel, bool& rbCollExist)
+SwTxtFmtColl* SwRTFParser::MakeColl(const String& rName, sal_uInt16 nPos,
+ sal_uInt8 nOutlineLevel, bool& rbCollExist)
{
- if( BYTE(-1) == nOutlineLevel )
+ if( sal_uInt8(-1) == nOutlineLevel )
nOutlineLevel = MAXLEVEL;
rbCollExist = false;
@@ -3839,10 +3852,10 @@ SwTxtFmtColl* SwRTFParser::MakeColl(const String& rName, USHORT nPos,
return pColl;
}
-SwCharFmt* SwRTFParser::MakeCharFmt(const String& rName, USHORT nPos,
+SwCharFmt* SwRTFParser::MakeCharFmt(const String& rName, sal_uInt16 nPos,
int& rbCollExist)
{
- rbCollExist = FALSE;
+ rbCollExist = sal_False;
SwCharFmt* pFmt;
String aNm( rName );
if( !aNm.Len() )
@@ -3876,10 +3889,10 @@ void SwRTFParser::SetStyleAttr( SfxItemSet& rCollSet,
// suche alle Attribute, die neu gesetzt werden:
const SfxPoolItem* pItem;
SfxItemIter aIter( rDerivedSet );
- USHORT nWhich = aIter.GetCurItem()->Which();
- while( TRUE )
+ sal_uInt16 nWhich = aIter.GetCurItem()->Which();
+ while( sal_True )
{
- switch( rStyleSet.GetItemState( nWhich, FALSE, &pItem ) )
+ switch( rStyleSet.GetItemState( nWhich, sal_False, &pItem ) )
{
case SFX_ITEM_DEFAULT:
// auf default zuruecksetzen
@@ -3902,10 +3915,10 @@ void SwRTFParser::SetStyleAttr( SfxItemSet& rCollSet,
SetSwgValues( rCollSet );
}
-SwTxtFmtColl* SwRTFParser::MakeStyle( USHORT nNo, const SvxRTFStyleType& rStyle)
+SwTxtFmtColl* SwRTFParser::MakeStyle( sal_uInt16 nNo, const SvxRTFStyleType& rStyle)
{
bool bCollExist;
- SwTxtFmtColl* pColl = MakeColl( rStyle.sName, USHORT(nNo),
+ SwTxtFmtColl* pColl = MakeColl( rStyle.sName, sal_uInt16(nNo),
rStyle.nOutlineNo, bCollExist);
aTxtCollTbl.Insert( nNo, pColl );
@@ -3913,7 +3926,7 @@ SwTxtFmtColl* SwRTFParser::MakeStyle( USHORT nNo, const SvxRTFStyleType& rStyle)
if( bCollExist )
return pColl;
- USHORT nStyleNo = rStyle.nBasedOn;
+ sal_uInt16 nStyleNo = rStyle.nBasedOn;
if( rStyle.bBasedOnIsSet && nStyleNo != nNo )
{
SvxRTFStyleType* pDerivedStyle = GetStyleTbl().Get( nStyleNo );
@@ -3964,17 +3977,17 @@ SwTxtFmtColl* SwRTFParser::MakeStyle( USHORT nNo, const SvxRTFStyleType& rStyle)
return pColl;
}
-SwCharFmt* SwRTFParser::MakeCharStyle( USHORT nNo, const SvxRTFStyleType& rStyle )
+SwCharFmt* SwRTFParser::MakeCharStyle( sal_uInt16 nNo, const SvxRTFStyleType& rStyle )
{
int bCollExist;
- SwCharFmt* pFmt = MakeCharFmt( rStyle.sName, USHORT(nNo), bCollExist );
+ SwCharFmt* pFmt = MakeCharFmt( rStyle.sName, sal_uInt16(nNo), bCollExist );
aCharFmtTbl.Insert( nNo, pFmt );
// in bestehendes Dok einfuegen, dann keine Ableitung usw. setzen
if( bCollExist )
return pFmt;
- USHORT nStyleNo = rStyle.nBasedOn;
+ sal_uInt16 nStyleNo = rStyle.nBasedOn;
if( rStyle.bBasedOnIsSet && nStyleNo != nNo )
{
SvxRTFStyleType* pDerivedStyle = GetStyleTbl().Get( nStyleNo );
@@ -4018,10 +4031,10 @@ void SwRTFParser::DelLastNode()
if( !pPam->GetPoint()->nContent.GetIndex() )
{
- ULONG nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
SwCntntNode* pCNd = pDoc->GetNodes()[ nNodeIdx ]->GetCntntNode();
// paragraphs with page break information are not empty!)
- if(const SfxPoolItem* pItem=&(pCNd->GetAttr( RES_PAGEDESC, FALSE)))
+ if(const SfxPoolItem* pItem=&(pCNd->GetAttr( RES_PAGEDESC, sal_False)))
{
SwFmtPageDesc* pPageDescItem = ((SwFmtPageDesc*)pItem);
if (pPageDescItem->GetPageDesc()!=NULL)
@@ -4031,12 +4044,12 @@ void SwRTFParser::DelLastNode()
if( pCNd && pCNd->StartOfSectionIndex()+2 <
pCNd->EndOfSectionIndex() )
{
- if( GetAttrStack().Count() )
+ if( !GetAttrStack().empty() )
{
// Attribut Stack-Eintraege, muessen ans Ende des vorherigen
// Nodes verschoben werden.
- BOOL bMove = FALSE;
- for( USHORT n = GetAttrStack().Count(); n; )
+ sal_Bool bMove = sal_False;
+ for( size_t n = GetAttrStack().size(); n; )
{
SvxRTFItemStackType* pStkEntry = (SvxRTFItemStackType*)
GetAttrStack()[ --n ];
@@ -4045,7 +4058,7 @@ void SwRTFParser::DelLastNode()
if( !bMove )
{
pPam->Move( fnMoveBackward );
- bMove = TRUE;
+ bMove = sal_True;
}
pStkEntry->SetStartPos( SwxPosition( pPam ) );
}
@@ -4077,7 +4090,7 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
// Crsr nicht mehr in der Tabelle ?
if( !pPam->GetNode()->FindTableNode() && _do )
{
- ULONG nOldPos = pPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nOldPos = pPam->GetPoint()->nNode.GetIndex();
// dann wieder in die letzte Box setzen
// (kann durch einlesen von Flys geschehen!)
@@ -4088,7 +4101,7 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
// auf die neue Box umsetzen !!
SvxRTFItemStack& rAttrStk = GetAttrStack();
const SvxRTFItemStackType* pStk;
- for( USHORT n = 0; n < rAttrStk.Count(); ++n )
+ for( size_t n = 0; n < rAttrStk.size(); ++n )
if( ( pStk = rAttrStk[ n ])->GetSttNodeIdx() == nOldPos &&
!pStk->GetSttCnt() )
((SvxRTFItemStackType*)pStk)->SetStartPos( SwxPosition( pPam ) );
@@ -4112,10 +4125,10 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
case RTF_PGDSCNO:
if( IsNewDoc() && bSwPageDesc &&
- USHORT(nTokenValue) < pDoc->GetPageDescCnt() )
+ sal_uInt16(nTokenValue) < pDoc->GetPageDescCnt() )
{
const SwPageDesc* pPgDsc = &const_cast<const SwDoc *>(pDoc)
- ->GetPageDesc( (USHORT)nTokenValue );
+ ->GetPageDesc( (sal_uInt16)nTokenValue );
pDoc->InsertPoolItem( *pPam, SwFmtPageDesc( pPgDsc ), 0);
}
break;
@@ -4138,7 +4151,7 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
if( pRule )
pSet->Put( SwNumRuleItem( pRule->GetName() ));
- if( SFX_ITEM_SET != pSet->GetItemState( FN_PARAM_NUM_LEVEL, FALSE ))
+ if( SFX_ITEM_SET != pSet->GetItemState( FN_PARAM_NUM_LEVEL, sal_False ))
pSet->Put( SfxUInt16Item( FN_PARAM_NUM_LEVEL, 0 ));
}
else
@@ -4154,8 +4167,8 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
case RTF_ILVL:
case RTF_SOUTLVL:
{
- BYTE nLevel = MAXLEVEL <= nTokenValue ? MAXLEVEL - 1
- : BYTE( nTokenValue );
+ sal_uInt8 nLevel = MAXLEVEL <= nTokenValue ? MAXLEVEL - 1
+ : sal_uInt8( nTokenValue );
pSet->Put( SfxUInt16Item( FN_PARAM_NUM_LEVEL, nLevel ));
}
break;
@@ -4257,7 +4270,7 @@ bool BookmarkPosition::operator==(const BookmarkPosition rhs)
return(maMkNode.GetIndex() == rhs.maMkNode.GetIndex() && mnMkCntnt == rhs.mnMkCntnt);
}
-ULONG SwNodeIdx::GetIdx() const
+sal_uLong SwNodeIdx::GetIdx() const
{
return aIdx.GetIndex();
}
@@ -4277,7 +4290,7 @@ SvxNodeIdx* SwxPosition::MakeNodeIdx() const
return new SwNodeIdx( pPam->GetPoint()->nNode );
}
-ULONG SwxPosition::GetNodeIdx() const
+sal_uLong SwxPosition::GetNodeIdx() const
{
return pPam->GetPoint()->nNode.GetIndex();
}
diff --git a/sw/source/filter/rtf/swparrtf.hxx b/sw/source/filter/rtf/swparrtf.hxx
index 25ae536133d5..fe87687554d5 100644
--- a/sw/source/filter/rtf/swparrtf.hxx
+++ b/sw/source/filter/rtf/swparrtf.hxx
@@ -29,7 +29,6 @@
#ifndef _SWPARRTF_HXX
#define _SWPARRTF_HXX
-#include <map>
#include <deque>
#include <vector>
@@ -37,15 +36,15 @@
#include <editeng/numitem.hxx>
#include <editeng/boxitem.hxx>
#include <redline.hxx>
-#include <algorithm>
+
#include <fltshell.hxx> // fuer den Attribut Stack
#include <ndindex.hxx>
#include "../inc/msfilter.hxx"
#include <svx/svdobj.hxx>
-extern void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, BYTE nCol, short nIdx,
- USHORT nOOIndex, USHORT nWWIndex, short *pSize);
+extern void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, sal_uInt8 nCol, short nIdx,
+ sal_uInt16 nOOIndex, sal_uInt16 nWWIndex, short *pSize);
class Font;
class Graphic;
@@ -68,9 +67,9 @@ struct SvxRTFPictureType;
class RtfReader: public Reader
{
- virtual ULONG Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+ virtual sal_uLong Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
public:
- virtual ULONG Read( SvStream* pStrm, SwDoc &, const String& rBaseURL, SwPaM &);
+ virtual sal_uLong Read( SvStream* pStrm, SwDoc &, const String& rBaseURL, SwPaM &);
};
class SwNodeIdx : public SvxNodeIdx
@@ -78,7 +77,7 @@ class SwNodeIdx : public SvxNodeIdx
SwNodeIndex aIdx;
public:
SwNodeIdx( const SwNodeIndex& rIdx ) : aIdx( rIdx ) {}
- virtual ULONG GetIdx() const;
+ virtual sal_uLong GetIdx() const;
virtual SvxNodeIdx* Clone() const;
};
@@ -103,7 +102,7 @@ class SwxPosition : public SvxPosition
public:
SwxPosition( SwPaM* pCrsr ) : pPam( pCrsr ) {}
- virtual ULONG GetNodeIdx() const;
+ virtual sal_uLong GetNodeIdx() const;
virtual xub_StrLen GetCntIdx() const;
// erzeuge von sich selbst eine Kopie
@@ -120,7 +119,7 @@ struct SwFlySave
SwNodeIndex nSttNd, nEndNd;
xub_StrLen nEndCnt;
SwTwips nPageWidth;
- USHORT nDropLines, nDropAnchor;
+ sal_uInt16 nDropLines, nDropAnchor;
SwFlySave( const SwPaM& rPam, SfxItemSet& rSet );
int IsEqualFly( const SwPaM& rPos, SfxItemSet& rSet );
@@ -130,27 +129,27 @@ struct SwFlySave
struct SwListEntry
{
long nListId, nListTemplateId, nListNo;
- USHORT nListDocPos;
- BOOL bRuleUsed;
+ sal_uInt16 nListDocPos;
+ sal_Bool bRuleUsed;
SwListEntry()
: nListId( 0 ), nListTemplateId( 0 ), nListNo( 0 ), nListDocPos( 0 ),
- bRuleUsed( FALSE )
+ bRuleUsed( sal_False )
{}
- SwListEntry( long nLstId, long nLstTmplId, USHORT nLstDocPos )
+ SwListEntry( long nLstId, long nLstTmplId, sal_uInt16 nLstDocPos )
: nListId( nLstId ), nListTemplateId( nLstTmplId ), nListNo( 0 ),
- nListDocPos( nLstDocPos ), bRuleUsed( FALSE )
+ nListDocPos( nLstDocPos ), bRuleUsed( sal_False )
{}
void Clear() { nListId = nListTemplateId = nListNo = 0, nListDocPos = 0;
- bRuleUsed = FALSE; }
+ bRuleUsed = sal_False; }
};
DECLARE_TABLE( SwRTFStyleTbl, SwTxtFmtColl* )
DECLARE_TABLE( SwRTFCharStyleTbl, SwCharFmt* )
typedef SwFlySave* SwFlySavePtr;
SV_DECL_PTRARR_DEL( SwFlySaveArr, SwFlySavePtr, 0, 20 )
-SV_DECL_VARARR( SwListArr, SwListEntry, 0, 20 )
+typedef std::deque< SwListEntry > SwListArr;
struct DocPageInformation
{
@@ -250,7 +249,7 @@ private:
wwULSpaceData& rData);
void SetPageULSpaceItems(SwFrmFmt &rFmt, wwULSpaceData& rData);
bool SetCols(SwFrmFmt &rFmt, const rtfSection &rSection,
- USHORT nNettoWidth);
+ sal_uInt16 nNettoWidth);
void SetHdFt(rtfSection &rSection);
void CopyFrom(const SwPageDesc &rFrom, SwPageDesc &rDest);
void MoveFrom(SwPageDesc &rFrom, SwPageDesc &rDest);
@@ -312,11 +311,11 @@ class SwRTFParser : public SvxRTFParser
String sBaseURL;
- USHORT nAktPageDesc, nAktFirstPageDesc;
- USHORT nAktBox; // akt. Box
- USHORT nInsTblRow; // beim nach \row kein \pard -> neue Line anlegen
- USHORT nNewNumSectDef; // jeder SectionWechsel kann neue Rules definieren
- USHORT nRowsToRepeat;
+ sal_uInt16 nAktPageDesc, nAktFirstPageDesc;
+ sal_uInt16 m_nCurrentBox;
+ sal_uInt16 nInsTblRow; // beim nach \row kein \pard -> neue Line anlegen
+ sal_uInt16 nNewNumSectDef; // jeder SectionWechsel kann neue Rules definieren
+ sal_uInt16 nRowsToRepeat;
bool bSwPageDesc;
bool bReadSwFly; // lese Swg-Fly (wichtig fuer Bitmaps!)
@@ -345,7 +344,7 @@ class SwRTFParser : public SvxRTFParser
virtual void InsertPara();
virtual void InsertText();
- virtual void MovePos( int bForward = TRUE );
+ virtual void MovePos( int bForward = sal_True );
virtual void SetEndPrevPara( SvxNodeIdx*& rpNodePos, xub_StrLen& rCntPos );
void EnterEnvironment();
void LeaveEnvironment();
@@ -360,10 +359,10 @@ class SwRTFParser : public SvxRTFParser
void ReadUserProperties();
- void ReadListLevel( SwNumRule& rRule, BYTE nLvl );
+ void ReadListLevel( SwNumRule& rRule, sal_uInt8 nLvl );
void SetBorderLine(SvxBoxItem& rBox, sal_uInt16 nLine);
void ReadListTable();
- USHORT ReadRevTbl();
+ sal_uInt16 ReadRevTbl();
void ReadShpRslt();
void ReadShpTxt(String &shpTxt);
void ReadDrawingObject();
@@ -372,21 +371,21 @@ class SwRTFParser : public SvxRTFParser
void ReadListOverrideTable();
SwNumRule *ReadNumSecLevel( int nToken );
SwNumRule* GetNumRuleOfListNo( long nListNo,
- BOOL bRemoveFromList = FALSE );
+ sal_Bool bRemoveFromList = sal_False );
void RemoveUnusedNumRule( SwNumRule* );
void RemoveUnusedNumRules();
const Font* FindFontOfItem( const SvxFontItem& rItem ) const;
// 3 Methoden zum Aufbauen der Styles
- SwTxtFmtColl* MakeColl( const String&, USHORT nPos, BYTE nOutlineLevel,
+ SwTxtFmtColl* MakeColl( const String&, sal_uInt16 nPos, sal_uInt8 nOutlineLevel,
bool& rbCollExist );
- SwCharFmt* MakeCharFmt( const String& rName, USHORT nPos,
+ SwCharFmt* MakeCharFmt( const String& rName, sal_uInt16 nPos,
int& rbCollExist );
void SetStyleAttr( SfxItemSet& rCollSet,
const SfxItemSet& rStyleSet,
const SfxItemSet& rDerivedSet );
- SwTxtFmtColl* MakeStyle( USHORT nNo, const SvxRTFStyleType& rStyle );
- SwCharFmt* MakeCharStyle( USHORT nNo, const SvxRTFStyleType& rStyle );
+ SwTxtFmtColl* MakeStyle( sal_uInt16 nNo, const SvxRTFStyleType& rStyle );
+ SwCharFmt* MakeCharStyle( sal_uInt16 nNo, const SvxRTFStyleType& rStyle );
void MakeStyleTab();
int MakeFieldInst( String& rFieldStr );
@@ -452,7 +451,7 @@ public:
::com::sun::star::document::XDocumentProperties> i_xDocProps,
const SwPaM& rCrsr, SvStream& rIn,
const String& rBaseURL,
- int bReadNewDoc = TRUE );
+ int bReadNewDoc = sal_True );
virtual SvParserState CallParser(); // Aufruf des Parsers
virtual int IsEndPara( SvxNodeIdx* pNd, xub_StrLen nCnt ) const;
diff --git a/sw/source/filter/writer/makefile.mk b/sw/source/filter/writer/makefile.mk
deleted file mode 100644
index 1c11b8498b40..000000000000
--- a/sw/source/filter/writer/makefile.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=writer
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-CXXFILES = \
- writer.cxx \
- wrt_fn.cxx \
- wrtswtbl.cxx
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-EXCEPTIONSFILES = \
- $(SLO)$/writer.obj \
- $(SLO)$/wrt_fn.obj \
- $(SLO)$/wrtswtbl.obj
-
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index 4d35499bb2ca..311775948d2e 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -95,7 +95,7 @@ Writer_Impl::~Writer_Impl()
void Writer_Impl::RemoveFontList( SwDoc& rDoc )
{
OSL_ENSURE( pFontRemoveLst, "wo ist die FontListe?" );
- for( USHORT i = pFontRemoveLst->Count(); i; )
+ for( sal_uInt16 i = pFontRemoveLst->Count(); i; )
{
SvxFontItem* pItem = (SvxFontItem*)(*pFontRemoveLst)[ --i ];
rDoc.GetAttrPool().Remove( *pItem );
@@ -107,7 +107,7 @@ void Writer_Impl::InsertBkmk(const ::sw::mark::IMark& rBkmk)
if( !pBkmkNodePos )
pBkmkNodePos = new SwBookmarkNodeTable;
- ULONG nNd = rBkmk.GetMarkPos().nNode.GetIndex();
+ sal_uLong nNd = rBkmk.GetMarkPos().nNode.GetIndex();
SvPtrarr* pArr = pBkmkNodePos->Get( nNd );
if( !pArr )
{
@@ -185,18 +185,18 @@ void Writer::ResetWriter()
pOrigFileName = 0;
pDoc = 0;
- bShowProgress = bUCS2_WithStartChar = TRUE;
+ bShowProgress = bUCS2_WithStartChar = sal_True;
bASCII_NoLastLineEnd = bASCII_ParaAsBlanc = bASCII_ParaAsCR =
bWriteClipboardDoc = bWriteOnlyFirstTable = bBlock =
- bOrganizerMode = FALSE;
+ bOrganizerMode = sal_False;
}
-BOOL Writer::CopyNextPam( SwPaM ** ppPam )
+sal_Bool Writer::CopyNextPam( SwPaM ** ppPam )
{
if( (*ppPam)->GetNext() == pOrigPam )
{
*ppPam = pOrigPam; // wieder auf den Anfangs-Pam setzen
- return FALSE; // Ende vom Ring
+ return sal_False; // Ende vom Ring
}
// ansonsten kopiere den die Werte aus dem naechsten Pam
@@ -205,7 +205,7 @@ BOOL Writer::CopyNextPam( SwPaM ** ppPam )
*pCurPam->GetPoint() = *(*ppPam)->Start();
*pCurPam->GetMark() = *(*ppPam)->End();
- return TRUE;
+ return sal_True;
}
// suche die naechste Bookmark-Position aus der Bookmark-Tabelle
@@ -224,10 +224,10 @@ sal_Int32 Writer::FindPos_Bkmk(const SwPosition& rPos) const
}
-SwPaM* Writer::NewSwPaM( SwDoc & rDoc, ULONG nStartIdx, ULONG nEndIdx,
- BOOL bNodesArray )
+SwPaM *
+Writer::NewSwPaM(SwDoc & rDoc, sal_uLong const nStartIdx, sal_uLong const nEndIdx)
{
- SwNodes* pNds = bNodesArray ? &rDoc.GetNodes() : (SwNodes*)rDoc.GetUndoNds();
+ SwNodes *const pNds = &rDoc.GetNodes();
SwNodeIndex aStt( *pNds, nStartIdx );
SwCntntNode* pCNode = aStt.GetNode().GetCntntNode();
@@ -262,11 +262,11 @@ void Writer::SetStream(SvStream *const pStream)
{ m_pImpl->m_pStream = pStream; }
-SvStream& Writer::OutHex( SvStream& rStrm, ULONG nHex, BYTE nLen )
+SvStream& Writer::OutHex( SvStream& rStrm, sal_uLong nHex, sal_uInt8 nLen )
{ // in einen Stream aus
// Pointer an das Bufferende setzen
sal_Char* pStr = aNToABuf + (NTOABUFLEN-1);
- for( BYTE n = 0; n < nLen; ++n )
+ for( sal_uInt8 n = 0; n < nLen; ++n )
{
*(--pStr) = (sal_Char)(nHex & 0xf ) + 48;
if( *pStr > '9' )
@@ -297,7 +297,7 @@ SvStream& Writer::OutLong( SvStream& rStrm, long nVal )
return rStrm << pStr;
}
-SvStream& Writer::OutULong( SvStream& rStrm, ULONG nVal )
+SvStream& Writer::OutULong( SvStream& rStrm, sal_uLong nVal )
{
// Pointer an das Bufferende setzen
sal_Char* pStr = aNToABuf + (NTOABUFLEN-1);
@@ -310,12 +310,12 @@ SvStream& Writer::OutULong( SvStream& rStrm, ULONG nVal )
}
-ULONG Writer::Write( SwPaM& rPaM, SvStream& rStrm, const String* pFName )
+sal_uLong Writer::Write( SwPaM& rPaM, SvStream& rStrm, const String* pFName )
{
if ( IsStgWriter() )
{
SotStorageRef aRef = new SotStorage( rStrm );
- ULONG nResult = Write( rPaM, *aRef, pFName );
+ sal_uLong nResult = Write( rPaM, *aRef, pFName );
if ( nResult == ERRCODE_NONE )
aRef->Commit();
return nResult;
@@ -330,38 +330,38 @@ ULONG Writer::Write( SwPaM& rPaM, SvStream& rStrm, const String* pFName )
// zum Vergleich auf den akt. Pam sichern
pOrigPam = &rPaM;
- ULONG nRet = WriteStream();
+ sal_uLong nRet = WriteStream();
ResetWriter();
return nRet;
}
-ULONG Writer::Write( SwPaM& rPam, SfxMedium& rMed, const String* pFileName )
+sal_uLong Writer::Write( SwPaM& rPam, SfxMedium& rMed, const String* pFileName )
{
// This method must be overloaded in SwXMLWriter a storage from medium will be used there.
// The microsoft format can write to storage but the storage will be based on the stream.
return Write( rPam, *rMed.GetOutStream(), pFileName );
}
-ULONG Writer::Write( SwPaM& /*rPam*/, SvStorage&, const String* )
+sal_uLong Writer::Write( SwPaM& /*rPam*/, SvStorage&, const String* )
{
OSL_ENSURE( !this, "Schreiben in Storages auf einem Stream?" );
return ERR_SWG_WRITE_ERROR;
}
-ULONG Writer::Write( SwPaM&, const uno::Reference < embed::XStorage >&, const String*, SfxMedium* )
+sal_uLong Writer::Write( SwPaM&, const uno::Reference < embed::XStorage >&, const String*, SfxMedium* )
{
OSL_ENSURE( !this, "Schreiben in Storages auf einem Stream?" );
return ERR_SWG_WRITE_ERROR;
}
-BOOL Writer::CopyLocalFileToINet( String& rFileNm )
+sal_Bool Writer::CopyLocalFileToINet( String& rFileNm )
{
if( !pOrigFileName ) // can be happen, by example if we
- return FALSE; // write into the clipboard
+ return sal_False; // write into the clipboard
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
INetURLObject aFileUrl( rFileNm ), aTargetUrl( *pOrigFileName );
// this is our old without the Mail-Export
@@ -374,11 +374,11 @@ BOOL Writer::CopyLocalFileToINet( String& rFileNm )
if (m_pImpl->pSrcArr)
{
// wurde die Datei schon verschoben
- USHORT nPos;
+ sal_uInt16 nPos;
if (m_pImpl->pSrcArr->Seek_Entry( &rFileNm, &nPos ))
{
rFileNm = *(*m_pImpl->pDestArr)[ nPos ];
- return TRUE;
+ return sal_True;
}
}
else
@@ -391,8 +391,8 @@ BOOL Writer::CopyLocalFileToINet( String& rFileNm )
String *pDest = new String( aTargetUrl.GetPartBeforeLastName() );
*pDest += String(aFileUrl.GetName());
- SfxMedium aSrcFile( *pSrc, STREAM_READ, FALSE );
- SfxMedium aDstFile( *pDest, STREAM_WRITE | STREAM_SHARE_DENYNONE, FALSE );
+ SfxMedium aSrcFile( *pSrc, STREAM_READ, sal_False );
+ SfxMedium aDstFile( *pDest, STREAM_WRITE | STREAM_SHARE_DENYNONE, sal_False );
*aDstFile.GetOutStream() << *aSrcFile.GetInStream();
@@ -428,11 +428,11 @@ void Writer::PutNumFmtFontsInAttrPool()
const Font* pFont;
const Font* pDefFont = &numfunc::GetDefBulletFont();
// <--
- BOOL bCheck = FALSE;
+ sal_Bool bCheck = sal_False;
- for( USHORT nGet = rListTbl.Count(); nGet; )
+ for( sal_uInt16 nGet = rListTbl.Count(); nGet; )
if( pDoc->IsUsed( *(pRule = rListTbl[ --nGet ] )))
- for( BYTE nLvl = 0; nLvl < MAXLEVEL; ++nLvl )
+ for( sal_uInt8 nLvl = 0; nLvl < MAXLEVEL; ++nLvl )
if( SVX_NUM_CHAR_SPECIAL == (pFmt = &pRule->Get( nLvl ))->GetNumberingType() ||
SVX_NUM_BITMAP == pFmt->GetNumberingType() )
{
@@ -445,7 +445,7 @@ void Writer::PutNumFmtFontsInAttrPool()
continue;
}
else if( *pFont == *pDefFont )
- bCheck = TRUE;
+ bCheck = sal_True;
_AddFontItem( rPool, SvxFontItem( pFont->GetFamily(),
pFont->GetName(), pFont->GetStyleName(),
@@ -453,7 +453,7 @@ void Writer::PutNumFmtFontsInAttrPool()
}
}
-void Writer::PutEditEngFontsInAttrPool( BOOL bIncl_CJK_CTL )
+void Writer::PutEditEngFontsInAttrPool( sal_Bool bIncl_CJK_CTL )
{
SfxItemPool& rPool = pDoc->GetAttrPool();
if( rPool.GetSecondaryPool() )
@@ -475,7 +475,7 @@ void Writer::PutCJKandCTLFontsInAttrPool()
}
-void Writer::_AddFontItems( SfxItemPool& rPool, USHORT nW )
+void Writer::_AddFontItems( SfxItemPool& rPool, sal_uInt16 nW )
{
const SvxFontItem* pFont = (const SvxFontItem*)&rPool.GetDefaultItem( nW );
_AddFontItem( rPool, *pFont );
@@ -483,9 +483,9 @@ void Writer::_AddFontItems( SfxItemPool& rPool, USHORT nW )
if( 0 != ( pFont = (const SvxFontItem*)rPool.GetPoolDefaultItem( nW )) )
_AddFontItem( rPool, *pFont );
- USHORT nMaxItem = rPool.GetItemCount( nW );
- for( USHORT nGet = 0; nGet < nMaxItem; ++nGet )
- if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem( nW, nGet )) )
+ sal_uInt32 nMaxItem = rPool.GetItemCount2( nW );
+ for( sal_uInt32 nGet = 0; nGet < nMaxItem; ++nGet )
+ if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem2( nW, nGet )) )
_AddFontItem( rPool, *pFont );
}
@@ -530,12 +530,12 @@ void Writer::CreateBookmarkTbl()
// search alle Bookmarks in the range and return it in the Array
-USHORT Writer::GetBookmarks(const SwCntntNode& rNd, xub_StrLen nStt,
+sal_uInt16 Writer::GetBookmarks(const SwCntntNode& rNd, xub_StrLen nStt,
xub_StrLen nEnd, SvPtrarr& rArr)
{
OSL_ENSURE( !rArr.Count(), "es sind noch Eintraege vorhanden" );
- ULONG nNd = rNd.GetIndex();
+ sal_uLong nNd = rNd.GetIndex();
SvPtrarr* pArr = (m_pImpl->pBkmkNodePos) ?
m_pImpl->pBkmkNodePos->Get( nNd ) : 0;
if( pArr )
@@ -546,7 +546,7 @@ USHORT Writer::GetBookmarks(const SwCntntNode& rNd, xub_StrLen nStt,
rArr.Insert( pArr, 0 );
else
{
- USHORT n;
+ sal_uInt16 n;
xub_StrLen nCntnt;
for( n = 0; n < pArr->Count(); ++n )
{
@@ -575,13 +575,13 @@ USHORT Writer::GetBookmarks(const SwCntntNode& rNd, xub_StrLen nStt,
// Storage-spezifisches
-ULONG StgWriter::WriteStream()
+sal_uLong StgWriter::WriteStream()
{
OSL_ENSURE( !this, "Schreiben in Streams auf einem Storage?" );
return ERR_SWG_WRITE_ERROR;
}
-ULONG StgWriter::Write( SwPaM& rPaM, SvStorage& rStg, const String* pFName )
+sal_uLong StgWriter::Write( SwPaM& rPaM, SvStorage& rStg, const String* pFName )
{
SetStream(0);
pStg = &rStg;
@@ -593,7 +593,7 @@ ULONG StgWriter::Write( SwPaM& rPaM, SvStorage& rStg, const String* pFName )
// zum Vergleich auf den akt. Pam sichern
pOrigPam = &rPaM;
- ULONG nRet = WriteStorage();
+ sal_uLong nRet = WriteStorage();
pStg = NULL;
ResetWriter();
@@ -601,7 +601,7 @@ ULONG StgWriter::Write( SwPaM& rPaM, SvStorage& rStg, const String* pFName )
return nRet;
}
-ULONG StgWriter::Write( SwPaM& rPaM, const uno::Reference < embed::XStorage >& rStg, const String* pFName, SfxMedium* pMedium )
+sal_uLong StgWriter::Write( SwPaM& rPaM, const uno::Reference < embed::XStorage >& rStg, const String* pFName, SfxMedium* pMedium )
{
SetStream(0);
pStg = 0;
@@ -614,7 +614,7 @@ ULONG StgWriter::Write( SwPaM& rPaM, const uno::Reference < embed::XStorage >& r
// zum Vergleich auf den akt. Pam sichern
pOrigPam = &rPaM;
- ULONG nRet = pMedium ? WriteMedium( *pMedium ) : WriteStorage();
+ sal_uLong nRet = pMedium ? WriteMedium( *pMedium ) : WriteStorage();
pStg = NULL;
ResetWriter();
diff --git a/sw/source/filter/writer/wrt_fn.cxx b/sw/source/filter/writer/wrt_fn.cxx
index 43c585a3339b..a1b91f44c407 100644
--- a/sw/source/filter/writer/wrt_fn.cxx
+++ b/sw/source/filter/writer/wrt_fn.cxx
@@ -41,7 +41,7 @@
Writer& Out( const SwAttrFnTab pTab, const SfxPoolItem& rHt, Writer & rWrt )
{
- USHORT nId = rHt.Which();
+ sal_uInt16 nId = rHt.Which();
OSL_ENSURE( nId < POOLATTR_END && nId >= POOLATTR_BEGIN, "SwAttrFnTab::Out()" );
FnAttrOut pOut;
if( 0 != ( pOut = pTab[ nId - RES_CHRATR_BEGIN] ))
@@ -51,8 +51,8 @@ Writer& Out( const SwAttrFnTab pTab, const SfxPoolItem& rHt, Writer & rWrt )
}
Writer& Out_SfxItemSet( const SwAttrFnTab pTab, Writer& rWrt,
- const SfxItemSet& rSet, BOOL bDeep,
- BOOL bTstForDefault )
+ const SfxItemSet& rSet, sal_Bool bDeep,
+ sal_Bool bTstForDefault )
{
// erst die eigenen Attribute ausgeben
const SfxItemPool& rPool = *rSet.GetPool();
@@ -81,7 +81,7 @@ Writer& Out_SfxItemSet( const SwAttrFnTab pTab, Writer& rWrt,
else
{
SfxWhichIter aIter( *pSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
if( SFX_ITEM_SET == pSet->GetItemState( nWhich, bDeep, &pItem ) &&
@@ -106,7 +106,7 @@ Writer& Out( const SwNodeFnTab pTab, SwNode& rNode, Writer & rWrt )
if( !pCNd )
return rWrt;
- USHORT nId = RES_TXTNODE;
+ sal_uInt16 nId = RES_TXTNODE;
switch (pCNd->GetNodeType())
{
case ND_TEXTNODE:
diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx
index cae27d870455..ab080c8ac6f1 100644
--- a/sw/source/filter/writer/wrtswtbl.cxx
+++ b/sw/source/filter/writer/wrtswtbl.cxx
@@ -56,7 +56,7 @@ sal_Int16 SwWriteTableCell::GetVertOri() const
{
const SfxItemSet& rItemSet = pBox->GetFrmFmt()->GetAttrSet();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, sal_False, &pItem ) )
{
sal_Int16 eBoxVertOri =
((const SwFmtVertOrient *)pItem)->GetVertOrient();
@@ -70,7 +70,7 @@ sal_Int16 SwWriteTableCell::GetVertOri() const
//-----------------------------------------------------------------------
-SwWriteTableRow::SwWriteTableRow( long nPosition, BOOL bUseLayoutHeights )
+SwWriteTableRow::SwWriteTableRow( long nPosition, sal_Bool bUseLayoutHeights )
: pBackground(0), nPos(nPosition), mbUseLayoutHeights(bUseLayoutHeights),
nTopBorder(USHRT_MAX), nBottomBorder(USHRT_MAX), bTopBorder(true),
bBottomBorder(true)
@@ -78,8 +78,8 @@ SwWriteTableRow::SwWriteTableRow( long nPosition, BOOL bUseLayoutHeights )
}
SwWriteTableCell *SwWriteTableRow::AddCell( const SwTableBox *pBox,
- USHORT nRow, USHORT nCol,
- USHORT nRowSpan, USHORT nColSpan,
+ sal_uInt16 nRow, sal_uInt16 nCol,
+ sal_uInt16 nRowSpan, sal_uInt16 nColSpan,
long nHeight,
const SvxBrushItem *pBackgroundBrush )
{
@@ -93,7 +93,7 @@ SwWriteTableCell *SwWriteTableRow::AddCell( const SwTableBox *pBox,
//-----------------------------------------------------------------------
-SwWriteTableCol::SwWriteTableCol(USHORT nPosition)
+SwWriteTableCol::SwWriteTableCol(sal_uInt32 nPosition)
: nPos(nPosition), nWidthOpt(0), bRelWidthOpt(false), bOutWidth(true),
bLeftBorder(true), bRightBorder(true)
{
@@ -101,20 +101,20 @@ SwWriteTableCol::SwWriteTableCol(USHORT nPosition)
//-----------------------------------------------------------------------
-long SwWriteTable::GetBoxWidth( const SwTableBox *pBox )
+sal_uInt32 SwWriteTable::GetBoxWidth( const SwTableBox *pBox )
{
const SwFrmFmt *pFmt = pBox->GetFrmFmt();
const SwFmtFrmSize& aFrmSize=
(const SwFmtFrmSize&)pFmt->GetFmtAttr( RES_FRM_SIZE );
- return aFrmSize.GetSize().Width();
+ return sal::static_int_cast<sal_uInt32>(aFrmSize.GetSize().Width());
}
long SwWriteTable::GetLineHeight( const SwTableLine *pLine )
{
#if OSL_DEBUG_LEVEL > 1
- BOOL bOldGetLineHeightCalled = bGetLineHeightCalled;
- bGetLineHeightCalled = TRUE;
+ sal_Bool bOldGetLineHeightCalled = bGetLineHeightCalled;
+ bGetLineHeightCalled = sal_True;
#endif
long nHeight = 0;
@@ -130,7 +130,7 @@ long SwWriteTable::GetLineHeight( const SwTableLine *pLine )
// #i60390# - in some cases we still want to continue
// to use the layout heights even if one of the rows has a height of 0
// ('hidden' rows)
- bUseLayoutHeights = bLayoutAvailable; /*FALSE;*/
+ bUseLayoutHeights = bLayoutAvailable; /*sal_False;*/
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE( bLayoutAvailable || !bOldGetLineHeightCalled, "Layout ungueltig?" );
@@ -138,9 +138,9 @@ long SwWriteTable::GetLineHeight( const SwTableLine *pLine )
}
const SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- USHORT nBoxes = rBoxes.Count();
+ sal_uInt16 nBoxes = rBoxes.Count();
- for( USHORT nBox=0; nBox<nBoxes; nBox++ )
+ for( sal_uInt16 nBox=0; nBox<nBoxes; nBox++ )
{
const SwTableBox* pBox = rBoxes[nBox];
if( pBox->GetSttNd() )
@@ -152,7 +152,7 @@ long SwWriteTable::GetLineHeight( const SwTableLine *pLine )
{
long nTmp = 0;
const SwTableLines &rLines = pBox->GetTabLines();
- for( USHORT nLine=0; nLine<rLines.Count(); nLine++ )
+ for( sal_uInt16 nLine=0; nLine<rLines.Count(); nLine++ )
{
nTmp += GetLineHeight( rLines[nLine] );
}
@@ -176,7 +176,7 @@ long SwWriteTable::GetLineHeight( const SwTableBox *pBox ) const
const SfxItemSet& rItemSet = pLineFrmFmt->GetAttrSet();
long nHeight = 0;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, TRUE, &pItem ))
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, sal_True, &pItem ))
nHeight = ((SwFmtFrmSize*)pItem)->GetHeight();
return nHeight;
@@ -193,7 +193,7 @@ const SvxBrushItem *SwWriteTable::GetLineBrush( const SwTableBox *pBox,
const SfxPoolItem* pItem;
const SfxItemSet& rItemSet = pLineFrmFmt->GetAttrSet();
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, sal_False,
&pItem ) )
{
if( !pLine->GetUpper() )
@@ -215,9 +215,9 @@ const SvxBrushItem *SwWriteTable::GetLineBrush( const SwTableBox *pBox,
void SwWriteTable::MergeBorders( const SvxBorderLine* pBorderLine,
- BOOL bTable )
+ sal_Bool bTable )
{
- if( (UINT32)-1 == nBorderColor )
+ if( (sal_uInt32)-1 == nBorderColor )
{
Color aGrayColor( COL_GRAY );
if( !pBorderLine->GetColor().IsRGBEqual( aGrayColor ) )
@@ -227,7 +227,7 @@ void SwWriteTable::MergeBorders( const SvxBorderLine* pBorderLine,
if( !bCollectBorderWidth )
return;
- USHORT nOutWidth = pBorderLine->GetOutWidth();
+ sal_uInt16 nOutWidth = pBorderLine->GetOutWidth();
if( bTable )
{
if( nOutWidth && (!nBorder || nOutWidth < nBorder) )
@@ -239,20 +239,20 @@ void SwWriteTable::MergeBorders( const SvxBorderLine* pBorderLine,
nInnerBorder = nOutWidth;
}
- USHORT nDist = pBorderLine->GetInWidth() ? pBorderLine->GetDistance()
+ sal_uInt16 nDist = pBorderLine->GetInWidth() ? pBorderLine->GetDistance()
: 0;
if( nDist && (!nCellSpacing || nDist < nCellSpacing) )
nCellSpacing = nDist;
}
-USHORT SwWriteTable::MergeBoxBorders( const SwTableBox *pBox,
- USHORT nRow, USHORT nCol,
- USHORT nRowSpan, USHORT nColSpan,
- USHORT& rTopBorder,
- USHORT &rBottomBorder )
+sal_uInt16 SwWriteTable::MergeBoxBorders( const SwTableBox *pBox,
+ sal_uInt16 nRow, sal_uInt16 nCol,
+ sal_uInt16 nRowSpan, sal_uInt16 nColSpan,
+ sal_uInt16& rTopBorder,
+ sal_uInt16 &rBottomBorder )
{
- USHORT nBorderMask = 0;
+ sal_uInt16 nBorderMask = 0;
const SwFrmFmt *pFrmFmt = pBox->GetFrmFmt();
const SvxBoxItem& rBoxItem = (const SvxBoxItem&)pFrmFmt->GetFmtAttr( RES_BOX );
@@ -288,7 +288,7 @@ USHORT SwWriteTable::MergeBoxBorders( const SwTableBox *pBox,
// boxes.
if( bCollectBorderWidth )
{
- USHORT nDist = rBoxItem.GetDistance( BOX_LINE_TOP );
+ sal_uInt16 nDist = rBoxItem.GetDistance( BOX_LINE_TOP );
if( nDist && (!nCellPadding || nDist < nCellPadding) )
nCellPadding = nDist;
nDist = rBoxItem.GetDistance( BOX_LINE_BOTTOM );
@@ -306,18 +306,18 @@ USHORT SwWriteTable::MergeBoxBorders( const SwTableBox *pBox,
}
-USHORT SwWriteTable::GetRawWidth( USHORT nCol, USHORT nColSpan ) const
+sal_uInt32 SwWriteTable::GetRawWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const
{
- USHORT nWidth = aCols[nCol+nColSpan-1]->GetPos();
+ sal_uInt32 nWidth = aCols[nCol+nColSpan-1]->GetPos();
if( nCol > 0 )
nWidth = nWidth - aCols[nCol-1]->GetPos();
return nWidth;
}
-USHORT SwWriteTable::GetLeftSpace( USHORT nCol ) const
+sal_uInt16 SwWriteTable::GetLeftSpace( sal_uInt16 nCol ) const
{
- USHORT nSpace = nCellPadding + nCellSpacing;
+ sal_uInt16 nSpace = nCellPadding + nCellSpacing;
// In der ersten Spalte auch noch die Liniendicke abziehen
if( nCol==0 )
@@ -332,9 +332,9 @@ USHORT SwWriteTable::GetLeftSpace( USHORT nCol ) const
return nSpace;
}
-USHORT SwWriteTable::GetRightSpace( USHORT nCol, USHORT nColSpan ) const
+sal_uInt16 SwWriteTable::GetRightSpace( sal_uInt16 nCol, sal_uInt16 nColSpan ) const
{
- USHORT nSpace = nCellPadding;
+ sal_uInt16 nSpace = nCellPadding;
// In der letzten Spalte noch einmal zusaetzlich CELLSPACING und
// und die Liniendicke abziehen
@@ -350,9 +350,9 @@ USHORT SwWriteTable::GetRightSpace( USHORT nCol, USHORT nColSpan ) const
return nSpace;
}
-USHORT SwWriteTable::GetAbsWidth( USHORT nCol, USHORT nColSpan ) const
+sal_uInt16 SwWriteTable::GetAbsWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const
{
- long nWidth = GetRawWidth( nCol, nColSpan );
+ sal_uInt32 nWidth = GetRawWidth( nCol, nColSpan );
if( nBaseWidth != nTabWidth )
{
nWidth *= nTabWidth;
@@ -362,29 +362,29 @@ USHORT SwWriteTable::GetAbsWidth( USHORT nCol, USHORT nColSpan ) const
nWidth -= GetLeftSpace( nCol ) + GetRightSpace( nCol, nColSpan );
OSL_ENSURE( nWidth > 0, "Spaltenbreite <= 0. OK?" );
- return nWidth > 0 ? (USHORT)nWidth : 0;
+ return nWidth > 0 ? (sal_uInt16)nWidth : 0;
}
-USHORT SwWriteTable::GetRelWidth( USHORT nCol, USHORT nColSpan ) const
+sal_uInt16 SwWriteTable::GetRelWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const
{
long nWidth = GetRawWidth( nCol, nColSpan );
- return (USHORT)(long)Fraction( nWidth*256 + GetBaseWidth()/2,
+ return (sal_uInt16)(long)Fraction( nWidth*256 + GetBaseWidth()/2,
GetBaseWidth() );
}
-USHORT SwWriteTable::GetPrcWidth( USHORT nCol, USHORT nColSpan ) const
+sal_uInt16 SwWriteTable::GetPrcWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const
{
long nWidth = GetRawWidth( nCol, nColSpan );
// sieht komisch aus, ist aber nichts anderes als
// [(100 * nWidth) + .5] ohne Rundungsfehler
- return (USHORT)(long)Fraction( nWidth*100 + GetBaseWidth()/2,
+ return (sal_uInt16)(long)Fraction( nWidth*100 + GetBaseWidth()/2,
GetBaseWidth() );
}
-long SwWriteTable::GetAbsHeight( long nRawHeight, USHORT nRow,
- USHORT nRowSpan ) const
+long SwWriteTable::GetAbsHeight( long nRawHeight, sal_uInt16 nRow,
+ sal_uInt16 nRowSpan ) const
{
nRawHeight -= (2*nCellPadding + nCellSpacing);
@@ -412,28 +412,28 @@ long SwWriteTable::GetAbsHeight( long nRawHeight, USHORT nRow,
return nRawHeight > 0 ? nRawHeight : 0;
}
-BOOL SwWriteTable::ShouldExpandSub(const SwTableBox *pBox, BOOL /*bExpandedBefore*/,
- USHORT nDepth) const
+sal_Bool SwWriteTable::ShouldExpandSub(const SwTableBox *pBox, sal_Bool /*bExpandedBefore*/,
+ sal_uInt16 nDepth) const
{
return !pBox->GetSttNd() && nDepth > 0;
}
void SwWriteTable::CollectTableRowsCols( long nStartRPos,
- USHORT nStartCPos,
+ sal_uInt32 nStartCPos,
long nParentLineHeight,
- USHORT nParentLineWidth,
+ sal_uInt32 nParentLineWidth,
const SwTableLines& rLines,
- USHORT nDepth )
+ sal_uInt16 nDepth )
{
- BOOL bSubExpanded = FALSE;
- USHORT nLines = rLines.Count();
+ sal_Bool bSubExpanded = sal_False;
+ sal_uInt16 nLines = rLines.Count();
#if OSL_DEBUG_LEVEL > 1
- USHORT nEndCPos = 0;
+ sal_uInt32 nEndCPos = 0;
#endif
long nRPos = nStartRPos;
- for( USHORT nLine = 0; nLine < nLines; nLine++ )
+ for( sal_uInt16 nLine = 0; nLine < nLines; nLine++ )
{
/*const*/ SwTableLine *pLine = rLines[nLine];
@@ -449,14 +449,14 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
layout, you may run into this robust code.
It's not allowed that subrows leaves their parentrow. If this would happen the line
height of subrow is reduced to a part of the remaining height */
- OSL_ENSURE( FALSE, "Corrupt line height I" );
+ OSL_ENSURE( sal_False, "Corrupt line height I" );
nRPos -= nLineHeight;
nLineHeight = nStartRPos + nParentLineHeight - nRPos; // remaining parent height
nLineHeight /= nLines - nLine; // divided through the number of remaining sub rows
nRPos += nLineHeight;
}
SwWriteTableRow *pRow = new SwWriteTableRow( nRPos, bUseLayoutHeights);
- USHORT nRow;
+ sal_uInt16 nRow;
if( aRows.Seek_Entry( pRow, &nRow ) )
delete pRow;
else
@@ -482,21 +482,21 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
// Fuer alle Boxen der Zeile ggf. eine Spalte einfuegen
const SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- USHORT nBoxes = rBoxes.Count();
+ sal_uInt16 nBoxes = rBoxes.Count();
- USHORT nCPos = nStartCPos;
- for( USHORT nBox=0; nBox<nBoxes; nBox++ )
+ sal_uInt32 nCPos = nStartCPos;
+ for( sal_uInt16 nBox=0; nBox<nBoxes; nBox++ )
{
const SwTableBox *pBox = rBoxes[nBox];
- USHORT nOldCPos = nCPos;
+ sal_uInt32 nOldCPos = nCPos;
if( nBox < nBoxes-1 || (nParentLineWidth==0 && nLine==0) )
{
- nCPos = nCPos + (USHORT)GetBoxWidth( pBox );
+ nCPos = nCPos + GetBoxWidth( pBox );
SwWriteTableCol *pCol = new SwWriteTableCol( nCPos );
- USHORT nCol;
+ sal_uInt16 nCol;
if( aCols.Seek_Entry( pCol, &nCol ) )
delete pCol;
else
@@ -512,7 +512,7 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
else
{
#if OSL_DEBUG_LEVEL > 1
- USHORT nCheckPos = nCPos + (USHORT)GetBoxWidth( pBox );
+ sal_uInt32 nCheckPos = nCPos + GetBoxWidth( pBox );
if( !nEndCPos )
{
nEndCPos = nCheckPos;
@@ -542,30 +542,30 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
nCPos - nOldCPos,
pBox->GetTabLines(),
nDepth-1 );
- bSubExpanded = TRUE;
+ bSubExpanded = sal_True;
}
}
}
}
-void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
- USHORT nStartCPos, USHORT nStartCol,
+void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
+ sal_uInt32 nStartCPos, sal_uInt16 nStartCol,
long nParentLineHeight,
- USHORT nParentLineWidth,
+ sal_uInt32 nParentLineWidth,
const SwTableLines& rLines,
const SvxBrushItem* pParentBrush,
- USHORT nDepth,
+ sal_uInt16 nDepth,
sal_uInt16 nNumOfHeaderRows )
{
- USHORT nLines = rLines.Count();
- BOOL bSubExpanded = FALSE;
+ sal_uInt16 nLines = rLines.Count();
+ sal_Bool bSubExpanded = sal_False;
// Festlegen der Umrandung
long nRPos = nStartRPos;
- USHORT nRow = nStartRow;
+ sal_uInt16 nRow = nStartRow;
- for( USHORT nLine = 0; nLine < nLines; nLine++ )
+ for( sal_uInt16 nLine = 0; nLine < nLines; nLine++ )
{
const SwTableLine *pLine = rLines[nLine];
@@ -578,7 +578,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
if( nParentLineHeight && nStartRPos + nParentLineHeight <= nRPos )
{
/* See comment in CollectTableRowCols */
- OSL_ENSURE( FALSE, "Corrupt line height II" );
+ OSL_ENSURE( sal_False, "Corrupt line height II" );
nRPos -= nLineHeight;
nLineHeight = nStartRPos + nParentLineHeight - nRPos; // remaining parent height
nLineHeight /= nLines - nLine; // divided through the number of remaining sub rows
@@ -589,10 +589,10 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
nRPos = nStartRPos + nParentLineHeight;
// Und ihren Index
- USHORT nOldRow = nRow;
+ sal_uInt16 nOldRow = nRow;
SwWriteTableRow aRow( nRPos,bUseLayoutHeights );
#if OSL_DEBUG_LEVEL > 1
- BOOL bFound =
+ sal_Bool bFound =
#endif
aRows.Seek_Entry( &aRow, &nRow );
#if OSL_DEBUG_LEVEL > 1
@@ -620,12 +620,12 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
const SfxItemSet& rItemSet = pLineFrmFmt->GetAttrSet();
long nHeight = 0;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, TRUE, &pItem ))
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, sal_True, &pItem ))
nHeight = ((SwFmtFrmSize*)pItem)->GetHeight();
const SvxBrushItem *pBrushItem, *pLineBrush = pParentBrush;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, sal_False,
&pItem ) )
{
pLineBrush = (const SvxBrushItem *)pItem;
@@ -633,10 +633,10 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
// Wenn die Zeile die gesamte Tabelle umspannt, koennen
// Wir den Hintergrund an der Zeile ausgeben. Sonst muessen
// wir in an den Zelle ausgeben.
- BOOL bOutAtRow = !nParentLineWidth;
+ sal_Bool bOutAtRow = !nParentLineWidth;
if( !bOutAtRow && nStartCPos==0 )
{
- USHORT nEndCol;
+ sal_uInt16 nEndCol;
SwWriteTableCol aCol( nParentLineWidth );
bOutAtRow = aCols.Seek_Entry(&aCol,&nEndCol) &&
nEndCol == aCols.Count()-1;
@@ -655,19 +655,19 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
pBrushItem = 0;
}
- USHORT nBoxes = rBoxes.Count();
- USHORT nCPos = nStartCPos;
- USHORT nCol = nStartCol;
+ sal_uInt16 nBoxes = rBoxes.Count();
+ sal_uInt32 nCPos = nStartCPos;
+ sal_uInt16 nCol = nStartCol;
- for( USHORT nBox=0; nBox<nBoxes; nBox++ )
+ for( sal_uInt16 nBox=0; nBox<nBoxes; nBox++ )
{
const SwTableBox *pBox = rBoxes[nBox];
// Position der letzten ueberdeckten Spalte ermitteln
- USHORT nOldCPos = nCPos;
+ sal_uInt32 nOldCPos = nCPos;
if( nBox < nBoxes-1 || (nParentLineWidth==0 && nLine==0) )
{
- nCPos = nCPos + (USHORT)GetBoxWidth( pBox );
+ nCPos = nCPos + GetBoxWidth( pBox );
if( nBox==nBoxes-1 )
nParentLineWidth = nCPos - nStartCPos;
}
@@ -675,10 +675,10 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
nCPos = nStartCPos + nParentLineWidth;
// Und ihren Index
- USHORT nOldCol = nCol;
+ sal_uInt16 nOldCol = nCol;
SwWriteTableCol aCol( nCPos );
#if OSL_DEBUG_LEVEL > 1
- BOOL bFound2 =
+ sal_Bool bFound2 =
#endif
aCols.Seek_Entry( &aCol, &nCol );
#if OSL_DEBUG_LEVEL > 1
@@ -687,16 +687,16 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
if( !ShouldExpandSub( pBox, bSubExpanded, nDepth ) )
{
- USHORT nRowSpan = nRow - nOldRow + 1;
+ sal_uInt16 nRowSpan = nRow - nOldRow + 1;
// The new table model may have true row span attributes
const long nAttrRowSpan = pBox->getRowSpan();
if ( 1 < nAttrRowSpan )
- nRowSpan = (USHORT)nAttrRowSpan;
+ nRowSpan = (sal_uInt16)nAttrRowSpan;
else if ( nAttrRowSpan < 1 )
nRowSpan = 0;
- USHORT nColSpan = nCol - nOldCol + 1;
+ sal_uInt16 nColSpan = nCol - nOldCol + 1;
pRow->AddCell( pBox, nOldRow, nOldCol,
nRowSpan, nColSpan, nHeight,
pBrushItem );
@@ -704,8 +704,8 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
if( pBox->GetSttNd() )
{
- USHORT nTopBorder = USHRT_MAX, nBottomBorder = USHRT_MAX;
- USHORT nBorderMask = MergeBoxBorders(pBox, nOldRow, nOldCol,
+ sal_uInt16 nTopBorder = USHRT_MAX, nBottomBorder = USHRT_MAX;
+ sal_uInt16 nBorderMask = MergeBoxBorders(pBox, nOldRow, nOldCol,
nRowSpan, nColSpan, nTopBorder, nBottomBorder);
// #i30094# add a sanity check here to ensure that
@@ -716,7 +716,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
SwWriteTableCol *pCol = aCols[nOldCol];
OSL_ENSURE(pCol, "No TableCol found, panic!");
if (pCol)
- pCol->bLeftBorder = FALSE;
+ pCol->bLeftBorder = sal_False;
}
if (!(nBorderMask & 8))
@@ -724,16 +724,16 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
SwWriteTableCol *pCol = aCols[nCol];
OSL_ENSURE(pCol, "No TableCol found, panic!");
if (pCol)
- pCol->bRightBorder = FALSE;
+ pCol->bRightBorder = sal_False;
}
if (!(nBorderMask & 1))
- pRow->bTopBorder = FALSE;
+ pRow->bTopBorder = sal_False;
else if (!pRow->nTopBorder || nTopBorder < pRow->nTopBorder)
pRow->nTopBorder = nTopBorder;
if (!(nBorderMask & 2))
- pEndRow->bBottomBorder = FALSE;
+ pEndRow->bBottomBorder = sal_False;
else if (
!pEndRow->nBottomBorder ||
nBottomBorder < pEndRow->nBottomBorder
@@ -750,7 +750,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
pBox->GetTabLines(),
pLineBrush, nDepth-1,
nNumOfHeaderRows );
- bSubExpanded = TRUE;
+ bSubExpanded = sal_True;
}
nCol++; // Die naechste Zelle faengt in der nachten Spalte an
@@ -761,8 +761,8 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
}
SwWriteTable::SwWriteTable(const SwTableLines& rLines, long nWidth,
- USHORT nBWidth, BOOL bRel, USHORT nMaxDepth, USHORT nLSub, USHORT nRSub, sal_uInt32 nNumOfRowsToRepeat)
- : nBorderColor((UINT32)-1), nCellSpacing(0), nCellPadding(0), nBorder(0),
+ sal_uInt32 nBWidth, sal_Bool bRel, sal_uInt16 nMaxDepth, sal_uInt16 nLSub, sal_uInt16 nRSub, sal_uInt32 nNumOfRowsToRepeat)
+ : nBorderColor((sal_uInt32)-1), nCellSpacing(0), nCellPadding(0), nBorder(0),
nInnerBorder(0), nBaseWidth(nBWidth), nHeadEndRow(USHRT_MAX),
nLeftSub(nLSub), nRightSub(nRSub), nTabWidth(nWidth), bRelWidths(bRel),
bUseLayoutHeights(true),
@@ -772,7 +772,7 @@ SwWriteTable::SwWriteTable(const SwTableLines& rLines, long nWidth,
bColsOption(false), bColTags(true), bLayoutExport(false),
bCollectBorderWidth(true)
{
- USHORT nParentWidth = nBaseWidth + nLeftSub + nRightSub;
+ sal_uInt32 nParentWidth = nBaseWidth + nLeftSub + nRightSub;
// Erstmal die Tabellen-Struktur festlegen. Hinter der Tabelle ist in
// jedem Fall eine Spalte zu Ende
@@ -789,7 +789,7 @@ SwWriteTable::SwWriteTable(const SwTableLines& rLines, long nWidth,
}
SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
- : nBorderColor((UINT32)-1), nCellSpacing(0), nCellPadding(0), nBorder(0),
+ : nBorderColor((sal_uInt32)-1), nCellSpacing(0), nCellPadding(0), nBorder(0),
nInnerBorder(0), nBaseWidth(pLayoutInfo->GetWidthOption()), nHeadEndRow(0),
nLeftSub(0), nRightSub(0), nTabWidth(pLayoutInfo->GetWidthOption()),
bRelWidths(pLayoutInfo->HasPrcWidthOption()), bUseLayoutHeights(false),
@@ -807,9 +807,9 @@ SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
nCellSpacing = pLayoutInfo->GetCellSpacing();
}
- USHORT nRow, nCol;
- USHORT nCols = pLayoutInfo->GetColCount();
- USHORT nRows = pLayoutInfo->GetRowCount();
+ sal_uInt16 nRow, nCol;
+ sal_uInt16 nCols = pLayoutInfo->GetColCount();
+ sal_uInt16 nRows = pLayoutInfo->GetRowCount();
// Erstmal die Tabellen-Struktur festlegen.
for( nCol=0; nCol<nCols; nCol++ )
@@ -842,7 +842,7 @@ SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
{
SwWriteTableRow *pRow = aRows[nRow];
- BOOL bHeightExported = FALSE;
+ sal_Bool bHeightExported = sal_False;
for( nCol=0; nCol<nCols; nCol++ )
{
const SwHTMLTableLayoutCell *pLayoutCell =
@@ -861,8 +861,8 @@ SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
continue;
}
- USHORT nRowSpan = pLayoutCell->GetRowSpan();
- USHORT nColSpan = pLayoutCell->GetColSpan();
+ sal_uInt16 nRowSpan = pLayoutCell->GetRowSpan();
+ sal_uInt16 nColSpan = pLayoutCell->GetColSpan();
const SwTableBox *pBox = pLayoutCnts->GetTableBox();
OSL_ENSURE( pBox,
"Tabelle in Tabelle kann nicht ueber Layout exportiert werden" );
@@ -876,29 +876,29 @@ SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
pCell->SetWidthOpt( pLayoutCell->GetWidthOption(),
pLayoutCell->IsPrcWidthOption() );
- USHORT nTopBorder = USHRT_MAX, nBottomBorder = USHRT_MAX;
- USHORT nBorderMask =
+ sal_uInt16 nTopBorder = USHRT_MAX, nBottomBorder = USHRT_MAX;
+ sal_uInt16 nBorderMask =
MergeBoxBorders( pBox, nRow, nCol, nRowSpan, nColSpan,
nTopBorder, nBottomBorder );
SwWriteTableCol *pCol = aCols[nCol];
if( !(nBorderMask & 4) )
- pCol->bLeftBorder = FALSE;
+ pCol->bLeftBorder = sal_False;
pCol = aCols[nCol+nColSpan-1];
if( !(nBorderMask & 8) )
- pCol->bRightBorder = FALSE;
+ pCol->bRightBorder = sal_False;
if( !(nBorderMask & 1) )
- pRow->bTopBorder = FALSE;
+ pRow->bTopBorder = sal_False;
SwWriteTableRow *pEndRow = aRows[nRow+nRowSpan-1];
if( !(nBorderMask & 2) )
- pEndRow->bBottomBorder = FALSE;
+ pEndRow->bBottomBorder = sal_False;
// Die Hoehe braucht nur einmal geschieben werden
if( nHeight )
- bHeightExported = TRUE;
+ bHeightExported = sal_True;
}
}
diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx
index 74e48d955920..6847e3cbf2f5 100644
--- a/sw/source/filter/ww1/fltshell.cxx
+++ b/sw/source/filter/ww1/fltshell.cxx
@@ -77,9 +77,9 @@
using namespace com::sun::star;
-static SwCntntNode* GetCntntNode(SwDoc* pDoc, SwNodeIndex& rIdx, BOOL bNext)
+static SwCntntNode* GetCntntNode(SwDoc* pDoc, SwNodeIndex& rIdx, sal_Bool bNext)
{
- SwCntntNode* pCNd = pDoc->GetNodes()[ rIdx ]->GetCntntNode();
+ SwCntntNode * pCNd = rIdx.GetNode().GetCntntNode();
if(!pCNd && 0 == (pCNd = bNext ? pDoc->GetNodes().GoNext(&rIdx)
: pDoc->GetNodes().GoPrevious(&rIdx)))
{
@@ -98,10 +98,10 @@ SwFltStackEntry::SwFltStackEntry(const SwPosition& rStartPos, SfxPoolItem* pHt )
// Anfang vom Bereich merken
nMkCntnt = rStartPos.nContent.GetIndex();
pAttr = pHt; // speicher eine Kopie vom Attribut
- bOld = FALSE; // used for marking Attributes *before* skipping field results
- bLocked = TRUE; // locke das Attribut --> darf erst
- bCopied = FALSE; // gesetzt werden, wenn es wieder geunlocked ist
- bConsumedByField = FALSE;
+ bOld = sal_False; // used for marking Attributes *before* skipping field results
+ bLocked = sal_True; // locke das Attribut --> darf erst
+ bCopied = sal_False; // gesetzt werden, wenn es wieder geunlocked ist
+ bConsumedByField = sal_False;
}
SwFltStackEntry::SwFltStackEntry(const SwFltStackEntry& rEntry) :
@@ -111,7 +111,7 @@ SwFltStackEntry::SwFltStackEntry(const SwFltStackEntry& rEntry) :
pAttr = rEntry.pAttr->Clone();
nMkCntnt= rEntry.nMkCntnt;
bOld = rEntry.bOld;
- bLocked = bCopied = TRUE; // when rEntry were NOT bLocked we would never have been called
+ bLocked = bCopied = sal_True; // when rEntry were NOT bLocked we would never have been called
bConsumedByField = rEntry.bConsumedByField;
}
@@ -126,16 +126,16 @@ SwFltStackEntry::~SwFltStackEntry()
void SwFltStackEntry::SetEndPos(const SwPosition& rEndPos)
{
// Attribut freigeben und das Ende merken.
- // Alles mit USHORT's, weil sonst beim Einfuegen von neuem Text an der
+ // Alles mit sal_uInt16's, weil sonst beim Einfuegen von neuem Text an der
// Cursor-Position auch der Bereich vom Attribut weiter
// verschoben wird.
// Das ist aber nicht das gewollte!
- bLocked = FALSE; // freigeben und das ENDE merken
+ bLocked = sal_False; // freigeben und das ENDE merken
nPtNode = rEndPos.nNode.GetIndex()-1;
nPtCntnt = rEndPos.nContent.GetIndex();
}
-BOOL SwFltStackEntry::MakeRegion(SwDoc* pDoc, SwPaM& rRegion, BOOL bCheck )
+sal_Bool SwFltStackEntry::MakeRegion(SwDoc* pDoc, SwPaM& rRegion, sal_Bool bCheck )
{
// wird ueberhaupt ein Bereich umspannt ??
// - ist kein Bereich, dann nicht returnen wenn am Anfang vom Absatz
@@ -145,33 +145,33 @@ BOOL SwFltStackEntry::MakeRegion(SwDoc* pDoc, SwPaM& rRegion, BOOL bCheck )
nPtCntnt && RES_TXTATR_FIELD != pAttr->Which()
)
{
- return FALSE;
+ return sal_False;
}
// !!! Die Content-Indizies beziehen sich immer auf den Node !!!
rRegion.GetPoint()->nNode = nMkNode.GetIndex() + 1;
- SwCntntNode* pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, TRUE);
+ SwCntntNode* pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, sal_True);
rRegion.GetPoint()->nContent.Assign(pCNd, nMkCntnt);
rRegion.SetMark();
if( nMkNode != nPtNode )
{
rRegion.GetPoint()->nNode = nPtNode.GetIndex() + 1;
- pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, FALSE);
+ pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, sal_False);
}
rRegion.GetPoint()->nContent.Assign(pCNd, nPtCntnt);
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE( CheckNodesRange( rRegion.Start()->nNode,
- rRegion.End()->nNode, TRUE ),
+ rRegion.End()->nNode, sal_True ),
"Attribut oder AEhnliches ueber Bereichs-Grenzen" );
#endif
if( bCheck )
return CheckNodesRange( rRegion.Start()->nNode,
- rRegion.End()->nNode, TRUE );
+ rRegion.End()->nNode, sal_True );
else
- return TRUE;
+ return sal_True;
}
-SwFltControlStack::SwFltControlStack(SwDoc* pDo, ULONG nFieldFl)
+SwFltControlStack::SwFltControlStack(SwDoc* pDo, sal_uLong nFieldFl)
: nFieldFlags(nFieldFl), pDoc(pDo), bIsEndStack(false)
{
}
@@ -192,12 +192,12 @@ SwFltControlStack::~SwFltControlStack()
// nach rechts verschoben werden.
void SwFltControlStack::MoveAttrs( const SwPosition& rPos )
{
- USHORT nCnt = static_cast< USHORT >(Count());
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
SwFltStackEntry* pEntry;
- ULONG nPosNd = rPos.nNode.GetIndex();
- USHORT nPosCt = rPos.nContent.GetIndex() - 1;
+ sal_uLong nPosNd = rPos.nNode.GetIndex();
+ sal_uInt16 nPosCt = rPos.nContent.GetIndex() - 1;
- for (USHORT i=0; i < nCnt; i++){
+ for (sal_uInt16 i=0; i < nCnt; i++){
pEntry = (*this)[ i ];
if(( pEntry->nMkNode.GetIndex() + 1 == nPosNd )
&&( pEntry->nMkCntnt >= nPosCt )){
@@ -218,15 +218,15 @@ void SwFltControlStack::MoveAttrs( const SwPosition& rPos )
void SwFltControlStack::MarkAllAttrsOld()
{
- USHORT nCnt = static_cast< USHORT >(Count());
- for (USHORT i=0; i < nCnt; i++)
- (*this)[ i ]->bOld = TRUE;
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
+ for (sal_uInt16 i=0; i < nCnt; i++)
+ (*this)[ i ]->bOld = sal_True;
}
void SwFltControlStack::NewAttr(const SwPosition& rPos, const SfxPoolItem & rAttr )
{
SwFltStackEntry *pTmp = new SwFltStackEntry(rPos, rAttr.Clone() );
- USHORT nWhich = pTmp->pAttr->Which();
+ sal_uInt16 nWhich = pTmp->pAttr->Which();
SetAttr(rPos, nWhich);// Ende von evtl. gleichen Attributen auf dem Stack
// Setzen, damit sich die Attribute nicht auf
// dem Stack haeufen
@@ -249,9 +249,9 @@ void SwFltControlStack::DeleteAndDestroy(Entries::size_type nCnt)
// Damit erscheinen sie nicht in der Doc-Struktur. Dabei werden nur die
// Attribute entfernt, die im selben Absatz wie pPos stehen.
// Wird fuer Grafik-Apos -> Grafiken benutzt.
-void SwFltControlStack::StealAttr(const SwPosition* pPos, USHORT nAttrId /* = 0 */)
+void SwFltControlStack::StealAttr(const SwPosition* pPos, sal_uInt16 nAttrId /* = 0 */)
{
- USHORT nCnt = static_cast< USHORT >(Count());
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
SwFltStackEntry* pEntry;
@@ -273,9 +273,9 @@ void SwFltControlStack::StealAttr(const SwPosition* pPos, USHORT nAttrId /* = 0
void SwFltControlStack::KillUnlockedAttrs(const SwPosition& pPos)
{
SwNodeIndex aAktNode( pPos.nNode, -1 );
- USHORT nAktIdx = pPos.nContent.GetIndex();
+ sal_uInt16 nAktIdx = pPos.nContent.GetIndex();
- USHORT nCnt = static_cast< USHORT >(Count());
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
SwFltStackEntry* pEntry;
while( nCnt )
{
@@ -297,19 +297,19 @@ void SwFltControlStack::KillUnlockedAttrs(const SwPosition& pPos)
// alle anderen im Document setzen und wieder aus dem Stack loeschen
// Returned, ob das gesuchte Attribut / die gesuchten Attribute
// ueberhaupt auf dem Stack standen
-void SwFltControlStack::SetAttr(const SwPosition& rPos, USHORT nAttrId,
- BOOL bTstEnde, long nHand, BOOL consumedByField )
+void SwFltControlStack::SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId,
+ sal_Bool bTstEnde, long nHand, sal_Bool consumedByField )
{
OSL_ENSURE(!nAttrId ||
(POOLATTR_BEGIN <= nAttrId && POOLATTR_END > nAttrId) ||
(RES_FLTRATTR_BEGIN <= nAttrId && RES_FLTRATTR_END > nAttrId),
"Falsche Id fuers Attribut");
- USHORT nCnt = static_cast< USHORT >(Count());
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
SwFltStackEntry* pEntry;
- for (USHORT i=0; i < nCnt; i++)
+ for (sal_uInt16 i=0; i < nCnt; i++)
{
pEntry = (*this)[ i ];
if (pEntry->bLocked)
@@ -357,7 +357,7 @@ static void MakePoint(SwFltStackEntry* pEntry, SwDoc* pDoc, SwPaM& rRegion)
// gesetzt werden.
rRegion.DeleteMark();
rRegion.GetPoint()->nNode = pEntry->nMkNode.GetIndex() + 1;
- SwCntntNode* pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, TRUE);
+ SwCntntNode* pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, sal_True);
rRegion.GetPoint()->nContent.Assign(pCNd, pEntry->nMkCntnt);
}
@@ -365,12 +365,13 @@ static void MakePoint(SwFltStackEntry* pEntry, SwDoc* pDoc, SwPaM& rRegion)
// Beschraenkungen von Bookmarks in Tabellen werden beachtet.
// ( Anfang und Ende muessen in selber Zelle sein )
static void MakeBookRegionOrPoint(SwFltStackEntry* pEntry, SwDoc* pDoc,
- SwPaM& rRegion, BOOL bCheck )
+ SwPaM& rRegion, sal_Bool bCheck )
{
if (pEntry->MakeRegion(pDoc, rRegion, bCheck )){
- const SwNodes& rNds = pDoc->GetNodes();
- if( rNds[rRegion.GetPoint()->nNode]->FindTableBoxStartNode()
- != rNds[rRegion.GetMark()->nNode]->FindTableBoxStartNode() ){
+// sal_Bool b1 = rNds[rRegion.GetPoint()->nNode]->FindTableNode() != 0;
+ if (rRegion.GetPoint()->nNode.GetNode().FindTableBoxStartNode()
+ != rRegion.GetMark()->nNode.GetNode().FindTableBoxStartNode())
+ {
rRegion.Exchange(); // Ungueltiger Bereich
rRegion.DeleteMark(); // -> beide auf Mark
}
@@ -380,8 +381,8 @@ static void MakeBookRegionOrPoint(SwFltStackEntry* pEntry, SwDoc* pDoc,
}
#if OSL_DEBUG_LEVEL > 1
-extern BOOL CheckNodesRange( const SwNodeIndex& rStt,
- const SwNodeIndex& rEnd, BOOL bChkSection );
+extern sal_Bool CheckNodesRange( const SwNodeIndex& rStt,
+ const SwNodeIndex& rEnd, sal_Bool bChkSection );
#endif
// IterateNumrulePiece() sucht von rTmpStart bis rEnd den ersten
@@ -392,8 +393,8 @@ extern BOOL CheckNodesRange( const SwNodeIndex& rStt,
// rTmpStart ist ReinRaus-Parameter: Anfang des zu untersuchenden Bereiches rein,
// Anfang des gueltigen Bereichs raus
// rTmpEnd ist raus-Parameter
-// Return-Bool ist TRUE fuer gueltigen Bereich
-static BOOL IterateNumrulePiece( const SwNodeIndex& rEnd,
+// Return-Bool ist sal_True fuer gueltigen Bereich
+static sal_Bool IterateNumrulePiece( const SwNodeIndex& rEnd,
SwNodeIndex& rTmpStart, SwNodeIndex& rTmpEnd )
{
while( ( rTmpStart <= rEnd )
@@ -447,7 +448,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
SwNumRule* pRul = pDoc->FindNumRulePtr( rNumNm );
if( pRul )
{
- if( pEntry->MakeRegion(pDoc, aRegion, TRUE))
+ if( pEntry->MakeRegion(pDoc, aRegion, sal_True))
{
SwNodeIndex aTmpStart( aRegion.Start()->nNode );
SwNodeIndex aTmpEnd( aTmpStart );
@@ -480,7 +481,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
if (pB->IsPgRef() && !pB->IsRef())
{
// XRefs und Bookmarks sind bereits geUpcased
- MakeBookRegionOrPoint(pEntry, pDoc, aRegion, TRUE);
+ MakeBookRegionOrPoint(pEntry, pDoc, aRegion, sal_True);
pDoc->InsertPoolItem(aRegion, SwFmtRefMark(rName), 0);
}
else if( !pB->IsOnlyRef() )
@@ -502,7 +503,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
if( !pB->IsOnlyRef() &&
( !IsFlagSet(HYPO) || IsFlagSet(BOOK_AND_REF) ) && !pEntry->bConsumedByField)
{
- MakeBookRegionOrPoint(pEntry, pDoc, aRegion, TRUE);
+ MakeBookRegionOrPoint(pEntry, pDoc, aRegion, sal_True);
pDoc->getIDocumentMarkAccess()->makeMark( aRegion, rName, IDocumentMarkAccess::BOOKMARK);
}
}
@@ -529,13 +530,13 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
if( pSet )
{
if( !pTOXAttr->HadBreakItem()
- && SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, FALSE, &pItem ) )
+ && SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False, &pItem ) )
{
aBkSet.Put( *pItem );
pNd->ResetAttr( RES_BREAK );
}
if( !pTOXAttr->HadPageDescItem()
- && SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, FALSE, &pItem ) )
+ && SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, sal_False, &pItem ) )
{
aBkSet.Put( *pItem );
pNd->ResetAttr( RES_PAGEDESC );
@@ -560,7 +561,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
break;
case RES_FLTR_REDLINE:
{
- if (pEntry->MakeRegion(pDoc, aRegion, TRUE))
+ if (pEntry->MakeRegion(pDoc, aRegion, sal_True))
{
pDoc->SetRedlineMode((RedlineMode_t)( nsRedlineMode_t::REDLINE_ON
| nsRedlineMode_t::REDLINE_SHOW_INSERT
@@ -591,7 +592,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
}
break;
default:
- if (pEntry->MakeRegion(pDoc, aRegion, FALSE))
+ if (pEntry->MakeRegion(pDoc, aRegion, sal_False))
{
pDoc->InsertPoolItem(aRegion, *pEntry->pAttr, 0);
}
@@ -599,10 +600,10 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
}
}
-SfxPoolItem* SwFltControlStack::GetFmtStackAttr(USHORT nWhich, USHORT * pPos)
+SfxPoolItem* SwFltControlStack::GetFmtStackAttr(sal_uInt16 nWhich, sal_uInt16 * pPos)
{
SwFltStackEntry* pEntry;
- USHORT nSize = static_cast< USHORT >(Count());
+ sal_uInt16 nSize = static_cast< sal_uInt16 >(Count());
while (nSize)
{
@@ -619,14 +620,14 @@ SfxPoolItem* SwFltControlStack::GetFmtStackAttr(USHORT nWhich, USHORT * pPos)
return 0;
}
-const SfxPoolItem* SwFltControlStack::GetFmtAttr(const SwPosition& rPos, USHORT nWhich)
+const SfxPoolItem* SwFltControlStack::GetFmtAttr(const SwPosition& rPos, sal_uInt16 nWhich)
{
SfxPoolItem* pHt = GetFmtStackAttr(nWhich);
if (pHt)
return (const SfxPoolItem*)pHt;
// im Stack ist das Attribut nicht vorhanden, also befrage das Dokument
- SwCntntNode * pNd = pDoc->GetNodes()[ rPos.nNode ]->GetCntntNode();
+ SwCntntNode * pNd = rPos.nNode.GetNode().GetCntntNode();
if (!pNd) // kein ContentNode, dann das dflt. Attribut
return &pDoc->GetAttrPool().GetDefaultItem(nWhich);
@@ -641,16 +642,16 @@ void SwFltControlStack::Delete(const SwPaM &rPam)
return;
SwNodeIndex aStartNode(pStt->nNode, -1);
- USHORT nStartIdx = pStt->nContent.GetIndex();
+ sal_uInt16 nStartIdx = pStt->nContent.GetIndex();
SwNodeIndex aEndNode(pEnd->nNode, -1);
- USHORT nEndIdx = pEnd->nContent.GetIndex();
+ sal_uInt16 nEndIdx = pEnd->nContent.GetIndex();
//We don't support deleting content that is over one node, or removing a node.
OSL_ENSURE(aEndNode == aStartNode, "nodes must be the same, or this method extended");
if (aEndNode != aStartNode)
return;
- for (USHORT nSize = static_cast< USHORT >(Count()); nSize > 0;)
+ for (sal_uInt16 nSize = static_cast< sal_uInt16 >(Count()); nSize > 0;)
{
SwFltStackEntry* pEntry = (*this)[--nSize];
@@ -800,9 +801,9 @@ SfxPoolItem* SwFltRedline::Clone( SfxItemPool* ) const
//------ hier stehen die Methoden von SwFltBookmark -----------
SwFltBookmark::SwFltBookmark( const String& rNa, const String& rVa,
- long nHand, BOOL bOnlyR )
+ long nHand, sal_Bool bOnlyR )
: SfxPoolItem(RES_FLTR_BOOKMARK), nHandle(nHand), aName(rNa), aVal(rVa),
- bOnlyRef(bOnlyR), bRef(FALSE), bPgRef(FALSE)
+ bOnlyRef(bOnlyR), bRef(sal_False), bPgRef(sal_False)
{
// eSrc: CHARSET_DONTKNOW fuer keine UEbersetzung bei operator <<
// Upcase wird immer gemacht.
@@ -835,9 +836,9 @@ SfxPoolItem* SwFltBookmark::Clone(SfxItemPool*) const
//------ hier stehen die Methoden von SwFltTOX -----------
-SwFltTOX::SwFltTOX(SwTOXBase* pBase, USHORT _nCols)
+SwFltTOX::SwFltTOX(SwTOXBase* pBase, sal_uInt16 _nCols)
: SfxPoolItem(RES_FLTR_TOX), pTOXBase(pBase), nCols( _nCols ),
- bHadBreakItem( FALSE ), bHadPageDescItem( FALSE )
+ bHadBreakItem( sal_False ), bHadPageDescItem( sal_False )
{
}
@@ -890,7 +891,7 @@ SfxPoolItem* SwFltSection::Clone(SfxItemPool*) const
//
//////////////////////////////////////////////////////////// SwFltShell
-SwFltShell::SwFltShell(SwDoc* pDoc, SwPaM& rPaM, const String& rBaseURL, BOOL bNew, ULONG nFieldFl) :
+SwFltShell::SwFltShell(SwDoc* pDoc, SwPaM& rPaM, const String& rBaseURL, sal_Bool bNew, sal_uLong nFieldFl) :
pCurrentPageDesc(0),
pSavedPos(0),
eSubMode(None),
@@ -902,8 +903,8 @@ SwFltShell::SwFltShell(SwDoc* pDoc, SwPaM& rPaM, const String& rBaseURL, BOOL bN
nPageDescOffset(GetDoc().GetPageDescCnt()),
eSrcCharSet(RTL_TEXTENCODING_MS_1252),
bNewDoc(bNew),
- bStdPD(FALSE),
- bProtect(FALSE)
+ bStdPD(sal_False),
+ bProtect(sal_False)
{
memset( pColls, 0, sizeof( pColls ) );
pOutDoc = new SwFltOutDoc( *pDoc, pPaM, aStack, aEndStack );
@@ -914,7 +915,7 @@ SwFltShell::SwFltShell(SwDoc* pDoc, SwPaM& rPaM, const String& rBaseURL, BOOL bN
// evtl. Zeilen eingefuegt / aufgebrochen werden
const SwPosition* pPos = pPaM->GetPoint();
const SwTxtNode* pSttNd = pPos->nNode.GetNode().GetTxtNode();
- USHORT nCntPos = pPos->nContent.GetIndex();
+ sal_uInt16 nCntPos = pPos->nContent.GetIndex();
if( nCntPos && pSttNd->GetTxt().Len() )
// EinfuegePos nicht in leerer Zeile
pDoc->SplitNode( *pPos, false ); // neue Zeile erzeugen
@@ -924,8 +925,8 @@ SwFltShell::SwFltShell(SwDoc* pDoc, SwPaM& rPaM, const String& rBaseURL, BOOL bN
}
// verhinder das Einlesen von Tabellen in Fussnoten / Tabellen
- ULONG nNd = pPos->nNode.GetIndex();
- BOOL bReadNoTbl = 0 != pSttNd->FindTableNode() ||
+ sal_uLong nNd = pPos->nNode.GetIndex();
+ sal_Bool bReadNoTbl = 0 != pSttNd->FindTableNode() ||
( nNd < pDoc->GetNodes().GetEndOfInserts().GetIndex() &&
pDoc->GetNodes().GetEndOfInserts().StartOfSectionIndex() < nNd );
if( bReadNoTbl )
@@ -938,7 +939,7 @@ SwFltShell::SwFltShell(SwDoc* pDoc, SwPaM& rPaM, const String& rBaseURL, BOOL bN
SwFltShell::~SwFltShell()
{
- USHORT i;
+ sal_uInt16 i;
if (eSubMode == Style)
EndStyle();
@@ -948,11 +949,11 @@ SwFltShell::~SwFltShell()
EndFly();
GetDoc().SetUpdateExpFldStat(true);
- GetDoc().SetInitDBFields(TRUE);
- aStack.SetAttr(*pPaM->GetPoint(), 0, FALSE);
- aStack.SetAttr(*pPaM->GetPoint(), 0, FALSE);
- aEndStack.SetAttr(*pPaM->GetPoint(), 0, FALSE);
- aEndStack.SetAttr(*pPaM->GetPoint(), 0, FALSE);
+ GetDoc().SetInitDBFields(sal_True);
+ aStack.SetAttr(*pPaM->GetPoint(), 0, sal_False);
+ aStack.SetAttr(*pPaM->GetPoint(), 0, sal_False);
+ aEndStack.SetAttr(*pPaM->GetPoint(), 0, sal_False);
+ aEndStack.SetAttr(*pPaM->GetPoint(), 0, sal_False);
if( bProtect ){ // Das ganze Doc soll geschuetzt sein
SwDoc& rDoc = GetDoc();
@@ -974,7 +975,7 @@ SwFltShell::~SwFltShell()
if( !IsFlagSet(SwFltControlStack::DONT_HARD_PROTECT) ){
SwDocShell* pDocSh = rDoc.GetDocShell();
if( pDocSh )
- pDocSh->SetReadOnlyUI( TRUE );
+ pDocSh->SetReadOnlyUI( sal_True );
}
}
// Pagedescriptoren am Dokument updaten (nur so werden auch die
@@ -1013,7 +1014,7 @@ void SwFltShell::ConvertUStr( String& rInOut )
String SwFltShell::QuoteStr( const String& rIn )
{
String sOut( rIn );
- BOOL bAllowCr = aStack.IsFlagSet( SwFltControlStack::ALLOW_FLD_CR );
+ sal_Bool bAllowCr = aStack.IsFlagSet( SwFltControlStack::ALLOW_FLD_CR );
for( xub_StrLen n = 0; n < sOut.Len(); ++n )
{
@@ -1108,7 +1109,7 @@ SwFltShell& SwFltShell::AddGraphic( const String& rPicName )
return *this;
}
-SwFltShell& SwFltShell::SetStyle( USHORT nStyle )
+SwFltShell& SwFltShell::SetStyle( sal_uInt16 nStyle )
{
SwFltFormatCollection* p = pColls[ nStyle ];
@@ -1126,7 +1127,7 @@ SwFltShell& SwFltShell::SetStyle( USHORT nStyle )
}
else
{
- OSL_ENSURE( FALSE, "Ungueltiger SwFltStyleCode" );
+ OSL_ENSURE( sal_False, "Ungueltiger SwFltStyleCode" );
}
return *this;
}
@@ -1141,15 +1142,15 @@ SwFltShell& SwFltShell::operator << (SwFltBookmark& aBook)
void SwFltShell::SetBookEnd(long nHandle)
{
- aEndStack.SetAttr( *pPaM->GetPoint(), RES_FLTR_BOOKMARK, TRUE, nHandle );
+ aEndStack.SetAttr( *pPaM->GetPoint(), RES_FLTR_BOOKMARK, sal_True, nHandle );
}
-SwFltShell& SwFltShell::EndItem( USHORT nAttrId )
+SwFltShell& SwFltShell::EndItem( sal_uInt16 nAttrId )
{
switch( nAttrId )
{
case RES_FLTR_BOOKMARK:
- OSL_ENSURE( FALSE, "Falscher Aufruf fuer Bookmark-Ende" );
+ OSL_ENSURE( sal_False, "Falscher Aufruf fuer Bookmark-Ende" );
break;
case RES_FLTR_TOX:
@@ -1182,12 +1183,12 @@ SwFltShell& SwFltShell::operator << (const SwField& rField)
return *this;
}
-const SfxPoolItem& SwFltOutDoc::GetAttr(USHORT nWhich)
+const SfxPoolItem& SwFltOutDoc::GetAttr(sal_uInt16 nWhich)
{
return *rStack.GetFmtAttr(*pPaM->GetPoint(), nWhich);
}
-const SfxPoolItem& SwFltFormatCollection::GetAttr(USHORT nWhich)
+const SfxPoolItem& SwFltFormatCollection::GetAttr(sal_uInt16 nWhich)
{
return GetColl()->GetFmtAttr(nWhich); // mit Parents
}
@@ -1197,71 +1198,70 @@ const SfxPoolItem& SwFltFormatCollection::GetAttr(USHORT nWhich)
// sonst aus dem Node mit Parents
// Im Stack wird nicht nachgesehen
-const SfxPoolItem& SwFltOutDoc::GetNodeOrStyAttr(USHORT nWhich)
+const SfxPoolItem& SwFltOutDoc::GetNodeOrStyAttr(sal_uInt16 nWhich)
{
- SwCntntNode * pNd = GetDoc().GetNodes()[ pPaM->GetPoint()->nNode ]
- ->GetCntntNode();
+ SwCntntNode * pNd = pPaM->GetPoint()->nNode.GetNode().GetCntntNode();
if (pNd) // ContentNode: Attribut mit Parent
return pNd->GetAttr(nWhich);
else // kein ContentNode, dann das dflt. Attribut
return GetDoc().GetAttrPool().GetDefaultItem(nWhich);
}
-const SfxPoolItem& SwFltFormatCollection::GetNodeOrStyAttr(USHORT nWhich)
+const SfxPoolItem& SwFltFormatCollection::GetNodeOrStyAttr(sal_uInt16 nWhich)
{
return GetColl()->GetFmtAttr(nWhich); // mit Parents
}
-const SfxPoolItem& SwFltShell::GetNodeOrStyAttr(USHORT nWhich)
+const SfxPoolItem& SwFltShell::GetNodeOrStyAttr(sal_uInt16 nWhich)
{
return pOut->GetNodeOrStyAttr( nWhich );
}
-const SfxPoolItem& SwFltShell::GetAttr(USHORT nWhich)
+const SfxPoolItem& SwFltShell::GetAttr(sal_uInt16 nWhich)
{
return pOut->GetAttr( nWhich );
}
-const SfxPoolItem& SwFltShell::GetFlyFrmAttr(USHORT nWhich)
+const SfxPoolItem& SwFltShell::GetFlyFrmAttr(sal_uInt16 nWhich)
{
return pOut->GetFlyFrmAttr( nWhich );
}
-SwFieldType* SwFltShell::GetSysFldType(USHORT eWhich)
+SwFieldType* SwFltShell::GetSysFldType(sal_uInt16 eWhich)
{
return GetDoc().GetSysFldType(eWhich);
}
-BOOL SwFltShell::GetWeightBold()
+sal_Bool SwFltShell::GetWeightBold()
{
return ((SvxWeightItem&)GetNodeOrStyAttr(RES_CHRATR_WEIGHT)).GetWeight()
!= WEIGHT_NORMAL;
}
-BOOL SwFltShell::GetPostureItalic()
+sal_Bool SwFltShell::GetPostureItalic()
{
return ((SvxPostureItem&)GetNodeOrStyAttr(RES_CHRATR_POSTURE)).GetPosture()
!= ITALIC_NONE;
}
-BOOL SwFltShell::GetCrossedOut()
+sal_Bool SwFltShell::GetCrossedOut()
{
return ((SvxCrossedOutItem&)GetNodeOrStyAttr(RES_CHRATR_CROSSEDOUT))
.GetStrikeout() != STRIKEOUT_NONE;
}
-BOOL SwFltShell::GetContour()
+sal_Bool SwFltShell::GetContour()
{
return ((SvxContourItem&)GetNodeOrStyAttr(RES_CHRATR_CONTOUR)).GetValue();
}
-BOOL SwFltShell::GetCaseKapitaelchen()
+sal_Bool SwFltShell::GetCaseKapitaelchen()
{
return ((SvxCaseMapItem&)GetNodeOrStyAttr(RES_CHRATR_CASEMAP))
.GetCaseMap() == SVX_CASEMAP_KAPITAELCHEN;
}
-BOOL SwFltShell::GetCaseVersalien()
+sal_Bool SwFltShell::GetCaseVersalien()
{
return ((SvxCaseMapItem&)GetNodeOrStyAttr(RES_CHRATR_CASEMAP))
.GetCaseMap() == SVX_CASEMAP_VERSALIEN;
@@ -1280,103 +1280,103 @@ SwFltOutBase::SwFltOutBase(SwDoc& rDocu)
{
}
-const SfxPoolItem& SwFltOutBase::GetCellAttr(USHORT nWhich)
+const SfxPoolItem& SwFltOutBase::GetCellAttr(sal_uInt16 nWhich)
{
- OSL_ENSURE(FALSE, "GetCellAttr ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "GetCellAttr ausserhalb von normalem Text");
return GetDoc().GetAttrPool().GetDefaultItem(nWhich);
}
-BOOL SwFltOutBase::BeginTable()
+sal_Bool SwFltOutBase::BeginTable()
{
- OSL_ENSURE(FALSE, "BeginTable ausserhalb von normalem Text");
- return FALSE;
+ OSL_ENSURE(sal_False, "BeginTable ausserhalb von normalem Text");
+ return sal_False;
}
void SwFltOutBase::NextTableCell()
{
- OSL_ENSURE(FALSE, "NextTableCell ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "NextTableCell ausserhalb von normalem Text");
}
void SwFltOutBase::NextTableRow()
{
- OSL_ENSURE(FALSE, "NextTableRow ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "NextTableRow ausserhalb von normalem Text");
}
void SwFltOutBase::SetTableWidth(SwTwips /*nW*/)
{
- OSL_ENSURE(FALSE, "SetTableWidth ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "SetTableWidth ausserhalb von normalem Text");
}
void SwFltOutBase::SetTableOrient(sal_Int16 /*eOri*/)
{
- OSL_ENSURE(FALSE, "SetTableOrient ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "SetTableOrient ausserhalb von normalem Text");
}
-void SwFltOutBase::SetCellWidth(SwTwips /*nWidth*/, USHORT /*nCell*/)
+void SwFltOutBase::SetCellWidth(SwTwips /*nWidth*/, sal_uInt16 /*nCell*/)
{
- OSL_ENSURE(FALSE, "SetCellWidth ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "SetCellWidth ausserhalb von normalem Text");
}
void SwFltOutBase::SetCellHeight(SwTwips /*nH*/)
{
- OSL_ENSURE(FALSE, "SetCellHeight ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "SetCellHeight ausserhalb von normalem Text");
}
-void SwFltOutBase::SetCellBorder(const SvxBoxItem& /*rFmtBox*/, USHORT /*nCell*/)
+void SwFltOutBase::SetCellBorder(const SvxBoxItem& /*rFmtBox*/, sal_uInt16 /*nCell*/)
{
- OSL_ENSURE(FALSE, "SetCellBorder ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "SetCellBorder ausserhalb von normalem Text");
}
-void SwFltOutBase::SetCellSpace(USHORT /*nSp*/)
+void SwFltOutBase::SetCellSpace(sal_uInt16 /*nSp*/)
{
- OSL_ENSURE(FALSE, "SetCellSpace ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "SetCellSpace ausserhalb von normalem Text");
}
-void SwFltOutBase::DeleteCell(USHORT /*nCell*/)
+void SwFltOutBase::DeleteCell(sal_uInt16 /*nCell*/)
{
- OSL_ENSURE(FALSE, "DeleteCell ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "DeleteCell ausserhalb von normalem Text");
}
void SwFltOutBase::EndTable()
{
- OSL_ENSURE(FALSE, "EndTable ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "EndTable ausserhalb von normalem Text");
}
-/*virtual*/ BOOL SwFltOutDoc::IsInTable()
+/*virtual*/ sal_Bool SwFltOutDoc::IsInTable()
{
return pTable != 0;
};
-BOOL SwFltOutDoc::BeginTable()
+sal_Bool SwFltOutDoc::BeginTable()
{
if(bReadNoTbl)
- return FALSE;
+ return sal_False;
if (pTable){
- OSL_ENSURE(FALSE, "BeginTable in Table");
- return FALSE;
+ OSL_ENSURE(sal_False, "BeginTable in Table");
+ return sal_False;
}
// Alle Attribute schliessen, da sonst Attribute
// entstehen koennen, die in Flys reinragen
- rStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
- rEndStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
+ rStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
+ rEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
// create table:
OSL_ENSURE(pTabSavedPos == NULL, "SwFltOutDoc");
pTabSavedPos = new SwPosition(*pPaM->GetPoint());
pTable = GetDoc().InsertTable(
SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 1 ),
- *pTabSavedPos, 1, 1, text::HoriOrientation::LEFT, 0, 0, FALSE, FALSE ); // TODO MULTIHEADER
+ *pTabSavedPos, 1, 1, text::HoriOrientation::LEFT, 0, 0, sal_False, sal_False ); // TODO MULTIHEADER
nTableWidth = 0;
((SwTable*)pTable)->LockModify(); // Nichts automatisch anpassen!
// set pam in 1. table cell
usTableX =
usTableY = 0;
- SeekCell(usTableY, usTableX, TRUE);
- return TRUE;
+ SeekCell(usTableY, usTableX, sal_True);
+ return sal_True;
}
-SwTableBox* SwFltOutDoc::GetBox(USHORT ny, USHORT nx /*= USHRT_MAX */)
+SwTableBox* SwFltOutDoc::GetBox(sal_uInt16 ny, sal_uInt16 nx /*= USHRT_MAX */)
{
if(!pTable){
OSL_ENSURE(pTable, "GetBox ohne Tabelle");
@@ -1388,25 +1388,25 @@ SwTableBox* SwFltOutDoc::GetBox(USHORT ny, USHORT nx /*= USHRT_MAX */)
// get structs to table cells
const SwTableLines* pTableLines = &pTable->GetTabLines();
if(!pTableLines){
- OSL_ENSURE(FALSE, "SwFltOutDoc:GetBox:pTableLines");
+ OSL_ENSURE(sal_False, "SwFltOutDoc:GetBox:pTableLines");
return 0;
}
if( ny >= pTableLines->Count() ){ // Notbremse
- OSL_ENSURE( FALSE, "SwFltOutDoc:GetBox:ny >= Count()");
+ OSL_ENSURE( sal_False, "SwFltOutDoc:GetBox:ny >= Count()");
ny = pTableLines->Count() - 1;
}
SwTableLine* pTableLine = (*pTableLines)[ny];
if(!pTableLine){
- OSL_ENSURE(FALSE, "SwFltOutDoc:GetBox:pTableLine");
+ OSL_ENSURE(sal_False, "SwFltOutDoc:GetBox:pTableLine");
return 0;
}
SwTableBoxes* pTableBoxes = &pTableLine->GetTabBoxes();
if(!pTableBoxes){
- OSL_ENSURE(FALSE, "SwFltOutDoc:GetBox:pTableBoxes");
+ OSL_ENSURE(sal_False, "SwFltOutDoc:GetBox:pTableBoxes");
return 0;
}
if( nx >= pTableBoxes->Count() ){ // Notbremse
- OSL_ENSURE(FALSE, "SwFltOutDoc:GetBox:nx >= Count()");
+ OSL_ENSURE(sal_False, "SwFltOutDoc:GetBox:nx >= Count()");
nx = pTableBoxes->Count() - 1;
}
SwTableBox* pTableBox = (*pTableBoxes)[nx];
@@ -1438,7 +1438,7 @@ void SwFltOutDoc::NextTableCell()
GetDoc().GetTxtCollFromPool(RES_POOLCOLL_STANDARD, false ),
0,
pTableBoxes->Count());
- SeekCell(usTableY, usTableX, TRUE);
+ SeekCell(usTableY, usTableX, sal_True);
pTableBox = (*pTableBoxes)[usTableX];
OSL_ENSURE(pTableBox != 0, "SwFltOutDoc:pTableBox");
if(pTableBox)
@@ -1455,7 +1455,7 @@ void SwFltOutDoc::NextTableRow()
aSelBoxes.Insert( pTableBox );
GetDoc().InsertRow(aSelBoxes);
usTableX = 0;
- SeekCell(++usTableY, usTableX, TRUE);
+ SeekCell(++usTableY, usTableX, sal_True);
GetDoc().SetTxtFmtColl(*pPaM,
GetDoc().GetTxtCollFromPool(RES_POOLCOLL_STANDARD, false ));
}
@@ -1485,7 +1485,7 @@ void SwFltOutDoc::SetTableOrient(sal_Int16 eOri)
pTable->GetFrmFmt()->SetFmtAttr( SwFmtHoriOrient( 0, eOri ));
}
-void SwFltOutDoc::SetCellWidth(SwTwips nWidth, USHORT nCell /* = USHRT_MAX */ )
+void SwFltOutDoc::SetCellWidth(SwTwips nWidth, sal_uInt16 nCell /* = USHRT_MAX */ )
{
if(!pTable){
OSL_ENSURE(pTable, "SetCellWidth ohne Tabelle");
@@ -1519,7 +1519,7 @@ void SwFltOutDoc::SetCellHeight(SwTwips nHeight)
pTableLine->GetFrmFmt()->SetFmtAttr(aFmtFrmSize);
}
-const SfxPoolItem& SwFltOutDoc::GetCellAttr(USHORT nWhich)
+const SfxPoolItem& SwFltOutDoc::GetCellAttr(sal_uInt16 nWhich)
{
if (!pTable){
OSL_ENSURE(pTable, "GetCellAttr ohne Table");
@@ -1533,7 +1533,7 @@ const SfxPoolItem& SwFltOutDoc::GetCellAttr(USHORT nWhich)
}
void SwFltOutDoc::SetCellBorder(const SvxBoxItem& rFmtBox,
- USHORT nCell /* = USHRT_MAX */ )
+ sal_uInt16 nCell /* = USHRT_MAX */ )
{
SwTableBox* pTableBox = GetBox(usTableY, nCell);
if(pTableBox)
@@ -1541,7 +1541,7 @@ void SwFltOutDoc::SetCellBorder(const SvxBoxItem& rFmtBox,
}
// nicht aktiviert !!!
-void SwFltOutDoc::SetCellSpace(USHORT nDist)
+void SwFltOutDoc::SetCellSpace(sal_uInt16 nDist)
{
if(!pTable){
OSL_ENSURE(pTable, "SetCellSpace ohne Tabelle");
@@ -1564,7 +1564,7 @@ void SwFltOutDoc::SetCellSpace(USHORT nDist)
pTableBox->GetFrmFmt()->SetFmtAttr(aFmtBox);
}
-void SwFltOutDoc::DeleteCell(USHORT nCell /* = USHRT_MAX */)
+void SwFltOutDoc::DeleteCell(sal_uInt16 nCell /* = USHRT_MAX */)
{
SwTableBox* pTableBox = GetBox(usTableY, nCell);
if(pTableBox){
@@ -1597,8 +1597,8 @@ void SwFltOutDoc::EndTable()
}
// Alle Attribute schliessen, da sonst Attribute
// entstehen koennen, die in Flys reinragen
- rStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
- rEndStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
+ rStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
+ rEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
if (GetDoc().GetRootFrm()){
SwTableNode* pTableNode = GetDoc().IsIdxInTbl(
@@ -1615,7 +1615,7 @@ void SwFltOutDoc::EndTable()
nTableWidth = 0;
}
-BOOL SwFltOutDoc::SeekCell(short nRow, short nCol, BOOL bPam)
+sal_Bool SwFltOutDoc::SeekCell(short nRow, short nCol, sal_Bool bPam)
{
// get structs to table cells
const SwTableLines* pTableLines = &pTable->GetTabLines();
@@ -1623,20 +1623,20 @@ BOOL SwFltOutDoc::SeekCell(short nRow, short nCol, BOOL bPam)
SwTableBoxes* pTableBoxes = &pTableLine->GetTabBoxes();
SwTableBox* pTableBox = (*pTableBoxes)[usTableX];
- if ((USHORT)nRow >= pTableLines->Count())
+ if ((sal_uInt16)nRow >= pTableLines->Count())
{
- OSL_ENSURE((USHORT)nRow >= pTableLines->Count(), "SwFltOutDoc");
- return FALSE;
+ OSL_ENSURE((sal_uInt16)nRow >= pTableLines->Count(), "SwFltOutDoc");
+ return sal_False;
}
pTableLine = (*pTableLines)[nRow];
pTableBoxes = &pTableLine->GetTabBoxes();
if (nCol >= pTableBoxes->Count())
- return FALSE;
+ return sal_False;
pTableBox = (*pTableBoxes)[nCol];
if( !pTableBox->GetSttNd() )
{
OSL_ENSURE(pTableBox->GetSttNd(), "SwFltOutDoc");
- return FALSE;
+ return sal_False;
}
if(bPam)
{
@@ -1650,7 +1650,7 @@ BOOL SwFltOutDoc::SeekCell(short nRow, short nCol, BOOL bPam)
GetDoc().SetTxtFmtColl(*pPaM,
GetDoc().GetTxtCollFromPool(RES_POOLCOLL_STANDARD, false ));
}
- return TRUE;
+ return sal_True;
}
@@ -1673,8 +1673,8 @@ SfxItemSet* SwFltOutBase::NewFlyDefaults()
return p;
}
-BOOL SwFltOutBase::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
- BOOL bAbsolutePos /*= FALSE*/,
+sal_Bool SwFltOutBase::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
+ sal_Bool bAbsolutePos /*= sal_False*/,
const SfxItemSet*
#if OSL_DEBUG_LEVEL > 1
pMoreAttrs /*= 0*/
@@ -1686,17 +1686,17 @@ BOOL SwFltOutBase::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
#endif
eFlyAnchor = eAnchor;
bFlyAbsPos = bAbsolutePos; // Bloedsinn eigentlich
- return TRUE;
+ return sal_True;
}
/*virtual*/ void SwFltOutBase::SetFlyAnchor( RndStdIds eAnchor )
{
if( !IsInFly() ){
- OSL_ENSURE( FALSE, "SetFlyAnchor() ohne Fly" );
+ OSL_ENSURE( sal_False, "SetFlyAnchor() ohne Fly" );
return;
}
if ( eAnchor == FLY_AS_CHAR ){
- OSL_ENSURE( FALSE, "SetFlyAnchor( FLY_AS_CHAR ) nicht implementiert" );
+ OSL_ENSURE( sal_False, "SetFlyAnchor( FLY_AS_CHAR ) nicht implementiert" );
return;
}
SwFmtAnchor& rAnchor = (SwFmtAnchor&)GetFlyFrmAttr( RES_ANCHOR );
@@ -1715,7 +1715,7 @@ void SwFltOutBase::EndFly()
// Flys in SwFltDoc
//-----------------------------------------------------------------------------
-/* virtual */ BOOL SwFltOutDoc::IsInFly()
+/* virtual */ sal_Bool SwFltOutDoc::IsInFly()
{
return pFly != 0;
};
@@ -1727,8 +1727,8 @@ SwFrmFmt* SwFltOutDoc::MakeFly( RndStdIds eAnchor, SfxItemSet* pSet )
return pFly;
}
-BOOL SwFltOutDoc::BeginFly( RndStdIds eAnchor,
- BOOL bAbsolutePos ,
+sal_Bool SwFltOutDoc::BeginFly( RndStdIds eAnchor,
+ sal_Bool bAbsolutePos ,
const SfxItemSet* pMoreAttrs)
{
@@ -1737,8 +1737,8 @@ BOOL SwFltOutDoc::BeginFly( RndStdIds eAnchor,
// Alle Attribute schliessen, da sonst Attribute entstehen koennen,
// die in Flys reinragen
- rStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
- rEndStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
+ rStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
+ rEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
// create Fly:
OSL_ENSURE(pFlySavedPos == NULL, "BeginFly in Fly"); // rekursiv geht noch nicht
@@ -1766,7 +1766,7 @@ BOOL SwFltOutDoc::BeginFly( RndStdIds eAnchor,
SwCntntNode *pNode = pPaM->GetCntntNode();
pPaM->GetPoint()->nContent.Assign( pNode, 0 );
- return TRUE;
+ return sal_True;
}
/*virtual*/ void SwFltOutDoc::SetFlyFrmAttr(const SfxPoolItem& rAttr)
@@ -1779,7 +1779,7 @@ BOOL SwFltOutDoc::BeginFly( RndStdIds eAnchor,
}
}
-/*virtual*/ const SfxPoolItem& SwFltOutDoc::GetFlyFrmAttr(USHORT nWhich)
+/*virtual*/ const SfxPoolItem& SwFltOutDoc::GetFlyFrmAttr(sal_uInt16 nWhich)
{
if (pFly){
return pFly->GetFmtAttr( nWhich );
@@ -1792,13 +1792,13 @@ BOOL SwFltOutDoc::BeginFly( RndStdIds eAnchor,
void SwFltOutDoc::EndFly()
{
if( pTable ){
- OSL_ENSURE( FALSE, "SwFltOutDoc::EndFly() in Table" );
+ OSL_ENSURE( sal_False, "SwFltOutDoc::EndFly() in Table" );
return;
}
// Alle Attribute schliessen, da sonst Attribute
// entstehen koennen, die aus Flys rausragen
- rStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
- rEndStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
+ rStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
+ rEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
*pPaM->GetPoint() = *pFlySavedPos; // restore Cursor
delete pFlySavedPos;
@@ -1810,7 +1810,7 @@ void SwFltOutDoc::EndFly()
//-----------------------------------------------------------------------------
// Flys in SwFltFormatCollection
//-----------------------------------------------------------------------------
-/*virtual*/ BOOL SwFltFormatCollection::IsInFly()
+/*virtual*/ sal_Bool SwFltFormatCollection::IsInFly()
{
return bHasFly;
};
@@ -1823,57 +1823,56 @@ void SwFltOutDoc::EndFly()
pFlyAttrs->Put( rAttr );
}
-/*virtual*/ const SfxPoolItem& SwFltFormatCollection::GetFlyFrmAttr(USHORT nWhich)
+/*virtual*/ const SfxPoolItem& SwFltFormatCollection::GetFlyFrmAttr(sal_uInt16 nWhich)
{
if( pFlyAttrs )
- return pFlyAttrs->Get( nWhich, FALSE );
+ return pFlyAttrs->Get( nWhich, sal_False );
else
return GetDoc().GetAttrPool().GetDefaultItem(nWhich);
}
-BOOL SwFltFormatCollection::BeginFly( RndStdIds eAnchor,
- BOOL bAbsolutePos,
+sal_Bool SwFltFormatCollection::BeginFly( RndStdIds eAnchor,
+ sal_Bool bAbsolutePos,
const SfxItemSet* pMoreAttrs)
{
SwFltOutBase::BeginFly( eAnchor, bAbsolutePos, pMoreAttrs );
- bHasFly = TRUE;
- return TRUE;
+ bHasFly = sal_True;
+ return sal_True;
}
void SwFltFormatCollection::EndFly() // Wird nie aufgerufen
{
}
-BOOL SwFltFormatCollection::BeginStyleFly( SwFltOutDoc* pOutDoc )
+sal_Bool SwFltFormatCollection::BeginStyleFly( SwFltOutDoc* pOutDoc )
{
OSL_ENSURE( pOutDoc, "BeginStyleFly ohne pOutDoc" );
OSL_ENSURE( pOutDoc && !pOutDoc->IsInFly(), "BeginStyleFly in Fly" );
if( pOutDoc && !pOutDoc->IsInFly() )
return pOutDoc->BeginFly( eFlyAnchor, bFlyAbsPos, pFlyAttrs );
else
- return FALSE;
+ return sal_False;
}
//-----------------------------------------------------------------------------
// Flys in SwFltShell
//-----------------------------------------------------------------------------
-BOOL SwFltShell::BeginFly( RndStdIds eAnchor,
- BOOL bAbsolutePos)
-
+sal_Bool SwFltShell::BeginFly( RndStdIds eAnchor,
+ sal_Bool bAbsolutePos)
{
if (pOut->IsInFly()){
- OSL_ENSURE(FALSE, "BeginFly in Fly");
- return FALSE;
+ OSL_ENSURE(sal_False, "BeginFly in Fly");
+ return sal_False;
}
if (pOutDoc->IsInTable()){
- OSL_ENSURE(FALSE, "BeginFly in Table");
- return FALSE;
+ OSL_ENSURE(sal_False, "BeginFly in Table");
+ return sal_False;
}
pOut->BeginFly( eAnchor, bAbsolutePos, pColls[nAktStyle]->GetpFlyAttrs() );
eSubMode = Fly;
- return TRUE;
+ return sal_True;
}
void SwFltShell::SetFlyXPos( short nXPos, sal_Int16 eHRel,
@@ -1892,11 +1891,11 @@ void SwFltShell::SetFlyYPos( short nYPos, sal_Int16 eVRel,
void SwFltShell::EndFly()
{
if (!pOut->IsInFly()){
- OSL_ENSURE(FALSE, "EndFly ohne Fly");
+ OSL_ENSURE(sal_False, "EndFly ohne Fly");
return;
}
if (pOutDoc->IsInTable()){ // Table verschraenkt mit Fly macht keinen Sinn
- OSL_ENSURE(FALSE, "EndFly in Table ( verschraenkt )");
+ OSL_ENSURE(sal_False, "EndFly in Table ( verschraenkt )");
EndTable(); // -> Table beenden
}
pOut->EndFly();
@@ -1910,17 +1909,17 @@ void SwFltShell::EndFly()
void SwFltShell::BeginFootnote()
{
if( pOut->IsInFly() ){ // Passiert z.B. bei Fussnote in Fly
- OSL_ENSURE(FALSE, "Fussnote in Fly nicht erlaubt");
+ OSL_ENSURE(sal_False, "Fussnote in Fly nicht erlaubt");
return;
}
if( pOutDoc->IsInTable() ){
- OSL_ENSURE(FALSE, "Fussnote in Table z.Zt. nicht erlaubt");
+ OSL_ENSURE(sal_False, "Fussnote in Table z.Zt. nicht erlaubt");
return;
}
// Alle Attribute schliessen, da sonst Attribute entstehen koennen,
// die in Fussnoten reinragen
- aStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
+ aStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
// EndStack erstmal nicht zwangs-Schliessen, damit Bookmarks ueber
// Fussnoten im PMW uebernommen werden
@@ -1949,7 +1948,7 @@ void SwFltShell::EndFootnote()
return;
// Alle Attribute schliessen, da sonst Attribute
// entstehen koennen, die aus Fussnoten rausragen
- aStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
+ aStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
// EndStack erstmal nicht zwangs-Schliessen, damit Bookmarks ueber
// Fussnoten im PMW uebernommen werden
@@ -1962,7 +1961,7 @@ void SwFltShell::BeginHeader(SwPageDesc* /*pPD*/)
{
SwFrmFmt* pFmt = &pCurrentPageDesc->GetMaster();
SwFrmFmt* pHdFtFmt;
- pFmt->SetFmtAttr(SwFmtHeader(TRUE));
+ pFmt->SetFmtAttr(SwFmtHeader(sal_True));
pHdFtFmt = (SwFrmFmt*)pFmt->GetHeader().GetHeaderFmt();
const SwNodeIndex* pStartIndex = pHdFtFmt->GetCntnt().GetCntntIdx();
if (!pStartIndex)
@@ -1978,7 +1977,7 @@ void SwFltShell::BeginFooter(SwPageDesc* /*pPD*/)
{
SwFrmFmt* pFmt = &pCurrentPageDesc->GetMaster();
SwFrmFmt* pHdFtFmt;
- pFmt->SetFmtAttr(SwFmtFooter(TRUE));
+ pFmt->SetFmtAttr(SwFmtFooter(sal_True));
pHdFtFmt = (SwFrmFmt*)pFmt->GetFooter().GetFooterFmt();
const SwNodeIndex* pStartIndex = pHdFtFmt->GetCntnt().GetCntntIdx();
if (!pStartIndex)
@@ -2002,9 +2001,9 @@ SwPageDesc* SwFltShell::MakePageDesc(SwPageDesc* pFirstPageDesc)
if(bStdPD) // keine Neuen PageDescs
return pCurrentPageDesc;
- BOOL bFollow = (pFirstPageDesc != 0);
+ sal_Bool bFollow = (pFirstPageDesc != 0);
SwPageDesc* pNewPD;
- USHORT nPos;
+ sal_uInt16 nPos;
if (bFollow && pFirstPageDesc->GetFollow() != pFirstPageDesc)
return pFirstPageDesc; // Fehler: hat schon Follow
// Erkennung doppelter Namen fehlt noch (Wahrscheinlichkeit
@@ -2012,7 +2011,7 @@ SwPageDesc* SwFltShell::MakePageDesc(SwPageDesc* pFirstPageDesc)
nPos = GetDoc().MakePageDesc( ViewShell::GetShellRes()->GetPageDescName(
GetDoc().GetPageDescCnt(), bFollow ? ShellResource::FOLLOW_PAGE : ShellResource::NORMAL_PAGE),
- pFirstPageDesc, FALSE );
+ pFirstPageDesc, sal_False );
pNewPD = &((SwPageDesc&)const_cast<const SwDoc &>(GetDoc()).
GetPageDesc(nPos));
@@ -2036,7 +2035,7 @@ SwFltFormatCollection::SwFltFormatCollection(
SwFltOutBase(_rDoc),
pColl(_rDoc.GetTxtCollFromPool( static_cast< sal_uInt16 >(nType), false )),
pFlyAttrs( 0 ),
- bHasFly( FALSE )
+ bHasFly( sal_False )
{
Reset(); // Default-Attrs loeschen und Auto-Flag
}
@@ -2045,13 +2044,13 @@ SwFltFormatCollection::SwFltFormatCollection(
SwDoc& _rDoc, const String& rName ) :
SwFltOutBase(_rDoc),
pFlyAttrs( 0 ),
- bHasFly( FALSE )
+ bHasFly( sal_False )
{
pColl = _rDoc.MakeTxtFmtColl(rName, (SwTxtFmtColl*)_rDoc.GetDfltTxtFmtColl());
Reset(); // Default-Attrs loeschen und Auto-Flag
}
-void SwFltShell::NextStyle(USHORT nWhich, USHORT nNext)
+void SwFltShell::NextStyle(sal_uInt16 nWhich, sal_uInt16 nNext)
{
OSL_ENSURE(pColls[nWhich], "Next style for noexistent style" );
OSL_ENSURE(pColls[nNext], "Next style to noexistent style" );
diff --git a/sw/source/filter/ww1/makefile.mk b/sw/source/filter/ww1/makefile.mk
deleted file mode 100644
index 58930bdca9c7..000000000000
--- a/sw/source/filter/ww1/makefile.mk
+++ /dev/null
@@ -1,93 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=ww1
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(mydebug)" != ""
-CDEFS=$(CDEFS) -Dmydebug
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES= \
- $(SLO)$/fltshell.obj \
- $(SLO)$/w1filter.obj \
- $(SLO)$/w1par.obj \
- $(SLO)$/w1sprm.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/w1class.obj
-
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-run: alltar
-
-#copy all relevant files to a backupdir
-bak:
- copy ..\inc\fltshell.hxx backup
- copy *.?xx backup
- copy makefile* backup
- copy vcs.cfg backup
- copy ..\..\..\dump1\src\dump1.cxx backup
- copy ..\..\..\dump1\src\makefile backup\makefile.dmp
- copy ..\..\..\WNTMSCI\bin\makefile backup\makefile.bin
- copy ..\..\..\UTIL\makefile backup\makefile.utl
- copy s:\solenv\inc\wnt.mak backup
-
-# remove this filter from libs to avoid annoying effects
-upgrade:
- attrib -r *.?xx
- attrib -r makefile.*
- del ..\..\..\WNMSCI\LIB\ww1.lib
- del ..\..\..\WNMSCI\DBO\w1*.obj
- del ..\..\..\WNMSCI\DBO\fltshell.obj
- del ..\..\..\WNMSCI\MISC
- lib /nologo /REMOVE:..\..\..\WNTMSCI\obj\fltshell.obj /out:..\..\..\WNTMSCI\LIB\filter.lib ..\..\..\WNTMSCI\LIB\filter.lib
- lib /nologo /REMOVE:..\..\..\WNTMSCI\obj\w1sprm.obj /out:..\..\..\WNTMSCI\LIB\filter.lib ..\..\..\WNTMSCI\LIB\filter.lib
- lib /nologo /REMOVE:..\..\..\WNTMSCI\obj\w1filter.obj /out:..\..\..\WNTMSCI\LIB\filter.lib ..\..\..\WNTMSCI\LIB\filter.lib
- lib /nologo /REMOVE:..\..\..\WNTMSCI\obj\w1class.obj /out:..\..\..\WNTMSCI\LIB\filter.lib ..\..\..\WNTMSCI\LIB\filter.lib
- lib /nologo /REMOVE:..\..\..\WNTMSCI\obj\w1par.obj /out:..\..\..\WNTMSCI\LIB\filter.lib ..\..\..\WNTMSCI\LIB\filter.lib
- copy backup\makefile.bin ..\..\..\WNTMSCI\bin\makefile
- diff backup\makefile.utl ..\..\..\UTIL\makefile
- diff s:\solenv\inc\wnt.mak backup
-
-zip: bak
- pkzip c:\temp\ww1 backup\*.*
-
diff --git a/sw/source/filter/ww1/w1class.cxx b/sw/source/filter/ww1/w1class.cxx
index 5571f3199a7e..caf5b4d01652 100644
--- a/sw/source/filter/ww1/w1class.cxx
+++ b/sw/source/filter/ww1/w1class.cxx
@@ -58,13 +58,13 @@ Ww1Fib::Ww1Fib( SvStream& _rStream )
///////////////////////////////////////////////////////////// PlainText
-Ww1PlainText::Ww1PlainText(Ww1Fib& rWwFib, ULONG nFilePos, ULONG nCountBytes)
+Ww1PlainText::Ww1PlainText(Ww1Fib& rWwFib, sal_uLong nFilePos, sal_uLong nCountBytes)
: rFib(rWwFib), ulFilePos(nFilePos), ulCountBytes(nCountBytes),
ulSeek(0), bOK(true)
{
}
-sal_Unicode Ww1PlainText::operator [] ( ULONG ulOffset )
+sal_Unicode Ww1PlainText::operator [] ( sal_uLong ulOffset )
{
DBG_ASSERT( ulOffset<Count(), "Ww1PlainText" );
sal_Unicode cRet;
@@ -79,7 +79,7 @@ sal_Unicode Ww1PlainText::operator [] ( ULONG ulOffset )
return cRet;
}
-String Ww1PlainText::GetText( ULONG ulOffset, ULONG nLen ) const
+String Ww1PlainText::GetText( sal_uLong ulOffset, sal_uLong nLen ) const
{
String sRet;
ByteString aStr;
@@ -101,7 +101,7 @@ Ww1Style::~Ww1Style()
delete pPapx;
}
-void Ww1Style::SetDefaults(BYTE stc)
+void Ww1Style::SetDefaults(sal_uInt8 stc)
{
if( 222 == stc )
{
@@ -111,9 +111,9 @@ void Ww1Style::SetDefaults(BYTE stc)
}
}
-USHORT Ww1Style::ReadName( BYTE*&p, USHORT& rnCountBytes, USHORT stc )
+sal_uInt16 Ww1Style::ReadName( sal_uInt8*&p, sal_uInt16& rnCountBytes, sal_uInt16 stc )
{
- BYTE nCountBytes = SVBT8ToByte(p);
+ sal_uInt8 nCountBytes = SVBT8ToByte(p);
p++;
rnCountBytes--;
if( !nCountBytes ) // default
@@ -176,9 +176,9 @@ USHORT Ww1Style::ReadName( BYTE*&p, USHORT& rnCountBytes, USHORT stc )
return 0;
}
-USHORT Ww1Style::ReadChpx( BYTE*&p, USHORT& rnCountBytes )
+sal_uInt16 Ww1Style::ReadChpx( sal_uInt8*&p, sal_uInt16& rnCountBytes )
{
- USHORT nCountBytes = SVBT8ToByte(p);
+ sal_uInt16 nCountBytes = SVBT8ToByte(p);
p++;
rnCountBytes--;
if (nCountBytes != 255 // unused
@@ -194,9 +194,9 @@ USHORT Ww1Style::ReadChpx( BYTE*&p, USHORT& rnCountBytes )
return 0;
}
-USHORT Ww1Style::ReadPapx(BYTE*&p, USHORT& rnCountBytes)
+sal_uInt16 Ww1Style::ReadPapx(sal_uInt8*&p, sal_uInt16& rnCountBytes)
{
- USHORT nCountBytes = SVBT8ToByte(p);
+ sal_uInt16 nCountBytes = SVBT8ToByte(p);
p++;
rnCountBytes--;
if (nCountBytes != 255)
@@ -211,7 +211,7 @@ USHORT Ww1Style::ReadPapx(BYTE*&p, USHORT& rnCountBytes)
return 0;
}
-USHORT Ww1Style::ReadEstcp(BYTE*&p, USHORT& rnCountBytes)
+sal_uInt16 Ww1Style::ReadEstcp(sal_uInt8*&p, sal_uInt16& rnCountBytes)
{
stcNext = SVBT8ToByte(p);
p++;
@@ -227,22 +227,22 @@ USHORT Ww1Style::ReadEstcp(BYTE*&p, USHORT& rnCountBytes)
Ww1StyleSheet::Ww1StyleSheet(Ww1Fib& _rFib)
: cstcStd(0),
rFib(_rFib),
- bOK(FALSE)
+ bOK(sal_False)
{
- USHORT cbStshf = rFib.GetFIB().cbStshfGet();
+ sal_uInt16 cbStshf = rFib.GetFIB().cbStshfGet();
DBG_ASSERT(cbStshf>=17, "Ww1StyleSheet");
- for (USHORT stc=0;stc<Count();stc++)
+ for (sal_uInt16 stc=0;stc<Count();stc++)
{
aStyles[stc].SetParent(this);
- aStyles[stc].SetDefaults((BYTE)stc);
+ aStyles[stc].SetDefaults((sal_uInt8)stc);
}
- BYTE* del = NULL;
+ sal_uInt8* del = NULL;
if (rFib.GetStream().Seek(rFib.GetFIB().fcStshfGet())
- == (ULONG)rFib.GetFIB().fcStshfGet()
- && (del = new BYTE[cbStshf]) != NULL
- && rFib.GetStream().Read(del, cbStshf) == (ULONG)cbStshf)
+ == (sal_uLong)rFib.GetFIB().fcStshfGet()
+ && (del = new sal_uInt8[cbStshf]) != NULL
+ && rFib.GetStream().Read(del, cbStshf) == (sal_uLong)cbStshf)
{
- BYTE* p = del;
+ sal_uInt8* p = del;
cstcStd = SVBT16ToShort(p);
p += sizeof(SVBT16);
cbStshf -= sizeof(SVBT16);
@@ -256,17 +256,17 @@ Ww1StyleSheet::Ww1StyleSheet(Ww1Fib& _rFib)
delete [] del;
}
-USHORT Ww1StyleSheet::ReadNames( BYTE*& p, USHORT& rnCountBytes )
+sal_uInt16 Ww1StyleSheet::ReadNames( sal_uInt8*& p, sal_uInt16& rnCountBytes )
{
- USHORT nCountBytes = SVBT16ToShort(p);
+ sal_uInt16 nCountBytes = SVBT16ToShort(p);
p += sizeof(SVBT16);
DBG_ASSERT(rnCountBytes>=nCountBytes, "Ww1StyleSheet");
rnCountBytes = rnCountBytes - nCountBytes;
nCountBytes = nCountBytes - sizeof(SVBT16);
- USHORT stcp = 0;
+ sal_uInt16 stcp = 0;
while (nCountBytes > 0)
{
- USHORT stc = (stcp - cstcStd) & 255;
+ sal_uInt16 stc = (stcp - cstcStd) & 255;
aStyles[stc].ReadName(p, nCountBytes, stc);
stcp++;
}
@@ -274,17 +274,17 @@ USHORT Ww1StyleSheet::ReadNames( BYTE*& p, USHORT& rnCountBytes )
return 0;
}
-USHORT Ww1StyleSheet::ReadChpx(BYTE*& p, USHORT& rnCountBytes)
+sal_uInt16 Ww1StyleSheet::ReadChpx(sal_uInt8*& p, sal_uInt16& rnCountBytes)
{
- USHORT nCountBytes = SVBT16ToShort(p);
+ sal_uInt16 nCountBytes = SVBT16ToShort(p);
p += sizeof(SVBT16);
DBG_ASSERT(rnCountBytes>=nCountBytes, "Ww1StyleSheet");
rnCountBytes = rnCountBytes - nCountBytes;
nCountBytes = nCountBytes - sizeof(SVBT16);
- USHORT stcp = 0;
+ sal_uInt16 stcp = 0;
while (nCountBytes > 0)
{
- USHORT stc = (stcp - cstcStd) & 255;
+ sal_uInt16 stc = (stcp - cstcStd) & 255;
aStyles[stc].ReadChpx(p, nCountBytes);
stcp++;
}
@@ -292,17 +292,17 @@ USHORT Ww1StyleSheet::ReadChpx(BYTE*& p, USHORT& rnCountBytes)
return 0;
}
-USHORT Ww1StyleSheet::ReadPapx(BYTE*& p, USHORT& rnCountBytes)
+sal_uInt16 Ww1StyleSheet::ReadPapx(sal_uInt8*& p, sal_uInt16& rnCountBytes)
{
- USHORT nCountBytes = SVBT16ToShort(p);
+ sal_uInt16 nCountBytes = SVBT16ToShort(p);
p += sizeof(SVBT16);
DBG_ASSERT(rnCountBytes>=nCountBytes, "Ww1StyleSheet");
rnCountBytes = rnCountBytes - nCountBytes;
nCountBytes = nCountBytes - sizeof(SVBT16);
- USHORT stcp = 0;
+ sal_uInt16 stcp = 0;
while (nCountBytes > 0)
{
- USHORT stc = (stcp - cstcStd) & 255;
+ sal_uInt16 stc = (stcp - cstcStd) & 255;
aStyles[stc].ReadPapx(p, nCountBytes);
stcp++;
}
@@ -310,15 +310,15 @@ USHORT Ww1StyleSheet::ReadPapx(BYTE*& p, USHORT& rnCountBytes)
return 0;
}
-USHORT Ww1StyleSheet::ReadEstcp(BYTE*& p, USHORT& rnCountBytes)
+sal_uInt16 Ww1StyleSheet::ReadEstcp(sal_uInt8*& p, sal_uInt16& rnCountBytes)
{
- USHORT iMac = SVBT16ToShort(p);
+ sal_uInt16 iMac = SVBT16ToShort(p);
p += sizeof(SVBT16);
DBG_ASSERT(rnCountBytes>=sizeof(SVBT16), "Ww1StyleSheet");
rnCountBytes -= sizeof(SVBT16);
- for (USHORT stcp=0;stcp<iMac;stcp++)
+ for (sal_uInt16 stcp=0;stcp<iMac;stcp++)
{
- USHORT stc = (stcp - cstcStd) & 255;
+ sal_uInt16 stc = (stcp - cstcStd) & 255;
aStyles[stc].ReadEstcp(p, rnCountBytes);
}
DBG_ASSERT(rnCountBytes==0, "Ww1StyleSheet");
@@ -327,7 +327,7 @@ USHORT Ww1StyleSheet::ReadEstcp(BYTE*& p, USHORT& rnCountBytes)
///////////////////////////////////////////////////////////////// Fonts
-Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, ULONG nFieldFlgs)
+Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, sal_uLong nFieldFlgs)
: pFontA(0), rFib(rInFib), nFieldFlags(nFieldFlgs), nMax(0), bOK(false)
{
if(rFib.GetFIB().cbSttbfffnGet() > 2 ) // ueberhaupt fonts?
@@ -335,7 +335,7 @@ Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, ULONG nFieldFlgs)
SVBT16 nCountBytes;
DBG_ASSERT(rFib.GetFIB().cbSttbfffnGet() > sizeof(nCountBytes), "Ww1Fonts");
if (rFib.GetStream().Seek(rFib.GetFIB().fcSttbfffnGet())
- == (ULONG)rFib.GetFIB().fcSttbfffnGet())
+ == (sal_uLong)rFib.GetFIB().fcSttbfffnGet())
if (rFib.GetStream().Read(nCountBytes, sizeof(nCountBytes))
== sizeof(nCountBytes)) // Laenge steht hier nochmal
{
@@ -346,7 +346,7 @@ Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, ULONG nFieldFlgs)
- sizeof(nCountBytes)]; // Alloziere Font-Array
//~ Ww1: new-NULL
if (rFib.GetStream().Read(pA, rFib.GetFIB().cbSttbfffnGet()
- - sizeof(nCountBytes)) == (ULONG)rFib.GetFIB().cbSttbfffnGet()
+ - sizeof(nCountBytes)) == (sal_uLong)rFib.GetFIB().cbSttbfffnGet()
- sizeof(nCountBytes)) // lese alle Fonts
{} //nothing
@@ -355,7 +355,7 @@ Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, ULONG nFieldFlgs)
W1_FFN* p = pA;
while (1)
{
- USHORT nNextSiz;
+ sal_uInt16 nNextSiz;
nNextSiz = p->cbFfnM1Get() + 1;
if(nNextSiz > nLeft)
break;
@@ -370,7 +370,7 @@ Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, ULONG nFieldFlgs)
pFontA = new W1_FFN*[nMax]; // alloziere Index-Array
//~ Ww1: new-NULL
pFontA[0] = pA; // fuelle Index-Array
- USHORT i;
+ sal_uInt16 i;
for(i=1, p=pA; i<nMax; i++)
{
p = (W1_FFN*)(((char*)p) + p->cbFfnM1Get() + 1);
@@ -381,10 +381,10 @@ Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, ULONG nFieldFlgs)
pFontA = 0; // Keine Eintraege -> kein Array
}
}
- bOK = TRUE;
+ bOK = sal_True;
}
-W1_FFN* Ww1Fonts::GetFFN(USHORT nNum)
+W1_FFN* Ww1Fonts::GetFFN(sal_uInt16 nNum)
{
W1_FFN* pRet = NULL;
if (pFontA)
@@ -404,22 +404,22 @@ Ww1Dop::Ww1Dop(Ww1Fib& _rFib)
else
nRead = rFib.GetFIB().cbDopGet();
bOK = rFib.GetStream().Seek(rFib.GetFIB().fcDopGet()) ==
- (ULONG)rFib.GetFIB().fcDopGet() &&
- rFib.GetStream().Read(&aDop, nRead) == (ULONG)nRead;
+ (sal_uLong)rFib.GetFIB().fcDopGet() &&
+ rFib.GetStream().Read(&aDop, nRead) == (sal_uLong)nRead;
}
/////////////////////////////////////////////////////////////// Picture
-Ww1Picture::Ww1Picture(SvStream& rStream, ULONG ulFilePos)
+Ww1Picture::Ww1Picture(SvStream& rStream, sal_uLong ulFilePos)
: bOK(false), pPic(0)
{
ulFilePos &= 0xffffff; //~ ww1: warum auch immer - im highbyte steht eine 5?!?!
SVBT32 lcb;
- if (rStream.Seek(ulFilePos) == (ULONG)ulFilePos)
- if (rStream.Read(&lcb, sizeof(lcb)) == (ULONG)sizeof(lcb))
+ if (rStream.Seek(ulFilePos) == (sal_uLong)ulFilePos)
+ if (rStream.Read(&lcb, sizeof(lcb)) == (sal_uLong)sizeof(lcb))
if (sizeof(int)>=4 || SVBT32ToUInt32(lcb) < 0x8000) //~ mdt: 64K & 16bit
- if ((pPic = (W1_PIC*)(new BYTE[SVBT32ToUInt32(lcb)])) != NULL)
- if (rStream.Seek(ulFilePos) == (ULONG)ulFilePos)
- if (rStream.Read(pPic, SVBT32ToUInt32(lcb)) == (ULONG)SVBT32ToUInt32(lcb))
+ if ((pPic = (W1_PIC*)(new sal_uInt8[SVBT32ToUInt32(lcb)])) != NULL)
+ if (rStream.Seek(ulFilePos) == (sal_uLong)ulFilePos)
+ if (rStream.Read(pPic, SVBT32ToUInt32(lcb)) == (sal_uLong)SVBT32ToUInt32(lcb))
{
DBG_ASSERT(pPic->cbHeaderGet()==sizeof(*pPic)-sizeof(pPic->rgb), "Ww1Picture");
bOK = true;
@@ -427,43 +427,43 @@ Ww1Picture::Ww1Picture(SvStream& rStream, ULONG ulFilePos)
}
////////////////////////////////////////////////////////////////// Sprm
-Ww1Sprm::Ww1Sprm(BYTE* x, USHORT _nCountBytes)
+Ww1Sprm::Ww1Sprm(sal_uInt8* x, sal_uInt16 _nCountBytes)
: p(NULL),
nCountBytes(_nCountBytes),
- bOK(FALSE),
+ bOK(sal_False),
pArr(NULL),
count(0)
{
if (nCountBytes == 0)
- bOK = TRUE;
+ bOK = sal_True;
else
- if ((p = new BYTE[nCountBytes]) != NULL)
+ if ((p = new sal_uInt8[nCountBytes]) != NULL)
{
memcpy(p, x, nCountBytes);
if (ReCalc())
- bOK = TRUE;
+ bOK = sal_True;
}
}
-Ww1Sprm::Ww1Sprm(SvStream& rStream, ULONG ulFilePos)
+Ww1Sprm::Ww1Sprm(SvStream& rStream, sal_uLong ulFilePos)
: p(NULL),
nCountBytes(0),
- bOK(FALSE),
+ bOK(sal_False),
pArr(NULL),
count(0)
{
SVBT8 x;
ByteToSVBT8(0, x);
- if (rStream.Seek(ulFilePos) == (ULONG)ulFilePos)
- if (rStream.Read(&x, sizeof(x)) == (ULONG)sizeof(x))
+ if (rStream.Seek(ulFilePos) == (sal_uLong)ulFilePos)
+ if (rStream.Read(&x, sizeof(x)) == (sal_uLong)sizeof(x))
if ((nCountBytes = SVBT8ToByte(x)) == 255
|| !nCountBytes
- || (p = new BYTE[nCountBytes]) != NULL)
+ || (p = new sal_uInt8[nCountBytes]) != NULL)
if (nCountBytes == 255
|| !nCountBytes
- || rStream.Read(p, nCountBytes) == (ULONG)nCountBytes)
+ || rStream.Read(p, nCountBytes) == (sal_uLong)nCountBytes)
if (ReCalc())
- bOK = TRUE;
+ bOK = sal_True;
}
Ww1Sprm::~Ww1Sprm()
@@ -472,22 +472,22 @@ Ww1Sprm::~Ww1Sprm()
delete p;
}
-USHORT Ww1SingleSprm::Size(BYTE* /*pSprm*/)
+sal_uInt16 Ww1SingleSprm::Size(sal_uInt8* /*pSprm*/)
{
return nCountBytes;
}
-USHORT Ww1SingleSprmTab::Size(BYTE* pSprm) // Doc 24/25, Fastsave-Sprm
+sal_uInt16 Ww1SingleSprmTab::Size(sal_uInt8* pSprm) // Doc 24/25, Fastsave-Sprm
{
DBG_ASSERT(nCountBytes==0, "Ww1SingleSprmTab");
- USHORT nRet = sizeof(SVBT8);
- USHORT nSize = SVBT8ToByte(pSprm);
+ sal_uInt16 nRet = sizeof(SVBT8);
+ sal_uInt16 nSize = SVBT8ToByte(pSprm);
if (nSize != 255)
nRet = nRet + nSize;
else
{
- USHORT nDel = SVBT8ToByte(pSprm+1) * 4;
- USHORT nIns = SVBT8ToByte(pSprm + 3 + nDel) * 3;
+ sal_uInt16 nDel = SVBT8ToByte(pSprm+1) * 4;
+ sal_uInt16 nIns = SVBT8ToByte(pSprm + 3 + nDel) * 3;
nRet += nDel + nIns;
}
DBG_ASSERT(nRet <= 354, "Ww1SingleSprmTab");
@@ -496,58 +496,58 @@ USHORT Ww1SingleSprmTab::Size(BYTE* pSprm) // Doc 24/25, Fastsave-Sprm
return nRet;
}
-USHORT Ww1SingleSprmByteSized::Size(BYTE* pSprm)
+sal_uInt16 Ww1SingleSprmByteSized::Size(sal_uInt8* pSprm)
{
- USHORT nRet;
+ sal_uInt16 nRet;
nRet = SVBT8ToByte(pSprm);
nRet += sizeof(SVBT8); // var. l. byte-size
nRet = nRet + nCountBytes;
return nRet;
}
-USHORT Ww1SingleSprmWordSized::Size(BYTE* pSprm)
+sal_uInt16 Ww1SingleSprmWordSized::Size(sal_uInt8* pSprm)
{
- USHORT nRet;
+ sal_uInt16 nRet;
nRet = SVBT16ToShort(pSprm);
nRet += sizeof(SVBT16); // var. l. word-size
nRet = nRet + nCountBytes;
return nRet;
}
-static BYTE nLast = 0;
-static BYTE nCurrent = 0;
-USHORT Ww1Sprm::GetSize(BYTE nId, BYTE* pSprm)
+static sal_uInt8 nLast = 0;
+static sal_uInt8 nCurrent = 0;
+sal_uInt16 Ww1Sprm::GetSize(sal_uInt8 nId, sal_uInt8* pSprm)
{
- USHORT nL = 0;
+ sal_uInt16 nL = 0;
nL = GetTab(nId).Size(pSprm);
nLast = nCurrent;
nCurrent = nId;
return nL;
}
-BOOL Ww1Sprm::Fill(USHORT index, BYTE& nId, USHORT& nL, BYTE*& pSprm)
+sal_Bool Ww1Sprm::Fill(sal_uInt16 index, sal_uInt8& nId, sal_uInt16& nL, sal_uInt8*& pSprm)
{
DBG_ASSERT(index < Count(), "Ww1Sprm");
pSprm = p + pArr[index];
nId = SVBT8ToByte(pSprm);
pSprm++;
nL = GetTab(nId).Size(pSprm);
- return TRUE;
+ return sal_True;
}
-BOOL Ww1Sprm::ReCalc()
+sal_Bool Ww1Sprm::ReCalc()
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
delete pArr;
pArr = NULL;
count = 0;
if (nCountBytes != 255) // not unused?
{
- USHORT cbsik = nCountBytes;
- BYTE* psik = p;
+ sal_uInt16 cbsik = nCountBytes;
+ sal_uInt8* psik = p;
while (cbsik > 0)
{
- USHORT iLen = GetSizeBrutto(psik);
+ sal_uInt16 iLen = GetSizeBrutto(psik);
DBG_ASSERT(iLen<=cbsik, "Ww1Sprm");
if (iLen > cbsik)
cbsik = 0; // ignore the rest: we are wrong...
@@ -559,16 +559,16 @@ BOOL Ww1Sprm::ReCalc()
}
}
if (bRet
- && (pArr = new USHORT[count]) != NULL)
+ && (pArr = new sal_uInt16[count]) != NULL)
{
cbsik = nCountBytes;
- USHORT offset = 0;
- USHORT current = 0;
+ sal_uInt16 offset = 0;
+ sal_uInt16 current = 0;
psik = p;
while (current<count)
{
pArr[current++] = offset;
- USHORT iLen = GetSizeBrutto(psik);
+ sal_uInt16 iLen = GetSizeBrutto(psik);
psik += iLen;
if (iLen > cbsik)
cbsik = 0;
@@ -710,33 +710,33 @@ void Ww1Sprm::InitTab()
}
////////////////////////////////////////////////////////////// SprmPapx
-Ww1SprmPapx::Ww1SprmPapx(BYTE* pByte, USHORT nSize) :
+Ww1SprmPapx::Ww1SprmPapx(sal_uInt8* pByte, sal_uInt16 nSize) :
Ww1Sprm(Sprm(pByte, nSize), SprmSize(pByte, nSize))
{
memset(&aPapx, 0, sizeof(aPapx));
memcpy(&aPapx, pByte, nSize<sizeof(aPapx)?nSize:sizeof(aPapx));
}
-USHORT Ww1SprmPapx::SprmSize(BYTE*, USHORT nSize)
+sal_uInt16 Ww1SprmPapx::SprmSize(sal_uInt8*, sal_uInt16 nSize)
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if (nSize >= sizeof(W1_PAPX))
nRet = nSize - ( sizeof(W1_PAPX) - 1 ); // im W1_PAPX ist das
// 1. SprmByte enthalten
return nRet;
}
-BYTE* Ww1SprmPapx::Sprm(BYTE* pByte, USHORT nSize)
+sal_uInt8* Ww1SprmPapx::Sprm(sal_uInt8* pByte, sal_uInt16 nSize)
{
- BYTE* pRet = NULL;
+ sal_uInt8* pRet = NULL;
if (nSize >= sizeof(W1_PAPX))
pRet = ((W1_PAPX*)(pByte))->grpprlGet();
return pRet;
}
/////////////////////////////////////////////////////////////////// Plc
-Ww1Plc::Ww1Plc(Ww1Fib& rInFib, ULONG ulFilePos, USHORT nInCountBytes,
- USHORT nInItemSize)
+Ww1Plc::Ww1Plc(Ww1Fib& rInFib, sal_uLong ulFilePos, sal_uInt16 nInCountBytes,
+ sal_uInt16 nInItemSize)
: p(0), nCountBytes(nInCountBytes), iMac(0), nItemSize(nInItemSize),
bOK(false), rFib(rInFib)
{
@@ -744,17 +744,17 @@ Ww1Plc::Ww1Plc(Ww1Fib& rInFib, ULONG ulFilePos, USHORT nInCountBytes,
bOK = true;
else
{
- if (rFib.GetStream().Seek(ulFilePos) == (ULONG)ulFilePos)
+ if (rFib.GetStream().Seek(ulFilePos) == (sal_uLong)ulFilePos)
{
- if ((p = new BYTE[nCountBytes]) != NULL)
+ if ((p = new sal_uInt8[nCountBytes]) != NULL)
{
- if (rFib.GetStream().Read(p, nCountBytes) == (ULONG)nCountBytes)
+ if (rFib.GetStream().Read(p, nCountBytes) == (sal_uLong)nCountBytes)
{
bOK = true;
iMac = (nCountBytes -
sizeof(SVBT32)) / (sizeof(SVBT32) + nItemSize);
- DBG_ASSERT(iMac * ((USHORT)sizeof(ULONG) + nItemSize) +
- (USHORT)sizeof(SVBT32) == nCountBytes, "Ww1Plc");
+ DBG_ASSERT(iMac * ((sal_uInt16)sizeof(sal_uLong) + nItemSize) +
+ (sal_uInt16)sizeof(SVBT32) == nCountBytes, "Ww1Plc");
}
}
}
@@ -766,25 +766,25 @@ Ww1Plc::~Ww1Plc()
delete p;
}
-void Ww1Plc::Seek(ULONG ulSeek, USHORT& nIndex)
+void Ww1Plc::Seek(sal_uLong ulSeek, sal_uInt16& nIndex)
{
if (iMac)
for (;nIndex <= iMac && Where(nIndex) < ulSeek;nIndex++)
;
}
-ULONG Ww1Plc::Where(USHORT nIndex)
+sal_uLong Ww1Plc::Where(sal_uInt16 nIndex)
{
- ULONG ulRet = 0xffffffff;
+ sal_uLong ulRet = 0xffffffff;
DBG_ASSERT(nIndex <= iMac, "index out of bounds");
if (iMac && nIndex <= iMac)
ulRet = SVBT32ToUInt32(p + sizeof(SVBT32) * nIndex);
return ulRet;
}
-BYTE* Ww1Plc::GetData(USHORT nIndex)
+sal_uInt8* Ww1Plc::GetData(sal_uInt16 nIndex)
{
- BYTE* pRet = NULL;
+ sal_uInt8* pRet = NULL;
DBG_ASSERT(nIndex < iMac, "index out of bounds");
if (nIndex < iMac)
pRet = p + (iMac + 1) * sizeof(SVBT32) +
@@ -798,14 +798,14 @@ BYTE* Ww1Plc::GetData(USHORT nIndex)
// Die Anzahl wird in nMax zurueckgeliefert.
// im Index 0 stehen alle Strings nacheinander, ab Index 1 werden
// die einzelnen Strings referenziert.
-Ww1StringList::Ww1StringList( SvStream& rSt, ULONG nFc, USHORT nCb )
+Ww1StringList::Ww1StringList( SvStream& rSt, sal_uLong nFc, sal_uInt16 nCb )
: pIdxA(0), nMax(0)
{
if( nCb > 2 ) // ueberhaupt Eintraege ?
{
SVBT16 nCountBytes;
DBG_ASSERT(nCb > sizeof(nCountBytes), "Ww1StringList");
- if (rSt.Seek(nFc) == (ULONG)nFc)
+ if (rSt.Seek(nFc) == (sal_uLong)nFc)
if (rSt.Read(nCountBytes, sizeof(nCountBytes))
== sizeof(nCountBytes)) // Laenge steht hier nochmal
{
@@ -816,14 +816,14 @@ Ww1StringList::Ww1StringList( SvStream& rSt, ULONG nFc, USHORT nCb )
// Alloziere PString-Array
//~ Ww1: new-NULL
if (rSt.Read(pA, nCb - sizeof(nCountBytes))
- == (ULONG)nCb - sizeof(nCountBytes)) // lese alle
+ == (sal_uLong)nCb - sizeof(nCountBytes)) // lese alle
{}// do nothing
// Zaehle, wieviele Fonts enthalten
long nLeft = nCb - sizeof(nCountBytes);
sal_Char* p = pA;
while (1)
{
- USHORT nNextSiz;
+ sal_uInt16 nNextSiz;
nNextSiz = *p + 1;
if(nNextSiz > nLeft)
break;
@@ -839,9 +839,9 @@ Ww1StringList::Ww1StringList( SvStream& rSt, ULONG nFc, USHORT nCb )
pIdxA[0] = pA; // Index 0 : alles
// ab Index 1 C-Strings
pIdxA[1] = pA + 1; // fuelle Index-Array
- USHORT i = 2;
+ sal_uInt16 i = 2;
p = pA;
- BYTE nL = *p;
+ sal_uInt8 nL = *p;
while(1)
{
p += nL + 1; // Neues Laengen-Byte
@@ -858,7 +858,7 @@ Ww1StringList::Ww1StringList( SvStream& rSt, ULONG nFc, USHORT nCb )
}
}
}
-const String Ww1StringList::GetStr( USHORT nNum ) const
+const String Ww1StringList::GetStr( sal_uInt16 nNum ) const
{
String sRet;
if( nNum <= nMax )
@@ -870,10 +870,10 @@ Ww1Bookmarks::Ww1Bookmarks(Ww1Fib& rInFib)
: aNames(rInFib), rFib(rInFib), nIsEnd(0)
{
pPos[0] = new Ww1PlcBookmarkPos(rFib, rFib.GetFIB().fcPlcfbkfGet(),
- rFib.GetFIB().cbPlcfbkfGet(), FALSE);
+ rFib.GetFIB().cbPlcfbkfGet(), sal_False);
nPlcIdx[0] = 0;
pPos[1] = new Ww1PlcBookmarkPos(rFib, rFib.GetFIB().fcPlcfbklGet(),
- rFib.GetFIB().cbPlcfbklGet(), TRUE);
+ rFib.GetFIB().cbPlcfbklGet(), sal_True);
nPlcIdx[1] = 0;
bOK = !aNames.GetError() && !pPos[0]->GetError() && !pPos[1]->GetError();
}
@@ -895,8 +895,8 @@ void Ww1Bookmarks::operator ++( int )
{
nPlcIdx[nIsEnd]++;
- ULONG l0 = pPos[0]->Where(nPlcIdx[0]);
- ULONG l1 = pPos[1]->Where(nPlcIdx[1]);
+ sal_uLong l0 = pPos[0]->Where(nPlcIdx[0]);
+ sal_uLong l1 = pPos[1]->Where(nPlcIdx[1]);
if( l0 < l1 )
nIsEnd = 0;
else if( l1 < l0 )
@@ -913,7 +913,7 @@ long Ww1Bookmarks::GetHandle() const
if( nIsEnd )
return nPlcIdx[1];
- const BYTE* p = pPos[0]->GetData( nPlcIdx[0] );
+ const sal_uInt8* p = pPos[0]->GetData( nPlcIdx[0] );
if( p )
return SVBT16ToShort( p );
}
@@ -924,10 +924,10 @@ long Ww1Bookmarks::Len() const
{
if( nIsEnd )
{
- DBG_ASSERT( FALSE, "Falscher Aufruf (1) von Ww1Bookmarks::Len()" );
+ DBG_ASSERT( sal_False, "Falscher Aufruf (1) von Ww1Bookmarks::Len()" );
return 0;
}
- USHORT nEndIdx = SVBT16ToShort(pPos[0]->GetData(nPlcIdx[0]));
+ sal_uInt16 nEndIdx = SVBT16ToShort(pPos[0]->GetData(nPlcIdx[0]));
return pPos[1]->Where(nEndIdx) - pPos[0]->Where(nPlcIdx[0]);
}
@@ -939,27 +939,27 @@ const String Ww1Bookmarks::GetName() const
}
/////////////////////////////////////////////////////////////////// Fkp
-Ww1Fkp::Ww1Fkp(SvStream& rStream, ULONG ulFilePos, USHORT _nItemSize) :
+Ww1Fkp::Ww1Fkp(SvStream& rStream, sal_uLong ulFilePos, sal_uInt16 _nItemSize) :
nItemSize(_nItemSize),
- bOK(FALSE)
+ bOK(sal_False)
{
- if (rStream.Seek(ulFilePos) == (ULONG)ulFilePos)
+ if (rStream.Seek(ulFilePos) == (sal_uLong)ulFilePos)
if (rStream.Read(aFkp, sizeof(aFkp)) == sizeof(aFkp))
- bOK = TRUE;
+ bOK = sal_True;
}
-ULONG Ww1Fkp::Where(USHORT nIndex)
+sal_uLong Ww1Fkp::Where(sal_uInt16 nIndex)
{
- ULONG lRet = 0xffffffff;
+ sal_uLong lRet = 0xffffffff;
DBG_ASSERT(nIndex<=Count(), "index out of bounds");
if (nIndex<=Count())
lRet = SVBT32ToUInt32(aFkp+nIndex*sizeof(SVBT32));
return lRet;
}
-BYTE* Ww1Fkp::GetData(USHORT nIndex)
+sal_uInt8* Ww1Fkp::GetData(sal_uInt16 nIndex)
{
- BYTE* pRet = NULL;
+ sal_uInt8* pRet = NULL;
DBG_ASSERT(nIndex<=Count(), "index out of bounds");
if (nIndex<=Count())
pRet = aFkp + (Count()+1) * sizeof(SVBT32) +
@@ -968,13 +968,13 @@ BYTE* Ww1Fkp::GetData(USHORT nIndex)
}
//////////////////////////////////////////////////////////////// FkpPap
-BOOL Ww1FkpPap::Fill(USHORT nIndex, BYTE*& p, USHORT& rnCountBytes)
+sal_Bool Ww1FkpPap::Fill(sal_uInt16 nIndex, sal_uInt8*& p, sal_uInt16& rnCountBytes)
{
DBG_ASSERT( nIndex < Count(), "Ww1FkpPap::Fill() Index out of Range" );
- USHORT nOffset = SVBT8ToByte(GetData(nIndex)) * 2;
+ sal_uInt16 nOffset = SVBT8ToByte(GetData(nIndex)) * 2;
if (nOffset)
{
- DBG_ASSERT(nOffset>(USHORT)(Count()*sizeof(SVBT32)), "calc error");
+ DBG_ASSERT(nOffset>(sal_uInt16)(Count()*sizeof(SVBT32)), "calc error");
rnCountBytes = SVBT8ToByte(aFkp+nOffset) * 2;
nOffset += sizeof(SVBT8);
if( nOffset + rnCountBytes < 511 ) // SH: Assert schlug 1 zu frueh zu
@@ -991,33 +991,33 @@ BOOL Ww1FkpPap::Fill(USHORT nIndex, BYTE*& p, USHORT& rnCountBytes)
p = NULL;
rnCountBytes = 0;
}
- return TRUE;
+ return sal_True;
}
//////////////////////////////////////////////////////////////// FkpChp
-BOOL Ww1FkpChp::Fill(USHORT nIndex, W1_CHP& aChp)
+sal_Bool Ww1FkpChp::Fill(sal_uInt16 nIndex, W1_CHP& aChp)
{
DBG_ASSERT( nIndex < Count(), "Ww1FkpChp::Fill() Index out of Range" );
memset(&aChp, 0, sizeof(aChp)); // Default, da verkuerzt gespeichert
- USHORT nOffset = GetData(nIndex)[0] * 2;
+ sal_uInt16 nOffset = GetData(nIndex)[0] * 2;
if (nOffset)
{
- DBG_ASSERT(nOffset>(USHORT)(Count()*sizeof(SVBT32)), "calc error");
- USHORT nCountBytes = aFkp[nOffset];
+ DBG_ASSERT(nOffset>(sal_uInt16)(Count()*sizeof(SVBT32)), "calc error");
+ sal_uInt16 nCountBytes = aFkp[nOffset];
nOffset += sizeof(SVBT8);
DBG_ASSERT(nCountBytes <= 511-nOffset, "calc error");
DBG_ASSERT(nCountBytes <= sizeof(aChp), "calc error");
memcpy(&aChp, aFkp+nOffset, nCountBytes);
}
- return TRUE;
+ return sal_True;
}
///////////////////////////////////////////////////////////////// Assoc
Ww1Assoc::Ww1Assoc(Ww1Fib& _rFib)
- : rFib(_rFib), pBuffer(NULL), bOK(FALSE)
+ : rFib(_rFib), pBuffer(NULL), bOK(sal_False)
{
- USHORT cb = rFib.GetFIB().cbSttbfAssocGet();
- USHORT i;
+ sal_uInt16 cb = rFib.GetFIB().cbSttbfAssocGet();
+ sal_uInt16 i;
for ( i = 0; i < MaxFields; i++ )
pStrTbl[i] = NULL;
@@ -1026,23 +1026,23 @@ Ww1Assoc::Ww1Assoc(Ww1Fib& _rFib)
rFib.GetFIB().fcSttbfAssocGet()
&& rFib.GetStream().Read(pBuffer, cb) == cb)
{
- USHORT j;
+ sal_uInt16 j;
DBG_ASSERT( cb == SVBT16ToShort( *(SVBT16*)pBuffer ), "size missmatch");
for (i=0,j=sizeof(SVBT16);j<cb && i<Criteria1;i++)
{
pStrTbl[i] = pBuffer+j;
j += (*pBuffer + j) + 1;
}
- bOK = TRUE;
+ bOK = sal_True;
}
}
-String Ww1Assoc::GetStr(USHORT code)
+String Ww1Assoc::GetStr(sal_uInt16 code)
{
String sRet;
DBG_ASSERT(code<MaxFields, "out of range");
if (pStrTbl[code] != NULL)
- for( USHORT i=0;i<pStrTbl[code][0];i++ )
+ for( sal_uInt16 i=0;i<pStrTbl[code][0];i++ )
sRet += String( pStrTbl[code][i+1], RTL_TEXTENCODING_MS_1252 );
return sRet;
}
@@ -1054,7 +1054,7 @@ Ww1Pap::Ww1Pap(Ww1Fib& _rFib)
{
}
-void Ww1Pap::Seek(ULONG ulSeek)
+void Ww1Pap::Seek(sal_uLong ulSeek)
{
while (ulSeek > Where())
(*this)++;
@@ -1064,9 +1064,9 @@ void Ww1Pap::Seek(ULONG ulSeek)
// Fkps der zugehoerige Index auf 0 gesetzt werden soll
// ( darf fuer Push/Pop nicht passieren )
// Ein eleganterer Weg faellt mir auf die Schnelle nicht ein
-ULONG Ww1Pap::Where( BOOL bSetIndex )
+sal_uLong Ww1Pap::Where( sal_Bool bSetIndex )
{
- ULONG ulRet = 0xffffffff;
+ sal_uLong ulRet = 0xffffffff;
if (pPap == NULL)
if (nPlcIndex < Count())
{
@@ -1094,46 +1094,46 @@ void Ww1Pap::operator++(int)
// SH: FindSprm sucht in grpprl nach Sprm nId
// Rueckgabe: Pointer oder 0
-BOOL Ww1Pap::FindSprm(USHORT nId, BYTE* pStart, BYTE* pEnd)
-{
- Ww1Sprm aSprm( pStart, static_cast< USHORT >(pEnd-pStart) );
- USHORT nC = aSprm.Count();
- USHORT i;
- BYTE nI;
- USHORT nLen;
- BYTE *pData;
+sal_Bool Ww1Pap::FindSprm(sal_uInt16 nId, sal_uInt8* pStart, sal_uInt8* pEnd)
+{
+ Ww1Sprm aSprm( pStart, static_cast< sal_uInt16 >(pEnd-pStart) );
+ sal_uInt16 nC = aSprm.Count();
+ sal_uInt16 i;
+ sal_uInt8 nI;
+ sal_uInt16 nLen;
+ sal_uInt8 *pData;
for( i = 0; i < nC; i++ ){
aSprm.Fill( i, nI, nLen, pData );
if( nI == nId )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL Ww1Pap::HasId0(USHORT nId)
+sal_Bool Ww1Pap::HasId0(sal_uInt16 nId)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
UpdateIdx();
if( !pPap ){
- DBG_ASSERT( FALSE, "Ww1Pap::HasId():: kann kein pPap erzeugen" );
- return FALSE;
+ DBG_ASSERT( sal_False, "Ww1Pap::HasId():: kann kein pPap erzeugen" );
+ return sal_False;
}
- BYTE* pByte;
- USHORT n;
+ sal_uInt8* pByte;
+ sal_uInt16 n;
if( pPap->Fill(nFkpIndex, pByte, n) ){
- BYTE* p2 = ((W1_PAPX*)(pByte))->grpprlGet(); // SH: Offset fehlte
+ sal_uInt8* p2 = ((W1_PAPX*)(pByte))->grpprlGet(); // SH: Offset fehlte
bRet = FindSprm( nId, p2, pByte + n );
}
return bRet;
}
-BOOL Ww1Pap::HasId(USHORT nId)
+sal_Bool Ww1Pap::HasId(sal_uInt16 nId)
{
- BOOL bRet = FALSE;
- USHORT nPushedPlcIndex2 = nPlcIndex;
- USHORT nPushedFkpIndex2 = nFkpIndex;
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nPushedPlcIndex2 = nPlcIndex;
+ sal_uInt16 nPushedFkpIndex2 = nFkpIndex;
bRet = HasId0( nId );
if (nPlcIndex != nPushedPlcIndex2)
{
@@ -1142,7 +1142,7 @@ BOOL Ww1Pap::HasId(USHORT nId)
}
nPlcIndex = nPushedPlcIndex2;
nFkpIndex = nPushedFkpIndex2;
- Where( FALSE );
+ Where( sal_False );
return bRet;
}
@@ -1153,7 +1153,7 @@ Ww1Chp::Ww1Chp(Ww1Fib& _rFib)
{
}
-void Ww1Chp::Seek(ULONG ulSeek)
+void Ww1Chp::Seek(sal_uLong ulSeek)
{
while (ulSeek > Where())
(*this)++;
@@ -1163,9 +1163,9 @@ void Ww1Chp::Seek(ULONG ulSeek)
// Fkps der zugehoerige Index auf 0 gesetzt werden soll
// ( darf fuer Push/Pop nicht passieren )
// Ein eleganterer Weg faellt mir auf die Schnelle nicht ein
-ULONG Ww1Chp::Where( BOOL bSetIndex )
+sal_uLong Ww1Chp::Where( sal_Bool bSetIndex )
{
- ULONG ulRet = 0xffffffff;
+ sal_uLong ulRet = 0xffffffff;
if (pChp == NULL)
if (nPlcIndex < Count())
{
@@ -1193,8 +1193,8 @@ void Ww1Chp::operator++(int)
}
////////////////////////////////////////////////////////////// Manager
-Ww1Manager::Ww1Manager(SvStream& rStrm, ULONG nFieldFlgs)
- : bOK(FALSE), bInTtp(FALSE), bInStyle(FALSE), bStopAll(FALSE), aFib(rStrm),
+Ww1Manager::Ww1Manager(SvStream& rStrm, sal_uLong nFieldFlgs)
+ : bOK(sal_False), bInTtp(sal_False), bInStyle(sal_False), bStopAll(sal_False), aFib(rStrm),
aDop(aFib), aFonts(aFib, nFieldFlgs), aDoc(aFib), pDoc(&aDoc),
ulDocSeek(0), pSeek(&ulDocSeek), aFld(aFib), pFld(&aFld), aChp(aFib),
aPap(aFib), aFtn(aFib), aBooks(aFib),
@@ -1211,22 +1211,22 @@ Ww1Manager::Ww1Manager(SvStream& rStrm, ULONG nFieldFlgs)
&& !aBooks.GetError();
}
-BOOL Ww1Manager::HasInTable()
+sal_Bool Ww1Manager::HasInTable()
{
return aPap.HasId(24); // Ww1SingleSprmPFInTable
}
-BOOL Ww1Manager::HasTtp()
+sal_Bool Ww1Manager::HasTtp()
{
return aPap.HasId(25); // Ww1SingleSprmPTtp
}
-BOOL Ww1Manager::HasPPc()
+sal_Bool Ww1Manager::HasPPc()
{
return aPap.HasId(29); // Ww1SingleSprmPPc
}
-BOOL Ww1Manager::HasPDxaAbs()
+sal_Bool Ww1Manager::HasPDxaAbs()
{
return aPap.HasId(26); // Ww1SingleSprmPDxaAbs
}
diff --git a/sw/source/filter/ww1/w1class.hxx b/sw/source/filter/ww1/w1class.hxx
index 55e1cf19964f..bb156851f8f0 100644
--- a/sw/source/filter/ww1/w1class.hxx
+++ b/sw/source/filter/ww1/w1class.hxx
@@ -108,13 +108,13 @@ class Ww1StyleSheet;
class Ww1Fib
{
W1_FIB aFib;
- BOOL bOK;
+ sal_Bool bOK;
SvStream& rStream;
public:
Ww1Fib(SvStream&);
friend ostream& operator <<(ostream&, Ww1Fib&);
W1_FIB& GetFIB() { return aFib; }
- BOOL GetError() { return !bOK; }
+ sal_Bool GetError() { return !bOK; }
SvStream& GetStream() { return rStream; }
};
@@ -126,10 +126,10 @@ class Ww1Dop
{
W1_DOP aDop;
Ww1Fib& rFib;
- BOOL bOK;
+ sal_Bool bOK;
public:
Ww1Dop(Ww1Fib&);
- BOOL GetError() {
+ sal_Bool GetError() {
return !bOK; }
W1_DOP& GetDOP() {
return aDop; }
@@ -146,23 +146,23 @@ class Ww1PlainText
{
protected:
Ww1Fib& rFib;
- ULONG ulFilePos;
- ULONG ulCountBytes;
- ULONG ulSeek;
- BOOL bOK;
+ sal_uLong ulFilePos;
+ sal_uLong ulCountBytes;
+ sal_uLong ulSeek;
+ sal_Bool bOK;
public:
- Ww1PlainText(Ww1Fib& rWwFib, ULONG nFilePos, ULONG nCountBytes);
+ Ww1PlainText(Ww1Fib& rWwFib, sal_uLong nFilePos, sal_uLong nCountBytes);
// innerhalb des textes
- ULONG Where() const { return ulSeek; }
- void Seek( ULONG ulNew )
+ sal_uLong Where() const { return ulSeek; }
+ void Seek( sal_uLong ulNew )
{
DBG_ASSERT(ulNew < ulCountBytes, "Ww1PlainText");
if (ulNew < ulCountBytes)
ulSeek = ulNew;
}
- ULONG Count() const { return ulCountBytes; }
- void SetCount(ULONG ulNew)
+ sal_uLong Count() const { return ulCountBytes; }
+ void SetCount(sal_uLong ulNew)
{
ulNew += ulSeek;
if (ulCountBytes > ulNew)
@@ -173,17 +173,17 @@ public:
DBG_ASSERT(ulSeek+1<ulCountBytes, "Ww1PlainText");
ulSeek++;
}
- BOOL GetError() { return !bOK; }
- sal_Unicode Out( Ww1Shell&, ULONG& );
- sal_Unicode Out( String&, ULONG=0xffffffff);
+ sal_Bool GetError() { return !bOK; }
+ sal_Unicode Out( Ww1Shell&, sal_uLong& );
+ sal_Unicode Out( String&, sal_uLong=0xffffffff);
sal_Unicode Out( sal_Unicode& );
friend ostream& operator <<(ostream&, Ww1PlainText&);
- String& Fill( String&, ULONG=0, ULONG=0xffffffff );
- sal_Unicode operator []( ULONG );
- String GetText( ULONG ulOffset, ULONG nLen ) const;
+ String& Fill( String&, sal_uLong=0, sal_uLong=0xffffffff );
+ sal_Unicode operator []( sal_uLong );
+ String GetText( sal_uLong ulOffset, sal_uLong nLen ) const;
enum Consts { MinChar = 32 };
- static BOOL IsChar( sal_Unicode c ) { return c >= MinChar; }
+ static sal_Bool IsChar( sal_Unicode c ) { return c >= MinChar; }
};
/////////////////////////////////////////////////////////////// DocText
@@ -200,7 +200,7 @@ public:
class Ww1FtnText : public Ww1PlainText
{
public:
- ULONG Offset(Ww1Fib& rFibL) {
+ sal_uLong Offset(Ww1Fib& rFibL) {
return rFibL.GetFIB().ccpTextGet(); }
Ww1FtnText(Ww1Fib& rFibL) :
Ww1PlainText(rFibL, rFibL.GetFIB().fcMinGet() +
@@ -212,7 +212,7 @@ public:
class Ww1HddText : public Ww1PlainText
{
public:
- ULONG Offset(Ww1Fib& rFibL) {
+ sal_uLong Offset(Ww1Fib& rFibL) {
return rFibL.GetFIB().ccpTextGet() + rFibL.GetFIB().ccpFtnGet(); }
Ww1HddText(Ww1Fib& rFibL) :
Ww1PlainText(rFibL, rFibL.GetFIB().fcMinGet() +
@@ -224,7 +224,7 @@ public:
class Ww1McrText : public Ww1PlainText
{
public:
- ULONG Offset(Ww1Fib& rFibL) {
+ sal_uLong Offset(Ww1Fib& rFibL) {
return rFibL.GetFIB().ccpTextGet() + rFibL.GetFIB().ccpFtnGet()
+ rFibL.GetFIB().ccpHddGet(); }
Ww1McrText(Ww1Fib& rFibL) :
@@ -237,7 +237,7 @@ public:
class Ww1AtnText : public Ww1PlainText
{
public:
- ULONG Offset(Ww1Fib& rFibL) {
+ sal_uLong Offset(Ww1Fib& rFibL) {
return rFibL.GetFIB().ccpTextGet() + rFibL.GetFIB().ccpFtnGet()
+ rFibL.GetFIB().ccpHddGet() + rFibL.GetFIB().ccpMcrGet(); }
Ww1AtnText(Ww1Fib& rFibL) :
@@ -256,24 +256,24 @@ class Ww1Style
W1_CHP aChpx;
Ww1SprmPapx* pPapx;
Ww1StyleSheet* pParent;
- BYTE stcBase;
- BYTE stcNext;
- BOOL bUsed;
+ sal_uInt8 stcBase;
+ sal_uInt8 stcNext;
+ sal_Bool bUsed;
public:
Ww1Style();
~Ww1Style();
- BOOL IsUsed() const { return bUsed; }
- void SetDefaults(BYTE);
+ sal_Bool IsUsed() const { return bUsed; }
+ void SetDefaults(sal_uInt8);
void SetParent(Ww1StyleSheet* newParent) { pParent = newParent; }
- void SetName(const String& rName) { bUsed = TRUE; aName = rName; }
+ void SetName(const String& rName) { bUsed = sal_True; aName = rName; }
const String& GetName() const { return aName; }
Ww1Style& GetBase();
- USHORT GetnBase() const { return stcBase; }
- USHORT GetnNext() const { return stcNext; }
- USHORT ReadName(BYTE*&, USHORT&, USHORT stc);
- USHORT ReadChpx(BYTE*&, USHORT&);
- USHORT ReadPapx(BYTE*&, USHORT&);
- USHORT ReadEstcp(BYTE*&, USHORT&);
+ sal_uInt16 GetnBase() const { return stcBase; }
+ sal_uInt16 GetnNext() const { return stcNext; }
+ sal_uInt16 ReadName(sal_uInt8*&, sal_uInt16&, sal_uInt16 stc);
+ sal_uInt16 ReadChpx(sal_uInt8*&, sal_uInt16&);
+ sal_uInt16 ReadPapx(sal_uInt8*&, sal_uInt16&);
+ sal_uInt16 ReadEstcp(sal_uInt8*&, sal_uInt16&);
friend ostream& operator <<(ostream&, Ww1Style&);
void Out(Ww1Shell&, Ww1Manager&);
};
@@ -285,28 +285,28 @@ public:
class Ww1StyleSheet
{
Ww1Style aStyles[256];
- USHORT cstcStd; // count style code standard
+ sal_uInt16 cstcStd; // count style code standard
Ww1Fib& rFib;
- BOOL bOK;
- USHORT ReadNames(BYTE*&, USHORT&);
- USHORT ReadChpx(BYTE*&, USHORT&);
- USHORT ReadPapx(BYTE*&, USHORT&);
- USHORT ReadEstcp(BYTE*&, USHORT&);
+ sal_Bool bOK;
+ sal_uInt16 ReadNames(sal_uInt8*&, sal_uInt16&);
+ sal_uInt16 ReadChpx(sal_uInt8*&, sal_uInt16&);
+ sal_uInt16 ReadPapx(sal_uInt8*&, sal_uInt16&);
+ sal_uInt16 ReadEstcp(sal_uInt8*&, sal_uInt16&);
- void OutDefaults(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc);
- void OutOne(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc);
- void OutOneWithBase(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc,
- BYTE* pbStopRecur );
+ void OutDefaults(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 stc);
+ void OutOne(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 stc);
+ void OutOneWithBase(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 stc,
+ sal_uInt8* pbStopRecur );
public:
Ww1StyleSheet(Ww1Fib& rFib);
- Ww1Style& GetStyle(USHORT stc) {
+ Ww1Style& GetStyle(sal_uInt16 stc) {
return aStyles[stc]; }
- USHORT Count() {
+ sal_uInt16 Count() {
return 256; }
friend ostream& operator <<(ostream&, Ww1StyleSheet&);
void Out(Ww1Shell&, Ww1Manager&);
friend class Ww1Style;
- BOOL GetError() {
+ sal_Bool GetError() {
return !bOK; }
};
@@ -321,22 +321,22 @@ class Ww1Fonts
protected:
W1_FFN** pFontA; // Array of Pointers to Font Description
Ww1Fib& rFib;
- ULONG nFieldFlags;
- USHORT nMax; // Array-Groesse
- BOOL bOK;
+ sal_uLong nFieldFlags;
+ sal_uInt16 nMax; // Array-Groesse
+ sal_Bool bOK;
public:
- Ww1Fonts(Ww1Fib&, ULONG nFieldFlgs);
+ Ww1Fonts(Ww1Fib&, sal_uLong nFieldFlgs);
~Ww1Fonts() {
if (pFontA)
DELETEZ(pFontA[0]);
DELETEZ(pFontA); }
- W1_FFN* GetFFN(USHORT nNum);
- USHORT Count() {
+ W1_FFN* GetFFN(sal_uInt16 nNum);
+ sal_uInt16 Count() {
return nMax; }
friend ostream& operator <<(ostream&, Ww1Fonts&);
- BOOL GetError() {
+ sal_Bool GetError() {
return !bOK; }
- SvxFontItem GetFont(USHORT);
+ SvxFontItem GetFont(sal_uInt16);
};
//////////////////////////////////////////////////////////// SingleSprm
@@ -366,19 +366,19 @@ public:
// stehen faellt dann auch nicht auf. Der Namensstring ist nur im
// Dumper noetig: weg damit im Filter.
//
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- virtual ostream& Dump(ostream&, BYTE*, USHORT);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ virtual ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
const sal_Char* sName;
#else
- virtual void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- virtual void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- ostream& Dump(ostream&, BYTE*, USHORT);
+ virtual void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ virtual void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
#endif
- virtual USHORT Size(BYTE*);
- USHORT nCountBytes;
+ virtual sal_uInt16 Size(sal_uInt8*);
+ sal_uInt16 nCountBytes;
- Ww1SingleSprm(USHORT nBytes, const sal_Char* /*pName*/ = 0 )
+ Ww1SingleSprm(sal_uInt16 nBytes, const sal_Char* /*pName*/ = 0 )
: nCountBytes(nBytes)
#ifdef DUMP
, sName( pName)
@@ -389,23 +389,23 @@ public:
class Ww1SingleSprmByteSized : public Ww1SingleSprm {
public:
- USHORT Size(BYTE*);
- Ww1SingleSprmByteSized(USHORT nBytes, sal_Char* sName = 0) :
+ sal_uInt16 Size(sal_uInt8*);
+ Ww1SingleSprmByteSized(sal_uInt16 nBytes, sal_Char* sName = 0) :
Ww1SingleSprm(nBytes, sName) {
}
};
class Ww1SingleSprmWordSized : public Ww1SingleSprm {
public:
- USHORT Size(BYTE*);
- Ww1SingleSprmWordSized(USHORT nBytes, sal_Char* sName = 0) :
+ sal_uInt16 Size(sal_uInt8*);
+ Ww1SingleSprmWordSized(sal_uInt16 nBytes, sal_Char* sName = 0) :
Ww1SingleSprm(nBytes, sName) {
}
};
class Ww1SingleSprmByte : public Ww1SingleSprm {
public:
- ostream& Dump(ostream&, BYTE*, USHORT);
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
Ww1SingleSprmByte(sal_Char* sName = 0) :
Ww1SingleSprm(1, sName) {
}
@@ -413,7 +413,7 @@ public:
class Ww1SingleSprmBool : public Ww1SingleSprmByte {
public:
- ostream& Dump(ostream&, BYTE*, USHORT);
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
Ww1SingleSprmBool(sal_Char* sName = 0) :
Ww1SingleSprmByte(sName) {
}
@@ -421,7 +421,7 @@ public:
class Ww1SingleSprm4State : public Ww1SingleSprmByte {
public:
- ostream& Dump(ostream&, BYTE*, USHORT);
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
Ww1SingleSprm4State(sal_Char* sName = 0) :
Ww1SingleSprmByte(sName) {
}
@@ -429,14 +429,14 @@ public:
class Ww1SingleSprmWord : public Ww1SingleSprm {
public:
- ostream& Dump(ostream&, BYTE*, USHORT);
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
Ww1SingleSprmWord(sal_Char* sName = 0)
: Ww1SingleSprm(2, sName) {}
};
class Ww1SingleSprmLong : public Ww1SingleSprm {
public:
- ostream& Dump(ostream&, BYTE*, USHORT);
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
Ww1SingleSprmLong(sal_Char* sName = 0) :
Ww1SingleSprm(4, sName) {
}
@@ -444,9 +444,9 @@ public:
class Ww1SingleSprmTab : public Ww1SingleSprm {
public:
- ostream& Dump(ostream&, BYTE*, USHORT);
- USHORT Size(BYTE*);
- Ww1SingleSprmTab(USHORT nBytes, sal_Char* sName = 0) :
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
+ sal_uInt16 Size(sal_uInt8*);
+ Ww1SingleSprmTab(sal_uInt16 nBytes, sal_Char* sName = 0) :
Ww1SingleSprm(nBytes, sName) {
}
};
@@ -456,8 +456,8 @@ public:
Ww1SingleSprmPJc(sal_Char* sName) :
Ww1SingleSprmByte(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDxa : public Ww1SingleSprmWord {
@@ -465,7 +465,7 @@ public:
Ww1SingleSprmPDxa(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDxaRight : public Ww1SingleSprmPDxa {
@@ -473,7 +473,7 @@ public:
Ww1SingleSprmPDxaRight(sal_Char* sName) :
Ww1SingleSprmPDxa(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDxaLeft : public Ww1SingleSprmPDxa {
@@ -481,7 +481,7 @@ public:
Ww1SingleSprmPDxaLeft(sal_Char* sName) :
Ww1SingleSprmPDxa(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDxaLeft1 : public Ww1SingleSprmPDxa {
@@ -489,7 +489,7 @@ public:
Ww1SingleSprmPDxaLeft1(sal_Char* sName) :
Ww1SingleSprmPDxa(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPFKeep : public Ww1SingleSprmBool {
@@ -497,8 +497,8 @@ public:
Ww1SingleSprmPFKeep(sal_Char* sName) :
Ww1SingleSprmBool(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPFKeepFollow : public Ww1SingleSprmBool {
@@ -506,8 +506,8 @@ public:
Ww1SingleSprmPFKeepFollow(sal_Char* sName) :
Ww1SingleSprmBool(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPPageBreakBefore : public Ww1SingleSprmBool {
@@ -515,16 +515,16 @@ public:
Ww1SingleSprmPPageBreakBefore(sal_Char* sName) :
Ww1SingleSprmBool(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPBrc : public Ww1SingleSprmWord {
protected:
// spezielle start-routine, je nach sprm verschieden versorgt
// mit einem BoxItem.
- void Start(Ww1Shell&, BYTE, W1_BRC10*, USHORT, Ww1Manager&, SvxBoxItem&);
- void Start(Ww1Shell&, BYTE, W1_BRC*, USHORT, Ww1Manager&, SvxBoxItem&);
+ void Start(Ww1Shell&, sal_uInt8, W1_BRC10*, sal_uInt16, Ww1Manager&, SvxBoxItem&);
+ void Start(Ww1Shell&, sal_uInt8, W1_BRC*, sal_uInt16, Ww1Manager&, SvxBoxItem&);
using Ww1SingleSprm::Start;
@@ -532,16 +532,16 @@ public:
Ww1SingleSprmPBrc(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
// SetBorder() wird auch fuer Tabellen gebraucht, deshalb public
static SvxBorderLine* SetBorder(SvxBorderLine*, W1_BRC10*);
};
-#define BRC_TOP ((USHORT)0)
-#define BRC_LEFT ((USHORT)1)
-#define BRC_BOTTOM ((USHORT)2)
-#define BRC_RIGHT ((USHORT)3)
-#define BRC_ANZ ((USHORT)BRC_RIGHT-BRC_TOP+1)
+#define BRC_TOP ((sal_uInt16)0)
+#define BRC_LEFT ((sal_uInt16)1)
+#define BRC_BOTTOM ((sal_uInt16)2)
+#define BRC_RIGHT ((sal_uInt16)3)
+#define BRC_ANZ ((sal_uInt16)BRC_RIGHT-BRC_TOP+1)
// Die BRC-struktur fuer 1.0 versionen von word sind verschieden von
// denen der folgenden versionen. diese werden zum glueck aber auch
@@ -549,29 +549,29 @@ public:
// SH: Ab sofort alle 4 Umrandungen ueber nur 1 Klasse.
class Ww1SingleSprmPBrc10 : public Ww1SingleSprmPBrc
{
- USHORT nLine; // BRC_TOP, BRC_LEFT, ...
+ sal_uInt16 nLine; // BRC_TOP, BRC_LEFT, ...
using Ww1SingleSprmPBrc::Start;
public:
- Ww1SingleSprmPBrc10(USHORT nL, sal_Char* sName)
+ Ww1SingleSprmPBrc10(sal_uInt16 nL, sal_Char* sName)
: Ww1SingleSprmPBrc(sName), nLine(nL) {}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmParaSpace : public Ww1SingleSprmWord {
public:
Ww1SingleSprmParaSpace(sal_Char* sName)
: Ww1SingleSprmWord(sName) {}
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDyaBefore : public Ww1SingleSprmParaSpace {
public:
Ww1SingleSprmPDyaBefore(sal_Char* sName)
: Ww1SingleSprmParaSpace(sName) {}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDyaAfter : public Ww1SingleSprmParaSpace {
@@ -579,7 +579,7 @@ public:
Ww1SingleSprmPDyaAfter(sal_Char* sName) :
Ww1SingleSprmParaSpace(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDyaLine : public Ww1SingleSprmWord {
@@ -587,8 +587,8 @@ public:
Ww1SingleSprmPDyaLine(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPChgTabsPapx : public Ww1SingleSprmByteSized {
@@ -597,8 +597,8 @@ public:
Ww1SingleSprmByteSized(0, sName) {
}
// Size() ist noch nicht aktiviert !!
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmSGprfIhdt : public Ww1SingleSprmByte {
@@ -606,7 +606,7 @@ public:
Ww1SingleSprmSGprfIhdt(sal_Char* sName) :
Ww1SingleSprmByte(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmSColumns : public Ww1SingleSprmWord {
@@ -614,7 +614,7 @@ public:
Ww1SingleSprmSColumns(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPFInTable : public Ww1SingleSprmBool {
@@ -622,8 +622,8 @@ public:
Ww1SingleSprmPFInTable(sal_Char* sName) :
Ww1SingleSprmBool(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPTtp : public Ww1SingleSprmBool {
@@ -631,8 +631,8 @@ public:
Ww1SingleSprmPTtp(sal_Char* sName) :
Ww1SingleSprmBool(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmTJc : public Ww1SingleSprmWord {
@@ -646,7 +646,7 @@ public:
Ww1SingleSprmTDxaGapHalf(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmTDefTable10 : public Ww1SingleSprmWordSized {
@@ -654,7 +654,7 @@ public:
Ww1SingleSprmTDefTable10(sal_Char* sName) :
Ww1SingleSprmWordSized(0, sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmTDyaRowHeight : public Ww1SingleSprmWord {
@@ -662,7 +662,7 @@ public:
Ww1SingleSprmTDyaRowHeight(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
// Klassendefinitionen fuer Tabellen-Fastsave-Attribute
@@ -675,7 +675,7 @@ public:
Ww1SingleSprmPpc(sal_Char* sName) :
Ww1SingleSprmByte(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDxaAbs : public Ww1SingleSprmWord {
@@ -683,7 +683,7 @@ public:
Ww1SingleSprmPDxaAbs(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDyaAbs : public Ww1SingleSprmWord {
@@ -691,7 +691,7 @@ public:
Ww1SingleSprmPDyaAbs(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDxaWidth : public Ww1SingleSprmWord {
@@ -699,7 +699,7 @@ public:
Ww1SingleSprmPDxaWidth(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPFromText : public Ww1SingleSprmWord {
@@ -707,7 +707,7 @@ public:
Ww1SingleSprmPFromText(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
////////////////////////////////////////////////////////////////// Sprm
@@ -716,48 +716,48 @@ public:
//
class Ww1Sprm
{
- BOOL ReCalc();
+ sal_Bool ReCalc();
static Ww1SingleSprm* aTab[256];
static Ww1SingleSprm* pSingleSprm;
protected:
static void InitTab();
- Ww1SingleSprm& GetTab(USHORT nId)
+ Ww1SingleSprm& GetTab(sal_uInt16 nId)
{
if( !pSingleSprm )
InitTab();
return aTab[ nId ] ? *aTab[nId] : *pSingleSprm;
}
- BYTE* p;
- USHORT nCountBytes;
- BOOL bOK;
- USHORT* pArr;
- USHORT count;
+ sal_uInt8* p;
+ sal_uInt16 nCountBytes;
+ sal_Bool bOK;
+ sal_uInt16* pArr;
+ sal_uInt16 count;
// ohne Token, mit laengen-byte/word
- USHORT GetSize(BYTE nId, BYTE* pSprm);
+ sal_uInt16 GetSize(sal_uInt8 nId, sal_uInt8* pSprm);
// mit Token und LaengenByte
- USHORT GetSizeBrutto(BYTE* pSprm) {
- BYTE nId = *pSprm++;
+ sal_uInt16 GetSizeBrutto(sal_uInt8* pSprm) {
+ sal_uInt8 nId = *pSprm++;
return GetSize(nId, pSprm) + 1; }
// gibt fuer nTh element id, size & zeiger auf daten:
-// BOOL Fill(USHORT, BYTE&, USHORT&, BYTE*&);
+// sal_Bool Fill(sal_uInt16, sal_uInt8&, sal_uInt16&, sal_uInt8*&);
public:
// SH: brauche ich public
// gibt fuer nTh element id, size & zeiger auf daten:
- BOOL Fill(USHORT, BYTE&, USHORT&, BYTE*&);
+ sal_Bool Fill(sal_uInt16, sal_uInt8&, sal_uInt16&, sal_uInt8*&);
- Ww1Sprm(BYTE*, USHORT);
- Ww1Sprm(SvStream&, ULONG);
+ Ww1Sprm(sal_uInt8*, sal_uInt16);
+ Ww1Sprm(SvStream&, sal_uLong);
~Ww1Sprm();
friend ostream& operator <<(ostream&, Ww1Sprm&);
void Start(Ww1Shell&, Ww1Manager&);
- void Start(Ww1Shell&, Ww1Manager&, USHORT);
+ void Start(Ww1Shell&, Ww1Manager&, sal_uInt16);
void Stop(Ww1Shell&, Ww1Manager&);
- BOOL IsUsed() {
+ sal_Bool IsUsed() {
return nCountBytes != 255; }
- USHORT Count() {
+ sal_uInt16 Count() {
return count; }
- BOOL GetError() {
+ sal_Bool GetError() {
return !bOK; }
static void DeinitTab();
};
@@ -769,13 +769,13 @@ public:
//
class Ww1Picture
{
- BOOL bOK;
+ sal_Bool bOK;
W1_PIC* pPic;
public:
- Ww1Picture(SvStream&, ULONG);
+ Ww1Picture(SvStream&, sal_uLong);
~Ww1Picture() {
}
- BOOL GetError() {
+ sal_Bool GetError() {
return !bOK; }
friend ostream& operator <<(ostream&, Ww1Picture&);
void Out(Ww1Shell&, Ww1Manager&);
@@ -790,26 +790,26 @@ public:
//
class Ww1Plc
{
- BYTE* p;
- USHORT nCountBytes;
- USHORT iMac;
- USHORT nItemSize;
- BOOL bOK;
+ sal_uInt8* p;
+ sal_uInt16 nCountBytes;
+ sal_uInt16 iMac;
+ sal_uInt16 nItemSize;
+ sal_Bool bOK;
protected:
Ww1Fib& rFib;
- BYTE* GetData(USHORT);
+ sal_uInt8* GetData(sal_uInt16);
public:
- Ww1Plc(Ww1Fib&, ULONG, USHORT, USHORT);
+ Ww1Plc(Ww1Fib&, sal_uLong, sal_uInt16, sal_uInt16);
~Ww1Plc();
friend ostream& operator <<(ostream&, Ww1Plc&);
- ULONG Where(USHORT); // wie im jeweiligen plc
- void Seek(ULONG, USHORT&);
- void Fill(USHORT nIndex, ULONG& begin, ULONG& end) {
+ sal_uLong Where(sal_uInt16); // wie im jeweiligen plc
+ void Seek(sal_uLong, sal_uInt16&);
+ void Fill(sal_uInt16 nIndex, sal_uLong& begin, sal_uLong& end) {
begin = Where(nIndex);
end = Where(nIndex+1); }
- USHORT Count() {
+ sal_uInt16 Count() {
return iMac; }
- BOOL GetError() {
+ sal_Bool GetError() {
return !bOK; }
};
@@ -919,12 +919,12 @@ public:
class Ww1PlcFields : public Ww1Plc
{
public:
- Ww1PlcFields(Ww1Fib& rFibL, ULONG start, USHORT nBytes)
+ Ww1PlcFields(Ww1Fib& rFibL, sal_uLong start, sal_uInt16 nBytes)
: Ww1Plc(rFibL, start, nBytes, 2)
{}
- W1_FLD* GetData(USHORT nIndex)
+ W1_FLD* GetData(sal_uInt16 nIndex)
{ return (W1_FLD*)Ww1Plc::GetData(nIndex); }
- ULONG Where(USHORT nIndex) // absolut im file
+ sal_uLong Where(sal_uInt16 nIndex) // absolut im file
{ return Ww1Plc::Where(nIndex) + rFib.GetFIB().fcMinGet(); }
friend ostream& operator <<(ostream&, Ww1PlcFields&);
};
@@ -933,14 +933,14 @@ public:
class Ww1StringList
{
sal_Char** pIdxA;
- USHORT nMax;
+ sal_uInt16 nMax;
public:
- Ww1StringList( SvStream& rSt, ULONG nFc, USHORT nCb );
+ Ww1StringList( SvStream& rSt, sal_uLong nFc, sal_uInt16 nCb );
~Ww1StringList()
{ if( pIdxA ) { delete pIdxA[0]; delete pIdxA; } }
- const String GetStr( USHORT nNum ) const;
- USHORT Count() const { return nMax; }
- BOOL GetError() const { return (nMax != 0) && !pIdxA; }
+ const String GetStr( sal_uInt16 nNum ) const;
+ sal_uInt16 Count() const { return nMax; }
+ sal_Bool GetError() const { return (nMax != 0) && !pIdxA; }
};
class Ww1PlcBookmarkTxt: public Ww1StringList
@@ -955,15 +955,15 @@ public:
class Ww1PlcBookmarkPos : public Ww1Plc
{
public:
- Ww1PlcBookmarkPos(Ww1Fib& _rFib, ULONG start, USHORT nBytes, BOOL bEnd)
+ Ww1PlcBookmarkPos(Ww1Fib& _rFib, sal_uLong start, sal_uInt16 nBytes, sal_Bool bEnd)
: Ww1Plc(_rFib, start, nBytes, (bEnd) ? 0 : 2)
{}
- BYTE* GetData(USHORT nIndex) { return Ww1Plc::GetData(nIndex); }
+ sal_uInt8* GetData(sal_uInt16 nIndex) { return Ww1Plc::GetData(nIndex); }
// Position als CP
- ULONG WhereCP(USHORT nIndex) { return Ww1Plc::Where(nIndex); }
+ sal_uLong WhereCP(sal_uInt16 nIndex) { return Ww1Plc::Where(nIndex); }
// absolut im file
- ULONG Where(USHORT nIndex)
+ sal_uLong Where(sal_uInt16 nIndex)
{
return ( nIndex < Count() )
? Ww1Plc::Where(nIndex) + rFib.GetFIB().fcMinGet()
@@ -989,26 +989,26 @@ public:
class Ww1Fkp
{
protected:
- BYTE aFkp[512];
- USHORT nItemSize;
- BOOL bOK;
- BYTE* GetData(USHORT);
+ sal_uInt8 aFkp[512];
+ sal_uInt16 nItemSize;
+ sal_Bool bOK;
+ sal_uInt8* GetData(sal_uInt16);
public:
- Ww1Fkp(SvStream&, ULONG, USHORT);
+ Ww1Fkp(SvStream&, sal_uLong, sal_uInt16);
friend ostream& operator <<(ostream&, Ww1Fkp&);
- USHORT Count() const { return SVBT8ToByte(aFkp+511); }
- ULONG Where(USHORT); // wie im entsprechenden fkp
+ sal_uInt16 Count() const { return SVBT8ToByte(aFkp+511); }
+ sal_uLong Where(sal_uInt16); // wie im entsprechenden fkp
};
//////////////////////////////////////////////////////////////// FkpPap
class Ww1FkpPap : public Ww1Fkp
{
public:
- Ww1FkpPap(SvStream& rStream, ULONG ulFilePos)
+ Ww1FkpPap(SvStream& rStream, sal_uLong ulFilePos)
: Ww1Fkp(rStream, ulFilePos, 1)
{}
friend ostream& operator <<(ostream&, Ww1FkpPap&);
- BOOL Fill(USHORT, BYTE*&, USHORT&);
+ sal_Bool Fill(sal_uInt16, sal_uInt8*&, sal_uInt16&);
};
//////////////////////////////////////////////////////////////// FkpChp
@@ -1019,7 +1019,7 @@ class Ww1FkpChp : public Ww1Fkp
SvStream& GetStream() { return rStream; }
#endif
public:
- Ww1FkpChp(SvStream& rStream, ULONG ulFilePos)
+ Ww1FkpChp(SvStream& rStream, sal_uLong ulFilePos)
: Ww1Fkp(rStream, ulFilePos, 1)
#ifdef DUMP
, rStream(rStream)
@@ -1027,17 +1027,17 @@ public:
{}
friend ostream& operator <<(ostream&, Ww1FkpChp&);
- BOOL Fill(USHORT, W1_CHP&);
+ sal_Bool Fill(sal_uInt16, W1_CHP&);
};
////////////////////////////////////////////////////////////// SprmPapx
class Ww1SprmPapx : public Ww1Sprm
{
W1_PAPX aPapx;
- BYTE* Sprm(BYTE* p, USHORT nSize);
- USHORT SprmSize(BYTE* p, USHORT nSize);
+ sal_uInt8* Sprm(sal_uInt8* p, sal_uInt16 nSize);
+ sal_uInt16 SprmSize(sal_uInt8* p, sal_uInt16 nSize);
public:
- Ww1SprmPapx(BYTE* p, USHORT nSize);
+ Ww1SprmPapx(sal_uInt8* p, sal_uInt16 nSize);
friend ostream& operator <<(ostream&, Ww1SprmPapx&);
void Start(Ww1Shell&, Ww1Manager&);
void Stop(Ww1Shell&, Ww1Manager&);
@@ -1047,7 +1047,7 @@ public:
class Ww1SprmSep : public Ww1Sprm
{
public:
- Ww1SprmSep(Ww1Fib& rFib, ULONG ulFilePos)
+ Ww1SprmSep(Ww1Fib& rFib, sal_uLong ulFilePos)
: Ww1Sprm(rFib.GetStream(), ulFilePos)
{}
friend ostream& operator <<(ostream&, Ww1SprmSep&);
@@ -1063,14 +1063,14 @@ class Ww1Assoc
Ww1Fib& rFib;
sal_Char* pBuffer;
sal_Char* pStrTbl[ MaxFields ];
- BOOL bOK;
+ sal_Bool bOK;
- String GetStr(USHORT);
+ String GetStr(sal_uInt16);
public:
Ww1Assoc(Ww1Fib&);
~Ww1Assoc() { delete pBuffer; }
- BOOL GetError() const { return !bOK; }
+ sal_Bool GetError() const { return !bOK; }
friend ostream& operator <<(ostream&, Ww1Assoc&);
void Out(Ww1Shell&);
};
@@ -1093,23 +1093,23 @@ public:
//
class Ww1HeaderFooter : public Ww1PlcHdd
{
- USHORT nextIhdd; // naechster textteil im HddText
- USHORT nFtnSep; // fusznoten trenner
- USHORT nFtnFollowSep; // folge fusznoten trenner
- USHORT nFtnNote; // folgefunsznotennotiz
- USHORT nEvenHeadL; // kopfzeilen grader seiten
- USHORT nOddHeadL; // kopfzeilen ungrader seiten
- USHORT nEvenFootL; // fuszzeilen grader seiten
- USHORT nOddFootL; // fuszzeilen ungerader seiten
- USHORT nFirstHeadL; // kopfzeilen der ersten seite
- USHORT nFirstFootL; // fuszzeilen der ersten seite
+ sal_uInt16 nextIhdd; // naechster textteil im HddText
+ sal_uInt16 nFtnSep; // fusznoten trenner
+ sal_uInt16 nFtnFollowSep; // folge fusznoten trenner
+ sal_uInt16 nFtnNote; // folgefunsznotennotiz
+ sal_uInt16 nEvenHeadL; // kopfzeilen grader seiten
+ sal_uInt16 nOddHeadL; // kopfzeilen ungrader seiten
+ sal_uInt16 nEvenFootL; // fuszzeilen grader seiten
+ sal_uInt16 nOddFootL; // fuszzeilen ungerader seiten
+ sal_uInt16 nFirstHeadL; // kopfzeilen der ersten seite
+ sal_uInt16 nFirstFootL; // fuszzeilen der ersten seite
enum HeaderFooterMode {
None, FtnSep, FtnFollowSep, FtnNote, EvenHeadL, OddHeadL,
EvenFootL, OddFootL, FirstHeadL, MaxHeaderFooterMode
} eHeaderFooterMode;
public:
- Ww1HeaderFooter(Ww1Fib& rFibL, USHORT grpfIhdt)
+ Ww1HeaderFooter(Ww1Fib& rFibL, sal_uInt16 grpfIhdt)
: Ww1PlcHdd(rFibL),
nextIhdd(0),
nFtnSep(0xffff),
@@ -1127,7 +1127,7 @@ public:
if (grpfIhdt & 0x0002) nFtnFollowSep = nextIhdd++;
if (grpfIhdt & 0x0004) nFtnNote = nextIhdd++;
}
- void SetGrpfIhdt(USHORT grpfIhdt)
+ void SetGrpfIhdt(sal_uInt16 grpfIhdt)
{
if (grpfIhdt & 0x0001) nEvenHeadL = nextIhdd++;
if (grpfIhdt & 0x0002) nOddHeadL = nextIhdd++;
@@ -1137,79 +1137,79 @@ public:
if (grpfIhdt & 0x0020) nFirstFootL = nextIhdd++;
DBG_ASSERT(nextIhdd<=Count(), "Ww1HeaderFooter");
}
- BOOL operator++(int)
+ sal_Bool operator++(int)
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
eHeaderFooterMode = (HeaderFooterMode)((short)eHeaderFooterMode + 1);
if( eHeaderFooterMode == MaxHeaderFooterMode)
{
eHeaderFooterMode = None;
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
- BOOL FillFtnSep(ULONG& begin, ULONG& end)
+ sal_Bool FillFtnSep(sal_uLong& begin, sal_uLong& end)
{
if (nFtnSep == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nFtnSep, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillFtnFollowSep(ULONG& begin, ULONG& end)
+ sal_Bool FillFtnFollowSep(sal_uLong& begin, sal_uLong& end)
{
if (nFtnFollowSep == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nFtnFollowSep, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillFtnNote(ULONG& begin, ULONG& end)
+ sal_Bool FillFtnNote(sal_uLong& begin, sal_uLong& end)
{
if (nFtnNote == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nFtnNote, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillEvenHeadL(ULONG& begin, ULONG& end)
+ sal_Bool FillEvenHeadL(sal_uLong& begin, sal_uLong& end)
{
if (nEvenHeadL == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nEvenHeadL, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillOddHeadL(ULONG& begin, ULONG& end)
+ sal_Bool FillOddHeadL(sal_uLong& begin, sal_uLong& end)
{
if (nOddHeadL == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nOddHeadL, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillEvenFootL(ULONG& begin, ULONG& end)
+ sal_Bool FillEvenFootL(sal_uLong& begin, sal_uLong& end)
{
if (nEvenFootL == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nEvenFootL, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillOddFootL(ULONG& begin, ULONG& end)
+ sal_Bool FillOddFootL(sal_uLong& begin, sal_uLong& end)
{
if (nOddFootL == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nOddFootL, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillFirstHeadL(ULONG& begin, ULONG& end)
+ sal_Bool FillFirstHeadL(sal_uLong& begin, sal_uLong& end)
{
if (nFirstHeadL == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nFirstHeadL, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillFirstFootL(ULONG& begin, ULONG& end)
+ sal_Bool FillFirstFootL(sal_uLong& begin, sal_uLong& end)
{
if (nFirstFootL == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nFirstFootL, begin, end);
- return TRUE;
+ return sal_True;
}
void Start(Ww1Shell&, Ww1Manager&);
void Stop(Ww1Shell&, Ww1Manager&, sal_Unicode&);
@@ -1218,34 +1218,34 @@ public:
//////////////////////////////////////////////////////////////// Fields
class Ww1Fields : public Ww1PlcFields
{
- USHORT nPlcIndex;
+ sal_uInt16 nPlcIndex;
String sErgebnis; // das von word errechnete ergebniss
SwField* pField;
- ULONG Where(USHORT nIndex) // innerhalb des textes
+ sal_uLong Where(sal_uInt16 nIndex) // innerhalb des textes
{ return Ww1PlcFields::Where(nIndex) - rFib.GetFIB().fcMinGet(); }
public:
- Ww1Fields(Ww1Fib& rFibL, ULONG ulFilePos, USHORT nBytes)
+ Ww1Fields(Ww1Fib& rFibL, sal_uLong ulFilePos, sal_uInt16 nBytes)
: Ww1PlcFields(rFibL, ulFilePos, nBytes), nPlcIndex(0), pField(0)
{}
// innerhalb des textes
- ULONG Where() { return Where(nPlcIndex); }
+ sal_uLong Where() { return Where(nPlcIndex); }
void operator++(int)
{
DBG_ASSERT(nPlcIndex+1 <= Count(), "Ww1Fields");
nPlcIndex++;
}
- void Seek(ULONG ulNew) { Ww1PlcFields::Seek(ulNew, nPlcIndex); }
+ void Seek(sal_uLong ulNew) { Ww1PlcFields::Seek(ulNew, nPlcIndex); }
W1_FLD* GetData()
{
DBG_ASSERT(nPlcIndex < Count(), "Ww1Fields");
return Ww1PlcFields::GetData(nPlcIndex);
}
- ULONG GetLength();
+ sal_uLong GetLength();
friend ostream& operator <<(ostream&, Ww1Manager&);
void Start(Ww1Shell&, Ww1Manager&);
void Stop(Ww1Shell&, Ww1Manager&, sal_Unicode&);
- void Out(Ww1Shell&, Ww1Manager&, USHORT=0);
+ void Out(Ww1Shell&, Ww1Manager&, sal_uInt16=0);
};
class Ww1TextFields : public Ww1Fields
@@ -1291,9 +1291,9 @@ class Ww1Bookmarks
Ww1PlcBookmarkPos* pPos[2];
Ww1Fib& rFib;
- USHORT nPlcIdx[2];
- USHORT nIsEnd;
- BOOL bOK;
+ sal_uInt16 nPlcIdx[2];
+ sal_uInt16 nIsEnd;
+ sal_Bool bOK;
public:
Ww1Bookmarks(Ww1Fib& rFib);
~Ww1Bookmarks()
@@ -1301,33 +1301,33 @@ public:
delete pPos[1];
delete pPos[0];
}
- ULONG Where() const { return pPos[nIsEnd]->WhereCP(nPlcIdx[nIsEnd]); }
+ sal_uLong Where() const { return pPos[nIsEnd]->WhereCP(nPlcIdx[nIsEnd]); }
void operator++(int);
- BOOL GetError() const { return !bOK; }
+ sal_Bool GetError() const { return !bOK; }
long GetHandle() const;
- BOOL GetIsEnd() const { return ( nIsEnd ) ? TRUE : FALSE; }
+ sal_Bool GetIsEnd() const { return ( nIsEnd ) ? sal_True : sal_False; }
const String GetName() const;
long Len() const;
friend ostream& operator <<(ostream&, Ww1Bookmarks&);
void Start(Ww1Shell&, Ww1Manager&);
void Stop(Ww1Shell&, Ww1Manager&, sal_Unicode&);
- void Out(Ww1Shell&, Ww1Manager&, USHORT=0);
+ void Out(Ww1Shell&, Ww1Manager&, sal_uInt16=0);
};
///////////////////////////////////////////////////////////// Footnotes
class Ww1Footnotes : public Ww1PlcFootnoteRef
{
- USHORT nPlcIndex;
+ sal_uInt16 nPlcIndex;
Ww1PlcFootnoteTxt aText;
- BOOL bStarted;
+ sal_Bool bStarted;
public:
Ww1Footnotes(Ww1Fib& rFibL)
- : Ww1PlcFootnoteRef(rFibL), nPlcIndex(0), aText(rFibL), bStarted(FALSE)
+ : Ww1PlcFootnoteRef(rFibL), nPlcIndex(0), aText(rFibL), bStarted(sal_False)
{}
// innerhalb des textes
- ULONG Where()
+ sal_uLong Where()
{
- ULONG ulRet = 0xffffffff;
+ sal_uLong ulRet = 0xffffffff;
if (Count())
ulRet = Ww1PlcFootnoteRef::Where(nPlcIndex);
return ulRet;
@@ -1345,17 +1345,17 @@ public:
class Ww1Sep : public Ww1PlcSep
{
Ww1HeaderFooter aHdd;
- USHORT nPlcIndex;
+ sal_uInt16 nPlcIndex;
public:
- Ww1Sep(Ww1Fib& rFibL, USHORT grpfIhdt)
+ Ww1Sep(Ww1Fib& rFibL, sal_uInt16 grpfIhdt)
: Ww1PlcSep(rFibL), aHdd(rFibL, grpfIhdt), nPlcIndex(0) {}
Ww1HeaderFooter& GetHdd() { return aHdd; }
void operator++(int) { nPlcIndex++; }
- BYTE* GetData() { return Ww1PlcSep::GetData(nPlcIndex); }
+ sal_uInt8* GetData() { return Ww1PlcSep::GetData(nPlcIndex); }
// innerhalb des textes
- ULONG Where() { return Ww1PlcSep::Where(nPlcIndex); }
- void SetGrpfIhdt(BYTE grpfIhdt)
+ sal_uLong Where() { return Ww1PlcSep::Where(nPlcIndex); }
+ void SetGrpfIhdt(sal_uInt8 grpfIhdt)
{
GetHdd().SetGrpfIhdt(grpfIhdt);
}
@@ -1367,14 +1367,14 @@ public:
/////////////////////////////////////////////////////////////////// Pap
class Ww1Pap : public Ww1PlcPap
{
- USHORT nPlcIndex;
- USHORT nPushedPlcIndex;
- USHORT nFkpIndex;
- USHORT nPushedFkpIndex;
- ULONG ulOffset;
+ sal_uInt16 nPlcIndex;
+ sal_uInt16 nPushedPlcIndex;
+ sal_uInt16 nFkpIndex;
+ sal_uInt16 nPushedFkpIndex;
+ sal_uLong ulOffset;
Ww1FkpPap* pPap;
- BOOL FindSprm(USHORT nId, BYTE* pStart, BYTE* pEnd);
+ sal_Bool FindSprm(sal_uInt16 nId, sal_uInt8* pStart, sal_uInt8* pEnd);
void UpdateIdx()
{
if (pPap && nFkpIndex >= pPap->Count() )
@@ -1386,26 +1386,26 @@ class Ww1Pap : public Ww1PlcPap
if( !pPap )
Where();
}
- BOOL HasId0(USHORT nId);
+ sal_Bool HasId0(sal_uInt16 nId);
public:
Ww1Pap(Ww1Fib& rFib);
~Ww1Pap() { delete pPap; }
- ULONG Where( BOOL bSetIndex = TRUE ); // innerhalb des textes
+ sal_uLong Where( sal_Bool bSetIndex = sal_True ); // innerhalb des textes
void operator++(int);
- BOOL FillStart(BYTE*& pB, USHORT& nSize)
+ sal_Bool FillStart(sal_uInt8*& pB, sal_uInt16& nSize)
{
UpdateIdx();
return pPap->Fill(nFkpIndex, pB, nSize);
}
- BOOL FillStop(BYTE*& pB, USHORT& nSize)
+ sal_Bool FillStop(sal_uInt8*& pB, sal_uInt16& nSize)
{
- return nFkpIndex ? pPap->Fill(nFkpIndex-1, pB, nSize) : FALSE;
+ return nFkpIndex ? pPap->Fill(nFkpIndex-1, pB, nSize) : sal_False;
}
void Start(Ww1Shell&, Ww1Manager&);
void Stop(Ww1Shell&, Ww1Manager&, sal_Unicode&);
- void Seek(ULONG);
- void Push(ULONG ulOffsetTmp = 0)
+ void Seek(sal_uLong);
+ void Push(sal_uLong ulOffsetTmp = 0)
{
DBG_ASSERT(!Pushed(), "Ww1Pap");
nPushedPlcIndex = nPlcIndex;
@@ -1415,7 +1415,7 @@ public:
delete pPap;
pPap = NULL;
}
- BOOL Pushed()
+ sal_Bool Pushed()
{
return nPushedPlcIndex != 0xffff;
}
@@ -1429,19 +1429,19 @@ public:
nPushedFkpIndex = 0xffff;
delete pPap;
pPap = NULL;
- Where( FALSE );
+ Where( sal_False );
}
- BOOL HasId(USHORT nId);
+ sal_Bool HasId(sal_uInt16 nId);
};
/////////////////////////////////////////////////////////////////// Chp
class Ww1Chp : public Ww1PlcChp
{
- USHORT nPlcIndex;
- USHORT nPushedPlcIndex;
- USHORT nFkpIndex;
- USHORT nPushedFkpIndex;
- ULONG ulOffset;
+ sal_uInt16 nPlcIndex;
+ sal_uInt16 nPushedPlcIndex;
+ sal_uInt16 nFkpIndex;
+ sal_uInt16 nPushedFkpIndex;
+ sal_uLong ulOffset;
Ww1FkpChp* pChp;
void UpdateIdx()
{
@@ -1458,19 +1458,19 @@ class Ww1Chp : public Ww1PlcChp
public:
Ww1Chp( Ww1Fib& rFib );
~Ww1Chp() { delete pChp; }
- ULONG Where( BOOL bSetIndex = TRUE ); // innerhalb des textes
+ sal_uLong Where( sal_Bool bSetIndex = sal_True ); // innerhalb des textes
void operator++(int);
- BOOL FillStart(W1_CHP& rChp)
+ sal_Bool FillStart(W1_CHP& rChp)
{
UpdateIdx();
return pChp->Fill(nFkpIndex, rChp);
}
- BOOL FillStop(W1_CHP& rChp)
- { return nFkpIndex ? pChp->Fill(nFkpIndex-1, rChp) : FALSE; }
+ sal_Bool FillStop(W1_CHP& rChp)
+ { return nFkpIndex ? pChp->Fill(nFkpIndex-1, rChp) : sal_False; }
void Start(Ww1Shell&, Ww1Manager&);
void Stop(Ww1Shell&, Ww1Manager&, sal_Unicode&);
- void Seek(ULONG);
- void Push(ULONG ulOffsetTmp = 0)
+ void Seek(sal_uLong);
+ void Push(sal_uLong ulOffsetTmp = 0)
{
DBG_ASSERT(!Pushed(), "Ww1Chp");
nPushedPlcIndex = nPlcIndex;
@@ -1480,7 +1480,7 @@ public:
delete pChp;
pChp = NULL;
}
- BOOL Pushed() { return nPushedPlcIndex != 0xffff; }
+ sal_Bool Pushed() { return nPushedPlcIndex != 0xffff; }
void Pop()
{
DBG_ASSERT(Pushed(), "Ww1Chp");
@@ -1491,7 +1491,7 @@ public:
nPushedFkpIndex = 0xffff;
delete pChp;
pChp = NULL;
- Where( FALSE );
+ Where( sal_False );
}
};
@@ -1503,18 +1503,18 @@ public:
//
class Ww1Manager
{
- BOOL bOK;
- BOOL bInTtp;
- BOOL bInStyle;
- BOOL bStopAll;
+ sal_Bool bOK;
+ sal_Bool bInTtp;
+ sal_Bool bInStyle;
+ sal_Bool bStopAll;
Ww1Fib aFib;
Ww1Dop aDop;
Ww1Fonts aFonts;
// ab jetzt alles paarig, fuer 'pushed':
Ww1DocText aDoc;
Ww1PlainText* pDoc;
- ULONG ulDocSeek;
- ULONG* pSeek;
+ sal_uLong ulDocSeek;
+ sal_uLong* pSeek;
Ww1TextFields aFld;
Ww1Fields* pFld;
// selbst 'push'bar:
@@ -1530,43 +1530,43 @@ class Ww1Manager
void Out(Ww1Shell&, sal_Unicode );
public:
- Ww1Manager(SvStream& rStrm, ULONG nFieldFlgs);
- BOOL GetError() const { return !bOK; }
+ Ww1Manager(SvStream& rStrm, sal_uLong nFieldFlgs);
+ sal_Bool GetError() const { return !bOK; }
// Fuer Tabellen
- void SetInTtp(BOOL bSet = TRUE) { bInTtp = bSet; }
- BOOL IsInTtp() const { return bInTtp; }
- void SetInStyle(BOOL bSet = TRUE) { bInStyle = bSet; }
- BOOL IsInStyle() const { return bInStyle; }
- void SetStopAll(BOOL bSet = TRUE) { bStopAll = bSet; }
- BOOL IsStopAll() const { return bStopAll; }
- BOOL HasInTable();
- BOOL HasTtp();
- BOOL LastHasTtp();
+ void SetInTtp(sal_Bool bSet = sal_True) { bInTtp = bSet; }
+ sal_Bool IsInTtp() const { return bInTtp; }
+ void SetInStyle(sal_Bool bSet = sal_True) { bInStyle = bSet; }
+ sal_Bool IsInStyle() const { return bInStyle; }
+ void SetStopAll(sal_Bool bSet = sal_True) { bStopAll = bSet; }
+ sal_Bool IsStopAll() const { return bStopAll; }
+ sal_Bool HasInTable();
+ sal_Bool HasTtp();
+ sal_Bool LastHasTtp();
// Fuer Flys
- BOOL HasPPc();
- BOOL HasPDxaAbs();
+ sal_Bool HasPPc();
+ sal_Bool HasPDxaAbs();
Ww1Fib& GetFib() { return aFib; }
Ww1PlainText& GetText() { return *pDoc; }
Ww1Dop& GetDop() { return aDop; }
Ww1Sep& GetSep() { return aSep; }
// innerhalb des textes
- ULONG Where() { return pDoc->Where(); }
+ sal_uLong Where() { return pDoc->Where(); }
void Fill( sal_Unicode& rChr ) { pDoc->Out( rChr ); }
- BYTE Fill( String& rStr, ULONG ulLen)
+ sal_uInt8 Fill( String& rStr, sal_uLong ulLen)
{
ulLen += pDoc->Where();
- return sal::static_int_cast< BYTE >(pDoc->Out(rStr, ulLen));
+ return sal::static_int_cast< sal_uInt8 >(pDoc->Out(rStr, ulLen));
}
- SvxFontItem GetFont(USHORT nFCode);
+ SvxFontItem GetFont(sal_uInt16 nFCode);
friend Ww1Shell& operator <<(Ww1Shell&, Ww1Manager&);
friend ostream& operator <<(ostream&, Ww1Manager&);
- BOOL Pushed() { return pDoc != &aDoc; }
+ sal_Bool Pushed() { return pDoc != &aDoc; }
void Pop();
- void Push0(Ww1PlainText* pDoc, ULONG, Ww1Fields* = 0);
- void Push1(Ww1PlainText* pDoc, ULONG ulSeek, ULONG ulSeek2 = 0,
+ void Push0(Ww1PlainText* pDoc, sal_uLong, Ww1Fields* = 0);
+ void Push1(Ww1PlainText* pDoc, sal_uLong ulSeek, sal_uLong ulSeek2 = 0,
Ww1Fields* = 0);
};
diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx
index c76b2a83e0bb..e0feb5bc1791 100644
--- a/sw/source/filter/ww1/w1filter.cxx
+++ b/sw/source/filter/ww1/w1filter.cxx
@@ -107,9 +107,9 @@ Ww1Shell& operator <<(Ww1Shell& rOut, Ww1Manager& This)
if (!This.Pushed())
{
{ // der wird nur temporaer gebraucht:
- This.SetInStyle( TRUE );
+ This.SetInStyle( sal_True );
Ww1StyleSheet(This.aFib).Out(rOut, This);
- This.SetInStyle( FALSE );
+ This.SetInStyle( sal_False );
}
{ // dieser auch:
Ww1Assoc(This.aFib).Out(rOut);
@@ -139,9 +139,9 @@ Ww1Shell& operator <<(Ww1Shell& rOut, Ww1Manager& This)
// ist:
cUnknown = This.pDoc->Out(rOut, *This.pSeek);
}
- This.SetStopAll(TRUE);
+ This.SetStopAll(sal_True);
This.OutStop(rOut, cUnknown); // Damit die Attribute am Ende geschlossen
- This.SetStopAll(FALSE); // werden
+ This.SetStopAll(sal_False); // werden
return rOut;
}
@@ -176,7 +176,7 @@ void Ww1Manager::OutStart( Ww1Shell& rOut )
if (!Pushed())
aBooks.Start(rOut, *this);
// bestimmen, wo das naechste Ereigniss ist:
- ULONG ulEnd = pDoc->Count(); // spaetestens am textende
+ sal_uLong ulEnd = pDoc->Count(); // spaetestens am textende
if (!Pushed())
if (ulEnd > aSep.Where()) // naechster Sep vorher?
ulEnd = aSep.Where();
@@ -224,8 +224,8 @@ void Ww1Manager::Out(Ww1Shell& rOut, sal_Unicode cUnknown)
// Optimierung: Sie werden nur auf sinnvolle Werte gesetzt, wenn
// das 0x07-Zeiche ansteht.
- BOOL bLIsTtp = FALSE;
- BOOL bLHasTtp = FALSE;
+ sal_Bool bLIsTtp = sal_False;
+ sal_Bool bLHasTtp = sal_False;
if( cUnknown == 0x07 )
{
bLIsTtp = IsInTtp();
@@ -273,16 +273,16 @@ void Ww1Manager::Out(Ww1Shell& rOut, sal_Unicode cUnknown)
OutStart( rOut ); // Attrs ggfs. starten und Naechste Pos berechnen
}
-SvxFontItem Ww1Manager::GetFont(USHORT nFCode)
+SvxFontItem Ww1Manager::GetFont(sal_uInt16 nFCode)
{
return aFonts.GetFont(nFCode);
}
-void Ww1Manager::Push0(Ww1PlainText* _pDoc, ULONG ulSeek, Ww1Fields* _pFld)
+void Ww1Manager::Push0(Ww1PlainText* _pDoc, sal_uLong ulSeek, Ww1Fields* _pFld)
{
DBG_ASSERT(!Pushed(), "Ww1Manager");
this->pDoc = _pDoc;
- pSeek = new ULONG;
+ pSeek = new sal_uLong;
*pSeek = pDoc->Where();
aPap.Push(ulSeek);
aChp.Push(ulSeek);
@@ -292,12 +292,12 @@ void Ww1Manager::Push0(Ww1PlainText* _pDoc, ULONG ulSeek, Ww1Fields* _pFld)
// ulSeek ist der FC-Abstand zwischen Hauptest-Start und Sondertext-Start
// ulSeek2 ist der Offset dieses bestimmten Sondertextes im Sondertext-Bereich,
// also z.B. der Offset des speziellen K/F-Textes
-void Ww1Manager::Push1(Ww1PlainText* _pDoc, ULONG ulSeek, ULONG ulSeek2,
+void Ww1Manager::Push1(Ww1PlainText* _pDoc, sal_uLong ulSeek, sal_uLong ulSeek2,
Ww1Fields* _pFld)
{
DBG_ASSERT(!Pushed(), "Ww1Manager");
this->pDoc = _pDoc;
- pSeek = new ULONG;
+ pSeek = new sal_uLong;
*pSeek = pDoc->Where();
aPap.Push(ulSeek + ulSeek2);
aChp.Push(ulSeek + ulSeek2);
@@ -321,7 +321,7 @@ void Ww1Manager::Pop()
///////////////////////////////////////////////////////////// Bookmarks
-void Ww1Bookmarks::Out(Ww1Shell& rOut, Ww1Manager& rMan, USHORT)
+void Ww1Bookmarks::Out(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16)
{
if (GetIsEnd())
{
@@ -347,7 +347,7 @@ void Ww1Bookmarks::Out(Ww1Shell& rOut, Ww1Manager& rMan, USHORT)
String aVal( rMan.GetText().GetText( Where(), nLen ) );
// in 2 Schritten, da OS/2 zu doof ist
- SwFltBookmark aBook( rName, aVal, GetHandle(), FALSE );
+ SwFltBookmark aBook( rName, aVal, GetHandle(), sal_False );
rOut << aBook;
}
@@ -373,10 +373,10 @@ void Ww1Footnotes::Start(Ww1Shell& rOut, Ww1Manager& rMan)
{
Ww1FtnText* pText = new Ww1FtnText(rMan.GetFib());
// beginn des textes dieser fusznote:
- ULONG start = aText.Where(nPlcIndex);
+ sal_uLong start = aText.Where(nPlcIndex);
pText->Seek(start);
// laenge des textes
- ULONG count = aText.Where(nPlcIndex+1) - start;
+ sal_uLong count = aText.Where(nPlcIndex+1) - start;
pText->SetCount(count);
// fusznotenkennung sollte das erste byte sein
pText->Out(c);
@@ -384,7 +384,7 @@ void Ww1Footnotes::Start(Ww1Shell& rOut, Ww1Manager& rMan)
count--; // fuer das eben gelesene kenn-byte
// fusznoten mode beginnen:
rOut.BeginFootnote();
- bStarted = TRUE;
+ bStarted = sal_True;
rMan.Push0(pText, pText->Offset(rMan.GetFib()),
new Ww1FootnoteFields(rMan.GetFib()));
rOut << rMan;
@@ -464,7 +464,7 @@ static WWDateTime GetTimeDatePara( const String& rForm,
}
else // keine Zeit
{
- eDT = (WWDateTime)( eDT & ~(USHORT)WW_TIME );
+ eDT = (WWDateTime)( eDT & ~(sal_uInt16)WW_TIME );
}
xub_StrLen nDPos = 0;
@@ -495,34 +495,34 @@ static WWDateTime GetTimeDatePara( const String& rForm,
DFF_DDDMMMY, DFF_DDDMMMY, DFF_DDDMMMYY, DFF_DDDMMMYY
};
- BOOL bHasDay = STRING_NOTFOUND != rForm.Search( 't' ) ||
+ sal_Bool bHasDay = STRING_NOTFOUND != rForm.Search( 't' ) ||
STRING_NOTFOUND != rForm.Search( 'T' ) ||
STRING_NOTFOUND != rForm.Search( 'd' ) ||
STRING_NOTFOUND != rForm.Search( 'D' );
- BOOL bLongDayOfWeek= STRING_NOTFOUND != rForm.SearchAscii( "tttt" ) ||
+ sal_Bool bLongDayOfWeek= STRING_NOTFOUND != rForm.SearchAscii( "tttt" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "TTTT" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "dddd" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "DDDD" );
- BOOL bDayOfWeek = STRING_NOTFOUND != rForm.SearchAscii( "ttt" ) ||
+ sal_Bool bDayOfWeek = STRING_NOTFOUND != rForm.SearchAscii( "ttt" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "TTT" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "ddd" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "DDD" );
// M, MM -> numeric month
// MMM, MMMM -> text. month
- BOOL bLitMonth = STRING_NOTFOUND != rForm.SearchAscii( "MMM" );
+ sal_Bool bLitMonth = STRING_NOTFOUND != rForm.SearchAscii( "MMM" );
// MMMM -> full month
- BOOL bFullMonth = STRING_NOTFOUND != rForm.SearchAscii( "MMMM" );
+ sal_Bool bFullMonth = STRING_NOTFOUND != rForm.SearchAscii( "MMMM" );
// jj, JJ -> 2-col-year
// jjjj, JJJJ -> 4-col-year
- BOOL bFullYear = STRING_NOTFOUND != rForm.SearchAscii( "jjj" ) ||
+ sal_Bool bFullYear = STRING_NOTFOUND != rForm.SearchAscii( "jjj" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "JJJ" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "yyy" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "YYY" );
- USHORT i = ( bLitMonth & 1 )
+ sal_uInt16 i = ( bLitMonth & 1 )
| ( ( bFullYear & 1 ) << 1 )
| ( ( bFullMonth & 1 ) << 2 )
| ( ( bDayOfWeek & 1 ) << 3 )
@@ -537,17 +537,17 @@ static WWDateTime GetTimeDatePara( const String& rForm,
}
else
{
- eDT = (WWDateTime)( eDT & ~(USHORT)WW_DATE );
+ eDT = (WWDateTime)( eDT & ~(sal_uInt16)WW_DATE );
}
return eDT;
}
-extern void sw3io_ConvertFromOldField( SwDoc& rDoc, USHORT& rWhich,
- USHORT& rSubType, ULONG &rFmt,
- USHORT nVersion );
+extern void sw3io_ConvertFromOldField( SwDoc& rDoc, sal_uInt16& rWhich,
+ sal_uInt16& rSubType, sal_uLong &rFmt,
+ sal_uInt16 nVersion );
-void Ww1Fields::Out(Ww1Shell& rOut, Ww1Manager& rMan, USHORT nDepth)
+void Ww1Fields::Out(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 nDepth)
{
String sType; // der typ als string
String sFormel; // die formel
@@ -571,7 +571,7 @@ void Ww1Fields::Out(Ww1Shell& rOut, Ww1Manager& rMan, USHORT nDepth)
if ( pos != STRING_NOTFOUND )
aStr.Erase(0, 1);
sFormel += aStr;
- BYTE rbType = pData->fltGet();
+ sal_uInt8 rbType = pData->fltGet();
do {
// solange den formelteil einlesen, bis das feld entweder
// zuende ist oder der ergebnisteil beginnt. dabei koennen
@@ -614,7 +614,7 @@ void Ww1Fields::Out(Ww1Shell& rOut, Ww1Manager& rMan, USHORT nDepth)
pData = GetData();
}
DBG_ASSERT(pData->chGet()==21, "Ww1PlainText");
- BOOL bKnown = TRUE;
+ sal_Bool bKnown = sal_True;
DBG_ASSERT(pField==0, "Ww1PlainText");
if (pField != 0)
{
@@ -689,7 +689,7 @@ oncemore:
IS("anzzeichen", "numberofchars", 28)
IS("dateiname", "filename", 29)
IS("vorlage", "templatename", 30)
- bKnown = FALSE;
+ bKnown = sal_False;
#undef IS
if (rbType != 14)
goto oncemore;
@@ -723,8 +723,8 @@ oncemore:
case 22: // revision date
case 23: // print date
case 25:{// edit time
- USHORT nSub;
- USHORT nReg = 0; // RegInfoFormat, DefaultFormat fuer DocInfoFelder
+ sal_uInt16 nSub;
+ sal_uInt16 nReg = 0; // RegInfoFormat, DefaultFormat fuer DocInfoFelder
switch( rbType )
{
@@ -782,9 +782,9 @@ oncemore:
if( eDT & WW_DATE )
{
- USHORT nWhich = RES_DATEFLD;
- USHORT nSubType = DATEFLD;
- ULONG nFormat = aDate;
+ sal_uInt16 nWhich = RES_DATEFLD;
+ sal_uInt16 nSubType = DATEFLD;
+ sal_uLong nFormat = aDate;
sw3io_ConvertFromOldField( rOut.GetDoc(),
nWhich, nSubType, nFormat, 0x0110 );
pField = new SwDateTimeField((SwDateTimeFieldType*)
@@ -796,9 +796,9 @@ oncemore:
}
if( eDT & WW_TIME )
{
- USHORT nWhich = RES_TIMEFLD;
- USHORT nSubType = TIMEFLD;
- ULONG nFormat = aTime;
+ sal_uInt16 nWhich = RES_TIMEFLD;
+ sal_uInt16 nSubType = TIMEFLD;
+ sal_uLong nFormat = aTime;
sw3io_ConvertFromOldField( rOut.GetDoc(),
nWhich, nSubType, nFormat, 0x0110 );
pField = new SwDateTimeField((SwDateTimeFieldType*)
@@ -879,7 +879,7 @@ oncemore:
SwFieldType* pFT = rOut.GetDoc().InsertFldType(
SwSetExpFieldType( &rOut.GetDoc(), aName, nsSwGetSetExpType::GSE_STRING ) );
pField = new SwSetExpField((SwSetExpFieldType*)pFT, aStr );
- ((SwSetExpField*)pField)->SetInputFlag( TRUE );
+ ((SwSetExpField*)pField)->SetInputFlag( sal_True );
((SwSetExpField*)pField)->SetSubType(nsSwExtendedSubType::SUB_INVISIBLE);
}
case 39: // fillin command
@@ -937,14 +937,14 @@ oncemore:
|| sExt.EqualsIgnoreCaseAscii( ".pic" ))
rOut.AddGraphic( sName );
else
- bKnown = FALSE;
+ bKnown = sal_False;
}
else
- bKnown = FALSE;
+ bKnown = sal_False;
}
break;
default: // unknown
- DBG_ASSERT(FALSE, "Ww1PlainText");
+ DBG_ASSERT(sal_False, "Ww1PlainText");
// unsupported:
case 1: // unknown
case 2: // possible bookmark
@@ -978,7 +978,7 @@ oncemore:
case 52: // auto number outline
case 53: // auto number legal
case 54: // auto number arabic
- bKnown = FALSE;
+ bKnown = sal_False;
break;
}
if( bKnown || sErgebnis.EqualsAscii( "\270" ))
@@ -990,13 +990,13 @@ oncemore:
(*this)++;
}
-ULONG Ww1Fields::GetLength()
+sal_uLong Ww1Fields::GetLength()
{
// berechnet die laenge eines feldteiles. nicht mitgerechnet werden
// die terminierenden zeichen im text (19, 20, 21) die beginn, trenner
// und ende bedeuten.
- ULONG ulBeg = Where();
- ULONG ulEnd = Where(nPlcIndex+1);
+ sal_uLong ulBeg = Where();
+ sal_uLong ulEnd = Where(nPlcIndex+1);
DBG_ASSERT(ulBeg<ulEnd, "Ww1Fields");
return (ulEnd - ulBeg) - 1;
}
@@ -1023,7 +1023,7 @@ void Ww1Sep::Start(Ww1Shell& rOut, Ww1Manager& rMan)
// momentanes attribut beginnt, wird dieses attribut eingefuegt.
// diese methode ist bei den meisten start/stop methoden der
// memberklassen des managers identisch.
- BYTE* pByte = GetData();
+ sal_uInt8* pByte = GetData();
Ww1SprmSep aSprm(rFib, SVBT32ToUInt32(pByte + 2));
aSprm.Start(rOut, rMan);
aSprm.Stop(rOut, rMan);
@@ -1037,8 +1037,8 @@ void Ww1Pap::Start(Ww1Shell& rOut, Ww1Manager& rMan)
{
if (rMan.Where() >= Where())
{
- BYTE* pByte;
- USHORT cb;
+ sal_uInt8* pByte;
+ sal_uInt16 cb;
// bereitstellen der zu startenden attribute
if (FillStart(pByte, cb))
{
@@ -1054,8 +1054,8 @@ void Ww1Pap::Stop(Ww1Shell& rOut, Ww1Manager& rMan, sal_Unicode&)
{
if (rMan.Where() >= Where() || rMan.IsStopAll())
{
- BYTE* pByte;
- USHORT cb;
+ sal_uInt8* pByte;
+ sal_uInt16 cb;
if (FillStop(pByte, cb)){
Ww1SprmPapx aSprm(pByte, cb);
aSprm.Stop(rOut, rMan);
@@ -1095,15 +1095,15 @@ void W1_CHP::Out(Ww1Shell& rOut, Ww1Manager& rMan)
switch (kulGet()) {
case 0: {
rOut << SvxUnderlineItem(UNDERLINE_NONE, RES_CHRATR_UNDERLINE) <<
- SvxWordLineModeItem(FALSE, RES_CHRATR_WORDLINEMODE);
+ SvxWordLineModeItem(sal_False, RES_CHRATR_WORDLINEMODE);
} break;
- default: DBG_ASSERT(FALSE, "Chpx");
+ default: DBG_ASSERT(sal_False, "Chpx");
case 1: {
rOut << SvxUnderlineItem(UNDERLINE_SINGLE, RES_CHRATR_UNDERLINE);
} break;
case 2: {
rOut << SvxUnderlineItem(UNDERLINE_SINGLE, RES_CHRATR_UNDERLINE) <<
- SvxWordLineModeItem(TRUE, RES_CHRATR_WORDLINEMODE);
+ SvxWordLineModeItem(sal_True, RES_CHRATR_WORDLINEMODE);
} break;
case 3: {
rOut << SvxUnderlineItem(UNDERLINE_DOUBLE, RES_CHRATR_UNDERLINE);
@@ -1115,7 +1115,7 @@ void W1_CHP::Out(Ww1Shell& rOut, Ww1Manager& rMan)
if (fsIcoGet())
switch(icoGet()) {
- default: DBG_ASSERT(FALSE, "Chpx");
+ default: DBG_ASSERT(sal_False, "Chpx");
case 0: { rOut.EndItem(RES_CHRATR_COLOR); } break;
case 1: { rOut << SvxColorItem(Color(COL_BLACK), RES_CHRATR_COLOR); } break;
case 2: { rOut << SvxColorItem(Color(COL_LIGHTBLUE), RES_CHRATR_COLOR); } break;
@@ -1241,7 +1241,7 @@ void Ww1Style::Out(Ww1Shell& rOut, Ww1Manager& rMan)
// umstaenden nicht erreicht wurde. dann wurde das kontrollzeichen
// zwar (weg-)gelesen, jedoch noch nicht ausgegeben.
//
-sal_Unicode Ww1PlainText::Out( Ww1Shell& rOut, ULONG& ulEnd )
+sal_Unicode Ww1PlainText::Out( Ww1Shell& rOut, sal_uLong& ulEnd )
{
// gibt die zeichen bis ulEnd aus, es sei den es kommen sonderzeichen
// die eine bedeutung haben wie absatzende oder seitenumbruch.
@@ -1259,7 +1259,7 @@ sal_Unicode Ww1PlainText::Out( Ww1Shell& rOut, ULONG& ulEnd )
return Ww1PlainText::MinChar;
}
-sal_Unicode Ww1PlainText::Out( String& rStr, ULONG ulEnd )
+sal_Unicode Ww1PlainText::Out( String& rStr, sal_uLong ulEnd )
{
// wie Out(Shell..., jedoch ausgabe auf einen string
rStr.Erase();
@@ -1325,7 +1325,7 @@ void Ww1SprmPapx::Stop(Ww1Shell& rOut, Ww1Manager& rMan)
}
///////////////////////////////////////////////////////////////// Fonts
-SvxFontItem Ww1Fonts::GetFont(USHORT nFCode)
+SvxFontItem Ww1Fonts::GetFont(sal_uInt16 nFCode)
{
// erzeugen eine fonts im sw-sinne aus den word-strukturen
FontFamily eFamily = FAMILY_DONTKNOW;
@@ -1376,7 +1376,7 @@ SvxFontItem Ww1Fonts::GetFont(USHORT nFCode)
|| aName.EqualsIgnoreCaseAscii("ITC Zapf Dingbats") )
eCharSet = RTL_TEXTENCODING_SYMBOL;
// FontFamily ........................................
- USHORT b = pF->ffGet();
+ sal_uInt16 b = pF->ffGet();
static FontFamily eFamilyA[] =
{
FAMILY_DONTKNOW, FAMILY_ROMAN, FAMILY_SWISS, FAMILY_MODERN,
@@ -1387,7 +1387,7 @@ SvxFontItem Ww1Fonts::GetFont(USHORT nFCode)
}
else
{
- DBG_ASSERT(FALSE, "WW1Fonts::GetFont: Nicht existenter Font !");
+ DBG_ASSERT(sal_False, "WW1Fonts::GetFont: Nicht existenter Font !");
eFamily = FAMILY_SWISS;
aName.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "Helv" ));
ePitch = PITCH_VARIABLE;
@@ -1444,7 +1444,7 @@ void Ww1Dop::Out(Ww1Shell& rOut)
nDefTabSiz = 709;
// wir wollen genau einen DefaultTab
- SvxTabStopItem aNewTab(1, USHORT(nDefTabSiz), SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP);
+ SvxTabStopItem aNewTab(1, sal_uInt16(nDefTabSiz), SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP);
((SvxTabStop&)aNewTab[0]).GetAdjustment() = SVX_TAB_ADJUST_DEFAULT;
rOut.GetDoc().GetAttrPool().SetPoolDefaultItem( aNewTab); //~ mdt: besser (GetDoc)
@@ -1507,7 +1507,7 @@ void Ww1Assoc::Out(Ww1Shell& rOut)
}
//////////////////////////////////////////////////////////// StyleSheet
-void Ww1StyleSheet::OutDefaults(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc)
+void Ww1StyleSheet::OutDefaults(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 stc)
{
switch (stc){
case 222: // Null
@@ -1618,7 +1618,7 @@ void Ww1StyleSheet::OutDefaults(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc)
}
}
-void Ww1StyleSheet::OutOne(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc)
+void Ww1StyleSheet::OutOne(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 stc)
{
const RES_POOL_COLLFMT_TYPE RES_NONE = RES_POOLCOLL_DOC_END;
RES_POOL_COLLFMT_TYPE aType = RES_NONE;
@@ -1707,13 +1707,13 @@ void Ww1StyleSheet::OutOne(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc)
// OutOneWithBase() liest einen Style mit OutOne() einen Style ein
// Jedoch liest er, wenn noch nicht geschehen, den Basisstyle rekursiv ein
void Ww1StyleSheet::OutOneWithBase(Ww1Shell& rOut, Ww1Manager& rMan,
- USHORT stc, BYTE* pbStopRecur )
+ sal_uInt16 stc, sal_uInt8* pbStopRecur )
{
// SH: lineares Einlesen ist Scheisse, da dann BasedOn nicht gesetzt
// werden kann und ausserdem Toggle- und Modify-Attrs (z.B. Tabs ) nicht gehen.
Ww1Style& rSty = GetStyle(stc);
- USHORT nBase = rSty.GetnBase();
+ sal_uInt16 nBase = rSty.GetnBase();
if( nBase != stc
&& !rOut.IsStyleImported( nBase )
&& GetStyle(nBase).IsUsed()
@@ -1727,9 +1727,9 @@ void Ww1StyleSheet::OutOneWithBase(Ww1Shell& rOut, Ww1Manager& rMan,
void Ww1StyleSheet::Out(Ww1Shell& rOut, Ww1Manager& rMan)
{
- USHORT stc;
- BYTE bStopRecur[256];
- memset( bStopRecur, FALSE, sizeof(bStopRecur) );
+ sal_uInt16 stc;
+ sal_uInt8 bStopRecur[256];
+ memset( bStopRecur, sal_False, sizeof(bStopRecur) );
// 1. Durchlauf: Styles mit Basisstyles rekursiv
for (stc=0;stc<Count();stc++)
@@ -1740,7 +1740,7 @@ void Ww1StyleSheet::Out(Ww1Shell& rOut, Ww1Manager& rMan)
for (stc=0;stc<Count();stc++){
Ww1Style& rSty = GetStyle(stc);
if ( rSty.IsUsed() ){
- USHORT nNext = rSty.GetnNext();
+ sal_uInt16 nNext = rSty.GetnNext();
if( nNext != stc && GetStyle(nNext).IsUsed() )
rOut.NextStyle( stc, nNext );
}
@@ -1748,12 +1748,12 @@ void Ww1StyleSheet::Out(Ww1Shell& rOut, Ww1Manager& rMan)
}
////////////////////////////////////////////////////////////// Picture
-static ULONG GuessPicSize(W1_PIC* pPic)
+static sal_uLong GuessPicSize(W1_PIC* pPic)
{
- USHORT maxx = pPic->mfp.xExtGet();
- USHORT padx = ((maxx + 7) / 8) * 8;
- USHORT maxy = pPic->mfp.yExtGet();
- return 120L + (ULONG)padx * maxy;
+ sal_uInt16 maxx = pPic->mfp.xExtGet();
+ sal_uInt16 padx = ((maxx + 7) / 8) * 8;
+ sal_uInt16 maxy = pPic->mfp.yExtGet();
+ return 120L + (sal_uLong)padx * maxy;
}
//
@@ -1764,30 +1764,30 @@ static ULONG GuessPicSize(W1_PIC* pPic)
void Ww1Picture::WriteBmp(SvStream& rOut)
{
long nSize = pPic->lcbGet() - (sizeof(*pPic)-sizeof(pPic->rgb));
- BYTE* p = pPic->rgbGet();
- USHORT maxx = pPic->mfp.xExtGet();
- USHORT padx = ((maxx + 7) / 8) * 8;
- USHORT maxy = pPic->mfp.yExtGet();
+ sal_uInt8* p = pPic->rgbGet();
+ sal_uInt16 maxx = pPic->mfp.xExtGet();
+ sal_uInt16 padx = ((maxx + 7) / 8) * 8;
+ sal_uInt16 maxy = pPic->mfp.yExtGet();
p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
#if OSL_DEBUG_LEVEL > 1
- USHORT x = SVBT16ToShort(p);
+ sal_uInt16 x = SVBT16ToShort(p);
(void) x;
#endif
p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
#if OSL_DEBUG_LEVEL > 1
- USHORT y = SVBT16ToShort(p);
+ sal_uInt16 y = SVBT16ToShort(p);
(void) y;
#endif
p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
#if OSL_DEBUG_LEVEL > 1
- USHORT planes = SVBT16ToShort(p);
+ sal_uInt16 planes = SVBT16ToShort(p);
(void) planes;
#endif
p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
#if OSL_DEBUG_LEVEL > 1
- USHORT bitcount = SVBT16ToShort(p);
+ sal_uInt16 bitcount = SVBT16ToShort(p);
(void) bitcount;
#endif
p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
@@ -1828,40 +1828,40 @@ void Ww1Picture::WriteBmp(SvStream& rOut)
wLong(0);
wLong(16);
wLong(16);
- USHORT i;
+ sal_uInt16 i;
for (i=0;nSize>0&&i<16;i++)
{
wByte(*p);
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
wByte(*p);
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
wByte(*p);
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
wByte(0);
}
DBG_ASSERT(padx*maxy/2==nSize, "Ww1Picture");
- USHORT j;
+ sal_uInt16 j;
#if 1
{
- BYTE* pBuf = new BYTE[padx];
+ sal_uInt8* pBuf = new sal_uInt8[padx];
for (j=0;nSize>0&&j<maxy;j++)
{
- BYTE* q = pBuf;
+ sal_uInt8* q = pBuf;
for (i=0;nSize>0&&i<maxx;i+=2)
{
*q++ = *p>>4;
*q++ = *p&0xf;
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
}
for (;i<padx;i+=2)
{
*q++ = 0;
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
}
if(rOut.Write(pBuf, padx) != padx){
delete [] pBuf;
@@ -1878,13 +1878,13 @@ void Ww1Picture::WriteBmp(SvStream& rOut)
wByte(*p>>4);
wByte(*p&0xf);
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
}
for (;i<padx;i+=2)
{
wByte(0);
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
}
}
#endif
@@ -1901,7 +1901,7 @@ error:
void Ww1Picture::Out(Ww1Shell& rOut, Ww1Manager& /*rMan*/)
{
Graphic* pGraphic = 0;
- USHORT mm;
+ sal_uInt16 mm;
switch (mm = pPic->mfp.mmGet())
{
case 8: // embedded metafile
@@ -1928,7 +1928,7 @@ void Ww1Picture::Out(Ww1Shell& rOut, Ww1Manager& /*rMan*/)
case 98: // TIFF-Name
{
String aDir( (sal_Char*)pPic->rgbGet(),
- (USHORT)(pPic->lcbGet() - (sizeof(*pPic)-sizeof(pPic->rgb))),
+ (sal_uInt16)(pPic->lcbGet() - (sizeof(*pPic)-sizeof(pPic->rgb))),
RTL_TEXTENCODING_MS_1252 );
rOut.AddGraphic( aDir );
@@ -1936,7 +1936,7 @@ void Ww1Picture::Out(Ww1Shell& rOut, Ww1Manager& /*rMan*/)
break;
case 97: // embedded bitmap
{
- ULONG nSiz = GuessPicSize(pPic);
+ sal_uLong nSiz = GuessPicSize(pPic);
SvMemoryStream aOut(nSiz, 8192);
WriteBmp(aOut);
Bitmap aBmp;
@@ -1970,8 +1970,8 @@ void Ww1HeaderFooter::Start(Ww1Shell& rOut, Ww1Manager& rMan)
break;
case OddHeadL:
{
- ULONG begin = 0;
- ULONG end = 0;
+ sal_uLong begin = 0;
+ sal_uLong end = 0;
if (FillOddHeadL(begin, end))
{
Ww1HddText* pText = new Ww1HddText(rMan.GetFib());
@@ -1991,8 +1991,8 @@ void Ww1HeaderFooter::Start(Ww1Shell& rOut, Ww1Manager& rMan)
break;
case OddFootL:
{
- ULONG begin = 0;
- ULONG end = 0;
+ sal_uLong begin = 0;
+ sal_uLong end = 0;
if (FillOddFootL(begin, end))
{
Ww1HddText* pText = new Ww1HddText(rMan.GetFib());
diff --git a/sw/source/filter/ww1/w1par.cxx b/sw/source/filter/ww1/w1par.cxx
index c90e39b173a7..0f0b1f4beaff 100644
--- a/sw/source/filter/ww1/w1par.cxx
+++ b/sw/source/filter/ww1/w1par.cxx
@@ -44,13 +44,13 @@
// Initialisieren der Feld-FilterFlags
//----------------------------------------
-static ULONG WW1_Read_FieldIniFlags()
+static sal_uLong WW1_Read_FieldIniFlags()
{
-// USHORT i;
+// sal_uInt16 i;
static const sal_Char* aNames[ 1 ] = { "WinWord/WW1F" };
sal_uInt32 aVal[ 1 ];
SwFilterOptions aOpt( 1, aNames, aVal );
- ULONG nFieldFlags = aVal[ 0 ];
+ sal_uLong nFieldFlags = aVal[ 0 ];
if ( SwFltGetFlag( nFieldFlags, SwFltControlStack::HYPO ) )
{
@@ -70,17 +70,17 @@ static ULONG WW1_Read_FieldIniFlags()
// Diese werden dann einfach per Pipe 'uebertragen'.
//
-ULONG WW1Reader::Read(SwDoc& rDoc, const String& rBaseURL, SwPaM& rPam, const String& /*cName*/)
+sal_uLong WW1Reader::Read(SwDoc& rDoc, const String& rBaseURL, SwPaM& rPam, const String& /*cName*/)
{
- ULONG nRet = ERR_SWG_READ_ERROR;
+ sal_uLong nRet = ERR_SWG_READ_ERROR;
OSL_ENSURE(pStrm!=NULL, "W1-Read ohne Stream");
if (pStrm != NULL)
{
- BOOL bNew = !bInsertMode; // Neues Doc ( kein Einfuegen )
+ sal_Bool bNew = !bInsertMode; // Neues Doc ( kein Einfuegen )
// erstmal eine shell konstruieren: die ist schnittstelle
// zum writer-dokument
- ULONG nFieldFlags = WW1_Read_FieldIniFlags();
+ sal_uLong nFieldFlags = WW1_Read_FieldIniFlags();
Ww1Shell* pRdr = new Ww1Shell( rDoc, rPam, rBaseURL, bNew, nFieldFlags );
if( pRdr )
{
@@ -130,7 +130,7 @@ ULONG WW1Reader::Read(SwDoc& rDoc, const String& rBaseURL, SwPaM& rPam, const St
// in einen Stream werden alle Informationen, die aus der Datei
// gelesen werden, in die shell ge'piped'.
//
-Ww1Shell::Ww1Shell( SwDoc& rD, SwPaM& rPam, const String& rBaseURL, BOOL bNew, ULONG nFieldFlags)
+Ww1Shell::Ww1Shell( SwDoc& rD, SwPaM& rPam, const String& rBaseURL, sal_Bool bNew, sal_uLong nFieldFlags)
: SwFltShell(&rD, rPam, rBaseURL, bNew, nFieldFlags)
{
}
diff --git a/sw/source/filter/ww1/w1par.hxx b/sw/source/filter/ww1/w1par.hxx
index 01f5d66a7d97..33c4c14b78dd 100644
--- a/sw/source/filter/ww1/w1par.hxx
+++ b/sw/source/filter/ww1/w1par.hxx
@@ -36,7 +36,7 @@
class Ww1Shell : public SwFltShell
{
public:
- Ww1Shell(SwDoc&, SwPaM&, const String& rBaseURL, BOOL bNew, ULONG nFieldFlags);
+ Ww1Shell(SwDoc&, SwPaM&, const String& rBaseURL, sal_Bool bNew, sal_uLong nFieldFlags);
};
diff --git a/sw/source/filter/ww1/w1sprm.cxx b/sw/source/filter/ww1/w1sprm.cxx
index 88a22c97a2c8..584ca7a73291 100644
--- a/sw/source/filter/ww1/w1sprm.cxx
+++ b/sw/source/filter/ww1/w1sprm.cxx
@@ -66,20 +66,20 @@ void Ww1Sprm::Stop( Ww1Shell& rOut, Ww1Manager& rMan)
{
if(IsUsed())
for(short i=Count()-1;i>=0;i--){ // rueckwaerts
- BYTE nId;
- USHORT nSize;
- BYTE* pSprm;
+ sal_uInt8 nId;
+ sal_uInt16 nSize;
+ sal_uInt8* pSprm;
Fill(i, nId, nSize, pSprm);
GetTab(nId).Stop(rOut, nId, pSprm, nSize, rMan);
}
}
void Ww1Sprm::Start(
- Ww1Shell& rOut, Ww1Manager& rMan, USHORT i)
+ Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 i)
{
- BYTE nId;
- USHORT nSize;
- BYTE* pSprm;
+ sal_uInt8 nId;
+ sal_uInt16 nSize;
+ sal_uInt8* pSprm;
Fill(i, nId, nSize, pSprm);
GetTab(nId).Start(rOut, nId, pSprm, nSize, rMan);
}
@@ -88,18 +88,18 @@ void Ww1Sprm::Start(
Ww1Shell& rOut, Ww1Manager& rMan)
{
if(IsUsed())
- for(USHORT i=0;i<Count();i++)
+ for(sal_uInt16 i=0;i<Count();i++)
Start(rOut, rMan, i);
}
//////////////////////////////////////////////////////////// SingleSprm
void Ww1SingleSprm::Start(
- Ww1Shell&, BYTE /*nId*/, BYTE*, USHORT, Ww1Manager&)
+ Ww1Shell&, sal_uInt8 /*nId*/, sal_uInt8*, sal_uInt16, Ww1Manager&)
{
}
void Ww1SingleSprm::Stop(
- Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&)
+ Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&)
{
// OSL_ENSURE(FALSE, "Unknown Sprm");
}
@@ -112,11 +112,11 @@ void Ww1SingleSprm::Stop(
//
#define STOP1(Class, Code) \
void Class::Stop( \
- Ww1Shell& rOut, BYTE, BYTE*, USHORT, Ww1Manager&) { \
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&) { \
rOut.EndItem(Code); }
#define STOP2(Class, Code1, Code2) \
void Class::Stop( \
- Ww1Shell& rOut, BYTE, BYTE*, USHORT, Ww1Manager&) { \
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&) { \
rOut.EndItem(Code1).EndItem(Code2); }
/////////////////////////////////////////////////////// SingleSprmXxxxx
@@ -128,7 +128,7 @@ void Ww1SingleSprm::Stop(
// virtualen methoden bei beginn und ende der formatierung gerufen.
//
void Ww1SingleSprmPDxaLeft::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
SvxLRSpaceItem aLR((SvxLRSpaceItem&)rOut.GetAttr(RES_LR_SPACE));
short nPara = SVBT16ToShort(pSprm);
@@ -141,7 +141,7 @@ void Ww1SingleSprmPDxaLeft::Start(
}
void Ww1SingleSprmPDxaRight::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
SvxLRSpaceItem aLR((SvxLRSpaceItem&)rOut.GetAttr(RES_LR_SPACE));
short nPara = SVBT16ToShort(pSprm);
@@ -152,7 +152,7 @@ void Ww1SingleSprmPDxaRight::Start(
}
void Ww1SingleSprmPDxaLeft1::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
SvxLRSpaceItem aLR((SvxLRSpaceItem&)rOut.GetAttr(RES_LR_SPACE));
short nPara = SVBT16ToShort(pSprm);
@@ -165,14 +165,14 @@ void Ww1SingleSprmPDxaLeft1::Start(
STOP1(Ww1SingleSprmPDxa, RES_LR_SPACE)
void Ww1SingleSprmPJc::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
static SvxAdjust const aAdj[] = {
SVX_ADJUST_LEFT,
SVX_ADJUST_CENTER,
SVX_ADJUST_RIGHT,
SVX_ADJUST_BLOCK };
- BYTE nPara = SVBT8ToByte(pSprm);
+ sal_uInt8 nPara = SVBT8ToByte(pSprm);
nPara %=(sizeof(aAdj)/sizeof(*aAdj));
rOut << SvxAdjustItem(aAdj[nPara], RES_PARATR_ADJUST);
}
@@ -180,7 +180,7 @@ void Ww1SingleSprmPJc::Start(
STOP1(Ww1SingleSprmPJc, RES_PARATR_ADJUST)
void Ww1SingleSprmPFKeep::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
rOut << SvxFmtSplitItem((SVBT8ToByte(pSprm) & 1) == 0, RES_PARATR_SPLIT);
}
@@ -188,7 +188,7 @@ void Ww1SingleSprmPFKeep::Start(
STOP1(Ww1SingleSprmPFKeep, RES_PARATR_SPLIT)
void Ww1SingleSprmPFKeepFollow::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
rOut << SvxFmtKeepItem((SVBT8ToByte(pSprm) & 1) != 0, RES_KEEP);
}
@@ -196,7 +196,7 @@ void Ww1SingleSprmPFKeepFollow::Start(
STOP1(Ww1SingleSprmPFKeepFollow, RES_KEEP)
void Ww1SingleSprmPPageBreakBefore::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
rOut << SvxFmtBreakItem(SVBT8ToByte(pSprm) & 1?
SVX_BREAK_PAGE_BEFORE:SVX_BREAK_NONE, RES_BREAK );
@@ -206,13 +206,13 @@ STOP1(Ww1SingleSprmPPageBreakBefore, RES_BREAK)
SvxBorderLine* Ww1SingleSprmPBrc::SetBorder(SvxBorderLine* pLine, W1_BRC10* pBrc)
{
- USHORT nCode;
+ sal_uInt16 nCode;
SvxBorderStyle eStyle = SOLID;
if(pBrc->dxpLine2WidthGet() == 0)
{
switch(pBrc->dxpLine1WidthGet())
{
- default: OSL_ENSURE(FALSE, "unknown linewidth");
+ default: OSL_ENSURE(sal_False, "unknown linewidth");
case 0: return 0; // keine Linie
case 1: nCode = DEF_LINE_WIDTH_0; break;
case 2: nCode = DEF_LINE_WIDTH_1; break;
@@ -236,20 +236,20 @@ SvxBorderLine* Ww1SingleSprmPBrc::SetBorder(SvxBorderLine* pLine, W1_BRC10* pBrc
{
switch(pBrc->dxpLine1WidthGet())
{
- default: OSL_ENSURE(FALSE, "unknown linewidth");
+ default: OSL_ENSURE(sal_False, "unknown linewidth");
case 1: nCode = DEF_DOUBLE_LINE0_IN; break;
}
pLine->SetOutWidth(nCode);
switch(pBrc->dxpLine2WidthGet())
{
- default: OSL_ENSURE(FALSE, "unknown linewidth");
+ default: OSL_ENSURE(sal_False, "unknown linewidth");
case 1: nCode = DEF_DOUBLE_LINE0_OUT; break;
}
pLine->SetInWidth(nCode);
}
switch(pBrc->dxpLine1WidthGet())
{
- default: OSL_ENSURE(FALSE, "unknown space");
+ default: OSL_ENSURE(sal_False, "unknown space");
case 0: nCode = DEF_DOUBLE_LINE0_DIST; break;
case 1: nCode = DEF_DOUBLE_LINE1_DIST; break;
case 2: nCode = DEF_DOUBLE_LINE2_DIST; break;
@@ -260,9 +260,9 @@ SvxBorderLine* Ww1SingleSprmPBrc::SetBorder(SvxBorderLine* pLine, W1_BRC10* pBrc
}
void Ww1SingleSprmPBrc::Start(
- Ww1Shell& rOut, BYTE,
+ Ww1Shell& rOut, sal_uInt8,
W1_BRC10* pBrc,
- USHORT
+ sal_uInt16
#if OSL_DEBUG_LEVEL > 1
nSize
#endif
@@ -296,11 +296,11 @@ void Ww1SingleSprmPBrc::Start(
STOP2(Ww1SingleSprmPBrc, RES_BOX, RES_SHADOW)
-static USHORT const nBrcTrans[BRC_ANZ] =
+static sal_uInt16 nBrcTrans[BRC_ANZ] =
{ BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT };
void Ww1SingleSprmPBrc10::Start(
- Ww1Shell& rOut, BYTE nId, BYTE* pSprm, USHORT nSize, Ww1Manager& rMan)
+ Ww1Shell& rOut, sal_uInt8 nId, sal_uInt8* pSprm, sal_uInt16 nSize, Ww1Manager& rMan)
{
W1_BRC10* pBrc =(W1_BRC10*)pSprm;
@@ -316,7 +316,7 @@ void Ww1SingleSprmPBrc10::Start(
STOP1(Ww1SingleSprmParaSpace, RES_UL_SPACE)
void Ww1SingleSprmPDyaBefore::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nPara = SVBT16ToShort(pSprm);
if(nPara < 0)
@@ -327,7 +327,7 @@ void Ww1SingleSprmPDyaBefore::Start(
}
void Ww1SingleSprmPDyaAfter::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nPara = SVBT16ToShort(pSprm);
if(nPara < 0)
@@ -340,39 +340,39 @@ void Ww1SingleSprmPDyaAfter::Start(
STOP1(Ww1SingleSprmPDyaLine, RES_PARATR_LINESPACING)
void Ww1SingleSprmPDyaLine::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nSpace = SVBT16ToShort(pSprm);
if(nSpace < 0)
nSpace = -nSpace;
SvxLineSpacingItem aLSpc( LINE_SPACE_DEFAULT_HEIGHT, RES_PARATR_LINESPACING );
- if(TRUE)
+ if(sal_True)
{// MultilineSpace(proportional)
long n = nSpace * 100 / 240; // W1: 240 = 100%, SW: 100 = 100%
if(n>200)
n = 200; // SW_UI-Maximum
aLSpc.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
- aLSpc.SetPropLineSpace((BYTE)n);
+ aLSpc.SetPropLineSpace((sal_uInt8)n);
}
else
{// Fixed / Minimum
- aLSpc.SetLineHeight((USHORT)nSpace);
+ aLSpc.SetLineHeight((sal_uInt16)nSpace);
aLSpc.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF;
}
rOut << aLSpc;
}
void Ww1SingleSprmPChgTabsPapx::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nLeftPMgn = 0; // Koordinaten etwa gleich ??
short i;
- BYTE nDel = pSprm[1];
- BYTE* pDel = pSprm + 2; // Del - Array
- BYTE nIns = pSprm[nDel*2+2];
- BYTE* pIns = pSprm + 2*nDel + 3; // Ins - Array
+ sal_uInt8 nDel = pSprm[1];
+ sal_uInt8* pDel = pSprm + 2; // Del - Array
+ sal_uInt8 nIns = pSprm[nDel*2+2];
+ sal_uInt8* pIns = pSprm + 2*nDel + 3; // Ins - Array
W1_TBD* pTyp = (W1_TBD*)(pSprm + 2*nDel + 2*nIns + 3);// Typ - Array
SvxTabStopItem aAttr( (SvxTabStopItem&)rOut.GetNodeOrStyAttr( RES_PARATR_TABSTOP ));
@@ -380,7 +380,7 @@ void Ww1SingleSprmPChgTabsPapx::Start(
SvxTabStop aTabStop;
for( i=0; i<nDel; i++ ){
- USHORT nPos = aAttr.GetPos( SVBT16ToShort( pDel + i*2 ) - nLeftPMgn );
+ sal_uInt16 nPos = aAttr.GetPos( SVBT16ToShort( pDel + i*2 ) - nLeftPMgn );
if( nPos != SVX_TAB_NOTFOUND )
aAttr.Remove( nPos, 1 );
}
@@ -406,7 +406,7 @@ void Ww1SingleSprmPChgTabsPapx::Start(
case 4: aTabStop.GetFill() = '_'; break;
}
- USHORT nPos2 = aAttr.GetPos( nPos );
+ sal_uInt16 nPos2 = aAttr.GetPos( nPos );
if( nPos2 != SVX_TAB_NOTFOUND )
aAttr.Remove( nPos2, 1 ); // sonst weigert sich das Insert()
@@ -418,13 +418,13 @@ void Ww1SingleSprmPChgTabsPapx::Start(
STOP1(Ww1SingleSprmPChgTabsPapx, RES_PARATR_TABSTOP)
void Ww1SingleSprmSGprfIhdt::Start(
- Ww1Shell& /*rOut*/, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& rMan)
+ Ww1Shell& /*rOut*/, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& rMan)
{
rMan.GetSep().SetGrpfIhdt(SVBT8ToByte(pSprm));
}
void Ww1SingleSprmSColumns::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nColSpace = 708; // default 1,25 cm
short nNettoWidth = -1; //~ mdt: dxaLeft/Right missing...
@@ -438,22 +438,22 @@ void Ww1SingleSprmSColumns::Start(
}
void Ww1SingleSprmPTtp::Start(
- Ww1Shell& /*rOut*/, BYTE, BYTE*, USHORT, Ww1Manager& rMan)
+ Ww1Shell& /*rOut*/, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager& rMan)
{
- rMan.SetInTtp( TRUE ); // Besonderheit: wird bei InTable::Stop und
+ rMan.SetInTtp( sal_True ); // Besonderheit: wird bei InTable::Stop und
// nicht bei InTtp::Stop zurueckgesetzt,
// da Auswertung in InTable
}
void Ww1SingleSprmPTtp::Stop(
- Ww1Shell& rOut, BYTE, BYTE*, USHORT, Ww1Manager& rMan)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager& rMan)
{
if (rOut.IsInTable() && rMan.HasInTable())
rOut.NextTableRow();
}
void Ww1SingleSprmPFInTable::Start(
- Ww1Shell& /*rOut*/, BYTE, BYTE*, USHORT,
+ Ww1Shell& /*rOut*/, sal_uInt8, sal_uInt8*, sal_uInt16,
Ww1Manager& /*rMan*/)
{
}
@@ -464,28 +464,27 @@ void Ww1SingleSprmPFInTable::Stop(
rOut
#endif
,
- BYTE, BYTE*, USHORT,
+ sal_uInt8, sal_uInt8*, sal_uInt16,
Ww1Manager& rMan)
{
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE(rOut.IsInTable(), "");
#endif
- rMan.SetInTtp( FALSE );
}
void Ww1SingleSprmTDxaGapHalf::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nSpace = SVBT16ToShort(pSprm);
rOut.SetCellSpace(nSpace);
}
void Ww1SingleSprmTDefTable10::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT nSize, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 nSize, Ww1Manager& /*rMan*/)
{
- USHORT i;
- BYTE *p = pSprm + 2; // LaengenWord ueberlesen
- BYTE nCount = *p;
+ sal_uInt16 i;
+ sal_uInt8 *p = pSprm + 2; // LaengenWord ueberlesen
+ sal_uInt8 nCount = *p;
p++;
nSize -= 3;
// Es fehlt noch:
@@ -500,7 +499,7 @@ void Ww1SingleSprmTDefTable10::Start(
{
short nWholeWidth = SVBT16ToShort( p + 2 * nCount ) - nPos;
- rOut.SetTableWidth( (USHORT)nWholeWidth ); // Tabellenbreite setzen
+ rOut.SetTableWidth( (sal_uInt16)nWholeWidth ); // Tabellenbreite setzen
// Pos der Tabelle setzen
long nMidTab = nPos + nWholeWidth / 2; // TabellenMitte
@@ -521,17 +520,17 @@ void Ww1SingleSprmTDefTable10::Start(
rOut.SetTableOrient( eOri );
}
- BYTE* pEndPos = p+2;
- BYTE* pTc0 = ( nSize >= nCount * 10 ) ? pEndPos + 2 * nCount : 0;
- USHORT nCellsDeleted = 0; // fuer gemergte Zellen
+ sal_uInt8* pEndPos = p+2;
+ sal_uInt8* pTc0 = ( nSize >= nCount * 10 ) ? pEndPos + 2 * nCount : 0;
+ sal_uInt16 nCellsDeleted = 0; // fuer gemergte Zellen
for( i = 0; i < nCount; i++ ){
// Info sammeln
W1_TC* pTc = (W1_TC*)pTc0;
- BOOL bMerged = (pTc) ? pTc->fMergedGet() : FALSE;
+ sal_Bool bMerged = (pTc) ? pTc->fMergedGet() : sal_False;
// Zellenbreiten setzen
- USHORT nPos1 = SVBT16ToShort( pEndPos );
+ sal_uInt16 nPos1 = SVBT16ToShort( pEndPos );
if( !bMerged )
rOut.SetCellWidth( nPos1 - nPos, i - nCellsDeleted );
// Zellenbreite setzen
@@ -542,13 +541,13 @@ void Ww1SingleSprmTDefTable10::Start(
if( pTc0 ){ // gibts TCs ueberhaupt ?
W1_TC* pTc2 = (W1_TC*)pTc0;
- BOOL bMerged2 = pTc2->fMergedGet();
+ sal_Bool bMerged2 = pTc2->fMergedGet();
if( !bMerged2 ){
// und nun die Umrandungen
SvxBoxItem aBox( (SvxBoxItem&)rOut.GetCellAttr( RES_BOX ));
SvxBorderLine aLine;
W1_BRC10* pBrc = pTc2->rgbrcGet();
- for( USHORT j=0; j<4; j++ ){
+ for( sal_uInt16 j=0; j<4; j++ ){
aBox.SetLine(Ww1SingleSprmPBrc::SetBorder(&aLine, pBrc),
nBrcTrans[j]);
pBrc++;
@@ -566,7 +565,7 @@ void Ww1SingleSprmTDefTable10::Start(
void Ww1SingleSprmTDyaRowHeight::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nSpace = SVBT16ToShort(pSprm);
rOut.SetCellHeight(nSpace);
@@ -575,9 +574,9 @@ void Ww1SingleSprmTDyaRowHeight::Start(
// Fastsave-Attribute brauche ich als Dymmys nicht
void Ww1SingleSprmPpc::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& rMan)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& rMan)
{
- BYTE nPpc = SVBT8ToByte(pSprm);
+ sal_uInt8 nPpc = SVBT8ToByte(pSprm);
if (rOut.IsInTable()) // Flys in Tabellen kann PMW
return; // nicht
@@ -602,7 +601,7 @@ void Ww1SingleSprmPpc::Start(
}
void Ww1SingleSprmPDxaAbs::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& rMan)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& rMan)
{
short nXPos = SVBT16ToShort(pSprm);
@@ -627,7 +626,7 @@ void Ww1SingleSprmPDxaAbs::Start(
}
void Ww1SingleSprmPDyaAbs::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nYPos = SVBT16ToShort(pSprm);
sal_Int16 eVRel = text::RelOrientation::FRAME;
@@ -643,14 +642,14 @@ void Ww1SingleSprmPDyaAbs::Start(
}
void Ww1SingleSprmPDxaWidth::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nDxaWidth = SVBT16ToShort(pSprm);
rOut.SetFlyFrmAttr( SwFmtFrmSize( ATT_VAR_SIZE, nDxaWidth, MINFLY ) );
}
void Ww1SingleSprmPFromText::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
if( rOut.IsInFly() ){ // Kommt auch ausserhalb eines Flys vor, hat
// dann aber offensichtlich nichts zu bedeuten.
diff --git a/sw/source/filter/ww1/w1struct.hxx b/sw/source/filter/ww1/w1struct.hxx
index 0cc2d7cf8c62..d3560288caf5 100644
--- a/sw/source/filter/ww1/w1struct.hxx
+++ b/sw/source/filter/ww1/w1struct.hxx
@@ -39,343 +39,343 @@ class Ww1Manager;
struct W1_FIB /////////////////////////////////////////////////////////
{
SVBT16 wIdent;// 0x0 int magic number
- USHORT wIdentGet() {
+ sal_uInt16 wIdentGet() {
return SVBT16ToShort(wIdent); }
SVBT16 nFib;// 0x2 FIB version written
- USHORT nFibGet() {
+ sal_uInt16 nFibGet() {
return SVBT16ToShort(nFib); }
SVBT16 nProduct;// 0x4 product version written by
- USHORT nProductGet() {
+ sal_uInt16 nProductGet() {
return SVBT16ToShort(nProduct); }
SVBT16 nlocale;// 0x6 language stamp---localized version;
- USHORT nlocaleGet() {
+ sal_uInt16 nlocaleGet() {
return SVBT16ToShort(nlocale); }
SVBT16 pnNext;// 0x8
- USHORT pnNextGet() {
+ sal_uInt16 pnNextGet() {
return SVBT16ToShort(pnNext); }
SVBT16 fFlags;
- USHORT fFlagsGet() {
+ sal_uInt16 fFlagsGet() {
return SVBT16ToShort(fFlags); }
// SVBT16 fDot :1;// 0xa 0001
- BOOL fDotGet() {
+ sal_Bool fDotGet() {
return 0 != ((fFlagsGet() >> 0) & 1); }
// SVBT16 fGlsy :1;// 0002
- BOOL fGlsyGet() {
+ sal_Bool fGlsyGet() {
return 0 != ((fFlagsGet() >> 1) & 1); }
// SVBT16 fComplex :1;// 0004 when 1, file is in complex, fast-saved format.
- BOOL fComplexGet() {
+ sal_Bool fComplexGet() {
return 0 != ((fFlagsGet() >> 2) & 1); }
// SVBT16 fHasPic :1;// 0008 file contains 1 or more pictures
- BOOL fHasPicGet() {
+ sal_Bool fHasPicGet() {
return 0 != ((fFlagsGet() >> 3) & 1); }
// SVBT16 cQuickSaves :4;// 00F0 count of times file was quicksaved
- USHORT cQuickSavesGet() {
- return (USHORT)((fFlagsGet() >> 4) & 0xf); }
+ sal_uInt16 cQuickSavesGet() {
+ return (sal_uInt16)((fFlagsGet() >> 4) & 0xf); }
// SVBT16 u1 :8;// FF00 unused
- USHORT u1Get() {
- return (USHORT)((fFlagsGet() >> 8) & 0xff); }
+ sal_uInt16 u1Get() {
+ return (sal_uInt16)((fFlagsGet() >> 8) & 0xff); }
SVBT16 nFibBack;// 0xc
- USHORT nFibBackGet() {
+ sal_uInt16 nFibBackGet() {
return SVBT16ToShort(nFibBack); }
SVBT16 u2[5];// 0xe reserved
SVBT32 fcMin;// 0x18 file offset of first character of text
- ULONG fcMinGet() {
+ sal_uLong fcMinGet() {
return SVBT32ToUInt32(fcMin); }
SVBT32 fcMac;// 0x1c file offset of last character of text + 1
- ULONG fcMacGet() {
+ sal_uLong fcMacGet() {
return SVBT32ToUInt32(fcMac); }
SVBT32 cbMac;// 0x20 file offset of last byte written to file + 1.
- ULONG cbMacGet() {
+ sal_uLong cbMacGet() {
return SVBT32ToUInt32(cbMac); }
SVBT32 u4[4];// 0x24 reserved
SVBT32 ccpText;// 0x34 length of main document text stream
- ULONG ccpTextGet() {
+ sal_uLong ccpTextGet() {
return SVBT32ToUInt32(ccpText); }
SVBT32 ccpFtn;// 0x38 length of footnote subdocument text stream
- ULONG ccpFtnGet() {
+ sal_uLong ccpFtnGet() {
return SVBT32ToUInt32(ccpFtn); }
SVBT32 ccpHdd;// 0x3c length of header subdocument text stream
- ULONG ccpHddGet() {
+ sal_uLong ccpHddGet() {
return SVBT32ToUInt32(ccpHdd); }
SVBT32 ccpMcr;// 0x40 length of macro subdocument text stream
- ULONG ccpMcrGet() {
+ sal_uLong ccpMcrGet() {
return SVBT32ToUInt32(ccpMcr); }
SVBT32 ccpAtn;// 0x44 length of annotation subdocument text stream
- ULONG ccpAtnGet() {
+ sal_uLong ccpAtnGet() {
return SVBT32ToUInt32(ccpAtn); }
SVBT32 cp5[4];// 0x48
SVBT32 fcStshfOrig;// 0x58 file offset of original allocation for STSH in file
- ULONG fcStshfOrigGet() {
+ sal_uLong fcStshfOrigGet() {
return SVBT32ToUInt32(fcStshfOrig); }
SVBT16 cbStshfOrig;// 0x5c count of bytes of original STSH allocation
- USHORT cbStshfOrigGet() {
+ sal_uInt16 cbStshfOrigGet() {
return SVBT16ToShort(cbStshfOrig); }
SVBT32 fcStshf;// 0x5e file offset of STSH in file.
- ULONG fcStshfGet() {
+ sal_uLong fcStshfGet() {
return SVBT32ToUInt32(fcStshf); }
SVBT16 cbStshf;// 0x62 count of bytes of current STSH allocation
- USHORT cbStshfGet() {
+ sal_uInt16 cbStshfGet() {
return SVBT16ToShort(cbStshf); }
SVBT32 fcPlcffndRef;// 0x64 file offset of footnote reference PLC.
- ULONG fcPlcffndRefGet() {
+ sal_uLong fcPlcffndRefGet() {
return SVBT32ToUInt32(fcPlcffndRef); }
SVBT16 cbPlcffndRef;// 0x68 count of bytes of footnote reference PLC
- USHORT cbPlcffndRefGet() {
+ sal_uInt16 cbPlcffndRefGet() {
return SVBT16ToShort(cbPlcffndRef); }
// == 0 if no footnotes defined in document.
SVBT32 fcPlcffndTxt;// 0x6a file offset of footnote text PLC.
- ULONG fcPlcffndTxtGet() {
+ sal_uLong fcPlcffndTxtGet() {
return SVBT32ToUInt32(fcPlcffndTxt); }
SVBT16 cbPlcffndTxt;// 0x6e count of bytes of footnote text PLC.
- USHORT cbPlcffndTxtGet() {
+ sal_uInt16 cbPlcffndTxtGet() {
return SVBT16ToShort(cbPlcffndTxt); }
// == 0 if no footnotes defined in document
SVBT32 fcPlcfandRef;// 0x70 file offset of annotation reference PLC.
- ULONG fcPlcfandRefGet() {
+ sal_uLong fcPlcfandRefGet() {
return SVBT32ToUInt32(fcPlcfandRef); }
SVBT16 cbPlcfandRef;// 0x74 count of bytes of annotation reference PLC.
- USHORT cbPlcfandRefGet() {
+ sal_uInt16 cbPlcfandRefGet() {
return SVBT16ToShort(cbPlcfandRef); }
SVBT32 fcPlcfandTxt;// 0x76 file offset of annotation text PLC.
- ULONG fcPlcfandTxtGet() {
+ sal_uLong fcPlcfandTxtGet() {
return SVBT32ToUInt32(fcPlcfandTxt); }
SVBT16 cbPlcfandTxt;// 0x7a count of bytes of the annotation text PLC
- USHORT cbPlcfandTxtGet() {
+ sal_uInt16 cbPlcfandTxtGet() {
return SVBT16ToShort(cbPlcfandTxt); }
SVBT32 fcPlcfsed;// 8x7c file offset of section descriptor PLC.
- ULONG fcPlcfsedGet() {
+ sal_uLong fcPlcfsedGet() {
return SVBT32ToUInt32(fcPlcfsed); }
SVBT16 cbPlcfsed;// 0x80 count of bytes of section descriptor PLC.
- USHORT cbPlcfsedGet() {
+ sal_uInt16 cbPlcfsedGet() {
return SVBT16ToShort(cbPlcfsed); }
SVBT32 fcPlcfpgd;// 0x82 file offset of paragraph descriptor PLC
- ULONG fcPlcfpgdGet() {
+ sal_uLong fcPlcfpgdGet() {
return SVBT32ToUInt32(fcPlcfpgd); }
SVBT16 cbPlcfpgd;// 0x86 count of bytes of paragraph descriptor PLC.
- USHORT cbPlcfpgdGet() {
+ sal_uInt16 cbPlcfpgdGet() {
return SVBT16ToShort(cbPlcfpgd); }
// ==0 if file was never repaginated
// Should not be written by third party creators
SVBT32 fcPlcfphe;// 0x88 file offset of PLC of paragraph heights.
- ULONG fcPlcfpheGet() {
+ sal_uLong fcPlcfpheGet() {
return SVBT32ToUInt32(fcPlcfphe); }
SVBT16 cbPlcfphe;// 0x8c count of bytes of paragraph height PLC.
- USHORT cbPlcfpheGet() {
+ sal_uInt16 cbPlcfpheGet() {
return SVBT16ToShort(cbPlcfphe); }
// ==0 when file is non-complex.
SVBT32 fcSttbfglsy;// 0x8e file offset of glossary string table.
- ULONG fcSttbfglsyGet() {
+ sal_uLong fcSttbfglsyGet() {
return SVBT32ToUInt32(fcSttbfglsy); }
SVBT16 cbSttbfglsy;// 0x92 count of bytes of glossary string table.
- USHORT cbSttbfglsyGet() {
+ sal_uInt16 cbSttbfglsyGet() {
return SVBT16ToShort(cbSttbfglsy); }
// == 0 for non-glossary documents.
// !=0 for glossary documents.
SVBT32 fcPlcfglsy;// 0x94 file offset of glossary PLC.
- ULONG fcPlcfglsyGet() {
+ sal_uLong fcPlcfglsyGet() {
return SVBT32ToUInt32(fcPlcfglsy); }
SVBT16 cbPlcfglsy;// 0x98 count of bytes of glossary PLC.
- USHORT cbPlcfglsyGet() {
+ sal_uInt16 cbPlcfglsyGet() {
return SVBT16ToShort(cbPlcfglsy); }
// == 0 for non-glossary documents.
// !=0 for glossary documents.
SVBT32 fcPlcfhdd;// 0x9a byte offset of header PLC.
- ULONG fcPlcfhddGet() {
+ sal_uLong fcPlcfhddGet() {
return SVBT32ToUInt32(fcPlcfhdd); }
SVBT16 cbPlcfhdd;// 0x9e count of bytes of header PLC.
- USHORT cbPlcfhddGet() {
+ sal_uInt16 cbPlcfhddGet() {
return SVBT16ToShort(cbPlcfhdd); }
// == 0 if document contains no headers
SVBT32 fcPlcfbteChpx;// 0xa0 file offset of character property bin table.PLC.
- ULONG fcPlcfbteChpxGet() {
+ sal_uLong fcPlcfbteChpxGet() {
return SVBT32ToUInt32(fcPlcfbteChpx); }
SVBT16 cbPlcfbteChpx;// 0xa4 count of bytes of character property bin table PLC.
- USHORT cbPlcfbteChpxGet() {
+ sal_uInt16 cbPlcfbteChpxGet() {
return SVBT16ToShort(cbPlcfbteChpx); }
SVBT32 fcPlcfbtePapx;// 0xa6 file offset of paragraph property bin table.PLC.
- ULONG fcPlcfbtePapxGet() {
+ sal_uLong fcPlcfbtePapxGet() {
return SVBT32ToUInt32(fcPlcfbtePapx); }
SVBT16 cbPlcfbtePapx;// 0xaa count of bytes of paragraph property bin table PLC.
- USHORT cbPlcfbtePapxGet() {
+ sal_uInt16 cbPlcfbtePapxGet() {
return SVBT16ToShort(cbPlcfbtePapx); }
SVBT32 fcPlcfsea;// 0xac file offset of PLC reserved for private use. The SEA is 6 bytes long.
- ULONG fcPlcfseaGet() {
+ sal_uLong fcPlcfseaGet() {
return SVBT32ToUInt32(fcPlcfsea); }
SVBT16 cbPlcfsea;// 0xb0 count of bytes of private use PLC.
- USHORT cbPlcfseaGet() {
+ sal_uInt16 cbPlcfseaGet() {
return SVBT16ToShort(cbPlcfsea); }
SVBT32 fcSttbfffn;// 0xb2 file offset of font information STTBF. See the FFN file structure definition.
- ULONG fcSttbfffnGet() {
+ sal_uLong fcSttbfffnGet() {
return SVBT32ToUInt32(fcSttbfffn); }
SVBT16 cbSttbfffn;// 0xb6 count of bytes in sttbfffn.
- USHORT cbSttbfffnGet() {
+ sal_uInt16 cbSttbfffnGet() {
return SVBT16ToShort(cbSttbfffn); }
SVBT32 fcPlcffldMom;// 0xb8 offset in doc stream to the PLC of field positions in the main document.
- ULONG fcPlcffldMomGet() {
+ sal_uLong fcPlcffldMomGet() {
return SVBT32ToUInt32(fcPlcffldMom); }
SVBT16 cbPlcffldMom;// 0xbc
- USHORT cbPlcffldMomGet() {
+ sal_uInt16 cbPlcffldMomGet() {
return SVBT16ToShort(cbPlcffldMom); }
SVBT32 fcPlcffldHdr;// 0xbe offset in doc stream to the PLC of field positions in the header subdocument.
- ULONG fcPlcffldHdrGet() {
+ sal_uLong fcPlcffldHdrGet() {
return SVBT32ToUInt32(fcPlcffldHdr); }
SVBT16 cbPlcffldHdr;// 0xc2
- USHORT cbPlcffldHdrGet() {
+ sal_uInt16 cbPlcffldHdrGet() {
return SVBT16ToShort(cbPlcffldHdr); }
SVBT32 fcPlcffldFtn;// 0xc4 offset in doc stream to the PLC of field positions in the footnote subdocument.
- ULONG fcPlcffldFtnGet() {
+ sal_uLong fcPlcffldFtnGet() {
return SVBT32ToUInt32(fcPlcffldFtn); }
SVBT16 cbPlcffldFtn;// 0xc8
- USHORT cbPlcffldFtnGet() {
+ sal_uInt16 cbPlcffldFtnGet() {
return SVBT16ToShort(cbPlcffldFtn); }
SVBT32 fcPlcffldAtn;// 0xca offset in doc stream to the PLC of field positions in the annotation subdocument.
- ULONG fcPlcffldAtnGet() {
+ sal_uLong fcPlcffldAtnGet() {
return SVBT32ToUInt32(fcPlcffldAtn); }
SVBT16 cbPlcffldAtn;// 0xce
- USHORT cbPlcffldAtnGet() {
+ sal_uInt16 cbPlcffldAtnGet() {
return SVBT16ToShort(cbPlcffldAtn); }
SVBT32 fcPlcffldMcr;// 0xd0 offset in doc stream to the PLC of field positions in the macro subdocument.
- ULONG fcPlcffldMcrGet() {
+ sal_uLong fcPlcffldMcrGet() {
return SVBT32ToUInt32(fcPlcffldMcr); }
SVBT16 cbPlcffldMcr;// 0xd4
- USHORT cbPlcffldMcrGet() {
+ sal_uInt16 cbPlcffldMcrGet() {
return SVBT16ToShort(cbPlcffldMcr); }
SVBT32 fcSttbfbkmk;// 0xd6 offset in document stream of the STTBF that records bookmark names in the main document
- ULONG fcSttbfbkmkGet() {
+ sal_uLong fcSttbfbkmkGet() {
return SVBT32ToUInt32(fcSttbfbkmk); }
SVBT16 cbSttbfbkmk;// 0xda
- USHORT cbSttbfbkmkGet() {
+ sal_uInt16 cbSttbfbkmkGet() {
return SVBT16ToShort(cbSttbfbkmk); }
SVBT32 fcPlcfbkf;// 0xdc offset in document stream of the PLCF that records the beginning CP offsets of bookmarks in the main document. See BKF
- ULONG fcPlcfbkfGet() {
+ sal_uLong fcPlcfbkfGet() {
return SVBT32ToUInt32(fcPlcfbkf); }
SVBT16 cbPlcfbkf;// 0xe0
- USHORT cbPlcfbkfGet() {
+ sal_uInt16 cbPlcfbkfGet() {
return SVBT16ToShort(cbPlcfbkf); }
SVBT32 fcPlcfbkl;// 0xe2 offset in document stream of the PLCF that records the ending CP offsets of bookmarks recorded in the main document. See the BKL structure definition.
- ULONG fcPlcfbklGet() {
+ sal_uLong fcPlcfbklGet() {
return SVBT32ToUInt32(fcPlcfbkl); }
SVBT16 cbPlcfbkl;// 0xe6 SVBT16
- USHORT cbPlcfbklGet() {
+ sal_uInt16 cbPlcfbklGet() {
return SVBT16ToShort(cbPlcfbkl); }
SVBT32 fcCmds;// 0xe8 FC
- ULONG fcCmdsGet() {
+ sal_uLong fcCmdsGet() {
return SVBT32ToUInt32(fcCmds); }
SVBT16 cbCmds;// 0xec
- USHORT cbCmdsGet() {
+ sal_uInt16 cbCmdsGet() {
return SVBT16ToShort(cbCmds); }
SVBT32 fcPlcmcr;// 0xee FC
- ULONG fcPlcmcrGet() {
+ sal_uLong fcPlcmcrGet() {
return SVBT32ToUInt32(fcPlcmcr); }
SVBT16 cbPlcmcr;// 0xf2
- USHORT cbPlcmcrGet() {
+ sal_uInt16 cbPlcmcrGet() {
return SVBT16ToShort(cbPlcmcr); }
SVBT32 fcSttbfmcr;// 0xf4 FC
- ULONG fcSttbfmcrGet() {
+ sal_uLong fcSttbfmcrGet() {
return SVBT32ToUInt32(fcSttbfmcr); }
SVBT16 cbSttbfmcr;// 0xf8
- USHORT cbSttbfmcrGet() {
+ sal_uInt16 cbSttbfmcrGet() {
return SVBT16ToShort(cbSttbfmcr); }
SVBT32 fcPrEnv;// 0xfa
- ULONG fcPrEnvGet() {
+ sal_uLong fcPrEnvGet() {
return SVBT32ToUInt32(fcPrEnv); }
SVBT16 cbPrEnv;// 0xfe
- USHORT cbPrEnvGet() {
+ sal_uInt16 cbPrEnvGet() {
return SVBT16ToShort(cbPrEnv); }
SVBT32 fcWss;// 0x100 file offset of Window Save State data structure. See WSS.
- ULONG fcWssGet() {
+ sal_uLong fcWssGet() {
return SVBT32ToUInt32(fcWss); }
SVBT16 cbWss;// 0x100 count of bytes of WSS. ==0 if unable to store the window state.
- USHORT cbWssGet() {
+ sal_uInt16 cbWssGet() {
return SVBT16ToShort(cbWss); }
SVBT32 fcDop;// 0x106 file offset of document property data structure.
- ULONG fcDopGet() {
+ sal_uLong fcDopGet() {
return SVBT32ToUInt32(fcDop); }
SVBT16 cbDop;// 0x10a count of bytes of document properties.
- USHORT cbDopGet() {
+ sal_uInt16 cbDopGet() {
return SVBT16ToShort(cbDop); }
SVBT32 fcSttbfAssoc;// 0x10c offset to STTBF of associated strings. See STTBFASSOC.
- ULONG fcSttbfAssocGet() {
+ sal_uLong fcSttbfAssocGet() {
return SVBT32ToUInt32(fcSttbfAssoc); }
SVBT16 cbSttbfAssoc;// 0x110
- USHORT cbSttbfAssocGet() {
+ sal_uInt16 cbSttbfAssocGet() {
return SVBT16ToShort(cbSttbfAssoc); }
SVBT32 fcClx;// 0x112 file offset of beginning of information for complex files.
- ULONG fcClxGet() {
+ sal_uLong fcClxGet() {
return SVBT32ToUInt32(fcClx); }
SVBT16 cbClx;// 0x116 count of bytes of complex file information. 0 if file is non-complex.
- USHORT cbClxGet() {
+ sal_uInt16 cbClxGet() {
return SVBT16ToShort(cbClx); }
SVBT32 fcPlcfpgdFtn;// 0x118 file offset of page descriptor PLC for footnote subdocument.
- ULONG fcPlcfpgdFtnGet() {
+ sal_uLong fcPlcfpgdFtnGet() {
return SVBT32ToUInt32(fcPlcfpgdFtn); }
SVBT16 cbPlcfpgdFtn;// 0x11C count of bytes of page descriptor PLC for footnote subdocument.
- USHORT cbPlcfpgdFtnGet() {
+ sal_uInt16 cbPlcfpgdFtnGet() {
return SVBT16ToShort(cbPlcfpgdFtn); }
// ==0 if document has not been paginated. The length of the PGD is 8 bytes.
SVBT32 fcSpare1;// 0x11e file offset of the name of the original file.
- ULONG fcSpare1Get() {
+ sal_uLong fcSpare1Get() {
return SVBT32ToUInt32(fcSpare1); }
SVBT16 cbSpare1;// 0x122 count of bytes of the name of the original file.
- USHORT cbSpare1Get() {
+ sal_uInt16 cbSpare1Get() {
return SVBT16ToShort(cbSpare1); }
SVBT32 fcSpare2;// 0x124 file offset of the name of the original file.
- ULONG fcSpare2Get() {
+ sal_uLong fcSpare2Get() {
return SVBT32ToUInt32(fcSpare2); }
SVBT16 cbSpare2;// 0x128 count of bytes of the name of the original file.
- USHORT cbSpare2Get() {
+ sal_uInt16 cbSpare2Get() {
return SVBT16ToShort(cbSpare2); }
SVBT32 fcSpare3;// 0x12a file offset of the name of the original file.
- ULONG fcSpare3Get() {
+ sal_uLong fcSpare3Get() {
return SVBT32ToUInt32(fcSpare3); }
SVBT16 cbSpare3;// 0x12e count of bytes of the name of the original file.
- USHORT cbSpare3Get() {
+ sal_uInt16 cbSpare3Get() {
return SVBT16ToShort(cbSpare3); }
SVBT32 fcSpare4;// 0x130 file offset of the name of the original file.
- ULONG fcSpare4Get() {
+ sal_uLong fcSpare4Get() {
return SVBT32ToUInt32(fcSpare4); }
SVBT16 cbSpare4;// 0x134 count of bytes of the name of the original file.
- USHORT cbSpare4Get() {
+ sal_uInt16 cbSpare4Get() {
return SVBT16ToShort(cbSpare4); }
SVBT16 cpnBteChp;// 0x18E count of CHPX FKPs recorded in file. In non-complex files if the number of
- USHORT cpnBteChpGet() {
+ sal_uInt16 cpnBteChpGet() {
return SVBT16ToShort(cpnBteChp); }
// entries in the plcfbteChpx is less than this, the plcfbteChpx is incomplete.
SVBT16 cpnBtePap;// 0x190 count of PAPX FKPs recorded in file. In non-complex files if the number of
- USHORT cpnBtePapGet() {
+ sal_uInt16 cpnBtePapGet() {
return SVBT16ToShort(cpnBtePap); }
// entries in the plcfbtePapx is less than this, the plcfbtePapx is incomplete.
};
@@ -383,124 +383,124 @@ struct W1_FIB /////////////////////////////////////////////////////////
struct W1_DOP ///////////////////////////////////// Document Properties
{
SVBT16 fFlags;
- USHORT fFlagsGet() {
+ sal_uInt16 fFlagsGet() {
return SVBT16ToShort(fFlags); }
// SVBT16 fFacingPages : 1;// 1 when facing pages should be printed
- BOOL fFacingPagesGet() {
+ sal_Bool fFacingPagesGet() {
return 0 != ((fFlagsGet() >> 0) & 1); }
// SVBT16 fWidowControl : 1;// 1 when widow control is in effect. 0 when widow control disabled.
- BOOL fWidowControlGet() {
+ sal_Bool fWidowControlGet() {
return 0 != ((fFlagsGet() >> 1) & 1); }
// SVBT16 : 3;// unused
// SVBT16 fpc : 2;// 1 footnote position code: 0 as endnotes, 1 at bottom of page, 2 immediately beneath text
- USHORT fpcGet() {
- return (USHORT)((fFlagsGet() >> 5) & 3); }
+ sal_uInt16 fpcGet() {
+ return (sal_uInt16)((fFlagsGet() >> 5) & 3); }
// SVBT16 fWide : 1;// Landscape
- BOOL fWideGet() {
+ sal_Bool fWideGet() {
return 0 != ((fFlagsGet() >> 7) & 1); }
// SVBT16 grpfIhdt : 8;// 0 specification of document headers and footers. See explanation under Headers and Footers topic.
- USHORT grpfIhdtGet() {
- return (USHORT)((fFlagsGet() >> 8) & 0xff); }
+ sal_uInt16 grpfIhdtGet() {
+ return (sal_uInt16)((fFlagsGet() >> 8) & 0xff); }
SVBT16 fFtnFlags;
- USHORT fFtnFlagsGet() {
+ sal_uInt16 fFtnFlagsGet() {
return SVBT16ToShort(fFtnFlags); }
// SVBT16 fFtnRestart : 1;
- BOOL fFtnRestartGet() {
+ sal_Bool fFtnRestartGet() {
return 0 != ((fFtnFlagsGet() >> 0) & 1); }
// SVBT16 nFtn : 15;// 1 initial footnote number for document
- USHORT nFtnGet() {
- return (USHORT)((fFtnFlagsGet() >> 1) & 0x7fff); }
+ sal_uInt16 nFtnGet() {
+ return (sal_uInt16)((fFtnFlagsGet() >> 1) & 0x7fff); }
SVBT16 fRvsFlags;
- USHORT fRvsFlagsGet() {
+ sal_uInt16 fRvsFlagsGet() {
return SVBT16ToShort(fRvsFlags); }
// SVBT16 irmBar : 8;
- USHORT irmBarGet() {
- return (USHORT)((fRvsFlagsGet() >> 0) & 0xff); }
+ sal_uInt16 irmBarGet() {
+ return (sal_uInt16)((fRvsFlagsGet() >> 0) & 0xff); }
// SVBT16 irmProps : 7;
- USHORT irmPropsGet() {
- return (USHORT)((fRvsFlagsGet() >> 8) & 0x7f); }
+ sal_uInt16 irmPropsGet() {
+ return (sal_uInt16)((fRvsFlagsGet() >> 8) & 0x7f); }
// SVBT16 fRevMarking : 1;// when 1, Word will mark revisions as the document is edited
- BOOL fRevMarkingGet() {
+ sal_Bool fRevMarkingGet() {
return 0 != ((fRvsFlagsGet() >> 15) & 1); }
SVBT16 fSveFlags;
- USHORT fSveFlagsGet() {
+ sal_uInt16 fSveFlagsGet() {
return SVBT16ToShort(fSveFlags); }
// SVBT16 fBackup : 1;// always make backup when document saved when 1.
- BOOL fBackupGet() {
+ sal_Bool fBackupGet() {
return 0 != ((fSveFlagsGet() >> 0) & 1); }
// SVBT16 fExactCWords : 1;
- BOOL fExactCWordsGet() {
+ sal_Bool fExactCWordsGet() {
return 0 != ((fSveFlagsGet() >> 1) & 1); }
// SVBT16 fPagHidden : 1;//
- BOOL fPagHiddenGet() {
+ sal_Bool fPagHiddenGet() {
return 0 != ((fSveFlagsGet() >> 2) & 1); }
// SVBT16 fPagResults : 1;
- BOOL fPagResultsGet() {
+ sal_Bool fPagResultsGet() {
return 0 != ((fSveFlagsGet() >> 3) & 1); }
// SVBT16 fLockAtn : 1;// when 1, annotations are locked for editing
- BOOL fLockAtnGet() {
+ sal_Bool fLockAtnGet() {
return 0 != ((fSveFlagsGet() >> 4) & 1); }
// SVBT16 fMirrorMargins : 1;// swap margins on left/right pages when 1.
- BOOL fMirrorMarginsGet() {
+ sal_Bool fMirrorMarginsGet() {
return 0 != ((fSveFlagsGet() >> 5) & 1); }
// SVBT16 : 10;// unused
SVBT16 fSpares;
- USHORT fSparesGet() {
+ sal_uInt16 fSparesGet() {
return SVBT16ToShort(fSpares); }
SVBT16 yaPage;
- USHORT yaPageGet() {
+ sal_uInt16 yaPageGet() {
return SVBT16ToShort(yaPage); }
SVBT16 xaPage;
- USHORT xaPageGet() {
+ sal_uInt16 xaPageGet() {
return SVBT16ToShort(xaPage); }
SVBT16 dyaTop;
- USHORT dyaTopGet() {
+ sal_uInt16 dyaTopGet() {
return SVBT16ToShort(dyaTop); }
SVBT16 dxaLeft;
- USHORT dxaLeftGet() {
+ sal_uInt16 dxaLeftGet() {
return SVBT16ToShort(dxaLeft); }
SVBT16 dyaBottom;
- USHORT dyaBottomGet() {
+ sal_uInt16 dyaBottomGet() {
return SVBT16ToShort(dyaBottom); }
SVBT16 dxaRight;
- USHORT dxaRightGet() {
+ sal_uInt16 dxaRightGet() {
return SVBT16ToShort(dxaRight); }
SVBT16 dxaGutter;
- USHORT dxaGutterGet() {
+ sal_uInt16 dxaGutterGet() {
return SVBT16ToShort(dxaGutter); }
SVBT16 dxaTab;// 720 twips default tab width
- USHORT dxaTabGet() {
+ sal_uInt16 dxaTabGet() {
return SVBT16ToShort(dxaTab); }
SVBT16 wSpare;//
- USHORT wSpareGet() {
+ sal_uInt16 wSpareGet() {
return SVBT16ToShort(wSpare); }
SVBT16 dxaHotZ;// width of hyphenation hot zone measured in twips
- USHORT dxaHotZGet() {
+ sal_uInt16 dxaHotZGet() {
return SVBT16ToShort(dxaHotZ); }
SVBT16 rgwSpare[2];// reserved
SVBT32 dttmCreated;// DTTM date and time document was created
- ULONG dttmCreatedGet() {
+ sal_uLong dttmCreatedGet() {
return SVBT32ToUInt32(dttmCreated); }
SVBT32 dttmRevised;// DTTM date and time document was last revised
- ULONG dttmRevisedGet() {
+ sal_uLong dttmRevisedGet() {
return SVBT32ToUInt32(dttmRevised); }
SVBT32 dttmLastPrint;// DTTM date and time document was last printed
- ULONG dttmLastPrintGet() {
+ sal_uLong dttmLastPrintGet() {
return SVBT32ToUInt32(dttmLastPrint); }
SVBT16 nRevision;// number of times document has been revised since its creation
- USHORT nRevisionGet() {
+ sal_uInt16 nRevisionGet() {
return SVBT16ToShort(nRevision); }
SVBT32 tmEdited;// time document was last edited
- ULONG tmEditedGet() {
+ sal_uLong tmEditedGet() {
return SVBT32ToUInt32(tmEdited); }
SVBT32 cWords;// count of words tallied by last Word Count execution
- ULONG cWordsGet() {
+ sal_uLong cWordsGet() {
return SVBT32ToUInt32(cWords); }
SVBT32 cCh;// count of characters tallied by last Word Count execution
- ULONG cChGet() {
+ sal_uLong cChGet() {
return SVBT32ToUInt32(cCh); }
SVBT16 cPg;// count of pages tallied by last Word Count execution
- USHORT cPgGet() {
+ sal_uInt16 cPgGet() {
return SVBT16ToShort(cPg); }
SVBT16 rgwSpareDocSum[2];
};
@@ -519,29 +519,29 @@ struct W1_CHP /////////////////////////////////////////////////////////
W1_CHP() { memset( this, 0, sizeof( *this)); }
- USHORT fCharGet() { return SVBT16ToShort(fChar); }
- void fCharSet(USHORT n) { ShortToSVBT16(n, fChar); }
- BOOL fBoldGet() { return 0 != ((fCharGet() >> 0) & 1); }
- void fBoldSet(BOOL b) { fCharSet( ( fCharGet() & 0xfffe ) | ( b << 0 ) ); }
- BOOL fItalicGet() { return 0 != ((fCharGet() >> 1) & 1); }
- void fItalicSet(BOOL b) { fCharSet( ( fCharGet() & 0xfffd ) | ( b << 1 ) ); }
- BOOL fStrikeGet() { return 0 != ((fCharGet() >> 2) & 1); }
- BOOL fOutlineGet() { return 0 != ((fCharGet() >> 3) & 1); }
- BOOL fFldVanishGet() { return 0 != ((fCharGet() >> 4) & 1); }
- BOOL fSmallCapsGet() { return 0 != ((fCharGet() >> 5) & 1); }
- BOOL fCapsGet() { return 0 != ((fCharGet() >> 6) & 1); }
- BOOL fVanishGet() { return 0 != ((fCharGet() >> 7) & 1); }
- BOOL fRMarkGet() { return 0 != ((fCharGet() >> 8) & 1); }
- BOOL fSpecGet() { return 0 != ((fCharGet() >> 9) & 1); }
- BOOL fsIcoGet() { return 0 != ((fCharGet() >> 10) & 1); }
- BOOL fsFtcGet() { return 0 != ((fCharGet() >> 11) & 1); }
- void fsFtcSet(BOOL b) { fCharSet( ( fCharGet() & 0xf7ff ) | ( b << 11 ) ); }
- BOOL fsHpsGet() { return 0 != ((fCharGet() >> 12) & 1); }
- void fsHpsSet(BOOL b) { fCharSet( ( fCharGet() & 0xefff ) | ( b << 12 ) ); }
- BOOL fsKulGet() { return 0 != ((fCharGet() >> 13) & 1); }
- void fsKulSet(BOOL b) { fCharSet( ( fCharGet() & 0xdfff ) | ( b << 13 ) ); }
- BOOL fsPosGet() { return 0 != ((fCharGet() >> 14) & 1); }
- BOOL fsSpaceGet() { return 0 != ((fCharGet() >> 15) & 1); }
+ sal_uInt16 fCharGet() { return SVBT16ToShort(fChar); }
+ void fCharSet(sal_uInt16 n) { ShortToSVBT16(n, fChar); }
+ sal_Bool fBoldGet() { return 0 != ((fCharGet() >> 0) & 1); }
+ void fBoldSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xfffe ) | ( b << 0 ) ); }
+ sal_Bool fItalicGet() { return 0 != ((fCharGet() >> 1) & 1); }
+ void fItalicSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xfffd ) | ( b << 1 ) ); }
+ sal_Bool fStrikeGet() { return 0 != ((fCharGet() >> 2) & 1); }
+ sal_Bool fOutlineGet() { return 0 != ((fCharGet() >> 3) & 1); }
+ sal_Bool fFldVanishGet() { return 0 != ((fCharGet() >> 4) & 1); }
+ sal_Bool fSmallCapsGet() { return 0 != ((fCharGet() >> 5) & 1); }
+ sal_Bool fCapsGet() { return 0 != ((fCharGet() >> 6) & 1); }
+ sal_Bool fVanishGet() { return 0 != ((fCharGet() >> 7) & 1); }
+ sal_Bool fRMarkGet() { return 0 != ((fCharGet() >> 8) & 1); }
+ sal_Bool fSpecGet() { return 0 != ((fCharGet() >> 9) & 1); }
+ sal_Bool fsIcoGet() { return 0 != ((fCharGet() >> 10) & 1); }
+ sal_Bool fsFtcGet() { return 0 != ((fCharGet() >> 11) & 1); }
+ void fsFtcSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xf7ff ) | ( b << 11 ) ); }
+ sal_Bool fsHpsGet() { return 0 != ((fCharGet() >> 12) & 1); }
+ void fsHpsSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xefff ) | ( b << 12 ) ); }
+ sal_Bool fsKulGet() { return 0 != ((fCharGet() >> 13) & 1); }
+ void fsKulSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xdfff ) | ( b << 13 ) ); }
+ sal_Bool fsPosGet() { return 0 != ((fCharGet() >> 14) & 1); }
+ sal_Bool fsSpaceGet() { return 0 != ((fCharGet() >> 15) & 1); }
// SVBT16 fBold :1;// 1 == opposite boldness of style
// SVBT16 fItalic :1;// 1 == opposite of style
// SVBT16 fStrike :1;// 1 == opposite of style
@@ -559,29 +559,29 @@ struct W1_CHP /////////////////////////////////////////////////////////
// SVBT16 fsPos :1;// 1 == Char position (hpsPos) different to style
// SVBT16 fsSpace :1;// 1 == Char Spacing (qpsSpace) different to style
- USHORT ftcGet() { return SVBT16ToShort(ftc); }
- void ftcSet(USHORT n) { ShortToSVBT16(n, ftc); }
- void hpsSet(BYTE n) { ByteToSVBT8(n, hps); }
- BYTE hpsGet() { return SVBT8ToByte(hps); }
-
- BYTE hpsPosGet() { return SVBT8ToByte(hpsPos); }
- USHORT fTextGet() { return SVBT16ToShort(fText); }
- void fTextSet(USHORT n) { ShortToSVBT16(n, fText); }
- USHORT qpsSpaceGet() { return (USHORT)((fTextGet() >> 0) & 0x3f); }
- USHORT wSpare2Get() { return (USHORT)((fTextGet() >> 6) & 3); }
- USHORT icoGet() { return (USHORT)((fTextGet() >> 8) & 0xf); }
- USHORT kulGet() { return (USHORT)((fTextGet() >> 12) & 7); }
- void kulSet(USHORT n) { fTextSet( ( fTextGet() & 0x8fff ) | ( ( n & 7 ) << 12 ) ); }
- BOOL fSysVanishGet() { return 0 != ((fTextGet() >> 15) & 1); }
+ sal_uInt16 ftcGet() { return SVBT16ToShort(ftc); }
+ void ftcSet(sal_uInt16 n) { ShortToSVBT16(n, ftc); }
+ void hpsSet(sal_uInt8 n) { ByteToSVBT8(n, hps); }
+ sal_uInt8 hpsGet() { return SVBT8ToByte(hps); }
+
+ sal_uInt8 hpsPosGet() { return SVBT8ToByte(hpsPos); }
+ sal_uInt16 fTextGet() { return SVBT16ToShort(fText); }
+ void fTextSet(sal_uInt16 n) { ShortToSVBT16(n, fText); }
+ sal_uInt16 qpsSpaceGet() { return (sal_uInt16)((fTextGet() >> 0) & 0x3f); }
+ sal_uInt16 wSpare2Get() { return (sal_uInt16)((fTextGet() >> 6) & 3); }
+ sal_uInt16 icoGet() { return (sal_uInt16)((fTextGet() >> 8) & 0xf); }
+ sal_uInt16 kulGet() { return (sal_uInt16)((fTextGet() >> 12) & 7); }
+ void kulSet(sal_uInt16 n) { fTextSet( ( fTextGet() & 0x8fff ) | ( ( n & 7 ) << 12 ) ); }
+ sal_Bool fSysVanishGet() { return 0 != ((fTextGet() >> 15) & 1); }
// SVBT16 qpsSpace :6;// Char Spacing, -7 .. 56; 57 = -7, 63 = -1
// SVBT16 wSpare2 : 2;// reserved
// SVBT16 ico :4;// color of Text: 0=black, 1=blue, 2=cyan, 3=green, 4=magenta, 5=red, 6=yellow, 7=white
// SVBT16 kul: 3;// Underline code: 0=none, 1=single, 2=by word, 3=double, 4=dotted
// SVBT16 fSysVanish: 1;// used internally
- ULONG fcPicGet() { return SVBT32ToUInt32(fcPic); }
- USHORT fnPicGet() { return SVBT8ToByte(fnPic); }
- USHORT hpsLargeChpGet() { return SVBT16ToShort(hpsLargeChp); }
+ sal_uLong fcPicGet() { return SVBT32ToUInt32(fcPic); }
+ sal_uInt16 fnPicGet() { return SVBT8ToByte(fnPic); }
+ sal_uInt16 hpsLargeChpGet() { return SVBT16ToShort(hpsLargeChp); }
void Out(Ww1Shell&, Ww1Manager&);
};
@@ -589,157 +589,157 @@ struct W1_CHP /////////////////////////////////////////////////////////
struct W1_FFN ///////////////////////////////////////// Font Descriptor
{
SVBT8 cbFfnM1;// 0x0 total length of FFN - 1.
- USHORT cbFfnM1Get() {
+ sal_uInt16 cbFfnM1Get() {
return SVBT8ToByte(cbFfnM1); }
SVBT8 fFlags;
- USHORT fFlagsGet() {
+ sal_uInt16 fFlagsGet() {
return SVBT8ToByte(fFlags); }
// SVBT8 prg : 2;// 0x1:03 pitch request
- USHORT prgGet() {
- return (USHORT)((fFlagsGet() >> 0) & 3); }
+ sal_uInt16 prgGet() {
+ return (sal_uInt16)((fFlagsGet() >> 0) & 3); }
// SVBT8 fTrueType : 1;// 0x1:04 when 1, font is a TrueType font
- BOOL fTrueTypeGet() {
+ sal_Bool fTrueTypeGet() {
return 0 != ((fFlagsGet() >> 2) & 1); }
// SVBT8 : 1;// 0x1:08 reserved
// SVBT8 ff : 3;// 0x1:70 font family id
- USHORT ffGet() {
- return (USHORT)((fFlagsGet() >> 4) & 7); }
+ sal_uInt16 ffGet() {
+ return (sal_uInt16)((fFlagsGet() >> 4) & 7); }
// SVBT8 : 1;// 0x1:80 reserved
- BYTE szFfn[65];// 0x6 zero terminated string that records name of font.
+ sal_uInt8 szFfn[65];// 0x6 zero terminated string that records name of font.
// Vorsicht: Dieses Array kann auch kleiner sein!!!
// Possibly followed by a second sz which records the name of an
// alternate font to use if the first named font does not exist
// on this system. Maximal size of szFfn is 65 characters.
- BYTE* szFfnGet() { return szFfn; }
+ sal_uInt8* szFfnGet() { return szFfn; }
};
struct W1_PHE /////////////////////////////////////// Paragraph Height
{
SVBT16 fFlags;
- USHORT fFlagsGet() {
+ sal_uInt16 fFlagsGet() {
return SVBT16ToShort(fFlags); }
- BOOL fSpareGet() {
+ sal_Bool fSpareGet() {
return 0 != (fFlagsGet() & 1); }
- BOOL fUnkGet() {
+ sal_Bool fUnkGet() {
return 0 != ((fFlagsGet() >> 1) & 1); }
- BOOL fDiffLinesGet() {
+ sal_Bool fDiffLinesGet() {
return 0 != ((fFlagsGet() >> 2) & 1); }
- BYTE clMacGet() {
+ sal_uInt8 clMacGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((fFlagsGet() >> 8) & 0xff); }
SVBT16 dxaCol;
- USHORT dxaColGet() {
+ sal_uInt16 dxaColGet() {
return SVBT16ToShort(dxaCol); }
SVBT16 xxx; // beachte die dreifachnutzung.... siehe doc.
- USHORT dylHeightGet() {
+ sal_uInt16 dylHeightGet() {
return SVBT16ToShort(xxx); }
- USHORT dylLineGet() {
+ sal_uInt16 dylLineGet() {
return SVBT16ToShort(xxx); }
- USHORT fStyleDirtyGet() {
+ sal_uInt16 fStyleDirtyGet() {
return SVBT16ToShort(xxx); }
};
struct W1_PAPX ///////////////////////// Paragraph Property Difference
{
SVBT8 stc;
- BYTE stcGet() {
+ sal_uInt8 stcGet() {
return SVBT8ToByte(stc); }
W1_PHE phe;
- BYTE grpprl[1];
- BYTE* grpprlGet() {
+ sal_uInt8 grpprl[1];
+ sal_uInt8* grpprlGet() {
return grpprl; }
};
struct W1_BRC //////////////////////////////////////////// Border Code
{
SVBT16 aBits;
- USHORT aBitsGet() {
+ sal_uInt16 aBitsGet() {
return SVBT16ToShort(aBits); }
// SVBT16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5,
// this field is the width of a single line of border
// in units of 0.75 points Must be nonzero when brcType
// is nonzero. 6 == dotted, 7 == dashed.
- BYTE dxpLineWidthGet() {
+ sal_uInt8 dxpLineWidthGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 0) & 0x0007); }
// SVBT16 brcType : 2;// 0018 border type code: 0 == none, 1 == single, 2 == thick,
// 3 == double
- BYTE brcTypeGet() {
+ sal_uInt8 brcTypeGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 3) & 0x0003); }
// SVBT16 fShadow : 1;// 0020 when 1, border is drawn with shadow. Must be 0
// when BRC is a substructure of the TC
- BYTE fShadowGet() {
+ sal_uInt8 fShadowGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 5) & 0x0001); }
// SVBT16 ico : 5;// 07C0 color code (see chp.ico)
- BYTE icoGet() {
+ sal_uInt8 icoGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 6) & 0x001f); }
// SVBT16 dxpSpace : 5;// F800 width of space to maintain between border and
// text within border. Must be 0 when BRC is a
// substructure of the TC. Stored in points for Windows.
- BYTE dxpSpaceGet() {
+ sal_uInt8 dxpSpaceGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 11) & 0x001f); }
};
struct W1_BRC10 ///////////////////////////////// Border Code Word 1.0
{
SVBT16 aBits;
- USHORT aBitsGet() {
+ sal_uInt16 aBitsGet() {
return SVBT16ToShort(aBits); }
- BYTE dxpLine2WidthGet() {
+ sal_uInt8 dxpLine2WidthGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 0) & 0x0007); }
- BYTE dxpSpaceBetweenGet() {
+ sal_uInt8 dxpSpaceBetweenGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 3) & 0x0007); }
- BYTE dxpLine1WidthGet() {
+ sal_uInt8 dxpLine1WidthGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 6) & 0x0007); }
- BYTE dxpSpaceGet() {
+ sal_uInt8 dxpSpaceGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 9) & 0x001f); }
- BYTE fShadowGet() {
+ sal_uInt8 fShadowGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 14) & 0x0001); }
- BYTE fSpareGet() {
+ sal_uInt8 fSpareGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 15) & 0x0001); }
};
struct W1_FLD //////////////////////////////////////// FieldDescriptor
{
SVBT8 ch; // boundary-type (begin(19), separator (20), end (21))
- BYTE chGet() {
+ sal_uInt8 chGet() {
return SVBT8ToByte(ch); }
SVBT8 flt; // field type / flags
- BYTE fltGet() {
+ sal_uInt8 fltGet() {
return SVBT8ToByte(flt); }
// variant, when ch==21:
- BOOL fDifferGet() {
+ sal_Bool fDifferGet() {
return (fltGet() >> 0) & 1; }
- BOOL fResultDirtyGet() {
+ sal_Bool fResultDirtyGet() {
return (fltGet() >> 2) & 1; }
- BOOL ResultEditedGet() {
+ sal_Bool ResultEditedGet() {
return (fltGet() >> 3) & 1; }
- BOOL fLockedGet() {
+ sal_Bool fLockedGet() {
return (fltGet() >> 4) & 1; }
- BOOL fPrivateResultGet() {
+ sal_Bool fPrivateResultGet() {
return (fltGet() >> 5) & 1; }
- BOOL fNestedGet() {
+ sal_Bool fNestedGet() {
return (fltGet() >> 6) & 1; }
};
struct W1_PIC /////////////////////////////////////// PictureStructure
{
SVBT32 lcb;// 0x0 number of bytes in the PIC structure plus size of following picture data which may be a Window's metafile, a bitmap, or the filename of a TIFF file.
- ULONG lcbGet() {
+ sal_uLong lcbGet() {
return SVBT32ToUInt32(lcb); }
SVBT16 cbHeader;// 0x4 number of bytes in the PIC (to allow for future expansion).
- USHORT cbHeaderGet() {
+ sal_uInt16 cbHeaderGet() {
return SVBT16ToShort(cbHeader); }
struct MFP {
SVBT16 mm;// 0x6 int
- USHORT mmGet() {
+ sal_uInt16 mmGet() {
return SVBT16ToShort(mm); }
SVBT16 xExt;// 0x8 int
- USHORT xExtGet() {
+ sal_uInt16 xExtGet() {
return SVBT16ToShort(xExt); }
SVBT16 yExt;// 0xa int
- USHORT yExtGet() {
+ sal_uInt16 yExtGet() {
return SVBT16ToShort(yExt); }
SVBT16 hMF;// 0xc int
- USHORT hMFGet() {
+ sal_uInt16 hMFGet() {
return SVBT16ToShort(hMF); }
} mfp;
union W1_MFP_BMP {
@@ -747,80 +747,80 @@ struct W1_PIC /////////////////////////////////////// PictureStructure
SVBT8 rcWinMF[14];// 0xe rc (rectangle - 8 bytes) rect for window origin and extents when metafile is stored -- ignored if 0
} MFP_BMP;
SVBT16 dxaGoal;// 0x1c horizontal measurement in twips of the rectangle the picture should be imaged within.
- USHORT dxaGoalGet() {
+ sal_uInt16 dxaGoalGet() {
return SVBT16ToShort(dxaGoal); }
SVBT16 dyaGoal;// 0x1e vertical measurement in twips of the rectangle the picture should be imaged within.
- USHORT dyaGoalGet() {
+ sal_uInt16 dyaGoalGet() {
return SVBT16ToShort(dyaGoal); }
SVBT16 mx;// 0x20 horizontal scaling factor supplied by user in .1% units.
- USHORT mxGet() {
+ sal_uInt16 mxGet() {
return SVBT16ToShort(mx); }
SVBT16 my;// 0x22 vertical scaling factor supplied by user in .1% units.
- USHORT myGet() {
+ sal_uInt16 myGet() {
return SVBT16ToShort(my); }
SVBT16 dxaCropLeft;// 0x24 the amount the picture has been cropped on the left in twips.
- USHORT dxaCropLeftGet() {
+ sal_uInt16 dxaCropLeftGet() {
return SVBT16ToShort(dxaCropLeft); }
SVBT16 dyaCropTop;// 0x26 the amount the picture has been cropped on the top in twips.
- USHORT dyaCropTopGet() {
+ sal_uInt16 dyaCropTopGet() {
return SVBT16ToShort(dyaCropTop); }
SVBT16 dxaCropRight;// 0x28 the amount the picture has been cropped on the right in twips.
- USHORT dxaCropRightGet() {
+ sal_uInt16 dxaCropRightGet() {
return SVBT16ToShort(dxaCropRight); }
SVBT16 dyaCropBottom;// 0x2a the amount the picture has been cropped on the bottom in twips.
- USHORT dyaCropBottomGet() {
+ sal_uInt16 dyaCropBottomGet() {
return SVBT16ToShort(dyaCropBottom); }
SVBT16 flags;
- USHORT flagsGet() {
+ sal_uInt16 flagsGet() {
return SVBT16ToShort(flags); }
// brcl : 4;// 000F Obsolete, superseded by brcTop, etc. In
- BYTE brclGet() {
- return sal::static_int_cast< BYTE, sal_uInt16 >(flagsGet() & 0xf); }
+ sal_uInt8 brclGet() {
+ return sal::static_int_cast< sal_uInt8, sal_uInt16 >(flagsGet() & 0xf); }
// fFrameEmpty : 1;// 0010 picture consists of a single frame
- BOOL fFrameEmptyGet() {
- return sal::static_int_cast< BYTE, sal_uInt16 >((flagsGet() >> 4) & 1); }
+ sal_Bool fFrameEmptyGet() {
+ return sal::static_int_cast< sal_uInt8, sal_uInt16 >((flagsGet() >> 4) & 1); }
// win6 stuff:
// fBitmap : 1;// 0020 ==1, when picture is just a bitmap
-// BOOL fBitmapGet() {
+// sal_Bool fBitmapGet() {
// return (flagsGet() >> 5) & 1; }
// fDrawHatch : 1;// 0040 ==1, when picture is an active OLE object
-// BOOL fDrawHatchGet() {
+// sal_Bool fDrawHatchGet() {
// return (flagsGet() >> 6) & 1; }
// fError : 1;// 0080 ==1, when picture is just an error message
-// BOOL fErrorGet() {
+// sal_Bool fErrorGet() {
// return (flagsGet() >> 7) & 1; }
// bpp : 8;// FF00 bits per pixel, 0 = unknown
-// BYTE bppGet() {
+// sal_uInt8 bppGet() {
// return (flagsGet() >> 8) & 0xff; }
// SVBT16 rgbrc[4];
-// USHORT rgbrcGet(USHORT nIndex) {
+// sal_uInt16 rgbrcGet(sal_uInt16 nIndex) {
// return SVBT16ToShort(rgbrc[nIndex]); }
// W1_BRC brcTop;// 0x2e specification for border above picture
// W1_BRC brcLeft;// 0x30 specification for border to the left
// W1_BRC brcBottom;// 0x32 specification for border below picture
// W1_BRC brcRight;// 0x34 specification for border to the right
// SVBT16 dxaOrigin;// 0x36 horizontal offset of hand annotation origin
-// USHORT dxaOriginGet() {
+// sal_uInt16 dxaOriginGet() {
// return SVBT16ToShort(dxaOrigin); }
// SVBT16 dyaOrigin;// 0x38 vertical offset of hand annotation origin
-// USHORT dyaOriginGet() {
+// sal_uInt16 dyaOriginGet() {
// return SVBT16ToShort(dyaOrigin); }
SVBT8 rgb;// 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
- BYTE* rgbGet() {
+ sal_uInt8* rgbGet() {
return rgb; }
};
struct W1_TBD /////////////////////////////////////////////////////////
{
SVBT8 aBits1;
- BYTE aBits1Get() {
+ sal_uInt8 aBits1Get() {
return SVBT8ToByte(aBits1); }
// SVBT8 jc : 3;// 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar
- BYTE jcGet() {
+ sal_uInt8 jcGet() {
return aBits1Get() & 0x07; }
// SVBT8 tlc : 3;// 0x38 tab leader code: 0=no leader, 1=dotted leader,
// 2=hyphenated leader, 3=single line leader, 4=heavy line leader
- BYTE tlcGet() {
+ sal_uInt8 tlcGet() {
return (aBits1Get() >> 3 ) & 0x07; }
// * int :2 C0 reserved
};
@@ -828,11 +828,11 @@ struct W1_TBD /////////////////////////////////////////////////////////
struct W1_TC //////////////////////////////////////////////////////////
{
SVBT8 aBits1;
- BYTE aBits1Get() {
+ sal_uInt8 aBits1Get() {
return SVBT8ToByte(aBits1); }
- BYTE fFirstMergedGet() {
+ sal_uInt8 fFirstMergedGet() {
return aBits1Get() & 0x01; }
- BYTE fMergedGet() {
+ sal_uInt8 fMergedGet() {
return (aBits1Get() >> 1 ) & 0x01; }
SVBT8 aBits2;
// SVBT16 fFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
diff --git a/sw/source/filter/ww8/README-rtf.txt b/sw/source/filter/ww8/README-rtf.txt
index 661813abc95a..6acddaa61eee 100644
--- a/sw/source/filter/ww8/README-rtf.txt
+++ b/sw/source/filter/ww8/README-rtf.txt
@@ -35,7 +35,7 @@ Table of Contents
---------------------------------------------------------------------
-1. Introduction
+1.�Introduction
---------------------------------------------------------------------
@@ -45,7 +45,7 @@ this way much less code can achieve the same set of features,
reducing the amount of duplicated code.
-1.1. Terminology
+1.1.�Terminology
--------------
@@ -56,7 +56,7 @@ reducing the amount of duplicated code.
to the old built-in one.
-1.2. General
+1.2.�General
--------------
@@ -72,7 +72,7 @@ the bug will pop up less frequently.
---------------------------------------------------------------------
-2. List if fixed bugs
+2.�List if fixed bugs
---------------------------------------------------------------------
@@ -101,12 +101,12 @@ the bug will pop up less frequently.
---------------------------------------------------------------------
-3. List of new features
+3.�List of new features
---------------------------------------------------------------------
-3.1. Nested tables
+3.1.�Nested tables
--------------
@@ -114,7 +114,7 @@ This was new in Word2000 and it?s now supported by RtfExport (MSO OK,
OOo KO)
-3.2. Character properties
+3.2.�Character properties
--------------
@@ -125,7 +125,7 @@ The followings are now supported:
* pair kerning (MSO OK, OOo OK)
-3.3. Sections
+3.3.�Sections
--------------
@@ -141,7 +141,7 @@ RtfExport writes:
* line numbering (MSO OK, OOo KO)
-3.4. Graphics
+3.4.�Graphics
--------------
@@ -150,7 +150,7 @@ and OOo can display graphics from the output document, but Wordpad as
well.
-3.5. Bookmarks
+3.5.�Bookmarks
--------------
@@ -160,7 +160,7 @@ the result), this now works as expected. (MSO OK - the importer
previously autocorrected this as well, OO OK)
-3.6. Fields
+3.6.�Fields
--------------
@@ -169,7 +169,7 @@ previously autocorrected this as well, OO OK)
* Postit comments are now exported. (MSO OK, OOo KO)
-3.7. Drawing
+3.7.�Drawing
--------------
@@ -184,7 +184,7 @@ implemented:
(MSO OK, OOo KO)
-3.8. Form fields
+3.8.�Form fields
--------------
@@ -197,7 +197,7 @@ All types supported by the RTF format are exported, namely:
(MSO OK, OOo KO)
-3.9. OLE objects
+3.9.�OLE objects
--------------
@@ -210,7 +210,7 @@ object, too. (MSO OK, OOo KO)
---------------------------------------------------------------------
-4. Changes in the source code outside RTF
+4.�Changes in the source code outside RTF
---------------------------------------------------------------------
@@ -224,3 +224,4 @@ not change the output of other filters from a user?s point of view.
* wwFontHelper::InitFontTable can really load all fonts
* An obvious typo in WW8AttributeOutput::CharTwoLines has been
fixed
+
diff --git a/sw/source/filter/ww8/WW8FFData.cxx b/sw/source/filter/ww8/WW8FFData.cxx
index 6d2f1e8d793b..65fa2b6b6cd7 100644
--- a/sw/source/filter/ww8/WW8FFData.cxx
+++ b/sw/source/filter/ww8/WW8FFData.cxx
@@ -89,7 +89,7 @@ void WW8FFData::WriteOUString(SvStream * pDataStrm, const ::rtl::OUString & rStr
void WW8FFData::Write(SvStream * pDataStrm)
{
- ULONG nDataStt = pDataStrm->Tell();
+ sal_uLong nDataStt = pDataStrm->Tell();
static const sal_uInt8 aHeader[] =
{
diff --git a/sw/source/filter/ww8/WW8Sttbf.cxx b/sw/source/filter/ww8/WW8Sttbf.cxx
index 07271945430a..3b411a9b4cc9 100644
--- a/sw/source/filter/ww8/WW8Sttbf.cxx
+++ b/sw/source/filter/ww8/WW8Sttbf.cxx
@@ -42,7 +42,7 @@ namespace ww8
{
rSt.Seek(nPos);
- mp_data.reset(new BYTE[nSize]);
+ mp_data.reset(new sal_uInt8[nSize]);
rSt.Read(mp_data.get(), nSize);
}
diff --git a/sw/source/filter/ww8/WW8Sttbf.hxx b/sw/source/filter/ww8/WW8Sttbf.hxx
index 0741a221a248..f4c2e6b08bf6 100644
--- a/sw/source/filter/ww8/WW8Sttbf.hxx
+++ b/sw/source/filter/ww8/WW8Sttbf.hxx
@@ -36,7 +36,7 @@
namespace ww8
{
- typedef boost::shared_array<BYTE> DataArray_t;
+ typedef boost::shared_array<sal_uInt8> DataArray_t;
class WW8Struct : public ::sw::ExternalData
{
@@ -73,7 +73,7 @@ typedef ::std::vector<rtl::OUString> StringVector_t;
ExtrasVector_t m_Extras;
public:
- WW8Sttb(SvStream& rSt, INT32 nPos, sal_uInt32 nSize);
+ WW8Sttb(SvStream& rSt, sal_Int32 nPos, sal_uInt32 nSize);
virtual ~WW8Sttb();
sal_uInt32 getCount() const;
@@ -94,7 +94,7 @@ typedef ::std::vector<rtl::OUString> StringVector_t;
};
template <class T>
- WW8Sttb<T>::WW8Sttb(SvStream& rSt, INT32 nPos, sal_uInt32 nSize)
+ WW8Sttb<T>::WW8Sttb(SvStream& rSt, sal_Int32 nPos, sal_uInt32 nSize)
: WW8Struct(rSt, nPos, nSize), bDoubleByteCharacters(false)
{
sal_uInt32 nOffset = 0;
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index ce82774132c9..665a73f2721f 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -659,7 +659,7 @@ void WW8TableInfo::processSwTable(const SwTable * pTable)
{
const SwTableLines & rLines = pTable->GetTabLines();
- for (USHORT n = 0; n < rLines.Count(); n++)
+ for (sal_uInt16 n = 0; n < rLines.Count(); n++)
{
const SwTableLine * pLine = rLines[n];
@@ -695,7 +695,7 @@ WW8TableInfo::processTableLine(const SwTable * pTable,
WW8TableNodeInfo::Pointer_t pTextNodeInfo;
- for (USHORT n = 0; n < rBoxes.Count(); n++)
+ for (sal_uInt16 n = 0; n < rBoxes.Count(); n++)
{
const SwTableBox * pBox = rBoxes[n];
@@ -732,7 +732,7 @@ WW8TableInfo::processTableBoxLines(const SwTableBox * pBox,
const SwTableLine * pLine = rLines[n];
const SwTableBoxes & rBoxes = pLine->GetTabBoxes();
- for (USHORT nBox = 0; nBox < rBoxes.Count(); nBox++)
+ for (sal_uInt16 nBox = 0; nBox < rBoxes.Count(); nBox++)
pNodeInfo = processTableBoxLines(rBoxes[nBox], pTable, pBoxToSet, nRow, nCell, nDepth);
}
}
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index d31b66bd450e..25fc96566def 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -133,8 +133,8 @@ class MSWordExportBase;
namespace sw { class Frame; }
namespace msword {
- const BYTE ColumnBreak = 0xE;
- const BYTE PageBreak = 0xC;
+ const sal_uInt8 ColumnBreak = 0xE;
+ const sal_uInt8 PageBreak = 0xC;
}
class AttributeOutputBase
@@ -202,7 +202,7 @@ public:
/// Output redlining.
virtual void Redline( const SwRedlineData* pRedline ) = 0;
- virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) = 0;
+ virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) = 0;
/// Output FKP (Formatted disK Page) - necessary for binary formats only.
/// FIXME having it in AttributeOutputBase is probably a hack, it
@@ -210,7 +210,7 @@ public:
virtual void OutputFKP() {}
/// Output style.
- virtual void ParagraphStyle( USHORT nStyle ) = 0;
+ virtual void ParagraphStyle( sal_uInt16 nStyle ) = 0;
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo ) = 0;
@@ -244,27 +244,27 @@ public:
virtual void StartStyles() = 0;
/// End of the styles table.
- virtual void EndStyles( USHORT nNumberOfStyles ) = 0;
+ virtual void EndStyles( sal_uInt16 nNumberOfStyles ) = 0;
/// Write default style.
- virtual void DefaultStyle( USHORT nStyle ) = 0;
+ virtual void DefaultStyle( sal_uInt16 nStyle ) = 0;
/// Start of a style in the styles table.
virtual void StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT nWwId, USHORT nId,
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId,
bool bAutoUpdate ) = 0;
/// End of a style in the styles table.
virtual void EndStyle() = 0;
/// Start of (paragraph or run) properties of a style.
- virtual void StartStyleProperties( bool bParProp, USHORT nStyle ) = 0;
+ virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle ) = 0;
/// End of (paragraph or run) properties of a style.
virtual void EndStyleProperties( bool bParProp ) = 0;
/// Numbering rule and Id.
- virtual void OutlineNumbering( BYTE nLvl, const SwNumFmt& rNFmt, const SwFmt& rFmt ) = 0;
+ virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt& rNFmt, const SwFmt& rFmt ) = 0;
/// Page break
/// As a paragraph property - the paragraph should be on the next page.
@@ -272,7 +272,7 @@ public:
/// Write a section break
/// msword::ColumnBreak or msword::PageBreak
- virtual void SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo = NULL ) = 0;
+ virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL ) = 0;
/// Start of the section properties.
virtual void StartSection() = 0;
@@ -284,7 +284,7 @@ public:
virtual void SectionFormProtection( bool bProtected ) = 0;
/// Numbering of the lines in the document.
- virtual void SectionLineNumbering( ULONG nRestartNo, const SwLineNumberInfo& rLnNumInfo ) = 0;
+ virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo ) = 0;
/// Has different headers/footers for the title page.
virtual void SectionTitlePage() = 0;
@@ -298,30 +298,30 @@ public:
/// The style of the page numbers.
///
/// nPageRestartNumberr being 0 means no restart.
- virtual void SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber ) = 0;
+ virtual void SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber ) = 0;
/// The type of breaking.
- virtual void SectionType( BYTE nBreakCode ) = 0;
+ virtual void SectionType( sal_uInt8 nBreakCode ) = 0;
/// Special header/footer flags, needed for old versions only.
- virtual void SectionWW6HeaderFooterFlags( BYTE /*nHeadFootFlags*/ ) {}
+ virtual void SectionWW6HeaderFooterFlags( sal_uInt8 /*nHeadFootFlags*/ ) {}
/// Definition of a numbering instance.
- virtual void NumberingDefinition( USHORT nId, const SwNumRule &rRule ) = 0;
+ virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule ) = 0;
/// Start of the abstract numbering definition instance.
- virtual void StartAbstractNumbering( USHORT /*nId*/ ) {}
+ virtual void StartAbstractNumbering( sal_uInt16 /*nId*/ ) {}
/// End of the abstract numbering definition instance.
virtual void EndAbstractNumbering() {}
/// All the numbering level information.
- virtual void NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+ virtual void NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE *pNumLvlPos,
- BYTE nFollow,
+ const sal_uInt8 *pNumLvlPos,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -534,7 +534,7 @@ protected:
/// Sfx item RES_COL
void FormatColumns( const SwFmtCol& );
- virtual void FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize ) = 0;
+ virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize ) = 0;
/// Sfx item RES_KEEP
virtual void FormatKeep( const SvxFmtKeepItem& ) = 0;
@@ -575,7 +575,7 @@ public:
void OutputItem( const SfxPoolItem& rHt );
/// Use OutputItem() on an item set - for styles.
- void OutputStyleItemSet( const SfxItemSet& rSet, BOOL bDeep, BOOL bTestForDefault );
+ void OutputStyleItemSet( const SfxItemSet& rSet, sal_Bool bDeep, sal_Bool bTestForDefault );
/// Output frames.
void OutputFlyFrame( const sw::Frame& rFmt );
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 4d3aba513a19..443483f36c59 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -41,7 +41,7 @@
#include "charfmt.hxx"
#include "breakit.hxx"
-#include <oox/core/tokens.hxx>
+#include <oox/token/tokens.hxx>
#include <oox/export/drawingml.hxx>
#include <oox/export/utils.hxx>
#include <oox/export/vmlexport.hxx>
@@ -146,6 +146,7 @@ using rtl::OUString;
using rtl::OUStringBuffer;
using rtl::OUStringToOString;
+using namespace oox;
using namespace docx;
using namespace sax_fastparser;
using namespace nsSwDocInfoSubType;
@@ -307,8 +308,8 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
const SwFrmFmt& rFrmFmt = m_pParentFrame->GetFrmFmt( );
const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx();
- ULONG nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
- ULONG nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
+ sal_uLong nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
+ sal_uLong nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
m_rExport.SaveData( nStt, nEnd );
@@ -330,7 +331,7 @@ void DocxAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointe
const SwTable *pTable = pInner->getTable( );
const SwTableLines& rLines = pTable->GetTabLines( );
- USHORT nLinesCount = rLines.Count( );
+ sal_uInt16 nLinesCount = rLines.Count( );
// HACK
// msoffice seems to have an internal limitation of 63 columns for tables
// and refuses to load .docx with more, even though the spec seems to allow that;
@@ -596,7 +597,7 @@ void DocxAttributeOutput::DoWriteBookmarks()
const OString& rName = *it;
// Output the bookmark
- USHORT nId = m_nNextMarkId++;
+ sal_uInt16 nId = m_nNextMarkId++;
m_rOpenedMarksIds[rName] = nId;
m_pSerializer->singleElementNS( XML_w, XML_bookmarkStart,
FSNS( XML_w, XML_id ), OString::valueOf( sal_Int32( nId ) ).getStr( ),
@@ -612,10 +613,10 @@ void DocxAttributeOutput::DoWriteBookmarks()
const OString& rName = *it;
// Get the id of the bookmark
- std::map< OString, USHORT >::iterator pPos = m_rOpenedMarksIds.find( rName );
+ std::map< OString, sal_uInt16 >::iterator pPos = m_rOpenedMarksIds.find( rName );
if ( pPos != m_rOpenedMarksIds.end( ) )
{
- USHORT nId = ( *pPos ).second;
+ sal_uInt16 nId = ( *pPos ).second;
m_pSerializer->singleElementNS( XML_w, XML_bookmarkEnd,
FSNS( XML_w, XML_id ), OString::valueOf( sal_Int32( nId ) ).getStr( ),
FSEND );
@@ -674,7 +675,7 @@ void DocxAttributeOutput::StartField_Impl( FieldInfos& rInfos, sal_Bool bWriteRu
if ( rInfos.pField && rInfos.eType == ww::eUNKNOWN )
{
// Expand unsupported fields
- RunText( rInfos.pField->GetCntnt() );
+ RunText( rInfos.pField->GetFieldName() );
}
else if ( rInfos.eType != ww::eNONE ) // HYPERLINK fields are just commands
{
@@ -788,7 +789,7 @@ void DocxAttributeOutput::EndField_Impl( FieldInfos& rInfos )
m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
// Find another way for hyperlinks
- RunText( rInfos.pField->GetCntnt() );
+ RunText( rInfos.pField->GetFieldName() );
m_pSerializer->endElementNS( XML_w, XML_r );
}
@@ -815,7 +816,7 @@ void DocxAttributeOutput::EndField_Impl( FieldInfos& rInfos )
// should be visible
if ( rInfos.pField )
{
- USHORT nSubType = rInfos.pField->GetSubType( );
+ sal_uInt16 nSubType = rInfos.pField->GetSubType( );
bool bIsSetField = rInfos.pField->GetTyp( )->Which( ) == RES_SETEXPFLD;
bool bShowRef = ( !bIsSetField || ( nSubType & nsSwExtendedSubType::SUB_INVISIBLE ) ) ? false : true;
@@ -1090,7 +1091,7 @@ void DocxAttributeOutput::StartRuby( const SwTxtNode& rNode, xub_StrLen nPos, co
StartRunProperties( );
SwWW8AttrIter aAttrIt( m_rExport, rNode );
aAttrIt.OutAttr( nPos, true );
- USHORT nStyle = m_rExport.GetId( *rRuby.GetTxtRuby()->GetCharFmt() );
+ sal_uInt16 nStyle = m_rExport.GetId( *rRuby.GetTxtRuby()->GetCharFmt() );
OString aStyleId( "style" );
aStyleId += OString::valueOf( sal_Int32( nStyle ) );
m_pSerializer->singleElementNS( XML_w, XML_rStyle,
@@ -1314,12 +1315,12 @@ void DocxAttributeOutput::EndRedline()
m_pRedlineData = NULL;
}
-void DocxAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, USHORT /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t )
+void DocxAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, sal_uInt16 /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t )
{
- OSL_TRACE( "TODO DocxAttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle )\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle )\n" );
}
-void DocxAttributeOutput::ParagraphStyle( USHORT nStyle )
+void DocxAttributeOutput::ParagraphStyle( sal_uInt16 nStyle )
{
OString aStyleId( "style" );
aStyleId += OString::valueOf( sal_Int32( nStyle ) );
@@ -1347,13 +1348,13 @@ static OString impl_ConvertColor( const Color &rColor )
return color;
}
-static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, const SvxBorderLine* pBorderLine, USHORT nDist )
+static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, const SvxBorderLine* pBorderLine, sal_uInt16 nDist )
{
FastAttributeList* pAttr = pSerializer->createAttrList();
- USHORT inW = pBorderLine->GetInWidth();
- USHORT outW = pBorderLine->GetOutWidth();
- USHORT nWidth = inW + outW;
+ sal_uInt16 inW = pBorderLine->GetInWidth();
+ sal_uInt16 outW = pBorderLine->GetOutWidth();
+ sal_uInt16 nWidth = inW + outW;
// Compute val attribute value
// Can be one of:
@@ -1397,8 +1398,8 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co
// The unit is the 8th of point
nWidth = sal_Int32( nWidth / 2.5 );
- USHORT nMinWidth = 2;
- USHORT nMaxWidth = 96;
+ sal_uInt16 nMinWidth = 2;
+ sal_uInt16 nMaxWidth = 96;
if ( nWidth > nMaxWidth )
nWidth = nMaxWidth;
@@ -1420,7 +1421,7 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co
static void impl_pageBorders( FSHelperPtr pSerializer, const SvxBoxItem& rBox, bool bUseStartEnd = false )
{
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
@@ -1432,7 +1433,7 @@ static void impl_pageBorders( FSHelperPtr pSerializer, const SvxBoxItem& rBox, b
XML_bottom,
bUseStartEnd ? XML_end : XML_right
};
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
for( int i = 0; i < 4; ++i, ++pBrd )
{
const SvxBorderLine* pLn = rBox.GetLine( *pBrd );
@@ -1461,7 +1462,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ];
SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
- USHORT nColSpan = pCell->GetColSpan();
+ sal_uInt16 nColSpan = pCell->GetColSpan();
if ( nColSpan > 1 )
m_pSerializer->singleElementNS( XML_w, XML_gridSpan,
FSNS( XML_w, XML_val ), OString::valueOf( sal_Int32( nColSpan ) ).getStr(),
@@ -1493,7 +1494,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
// Cell margins
m_pSerializer->startElementNS( XML_w, XML_tcMar, FSEND );
const SvxBoxItem& rBox = pFmt->GetBox( );
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
@@ -1505,7 +1506,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
XML_bottom,
bEcma ? XML_right : XML_end
};
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
for( int i = 0; i < 4; ++i, ++pBrd )
{
sal_Int32 nDist = sal_Int32( rBox.GetDistance( *pBrd ) );
@@ -1538,8 +1539,8 @@ void DocxAttributeOutput::InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t
if( pLayout && pLayout->IsExportable() )
m_pTableWrt = new SwWriteTable( pLayout );
else
- m_pTableWrt = new SwWriteTable( pTable->GetTabLines(), (USHORT)nPageSize,
- (USHORT)nTblSz, false);
+ m_pTableWrt = new SwWriteTable( pTable->GetTabLines(), (sal_uInt16)nPageSize,
+ (sal_uInt16)nTblSz, false);
}
void DocxAttributeOutput::StartTable( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )
@@ -1830,16 +1831,16 @@ void DocxAttributeOutput::StartStyles()
FSEND );
}
-void DocxAttributeOutput::EndStyles( USHORT /*nNumberOfStyles*/ )
+void DocxAttributeOutput::EndStyles( sal_uInt16 /*nNumberOfStyles*/ )
{
m_pSerializer->endElementNS( XML_w, XML_styles );
}
-void DocxAttributeOutput::DefaultStyle( USHORT nStyle )
+void DocxAttributeOutput::DefaultStyle( sal_uInt16 nStyle )
{
// are these the values of enum ww::sti (see ../inc/wwstyles.hxx)?
#if OSL_DEBUG_LEVEL > 1
- OSL_TRACE( "TODO DocxAttributeOutput::DefaultStyle( USHORT nStyle )- %d\n", nStyle );
+ OSL_TRACE( "TODO DocxAttributeOutput::DefaultStyle( sal_uInt16 nStyle )- %d\n", nStyle );
#else
(void) nStyle; // to quiet the warning
#endif
@@ -2227,7 +2228,7 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po
}
void DocxAttributeOutput::StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT /*nWwId*/, USHORT nId, bool bAutoUpdate )
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 /*nWwId*/, sal_uInt16 nId, bool bAutoUpdate )
{
OString aStyle( "style" );
@@ -2260,7 +2261,7 @@ void DocxAttributeOutput::EndStyle()
m_pSerializer->endElementNS( XML_w, XML_style );
}
-void DocxAttributeOutput::StartStyleProperties( bool bParProp, USHORT /*nStyle*/ )
+void DocxAttributeOutput::StartStyleProperties( bool bParProp, sal_uInt16 /*nStyle*/ )
{
if ( bParProp )
{
@@ -2288,7 +2289,7 @@ void DocxAttributeOutput::EndStyleProperties( bool bParProp )
}
}
-void DocxAttributeOutput::OutlineNumbering( BYTE nLvl, const SwNumFmt& /*rNFmt*/, const SwFmt& /*rFmt*/ )
+void DocxAttributeOutput::OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt& /*rNFmt*/, const SwFmt& /*rFmt*/ )
{
if ( nLvl >= WW8ListManager::nMaxLevel )
nLvl = WW8ListManager::nMaxLevel - 1;
@@ -2308,7 +2309,7 @@ void DocxAttributeOutput::PageBreakBefore( bool bBreak )
FSEND );
}
-void DocxAttributeOutput::SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo )
+void DocxAttributeOutput::SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo )
{
switch ( nC )
{
@@ -2420,7 +2421,7 @@ void DocxAttributeOutput::SectionFormProtection( bool bProtected )
FSNS( XML_w, XML_val ), "false", FSEND );
}
-void DocxAttributeOutput::SectionLineNumbering( ULONG /*nRestartNo*/, const SwLineNumberInfo& /*rLnNumInfo*/ )
+void DocxAttributeOutput::SectionLineNumbering( sal_uLong /*nRestartNo*/, const SwLineNumberInfo& /*rLnNumInfo*/ )
{
// see 2.6.8 lnNumType (Line Numbering Settings)
OSL_TRACE( "TODO DocxAttributeOutput::SectionLineNumbering()\n" );
@@ -2463,7 +2464,7 @@ void DocxAttributeOutput::SectionBiDi( bool bBiDi )
m_pSerializer->singleElementNS( XML_w, XML_bidi, FSEND );
}
-static OString impl_NumberingType( USHORT nNumberingType )
+static OString impl_NumberingType( sal_uInt16 nNumberingType )
{
OString aType;
@@ -2487,7 +2488,7 @@ static OString impl_NumberingType( USHORT nNumberingType )
return aType;
}
-void DocxAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber )
+void DocxAttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber )
{
// FIXME Not called properly with page styles like "First Page"
@@ -2509,7 +2510,7 @@ void DocxAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRes
OSL_TRACE( "TODO DocxAttributeOutput::SectionPageNumbering()\n" );
}
-void DocxAttributeOutput::SectionType( BYTE nBreakCode )
+void DocxAttributeOutput::SectionType( sal_uInt8 nBreakCode )
{
/* break code: 0 No break, 1 New column
2 New page, 3 Even page, 4 Odd page
@@ -2602,7 +2603,7 @@ void DocxAttributeOutput::FontPitchType( FontPitch ePitch ) const
FSEND );
}
-void DocxAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &rRule )
+void DocxAttributeOutput::NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule )
{
// nId is the same both for abstract numbering definition as well as the
// numbering definition itself
@@ -2628,7 +2629,7 @@ void DocxAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &rRul
m_pSerializer->endElementNS( XML_w, XML_num );
}
-void DocxAttributeOutput::StartAbstractNumbering( USHORT nId )
+void DocxAttributeOutput::StartAbstractNumbering( sal_uInt16 nId )
{
m_pSerializer->startElementNS( XML_w, XML_abstractNum,
FSNS( XML_w, XML_abstractNumId ), OString::valueOf( sal_Int32( nId ) ).getStr(),
@@ -2640,12 +2641,12 @@ void DocxAttributeOutput::EndAbstractNumbering()
m_pSerializer->endElementNS( XML_w, XML_abstractNum );
}
-void DocxAttributeOutput::NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE * /*pNumLvlPos*/,
- BYTE nFollow,
+ const sal_uInt8 * /*pNumLvlPos*/,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -3153,7 +3154,7 @@ void DocxAttributeOutput::TextCharFormat( const SwFmtCharFmt& rCharFmt )
void DocxAttributeOutput::RefField( const SwField& rFld, const String& rRef )
{
- USHORT nType = rFld.GetTyp( )->Which( );
+ sal_uInt16 nType = rFld.GetTyp( )->Which( );
if ( nType == RES_GETEXPFLD )
{
String sCmd = FieldString( ww::eREF );
@@ -3201,7 +3202,7 @@ void DocxAttributeOutput::WriteExpand( const SwField* pFld )
m_rExport.OutputField( pFld, ww::eUNKNOWN, sCmd );
}
-void DocxAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, BYTE nMode )
+void DocxAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, sal_uInt8 nMode )
{
struct FieldInfos infos;
infos.pField = pFld;
@@ -3213,8 +3214,8 @@ void DocxAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField eType
if ( pFld )
{
- USHORT nType = pFld->GetTyp( )->Which( );
- USHORT nSubType = pFld->GetSubType();
+ sal_uInt16 nType = pFld->GetTyp( )->Which( );
+ sal_uInt16 nSubType = pFld->GetSubType();
// TODO Any other field types here ?
if ( ( nType == RES_SETEXPFLD ) && ( nSubType & nsSwGetSetExpType::GSE_STRING ) )
@@ -3531,7 +3532,7 @@ void DocxAttributeOutput::ParaNumRule_Impl( const SwTxtNode* /*pTxtNd*/, sal_Int
void DocxAttributeOutput::ParaScriptSpace( const SfxBoolItem& rScriptSpace )
{
- USHORT nXmlElement = 0;
+ sal_uInt16 nXmlElement = 0;
switch ( rScriptSpace.Which( ) )
{
@@ -3648,7 +3649,7 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
if ( !m_pSectionSpacingAttrList )
m_pSectionSpacingAttrList = m_pSerializer->createAttrList();
- USHORT nLDist, nRDist;
+ sal_uInt16 nLDist, nRDist;
const SfxPoolItem* pItem = m_rExport.HasItem( RES_BOX );
if ( pItem )
{
@@ -3657,8 +3658,8 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
}
else
nLDist = nRDist = 0;
- nLDist = nLDist + (USHORT)rLRSpace.GetLeft();
- nRDist = nRDist + (USHORT)rLRSpace.GetRight();
+ nLDist = nLDist + (sal_uInt16)rLRSpace.GetLeft();
+ nRDist = nRDist + (sal_uInt16)rLRSpace.GetRight();
m_pSectionSpacingAttrList->add( FSNS( XML_w, XML_left ), OString::valueOf( sal_Int32( nLDist ) ) );
m_pSectionSpacingAttrList->add( FSNS( XML_w, XML_right ), OString::valueOf( sal_Int32( nRDist ) ) );
@@ -3918,7 +3919,7 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox )
}
}
-void DocxAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize )
+void DocxAttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize )
{
// Get the columns attributes
FastAttributeList *pColsAttrList = m_pSerializer->createAttrList();
@@ -3929,7 +3930,7 @@ void DocxAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol
const char* pEquals = "false";
if ( bEven )
{
- USHORT nWidth = rCol.GetGutterWidth( true );
+ sal_uInt16 nWidth = rCol.GetGutterWidth( true );
pColsAttrList->add( FSNS( XML_w, XML_space ),
OString::valueOf( sal_Int32( nWidth ) ).getStr( ) );
@@ -3948,16 +3949,16 @@ void DocxAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol
const SwColumns & rColumns = rCol.GetColumns( );
if ( !bEven )
{
- for ( USHORT n = 0; n < nCols; ++n )
+ for ( sal_uInt16 n = 0; n < nCols; ++n )
{
FastAttributeList *pColAttrList = m_pSerializer->createAttrList();
- USHORT nWidth = rCol.CalcPrtColWidth( n, ( USHORT ) nPageSize );
+ sal_uInt16 nWidth = rCol.CalcPrtColWidth( n, ( sal_uInt16 ) nPageSize );
pColAttrList->add( FSNS( XML_w, XML_w ),
OString::valueOf( sal_Int32( nWidth ) ).getStr( ) );
if ( n + 1 != nCols )
{
- USHORT nSpacing = rColumns[n]->GetRight( ) + rColumns[n + 1]->GetLeft( );
+ sal_uInt16 nSpacing = rColumns[n]->GetRight( ) + rColumns[n + 1]->GetLeft( );
pColAttrList->add( FSNS( XML_w, XML_space ),
OString::valueOf( sal_Int32( nSpacing ) ).getStr( ) );
}
@@ -3997,7 +3998,7 @@ void DocxAttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
}
pGridAttrList->add( FSNS( XML_w, XML_type ), sGridType.getStr( ) );
- UINT16 nHeight = rGrid.GetBaseHeight() + rGrid.GetRubyHeight();
+ sal_uInt16 nHeight = rGrid.GetBaseHeight() + rGrid.GetRubyHeight();
pGridAttrList->add( FSNS( XML_w, XML_linePitch ),
OString::valueOf( sal_Int32( nHeight ) ).getStr( ) );
@@ -4014,7 +4015,7 @@ void DocxAttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
sal_uInt16 nPitch = rGrid.IsSquaredMode() ? rGrid.GetBaseHeight() :
rGrid.GetBaseWidth( );
- INT32 nCharSpace = ( nPitch - nPageCharSize ) * 4096 / 20;
+ sal_Int32 nCharSpace = ( nPitch - nPageCharSize ) * 4096 / 20;
pGridAttrList->add( FSNS( XML_w, XML_charSpace ),
OString::valueOf( sal_Int32( nCharSpace ) ).getStr( ) );
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index 748b7060fdd9..8eee66c51ad6 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -138,10 +138,10 @@ public:
/// End of the tag that encloses the run.
void EndRedline();
- virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
+ virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
/// Output style.
- virtual void ParagraphStyle( USHORT nStyle );
+ virtual void ParagraphStyle( sal_uInt16 nStyle );
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
@@ -162,27 +162,27 @@ public:
virtual void StartStyles();
/// End of the styles table.
- virtual void EndStyles( USHORT nNumberOfStyles );
+ virtual void EndStyles( sal_uInt16 nNumberOfStyles );
/// Write default style.
- virtual void DefaultStyle( USHORT nStyle );
+ virtual void DefaultStyle( sal_uInt16 nStyle );
/// Start of a style in the styles table.
virtual void StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT nWwId, USHORT nId,
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId,
bool bAutoUpdate );
/// End of a style in the styles table.
virtual void EndStyle();
/// Start of (paragraph or run) properties of a style.
- virtual void StartStyleProperties( bool bParProp, USHORT nStyle );
+ virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle );
/// End of (paragraph or run) properties of a style.
virtual void EndStyleProperties( bool bParProp );
/// Numbering rule and Id.
- virtual void OutlineNumbering( BYTE nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
+ virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
/// Page break
/// As a paragraph property - the paragraph should be on the next page.
@@ -190,7 +190,7 @@ public:
/// Write a section break
/// msword::ColumnBreak or msword::PageBreak
- virtual void SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo = NULL );
+ virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL );
/// Start of the section properties.
virtual void StartSection();
@@ -202,7 +202,7 @@ public:
virtual void SectionFormProtection( bool bProtected );
/// Numbering of the lines in the document.
- virtual void SectionLineNumbering( ULONG nRestartNo, const SwLineNumberInfo& rLnNumInfo );
+ virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo );
/// Has different headers/footers for the title page.
virtual void SectionTitlePage();
@@ -216,10 +216,10 @@ public:
/// The style of the page numbers.
///
/// nPageRestartNumberr being 0 means no restart.
- virtual void SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber );
+ virtual void SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber );
/// The type of breaking.
- virtual void SectionType( BYTE nBreakCode );
+ virtual void SectionType( sal_uInt8 nBreakCode );
/// Start the font.
void StartFont( const String& rFamilyName ) const;
@@ -240,21 +240,21 @@ public:
void FontPitchType( FontPitch ePitch ) const;
/// Definition of a numbering instance.
- virtual void NumberingDefinition( USHORT nId, const SwNumRule &rRule );
+ virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule );
/// Start of the abstract numbering definition instance.
- virtual void StartAbstractNumbering( USHORT nId );
+ virtual void StartAbstractNumbering( sal_uInt16 nId );
/// End of the abstract numbering definition instance.
virtual void EndAbstractNumbering();
/// All the numbering level information.
- virtual void NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+ virtual void NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE *pNumLvlPos,
- BYTE nFollow,
+ const sal_uInt8 *pNumLvlPos,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -262,7 +262,7 @@ public:
sal_Int16 nListTabPos,
const String &rNumberingString );
- void WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, BYTE nMode );
+ void WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, sal_uInt8 nMode );
void WriteFormData_Impl( const ::sw::mark::IFieldmark& rFieldmark );
void WriteBookmarks_Impl( std::vector< rtl::OUString >& rStarts, std::vector< rtl::OUString >& rEnds );
@@ -485,7 +485,7 @@ protected:
virtual void FormatBox( const SvxBoxItem& );
/// Sfx item RES_COL
- virtual void FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
+ virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
/// Sfx item RES_KEEP
virtual void FormatKeep( const SvxFmtKeepItem& );
@@ -560,7 +560,7 @@ private:
std::vector<rtl::OString> m_rMarksEnd;
/// Maps of the bookmarks ids
- std::map<rtl::OString, USHORT> m_rOpenedMarksIds;
+ std::map<rtl::OString, sal_uInt16> m_rOpenedMarksIds;
/// The current table helper
SwWriteTable *m_pTableWrt;
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index fd837264cd56..0bd0908ed9e5 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -35,7 +35,7 @@
#include <com/sun/star/i18n/ScriptType.hdl>
#include <com/sun/star/frame/XModel.hpp>
-#include <oox/core/tokens.hxx>
+#include <oox/token/tokens.hxx>
#include <oox/export/drawingml.hxx>
#include <oox/export/vmlexport.hxx>
#include <oox/export/chartexport.hxx>
@@ -67,6 +67,7 @@
using namespace sax_fastparser;
using namespace ::comphelper;
using namespace ::com::sun::star;
+using namespace ::oox;
using oox::vml::VMLExport;
@@ -87,7 +88,7 @@ MSWordSections& DocxExport::Sections() const
return *m_pSections;
}
-bool DocxExport::CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich )
+bool DocxExport::CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich )
{
// TODO FIXME is this actually true for docx? - this is ~copied from WW8
if ( nScript == i18n::ScriptType::ASIAN )
@@ -191,8 +192,8 @@ bool DocxExport::DisallowInheritingOutlineNumbering( const SwFmt& rFmt )
return bRet;
}
-void DocxExport::WriteHeadersFooters( BYTE nHeadFootFlags,
- const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE /*nBreakCode*/ )
+void DocxExport::WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
+ const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 /*nBreakCode*/ )
{
// headers
if ( nHeadFootFlags & nsHdFtFlags::WW8_HEADER_EVEN )
@@ -219,7 +220,7 @@ void DocxExport::WriteHeadersFooters( BYTE nHeadFootFlags,
#endif
}
-void DocxExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, BYTE nMode )
+void DocxExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, sal_uInt8 nMode )
{
m_pAttrOutput->WriteField_Impl( pFld, eFldType, rFldCmd, nMode );
}
@@ -348,7 +349,7 @@ void DocxExport::OutputPageSectionBreaks( const SwTxtNode& )
}
-void DocxExport::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum )
+void DocxExport::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum )
{
AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo() );
m_pSections->AppendSection( pPageDesc, pFmt, nLnNum );
@@ -378,7 +379,7 @@ void DocxExport::OutputEndNode( const SwEndNode& rEndNode )
if( !pParentFmt )
pParentFmt = (SwSectionFmt*)0xFFFFFFFF;
- ULONG nRstLnNum;
+ sal_uLong nRstLnNum;
if( rNd.IsCntntNode() )
nRstLnNum = const_cast< SwCntntNode* >( rNd.GetCntntNode() )->GetSwAttrSet().GetLineNumber().GetStartValue();
else
@@ -410,7 +411,7 @@ void DocxExport::OutputLinkedOLE( const OUString& )
// Nothing to implement here: WW8 only
}
-ULONG DocxExport::ReplaceCr( BYTE )
+sal_uLong DocxExport::ReplaceCr( sal_uInt8 )
{
// Completely unused for Docx export... only here for code sharing
// purpose with binary export
@@ -426,7 +427,7 @@ void DocxExport::PrepareNewPageDesc( const SfxItemSet* pSet,
AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo() );
const SwSectionFmt* pFmt = GetSectionFormat( rNd );
- const ULONG nLnNm = GetSectionLineNo( pSet, rNd );
+ const sal_uLong nLnNm = GetSectionLineNo( pSet, rNd );
OSL_ENSURE( pNewPgDescFmt || pNewPgDesc, "Neither page desc format nor page desc provided." );
@@ -681,7 +682,7 @@ XFastAttributeListRef DocxExport::MainXmlNamespaces( FSHelperPtr serializer )
return XFastAttributeListRef( pAttr );
}
-bool DocxExport::ignoreAttributeForStyles( USHORT nWhich ) const
+bool DocxExport::ignoreAttributeForStyles( sal_uInt16 nWhich ) const
{
if( nWhich == RES_TEXTGRID )
return true; // w:docGrid is written only to document.xml, not to styles.xml
diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx
index 411346d3c927..4838d55868c4 100644
--- a/sw/source/filter/ww8/docxexport.hxx
+++ b/sw/source/filter/ww8/docxexport.hxx
@@ -99,10 +99,10 @@ public:
/// Determines if the format is expected to support unicode.
virtual bool SupportsUnicode() const { return true; }
- virtual bool ignoreAttributeForStyles( USHORT nWhich ) const;
+ virtual bool ignoreAttributeForStyles( sal_uInt16 nWhich ) const;
/// Guess the script (asian/western).
- virtual bool CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich );
+ virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich );
virtual void AppendBookmarks( const SwTxtNode& rNode, xub_StrLen nAktPos, xub_StrLen nLen );
@@ -118,12 +118,12 @@ public:
virtual bool DisallowInheritingOutlineNumbering( const SwFmt &rFmt );
/// Output the actual headers and footers.
- virtual void WriteHeadersFooters( BYTE nHeadFootFlags,
- const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE nBreakCode );
+ virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
+ const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 nBreakCode );
/// Write the field
virtual void OutputField( const SwField* pFld, ww::eField eFldType,
- const String& rFldCmd, BYTE nMode = nsFieldFlags::WRITEFIELD_ALL );
+ const String& rFldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL );
/// Write the data of the form field
virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark );
@@ -137,7 +137,7 @@ public:
virtual void DoFormText(const SwInputField * pFld);
- virtual ULONG ReplaceCr( BYTE nChar );
+ virtual sal_uLong ReplaceCr( sal_uInt8 nChar );
/// Returns the relationd id
rtl::OString OutputChart( com::sun::star::uno::Reference< com::sun::star::frame::XModel >& xModel, sal_Int32 nCount );
@@ -163,7 +163,7 @@ protected:
virtual void OutputLinkedOLE( const rtl::OUString& );
- virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum );
+ virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum );
virtual void SectionBreaksAndFrames( const SwTxtNode& /*rNode*/ ) {}
diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx
index ed3d29a08c72..b784e8404b8f 100644
--- a/sw/source/filter/ww8/docxexportfilter.cxx
+++ b/sw/source/filter/ww8/docxexportfilter.cxx
@@ -35,7 +35,7 @@
#include <pam.hxx>
#include <unotxdoc.hxx>
-#include <cppuhelper/factory.hxx>
+#include <cppuhelper/implementationentry.hxx>
using namespace ::comphelper;
using namespace ::com::sun::star;
@@ -43,8 +43,8 @@ using ::rtl::OUString;
#define S( x ) OUString( RTL_CONSTASCII_USTRINGPARAM( x ) )
-DocxExportFilter::DocxExportFilter( const uno::Reference< lang::XMultiServiceFactory >& rMSF )
- : oox::core::XmlFilterBase( rMSF )
+DocxExportFilter::DocxExportFilter( const uno::Reference< uno::XComponentContext >& xContext )
+ : oox::core::XmlFilterBase( xContext )
{
}
@@ -115,121 +115,48 @@ uno::Sequence< OUString > SAL_CALL DocxExport_getSupportedServiceNames() throw()
return aSeq;
}
-uno::Reference< uno::XInterface > SAL_CALL DocxExport_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) throw( uno::Exception )
+uno::Reference< uno::XInterface > SAL_CALL DocxExport_createInstance(const uno::Reference< uno::XComponentContext > & xCtx ) throw( uno::Exception )
{
- return (cppu::OWeakObject*) new DocxExportFilter( rSMgr );
+ return (cppu::OWeakObject*) new DocxExportFilter( xCtx );
}
-#ifdef __cplusplus
extern "C"
{
-#endif
SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */, void* pRegistryKey )
-{
- sal_Bool bRet = sal_False;
-
- if( pRegistryKey )
- {
- try
- {
- uno::Reference< registry::XRegistryKey > xNewKey1(
- static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey(
- OUString(RTL_CONSTASCII_USTRINGPARAM(IMPL_NAME "/UNO/SERVICES/" ))) );
- xNewKey1->createKey( DocxExport_getSupportedServiceNames().getConstArray()[0] );
-
- bRet = sal_True;
- }
- catch( registry::InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException (docx)!" );
- }
-
- try
- {
- uno::Reference< registry::XRegistryKey > xNewKey1(
- static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey(
- OUString(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME_RTFEXPORT "/UNO/SERVICES/" )) ) );
- xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] );
-
- bRet = sal_True;
- }
- catch( registry::InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfexport)!" );
- }
-
- try
- {
- uno::Reference< registry::XRegistryKey > xNewKey1(
- static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey(
- OUString(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME_RTFIMPORT "/UNO/SERVICES/" )) ) );
- xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] );
-
- bRet = sal_True;
- }
- catch( registry::InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfimport)!" );
- }
- }
-
- return bRet;
-}
-
// ------------------------
// - component_getFactory -
// ------------------------
-SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ )
+::cppu::ImplementationEntry entries [] =
{
- OSL_TRACE("%s, pImplName is '%s'", OSL_THIS_FUNC, pImplName);
- uno::Reference< lang::XSingleServiceFactory > xFactory;
- void* pRet = 0;
-
- if ( rtl_str_compare( pImplName, IMPL_NAME ) == 0 )
{
- const OUString aServiceName( OUString(RTL_CONSTASCII_USTRINGPARAM(IMPL_NAME)) );
-
- xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
- reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
- DocxExport_getImplementationName(),
- DocxExport_createInstance,
- DocxExport_getSupportedServiceNames() ) );
- } else if ( rtl_str_compare( pImplName, IMPL_NAME_RTFEXPORT ) == 0 ) {
- const OUString aServiceName(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME_RTFEXPORT));
-
- xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
- reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
- RtfExport_getImplementationName(),
- RtfExport_createInstance,
- RtfExport_getSupportedServiceNames() ) );
- } else if ( rtl_str_compare( pImplName, IMPL_NAME_RTFIMPORT ) == 0 ) {
- const OUString aServiceName( OUString(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME_RTFIMPORT )) );
-
- xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
- reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
- RtfImport_getImplementationName(),
- RtfImport_createInstance,
- RtfImport_getSupportedServiceNames() ) );
- }
-
- if ( xFactory.is() )
+ DocxExport_createInstance, DocxExport_getImplementationName,
+ DocxExport_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
+ 0, 0
+ },
{
- xFactory->acquire();
- pRet = xFactory.get();
- }
-
- return pRet;
+ RtfExport_createInstance, RtfExport_getImplementationName,
+ RtfExport_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
+ 0, 0
+ },
+ {
+ RtfImport_createInstance, RtfImport_getImplementationName,
+ RtfImport_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
+ 0, 0
+ },
+ { 0, 0, 0, 0, 0, 0 }
+};
+
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* pRegistryKey )
+{
+ return ::cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey, entries );
}
-#ifdef __cplusplus
-}
-#endif
+} // extern "C"
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxexportfilter.hxx b/sw/source/filter/ww8/docxexportfilter.hxx
index 0d6432a79805..68c11242ea0b 100644
--- a/sw/source/filter/ww8/docxexportfilter.hxx
+++ b/sw/source/filter/ww8/docxexportfilter.hxx
@@ -39,7 +39,7 @@
class DocxExportFilter : public oox::core::XmlFilterBase
{
public:
- DocxExportFilter( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rMSF );
+ DocxExportFilter( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext );
// FIXME these should not even exist for the export-only filter!
// For now, let's just do empty implementations of those.
@@ -57,6 +57,11 @@ private:
/// Implementatio of the filter abstract method.
virtual ::rtl::OUString implGetImplementationName() const;
+
+ virtual ::oox::ole::VbaProject* implCreateVbaProject() const
+ {
+ return NULL; // FIXME: implement me !
+ }
};
#endif // _DOCXEXPORTFILTER_HXX_
diff --git a/sw/source/filter/ww8/docxfootnotes.hxx b/sw/source/filter/ww8/docxfootnotes.hxx
index 1d715e7ff260..300f50b34da8 100644
--- a/sw/source/filter/ww8/docxfootnotes.hxx
+++ b/sw/source/filter/ww8/docxfootnotes.hxx
@@ -31,7 +31,6 @@
#include <fmtftn.hxx>
-#include <oox/core/tokens.hxx>
#include <rtl/string.hxx>
#include <rtl/ustring.hxx>
#include <sax/fshelper.hxx>
diff --git a/sw/source/filter/ww8/escher.hxx b/sw/source/filter/ww8/escher.hxx
index 9d5ace7a05a0..55de32d362b2 100644
--- a/sw/source/filter/ww8/escher.hxx
+++ b/sw/source/filter/ww8/escher.hxx
@@ -106,7 +106,7 @@ protected:
SvStream* pEscherStrm;
long mnEmuMul, mnEmuDiv;
- virtual INT32 WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
+ virtual sal_Int32 WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
EscherPropertyContainer& rPropOpt);
void WriteBrushAttr(const SvxBrushItem &rBrush,
EscherPropertyContainer& rPropOpt);
@@ -115,19 +115,19 @@ protected:
sal_uInt32 nShapeId, const com::sun::star::awt::Rectangle* pVisArea );
void WriteGrfAttr(const SwNoTxtNode& rNd,EscherPropertyContainer& rPropOpt);
- INT32 DrawModelToEmu(INT32 nVal) const
+ sal_Int32 DrawModelToEmu(sal_Int32 nVal) const
{ return BigMulDiv(nVal, mnEmuMul, mnEmuDiv); }
- INT32 ToFract16(INT32 nVal, UINT32 nMax) const;
+ sal_Int32 ToFract16(sal_Int32 nVal, sal_uInt32 nMax) const;
- virtual void SetPicId(const SdrObject &, UINT32, EscherPropertyContainer &);
+ virtual void SetPicId(const SdrObject &, sal_uInt32, EscherPropertyContainer &);
SdrLayerID GetInvisibleHellId() const;
public:
SwBasicEscherEx(SvStream* pStrm, WW8Export& rWrt);
- INT32 WriteGrfFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId);
- INT32 WriteOLEFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId);
- void WriteEmptyFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId);
+ sal_Int32 WriteGrfFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
+ sal_Int32 WriteOLEFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
+ void WriteEmptyFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
virtual void WriteFrmExtraData(const SwFrmFmt&);
virtual void WritePictures();
virtual ~SwBasicEscherEx();
@@ -145,23 +145,23 @@ private:
WinwordAnchoring aWinwordAnchoring;
WW8_WrPlcTxtBoxes *pTxtBxs;
- UINT32 GetFlyShapeId(const SwFrmFmt& rFmt,
+ sal_uInt32 GetFlyShapeId(const SwFrmFmt& rFmt,
unsigned int nHdFtIndex, DrawObjPointerVector &rPVec);
void MakeZOrderArrAndFollowIds(std::vector<DrawObj>& rSrcArr,
DrawObjPointerVector& rDstArr);
- INT32 WriteFlyFrm(const DrawObj &rObj, UINT32 &rShapeId,
+ sal_Int32 WriteFlyFrm(const DrawObj &rObj, sal_uInt32 &rShapeId,
DrawObjPointerVector &rPVec);
- INT32 WriteTxtFlyFrame(const DrawObj &rObj, UINT32 nShapeId,
- UINT32 nTxtBox, DrawObjPointerVector &rPVec);
- void WriteOCXControl(const SwFrmFmt& rFmt,UINT32 nShapeId);
- virtual INT32 WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
+ sal_Int32 WriteTxtFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId,
+ sal_uInt32 nTxtBox, DrawObjPointerVector &rPVec);
+ void WriteOCXControl(const SwFrmFmt& rFmt,sal_uInt32 nShapeId);
+ virtual sal_Int32 WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
EscherPropertyContainer& rPropOpt);
- virtual UINT32 QueryTextID(
+ virtual sal_uInt32 QueryTextID(
const com::sun::star::uno::Reference<
- com::sun::star::drawing::XShape > &,UINT32);
- virtual void SetPicId(const SdrObject &rSdrObj, UINT32 nShapeId,
+ com::sun::star::drawing::XShape > &,sal_uInt32);
+ virtual void SetPicId(const SdrObject &rSdrObj, sal_uInt32 nShapeId,
EscherPropertyContainer &rPropOpt);
public:
SwEscherEx( SvStream* pStrm, WW8Export& rWW8Wrt );
diff --git a/sw/source/filter/ww8/makefile.mk b/sw/source/filter/ww8/makefile.mk
deleted file mode 100644
index 9c9455be8b41..000000000000
--- a/sw/source/filter/ww8/makefile.mk
+++ /dev/null
@@ -1,91 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=ww8
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-MAKING_LIBMSWORD=TRUE
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(mydebug)" != ""
-CDEFS=$(CDEFS) -Dmydebug
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES = \
- $(SLO)$/WW8FFData.obj \
- $(SLO)$/WW8FibData.obj \
- $(SLO)$/WW8Sttbf.obj \
- $(SLO)$/WW8TableInfo.obj \
- $(SLO)$/docxattributeoutput.obj \
- $(SLO)$/docxexport.obj \
- $(SLO)$/docxexportfilter.obj \
- $(SLO)$/fields.obj \
- $(SLO)$/rtfattributeoutput.obj \
- $(SLO)$/rtfexport.obj \
- $(SLO)$/rtfexportfilter.obj \
- $(SLO)$/rtfimportfilter.obj \
- $(SLO)$/rtfsdrexport.obj \
- $(SLO)$/styles.obj \
- $(SLO)$/tracer.obj \
- $(SLO)$/writerhelper.obj \
- $(SLO)$/writerwordglue.obj \
- $(SLO)$/wrtw8esh.obj \
- $(SLO)$/wrtw8nds.obj \
- $(SLO)$/wrtw8num.obj \
- $(SLO)$/wrtw8sty.obj \
- $(SLO)$/wrtww8.obj \
- $(SLO)$/wrtww8gr.obj \
- $(SLO)$/ww8atr.obj \
- $(SLO)$/ww8glsy.obj \
- $(SLO)$/ww8graf.obj \
- $(SLO)$/ww8graf2.obj \
- $(SLO)$/ww8par.obj \
- $(SLO)$/ww8par2.obj \
- $(SLO)$/ww8par3.obj \
- $(SLO)$/ww8par4.obj \
- $(SLO)$/ww8par5.obj \
- $(SLO)$/ww8par6.obj \
- $(SLO)$/ww8scan.obj \
- $(SLO)$/ww8toolbar.obj
-
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 0920dd5b30c2..30c460dc7b7f 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -203,7 +204,7 @@ static OString OutTBLBorderLine(RtfExport &rExport, const SvxBorderLine* pLine,
}
static OString OutBorderLine(RtfExport &rExport, const SvxBorderLine* pLine,
- const sal_Char* pStr, USHORT nDist)
+ const sal_Char* pStr, sal_uInt16 nDist)
{
OStringBuffer aRet;
aRet.append(OutTBLBorderLine(rExport, pLine, pStr));
@@ -535,12 +536,12 @@ void RtfAttributeOutput::Redline( const SwRedlineData* pRedline )
m_aRun.append(' ');
}
-void RtfAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, USHORT /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t /*pTextNodeInfoInner*/ )
+void RtfAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, sal_uInt16 /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t /*pTextNodeInfoInner*/ )
{
OSL_TRACE("TODO: %s", OSL_THIS_FUNC);
}
-void RtfAttributeOutput::ParagraphStyle( USHORT nStyle )
+void RtfAttributeOutput::ParagraphStyle( sal_uInt16 nStyle )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -594,7 +595,7 @@ void RtfAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
// Cell margins
const SvxBoxItem& rBox = pFmt->GetBox( );
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
@@ -638,7 +639,7 @@ void RtfAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
rLR.GetLeft() - rLR.GetRight();
}
SwTwips nTblSz = pFmt->GetFrmSize().GetWidth();
- for( USHORT i = 0; i < pRow->GetCells().Count(); i++ )
+ for( sal_uInt16 i = 0; i < pRow->GetCells().Count(); i++ )
{
SwWriteTableCell *pCell = pRow->GetCells( )[ i ];
const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt();
@@ -676,10 +677,10 @@ void RtfAttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointe
SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt();
const SfxPoolItem* pItem;
- if (SFX_ITEM_SET == pCellFmt->GetAttrSet().GetItemState(RES_BOX, TRUE, &pItem))
+ if (SFX_ITEM_SET == pCellFmt->GetAttrSet().GetItemState(RES_BOX, sal_True, &pItem))
{
const SvxBoxItem& rBox = (SvxBoxItem&)*pItem;
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
@@ -723,7 +724,7 @@ void RtfAttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt();
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pCellFmt->GetAttrSet().GetItemState(
- RES_BACKGROUND, TRUE, &pItem ))
+ RES_BACKGROUND, sal_True, &pItem ))
{
const SvxBrushItem& rBack = (SvxBrushItem&)*pItem;
if( !rBack.GetColor().GetTransparency() )
@@ -807,7 +808,7 @@ void RtfAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_
// vertical alignment
if( SFX_ITEM_SET == pCellFmt->GetAttrSet().GetItemState(
- RES_VERT_ORIENT, TRUE, &pItem ) )
+ RES_VERT_ORIENT, sal_True, &pItem ) )
switch( ((SwFmtVertOrient*)pItem)->GetVertOrient() )
{
case text::VertOrientation::CENTER: m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_CLVERTALC); break;
@@ -898,8 +899,8 @@ void RtfAttributeOutput::InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t
if( pLayout && pLayout->IsExportable() )
m_pTableWrt = new SwWriteTable( pLayout );
else
- m_pTableWrt = new SwWriteTable( pTable->GetTabLines(), (USHORT)nPageSize,
- (USHORT)nTblSz, false);
+ m_pTableWrt = new SwWriteTable( pTable->GetTabLines(), (sal_uInt16)nPageSize,
+ (sal_uInt16)nTblSz, false);
}
void RtfAttributeOutput::StartTable( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ )
@@ -1017,7 +1018,7 @@ void RtfAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer
const SwTable *pTable = pInner->getTable( );
const SwTableLines& rLines = pTable->GetTabLines( );
- USHORT nLinesCount = rLines.Count( );
+ sal_uInt16 nLinesCount = rLines.Count( );
if ( pInner->isEndOfCell() )
EndTableCell();
@@ -1043,7 +1044,7 @@ void RtfAttributeOutput::StartStyles()
m_aStylesheet.append(OOO_STRING_SVTOOLS_RTF_STYLESHEET);
}
-void RtfAttributeOutput::EndStyles( USHORT /*nNumberOfStyles*/ )
+void RtfAttributeOutput::EndStyles( sal_uInt16 /*nNumberOfStyles*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
m_rExport.Strm() << '}';
@@ -1051,7 +1052,7 @@ void RtfAttributeOutput::EndStyles( USHORT /*nNumberOfStyles*/ )
m_rExport.Strm() << '}';
}
-void RtfAttributeOutput::DefaultStyle( USHORT /*nStyle*/ )
+void RtfAttributeOutput::DefaultStyle( sal_uInt16 /*nStyle*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1059,7 +1060,8 @@ void RtfAttributeOutput::DefaultStyle( USHORT /*nStyle*/ )
}
void RtfAttributeOutput::StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT /*nWwId*/, USHORT nId, bool /*bAutoUpdate*/ )
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 /*nWwId*/, sal_uInt16 nId,
+ bool /* bAutoUpdate */ )
{
OSL_TRACE("%s, rName = '%s'", OSL_THIS_FUNC,
OUStringToOString( OUString( rName ), m_rExport.eCurrentEncoding ).getStr());
@@ -1097,7 +1099,7 @@ void RtfAttributeOutput::EndStyle()
m_aStylesheet.append(m_rExport.sNewLine);
}
-void RtfAttributeOutput::StartStyleProperties( bool /*bParProp*/, USHORT /*nStyle*/ )
+void RtfAttributeOutput::StartStyleProperties( bool /*bParProp*/, sal_uInt16 /*nStyle*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
/* noop */
@@ -1109,7 +1111,7 @@ void RtfAttributeOutput::EndStyleProperties( bool /*bParProp*/ )
/* noop */
}
-void RtfAttributeOutput::OutlineNumbering( BYTE nLvl, const SwNumFmt& /*rNFmt*/, const SwFmt& /*rFmt*/ )
+void RtfAttributeOutput::OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt& /*rNFmt*/, const SwFmt& /*rFmt*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1132,7 +1134,7 @@ void RtfAttributeOutput::PageBreakBefore( bool bBreak )
}
}
-void RtfAttributeOutput::SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo )
+void RtfAttributeOutput::SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1175,7 +1177,7 @@ void RtfAttributeOutput::SectionFormProtection( bool bProtected )
m_aSectionBreaks.append((sal_Int32)!bProtected);
}
-void RtfAttributeOutput::SectionLineNumbering( ULONG /*nRestartNo*/, const SwLineNumberInfo& rLnNumInfo )
+void RtfAttributeOutput::SectionLineNumbering( sal_uLong /*nRestartNo*/, const SwLineNumberInfo& rLnNumInfo )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1230,7 +1232,7 @@ void RtfAttributeOutput::SectionBiDi( bool bBiDi )
m_rExport.Strm() << (bBiDi ? OOO_STRING_SVTOOLS_RTF_RTLSECT : OOO_STRING_SVTOOLS_RTF_LTRSECT);
}
-void RtfAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber )
+void RtfAttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1257,7 +1259,7 @@ void RtfAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRest
m_aSectionBreaks.append(pStr);
}
-void RtfAttributeOutput::SectionType( BYTE nBreakCode )
+void RtfAttributeOutput::SectionType( sal_uInt8 nBreakCode )
{
OSL_TRACE("%s, nBreakCode = %d", OSL_THIS_FUNC, nBreakCode);
@@ -1279,7 +1281,7 @@ void RtfAttributeOutput::SectionType( BYTE nBreakCode )
m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear();
}
-void RtfAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &/*rRule*/ )
+void RtfAttributeOutput::NumberingDefinition( sal_uInt16 nId, const SwNumRule &/*rRule*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1291,7 +1293,7 @@ void RtfAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &/*rRu
m_rExport.OutULong(nId) << '}';
}
-void RtfAttributeOutput::StartAbstractNumbering( USHORT nId )
+void RtfAttributeOutput::StartAbstractNumbering( sal_uInt16 nId )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1308,12 +1310,12 @@ void RtfAttributeOutput::EndAbstractNumbering()
m_rExport.OutULong( m_nListId ) << '}' << m_rExport.sNewLine;
}
-void RtfAttributeOutput::NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+void RtfAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE * pNumLvlPos,
- BYTE /*nFollow*/,
+ const sal_uInt8 * pNumLvlPos,
+ sal_uInt8 /*nFollow*/,
const wwFont * pFont,
const SfxItemSet * pOutSet,
sal_Int16 nIndentAt,
@@ -1329,7 +1331,7 @@ void RtfAttributeOutput::NumberingLevel( BYTE nLevel,
m_rExport.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_LISTLEVEL;
- USHORT nVal = 0;
+ sal_uInt16 nVal = 0;
switch( nNumberingType )
{
case SVX_NUM_ROMAN_UPPER: nVal = 1; break;
@@ -1381,7 +1383,7 @@ void RtfAttributeOutput::NumberingLevel( BYTE nLevel,
// write the levelnumbers
m_rExport.Strm() << "{" << OOO_STRING_SVTOOLS_RTF_LEVELNUMBERS;
- for( BYTE i = 0; i <= nLevel && pNumLvlPos[ i ]; ++i )
+ for( sal_uInt8 i = 0; i <= nLevel && pNumLvlPos[ i ]; ++i )
{
m_rExport.Strm() << "\\'" << m_rExport.OutHex(pNumLvlPos[ i ], 2).getStr();
}
@@ -1407,7 +1409,7 @@ void RtfAttributeOutput::NumberingLevel( BYTE nLevel,
m_rExport.Strm() << '}';
}
-void RtfAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField /*eType*/, const String& rFldCmd, BYTE /*nMode*/ )
+void RtfAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField /*eType*/, const String& rFldCmd, sal_uInt8 /*nMode*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1417,7 +1419,7 @@ void RtfAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField /*eTyp
m_aRunText.append(m_rExport.OutString(rFldCmd, m_rExport.eCurrentEncoding));
m_aRunText.append("}{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " ");
if (pFld)
- m_aRunText.append(m_rExport.OutString(pFld->GetCntnt(), m_rExport.eDefaultEncoding));
+ m_aRunText.append(m_rExport.OutString(pFld->ExpandField(true), m_rExport.eDefaultEncoding));
m_aRunText.append("}}");
}
@@ -1494,8 +1496,8 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
const SwFrmFmt& rFrmFmt = rFrame.GetFrmFmt( );
const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx();
- ULONG nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
- ULONG nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
+ sal_uLong nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
+ sal_uLong nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
m_rExport.SaveData( nStt, nEnd );
m_rExport.mpParentFrame = &rFrame;
m_rExport.WriteText( );
@@ -1524,7 +1526,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
}
if ( pGrfNode )
- FlyFrameGraphic( dynamic_cast<const SwFlyFrmFmt*>( &rFrame.GetFrmFmt() ), *pGrfNode);
+ FlyFrameGraphic( dynamic_cast<const SwFlyFrmFmt*>( &rFrame.GetFrmFmt() ), *pGrfNode );
break;
case sw::Frame::eDrawing:
{
@@ -2196,7 +2198,7 @@ void RtfAttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
sal_Unicode cStart = rTwoLines.GetStartBracket();
sal_Unicode cEnd = rTwoLines.GetEndBracket();
- USHORT nType;
+ sal_uInt16 nType;
if( !cStart && !cEnd )
nType = 0;
else if( '{' == cStart || '}' == cEnd )
@@ -2264,7 +2266,7 @@ void RtfAttributeOutput::TextINetFormat( const SwFmtINetFmt& rURL )
m_aStyles.append("{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " ");
if( pTxtAtr && 0 != ( pFmt = pTxtAtr->GetCharFmt() ))
{
- USHORT nStyle = m_rExport.GetId( *pFmt );
+ sal_uInt16 nStyle = m_rExport.GetId( *pFmt );
OString* pString = m_rExport.GetStyle(nStyle);
if (pString)
m_aStyles.append(*pString);
@@ -2276,7 +2278,7 @@ void RtfAttributeOutput::TextCharFormat( const SwFmtCharFmt& rCharFmt )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
- USHORT nStyle = m_rExport.GetId( *rCharFmt.GetCharFmt() );
+ sal_uInt16 nStyle = m_rExport.GetId( *rCharFmt.GetCharFmt() );
m_aStyles.append(OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_CS);
m_aStyles.append((sal_Int32)nStyle);
OString* pString = m_rExport.GetStyle(nStyle);
@@ -2384,7 +2386,7 @@ void RtfAttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStop )
OSL_TRACE("%s", OSL_THIS_FUNC);
long nOffset = ((SvxLRSpaceItem&)m_rExport.GetItem( RES_LR_SPACE )).GetTxtLeft();
- for( USHORT n = 0; n < rTabStop.Count(); n++ )
+ for( sal_uInt16 n = 0; n < rTabStop.Count(); n++ )
{
const SvxTabStop & rTS = rTabStop[ n ];
if( SVX_TAB_ADJUST_DEFAULT != rTS.GetAdjustment() )
@@ -2486,7 +2488,7 @@ void RtfAttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL
aLR.SetTxtLeft( aLR.GetTxtLeft() + pFmt->GetIndentAt() );
aLR.SetTxtFirstLineOfst( pFmt->GetFirstLineOffset() );
- USHORT nStyle = m_rExport.GetId( *pFmt->GetCharFmt() );
+ sal_uInt16 nStyle = m_rExport.GetId( *pFmt->GetCharFmt() );
OString* pString = m_rExport.GetStyle(nStyle);
if (pString)
m_aStyles.append(*pString);
@@ -2713,10 +2715,10 @@ void RtfAttributeOutput::FormatSurround( const SwFmtSurround& rSurround )
if ( m_rExport.bOutFlyFrmAttrs && !m_rExport.bRTFFlySyntax )
{
SwSurround eSurround = rSurround.GetSurround();
- BOOL bGold = SURROUND_IDEAL == eSurround;
+ sal_Bool bGold = SURROUND_IDEAL == eSurround;
if( bGold )
eSurround = SURROUND_PARALLEL;
- RTFSurround aMC( bGold, static_cast< BYTE >(eSurround) );
+ RTFSurround aMC( bGold, static_cast< sal_uInt8 >(eSurround) );
m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYMAINCNT);
m_aRunText.append( (sal_Int32) aMC.GetValue() );
}
@@ -2754,7 +2756,7 @@ void RtfAttributeOutput::FormatVertOrientation( const SwFmtVertOrient& rFlyVert
}
else if ( !m_rExport.bRTFFlySyntax )
{
- RTFVertOrient aVO( static_cast< USHORT >(rFlyVert.GetVertOrient()), static_cast< USHORT >(rFlyVert.GetRelationOrient()) );
+ RTFVertOrient aVO( static_cast< sal_uInt16 >(rFlyVert.GetVertOrient()), static_cast< sal_uInt16 >(rFlyVert.GetRelationOrient()) );
m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYVERT);
m_aRunText.append((sal_Int32)aVO.GetValue());
}
@@ -2791,8 +2793,8 @@ void RtfAttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& rFlyHori
m_aRunText.append(pS);
} else if ( !m_rExport.bRTFFlySyntax )
{
- RTFHoriOrient aHO( static_cast< USHORT >(rFlyHori.GetHoriOrient()),
- static_cast< USHORT >(rFlyHori.GetRelationOrient()) );
+ RTFHoriOrient aHO( static_cast< sal_uInt16 >(rFlyHori.GetHoriOrient()),
+ static_cast< sal_uInt16 >(rFlyHori.GetRelationOrient()) );
m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYHORZ);
m_aRunText.append((sal_Int32)aHO.GetValue());
}
@@ -2804,7 +2806,7 @@ void RtfAttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor )
if ( !m_rExport.bRTFFlySyntax )
{
- USHORT nId = static_cast< USHORT >(rAnchor.GetAnchorId());
+ sal_uInt16 nId = static_cast< sal_uInt16 >(rAnchor.GetAnchorId());
m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYANCHOR);
m_aRunText.append((sal_Int32)nId);
switch( nId )
@@ -2836,12 +2838,12 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
- static USHORT const aBorders[] = {
+ static sal_uInt16 aBorders[] = {
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT };
static const sal_Char* aBorderNames[] = {
OOO_STRING_SVTOOLS_RTF_BRDRT, OOO_STRING_SVTOOLS_RTF_BRDRL, OOO_STRING_SVTOOLS_RTF_BRDRB, OOO_STRING_SVTOOLS_RTF_BRDRR };
- USHORT nDist = rBox.GetDistance();
+ sal_uInt16 nDist = rBox.GetDistance();
if ( m_rExport.bRTFFlySyntax )
return;
@@ -2858,7 +2860,7 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox )
m_aSectionBreaks.append(OutBorderLine( m_rExport, rBox.GetTop(), OOO_STRING_SVTOOLS_RTF_BOX, nDist ));
else
{
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
const sal_Char** pBrdNms = (const sal_Char**)aBorderNames;
for(int i = 0; i < 4; ++i, ++pBrd, ++pBrdNms)
{
@@ -2870,7 +2872,7 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox )
}
}
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
const sal_Char** pBrdNms = (const sal_Char**)aBorderNames;
for( int i = 0; i < 4; ++i, ++pBrd, ++pBrdNms )
{
@@ -2888,7 +2890,7 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox )
m_aStyles.append(m_aSectionBreaks.makeStringAndClear());
}
-void RtfAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize )
+void RtfAttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -2898,12 +2900,12 @@ void RtfAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol,
if( bEven )
{
m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_COLSX;
- m_rExport.OutLong( rCol.GetGutterWidth( TRUE ) );
+ m_rExport.OutLong( rCol.GetGutterWidth( sal_True ) );
}
else
{
const SwColumns & rColumns = rCol.GetColumns( );
- for( USHORT n = 0; n < nCols; )
+ for( sal_uInt16 n = 0; n < nCols; )
{
m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_COLNO;
m_rExport.OutLong( n+1 );
@@ -3024,7 +3026,7 @@ RtfAttributeOutput::~RtfAttributeOutput()
OSL_TRACE("%s", OSL_THIS_FUNC);
}
-RtfExport& RtfAttributeOutput::GetExport()
+MSWordExportBase& RtfAttributeOutput::GetExport()
{
return m_rExport;
}
@@ -3104,7 +3106,7 @@ void RtfAttributeOutput::FontPitchType( FontPitch ePitch ) const
m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_FPRQ;
- USHORT nVal = 0;
+ sal_uInt16 nVal = 0;
switch (ePitch)
{
case PITCH_FIXED:
diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx
index adb0cbc4db4d..fcf43b765543 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.hxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.hxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -110,10 +111,10 @@ public:
/// The common attribute that can be among the run properties.
virtual void Redline( const SwRedlineData* pRedline );
- virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
+ virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
/// Output style.
- virtual void ParagraphStyle( USHORT nStyle );
+ virtual void ParagraphStyle( sal_uInt16 nStyle );
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
@@ -134,27 +135,27 @@ public:
virtual void StartStyles();
/// End of the styles table.
- virtual void EndStyles( USHORT nNumberOfStyles );
+ virtual void EndStyles( sal_uInt16 nNumberOfStyles );
/// Write default style.
- virtual void DefaultStyle( USHORT nStyle );
+ virtual void DefaultStyle( sal_uInt16 nStyle );
/// Start of a style in the styles table.
virtual void StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT nWwIdi, USHORT nId,
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId,
bool bAutoUpdate );
/// End of a style in the styles table.
virtual void EndStyle();
/// Start of (paragraph or run) properties of a style.
- virtual void StartStyleProperties( bool bParProp, USHORT nStyle );
+ virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle );
/// End of (paragraph or run) properties of a style.
virtual void EndStyleProperties( bool bParProp );
/// Numbering rule and Id.
- virtual void OutlineNumbering( BYTE nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
+ virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
/// Page break
/// As a paragraph property - the paragraph should be on the next page.
@@ -162,7 +163,7 @@ public:
/// Write a section break
/// msword::ColumnBreak or msword::PageBreak
- virtual void SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo = NULL );
+ virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL );
/// Start of the section properties.
virtual void StartSection();
@@ -174,7 +175,7 @@ public:
virtual void SectionFormProtection( bool bProtected );
/// Numbering of the lines in the document.
- virtual void SectionLineNumbering( ULONG nRestartNo, const SwLineNumberInfo& rLnNumInfo );
+ virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo );
/// Has different headers/footers for the title page.
virtual void SectionTitlePage();
@@ -188,27 +189,27 @@ public:
/// The style of the page numbers.
///
/// nPageRestartNumberr being 0 means no restart.
- virtual void SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber );
+ virtual void SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber );
/// The type of breaking.
- virtual void SectionType( BYTE nBreakCode );
+ virtual void SectionType( sal_uInt8 nBreakCode );
/// Definition of a numbering instance.
- virtual void NumberingDefinition( USHORT nId, const SwNumRule &rRule );
+ virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule );
/// Start of the abstract numbering definition instance.
- virtual void StartAbstractNumbering( USHORT nId );
+ virtual void StartAbstractNumbering( sal_uInt16 nId );
/// End of the abstract numbering definition instance.
virtual void EndAbstractNumbering();
/// All the numbering level information.
- virtual void NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+ virtual void NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE *pNumLvlPos,
- BYTE nFollow,
+ const sal_uInt8 *pNumLvlPos,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -216,7 +217,7 @@ public:
sal_Int16 nListTabPos,
const String &rNumberingString );
- void WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, BYTE nMode );
+ void WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, sal_uInt8 nMode );
void WriteBookmarks_Impl( std::vector< rtl::OUString >& rStarts, std::vector< rtl::OUString >& rEnds );
void WriteHeaderFooter_Impl( const SwFrmFmt& rFmt, bool bHeader, const sal_Char* pStr );
@@ -390,7 +391,7 @@ protected:
virtual void FormatBox( const SvxBoxItem& );
/// Sfx item RES_COL
- virtual void FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
+ virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
/// Sfx item RES_KEEP
virtual void FormatKeep( const SvxFmtKeepItem& );
@@ -444,11 +445,11 @@ private:
* Current style name and its ID.
*/
String m_rStyleName;
- USHORT m_nStyleId;
+ sal_uInt16 m_nStyleId;
/*
* Current list ID.
*/
- USHORT m_nListId;
+ sal_uInt16 m_nListId;
/*
* This is needed because the call order is: run text, run properties, paragraph properties.
* What we need is the opposite.
@@ -542,8 +543,7 @@ public:
virtual ~RtfAttributeOutput();
/// Return the right export class.
- virtual RtfExport& GetExport();
- const RtfExport& GetExport() const { return const_cast< RtfAttributeOutput* >( this )->GetExport(); }
+ virtual MSWordExportBase& GetExport();
rtl::OStringBuffer m_aTabStop;
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index cc2fd5cc5d30..17dc1c03bb2f 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -119,7 +120,7 @@ RtfSdrExport& RtfExport::SdrExporter() const
return *m_pSdrExport;
}
-bool RtfExport::CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich )
+bool RtfExport::CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich )
{
// FIXME is this actually true for rtf? - this is copied from DOCX
if ( nScript == i18n::ScriptType::ASIAN )
@@ -201,15 +202,15 @@ void RtfExport::WriteChar( sal_Unicode )
/* WriteChar() has nothing to do for rtf. */
}
-static bool IsExportNumRule( const SwNumRule& rRule, BYTE* pEnd = 0 )
+static bool IsExportNumRule( const SwNumRule& rRule, sal_uInt8* pEnd = 0 )
{
- BYTE nEnd = MAXLEVEL;
+ sal_uInt8 nEnd = MAXLEVEL;
while( nEnd-- && !rRule.GetNumFmt( nEnd ))
;
++nEnd;
const SwNumFmt* pNFmt;
- BYTE nLvl;
+ sal_uInt8 nLvl;
for( nLvl = 0; nLvl < nEnd; ++nLvl )
if( SVX_NUM_NUMBER_NONE != ( pNFmt = &rRule.Get( nLvl ))
@@ -226,7 +227,7 @@ void RtfExport::BuildNumbering()
{
const SwNumRuleTbl& rListTbl = pDoc->GetNumRuleTbl();
- for( USHORT n = rListTbl.Count()+1; n; )
+ for( sal_uInt16 n = rListTbl.Count()+1; n; )
{
SwNumRule* pRule;
--n;
@@ -275,7 +276,7 @@ void RtfExport::WriteRevTab()
String sUnknown(RTL_CONSTASCII_USTRINGPARAM("Unknown"));
GetRedline(sUnknown);
- for( USHORT i = 0; i < pDoc->GetRedlineTbl().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pDoc->GetRedlineTbl().Count(); ++i )
{
const SwRedline* pRedl = pDoc->GetRedlineTbl()[ i ];
@@ -284,7 +285,7 @@ void RtfExport::WriteRevTab()
// Now write the table
Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_REVTBL << ' ';
- for(USHORT i = 0; i < m_aRedlineTbl.size(); ++i)
+ for(sal_uInt16 i = 0; i < m_aRedlineTbl.size(); ++i)
{
const String* pAuthor = GetRedline(i);
Strm() << '{';
@@ -295,8 +296,8 @@ void RtfExport::WriteRevTab()
Strm() << '}' << sNewLine;
}
-void RtfExport::WriteHeadersFooters( BYTE nHeadFootFlags,
- const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE /*nBreakCode*/ )
+void RtfExport::WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
+ const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 /*nBreakCode*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -321,7 +322,7 @@ void RtfExport::WriteHeadersFooters( BYTE nHeadFootFlags,
WriteHeaderFooter( rFirstPageFmt, false, OOO_STRING_SVTOOLS_RTF_FOOTERF );
}
-void RtfExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, BYTE nMode )
+void RtfExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, sal_uInt8 nMode )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -376,7 +377,7 @@ void RtfExport::DoFormText(const SwInputField* pFld )
m_pAttrOutput->RunText().append( OutString( sResult, eDefaultEncoding )).append( "}}" );
}
-ULONG RtfExport::ReplaceCr( BYTE )
+sal_uLong RtfExport::ReplaceCr( sal_uInt8 )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -451,14 +452,14 @@ void RtfExport::WritePageDescTable()
OSL_TRACE("%s", OSL_THIS_FUNC);
// Write page descriptions (page styles)
- USHORT nSize = pDoc->GetPageDescCnt();
+ sal_uInt16 nSize = pDoc->GetPageDescCnt();
if( !nSize )
return;
Strm() << sNewLine; // a separator
- bOutPageDescs = TRUE;
+ bOutPageDescs = sal_True;
Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_PGDSCTBL;
- for( USHORT n = 0; n < nSize; ++n )
+ for( sal_uInt16 n = 0; n < nSize; ++n )
{
const SwPageDesc& rPageDesc =
const_cast<const SwDoc*>(pDoc)->GetPageDesc( n );
@@ -467,10 +468,10 @@ void RtfExport::WritePageDescTable()
OutULong( n ) << OOO_STRING_SVTOOLS_RTF_PGDSCUSE;
OutULong( rPageDesc.ReadUseOn() );
- OutPageDescription( rPageDesc, FALSE, FALSE );
+ OutPageDescription( rPageDesc, sal_False, sal_False );
// search for the next page description
- USHORT i = nSize;
+ sal_uInt16 i = nSize;
while( i )
if( rPageDesc.GetFollow() ==
&const_cast<const SwDoc *>(pDoc)->GetPageDesc( --i ) )
@@ -480,7 +481,7 @@ void RtfExport::WritePageDescTable()
Strm() << OutString( rPageDesc.GetName(), eDefaultEncoding) << ";}";
}
Strm() << '}' << sNewLine;
- bOutPageDescs = FALSE;
+ bOutPageDescs = sal_False;
// reset table infos, otherwise the depth of the cells will be incorrect,
// in case the page style (header or footer) had tables
@@ -530,10 +531,10 @@ void RtfExport::ExportDocument_Impl()
// protected section in the document.
{
const SfxItemPool& rPool = pDoc->GetAttrPool();
- USHORT nMaxItem = rPool.GetItemCount(RES_PROTECT);
- for( USHORT n = 0; n < nMaxItem; ++n )
+ sal_uInt32 const nMaxItem = rPool.GetItemCount2(RES_PROTECT);
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- const SvxProtectItem* pProtect = (const SvxProtectItem*)rPool.GetItem(RES_PROTECT, n);
+ const SvxProtectItem* pProtect = (const SvxProtectItem*)rPool.GetItem2(RES_PROTECT, n);
if (pProtect && pProtect->IsCntntProtected())
{
Strm() << OOO_STRING_SVTOOLS_RTF_FORMPROT;
@@ -566,7 +567,7 @@ void RtfExport::ExportDocument_Impl()
if( pSet )
{
- USHORT nPosInDoc;
+ sal_uInt16 nPosInDoc;
pSttPgDsc = (SwFmtPageDesc*)&pSet->Get( RES_PAGEDESC );
if( !pSttPgDsc->GetPageDesc() )
pSttPgDsc = 0;
@@ -622,7 +623,7 @@ void RtfExport::ExportDocument_Impl()
// All sections are unlocked by default
Strm() << OOO_STRING_SVTOOLS_RTF_SECTUNLOCKED;
OutLong(1);
- OutPageDescription( rPageDesc, FALSE, TRUE ); // Changed bCheckForFirstPage to TRUE so headers
+ OutPageDescription( rPageDesc, sal_False, sal_True ); // Changed bCheckForFirstPage to sal_True so headers
// following title page are correctly added - i13107
if( pSttPgDsc )
{
@@ -707,7 +708,7 @@ void RtfExport::PrepareNewPageDesc( const SfxItemSet* pSet,
{
OSL_TRACE("%s", OSL_THIS_FUNC);
const SwSectionFmt* pFmt = GetSectionFormat( rNd );
- const ULONG nLnNm = GetSectionLineNo( pSet, rNd );
+ const sal_uLong nLnNm = GetSectionLineNo( pSet, rNd );
OSL_ENSURE( pNewPgDescFmt || pNewPgDesc, "Neither page desc format nor page desc provided." );
@@ -767,7 +768,7 @@ void RtfExport::OutputTextNode( const SwTxtNode& rNode )
MSWordExportBase::OutputTextNode( rNode );
}
-void RtfExport::AppendSection( const SwPageDesc* pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum )
+void RtfExport::AppendSection( const SwPageDesc* pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -814,7 +815,7 @@ SvStream& RtfExport::Strm()
return m_pWriter->Strm();
}
-SvStream& RtfExport::OutULong( ULONG nVal )
+SvStream& RtfExport::OutULong( sal_uLong nVal )
{
return m_pWriter->OutULong( Strm(), nVal );
}
@@ -834,7 +835,7 @@ void RtfExport::OutUnicode(const sal_Char *pToken, const String &rContent)
}
}
-OString RtfExport::OutHex(ULONG nHex, BYTE nLen)
+OString RtfExport::OutHex(sal_uLong nHex, sal_uInt8 nLen)
{
sal_Char aNToABuf[] = "0000000000000000";
@@ -844,7 +845,7 @@ OString RtfExport::OutHex(ULONG nHex, BYTE nLen)
// Set pointer to the buffer end
sal_Char* pStr = aNToABuf + (sizeof(aNToABuf)-1);
- for( BYTE n = 0; n < nLen; ++n )
+ for( sal_uInt8 n = 0; n < nLen; ++n )
{
*(--pStr) = (sal_Char)(nHex & 0xf ) + 48;
if( *pStr > '9' )
@@ -963,20 +964,20 @@ void RtfExport::OutDateTime(const sal_Char* pStr, const util::DateTime& rDT )
OutULong( rDT.Minutes ) << '}';
}
-USHORT RtfExport::GetColor( const Color& rColor ) const
+sal_uInt16 RtfExport::GetColor( const Color& rColor ) const
{
for (RtfColorTbl::const_iterator it=m_aColTbl.begin() ; it != m_aColTbl.end(); ++it )
if ((*it).second == rColor) {
OSL_TRACE("%s returning %d (%d,%d,%d)", OSL_THIS_FUNC, (*it).first, rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue());
return (*it).first;
}
- OSL_ENSURE( FALSE, "No such Color in m_aColTbl!" );
+ OSL_ENSURE( sal_False, "No such Color in m_aColTbl!" );
return 0;
}
void RtfExport::InsColor( const Color& rCol )
{
- USHORT n;
+ sal_uInt16 n;
bool bContainsAuto = false;
for (RtfColorTbl::iterator it=m_aColTbl.begin() ; it != m_aColTbl.end(); ++it )
if ((*it).second == rCol)
@@ -997,7 +998,7 @@ void RtfExport::InsColor( const Color& rCol )
else if (!bContainsAuto)
n++;
}
- m_aColTbl.insert(std::pair<USHORT,Color>( n, rCol ));
+ m_aColTbl.insert(std::pair<sal_uInt16,Color>( n, rCol ));
}
void RtfExport::InsColorLine( const SvxBoxItem& rBox )
@@ -1017,7 +1018,7 @@ void RtfExport::OutColorTable()
{
// Build the table from rPool since the colors provided to
// RtfAttributeOutput callbacks are too late.
- USHORT n, nMaxItem;
+ sal_uInt32 nMaxItem;
const SfxItemPool& rPool = pDoc->GetAttrPool();
// char color
@@ -1028,30 +1029,30 @@ void RtfExport::OutColorTable()
if( 0 != ( pCol = (const SvxColorItem*)rPool.GetPoolDefaultItem(
RES_CHRATR_COLOR ) ))
InsColor( pCol->GetValue() );
- nMaxItem = rPool.GetItemCount(RES_CHRATR_COLOR);
- for( n = 0; n < nMaxItem; ++n )
+ nMaxItem = rPool.GetItemCount2(RES_CHRATR_COLOR);
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- if( 0 != (pCol = (const SvxColorItem*)rPool.GetItem(
+ if( 0 != (pCol = (const SvxColorItem*)rPool.GetItem2(
RES_CHRATR_COLOR, n ) ) )
InsColor( pCol->GetValue() );
}
const SvxUnderlineItem* pUnder = (const SvxUnderlineItem*)GetDfltAttr( RES_CHRATR_UNDERLINE );
InsColor( pUnder->GetColor() );
- nMaxItem = rPool.GetItemCount(RES_CHRATR_UNDERLINE);
- for( n = 0; n < nMaxItem;n++)
+ nMaxItem = rPool.GetItemCount2(RES_CHRATR_UNDERLINE);
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- if( 0 != (pUnder = (const SvxUnderlineItem*)rPool.GetItem( RES_CHRATR_UNDERLINE, n ) ) )
+ if( 0 != (pUnder = (const SvxUnderlineItem*)rPool.GetItem2( RES_CHRATR_UNDERLINE, n ) ) )
InsColor( pUnder->GetColor() );
}
const SvxOverlineItem* pOver = (const SvxOverlineItem*)GetDfltAttr( RES_CHRATR_OVERLINE );
InsColor( pOver->GetColor() );
- nMaxItem = rPool.GetItemCount(RES_CHRATR_OVERLINE);
- for( n = 0; n < nMaxItem;n++)
+ nMaxItem = rPool.GetItemCount2(RES_CHRATR_OVERLINE);
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- if( 0 != (pOver = (const SvxOverlineItem*)rPool.GetItem( RES_CHRATR_OVERLINE, n ) ) )
+ if( 0 != (pOver = (const SvxOverlineItem*)rPool.GetItem2( RES_CHRATR_OVERLINE, n ) ) )
InsColor( pOver->GetColor() );
}
@@ -1059,10 +1060,10 @@ void RtfExport::OutColorTable()
}
// background color
- static const USHORT aBrushIds[] = {
+ static const sal_uInt16 aBrushIds[] = {
RES_BACKGROUND, RES_CHRATR_BACKGROUND, 0 };
- for( const USHORT* pIds = aBrushIds; *pIds; ++pIds )
+ for( const sal_uInt16* pIds = aBrushIds; *pIds; ++pIds )
{
const SvxBrushItem* pBkgrd = (const SvxBrushItem*)GetDfltAttr( *pIds );
InsColor( pBkgrd->GetColor() );
@@ -1071,14 +1072,16 @@ void RtfExport::OutColorTable()
{
InsColor( pBkgrd->GetColor() );
}
- nMaxItem = rPool.GetItemCount( *pIds );
- for( n = 0; n < nMaxItem; ++n )
- if( 0 != (pBkgrd = (const SvxBrushItem*)rPool.GetItem(
+ nMaxItem = rPool.GetItemCount2( *pIds );
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
+ {
+ if( 0 != (pBkgrd = (const SvxBrushItem*)rPool.GetItem2(
*pIds , n ) ))
{
InsColor( pBkgrd->GetColor() );
}
}
+ }
// shadow color
{
@@ -1090,14 +1093,16 @@ void RtfExport::OutColorTable()
{
InsColor( pShadow->GetColor() );
}
- nMaxItem = rPool.GetItemCount(RES_SHADOW);
- for( n = 0; n < nMaxItem; ++n )
- if( 0 != (pShadow = (const SvxShadowItem*)rPool.GetItem(
+ nMaxItem = rPool.GetItemCount2(RES_SHADOW);
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
+ {
+ if( 0 != (pShadow = (const SvxShadowItem*)rPool.GetItem2(
RES_SHADOW, n ) ) )
{
InsColor( pShadow->GetColor() );
}
}
+ }
// frame border color
{
@@ -1105,13 +1110,15 @@ void RtfExport::OutColorTable()
if( 0 != ( pBox = (const SvxBoxItem*)rPool.GetPoolDefaultItem(
RES_BOX ) ))
InsColorLine( *pBox );
- nMaxItem = rPool.GetItemCount(RES_BOX);
- for( n = 0; n < nMaxItem; ++n )
- if( 0 != (pBox = (const SvxBoxItem*)rPool.GetItem( RES_BOX, n ) ))
+ nMaxItem = rPool.GetItemCount2(RES_BOX);
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
+ {
+ if( 0 != (pBox = (const SvxBoxItem*)rPool.GetItem2( RES_BOX, n ) ))
InsColorLine( *pBox );
}
+ }
- for( n = 0; n < m_aColTbl.size(); n++ )
+ for (size_t n = 0; n < m_aColTbl.size(); ++n)
{
const Color& rCol = m_aColTbl[ n ];
if( n || COL_AUTO != rCol.GetColor() )
@@ -1125,41 +1132,41 @@ void RtfExport::OutColorTable()
}
}
-void RtfExport::InsStyle( USHORT nId, const OString& rStyle )
+void RtfExport::InsStyle( sal_uInt16 nId, const OString& rStyle )
{
- m_aStyTbl.insert(std::pair<USHORT,OString>(nId, rStyle) );
+ m_aStyTbl.insert(std::pair<sal_uInt16,OString>(nId, rStyle) );
}
-OString* RtfExport::GetStyle( USHORT nId )
+OString* RtfExport::GetStyle( sal_uInt16 nId )
{
- std::map<USHORT,OString>::iterator i = m_aStyTbl.find(nId);
+ std::map<sal_uInt16,OString>::iterator i = m_aStyTbl.find(nId);
if (i != m_aStyTbl.end())
return &i->second;
return NULL;
}
-USHORT RtfExport::GetRedline( const String& rAuthor )
+sal_uInt16 RtfExport::GetRedline( const String& rAuthor )
{
- std::map<String,USHORT>::iterator i = m_aRedlineTbl.find(rAuthor);
+ std::map<String,sal_uInt16>::iterator i = m_aRedlineTbl.find(rAuthor);
if (i != m_aRedlineTbl.end())
return i->second;
else
{
int nId = m_aRedlineTbl.size();
- m_aRedlineTbl.insert(std::pair<String,USHORT>(rAuthor,nId));
+ m_aRedlineTbl.insert(std::pair<String,sal_uInt16>(rAuthor,nId));
return nId;
}
}
-const String* RtfExport::GetRedline( USHORT nId )
+const String* RtfExport::GetRedline( sal_uInt16 nId )
{
- for(std::map<String,USHORT>::iterator aIter = m_aRedlineTbl.begin(); aIter != m_aRedlineTbl.end(); ++aIter)
+ for(std::map<String,sal_uInt16>::iterator aIter = m_aRedlineTbl.begin(); aIter != m_aRedlineTbl.end(); ++aIter)
if ((*aIter).second == nId)
return &(*aIter).first;
return NULL;
}
-void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, BOOL bCheckForFirstPage )
+void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, sal_Bool bWriteReset, sal_Bool bCheckForFirstPage )
{
OSL_TRACE("%s start", OSL_THIS_FUNC);
const SwPageDesc *pSave = pAktPageDesc;
@@ -1187,10 +1194,10 @@ void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset,
// normal header / footer (without a style)
const SfxPoolItem* pItem;
- if( pAktPageDesc->GetLeft().GetAttrSet().GetItemState( RES_HEADER, FALSE,
+ if( pAktPageDesc->GetLeft().GetAttrSet().GetItemState( RES_HEADER, sal_False,
&pItem ) == SFX_ITEM_SET)
WriteHeaderFooter(*pItem, true);
- if( pAktPageDesc->GetLeft().GetAttrSet().GetItemState( RES_FOOTER, FALSE,
+ if( pAktPageDesc->GetLeft().GetAttrSet().GetItemState( RES_FOOTER, sal_False,
&pItem ) == SFX_ITEM_SET)
WriteHeaderFooter(*pItem, false);
@@ -1200,10 +1207,10 @@ void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset,
pAktPageDesc = &rPgDsc;
Strm() << OOO_STRING_SVTOOLS_RTF_TITLEPG;
if( pAktPageDesc->GetMaster().GetAttrSet().GetItemState( RES_HEADER,
- FALSE, &pItem ) == SFX_ITEM_SET )
+ sal_False, &pItem ) == SFX_ITEM_SET )
WriteHeaderFooter(*pItem, true);
if( pAktPageDesc->GetMaster().GetAttrSet().GetItemState( RES_FOOTER,
- FALSE, &pItem ) == SFX_ITEM_SET )
+ sal_False, &pItem ) == SFX_ITEM_SET )
WriteHeaderFooter(*pItem, false);
}
@@ -1263,7 +1270,7 @@ class SwRTFWriter : public Writer
public:
SwRTFWriter( const String& rFilterName, const String& rBaseURL );
virtual ~SwRTFWriter();
- virtual ULONG WriteStream();
+ virtual sal_uLong WriteStream();
};
SwRTFWriter::SwRTFWriter( const String& rFltName, const String & rBaseURL )
@@ -1276,7 +1283,7 @@ SwRTFWriter::SwRTFWriter( const String& rFltName, const String & rBaseURL )
SwRTFWriter::~SwRTFWriter()
{}
-ULONG SwRTFWriter::WriteStream()
+sal_uLong SwRTFWriter::WriteStream()
{
OSL_TRACE("%s", OSL_THIS_FUNC);
RtfExport aExport( NULL, pDoc, new SwPaM( *pCurPam->End(), *pCurPam->Start() ), pCurPam, this, bOutOutlineOnly );
diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx
index 5b14c1d3f436..60b6c347ae0c 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,9 +41,9 @@
class RtfAttributeOutput;
class RtfExportFilter;
class RtfSdrExport;
-typedef std::map<USHORT,Color> RtfColorTbl;
-typedef std::map<USHORT,rtl::OString> RtfStyleTbl;
-typedef std::map<String,USHORT> RtfRedlineTbl;
+typedef std::map<sal_uInt16,Color> RtfColorTbl;
+typedef std::map<sal_uInt16,rtl::OString> RtfStyleTbl;
+typedef std::map<String,sal_uInt16> RtfRedlineTbl;
class SwNode;
class SwEndNode;
class SwTableNode;
@@ -86,7 +87,7 @@ public:
virtual bool SupportsUnicode() const { return true; }
/// Guess the script (asian/western).
- virtual bool CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich );
+ virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich );
virtual void AppendBookmarks( const SwTxtNode& rNode, xub_StrLen nAktPos, xub_StrLen nLen );
@@ -102,12 +103,12 @@ public:
virtual void WriteRevTab();
/// Output the actual headers and footers.
- virtual void WriteHeadersFooters( BYTE nHeadFootFlags,
- const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE nBreakCode );
+ virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
+ const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 nBreakCode );
/// Write the field
virtual void OutputField( const SwField* pFld, ww::eField eFldType,
- const String& rFldCmd, BYTE nMode = nsFieldFlags::WRITEFIELD_ALL );
+ const String& rFldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL );
/// Write the data of the form field
virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark );
@@ -121,7 +122,7 @@ public:
virtual void DoFormText(const SwInputField * pFld);
- virtual ULONG ReplaceCr( BYTE nChar );
+ virtual sal_uLong ReplaceCr( sal_uInt8 nChar );
protected:
/// Format-dependant part of the actual export.
@@ -149,7 +150,7 @@ protected:
virtual void OutputLinkedOLE(const rtl::OUString&);
- virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum );
+ virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum );
public:
/// Pass the pDocument, pCurrentPam and pOriginalPam to the base class.
@@ -171,26 +172,26 @@ public:
/// This is used by OutputFlyFrame_Impl() to control the written syntax
bool bRTFFlySyntax;
- BOOL m_bOutStyleTab : 1;
+ sal_Bool m_bOutStyleTab : 1;
SvStream& Strm();
- SvStream& OutULong( ULONG nVal );
+ SvStream& OutULong( sal_uLong nVal );
SvStream& OutLong( long nVal );
void OutUnicode(const sal_Char *pToken, const String &rContent);
void OutDateTime(const sal_Char* pStr, const util::DateTime& rDT );
static rtl::OString OutChar(sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEnc);
static rtl::OString OutString(const String &rStr, rtl_TextEncoding eDestEnc);
- static rtl::OString OutHex(ULONG nHex, BYTE nLen);
- void OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, BOOL bCheckForFirstPage );
+ static rtl::OString OutHex(sal_uLong nHex, sal_uInt8 nLen);
+ void OutPageDescription( const SwPageDesc& rPgDsc, sal_Bool bWriteReset, sal_Bool bCheckForFirstPage );
- USHORT GetColor( const Color& rColor ) const;
+ sal_uInt16 GetColor( const Color& rColor ) const;
void InsColor( const Color& rCol );
void InsColorLine( const SvxBoxItem& rBox );
void OutColorTable();
- USHORT GetRedline( const String& rAuthor );
- const String* GetRedline( USHORT nId );
+ sal_uInt16 GetRedline( const String& rAuthor );
+ const String* GetRedline( sal_uInt16 nId );
- void InsStyle( USHORT nId, const rtl::OString& rStyle );
- rtl::OString* GetStyle( USHORT nId );
+ void InsStyle( sal_uInt16 nId, const rtl::OString& rStyle );
+ rtl::OString* GetStyle( sal_uInt16 nId );
private:
/// No copying.
diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx
index 891542908425..0aedd4add7f8 100644
--- a/sw/source/filter/ww8/rtfexportfilter.cxx
+++ b/sw/source/filter/ww8/rtfexportfilter.cxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,8 +44,8 @@ using namespace ::comphelper;
using namespace ::com::sun::star;
using ::rtl::OUString;
-RtfExportFilter::RtfExportFilter( const uno::Reference< lang::XMultiServiceFactory >& xMSF) :
- m_xMSF( xMSF )
+RtfExportFilter::RtfExportFilter( const uno::Reference< uno::XComponentContext >& xCtx) :
+ m_xCtx( xCtx )
{
}
@@ -129,9 +130,9 @@ uno::Sequence< OUString > SAL_CALL RtfExport_getSupportedServiceNames() throw()
return aSeq;
}
-uno::Reference< uno::XInterface > SAL_CALL RtfExport_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) throw( uno::Exception )
+uno::Reference< uno::XInterface > SAL_CALL RtfExport_createInstance(const uno::Reference< uno::XComponentContext > & xCtx ) throw( uno::Exception )
{
- return (cppu::OWeakObject*) new RtfExportFilter( rSMgr );
+ return (cppu::OWeakObject*) new RtfExportFilter( xCtx );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfexportfilter.hxx b/sw/source/filter/ww8/rtfexportfilter.hxx
index 2a8705e399c1..de7c94cf80ac 100644
--- a/sw/source/filter/ww8/rtfexportfilter.hxx
+++ b/sw/source/filter/ww8/rtfexportfilter.hxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,7 +41,7 @@
class RtfWriter : public Writer
{
protected:
- ULONG WriteStream() { return 0; }
+ sal_uLong WriteStream() { return 0; }
};
/// The physical access to the RTF document (for writing).
@@ -51,11 +52,11 @@ class RtfExportFilter : public cppu::WeakImplHelper2
>
{
protected:
- ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xMSF;
+ ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xCtx;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xSrcDoc;
SvStream* m_pStream;
public:
- RtfExportFilter( const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMSF );
+ RtfExportFilter( const ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xCtx );
virtual ~RtfExportFilter();
// XFilter
@@ -76,7 +77,7 @@ public:
throw();
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL RtfExport_createInstance(
const ::com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > &xMSF)
+ com::sun::star::uno::XComponentContext > &xCtx)
throw( ::com::sun::star::uno::Exception );
#define IMPL_NAME_RTFEXPORT "com.sun.star.comp.Writer.RtfExport"
diff --git a/sw/source/filter/ww8/rtfimportfilter.cxx b/sw/source/filter/ww8/rtfimportfilter.cxx
index 52b4ae845710..980c96fd8974 100644
--- a/sw/source/filter/ww8/rtfimportfilter.cxx
+++ b/sw/source/filter/ww8/rtfimportfilter.cxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,6 +41,7 @@
#include <unotools/ucbstreamhelper.hxx>
#include <com/sun/star/frame/XDesktop.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
using namespace ::comphelper;
@@ -47,8 +49,8 @@ using namespace ::com::sun::star;
using ::rtl::OUString;
using rtl::OUStringToOString;
-RtfImportFilter::RtfImportFilter( const uno::Reference< lang::XMultiServiceFactory >& xMSF) :
- m_xMSF( xMSF )
+RtfImportFilter::RtfImportFilter( const uno::Reference< uno::XComponentContext > &xCtx ) :
+ m_xCtx( xCtx )
{
}
@@ -129,9 +131,9 @@ uno::Sequence< OUString > SAL_CALL RtfImport_getSupportedServiceNames() throw()
return aSeq;
}
-uno::Reference< uno::XInterface > SAL_CALL RtfImport_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) throw( uno::Exception )
+uno::Reference< uno::XInterface > SAL_CALL RtfImport_createInstance(const uno::Reference< uno::XComponentContext > & xCtx ) throw( uno::Exception )
{
- return (cppu::OWeakObject*) new RtfImportFilter( rSMgr );
+ return (cppu::OWeakObject*) new RtfImportFilter( xCtx );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfimportfilter.hxx b/sw/source/filter/ww8/rtfimportfilter.hxx
index 60532895f9ef..9782dae31300 100644
--- a/sw/source/filter/ww8/rtfimportfilter.hxx
+++ b/sw/source/filter/ww8/rtfimportfilter.hxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,10 +45,10 @@ class RtfImportFilter : public cppu::WeakImplHelper2
>
{
protected:
- ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xMSF;
+ ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xCtx;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xDstDoc;
public:
- RtfImportFilter( const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMSF );
+ RtfImportFilter( const ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xCtx );
virtual ~RtfImportFilter();
// XFilter
@@ -66,7 +67,7 @@ public:
throw();
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL RtfImport_createInstance(
const ::com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > &xMSF)
+ com::sun::star::uno::XComponentContext > &xCtx)
throw( ::com::sun::star::uno::Exception );
#define IMPL_NAME_RTFIMPORT "com.sun.star.comp.Writer.RtfImport"
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx
index f18ebfd3c25b..99a166196d09 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -89,7 +90,7 @@ RtfSdrExport::~RtfSdrExport()
delete[] m_pShapeTypeWritten, m_pShapeTypeWritten = NULL;
}
-void RtfSdrExport::OpenContainer( UINT16 nEscherContainer, int nRecInstance )
+void RtfSdrExport::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -122,7 +123,7 @@ void RtfSdrExport::CloseContainer()
EscherEx::CloseContainer();
}
-UINT32 RtfSdrExport::EnterGroup( const String& /*rShapeName*/, const Rectangle* /*pRect*/ )
+sal_uInt32 RtfSdrExport::EnterGroup( const String& /*rShapeName*/, const Rectangle* /*pRect*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -136,7 +137,7 @@ void RtfSdrExport::LeaveGroup()
/* noop */
}
-void RtfSdrExport::AddShape( UINT32 nShapeType, UINT32 nShapeFlags, UINT32 /*nShapeId*/ )
+void RtfSdrExport::AddShape( sal_uInt32 nShapeType, sal_uInt32 nShapeFlags, sal_uInt32 /*nShapeId*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -521,10 +522,10 @@ void RtfSdrExport::WriteOutliner(const OutlinerParaObject& rParaObj)
const EditTextObject& rEditObj = rParaObj.GetTextObject();
MSWord_SdrAttrIter aAttrIter( m_rExport, rEditObj, TXT_HFTXTBOX );
- USHORT nPara = rEditObj.GetParagraphCount();
+ sal_uInt16 nPara = rEditObj.GetParagraphCount();
m_rAttrOutput.RunText().append('{').append(OOO_STRING_SVTOOLS_RTF_SHPTXT).append(' ');
- for (USHORT n = 0; n < nPara; ++n)
+ for (sal_uInt16 n = 0; n < nPara; ++n)
{
if( n )
aAttrIter.NextPara( n );
@@ -578,7 +579,7 @@ void RtfSdrExport::EndShape( sal_Int32 nShapeElement )
}
}
-UINT32 RtfSdrExport::AddSdrObject( const SdrObject& rObj )
+sal_uInt32 RtfSdrExport::AddSdrObject( const SdrObject& rObj )
{
m_pSdrObject = &rObj;
return EscherEx::AddSdrObject(rObj);
diff --git a/sw/source/filter/ww8/rtfsdrexport.hxx b/sw/source/filter/ww8/rtfsdrexport.hxx
index b25f5196de4c..f461357e5c61 100644
--- a/sw/source/filter/ww8/rtfsdrexport.hxx
+++ b/sw/source/filter/ww8/rtfsdrexport.hxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -68,7 +69,7 @@ public:
/// Export the sdr object as Sdr.
///
/// Call this when you need to export the object as Sdr in RTF.
- UINT32 AddSdrObject( const SdrObject& rObj );
+ sal_uInt32 AddSdrObject( const SdrObject& rObj );
protected:
/// Add an attribute to the generated shape element.
@@ -93,14 +94,14 @@ protected:
private:
- virtual void OpenContainer( UINT16 nEscherContainer, int nRecInstance = 0 );
+ virtual void OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance = 0 );
virtual void CloseContainer();
using EscherEx::EnterGroup;
- virtual UINT32 EnterGroup( const String& rShapeName, const Rectangle* pBoundRect = 0 );
+ virtual sal_uInt32 EnterGroup( const String& rShapeName, const Rectangle* pBoundRect = 0 );
virtual void LeaveGroup();
- virtual void AddShape( UINT32 nShapeType, UINT32 nShapeFlags, UINT32 nShapeId = 0 );
+ virtual void AddShape( sal_uInt32 nShapeType, sal_uInt32 nShapeFlags, sal_uInt32 nShapeId = 0 );
private:
/// Add starting and ending point of a line to the m_pShapeAttrList.
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 97f6316c9be4..cb1471fa88ab 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -117,7 +117,7 @@ namespace
};
// <--
- bool IsValidSlotWhich(USHORT nSlotId, USHORT nWhichId)
+ bool IsValidSlotWhich(sal_uInt16 nSlotId, sal_uInt16 nWhichId)
{
return (nSlotId != 0 && nWhichId != 0 && nSlotId != nWhichId);
}
@@ -132,8 +132,8 @@ namespace
sw::Frames SwPosFlyFrmsToFrames(const SwPosFlyFrms &rFlys)
{
sw::Frames aRet;
- USHORT nEnd = rFlys.Count();
- for (USHORT nI = 0; nI < nEnd; ++nI)
+ sal_uInt16 nEnd = rFlys.Count();
+ for (sal_uInt16 nI = 0; nI < nEnd; ++nI)
{
const SwFrmFmt &rEntry = rFlys[nI]->GetFmt();
if (const SwPosition* pAnchor = rEntry.GetAnchor().GetCntntAnchor())
@@ -153,9 +153,9 @@ namespace
class anchoredto: public std::unary_function<const sw::Frame&, bool>
{
private:
- ULONG mnNode;
+ sal_uLong mnNode;
public:
- anchoredto(ULONG nNode) : mnNode(nNode) {}
+ anchoredto(sal_uLong nNode) : mnNode(nNode) {}
bool operator()(const sw::Frame &rFrame) const
{
return (mnNode == rFrame.GetPosition().nNode.GetNode().GetIndex());
@@ -252,10 +252,10 @@ namespace sw
namespace hack
{
- USHORT TransformWhichBetweenPools(const SfxItemPool &rDestPool,
- const SfxItemPool &rSrcPool, USHORT nWhich)
+ sal_uInt16 TransformWhichBetweenPools(const SfxItemPool &rDestPool,
+ const SfxItemPool &rSrcPool, sal_uInt16 nWhich)
{
- USHORT nSlotId = rSrcPool.GetSlotId(nWhich);
+ sal_uInt16 nSlotId = rSrcPool.GetSlotId(nWhich);
if (IsValidSlotWhich(nSlotId, nWhich))
nWhich = rDestPool.GetWhich(nSlotId);
else
@@ -263,8 +263,8 @@ namespace sw
return nWhich;
}
- USHORT GetSetWhichFromSwDocWhich(const SfxItemSet &rSet,
- const SwDoc &rDoc, USHORT nWhich)
+ sal_uInt16 GetSetWhichFromSwDocWhich(const SfxItemSet &rSet,
+ const SwDoc &rDoc, sal_uInt16 nWhich)
{
if (RES_WHICHHINT_END < *(rSet.GetRanges()))
{
@@ -404,8 +404,8 @@ namespace sw
{
if( bExportParentItemSet )
{
- USHORT nTotal = rSet.TotalCount();
- for( USHORT nItem =0; nItem < nTotal; ++nItem )
+ sal_uInt16 nTotal = rSet.TotalCount();
+ for( sal_uInt16 nItem =0; nItem < nTotal; ++nItem )
{
const SfxPoolItem* pItem = 0;
if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetWhichByPos( nItem ), true, &pItem ) )
@@ -459,7 +459,7 @@ namespace sw
mysizet nCount = pColls ? pColls->Count() : 0;
aStyles.reserve(nCount);
for (mysizet nI = 0; nI < nCount; ++nI)
- aStyles.push_back((*pColls)[ static_cast< USHORT >(nI) ]);
+ aStyles.push_back((*pColls)[ static_cast< sal_uInt16 >(nI) ]);
return aStyles;
}
@@ -507,7 +507,7 @@ namespace sw
SwPosFlyFrms aFlys;
rDoc.GetAllFlyFmts(aFlys, pPaM, true);
sw::Frames aRet(SwPosFlyFrmsToFrames(aFlys));
- for (USHORT i = aFlys.Count(); i > 0;)
+ for (sal_uInt16 i = aFlys.Count(); i > 0;)
delete aFlys[--i];
return aRet;
}
@@ -528,7 +528,7 @@ namespace sw
0 != (pRule = rTxtNode.GetNumRule())
)
{
- return &(pRule->Get( static_cast< USHORT >(rTxtNode.GetActualListLevel()) ));
+ return &(pRule->Get( static_cast< sal_uInt16 >(rTxtNode.GetActualListLevel()) ));
}
OSL_ENSURE(rTxtNode.GetDoc(), "No document for node?, suspicious");
@@ -540,7 +540,7 @@ namespace sw
0 != (pRule = rTxtNode.GetDoc()->GetOutlineNumRule())
)
{
- return &(pRule->Get( static_cast< USHORT >(rTxtNode.GetActualListLevel()) ));
+ return &(pRule->Get( static_cast< sal_uInt16 >(rTxtNode.GetActualListLevel()) ));
}
return 0;
@@ -764,16 +764,16 @@ namespace sw
std::for_each(maStack.begin(), maStack.end(), SetInDocAndDelete(mrDoc));
}
- USHORT WrtRedlineAuthor::AddName( const String& rNm )
+ sal_uInt16 WrtRedlineAuthor::AddName( const String& rNm )
{
- USHORT nRet;
+ sal_uInt16 nRet;
typedef std::vector<String>::iterator myiter;
myiter aIter = std::find(maAuthors.begin(), maAuthors.end(), rNm);
if (aIter != maAuthors.end())
- nRet = static_cast< USHORT >(aIter - maAuthors.begin());
+ nRet = static_cast< sal_uInt16 >(aIter - maAuthors.begin());
else
{
- nRet = static_cast< USHORT >(maAuthors.size());
+ nRet = static_cast< sal_uInt16 >(maAuthors.size());
maAuthors.push_back(rNm);
}
return nRet;
diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx
index efbc231ffb3f..2f16b06f770f 100644
--- a/sw/source/filter/ww8/writerhelper.hxx
+++ b/sw/source/filter/ww8/writerhelper.hxx
@@ -819,8 +819,8 @@ namespace sw
@author
<a href="mailto:cmc@openoffice.org">Caol&aacute;n McNamara</a>
*/
- USHORT TransformWhichBetweenPools(const SfxItemPool &rDestPool,
- const SfxItemPool &rSrcPool, USHORT nWhich);
+ sal_uInt16 TransformWhichBetweenPools(const SfxItemPool &rDestPool,
+ const SfxItemPool &rSrcPool, sal_uInt16 nWhich);
/** Map a SwDoc WhichId to the equivalent Id for a given SfxItemSet
@@ -849,8 +849,8 @@ namespace sw
@author
<a href="mailto:cmc@openoffice.org">Caol&aacute;n McNamara</a>
*/
- USHORT GetSetWhichFromSwDocWhich(const SfxItemSet &rSet,
- const SwDoc &rDoc, USHORT nWhich);
+ sal_uInt16 GetSetWhichFromSwDocWhich(const SfxItemSet &rSet,
+ const SwDoc &rDoc, sal_uInt16 nWhich);
/** Make inserting an OLE object into a Writer document easy
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index bdd3b705c663..878286ccbb23 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -757,26 +757,26 @@ namespace sw
DateTime aDateTime(Date( 0 ), Time( 0 ));
if( lDTTM )
{
- USHORT lMin = (USHORT)(lDTTM & 0x0000003F);
+ sal_uInt16 lMin = (sal_uInt16)(lDTTM & 0x0000003F);
lDTTM >>= 6;
- USHORT lHour= (USHORT)(lDTTM & 0x0000001F);
+ sal_uInt16 lHour= (sal_uInt16)(lDTTM & 0x0000001F);
lDTTM >>= 5;
- USHORT lDay = (USHORT)(lDTTM & 0x0000001F);
+ sal_uInt16 lDay = (sal_uInt16)(lDTTM & 0x0000001F);
lDTTM >>= 5;
- USHORT lMon = (USHORT)(lDTTM & 0x0000000F);
+ sal_uInt16 lMon = (sal_uInt16)(lDTTM & 0x0000000F);
lDTTM >>= 4;
- USHORT lYear= (USHORT)(lDTTM & 0x000001FF) + 1900;
+ sal_uInt16 lYear= (sal_uInt16)(lDTTM & 0x000001FF) + 1900;
aDateTime = DateTime(Date(lDay, lMon, lYear), Time(lHour, lMin));
}
return aDateTime;
}
- ULONG MSDateTimeFormatToSwFormat(String& rParams,
- SvNumberFormatter *pFormatter, USHORT &rLang, bool bHijri,
- USHORT nDocLang)
+ sal_uLong MSDateTimeFormatToSwFormat(String& rParams,
+ SvNumberFormatter *pFormatter, sal_uInt16 &rLang, bool bHijri,
+ sal_uInt16 nDocLang)
{
// tell the Formatter about the new entry
- UINT16 nCheckPos = 0;
+ sal_uInt16 nCheckPos = 0;
short nType = NUMBERFORMAT_DEFINED;
sal_uInt32 nKey = 0;
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index fc6dace26520..be74a11d2795 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -202,19 +202,19 @@ void WW8Export::DoComboBox(const rtl::OUString &rName,
OutputField(0, ww::eFORMDROPDOWN, FieldString(ww::eFORMDROPDOWN),
WRITEFIELD_START | WRITEFIELD_CMD_START);
// write the refence to the "picture" structure
- ULONG nDataStt = pDataStrm->Tell();
+ sal_uLong nDataStt = pDataStrm->Tell();
pChpPlc->AppendFkpEntry( Strm().Tell() );
WriteChar( 0x01 );
- static BYTE aArr1[] =
+ static sal_uInt8 aArr1[] =
{
0x03, 0x6a, 0,0,0,0, // sprmCPicLocation
0x06, 0x08, 0x01, // sprmCFData
0x55, 0x08, 0x01, // sprmCFSpec
0x02, 0x08, 0x01 // sprmCFFldVanish
};
- BYTE* pDataAdr = aArr1 + 2;
+ sal_uInt8* pDataAdr = aArr1 + 2;
Set_UInt32( pDataAdr, nDataStt );
pChpPlc->AppendFkpEntry(Strm().Tell(), sizeof(aArr1), aArr1);
@@ -249,18 +249,18 @@ void WW8Export::DoCheckBox(uno::Reference<beans::XPropertySet> xPropSet)
OutputField(0, ww::eFORMCHECKBOX, FieldString(ww::eFORMCHECKBOX),
WRITEFIELD_START | WRITEFIELD_CMD_START);
// write the refence to the "picture" structure
- ULONG nDataStt = pDataStrm->Tell();
+ sal_uLong nDataStt = pDataStrm->Tell();
pChpPlc->AppendFkpEntry( Strm().Tell() );
WriteChar( 0x01 );
- static BYTE aArr1[] = {
+ static sal_uInt8 aArr1[] = {
0x03, 0x6a, 0,0,0,0, // sprmCPicLocation
0x06, 0x08, 0x01, // sprmCFData
0x55, 0x08, 0x01, // sprmCFSpec
0x02, 0x08, 0x01 // sprmCFFldVanish
};
- BYTE* pDataAdr = aArr1 + 2;
+ sal_uInt8* pDataAdr = aArr1 + 2;
Set_UInt32( pDataAdr, nDataStt );
pChpPlc->AppendFkpEntry(Strm().Tell(),
@@ -309,18 +309,18 @@ void WW8Export::DoFormText(const SwInputField * pFld)
OutputField(0, ww::eFORMTEXT, FieldString(ww::eFORMTEXT),
WRITEFIELD_START | WRITEFIELD_CMD_START);
// write the refence to the "picture" structure
- ULONG nDataStt = pDataStrm->Tell();
+ sal_uLong nDataStt = pDataStrm->Tell();
pChpPlc->AppendFkpEntry( Strm().Tell() );
WriteChar( 0x01 );
- static BYTE aArr1[] = {
+ static sal_uInt8 aArr1[] = {
0x02, 0x08, 0x81, // sprmCFFldVanish
0x03, 0x6a, 0,0,0,0, // sprmCPicLocation
0x06, 0x08, 0x01, // sprmCFData
0x55, 0x08, 0x01 // sprmCFSpec
};
- BYTE* pDataAdr = aArr1 + 5;
+ sal_uInt8* pDataAdr = aArr1 + 5;
Set_UInt32( pDataAdr, nDataStt );
pChpPlc->AppendFkpEntry(Strm().Tell(),
@@ -336,9 +336,10 @@ void WW8Export::DoFormText(const SwInputField * pFld)
OutputField(0, ww::eFORMTEXT, aEmptyStr, WRITEFIELD_CMD_END);
- SwWW8Writer::WriteString16(Strm(), pFld->Expand(), false);
+ String const fieldStr( pFld->ExpandField(true) );
+ SwWW8Writer::WriteString16(Strm(), fieldStr, false);
- static BYTE aArr2[] = {
+ static sal_uInt8 aArr2[] = {
0x03, 0x6a, 0x00, 0x00, 0x00, 0x00, // sprmCPicLocation
0x55, 0x08, 0x01, // sprmCFSpec
0x75, 0x08, 0x01 // ???
@@ -542,7 +543,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
}
// <--
- INT32 nThick = aIter->mnThick;
+ sal_Int32 nThick = aIter->mnThick;
//If we are being exported as an inline hack, set
//corner to 0 and forget about border thickness for positioning
@@ -570,7 +571,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
SwWW8Writer::WriteLong(*rWrt.pTableStrm,aRect.Bottom() - nThick);
//fHdr/bx/by/wr/wrk/fRcaSimple/fBelowText/fAnchorLock
- USHORT nFlags=0;
+ sal_uInt16 nFlags=0;
//If nFlags isn't 0x14 its overridden by the escher properties
if (FLY_AT_PAGE == rFmt.GetAnchor().GetAnchorId())
nFlags = 0x0000;
@@ -578,7 +579,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
nFlags = 0x0014; // x-rel to text, y-rel to text
const SwFmtSurround& rSurr = rFmt.GetSurround();
- USHORT nContour = rSurr.IsContour() ? 0x0080 : 0x0040;
+ sal_uInt16 nContour = rSurr.IsContour() ? 0x0080 : 0x0040;
SwSurround eSurround = rSurr.GetSurround();
/*
@@ -699,7 +700,7 @@ bool PlcDrawObj::Append( WW8Export& rWrt, WW8_CP nCp, const sw::Frame& rFmt,
return bRet;
}
-void DrawObj::SetShapeDetails(UINT32 nId, INT32 nThick)
+void DrawObj::SetShapeDetails(sal_uInt32 nId, sal_Int32 nThick)
{
mnShapeId = nId;
mnThick = nThick;
@@ -725,7 +726,7 @@ bool WW8_WrPlcTxtBoxes::WriteTxt( WW8Export& rWrt )
return bRet;
}
-void WW8_WrPlcTxtBoxes::Append( const SdrObject& rObj, UINT32 nShapeId )
+void WW8_WrPlcTxtBoxes::Append( const SdrObject& rObj, sal_uInt32 nShapeId )
{
void* p = (void*)&rObj;
aCntnt.Insert( p, aCntnt.Count() );
@@ -739,9 +740,9 @@ const SvULongs* WW8_WrPlcTxtBoxes::GetShapeIdArr() const
/* */
-UINT32 WW8Export::GetSdrOrdNum( const SwFrmFmt& rFmt ) const
+sal_uInt32 WW8Export::GetSdrOrdNum( const SwFrmFmt& rFmt ) const
{
- UINT32 nOrdNum;
+ sal_uInt32 nOrdNum;
const SdrObject* pObj = rFmt.FindRealSdrObject();
if( pObj )
nOrdNum = pObj->GetOrdNum();
@@ -805,7 +806,7 @@ void WW8Export::AppendFlyInFlys(const sw::Frame& rFrmFmt,
}
MSWord_SdrAttrIter::MSWord_SdrAttrIter( MSWordExportBase& rWr,
- const EditTextObject& rEditObj, BYTE nTyp )
+ const EditTextObject& rEditObj, sal_uInt8 nTyp )
: MSWordAttrIter( rWr ), pEditObj(&rEditObj), pEditPool(0),
aTxtAtrArr( 0, 4 ), aChrTxtAtrArr( 0, 4 ), aChrSetArr( 0, 4 ),
mnTyp(nTyp)
@@ -813,7 +814,7 @@ MSWord_SdrAttrIter::MSWord_SdrAttrIter( MSWordExportBase& rWr,
NextPara( 0 );
}
-void MSWord_SdrAttrIter::NextPara( USHORT nPar )
+void MSWord_SdrAttrIter::NextPara( sal_uInt16 nPar )
{
nPara = nPar;
// Attributwechsel an Pos 0 wird ignoriert, da davon ausgegangen
@@ -888,7 +889,7 @@ void MSWord_SdrAttrIter::SetCharSet(const EECharAttrib& rAttr, bool bStart)
if( p )
{
- USHORT nPos;
+ sal_uInt16 nPos;
if( bStart )
{
nPos = aChrSetArr.Count();
@@ -909,7 +910,7 @@ void MSWord_SdrAttrIter::OutEEField(const SfxPoolItem& rHt)
const SvxFieldData *pFld = rField.GetField();
if (pFld && pFld->ISA(SvxURLField))
{
- BYTE nOldTxtTyp = m_rExport.nTxtTyp;
+ sal_uInt8 nOldTxtTyp = m_rExport.nTxtTyp;
m_rExport.nTxtTyp = mnTyp;
const SvxURLField *pURL = (const SvxURLField *)pFld;
m_rExport.AttrOutput().StartURL( pURL->GetURL(), pURL->GetTargetFrame() );
@@ -935,7 +936,7 @@ void MSWord_SdrAttrIter::OutAttr( xub_StrLen nSwPos )
const SfxItemPool& rDstPool = m_rExport.pDoc->GetAttrPool();
nTmpSwPos = nSwPos;
- USHORT i, nWhich, nSlotId;
+ sal_uInt16 i, nWhich, nSlotId;
for( i = 0; i < aTxtAtrArr.Count(); i++ )
{
const EECharAttrib& rHt = aTxtAtrArr[ i ];
@@ -981,7 +982,7 @@ void MSWord_SdrAttrIter::OutAttr( xub_StrLen nSwPos )
bool MSWord_SdrAttrIter::IsTxtAttr(xub_StrLen nSwPos)
{
- for (USHORT i = 0; i < aTxtAtrArr.Count(); ++i)
+ for (sal_uInt16 i = 0; i < aTxtAtrArr.Count(); ++i)
{
const EECharAttrib& rHt = aTxtAtrArr[ i ];
if (nSwPos >= rHt.nStart && nSwPos < rHt.nEnd)
@@ -1004,14 +1005,14 @@ bool MSWord_SdrAttrIter::IsTxtAttr(xub_StrLen nSwPos)
// Attribut-Anfangposition fragen kann.
// Es koennen nur Attribute mit Ende abgefragt werden.
// Es wird mit bDeep gesucht
-const SfxPoolItem* MSWord_SdrAttrIter::HasTextItem(USHORT nWhich) const
+const SfxPoolItem* MSWord_SdrAttrIter::HasTextItem(sal_uInt16 nWhich) const
{
const SfxPoolItem* pRet = 0;
nWhich = sw::hack::TransformWhichBetweenPools(*pEditPool,
m_rExport.pDoc->GetAttrPool(), nWhich);
if (nWhich)
{
- for (USHORT i = 0; i < aTxtAtrArr.Count(); ++i)
+ for (sal_uInt16 i = 0; i < aTxtAtrArr.Count(); ++i)
{
const EECharAttrib& rHt = aTxtAtrArr[i];
if (
@@ -1029,7 +1030,7 @@ const SfxPoolItem* MSWord_SdrAttrIter::HasTextItem(USHORT nWhich) const
return pRet;
}
-const SfxPoolItem& MSWord_SdrAttrIter::GetItem( USHORT nWhich ) const
+const SfxPoolItem& MSWord_SdrAttrIter::GetItem( sal_uInt16 nWhich ) const
{
using sw::hack::GetSetWhichFromSwDocWhich;
const SfxPoolItem* pRet = HasTextItem(nWhich);
@@ -1058,7 +1059,7 @@ void MSWord_SdrAttrIter::OutParaAttr(bool bCharAttr)
* pDstPool = &m_rExport.pDoc->GetAttrPool();
do {
- USHORT nWhich = pItem->Which(),
+ sal_uInt16 nWhich = pItem->Which(),
nSlotId = pSrcPool->GetSlotId( nWhich );
if ( nSlotId && nWhich != nSlotId &&
@@ -1079,7 +1080,7 @@ void MSWord_SdrAttrIter::OutParaAttr(bool bCharAttr)
}
}
-void WW8Export::WriteSdrTextObj(const SdrObject& rObj, BYTE nTyp)
+void WW8Export::WriteSdrTextObj(const SdrObject& rObj, sal_uInt8 nTyp)
{
const SdrTextObj* pTxtObj = PTR_CAST(SdrTextObj, &rObj);
OSL_ENSURE(pTxtObj, "That is no SdrTextObj!");
@@ -1112,15 +1113,15 @@ void WW8Export::WriteSdrTextObj(const SdrObject& rObj, BYTE nTyp)
}
}
-void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, BYTE nTyp)
+void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTyp)
{
bool bAnyWrite = false;
const EditTextObject& rEditObj = rParaObj.GetTextObject();
MSWord_SdrAttrIter aAttrIter( *this, rEditObj, nTyp );
- USHORT nPara = rEditObj.GetParagraphCount();
- BYTE bNul = 0;
- for( USHORT n = 0; n < nPara; ++n )
+ sal_uInt16 nPara = rEditObj.GetParagraphCount();
+ sal_uInt8 bNul = 0;
+ for( sal_uInt16 n = 0; n < nPara; ++n )
{
if( n )
aAttrIter.NextPara( n );
@@ -1171,7 +1172,7 @@ void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, BYTE nTyp)
aAttrIter.OutParaAttr(false);
- ULONG nPos = Strm().Tell();
+ sal_uLong nPos = Strm().Tell();
pPapPlc->AppendFkpEntry( Strm().Tell(),
pO->Count(), pO->GetData() );
pO->Remove( 0, pO->Count() ); // leeren
@@ -1194,19 +1195,19 @@ void WinwordAnchoring::WriteData( EscherEx& rEx ) const
if (mbInline)
{
rEx.AddAtom(18, DFF_msofbtUDefProp, 3, 3); //Prop id is 0xF122
- rSt << (UINT16)0x0390 << sal_uInt32(3);
- rSt << (UINT16)0x0392 << sal_uInt32(3);
+ rSt << (sal_uInt16)0x0390 << sal_uInt32(3);
+ rSt << (sal_uInt16)0x0392 << sal_uInt32(3);
//This sub property is required to be in the dummy inline frame as
//well
- rSt << (UINT16)0x053F << nInlineHack;
+ rSt << (sal_uInt16)0x053F << nInlineHack;
}
else
{
rEx.AddAtom(24, DFF_msofbtUDefProp, 3, 4 ); //Prop id is 0xF122
- rSt << (UINT16)0x038F << mnXAlign;
- rSt << (UINT16)0x0390 << mnXRelTo;
- rSt << (UINT16)0x0391 << mnYAlign;
- rSt << (UINT16)0x0392 << mnYRelTo;
+ rSt << (sal_uInt16)0x038F << mnXAlign;
+ rSt << (sal_uInt16)0x0390 << mnXRelTo;
+ rSt << (sal_uInt16)0x0391 << mnYAlign;
+ rSt << (sal_uInt16)0x0392 << mnYRelTo;
}
}
}
@@ -1231,7 +1232,7 @@ void WW8Export::WriteEscher()
{
if (pEscher)
{
- ULONG nStart = pTableStrm->Tell();
+ sal_uLong nStart = pTableStrm->Tell();
pEscher->WritePictures();
pEscher->FinishEscher();
@@ -1247,7 +1248,7 @@ void SwEscherEx::WritePictures()
if( SvStream* pPicStrm = static_cast< SwEscherExGlobal& >( *mxGlobal ).GetPictureStream() )
{
// set the blip - entries to the correct stream pos
- INT32 nEndPos = rWrt.Strm().Tell();
+ sal_Int32 nEndPos = rWrt.Strm().Tell();
mxGlobal->SetNewBlipStreamOffset( nEndPos );
pPicStrm->Seek( 0 );
@@ -1292,7 +1293,7 @@ void SwBasicEscherEx::WriteFrmExtraData(const SwFrmFmt&)
GetStream() << (sal_uInt32)0x80000000;
}
-void SwBasicEscherEx::WriteEmptyFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
+void SwBasicEscherEx::WriteEmptyFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId)
{
OpenContainer(ESCHER_SpContainer);
AddShape(ESCHER_ShpInst_PictureFrame, 0xa00, nShapeId);
@@ -1300,12 +1301,12 @@ void SwBasicEscherEx::WriteEmptyFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
WriteFrmExtraData(rFmt);
AddAtom(6, DFF_msofbtUDefProp, 3, 1); //Prop id is 0xF122
- GetStream() << (UINT16)0x053F << nInlineHack;
+ GetStream() << (sal_uInt16)0x053F << nInlineHack;
CloseContainer(); // ESCHER_SpContainer
}
-UINT32 AddMirrorFlags(UINT32 nFlags, const SwMirrorGrf &rMirror)
+sal_uInt32 AddMirrorFlags(sal_uInt32 nFlags, const SwMirrorGrf &rMirror)
{
switch (rMirror.GetValue())
{
@@ -1327,9 +1328,9 @@ UINT32 AddMirrorFlags(UINT32 nFlags, const SwMirrorGrf &rMirror)
return nFlags;
}
-INT32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
+sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId)
{
- INT32 nBorderThick=0;
+ sal_Int32 nBorderThick=0;
SwNoTxtNode *pNd = GetNoTxtNodeFromSwFrmFmt(rFmt);
SwGrfNode *pGrfNd = pNd ? pNd->GetGrfNode() : 0;
OSL_ENSURE(pGrfNd, "No SwGrfNode ?, suspicious");
@@ -1344,7 +1345,7 @@ INT32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
EscherPropertyContainer aPropOpt;
- UINT32 nFlags = ESCHER_BlipFlagDefault;
+ sal_uInt32 nFlags = ESCHER_BlipFlagDefault;
if (pGrfNd->IsLinkedFile())
{
@@ -1355,8 +1356,8 @@ INT32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
SwWW8Writer::InsAsString16( aBuf, sURL );
SwWW8Writer::InsUInt16( aBuf, 0 );
- USHORT nArrLen = aBuf.Count();
- BYTE* pArr = new BYTE[ nArrLen ];
+ sal_uInt16 nArrLen = aBuf.Count();
+ sal_uInt8* pArr = new sal_uInt8[ nArrLen ];
memcpy( pArr, aBuf.GetData(), nArrLen );
aPropOpt.AddOpt(ESCHER_Prop_pibName, true, nArrLen, pArr, nArrLen);
@@ -1486,7 +1487,7 @@ void SwBasicEscherEx::WriteGrfAttr(const SwNoTxtNode& rNd,
true, &pItem))
{
const Size aSz( rNd.GetTwipSize() );
- INT32 nVal;
+ sal_Int32 nVal;
if( 0 != ( nVal = ((SwCropGrf*)pItem )->GetLeft() ) )
rPropOpt.AddOpt( ESCHER_Prop_cropFromLeft, ToFract16( nVal, aSz.Width()) );
if( 0 != ( nVal = ((SwCropGrf*)pItem )->GetRight() ) )
@@ -1498,23 +1499,23 @@ void SwBasicEscherEx::WriteGrfAttr(const SwNoTxtNode& rNd,
}
}
-void SwBasicEscherEx::SetPicId(const SdrObject &, UINT32,
+void SwBasicEscherEx::SetPicId(const SdrObject &, sal_uInt32,
EscherPropertyContainer &)
{
}
-void SwEscherEx::SetPicId(const SdrObject &rSdrObj, UINT32 nShapeId,
+void SwEscherEx::SetPicId(const SdrObject &rSdrObj, sal_uInt32 nShapeId,
EscherPropertyContainer &rPropOpt)
{
pTxtBxs->Append(rSdrObj, nShapeId);
- UINT32 nPicId = pTxtBxs->Count();
+ sal_uInt32 nPicId = pTxtBxs->Count();
nPicId *= 0x10000;
rPropOpt.AddOpt( ESCHER_Prop_pictureId, nPicId );
}
-INT32 SwBasicEscherEx::WriteOLEFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
+sal_Int32 SwBasicEscherEx::WriteOLEFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId)
{
- INT32 nBorderThick = 0;
+ sal_Int32 nBorderThick = 0;
if (const SdrObject* pSdrObj = rFmt.FindRealSdrObject())
{
SwNodeIndex aIdx(*rFmt.GetCntnt().GetCntntIdx(), 1);
@@ -1613,7 +1614,7 @@ void SwBasicEscherEx::WriteBrushAttr(const SvxBrushItem &rBrush,
}
else
{
- UINT32 nFillColor = GetColor(rBrush.GetColor(), false);
+ sal_uInt32 nFillColor = GetColor(rBrush.GetColor(), false);
rPropOpt.AddOpt( ESCHER_Prop_fillColor, nFillColor );
rPropOpt.AddOpt( ESCHER_Prop_fillBackColor, nFillColor ^ 0xffffff );
rPropOpt.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x100010 );
@@ -1630,27 +1631,27 @@ void SwBasicEscherEx::WriteBrushAttr(const SvxBrushItem &rBrush,
}
}
-INT32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
+sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
MSO_SPT eShapeType, EscherPropertyContainer& rPropOpt)
{
- INT32 nLineWidth=0;
+ sal_Int32 nLineWidth=0;
const SfxPoolItem* pItem;
bool bFirstLine = true;
if (SFX_ITEM_SET == rFmt.GetItemState(RES_BOX, true, &pItem))
{
- static const UINT16 aExhperProp[4] =
+ static const sal_uInt16 aExhperProp[4] =
{
ESCHER_Prop_dyTextTop, ESCHER_Prop_dyTextBottom,
ESCHER_Prop_dxTextLeft, ESCHER_Prop_dxTextRight
};
const SvxBorderLine* pLine;
- for( USHORT n = 0; n < 4; ++n )
+ for( sal_uInt16 n = 0; n < 4; ++n )
if( 0 != ( pLine = ((SvxBoxItem*)pItem)->GetLine( n )) )
{
if( bFirstLine )
{
- UINT32 nLineColor = GetColor(pLine->GetColor(), false);
+ sal_uInt32 nLineColor = GetColor(pLine->GetColor(), false);
rPropOpt.AddOpt( ESCHER_Prop_lineColor, nLineColor );
rPropOpt.AddOpt( ESCHER_Prop_lineBackColor,
nLineColor ^ 0xffffff );
@@ -1730,10 +1731,10 @@ INT32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
return nLineWidth;
}
-INT32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
+sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
EscherPropertyContainer& rPropOpt)
{
- INT32 nLineWidth = SwBasicEscherEx::WriteFlyFrameAttr(rFmt, eShapeType,
+ sal_Int32 nLineWidth = SwBasicEscherEx::WriteFlyFrameAttr(rFmt, eShapeType,
rPropOpt);
/*
@@ -1815,7 +1816,7 @@ INT32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
//PropOpt wants to own the buffer
aPolyDump.ObjectOwnsMemory(false);
rPropOpt.AddOpt(DFF_Prop_pWrapPolygonVertices, false,
- nArrLen, static_cast<BYTE *>(pArr), nArrLen);
+ nArrLen, static_cast<sal_uInt8 *>(pArr), nArrLen);
}
}
}
@@ -1845,11 +1846,11 @@ void SwBasicEscherEx::Init()
SetHellLayerId(rWrt.pDoc->GetHellId());
}
-INT32 SwBasicEscherEx::ToFract16(INT32 nVal, UINT32 nMax) const
+sal_Int32 SwBasicEscherEx::ToFract16(sal_Int32 nVal, sal_uInt32 nMax) const
{
if (nMax)
{
- INT32 nMSVal = (nVal / 65536) * nMax;
+ sal_Int32 nMSVal = (nVal / 65536) * nMax;
nMSVal += (nVal * 65536 ) / nMax;
return nMSVal;
}
@@ -1866,7 +1867,7 @@ void SwBasicEscherEx::WritePictures()
if( SvStream* pPicStrm = static_cast< SwEscherExGlobal& >( *mxGlobal ).GetPictureStream() )
{
// set the blip - entries to the correct stream pos
- INT32 nEndPos = pPicStrm->Tell();
+ sal_Int32 nEndPos = pPicStrm->Tell();
mxGlobal->WriteBlibStoreEntry(*pEscherStrm, 1, sal_True, nEndPos);
pPicStrm->Seek(0);
@@ -1892,7 +1893,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
CloseContainer(); // ESCHER_DggContainer
- BYTE i = 2; // for header/footer and the other
+ sal_uInt8 i = 2; // for header/footer and the other
PlcDrawObj *pSdrObjs = rWrt.pHFSdrObjs;
pTxtBxs = rWrt.pHFTxtBxs;
@@ -1913,7 +1914,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
EnterGroup( 0 );
- ULONG nSecondShapeId = pSdrObjs == rWrt.pSdrObjs ? GenerateShapeId() : 0;
+ sal_uLong nSecondShapeId = pSdrObjs == rWrt.pSdrObjs ? GenerateShapeId() : 0;
// write now all Writer-/DrawObjects
DrawObjPointerVector aSorted;
@@ -1923,7 +1924,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
DrawObjPointerIter aEnd = aSorted.end();
for (DrawObjPointerIter aIter = aSorted.begin(); aIter != aEnd; ++aIter)
{
- INT32 nBorderThick=0;
+ sal_Int32 nBorderThick=0;
DrawObj *pObj = (*aIter);
OSL_ENSURE(pObj, "impossible");
if (!pObj)
@@ -2478,13 +2479,13 @@ void SwEscherEx::WriteFrmExtraData( const SwFrmFmt& rFmt )
GetStream() << 1L;
}
-INT32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, UINT32 &rShapeId,
+sal_Int32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, sal_uInt32 &rShapeId,
DrawObjPointerVector &rPVec)
{
const SwFrmFmt &rFmt = rObj.maCntnt.GetFrmFmt();
// check for textflyframe and if it is the first in a Chain
- INT32 nBorderThick = 0;
+ sal_Int32 nBorderThick = 0;
const SwNodeIndex* pNdIdx = rFmt.GetCntnt().GetCntntIdx();
if( pNdIdx )
{
@@ -2501,8 +2502,8 @@ INT32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, UINT32 &rShapeId,
if (const SdrObject* pObj = rFmt.FindRealSdrObject())
{
// check for the first in a Chain
- UINT32 nTxtId;
- USHORT nOff = 0;
+ sal_uInt32 nTxtId;
+ sal_uInt16 nOff = 0;
const SwFrmFmt* pFmt = &rFmt, *pPrev;
while( 0 != ( pPrev = pFmt->GetChain().GetPrev() ))
{
@@ -2530,7 +2531,7 @@ INT32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, UINT32 &rShapeId,
nTxtId = pTxtBxs->GetPos( p );
if( USHRT_MAX == nTxtId )
{
- UINT32 nPrevShapeId =
+ sal_uInt32 nPrevShapeId =
GetFlyShapeId(*pFmt, rObj.mnHdFtIndex, rPVec);
pTxtBxs->Append( *pPrevObj, nPrevShapeId );
nTxtId = pTxtBxs->Count();
@@ -2548,7 +2549,7 @@ INT32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, UINT32 &rShapeId,
return nBorderThick;
}
-USHORT FindPos(const SwFrmFmt &rFmt, unsigned int nHdFtIndex,
+sal_uInt16 FindPos(const SwFrmFmt &rFmt, unsigned int nHdFtIndex,
DrawObjPointerVector &rPVec)
{
DrawObjPointerIter aEnd = rPVec.end();
@@ -2563,19 +2564,19 @@ USHORT FindPos(const SwFrmFmt &rFmt, unsigned int nHdFtIndex,
&rFmt == (&pObj->maCntnt.GetFrmFmt())
)
{
- return static_cast< USHORT >(aIter - rPVec.begin());
+ return static_cast< sal_uInt16 >(aIter - rPVec.begin());
}
}
return USHRT_MAX;
}
-INT32 SwEscherEx::WriteTxtFlyFrame(const DrawObj &rObj, UINT32 nShapeId,
- UINT32 nTxtBox, DrawObjPointerVector &rPVec)
+sal_Int32 SwEscherEx::WriteTxtFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId,
+ sal_uInt32 nTxtBox, DrawObjPointerVector &rPVec)
{
const SwFrmFmt &rFmt = rObj.maCntnt.GetFrmFmt();
short nDirection = rObj.mnDirection;
- INT32 nBorderThick=0;
+ sal_Int32 nBorderThick=0;
OpenContainer( ESCHER_SpContainer );
AddShape( ESCHER_ShpInst_TextBox, 0xa00, nShapeId );
@@ -2583,7 +2584,7 @@ INT32 SwEscherEx::WriteTxtFlyFrame(const DrawObj &rObj, UINT32 nShapeId,
aPropOpt.AddOpt(ESCHER_Prop_lTxid, nTxtBox);
if (const SwFrmFmt *pNext = rFmt.GetChain().GetNext())
{
- USHORT nPos = FindPos(*pNext, rObj.mnHdFtIndex, rPVec);
+ sal_uInt16 nPos = FindPos(*pNext, rObj.mnHdFtIndex, rPVec);
if (USHRT_MAX != nPos && aFollowShpIds[nPos])
aPropOpt.AddOpt(ESCHER_Prop_hspNext, aFollowShpIds[nPos]);
}
@@ -2644,7 +2645,7 @@ void SwBasicEscherEx::WriteOLEPicture(EscherPropertyContainer &rPropOpt,
rPropOpt.AddOpt( ESCHER_Prop_pictureActive, 0x10000 );
}
-void SwEscherEx::WriteOCXControl( const SwFrmFmt& rFmt, UINT32 nShapeId )
+void SwEscherEx::WriteOCXControl( const SwFrmFmt& rFmt, sal_uInt32 nShapeId )
{
if (const SdrObject* pSdrObj = rFmt.FindRealSdrObject())
{
@@ -2677,15 +2678,15 @@ void SwEscherEx::WriteOCXControl( const SwFrmFmt& rFmt, UINT32 nShapeId )
void SwEscherEx::MakeZOrderArrAndFollowIds(
std::vector<DrawObj>& rSrcArr, std::vector<DrawObj*>&rDstArr)
{
- USHORT n, nCnt = static_cast< USHORT >(rSrcArr.size());
+ sal_uInt16 n, nCnt = static_cast< sal_uInt16 >(rSrcArr.size());
SvULongsSort aSort( 255 < nCnt ? 255 : nCnt, 255 );
rDstArr.clear();
rDstArr.reserve(nCnt);
for (n = 0; n < nCnt; ++n)
{
const SwFrmFmt &rFmt = rSrcArr[n].maCntnt.GetFrmFmt();
- ULONG nOrdNum = rWrt.GetSdrOrdNum(rFmt);
- USHORT nPos;
+ sal_uLong nOrdNum = rWrt.GetSdrOrdNum(rFmt);
+ sal_uInt16 nPos;
//returns what will be the index in rDstArr of p as nPos
aSort.Insert(nOrdNum, nPos);
DrawObj &rObj = rSrcArr[n];
@@ -2707,17 +2708,17 @@ void SwEscherEx::MakeZOrderArrAndFollowIds(
bNeedsShapeId = true;
}
- ULONG nShapeId = bNeedsShapeId ? GenerateShapeId() : 0;
+ sal_uLong nShapeId = bNeedsShapeId ? GenerateShapeId() : 0;
aFollowShpIds.Insert(nShapeId, n);
}
}
-UINT32 SwEscherEx::GetFlyShapeId(const SwFrmFmt& rFmt,
+sal_uInt32 SwEscherEx::GetFlyShapeId(const SwFrmFmt& rFmt,
unsigned int nHdFtIndex, DrawObjPointerVector &rpVec)
{
- USHORT nPos = FindPos(rFmt, nHdFtIndex, rpVec);
- UINT32 nShapeId;
+ sal_uInt16 nPos = FindPos(rFmt, nHdFtIndex, rpVec);
+ sal_uInt32 nShapeId;
if (USHRT_MAX != nPos)
{
if (0 == (nShapeId = aFollowShpIds[nPos]))
@@ -2731,10 +2732,10 @@ UINT32 SwEscherEx::GetFlyShapeId(const SwFrmFmt& rFmt,
return nShapeId;
}
-UINT32 SwEscherEx::QueryTextID(
- const uno::Reference< drawing::XShape>& xXShapeRef, UINT32 nShapeId )
+sal_uInt32 SwEscherEx::QueryTextID(
+ const uno::Reference< drawing::XShape>& xXShapeRef, sal_uInt32 nShapeId )
{
- UINT32 nId = 0;
+ sal_uInt32 nId = 0;
if (SdrObject* pObj = GetSdrObjectFromXShape(xXShapeRef))
{
pTxtBxs->Append( *pObj, nShapeId );
@@ -2781,7 +2782,7 @@ bool SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrObject *pOb
if (!WriteOCXStream(xOleStg,xControlModel,aSize,sName))
return false;
- BYTE aSpecOLE[] =
+ sal_uInt8 aSpecOLE[] =
{
0x03, 0x6a, 0xFF, 0xFF, 0xFF, 0xFF, // sprmCPicLocation
0x0a, 0x08, 1, // sprmCFOLE2
@@ -2789,7 +2790,7 @@ bool SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrObject *pOb
0x56, 0x08, 1 // sprmCFObj
};
//Set the obj id into the sprmCPicLocation
- BYTE *pData = aSpecOLE+2;
+ sal_uInt8 *pData = aSpecOLE+2;
Set_UInt32(pData,(sal_uInt32)(sal_uIntPtr)pObj);
String sFld(FieldString(ww::eCONTROL));
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 1cd6be0f80c8..d9f8c318ba0a 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -415,7 +415,7 @@ void SwWW8AttrIter::OutAttr( xub_StrLen nSwPos, bool bRuby )
//The hard formatting properties that affect the entire paragraph
if (rNd.HasSwAttrSet())
{
- BOOL bDeep = FALSE;
+ sal_Bool bDeep = sal_False;
// only copy hard attributes - bDeep = false
aExportSet.Set(rNd.GetSwAttrSet(), bDeep);
// get the current font item. Use rNd.GetSwAttrSet instead of aExportSet:
@@ -449,7 +449,7 @@ void SwWW8AttrIter::OutAttr( xub_StrLen nSwPos, bool bRuby )
sal_uInt16 nWhichId = aIter.FirstWhich();
while( nWhichId )
{
- if( SFX_ITEM_SET == pSet->GetItemState( nWhichId, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pSet->GetItemState( nWhichId, sal_False, &pItem ))
{
if (nWhichId == nFontId)
pFont = &(item_cast<SvxFontItem>(*pItem));
@@ -550,7 +550,7 @@ bool SwWW8AttrIter::IsTxtAttr( xub_StrLen nSwPos )
// search for attrs with CH_TXTATR
if (const SwpHints* pTxtAttrs = rNd.GetpSwpHints())
{
- for (USHORT i = 0; i < pTxtAttrs->Count(); ++i)
+ for (sal_uInt16 i = 0; i < pTxtAttrs->Count(); ++i)
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
if ( pHt->HasDummyChar() && (*pHt->GetStart() == nSwPos) )
@@ -585,7 +585,7 @@ bool SwWW8AttrIter::RequiresImplicitBookmark()
SwImplBookmarksIter bkmkIterEnd = m_rExport.maImplicitBookmarks.end();
for ( SwImplBookmarksIter aIter = m_rExport.maImplicitBookmarks.begin(); aIter != bkmkIterEnd; ++aIter )
{
- ULONG sample = aIter->second;
+ sal_uLong sample = aIter->second;
if ( sample == rNd.GetIndex() )
return true;
@@ -599,7 +599,7 @@ bool SwWW8AttrIter::RequiresImplicitBookmark()
// Attribut-Anfangposition fragen kann.
// Es koennen nur Attribute mit Ende abgefragt werden.
// Es wird mit bDeep gesucht
-const SfxPoolItem* SwWW8AttrIter::HasTextItem( USHORT nWhich ) const
+const SfxPoolItem* SwWW8AttrIter::HasTextItem( sal_uInt16 nWhich ) const
{
const SfxPoolItem* pRet = 0;
const SwpHints* pTxtAttrs = rNd.GetpSwpHints();
@@ -607,7 +607,7 @@ const SfxPoolItem* SwWW8AttrIter::HasTextItem( USHORT nWhich ) const
if (pTxtAttrs && m_rExport.m_aCurrentCharPropStarts.size())
{
xub_StrLen nTmpSwPos = m_rExport.m_aCurrentCharPropStarts.top();
- for (USHORT i = 0; i < pTxtAttrs->Count(); ++i)
+ for (sal_uInt16 i = 0; i < pTxtAttrs->Count(); ++i)
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
const SfxPoolItem* pItem = &pHt->GetAttr();
@@ -628,12 +628,12 @@ const SfxPoolItem* SwWW8AttrIter::HasTextItem( USHORT nWhich ) const
void WW8Export::GetCurrentItems(WW8Bytes& rItems) const
{
- USHORT nEnd = pO ? pO->Count() : 0;
- for (USHORT nI = 0; nI < nEnd; ++nI)
+ sal_uInt16 nEnd = pO ? pO->Count() : 0;
+ for (sal_uInt16 nI = 0; nI < nEnd; ++nI)
rItems.Insert((*pO)[nI], rItems.Count());
}
-const SfxPoolItem& SwWW8AttrIter::GetItem(USHORT nWhich) const
+const SfxPoolItem& SwWW8AttrIter::GetItem(sal_uInt16 nWhich) const
{
const SfxPoolItem* pRet = HasTextItem(nWhich);
return pRet ? *pRet : rNd.SwCntntNode::GetAttr(nWhich);
@@ -679,7 +679,7 @@ void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, xub_StrLen /*nPos*/,
other, so we make a guess based upon the first character of the text,
defaulting to asian.
*/
- USHORT nRubyScript;
+ sal_uInt16 nRubyScript;
if( pBreakIt->GetBreakIter().is() )
nRubyScript = pBreakIt->GetBreakIter()->getScriptType( rRuby.GetText(), 0);
else
@@ -869,20 +869,20 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
m_rWW8Export.OutputField( 0, ww::eHYPERLINK, sURL, WRITEFIELD_START | WRITEFIELD_CMD_START );
// write the refence to the "picture" structure
- ULONG nDataStt = m_rWW8Export.pDataStrm->Tell();
+ sal_uLong nDataStt = m_rWW8Export.pDataStrm->Tell();
m_rWW8Export.pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell() );
// WinWord 2000 doesn't write this - so its a temp solution by W97 ?
m_rWW8Export.WriteChar( 0x01 );
- static BYTE aArr1[] = {
+ static sal_uInt8 aArr1[] = {
0x03, 0x6a, 0,0,0,0, // sprmCPicLocation
0x06, 0x08, 0x01, // sprmCFData
0x55, 0x08, 0x01, // sprmCFSpec
0x02, 0x08, 0x01 // sprmCFFldVanish
};
- BYTE* pDataAdr = aArr1 + 2;
+ sal_uInt8* pDataAdr = aArr1 + 2;
Set_UInt32( pDataAdr, nDataStt );
m_rWW8Export.pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), sizeof( aArr1 ), aArr1 );
@@ -895,7 +895,7 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
//all links end up in the data stream as absolute references.
bool bAbsolute = !bBookMarkOnly;
- static BYTE const aURLData1[] = {
+ static sal_uInt8 aURLData1[] = {
0,0,0,0, // len of struct
0x44,0, // the start of "next" data
0,0,0,0,0,0,0,0,0,0, // PIC-Structure!
@@ -904,20 +904,20 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // |
0,0,0,0, // /
};
- static BYTE const MAGIC_A[] = {
+ static sal_uInt8 MAGIC_A[] = {
// start of "next" data
0xD0,0xC9,0xEA,0x79,0xF9,0xBA,0xCE,0x11,
0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B
};
m_rWW8Export.pDataStrm->Write( aURLData1, sizeof( aURLData1 ) );
- BYTE nAnchor = 0x00;
+ sal_uInt8 nAnchor = 0x00;
if ( sMark.Len() )
nAnchor = 0x08;
m_rWW8Export.pDataStrm->Write( &nAnchor, 1 );
m_rWW8Export.pDataStrm->Write( MAGIC_A, sizeof(MAGIC_A) );
SwWW8Writer::WriteLong( *m_rWW8Export.pDataStrm, 0x00000002);
- UINT32 nFlag = bBookMarkOnly ? 0 : 0x01;
+ sal_uInt32 nFlag = bBookMarkOnly ? 0 : 0x01;
if ( bAbsolute )
nFlag |= 0x02;
if ( sMark.Len() )
@@ -929,13 +929,13 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
{
// version 1 (for a document)
- static BYTE const MAGIC_C[] = {
+ static sal_uInt8 MAGIC_C[] = {
0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46,
0x00, 0x00
};
- static BYTE const MAGIC_D[] = {
+ static sal_uInt8 MAGIC_D[] = {
0xFF, 0xFF, 0xAD, 0xDE, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
@@ -984,7 +984,7 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
// what the data mean, except for the URL.
// The First piece is the WW8_PIC structure.
//
- static BYTE const MAGIC_B[] = {
+ static sal_uInt8 MAGIC_B[] = {
0xE0,0xC9,0xEA,0x79,0xF9,0xBA,0xCE,0x11,
0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B
};
@@ -1049,7 +1049,7 @@ void WW8AttributeOutput::FieldVanish( const String& rTxt, ww::eField /*eType*/ )
aItems.Insert( 67, aItems.Count() );
aItems.Insert( 1, aItems.Count() );
- USHORT nStt_sprmCFSpec = aItems.Count();
+ sal_uInt16 nStt_sprmCFSpec = aItems.Count();
// sprmCFSpec -- fSpec-Attribut true
if ( m_rWW8Export.bWrtWW8 )
@@ -1113,7 +1113,7 @@ void AttributeOutputBase::TOXMark( const SwTxtNode& rNode, const SwTOXMark& rAtt
{
eType = ww::eTC;
sTxt.InsertAscii( " TC \"", 0 );
- USHORT nLvl = rAttr.GetLevel();
+ sal_uInt16 nLvl = rAttr.GetLevel();
if (nLvl > WW8ListManager::nMaxLevel)
nLvl = WW8ListManager::nMaxLevel;
@@ -1137,7 +1137,7 @@ int SwWW8AttrIter::OutAttrWithRange(xub_StrLen nPos)
{
m_rExport.m_aCurrentCharPropStarts.push( nPos );
const xub_StrLen* pEnd;
- for ( USHORT i = 0; i < pTxtAttrs->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pTxtAttrs->Count(); ++i )
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
const SfxPoolItem* pItem = &pHt->GetAttr();
@@ -1195,7 +1195,7 @@ bool SwWW8AttrIter::IsRedlineAtEnd( xub_StrLen nEnd ) const
{
bool bRet = false;
// search next Redline
- for( USHORT nPos = nCurRedlinePos;
+ for( sal_uInt16 nPos = nCurRedlinePos;
nPos < m_rExport.pDoc->GetRedlineTbl().Count(); ++nPos )
{
const SwPosition* pEnd = m_rExport.pDoc->GetRedlineTbl()[ nPos ]->End();
@@ -1474,8 +1474,8 @@ String SwWW8AttrIter::GetSnippet(const String &rStr, xub_StrLen nAktPos,
*/
static SwTxtFmtColl& lcl_getFormatCollection( MSWordExportBase& rExport, const SwTxtNode* pTxtNode )
{
- USHORT nPos = 0;
- USHORT nMax = rExport.pDoc->GetRedlineTbl().Count();
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nMax = rExport.pDoc->GetRedlineTbl().Count();
while( nPos < nMax )
{
const SwRedline* pRedl = rExport.pDoc->GetRedlineTbl()[ nPos++ ];
@@ -1496,7 +1496,7 @@ static SwTxtFmtColl& lcl_getFormatCollection( MSWordExportBase& rExport, const S
return static_cast<SwTxtFmtColl&>( pTxtNode->GetAnyFmtColl() );
}
-void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rSwFmtDrop, USHORT nStyle,
+void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rSwFmtDrop, sal_uInt16 nStyle,
ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner )
{
short nDropLines = rSwFmtDrop.GetLines();
@@ -1505,7 +1505,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
SVBT16 nSty;
ShortToSVBT16( nStyle, nSty );
- m_rWW8Export.pO->Insert( (BYTE*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
if ( m_rWW8Export.bWrtWW8 )
{
@@ -1517,7 +1517,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
m_rWW8Export.InsUInt16( NS_sprm::LN_PDcs ); // Dropcap (sprmPDcs)
int nDCS = ( nDropLines << 3 ) | 0x01;
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( nDCS ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( nDCS ) );
m_rWW8Export.InsUInt16( NS_sprm::LN_PDxaFromText ); // Distance from text (sprmPDxaFromText)
m_rWW8Export.InsUInt16( nDistance );
@@ -1525,7 +1525,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
if ( rNode.GetDropSize( rFontHeight, rDropHeight, rDropDescent ) )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PDyaLine ); // Line spacing
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( -rDropHeight ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( -rDropHeight ) );
m_rWW8Export.InsUInt16( 0 );
}
}
@@ -1539,7 +1539,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
m_rWW8Export.pO->Insert( 46, m_rWW8Export.pO->Count() ); // Dropcap (sprmPDcs)
int nDCS = ( nDropLines << 3 ) | 0x01;
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( nDCS ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( nDCS ) );
m_rWW8Export.pO->Insert( 49, m_rWW8Export.pO->Count() ); // Distance from text (sprmPDxaFromText)
m_rWW8Export.InsUInt16( nDistance );
@@ -1547,7 +1547,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
if (rNode.GetDropSize(rFontHeight, rDropHeight, rDropDescent))
{
m_rWW8Export.pO->Insert( 20, m_rWW8Export.pO->Count() ); // Line spacing
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( -rDropHeight ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( -rDropHeight ) );
m_rWW8Export.InsUInt16( 0 );
}
}
@@ -1578,10 +1578,10 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
}
m_rWW8Export.InsUInt16( NS_sprm::LN_CHpsPos ); // Lower the chars
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( -((nDropLines - 1)*rDropDescent) / 10 ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( -((nDropLines - 1)*rDropDescent) / 10 ) );
m_rWW8Export.InsUInt16( NS_sprm::LN_CHps ); // Font Size
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( rFontHeight / 10 ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( rFontHeight / 10 ) );
}
else
{
@@ -1593,10 +1593,10 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
}
m_rWW8Export.pO->Insert( 101, m_rWW8Export.pO->Count() ); // Lower the chars
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( -((nDropLines - 1)*rDropDescent) / 10 ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( -((nDropLines - 1)*rDropDescent) / 10 ) );
m_rWW8Export.pO->Insert( 99, m_rWW8Export.pO->Count() ); // Font Size
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( rFontHeight / 10 ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( rFontHeight / 10 ) );
}
}
@@ -1631,7 +1631,7 @@ bool MSWordExportBase::GetBookmarks( const SwTxtNode& rNd, xub_StrLen nStt,
xub_StrLen nEnd, IMarkVector& rArr )
{
IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
- ULONG nNd = rNd.GetIndex( );
+ sal_uLong nNd = rNd.GetIndex( );
const sal_Int32 nMarks = pMarkAccess->getMarksCount();
for ( sal_Int32 i = 0; i < nMarks; i++ )
@@ -1753,7 +1753,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
// nStyleBeforeFly may change when we recurse into another node, so we
// have to remember it in nStyle
- USHORT nStyle = nStyleBeforeFly;
+ sal_uInt16 nStyle = nStyleBeforeFly;
SwWW8AttrIter aAttrIter( *this, rNode );
rtl_TextEncoding eChrSet = aAttrIter.GetCharSet();
@@ -1924,9 +1924,9 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
if ( isDropdownOrCheckbox )
AppendBookmark( pFieldmark->GetName(), false );
}
- nLen -= static_cast< USHORT >( ofs );
+ nLen -= static_cast< sal_uInt16 >( ofs );
- String aSnippet( aAttrIter.GetSnippet( aStr, nAktPos + static_cast< USHORT >( ofs ), nLen ) );
+ String aSnippet( aAttrIter.GetSnippet( aStr, nAktPos + static_cast< sal_uInt16 >( ofs ), nLen ) );
if ( ( nTxtTyp == TXT_EDN || nTxtTyp == TXT_FTN ) && nAktPos == 0 && nLen > 0 )
{
// Insert tab for aesthetic puposes #i24762#
@@ -2045,7 +2045,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
if ( !bFlyInTable )
{
SfxItemSet* pTmpSet = 0;
- const BYTE nPrvNxtNd = rNode.HasPrevNextLayNode();
+ const sal_uInt8 nPrvNxtNd = rNode.HasPrevNextLayNode();
if( (ND_HAS_PREV_LAYNODE|ND_HAS_NEXT_LAYNODE ) != nPrvNxtNd )
{
@@ -2075,16 +2075,16 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
}
}
- BOOL bParaRTL = FALSE;
+ sal_Bool bParaRTL = sal_False;
const SvxFrameDirectionItem* pItem = (const SvxFrameDirectionItem*)
rNode.GetSwAttrSet().GetItem(RES_FRAMEDIR);
if ( aAttrIter.IsParaRTL())
- bParaRTL = TRUE;
+ bParaRTL = sal_True;
if( rNode.IsNumbered())
{
const SwNumRule* pRule = rNode.GetNumRule();
- BYTE nLvl = static_cast< BYTE >( rNode.GetActualListLevel() );
+ sal_uInt8 nLvl = static_cast< sal_uInt8 >( rNode.GetActualListLevel() );
const SwNumFmt* pFmt = pRule->GetNumFmt( nLvl );
if( !pFmt )
pFmt = &pRule->Get( nLvl );
@@ -2191,7 +2191,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
// create new LRSpace item, based on the current (if present)
const SfxPoolItem* pPoolItem = NULL;
- pTmpSet->GetItemState(RES_LR_SPACE, TRUE, &pPoolItem);
+ pTmpSet->GetItemState(RES_LR_SPACE, sal_True, &pPoolItem);
SvxLRSpaceItem aLRSpace(
( pPoolItem == NULL )
? SvxLRSpaceItem(0, 0, 0, 0, RES_LR_SPACE)
@@ -2199,7 +2199,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
// new left margin = old left + label space
const SwNumRule* pRule = rNode.GetNumRule();
- const SwNumFmt& rNumFmt = pRule->Get( static_cast< USHORT >(rNode.GetActualListLevel()) );
+ const SwNumFmt& rNumFmt = pRule->Get( static_cast< sal_uInt16 >(rNode.GetActualListLevel()) );
// #i86652#
if ( rNumFmt.GetPositionAndSpaceMode() ==
SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
@@ -2296,7 +2296,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
if ( !pTmpSet )
pTmpSet = new SfxItemSet(rNode.GetSwAttrSet());
- const SvxFmtKeepItem aKeepItem( TRUE, RES_KEEP );
+ const SvxFmtKeepItem aKeepItem( sal_True, RES_KEEP );
pTmpSet->Put( aKeepItem );
}
}
@@ -2355,7 +2355,7 @@ void WW8AttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeIn
{
TableRowEnd( pInner->getDepth() );
- m_rWW8Export.pO->Insert( (BYTE*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoRow( pInner );
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
m_rWW8Export.pO->GetData() );
@@ -2427,7 +2427,7 @@ void MSWordExportBase::OutputSectionNode( const SwSectionNode& rSectionNode )
// Bug 74245 - if the first Node inside the section has an own
// PageDesc or PageBreak attribut, then dont write
// here the section break
- ULONG nRstLnNum = 0;
+ sal_uLong nRstLnNum = 0;
const SfxItemSet* pSet;
if ( rNd.IsTableNode() )
pSet = &rNd.GetTableNode()->GetTable().GetFrmFmt()->GetAttrSet();
@@ -2465,7 +2465,7 @@ void MSWordExportBase::OutputSectionNode( const SwSectionNode& rSectionNode )
}
-void WW8Export::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum )
+void WW8Export::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum )
{
pSepx->AppendSep(Fc2Cp(Strm().Tell()), pPageDesc, pFmt, nLnNum);
}
@@ -2484,7 +2484,7 @@ void WW8Export::OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd )
if (const SwpHints* pTxtAttrs = rNd.GetpSwpHints())
{
- for( USHORT n=0; n < pTxtAttrs->Count(); ++n )
+ for( sal_uInt16 n=0; n < pTxtAttrs->Count(); ++n )
{
const SwTxtAttr* pAttr = (*pTxtAttrs)[ n ];
if( RES_TXTATR_FLYCNT == pAttr->Which() )
@@ -2496,7 +2496,7 @@ void WW8Export::OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd )
if( pNodeIndex )
{
- ULONG nStt = pNodeIndex->GetIndex()+1,
+ sal_uLong nStt = pNodeIndex->GetIndex()+1,
nEnd = pNodeIndex->GetNode().EndOfSectionIndex();
if( (nStt < nEnd) && !pDoc->GetNodes()[ nStt ]->IsNoTxtNode() )
@@ -2566,8 +2566,8 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point
// Hole vom Node und vom letzten Node die Position in der Section
const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx();
- ULONG nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
- ULONG nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
+ sal_uLong nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
+ sal_uLong nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
if( nStt >= nEnd ) // kein Bereich, also kein gueltiger Node
return;
@@ -2589,7 +2589,7 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point
{
/* Munge flys in fly into absolutely positioned elements for word 6 */
const SwTxtNode* pParTxtNode = rAnch.GetCntntAnchor()->nNode.GetNode().GetTxtNode();
- const SwRect aPageRect = pParTxtNode->FindPageFrmRect( FALSE, 0, FALSE );
+ const SwRect aPageRect = pParTxtNode->FindPageFrmRect( sal_False, 0, sal_False );
aOffset = rFrmFmt.FindLayoutRect().Pos();
aOffset -= aPageRect.Pos();
@@ -2666,7 +2666,7 @@ void WW8AttributeOutput::Redline( const SwRedlineData* pRedline )
if ( pRedline->Next() )
Redline( pRedline->Next() );
- static USHORT const aSprmIds[ 2 * 2 * 3 ] =
+ static sal_uInt16 aSprmIds[ 2 * 2 * 3 ] =
{
// Ids for insert
NS_sprm::LN_CFRMark, NS_sprm::LN_CIbstRMark, NS_sprm::LN_CDttmRMark, // for WW8
@@ -2676,7 +2676,7 @@ void WW8AttributeOutput::Redline( const SwRedlineData* pRedline )
0x0041, 0x0045, 0x0046 // for WW6
};
- const USHORT* pSprmIds = 0;
+ const sal_uInt16* pSprmIds = 0;
switch( pRedline->GetType() )
{
case nsRedlineType_t::REDLINE_INSERT:
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index 39388ed403fc..1479a5d1dc16 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -53,9 +53,9 @@ using namespace ::com::sun::star;
using namespace sw::types;
using namespace sw::util;
-USHORT MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, BYTE nLevel, USHORT nVal )
+sal_uInt16 MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, sal_uInt8 nLevel, sal_uInt16 nVal )
{
- USHORT nNumId = USHRT_MAX;
+ sal_uInt16 nNumId = USHRT_MAX;
String sPrefix( CREATE_CONST_ASC( "WW8TempExport" ) );
sPrefix += String::CreateFromInt32( nUniqueList++ );
SwNumRule* pMyNumRule =
@@ -63,7 +63,7 @@ USHORT MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, BYTE nLevel,
SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
pUsedNumTbl->Insert( pMyNumRule, pUsedNumTbl->Count() );
- for ( USHORT i = 0; i < MAXLEVEL; i++ )
+ for ( sal_uInt16 i = 0; i < MAXLEVEL; i++ )
{
const SwNumFmt& rSubRule = pRule->Get(i);
pMyNumRule->Set( i, rSubRule );
@@ -81,7 +81,7 @@ USHORT MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, BYTE nLevel,
return nNumId;
}
-USHORT MSWordExportBase::GetId( const SwNumRule& rNumRule )
+sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule )
{
if ( !pUsedNumTbl )
{
@@ -90,7 +90,7 @@ USHORT MSWordExportBase::GetId( const SwNumRule& rNumRule )
// Check, if the outline rule is already inserted into <pUsedNumTbl>.
// If yes, do not insert it again.
bool bOutlineRuleAdded( false );
- for ( USHORT n = pUsedNumTbl->Count(); n; )
+ for ( sal_uInt16 n = pUsedNumTbl->Count(); n; )
{
const SwNumRule& rRule = *pUsedNumTbl->GetObject( --n );
if ( !pDoc->IsUsed( rRule ) )
@@ -112,11 +112,11 @@ USHORT MSWordExportBase::GetId( const SwNumRule& rNumRule )
// <--
}
SwNumRule* p = (SwNumRule*)&rNumRule;
- USHORT nRet = pUsedNumTbl->GetPos(p);
+ sal_uInt16 nRet = pUsedNumTbl->GetPos(p);
//Is this list now duplicated into a new list which we should use
// #i77812# - perform 'deep' search in duplication map
- ::std::map<USHORT,USHORT>::const_iterator aResult = aRuleDuplicates.end();
+ ::std::map<sal_uInt16,sal_uInt16>::const_iterator aResult = aRuleDuplicates.end();
do {
aResult = aRuleDuplicates.find(nRet);
if ( aResult != aRuleDuplicates.end() )
@@ -166,7 +166,7 @@ void WW8Export::WriteNumbering()
OutListNamesTab();
}
-void WW8AttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &rRule )
+void WW8AttributeOutput::NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule )
{
SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, nId );
SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, nId );
@@ -175,7 +175,7 @@ void WW8AttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &rRule
for ( int i = 0; i < WW8ListManager::nMaxLevel; ++i )
SwWW8Writer::WriteShort( *m_rWW8Export.pTableStrm, 0xFFF );
- BYTE nFlags = 0, nDummy = 0;
+ sal_uInt8 nFlags = 0, nDummy = 0;
if ( rRule.IsContinusNum() )
nFlags |= 0x1;
@@ -187,10 +187,10 @@ void MSWordExportBase::NumberingDefinitions()
if ( !pUsedNumTbl )
return; // no numbering is used
- USHORT nCount = pUsedNumTbl->Count();
+ sal_uInt16 nCount = pUsedNumTbl->Count();
// Write static data of SwNumRule - LSTF
- for ( USHORT n = 0; n < nCount; ++n )
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
{
const SwNumRule& rRule = *pUsedNumTbl->GetObject( n );
@@ -198,12 +198,12 @@ void MSWordExportBase::NumberingDefinitions()
}
}
-void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/,
- USHORT nStart,
- USHORT nNumberingType,
+void WW8AttributeOutput::NumberingLevel( sal_uInt8 /*nLevel*/,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE *pNumLvlPos,
- BYTE nFollow,
+ const sal_uInt8 *pNumLvlPos,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -219,7 +219,7 @@ void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/,
*m_rWW8Export.pTableStrm << WW8Export::GetNumId( nNumberingType );
// Justification
- BYTE nAlign;
+ sal_uInt8 nAlign;
switch ( eAdjust )
{
case SVX_ADJUST_CENTER: nAlign = 1; break;
@@ -246,7 +246,7 @@ void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/,
m_rWW8Export.pO = &aCharAtrs;
if ( pFont )
{
- USHORT nFontID = m_rWW8Export.maFontHelper.GetId( *pFont );
+ sal_uInt16 nFontID = m_rWW8Export.maFontHelper.GetId( *pFont );
if ( m_rWW8Export.bWrtWW8 )
{
@@ -263,21 +263,21 @@ void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/,
m_rWW8Export.pO = pOldpO;
}
- *m_rWW8Export.pTableStrm << BYTE( aCharAtrs.Count() );
+ *m_rWW8Export.pTableStrm << sal_uInt8( aCharAtrs.Count() );
// cbGrpprlPapx
- BYTE aPapSprms [] = {
+ sal_uInt8 aPapSprms [] = {
0x5e, 0x84, 0, 0, // sprmPDxaLeft
0x60, 0x84, 0, 0, // sprmPDxaLeft1
0x15, 0xc6, 0x05, 0x00, 0x01, 0, 0, 0x06
};
- *m_rWW8Export.pTableStrm << BYTE( sizeof( aPapSprms ) );
+ *m_rWW8Export.pTableStrm << sal_uInt8( sizeof( aPapSprms ) );
// reserved
SwWW8Writer::WriteShort( *m_rWW8Export.pTableStrm, 0 );
// pap sprms
- BYTE* pData = aPapSprms + 2;
+ sal_uInt8* pData = aPapSprms + 2;
Set_UInt16( pData, nIndentAt );
pData += 2;
Set_UInt16( pData, nFirstLineIndex );
@@ -297,8 +297,8 @@ void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/,
void MSWordExportBase::AbstractNumberingDefinitions()
{
- USHORT nCount = pUsedNumTbl->Count();
- USHORT n;
+ sal_uInt16 nCount = pUsedNumTbl->Count();
+ sal_uInt16 n;
// prepare the NodeNum to generate the NumString
SwNumberTree::tNumberVector aNumVector;
@@ -311,17 +311,17 @@ void MSWordExportBase::AbstractNumberingDefinitions()
AttrOutput().StartAbstractNumbering( n + 1 );
const SwNumRule& rRule = *pUsedNumTbl->GetObject( n );
- BYTE nLvl;
- BYTE nLevels = static_cast< BYTE >(rRule.IsContinusNum() ?
+ sal_uInt8 nLvl;
+ sal_uInt8 nLevels = static_cast< sal_uInt8 >(rRule.IsContinusNum() ?
WW8ListManager::nMinLevel : WW8ListManager::nMaxLevel);
for( nLvl = 0; nLvl < nLevels; ++nLvl )
{
// write the static data of the SwNumFmt of this level
- BYTE aNumLvlPos[WW8ListManager::nMaxLevel] = { 0,0,0,0,0,0,0,0,0 };
+ sal_uInt8 aNumLvlPos[WW8ListManager::nMaxLevel] = { 0,0,0,0,0,0,0,0,0 };
const SwNumFmt& rFmt = rRule.Get( nLvl );
- BYTE nFollow = 0;
+ sal_uInt8 nFollow = 0;
// #i86652#
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
@@ -399,20 +399,20 @@ void MSWordExportBase::AbstractNumberingDefinitions()
{
if (SVX_NUM_NUMBER_NONE != rFmt.GetNumberingType())
{
- BYTE* pLvlPos = aNumLvlPos;
+ sal_uInt8* pLvlPos = aNumLvlPos;
// the numbering string has to be restrict
// to the level currently working on.
sNumStr = rRule.MakeNumString(aNumVector, false, true, nLvl);
// <--
// now search the nums in the string
- for( BYTE i = 0; i <= nLvl; ++i )
+ for( sal_uInt8 i = 0; i <= nLvl; ++i )
{
String sSrch( String::CreateFromInt32( i ));
xub_StrLen nFnd = sNumStr.Search( sSrch );
if( STRING_NOTFOUND != nFnd )
{
- *pLvlPos = (BYTE)(nFnd + rFmt.GetPrefix().Len() + 1 );
+ *pLvlPos = (sal_uInt8)(nFnd + rFmt.GetPrefix().Len() + 1 );
++pLvlPos;
sNumStr.SetChar( nFnd, (char)i );
}
@@ -504,8 +504,8 @@ void WW8Export::OutOverrideListTab()
return ; // no numbering is used
// write the "list format override" - LFO
- USHORT nCount = pUsedNumTbl->Count();
- USHORT n;
+ sal_uInt16 nCount = pUsedNumTbl->Count();
+ sal_uInt16 n;
pFib->fcPlfLfo = pTableStrm->Tell();
SwWW8Writer::WriteLong( *pTableStrm, nCount );
@@ -528,7 +528,7 @@ void WW8Export::OutListNamesTab()
return ; // no numbering is used
// write the "list format override" - LFO
- USHORT nNms = 0, nCount = pUsedNumTbl->Count();
+ sal_uInt16 nNms = 0, nCount = pUsedNumTbl->Count();
pFib->fcSttbListNames = pTableStrm->Tell();
SwWW8Writer::WriteShort( *pTableStrm, -1 );
@@ -560,52 +560,52 @@ void WW8Export::OutputOlst( const SwNumRule& rRule )
if ( bWrtWW8 )
return;
- static BYTE const aAnlvBase[] = { // Defaults
+ static sal_uInt8 aAnlvBase[] = { // Defaults
1,0,0, // Upper Roman
0x0C, // Hanging Indent, fPrev
0,0,1,0x80,0,0,1,0,0x1b,1,0,0 };
- static BYTE const aSprmOlstHdr[] = { 133, 212 };
+ static sal_uInt8 aSprmOlstHdr[] = { 133, 212 };
pO->Insert( aSprmOlstHdr, sizeof( aSprmOlstHdr ), pO->Count() );
WW8_OLST aOlst;
memset( &aOlst, 0, sizeof(aOlst) );
- BYTE* pC = aOlst.rgch;
- BYTE* pChars = (BYTE*)pC;
- USHORT nCharLen = 64;
+ sal_uInt8* pC = aOlst.rgch;
+ sal_uInt8* pChars = (sal_uInt8*)pC;
+ sal_uInt16 nCharLen = 64;
- for (USHORT j = 0; j < WW8ListManager::nMaxLevel; j++ ) // 9 variable ANLVs
+ for (sal_uInt16 j = 0; j < WW8ListManager::nMaxLevel; j++ ) // 9 variable ANLVs
{
memcpy( &aOlst.rganlv[j], aAnlvBase, sizeof( WW8_ANLV ) ); // Defaults
const SwNumFmt* pFmt = rRule.GetNumFmt( j );
if( pFmt )
BuildAnlvBase( aOlst.rganlv[j], pChars, nCharLen, rRule,
- *pFmt, (BYTE)j );
+ *pFmt, (sal_uInt8)j );
}
- pO->Insert( (BYTE*)&aOlst, sizeof( aOlst ), pO->Count() );
+ pO->Insert( (sal_uInt8*)&aOlst, sizeof( aOlst ), pO->Count() );
}
-void WW8Export::Out_WwNumLvl( BYTE nWwLevel )
+void WW8Export::Out_WwNumLvl( sal_uInt8 nWwLevel )
{
pO->Insert( 13, pO->Count() );
pO->Insert( nWwLevel, pO->Count() );
}
-void WW8Export::Out_SwNumLvl( BYTE nSwLevel )
+void WW8Export::Out_SwNumLvl( sal_uInt8 nSwLevel )
{
OSL_ENSURE( nSwLevel < MAXLEVEL, "numbered?");
Out_WwNumLvl( nSwLevel + 1 );
}
-void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
- USHORT& rCharLen, const SwNumFmt& rFmt)
+void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
+ sal_uInt16& rCharLen, const SwNumFmt& rFmt)
{
ByteToSVBT8(11, rAnlv.nfc);
- BYTE nb = 0; // Zahlentyp
+ sal_uInt8 nb = 0; // Zahlentyp
switch (rFmt.GetNumAdjust())
{
case SVX_ADJUST_RIGHT:
@@ -641,7 +641,7 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
rtl_TextEncoding eChrSet = rFont.GetCharSet();
String sFontName = rFont.GetName();
- USHORT nFontId;
+ sal_uInt16 nFontId;
if (sw::util::IsStarSymbol(sFontName))
{
/*
@@ -670,7 +670,7 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
if ( (eChrSet == RTL_TEXTENCODING_SYMBOL) && (cChar >= 0xF000) && (
cChar <= 0xF0FF) )
{
- *rpCh = static_cast< BYTE >(cChar - 0xF000);
+ *rpCh = static_cast< sal_uInt8 >(cChar - 0xF000);
}
else
*rpCh = ByteString::ConvertFromUnicode(cChar, eChrSet);
@@ -702,6 +702,9 @@ void MSWordExportBase::SubstituteBullet( String& rNumStr,
if (!bSubstituteBullets)
return;
+ if (!bSubstituteBullets)
+ return;
+
if (!pConvert)
{
pConvert = CreateStarSymbolToMSMultiFont();
@@ -740,17 +743,17 @@ void MSWordExportBase::SubstituteBullet( String& rNumStr,
delete pConvert;
}
-static void SwWw8_InsertAnlText( const String& rStr, BYTE*& rpCh,
- USHORT& rCharLen, SVBT8& r8Len )
+static void SwWw8_InsertAnlText( const String& rStr, sal_uInt8*& rpCh,
+ sal_uInt16& rCharLen, SVBT8& r8Len )
{
- BYTE nb = 0;
+ sal_uInt8 nb = 0;
WW8Bytes aO;
SwWW8Writer::InsAsString8( aO, rStr, RTL_TEXTENCODING_MS_1252 );
- USHORT nCnt = aO.Count();
+ sal_uInt16 nCnt = aO.Count();
if( nCnt && nCnt < rCharLen )
{
- nb = (BYTE)nCnt;
+ nb = (sal_uInt8)nCnt;
memcpy( rpCh, aO.GetData(), nCnt );
rpCh += nCnt;
rCharLen = rCharLen - nCnt;
@@ -758,13 +761,13 @@ static void SwWw8_InsertAnlText( const String& rStr, BYTE*& rpCh,
ByteToSVBT8( nb, r8Len );
}
-void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
- USHORT& rCharLen, const SwNumRule& rRul, const SwNumFmt& rFmt,
- BYTE nSwLevel)
+void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
+ sal_uInt16& rCharLen, const SwNumRule& rRul, const SwNumFmt& rFmt,
+ sal_uInt8 nSwLevel)
{
ByteToSVBT8(WW8Export::GetNumId(rFmt.GetNumberingType()), rAnlv.nfc);
- BYTE nb = 0;
+ sal_uInt8 nb = 0;
switch (rFmt.GetNumAdjust())
{
case SVX_ADJUST_RIGHT:
@@ -796,7 +799,7 @@ void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
&& (nSwLevel<= WW8ListManager::nMaxLevel )
&& (rFmt.GetNumberingType() != SVX_NUM_NUMBER_NONE ) ) // UEberhaupt Nummerierung ?
{ // -> suche, ob noch Zahlen davor
- BYTE nUpper = rFmt.GetIncludeUpperLevels();
+ sal_uInt8 nUpper = rFmt.GetIncludeUpperLevels();
if( (nUpper <= WW8ListManager::nMaxLevel) &&
(rRul.Get(nUpper).GetNumberingType() != SVX_NUM_NUMBER_NONE ) ) // Nummerierung drueber ?
{
@@ -831,21 +834,21 @@ void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
}
void WW8Export::Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt,
- BYTE nSwLevel )
+ sal_uInt8 nSwLevel )
{
- static BYTE const aSprmAnldDefault[54] = {
+ static sal_uInt8 aSprmAnldDefault[54] = {
12, 52,
1,0,0,0x0c,0,0,1,0x80,0,0,1,0,0x1b,1,0,0,0x2e,
0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
- BYTE aSprmAnld[54];
+ sal_uInt8 aSprmAnld[54];
memcpy( aSprmAnld, aSprmAnldDefault, sizeof( aSprmAnld ) );
WW8_ANLD* pA = (WW8_ANLD*)(aSprmAnld + 2); // handlicher Pointer
- BYTE* pChars = (BYTE*)(pA->rgchAnld);
- USHORT nCharLen = 31;
+ sal_uInt8* pChars = (sal_uInt8*)(pA->rgchAnld);
+ sal_uInt16 nCharLen = 31;
if( nSwLevel == 11 )
BuildAnlvBulletBase( pA->eAnlv, pChars, nCharLen, rFmt );
@@ -853,7 +856,7 @@ void WW8Export::Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt,
BuildAnlvBase( pA->eAnlv, pChars, nCharLen, rRul, rFmt, nSwLevel );
// ... und raus damit
- OutSprmBytes( (BYTE*)&aSprmAnld, sizeof( aSprmAnld ) );
+ OutSprmBytes( (sal_uInt8*)&aSprmAnld, sizeof( aSprmAnld ) );
}
@@ -864,12 +867,12 @@ bool WW8Export::Out_SwNum(const SwTxtNode* pNd)
if (nLevel < 0 || nLevel >= MAXLEVEL)
{
- OSL_ENSURE(FALSE, "Invalid level");
+ OSL_ENSURE(sal_False, "Invalid level");
return false;
}
- BYTE nSwLevel = static_cast< BYTE >(nLevel);
+ sal_uInt8 nSwLevel = static_cast< sal_uInt8 >(nLevel);
const SwNumRule* pRul = pNd->GetNumRule();
if( !pRul || nSwLevel == WW8ListManager::nMaxLevel)
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index b6822d915e52..83cece4881dc 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -101,15 +101,15 @@ class WW8_WrPlc0
{
private:
SvULongs aPos; // PTRARR von CPs / FCs
- ULONG nOfs;
+ sal_uLong nOfs;
//No copying
WW8_WrPlc0(const WW8_WrPlc0&);
WW8_WrPlc0 &operator=(const WW8_WrPlc0&);
public:
- WW8_WrPlc0( ULONG nOffset );
- USHORT Count() const { return aPos.Count(); }
- void Append( ULONG nStartCpOrFc );
+ WW8_WrPlc0( sal_uLong nOffset );
+ sal_uInt16 Count() const { return aPos.Count(); }
+ void Append( sal_uLong nStartCpOrFc );
void Write( SvStream& rStrm );
};
@@ -121,17 +121,17 @@ public:
// GetId( SwCharFmt ) zur Benutzung im Text -> nil verboten,
// "Default Char Style" stattdessen
-USHORT MSWordExportBase::GetId( const SwCharFmt& rFmt ) const
+sal_uInt16 MSWordExportBase::GetId( const SwCharFmt& rFmt ) const
{
- USHORT nRet = pStyles->GetSlot( rFmt );
+ sal_uInt16 nRet = pStyles->GetSlot( rFmt );
return ( nRet != 0x0fff ) ? nRet : 10; // Default Char Style
}
// GetId( SwTxtFmtColl ) zur Benutzung an TextNodes -> nil verboten,
// "Standard" stattdessen
-USHORT MSWordExportBase::GetId( const SwTxtFmtColl& rColl ) const
+sal_uInt16 MSWordExportBase::GetId( const SwTxtFmtColl& rColl ) const
{
- USHORT nRet = pStyles->GetSlot( rColl );
+ sal_uInt16 nRet = pStyles->GetSlot( rColl );
return ( nRet != 0xfff ) ? nRet : 0; // Default TxtFmtColl
}
@@ -150,7 +150,7 @@ MSWordStyles::MSWordStyles( MSWordExportBase& rExport )
m_rExport.pDoc->GetFtnInfo().GetAnchorCharFmt( *m_rExport.pDoc );
m_rExport.pDoc->GetFtnInfo().GetCharFmt( *m_rExport.pDoc );
}
- USHORT nAlloc = WW8_RESERVED_SLOTS + m_rExport.pDoc->GetCharFmts()->Count() - 1 +
+ sal_uInt16 nAlloc = WW8_RESERVED_SLOTS + m_rExport.pDoc->GetCharFmts()->Count() - 1 +
m_rExport.pDoc->GetTxtFmtColls()->Count() - 1;
// etwas grosszuegig ( bis zu 15 frei )
@@ -166,18 +166,18 @@ MSWordStyles::~MSWordStyles()
}
// Sty_SetWWSlot() fuer Abhaengigkeiten der Styles -> nil ist erlaubt
-USHORT MSWordStyles::GetSlot( const SwFmt& rFmt ) const
+sal_uInt16 MSWordStyles::GetSlot( const SwFmt& rFmt ) const
{
- USHORT n;
+ sal_uInt16 n;
for ( n = 0; n < nUsedSlots; n++ )
if ( pFmtA[n] == &rFmt )
return n;
return 0xfff; // 0xfff: WW: nil
}
-USHORT MSWordStyles::BuildGetSlot( const SwFmt& rFmt )
+sal_uInt16 MSWordStyles::BuildGetSlot( const SwFmt& rFmt )
{
- USHORT nRet;
+ sal_uInt16 nRet;
switch ( nRet = rFmt.GetPoolFmtId() )
{
case RES_POOLCOLL_STANDARD:
@@ -203,24 +203,24 @@ USHORT MSWordStyles::BuildGetSlot( const SwFmt& rFmt )
return nRet;
}
-USHORT MSWordStyles::GetWWId( const SwFmt& rFmt ) const
+sal_uInt16 MSWordStyles::GetWWId( const SwFmt& rFmt ) const
{
- USHORT nRet = ww::stiUser; // User-Style als default
- USHORT nPoolId = rFmt.GetPoolFmtId();
+ sal_uInt16 nRet = ww::stiUser; // User-Style als default
+ sal_uInt16 nPoolId = rFmt.GetPoolFmtId();
if( nPoolId == RES_POOLCOLL_STANDARD )
nRet = 0;
else if( nPoolId >= RES_POOLCOLL_HEADLINE1 &&
nPoolId <= RES_POOLCOLL_HEADLINE9 )
- nRet = static_cast< USHORT >(nPoolId + 1 - RES_POOLCOLL_HEADLINE1);
+ nRet = static_cast< sal_uInt16 >(nPoolId + 1 - RES_POOLCOLL_HEADLINE1);
else if( nPoolId >= RES_POOLCOLL_TOX_IDX1 &&
nPoolId <= RES_POOLCOLL_TOX_IDX3 )
- nRet = static_cast< USHORT >(nPoolId + 10 - RES_POOLCOLL_TOX_IDX1);
+ nRet = static_cast< sal_uInt16 >(nPoolId + 10 - RES_POOLCOLL_TOX_IDX1);
else if( nPoolId >= RES_POOLCOLL_TOX_CNTNT1 &&
nPoolId <= RES_POOLCOLL_TOX_CNTNT5 )
- nRet = static_cast< USHORT >(nPoolId + 19 - RES_POOLCOLL_TOX_CNTNT1);
+ nRet = static_cast< sal_uInt16 >(nPoolId + 19 - RES_POOLCOLL_TOX_CNTNT1);
else if( nPoolId >= RES_POOLCOLL_TOX_CNTNT6 &&
nPoolId <= RES_POOLCOLL_TOX_CNTNT9 )
- nRet = static_cast< USHORT >(nPoolId + 24 - RES_POOLCOLL_TOX_CNTNT6);
+ nRet = static_cast< sal_uInt16 >(nPoolId + 24 - RES_POOLCOLL_TOX_CNTNT6);
else
switch( nPoolId )
{
@@ -277,7 +277,7 @@ void MSWordStyles::BuildStylesTable()
nUsedSlots = WW8_RESERVED_SLOTS; // soviele sind reserviert fuer
// Standard und HeadingX u.a.
SwFmt* pFmt;
- USHORT n;
+ sal_uInt16 n;
const SvPtrarr& rArr = *m_rExport.pDoc->GetCharFmts(); // erst CharFmt
// das Default-ZeichenStyle ( 0 ) wird nicht mit ausgegeben !
for( n = 1; n < rArr.Count(); n++ )
@@ -299,7 +299,7 @@ void MSWordStyles::BuildStylesTable()
static void impl_SkipOdd( WW8Bytes* pO, sal_Size nTableStrmTell )
{
if ( ( nTableStrmTell + pO->Count() ) & 1 ) // Start auf gerader
- pO->Insert( (BYTE)0, pO->Count() ); // Adresse
+ pO->Insert( (sal_uInt8)0, pO->Count() ); // Adresse
}
void WW8AttributeOutput::EndStyle()
@@ -307,23 +307,23 @@ void WW8AttributeOutput::EndStyle()
impl_SkipOdd( m_rWW8Export.pO, m_rWW8Export.pTableStrm->Tell() );
short nLen = m_rWW8Export.pO->Count() - 2; // Laenge des Styles
- BYTE* p = (BYTE*)m_rWW8Export.pO->GetData() + nPOPosStdLen1;
+ sal_uInt8* p = (sal_uInt8*)m_rWW8Export.pO->GetData() + nPOPosStdLen1;
ShortToSVBT16( nLen, p ); // nachtragen
- p = (BYTE*)m_rWW8Export.pO->GetData() + nPOPosStdLen2;
+ p = (sal_uInt8*)m_rWW8Export.pO->GetData() + nPOPosStdLen2;
ShortToSVBT16( nLen, p ); // dito
m_rWW8Export.pTableStrm->Write( m_rWW8Export.pO->GetData(), m_rWW8Export.pO->Count() ); // ins File damit
m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren fuer naechsten
}
-void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT nWwBase,
- USHORT nWwNext, USHORT nWwId, USHORT /*nId*/, bool bAutoUpdate )
+void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, sal_uInt16 nWwBase,
+ sal_uInt16 nWwNext, sal_uInt16 nWwId, sal_uInt16 /*nId*/, bool bAutoUpdate )
{
- BYTE aWW8_STD[ sizeof( WW8_STD ) ];
- BYTE* pData = aWW8_STD;
+ sal_uInt8 aWW8_STD[ sizeof( WW8_STD ) ];
+ sal_uInt8* pData = aWW8_STD;
memset( &aWW8_STD, 0, sizeof( WW8_STD ) );
- UINT16 nBit16 = 0x1000; // fInvalHeight
+ sal_uInt16 nBit16 = 0x1000; // fInvalHeight
nBit16 |= (ww::stiNil & nWwId);
Set_UInt16( pData, nBit16 );
@@ -335,7 +335,7 @@ void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT n
nBit16 |= bPapFmt ? 2 : 1; // cupx
Set_UInt16( pData, nBit16 );
- pData += sizeof( UINT16 ); // bchUpe
+ pData += sizeof( sal_uInt16 ); // bchUpe
if( m_rWW8Export.bWrtWW8 )
{
@@ -343,19 +343,19 @@ void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT n
Set_UInt16( pData, nBit16 );
//-------- jetzt neu:
// ab Ver8 gibts zwei Felder mehr:
- //UINT16 fHidden : 1; /* hidden from UI? */
- //UINT16 : 14; /* unused bits */
+ //sal_uInt16 fHidden : 1; /* hidden from UI? */
+ //sal_uInt16 : 14; /* unused bits */
}
- UINT16 nLen = static_cast< UINT16 >( ( pData - aWW8_STD ) + 1 +
+ sal_uInt16 nLen = static_cast< sal_uInt16 >( ( pData - aWW8_STD ) + 1 +
((m_rWW8Export.bWrtWW8 ? 2 : 1 ) * (rName.Len() + 1)) ); // vorlaeufig
WW8Bytes* pO = m_rWW8Export.pO;
nPOPosStdLen1 = pO->Count(); // Adr1 zum nachtragen der Laenge
SwWW8Writer::InsUInt16( *pO, nLen );
- pO->Insert( aWW8_STD, static_cast< USHORT >( pData - aWW8_STD ), pO->Count() );
+ pO->Insert( aWW8_STD, static_cast< sal_uInt16 >( pData - aWW8_STD ), pO->Count() );
nPOPosStdLen2 = nPOPosStdLen1 + 8; // Adr2 zum nachtragen von "end of upx"
@@ -367,18 +367,18 @@ void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT n
}
else
{
- pO->Insert( (BYTE)rName.Len(), pO->Count() ); // Laenge
+ pO->Insert( (sal_uInt8)rName.Len(), pO->Count() ); // Laenge
SwWW8Writer::InsAsString8( *pO, rName, RTL_TEXTENCODING_MS_1252 );
}
- pO->Insert( (BYTE)0, pO->Count() ); // Trotz P-String 0 am Ende!
+ pO->Insert( (sal_uInt8)0, pO->Count() ); // Trotz P-String 0 am Ende!
}
void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap )
{
const SwModify* pOldMod = m_rExport.pOutFmtNode;
m_rExport.pOutFmtNode = &rFmt;
- bool aFlags[ static_cast< USHORT >(RES_FRMATR_END) - RES_CHRATR_BEGIN ];
- USHORT nStt, nEnd, n;
+ bool aFlags[ static_cast< sal_uInt16 >(RES_FRMATR_END) - RES_CHRATR_BEGIN ];
+ sal_uInt16 nStt, nEnd, n;
if( bPap )
nStt = RES_PARATR_BEGIN, nEnd = RES_FRMATR_END;
else
@@ -392,8 +392,8 @@ void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap )
// static defaults, that differs between WinWord and SO
if( bPap )
{
- aFlags[ static_cast< USHORT >(RES_PARATR_WIDOWS) - RES_CHRATR_BEGIN ] = 1;
- aFlags[ static_cast< USHORT >(RES_PARATR_HYPHENZONE) - RES_CHRATR_BEGIN ] = 1;
+ aFlags[ static_cast< sal_uInt16 >(RES_PARATR_WIDOWS) - RES_CHRATR_BEGIN ] = 1;
+ aFlags[ static_cast< sal_uInt16 >(RES_PARATR_HYPHENZONE) - RES_CHRATR_BEGIN ] = 1;
}
else
{
@@ -425,13 +425,13 @@ void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap )
m_rExport.pOutFmtNode = pOldMod;
}
-void WW8AttributeOutput::StartStyleProperties( bool bParProp, USHORT nStyle )
+void WW8AttributeOutput::StartStyleProperties( bool bParProp, sal_uInt16 nStyle )
{
WW8Bytes* pO = m_rWW8Export.pO;
impl_SkipOdd( pO, m_rWW8Export.pTableStrm->Tell() );
- UINT16 nLen = ( bParProp ) ? 2 : 0; // Default-Laenge
+ sal_uInt16 nLen = ( bParProp ) ? 2 : 0; // Default-Laenge
m_nStyleLenPos = pO->Count(); // Laenge zum Nachtragen
// Keinen Pointer merken, da sich bei
// _grow der Pointer aendert !
@@ -444,7 +444,7 @@ void WW8AttributeOutput::StartStyleProperties( bool bParProp, USHORT nStyle )
SwWW8Writer::InsUInt16( *pO, nStyle ); // Style-Nummer
}
-void MSWordStyles::WriteProperties( const SwFmt* pFmt, bool bParProp, USHORT nPos,
+void MSWordStyles::WriteProperties( const SwFmt* pFmt, bool bParProp, sal_uInt16 nPos,
bool bInsDefCharSiz )
{
m_rExport.AttrOutput().StartStyleProperties( bParProp, nPos );
@@ -468,12 +468,12 @@ void WW8AttributeOutput::EndStyleProperties( bool /*bParProp*/ )
{
WW8Bytes* pO = m_rWW8Export.pO;
- UINT16 nLen = pO->Count() - m_nStyleStartSize;
- BYTE* pUpxLen = (BYTE*)pO->GetData() + m_nStyleLenPos; // Laenge zum Nachtragen
+ sal_uInt16 nLen = pO->Count() - m_nStyleStartSize;
+ sal_uInt8* pUpxLen = (sal_uInt8*)pO->GetData() + m_nStyleLenPos; // Laenge zum Nachtragen
ShortToSVBT16( nLen, pUpxLen ); // Default-Laenge eintragen
}
-void MSWordStyles::GetStyleData( SwFmt* pFmt, bool& bFmtColl, USHORT& nBase, USHORT& nNext )
+void MSWordStyles::GetStyleData( SwFmt* pFmt, bool& bFmtColl, sal_uInt16& nBase, sal_uInt16& nNext )
{
bFmtColl = pFmt->Which() == RES_TXTFMTCOLL || pFmt->Which() == RES_CONDTXTFMTCOLL;
@@ -493,13 +493,13 @@ void MSWordStyles::GetStyleData( SwFmt* pFmt, bool& bFmtColl, USHORT& nBase, USH
nNext = GetSlot( *pNext );
}
-void WW8AttributeOutput::DefaultStyle( USHORT nStyle )
+void WW8AttributeOutput::DefaultStyle( sal_uInt16 nStyle )
{
if ( nStyle == 10 ) // Default Char-Style ( nur WW )
{
if ( m_rWW8Export.bWrtWW8 )
{
- static BYTE const aDefCharSty[] = {
+ static sal_uInt8 aDefCharSty[] = {
0x42, 0x00,
0x41, 0x40, 0xF2, 0xFF, 0xA1, 0x00, 0x42, 0x00,
0x00, 0x00, 0x19, 0x00, 0x41, 0x00, 0x62, 0x00,
@@ -514,7 +514,7 @@ void WW8AttributeOutput::DefaultStyle( USHORT nStyle )
}
else
{
- static BYTE const aDefCharSty[] = {
+ static sal_uInt8 aDefCharSty[] = {
0x26, 0x00,
0x41, 0x40, 0xF2, 0xFF, 0xA1, 0x00, 0x26, 0x00,
0x19, 0x41, 0x62, 0x73, 0x61, 0x74, 0x7A, 0x2D,
@@ -526,20 +526,20 @@ void WW8AttributeOutput::DefaultStyle( USHORT nStyle )
}
else
{
- UINT16 n = 0;
+ sal_uInt16 n = 0;
m_rWW8Export.pTableStrm->Write( &n , 2 ); // leerer Style
}
}
// OutputStyle geht fuer TxtFmtColls und CharFmts
-void MSWordStyles::OutputStyle( SwFmt* pFmt, USHORT nPos )
+void MSWordStyles::OutputStyle( SwFmt* pFmt, sal_uInt16 nPos )
{
if ( !pFmt )
m_rExport.AttrOutput().DefaultStyle( nPos );
else
{
bool bFmtColl;
- USHORT nBase, nWwNext;
+ sal_uInt16 nBase, nWwNext;
GetStyleData( pFmt, bFmtColl, nBase, nWwNext );
@@ -564,7 +564,7 @@ void WW8AttributeOutput::StartStyles()
{
WW8Fib& rFib = *m_rWW8Export.pFib;
- ULONG nCurPos = m_rWW8Export.pTableStrm->Tell();
+ sal_uLong nCurPos = m_rWW8Export.pTableStrm->Tell();
if ( nCurPos & 1 ) // Start auf gerader
{
*m_rWW8Export.pTableStrm << (char)0; // Adresse
@@ -575,7 +575,7 @@ void WW8AttributeOutput::StartStyles()
if ( m_rWW8Export.bWrtWW8 )
{
- static BYTE const aStShi[] = {
+ static sal_uInt8 aStShi[] = {
0x12, 0x00,
0x0F, 0x00, 0x0A, 0x00, 0x01, 0x00, 0x5B, 0x00,
0x0F, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -585,7 +585,7 @@ void WW8AttributeOutput::StartStyles()
}
else
{
- static BYTE const aStShi[] = {
+ static sal_uInt8 aStShi[] = {
0x0E, 0x00,
0x0F, 0x00, 0x08, 0x00, 0x01, 0x00, 0x4B, 0x00,
0x0F, 0x00, 0x00, 0x00, 0x00, 0x00 };
@@ -593,7 +593,7 @@ void WW8AttributeOutput::StartStyles()
}
}
-void WW8AttributeOutput::EndStyles( USHORT nNumberOfStyles )
+void WW8AttributeOutput::EndStyles( sal_uInt16 nNumberOfStyles )
{
WW8Fib& rFib = *m_rWW8Export.pFib;
@@ -607,7 +607,7 @@ void MSWordStyles::OutputStylesTable()
m_rExport.AttrOutput().StartStyles();
- USHORT n;
+ sal_uInt16 n;
for ( n = 0; n < nUsedSlots; n++ )
OutputStyle( pFmtA[n], n );
@@ -636,18 +636,18 @@ wwFont::wwFont(const String &rFamilyName, FontPitch ePitch, FontFamily eFamily,
if (bWrtWW8)
{
- maWW8_FFN[0] = (BYTE)( 6 - 1 + 0x22 + ( 2 * ( 1 + msFamilyNm.Len() ) ));
+ maWW8_FFN[0] = (sal_uInt8)( 6 - 1 + 0x22 + ( 2 * ( 1 + msFamilyNm.Len() ) ));
if (mbAlt)
- maWW8_FFN[0] = static_cast< BYTE >(maWW8_FFN[0] + 2 * ( 1 + msAltNm.Len()));
+ maWW8_FFN[0] = static_cast< sal_uInt8 >(maWW8_FFN[0] + 2 * ( 1 + msAltNm.Len()));
}
else
{
- maWW8_FFN[0] = (BYTE)( 6 - 1 + 1 + msFamilyNm.Len() );
+ maWW8_FFN[0] = (sal_uInt8)( 6 - 1 + 1 + msFamilyNm.Len() );
if (mbAlt)
- maWW8_FFN[0] = static_cast< BYTE >(maWW8_FFN[0] + 1 + msAltNm.Len());
+ maWW8_FFN[0] = static_cast< sal_uInt8 >(maWW8_FFN[0] + 1 + msAltNm.Len());
}
- BYTE aB = 0;
+ sal_uInt8 aB = 0;
switch(ePitch)
{
case PITCH_VARIABLE:
@@ -695,7 +695,7 @@ wwFont::wwFont(const String &rFamilyName, FontPitch ePitch, FontFamily eFamily,
rtl_getBestWindowsCharsetFromTextEncoding(eChrSet);
if (mbAlt)
- maWW8_FFN[5] = static_cast< BYTE >(msFamilyNm.Len() + 1);
+ maWW8_FFN[5] = static_cast< sal_uInt8 >(msFamilyNm.Len() + 1);
}
bool wwFont::Write(SvStream *pTableStrm) const
@@ -765,15 +765,15 @@ bool operator<(const wwFont &r1, const wwFont &r2)
}
-USHORT wwFontHelper::GetId(const wwFont &rFont)
+sal_uInt16 wwFontHelper::GetId(const wwFont &rFont)
{
- USHORT nRet;
- ::std::map<wwFont, USHORT>::const_iterator aIter = maFonts.find(rFont);
+ sal_uInt16 nRet;
+ ::std::map<wwFont, sal_uInt16>::const_iterator aIter = maFonts.find(rFont);
if (aIter != maFonts.end())
nRet = aIter->second;
else
{
- nRet = static_cast< USHORT >(maFonts.size());
+ nRet = static_cast< sal_uInt16 >(maFonts.size());
maFonts[rFont] = nRet;
}
return nRet;
@@ -807,28 +807,30 @@ void wwFontHelper::InitFontTable(bool bWrtWW8,const SwDoc& rDoc)
if (!bLoadAllFonts)
return;
- const USHORT aTypes[] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT, 0 };
- for (const USHORT* pId = aTypes; *pId; ++pId)
+ const sal_uInt16 aTypes[] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT, 0 };
+ for (const sal_uInt16* pId = aTypes; *pId; ++pId)
{
- USHORT nMaxItem = rPool.GetItemCount( *pId );
- for( USHORT nGet = 0; nGet < nMaxItem; ++nGet )
- if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem(
- *pId, nGet )) )
+ sal_uInt32 const nMaxItem = rPool.GetItemCount2( *pId );
+ for (sal_uInt32 nGet = 0; nGet < nMaxItem; ++nGet)
+ {
+ pFont = (const SvxFontItem*)rPool.GetItem2( *pId, nGet );
+ if (0 != pFont)
{
GetId(wwFont(pFont->GetFamilyName(), pFont->GetPitch(),
pFont->GetFamily(), pFont->GetCharSet(),bWrtWW8));
}
+ }
}
}
-USHORT wwFontHelper::GetId(const Font& rFont)
+sal_uInt16 wwFontHelper::GetId(const Font& rFont)
{
wwFont aFont(rFont.GetName(), rFont.GetPitch(), rFont.GetFamily(),
rFont.GetCharSet(), mbWrtWW8);
return GetId(aFont);
}
-USHORT wwFontHelper::GetId(const SvxFontItem& rFont)
+sal_uInt16 wwFontHelper::GetId(const SvxFontItem& rFont)
{
wwFont aFont(rFont.GetFamilyName(), rFont.GetPitch(), rFont.GetFamily(),
rFont.GetCharSet(), mbWrtWW8);
@@ -839,7 +841,7 @@ USHORT wwFontHelper::GetId(const SvxFontItem& rFont)
{
::std::vector<const wwFont *> aFontList( maFonts.size() );
- typedef ::std::map<wwFont, USHORT>::const_iterator myiter;
+ typedef ::std::map<wwFont, sal_uInt16>::const_iterator myiter;
myiter aEnd = maFonts.end();
for ( myiter aIter = maFonts.begin(); aIter != aEnd; ++aIter )
aFontList[aIter->second] = &aIter->first;
@@ -879,7 +881,7 @@ void wwFontHelper::WriteFontTable(SvStream *pTableStream, WW8Fib& rFib)
else
{
SwWW8Writer::WriteShort( *pTableStream, rFib.fcSttbfffn,
- (INT16)rFib.lcbSttbfffn );
+ (sal_Int16)rFib.lcbSttbfffn );
}
}
@@ -899,20 +901,21 @@ void wwFontHelper::WriteFontTable( const RtfAttributeOutput& rAttrOutput )
::std::bind2nd( ::std::mem_fun( &wwFont::WriteRtf ), &rAttrOutput ) );
}
-WW8_WrPlc0::WW8_WrPlc0( ULONG nOffset )
+
+WW8_WrPlc0::WW8_WrPlc0( sal_uLong nOffset )
: aPos( 4, 4 ), nOfs( nOffset )
{
}
-void WW8_WrPlc0::Append( ULONG nStartCpOrFc )
+void WW8_WrPlc0::Append( sal_uLong nStartCpOrFc )
{
aPos.Insert( nStartCpOrFc - nOfs, aPos.Count() );
}
void WW8_WrPlc0::Write( SvStream& rStrm )
{
- USHORT nLen = aPos.Count();
- for( USHORT i = 0; i < nLen; ++i )
+ sal_uInt16 nLen = aPos.Count();
+ for( sal_uInt16 i = 0; i < nLen; ++i )
{
SVBT32 nP;
UInt32ToSVBT32( aPos[i], nP );
@@ -938,7 +941,7 @@ MSWordSections::MSWordSections( MSWordExportBase& rExport )
const SwNode* pNd = rExport.pCurPam->GetCntntNode();
const SfxItemSet* pSet = pNd ? &((SwCntntNode*)pNd)->GetSwAttrSet() : 0;
- ULONG nRstLnNum = pSet ? ((SwFmtLineNumber&)pSet->Get( RES_LINENUMBER )).GetStartValue() : 0;
+ sal_uLong nRstLnNum = pSet ? ((SwFmtLineNumber&)pSet->Get( RES_LINENUMBER )).GetStartValue() : 0;
const SwTableNode* pTblNd = rExport.pCurPam->GetNode()->FindTableNode();
const SwSectionNode* pSectNd;
@@ -985,7 +988,7 @@ WW8_WrPlcSepx::WW8_WrPlcSepx( MSWordExportBase& rExport )
{
// to be in sync with the AppendSection() call in the MSWordSections
// constructor
- aCps.Insert( ULONG( 0 ), aCps.Count() );
+ aCps.Insert( sal_uLong( 0 ), aCps.Count() );
}
MSWordSections::~MSWordSections()
@@ -994,7 +997,7 @@ MSWordSections::~MSWordSections()
WW8_WrPlcSepx::~WW8_WrPlcSepx()
{
- USHORT nLen = aSects.Count();
+ sal_uInt16 nLen = aSects.Count();
if( pAttrs )
{
while( nLen )
@@ -1047,7 +1050,7 @@ const WW8_SepInfo* MSWordSections::CurrentSectionInfo()
}
void MSWordSections::AppendSection( const SwPageDesc* pPd,
- const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo )
+ const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo )
{
aSects.Insert( WW8_SepInfo( pPd, pSectionFmt, nLnNumRestartNo ),
aSects.Count() );
@@ -1055,7 +1058,7 @@ void MSWordSections::AppendSection( const SwPageDesc* pPd,
}
void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwPageDesc* pPd,
- const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo )
+ const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo )
{
if ( !bNoMoreSections )
{
@@ -1066,7 +1069,7 @@ void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwPageDesc* pPd,
}
void MSWordSections::AppendSection( const SwFmtPageDesc& rPD,
- const SwNode& rNd, const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo )
+ const SwNode& rNd, const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo )
{
WW8_SepInfo aI( rPD.GetPageDesc(), pSectionFmt, nLnNumRestartNo,
rPD.GetNumOffset(), &rNd );
@@ -1075,7 +1078,7 @@ void MSWordSections::AppendSection( const SwFmtPageDesc& rPD,
}
void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwFmtPageDesc& rPD,
- const SwNode& rNd, const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo )
+ const SwNode& rNd, const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo )
{
if ( !bNoMoreSections )
{
@@ -1096,14 +1099,14 @@ void MSWordSections::SetNum( const SwTxtNode* pNumNd )
rInfo.pNumNd = pNumNd;
}
-void WW8_WrPlcSepx::WriteFtnEndTxt( WW8Export& rWrt, ULONG nCpStt )
+void WW8_WrPlcSepx::WriteFtnEndTxt( WW8Export& rWrt, sal_uLong nCpStt )
{
- BYTE nInfoFlags = 0;
+ sal_uInt8 nInfoFlags = 0;
const SwFtnInfo& rInfo = rWrt.pDoc->GetFtnInfo();
if( rInfo.aErgoSum.Len() ) nInfoFlags |= 0x02;
if( rInfo.aQuoVadis.Len() ) nInfoFlags |= 0x04;
- BYTE nEmptyStt = rWrt.bWrtWW8 ? 0 : 6;
+ sal_uInt8 nEmptyStt = rWrt.bWrtWW8 ? 0 : 6;
if( nInfoFlags )
{
if( rWrt.bWrtWW8 )
@@ -1159,8 +1162,8 @@ void WW8_WrPlcSepx::WriteFtnEndTxt( WW8Export& rWrt, ULONG nCpStt )
rDop.epc = rWrt.bEndAtTxtEnd ? 3 : 0;
}
-void MSWordSections::SetHeaderFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
- BYTE nFlag )
+void MSWordSections::SetHeaderFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt,
+ sal_uInt8 nFlag )
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rFmt.GetItemState(RES_HEADER, true, &pItem)
@@ -1169,8 +1172,8 @@ void MSWordSections::SetHeaderFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
rHeadFootFlags |= nFlag;
}
-void MSWordSections::SetFooterFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
- BYTE nFlag )
+void MSWordSections::SetFooterFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt,
+ sal_uInt8 nFlag )
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rFmt.GetItemState(RES_FOOTER, true, &pItem)
@@ -1180,8 +1183,8 @@ void MSWordSections::SetFooterFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
}
void WW8_WrPlcSepx::OutHeaderFooter( WW8Export& rWrt, bool bHeader,
- const SwFmt& rFmt, ULONG& rCpPos, BYTE nHFFlags,
- BYTE nFlag, BYTE nBreakCode)
+ const SwFmt& rFmt, sal_uLong& rCpPos, sal_uInt8 nHFFlags,
+ sal_uInt8 nFlag, sal_uInt8 nBreakCode)
{
if ( nFlag & nHFFlags )
{
@@ -1231,7 +1234,7 @@ void MSWordSections::CheckForFacinPg( WW8Export& rWrt ) const
// 2 Werte werden gesetzt
// Dop.fFacingPages == Kopf-/Fusszeilen unterschiedlich
// Dop.fSwapBordersFacingPgs == gespiegelte Raender
- for( USHORT i = 0, nEnde = 0; i < aSects.Count(); ++i )
+ for( sal_uInt16 i = 0, nEnde = 0; i < aSects.Count(); ++i )
{
WW8_SepInfo& rSepInfo = aSects[i];
if( !rSepInfo.pSectionFmt )
@@ -1307,21 +1310,21 @@ void WW8AttributeOutput::SectionFormProtection( bool bProtected )
}
}
-void WW8AttributeOutput::SectionLineNumbering( ULONG nRestartNo, const SwLineNumberInfo& rLnNumInfo )
+void WW8AttributeOutput::SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo )
{
// sprmSNLnnMod - activate Line Numbering and define Modulo
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SNLnnMod );
else
m_rWW8Export.pO->Insert( 154, m_rWW8Export.pO->Count() );
- SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (UINT16)rLnNumInfo.GetCountBy() );
+ SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (sal_uInt16)rLnNumInfo.GetCountBy() );
// sprmSDxaLnn - xPosition of Line Number
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SDxaLnn );
else
m_rWW8Export.pO->Insert( 155, m_rWW8Export.pO->Count() );
- SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (UINT16)rLnNumInfo.GetPosFromLeft() );
+ SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (sal_uInt16)rLnNumInfo.GetPosFromLeft() );
// sprmSLnc - restart number: 0 per page, 1 per section, 2 never restart
if ( nRestartNo || !rLnNumInfo.IsRestartEachPage() )
@@ -1340,7 +1343,7 @@ void WW8AttributeOutput::SectionLineNumbering( ULONG nRestartNo, const SwLineNum
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SLnnMin );
else
m_rWW8Export.pO->Insert( 160, m_rWW8Export.pO->Count() );
- SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (UINT16)nRestartNo - 1 );
+ SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (sal_uInt16)nRestartNo - 1 );
}
}
@@ -1358,7 +1361,7 @@ void WW8AttributeOutput::SectionPageBorders( const SwFrmFmt* pPdFmt, const SwFrm
{
if ( m_rWW8Export.bWrtWW8 ) // Seitenumrandung schreiben
{
- USHORT nPgBorder = MSWordSections::HasBorderItem( *pPdFmt ) ? 0 : USHRT_MAX;
+ sal_uInt16 nPgBorder = MSWordSections::HasBorderItem( *pPdFmt ) ? 0 : USHRT_MAX;
if ( pPdFmt != pPdFirstPgFmt )
{
if ( MSWordSections::HasBorderItem( *pPdFirstPgFmt ) )
@@ -1394,10 +1397,10 @@ void WW8AttributeOutput::SectionBiDi( bool bBiDi )
}
}
-void WW8AttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber )
+void WW8AttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber )
{
// sprmSNfcPgn
- BYTE nb = WW8Export::GetNumId( nNumType );
+ sal_uInt8 nb = WW8Export::GetNumId( nNumType );
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SNfcPgn );
else
@@ -1422,7 +1425,7 @@ void WW8AttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRest
}
}
-void WW8AttributeOutput::SectionType( BYTE nBreakCode )
+void WW8AttributeOutput::SectionType( sal_uInt8 nBreakCode )
{
if ( 2 != nBreakCode ) // new page is the default
{
@@ -1434,11 +1437,11 @@ void WW8AttributeOutput::SectionType( BYTE nBreakCode )
}
}
-void WW8AttributeOutput::SectionWW6HeaderFooterFlags( BYTE nHeadFootFlags )
+void WW8AttributeOutput::SectionWW6HeaderFooterFlags( sal_uInt8 nHeadFootFlags )
{
if ( nHeadFootFlags && !m_rWW8Export.bWrtWW8 )
{
- BYTE nTmpFlags = nHeadFootFlags;
+ sal_uInt8 nTmpFlags = nHeadFootFlags;
if ( m_rWW8Export.pDop->fFacingPages )
{
if ( !(nTmpFlags & WW8_FOOTER_EVEN) && (nTmpFlags & WW8_FOOTER_ODD ) )
@@ -1462,7 +1465,7 @@ void WW8Export::SetupSectionPositions( WW8_PdAttrDesc* pA )
if ( pO->Count() )
{ // waren Attrs vorhanden ?
pA->nLen = pO->Count();
- pA->pData = new BYTE [pO->Count()];
+ pA->pData = new sal_uInt8 [pO->Count()];
memcpy( pA->pData, pO->GetData(), pO->Count() ); // -> merken
pO->Remove( 0, pO->Count() ); // leeren fuer HdFt-Text
}
@@ -1473,10 +1476,10 @@ void WW8Export::SetupSectionPositions( WW8_PdAttrDesc* pA )
}
}
-void WW8Export::WriteHeadersFooters( BYTE nHeadFootFlags,
- const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE nBreakCode )
+void WW8Export::WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
+ const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 nBreakCode )
{
- ULONG nCpPos = Fc2Cp( Strm().Tell() );
+ sal_uLong nCpPos = Fc2Cp( Strm().Tell() );
IncrementHdFtIndex();
if ( !(nHeadFootFlags & WW8_HEADER_EVEN) && pDop->fFacingPages )
@@ -1529,7 +1532,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
/* sprmSBkc, break code: 0 No break, 1 New column
2 New page, 3 Even page, 4 Odd page
*/
- BYTE nBreakCode = 2; // default neue Seite beginnen
+ sal_uInt8 nBreakCode = 2; // default neue Seite beginnen
bool bOutPgDscSet = true, bLeftRightPgChain = false;
const SwFrmFmt* pPdFmt = &pPd->GetMaster();
const SwFrmFmt* pPdFirstPgFmt = pPdFmt;
@@ -1687,7 +1690,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
}
// Header oder Footer
- BYTE nHeadFootFlags = 0;
+ sal_uInt8 nHeadFootFlags = 0;
const SwFrmFmt* pPdLeftFmt = bLeftRightPgChain
? &pPd->GetFollow()->GetMaster()
@@ -1747,7 +1750,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt )
{
pAttrs = new WW8_PdAttrDesc[ aSects.Count() ];
- ULONG nCpStart = rWrt.Fc2Cp( rWrt.Strm().Tell() );
+ sal_uLong nCpStart = rWrt.Fc2Cp( rWrt.Strm().Tell() );
OSL_ENSURE( !pTxtPos, "wer hat den Pointer gesetzt?" );
pTxtPos = new WW8_WrPlc0( nCpStart );
@@ -1757,7 +1760,7 @@ bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt )
unsigned int nOldIndex = rWrt.GetHdFtIndex();
rWrt.SetHdFtIndex( 0 );
- for ( USHORT i = 0; i < aSects.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aSects.Count(); ++i )
{
WW8_PdAttrDesc* pA = pAttrs + i;
pA->pData = 0;
@@ -1774,7 +1777,7 @@ bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt )
if ( pTxtPos->Count() )
{
// HdFt vorhanden ?
- ULONG nCpEnd = rWrt.Fc2Cp( rWrt.Strm().Tell() );
+ sal_uLong nCpEnd = rWrt.Fc2Cp( rWrt.Strm().Tell() );
pTxtPos->Append( nCpEnd ); // Ende letzter Hd/Ft fuer PlcfHdd
if ( nCpEnd > nCpStart )
@@ -1795,7 +1798,7 @@ bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt )
void WW8_WrPlcSepx::WriteSepx( SvStream& rStrm ) const
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < aSects.Count(); i++ ) // ueber alle Sections
{
WW8_PdAttrDesc* pA = pAttrs + i;
@@ -1813,13 +1816,13 @@ void WW8_WrPlcSepx::WriteSepx( SvStream& rStrm ) const
void WW8_WrPlcSepx::WritePlcSed( WW8Export& rWrt ) const
{
OSL_ENSURE( aCps.Count() == aSects.Count() + 1, "WrPlcSepx: DeSync" );
- ULONG nFcStart = rWrt.pTableStrm->Tell();
+ sal_uLong nFcStart = rWrt.pTableStrm->Tell();
- USHORT i;
+ sal_uInt16 i;
// ( ueber alle Sections )
for( i = 0; i <= aSects.Count(); i++ )
{
- UINT32 nP = aCps[i];
+ sal_uInt32 nP = aCps[i];
SVBT32 nPos;
UInt32ToSVBT32( nP, nPos );
rWrt.pTableStrm->Write( nPos, 4 );
@@ -1874,8 +1877,8 @@ void MSWordExportBase::WriteHeaderFooterText( const SwFmt& rFmt, bool bHeader )
{
SwNodeIndex aIdx( *pSttIdx, 1 ),
aEnd( *pSttIdx->GetNode().EndOfSectionNode() );
- ULONG nStart = aIdx.GetIndex();
- ULONG nEnd = aEnd.GetIndex();
+ sal_uLong nStart = aIdx.GetIndex();
+ sal_uLong nEnd = aEnd.GetIndex();
// Bereich also gueltiger Node
if ( nStart < nEnd )
@@ -1957,20 +1960,20 @@ bool WW8_WrPlcAnnotations::IsNewRedlineComment( const SwRedlineData *pRedline )
WW8_WrPlcAnnotations::~WW8_WrPlcAnnotations()
{
- for( USHORT n=0; n < aCntnt.Count(); n++ )
+ for( sal_uInt16 n=0; n < aCntnt.Count(); n++ )
delete (WW8_Annotation*)aCntnt[n];
}
-bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp,
+bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp,
WW8_CP& rCount )
{
- USHORT nLen = aCntnt.Count();
+ sal_uInt16 nLen = aCntnt.Count();
if ( !nLen )
return false;
- ULONG nCpStart = rWrt.Fc2Cp( rWrt.Strm().Tell() );
+ sal_uLong nCpStart = rWrt.Fc2Cp( rWrt.Strm().Tell() );
pTxtPos = new WW8_WrPlc0( nCpStart );
- USHORT i;
+ sal_uInt16 i;
switch ( nTTyp )
{
@@ -2006,7 +2009,7 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp,
const SdrObject& rObj = *(SdrObject*)aCntnt[ i ];
if (rObj.GetObjInventor() == FmFormInventor)
{
- BYTE nOldTyp = rWrt.nTxtTyp;
+ sal_uInt8 nOldTyp = rWrt.nTxtTyp;
rWrt.nTxtTyp = nTTyp;
rWrt.GetOCXExp().ExportControl(rWrt,&rObj);
rWrt.nTxtTyp = nOldTyp;
@@ -2087,13 +2090,13 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp,
return ( rCount != 0 );
}
-void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
+void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp,
WW8_FC& rTxtStart, sal_Int32& rTxtCount, WW8_FC& rRefStart, sal_Int32& rRefCount ) const
{
typedef ::std::vector<String>::iterator myiter;
- ULONG nFcStart = rWrt.pTableStrm->Tell();
- USHORT nLen = aCps.Count();
+ sal_uLong nFcStart = rWrt.pTableStrm->Tell();
+ sal_uInt16 nLen = aCps.Count();
if ( !nLen )
return;
@@ -2101,7 +2104,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
::std::vector<String> aStrArr;
WW8Fib& rFib = *rWrt.pFib; // n+1-te CP-Pos nach Handbuch
- USHORT i;
+ sal_uInt16 i;
bool bWriteCP = true;
switch ( nTTyp )
@@ -2135,7 +2138,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
for ( i = 0; i < aStrArr.size(); ++i )
{
const String& rStr = aStrArr[i];
- *rWrt.pTableStrm << (BYTE)rStr.Len();
+ *rWrt.pTableStrm << (sal_uInt8)rStr.Len();
SwWW8Writer::WriteString8(*rWrt.pTableStrm, rStr, false,
RTL_TEXTENCODING_MS_1252);
}
@@ -2181,7 +2184,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
// write textbox story - FTXBXS
// is it an writer or sdr - textbox?
const SdrObject* pObj = (SdrObject*)aCntnt[ i ];
- INT32 nCnt = 1;
+ sal_Int32 nCnt = 1;
if ( !pObj->ISA( SdrTextObj ) )
{
// find the "highest" SdrObject of this
@@ -2240,7 +2243,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
"Impossible");
sal_uInt16 nFndPos = static_cast< sal_uInt16 >(aIter - aStrArr.begin());
String sAuthor(*aIter);
- BYTE nNameLen = (BYTE)sAuthor.Len();
+ sal_uInt8 nNameLen = (sal_uInt8)sAuthor.Len();
if ( nNameLen > 9 )
{
sAuthor.Erase( 9 );
@@ -2274,7 +2277,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
}
else
{
- USHORT nNo = 0;
+ sal_uInt16 nNo = 0;
for ( i = 0; i < nLen; ++i ) // Schreibe Flags
{
const SwFmtFtn* pFtn = (SwFmtFtn*)aCntnt[ i ];
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 0619a8185166..9f63574adfd5 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -111,6 +111,8 @@
#include "dbgoutsw.hxx"
#include <sfx2/docfile.hxx>
+#include <sfx2/request.hxx>
+#include <sfx2/frame.hxx>
#include <svl/stritem.hxx>
#include <unotools/tempfile.hxx>
#include <filter/msfilter/mscodec.hxx>
@@ -127,42 +129,42 @@ using namespace sw::types;
*/
class WW8_WrFkp
{
- BYTE* pFkp; // gesamter Fkp ( zuerst nur FCs und Sprms )
- BYTE* pOfs; // Pointer auf Offset-Bereich, spaeter nach pFkp kopiert
+ sal_uInt8* pFkp; // gesamter Fkp ( zuerst nur FCs und Sprms )
+ sal_uInt8* pOfs; // Pointer auf Offset-Bereich, spaeter nach pFkp kopiert
ePLCFT ePlc;
short nStartGrp; // ab hier grpprls
short nOldStartGrp;
- BYTE nItemSize;
- BYTE nIMax; // Anzahl der Eintrags-Paare
- BYTE nOldVarLen;
- BYTE nMark;
+ sal_uInt8 nItemSize;
+ sal_uInt8 nIMax; // Anzahl der Eintrags-Paare
+ sal_uInt8 nOldVarLen;
+ sal_uInt8 nMark;
bool bCombined; // true : Einfuegen verboten
- BYTE SearchSameSprm( USHORT nVarLen, const BYTE* pSprms );
+ sal_uInt8 SearchSameSprm( sal_uInt16 nVarLen, const sal_uInt8* pSprms );
public:
WW8_WrFkp(ePLCFT ePl, WW8_FC nStartFc, bool bWrtWW8);
~WW8_WrFkp();
- bool Append( WW8_FC nEndFc, USHORT nVarLen = 0, const BYTE* pSprms = 0 );
+ bool Append( WW8_FC nEndFc, sal_uInt16 nVarLen = 0, const sal_uInt8* pSprms = 0 );
bool Combine();
void Write( SvStream& rStrm, SwWW8WrGrf& rGrf );
bool IsEqualPos(WW8_FC nEndFc) const
- { return !bCombined && nIMax && nEndFc == ((INT32*)pFkp)[nIMax]; }
- void MergeToNew( short& rVarLen, BYTE *& pNewSprms );
+ { return !bCombined && nIMax && nEndFc == ((sal_Int32*)pFkp)[nIMax]; }
+ void MergeToNew( short& rVarLen, sal_uInt8 *& pNewSprms );
bool IsEmptySprm() const
{ return !bCombined && nIMax && !nOldVarLen; }
void SetNewEnd( WW8_FC nEnd )
- { ((INT32*)pFkp)[nIMax] = nEnd; }
+ { ((sal_Int32*)pFkp)[nIMax] = nEnd; }
#ifdef __WW8_NEEDS_COPY
WW8_FC GetStartFc() const;
WW8_FC GetEndFc() const;
#else
- WW8_FC GetStartFc() const { return ((INT32*)pFkp)[0]; };
- WW8_FC GetEndFc() const { return ((INT32*)pFkp)[nIMax]; };
+ WW8_FC GetStartFc() const { return ((sal_Int32*)pFkp)[0]; };
+ WW8_FC GetEndFc() const { return ((sal_Int32*)pFkp)[nIMax]; };
#endif // defined __WW8_NEEDS_COPY
- BYTE *CopyLastSprms(BYTE &rLen, bool bVer8);
+ sal_uInt8 *CopyLastSprms(sal_uInt8 &rLen, bool bVer8);
};
@@ -174,7 +176,7 @@ class WW8_WrPc
{
WW8_CP nStartCp; // Start ZeichenPosition vom Text
WW8_FC nStartFc; // Start File Position vom Text
- USHORT nStatus; // Absatzende im Piece ?
+ sal_uInt16 nStatus; // Absatzende im Piece ?
public:
WW8_WrPc(WW8_FC nSFc, WW8_CP nSCp )
@@ -182,7 +184,7 @@ public:
{}
void SetStatus() { nStatus = 0x0050; }
- USHORT GetStatus() const { return nStatus; }
+ sal_uInt16 GetStatus() const { return nStatus; }
WW8_CP GetStartCp() const { return nStartCp; }
WW8_FC GetStartFc() const { return nStartFc; }
};
@@ -192,11 +194,11 @@ class WW8_WrtBookmarks
private:
//! Holds information about a single bookmark.
struct BookmarkInfo {
- ULONG startPos; //!< Starting character position.
- ULONG endPos; //!< Ending character position.
+ sal_uLong startPos; //!< Starting character position.
+ sal_uLong endPos; //!< Ending character position.
bool isField; //!< True if the bookmark is in a field result.
String name; //!< Name of this bookmark.
- inline BookmarkInfo(ULONG start, ULONG end, bool isFld, const String& bkName) : startPos(start), endPos(end), isField(isFld), name(bkName) {};
+ inline BookmarkInfo(sal_uLong start, sal_uLong end, bool isFld, const String& bkName) : startPos(start), endPos(end), isField(isFld), name(bkName) {};
//! Operator < is defined purely for sorting.
inline bool operator<(const BookmarkInfo &other) const { return startPos < other.startPos; }
};
@@ -218,7 +220,7 @@ public:
//! Write out bookmarks to file.
void Write( WW8Export& rWrt );
//! Move existing field marks from one position to another.
- void MoveFieldMarks(ULONG nFrom,ULONG nTo);
+ void MoveFieldMarks(sal_uLong nFrom,sal_uLong nTo);
};
@@ -229,7 +231,7 @@ public:
#define sCompObj CREATE_CONST_ASC("\1CompObj")
-SV_IMPL_VARARR( WW8Bytes, BYTE )
+SV_IMPL_VARARR( WW8Bytes, sal_uInt8 )
SV_IMPL_PTRARR( WW8_WrFkpPtrs, WW8_FkpPtr )
typedef WW8_WrPc* WW8_WrPcPtr;
@@ -250,7 +252,7 @@ static void WriteDop( WW8Export& rWrt )
// default TabStop schreiben
const SvxTabStopItem& rTabStop =
DefaultItemGet<SvxTabStopItem>(*rWrt.pDoc, RES_PARATR_TABSTOP);
- rDop.dxaTab = (USHORT)rTabStop[0].GetTabPos();
+ rDop.dxaTab = (sal_uInt16)rTabStop[0].GetTabPos();
// Werte aus der DocStatistik (werden aufjedenfall fuer die
@@ -260,7 +262,7 @@ static void WriteDop( WW8Export& rWrt )
const SwDocStat& rDStat = rWrt.pDoc->GetDocStat();
rDop.cWords = rDStat.nWord;
rDop.cCh = rDStat.nChar;
- rDop.cPg = static_cast< INT16 >(rDStat.nPage);
+ rDop.cPg = static_cast< sal_Int16 >(rDStat.nPage);
rDop.cParas = rDStat.nPara;
rDop.cLines = rDStat.nPara;
@@ -316,7 +318,7 @@ static void WriteDop( WW8Export& rWrt )
// und noch fuer die Header und Footers
rDop.cWordsFtnEnd = rDStat.nWord;
rDop.cChFtnEdn = rDStat.nChar;
- rDop.cPgFtnEdn = (INT16)rDStat.nPage;
+ rDop.cPgFtnEdn = (sal_Int16)rDStat.nPage;
rDop.cParasFtnEdn = rDStat.nPara;
rDop.cLinesFtnEdn = rDStat.nPara;
@@ -450,7 +452,7 @@ void WW8Export::ExportDopTypography(WW8DopTypography &rTypo)
const i18n::ForbiddenCharacters *pForbidden = 0;
const i18n::ForbiddenCharacters *pUseMe = 0;
- BYTE nUseReserved=0;
+ sal_uInt8 nUseReserved=0;
int nNoNeeded=0;
/*
Now we have some minor difficult issues, to wit...
@@ -553,7 +555,7 @@ void WW8Export::ExportDopTypography(WW8DopTypography &rTypo)
// Es kann nur etwas gefunden werden, wenn diese Methode innerhalb
// der aufgerufenen Methoden WW8_SwAttrIter::OutAttr() und
// WW8Export::OutputItemSet() benutzt wird.
-const SfxPoolItem* MSWordExportBase::HasItem( USHORT nWhich ) const
+const SfxPoolItem* MSWordExportBase::HasItem( sal_uInt16 nWhich ) const
{
const SfxPoolItem* pItem=0;
if (pISet)
@@ -575,7 +577,7 @@ const SfxPoolItem* MSWordExportBase::HasItem( USHORT nWhich ) const
return pItem;
}
-const SfxPoolItem& MSWordExportBase::GetItem(USHORT nWhich) const
+const SfxPoolItem& MSWordExportBase::GetItem(sal_uInt16 nWhich) const
{
const SfxPoolItem* pItem;
if (pISet)
@@ -599,11 +601,11 @@ const SfxPoolItem& MSWordExportBase::GetItem(USHORT nWhich) const
//------------------------------------------------------------------------------
-WW8_WrPlc1::WW8_WrPlc1( USHORT nStructSz )
+WW8_WrPlc1::WW8_WrPlc1( sal_uInt16 nStructSz )
: aPos( 16, 16 ), nStructSiz( nStructSz )
{
nDataLen = 16 * nStructSz;
- pData = new BYTE[ nDataLen ];
+ pData = new sal_uInt8[ nDataLen ];
}
WW8_WrPlc1::~WW8_WrPlc1()
@@ -613,18 +615,18 @@ WW8_WrPlc1::~WW8_WrPlc1()
WW8_CP WW8_WrPlc1::Prev() const
{
- USHORT nLen = aPos.Count();
+ sal_uInt16 nLen = aPos.Count();
OSL_ENSURE(nLen,"Prev called on empty list");
return nLen ? aPos[nLen-1] : 0;
}
void WW8_WrPlc1::Append( WW8_CP nCp, const void* pNewData )
{
- ULONG nInsPos = aPos.Count() * nStructSiz;
+ sal_uLong nInsPos = aPos.Count() * nStructSiz;
aPos.Insert( nCp, aPos.Count() );
if( nDataLen < nInsPos + nStructSiz )
{
- BYTE* pNew = new BYTE[ 2 * nDataLen ];
+ sal_uInt8* pNew = new sal_uInt8[ 2 * nDataLen ];
memmove( pNew, pData, nDataLen );
delete[] pData;
pData = pNew;
@@ -633,13 +635,13 @@ void WW8_WrPlc1::Append( WW8_CP nCp, const void* pNewData )
memcpy( pData + nInsPos, pNewData, nStructSiz );
}
-void WW8_WrPlc1::Finish( ULONG nLastCp, ULONG nSttCp )
+void WW8_WrPlc1::Finish( sal_uLong nLastCp, sal_uLong nSttCp )
{
if( aPos.Count() )
{
aPos.Insert( nLastCp, aPos.Count() );
if( nSttCp )
- for( USHORT n = 0; n < aPos.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aPos.Count(); ++n )
aPos[ n ] -= nSttCp;
}
}
@@ -647,7 +649,7 @@ void WW8_WrPlc1::Finish( ULONG nLastCp, ULONG nSttCp )
void WW8_WrPlc1::Write( SvStream& rStrm )
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < aPos.Count(); ++i )
SwWW8Writer::WriteLong( rStrm, aPos[i] );
if( i )
@@ -709,7 +711,7 @@ bool WW8_WrPlcFld::Write( WW8Export& rWrt )
if( pfc && plc )
{
- ULONG nFcStart = rWrt.pTableStrm->Tell();
+ sal_uLong nFcStart = rWrt.pTableStrm->Tell();
WW8_WrPlc1::Write( *rWrt.pTableStrm );
*pfc = nFcStart;
*plc = rWrt.pTableStrm->Tell() - nFcStart;
@@ -721,14 +723,14 @@ bool WW8_WrMagicTable::Write( WW8Export& rWrt )
{
if( WW8_WrPlc1::Count() <= 1 )
return false;
- ULONG nFcStart = rWrt.pTableStrm->Tell();
+ sal_uLong nFcStart = rWrt.pTableStrm->Tell();
WW8_WrPlc1::Write( *rWrt.pTableStrm );
rWrt.pFib->fcPlcfTch = nFcStart;
rWrt.pFib->lcbPlcfTch = rWrt.pTableStrm->Tell() - nFcStart;
return true;
}
-void WW8_WrMagicTable::Append( WW8_CP nCp, ULONG nData)
+void WW8_WrMagicTable::Append( WW8_CP nCp, sal_uLong nData)
{
SVBT32 nLittle;
/*
@@ -745,9 +747,9 @@ void WW8_WrMagicTable::Append( WW8_CP nCp, ULONG nData)
//--------------------------------------------------------------------------
-void SwWW8Writer::FillCount( SvStream& rStrm, ULONG nCount )
+void SwWW8Writer::FillCount( SvStream& rStrm, sal_uLong nCount )
{
- static const UINT32 aNulls[16] =
+ static const sal_uInt32 aNulls[16] =
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 // 64 Byte
};
@@ -760,9 +762,9 @@ void SwWW8Writer::FillCount( SvStream& rStrm, ULONG nCount )
rStrm.Write( aNulls, nCount ); // Rest ( 0 .. 64 Bytes ) schreiben
}
-ULONG SwWW8Writer::FillUntil( SvStream& rStrm, ULONG nEndPos )
+sal_uLong SwWW8Writer::FillUntil( SvStream& rStrm, sal_uLong nEndPos )
{
- ULONG nCurPos = rStrm.Tell();
+ sal_uLong nCurPos = rStrm.Tell();
if( !nEndPos ) // nEndPos == 0 -> next Page
nEndPos = (nCurPos + 0x1ff) & ~0x1ffUL;
@@ -791,22 +793,22 @@ WW8_WrPlcPn::~WW8_WrPlcPn()
aFkps.DeleteAndDestroy( 0, aFkps.Count() );
}
-BYTE *WW8_WrPlcPn::CopyLastSprms(BYTE &rLen)
+sal_uInt8 *WW8_WrPlcPn::CopyLastSprms(sal_uInt8 &rLen)
{
WW8_FkpPtr pF = aFkps.GetObject(aFkps.Count() - 1);
return pF->CopyLastSprms(rLen, rWrt.bWrtWW8);
}
-void WW8_WrPlcPn::AppendFkpEntry(WW8_FC nEndFc,short nVarLen,const BYTE* pSprms)
+void WW8_WrPlcPn::AppendFkpEntry(WW8_FC nEndFc,short nVarLen,const sal_uInt8* pSprms)
{
WW8_FkpPtr pF = aFkps.GetObject( aFkps.Count() - 1 );
// big sprm? build the sprmPHugePapx
- BYTE* pNewSprms = (BYTE*)pSprms;
- BYTE aHugePapx[ 8 ];
+ sal_uInt8* pNewSprms = (sal_uInt8*)pSprms;
+ sal_uInt8 aHugePapx[ 8 ];
if( rWrt.bWrtWW8 && PAP == ePlc && 488 < nVarLen )
{
- BYTE* p = aHugePapx;
+ sal_uInt8* p = aHugePapx;
*p++ = *pSprms++; // set style Id
*p++ = *pSprms++;
nVarLen -= 2;
@@ -850,9 +852,9 @@ void WW8_WrPlcPn::AppendFkpEntry(WW8_FC nEndFc,short nVarLen,const BYTE* pSprms)
void WW8_WrPlcPn::WriteFkps()
{
- nFkpStartPage = (USHORT) ( SwWW8Writer::FillUntil( rWrt.Strm() ) >> 9 );
+ nFkpStartPage = (sal_uInt16) ( SwWW8Writer::FillUntil( rWrt.Strm() ) >> 9 );
- for( USHORT i = 0; i < aFkps.Count(); i++ )
+ for( sal_uInt16 i = 0; i < aFkps.Count(); i++ )
aFkps.GetObject( i )->Write( rWrt.Strm(), *rWrt.pGrf );
if( CHP == ePlc )
@@ -869,8 +871,8 @@ void WW8_WrPlcPn::WriteFkps()
void WW8_WrPlcPn::WritePlc()
{
- ULONG nFcStart = rWrt.pTableStrm->Tell();
- USHORT i;
+ sal_uLong nFcStart = rWrt.pTableStrm->Tell();
+ sal_uInt16 i;
for( i = 0; i < aFkps.Count(); i++ )
SwWW8Writer::WriteLong( *rWrt.pTableStrm,
@@ -907,25 +909,25 @@ WW8_WrFkp::WW8_WrFkp(ePLCFT ePl, WW8_FC nStartFc, bool bWrtWW8)
nItemSize( ( CHP == ePl ) ? 1 : ( bWrtWW8 ? 13 : 7 )),
nIMax(0), nOldVarLen(0), nMark(0), bCombined(false)
{
- pFkp = (BYTE*)new INT32[128]; // 512 Byte
- pOfs = (BYTE*)new INT32[128]; // 512 Byte
+ pFkp = (sal_uInt8*)new sal_Int32[128]; // 512 Byte
+ pOfs = (sal_uInt8*)new sal_Int32[128]; // 512 Byte
memset( pFkp, 0, 4 * 128 );
memset( pOfs, 0, 4 * 128 );
- ( (INT32*)pFkp )[0] = nStartFc; // 0. FC-Eintrag auf nStartFc
+ ( (sal_Int32*)pFkp )[0] = nStartFc; // 0. FC-Eintrag auf nStartFc
}
WW8_WrFkp::~WW8_WrFkp()
{
- delete[] (INT32 *)pFkp;
- delete[] (INT32 *)pOfs;
+ delete[] (sal_Int32 *)pFkp;
+ delete[] (sal_Int32 *)pOfs;
}
-BYTE WW8_WrFkp::SearchSameSprm( USHORT nVarLen, const BYTE* pSprms )
+sal_uInt8 WW8_WrFkp::SearchSameSprm( sal_uInt16 nVarLen, const sal_uInt8* pSprms )
{
if( 3 < nVarLen )
{
// if the sprms contained picture-references then never equal!
- for( BYTE n = static_cast< BYTE >(nVarLen - 1); 3 < n; --n )
+ for( sal_uInt8 n = static_cast< sal_uInt8 >(nVarLen - 1); 3 < n; --n )
if( pSprms[ n ] == GRF_MAGIC_3 &&
pSprms[ n-1 ] == GRF_MAGIC_2 &&
pSprms[ n-2 ] == GRF_MAGIC_1 )
@@ -935,13 +937,13 @@ BYTE WW8_WrFkp::SearchSameSprm( USHORT nVarLen, const BYTE* pSprms )
short i;
for( i = 0; i < nIMax; i++ )
{
- BYTE nStart = pOfs[i * nItemSize];
+ sal_uInt8 nStart = pOfs[i * nItemSize];
if( nStart )
{ // Hat Sprms
- const BYTE* p = pFkp + ( (USHORT)nStart << 1 );
+ const sal_uInt8* p = pFkp + ( (sal_uInt16)nStart << 1 );
if( ( CHP == ePlc
? (*p++ == nVarLen)
- : (((USHORT)*p++ << 1 ) == (( nVarLen+1) & 0xfffe)) )
+ : (((sal_uInt16)*p++ << 1 ) == (( nVarLen+1) & 0xfffe)) )
&& !memcmp( p, pSprms, nVarLen ) )
return nStart; // gefunden
}
@@ -949,19 +951,19 @@ BYTE WW8_WrFkp::SearchSameSprm( USHORT nVarLen, const BYTE* pSprms )
return 0; // nicht gefunden
}
-BYTE *WW8_WrFkp::CopyLastSprms(BYTE &rLen, bool bVer8)
+sal_uInt8 *WW8_WrFkp::CopyLastSprms(sal_uInt8 &rLen, bool bVer8)
{
rLen=0;
- BYTE *pStart=0,*pRet=0;
+ sal_uInt8 *pStart=0,*pRet=0;
if (!bCombined)
pStart = pOfs;
else
pStart = pFkp + ( nIMax + 1 ) * 4;
- BYTE nStart = *(pStart + (nIMax-1) * nItemSize);
+ sal_uInt8 nStart = *(pStart + (nIMax-1) * nItemSize);
- const BYTE* p = pFkp + ( (USHORT)nStart << 1 );
+ const sal_uInt8* p = pFkp + ( (sal_uInt16)nStart << 1 );
if (!*p && bVer8)
p++;
@@ -971,13 +973,13 @@ BYTE *WW8_WrFkp::CopyLastSprms(BYTE &rLen, bool bVer8)
rLen = *p++;
if (PAP == ePlc)
rLen *= 2;
- pRet = new BYTE[rLen];
+ pRet = new sal_uInt8[rLen];
memcpy(pRet,p,rLen);
}
return pRet;
}
-bool WW8_WrFkp::Append( WW8_FC nEndFc, USHORT nVarLen, const BYTE* pSprms )
+bool WW8_WrFkp::Append( WW8_FC nEndFc, sal_uInt16 nVarLen, const sal_uInt8* pSprms )
{
OSL_ENSURE( !nVarLen || pSprms, "Item-Pointer fehlt" );
OSL_ENSURE( nVarLen < ( ( ePlc == PAP ) ? 497U : 502U ), "Sprms zu lang !" );
@@ -987,7 +989,7 @@ bool WW8_WrFkp::Append( WW8_FC nEndFc, USHORT nVarLen, const BYTE* pSprms )
OSL_ENSURE( !this, "Fkp::Append: Fkp is already combined" );
return false;
}
- INT32 n = ((INT32*)pFkp)[nIMax]; // letzter Eintrag
+ sal_Int32 n = ((sal_Int32*)pFkp)[nIMax]; // letzter Eintrag
if( nEndFc <= n )
{
OSL_ENSURE( nEndFc >= n, "+Fkp: FC rueckwaerts" );
@@ -998,7 +1000,7 @@ bool WW8_WrFkp::Append( WW8_FC nEndFc, USHORT nVarLen, const BYTE* pSprms )
return true; // ignorieren, keinen neuen Fkp anlegen
}
- BYTE nOldP = ( nVarLen ) ? SearchSameSprm( nVarLen, pSprms ) : 0;
+ sal_uInt8 nOldP = ( nVarLen ) ? SearchSameSprm( nVarLen, pSprms ) : 0;
// Kombinieren gleicher Eintraege
short nOffset=0, nPos = nStartGrp;
if (nVarLen && !nOldP)
@@ -1014,22 +1016,22 @@ bool WW8_WrFkp::Append( WW8_FC nEndFc, USHORT nVarLen, const BYTE* pSprms )
nPos &= 0xFFFE; // Pos fuer Sprms ( gerade Pos )
}
- if( (USHORT)nPos <= ( nIMax + 2U ) * 4U + ( nIMax + 1U ) * nItemSize )
+ if( (sal_uInt16)nPos <= ( nIMax + 2U ) * 4U + ( nIMax + 1U ) * nItemSize )
// Passt hinter CPs und Offsets ?
return false; // Nein
- ((INT32*)pFkp)[nIMax + 1] = nEndFc; // FC eintragen
+ ((sal_Int32*)pFkp)[nIMax + 1] = nEndFc; // FC eintragen
- nOldVarLen = (BYTE)nVarLen;
+ nOldVarLen = (sal_uInt8)nVarLen;
if( nVarLen && !nOldP )
{ // echt eintragen
nOldStartGrp = nStartGrp;
nStartGrp = nPos;
- pOfs[nIMax * nItemSize] = (BYTE)( nStartGrp >> 1 );
+ pOfs[nIMax * nItemSize] = (sal_uInt8)( nStartGrp >> 1 );
// ( DatenAnfg >> 1 ) eintragen
- BYTE nCnt = static_cast< BYTE >(CHP == ePlc
- ? ( nVarLen < 256 ) ? (BYTE) nVarLen : 255
+ sal_uInt8 nCnt = static_cast< sal_uInt8 >(CHP == ePlc
+ ? ( nVarLen < 256 ) ? (sal_uInt8) nVarLen : 255
: ( ( nVarLen + 1 ) >> 1 ));
pFkp[ nOffset ] = nCnt; // DatenLaenge eintragen
@@ -1053,14 +1055,14 @@ bool WW8_WrFkp::Combine()
memcpy( pFkp + ( nIMax + 1 ) * 4, pOfs, nIMax * nItemSize );
delete[] pOfs;
pOfs = 0;
- ((BYTE*)pFkp)[511] = nIMax;
+ ((sal_uInt8*)pFkp)[511] = nIMax;
bCombined = true;
#if defined OSL_BIGENDIAN // Hier werden nur die FCs gedreht, die
- USHORT i; // Sprms muessen an anderer Stelle gedreht
+ sal_uInt16 i; // Sprms muessen an anderer Stelle gedreht
// werden
- UINT32* p;
- for( i = 0, p = (UINT32*)pFkp; i <= nIMax; i++, p++ )
+ sal_uInt32* p;
+ for( i = 0, p = (sal_uInt32*)pFkp; i <= nIMax; i++, p++ )
*p = SWAPLONG( *p );
#endif // ifdef OSL_BIGENDIAN
@@ -1071,8 +1073,8 @@ void WW8_WrFkp::Write( SvStream& rStrm, SwWW8WrGrf& rGrf )
{
Combine(); // Falls noch nicht Combined
- BYTE* p; // Suche Magic fuer nPicLocFc
- BYTE* pEnd = pFkp + nStartGrp;
+ sal_uInt8* p; // Suche Magic fuer nPicLocFc
+ sal_uInt8* pEnd = pFkp + nStartGrp;
for( p = pFkp + 511 - 4; p >= pEnd; p-- )
{
if( *p != GRF_MAGIC_1 ) // Suche nach Signatur 0x12 0x34 0x56 0xXX
@@ -1089,23 +1091,23 @@ void WW8_WrFkp::Write( SvStream& rStrm, SwWW8WrGrf& rGrf )
rStrm.Write( pFkp, 512 );
}
-void WW8_WrFkp::MergeToNew( short& rVarLen, BYTE *& rpNewSprms )
+void WW8_WrFkp::MergeToNew( short& rVarLen, sal_uInt8 *& rpNewSprms )
{
- BYTE nStart = pOfs[ (nIMax-1) * nItemSize ];
+ sal_uInt8 nStart = pOfs[ (nIMax-1) * nItemSize ];
if( nStart )
{ // Hat Sprms
- BYTE* p = pFkp + ( (USHORT)nStart << 1 );
+ sal_uInt8* p = pFkp + ( (sal_uInt16)nStart << 1 );
// old and new equal? Then copy only one into the new sprms
if( nOldVarLen == rVarLen && !memcmp( p+1, rpNewSprms, nOldVarLen ))
{
- BYTE* pNew = new BYTE[ nOldVarLen ];
+ sal_uInt8* pNew = new sal_uInt8[ nOldVarLen ];
memcpy( pNew, p+1, nOldVarLen );
rpNewSprms = pNew;
}
else
{
- BYTE* pNew = new BYTE[ nOldVarLen + rVarLen ];
+ sal_uInt8* pNew = new sal_uInt8[ nOldVarLen + rVarLen ];
memcpy( pNew, p+1, nOldVarLen );
memcpy( pNew + nOldVarLen, rpNewSprms, rVarLen );
@@ -1115,7 +1117,7 @@ void WW8_WrFkp::MergeToNew( short& rVarLen, BYTE *& rpNewSprms )
--nIMax;
// if this sprms dont used from others, remove it
bool bFnd = false;
- for (USHORT n = 0; n < nIMax; ++n)
+ for (sal_uInt16 n = 0; n < nIMax; ++n)
{
if (nStart == pOfs[n * nItemSize])
{
@@ -1140,14 +1142,14 @@ WW8_FC WW8_WrFkp::GetStartFc() const
// zurueckgedreht werden.
if( bCombined )
return SVBT32ToUInt32( pFkp ); // 0. Element
- return ((INT32*)pFkp)[0];
+ return ((sal_Int32*)pFkp)[0];
}
WW8_FC WW8_WrFkp::GetEndFc() const
{
if( bCombined )
return SVBT32ToUInt32( &(pFkp[nIMax*4]) ); // nIMax-tes SVBT32-Element
- return ((INT32*)pFkp)[nIMax];
+ return ((sal_Int32*)pFkp)[nIMax];
}
#endif // defined __WW8_NEEDS_COPY
@@ -1206,9 +1208,9 @@ void WW8_WrPct::AppendPc(WW8_FC nStartFc, bool bIsUnicode)
void WW8_WrPct::WritePc( WW8Export& rWrt )
{
- ULONG nPctStart;
- ULONG nOldPos, nEndPos;
- USHORT i;
+ sal_uLong nPctStart;
+ sal_uLong nOldPos, nEndPos;
+ sal_uInt16 i;
nPctStart = rWrt.pTableStrm->Tell(); // Beginn Piece-Table
*rWrt.pTableStrm << ( char )0x02; // Statusbyte PCT
@@ -1220,7 +1222,7 @@ void WW8_WrPct::WritePc( WW8Export& rWrt )
// die letzte Pos noch errechnen
- ULONG nStartCp = rWrt.pFib->fcMac - nOldFc;
+ sal_uLong nStartCp = rWrt.pFib->fcMac - nOldFc;
if( bIsUni )
nStartCp >>= 1; // Bei Unicode Anzahl der Zeichen / 2
nStartCp += pPcts->GetObject( i-1 )->GetStartCp();
@@ -1253,9 +1255,9 @@ void WW8_WrPct::SetParaBreak()
pPcts->GetObject( pPcts->Count() - 1)->SetStatus();
}
-WW8_CP WW8_WrPct::Fc2Cp( ULONG nFc ) const
+WW8_CP WW8_WrPct::Fc2Cp( sal_uLong nFc ) const
{
- OSL_ENSURE( nFc >= (ULONG)nOldFc, "FilePos liegt vorm letzten Piece" );
+ OSL_ENSURE( nFc >= (sal_uLong)nOldFc, "FilePos liegt vorm letzten Piece" );
OSL_ENSURE( pPcts->Count(), "Fc2Cp noch kein Piece vorhanden" );
nFc -= nOldFc;
@@ -1323,7 +1325,7 @@ void WW8_WrtBookmarks::Write( WW8Export& rWrt )
//before that we need a lookup table (sorted by start position) to link
//start and end positions.
// Start by sorting the end positions.
- std::vector<ULONG> aEndSortTab;
+ std::vector<sal_uLong> aEndSortTab;
aEndSortTab.reserve(aBookmarks.size());
for (BkmIter bIt = aBookmarks.begin(); bIt < aBookmarks.end(); ++bIt)
aEndSortTab.push_back(bIt->endPos);
@@ -1331,10 +1333,10 @@ void WW8_WrtBookmarks::Write( WW8Export& rWrt )
//Now write out the lookups.
//Note that in most cases, the positions in both vectors will be very close.
- for( ULONG i = 0; i < aBookmarks.size(); ++i )
+ for( sal_uLong i = 0; i < aBookmarks.size(); ++i )
{
- ULONG nEndCP = aBookmarks[ i ].endPos;
- USHORT nPos = i;
+ sal_uLong nEndCP = aBookmarks[ i ].endPos;
+ sal_uInt16 nPos = i;
if( aEndSortTab[ nPos ] > nEndCP )
{
while( aEndSortTab[ --nPos ] != nEndCP )
@@ -1349,7 +1351,7 @@ void WW8_WrtBookmarks::Write( WW8Export& rWrt )
// Finally, the actual Bookmark end positions.
rWrt.pFib->fcPlcfbkl = rStrm.Tell();
- for(ULONG i = 0; i < aEndSortTab.size(); ++i )
+ for(sal_uLong i = 0; i < aEndSortTab.size(); ++i )
SwWW8Writer::WriteLong( rStrm, aEndSortTab[ i ] );
SwWW8Writer::WriteLong(rStrm, rWrt.pFib->ccpText + rWrt.pFib->ccpTxbx);
rWrt.pFib->lcbPlcfbkl = rStrm.Tell() - rWrt.pFib->fcPlcfbkl;
@@ -1365,7 +1367,7 @@ WW8_WrtBookmarks::BkmIter WW8_WrtBookmarks::GetPos( const String& rNm )
return aBookmarks.end();
}
-void WW8_WrtBookmarks::MoveFieldMarks(ULONG nFrom, ULONG nTo)
+void WW8_WrtBookmarks::MoveFieldMarks(sal_uLong nFrom, sal_uLong nTo)
{
for (BkmIter i = aBookmarks.begin(); i < aBookmarks.end(); ++i)
{
@@ -1385,12 +1387,12 @@ void WW8Export::AppendBookmarks( const SwTxtNode& rNd,
xub_StrLen nAktPos, xub_StrLen nLen )
{
SvPtrarr aArr( 8, 8 );
- USHORT nCntnt;
+ sal_uInt16 nCntnt;
xub_StrLen nAktEnd = nAktPos + nLen;
if( GetWriter().GetBookmarks( rNd, nAktPos, nAktEnd, aArr ))
{
- ULONG nNd = rNd.GetIndex(), nSttCP = Fc2Cp( Strm().Tell() );
- for( USHORT n = 0; n < aArr.Count(); ++n )
+ sal_uLong nNd = rNd.GetIndex(), nSttCP = Fc2Cp( Strm().Tell() );
+ for( sal_uInt16 n = 0; n < aArr.Count(); ++n )
{
::sw::mark::IMark& rBkmk = *(::sw::mark::IMark*)aArr[ n ];
if(dynamic_cast< ::sw::mark::IFieldmark *>(&rBkmk))
@@ -1411,28 +1413,28 @@ void WW8Export::AppendBookmarks( const SwTxtNode& rNd,
( nCntnt = pPos->nContent.GetIndex() ) >= nAktPos &&
nCntnt < nAktEnd ) )
{
- ULONG nCp = nSttCP + pPos->nContent.GetIndex() - nAktPos;
+ sal_uLong nCp = nSttCP + pPos->nContent.GetIndex() - nAktPos;
pBkmks->Append(nCp, BookmarkToWord(rBkmk.GetName()), &rBkmk);
}
if( pOPos && nNd == pOPos->nNode.GetIndex() &&
( nCntnt = pOPos->nContent.GetIndex() ) >= nAktPos &&
nCntnt < nAktEnd )
{
- ULONG nCp = nSttCP + pOPos->nContent.GetIndex() - nAktPos;
+ sal_uLong nCp = nSttCP + pOPos->nContent.GetIndex() - nAktPos;
pBkmks->Append(nCp, BookmarkToWord(rBkmk.GetName()), &rBkmk);
}
}
}
}
-void WW8Export::MoveFieldMarks(ULONG nFrom, ULONG nTo)
+void WW8Export::MoveFieldMarks(sal_uLong nFrom, sal_uLong nTo)
{
pBkmks->MoveFieldMarks(nFrom, nTo);
}
void WW8Export::AppendBookmark( const rtl::OUString& rName, bool bSkip )
{
- ULONG nSttCP = Fc2Cp( Strm().Tell() ) + ( bSkip? 1: 0 );
+ sal_uLong nSttCP = Fc2Cp( Strm().Tell() ) + ( bSkip? 1: 0 );
pBkmks->Append( nSttCP, rName );
}
@@ -1452,7 +1454,7 @@ void WW8_WrtRedlineAuthor::Write( Writer& rWrt )
rWW8Wrt.pFib->lcbSttbfRMark, rWW8Wrt.bWrtWW8 ? 0 : 2);
}
-USHORT WW8Export::AddRedlineAuthor( USHORT nId )
+sal_uInt16 WW8Export::AddRedlineAuthor( sal_uInt16 nId )
{
if( !pRedlAuthors )
{
@@ -1466,9 +1468,9 @@ USHORT WW8Export::AddRedlineAuthor( USHORT nId )
/* */
void WW8Export::WriteAsStringTable(const std::vector<String>& rStrings,
- INT32& rfcSttbf, INT32& rlcbSttbf, USHORT nExtraLen)
+ sal_Int32& rfcSttbf, sal_Int32& rlcbSttbf, sal_uInt16 nExtraLen)
{
- USHORT n, nCount = static_cast< USHORT >(rStrings.size());
+ sal_uInt16 n, nCount = static_cast< sal_uInt16 >(rStrings.size());
if( nCount )
{
// we have some Redlines found in the document -> the
@@ -1494,7 +1496,7 @@ void WW8Export::WriteAsStringTable(const std::vector<String>& rStrings,
for( n = 0; n < nCount; ++n )
{
const String aNm(rStrings[n].Copy(0, 255));
- rStrm << (BYTE)aNm.Len();
+ rStrm << (sal_uInt8)aNm.Len();
SwWW8Writer::WriteString8(rStrm, aNm, false,
RTL_TEXTENCODING_MS_1252);
if (nExtraLen)
@@ -1503,23 +1505,23 @@ void WW8Export::WriteAsStringTable(const std::vector<String>& rStrings,
}
rlcbSttbf = rStrm.Tell() - rfcSttbf;
if( !bWrtWW8 )
- SwWW8Writer::WriteShort( rStrm, rfcSttbf, (USHORT)rlcbSttbf );
+ SwWW8Writer::WriteShort( rStrm, rfcSttbf, (sal_uInt16)rlcbSttbf );
}
}
// WriteShort() traegt an FilePos nPos den Wert nVal ein und seekt auf die
// alte FilePos zurueck. Benutzt zum Nachtragen von Laengen.
-void SwWW8Writer::WriteShort( SvStream& rStrm, ULONG nPos, INT16 nVal )
+void SwWW8Writer::WriteShort( SvStream& rStrm, sal_uLong nPos, sal_Int16 nVal )
{
- ULONG nOldPos = rStrm.Tell(); // Pos merken
+ sal_uLong nOldPos = rStrm.Tell(); // Pos merken
rStrm.Seek( nPos );
SwWW8Writer::WriteShort( rStrm, nVal );
rStrm.Seek( nOldPos );
}
-void SwWW8Writer::WriteLong( SvStream& rStrm, ULONG nPos, INT32 nVal )
+void SwWW8Writer::WriteLong( SvStream& rStrm, sal_uLong nPos, sal_Int32 nVal )
{
- ULONG nOldPos = rStrm.Tell(); // Pos merken
+ sal_uLong nOldPos = rStrm.Tell(); // Pos merken
rStrm.Seek( nPos );
SwWW8Writer::WriteLong( rStrm, nVal );
rStrm.Seek( nOldPos );
@@ -1563,13 +1565,13 @@ void SwWW8Writer::InsAsString8(ww::bytes &rO, const String& rStr,
#ifdef __WW8_NEEDS_COPY
-void SwWW8Writer::InsUInt16( WW8Bytes& rO, UINT16 n )
+void SwWW8Writer::InsUInt16( WW8Bytes& rO, sal_uInt16 n )
{
SVBT16 nL;
ShortToSVBT16( n, nL );
rO.Insert( nL, 2, rO.Count() );
}
-void SwWW8Writer::InsUInt32( WW8Bytes& rO, UINT32 n )
+void SwWW8Writer::InsUInt32( WW8Bytes& rO, sal_uInt32 n )
{
SVBT32 nL;
UInt32ToSVBT32( n, nL );
@@ -1578,13 +1580,13 @@ void SwWW8Writer::InsUInt32( WW8Bytes& rO, UINT32 n )
#else
-void SwWW8Writer::InsUInt16( WW8Bytes& rO, UINT16 n )
+void SwWW8Writer::InsUInt16( WW8Bytes& rO, sal_uInt16 n )
{
- rO.Insert( (BYTE*)&n, 2, rO.Count() );
+ rO.Insert( (sal_uInt8*)&n, 2, rO.Count() );
}
-void SwWW8Writer::InsUInt32( WW8Bytes& rO, UINT32 n )
+void SwWW8Writer::InsUInt32( WW8Bytes& rO, sal_uInt32 n )
{
- rO.Insert( (BYTE*)&n, 4, rO.Count() );
+ rO.Insert( (sal_uInt8*)&n, 4, rO.Count() );
}
#endif // defined __WW8_NEEDS_COPY
@@ -1600,7 +1602,7 @@ void SwWW8Writer::InsAsString8( WW8Bytes& rO, const String& rStr,
rtl_TextEncoding eCodeSet )
{
ByteString sTmp( rStr, eCodeSet );
- rO.Insert( (BYTE*)sTmp.GetBuffer(), sTmp.Len(), rO.Count() );
+ rO.Insert( (sal_uInt8*)sTmp.GetBuffer(), sTmp.Len(), rO.Count() );
}
void SwWW8Writer::WriteString16(SvStream& rStrm, const String& rStr,
@@ -1640,7 +1642,7 @@ void SwWW8Writer::WriteString8(SvStream& rStrm, const String& rStr,
rStrm.Write(&aBytes[0], aBytes.size());
}
-void WW8Export::WriteStringAsPara( const String& rTxt, USHORT nStyleId )
+void WW8Export::WriteStringAsPara( const String& rTxt, sal_uInt16 nStyleId )
{
if( rTxt.Len() )
OutSwString( rTxt, 0, rTxt.Len(), IsUnicode(), RTL_TEXTENCODING_MS_1252 );
@@ -1658,14 +1660,14 @@ void WW8Export::WriteStringAsPara( const String& rTxt, USHORT nStyleId )
aArr.Insert( 1, aArr.Count() );
}
- ULONG nPos = Strm().Tell();
+ sal_uLong nPos = Strm().Tell();
pPapPlc->AppendFkpEntry( nPos, aArr.Count(), aArr.GetData() );
pChpPlc->AppendFkpEntry( nPos );
}
-void MSWordExportBase::WriteSpecialText( ULONG nStart, ULONG nEnd, BYTE nTTyp )
+void MSWordExportBase::WriteSpecialText( sal_uLong nStart, sal_uLong nEnd, sal_uInt8 nTTyp )
{
- BYTE nOldTyp = nTxtTyp;
+ sal_uInt8 nOldTyp = nTxtTyp;
nTxtTyp = nTTyp;
SwPaM* pOldPam = pCurPam; //!! Einfaches Umsetzen des PaM ohne
SwPaM* pOldEnd = pOrigPam; // Wiederherstellen muesste es auch tun
@@ -1752,10 +1754,10 @@ void WW8Export::WriteChar( sal_Unicode c )
if( pPiece->IsUnicode() )
Strm() << c;
else
- Strm() << (BYTE)c;
+ Strm() << (sal_uInt8)c;
}
-void MSWordExportBase::SaveData( ULONG nStt, ULONG nEnd )
+void MSWordExportBase::SaveData( sal_uLong nStt, sal_uLong nEnd )
{
MSWordSaveData aData;
@@ -1823,7 +1825,7 @@ void MSWordExportBase::RestoreData()
maSaveData.pop();
}
-void WW8Export::SaveData( ULONG nStt, ULONG nEnd )
+void WW8Export::SaveData( sal_uLong nStt, sal_uLong nEnd )
{
MSWordExportBase::SaveData( nStt, nEnd );
@@ -1876,14 +1878,14 @@ void WW8AttributeOutput::TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pT
{
/* Cell */
m_rWW8Export.InsUInt16( NS_sprm::LN_PFInTable );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( NS_sprm::LN_PTableDepth );
m_rWW8Export.InsUInt32( nDepth );
if ( nDepth > 1 && pTableTextNodeInfoInner->isEndOfCell() )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PCell );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
}
}
}
@@ -1898,12 +1900,12 @@ void WW8AttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTa
if ( pTableTextNodeInfoInner->isEndOfLine() )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PFInTable );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
if ( nDepth == 1 )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PFTtp );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
}
m_rWW8Export.InsUInt16( NS_sprm::LN_PTableDepth );
@@ -1912,9 +1914,9 @@ void WW8AttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTa
if ( nDepth > 1 )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PCell );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( NS_sprm::LN_PRow );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
}
TableDefinition( pTableTextNodeInfoInner );
@@ -1973,8 +1975,8 @@ void WW8AttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_
if ( FRMDIR_VERT_TOP_RIGHT == m_rWW8Export.TrueFrameDirection( *pFrmFmt ) )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_TTextFlow );
- m_rWW8Export.pO->Insert( BYTE(n), m_rWW8Export.pO->Count() ); //start range
- m_rWW8Export.pO->Insert( BYTE(n + 1), m_rWW8Export.pO->Count() ); //end range
+ m_rWW8Export.pO->Insert( sal_uInt8(n), m_rWW8Export.pO->Count() ); //start range
+ m_rWW8Export.pO->Insert( sal_uInt8(n + 1), m_rWW8Export.pO->Count() ); //end range
m_rWW8Export.InsUInt16( 5 ); //Equals vertical writing
}
}
@@ -1993,7 +1995,7 @@ void WW8AttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pT
*/
const SwFmtRowSplit& rSplittable = pLineFmt->GetRowSplit();
- BYTE nCantSplit = (!rSplittable.GetValue()) ? 1 : 0;
+ sal_uInt8 nCantSplit = (!rSplittable.GetValue()) ? 1 : 0;
if ( m_rWW8Export.bWrtWW8 )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_TFCantSplit );
@@ -2045,7 +2047,7 @@ void WW8AttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTab
m_rWW8Export.InsUInt16( NS_sprm::LN_TDyaRowHeight );
else
m_rWW8Export.pO->Insert( 189, m_rWW8Export.pO->Count() );
- m_rWW8Export.InsUInt16( (USHORT)nHeight );
+ m_rWW8Export.InsUInt16( (sal_uInt16)nHeight );
}
}
@@ -2146,7 +2148,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
m_rWW8Export.InsUInt16( nSprmSize ); // length
// number of boxes
- m_rWW8Export.pO->Insert( static_cast<BYTE>(nBoxes), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( static_cast<sal_uInt8>(nBoxes), m_rWW8Export.pO->Count() );
/* cellxs */
/*
@@ -2195,7 +2197,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
for ( ww8::GridCols::const_iterator it = pGridCols->begin(),
end = pGridCols->end(); it != end; ++it )
{
- m_rWW8Export.InsUInt16( static_cast<USHORT>( *it ) + nTblOffset );
+ m_rWW8Export.InsUInt16( static_cast<sal_uInt16>( *it ) + nTblOffset );
}
/* TCs */
@@ -2229,7 +2231,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
m_rWW8Export.InsUInt16( nFlags );
}
- static BYTE aNullBytes[] = { 0x0, 0x0 };
+ static sal_uInt8 aNullBytes[] = { 0x0, 0x0 };
m_rWW8Export.pO->Insert( aNullBytes, 2, m_rWW8Export.pO->Count() ); // dummy
if (pBoxFmt != NULL)
@@ -2328,7 +2330,7 @@ void WW8AttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointe
//Set Default, just taken from the first cell of the first
//row
- static USHORT aBorders[] =
+ static sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT,
BOX_LINE_BOTTOM, BOX_LINE_RIGHT
@@ -2337,11 +2339,11 @@ void WW8AttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointe
for ( int i = 0; i < 4; ++i )
{
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, 0xD634 );
- m_rWW8Export.pO->Insert( BYTE(6), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( BYTE(0), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( BYTE(1), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( BYTE(1 << i), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( BYTE(3), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( sal_uInt8(6), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( sal_uInt8(0), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( sal_uInt8(1), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( sal_uInt8(1 << i), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( sal_uInt8(3), m_rWW8Export.pO->Count() );
SwWW8Writer::InsUInt16( *m_rWW8Export.pO,
pFrmFmt->GetBox().GetDistance( aBorders[i] ) );
@@ -2358,8 +2360,8 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_TDefTableShd );
else
- m_rWW8Export.pO->Insert( (BYTE)191, m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( (BYTE)(nBoxes * 2), m_rWW8Export.pO->Count() ); // Len
+ m_rWW8Export.pO->Insert( (sal_uInt8)191, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)(nBoxes * 2), m_rWW8Export.pO->Count() ); // Len
for ( sal_uInt8 n = 0; n < nBoxes; n++ )
{
@@ -2390,7 +2392,7 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
for (sal_uInt32 m = 0; m < 2; m++)
{
m_rWW8Export.InsUInt16( aSprmIds[m] );
- m_rWW8Export.pO->Insert( static_cast<BYTE>(nBoxes0 * 10),
+ m_rWW8Export.pO->Insert( static_cast<sal_uInt8>(nBoxes0 * 10),
m_rWW8Export.pO->Count() );
for ( sal_uInt8 n = 0; n < nBoxes0; n++ )
@@ -2494,7 +2496,7 @@ void MSWordExportBase::WriteText()
if ( !pParentFmt )
pParentFmt = (SwSectionFmt*)0xFFFFFFFF;
- ULONG nRstLnNum;
+ sal_uLong nRstLnNum;
if ( aIdx.GetNode().IsCntntNode() )
nRstLnNum = ((SwCntntNode&)aIdx.GetNode()).GetSwAttrSet().
GetLineNumber().GetStartValue();
@@ -2524,7 +2526,7 @@ void MSWordExportBase::WriteText()
else
pCurPam->GetPoint()->nNode++;
- ULONG nPos = pCurPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nPos = pCurPam->GetPoint()->nNode.GetIndex();
::SetProgressState( nPos, pCurPam->GetDoc()->GetDocShell() );
}
@@ -2571,7 +2573,7 @@ void WW8Export::WriteFkpPlcUsw()
{
if( !bWrtWW8 )
{
- static const BYTE aSpec[2] =
+ static const sal_uInt8 aSpec[2] =
{
117, 1
};
@@ -2733,8 +2735,8 @@ void WW8Export::StoreDoc1()
SwWW8Writer::FillUntil( Strm(), pFib->fcMin );
WriteMainText(); // HauptText
- BYTE nSprmsLen;
- BYTE *pLastSprms = pPapPlc->CopyLastSprms(nSprmsLen);
+ sal_uInt8 nSprmsLen;
+ sal_uInt8 *pLastSprms = pPapPlc->CopyLastSprms(nSprmsLen);
bNeedsFinalPara |= pFtn->WriteTxt( *this ); // Footnote-Text
bNeedsFinalPara |= pSepx->WriteKFTxt( *this ); // K/F-Text
@@ -2790,7 +2792,7 @@ void MSWordExportBase::AddLinkTarget(const String& rURL)
// node index number of where it points to
if( pDoc->GotoOutline( aPos, aOutline ) )
{
- ULONG nIdx = aPos.nNode.GetIndex();
+ sal_uLong nIdx = aPos.nNode.GetIndex();
aBookmarkPair aImplicitBookmark;
aImplicitBookmark.first = aOutline;
aImplicitBookmark.second = nIdx;
@@ -2805,10 +2807,10 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc)
const SwTxtINetFmt* pTxtAttr;
const SwTxtNode* pTxtNd;
- USHORT n, nMaxItems = rDoc.GetAttrPool().GetItemCount( RES_TXTATR_INETFMT );
+ sal_uInt32 n, nMaxItems = rDoc.GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT );
for( n = 0; n < nMaxItems; ++n )
{
- if( 0 != (pINetFmt = (SwFmtINetFmt*)rDoc.GetAttrPool().GetItem(
+ if( 0 != (pINetFmt = (SwFmtINetFmt*)rDoc.GetAttrPool().GetItem2(
RES_TXTATR_INETFMT, n ) ) &&
0 != ( pTxtAttr = pINetFmt->GetTxtINetFmt()) &&
0 != ( pTxtNd = pTxtAttr->GetpTxtNode() ) &&
@@ -2819,17 +2821,17 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc)
}
const SwFmtURL *pURL;
- nMaxItems = rDoc.GetAttrPool().GetItemCount( RES_URL );
+ nMaxItems = rDoc.GetAttrPool().GetItemCount2( RES_URL );
for( n = 0; n < nMaxItems; ++n )
{
- if( 0 != (pURL = (SwFmtURL*)rDoc.GetAttrPool().GetItem(
+ if( 0 != (pURL = (SwFmtURL*)rDoc.GetAttrPool().GetItem2(
RES_URL, n ) ) )
{
AddLinkTarget( pURL->GetURL() );
const ImageMap *pIMap = pURL->GetMap();
if( pIMap )
{
- for( USHORT i=0; i<pIMap->GetIMapObjectCount(); i++ )
+ for( sal_uInt16 i=0; i<pIMap->GetIMapObjectCount(); i++ )
{
const IMapObject* pObj = pIMap->GetIMapObject( i );
if( pObj )
@@ -2844,18 +2846,18 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc)
namespace
{
- const ULONG WW_BLOCKSIZE = 0x200;
+ const sal_uLong WW_BLOCKSIZE = 0x200;
void EncryptRC4(msfilter::MSCodec_Std97& rCtx, SvStream &rIn, SvStream &rOut)
{
rIn.Seek(STREAM_SEEK_TO_END);
- ULONG nLen = rIn.Tell();
+ sal_uLong nLen = rIn.Tell();
rIn.Seek(0);
sal_uInt8 in[WW_BLOCKSIZE];
- for (ULONG nI = 0, nBlock = 0; nI < nLen; nI += WW_BLOCKSIZE, ++nBlock)
+ for (sal_uLong nI = 0, nBlock = 0; nI < nLen; nI += WW_BLOCKSIZE, ++nBlock)
{
- ULONG nBS = (nLen - nI > WW_BLOCKSIZE) ? WW_BLOCKSIZE : nLen - nI;
+ sal_uLong nBS = (nLen - nI > WW_BLOCKSIZE) ? WW_BLOCKSIZE : nLen - nI;
rIn.Read(in, nBS);
rCtx.InitCipher(nBlock);
rCtx.Encode(in, nBS, in, nBS);
@@ -2891,7 +2893,7 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
if ( !pOLEExp )
{
- UINT32 nSvxMSDffOLEConvFlags = 0;
+ sal_uInt32 nSvxMSDffOLEConvFlags = 0;
const SvtFilterOptions* pOpt = SvtFilterOptions::Get();
if ( pOpt->IsMath2MathType() )
nSvxMSDffOLEConvFlags |= OLE_STARMATH_2_MATHTYPE;
@@ -2936,20 +2938,54 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
pDoc->SetRedlineMode( (RedlineMode_t)(mnRedlineMode) );
}
-String SwWW8Writer::GetPassword()
+bool SwWW8Writer::InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec )
{
- String sUniPassword;
+ uno::Sequence< beans::NamedValue > aEncryptionData;
+
if ( mpMedium )
{
- SfxItemSet* pSet = mpMedium->GetItemSet();
+ SFX_ITEMSET_ARG( mpMedium->GetItemSet(), pEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False );
+ if ( pEncryptionDataItem && ( pEncryptionDataItem->GetValue() >>= aEncryptionData ) && !rCodec.InitCodec( aEncryptionData ) )
+ {
+ OSL_ENSURE( false, "Unexpected EncryptionData!" );
+ aEncryptionData.realloc( 0 );
+ }
+
+ if ( !aEncryptionData.getLength() )
+ {
+ // try to generate the encryption data based on password
+ SFX_ITEMSET_ARG( mpMedium->GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, sal_False );
+ if ( pPasswordItem && pPasswordItem->GetValue().Len() && pPasswordItem->GetValue().Len() <= 15 )
+ {
+ // Generate random number with a seed of time as salt.
+ TimeValue aTime;
+ osl_getSystemTime( &aTime );
+ rtlRandomPool aRandomPool = rtl_random_createPool ();
+ rtl_random_addBytes ( aRandomPool, &aTime, 8 );
- const SfxPoolItem* pPasswordItem = NULL;
- if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_PASSWORD, sal_True, &pPasswordItem ) )
- if( pPasswordItem != NULL )
- sUniPassword = ( (const SfxStringItem*)pPasswordItem )->GetValue();
+ sal_uInt8 pDocId[ 16 ];
+ rtl_random_getBytes( aRandomPool, pDocId, 16 );
+
+ rtl_random_destroyPool( aRandomPool );
+
+ sal_Unicode aPassword[16];
+ memset( aPassword, 0, sizeof( aPassword ) );
+ for ( xub_StrLen nChar = 0; nChar < pPasswordItem->GetValue().Len(); ++nChar )
+ aPassword[nChar] = pPasswordItem->GetValue().GetChar(nChar);
+
+ rCodec.InitKey( aPassword, pDocId );
+ aEncryptionData = rCodec.GetEncryptionData();
+
+ mpMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) );
+ }
+ }
+
+ if ( aEncryptionData.getLength() )
+ mpMedium->GetItemSet()->ClearItem( SID_PASSWORD );
}
- return sUniPassword;
+ // nonempty encryption data means hier that the codec was successfuly initialized
+ return ( aEncryptionData.getLength() != 0 );
}
void WW8Export::ExportDocument_Impl()
@@ -2983,8 +3019,6 @@ void WW8Export::ExportDocument_Impl()
Strm().SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- String sUniPassword( GetWriter().GetPassword() );
-
utl::TempFile aTempMain;
aTempMain.EnableKillingFile();
utl::TempFile aTempTable;
@@ -2992,13 +3026,10 @@ void WW8Export::ExportDocument_Impl()
utl::TempFile aTempData;
aTempData.EnableKillingFile();
- bool bEncrypt = false;
-
- xub_StrLen nLen = sUniPassword.Len();
- if ( nLen > 0 && nLen <= 15) // Password has been set
+ msfilter::MSCodec_Std97 aCtx;
+ bool bEncrypt = m_pWriter ? m_pWriter->InitStd97CodecUpdateMedium( aCtx ) : false;
+ if ( bEncrypt )
{
- bEncrypt =true;
-
GetWriter().SetStream(
aTempMain.GetStream( STREAM_READWRITE | STREAM_SHARE_DENYWRITE ) );
@@ -3062,24 +3093,6 @@ void WW8Export::ExportDocument_Impl()
if ( bEncrypt )
{
- // Generate random number with a seed of time as salt.
- TimeValue aTime;
- osl_getSystemTime( &aTime );
- rtlRandomPool aRandomPool = rtl_random_createPool ();
- rtl_random_addBytes ( aRandomPool, &aTime, 8 );
-
- sal_uInt8 aDocId[ 16 ] = {0};
- rtl_random_getBytes( aRandomPool, aDocId, 16 );
-
- rtl_random_destroyPool( aRandomPool );
-
- sal_Unicode aPassword[16] = {0};
- for (xub_StrLen nChar = 0; nChar < nLen; ++nChar )
- aPassword[nChar] = sUniPassword.GetChar(nChar);
-
- msfilter::MSCodec_Std97 aCtx;
- aCtx.InitKey(aPassword, aDocId);
-
SvStream *pStrmTemp, *pTableStrmTemp, *pDataStrmTemp;
pStrmTemp = &xWwStrm;
pTableStrmTemp = &xTableStrm;
@@ -3096,11 +3109,14 @@ void WW8Export::ExportDocument_Impl()
sal_uInt32 nEncType = 0x10001;
*pTableStrmTemp << nEncType;
- sal_uInt8 pSaltData[16] = {0};
- sal_uInt8 pSaltDigest[16] = {0};
- aCtx.GetEncryptKey( aDocId, pSaltData, pSaltDigest );
+ sal_uInt8 pDocId[16];
+ aCtx.GetDocId( pDocId );
+
+ sal_uInt8 pSaltData[16];
+ sal_uInt8 pSaltDigest[16];
+ aCtx.GetEncryptKey( pDocId, pSaltData, pSaltDigest );
- pTableStrmTemp->Write( aDocId, 16 );
+ pTableStrmTemp->Write( pDocId, 16 );
pTableStrmTemp->Write( pSaltData, 16 );
pTableStrmTemp->Write( pSaltDigest, 16 );
@@ -3172,15 +3188,15 @@ void WW8Export::ExportDocument_Impl()
void WW8Export::PrepareStorage()
{
- ULONG nLen;
- const BYTE* pData;
+ sal_uLong nLen;
+ const sal_uInt8* pData;
const char* pName;
- UINT32 nId1;
+ sal_uInt32 nId1;
if (bWrtWW8)
{
static const char aUserName[] = "Microsoft Word-Document";
- static const BYTE aCompObj[] =
+ static const sal_uInt8 aCompObj[] =
{
0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0x06, 0x09, 0x02, 0x00,
@@ -3206,7 +3222,7 @@ void WW8Export::PrepareStorage()
else
{
static const char aUserName[] = "Microsoft Word 6.0 Document";
- static const BYTE aCompObj[] =
+ static const sal_uInt8 aCompObj[] =
{
0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x09, 0x02, 0x00,
@@ -3261,7 +3277,7 @@ void WW8Export::PrepareStorage()
}
}
-ULONG SwWW8Writer::WriteStorage()
+sal_uLong SwWW8Writer::WriteStorage()
{
// #i34818# - update layout (if present), for SwWriteTable
ViewShell* pViewShell = NULL;
@@ -3292,16 +3308,16 @@ ULONG SwWW8Writer::WriteStorage()
return 0;
}
-ULONG SwWW8Writer::WriteMedium( SfxMedium& )
+sal_uLong SwWW8Writer::WriteMedium( SfxMedium& )
{
return WriteStorage();
}
-ULONG SwWW8Writer::Write( SwPaM& rPaM, SfxMedium& rMed,
+sal_uLong SwWW8Writer::Write( SwPaM& rPaM, SfxMedium& rMed,
const String* pFileName )
{
mpMedium = &rMed;
- ULONG nRet = StgWriter::Write( rPaM, rMed, pFileName );
+ sal_uLong nRet = StgWriter::Write( rPaM, rMed, pFileName );
mpMedium = NULL;
return nRet;
}
@@ -3372,7 +3388,7 @@ SwWW8Writer::~SwWW8Writer()
{
}
-extern "C" SAL_DLLPUBLIC_EXPORT ULONG SAL_CALL SaveOrDelMSVBAStorage_ww8( SfxObjectShell& rDoc, SotStorage& rStor, BOOL bSaveInto, const String& rStorageName )
+extern "C" SAL_DLLPUBLIC_EXPORT sal_uLong SAL_CALL SaveOrDelMSVBAStorage_ww8( SfxObjectShell& rDoc, SotStorage& rStor, sal_Bool bSaveInto, const String& rStorageName )
{
SvxImportMSVBasic aTmp( rDoc, rStor );
return aTmp.SaveOrDelMSVBAStorage( bSaveInto, rStorageName );
@@ -3384,7 +3400,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL ExportDOC( const String& rFltName,
}
-extern "C" SAL_DLLPUBLIC_EXPORT ULONG SAL_CALL GetSaveWarningOfMSVBAStorage_ww8( SfxObjectShell &rDocS )
+extern "C" SAL_DLLPUBLIC_EXPORT sal_uLong SAL_CALL GetSaveWarningOfMSVBAStorage_ww8( SfxObjectShell &rDocS )
{
return SvxImportMSVBasic::GetSaveWarningOfMSVBAStorage( rDocS );
}
@@ -3527,11 +3543,11 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
if(pNameParameter != rFieldmark.GetParameters()->end())
pNameParameter->second >>= ffname;
- ULONG nDataStt = pDataStrm->Tell();
+ sal_uLong nDataStt = pDataStrm->Tell();
pChpPlc->AppendFkpEntry(Strm().Tell());
WriteChar(0x01);
- static BYTE aArr1[] =
+ static sal_uInt8 aArr1[] =
{
0x03, 0x6a, 0,0,0,0, // sprmCPicLocation
@@ -3539,7 +3555,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
0x55, 0x08, 0x01, // sprmCFSpec
0x02, 0x08, 0x01 // sprmCFFldVanish
};
- BYTE* pDataAdr = aArr1 + 2;
+ sal_uInt8* pDataAdr = aArr1 + 2;
Set_UInt32(pDataAdr, nDataStt);
pChpPlc->AppendFkpEntry( Strm().Tell(), sizeof( aArr1 ), aArr1 );
@@ -3685,7 +3701,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
{
m_rWW8Export.WriteCR(pTmpNodeInfoInner);
- m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2,
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nStyle, 2,
m_rWW8Export.pO->Count() ); // Style #
TableInfoCell(pTmpNodeInfoInner);
m_rWW8Export.pPapPlc->AppendFkpEntry
@@ -3703,7 +3719,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
#endif
m_rWW8Export.WriteCR(pNodeInfoInner);
- m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoCell(pNodeInfoInner);
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
m_rWW8Export.pO->GetData() );
@@ -3724,7 +3740,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
{
m_rWW8Export.WriteCR(pTmpNodeInfoInner);
- m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoCell(pTmpNodeInfoInner);
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
m_rWW8Export.pO->GetData() );
@@ -3741,7 +3757,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
TableRowEnd(pNodeInfoInner->getDepth());
ShortToSVBT16(0, nStyle);
- m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoRow(pNodeInfoInner);
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
m_rWW8Export.pO->GetData() );
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 0676f51e0610..a3a42d923386 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -54,6 +54,11 @@
// einige Forward Deklarationen
class SwWW8AttrIter;
+namespace msfilter
+{
+ class MSCodec_Std97;
+}
+
class AttributeOutputBase;
class DocxAttributeOutput;
class RtfAttributeOutput;
@@ -131,7 +136,7 @@ class SvxBrushItem;
#define OLE_PREVIEW_AS_EMF //If we want to export ole2 previews as emf in ww8+
-typedef BYTE FieldFlags;
+typedef sal_uInt8 FieldFlags;
namespace nsFieldFlags // for InsertField- Method
{
const FieldFlags WRITEFIELD_START = 0x01;
@@ -148,7 +153,7 @@ enum TxtTypes //enums for TextTypes
TXT_EDN = 4, TXT_ATN = 5, TXT_TXTBOX = 6, TXT_HFTXTBOX= 7
};
-SV_DECL_VARARR( WW8Bytes, BYTE, 128, 128 )
+SV_DECL_VARARR( WW8Bytes, sal_uInt8, 128, 128 )
struct WW8_SepInfo
{
@@ -156,8 +161,8 @@ struct WW8_SepInfo
const SwSectionFmt* pSectionFmt;
const SwNode* pPDNd;
const SwTxtNode* pNumNd;
- ULONG nLnNumRestartNo;
- USHORT nPgRestartNo;
+ sal_uLong nLnNumRestartNo;
+ sal_uInt16 nPgRestartNo;
WW8_SepInfo()
: pPageDesc(0), pSectionFmt(0), pPDNd(0), pNumNd(0), nLnNumRestartNo(0), nPgRestartNo(0)
@@ -165,7 +170,7 @@ struct WW8_SepInfo
{}
WW8_SepInfo( const SwPageDesc* pPD, const SwSectionFmt* pFmt,
- ULONG nLnRestart, USHORT nPgRestart = 0, const SwNode* pNd = NULL )
+ sal_uLong nLnRestart, sal_uInt16 nPgRestart = 0, const SwNode* pNd = NULL )
: pPageDesc( pPD ), pSectionFmt( pFmt ), pPDNd( pNd ), pNumNd( 0 ),
nLnNumRestartNo( nLnRestart ), nPgRestartNo( nPgRestart )
{}
@@ -196,11 +201,11 @@ public:
void AppendSection( const SwPageDesc* pPd,
const SwSectionFmt* pSectionFmt = 0,
- ULONG nLnNumRestartNo = 0 );
+ sal_uLong nLnNumRestartNo = 0 );
void AppendSection( const SwFmtPageDesc& rPd,
const SwNode& rNd,
const SwSectionFmt* pSectionFmt,
- ULONG nLnNumRestartNo );
+ sal_uLong nLnNumRestartNo );
void SetNum( const SwTxtNode* pNumNd );
/// Number of columns based on the most recent WW8_SepInfo.
@@ -214,10 +219,10 @@ public:
/// The most recent WW8_SepInfo.
const WW8_SepInfo* CurrentSectionInfo();
- static void SetHeaderFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
- BYTE nFlag );
- static void SetFooterFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
- BYTE nFlag );
+ static void SetHeaderFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt,
+ sal_uInt8 nFlag );
+ static void SetFooterFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt,
+ sal_uInt8 nFlag );
/// Should we output borders?
static int HasBorderItem( const SwFmt& rFmt );
@@ -241,11 +246,11 @@ public:
void AppendSep( WW8_CP nStartCp,
const SwPageDesc* pPd,
const SwSectionFmt* pSectionFmt = 0,
- ULONG nLnNumRestartNo = 0 );
+ sal_uLong nLnNumRestartNo = 0 );
void AppendSep( WW8_CP nStartCp, const SwFmtPageDesc& rPd,
const SwNode& rNd,
const SwSectionFmt* pSectionFmt,
- ULONG nLnNumRestartNo );
+ sal_uLong nLnNumRestartNo );
void Finish( WW8_CP nEndCp ) { aCps.Insert( nEndCp, aCps.Count() ); }
bool WriteKFTxt( WW8Export& rWrt );
@@ -254,10 +259,10 @@ public:
void WritePlcHdd( WW8Export& rWrt ) const;
private:
- void WriteFtnEndTxt( WW8Export& rWrt, ULONG nCpStt );
+ void WriteFtnEndTxt( WW8Export& rWrt, sal_uLong nCpStt );
public:
void OutHeaderFooter(WW8Export& rWrt, bool bHeader,
- const SwFmt& rFmt, ULONG& rCpPos, BYTE nHFFlags, BYTE nFlag, BYTE nBreakCode);
+ const SwFmt& rFmt, sal_uLong& rCpPos, sal_uInt8 nHFFlags, sal_uInt8 nFlag, sal_uInt8 nBreakCode);
};
//--------------------------------------------------------------------------
@@ -275,7 +280,7 @@ public:
void WritePc( WW8Export& rWrt );
void SetParaBreak();
bool IsUnicode() const { return bIsUni; }
- WW8_CP Fc2Cp( ULONG nFc ) const;
+ WW8_CP Fc2Cp( sal_uLong nFc ) const;
};
/// Collects and outputs fonts.
@@ -284,7 +289,7 @@ class wwFont
//In some future land the stream could be converted to a nice stream interface
//and we could have harmony
private:
- BYTE maWW8_FFN[6];
+ sal_uInt8 maWW8_FFN[6];
String msFamilyNm;
String msAltNm;
bool mbAlt;
@@ -306,7 +311,7 @@ class wwFontHelper
{
private:
/// Keep track of fonts that need to be exported.
- ::std::map<wwFont, USHORT> maFonts;
+ ::std::map<wwFont, sal_uInt16> maFonts;
bool mbWrtWW8;
/// Convert from fast insertion map to linear vector in the order that we want to write.
@@ -316,25 +321,25 @@ public:
wwFontHelper() : mbWrtWW8(false), bLoadAllFonts(false) {}
/// rDoc used only to get the initial standard font(s) in use.
void InitFontTable(bool bWrtWW8, const SwDoc& rDoc);
- USHORT GetId(const Font& rFont);
- USHORT GetId(const SvxFontItem& rFont);
- USHORT GetId(const wwFont& rFont);
+ sal_uInt16 GetId(const Font& rFont);
+ sal_uInt16 GetId(const SvxFontItem& rFont);
+ sal_uInt16 GetId(const wwFont& rFont);
void WriteFontTable( SvStream *pTableStream, WW8Fib& pFib );
void WriteFontTable( const DocxAttributeOutput& rAttrOutput );
void WriteFontTable( const RtfAttributeOutput& rAttrOutput );
/// If true, all fonts are loaded before processing the document.
- BYTE bLoadAllFonts: 1;
+ sal_uInt8 bLoadAllFonts: 1;
};
class DrawObj
{
public:
WW8_CP mnCp; // CP-Pos der Verweise
- UINT32 mnShapeId; // ShapeId for the SwFrmFmts
+ sal_uInt32 mnShapeId; // ShapeId for the SwFrmFmts
sw::Frame maCntnt; // the frame itself
Point maParentPos; // Points
- INT32 mnThick; // Border Thicknesses
+ sal_Int32 mnThick; // Border Thicknesses
short mnDirection; // If BiDi or not
unsigned int mnHdFtIndex; // 0 for main text, +1 for each subsequent
// msword hd/ft
@@ -343,7 +348,7 @@ public:
unsigned int nHdFtIndex)
: mnCp(nCp), mnShapeId(0), maCntnt(rCntnt), maParentPos(aParentPos),
mnThick(0), mnDirection(nDir), mnHdFtIndex(nHdFtIndex) {}
- void SetShapeDetails(UINT32 nId, INT32 nThick);
+ void SetShapeDetails(sal_uInt32 nId, sal_Int32 nThick);
DrawObj& operator=(const DrawObj &rOther);
};
@@ -404,7 +409,7 @@ private:
HdFtPlcDrawObj& operator=(const HdFtPlcDrawObj&);
};
-typedef ::std::pair<String, ULONG> aBookmarkPair;
+typedef ::std::pair<String, sal_uLong> aBookmarkPair;
typedef std::vector<aBookmarkPair> SwImplBookmarks;
typedef std::vector<aBookmarkPair>::iterator SwImplBookmarksIter;
@@ -436,12 +441,12 @@ struct MSWordSaveData
const sw::Frame* pOldFlyFmt;
const SwPageDesc* pOldPageDesc;
- BYTE bOldWriteAll : 1; ///< WW8Export only
- BYTE bOldOutTable : 1;
- BYTE bOldIsInTable: 1;
- BYTE bOldFlyFrmAttrs : 1;
- BYTE bOldStartTOX : 1;
- BYTE bOldInWriteTOX : 1;
+ sal_uInt8 bOldWriteAll : 1; ///< WW8Export only
+ sal_uInt8 bOldOutTable : 1;
+ sal_uInt8 bOldIsInTable: 1;
+ sal_uInt8 bOldFlyFrmAttrs : 1;
+ sal_uInt8 bOldStartTOX : 1;
+ sal_uInt8 bOldInWriteTOX : 1;
// bOutPageDesc muss nicht gesichert werden, da es nur nicht waehrend der
// Ausgabe von Spezial-Texten veraendert wird.
};
@@ -451,15 +456,15 @@ class MSWordExportBase
{
public:
wwFontHelper maFontHelper;
- std::vector<ULONG> maChapterFieldLocs;
- typedef std::vector<ULONG>::const_iterator mycCFIter;
+ std::vector<sal_uLong> maChapterFieldLocs;
+ typedef std::vector<sal_uLong>::const_iterator mycCFIter;
String aMainStg;
SvPtrarr aTOXArr;
const SfxItemSet* pISet; // fuer Doppel-Attribute
WW8_WrPct* pPiece; // Pointer auf Piece-Table
SwNumRuleTbl* pUsedNumTbl; // alle used NumRules
const SwTxtNode *mpTopNodeOfHdFtPage; ///< Top node of host page when in hd/ft
- std::map< USHORT, USHORT > aRuleDuplicates; //map to Duplicated numrules
+ std::map< sal_uInt16, sal_uInt16 > aRuleDuplicates; //map to Duplicated numrules
std::stack< xub_StrLen > m_aCurrentCharPropStarts; ///< To remember the position in a run.
WW8_WrtBookmarks* pBkmks;
WW8_WrtRedlineAuthor* pRedlAuthors;
@@ -470,15 +475,15 @@ public:
WW8OleMaps* pOleMap;
ww8::WW8TableInfo::Pointer_t mpTableInfo;
- USHORT nCharFmtStart;
- USHORT nFmtCollStart;
- USHORT nStyleBeforeFly; ///< Style-Nummer des Nodes,
+ sal_uInt16 nCharFmtStart;
+ sal_uInt16 nFmtCollStart;
+ sal_uInt16 nStyleBeforeFly; ///< Style-Nummer des Nodes,
///< in/an dem ein Fly verankert ist
- USHORT nLastFmtId; ///< Style of last TxtNode in normal range
- USHORT nUniqueList; ///< current number for creating unique list names
+ sal_uInt16 nLastFmtId; ///< Style of last TxtNode in normal range
+ sal_uInt16 nUniqueList; ///< current number for creating unique list names
unsigned int mnHdFtIndex;
- USHORT mnRedlineMode; ///< Remember the original redline mode
+ sal_uInt16 mnRedlineMode; ///< Remember the original redline mode
public:
/* implicit bookmark vector containing pairs of node indexes and bookmark names */
@@ -523,27 +528,27 @@ public:
// SwTwips nFlyWidth, nFlyHeight; // Fuer Anpassung Graphic
// <--
- BYTE nTxtTyp;
+ sal_uInt8 nTxtTyp;
- BYTE bStyDef : 1; // wird Style geschrieben ?
- BYTE bBreakBefore : 1; // Breaks werden 2mal ausgegeben
- BYTE bOutKF : 1; // Kopf/Fusstexte werden ausgegeben
- BYTE bOutFlyFrmAttrs : 1; // Rahmen-Attr von Flys werden ausgegeben
- BYTE bOutPageDescs : 1; ///< PageDescs (section properties) are being written
- BYTE bOutFirstPage : 1; // write Attrset of FirstPageDesc
- BYTE bOutTable : 1; // Tabelle wird ausgegeben
+ sal_uInt8 bStyDef : 1; // wird Style geschrieben ?
+ sal_uInt8 bBreakBefore : 1; // Breaks werden 2mal ausgegeben
+ sal_uInt8 bOutKF : 1; // Kopf/Fusstexte werden ausgegeben
+ sal_uInt8 bOutFlyFrmAttrs : 1; // Rahmen-Attr von Flys werden ausgegeben
+ sal_uInt8 bOutPageDescs : 1; ///< PageDescs (section properties) are being written
+ sal_uInt8 bOutFirstPage : 1; // write Attrset of FirstPageDesc
+ sal_uInt8 bOutTable : 1; // Tabelle wird ausgegeben
// ( wird zB bei Flys in Tabelle zurueckgesetzt )
- BYTE bIsInTable : 1; // wird sind innerhalb der Ausgabe einer Tabelle
+ sal_uInt8 bIsInTable : 1; // wird sind innerhalb der Ausgabe einer Tabelle
// ( wird erst nach der Tabelle zurueckgesetzt )
- BYTE bOutGrf : 1; // Grafik wird ausgegeben
- BYTE bInWriteEscher : 1; // in write textboxes
- BYTE bStartTOX : 1; // true: a TOX is startet
- BYTE bInWriteTOX : 1; // true: all content are in a TOX
- BYTE bFtnAtTxtEnd : 1; // true: all FTN at Textend
- BYTE bEndAtTxtEnd : 1; // true: all END at Textend
- BYTE bHasHdr : 1;
- BYTE bHasFtr : 1;
- BYTE bSubstituteBullets : 1; // true: SubstituteBullet() gets called
+ sal_uInt8 bOutGrf : 1; // Grafik wird ausgegeben
+ sal_uInt8 bInWriteEscher : 1; // in write textboxes
+ sal_uInt8 bStartTOX : 1; // true: a TOX is startet
+ sal_uInt8 bInWriteTOX : 1; // true: all content are in a TOX
+ sal_uInt8 bFtnAtTxtEnd : 1; // true: all FTN at Textend
+ sal_uInt8 bEndAtTxtEnd : 1; // true: all END at Textend
+ sal_uInt8 bHasHdr : 1;
+ sal_uInt8 bHasFtr : 1;
+ sal_uInt8 bSubstituteBullets : 1; // true: SubstituteBullet() gets called
bool mbExportModeRTF;
@@ -568,47 +573,46 @@ public:
/// Set the pCurPam appropriately and call WriteText().
///
/// Used to export paragraphs in footnotes/endnotes/etc.
- void WriteSpecialText( ULONG nStart, ULONG nEnd, BYTE nTTyp );
+ void WriteSpecialText( sal_uLong nStart, sal_uLong nEnd, sal_uInt8 nTTyp );
/// Export the pool items to attributes (through an attribute output class).
- void ExportPoolItemsToCHP( sw::PoolItems &rItems, USHORT nScript );
+ void ExportPoolItemsToCHP( sw::PoolItems &rItems, sal_uInt16 nScript );
/// Return the numeric id of the numbering rule
- USHORT GetId( const SwNumRule& rNumRule );
+ sal_uInt16 GetId( const SwNumRule& rNumRule );
/// Return the numeric id of the style.
- USHORT GetId( const SwTxtFmtColl& rColl ) const;
+ sal_uInt16 GetId( const SwTxtFmtColl& rColl ) const;
/// Return the numeric id of the style.
- USHORT GetId( const SwCharFmt& rFmt ) const;
+ sal_uInt16 GetId( const SwCharFmt& rFmt ) const;
- USHORT GetId( const SwTOXType& rTOXType );
+ sal_uInt16 GetId( const SwTOXType& rTOXType );
/// Return the numeric id of the font (and add it to the font list if needed)
- USHORT GetId( const SvxFontItem& rFont)
+ sal_uInt16 GetId( const SvxFontItem& rFont)
{
return maFontHelper.GetId(rFont);
}
/// @overload
- USHORT GetId( const wwFont& rFont)
+ sal_uInt16 GetId( const wwFont& rFont)
{
return maFontHelper.GetId(rFont);
}
-
- const SfxPoolItem& GetItem( USHORT nWhich ) const;
+ const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const;
/// Find the reference.
- bool HasRefToObject( USHORT nTyp, const String* pName, USHORT nSeqNo );
+ bool HasRefToObject( sal_uInt16 nTyp, const String* pName, sal_uInt16 nSeqNo );
/// Find the bookmark name.
- String GetBookmarkName( USHORT nTyp, const String* pName, USHORT nSeqNo );
+ String GetBookmarkName( sal_uInt16 nTyp, const String* pName, sal_uInt16 nSeqNo );
/// Add a bookmark converted to a Word name.
void AppendWordBookmark( const String& rName );
/// Use OutputItem() on an item set according to the parameters.
- void OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, USHORT nScript, bool bExportParentItemSet );
+ void OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, sal_uInt16 nScript, bool bExportParentItemSet );
short GetDefaultFrameDirection( ) const;
@@ -623,7 +627,7 @@ public:
/// List is set to restart at a particular value so for export make a
/// completely new list based on this one and export that instead,
/// which duplicates words behaviour in this respect.
- USHORT DuplicateNumRule( const SwNumRule *pRule, BYTE nLevel, USHORT nVal );
+ sal_uInt16 DuplicateNumRule( const SwNumRule *pRule, sal_uInt8 nLevel, sal_uInt16 nVal );
/// Access to the attribute output class.
virtual AttributeOutputBase& AttrOutput() const = 0;
@@ -635,7 +639,7 @@ public:
virtual bool SupportsUnicode() const = 0;
/// Used to filter out attributes that can be e.g. written to .doc but not to .docx
- virtual bool ignoreAttributeForStyles( USHORT /*nWhich*/ ) const { return false; }
+ virtual bool ignoreAttributeForStyles( sal_uInt16 /*nWhich*/ ) const { return false; }
/// Guess the script (asian/western).
///
@@ -647,7 +651,7 @@ public:
///
/// In addition WW7- has only one character language identifier while WW8+
/// has two
- virtual bool CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich ) = 0;
+ virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich ) = 0;
virtual void AppendBookmarks( const SwTxtNode& rNd, xub_StrLen nAktPos, xub_StrLen nLen ) = 0;
@@ -670,7 +674,7 @@ public:
void SetCurItemSet( const SfxItemSet* pS ) { pISet = pS; }
/// Remember some of the memebers so that we can recurse in WriteText().
- virtual void SaveData( ULONG nStt, ULONG nEnd );
+ virtual void SaveData( sal_uLong nStt, sal_uLong nEnd );
/// Restore what was saved in SaveData().
virtual void RestoreData();
@@ -686,7 +690,7 @@ public:
const SwSectionFmt* GetSectionFormat( const SwNode& rNd ) const;
/// Line number of the section start.
- ULONG GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) const;
+ sal_uLong GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) const;
/// Start new section.
void OutputSectionBreaks( const SfxItemSet *pSet, const SwNode& rNd );
@@ -722,13 +726,13 @@ public:
const SwTxtNode *GetHdFtPageRoot() const { return mpTopNodeOfHdFtPage; }
/// Output the actual headers and footers.
- virtual void WriteHeadersFooters( BYTE nHeadFootFlags,
+ virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt,
- BYTE nBreakCode) = 0;
+ sal_uInt8 nBreakCode) = 0;
/// Write the field
virtual void OutputField( const SwField* pFld, ww::eField eFldType,
- const String& rFldCmd, BYTE nMode = nsFieldFlags::WRITEFIELD_ALL ) = 0;
+ const String& rFldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL ) = 0;
/// Write the data of the form field
virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) = 0;
@@ -747,9 +751,9 @@ public:
// Compute the number format for WW dates
bool GetNumberFmt(const SwField& rFld, String& rStr);
- virtual ULONG ReplaceCr( BYTE nChar ) = 0;
+ virtual sal_uLong ReplaceCr( sal_uInt8 nChar ) = 0;
- const SfxPoolItem* HasItem( USHORT nWhich ) const;
+ const SfxPoolItem* HasItem( sal_uInt16 nWhich ) const;
protected:
@@ -807,7 +811,7 @@ protected:
/// Output SwSectionNode
virtual void OutputSectionNode( const SwSectionNode& );
- virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum ) = 0;
+ virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum ) = 0;
/// Call the right (virtual) function according to the type of the item.
///
@@ -831,7 +835,7 @@ public:
// TODO move as much as possible here from WW8Export! ;-)
- static void CorrectTabStopInSet( SfxItemSet& rSet, USHORT nAbsLeft );
+ static void CorrectTabStopInSet( SfxItemSet& rSet, sal_uInt16 nAbsLeft );
private:
/// No copying.
@@ -856,8 +860,8 @@ public:
SwWW8Writer( const String& rFltName, const String& rBaseURL );
virtual ~SwWW8Writer();
- virtual ULONG WriteStorage();
- virtual ULONG WriteMedium( SfxMedium& );
+ virtual sal_uLong WriteStorage();
+ virtual sal_uLong WriteMedium( SfxMedium& );
// TODO most probably we want to be able to get these in
// MSExportFilterBase
@@ -873,20 +877,20 @@ public:
rtl_TextEncoding eCodeSet);
#endif
- static void InsUInt16( WW8Bytes& rO, UINT16 );
- static void InsUInt32( WW8Bytes& rO, UINT32 );
+ static void InsUInt16( WW8Bytes& rO, sal_uInt16 );
+ static void InsUInt32( WW8Bytes& rO, sal_uInt32 );
static void InsAsString16( WW8Bytes& rO, const String& );
static void InsAsString8( WW8Bytes& rO, const String& rStr,
rtl_TextEncoding eCodeSet );
- static ULONG FillUntil( SvStream& rStrm, ULONG nEndPos = 0 );
- static void FillCount( SvStream& rStrm, ULONG nCount );
+ static sal_uLong FillUntil( SvStream& rStrm, sal_uLong nEndPos = 0 );
+ static void FillCount( SvStream& rStrm, sal_uLong nCount );
- static void WriteShort( SvStream& rStrm, INT16 nVal ) { rStrm << nVal; }
- static void WriteShort( SvStream& rStrm, ULONG nPos, INT16 nVal );
+ static void WriteShort( SvStream& rStrm, sal_Int16 nVal ) { rStrm << nVal; }
+ static void WriteShort( SvStream& rStrm, sal_uLong nPos, sal_Int16 nVal );
- static void WriteLong( SvStream& rStrm, INT32 nVal ) { rStrm << nVal; }
- static void WriteLong( SvStream& rStrm, ULONG nPos, INT32 nVal );
+ static void WriteLong( SvStream& rStrm, sal_Int32 nVal ) { rStrm << nVal; }
+ static void WriteLong( SvStream& rStrm, sal_uLong nPos, sal_Int32 nVal );
static void WriteString16(SvStream& rStrm, const String& rStr,
bool bAddZero);
@@ -895,10 +899,10 @@ public:
static void WriteString_xstz(SvStream& rStrm, const String& rStr, bool bAddZero);
- String GetPassword();
+ bool InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec );
using StgWriter::Write;
- virtual ULONG Write( SwPaM&, SfxMedium&, const String* = 0 );
+ virtual sal_uLong Write( SwPaM&, SfxMedium&, const String* = 0 );
private:
/// No copying.
@@ -923,7 +927,7 @@ public:
WW8_WrPlcFtnEdn *pEdn; ///< Endnotes - structure to remember them, and output
WW8_WrPlcSepx* pSepx; ///< Sections/headers/footers
- BYTE bWrtWW8 : 1; ///< Write WW95 (false) or WW97 (true) file format
+ sal_uInt8 bWrtWW8 : 1; ///< Write WW95 (false) or WW97 (true) file format
protected:
SwWW8Writer *m_pWriter; ///< Pointer to the writer
@@ -947,14 +951,14 @@ private:
void WriteFkpPlcUsw();
void WriteMainText();
void StoreDoc1();
- void Out_WwNumLvl( BYTE nWwLevel );
- void BuildAnlvBulletBase( WW8_ANLV& rAnlv, BYTE*& rpCh, USHORT& rCharLen,
+ void Out_WwNumLvl( sal_uInt8 nWwLevel );
+ void BuildAnlvBulletBase( WW8_ANLV& rAnlv, sal_uInt8*& rpCh, sal_uInt16& rCharLen,
const SwNumFmt& rFmt );
- static void BuildAnlvBase( WW8_ANLV& rAnlv, BYTE*& rpCh, USHORT& rCharLen,
- const SwNumRule& rRul, const SwNumFmt& rFmt, BYTE nSwLevel );
+ static void BuildAnlvBase( WW8_ANLV& rAnlv, sal_uInt8*& rpCh, sal_uInt16& rCharLen,
+ const SwNumRule& rRul, const SwNumFmt& rFmt, sal_uInt8 nSwLevel );
void Out_BorderLine(WW8Bytes& rO, const SvxBorderLine* pLine,
- USHORT nDist, sal_uInt16 nSprmNo, bool bShadow);
+ sal_uInt16 nDist, sal_uInt16 nSprmNo, bool bShadow);
/// Output the numbering table.
virtual void WriteNumbering();
@@ -975,9 +979,9 @@ public:
/// Setup the pA's info.
virtual void SetupSectionPositions( WW8_PdAttrDesc* pA );
- void Out_SwNumLvl( BYTE nSwLevel );
+ void Out_SwNumLvl( sal_uInt8 nSwLevel );
void Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt,
- BYTE nSwLevel );
+ sal_uInt8 nSwLevel );
bool MiserableFormFieldExportHack(const SwFrmFmt& rFrmFmt);
@@ -986,7 +990,7 @@ public:
WW8OleMaps& GetOLEMap() { return *pOleMap; }
void ExportDopTypography(WW8DopTypography &rTypo);
- USHORT AddRedlineAuthor( USHORT nId );
+ sal_uInt16 AddRedlineAuthor( sal_uInt16 nId );
void WriteFtnBegin( const SwFmtFtn& rFtn, WW8Bytes* pO = 0 );
void WritePostItBegin( WW8Bytes* pO = 0 );
@@ -997,10 +1001,10 @@ public:
void OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd );
void AppendFlyInFlys(const sw::Frame& rFrmFmt, const Point& rNdTopLeft);
- void WriteOutliner(const OutlinerParaObject& rOutliner, BYTE nTyp);
- void WriteSdrTextObj(const SdrObject& rObj, BYTE nTyp);
+ void WriteOutliner(const OutlinerParaObject& rOutliner, sal_uInt8 nTyp);
+ void WriteSdrTextObj(const SdrObject& rObj, sal_uInt8 nTyp);
- UINT32 GetSdrOrdNum( const SwFrmFmt& rFmt ) const;
+ sal_uInt32 GetSdrOrdNum( const SwFrmFmt& rFmt ) const;
void CreateEscher();
void WriteEscher();
@@ -1008,7 +1012,7 @@ public:
/// Write the field
virtual void OutputField( const SwField* pFld, ww::eField eFldType,
- const String& rFldCmd, BYTE nMode = nsFieldFlags::WRITEFIELD_ALL );
+ const String& rFldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL );
void StartCommentOutput( const String& rName );
void EndCommentOutput( const String& rName );
@@ -1018,12 +1022,12 @@ public:
virtual void AppendBookmarks( const SwTxtNode& rNd, xub_StrLen nAktPos, xub_StrLen nLen );
virtual void AppendBookmark( const rtl::OUString& rName, bool bSkip = false );
- void MoveFieldMarks(ULONG nFrom, ULONG nTo);
+ void MoveFieldMarks(sal_uLong nFrom, sal_uLong nTo);
- void WriteAsStringTable(const ::std::vector<String>&, INT32& rfcSttbf,
- INT32& rlcbSttbf, USHORT nExtraLen = 0);
+ void WriteAsStringTable(const ::std::vector<String>&, sal_Int32& rfcSttbf,
+ sal_Int32& rlcbSttbf, sal_uInt16 nExtraLen = 0);
- virtual ULONG ReplaceCr( BYTE nChar );
+ virtual sal_uLong ReplaceCr( sal_uInt8 nChar );
virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t() );
void WriteChar( sal_Unicode c );
@@ -1031,11 +1035,11 @@ public:
void OutSwString(const String&, xub_StrLen nStt, xub_StrLen nLen,
bool bUnicode, rtl_TextEncoding eChrSet);
- WW8_CP Fc2Cp( ULONG nFc ) const { return pPiece->Fc2Cp( nFc ); }
+ WW8_CP Fc2Cp( sal_uLong nFc ) const { return pPiece->Fc2Cp( nFc ); }
// einige z.T. static halb-interne Funktions-Deklarationen
- void OutSprmBytes( BYTE* pBytes, USHORT nSiz )
+ void OutSprmBytes( sal_uInt8* pBytes, sal_uInt16 nSiz )
{ pO->Insert( pBytes, nSiz, pO->Count() ); }
inline bool IsUnicode() const { return pPiece->IsUnicode(); }
@@ -1051,10 +1055,10 @@ public:
void Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow);
void Out_SwFmtTableBox( WW8Bytes& rO, const SvxBoxItem * rBox );
- BYTE TransCol( const Color& rCol );
+ sal_uInt8 TransCol( const Color& rCol );
bool TransBrush(const Color& rCol, WW8_SHD& rShd);
WW8_BRC TranslateBorderLine(const SvxBorderLine& pLine,
- USHORT nDist, bool bShadow);
+ sal_uInt16 nDist, bool bShadow);
// #i77805# - new return value indicates, if an inherited outline numbering is suppressed
virtual bool DisallowInheritingOutlineNumbering(const SwFmt &rFmt);
@@ -1066,12 +1070,12 @@ public:
static long GetDTTM( const DateTime& rDT );
/// Convert the SVX numbering type to id
- static BYTE GetNumId( USHORT eNumType );
+ static sal_uInt8 GetNumId( sal_uInt16 eNumType );
/// Guess the script (asian/western).
- virtual bool CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich );
+ virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich );
- USHORT DupNumRuleWithLvlStart(const SwNumRule *pRule,BYTE nLvl,USHORT nVal);
+ sal_uInt16 DupNumRuleWithLvlStart(const SwNumRule *pRule,sal_uInt8 nLvl,sal_uInt16 nVal);
SwTwips CurrentPageWidth(SwTwips &rLeft, SwTwips &rRight) const;
@@ -1079,13 +1083,13 @@ public:
bool MiserableRTLFrmFmtHack(SwTwips &rLeft, SwTwips &rRight,
const sw::Frame &rFrmFmt);
- void InsUInt16( UINT16 n ) { SwWW8Writer::InsUInt16( *pO, n ); }
- void InsUInt32( UINT32 n ) { SwWW8Writer::InsUInt32( *pO, n ); }
+ void InsUInt16( sal_uInt16 n ) { SwWW8Writer::InsUInt16( *pO, n ); }
+ void InsUInt32( sal_uInt32 n ) { SwWW8Writer::InsUInt32( *pO, n ); }
void InsAsString16( const String& rStr )
{ SwWW8Writer::InsAsString16( *pO, rStr ); }
void InsAsString8( const String& rStr, rtl_TextEncoding eCodeSet )
{ SwWW8Writer::InsAsString8( *pO, rStr, eCodeSet ); }
- void WriteStringAsPara( const String& rTxt, USHORT nStyleId = 0 );
+ void WriteStringAsPara( const String& rTxt, sal_uInt16 nStyleId = 0 );
/// Setup the exporter.
WW8Export( SwWW8Writer *pWriter,
@@ -1114,15 +1118,15 @@ public:
SvStream& Strm() const { return m_pWriter->Strm(); }
/// Remember some of the memebers so that we can recurse in WriteText().
- virtual void SaveData( ULONG nStt, ULONG nEnd );
+ virtual void SaveData( sal_uLong nStt, sal_uLong nEnd );
/// Restore what was saved in SaveData().
virtual void RestoreData();
/// Output the actual headers and footers.
- virtual void WriteHeadersFooters( BYTE nHeadFootFlags,
+ virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt,
- BYTE nBreakCode);
+ sal_uInt8 nBreakCode);
protected:
/// Output SwGrfNode
@@ -1133,7 +1137,7 @@ protected:
virtual void OutputLinkedOLE( const rtl::OUString& );
- virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum );
+ virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum );
private:
/// No copying.
@@ -1156,8 +1160,8 @@ protected:
WW8_WrPlcSubDoc();
virtual ~WW8_WrPlcSubDoc();
- bool WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp, WW8_CP& rCount );
- void WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp, WW8_FC& rTxtStt,
+ bool WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_CP& rCount );
+ void WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_FC& rTxtStt,
sal_Int32& rTxtCnt, WW8_FC& rRefStt, sal_Int32& rRefCnt ) const;
virtual const SvULongs* GetShapeIdArr() const;
@@ -1167,13 +1171,13 @@ protected:
class WW8_WrPlcFtnEdn : public WW8_WrPlcSubDoc
{
private:
- BYTE nTyp;
+ sal_uInt8 nTyp;
//No copying
WW8_WrPlcFtnEdn(const WW8_WrPlcFtnEdn&);
WW8_WrPlcFtnEdn& operator=(WW8_WrPlcFtnEdn &);
public:
- WW8_WrPlcFtnEdn( BYTE nTTyp ) : nTyp( nTTyp ) {}
+ WW8_WrPlcFtnEdn( sal_uInt8 nTTyp ) : nTyp( nTTyp ) {}
bool WriteTxt( WW8Export& rWrt );
void WritePlc( WW8Export& rWrt ) const;
@@ -1212,7 +1216,7 @@ public:
class WW8_WrPlcTxtBoxes : public WW8_WrPlcSubDoc // Doppel-Plc fuer Textboxen
{ // Rahmen/DrawTextboxes!
private:
- BYTE nTyp;
+ sal_uInt8 nTyp;
SvULongs aShapeIds; // VARARR of ShapeIds for the SwFrmFmts
virtual const SvULongs* GetShapeIdArr() const;
@@ -1220,13 +1224,13 @@ private:
WW8_WrPlcTxtBoxes(const WW8_WrPlcTxtBoxes&);
WW8_WrPlcTxtBoxes& operator=(WW8_WrPlcTxtBoxes&);
public:
- WW8_WrPlcTxtBoxes( BYTE nTTyp ) : nTyp( nTTyp ) {}
+ WW8_WrPlcTxtBoxes( sal_uInt8 nTTyp ) : nTyp( nTTyp ) {}
bool WriteTxt( WW8Export& rWrt );
void WritePlc( WW8Export& rWrt ) const;
- void Append( const SdrObject& rObj, UINT32 nShapeId );
- USHORT Count() const { return aCntnt.Count(); }
- USHORT GetPos( const VoidPtr& p ) const { return aCntnt.GetPos( p ); }
+ void Append( const SdrObject& rObj, sal_uInt32 nShapeId );
+ sal_uInt16 Count() const { return aCntnt.Count(); }
+ sal_uInt16 GetPos( const VoidPtr& p ) const { return aCntnt.GetPos( p ); }
};
typedef WW8_WrFkp* WW8_FkpPtr; // Plc fuer Chpx und Papx ( incl PN-Plc )
@@ -1237,10 +1241,10 @@ class WW8_WrPlcPn // Plc fuer Page Numbers
private:
WW8Export& rWrt;
WW8_WrFkpPtrs aFkps; // PTRARR
- USHORT nFkpStartPage;
+ sal_uInt16 nFkpStartPage;
ePLCFT ePlc;
bool bWrtWW8; // Fuer Writererkennung
- USHORT nMark;
+ sal_uInt16 nMark;
//No copying
WW8_WrPlcPn(const WW8_WrPlcPn&);
@@ -1248,10 +1252,10 @@ private:
public:
WW8_WrPlcPn( WW8Export& rWrt, ePLCFT ePl, WW8_FC nStartFc );
~WW8_WrPlcPn();
- void AppendFkpEntry(WW8_FC nEndFc,short nVarLen = 0,const BYTE* pSprms = 0);
+ void AppendFkpEntry(WW8_FC nEndFc,short nVarLen = 0,const sal_uInt8* pSprms = 0);
void WriteFkps();
void WritePlc();
- BYTE *CopyLastSprms(BYTE &rLen);
+ sal_uInt8 *CopyLastSprms(sal_uInt8 &rLen);
};
// class WW8_WrPlc1 ist erstmal nur fuer Felder
@@ -1259,41 +1263,41 @@ class WW8_WrPlc1
{
private:
SvULongs aPos; // PTRARR von CPs
- BYTE* pData; // Inhalte ( Strukturen )
- ULONG nDataLen;
- USHORT nStructSiz;
+ sal_uInt8* pData; // Inhalte ( Strukturen )
+ sal_uLong nDataLen;
+ sal_uInt16 nStructSiz;
//No copying
WW8_WrPlc1(const WW8_WrPlc1&);
WW8_WrPlc1& operator=(const WW8_WrPlc1&);
protected:
- USHORT Count() const { return aPos.Count(); }
+ sal_uInt16 Count() const { return aPos.Count(); }
void Write( SvStream& rStrm );
WW8_CP Prev() const;
public:
- WW8_WrPlc1( USHORT nStructSz );
+ WW8_WrPlc1( sal_uInt16 nStructSz );
~WW8_WrPlc1();
void Append( WW8_CP nCp, const void* pData );
- void Finish( ULONG nLastCp, ULONG nStartCp );
+ void Finish( sal_uLong nLastCp, sal_uLong nStartCp );
};
// class WW8_WrPlcFld ist fuer Felder
class WW8_WrPlcFld : public WW8_WrPlc1
{
private:
- BYTE nTxtTyp;
- USHORT nResults;
+ sal_uInt8 nTxtTyp;
+ sal_uInt16 nResults;
//No copying
WW8_WrPlcFld(const WW8_WrPlcFld&);
WW8_WrPlcFld& operator=(const WW8_WrPlcFld&);
public:
- WW8_WrPlcFld( USHORT nStructSz, BYTE nTTyp )
+ WW8_WrPlcFld( sal_uInt16 nStructSz, sal_uInt8 nTTyp )
: WW8_WrPlc1( nStructSz ), nTxtTyp( nTTyp ), nResults(0)
{}
bool Write( WW8Export& rWrt );
void ResultAdded() { ++nResults; }
- USHORT ResultCount() const { return nResults; }
+ sal_uInt16 ResultCount() const { return nResults; }
};
class WW8_WrMagicTable : public WW8_WrPlc1
@@ -1304,7 +1308,7 @@ private:
WW8_WrMagicTable& operator=(const WW8_WrMagicTable&);
public:
WW8_WrMagicTable() : WW8_WrPlc1( 4 ) {Append(0,0);}
- void Append( WW8_CP nCp, ULONG nData );
+ void Append( WW8_CP nCp, sal_uLong nData );
bool Write( WW8Export& rWrt );
};
@@ -1312,11 +1316,11 @@ class GraphicDetails
{
public:
sw::Frame maFly; // Umgebende FlyFrms dazu
- ULONG mnPos; // FilePos der Grafiken
- UINT16 mnWid; // Breite der Grafiken
- UINT16 mnHei; // Hoehe der Grafiken
+ sal_uLong mnPos; // FilePos der Grafiken
+ sal_uInt16 mnWid; // Breite der Grafiken
+ sal_uInt16 mnHei; // Hoehe der Grafiken
- GraphicDetails(const sw::Frame &rFly, UINT16 nWid, UINT16 nHei)
+ GraphicDetails(const sw::Frame &rFly, sal_uInt16 nWid, sal_uInt16 nHei)
: maFly(rFly), mnPos(0), mnWid(nWid), mnHei(nHei)
{}
GraphicDetails& operator=(const GraphicDetails& rOther);
@@ -1339,14 +1343,14 @@ private:
std::vector<GraphicDetails> maDetails;
typedef std::vector<GraphicDetails>::iterator myiter;
- USHORT mnIdx; // Index in File-Positionen
+ sal_uInt16 mnIdx; // Index in File-Positionen
void WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
- UINT16 mm, UINT16 nWidth, UINT16 nHeight,
+ sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight,
const SwAttrSet* pAttrSet = 0);
void WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem);
void WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rNd,
- const sw::Frame &rFly, UINT16 nWidth, UINT16 nHeight);
+ const sw::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight);
//No copying
SwWW8WrGrf(const SwWW8WrGrf&);
@@ -1355,7 +1359,7 @@ public:
SwWW8WrGrf( WW8Export& rW ) : rWrt( rW ), mnIdx( 0 ) {}
void Insert(const sw::Frame &rFly);
void Write();
- ULONG GetFPos()
+ sal_uLong GetFPos()
{ return (mnIdx < maDetails.size()) ? maDetails[mnIdx++].mnPos : 0; }
};
@@ -1376,8 +1380,8 @@ public:
MSWordAttrIter( MSWordExportBase& rExport );
virtual ~MSWordAttrIter();
- virtual const SfxPoolItem* HasTextItem( USHORT nWhich ) const = 0;
- virtual const SfxPoolItem& GetItem( USHORT nWhich ) const = 0;
+ virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const = 0;
+ virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const = 0;
};
/// Used to export formatted text associated to drawings.
@@ -1389,12 +1393,12 @@ private:
EECharAttribArray aTxtAtrArr;
SvPtrarr aChrTxtAtrArr;
SvUShorts aChrSetArr;
- USHORT nPara;
+ sal_uInt16 nPara;
xub_StrLen nAktSwPos;
xub_StrLen nTmpSwPos; // for HasItem()
rtl_TextEncoding eNdChrSet;
- USHORT nScript;
- BYTE mnTyp;
+ sal_uInt16 nScript;
+ sal_uInt8 mnTyp;
xub_StrLen SearchNext( xub_StrLen nStartPos );
void SetCharSet(const EECharAttrib& rTxtAttr, bool bStart);
@@ -1404,8 +1408,8 @@ private:
MSWord_SdrAttrIter& operator=(const MSWord_SdrAttrIter&);
public:
MSWord_SdrAttrIter( MSWordExportBase& rWr, const EditTextObject& rEditObj,
- BYTE nType );
- void NextPara( USHORT nPar );
+ sal_uInt8 nType );
+ void NextPara( sal_uInt16 nPar );
void OutParaAttr(bool bCharAttr);
void OutEEField(const SfxPoolItem& rHt);
@@ -1414,8 +1418,8 @@ public:
void NextPos() { if ( nAktSwPos < STRING_NOTFOUND ) nAktSwPos = SearchNext( nAktSwPos + 1 ); }
void OutAttr( xub_StrLen nSwPos );
- virtual const SfxPoolItem* HasTextItem( USHORT nWhich ) const;
- virtual const SfxPoolItem& GetItem( USHORT nWhich ) const;
+ virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const;
+ virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const;
bool OutAttrWithRange(xub_StrLen nPos);
xub_StrLen WhereNext() const { return nAktSwPos; }
rtl_TextEncoding GetNextCharSet() const;
@@ -1445,7 +1449,7 @@ private:
const SwRedline* pCurRedline;
xub_StrLen nAktSwPos;
- USHORT nCurRedlinePos;
+ sal_uInt16 nCurRedlinePos;
bool mbParaIsRTL;
@@ -1475,8 +1479,8 @@ public:
void NextPos() { if ( nAktSwPos < STRING_NOTFOUND ) nAktSwPos = SearchNext( nAktSwPos + 1 ); }
void OutAttr( xub_StrLen nSwPos, bool bRuby = false );
- virtual const SfxPoolItem* HasTextItem( USHORT nWhich ) const;
- virtual const SfxPoolItem& GetItem( USHORT nWhich ) const;
+ virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const;
+ virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const;
int OutAttrWithRange(xub_StrLen nPos);
const SwRedlineData* GetRedline( xub_StrLen nPos );
void OutFlys(xub_StrLen nSwPos);
@@ -1496,26 +1500,26 @@ class MSWordStyles
{
MSWordExportBase& m_rExport;
SwFmt** pFmtA;
- USHORT nUsedSlots;
+ sal_uInt16 nUsedSlots;
/// Create the style table, called from the constructor.
void BuildStylesTable();
/// Get slot number during building the style table.
- USHORT BuildGetSlot( const SwFmt& rFmt );
+ sal_uInt16 BuildGetSlot( const SwFmt& rFmt );
/// Return information about one style.
- void GetStyleData( SwFmt* pFmt, bool& bFmtColl, USHORT& nBase, USHORT& nNext );
+ void GetStyleData( SwFmt* pFmt, bool& bFmtColl, sal_uInt16& nBase, sal_uInt16& nNext );
/// Outputs attributes of one style.
- void WriteProperties( const SwFmt* pFmt, bool bPap, USHORT nPos, bool bInsDefCharSiz );
+ void WriteProperties( const SwFmt* pFmt, bool bPap, sal_uInt16 nPos, bool bInsDefCharSiz );
- USHORT GetWWId( const SwFmt& rFmt ) const;
+ sal_uInt16 GetWWId( const SwFmt& rFmt ) const;
void SetStyleDefaults( const SwFmt& rFmt, bool bPap );
/// Outputs one style - called (in a loop) from OutputStylesTable().
- void OutputStyle( SwFmt* pFmt, USHORT nPos );
+ void OutputStyle( SwFmt* pFmt, sal_uInt16 nPos );
// No copying
MSWordStyles( const MSWordStyles& );
@@ -1529,7 +1533,7 @@ public:
void OutputStylesTable();
/// Get id of the style (rFmt).
- USHORT GetSlot( const SwFmt& rFmt ) const;
+ sal_uInt16 GetSlot( const SwFmt& rFmt ) const;
SwFmt* GetSwFmt() { return (*pFmtA); }
};
@@ -1558,8 +1562,8 @@ public:
/// For the output of sections.
struct WW8_PdAttrDesc
{
- BYTE* pData;
- USHORT nLen;
+ sal_uInt8* pData;
+ sal_uInt16 nLen;
WW8_FC nSepxFcPos;
};
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index ef45bbedaf8c..e5898a607300 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -89,7 +89,7 @@ using namespace nsFieldFlags;
// 5. Die MapModes, die Win nicht kann, umrechnen
// OutGrf() wird fuer jeden GrafNode im Doc gerufen. Es wird ein PicLocFc-Sprm
-// eingefuegt, der statt Adresse ein Magic ULONG enthaelt. Ausserdem wird
+// eingefuegt, der statt Adresse ein Magic sal_uLong enthaelt. Ausserdem wird
// in der Graf-Klasse der GrfNode-Ptr gemerkt ( fuers spaetere Ausgeben der
// Grafiken und Patchen der PicLocFc-Attribute )
@@ -212,15 +212,15 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet,
void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
{
OSL_TRACE("WW8Export::OutputOLENode( const SwOLENode& rOLENode )\n" );
- BYTE *pSpecOLE;
- BYTE *pDataAdr;
+ sal_uInt8 *pSpecOLE;
+ sal_uInt8 *pDataAdr;
short nSize;
- static BYTE aSpecOLE_WW8[] = {
+ static sal_uInt8 aSpecOLE_WW8[] = {
0x03, 0x6a, 0, 0, 0, 0, // sprmCPicLocation
0x0a, 0x08, 1, // sprmCFOLE2
0x56, 0x08, 1 // sprmCFObj
};
- static BYTE aSpecOLE_WW6[] = {
+ static sal_uInt8 aSpecOLE_WW6[] = {
68, 4, 0, 0, 0, 0, // sprmCPicLocation (len is 4)
75, 1, // sprmCFOLE2
118, 1 // sprmCFObj
@@ -254,7 +254,7 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
WW8OleMap *pMap = new WW8OleMap(nPictureId);
bool bDuplicate = false;
WW8OleMaps &rOleMap = GetOLEMap();
- USHORT nPos;
+ sal_uInt16 nPos;
if ( rOleMap.Seek_Entry(pMap, &nPos) )
{
bDuplicate = true;
@@ -283,7 +283,7 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
::rtl::OUString aObjInfo( RTL_CONSTASCII_USTRINGPARAM( "\3ObjInfo" ) );
if ( !xOleStg->IsStream( aObjInfo ) )
{
- const BYTE pObjInfoData[] = { 0x40, 0x00, 0x03, 0x00 };
+ const sal_uInt8 pObjInfoData[] = { 0x40, 0x00, 0x03, 0x00 };
SvStorageStreamRef rObjInfoStream = xOleStg->OpenSotStream( aObjInfo );
if ( rObjInfoStream.Is() && !rObjInfoStream->GetError() )
{
@@ -431,8 +431,8 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
WriteChar( (char)1 ); // Grafik-Sonderzeichen in Haupttext einfuegen
- BYTE aArr[ 18 ];
- BYTE* pArr = aArr;
+ sal_uInt8 aArr[ 18 ];
+ sal_uInt8* pArr = aArr;
const SwFrmFmt &rFlyFmt = rFrame.GetFrmFmt();
const RndStdIds eAn = rFlyFmt.GetAttrSet().GetAnchor(false).GetAnchorId();
@@ -463,7 +463,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
Set_UInt16( pArr, NS_sprm::LN_CHpsPos );
else
Set_UInt8( pArr, 101 );
- Set_UInt16( pArr, -((INT16)nHeight));
+ Set_UInt16( pArr, -((sal_Int16)nHeight));
}
}
}
@@ -487,7 +487,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
// Magic variieren, damit verschiedene Grafik-Attribute nicht
// gemerged werden
- static BYTE nAttrMagicIdx = 0;
+ static sal_uInt8 nAttrMagicIdx = 0;
--pArr;
Set_UInt8( pArr, nAttrMagicIdx++ );
pChpPlc->AppendFkpEntry( Strm().Tell(), static_cast< short >(pArr - aArr), aArr );
@@ -503,7 +503,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
{
WriteChar( (char)0x0d ); // umgebenden Rahmen mit CR abschliessen
- static BYTE const nSty[2] = { 0, 0 };
+ static sal_uInt8 nSty[2] = { 0, 0 };
pO->Insert( nSty, 2, pO->Count() ); // Style #0
bool bOldGrf = bOutGrf;
bOutGrf = true;
@@ -535,16 +535,16 @@ GraphicDetails& GraphicDetails::operator=(const GraphicDetails &rOther)
void SwWW8WrGrf::Insert(const sw::Frame &rFly)
{
const Size aSize( rFly.GetLayoutSize() );
- const UINT16 nWidth = static_cast< UINT16 >(aSize.Width());
- const UINT16 nHeight = static_cast< UINT16 >(aSize.Height());
+ const sal_uInt16 nWidth = static_cast< sal_uInt16 >(aSize.Width());
+ const sal_uInt16 nHeight = static_cast< sal_uInt16 >(aSize.Height());
maDetails.push_back(GraphicDetails(rFly, nWidth, nHeight));
}
void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
- UINT16 mm, UINT16 nWidth, UINT16 nHeight, const SwAttrSet* pAttrSet)
+ sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight, const SwAttrSet* pAttrSet)
{
- INT16 nXSizeAdd = 0, nYSizeAdd = 0;
- INT16 nCropL = 0, nCropR = 0, nCropT = 0, nCropB = 0;
+ sal_Int16 nXSizeAdd = 0, nYSizeAdd = 0;
+ sal_Int16 nCropL = 0, nCropR = 0, nCropT = 0, nCropB = 0;
// Crop-AttributInhalt in Header schreiben ( falls vorhanden )
const SfxPoolItem* pItem;
@@ -552,21 +552,21 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
== pAttrSet->GetItemState(RES_GRFATR_CROPGRF, false, &pItem)))
{
const SwCropGrf& rCr = *(SwCropGrf*)pItem;
- nCropL = (INT16)rCr.GetLeft();
- nCropR = (INT16)rCr.GetRight();
- nCropT = (INT16)rCr.GetTop();
- nCropB = (INT16)rCr.GetBottom();
- nXSizeAdd = nXSizeAdd - (INT16)( rCr.GetLeft() + rCr.GetRight() );
- nYSizeAdd = nYSizeAdd - (INT16)( rCr.GetTop() + rCr.GetBottom() );
+ nCropL = (sal_Int16)rCr.GetLeft();
+ nCropR = (sal_Int16)rCr.GetRight();
+ nCropT = (sal_Int16)rCr.GetTop();
+ nCropB = (sal_Int16)rCr.GetBottom();
+ nXSizeAdd = nXSizeAdd - (sal_Int16)( rCr.GetLeft() + rCr.GetRight() );
+ nYSizeAdd = nYSizeAdd - (sal_Int16)( rCr.GetTop() + rCr.GetBottom() );
}
Size aGrTwipSz(rFly.GetSize());
bool bWrtWW8 = rWrt.bWrtWW8;
- UINT16 nHdrLen = bWrtWW8 ? 0x44 : 0x3A;
+ sal_uInt16 nHdrLen = bWrtWW8 ? 0x44 : 0x3A;
- BYTE aArr[ 0x44 ] = { 0 };
+ sal_uInt8 aArr[ 0x44 ] = { 0 };
- BYTE* pArr = aArr + 0x2E; //Do borders first
+ sal_uInt8* pArr = aArr + 0x2E; //Do borders first
const SwAttrSet& rAttrSet = rFly.GetFrmFmt().GetAttrSet();
if (SFX_ITEM_ON == rAttrSet.GetItemState(RES_BOX, false, &pItem))
@@ -583,9 +583,9 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
(pSI->GetWidth() != 0);
}
- BYTE aLnArr[4] = { BOX_LINE_TOP, BOX_LINE_LEFT,
+ sal_uInt8 aLnArr[4] = { BOX_LINE_TOP, BOX_LINE_LEFT,
BOX_LINE_BOTTOM, BOX_LINE_RIGHT };
- for( BYTE i = 0; i < 4; ++i )
+ for( sal_uInt8 i = 0; i < 4; ++i )
{
const SvxBorderLine* pLn = pBox->GetLine( aLnArr[ i ] );
WW8_BRC aBrc;
@@ -655,7 +655,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
if( aGrTwipSz.Width() + nXSizeAdd ) // set mx
{
double fVal = nWidth * 1000.0 / (aGrTwipSz.Width() + nXSizeAdd);
- Set_UInt16( pArr, (USHORT)::rtl::math::round(fVal) );
+ Set_UInt16( pArr, (sal_uInt16)::rtl::math::round(fVal) );
}
else
pArr += 2;
@@ -663,7 +663,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
if( aGrTwipSz.Height() + nYSizeAdd ) // set my
{
double fVal = nHeight * 1000.0 / (aGrTwipSz.Height() + nYSizeAdd);
- Set_UInt16( pArr, (USHORT)::rtl::math::round(fVal) );
+ Set_UInt16( pArr, (sal_uInt16)::rtl::math::round(fVal) );
}
else
pArr += 2;
@@ -677,18 +677,18 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
}
void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd,
- const sw::Frame &rFly, UINT16 nWidth, UINT16 nHeight)
+ const sw::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight)
{
if (rGrfNd.IsLinkedFile()) // Linked File
{
String aFileN;
rGrfNd.GetFileFilterNms( &aFileN, 0 );
- UINT16 mm = 94; // 94 = BMP, GIF
+ sal_uInt16 mm = 94; // 94 = BMP, GIF
WritePICFHeader(rStrm, rFly, mm, nWidth, nHeight,
rGrfNd.GetpSwAttrSet());
- rStrm << (BYTE)aFileN.Len(); // Pascal-String schreiben
+ rStrm << (sal_uInt8)aFileN.Len(); // Pascal-String schreiben
SwWW8Writer::WriteString8(rStrm, aFileN, false,
RTL_TEXTENCODING_MS_1252);
}
@@ -742,9 +742,9 @@ void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd,
void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
{
- UINT16 nWidth = rItem.mnWid;
- UINT16 nHeight = rItem.mnHei;
- UINT32 nPos = rStrm.Tell(); // Grafik-Anfang merken
+ sal_uInt16 nWidth = rItem.mnWid;
+ sal_uInt16 nHeight = rItem.mnHei;
+ sal_uInt32 nPos = rStrm.Tell(); // Grafik-Anfang merken
const sw::Frame &rFly = rItem.maFly;
switch (rFly.GetWriterType())
@@ -858,7 +858,7 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
break;
}
- UINT32 nPos2 = rStrm.Tell(); // Ende merken
+ sal_uInt32 nPos2 = rStrm.Tell(); // Ende merken
rStrm.Seek( nPos );
SVBT32 nLen;
UInt32ToSVBT32( nPos2 - nPos, nLen ); // Grafik-Laenge ausrechnen
@@ -870,7 +870,7 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
// Grafiken raus und merkt sich die File-Positionen der Grafiken, damit
// beim Schreiben der Attribute die Positionen in die PicLocFc-Sprms
// eingepatcht werden koennen.
-// Das Suchen in den Attributen nach dem Magic ULONG und das Patchen
+// Das Suchen in den Attributen nach dem Magic sal_uLong und das Patchen
// passiert beim Schreiben der Attribute. Die SwWW8WrGrf-Klasse liefert
// hierfuer nur mit GetFPos() sequentiell die Positionen.
void SwWW8WrGrf::Write()
@@ -879,7 +879,7 @@ void SwWW8WrGrf::Write()
myiter aEnd = maDetails.end();
for (myiter aIter = maDetails.begin(); aIter != aEnd; ++aIter)
{
- UINT32 nPos = rStrm.Tell(); // auf 4 Bytes alignen
+ sal_uInt32 nPos = rStrm.Tell(); // auf 4 Bytes alignen
if( nPos & 0x3 )
SwWW8Writer::FillCount( rStrm, 4 - ( nPos & 0x3 ) );
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 981e9f054119..266104d592bc 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -166,7 +166,7 @@ using namespace nsSwDocInfoSubType;
using namespace sw::util;
using namespace sw::types;
-bool WW8Export::CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich )
+bool WW8Export::CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich )
{
bool bRet = true;
if ( nScript == i18n::ScriptType::ASIAN )
@@ -252,13 +252,13 @@ bool WW8Export::CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich )
// Hilfsroutinen fuer Styles
//------------------------------------------------------------
-void MSWordExportBase::ExportPoolItemsToCHP( sw::PoolItems &rItems, USHORT nScript )
+void MSWordExportBase::ExportPoolItemsToCHP( sw::PoolItems &rItems, sal_uInt16 nScript )
{
sw::cPoolItemIter aEnd = rItems.end();
for ( sw::cPoolItemIter aI = rItems.begin(); aI != aEnd; ++aI )
{
const SfxPoolItem *pItem = aI->second;
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if ( ( isCHRATR( nWhich ) || isTXTATR( nWhich ) ) && CollapseScriptsforWordOk( nScript, nWhich ) )
{
AttrOutput().OutputItem( *pItem );
@@ -271,7 +271,7 @@ void MSWordExportBase::ExportPoolItemsToCHP( sw::PoolItems &rItems, USHORT nScri
* - gebe die Attribute aus; ohne Parents!
*/
-void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, USHORT nScript,
+void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, sal_uInt16 nScript,
bool bExportParentItemSet )
{
if( bExportParentItemSet || rSet.Count() )
@@ -318,7 +318,7 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool
for ( sw::cPoolItemIter aI = aItems.begin(); aI != aEnd; ++aI )
{
pItem = aI->second;
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if ( nWhich >= RES_PARATR_BEGIN && nWhich < RES_FRMATR_END && nWhich != RES_PARATR_NUMRULE)
AttrOutput().OutputItem( *pItem );
}
@@ -351,8 +351,8 @@ bool MSWordExportBase::CntntContainsChapterField(const SwFmtCntnt &rCntnt) const
{
SwNodeIndex aIdx( *pSttIdx, 1 );
SwNodeIndex aEnd( *pSttIdx->GetNode().EndOfSectionNode() );
- ULONG nStart = aIdx.GetIndex();
- ULONG nEnd = aEnd.GetIndex();
+ sal_uLong nStart = aIdx.GetIndex();
+ sal_uLong nEnd = aEnd.GetIndex();
//If the header/footer contains a chapter field
mycCFIter aIEnd = maChapterFieldLocs.end();
for ( mycCFIter aI = maChapterFieldLocs.begin(); aI != aIEnd; ++aI )
@@ -573,7 +573,7 @@ const SwSectionFmt* MSWordExportBase::GetSectionFormat( const SwNode& rNd ) cons
return pFmt;
}
-ULONG MSWordExportBase::GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) const
+sal_uLong MSWordExportBase::GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) const
{
const SwFmtLineNumber* pNItem = 0;
if ( pSet )
@@ -598,7 +598,7 @@ void WW8Export::PrepareNewPageDesc( const SfxItemSet*pSet,
// Aufbauen und die Ausgabe der am PageDesc haengenden Attribute und
// Kopf/Fusszeilen passiert nach dem Haupttext und seinen Attributen.
- ULONG nFcPos = ReplaceCr( msword::PageBreak ); // Page/Section-Break
+ sal_uLong nFcPos = ReplaceCr( msword::PageBreak ); // Page/Section-Break
// tatsaechlich wird hier NOCH NICHTS ausgegeben, sondern
// nur die Merk-Arrays aCps, aSects entsprechend ergaenzt
@@ -606,7 +606,7 @@ void WW8Export::PrepareNewPageDesc( const SfxItemSet*pSet,
return;
const SwSectionFmt* pFmt = GetSectionFormat( rNd );
- const ULONG nLnNm = GetSectionLineNo( pSet, rNd );
+ const sal_uLong nLnNm = GetSectionLineNo( pSet, rNd );
OSL_ENSURE( pNewPgDescFmt || pNewPgDesc, "Neither page desc format nor page desc provided." );
@@ -620,7 +620,7 @@ void WW8Export::PrepareNewPageDesc( const SfxItemSet*pSet,
}
}
-void MSWordExportBase::CorrectTabStopInSet( SfxItemSet& rSet, USHORT nAbsLeft )
+void MSWordExportBase::CorrectTabStopInSet( SfxItemSet& rSet, sal_uInt16 nAbsLeft )
{
const SvxTabStopItem *pItem =
sw::util::HasItem<SvxTabStopItem>( rSet, RES_PARATR_TABSTOP );
@@ -629,7 +629,7 @@ void MSWordExportBase::CorrectTabStopInSet( SfxItemSet& rSet, USHORT nAbsLeft )
{
// dann muss das fuer die Ausgabe korrigiert werden
SvxTabStopItem aTStop(*pItem);
- for ( USHORT nCnt = 0; nCnt < aTStop.Count(); ++nCnt )
+ for ( sal_uInt16 nCnt = 0; nCnt < aTStop.Count(); ++nCnt )
{
SvxTabStop& rTab = (SvxTabStop&)aTStop[ nCnt ];
if ( SVX_TAB_ADJUST_DEFAULT != rTab.GetAdjustment() &&
@@ -647,9 +647,9 @@ void MSWordExportBase::CorrectTabStopInSet( SfxItemSet& rSet, USHORT nAbsLeft )
}
}
-BYTE WW8Export::GetNumId( USHORT eNumType )
+sal_uInt8 WW8Export::GetNumId( sal_uInt16 eNumType )
{
- BYTE nRet = 0;
+ sal_uInt8 nRet = 0;
switch( eNumType )
{
case SVX_NUM_CHARS_UPPER_LETTER:
@@ -668,7 +668,7 @@ BYTE WW8Export::GetNumId( USHORT eNumType )
return nRet;
}
-void WW8AttributeOutput::OutlineNumbering( BYTE nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt )
+void WW8AttributeOutput::OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt )
{
if ( nLvl >= WW8ListManager::nMaxLevel )
nLvl = WW8ListManager::nMaxLevel-1;
@@ -726,7 +726,7 @@ bool WW8Export::DisallowInheritingOutlineNumbering(const SwFmt &rFmt)
if (bWrtWW8)
{
SwWW8Writer::InsUInt16(*pO, NS_sprm::LN_POutLvl);
- pO->Insert(BYTE(9), pO->Count());
+ pO->Insert(sal_uInt8(9), pO->Count());
SwWW8Writer::InsUInt16(*pO, NS_sprm::LN_PIlfo);
SwWW8Writer::InsUInt16(*pO, 0);
@@ -759,9 +759,9 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF
//if outline numbered
// if Write StyleDefinition then write the OutlineRule
- const SwNumFmt& rNFmt = pDoc->GetOutlineNumRule()->Get( static_cast<USHORT>( nLvl ) );
+ const SwNumFmt& rNFmt = pDoc->GetOutlineNumRule()->Get( static_cast<sal_uInt16>( nLvl ) );
if ( bStyDef )
- AttrOutput().OutlineNumbering( static_cast< BYTE >( nLvl ), rNFmt, rFmt );
+ AttrOutput().OutlineNumbering( static_cast< sal_uInt8 >( nLvl ), rNFmt, rFmt );
if ( rNFmt.GetPositionAndSpaceMode() ==
SvxNumberFormat::LABEL_WIDTH_AND_POSITION &&
@@ -853,7 +853,7 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF
pOutFmtNode = pOldMod;
}
-bool MSWordExportBase::HasRefToObject( USHORT nTyp, const String* pName, USHORT nSeqNo )
+bool MSWordExportBase::HasRefToObject( sal_uInt16 nTyp, const String* pName, sal_uInt16 nSeqNo )
{
const SwTxtNode* pNd;
SwClientIter aIter( *pDoc->GetSysFldType( RES_GETREFFLD ) );
@@ -889,7 +889,7 @@ bool MSWordExportBase::HasRefToObject( USHORT nTyp, const String* pName, USHORT
return false;
}
-String MSWordExportBase::GetBookmarkName( USHORT nTyp, const String* pName, USHORT nSeqNo )
+String MSWordExportBase::GetBookmarkName( sal_uInt16 nTyp, const String* pName, sal_uInt16 nSeqNo )
{
String sRet;
switch ( nTyp )
@@ -929,14 +929,14 @@ void WW8AttributeOutput::RTLAndCJKState( bool bIsRTL, sal_uInt16 nScript )
if ( m_rWW8Export.bWrtWW8 && bIsRTL )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_CFBiDi );
- m_rWW8Export.pO->Insert( (BYTE)1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)1, m_rWW8Export.pO->Count() );
}
// #i46087# patch from james_clark; complex texts needs the undocumented SPRM CComplexScript with param 0x81.
if ( m_rWW8Export.bWrtWW8 && nScript == i18n::ScriptType::COMPLEX && !bIsRTL )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_CComplexScript );
- m_rWW8Export.pO->Insert( (BYTE)0x81, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x81, m_rWW8Export.pO->Count() );
m_rWW8Export.pDop->bUseThaiLineBreakingRules = true;
}
}
@@ -954,7 +954,7 @@ void WW8AttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTe
SVBT16 nSty;
ShortToSVBT16( 0, nSty );
- m_rWW8Export.pO->Insert( (BYTE*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoRow( pTextNodeInfoInner );
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
m_rWW8Export.pO->GetData() );
@@ -992,7 +992,7 @@ void WW8AttributeOutput::EndRunProperties( const SwRedlineData* pRedlineData )
Redline( pRedlineData );
WW8_WrPlcFld* pCurrentFields = m_rWW8Export.CurrentFieldPlc();
- USHORT nNewFieldResults = pCurrentFields ? pCurrentFields->ResultCount() : 0;
+ sal_uInt16 nNewFieldResults = pCurrentFields ? pCurrentFields->ResultCount() : 0;
bool bExportedFieldResult = ( m_nFieldResults != nNewFieldResults );
@@ -1028,16 +1028,16 @@ void WW8AttributeOutput::OutputFKP()
}
}
-void WW8AttributeOutput::ParagraphStyle( USHORT nStyle )
+void WW8AttributeOutput::ParagraphStyle( sal_uInt16 nStyle )
{
OSL_ENSURE( !m_rWW8Export.pO->Count(), " pO ist am ZeilenEnde nicht leer" );
SVBT16 nSty;
ShortToSVBT16( nStyle, nSty );
- m_rWW8Export.pO->Insert( (BYTE*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
}
-void WW8AttributeOutput::OutputWW8Attribute( BYTE nId, bool bVal )
+void WW8AttributeOutput::OutputWW8Attribute( sal_uInt8 nId, bool bVal )
{
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( 8 == nId ? NS_sprm::LN_CFDStrike : NS_sprm::LN_CFBold + nId );
@@ -1049,7 +1049,7 @@ void WW8AttributeOutput::OutputWW8Attribute( BYTE nId, bool bVal )
m_rWW8Export.pO->Insert( bVal ? 1 : 0, m_rWW8Export.pO->Count() );
}
-void WW8AttributeOutput::OutputWW8AttributeCTL( BYTE nId, bool bVal )
+void WW8AttributeOutput::OutputWW8AttributeCTL( sal_uInt8 nId, bool bVal )
{
OSL_ENSURE( nId <= 1, "out of range" );
if ( !m_rWW8Export.bWrtWW8 || nId > 1 )
@@ -1061,7 +1061,7 @@ void WW8AttributeOutput::OutputWW8AttributeCTL( BYTE nId, bool bVal )
void WW8AttributeOutput::CharFont( const SvxFontItem& rFont )
{
- USHORT nFontID = m_rWW8Export.GetId( rFont );
+ sal_uInt16 nFontID = m_rWW8Export.GetId( rFont );
if ( m_rWW8Export.bWrtWW8 )
{
@@ -1079,7 +1079,7 @@ void WW8AttributeOutput::CharFontCTL( const SvxFontItem& rFont )
{
//Can only export in 8+, in 7- export as normal varient and expect that
//upperlevel code has blocked exporting clobbering attributes
- USHORT nFontID = m_rWW8Export.GetId( rFont );
+ sal_uInt16 nFontID = m_rWW8Export.GetId( rFont );
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_CFtcBi );
else
@@ -1091,7 +1091,7 @@ void WW8AttributeOutput::CharFontCJK( const SvxFontItem& rFont )
{
//Can only export in 8+, in 7- export as normal varient and expect that
//upperlevel code has blocked exporting clobbering attributes
- USHORT nFontID = m_rWW8Export.GetId( rFont );
+ sal_uInt16 nFontID = m_rWW8Export.GetId( rFont );
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_CRgFtc1 );
else
@@ -1199,7 +1199,7 @@ void WW8AttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossed )
void WW8AttributeOutput::CharCaseMap( const SvxCaseMapItem& rCaseMap )
{
- USHORT eSt = rCaseMap.GetValue();
+ sal_uInt16 eSt = rCaseMap.GetValue();
switch ( eSt )
{
case SVX_CASEMAP_KAPITAELCHEN:
@@ -1241,7 +1241,7 @@ void WW8AttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline )
// WW97 - additional parameters:
// 6 = thick, 7 = dash, 8 = dot(not used)
// 9 = dotdash 10 = dotdotdash, 11 = wave
- BYTE b = 0;
+ sal_uInt8 b = 0;
switch ( rUnderline.GetLineStyle() )
{
case UNDERLINE_SINGLE:
@@ -1306,7 +1306,7 @@ void WW8AttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline )
void WW8AttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if ( m_rWW8Export.bWrtWW8 )
{
switch ( rLanguage.Which() )
@@ -1330,7 +1330,7 @@ void WW8AttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
if ( m_rWW8Export.bWrtWW8 ) // use sprmCRgLid0_80 rather than sprmCLid
m_rWW8Export.InsUInt16( nId );
else
- m_rWW8Export.pO->Insert( (BYTE)nId, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)nId, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( rLanguage.GetLanguage() );
// Word 2000 and above apparently require both old and new versions of
@@ -1350,7 +1350,7 @@ void WW8AttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
void WW8AttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement )
{
- BYTE b = 0xFF;
+ sal_uInt8 b = 0xFF;
short nEsc = rEscapement.GetEsc(), nProp = rEscapement.GetProp();
if ( !nEsc )
{
@@ -1402,7 +1402,7 @@ void WW8AttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement )
void WW8AttributeOutput::CharFontSize( const SvxFontHeightItem& rHeight )
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if ( m_rWW8Export.bWrtWW8 )
{
switch ( rHeight.Which() )
@@ -1424,9 +1424,9 @@ void WW8AttributeOutput::CharFontSize( const SvxFontHeightItem& rHeight )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( nId );
else
- m_rWW8Export.pO->Insert( (BYTE)nId, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)nId, m_rWW8Export.pO->Count() );
- m_rWW8Export.InsUInt16( (UINT16)(( rHeight.GetHeight() + 5 ) / 10 ) );
+ m_rWW8Export.InsUInt16( (sal_uInt16)(( rHeight.GetHeight() + 5 ) / 10 ) );
}
}
@@ -1443,7 +1443,7 @@ void WW8AttributeOutput::CharRelief( const SvxCharReliefItem& rRelief )
{
if ( m_rWW8Export.bWrtWW8 )
{
- USHORT nId;
+ sal_uInt16 nId;
switch ( rRelief.GetValue() )
{
case RELIEF_EMBOSSED: nId = NS_sprm::LN_CFEmboss; break;
@@ -1454,15 +1454,15 @@ void WW8AttributeOutput::CharRelief( const SvxCharReliefItem& rRelief )
if( nId )
{
m_rWW8Export.InsUInt16( nId );
- m_rWW8Export.pO->Insert( (BYTE)0x81, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x81, m_rWW8Export.pO->Count() );
}
else
{
// switch both flags off
m_rWW8Export.InsUInt16( NS_sprm::LN_CFEmboss );
- m_rWW8Export.pO->Insert( (BYTE)0x0, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x0, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( NS_sprm::LN_CFImprint );
- m_rWW8Export.pO->Insert( (BYTE)0x0, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x0, m_rWW8Export.pO->Count() );
}
}
}
@@ -1480,11 +1480,11 @@ void WW8AttributeOutput::CharRotate( const SvxCharRotateItem& rRotate )
// here corrupts the table, hence !m_rWW8Export.bIsInTable
m_rWW8Export.InsUInt16( NS_sprm::LN_CEastAsianLayout );
- m_rWW8Export.pO->Insert( (BYTE)0x06, m_rWW8Export.pO->Count() ); //len 6
- m_rWW8Export.pO->Insert( (BYTE)0x01, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x06, m_rWW8Export.pO->Count() ); //len 6
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x01, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( rRotate.IsFitToLine() ? 1 : 0 );
- static const BYTE aZeroArr[ 3 ] = { 0, 0, 0 };
+ static const sal_uInt8 aZeroArr[ 3 ] = { 0, 0, 0 };
m_rWW8Export.pO->Insert( aZeroArr, 3, m_rWW8Export.pO->Count() );
}
}
@@ -1493,7 +1493,7 @@ void WW8AttributeOutput::CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasisM
{
if ( m_rWW8Export.bWrtWW8 )
{
- BYTE nVal;
+ sal_uInt8 nVal;
switch ( rEmphasisMark.GetValue() )
{
case EMPHASISMARK_NONE: nVal = 0; break;
@@ -1514,9 +1514,9 @@ void WW8AttributeOutput::CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasisM
// Gibt es keine direkte Entsprechung, dann wird versucht, eine moeglichst
// aehnliche WW-Farbe zu finden.
// return: 5-Bit-Wert ( 0..16 )
-BYTE WW8Export::TransCol( const Color& rCol )
+sal_uInt8 WW8Export::TransCol( const Color& rCol )
{
- BYTE nCol = 0; // ->Auto
+ sal_uInt8 nCol = 0; // ->Auto
switch( rCol.GetColor() )
{
case COL_BLACK: nCol = 1; break;
@@ -1548,10 +1548,10 @@ BYTE WW8Export::TransCol( const Color& rCol )
COL_RED, COL_BROWN, COL_GRAY, COL_LIGHTGRAY
};
- for( USHORT i = 0; i < 16; ++i )
+ for( sal_uInt16 i = 0; i < 16; ++i )
pBmpPal->operator[]( i ) = Color( aColArr[ i ] );
}
- nCol = static_cast< BYTE >(pBmpPal->GetBestIndex( rCol ) + 1);
+ nCol = static_cast< sal_uInt8 >(pBmpPal->GetBestIndex( rCol ) + 1);
break;
}
return nCol;
@@ -1590,7 +1590,7 @@ void WW8AttributeOutput::CharColor( const SvxColorItem& rColor )
else
m_rWW8Export.pO->Insert( 98, m_rWW8Export.pO->Count() );
- BYTE nColor = m_rWW8Export.TransCol( rColor.GetValue() );
+ sal_uInt8 nColor = m_rWW8Export.TransCol( rColor.GetValue() );
m_rWW8Export.pO->Insert( nColor, m_rWW8Export.pO->Count() );
if ( m_rWW8Export.bWrtWW8 && nColor )
@@ -1625,7 +1625,7 @@ void WW8AttributeOutput::TextINetFormat( const SwFmtINetFmt& rINet )
{
if ( rINet.GetValue().Len() )
{
- USHORT nId;
+ sal_uInt16 nId;
const String& rStr = rINet.GetINetFmt();
if ( rStr.Len() )
nId = rINet.GetINetFmtId();
@@ -1650,7 +1650,7 @@ void WW8AttributeOutput::TextINetFormat( const SwFmtINetFmt& rINet )
// - it contains the name of the link target, which is a bookmark.
// add optional parameter <bIncludeEmptyPicLocation>
// It is needed to write an empty picture location for page number field separators
-static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
+static void InsertSpecialChar( WW8Export& rWrt, sal_uInt8 c,
String* pLinkStr = 0L,
bool bIncludeEmptyPicLocation = false )
{
@@ -1679,15 +1679,15 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
// write hyperlink data to data stream
SvStream& rStrm = *rWrt.pDataStrm;
// position of hyperlink data
- const UINT32 nLinkPosInDataStrm = rStrm.Tell();
+ const sal_uInt32 nLinkPosInDataStrm = rStrm.Tell();
// write empty header
- const UINT16 nEmptyHdrLen = 0x44;
- BYTE aEmptyHeader[ nEmptyHdrLen ] = { 0 };
+ const sal_uInt16 nEmptyHdrLen = 0x44;
+ sal_uInt8 aEmptyHeader[ nEmptyHdrLen ] = { 0 };
aEmptyHeader[ 4 ] = 0x44;
rStrm.Write( aEmptyHeader, nEmptyHdrLen );
// writer fixed header
- const UINT16 nFixHdrLen = 0x19;
- BYTE aFixHeader[ nFixHdrLen ] =
+ const sal_uInt16 nFixHdrLen = 0x19;
+ sal_uInt8 aFixHeader[ nFixHdrLen ] =
{
0x08, 0xD0, 0xC9, 0xEA, 0x79, 0xF9, 0xBA, 0xCE,
0x11, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9,
@@ -1696,13 +1696,13 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
};
rStrm.Write( aFixHeader, nFixHdrLen );
// write reference string including length+1
- UINT32 nStrLen( pLinkStr->Len() + 1 );
+ sal_uInt32 nStrLen( pLinkStr->Len() + 1 );
SwWW8Writer::WriteLong( rStrm, nStrLen );
SwWW8Writer::WriteString16( rStrm, *(pLinkStr), false );
// write additional two NULL Bytes
SwWW8Writer::WriteLong( rStrm, 0 );
// write length of hyperlink data
- const UINT32 nCurrPos = rStrm.Tell();
+ const sal_uInt32 nCurrPos = rStrm.Tell();
rStrm.Seek( nLinkPosInDataStrm );
SVBT32 nLen;
UInt32ToSVBT32( nCurrPos - nLinkPosInDataStrm, nLen );
@@ -1711,11 +1711,11 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
// write attributes of hyperlink character 0x01
SwWW8Writer::InsUInt16( aItems, NS_sprm::LN_CFFldVanish );
- aItems.Insert( (BYTE)0x81, aItems.Count() );
+ aItems.Insert( (sal_uInt8)0x81, aItems.Count() );
SwWW8Writer::InsUInt16( aItems, NS_sprm::LN_CPicLocation );
SwWW8Writer::InsUInt32( aItems, nLinkPosInDataStrm );
SwWW8Writer::InsUInt16( aItems, NS_sprm::LN_CFData );
- aItems.Insert( (BYTE)0x01, aItems.Count() );
+ aItems.Insert( (sal_uInt8)0x01, aItems.Count() );
}
//Technically we should probably Remove all attribs
@@ -1738,9 +1738,9 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
aItems.GetData());
}
-String lcl_GetExpandedField(const SwField &rFld, SwDoc const& rDoc)
+String lcl_GetExpandedField(const SwField &rFld)
{
- String sRet(rFld.ExpandField(rDoc.IsClipBoard()));
+ String sRet(rFld.ExpandField(true));
//replace LF 0x0A with VT 0x0B
sRet.SearchAndReplaceAll(0x0A, 0x0B);
@@ -1781,7 +1781,7 @@ WW8_WrPlcFld* WW8Export::CurrentFieldPlc() const
}
void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
- const String& rFldCmd, BYTE nMode )
+ const String& rFldCmd, sal_uInt8 nMode )
{
bool bUnicode = IsUnicode();
WW8_WrPlcFld* pFldP = CurrentFieldPlc();
@@ -1790,11 +1790,11 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
if (WRITEFIELD_START & nMode)
{
- BYTE aFld13[2] = { 0x13, 0x00 }; // will change
+ sal_uInt8 aFld13[2] = { 0x13, 0x00 }; // will change
//#i3958#, Needed to make this field work correctly in Word 2000
if (eFldType == ww::eSHAPE)
aFld13[0] |= 0x80;
- aFld13[1] = static_cast< BYTE >(eFldType); // Typ nachtragen
+ aFld13[1] = static_cast< sal_uInt8 >(eFldType); // Typ nachtragen
pFldP->Append( Fc2Cp( Strm().Tell() ), aFld13 );
InsertSpecialChar( *this, 0x13, 0, bIncludeEmptyPicLocation );
}
@@ -1824,7 +1824,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
{
// retrieve reference destionation - the name of the bookmark
String aLinkStr;
- const USHORT nSubType = pFld->GetSubType();
+ const sal_uInt16 nSubType = pFld->GetSubType();
const SwGetRefField& rRFld = *(static_cast<const SwGetRefField*>(pFld));
if ( nSubType == REF_SETREFATTR ||
nSubType == REF_BOOKMARK )
@@ -1847,7 +1847,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
}
if (WRITEFIELD_CMD_END & nMode)
{
- static const BYTE aFld14[2] = { 0x14, 0xff };
+ static const sal_uInt8 aFld14[2] = { 0x14, 0xff };
pFldP->Append( Fc2Cp( Strm().Tell() ), aFld14 );
pFldP->ResultAdded();
InsertSpecialChar( *this, 0x14, 0, bIncludeEmptyPicLocation );
@@ -1856,7 +1856,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
{
String sOut;
if( pFld )
- sOut = lcl_GetExpandedField(*pFld, *pDoc);
+ sOut = lcl_GetExpandedField(*pFld);
else
sOut = rFldCmd;
if( sOut.Len() )
@@ -1874,8 +1874,8 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
if (pFld->GetTyp()->Which() == RES_INPUTFLD &&
eFldType == ww::eFORMTEXT)
{
- BYTE aArr[12];
- BYTE *pArr = aArr;
+ sal_uInt8 aArr[12];
+ sal_uInt8 *pArr = aArr;
if ( bWrtWW8 )
{
@@ -1903,14 +1903,14 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
}
if (WRITEFIELD_CLOSE & nMode)
{
- BYTE aFld15[2] = { 0x15, 0x80 };
+ sal_uInt8 aFld15[2] = { 0x15, 0x80 };
if (pFld)
{
if (pFld->GetTyp()->Which() == RES_INPUTFLD &&
eFldType == ww::eFORMTEXT)
{
- USHORT nSubType = pFld->GetSubType();
+ sal_uInt16 nSubType = pFld->GetSubType();
if (nSubType == REF_SEQUENCEFLD)
aFld15[0] |= (0x4 << 5);
@@ -1940,10 +1940,10 @@ void WW8Export::EndCommentOutput(const String& rName)
WRITEFIELD_CLOSE);
}
-USHORT MSWordExportBase::GetId( const SwTOXType& rTOXType )
+sal_uInt16 MSWordExportBase::GetId( const SwTOXType& rTOXType )
{
void* p = (void*)&rTOXType;
- USHORT nRet = aTOXArr.GetPos( p );
+ sal_uInt16 nRet = aTOXArr.GetPos( p );
if( USHRT_MAX == nRet )
aTOXArr.Insert( p, nRet = aTOXArr.Count() );
return nRet;
@@ -1953,7 +1953,7 @@ USHORT MSWordExportBase::GetId( const SwTOXType& rTOXType )
// 2 - TabStop before PageNum,
// 3 - Text before PageNum - rTxt hold the text
// 4 - no Text and no TabStop before PageNum
-int lcl_CheckForm( const SwForm& rForm, BYTE nLvl, String& rText )
+int lcl_CheckForm( const SwForm& rForm, sal_uInt8 nLvl, String& rText )
{
int nRet = 4;
rText.Erase();
@@ -2003,10 +2003,10 @@ int lcl_CheckForm( const SwForm& rForm, BYTE nLvl, String& rText )
return nRet;
}
-bool lcl_IsHyperlinked(const SwForm& rForm, USHORT nTOXLvl)
+bool lcl_IsHyperlinked(const SwForm& rForm, sal_uInt16 nTOXLvl)
{
bool bRes = false;
- for (USHORT nI = 1; nI < nTOXLvl; ++nI)
+ for (sal_uInt16 nI = 1; nI < nTOXLvl; ++nI)
{
// #i21237#
SwFormTokens aPattern = rForm.GetPattern(nI);
@@ -2058,7 +2058,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
{
String aFillTxt;
- for (BYTE n = 1; n <= 3; ++n)
+ for (sal_uInt8 n = 1; n <= 3; ++n)
{
String aTxt;
int nRet = ::lcl_CheckForm(pTOX->GetTOXForm(), n, aTxt);
@@ -2105,7 +2105,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
sStr = FieldString(eCode);
String sTOption;
- USHORT n, nTOXLvl = pTOX->GetLevel();
+ sal_uInt16 n, nTOXLvl = pTOX->GetLevel();
if( !nTOXLvl )
++nTOXLvl;
@@ -2161,12 +2161,12 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
// what is the minimum outline level (if any) filled by a
// non-standard style for that level, i.e. ignore headline
// styles 1-9 and find the lowest valid outline level
- BYTE nPosOfLowestNonStandardLvl = MAXLEVEL;
+ sal_uInt8 nPosOfLowestNonStandardLvl = MAXLEVEL;
const SwTxtFmtColls& rColls = *GetExport().pDoc->GetTxtFmtColls();
for( n = rColls.Count(); n; )
{
const SwTxtFmtColl* pColl = rColls[ --n ];
- USHORT nPoolId = pColl->GetPoolFmtId();
+ sal_uInt16 nPoolId = pColl->GetPoolFmtId();
if (
//Is a Non-Standard Outline Style
(RES_POOLCOLL_HEADLINE1 > nPoolId || RES_POOLCOLL_HEADLINE9 < nPoolId) &&
@@ -2176,11 +2176,11 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
(pColl->GetAssignedOutlineStyleLevel() < nPosOfLowestNonStandardLvl)
)
{
- nPosOfLowestNonStandardLvl = ::sal::static_int_cast<BYTE>(pColl->GetAssignedOutlineStyleLevel());
+ nPosOfLowestNonStandardLvl = ::sal::static_int_cast<sal_uInt8>(pColl->GetAssignedOutlineStyleLevel());
}
}
- BYTE nMaxMSAutoEvaluate = nPosOfLowestNonStandardLvl < nTOXLvl ? nPosOfLowestNonStandardLvl : (BYTE)nTOXLvl;
+ sal_uInt8 nMaxMSAutoEvaluate = nPosOfLowestNonStandardLvl < nTOXLvl ? nPosOfLowestNonStandardLvl : (sal_uInt8)nTOXLvl;
//output \o 1-X where X is the highest normal outline style to be included in the toc
if ( nMaxMSAutoEvaluate )
@@ -2204,7 +2204,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
const SwTxtFmtColl* pColl = rColls[ --n ];
if (!pColl->IsAssignedToListLevelOfOutlineStyle())
continue;
- BYTE nTestLvl = ::sal::static_int_cast<BYTE>(pColl->GetAssignedOutlineStyleLevel());
+ sal_uInt8 nTestLvl = ::sal::static_int_cast<sal_uInt8>(pColl->GetAssignedOutlineStyleLevel());
if (nTestLvl < nTOXLvl && nTestLvl >= nMaxMSAutoEvaluate)
{
if( sTOption.Len() )
@@ -2245,24 +2245,24 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
{
String aFillTxt;
- BYTE nNoPgStt = MAXLEVEL, nNoPgEnd = MAXLEVEL;
+ sal_uInt8 nNoPgStt = MAXLEVEL, nNoPgEnd = MAXLEVEL;
bool bFirstFillTxt = true, bOnlyText = true;
for( n = 0; n < nTOXLvl; ++n )
{
String aTxt;
int nRet = ::lcl_CheckForm( pTOX->GetTOXForm(),
- static_cast< BYTE >(n+1), aTxt );
+ static_cast< sal_uInt8 >(n+1), aTxt );
if( 1 == nRet )
{
bOnlyText = false;
if( MAXLEVEL == nNoPgStt )
- nNoPgStt = static_cast< BYTE >(n+1);
+ nNoPgStt = static_cast< sal_uInt8 >(n+1);
}
else
{
if( MAXLEVEL != nNoPgStt &&
MAXLEVEL == nNoPgEnd )
- nNoPgEnd = BYTE(n);
+ nNoPgEnd = sal_uInt8(n);
bOnlyText = bOnlyText && 3 == nRet;
if( 3 == nRet || 4 == nRet )
@@ -2334,7 +2334,7 @@ bool MSWordExportBase::GetNumberFmt(const SwField& rFld, String& rStr)
// Returns a date or time format string by using the US NfKeywordTable
bool bHasFmt = false;
SvNumberFormatter* pNFmtr = pDoc->GetNumberFormatter();
- UINT32 nFmtIdx = rFld.GetFormat();
+ sal_uInt32 nFmtIdx = rFld.GetFormat();
const SvNumberformat* pNumFmt = pNFmtr->GetEntry( nFmtIdx );
if( pNumFmt )
{
@@ -2395,8 +2395,8 @@ void AttributeOutputBase::GetNumberPara( String& rStr, const SwField& rFld )
void WW8Export::WritePostItBegin( WW8Bytes* pOut )
{
- BYTE aArr[ 3 ];
- BYTE* pArr = aArr;
+ sal_uInt8 aArr[ 3 ];
+ sal_uInt8* pArr = aArr;
// sprmCFSpec true
if( bWrtWW8 )
@@ -2409,7 +2409,7 @@ void WW8Export::WritePostItBegin( WW8Bytes* pOut )
WriteChar( 0x05 ); // Annotation reference
if( pOut )
- pOut->Insert( aArr, static_cast< USHORT >(pArr - aArr), pOut->Count() );
+ pOut->Insert( aArr, static_cast< sal_uInt16 >(pArr - aArr), pOut->Count() );
else
pChpPlc->AppendFkpEntry( Strm().Tell(), static_cast< short >(pArr - aArr), aArr );
}
@@ -2432,7 +2432,7 @@ void WW8AttributeOutput::HiddenField( const SwField& rFld )
if (m_rWW8Export.IsUnicode())
{
SwWW8Writer::WriteString16(m_rWW8Export.Strm(), sExpand, false);
- static BYTE aArr[] =
+ static sal_uInt8 aArr[] =
{
0x3C, 0x08, 0x1
};
@@ -2442,7 +2442,7 @@ void WW8AttributeOutput::HiddenField( const SwField& rFld )
{
SwWW8Writer::WriteString8(m_rWW8Export.Strm(), sExpand, false,
RTL_TEXTENCODING_MS_1252);
- static BYTE aArr[] =
+ static sal_uInt8 aArr[] =
{
92, 0x1
};
@@ -2455,7 +2455,7 @@ void WW8AttributeOutput::SetField( const SwField& rFld, ww::eField eType, const
const SwSetExpField* pSet=(const SwSetExpField*)(&rFld);
const String &rVar = pSet->GetPar2();
- ULONG nFrom = m_rWW8Export.Fc2Cp(m_rWW8Export.Strm().Tell());
+ sal_uLong nFrom = m_rWW8Export.Fc2Cp(m_rWW8Export.Strm().Tell());
GetExport().OutputField(&rFld, eType, rCmd, WRITEFIELD_START |
WRITEFIELD_CMD_START | WRITEFIELD_CMD_END);
@@ -2515,7 +2515,7 @@ void WW8AttributeOutput::RefField( const SwField &rFld, const String &rRef)
sStr.APPEND_CONST_ASC( "\" " );
m_rWW8Export.OutputField( &rFld, ww::eREF, sStr, WRITEFIELD_START |
WRITEFIELD_CMD_START | WRITEFIELD_CMD_END );
- String sVar = lcl_GetExpandedField( rFld, *GetExport().pDoc );
+ String sVar = lcl_GetExpandedField( rFld );
if ( sVar.Len() )
{
if ( m_rWW8Export.IsUnicode() )
@@ -2531,7 +2531,7 @@ void WW8AttributeOutput::RefField( const SwField &rFld, const String &rRef)
void WW8AttributeOutput::WriteExpand( const SwField* pFld )
{
- String sExpand( lcl_GetExpandedField( *pFld, *GetExport().pDoc ) );
+ String sExpand( lcl_GetExpandedField( *pFld ) );
if ( m_rWW8Export.IsUnicode() )
SwWW8Writer::WriteString16( m_rWW8Export.Strm(), sExpand, false );
else
@@ -2546,7 +2546,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField )
const SwField* pFld = rField.GetFld();
String sStr; // fuer optionale Parameter
bool bWriteExpand = false;
- USHORT nSubType = pFld->GetSubType();
+ sal_uInt16 nSubType = pFld->GetSubType();
switch (pFld->GetTyp()->Which())
{
@@ -2693,7 +2693,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField )
if (pDocInfoField != NULL)
{
- String sFieldname = pDocInfoField->GetCntnt(TRUE);
+ String sFieldname = pDocInfoField->GetFieldName();
xub_StrLen nIndex = sFieldname.Search(':');
if (nIndex != sFieldname.Len())
@@ -2889,7 +2889,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField )
asian or western text based up on the first character and use the
font size of that script as our default.
*/
- USHORT nScript;
+ sal_uInt16 nScript;
if( pBreakIt->GetBreakIter().is() )
nScript = pBreakIt->GetBreakIter()->getScriptType( pFld->GetPar1(), 0);
else
@@ -2999,7 +2999,7 @@ void WW8AttributeOutput::ParaHyphenZone( const SvxHyphenZoneItem& rHyphenZone )
void WW8AttributeOutput::ParaScriptSpace( const SfxBoolItem& rScriptSpace )
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if ( m_rWW8Export.bWrtWW8 )
switch ( rScriptSpace.Which() )
{
@@ -3013,7 +3013,7 @@ void WW8AttributeOutput::ParaScriptSpace( const SfxBoolItem& rScriptSpace )
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( nId );
else
- m_rWW8Export.pO->Insert( (BYTE)nId, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)nId, m_rWW8Export.pO->Count() );
m_rWW8Export.pO->Insert( rScriptSpace.GetValue() ? 1 : 0,
m_rWW8Export.pO->Count() );
@@ -3040,7 +3040,7 @@ void WW8AttributeOutput::ParaVerticalAlign( const SvxParaVertAlignItem& rAlign )
m_rWW8Export.InsUInt16( NS_sprm::LN_PWAlignFont );
- INT16 nVal = rAlign.GetValue();
+ sal_Int16 nVal = rAlign.GetValue();
switch ( nVal )
{
case SvxParaVertAlignItem::BASELINE:
@@ -3080,7 +3080,7 @@ void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, WW8Bytes* pOutArr )
{
if( bWrtWW8 )
{
- static const BYTE aSpec[] =
+ static const sal_uInt8 aSpec[] =
{
0x03, 0x6a, 0, 0, 0, 0, // sprmCObjLocation
0x55, 0x08, 1 // sprmCFSpec
@@ -3090,7 +3090,7 @@ void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, WW8Bytes* pOutArr )
}
else
{
- static BYTE const aSpec[] =
+ static sal_uInt8 const aSpec[] =
{
117, 1, // sprmCFSpec
68, 4, 0, 0, 0, 0 // sprmCObjLocation
@@ -3167,7 +3167,7 @@ static bool lcl_IsAtTxtEnd(const SwFmtFtn& rFtn)
bool bRet = true;
if( rFtn.GetTxtFtn() )
{
- USHORT nWh = static_cast< USHORT >(rFtn.IsEndNote() ? RES_END_AT_TXTEND
+ sal_uInt16 nWh = static_cast< sal_uInt16 >(rFtn.IsEndNote() ? RES_END_AT_TXTEND
: RES_FTN_AT_TXTEND);
const SwSectionNode* pSectNd = rFtn.GetTxtFtn()->GetTxtNode().
FindSectionNode();
@@ -3185,7 +3185,7 @@ static bool lcl_IsAtTxtEnd(const SwFmtFtn& rFtn)
void AttributeOutputBase::TextFootnote( const SwFmtFtn& rFtn )
{
- USHORT nTyp;
+ sal_uInt16 nTyp;
if ( rFtn.IsEndNote() )
{
nTyp = REF_ENDNOTE;
@@ -3253,8 +3253,8 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
return;
m_rWW8Export.InsUInt16( NS_sprm::LN_CEastAsianLayout );
- m_rWW8Export.pO->Insert( (BYTE)0x06, m_rWW8Export.pO->Count() ); //len 6
- m_rWW8Export.pO->Insert( (BYTE)0x02, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x06, m_rWW8Export.pO->Count() ); //len 6
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x02, m_rWW8Export.pO->Count() );
sal_Unicode cStart = rTwoLines.GetStartBracket();
sal_Unicode cEnd = rTwoLines.GetEndBracket();
@@ -3273,7 +3273,7 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
ill effects.
*/
- USHORT nType;
+ sal_uInt16 nType;
if (!cStart && !cEnd)
nType = 0;
else if ((cStart == '{') || (cEnd == '}'))
@@ -3285,7 +3285,7 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
else
nType = 1;
m_rWW8Export.InsUInt16( nType );
- static const BYTE aZeroArr[ 3 ] = { 0, 0, 0 };
+ static const sal_uInt8 aZeroArr[ 3 ] = { 0, 0, 0 };
m_rWW8Export.pO->Insert( aZeroArr, 3, m_rWW8Export.pO->Count() );
}
}
@@ -3293,8 +3293,8 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule )
{
const SwTxtNode* pTxtNd = 0;
- USHORT nNumId;
- BYTE nLvl = 0;
+ sal_uInt16 nNumId;
+ sal_uInt8 nLvl = 0;
if ( rNumRule.GetValue().Len() )
{
const SwNumRule* pRule = GetExport().pDoc->FindNumRulePtr(
@@ -3310,11 +3310,11 @@ void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule )
if( pTxtNd->IsCountedInList())
{
- nLvl = static_cast< BYTE >(pTxtNd->GetActualListLevel());
+ nLvl = static_cast< sal_uInt8 >(pTxtNd->GetActualListLevel());
if ( pTxtNd->IsListRestart() )
{
- USHORT nStartWith = static_cast< USHORT >( pTxtNd->GetActualListStartValue() );
+ sal_uInt16 nStartWith = static_cast< sal_uInt16 >( pTxtNd->GetActualListStartValue() );
nNumId = GetExport().DuplicateNumRule( pRule, nLvl, nStartWith );
if ( USHRT_MAX != nNumId )
++nNumId;
@@ -3333,7 +3333,7 @@ void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule )
{
const SwTxtFmtColl* pC = (SwTxtFmtColl*)GetExport().pOutFmtNode;
if ( pC && pC->IsAssignedToListLevelOfOutlineStyle() )
- nLvl = static_cast< BYTE >( pC->GetAssignedOutlineStyleLevel() ); //<-end,zhaojianwei
+ nLvl = static_cast< sal_uInt8 >( pC->GetAssignedOutlineStyleLevel() ); //<-end,zhaojianwei
}
}
}
@@ -3358,9 +3358,9 @@ void WW8AttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL
{
// write sprmPIlvl and sprmPIlfo
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_PIlvl );
- m_rWW8Export.pO->Insert( ::sal::static_int_cast<BYTE>(nLvl), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( ::sal::static_int_cast<sal_uInt8>(nLvl), m_rWW8Export.pO->Count() );
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_PIlfo );
- SwWW8Writer::InsUInt16( *m_rWW8Export.pO, ::sal::static_int_cast<UINT16>(nNumId) );
+ SwWW8Writer::InsUInt16( *m_rWW8Export.pO, ::sal::static_int_cast<sal_uInt16>(nNumId) );
}
else if ( pTxtNd && m_rWW8Export.Out_SwNum( pTxtNd ) ) // NumRules
m_rWW8Export.pSepx->SetNum( pTxtNd );
@@ -3383,7 +3383,7 @@ void WW8AttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
m_rWW8Export.InsUInt16( NS_sprm::LN_PDxaWidth );
else
m_rWW8Export.pO->Insert( 28, m_rWW8Export.pO->Count() );
- m_rWW8Export.InsUInt16( (USHORT)rSize.GetWidth() );
+ m_rWW8Export.InsUInt16( (sal_uInt16)rSize.GetWidth() );
}
if ( rSize.GetHeight() )
@@ -3394,12 +3394,12 @@ void WW8AttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
else
m_rWW8Export.pO->Insert( 45, m_rWW8Export.pO->Count() );
- USHORT nH = 0;
+ sal_uInt16 nH = 0;
switch ( rSize.GetHeightSizeType() )
{
case ATT_VAR_SIZE: break;
- case ATT_FIX_SIZE: nH = (USHORT)rSize.GetHeight() & 0x7fff; break;
- default: nH = (USHORT)rSize.GetHeight() | 0x8000; break;
+ case ATT_FIX_SIZE: nH = (sal_uInt16)rSize.GetHeight() & 0x7fff; break;
+ default: nH = (sal_uInt16)rSize.GetHeight() | 0x8000; break;
}
m_rWW8Export.InsUInt16( nH );
}
@@ -3441,18 +3441,18 @@ void WW8AttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
// direkt nach Schreiben des CR gerufen werden.
// Rueckgabe: FilePos des ersetzten CRs + 1 oder 0 fuer nicht ersetzt
-ULONG WW8Export::ReplaceCr( BYTE nChar )
+sal_uLong WW8Export::ReplaceCr( sal_uInt8 nChar )
{
OSL_ENSURE( nChar, "gegen 0 ersetzt bringt WW97/95 zum Absturz" );
bool bReplaced = false;
SvStream& rStrm = Strm();
- ULONG nRetPos = 0, nPos = rStrm.Tell();
+ sal_uLong nRetPos = 0, nPos = rStrm.Tell();
//If there is at least two characters already output
- if (nPos - (IsUnicode() ? 2 : 1) >= ULONG(pFib->fcMin))
+ if (nPos - (IsUnicode() ? 2 : 1) >= sal_uLong(pFib->fcMin))
{
- BYTE nBCode=0;
- UINT16 nUCode=0;
+ sal_uInt8 nBCode=0;
+ sal_uInt16 nUCode=0;
rStrm.SeekRel(IsUnicode() ? -2 : -1);
if (IsUnicode())
@@ -3466,7 +3466,7 @@ ULONG WW8Export::ReplaceCr( BYTE nChar )
if (nUCode == 0x0d) // CR ?
{
if ((nChar == 0x0c) &&
- (nPos - (IsUnicode() ? 4 : 2) >= ULONG(pFib->fcMin)))
+ (nPos - (IsUnicode() ? 4 : 2) >= sal_uLong(pFib->fcMin)))
{
rStrm.SeekRel( IsUnicode() ? -4 : -2 );
if (IsUnicode())
@@ -3517,9 +3517,9 @@ ULONG WW8Export::ReplaceCr( BYTE nChar )
void WW8AttributeOutput::TableRowEnd(sal_uInt32 nDepth)
{
if ( nDepth == 1 )
- m_rWW8Export.WriteChar( (BYTE)0x07 );
+ m_rWW8Export.WriteChar( (sal_uInt8)0x07 );
else if ( nDepth > 1 )
- m_rWW8Export.WriteChar( (BYTE)0x0d );
+ m_rWW8Export.WriteChar( (sal_uInt8)0x0d );
//Technically in a word document this is a different value for a row ends
//that are not row ends directly after a cell with a graphic. But it
@@ -3568,7 +3568,7 @@ void AttributeOutputBase::FormatBreak( const SvxFmtBreakItem& rBreak )
}
else if ( !GetExport().mpParentFrame )
{
- BYTE nC = 0;
+ sal_uInt8 nC = 0;
bool bBefore = false;
// #i76300# - Note: Can only be <true>, if <bBefore> equals <false>.
bool bCheckForFollowPageDesc = false;
@@ -3635,7 +3635,7 @@ void AttributeOutputBase::FormatBreak( const SvxFmtBreakItem& rBreak )
}
}
-void WW8AttributeOutput::SectionBreak( BYTE nC, const WW8_SepInfo* /*pSectionInfo*/ )
+void WW8AttributeOutput::SectionBreak( sal_uInt8 nC, const WW8_SepInfo* /*pSectionInfo*/ )
{
m_rWW8Export.ReplaceCr( nC );
}
@@ -3644,7 +3644,7 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
{
if ( m_rWW8Export.bOutPageDescs && m_rWW8Export.bWrtWW8 )
{
- UINT16 nGridType = 0;
+ sal_uInt16 nGridType = 0;
switch ( rGrid.GetGridType() )
{
default:
@@ -3665,7 +3665,7 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
m_rWW8Export.InsUInt16( NS_sprm::LN_SClm );
m_rWW8Export.InsUInt16( nGridType );
- UINT16 nHeight = rGrid.GetBaseHeight() + rGrid.GetRubyHeight();
+ sal_uInt16 nHeight = rGrid.GetBaseHeight() + rGrid.GetRubyHeight();
m_rWW8Export.InsUInt16( NS_sprm::LN_SDyaLinePitch );
m_rWW8Export.InsUInt16( nHeight );
@@ -3681,7 +3681,7 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
}
sal_uInt16 nPitch = rGrid.IsSquaredMode() ? rGrid.GetBaseHeight() :
rGrid.GetBaseWidth( );
- INT32 nCharSpace = ( nPitch - nPageCharSize ) * 4096 / 20;
+ sal_Int32 nCharSpace = ( nPitch - nPageCharSize ) * 4096 / 20;
m_rWW8Export.InsUInt16( NS_sprm::LN_SDxtCharSpace );
m_rWW8Export.InsUInt32( nCharSpace );
@@ -3692,7 +3692,7 @@ void WW8AttributeOutput::FormatPaperBin( const SvxPaperBinItem& rPaperBin )
{
if ( m_rWW8Export.bOutPageDescs )
{
- USHORT nVal;
+ sal_uInt16 nVal;
switch ( rPaperBin.GetValue() )
{
case 0: nVal = 15; break; // Automatically select
@@ -3725,11 +3725,11 @@ void WW8AttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLR )
else
m_rWW8Export.pO->Insert( 49, m_rWW8Export.pO->Count() );
// Mittelwert nehmen, da WW nur 1 Wert kennt
- m_rWW8Export.InsUInt16( (USHORT) ( ( rLR.GetLeft() + rLR.GetRight() ) / 2 ) );
+ m_rWW8Export.InsUInt16( (sal_uInt16) ( ( rLR.GetLeft() + rLR.GetRight() ) / 2 ) );
}
else if ( m_rWW8Export.bOutPageDescs ) // PageDescs
{
- USHORT nLDist, nRDist;
+ sal_uInt16 nLDist, nRDist;
const SfxPoolItem* pItem = m_rWW8Export.HasItem( RES_BOX );
if ( pItem )
{
@@ -3738,8 +3738,8 @@ void WW8AttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLR )
}
else
nLDist = nRDist = 0;
- nLDist = nLDist + (USHORT)rLR.GetLeft();
- nRDist = nRDist + (USHORT)rLR.GetRight();
+ nLDist = nLDist + (sal_uInt16)rLR.GetLeft();
+ nRDist = nRDist + (sal_uInt16)rLR.GetRight();
// sprmSDxaLeft
if( m_rWW8Export.bWrtWW8 )
@@ -3761,24 +3761,24 @@ void WW8AttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLR )
if( m_rWW8Export.bWrtWW8 )
{
m_rWW8Export.InsUInt16( 0x845E ); //asian version ?
- m_rWW8Export.InsUInt16( (USHORT)rLR.GetTxtLeft() );
+ m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetTxtLeft() );
}
else
{
m_rWW8Export.pO->Insert( 17, m_rWW8Export.pO->Count() );
- m_rWW8Export.InsUInt16( (USHORT)rLR.GetTxtLeft() );
+ m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetTxtLeft() );
}
// sprmPDxaRight
if( m_rWW8Export.bWrtWW8 )
{
m_rWW8Export.InsUInt16( 0x845D ); //asian version ?
- m_rWW8Export.InsUInt16( (USHORT)rLR.GetRight() );
+ m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetRight() );
}
else
{
m_rWW8Export.pO->Insert( 16, m_rWW8Export.pO->Count() );
- m_rWW8Export.InsUInt16( (USHORT)rLR.GetRight() );
+ m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetRight() );
}
// sprmPDxaLeft1
@@ -3807,7 +3807,7 @@ void WW8AttributeOutput::FormatULSpace( const SvxULSpaceItem& rUL )
else
m_rWW8Export.pO->Insert( 48, m_rWW8Export.pO->Count() );
// Mittelwert nehmen, da WW nur 1 Wert kennt
- m_rWW8Export.InsUInt16( (USHORT) ( ( rUL.GetUpper() + rUL.GetLower() ) / 2 ) );
+ m_rWW8Export.InsUInt16( (sal_uInt16) ( ( rUL.GetUpper() + rUL.GetLower() ) / 2 ) );
}
else if ( m_rWW8Export.bOutPageDescs ) // Page-UL
{
@@ -3969,7 +3969,7 @@ void WW8AttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor )
if ( m_rWW8Export.bOutFlyFrmAttrs )
{
- BYTE nP = 0;
+ sal_uInt8 nP = 0;
switch ( rAnchor.GetAnchorId() )
{
case FLY_AT_PAGE:
@@ -4026,14 +4026,14 @@ void WW8AttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
}
WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
- USHORT nDist, bool bShadow)
+ sal_uInt16 nDist, bool bShadow)
{
// M.M. This function writes out border lines to the word format similar to
// what SwRTFWriter::OutRTFBorder does in the RTF filter Eventually it
// would be nice if all this functionality was in the one place
WW8_BRC aBrc;
- UINT16 nWidth = rLine.GetInWidth() + rLine.GetOutWidth();
- BYTE brcType = 0, nColCode = 0;
+ sal_uInt16 nWidth = rLine.GetInWidth() + rLine.GetOutWidth();
+ sal_uInt8 brcType = 0, nColCode = 0;
if( nWidth ) // Linie ?
{
@@ -4094,17 +4094,17 @@ WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
}
// BRC.dxpSpace
- USHORT nLDist = nDist;
+ sal_uInt16 nLDist = nDist;
nLDist /= 20; // Masseinheit : pt
if( nLDist > 0x1f )
nLDist = 0x1f;
if( bWrtWW8 )
{
- aBrc.aBits1[0] = BYTE(nWidth);
+ aBrc.aBits1[0] = sal_uInt8(nWidth);
aBrc.aBits1[1] = brcType;
aBrc.aBits2[0] = nColCode;
- aBrc.aBits2[1] = BYTE(nLDist);
+ aBrc.aBits2[1] = sal_uInt8(nLDist);
// fShadow, keine weiteren Einstellungen im WW moeglich
if( bShadow )
@@ -4112,7 +4112,7 @@ WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
}
else
{
- USHORT aBits = nWidth + ( brcType << 3 );
+ sal_uInt16 aBits = nWidth + ( brcType << 3 );
aBits |= (nColCode & 0x1f) << 6;
aBits |= nLDist << 11;
// fShadow, keine weiteren Einstellungen im WW moeglich
@@ -4129,7 +4129,7 @@ WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
// Wenn nSprmNo == 0, dann wird der Opcode nicht ausgegeben.
// bShadow darf bei Tabellenzellen *nicht* gesetzt sein !
void WW8Export::Out_BorderLine(WW8Bytes& rO, const SvxBorderLine* pLine,
- USHORT nDist, sal_uInt16 nSprmNo, bool bShadow)
+ sal_uInt16 nDist, sal_uInt16 nSprmNo, bool bShadow)
{
OSL_ENSURE( ( nSprmNo == 0 ) ||
( nSprmNo >= 38 && nSprmNo <= 41 ) ||
@@ -4155,7 +4155,7 @@ void WW8Export::Out_BorderLine(WW8Bytes& rO, const SvxBorderLine* pLine,
{
// WW95-SprmIds
if ( nSprmNo != 0 )
- rO.Insert( (BYTE)( nSprmNo ), rO.Count() );
+ rO.Insert( (sal_uInt8)( nSprmNo ), rO.Count() );
rO.Insert( aBrc.aBits1, 2, rO.Count() );
}
}
@@ -4167,7 +4167,7 @@ void WW8Export::Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow)
if ( bOutPageDescs && !bWrtWW8 )
return; // no page ouline in WW6
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
@@ -4184,8 +4184,8 @@ void WW8Export::Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow)
38, 39, 40, 41
};
- const USHORT* pBrd = aBorders;
- for( USHORT i = 0; i < 4; ++i, ++pBrd )
+ const sal_uInt16* pBrd = aBorders;
+ for( sal_uInt16 i = 0; i < 4; ++i, ++pBrd )
{
const SvxBorderLine* pLn = rBox.GetLine( *pBrd );
@@ -4210,13 +4210,13 @@ void WW8Export::Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow)
void WW8Export::Out_SwFmtTableBox( WW8Bytes& rO, const SvxBoxItem * pBox )
{
// moeglich und vielleicht besser waere 0xffff
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
static const SvxBorderLine aBorderLine;
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
for( int i = 0; i < 4; ++i, ++pBrd )
{
const SvxBorderLine* pLn;
@@ -4260,7 +4260,7 @@ SwTwips WW8Export::CurrentPageWidth(SwTwips &rLeft, SwTwips &rRight) const
return nPageSize;
}
-void WW8AttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize )
+void WW8AttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize )
{
// CColumns
if ( m_rWW8Export.bWrtWW8 )
@@ -4295,17 +4295,17 @@ void WW8AttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol
if ( !bEven )
{
- for ( USHORT n = 0; n < nCols; ++n )
+ for ( sal_uInt16 n = 0; n < nCols; ++n )
{
//sprmSDxaColWidth
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_SDxaColWidth );
else
m_rWW8Export.pO->Insert( 136, m_rWW8Export.pO->Count( ) );
- m_rWW8Export.pO->Insert( ( BYTE ) n, m_rWW8Export.pO->Count( ) );
+ m_rWW8Export.pO->Insert( ( sal_uInt8 ) n, m_rWW8Export.pO->Count( ) );
m_rWW8Export.InsUInt16( rCol.
CalcPrtColWidth( n,
- ( USHORT ) nPageSize ) );
+ ( sal_uInt16 ) nPageSize ) );
if ( n + 1 != nCols )
{
@@ -4315,7 +4315,7 @@ void WW8AttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol
else
m_rWW8Export.pO->Insert( 137,
m_rWW8Export.pO->Count( ) );
- m_rWW8Export.pO->Insert( ( BYTE ) n,
+ m_rWW8Export.pO->Insert( ( sal_uInt8 ) n,
m_rWW8Export.pO->Count( ) );
m_rWW8Export.InsUInt16( rColumns[n]->GetRight( ) +
rColumns[n + 1]->GetLeft( ) );
@@ -4328,7 +4328,7 @@ void AttributeOutputBase::FormatColumns( const SwFmtCol& rCol )
{
const SwColumns& rColumns = rCol.GetColumns();
- USHORT nCols = rColumns.Count();
+ sal_uInt16 nCols = rColumns.Count();
if ( 1 < nCols && !GetExport( ).bOutFlyFrmAttrs )
{
// dann besorge mal die Seitenbreite ohne Raender !!
@@ -4370,12 +4370,12 @@ void AttributeOutputBase::FormatColumns( const SwFmtCol& rCol )
// Nachsehen, ob alle Spalten gleich sind
bool bEven = true;
- USHORT n;
- USHORT nColWidth = rCol.CalcPrtColWidth( 0, (USHORT)nPageSize );
+ sal_uInt16 n;
+ sal_uInt16 nColWidth = rCol.CalcPrtColWidth( 0, (sal_uInt16)nPageSize );
for ( n = 1; n < nCols; n++ )
{
short nDiff = nColWidth -
- rCol.CalcPrtColWidth( n, (USHORT)nPageSize );
+ rCol.CalcPrtColWidth( n, (sal_uInt16)nPageSize );
if ( nDiff > 10 || nDiff < -10 ) // Toleranz: 10 tw
{
@@ -4495,8 +4495,8 @@ void AttributeOutputBase::ParaLineSpacing( const SvxLineSpacingItem& rSpacing )
void WW8AttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust )
{
// sprmPJc
- BYTE nAdj = 255;
- BYTE nAdjBiDi = 255;
+ sal_uInt8 nAdj = 255;
+ sal_uInt8 nAdjBiDi = 255;
switch ( rAdjust.GetAdjust() )
{
case SVX_ADJUST_LEFT:
@@ -4573,7 +4573,7 @@ void WW8AttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDir
if ( !m_rWW8Export.bWrtWW8 ) //8+ only
return;
- UINT16 nTextFlow=0;
+ sal_uInt16 nTextFlow=0;
bool bBiDi = false;
short nDir = rDirection.GetValue();
@@ -4662,9 +4662,9 @@ void WW8AttributeOutput::ParaWidows( const SvxWidowsItem& rWidows )
class SwWW8WrTabu
{
- BYTE* pDel; // DelArray
- BYTE* pAddPos; // AddPos-Array
- BYTE* pAddTyp; // AddTyp-Array
+ sal_uInt8* pDel; // DelArray
+ sal_uInt8* pAddPos; // AddPos-Array
+ sal_uInt8* pAddTyp; // AddTyp-Array
sal_uInt16 nAdd; // so viele Tabs kommen hinzu
sal_uInt16 nDel; // so viele Tabs fallen weg
public:
@@ -4679,9 +4679,9 @@ public:
SwWW8WrTabu::SwWW8WrTabu(sal_uInt16 nDelMax, sal_uInt16 nAddMax)
: nAdd(0), nDel(0)
{
- pDel = nDelMax ? new BYTE[nDelMax * 2] : 0;
- pAddPos = new BYTE[nAddMax * 2];
- pAddTyp = new BYTE[nAddMax];
+ pDel = nDelMax ? new sal_uInt8[nDelMax * 2] : 0;
+ pAddPos = new sal_uInt8[nAddMax * 2];
+ pAddTyp = new sal_uInt8[nAddMax];
}
SwWW8WrTabu::~SwWW8WrTabu()
@@ -4699,7 +4699,7 @@ void SwWW8WrTabu::Add(const SvxTabStop & rTS, long nAdjustment)
pAddPos + (nAdd * 2));
// Tab-Typ eintragen
- BYTE nPara = 0;
+ sal_uInt8 nPara = 0;
switch (rTS.GetAdjustment())
{
case SVX_TAB_ADJUST_RIGHT:
@@ -4788,7 +4788,7 @@ static void ParaTabStopAdd( WW8Export& rWrt, const SvxTabStopItem& rTStops,
{
SwWW8WrTabu aTab( 0, rTStops.Count());
- for( USHORT n = 0; n < rTStops.Count(); n++ )
+ for( sal_uInt16 n = 0; n < rTStops.Count(); n++ )
{
const SvxTabStop& rTS = rTStops[n];
// Def-Tabs ignorieren
@@ -4814,8 +4814,8 @@ static void ParaTabStopDelAdd( WW8Export& rWrt, const SvxTabStopItem& rTStyle,
{
SwWW8WrTabu aTab(rTStyle.Count(), rTNew.Count());
- USHORT nO = 0; // rTStyle Index
- USHORT nN = 0; // rTNew Index
+ sal_uInt16 nO = 0; // rTStyle Index
+ sal_uInt16 nN = 0; // rTNew Index
do {
const SvxTabStop* pTO;
@@ -5159,7 +5159,7 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt )
}
}
-void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, BOOL bDeep, BOOL bTestForDefault )
+void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, sal_Bool bDeep, sal_Bool bTestForDefault )
{
// based on OutputItemSet() from wrt_fn.cxx
@@ -5190,7 +5190,7 @@ void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, BOOL bDeep
else
{
SfxWhichIter aIter( *pSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
if ( SFX_ITEM_SET == pSet->GetItemState( nWhich, bDeep, &pItem ) &&
diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx
index cfced61d6371..fa9c1703e3b7 100644
--- a/sw/source/filter/ww8/ww8attributeoutput.hxx
+++ b/sw/source/filter/ww8/ww8attributeoutput.hxx
@@ -91,7 +91,7 @@ public:
/// Output redlining.
virtual void Redline( const SwRedlineData* pRedline );
- virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rSwFmtDrop, USHORT nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
+ virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
/// Output FKP (Formatted disK Page) - necessary for binary formats only.
/// FIXME having it in AttributeOutputBase is probably a hack, it
@@ -99,7 +99,7 @@ public:
virtual void OutputFKP();
/// Output style.
- virtual void ParagraphStyle( USHORT nStyle );
+ virtual void ParagraphStyle( sal_uInt16 nStyle );
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
@@ -120,27 +120,27 @@ public:
virtual void StartStyles();
/// End of the styles table.
- virtual void EndStyles( USHORT nNumberOfStyles );
+ virtual void EndStyles( sal_uInt16 nNumberOfStyles );
/// Write default style.
- virtual void DefaultStyle( USHORT nStyle );
+ virtual void DefaultStyle( sal_uInt16 nStyle );
/// Start of a style in the styles table.
virtual void StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT nWwIdi, USHORT nId,
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwIdi, sal_uInt16 nId,
bool bAutoUpdate );
/// End of a style in the styles table.
virtual void EndStyle();
/// Start of (paragraph or run) properties of a style.
- virtual void StartStyleProperties( bool bParProp, USHORT nStyle );
+ virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle );
/// End of (paragraph or run) properties of a style.
virtual void EndStyleProperties( bool bParProp );
/// Numbering rule and Id.
- virtual void OutlineNumbering( BYTE nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
+ virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
/// Page break
/// As a paragraph property - the paragraph should be on the next page.
@@ -148,7 +148,7 @@ public:
/// Write a section break
/// msword::ColumnBreak or msword::PageBreak
- virtual void SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo = NULL );
+ virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL );
/// Start of the section properties.
virtual void StartSection();
@@ -162,7 +162,7 @@ public:
virtual void SectionFormProtection( bool bProtected );
/// Numbering of the lines in the document.
- virtual void SectionLineNumbering( ULONG nRestartNo, const SwLineNumberInfo& rLnNumInfo );
+ virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo );
/// Has different headers/footers for the title page.
virtual void SectionTitlePage();
@@ -176,24 +176,24 @@ public:
/// The style of the page numbers.
///
/// nPageRestartNumberr being 0 means no restart.
- virtual void SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber );
+ virtual void SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber );
/// The type of breaking.
- virtual void SectionType( BYTE nBreakCode );
+ virtual void SectionType( sal_uInt8 nBreakCode );
/// Special header/footer flags, needed for old versions only.
- virtual void SectionWW6HeaderFooterFlags( BYTE nHeadFootFlags );
+ virtual void SectionWW6HeaderFooterFlags( sal_uInt8 nHeadFootFlags );
/// Definition of a numbering instance.
- virtual void NumberingDefinition( USHORT nId, const SwNumRule &rRule );
+ virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule );
/// All the numbering level information.
- virtual void NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+ virtual void NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE *pNumLvlPos,
- BYTE nFollow,
+ const sal_uInt8 *pNumLvlPos,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -371,7 +371,7 @@ protected:
virtual void FormatBox( const SvxBoxItem& );
/// Sfx item RES_COL
- virtual void FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
+ virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
/// Sfx item RES_KEEP
virtual void FormatKeep( const SvxFmtKeepItem& );
@@ -403,24 +403,24 @@ protected:
///
/// We have to remember these positions between the StartStyle() and
/// EndStyle().
- USHORT nPOPosStdLen1, nPOPosStdLen2;
+ sal_uInt16 nPOPosStdLen1, nPOPosStdLen2;
/// For output of styles.
///
/// We have to remember this position between StartStyleProperties() and
/// EndStyleProperties().
- USHORT m_nStyleStartSize, m_nStyleLenPos;
+ sal_uInt16 m_nStyleStartSize, m_nStyleLenPos;
/// For output of styles.
///
/// Used between StartStyles() and EndStyles().
- ULONG m_nStyAnzPos;
+ sal_uLong m_nStyAnzPos;
/// For output of run properties.
///
/// We have to remember the number of field results, and do not export end
/// of the field results if we were forced to split text.
- USHORT m_nFieldResults;
+ sal_uInt16 m_nFieldResults;
public:
WW8AttributeOutput( WW8Export &rWW8Export ) : AttributeOutputBase(), m_rWW8Export( rWW8Export ) {}
@@ -432,10 +432,10 @@ public:
protected:
/// Output the bold etc. attributes
- void OutputWW8Attribute( BYTE nId, bool bVal );
+ void OutputWW8Attribute( sal_uInt8 nId, bool bVal );
/// Output the bold etc. attributes, the Complex Text Layout version
- void OutputWW8AttributeCTL( BYTE nId, bool bVal );
+ void OutputWW8AttributeCTL( sal_uInt8 nId, bool bVal );
};
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index 3dc151feb782..380b38a34411 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -45,7 +45,7 @@
#include "ww8par.hxx"
-WW8Glossary::WW8Glossary(SvStorageStreamRef &refStrm, BYTE nVersion,
+WW8Glossary::WW8Glossary(SvStorageStreamRef &refStrm, sal_uInt8 nVersion,
SvStorage *pStg)
: pGlossary(0), rStrm(refStrm), xStg(pStg), nStrings(0)
{
@@ -69,7 +69,7 @@ WW8Glossary::WW8Glossary(SvStorageStreamRef &refStrm, BYTE nVersion,
bool WW8Glossary::HasBareGraphicEnd(SwDoc *pDoc,SwNodeIndex &rIdx)
{
bool bRet=false;
- for( USHORT nCnt = pDoc->GetSpzFrmFmts()->Count(); nCnt; )
+ for( sal_uInt16 nCnt = pDoc->GetSpzFrmFmts()->Count(); nCnt; )
{
SwFrmFmt* pFrmFmt = (*pDoc->GetSpzFrmFmts())[ --nCnt ];
if ( RES_FLYFRMFMT != pFrmFmt->Which() &&
@@ -120,7 +120,7 @@ bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks,
{
SwTxtFmtColl* pColl = pD->GetTxtCollFromPool
(RES_POOLCOLL_STANDARD, false);
- USHORT nGlosEntry = 0;
+ sal_uInt16 nGlosEntry = 0;
SwCntntNode* pCNd = 0;
do {
SwPaM aPam( aStart );
@@ -154,7 +154,7 @@ bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks,
// sttbfglsystyle list that this entry belongs to. Unused at the
// moment
const ww::bytes &rData = rExtra[nGlosEntry];
- USHORT n = SVBT16ToShort( &(rData[2]) );
+ sal_uInt16 n = SVBT16ToShort( &(rData[2]) );
if(n != 0xFFFF)
{
rBlocks.ClearDoc();
@@ -164,9 +164,9 @@ bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks,
// Need to check make sure the shortcut is not already being used
xub_StrLen nStart = 0;
- USHORT nCurPos = rBlocks.GetIndex( sShortcut );
+ sal_uInt16 nCurPos = rBlocks.GetIndex( sShortcut );
xub_StrLen nLen = sShortcut.Len();
- while( (USHORT)-1 != nCurPos )
+ while( (sal_uInt16)-1 != nCurPos )
{
sShortcut.Erase( nLen ) +=
String::CreateFromInt32( ++nStart ); // add an Number to it
@@ -217,9 +217,9 @@ bool WW8Glossary::Load( SwTextBlocks &rBlocks, bool bSaveRelFile )
rStrm->Seek(0);
- if ( 0 != (nStrings = static_cast< USHORT >(aStrings.size())))
+ if ( 0 != (nStrings = static_cast< sal_uInt16 >(aStrings.size())))
{
- SfxObjectShellRef xDocSh(new SwDocShell(SFX_CREATE_MODE_INTERNAL));
+ SfxObjectShellLock xDocSh(new SwDocShell(SFX_CREATE_MODE_INTERNAL));
if (xDocSh->DoInitNew(0))
{
SwDoc *pD = ((SwDocShell*)(&xDocSh))->GetDoc();
@@ -256,11 +256,11 @@ bool WW8GlossaryFib::IsGlossaryFib()
return fGlsy;
}
-UINT32 WW8GlossaryFib::FindGlossaryFibOffset(SvStream & /* rTableStrm */,
+sal_uInt32 WW8GlossaryFib::FindGlossaryFibOffset(SvStream & /* rTableStrm */,
SvStream & /* rStrm */,
const WW8Fib &rFib)
{
- UINT32 nGlossaryFibOffset = 0;
+ sal_uInt32 nGlossaryFibOffset = 0;
if ( rFib.fDot ) // its a template
{
if ( rFib.pnNext )
diff --git a/sw/source/filter/ww8/ww8glsy.hxx b/sw/source/filter/ww8/ww8glsy.hxx
index c2d0a6ca64c5..fe7b4a33bf63 100644
--- a/sw/source/filter/ww8/ww8glsy.hxx
+++ b/sw/source/filter/ww8/ww8glsy.hxx
@@ -43,12 +43,12 @@ class SwNodeIndex;
class WW8GlossaryFib : public WW8Fib
{
public:
- WW8GlossaryFib( SvStream& rStrm, BYTE nWantedVersion ,
+ WW8GlossaryFib( SvStream& rStrm, sal_uInt8 nWantedVersion ,
SvStream& rTableStrm, const WW8Fib &rFib) : WW8Fib(rStrm,
nWantedVersion,FindGlossaryFibOffset(rTableStrm,rStrm,rFib)) {}
bool IsGlossaryFib();
private:
- UINT32 FindGlossaryFibOffset(SvStream &rTableStrm,SvStream &rStrm,
+ sal_uInt32 FindGlossaryFibOffset(SvStream &rTableStrm,SvStream &rStrm,
const WW8Fib &rFib);
};
@@ -65,18 +65,18 @@ private:
class WW8Glossary
{
public:
- WW8Glossary( SvStorageStreamRef &refStrm, BYTE nVersion, SvStorage *pStg=0);
+ WW8Glossary( SvStorageStreamRef &refStrm, sal_uInt8 nVersion, SvStorage *pStg=0);
bool Load( SwTextBlocks &rBlocks, bool bSaveRelFile );
~WW8Glossary() { delete pGlossary; }
WW8GlossaryFib *GetFib() { return pGlossary; }
- USHORT GetNoStrings() const { return nStrings; }
+ sal_uInt16 GetNoStrings() const { return nStrings; }
private:
WW8GlossaryFib *pGlossary;
SvStorageStreamRef xTableStream;
SvStorageStreamRef &rStrm;
SvStorageRef xStg;
- USHORT nStrings;
+ sal_uInt16 nStrings;
bool MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks, bool bSaveRelFile,
const ::std::vector<String>& rStrings,
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index ebd87c894887..92f7f74f97f2 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -152,7 +152,7 @@ Color WW8TransCol(SVBT32 nWC)
if (nWC[3] & 0x1)
{
//Special colour gray
- BYTE u = (BYTE)( (ULONG)( 200 - nWC[0] ) * 256 / 200 );
+ sal_uInt8 u = (sal_uInt8)( (sal_uLong)( 200 - nWC[0] ) * 256 / 200 );
return Color(u, u, u);
}
@@ -221,7 +221,7 @@ static void SetStdAttr( SfxItemSet& rSet, WW8_DP_LINETYPE& rL,
if( SVBT16ToShort( rL.lnps ) >= 1
&& SVBT16ToShort(rL.lnps ) <= 4 ){ // LinienStil
rSet.Put( XLineStyleItem( XLINE_DASH ) );
- INT16 nLen = SVBT16ToShort( rL.lnpw );
+ sal_Int16 nLen = SVBT16ToShort( rL.lnpw );
XDash aD( XDASH_RECT, 1, 2 * nLen, 1, 5 * nLen, 5 * nLen );
switch( SVBT16ToShort( rL.lnps ) ){
case 1: aD.SetDots( 0 ); // Dash
@@ -253,7 +253,7 @@ static void SetStdAttr( SfxItemSet& rSet, WW8_DP_LINETYPE& rL,
static void SetFill( SfxItemSet& rSet, WW8_DP_FILL& rFill )
{
- static BYTE nPatA[] =
+ static sal_uInt8 nPatA[] =
{
0, 0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80,
90, 50, 50, 50, 50, 50, 50, 33, 33, 33, 33, 33, 33
@@ -274,12 +274,12 @@ static void SetFill( SfxItemSet& rSet, WW8_DP_FILL& rFill )
{ // Brush -> Farbmischung
Color aB( WW8TransCol( rFill.dlpcBg ) );
Color aF( WW8TransCol( rFill.dlpcFg ) );
- aB.SetRed( (BYTE)( ( (ULONG)aF.GetRed() * nPatA[nPat]
- + (ULONG)aB.GetRed() * ( 100 - nPatA[nPat] ) ) / 100 ) );
- aB.SetGreen( (BYTE)( ( (ULONG)aF.GetGreen() * nPatA[nPat]
- + (ULONG)aB.GetGreen() * ( 100 - nPatA[nPat] ) ) / 100 ) );
- aB.SetBlue( (BYTE)( ( (ULONG)aF.GetBlue() * nPatA[nPat]
- + (ULONG)aB.GetBlue() * ( 100 - nPatA[nPat] ) ) / 100 ) );
+ aB.SetRed( (sal_uInt8)( ( (sal_uLong)aF.GetRed() * nPatA[nPat]
+ + (sal_uLong)aB.GetRed() * ( 100 - nPatA[nPat] ) ) / 100 ) );
+ aB.SetGreen( (sal_uInt8)( ( (sal_uLong)aF.GetGreen() * nPatA[nPat]
+ + (sal_uLong)aB.GetGreen() * ( 100 - nPatA[nPat] ) ) / 100 ) );
+ aB.SetBlue( (sal_uInt8)( ( (sal_uLong)aF.GetBlue() * nPatA[nPat]
+ + (sal_uLong)aB.GetBlue() * ( 100 - nPatA[nPat] ) ) / 100 ) );
rSet.Put( XFillColorItem( aEmptyStr, aB ) );
}
}
@@ -288,7 +288,7 @@ static void SetFill( SfxItemSet& rSet, WW8_DP_FILL& rFill )
static void SetLineEndAttr( SfxItemSet& rSet, WW8_DP_LINEEND& rLe,
WW8_DP_LINETYPE& rLt )
{
- UINT16 aSB = SVBT16ToShort( rLe.aStartBits );
+ sal_uInt16 aSB = SVBT16ToShort( rLe.aStartBits );
if( aSB & 0x3 )
{
::basegfx::B2DPolygon aPolygon;
@@ -297,14 +297,14 @@ static void SetLineEndAttr( SfxItemSet& rSet, WW8_DP_LINEEND& rLe,
aPolygon.append(::basegfx::B2DPoint(200.0, 330.0));
aPolygon.setClosed(true);
rSet.Put( XLineEndItem( aEmptyStr, ::basegfx::B2DPolyPolygon(aPolygon) ) );
- USHORT nSiz = SVBT16ToShort( rLt.lnpw )
+ sal_uInt16 nSiz = SVBT16ToShort( rLt.lnpw )
* ( ( aSB >> 2 & 0x3 ) + ( aSB >> 4 & 0x3 ) );
if( nSiz < 220 ) nSiz = 220;
rSet.Put(XLineEndWidthItem(nSiz));
rSet.Put(XLineEndCenterItem(false));
}
- UINT16 aEB = SVBT16ToShort( rLe.aEndBits );
+ sal_uInt16 aEB = SVBT16ToShort( rLe.aEndBits );
if( aEB & 0x3 ){
::basegfx::B2DPolygon aPolygon;
aPolygon.append(::basegfx::B2DPoint(0.0, 330.0));
@@ -312,7 +312,7 @@ static void SetLineEndAttr( SfxItemSet& rSet, WW8_DP_LINEEND& rLe,
aPolygon.append(::basegfx::B2DPoint(200.0, 330.0));
aPolygon.setClosed(true);
rSet.Put( XLineStartItem( aEmptyStr, ::basegfx::B2DPolyPolygon(aPolygon) ) );
- USHORT nSiz = SVBT16ToShort( rLt.lnpw )
+ sal_uInt16 nSiz = SVBT16ToShort( rLt.lnpw )
* ( ( aEB >> 2 & 0x3 ) + ( aEB >> 4 & 0x3 ) );
if( nSiz < 220 ) nSiz = 220;
rSet.Put(XLineStartWidthItem(nSiz));
@@ -334,13 +334,13 @@ SdrObject* SwWW8ImplReader::ReadLine( WW8_DPHEAD* pHd, const WW8_DO* pDo,
Point& rP0 = aP[0];
Point& rP1 = aP[1];
- rP0.X() = (INT16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2;
- rP0.Y() = (INT16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2;
+ rP0.X() = (sal_Int16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2;
+ rP0.Y() = (sal_Int16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2;
rP1 = rP0;
- rP0.X() += (INT16)SVBT16ToShort( aLine.xaStart );
- rP0.Y() += (INT16)SVBT16ToShort( aLine.yaStart );
- rP1.X() += (INT16)SVBT16ToShort( aLine.xaEnd );
- rP1.Y() += (INT16)SVBT16ToShort( aLine.yaEnd );
+ rP0.X() += (sal_Int16)SVBT16ToShort( aLine.xaStart );
+ rP0.Y() += (sal_Int16)SVBT16ToShort( aLine.yaStart );
+ rP1.X() += (sal_Int16)SVBT16ToShort( aLine.xaEnd );
+ rP1.Y() += (sal_Int16)SVBT16ToShort( aLine.yaEnd );
}
::basegfx::B2DPolygon aPolygon;
@@ -362,11 +362,11 @@ SdrObject* SwWW8ImplReader::ReadRect( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aRect, sizeof( aRect ), pHd, pDo, rSet ) )
return 0;
- Point aP0( (INT16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
- (INT16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
+ Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
+ (sal_Int16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += (INT16)SVBT16ToShort( pHd->dxa );
- aP1.Y() += (INT16)SVBT16ToShort( pHd->dya );
+ aP1.X() += (sal_Int16)SVBT16ToShort( pHd->dxa );
+ aP1.Y() += (sal_Int16)SVBT16ToShort( pHd->dya );
SdrObject* pObj = new SdrRectObj( Rectangle( aP0, aP1 ) );
@@ -384,11 +384,11 @@ SdrObject* SwWW8ImplReader::ReadElipse( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aElipse, sizeof( aElipse ), pHd, pDo, rSet ) )
return 0;
- Point aP0( (INT16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
- (INT16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
+ Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
+ (sal_Int16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += (INT16)SVBT16ToShort( pHd->dxa );
- aP1.Y() += (INT16)SVBT16ToShort( pHd->dya );
+ aP1.X() += (sal_Int16)SVBT16ToShort( pHd->dxa );
+ aP1.Y() += (sal_Int16)SVBT16ToShort( pHd->dya );
SdrObject* pObj = new SdrCircObj( OBJ_CIRC, Rectangle( aP0, aP1 ) );
@@ -406,22 +406,22 @@ SdrObject* SwWW8ImplReader::ReadArc( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aArc, sizeof( aArc ), pHd, pDo, rSet ) )
return 0;
- Point aP0( (INT16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
- (INT16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
+ Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
+ (sal_Int16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += (INT16)SVBT16ToShort( pHd->dxa ) * 2;
- aP1.Y() += (INT16)SVBT16ToShort( pHd->dya ) * 2;
+ aP1.X() += (sal_Int16)SVBT16ToShort( pHd->dxa ) * 2;
+ aP1.Y() += (sal_Int16)SVBT16ToShort( pHd->dya ) * 2;
short nA[] = { 2, 3, 1, 0 };
short nW = nA[ ( ( SVBT8ToByte( aArc.fLeft ) & 1 ) << 1 )
+ ( SVBT8ToByte( aArc.fUp ) & 1 ) ];
if( !SVBT8ToByte( aArc.fLeft ) ){
- aP0.Y() -= (INT16)SVBT16ToShort( pHd->dya );
- aP1.Y() -= (INT16)SVBT16ToShort( pHd->dya );
+ aP0.Y() -= (sal_Int16)SVBT16ToShort( pHd->dya );
+ aP1.Y() -= (sal_Int16)SVBT16ToShort( pHd->dya );
}
if( SVBT8ToByte( aArc.fUp ) ){
- aP0.X() -= (INT16)SVBT16ToShort( pHd->dxa );
- aP1.X() -= (INT16)SVBT16ToShort( pHd->dxa );
+ aP0.X() -= (sal_Int16)SVBT16ToShort( pHd->dxa );
+ aP1.X() -= (sal_Int16)SVBT16ToShort( pHd->dxa );
}
SdrObject* pObj = new SdrCircObj( OBJ_SECT, Rectangle( aP0, aP1 ),
@@ -441,18 +441,18 @@ SdrObject* SwWW8ImplReader::ReadPolyLine( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aPoly, sizeof( aPoly ), pHd, pDo, rSet ) )
return 0;
- UINT16 nCount = SVBT16ToShort( aPoly.aBits1 ) >> 1 & 0x7fff;
+ sal_uInt16 nCount = SVBT16ToShort( aPoly.aBits1 ) >> 1 & 0x7fff;
SVBT16 *pP = new SVBT16[nCount * 2];
pStrm->Read( pP, nCount * 4 ); // Punkte einlesen
Polygon aP( nCount );
Point aPt;
- USHORT i;
+ sal_uInt16 i;
for( i=0; i<nCount; i++ ){
aPt.X() = SVBT16ToShort( pP[i << 1] ) + nDrawXOfs2
- + (INT16)SVBT16ToShort( pHd->xa );
+ + (sal_Int16)SVBT16ToShort( pHd->xa );
aPt.Y() = SVBT16ToShort( pP[( i << 1 ) + 1] ) + nDrawYOfs2
- + (INT16)SVBT16ToShort( pHd->ya );
+ + (sal_Int16)SVBT16ToShort( pHd->ya );
aP[i] = aPt;
}
delete[] pP;
@@ -466,9 +466,9 @@ SdrObject* SwWW8ImplReader::ReadPolyLine( WW8_DPHEAD* pHd, const WW8_DO* pDo,
ESelection SwWW8ImplReader::GetESelection( long nCpStart, long nCpEnd )
{
- USHORT nPCnt = mpDrawEditEngine->GetParagraphCount();
- USHORT nSP = 0;
- USHORT nEP = 0;
+ sal_uInt16 nPCnt = mpDrawEditEngine->GetParagraphCount();
+ sal_uInt16 nSP = 0;
+ sal_uInt16 nEP = 0;
while( (nSP < nPCnt)
&& (nCpStart >= mpDrawEditEngine->GetTextLen( nSP ) + 1) )
{
@@ -483,7 +483,7 @@ ESelection SwWW8ImplReader::GetESelection( long nCpStart, long nCpEnd )
nCpEnd -= mpDrawEditEngine->GetTextLen( nEP ) + 1;
nEP++;
}
- return ESelection( nSP, (USHORT)nCpStart, nEP, (USHORT)nCpEnd );
+ return ESelection( nSP, (sal_uInt16)nCpStart, nEP, (sal_uInt16)nCpEnd );
}
// InsertTxbxStyAttrs() setzt die Style-Attribute in den uebergebenen ItemSet.
@@ -496,13 +496,13 @@ ESelection SwWW8ImplReader::GetESelection( long nCpStart, long nCpEnd )
// ignoriert.
// Es werden hierbei sowohl Para- wie auch Zeichen-Attribute in den
// ItemSet gestopft.
-void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, USHORT nColl )
+void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, sal_uInt16 nColl )
{
SwWW8StyInf * pStyInf = GetStyle(nColl);
if( pStyInf != NULL && pStyInf->pFmt && pStyInf->bColl )
{
const SfxPoolItem* pItem;
- for( USHORT i = POOLATTR_BEGIN; i < POOLATTR_END; i++ )
+ for( sal_uInt16 i = POOLATTR_BEGIN; i < POOLATTR_END; i++ )
{
//If we are set in the source and not set in the destination
//then add it in.
@@ -510,8 +510,8 @@ void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, USHORT nColl )
i, true, &pItem ) )
{
SfxItemPool *pEditPool = rS.GetPool();
- USHORT nWhich = i;
- USHORT nSlotId = rDoc.GetAttrPool().GetSlotId(nWhich);
+ sal_uInt16 nWhich = i;
+ sal_uInt16 nSlotId = rDoc.GetAttrPool().GetSlotId(nWhich);
if (
nSlotId && nWhich != nSlotId &&
0 != (nWhich = pEditPool->GetWhich(nSlotId)) &&
@@ -532,7 +532,7 @@ void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, USHORT nColl )
static void lcl_StripFields(String &rString, long &rNewStartCp)
{
- for(USHORT i=0; i < rString.Len(); i++)
+ for(sal_uInt16 i=0; i < rString.Len(); i++)
{
if( 0x13 == rString.GetChar( i ) )
{
@@ -626,7 +626,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
std::deque<Chunk> aChunks;
//Here store stack location
- USHORT nCurrentCount = static_cast< USHORT >(pCtrlStck->Count());
+ sal_uInt16 nCurrentCount = static_cast< sal_uInt16 >(pCtrlStck->Count());
while (nStart < nEndCp)
{
//nStart is the beginning of the attributes for this range, and
@@ -684,14 +684,14 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
{
if (bStartAttr)
{
- USHORT nCount = static_cast< USHORT >(pCtrlStck->Count());
+ sal_uInt16 nCount = static_cast< sal_uInt16 >(pCtrlStck->Count());
if (maFieldStack.empty() && Read_Field(&aRes))
{
String sURL;
- for (USHORT nI = static_cast< USHORT >(pCtrlStck->Count()); nI > nCount; --nI)
+ for (sal_uInt16 nI = static_cast< sal_uInt16 >(pCtrlStck->Count()); nI > nCount; --nI)
{
const SfxPoolItem *pItem = ((*pCtrlStck)[nI-1])->pAttr;
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if (nWhich == RES_TXTATR_INETFMT)
{
const SwFmtINetFmt *pURL =
@@ -724,14 +724,14 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
//to draw attributes
if (pCtrlStck->Count() - nCurrentCount)
{
- for (USHORT i = nCurrentCount; i < pCtrlStck->Count(); i++)
+ for (sal_uInt16 i = nCurrentCount; i < pCtrlStck->Count(); i++)
{
const SfxPoolItem *pItem = ((*pCtrlStck)[i])->pAttr;
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if( nWhich < RES_FLTRATTR_BEGIN ||
nWhich >= RES_FLTRATTR_END )
{
- USHORT nSlotId = rDoc.GetAttrPool().GetSlotId(nWhich);
+ sal_uInt16 nSlotId = rDoc.GetAttrPool().GetSlotId(nWhich);
if (
nSlotId && nWhich != nSlotId &&
0 != (nWhich = pEditPool->GetWhich(nSlotId)) &&
@@ -763,7 +763,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
//pop off as far as recorded location just in case there were some left
//unclosed
- for (USHORT nI = static_cast< USHORT >(pCtrlStck->Count()); nI > nCurrentCount; --nI)
+ for (sal_uInt16 nI = static_cast< sal_uInt16 >(pCtrlStck->Count()); nI > nCurrentCount; --nI)
pCtrlStck->DeleteAndDestroy(nI-1);
typedef std::deque<Chunk>::iterator myIter;
@@ -802,7 +802,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
}
bool SwWW8ImplReader::GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp,
- USHORT nTxBxS, USHORT nSequence)
+ sal_uInt16 nTxBxS, sal_uInt16 nSequence)
{
// rasch den TextBox-PLCF greifen
WW8PLCFspecial* pT = pPlcxMan ? pPlcxMan->GetTxbx() : 0;
@@ -867,7 +867,7 @@ bool SwWW8ImplReader::GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp,
return false;
}
// ggfs. entsprechende Anzahl Eintraege weitergehen
- for(USHORT iSequence = 0; iSequence < nSequence; iSequence++) (*pT)++;
+ for(sal_uInt16 iSequence = 0; iSequence < nSequence; iSequence++) (*pT)++;
// dann die tatsaechlichen Start und Ende ermitteln
if( (!pT->Get( rStartCp, pT0 ))
|| ( nMinStartCp > rStartCp ) )
@@ -910,7 +910,7 @@ bool SwWW8ImplReader::GetRangeAsDrawingString(String& rString, long nStartCp, lo
else if (nStartCp < nEndCp)
{
// den Text einlesen: kann sich ueber mehrere Pieces erstrecken!!!
- USHORT nLen = pSBase->WW8ReadString(*pStrm, rString,
+ sal_uInt16 nLen = pSBase->WW8ReadString(*pStrm, rString,
nStartCp + nOffset, nEndCp - nStartCp, GetCurrentCharSet());
OSL_ENSURE(nLen, "+Wo ist der Grafik-Text (8) ?");
if (nLen)
@@ -971,13 +971,13 @@ OutlinerParaObject* SwWW8ImplReader::ImportAsOutliner(String &rString, WW8_CP nS
// InsertTxbxText() fuegt fuer TextBoxen und CaptionBoxen den Text
// und die Attribute ein
SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
- Size* pObjSiz, USHORT nTxBxS, USHORT nSequence, long nPosCp,
+ Size* pObjSiz, sal_uInt16 nTxBxS, sal_uInt16 nSequence, long nPosCp,
SwFrmFmt* pOldFlyFmt, bool bMakeSdrGrafObj, bool& rbEraseTextObj,
bool* pbTestTxbxContainsText, long* pnStartCp, long* pnEndCp,
bool* pbContainsGraphics, SvxMSDffImportRec* pRecord)
{
SwFrmFmt* pFlyFmt = 0;
- ULONG nOld = pStrm->Tell();
+ sal_uLong nOld = pStrm->Tell();
ManTypes eType = pPlcxMan->GetManType() == MAN_HDFT ? MAN_TXBX_HDFT : MAN_TXBX;
@@ -1029,13 +1029,13 @@ SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
WW8SprmIter aSprmIter(aDesc.pMemPos, aDesc.nSprmsLen,
*mpSprmParser);
- const BYTE* pParams = aSprmIter.GetAktParams();
+ const sal_uInt8* pParams = aSprmIter.GetAktParams();
for( int nLoop = 0; nLoop < 2; ++nLoop )
{
while( aSprmIter.GetSprms()
&& (0 != (pParams = aSprmIter.GetAktParams())) )
{
- USHORT nAktId = aSprmIter.GetAktId();
+ sal_uInt16 nAktId = aSprmIter.GetAktId();
switch( nAktId )
{
case 75:
@@ -1184,7 +1184,7 @@ SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
}
-bool SwWW8ImplReader::TxbxChainContainsRealText(USHORT nTxBxS, long& rStartCp,
+bool SwWW8ImplReader::TxbxChainContainsRealText(sal_uInt16 nTxBxS, long& rStartCp,
long& rEndCp)
{
bool bErase, bContainsText;
@@ -1204,17 +1204,17 @@ SdrObject* SwWW8ImplReader::ReadTxtBox( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aTxtB, sizeof( aTxtB ), pHd, pDo, rSet ) )
return 0;
- Point aP0( (INT16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
- (INT16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
+ Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
+ (sal_Int16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += (INT16)SVBT16ToShort( pHd->dxa );
- aP1.Y() += (INT16)SVBT16ToShort( pHd->dya );
+ aP1.X() += (sal_Int16)SVBT16ToShort( pHd->dxa );
+ aP1.Y() += (sal_Int16)SVBT16ToShort( pHd->dya );
SdrObject* pObj = new SdrRectObj( OBJ_TEXT, Rectangle( aP0, aP1 ) );
pObj->SetModel( pDrawModel );
pObj->NbcSetSnapRect(Rectangle(aP0, aP1));
- Size aSize( (INT16)SVBT16ToShort( pHd->dxa ) ,
- (INT16)SVBT16ToShort( pHd->dya ) );
+ Size aSize( (sal_Int16)SVBT16ToShort( pHd->dxa ) ,
+ (sal_Int16)SVBT16ToShort( pHd->dya ) );
long nStartCpFly,nEndCpFly;
bool bContainsGraphics;
@@ -1246,33 +1246,33 @@ SdrObject* SwWW8ImplReader::ReadCaptionBox( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aCallB, sizeof( aCallB ), pHd, pDo, rSet ) )
return 0;
- UINT16 nCount = SVBT16ToShort( aCallB.dpPolyLine.aBits1 ) >> 1 & 0x7fff;
+ sal_uInt16 nCount = SVBT16ToShort( aCallB.dpPolyLine.aBits1 ) >> 1 & 0x7fff;
SVBT16 *pP = new SVBT16[nCount * 2];
pStrm->Read( pP, nCount * 4 ); // Punkte einlesen
- BYTE nTyp = (BYTE)nCount - 1;
+ sal_uInt8 nTyp = (sal_uInt8)nCount - 1;
if( nTyp == 1 && SVBT16ToShort( pP[0] ) == SVBT16ToShort( pP[2] ) )
nTyp = 0;
- Point aP0( (INT16)SVBT16ToShort( pHd->xa ) +
- (INT16)SVBT16ToShort( aCallB.dpheadTxbx.xa ) + nDrawXOfs2,
- (INT16)SVBT16ToShort( pHd->ya )
- + (INT16)SVBT16ToShort( aCallB.dpheadTxbx.ya ) + nDrawYOfs2 );
+ Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) +
+ (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.xa ) + nDrawXOfs2,
+ (sal_Int16)SVBT16ToShort( pHd->ya )
+ + (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.ya ) + nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += (INT16)SVBT16ToShort( aCallB.dpheadTxbx.dxa );
- aP1.Y() += (INT16)SVBT16ToShort( aCallB.dpheadTxbx.dya );
- Point aP2( (INT16)SVBT16ToShort( pHd->xa )
- + (INT16)SVBT16ToShort( aCallB.dpheadPolyLine.xa )
- + nDrawXOfs2 + (INT16)SVBT16ToShort( pP[0] ),
- (INT16)SVBT16ToShort( pHd->ya )
- + (INT16)SVBT16ToShort( aCallB.dpheadPolyLine.ya )
- + nDrawYOfs2 + (INT16)SVBT16ToShort( pP[1] ) );
+ aP1.X() += (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.dxa );
+ aP1.Y() += (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.dya );
+ Point aP2( (sal_Int16)SVBT16ToShort( pHd->xa )
+ + (sal_Int16)SVBT16ToShort( aCallB.dpheadPolyLine.xa )
+ + nDrawXOfs2 + (sal_Int16)SVBT16ToShort( pP[0] ),
+ (sal_Int16)SVBT16ToShort( pHd->ya )
+ + (sal_Int16)SVBT16ToShort( aCallB.dpheadPolyLine.ya )
+ + nDrawYOfs2 + (sal_Int16)SVBT16ToShort( pP[1] ) );
delete[] pP;
SdrCaptionObj* pObj = new SdrCaptionObj( Rectangle( aP0, aP1 ), aP2 );
pObj->SetModel( pDrawModel );
pObj->NbcSetSnapRect(Rectangle(aP0, aP1));
- Size aSize( (INT16)SVBT16ToShort( aCallB.dpheadTxbx.dxa ),
- (INT16)SVBT16ToShort( aCallB.dpheadTxbx.dya ) );
+ Size aSize( (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.dxa ),
+ (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.dya ) );
bool bEraseThisObject;
InsertTxbxText(pObj, &aSize, 0, 0, 0, 0, false, bEraseThisObject );
@@ -1291,21 +1291,21 @@ SdrObject* SwWW8ImplReader::ReadCaptionBox( WW8_DPHEAD* pHd, const WW8_DO* pDo,
SdrObject *SwWW8ImplReader::ReadGroup( WW8_DPHEAD* pHd, const WW8_DO* pDo,
SfxAllItemSet &rSet)
{
- INT16 nGrouped;
+ sal_Int16 nGrouped;
if( !ReadGrafStart( (void*)&nGrouped, sizeof( nGrouped ), pHd, pDo, rSet ) )
return 0;
#ifdef OSL_BIGENDIAN
- nGrouped = (INT16)SWAPSHORT( nGrouped );
+ nGrouped = (sal_Int16)SWAPSHORT( nGrouped );
#endif
- nDrawXOfs = nDrawXOfs + (INT16)SVBT16ToShort( pHd->xa );
- nDrawYOfs = nDrawYOfs + (INT16)SVBT16ToShort( pHd->ya );
+ nDrawXOfs = nDrawXOfs + (sal_Int16)SVBT16ToShort( pHd->xa );
+ nDrawYOfs = nDrawYOfs + (sal_Int16)SVBT16ToShort( pHd->ya );
SdrObject* pObj = new SdrObjGroup;
- short nLeft = (INT16)SVBT16ToShort( pHd->cb ) - sizeof( WW8_DPHEAD );
+ short nLeft = (sal_Int16)SVBT16ToShort( pHd->cb ) - sizeof( WW8_DPHEAD );
for (int i = 0; i < nGrouped; i++)
{
SfxAllItemSet aSet(pDrawModel->GetItemPool());
@@ -1320,8 +1320,8 @@ SdrObject *SwWW8ImplReader::ReadGroup( WW8_DPHEAD* pHd, const WW8_DO* pDo,
}
}
- nDrawXOfs = nDrawXOfs - (INT16)SVBT16ToShort( pHd->xa );
- nDrawYOfs = nDrawYOfs - (INT16)SVBT16ToShort( pHd->ya );
+ nDrawXOfs = nDrawXOfs - (sal_Int16)SVBT16ToShort( pHd->xa );
+ nDrawYOfs = nDrawYOfs - (sal_Int16)SVBT16ToShort( pHd->ya );
return pObj;
}
@@ -1500,10 +1500,10 @@ const WW8_BordersSO &WW8_BordersSO::Get0x01LineMatch(eBorderCode eCode)
return aLineTabVer8[eCode];
}
-INT32 SwMSDffManager::GetEscherLineMatch(MSO_LineStyle eStyle,
- MSO_SPT eShapeType, INT32 &rThick)
+sal_Int32 SwMSDffManager::GetEscherLineMatch(MSO_LineStyle eStyle,
+ MSO_SPT eShapeType, sal_Int32 &rThick)
{
- INT32 nOutsideThick = 0;
+ sal_Int32 nOutsideThick = 0;
/*
Beachte: im Gegensatz zu den Winword-ueblichen Tabellen- und
Rahmen-Randbreiten-Angaben, bei denen jeweils aus der Staerke *einer*
@@ -1559,17 +1559,17 @@ INT32 SwMSDffManager::GetEscherLineMatch(MSO_LineStyle eStyle,
//Returns the thickness of the line outside the frame, the logic of
//words positioning of borders around floating objects is that of a
//disturbed mind.
-INT32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
- MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, INT32 &rLineThick,
+sal_Int32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
+ MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, sal_Int32 &rLineThick,
SvxBoxItem& rBox )
{
- INT32 nOutsideThick = 0;
+ sal_Int32 nOutsideThick = 0;
if( !rLineThick )
return nOutsideThick;
WW8_BordersSO::eBorderCode nIdx = WW8_BordersSO::none;
- INT32 nLineThick=rLineThick;
+ sal_Int32 nLineThick=rLineThick;
nOutsideThick = SwMSDffManager::GetEscherLineMatch(eLineStyle,
eShapeType, rLineThick);
@@ -1679,7 +1679,7 @@ INT32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
aLine.SetDistance(rBorders.mnDist);
aLine.SetStyle( rBorders.mnType );
- for(USHORT nLine = 0; nLine < 4; ++nLine)
+ for(sal_uInt16 nLine = 0; nLine < 4; ++nLine)
rBox.SetLine(new SvxBorderLine( aLine ), nLine);
}
@@ -1714,16 +1714,16 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
const SfxItemSet& rOldSet = pSdrObj->GetMergedItemSet();
// einige Items koennen direkt so uebernommen werden
- const USHORT nDirectMatch = 2;
+ const sal_uInt16 nDirectMatch = 2;
static RES_FRMATR const aDirectMatch[ nDirectMatch ] =
{
RES_LR_SPACE, // Aussenabstand links/rechts: SvxLRSpaceItem
RES_UL_SPACE // Aussenabstand Oben/unten: SvxULSpaceItem
};
const SfxPoolItem* pPoolItem;
- for(USHORT nItem = 0; nItem < nDirectMatch; ++nItem)
+ for(sal_uInt16 nItem = 0; nItem < nDirectMatch; ++nItem)
if( SFX_ITEM_SET == rOldSet.GetItemState(
- static_cast< USHORT >(aDirectMatch[ nItem ]), false, &pPoolItem) )
+ static_cast< sal_uInt16 >(aDirectMatch[ nItem ]), false, &pPoolItem) )
{
rFlySet.Put( *pPoolItem );
}
@@ -1733,7 +1733,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
// Rahmen-GROESSE benoetigt!
SvxBoxItem aBox(sw::util::ItemGet<SvxBoxItem>(rFlySet, RES_BOX));
// dashed oder solid wird zu solid
- INT32 nLineThick = 0, nOutside=0;
+ sal_Int32 nLineThick = 0, nOutside=0;
// check if LineStyle is *really* set!
const SfxPoolItem* pItem;
@@ -1786,13 +1786,13 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
// set distances from box's border to text contained within the box
if( 0 < rInnerDist.Left() )
- aBox.SetDistance( (USHORT)rInnerDist.Left(), BOX_LINE_LEFT );
+ aBox.SetDistance( (sal_uInt16)rInnerDist.Left(), BOX_LINE_LEFT );
if( 0 < rInnerDist.Top() )
- aBox.SetDistance( (USHORT)rInnerDist.Top(), BOX_LINE_TOP );
+ aBox.SetDistance( (sal_uInt16)rInnerDist.Top(), BOX_LINE_TOP );
if( 0 < rInnerDist.Right() )
- aBox.SetDistance( (USHORT)rInnerDist.Right(), BOX_LINE_RIGHT );
+ aBox.SetDistance( (sal_uInt16)rInnerDist.Right(), BOX_LINE_RIGHT );
if( 0 < rInnerDist.Bottom() )
- aBox.SetDistance( (USHORT)rInnerDist.Bottom(), BOX_LINE_BOTTOM );
+ aBox.SetDistance( (sal_uInt16)rInnerDist.Bottom(), BOX_LINE_BOTTOM );
bool bFixSize = !(WW8ITEMVALUE(rOldSet, SDRATTR_TEXT_AUTOGROWHEIGHT,
SdrTextAutoGrowHeightItem));
@@ -1843,14 +1843,14 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
const Color aShdColor = static_cast< SdrShadowColorItem const & >(
rOldSet.Get(SDRATTR_SHADOWCOLOR)).GetColorValue();
- const INT32 nShdDistX = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWXDIST,
+ const sal_Int32 nShdDistX = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWXDIST,
SdrShadowXDistItem);
- const INT32 nShdDistY = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWYDIST,
+ const sal_Int32 nShdDistY = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWYDIST,
SdrShadowYDistItem);
aShadow.SetColor( Color( aShdColor ) );
- aShadow.SetWidth(writer_cast<USHORT>((Abs( nShdDistX) +
+ aShadow.SetWidth(writer_cast<sal_uInt16>((Abs( nShdDistX) +
Abs( nShdDistY )) / 2 ));
SvxShadowLocation eShdPosi;
@@ -1958,7 +1958,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
void SwWW8ImplReader::AdjustLRWrapForWordMargins(
const SvxMSDffImportRec &rRecord, SvxLRSpaceItem &rLR)
{
- UINT32 nXRelTo = SvxMSDffImportRec::RELTO_DEFAULT;
+ sal_uInt32 nXRelTo = SvxMSDffImportRec::RELTO_DEFAULT;
if ( rRecord.pXRelTo )
{
nXRelTo = *(rRecord.pXRelTo);
@@ -1969,7 +1969,7 @@ void SwWW8ImplReader::AdjustLRWrapForWordMargins(
if (rRecord.nXAlign == 1)
{
if ((nXRelTo == 0) || (nXRelTo == 2))
- rLR.SetLeft((USHORT)0);
+ rLR.SetLeft((sal_uInt16)0);
}
// Right adjustments - if horizontally aligned to right of
@@ -1977,19 +1977,19 @@ void SwWW8ImplReader::AdjustLRWrapForWordMargins(
if (rRecord.nXAlign == 3)
{
if ((nXRelTo == 0) || (nXRelTo == 2))
- rLR.SetRight((USHORT)0);
+ rLR.SetRight((sal_uInt16)0);
}
//Inside margin, remove left wrapping
if ((rRecord.nXAlign == 4) && (nXRelTo == 0))
{
- rLR.SetLeft((USHORT)0);
+ rLR.SetLeft((sal_uInt16)0);
}
//Outside margin, remove left wrapping
if ((rRecord.nXAlign == 5) && (nXRelTo == 0))
{
- rLR.SetRight((USHORT)0);
+ rLR.SetRight((sal_uInt16)0);
}
}
@@ -1997,7 +1997,7 @@ void SwWW8ImplReader::AdjustLRWrapForWordMargins(
void SwWW8ImplReader::AdjustULWrapForWordMargins(
const SvxMSDffImportRec &rRecord, SvxULSpaceItem &rUL)
{
- UINT32 nYRelTo = SvxMSDffImportRec::RELTO_DEFAULT;
+ sal_uInt32 nYRelTo = SvxMSDffImportRec::RELTO_DEFAULT;
if ( rRecord.pYRelTo )
{
nYRelTo = *(rRecord.pYRelTo);
@@ -2008,7 +2008,7 @@ void SwWW8ImplReader::AdjustULWrapForWordMargins(
if (rRecord.nYAlign == 1)
{
if ((nYRelTo == 0) || (nYRelTo == 1))
- rUL.SetUpper((USHORT)0);
+ rUL.SetUpper((sal_uInt16)0);
}
// Bottom adjustment - remove bottom wrapping if aligned to page or
@@ -2016,12 +2016,12 @@ void SwWW8ImplReader::AdjustULWrapForWordMargins(
if (rRecord.nYAlign == 3)
{
if ((nYRelTo == 0) || (nYRelTo == 1))
- rUL.SetLower((USHORT)0);
+ rUL.SetLower((sal_uInt16)0);
}
//Remove top margin if aligned vertically inside margin
if ((rRecord.nYAlign == 4) && (nYRelTo == 0))
- rUL.SetUpper((USHORT)0);
+ rUL.SetUpper((sal_uInt16)0);
}
void SwWW8ImplReader::MapWrapIntoFlyFmt(SvxMSDffImportRec* pRecord,
@@ -2032,15 +2032,15 @@ void SwWW8ImplReader::MapWrapIntoFlyFmt(SvxMSDffImportRec* pRecord,
if (pRecord->nDxWrapDistLeft || pRecord->nDxWrapDistRight)
{
- SvxLRSpaceItem aLR(writer_cast<USHORT>(pRecord->nDxWrapDistLeft),
- writer_cast<USHORT>(pRecord->nDxWrapDistRight), 0, 0, RES_LR_SPACE);
+ SvxLRSpaceItem aLR(writer_cast<sal_uInt16>(pRecord->nDxWrapDistLeft),
+ writer_cast<sal_uInt16>(pRecord->nDxWrapDistRight), 0, 0, RES_LR_SPACE);
AdjustLRWrapForWordMargins(*pRecord, aLR);
pFlyFmt->SetFmtAttr(aLR);
}
if (pRecord->nDyWrapDistTop || pRecord->nDyWrapDistBottom)
{
- SvxULSpaceItem aUL(writer_cast<USHORT>(pRecord->nDyWrapDistTop),
- writer_cast<USHORT>(pRecord->nDyWrapDistBottom), RES_UL_SPACE);
+ SvxULSpaceItem aUL(writer_cast<sal_uInt16>(pRecord->nDyWrapDistTop),
+ writer_cast<sal_uInt16>(pRecord->nDyWrapDistBottom), RES_UL_SPACE);
AdjustULWrapForWordMargins(*pRecord, aUL);
pFlyFmt->SetFmtAttr(aUL);
}
@@ -2136,11 +2136,10 @@ void SwWW8ImplReader::SetAttributesAtGrfNode( SvxMSDffImportRec* pRecord,
if( pIdx && 0 != (pGrfNd = rDoc.GetNodes()[pIdx->GetIndex() + 1]->GetGrfNode() ))
{
Size aSz(pGrfNd->GetTwipSize());
- // use type <sal_uInt64> instead of <ULONG> to get correct results
+ // use type <sal_uInt64> instead of sal_uLong to get correct results
// in the following calculations.
sal_uInt64 rHeight = aSz.Height();
sal_uInt64 rWidth = aSz.Width();
- // <--
if( !rWidth && pF)
rWidth = pF->nXaRight - pF->nXaLeft;
else if( !rHeight && pF)
@@ -2203,7 +2202,7 @@ void SwWW8ImplReader::SetAttributesAtGrfNode( SvxMSDffImportRec* pRecord,
//drawmode
if (WW8ITEMVALUE(rOldSet, SDRATTR_GRAFMODE, SdrGrafModeItem))
{
- SwDrawModeGrf aDrawMode( static_cast< USHORT >(WW8ITEMVALUE(rOldSet,
+ SwDrawModeGrf aDrawMode( static_cast< sal_uInt16 >(WW8ITEMVALUE(rOldSet,
SDRATTR_GRAFMODE, SdrGrafModeItem)) );
pGrfNd->SetAttr( aDrawMode );
}
@@ -2254,12 +2253,12 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
pRecord = &aRecordFromFSPA;
if (!(pRecord->pXRelTo) && pFSPA)
{
- pRecord->pXRelTo = new UINT32;
+ pRecord->pXRelTo = new sal_uInt32;
*(pRecord->pXRelTo) = pFSPA->nbx;
}
if (!(pRecord->pYRelTo) && pFSPA)
{
- pRecord->pYRelTo = new UINT32;
+ pRecord->pYRelTo = new sal_uInt32;
*(pRecord->pYRelTo) = pFSPA->nby;
}
@@ -2269,13 +2268,13 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
// nXRelTo - Page printable area, Page, Column, Character
// nYRelTo - Page printable area, Page, Paragraph, Line
- const UINT32 nCntXAlign = 6;
- const UINT32 nCntYAlign = 6;
+ const sal_uInt32 nCntXAlign = 6;
+ const sal_uInt32 nCntYAlign = 6;
- const UINT32 nCntRelTo = 4;
+ const sal_uInt32 nCntRelTo = 4;
- UINT32 nXAlign = nCntXAlign > pRecord->nXAlign ? pRecord->nXAlign : 1;
- UINT32 nYAlign = nCntYAlign > pRecord->nYAlign ? pRecord->nYAlign : 1;
+ sal_uInt32 nXAlign = nCntXAlign > pRecord->nXAlign ? pRecord->nXAlign : 1;
+ sal_uInt32 nYAlign = nCntYAlign > pRecord->nYAlign ? pRecord->nYAlign : 1;
if (pFSPA)
{
@@ -2297,11 +2296,10 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
*(pRecord->pYRelTo) = pFSPA->nby;
}
}
- // <--
}
- UINT32 nXRelTo = nCntRelTo > *(pRecord->pXRelTo) ? *(pRecord->pXRelTo) : 1;
- UINT32 nYRelTo = nCntRelTo > *(pRecord->pYRelTo) ? *(pRecord->pYRelTo) : 1;
+ sal_uInt32 nXRelTo = nCntRelTo > *(pRecord->pXRelTo) ? *(pRecord->pXRelTo) : 1;
+ sal_uInt32 nYRelTo = nCntRelTo > *(pRecord->pYRelTo) ? *(pRecord->pYRelTo) : 1;
RndStdIds eAnchor = IsInlineEscherHack() ? FLY_AS_CHAR : FLY_AT_CHAR; // #i43718#
@@ -2473,13 +2471,13 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
}
// #i84783#
-bool SwWW8ImplReader::IsObjectLayoutInTableCell( const UINT32 nLayoutInTableCell ) const
+bool SwWW8ImplReader::IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTableCell ) const
{
bool bIsObjectLayoutInTableCell = false;
if ( bVer8 )
{
- const UINT16 nWWVersion = pWwFib->nProduct & 0xE000;
+ const sal_uInt16 nWWVersion = pWwFib->nProduct & 0xE000;
switch ( nWWVersion )
{
case 0x0000: // version 8 aka Microsoft Word 97
@@ -2688,8 +2686,8 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
Get the record for top level object, so we can get the word anchoring
and wrapping information for it.
*/
- USHORT nRecCount = aData.GetRecCount();
- for (USHORT nTxbx=0; nTxbx < nRecCount; ++nTxbx )
+ sal_uInt16 nRecCount = aData.GetRecCount();
+ for (sal_uInt16 nTxbx=0; nTxbx < nRecCount; ++nTxbx )
{
pRecord = aData.GetRecord( nTxbx );
if (pRecord && pRecord->pObj == pObject)
@@ -2710,7 +2708,7 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
// inside table cell and its wrapping isn't 'SURROUND_THROUGH'
if (bLayoutInTableCell && eSurround != SURROUND_THROUGHT)
{
- SwFmtFollowTextFlow aFollowTextFlow( TRUE );
+ SwFmtFollowTextFlow aFollowTextFlow( sal_True );
aFlySet.Put( aFollowTextFlow );
}
@@ -2792,8 +2790,8 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
*/
if (aData.HasRecords())
{
- USHORT nCount = aData.GetRecCount();
- for (USHORT nTxbx=0; nTxbx < nCount; ++nTxbx)
+ sal_uInt16 nCount = aData.GetRecCount();
+ for (sal_uInt16 nTxbx=0; nTxbx < nCount; ++nTxbx)
{
pRecord = aData.GetRecord(nTxbx);
if (pRecord && pRecord->pObj && pRecord->aTextId.nTxBxS)
@@ -2887,7 +2885,7 @@ SwFrmFmt* SwWW8ImplReader::MungeTextIntoDrawBox(SdrObject* pTrueObject,
// Objekt ist Bestandteil einer Gruppe?
SdrObject* pGroupObject = pSdrTextObj->GetUpGroup();
- UINT32 nOrdNum = pSdrTextObj->GetOrdNum();
+ sal_uInt32 nOrdNum = pSdrTextObj->GetOrdNum();
bool bEraseThisObject;
InsertTxbxText( pSdrTextObj, &aObjSize, pRecord->aTextId.nTxBxS,
pRecord->aTextId.nSequence, nGrafAnchorCp, pRetFrmFmt,
@@ -3007,7 +3005,7 @@ SwFlyFrmFmt* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject,
deleted and useless.
*/
pMSDffManager->StoreShapeOrder(pF->nSpId,
- (((ULONG)pRecord->aTextId.nTxBxS) << 16) +
+ (((sal_uLong)pRecord->aTextId.nTxBxS) << 16) +
pRecord->aTextId.nSequence, 0, pRetFrmFmt);
// The Kontakt object has to be inserted into the draw page, so
@@ -3209,8 +3207,8 @@ void SwWW8FltAnchorStack::AddAnchor(const SwPosition& rPos, SwFrmFmt *pFmt)
void SwWW8FltAnchorStack::Flush()
{
- USHORT nCnt = static_cast< USHORT >(Count());
- for (USHORT i=0; i < nCnt; ++i)
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
+ for (sal_uInt16 i=0; i < nCnt; ++i)
{
SwFltStackEntry *pEntry = (*this)[i];
SwPosition aDummy(pEntry->nMkNode);
diff --git a/sw/source/filter/ww8/ww8graf.hxx b/sw/source/filter/ww8/ww8graf.hxx
index c0f7affeb352..516660a5defa 100644
--- a/sw/source/filter/ww8/ww8graf.hxx
+++ b/sw/source/filter/ww8/ww8graf.hxx
@@ -35,11 +35,11 @@
struct EscherShape
{
- ULONG mnEscherShapeOrder;
- ULONG mnNoInlines;
+ sal_uLong mnEscherShapeOrder;
+ sal_uLong mnNoInlines;
// new member <mbInHeaderFooter>
bool mbInHeaderFooter;
- EscherShape( ULONG nEscherShapeOrder,
+ EscherShape( sal_uLong nEscherShapeOrder,
bool _bInHeaderFooter )
: mnEscherShapeOrder(nEscherShapeOrder),
mnNoInlines(0),
@@ -64,24 +64,24 @@ private:
std::vector<short> maDrawHeight;
typedef std::vector<short>::iterator myditer;
- std::stack<USHORT> maIndexes;
+ std::stack<sal_uInt16> maIndexes;
sw::util::SetLayer maSetLayer;
- ULONG mnNoInitialObjects;
- ULONG mnInlines;
+ sal_uLong mnNoInitialObjects;
+ sal_uLong mnInlines;
SdrPage* mpDrawPg;
const SvxMSDffShapeOrders *mpShapeOrders;
- USHORT GetEscherObjectIdx(ULONG nSpId);
- myeiter MapEscherIdxToIter(ULONG nIdx);
+ sal_uInt16 GetEscherObjectIdx(sal_uLong nSpId);
+ myeiter MapEscherIdxToIter(sal_uLong nIdx);
// new parameter <_bInHeaderFooter>, indicating
// that object is in header or footer
- ULONG GetEscherObjectPos( ULONG nSpId,
+ sal_uLong GetEscherObjectPos( sal_uLong nSpId,
const bool _bInHeaderFooter );
// <--
- ULONG GetDrawingObjectPos(short nWwHeight);
- bool InsertObject(SdrObject *pObject, ULONG nPos);
+ sal_uLong GetDrawingObjectPos(short nWwHeight);
+ bool InsertObject(SdrObject *pObject, sal_uLong nPos);
public:
wwZOrderer(const sw::util::SetLayer &rSetLayer, SdrPage* pDrawPg,
const SvxMSDffShapeOrders *pShapeOrders);
@@ -93,10 +93,10 @@ public:
void InsertDrawingObject(SdrObject* pObj, short nWwHeight);
// new parameter <_bInHeaderFooter>, indicating that object is in header or footer
void InsertEscherObject( SdrObject* pObject,
- ULONG nSpId,
+ sal_uLong nSpId,
const bool _bInHeaderFooter );
// <--
- void InsideEscher(ULONG nIndex);
+ void InsideEscher(sal_uLong nIndex);
void OutsideEscher();
};
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index 3476226955ef..2bd9ab8b5681 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -71,7 +71,7 @@ wwZOrderer::wwZOrderer(const sw::util::SetLayer &rSetLayer, SdrPage* pDrawPg,
OSL_ENSURE(mpDrawPg,"Missing draw page impossible!");
}
-void wwZOrderer::InsideEscher(ULONG nSpId)
+void wwZOrderer::InsideEscher(sal_uLong nSpId)
{
maIndexes.push(GetEscherObjectIdx(nSpId));
}
@@ -83,15 +83,15 @@ void wwZOrderer::OutsideEscher()
// consider new parameter <_bInHeaderFooter>
void wwZOrderer::InsertEscherObject( SdrObject* pObject,
- ULONG nSpId,
+ sal_uLong nSpId,
const bool _bInHeaderFooter )
{
- ULONG nInsertPos = GetEscherObjectPos( nSpId, _bInHeaderFooter );
+ sal_uLong nInsertPos = GetEscherObjectPos( nSpId, _bInHeaderFooter );
// <--
InsertObject(pObject, nInsertPos + mnNoInitialObjects + mnInlines);
}
-wwZOrderer::myeiter wwZOrderer::MapEscherIdxToIter(ULONG nIdx)
+wwZOrderer::myeiter wwZOrderer::MapEscherIdxToIter(sal_uLong nIdx)
{
myeiter aIter = maEscherLayer.begin();
myeiter aEnd = maEscherLayer.end();
@@ -104,12 +104,12 @@ wwZOrderer::myeiter wwZOrderer::MapEscherIdxToIter(ULONG nIdx)
return aIter;
}
-USHORT wwZOrderer::GetEscherObjectIdx(ULONG nSpId)
+sal_uInt16 wwZOrderer::GetEscherObjectIdx(sal_uLong nSpId)
{
- USHORT nFound=0;
- USHORT nShapeCount = mpShapeOrders ? mpShapeOrders->Count() : 0;
+ sal_uInt16 nFound=0;
+ sal_uInt16 nShapeCount = mpShapeOrders ? mpShapeOrders->Count() : 0;
// First, find out what position this shape is in in the Escher order.
- for (USHORT nShapePos=0; nShapePos < nShapeCount; nShapePos++)
+ for (sal_uInt16 nShapePos=0; nShapePos < nShapeCount; nShapePos++)
{
const SvxMSDffShapeOrder *pOrder = mpShapeOrders->GetObject(nShapePos);
if (pOrder->nShapeId == nSpId)
@@ -122,7 +122,7 @@ USHORT wwZOrderer::GetEscherObjectIdx(ULONG nSpId)
}
// consider new parameter <_bInHeaderFooter>
-ULONG wwZOrderer::GetEscherObjectPos( ULONG nSpId,
+sal_uLong wwZOrderer::GetEscherObjectPos( sal_uLong nSpId,
const bool _bInHeaderFooter )
{
/*
@@ -130,12 +130,12 @@ ULONG wwZOrderer::GetEscherObjectPos( ULONG nSpId,
the actual ordering that should be used when inserting them into the
document.
*/
- USHORT nFound = GetEscherObjectIdx(nSpId);
+ sal_uInt16 nFound = GetEscherObjectIdx(nSpId);
// Match the ordering position from the ShapeOrders to the ordering of all
// objects in the document, there is a complexity when escherobjects
// contain inlines objects, we need to consider thsose as part of the
// escher count
- ULONG nRet=0;
+ sal_uLong nRet=0;
myeiter aIter = maEscherLayer.begin();
myeiter aEnd = maEscherLayer.end();
// skip objects in page header|footer,
@@ -176,7 +176,7 @@ ULONG wwZOrderer::GetEscherObjectPos( ULONG nSpId,
// einem VarArr
void wwZOrderer::InsertDrawingObject(SdrObject* pObj, short nWwHeight)
{
- ULONG nPos = GetDrawingObjectPos(nWwHeight);
+ sal_uLong nPos = GetDrawingObjectPos(nWwHeight);
if (nWwHeight & 0x2000) // Heaven ?
maSetLayer.SendObjectToHeaven(*pObj);
else
@@ -197,10 +197,10 @@ void wwZOrderer::InsertTextLayerObject(SdrObject* pObject)
{
//If we are inside an escher objects, place us just after that
//escher obj, and increment its inline count
- USHORT nIdx = maIndexes.top();
+ sal_uInt16 nIdx = maIndexes.top();
myeiter aEnd = MapEscherIdxToIter(nIdx);
- ULONG nInsertPos=0;
+ sal_uLong nInsertPos=0;
myeiter aIter = maEscherLayer.begin();
while (aIter != aEnd)
{
@@ -225,7 +225,7 @@ void wwZOrderer::InsertTextLayerObject(SdrObject* pObject)
// Der Offset bei Datei in bestehendes Dokument mit Grafiklayer einfuegen
// muss der Aufrufer den Index um mnNoInitialObjects erhoeht werden, damit die
// neuen Objekte am Ende landen ( Einfuegen ist dann schneller )
-ULONG wwZOrderer::GetDrawingObjectPos(short nWwHeight)
+sal_uLong wwZOrderer::GetDrawingObjectPos(short nWwHeight)
{
myditer aIter = maDrawHeight.begin();
myditer aEnd = maDrawHeight.end();
@@ -241,7 +241,7 @@ ULONG wwZOrderer::GetDrawingObjectPos(short nWwHeight)
return std::distance(maDrawHeight.begin(), aIter);
}
-bool wwZOrderer::InsertObject(SdrObject* pObject, ULONG nPos)
+bool wwZOrderer::InsertObject(SdrObject* pObject, sal_uLong nPos)
{
if (!pObject->IsInserted())
{
@@ -262,11 +262,11 @@ bool SwWW8ImplReader::GetPictGrafFromStream(Graphic& rGraphic, SvStream& rSrc)
}
bool SwWW8ImplReader::ReadGrafFile(String& rFileName, Graphic*& rpGraphic,
- const WW8_PIC& rPic, SvStream* pSt, ULONG nFilePos, bool* pbInDoc)
+ const WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos, bool* pbInDoc)
{ // Grafik in File schreiben
*pbInDoc = true; // default
- ULONG nPosFc = nFilePos + rPic.cbHeader;
+ sal_uLong nPosFc = nFilePos + rPic.cbHeader;
switch (rPic.MFP.mm)
{
@@ -313,7 +313,7 @@ bool SwWW8ImplReader::ReadGrafFile(String& rFileName, Graphic*& rpGraphic,
struct WW8PicDesc
{
- INT16 nCL, nCR, nCT, nCB;
+ sal_Int16 nCL, nCR, nCT, nCB;
long nWidth, nHeight;
WW8PicDesc( const WW8_PIC& rPic );
@@ -367,14 +367,14 @@ SwFlyFrmFmt* SwWW8ImplReader::MakeGrafNotInCntnt(const WW8PicDesc& rPD,
const Graphic* pGraph, const String& rFileName, const SfxItemSet& rGrfSet)
{
- UINT32 nWidth = rPD.nWidth;
- UINT32 nHeight = rPD.nHeight;
+ sal_uInt32 nWidth = rPD.nWidth;
+ sal_uInt32 nHeight = rPD.nHeight;
// Vertikale Verschiebung durch Zeilenabstand
- INT32 nNetHeight = nHeight + rPD.nCT + rPD.nCB;
+ sal_Int32 nNetHeight = nHeight + rPD.nCT + rPD.nCB;
if( pSFlyPara->nLineSpace && pSFlyPara->nLineSpace > nNetHeight )
pSFlyPara->nYPos =
- (USHORT)( pSFlyPara->nYPos + pSFlyPara->nLineSpace - nNetHeight );
+ (sal_uInt16)( pSFlyPara->nYPos + pSFlyPara->nLineSpace - nNetHeight );
WW8FlySet aFlySet(*this, pWFlyPara, pSFlyPara, true);
@@ -424,7 +424,7 @@ SwFrmFmt* SwWW8ImplReader::MakeGrafInCntnt(const WW8_PIC& rPic,
}
SwFrmFmt* SwWW8ImplReader::ImportGraf1(WW8_PIC& rPic, SvStream* pSt,
- ULONG nFilePos )
+ sal_uLong nFilePos )
{
SwFrmFmt* pRet = 0;
if( pSt->IsEof() || rPic.fError || rPic.MFP.mm == 99 )
@@ -499,7 +499,7 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
Wir mappen ansonsten die Variable pDataStream auf pStream.
*/
- ULONG nOldPos = pDataStream->Tell();
+ sal_uLong nOldPos = pDataStream->Tell();
WW8_PIC aPic;
pDataStream->Seek( nPicLocFc );
PicRead( pDataStream, &aPic, bVer67);
@@ -563,7 +563,7 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
if (0x66 == aPic.MFP.mm)
{
//These ones have names prepended
- BYTE nNameLen=0;
+ sal_uInt8 nNameLen=0;
*pDataStream >> nNameLen;
pDataStream->SeekRel( nNameLen );
}
@@ -653,7 +653,7 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
ReplaceObj(*pTextObj, *pObject);
else
{
- if (UINT16(OBJ_OLE2) == pObject->GetObjIdentifier())
+ if (sal_uInt16(OBJ_OLE2) == pObject->GetObjIdentifier())
{
// the size from BLIP, if there is any, should be already set
pRet = InsertOle(*((SdrOle2Obj*)pObject), aAttrSet, aGrSet);
@@ -743,7 +743,7 @@ void WW8PicShadowToReal( WW8_PIC_SHADOW * pPicS, WW8_PIC * pPic )
pPic->MFP.xExt = SVBT16ToShort( pPicS->MFP.xExt );
pPic->MFP.yExt = SVBT16ToShort( pPicS->MFP.yExt );
pPic->MFP.hMF = SVBT16ToShort( pPicS->MFP.hMF );
- for( USHORT i = 0; i < 14 ; i++ )
+ for( sal_uInt16 i = 0; i < 14 ; i++ )
pPic->rcWinMF[i] = SVBT8ToByte( pPicS->rcWinMF[i] );
pPic->dxaGoal = SVBT16ToShort( pPicS->dxaGoal );
pPic->dyaGoal = SVBT16ToShort( pPicS->dyaGoal );
@@ -769,7 +769,7 @@ void WW8FSPAShadowToReal( WW8_FSPA_SHADOW * pFSPAS, WW8_FSPA * pFSPA )
pFSPA->nXaRight = SVBT32ToUInt32( pFSPAS->nXaRight );
pFSPA->nYaBottom = SVBT32ToUInt32( pFSPAS->nYaBottom );
- USHORT nBits = SVBT16ToShort( pFSPAS->aBits1 );
+ sal_uInt16 nBits = SVBT16ToShort( pFSPAS->aBits1 );
pFSPA->bHdr = 0 != ( nBits & 0x0001 );
pFSPA->nbx = ( nBits & 0x0006 ) >> 1;
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index a2bae2ab3ca6..7bccdd6b027b 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -32,13 +32,17 @@
#include <boost/unordered_set.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/embed/XStorage.hpp>
+
#include <unotools/ucbstreamhelper.hxx>
#include <tools/solar.h>
#include <rtl/tencinfo.h>
+#include <rtl/random.h>
#include <sot/storage.hxx>
#include <sfx2/docinf.hxx>
#include <sfx2/docfile.hxx>
+#include <sfx2/request.hxx>
+#include <sfx2/frame.hxx>
#include <tools/urlobj.hxx>
#include <unotools/tempfile.hxx>
#include <svtools/sfxecode.hxx>
@@ -108,6 +112,7 @@
#include <com/sun/star/i18n/ForbiddenCharacters.hpp>
#include <comphelper/extract.hxx>
+#include <comphelper/sequenceashashmap.hxx>
#include <fltini.hxx>
#include <algorithm>
@@ -249,9 +254,9 @@ SwMSDffManager::SwMSDffManager( SwWW8ImplReader& rRdr )
nSvxMSDffOLEConvFlags = SwMSDffManager::GetFilterFlags();
}
-UINT32 SwMSDffManager::GetFilterFlags()
+sal_uInt32 SwMSDffManager::GetFilterFlags()
{
- UINT32 nFlags(0);
+ sal_uInt32 nFlags(0);
if (const SvtFilterOptions* pOpt = SvtFilterOptions::Get())
{
if (pOpt->IsMathType2Math())
@@ -333,23 +338,23 @@ void SwMSDffManager::EnableFallbackStream()
pFallbackStream = 0;
}
-USHORT SwWW8ImplReader::GetToggleAttrFlags() const
+sal_uInt16 SwWW8ImplReader::GetToggleAttrFlags() const
{
return pCtrlStck ? pCtrlStck->GetToggleAttrFlags() : 0;
}
-USHORT SwWW8ImplReader::GetToggleBiDiAttrFlags() const
+sal_uInt16 SwWW8ImplReader::GetToggleBiDiAttrFlags() const
{
return pCtrlStck ? pCtrlStck->GetToggleBiDiAttrFlags() : 0;
}
-void SwWW8ImplReader::SetToggleAttrFlags(USHORT nFlags)
+void SwWW8ImplReader::SetToggleAttrFlags(sal_uInt16 nFlags)
{
if (pCtrlStck)
pCtrlStck->SetToggleAttrFlags(nFlags);
}
-void SwWW8ImplReader::SetToggleBiDiAttrFlags(USHORT nFlags)
+void SwWW8ImplReader::SetToggleBiDiAttrFlags(sal_uInt16 nFlags)
{
if (pCtrlStck)
pCtrlStck->SetToggleBiDiAttrFlags(nFlags);
@@ -398,9 +403,9 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
SEEK_FROM_CURRENT_AND_RESTART )
&& maShapeRecords.Current()->nRecLen )
{
- UINT32 nBytesLeft = maShapeRecords.Current()->nRecLen;
- UINT32 nUDData;
- UINT16 nPID;
+ sal_uInt32 nBytesLeft = maShapeRecords.Current()->nRecLen;
+ sal_uInt32 nUDData;
+ sal_uInt16 nPID;
while( 5 < nBytesLeft )
{
rSt >> nPID;
@@ -413,27 +418,27 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
case 0x0390:
if (pImpRec->pXRelTo)
delete pImpRec->pXRelTo;
- pImpRec->pXRelTo = new UINT32;
+ pImpRec->pXRelTo = new sal_uInt32;
*(pImpRec->pXRelTo) = nUDData;
break;
case 0x0391: pImpRec->nYAlign = nUDData; break;
case 0x0392:
if (pImpRec->pYRelTo)
delete pImpRec->pYRelTo;
- pImpRec->pYRelTo = new UINT32;
+ pImpRec->pYRelTo = new sal_uInt32;
*(pImpRec->pYRelTo) = nUDData;
break;
case 0x03BF: pImpRec->nLayoutInTableCell = nUDData; break;
}
if ( rSt.GetError() != 0 )
break;
- pImpRec->bHasUDefProp = TRUE;
+ pImpRec->bHasUDefProp = sal_True;
nBytesLeft -= 6;
}
}
// Textrahmen, auch Title oder Outline
- UINT32 nTextId = GetPropertyValue( DFF_Prop_lTxid, 0 );
+ sal_uInt32 nTextId = GetPropertyValue( DFF_Prop_lTxid, 0 );
if( nTextId )
{
SfxItemSet aSet( pSdrModel->GetItemPool() );
@@ -442,7 +447,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
//textbox, this was changed for #88277# to be created as a simple
//rect to keep impress happy. For the rest of us we'd like to turn
//it back into a textbox again.
- BOOL bIsSimpleDrawingTextBox = (pImpRec->eShapeType == mso_sptTextBox);
+ sal_Bool bIsSimpleDrawingTextBox = (pImpRec->eShapeType == mso_sptTextBox);
if (!bIsSimpleDrawingTextBox)
{
//Either
@@ -459,17 +464,17 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
}
// Distance of Textbox to it's surrounding Autoshape
- INT32 nTextLeft = GetPropertyValue( DFF_Prop_dxTextLeft, 91440L);
- INT32 nTextRight = GetPropertyValue( DFF_Prop_dxTextRight, 91440L );
- INT32 nTextTop = GetPropertyValue( DFF_Prop_dyTextTop, 45720L );
- INT32 nTextBottom = GetPropertyValue( DFF_Prop_dyTextBottom, 45720L );
+ sal_Int32 nTextLeft = GetPropertyValue( DFF_Prop_dxTextLeft, 91440L);
+ sal_Int32 nTextRight = GetPropertyValue( DFF_Prop_dxTextRight, 91440L );
+ sal_Int32 nTextTop = GetPropertyValue( DFF_Prop_dyTextTop, 45720L );
+ sal_Int32 nTextBottom = GetPropertyValue( DFF_Prop_dyTextBottom, 45720L );
ScaleEmu( nTextLeft );
ScaleEmu( nTextRight );
ScaleEmu( nTextTop );
ScaleEmu( nTextBottom );
- INT32 nTextRotationAngle=0;
+ sal_Int32 nTextRotationAngle=0;
bool bVerticalText = false;
if ( IsProperty( DFF_Prop_txflTextFlow ) )
{
@@ -508,10 +513,10 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
rTextRect.Right() = rTextRect.Left() + rTextRect.GetHeight();
rTextRect.Bottom() = rTextRect.Top() + nWidth;
- INT32 nOldTextLeft = nTextLeft;
- INT32 nOldTextRight = nTextRight;
- INT32 nOldTextTop = nTextTop;
- INT32 nOldTextBottom = nTextBottom;
+ sal_Int32 nOldTextLeft = nTextLeft;
+ sal_Int32 nOldTextRight = nTextRight;
+ sal_Int32 nOldTextTop = nTextTop;
+ sal_Int32 nOldTextBottom = nTextBottom;
nTextLeft = nOldTextBottom;
nTextRight = nOldTextTop;
@@ -525,10 +530,10 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
rTextRect.Right() = rTextRect.Left() + rTextRect.GetHeight();
rTextRect.Bottom() = rTextRect.Top() + nWidth;
- INT32 nOldTextLeft = nTextLeft;
- INT32 nOldTextRight = nTextRight;
- INT32 nOldTextTop = nTextTop;
- INT32 nOldTextBottom = nTextBottom;
+ sal_Int32 nOldTextLeft = nTextLeft;
+ sal_Int32 nOldTextRight = nTextRight;
+ sal_Int32 nOldTextTop = nTextTop;
+ sal_Int32 nOldTextBottom = nTextBottom;
nTextLeft = nOldTextTop;
nTextRight = nOldTextBottom;
@@ -558,9 +563,9 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
if( bIsSimpleDrawingTextBox )
{
SvxMSDffShapeInfo aTmpRec( 0, pImpRec->nShapeId );
- aTmpRec.bSortByShapeId = TRUE;
+ aTmpRec.bSortByShapeId = sal_True;
- USHORT nFound;
+ sal_uInt16 nFound;
if( GetShapeInfos()->Seek_Entry( &aTmpRec, &nFound ) )
{
SvxMSDffShapeInfo& rInfo = *GetShapeInfos()->GetObject(nFound);
@@ -574,7 +579,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
if (GetPropertyValue(DFF_Prop_FitTextToShape) & 2)
{
- aSet.Put( SdrTextAutoGrowHeightItem( TRUE ) );
+ aSet.Put( SdrTextAutoGrowHeightItem( sal_True ) );
aSet.Put( SdrTextMinFrameHeightItem(
aNewRect.Bottom() - aNewRect.Top() ) );
aSet.Put( SdrTextMinFrameWidthItem(
@@ -582,19 +587,19 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
}
else
{
- aSet.Put( SdrTextAutoGrowHeightItem( FALSE ) );
- aSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
+ aSet.Put( SdrTextAutoGrowHeightItem( sal_False ) );
+ aSet.Put( SdrTextAutoGrowWidthItem( sal_False ) );
}
switch ( (MSO_WrapMode)
GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) )
{
case mso_wrapNone :
- aSet.Put( SdrTextAutoGrowWidthItem( TRUE ) );
+ aSet.Put( SdrTextAutoGrowWidthItem( sal_True ) );
pImpRec->bAutoWidth = true;
break;
case mso_wrapByPoints :
- aSet.Put( SdrTextContourFrameItem( TRUE ) );
+ aSet.Put( SdrTextContourFrameItem( sal_True ) );
break;
default:
;
@@ -736,7 +741,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
const SfxPoolItem* pPoolItem=NULL;
SfxItemState eState = aSet.GetItemState( XATTR_FILLCOLOR,
- FALSE, &pPoolItem );
+ sal_False, &pPoolItem );
if( SFX_ITEM_DEFAULT == eState )
aSet.Put( XFillColorItem( String(),
Color( mnDefaultColor ) ) );
@@ -745,17 +750,17 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
//Means that fBehindDocument is set
if (GetPropertyValue(DFF_Prop_fPrint) & 0x20)
- pImpRec->bDrawHell = TRUE;
+ pImpRec->bDrawHell = sal_True;
else
- pImpRec->bDrawHell = FALSE;
+ pImpRec->bDrawHell = sal_False;
if (GetPropertyValue(DFF_Prop_fPrint) & 0x02)
- pImpRec->bHidden = TRUE;
+ pImpRec->bHidden = sal_True;
pImpRec->nNextShapeId = GetPropertyValue( DFF_Prop_hspNext, 0 );
if ( nTextId )
{
- pImpRec->aTextId.nTxBxS = (UINT16)( nTextId >> 16 );
- pImpRec->aTextId.nSequence = (UINT16)nTextId;
+ pImpRec->aTextId.nTxBxS = (sal_uInt16)( nTextId >> 16 );
+ pImpRec->aTextId.nSequence = (sal_uInt16)nTextId;
}
pImpRec->nDxWrapDistLeft = GetPropertyValue(
@@ -803,7 +808,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
pImpRec->nCropFromRight = GetPropertyValue(
DFF_Prop_cropFromRight, 0 );
- UINT32 nLineFlags = GetPropertyValue( DFF_Prop_fNoLineDrawDash );
+ sal_uInt32 nLineFlags = GetPropertyValue( DFF_Prop_fNoLineDrawDash );
if ( !IsHardAttribute( DFF_Prop_fLine ) &&
pImpRec->eShapeType == mso_sptPictureFrame )
@@ -835,7 +840,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
&& (rObjData.nCalledByGroup < 2) )
)
StoreShapeOrder( pImpRec->nShapeId,
- ( ( (ULONG)pImpRec->aTextId.nTxBxS ) << 16 )
+ ( ( (sal_uLong)pImpRec->aTextId.nTxBxS ) << 16 )
+ pImpRec->aTextId.nSequence, pObj );
}
else
@@ -849,14 +854,14 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
# Spezial FastSave - Attribute
#**************************************************************************/
-void SwWW8ImplReader::Read_StyleCode( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_StyleCode( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (nLen < 0)
{
bCpxStyle = false;
return;
}
- USHORT nColl = 0;
+ sal_uInt16 nColl = 0;
if (pWwFib->GetFIBVersion() <= ww::eWW2)
nColl = *pData;
else
@@ -869,7 +874,7 @@ void SwWW8ImplReader::Read_StyleCode( USHORT, const BYTE* pData, short nLen )
}
// Read_Majority ist fuer Majority ( 103 ) und Majority50 ( 108 )
-void SwWW8ImplReader::Read_Majority( USHORT, const BYTE* , short )
+void SwWW8ImplReader::Read_Majority( sal_uInt16, const sal_uInt8* , short )
{
}
@@ -886,16 +891,16 @@ void SwWW8FltControlStack::NewAttr(const SwPosition& rPos,
SwFltControlStack::NewAttr(rPos, rAttr);
}
-void SwWW8FltControlStack::SetAttr(const SwPosition& rPos, USHORT nAttrId,
- BOOL bTstEnde, long nHand, BOOL )
+void SwWW8FltControlStack::SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId,
+ sal_Bool bTstEnde, long nHand, sal_Bool )
{
//Doing a textbox, and using the control stack only as a temporary
//collection point for properties which will are not to be set into
//the real document
if (rReader.pPlcxMan && rReader.pPlcxMan->GetDoingDrawTextBox())
{
- USHORT nCnt = static_cast< USHORT >(Count());
- for (USHORT i=0; i < nCnt; ++i)
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
+ for (sal_uInt16 i=0; i < nCnt; ++i)
{
SwFltStackEntry* pEntry = (*this)[i];
if (nAttrId == pEntry->pAttr->Which())
@@ -983,7 +988,7 @@ const SwNumFmt* SwWW8FltControlStack::GetNumFmtFromStack(const SwPosition &rPos,
if (rTxtNode.IsCountedInList())
{
const SwNumRule *pRule = pDoc->FindNumRulePtr(sName);
- BYTE nLvl = static_cast< BYTE >(rTxtNode.GetActualListLevel());
+ sal_uInt8 nLvl = static_cast< sal_uInt8 >(rTxtNode.GetActualListLevel());
pRet = &(pRule->Get(nLvl));
}
}
@@ -1009,8 +1014,8 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
if (pEntry->MakeRegion(pDoc, aRegion, false))
{
SvxLRSpaceItem aNewLR( *(SvxLRSpaceItem*)pEntry->pAttr );
- ULONG nStart = aRegion.Start()->nNode.GetIndex();
- ULONG nEnd = aRegion.End()->nNode.GetIndex();
+ sal_uLong nStart = aRegion.Start()->nNode.GetIndex();
+ sal_uLong nEnd = aRegion.End()->nNode.GetIndex();
for(; nStart <= nEnd; ++nStart)
{
SwNode* pNode = pDoc->GetNodes()[ nStart ];
@@ -1092,12 +1097,12 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
}
const SfxPoolItem* SwWW8FltControlStack::GetFmtAttr(const SwPosition& rPos,
- USHORT nWhich)
+ sal_uInt16 nWhich)
{
const SfxPoolItem *pItem = GetStackAttr(rPos, nWhich);
if (!pItem)
{
- const SwCntntNode *pNd = pDoc->GetNodes()[ rPos.nNode ]->GetCntntNode();
+ SwCntntNode const*const pNd = rPos.nNode.GetNode().GetCntntNode();
if (!pNd)
pItem = &pDoc->GetAttrPool().GetDefaultItem(nWhich);
else
@@ -1137,12 +1142,12 @@ const SfxPoolItem* SwWW8FltControlStack::GetFmtAttr(const SwPosition& rPos,
}
const SfxPoolItem* SwWW8FltControlStack::GetStackAttr(const SwPosition& rPos,
- USHORT nWhich)
+ sal_uInt16 nWhich)
{
SwNodeIndex aNode( rPos.nNode, -1 );
- USHORT nIdx = rPos.nContent.GetIndex();
+ sal_uInt16 nIdx = rPos.nContent.GetIndex();
- USHORT nSize = static_cast< USHORT >(Count());
+ sal_uInt16 nSize = static_cast< sal_uInt16 >(Count());
while (nSize)
{
const SwFltStackEntry* pEntry = (*this)[ --nSize ];
@@ -1163,10 +1168,10 @@ const SfxPoolItem* SwWW8FltControlStack::GetStackAttr(const SwPosition& rPos,
return 0;
}
-bool SwWW8FltRefStack::IsFtnEdnBkmField(const SwFmtFld& rFmtFld, USHORT& rBkmNo)
+bool SwWW8FltRefStack::IsFtnEdnBkmField(const SwFmtFld& rFmtFld, sal_uInt16& rBkmNo)
{
const SwField* pFld = rFmtFld.GetFld();
- USHORT nSubType;
+ sal_uInt16 nSubType;
if(pFld && (RES_GETREFFLD == pFld->Which())
&& ((REF_FOOTNOTE == (nSubType = pFld->GetSubType())) || (REF_ENDNOTE == nSubType))
&& ((SwGetRefField*)pFld)->GetSetRefName().Len())
@@ -1205,7 +1210,7 @@ void SwWW8FltRefStack::SetAttrInDoc(const SwPosition& rTmpPos,
// <NOT> got lost from revision 1.128 to 1.129
if (!RefToVar(pFld,pEntry))
{
- USHORT nBkmNo;
+ sal_uInt16 nBkmNo;
if( IsFtnEdnBkmField(rFmtFld, nBkmNo) )
{
::sw::mark::IMark const * const pMark = (pDoc->getIDocumentMarkAccess()->getMarksBegin() + nBkmNo)->get();
@@ -1219,7 +1224,7 @@ void SwWW8FltRefStack::SetAttrInDoc(const SwPosition& rTmpPos,
rBkMrkPos.nContent.GetIndex()-1, RES_TXTATR_FTN );
if( pFtn )
{
- USHORT nRefNo = ((SwTxtFtn*)pFtn)->GetSeqRefNo();
+ sal_uInt16 nRefNo = ((SwTxtFtn*)pFtn)->GetSeqRefNo();
((SwGetRefField*)pFld)->SetSeqNo( nRefNo );
@@ -1255,7 +1260,7 @@ void SwWW8FltRefStack::SetAttrInDoc(const SwPosition& rTmpPos,
into the document. If explicit left indent exist which affects them, then this
is handled when the explict left indent is set into the document
*/
-void SwWW8ImplReader::Read_Tab(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
if (nLen < 0)
{
@@ -1264,16 +1269,16 @@ void SwWW8ImplReader::Read_Tab(USHORT , const BYTE* pData, short nLen)
}
short i;
- const BYTE* pDel = pData + 1; // Del - Array
- BYTE nDel = pData[0];
- const BYTE* pIns = pData + 2*nDel + 2; // Ins - Array
- BYTE nIns = pData[nDel*2+1];
+ const sal_uInt8* pDel = pData + 1; // Del - Array
+ sal_uInt8 nDel = pData[0];
+ const sal_uInt8* pIns = pData + 2*nDel + 2; // Ins - Array
+ sal_uInt8 nIns = pData[nDel*2+1];
WW8_TBD* pTyp = (WW8_TBD*)(pData + 2*nDel + 2*nIns + 2);// Typ - Array
SvxTabStopItem aAttr(0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP);
const SwTxtFmtColl* pSty = 0;
- USHORT nTabBase;
+ sal_uInt16 nTabBase;
if (pAktColl) // StyleDef
{
nTabBase = pCollA[nAktColl].nBase;
@@ -1298,7 +1303,7 @@ void SwWW8ImplReader::Read_Tab(USHORT , const BYTE* pData, short nLen)
else
{
- USHORT nOldTabBase = nTabBase;
+ sal_uInt16 nOldTabBase = nTabBase;
// If based on another
if (nTabBase < nColls)
nTabBase = pCollA[nTabBase].nBase;
@@ -1326,7 +1331,7 @@ void SwWW8ImplReader::Read_Tab(USHORT , const BYTE* pData, short nLen)
SvxTabStop aTabStop;
for (i=0; i < nDel; ++i)
{
- USHORT nPos = aAttr.GetPos(SVBT16ToShort(pDel + i*2));
+ sal_uInt16 nPos = aAttr.GetPos(SVBT16ToShort(pDel + i*2));
if( nPos != SVX_TAB_NOTFOUND )
aAttr.Remove( nPos, 1 );
}
@@ -1370,7 +1375,7 @@ void SwWW8ImplReader::Read_Tab(USHORT , const BYTE* pData, short nLen)
break;
}
- USHORT nPos2 = aAttr.GetPos( nPos );
+ sal_uInt16 nPos2 = aAttr.GetPos( nPos );
if (nPos2 != SVX_TAB_NOTFOUND)
aAttr.Remove(nPos2, 1); // sonst weigert sich das Insert()
aAttr.Insert(aTabStop);
@@ -1442,7 +1447,7 @@ void SwWW8ImplReader::ImportDop()
rDoc.set(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT, false);
maTracer.Log(sw::log::eTabStopDistance);
// #i18732# - adjust default of option 'FollowTextFlow'
- rDoc.SetDefault( SwFmtFollowTextFlow( FALSE ) );
+ rDoc.SetDefault( SwFmtFollowTextFlow( sal_False ) );
// Import Default-Tabs
long nDefTabSiz = pWDop->dxaTab;
@@ -1450,7 +1455,7 @@ void SwWW8ImplReader::ImportDop()
nDefTabSiz = 709;
// wir wollen genau einen DefaultTab
- SvxTabStopItem aNewTab( 1, USHORT(nDefTabSiz), SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
+ SvxTabStopItem aNewTab( 1, sal_uInt16(nDefTabSiz), SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
((SvxTabStop&)aNewTab[0]).GetAdjustment() = SVX_TAB_ADJUST_DEFAULT;
rDoc.GetAttrPool().SetPoolDefaultItem( aNewTab );
@@ -1476,11 +1481,11 @@ void SwWW8ImplReader::ImportDop()
rDoc.set(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS, true);
// #i11860# - set new compatibility option
- // 'Use former object positioning' to <FALSE>
+ // 'Use former object positioning' to <sal_False>
rDoc.set(IDocumentSettingAccess::USE_FORMER_OBJECT_POS, false);
// #i27767# - set new compatibility option
- // 'Conder Wrapping mode when positioning object' to <TRUE>
+ // 'Conder Wrapping mode when positioning object' to <sal_True>
rDoc.set(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION, true);
rDoc.set(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING, false); // #i13832#, #i24135#
@@ -1740,9 +1745,9 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes)
sal_uInt32 nDateTime = 0;
- if (BYTE * pExtended = pPlcxMan->GetExtendedAtrds()) // Word < 2002 has no date data for comments
+ if (sal_uInt8 * pExtended = pPlcxMan->GetExtendedAtrds()) // Word < 2002 has no date data for comments
{
- ULONG nIndex = pSD->GetIdx() & 0xFFFF; //Index is (stupidly) multiplexed for WW8PLCFx_SubDocs
+ sal_uLong nIndex = pSD->GetIdx() & 0xFFFF; //Index is (stupidly) multiplexed for WW8PLCFx_SubDocs
if (pWwFib->lcbAtrdExtra/18 > nIndex)
nDateTime = SVBT32ToUInt32(*(SVBT32*)(pExtended+(nIndex*18)));
}
@@ -1823,16 +1828,16 @@ bool SwWW8ImplReader::isValid_HdFt_CP(WW8_CP nHeaderCP) const
return (nHeaderCP < pWwFib->ccpHdr) ? true : false;
}
-bool SwWW8ImplReader::HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt,
+bool SwWW8ImplReader::HasOwnHeaderFooter(sal_uInt8 nWhichItems, sal_uInt8 grpfIhdt,
int nSect)
{
if (pHdFt)
{
WW8_CP start;
long nLen;
- BYTE nNumber = 5;
+ sal_uInt8 nNumber = 5;
- for( BYTE nI = 0x20; nI; nI >>= 1, nNumber-- )
+ for( sal_uInt8 nI = 0x20; nI; nI >>= 1, nNumber-- )
{
if (nI & nWhichItems)
{
@@ -1856,7 +1861,7 @@ bool SwWW8ImplReader::HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt,
void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect,
const SwPageDesc *pPrev, const wwSection &rSection)
{
- BYTE nWhichItems = 0;
+ sal_uInt8 nWhichItems = 0;
SwPageDesc *pPD = 0;
if (!bIsTitle)
{
@@ -1872,16 +1877,16 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect,
pPD = rSection.mpTitlePage;
}
- BYTE grpfIhdt = rSection.maSep.grpfIhdt;
+ sal_uInt8 grpfIhdt = rSection.maSep.grpfIhdt;
if( pHdFt )
{
WW8_CP start;
long nLen;
- BYTE nNumber = 5;
+ sal_uInt8 nNumber = 5;
- for( BYTE nI = 0x20; nI; nI >>= 1, nNumber-- )
+ for( sal_uInt8 nI = 0x20; nI; nI >>= 1, nNumber-- )
{
if (nI & nWhichItems)
{
@@ -2072,9 +2077,9 @@ bool SwWW8ImplReader::SetSpacing(SwPaM &rMyPam, int nSpace, bool bIsUpper )
SvxULSpaceItem aUL(*pULSpaceItem);
if(bIsUpper)
- aUL.SetUpper( static_cast< USHORT >(nSpace) );
+ aUL.SetUpper( static_cast< sal_uInt16 >(nSpace) );
else
- aUL.SetLower( static_cast< USHORT >(nSpace) );
+ aUL.SetLower( static_cast< sal_uInt16 >(nSpace) );
xub_StrLen nEnd = pSpacingPos->nContent.GetIndex();
rMyPam.GetPoint()->nContent.Assign(rMyPam.GetCntntNode(), 0);
@@ -2096,7 +2101,7 @@ bool SwWW8ImplReader::SetUpperSpacing(SwPaM &rMyPam, int nSpace)
return SetSpacing(rMyPam, nSpace, true);
}
-USHORT SwWW8ImplReader::TabRowSprm(int nLevel) const
+sal_uInt16 SwWW8ImplReader::TabRowSprm(int nLevel) const
{
if (bVer67)
return 25;
@@ -2163,7 +2168,7 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
// 1st look for in-table flag, for 2000+ there is a subtable flag to
// be considered, the sprm 6649 gives the level of the table
- BYTE nCellLevel = 0;
+ sal_uInt8 nCellLevel = 0;
if (bVer67)
nCellLevel = 0 != pPlcxMan->HasParaSprm(24);
@@ -2184,14 +2189,14 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
WW8PLCFx_Cp_FKP* pPap = pPlcxMan->GetPapPLCF();
WW8_CP nMyStartCp=nStartCp;
- if (const BYTE *pLevel = pPlcxMan->HasParaSprm(0x6649))
+ if (const sal_uInt8 *pLevel = pPlcxMan->HasParaSprm(0x6649))
nCellLevel = *pLevel;
bool bHasRowEnd = SearchRowEnd(pPap, nMyStartCp, nCellLevel-1);
//Bad Table, remain unchanged in level, e.g. #i19667#
if (!bHasRowEnd)
- nCellLevel = static_cast< BYTE >(nInTable);
+ nCellLevel = static_cast< sal_uInt8 >(nInTable);
if (bHasRowEnd && ParseTabPos(&aTabPos,pPap))
pTabPos = &aTabPos;
@@ -2219,10 +2224,10 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
if( bAnl && !bTableRowEnd )
{
- const BYTE* pSprm13 = pPlcxMan->HasParaSprm( 13 );
+ const sal_uInt8* pSprm13 = pPlcxMan->HasParaSprm( 13 );
if( pSprm13 )
{ // Noch Anl ?
- BYTE nT = static_cast< BYTE >(GetNumType( *pSprm13 ));
+ sal_uInt8 nT = static_cast< sal_uInt8 >(GetNumType( *pSprm13 ));
if( ( nT != WW8_Pause && nT != nWwNumType ) // Anl-Wechsel
|| aApo.HasStartStop() // erzwungenes Anl-Ende
|| bStopTab || bStartTab )
@@ -2481,7 +2486,7 @@ sal_Size Custom8BitToUnicode(rtl_TextToUnicodeConverter hConverter,
return nDestChars;
}
-bool SwWW8ImplReader::LangUsesHindiNumbers(USHORT nLang)
+bool SwWW8ImplReader::LangUsesHindiNumbers(sal_uInt16 nLang)
{
bool bResult = false;
@@ -2559,11 +2564,11 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs)
p8Bits = new sal_Char[nLen];
// read the stream data
- BYTE nBCode = 0;
- UINT16 nUCode;
+ sal_uInt8 nBCode = 0;
+ sal_uInt16 nUCode;
xub_StrLen nL2;
- USHORT nCTLLang = 0;
+ sal_uInt16 nCTLLang = 0;
const SfxPoolItem * pItem = GetFmtAttr(RES_CHRATR_CTL_LANGUAGE);
if (pItem != NULL)
nCTLLang = dynamic_cast<const SvxLanguageItem *>(pItem)->GetLanguage();
@@ -2830,7 +2835,7 @@ bool SwWW8ImplReader::ReadChars(WW8_CP& rPos, WW8_CP nNextAttr, long nTextEnd,
{
if( bSymbol ) // Spezialzeichen einfuegen
{
- for(USHORT nCh = 0; nCh < nEnd - rPos; ++nCh)
+ for(sal_uInt16 nCh = 0; nCh < nEnd - rPos; ++nCh)
{
rDoc.InsertString( *pPaM, cSymbol );
}
@@ -2863,11 +2868,11 @@ bool SwWW8ImplReader::HandlePageBreakChar()
if (!nInTable)
{
//xushanchuan add for issue106569
- BOOL IsTemp=TRUE;
+ sal_Bool IsTemp=sal_True;
SwTxtNode* pTemp = pPaM->GetNode()->GetTxtNode();
if ( pTemp && !( pTemp->GetTxt().Len() ) && ( bFirstPara || bFirstParaOfPage ) )
{
- IsTemp = FALSE;
+ IsTemp = sal_False;
AppendTxtNode(*pPaM->GetPoint());
pTemp->SetAttr(*GetDfltAttr(RES_PARATR_NUMRULE));
}
@@ -2905,8 +2910,8 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
// ob die korrekte FilePos nicht schon erreicht ist.
pStrm->Seek( pSBase->WW8Cp2Fc(nCpOfs+nPosCp, &bIsUnicode) );
- BYTE nBCode;
- UINT16 nWCharVal;
+ sal_uInt8 nBCode;
+ sal_uInt16 nWCharVal;
if( bIsUnicode )
*pStrm >> nWCharVal; // unicode --> read 2 bytes
else
@@ -3078,7 +3083,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
void SwWW8ImplReader::ProcessAktCollChange(WW8PLCFManResult& rRes,
bool* pStartAttr, bool bCallProcessSpecial)
{
- USHORT nOldColl = nAktColl;
+ sal_uInt16 nOldColl = nAktColl;
nAktColl = pPlcxMan->GetColl();
// Invalid Style-Id
@@ -3185,7 +3190,7 @@ long SwWW8ImplReader::ReadTextAttr(WW8_CP& rTxtPos, bool& rbStartLine)
pCtrlStck->MarkAllAttrsOld();
bool bOldIgnoreText = bIgnoreText;
bIgnoreText = true;
- USHORT nOldColl = nAktColl;
+ sal_uInt16 nOldColl = nAktColl;
bool bDoPlcxManPlusPLus = true;
long nNext;
do
@@ -3258,12 +3263,12 @@ void SwWW8ImplReader::CloseAttrEnds()
{
//If there are any unclosed sprms then copy them to
//another stack and close the ones that must be closed
- std::stack<USHORT> aStack;
+ std::stack<sal_uInt16> aStack;
pPlcxMan->TransferOpenSprms(aStack);
while (!aStack.empty())
{
- USHORT nSprmId = aStack.top();
+ sal_uInt16 nSprmId = aStack.top();
if ((0 < nSprmId) && (( eFTN > nSprmId) || (0x0800 <= nSprmId)))
EndSprm(nSprmId);
aStack.pop();
@@ -3299,7 +3304,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
WW8_CP nNext = pPlcxMan->Where();
SwTxtNode* pPreviousNode = 0;
- BYTE nDropLines = 0;
+ sal_uInt8 nDropLines = 0;
SwCharFmt* pNewSwCharFmt = 0;
const SwCharFmt* pFmt = 0;
pStrm->Seek( pSBase->WW8Cp2Fc( nStartCp + nCpOfs, &bIsUnicode ) );
@@ -3342,7 +3347,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
aDrop.GetLines() = nDropLines;
aDrop.GetDistance() = nDistance;
- aDrop.GetChars() = writer_cast<BYTE>(nDropCapLen);
+ aDrop.GetChars() = writer_cast<sal_uInt8>(nDropCapLen);
// Word has no concept of a "whole word dropcap"
aDrop.GetWholeWord() = false;
@@ -3361,7 +3366,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
// If we have found a dropcap store the textnode
pPreviousNode = pPaM->GetNode()->GetTxtNode();
- const BYTE *pDCS;
+ const sal_uInt8 *pDCS;
if (bVer67)
pDCS = pPlcxMan->GetPapPLCF()->HasSprm(46);
@@ -3373,7 +3378,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
else // There is no Drop Cap Specifier hence no dropcap
pPreviousNode = 0;
- if (const BYTE *pDistance = pPlcxMan->GetPapPLCF()->HasSprm(0x842F))
+ if (const sal_uInt8 *pDistance = pPlcxMan->GetPapPLCF()->HasSprm(0x842F))
nDistance = SVBT16ToShort( pDistance );
else
nDistance = 0;
@@ -3405,7 +3410,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
// alle 64 CRs aufrufen not for Header u. ae.
if ((nCrCount++ & 0x40) == 0 && nType == MAN_MAINTEXT)
{
- nProgress = (USHORT)( l * 100 / nTextLen );
+ nProgress = (sal_uInt16)( l * 100 / nTextLen );
::SetProgressState(nProgress, mpDocShell); // Update
}
}
@@ -3459,7 +3464,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
# class SwWW8ImplReader
#**************************************************************************/
-SwWW8ImplReader::SwWW8ImplReader(BYTE nVersionPara, SvStorage* pStorage,
+SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SvStorage* pStorage,
SvStream* pSt, SwDoc& rD, const String& rBaseURL, bool bNewDoc) :
mpDocShell(rD.GetDocShell()),
maTracer(*(mpDocShell->GetMedium())),
@@ -3692,7 +3697,7 @@ SwFmtPageDesc wwSectionManager::SetSwFmtPageDesc(mySegIter &rIter,
}
else
{
- USHORT nPos = mrReader.rDoc.MakePageDesc(
+ sal_uInt16 nPos = mrReader.rDoc.MakePageDesc(
ViewShell::GetShellRes()->GetPageDescName(mnDesc, ShellResource::FIRST_PAGE)
, 0, false);
rIter->mpTitlePage = &mrReader.rDoc._GetPageDesc(nPos);
@@ -3711,7 +3716,7 @@ SwFmtPageDesc wwSectionManager::SetSwFmtPageDesc(mySegIter &rIter,
}
else
{
- USHORT nPos = mrReader.rDoc.MakePageDesc(
+ sal_uInt16 nPos = mrReader.rDoc.MakePageDesc(
ViewShell::GetShellRes()->GetPageDescName(mnDesc, ShellResource::NORMAL_PAGE),
rIter->mpTitlePage, false);
rIter->mpPage = &mrReader.rDoc._GetPageDesc(nPos);
@@ -3802,7 +3807,7 @@ void wwSectionManager::InsertSegments()
bool bThisAndNextAreCompatible = (aNext != aEnd) ? ((aIter->GetPageWidth() == aNext->GetPageWidth()) &&
(aIter->GetPageHeight() == aNext->GetPageHeight()) && (aIter->IsLandScape() == aNext->IsLandScape())) : true;
- if ((aNext != aEnd && aNext->IsContinous() && bThisAndNextAreCompatible) || bProtected)
+ if (((aNext != aEnd && aNext->IsContinous() && bThisAndNextAreCompatible) || bProtected))
{
bIgnoreCols = true;
if ((aIter->NoCols() > 1) || bProtected)
@@ -3859,8 +3864,7 @@ void wwSectionManager::InsertSegments()
}
const SwPosition* pPos = aSectPaM.GetPoint();
- const SwTxtNode* pSttNd =
- mrReader.rDoc.GetNodes()[ pPos->nNode ]->GetTxtNode();
+ SwTxtNode const*const pSttNd = pPos->nNode.GetNode().GetTxtNode();
const SwTableNode* pTableNd = pSttNd ? pSttNd->FindTableNode() : 0;
if (pTableNd)
{
@@ -3923,8 +3927,8 @@ void wwSectionManager::InsertSegments()
SwFmtPageDesc aDesc(SetSwFmtPageDesc(aIter, aStart, true));
if (aDesc.GetPageDesc())
{
- ULONG nStart = aSectPaM.Start()->nNode.GetIndex();
- ULONG nEnd = aSectPaM.End()->nNode.GetIndex();
+ sal_uLong nStart = aSectPaM.Start()->nNode.GetIndex();
+ sal_uLong nEnd = aSectPaM.End()->nNode.GetIndex();
for(; nStart <= nEnd; ++nStart)
{
SwNode* pNode = mrReader.rDoc.GetNodes()[nStart];
@@ -4202,9 +4206,9 @@ bool SwWW8ImplReader::ReadGlobalTemplateSettings( const rtl::OUString& sCreatedF
return bRes;
}
-ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
+sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
{
- ULONG nErrRet = 0;
+ sal_uLong nErrRet = 0;
if (mbNewDoc && pStg && !pGloss)
ReadDocInfo();
@@ -4257,7 +4261,7 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
SwNodeIndex aSttNdIdx( rDoc.GetNodes() );
SwRelNumRuleSpaces aRelNumRule(rDoc, mbNewDoc);
- USHORT eMode = nsRedlineMode_t::REDLINE_SHOW_INSERT;
+ sal_uInt16 eMode = nsRedlineMode_t::REDLINE_SHOW_INSERT;
mpSprmParser = new wwSprmParser(pWwFib->GetFIBVersion());
@@ -4390,10 +4394,9 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
// evtl. Zeilen eingefuegt / aufgebrochen werden
//
const SwPosition* pPos = pPaM->GetPoint();
- const SwTxtNode* pSttNd =
- rDoc.GetNodes()[ pPos->nNode ]->GetTxtNode();
+ SwTxtNode const*const pSttNd = pPos->nNode.GetNode().GetTxtNode();
- USHORT nCntPos = pPos->nContent.GetIndex();
+ sal_uInt16 nCntPos = pPos->nContent.GetIndex();
// EinfuegePos nicht in leerer Zeile
if( nCntPos && pSttNd->GetTxt().Len() )
@@ -4406,7 +4409,7 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
}
// verhinder das Einlesen von Tabellen in Fussnoten / Tabellen
- ULONG nNd = pPos->nNode.GetIndex();
+ sal_uLong nNd = pPos->nNode.GetIndex();
bReadNoTbl = 0 != pSttNd->FindTableNode() ||
( nNd < rDoc.GetNodes().GetEndOfInserts().GetIndex() &&
rDoc.GetNodes().GetEndOfInserts().StartOfSectionIndex()
@@ -4507,9 +4510,9 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
SvxMSDffShapeTxBxSort aTxBxSort;
// korrekte Z-Order der eingelesen Escher-Objekte sicherstellen
- USHORT nShapeCount = pMSDffManager->GetShapeOrders()->Count();
+ sal_uInt16 nShapeCount = pMSDffManager->GetShapeOrders()->Count();
- for (USHORT nShapeNum=0; nShapeNum < nShapeCount; nShapeNum++)
+ for (sal_uInt16 nShapeNum=0; nShapeNum < nShapeCount; nShapeNum++)
{
SvxMSDffShapeOrder *pOrder =
pMSDffManager->GetShapeOrders()->GetObject(nShapeNum);
@@ -4518,11 +4521,11 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
aTxBxSort.Insert(pOrder);
}
// zu verkettende Rahmen jetzt verketten
- USHORT nTxBxCount = aTxBxSort.Count();
+ sal_uInt16 nTxBxCount = aTxBxSort.Count();
if( nTxBxCount )
{
SwFmtChain aChain;
- for (USHORT nTxBxNum=0; nTxBxNum < nTxBxCount; nTxBxNum++)
+ for (sal_uInt16 nTxBxNum=0; nTxBxNum < nTxBxCount; nTxBxNum++)
{
SvxMSDffShapeOrder *pOrder =
aTxBxSort.GetObject(nTxBxNum);
@@ -4614,10 +4617,10 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
return nErrRet;
}
-ULONG SwWW8ImplReader::SetSubStreams(SvStorageStreamRef &rTableStream,
+sal_uLong SwWW8ImplReader::SetSubStreams(SvStorageStreamRef &rTableStream,
SvStorageStreamRef &rDataStream)
{
- ULONG nErrRet = 0;
+ sal_uLong nErrRet = 0;
// 6 stands for "6 OR 7", 7 stand for "ONLY 7"
switch (pWwFib->nVersion)
{
@@ -4692,18 +4695,18 @@ namespace
void DecryptXOR(msfilter::MSCodec_XorWord95 &rCtx, SvStream &rIn, SvStream &rOut)
{
- ULONG nSt = rIn.Tell();
+ sal_uLong nSt = rIn.Tell();
rIn.Seek(STREAM_SEEK_TO_END);
- ULONG nLen = rIn.Tell();
+ sal_uLong nLen = rIn.Tell();
rIn.Seek(nSt);
rCtx.InitCipher();
rCtx.Skip(nSt);
sal_uInt8 in[0x4096];
- for (ULONG nI = nSt; nI < nLen; nI += 0x4096)
+ for (sal_uLong nI = nSt; nI < nLen; nI += 0x4096)
{
- ULONG nBS = (nLen - nI > 0x4096 ) ? 0x4096 : nLen - nI;
+ sal_uLong nBS = (nLen - nI > 0x4096 ) ? 0x4096 : nLen - nI;
rIn.Read(in, nBS);
rCtx.Decode(in, nBS);
rOut.Write(in, nBS);
@@ -4720,7 +4723,7 @@ namespace
const SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem *pPasswordItem;
- if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, TRUE, &pPasswordItem))
+ if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, sal_True, &pPasswordItem))
aPassw = ((const SfxStringItem *)pPasswordItem)->GetValue();
else
{
@@ -4748,11 +4751,95 @@ namespace
return aPassw;
}
+ uno::Sequence< beans::NamedValue > InitXorWord95Codec( ::msfilter::MSCodec_XorWord95& rCodec, SfxMedium& rMedium, WW8Fib* pWwFib )
+ {
+ uno::Sequence< beans::NamedValue > aEncryptionData;
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pEncryptionData, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False );
+ if ( pEncryptionData && ( pEncryptionData->GetValue() >>= aEncryptionData ) && !rCodec.InitCodec( aEncryptionData ) )
+ aEncryptionData.realloc( 0 );
+
+ if ( !aEncryptionData.getLength() )
+ {
+ String sUniPassword = QueryPasswordForMedium( rMedium );
+
+ ByteString sPassword(sUniPassword, WW8Fib::GetFIBCharset( pWwFib->chseTables ) );
+
+ xub_StrLen nLen = sPassword.Len();
+ if( nLen <= 15 )
+ {
+ sal_uInt8 pPassword[16];
+ memset( pPassword, 0, sizeof( pPassword ) );
+
+ for (xub_StrLen nChar = 0; nChar < sPassword.Len(); ++nChar )
+ pPassword[nChar] = sPassword.GetChar(nChar);
+
+ rCodec.InitKey( pPassword );
+ aEncryptionData = rCodec.GetEncryptionData();
+
+ // the export supports RC4 algorithm only, so we have to generate the related EncryptionData as well,
+ // so that Save can export the document without asking for a password;
+ // as result there will be EncryptionData for both algorithms in the MediaDescriptor
+ ::msfilter::MSCodec_Std97 aCodec97;
+
+ // Generate random number with a seed of time as salt.
+ TimeValue aTime;
+ osl_getSystemTime( &aTime );
+ rtlRandomPool aRandomPool = rtl_random_createPool();
+ rtl_random_addBytes ( aRandomPool, &aTime, 8 );
+
+ sal_uInt8 pDocId[ 16 ];
+ rtl_random_getBytes( aRandomPool, pDocId, 16 );
+
+ rtl_random_destroyPool( aRandomPool );
+
+ sal_uInt16 pStd97Pass[16];
+ memset( pStd97Pass, 0, sizeof( pStd97Pass ) );
+ for (xub_StrLen nChar = 0; nChar < nLen; ++nChar )
+ pStd97Pass[nChar] = sUniPassword.GetChar(nChar);
+
+ aCodec97.InitKey( pStd97Pass, pDocId );
+
+ // merge the EncryptionData, there should be no conflicts
+ ::comphelper::SequenceAsHashMap aEncryptionHash( aEncryptionData );
+ aEncryptionHash.update( ::comphelper::SequenceAsHashMap( aCodec97.GetEncryptionData() ) );
+ aEncryptionHash >> aEncryptionData;
+ }
+ }
+
+ return aEncryptionData;
+ }
+
+ uno::Sequence< beans::NamedValue > InitStd97Codec( ::msfilter::MSCodec_Std97& rCodec, sal_uInt8 pDocId[16], SfxMedium& rMedium )
+ {
+ uno::Sequence< beans::NamedValue > aEncryptionData;
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pEncryptionData, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False );
+ if ( pEncryptionData && ( pEncryptionData->GetValue() >>= aEncryptionData ) && !rCodec.InitCodec( aEncryptionData ) )
+ aEncryptionData.realloc( 0 );
+
+ if ( !aEncryptionData.getLength() )
+ {
+ String sUniPassword = QueryPasswordForMedium( rMedium );
+
+ xub_StrLen nLen = sUniPassword.Len();
+ if ( nLen <= 15 )
+ {
+ sal_Unicode pPassword[16];
+ memset( pPassword, 0, sizeof( pPassword ) );
+ for (xub_StrLen nChar = 0; nChar < nLen; ++nChar )
+ pPassword[nChar] = sUniPassword.GetChar(nChar);
+
+ rCodec.InitKey( pPassword, pDocId );
+ aEncryptionData = rCodec.GetEncryptionData();
+ }
+ }
+
+ return aEncryptionData;
+ }
}
-ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
+sal_uLong SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
{
- ULONG nErrRet = 0;
+ sal_uLong nErrRet = 0;
if (pGloss)
pWwFib = pGloss->GetFib();
else
@@ -4801,31 +4888,22 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
if (bDecrypt)
{
nErrRet = ERRCODE_SVX_WRONGPASS;
- switch (eAlgo)
+ SfxMedium* pMedium = mpDocShell->GetMedium();
+
+ if ( pMedium )
{
- default:
- nErrRet = ERRCODE_SVX_READ_FILTER_CRYPT;
- break;
- case XOR:
+ switch (eAlgo)
{
- String sUniPassword =
- QueryPasswordForMedium(*(mpDocShell->GetMedium()));
-
- ByteString sPassword(sUniPassword,
- WW8Fib::GetFIBCharset(pWwFib->chseTables));
-
- xub_StrLen nLen = sPassword.Len();
- // DR: do not cut a wrong (too long) password
- if( nLen <= 15 )
+ default:
+ nErrRet = ERRCODE_SVX_READ_FILTER_CRYPT;
+ break;
+ case XOR:
{
- sal_uInt8 aPassword[16] = {0};
-
- for (xub_StrLen nChar = 0; nChar < sPassword.Len(); ++nChar )
- aPassword[nChar] = sPassword.GetChar(nChar);
-
msfilter::MSCodec_XorWord95 aCtx;
- aCtx.InitKey(aPassword);
- if (aCtx.VerifyKey(pWwFib->nKey, pWwFib->nHash))
+ uno::Sequence< beans::NamedValue > aEncryptionData = InitXorWord95Codec( aCtx, *pMedium, pWwFib );
+
+ // if initialization has failed the EncryptionData should be empty
+ if ( aEncryptionData.getLength() && aCtx.VerifyKey( pWwFib->nKey, pWwFib->nHash ) )
{
nErrRet = 0;
pTempMain = MakeTemp(aDecryptMain);
@@ -4857,22 +4935,15 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
DecryptXOR(aCtx, *pDataStream, aDecryptData);
pDataStream = &aDecryptData;
}
+
+ pMedium->GetItemSet()->ClearItem( SID_PASSWORD );
+ pMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) );
}
}
- }
- break;
- case RC4:
- {
- String sUniPassword =
- QueryPasswordForMedium(*(mpDocShell->GetMedium()));
-
- xub_StrLen nLen = sUniPassword.Len();
- // DR: do not cut a wrong (too long) password
- if (nLen <= 15)
+ break;
+ case RC4:
{
- sal_Unicode aPassword[16] = {0};
- for (xub_StrLen nChar = 0; nChar < nLen; ++nChar )
- aPassword[nChar] = sUniPassword.GetChar(nChar);
+ msfilter::MSCodec_Std97 aCtx;
sal_uInt8 aDocId[ 16 ];
pTableStream->Read(aDocId, 16);
@@ -4881,9 +4952,9 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
sal_uInt8 aSaltHash[ 16 ];
pTableStream->Read(aSaltHash, 16);
- msfilter::MSCodec_Std97 aCtx;
- aCtx.InitKey(aPassword, aDocId);
- if (aCtx.VerifyKey(aSaltData, aSaltHash))
+ // if initialization has failed the EncryptionData should be empty
+ uno::Sequence< beans::NamedValue > aEncryptionData = InitStd97Codec( aCtx, aDocId, *pMedium );
+ if ( aEncryptionData.getLength() && aCtx.VerifyKey( aSaltData, aSaltHash ) )
{
nErrRet = 0;
@@ -4913,17 +4984,13 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
DecryptRC4(aCtx, *pDataStream, aDecryptData);
pDataStream = &aDecryptData;
}
- SfxMedium* pMedium = mpDocShell->GetMedium();
- if ( pMedium )
- {
- SfxItemSet* pSet = pMedium->GetItemSet();
- if ( pSet )
- pSet->Put( SfxStringItem(SID_PASSWORD, sUniPassword) );
- }
+
+ pMedium->GetItemSet()->ClearItem( SID_PASSWORD );
+ pMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) );
}
}
+ break;
}
- break;
}
if (nErrRet == 0)
@@ -4952,9 +5019,9 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
class outlineeq : public std::unary_function<const SwTxtFmtColl*, bool>
{
private:
- BYTE mnNum;
+ sal_uInt8 mnNum;
public:
- outlineeq(BYTE nNum) : mnNum(nNum) {}
+ outlineeq(sal_uInt8 nNum) : mnNum(nNum) {}
bool operator()(const SwTxtFmtColl *pTest) const
{
return pTest->IsAssignedToListLevelOfOutlineStyle() && pTest->GetAssignedOutlineStyleLevel() == mnNum; //<-end,zhaojianwei
@@ -4984,7 +5051,7 @@ void SwWW8ImplReader::SetOutLineStyles()
If we are inserted into a document then don't clobber existing existing
levels.
*/
- USHORT nFlagsStyleOutlLevel = 0;
+ sal_uInt16 nFlagsStyleOutlLevel = 0;
if (!mbNewDoc)
{
// #i70748# - backward iteration needed due to the outline level attribute
@@ -5010,9 +5077,9 @@ void SwWW8ImplReader::SetOutLineStyles()
// instead of the memory pointer of the outline numbering rule
// to assure that, if two outline numbering rule affect the same
// count of text formats, always the same outline numbering rule is chosen.
- std::map<USHORT, int>aRuleMap;
- typedef std::map<USHORT, int>::iterator myIter;
- for (USHORT nI = 0; nI < nColls; ++nI)
+ std::map<sal_uInt16, int>aRuleMap;
+ typedef std::map<sal_uInt16, int>::iterator myIter;
+ for (sal_uInt16 nI = 0; nI < nColls; ++nI)
{
SwWW8StyInf& rSI = pCollA[ nI ];
if (
@@ -5062,15 +5129,15 @@ void SwWW8ImplReader::SetOutLineStyles()
}
}
- USHORT nOldFlags = nFlagsStyleOutlLevel;
+ sal_uInt16 nOldFlags = nFlagsStyleOutlLevel;
- for (USHORT nI = 0; nI < nColls; ++nI)
+ for (sal_uInt16 nI = 0; nI < nColls; ++nI)
{
SwWW8StyInf& rSI = pCollA[nI];
if (rSI.IsOutlineNumbered())
{
- USHORT nAktFlags = 1 << rSI.nOutlineLevel;
+ sal_uInt16 nAktFlags = 1 << rSI.nOutlineLevel;
if (
(nAktFlags & nFlagsStyleOutlLevel) ||
(rSI.pOutlineNumrule != mpChosenOutlineNumRule)
@@ -5118,8 +5185,8 @@ void SwWW8ImplReader::SetOutLineStyles()
physical mapping into the list style reged on that outline
style.
*/
- BYTE nFromLevel = rSI.nListLevel;
- BYTE nToLevel = rSI.nOutlineLevel;
+ sal_uInt8 nFromLevel = rSI.nListLevel;
+ sal_uInt8 nToLevel = rSI.nOutlineLevel;
const SwNumFmt& rRule=rSI.pOutlineNumrule->Get(nFromLevel);
aOutlineRule.Set(nToLevel, rRule);
((SwTxtFmtColl*)rSI.pFmt)->AssignToListLevelOfOutlineStyle(nToLevel); //<-end,zhaojianwei
@@ -5155,12 +5222,12 @@ const String* SwWW8ImplReader::GetAnnotationAuthor(sal_uInt16 nIdx)
if( bVer67 )
{
mpAtnNames->push_back(WW8ReadPString(rStrm, false));
- nRead += mpAtnNames->rbegin()->Len() + 1; // Laenge + BYTE Count
+ nRead += mpAtnNames->rbegin()->Len() + 1; // Laenge + sal_uInt8 Count
}
else
{
mpAtnNames->push_back(WW8Read_xstz(rStrm, 0, false));
- // UNICode: doppelte Laenge + USHORT Count
+ // UNICode: doppelte Laenge + sal_uInt16 Count
nRead += mpAtnNames->rbegin()->Len() * 2 + 2;
}
}
@@ -5173,9 +5240,9 @@ const String* SwWW8ImplReader::GetAnnotationAuthor(sal_uInt16 nIdx)
return pRet;
}
-ULONG SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss)
+sal_uLong SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss)
{
- ULONG nErrRet = 0;
+ sal_uLong nErrRet = 0;
{
static const sal_Char* aNames[ 13 ] = {
@@ -5206,7 +5273,7 @@ ULONG SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss)
m_bRegardHindiDigits = aVal[ 12 ] > 0;
}
- UINT16 nMagic;
+ sal_uInt16 nMagic;
*pStrm >> nMagic;
// beachte: 6 steht fuer "6 ODER 7", 7 steht fuer "NUR 7"
@@ -5222,10 +5289,10 @@ ULONG SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss)
// teste auf eigenen 97-Fake!
if (pStg && 0xa5ec == nMagic)
{
- ULONG nCurPos = pStrm->Tell();
+ sal_uLong nCurPos = pStrm->Tell();
if (pStrm->Seek(nCurPos + 22))
{
- UINT32 nfcMin;
+ sal_uInt32 nfcMin;
*pStrm >> nfcMin;
if (0x300 != nfcMin)
nErrRet = ERR_WW6_NO_WW6_FILE_ERR;
@@ -5259,9 +5326,9 @@ extern "C" SAL_DLLPUBLIC_EXPORT Reader* SAL_CALL ImportDOC()
return new WW8Reader();
}
-ULONG WW8Reader::OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize )
+sal_uLong WW8Reader::OpenMainStream( SvStorageStreamRef& rRef, sal_uInt16& rBuffSize )
{
- ULONG nRet = ERR_SWG_READ_ERROR;
+ sal_uLong nRet = ERR_SWG_READ_ERROR;
OSL_ENSURE( pStg, "wo ist mein Storage?" );
rRef = pStg->OpenSotStream(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WordDocument")),
@@ -5271,7 +5338,7 @@ ULONG WW8Reader::OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize )
{
if( SVSTREAM_OK == rRef->GetError() )
{
- USHORT nOld = rRef->GetBufferSize();
+ sal_uInt16 nOld = rRef->GetBufferSize();
rRef->SetBufferSize( rBuffSize );
rBuffSize = nOld;
nRet = 0;
@@ -5282,17 +5349,17 @@ ULONG WW8Reader::OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize )
return nRet;
}
-ULONG WW8Reader::Read(SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String & /* FileName */)
+sal_uLong WW8Reader::Read(SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String & /* FileName */)
{
- USHORT nOldBuffSize = 32768;
+ sal_uInt16 nOldBuffSize = 32768;
bool bNew = !bInsertMode; // Neues Doc ( kein Einfuegen )
SvStorageStreamRef refStrm; // damit uns keiner den Stream klaut
SvStream* pIn = pStrm;
- ULONG nRet = 0;
- BYTE nVersion = 8;
+ sal_uLong nRet = 0;
+ sal_uInt8 nVersion = 8;
String sFltName = GetFltName();
if( sFltName.EqualsAscii( "WW6" ) )
@@ -5363,18 +5430,18 @@ int WW8Reader::GetReaderType()
return SW_STORAGE_READER | SW_STREAM_READER;
}
-BOOL WW8Reader::HasGlossaries() const
+sal_Bool WW8Reader::HasGlossaries() const
{
return true;
}
-BOOL WW8Reader::ReadGlossaries(SwTextBlocks& rBlocks, BOOL bSaveRelFiles) const
+sal_Bool WW8Reader::ReadGlossaries(SwTextBlocks& rBlocks, sal_Bool bSaveRelFiles) const
{
bool bRet=false;
WW8Reader *pThis = const_cast<WW8Reader *>(this);
- USHORT nOldBuffSize = 32768;
+ sal_uInt16 nOldBuffSize = 32768;
SvStorageStreamRef refStrm;
if (!pThis->OpenMainStream(refStrm, nOldBuffSize))
{
@@ -5384,7 +5451,7 @@ BOOL WW8Reader::ReadGlossaries(SwTextBlocks& rBlocks, BOOL bSaveRelFiles) const
return bRet ? true : false;
}
-BOOL SwMSDffManager::GetOLEStorageName(long nOLEId, String& rStorageName,
+sal_Bool SwMSDffManager::GetOLEStorageName(long nOLEId, String& rStorageName,
SvStorageRef& rSrcStorage, uno::Reference < embed::XStorage >& rDestStorage) const
{
bool bRet = false;
@@ -5425,12 +5492,12 @@ BOOL SwMSDffManager::GetOLEStorageName(long nOLEId, String& rStorageName,
if (aDesc.nSprmsLen && aDesc.pMemPos) // Attribut(e) vorhanden
{
long nLen = aDesc.nSprmsLen;
- const BYTE* pSprm = aDesc.pMemPos;
+ const sal_uInt8* pSprm = aDesc.pMemPos;
while (nLen >= 2 && !nPictureId)
{
- USHORT nId = aSprmParser.GetSprmId(pSprm);
- USHORT nSL = aSprmParser.GetSprmSize(nId, pSprm);
+ sal_uInt16 nId = aSprmParser.GetSprmId(pSprm);
+ sal_uInt16 nSL = aSprmParser.GetSprmSize(nId, pSprm);
if( nLen < nSL )
break; // nicht mehr genug Bytes uebrig
@@ -5469,7 +5536,7 @@ BOOL SwMSDffManager::GetOLEStorageName(long nOLEId, String& rStorageName,
return bRet;
}
-BOOL SwMSDffManager::ShapeHasText(ULONG, ULONG) const
+sal_Bool SwMSDffManager::ShapeHasText(sal_uLong, sal_uLong) const
{
// Zur Zeit des Einlesens einer einzelnen Box, die womoeglich Teil einer
// Gruppe ist, liegen noch nicht genuegend Informationen vor, um
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 08698e63a301..2851b8860a3a 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -147,13 +147,13 @@ SV_DECL_PTRARR_SORT_DEL(WW8OleMaps, WW8OleMap_Ptr,16,16)
class WW8Reader : public StgReader
{
- virtual ULONG Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
- ULONG OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize );
+ virtual sal_uLong Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+ sal_uLong OpenMainStream( SvStorageStreamRef& rRef, sal_uInt16& rBuffSize );
public:
virtual int GetReaderType();
- virtual BOOL HasGlossaries() const;
- virtual BOOL ReadGlossaries( SwTextBlocks&, BOOL bSaveRelFiles ) const;
+ virtual sal_Bool HasGlossaries() const;
+ virtual sal_Bool ReadGlossaries( SwTextBlocks&, sal_Bool bSaveRelFiles ) const;
};
struct WW8OleMap
@@ -187,7 +187,7 @@ public:
enum ListLevel {nMinLevel=1, nMaxLevel=9};
//the rParaSprms returns back the original word paragraph indent
//sprms which were attached to the original numbering format
- SwNumRule* GetNumRuleForActivation(USHORT nLFOPosition, const BYTE nLevel,
+ SwNumRule* GetNumRuleForActivation(sal_uInt16 nLFOPosition, const sal_uInt8 nLevel,
std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode=0);
SwNumRule* CreateNextRule(bool bSimple);
~WW8ListManager();
@@ -199,12 +199,12 @@ private:
SvStream& rSt;
std::vector<WW8LSTInfo* > maLSTInfos;
WW8LFOInfos* pLFOInfos;// D. aus PLF LFO, sortiert genau wie im WW8 Stream
- USHORT nUniqueList; // current number for creating unique list names
- BYTE* GrpprlHasSprm(USHORT nId, BYTE& rSprms, BYTE nLen);
+ sal_uInt16 nUniqueList; // current number for creating unique list names
+ sal_uInt8* GrpprlHasSprm(sal_uInt16 nId, sal_uInt8& rSprms, sal_uInt8 nLen);
WW8LSTInfo* GetLSTByListId( sal_uInt32 nIdLst ) const;
//the rParaSprms returns back the original word paragraph indent
//sprms which are attached to this numbering level
- bool ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet, USHORT nLevelStyle,
+ bool ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet, sal_uInt16 nLevelStyle,
bool bSetStartNo, std::deque<bool> &rNotReallyThere, sal_uInt16 nLevel,
std::vector<sal_uInt8> &rParaSprms);
@@ -213,7 +213,7 @@ private:
// Zeichen Style Pointer
typedef SwCharFmt* WW8aCFmt[nMaxLevel];
- void AdjustLVL(BYTE nLevel, SwNumRule& rNumRule, WW8aISet& rListItemSet,
+ void AdjustLVL(sal_uInt8 nLevel, SwNumRule& rNumRule, WW8aISet& rListItemSet,
WW8aCFmt& aCharFmt, bool& bNewCharFmtCreated,
String aPrefix = aEmptyStr);
@@ -230,8 +230,8 @@ class SwWW8FltControlStack : public SwFltControlStack
{
private:
SwWW8ImplReader& rReader;
- USHORT nToggleAttrFlags;
- USHORT nToggleBiDiAttrFlags;
+ sal_uInt16 nToggleAttrFlags;
+ sal_uInt16 nToggleBiDiAttrFlags;
//No copying
SwWW8FltControlStack(const SwWW8FltControlStack&);
SwWW8FltControlStack& operator=(const SwWW8FltControlStack&);
@@ -242,16 +242,16 @@ protected:
SwFltStackEntry* pEntry);
public:
- SwWW8FltControlStack(SwDoc* pDo, ULONG nFieldFl, SwWW8ImplReader& rReader_ )
+ SwWW8FltControlStack(SwDoc* pDo, sal_uLong nFieldFl, SwWW8ImplReader& rReader_ )
: SwFltControlStack( pDo, nFieldFl ), rReader( rReader_ ),
nToggleAttrFlags(0), nToggleBiDiAttrFlags(0)
{}
void NewAttr(const SwPosition& rPos, const SfxPoolItem& rAttr);
- virtual void SetAttr(const SwPosition& rPos, USHORT nAttrId=0, BOOL bTstEnde=TRUE, long nHand=LONG_MAX, BOOL consumedByField=FALSE);
+ virtual void SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId=0, sal_Bool bTstEnde=sal_True, long nHand=LONG_MAX, sal_Bool consumedByField=sal_False);
- void SetToggleAttr(BYTE nId, bool bOn)
+ void SetToggleAttr(sal_uInt8 nId, bool bOn)
{
if( bOn )
nToggleAttrFlags |= (1 << nId);
@@ -259,9 +259,9 @@ public:
nToggleAttrFlags &= ~(1 << nId);
}
- USHORT GetToggleAttrFlags() const { return nToggleAttrFlags; }
+ sal_uInt16 GetToggleAttrFlags() const { return nToggleAttrFlags; }
- void SetToggleBiDiAttr(BYTE nId, bool bOn)
+ void SetToggleBiDiAttr(sal_uInt8 nId, bool bOn)
{
if( bOn )
nToggleBiDiAttrFlags |= (1 << nId);
@@ -269,12 +269,12 @@ public:
nToggleBiDiAttrFlags &= ~(1 << nId);
}
- USHORT GetToggleBiDiAttrFlags() const { return nToggleBiDiAttrFlags; }
- void SetToggleAttrFlags(USHORT nFlags) { nToggleAttrFlags = nFlags; }
- void SetToggleBiDiAttrFlags(USHORT nFlags) {nToggleBiDiAttrFlags = nFlags;}
+ sal_uInt16 GetToggleBiDiAttrFlags() const { return nToggleBiDiAttrFlags; }
+ void SetToggleAttrFlags(sal_uInt16 nFlags) { nToggleAttrFlags = nFlags; }
+ void SetToggleBiDiAttrFlags(sal_uInt16 nFlags) {nToggleBiDiAttrFlags = nFlags;}
- const SfxPoolItem* GetFmtAttr(const SwPosition& rPos, USHORT nWhich);
- const SfxPoolItem* GetStackAttr(const SwPosition& rPos, USHORT nWhich);
+ const SfxPoolItem* GetFmtAttr(const SwPosition& rPos, sal_uInt16 nWhich);
+ const SfxPoolItem* GetStackAttr(const SwPosition& rPos, sal_uInt16 nWhich);
};
//The only thing this is for is RES_FLTR_ANCHOR, anything else is an error.
@@ -283,7 +283,7 @@ public:
class SwWW8FltAnchorStack : public SwFltControlStack
{
public:
- SwWW8FltAnchorStack(SwDoc* pDo, ULONG nFieldFl)
+ SwWW8FltAnchorStack(SwDoc* pDo, sal_uLong nFieldFl)
: SwFltControlStack( pDo, nFieldFl ) {}
void AddAnchor(const SwPosition& rPos,SwFrmFmt *pFmt);
void Flush();
@@ -312,10 +312,10 @@ private:
class SwWW8FltRefStack : public SwFltEndStack
{
public:
- SwWW8FltRefStack(SwDoc* pDo, ULONG nFieldFl)
+ SwWW8FltRefStack(SwDoc* pDo, sal_uLong nFieldFl)
: SwFltEndStack( pDo, nFieldFl )
{}
- bool IsFtnEdnBkmField(const SwFmtFld& rFmtFld, USHORT& rBkmNo);
+ bool IsFtnEdnBkmField(const SwFmtFld& rFmtFld, sal_uInt16& rBkmNo);
struct ltstr
{
@@ -369,7 +369,7 @@ class FieldEntry
public:
sw::hack::Position maStartPos;
sal_uInt16 mnFieldId;
- ULONG mnObjLocFc;
+ sal_uLong mnObjLocFc;
FieldEntry(SwPosition &rPos, sal_uInt16 nFieldId) throw();
FieldEntry(const FieldEntry &rOther) throw();
FieldEntry &operator=(const FieldEntry &rOther) throw();
@@ -408,7 +408,7 @@ private:
const SwNumRule* mpPrevNumRule;
WW8TabDesc* mpTableDesc;
int mnInTable;
- USHORT mnAktColl;
+ sal_uInt16 mnAktColl;
sal_Unicode mcSymbol;
bool mbIgnoreText;
bool mbSymbol;
@@ -464,19 +464,19 @@ public:
fUnused(0), nSize(0), hpsCheckBox(20), nChecked(0)
{
}
- UINT8 fUnknown:2;
- UINT8 fDropdownIndex:6;
- UINT8 fToolTip:1;
- UINT8 fNoMark:1;
- UINT8 fUseSize:1;
- UINT8 fNumbersOnly:1;
- UINT8 fDateOnly:1;
- UINT8 fUnused:3;
- UINT16 nSize;
-
- UINT16 hpsCheckBox;
- UINT16 nChecked;
- UINT16 nDefaultChecked;
+ sal_uInt8 fUnknown:2;
+ sal_uInt8 fDropdownIndex:6;
+ sal_uInt8 fToolTip:1;
+ sal_uInt8 fNoMark:1;
+ sal_uInt8 fUseSize:1;
+ sal_uInt8 fNumbersOnly:1;
+ sal_uInt8 fDateOnly:1;
+ sal_uInt8 fUnused:3;
+ sal_uInt16 nSize;
+
+ sal_uInt16 hpsCheckBox;
+ sal_uInt16 nChecked;
+ sal_uInt16 nDefaultChecked;
String sTitle;
String sDefault;
@@ -550,7 +550,7 @@ public:
com::sun::star::form::XFormComponent >& rFComp,
const ::com::sun::star::awt::Size& rSize,
com::sun::star::uno::Reference <
- com::sun::star::drawing::XShape > *pShape,BOOL bFloatingCtrl);
+ com::sun::star::drawing::XShape > *pShape,sal_Bool bFloatingCtrl);
bool ExportControl(WW8Export &rWrt, const SdrObject *pObj);
};
@@ -561,9 +561,9 @@ private:
SvStream *pFallbackStream;
List *pOldEscherBlipCache;
- virtual BOOL GetOLEStorageName( long nOLEId, String& rStorageName,
+ virtual sal_Bool GetOLEStorageName( long nOLEId, String& rStorageName,
SvStorageRef& rSrcStorage, com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rDestStorage ) const;
- virtual BOOL ShapeHasText( ULONG nShapeId, ULONG nFilePos ) const;
+ virtual sal_Bool ShapeHasText( sal_uLong nShapeId, sal_uLong nFilePos ) const;
// #i32596# - new parameter <_nCalledByGroup>, which
// indicates, if the OLE object is imported inside a group object
virtual SdrObject* ImportOLE( long nOLEId,
@@ -578,9 +578,9 @@ private:
SwMSDffManager(const SwMSDffManager&);
SwMSDffManager& operator=(const SwMSDffManager&);
public:
- static UINT32 GetFilterFlags();
- static INT32 GetEscherLineMatch(MSO_LineStyle eStyle, MSO_SPT eShapeType,
- INT32 &rThick);
+ static sal_uInt32 GetFilterFlags();
+ static sal_Int32 GetEscherLineMatch(MSO_LineStyle eStyle, MSO_SPT eShapeType,
+ sal_Int32 &rThick);
SwMSDffManager( SwWW8ImplReader& rRdr );
void DisableFallbackStream();
void EnableFallbackStream();
@@ -606,7 +606,7 @@ public:
sal_uInt32 nPgLeft;
sal_uInt32 nPgRight;
- BYTE mnBorders;
+ sal_uInt8 mnBorders;
bool mbHasFootnote;
void SetDirection();
void SetLinkId(short sLinkId) { mLinkId = sLinkId; }
@@ -694,7 +694,7 @@ public:
bool CurrentSectionIsVertical() const;
bool CurrentSectionIsProtected() const;
void PrependedInlineNode(const SwPosition &rPos, const SwNode &rNode);
- USHORT CurrentSectionColCount() const;
+ sal_uInt16 CurrentSectionColCount() const;
bool WillHavePageDescHere(SwNodeIndex aIdx) const;
void CreateSep(const long nTxtPos, bool bMustHaveBreak);
void InsertSegments();
@@ -752,8 +752,8 @@ struct ApoTestResults
{
bool mbStartApo;
bool mbStopApo;
- const BYTE* mpSprm37;
- const BYTE* mpSprm29;
+ const sal_uInt8* mpSprm37;
+ const sal_uInt8* mpSprm29;
WW8FlyPara* mpStyleApo;
ApoTestResults() :
mbStartApo(false), mbStopApo(false), mpSprm37(0), mpSprm29(0),
@@ -766,8 +766,8 @@ struct ANLDRuleMap
{
SwNumRule* mpOutlineNumRule; // WinWord 6 numbering, varient 1
SwNumRule* mpNumberingNumRule; // WinWord 6 numbering, varient 2
- SwNumRule* GetNumRule(BYTE nNumType);
- void SetNumRule(SwNumRule*, BYTE nNumType);
+ SwNumRule* GetNumRule(sal_uInt8 nNumType);
+ void SetNumRule(SwNumRule*, sal_uInt8 nNumType);
ANLDRuleMap() : mpOutlineNumRule(0), mpNumberingNumRule(0) {}
};
@@ -981,29 +981,29 @@ private:
String sBaseURL;
// Ini-Flags:
- ULONG nIniFlags; // Flags aus der writer.ini
- ULONG nIniFlags1; // dito ( zusaetzliche Flags )
- ULONG nFieldFlags; // dito fuer Feldern
- ULONG nFieldTagAlways[3]; // dito fuers Taggen von Feldern
- ULONG nFieldTagBad[3]; // dito fuers Taggen von nicht importierbaren F.
+ sal_uLong nIniFlags; // Flags aus der writer.ini
+ sal_uLong nIniFlags1; // dito ( zusaetzliche Flags )
+ sal_uLong nFieldFlags; // dito fuer Feldern
+ sal_uLong nFieldTagAlways[3]; // dito fuers Taggen von Feldern
+ sal_uLong nFieldTagBad[3]; // dito fuers Taggen von nicht importierbaren F.
bool m_bRegardHindiDigits; // import digits in CTL scripts as Hindi numbers
WW8_CP nDrawCpO; // Anfang der Txbx-SubDocs
- ULONG nPicLocFc; // Picture Location in File (FC)
- ULONG nObjLocFc; // Object Location in File (FC)
+ sal_uLong nPicLocFc; // Picture Location in File (FC)
+ sal_uLong nObjLocFc; // Object Location in File (FC)
- INT32 nIniFlyDx; // X-Verschiebung von Flys
- INT32 nIniFlyDy; // Y-Verschiebung von Flys
+ sal_Int32 nIniFlyDx; // X-Verschiebung von Flys
+ sal_Int32 nIniFlyDy; // Y-Verschiebung von Flys
rtl_TextEncoding eTextCharSet; // Default charset for Text
rtl_TextEncoding eStructCharSet; // rtl_TextEncoding for structures
rtl_TextEncoding eHardCharSet; // Hard rtl_TextEncoding-Attribute
- USHORT nProgress; // %-Angabe fuer Progressbar
- USHORT nColls; // Groesse des Arrays
- USHORT nAktColl; // gemaess WW-Zaehlung
- USHORT nFldNum; // laufende Nummer dafuer
- USHORT nLFOPosition;
+ sal_uInt16 nProgress; // %-Angabe fuer Progressbar
+ sal_uInt16 nColls; // Groesse des Arrays
+ sal_uInt16 nAktColl; // gemaess WW-Zaehlung
+ sal_uInt16 nFldNum; // laufende Nummer dafuer
+ sal_uInt16 nLFOPosition;
short nCharFmt; // gemaess WW-Zaehlung, <0 fuer keine
@@ -1013,16 +1013,16 @@ private:
sal_Unicode cSymbol; // aktuell einzulesendes Symbolzeichen
- BYTE nWantedVersion; // urspruenglich vom Writer
+ sal_uInt8 nWantedVersion; // urspruenglich vom Writer
// angeforderte WW-Doc-Version
- BYTE nSwNumLevel; // LevelNummer fuer Outline / Nummerierung
- BYTE nWwNumType; // Gliederung / Nummerg / Aufzaehlg
- BYTE nListLevel;
+ sal_uInt8 nSwNumLevel; // LevelNummer fuer Outline / Nummerierung
+ sal_uInt8 nWwNumType; // Gliederung / Nummerg / Aufzaehlg
+ sal_uInt8 nListLevel;
- BYTE nPgChpDelim; // ChapterDelim from PageNum
- BYTE nPgChpLevel; // ChapterLevel of Heading from PageNum
+ sal_uInt8 nPgChpDelim; // ChapterDelim from PageNum
+ sal_uInt8 nPgChpLevel; // ChapterLevel of Heading from PageNum
bool mbNewDoc; // Neues Dokument ?
bool bReadNoTbl; // Keine Tabellen
@@ -1087,10 +1087,10 @@ private:
//---------------------------------------------
- const SprmReadInfo& GetSprmReadInfo(USHORT nId) const;
+ const SprmReadInfo& GetSprmReadInfo(sal_uInt16 nId) const;
bool StyleExists(int nColl) const { return (nColl < nColls); }
- SwWW8StyInf *GetStyle(USHORT nColl) const;
+ SwWW8StyInf *GetStyle(sal_uInt16 nColl) const;
void AppendTxtNode(SwPosition& rPos);
void Read_HdFt(bool bIsTitle, int nSect, const SwPageDesc *pPrev,
@@ -1101,12 +1101,12 @@ private:
bool isValid_HdFt_CP(WW8_CP nHeaderCP) const;
- bool HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt, int nSect);
+ bool HasOwnHeaderFooter(sal_uInt8 nWhichItems, sal_uInt8 grpfIhdt, int nSect);
void HandleLineNumbering(const wwSection &rSection);
void CopyPageDescHdFt( const SwPageDesc* pOrgPageDesc,
- SwPageDesc* pNewPageDesc, BYTE nCode );
+ SwPageDesc* pNewPageDesc, sal_uInt8 nCode );
void DeleteStk(SwFltControlStack* prStck);
void DeleteCtrlStk() { DeleteStk( pCtrlStck ); pCtrlStck = 0; }
@@ -1124,7 +1124,7 @@ private:
bool ReadChar(long nPosCp, long nCpOfs);
bool ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs);
bool ReadChars(WW8_CP& rPos, WW8_CP nNextAttr, long nTextEnd, long nCpOfs);
- bool LangUsesHindiNumbers(USHORT nLang);
+ bool LangUsesHindiNumbers(sal_uInt16 nLang);
sal_Unicode TranslateToHindiNumbers(sal_Unicode);
void SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection);
@@ -1136,15 +1136,15 @@ private:
void CloseAttrEnds();
bool ReadText(long nStartCp, long nTextLen, ManTypes nType);
- void ReadRevMarkAuthorStrTabl( SvStream& rStrm, INT32 nTblPos,
- INT32 nTblSiz, SwDoc& rDoc );
+ void ReadRevMarkAuthorStrTabl( SvStream& rStrm, sal_Int32 nTblPos,
+ sal_Int32 nTblSiz, SwDoc& rDoc );
void Read_HdFtFtnText( const SwNodeIndex* pSttIdx, long nStartCp,
long nLen, ManTypes nType );
void ImportTox( int nFldId, String aStr );
- void EndSprm( USHORT nId );
+ void EndSprm( sal_uInt16 nId );
// #i103711#
// #i105414#
void NewAttr( const SfxPoolItem& rAttr,
@@ -1152,13 +1152,13 @@ private:
const bool bLeftIndentSet = false );
// <--
- bool GetFontParams(USHORT, FontFamily&, String&, FontPitch&,
+ bool GetFontParams(sal_uInt16, FontFamily&, String&, FontPitch&,
rtl_TextEncoding&);
- bool SetNewFontAttr(USHORT nFCode, bool bSetEnums, USHORT nWhich);
+ bool SetNewFontAttr(sal_uInt16 nFCode, bool bSetEnums, sal_uInt16 nWhich);
void ResetCharSetVars();
void ResetCJKCharSetVars();
- const SfxPoolItem* GetFmtAttr( USHORT nWhich );
+ const SfxPoolItem* GetFmtAttr( sal_uInt16 nWhich );
bool JoinNode(SwPaM &rPam, bool bStealAttr = false);
bool IsBorder(const WW8_BRC* pbrc, bool bChkBtwn = false) const;
@@ -1172,7 +1172,7 @@ private:
// Note #i20672# we can't properly support between lines so best to ignore
// them for now
bool SetBorder(SvxBoxItem& rBox, const WW8_BRC* pbrc, short *pSizeArray=0,
- BYTE nSetBorders=0xFF) const;
+ sal_uInt8 nSetBorders=0xFF) const;
void GetBorderDistance(const WW8_BRC* pbrc, Rectangle& rInnerDist) const;
sal_uInt16 GetParagraphAutoSpace(bool fDontUseHTMLAutoSpacing);
bool SetShadow(SvxShadowItem& rShadow, const short *pSizeArray,
@@ -1182,8 +1182,8 @@ private:
short *SizeArray=0) const;
void SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) const;
- INT32 MatchSdrBoxIntoFlyBoxItem( const Color& rLineColor,
- MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, INT32 &rLineWidth,
+ sal_Int32 MatchSdrBoxIntoFlyBoxItem( const Color& rLineColor,
+ MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, sal_Int32 &rLineWidth,
SvxBoxItem& rBox );
void MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, SfxItemSet &aFlySet,
MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, Rectangle &rInnerDist );
@@ -1209,10 +1209,10 @@ private:
void EndSpecial();
bool ProcessSpecial(bool &rbReSync, WW8_CP nStartCp);
- USHORT TabRowSprm(int nLevel) const;
+ sal_uInt16 TabRowSprm(int nLevel) const;
bool ReadGrafFile(String& rFileName, Graphic*& rpGraphic,
- const WW8_PIC& rPic, SvStream* pSt, ULONG nFilePos, bool* pDelIt);
+ const WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos, bool* pDelIt);
void ReplaceObj(const SdrObject &rReplaceTextObj,
SdrObject &rSubObj);
@@ -1226,7 +1226,7 @@ private:
const SfxItemSet& rGrfSet);
SwFrmFmt *AddAutoAnchor(SwFrmFmt *pFmt);
- SwFrmFmt* ImportGraf1(WW8_PIC& rPic, SvStream* pSt, ULONG nFilePos);
+ SwFrmFmt* ImportGraf1(WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos);
SwFrmFmt* ImportGraf(SdrTextObj* pTextObj = 0, SwFrmFmt* pFlyFmt = 0);
SdrObject* ImportOleBase( Graphic& rGraph, const Graphic* pGrf=0,
@@ -1245,9 +1245,9 @@ private:
//This converts MS Asian Typography information into OOo's
void ImportDopTypography(const WW8DopTypography &rTypo);
- ULONG LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss);
- ULONG SetSubStreams(SvStorageStreamRef &rTableStream, SvStorageStreamRef &rDataStream);
- ULONG CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos);
+ sal_uLong LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss);
+ sal_uLong SetSubStreams(SvStorageStreamRef &rTableStream, SvStorageStreamRef &rDataStream);
+ sal_uLong CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos);
void ReadDocVars();
@@ -1270,16 +1270,16 @@ private:
// verwaltet werden: rglst, hpllfo und hsttbListNames
// die Strukturen hierfuer sind: LSTF, LVLF, LFO LFOLVL
- void SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV, const BYTE* pTxt,
+ void SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV, const sal_uInt8* pTxt,
bool bOutline);
- void SetAnld(SwNumRule* pNumR, WW8_ANLD* pAD, BYTE nSwLevel, bool bOutLine);
- void SetNumOlst( SwNumRule* pNumR, WW8_OLST* pO, BYTE nSwLevel );
+ void SetAnld(SwNumRule* pNumR, WW8_ANLD* pAD, sal_uInt8 nSwLevel, bool bOutLine);
+ void SetNumOlst( SwNumRule* pNumR, WW8_OLST* pO, sal_uInt8 nSwLevel );
SwNumRule* GetStyRule();
- void StartAnl(const BYTE* pSprm13);
- void NextAnlLine(const BYTE* pSprm13);
+ void StartAnl(const sal_uInt8* pSprm13);
+ void NextAnlLine(const sal_uInt8* pSprm13);
void StopAllAnl(bool bGoBack = true);
- void StopAnlToRestart(BYTE nType, bool bGoBack = true);
+ void StopAnlToRestart(sal_uInt8 nType, bool bGoBack = true);
// GrafikLayer
@@ -1296,20 +1296,20 @@ private:
SdrObject *ReadPolyLine(WW8_DPHEAD* pHd, const WW8_DO* pDo,
SfxAllItemSet &rSet);
ESelection GetESelection( long nCpStart, long nCpEnd );
- void InsertTxbxStyAttrs( SfxItemSet& rS, USHORT nColl );
+ void InsertTxbxStyAttrs( SfxItemSet& rS, sal_uInt16 nColl );
void InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp, ManTypes eType, bool bONLYnPicLocFc=false);
- bool GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp, USHORT nTxBxS,
- USHORT nSequence);
+ bool GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp, sal_uInt16 nTxBxS,
+ sal_uInt16 nSequence);
bool GetRangeAsDrawingString(String& rString, long StartCp, long nEndCp, ManTypes eType);
OutlinerParaObject* ImportAsOutliner(String &rString, WW8_CP nStartCp, WW8_CP nEndCp, ManTypes eType);
SwFrmFmt* InsertTxbxText(SdrTextObj* pTextObj, Size* pObjSiz,
- USHORT nTxBxS, USHORT nSequence, long nPosCp, SwFrmFmt* pFlyFmt,
+ sal_uInt16 nTxBxS, sal_uInt16 nSequence, long nPosCp, SwFrmFmt* pFlyFmt,
bool bMakeSdrGrafObj, bool& rbEraseTextObj,
bool* pbTestTxbxContainsText = 0, long* pnStartCp = 0,
long* pnEndCp = 0, bool* pbContainsGraphics = 0,
SvxMSDffImportRec* pRecord = 0);
- bool TxbxChainContainsRealText( USHORT nTxBxS,
+ bool TxbxChainContainsRealText( sal_uInt16 nTxBxS,
long& rStartCp,
long& rEndCp );
SdrObject *ReadTxtBox(WW8_DPHEAD* pHd, const WW8_DO* pDo,
@@ -1345,39 +1345,39 @@ private:
void UpdateFields();
void ConvertFFileName( String& rName, const String& rRaw );
long Read_F_Tag( WW8FieldDesc* pF );
- void InsertTagField( const USHORT nId, const String& rTagText );
+ void InsertTagField( const sal_uInt16 nId, const String& rTagText );
long ImportExtSprm(WW8PLCFManResult* pRes);
- void EndExtSprm(USHORT nSprmId);
+ void EndExtSprm(sal_uInt16 nSprmId);
void ReadDocInfo();
// Ver8-Listen
- void RegisterNumFmtOnTxtNode(USHORT nActLFO, BYTE nActLevel,
+ void RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO, sal_uInt8 nActLevel,
bool bSetAttr = true);
- void RegisterNumFmtOnStyle(USHORT nStyle);
+ void RegisterNumFmtOnStyle(sal_uInt16 nStyle);
void SetStylesList(sal_uInt16 nStyle, sal_uInt16 nActLFO,
sal_uInt8 nActLevel);
- void RegisterNumFmt(USHORT nActLFO, BYTE nActLevel);
+ void RegisterNumFmt(sal_uInt16 nActLFO, sal_uInt8 nActLevel);
// spaeter zu ersetzen durch Aufruf in entsprechend erweiterten SvxMSDffManager
const String* GetAnnotationAuthor(sal_uInt16 nIdx);
// Schnittstellen fuer die Toggle-Attribute
- void SetToggleAttr(BYTE nAttrId, bool bOn);
- void SetToggleBiDiAttr(BYTE nAttrId, bool bOn);
- void _ChkToggleAttr( USHORT nOldStyle81Mask, USHORT nNewStyle81Mask );
+ void SetToggleAttr(sal_uInt8 nAttrId, bool bOn);
+ void SetToggleBiDiAttr(sal_uInt8 nAttrId, bool bOn);
+ void _ChkToggleAttr( sal_uInt16 nOldStyle81Mask, sal_uInt16 nNewStyle81Mask );
- void ChkToggleAttr( USHORT nOldStyle81Mask, USHORT nNewStyle81Mask )
+ void ChkToggleAttr( sal_uInt16 nOldStyle81Mask, sal_uInt16 nNewStyle81Mask )
{
if( nOldStyle81Mask != nNewStyle81Mask &&
pCtrlStck->GetToggleAttrFlags() )
_ChkToggleAttr( nOldStyle81Mask, nNewStyle81Mask );
}
- void _ChkToggleBiDiAttr( USHORT nOldStyle81Mask, USHORT nNewStyle81Mask );
+ void _ChkToggleBiDiAttr( sal_uInt16 nOldStyle81Mask, sal_uInt16 nNewStyle81Mask );
- void ChkToggleBiDiAttr( USHORT nOldStyle81Mask, USHORT nNewStyle81Mask )
+ void ChkToggleBiDiAttr( sal_uInt16 nOldStyle81Mask, sal_uInt16 nNewStyle81Mask )
{
if( nOldStyle81Mask != nNewStyle81Mask &&
pCtrlStck->GetToggleBiDiAttrFlags() )
@@ -1402,17 +1402,17 @@ private:
// #i84783#
// determine object attribute "Layout in Table Cell"
- bool IsObjectLayoutInTableCell( const UINT32 nLayoutInTableCell ) const;
+ bool IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTableCell ) const;
// <--
bool ReadGlobalTemplateSettings( const rtl::OUString& sCreatedFrom, const com::sun::star::uno::Reference< com::sun::star::container::XNameContainer >& xPrjNameMap );
//No copying
SwWW8ImplReader(const SwWW8ImplReader &);
SwWW8ImplReader& operator=(const SwWW8ImplReader&);
public: // eigentlich private, geht aber leider nur public
- USHORT GetToggleAttrFlags() const;
- USHORT GetToggleBiDiAttrFlags() const;
- void SetToggleAttrFlags(USHORT nFlags);
- void SetToggleBiDiAttrFlags(USHORT nFlags);
+ sal_uInt16 GetToggleAttrFlags() const;
+ sal_uInt16 GetToggleBiDiAttrFlags() const;
+ void SetToggleAttrFlags(sal_uInt16 nFlags);
+ void SetToggleBiDiAttrFlags(sal_uInt16 nFlags);
long Read_Ftn(WW8PLCFManResult* pRes);
@@ -1424,102 +1424,102 @@ public: // eigentlich private, geht aber leider nur public
// Attribute
- void Read_Special(USHORT, const BYTE*, short nLen);
- void Read_Obj(USHORT, const BYTE*, short nLen);
- void Read_PicLoc(USHORT, const BYTE* pData, short nLen );
- void Read_BoldUsw(USHORT nId, const BYTE*, short nLen);
- void Read_Bidi(USHORT nId, const BYTE*, short nLen);
- void Read_BoldBiDiUsw(USHORT nId, const BYTE*, short nLen);
- void Read_SubSuper( USHORT, const BYTE*, short nLen );
+ void Read_Special(sal_uInt16, const sal_uInt8*, short nLen);
+ void Read_Obj(sal_uInt16, const sal_uInt8*, short nLen);
+ void Read_PicLoc(sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_BoldUsw(sal_uInt16 nId, const sal_uInt8*, short nLen);
+ void Read_Bidi(sal_uInt16 nId, const sal_uInt8*, short nLen);
+ void Read_BoldBiDiUsw(sal_uInt16 nId, const sal_uInt8*, short nLen);
+ void Read_SubSuper( sal_uInt16, const sal_uInt8*, short nLen );
bool ConvertSubToGraphicPlacement();
SwFrmFmt *ContainsSingleInlineGraphic(const SwPaM &rRegion);
- void Read_SubSuperProp( USHORT, const BYTE*, short nLen );
- void Read_Underline( USHORT, const BYTE*, short nLen );
- void Read_TxtColor( USHORT, const BYTE*, short nLen );
- void openFont(USHORT nFCode, USHORT nId);
- void closeFont(USHORT nId);
- void Read_FontCode( USHORT, const BYTE*, short nLen );
- void Read_FontSize( USHORT, const BYTE*, short nLen );
- void Read_CharSet(USHORT , const BYTE* pData, short nLen);
- void Read_Language( USHORT, const BYTE*, short nLen );
- void Read_CColl( USHORT, const BYTE*, short nLen );
- void Read_Kern( USHORT, const BYTE* pData, short nLen );
- void Read_FontKern( USHORT, const BYTE* pData, short nLen );
- void Read_Emphasis( USHORT, const BYTE* pData, short nLen );
- void Read_ScaleWidth( USHORT, const BYTE* pData, short nLen );
- void Read_Relief( USHORT, const BYTE* pData, short nLen);
- void Read_TxtAnim( USHORT, const BYTE* pData, short nLen);
-
- void Read_NoLineNumb( USHORT nId, const BYTE* pData, short nLen );
-
- void Read_LR( USHORT nId, const BYTE*, short nLen );
- void Read_UL( USHORT nId, const BYTE*, short nLen );
- void Read_ParaAutoBefore(USHORT , const BYTE *pData, short nLen);
- void Read_ParaAutoAfter(USHORT , const BYTE *pData, short nLen);
- void Read_DontAddEqual(USHORT , const BYTE *pData, short nLen);
- void Read_LineSpace( USHORT, const BYTE*, short nLen );
- void Read_Justify(USHORT, const BYTE*, short nLen);
- void Read_IdctHint(USHORT, const BYTE*, short nLen);
+ void Read_SubSuperProp( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_Underline( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_TxtColor( sal_uInt16, const sal_uInt8*, short nLen );
+ void openFont(sal_uInt16 nFCode, sal_uInt16 nId);
+ void closeFont(sal_uInt16 nId);
+ void Read_FontCode( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_FontSize( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_CharSet(sal_uInt16 , const sal_uInt8* pData, short nLen);
+ void Read_Language( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_CColl( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_Kern( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_FontKern( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_Emphasis( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_ScaleWidth( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_Relief( sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_TxtAnim( sal_uInt16, const sal_uInt8* pData, short nLen);
+
+ void Read_NoLineNumb( sal_uInt16 nId, const sal_uInt8* pData, short nLen );
+
+ void Read_LR( sal_uInt16 nId, const sal_uInt8*, short nLen );
+ void Read_UL( sal_uInt16 nId, const sal_uInt8*, short nLen );
+ void Read_ParaAutoBefore(sal_uInt16 , const sal_uInt8 *pData, short nLen);
+ void Read_ParaAutoAfter(sal_uInt16 , const sal_uInt8 *pData, short nLen);
+ void Read_DontAddEqual(sal_uInt16 , const sal_uInt8 *pData, short nLen);
+ void Read_LineSpace( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_Justify(sal_uInt16, const sal_uInt8*, short nLen);
+ void Read_IdctHint(sal_uInt16, const sal_uInt8*, short nLen);
bool IsRightToLeft();
- void Read_RTLJustify(USHORT, const BYTE*, short nLen);
- void Read_Hyphenation( USHORT, const BYTE* pData, short nLen );
- void Read_WidowControl( USHORT, const BYTE* pData, short nLen );
- void Read_AlignFont( USHORT, const BYTE* pData, short nLen );
- void Read_UsePgsuSettings( USHORT, const BYTE* pData, short nLen );
- void Read_KeepLines( USHORT, const BYTE* pData, short nLen );
- void Read_KeepParas( USHORT, const BYTE* pData, short nLen );
- void Read_BreakBefore( USHORT, const BYTE* pData, short nLen );
- void Read_Apo(USHORT nId, const BYTE* pData, short nLen);
- void Read_ApoPPC(USHORT, const BYTE* pData, short);
-
- void Read_BoolItem( USHORT nId, const BYTE*, short nLen );
-
- void Read_Border( USHORT nId, const BYTE* pData, short nLen );
- void Read_Tab( USHORT nId, const BYTE* pData, short nLen );
- void Read_Symbol(USHORT, const BYTE* pData, short nLen);
- void Read_FldVanish( USHORT nId, const BYTE* pData, short nLen );
+ void Read_RTLJustify(sal_uInt16, const sal_uInt8*, short nLen);
+ void Read_Hyphenation( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_WidowControl( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_AlignFont( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_UsePgsuSettings( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_KeepLines( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_KeepParas( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_BreakBefore( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_Apo(sal_uInt16 nId, const sal_uInt8* pData, short nLen);
+ void Read_ApoPPC(sal_uInt16, const sal_uInt8* pData, short);
+
+ void Read_BoolItem( sal_uInt16 nId, const sal_uInt8*, short nLen );
+
+ void Read_Border( sal_uInt16 nId, const sal_uInt8* pData, short nLen );
+ void Read_Tab( sal_uInt16 nId, const sal_uInt8* pData, short nLen );
+ void Read_Symbol(sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_FldVanish( sal_uInt16 nId, const sal_uInt8* pData, short nLen );
// Revision Marks ( == Redlining )
// insert or delete content (change char attributes resp.)
- void Read_CRevisionMark(RedlineType_t eType, const BYTE* pData, short nLen);
+ void Read_CRevisionMark(RedlineType_t eType, const sal_uInt8* pData, short nLen);
// insert new content
- void Read_CFRMark(USHORT , const BYTE* pData, short nLen);
+ void Read_CFRMark(sal_uInt16 , const sal_uInt8* pData, short nLen);
// delete old content
- void Read_CFRMarkDel(USHORT , const BYTE* pData, short nLen);
+ void Read_CFRMarkDel(sal_uInt16 , const sal_uInt8* pData, short nLen);
// change properties of content (e.g. char formating)
- void Read_CPropRMark(USHORT , const BYTE* pData, short nLen); // complex!
+ void Read_CPropRMark(sal_uInt16 , const sal_uInt8* pData, short nLen); // complex!
- void Read_TabRowEnd( USHORT, const BYTE* pData, short nLen );
- void Read_TabCellEnd( USHORT, const BYTE* pData, short nLen );
+ void Read_TabRowEnd( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_TabCellEnd( sal_uInt16, const sal_uInt8* pData, short nLen );
static bool ParseTabPos(WW8_TablePos *aTabPos, WW8PLCFx_Cp_FKP* pPap);
- void Read_Shade( USHORT, const BYTE* pData, short nLen );
- void Read_ANLevelNo( USHORT, const BYTE* pData, short nLen );
- void Read_ANLevelDesc( USHORT, const BYTE* pData, short nLen );
+ void Read_Shade( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_ANLevelNo( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_ANLevelDesc( sal_uInt16, const sal_uInt8* pData, short nLen );
// Gliederungsebene Ver8
- void Read_POutLvl(USHORT, const BYTE* pData, short nLen);
+ void Read_POutLvl(sal_uInt16, const sal_uInt8* pData, short nLen);
- void Read_OLST( USHORT, const BYTE* pData, short nLen );
+ void Read_OLST( sal_uInt16, const sal_uInt8* pData, short nLen );
- void Read_CharShadow( USHORT, const BYTE* pData, short nLen );
- void Read_CharHighlight( USHORT, const BYTE* pData, short nLen );
+ void Read_CharShadow( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_CharHighlight( sal_uInt16, const sal_uInt8* pData, short nLen );
// Ver8-Listen
- void Read_ListLevel( USHORT nId, const sal_uInt8* pData, short nLen);
- void Read_LFOPosition( USHORT nId, const sal_uInt8* pData, short nLen);
+ void Read_ListLevel( sal_uInt16 nId, const sal_uInt8* pData, short nLen);
+ void Read_LFOPosition( sal_uInt16 nId, const sal_uInt8* pData, short nLen);
bool SetTxtFmtCollAndListLevel(const SwPaM& rRg, SwWW8StyInf& rStyleInfo);
- void Read_StyleCode(USHORT, const BYTE* pData, short nLen);
- void Read_Majority(USHORT, const BYTE* , short );
- void Read_DoubleLine_Rotate( USHORT, const BYTE* pDATA, short nLen);
+ void Read_StyleCode(sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_Majority(sal_uInt16, const sal_uInt8* , short );
+ void Read_DoubleLine_Rotate( sal_uInt16, const sal_uInt8* pDATA, short nLen);
- void Read_TxtForeColor(USHORT, const BYTE* pData, short nLen);
- void Read_TxtBackColor(USHORT, const BYTE* pData, short nLen);
- void Read_ParaBackColor(USHORT, const BYTE* pData, short nLen);
- void Read_ParaBiDi(USHORT, const BYTE* pData, short nLen);
- static sal_uInt32 ExtractColour(const BYTE* &rpData, bool bVer67);
+ void Read_TxtForeColor(sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_TxtBackColor(sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_ParaBackColor(sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_ParaBiDi(sal_uInt16, const sal_uInt8* pData, short nLen);
+ static sal_uInt32 ExtractColour(const sal_uInt8* &rpData, bool bVer67);
long MapBookmarkVariables(const WW8FieldDesc* pF,String &rOrigName,
const String &rData);
@@ -1532,9 +1532,9 @@ public: // eigentlich private, geht aber leider nur public
eF_ResT Read_F_DocInfo( WW8FieldDesc* pF, String& rStr );
eF_ResT Read_F_Author( WW8FieldDesc*, String& );
eF_ResT Read_F_TemplName( WW8FieldDesc*, String& );
- short GetTimeDatePara(String& rStr, sal_uInt32& rFormat, USHORT &rLang,
+ short GetTimeDatePara(String& rStr, sal_uInt32& rFormat, sal_uInt16 &rLang,
int nWhichDefault, bool bHijri = false);
- bool ForceFieldLanguage(SwField &rFld, USHORT nLang);
+ bool ForceFieldLanguage(SwField &rFld, sal_uInt16 nLang);
eF_ResT Read_F_DateTime( WW8FieldDesc*, String& rStr );
eF_ResT Read_F_FileName( WW8FieldDesc*, String& rStr);
eF_ResT Read_F_Anz( WW8FieldDesc* pF, String& );
@@ -1575,30 +1575,30 @@ public: // eigentlich private, geht aber leider nur public
void DeleteFormImpl();
- short ImportSprm( const BYTE* pPos, USHORT nId = 0 );
+ short ImportSprm( const sal_uInt8* pPos, sal_uInt16 nId = 0 );
bool SearchRowEnd(WW8PLCFx_Cp_FKP* pPap,WW8_CP &rStartCp, int nLevel) const;
const WW8Fib& GetFib() const { return *pWwFib; }
SwDoc& GetDoc() const { return rDoc; }
- USHORT GetNAktColl() const { return nAktColl; }
- void SetNAktColl( USHORT nColl ) { nAktColl = nColl; }
+ sal_uInt16 GetNAktColl() const { return nAktColl; }
+ void SetNAktColl( sal_uInt16 nColl ) { nAktColl = nColl; }
void SetAktItemSet( SfxItemSet* pItemSet ) { pAktItemSet = pItemSet; }
- USHORT StyleUsingLFO( USHORT nLFOIndex ) const ;
+ sal_uInt16 StyleUsingLFO( sal_uInt16 nLFOIndex ) const ;
const SwFmt* GetStyleWithOrgWWName( String& rName ) const ;
static bool GetPictGrafFromStream(Graphic& rGraphic, SvStream& rSrc);
static void PicRead( SvStream *pDataStream, WW8_PIC *pPic, bool bVer67);
static bool ImportOleWMF( SvStorageRef xSrc1, GDIMetaFile &rWMF,
long &rX, long &rY);
- static ColorData GetCol(BYTE nIco);
+ static ColorData GetCol(sal_uInt8 nIco);
- SwWW8ImplReader( BYTE nVersionPara, SvStorage* pStorage, SvStream* pSt,
+ SwWW8ImplReader( sal_uInt8 nVersionPara, SvStorage* pStorage, SvStream* pSt,
SwDoc& rD, const String& rBaseURL, bool bNewDoc );
const String& GetBaseURL() const { return sBaseURL; }
// Laden eines kompletten DocFiles
- ULONG LoadDoc( SwPaM&,WW8Glossary *pGloss=0);
+ sal_uLong LoadDoc( SwPaM&,WW8Glossary *pGloss=0);
CharSet GetCurrentCharSet();
CharSet GetCurrentCJKCharSet();
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 6c7ac6b4655e..6f2a5e00259d 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -116,37 +116,37 @@ struct WW8TabBandDesc
sal_uInt16 maDirections[MAX_COL + 1];
short nCenter[MAX_COL + 1]; // X-Rand aller Zellen dieses Bandes
short nWidth[MAX_COL + 1]; // Laenge aller Zellen dieses Bandes
- short nWwCols; // BYTE wuerde reichen, alignment -> short
+ short nWwCols; // sal_uInt8 wuerde reichen, alignment -> short
short nSwCols; // SW: so viele Spalten fuer den Writer
bool bLEmptyCol; // SW: Links eine leere Zusatz-Spalte
bool bREmptyCol; // SW: dito rechts
bool bCantSplit;
bool bCantSplit90;
WW8_TCell* pTCs;
- BYTE nOverrideSpacing[MAX_COL + 1];
+ sal_uInt8 nOverrideSpacing[MAX_COL + 1];
short nOverrideValues[MAX_COL + 1][4];
WW8_SHD* pSHDs;
sal_uInt32* pNewSHDs;
WW8_BRC aDefBrcs[6];
bool bExist[MAX_COL]; // Existiert diese Zelle ?
- UINT8 nTransCell[MAX_COL + 2]; // UEbersetzung WW-Index -> SW-Index
+ sal_uInt8 nTransCell[MAX_COL + 2]; // UEbersetzung WW-Index -> SW-Index
WW8TabBandDesc();
WW8TabBandDesc(WW8TabBandDesc& rBand); // tief kopieren
~WW8TabBandDesc();
static void setcelldefaults(WW8_TCell *pCells, short nCells);
- void ReadDef(bool bVer67, const BYTE* pS);
- void ProcessDirection(const BYTE* pParams);
- void ProcessSprmTSetBRC(bool bVer67, const BYTE* pParamsTSetBRC);
- void ProcessSprmTTableBorders(bool bVer67, const BYTE* pParams);
- void ProcessSprmTDxaCol(const BYTE* pParamsTDxaCol);
- void ProcessSprmTDelete(const BYTE* pParamsTDelete);
- void ProcessSprmTInsert(const BYTE* pParamsTInsert);
- void ProcessSpacing(const BYTE* pParamsTInsert);
- void ProcessSpecificSpacing(const BYTE* pParamsTInsert);
- void ReadShd(const BYTE* pS );
- void ReadNewShd(const BYTE* pS, bool bVer67);
+ void ReadDef(bool bVer67, const sal_uInt8* pS);
+ void ProcessDirection(const sal_uInt8* pParams);
+ void ProcessSprmTSetBRC(bool bVer67, const sal_uInt8* pParamsTSetBRC);
+ void ProcessSprmTTableBorders(bool bVer67, const sal_uInt8* pParams);
+ void ProcessSprmTDxaCol(const sal_uInt8* pParamsTDxaCol);
+ void ProcessSprmTDelete(const sal_uInt8* pParamsTDelete);
+ void ProcessSprmTInsert(const sal_uInt8* pParamsTInsert);
+ void ProcessSpacing(const sal_uInt8* pParamsTInsert);
+ void ProcessSpecificSpacing(const sal_uInt8* pParamsTInsert);
+ void ReadShd(const sal_uInt8* pS );
+ void ReadNewShd(const sal_uInt8* pS, bool bVer67);
enum wwDIR {wwTOP = 0, wwLEFT = 1, wwBOTTOM = 2, wwRIGHT = 3};
};
@@ -207,11 +207,11 @@ class WW8TabDesc
// 3. Verwaltungsinfo fuer Writer
short nAktCol;
- USHORT nRowsToRepeat;
+ sal_uInt16 nRowsToRepeat;
// 4. Methoden
- USHORT GetLogicalWWCol() const;
+ sal_uInt16 GetLogicalWWCol() const;
void SetTabBorders( SwTableBox* pBox, short nIdx );
void SetTabShades( SwTableBox* pBox, short nWwIdx );
void SetTabVertAlign( SwTableBox* pBox, short nWwIdx );
@@ -228,7 +228,7 @@ class WW8TabDesc
// einzelne Box ggfs. in eine Merge-Gruppe aufnehmen
// (die Merge-Gruppen werden dann spaeter auf einen Schlag abgearbeitet)
SwTableBox* UpdateTableMergeGroup(WW8_TCell& rCell,
- WW8SelBoxInfo* pActGroup, SwTableBox* pActBox, USHORT nCol );
+ WW8SelBoxInfo* pActGroup, SwTableBox* pActBox, sal_uInt16 nCol );
void StartMiserableHackForUnsupportedDirection(short nWwCol);
void EndMiserableHackForUnsupportedDirection(short nWwCol);
//No copying
@@ -485,10 +485,10 @@ bool SwWW8ImplReader::SearchRowEnd(WW8PLCFx_Cp_FKP* pPap, WW8_CP &rStartCp,
{
if (pPap->Where() != WW8_CP_MAX)
{
- const BYTE* pB = pPap->HasSprm(TabRowSprm(nLevel));
+ const sal_uInt8* pB = pPap->HasSprm(TabRowSprm(nLevel));
if (pB && *pB == 1)
{
- const BYTE *pLevel = 0;
+ const sal_uInt8 *pLevel = 0;
if (0 != (pLevel = pPap->HasSprm(0x6649)))
{
if (nLevel + 1 == *pLevel)
@@ -624,7 +624,7 @@ ApoTestResults SwWW8ImplReader::TestApo(int nCellLevel, bool bTableRowEnd,
// Hilfroutinen fuer Kapitelnummerierung und Aufzaehlung / Gliederung
//---------------------------------------------------------------------
-static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV &rAV, BYTE nSwLevel )
+static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV &rAV, sal_uInt8 nSwLevel )
{
static SvxExtNumType eNumA[8] = { SVX_NUM_ARABIC, SVX_NUM_ROMAN_UPPER, SVX_NUM_ROMAN_LOWER,
SVX_NUM_CHARS_UPPER_LETTER_N, SVX_NUM_CHARS_LOWER_LETTER_N, SVX_NUM_ARABIC,
@@ -643,7 +643,7 @@ static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV &rAV, BYTE nSwLevel )
rNum.SetNumAdjust( eAdjA[SVBT8ToByte( rAV.aBits1 ) & 0x3] );
rNum.SetCharTextDistance( SVBT16ToShort( rAV.dxaSpace ) );
- INT16 nIndent = Abs((INT16)SVBT16ToShort( rAV.dxaIndent ));
+ sal_Int16 nIndent = Abs((sal_Int16)SVBT16ToShort( rAV.dxaIndent ));
if( SVBT8ToByte( rAV.aBits1 ) & 0x08 ) //fHang
{
rNum.SetFirstLineOffset( -nIndent );
@@ -662,7 +662,7 @@ static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV &rAV, BYTE nSwLevel )
}
void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV,
- const BYTE* pTxt, bool bOutline)
+ const sal_uInt8* pTxt, bool bOutline)
{
bool bInsert = false; // Default
CharSet eCharSet = eStructCharSet;
@@ -751,7 +751,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV,
// SetAnld bekommt einen WW-ANLD-Descriptor und einen Level und modifiziert
// die durch pNumR anggebeben NumRules. Wird benutzt fuer alles ausser
// Gliederung im Text
-void SwWW8ImplReader::SetAnld(SwNumRule* pNumR, WW8_ANLD* pAD, BYTE nSwLevel,
+void SwWW8ImplReader::SetAnld(SwNumRule* pNumR, WW8_ANLD* pAD, sal_uInt8 nSwLevel,
bool bOutLine)
{
SwNumFmt aNF;
@@ -780,7 +780,7 @@ SwNumRule* SwWW8ImplReader::GetStyRule()
const String aName( rDoc.GetUniqueNumRuleName( &aBaseName, false) );
// #i86652#
- USHORT nRul = rDoc.MakeNumRule( aName, 0, FALSE,
+ sal_uInt16 nRul = rDoc.MakeNumRule( aName, 0, sal_False,
SvxNumberFormat::LABEL_ALIGNMENT );
// <--
pStyles->pStyRule = rDoc.GetNumRuleTbl()[nRul];
@@ -791,7 +791,7 @@ SwNumRule* SwWW8ImplReader::GetStyRule()
}
// Sprm 13
-void SwWW8ImplReader::Read_ANLevelNo( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_ANLevelNo( sal_uInt16, const sal_uInt8* pData, short nLen )
{
nSwNumLevel = 0xff; // Default: ungueltig
@@ -835,7 +835,7 @@ void SwWW8ImplReader::Read_ANLevelNo( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_ANLevelDesc( USHORT, const BYTE* pData, short nLen ) // Sprm 12
+void SwWW8ImplReader::Read_ANLevelDesc( sal_uInt16, const sal_uInt8* pData, short nLen ) // Sprm 12
{
{
SwWW8StyInf * pStyInf = GetStyle(nAktColl);
@@ -885,14 +885,14 @@ void SwWW8ImplReader::Read_ANLevelDesc( USHORT, const BYTE* pData, short nLen )
// ( nur fuer Gliederungen im Text; Aufzaehlungen / Nummerierungen laufen
// ueber ANLDs )
// dabei wird die Info aus dem OLST geholt und nicht aus dem ANLD ( s.u. )
-void SwWW8ImplReader::SetNumOlst(SwNumRule* pNumR, WW8_OLST* pO, BYTE nSwLevel)
+void SwWW8ImplReader::SetNumOlst(SwNumRule* pNumR, WW8_OLST* pO, sal_uInt8 nSwLevel)
{
SwNumFmt aNF;
WW8_ANLV &rAV = pO->rganlv[nSwLevel];
SetBaseAnlv(aNF, rAV, nSwLevel);
// ... und then the Strings
int nTxtOfs = 0;
- BYTE i;
+ sal_uInt8 i;
WW8_ANLV* pAV1; // search String-Positions
for (i = 0, pAV1 = pO->rganlv; i < nSwLevel; ++i, ++pAV1)
{
@@ -910,7 +910,7 @@ void SwWW8ImplReader::SetNumOlst(SwNumRule* pNumR, WW8_OLST* pO, BYTE nSwLevel)
// die an jeder Gliederungszeile haengen, enthalten nur Stuss, also werden die
// OLSTs waehrend der Section gemerkt, damit die Informationen beim Auftreten
// von Gliederungsabsaetzen zugreifbar ist.
-void SwWW8ImplReader::Read_OLST( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_OLST( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (nLen <= 0)
{
@@ -925,7 +925,7 @@ void SwWW8ImplReader::Read_OLST( USHORT, const BYTE* pData, short nLen )
*pNumOlst = *(WW8_OLST*)pData;
}
-WW8LvlType GetNumType(BYTE nWwLevelNo)
+WW8LvlType GetNumType(sal_uInt8 nWwLevelNo)
{
WW8LvlType nRet = WW8_None;
if( nWwLevelNo == 12 )
@@ -939,12 +939,12 @@ WW8LvlType GetNumType(BYTE nWwLevelNo)
return nRet;
}
-SwNumRule *ANLDRuleMap::GetNumRule(BYTE nNumType)
+SwNumRule *ANLDRuleMap::GetNumRule(sal_uInt8 nNumType)
{
return (WW8_Numbering == nNumType ? mpNumberingNumRule : mpOutlineNumRule);
}
-void ANLDRuleMap::SetNumRule(SwNumRule *pRule, BYTE nNumType)
+void ANLDRuleMap::SetNumRule(SwNumRule *pRule, sal_uInt8 nNumType)
{
if (WW8_Numbering == nNumType)
mpNumberingNumRule = pRule;
@@ -955,11 +955,11 @@ void ANLDRuleMap::SetNumRule(SwNumRule *pRule, BYTE nNumType)
// StartAnl wird am Anfang eines Zeilenbereichs gerufen,
// der Gliederung / Nummerierung / Aufzaehlung enthaelt
-void SwWW8ImplReader::StartAnl(const BYTE* pSprm13)
+void SwWW8ImplReader::StartAnl(const sal_uInt8* pSprm13)
{
bAktAND_fNumberAcross = false;
- BYTE nT = static_cast< BYTE >(GetNumType(*pSprm13));
+ sal_uInt8 nT = static_cast< sal_uInt8 >(GetNumType(*pSprm13));
if (nT == WW8_Pause || nT == WW8_None)
return;
@@ -967,7 +967,7 @@ void SwWW8ImplReader::StartAnl(const BYTE* pSprm13)
SwNumRule *pNumRule = maANLDRules.GetNumRule(nWwNumType);
// check for COL numbering:
- const BYTE* pS12 = 0;// sprmAnld
+ const sal_uInt8* pS12 = 0;// sprmAnld
String sNumRule;
if (pTableDesc)
@@ -1003,7 +1003,7 @@ void SwWW8ImplReader::StartAnl(const BYTE* pSprm13)
{
// #i86652#
pNumRule = rDoc.GetNumRuleTbl()[
- rDoc.MakeNumRule( sNumRule, 0, FALSE,
+ rDoc.MakeNumRule( sNumRule, 0, sal_False,
SvxNumberFormat::LABEL_ALIGNMENT ) ];
// <--
}
@@ -1027,7 +1027,7 @@ void SwWW8ImplReader::StartAnl(const BYTE* pSprm13)
// NextAnlLine() wird fuer jede Zeile einer
// Gliederung / Nummerierung / Aufzaehlung einmal gerufen
-void SwWW8ImplReader::NextAnlLine(const BYTE* pSprm13)
+void SwWW8ImplReader::NextAnlLine(const sal_uInt8* pSprm13)
{
if (!bAnl)
return;
@@ -1045,7 +1045,7 @@ void SwWW8ImplReader::NextAnlLine(const BYTE* pSprm13)
{
// noch nicht definiert
// sprmAnld o. 0
- const BYTE* pS12 = pPlcxMan->HasParaSprm(bVer67 ? 12 : 0xC63E);
+ const sal_uInt8* pS12 = pPlcxMan->HasParaSprm(bVer67 ? 12 : 0xC63E);
SetAnld(pNumRule, (WW8_ANLD*)pS12, nSwNumLevel, false);
}
}
@@ -1058,7 +1058,7 @@ void SwWW8ImplReader::NextAnlLine(const BYTE* pSprm13)
if (pNumOlst) // es gab ein OLST
{
//Assure upper levels are set, #i9556#
- for (BYTE nI = 0; nI < nSwNumLevel; ++nI)
+ for (sal_uInt8 nI = 0; nI < nSwNumLevel; ++nI)
{
if (!pNumRule->GetNumFmt(nI))
SetNumOlst(pNumRule, pNumOlst, nI);
@@ -1069,7 +1069,7 @@ void SwWW8ImplReader::NextAnlLine(const BYTE* pSprm13)
else // kein Olst, nimm Anld
{
// sprmAnld
- const BYTE* pS12 = pPlcxMan->HasParaSprm(bVer67 ? 12 : 0xC63E);
+ const sal_uInt8* pS12 = pPlcxMan->HasParaSprm(bVer67 ? 12 : 0xC63E);
SetAnld(pNumRule, (WW8_ANLD*)pS12, nSwNumLevel, false);
}
}
@@ -1094,7 +1094,7 @@ void SwWW8ImplReader::StopAllAnl(bool bGoBack)
StopAnlToRestart(WW8_None, bGoBack);
}
-void SwWW8ImplReader::StopAnlToRestart(BYTE nNewType, bool bGoBack)
+void SwWW8ImplReader::StopAnlToRestart(sal_uInt8 nNewType, bool bGoBack)
{
if (bGoBack)
{
@@ -1145,14 +1145,14 @@ WW8TabBandDesc::WW8TabBandDesc( WW8TabBandDesc& rBand )
}
// ReadDef liest die Zellenpositionen und ggfs die Umrandungen eines Bandes ein
-void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
+void WW8TabBandDesc::ReadDef(bool bVer67, const sal_uInt8* pS)
{
if (!bVer67)
pS++;
- short nLen = (INT16)SVBT16ToShort( pS - 2 ); // nicht schoen
+ short nLen = (sal_Int16)SVBT16ToShort( pS - 2 ); // nicht schoen
- BYTE nCols = *pS; // Anzahl der Zellen
+ sal_uInt8 nCols = *pS; // Anzahl der Zellen
short nOldCols = nWwCols;
if( nCols > MAX_COL )
@@ -1160,11 +1160,11 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
nWwCols = nCols;
- const BYTE* pT = &pS[1];
+ const sal_uInt8* pT = &pS[1];
nLen --;
int i;
for(i=0; i<=nCols; i++, pT+=2 )
- nCenter[i] = (INT16)SVBT16ToShort( pT ); // X-Raender
+ nCenter[i] = (sal_Int16)SVBT16ToShort( pT ); // X-Raender
nLen -= 2 * ( nCols + 1 );
if( nCols != nOldCols ) // andere Spaltenzahl
{
@@ -1206,7 +1206,7 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
{
if( i < nColsToRead )
{ // TC aus File ?
- BYTE aBits1 = SVBT8ToByte( pTc->aBits1Ver6 );
+ sal_uInt8 aBits1 = SVBT8ToByte( pTc->aBits1Ver6 );
pAktTC->bFirstMerged = ( ( aBits1 & 0x01 ) != 0 );
pAktTC->bMerged = ( ( aBits1 & 0x02 ) != 0 );
memcpy( pAktTC->rgbrc[ WW8_TOP ].aBits1,
@@ -1236,7 +1236,7 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
WW8_TCellVer8* pTc = (WW8_TCellVer8*)pT;
for (int k = 0; k < nColsToRead; ++k, ++pAktTC, ++pTc )
{
- UINT16 aBits1 = SVBT16ToShort( pTc->aBits1Ver8 );
+ sal_uInt16 aBits1 = SVBT16ToShort( pTc->aBits1Ver8 );
pAktTC->bFirstMerged = ( ( aBits1 & 0x0001 ) != 0 );
pAktTC->bMerged = ( ( aBits1 & 0x0002 ) != 0 );
pAktTC->bVertical = ( ( aBits1 & 0x0004 ) != 0 );
@@ -1274,13 +1274,13 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
}
}
-void WW8TabBandDesc::ProcessSprmTSetBRC(bool bVer67, const BYTE* pParamsTSetBRC)
+void WW8TabBandDesc::ProcessSprmTSetBRC(bool bVer67, const sal_uInt8* pParamsTSetBRC)
{
if( pParamsTSetBRC && pTCs ) // set one or more cell border(s)
{
- BYTE nitcFirst= pParamsTSetBRC[0];// first col to be changed
- BYTE nitcLim = pParamsTSetBRC[1];// (last col to be changed)+1
- BYTE nFlag = *(pParamsTSetBRC+2);
+ sal_uInt8 nitcFirst= pParamsTSetBRC[0];// first col to be changed
+ sal_uInt8 nitcLim = pParamsTSetBRC[1];// (last col to be changed)+1
+ sal_uInt8 nFlag = *(pParamsTSetBRC+2);
if (nitcFirst >= nWwCols)
return;
@@ -1348,7 +1348,7 @@ void WW8TabBandDesc::ProcessSprmTSetBRC(bool bVer67, const BYTE* pParamsTSetBRC)
}
}
-void WW8TabBandDesc::ProcessSprmTTableBorders(bool bVer67, const BYTE* pParams)
+void WW8TabBandDesc::ProcessSprmTTableBorders(bool bVer67, const sal_uInt8* pParams)
{
// sprmTTableBorders
if( bVer67 )
@@ -1363,16 +1363,16 @@ void WW8TabBandDesc::ProcessSprmTTableBorders(bool bVer67, const BYTE* pParams)
memcpy( aDefBrcs, pParams, 24 );
}
-void WW8TabBandDesc::ProcessSprmTDxaCol(const BYTE* pParamsTDxaCol)
+void WW8TabBandDesc::ProcessSprmTDxaCol(const sal_uInt8* pParamsTDxaCol)
{
// sprmTDxaCol (opcode 0x7623) changes the width of cells
// whose index is within a certain range to be a certain value.
if( nWwCols && pParamsTDxaCol ) // set one or more cell length(s)
{
- BYTE nitcFirst= pParamsTDxaCol[0]; // first col to be changed
- BYTE nitcLim = pParamsTDxaCol[1]; // (last col to be changed)+1
- short nDxaCol = (INT16)SVBT16ToShort( pParamsTDxaCol + 2 );
+ sal_uInt8 nitcFirst= pParamsTDxaCol[0]; // first col to be changed
+ sal_uInt8 nitcLim = pParamsTDxaCol[1]; // (last col to be changed)+1
+ short nDxaCol = (sal_Int16)SVBT16ToShort( pParamsTDxaCol + 2 );
short nOrgWidth;
short nDelta;
@@ -1388,15 +1388,15 @@ void WW8TabBandDesc::ProcessSprmTDxaCol(const BYTE* pParamsTDxaCol)
}
}
-void WW8TabBandDesc::ProcessSprmTInsert(const BYTE* pParamsTInsert)
+void WW8TabBandDesc::ProcessSprmTInsert(const sal_uInt8* pParamsTInsert)
{
if( nWwCols && pParamsTInsert ) // set one or more cell length(s)
{
- BYTE nitcInsert = pParamsTInsert[0]; // position at which to insert
+ sal_uInt8 nitcInsert = pParamsTInsert[0]; // position at which to insert
if (nitcInsert >= MAX_COL) // cannot insert into cell outside max possible index
return;
- BYTE nctc = pParamsTInsert[1]; // number of cells
- USHORT ndxaCol = SVBT16ToShort( pParamsTInsert+2 );
+ sal_uInt8 nctc = pParamsTInsert[1]; // number of cells
+ sal_uInt16 ndxaCol = SVBT16ToShort( pParamsTInsert+2 );
short nNewWwCols;
if (nitcInsert > nWwCols)
@@ -1407,7 +1407,7 @@ void WW8TabBandDesc::ProcessSprmTInsert(const BYTE* pParamsTInsert)
if (nNewWwCols > MAX_COL)
{
nNewWwCols = MAX_COL;
- nctc = ::sal::static_int_cast<BYTE>(nNewWwCols-nitcInsert);
+ nctc = ::sal::static_int_cast<sal_uInt8>(nNewWwCols-nitcInsert);
}
}
else
@@ -1418,7 +1418,7 @@ void WW8TabBandDesc::ProcessSprmTInsert(const BYTE* pParamsTInsert)
if (nNewWwCols > MAX_COL)
{
nNewWwCols = MAX_COL;
- nctc = ::sal::static_int_cast<BYTE>(nNewWwCols-nWwCols);
+ nctc = ::sal::static_int_cast<sal_uInt8>(nNewWwCols-nWwCols);
}
}
@@ -1459,7 +1459,7 @@ void WW8TabBandDesc::ProcessSprmTInsert(const BYTE* pParamsTInsert)
}
}
-void WW8TabBandDesc::ProcessDirection(const BYTE* pParams)
+void WW8TabBandDesc::ProcessDirection(const sal_uInt8* pParams)
{
sal_uInt8 nStartCell = *pParams++;
sal_uInt8 nEndCell = *pParams++;
@@ -1476,24 +1476,24 @@ void WW8TabBandDesc::ProcessDirection(const BYTE* pParams)
maDirections[nStartCell] = nCode;
}
-void WW8TabBandDesc::ProcessSpacing(const BYTE* pParams)
+void WW8TabBandDesc::ProcessSpacing(const sal_uInt8* pParams)
{
- BYTE nLen = pParams ? *(pParams - 1) : 0;
+ sal_uInt8 nLen = pParams ? *(pParams - 1) : 0;
OSL_ENSURE(nLen == 6, "Unexpected spacing len");
if (nLen != 6)
return;
mbHasSpacing=true;
#if OSL_DEBUG_LEVEL > 1
- BYTE nWhichCell = *pParams;
+ sal_uInt8 nWhichCell = *pParams;
OSL_ENSURE(nWhichCell == 0, "Expected cell to be 0!");
#endif
++pParams; //Skip which cell
++pParams; //unknown byte
- BYTE nSideBits = *pParams++;
+ sal_uInt8 nSideBits = *pParams++;
OSL_ENSURE(nSideBits < 0x10, "Unexpected value for nSideBits");
++pParams; //unknown byte
- USHORT nValue = SVBT16ToShort( pParams );
+ sal_uInt16 nValue = SVBT16ToShort( pParams );
for (int i = wwTOP; i <= wwRIGHT; i++)
{
switch (nSideBits & (1 << i))
@@ -1519,30 +1519,31 @@ void WW8TabBandDesc::ProcessSpacing(const BYTE* pParams)
}
}
-void WW8TabBandDesc::ProcessSpecificSpacing(const BYTE* pParams)
+void WW8TabBandDesc::ProcessSpecificSpacing(const sal_uInt8* pParams)
{
- BYTE nLen = pParams ? *(pParams - 1) : 0;
+ sal_uInt8 nLen = pParams ? *(pParams - 1) : 0;
OSL_ENSURE(nLen == 6, "Unexpected spacing len");
if (nLen != 6)
return;
- BYTE nWhichCell = *pParams++;
+ sal_uInt8 nWhichCell = *pParams++;
OSL_ENSURE(nWhichCell < MAX_COL + 1, "Cell out of range in spacings");
if (nWhichCell >= MAX_COL + 1)
return;
++pParams; //unknown byte
- BYTE nSideBits = *pParams++;
+ sal_uInt8 nSideBits = *pParams++;
OSL_ENSURE(nSideBits < 0x10, "Unexpected value for nSideBits");
nOverrideSpacing[nWhichCell] |= nSideBits;
OSL_ENSURE(nOverrideSpacing[nWhichCell] < 0x10,
"Unexpected value for nSideBits");
#if OSL_DEBUG_LEVEL > 1
- BYTE nUnknown2 = *pParams;
+ sal_uInt8 nUnknown2 = *pParams;
OSL_ENSURE(nUnknown2 == 0x3, "Unexpected value for spacing2");
+
#endif
++pParams;
- USHORT nValue = SVBT16ToShort( pParams );
+ sal_uInt16 nValue = SVBT16ToShort( pParams );
for (int i=0; i < 4; i++)
{
@@ -1551,14 +1552,14 @@ void WW8TabBandDesc::ProcessSpecificSpacing(const BYTE* pParams)
}
}
-void WW8TabBandDesc::ProcessSprmTDelete(const BYTE* pParamsTDelete)
+void WW8TabBandDesc::ProcessSprmTDelete(const sal_uInt8* pParamsTDelete)
{
if( nWwCols && pParamsTDelete ) // set one or more cell length(s)
{
- BYTE nitcFirst= pParamsTDelete[0]; // first col to be deleted
+ sal_uInt8 nitcFirst= pParamsTDelete[0]; // first col to be deleted
if (nitcFirst >= nWwCols) // first index to delete from doesn't exist
return;
- BYTE nitcLim = pParamsTDelete[1]; // (last col to be deleted)+1
+ sal_uInt8 nitcLim = pParamsTDelete[1]; // (last col to be deleted)+1
if (nitcLim <= nitcFirst) // second index to delete to is not greater than first index
return;
@@ -1597,9 +1598,9 @@ void WW8TabBandDesc::ProcessSprmTDelete(const BYTE* pParamsTDelete)
// ReadShd liest ggfs die Hintergrundfarben einer Zeile ein.
// Es muss vorher ReadDef aufgerufen worden sein
-void WW8TabBandDesc::ReadShd(const BYTE* pS )
+void WW8TabBandDesc::ReadShd(const sal_uInt8* pS )
{
- BYTE nLen = pS ? *(pS - 1) : 0;
+ sal_uInt8 nLen = pS ? *(pS - 1) : 0;
if( !nLen )
return;
@@ -1619,9 +1620,9 @@ void WW8TabBandDesc::ReadShd(const BYTE* pS )
pSHDs[i].SetWWValue( *pShd );
}
-void WW8TabBandDesc::ReadNewShd(const BYTE* pS, bool bVer67)
+void WW8TabBandDesc::ReadNewShd(const sal_uInt8* pS, bool bVer67)
{
- BYTE nLen = pS ? *(pS - 1) : 0;
+ sal_uInt8 nLen = pS ? *(pS - 1) : 0;
if (!nLen)
return;
@@ -1645,9 +1646,9 @@ void WW8TabBandDesc::setcelldefaults(WW8_TCell *pCells, short nCols)
memset( pCells, 0, nCols * sizeof( WW8_TCell ) );
}
-const BYTE *HasTabCellSprm(WW8PLCFx_Cp_FKP* pPap, bool bVer67)
+const sal_uInt8 *HasTabCellSprm(WW8PLCFx_Cp_FKP* pPap, bool bVer67)
{
- const BYTE *pParams;
+ const sal_uInt8 *pParams;
if (bVer67)
pParams = pPap->HasSprm(24);
else
@@ -1839,8 +1840,8 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
{
short nTabeDxaNew = SHRT_MAX;
bool bTabRowJustRead = false;
- const BYTE* pShadeSprm = 0;
- const BYTE* pNewShadeSprm = 0;
+ const sal_uInt8* pShadeSprm = 0;
+ const sal_uInt8* pNewShadeSprm = 0;
WW8_TablePos *pTabPos = 0;
// Suche Ende einer TabZeile
@@ -1856,7 +1857,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
pPap->GetSprms( &aDesc );
WW8SprmIter aSprmIter(aDesc.pMemPos, aDesc.nSprmsLen, aSprmParser);
- const BYTE* pParams = aSprmIter.GetAktParams();
+ const sal_uInt8* pParams = aSprmIter.GetAktParams();
for (int nLoop = 0; nLoop < 2; ++nLoop)
{
bool bRepeatedSprm = false;
@@ -1868,9 +1869,9 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
{
case sprmTTableWidth:
{
- const BYTE b0 = pParams[0];
- const BYTE b1 = pParams[1];
- const BYTE b2 = pParams[2];
+ const sal_uInt8 b0 = pParams[0];
+ const sal_uInt8 b1 = pParams[1];
+ const sal_uInt8 b2 = pParams[2];
if (b0 == 3) // Twips
nPreferredWidth = b2 * 0x100 + b1;
}
@@ -1905,10 +1906,10 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
bIsBiDi = SVBT16ToShort(pParams) ? true : false;
break;
case sprmTDxaGapHalf:
- pNewBand->nGapHalf = (INT16)SVBT16ToShort( pParams );
+ pNewBand->nGapHalf = (sal_Int16)SVBT16ToShort( pParams );
break;
case sprmTDyaRowHeight:
- pNewBand->nLineHeight = (INT16)SVBT16ToShort( pParams );
+ pNewBand->nLineHeight = (sal_Int16)SVBT16ToShort( pParams );
bClaimLineFmt = true;
break;
case sprmTDefTable:
@@ -1927,7 +1928,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
// parameter (meaning the left-most position) and then
// shift the whole table to that margin (see below)
{
- short nDxaNew = (INT16)SVBT16ToShort( pParams );
+ short nDxaNew = (sal_Int16)SVBT16ToShort( pParams );
nOrgDxaLeft = nDxaNew;
if( nDxaNew < nTabeDxaNew )
nTabeDxaNew = nDxaNew;
@@ -2029,7 +2030,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
//Are we still in a table cell
pParams = HasTabCellSprm(pPap, bOldVer);
- const BYTE *pLevel = pPap->HasSprm(0x6649);
+ const sal_uInt8 *pLevel = pPap->HasSprm(0x6649);
// InTable
if (!pParams || (1 != *pParams) ||
(pLevel && (*pLevel <= pIo->nInTable)))
@@ -2290,11 +2291,11 @@ void WW8TabDesc::CalcDefaults()
pR->bREmptyCol = (nMaxRight - pR->nCenter[pR->nWwCols] - nRightMaxThickness) >= MINLAY;
short nAddCols = pR->bLEmptyCol + pR->bREmptyCol;
- USHORT i;
- USHORT j = ( pR->bLEmptyCol ) ? 1 : 0;
+ sal_uInt16 i;
+ sal_uInt16 j = ( pR->bLEmptyCol ) ? 1 : 0;
for (i = 0; i < pR->nWwCols; ++i)
{
- pR->nTransCell[i] = (INT8)j;
+ pR->nTransCell[i] = (sal_Int8)j;
if ( pR->nCenter[i] < pR->nCenter[i+1] )
{
pR->bExist[i] = true;
@@ -2316,15 +2317,15 @@ void WW8TabDesc::CalcDefaults()
*/
if (i && pR->bExist[i-1] == false)
{
- USHORT k=i-1;
+ sal_uInt16 k=i-1;
while (k && pR->bExist[k] == false)
k--;
- for (USHORT n=k+1;n<i;n++)
+ for (sal_uInt16 n=k+1;n<i;n++)
pR->nTransCell[n] = pR->nTransCell[k];
}
- pR->nTransCell[i++] = (INT8)(j++); // Wird u.a. wegen bREmptyCol um
- pR->nTransCell[i] = (INT8)j; // max. 2 ueberindiziert
+ pR->nTransCell[i++] = (sal_Int8)(j++); // Wird u.a. wegen bREmptyCol um
+ pR->nTransCell[i] = (sal_Int8)j; // max. 2 ueberindiziert
pR->nSwCols = pR->nSwCols + nAddCols;
if( pR->nSwCols < nMinCols )
@@ -2426,7 +2427,7 @@ void WW8TabDesc::CreateSwTable()
// da sich die (identischen) Zeilen eines Bandes prima duplizieren lassen
pTable = pIo->rDoc.InsertTable(
SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 0 ),
- *pTmpPos, nBands, nDefaultSwCols, eOri, 0, 0, FALSE, TRUE );
+ *pTmpPos, nBands, nDefaultSwCols, eOri, 0, 0, sal_False, sal_True );
OSL_ENSURE(pTable && pTable->GetFrmFmt(), "insert table failed");
if (!pTable || !pTable->GetFrmFmt())
@@ -2444,7 +2445,7 @@ void WW8TabDesc::CreateSwTable()
// ein Pagedesc steht. Dann wuerde der PageDesc in die naechste Zeile
// hinter der Tabelle rutschen, wo er nichts zu suchen hat. -> loeschen
// und spaeter an das Tabellenformat setzen
- if (SwTxtNode* pNd = pIo->rDoc.GetNodes()[pTmpPos->nNode]->GetTxtNode())
+ if (SwTxtNode *const pNd = pTmpPos->nNode.GetNode().GetTxtNode())
{
if (const SfxItemSet* pSet = pNd->GetpSwAttrSet())
{
@@ -2541,7 +2542,7 @@ void WW8TabDesc::UseSwTable()
OSL_ENSURE( pTblNd, "wo ist mein TabellenNode" );
// #i69519# - Restrict rows to repeat to a decent value
- if ( nRowsToRepeat == static_cast<USHORT>(nRows) )
+ if ( nRowsToRepeat == static_cast<sal_uInt16>(nRows) )
nRowsToRepeat = 1;
pTblNd->GetTable().SetRowsToRepeat( nRowsToRepeat );
@@ -2584,7 +2585,7 @@ void WW8TabDesc::MergeCells()
pTabLine = (*pTabLines)[ nRow ];
pTabBoxes = &pTabLine->GetTabBoxes();
- USHORT nCol = pActBand->nTransCell[ i ];
+ sal_uInt16 nCol = pActBand->nTransCell[ i ];
if (!pActBand->bExist[i])
continue;
OSL_ENSURE(nCol < pTabBoxes->Count(),
@@ -2612,7 +2613,7 @@ void WW8TabDesc::MergeCells()
//If its a hori merge only, and the only things in
//it are invalid cells then its already taken care
//of, so don't merge.
- for (USHORT i2 = i+1; i2 < pActBand->nWwCols; i2++ )
+ for (sal_uInt16 i2 = i+1; i2 < pActBand->nWwCols; i2++ )
if (pActBand->pTCs[ i2 ].bMerged &&
!pActBand->pTCs[ i2 ].bFirstMerged )
{
@@ -2646,7 +2647,7 @@ void WW8TabDesc::MergeCells()
// Needed to correctly locked previously created merge groups.
// Gesamtbreite ermitteln und zuweisen
short nSizCell = pActBand->nWidth[ i ];
- for (USHORT i2 = i+1; i2 < pActBand->nWwCols; i2++ )
+ for (sal_uInt16 i2 = i+1; i2 < pActBand->nWwCols; i2++ )
if (pActBand->pTCs[ i2 ].bMerged &&
!pActBand->pTCs[ i2 ].bFirstMerged )
{
@@ -2748,17 +2749,17 @@ void WW8TabDesc::FinishSwTable()
{
// bearbeite alle Merge-Gruppen nacheinander
WW8SelBoxInfo* pActMGroup;
- USHORT nActBoxCount;
+ sal_uInt16 nActBoxCount;
- for (USHORT iGr = 0; iGr < pMergeGroups->Count(); ++iGr)
+ for (sal_uInt16 iGr = 0; iGr < pMergeGroups->Count(); ++iGr)
{
pActMGroup = (*pMergeGroups)[ iGr ];
nActBoxCount = pActMGroup->Count();
if( ( 1 < nActBoxCount ) && pActMGroup && (*pActMGroup)[ 0 ] )
{
- const USHORT nRowSpan = pActMGroup->Count();
- for (USHORT n = 0; n < nRowSpan; ++n)
+ const sal_uInt16 nRowSpan = pActMGroup->Count();
+ for (sal_uInt16 n = 0; n < nRowSpan; ++n)
{
SwTableBox* pCurrentBox = (*pActMGroup)[n];
const long nRowSpanSet = n == 0 ?
@@ -2798,7 +2799,6 @@ bool WW8TabDesc::FindMergeGroup(short nX1, short nWidth, bool bExact,
short nGrX2;
// improvement: search backwards
- // for ( USHORT iGr = 0; iGr < pMergeGroups->Count(); iGr++ )
for ( short iGr = pMergeGroups->Count() - 1; iGr >= 0; --iGr )
{
// die aktuell untersuchte Gruppe
@@ -2841,7 +2841,7 @@ bool WW8TabDesc::FindMergeGroup(short nX1, short nWidth, bool bExact,
bool WW8TabDesc::IsValidCell(short nCol) const
{
- return pActBand->bExist[nCol] && (USHORT)nAktRow < pTabLines->Count();
+ return pActBand->bExist[nCol] && (sal_uInt16)nAktRow < pTabLines->Count();
}
bool WW8TabDesc::InFirstParaInCell() const
@@ -2883,9 +2883,9 @@ bool WW8TabDesc::SetPamInCell(short nWwCol, bool bPam)
{
OSL_ENSURE( pActBand, "pActBand ist 0" );
- USHORT nCol = pActBand->nTransCell[nWwCol];
+ sal_uInt16 nCol = pActBand->nTransCell[nWwCol];
- if ((USHORT)nAktRow >= pTabLines->Count())
+ if ((sal_uInt16)nAktRow >= pTabLines->Count())
{
OSL_ENSURE(!this, "Actual row bigger than expected." );
if (bPam)
@@ -3079,7 +3079,7 @@ void WW8TabDesc::SetTabShades( SwTableBox* pBox, short nWwIdx )
}
}
-SvxFrameDirection MakeDirection(sal_uInt16 nCode, BOOL bIsBiDi)
+SvxFrameDirection MakeDirection(sal_uInt16 nCode, sal_Bool bIsBiDi)
{
SvxFrameDirection eDir = FRMDIR_ENVIRONMENT;
// 1: Asian layout with rotated CJK characters
@@ -3148,7 +3148,7 @@ void WW8TabDesc::AdjustNewBand()
InsertCells( pActBand->nSwCols - nDefaultSwCols );
SetPamInCell( 0, false);
- OSL_ENSURE( pTabBoxes && pTabBoxes->Count() == (USHORT)pActBand->nSwCols,
+ OSL_ENSURE( pTabBoxes && pTabBoxes->Count() == (sal_uInt16)pActBand->nSwCols,
"Falsche Spaltenzahl in Tabelle" );
if( bClaimLineFmt )
@@ -3272,7 +3272,7 @@ void WW8TabDesc::TableCellEnd()
// bWasTabRowEnd will be deactivated in
// SwWW8ImplReader::ProcessSpecial()
- USHORT iCol = GetLogicalWWCol();
+ sal_uInt16 iCol = GetLogicalWWCol();
if (iCol < aNumRuleNames.size())
{
aNumRuleNames.erase(aNumRuleNames.begin() + iCol,
@@ -3319,7 +3319,7 @@ void WW8TabDesc::TableCellEnd()
SwTableBox* WW8TabDesc::UpdateTableMergeGroup( WW8_TCell& rCell,
WW8SelBoxInfo* pActGroup,
SwTableBox* pActBox,
- USHORT nCol )
+ sal_uInt16 nCol )
{
// Rueckgabewert defaulten
SwTableBox* pResult = 0;
@@ -3362,12 +3362,12 @@ SwTableBox* WW8TabDesc::UpdateTableMergeGroup( WW8_TCell& rCell,
}
-USHORT WW8TabDesc::GetLogicalWWCol() const // returns number of col as INDICATED within WW6 UI status line -1
+sal_uInt16 WW8TabDesc::GetLogicalWWCol() const // returns number of col as INDICATED within WW6 UI status line -1
{
- USHORT nCol = 0;
+ sal_uInt16 nCol = 0;
if( pActBand && pActBand->pTCs)
{
- for( USHORT iCol = 1; iCol <= nAktCol && iCol <= pActBand->nWwCols; ++iCol )
+ for( sal_uInt16 iCol = 1; iCol <= nAktCol; ++iCol )
{
if( !pActBand->pTCs[ iCol-1 ].bMerged )
++nCol;
@@ -3379,7 +3379,7 @@ USHORT WW8TabDesc::GetLogicalWWCol() const // returns number of col as INDICATED
// find name of numrule valid for current WW-COL
const String& WW8TabDesc::GetNumRuleName() const
{
- USHORT nCol = GetLogicalWWCol();
+ sal_uInt16 nCol = GetLogicalWWCol();
if (nCol < aNumRuleNames.size())
return aNumRuleNames[nCol];
else
@@ -3388,8 +3388,8 @@ const String& WW8TabDesc::GetNumRuleName() const
void WW8TabDesc::SetNumRuleName( const String& rName )
{
- USHORT nCol = GetLogicalWWCol();
- for (USHORT nSize = static_cast< USHORT >(aNumRuleNames.size()); nSize <= nCol; ++nSize)
+ sal_uInt16 nCol = GetLogicalWWCol();
+ for (sal_uInt16 nSize = static_cast< sal_uInt16 >(aNumRuleNames.size()); nSize <= nCol; ++nSize)
aNumRuleNames.push_back(aEmptyStr);
aNumRuleNames[nCol] = rName;
}
@@ -3502,7 +3502,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
// <--
// #i33818# - The nested table doesn't have to leave
// the table cell. Thus, the Writer fly frame has to follow the text flow.
- pTableDesc->pFlyFmt->SetFmtAttr( SwFmtFollowTextFlow( TRUE ) );
+ pTableDesc->pFlyFmt->SetFmtAttr( SwFmtFollowTextFlow( sal_True ) );
// <--
}
else
@@ -3575,13 +3575,13 @@ void SwWW8ImplReader::TabCellEnd()
mpTableEndPaM.reset();
}
-void SwWW8ImplReader::Read_TabCellEnd( USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_TabCellEnd( sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( ( nLen > 0 ) && ( *pData == 1 ) )
bWasTabCellEnd = true;
}
-void SwWW8ImplReader::Read_TabRowEnd( USHORT, const BYTE* pData, short nLen ) // Sprm25
+void SwWW8ImplReader::Read_TabRowEnd( sal_uInt16, const sal_uInt8* pData, short nLen ) // Sprm25
{
if( ( nLen > 0 ) && ( *pData == 1 ) )
bWasTabRowEnd = true;
@@ -3661,12 +3661,12 @@ bool SwWW8ImplReader::IsInvalidOrToBeMergedTabCell() const
);
}
-USHORT SwWW8ImplReader::StyleUsingLFO( USHORT nLFOIndex ) const
+sal_uInt16 SwWW8ImplReader::StyleUsingLFO( sal_uInt16 nLFOIndex ) const
{
- USHORT nRes = USHRT_MAX;
+ sal_uInt16 nRes = USHRT_MAX;
if( pCollA )
{
- for(USHORT nI = 0; nI < pStyles->GetCount(); nI++ )
+ for(sal_uInt16 nI = 0; nI < pStyles->GetCount(); nI++ )
if( pCollA[ nI ].bValid
&& (nLFOIndex == pCollA[ nI ].nLFOIndex) )
nRes = nI;
@@ -3679,7 +3679,7 @@ const SwFmt* SwWW8ImplReader::GetStyleWithOrgWWName( String& rName ) const
SwFmt* pRet = 0;
if( pCollA )
{
- for(USHORT nI = 0; nI < pStyles->GetCount(); nI++ )
+ for(sal_uInt16 nI = 0; nI < pStyles->GetCount(); nI++ )
if( pCollA[ nI ].bValid
&& (rName.Equals( pCollA[ nI ].GetOrgWWName())) )
{
@@ -3694,17 +3694,17 @@ const SwFmt* SwWW8ImplReader::GetStyleWithOrgWWName( String& rName ) const
// class WW8RStyle
//-----------------------------------------
-const BYTE* WW8RStyle::HasParaSprm( USHORT nId ) const
+const sal_uInt8* WW8RStyle::HasParaSprm( sal_uInt16 nId ) const
{
if( !pParaSprms || !nSprmsLen )
return 0;
- const BYTE* pSprms = pParaSprms;
- USHORT i, x;
+ const sal_uInt8* pSprms = pParaSprms;
+ sal_uInt16 i, x;
for( i=0; i < nSprmsLen; )
{
- USHORT nAktId = maSprmParser.GetSprmId(pSprms);
+ sal_uInt16 nAktId = maSprmParser.GetSprmId(pSprms);
// Sprm found ?
if( nAktId == nId )
return pSprms + maSprmParser.DistanceToData(nId);
@@ -3716,7 +3716,7 @@ const BYTE* WW8RStyle::HasParaSprm( USHORT nId ) const
return 0; // Sprm not found
}
-void WW8RStyle::ImportSprms(BYTE *pSprms, short nLen, bool bPap)
+void WW8RStyle::ImportSprms(sal_uInt8 *pSprms, short nLen, bool bPap)
{
if (!nLen)
return;
@@ -3729,7 +3729,7 @@ void WW8RStyle::ImportSprms(BYTE *pSprms, short nLen, bool bPap)
while ( nLen > 0 )
{
- USHORT nL1 = pIo->ImportSprm(pSprms);
+ sal_uInt16 nL1 = pIo->ImportSprm(pSprms);
nLen = nLen - nL1;
pSprms += nL1;
}
@@ -3743,7 +3743,7 @@ void WW8RStyle::ImportSprms(sal_Size nPosFc, short nLen, bool bPap)
if (!nLen)
return;
- BYTE *pSprms = new BYTE[nLen];
+ sal_uInt8 *pSprms = new sal_uInt8[nLen];
pStStrm->Seek(nPosFc);
pStStrm->Read(pSprms, nLen);
@@ -3757,7 +3757,7 @@ static inline short WW8SkipOdd(SvStream* pSt )
{
if ( pSt->Tell() & 0x1 )
{
- UINT8 c;
+ sal_uInt8 c;
pSt->Read( &c, 1 );
return 1;
}
@@ -3768,7 +3768,7 @@ static inline short WW8SkipEven(SvStream* pSt )
{
if (!(pSt->Tell() & 0x1))
{
- UINT8 c;
+ sal_uInt8 c;
pSt->Read( &c, 1 );
return 1;
}
@@ -3777,7 +3777,7 @@ static inline short WW8SkipEven(SvStream* pSt )
short WW8RStyle::ImportUPX(short nLen, bool bPAP, bool bOdd)
{
- INT16 cbUPX;
+ sal_Int16 cbUPX;
if( 0 < nLen ) // Empty ?
{
@@ -3797,7 +3797,7 @@ short WW8RStyle::ImportUPX(short nLen, bool bPAP, bool bOdd)
{
if( bPAP )
{
- UINT16 id;
+ sal_uInt16 id;
*pStStrm >> id;
cbUPX-= 2;
@@ -3928,7 +3928,7 @@ bool WW8RStyle::PrepareStyle(SwWW8StyInf &rSI, ww::sti eSti, sal_uInt16 nThisSty
rSI.bImportSkipped = !bImport;
// Set Based on style
- USHORT j = rSI.nBase;
+ sal_uInt16 j = rSI.nBase;
if (j != nThisStyle && j < cstd )
{
SwWW8StyInf* pj = &pIo->pCollA[j];
@@ -3990,7 +3990,7 @@ void WW8RStyle::PostStyle(SwWW8StyInf &rSI, bool bOldNoImp)
pIo->nListLevel = WW8ListManager::nMaxLevel;
}
-void WW8RStyle::Import1Style( USHORT nNr )
+void WW8RStyle::Import1Style( sal_uInt16 nNr )
{
SwWW8StyInf &rSI = pIo->pCollA[nNr];
@@ -4043,7 +4043,7 @@ void WW8RStyle::Import1Style( USHORT nNr )
delete pStd;
}
-void WW8RStyle::RecursiveReg(USHORT nNr)
+void WW8RStyle::RecursiveReg(sal_uInt16 nNr)
{
SwWW8StyInf &rSI = pIo->pCollA[nNr];
if( rSI.bImported || !rSI.bValid )
@@ -4065,7 +4065,7 @@ void WW8RStyle::RecursiveReg(USHORT nNr)
*/
void WW8RStyle::PostProcessStyles()
{
- USHORT i;
+ sal_uInt16 i;
/*
Clear all imported flags so that we can recursively apply numbering
formats and use it to mark handled ones
@@ -4095,7 +4095,7 @@ void WW8RStyle::PostProcessStyles()
void WW8RStyle::ScanStyles() // untersucht Style-Abhaengigkeiten
{ // und ermittelt die Filepos fuer jeden Style
- for (USHORT i = 0; i < cstd; ++i)
+ for (sal_uInt16 i = 0; i < cstd; ++i)
{
short nSkip;
SwWW8StyInf &rSI = pIo->pCollA[i];
@@ -4116,30 +4116,30 @@ void WW8RStyle::ScanStyles() // untersucht Style-Abhaengigkeiten
}
}
-std::vector<BYTE> ChpxToSprms(const Word2CHPX &rChpx)
+std::vector<sal_uInt8> ChpxToSprms(const Word2CHPX &rChpx)
{
- std::vector<BYTE> aRet;
+ std::vector<sal_uInt8> aRet;
aRet.push_back(60);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fBold) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fBold) );
aRet.push_back(61);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fItalic) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fItalic) );
aRet.push_back(62);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fStrike) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fStrike) );
aRet.push_back(63);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fOutline) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fOutline) );
aRet.push_back(65);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fSmallCaps) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fSmallCaps) );
aRet.push_back(66);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fCaps) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fCaps) );
aRet.push_back(67);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fVanish) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fVanish) );
if (rChpx.fsFtc)
{
@@ -4187,10 +4187,10 @@ std::vector<BYTE> ChpxToSprms(const Word2CHPX &rChpx)
}
aRet.push_back(80);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fBoldBi) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fBoldBi) );
aRet.push_back(81);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fItalicBi) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fItalicBi) );
if (rChpx.fsFtcBi)
{
@@ -4369,7 +4369,7 @@ void WW8RStyle::ImportOldFormatStyles()
sal_uInt16 cbName;
rSt >> cbName;
sal_uInt16 nByteCount = 2;
- USHORT stcp=0;
+ sal_uInt16 stcp=0;
while (nByteCount < cbName)
{
sal_uInt8 nCount;
@@ -4410,14 +4410,14 @@ void WW8RStyle::ImportOldFormatStyles()
stcp++;
}
- USHORT nStyles=stcp;
+ sal_uInt16 nStyles=stcp;
std::vector<pxoffset> aCHPXOffsets(stcp);
sal_uInt16 cbChpx;
rSt >> cbChpx;
nByteCount = 2;
stcp=0;
- std::vector< std::vector<BYTE> > aConvertedChpx;
+ std::vector< std::vector<sal_uInt8> > aConvertedChpx;
while (nByteCount < cbChpx)
{
sal_uInt8 cb;
@@ -4440,7 +4440,7 @@ void WW8RStyle::ImportOldFormatStyles()
nByteCount += nRemainder;
}
else
- aConvertedChpx.push_back( std::vector<BYTE>() );
+ aConvertedChpx.push_back( std::vector<sal_uInt8>() );
stcp++;
if (stcp == nStyles)
@@ -4538,7 +4538,7 @@ void WW8RStyle::ImportNewFormatStyles()
{
ScanStyles(); // Scanne Based On
- for (USHORT i = 0; i < cstd; ++i) // import Styles
+ for (sal_uInt16 i = 0; i < cstd; ++i) // import Styles
if (pIo->pCollA[i].bValid)
Import1Style( i );
}
@@ -4562,11 +4562,11 @@ void WW8RStyle::Import()
ImportStyles();
- for (USHORT i = 0; i < cstd; ++i)
+ for (sal_uInt16 i = 0; i < cstd; ++i)
{
// Follow chain
SwWW8StyInf* pi = &pIo->pCollA[i];
- USHORT j = pi->nFollow;
+ sal_uInt16 j = pi->nFollow;
if( j < cstd )
{
SwWW8StyInf* pj = &pIo->pCollA[j];
diff --git a/sw/source/filter/ww8/ww8par2.hxx b/sw/source/filter/ww8/ww8par2.hxx
index b54d5d02bb93..5e3e2a8cff10 100644
--- a/sw/source/filter/ww8/ww8par2.hxx
+++ b/sw/source/filter/ww8/ww8par2.hxx
@@ -58,24 +58,24 @@ struct WW8FlyPara
// Achtung: *Nicht* umsortieren, da Teile mit
// memcmp verglichen werden
bool bVer67;
- INT16 nSp26, nSp27; // rohe Position
- INT16 nSp45, nSp28; // Breite / Hoehe
- INT16 nLeMgn, nRiMgn, nUpMgn, nLoMgn; // Raender
- BYTE nSp29; // rohe Bindung + Alignment
- BYTE nSp37; // Wrap-Mode ( 1 / 2; 0 = no Apo ? )
+ sal_Int16 nSp26, nSp27; // rohe Position
+ sal_Int16 nSp45, nSp28; // Breite / Hoehe
+ sal_Int16 nLeMgn, nRiMgn, nUpMgn, nLoMgn; // Raender
+ sal_uInt8 nSp29; // rohe Bindung + Alignment
+ sal_uInt8 nSp37; // Wrap-Mode ( 1 / 2; 0 = no Apo ? )
WW8_BRC5 brc; // Umrandung Top, Left, Bottom, Right, Between
bool bBorderLines; // Umrandungslinien
bool bGrafApo; // true: Dieser Rahmen dient allein dazu, die
// enthaltene Grafik anders als zeichengebunden
// zu positionieren
bool mbVertSet; // true if vertical positioning has been set
- BYTE nOrigSp29;
+ sal_uInt8 nOrigSp29;
WW8FlyPara(bool bIsVer67, const WW8FlyPara* pSrc = 0);
bool operator==(const WW8FlyPara& rSrc) const;
- void Read(const BYTE* pSprm29, WW8PLCFx_Cp_FKP* pPap);
- void ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo);
- void Read(const BYTE* pSprm29, WW8RStyle* pStyle);
+ void Read(const sal_uInt8* pSprm29, WW8PLCFx_Cp_FKP* pPap);
+ void ReadFull(const sal_uInt8* pSprm29, SwWW8ImplReader* pIo);
+ void Read(const sal_uInt8* pSprm29, WW8RStyle* pStyle);
void ApplyTabPos(const WW8_TablePos *pTabPos);
bool IsEmpty() const;
};
@@ -85,11 +85,11 @@ struct WW8SwFlyPara
SwFlyFrmFmt* pFlyFmt;
// 1. Teil: daraus abgeleitete Sw-Attribute
- INT16 nXPos, nYPos; // Position
- INT16 nLeMgn, nRiMgn; // Raender
- INT16 nUpMgn, nLoMgn; // Raender
- INT16 nWidth, nHeight; // Groesse
- INT16 nNettoWidth;
+ sal_Int16 nXPos, nYPos; // Position
+ sal_Int16 nLeMgn, nRiMgn; // Raender
+ sal_Int16 nUpMgn, nLoMgn; // Raender
+ sal_Int16 nWidth, nHeight; // Groesse
+ sal_Int16 nNettoWidth;
SwFrmSize eHeightFix; // Hoehe Fix oder Min
RndStdIds eAnchor; // Bindung
@@ -99,12 +99,12 @@ struct WW8SwFlyPara
sal_Int16 eHAlign; // links, rechts, mittig
SwSurround eSurround; // Wrap-Mode
- BYTE nXBind, nYBind; // relativ zu was gebunden
+ sal_uInt8 nXBind, nYBind; // relativ zu was gebunden
// 2.Teil: sich waehrend des Einlesens ergebende AEnderungen
long nNewNettoWidth;
SwPosition* pMainTextPos; // um nach Apo in Haupttext zurueckzukehren
- USHORT nLineSpace; // LineSpace in tw fuer Graf-Apos
+ sal_uInt16 nLineSpace; // LineSpace in tw fuer Graf-Apos
bool bAutoWidth;
bool bToggelPos;
@@ -115,8 +115,8 @@ struct WW8SwFlyPara
const sal_uInt32 nWWPgTop,
const sal_uInt32 nPgLeft,
const sal_uInt32 nPgWidth,
- const INT32 nIniFlyDx,
- const INT32 nIniFlyDy );
+ const sal_Int32 nIniFlyDx,
+ const sal_Int32 nIniFlyDy );
void BoxUpWidth( long nWidth );
SwWW8FltAnchorStack *pOldAnchorStck;
@@ -125,7 +125,7 @@ struct WW8SwFlyPara
class SwWW8StyInf
{
String sWWStyleName;
- USHORT nWWStyleId;
+ sal_uInt16 nWWStyleId;
public:
rtl_TextEncoding eLTRFontSrcCharSet; // rtl_TextEncoding fuer den Font
rtl_TextEncoding eRTLFontSrcCharSet; // rtl_TextEncoding fuer den Font
@@ -134,11 +134,11 @@ public:
WW8FlyPara* pWWFly;
SwNumRule* pOutlineNumrule;
long nFilePos;
- USHORT nBase;
- USHORT nFollow;
- USHORT nLFOIndex;
- BYTE nListLevel;
- BYTE nOutlineLevel; // falls Gliederungs-Style
+ sal_uInt16 nBase;
+ sal_uInt16 nFollow;
+ sal_uInt16 nLFOIndex;
+ sal_uInt8 nListLevel;
+ sal_uInt8 nOutlineLevel; // falls Gliederungs-Style
sal_uInt16 n81Flags; // Fuer Bold, Italic, ...
sal_uInt16 n81BiDiFlags; // Fuer Bold, Italic, ...
SvxLRSpaceItem maWordLR;
@@ -191,12 +191,12 @@ public:
delete pWWFly;
}
- void SetOrgWWIdent( const String& rName, const USHORT nId )
+ void SetOrgWWIdent( const String& rName, const sal_uInt16 nId )
{
sWWStyleName = rName;
nWWStyleId = nId;
}
- USHORT GetWWStyleId() const { return nWWStyleId; }
+ sal_uInt16 GetWWStyleId() const { return nWWStyleId; }
const String& GetOrgWWName() const
{
return sWWStyleName;
@@ -226,10 +226,10 @@ friend class SwWW8ImplReader;
SwNumRule* pStyRule; // Bullets und Aufzaehlungen in Styles
- BYTE* pParaSprms; // alle ParaSprms des UPX falls UPX.Papx
- USHORT nSprmsLen; // Laenge davon
+ sal_uInt8* pParaSprms; // alle ParaSprms des UPX falls UPX.Papx
+ sal_uInt16 nSprmsLen; // Laenge davon
- BYTE nWwNumLevel; // fuer Bullets und Aufzaehlungen in Styles
+ sal_uInt8 nWwNumLevel; // fuer Bullets und Aufzaehlungen in Styles
bool bTxtColChanged;
bool bFontChanged; // For Simulating Default-Font
@@ -240,13 +240,13 @@ friend class SwWW8ImplReader;
bool bWidowsChanged; // For Simulating Default-Widows / Orphans
void ImportSprms(sal_Size nPosFc, short nLen, bool bPap);
- void ImportSprms(BYTE *pSprms, short nLen, bool bPap);
+ void ImportSprms(sal_uInt8 *pSprms, short nLen, bool bPap);
void ImportGrupx(short nLen, bool bPara, bool bOdd);
short ImportUPX(short nLen, bool bPAP, bool bOdd);
void Set1StyleDefaults();
- void Import1Style(USHORT nNr);
- void RecursiveReg(USHORT nNr);
+ void Import1Style(sal_uInt16 nNr);
+ void RecursiveReg(sal_uInt16 nNr);
void ImportStyles();
@@ -264,7 +264,7 @@ public:
WW8RStyle( WW8Fib& rFib, SwWW8ImplReader* pI );
void Import();
void PostProcessStyles();
- const BYTE* HasParaSprm( USHORT nId ) const;
+ const sal_uInt8* HasParaSprm( sal_uInt16 nId ) const;
};
class WW8FlySet: public SfxItemSet
@@ -282,7 +282,7 @@ public:
enum WW8LvlType {WW8_None, WW8_Outline, WW8_Numbering, WW8_Sequence, WW8_Pause};
-WW8LvlType GetNumType(BYTE nWwLevelNo);
+WW8LvlType GetNumType(sal_uInt8 nWwLevelNo);
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index e5cfefd4c3ce..fd5edc4358b2 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -153,7 +153,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr )
WW8_CP currentCP=pF->nSCode;
WW8_CP currentLen=pF->nLen;
- USHORT bkmFindIdx;
+ sal_uInt16 bkmFindIdx;
String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
if (aBookmarkFind.Len()>0) {
@@ -201,7 +201,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, String& rStr )
WW8_CP currentCP=pF->nSCode;
WW8_CP currentLen=pF->nLen;
- USHORT bkmFindIdx;
+ sal_uInt16 bkmFindIdx;
String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
if (aBookmarkFind.Len()>0) {
@@ -276,7 +276,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, String& rStr)
WW8_CP currentCP=pF->nSCode;
WW8_CP currentLen=pF->nLen;
- USHORT bkmFindIdx;
+ sal_uInt16 bkmFindIdx;
String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
if (aBookmarkFind.Len()>0)
@@ -346,8 +346,8 @@ struct WW8LST // nur DIE Eintraege, die WIR benoetigen!
// nIStDNil if no style linked
sal_uInt32 nIdLst; // Unique List ID
sal_uInt32 nTplC; // Unique template code - Was ist das bloss?
- BYTE bSimpleList:1; // Flag: Liste hat nur EINEN Level
- BYTE bRestartHdn:1; // WW6-Kompatibilitaets-Flag:
+ sal_uInt8 bSimpleList:1; // Flag: Liste hat nur EINEN Level
+ sal_uInt8 bRestartHdn:1; // WW6-Kompatibilitaets-Flag:
// true if the list should start numbering over
}; // at the beginning of each section
@@ -375,11 +375,11 @@ struct WW8LVL // nur DIE Eintraege, die WIR benoetigen!
sal_uInt8 nLenGrpprlChpx; // length, in bytes, of the LVL's grpprlChpx
sal_uInt8 nLenGrpprlPapx; // length, in bytes, of the LVL's grpprlPapx
sal_uInt8 nAlign: 2; // alignment (left, right, centered) of the number
- BYTE bLegal: 1; // egal
- BYTE bNoRest:1; // egal
- BYTE bV6Prev:1; // Ver6-Compatible: number will include previous levels
- BYTE bV6PrSp:1; // Ver6-Compatible: egal
- BYTE bV6: 1; // falls true , beachte die V6-Compatible Eintraege!
+ sal_uInt8 bLegal: 1; // egal
+ sal_uInt8 bNoRest:1; // egal
+ sal_uInt8 bV6Prev:1; // Ver6-Compatible: number will include previous levels
+ sal_uInt8 bV6PrSp:1; // Ver6-Compatible: egal
+ sal_uInt8 bV6: 1; // falls true , beachte die V6-Compatible Eintraege!
sal_uInt8 bDummy: 1; // (macht das Byte voll)
};
@@ -392,8 +392,8 @@ struct WW8LFOLVL
// dieses Byte ist _absichtlich_ nicht in das folgende Byte hineingepackt !!
// (siehe Kommentar unten bei struct WW8LFOInfo)
- BYTE bStartAt :1; // true if the start-at value is overridden
- BYTE bFormat :1; // true if the formatting is overriden
+ sal_uInt8 bStartAt :1; // true if the start-at value is overridden
+ sal_uInt8 bFormat :1; // true if the formatting is overriden
WW8LFOLVL() :
nStartAt(1), nLevel(0), bStartAt(1), bFormat(0) {}
@@ -410,8 +410,8 @@ struct WW8LSTInfo // sortiert nach nIdLst (in WW8 verwendete Listen-Id)
SwNumRule* pNumRule; // Zeiger auf entsprechende Listenvorlage im Writer
sal_uInt32 nIdLst; // WW8Id dieser Liste
- BYTE bSimpleList:1;// Flag, ob diese NumRule nur einen Level verwendet
- BYTE bUsedInDoc :1;// Flag, ob diese NumRule im Doc verwendet wird,
+ sal_uInt8 bSimpleList:1;// Flag, ob diese NumRule nur einen Level verwendet
+ sal_uInt8 bUsedInDoc :1;// Flag, ob diese NumRule im Doc verwendet wird,
// oder beim Reader-Ende geloescht werden sollte
WW8LSTInfo(SwNumRule* pNumRule_, WW8LST& aLST)
@@ -441,12 +441,12 @@ struct WW8LFOInfo // unsortiert, d.h. Reihenfolge genau wie im WW8 Stream
// Byte mit hineinpacken, doch waere das eine ziemliche Fehlerquelle,
// an dem Tag, wo MS ihr Listenformat auf mehr als 15 Level aufbohren.
- BYTE bOverride :1;// Flag, ob die NumRule nicht in maLSTInfos steht,
+ sal_uInt8 bOverride :1;// Flag, ob die NumRule nicht in maLSTInfos steht,
// sondern fuer pLFOInfos NEU angelegt wurde
- BYTE bSimpleList:1;// Flag, ob diese NumRule nur einen Level verwendet
- BYTE bUsedInDoc :1;// Flag, ob diese NumRule im Doc verwendet wird,
+ sal_uInt8 bSimpleList:1;// Flag, ob diese NumRule nur einen Level verwendet
+ sal_uInt8 bUsedInDoc :1;// Flag, ob diese NumRule im Doc verwendet wird,
// oder beim Reader-Ende geloescht werden sollte
- BYTE bLSTbUIDSet :1;// Flag, ob bUsedInDoc in maLSTInfos gesetzt wurde,
+ sal_uInt8 bLSTbUIDSet :1;// Flag, ob bUsedInDoc in maLSTInfos gesetzt wurde,
// und nicht nochmals gesetzt zu werden braucht
WW8LFOInfo(const WW8LFO& rLFO);
};
@@ -471,7 +471,7 @@ sal_uInt8* WW8ListManager::GrpprlHasSprm(sal_uInt16 nId, sal_uInt8& rSprms,
sal_uInt8 nLen)
{
sal_uInt8* pSprms = &rSprms;
- USHORT nRemLen=nLen;
+ sal_uInt16 nRemLen=nLen;
while (nRemLen > (maSprmParser.getVersion()?1:0))
{
sal_uInt16 nAktId = maSprmParser.GetSprmId(pSprms);
@@ -479,7 +479,7 @@ sal_uInt8* WW8ListManager::GrpprlHasSprm(sal_uInt16 nId, sal_uInt8& rSprms,
return pSprms + maSprmParser.DistanceToData(nId);
// gib Zeiger auf Daten
- USHORT nSize = maSprmParser.GetSprmSize(nAktId, pSprms);
+ sal_uInt16 nSize = maSprmParser.GetSprmSize(nAktId, pSprms);
pSprms += nSize;
nRemLen -= nSize;
}
@@ -638,7 +638,7 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
// most of the time.
if ( nTabPos != 0 )
{
- const USHORT nDesired = aLVL.nDxaLeft + aLVL.nDxaLeft1;
+ const sal_uInt16 nDesired = aLVL.nDxaLeft + aLVL.nDxaLeft1;
bool bDoAdjust = false;
if ( nDesired < aLVL.nDxaLeft )
@@ -694,8 +694,8 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
// in WW8PAR6.CXX rufen ganz normal ihr NewAttr() oder GetFmtAttr()
// und diese merken am besetzten Reader-ItemSet-Pointer, dass dieser
// spezielle ItemSet relevant ist - und nicht ein Stack oder Style!
- USHORT nOldFlags1 = rReader.GetToggleAttrFlags();
- USHORT nOldFlags2 = rReader.GetToggleBiDiAttrFlags();
+ sal_uInt16 nOldFlags1 = rReader.GetToggleAttrFlags();
+ sal_uInt16 nOldFlags2 = rReader.GetToggleBiDiAttrFlags();
short nLen = aLVL.nLenGrpprlChpx;
sal_uInt8* pSprms1 = &aGrpprlChpx[0];
while (0 < nLen)
@@ -1056,7 +1056,7 @@ SwNumRule* WW8ListManager::CreateNextRule(bool bSimple)
sPrefix += String::CreateFromInt32(nUniqueList++);
// #i86652#
sal_uInt16 nRul =
- rDoc.MakeNumRule( rDoc.GetUniqueNumRuleName(&sPrefix), 0, FALSE,
+ rDoc.MakeNumRule( rDoc.GetUniqueNumRuleName(&sPrefix), 0, sal_False,
SvxNumberFormat::LABEL_ALIGNMENT );
// <--
SwNumRule* pMyNumRule = rDoc.GetNumRuleTbl()[nRul];
@@ -1386,7 +1386,7 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_)
else if (aLFOLVL.bStartAt)
{
aNumFmt.SetStart(
- writer_cast<USHORT>(aLFOLVL.nStartAt));
+ writer_cast<sal_uInt16>(aLFOLVL.nStartAt));
}
//
// 2.2.2.3 das NumFmt in die NumRule aufnehmen
@@ -1477,7 +1477,7 @@ bool IsEqualFormatting(const SwNumRule &rOne, const SwNumRule &rTwo)
if (bRet)
{
- for (BYTE n = 0; n < MAXLEVEL; ++n )
+ for (sal_uInt8 n = 0; n < MAXLEVEL; ++n )
{
//The SvxNumberFormat compare, not the SwNumFmt compare
const SvxNumberFormat &rO = rOne.Get(n);
@@ -1493,7 +1493,7 @@ bool IsEqualFormatting(const SwNumRule &rOne, const SwNumRule &rTwo)
}
SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
- const BYTE nLevel, std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode)
+ const sal_uInt8 nLevel, std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode)
{
sal_uInt16 nLFOInfos = pLFOInfos ? pLFOInfos->Count() : 0;
if( nLFOInfos <= nLFOPosition )
@@ -1551,7 +1551,7 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
SwNumRule *pRet = pLFOInfo->pNumRule;
bool bRestart(false);
- USHORT nStart(0);
+ sal_uInt16 nStart(0);
bool bNewstart(false);
/*
Note: If you fiddle with this then you have to make sure that #i18322#
@@ -1591,7 +1591,7 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
else
{
bNewstart = true;
- nStart = writer_cast<USHORT>
+ nStart = writer_cast<sal_uInt16>
(pLFOInfo->maOverrides[nLevel].nStartAt);
}
}
@@ -2098,10 +2098,10 @@ bool SwWW8ImplReader::ImportFormulaControl(WW8FormulaControl &aFormula,
(*pPlcxMan)++;
nStart = pPlcxMan->Where();
}
- ULONG nOffset = nPicLocFc;
+ sal_uLong nOffset = nPicLocFc;
aSave.Restore(this);
- ULONG nOldPos = pDataStream->Tell();
+ sal_uLong nOldPos = pDataStream->Tell();
WW8_PIC aPic;
pDataStream->Seek( nOffset);
PicRead( pDataStream, &aPic, bVer67);
@@ -2146,8 +2146,8 @@ sal_Bool SwMSConvertControls::InsertFormula(WW8FormulaControl &rFormula)
void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich,
SvStream *pDataStream)
{
- UINT8 nField;
- UINT8 nHeaderByte;
+ sal_uInt8 nField;
+ sal_uInt8 nHeaderByte;
int nType=0;
*pDataStream >> nHeaderByte;
@@ -2286,7 +2286,7 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const String &rString,
awt::Size aRet;
struct CtrlFontMapEntry
{
- USHORT nWhichId;
+ sal_uInt16 nWhichId;
const sal_Char* pPropNm;
};
const CtrlFontMapEntry aMapTable[] =
@@ -2548,7 +2548,7 @@ WW8FormulaEditBox::WW8FormulaEditBox(SwWW8ImplReader &rR)
sal_Bool SwMSConvertControls::InsertControl(
const uno::Reference< form::XFormComponent > & rFComp,
const awt::Size& rSize, uno::Reference< drawing::XShape > *pShape,
- BOOL bFloatingCtrl)
+ sal_Bool bFloatingCtrl)
{
const uno::Reference< container::XIndexContainer > &rComps = GetFormComps();
uno::Any aTmp( &rFComp, ::getCppuType((const uno::Reference<
@@ -2575,8 +2575,8 @@ sal_Bool SwMSConvertControls::InsertControl(
xCreate, uno::UNO_QUERY );
//I lay a small bet that this will change to
- //INT16 nTemp=TextContentAnchorType::AS_CHARACTER;
- INT16 nTemp;
+ //sal_Int16 nTemp=TextContentAnchorType::AS_CHARACTER;
+ sal_Int16 nTemp;
if (bFloatingCtrl)
nTemp= text::TextContentAnchorType_AT_PARAGRAPH;
else
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index 725981e57c05..cd91a87d1f08 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -67,10 +67,10 @@
struct OLE_MFP
{
- INT16 mm; // 0x6 int
- INT16 xExt; // 0x8 int in 1/100 mm
- INT16 yExt; // 0xa int in 1/100 mm
- INT16 hMF; // 0xc int
+ sal_Int16 mm; // 0x6 int
+ sal_Int16 xExt; // 0x8 int in 1/100 mm
+ sal_Int16 yExt; // 0xa int in 1/100 mm
+ sal_Int16 hMF; // 0xc int
};
using namespace ::com::sun::star;
@@ -100,7 +100,7 @@ static bool SwWw8ReadScaling(long& rX, long& rY, SvStorageRef& rSrc1)
OSL_ENSURE( pS->Tell() >= 76, "+OLE-PIC-Stream is shorter than 76 Byte" );
- INT32 nOrgWidth,
+ sal_Int32 nOrgWidth,
nOrgHeight,
nScaleX,
nScaleY,
@@ -141,7 +141,7 @@ static bool SwWw6ReadMetaStream(GDIMetaFile& rWMF, OLE_MFP* pMfp,
STREAM_STD_READ | STREAM_NOCREATE);
SvStorageStream* pSt = xSrc2;
pSt->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- ULONG nRead = pSt->Read( pMfp, sizeof(*pMfp ) );
+ sal_uLong nRead = pSt->Read( pMfp, sizeof(*pMfp ) );
// Mini-Placable-Header lesen
if (nRead != sizeof(*pMfp))
return false;
@@ -196,8 +196,8 @@ static bool SwWw6ReadMacPICTStream(Graphic& rGraph, SvStorageRef& rSrc1)
SvStorageStreamRef xSrc4 = rSrc1->OpenSotStream( CREATE_CONST_ASC( "\3PICT" ));
SvStorageStream* pStp = xSrc4;
pStp->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- BYTE aTestA[10]; // Ist der 01Ole-Stream ueberhaupt vorhanden
- ULONG nReadTst = pStp->Read( aTestA, sizeof( aTestA ) );
+ sal_uInt8 aTestA[10]; // Ist der 01Ole-Stream ueberhaupt vorhanden
+ sal_uLong nReadTst = pStp->Read( aTestA, sizeof( aTestA ) );
if (nReadTst != sizeof(aTestA))
return false;
@@ -425,7 +425,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
if (bOleOk)
{
- ULONG nOldPos = pDataStream->Tell();
+ sal_uLong nOldPos = pDataStream->Tell();
pDataStream->Seek(STREAM_SEEK_TO_END);
SvStream *pTmpData = 0;
if (nObjLocFc < pDataStream->Tell())
@@ -441,7 +441,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
STREAM_STD_READ | STREAM_NOCREATE );
if ( xObjInfoSrc.Is() && !xObjInfoSrc->GetError() )
{
- BYTE nByte = 0;
+ sal_uInt8 nByte = 0;
*xObjInfoSrc >> nByte;
if ( ( nByte >> 4 ) & embed::Aspects::MSOLE_ICON )
nAspect = embed::Aspects::MSOLE_ICON;
@@ -459,17 +459,17 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
}
void SwWW8ImplReader::ReadRevMarkAuthorStrTabl( SvStream& rStrm,
- INT32 nTblPos, INT32 nTblSiz, SwDoc& rDocOut )
+ sal_Int32 nTblPos, sal_Int32 nTblSiz, SwDoc& rDocOut )
{
::std::vector<String> aAuthorNames;
WW8ReadSTTBF( !bVer67, rStrm, nTblPos, nTblSiz, bVer67 ? 2 : 0,
eStructCharSet, aAuthorNames );
- USHORT nCount = static_cast< USHORT >(aAuthorNames.size());
- for( USHORT nAuthor = 0; nAuthor < nCount; ++nAuthor )
+ sal_uInt16 nCount = static_cast< sal_uInt16 >(aAuthorNames.size());
+ for( sal_uInt16 nAuthor = 0; nAuthor < nCount; ++nAuthor )
{
// Store author in doc
- USHORT nSWId = rDocOut.InsertRedlineAuthor(aAuthorNames[nAuthor]);
+ sal_uInt16 nSWId = rDocOut.InsertRedlineAuthor(aAuthorNames[nAuthor]);
// Store matchpair
if( !pAuthorInfos )
pAuthorInfos = new sw::util::AuthorInfos;
@@ -484,14 +484,14 @@ void SwWW8ImplReader::ReadRevMarkAuthorStrTabl( SvStream& rStrm,
*/
// insert or delete content (change char attributes resp.)
void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
- const BYTE* pData, short nLen )
+ const sal_uInt8* pData, short nLen )
{
// there *must* be a SprmCIbstRMark[Del] and a SprmCDttmRMark[Del]
// pointing to the very same char position as our SprmCFRMark[Del]
if (!pPlcxMan)
return;
- const BYTE* pSprmCIbstRMark;
- const BYTE* pSprmCDttmRMark;
+ const sal_uInt8* pSprmCIbstRMark;
+ const sal_uInt8* pSprmCDttmRMark;
if( nsRedlineType_t::REDLINE_FORMAT == eType )
{
pSprmCIbstRMark = pData+1;
@@ -504,7 +504,7 @@ void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
of the change, (possibly a word bug) so we must use the "get a full
list" varient of HasCharSprm and take the last one as the true one.
*/
- std::vector<const BYTE *> aResult;
+ std::vector<const sal_uInt8 *> aResult;
bool bIns = (nsRedlineType_t::REDLINE_INSERT == eType);
if( bVer67 )
{
@@ -529,16 +529,16 @@ void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
else
{
// start of new revision mark, if not there default to first entry
- USHORT nWWAutNo = pSprmCIbstRMark ? SVBT16ToShort( pSprmCIbstRMark ) : 0;
+ sal_uInt16 nWWAutNo = pSprmCIbstRMark ? SVBT16ToShort( pSprmCIbstRMark ) : 0;
sw::util::AuthorInfo aEntry(nWWAutNo);
- USHORT nPos;
+ sal_uInt16 nPos;
if (pAuthorInfos && pAuthorInfos->Seek_Entry(&aEntry, &nPos))
{
if (const sw::util::AuthorInfo* pAuthor = pAuthorInfos->GetObject(nPos))
{
- UINT32 nWWDate = pSprmCDttmRMark ? SVBT32ToUInt32(pSprmCDttmRMark): 0;
+ sal_uInt32 nWWDate = pSprmCDttmRMark ? SVBT32ToUInt32(pSprmCDttmRMark): 0;
DateTime aStamp(sw::ms::DTTM2DateTime(nWWDate));
- USHORT nAutorNo = pAuthor->nOurId;
+ sal_uInt16 nAutorNo = pAuthor->nOurId;
SwFltRedline aNewAttr(eType, nAutorNo, aStamp);
NewAttr(aNewAttr);
@@ -548,19 +548,19 @@ void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
}
// insert new content
-void SwWW8ImplReader::Read_CFRMark(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CFRMark(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
Read_CRevisionMark( nsRedlineType_t::REDLINE_INSERT, pData, nLen );
}
// delete old content
-void SwWW8ImplReader::Read_CFRMarkDel(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CFRMarkDel(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
Read_CRevisionMark( nsRedlineType_t::REDLINE_DELETE, pData, nLen );
}
// change properties of content ( == char formating)
-void SwWW8ImplReader::Read_CPropRMark(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CPropRMark(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
// complex (len is always 7)
// 1 byte - chp.fPropRMark
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index ab9a07d646a0..be19f7453432 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -286,10 +286,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 )
{
@@ -300,8 +300,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;
@@ -555,14 +555,14 @@ static SvxExtNumType GetNumberPara(String& rStr, bool bAllowPageDesc = false)
-bool SwWW8ImplReader::ForceFieldLanguage(SwField &rFld, USHORT nLang)
+bool SwWW8ImplReader::ForceFieldLanguage(SwField &rFld, sal_uInt16 nLang)
{
bool bRet(false);
const SvxLanguageItem *pLang =
(const SvxLanguageItem*)GetFmtAttr(RES_CHRATR_LANGUAGE);
OSL_ENSURE(pLang, "impossible");
- USHORT nDefault = pLang ? pLang->GetValue() : LANGUAGE_ENGLISH_US;
+ sal_uInt16 nDefault = pLang ? pLang->GetValue() : LANGUAGE_ENGLISH_US;
if (nLang != nDefault)
{
@@ -574,12 +574,12 @@ bool SwWW8ImplReader::ForceFieldLanguage(SwField &rFld, USHORT nLang)
return bRet;
}
-String GetWordDefaultDateStringAsUS(SvNumberFormatter* pFormatter, USHORT nLang)
+String GetWordDefaultDateStringAsUS(SvNumberFormatter* pFormatter, sal_uInt16 nLang)
{
//Get the system date in the correct final language layout, convert to
//a known language and modify the 2 digit year part to be 4 digit, and
//convert back to the correct language layout.
- ULONG nIndex = pFormatter->GetFormatIndex(NF_DATE_SYSTEM_SHORT, nLang);
+ sal_uLong nIndex = pFormatter->GetFormatIndex(NF_DATE_SYSTEM_SHORT, nLang);
SvNumberformat aFormat = const_cast<SvNumberformat &>
(*(pFormatter->GetEntry(nIndex)));
@@ -599,17 +599,17 @@ String GetWordDefaultDateStringAsUS(SvNumberFormatter* pFormatter, USHORT nLang)
}
short SwWW8ImplReader::GetTimeDatePara(String& rStr, sal_uInt32& rFormat,
- USHORT &rLang, int nWhichDefault, bool bHijri)
+ sal_uInt16 &rLang, int nWhichDefault, bool bHijri)
{
bool bRTL = false;
if (pPlcxMan && !bVer67)
{
- const BYTE *pResult = pPlcxMan->HasCharSprm(0x85A);
+ const sal_uInt8 *pResult = pPlcxMan->HasCharSprm(0x85A);
if (pResult && *pResult)
bRTL = true;
}
RES_CHRATR eLang = bRTL ? RES_CHRATR_CTL_LANGUAGE : RES_CHRATR_LANGUAGE;
- const SvxLanguageItem *pLang = (SvxLanguageItem*)GetFmtAttr( static_cast< USHORT >(eLang));
+ const SvxLanguageItem *pLang = (SvxLanguageItem*)GetFmtAttr( static_cast< sal_uInt16 >(eLang));
OSL_ENSURE(pLang, "impossible");
rLang = pLang ? pLang->GetValue() : LANGUAGE_ENGLISH_US;
@@ -639,8 +639,8 @@ short SwWW8ImplReader::GetTimeDatePara(String& rStr, sal_uInt32& rFormat,
if (bHijri)
sParams.Insert(CREATE_CONST_ASC("[~hijri]"), 0);
- UINT16 nCheckPos = 0;
- INT16 nType = NUMBERFORMAT_DEFINED;
+ sal_uInt16 nCheckPos = 0;
+ sal_Int16 nType = NUMBERFORMAT_DEFINED;
rFormat = 0;
pFormatter->PutandConvertEntry(sParams, nCheckPos, nType, rFormat,
@@ -649,7 +649,7 @@ short SwWW8ImplReader::GetTimeDatePara(String& rStr, sal_uInt32& rFormat,
return bHasTime ? NUMBERFORMAT_DATETIME : NUMBERFORMAT_DATE;
}
- ULONG nFmtIdx =
+ sal_uLong nFmtIdx =
sw::ms::MSDateTimeFormatToSwFormat(sParams, pFormatter, rLang, bHijri,
GetFib().lid);
short nNumFmtType = NUMBERFORMAT_UNDEFINED;
@@ -1032,9 +1032,9 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes)
if (bNested)
return 0;
- USHORT n = ( aF.nId <= eMax ) ? aF.nId : static_cast< USHORT >(eMax); // alle > 91 werden 92
- USHORT nI = n / 32; // # des UINT32
- ULONG nMask = 1 << ( n % 32 ); // Maske fuer Bits
+ sal_uInt16 n = ( aF.nId <= eMax ) ? aF.nId : static_cast< sal_uInt16 >(eMax); // alle > 91 werden 92
+ sal_uInt16 nI = n / 32; // # des sal_uInt32
+ sal_uLong nMask = 1 << ( n % 32 ); // Maske fuer Bits
if( nFieldTagAlways[nI] & nMask ) // Flag: Tag it
return Read_F_Tag( &aF ); // Resultat nicht als Text
@@ -1221,7 +1221,7 @@ void SwWW8ImplReader::MakeTagString( String& rStr, const String& rOrg )
rStr.Erase( MAX_FIELDLEN - 4 );
}
-void SwWW8ImplReader::InsertTagField( const USHORT nId, const String& rTagText )
+void SwWW8ImplReader::InsertTagField( const sal_uInt16 nId, const String& rTagText )
{
String aName( CREATE_CONST_ASC( "WwFieldTag" ) );
if( SwFltGetFlag( nFieldFlags, SwFltControlStack::TAGS_DO_ID ) ) // Nummer?
@@ -1239,7 +1239,7 @@ void SwWW8ImplReader::InsertTagField( const USHORT nId, const String& rTagText )
SwFieldType* pFT = rDoc.InsertFldType(
SwSetExpFieldType( &rDoc, aName, nsSwGetSetExpType::GSE_STRING ) );
SwSetExpField aFld( (SwSetExpFieldType*)pFT, rTagText ); // SUB_INVISIBLE
- USHORT nSubType = ( SwFltGetFlag( nFieldFlags, SwFltControlStack::TAGS_VISIBLE ) ) ? 0 : nsSwExtendedSubType::SUB_INVISIBLE;
+ sal_uInt16 nSubType = ( SwFltGetFlag( nFieldFlags, SwFltControlStack::TAGS_VISIBLE ) ) ? 0 : nsSwExtendedSubType::SUB_INVISIBLE;
aFld.SetSubType(nSubType | nsSwGetSetExpType::GSE_STRING);
rDoc.InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
@@ -1385,7 +1385,7 @@ long SwWW8ImplReader::MapBookmarkVariables(const WW8FieldDesc* pF,
If there was no bookmark associated with this set field, then we create a
pseudo one and insert it in the document.
*/
- USHORT nIndex;
+ sal_uInt16 nIndex;
pPlcxMan->GetBook()->MapName(rOrigName);
String sName = pPlcxMan->GetBook()->GetBookmark(
pF->nSCode, pF->nSCode + pF->nLen, nIndex);
@@ -1595,9 +1595,9 @@ eF_ResT SwWW8ImplReader::Read_F_Seq( WW8FieldDesc*, String& rStr )
eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, String& rStr )
{
- USHORT nSub=0;
+ sal_uInt16 nSub=0;
// RegInfoFormat, DefaultFormat fuer DocInfoFelder
- USHORT nReg = DI_SUB_AUTHOR;
+ sal_uInt16 nReg = DI_SUB_AUTHOR;
bool bDateTime = false;
if( 85 == pF->nId )
@@ -1674,11 +1674,11 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, String& rStr )
= "REVISIONNUMBER";
static const sal_Char* aName54 // Spanish
= "SNUBBEL BUBBEL";
- static const USHORT nFldCnt = 5;
+ static const sal_uInt16 nFldCnt = 5;
// additional fields are to be coded soon! :-)
- static const USHORT nLangCnt = 4;
+ static const sal_uInt16 nLangCnt = 4;
static const sal_Char *aNameSet_26[nFldCnt][nLangCnt+1] =
{
{aName10, aName11, aName12, aName13, aName14},
@@ -1689,8 +1689,8 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, String& rStr )
};
bool bFldFound= false;
- USHORT nFIdx;
- for(USHORT nLIdx=1; !bFldFound && (nLangCnt > nLIdx); ++nLIdx)
+ sal_uInt16 nFIdx;
+ for(sal_uInt16 nLIdx=1; !bFldFound && (nLangCnt > nLIdx); ++nLIdx)
{
for(nFIdx = 0; !bFldFound && (nFldCnt > nFIdx); ++nFIdx)
{
@@ -1762,7 +1762,7 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, String& rStr )
sal_uInt32 nFormat = 0;
- USHORT nLang(0);
+ sal_uInt16 nLang(0);
if (bDateTime)
{
short nDT = GetTimeDatePara(rStr, nFormat, nLang, pF->nId);
@@ -1837,7 +1837,7 @@ eF_ResT SwWW8ImplReader::Read_F_DateTime( WW8FieldDesc*pF, String& rStr )
sal_uInt32 nFormat = 0;
- USHORT nLang(0);
+ sal_uInt16 nLang(0);
short nDT = GetTimeDatePara(rStr, nFormat, nLang, ww::eDATE, bHijri);
if( NUMBERFORMAT_UNDEFINED == nDT ) // no D/T-Formatstring
@@ -1904,7 +1904,7 @@ eF_ResT SwWW8ImplReader::Read_F_FileName(WW8FieldDesc*, String &rStr)
eF_ResT SwWW8ImplReader::Read_F_Anz( WW8FieldDesc* pF, String& rStr )
{ // SeitenZahl - Feld
- USHORT nSub = DS_PAGE;
+ sal_uInt16 nSub = DS_PAGE;
switch ( pF->nId ){
case 27: nSub = DS_WORD; break; // Wordzahl
case 28: nSub = DS_CHAR; break; // Zeichenzahl
@@ -1927,7 +1927,7 @@ eF_ResT SwWW8ImplReader::Read_F_CurPage( WW8FieldDesc*, String& rStr )
rDoc.InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
static const sal_Char aDelim[] = "-.:\x97\x96";
- BYTE nDelim = nPgChpDelim;
+ sal_uInt8 nDelim = nPgChpDelim;
if( nDelim > 4 )
nDelim = 0;
@@ -2590,9 +2590,9 @@ void SwWW8ImplReader::Read_SubF_Combined( _ReadFieldParams& rReadParam)
void SwWW8ImplReader::Read_SubF_Ruby( _ReadFieldParams& rReadParam)
{
- USHORT nJustificationCode=0;
+ sal_uInt16 nJustificationCode=0;
String sFontName;
- UINT32 nFontSize=0;
+ sal_uInt32 nFontSize=0;
String sRuby;
String sText;
long nRet;
@@ -2606,12 +2606,12 @@ void SwWW8ImplReader::Read_SubF_Ruby( _ReadFieldParams& rReadParam)
if( sTemp.EqualsIgnoreCaseAscii( "jc", 0, 2 ) )
{
sTemp.Erase(0,2);
- nJustificationCode = static_cast<USHORT>(sTemp.ToInt32());
+ nJustificationCode = static_cast<sal_uInt16>(sTemp.ToInt32());
}
else if( sTemp.EqualsIgnoreCaseAscii( "hps", 0, 3 ) )
{
sTemp.Erase(0,3);
- nFontSize= static_cast<UINT32>(sTemp.ToInt32());
+ nFontSize= static_cast<sal_uInt32>(sTemp.ToInt32());
}
else if( sTemp.EqualsIgnoreCaseAscii( "Font:", 0, 5 ) )
{
@@ -2689,7 +2689,7 @@ void SwWW8ImplReader::Read_SubF_Ruby( _ReadFieldParams& rReadParam)
SwFmtRuby aRuby(sRuby);
const SwCharFmt *pCharFmt=0;
//Make a guess at which of asian of western we should be setting
- USHORT nScript;
+ sal_uInt16 nScript;
if (pBreakIt->GetBreakIter().is())
nScript = pBreakIt->GetBreakIter()->getScriptType(sRuby, 0);
else
@@ -2777,7 +2777,7 @@ bool SwWW8ImplReader::AddExtraOutlinesAsExtraStyles(SwTOXBase& rBase)
bool bExtras = false;
//This is the case if the winword outline numbering is set while the
//writer one is not
- for (USHORT nI = 0; nI < nColls; ++nI)
+ for (sal_uInt16 nI = 0; nI < nColls; ++nI)
{
SwWW8StyInf& rSI = pCollA[nI];
if (rSI.IsOutline())
@@ -2812,7 +2812,7 @@ static void EnsureMaxLevelForTemplates(SwTOXBase& rBase)
//Word included.
if ((rBase.GetLevel() != MAXLEVEL) && (nsSwTOXElement::TOX_TEMPLATE & rBase.GetCreateType()))
{
- for (USHORT nI = MAXLEVEL; nI > 0; --nI)
+ for (sal_uInt16 nI = MAXLEVEL; nI > 0; --nI)
{
String sStyles(rBase.GetStyleNames(nI-1));
if (rBase.GetStyleNames(nI-1).Len())
@@ -2854,12 +2854,12 @@ void lcl_toxMatchTSwitch(SwWW8ImplReader& rReader, SwTOXBase& rBase,
else while( STRING_NOTFOUND != nIndex )
{
xub_StrLen nOldIndex=nIndex;
- USHORT nLevel = static_cast<USHORT>(
+ sal_uInt16 nLevel = static_cast<sal_uInt16>(
sParams.GetToken(0, ';', nIndex).ToInt32());
if( STRING_NOTFOUND == nIndex )
{
nIndex = nOldIndex;
- nLevel = static_cast<USHORT>(
+ nLevel = static_cast<sal_uInt16>(
sParams.GetToken(0, ',', nIndex).ToInt32());
}
@@ -2892,9 +2892,9 @@ void lcl_toxMatchTSwitch(SwWW8ImplReader& rReader, SwTOXBase& rBase,
}
}
-USHORT wwSectionManager::CurrentSectionColCount() const
+sal_uInt16 wwSectionManager::CurrentSectionColCount() const
{
- USHORT nIndexCols = 1;
+ sal_uInt16 nIndexCols = 1;
if (!maSegments.empty())
nIndexCols = maSegments.back().maSep.ccolM1 + 1;
return nIndexCols;
@@ -2916,10 +2916,10 @@ bool wwSectionManager::WillHavePageDescHere(SwNodeIndex aIdx) const
return bRet;
}
-USHORT lcl_GetMaxValidWordTOCLevel(const SwForm &rForm)
+sal_uInt16 lcl_GetMaxValidWordTOCLevel(const SwForm &rForm)
{
// GetFormMax() returns level + 1, hence the -1
- USHORT nRet = rForm.GetFormMax()-1;
+ sal_uInt16 nRet = rForm.GetFormMax()-1;
// If the max of this type of TOC is greater than the max of a word
// possible toc, then clip to the word max
@@ -2957,9 +2957,9 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
break;
}
- USHORT nCreateOf = (eTox == TOX_CONTENT) ? nsSwTOXElement::TOX_OUTLINELEVEL : nsSwTOXElement::TOX_MARK;
+ sal_uInt16 nCreateOf = (eTox == TOX_CONTENT) ? nsSwTOXElement::TOX_OUTLINELEVEL : nsSwTOXElement::TOX_MARK;
- USHORT nIndexCols = 1;
+ sal_uInt16 nIndexCols = 1;
const SwTOXType* pType = rDoc.GetTOXType( eTox, 0 );
SwForm aOrigForm(eTox);
@@ -2968,7 +2968,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
switch( eTox ){
case TOX_INDEX:
{
- USHORT eOptions = nsSwTOIOptions::TOI_SAME_ENTRY | nsSwTOIOptions::TOI_CASE_SENSITIVE;
+ sal_uInt16 eOptions = nsSwTOIOptions::TOI_SAME_ENTRY | nsSwTOIOptions::TOI_CASE_SENSITIVE;
// TOX_OUTLINELEVEL setzen wir genau dann, wenn
// die Parameter \o in 1 bis 9 liegen
@@ -2990,7 +2990,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
if( sParams.Len() )
{
nIndexCols =
- static_cast<USHORT>(sParams.ToInt32());
+ static_cast<sal_uInt16>(sParams.ToInt32());
}
}
}
@@ -3005,9 +3005,9 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// Attention: if TOX_CONTENT brave
// GetFormMax() returns MAXLEVEL + 1 !!
- USHORT nEnd = aForm.GetFormMax()-1;
+ sal_uInt16 nEnd = aForm.GetFormMax()-1;
- for(USHORT nLevel = 1;
+ for(sal_uInt16 nLevel = 1;
nLevel <= nEnd;
++nLevel)
{
@@ -3073,8 +3073,8 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// die Parameter \o in 1 bis 9 liegen
// oder der Parameter \f existiert
// oder GARKEINE Switches Parameter angegeben sind.
- USHORT eCreateFrom = 0;
- USHORT nMaxLevel = 0;
+ sal_uInt16 eCreateFrom = 0;
+ sal_uInt16 nMaxLevel = 0;
long nRet;
_ReadFieldParams aReadParam( rStr );
while( -1 != ( nRet = aReadParam.SkipToNextToken() ))
@@ -3093,7 +3093,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
break;
case 'o':
{
- USHORT nVal;
+ sal_uInt16 nVal;
if( !aReadParam.GetTokenSttFromTo(0, &nVal, WW8ListManager::nMaxLevel) )
nVal = lcl_GetMaxValidWordTOCLevel(aOrigForm);
if( nMaxLevel < nVal )
@@ -3106,7 +3106,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
break;
case 'l':
{
- USHORT nVal;
+ sal_uInt16 nVal;
if( aReadParam.GetTokenSttFromTo(0, &nVal, WW8ListManager::nMaxLevel) )
{
if( nMaxLevel < nVal )
@@ -3130,9 +3130,9 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// Attention: if TOX_CONTENT brave
// GetFormMax() returns MAXLEVEL + 1 !!
- USHORT nEnd = aForm.GetFormMax()-1;
+ sal_uInt16 nEnd = aForm.GetFormMax()-1;
- for(USHORT nLevel = 1;
+ for(sal_uInt16 nLevel = 1;
nLevel <= nEnd;
++nLevel)
{
@@ -3178,7 +3178,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
case 'n': // don't print page numbers
{
// read START and END param
- USHORT nStart, nEnd;
+ sal_uInt16 nStart, nEnd;
if( !aReadParam.GetTokenSttFromTo( &nStart, &nEnd,
WW8ListManager::nMaxLevel ) )
{
@@ -3190,7 +3190,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
if (aForm.GetFormMax() <= nEnd)
nEnd = aForm.GetFormMax()-1;
for (
- USHORT nLevel = nStart; nLevel <= nEnd;
+ sal_uInt16 nLevel = nStart; nLevel <= nEnd;
++nLevel
)
{
@@ -3243,12 +3243,12 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
if (bIsHyperlink)
{
SwForm aForm(pBase->GetTOXForm());
- USHORT nEnd = aForm.GetFormMax()-1;
+ sal_uInt16 nEnd = aForm.GetFormMax()-1;
SwFormToken aLinkStart(TOKEN_LINK_START);
SwFormToken aLinkEnd(TOKEN_LINK_END);
// -> #i21237#
- for(USHORT nLevel = 1; nLevel <= nEnd; ++nLevel)
+ for(sal_uInt16 nLevel = 1; nLevel <= nEnd; ++nLevel)
{
SwFormTokens aPattern = aForm.GetPattern(nLevel);
@@ -3273,7 +3273,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
{
//If we would be created from outlines, either explictly or by default
//then see if we need extra styles added to the outlines
- USHORT eEffectivelyFrom = eCreateFrom ? eCreateFrom : nsSwTOXElement::TOX_OUTLINELEVEL;
+ sal_uInt16 eEffectivelyFrom = eCreateFrom ? eCreateFrom : nsSwTOXElement::TOX_OUTLINELEVEL;
if (eEffectivelyFrom & nsSwTOXElement::TOX_OUTLINELEVEL)
{
if (AddExtraOutlinesAsExtraStyles(*pBase))
@@ -3284,7 +3284,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// the entry correctly, but I currently have no clue how to obtain
// the tab stop position. It is _not_ set at the paragraph style.
SwForm* pForm = 0;
- for (USHORT nI = 0; nI < nColls; ++nI)
+ for (sal_uInt16 nI = 0; nI < nColls; ++nI)
{
const SwWW8StyInf& rSI = pCollA[nI];
if (rSI.IsOutlineNumbered())
@@ -3340,10 +3340,10 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
*/
SwForm aOldForm( pBase->GetTOXForm() );
SwForm aForm( eType );
- USHORT nEnd = aForm.GetFormMax()-1;
+ sal_uInt16 nEnd = aForm.GetFormMax()-1;
// #i21237#
- for(USHORT nLevel = 1; nLevel <= nEnd; ++nLevel)
+ for(sal_uInt16 nLevel = 1; nLevel <= nEnd; ++nLevel)
{
SwFormTokens aPattern = aOldForm.GetPattern(nLevel);
@@ -3382,7 +3382,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// #i21237# - propagate tab stops from paragraph styles
// used in TOX to patterns of the TOX
- pBase->AdjustTabStops(rDoc, TRUE);
+ pBase->AdjustTabStops(rDoc, sal_True);
// #i10028# - inserting a toc implicltly acts like a parabreak in word and writer
if (pPaM->GetPoint()->nContent.GetIndex())
@@ -3537,7 +3537,7 @@ void lcl_ImportTox(SwDoc &rDoc, SwPaM &rPaM, const String &rStr, bool bIdx)
{
TOXTypes eTox = ( !bIdx ) ? TOX_CONTENT : TOX_INDEX; // Default
- USHORT nLevel = 1;
+ sal_uInt16 nLevel = 1;
xub_StrLen n;
String sFldTxt;
@@ -3573,7 +3573,7 @@ void lcl_ImportTox(SwDoc &rDoc, SwPaM &rPaM, const String &rStr, bool bIdx)
&& sParams.GetChar( 0 ) > '0'
&& sParams.GetChar( 0 ) <= '9' )
{
- nLevel = (USHORT)sParams.ToInt32();
+ nLevel = (sal_uInt16)sParams.ToInt32();
}
}
break;
@@ -3621,7 +3621,7 @@ void SwWW8ImplReader::ImportTox( int nFldId, String aStr )
lcl_ImportTox(rDoc, *pPaM, aStr, bIdx);
}
-void SwWW8ImplReader::Read_FldVanish( USHORT, const BYTE*, short nLen )
+void SwWW8ImplReader::Read_FldVanish( sal_uInt16, const sal_uInt8*, short nLen )
{
//Meaningless in a style
if (pAktColl || !pPlcxMan)
@@ -3632,7 +3632,7 @@ void SwWW8ImplReader::Read_FldVanish( USHORT, const BYTE*, short nLen )
// Vorsicht: Bei Feldnamen mit Umlauten geht das MEMICMP nicht!
const static sal_Char *aFldNames[] = { "\x06""INHALT", "\x02""XE", // dt.
"\x02""TC" }; // us
- const static BYTE aFldId[] = { 9, 4, 9 };
+ const static sal_uInt8 aFldId[] = { 9, 4, 9 };
if( nLen < 0 )
{
@@ -3651,7 +3651,7 @@ void SwWW8ImplReader::Read_FldVanish( USHORT, const BYTE*, short nLen )
WW8_CP nStartCp = pPlcxMan->Where() + pPlcxMan->GetCpOfs();
String sFieldName;
- USHORT nFieldLen = pSBase->WW8ReadString( *pStrm, sFieldName, nStartCp,
+ sal_uInt16 nFieldLen = pSBase->WW8ReadString( *pStrm, sFieldName, nStartCp,
nChunk, eStructCharSet );
nStartCp+=nFieldLen;
@@ -3697,7 +3697,7 @@ void SwWW8ImplReader::Read_FldVanish( USHORT, const BYTE*, short nLen )
for( int i = 0; i < 3; i++ )
{
const sal_Char* pName = aFldNames[i];
- USHORT nNameLen = *pName++;
+ sal_uInt16 nNameLen = *pName++;
if( sFieldName.EqualsIgnoreCaseAscii( pName, nC, nNameLen ) )
{
ImportTox( aFldId[i], sFieldName.Copy( nC + nNameLen ) );
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 47d98c371a4b..484fb3020c67 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -122,11 +122,11 @@ using namespace nsHdFtFlags;
#define MM_200 1134 // WW-Default fuer u.Seitenrand: 2.0 cm
-BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
+sal_uInt8 lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
const WW8RStyle* pSty = 0, const WW8PLCFx_SEPX* pSep = 0);
-ColorData SwWW8ImplReader::GetCol(BYTE nIco)
+ColorData SwWW8ImplReader::GetCol(sal_uInt8 nIco)
{
static const ColorData eSwWW8ColA[] =
{
@@ -150,24 +150,24 @@ inline sal_uInt32 MSRoundTweak(sal_uInt32 x)
# ( ausser OLST, dass weiterhin ein normales Attribut ist )
#**************************************************************************/
-static short ReadSprm( const WW8PLCFx_SEPX* pSep, USHORT nId, short nDefaultVal )
+static short ReadSprm( const WW8PLCFx_SEPX* pSep, sal_uInt16 nId, short nDefaultVal )
{
- const BYTE* pS = pSep->HasSprm( nId ); // sprm da ?
+ const sal_uInt8* pS = pSep->HasSprm( nId ); // sprm da ?
short nVal = ( pS ) ? SVBT16ToShort( pS ) : nDefaultVal;
return nVal;
}
-static USHORT ReadUSprm( const WW8PLCFx_SEPX* pSep, USHORT nId, short nDefaultVal )
+static sal_uInt16 ReadUSprm( const WW8PLCFx_SEPX* pSep, sal_uInt16 nId, short nDefaultVal )
{
- const BYTE* pS = pSep->HasSprm( nId ); // sprm da ?
- USHORT nVal = ( pS ) ? SVBT16ToShort( pS ) : nDefaultVal;
+ const sal_uInt8* pS = pSep->HasSprm( nId ); // sprm da ?
+ sal_uInt16 nVal = ( pS ) ? SVBT16ToShort( pS ) : nDefaultVal;
return nVal;
}
-static BYTE ReadBSprm( const WW8PLCFx_SEPX* pSep, USHORT nId, BYTE nDefaultVal )
+static sal_uInt8 ReadBSprm( const WW8PLCFx_SEPX* pSep, sal_uInt16 nId, sal_uInt8 nDefaultVal )
{
- const BYTE* pS = pSep->HasSprm( nId ); // sprm da ?
- BYTE nVal = ( pS ) ? SVBT8ToByte( pS ) : nDefaultVal;
+ const sal_uInt8* pS = pSep->HasSprm( nId ); // sprm da ?
+ sal_uInt8 nVal = ( pS ) ? SVBT8ToByte( pS ) : nDefaultVal;
return nVal;
}
@@ -282,7 +282,7 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection)
//Get the size of word's default styles font
sal_uInt32 nCharWidth=240;
- for (USHORT nI = 0; nI < pStyles->GetCount(); ++nI)
+ for (sal_uInt16 nI = 0; nI < pStyles->GetCount(); ++nI)
{
if (pCollA[nI].bValid && pCollA[nI].pFmt &&
pCollA[nI].GetWWStyleId() == 0)
@@ -296,9 +296,9 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection)
//dxtCharSpace
if (rSection.maSep.dxtCharSpace)
{
- UINT32 nCharSpace = rSection.maSep.dxtCharSpace;
+ sal_uInt32 nCharSpace = rSection.maSep.dxtCharSpace;
//main lives in top 20 bits, and is signed.
- INT32 nMain = (nCharSpace & 0xFFFFF000);
+ sal_Int32 nMain = (nCharSpace & 0xFFFFF000);
nMain/=0x1000;
nCharWidth += nMain*20;
@@ -317,7 +317,7 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection)
rFmt.SetFmtAttr(aGrid);
}
-void SwWW8ImplReader::Read_ParaBiDi(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_ParaBiDi(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
pCtrlStck->SetAttr(*pPaM->GetPoint(), RES_FRAMEDIR);
@@ -352,27 +352,27 @@ bool wwSectionManager::SetCols(SwFrmFmt &rFmt, const wwSection &rSection,
aCol.SetLineWidth(1);
}
- aCol.Init(nCols, writer_cast<USHORT>(nColSpace),
- writer_cast<USHORT>(nNettoWidth));
+ aCol.Init(nCols, writer_cast<sal_uInt16>(nColSpace),
+ writer_cast<sal_uInt16>(nNettoWidth));
// sprmSFEvenlySpaced
if (!rSection.maSep.fEvenlySpaced)
{
aCol._SetOrtho(false);
int nIdx = 1;
- for (USHORT i = 0; i < nCols; i++ )
+ for (sal_uInt16 i = 0; i < nCols; i++ )
{
SwColumn* pCol = aCol.GetColumns()[i];
sal_Int32 nLeft = rSection.maSep.rgdxaColumnWidthSpacing[nIdx-1]/2;
sal_Int32 nRight = rSection.maSep.rgdxaColumnWidthSpacing[nIdx+1]/2;
sal_Int32 nWishWidth = rSection.maSep.rgdxaColumnWidthSpacing[nIdx]
+ nLeft + nRight;
- pCol->SetWishWidth(writer_cast<USHORT>(nWishWidth));
- pCol->SetLeft(writer_cast<USHORT>(nLeft));
- pCol->SetRight(writer_cast<USHORT>(nRight));
+ pCol->SetWishWidth(writer_cast<sal_uInt16>(nWishWidth));
+ pCol->SetLeft(writer_cast<sal_uInt16>(nLeft));
+ pCol->SetRight(writer_cast<sal_uInt16>(nRight));
nIdx += 2;
}
- aCol.SetWishWidth(writer_cast<USHORT>(nNettoWidth));
+ aCol.SetWishWidth(writer_cast<sal_uInt16>(nNettoWidth));
}
rFmt.SetFmtAttr(aCol);
return true;
@@ -437,7 +437,7 @@ void wwSectionManager::SetPage(SwPageDesc &rInPageDesc, SwFrmFmt &rFmt,
SetCols(rFmt, rSection, rSection.GetTextAreaWidth());
}
-USHORT lcl_MakeSafeNegativeSpacing(USHORT nIn)
+sal_uInt16 lcl_MakeSafeNegativeSpacing(sal_uInt16 nIn)
{
if (nIn > SHRT_MAX)
nIn = 0;
@@ -460,11 +460,11 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
if (rSection.maSep.pgbOffsetFrom == 1)
{
- USHORT nDist;
+ sal_uInt16 nDist;
if (aBox.GetLeft())
{
nDist = aBox.GetDistance(BOX_LINE_LEFT);
- aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aLR.GetLeft() - nDist)), BOX_LINE_LEFT);
+ aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aLR.GetLeft() - nDist)), BOX_LINE_LEFT);
aSizeArray[WW8_LEFT] =
aSizeArray[WW8_LEFT] - nDist + aBox.GetDistance(BOX_LINE_LEFT);
}
@@ -472,7 +472,7 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
if (aBox.GetRight())
{
nDist = aBox.GetDistance(BOX_LINE_RIGHT);
- aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aLR.GetRight() - nDist)), BOX_LINE_RIGHT);
+ aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aLR.GetRight() - nDist)), BOX_LINE_RIGHT);
aSizeArray[WW8_RIGHT] =
aSizeArray[WW8_RIGHT] - nDist + aBox.GetDistance(BOX_LINE_RIGHT);
}
@@ -480,7 +480,7 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
if (aBox.GetTop())
{
nDist = aBox.GetDistance(BOX_LINE_TOP);
- aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aUL.GetUpper() - nDist)), BOX_LINE_TOP);
+ aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aUL.GetUpper() - nDist)), BOX_LINE_TOP);
aSizeArray[WW8_TOP] =
aSizeArray[WW8_TOP] - nDist + aBox.GetDistance(BOX_LINE_TOP);
}
@@ -488,7 +488,7 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
if (aBox.GetBottom())
{
nDist = aBox.GetDistance(BOX_LINE_BOTTOM);
- aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aUL.GetLower() - nDist)), BOX_LINE_BOTTOM);
+ aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aUL.GetLower() - nDist)), BOX_LINE_BOTTOM);
aSizeArray[WW8_BOT] =
aSizeArray[WW8_BOT] - nDist + aBox.GetDistance(BOX_LINE_BOTTOM);
}
@@ -497,20 +497,20 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
}
if (aBox.GetLeft())
- aLR.SetLeft(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aLR.GetLeft() - aSizeArray[WW8_LEFT])));
+ aLR.SetLeft(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aLR.GetLeft() - aSizeArray[WW8_LEFT])));
if (aBox.GetRight())
- aLR.SetRight(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aLR.GetRight() - aSizeArray[WW8_RIGHT])));
+ aLR.SetRight(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aLR.GetRight() - aSizeArray[WW8_RIGHT])));
if (aBox.GetTop())
- aUL.SetUpper(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aUL.GetUpper() - aSizeArray[WW8_TOP])));
+ aUL.SetUpper(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aUL.GetUpper() - aSizeArray[WW8_TOP])));
if (aBox.GetBottom())
{
//#i30088# and #i30074# - do a final sanity check on
//bottom value. Do not allow a resulting zero if bottom
//Border margin value was not originally zero.
if(aUL.GetLower() != 0)
- aUL.SetLower(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aUL.GetLower() - aSizeArray[WW8_BOT])));
+ aUL.SetLower(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aUL.GetLower() - aSizeArray[WW8_BOT])));
else
- aUL.SetLower(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aOriginalBottomMargin - aSizeArray[WW8_BOT])));
+ aUL.SetLower(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aOriginalBottomMargin - aSizeArray[WW8_BOT])));
}
aSet.Put(aLR);
@@ -609,7 +609,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
pHdFmt->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, 0, rData.nSwHLo));
// #i19922# - minimum page header height is now 1mm
// use new constant <cMinHdFtHeight>
- aHdUL.SetLower( writer_cast<USHORT>(rData.nSwHLo - cMinHdFtHeight) );
+ aHdUL.SetLower( writer_cast<sal_uInt16>(rData.nSwHLo - cMinHdFtHeight) );
pHdFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, true));
}
@@ -618,7 +618,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
// #i48832# - set correct spacing between header and body.
const SwTwips nHdLowerSpace( Abs(rSection.maSep.dyaTop) - rData.nSwUp - rData.nSwHLo );
pHdFmt->SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE, 0, rData.nSwHLo + nHdLowerSpace));
- aHdUL.SetLower( static_cast< USHORT >(nHdLowerSpace) );
+ aHdUL.SetLower( static_cast< sal_uInt16 >(nHdLowerSpace) );
// <--
pHdFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, false));
@@ -637,7 +637,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
pFtFmt->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, 0, rData.nSwFUp));
// #i19922# - minimum page header height is now 1mm
// use new constant <cMinHdFtHeight>
- aFtUL.SetUpper( writer_cast<USHORT>(rData.nSwFUp - cMinHdFtHeight) );
+ aFtUL.SetUpper( writer_cast<sal_uInt16>(rData.nSwFUp - cMinHdFtHeight) );
pFtFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, true));
}
@@ -646,7 +646,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
// #i48832# - set correct spacing between footer and body.
const SwTwips nFtUpperSpace( Abs(rSection.maSep.dyaBottom) - rData.nSwLo - rData.nSwFUp );
pFtFmt->SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE, 0, rData.nSwFUp + nFtUpperSpace));
- aFtUL.SetUpper( static_cast< USHORT >(nFtUpperSpace) );
+ aFtUL.SetUpper( static_cast< sal_uInt16 >(nFtUpperSpace) );
// <--
pFtFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, false));
@@ -655,8 +655,8 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
}
}
- SvxULSpaceItem aUL(writer_cast<USHORT>(rData.nSwUp),
- writer_cast<USHORT>(rData.nSwLo), RES_UL_SPACE);
+ SvxULSpaceItem aUL(writer_cast<sal_uInt16>(rData.nSwUp),
+ writer_cast<sal_uInt16>(rData.nSwLo), RES_UL_SPACE);
rFmt.SetFmtAttr(aUL);
}
@@ -738,7 +738,7 @@ void SwWW8ImplReader::HandleLineNumbering(const wwSection &rSection)
aInfo.SetRestartEachPage(rSection.maSep.lnc == 0);
- aInfo.SetPosFromLeft(writer_cast<USHORT>(rSection.maSep.dxaLnn));
+ aInfo.SetPosFromLeft(writer_cast<sal_uInt16>(rSection.maSep.dxaLnn));
//Paint only for every n line
aInfo.SetCountBy(rSection.maSep.nLnnMod);
@@ -840,12 +840,12 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
aLastSection = maSegments.back();
//Here
- USHORT nLIdx = ( ( mrReader.pWwFib->lid & 0xff ) == 0x9 ) ? 1 : 0;
+ sal_uInt16 nLIdx = ( ( mrReader.pWwFib->lid & 0xff ) == 0x9 ) ? 1 : 0;
//BEGIN read section values
wwSection aNewSection(*mrReader.pPaM->GetPoint());
- static const USHORT aVer2Ids0[] =
+ static const sal_uInt16 aVer2Ids0[] =
{
/*sprmSBkc*/ 117,
/*sprmSFTitlePage*/ 118,
@@ -855,7 +855,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSLBetween*/ 133
};
- static const USHORT aVer67Ids0[] =
+ static const sal_uInt16 aVer67Ids0[] =
{
/*sprmSBkc*/ 142,
/*sprmSFTitlePage*/ 143,
@@ -865,7 +865,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSLBetween*/ 158
};
- static const USHORT aVer8Ids0[] =
+ static const sal_uInt16 aVer8Ids0[] =
{
/*sprmSBkc*/ 0x3009,
/*sprmSFTitlePage*/ 0x300A,
@@ -875,7 +875,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSLBetween*/ 0x3019
};
- const USHORT* pIds = eVer <= ww::eWW2 ? aVer2Ids0 : eVer <= ww::eWW7 ? aVer67Ids0 : aVer8Ids0;
+ const sal_uInt16* pIds = eVer <= ww::eWW2 ? aVer2Ids0 : eVer <= ww::eWW7 ? aVer67Ids0 : aVer8Ids0;
if (!maSegments.empty())
{
@@ -885,7 +885,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
// 2 New page
// 3 Even page
// 4 Odd page
- if (const BYTE* pSprmBkc = pSep->HasSprm(pIds[0]))
+ if (const sal_uInt8* pSprmBkc = pSep->HasSprm(pIds[0]))
aNewSection.maSep.bkc = *pSprmBkc;
}
@@ -925,7 +925,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
for (int i = 0; i < nCols; ++i)
{
//sprmSDxaColWidth
- const BYTE* pSW = pSep->HasSprm( (eVer <= ww::eWW7 ? 136 : 0xF203), BYTE( i ) );
+ const sal_uInt8* pSW = pSep->HasSprm( (eVer <= ww::eWW7 ? 136 : 0xF203), sal_uInt8( i ) );
OSL_ENSURE( pSW, "+Sprm 136 (bzw. 0xF203) (ColWidth) fehlt" );
sal_uInt16 nWidth = pSW ? SVBT16ToShort(pSW + 1) : 1440;
@@ -935,7 +935,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
if (i < nCols-1)
{
//sprmSDxaColSpacing
- const BYTE* pSD = pSep->HasSprm( (eVer <= ww::eWW7 ? 137 : 0xF204), BYTE( i ) );
+ const sal_uInt8* pSD = pSep->HasSprm( (eVer <= ww::eWW7 ? 137 : 0xF204), sal_uInt8( i ) );
OSL_ENSURE( pSD, "+Sprm 137 (bzw. 0xF204) (Colspacing) fehlt" );
if( pSD )
@@ -948,7 +948,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
}
}
- static const USHORT aVer2Ids1[] =
+ static const sal_uInt16 aVer2Ids1[] =
{
/*sprmSBOrientation*/ 137,
/*sprmSXaPage*/ 139,
@@ -962,7 +962,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSDmBinOther*/ 116
};
- static const USHORT aVer67Ids1[] =
+ static const sal_uInt16 aVer67Ids1[] =
{
/*sprmSBOrientation*/ 162,
/*sprmSXaPage*/ 164,
@@ -976,7 +976,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSDmBinOther*/ 141
};
- static const USHORT aVer8Ids1[] =
+ static const sal_uInt16 aVer8Ids1[] =
{
/*sprmSBOrientation*/ 0x301d,
/*sprmSXaPage*/ 0xB01F,
@@ -1002,8 +1002,8 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
aNewSection.maSep.yaPage = ReadUSprm(pSep, pIds[2], lLetterHeight);
// 3. LR-Raender
- static const USHORT nLef[] = { MM_250, 1800 };
- static const USHORT nRig[] = { MM_250, 1800 };
+ static const sal_uInt16 nLef[] = { MM_250, 1800 };
+ static const sal_uInt16 nRig[] = { MM_250, 1800 };
aNewSection.maSep.dxaLeft = ReadUSprm( pSep, pIds[3], nLef[nLIdx]);
aNewSection.maSep.dxaRight = ReadUSprm( pSep, pIds[4], nRig[nLIdx]);
@@ -1027,23 +1027,23 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
if (eVer >= ww::eWW6)
{
- if (const BYTE* p = pSep->HasSprm( (eVer <= ww::eWW7 ? 132 : 0x3001) ))
+ if (const sal_uInt8* p = pSep->HasSprm( (eVer <= ww::eWW7 ? 132 : 0x3001) ))
aNewSection.maSep.iHeadingPgn = *p;
- if (const BYTE* p = pSep->HasSprm( (eVer <= ww::eWW7 ? 131 : 0x3000) ))
+ if (const sal_uInt8* p = pSep->HasSprm( (eVer <= ww::eWW7 ? 131 : 0x3000) ))
aNewSection.maSep.cnsPgn = *p;
}
- if(const BYTE* pSprmSDmBinFirst = pSep->HasSprm( pIds[8] ))
+ if(const sal_uInt8* pSprmSDmBinFirst = pSep->HasSprm( pIds[8] ))
aNewSection.maSep.dmBinFirst = *pSprmSDmBinFirst;
- if (const BYTE* pSprmSDmBinOther = pSep->HasSprm( pIds[9] ))
+ if (const sal_uInt8* pSprmSDmBinOther = pSep->HasSprm( pIds[9] ))
aNewSection.maSep.dmBinOther = *pSprmSDmBinOther;
- static const USHORT nTop[] = { MM_250, 1440 };
- static const USHORT nBot[] = { MM_200, 1440 };
+ static const sal_uInt16 nTop[] = { MM_250, 1440 };
+ static const sal_uInt16 nBot[] = { MM_200, 1440 };
- static const USHORT aVer2Ids2[] =
+ static const sal_uInt16 aVer2Ids2[] =
{
/*sprmSDyaTop*/ 143,
/*sprmSDyaBottom*/ 144,
@@ -1055,7 +1055,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSLnnMin*/ 135
};
- static const USHORT aVer67Ids2[] =
+ static const sal_uInt16 aVer67Ids2[] =
{
/*sprmSDyaTop*/ 168,
/*sprmSDyaBottom*/ 169,
@@ -1066,7 +1066,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSDxaLnn*/ 155,
/*sprmSLnnMin*/ 160
};
- static const USHORT aVer8Ids2[] =
+ static const sal_uInt16 aVer8Ids2[] =
{
/*sprmSDyaTop*/ 0x9023,
/*sprmSDyaBottom*/ 0x9024,
@@ -1090,7 +1090,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
aNewSection.maSep.wTextFlow = ReadUSprm(pSep, 0x5033, 0);
aNewSection.maSep.clm = ReadUSprm( pSep, 0x5032, 0 );
aNewSection.maSep.dyaLinePitch = ReadUSprm(pSep, 0x9031, 360);
- if (const BYTE* pS = pSep->HasSprm(0x7030))
+ if (const sal_uInt8* pS = pSep->HasSprm(0x7030))
aNewSection.maSep.dxtCharSpace = SVBT32ToUInt32(pS);
//sprmSPgbProp
@@ -1104,16 +1104,16 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
}
// check if Line Numbering must be activated or resetted
- if (const BYTE* pSprmSNLnnMod = pSep->HasSprm( pIds[4] ))
+ if (const sal_uInt8* pSprmSNLnnMod = pSep->HasSprm( pIds[4] ))
aNewSection.maSep.nLnnMod = *pSprmSNLnnMod;
- if (const BYTE* pSprmSLnc = pSep->HasSprm( pIds[5] ))
+ if (const sal_uInt8* pSprmSLnc = pSep->HasSprm( pIds[5] ))
aNewSection.maSep.lnc = *pSprmSLnc;
- if (const BYTE* pSprmSDxaLnn = pSep->HasSprm( pIds[6] ))
+ if (const sal_uInt8* pSprmSDxaLnn = pSep->HasSprm( pIds[6] ))
aNewSection.maSep.dxaLnn = SVBT16ToShort( pSprmSDxaLnn );
- if (const BYTE* pSprmSLnnMin = pSep->HasSprm( pIds[7] ))
+ if (const sal_uInt8* pSprmSLnnMin = pSep->HasSprm( pIds[7] ))
aNewSection.maSep.lnnMin = *pSprmSLnnMin;
if (eVer <= ww::eWW7)
@@ -1164,7 +1164,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
}
void SwWW8ImplReader::CopyPageDescHdFt(const SwPageDesc* pOrgPageDesc,
- SwPageDesc* pNewPageDesc, BYTE nCode )
+ SwPageDesc* pNewPageDesc, sal_uInt8 nCode )
{
// copy first header content section
if (nCode & WW8_HEADER_FIRST)
@@ -1208,7 +1208,7 @@ void SwWW8ImplReader::CopyPageDescHdFt(const SwPageDesc* pOrgPageDesc,
// Hilfsroutinen fuer Grafiken und Apos und Tabellen
//------------------------------------------------------
-static bool _SetWW8_BRC(bool bVer67, WW8_BRC& rVar, const BYTE* pS)
+static bool _SetWW8_BRC(bool bVer67, WW8_BRC& rVar, const sal_uInt8* pS)
{
if( pS )
{
@@ -1221,19 +1221,19 @@ static bool _SetWW8_BRC(bool bVer67, WW8_BRC& rVar, const BYTE* pS)
return 0 != pS;
}
-BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
+sal_uInt8 lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
const WW8RStyle* pSty, const WW8PLCFx_SEPX* pSep)
{
-//returns a BYTE filled with a bit for each position that had a sprm
+//returns a sal_uInt8 filled with a bit for each position that had a sprm
//setting that border
- BYTE nBorder = false;
+ sal_uInt8 nBorder = false;
if( pSep )
{
if( !bVer67 )
{
- BYTE* pSprm[4];
+ sal_uInt8* pSprm[4];
// sprmSBrcTop, sprmSBrcLeft, sprmSBrcBottom, sprmSBrcRight
if( pSep->Find4Sprms( 0x702B, 0x702C, 0x702D, 0x702E,
@@ -1247,12 +1247,12 @@ BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
else
{
- static const USHORT aVer67Ids[5] = { 38, 39, 40, 41, 42 };
+ static const sal_uInt16 aVer67Ids[5] = { 38, 39, 40, 41, 42 };
- static const USHORT aVer8Ids[5] =
+ static const sal_uInt16 aVer8Ids[5] =
{ 0x6424, 0x6425, 0x6426, 0x6427, 0x6428 };
- const USHORT* pIds = bVer67 ? aVer67Ids : aVer8Ids;
+ const sal_uInt16* pIds = bVer67 ? aVer67Ids : aVer8Ids;
if( pPap )
{
@@ -1273,8 +1273,8 @@ BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
return nBorder;
}
-void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, BYTE nCol, short nIdx,
- USHORT nOOIndex, USHORT nWWIndex, short *pSize=0)
+void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, sal_uInt8 nCol, short nIdx,
+ sal_uInt16 nOOIndex, sal_uInt16 nWWIndex, short *pSize=0)
{
WW8_BordersSO::eBorderCode eCodeIdx;
@@ -1461,9 +1461,9 @@ void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, BYTE nCo
}
void Set1Border(bool bVer67, SvxBoxItem &rBox, const WW8_BRC& rBor,
- USHORT nOOIndex, USHORT nWWIndex, short *pSize=0)
+ sal_uInt16 nOOIndex, sal_uInt16 nWWIndex, short *pSize=0)
{
- BYTE nCol;
+ sal_uInt8 nCol;
short nSpace, nIdx;
short nLineThickness = rBor.DetermineBorderProperties(bVer67,&nSpace,&nCol,
&nIdx);
@@ -1518,10 +1518,10 @@ bool WW8_BRC::IsZeroed(bool bVer67) const
}
bool SwWW8ImplReader::SetBorder(SvxBoxItem& rBox, const WW8_BRC* pbrc,
- short *pSizeArray, BYTE nSetBorders) const
+ short *pSizeArray, sal_uInt8 nSetBorders) const
{
bool bChange = false;
- static const USHORT aIdArr[ 10 ] =
+ static const sal_uInt16 aIdArr[ 10 ] =
{
WW8_TOP, BOX_LINE_TOP,
WW8_LEFT, BOX_LINE_LEFT,
@@ -1639,19 +1639,19 @@ static void FlySecur1(short& rSize, const bool bBorder)
rSize = nMin;
}
-inline bool SetValSprm( INT16* pVar, WW8PLCFx_Cp_FKP* pPap, USHORT nId )
+inline bool SetValSprm( sal_Int16* pVar, WW8PLCFx_Cp_FKP* pPap, sal_uInt16 nId )
{
- const BYTE* pS = pPap->HasSprm( nId );
+ const sal_uInt8* pS = pPap->HasSprm( nId );
if( pS )
- *pVar = (INT16)SVBT16ToShort( pS );
+ *pVar = (sal_Int16)SVBT16ToShort( pS );
return ( pS != 0 );
}
-inline bool SetValSprm( INT16* pVar, const WW8RStyle* pStyle, USHORT nId )
+inline bool SetValSprm( sal_Int16* pVar, const WW8RStyle* pStyle, sal_uInt16 nId )
{
- const BYTE* pS = pStyle->HasParaSprm( nId );
+ const sal_uInt8* pS = pStyle->HasParaSprm( nId );
if( pS )
- *pVar = (INT16)SVBT16ToShort( pS );
+ *pVar = (sal_Int16)SVBT16ToShort( pS );
return ( pS != 0 );
}
@@ -1709,12 +1709,12 @@ bool WW8FlyPara::operator==(const WW8FlyPara& rSrc) const
}
// Read fuer normalen Text
-void WW8FlyPara::Read(const BYTE* pSprm29, WW8PLCFx_Cp_FKP* pPap)
+void WW8FlyPara::Read(const sal_uInt8* pSprm29, WW8PLCFx_Cp_FKP* pPap)
{
if (pSprm29)
nOrigSp29 = *pSprm29; // PPC ( Bindung )
- const BYTE* pS = 0;
+ const sal_uInt8* pS = 0;
if( bVer67 )
{
SetValSprm( &nSp26, pPap, 26 ); // X-Position //sprmPDxaAbs
@@ -1764,7 +1764,7 @@ void WW8FlyPara::Read(const BYTE* pSprm29, WW8PLCFx_Cp_FKP* pPap)
nSp29 = nOrigSp29;
}
-void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
+void WW8FlyPara::ReadFull(const sal_uInt8* pSprm29, SwWW8ImplReader* pIo)
{
WW8PLCFMan* pPlcxMan = pIo->pPlcxMan;
WW8PLCFx_Cp_FKP* pPap = pPlcxMan->GetPapPLCF();
@@ -1778,14 +1778,14 @@ void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
break; // (*pPap)++ geht bei FastSave schief
// -> bei FastSave kein Test auf Grafik-APO
SvStream* pIoStrm = pIo->pStrm;
- ULONG nPos = pIoStrm->Tell();
+ sal_uLong nPos = pIoStrm->Tell();
WW8PLCFxSave1 aSave;
pPlcxMan->GetPap()->Save( aSave );
bGrafApo = false;
do{ // Block zum rausspringen
- BYTE nTxt[2];
+ sal_uInt8 nTxt[2];
pIoStrm->Read( nTxt, 2 ); // lies Text
if( nTxt[0] != 0x01 || nTxt[1] != 0x0d )// nur Grafik + CR ?
@@ -1795,7 +1795,7 @@ void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
// In APO ?
//sprmPPc
- const BYTE* pS = pPap->HasSprm( bVer67 ? 29 : 0x261B );
+ const sal_uInt8* pS = pPap->HasSprm( bVer67 ? 29 : 0x261B );
// Nein -> Grafik-Apo
if( !pS ){
@@ -1805,7 +1805,7 @@ void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
ww::WordVersion eVer = pIo->GetFib().GetFIBVersion();
WW8FlyPara *pNowStyleApo=0;
- USHORT nColl = pPap->GetIstd();
+ sal_uInt16 nColl = pPap->GetIstd();
ww::sti eSti = eVer < ww::eWW6 ? ww::GetCanonicalStiFromStc( static_cast< sal_uInt8 >(nColl) ) : static_cast<ww::sti>(nColl);
while (eSti != ww::stiNil && 0 == (pNowStyleApo = pIo->pCollA[nColl].pWWFly))
{
@@ -1829,12 +1829,12 @@ void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
// Read fuer Apo-Defs in Styledefs
-void WW8FlyPara::Read(const BYTE* pSprm29, WW8RStyle* pStyle)
+void WW8FlyPara::Read(const sal_uInt8* pSprm29, WW8RStyle* pStyle)
{
if (pSprm29)
nOrigSp29 = *pSprm29; // PPC ( Bindung )
- const BYTE* pS = 0;
+ const sal_uInt8* pS = 0;
if (bVer67)
{
SetValSprm( &nSp26, pStyle, 26 ); // X-Position
@@ -1907,8 +1907,8 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
const sal_uInt32 nWWPgTop,
const sal_uInt32 nPgLeft,
const sal_uInt32 nPgWidth,
- const INT32 nIniFlyDx,
- const INT32 nIniFlyDy )
+ const sal_Int32 nIniFlyDx,
+ const sal_Int32 nIniFlyDy )
{
(void) rPaM;
(void) nPgLeft;
@@ -2060,18 +2060,18 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
// the left and right border distances are different.
// no adjustments possible, if frame has automatic width.
// determine left border distance
- INT16 nLeBorderMgn( 0L );
+ sal_Int16 nLeBorderMgn( 0L );
if ( !bAutoWidth )
{
- INT16 nTemp = rWW.brc[WW8_LEFT].DetermineBorderProperties(rWW.bVer67,
+ sal_Int16 nTemp = rWW.brc[WW8_LEFT].DetermineBorderProperties(rWW.bVer67,
&nLeBorderMgn);
nLeBorderMgn = nLeBorderMgn + nTemp;
}
// determine right border distance
- INT16 nRiBorderMgn( 0L );
+ sal_Int16 nRiBorderMgn( 0L );
if ( !bAutoWidth )
{
- INT16 nTemp = rWW.brc[WW8_RIGHT].DetermineBorderProperties(rWW.bVer67,
+ sal_Int16 nTemp = rWW.brc[WW8_RIGHT].DetermineBorderProperties(rWW.bVer67,
&nRiBorderMgn);
nRiBorderMgn = nRiBorderMgn + nTemp;
}
@@ -2125,8 +2125,8 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
Word has a curious bug where the offset stored do not take into
account the internal distance from the corner both
*/
- INT16 nLeLMgn = 0;
- INT16 nTemp = rWW.brc[WW8_LEFT].DetermineBorderProperties(rWW.bVer67,
+ sal_Int16 nLeLMgn = 0;
+ sal_Int16 nTemp = rWW.brc[WW8_LEFT].DetermineBorderProperties(rWW.bVer67,
&nLeLMgn);
nLeLMgn = nLeLMgn + nTemp;
@@ -2144,7 +2144,7 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
// convert "<X> from top page text area" to
// "<X + page top margin> from page"
eVRel = text::RelOrientation::PAGE_FRAME;
- nYPos = static_cast< INT16 >( nYPos + nWWPgTop );
+ nYPos = static_cast< sal_Int16 >( nYPos + nWWPgTop );
}
FlySecur1( nWidth, rWW.bBorderLines ); // passen Raender ?
@@ -2192,7 +2192,7 @@ WW8FlySet::WW8FlySet(SwWW8ImplReader& rReader, const WW8FlyPara* pFW,
//we no longer need to hack around the header/footer problems
SwFmtSurround aSurround(pFS->eSurround);
if ( pFS->eSurround == SURROUND_IDEAL )
- aSurround.SetAnchorOnly( TRUE );
+ aSurround.SetAnchorOnly( sal_True );
Put( aSurround );
short aSizeArray[5]={0};
@@ -2279,8 +2279,8 @@ WW8DupProperties::WW8DupProperties(SwDoc &rDoc, SwWW8FltControlStack *pStk)
{
//Close any open character properties and duplicate them inside the
//first table cell
- USHORT nCnt = static_cast< USHORT >(pCtrlStck->Count());
- for (USHORT i=0; i < nCnt; i++)
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(pCtrlStck->Count());
+ for (sal_uInt16 i=0; i < nCnt; i++)
{
const SwFltStackEntry* pEntry = (*pCtrlStck)[ i ];
if(pEntry->bLocked)
@@ -2425,7 +2425,7 @@ bool SwWW8ImplReader::IsDropCap()
WW8PLCFx_Cp_FKP *pPap = pPlcxMan ? pPlcxMan->GetPapPLCF() : 0;
if (pPap)
{
- const BYTE *pDCS;
+ const sal_uInt8 *pDCS;
if (bVer67)
pDCS = pPap->HasSprm(46);
else
@@ -2739,7 +2739,7 @@ void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr,
}
// holt Attribut aus der FmtColl / Stack / Doc
-const SfxPoolItem* SwWW8ImplReader::GetFmtAttr( USHORT nWhich )
+const SfxPoolItem* SwWW8ImplReader::GetFmtAttr( sal_uInt16 nWhich )
{
const SfxPoolItem* pRet = 0;
if (pAktColl)
@@ -2784,7 +2784,7 @@ const SfxPoolItem* SwWW8ImplReader::GetFmtAttr( USHORT nWhich )
# Spezial WW - Attribute
#**************************************************************************/
-void SwWW8ImplReader::Read_Special(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_Special(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
{
@@ -2795,7 +2795,7 @@ void SwWW8ImplReader::Read_Special(USHORT, const BYTE* pData, short nLen)
}
// Read_Obj wird fuer fObj und fuer fOle2 benutzt !
-void SwWW8ImplReader::Read_Obj(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_Obj(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
bObj = false;
@@ -2815,7 +2815,7 @@ void SwWW8ImplReader::Read_Obj(USHORT , const BYTE* pData, short nLen)
}
}
-void SwWW8ImplReader::Read_PicLoc(USHORT , const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_PicLoc(sal_uInt16 , const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
{
@@ -2832,13 +2832,13 @@ void SwWW8ImplReader::Read_PicLoc(USHORT , const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_POutLvl(USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_POutLvl(sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (pAktColl && (0 < nLen))
{
if (SwWW8StyInf* pSI = GetStyle(nAktColl))
{
- pSI->nOutlineLevel = static_cast< BYTE >(
+ pSI->nOutlineLevel = static_cast< sal_uInt8 >(
( (1 <= pSI->GetWWStyleId()) && (9 >= pSI->GetWWStyleId()) )
? pSI->GetWWStyleId()-1
: (pData ? *pData : 0) );
@@ -2846,7 +2846,7 @@ void SwWW8ImplReader::Read_POutLvl(USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_Symbol(USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Symbol(sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( !bIgnoreText )
{
@@ -2881,7 +2881,7 @@ void SwWW8ImplReader::Read_Symbol(USHORT, const BYTE* pData, short nLen )
}
}
-SwWW8StyInf *SwWW8ImplReader::GetStyle(USHORT nColl) const
+SwWW8StyInf *SwWW8ImplReader::GetStyle(sal_uInt16 nColl) const
{
return nColl < nColls ? &pCollA[nColl] : 0;
}
@@ -2892,14 +2892,14 @@ SwWW8StyInf *SwWW8ImplReader::GetStyle(USHORT nColl) const
// Read_BoldUsw fuer Italic, Bold, Kapitaelchen, Versalien, durchgestrichen,
// Contour und Shadow
-void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_BoldUsw( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
const int nContigiousWestern = 8;
const int nWestern = nContigiousWestern + 1;
const int nEastern = 2;
const int nCTL = 2;
const int nIds = nWestern + nEastern + nCTL;
- static const USHORT nEndIds[ nIds ] =
+ static const sal_uInt16 nEndIds[ nIds ] =
{
RES_CHRATR_WEIGHT, RES_CHRATR_POSTURE,
RES_CHRATR_CROSSEDOUT, RES_CHRATR_CONTOUR,
@@ -2915,7 +2915,7 @@ void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
- BYTE nI;
+ sal_uInt8 nI;
// die Attribut-Nr fuer "doppelt durchgestrichen" tanzt aus der Reihe
if (0x2A53 == nId)
nI = nContigiousWestern; // The out of sequence western id
@@ -2923,11 +2923,11 @@ void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
{
// The contigious western ids
if (eVersion <= ww::eWW2)
- nI = static_cast< BYTE >(nId - 60);
+ nI = static_cast< sal_uInt8 >(nId - 60);
else if (eVersion < ww::eWW8)
- nI = static_cast< BYTE >(nId - 85);
+ nI = static_cast< sal_uInt8 >(nId - 85);
else
- nI = static_cast< BYTE >(nId - 0x0835);
+ nI = static_cast< sal_uInt8 >(nId - 0x0835);
}
sal_uInt16 nMask = 1 << nI;
@@ -2955,7 +2955,7 @@ void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
SwWW8StyInf* pSI = GetStyle(nAktColl);
if (pPlcxMan && eVersion > ww::eWW2)
{
- const BYTE *pCharIstd =
+ const sal_uInt8 *pCharIstd =
pPlcxMan->GetChpPLCF()->HasSprm(bVer67 ? 80 : 0x4A30);
if (pCharIstd)
pSI = GetStyle(SVBT16ToShort(pCharIstd));
@@ -2996,7 +2996,7 @@ void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
SetToggleAttr( nI, bOn );
}
-void SwWW8ImplReader::Read_Bidi(USHORT, const BYTE*, short nLen)
+void SwWW8ImplReader::Read_Bidi(sal_uInt16, const sal_uInt8*, short nLen)
{
if (nLen > 0)
bBidi = true;
@@ -3005,22 +3005,22 @@ void SwWW8ImplReader::Read_Bidi(USHORT, const BYTE*, short nLen)
}
// Read_BoldUsw for BiDi Italic, Bold
-void SwWW8ImplReader::Read_BoldBiDiUsw(USHORT nId, const BYTE* pData,
+void SwWW8ImplReader::Read_BoldBiDiUsw(sal_uInt16 nId, const sal_uInt8* pData,
short nLen)
{
- static const USHORT nEndIds[2] =
+ static const sal_uInt16 nEndIds[2] =
{
RES_CHRATR_CTL_WEIGHT, RES_CHRATR_CTL_POSTURE,
};
- BYTE nI;
+ sal_uInt8 nI;
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
if (eVersion <= ww::eWW2)
- nI = static_cast< BYTE >(nId - 80);
+ nI = static_cast< sal_uInt8 >(nId - 80);
else if (eVersion < ww::eWW8)
- nI = static_cast< BYTE >(nId - 111);
+ nI = static_cast< sal_uInt8 >(nId - 111);
else
- nI = static_cast< BYTE >(nId - 0x085C);
+ nI = static_cast< sal_uInt8 >(nId - 0x085C);
OSL_ENSURE(nI <= 1, "not happening");
if (nI > 1)
@@ -3038,7 +3038,7 @@ void SwWW8ImplReader::Read_BoldBiDiUsw(USHORT nId, const BYTE* pData,
SwWW8StyInf* pSI = GetStyle(nAktColl);
if (pPlcxMan)
{
- const BYTE *pCharIstd =
+ const sal_uInt8 *pCharIstd =
pPlcxMan->GetChpPLCF()->HasSprm(bVer67 ? 80 : 0x4A30);
if (pCharIstd)
pSI = GetStyle(SVBT16ToShort(pCharIstd));
@@ -3075,7 +3075,7 @@ void SwWW8ImplReader::Read_BoldBiDiUsw(USHORT nId, const BYTE* pData,
SetToggleBiDiAttr(nI, bOn);
}
-void SwWW8ImplReader::SetToggleBiDiAttr(BYTE nAttrId, bool bOn)
+void SwWW8ImplReader::SetToggleBiDiAttr(sal_uInt8 nAttrId, bool bOn)
{
switch (nAttrId)
{
@@ -3100,7 +3100,7 @@ void SwWW8ImplReader::SetToggleBiDiAttr(BYTE nAttrId, bool bOn)
}
}
-void SwWW8ImplReader::SetToggleAttr(BYTE nAttrId, bool bOn)
+void SwWW8ImplReader::SetToggleAttr(sal_uInt8 nAttrId, bool bOn)
{
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
@@ -3162,11 +3162,11 @@ void SwWW8ImplReader::SetToggleAttr(BYTE nAttrId, bool bOn)
}
}
-void SwWW8ImplReader::_ChkToggleAttr( USHORT nOldStyle81Mask,
- USHORT nNewStyle81Mask )
+void SwWW8ImplReader::_ChkToggleAttr( sal_uInt16 nOldStyle81Mask,
+ sal_uInt16 nNewStyle81Mask )
{
- USHORT i = 1, nToggleAttrFlags = pCtrlStck->GetToggleAttrFlags();
- for (BYTE n = 0; n < 7; ++n, i <<= 1)
+ sal_uInt16 i = 1, nToggleAttrFlags = pCtrlStck->GetToggleAttrFlags();
+ for (sal_uInt8 n = 0; n < 7; ++n, i <<= 1)
{
if (
(i & nToggleAttrFlags) &&
@@ -3178,11 +3178,11 @@ void SwWW8ImplReader::_ChkToggleAttr( USHORT nOldStyle81Mask,
}
}
-void SwWW8ImplReader::_ChkToggleBiDiAttr( USHORT nOldStyle81Mask,
- USHORT nNewStyle81Mask )
+void SwWW8ImplReader::_ChkToggleBiDiAttr( sal_uInt16 nOldStyle81Mask,
+ sal_uInt16 nNewStyle81Mask )
{
- USHORT i = 1, nToggleAttrFlags = pCtrlStck->GetToggleBiDiAttrFlags();
- for (BYTE n = 0; n < 7; ++n, i <<= 1)
+ sal_uInt16 i = 1, nToggleAttrFlags = pCtrlStck->GetToggleBiDiAttrFlags();
+ for (sal_uInt8 n = 0; n < 7; ++n, i <<= 1)
{
if (
(i & nToggleAttrFlags) &&
@@ -3194,7 +3194,7 @@ void SwWW8ImplReader::_ChkToggleBiDiAttr( USHORT nOldStyle81Mask,
}
}
-void SwWW8ImplReader::Read_SubSuper( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_SubSuper( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 ){
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_ESCAPEMENT );
@@ -3202,7 +3202,7 @@ void SwWW8ImplReader::Read_SubSuper( USHORT, const BYTE* pData, short nLen )
}
short nEs;
- BYTE nProp;
+ sal_uInt8 nProp;
switch( *pData )
{
case 1:
@@ -3264,7 +3264,7 @@ bool SwWW8ImplReader::ConvertSubToGraphicPlacement()
FLY_AS_CHAR and then we can change its anchoring to centered in the line.
*/
bool bIsGraphicPlacementHack = false;
- USHORT nPos;
+ sal_uInt16 nPos;
if (pCtrlStck->GetFmtStackAttr(RES_CHRATR_ESCAPEMENT, &nPos))
{
SwPaM aRegion(*pPaM->GetPoint());
@@ -3286,7 +3286,7 @@ bool SwWW8ImplReader::ConvertSubToGraphicPlacement()
return bIsGraphicPlacementHack;
}
-void SwWW8ImplReader::Read_SubSuperProp( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_SubSuperProp( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
{
@@ -3299,13 +3299,13 @@ void SwWW8ImplReader::Read_SubSuperProp( USHORT, const BYTE* pData, short nLen )
// Font-Position in HalfPoints
short nPos = eVersion <= ww::eWW2 ? static_cast< sal_Int8 >( *pData ) : SVBT16ToShort( pData );
- INT32 nPos2 = nPos * ( 10 * 100 ); // HalfPoints in 100 * tw
+ sal_Int32 nPos2 = nPos * ( 10 * 100 ); // HalfPoints in 100 * tw
const SvxFontHeightItem* pF
= (const SvxFontHeightItem*)GetFmtAttr(RES_CHRATR_FONTSIZE);
OSL_ENSURE(pF, "Expected to have the fontheight available here");
// #i59022: Check ensure nHeight != 0. Div by zero otherwise.
- INT32 nHeight = 240;
+ sal_Int32 nHeight = 240;
if (pF != NULL && pF->GetHeight() != 0)
nHeight = pF->GetHeight();
nPos2 /= nHeight; // ... nun in % ( gerundet )
@@ -3317,7 +3317,7 @@ void SwWW8ImplReader::Read_SubSuperProp( USHORT, const BYTE* pData, short nLen )
NewAttr( aEs );
}
-void SwWW8ImplReader::Read_Underline( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Underline( sal_uInt16, const sal_uInt8* pData, short nLen )
{
FontUnderline eUnderline = UNDERLINE_NONE;
bool bWordLine = false;
@@ -3334,7 +3334,7 @@ void SwWW8ImplReader::Read_Underline( USHORT, const BYTE* pData, short nLen )
// erst mal ggfs. *bold* einschalten!
if( bAlsoBold )
{
- BYTE nOn = 1;
+ sal_uInt8 nOn = 1;
Read_BoldUsw( 0x0835, &nOn, nLen );
eUnderline = UNDERLINE_SINGLE;
}
@@ -3385,7 +3385,7 @@ NoBracket 78 CA 06 - 02 00 00 02 34 52
<> 78 CA 06 - 02 03 00 02 34 52
{} 78 CA 06 - 02 04 00 02 34 52
*/
-void SwWW8ImplReader::Read_DoubleLine_Rotate( USHORT, const BYTE* pData,
+void SwWW8ImplReader::Read_DoubleLine_Rotate( sal_uInt16, const sal_uInt8* pData,
short nLen )
{
if( nLen < 0 ) // close the tag
@@ -3421,7 +3421,7 @@ void SwWW8ImplReader::Read_DoubleLine_Rotate( USHORT, const BYTE* pData,
}
}
-void SwWW8ImplReader::Read_TxtColor( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_TxtColor( sal_uInt16, const sal_uInt8* pData, short nLen )
{
//Has newer colour varient, ignore this old varient
if (!bVer67 && pPlcxMan && pPlcxMan->GetChpPLCF()->HasSprm(0x6870))
@@ -3431,7 +3431,7 @@ void SwWW8ImplReader::Read_TxtColor( USHORT, const BYTE* pData, short nLen )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_COLOR );
else
{
- BYTE b = *pData; // Parameter: 0 = Auto, 1..16 Farben
+ sal_uInt8 b = *pData; // Parameter: 0 = Auto, 1..16 Farben
if( b > 16 ) // unbekannt -> Black
b = 0;
@@ -3453,7 +3453,7 @@ sal_uInt32 wwUtility::BGRToRGB(sal_uInt32 nColor)
return nColor;
}
-void SwWW8ImplReader::Read_TxtForeColor(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_TxtForeColor(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_COLOR );
@@ -3466,7 +3466,7 @@ void SwWW8ImplReader::Read_TxtForeColor(USHORT, const BYTE* pData, short nLen)
}
}
-bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
+bool SwWW8ImplReader::GetFontParams( sal_uInt16 nFCode, FontFamily& reFamily,
String& rName, FontPitch& rePitch, CharSet& reCharSet )
{
// Die Defines, aus denen diese Tabellen erzeugt werden, stehen in windows.h
@@ -3505,7 +3505,7 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
}
// pF->ff : Family
- BYTE b = pF->ff;
+ sal_uInt8 b = pF->ff;
// make sure Font Family Code is set correctly
// at least for the most important fonts
@@ -3546,7 +3546,7 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
sFontName12, sFontName13
};
- for( USHORT n = 0; n < FONTNAMETAB_SZ; n++ )
+ for( sal_uInt16 n = 0; n < FONTNAMETAB_SZ; n++ )
{
const sal_Char* pCmp = aFontNameTab[ n ];
xub_StrLen nLen = *pCmp++;
@@ -3564,8 +3564,8 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
return true;
}
-bool SwWW8ImplReader::SetNewFontAttr(USHORT nFCode, bool bSetEnums,
- USHORT nWhich)
+bool SwWW8ImplReader::SetNewFontAttr(sal_uInt16 nFCode, bool bSetEnums,
+ sal_uInt16 nWhich)
{
FontFamily eFamily;
String aName;
@@ -3660,7 +3660,7 @@ void SwWW8ImplReader::ResetCJKCharSetVars()
maFontSrcCJKCharSets.pop();
}
-void SwWW8ImplReader::openFont(USHORT nFCode, USHORT nId)
+void SwWW8ImplReader::openFont(sal_uInt16 nFCode, sal_uInt16 nId)
{
if (SetNewFontAttr(nFCode, true, nId) && pAktColl && pStyles)
{
@@ -3674,7 +3674,7 @@ void SwWW8ImplReader::openFont(USHORT nFCode, USHORT nId)
}
}
-void SwWW8ImplReader::closeFont(USHORT nId)
+void SwWW8ImplReader::closeFont(sal_uInt16 nId)
{
pCtrlStck->SetAttr( *pPaM->GetPoint(), nId );
if (nId == RES_CHRATR_CJK_FONT)
@@ -3686,7 +3686,7 @@ void SwWW8ImplReader::closeFont(USHORT nId)
/*
Font ein oder ausschalten:
*/
-void SwWW8ImplReader::Read_FontCode( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_FontCode( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
if (!bSymbol) // falls bSymbol, gilt der am Symbol
{ // (siehe sprmCSymbol) gesetzte Font !
@@ -3723,7 +3723,7 @@ void SwWW8ImplReader::Read_FontCode( USHORT nId, const BYTE* pData, short nLen )
}
else
{
- USHORT nFCode = SVBT16ToShort( pData ); // Font-Nummer
+ sal_uInt16 nFCode = SVBT16ToShort( pData ); // Font-Nummer
openFont(nFCode, nId);
if (eVersion <= ww::eWW6)
{
@@ -3734,7 +3734,7 @@ void SwWW8ImplReader::Read_FontCode( USHORT nId, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_FontSize( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_FontSize( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
switch( nId )
{
@@ -3765,7 +3765,7 @@ void SwWW8ImplReader::Read_FontSize( USHORT nId, const BYTE* pData, short nLen )
else
{
// Font-Size in half points e.g. 10 = 1440 / ( 72 * 2 )
- USHORT nFSize = eVersion <= ww::eWW2 ? *pData : SVBT16ToShort(pData);
+ sal_uInt16 nFSize = eVersion <= ww::eWW2 ? *pData : SVBT16ToShort(pData);
nFSize*= 10;
SvxFontHeightItem aSz( nFSize, 100, nId );
@@ -3797,14 +3797,14 @@ void SwWW8ImplReader::Read_FontSize( USHORT nId, const BYTE* pData, short nLen )
-void SwWW8ImplReader::Read_CharSet(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CharSet(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
{ // Ende des Attributes
eHardCharSet = RTL_TEXTENCODING_DONTKNOW;
return;
}
- BYTE nfChsDiff = SVBT8ToByte( pData );
+ sal_uInt8 nfChsDiff = SVBT8ToByte( pData );
if( nfChsDiff )
eHardCharSet = rtl_getTextEncodingFromWindowsCharset( *(pData + 1) );
@@ -3812,7 +3812,7 @@ void SwWW8ImplReader::Read_CharSet(USHORT , const BYTE* pData, short nLen)
eHardCharSet = RTL_TEXTENCODING_DONTKNOW;
}
-void SwWW8ImplReader::Read_Language( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Language( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
switch( nId )
{
@@ -3838,7 +3838,7 @@ void SwWW8ImplReader::Read_Language( USHORT nId, const BYTE* pData, short nLen )
pCtrlStck->SetAttr( *pPaM->GetPoint(), nId );
else
{
- USHORT nLang = SVBT16ToShort( pData ); // Language-Id
+ sal_uInt16 nLang = SVBT16ToShort( pData ); // Language-Id
NewAttr(SvxLanguageItem((const LanguageType)nLang, nId));
}
}
@@ -3846,14 +3846,14 @@ void SwWW8ImplReader::Read_Language( USHORT nId, const BYTE* pData, short nLen )
/*
Einschalten des Zeichen-Styles:
*/
-void SwWW8ImplReader::Read_CColl( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_CColl( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 ){ // Ende des Attributes
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_TXTATR_CHARFMT );
nCharFmt = -1;
return;
}
- USHORT nId = SVBT16ToShort( pData ); // Style-Id (NICHT Sprm-Id!)
+ sal_uInt16 nId = SVBT16ToShort( pData ); // Style-Id (NICHT Sprm-Id!)
if( nId >= nColls || !pCollA[nId].pFmt // ungueltige Id ?
|| pCollA[nId].bColl ) // oder Para-Style ?
@@ -3867,17 +3867,17 @@ void SwWW8ImplReader::Read_CColl( USHORT, const BYTE* pData, short nLen )
/*
enger oder weiter als normal:
*/
-void SwWW8ImplReader::Read_Kern( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Kern( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 ){ // Ende des Attributes
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_KERNING );
return;
}
- INT16 nKern = SVBT16ToShort( pData ); // Kerning in Twips
+ sal_Int16 nKern = SVBT16ToShort( pData ); // Kerning in Twips
NewAttr( SvxKerningItem( nKern, RES_CHRATR_KERNING ) );
}
-void SwWW8ImplReader::Read_FontKern( USHORT, const BYTE* , short nLen )
+void SwWW8ImplReader::Read_FontKern( sal_uInt16, const sal_uInt8* , short nLen )
{
if( nLen < 0 ) // Ende des Attributes
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_AUTOKERN );
@@ -3885,7 +3885,7 @@ void SwWW8ImplReader::Read_FontKern( USHORT, const BYTE* , short nLen )
NewAttr(SvxAutoKernItem(true, RES_CHRATR_AUTOKERN));
}
-void SwWW8ImplReader::Read_CharShadow( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_CharShadow( sal_uInt16, const sal_uInt8* pData, short nLen )
{
//Has newer colour varient, ignore this old varient
if (!bVer67 && pPlcxMan && pPlcxMan->GetChpPLCF()->HasSprm(0xCA71))
@@ -3911,7 +3911,7 @@ void SwWW8ImplReader::Read_CharShadow( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_TxtBackColor(USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_TxtBackColor(sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
{
@@ -3933,7 +3933,7 @@ void SwWW8ImplReader::Read_TxtBackColor(USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_CharHighlight(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CharHighlight(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( nLen <= 0 )
{
@@ -3946,7 +3946,7 @@ void SwWW8ImplReader::Read_CharHighlight(USHORT, const BYTE* pData, short nLen)
}
else
{
- BYTE b = *pData; // Parameter: 0 = Auto, 1..16 Farben
+ sal_uInt8 b = *pData; // Parameter: 0 = Auto, 1..16 Farben
if( b > 16 ) // unbekannt -> Black
b = 0; // Auto -> Black
@@ -3961,7 +3961,7 @@ void SwWW8ImplReader::Read_CharHighlight(USHORT, const BYTE* pData, short nLen)
# Absatz - Attribute
#**************************************************************************/
-void SwWW8ImplReader::Read_NoLineNumb(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_NoLineNumb(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
if( nLen < 0 ) // Ende des Attributes
{
@@ -3980,7 +3980,7 @@ void SwWW8ImplReader::Read_NoLineNumb(USHORT , const BYTE* pData, short nLen)
}
// Sprm 16, 17
-void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
if (nLen < 0) // End of the Attributes
{
@@ -4006,7 +4006,7 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
SwNumRule * pNumRule = pTxtNode->GetNumRule();
if( pNumRule )
{
- BYTE nLvl = static_cast< BYTE >(pTxtNode->GetActualListLevel());
+ sal_uInt8 nLvl = static_cast< sal_uInt8 >(pTxtNode->GetActualListLevel());
const SwNumFmt* pFmt = pNumRule->GetNumFmt( nLvl );
if ( pFmt && pFmt->GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
@@ -4077,7 +4077,7 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
*/
if (pPlcxMan && pCollA[nAktColl].bHasBrokenWW6List)
{
- const BYTE *pIsZeroed = pPlcxMan->GetPapPLCF()->HasSprm(0x460B);
+ const sal_uInt8 *pIsZeroed = pPlcxMan->GetPapPLCF()->HasSprm(0x460B);
if (pIsZeroed && *pIsZeroed == 0)
{
const SvxLRSpaceItem &rLR =
@@ -4108,7 +4108,7 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
}
// Sprm 20
-void SwWW8ImplReader::Read_LineSpace( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_LineSpace( sal_uInt16, const sal_uInt8* pData, short nLen )
{
// Kommentear siehe Read_UL()
if (bStyNormal && bWWBugNormal)
@@ -4145,7 +4145,7 @@ void SwWW8ImplReader::Read_LineSpace( USHORT, const BYTE* pData, short nLen )
// bei proportional betraegt er min( 0cm, FontSize*(nFach-1) ) sowohl "vor"
// wie auch "nach"
- USHORT nSpaceTw = 0;
+ sal_uInt16 nSpaceTw = 0;
SvxLineSpacingItem aLSpc( LINE_SPACE_DEFAULT_HEIGHT, RES_PARATR_LINESPACING );
@@ -4155,15 +4155,15 @@ void SwWW8ImplReader::Read_LineSpace( USHORT, const BYTE* pData, short nLen )
// nach Absprache mit AMA ist die Begrenzung unsinnig
if( n>200 ) n = 200; // SW_UI-Maximum
- aLSpc.SetPropLineSpace( (const BYTE)n );
+ aLSpc.SetPropLineSpace( (const sal_uInt8)n );
const SvxFontHeightItem* pH = (const SvxFontHeightItem*)
GetFmtAttr( RES_CHRATR_FONTSIZE );
- nSpaceTw = (USHORT)( n * pH->GetHeight() / 100 );
+ nSpaceTw = (sal_uInt16)( n * pH->GetHeight() / 100 );
}
else // Fixed / Minimum
{
// bei negativen Space ist der Abstand exakt, sonst minimum
- nSpaceTw = (USHORT)nSpace;
+ nSpaceTw = (sal_uInt16)nSpace;
aLSpc.SetLineHeight( nSpaceTw );
aLSpc.GetLineSpaceRule() = eLnSpc;
}
@@ -4181,7 +4181,7 @@ sal_uInt16 SwWW8ImplReader::GetParagraphAutoSpace(bool fDontUseHTMLAutoSpacing)
return 280; //Seems to be always 14points in this case
}
-void SwWW8ImplReader::Read_DontAddEqual(USHORT, const BYTE *pData, short nLen)
+void SwWW8ImplReader::Read_DontAddEqual(sal_uInt16, const sal_uInt8 *pData, short nLen)
{
if (nLen < 0)
return;
@@ -4190,7 +4190,7 @@ void SwWW8ImplReader::Read_DontAddEqual(USHORT, const BYTE *pData, short nLen)
maTracer.Log(sw::log::eDontAddSpaceForEqualStyles);
}
-void SwWW8ImplReader::Read_ParaAutoBefore(USHORT, const BYTE *pData, short nLen)
+void SwWW8ImplReader::Read_ParaAutoBefore(sal_uInt16, const sal_uInt8 *pData, short nLen)
{
if (nLen < 0)
{
@@ -4217,7 +4217,7 @@ void SwWW8ImplReader::Read_ParaAutoBefore(USHORT, const BYTE *pData, short nLen)
}
}
-void SwWW8ImplReader::Read_ParaAutoAfter(USHORT, const BYTE *pData, short nLen)
+void SwWW8ImplReader::Read_ParaAutoAfter(sal_uInt16, const sal_uInt8 *pData, short nLen)
{
if (nLen < 0)
{
@@ -4245,7 +4245,7 @@ void SwWW8ImplReader::Read_ParaAutoAfter(USHORT, const BYTE *pData, short nLen)
}
// Sprm 21, 22
-void SwWW8ImplReader::Read_UL( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_UL( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
// Nun eine Umpopelung eines WW-Fehlers: Bei nProduct == 0c03d wird
// faelschlicherweise ein DyaAfter 240 ( delta y abstand after, amn.d.?b.)
@@ -4290,7 +4290,7 @@ void SwWW8ImplReader::Read_UL( USHORT nId, const BYTE* pData, short nLen )
NewAttr( aUL );
}
-void SwWW8ImplReader::Read_IdctHint( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_IdctHint( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (nLen < 0)
nIdctHint = 0;
@@ -4298,7 +4298,7 @@ void SwWW8ImplReader::Read_IdctHint( USHORT, const BYTE* pData, short nLen )
nIdctHint = *pData;
}
-void SwWW8ImplReader::Read_Justify( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Justify( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
{
@@ -4337,7 +4337,7 @@ void SwWW8ImplReader::Read_Justify( USHORT, const BYTE* pData, short nLen )
bool SwWW8ImplReader::IsRightToLeft()
{
bool bRTL = false;
- const BYTE *pDir =
+ const sal_uInt8 *pDir =
pPlcxMan ? pPlcxMan->GetPapPLCF()->HasSprm(0x2441) : 0;
if (pDir)
bRTL = *pDir ? true : false;
@@ -4351,7 +4351,7 @@ bool SwWW8ImplReader::IsRightToLeft()
return bRTL;
}
-void SwWW8ImplReader::Read_RTLJustify( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_RTLJustify( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
{
@@ -4394,7 +4394,7 @@ void SwWW8ImplReader::Read_RTLJustify( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_BoolItem( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_BoolItem( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
switch( nId )
{
@@ -4423,7 +4423,7 @@ void SwWW8ImplReader::Read_BoolItem( USHORT nId, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_Emphasis( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Emphasis( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_EMPHASIS_MARK );
@@ -4434,7 +4434,7 @@ void SwWW8ImplReader::Read_Emphasis( USHORT, const BYTE* pData, short nLen )
//there is use it, if there is not fall back to the currently set one.
//Only the cjk language setting seems to matter to word, the western
//one is ignored
- const BYTE *pLang =
+ const sal_uInt8 *pLang =
pPlcxMan ? pPlcxMan->GetChpPLCF()->HasSprm(0x486E) : 0;
if (pLang)
@@ -4484,7 +4484,7 @@ void SwWW8ImplReader::Read_Emphasis( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_ScaleWidth( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_ScaleWidth( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_SCALEW );
@@ -4498,7 +4498,7 @@ void SwWW8ImplReader::Read_ScaleWidth( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_Relief( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Relief( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_RELIEF );
@@ -4525,7 +4525,7 @@ void SwWW8ImplReader::Read_Relief( USHORT nId, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_TxtAnim(USHORT /*nId*/, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_TxtAnim(sal_uInt16 /*nId*/, const sal_uInt8* pData, short nLen)
{
if (nLen < 0)
pCtrlStck->SetAttr(*pPaM->GetPoint(), RES_CHRATR_BLINK);
@@ -4553,7 +4553,7 @@ void SwWW8ImplReader::Read_TxtAnim(USHORT /*nId*/, const BYTE* pData, short nLen
SwWW8Shade::SwWW8Shade(bool bVer67, const WW8_SHD& rSHD)
{
- BYTE b = rSHD.GetFore();
+ sal_uInt8 b = rSHD.GetFore();
OSL_ENSURE(b < 17, "ww8: colour out of range");
if (b >= 17)
b = 0;
@@ -4574,7 +4574,7 @@ SwWW8Shade::SwWW8Shade(bool bVer67, const WW8_SHD& rSHD)
void SwWW8Shade::SetShade(ColorData nFore, ColorData nBack, sal_uInt16 nIndex)
{
- static const ULONG eMSGrayScale[] =
+ static const sal_uLong eMSGrayScale[] =
{
// Nul-Brush
0, // 0
@@ -4661,7 +4661,7 @@ void SwWW8Shade::SetShade(ColorData nFore, ColorData nBack, sal_uInt16 nIndex)
if( nIndex >= SAL_N_ELEMENTS(eMSGrayScale))
nIndex = 0;
- ULONG nWW8BrushStyle = eMSGrayScale[nIndex];
+ sal_uLong nWW8BrushStyle = eMSGrayScale[nIndex];
switch (nWW8BrushStyle)
{
@@ -4687,7 +4687,7 @@ void SwWW8Shade::SetShade(ColorData nFore, ColorData nBack, sal_uInt16 nIndex)
}
}
-void SwWW8ImplReader::Read_Shade( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Shade( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (!bVer67 && pPlcxMan && pPlcxMan->GetPapPLCF()->HasSprm(0xC64D))
return;
@@ -4713,7 +4713,7 @@ void SwWW8ImplReader::Read_Shade( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_ParaBackColor(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_ParaBackColor(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if (nLen <= 0)
{
@@ -4735,7 +4735,7 @@ void SwWW8ImplReader::Read_ParaBackColor(USHORT, const BYTE* pData, short nLen)
}
}
-sal_uInt32 SwWW8ImplReader::ExtractColour(const BYTE* &rpData,
+sal_uInt32 SwWW8ImplReader::ExtractColour(const sal_uInt8* &rpData,
bool
#if OSL_DEBUG_LEVEL > 1
bVer67
@@ -4761,7 +4761,7 @@ sal_uInt32 SwWW8ImplReader::ExtractColour(const BYTE* &rpData,
return aShade.aColor.GetColor();
}
-void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
+void SwWW8ImplReader::Read_Border(sal_uInt16 , const sal_uInt8* , short nLen)
{
if( nLen < 0 )
{
@@ -4780,7 +4780,7 @@ void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
bHasBorder = true;
WW8_BRC5 aBrcs; // Top, Left, Bottom, Right, Between
- BYTE nBorder;
+ sal_uInt8 nBorder;
if( pAktColl )
nBorder = ::lcl_ReadBorders(bVer67, aBrcs, 0, pStyles);
@@ -4816,17 +4816,17 @@ void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
maTracer.Log(sw::log::eBorderDistOutside);
if ((nBorder & WW8_LEFT)==WW8_LEFT) {
- aBox.SetDistance( (USHORT)aInnerDist.Left(), BOX_LINE_LEFT );
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Left(), BOX_LINE_LEFT );
}
if ((nBorder & WW8_TOP)==WW8_TOP) {
- aBox.SetDistance( (USHORT)aInnerDist.Top(), BOX_LINE_TOP );
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Top(), BOX_LINE_TOP );
}
if ((nBorder & WW8_RIGHT)==WW8_RIGHT) {
- aBox.SetDistance( (USHORT)aInnerDist.Right(), BOX_LINE_RIGHT );
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Right(), BOX_LINE_RIGHT );
}
if ((nBorder & WW8_BOT)==WW8_BOT) {
- aBox.SetDistance( (USHORT)aInnerDist.Bottom(), BOX_LINE_BOTTOM );
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Bottom(), BOX_LINE_BOTTOM );
}
NewAttr( aBox );
@@ -4839,7 +4839,7 @@ void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
}
}
-void SwWW8ImplReader::Read_Hyphenation( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Hyphenation( sal_uInt16, const sal_uInt8* pData, short nLen )
{
// set Hyphenation flag
if( nLen <= 0 )
@@ -4862,7 +4862,7 @@ void SwWW8ImplReader::Read_Hyphenation( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_WidowControl( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_WidowControl( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
{
@@ -4871,7 +4871,7 @@ void SwWW8ImplReader::Read_WidowControl( USHORT, const BYTE* pData, short nLen )
}
else
{
- BYTE nL = ( *pData & 1 ) ? 2 : 0;
+ sal_uInt8 nL = ( *pData & 1 ) ? 2 : 0;
NewAttr( SvxWidowsItem( nL, RES_PARATR_WIDOWS ) ); // Aus -> nLines = 0
NewAttr( SvxOrphansItem( nL, RES_PARATR_ORPHANS ) );
@@ -4882,7 +4882,7 @@ void SwWW8ImplReader::Read_WidowControl( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_UsePgsuSettings(USHORT,const BYTE* pData,short nLen)
+void SwWW8ImplReader::Read_UsePgsuSettings(sal_uInt16,const sal_uInt8* pData,short nLen)
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_PARATR_SNAPTOGRID);
@@ -4895,7 +4895,7 @@ void SwWW8ImplReader::Read_UsePgsuSettings(USHORT,const BYTE* pData,short nLen)
}
}
-void SwWW8ImplReader::Read_AlignFont( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_AlignFont( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_PARATR_VERTALIGN);
@@ -4928,7 +4928,7 @@ void SwWW8ImplReader::Read_AlignFont( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_KeepLines( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_KeepLines( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_PARATR_SPLIT );
@@ -4936,7 +4936,7 @@ void SwWW8ImplReader::Read_KeepLines( USHORT, const BYTE* pData, short nLen )
NewAttr( SvxFmtSplitItem( ( *pData & 1 ) == 0, RES_PARATR_SPLIT ) );
}
-void SwWW8ImplReader::Read_KeepParas( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_KeepParas( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_KEEP );
@@ -4944,7 +4944,7 @@ void SwWW8ImplReader::Read_KeepParas( USHORT, const BYTE* pData, short nLen )
NewAttr( SvxFmtKeepItem( ( *pData & 1 ) != 0 , RES_KEEP) );
}
-void SwWW8ImplReader::Read_BreakBefore( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_BreakBefore( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_BREAK );
@@ -4953,7 +4953,7 @@ void SwWW8ImplReader::Read_BreakBefore( USHORT, const BYTE* pData, short nLen )
( *pData & 1 ) ? SVX_BREAK_PAGE_BEFORE : SVX_BREAK_NONE, RES_BREAK ) );
}
-void SwWW8ImplReader::Read_ApoPPC( USHORT, const BYTE* pData, short )
+void SwWW8ImplReader::Read_ApoPPC( sal_uInt16, const sal_uInt8* pData, short )
{
if (pAktColl) // only for Styledef, sonst anders geloest
{
@@ -4969,7 +4969,7 @@ void SwWW8ImplReader::Read_ApoPPC( USHORT, const BYTE* pData, short )
bool SwWW8ImplReader::ParseTabPos(WW8_TablePos *pTabPos, WW8PLCFx_Cp_FKP* pPap)
{
bool bRet = false;
- const BYTE *pRes=0;
+ const sal_uInt8 *pRes=0;
memset(pTabPos, 0, sizeof(WW8_TablePos));
if (0 != (pRes = pPap->HasSprm(0x360D)))
{
@@ -5016,7 +5016,7 @@ long SwWW8ImplReader::ImportExtSprm(WW8PLCFManResult* pRes)
if( pRes->nSprmId < 280 )
{
- BYTE nIdx = static_cast< BYTE >(pRes->nSprmId - eFTN);
+ sal_uInt8 nIdx = static_cast< sal_uInt8 >(pRes->nSprmId - eFTN);
if( nIdx < sizeof( aWwSprmTab ) / sizeof( *aWwSprmTab )
&& aWwSprmTab[nIdx] )
return (this->*aWwSprmTab[nIdx])(pRes);
@@ -5027,7 +5027,7 @@ long SwWW8ImplReader::ImportExtSprm(WW8PLCFManResult* pRes)
return 0;
}
-void SwWW8ImplReader::EndExtSprm(USHORT nSprmId)
+void SwWW8ImplReader::EndExtSprm(sal_uInt16 nSprmId)
{
typedef sal_uInt16 (SwWW8ImplReader:: *FNReadRecordExt)();
@@ -5040,7 +5040,7 @@ void SwWW8ImplReader::EndExtSprm(USHORT nSprmId)
/* 4 (260) */ 0 // Annotation
};
- BYTE nIdx = static_cast< BYTE >(nSprmId - eFTN);
+ sal_uInt8 nIdx = static_cast< sal_uInt8 >(nSprmId - eFTN);
if( nIdx < sizeof( aWwSprmTab ) / sizeof( *aWwSprmTab )
&& aWwSprmTab[nIdx] )
(this->*aWwSprmTab[nIdx])();
@@ -5051,11 +5051,11 @@ void SwWW8ImplReader::EndExtSprm(USHORT nSprmId)
#**************************************************************************/
// Funktion zum Einlesen von Sprms. Par1: SprmId
-typedef void (SwWW8ImplReader:: *FNReadRecord)( USHORT, const BYTE*, short );
+typedef void (SwWW8ImplReader:: *FNReadRecord)( sal_uInt16, const sal_uInt8*, short );
struct SprmReadInfo
{
- USHORT nId;
+ sal_uInt16 nId;
FNReadRecord pReadFnc;
};
@@ -6182,7 +6182,7 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
// Hilfsroutinen : SPRM finden
//-----------------------------------------
-const SprmReadInfo& SwWW8ImplReader::GetSprmReadInfo(USHORT nId) const
+const SprmReadInfo& SwWW8ImplReader::GetSprmReadInfo(sal_uInt16 nId) const
{
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
const wwSprmDispatcher *pDispatcher;
@@ -6209,7 +6209,7 @@ const SprmReadInfo& SwWW8ImplReader::GetSprmReadInfo(USHORT nId) const
//-----------------------------------------
// Hilfsroutinen : SPRMs
//-----------------------------------------
-void SwWW8ImplReader::EndSprm( USHORT nId )
+void SwWW8ImplReader::EndSprm( sal_uInt16 nId )
{
if( ( nId > 255 ) && ( nId < 0x0800 ) ) return;
@@ -6219,7 +6219,7 @@ void SwWW8ImplReader::EndSprm( USHORT nId )
(this->*rSprm.pReadFnc)( nId, 0, -1 );
}
-short SwWW8ImplReader::ImportSprm(const BYTE* pPos,USHORT nId)
+short SwWW8ImplReader::ImportSprm(const sal_uInt8* pPos,sal_uInt16 nId)
{
if (!nId)
nId = mpSprmParser->GetSprmId(pPos);
@@ -6230,8 +6230,8 @@ short SwWW8ImplReader::ImportSprm(const BYTE* pPos,USHORT nId)
const SprmReadInfo& rSprm = GetSprmReadInfo(nId);
- USHORT nFixedLen = mpSprmParser->DistanceToData(nId);
- USHORT nL = mpSprmParser->GetSprmSize(nId, pPos);
+ sal_uInt16 nFixedLen = mpSprmParser->DistanceToData(nId);
+ sal_uInt16 nL = mpSprmParser->GetSprmSize(nId, pPos);
if (rSprm.pReadFnc)
(this->*rSprm.pReadFnc)(nId, pPos + nFixedLen, nL - nFixedLen);
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 1f49c2bc5947..577d35902e70 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -850,45 +850,45 @@ SprmInfo wwSprmParser::GetSprmInfo(sal_uInt16 nId) const
//-end
-inline BYTE Get_Byte( BYTE *& p )
+inline sal_uInt8 Get_Byte( sal_uInt8 *& p )
{
- BYTE n = SVBT8ToByte( *(SVBT8*)p );
+ sal_uInt8 n = SVBT8ToByte( *(SVBT8*)p );
p += 1;
return n;
}
-inline USHORT Get_UShort( BYTE *& p )
+inline sal_uInt16 Get_UShort( sal_uInt8 *& p )
{
- USHORT n = SVBT16ToShort( *(SVBT16*)p );
+ sal_uInt16 n = SVBT16ToShort( *(SVBT16*)p );
p += 2;
return n;
}
-inline short Get_Short( BYTE *& p )
+inline short Get_Short( sal_uInt8 *& p )
{
return Get_UShort(p);
}
-inline ULONG Get_ULong( BYTE *& p )
+inline sal_uLong Get_ULong( sal_uInt8 *& p )
{
- ULONG n = SVBT32ToUInt32( *(SVBT32*)p );
+ sal_uLong n = SVBT32ToUInt32( *(SVBT32*)p );
p += 4;
return n;
}
-inline long Get_Long( BYTE *& p )
+inline long Get_Long( sal_uInt8 *& p )
{
return Get_ULong(p);
}
-WW8SprmIter::WW8SprmIter(const BYTE* pSprms_, long nLen_,
+WW8SprmIter::WW8SprmIter(const sal_uInt8* pSprms_, long nLen_,
const wwSprmParser &rParser)
: mrSprmParser(rParser), pSprms( pSprms_), nRemLen( nLen_)
{
UpdateMyMembers();
}
-void WW8SprmIter::SetSprms(const BYTE* pSprms_, long nLen_)
+void WW8SprmIter::SetSprms(const sal_uInt8* pSprms_, long nLen_)
{
pSprms = pSprms_;
nRemLen = nLen_;
@@ -899,7 +899,7 @@ void WW8SprmIter::advance()
{
if (nRemLen > 0 )
{
- USHORT nSize = nAktSize;
+ sal_uInt16 nSize = nAktSize;
if (nSize > nRemLen)
nSize = nRemLen;
pSprms += nSize;
@@ -925,7 +925,7 @@ void WW8SprmIter::UpdateMyMembers()
}
}
-const BYTE* WW8SprmIter::FindSprm(USHORT nId)
+const sal_uInt8* WW8SprmIter::FindSprm(sal_uInt16 nId)
{
while(GetSprms())
{
@@ -952,12 +952,12 @@ WW8PLCFx_PCDAttrs::WW8PLCFx_PCDAttrs(ww::WordVersion eVersion,
{
}
-ULONG WW8PLCFx_PCDAttrs::GetIdx() const
+sal_uLong WW8PLCFx_PCDAttrs::GetIdx() const
{
return 0;
}
-void WW8PLCFx_PCDAttrs::SetIdx( ULONG )
+void WW8PLCFx_PCDAttrs::SetIdx( sal_uLong )
{
}
@@ -990,11 +990,11 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
return;
}
- UINT16 nPrm = SVBT16ToShort( ( (WW8_PCD*)pData )->prm );
+ sal_uInt16 nPrm = SVBT16ToShort( ( (WW8_PCD*)pData )->prm );
if ( nPrm & 1 )
{
// PRM Variant 2
- UINT16 nSprmIdx = nPrm >> 1;
+ sal_uInt16 nSprmIdx = nPrm >> 1;
if( nSprmIdx >= nGrpprls )
{
@@ -1004,7 +1004,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
p->nSprmsLen = 0;
return;
}
- const BYTE* pSprms = pGrpprls[ nSprmIdx ];
+ const sal_uInt8* pSprms = pGrpprls[ nSprmIdx ];
p->nSprmsLen = SVBT16ToShort( pSprms ); // Length
pSprms += 2;
@@ -1019,8 +1019,8 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
if (IsSevenMinus(GetFIBVersion()))
{
- aShortSprm[0] = (BYTE)( ( nPrm & 0xfe) >> 1 );
- aShortSprm[1] = (BYTE)( nPrm >> 8 );
+ aShortSprm[0] = (sal_uInt8)( ( nPrm & 0xfe) >> 1 );
+ aShortSprm[1] = (sal_uInt8)( nPrm >> 8 );
p->nSprmsLen = ( nPrm ) ? 2 : 0; // Laenge
// store Postion of internal mini storage in Data Pointer
@@ -1030,7 +1030,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
{
p->pMemPos = 0;
p->nSprmsLen = 0;
- BYTE nSprmListIdx = (BYTE)((nPrm & 0xfe) >> 1);
+ sal_uInt8 nSprmListIdx = (sal_uInt8)((nPrm & 0xfe) >> 1);
if( nSprmListIdx )
{
// process Sprm Id Matching as explained in MS Doku
@@ -1039,7 +1039,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
// see file: s62f39.htm
//
// Since isprm is 7 bits, rgsprmPrm can hold 0x80 entries.
- static const USHORT aSprmId[0x80] =
+ static const sal_uInt16 aSprmId[0x80] =
{
// sprmNoop, sprmNoop, sprmNoop, sprmNoop
0x0000,0x0000,0x0000,0x0000,
@@ -1111,14 +1111,14 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
};
// find real Sprm Id:
- USHORT nSprmId = aSprmId[ nSprmListIdx ];
+ sal_uInt16 nSprmId = aSprmId[ nSprmListIdx ];
if( nSprmId )
{
// move Sprm Id and Sprm Param to internal mini storage:
- aShortSprm[0] = (BYTE)( ( nSprmId & 0x00ff) );
- aShortSprm[1] = (BYTE)( ( nSprmId & 0xff00) >> 8 );
- aShortSprm[2] = (BYTE)( nPrm >> 8 );
+ aShortSprm[0] = (sal_uInt8)( ( nSprmId & 0x00ff) );
+ aShortSprm[1] = (sal_uInt8)( ( nSprmId & 0xff00) >> 8 );
+ aShortSprm[2] = (sal_uInt8)( nPrm >> 8 );
// store Sprm Length in member:
p->nSprmsLen = ( nPrm ) ? 3 : 0;
@@ -1148,17 +1148,17 @@ WW8PLCFx_PCD::~WW8PLCFx_PCD()
delete pPcdI;
}
-ULONG WW8PLCFx_PCD::GetIMax() const
+sal_uLong WW8PLCFx_PCD::GetIMax() const
{
return pPcdI ? pPcdI->GetIMax() : 0;
}
-ULONG WW8PLCFx_PCD::GetIdx() const
+sal_uLong WW8PLCFx_PCD::GetIdx() const
{
return pPcdI ? pPcdI->GetIdx() : 0;
}
-void WW8PLCFx_PCD::SetIdx( ULONG nIdx )
+void WW8PLCFx_PCD::SetIdx( sal_uLong nIdx )
{
if (pPcdI)
pPcdI->SetIdx( nIdx );
@@ -1246,11 +1246,11 @@ WW8_CP WW8PLCFx_PCD::AktPieceStartFc2Cp( WW8_FC nStartPos )
return WW8_CP_MAX;
}
bool bIsUnicode = false;
- INT32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
+ sal_Int32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
if( !bVer67 )
nFcStart = WW8PLCFx_PCD::TransformPieceAddress( nFcStart, bIsUnicode );
- INT32 nUnicodeFactor = bIsUnicode ? 2 : 1;
+ sal_Int32 nUnicodeFactor = bIsUnicode ? 2 : 1;
if( nStartPos < nFcStart )
nStartPos = nFcStart;
@@ -1266,7 +1266,7 @@ WW8_CP WW8PLCFx_PCD::AktPieceStartFc2Cp( WW8_FC nStartPos )
//-----------------------------------------
short WW8_BRC::DetermineBorderProperties(bool bVer67, short *pSpace,
- BYTE *pCol, short *pIdx) const
+ sal_uInt8 *pCol, short *pIdx) const
{
/*
Word does not factor the width of the border into the width/height
@@ -1275,12 +1275,12 @@ short WW8_BRC::DetermineBorderProperties(bool bVer67, short *pSpace,
our calculations
*/
short nMSTotalWidth;
- BYTE nCol;
+ sal_uInt8 nCol;
short nIdx,nSpace;
if( bVer67 )
{
- UINT16 aBrc1 = SVBT16ToShort(aBits1);
- nCol = static_cast< BYTE >((aBrc1 >> 6) & 0x1f); // aBor.ico
+ sal_uInt16 aBrc1 = SVBT16ToShort(aBits1);
+ nCol = static_cast< sal_uInt8 >((aBrc1 >> 6) & 0x1f); // aBor.ico
nSpace = (aBrc1 & 0xF800) >> 11;
nMSTotalWidth = aBrc1 & 0x07;
@@ -1495,7 +1495,7 @@ WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const
if( pPieceIter ) // Complex File ?
{
bool bIsUnicode = false;
- ULONG nOldPos = pPieceIter->GetIdx();
+ sal_uLong nOldPos = pPieceIter->GetIdx();
for (pPieceIter->SetIdx(0);
pPieceIter->GetIdx() < pPieceIter->GetIMax();(*pPieceIter)++)
@@ -1507,7 +1507,7 @@ WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const
OSL_ENSURE( !this, "PLCFpcd-WW8Fc2Cp() ging schief" );
break;
}
- INT32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
+ sal_Int32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
if( 8 <= pWw8Fib->nVersion )
{
nFcStart = WW8PLCFx_PCD::TransformPieceAddress( nFcStart,
@@ -1518,7 +1518,7 @@ WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const
if (pWw8Fib->fExtChar)
bIsUnicode=true;
}
- INT32 nLen = (nCpEnd - nCpStart) * (bIsUnicode ? 2 : 1);
+ sal_Int32 nLen = (nCpEnd - nCpStart) * (bIsUnicode ? 2 : 1);
/*
If this cp is inside this piece, or its the last piece and we are
@@ -1634,10 +1634,10 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
return 0;
WW8_FC nClxPos = pWwF->fcClx;
- INT32 nClxLen = pWwF->lcbClx;
- INT32 nLeft = nClxLen;
- INT16 nGrpprl = 0;
- BYTE clxt;
+ sal_Int32 nClxLen = pWwF->lcbClx;
+ sal_Int32 nLeft = nClxLen;
+ sal_Int16 nGrpprl = 0;
+ sal_uInt8 clxt;
pStr->Seek( nClxPos );
while( 1 ) // Zaehle Zahl der Grpprls
@@ -1648,7 +1648,7 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
break; // PLCFfpcd gefunden
if( 1 == clxt ) // clxtGrpprl ?
nGrpprl++;
- UINT16 nLen;
+ sal_uInt16 nLen;
*pStr >> nLen;
nLeft -= 2 + nLen;
if( nLeft < 0 )
@@ -1657,24 +1657,24 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
}
pStr->Seek( nClxPos );
nLeft = nClxLen;
- pPieceGrpprls = new BYTE*[nGrpprl + 1];
- memset( pPieceGrpprls, 0, ( nGrpprl + 1 ) * sizeof(BYTE *) );
+ pPieceGrpprls = new sal_uInt8*[nGrpprl + 1];
+ memset( pPieceGrpprls, 0, ( nGrpprl + 1 ) * sizeof(sal_uInt8 *) );
nPieceGrpprls = nGrpprl;
- INT16 nAktGrpprl = 0; // lies Grpprls ein
+ sal_Int16 nAktGrpprl = 0; // lies Grpprls ein
while( 1 )
{
*pStr >> clxt;
nLeft--;
if( 2 == clxt) // PLCFfpcd ?
break; // PLCFfpcd gefunden
- UINT16 nLen;
+ sal_uInt16 nLen;
*pStr >> nLen;
nLeft -= 2 + nLen;
if( nLeft < 0 )
return 0; // schiefgegangen
if( 1 == clxt ) // clxtGrpprl ?
{
- BYTE* p = new BYTE[nLen+2]; // alloziere
+ sal_uInt8* p = new sal_uInt8[nLen+2]; // alloziere
ShortToSVBT16(nLen, p); // trage Laenge ein
pStr->Read( p+2, nLen ); // lies grpprl
pPieceGrpprls[nAktGrpprl++] = p; // trage in Array ein
@@ -1700,7 +1700,7 @@ void WW8ScannerBase::DeletePieceTable()
{
if( pPieceGrpprls )
{
- for( BYTE** p = pPieceGrpprls; *p; p++ )
+ for( sal_uInt8** p = pPieceGrpprls; *p; p++ )
delete[] (*p);
delete[] pPieceGrpprls;
pPieceGrpprls = 0;
@@ -1817,7 +1817,7 @@ WW8ScannerBase::WW8ScannerBase( SvStream* pSt, SvStream* pTblSt,
// Extended ATRD
if (pWwFib->fcAtrdExtra && pWwFib->lcbAtrdExtra)
{
- pExtendedAtrds = new BYTE[pWwFib->lcbAtrdExtra];
+ pExtendedAtrds = new sal_uInt8[pWwFib->lcbAtrdExtra];
long nOldPos = pTblSt->Tell();
pTblSt->Seek(pWwFib->fcAtrdExtra);
pTblSt->Read(pExtendedAtrds, pWwFib->lcbAtrdExtra);
@@ -1894,14 +1894,14 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
rPLCF++;
- if((((BYTE*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
+ if((((sal_uInt8*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
return true; // Bei Fehler nicht abbrechen
if( !rPLCF.Get( nP, pData ) )
return false;
- while((((BYTE*)pData)[0] & 0x1f ) == 0x13 )
+ while((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13 )
{
// immer noch neue (nested) Anfaenge ?
WW8SkipField( rPLCF ); // nested Field im Beschreibungsteil
@@ -1909,7 +1909,7 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
return false;
}
- if((((BYTE*)pData)[0] & 0x1f ) == 0x14 )
+ if((((sal_uInt8*)pData)[0] & 0x1f ) == 0x14 )
{
// Field Separator ?
@@ -1918,7 +1918,7 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
if( !rPLCF.Get( nP, pData ) )
return false;
- while ((((BYTE*)pData)[0] & 0x1f ) == 0x13)
+ while ((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13)
{
// immer noch neue (nested) Anfaenge ?
WW8SkipField( rPLCF ); // nested Field im Resultatteil
@@ -1934,7 +1934,7 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
{
void* pData;
- ULONG nOldIdx = rPLCF.GetIdx();
+ sal_uLong nOldIdx = rPLCF.GetIdx();
rF.nLen = rF.nId = rF.nOpt = rF.bCodeNest = rF.bResNest = 0;
@@ -1943,10 +1943,10 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
rPLCF++;
- if((((BYTE*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
+ if((((sal_uInt8*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
goto Err;
- rF.nId = ((BYTE*)pData)[1];
+ rF.nId = ((sal_uInt8*)pData)[1];
if( !rPLCF.Get( rF.nLCode, pData ) )
goto Err;
@@ -1955,7 +1955,7 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
rF.nSCode++; // ohne Marken
rF.nLCode -= rF.nSCode; // Pos zu Laenge
- while((((BYTE*)pData)[0] & 0x1f ) == 0x13 )
+ while((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13 )
{
// immer noch neue (nested) Anfaenge ?
WW8SkipField( rPLCF ); // nested Field im Beschreibungsteil
@@ -1964,13 +1964,13 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
goto Err;
}
- if((((BYTE*)pData)[0] & 0x1f ) == 0x14 ){ // Field Separator ?
+ if((((sal_uInt8*)pData)[0] & 0x1f ) == 0x14 ){ // Field Separator ?
rPLCF++;
if( !rPLCF.Get( rF.nLRes, pData ) )
goto Err;
- while((((BYTE*)pData)[0] & 0x1f ) == 0x13 )
+ while((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13 )
{
// immer noch neue (nested) Anfaenge ?
WW8SkipField( rPLCF ); // nested Field im Resultatteil
@@ -1989,11 +1989,11 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
}
rPLCF++;
- if((((BYTE*)pData)[0] & 0x1f ) == 0x15 )
+ if((((sal_uInt8*)pData)[0] & 0x1f ) == 0x15 )
{
// Field Ende ?
// INDEX-Fld hat Bit7 gesetzt!?!
- rF.nOpt = ((BYTE*)pData)[1]; // Ja -> Flags uebernehmen
+ rF.nOpt = ((sal_uInt8*)pData)[1]; // Ja -> Flags uebernehmen
}else{
rF.nId = 0; // Nein -> Feld ungueltig
}
@@ -2016,7 +2016,7 @@ String WW8ReadPString(SvStream& rStrm, rtl_TextEncoding eEnc,
bool bAtEndSeekRel1)
{
ByteString aByteStr;
- UINT8 b;
+ sal_uInt8 b;
rStrm >> b;
if (b)
@@ -2024,7 +2024,7 @@ String WW8ReadPString(SvStream& rStrm, rtl_TextEncoding eEnc,
// Alloc methode automatically sets Zero at the end
sal_Char* pByteData = aByteStr.AllocBuffer( b );
- ULONG nWasRead = rStrm.Read( pByteData, b );
+ sal_uLong nWasRead = rStrm.Read( pByteData, b );
if( nWasRead != b )
aByteStr.ReleaseBufferAccess(static_cast<xub_StrLen>(nWasRead));
}
@@ -2036,9 +2036,9 @@ String WW8ReadPString(SvStream& rStrm, rtl_TextEncoding eEnc,
return String( aByteStr, eEnc );
}
-String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1)
+String WW8Read_xstz(SvStream& rStrm, sal_uInt16 nChars, bool bAtEndSeekRel1)
{
- UINT16 b(0);
+ sal_uInt16 b;
if( nChars )
b = nChars;
@@ -2051,16 +2051,16 @@ String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1)
// Alloc methode automatically sets Zero at the end
sal_Unicode* pData = aStr.AllocBuffer( b );
- ULONG nWasRead = rStrm.Read( (sal_Char*)pData, b * 2 );
- if( nWasRead != static_cast<ULONG>(b*2) )
+ sal_uLong nWasRead = rStrm.Read( (sal_Char*)pData, b * 2 );
+ if( nWasRead != static_cast<sal_uLong>(b*2) )
{
- b = static_cast<UINT16>(nWasRead / 2);
+ b = static_cast<sal_uInt16>(nWasRead / 2);
aStr.ReleaseBufferAccess( b );
pData = aStr.GetBufferAccess();
}
#ifdef OSL_BIGENDIAN
- ULONG n;
+ sal_uLong n;
sal_Unicode *pWork;
for( n = 0, pWork = pData; n < b; ++n, ++pWork )
*pWork = SWAPSHORT( *pWork );
@@ -2073,9 +2073,9 @@ String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1)
return aStr;
}
-ULONG SafeReadString(ByteString &rStr,USHORT nLen,SvStream &rStrm)
+sal_uLong SafeReadString(ByteString &rStr,sal_uInt16 nLen,SvStream &rStrm)
{
- ULONG nWasRead=0;
+ sal_uLong nWasRead=0;
if (nLen)
{
nWasRead = rStrm.Read( rStr.AllocBuffer( nLen ), nLen);
@@ -2115,12 +2115,12 @@ xub_StrLen WW8ScannerBase::WW8ReadString( SvStream& rStrm, String& rStr,
nLen = USHRT_MAX - 1;
if( bIsUnicode )
- rStr.Append(WW8Read_xstz(rStrm, (USHORT)nLen, false));
+ rStr.Append(WW8Read_xstz(rStrm, (sal_uInt16)nLen, false));
else
{
// Alloc method automatically sets Zero at the end
ByteString aByteStr;
- SafeReadString(aByteStr,(USHORT)nLen,rStrm);
+ SafeReadString(aByteStr,(sal_uInt16)nLen,rStrm);
rStr += String( aByteStr, eEnc );
}
nTotalRead += nLen;
@@ -2144,7 +2144,7 @@ WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, long nFilePos, long nPLCF,
{
nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
// Pointer auf Pos- u. Struct-Array
- pPLCF_PosArray = new INT32[ ( nPLCF + 3 ) / 4 ];
+ pPLCF_PosArray = new sal_Int32[ ( nPLCF + 3 ) / 4 ];
long nOldPos = pSt->Tell();
@@ -2156,7 +2156,7 @@ WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, long nFilePos, long nPLCF,
nIdx = 0;
#endif // OSL_BIGENDIAN
if( nStruct ) // Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
else
pPLCF_Contents = 0; // kein Inhalt
if( nStartPos >= 0 )
@@ -2259,7 +2259,7 @@ bool WW8PLCFspecial::GetData(long nInIdx, WW8_CP& rPos, void*& rpValue) const
// Ctor fuer *andere* als Fkps
// Bei nStartPos < 0 wird das erste Element des PLCFs genommen
-WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
+WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
WW8_CP nStartPos ) : pPLCF_PosArray(0), nIdx(0), nStru(nStruct)
{
OSL_ENSURE( nPLCF, "WW8PLCF: nPLCF ist Null!" );
@@ -2277,8 +2277,8 @@ WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
// != 0, dann wird ein unvollstaendiger PLCF vervollstaendigt. Das ist bei
// WW6 bei Resourcenmangel und bei WordPad (W95) immer noetig. Bei nStartPos
// < 0 wird das erste Element des PLCFs genommen
-WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
- WW8_CP nStartPos, INT32 nPN, INT32 ncpN ) : pPLCF_PosArray(0), nIdx(0),
+WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
+ WW8_CP nStartPos, sal_Int32 nPN, sal_Int32 ncpN ) : pPLCF_PosArray(0), nIdx(0),
nStru(nStruct)
{
nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
@@ -2292,7 +2292,7 @@ WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
SeekPos( nStartPos );
}
-void WW8PLCF::ReadPLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF )
+void WW8PLCF::ReadPLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF )
{
bool failure = false;
@@ -2318,7 +2318,7 @@ void WW8PLCF::ReadPLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF )
nIdx = 0;
#endif // OSL_BIGENDIAN
// Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
}
pSt->Seek( nOldPos );
@@ -2333,12 +2333,12 @@ void WW8PLCF::MakeFailedPLCF()
{
nIMax = 0;
delete[] pPLCF_PosArray;
- pPLCF_PosArray = new INT32[2];
+ pPLCF_PosArray = new sal_Int32[2];
pPLCF_PosArray[0] = pPLCF_PosArray[1] = WW8_CP_MAX;
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
}
-void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN )
+void WW8PLCF::GeneratePLCF( SvStream* pSt, sal_Int32 nPN, sal_Int32 ncpN )
{
OSL_ENSURE( nIMax < ncpN, "Pcl.Fkp: Warum ist PLCF zu gross ?" );
@@ -2352,9 +2352,9 @@ void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN )
{
size_t nSiz = 6 * nIMax + 4;
size_t nElems = ( nSiz + 3 ) / 4;
- pPLCF_PosArray = new INT32[ nElems ]; // Pointer auf Pos-Array
+ pPLCF_PosArray = new sal_Int32[ nElems ]; // Pointer auf Pos-Array
- for (INT32 i = 0; i < ncpN && !pSt->GetError(); ++i)
+ for (sal_Int32 i = 0; i < ncpN && !pSt->GetError(); ++i)
{
// Baue FC-Eintraege
pSt->Seek( ( nPN + i ) << 9 ); // erster FC-Eintrag jedes Fkp
@@ -2371,7 +2371,7 @@ void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN )
sal_Size nLastFkpPos = ( ( nPN + nIMax - 1 ) << 9 );
pSt->Seek( nLastFkpPos + 511 ); // Anz. Fkp-Eintraege des letzten Fkp
- BYTE nb;
+ sal_uInt8 nb;
*pSt >> nb;
pSt->Seek( nLastFkpPos + nb * 4 ); // letzer FC-Eintrag des letzten Fkp
@@ -2385,10 +2385,10 @@ void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN )
if (!failure)
{
// Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
- BYTE* p = pPLCF_Contents;
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
+ sal_uInt8* p = pPLCF_Contents;
- for (INT32 i = 0; i < ncpN; ++i) // Baue PNs
+ for (sal_Int32 i = 0; i < ncpN; ++i) // Baue PNs
{
ShortToSVBT16(static_cast<sal_uInt16>(nPN + i), p);
p+=2;
@@ -2416,8 +2416,8 @@ bool WW8PLCF::SeekPos(WW8_CP nPos)
if( (1 > nIdx) || (nP < pPLCF_PosArray[ nIdx-1 ]) )
nIdx = 1;
- INT32 nI = nIdx ? nIdx : 1;
- INT32 nEnd = nIMax;
+ sal_Int32 nI = nIdx ? nIdx : 1;
+ sal_Int32 nEnd = nIMax;
for(int n = (1==nIdx ? 1 : 2); n; --n )
{
@@ -2466,7 +2466,7 @@ WW8PLCFpcd::WW8PLCFpcd( SvStream* pSt, long nFilePos, long nPLCF, long nStruct )
:nStru( nStruct )
{
nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
- pPLCF_PosArray = new INT32[ ( nPLCF + 3 ) / 4 ]; // Pointer auf Pos-Array
+ pPLCF_PosArray = new sal_Int32[ ( nPLCF + 3 ) / 4 ]; // Pointer auf Pos-Array
long nOldPos = pSt->Tell();
@@ -2478,7 +2478,7 @@ WW8PLCFpcd::WW8PLCFpcd( SvStream* pSt, long nFilePos, long nPLCF, long nStruct )
#endif // OSL_BIGENDIAN
// Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
pSt->Seek( nOldPos );
}
@@ -2537,7 +2537,7 @@ bool WW8PLCFpcd_Iter::Get(WW8_CP& rStart, WW8_CP& rEnd, void*& rpValue) const
return true;
}
-INT32 WW8PLCFpcd_Iter::Where() const
+sal_Int32 WW8PLCFpcd_Iter::Where() const
{
if ( nIdx >= rPLCF.nIMax )
return SAL_MAX_INT32;
@@ -2552,12 +2552,12 @@ bool WW8PLCFx_Fc_FKP::WW8Fkp::Entry::operator<
return (mnFC < rSecond.mnFC);
}
-bool IsReplaceAllSprm(USHORT nSpId)
+bool IsReplaceAllSprm(sal_uInt16 nSpId)
{
return (0x6645 == nSpId || 0x6646 == nSpId);
}
-bool IsExpandableSprm(USHORT nSpId)
+bool IsExpandableSprm(sal_uInt16 nSpId)
{
return 0x646B == nSpId;
}
@@ -2595,7 +2595,7 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt,
if (aEntry.mnLen && eVersion == ww::eWW2)
{
Word2CHPX aChpx = ReadWord2Chpx(*pSt, nFilePos + nOfs + 1, static_cast< sal_uInt8 >(aEntry.mnLen));
- std::vector<BYTE> aSprms = ChpxToSprms(aChpx);
+ std::vector<sal_uInt8> aSprms = ChpxToSprms(aChpx);
aEntry.mnLen = static_cast< sal_uInt16 >(aSprms.size());
if (aEntry.mnLen)
{
@@ -2648,7 +2648,7 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt,
aEntry.mnLen=0; //Too short, ignore
}
- USHORT nSpId = aEntry.mnLen ? maSprmParser.GetSprmId(aEntry.mpData) : 0;
+ sal_uInt16 nSpId = aEntry.mnLen ? maSprmParser.GetSprmId(aEntry.mpData) : 0;
/*
If we replace then we throw away the old data, if we
@@ -2661,9 +2661,9 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt,
sal_uInt16 nOrigLen = bExpand ? aEntry.mnLen : 0;
sal_uInt8 *pOrigData = bExpand ? aEntry.mpData : 0;
- UINT32 nCurr = pDataSt->Tell();
+ sal_uInt32 nCurr = pDataSt->Tell();
- UINT32 nPos = SVBT32ToUInt32(aEntry.mpData + 2);
+ sal_uInt32 nPos = SVBT32ToUInt32(aEntry.mpData + 2);
pDataSt->Seek(nPos);
*pDataSt >> aEntry.mnLen;
aEntry.mpData =
@@ -2693,7 +2693,7 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt,
#ifdef DEBUGSPRMREADER
{
sal_Int32 nLen;
- BYTE* pSprms = GetLenAndIStdAndSprms( nLen );
+ sal_uInt8* pSprms = GetLenAndIStdAndSprms( nLen );
WW8SprmIter aIter(pSprms, nLen, maSprmParser);
while(aIter.GetSprms())
@@ -2798,7 +2798,7 @@ bool WW8PLCFx_Fc_FKP::WW8Fkp::SeekPos(WW8_FC nFc)
return false;
}
-BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::Get(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen)
+sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::Get(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen)
const
{
rLen = 0;
@@ -2812,7 +2812,7 @@ BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::Get(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen
rStart = maEntries[mnIdx].mnFC;
rEnd = maEntries[mnIdx + 1].mnFC;
- BYTE* pSprms = GetLenAndIStdAndSprms( rLen );
+ sal_uInt8* pSprms = GetLenAndIStdAndSprms( rLen );
return pSprms;
}
@@ -2826,32 +2826,32 @@ bool WW8PLCFx_Fc_FKP::WW8Fkp::SetIdx(sal_uInt8 nI)
return false;
}
-BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::GetLenAndIStdAndSprms(sal_Int32& rLen) const
+sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::GetLenAndIStdAndSprms(sal_Int32& rLen) const
{
rLen = maEntries[mnIdx].mnLen;
return maEntries[mnIdx].mpData;
}
-const BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm( USHORT nId )
+const sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm( sal_uInt16 nId )
{
if (mnIdx >= mnIMax)
return 0;
sal_Int32 nLen;
- BYTE* pSprms = GetLenAndIStdAndSprms( nLen );
+ sal_uInt8* pSprms = GetLenAndIStdAndSprms( nLen );
WW8SprmIter aIter(pSprms, nLen, maSprmParser);
return aIter.FindSprm(nId);
}
-bool WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm(USHORT nId,
- std::vector<const BYTE *> &rResult)
+bool WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm(sal_uInt16 nId,
+ std::vector<const sal_uInt8 *> &rResult)
{
if (mnIdx >= mnIMax)
return false;
sal_Int32 nLen;
- BYTE* pSprms = GetLenAndIStdAndSprms( nLen );
+ sal_uInt8* pSprms = GetLenAndIStdAndSprms( nLen );
WW8SprmIter aIter(pSprms, nLen, maSprmParser);
@@ -2884,12 +2884,12 @@ long WW8PLCFx::GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen )
}
// ...Idx2: Default: ignorieren
-ULONG WW8PLCFx::GetIdx2() const
+sal_uLong WW8PLCFx::GetIdx2() const
{
return 0;
}
-void WW8PLCFx::SetIdx2(ULONG )
+void WW8PLCFx::SetIdx2(sal_uLong )
{
}
@@ -2948,7 +2948,7 @@ bool WW8PLCFx_Fc_FKP::NewFkp()
return false; // PLCF fertig abgearbeitet
}
(*pPLCF)++;
- long nPo = SVBT16ToShort( (BYTE *)pPage );
+ long nPo = SVBT16ToShort( (sal_uInt8 *)pPage );
nPo <<= 9; // shift als LONG
long nAktFkpFilePos = pFkp ? pFkp->GetFilePos() : -1;
@@ -3008,15 +3008,15 @@ WW8PLCFx_Fc_FKP::~WW8PLCFx_Fc_FKP()
delete pPCDAttrs;
}
-ULONG WW8PLCFx_Fc_FKP::GetIdx() const
+sal_uLong WW8PLCFx_Fc_FKP::GetIdx() const
{
- ULONG u = pPLCF->GetIdx() << 8;
+ sal_uLong u = pPLCF->GetIdx() << 8;
if (pFkp)
u |= pFkp->GetIdx();
return u;
}
-void WW8PLCFx_Fc_FKP::SetIdx( ULONG nIdx )
+void WW8PLCFx_Fc_FKP::SetIdx( sal_uLong nIdx )
{
if( !( nIdx & 0xffffff00L ) )
{
@@ -3048,7 +3048,7 @@ bool WW8PLCFx_Fc_FKP::SeekPos(WW8_FC nFcPos)
void* pPage;
if( pFkp && pPLCF->Get( nPLCFStart, nPLCFEnd, pPage ) )
{
- long nPo = SVBT16ToShort( (BYTE *)pPage );
+ long nPo = SVBT16ToShort( (sal_uInt8 *)pPage );
nPo <<= 9; // shift als LONG
if (nPo != pFkp->GetFilePos())
pFkp = 0;
@@ -3073,7 +3073,7 @@ WW8_FC WW8PLCFx_Fc_FKP::Where()
return Where(); // am einfachsten rekursiv
}
-BYTE* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen)
+sal_uInt8* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen)
{
rLen = 0; // Default
rStart = rEnd = WW8_FC_MAX;
@@ -3084,7 +3084,7 @@ BYTE* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& r
return 0;
}
- BYTE* pPos = pFkp->Get( rStart, rEnd, rLen );
+ sal_uInt8* pPos = pFkp->Get( rStart, rEnd, rLen );
if( rStart == WW8_FC_MAX ) //Not found
return 0;
return pPos;
@@ -3105,7 +3105,7 @@ WW8PLCFx& WW8PLCFx_Fc_FKP::operator ++( int )
return *this;
}
-USHORT WW8PLCFx_Fc_FKP::GetIstd() const
+sal_uInt16 WW8PLCFx_Fc_FKP::GetIstd() const
{
return pFkp ? pFkp->GetIstd() : 0xFFFF;
}
@@ -3127,7 +3127,7 @@ void WW8PLCFx_Fc_FKP::GetPCDSprms( WW8PLCFxDesc& rDesc )
}
}
-const BYTE* WW8PLCFx_Fc_FKP::HasSprm( USHORT nId )
+const sal_uInt8* WW8PLCFx_Fc_FKP::HasSprm( sal_uInt16 nId )
{
// const waere schoener, aber dafuer muesste NewFkp() ersetzt werden oder
// wegfallen
@@ -3139,7 +3139,7 @@ const BYTE* WW8PLCFx_Fc_FKP::HasSprm( USHORT nId )
return 0;
}
- const BYTE* pRes = pFkp->HasSprm( nId );
+ const sal_uInt8* pRes = pFkp->HasSprm( nId );
if( !pRes )
{
@@ -3157,7 +3157,7 @@ const BYTE* WW8PLCFx_Fc_FKP::HasSprm( USHORT nId )
return pRes;
}
-bool WW8PLCFx_Fc_FKP::HasSprm(USHORT nId, std::vector<const BYTE *> &rResult)
+bool WW8PLCFx_Fc_FKP::HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult)
{
// const waere schoener, aber dafuer muesste NewFkp() ersetzt werden oder
// wegfallen
@@ -3229,17 +3229,17 @@ void WW8PLCFx_Cp_FKP::ResetAttrStartEnd()
bLineEnd = false;
}
-ULONG WW8PLCFx_Cp_FKP::GetPCDIMax() const
+sal_uLong WW8PLCFx_Cp_FKP::GetPCDIMax() const
{
return pPcd ? pPcd->GetIMax() : 0;
}
-ULONG WW8PLCFx_Cp_FKP::GetPCDIdx() const
+sal_uLong WW8PLCFx_Cp_FKP::GetPCDIdx() const
{
return pPcd ? pPcd->GetIdx() : 0;
}
-void WW8PLCFx_Cp_FKP::SetPCDIdx( ULONG nIdx )
+void WW8PLCFx_Cp_FKP::SetPCDIdx( sal_uLong nIdx )
{
if( pPcd )
pPcd->SetIdx( nIdx );
@@ -3291,7 +3291,7 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
*/
if( !pPieceIter )
return;
- ULONG nOldPos = pPieceIter->GetIdx();
+ sal_uLong nOldPos = pPieceIter->GetIdx();
bool bOk = pPieceIter->SeekPos(nOrigCp);
pPieceIter->SetIdx( nOldPos );
if (!bOk)
@@ -3318,7 +3318,7 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
//We set the piece iterator to the piece that contains the
//character, now we have the correct piece for this character
- ULONG nOldPos = pPieceIter->GetIdx();
+ sal_uLong nOldPos = pPieceIter->GetIdx();
p->nStartPos = nOrigCp;
pPieceIter->SeekPos( p->nStartPos);
@@ -3396,7 +3396,7 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
break;
}
bIsUnicode = false;
- INT32 nFcStart=SVBT32ToUInt32(((WW8_PCD*)pData)->fc);
+ sal_Int32 nFcStart=SVBT32ToUInt32(((WW8_PCD*)pData)->fc);
if (IsEightPlus(GetFIBVersion()))
{
@@ -3480,7 +3480,7 @@ WW8PLCFx_SEPX::WW8PLCFx_SEPX(SvStream* pSt, SvStream* pTblSt,
GetFIBVersion() <= ww::eWW2 ? 6 : 12, nStartCp)
: 0;
- pSprms = new BYTE[nArrMax]; // maximum length
+ pSprms = new sal_uInt8[nArrMax]; // maximum length
}
WW8PLCFx_SEPX::~WW8PLCFx_SEPX()
@@ -3489,12 +3489,12 @@ WW8PLCFx_SEPX::~WW8PLCFx_SEPX()
delete[] pSprms;
}
-ULONG WW8PLCFx_SEPX::GetIdx() const
+sal_uLong WW8PLCFx_SEPX::GetIdx() const
{
return pPLCF ? pPLCF->GetIdx() : 0;
}
-void WW8PLCFx_SEPX::SetIdx( ULONG nIdx )
+void WW8PLCFx_SEPX::SetIdx( sal_uLong nIdx )
{
if( pPLCF ) pPLCF->SetIdx( nIdx );
}
@@ -3524,7 +3524,7 @@ void WW8PLCFx_SEPX::GetSprms(WW8PLCFxDesc* p)
}
else
{
- sal_uInt32 nPo = SVBT32ToUInt32( (BYTE*)pData+2 );
+ sal_uInt32 nPo = SVBT32ToUInt32( (sal_uInt8*)pData+2 );
if (nPo == 0xFFFFFFFF)
{
p->nStartPos = p->nEndPos = WW8_CP_MAX; // Sepx empty
@@ -3538,7 +3538,7 @@ void WW8PLCFx_SEPX::GetSprms(WW8PLCFxDesc* p)
// read len
if (GetFIBVersion() <= ww::eWW2) // eWW6 ?, docs say yes, but...
{
- BYTE nSiz(0);
+ sal_uInt8 nSiz(0);
*pStrm >> nSiz;
nSprmSiz = nSiz;
}
@@ -3549,7 +3549,7 @@ void WW8PLCFx_SEPX::GetSprms(WW8PLCFxDesc* p)
{ // passt nicht
delete[] pSprms;
nArrMax = nSprmSiz; // Hole mehr Speicher
- pSprms = new BYTE[nArrMax];
+ pSprms = new sal_uInt8[nArrMax];
}
pStrm->Read( pSprms, nSprmSiz ); // read Sprms
@@ -3566,15 +3566,15 @@ WW8PLCFx& WW8PLCFx_SEPX::operator ++( int )
return *this;
}
-const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId ) const
+const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId ) const
{
return HasSprm( nId, pSprms, nSprmSiz);
}
-const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId, const BYTE* pOtherSprms,
+const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId, const sal_uInt8* pOtherSprms,
long nOtherSprmSiz ) const
{
- const BYTE *pRet = 0;
+ const sal_uInt8 *pRet = 0;
if (pPLCF)
{
WW8SprmIter aIter(pOtherSprms, nOtherSprmSiz, maSprmParser);
@@ -3583,8 +3583,8 @@ const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId, const BYTE* pOtherSprms,
return pRet;
}
-bool WW8PLCFx_SEPX::Find4Sprms(USHORT nId1,USHORT nId2,USHORT nId3,USHORT nId4,
- BYTE*& p1, BYTE*& p2, BYTE*& p3, BYTE*& p4) const
+bool WW8PLCFx_SEPX::Find4Sprms(sal_uInt16 nId1,sal_uInt16 nId2,sal_uInt16 nId3,sal_uInt16 nId4,
+ sal_uInt8*& p1, sal_uInt8*& p2, sal_uInt8*& p3, sal_uInt8*& p4) const
{
if( !pPLCF )
return 0;
@@ -3595,12 +3595,12 @@ bool WW8PLCFx_SEPX::Find4Sprms(USHORT nId1,USHORT nId2,USHORT nId3,USHORT nId4,
p3 = 0;
p4 = 0;
- BYTE* pSp = pSprms;
- USHORT i=0;
+ sal_uInt8* pSp = pSprms;
+ sal_uInt16 i=0;
while (i + maSprmParser.MinSprmLen() <= nSprmSiz)
{
// Sprm gefunden?
- USHORT nAktId = maSprmParser.GetSprmId(pSp);
+ sal_uInt16 nAktId = maSprmParser.GetSprmId(pSp);
bool bOk = true;
if( nAktId == nId1 )
p1 = pSp + maSprmParser.DistanceToData(nId1);
@@ -3614,33 +3614,33 @@ bool WW8PLCFx_SEPX::Find4Sprms(USHORT nId1,USHORT nId2,USHORT nId3,USHORT nId4,
bOk = false;
bFound |= bOk;
// erhoehe Zeiger, so dass er auf naechsten Sprm zeigt
- USHORT x = maSprmParser.GetSprmSize(nAktId, pSp);
+ sal_uInt16 x = maSprmParser.GetSprmSize(nAktId, pSp);
i = i + x;
pSp += x;
}
return bFound;
}
-const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId, BYTE n2nd ) const
+const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId, sal_uInt8 n2nd ) const
{
if( !pPLCF )
return 0;
- BYTE* pSp = pSprms;
+ sal_uInt8* pSp = pSprms;
- USHORT i=0;
+ sal_uInt16 i=0;
while (i + maSprmParser.MinSprmLen() <= nSprmSiz)
{
// Sprm gefunden?
- USHORT nAktId = maSprmParser.GetSprmId(pSp);
+ sal_uInt16 nAktId = maSprmParser.GetSprmId(pSp);
if (nAktId == nId)
{
- BYTE *pRet = pSp + maSprmParser.DistanceToData(nId);
+ sal_uInt8 *pRet = pSp + maSprmParser.DistanceToData(nId);
if (*pRet == n2nd)
return pRet;
}
// erhoehe Zeiger, so dass er auf naechsten Sprm zeigt
- USHORT x = maSprmParser.GetSprmSize(nAktId, pSp);
+ sal_uInt16 x = maSprmParser.GetSprmSize(nAktId, pSp);
i = i + x;
pSp += x;
}
@@ -3667,7 +3667,7 @@ WW8PLCFx_SubDoc::~WW8PLCFx_SubDoc()
delete pTxt;
}
-ULONG WW8PLCFx_SubDoc::GetIdx() const
+sal_uLong WW8PLCFx_SubDoc::GetIdx() const
{
// Wahrscheinlich pTxt... nicht noetig
if( pRef )
@@ -3675,7 +3675,7 @@ ULONG WW8PLCFx_SubDoc::GetIdx() const
return 0;
}
-void WW8PLCFx_SubDoc::SetIdx( ULONG nIdx )
+void WW8PLCFx_SubDoc::SetIdx( sal_uLong nIdx )
{
if( pRef )
{
@@ -3705,7 +3705,7 @@ void WW8PLCFx_SubDoc::GetSprms(WW8PLCFxDesc* p)
if (!pRef)
return;
- ULONG nNr = pRef->GetIdx();
+ sal_uLong nNr = pRef->GetIdx();
void *pData;
WW8_CP nFoo;
@@ -3792,12 +3792,12 @@ WW8PLCFx_FLD::~WW8PLCFx_FLD()
delete pPLCF;
}
-ULONG WW8PLCFx_FLD::GetIdx() const
+sal_uLong WW8PLCFx_FLD::GetIdx() const
{
return pPLCF ? pPLCF->GetIdx() : 0;
}
-void WW8PLCFx_FLD::SetIdx( ULONG nIdx )
+void WW8PLCFx_FLD::SetIdx( sal_uLong nIdx )
{
if( pPLCF )
pPLCF->SetIdx( nIdx );
@@ -3819,7 +3819,7 @@ bool WW8PLCFx_FLD::StartPosIsFieldStart()
sal_Int32 nTest;
if (
(!pPLCF || !pPLCF->Get(nTest, pData) ||
- ((((BYTE*)pData)[0] & 0x1f) != 0x13))
+ ((((sal_uInt8*)pData)[0] & 0x1f) != 0x13))
)
return false;
return true;
@@ -3837,7 +3837,7 @@ bool WW8PLCFx_FLD::EndPosIsFieldEnd()
void* pData;
sal_Int32 nTest;
- if ( pPLCF->Get(nTest, pData) && ((((BYTE*)pData)[0] & 0x1f) == 0x15) )
+ if ( pPLCF->Get(nTest, pData) && ((((sal_uInt8*)pData)[0] & 0x1f) == 0x15) )
bRet = true;
pPLCF->SetIdx(n);
@@ -3911,23 +3911,23 @@ bool WW8PLCFx_FLD::GetPara(long nIdx, WW8FieldDesc& rF)
//-----------------------------------------
/* to be optimized like this: */
-void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
- USHORT nExtraLen, rtl_TextEncoding eCS, std::vector<String> &rArray,
+void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen,
+ sal_uInt16 nExtraLen, rtl_TextEncoding eCS, std::vector<String> &rArray,
std::vector<ww::bytes>* pExtraArray, ::std::vector<String>* pValueArray)
{
if(nLen==0) // Handle Empty STTBF
return;
- ULONG nOldPos = rStrm.Tell();
+ sal_uLong nOldPos = rStrm.Tell();
rStrm.Seek( nStart );
- UINT16 nLen2;
+ sal_uInt16 nLen2;
rStrm >> nLen2; // bVer67: total length of structure
// bVer8 : count of strings
if( bVer8 )
{
- UINT16 nStrings;
+ sal_uInt16 nStrings;
bool bUnicode = (0xFFFF == nLen2);
if( bUnicode )
rStrm >> nStrings;
@@ -3936,13 +3936,13 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
rStrm >> nExtraLen;
- for( USHORT i=0; i < nStrings; i++ )
+ for( sal_uInt16 i=0; i < nStrings; i++ )
{
if( bUnicode )
rArray.push_back(WW8Read_xstz(rStrm, 0, false));
else
{
- BYTE nBChar;
+ sal_uInt8 nBChar;
rStrm >> nBChar;
ByteString aTmp;
SafeReadString(aTmp,nBChar,rStrm);
@@ -3970,13 +3970,13 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
// read the value of the document variables, if requested.
if (pValueArray)
{
- for( USHORT i=0; i < nStrings; i++ )
+ for( sal_uInt16 i=0; i < nStrings; i++ )
{
if( bUnicode )
pValueArray->push_back(WW8Read_xstz(rStrm, 0, false));
else
{
- BYTE nBChar;
+ sal_uInt8 nBChar;
rStrm >> nBChar;
ByteString aTmp;
SafeReadString(aTmp,nBChar,rStrm);
@@ -3987,7 +3987,7 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
}
else
{
- BYTE nBChar;
+ sal_uInt8 nBChar;
if( nLen2 != nLen )
{
OSL_ENSURE( nLen2 == nLen, "Fib length and read length are different" );
@@ -3995,9 +3995,9 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
nLen = USHRT_MAX;
else if (nLen < 2 )
nLen = 2;
- nLen2 = static_cast<UINT16>(nLen);
+ nLen2 = static_cast<sal_uInt16>(nLen);
}
- ULONG nRead = 0;
+ sal_uLong nRead = 0;
for( nLen2 -= 2; nRead < nLen2; )
{
rStrm >> nBChar; ++nRead;
@@ -4071,28 +4071,28 @@ WW8PLCFx_Book::~WW8PLCFx_Book()
delete pBook[0];
}
-ULONG WW8PLCFx_Book::GetIdx() const
+sal_uLong WW8PLCFx_Book::GetIdx() const
{
return nIMax ? pBook[0]->GetIdx() : 0;
}
-void WW8PLCFx_Book::SetIdx( ULONG nI )
+void WW8PLCFx_Book::SetIdx( sal_uLong nI )
{
if( nIMax )
pBook[0]->SetIdx( nI );
}
-ULONG WW8PLCFx_Book::GetIdx2() const
+sal_uLong WW8PLCFx_Book::GetIdx2() const
{
return nIMax ? ( pBook[1]->GetIdx() | ( ( nIsEnd ) ? 0x80000000 : 0 ) ) : 0;
}
-void WW8PLCFx_Book::SetIdx2( ULONG nI )
+void WW8PLCFx_Book::SetIdx2( sal_uLong nI )
{
if( nIMax )
{
pBook[1]->SetIdx( nI & 0x7fffffff );
- nIsEnd = (USHORT)( ( nI >> 31 ) & 1 ); // 0 oder 1
+ nIsEnd = (sal_uInt16)( ( nI >> 31 ) & 1 ); // 0 oder 1
}
}
@@ -4147,8 +4147,8 @@ WW8PLCFx& WW8PLCFx_Book::operator ++( int )
{
(*pBook[nIsEnd])++;
- ULONG l0 = pBook[0]->Where();
- ULONG l1 = pBook[1]->Where();
+ sal_uLong l0 = pBook[0]->Where();
+ sal_uLong l1 = pBook[1]->Where();
if( l0 < l1 )
nIsEnd = 0;
else if( l1 < l0 )
@@ -4173,13 +4173,13 @@ long WW8PLCFx_Book::GetLen() const
OSL_ENSURE( !this, "Falscher Aufruf (2) von PLCF_Book::GetLen()" );
return 0;
}
- USHORT nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
+ sal_uInt16 nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
long nNum = pBook[1]->GetPos( nEndIdx );
nNum -= nStartPos;
return nNum;
}
-void WW8PLCFx_Book::SetStatus(USHORT nIndex, eBookStatus eStat )
+void WW8PLCFx_Book::SetStatus(sal_uInt16 nIndex, eBookStatus eStat )
{
OSL_ENSURE(nIndex < nIMax, "set status of non existing bookmark!");
pStatus[nIndex] = (eBookStatus)( pStatus[nIndex] | eStat );
@@ -4209,17 +4209,17 @@ long WW8PLCFx_Book::GetHandle() const
}
}
-String WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, USHORT &nIndex)
+String WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, sal_uInt16 &nIndex)
{
bool bFound = false;
- USHORT i = 0;
+ sal_uInt16 i = 0;
if( pBook[0] && pBook[1] )
{
WW8_CP nStartAkt, nEndAkt;
do
{
void* p;
- USHORT nEndIdx;
+ sal_uInt16 nEndIdx;
if( pBook[0]->GetData( i, nStartAkt, p ) && p )
nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
@@ -4253,9 +4253,9 @@ String WW8PLCFx_Book::GetUniqueBookmarkName(String &suggestedName)
if (aRet.CompareTo(s)==0) {
int len=aRet.Len();
int p=len-1;
- while(p>0 && aRet.GetChar(static_cast<USHORT>(p))>='0' && aRet.GetChar(static_cast<USHORT>(p))<='9')
+ while(p>0 && aRet.GetChar(static_cast<sal_uInt16>(p))>='0' && aRet.GetChar(static_cast<sal_uInt16>(p))<='9')
p--;
- aRet=String(aRet, 0, static_cast<USHORT>(p+1));
+ aRet=String(aRet, 0, static_cast<sal_uInt16>(p+1));
aRet += String::CreateFromInt32( nBookmarkId++ );
i=0; // start search from beginning
} else {
@@ -4271,7 +4271,7 @@ bool WW8PLCFx_Book::MapName(String& rName)
return false;
bool bFound = false;
- USHORT i = 0;
+ sal_uInt16 i = 0;
do
{
if (COMPARE_EQUAL == rName.CompareIgnoreCaseToAscii(aBookNames[i]))
@@ -4395,9 +4395,9 @@ void WW8PLCFMan::GetNewNoSprms( WW8PLCFxDesc& rDesc )
rDesc.nOrigSprmsLen = rDesc.nSprmsLen;
}
-USHORT WW8PLCFMan::GetId(const WW8PLCFxDesc* p) const
+sal_uInt16 WW8PLCFMan::GetId(const WW8PLCFxDesc* p) const
{
- USHORT nId;
+ sal_uInt16 nId;
if (p == pFld)
nId = eFLD;
@@ -4426,7 +4426,7 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
memset( aD, 0, sizeof( aD ) );
nLineEnd = WW8_CP_MAX;
nManType = nType;
- USHORT i;
+ sal_uInt16 i;
if( MAN_MAINTEXT == nType )
{
@@ -4569,7 +4569,7 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
if( p->pPLCFx->IsSprm() )
{
// Vorsicht: nEndPos muss bereits
- p->pIdStk = new std::stack<USHORT>;
+ p->pIdStk = new std::stack<sal_uInt16>;
if ((p == pChp) || (p == pPap))
{
WW8_CP nTemp = p->nEndPos+p->nCpOfs;
@@ -4591,20 +4591,20 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
WW8PLCFMan::~WW8PLCFMan()
{
- for( USHORT i=0; i<nPLCF; i++)
+ for( sal_uInt16 i=0; i<nPLCF; i++)
delete aD[i].pIdStk;
}
// 0. welche Attr.-Klasse,
// 1. ob ein Attr.-Start ist,
// 2. CP, wo ist naechste Attr.-Aenderung
-USHORT WW8PLCFMan::WhereIdx(bool* pbStart, long* pPos) const
+sal_uInt16 WW8PLCFMan::WhereIdx(bool* pbStart, long* pPos) const
{
OSL_ENSURE(nPLCF,"What the hell");
long nNext = LONG_MAX; // SuchReihenfolge:
- USHORT nNextIdx = nPLCF;// first ending found ( CHP, PAP, ( SEP ) ),
+ sal_uInt16 nNextIdx = nPLCF;// first ending found ( CHP, PAP, ( SEP ) ),
bool bStart = true; // dann Anfaenge finden ( ( SEP ), PAP, CHP )
- USHORT i;
+ sal_uInt16 i;
const WW8PLCFxDesc* pD;
for (i=0; i < nPLCF; i++)
{
@@ -4661,7 +4661,7 @@ void WW8PLCFMan::SeekPos( long nNewCp )
void WW8PLCFMan::SaveAllPLCFx( WW8PLCFxSaveAll& rSave ) const
{
- USHORT i, n=0;
+ sal_uInt16 i, n=0;
if( pPcd )
pPcd->Save( rSave.aS[n++] );
if( pPcdA )
@@ -4674,7 +4674,7 @@ void WW8PLCFMan::SaveAllPLCFx( WW8PLCFxSaveAll& rSave ) const
void WW8PLCFMan::RestoreAllPLCFx( const WW8PLCFxSaveAll& rSave )
{
- USHORT i, n=0;
+ sal_uInt16 i, n=0;
if( pPcd )
pPcd->Restore( rSave.aS[n++] );
if( pPcdA )
@@ -4774,7 +4774,7 @@ void WW8PLCFMan::GetNoSprmEnd( short nIdx, WW8PLCFManResult* pRes ) const
pRes->nSprmId = 0;
}
-bool WW8PLCFMan::TransferOpenSprms(std::stack<USHORT> &rStack)
+bool WW8PLCFMan::TransferOpenSprms(std::stack<sal_uInt16> &rStack)
{
for (int i = 0; i < nPLCF; ++i)
{
@@ -4797,7 +4797,7 @@ void WW8PLCFMan::AdvSprm(short nIdx, bool bStart)
p->bFirstSprm = false;
if( bStart )
{
- USHORT nLastId = GetId(p);
+ sal_uInt16 nLastId = GetId(p);
p->pIdStk->push(nLastId); // merke Id fuer Attribut-Ende
if( p->nSprmsLen )
@@ -4807,7 +4807,7 @@ void WW8PLCFMan::AdvSprm(short nIdx, bool bStart)
if( p->pMemPos )
{
// Length of last sprm
- USHORT nSprmL = maSprmParser.GetSprmSize(nLastId, p->pMemPos);
+ sal_uInt16 nSprmL = maSprmParser.GetSprmSize(nLastId, p->pMemPos);
// Gesamtlaenge Sprms um SprmLaenge verringern
p->nSprmsLen -= nSprmL;
@@ -4959,7 +4959,7 @@ void WW8PLCFMan::AdvNoSprm(short nIdx, bool bStart)
WW8PLCFMan& WW8PLCFMan::operator ++(int)
{
bool bStart;
- USHORT nIdx = WhereIdx(&bStart);
+ sal_uInt16 nIdx = WhereIdx(&bStart);
if (nIdx < nPLCF)
{
WW8PLCFxDesc* p = &aD[nIdx];
@@ -4982,7 +4982,7 @@ bool WW8PLCFMan::Get(WW8PLCFManResult* pRes) const
{
memset( pRes, 0, sizeof( WW8PLCFManResult ) );
bool bStart;
- USHORT nIdx = WhereIdx(&bStart);
+ sal_uInt16 nIdx = WhereIdx(&bStart);
if( nIdx >= nPLCF )
{
@@ -5018,7 +5018,7 @@ bool WW8PLCFMan::Get(WW8PLCFManResult* pRes) const
}
}
-USHORT WW8PLCFMan::GetColl() const
+sal_uInt16 WW8PLCFMan::GetColl() const
{
if( pPap->pPLCFx )
return pPap->pPLCFx->GetIstd();
@@ -5034,18 +5034,18 @@ WW8PLCFx_FLD* WW8PLCFMan::GetFld() const
return (WW8PLCFx_FLD*)pFld->pPLCFx;
}
-const BYTE* WW8PLCFMan::HasParaSprm( USHORT nId ) const
+const sal_uInt8* WW8PLCFMan::HasParaSprm( sal_uInt16 nId ) const
{
return ((WW8PLCFx_Cp_FKP*)pPap->pPLCFx)->HasSprm( nId );
}
-const BYTE* WW8PLCFMan::HasCharSprm( USHORT nId ) const
+const sal_uInt8* WW8PLCFMan::HasCharSprm( sal_uInt16 nId ) const
{
return ((WW8PLCFx_Cp_FKP*)pChp->pPLCFx)->HasSprm( nId );
}
-bool WW8PLCFMan::HasCharSprm(USHORT nId,
- std::vector<const BYTE *> &rResult) const
+bool WW8PLCFMan::HasCharSprm(sal_uInt16 nId,
+ std::vector<const sal_uInt8 *> &rResult) const
{
return ((WW8PLCFx_Cp_FKP*)pChp->pPLCFx)->HasSprm(nId, rResult);
}
@@ -5067,12 +5067,12 @@ void WW8PLCFx::Restore( const WW8PLCFxSave1& rSave )
SetStartFc( rSave.nStartFC );
}
-ULONG WW8PLCFx_Cp_FKP::GetIdx2() const
+sal_uLong WW8PLCFx_Cp_FKP::GetIdx2() const
{
return GetPCDIdx();
}
-void WW8PLCFx_Cp_FKP::SetIdx2( ULONG nIdx )
+void WW8PLCFx_Cp_FKP::SetIdx2( sal_uLong nIdx )
{
SetPCDIdx( nIdx );
}
@@ -5244,13 +5244,13 @@ ww::WordVersion WW8Fib::GetFIBVersion() const
return eVer;
}
-WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
+WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset)
: nFibError( 0 )
{
memset(this, 0, sizeof(*this));
- BYTE aBits1;
- BYTE aBits2;
- BYTE aVer8Bits1; // nur ab WinWord 8 benutzt
+ sal_uInt8 aBits1;
+ sal_uInt8 aBits2;
+ sal_uInt8 aVer8Bits1; // nur ab WinWord 8 benutzt
rSt.Seek( nOffset );
/*
Wunsch-Nr vermerken, File-Versionsnummer ermitteln
@@ -5262,8 +5262,8 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
rSt >> nProduct;
if( 0 != rSt.GetError() )
{
- INT16 nFibMin;
- INT16 nFibMax;
+ sal_Int16 nFibMin;
+ sal_Int16 nFibMax;
// note: 6 stands for "6 OR 7", 7 stands for "ONLY 7"
switch( nVersion )
{
@@ -5299,10 +5299,10 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
ww::WordVersion eVer = GetFIBVersion();
// Hilfs-Varis fuer Ver67:
- INT16 pnChpFirst_Ver67=0;
- INT16 pnPapFirst_Ver67=0;
- INT16 cpnBteChp_Ver67=0;
- INT16 cpnBtePap_Ver67=0;
+ sal_Int16 pnChpFirst_Ver67=0;
+ sal_Int16 pnPapFirst_Ver67=0;
+ sal_Int16 cpnBteChp_Ver67=0;
+ sal_Int16 cpnBtePap_Ver67=0;
// und auf gehts: FIB einlesen
rSt >> lid;
@@ -5316,12 +5316,12 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
rSt >> aVer8Bits1; // unter Ver67 nur leeres Reservefeld
// Inhalt von aVer8Bits1
//
- // BYTE fMac :1;
- // BYTE fEmptySpecial :1;
- // BYTE fLoadOverridePage :1;
- // BYTE fFuturesavedUndo :1;
- // BYTE fWord97Saved :1;
- // BYTE :3;
+ // sal_uInt8 fMac :1;
+ // sal_uInt8 fEmptySpecial :1;
+ // sal_uInt8 fLoadOverridePage :1;
+ // sal_uInt8 fFuturesavedUndo :1;
+ // sal_uInt8 fWord97Saved :1;
+ // sal_uInt8 :3;
rSt >> chse;
rSt >> chseTables;
rSt >> fcMin;
@@ -5337,7 +5337,7 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
rSt >> wMagicRevised;
rSt >> wMagicCreatedPrivate;
rSt >> wMagicRevisedPrivate;
- rSt.SeekRel( 9 * sizeof( INT16 ) );
+ rSt.SeekRel( 9 * sizeof( sal_Int16 ) );
/*
// dies sind die 9 unused Felder:
@@ -5361,11 +5361,11 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
rSt >> cbMac;
// 2 Longs uebergehen, da unwichtiger Quatsch
- rSt.SeekRel( 2 * sizeof( INT32) );
+ rSt.SeekRel( 2 * sizeof( sal_Int32) );
// weitere 2 Longs nur bei Ver67 ueberspringen
if (IsSevenMinus(eVer))
- rSt.SeekRel( 2 * sizeof( INT32) );
+ rSt.SeekRel( 2 * sizeof( sal_Int32) );
rSt >> ccpText;
rSt >> ccpFtn;
@@ -5378,7 +5378,7 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
// weiteres Long nur bei Ver67 ueberspringen
if (IsSevenMinus(eVer))
- rSt.SeekRel( 1 * sizeof( INT32) );
+ rSt.SeekRel( 1 * sizeof( sal_Int32) );
else
{
// Einschub fuer WW8 *****************************************************
@@ -5479,7 +5479,7 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
// weiteres short nur bei Ver67 ueberspringen
if (IsSevenMinus(eVer))
{
- rSt.SeekRel( 1*sizeof( INT16) );
+ rSt.SeekRel( 1*sizeof( sal_Int16) );
// folgende 4 Shorts existieren nur bei Ver67;
rSt >> pnChpFirst_Ver67;
@@ -5635,7 +5635,7 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
}
-WW8Fib::WW8Fib(BYTE nVer)
+WW8Fib::WW8Fib(sal_uInt8 nVer)
{
memset(this, 0, sizeof(*this));
nVersion = nVer;
@@ -5708,11 +5708,11 @@ bool WW8Fib::WriteHeader(SvStream& rStrm)
bool bVer8 = 8 == nVersion;
size_t nUnencryptedHdr = bVer8 ? 0x44 : 0x24;
- BYTE *pDataPtr = new BYTE[ nUnencryptedHdr ];
- BYTE *pData = pDataPtr;
+ sal_uInt8 *pDataPtr = new sal_uInt8[ nUnencryptedHdr ];
+ sal_uInt8 *pData = pDataPtr;
memset( pData, 0, nUnencryptedHdr );
- ULONG nPos = rStrm.Tell();
+ sal_uLong nPos = rStrm.Tell();
cbMac = rStrm.Seek( STREAM_SEEK_TO_END );
rStrm.Seek( nPos );
@@ -5722,7 +5722,7 @@ bool WW8Fib::WriteHeader(SvStream& rStrm)
Set_UInt16( pData, lid );
Set_UInt16( pData, pnNext );
- UINT16 nBits16 = 0;
+ sal_uInt16 nBits16 = 0;
if( fDot ) nBits16 |= 0x0001;
if( fGlsy) nBits16 |= 0x0002;
if( fComplex ) nBits16 |= 0x0004;
@@ -5746,7 +5746,7 @@ bool WW8Fib::WriteHeader(SvStream& rStrm)
Set_UInt16( pData, nKey );
Set_UInt8( pData, envr );
- BYTE nBits8 = 0;
+ sal_uInt8 nBits8 = 0;
if( bVer8 )
{
if( fMac ) nBits8 |= 0x0001;
@@ -5774,7 +5774,7 @@ bool WW8Fib::WriteHeader(SvStream& rStrm)
Set_UInt16( pData, wMagicRevised );
Set_UInt16( pData, wMagicCreatedPrivate );
Set_UInt16( pData, wMagicRevisedPrivate );
- pData += 9 * sizeof( INT16 );
+ pData += 9 * sizeof( sal_Int16 );
Set_UInt16( pData, lidFE );
Set_UInt16( pData, clw );
}
@@ -5797,20 +5797,20 @@ bool WW8Fib::Write(SvStream& rStrm)
size_t nUnencryptedHdr = bVer8 ? 0x44 : 0x24;
- BYTE *pDataPtr = new BYTE[ fcMin - nUnencryptedHdr ];
- BYTE *pData = pDataPtr;
+ sal_uInt8 *pDataPtr = new sal_uInt8[ fcMin - nUnencryptedHdr ];
+ sal_uInt8 *pData = pDataPtr;
memset( pData, 0, fcMin - nUnencryptedHdr );
- ULONG nPos = rStrm.Tell();
+ sal_uLong nPos = rStrm.Tell();
cbMac = rStrm.Seek( STREAM_SEEK_TO_END );
rStrm.Seek( nPos );
// 2 Longs uebergehen, da unwichtiger Quatsch
- pData += 2 * sizeof( INT32);
+ pData += 2 * sizeof( sal_Int32);
// weitere 2 Longs nur bei Ver67 ueberspringen
if( !bVer8 )
- pData += 2 * sizeof( INT32);
+ pData += 2 * sizeof( sal_Int32);
Set_UInt32( pData, ccpText );
Set_UInt32( pData, ccpFtn );
@@ -5823,7 +5823,7 @@ bool WW8Fib::Write(SvStream& rStrm)
// weiteres Long nur bei Ver67 ueberspringen
if( !bVer8 )
- pData += 1 * sizeof( INT32);
+ pData += 1 * sizeof( sal_Int32);
// Einschub fuer WW8 *****************************************************
if( bVer8 )
@@ -5924,11 +5924,11 @@ bool WW8Fib::Write(SvStream& rStrm)
// weiteres short nur bei Ver67 ueberspringen
if( !bVer8 )
{
- pData += 1*sizeof( INT16);
- Set_UInt16( pData, (UINT16)pnChpFirst );
- Set_UInt16( pData, (UINT16)pnPapFirst );
- Set_UInt16( pData, (UINT16)cpnBteChp );
- Set_UInt16( pData, (UINT16)cpnBtePap );
+ pData += 1*sizeof( sal_Int16);
+ Set_UInt16( pData, (sal_uInt16)pnChpFirst );
+ Set_UInt16( pData, (sal_uInt16)pnPapFirst );
+ Set_UInt16( pData, (sal_uInt16)cpnBteChp );
+ Set_UInt16( pData, (sal_uInt16)cpnBtePap );
}
Set_UInt32( pData, fcPlcfdoaMom ); // nur bei Ver67, in Ver8 unused
@@ -6001,8 +6001,8 @@ bool WW8Fib::Write(SvStream& rStrm)
Set_UInt32( pData, lcbPlcfTch );
pData += 0x3FA - 0x38A;
- Set_UInt16( pData, (UINT16)0x0002);
- Set_UInt16( pData, (UINT16)0x00D9);
+ Set_UInt16( pData, (sal_uInt16)0x0002);
+ Set_UInt16( pData, (sal_uInt16)0x00D9);
pData += 0x41A - 0x3FE;
Set_UInt32( pData, fcAtrdExtra );
@@ -6018,13 +6018,13 @@ bool WW8Fib::Write(SvStream& rStrm)
return 0 == rStrm.GetError();
}
-rtl_TextEncoding WW8Fib::GetFIBCharset(UINT16 chs)
+rtl_TextEncoding WW8Fib::GetFIBCharset(sal_uInt16 chs)
{
OSL_ENSURE(chs <= 0x100, "overflowed winword charset set");
rtl_TextEncoding eCharSet =
(0x0100 == chs)
? RTL_TEXTENCODING_APPLE_ROMAN
- : rtl_getTextEncodingFromWindowsCharset( static_cast<BYTE>(chs) );
+ : rtl_getTextEncodingFromWindowsCharset( static_cast<sal_uInt8>(chs) );
return eCharSet;
}
@@ -6038,7 +6038,7 @@ WW8Style::WW8Style(SvStream& rStream, WW8Fib& rFibPara)
rSt.Seek(nStyleStart);
- USHORT cbStshi = 0; // 2 bytes size of the following STSHI structure
+ sal_uInt16 cbStshi = 0; // 2 bytes size of the following STSHI structure
if (rFib.GetFIBVersion() <= ww::eWW2)
{
@@ -6051,10 +6051,10 @@ WW8Style::WW8Style(SvStream& rStream, WW8Fib& rFibPara)
// lies die Laenge der in der Datei gespeicherten Struktur
rSt >> cbStshi;
- UINT16 nRead = cbStshi;
+ sal_uInt16 nRead = cbStshi;
do
{
- UINT16 a16Bit;
+ sal_uInt16 a16Bit;
if( 2 > nRead ) break;
rSt >> cstd;
@@ -6110,10 +6110,10 @@ WW8_STD* WW8Style::Read1STDFixed( short& rSkip, short* pcbStd )
{
WW8_STD* pStd = 0;
- UINT16 cbStd;
+ sal_uInt16 cbStd;
rSt >> cbStd; // lies Laenge
- UINT16 nRead = cbSTDBaseInFile;
+ sal_uInt16 nRead = cbSTDBaseInFile;
if( cbStd >= cbSTDBaseInFile )
{
// Fixed part vollst. vorhanden
@@ -6124,7 +6124,7 @@ WW8_STD* WW8Style::Read1STDFixed( short& rSkip, short* pcbStd )
do
{
- UINT16 a16Bit;
+ sal_uInt16 a16Bit;
if( 2 > nRead ) break;
rSt >> a16Bit;
@@ -6257,7 +6257,7 @@ struct WW8_FFN_Ver8 : public WW8_FFN_BASE
sal_Char fs[ 24 ]; // 0x10 FONTSIGNATURE
// ab Ver8 als Unicode
- UINT16 szFfn[65]; // 0x6 bzw. 0x40 ab Ver8 zero terminated string that
+ sal_uInt16 szFfn[65]; // 0x6 bzw. 0x40 ab Ver8 zero terminated string that
// records name of font.
// Maximal size of szFfn is 65 characters.
// Vorsicht: Dieses Array kann auch kleiner sein!!!
@@ -6313,10 +6313,10 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
rSt.Seek( rFib.fcSttbfffn );
- INT32 nFFn = rFib.lcbSttbfffn - 2;
+ sal_Int32 nFFn = rFib.lcbSttbfffn - 2;
// allocate Font Array
- BYTE* pA = new BYTE[ nFFn ];
+ sal_uInt8* pA = new sal_uInt8[ nFFn ];
memset(pA, 0, nFFn);
WW8_FFN* p = (WW8_FFN*)pA;
@@ -6353,7 +6353,7 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
if( nLeft < 1 ) // can we read the given ammount of bytes ?
break;
// increase p by nNextSiz Bytes
- p = (WW8_FFN *)( ( (BYTE*)p ) + nNextSiz );
+ p = (WW8_FFN *)( ( (sal_uInt8*)p ) + nNextSiz );
}
}
@@ -6366,7 +6366,7 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
if( eVersion <= ww::eWW2 )
{
WW8_FFN_BASE* pVer2 = (WW8_FFN_BASE*)pA;
- for(USHORT i=0; i<nMax; ++i, ++p)
+ for(sal_uInt16 i=0; i<nMax; ++i, ++p)
{
p->cbFfnM1 = pVer2->cbFfnM1;
@@ -6374,8 +6374,8 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
p->fTrueType = 0;
p->ff = 0;
- p->wWeight = ( *(((BYTE*)pVer2) + 1) );
- p->chs = ( *(((BYTE*)pVer2) + 2) );
+ p->wWeight = ( *(((sal_uInt8*)pVer2) + 1) );
+ p->chs = ( *(((sal_uInt8*)pVer2) + 2) );
/*
#i8726# 7- seems to encode the name in the same encoding as
the font, e.g load the doc in 97 and save to see the unicode
@@ -6386,17 +6386,17 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
eEnc = RTL_TEXTENCODING_MS_1252;
p->sFontname = String ( (((const sal_Char*)pVer2) + 1 + 2), eEnc);
- pVer2 = (WW8_FFN_BASE*)( ((BYTE*)pVer2) + pVer2->cbFfnM1 + 1 );
+ pVer2 = (WW8_FFN_BASE*)( ((sal_uInt8*)pVer2) + pVer2->cbFfnM1 + 1 );
}
}
else if( eVersion < ww::eWW8 )
{
WW8_FFN_Ver6* pVer6 = (WW8_FFN_Ver6*)pA;
- BYTE c2;
- for(USHORT i=0; i<nMax; ++i, ++p)
+ sal_uInt8 c2;
+ for(sal_uInt16 i=0; i<nMax; ++i, ++p)
{
p->cbFfnM1 = pVer6->cbFfnM1;
- c2 = *(((BYTE*)pVer6) + 1);
+ c2 = *(((sal_uInt8*)pVer6) + 1);
p->prg = c2 & 0x02;
p->fTrueType = (c2 & 0x04) >> 2;
@@ -6431,17 +6431,17 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
p->sFontname.APPEND_CONST_ASC(";Symbol");
}
}
- pVer6 = (WW8_FFN_Ver6*)( ((BYTE*)pVer6) + pVer6->cbFfnM1 + 1 );
+ pVer6 = (WW8_FFN_Ver6*)( ((sal_uInt8*)pVer6) + pVer6->cbFfnM1 + 1 );
}
}
else
{
WW8_FFN_Ver8* pVer8 = (WW8_FFN_Ver8*)pA;
- BYTE c2;
- for(USHORT i=0; i<nMax; ++i, ++p)
+ sal_uInt8 c2;
+ for(sal_uInt16 i=0; i<nMax; ++i, ++p)
{
p->cbFfnM1 = pVer8->cbFfnM1;
- c2 = *(((BYTE*)pVer8) + 1);
+ c2 = *(((sal_uInt8*)pVer8) + 1);
p->prg = c2 & 0x02;
p->fTrueType = (c2 & 0x04) >> 2;
@@ -6454,10 +6454,10 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
#ifdef __WW8_NEEDS_COPY
{
- BYTE nLen = 0x28;
- BYTE nLength = sizeof( pVer8->szFfn ) / sizeof( SVBT16 );
- nLength = std::min( nLength, BYTE( pVer8->cbFfnM1+1 ) );
- for( UINT16* pTmp = pVer8->szFfn;
+ sal_uInt8 nLen = 0x28;
+ sal_uInt8 nLength = sizeof( pVer8->szFfn ) / sizeof( SVBT16 );
+ nLength = std::min( nLength, sal_uInt8( pVer8->cbFfnM1+1 ) );
+ for( sal_uInt16* pTmp = pVer8->szFfn;
nLen < nLength; ++pTmp, nLen+=2 )
{
*pTmp = SVBT16ToShort( *(SVBT16*)pTmp );
@@ -6476,14 +6476,14 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
lcl_checkFontname( p->sFontname );
// Zeiger auf Ursprungsarray einen Font nach hinten setzen
- pVer8 = (WW8_FFN_Ver8*)( ((BYTE*)pVer8) + pVer8->cbFfnM1 + 1 );
+ pVer8 = (WW8_FFN_Ver8*)( ((sal_uInt8*)pVer8) + pVer8->cbFfnM1 + 1 );
}
}
}
delete[] pA;
}
-const WW8_FFN* WW8Fonts::GetFont( USHORT nNum ) const
+const WW8_FFN* WW8Fonts::GetFont( sal_uInt16 nNum ) const
{
if( !pFontA || nNum >= nMax )
return 0;
@@ -6526,7 +6526,7 @@ WW8PLCF_HdFt::WW8PLCF_HdFt( SvStream* pSt, WW8Fib& rFib, WW8Dop& rDop )
to point to the beginning of the next section's group of headers and
footers in this PLCF, UpdateIndex does that task.
*/
- for( BYTE nI = 0x1; nI <= 0x20; nI <<= 1 )
+ for( sal_uInt8 nI = 0x1; nI <= 0x20; nI <<= 1 )
if( nI & rDop.grpfIhdt ) // Bit gesetzt ?
nIdxOffset++;
@@ -6534,10 +6534,10 @@ WW8PLCF_HdFt::WW8PLCF_HdFt( SvStream* pSt, WW8Fib& rFib, WW8Dop& rDop )
// und der Fussnoten
}
-bool WW8PLCF_HdFt::GetTextPos(BYTE grpfIhdt, BYTE nWhich, WW8_CP& rStart,
+bool WW8PLCF_HdFt::GetTextPos(sal_uInt8 grpfIhdt, sal_uInt8 nWhich, WW8_CP& rStart,
long& rLen)
{
- BYTE nI = 0x01;
+ sal_uInt8 nI = 0x01;
short nIdx = nIdxOffset;
while (true)
{
@@ -6572,10 +6572,10 @@ bool WW8PLCF_HdFt::GetTextPosExact(short nIdx, WW8_CP& rStart, long& rLen)
return true;
}
-void WW8PLCF_HdFt::UpdateIndex( BYTE grpfIhdt )
+void WW8PLCF_HdFt::UpdateIndex( sal_uInt8 grpfIhdt )
{
// Caution: Description is not correct
- for( BYTE nI = 0x01; nI <= 0x20; nI <<= 1 )
+ for( sal_uInt8 nI = 0x01; nI <= 0x20; nI <<= 1 )
if( nI & grpfIhdt )
nIdxOffset++;
}
@@ -6584,14 +6584,14 @@ void WW8PLCF_HdFt::UpdateIndex( BYTE grpfIhdt )
// WW8Dop
//-----------------------------------------
-WW8Dop::WW8Dop(SvStream& rSt, INT16 nFib, INT32 nPos, sal_uInt32 nSize) : bUseThaiLineBreakingRules(false)
+WW8Dop::WW8Dop(SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_uInt32 nSize) : bUseThaiLineBreakingRules(false)
{
memset( &nDataStart, 0, (&nDataEnd - &nDataStart) );
fDontUseHTMLAutoSpacing = true; //default
fAcetateShowAtn = true; //default
const sal_uInt32 nMaxDopSize = 0x268;
- BYTE* pDataPtr = new BYTE[ nMaxDopSize ];
- BYTE* pData = pDataPtr;
+ sal_uInt8* pDataPtr = new sal_uInt8[ nMaxDopSize ];
+ sal_uInt8* pData = pDataPtr;
sal_uInt32 nRead = nMaxDopSize < nSize ? nMaxDopSize : nSize;
rSt.Seek( nPos );
@@ -6603,9 +6603,9 @@ WW8Dop::WW8Dop(SvStream& rSt, INT16 nFib, INT32 nPos, sal_uInt32 nSize) : bUseTh
memset( pData + nRead, 0, nMaxDopSize - nRead );
// dann mal die Daten auswerten
- UINT32 a32Bit;
- UINT16 a16Bit;
- BYTE a8Bit;
+ sal_uInt32 a32Bit;
+ sal_uInt16 a16Bit;
+ sal_uInt8 a8Bit;
a16Bit = Get_UShort( pData ); // 0 0x00
fFacingPages = 0 != ( a16Bit & 0x0001 ) ;
@@ -6761,7 +6761,7 @@ WW8Dop::WW8Dop(SvStream& rSt, INT16 nFib, INT32 nPos, sal_uInt32 nSize) : bUseTh
cDBC = Get_Long( pData ); // 480 0x1e0
cDBCFtnEdn = Get_Long( pData ); // 484 0x1e4
- pData += 1 * sizeof( INT32); // 488 0x1e8
+ pData += 1 * sizeof( sal_Int32); // 488 0x1e8
nfcFtnRef = Get_Short( pData ); // 492 0x1ec
nfcEdnRef = Get_Short( pData ); // 494 0x1ee
@@ -6860,7 +6860,7 @@ WW8Dop::WW8Dop() : bUseThaiLineBreakingRules(false)
fAcetateShowAtn = true;
}
-void WW8Dop::SetCompatabilityOptions(UINT32 a32Bit)
+void WW8Dop::SetCompatabilityOptions(sal_uInt32 a32Bit)
{
fNoTabForInd = ( a32Bit & 0x00000001 ) ;
fNoSpaceRaiseLower = ( a32Bit & 0x00000002 ) >> 1 ;
@@ -6897,9 +6897,9 @@ void WW8Dop::SetCompatabilityOptions(UINT32 a32Bit)
fUsePrinterMetrics = ( a32Bit & 0x80000000 ) >> 31 ;
}
-UINT32 WW8Dop::GetCompatabilityOptions() const
+sal_uInt32 WW8Dop::GetCompatabilityOptions() const
{
- UINT32 a32Bit = 0;
+ sal_uInt32 a32Bit = 0;
if (fNoTabForInd) a32Bit |= 0x00000001;
if (fNoSpaceRaiseLower) a32Bit |= 0x00000002;
if (fSupressSpbfAfterPageBreak) a32Bit |= 0x00000004;
@@ -6936,7 +6936,7 @@ UINT32 WW8Dop::GetCompatabilityOptions() const
}
// i#78591#
-void WW8Dop::SetCompatabilityOptions2(UINT32 a32Bit)
+void WW8Dop::SetCompatabilityOptions2(sal_uInt32 a32Bit)
{
fCompatabilityOptions_Unknown2_1 = ( a32Bit & 0x00000001 );
fCompatabilityOptions_Unknown2_2 = ( a32Bit & 0x00000002 ) >> 1 ;
@@ -6972,9 +6972,9 @@ void WW8Dop::SetCompatabilityOptions2(UINT32 a32Bit)
fCompatabilityOptions_Unknown2_32 = ( a32Bit & 0x80000000 ) >> 31 ;
}
-UINT32 WW8Dop::GetCompatabilityOptions2() const
+sal_uInt32 WW8Dop::GetCompatabilityOptions2() const
{
- UINT32 a32Bit = 0;
+ sal_uInt32 a32Bit = 0;
if (fCompatabilityOptions_Unknown2_1) a32Bit |= 0x00000001;
if (fCompatabilityOptions_Unknown2_2) a32Bit |= 0x00000002;
if (fDontUseHTMLAutoSpacing) a32Bit |= 0x00000004;
@@ -7021,13 +7021,13 @@ bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const
rFib.fcDop = rStrm.Tell();
rFib.lcbDop = nLen;
- BYTE aData[ nMaxDopLen ];
+ sal_uInt8 aData[ nMaxDopLen ];
memset( aData, 0, nMaxDopLen );
- BYTE* pData = aData;
+ sal_uInt8* pData = aData;
// dann mal die Daten auswerten
- UINT16 a16Bit;
- BYTE a8Bit;
+ sal_uInt16 a16Bit;
+ sal_uInt8 a8Bit;
a16Bit = 0; // 0 0x00
if (fFacingPages)
@@ -7184,7 +7184,7 @@ bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const
Set_UInt32( pData, cDBC ); // 480 0x1e0
Set_UInt32( pData, cDBCFtnEdn ); // 484 0x1e4
- pData += 1 * sizeof( INT32); // 488 0x1e8
+ pData += 1 * sizeof( sal_Int32); // 488 0x1e8
Set_UInt16( pData, nfcFtnRef ); // 492 0x1ec
Set_UInt16( pData, nfcEdnRef ); // 494 0x1ee
@@ -7216,9 +7216,9 @@ bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const
return 0 == rStrm.GetError();
}
-void WW8DopTypography::ReadFromMem(BYTE *&pData)
+void WW8DopTypography::ReadFromMem(sal_uInt8 *&pData)
{
- USHORT a16Bit = Get_UShort(pData);
+ sal_uInt16 a16Bit = Get_UShort(pData);
fKerningPunct = (a16Bit & 0x0001);
iJustification = (a16Bit & 0x0006) >> 1;
iLevelOfKinsoku = (a16Bit & 0x0018) >> 3;
@@ -7229,7 +7229,7 @@ void WW8DopTypography::ReadFromMem(BYTE *&pData)
cchFollowingPunct = Get_Short(pData);
cchLeadingPunct = Get_Short(pData);
- INT16 i;
+ sal_Int16 i;
for (i=0; i < nMaxFollowing; ++i)
rgxchFPunct[i] = Get_Short(pData);
for (i=0; i < nMaxLeading; ++i)
@@ -7247,9 +7247,9 @@ void WW8DopTypography::ReadFromMem(BYTE *&pData)
}
-void WW8DopTypography::WriteToMem(BYTE *&pData) const
+void WW8DopTypography::WriteToMem(sal_uInt8 *&pData) const
{
- USHORT a16Bit = fKerningPunct;
+ sal_uInt16 a16Bit = fKerningPunct;
a16Bit |= (iJustification << 1) & 0x0006;
a16Bit |= (iLevelOfKinsoku << 3) & 0x0018;
a16Bit |= (f2on1 << 5) & 0x002;
@@ -7260,16 +7260,16 @@ void WW8DopTypography::WriteToMem(BYTE *&pData) const
Set_UInt16(pData,cchFollowingPunct);
Set_UInt16(pData,cchLeadingPunct);
- INT16 i;
+ sal_Int16 i;
for (i=0; i < nMaxFollowing; ++i)
Set_UInt16(pData,rgxchFPunct[i]);
for (i=0; i < nMaxLeading; ++i)
Set_UInt16(pData,rgxchLPunct[i]);
}
-USHORT WW8DopTypography::GetConvertedLang() const
+sal_uInt16 WW8DopTypography::GetConvertedLang() const
{
- USHORT nLang;
+ sal_uInt16 nLang;
//I have assumed peoples republic/taiwan == simplified/traditional
//This isn't a documented issue, so we might have it all wrong,
@@ -7311,11 +7311,11 @@ USHORT WW8DopTypography::GetConvertedLang() const
//-----------------------------------------
// Sprms
//-----------------------------------------
-USHORT wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
+sal_uInt16 wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
const
{
SprmInfo aSprm = GetSprmInfo(nId);
- USHORT nL = 0; // number of Bytes to read
+ sal_uInt16 nL = 0; // number of Bytes to read
//sprmPChgTabs
switch( nId )
@@ -7323,11 +7323,11 @@ USHORT wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
case 23:
case 0xC615:
if( pSprm[1 + mnDelta] != 255 )
- nL = static_cast< USHORT >(pSprm[1 + mnDelta] + aSprm.nLen);
+ nL = static_cast< sal_uInt16 >(pSprm[1 + mnDelta] + aSprm.nLen);
else
{
- BYTE nDel = pSprm[2 + mnDelta];
- BYTE nIns = pSprm[3 + mnDelta + 4 * nDel];
+ sal_uInt8 nDel = pSprm[2 + mnDelta];
+ sal_uInt8 nIns = pSprm[3 + mnDelta + 4 * nDel];
nL = 2 + 4 * nDel + 3 * nIns;
}
@@ -7344,12 +7344,12 @@ USHORT wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
case L_VAR:
// Variable 1-Byte Length?
// Excl. Token + Var-Lengthbyte
- nL = static_cast< USHORT >(pSprm[1 + mnDelta] + aSprm.nLen);
+ nL = static_cast< sal_uInt16 >(pSprm[1 + mnDelta] + aSprm.nLen);
break;
case L_VAR2:
// Variable 2-Byte Length?
// Excl. Token + Var-Lengthbyte
- nL = static_cast< USHORT >(SVBT16ToShort( &pSprm[1 + mnDelta] ) + aSprm.nLen - 1);
+ nL = static_cast< sal_uInt16 >(SVBT16ToShort( &pSprm[1 + mnDelta] ) + aSprm.nLen - 1);
break;
default:
OSL_ENSURE(!this, "Unknown sprm varient");
@@ -7361,11 +7361,11 @@ USHORT wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
}
// one or two bytes at the beginning at the sprm id
-USHORT wwSprmParser::GetSprmId(const sal_uInt8* pSp) const
+sal_uInt16 wwSprmParser::GetSprmId(const sal_uInt8* pSp) const
{
ASSERT_RET_ON_FAIL(pSp, "Why GetSprmId with pSp of 0", 0);
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if (ww::IsSevenMinus(meVersion))
{
@@ -7384,17 +7384,17 @@ USHORT wwSprmParser::GetSprmId(const sal_uInt8* pSp) const
}
// with tokens and length byte
-USHORT wwSprmParser::GetSprmSize(sal_uInt16 nId, const sal_uInt8* pSprm) const
+sal_uInt16 wwSprmParser::GetSprmSize(sal_uInt16 nId, const sal_uInt8* pSprm) const
{
return GetSprmTailLen(nId, pSprm) + 1 + mnDelta + SprmDataOfs(nId);
}
-BYTE wwSprmParser::SprmDataOfs(USHORT nId) const
+sal_uInt8 wwSprmParser::SprmDataOfs(sal_uInt16 nId) const
{
return GetSprmInfo(nId).nVari;
}
-USHORT wwSprmParser::DistanceToData(USHORT nId) const
+sal_uInt16 wwSprmParser::DistanceToData(sal_uInt16 nId) const
{
return 1 + mnDelta + SprmDataOfs(nId);
}
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 897938b39033..96300f4fbe5a 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -115,7 +115,7 @@ class wwSprmParser
{
private:
ww::WordVersion meVersion;
- BYTE mnDelta;
+ sal_uInt8 mnDelta;
const wwSprmSearcher *mpKnownSprms;
static const wwSprmSearcher* GetWW8SprmSearcher();
static const wwSprmSearcher* GetWW6SprmSearcher();
@@ -123,7 +123,7 @@ private:
SprmInfo GetSprmInfo(sal_uInt16 nId) const;
- BYTE SprmDataOfs(sal_uInt16 nId) const;
+ sal_uInt8 SprmDataOfs(sal_uInt16 nId) const;
enum SprmType {L_FIX=0, L_VAR=1, L_VAR2=2};
public:
@@ -132,15 +132,15 @@ public:
/// Return the SPRM id at the beginning of this byte sequence
sal_uInt16 GetSprmId(const sal_uInt8* pSp) const;
- USHORT GetSprmSize(sal_uInt16 nId, const sal_uInt8* pSprm) const;
+ sal_uInt16 GetSprmSize(sal_uInt16 nId, const sal_uInt8* pSprm) const;
/// Get known len of a sprms head, the bytes of the sprm id + any bytes
/// reserved to hold a variable length
- USHORT DistanceToData(sal_uInt16 nId) const;
+ sal_uInt16 DistanceToData(sal_uInt16 nId) const;
/// Get len of a sprms data area, ignoring the bytes of the sprm id and
/// ignoring any len bytes. Reports the remaining data after those bytes
- USHORT GetSprmTailLen(sal_uInt16 nId, const sal_uInt8 * pSprm) const;
+ sal_uInt16 GetSprmTailLen(sal_uInt16 nId, const sal_uInt8 * pSprm) const;
/// The minimum acceptable sprm len possible for this type of parser
int MinSprmLen() const { return (IsSevenMinus(meVersion)) ? 2 : 3; }
@@ -164,7 +164,7 @@ String WW8ReadPString( SvStream& rStrm, rtl_TextEncoding eEnc,
exactly ONE byte is skipped If nChars is set then that number of characters
(not bytes) is read, if its not set, the first character read is the length
*/
-String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1);
+String WW8Read_xstz(SvStream& rStrm, sal_uInt16 nChars, bool bAtEndSeekRel1);
/**
reads array of strings (see MS documentation: STring TaBle stored in File)
@@ -172,8 +172,8 @@ String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1);
attention: the *extra data* of each string are SKIPPED and ignored
*/
-void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
- USHORT nExtraLen, rtl_TextEncoding eCS, ::std::vector<String> &rArray,
+void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen,
+ sal_uInt16 nExtraLen, rtl_TextEncoding eCS, ::std::vector<String> &rArray,
::std::vector<ww::bytes>* pExtraArray = 0, ::std::vector<String>* pValueArray = 0);
struct WW8FieldDesc
@@ -183,16 +183,16 @@ struct WW8FieldDesc
WW8_CP nLCode; ///< Laenge
WW8_CP nSRes; ///< Anfang Ergebnis
WW8_CP nLRes; ///< Laenge ( == 0, falls kein Ergebnis )
- USHORT nId; ///< WW-Id fuer Felder
- BYTE nOpt; ///< WW-Flags ( z.B.: vom User geaendert )
- BYTE bCodeNest:1; ///< Befehl rekursiv verwendet
- BYTE bResNest:1; ///< Befehl in Resultat eingefuegt
+ sal_uInt16 nId; ///< WW-Id fuer Felder
+ sal_uInt8 nOpt; ///< WW-Flags ( z.B.: vom User geaendert )
+ sal_uInt8 bCodeNest:1; ///< Befehl rekursiv verwendet
+ sal_uInt8 bResNest:1; ///< Befehl in Resultat eingefuegt
};
struct WW8PLCFxSave1
{
- ULONG nPLCFxPos;
- ULONG nPLCFxPos2; ///< fuer PLCF_Cp_Fkp: PieceIter-Pos
+ sal_uLong nPLCFxPos;
+ sal_uLong nPLCFxPos2; ///< fuer PLCF_Cp_Fkp: PieceIter-Pos
long nPLCFxMemOfs;
WW8_CP nStartCp; ///< for cp based iterator like PAP and CHP
long nCpOfs;
@@ -209,8 +209,8 @@ struct WW8PLCFxSave1
class WW8PLCFspecial // Iterator fuer PLCFs
{
private:
- INT32* pPLCF_PosArray; ///< Pointer auf Pos-Array und auf ganze Struktur
- BYTE* pPLCF_Contents; ///< Pointer auf Inhalts-Array-Teil des Pos-Array
+ sal_Int32* pPLCF_PosArray; ///< Pointer auf Pos-Array und auf ganze Struktur
+ sal_uInt8* pPLCF_Contents; ///< Pointer auf Inhalts-Array-Teil des Pos-Array
long nIMax; ///< Anzahl der Elemente
long nIdx; ///< Merker, wo wir gerade sind
long nStru;
@@ -224,7 +224,7 @@ public:
bool SeekPos(long nPos); // geht ueber FC- bzw. CP-Wert
// bzw. naechste groesseren Wert
bool SeekPosExact(long nPos);
- INT32 Where() const
+ sal_Int32 Where() const
{ return ( nIdx >= nIMax ) ? SAL_MAX_INT32 : pPLCF_PosArray[nIdx]; }
bool Get(WW8_CP& rStart, void*& rpValue) const;
bool GetData(long nIdx, WW8_CP& rPos, void*& rpValue) const;
@@ -234,7 +234,7 @@ public:
return ( nInIdx >= nIMax ) ? 0
: (const void*)&pPLCF_Contents[nInIdx * nStru];
}
- INT32 GetPos( long nInIdx ) const
+ sal_Int32 GetPos( long nInIdx ) const
{ return ( nInIdx >= nIMax ) ? SAL_MAX_INT32 : pPLCF_PosArray[nInIdx]; }
WW8PLCFspecial& operator ++( int ) { nIdx++; return *this; }
@@ -247,24 +247,24 @@ class WW8SprmIter
private:
const wwSprmParser &mrSprmParser;
// these members will be updated
- const BYTE* pSprms; // remaining part of the SPRMs ( == start of akt. SPRM)
- const BYTE* pAktParams; // start of akt. SPRM's parameters
- USHORT nAktId;
- USHORT nAktSize;
+ const sal_uInt8* pSprms; // remaining part of the SPRMs ( == start of akt. SPRM)
+ const sal_uInt8* pAktParams; // start of akt. SPRM's parameters
+ sal_uInt16 nAktId;
+ sal_uInt16 nAktSize;
long nRemLen; // length of remaining SPRMs (including akt. SPRM)
void UpdateMyMembers();
public:
- explicit WW8SprmIter( const BYTE* pSprms_, long nLen_,
+ explicit WW8SprmIter( const sal_uInt8* pSprms_, long nLen_,
const wwSprmParser &rSprmParser);
- void SetSprms( const BYTE* pSprms_, long nLen_ );
- const BYTE* FindSprm(USHORT nId);
+ void SetSprms( const sal_uInt8* pSprms_, long nLen_ );
+ const sal_uInt8* FindSprm(sal_uInt16 nId);
void advance();
- const BYTE* GetSprms() const
+ const sal_uInt8* GetSprms() const
{ return ( pSprms && (0 < nRemLen) ) ? pSprms : 0; }
- const BYTE* GetAktParams() const { return pAktParams; }
- USHORT GetAktId() const { return nAktId; }
+ const sal_uInt8* GetAktParams() const { return pAktParams; }
+ sal_uInt16 GetAktId() const { return nAktId; }
private:
//No copying
WW8SprmIter(const WW8SprmIter&);
@@ -276,40 +276,40 @@ class WW8PLCF // Iterator fuer PLCFs
{
private:
WW8_CP* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
- BYTE* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
- INT32 nIMax; // Anzahl der Elemente
- INT32 nIdx;
+ sal_uInt8* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
+ sal_Int32 nIMax; // Anzahl der Elemente
+ sal_Int32 nIdx;
int nStru;
- void ReadPLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF );
+ void ReadPLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF );
/*
Falls im Dok ein PLC fehlt und die FKPs solo dastehen,
machen wir uns hiermit einen PLC:
*/
- void GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN );
+ void GeneratePLCF( SvStream* pSt, sal_Int32 nPN, sal_Int32 ncpN );
void MakeFailedPLCF();
public:
- WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
+ WW8PLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
WW8_CP nStartPos = -1 );
/*
folgender Ctor generiert ggfs. einen PLC aus nPN und ncpN
*/
- WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
- WW8_CP nStartPos, INT32 nPN, INT32 ncpN );
+ WW8PLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
+ WW8_CP nStartPos, sal_Int32 nPN, sal_Int32 ncpN );
~WW8PLCF(){ delete[] pPLCF_PosArray; }
- INT32 GetIdx() const { return nIdx; }
- void SetIdx( INT32 nI ) { nIdx = nI; }
- INT32 GetIMax() const { return nIMax; }
+ sal_Int32 GetIdx() const { return nIdx; }
+ void SetIdx( sal_Int32 nI ) { nIdx = nI; }
+ sal_Int32 GetIMax() const { return nIMax; }
bool SeekPos(WW8_CP nPos);
WW8_CP Where() const;
bool Get(WW8_CP& rStart, WW8_CP& rEnd, void*& rpValue) const;
WW8PLCF& operator ++( int ) { if( nIdx < nIMax ) nIdx++; return *this; }
- const void* GetData( INT32 nInIdx ) const
+ const void* GetData( sal_Int32 nInIdx ) const
{
return ( nInIdx >= nIMax ) ? 0 :
(const void*)&pPLCF_Contents[nInIdx * nStru];
@@ -320,8 +320,8 @@ public:
class WW8PLCFpcd
{
friend class WW8PLCFpcd_Iter;
- INT32* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
- BYTE* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
+ sal_Int32* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
+ sal_uInt8* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
long nIMax;
long nStru;
public:
@@ -345,7 +345,7 @@ public:
void SetIdx( long nI ) { nIdx = nI; }
long GetIMax() const { return rPLCF.nIMax; }
bool SeekPos(long nPos);
- INT32 Where() const;
+ sal_Int32 Where() const;
bool Get(WW8_CP& rStart, WW8_CP& rEnd, void*& rpValue) const;
WW8PLCFpcd_Iter& operator ++( int )
{
@@ -380,16 +380,16 @@ public:
: meVer(eVersion), bIsSprm(bSprm), bDirty(false) {}
virtual ~WW8PLCFx() {}
bool IsSprm() const { return bIsSprm; }
- virtual ULONG GetIdx() const = 0;
- virtual void SetIdx( ULONG nIdx ) = 0;
- virtual ULONG GetIdx2() const;
- virtual void SetIdx2( ULONG nIdx );
+ virtual sal_uLong GetIdx() const = 0;
+ virtual void SetIdx( sal_uLong nIdx ) = 0;
+ virtual sal_uLong GetIdx2() const;
+ virtual void SetIdx2( sal_uLong nIdx );
virtual bool SeekPos(WW8_CP nCpPos) = 0;
virtual WW8_FC Where() = 0;
virtual void GetSprms( WW8PLCFxDesc* p );
virtual long GetNoSprms( WW8_CP& rStart, WW8_CP&, sal_Int32& rLen );
virtual WW8PLCFx& operator ++( int ) = 0;
- virtual USHORT GetIstd() const { return 0xffff; }
+ virtual sal_uInt16 GetIstd() const { return 0xffff; }
virtual void Save( WW8PLCFxSave1& rSave ) const;
virtual void Restore( const WW8PLCFxSave1& rSave );
ww::WordVersion GetFIBVersion() const { return meVer; }
@@ -404,10 +404,10 @@ class WW8PLCFx_PCDAttrs : public WW8PLCFx
private:
WW8PLCFpcd_Iter* pPcdI;
WW8PLCFx_PCD* pPcd;
- BYTE** const pGrpprls; // Attribute an Piece-Table
+ sal_uInt8** const pGrpprls; // Attribute an Piece-Table
SVBT32 aShortSprm; // mini storage: can contain ONE sprm with
// 1 byte param
- UINT16 nGrpprls; // Attribut Anzahl davon
+ sal_uInt16 nGrpprls; // Attribut Anzahl davon
//No copying
WW8PLCFx_PCDAttrs(const WW8PLCFx_PCDAttrs&);
@@ -415,8 +415,8 @@ private:
public:
WW8PLCFx_PCDAttrs(ww::WordVersion eVersion, WW8PLCFx_PCD* pPLCFx_PCD,
const WW8ScannerBase* pBase );
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nI );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nI );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
virtual void GetSprms( WW8PLCFxDesc* p );
@@ -439,9 +439,9 @@ public:
WW8PLCFx_PCD(ww::WordVersion eVersion, WW8PLCFpcd* pPLCFpcd,
WW8_CP nStartCp, bool bVer67P);
virtual ~WW8PLCFx_PCD();
- virtual ULONG GetIMax() const;
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nI );
+ virtual sal_uLong GetIMax() const;
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nI );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
virtual long GetNoSprms( WW8_CP& rStart, WW8_CP&, sal_Int32& rLen );
@@ -454,7 +454,7 @@ public:
void SetClipStart(WW8_CP nIn) { nClipStart = nIn; }
WW8_CP GetClipStart() { return nClipStart; }
- static INT32 TransformPieceAddress(long nfc, bool& bIsUnicodeAddress)
+ static sal_Int32 TransformPieceAddress(long nfc, bool& bIsUnicodeAddress)
{
bIsUnicodeAddress = 0 == (0x40000000 & nfc);
return bIsUnicodeAddress ? nfc : (nfc & 0x3fffFFFF) / 2;
@@ -520,20 +520,20 @@ public:
mnIdx++;
return *this;
}
- BYTE* Get( WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen ) const;
+ sal_uInt8* Get( WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen ) const;
sal_uInt16 GetIstd() const { return maEntries[mnIdx].mnIStd; }
/*
liefert einen echten Pointer auf das Sprm vom Typ nId,
falls ein solches im Fkp drin ist.
*/
- BYTE* GetLenAndIStdAndSprms(sal_Int32& rLen) const;
+ sal_uInt8* GetLenAndIStdAndSprms(sal_Int32& rLen) const;
/*
ruft GetLenAndIStdAndSprms() auf...
*/
- const BYTE* HasSprm( USHORT nId );
- bool HasSprm(USHORT nId, std::vector<const BYTE *> &rResult);
+ const sal_uInt8* HasSprm( sal_uInt16 nId );
+ bool HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult);
const wwSprmParser &GetSprmParser() const { return maSprmParser; }
};
@@ -571,16 +571,16 @@ public:
WW8PLCFx_Fc_FKP( SvStream* pSt, SvStream* pTblSt, SvStream* pDataSt,
const WW8Fib& rFib, ePLCFT ePl, WW8_FC nStartFcL );
virtual ~WW8PLCFx_Fc_FKP();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nIdx );
virtual bool SeekPos(WW8_FC nFcPos);
virtual WW8_FC Where();
- BYTE* GetSprmsAndPos( WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen );
+ sal_uInt8* GetSprmsAndPos( WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen );
virtual WW8PLCFx& operator ++( int );
- virtual USHORT GetIstd() const;
+ virtual sal_uInt16 GetIstd() const;
void GetPCDSprms( WW8PLCFxDesc& rDesc );
- const BYTE* HasSprm( USHORT nId );
- bool HasSprm(USHORT nId, std::vector<const BYTE *> &rResult);
+ const sal_uInt8* HasSprm( sal_uInt16 nId );
+ bool HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult);
bool HasFkp() const { return (0 != pFkp); }
};
@@ -592,8 +592,8 @@ private:
WW8PLCFx_PCD* pPcd;
WW8PLCFpcd_Iter *pPieceIter;
WW8_CP nAttrStart, nAttrEnd;
- BYTE bLineEnd : 1;
- BYTE bComplex : 1;
+ sal_uInt8 bLineEnd : 1;
+ sal_uInt8 bComplex : 1;
//No copying
WW8PLCFx_Cp_FKP(const WW8PLCFx_Cp_FKP&);
@@ -603,11 +603,11 @@ public:
const WW8ScannerBase& rBase, ePLCFT ePl );
virtual ~WW8PLCFx_Cp_FKP();
void ResetAttrStartEnd();
- ULONG GetPCDIMax() const;
- ULONG GetPCDIdx() const;
- void SetPCDIdx( ULONG nIdx );
- virtual ULONG GetIdx2() const;
- virtual void SetIdx2( ULONG nIdx );
+ sal_uLong GetPCDIMax() const;
+ sal_uLong GetPCDIdx() const;
+ void SetPCDIdx( sal_uLong nIdx );
+ virtual sal_uLong GetIdx2() const;
+ virtual void SetIdx2( sal_uLong nIdx );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_CP Where();
virtual void GetSprms( WW8PLCFxDesc* p );
@@ -623,9 +623,9 @@ private:
wwSprmParser maSprmParser;
SvStream* pStrm;
WW8PLCF* pPLCF;
- BYTE* pSprms;
- USHORT nArrMax;
- UINT16 nSprmSiz;
+ sal_uInt8* pSprms;
+ sal_uInt16 nArrMax;
+ sal_uInt16 nSprmSiz;
//no copying
WW8PLCFx_SEPX(const WW8PLCFx_SEPX&);
@@ -634,19 +634,19 @@ public:
WW8PLCFx_SEPX( SvStream* pSt, SvStream* pTblxySt, const WW8Fib& rFib,
WW8_CP nStartCp );
virtual ~WW8PLCFx_SEPX();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nIdx );
long GetIMax() const { return ( pPLCF ) ? pPLCF->GetIMax() : 0; }
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
virtual void GetSprms( WW8PLCFxDesc* p );
virtual WW8PLCFx& operator ++( int );
- const BYTE* HasSprm( USHORT nId ) const;
- const BYTE* HasSprm( USHORT nId, BYTE n2nd ) const;
- const BYTE* HasSprm( USHORT nId, const BYTE* pOtherSprms,
+ const sal_uInt8* HasSprm( sal_uInt16 nId ) const;
+ const sal_uInt8* HasSprm( sal_uInt16 nId, sal_uInt8 n2nd ) const;
+ const sal_uInt8* HasSprm( sal_uInt16 nId, const sal_uInt8* pOtherSprms,
long nOtherSprmSiz ) const;
- bool Find4Sprms(USHORT nId1, USHORT nId2, USHORT nId3, USHORT nId4,
- BYTE*& p1, BYTE*& p2, BYTE*& p3, BYTE*& p4 ) const;
+ bool Find4Sprms(sal_uInt16 nId1, sal_uInt16 nId2, sal_uInt16 nId3, sal_uInt16 nId4,
+ sal_uInt8*& p1, sal_uInt8*& p2, sal_uInt8*& p3, sal_uInt8*& p4 ) const;
};
/// Iterator fuer Fuss-/Endnoten und Anmerkungen
@@ -663,8 +663,8 @@ public:
WW8PLCFx_SubDoc(SvStream* pSt, ww::WordVersion eVersion, WW8_CP nStartCp,
long nFcRef, long nLenRef, long nFcTxt, long nLenTxt, long nStruc = 0);
virtual ~WW8PLCFx_SubDoc();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nIdx );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
@@ -693,8 +693,8 @@ private:
public:
WW8PLCFx_FLD(SvStream* pSt, const WW8Fib& rMyFib, short nType);
virtual ~WW8PLCFx_FLD();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nIdx );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
virtual void GetSprms(WW8PLCFxDesc* p);
@@ -714,7 +714,7 @@ private:
::std::vector<String> aBookNames; // Name
eBookStatus* pStatus;
long nIMax; // Number of Booknotes
- USHORT nIsEnd;
+ sal_uInt16 nIsEnd;
int nBookmarkId; // counter incremented by GetUniqueBookmarkName.
//No copying
@@ -724,10 +724,10 @@ public:
WW8PLCFx_Book(SvStream* pTblSt,const WW8Fib& rFib);
virtual ~WW8PLCFx_Book();
long GetIMax() const { return nIMax; }
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nI );
- virtual ULONG GetIdx2() const;
- virtual void SetIdx2( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nI );
+ virtual sal_uLong GetIdx2() const;
+ virtual void SetIdx2( sal_uLong nIdx );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
virtual long GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen );
@@ -738,9 +738,9 @@ public:
long GetLen() const;
bool GetIsEnd() const { return nIsEnd ? true : false; }
long GetHandle() const;
- void SetStatus( USHORT nIndex, eBookStatus eStat );
+ void SetStatus( sal_uInt16 nIndex, eBookStatus eStat );
bool MapName(String& rName);
- String GetBookmark(long nStart,long nEnd, USHORT &nIndex);
+ String GetBookmark(long nStart,long nEnd, sal_uInt16 &nIndex);
eBookStatus GetStatus() const;
String GetUniqueBookmarkName(String &suggestedName);
};
@@ -754,11 +754,11 @@ struct WW8PLCFManResult
long nMemLen; // Laenge dazu
long nCp2OrIdx; // footnote-textpos oder Index in PLCF
WW8_CP nAktCp; // wird nur vom Aufrufer benutzt
- const BYTE* pMemPos;// Mem-Pos fuer Sprms
- USHORT nSprmId; // Sprm-Id ( 0 = ungueltige Id -> ueberspringen! )
+ const sal_uInt8* pMemPos;// Mem-Pos fuer Sprms
+ sal_uInt16 nSprmId; // Sprm-Id ( 0 = ungueltige Id -> ueberspringen! )
// (2..255) oder Pseudo-Sprm-Id (256..260)
// bzw. ab Winword-Ver8 die Sprm-Id (800..)
- BYTE nFlags; // Absatz- oder Section-Anfang
+ sal_uInt8 nFlags; // Absatz- oder Section-Anfang
};
enum ManMaskTypes
@@ -779,8 +779,8 @@ enum ManTypes // enums for PLCFMan-ctor
struct WW8PLCFxDesc
{
WW8PLCFx* pPLCFx;
- ::std::stack<USHORT>* pIdStk; // Speicher fuer Attr-Id fuer Attr-Ende(n)
- const BYTE* pMemPos;// wo liegen die Sprm(s)
+ ::std::stack<sal_uInt16>* pIdStk; // Speicher fuer Attr-Id fuer Attr-Ende(n)
+ const sal_uInt8* pMemPos;// wo liegen die Sprm(s)
long nOrigSprmsLen;
WW8_CP nStartPos;
@@ -825,7 +825,7 @@ private:
WW8_CP nLineEnd; // zeigt *hinter* das <CR>
long nLastWhereIdxCp; // last result of WhereIdx()
- USHORT nPLCF; // so viele PLCFe werden verwaltet
+ sal_uInt16 nPLCF; // so viele PLCFe werden verwaltet
ManTypes nManType;
bool mbDoingDrawTextBox; //Normally we adjust the end of attributes
//so that the end of a paragraph occurs
@@ -836,11 +836,11 @@ private:
WW8PLCFxDesc *pChp, *pPap, *pSep, *pFld, *pFtn, *pEdn, *pBkm, *pPcd,
*pPcdA, *pAnd;
WW8PLCFspecial *pFdoa, *pTxbx, *pTxbxBkd,*pMagicTables, *pSubdocs;
- BYTE* pExtendedAtrds;
+ sal_uInt8* pExtendedAtrds;
const WW8Fib* pWwFib;
- USHORT WhereIdx(bool* pbStart=0, long* pPos=0) const;
+ sal_uInt16 WhereIdx(bool* pbStart=0, long* pPos=0) const;
void AdjustEnds(WW8PLCFxDesc& rDesc);
void GetNewSprms(WW8PLCFxDesc& rDesc);
void GetNewNoSprms(WW8PLCFxDesc& rDesc);
@@ -850,7 +850,7 @@ private:
void GetNoSprmEnd(short nIdx, WW8PLCFManResult* pRes) const;
void AdvSprm(short nIdx, bool bStart);
void AdvNoSprm(short nIdx, bool bStart);
- USHORT GetId(const WW8PLCFxDesc* p ) const;
+ sal_uInt16 GetId(const WW8PLCFxDesc* p ) const;
public:
WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
bool bDoingDrawTextBox = false);
@@ -864,7 +864,7 @@ public:
bool Get(WW8PLCFManResult* pResult) const;
WW8PLCFMan& operator ++( int );
- USHORT GetColl() const; // index of actual Style
+ sal_uInt16 GetColl() const; // index of actual Style
WW8PLCFx_FLD* GetFld() const;
WW8PLCFx_SubDoc* GetEdn() const { return (WW8PLCFx_SubDoc*)pEdn->pPLCFx; }
WW8PLCFx_SubDoc* GetFtn() const { return (WW8PLCFx_SubDoc*)pFtn->pPLCFx; }
@@ -873,11 +873,11 @@ public:
long GetCpOfs() const { return pChp->nCpOfs; } // for Header/Footer...
/* fragt, ob *aktueller Absatz* einen Sprm diesen Typs hat */
- const BYTE* HasParaSprm( USHORT nId ) const;
+ const sal_uInt8* HasParaSprm( sal_uInt16 nId ) const;
/* fragt, ob *aktueller Textrun* einen Sprm diesen Typs hat */
- const BYTE* HasCharSprm( USHORT nId ) const;
- bool HasCharSprm(USHORT nId, std::vector<const BYTE *> &rResult) const;
+ const sal_uInt8* HasCharSprm( sal_uInt16 nId ) const;
+ bool HasCharSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult) const;
WW8PLCFx_Cp_FKP* GetChpPLCF() const
{ return (WW8PLCFx_Cp_FKP*)pChp->pPLCFx; }
@@ -886,7 +886,7 @@ public:
WW8PLCFx_SEPX* GetSepPLCF() const
{ return (WW8PLCFx_SEPX*)pSep->pPLCFx; }
WW8PLCFxDesc* GetPap() const { return pPap; }
- bool TransferOpenSprms(std::stack<USHORT> &rStack);
+ bool TransferOpenSprms(std::stack<sal_uInt16> &rStack);
void SeekPos( long nNewCp );
void SaveAllPLCFx( WW8PLCFxSaveAll& rSave ) const;
void RestoreAllPLCFx( const WW8PLCFxSaveAll& rSave );
@@ -895,7 +895,7 @@ public:
WW8PLCFspecial* GetTxbxBkd() const { return pTxbxBkd; }
WW8PLCFspecial* GetMagicTables() const { return pMagicTables; }
WW8PLCFspecial* GetWkbPLCF() const { return pSubdocs; }
- BYTE* GetExtendedAtrds() const { return pExtendedAtrds; }
+ sal_uInt8* GetExtendedAtrds() const { return pExtendedAtrds; }
ManTypes GetManType() const { return nManType; }
bool GetDoingDrawTextBox() const { return mbDoingDrawTextBox; }
};
@@ -943,15 +943,15 @@ private:
WW8PLCFspecial* pHdFtTxbxBkd; // Break-Deskriptoren fuer diese
WW8PLCFspecial* pMagicTables; // Break-Deskriptoren fuer diese
WW8PLCFspecial* pSubdocs; // subdoc references in master document
- BYTE* pExtendedAtrds; // Extended ATRDs
+ sal_uInt8* pExtendedAtrds; // Extended ATRDs
WW8PLCFx_Book* pBook; // Bookmarks
WW8PLCFpcd* pPiecePLCF; // fuer FastSave ( Basis-PLCF ohne Iterator )
WW8PLCFpcd_Iter* pPieceIter; // fuer FastSave ( Iterator dazu )
WW8PLCFx_PCD* pPLCFx_PCD; // dito
WW8PLCFx_PCDAttrs* pPLCFx_PCDAttrs;
- BYTE** pPieceGrpprls; // Attribute an Piece-Table
- UINT16 nPieceGrpprls; // Anzahl davon
+ sal_uInt8** pPieceGrpprls; // Attribute an Piece-Table
+ sal_uInt16 nPieceGrpprls; // Anzahl davon
WW8PLCFpcd* OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF );
void DeletePieceTable();
@@ -995,17 +995,17 @@ public:
7 == "only WinWord 95"
8 == "WinWord 97 or newer"
*/
- BYTE nVersion;
+ sal_uInt8 nVersion;
/*
error status
*/
- ULONG nFibError;
+ sal_uLong nFibError;
/*
vom Ctor aus dem FIB gelesene Daten
(entspricht nur ungefaehr der tatsaechlichen Struktur
des Winword-FIB)
*/
- UINT16 wIdent; // 0x0 int magic number
+ sal_uInt16 wIdent; // 0x0 int magic number
/*
File Information Block (FIB) values:
WinWord 1.0 = 33
@@ -1019,20 +1019,20 @@ public:
Word 2003 = 268
Word 2007 = 274
*/
- UINT16 nFib; // 0x2 FIB version written
- UINT16 nProduct; // 0x4 product version written by
- INT16 lid; // 0x6 language stamp---localized version;
+ sal_uInt16 nFib; // 0x2 FIB version written
+ sal_uInt16 nProduct; // 0x4 product version written by
+ sal_Int16 lid; // 0x6 language stamp---localized version;
WW8_PN pnNext; // 0x8
- UINT16 fDot :1; // 0xa 0001
- UINT16 fGlsy :1;
- UINT16 fComplex :1; // 0004 when 1, file is in complex, fast-saved format.
- UINT16 fHasPic :1; // 0008 file contains 1 or more pictures
- UINT16 cQuickSaves :4; // 00F0 count of times file was quicksaved
- UINT16 fEncrypted :1; //0100 1 if file is encrypted, 0 if not
- UINT16 fWhichTblStm :1; //0200 When 0, this fib refers to the table stream
- UINT16 fReadOnlyRecommended :1;
- UINT16 fWriteReservation :1;
+ sal_uInt16 fDot :1; // 0xa 0001
+ sal_uInt16 fGlsy :1;
+ sal_uInt16 fComplex :1; // 0004 when 1, file is in complex, fast-saved format.
+ sal_uInt16 fHasPic :1; // 0008 file contains 1 or more pictures
+ sal_uInt16 cQuickSaves :4; // 00F0 count of times file was quicksaved
+ sal_uInt16 fEncrypted :1; //0100 1 if file is encrypted, 0 if not
+ sal_uInt16 fWhichTblStm :1; //0200 When 0, this fib refers to the table stream
+ sal_uInt16 fReadOnlyRecommended :1;
+ sal_uInt16 fWriteReservation :1;
// named "0Table", when 1, this fib refers to the
// table stream named "1Table". Normally, a file
// will have only one table stream, but under unusual
@@ -1040,55 +1040,55 @@ public:
// both names. In that case, this flag must be used
// to decide which table stream is valid.
- UINT16 fExtChar :1; // 1000 =1, when using extended character set in file
- UINT16 fFarEast :1; // 4000 =1, probably, when far-East language vaiants of Word is used to create a file #i90932#
+ sal_uInt16 fExtChar :1; // 1000 =1, when using extended character set in file
+ sal_uInt16 fFarEast :1; // 4000 =1, probably, when far-East language vaiants of Word is used to create a file #i90932#
- UINT16 fObfuscated :1; // 8000=1. specifies whether the document is obfuscated using XOR obfuscation. otherwise this bit MUST be ignored.
+ sal_uInt16 fObfuscated :1; // 8000=1. specifies whether the document is obfuscated using XOR obfuscation. otherwise this bit MUST be ignored.
- UINT16 nFibBack; // 0xc
- UINT16 nHash; // 0xe file encrypted hash
- UINT16 nKey; // 0x10 file encrypted key
- UINT8 envr; // 0x12 environment in which file was created
+ sal_uInt16 nFibBack; // 0xc
+ sal_uInt16 nHash; // 0xe file encrypted hash
+ sal_uInt16 nKey; // 0x10 file encrypted key
+ sal_uInt8 envr; // 0x12 environment in which file was created
// 0 created by Win Word / 1 created by Mac Word
- BYTE fMac :1; // 0x13 when 1, this file was last saved in the Mac environment
- BYTE fEmptySpecial :1;
- BYTE fLoadOverridePage :1;
- BYTE fFuturesavedUndo :1;
- BYTE fWord97Saved :1;
- BYTE fWord2000Saved :1;
- BYTE :2;
-
- UINT16 chse; // 0x14 default extended character set id for text in document stream. (overidden by chp.chse)
+ sal_uInt8 fMac :1; // 0x13 when 1, this file was last saved in the Mac environment
+ sal_uInt8 fEmptySpecial :1;
+ sal_uInt8 fLoadOverridePage :1;
+ sal_uInt8 fFuturesavedUndo :1;
+ sal_uInt8 fWord97Saved :1;
+ sal_uInt8 fWord2000Saved :1;
+ sal_uInt8 :2;
+
+ sal_uInt16 chse; // 0x14 default extended character set id for text in document stream. (overidden by chp.chse)
// 0 = ANSI / 256 Macintosh character set.
- UINT16 chseTables; // 0x16 default extended character set id for text in
+ sal_uInt16 chseTables; // 0x16 default extended character set id for text in
// internal data structures: 0 = ANSI, 256 = Macintosh
WW8_FC fcMin; // 0x18 file offset of first character of text
WW8_FC fcMac; // 0x1c file offset of last character of text + 1
// Einschub fuer WW8 *****************************************************
- UINT16 csw; // Count of fields in the array of "shorts"
+ sal_uInt16 csw; // Count of fields in the array of "shorts"
// Marke: "rgsw" Beginning of the array of shorts
- UINT16 wMagicCreated; // unique number Identifying the File's creator
+ sal_uInt16 wMagicCreated; // unique number Identifying the File's creator
// 0x6A62 is the creator ID for Word and is reserved.
// Other creators should choose a different value.
- UINT16 wMagicRevised; // identifies the File's last modifier
- UINT16 wMagicCreatedPrivate; // private data
- UINT16 wMagicRevisedPrivate; // private data
+ sal_uInt16 wMagicRevised; // identifies the File's last modifier
+ sal_uInt16 wMagicCreatedPrivate; // private data
+ sal_uInt16 wMagicRevisedPrivate; // private data
/*
- INT16 pnFbpChpFirst_W6; // not used
- INT16 pnChpFirst_W6; // not used
- INT16 cpnBteChp_W6; // not used
- INT16 pnFbpPapFirst_W6; // not used
- INT16 pnPapFirst_W6; // not used
- INT16 cpnBtePap_W6; // not used
- INT16 pnFbpLvcFirst_W6; // not used
- INT16 pnLvcFirst_W6; // not used
- INT16 cpnBteLvc_W6; // not used
+ sal_Int16 pnFbpChpFirst_W6; // not used
+ sal_Int16 pnChpFirst_W6; // not used
+ sal_Int16 cpnBteChp_W6; // not used
+ sal_Int16 pnFbpPapFirst_W6; // not used
+ sal_Int16 pnPapFirst_W6; // not used
+ sal_Int16 cpnBtePap_W6; // not used
+ sal_Int16 pnFbpLvcFirst_W6; // not used
+ sal_Int16 pnLvcFirst_W6; // not used
+ sal_Int16 cpnBteLvc_W6; // not used
*/
- INT16 lidFE; // Language id if document was written by Far East version
+ sal_Int16 lidFE; // Language id if document was written by Far East version
// of Word (i.e. FIB.fFarEast is on)
- UINT16 clw; // Number of fields in the array of longs
+ sal_uInt16 clw; // Number of fields in the array of longs
// Ende des Einschubs fuer WW8 *******************************************
@@ -1106,7 +1106,7 @@ public:
WW8_CP ccpHdrTxbx; // 0x50 length of header textbox subdocument text stream
// Einschub fuer WW8 *****************************************************
- INT32 pnFbpChpFirst; // when there was insufficient memory for Word to expand
+ sal_Int32 pnFbpChpFirst; // when there was insufficient memory for Word to expand
// the PLCFbte at save time, the PLCFbte is written
// to the file in a linked list of 512-byte pieces
// starting with this pn.
@@ -1114,13 +1114,13 @@ public:
// folgende Felder existieren zwar so in der Datei,
// wir benutzen jedoch unten deklarierte General-Variablen
// fuer Ver67 und Ver8 gemeinsam.
- INT32 pnChpFirst; // the page number of the lowest numbered page in the
+ sal_Int32 pnChpFirst; // the page number of the lowest numbered page in the
// document that records CHPX FKP information
- INT32 cpnBteChp; // count of CHPX FKPs recorded in file. In non-complex
+ sal_Int32 cpnBteChp; // count of CHPX FKPs recorded in file. In non-complex
// files if the number of entries in the PLCFbteChpx
// is less than this, the PLCFbteChpx is incomplete.
*/
- INT32 pnFbpPapFirst; // when there was insufficient memory for Word to expand
+ sal_Int32 pnFbpPapFirst; // when there was insufficient memory for Word to expand
// the PLCFbte at save time, the PLCFbte is written to
// the file in a linked list of 512-byte pieces
// starting with this pn
@@ -1128,24 +1128,24 @@ public:
// folgende Felder existieren zwar so in der Datei,
// wir benutzen jedoch unten deklarierte General-Variablen
// fuer Ver67 und Ver8 gemeinsam.
- INT32 pnPapFirst; // the page number of the lowest numbered page in the
+ sal_Int32 pnPapFirst; // the page number of the lowest numbered page in the
// document that records PAPX FKP information
- INT32 cpnBtePap; // count of PAPX FKPs recorded in file. In non-complex
+ sal_Int32 cpnBtePap; // count of PAPX FKPs recorded in file. In non-complex
// files if the number of entries in the PLCFbtePapx is
// less than this, the PLCFbtePapx is incomplete.
*/
- INT32 pnFbpLvcFirst; // when there was insufficient memory for Word to expand
+ sal_Int32 pnFbpLvcFirst; // when there was insufficient memory for Word to expand
// the PLCFbte at save time, the PLCFbte is written to
// the file in a linked list of 512-byte pieces
// starting with this pn
- INT32 pnLvcFirst; // the page number of the lowest numbered page in the
+ sal_Int32 pnLvcFirst; // the page number of the lowest numbered page in the
// document that records LVC FKP information
- INT32 cpnBteLvc; // count of LVC FKPs recorded in file. In non-complex
+ sal_Int32 cpnBteLvc; // count of LVC FKPs recorded in file. In non-complex
// files if the number of entries in the PLCFbtePapx is
// less than this, the PLCFbtePapx is incomplete.
- INT32 fcIslandFirst; // ?
- INT32 fcIslandLim; // ?
- UINT16 cfclcb; // Number of fields in the array of FC/LCB pairs.
+ sal_Int32 fcIslandFirst; // ?
+ sal_Int32 fcIslandLim; // ?
+ sal_uInt16 cfclcb; // Number of fields in the array of FC/LCB pairs.
// Ende des Einschubs fuer WW8 *******************************************
@@ -1153,105 +1153,105 @@ public:
WW8_FC fcStshfOrig; // file offset of original allocation for STSH in table
// stream. During fast save Word will attempt to reuse
// this allocation if STSH is small enough to fit.
- INT32 lcbStshfOrig; // 0x5c count of bytes of original STSH allocation
+ sal_Int32 lcbStshfOrig; // 0x5c count of bytes of original STSH allocation
WW8_FC fcStshf; // 0x60 file offset of STSH in file.
- INT32 lcbStshf; // 0x64 count of bytes of current STSH allocation
+ sal_Int32 lcbStshf; // 0x64 count of bytes of current STSH allocation
WW8_FC fcPlcffndRef; // 0x68 file offset of footnote reference PLCF.
- INT32 lcbPlcffndRef; // 0x6c count of bytes of footnote reference PLCF
+ sal_Int32 lcbPlcffndRef; // 0x6c count of bytes of footnote reference PLCF
// == 0 if no footnotes defined in document.
WW8_FC fcPlcffndTxt; // 0x70 file offset of footnote text PLCF.
- INT32 lcbPlcffndTxt; // 0x74 count of bytes of footnote text PLCF.
+ sal_Int32 lcbPlcffndTxt; // 0x74 count of bytes of footnote text PLCF.
// == 0 if no footnotes defined in document
WW8_FC fcPlcfandRef; // 0x78 file offset of annotation reference PLCF.
- INT32 lcbPlcfandRef; // 0x7c count of bytes of annotation reference PLCF.
+ sal_Int32 lcbPlcfandRef; // 0x7c count of bytes of annotation reference PLCF.
WW8_FC fcPlcfandTxt; // 0x80 file offset of annotation text PLCF.
- INT32 lcbPlcfandTxt; // 0x84 count of bytes of the annotation text PLCF
+ sal_Int32 lcbPlcfandTxt; // 0x84 count of bytes of the annotation text PLCF
WW8_FC fcPlcfsed; // 8x88 file offset of section descriptor PLCF.
- INT32 lcbPlcfsed; // 0x8c count of bytes of section descriptor PLCF.
+ sal_Int32 lcbPlcfsed; // 0x8c count of bytes of section descriptor PLCF.
WW8_FC fcPlcfpad; // 0x90 file offset of paragraph descriptor PLCF
- INT32 lcbPlcfpad; // 0x94 count of bytes of paragraph descriptor PLCF.
+ sal_Int32 lcbPlcfpad; // 0x94 count of bytes of paragraph descriptor PLCF.
// ==0 if file was never viewed in Outline view.
// Should not be written by third party creators
WW8_FC fcPlcfphe; // 0x98 file offset of PLCF of paragraph heights.
- INT32 lcbPlcfphe; // 0x9c count of bytes of paragraph height PLCF.
+ sal_Int32 lcbPlcfphe; // 0x9c count of bytes of paragraph height PLCF.
// ==0 when file is non-complex.
WW8_FC fcSttbfglsy; // 0xa0 file offset of glossary string table.
- INT32 lcbSttbfglsy; // 0xa4 count of bytes of glossary string table.
+ sal_Int32 lcbSttbfglsy; // 0xa4 count of bytes of glossary string table.
// == 0 for non-glossary documents.
// !=0 for glossary documents.
WW8_FC fcPlcfglsy; // 0xa8 file offset of glossary PLCF.
- INT32 lcbPlcfglsy; // 0xac count of bytes of glossary PLCF.
+ sal_Int32 lcbPlcfglsy; // 0xac count of bytes of glossary PLCF.
// == 0 for non-glossary documents.
// !=0 for glossary documents.
WW8_FC fcPlcfhdd; // 0xb0 byte offset of header PLCF.
- INT32 lcbPlcfhdd; // 0xb4 count of bytes of header PLCF.
+ sal_Int32 lcbPlcfhdd; // 0xb4 count of bytes of header PLCF.
// == 0 if document contains no headers
WW8_FC fcPlcfbteChpx; // 0xb8 file offset of character property bin table.PLCF.
- INT32 lcbPlcfbteChpx;// 0xbc count of bytes of character property bin table PLCF.
+ sal_Int32 lcbPlcfbteChpx;// 0xbc count of bytes of character property bin table PLCF.
WW8_FC fcPlcfbtePapx; // 0xc0 file offset of paragraph property bin table.PLCF.
- INT32 lcbPlcfbtePapx;// 0xc4 count of bytes of paragraph property bin table PLCF.
+ sal_Int32 lcbPlcfbtePapx;// 0xc4 count of bytes of paragraph property bin table PLCF.
WW8_FC fcPlcfsea; // 0xc8 file offset of PLCF reserved for private use. The SEA is 6 bytes long.
- INT32 lcbPlcfsea; // 0xcc count of bytes of private use PLCF.
+ sal_Int32 lcbPlcfsea; // 0xcc count of bytes of private use PLCF.
WW8_FC fcSttbfffn; // 0xd0 file offset of font information STTBF. See the FFN file structure definition.
- INT32 lcbSttbfffn; // 0xd4 count of bytes in sttbfffn.
+ sal_Int32 lcbSttbfffn; // 0xd4 count of bytes in sttbfffn.
WW8_FC fcPlcffldMom; // 0xd8 offset in doc stream to the PLCF of field positions in the main document.
- INT32 lcbPlcffldMom; // 0xdc
+ sal_Int32 lcbPlcffldMom; // 0xdc
WW8_FC fcPlcffldHdr; // 0xe0 offset in doc stream to the PLCF of field positions in the header subdocument.
- INT32 lcbPlcffldHdr; // 0xe4
+ sal_Int32 lcbPlcffldHdr; // 0xe4
WW8_FC fcPlcffldFtn; // 0xe8 offset in doc stream to the PLCF of field positions in the footnote subdocument.
- INT32 lcbPlcffldFtn; // 0xec
+ sal_Int32 lcbPlcffldFtn; // 0xec
WW8_FC fcPlcffldAtn; // 0xf0 offset in doc stream to the PLCF of field positions in the annotation subdocument.
- INT32 lcbPlcffldAtn; // 0xf4
+ sal_Int32 lcbPlcffldAtn; // 0xf4
WW8_FC fcPlcffldMcr; // 0xf8 offset in doc stream to the PLCF of field positions in the macro subdocument.
- INT32 lcbPlcffldMcr; // 9xfc
+ sal_Int32 lcbPlcffldMcr; // 9xfc
WW8_FC fcSttbfbkmk; // 0x100 offset in document stream of the STTBF that records bookmark names in the main document
- INT32 lcbSttbfbkmk; // 0x104
+ sal_Int32 lcbSttbfbkmk; // 0x104
WW8_FC fcPlcfbkf; // 0x108 offset in document stream of the PLCF that records the beginning CP offsets of bookmarks in the main document. See BKF
- INT32 lcbPlcfbkf; // 0x10c
+ sal_Int32 lcbPlcfbkf; // 0x10c
WW8_FC fcPlcfbkl; // 0x110 offset in document stream of the PLCF that records the ending CP offsets of bookmarks recorded in the main document. See the BKL structure definition.
- INT32 lcbPlcfbkl; // 0x114 INT32
+ sal_Int32 lcbPlcfbkl; // 0x114 sal_Int32
WW8_FC fcCmds; // 0x118 FC
- INT32 lcbCmds; // 0x11c
+ sal_Int32 lcbCmds; // 0x11c
WW8_FC fcPlcfmcr; // 0x120 FC
- INT32 lcbPlcfmcr; // 0x124
+ sal_Int32 lcbPlcfmcr; // 0x124
WW8_FC fcSttbfmcr; // 0x128 FC
- INT32 lcbSttbfmcr; // 0x12c
+ sal_Int32 lcbSttbfmcr; // 0x12c
WW8_FC fcPrDrvr; // 0x130 file offset of the printer driver information (names of drivers, port etc...)
- INT32 lcbPrDrvr; // 0x134 count of bytes of the printer driver information (names of drivers, port etc...)
+ sal_Int32 lcbPrDrvr; // 0x134 count of bytes of the printer driver information (names of drivers, port etc...)
WW8_FC fcPrEnvPort; // 0x138 file offset of the print environment in portrait mode.
- INT32 lcbPrEnvPort; // 0x13c count of bytes of the print environment in portrait mode.
+ sal_Int32 lcbPrEnvPort; // 0x13c count of bytes of the print environment in portrait mode.
WW8_FC fcPrEnvLand; // 0x140 file offset of the print environment in landscape mode.
- INT32 lcbPrEnvLand; // 0x144 count of bytes of the print environment in landscape mode.
+ sal_Int32 lcbPrEnvLand; // 0x144 count of bytes of the print environment in landscape mode.
WW8_FC fcWss; // 0x148 file offset of Window Save State data structure. See WSS.
- INT32 lcbWss; // 0x14c count of bytes of WSS. ==0 if unable to store the window state.
+ sal_Int32 lcbWss; // 0x14c count of bytes of WSS. ==0 if unable to store the window state.
WW8_FC fcDop; // 0x150 file offset of document property data structure.
sal_uInt32 lcbDop; // 0x154 count of bytes of document properties.
@@ -1259,27 +1259,27 @@ public:
WW8_FC fcSttbfAssoc; // 0x158 offset to STTBF of associated strings. See STTBFASSOC.
- INT32 lcbSttbfAssoc; // 0x15C
+ sal_Int32 lcbSttbfAssoc; // 0x15C
WW8_FC fcClx; // 0x160 file offset of beginning of information for complex files.
- INT32 lcbClx; // 0x164 count of bytes of complex file information. 0 if file is non-complex.
+ sal_Int32 lcbClx; // 0x164 count of bytes of complex file information. 0 if file is non-complex.
WW8_FC fcPlcfpgdFtn; // 0x168 file offset of page descriptor PLCF for footnote subdocument.
- INT32 lcbPlcfpgdFtn; // 0x16C count of bytes of page descriptor PLCF for footnote subdocument.
+ sal_Int32 lcbPlcfpgdFtn; // 0x16C count of bytes of page descriptor PLCF for footnote subdocument.
// ==0 if document has not been paginated. The length of the PGD is 8 bytes.
WW8_FC fcAutosaveSource; // 0x170 file offset of the name of the original file.
- INT32 lcbAutosaveSource; // 0x174 count of bytes of the name of the original file.
+ sal_Int32 lcbAutosaveSource; // 0x174 count of bytes of the name of the original file.
WW8_FC fcGrpStAtnOwners; // 0x178 group of strings recording the names of the owners of annotations
- INT32 lcbGrpStAtnOwners; // 0x17C count of bytes of the group of strings
+ sal_Int32 lcbGrpStAtnOwners; // 0x17C count of bytes of the group of strings
WW8_FC fcSttbfAtnbkmk; // 0x180 file offset of the sttbf that records names of bookmarks in the annotation subdocument
- INT32 lcbSttbfAtnbkmk; // 0x184 length in bytes of the sttbf that records names of bookmarks in the annotation subdocument
+ sal_Int32 lcbSttbfAtnbkmk; // 0x184 length in bytes of the sttbf that records names of bookmarks in the annotation subdocument
// Einschubs fuer WW67 ***************************************************
- // INT16 wSpare4Fib; // Reserve, muss hier nicht deklariert werden
+ // sal_Int16 wSpare4Fib; // Reserve, muss hier nicht deklariert werden
/*
// folgende Felder existieren zwar so in der Datei,
@@ -1303,144 +1303,144 @@ public:
WW8_FC fcPlcfdoaMom; // 0x192 file offset of the FDOA (drawn object) PLCF for main document.
// ==0 if document has no drawn objects. The length of the FDOA is 6 bytes.
// ab Ver8 unused
- INT32 lcbPlcfdoaMom; // 0x196 length in bytes of the FDOA PLCF of the main document
+ sal_Int32 lcbPlcfdoaMom; // 0x196 length in bytes of the FDOA PLCF of the main document
// ab Ver8 unused
WW8_FC fcPlcfdoaHdr; // 0x19A file offset of the FDOA (drawn object) PLCF for the header document.
// ==0 if document has no drawn objects. The length of the FDOA is 6 bytes.
// ab Ver8 unused
- INT32 lcbPlcfdoaHdr; // 0x19E length in bytes of the FDOA PLCF of the header document
+ sal_Int32 lcbPlcfdoaHdr; // 0x19E length in bytes of the FDOA PLCF of the header document
// ab Ver8 unused
WW8_FC fcPlcfspaMom; // offset in table stream of the FSPA PLCF for main document.
// == 0 if document has no office art objects
// war in Ver67 nur leere Reserve
- INT32 lcbPlcfspaMom; // length in bytes of the FSPA PLCF of the main document
+ sal_Int32 lcbPlcfspaMom; // length in bytes of the FSPA PLCF of the main document
// war in Ver67 nur leere Reserve
WW8_FC fcPlcfspaHdr; // offset in table stream of the FSPA PLCF for header document.
// == 0 if document has no office art objects
// war in Ver67 nur leere Reserve
- INT32 lcbPlcfspaHdr; // length in bytes of the FSPA PLCF of the header document
+ sal_Int32 lcbPlcfspaHdr; // length in bytes of the FSPA PLCF of the header document
// war in Ver67 nur leere Reserve
WW8_FC fcPlcfAtnbkf; // 0x1B2 file offset of BKF (bookmark first) PLCF of the annotation subdocument
- INT32 lcbPlcfAtnbkf; // 0x1B6 length in bytes of BKF (bookmark first) PLCF of the annotation subdocument
+ sal_Int32 lcbPlcfAtnbkf; // 0x1B6 length in bytes of BKF (bookmark first) PLCF of the annotation subdocument
WW8_FC fcPlcfAtnbkl; // 0x1BA file offset of BKL (bookmark last) PLCF of the annotation subdocument
- INT32 lcbPlcfAtnbkl; // 0x1BE length in bytes of BKL (bookmark first) PLCF of the annotation subdocument
+ sal_Int32 lcbPlcfAtnbkl; // 0x1BE length in bytes of BKL (bookmark first) PLCF of the annotation subdocument
WW8_FC fcPms; // 0x1C2 file offset of PMS (Print Merge State) information block
- INT32 lcbPMS; // 0x1C6 length in bytes of PMS
+ sal_Int32 lcbPMS; // 0x1C6 length in bytes of PMS
WW8_FC fcFormFldSttbf; // 0x1CA file offset of form field Sttbf which contains strings used in form field dropdown controls
- INT32 lcbFormFldSttbf; // 0x1CE length in bytes of form field Sttbf
+ sal_Int32 lcbFormFldSttbf; // 0x1CE length in bytes of form field Sttbf
WW8_FC fcPlcfendRef; // 0x1D2 file offset of PLCFendRef which points to endnote references in the main document stream
- INT32 lcbPlcfendRef; // 0x1D6
+ sal_Int32 lcbPlcfendRef; // 0x1D6
WW8_FC fcPlcfendTxt; // 0x1DA file offset of PLCFendRef which points to endnote text in the endnote document
// stream which corresponds with the PLCFendRef
- INT32 lcbPlcfendTxt; // 0x1DE
+ sal_Int32 lcbPlcfendTxt; // 0x1DE
WW8_FC fcPlcffldEdn; // 0x1E2 offset to PLCF of field positions in the endnote subdoc
- INT32 lcbPlcffldEdn; // 0x1E6
+ sal_Int32 lcbPlcffldEdn; // 0x1E6
WW8_FC fcPlcfpgdEdn; // 0x1EA offset to PLCF of page boundaries in the endnote subdoc.
- INT32 lcbPlcfpgdEdn; // 0x1EE
+ sal_Int32 lcbPlcfpgdEdn; // 0x1EE
WW8_FC fcDggInfo; // offset in table stream of the office art object table data.
// The format of office art object table data is found in a separate document.
// war in Ver67 nur leere Reserve
- INT32 lcbDggInfo; // length in bytes of the office art object table data
+ sal_Int32 lcbDggInfo; // length in bytes of the office art object table data
// war in Ver67 nur leere Reserve
WW8_FC fcSttbfRMark; // 0x1fa offset to STTBF that records the author abbreviations...
- INT32 lcbSttbfRMark; // 0x1fe
+ sal_Int32 lcbSttbfRMark; // 0x1fe
WW8_FC fcSttbfCaption; // 0x202 offset to STTBF that records caption titles...
- INT32 lcbSttbfCaption; // 0x206
+ sal_Int32 lcbSttbfCaption; // 0x206
WW8_FC fcSttbAutoCaption; // offset in table stream to the STTBF that records the object names and
// indices into the caption STTBF for objects which get auto captions.
- INT32 lcbSttbAutoCaption; // 0x20e
+ sal_Int32 lcbSttbAutoCaption; // 0x20e
WW8_FC fcPlcfwkb; // 0x212 offset to PLCF that describes the boundaries of contributing documents...
- INT32 lcbPlcfwkb; // 0x216
+ sal_Int32 lcbPlcfwkb; // 0x216
WW8_FC fcPlcfspl; // offset in table stream of PLCF (of SPLS structures) that records spell check state
// war in Ver67 nur leere Reserve
- INT32 lcbPlcfspl; // war in Ver67 nur leere Reserve
+ sal_Int32 lcbPlcfspl; // war in Ver67 nur leere Reserve
WW8_FC fcPlcftxbxTxt; // 0x222 ...PLCF of beginning CP in the text box subdoc
- INT32 lcbPlcftxbxTxt; // 0x226
+ sal_Int32 lcbPlcftxbxTxt; // 0x226
WW8_FC fcPlcffldTxbx; // 0x22a ...PLCF of field boundaries recorded in the textbox subdoc.
- INT32 lcbPlcffldTxbx; // 0x22e
+ sal_Int32 lcbPlcffldTxbx; // 0x22e
WW8_FC fcPlcfHdrtxbxTxt;// 0x232 ...PLCF of beginning CP in the header text box subdoc
- INT32 lcbPlcfHdrtxbxTxt;// 0x236
+ sal_Int32 lcbPlcfHdrtxbxTxt;// 0x236
WW8_FC fcPlcffldHdrTxbx;// 0x23a ...PLCF of field boundaries recorded in the header textbox subdoc.
- INT32 lcbPlcffldHdrTxbx;// 0x23e
+ sal_Int32 lcbPlcffldHdrTxbx;// 0x23e
WW8_FC fcStwUser;
sal_uInt32 lcbStwUser;
WW8_FC fcSttbttmbd;
sal_uInt32 lcbSttbttmbd;
WW8_FC fcSttbFnm; // 0x02da offset in the table stream of masters subdocument names
- INT32 lcbSttbFnm; // 0x02de length
+ sal_Int32 lcbSttbFnm; // 0x02de length
/*
spezielle Listenverwaltung fuer WW8
*/
WW8_FC fcPlcfLst; // 0x02e2 offset in the table stream of list format information.
- INT32 lcbPlcfLst; // 0x02e6 length
+ sal_Int32 lcbPlcfLst; // 0x02e6 length
WW8_FC fcPlfLfo; // 0x02ea offset in the table stream of list format override information.
- INT32 lcbPlfLfo; // 0x02ee length
+ sal_Int32 lcbPlfLfo; // 0x02ee length
/*
spezielle Break-Verwaltung fuer Text-Box-Stories in WW8
*/
WW8_FC fcPlcftxbxBkd; // 0x02f2 PLCF fuer TextBox-Break-Deskriptoren im Maintext
- INT32 lcbPlcftxbxBkd; // 0x02f6
+ sal_Int32 lcbPlcftxbxBkd; // 0x02f6
WW8_FC fcPlcfHdrtxbxBkd;// 0x02fa PLCF fuer TextBox-Break-Deskriptoren im Header-/Footer-Bereich
- INT32 lcbPlcfHdrtxbxBkd;// 0x02fe
+ sal_Int32 lcbPlcfHdrtxbxBkd;// 0x02fe
// 0x302 - 372 == ignore
/*
ListNames (skip to here!)
*/
WW8_FC fcSttbListNames;// 0x0372 PLCF for Listname Table
- INT32 lcbSttbListNames;// 0x0376
+ sal_Int32 lcbSttbListNames;// 0x0376
WW8_FC fcPlcfTch;
- INT32 lcbPlcfTch;
+ sal_Int32 lcbPlcfTch;
// 0x38A - 41A == ignore
WW8_FC fcAtrdExtra;
- UINT32 lcbAtrdExtra;
+ sal_uInt32 lcbAtrdExtra;
// 0x422 - 0x4D4 == ignore
WW8_FC fcHplxsdr; //bizarrely, word xp seems to require this set to shows dates from AtrdExtra
- UINT32 lcbHplxsdr;
+ sal_uInt32 lcbHplxsdr;
/*
General-Varaiblen, die fuer Ver67 und Ver8 verwendet werden,
obwohl sie in der jeweiligen DATEI verschiedene Groesse haben:
*/
- INT32 pnChpFirst;
- INT32 pnPapFirst;
- INT32 cpnBteChp;
- INT32 cpnBtePap;
+ sal_Int32 pnChpFirst;
+ sal_Int32 pnPapFirst;
+ sal_Int32 cpnBteChp;
+ sal_Int32 cpnBtePap;
/*
The actual nFib, moved here because some readers assumed
they couldn't read any format with nFib > some constant
*/
- UINT16 nFib_actual; // 0x05bc #i56856#
+ sal_uInt16 nFib_actual; // 0x05bc #i56856#
/*
nun wird lediglich noch ein Ctor benoetigt
*/
- WW8Fib( SvStream& rStrm, BYTE nWantedVersion,UINT32 nOffset=0 );
+ WW8Fib( SvStream& rStrm, sal_uInt8 nWantedVersion,sal_uInt32 nOffset=0 );
/* leider falsch, man braucht auch noch einen fuer den Export */
- WW8Fib( BYTE nVersion = 6 );
+ WW8Fib( sal_uInt8 nVersion = 6 );
bool WriteHeader(SvStream& rStrm);
bool Write(SvStream& rStrm);
- static rtl_TextEncoding GetFIBCharset(UINT16 chs);
+ static rtl_TextEncoding GetFIBCharset(sal_uInt16 chs);
ww::WordVersion GetFIBVersion() const;
WW8_CP GetBaseCp(ManTypes nType) const;
sal_Unicode getNumDecimalSep() const;
@@ -1454,21 +1454,21 @@ protected:
long nStyleStart;
long nStyleLen;
- UINT16 cstd; // Count of styles in stylesheet
- UINT16 cbSTDBaseInFile; // Length of STD Base as stored in a file
- UINT16 fStdStylenamesWritten : 1; // Are built-in stylenames stored?
- UINT16 : 15; // Spare flags
- UINT16 stiMaxWhenSaved; // Max sti known when file was written
- UINT16 istdMaxFixedWhenSaved; // How many fixed-index istds are there?
- UINT16 nVerBuiltInNamesWhenSaved; // Current version of built-in stylenames
+ sal_uInt16 cstd; // Count of styles in stylesheet
+ sal_uInt16 cbSTDBaseInFile; // Length of STD Base as stored in a file
+ sal_uInt16 fStdStylenamesWritten : 1; // Are built-in stylenames stored?
+ sal_uInt16 : 15; // Spare flags
+ sal_uInt16 stiMaxWhenSaved; // Max sti known when file was written
+ sal_uInt16 istdMaxFixedWhenSaved; // How many fixed-index istds are there?
+ sal_uInt16 nVerBuiltInNamesWhenSaved; // Current version of built-in stylenames
// ftc used by StandardChpStsh for this document
- UINT16 ftcAsci;
+ sal_uInt16 ftcAsci;
// CJK ftc used by StandardChpStsh for this document
- UINT16 ftcFE;
+ sal_uInt16 ftcFE;
// CTL/Other ftc used by StandardChpStsh for this document
- UINT16 ftcOther;
+ sal_uInt16 ftcOther;
// CTL ftc used by StandardChpStsh for this document
- UINT16 ftcBi;
+ sal_uInt16 ftcBi;
//No copying
WW8Style(const WW8Style&);
@@ -1477,22 +1477,22 @@ public:
WW8Style( SvStream& rSt, WW8Fib& rFibPara );
WW8_STD* Read1STDFixed( short& rSkip, short* pcbStd );
WW8_STD* Read1Style( short& rSkip, String* pString, short* pcbStd );
- UINT16 GetCount() const { return cstd; }
+ sal_uInt16 GetCount() const { return cstd; }
};
class WW8Fonts
{
protected:
WW8_FFN* pFontA; // Array of Pointers to Font Description
- USHORT nMax; // Array-Size
+ sal_uInt16 nMax; // Array-Size
public:
WW8Fonts( SvStream& rSt, WW8Fib& rFib );
~WW8Fonts() { delete[] pFontA; }
- const WW8_FFN* GetFont( USHORT nNum ) const;
- USHORT GetMax() const { return nMax; }
+ const WW8_FFN* GetFont( sal_uInt16 nNum ) const;
+ sal_uInt16 GetMax() const { return nMax; }
};
-typedef BYTE HdFtFlags;
+typedef sal_uInt8 HdFtFlags;
namespace nsHdFtFlags
{
const HdFtFlags WW8_HEADER_EVEN = 0x01;
@@ -1508,251 +1508,251 @@ class WW8Dop
{
public:
/* Error Status */
- ULONG nDopError;
+ sal_uLong nDopError;
/*
Corresponds only roughly to the actual structure of the Winword DOP,
the winword FIB version matters to what exists.
*/
// Initialisier-Dummy:
- BYTE nDataStart;
+ sal_uInt8 nDataStart;
//-------------------------
- UINT16 fFacingPages : 1; // 1 when facing pages should be printed
- UINT16 fWidowControl : 1; // 1 when widow control is in effect. 0 when widow control disabled.
- UINT16 fPMHMainDoc : 1; // 1 when doc is a main doc for Print Merge Helper, 0 when not; default=0
- UINT16 grfSuppression : 2; // 0 Default line suppression storage; 0= form letter line suppression; 1= no line suppression; default=0
- UINT16 fpc : 2; // 1 footnote position code: 0 as endnotes, 1 at bottom of page, 2 immediately beneath text
- UINT16 : 1; // 0 unused
+ sal_uInt16 fFacingPages : 1; // 1 when facing pages should be printed
+ sal_uInt16 fWidowControl : 1; // 1 when widow control is in effect. 0 when widow control disabled.
+ sal_uInt16 fPMHMainDoc : 1; // 1 when doc is a main doc for Print Merge Helper, 0 when not; default=0
+ sal_uInt16 grfSuppression : 2; // 0 Default line suppression storage; 0= form letter line suppression; 1= no line suppression; default=0
+ sal_uInt16 fpc : 2; // 1 footnote position code: 0 as endnotes, 1 at bottom of page, 2 immediately beneath text
+ sal_uInt16 : 1; // 0 unused
//-------------------------
- UINT16 grpfIhdt : 8; // 0 specification of document headers and footers. See explanation under Headers and Footers topic.
+ sal_uInt16 grpfIhdt : 8; // 0 specification of document headers and footers. See explanation under Headers and Footers topic.
//-------------------------
- UINT16 rncFtn : 2; // 0 restart index for footnotes, 0 don't restart note numbering, 1 section, 2 page
- UINT16 nFtn : 14; // 1 initial footnote number for document
- UINT16 fOutlineDirtySave : 1; // when 1, indicates that information in the hPLCFpad should be refreshed since outline has been dirtied
- UINT16 : 7; // reserved
- UINT16 fOnlyMacPics : 1; // when 1, Word believes all pictures recorded in the document were created on a Macintosh
- UINT16 fOnlyWinPics : 1; // when 1, Word believes all pictures recorded in the document were created in Windows
- UINT16 fLabelDoc : 1; // when 1, document was created as a print merge labels document
- UINT16 fHyphCapitals : 1; // when 1, Word is allowed to hyphenate words that are capitalized. When 0, capitalized may not be hyphenated
- UINT16 fAutoHyphen : 1; // when 1, Word will hyphenate newly typed text as a background task
- UINT16 fFormNoFields : 1;
- UINT16 fLinkStyles : 1; // when 1, Word will merge styles from its template
- UINT16 fRevMarking : 1; // when 1, Word will mark revisions as the document is edited
- UINT16 fBackup : 1; // always make backup when document saved when 1.
- UINT16 fExactCWords : 1;
- UINT16 fPagHidden : 1; //
- UINT16 fPagResults : 1;
- UINT16 fLockAtn : 1; // when 1, annotations are locked for editing
- UINT16 fMirrorMargins : 1; // swap margins on left/right pages when 1.
- UINT16 fReadOnlyRecommended : 1;// user has recommended that this doc be opened read-only when 1
- UINT16 fDfltTrueType : 1; // when 1, use TrueType fonts by default (flag obeyed only when doc was created by WinWord 2.x)
- UINT16 fPagSuppressTopSpacing : 1;//when 1, file created with SUPPRESSTOPSPACING=YES in win.ini. (flag obeyed only when doc was created by WinWord 2.x).
- UINT16 fProtEnabled : 1; // when 1, document is protected from edit operations
- UINT16 fDispFormFldSel : 1;// when 1, restrict selections to occur only within form fields
- UINT16 fRMView : 1; // when 1, show revision markings on screen
- UINT16 fRMPrint : 1; // when 1, print revision marks when document is printed
- UINT16 fWriteReservation : 1;
- UINT16 fLockRev : 1; // when 1, the current revision marking state is locked
- UINT16 fEmbedFonts : 1; // when 1, document contains embedded True Type fonts
+ sal_uInt16 rncFtn : 2; // 0 restart index for footnotes, 0 don't restart note numbering, 1 section, 2 page
+ sal_uInt16 nFtn : 14; // 1 initial footnote number for document
+ sal_uInt16 fOutlineDirtySave : 1; // when 1, indicates that information in the hPLCFpad should be refreshed since outline has been dirtied
+ sal_uInt16 : 7; // reserved
+ sal_uInt16 fOnlyMacPics : 1; // when 1, Word believes all pictures recorded in the document were created on a Macintosh
+ sal_uInt16 fOnlyWinPics : 1; // when 1, Word believes all pictures recorded in the document were created in Windows
+ sal_uInt16 fLabelDoc : 1; // when 1, document was created as a print merge labels document
+ sal_uInt16 fHyphCapitals : 1; // when 1, Word is allowed to hyphenate words that are capitalized. When 0, capitalized may not be hyphenated
+ sal_uInt16 fAutoHyphen : 1; // when 1, Word will hyphenate newly typed text as a background task
+ sal_uInt16 fFormNoFields : 1;
+ sal_uInt16 fLinkStyles : 1; // when 1, Word will merge styles from its template
+ sal_uInt16 fRevMarking : 1; // when 1, Word will mark revisions as the document is edited
+ sal_uInt16 fBackup : 1; // always make backup when document saved when 1.
+ sal_uInt16 fExactCWords : 1;
+ sal_uInt16 fPagHidden : 1; //
+ sal_uInt16 fPagResults : 1;
+ sal_uInt16 fLockAtn : 1; // when 1, annotations are locked for editing
+ sal_uInt16 fMirrorMargins : 1; // swap margins on left/right pages when 1.
+ sal_uInt16 fReadOnlyRecommended : 1;// user has recommended that this doc be opened read-only when 1
+ sal_uInt16 fDfltTrueType : 1; // when 1, use TrueType fonts by default (flag obeyed only when doc was created by WinWord 2.x)
+ sal_uInt16 fPagSuppressTopSpacing : 1;//when 1, file created with SUPPRESSTOPSPACING=YES in win.ini. (flag obeyed only when doc was created by WinWord 2.x).
+ sal_uInt16 fProtEnabled : 1; // when 1, document is protected from edit operations
+ sal_uInt16 fDispFormFldSel : 1;// when 1, restrict selections to occur only within form fields
+ sal_uInt16 fRMView : 1; // when 1, show revision markings on screen
+ sal_uInt16 fRMPrint : 1; // when 1, print revision marks when document is printed
+ sal_uInt16 fWriteReservation : 1;
+ sal_uInt16 fLockRev : 1; // when 1, the current revision marking state is locked
+ sal_uInt16 fEmbedFonts : 1; // when 1, document contains embedded True Type fonts
// compatability options
- UINT16 copts_fNoTabForInd : 1; // when 1, donE½t add automatic tab stops for hanging indent
- UINT16 copts_fNoSpaceRaiseLower : 1; // when 1, donE½t add extra space for raised or lowered characters
- UINT16 copts_fSupressSpbfAfterPgBrk : 1; // when 1, supress the paragraph Space Before and Space After options after a page break
- UINT16 copts_fWrapTrailSpaces : 1; // when 1, wrap trailing spaces at the end of a line to the next line
- UINT16 copts_fMapPrintTextColor : 1; // when 1, print colors as black on non-color printers
- UINT16 copts_fNoColumnBalance : 1; // when 1, donE½t balance columns for Continuous Section starts
- UINT16 copts_fConvMailMergeEsc : 1;
- UINT16 copts_fSupressTopSpacing : 1; // when 1, supress extra line spacing at top of page
- UINT16 copts_fOrigWordTableRules : 1; // when 1, combine table borders like Word 5.x for the Macintosh
- UINT16 copts_fTransparentMetafiles : 1; // when 1, donE½t blank area between metafile pictures
- UINT16 copts_fShowBreaksInFrames : 1; // when 1, show hard page or column breaks in frames
- UINT16 copts_fSwapBordersFacingPgs : 1; // when 1, swap left and right pages on odd facing pages
- UINT16 copts_fExpShRtn : 1; // when 1, expand character spaces on the line ending SHIFT+RETURN // #i56856#
-
- INT16 dxaTab; // 720 twips default tab width
- UINT16 wSpare; //
- UINT16 dxaHotZ; // width of hyphenation hot zone measured in twips
- UINT16 cConsecHypLim; // number of lines allowed to have consecutive hyphens
- UINT16 wSpare2; // reserved
- INT32 dttmCreated; // DTTM date and time document was created
- INT32 dttmRevised; // DTTM date and time document was last revised
- INT32 dttmLastPrint; // DTTM date and time document was last printed
- INT16 nRevision; // number of times document has been revised since its creation
- INT32 tmEdited; // time document was last edited
- INT32 cWords; // count of words tallied by last Word Count execution
- INT32 cCh; // count of characters tallied by last Word Count execution
- INT16 cPg; // count of pages tallied by last Word Count execution
- INT32 cParas; // count of paragraphs tallied by last Word Count execution
- UINT16 rncEdn : 2; // restart endnote number code: 0 donE½t restart endnote numbering, 1 section, 2 page
- UINT16 nEdn : 14; // beginning endnote number
- UINT16 epc : 2; // endnote position code: 0 at end of section, 3 at end of document
- // UINT16 nfcFtnRef : 4; // number format code for auto footnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
+ sal_uInt16 copts_fNoTabForInd : 1; // when 1, don�t add automatic tab stops for hanging indent
+ sal_uInt16 copts_fNoSpaceRaiseLower : 1; // when 1, don�t add extra space for raised or lowered characters
+ sal_uInt16 copts_fSupressSpbfAfterPgBrk : 1; // when 1, supress the paragraph Space Before and Space After options after a page break
+ sal_uInt16 copts_fWrapTrailSpaces : 1; // when 1, wrap trailing spaces at the end of a line to the next line
+ sal_uInt16 copts_fMapPrintTextColor : 1; // when 1, print colors as black on non-color printers
+ sal_uInt16 copts_fNoColumnBalance : 1; // when 1, don�t balance columns for Continuous Section starts
+ sal_uInt16 copts_fConvMailMergeEsc : 1;
+ sal_uInt16 copts_fSupressTopSpacing : 1; // when 1, supress extra line spacing at top of page
+ sal_uInt16 copts_fOrigWordTableRules : 1; // when 1, combine table borders like Word 5.x for the Macintosh
+ sal_uInt16 copts_fTransparentMetafiles : 1; // when 1, don�t blank area between metafile pictures
+ sal_uInt16 copts_fShowBreaksInFrames : 1; // when 1, show hard page or column breaks in frames
+ sal_uInt16 copts_fSwapBordersFacingPgs : 1; // when 1, swap left and right pages on odd facing pages
+ sal_uInt16 copts_fExpShRtn : 1; // when 1, expand character spaces on the line ending SHIFT+RETURN // #i56856#
+
+ sal_Int16 dxaTab; // 720 twips default tab width
+ sal_uInt16 wSpare; //
+ sal_uInt16 dxaHotZ; // width of hyphenation hot zone measured in twips
+ sal_uInt16 cConsecHypLim; // number of lines allowed to have consecutive hyphens
+ sal_uInt16 wSpare2; // reserved
+ sal_Int32 dttmCreated; // DTTM date and time document was created
+ sal_Int32 dttmRevised; // DTTM date and time document was last revised
+ sal_Int32 dttmLastPrint; // DTTM date and time document was last printed
+ sal_Int16 nRevision; // number of times document has been revised since its creation
+ sal_Int32 tmEdited; // time document was last edited
+ sal_Int32 cWords; // count of words tallied by last Word Count execution
+ sal_Int32 cCh; // count of characters tallied by last Word Count execution
+ sal_Int16 cPg; // count of pages tallied by last Word Count execution
+ sal_Int32 cParas; // count of paragraphs tallied by last Word Count execution
+ sal_uInt16 rncEdn : 2; // restart endnote number code: 0 don�t restart endnote numbering, 1 section, 2 page
+ sal_uInt16 nEdn : 14; // beginning endnote number
+ sal_uInt16 epc : 2; // endnote position code: 0 at end of section, 3 at end of document
+ // sal_uInt16 nfcFtnRef : 4; // number format code for auto footnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
// 3 Upper case Letter, 4 Lower case Letter
// ersetzt durch gleichlautendes Feld unten
- // UINT16 nfcEdnRef : 4; // number format code for auto endnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
+ // sal_uInt16 nfcEdnRef : 4; // number format code for auto endnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
// 3 Upper case Letter, 4 Lower case Letter
// ersetzt durch gleichlautendes Feld unten
- UINT16 fPrintFormData : 1; // only print data inside of form fields
- UINT16 fSaveFormData : 1; // only save document data that is inside of a form field.
- UINT16 fShadeFormData : 1; // shade form fields
- UINT16 : 2; // reserved
- UINT16 fWCFtnEdn : 1; // when 1, include footnotes and endnotes in word count
- INT32 cLines; // count of lines tallied by last Word Count operation
- INT32 cWordsFtnEnd; // count of words in footnotes and endnotes tallied by last Word Count operation
- INT32 cChFtnEdn; // count of characters in footnotes and endnotes tallied by last Word Count operation
- INT16 cPgFtnEdn; // count of pages in footnotes and endnotes tallied by last Word Count operation
- INT32 cParasFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
- INT32 cLinesFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
- INT32 lKeyProtDoc; // document protection password key, only valid if dop.fProtEnabled, dop.fLockAtn or dop.fLockRev are 1.
- UINT16 wvkSaved : 3; // document view kind: 0 Normal view, 1 Outline view, 2 Page View
- UINT16 wScaleSaved : 9; //
- UINT16 zkSaved : 2;
- UINT16 fRotateFontW6 : 1;
- UINT16 iGutterPos : 1 ;
+ sal_uInt16 fPrintFormData : 1; // only print data inside of form fields
+ sal_uInt16 fSaveFormData : 1; // only save document data that is inside of a form field.
+ sal_uInt16 fShadeFormData : 1; // shade form fields
+ sal_uInt16 : 2; // reserved
+ sal_uInt16 fWCFtnEdn : 1; // when 1, include footnotes and endnotes in word count
+ sal_Int32 cLines; // count of lines tallied by last Word Count operation
+ sal_Int32 cWordsFtnEnd; // count of words in footnotes and endnotes tallied by last Word Count operation
+ sal_Int32 cChFtnEdn; // count of characters in footnotes and endnotes tallied by last Word Count operation
+ sal_Int16 cPgFtnEdn; // count of pages in footnotes and endnotes tallied by last Word Count operation
+ sal_Int32 cParasFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
+ sal_Int32 cLinesFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
+ sal_Int32 lKeyProtDoc; // document protection password key, only valid if dop.fProtEnabled, dop.fLockAtn or dop.fLockRev are 1.
+ sal_uInt16 wvkSaved : 3; // document view kind: 0 Normal view, 1 Outline view, 2 Page View
+ sal_uInt16 wScaleSaved : 9; //
+ sal_uInt16 zkSaved : 2;
+ sal_uInt16 fRotateFontW6 : 1;
+ sal_uInt16 iGutterPos : 1 ;
// hier sollte bei nFib < 103 Schluss sein, sonst ist Datei fehlerhaft!
/*
bei nFib >= 103 gehts weiter:
*/
- UINT32 fNoTabForInd :1; // see above in compatability options
- UINT32 fNoSpaceRaiseLower :1; // see above
- UINT32 fSupressSpbfAfterPageBreak :1; // see above
- UINT32 fWrapTrailSpaces :1; // see above
- UINT32 fMapPrintTextColor :1; // see above
- UINT32 fNoColumnBalance :1; // see above
- UINT32 fConvMailMergeEsc :1; // see above
- UINT32 fSupressTopSpacing :1; // see above
- UINT32 fOrigWordTableRules :1; // see above
- UINT32 fTransparentMetafiles :1; // see above
- UINT32 fShowBreaksInFrames :1; // see above
- UINT32 fSwapBordersFacingPgs :1; // see above
- UINT32 fCompatabilityOptions_Unknown1_13 :1; // #i78591#
- UINT32 fExpShRtn :1; // #i78591# and #i56856#
- UINT32 fCompatabilityOptions_Unknown1_15 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_16 :1; // #i78591#
- UINT32 fSuppressTopSpacingMac5 :1; // Suppress extra line spacing at top
+ sal_uInt32 fNoTabForInd :1; // see above in compatability options
+ sal_uInt32 fNoSpaceRaiseLower :1; // see above
+ sal_uInt32 fSupressSpbfAfterPageBreak :1; // see above
+ sal_uInt32 fWrapTrailSpaces :1; // see above
+ sal_uInt32 fMapPrintTextColor :1; // see above
+ sal_uInt32 fNoColumnBalance :1; // see above
+ sal_uInt32 fConvMailMergeEsc :1; // see above
+ sal_uInt32 fSupressTopSpacing :1; // see above
+ sal_uInt32 fOrigWordTableRules :1; // see above
+ sal_uInt32 fTransparentMetafiles :1; // see above
+ sal_uInt32 fShowBreaksInFrames :1; // see above
+ sal_uInt32 fSwapBordersFacingPgs :1; // see above
+ sal_uInt32 fCompatabilityOptions_Unknown1_13 :1; // #i78591#
+ sal_uInt32 fExpShRtn :1; // #i78591# and #i56856#
+ sal_uInt32 fCompatabilityOptions_Unknown1_15 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_16 :1; // #i78591#
+ sal_uInt32 fSuppressTopSpacingMac5 :1; // Suppress extra line spacing at top
// of page like MacWord 5.x
- UINT32 fTruncDxaExpand :1; // Expand/Condense by whole number of points
- UINT32 fPrintBodyBeforeHdr :1; // Print body text before header/footer
- UINT32 fNoLeading :1; // Don't add extra spacebetween rows of text
- UINT32 fCompatabilityOptions_Unknown1_21 :1; // #i78591#
- UINT32 fMWSmallCaps : 1; // Use larger small caps like MacWord 5.x
- UINT32 fCompatabilityOptions_Unknown1_23 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_24 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_25 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_26 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_27 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_28 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_29 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_30 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_31 :1; // #i78591#
- UINT32 fUsePrinterMetrics : 1; //The magic option
+ sal_uInt32 fTruncDxaExpand :1; // Expand/Condense by whole number of points
+ sal_uInt32 fPrintBodyBeforeHdr :1; // Print body text before header/footer
+ sal_uInt32 fNoLeading :1; // Don't add extra spacebetween rows of text
+ sal_uInt32 fCompatabilityOptions_Unknown1_21 :1; // #i78591#
+ sal_uInt32 fMWSmallCaps : 1; // Use larger small caps like MacWord 5.x
+ sal_uInt32 fCompatabilityOptions_Unknown1_23 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_24 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_25 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_26 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_27 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_28 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_29 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_30 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_31 :1; // #i78591#
+ sal_uInt32 fUsePrinterMetrics : 1; //The magic option
// hier sollte bei nFib <= 105 Schluss sein, sonst ist Datei fehlerhaft!
/*
bei nFib > 105 gehts weiter:
*/
- INT16 adt; // Autoformat Document Type:
+ sal_Int16 adt; // Autoformat Document Type:
// 0 for normal.
// 1 for letter, and
// 2 for email.
WW8DopTypography doptypography; // see WW8STRUC.HXX
WW8_DOGRID dogrid; // see WW8STRUC.HXX
- UINT16 :1; // reserved
- UINT16 lvl :4; // Which outline levels are showing in outline view
- UINT16 :4; // reserved
- UINT16 fHtmlDoc :1; // This file is based upon an HTML file
- UINT16 :1; // reserved
- UINT16 fSnapBorder :1; // Snap table and page borders to page border
- UINT16 fIncludeHeader :1; // Place header inside page border
- UINT16 fIncludeFooter :1; // Place footer inside page border
- UINT16 fForcePageSizePag :1; // Are we in online view
- UINT16 fMinFontSizePag :1; // Are we auto-promoting fonts to >= hpsZoonFontPag?
- UINT16 fHaveVersions :1; // versioning is turned on
- UINT16 fAutoVersion :1; // autoversioning is enabled
- UINT16 : 14; // reserved
+ sal_uInt16 :1; // reserved
+ sal_uInt16 lvl :4; // Which outline levels are showing in outline view
+ sal_uInt16 :4; // reserved
+ sal_uInt16 fHtmlDoc :1; // This file is based upon an HTML file
+ sal_uInt16 :1; // reserved
+ sal_uInt16 fSnapBorder :1; // Snap table and page borders to page border
+ sal_uInt16 fIncludeHeader :1; // Place header inside page border
+ sal_uInt16 fIncludeFooter :1; // Place footer inside page border
+ sal_uInt16 fForcePageSizePag :1; // Are we in online view
+ sal_uInt16 fMinFontSizePag :1; // Are we auto-promoting fonts to >= hpsZoonFontPag?
+ sal_uInt16 fHaveVersions :1; // versioning is turned on
+ sal_uInt16 fAutoVersion :1; // autoversioning is enabled
+ sal_uInt16 : 14; // reserved
// Skip 12 Bytes here: ASUMI
- INT32 cChWS;
- INT32 cChWSFtnEdn;
- INT32 grfDocEvents;
+ sal_Int32 cChWS;
+ sal_Int32 cChWSFtnEdn;
+ sal_Int32 grfDocEvents;
// Skip 4+30+8 Bytes here
- INT32 cDBC;
- INT32 cDBCFtnEdn;
+ sal_Int32 cDBC;
+ sal_Int32 cDBCFtnEdn;
// Skip 4 Bytes here
- INT16 nfcFtnRef;
- INT16 nfcEdnRef;
- INT16 hpsZoonFontPag;
- INT16 dywDispPag;
-
- UINT32 fCompatabilityOptions_Unknown2_1 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_2 :1; // #i78591#
- UINT32 fDontUseHTMLAutoSpacing:1;
- UINT32 fCompatabilityOptions_Unknown2_4 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_5 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_6 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_7 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_8 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_9 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_10 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_11 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_12 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_13 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_14 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_15 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_16 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_17 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_18 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_19 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_20 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_21 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_22 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_23 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_24 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_25 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_26 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_27 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_28 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_29 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_30 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_31 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_32 :1; // #i78591#
-
- UINT16 fUnknown3:15;
- UINT16 fUseBackGroundInAllmodes:1;
-
- UINT16 fDoNotEmbedSystemFont:1;
- UINT16 fWordCompat:1;
- UINT16 fLiveRecover:1;
- UINT16 fEmbedFactoids:1;
- UINT16 fFactoidXML:1;
- UINT16 fFactoidAllDone:1;
- UINT16 fFolioPrint:1;
- UINT16 fReverseFolio:1;
- UINT16 iTextLineEnding:3;
- UINT16 fHideFcc:1;
- UINT16 fAcetateShowMarkup:1;
- UINT16 fAcetateShowAtn:1;
- UINT16 fAcetateShowInsDel:1;
- UINT16 fAcetateShowProps:1;
+ sal_Int16 nfcFtnRef;
+ sal_Int16 nfcEdnRef;
+ sal_Int16 hpsZoonFontPag;
+ sal_Int16 dywDispPag;
+
+ sal_uInt32 fCompatabilityOptions_Unknown2_1 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_2 :1; // #i78591#
+ sal_uInt32 fDontUseHTMLAutoSpacing:1;
+ sal_uInt32 fCompatabilityOptions_Unknown2_4 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_5 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_6 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_7 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_8 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_9 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_10 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_11 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_12 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_13 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_14 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_15 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_16 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_17 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_18 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_19 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_20 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_21 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_22 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_23 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_24 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_25 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_26 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_27 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_28 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_29 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_30 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_31 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_32 :1; // #i78591#
+
+ sal_uInt16 fUnknown3:15;
+ sal_uInt16 fUseBackGroundInAllmodes:1;
+
+ sal_uInt16 fDoNotEmbedSystemFont:1;
+ sal_uInt16 fWordCompat:1;
+ sal_uInt16 fLiveRecover:1;
+ sal_uInt16 fEmbedFactoids:1;
+ sal_uInt16 fFactoidXML:1;
+ sal_uInt16 fFactoidAllDone:1;
+ sal_uInt16 fFolioPrint:1;
+ sal_uInt16 fReverseFolio:1;
+ sal_uInt16 iTextLineEnding:3;
+ sal_uInt16 fHideFcc:1;
+ sal_uInt16 fAcetateShowMarkup:1;
+ sal_uInt16 fAcetateShowAtn:1;
+ sal_uInt16 fAcetateShowInsDel:1;
+ sal_uInt16 fAcetateShowProps:1;
// 2. Initialisier-Dummy:
- BYTE nDataEnd;
+ sal_uInt8 nDataEnd;
bool bUseThaiLineBreakingRules;
/* Constructor for importing, needs to know the version of word used */
- WW8Dop(SvStream& rSt, INT16 nFib, INT32 nPos, sal_uInt32 nSize);
+ WW8Dop(SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_uInt32 nSize);
/* Constructs default DOP suitable for exporting */
WW8Dop();
bool Write(SvStream& rStrm, WW8Fib& rFib) const;
public:
- UINT32 GetCompatabilityOptions() const;
- void SetCompatabilityOptions(UINT32 a32Bit);
+ sal_uInt32 GetCompatabilityOptions() const;
+ void SetCompatabilityOptions(sal_uInt32 a32Bit);
// i#78591#
- UINT32 GetCompatabilityOptions2() const;
- void SetCompatabilityOptions2(UINT32 a32Bit);
+ sal_uInt32 GetCompatabilityOptions2() const;
+ void SetCompatabilityOptions2(sal_uInt32 a32Bit);
};
class WW8PLCF_HdFt
@@ -1763,22 +1763,22 @@ private:
short nIdxOffset;
public:
WW8PLCF_HdFt( SvStream* pSt, WW8Fib& rFib, WW8Dop& rDop );
- bool GetTextPos(BYTE grpfIhdt, BYTE nWhich, WW8_CP& rStart, long& rLen);
+ bool GetTextPos(sal_uInt8 grpfIhdt, sal_uInt8 nWhich, WW8_CP& rStart, long& rLen);
bool GetTextPosExact(short nIdx, WW8_CP& rStart, long& rLen);
- void UpdateIndex( BYTE grpfIhdt );
+ void UpdateIndex( sal_uInt8 grpfIhdt );
};
void SwapQuotesInField(String &rFmt);
Word2CHPX ReadWord2Chpx(SvStream &rSt, sal_Size nOffset, sal_uInt8 nSize);
-std::vector<BYTE> ChpxToSprms(const Word2CHPX &rChpx);
+std::vector<sal_uInt8> ChpxToSprms(const Word2CHPX &rChpx);
-ULONG SafeReadString(ByteString &rStr,USHORT nLen,SvStream &rStrm);
+sal_uLong SafeReadString(ByteString &rStr,sal_uInt16 nLen,SvStream &rStrm);
//MS has a (slightly) inaccurate view of how many twips
//are in the default letter size of a page
-const USHORT lLetterWidth = 12242;
-const USHORT lLetterHeight = 15842;
+const sal_uInt16 lLetterWidth = 12242;
+const sal_uInt16 lLetterHeight = 15842;
#endif
diff --git a/sw/source/filter/ww8/ww8struc.hxx b/sw/source/filter/ww8/ww8struc.hxx
index 5d943b80a759..7f2e7ab55ea4 100644
--- a/sw/source/filter/ww8/ww8struc.hxx
+++ b/sw/source/filter/ww8/ww8struc.hxx
@@ -45,19 +45,19 @@
# pragma pack(2)
#endif
-inline void Set_UInt8( BYTE *& p, UINT8 n )
+inline void Set_UInt8( sal_uInt8 *& p, sal_uInt8 n )
{
ByteToSVBT8( n, *(SVBT8*)p );
p+= 1;
}
-inline void Set_UInt16( BYTE *& p, UINT16 n )
+inline void Set_UInt16( sal_uInt8 *& p, sal_uInt16 n )
{
ShortToSVBT16( n, *(SVBT16*)p );
p+= 2;
}
-inline void Set_UInt32( BYTE *& p, UINT32 n )
+inline void Set_UInt32( sal_uInt8 *& p, sal_uInt32 n )
{
UInt32ToSVBT32( n, *(SVBT32*)p );
p+= 4;
@@ -177,26 +177,26 @@ const WW8_CP WW8_CP_MAX = SAL_MAX_INT32;
struct WW8_STD
{
// Base part of STD:
- UINT16 sti : 12; // invariant style identifier
- UINT16 fScratch : 1; // spare field for any temporary use,
+ sal_uInt16 sti : 12; // invariant style identifier
+ sal_uInt16 fScratch : 1; // spare field for any temporary use,
// always reset back to zero!
- UINT16 fInvalHeight : 1; // PHEs of all text with this style are wrong
- UINT16 fHasUpe : 1; // UPEs have been generated
- UINT16 fMassCopy : 1; // std has been mass-copied; if unused at
+ sal_uInt16 fInvalHeight : 1; // PHEs of all text with this style are wrong
+ sal_uInt16 fHasUpe : 1; // UPEs have been generated
+ sal_uInt16 fMassCopy : 1; // std has been mass-copied; if unused at
// save time, style should be deleted
- UINT16 sgc : 4; // style type code
- UINT16 istdBase : 12; // base style
- UINT16 cupx : 4; // # of UPXs (and UPEs)
- UINT16 istdNext : 12; // next style
- UINT16 bchUpe; // offset to end of upx's, start of upe's
+ sal_uInt16 sgc : 4; // style type code
+ sal_uInt16 istdBase : 12; // base style
+ sal_uInt16 cupx : 4; // # of UPXs (and UPEs)
+ sal_uInt16 istdNext : 12; // next style
+ sal_uInt16 bchUpe; // offset to end of upx's, start of upe's
//-------- jetzt neu:
// ab Ver8 gibts zwei Felder mehr:
- UINT16 fAutoRedef : 1; /* auto redefine style when appropriate */
- UINT16 fHidden : 1; /* hidden from UI? */
- UINT16 : 14; /* unused bits */
+ sal_uInt16 fAutoRedef : 1; /* auto redefine style when appropriate */
+ sal_uInt16 fHidden : 1; /* hidden from UI? */
+ sal_uInt16 : 14; /* unused bits */
// Variable length part of STD:
- // UINT8 stzName[2]; /* sub-names are separated by chDelimStyle
+ // sal_uInt8 stzName[2]; /* sub-names are separated by chDelimStyle
// char grupx[];
// the UPEs are not stored on the file; they are a cache of the based-on
// chain
@@ -208,17 +208,17 @@ struct WW8_STD
struct WW8_FFN_BASE // Font Descriptor
{
// ab Ver6
- BYTE cbFfnM1; // 0x0 total length of FFN - 1.
+ sal_uInt8 cbFfnM1; // 0x0 total length of FFN - 1.
- BYTE prg: 2; // 0x1:03 pitch request
- BYTE fTrueType : 1; // 0x1:04 when 1, font is a TrueType font
+ sal_uInt8 prg: 2; // 0x1:03 pitch request
+ sal_uInt8 fTrueType : 1; // 0x1:04 when 1, font is a TrueType font
// 0x1:08 reserved
- BYTE ff : 3; // 0x1:70 font family id
+ sal_uInt8 ff : 3; // 0x1:70 font family id
// 0x1:80 reserved
short wWeight; // 0x2 base weight of font
- BYTE chs; // 0x4 character set identifier
- BYTE ibszAlt; // 0x5 index into ffn.szFfn to the name of the alternate font
+ sal_uInt8 chs; // 0x4 character set identifier
+ sal_uInt8 ibszAlt; // 0x5 index into ffn.szFfn to the name of the alternate font
};
/** Hiermit arbeiten wir im Parser (und Dumper)
@@ -240,14 +240,14 @@ struct WW8_FFN : public WW8_FFN_BASE
struct WW8_BRCVer6 // alter Border Code
{
SVBT16 aBits1;
-// UINT16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, this field is the width of
+// sal_uInt16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, this field is the width of
// a single line of border in units of 0.75 points
// Must be nonzero when brcType is nonzero.
// 6 == dotted, 7 == dashed.
-// UINT16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
-// UINT16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
-// UINT16 ico : 5; // 07C0 color code (see chp.ico)
-// UINT16 dxpSpace : 5; // F800 width of space to maintain between border and text within border.
+// sal_uInt16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
+// sal_uInt16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
+// sal_uInt16 ico : 5; // 07C0 color code (see chp.ico)
+// sal_uInt16 dxpSpace : 5; // F800 width of space to maintain between border and text within border.
// Must be 0 when BRC is a substructure of the TC. Stored in points for Windows.
};
@@ -256,14 +256,14 @@ class WW8_BRC // Border Code
public:
SVBT16 aBits1;
SVBT16 aBits2;
-// UINT16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, this field is the width of
+// sal_uInt16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, this field is the width of
// a single line of border in units of 0.75 points
// Must be nonzero when brcType is nonzero.
// 6 == dotted, 7 == dashed.
-// UINT16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
-// UINT16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
-// UINT16 ico : 5; // 07C0 color code (see chp.ico)
-// UINT16 dxpSpace : 5; // F800 width of space to maintain between border and text within border.
+// sal_uInt16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
+// sal_uInt16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
+// sal_uInt16 ico : 5; // 07C0 color code (see chp.ico)
+// sal_uInt16 dxpSpace : 5; // F800 width of space to maintain between border and text within border.
// Must be 0 when BRC is a substructure of the TC. Stored in points for Windows.
WW8_BRC()
{
@@ -271,7 +271,7 @@ public:
memset(aBits2, 0, sizeof(aBits2));
}
short DetermineBorderProperties (bool bVer67, short *pSpace=0,
- BYTE *pCol=0, short *pIdx=0) const;
+ sal_uInt8 *pCol=0, short *pIdx=0) const;
bool IsEmpty(bool bVer67) const;
bool IsZeroed(bool bVer67) const;
bool IsBlank() const;
@@ -287,9 +287,9 @@ enum BRC_Sides
class WW8_BordersSO // for StarOffice-Border Code
{
public:
- USHORT mnOut;
- USHORT mnIn;
- USHORT mnDist;
+ sal_uInt16 mnOut;
+ sal_uInt16 mnIn;
+ sal_uInt16 mnDist;
SvxBorderStyle mnType;
public:
enum eBorderCode
@@ -310,24 +310,24 @@ and are accessible through the Typography tab of the Tools/Options dialog.
class WW8DopTypography
{
public:
- void ReadFromMem(BYTE *&pData);
- void WriteToMem(BYTE *&pData) const;
+ void ReadFromMem(sal_uInt8 *&pData);
+ void WriteToMem(sal_uInt8 *&pData) const;
//Maps what I think is the language this is to affect to the OOo language
- USHORT GetConvertedLang() const;
+ sal_uInt16 GetConvertedLang() const;
- UINT16 fKerningPunct : 1; // true if we're kerning punctuation
- UINT16 iJustification : 2; // Kinsoku method of justification:
+ sal_uInt16 fKerningPunct : 1; // true if we're kerning punctuation
+ sal_uInt16 iJustification : 2; // Kinsoku method of justification:
// 0 = always expand
// 1 = compress punctuation
// 2 = compress punctuation and kana.
- UINT16 iLevelOfKinsoku : 2; // Level of Kinsoku:
+ sal_uInt16 iLevelOfKinsoku : 2; // Level of Kinsoku:
// 0 = Level 1
// 1 = Level 2
// 2 = Custom
- UINT16 f2on1 : 1; // 2-page-on-1 feature is turned on.
- UINT16 reserved1 : 4; // in 97 its marked as reserved BUT
- UINT16 reserved2 : 6; // reserved ?
+ sal_uInt16 f2on1 : 1; // 2-page-on-1 feature is turned on.
+ sal_uInt16 reserved1 : 4; // in 97 its marked as reserved BUT
+ sal_uInt16 reserved2 : 6; // reserved ?
//we find that the following applies,
//2 == Japanese
//4 == Chinese (VR...
@@ -342,8 +342,8 @@ public:
static const sal_Unicode * GetJapanNotBeginLevel1();
static const sal_Unicode * GetJapanNotEndLevel1();
- INT16 cchFollowingPunct; // length of rgxchFPunct
- INT16 cchLeadingPunct; // length of rgxchLPunct
+ sal_Int16 cchFollowingPunct; // length of rgxchFPunct
+ sal_Int16 cchLeadingPunct; // length of rgxchLPunct
// array of characters that should never appear at the start of a line
sal_Unicode rgxchFPunct[nMaxFollowing];
@@ -381,39 +381,39 @@ struct WW8_DOGRID
struct WW8_PIC
{
- INT32 lcb; // 0x0 number of bytes in the PIC structure plus size of following picture data which may be a Window's metafile, a bitmap, or the filename of a TIFF file.
- UINT16 cbHeader; // 0x4 number of bytes in the PIC (to allow for future expansion).
+ sal_Int32 lcb; // 0x0 number of bytes in the PIC structure plus size of following picture data which may be a Window's metafile, a bitmap, or the filename of a TIFF file.
+ sal_uInt16 cbHeader; // 0x4 number of bytes in the PIC (to allow for future expansion).
struct {
- INT16 mm; // 0x6 int
- INT16 xExt; // 0x8 int
- INT16 yExt; // 0xa int
- INT16 hMF; // 0xc int
+ sal_Int16 mm; // 0x6 int
+ sal_Int16 xExt; // 0x8 int
+ sal_Int16 yExt; // 0xa int
+ sal_Int16 hMF; // 0xc int
}MFP;
-// BYTE bm[14]; // 0xe BITMAP(14 bytes) Window's bitmap structure when PIC describes a BITMAP.
- BYTE rcWinMF[14]; // 0xe rc (rectangle - 8 bytes) rect for window origin
+// sal_uInt8 bm[14]; // 0xe BITMAP(14 bytes) Window's bitmap structure when PIC describes a BITMAP.
+ sal_uInt8 rcWinMF[14]; // 0xe rc (rectangle - 8 bytes) rect for window origin
// and extents when metafile is stored -- ignored if 0
- INT16 dxaGoal; // 0x1c horizontal measurement in twips of the rectangle the picture should be imaged within.
- INT16 dyaGoal; // 0x1e vertical measurement in twips of the rectangle the picture should be imaged within.
- UINT16 mx; // 0x20 horizontal scaling factor supplied by user in .1% units.
- UINT16 my; // 0x22 vertical scaling factor supplied by user in .1% units.
- INT16 dxaCropLeft; // 0x24 the amount the picture has been cropped on the left in twips.
- INT16 dyaCropTop; // 0x26 the amount the picture has been cropped on the top in twips.
- INT16 dxaCropRight; // 0x28 the amount the picture has been cropped on the right in twips.
- INT16 dyaCropBottom;// 0x2a the amount the picture has been cropped on the bottom in twips.
- INT16 brcl : 4; // 000F Obsolete, superseded by brcTop, etc. In
- INT16 fFrameEmpty : 1; // 0010 picture consists of a single frame
- INT16 fBitmap : 1; // 0020 ==1, when picture is just a bitmap
- INT16 fDrawHatch : 1; // 0040 ==1, when picture is an active OLE object
- INT16 fError : 1; // 0080 ==1, when picture is just an error message
- INT16 bpp : 8; // FF00 bits per pixel, 0 = unknown
+ sal_Int16 dxaGoal; // 0x1c horizontal measurement in twips of the rectangle the picture should be imaged within.
+ sal_Int16 dyaGoal; // 0x1e vertical measurement in twips of the rectangle the picture should be imaged within.
+ sal_uInt16 mx; // 0x20 horizontal scaling factor supplied by user in .1% units.
+ sal_uInt16 my; // 0x22 vertical scaling factor supplied by user in .1% units.
+ sal_Int16 dxaCropLeft; // 0x24 the amount the picture has been cropped on the left in twips.
+ sal_Int16 dyaCropTop; // 0x26 the amount the picture has been cropped on the top in twips.
+ sal_Int16 dxaCropRight; // 0x28 the amount the picture has been cropped on the right in twips.
+ sal_Int16 dyaCropBottom;// 0x2a the amount the picture has been cropped on the bottom in twips.
+ sal_Int16 brcl : 4; // 000F Obsolete, superseded by brcTop, etc. In
+ sal_Int16 fFrameEmpty : 1; // 0010 picture consists of a single frame
+ sal_Int16 fBitmap : 1; // 0020 ==1, when picture is just a bitmap
+ sal_Int16 fDrawHatch : 1; // 0040 ==1, when picture is an active OLE object
+ sal_Int16 fError : 1; // 0080 ==1, when picture is just an error message
+ sal_Int16 bpp : 8; // FF00 bits per pixel, 0 = unknown
WW8_BRC rgbrc[4];
// BRC brcTop; // 0x2e specification for border above picture
// BRC brcLeft; // 0x30 specification for border to the left
// BRC brcBottom; // 0x32 specification for border below picture
// BRC brcRight; // 0x34 specification for border to the right
- INT16 dxaOrigin; // 0x36 horizontal offset of hand annotation origin
- INT16 dyaOrigin; // 0x38 vertical offset of hand annotation origin
-// BYTE rgb[]; // 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
+ sal_Int16 dxaOrigin; // 0x36 horizontal offset of hand annotation origin
+ sal_Int16 dyaOrigin; // 0x38 vertical offset of hand annotation origin
+// sal_uInt8 rgb[]; // 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
};
struct WW8_PIC_SHADOW
@@ -453,26 +453,26 @@ struct WW8_PIC_SHADOW
struct WW8_TBD
{
SVBT8 aBits1;
-// BYTE jc : 3; // 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar
-// BYTE tlc : 3; // 0x38 tab leader code: 0=no leader, 1=dotted leader,
+// sal_uInt8 jc : 3; // 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar
+// sal_uInt8 tlc : 3; // 0x38 tab leader code: 0=no leader, 1=dotted leader,
// 2=hyphenated leader, 3=single line leader, 4=heavy line leader
// * int :2 C0 reserved
};
struct WW8_TCell // hiermit wird weitergearbeitet (entspricht weitestgehend dem Ver8-Format)
{
- BYTE bFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
- BYTE bMerged : 1;// 0002 set to 1 when cell has been merged with preceding cell.
- BYTE bVertical : 1;// set to 1 when cell has vertical text flow
- BYTE bBackward : 1;// for a vertical table cell, text flow is bottom to top when 1 and is bottom to top when 0.
- BYTE bRotateFont : 1;// set to 1 when cell has rotated characters (i.e. uses @font)
- BYTE bVertMerge : 1;// set to 1 when cell is vertically merged with the cell(s) above and/or below. When cells are vertically merged, the display area of the merged cells are consolidated. The consolidated area is used to display the contents of the first vertically merged cell (the cell with fVertRestart set to 1), and all other vertically merged cells (those with fVertRestart set to 0) must be empty. Cells can only be merged vertically if their left and right boundaries are (nearly) identical (i.e. if corresponding entries in rgdxaCenter of the table rows differ by at most 3).
- BYTE bVertRestart : 1;// set to 1 when the cell is the first of a set of vertically merged cells. The contents of a cell with fVertStart set to 1 are displayed in the consolidated area belonging to the entire set of vertically merged cells. Vertically merged cells with fVertRestart set to 0 must be empty.
- BYTE nVertAlign : 2;// specifies the alignment of the cell contents relative to text flow (e.g. in a cell with bottom to top text flow and bottom vertical alignment, the text is shifted horizontally to match the cell's right boundary):
+ sal_uInt8 bFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
+ sal_uInt8 bMerged : 1;// 0002 set to 1 when cell has been merged with preceding cell.
+ sal_uInt8 bVertical : 1;// set to 1 when cell has vertical text flow
+ sal_uInt8 bBackward : 1;// for a vertical table cell, text flow is bottom to top when 1 and is bottom to top when 0.
+ sal_uInt8 bRotateFont : 1;// set to 1 when cell has rotated characters (i.e. uses @font)
+ sal_uInt8 bVertMerge : 1;// set to 1 when cell is vertically merged with the cell(s) above and/or below. When cells are vertically merged, the display area of the merged cells are consolidated. The consolidated area is used to display the contents of the first vertically merged cell (the cell with fVertRestart set to 1), and all other vertically merged cells (those with fVertRestart set to 0) must be empty. Cells can only be merged vertically if their left and right boundaries are (nearly) identical (i.e. if corresponding entries in rgdxaCenter of the table rows differ by at most 3).
+ sal_uInt8 bVertRestart : 1;// set to 1 when the cell is the first of a set of vertically merged cells. The contents of a cell with fVertStart set to 1 are displayed in the consolidated area belonging to the entire set of vertically merged cells. Vertically merged cells with fVertRestart set to 0 must be empty.
+ sal_uInt8 nVertAlign : 2;// specifies the alignment of the cell contents relative to text flow (e.g. in a cell with bottom to top text flow and bottom vertical alignment, the text is shifted horizontally to match the cell's right boundary):
// 0 top
// 1 center
// 2 bottom
- UINT16 fUnused : 7;// reserved - nicht loeschen: macht das UINT16 voll !!
+ sal_uInt16 fUnused : 7;// reserved - nicht loeschen: macht das sal_uInt16 voll !!
WW8_BRC rgbrc[4]; // border codes
//notational convenience for referring to brcTop, brcLeft, etc fields.
@@ -488,9 +488,9 @@ struct WW8_TCellVer6 // wird aus der Datei gelesen
{
SVBT8 aBits1Ver6;
SVBT8 aBits2Ver6;
-// UINT16 fFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
-// UINT16 fMerged : 1; // 0002 set to 1 when cell has been merged with preceding cell.
-// UINT16 fUnused : 14; // FFFC reserved
+// sal_uInt16 fFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
+// sal_uInt16 fMerged : 1; // 0002 set to 1 when cell has been merged with preceding cell.
+// sal_uInt16 fUnused : 14; // FFFC reserved
WW8_BRCVer6 rgbrcVer6[4];
// notational convenience for referring to brcTop, brcLeft, etc fields:
// BRC brcTop; // specification of the top border of a table cell
@@ -512,36 +512,36 @@ struct WW8_TCellVer8 // wird aus der Datei gelesen
struct WW8_SHD // struct SHD fehlt in der Beschreibung
{
private:
- UINT16 maBits;
-// UINT16 nFore : 5; // 0x001f ForegroundColor
-// UINT16 nBack : 5; // 0x03e0 BackgroundColor
-// UINT16 nStyle : 5; // 0x7c00 Percentage and Style
-// UINT16 nDontKnow : 1; // 0x8000 ??? ab Ver8: ebenfalls fuer Style
+ sal_uInt16 maBits;
+// sal_uInt16 nFore : 5; // 0x001f ForegroundColor
+// sal_uInt16 nBack : 5; // 0x03e0 BackgroundColor
+// sal_uInt16 nStyle : 5; // 0x7c00 Percentage and Style
+// sal_uInt16 nDontKnow : 1; // 0x8000 ??? ab Ver8: ebenfalls fuer Style
public:
WW8_SHD() : maBits(0) {}
- BYTE GetFore() const { return (BYTE)( maBits & 0x1f); }
- BYTE GetBack() const { return (BYTE)((maBits >> 5 ) & 0x1f); }
- BYTE GetStyle(bool bVer67) const
- { return (BYTE)((maBits >> 10) & ( bVer67 ? 0x1f : 0x3f ) ); }
+ sal_uInt8 GetFore() const { return (sal_uInt8)( maBits & 0x1f); }
+ sal_uInt8 GetBack() const { return (sal_uInt8)((maBits >> 5 ) & 0x1f); }
+ sal_uInt8 GetStyle(bool bVer67) const
+ { return (sal_uInt8)((maBits >> 10) & ( bVer67 ? 0x1f : 0x3f ) ); }
- UINT16 GetValue() const { return maBits; }
+ sal_uInt16 GetValue() const { return maBits; }
- void SetValue(UINT16 nVal) { maBits = nVal; }
+ void SetValue(sal_uInt16 nVal) { maBits = nVal; }
void SetWWValue(SVBT16 nVal) { maBits = SVBT16ToShort(nVal); }
- void SetFore(BYTE nVal)
+ void SetFore(sal_uInt8 nVal)
{
maBits &= 0xffe0;
maBits |= (nVal & 0x1f);
}
- void SetBack(BYTE nVal)
+ void SetBack(sal_uInt8 nVal)
{
maBits &= 0xfc1f;
maBits |= (nVal & 0x1f) << 5;
}
- void SetStyle(bool bVer67, BYTE nVal)
+ void SetStyle(bool bVer67, sal_uInt8 nVal)
{
if (bVer67)
{
@@ -563,29 +563,29 @@ struct WW8_ANLV
SVBT8 cbTextBefore; // 1 offset into anld.rgch limit of prefix text
SVBT8 cbTextAfter; // 2
SVBT8 aBits1;
-// BYTE jc : 2; // 3 : 0x03 justification code, 0=left, 1=center, 2=right, 3=left and right justify
-// BYTE fPrev : 1; // 0x04 when ==1, include previous levels
-// BYTE fHang : 1; // 0x08 when ==1, number will be displayed using a hanging indent
-// BYTE fSetBold : 1; // 0x10 when ==1, boldness of number will be determined by anld.fBold.
-// BYTE fSetItalic : 1;// 0x20 when ==1, italicness of number will be determined by anld.fItalic
-// BYTE fSetSmallCaps : 1;// 0x40 when ==1, anld.fSmallCaps will determine whether number will be displayed in small caps or not.
-// BYTE fSetCaps : 1; // 0x80 when ==1, anld.fCaps will determine whether number will be displayed capitalized or not
+// sal_uInt8 jc : 2; // 3 : 0x03 justification code, 0=left, 1=center, 2=right, 3=left and right justify
+// sal_uInt8 fPrev : 1; // 0x04 when ==1, include previous levels
+// sal_uInt8 fHang : 1; // 0x08 when ==1, number will be displayed using a hanging indent
+// sal_uInt8 fSetBold : 1; // 0x10 when ==1, boldness of number will be determined by anld.fBold.
+// sal_uInt8 fSetItalic : 1;// 0x20 when ==1, italicness of number will be determined by anld.fItalic
+// sal_uInt8 fSetSmallCaps : 1;// 0x40 when ==1, anld.fSmallCaps will determine whether number will be displayed in small caps or not.
+// sal_uInt8 fSetCaps : 1; // 0x80 when ==1, anld.fCaps will determine whether number will be displayed capitalized or not
SVBT8 aBits2;
-// BYTE fSetStrike : 1;// 4 : 0x01 when ==1, anld.fStrike will determine whether the number will be displayed using strikethrough or not.
-// BYTE fSetKul : 1; // 0x02 when ==1, anld.kul will determine the underlining state of the autonumber.
-// BYTE fPrevSpace : 1;// 0x04 when ==1, autonumber will be displayed with a single prefixing space character
-// BYTE fBold : 1; // 0x08 determines boldness of autonumber when anld.fSetBold == 1.
-// BYTE fItalic : 1; // 0x10 determines italicness of autonumber when anld.fSetItalic == 1.
-// BYTE fSmallCaps : 1;// 0x20 determines whether autonumber will be displayed using small caps when anld.fSetSmallCaps == 1.
-// BYTE fCaps : 1; // 0x40 determines whether autonumber will be displayed using caps when anld.fSetCaps == 1.
-// BYTE fStrike : 1; // 0x80 determines whether autonumber will be displayed using caps when anld.fSetStrike == 1.
+// sal_uInt8 fSetStrike : 1;// 4 : 0x01 when ==1, anld.fStrike will determine whether the number will be displayed using strikethrough or not.
+// sal_uInt8 fSetKul : 1; // 0x02 when ==1, anld.kul will determine the underlining state of the autonumber.
+// sal_uInt8 fPrevSpace : 1;// 0x04 when ==1, autonumber will be displayed with a single prefixing space character
+// sal_uInt8 fBold : 1; // 0x08 determines boldness of autonumber when anld.fSetBold == 1.
+// sal_uInt8 fItalic : 1; // 0x10 determines italicness of autonumber when anld.fSetItalic == 1.
+// sal_uInt8 fSmallCaps : 1;// 0x20 determines whether autonumber will be displayed using small caps when anld.fSetSmallCaps == 1.
+// sal_uInt8 fCaps : 1; // 0x40 determines whether autonumber will be displayed using caps when anld.fSetCaps == 1.
+// sal_uInt8 fStrike : 1; // 0x80 determines whether autonumber will be displayed using caps when anld.fSetStrike == 1.
SVBT8 aBits3;
-// BYTE kul : 3; // 5 : 0x07 determines whether autonumber will be displayed with underlining when anld.fSetKul == 1.
-// BYTE ico : 5; // 0xF1 color of autonumber
+// sal_uInt8 kul : 3; // 5 : 0x07 determines whether autonumber will be displayed with underlining when anld.fSetKul == 1.
+// sal_uInt8 ico : 5; // 0xF1 color of autonumber
SVBT16 ftc; // 6 font code of autonumber
SVBT16 hps; // 8 font half point size (or 0=auto)
SVBT16 iStartAt; // 0x0a starting value (0 to 65535)
- SVBT16 dxaIndent; // 0x0c *short?* *USHORT?* width of prefix text (same as indent)
+ SVBT16 dxaIndent; // 0x0c *short?* *sal_uInt16?* width of prefix text (same as indent)
SVBT16 dxaSpace; // 0x0e minimum space between number and paragraph
};
// *cbANLV (count of bytes of ANLV) is 16 (decimal), 10(hex).
@@ -597,7 +597,7 @@ struct WW8_ANLD
SVBT8 fNumberAcross; // 0x11 number across cells in table rows(instead of down)
SVBT8 fRestartHdn; // 0x12 restart heading number on section boundary
SVBT8 fSpareX; // 0x13 unused( should be 0)
- BYTE rgchAnld[32]; // 0x14 characters displayed before/after autonumber
+ sal_uInt8 rgchAnld[32]; // 0x14 characters displayed before/after autonumber
};
struct WW8_OLST
@@ -607,7 +607,7 @@ struct WW8_OLST
SVBT8 fSpareOlst2; // 0x91 reserved
SVBT8 fSpareOlst3; // 0x92 reserved
SVBT8 fSpareOlst4; // 0x93 reserved
- BYTE rgch[64]; // 0x94 array of 64 chars text before/after number
+ sal_uInt8 rgch[64]; // 0x94 array of 64 chars text before/after number
};
// cbOLST is 212(decimal), D4(hex).
@@ -625,8 +625,8 @@ struct WW8_DO
SVBT8 by; // 5 y position relative to anchor CP
SVBT16 dhgt; // 6 height of DO
SVBT16 aBits1;
-// UINT16 fAnchorLock : 1; // 8 1 if the DO anchor is locked
-// BYTE[] rgdp; // 0xa variable length array of drawing primitives
+// sal_uInt16 fAnchorLock : 1; // 8 1 if the DO anchor is locked
+// sal_uInt8[] rgdp; // 0xa variable length array of drawing primitives
};
struct WW8_DPHEAD
@@ -668,16 +668,16 @@ struct WW8_DP_FILL
struct WW8_DP_LINEEND
{
SVBT16 aStartBits;
-// UINT16 eppsStart : 2; // Start EndPoint Property Style
+// sal_uInt16 eppsStart : 2; // Start EndPoint Property Style
// 0=None, 1=Hollow, 2=Filled
-// UINT16 eppwStart : 2; // Start EndPoint Property Weight
-// UINT16 epplStart : 2; // Start EndPoint Property length
-// UINT16 dummyStart : 10; // Alignment
+// sal_uInt16 eppwStart : 2; // Start EndPoint Property Weight
+// sal_uInt16 epplStart : 2; // Start EndPoint Property length
+// sal_uInt16 dummyStart : 10; // Alignment
SVBT16 aEndBits;
-// UINT16 eppsEnd : 2; // End EndPoint Property Style
-// UINT16 eppwEnd : 2; // End EndPoint Property Weight
-// UINT16 epplEnd : 2; // End EndPoint Property length
-// UINT16 dummyEnd : 10; // Alignment
+// sal_uInt16 eppsEnd : 2; // End EndPoint Property Style
+// sal_uInt16 eppwEnd : 2; // End EndPoint Property Weight
+// sal_uInt16 epplEnd : 2; // End EndPoint Property length
+// sal_uInt16 dummyEnd : 10; // Alignment
};
struct WW8_DP_LINE
@@ -698,8 +698,8 @@ struct WW8_DP_TXTBOX
WW8_DP_FILL aFill;
WW8_DP_SHADOW aShd;
SVBT16 aBits1;
-// UINT16 fRoundCorners : 1; //0x24 0001 1 if the textbox has rounded corners
-// UINT16 zaShape : 15; // 0x24 000e REVIEW davebu
+// sal_uInt16 fRoundCorners : 1; //0x24 0001 1 if the textbox has rounded corners
+// sal_uInt16 zaShape : 15; // 0x24 000e REVIEW davebu
SVBT16 dzaInternalMargin; // 0x26 REVIEW davebu
};
@@ -709,8 +709,8 @@ struct WW8_DP_RECT
WW8_DP_FILL aFill;
WW8_DP_SHADOW aShd;
SVBT16 aBits1;
-// UINT16 fRoundCorners : 1; // 0x24 0001 1 if the textbox has rounded corners
-// UINT16 zaShape : 15; // 0x24 000e REVIEW davebu
+// sal_uInt16 fRoundCorners : 1; // 0x24 0001 1 if the textbox has rounded corners
+// sal_uInt16 zaShape : 15; // 0x24 000e REVIEW davebu
};
struct WW8_DP_ARC
@@ -720,8 +720,8 @@ struct WW8_DP_ARC
WW8_DP_SHADOW aShd;
SVBT8 fLeft; // 0x24 00ff REVIEW davebu
SVBT8 fUp; // 0x24 ff00 REVIEW davebu
-// UINT16 fLeft : 8; // 0x24 00ff REVIEW davebu
-// UINT16 fUp : 8; // 0x24 ff00 REVIEW davebu
+// sal_uInt16 fLeft : 8; // 0x24 00ff REVIEW davebu
+// sal_uInt16 fUp : 8; // 0x24 ff00 REVIEW davebu
};
struct WW8_DP_ELIPSE
@@ -738,8 +738,8 @@ struct WW8_DP_POLYLINE
WW8_DP_LINEEND aEpp;
WW8_DP_SHADOW aShd;
SVBT16 aBits1;
-// UINT16 fPolygon : 1; // 0x28 0001 1 if this is a polygon
-// UINT16 cpt : 15; // 0x28 00fe count of points
+// sal_uInt16 fPolygon : 1; // 0x28 0001 1 if this is a polygon
+// sal_uInt16 cpt : 15; // 0x28 00fe count of points
// short xaFirst; // 0x2a These are the endpoints of the first line.
// short yaFirst; // 0x2c
// short xaEnd; // 0x2e
@@ -762,9 +762,9 @@ struct WW8_DP_CALLOUT_TXTBOX
struct WW8_PCD
{
SVBT8 aBits1;
-// BYTE fNoParaLast : 1; // when 1, means that piece contains no end of paragraph marks.
-// BYTE fPaphNil : 1; // used internally by Word
-// BYTE fCopied : 1; // used internally by Word
+// sal_uInt8 fNoParaLast : 1; // when 1, means that piece contains no end of paragraph marks.
+// sal_uInt8 fPaphNil : 1; // used internally by Word
+// sal_uInt8 fCopied : 1; // used internally by Word
// * int :5
SVBT8 aBits2; // fn int:8, used internally by Word
SVBT32 fc; // file offset of beginning of piece. The size of the
@@ -815,14 +815,14 @@ struct WW67_ATRD // fuer die 6/7-Version
struct WW8_TablePos
{
- INT16 nSp26;
- INT16 nSp27;
- INT16 nLeMgn;
- INT16 nRiMgn;
- INT16 nUpMgn;
- INT16 nLoMgn;
- BYTE nSp29;
- BYTE nSp37;
+ sal_Int16 nSp26;
+ sal_Int16 nSp27;
+ sal_Int16 nLeMgn;
+ sal_Int16 nRiMgn;
+ sal_Int16 nUpMgn;
+ sal_Int16 nLoMgn;
+ sal_uInt8 nSp29;
+ sal_uInt8 nSp37;
};
struct WW8_FSPA
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index aea460f20940..ade7d08baf9c 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -668,8 +668,8 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
// create redline (using pRedlineData which gets copied in SwRedline())
SwRedlineData* pRedlineData = ConvertRedline(pRedlineInfo, pDoc);
SwRedline* pRedline =
- new SwRedline( pRedlineData, *aPaM.GetPoint(), TRUE,
- !pRedlineInfo->bMergeLastParagraph, FALSE );
+ new SwRedline( pRedlineData, *aPaM.GetPoint(), sal_True,
+ !pRedlineInfo->bMergeLastParagraph, sal_False );
// set mark
if( aPaM.HasMark() )
@@ -681,7 +681,7 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
// set content node (if necessary)
if (NULL != pRedlineInfo->pContentIndex)
{
- ULONG nPoint = aPaM.GetPoint()->nNode.GetIndex();
+ sal_uLong nPoint = aPaM.GetPoint()->nNode.GetIndex();
if( nPoint < pRedlineInfo->pContentIndex->GetIndex() ||
nPoint > pRedlineInfo->pContentIndex->GetNode().EndOfSectionIndex() )
pRedline->SetContentIdx(pRedlineInfo->pContentIndex);
diff --git a/sw/source/filter/xml/makefile.mk b/sw/source/filter/xml/makefile.mk
deleted file mode 100644
index 10a653fc7ac0..000000000000
--- a/sw/source/filter/xml/makefile.mk
+++ /dev/null
@@ -1,76 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=xml
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(mydebug)" != ""
-CDEFS=$(CDEFS) -Dmydebug
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/xmlimpit.obj \
- $(SLO)$/xmlitemm.obj \
- $(SLO)$/xmlitmpr.obj
-
-EXCEPTIONSFILES= \
- $(SLO)$/XMLRedlineImportHelper.obj \
- $(SLO)$/swxml.obj \
- $(SLO)$/wrtxml.obj \
- $(SLO)$/xmlbrsh.obj \
- $(SLO)$/xmlexp.obj \
- $(SLO)$/xmlexpit.obj \
- $(SLO)$/xmlfmt.obj \
- $(SLO)$/xmlfmte.obj \
- $(SLO)$/xmlfonte.obj \
- $(SLO)$/xmlimp.obj \
- $(SLO)$/xmlitem.obj \
- $(SLO)$/xmliteme.obj \
- $(SLO)$/xmlitemi.obj \
- $(SLO)$/xmlithlp.obj \
- $(SLO)$/xmlmeta.obj \
- $(SLO)$/xmlscript.obj \
- $(SLO)$/xmltble.obj \
- $(SLO)$/xmltbli.obj \
- $(SLO)$/xmltext.obj \
- $(SLO)$/xmltexte.obj \
- $(SLO)$/xmltexti.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 09066b5e6b13..c7458c85f228 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -115,8 +115,8 @@ void lcl_EnsureValidPam( SwPaM& rPam )
// else: point was already valid
// if mark is invalid, we delete it
- if( ( rPam.GetCntntNode( FALSE ) == NULL ) ||
- ( rPam.GetCntntNode( FALSE ) != rPam.GetMark()->nContent.GetIdxReg() ) )
+ if( ( rPam.GetCntntNode( sal_False ) == NULL ) ||
+ ( rPam.GetCntntNode( sal_False ) != rPam.GetMark()->nContent.GetIdxReg() ) )
{
rPam.DeleteMark();
}
@@ -410,7 +410,7 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
String aDefOutlStyleNames[ MAXLEVEL ];
{
String sStyleName;
- for ( BYTE i = 0; i < MAXLEVEL; ++i )
+ for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
{
sStyleName =
SwStyleNameMapper::GetProgName( static_cast< sal_uInt16 >(RES_POOLCOLL_HEADLINE1 + i),
@@ -425,7 +425,7 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
SwTxtFmtColl* aCreatedDefaultOutlineStyles[ MAXLEVEL ];
{
- for ( BYTE i = 0; i < MAXLEVEL; ++i )
+ for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
{
aOutlineLevelAssigned[ i ] = false;
aCreatedDefaultOutlineStyles[ i ] = 0L;
@@ -435,7 +435,7 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
// determine, which outline level has already a style assigned and
// which of the default outline styles is created.
const SwTxtFmtColls& rColls = *(_rDoc.GetTxtFmtColls());
- for ( USHORT n = 1; n < rColls.Count(); ++n )
+ for ( sal_uInt16 n = 1; n < rColls.Count(); ++n )
{
SwTxtFmtColl* pColl = rColls[ n ];
if ( pColl->IsAssignedToListLevelOfOutlineStyle() )
@@ -443,7 +443,7 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
aOutlineLevelAssigned[ pColl->GetAssignedOutlineStyleLevel() ] = true;//<-end,zhaojianwei
}
- for ( BYTE i = 0; i < MAXLEVEL; ++i )
+ for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
{
if ( aCreatedDefaultOutlineStyles[ i ] == 0L &&
pColl->GetName() == aDefOutlStyleNames[i] )
@@ -457,7 +457,7 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
// assign already created default outline style to outline level, which
// doesn't have a style assigned to it.
const SwNumRule* pOutlineRule = _rDoc.GetOutlineNumRule();
- for ( BYTE i = 0; i < MAXLEVEL; ++i )
+ for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
{
// #i73361#
// Do not change assignment of already created default outline style
@@ -472,7 +472,7 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
// apply outline numbering rule, if none is set.
const SfxPoolItem& rItem =
- aCreatedDefaultOutlineStyles[ i ]->GetFmtAttr( RES_PARATR_NUMRULE, FALSE );
+ aCreatedDefaultOutlineStyles[ i ]->GetFmtAttr( RES_PARATR_NUMRULE, sal_False );
if ( static_cast<const SwNumRuleItem&>(rItem).GetValue().Len() == 0 )
{
SwNumRuleItem aItem( pOutlineRule->GetName() );
@@ -523,7 +523,7 @@ void lcl_ConvertSdrOle2ObjsToSdrGrafObjs( SwDoc& _rDoc )
}
-ULONG XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const String & rName )
+sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const String & rName )
{
// Get service factory
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
@@ -655,7 +655,7 @@ ULONG XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const S
// Note: Text documents read via the binary filter are also finally
// read using the OpenOffice.org file format. Thus, e.g. for text
// documents in StarOffice 5.2 binary file format this property
- // will be TRUE.
+ // will be sal_True.
{ "TextDocInOOoFileFormat", sizeof("TextDocInOOoFileFormat")-1, 0,
&::getBooleanCppuType(),
beans::PropertyAttribute::MAYBEVOID, 0 },
@@ -964,9 +964,9 @@ ULONG XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const S
// Notify math objects
if( bInsertMode )
- rDoc.PrtOLENotify( FALSE );
+ rDoc.PrtOLENotify( sal_False );
else if ( rDoc.IsOLEPrtNotifyPending() )
- rDoc.PrtOLENotify( TRUE );
+ rDoc.PrtOLENotify( sal_True );
nRet = nRet ? nRet : (nWarn ? nWarn : (nWarn2 ? nWarn2 : nWarnRDF ) );
@@ -1023,7 +1023,7 @@ ULONG XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const S
// <--
// Fix #i58251#: Unfortunately is the static default different to SO7 behaviour,
// so we have to set a dynamic default after importing SO7
- rDoc.SetDefault( SfxBoolItem( RES_ROW_SPLIT, FALSE ) );
+ rDoc.SetDefault( SfxBoolItem( RES_ROW_SPLIT, sal_False ) );
}
// <--
@@ -1066,7 +1066,7 @@ ULONG XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const S
// read the sections of the document, which is equal to the medium.
// returns the count of it
-USHORT XMLReader::GetSectionList( SfxMedium& rMedium,
+sal_uInt16 XMLReader::GetSectionList( SfxMedium& rMedium,
SvStrings& rStrings ) const
{
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index 86441a44e85f..a6bbc52d92ad 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -507,17 +507,17 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
return 0;
}
-ULONG SwXMLWriter::WriteStorage()
+sal_uLong SwXMLWriter::WriteStorage()
{
return _Write();
}
-ULONG SwXMLWriter::WriteMedium( SfxMedium& aTargetMedium )
+sal_uLong SwXMLWriter::WriteMedium( SfxMedium& aTargetMedium )
{
return _Write( &aTargetMedium );
}
-ULONG SwXMLWriter::Write( SwPaM& rPaM, SfxMedium& rMed,
+sal_uLong SwXMLWriter::Write( SwPaM& rPaM, SfxMedium& rMed,
const String* pFileName )
{
return IsStgWriter()
diff --git a/sw/source/filter/xml/wrtxml.hxx b/sw/source/filter/xml/wrtxml.hxx
index a622d59a362d..b53b952db616 100644
--- a/sw/source/filter/xml/wrtxml.hxx
+++ b/sw/source/filter/xml/wrtxml.hxx
@@ -53,15 +53,15 @@ class SwXMLWriter : public StgWriter
using StgWriter::Write;
protected:
- virtual ULONG WriteStorage();
- virtual ULONG WriteMedium( SfxMedium& aTargetMedium );
+ virtual sal_uLong WriteStorage();
+ virtual sal_uLong WriteMedium( SfxMedium& aTargetMedium );
public:
SwXMLWriter( const String& rBaseURL );
virtual ~SwXMLWriter();
- virtual ULONG Write( SwPaM&, SfxMedium&, const String* = 0 );
+ virtual sal_uLong Write( SwPaM&, SfxMedium&, const String* = 0 );
private:
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 84ba81b868f5..ad314a6a1177 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -240,10 +240,10 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
for( sal_uInt16 j=0; j < nWhichIds; j++ )
{
sal_uInt16 nWhichId = aWhichIds[j];
- sal_uInt16 i=0, nItems = rPool.GetItemCount( nWhichId );
+ sal_uInt32 i=0, nItems = rPool.GetItemCount2( nWhichId );
for( i = 0; i < nItems; ++i )
{
- if( 0 != (pItem = rPool.GetItem( nWhichId , i ) ) )
+ if( 0 != (pItem = rPool.GetItem2( nWhichId , i ) ) )
{
const SvXMLAttrContainerItem *pUnknown =
PTR_CAST( SvXMLAttrContainerItem, pItem );
diff --git a/sw/source/filter/xml/xmlexp.hxx b/sw/source/filter/xml/xmlexp.hxx
index eb4a92e7bc05..779cdbfbf602 100644
--- a/sw/source/filter/xml/xmlexp.hxx
+++ b/sw/source/filter/xml/xmlexp.hxx
@@ -103,7 +103,7 @@ class SwXMLExport : public SvXMLExport
SwXMLTableInfo_Impl& rTblInfo );
void ExportTableLines( const SwTableLines& rLines,
SwXMLTableInfo_Impl& rTblInfo,
- USHORT nHeaderRows = 0 );
+ sal_uInt16 nHeaderRows = 0 );
virtual void _ExportMeta();
virtual void _ExportFontDecls();
diff --git a/sw/source/filter/xml/xmlfonte.cxx b/sw/source/filter/xml/xmlfonte.cxx
index ea9ec6b3d404..222a388615b0 100644
--- a/sw/source/filter/xml/xmlfonte.cxx
+++ b/sw/source/filter/xml/xmlfonte.cxx
@@ -81,10 +81,10 @@ SwXMLFontAutoStylePool_Impl::SwXMLFontAutoStylePool_Impl(
Add( rFont.GetFamilyName(), rFont.GetStyleName(),
static_cast< sal_uInt16 >(rFont.GetFamily()), static_cast< sal_uInt16 >(rFont.GetPitch()),
rFont.GetCharSet() );
- sal_uInt16 nItems = rPool.GetItemCount( nWhichId );
- for( sal_uInt16 j = 0; j < nItems; ++j )
+ sal_uInt32 nItems = rPool.GetItemCount2( nWhichId );
+ for( sal_uInt32 j = 0; j < nItems; ++j )
{
- if( 0 != (pItem = rPool.GetItem( nWhichId, j ) ) )
+ if( 0 != (pItem = rPool.GetItem2( nWhichId, j ) ) )
{
const SvxFontItem *pFont =
(const SvxFontItem *)pItem;
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 00deda59fa55..b0904f059e0b 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -869,7 +869,7 @@ void SwXMLImport::endDocument( void )
if( !pPos->nContent.GetIndex() )
{
SwTxtNode* pCurrNd;
- ULONG nNodeIdx = pPos->nNode.GetIndex();
+ sal_uLong nNodeIdx = pPos->nNode.GetIndex();
pDoc = pPaM->GetDoc();
DBG_ASSERT( pPos->nNode.GetNode().IsCntntNode(),
@@ -944,9 +944,9 @@ void SwXMLImport::endDocument( void )
// Notify math objects. If we are in the package filter this will
// be done by the filter object itself
if( IsInsertMode() )
- pDoc->PrtOLENotify( FALSE );
+ pDoc->PrtOLENotify( sal_False );
else if ( pDoc->IsOLEPrtNotifyPending() )
- pDoc->PrtOLENotify( TRUE );
+ pDoc->PrtOLENotify( sal_True );
}
// SJ: #i49801# -> now permitting repaints
@@ -1194,7 +1194,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
const PropertyValue* pValues = aConfigProps.getConstArray();
SvtSaveOptions aSaveOpt;
- BOOL bIsUserSetting = aSaveOpt.IsLoadUserSettings(),
+ sal_Bool bIsUserSetting = aSaveOpt.IsLoadUserSettings(),
bSet = bIsUserSetting;
// for some properties we don't want to use the application
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index 1dd8295293b3..889902f6a3a2 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -67,7 +67,7 @@ using uno::Any;
SvXMLImportItemMapper::SvXMLImportItemMapper(
SvXMLItemMapEntriesRef rMapEntries,
- USHORT nUnknWhich ) :
+ sal_uInt16 nUnknWhich ) :
mrMapEntries( rMapEntries ),
nUnknownWhich( nUnknWhich )
{
@@ -83,14 +83,14 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
const SvXMLUnitConverter& rUnitConverter,
const SvXMLNamespaceMap& rNamespaceMap ) const
{
- INT16 nAttr = xAttrList->getLength();
+ sal_Int16 nAttr = xAttrList->getLength();
SvXMLAttrContainerItem *pUnknownItem = 0;
- for( INT16 i=0; i < nAttr; i++ )
+ for( sal_Int16 i=0; i < nAttr; i++ )
{
const OUString& rAttrName = xAttrList->getNameByIndex( i );
OUString aLocalName, aPrefix, aNamespace;
- USHORT nPrefix =
+ sal_uInt16 nPrefix =
rNamespaceMap.GetKeyByAttrName( rAttrName, &aPrefix, &aLocalName,
&aNamespace );
if( XML_NAMESPACE_XMLNS == nPrefix )
@@ -109,7 +109,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
{
// first get item from itemset
const SfxPoolItem* pItem = 0;
- SfxItemState eState = rSet.GetItemState( pEntry->nWhichId, TRUE,
+ SfxItemState eState = rSet.GetItemState( pEntry->nWhichId, sal_True,
&pItem );
// if its not set, try the pool
@@ -120,7 +120,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
if(eState >= SFX_ITEM_DEFAULT && pItem)
{
SfxPoolItem *pNewItem = pItem->Clone();
- BOOL bPut = FALSE;
+ sal_Bool bPut = sal_False;
if( 0 == (pEntry->nMemberId&MID_SW_FLAG_SPECIAL_ITEM_IMPORT) )
{
@@ -157,7 +157,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
if( !pUnknownItem )
{
const SfxPoolItem* pItem = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( nUnknownWhich, TRUE,
+ if( SFX_ITEM_SET == rSet.GetItemState( nUnknownWhich, sal_True,
&pItem ) )
{
SfxPoolItem *pNew = pItem->Clone();
@@ -194,7 +194,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
/** this method is called for every item that has the
MID_SW_FLAG_SPECIAL_ITEM_IMPORT flag set */
-BOOL
+sal_Bool
SvXMLImportItemMapper::handleSpecialItem( const SvXMLItemMapEntry& /*rEntry*/,
SfxPoolItem& /*rItem*/,
SfxItemSet& /*rSet*/,
@@ -203,19 +203,19 @@ SvXMLImportItemMapper::handleSpecialItem( const SvXMLItemMapEntry& /*rEntry*/,
const SvXMLNamespaceMap& /*rNamespaceMap*/ ) const
{
OSL_FAIL( "unsuported special item in xml import" );
- return FALSE;
+ return sal_False;
}
/** this method is called for every item that has the
MID_SW_FLAG_NO_ITEM_IMPORT flag set */
-BOOL SvXMLImportItemMapper::handleNoItem( const SvXMLItemMapEntry& /*rEntry*/,
+sal_Bool SvXMLImportItemMapper::handleNoItem( const SvXMLItemMapEntry& /*rEntry*/,
SfxItemSet& /*rSet*/,
const OUString& /*rValue*/,
const SvXMLUnitConverter& /*rUnitConverter*/,
const SvXMLNamespaceMap& /*rNamespaceMap*/ ) const
{
OSL_FAIL( "unsuported no item in xml import" );
- return FALSE;
+ return sal_False;
}
void SvXMLImportItemMapper::finished( SfxItemSet& ) const
@@ -389,7 +389,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
if( nX < 0 ) nX *= -1;
if( nY < 0 ) nY *= -1;
- pShadow->SetWidth( static_cast< USHORT >( (nX + nY) >> 1 ) );
+ pShadow->SetWidth( static_cast< sal_uInt16 >( (nX + nY) >> 1 ) );
}
}
}
@@ -594,12 +594,12 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
switch( nMemberId )
{
case MID_BREAK_BEFORE:
- pFmtBreak->SetValue( static_cast< USHORT >((eEnum == 1) ?
+ pFmtBreak->SetValue( static_cast< sal_uInt16 >((eEnum == 1) ?
SVX_BREAK_COLUMN_BEFORE :
SVX_BREAK_PAGE_BEFORE) );
break;
case MID_BREAK_AFTER:
- pFmtBreak->SetValue( static_cast< USHORT >((eEnum == 1) ?
+ pFmtBreak->SetValue( static_cast< sal_uInt16 >((eEnum == 1) ?
SVX_BREAK_COLUMN_AFTER :
SVX_BREAK_PAGE_AFTER) );
break;
@@ -781,7 +781,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
sal_Int32 nVal;
bOk = rUnitConverter.convertNumber( nVal, rValue, 0, USHRT_MAX );
if( bOk )
- pPageDesc->SetNumOffset( (USHORT)nVal );
+ pPageDesc->SetNumOffset( (sal_uInt16)nVal );
}
}
break;
diff --git a/sw/source/filter/xml/xmlimpit.hxx b/sw/source/filter/xml/xmlimpit.hxx
index 0734dbbf67bc..578084ee972a 100644
--- a/sw/source/filter/xml/xmlimpit.hxx
+++ b/sw/source/filter/xml/xmlimpit.hxx
@@ -48,11 +48,11 @@ class SvXMLImportItemMapper
{
protected:
SvXMLItemMapEntriesRef mrMapEntries;
- USHORT nUnknownWhich;
+ sal_uInt16 nUnknownWhich;
public:
SvXMLImportItemMapper( SvXMLItemMapEntriesRef rMapEntries ,
- USHORT nUnknWhich=USHRT_MAX );
+ sal_uInt16 nUnknWhich=USHRT_MAX );
virtual ~SvXMLImportItemMapper();
/** fills the given itemset with the attributes in the given list */
@@ -63,7 +63,7 @@ public:
/** this method is called for every item that has the
MID_SW_FLAG_SPECIAL_ITEM_IMPORT flag set */
- virtual BOOL handleSpecialItem( const SvXMLItemMapEntry& rEntry,
+ virtual sal_Bool handleSpecialItem( const SvXMLItemMapEntry& rEntry,
SfxPoolItem& rItem,
SfxItemSet& rSet,
const ::rtl::OUString& rValue,
@@ -72,7 +72,7 @@ public:
/** this method is called for every item that has the
MID_SW_FLAG_NO_ITEM_IMPORT flag set */
- virtual BOOL handleNoItem( const SvXMLItemMapEntry& rEntry,
+ virtual sal_Bool handleNoItem( const SvXMLItemMapEntry& rEntry,
SfxItemSet& rSet,
const ::rtl::OUString& rValue,
const SvXMLUnitConverter& rUnitConverter,
diff --git a/sw/source/filter/xml/xmlitem.cxx b/sw/source/filter/xml/xmlitem.cxx
index ff5dc27764d1..d2c41d380cdd 100644
--- a/sw/source/filter/xml/xmlitem.cxx
+++ b/sw/source/filter/xml/xmlitem.cxx
@@ -36,7 +36,7 @@
using ::rtl::OUString;
using namespace ::com::sun::star;
-SvXMLItemSetContext::SvXMLItemSetContext( SvXMLImport& rImp, USHORT nPrfx,
+SvXMLItemSetContext::SvXMLItemSetContext( SvXMLImport& rImp, sal_uInt16 nPrfx,
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList >& xAttrList,
SfxItemSet& rISet,
@@ -56,7 +56,7 @@ SvXMLItemSetContext::~SvXMLItemSetContext()
{
}
-SvXMLImportContext *SvXMLItemSetContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *SvXMLItemSetContext::CreateChildContext( sal_uInt16 nPrefix,
const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList >& xAttrList )
{
@@ -78,7 +78,7 @@ SvXMLImportContext *SvXMLItemSetContext::CreateChildContext( USHORT nPrefix,
CreateChildContext if the element matches an entry in the
SvXMLImportItemMapper with the mid flag MID_SW_FLAG_ELEMENT
*/
-SvXMLImportContext *SvXMLItemSetContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *SvXMLItemSetContext::CreateChildContext( sal_uInt16 nPrefix,
const rtl::OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList >& /*xAttrList*/,
SfxItemSet& /*rItemSet*/,
diff --git a/sw/source/filter/xml/xmlitem.hxx b/sw/source/filter/xml/xmlitem.hxx
index 1922f2238b39..a47f73e06bb1 100644
--- a/sw/source/filter/xml/xmlitem.hxx
+++ b/sw/source/filter/xml/xmlitem.hxx
@@ -50,7 +50,7 @@ protected:
public:
- SvXMLItemSetContext( SvXMLImport& rImport, USHORT nPrfx,
+ SvXMLItemSetContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
SfxItemSet& rItemSet,
@@ -59,14 +59,14 @@ public:
virtual ~SvXMLItemSetContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
// This method is called from this instance implementation of
// CreateChildContext if the element matches an entry in the
// SvXMLImportItemMapper with the mid flag MID_SW_FLAG_ELEMENT_ITEM_IMPORT
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
SfxItemSet& rItemSet,
diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx
index 50aeb43359c3..1f38c952459e 100644
--- a/sw/source/filter/xml/xmliteme.cxx
+++ b/sw/source/filter/xml/xmliteme.cxx
@@ -41,7 +41,7 @@
#include "xmlbrshe.hxx"
#include <editeng/tstpitem.hxx>
#include <editeng/brshitem.hxx>
-#include <vcl/fldunit.hxx>
+#include <tools/fldunit.hxx>
#include <swmodule.hxx>
#include <doc.hxx>
#include "fmtornt.hxx"
diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx
index dab975c48901..c875453e97f1 100644
--- a/sw/source/filter/xml/xmlitemi.cxx
+++ b/sw/source/filter/xml/xmlitemi.cxx
@@ -139,7 +139,7 @@ public:
const SvXMLUnitConverter& rUnitConv );
virtual ~SwXMLItemSetContext_Impl();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::uno::Reference< xml::sax::XAttributeList > & xAttrList,
SfxItemSet& rItemSet,
diff --git a/sw/source/filter/xml/xmlitmpr.cxx b/sw/source/filter/xml/xmlitmpr.cxx
index c0edce67c1bf..27c66e9b5640 100644
--- a/sw/source/filter/xml/xmlitmpr.cxx
+++ b/sw/source/filter/xml/xmlitmpr.cxx
@@ -80,12 +80,12 @@ SvXMLItemMapEntry* SvXMLItemMapEntries::getByName( sal_uInt16 nNameSpace,
return (pMap->eLocalName != XML_TOKEN_INVALID) ? pMap : NULL;
}
-SvXMLItemMapEntry* SvXMLItemMapEntries::getByIndex( UINT16 nIndex ) const
+SvXMLItemMapEntry* SvXMLItemMapEntries::getByIndex( sal_uInt16 nIndex ) const
{
return &mpImpl->mpEntries[nIndex];
}
-UINT16 SvXMLItemMapEntries::getCount() const
+sal_uInt16 SvXMLItemMapEntries::getCount() const
{
return mpImpl->mnCount;
}
diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx
index 2ada7c1a25e0..92c743518cb6 100644
--- a/sw/source/filter/xml/xmlmeta.cxx
+++ b/sw/source/filter/xml/xmlmeta.cxx
@@ -100,8 +100,8 @@ enum SvXMLTokenMapAttrs
struct statistic {
SvXMLTokenMapAttrs token;
const char* name;
- USHORT SwDocStat::* target16;
- ULONG SwDocStat::* target32; /* or 64, on LP64 platforms */
+ sal_uInt16 SwDocStat::* target16;
+ sal_uLong SwDocStat::* target32; /* or 64, on LP64 platforms */
};
static const struct statistic s_stats [] = {
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index 4e8929a903b3..03366205b649 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -83,7 +83,7 @@ class SwXMLTableColumn_Impl : public SwWriteTableCol
public:
- SwXMLTableColumn_Impl( sal_uInt16 nPosition ) :
+ SwXMLTableColumn_Impl( sal_uInt32 nPosition ) :
SwWriteTableCol( nPosition ),
nRelWidth( 0UL )
{};
@@ -138,7 +138,7 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) :
nWidth( 0UL )
{
#if OSL_DEBUG_LEVEL > 1
- sal_uInt16 nEndCPos = 0U;
+ sal_uInt32 nEndCPos = 0U;
#endif
sal_uInt16 nLines = rLines.Count();
sal_uInt16 nLine;
@@ -148,14 +148,14 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) :
const SwTableBoxes& rBoxes = pLine->GetTabBoxes();
sal_uInt16 nBoxes = rBoxes.Count();
- sal_uInt16 nCPos = 0U;
+ sal_uInt32 nCPos = 0U;
for( sal_uInt16 nBox=0U; nBox<nBoxes; nBox++ )
{
const SwTableBox *pBox = rBoxes[nBox];
if( nBox < nBoxes-1U || nWidth==0UL )
{
- nCPos = nCPos + (sal_uInt16)SwWriteTable::GetBoxWidth( pBox );
+ nCPos = nCPos + SwWriteTable::GetBoxWidth( pBox );
SwXMLTableColumn_Impl *pCol =
new SwXMLTableColumn_Impl( nCPos );
@@ -172,16 +172,16 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) :
else
{
#if OSL_DEBUG_LEVEL > 1
- sal_uInt16 nCheckPos =
- nCPos + (sal_uInt16)SwWriteTable::GetBoxWidth( pBox );
+ sal_uInt32 nCheckPos =
+ nCPos + SwWriteTable::GetBoxWidth( pBox );
if( !nEndCPos )
{
nEndCPos = nCheckPos;
}
#endif
- nCPos = (sal_uInt16)nWidth;
+ nCPos = nWidth;
#if OSL_DEBUG_LEVEL > 1
- SwXMLTableColumn_Impl aCol( (sal_uInt16)nWidth );
+ SwXMLTableColumn_Impl aCol( nWidth );
OSL_ENSURE( aCols.Seek_Entry(&aCol), "couldn't find last column" );
OSL_ENSURE( SwXMLTableColumn_Impl(nCheckPos) ==
SwXMLTableColumn_Impl(nCPos),
@@ -593,13 +593,13 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
// pass 2: export column styles
{
const SwXMLTableColumns_Impl& rCols = pLines->GetColumns();
- sal_uInt16 nCPos = 0U;
+ sal_uInt32 nCPos = 0U;
sal_uInt16 nColumns = rCols.Count();
for( sal_uInt16 nColumn=0U; nColumn<nColumns; nColumn++ )
{
SwXMLTableColumn_Impl *pColumn = rCols[nColumn];
- sal_uInt16 nOldCPos = nCPos;
+ sal_uInt32 nOldCPos = nCPos;
nCPos = pColumn->GetPos();
sal_uInt32 nWidth = nCPos - nOldCPos;
@@ -625,10 +625,10 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
nColAbsWidth += (nBaseWidth/2UL);
nColAbsWidth /= nBaseWidth;
}
- pColumn->SetWidthOpt( (sal_uInt16)nColAbsWidth, sal_False );
+ pColumn->SetWidthOpt( nColAbsWidth, sal_False );
}
- ULONG nExpPos = 0;
+ sal_uLong nExpPos = 0;
if( rExpCols.Seek_Entry( pColumn, &nExpPos ) )
{
pColumn->SetStyleName(
@@ -669,16 +669,16 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
const SwTableBoxes& rBoxes = pLine->GetTabBoxes();
sal_uInt16 nBoxes = rBoxes.Count();
- sal_uInt16 nCPos = 0U;
+ sal_uInt32 nCPos = 0U;
sal_uInt16 nCol = 0U;
for( sal_uInt16 nBox=0U; nBox<nBoxes; nBox++ )
{
SwTableBox *pBox = rBoxes[nBox];
if( nBox < nBoxes-1U )
- nCPos = nCPos + (sal_uInt16)SwWriteTable::GetBoxWidth( pBox );
+ nCPos = nCPos + SwWriteTable::GetBoxWidth( pBox );
else
- nCPos = (sal_uInt16)pLines->GetWidth();
+ nCPos = pLines->GetWidth();
// Und ihren Index
@@ -951,7 +951,7 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine,
const SwTableBoxes& rBoxes = rLine.GetTabBoxes();
sal_uInt16 nBoxes = rBoxes.Count();
- sal_uInt16 nCPos = 0U;
+ sal_uInt32 nCPos = 0U;
sal_uInt16 nCol = 0U;
for( sal_uInt16 nBox=0U; nBox<nBoxes; nBox++ )
{
@@ -967,9 +967,9 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine,
}
if( nBox < nBoxes-1U )
- nCPos = nCPos + (sal_uInt16)SwWriteTable::GetBoxWidth( pBox );
+ nCPos = nCPos + SwWriteTable::GetBoxWidth( pBox );
else
- nCPos = (sal_uInt16)rLines.GetWidth();
+ nCPos = rLines.GetWidth();
// Und ihren Index
const sal_uInt16 nOldCol = nCol;
@@ -1018,7 +1018,7 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine,
void SwXMLExport::ExportTableLines( const SwTableLines& rLines,
SwXMLTableInfo_Impl& rTblInfo,
- USHORT nHeaderRows )
+ sal_uInt16 nHeaderRows )
{
OSL_ENSURE( pTableLines && !pTableLines->empty(),
"SwXMLExport::ExportTableLines: table columns infos missing" );
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 40c31395cc44..fafa66f926e4 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -1540,7 +1540,7 @@ void SwXMLTableContext::InsertColumn( sal_Int32 nWidth2, sal_Bool bRelWidth2,
if( !pColumnDefaultCellStyleNames )
{
pColumnDefaultCellStyleNames = new SvStringsDtor;
- ULONG nCount = aColumnWidths.size() - 1;
+ sal_uLong nCount = aColumnWidths.size() - 1;
while( nCount-- )
pColumnDefaultCellStyleNames->Insert( new String,
pColumnDefaultCellStyleNames->Count() );
@@ -2100,7 +2100,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
{
// default num format?
const SfxPoolItem* pItem = NULL;
- if( pBoxFmt2->GetItemState( RES_BOXATR_FORMAT, FALSE, &pItem )
+ if( pBoxFmt2->GetItemState( RES_BOXATR_FORMAT, sal_False, &pItem )
== SFX_ITEM_SET )
{
const SwTblBoxNumFormat* pNumFormat =
@@ -2155,7 +2155,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
// Solution: the number format will be removed,
// the cell gets the default text format.
const SfxPoolItem* pItem = NULL;
- if( pBoxFmt->GetItemState( RES_BOXATR_FORMAT, FALSE, &pItem )
+ if( pBoxFmt->GetItemState( RES_BOXATR_FORMAT, sal_False, &pItem )
== SFX_ITEM_SET )
{
const SwDoc* pDoc = pBoxFmt->GetDoc();
@@ -2413,14 +2413,14 @@ void SwXMLTableContext::_MakeTable( SwTableBox *pBox )
{
SwXMLTableRow_Impl *pPrevRow = (*pRows)[(sal_uInt16)nCurRow-1U];
SwXMLTableCell_Impl *pCell;
- for( ULONG i = 0; i < aColumnWidths.size(); ++i )
+ for( sal_uLong i = 0; i < aColumnWidths.size(); ++i )
{
if( ( pCell=pPrevRow->GetCell(i), pCell->GetRowSpan() > 1UL ) )
{
FixRowSpan( nCurRow-1UL, i, 1UL );
}
}
- for( ULONG i = pRows->Count()-1UL; i>=nCurRow; --i )
+ for( sal_uLong i = pRows->Count()-1UL; i>=nCurRow; --i )
pRows->DeleteAndDestroy( (sal_uInt16)i );
}
@@ -2498,7 +2498,7 @@ void SwXMLTableContext::_MakeTable( SwTableBox *pBox )
for( colIter = aColumnWidths.begin(); colIter < aColumnWidths.end() - 1; ++colIter)
{
sal_Int32 nW = (sal_Int32)( colIter->width * n);
- colIter->width = (USHORT)nW;
+ colIter->width = (sal_uInt16)nW;
nRelWidth += nW;
}
aColumnWidths.back().width = (nWidth-nRelWidth);
@@ -2825,10 +2825,10 @@ void SwXMLTableContext::MakeTable()
// 3) create new DDE table, and
SwDDETable* pDDETable = new SwDDETable( pTableNode->GetTable(),
- pFldType, FALSE );
+ pFldType, sal_False );
// 4) set new (DDE)table at node.
- pTableNode->SetNewTable(pDDETable, FALSE);
+ pTableNode->SetNewTable(pDDETable, sal_False);
}
// ??? this is always false: root frame is only created in ViewShell::Init
diff --git a/sw/source/filter/xml/xmltbli.hxx b/sw/source/filter/xml/xmltbli.hxx
index de228de07398..4d6d2cfc88e7 100644
--- a/sw/source/filter/xml/xmltbli.hxx
+++ b/sw/source/filter/xml/xmltbli.hxx
@@ -70,9 +70,9 @@ class SwXMLTableContext : public XMLTextTableContext
//! Holds basic information about a column's width.
struct ColumnWidthInfo {
- USHORT width; //!< Column width (absolute or relative).
+ sal_uInt16 width; //!< Column width (absolute or relative).
bool isRelative; //!< True for a relative width, false for absolute.
- inline ColumnWidthInfo(USHORT wdth, bool isRel) : width(wdth), isRelative(isRel) {};
+ inline ColumnWidthInfo(sal_uInt16 wdth, bool isRel) : width(wdth), isRelative(isRel) {};
};
std::vector<ColumnWidthInfo> aColumnWidths;
SvStringsDtor *pColumnDefaultCellStyleNames;
@@ -105,7 +105,7 @@ class SwXMLTableContext : public XMLTextTableContext
sal_Bool bRelWidth : 1;
sal_Bool bHasSubTables : 1;
- USHORT nHeaderRows;
+ sal_uInt16 nHeaderRows;
sal_uInt32 nCurRow;
sal_uInt32 nCurCol;
sal_Int32 nWidth;
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index 57e54974a1cb..b99f10ad9365 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -594,7 +594,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
while ( i > 0 )
{
beans::PropertyValue& aProp = aProps[--i];
- USHORT nType2 = SwApplet_Impl::GetOptionType( aProp.Name, TRUE );
+ sal_uInt16 nType2 = SwApplet_Impl::GetOptionType( aProp.Name, sal_True );
if ( nType2 == SWHTML_OPTTYPE_TAG)
{
::rtl::OUString aStr2;
@@ -690,7 +690,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
while ( i > 0 )
{
beans::PropertyValue& aProp = aProps[--i];
- USHORT nType2 = SwApplet_Impl::GetOptionType( aProp.Name, TRUE );
+ sal_uInt16 nType2 = SwApplet_Impl::GetOptionType( aProp.Name, sal_True );
if (SWHTML_OPTTYPE_PARAM == nType2 || SWHTML_OPTTYPE_SIZE == nType2 )
{
::rtl::OUString aStr;
@@ -716,7 +716,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
while ( i > 0 )
{
beans::PropertyValue& aProp = aProps[--i];
- USHORT nType2 = SwApplet_Impl::GetOptionType( aProp.Name, FALSE );
+ sal_uInt16 nType2 = SwApplet_Impl::GetOptionType( aProp.Name, sal_False );
if ( nType2 == SWHTML_OPTTYPE_TAG)
{
::rtl::OUString aStr;
diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx
index 4b3218a3ac00..c08bfb5bf6df 100644
--- a/sw/source/ui/app/appenv.cxx
+++ b/sw/source/ui/app/appenv.cxx
@@ -92,16 +92,16 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText
aText.EraseAllChars( '\r' );
- USHORT nTokenPos = 0;
+ sal_uInt16 nTokenPos = 0;
while( STRING_NOTFOUND != nTokenPos )
{
String aLine = aText.GetToken( 0, '\n', nTokenPos );
while ( aLine.Len() )
{
String sTmpText;
- BOOL bField = FALSE;
+ sal_Bool bField = sal_False;
- USHORT nPos = aLine.Search( '<' );
+ sal_uInt16 nPos = aLine.Search( '<' );
if ( nPos )
{
sTmpText = aLine.Copy( 0, nPos );
@@ -122,14 +122,14 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText
// Database fields must contain at least 3 points!
String sDBName( sTmpText.Copy( 1, sTmpText.Len() - 2));
- USHORT nCnt = sDBName.GetTokenCount('.');
+ sal_uInt16 nCnt = sDBName.GetTokenCount('.');
if (nCnt >= 3)
{
- ::ReplacePoint(sDBName, TRUE);
+ ::ReplacePoint(sDBName, sal_True);
SwInsertFld_Data aData(TYP_DBFLD, 0, sDBName, aEmptyStr, 0, &rSh );
rFldMgr.InsertFld( aData );
sRet = sDBName;
- bField = TRUE;
+ bField = sal_True;
}
}
}
@@ -143,18 +143,18 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText
return sRet;
}
-void lcl_CopyCollAttr(SwWrtShell* pOldSh, SwWrtShell* pNewSh, USHORT nCollId)
+void lcl_CopyCollAttr(SwWrtShell* pOldSh, SwWrtShell* pNewSh, sal_uInt16 nCollId)
{
- USHORT nCollCnt = pOldSh->GetTxtFmtCollCount();
+ sal_uInt16 nCollCnt = pOldSh->GetTxtFmtCollCount();
SwTxtFmtColl* pColl;
- for( USHORT nCnt = 0; nCnt < nCollCnt; ++nCnt )
+ for( sal_uInt16 nCnt = 0; nCnt < nCollCnt; ++nCnt )
if(nCollId == (pColl = &pOldSh->GetTxtFmtColl(nCnt))->GetPoolFmtId())
pNewSh->GetTxtCollFromPool(nCollId)->SetFmtAttr(pColl->GetAttrSet());
}
void SwModule::InsertEnv( SfxRequest& rReq )
{
- static USHORT nTitleNo = 0;
+ static sal_uInt16 nTitleNo = 0;
SwDocShell *pMyDocSh;
SfxViewFrame *pFrame;
@@ -167,7 +167,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
pOldSh = pMyDocSh ? pMyDocSh->GetWrtShell() : 0;
// Create new document (don't show!)
- SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
+ SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
xDocSh->DoInitNew( 0 );
pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 );
pNewView = (SwView*) pFrame->GetViewShell();
@@ -190,7 +190,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
SwEnvCfgItem aEnvCfg;
// Check if there's already an envelope.
- BOOL bEnvChange = FALSE;
+ sal_Bool bEnvChange = sal_False;
SfxItemSet aSet(GetPool(), FN_ENVELOP, FN_ENVELOP, 0);
aSet.Put(aEnvCfg.GetItem());
@@ -238,7 +238,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
if (nMode == ENV_NEWDOC || nMode == ENV_INSERT)
{
- SwWait aWait( (SwDocShell&)*xDocSh, TRUE );
+ SwWait aWait( (SwDocShell&)*xDocSh, sal_True );
// Read dialog and save item to config
const SwEnvItem& rItem = pItem ? *pItem : (const SwEnvItem&) pDlg->GetOutputItemSet()->Get(FN_ENVELOP);
@@ -253,7 +253,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
{
OSL_ENSURE(pOldSh, "No document - wasn't 'Insert' disabled???");
SvxPaperBinItem aItem( RES_PAPER_BIN );
- aItem.SetValue((BYTE)pSh->getIDocumentDeviceAccess()->getPrinter(true)->GetPaperBin());
+ aItem.SetValue((sal_uInt8)pSh->getIDocumentDeviceAccess()->getPrinter(true)->GetPaperBin());
pOldSh->GetPageDescFromPool(RES_POOLPAGE_JAKET)->GetMaster().SetFmtAttr(aItem);
}
@@ -278,7 +278,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
// Here it goes (insert)
pSh->StartUndo(UNDO_UI_INSERT_ENVELOPE, NULL);
pSh->StartAllAction();
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
if (bEnvChange)
{
@@ -286,8 +286,8 @@ void SwModule::InsertEnv( SfxRequest& rReq )
pFollow = pSh->GetPageDesc(pSh->GetCurPageDesc()).GetFollow();
// Delete text from the first page
- if ( !pSh->SttNxtPg(TRUE) )
- pSh->EndPg(TRUE);
+ if ( !pSh->SttNxtPg(sal_True) )
+ pSh->EndPg(sal_True);
pSh->DelRight();
// Delete frame of the first page
if( pSh->GotoFly( rSendMark ) )
@@ -300,7 +300,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
pSh->EnterSelFrmMode();
pSh->DelRight();
}
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
}
else
// Followup template: page 1
@@ -310,21 +310,21 @@ void SwModule::InsertEnv( SfxRequest& rReq )
if ( pSh->IsCrsrInTbl() )
{
pSh->SplitNode();
- pSh->Right( CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ pSh->Right( CRSR_SKIP_CHARS, sal_False, 1, sal_False );
SfxItemSet aBreakSet( pSh->GetAttrPool(), RES_BREAK, RES_BREAK, 0 );
aBreakSet.Put( SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) );
pSh->SetTblAttr( aBreakSet );
}
else
- pSh->InsertPageBreak(0, FALSE);
- pSh->SttEndDoc(TRUE);
+ pSh->InsertPageBreak(0, sal_False);
+ pSh->SttEndDoc(sal_True);
}
else
{
pFollow = &pSh->GetPageDesc(pSh->GetCurPageDesc());
// Let's go (print)
pSh->StartAllAction();
- pSh->DoUndo(FALSE);
+ pSh->DoUndo(sal_False);
// Again, copy the new collections "Sender" and "Reciever" to
// a new document
@@ -360,8 +360,8 @@ void SwModule::InsertEnv( SfxRequest& rReq )
long lLeft = rItem.lShiftRight,
lUpper = rItem.lShiftDown;
- USHORT nPageW = (USHORT) Max(rItem.lWidth, rItem.lHeight),
- nPageH = (USHORT) Min(rItem.lWidth, rItem.lHeight);
+ sal_uInt16 nPageW = (sal_uInt16) Max(rItem.lWidth, rItem.lHeight),
+ nPageH = (sal_uInt16) Min(rItem.lWidth, rItem.lHeight);
switch (rItem.eAlign)
{
@@ -378,18 +378,18 @@ void SwModule::InsertEnv( SfxRequest& rReq )
}
SvxLRSpaceItem aLRMargin( RES_LR_SPACE );
SvxULSpaceItem aULMargin( RES_UL_SPACE );
- aLRMargin.SetLeft ((USHORT) lLeft );
- aULMargin.SetUpper((USHORT) lUpper);
+ aLRMargin.SetLeft ((sal_uInt16) lLeft );
+ aULMargin.SetUpper((sal_uInt16) lUpper);
aLRMargin.SetRight(0);
aULMargin.SetLower(0);
rFmt.SetFmtAttr(aLRMargin);
rFmt.SetFmtAttr(aULMargin);
// Header and footer
- rFmt.SetFmtAttr(SwFmtHeader(BOOL(FALSE)));
- pDesc->ChgHeaderShare(FALSE);
- rFmt.SetFmtAttr(SwFmtFooter(BOOL(FALSE)));
- pDesc->ChgFooterShare(FALSE);
+ rFmt.SetFmtAttr(SwFmtHeader(sal_Bool(sal_False)));
+ pDesc->ChgHeaderShare(sal_False);
+ rFmt.SetFmtAttr(SwFmtFooter(sal_Bool(sal_False)));
+ pDesc->ChgFooterShare(sal_False);
// Page numbering
pDesc->SetUseOn(nsUseOnPage::PD_ALL);
@@ -413,9 +413,9 @@ void SwModule::InsertEnv( SfxRequest& rReq )
// Apply page description
- USHORT nPos;
+ sal_uInt16 nPos;
pSh->FindPageDescByName( pDesc->GetName(),
- FALSE,
+ sal_False,
&nPos );
@@ -423,7 +423,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
pSh->ChgCurPageDesc(*pDesc);
// Insert Frame
- SwFlyFrmAttrMgr aMgr(FALSE, pSh, FRMMGR_TYPE_ENVELP);
+ SwFlyFrmAttrMgr aMgr(sal_False, pSh, FRMMGR_TYPE_ENVELP);
SwFldMgr aFldMgr;
aMgr.SetHeightSizeType(ATT_VAR_SIZE);
@@ -435,7 +435,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
// Sender
if (rItem.bSend)
{
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
aMgr.InsertFlyFrm(FLY_AT_PAGE,
Point(rItem.lSendFromLeft + lLeft, rItem.lSendFromTop + lUpper),
Size (rItem.lAddrFromLeft - rItem.lSendFromLeft, 0));
@@ -450,7 +450,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
}
// Addressee
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
aMgr.InsertFlyFrm(FLY_AT_PAGE,
Point(rItem.lAddrFromLeft + lLeft, rItem.lAddrFromTop + lUpper),
@@ -467,12 +467,12 @@ void SwModule::InsertEnv( SfxRequest& rReq )
pSh->SetPageObjsNewPage(aFlyArr, 1);
// Finished
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
pSh->EndAllAction();
if (nMode == ENV_NEWDOC)
- pSh->DoUndo(TRUE);
+ pSh->DoUndo(sal_True);
else
pSh->EndUndo(UNDO_UI_INSERT_ENVELOPE);
@@ -482,7 +482,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
if ( rItem.aAddrText.indexOf('<') >= 0 )
{
- static USHORT const aInva[] =
+ static sal_uInt16 const aInva[] =
{
SID_SBA_BRW_UPDATE,
SID_SBA_BRW_INSERT,
@@ -500,7 +500,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
{
rReq.AppendItem( rItem );
if ( nMode == ENV_NEWDOC )
- rReq.AppendItem( SfxBoolItem( FN_PARAM_1, TRUE ) );
+ rReq.AppendItem( SfxBoolItem( FN_PARAM_1, sal_True ) );
}
rReq.Done();
diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx
index c659b984042d..21d46c39dfd7 100644
--- a/sw/source/ui/app/apphdl.cxx
+++ b/sw/source/ui/app/apphdl.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
#include <tools/urlobj.hxx>
@@ -81,6 +82,7 @@
#include <gloslst.hxx> // SwGlossaryList
#include <glosdoc.hxx> // SwGlossaryList
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <cfgitems.hxx>
#include <prtopt.hxx>
#include <modcfg.hxx>
@@ -131,7 +133,6 @@ using namespace ::com::sun::star;
#define _ExecAddress ExecOther
#define _StateAddress StateOther
#include <sfx2/msg.hxx>
-#include <svx/svxslots.hxx>
#include "swslots.hxx"
#include <cfgid.h>
@@ -197,7 +198,7 @@ void SwModule::StateOther(SfxItemSet &rSet)
}
break;
case SID_ATTR_METRIC:
- rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, static_cast< UINT16 >(::GetDfltMetric(bWebView))));
+ rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, static_cast< sal_uInt16 >(::GetDfltMetric(bWebView))));
break;
case FN_SET_MODOPT_TBLNUMFMT:
rSet.Put( SfxBoolItem( nWhich, pModuleConfig->
@@ -217,7 +218,7 @@ SwView* lcl_LoadDoc(SwView* pView, const String& rURL)
{
SfxStringItem aURL(SID_FILE_NAME, rURL);
SfxStringItem aTargetFrameName( SID_TARGETNAME, String::CreateFromAscii("_blank") );
- SfxBoolItem aHidden( SID_HIDDEN, TRUE );
+ SfxBoolItem aHidden( SID_HIDDEN, sal_True );
SfxStringItem aReferer(SID_REFERER, pView->GetDocShell()->GetTitle());
SfxObjectItem* pItem = (SfxObjectItem*)pView->GetViewFrame()->GetDispatcher()->
Execute(SID_OPENDOC, SFX_CALLMODE_SYNCHRON,
@@ -329,7 +330,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
m_pMMConfig->SetSourceView( m_pView );
m_pView->SetMailMergeConfigItem(0, 0, sal_True);
SfxViewFrame* pViewFrame = m_pView->GetViewFrame();
- pViewFrame->ShowChildWindow(FN_MAILMERGE_CHILDWINDOW, FALSE);
+ pViewFrame->ShowChildWindow(FN_MAILMERGE_CHILDWINDOW, sal_False);
OSL_ENSURE(m_pMMConfig, "no MailMergeConfigItem available");
bRestoreWizard = true;
}
@@ -734,7 +735,7 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
}
else if(rHint.ISA(SfxSimpleHint))
{
- USHORT nHintId = ((SfxSimpleHint&)rHint).GetId();
+ sal_uInt16 nHintId = ((SfxSimpleHint&)rHint).GetId();
if(SFX_HINT_DEINITIALIZING == nHintId)
{
DELETEZ(pWebUsrPref);
@@ -782,26 +783,23 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, sal
{
if( pBrdCst == pUserOptions )
{
- bAuthorInitialised = FALSE;
+ bAuthorInitialised = sal_False;
}
else if( pBrdCst == pUndoOptions )
{
- const int nNew = GetUndoOptions().GetUndoCount();
- const int nOld = SwEditShell::GetUndoActionCount();
- if(!nNew || !nOld)
- {
- sal_Bool bUndo = nNew != 0;
+ sal_Int32 const nNew = GetUndoOptions().GetUndoCount();
+ bool const bUndo = (nNew != 0);
+ // switch Undo for all DocShells
// Iterate through DocShells and switch undos
-
- TypeId aType(TYPE(SwDocShell));
- SwDocShell* pDocShell = (SwDocShell*)SfxObjectShell::GetFirst(&aType);
- while( pDocShell )
- {
- pDocShell->GetDoc()->DoUndo( bUndo );
- pDocShell = (SwDocShell*)SfxObjectShell::GetNext(*pDocShell, &aType);
- }
+ TypeId aType(TYPE(SwDocShell));
+ SwDocShell * pDocShell =
+ static_cast<SwDocShell *>(SfxObjectShell::GetFirst(&aType));
+ while (pDocShell)
+ {
+ pDocShell->GetDoc()->GetIDocumentUndoRedo().DoUndo(bUndo);
+ pDocShell = static_cast<SwDocShell *>(
+ SfxObjectShell::GetNext(*pDocShell, &aType));
}
- SwEditShell::SetUndoActionCount( static_cast< USHORT >(nNew));
}
else if ( pBrdCst == pColorConfig || pBrdCst == pAccessibilityOptions )
{
@@ -921,11 +919,11 @@ const SwMasterUsrPref *SwModule::GetUsrPref(sal_Bool bWeb) const
{
// The SpellChecker is needed in SwMasterUsrPref's Load, but it must not
// be created there #58256#
- pNonConstModule->pWebUsrPref = new SwMasterUsrPref(TRUE);
+ pNonConstModule->pWebUsrPref = new SwMasterUsrPref(sal_True);
}
else if(!bWeb && !pUsrPref)
{
- pNonConstModule->pUsrPref = new SwMasterUsrPref(FALSE);
+ pNonConstModule->pUsrPref = new SwMasterUsrPref(sal_False);
}
return bWeb ? pWebUsrPref : pUsrPref;
}
@@ -937,7 +935,7 @@ void NewXForms( SfxRequest& rReq )
// copied & excerpted from SwModule::InsertLab(..)
// create new document
- SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD) );
+ SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD) );
xDocSh->DoInitNew( 0 );
// initialize XForms
diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx
index e25856354e3f..69623ddf05d2 100644
--- a/sw/source/ui/app/applab.cxx
+++ b/sw/source/ui/app/applab.cxx
@@ -197,7 +197,7 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
aLabCfg.Commit();
// Create new document
- SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD));
+ SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD));
xDocSh->DoInitNew( 0 );
// Printer
diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx
index 35a526638154..6ab953e62193 100644
--- a/sw/source/ui/app/appopt.cxx
+++ b/sw/source/ui/app/appopt.cxx
@@ -28,14 +28,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#include <hintids.hxx>
#include <cmdid.h> // Function-Ids
-#include <com/sun/star/i18n/ScriptType.hpp>
-
#define _SVSTDARR_STRINGSDTOR
#include <svl/svstdarr.hxx>
+#include <com/sun/star/i18n/ScriptType.hpp>
+
+#include <hintids.hxx>
+#include <cmdid.h> // Funktion-Ids
#include <vcl/msgbox.hxx>
#include <svl/eitem.hxx>
#include <sfx2/request.hxx>
@@ -55,6 +56,7 @@
#include <edtwin.hxx>
#include <swmodule.hxx>
#include <view.hxx>
+#include <doc.hxx>
#include <wrtsh.hxx>
#include <IDocumentDeviceAccess.hxx>
#include <uitool.hxx>
@@ -71,7 +73,6 @@
#include <editeng/langitem.hxx>
#include <unotools/lingucfg.hxx>
#include <editeng/unolingu.hxx>
-
#include <globals.hrc>
#include <globals.h> // e.g. global Constants
#include <svl/slstitm.hxx>
@@ -83,9 +84,9 @@
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
-SfxItemSet* SwModule::CreateItemSet( USHORT nId )
+SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
{
- BOOL bTextDialog = (nId == SID_SW_EDITOPTIONS) ? TRUE : FALSE;
+ sal_Bool bTextDialog = (nId == SID_SW_EDITOPTIONS) ? sal_True : sal_False;
// the options for the Web- and Textdialog are put together here
SwViewOption aViewOpt = *GetUsrPref(!bTextDialog);
@@ -97,7 +98,7 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
if(pAppView)
{
// if Text then no WebView and vice versa
- BOOL bWebView = 0 != PTR_CAST(SwWebView, pAppView);
+ sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pAppView);
if( (bWebView && !bTextDialog) ||(!bWebView && bTextDialog))
{
aViewOpt = *pAppView->GetWrtShell().GetViewOptions();
@@ -184,20 +185,20 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
pRet->Put(SwPtrItem(FN_PARAM_STDFONTS, GetStdFontConfig()));
if( PTR_CAST( SwPagePreView, SfxViewShell::Current())!=0)
{
- SfxBoolItem aBool(SfxBoolItem(SID_PRINTPREVIEW, TRUE));
+ SfxBoolItem aBool(SfxBoolItem(SID_PRINTPREVIEW, sal_True));
pRet->Put(aBool);
}
FieldUnit eUnit = pPref->GetHScrollMetric();
if(pAppView)
pAppView->GetHLinealMetric(eUnit);
- pRet->Put(SfxUInt16Item( FN_HSCROLL_METRIC, static_cast< UINT16 >(eUnit)));
+ pRet->Put(SfxUInt16Item( FN_HSCROLL_METRIC, static_cast< sal_uInt16 >(eUnit)));
eUnit = pPref->GetVScrollMetric();
if(pAppView)
pAppView->GetVLinealMetric(eUnit);
- pRet->Put(SfxUInt16Item( FN_VSCROLL_METRIC, static_cast< UINT16 >(eUnit) ));
- pRet->Put(SfxUInt16Item( SID_ATTR_METRIC, static_cast< UINT16 >(pPref->GetMetric()) ));
+ pRet->Put(SfxUInt16Item( FN_VSCROLL_METRIC, static_cast< sal_uInt16 >(eUnit) ));
+ pRet->Put(SfxUInt16Item( SID_ATTR_METRIC, static_cast< sal_uInt16 >(pPref->GetMetric()) ));
pRet->Put(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, pPref->IsApplyCharUnit()));
if(bTextDialog)
{
@@ -206,10 +207,10 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
const SvxTabStopItem& rDefTabs =
(const SvxTabStopItem&)pAppView->GetWrtShell().
GetDefault(RES_PARATR_TABSTOP);
- pRet->Put( SfxUInt16Item( SID_ATTR_DEFTABSTOP, (USHORT)::GetTabDist(rDefTabs)));
+ pRet->Put( SfxUInt16Item( SID_ATTR_DEFTABSTOP, (sal_uInt16)::GetTabDist(rDefTabs)));
}
else
- pRet->Put(SfxUInt16Item( SID_ATTR_DEFTABSTOP, (UINT16)pPref->GetDefTab()));
+ pRet->Put(SfxUInt16Item( SID_ATTR_DEFTABSTOP, (sal_uInt16)pPref->GetDefTab()));
}
// Options for GridTabPage
@@ -220,8 +221,8 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
aGridItem.SetGridVisible( aViewOpt.IsGridVisible());
const Size& rSnapSize = aViewOpt.GetSnapSize();
- aGridItem.SetFldDrawX( (USHORT) (rSnapSize.Width() ));
- aGridItem.SetFldDrawY( (USHORT) (rSnapSize.Height()));
+ aGridItem.SetFldDrawX( (sal_uInt16) (rSnapSize.Width() ));
+ aGridItem.SetFldDrawY( (sal_uInt16) (rSnapSize.Height()));
aGridItem.SetFldDivisionX( aViewOpt.GetDivisionX());
aGridItem.SetFldDivisionY( aViewOpt.GetDivisionY());
@@ -229,8 +230,8 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
pRet->Put(aGridItem);
// Options for PrintTabPage
- SwPrintData* pOpt = pAppView ?
- pAppView->GetWrtShell().getIDocumentDeviceAccess()->getPrintData() :
+ const SwPrintData* pOpt = pAppView ?
+ &pAppView->GetWrtShell().getIDocumentDeviceAccess()->getPrintData() :
0;
if(!pOpt)
@@ -250,16 +251,16 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
return pRet;
}
-void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
+void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
{
- BOOL bTextDialog = nId == SID_SW_EDITOPTIONS;
+ sal_Bool bTextDialog = nId == SID_SW_EDITOPTIONS;
SwView* pAppView = GetView();
if(pAppView && pAppView->GetViewFrame() != SfxViewFrame::Current())
pAppView = 0;
if(pAppView)
{
// the text dialog mustn't apply data to the web view and vice versa
- BOOL bWebView = 0 != PTR_CAST(SwWebView, pAppView);
+ sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pAppView);
if( (bWebView == bTextDialog))
pAppView = 0;
}
@@ -274,19 +275,18 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
/*---------------------------------------------------------------------
Interpret the page Documentview
-----------------------------------------------------------------------*/
- if( SFX_ITEM_SET == rSet.GetItemState(
- FN_PARAM_DOCDISP, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_DOCDISP, sal_False, &pItem ))
{
const SwDocDisplayItem* pDocDispItem = (const SwDocDisplayItem*)pItem;
if(!aViewOpt.IsViewMetaChars())
{
- if( (!aViewOpt.IsTab( TRUE ) && pDocDispItem->bTab) ||
- (!aViewOpt.IsBlank( TRUE ) && pDocDispItem->bSpace) ||
- (!aViewOpt.IsParagraph( TRUE ) && pDocDispItem->bParagraphEnd) ||
- (!aViewOpt.IsLineBreak( TRUE ) && pDocDispItem->bManualBreak) )
+ if( (!aViewOpt.IsTab( sal_True ) && pDocDispItem->bTab) ||
+ (!aViewOpt.IsBlank( sal_True ) && pDocDispItem->bSpace) ||
+ (!aViewOpt.IsParagraph( sal_True ) && pDocDispItem->bParagraphEnd) ||
+ (!aViewOpt.IsLineBreak( sal_True ) && pDocDispItem->bManualBreak) )
{
- aViewOpt.SetViewMetaChars(TRUE);
+ aViewOpt.SetViewMetaChars(sal_True);
if(pBindings)
pBindings->Invalidate(FN_VIEW_META_CHARS);
}
@@ -304,32 +304,28 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
Elements - interpret Item
-----------------------------------------------------------------------*/
- if( SFX_ITEM_SET == rSet.GetItemState(
- FN_PARAM_ELEM, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ELEM, sal_False, &pItem ) )
{
const SwElemItem* pElemItem = (const SwElemItem*)pItem;
pElemItem->FillViewOptions( aViewOpt );
}
- if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_METRIC,
- FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_METRIC, sal_False, &pItem ) )
{
SFX_APP()->SetOptions(rSet);
const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem;
::SetDfltMetric((FieldUnit)pMetricItem->GetValue(), !bTextDialog);
}
-
if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_APPLYCHARUNIT,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
SFX_APP()->SetOptions(rSet);
const SfxBoolItem* pCharItem = (const SfxBoolItem*)pItem;
::SetApplyCharUnit(pCharItem->GetValue(), !bTextDialog);
}
- if( SFX_ITEM_SET == rSet.GetItemState(FN_HSCROLL_METRIC,
- FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState(FN_HSCROLL_METRIC, sal_False, &pItem ) )
{
const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem;
FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue();
@@ -338,8 +334,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
pAppView->ChangeTabMetric(eUnit);
}
- if( SFX_ITEM_SET == rSet.GetItemState(FN_VSCROLL_METRIC,
- FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState(FN_VSCROLL_METRIC, sal_False, &pItem ) )
{
const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem;
FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue();
@@ -348,10 +343,9 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
pAppView->ChangeVLinealMetric(eUnit);
}
- if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP,
- FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, sal_False, &pItem ) )
{
- USHORT nTabDist = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nTabDist = ((const SfxUInt16Item*)pItem)->GetValue();
pPref->SetDefTab(nTabDist);
if(pAppView)
{
@@ -376,8 +370,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
Interpret page Grid Settings
----------------------------------------------------------------------*/
- if( SFX_ITEM_SET == rSet.GetItemState(
- SID_ATTR_GRID_OPTIONS, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS, sal_False, &pItem ))
{
const SvxGridItem* pGridItem = (const SvxGridItem*)pItem;
@@ -407,8 +400,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
Interpret Writer Printer Options
----------------------------------------------------------------------*/
- if( SFX_ITEM_SET == rSet.GetItemState(
- FN_PARAM_ADDPRINTER, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, sal_False, &pItem ))
{
SwPrintOptions* pOpt = GetPrtOptions(!bTextDialog);
if (pOpt)
@@ -422,27 +414,35 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
}
- if( SFX_ITEM_SET == rSet.GetItemState(
- FN_PARAM_SHADOWCURSOR, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem ))
{
((SwShadowCursorItem*)pItem)->FillViewOptions( aViewOpt );
if(pBindings)
pBindings->Invalidate(FN_SHADOWCURSOR);
}
- if( SFX_ITEM_SET == rSet.GetItemState(
- FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem ))
+ if( pAppView )
+ {
+ SwWrtShell &rWrtSh = pAppView->GetWrtShell();
+ const bool bAlignFormulas = rWrtSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT );
+ pPref->SetAlignMathObjectsToBaseline( bAlignFormulas );
+
+ // don't align formulas in documents that are currently loading
+ if (bAlignFormulas && !rWrtSh.GetDoc()->IsInReading())
+ rWrtSh.AlignAllFormulasToBaseline();
+ }
+
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, sal_False, &pItem ))
{
aViewOpt.SetCursorInProtectedArea(((const SfxBoolItem*)pItem)->GetValue());
}
// set elements for the current view and shell
- ApplyUsrPref( aViewOpt, pAppView,
- bTextDialog? VIEWOPT_DEST_TEXT : VIEWOPT_DEST_WEB);
+ ApplyUsrPref( aViewOpt, pAppView, bTextDialog? VIEWOPT_DEST_TEXT : VIEWOPT_DEST_WEB);
}
-SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet )
+SfxTabPage* SwModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet )
{
SfxTabPage* pRet = NULL;
SfxAllItemSet aSet(*(rSet.GetPool()));
@@ -511,7 +511,7 @@ SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemS
if(pCurrView)
{
// if text then not WebView and vice versa
- BOOL bWebView = 0 != PTR_CAST(SwWebView, pCurrView);
+ sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pCurrView);
if( (bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE == nId) ||
(!bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE != nId) )
{
@@ -535,6 +535,15 @@ SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemS
if ( fnCreatePage )
pRet = (*fnCreatePage)( pParent, rSet );
}
+ if (pRet && (nId == RID_SW_TP_OPTSHDWCRSR || nId == RID_SW_TP_HTML_OPTSHDWCRSR))
+ {
+ SwView* pCurrView = GetView();
+ if(pCurrView)
+ {
+ aSet.Put( SwWrtShellItem( SID_WRT_SHELL, pCurrView->GetWrtShellPtr() ) );
+ pRet->PageCreated(aSet);
+ }
+ }
}
break;
#if OSL_DEBUG_LEVEL > 1
@@ -580,5 +589,4 @@ SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemS
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index ffb398048df6..1443ce971aa8 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -66,7 +66,7 @@
#include <fmtfld.hxx>
#include <node.hxx>
#include <swwait.hxx>
-#include <swprtopt.hxx>
+#include <printdata.hxx>
#include <frmatr.hxx>
#include <view.hxx> // for the current view
#include <edtwin.hxx>
@@ -82,6 +82,7 @@
#include <shellio.hxx> // I/O
#include <docstyle.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <docstat.hxx>
#include <pagedesc.hxx>
#include <pview.hxx>
@@ -148,11 +149,11 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
SwCrsrShell *pCrsrShell,
SwPaM* pPaM )
{
- BOOL bAPICall = FALSE;
+ sal_Bool bAPICall = sal_False;
const SfxPoolItem* pApiItem;
const SfxItemSet* pMedSet;
if( 0 != ( pMedSet = rMedium.GetItemSet() ) && SFX_ITEM_SET ==
- pMedSet->GetItemState( FN_API_CALL, TRUE, &pApiItem ) )
+ pMedSet->GetItemState( FN_API_CALL, sal_True, &pApiItem ) )
bAPICall = ((const SfxBoolItem*)pApiItem)->GetValue();
const SfxFilter* pFlt = rMedium.GetFilter();
@@ -196,7 +197,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
{
const SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem *pPassItem;
- if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, TRUE, &pPassItem))
+ if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, sal_True, &pPassItem))
aPasswd = ((const SfxStringItem *)pPassItem)->GetValue();
}
@@ -207,19 +208,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
return 0;
}
}
- if(rMedium.IsStorage())
- {
- const SfxItemSet* pSet = rMedium.GetItemSet();
- const SfxPoolItem *pItem;
- if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, TRUE, &pItem))
- {
- OSL_ENSURE(pItem->IsA( TYPE(SfxStringItem) ), "Wrong parameter type");
- comphelper::OStorageHelper::SetCommonStoragePassword( rMedium.GetStorage(), ((const SfxStringItem *)pItem)->GetValue() );
- }
- // And for document-paste the FF-Version, when it's the own filter
- OSL_ENSURE( /*pRead != ReadSw3 || */pRead != ReadXML || pFlt->GetVersion(),
- "No FF version set in filter" );
- }
+
// #i30171# set the UpdateDocMode at the SwDocShell
SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
nUpdateDocMode = pUpdateDocItem ? pUpdateDocItem->GetValue() : document::UpdateDocMode::NO_UPDATE;
@@ -234,7 +223,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
const SfxItemSet* pSet;
const SfxPoolItem* pItem;
if( 0 != ( pSet = rMedium.GetItemSet() ) && SFX_ITEM_SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
aOpt.ReadUserData( ((const SfxStringItem*)pItem)->GetValue() );
if( pRead )
@@ -248,17 +237,17 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
Description: Loading
--------------------------------------------------------------------*/
-BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium )
+sal_Bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::ConvertFrom" );
SwReader* pRdr;
SwRead pRead = StartConvertFrom(rMedium, &pRdr);
if (!pRead)
- return FALSE; // #129881# return if no reader is found
+ return sal_False; // #129881# return if no reader is found
SotStorageRef pStg=pRead->getSotStorageRef(); // #i45333# save sot storage ref in case of recursive calls
- SwWait aWait( *this, TRUE );
+ SwWait aWait( *this, sal_True );
// Suppress SfxProgress, when we are Embedded
SW_MOD()->SetEmbeddedLoadSave(
@@ -269,7 +258,7 @@ BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium )
/* #106748# Restore the pool default if reading a saved document. */
pDoc->RemoveAllFmtLanguageDependencies();
- ULONG nErr = pRdr->Read( *pRead );
+ sal_uLong nErr = pRdr->Read( *pRead );
// Maybe put away one old Doc
if ( pDoc != pRdr->GetDoc() )
@@ -289,10 +278,10 @@ BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium )
delete pRdr;
- SW_MOD()->SetEmbeddedLoadSave( FALSE );
+ SW_MOD()->SetEmbeddedLoadSave( sal_False );
SetError( nErr, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
- BOOL bOk = !IsError( nErr );
+ sal_Bool bOk = !IsError( nErr );
if ( bOk && !pDoc->IsInLoadAsynchron() )
{
@@ -309,13 +298,13 @@ BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium )
--------------------------------------------------------------------*/
-BOOL SwDocShell::Save()
+sal_Bool SwDocShell::Save()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::Save" );
//#i3370# remove quick help to prevent saving of autocorrection suggestions
if(pView)
pView->GetEditWin().StopQuickHelp();
- SwWait aWait( *this, TRUE );
+ SwWait aWait( *this, sal_True );
CalcLayoutForOLEObjects(); // format for OLE objets
// #i62875#
@@ -327,7 +316,7 @@ BOOL SwDocShell::Save()
pDoc->set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
}
- ULONG nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
+ sal_uLong nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
if( SfxObjectShell::Save() )
{
switch( GetCreateMode() )
@@ -340,16 +329,16 @@ BOOL SwDocShell::Save()
{
WriterRef xWrt;
::GetXMLWriter( aEmptyStr, GetMedium()->GetBaseURL( true ), xWrt );
- xWrt->SetOrganizerMode( TRUE );
+ xWrt->SetOrganizerMode( sal_True );
SwWriter aWrt( *GetMedium(), *pDoc );
nErr = aWrt.Write( xWrt );
- xWrt->SetOrganizerMode( FALSE );
+ xWrt->SetOrganizerMode( sal_False );
}
break;
case SFX_CREATE_MODE_EMBEDDED:
// Suppress SfxProgress, if we are Embedded
- SW_MOD()->SetEmbeddedLoadSave( TRUE );
+ SW_MOD()->SetEmbeddedLoadSave( sal_True );
// no break;
case SFX_CREATE_MODE_STANDARD:
@@ -360,7 +349,7 @@ BOOL SwDocShell::Save()
{
if( SvtFilterOptions::Get()->IsLoadWordBasicStorage() )
nVBWarning = GetSaveWarningOfMSVBAStorage( (SfxObjectShell&) (*this) );
- pDoc->SetContainsMSVBasic( FALSE );
+ pDoc->SetContainsMSVBasic( sal_False );
}
// End TableBox Edit!
@@ -370,11 +359,11 @@ BOOL SwDocShell::Save()
WriterRef xWrt;
::GetXMLWriter( aEmptyStr, GetMedium()->GetBaseURL( true ), xWrt );
- BOOL bLockedView(FALSE);
+ sal_Bool bLockedView(sal_False);
if ( pWrtShell )
{
bLockedView = pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE ); //lock visible section
+ pWrtShell->LockView( sal_True ); //lock visible section
}
SwWriter aWrt( *GetMedium(), *pDoc );
@@ -385,7 +374,7 @@ BOOL SwDocShell::Save()
}
break;
}
- SW_MOD()->SetEmbeddedLoadSave( FALSE );
+ SW_MOD()->SetEmbeddedLoadSave( sal_False );
}
SetError( nErr ? nErr : nVBWarning, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
@@ -406,7 +395,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SaveAs" );
- SwWait aWait( *this, TRUE );
+ SwWait aWait( *this, sal_True );
//#i3370# remove quick help to prevent saving of autocorrection suggestions
if(pView)
pView->GetEditWin().StopQuickHelp();
@@ -454,7 +443,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
pDoc->set(IDocumentSettingAccess::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, false);
}
- ULONG nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
+ sal_uLong nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
uno::Reference < embed::XStorage > xStor = rMedium.GetOutputStorage();
if( SfxObjectShell::SaveAs( rMedium ) )
{
@@ -467,7 +456,9 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
// will set the wrong class id.
SvGlobalName aClassName;
String aAppName, aLongUserName, aUserName;
- SfxObjectShellRef xDocSh =
+
+ // The document is closed explicitly, but using SfxObjectShellLock is still more correct here
+ SfxObjectShellLock xDocSh =
new SwGlobalDocShell( SFX_CREATE_MODE_INTERNAL );
// the global document can not be a template
xDocSh->SetupStorage( xStor, SotStorage::GetVersion( xStor ), sal_False );
@@ -478,7 +469,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
{
if( SvtFilterOptions::Get()->IsLoadWordBasicStorage() )
nVBWarning = GetSaveWarningOfMSVBAStorage( (SfxObjectShell&) *this );
- pDoc->SetContainsMSVBasic( FALSE );
+ pDoc->SetContainsMSVBasic( sal_False );
}
// End TableBox Edit!
@@ -487,8 +478,8 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
// Remember and preserve Modified-Flag without calling the Link
// (for OLE; after Statement from MM)
- BOOL bIsModified = pDoc->IsModified();
- SwUndoNoModifiedPosition aOldPos = pDoc->getUndoNoModifiedPosition();
+ sal_Bool bIsModified = pDoc->IsModified();
+ pDoc->GetIDocumentUndoRedo().LockUndoNoModifiedPosition();
Link aOldOLELnk( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
@@ -499,11 +490,11 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
WriterRef xWrt;
::GetXMLWriter( aEmptyStr, rMedium.GetBaseURL( true ), xWrt );
- BOOL bLockedView(FALSE);
+ sal_Bool bLockedView(sal_False);
if ( pWrtShell )
{
bLockedView = pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE ); //lock visible section
+ pWrtShell->LockView( sal_True ); //lock visible section
}
SwWriter aWrt( rMedium, *pDoc );
@@ -515,11 +506,11 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
if( bIsModified )
{
pDoc->SetModified();
- pDoc->setUndoNoModifiedPosition( aOldPos );
+ pDoc->GetIDocumentUndoRedo().UnLockUndoNoModifiedPosition();
}
pDoc->SetOle2Link( aOldOLELnk );
- SW_MOD()->SetEmbeddedLoadSave( FALSE );
+ SW_MOD()->SetEmbeddedLoadSave( sal_False );
}
SetError( nErr ? nErr : nVBWarning, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
@@ -537,12 +528,12 @@ SwSrcView* lcl_GetSourceView( SwDocShell* pSh )
return PTR_CAST( SwSrcView, pViewShell);
}
-BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
+sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::ConvertTo" );
const SfxFilter* pFlt = rMedium.GetFilter();
if( !pFlt )
- return FALSE;
+ return sal_False;
WriterRef xWriter;
SwReaderWriter::GetWriter( pFlt->GetUserData(), rMedium.GetBaseURL( true ), xWriter );
@@ -550,7 +541,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
{ // Filter not available
InfoBox( 0,
SW_RESSTR(STR_DLLNOTFOUND) ).Execute();
- return FALSE;
+ return sal_False;
}
//#i3370# remove quick help to prevent saving of autocorrection suggestions
@@ -565,22 +556,22 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
pView->GetPostItMgr()->UpdateDataOnActiveSidebarWin();
}
- ULONG nVBWarning = 0;
+ sal_uLong nVBWarning = 0;
if( pDoc->ContainsMSVBasic() )
{
- BOOL bSave = pFlt->GetUserData().EqualsAscii( "CWW8" )
+ sal_Bool bSave = pFlt->GetUserData().EqualsAscii( "CWW8" )
&& SvtFilterOptions::Get()->IsLoadWordBasicStorage();
if ( bSave )
{
- SvStorageRef xStg = new SotStorage( rMedium.GetOutStream(), FALSE );
+ SvStorageRef xStg = new SotStorage( rMedium.GetOutStream(), sal_False );
OSL_ENSURE( !xStg->GetError(), "No storage available for storing VBA macros!" );
if ( !xStg->GetError() )
{
nVBWarning = SaveOrDelMSVBAStorage( (SfxObjectShell&) *this, *xStg, bSave, String::CreateFromAscii("Macros") );
xStg->Commit();
- pDoc->SetContainsMSVBasic( TRUE );
+ pDoc->SetContainsMSVBasic( sal_True );
}
}
}
@@ -637,15 +628,15 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
pFlt->GetUserData().EqualsAscii( FILTER_XMLVW ) ) )
{
// determine the own Type
- BYTE nMyType = 0;
+ sal_uInt8 nMyType = 0;
if( ISA( SwWebDocShell) )
nMyType = 1;
else if( ISA( SwGlobalDocShell) )
nMyType = 2;
// determine the desired Type
- BYTE nSaveType = 0;
- ULONG nSaveClipId = pFlt->GetFormat();
+ sal_uInt8 nSaveType = 0;
+ sal_uLong nSaveClipId = pFlt->GetFormat();
if( SOT_FORMATSTR_ID_STARWRITERWEB_8 == nSaveClipId ||
SOT_FORMATSTR_ID_STARWRITERWEB_60 == nSaveClipId ||
SOT_FORMATSTR_ID_STARWRITERWEB_50 == nSaveClipId ||
@@ -658,9 +649,9 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
nSaveType = 2;
// Change Flags of the Document accordingly
- BOOL bIsHTMLModeSave = GetDoc()->get(IDocumentSettingAccess::HTML_MODE);
- BOOL bIsGlobalDocSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT);
- BOOL bIsGlblDocSaveLinksSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS);
+ sal_Bool bIsHTMLModeSave = GetDoc()->get(IDocumentSettingAccess::HTML_MODE);
+ sal_Bool bIsGlobalDocSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT);
+ sal_Bool bIsGlblDocSaveLinksSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS);
if( nMyType != nSaveType )
{
GetDoc()->set(IDocumentSettingAccess::HTML_MODE, 1 == nSaveType);
@@ -687,7 +678,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
}
// Now normally save the Document
- BOOL bRet = SaveAs( rMedium );
+ sal_Bool bRet = SaveAs( rMedium );
if( nMyType != nSaveType )
{
@@ -696,25 +687,6 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
GetDoc()->set(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS, bIsGlblDocSaveLinksSave);
}
- if( bRet && nMyType != nSaveType )
- {
- SvGlobalName aClassName;
- String aAppName, aLongUserName, aUserName;
- SfxObjectShellRef xDocSh;
- switch( nSaveType )
- {
- case 0:
- xDocSh = new SwDocShell( SFX_CREATE_MODE_INTERNAL );
- break;
- case 1:
- xDocSh = new SwWebDocShell( SFX_CREATE_MODE_INTERNAL );
- break;
- case 2:
- xDocSh = new SwGlobalDocShell( SFX_CREATE_MODE_INTERNAL );
- break;
- }
- }
-
return bRet;
}
@@ -728,7 +700,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
if( 0 != ( pSet = rMedium.GetItemSet() ) )
{
if( SFX_ITEM_SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS,
- TRUE, &pItem ) )
+ sal_True, &pItem ) )
sItemOpt = ((const SfxStringItem*)pItem)->GetValue();
}
if(sItemOpt.Len())
@@ -742,24 +714,24 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
SFX_CREATE_MODE_EMBEDDED == GetCreateMode());
// Span Context in order to suppress the Selection's View
- ULONG nErrno;
+ sal_uLong nErrno;
String aFileName( rMedium.GetName() );
// No View, so the whole Document!
if ( pWrtShell )
{
- SwWait aWait( *this, TRUE );
+ SwWait aWait( *this, sal_True );
// #i106906#
const sal_Bool bFormerLockView = pWrtShell->IsViewLocked();
pWrtShell->LockView( sal_True );
pWrtShell->StartAllAction();
pWrtShell->Push();
- SwWriter aWrt( rMedium, *pWrtShell, TRUE );
+ SwWriter aWrt( rMedium, *pWrtShell, sal_True );
nErrno = aWrt.Write( xWriter, &aFileName );
//JP 16.05.97: In case the SFX revokes the View while saving
if( pWrtShell )
{
- pWrtShell->Pop(FALSE);
+ pWrtShell->Pop(sal_False);
pWrtShell->EndAllAction();
// #i106906#
pWrtShell->LockView( bFormerLockView );
@@ -781,7 +753,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
}
}
- SW_MOD()->SetEmbeddedLoadSave( FALSE );
+ SW_MOD()->SetEmbeddedLoadSave( sal_False );
SetError( nErrno ? nErrno : nVBWarning, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
if( !rMedium.IsStorage() )
rMedium.CloseOutStream();
@@ -802,7 +774,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xStor )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SaveCompleted" );
- BOOL bRet = SfxObjectShell::SaveCompleted( xStor );
+ sal_Bool bRet = SfxObjectShell::SaveCompleted( xStor );
if( bRet )
{
// Do not decide until here, whether Saving was successful or not
@@ -814,9 +786,9 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS
if( pOLEChildList )
{
- BOOL bResetModified = IsEnableSetModified();
+ sal_Bool bResetModified = IsEnableSetModified();
if( bResetModified )
- EnableSetModified( FALSE );
+ EnableSetModified( sal_False );
uno::Sequence < rtl::OUString > aNames = pOLEChildList->GetObjectNames();
for( sal_Int32 n = aNames.getLength(); n; n-- )
@@ -829,7 +801,7 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS
DELETEZ( pOLEChildList );
if( bResetModified )
- EnableSetModified( TRUE );
+ EnableSetModified( sal_True );
}
return bRet;
}
@@ -839,12 +811,12 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS
--------------------------------------------------------------------*/
void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
- USHORT nAspect )
+ sal_uInt16 nAspect )
{
//fix #25341# Draw should not affect the Modified
- BOOL bResetModified;
- if ( TRUE == (bResetModified = IsEnableSetModified()) )
- EnableSetModified( FALSE );
+ sal_Bool bResetModified;
+ if ( sal_True == (bResetModified = IsEnableSetModified()) )
+ EnableSetModified( sal_False );
// When there is a JobSetup connected to the Document, we copy it to
// reconnect it after PrtOle2. We don't use an empty JobSetup because
@@ -866,8 +838,8 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
pDev->SetFillColor();
pDev->SetLineColor();
pDev->SetBackground();
- BOOL bWeb = 0 != PTR_CAST(SwWebDocShell, this);
- SwPrtOptions aOpts( aEmptyStr );
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebDocShell, this);
+ SwPrintData aOpts;
ViewShell::PrtOle2( pDoc, SW_MOD()->GetUsrPref(bWeb), aOpts, pDev, aRect );
pDev->Pop();
@@ -877,7 +849,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
delete pOrig;
}
if ( bResetModified )
- EnableSetModified( TRUE );
+ EnableSetModified( sal_True );
}
@@ -899,14 +871,14 @@ void SwDocShell::SetVisArea( const Rectangle &rRect )
aRect.Move( nMoveX, nMoveY );
// Calls SfxInPlaceObject::SetVisArea()!
- pView->SetVisArea( aRect, TRUE );
+ pView->SetVisArea( aRect, sal_True );
}
else
SfxObjectShell::SetVisArea( aRect );
}
-Rectangle SwDocShell::GetVisArea( USHORT nAspect ) const
+Rectangle SwDocShell::GetVisArea( sal_uInt16 nAspect ) const
{
if ( nAspect == ASPECT_THUMBNAIL )
{
@@ -914,7 +886,7 @@ Rectangle SwDocShell::GetVisArea( USHORT nAspect ) const
SwNodeIndex aIdx( pDoc->GetNodes().GetEndOfExtras(), 1 );
SwCntntNode* pNd = pDoc->GetNodes().GoNext( &aIdx );
- const SwRect aPageRect = pNd->FindPageFrmRect( FALSE, 0, FALSE );
+ const SwRect aPageRect = pNd->FindPageFrmRect( sal_False, 0, sal_False );
return aPageRect.SVRect();
}
return SfxObjectShell::GetVisArea( nAspect );
@@ -938,7 +910,7 @@ void SwDocShell::OnDocumentPrinterChanged( Printer * pNewPrinter )
GetDoc()->setPrinter( 0, true, true );
}
-ULONG SwDocShell::GetMiscStatus() const
+sal_uLong SwDocShell::GetMiscStatus() const
{
return SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE;
}
@@ -982,7 +954,7 @@ sal_uInt16 SwDocShell::GetHiddenInformationState( sal_uInt16 nStates )
void SwDocShell::GetState(SfxItemSet& rSet)
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
@@ -990,7 +962,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
{
case SID_PRINTPREVIEW:
{
- BOOL bDisable = IsInPlaceActive();
+ sal_Bool bDisable = IsInPlaceActive();
if ( !bDisable )
{
SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this);
@@ -999,7 +971,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
if ( PTR_CAST(SwView, pTmpFrm->GetViewShell()) &&
((SwView*)pTmpFrm->GetViewShell())->GetWrtShell().getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE))
{
- bDisable = TRUE;
+ bDisable = sal_True;
break;
}
pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this);
@@ -1009,9 +981,9 @@ void SwDocShell::GetState(SfxItemSet& rSet)
rSet.DisableItem( SID_PRINTPREVIEW );
else
{
- SfxBoolItem aBool( SID_PRINTPREVIEW, FALSE );
+ SfxBoolItem aBool( SID_PRINTPREVIEW, sal_False );
if( PTR_CAST( SwPagePreView, SfxViewShell::Current()) )
- aBool.SetValue( TRUE );
+ aBool.SetValue( sal_True );
rSet.Put( aBool );
}
}
@@ -1020,7 +992,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
{
SfxViewShell* pCurrView = GetView() ? (SfxViewShell*)GetView()
: SfxViewShell::Current();
- BOOL bSourceView = 0 != PTR_CAST(SwSrcView, pCurrView);
+ sal_Bool bSourceView = 0 != PTR_CAST(SwSrcView, pCurrView);
rSet.Put(SfxBoolItem(SID_SOURCEVIEW, bSourceView));
}
break;
@@ -1065,7 +1037,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
case SID_ATTR_YEAR2000:
{
- const SvNumberFormatter* pFmtr = pDoc->GetNumberFormatter(FALSE);
+ const SvNumberFormatter* pFmtr = pDoc->GetNumberFormatter(sal_False);
rSet.Put( SfxUInt16Item( nWhich,
static_cast< sal_uInt16 >(
pFmtr ? pFmtr->GetYear2000()
@@ -1077,6 +1049,23 @@ void SwDocShell::GetState(SfxItemSet& rSet)
rSet.Put( SvxFontListItem( pFontList, SID_ATTR_CHAR_FONTLIST ) );
}
break;
+ case SID_MAIL_PREPAREEXPORT:
+ {
+ //check if linked content or possibly hidden content is available
+ //pDoc->UpdateFlds( NULL, false );
+ sfx2::LinkManager& rLnkMgr = pDoc->GetLinkManager();
+ const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.GetLinks();
+ sal_Bool bRet = sal_False;
+ if( rLnks.Count() )
+ bRet = sal_True;
+ else
+ {
+ //sections with hidden flag, hidden character attribute, hidden paragraph/text or conditional text fields
+ bRet = pDoc->HasInvisibleContent();
+ }
+ rSet.Put( SfxBoolItem( nWhich, bRet ) );
+ }
+ break;
default: OSL_ENSURE(!this,"You cannot get here!");
@@ -1097,7 +1086,7 @@ IMPL_LINK( SwDocShell, Ole2ModifiedHdl, void *, p )
// Bit 1: -> new state
long nStatus = (long)p;
if( IsEnableSetModified() )
- SetModified( (nStatus & 2) ? TRUE : FALSE );
+ SetModified( (nStatus & 2) ? sal_True : sal_False );
return 0;
}
@@ -1221,7 +1210,7 @@ void SwDocShell::CalcLayoutForOLEObjects()
// read by the binary filter:
void SwDocShell::UpdateLinks()
{
- GetDoc()->UpdateLinks(TRUE);
+ GetDoc()->UpdateLinks(sal_True);
// #i50703# Update footnote numbers
SwTxtFtn::SetUniqueSeqRefNo( *GetDoc() );
SwNodeIndex aTmp( GetDoc()->GetNodes() );
@@ -1293,8 +1282,8 @@ bool SwDocShell::HasChangeRecordProtection() const
void SwDocShell::SetChangeRecording( bool bActivate )
{
- USHORT nOn = bActivate ? nsRedlineMode_t::REDLINE_ON : 0;
- USHORT nMode = pWrtShell->GetRedlineMode();
+ sal_uInt16 nOn = bActivate ? nsRedlineMode_t::REDLINE_ON : 0;
+ sal_uInt16 nMode = pWrtShell->GetRedlineMode();
pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
}
@@ -1307,7 +1296,7 @@ bool SwDocShell::SetProtectionPassword( const String &rNewPassword )
IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess();
Sequence< sal_Int8 > aPasswd = pIDRA->GetRedlinePassword();
- if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, FALSE, &pItem )
+ if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, sal_False, &pItem )
&& ((SfxBoolItem*)pItem)->GetValue() == (aPasswd.getLength() > 0))
return false;
@@ -1343,7 +1332,7 @@ bool SwDocShell::GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal
IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess();
Sequence< sal_Int8 > aPasswdHash( pIDRA->GetRedlinePassword() );
- if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, FALSE, &pItem )
+ if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, sal_False, &pItem )
&& ((SfxBoolItem*)pItem)->GetValue() == (aPasswdHash.getLength() != 0))
return false;
rPasswordHash = aPasswdHash;
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index ebf29b728f3f..85a7bd82f81e 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -84,6 +84,7 @@
#include <redlndlg.hxx>
#include <docstyle.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pagedesc.hxx>
#include <shellio.hxx>
#include <pview.hxx>
@@ -129,7 +130,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
using ::rtl::OUString;
using namespace ::sfx2;
-extern BOOL FindPhyStyle( SwDoc& , const String& , SfxStyleFamily );
+extern sal_Bool FindPhyStyle( SwDoc& , const String& , SfxStyleFamily );
/*--------------------------------------------------------------------
Description: create DocInfo (virtual)
@@ -165,7 +166,7 @@ void SwDocShell::DoFlushDocInfo()
bool bUnlockView(true);
if ( pWrtShell ) {
bUnlockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE ); // lock visible section
+ pWrtShell->LockView( sal_True ); // lock visible section
pWrtShell->StartAllAction();
}
@@ -174,7 +175,7 @@ void SwDocShell::DoFlushDocInfo()
if ( pWrtShell ) {
pWrtShell->EndAllAction();
if ( bUnlockView ) {
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
}
}
}
@@ -185,7 +186,7 @@ void lcl_processCompatibleSfxHint( const uno::Reference< script::vba::XVBAEventP
if ( rHint.ISA( SfxEventHint ) )
{
uno::Sequence< uno::Any > aArgs;
- ULONG nEventId = ((SfxEventHint&)rHint).GetEventId();
+ sal_uLong nEventId = ((SfxEventHint&)rHint).GetEventId();
switch( nEventId )
{
case SFX_EVENT_CREATEDOC:
@@ -213,7 +214,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
if( xVbaEvents.is() )
lcl_processCompatibleSfxHint( xVbaEvents, rHint );
- USHORT nAction = 0;
+ sal_uInt16 nAction = 0;
if( rHint.ISA(SfxSimpleHint) )
{
// switch for more actions
@@ -234,11 +235,11 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
if( nAction )
{
- BOOL bUnlockView = sal_True; //initializing prevents warning
+ sal_Bool bUnlockView = sal_True; //initializing prevents warning
if( pWrtShell )
{
bUnlockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE ); //lock visible section
+ pWrtShell->LockView( sal_True ); //lock visible section
pWrtShell->StartAllAction();
}
switch( nAction )
@@ -255,7 +256,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
const bool bResetModified = IsEnableSetModified();
if ( bResetModified )
- EnableSetModified( FALSE );
+ EnableSetModified( sal_False );
// #i41679#
const bool bIsDocModified = pDoc->IsModified();
@@ -265,7 +266,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( !bIsDocModified )
pDoc->ResetModified();
if ( bResetModified )
- EnableSetModified( TRUE );
+ EnableSetModified( sal_True );
}
break;
}
@@ -274,7 +275,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
pWrtShell->EndAllAction();
if( bUnlockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
}
}
}
@@ -283,11 +284,11 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
Description: Notification Close Doc
--------------------------------------------------------------------*/
-USHORT SwDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
+sal_uInt16 SwDocShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
{
- USHORT nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing );
+ sal_uInt16 nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing );
- if( TRUE == nRet ) //has to be queried against TRUE! (RET_NEWTASK)
+ if( sal_True == nRet ) //has to be queried against TRUE! (RET_NEWTASK)
EndListening( *this );
if( pDoc && IsInPrepareClose() )
@@ -307,22 +308,21 @@ USHORT SwDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
Description: Organizer
--------------------------------------------------------------------*/
-BOOL SwDocShell::Insert( SfxObjectShell &rSource,
- USHORT nSourceIdx1, // SourcePool: uppermost content level (templates/macros)
- USHORT nSourceIdx2, // Index in the content
- USHORT nSourceIdx3, // Index in the content level
- USHORT &rIdx1, // and the same for the DestinationPool
- USHORT &rIdx2, // ""
- USHORT &rIdx3, // ""
- USHORT &rRemovedIdx ) // if doubles are being deleted, Pos back
+sal_Bool SwDocShell::Insert( SfxObjectShell &rSource,
+ sal_uInt16 nSourceIdx1, // SourcePool: uppermost content level (templates/macros)
+ sal_uInt16 nSourceIdx2, // Index in the content
+ sal_uInt16 nSourceIdx3, // Index in the content level
+ sal_uInt16 &rIdx1, // and the same for the DestinationPool
+ sal_uInt16 &rIdx2, // ""
+ sal_uInt16 &rIdx3, // ""
+ sal_uInt16 &rRemovedIdx ) // if doubles are being deleted, Pos back
{
// #i48949# - actions aren't undoable. Thus, allow no undo
// actions
// Note: The undo action stack is cleared at the end of this method.
- bool bDoesUndo( GetDoc()->DoesUndo() );
- GetDoc()->DoUndo( sal_False );
+ ::sw::UndoGuard const undoGuard(GetDoc()->GetIDocumentUndoRedo());
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (INDEX_IGNORE == rIdx1 && CONTENT_STYLE == nSourceIdx1)
rIdx1 = CONTENT_STYLE;
@@ -335,7 +335,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
// we can't move back and forth within ourselves
if( pHisPool == pMyPool )
- return FALSE;
+ return sal_False;
if( INDEX_IGNORE == rIdx2 )
rIdx2 = pMyPool->Count();
@@ -355,10 +355,10 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
( SFX_STYLE_FAMILY_CHAR == eOldFamily &&
rOldName == *SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD -
RES_POOLCOLL_TEXT_BEGIN ] ))
- return FALSE;
+ return sal_False;
SfxStyleFamily eMyOldFamily( pMyPool->GetSearchFamily() );
- USHORT nMySrchMask = pMyPool->GetSearchMask();
+ sal_uInt16 nMySrchMask = pMyPool->GetSearchMask();
SfxStyleSheetBase* pExist;
if( ::FindPhyStyle( *pDoc, rOldName, eOldFamily ) )
@@ -367,7 +367,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
if( ERRCODE_BUTTON_OK != ErrorHandler::HandleError(
*new MessageInfo( ERRCODE_SFXMSG_STYLEREPLACE, rOldName )) )
{
- return FALSE;
+ return sal_False;
}
// Because Replace needs the aStyleSheet-Member itself, the result
@@ -381,7 +381,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
GetDoc()->SetModified();
- return TRUE;
+ return sal_True;
}
pMyPool->SetSearchMask( eOldFamily, nMySrchMask );
@@ -413,7 +413,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
// Used and User-defined templates are being showed. That's why
// the Index of the template in the pool has to be found out.
pExist = pMyPool->First();
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
while( pExist )
{
if( pExist->GetName() == rOldName &&
@@ -435,7 +435,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
// who gets the new one as parent? who uses the new one as Follow?
// (always using the instanciated!!!)
pMyPool->SetSearchMask( eOldFamily, nMySrchMask );
- pMyPool->SetOrganizerMode( TRUE );
+ pMyPool->SetOrganizerMode( sal_True );
SfxStyleSheetBase* pTestSheet = pMyPool->First();
while (pTestSheet)
{
@@ -496,7 +496,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
OSL_ENSURE(pDoc, "Doc missing");
GetDoc()->SetModified();
- bRet = TRUE;
+ bRet = sal_True;
}
else
bRet = SfxObjectShell::Insert( rSource,
@@ -510,11 +510,10 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
// #i48949# - actions aren't undoable and could have change
// the document node array. Thus, clear the undo action stack.
- if ( bDoesUndo )
+ if (undoGuard.UndoWasEnabled())
{
- GetDoc()->DelAllUndoObj();
+ GetDoc()->GetIDocumentUndoRedo().DelAllUndoObj();
}
- GetDoc()->DoUndo( bDoesUndo );
return bRet;
}
@@ -523,11 +522,11 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
Description: template Remove
--------------------------------------------------------------------*/
-BOOL SwDocShell::Remove(USHORT nIdx1, // see Insert
- USHORT nIdx2,
- USHORT nIdx3)
+sal_Bool SwDocShell::Remove(sal_uInt16 nIdx1, // see Insert
+ sal_uInt16 nIdx2,
+ sal_uInt16 nIdx3)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (CONTENT_STYLE == nIdx1)
{
@@ -546,13 +545,13 @@ BOOL SwDocShell::Remove(USHORT nIdx1, // see Insert
( SFX_STYLE_FAMILY_CHAR == eFamily &&
aName == *SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD -
RES_POOLCOLL_TEXT_BEGIN ] ))
- return FALSE;
+ return sal_False;
// so delete
pMyPool->Remove( pMySheet );
// now correct the Parents/Follows of all instanciated
- pMyPool->SetOrganizerMode( TRUE );
+ pMyPool->SetOrganizerMode( sal_True );
SfxStyleSheetBase* pTestSheet = pMyPool->First();
while (pTestSheet)
{
@@ -574,7 +573,7 @@ BOOL SwDocShell::Remove(USHORT nIdx1, // see Insert
}
pMyPool->SetOrganizerMode( SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
- bRet = TRUE;
+ bRet = sal_True;
}
else
bRet = SfxObjectShell::Remove( nIdx1,
@@ -593,8 +592,8 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- USHORT nWhich = rReq.GetSlot();
- BOOL bDone = FALSE;
+ sal_uInt16 nWhich = rReq.GetSlot();
+ sal_Bool bDone = sal_False;
switch ( nWhich )
{
case SID_AUTO_CORRECT_DLG:
@@ -613,7 +612,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
SfxApplication* pApp = SFX_APP();
SfxRequest aAppReq(SID_AUTO_CORRECT_DLG, SFX_CALLMODE_SYNCHRON, pApp->GetPool());
- SfxBoolItem aSwOptions( SID_AUTO_CORRECT_DLG, TRUE );
+ SfxBoolItem aSwOptions( SID_AUTO_CORRECT_DLG, sal_True );
aAppReq.AppendItem(aSwOptions);
// SMARTTAGS
@@ -623,7 +622,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
aSet.Put( aSwOptions );
const SfxPoolItem* pOpenSmartTagOptionsItem = 0;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_OPEN_SMARTTAGOPTIONS, FALSE, &pOpenSmartTagOptionsItem ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_OPEN_SMARTTAGOPTIONS, sal_False, &pOpenSmartTagOptionsItem ) )
aSet.Put( *static_cast<const SfxBoolItem*>(pOpenSmartTagOptionsItem) );
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
@@ -643,7 +642,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
pAFlags->pAutoCmpltList = 0;
}
// remove all pointer we never delete the strings
- aTmpLst.Remove( (USHORT)0, aTmpLst.Count() );
+ aTmpLst.Remove( (sal_uInt16)0, aTmpLst.Count() );
if( !bOldAutoCmpltCollectWords && bOldAutoCmpltCollectWords !=
pAFlags->bAutoCmpltCollectWords )
@@ -665,20 +664,20 @@ void SwDocShell::Execute(SfxRequest& rReq)
case SID_PRINTPREVIEW:
{
- BOOL bSet = FALSE, bFound = FALSE, bOnly = TRUE;
+ sal_Bool bSet = sal_False, bFound = sal_False, bOnly = sal_True;
SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this);
SfxViewShell* pViewShell = SfxViewShell::Current();
SwView* pCurrView = dynamic_cast< SwView *> ( pViewShell );
- BOOL bCurrent = IS_TYPE( SwPagePreView, pViewShell );
+ sal_Bool bCurrent = IS_TYPE( SwPagePreView, pViewShell );
while( pTmpFrm ) // search PreView
{
if( IS_TYPE( SwView, pTmpFrm->GetViewShell()) )
- bOnly = FALSE;
+ bOnly = sal_False;
else if( IS_TYPE( SwPagePreView, pTmpFrm->GetViewShell()))
{
pTmpFrm->GetFrame().Appear();
- bFound = TRUE;
+ bFound = sal_True;
}
if( bFound && !bOnly )
break;
@@ -686,12 +685,12 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
if( pArgs && SFX_ITEM_SET ==
- pArgs->GetItemState( SID_PRINTPREVIEW, FALSE, &pItem ))
+ pArgs->GetItemState( SID_PRINTPREVIEW, sal_False, &pItem ))
bSet = ((SfxBoolItem*)pItem)->GetValue();
else
bSet = !bCurrent;
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
if( bSet && !bFound ) // Nothing found, so create new Preview
{
// Don't create new one for BrowseView!
@@ -722,14 +721,14 @@ void SwDocShell::Execute(SfxRequest& rReq)
case SID_TEMPLATE_LOAD:
{
String aFileName;
- static BOOL bText = TRUE;
- static BOOL bFrame = FALSE;
- static BOOL bPage = FALSE;
- static BOOL bNum = FALSE;
- static BOOL bMerge = FALSE;
- USHORT nRet = USHRT_MAX;
-
- USHORT nFlags = bFrame ? SFX_LOAD_FRAME_STYLES : 0;
+ static sal_Bool bText = sal_True;
+ static sal_Bool bFrame = sal_False;
+ static sal_Bool bPage = sal_False;
+ static sal_Bool bNum = sal_False;
+ static sal_Bool bMerge = sal_False;
+ sal_uInt16 nRet = USHRT_MAX;
+
+ sal_uInt16 nFlags = bFrame ? SFX_LOAD_FRAME_STYLES : 0;
if(bPage)
nFlags|= SFX_LOAD_PAGE_STYLES;
if(bNum)
@@ -741,13 +740,13 @@ void SwDocShell::Execute(SfxRequest& rReq)
if ( pArgs )
{
- SFX_REQUEST_ARG( rReq, pTemplateItem, SfxStringItem, SID_TEMPLATE_NAME, FALSE );
+ SFX_REQUEST_ARG( rReq, pTemplateItem, SfxStringItem, SID_TEMPLATE_NAME, sal_False );
if ( pTemplateItem )
{
aFileName = pTemplateItem->GetValue();
- SFX_REQUEST_ARG( rReq, pFlagsItem, SfxInt32Item, SID_TEMPLATE_LOAD, FALSE );
+ SFX_REQUEST_ARG( rReq, pFlagsItem, SfxInt32Item, SID_TEMPLATE_LOAD, sal_False );
if ( pFlagsItem )
- nFlags = (USHORT) pFlagsItem->GetValue();
+ nFlags = (sal_uInt16) pFlagsItem->GetValue();
}
}
@@ -780,7 +779,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
pFlt = aIter.Next();
}
- BOOL bWeb = 0 != dynamic_cast< SwWebDocShell *>( this );
+ sal_Bool bWeb = 0 != dynamic_cast< SwWebDocShell *>( this );
const SfxFilter *pOwnFlt =
SwDocShell::Factory().GetFilterContainer()->
GetFilter4FilterName(String::CreateFromAscii("writer8"));
@@ -830,7 +829,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
bMerge = 0 != (nFlags&SFX_MERGE_STYLES);
aOpt.SetMerge( !bMerge );
- SetError( LoadStylesFromFile( aFileName, aOpt, FALSE ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
+ SetError( LoadStylesFromFile( aFileName, aOpt, sal_False ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
if ( !GetError() )
rReq.Done();
}
@@ -853,7 +852,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
SwIoSystem::GetFilterOfFormat(
String::CreateFromAscii("HTML"),
SwWebDocShell::Factory().GetFilterContainer() );
- BOOL bLocalHasName = HasName();
+ sal_Bool bLocalHasName = HasName();
if(bLocalHasName)
{
//check for filter type
@@ -862,7 +861,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
QueryBox aQuery(&pViewFrm->GetWindow(), SW_RES(MSG_SAVEAS_HTML_QUERY));
if(RET_YES == aQuery.Execute())
- bLocalHasName = FALSE;
+ bLocalHasName = sal_False;
else
break;
}
@@ -888,13 +887,13 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
#if OSL_DEBUG_LEVEL > 1
{
- BOOL bWeb = 0 != dynamic_cast<SwWebDocShell*>(this);
- OSL_ENSURE(bWeb == TRUE, "SourceView only in WebDocShell");
+ sal_Bool bWeb = 0 != dynamic_cast<SwWebDocShell*>(this);
+ OSL_ENSURE(bWeb == sal_True, "SourceView only in WebDocShell");
}
#endif
// the SourceView is not the 1 for SwWebDocShell
- USHORT nSlot = SID_VIEWSHELL1;
- BOOL bSetModified = FALSE;
+ sal_uInt16 nSlot = SID_VIEWSHELL1;
+ sal_Bool bSetModified = sal_False;
SfxPrinter* pSavePrinter = 0;
if( 0 != pSrcView)
{
@@ -907,13 +906,12 @@ void SwDocShell::Execute(SfxRequest& rReq)
utl::TempFile aTempFile;
aTempFile.EnableKillingFile();
pSrcView->SaveContent(aTempFile.GetURL());
- bDone = TRUE;
- SfxEventConfiguration* pEvent = SFX_APP()->GetEventConfig();
+ bDone = sal_True;
SvxMacro aMac(aEmptyStr, aEmptyStr, STARBASIC);
- pEvent->ConfigureEvent(GlobalEventConfig::GetEventName( STR_EVENT_OPENDOC ), aMac, this);
- pEvent->ConfigureEvent(GlobalEventConfig::GetEventName( STR_EVENT_PREPARECLOSEDOC ), aMac, this);
- pEvent->ConfigureEvent(GlobalEventConfig::GetEventName( STR_EVENT_ACTIVATEDOC ), aMac, this);
- pEvent->ConfigureEvent(GlobalEventConfig::GetEventName( STR_EVENT_DEACTIVATEDOC ), aMac, this);
+ SfxEventConfiguration::ConfigureEvent(GlobalEventConfig::GetEventName( STR_EVENT_OPENDOC ), aMac, this);
+ SfxEventConfiguration::ConfigureEvent(GlobalEventConfig::GetEventName( STR_EVENT_PREPARECLOSEDOC ), aMac, this);
+ SfxEventConfiguration::ConfigureEvent(GlobalEventConfig::GetEventName( STR_EVENT_ACTIVATEDOC ), aMac, this);
+ SfxEventConfiguration::ConfigureEvent(GlobalEventConfig::GetEventName( STR_EVENT_DEACTIVATEDOC ), aMac, this);
ReloadFromHtml(aTempFile.GetURL(), pSrcView);
nSlot = 0;
}
@@ -953,13 +951,13 @@ void SwDocShell::Execute(SfxRequest& rReq)
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(RET_OK == pDlg->Execute())
{
- BYTE nLevel = pDlg->GetLevel();
- BYTE nPara = pDlg->GetPara();
+ sal_uInt8 nLevel = pDlg->GetLevel();
+ sal_uInt8 nPara = pDlg->GetPara();
SwDoc* pSmryDoc = new SwDoc();
- SfxObjectShellRef xDocSh( new SwDocShell( pSmryDoc, SFX_CREATE_MODE_STANDARD));
+ SfxObjectShellLock xDocSh( new SwDocShell( pSmryDoc, SFX_CREATE_MODE_STANDARD));
xDocSh->DoInitNew( 0 );
- BOOL bImpress = FN_ABSTRACT_STARIMPRESS == nWhich;
+ sal_Bool bImpress = FN_ABSTRACT_STARIMPRESS == nWhich;
pDoc->Summary( pSmryDoc, nLevel, nPara, bImpress );
if( bImpress )
{
@@ -987,12 +985,12 @@ void SwDocShell::Execute(SfxRequest& rReq)
pStrm->Seek( STREAM_SEEK_TO_BEGIN );
// Transfer ownership of stream to a lockbytes object
- SvLockBytes aLockBytes( pStrm, TRUE );
+ SvLockBytes aLockBytes( pStrm, sal_True );
SvLockBytesStat aStat;
if ( aLockBytes.Stat( &aStat, SVSTATFLAG_DEFAULT ) == ERRCODE_NONE )
{
sal_uInt32 nLen = aStat.nSize;
- ULONG nRead = 0;
+ sal_uLong nRead = 0;
uno::Sequence< sal_Int8 > aSeq( nLen );
aLockBytes.ReadAt( 0, aSeq.getArray(), nLen, &nRead );
@@ -1058,12 +1056,12 @@ void SwDocShell::Execute(SfxRequest& rReq)
pStrm->Seek( STREAM_SEEK_TO_BEGIN );
// Transfer ownership of stream to a lockbytes object
- SvLockBytes aLockBytes( pStrm, TRUE );
+ SvLockBytes aLockBytes( pStrm, sal_True );
SvLockBytesStat aStat;
if ( aLockBytes.Stat( &aStat, SVSTATFLAG_DEFAULT ) == ERRCODE_NONE )
{
sal_uInt32 nLen = aStat.nSize;
- ULONG nRead = 0;
+ sal_uLong nRead = 0;
uno::Sequence< sal_Int8 > aSeq( nLen );
aLockBytes.ReadAt( 0, aSeq.getArray(), nLen, &nRead );
@@ -1094,17 +1092,17 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
break;
case SID_SPELLCHECKER_CHANGED:
- //! FALSE, TRUE, TRUE is on the save side but a probably overdone
- SW_MOD()->CheckSpellChanges(FALSE, TRUE, TRUE, FALSE );
+ //! sal_False, sal_True, sal_True is on the save side but a probably overdone
+ SW_MOD()->CheckSpellChanges(sal_False, sal_True, sal_True, sal_False );
break;
case SID_BROWSER_MODE:
case FN_PRINT_LAYOUT: // for Web, inverse to BrowserMode
{
int eState = STATE_TOGGLE;
- BOOL bSet = sal_True;
+ sal_Bool bSet = sal_True;
const SfxPoolItem* pAttr=NULL;
- if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , FALSE, &pAttr ))
+ if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , sal_False, &pAttr ))
{
bSet = ((SfxBoolItem*)pAttr)->GetValue();
if ( nWhich == FN_PRINT_LAYOUT )
@@ -1118,7 +1116,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
ToggleBrowserMode(bSet, 0);
// OS: mind the numerical order!
- static USHORT const aInva[] =
+ static sal_uInt16 const aInva[] =
{
SID_NEWWINDOW,/*5620*/
SID_BROWSER_MODE, /*6313*/
@@ -1152,7 +1150,19 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
break;
- case SID_MAIL_EXPORT_FINISHED:
+ case SID_MAIL_PREPAREEXPORT:
+ {
+ //pWrtShell is not set in page preview
+ if(pWrtShell)
+ pWrtShell->StartAllAction();
+ pDoc->UpdateFlds( NULL, false );
+ pDoc->EmbedAllLinks();
+ pDoc->RemoveInvisibleContent();
+ if(pWrtShell)
+ pWrtShell->EndAllAction();
+ }
+ break;
+ case SID_MAIL_EXPORT_FINISHED:
{
if(pWrtShell)
pWrtShell->StartAllAction();
@@ -1165,14 +1175,14 @@ void SwDocShell::Execute(SfxRequest& rReq)
case FN_NEW_HTML_DOC:
case FN_NEW_GLOBAL_DOC:
{
- bDone = FALSE;
- BOOL bCreateHtml = FN_NEW_HTML_DOC == nWhich;
+ bDone = sal_False;
+ sal_Bool bCreateHtml = FN_NEW_HTML_DOC == nWhich;
- BOOL bCreateByOutlineLevel = false; //#outline level,add by zhaojianwei
+ sal_Bool bCreateByOutlineLevel = false; //#outline level,add by zhaojianwei
sal_Int32 nTemplateOutlineLevel = 0 ; //#outline level,add by zhaojianwei
String aFileName, aTemplateName;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich, FALSE, &pItem ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich, sal_False, &pItem ) )
{
aFileName = ((const SfxStringItem*)pItem)->GetValue();
SFX_ITEMSET_ARG( pArgs, pTemplItem, SfxStringItem, SID_TEMPLATE_NAME, sal_False );
@@ -1183,7 +1193,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
if ( !aFileName.Len() )
{
FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_AUTOEXTENSION_TEMPLATE, 0 );
- //set HelpIds
+
const sal_Int16 nControlIds[] = {
CommonFilePickerElementIds::PUSHBUTTON_OK,
CommonFilePickerElementIds::PUSHBUTTON_CANCEL,
@@ -1194,20 +1204,37 @@ void SwDocShell::Execute(SfxRequest& rReq)
ExtendedFilePickerElementIds::LISTBOX_TEMPLATE,
0
};
- sal_Int32 nHelpIds[8];
- sal_Int32 nStartHelpId =
- bCreateHtml ?
- HID_SEND_HTML_CTRL_PUSHBUTTON_OK : HID_SEND_MASTER_CTRL_PUSHBUTTON_OK ;
- for(int nHelp = 0; nHelp < 7; nHelp++)
- nHelpIds[nHelp] = nStartHelpId++;
- nHelpIds[7] = 0;
- aDlgHelper.SetControlHelpIds( nControlIds, nHelpIds );
+ const char* aHTMLHelpIds[] =
+ {
+ HID_SEND_HTML_CTRL_PUSHBUTTON_OK,
+ HID_SEND_HTML_CTRL_PUSHBUTTON_CANCEL,
+ HID_SEND_HTML_CTRL_LISTBOX_FILTER,
+ HID_SEND_HTML_CTRL_CONTROL_FILEVIEW,
+ HID_SEND_HTML_CTRL_EDIT_FILEURL,
+ HID_SEND_HTML_CTRL_CHECKBOX_AUTOEXTENSION,
+ HID_SEND_HTML_CTRL_LISTBOX_TEMPLATE,
+ ""
+ };
+ const char* aMasterHelpIds[] =
+ {
+ HID_SEND_MASTER_CTRL_PUSHBUTTON_OK,
+ HID_SEND_MASTER_CTRL_PUSHBUTTON_CANCEL,
+ HID_SEND_MASTER_CTRL_LISTBOX_FILTER,
+ HID_SEND_MASTER_CTRL_CONTROL_FILEVIEW,
+ HID_SEND_MASTER_CTRL_EDIT_FILEURL,
+ HID_SEND_MASTER_CTRL_CHECKBOX_AUTOEXTENSION,
+ HID_SEND_MASTER_CTRL_LISTBOX_TEMPLATE,
+ ""
+ };
+
+ const char** pHelpIds = bCreateHtml ? aHTMLHelpIds : aMasterHelpIds;
+ aDlgHelper.SetControlHelpIds( nControlIds, pHelpIds );
uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
const SfxFilter* pFlt;
- USHORT nStrId;
+ sal_uInt16 nStrId;
if( bCreateHtml )
{
@@ -1248,7 +1275,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
if( rOutlNds.Count() )
{
int nLevel;
- for(USHORT n = 0; n < rOutlNds.Count(); ++n )
+ for(sal_uInt16 n = 0; n < rOutlNds.Count(); ++n )
if( ( nLevel = rOutlNds[n]->GetTxtNode()->GetAttrOutlineLevel()) > 0 &&
! bOutline[nLevel-1] )
{
@@ -1256,20 +1283,20 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
}
- const USHORT nStyleCount = pDoc->GetTxtFmtColls()->Count();
+ const sal_uInt16 nStyleCount = pDoc->GetTxtFmtColls()->Count();
Sequence<OUString> aListBoxEntries( MAXLEVEL + nStyleCount);
OUString* pEntries = aListBoxEntries.getArray();
sal_Int32 nIdx = 0 ;
OUString sOutline( SW_RESSTR(STR_FDLG_OUTLINE_LEVEL) );
- for( USHORT i = 0; i < MAXLEVEL; ++i )
+ for( sal_uInt16 i = 0; i < MAXLEVEL; ++i )
{
if( bOutline[i] )
pEntries[nIdx++] = sOutline + String::CreateFromInt32( i+1 );
}
OUString sStyle( SW_RESSTR(STR_FDLG_STYLE) );
- for(USHORT i = 0; i < nStyleCount; ++i)
+ for(sal_uInt16 i = 0; i < nStyleCount; ++i)
{
SwTxtFmtColl &rTxtColl =
*pDoc->GetTxtFmtColls()->GetObject( i );
@@ -1335,9 +1362,9 @@ void SwDocShell::Execute(SfxRequest& rReq)
if( aFileName.Len() )
{
- if( PrepareClose( FALSE ) )
+ if( PrepareClose( sal_False ) )
{
- SwWait aWait( *this, TRUE );
+ SwWait aWait( *this, sal_True );
if ( bCreateByOutlineLevel )
{
@@ -1395,10 +1422,10 @@ void SwDocShell::Execute(SfxRequest& rReq)
break;
case SID_ATTR_YEAR2000:
- if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , FALSE, &pItem ))
+ if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , sal_False, &pItem ))
{
OSL_ENSURE(pItem->ISA(SfxUInt16Item), "wrong Item");
- USHORT nYear2K = ((SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nYear2K = ((SfxUInt16Item*)pItem)->GetValue();
// iterate over Views and put the State to FormShells
SfxViewFrame* pVFrame = SfxViewFrame::GetFirst( this );
@@ -1413,7 +1440,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
pViewShell = pVFrame ? pVFrame->GetViewShell() : 0;
pCurrView = dynamic_cast<SwView*>( pViewShell );
}
- pDoc->GetNumberFormatter(TRUE)->SetYear2000(nYear2K);
+ pDoc->GetNumberFormatter(sal_True)->SetYear2000(nYear2K);
}
break;
@@ -1428,7 +1455,7 @@ void lcl_processCompatibleSfxHint( const uno::Reference< document::XVbaEventsHel
if ( rHint.ISA( SfxEventHint ) )
{
uno::Sequence< uno::Any > aArgs;
- ULONG nEventId = ((SfxEventHint&)rHint).GetEventId();
+ sal_uLong nEventId = ((SfxEventHint&)rHint).GetEventId();
switch( nEventId )
{
case SFX_EVENT_CREATEDOC:
@@ -1505,25 +1532,27 @@ void SwDocShell::FillClass( SvGlobalName * pClassName,
*pUserName = SW_RESSTR(STR_HUMAN_SWDOC_NAME);
}
-void SwDocShell::SetModified( BOOL bSet )
+void SwDocShell::SetModified( sal_Bool bSet )
{
SfxObjectShell::SetModified( bSet );
if( IsEnableSetModified())
{
if (!pDoc->IsInCallModified() )
{
- EnableSetModified( FALSE );
+ EnableSetModified( sal_False );
if( bSet )
{
- BOOL bOld = pDoc->IsModified();
+ sal_Bool bOld = pDoc->IsModified();
pDoc->SetModified();
if( !bOld )
- pDoc->SetUndoNoResetModified();
+ {
+ pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
+ }
}
else
pDoc->ResetModified();
- EnableSetModified( TRUE );
+ EnableSetModified( sal_True );
}
UpdateChildWindows();
@@ -1564,7 +1593,7 @@ class SwReloadFromHtmlReader : public SwReader
void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView )
{
- BOOL bModified = IsModified();
+ sal_Bool bModified = IsModified();
// The HTTP-Header fields have to be removed, otherwise
// there are some from Meta-Tags dublicated or triplicated afterwards.
@@ -1583,7 +1612,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
BasicManager *pBasicMan = GetBasicManager();
if( pBasicMan && (pBasicMan != SFX_APP()->GetBasicManager()) )
{
- USHORT nLibCount = pBasicMan->GetLibCount();
+ sal_uInt16 nLibCount = pBasicMan->GetLibCount();
while( nLibCount )
{
StarBASIC *pBasic = pBasicMan->GetLib( --nLibCount );
@@ -1600,7 +1629,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
// Only the modules are deleted from the standard-lib
if( nLibCount )
- pBasicMan->RemoveLib( nLibCount, TRUE );
+ pBasicMan->RemoveLib( nLibCount, sal_True );
else
pBasic->Clear();
}
@@ -1637,7 +1666,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
SubInitNew();
- SfxMedium aMed( rStreamName, STREAM_READ, FALSE );
+ SfxMedium aMed( rStreamName, STREAM_READ, sal_False );
// #i48748# - use class <SwReloadFromHtmlReader>, because
// the base URL has to be set to the filename of the document <rMedname>
// and not to the base URL of the temporary file <aMed> in order to get
@@ -1653,7 +1682,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
{
SwWrtShell& rWrtSh = pCurrView->GetWrtShell();
if( rWrtSh.GetLayout())
- rWrtSh.CheckBrowseView( TRUE );
+ rWrtSh.CheckBrowseView( sal_True );
}
@@ -1668,7 +1697,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
pDoc->ResetModified();
}
-void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
+void SwDocShell::ToggleBrowserMode(sal_Bool bSet, SwView* _pView )
{
GetDoc()->set(IDocumentSettingAccess::BROWSE_MODE, bSet );
UpdateFontList();
@@ -1692,15 +1721,15 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
// Currently there can be only one view (layout) if the document is viewed in Web layout
// So if there are more views we are in print layout and for toggling to Web layout all other views must be closed
- SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, FALSE);
+ SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, sal_False);
do {
if( pTmpFrm != pTempView->GetViewFrame() )
{
pTmpFrm->DoClose();
- pTmpFrm = SfxViewFrame::GetFirst(this, FALSE);
+ pTmpFrm = SfxViewFrame::GetFirst(this, sal_False);
}
else
- pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this, FALSE);
+ pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this, sal_False);
} while ( pTmpFrm );
@@ -1709,7 +1738,7 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
// set view columns before toggling:
if ( bSet )
{
- const USHORT nColumns = rViewOptions.GetViewLayoutColumns();
+ const sal_uInt16 nColumns = rViewOptions.GetViewLayoutColumns();
const bool bBookMode = rViewOptions.IsViewLayoutBookMode();
if ( 1 != nColumns || bBookMode )
{
@@ -1718,7 +1747,7 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
}
// Triggeres a formatting:
- pTempView->GetWrtShell().CheckBrowseView( TRUE );
+ pTempView->GetWrtShell().CheckBrowseView( sal_True );
pTempView->CheckVisArea();
if( GetDoc()->get(IDocumentSettingAccess::BROWSE_MODE) )
@@ -1735,10 +1764,10 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
}
}
-ULONG SwDocShell::LoadStylesFromFile( const String& rURL,
- SwgReaderOption& rOpt, BOOL bUnoCall )
+sal_uLong SwDocShell::LoadStylesFromFile( const String& rURL,
+ SwgReaderOption& rOpt, sal_Bool bUnoCall )
{
- ULONG nErr = 0;
+ sal_uLong nErr = 0;
// Create a URL from filename
INetURLObject aURLObj( rURL );
@@ -1753,14 +1782,14 @@ ULONG SwDocShell::LoadStylesFromFile( const String& rURL,
SfxFilterMatcher aMatcher( sFactory );
// search for filter in WebDocShell, too
- SfxMedium aMed( rURL, STREAM_STD_READ, FALSE );
+ SfxMedium aMed( rURL, STREAM_STD_READ, sal_False );
const SfxFilter* pFlt = 0;
- aMatcher.DetectFilter( aMed, &pFlt, FALSE, FALSE );
+ aMatcher.DetectFilter( aMed, &pFlt, sal_False, sal_False );
if(!pFlt)
{
String sWebFactory(String::CreateFromAscii(SwWebDocShell::Factory().GetShortName()));
SfxFilterMatcher aWebMatcher( sWebFactory );
- aWebMatcher.DetectFilter( aMed, &pFlt, FALSE, FALSE );
+ aWebMatcher.DetectFilter( aMed, &pFlt, sal_False, sal_False );
}
if( aMed.IsStorage() )
{
diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx
index 842922f0ee92..c32437f242f1 100644
--- a/sw/source/ui/app/docshini.cxx
+++ b/sw/source/ui/app/docshini.cxx
@@ -160,30 +160,30 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
SfxPrinter* pPrt = pDoc->getPrinter( false );
String sEntry;
- USHORT aFontWhich[] =
+ sal_uInt16 aFontWhich[] =
{ RES_CHRATR_FONT,
RES_CHRATR_CJK_FONT,
RES_CHRATR_CTL_FONT
};
- USHORT aFontHeightWhich[] =
+ sal_uInt16 aFontHeightWhich[] =
{
RES_CHRATR_FONTSIZE,
RES_CHRATR_CJK_FONTSIZE,
RES_CHRATR_CTL_FONTSIZE
};
- USHORT aFontIds[] =
+ sal_uInt16 aFontIds[] =
{
FONT_STANDARD,
FONT_STANDARD_CJK,
FONT_STANDARD_CTL
};
- USHORT nFontTypes[] =
+ sal_uInt16 nFontTypes[] =
{
DEFAULTFONT_LATIN_TEXT,
DEFAULTFONT_CJK_TEXT,
DEFAULTFONT_CTL_TEXT
};
- USHORT aLangTypes[] =
+ sal_uInt16 aLangTypes[] =
{
RES_CHRATR_LANGUAGE,
RES_CHRATR_CJK_LANGUAGE,
@@ -192,29 +192,23 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
for(sal_uInt8 i = 0; i < 3; i++)
{
- USHORT nFontWhich = aFontWhich[i];
- USHORT nFontId = aFontIds[i];
+ sal_uInt16 nFontWhich = aFontWhich[i];
+ sal_uInt16 nFontId = aFontIds[i];
SvxFontItem* pFontItem = 0;
const SvxLanguageItem& rLang = (const SvxLanguageItem&)pDoc->GetDefault( aLangTypes[i] );
LanguageType eLanguage = rLang.GetLanguage();
if(!pStdFont->IsFontDefault(nFontId))
{
sEntry = pStdFont->GetFontFor(nFontId);
- sal_Bool bDelete = sal_False;
- const SfxFont* pFnt = pPrt ? pPrt->GetFontByName(sEntry): 0;
- if(!pFnt)
- {
- pFnt = new SfxFont( FAMILY_DONTKNOW, sEntry, PITCH_DONTKNOW,
- ::gsl_getSystemTextEncoding() );
- bDelete = sal_True;
- }
- pFontItem = new SvxFontItem(pFnt->GetFamily(), pFnt->GetName(),
- aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich);
- if(bDelete)
+
+ Font aFont( sEntry, Size( 0, 10 ) );
+ if( pPrt )
{
- delete (SfxFont*) pFnt;
- bDelete = sal_False;
+ aFont = pPrt->GetFontMetric( aFont );
}
+
+ pFontItem = new SvxFontItem(aFont.GetFamily(), aFont.GetName(),
+ aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich);
}
else
{
@@ -256,7 +250,7 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
}
}
- USHORT aFontIdPoolId[] =
+ sal_uInt16 aFontIdPoolId[] =
{
FONT_OUTLINE, RES_POOLCOLL_HEADLINE_BASE,
FONT_LIST, RES_POOLCOLL_NUMBUL_BASE,
@@ -272,8 +266,8 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
FONT_INDEX_CTL, RES_POOLCOLL_REGISTER_BASE
};
- USHORT nFontWhich = RES_CHRATR_FONT;
- USHORT nFontHeightWhich = RES_CHRATR_FONTSIZE;
+ sal_uInt16 nFontWhich = RES_CHRATR_FONT;
+ sal_uInt16 nFontHeightWhich = RES_CHRATR_FONTSIZE;
LanguageType eLanguage = static_cast<const SvxLanguageItem&>(pDoc->GetDefault( RES_CHRATR_LANGUAGE )).GetLanguage();
for(sal_uInt8 nIdx = 0; nIdx < 24; nIdx += 2)
{
@@ -293,25 +287,18 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
if(!pStdFont->IsFontDefault(aFontIdPoolId[nIdx]))
{
sEntry = pStdFont->GetFontFor(aFontIdPoolId[nIdx]);
- sal_Bool bDelete = sal_False;
- const SfxFont* pFnt = pPrt ? pPrt->GetFontByName(sEntry): 0;
- if(!pFnt)
- {
- pFnt = new SfxFont( FAMILY_DONTKNOW, sEntry, PITCH_DONTKNOW,
- ::gsl_getSystemTextEncoding() );
- bDelete = sal_True;
- }
+
+ Font aFont( sEntry, Size( 0, 10 ) );
+ if( pPrt )
+ aFont = pPrt->GetFontMetric( aFont );
+
pColl = pDoc->GetTxtCollFromPool(aFontIdPoolId[nIdx + 1]);
if( !bHTMLTemplSet ||
SFX_ITEM_SET != pColl->GetAttrSet().GetItemState(
nFontWhich, sal_False ) )
{
- pColl->SetFmtAttr(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(),
- aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich));
- }
- if(bDelete)
- {
- delete (SfxFont*) pFnt;
+ pColl->SetFmtAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(),
+ aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich));
}
}
sal_Int32 nFontHeight = pStdFont->GetFontHeight( static_cast< sal_Int8 >(aFontIdPoolId[nIdx]), 0, eLanguage );
@@ -326,6 +313,12 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
pColl->SetFmtAttr( aFontHeight );
}
}
+
+ // the default for documents created via 'File/New' should be 'on'
+ // (old documents, where this property was not yet implemented, will get the
+ // value 'false' in the SwDoc c-tor)
+ pDoc->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT,
+ SW_MOD()->GetUsrPref( bWeb )->IsAlignMathObjectsToBaseline() );
}
/* #106748# If the default frame direction of a document is RTL
@@ -335,14 +328,14 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
pDoc->SetDefault( SvxAdjustItem(SVX_ADJUST_RIGHT, RES_PARATR_ADJUST ) );
// OD 09.10.2003 #i18732# - set dynamic pool default for
- // item RES_FOLLOW_TEXT_FLOW to FALSE for *new document*.
+ // item RES_FOLLOW_TEXT_FLOW to sal_False for *new document*.
// Thus, redo this change in method <SwDoc::RemoveAllFmtLanguageDependencies()>,
// which is called from <SwDocShell::ConvertFrom(..)> in order to restore
// the static pool default.
- pDoc->SetDefault( SwFmtFollowTextFlow( FALSE ) );
+ pDoc->SetDefault( SwFmtFollowTextFlow( sal_False ) );
// --> collapsing borders FME 2005-05-27 #i29550#
- pDoc->SetDefault( SfxBoolItem( RES_COLLAPSING_BORDERS, TRUE ) );
+ pDoc->SetDefault( SfxBoolItem( RES_COLLAPSING_BORDERS, sal_True ) );
// <-- collapsing
//#i16874# AutoKerning as default for new documents
@@ -584,10 +577,10 @@ sal_Bool SwDocShell::Load( SfxMedium& rMedium )
{
if( ReadXML )
{
- ReadXML->SetOrganizerMode( TRUE );
+ ReadXML->SetOrganizerMode( sal_True );
SwReader aRdr( rMedium, aEmptyStr, pDoc );
nErr = aRdr.Read( *ReadXML );
- ReadXML->SetOrganizerMode( FALSE );
+ ReadXML->SetOrganizerMode( sal_False );
}
}
break;
@@ -683,10 +676,10 @@ sal_Bool SwDocShell::LoadFrom( SfxMedium& rMedium )
mxBasePool = new SwDocStyleSheetPool( *pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
if( ReadXML )
{
- ReadXML->SetOrganizerMode( TRUE );
+ ReadXML->SetOrganizerMode( sal_True );
SwReader aRdr( rMedium, aEmptyStr, pDoc );
nErr = aRdr.Read( *ReadXML );
- ReadXML->SetOrganizerMode( FALSE );
+ ReadXML->SetOrganizerMode( sal_False );
}
}
}
@@ -748,12 +741,12 @@ void SwDocShell::SubInitNew()
{
SvxHyphenZoneItem aHyp( (SvxHyphenZoneItem&) pDoc->GetDefault(
RES_PARATR_HYPHENZONE) );
- aHyp.GetMinLead() = static_cast< BYTE >(aLinguOpt.nHyphMinLeading);
- aHyp.GetMinTrail() = static_cast< BYTE >(aLinguOpt.nHyphMinTrailing);
+ aHyp.GetMinLead() = static_cast< sal_uInt8 >(aLinguOpt.nHyphMinLeading);
+ aHyp.GetMinTrail() = static_cast< sal_uInt8 >(aLinguOpt.nHyphMinTrailing);
aDfltSet.Put( aHyp );
- sal_uInt16 nNewPos = static_cast< sal_uInt16 >(SW_MOD()->GetUsrPref(FALSE)->GetDefTab());
+ sal_uInt16 nNewPos = static_cast< sal_uInt16 >(SW_MOD()->GetUsrPref(sal_False)->GetDefTab());
if( nNewPos )
aDfltSet.Put( SvxTabStopItem( 1, nNewPos,
SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP ) );
@@ -765,7 +758,7 @@ void SwDocShell::SubInitNew()
//default page mode for text grid
if(!bWeb)
{
- sal_Bool bSquaredPageMode = SW_MOD()->GetUsrPref(FALSE)->IsSquaredPageMode();
+ sal_Bool bSquaredPageMode = SW_MOD()->GetUsrPref(sal_False)->IsSquaredPageMode();
pDoc->SetDefaultPageMode( bSquaredPageMode );
}
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index 751a4393d368..57f574b7fbe3 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -53,7 +54,8 @@
#include <fchrfmt.hxx>
#include <svtools/htmlcfg.hxx>
#include <SwStyleNameMapper.hxx>
-#include <undobj.hxx>
+#include <SwRewriter.hxx>
+#include <numrule.hxx>
#include <swundo.hxx>
#include "view.hxx"
@@ -63,7 +65,8 @@
#include "cmdid.h"
#include "globals.hrc"
#include "viewopt.hxx"
-#include "doc.hxx"
+#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include "swstyle.h"
#include "frmfmt.hxx"
#include "charfmt.hxx"
@@ -90,8 +93,8 @@ using namespace ::com::sun::star;
void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
- USHORT nActualFamily = USHRT_MAX;
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ sal_uInt16 nActualFamily = USHRT_MAX;
SwWrtShell* pShell = pSh ? pSh : GetWrtShell();
if(!pShell)
@@ -108,7 +111,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
SfxViewFrame* pFrame = pShell->GetView().GetViewFrame();
const ISfxTemplateCommon* pCommon = SFX_APP()->GetCurrentTemplateCommon(pFrame->GetBindings());
if( pCommon )
- nActualFamily = static_cast< USHORT >(pCommon->GetActualFamily());
+ nActualFamily = static_cast< sal_uInt16 >(pCommon->GetActualFamily());
}
while (nWhich)
@@ -157,12 +160,12 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
SfxTemplateItem aItem(nWhich, aName);
- USHORT nMask = 0;
+ sal_uInt16 nMask = 0;
if( pDoc->get(IDocumentSettingAccess::HTML_MODE) )
nMask = SWSTYLEBIT_HTML;
else
{
- const int nSelection = pShell->GetFrmType(0,TRUE);
+ const int nSelection = pShell->GetFrmType(0,sal_True);
if(pShell->GetCurTOX())
nMask = SWSTYLEBIT_IDX ;
else if(nSelection & FRMTYPE_HEADER ||
@@ -204,7 +207,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
rSet.DisableItem( nWhich );
else
{
- USHORT n = pShell->GetCurPageDesc( FALSE );
+ sal_uInt16 n = pShell->GetCurPageDesc( sal_False );
if( n < pShell->GetPageDescCnt() )
aName = pShell->GetPageDesc( n ).GetName();
@@ -265,42 +268,42 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
{
- USHORT nSlot = rReq.GetSlot();
- USHORT nRet = 0xffff;
+ sal_uInt16 nSlot = rReq.GetSlot();
+ sal_uInt16 nRet = 0xffff;
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
SwWrtShell* pActShell = 0;
- BOOL bSetReturn = TRUE;
+ sal_Bool bSetReturn = sal_True;
switch (nSlot)
{
case SID_STYLE_NEW:
if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
- USHORT nFamily = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nFamily = ((const SfxUInt16Item*)pItem)->GetValue();
String sName;
- USHORT nMask = 0;
+ sal_uInt16 nMask = 0;
if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_NEW,
- FALSE, &pItem ))
+ sal_False, &pItem ))
sName = ((const SfxStringItem*)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_MASK,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nMask = ((const SfxUInt16Item*)pItem)->GetValue();
String sParent;
if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_REFERENCE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
sParent = ((const SfxStringItem*)pItem)->GetValue();
- nRet = Edit( sName, sParent, nFamily, nMask, TRUE, FALSE, 0, rReq.IsAPI() );
+ nRet = Edit( sName, sParent, nFamily, nMask, sal_True, sal_False, 0, rReq.IsAPI() );
}
break;
case SID_STYLE_APPLY:
if( !pArgs )
{
- GetView()->GetViewFrame()->GetDispatcher()->Execute(SID_STYLE_DESIGNER, FALSE);
+ GetView()->GetViewFrame()->GetDispatcher()->Execute(SID_STYLE_DESIGNER, sal_False);
break;
}
else
@@ -339,8 +342,8 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
case SID_STYLE_NEW_BY_EXAMPLE:
{
String aParam;
- USHORT nFamily = SFX_STYLE_FAMILY_PARA;
- USHORT nMask = 0;
+ sal_uInt16 nFamily = SFX_STYLE_FAMILY_PARA;
+ sal_uInt16 nMask = 0;
if( !pArgs )
{
@@ -380,14 +383,14 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
OSL_ENSURE( pArgs->Count(), "SfxBug ItemSet is empty");
SwWrtShell* pShell = GetWrtShell();
- if( SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem ))
aParam = ((const SfxStringItem*)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILY,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nFamily = ((const SfxUInt16Item*)pItem)->GetValue();
- if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILYNAME, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILYNAME, sal_False, &pItem ))
{
String aFamily = ((const SfxStringItem*)pItem)->GetValue();
if(aFamily.CompareToAscii("CharacterStyles") == COMPARE_EQUAL)
@@ -407,10 +410,10 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
}
if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_MASK,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nMask = ((const SfxUInt16Item*)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_WRTSHELL,
- FALSE, &pItem ))
+ sal_False, &pItem ))
pActShell = pShell = (SwWrtShell*)((SwPtrItem*)pItem)->GetValue();
if( nSlot == SID_STYLE_UPDATE_BY_EXAMPLE )
@@ -439,7 +442,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
}
break;
case SFX_STYLE_FAMILY_PSEUDO:
- if(SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_UPD_BY_EX_NAME, FALSE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_UPD_BY_EX_NAME, sal_False, &pItem))
{
aParam = ((const SfxStringItem*)pItem)->GetValue();
}
@@ -453,7 +456,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
switch(nSlot)
{
case SID_STYLE_EDIT:
- nRet = Edit(aParam, aEmptyStr, nFamily, nMask, FALSE, FALSE, pActShell );
+ nRet = Edit(aParam, aEmptyStr, nFamily, nMask, sal_False, sal_False, pActShell );
break;
case SID_STYLE_DELETE:
nRet = Delete(aParam, nFamily);
@@ -504,15 +507,15 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
--------------------------------------------------------------------*/
-USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFamily, USHORT nMask,
- BOOL bNew, BOOL bColumn, SwWrtShell* pActShell,
- BOOL bBasic )
+sal_uInt16 SwDocShell::Edit( const String &rName, const String &rParent, sal_uInt16 nFamily, sal_uInt16 nMask,
+ sal_Bool bNew, sal_Bool bColumn, SwWrtShell* pActShell,
+ sal_Bool bBasic )
{
OSL_ENSURE(GetWrtShell(), "No Shell, no Styles");
SfxStyleSheetBase *pStyle = 0;
- USHORT nRet = nMask;
- BOOL bModified = pDoc->IsModified();
+ sal_uInt16 nRet = nMask;
+ sal_Bool bModified = pDoc->IsModified();
if( bNew )
{
@@ -534,7 +537,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
SwTxtFmtColl* pColl = pWrtShell->FindTxtFmtCollByName( rParent );
if(!pColl)
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
if(USHRT_MAX != nId)
pColl = pWrtShell->GetTxtCollFromPool( nId );
}
@@ -571,7 +574,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
SwCharFmt* pCFmt = pWrtShell->FindCharFmtByName( rParent );
if(!pCFmt)
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
if(USHRT_MAX != nId)
pCFmt = pWrtShell->GetCharFmtFromPool( nId );
}
@@ -595,7 +598,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
SwFrmFmt* pFFmt = pWrtShell->GetDoc()->FindFrmFmtByName( rParent );
if(!pFFmt)
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT);
if(USHRT_MAX != nId)
pFFmt = pWrtShell->GetFrmFmtFromPool( nId );
}
@@ -613,7 +616,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
}
if(!pStyle)
- return FALSE;
+ return sal_False;
// put dialogues together
rtl::Reference< SwDocStyleSheet > xTmp( new SwDocStyleSheet( *(SwDocStyleSheet*)pStyle ) );
@@ -631,7 +634,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
SfxItemSet& rSet = xTmp->GetItemSet();
const SfxPoolItem *pTmpBrush;
if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_BACKGROUND,
- TRUE, &pTmpBrush ) )
+ sal_True, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_BACKGROUND );
@@ -641,7 +644,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
if (!bBasic)
{
// prior to the dialog the HtmlMode at the DocShell is being sunk
- USHORT nHtmlMode = ::GetHtmlMode(this);
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(this);
// In HTML mode, we do not always have a printer. In order to show
// the correct page size in the Format - Page dialog, we have to
@@ -653,7 +656,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
PutItem(SfxUInt16Item(SID_HTML_MODE, nHtmlMode));
FieldUnit eMetric = ::GetDfltMetric(0 != (HTMLMODE_ON&nHtmlMode));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateTemplateDialog( DLG_TEMPLATE_BASE,
@@ -686,7 +689,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
{
if(SFX_STYLE_FAMILY_PAGE == nFamily)
{
- static const USHORT aInval[] = {
+ static const sal_uInt16 aInval[] = {
SID_IMAGE_ORIENTATION,
SID_ATTR_CHAR_FONT,
FN_INSERT_CTRL, FN_INSERT_OBJ_CTRL, 0};
@@ -697,7 +700,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
{
const SfxPoolItem *pTmpBrush;
if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND,
- FALSE, &pTmpBrush ) )
+ sal_False, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND );
@@ -710,7 +713,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
if( SFX_STYLE_FAMILY_PAGE == nFamily && SvtLanguageOptions().IsCTLFontEnabled() )
{
const SfxPoolItem *pItem = NULL;
- if( aTmpSet.GetItemState( GetPool().GetTrueWhich( SID_ATTR_FRAMEDIRECTION, FALSE ) , TRUE, &pItem ) == SFX_ITEM_SET )
+ if( aTmpSet.GetItemState( GetPool().GetTrueWhich( SID_ATTR_FRAMEDIRECTION, sal_False ) , sal_True, &pItem ) == SFX_ITEM_SET )
SwChartHelper::DoUpdateAllCharts( pDoc );
}
}
@@ -727,7 +730,9 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
pDoc->SetModified();
if( !bModified ) // Bug 57028
- pDoc->SetUndoNoResetModified();
+ {
+ pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
+ }
GetWrtShell()->EndAllAction();
}
@@ -735,8 +740,8 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
{
if( bNew )
{
- GetWrtShell()->Undo(UNDO_EMPTY, 1);
- pDoc->ClearRedo();
+ GetWrtShell()->Undo(1);
+ pDoc->GetIDocumentUndoRedo().ClearRedo();
}
if( !bModified )
@@ -770,7 +775,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
{
const SfxPoolItem *pTmpBrush;
if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND,
- FALSE, &pTmpBrush ) )
+ sal_False, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND );
@@ -788,7 +793,9 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
pDoc->SetModified();
if( !bModified ) // Bug 57028
- pDoc->SetUndoNoResetModified();
+ {
+ pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
+ }
GetWrtShell()->EndAllAction();
}
@@ -800,7 +807,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
--------------------------------------------------------------------*/
-USHORT SwDocShell::Delete(const String &rName, USHORT nFamily)
+sal_uInt16 SwDocShell::Delete(const String &rName, sal_uInt16 nFamily)
{
SfxStyleSheetBase *pStyle = mxBasePool->Find(rName, (SfxStyleFamily)nFamily);
@@ -812,9 +819,9 @@ USHORT SwDocShell::Delete(const String &rName, USHORT nFamily)
mxBasePool->Remove(pStyle);
GetWrtShell()->EndAllAction();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -822,8 +829,8 @@ USHORT SwDocShell::Delete(const String &rName, USHORT nFamily)
--------------------------------------------------------------------*/
-USHORT SwDocShell::ApplyStyles(const String &rName, USHORT nFamily,
- SwWrtShell* pShell, USHORT nMode )
+sal_uInt16 SwDocShell::ApplyStyles(const String &rName, sal_uInt16 nFamily,
+ SwWrtShell* pShell, sal_uInt16 nMode )
{
SwDocStyleSheet* pStyle =
(SwDocStyleSheet*)mxBasePool->Find(rName, (SfxStyleFamily)nFamily);
@@ -831,7 +838,7 @@ USHORT SwDocShell::ApplyStyles(const String &rName, USHORT nFamily,
OSL_ENSURE(pStyle, "Where's the StyleSheet");
if(!pStyle)
- return FALSE;
+ return sal_False;
SwWrtShell *pSh = pShell ? pShell : GetWrtShell();
@@ -891,16 +898,16 @@ USHORT SwDocShell::ApplyStyles(const String &rName, USHORT nFamily,
-USHORT SwDocShell::DoWaterCan(const String &rName, USHORT nFamily)
+sal_uInt16 SwDocShell::DoWaterCan(const String &rName, sal_uInt16 nFamily)
{
OSL_ENSURE(GetWrtShell(), "No Shell, no Styles");
SwEditWin& rEdtWin = pView->GetEditWin();
SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
- BOOL bWaterCan = !(pApply && pApply->eType != 0);
+ sal_Bool bWaterCan = !(pApply && pApply->eType != 0);
if( !rName.Len() )
- bWaterCan = FALSE;
+ bWaterCan = sal_False;
SwApplyTemplate aTemplate;
aTemplate.eType = nFamily;
@@ -949,7 +956,7 @@ USHORT SwDocShell::DoWaterCan(const String &rName, USHORT nFamily)
--------------------------------------------------------------------*/
-USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell* pShell)
+sal_uInt16 SwDocShell::UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWrtShell* pShell)
{
SwWrtShell* pCurrWrtShell = pShell ? pShell : GetWrtShell();
OSL_ENSURE(GetWrtShell(), "No Shell, no Styles");
@@ -976,7 +983,7 @@ USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell*
GetWrtShell()->FillByEx(pColl);
// also apply template to remove hard set attributes
GetWrtShell()->SetTxtFmtColl( pColl );
- GetWrtShell()->EndUndo(UNDO_INSFMTATTR, NULL);
+ GetWrtShell()->EndUndo();
GetWrtShell()->EndAllAction();
}
break;
@@ -998,7 +1005,7 @@ USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell*
pFrm->SetFmtAttr( aSet );
// also apply template to remove hard set attributes
- pCurrWrtShell->SetFrmFmt( pFrm, TRUE );
+ pCurrWrtShell->SetFrmFmt( pFrm, sal_True );
pCurrWrtShell->EndAllAction();
}
}
@@ -1039,8 +1046,8 @@ USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell*
--------------------------------------------------------------------*/
-USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
- USHORT nMask, SwWrtShell* pShell )
+sal_uInt16 SwDocShell::MakeByExample( const String &rName, sal_uInt16 nFamily,
+ sal_uInt16 nMask, SwWrtShell* pShell )
{
SwWrtShell* pCurrWrtShell = pShell ? pShell : GetWrtShell();
SwDocStyleSheet* pStyle = (SwDocStyleSheet*)mxBasePool->Find(
@@ -1071,7 +1078,7 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
pColl->SetDerivedFrom(pCurrWrtShell->GetCurTxtFmtColl());
// set the mask at the Collection:
- USHORT nId = pColl->GetPoolFmtId() & 0x87ff;
+ sal_uInt16 nId = pColl->GetPoolFmtId() & 0x87ff;
switch( nMask & 0x0fff )
{
case SWSTYLEBIT_TEXT:
@@ -1138,13 +1145,13 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
case SFX_STYLE_FAMILY_PAGE:
{
pCurrWrtShell->StartAllAction();
- USHORT nPgDsc = pCurrWrtShell->GetCurPageDesc();
+ sal_uInt16 nPgDsc = pCurrWrtShell->GetCurPageDesc();
SwPageDesc& rSrc = (SwPageDesc&)pCurrWrtShell->GetPageDesc( nPgDsc );
SwPageDesc& rDest = *(SwPageDesc*)pStyle->GetPageDesc();
- USHORT nPoolId = rDest.GetPoolFmtId();
- USHORT nHId = rDest.GetPoolHelpId();
- BYTE nHFId = rDest.GetPoolHlpFileId();
+ sal_uInt16 nPoolId = rDest.GetPoolFmtId();
+ sal_uInt16 nHId = rDest.GetPoolHelpId();
+ sal_uInt8 nHFId = rDest.GetPoolHlpFileId();
pCurrWrtShell->GetDoc()->CopyPageDesc( rSrc, rDest );
@@ -1154,7 +1161,7 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
rDest.SetPoolHlpFileId( nHFId );
// when Headers/Footers are created, there is no Undo anymore!
- pCurrWrtShell->GetDoc()->DelAllUndoObj();
+ pCurrWrtShell->GetDoc()->GetIDocumentUndoRedo().DelAllUndoObj();
pCurrWrtShell->EndAllAction();
}
@@ -1183,7 +1190,7 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
void SwDocShell::LoadStyles( SfxObjectShell& rSource )
{
- _LoadStyles(rSource, FALSE);
+ _LoadStyles(rSource, sal_False);
}
/* --------------------------------------------------
bPreserveCurrentDocument determines whether SetFixFields() is called
@@ -1192,7 +1199,7 @@ void SwDocShell::LoadStyles( SfxObjectShell& rSource )
Calls of ::LoadStyles() normally use files especially loaded for the purpose
of importing styles.
--------------------------------------------------*/
-void SwDocShell::_LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocument )
+void SwDocShell::_LoadStyles( SfxObjectShell& rSource, sal_Bool bPreserveCurrentDocument )
{
/* [Description]
@@ -1219,13 +1226,13 @@ void SwDocShell::_LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocu
}
else
{
- BOOL bModified = pDoc->IsModified();
+ sal_Bool bModified = pDoc->IsModified();
pDoc->ReplaceStyles( *((SwDocShell&)rSource).pDoc );
if( !bModified && pDoc->IsModified() && !pView )
{
// the View is created later, but overwrites the Modify-Flag.
// Undo doesn't work anymore anyways.
- pDoc->SetUndoNoResetModified();
+ pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
}
}
}
@@ -1234,9 +1241,9 @@ void SwDocShell::_LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocu
}
-void SwDocShell::FormatPage( const String& rPage, BOOL bColumn, SwWrtShell* pActShell )
+void SwDocShell::FormatPage( const String& rPage, sal_Bool bColumn, SwWrtShell* pActShell )
{
- Edit( rPage, aEmptyStr, SFX_STYLE_FAMILY_PAGE, 0, FALSE, bColumn, pActShell);
+ Edit( rPage, aEmptyStr, SFX_STYLE_FAMILY_PAGE, 0, sal_False, bColumn, pActShell);
}
Bitmap SwDocShell::GetStyleFamilyBitmap( SfxStyleFamily eFamily )
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index 6720a6bed028..5012f2dc45df 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -52,6 +52,7 @@
#include <docary.hxx>
#include <ccoll.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <cmdid.h>
#include <swstyle.h>
#include <app.hrc>
@@ -65,7 +66,6 @@
#include <fmthdft.hxx>
#include <svx/svxids.hrc>
#include <SwRewriter.hxx>
-#include <undobj.hxx>
// The Format names in the list of all names have the
// following family as their first character:
@@ -125,7 +125,7 @@ SwImplShellAction::~SwImplShellAction()
SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
- BOOL bCreate = TRUE )
+ sal_Bool bCreate = sal_True )
{
SwCharFmt* pFmt = 0;
if( rName.Len() )
@@ -140,7 +140,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
if( !pFmt && bCreate )
{ // explore Pool
- const USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
+ const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
if(nId != USHRT_MAX)
pFmt = rDoc.GetCharFmtFromPool(nId);
}
@@ -149,7 +149,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
{
if(pFmt)
{
- pStyle->SetPhysical(TRUE);
+ pStyle->SetPhysical(sal_True);
SwFmt* p = pFmt->DerivedFrom();
if( p && !p->IsDefault() )
pStyle->PresetParent( p->GetName() );
@@ -157,7 +157,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
pStyle->PresetParent( aEmptyStr );
}
else
- pStyle->SetPhysical(FALSE);
+ pStyle->SetPhysical(sal_False);
}
return pFmt;
}
@@ -171,7 +171,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
- BOOL bCreate = TRUE )
+ sal_Bool bCreate = sal_True )
{
SwTxtFmtColl* pColl = 0;
@@ -180,7 +180,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
pColl = rDoc.FindTxtFmtCollByName( rName );
if( !pColl && bCreate )
{ // explore Pool
- const USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
+ const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
if(nId != USHRT_MAX)
pColl = rDoc.GetTxtCollFromPool(nId);
}
@@ -190,7 +190,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
{
if(pColl)
{
- pStyle->SetPhysical(TRUE);
+ pStyle->SetPhysical(sal_True);
if( pColl->DerivedFrom() && !pColl->DerivedFrom()->IsDefault() )
pStyle->PresetParent( pColl->DerivedFrom()->GetName() );
else
@@ -200,7 +200,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
pStyle->PresetFollow(rNext.GetName());
}
else
- pStyle->SetPhysical(FALSE);
+ pStyle->SetPhysical(sal_False);
}
return pColl;
}
@@ -214,7 +214,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
- BOOL bCreate = TRUE )
+ sal_Bool bCreate = sal_True )
{
SwFrmFmt* pFmt = 0;
if( rName.Len() )
@@ -222,7 +222,7 @@ SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc,
pFmt = rDoc.FindFrmFmtByName( rName );
if( !pFmt && bCreate )
{ // explore Pool
- const USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT);
+ const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT);
if(nId != USHRT_MAX)
pFmt = rDoc.GetFrmFmtFromPool(nId);
}
@@ -232,14 +232,14 @@ SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc,
{
if(pFmt)
{
- pStyle->SetPhysical(TRUE);
+ pStyle->SetPhysical(sal_True);
if( pFmt->DerivedFrom() && !pFmt->DerivedFrom()->IsDefault() )
pStyle->PresetParent( pFmt->DerivedFrom()->GetName() );
else
pStyle->PresetParent( aEmptyStr );
}
else
- pStyle->SetPhysical(FALSE);
+ pStyle->SetPhysical(sal_False);
}
return pFmt;
}
@@ -252,7 +252,7 @@ SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc,
const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
- BOOL bCreate = TRUE )
+ sal_Bool bCreate = sal_True )
{
const SwPageDesc* pDesc = 0;
@@ -261,7 +261,7 @@ const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
pDesc = rDoc.FindPageDescByName( rName );
if( !pDesc && bCreate )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC);
if(nId != USHRT_MAX)
pDesc = rDoc.GetPageDescFromPool(nId);
}
@@ -271,14 +271,14 @@ const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
{
if(pDesc)
{
- pStyle->SetPhysical(TRUE);
+ pStyle->SetPhysical(sal_True);
if(pDesc->GetFollow())
pStyle->PresetFollow(pDesc->GetFollow()->GetName());
else
pStyle->PresetParent( aEmptyStr );
}
else
- pStyle->SetPhysical(FALSE);
+ pStyle->SetPhysical(sal_False);
}
return pDesc;
}
@@ -286,7 +286,7 @@ const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
const SwNumRule* lcl_FindNumRule( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
- BOOL bCreate = TRUE )
+ sal_Bool bCreate = sal_True )
{
const SwNumRule* pRule = 0;
@@ -295,7 +295,7 @@ const SwNumRule* lcl_FindNumRule( SwDoc& rDoc,
pRule = rDoc.FindNumRulePtr( rName );
if( !pRule && bCreate )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE);
if(nId != USHRT_MAX)
pRule = rDoc.GetNumRuleFromPool(nId);
}
@@ -305,17 +305,17 @@ const SwNumRule* lcl_FindNumRule( SwDoc& rDoc,
{
if(pRule)
{
- pStyle->SetPhysical(TRUE);
+ pStyle->SetPhysical(sal_True);
pStyle->PresetParent( aEmptyStr );
}
else
- pStyle->SetPhysical(FALSE);
+ pStyle->SetPhysical(sal_False);
}
return pRule;
}
-USHORT lcl_FindName( const SwPoolFmtList& rLst, SfxStyleFamily eFam,
+sal_uInt16 lcl_FindName( const SwPoolFmtList& rLst, SfxStyleFamily eFam,
const String& rName )
{
if( rLst.Count() )
@@ -331,30 +331,30 @@ USHORT lcl_FindName( const SwPoolFmtList& rLst, SfxStyleFamily eFam,
default:; //prevent warning
}
sSrch += rName;
- for( USHORT i=0; i < rLst.Count(); ++i )
+ for( sal_uInt16 i=0; i < rLst.Count(); ++i )
if( *rLst[i] == sSrch )
return i;
}
return USHRT_MAX;
}
-BOOL FindPhyStyle( SwDoc& rDoc, const String& rName, SfxStyleFamily eFam )
+sal_Bool FindPhyStyle( SwDoc& rDoc, const String& rName, SfxStyleFamily eFam )
{
switch( eFam )
{
case SFX_STYLE_FAMILY_CHAR :
- return 0 != lcl_FindCharFmt( rDoc, rName, 0, FALSE );
+ return 0 != lcl_FindCharFmt( rDoc, rName, 0, sal_False );
case SFX_STYLE_FAMILY_PARA :
- return 0 != lcl_FindParaFmt( rDoc, rName, 0, FALSE );
+ return 0 != lcl_FindParaFmt( rDoc, rName, 0, sal_False );
case SFX_STYLE_FAMILY_FRAME:
- return 0 != lcl_FindFrmFmt( rDoc, rName, 0, FALSE );
+ return 0 != lcl_FindFrmFmt( rDoc, rName, 0, sal_False );
case SFX_STYLE_FAMILY_PAGE :
- return 0 != lcl_FindPageDesc( rDoc, rName, 0, FALSE );
+ return 0 != lcl_FindPageDesc( rDoc, rName, 0, sal_False );
case SFX_STYLE_FAMILY_PSEUDO:
- return 0 != lcl_FindNumRule( rDoc, rName, 0, FALSE );
+ return 0 != lcl_FindNumRule( rDoc, rName, 0, sal_False );
default:; //prevent warning
}
- return FALSE;
+ return sal_False;
}
@@ -367,7 +367,7 @@ void SwPoolFmtList::Append( char cChar, const String& rStr )
{
String* pStr = new String( cChar );
*pStr += rStr;
- for ( USHORT i=0; i < Count(); ++i )
+ for ( sal_uInt16 i=0; i < Count(); ++i )
{
if( *operator[](i) == *pStr )
{
@@ -397,7 +397,7 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument,
const String& rName,
SwDocStyleSheetPool& _rPool,
SfxStyleFamily eFam,
- USHORT _nMask) :
+ sal_uInt16 _nMask) :
SfxStyleSheetBase( rName, _rPool, eFam, _nMask ),
pCharFmt(0),
@@ -427,7 +427,7 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument,
SID_PARA_BACKGRND_DESTINATION, SID_ATTR_BRUSH_CHAR,
SID_ATTR_NUMBERING_RULE, SID_ATTR_NUMBERING_RULE,
0),
- bPhysical(FALSE)
+ bPhysical(sal_False)
{
nHelpId = UCHAR_MAX;
}
@@ -461,7 +461,7 @@ void SwDocStyleSheet::Reset()
aName.Erase();
aFollow.Erase();
aParent.Erase();
- SetPhysical(FALSE);
+ SetPhysical(sal_False);
}
/*--------------------------------------------------------------------
@@ -502,7 +502,7 @@ const String& SwDocStyleSheet::GetParent() const
String sTmp;
if( !pFmt ) // not yet there, so default Parent
{
- USHORT i = SwStyleNameMapper::GetPoolIdFromUIName( aName, eGetType );
+ sal_uInt16 i = SwStyleNameMapper::GetPoolIdFromUIName( aName, eGetType );
i = ::GetPoolParent( i );
if( i && USHRT_MAX != i )
SwStyleNameMapper::FillUIName( i, sTmp );
@@ -539,19 +539,19 @@ const String& SwDocStyleSheet::GetFollow() const
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::HasFollowSupport() const
+sal_Bool SwDocStyleSheet::HasFollowSupport() const
{
switch(nFamily)
{
case SFX_STYLE_FAMILY_PARA :
- case SFX_STYLE_FAMILY_PAGE : return TRUE;
+ case SFX_STYLE_FAMILY_PAGE : return sal_True;
case SFX_STYLE_FAMILY_FRAME:
case SFX_STYLE_FAMILY_CHAR :
- case SFX_STYLE_FAMILY_PSEUDO: return FALSE;
+ case SFX_STYLE_FAMILY_PSEUDO: return sal_False;
default:
OSL_ENSURE(!this, "unknown style family");
}
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -559,28 +559,28 @@ BOOL SwDocStyleSheet::HasFollowSupport() const
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::HasParentSupport() const
+sal_Bool SwDocStyleSheet::HasParentSupport() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch(nFamily)
{
case SFX_STYLE_FAMILY_CHAR :
case SFX_STYLE_FAMILY_PARA :
- case SFX_STYLE_FAMILY_FRAME: bRet = TRUE;
+ case SFX_STYLE_FAMILY_FRAME: bRet = sal_True;
default:; //prevent warning
}
return bRet;
}
-BOOL SwDocStyleSheet::HasClearParentSupport() const
+sal_Bool SwDocStyleSheet::HasClearParentSupport() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch(nFamily)
{
case SFX_STYLE_FAMILY_PARA :
case SFX_STYLE_FAMILY_CHAR :
- case SFX_STYLE_FAMILY_FRAME: bRet = TRUE;
+ case SFX_STYLE_FAMILY_FRAME: bRet = sal_True;
default:; //prevent warning
}
return bRet;
@@ -646,8 +646,8 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
const SfxPoolItem* pItem = aIter.FirstItem();
String sPageNum, sModel, sBreak;
- BOOL bHasWesternFontPrefix = FALSE;
- BOOL bHasCJKFontPrefix = FALSE;
+ sal_Bool bHasWesternFontPrefix = sal_False;
+ sal_Bool bHasCJKFontPrefix = sal_False;
SvtCJKOptions aCJKOptions;
while ( pItem )
@@ -673,7 +673,7 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
*pItem, SFX_ITEM_PRESENTATION_COMPLETE,
eUnit, aItemPresentation, &aIntlWrapper ) )
{
- BOOL bIsDefault = FALSE;
+ sal_Bool bIsDefault = sal_False;
switch ( pItem->Which() )
{
case SID_ATTR_PARA_PAGENUM:
@@ -691,11 +691,11 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
case RES_CHRATR_CJK_POSTURE:
case RES_CHRATR_CJK_WEIGHT:
if(aCJKOptions.IsCJKFontEnabled())
- bIsDefault = TRUE;
+ bIsDefault = sal_True;
if(!bHasCJKFontPrefix)
{
aItemPresentation.Insert(SW_RESSTR(STR_CJK_FONT), 0);
- bHasCJKFontPrefix = TRUE;
+ bHasCJKFontPrefix = sal_True;
}
break;
case RES_CHRATR_FONT:
@@ -706,12 +706,12 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
if(!bHasWesternFontPrefix)
{
aItemPresentation.Insert(SW_RESSTR(STR_WESTERN_FONT), 0);
- bHasWesternFontPrefix = TRUE;
- bIsDefault = TRUE;
+ bHasWesternFontPrefix = sal_True;
+ bIsDefault = sal_True;
}
// no break;
default:
- bIsDefault = TRUE;
+ bIsDefault = sal_True;
}
if(bIsDefault)
{
@@ -766,20 +766,20 @@ String SwDocStyleSheet::GetDescription()
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::SetName( const String& rStr)
+sal_Bool SwDocStyleSheet::SetName( const String& rStr)
{
if( !rStr.Len() )
- return FALSE;
+ return sal_False;
if( aName != rStr )
{
if( !SfxStyleSheetBase::SetName( rStr ))
- return FALSE;
+ return sal_False;
}
else if(!bPhysical)
FillStyleSheet( FillPhysical );
- int bChg = FALSE;
+ int bChg = sal_False;
switch(nFamily)
{
case SFX_STYLE_FAMILY_CHAR :
@@ -788,7 +788,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
if( pCharFmt && pCharFmt->GetName() != rStr )
{
pCharFmt->SetName( rStr );
- bChg = TRUE;
+ bChg = sal_True;
}
break;
}
@@ -802,7 +802,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
else
pColl->SetName(rStr);
- bChg = TRUE;
+ bChg = sal_True;
}
break;
}
@@ -816,7 +816,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
else
pFrmFmt->SetName( rStr );
- bChg = TRUE;
+ bChg = sal_True;
}
break;
}
@@ -831,14 +831,14 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
String aOldName(aPageDesc.GetName());
aPageDesc.SetName( rStr );
- BOOL bDoesUndo = rDoc.DoesUndo();
+ bool const bDoesUndo = rDoc.GetIDocumentUndoRedo().DoesUndo();
- rDoc.DoUndo(aOldName.Len() > 0);
+ rDoc.GetIDocumentUndoRedo().DoUndo(aOldName.Len() > 0);
rDoc.ChgPageDesc(aOldName, aPageDesc);
- rDoc.DoUndo(bDoesUndo);
+ rDoc.GetIDocumentUndoRedo().DoUndo(bDoesUndo);
rDoc.SetModified();
- bChg = TRUE;
+ bChg = sal_True;
}
break;
case SFX_STYLE_FAMILY_PSEUDO:
@@ -856,7 +856,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
pNumRule = rDoc.FindNumRulePtr(rStr);
rDoc.SetModified();
- bChg = TRUE;
+ bChg = sal_True;
}
}
else
@@ -865,7 +865,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
((SwNumRule*)pNumRule)->SetName( rStr, rDoc );
rDoc.SetModified();
- bChg = TRUE;
+ bChg = sal_True;
}
}
@@ -883,7 +883,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
if( pSh )
pSh->CallChgLnk();
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -891,7 +891,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::SetParent( const String& rStr)
+sal_Bool SwDocStyleSheet::SetParent( const String& rStr)
{
SwFmt* pFmt = 0, *pParent = 0;
switch(nFamily)
@@ -921,7 +921,7 @@ BOOL SwDocStyleSheet::SetParent( const String& rStr)
OSL_ENSURE(!this, "unknown style family");
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pFmt && pFmt->DerivedFrom() &&
pFmt->DerivedFrom()->GetName() != rStr )
{
@@ -946,10 +946,10 @@ BOOL SwDocStyleSheet::SetParent( const String& rStr)
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::SetFollow( const String& rStr)
+sal_Bool SwDocStyleSheet::SetFollow( const String& rStr)
{
if( rStr.Len() && !SfxStyleSheetBase::SetFollow( rStr ))
- return FALSE;
+ return sal_False;
SwImplShellAction aTmpSh( rDoc );
switch(nFamily)
@@ -975,7 +975,7 @@ BOOL SwDocStyleSheet::SetFollow( const String& rStr)
const SwPageDesc* pFollowDesc = rStr.Len()
? lcl_FindPageDesc(rDoc, rStr)
: 0;
- USHORT nId;
+ sal_uInt16 nId;
if( pFollowDesc != pDesc->GetFollow() &&
rDoc.FindPageDescByName( pDesc->GetName(), &nId ) )
{
@@ -995,7 +995,7 @@ BOOL SwDocStyleSheet::SetFollow( const String& rStr)
OSL_ENSURE(!this, "unknwown style family");
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -1022,12 +1022,12 @@ SfxItemSet& SwDocStyleSheet::GetItemSet()
case SFX_STYLE_FAMILY_FRAME:
{
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
- aBoxInfo.SetTable( FALSE );
- aBoxInfo.SetDist( TRUE); // always show gap field
- aBoxInfo.SetMinDist( TRUE );// set minimum size in tables and paragraphs
+ aBoxInfo.SetTable( sal_False );
+ aBoxInfo.SetDist( sal_True ); // always show gap field
+ aBoxInfo.SetMinDist( sal_True );// set minimum size in tables and paragraphs
aBoxInfo.SetDefDist( MIN_BORDER_DIST );// always set Default-Gap
// Single lines can only have DontCare-Status in tables
- aBoxInfo.SetValid( VALID_DISABLE, TRUE );
+ aBoxInfo.SetValid( VALID_DISABLE, sal_True );
if ( nFamily == SFX_STYLE_FAMILY_PARA )
{
OSL_ENSURE(pColl, "Where's Collection");
@@ -1118,16 +1118,16 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
OSL_ENSURE( &rSet != &aCoreSet, "SetItemSet with own Set is not allowed" );
- if ( rDoc.DoesUndo() )
+ if (rDoc.GetIDocumentUndoRedo().DoesUndo())
{
SwRewriter aRewriter;
aRewriter.AddRule( UNDO_ARG1, GetName() );
- rDoc.StartUndo( UNDO_INSFMTATTR, &aRewriter );
+ rDoc.GetIDocumentUndoRedo().StartUndo( UNDO_INSFMTATTR, &aRewriter );
}
SwFmt* pFmt = 0;
SwPageDesc* pNewDsc = 0;
- USHORT nPgDscPos = 0;
+ sal_uInt16 nPgDscPos = 0;
switch(nFamily)
{
@@ -1142,13 +1142,13 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
OSL_ENSURE(pColl, "Where's Collection");
const SfxPoolItem* pAutoUpdate;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,FALSE, &pAutoUpdate ))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,sal_False, &pAutoUpdate ))
{
pColl->SetAutoUpdateFmt(((const SfxBoolItem*)pAutoUpdate)->GetValue());
}
const SwCondCollItem* pCondItem;
- if( SFX_ITEM_SET != rSet.GetItemState( FN_COND_COLL, FALSE,
+ if( SFX_ITEM_SET != rSet.GetItemState( FN_COND_COLL, sal_False,
(const SfxPoolItem**)&pCondItem ))
pCondItem = 0;
@@ -1156,13 +1156,13 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
SwFmt* pFindFmt;
const CommandStruct* pCmds = SwCondCollItem::GetCmds();
- for(USHORT i = 0; i < COND_COMMAND_COUNT; i++)
+ for(sal_uInt16 i = 0; i < COND_COMMAND_COUNT; i++)
{
SwCollCondition aCond( 0, pCmds[ i ].nCnd, pCmds[ i ].nSubCond );
((SwConditionTxtFmtColl*)pColl)->RemoveCondition( aCond );
const String& rStyle = pCondItem->GetStyle( i );
if( rStyle.Len() &&
- 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, TRUE )))
+ 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, sal_True )))
{
pFindFmt->Add( &aCond );
((SwConditionTxtFmtColl*)pColl)->InsertCondition( aCond );
@@ -1191,11 +1191,11 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
SwTxtFmtColl* pFindFmt;
const CommandStruct* pCmds = SwCondCollItem::GetCmds();
- for( USHORT i = 0; i < COND_COMMAND_COUNT; ++i )
+ for( sal_uInt16 i = 0; i < COND_COMMAND_COUNT; ++i )
{
const String& rStyle = pCondItem->GetStyle( i );
if( rStyle.Len() &&
- 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, TRUE )))
+ 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, sal_True )))
{
pCColl->InsertCondition( SwCollCondition( pFindFmt,
pCmds[ i ].nCnd, pCmds[ i ].nSubCond ) );
@@ -1206,9 +1206,9 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
pColl = pCColl;
}
if ( bResetIndentAttrsAtParagraphStyle &&
- rSet.GetItemState( RES_PARATR_NUMRULE, FALSE, 0 ) == SFX_ITEM_SET &&
- rSet.GetItemState( RES_LR_SPACE, FALSE, 0 ) != SFX_ITEM_SET &&
- pColl->GetItemState( RES_LR_SPACE, FALSE, 0 ) == SFX_ITEM_SET )
+ rSet.GetItemState( RES_PARATR_NUMRULE, sal_False, 0 ) == SFX_ITEM_SET &&
+ rSet.GetItemState( RES_LR_SPACE, sal_False, 0 ) != SFX_ITEM_SET &&
+ pColl->GetItemState( RES_LR_SPACE, sal_False, 0 ) == SFX_ITEM_SET )
{
rDoc.ResetAttrAtFormat( RES_LR_SPACE, *pColl );
}
@@ -1218,7 +1218,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
// neither the paragraph style nor the numbering style is used in the document
// the numbering style will not be saved with the document and the assignment got lost.
const SfxPoolItem* pNumRuleItem = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, FALSE, &pNumRuleItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, sal_False, &pNumRuleItem ) )
{ // Setting a numbering rule?
String sNumRule = ((SwNumRuleItem*)pNumRuleItem)->GetValue();
if( sNumRule.Len() )
@@ -1226,7 +1226,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
SwNumRule* pRule = rDoc.FindNumRulePtr( sNumRule );
if( !pRule )
{ // Numbering rule not in use yet.
- USHORT nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sNumRule, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE );
+ sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sNumRule, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE );
if( USHRT_MAX != nPoolId ) // It's a standard numbering rule
{
pRule = rDoc.GetNumRuleFromPool( nPoolId ); // Create numbering rule (physical)
@@ -1237,7 +1237,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
pFmt = pColl;
- USHORT nId = pColl->GetPoolFmtId() &
+ sal_uInt16 nId = pColl->GetPoolFmtId() &
~ ( COLL_GET_RANGE_BITS | POOLGRP_NOCOLLID );
switch( GetMask() & ( 0x0fff & ~SWSTYLEBIT_CONDCOLL ) )
{
@@ -1267,7 +1267,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
OSL_ENSURE(pFrmFmt, "Where's FrmFmt");
const SfxPoolItem* pAutoUpdate;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,FALSE, &pAutoUpdate ))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,sal_False, &pAutoUpdate ))
{
pFrmFmt->SetAutoUpdateFmt(((const SfxBoolItem*)pAutoUpdate)->GetValue());
}
@@ -1284,10 +1284,8 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
pNewDsc = new SwPageDesc( *pDesc );
// --> OD 2005-05-09 #i48949# - no undo actions for the
// copy of the page style
- const sal_Bool bDoesUndo( rDoc.DoesUndo() );
- rDoc.DoUndo( sal_False );
+ ::sw::UndoGuard const ug(rDoc.GetIDocumentUndoRedo());
rDoc.CopyPageDesc(*pDesc, *pNewDsc); // #i7983#
- rDoc.DoUndo( bDoesUndo );
// <--
pFmt = &pNewDsc->GetMaster();
@@ -1303,7 +1301,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
break;
const SfxPoolItem* pItem;
- switch( rSet.GetItemState( SID_ATTR_NUMBERING_RULE, FALSE, &pItem ))
+ switch( rSet.GetItemState( SID_ATTR_NUMBERING_RULE, sal_False, &pItem ))
{
case SFX_ITEM_SET:
{
@@ -1336,7 +1334,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
SfxItemIter aIter( rSet );
const SfxPoolItem* pItem = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
if( IsInvalidItem( pItem ) ) // Clear
{
@@ -1376,13 +1374,13 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
}
}
- if ( rDoc.DoesUndo() )
+ if (rDoc.GetIDocumentUndoRedo().DoesUndo())
{
- rDoc.EndUndo( UNDO_INSFMTATTR, NULL );
+ rDoc.GetIDocumentUndoRedo().EndUndo(UNDO_END, 0);
}
}
-void lcl_SaveStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc )
+void lcl_SaveStyles( sal_uInt16 nFamily, SvPtrarr& rArr, SwDoc& rDoc )
{
switch( nFamily )
{
@@ -1441,7 +1439,7 @@ void lcl_SaveStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc )
}
}
-void lcl_DeleteInfoStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc )
+void lcl_DeleteInfoStyles( sal_uInt16 nFamily, SvPtrarr& rArr, SwDoc& rDoc )
{
sal_uInt16 n, nCnt;
switch( nFamily )
@@ -1528,15 +1526,15 @@ void lcl_DeleteInfoStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc )
Description: determine the format
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
+sal_Bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
{
- BOOL bRet = FALSE;
- USHORT nPoolId = USHRT_MAX;
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nPoolId = USHRT_MAX;
SwFmt* pFmt = 0;
- BOOL bCreate = FillPhysical == eFType;
- BOOL bDeleteInfo = FALSE;
- BOOL bFillOnlyInfo = FillAllInfo == eFType;
+ sal_Bool bCreate = FillPhysical == eFType;
+ sal_Bool bDeleteInfo = sal_False;
+ sal_Bool bFillOnlyInfo = FillAllInfo == eFType;
SvPtrarr aDelArr;
switch(nFamily)
@@ -1546,9 +1544,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
bPhysical = 0 != pCharFmt;
if( bFillOnlyInfo && !bPhysical )
{
- bDeleteInfo = TRUE;
- ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
- pCharFmt = lcl_FindCharFmt(rDoc, aName, this, TRUE );
+ bDeleteInfo = sal_True;
+ ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
+ pCharFmt = lcl_FindCharFmt(rDoc, aName, this, sal_True );
}
pFmt = pCharFmt;
@@ -1573,9 +1571,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
bPhysical = 0 != pColl;
if( bFillOnlyInfo && !bPhysical )
{
- bDeleteInfo = TRUE;
- ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
- pColl = lcl_FindParaFmt(rDoc, aName, this, TRUE );
+ bDeleteInfo = sal_True;
+ ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
+ pColl = lcl_FindParaFmt(rDoc, aName, this, sal_True );
}
pFmt = pColl;
@@ -1596,9 +1594,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
bPhysical = 0 != pFrmFmt;
if( bFillOnlyInfo && bPhysical )
{
- bDeleteInfo = TRUE;
- ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
- pFrmFmt = lcl_FindFrmFmt(rDoc, aName, this, TRUE );
+ bDeleteInfo = sal_True;
+ ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
+ pFrmFmt = lcl_FindFrmFmt(rDoc, aName, this, sal_True );
}
pFmt = pFrmFmt;
if( !bCreate && !pFmt )
@@ -1615,9 +1613,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
bPhysical = 0 != pDesc;
if( bFillOnlyInfo && !pDesc )
{
- bDeleteInfo = TRUE;
- ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
- pDesc = lcl_FindPageDesc( rDoc, aName, this, TRUE );
+ bDeleteInfo = sal_True;
+ ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
+ pDesc = lcl_FindPageDesc( rDoc, aName, this, sal_True );
}
if( pDesc )
@@ -1643,9 +1641,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
bPhysical = 0 != pNumRule;
if( bFillOnlyInfo && !pNumRule )
{
- bDeleteInfo = TRUE;
- ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
- pNumRule = lcl_FindNumRule( rDoc, aName, this, TRUE );
+ bDeleteInfo = sal_True;
+ ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
+ pNumRule = lcl_FindNumRule( rDoc, aName, this, sal_True );
}
if( pNumRule )
@@ -1676,7 +1674,7 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
if( pFmt )
nPoolId = pFmt->GetPoolFmtId();
- USHORT _nMask = 0;
+ sal_uInt16 _nMask = 0;
if( pFmt == rDoc.GetDfltCharFmt() )
_nMask |= SFXSTYLEBIT_READONLY;
else if( USER_FMT & nPoolId )
@@ -1709,7 +1707,7 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
SetMask( _nMask );
}
if( bDeleteInfo && bFillOnlyInfo )
- ::lcl_DeleteInfoStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
+ ::lcl_DeleteInfoStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
return bRet;
}
@@ -1727,7 +1725,7 @@ void SwDocStyleSheet::Create()
if( !pCharFmt )
pCharFmt = rDoc.MakeCharFmt(aName,
rDoc.GetDfltCharFmt());
- pCharFmt->SetAuto( FALSE );
+ pCharFmt->SetAuto( sal_False );
break;
case SFX_STYLE_FAMILY_PARA :
@@ -1745,7 +1743,7 @@ void SwDocStyleSheet::Create()
case SFX_STYLE_FAMILY_FRAME:
pFrmFmt = lcl_FindFrmFmt( rDoc, aName );
if( !pFrmFmt )
- pFrmFmt = rDoc.MakeFrmFmt(aName, rDoc.GetDfltFrmFmt(), FALSE, FALSE);
+ pFrmFmt = rDoc.MakeFrmFmt(aName, rDoc.GetDfltFrmFmt(), sal_False, sal_False);
break;
@@ -1753,7 +1751,7 @@ void SwDocStyleSheet::Create()
pDesc = lcl_FindPageDesc( rDoc, aName );
if( !pDesc )
{
- USHORT nId = rDoc.MakePageDesc(aName);
+ sal_uInt16 nId = rDoc.MakePageDesc(aName);
pDesc = &const_cast<const SwDoc &>(rDoc).GetPageDesc(nId);
}
break;
@@ -1767,10 +1765,10 @@ void SwDocStyleSheet::Create()
sTmpNm = rDoc.GetUniqueNumRuleName();
SwNumRule* pRule = rDoc.GetNumRuleTbl()[
- rDoc.MakeNumRule( sTmpNm, 0, FALSE,
+ rDoc.MakeNumRule( sTmpNm, 0, sal_False,
// #i89178#
numfunc::GetDefaultPositionAndSpaceMode() ) ];
- pRule->SetAutoRule( FALSE );
+ pRule->SetAutoRule( sal_False );
if( !aName.Len() )
{
// #i91400#
@@ -1781,7 +1779,7 @@ void SwDocStyleSheet::Create()
break;
default:; //prevent warning
}
- bPhysical = TRUE;
+ bPhysical = sal_True;
aCoreSet.ClearItem();
}
@@ -1841,7 +1839,7 @@ void SwDocStyleSheet::PresetNameAndFamily(const String& rName)
--------------------------------------------------------------------*/
-void SwDocStyleSheet::SetPhysical(BOOL bPhys)
+void SwDocStyleSheet::SetPhysical(sal_Bool bPhys)
{
bPhysical = bPhys;
@@ -1861,7 +1859,7 @@ SwFrmFmt* SwDocStyleSheet::GetFrmFmt()
return pFrmFmt;
}
-BOOL SwDocStyleSheet::IsUsed() const
+sal_Bool SwDocStyleSheet::IsUsed() const
{
if( !bPhysical )
{
@@ -1870,7 +1868,7 @@ BOOL SwDocStyleSheet::IsUsed() const
}
if( !bPhysical )
- return FALSE;
+ return sal_False;
const SwModify* pMod;
switch( nFamily )
@@ -1881,22 +1879,22 @@ BOOL SwDocStyleSheet::IsUsed() const
case SFX_STYLE_FAMILY_PAGE : pMod = pDesc; break;
case SFX_STYLE_FAMILY_PSEUDO:
- return pNumRule ? rDoc.IsUsed( *pNumRule ) : FALSE;
+ return pNumRule ? rDoc.IsUsed( *pNumRule ) : sal_False;
default:
OSL_ENSURE(!this, "unknown style family");
- return FALSE;
+ return sal_False;
}
return rDoc.IsUsed( *pMod );
}
-ULONG SwDocStyleSheet::GetHelpId( String& rFile )
+sal_uLong SwDocStyleSheet::GetHelpId( String& rFile )
{
static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
- USHORT nId = 0;
- USHORT nPoolId = 0;
+ sal_uInt16 nId = 0;
+ sal_uInt16 nPoolId = 0;
unsigned char nFileId = UCHAR_MAX;
rFile = sTemplateHelpFile;
@@ -1906,7 +1904,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
{
case SFX_STYLE_FAMILY_CHAR :
if( !pCharFmt &&
- 0 == (pCharFmt = lcl_FindCharFmt( rDoc, aName, 0, FALSE )) )
+ 0 == (pCharFmt = lcl_FindCharFmt( rDoc, aName, 0, sal_False )) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
return USHRT_MAX == nId ? 0 : nId;
@@ -1916,7 +1914,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
case SFX_STYLE_FAMILY_PARA:
if( !pColl &&
- 0 == ( pColl = lcl_FindParaFmt( rDoc, aName, 0, FALSE )) )
+ 0 == ( pColl = lcl_FindParaFmt( rDoc, aName, 0, sal_False )) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
return USHRT_MAX == nId ? 0 : nId;
@@ -1926,7 +1924,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
case SFX_STYLE_FAMILY_FRAME:
if( !pFrmFmt &&
- 0 == ( pFrmFmt = lcl_FindFrmFmt( rDoc, aName, 0, FALSE ) ) )
+ 0 == ( pFrmFmt = lcl_FindFrmFmt( rDoc, aName, 0, sal_False ) ) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT );
return USHRT_MAX == nId ? 0 : nId;
@@ -1936,7 +1934,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
case SFX_STYLE_FAMILY_PAGE:
if( !pDesc &&
- 0 == ( pDesc = lcl_FindPageDesc( rDoc, aName, 0, FALSE ) ) )
+ 0 == ( pDesc = lcl_FindPageDesc( rDoc, aName, 0, sal_False ) ) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC );
return USHRT_MAX == nId ? 0 : nId;
@@ -1949,7 +1947,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
case SFX_STYLE_FAMILY_PSEUDO:
if( !pNumRule &&
- 0 == ( pNumRule = lcl_FindNumRule( rDoc, aName, 0, FALSE ) ) )
+ 0 == ( pNumRule = lcl_FindNumRule( rDoc, aName, 0, sal_False ) ) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE );
return USHRT_MAX == nId ? 0 : nId;
@@ -1993,10 +1991,10 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
}
-void SwDocStyleSheet::SetHelpId( const String& r, ULONG nId )
+void SwDocStyleSheet::SetHelpId( const String& r, sal_uLong nId )
{
- BYTE nFileId = static_cast< BYTE >(rDoc.SetDocPattern( r ));
- USHORT nHId = static_cast< USHORT >(nId); //!! SFX changed over to ULONG arbitrarily!
+ sal_uInt8 nFileId = static_cast< sal_uInt8 >(rDoc.SetDocPattern( r ));
+ sal_uInt16 nHId = static_cast< sal_uInt16 >(nId); //!! SFX changed over to ULONG arbitrarily!
SwFmt* pTmpFmt = 0;
switch( nFamily )
@@ -2029,7 +2027,7 @@ void SwDocStyleSheet::SetHelpId( const String& r, ULONG nId )
Description: methods for DocStyleSheetPool
--------------------------------------------------------------------*/
-SwDocStyleSheetPool::SwDocStyleSheetPool( SwDoc& rDocument, BOOL bOrg )
+SwDocStyleSheetPool::SwDocStyleSheetPool( SwDoc& rDocument, sal_Bool bOrg )
: SfxStyleSheetBasePool( rDocument.GetAttrPool() )
, mxStyleSheet( new SwDocStyleSheet( rDocument, aEmptyStr, *this, SFX_STYLE_FAMILY_CHAR, 0 ) )
, rDoc( rDocument )
@@ -2054,15 +2052,15 @@ void SAL_CALL SwDocStyleSheetPool::release( ) throw ()
SfxStyleSheetBase& SwDocStyleSheetPool::Make(
const String& rName,
SfxStyleFamily eFam,
- USHORT _nMask,
- USHORT /*nPos*/ )
+ sal_uInt16 _nMask,
+ sal_uInt16 /*nPos*/ )
{
mxStyleSheet->PresetName(rName);
mxStyleSheet->PresetParent(aEmptyStr);
mxStyleSheet->PresetFollow(aEmptyStr);
mxStyleSheet->SetMask(_nMask) ;
mxStyleSheet->SetFamily(eFam);
- mxStyleSheet->SetPhysical(TRUE);
+ mxStyleSheet->SetPhysical(sal_True);
mxStyleSheet->Create();
return *mxStyleSheet.get();
@@ -2077,7 +2075,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Create( const SfxStyleSheetBase& /*rOr
SfxStyleSheetBase* SwDocStyleSheetPool::Create( const String &,
- SfxStyleFamily, USHORT )
+ SfxStyleFamily, sal_uInt16 )
{
OSL_ENSURE( !this, "Create im SW-Stylesheet-Pool geht nicht" );
return NULL;
@@ -2110,7 +2108,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource,
SwImplShellAction aTmpSh( rDoc );
- BOOL bSwSrcPool = GetAppName() == rSource.GetPool().GetAppName();
+ sal_Bool bSwSrcPool = GetAppName() == rSource.GetPool().GetAppName();
if( SFX_STYLE_FAMILY_PAGE == eFamily && bSwSrcPool )
{
// deal with separately!
@@ -2124,7 +2122,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource,
{
const SwFmt *pSourceFmt = 0;
SwFmt *pTargetFmt = 0;
- USHORT nPgDscPos = USHRT_MAX;
+ sal_uInt16 nPgDscPos = USHRT_MAX;
switch( eFamily )
{
case SFX_STYLE_FAMILY_CHAR :
@@ -2184,7 +2182,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource,
}
SfxStyleSheetIterator* SwDocStyleSheetPool::CreateIterator(
- SfxStyleFamily eFam, USHORT _nMask )
+ SfxStyleFamily eFam, sal_uInt16 _nMask )
{
return new SwStyleSheetIterator( this, eFam, _nMask );
}
@@ -2199,35 +2197,35 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
if( !pStyle )
return;
- BOOL bBroadcast = TRUE;
+ sal_Bool bBroadcast = sal_True;
SwImplShellAction aTmpSh( rDoc );
const String& rName = pStyle->GetName();
switch( pStyle->GetFamily() )
{
case SFX_STYLE_FAMILY_CHAR:
{
- SwCharFmt* pFmt = lcl_FindCharFmt(rDoc, rName, 0, FALSE );
+ SwCharFmt* pFmt = lcl_FindCharFmt(rDoc, rName, 0, sal_False );
if(pFmt)
rDoc.DelCharFmt(pFmt);
}
break;
case SFX_STYLE_FAMILY_PARA:
{
- SwTxtFmtColl* pColl = lcl_FindParaFmt(rDoc, rName, 0, FALSE );
+ SwTxtFmtColl* pColl = lcl_FindParaFmt(rDoc, rName, 0, sal_False );
if(pColl)
rDoc.DelTxtFmtColl(pColl);
}
break;
case SFX_STYLE_FAMILY_FRAME:
{
- SwFrmFmt* pFmt = lcl_FindFrmFmt(rDoc, rName, 0, FALSE );
+ SwFrmFmt* pFmt = lcl_FindFrmFmt(rDoc, rName, 0, sal_False );
if(pFmt)
rDoc.DelFrmFmt(pFmt);
}
break;
case SFX_STYLE_FAMILY_PAGE :
{
- USHORT nPos;
+ sal_uInt16 nPos;
if( rDoc.FindPageDescByName( rName, &nPos ))
rDoc.DelPageDesc( nPos );
}
@@ -2237,13 +2235,13 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
{
if( !rDoc.DelNumRule( rName ) )
// Only send Broadcast, when something was deleted
- bBroadcast = FALSE;
+ bBroadcast = sal_False;
}
break;
default:
OSL_ENSURE(!this, "unknown style family");
- bBroadcast = FALSE;
+ bBroadcast = sal_False;
}
if( bBroadcast )
@@ -2252,7 +2250,7 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
-BOOL SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
+sal_Bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
const String &rStyle, const String &rParent )
{
SwFmt* pFmt = 0, *pParent = 0;
@@ -2281,7 +2279,7 @@ BOOL SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
OSL_ENSURE(!this, "unknown style family");
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pFmt && pFmt->DerivedFrom() &&
pFmt->DerivedFrom()->GetName() != rParent )
{
@@ -2310,9 +2308,9 @@ BOOL SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
}
SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
- SfxStyleFamily eFam, USHORT n )
+ SfxStyleFamily eFam, sal_uInt16 n )
{
- USHORT nSMask = n;
+ sal_uInt16 nSMask = n;
if( SFX_STYLE_FAMILY_PARA == eFam && rDoc.get(IDocumentSettingAccess::HTML_MODE) )
{
// then only HTML-Templates are of interest
@@ -2325,14 +2323,14 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
nSMask = SWSTYLEBIT_HTML;
}
- const BOOL bSearchUsed = ( n != SFXSTYLEBIT_ALL &&
- n & SFXSTYLEBIT_USED ) ? TRUE : FALSE;
+ const sal_Bool bSearchUsed = ( n != SFXSTYLEBIT_ALL &&
+ n & SFXSTYLEBIT_USED ) ? sal_True : sal_False;
const SwModify* pMod = 0;
- mxStyleSheet->SetPhysical( FALSE );
+ mxStyleSheet->SetPhysical( sal_False );
mxStyleSheet->PresetName( rName );
mxStyleSheet->SetFamily( eFam );
- BOOL bFnd = mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName );
+ sal_Bool bFnd = mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName );
if( mxStyleSheet->IsPhysical() )
{
@@ -2363,7 +2361,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
? !(pRule->GetPoolFmtId() & USER_FMT)
// searched for used and found none
: bSearchUsed ))
- bFnd = FALSE;
+ bFnd = sal_False;
}
break;
@@ -2375,7 +2373,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
// then evaluate the mask:
if( pMod && !(bSearchUsed && (bOrganizer || rDoc.IsUsed(*pMod)) ) )
{
- const USHORT nId = SFX_STYLE_FAMILY_PAGE == eFam
+ const sal_uInt16 nId = SFX_STYLE_FAMILY_PAGE == eFam
? ((SwPageDesc*)pMod)->GetPoolFmtId()
: ((SwFmt*)pMod)->GetPoolFmtId();
@@ -2383,18 +2381,18 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
? !(nId & USER_FMT)
// searched for used and found none
: bSearchUsed )
- bFnd = FALSE;
+ bFnd = sal_False;
}
return bFnd ? mxStyleSheet.get() : 0;
}
SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase,
- SfxStyleFamily eFam, USHORT n )
+ SfxStyleFamily eFam, sal_uInt16 n )
: SfxStyleSheetIterator( pBase, eFam, n ),
mxIterSheet( new SwDocStyleSheet( pBase->GetDoc(), aEmptyStr, *pBase, SFX_STYLE_FAMILY_CHAR, 0 ) ),
mxStyleSheet( new SwDocStyleSheet( pBase->GetDoc(), aEmptyStr, *pBase, SFX_STYLE_FAMILY_CHAR, 0 ) )
{
- bFirstCalled = FALSE;
+ bFirstCalled = sal_False;
nLastPos = 0;
StartListening( *pBase );
}
@@ -2404,7 +2402,7 @@ SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase,
EndListening( mxIterSheet->GetPool() );
}
-USHORT SwStyleSheetIterator::Count()
+sal_uInt16 SwStyleSheetIterator::Count()
{
// let the list fill correctly!!
if( !bFirstCalled )
@@ -2412,13 +2410,13 @@ USHORT SwStyleSheetIterator::Count()
return aLst.Count();
}
-SfxStyleSheetBase* SwStyleSheetIterator::operator[]( USHORT nIdx )
+SfxStyleSheetBase* SwStyleSheetIterator::operator[]( sal_uInt16 nIdx )
{
// found
if( !bFirstCalled )
First();
mxStyleSheet->PresetNameAndFamily( *aLst[ nIdx ] );
- mxStyleSheet->SetPhysical( FALSE );
+ mxStyleSheet->SetPhysical( sal_False );
mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName );
return mxStyleSheet.get();
@@ -2427,7 +2425,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::operator[]( USHORT nIdx )
SfxStyleSheetBase* SwStyleSheetIterator::First()
{
// Delete old list
- bFirstCalled = TRUE;
+ bFirstCalled = sal_True;
nLastPos = 0;
aLst.Erase();
@@ -2435,27 +2433,27 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
mxIterSheet->Reset();
SwDoc& rDoc = ((SwDocStyleSheetPool*)pBasePool)->GetDoc();
- const USHORT nSrchMask = nMask;
- const BOOL bIsSearchUsed = SearchUsed();
+ const sal_uInt16 nSrchMask = nMask;
+ const sal_Bool bIsSearchUsed = SearchUsed();
- const BOOL bOrganizer = ((SwDocStyleSheetPool*)pBasePool)->IsOrganizerMode();
+ const sal_Bool bOrganizer = ((SwDocStyleSheetPool*)pBasePool)->IsOrganizerMode();
if( nSearchFamily == SFX_STYLE_FAMILY_CHAR
|| nSearchFamily == SFX_STYLE_FAMILY_ALL )
{
- const USHORT nArrLen = rDoc.GetCharFmts()->Count();
- for( USHORT i = 0; i < nArrLen; i++ )
+ const sal_uInt16 nArrLen = rDoc.GetCharFmts()->Count();
+ for( sal_uInt16 i = 0; i < nArrLen; i++ )
{
SwCharFmt* pFmt = (*rDoc.GetCharFmts())[ i ];
if( pFmt->IsDefault() && pFmt != rDoc.GetDfltCharFmt() )
continue;
- const BOOL bUsed = bIsSearchUsed && (bOrganizer || rDoc.IsUsed(*pFmt));
+ const sal_Bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.IsUsed(*pFmt));
if( !bUsed )
{
// Standard is no User template
- const USHORT nId = rDoc.GetDfltCharFmt() == pFmt ?
- USHORT( RES_POOLCHR_INET_NORMAL ):
+ const sal_uInt16 nId = rDoc.GetDfltCharFmt() == pFmt ?
+ sal_uInt16( RES_POOLCHR_INET_NORMAL ):
pFmt->GetPoolFmtId();
if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
? !(nId & USER_FMT)
@@ -2505,7 +2503,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( nSearchFamily == SFX_STYLE_FAMILY_PARA ||
nSearchFamily == SFX_STYLE_FAMILY_ALL )
{
- USHORT nSMask = nSrchMask;
+ sal_uInt16 nSMask = nSrchMask;
if( rDoc.get(IDocumentSettingAccess::HTML_MODE) )
{
// then only HTML-Template are of interest
@@ -2519,18 +2517,18 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
nSMask = SWSTYLEBIT_HTML;
}
- const USHORT nArrLen = rDoc.GetTxtFmtColls()->Count();
- for( USHORT i = 0; i < nArrLen; i++ )
+ const sal_uInt16 nArrLen = rDoc.GetTxtFmtColls()->Count();
+ for( sal_uInt16 i = 0; i < nArrLen; i++ )
{
SwTxtFmtColl* pColl = (*rDoc.GetTxtFmtColls())[ i ];
if(pColl->IsDefault())
continue;
- const BOOL bUsed = bOrganizer || rDoc.IsUsed(*pColl);
+ const sal_Bool bUsed = bOrganizer || rDoc.IsUsed(*pColl);
if( !(bIsSearchUsed && bUsed ))
{
- const USHORT nId = pColl->GetPoolFmtId();
+ const sal_uInt16 nId = pColl->GetPoolFmtId();
switch ( (nSMask & ~SFXSTYLEBIT_USED) )
{
case SFXSTYLEBIT_USERDEF:
@@ -2559,7 +2557,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( (nId & COLL_GET_RANGE_BITS) != COLL_HTML_BITS)
{
// but some we also want to see in this section
- BOOL bWeiter = TRUE;
+ sal_Bool bWeiter = sal_True;
switch( nId )
{
case RES_POOLCOLL_SENDADRESS: // --> ADDRESS
@@ -2576,7 +2574,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
case RES_POOLCOLL_STANDARD: // --> P
case RES_POOLCOLL_FOOTNOTE:
case RES_POOLCOLL_ENDNOTE:
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
if( bWeiter )
@@ -2595,7 +2593,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
aLst.Append( cPARA, pColl->GetName() );
}
- const BOOL bAll = nSMask == SFXSTYLEBIT_ALL;
+ const sal_Bool bAll = nSMask == SFXSTYLEBIT_ALL;
if ( bAll || (nSMask & ~SFXSTYLEBIT_USED) == SWSTYLEBIT_TEXT )
AppendStyleList(SwStyleNameMapper::GetTextUINameArray(),
bIsSearchUsed, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, cPARA );
@@ -2628,7 +2626,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( !bAll )
{
// then also the ones, that we are mapping:
- static USHORT aPoolIds[] = {
+ static sal_uInt16 aPoolIds[] = {
RES_POOLCOLL_SENDADRESS, // --> ADDRESS
RES_POOLCOLL_TABLE_HDLN, // --> TH
RES_POOLCOLL_TABLE, // --> TD
@@ -2646,7 +2644,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
0
};
- USHORT* pPoolIds = aPoolIds;
+ sal_uInt16* pPoolIds = aPoolIds;
String s;
while( *pPoolIds )
{
@@ -2662,8 +2660,8 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( nSearchFamily == SFX_STYLE_FAMILY_FRAME ||
nSearchFamily == SFX_STYLE_FAMILY_ALL )
{
- const USHORT nArrLen = rDoc.GetFrmFmts()->Count();
- for( USHORT i = 0; i < nArrLen; i++ )
+ const sal_uInt16 nArrLen = rDoc.GetFrmFmts()->Count();
+ for( sal_uInt16 i = 0; i < nArrLen; i++ )
{
SwFrmFmt* pFmt = (*rDoc.GetFrmFmts())[ i ];
@@ -2672,8 +2670,8 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
continue;
}
- const USHORT nId = pFmt->GetPoolFmtId();
- BOOL bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(*pFmt));
+ const sal_uInt16 nId = pFmt->GetPoolFmtId();
+ sal_Bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(*pFmt));
if( !bUsed )
{
if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
@@ -2698,13 +2696,13 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( nSearchFamily == SFX_STYLE_FAMILY_PAGE ||
nSearchFamily == SFX_STYLE_FAMILY_ALL )
{
- const USHORT nCount = rDoc.GetPageDescCnt();
- for(USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = rDoc.GetPageDescCnt();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
const SwPageDesc& rDesc =
const_cast<const SwDoc &>(rDoc).GetPageDesc(i);
- const USHORT nId = rDesc.GetPoolFmtId();
- BOOL bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rDesc));
+ const sal_uInt16 nId = rDesc.GetPoolFmtId();
+ sal_Bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rDesc));
if( !bUsed )
{
if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
@@ -2725,12 +2723,12 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
nSearchFamily == SFX_STYLE_FAMILY_ALL )
{
const SwNumRuleTbl& rNumTbl = rDoc.GetNumRuleTbl();
- for(USHORT i = 0; i < rNumTbl.Count(); ++i)
+ for(sal_uInt16 i = 0; i < rNumTbl.Count(); ++i)
{
const SwNumRule& rRule = *rNumTbl[ i ];
if( !rRule.IsAutoRule() )
{
- BOOL bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rRule) );
+ sal_Bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rRule) );
if( !bUsed )
{
if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
@@ -2762,7 +2760,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::Next()
if(aLst.Count() > 0 && nLastPos < aLst.Count())
{
mxIterSheet->PresetNameAndFamily(*aLst[nLastPos]);
- mxIterSheet->SetPhysical( FALSE );
+ mxIterSheet->SetPhysical( sal_False );
mxIterSheet->SetMask( nMask );
if(mxIterSheet->pSet)
{
@@ -2788,7 +2786,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::Find( const UniString& rName )
// new name is set, so determine its Data
mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName );
if( !mxStyleSheet->IsPhysical() )
- mxStyleSheet->SetPhysical( FALSE );
+ mxStyleSheet->SetPhysical( sal_False );
return mxStyleSheet.get();
}
@@ -2796,16 +2794,16 @@ SfxStyleSheetBase* SwStyleSheetIterator::Find( const UniString& rName )
}
void SwStyleSheetIterator::AppendStyleList(const SvStringsDtor& rList,
- BOOL bTestUsed,
- USHORT nSection, char cType )
+ sal_Bool bTestUsed,
+ sal_uInt16 nSection, char cType )
{
if( bTestUsed )
{
SwDoc& rDoc = ((SwDocStyleSheetPool*)pBasePool)->GetDoc();
- for ( USHORT i=0; i < rList.Count(); ++i )
+ for ( sal_uInt16 i=0; i < rList.Count(); ++i )
{
- BOOL bUsed = FALSE;
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(*rList[i], (SwGetPoolIdFromName)nSection);
+ sal_Bool bUsed = sal_False;
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(*rList[i], (SwGetPoolIdFromName)nSection);
switch ( nSection )
{
case nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL:
@@ -2827,7 +2825,7 @@ void SwStyleSheetIterator::AppendStyleList(const SvStringsDtor& rList,
}
}
else
- for ( USHORT i=0; i < rList.Count(); ++i )
+ for ( sal_uInt16 i=0; i < rList.Count(); ++i )
aLst.Append( cType, *rList[i] );
}
@@ -2841,7 +2839,7 @@ void SwStyleSheetIterator::Notify( SfxBroadcaster&, const SfxHint& rHint )
if (pStyle)
{
- USHORT nTmpPos = lcl_FindName( aLst, pStyle->GetFamily(),
+ sal_uInt16 nTmpPos = lcl_FindName( aLst, pStyle->GetFamily(),
pStyle->GetName() );
if( nTmpPos < aLst.Count() )
aLst.DeleteAndDestroy( nTmpPos );
diff --git a/sw/source/ui/app/mainwn.cxx b/sw/source/ui/app/mainwn.cxx
index c8d5c995cfda..5ad53a445541 100644
--- a/sw/source/ui/app/mainwn.cxx
+++ b/sw/source/ui/app/mainwn.cxx
@@ -55,7 +55,7 @@ static SvPtrarr *pProgressContainer = 0;
static SwProgress *lcl_SwFindProgress( SwDocShell *pDocShell )
{
- for ( USHORT i = 0; i < pProgressContainer->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pProgressContainer->Count(); ++i )
{
SwProgress *pTmp = (SwProgress*)(*pProgressContainer)[i];
if ( pTmp->pDocShell == pDocShell )
@@ -65,7 +65,7 @@ static SwProgress *lcl_SwFindProgress( SwDocShell *pDocShell )
}
-void StartProgress( USHORT nMessResId, long nStartValue, long nEndValue,
+void StartProgress( sal_uInt16 nMessResId, long nStartValue, long nEndValue,
SwDocShell *pDocShell )
{
if( !SW_MOD()->IsEmbeddedLoadSave() )
@@ -85,8 +85,8 @@ void StartProgress( USHORT nMessResId, long nStartValue, long nEndValue,
pProgress->pProgress = new SfxProgress( pDocShell,
SW_RESSTR(nMessResId),
nEndValue - nStartValue,
- FALSE,
- TRUE );
+ sal_False,
+ sal_True );
pProgress->nStartCount = 1;
pProgress->pDocShell = pDocShell;
pProgressContainer->Insert( (void*)pProgress, 0 );
@@ -112,7 +112,7 @@ void EndProgress( SwDocShell *pDocShell )
if( pProgressContainer && !SW_MOD()->IsEmbeddedLoadSave() )
{
SwProgress *pProgress = 0;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < pProgressContainer->Count(); ++i )
{
SwProgress *pTmp = (SwProgress*)(*pProgressContainer)[i];
@@ -138,7 +138,7 @@ void EndProgress( SwDocShell *pDocShell )
}
-void SetProgressText( USHORT nId, SwDocShell *pDocShell )
+void SetProgressText( sal_uInt16 nId, SwDocShell *pDocShell )
{
if( pProgressContainer && !SW_MOD()->IsEmbeddedLoadSave() )
{
diff --git a/sw/source/ui/app/makefile.mk b/sw/source/ui/app/makefile.mk
deleted file mode 100644
index 6048ad2ce8a0..000000000000
--- a/sw/source/ui/app/makefile.mk
+++ /dev/null
@@ -1,95 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=app
-
-LIBTARGET=NO
-
-# future: DEMO\...
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES =\
- app.src \
- mn.src \
- error.src
-
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-EXCEPTIONSFILES= \
- $(SLO)$/appenv.obj \
- $(SLO)$/apphdl.obj \
- $(SLO)$/applab.obj \
- $(SLO)$/appopt.obj \
- $(SLO)$/docsh.obj \
- $(SLO)$/docsh2.obj \
- $(SLO)$/docshdrw.obj \
- $(SLO)$/docshini.obj \
- $(SLO)$/docst.obj \
- $(SLO)$/docstyle.obj \
- $(SLO)$/mainwn.obj \
- $(SLO)$/swdll.obj \
- $(SLO)$/swmodul1.obj \
- $(SLO)$/swmodule.obj \
- $(SLO)$/swwait.obj
-
-LIB1TARGET= $(SLB)$/app.lib
-
-LIB1OBJFILES= \
- $(SLO)$/appenv.obj \
- $(SLO)$/apphdl.obj \
- $(SLO)$/applab.obj \
- $(SLO)$/appopt.obj \
- $(SLO)$/docsh.obj \
- $(SLO)$/docsh2.obj \
- $(SLO)$/docshdrw.obj \
- $(SLO)$/docshini.obj \
- $(SLO)$/docst.obj \
- $(SLO)$/docstyle.obj \
- $(SLO)$/mainwn.obj \
- $(SLO)$/swmodul1.obj \
- $(SLO)$/swwait.obj
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-$(SRS)$/app.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc
-
diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src
index c0cbcaee9616..9a120f5bf9fd 100644
--- a/sw/source/ui/app/mn.src
+++ b/sw/source/ui/app/mn.src
@@ -25,7 +25,349 @@
*
************************************************************************/
-#include "swmn.hrc"
+#include <svx/dialogs.hrc>
+#include <svx/globlmn.hrc>
+#include "cmdid.h"
+#include "app.hrc"
+#include "globals.hrc"
+#include "helpid.h"
+#include "popup.hrc"
+
+/* --------------------- F O R M A T --------------------------------- */
+#define SEPARATOR MenuItem { Separator = TRUE; }
+//define for ITEM_FORMAT_NUMBERING
+#define DEFINE_SLOTID_FOR_NUMBER_BULLETS FN_NUMBER_BULLETS
+#define MN_NUMBERING ITEM_FORMAT_NUMBERING
+
+#define MN_TXT\
+ MenuItem\
+ {\
+ ITEM_FORMAT_CHAR_DLG\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_PARA_DLG\
+ };\
+ MenuItem\
+ {\
+ Identifier = FN_FORMAT_PAGE_DLG ; \
+ HelpId = CMD_FN_FORMAT_PAGE_DLG ; \
+ Text [ en-US ] = "Pa~ge..." ; \
+ };
+
+
+#define MN_TEXT_ATTR\
+ MenuItem\
+ {\
+ ITEM_FORMAT_ATTR_CHAR_FONT\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_ATTR_CHAR_FONTHEIGHT\
+ };\
+ MenuItem\
+ {\
+ Identifier = MN_FORMAT_STYLE ; \
+ Command = ".uno:StyleMenu" ; \
+ Text [ en-US ] = "St~yle" ; \
+ SubMenu = Menu\
+ {\
+ ItemList = \
+ {\
+ MenuItem\
+ {\
+ ITEM_FORMAT_ATTR_CHAR_WEIGHT\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_ATTR_CHAR_POSTURE\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_ATTR_CHAR_OVERLINE\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_ATTR_CHAR_UNDERLINE\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_ATTR_CHAR_STRIKEOUT\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_ATTR_CHAR_SHADOWED\
+ };\
+ MenuItem\
+ {\
+ ITEM_FORMAT_ATTR_CHAR_CONTOUR\
+ };\
+ SEPARATOR ; \
+ MenuItem\
+ {\
+ Identifier = FN_SET_SUPER_SCRIPT ; \
+ HelpId = CMD_FN_SET_SUPER_SCRIPT ; \
+ Text [ en-US ] = "Superscript" ; \
+ };\
+ MenuItem\
+ {\
+ Identifier = FN_SET_SUB_SCRIPT ; \
+ HelpId = CMD_FN_SET_SUB_SCRIPT ; \
+ Text [ en-US ] = "Subscript" ; \
+ };\
+ };\
+ };\
+ };\
+ MenuItem\
+ {\
+ Identifier = MN_FORMAT_ALGN ; \
+ Command = ".uno:AlignTextMenu" ; \
+ Text [ en-US ] = "A~lignment" ; \
+ SubMenu = Menu\
+ {\
+ ItemList = \
+ {\
+ MenuItem\
+ {\
+ RadioCheck = TRUE ; \
+ ITEM_FORMAT_ATTR_PARA_ADJUST_LEFT\
+ };\
+ MenuItem\
+ {\
+ RadioCheck = TRUE ; \
+ ITEM_FORMAT_ATTR_PARA_ADJUST_RIGHT\
+ };\
+ MenuItem\
+ {\
+ RadioCheck = TRUE ; \
+ ITEM_FORMAT_ATTR_PARA_ADJUST_CENTER\
+ };\
+ MenuItem\
+ {\
+ Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \
+ HelpId = CMD_SID_ATTR_PARA_ADJUST_BLOCK ; \
+ RadioCheck = TRUE ; \
+ Text [ en-US ] = "Justified" ; \
+ };\
+ };\
+ };\
+ };\
+ MenuItem\
+ {\
+ Identifier = MN_FORMAT_LINESPACE ; \
+ Command = ".uno:LineSpacingMenu" ; \
+ Text [ en-US ] = "Line Spacing" ; \
+ _MenuItemFlags = MIB_RADIOCHECK ; \
+ SubMenu = Menu\
+ {\
+ ItemList = \
+ {\
+ MenuItem\
+ {\
+ RadioCheck = TRUE ; \
+ ITEM_FORMAT_PARA_LINESPACE_10\
+ };\
+ MenuItem\
+ {\
+ RadioCheck = TRUE ; \
+ ITEM_FORMAT_PARA_LINESPACE_15\
+ };\
+ MenuItem\
+ {\
+ RadioCheck = TRUE ; \
+ ITEM_FORMAT_PARA_LINESPACE_20\
+ };\
+ };\
+ };\
+ };
+
+/* --------------------- M E N U --------------------------------- */
+
+/*
+
+
+The application menu bar resource has become obsolete. You can now find the menu bar at the following
+location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml
+
+
+*/
+
+/* --------------------- D O C U M E N T -------------------------- */
+
+
+#define _MN_EDIT_FIELD \
+ MenuItem \
+ { \
+ Identifier = FN_EDIT_FIELD ; \
+ HelpId = CMD_FN_EDIT_FIELD ; \
+ Text [ en-US ] = "Fields..." ; \
+ };
+#define _MN_EDIT_FOOTNOTE \
+ MenuItem \
+ { \
+ Identifier = FN_EDIT_FOOTNOTE ; \
+ HelpId = CMD_FN_EDIT_FOOTNOTE ; \
+ Text [ en-US ] = "Footnote/Endnote~..." ; \
+ };
+ #define _MN_EDIT_IDX_ENTRY_DLG \
+ MenuItem \
+ { \
+ Identifier = FN_EDIT_IDX_ENTRY_DLG ; \
+ HelpId = CMD_FN_EDIT_IDX_ENTRY_DLG ; \
+ Text [ en-US ] = "Inde~x Entry..." ; \
+ };
+
+#define _MN_EDIT_REDLINE \
+ MenuItem \
+ { \
+ Identifier = FN_REDLINE_ACCEPT_DIRECT; \
+ HelpId = CMD_FN_REDLINE_ACCEPT_DIRECT ; \
+ Text [ en-US ] = "Accept Change" ; \
+ };\
+ MenuItem \
+ { \
+ Identifier = FN_REDLINE_REJECT_DIRECT ; \
+ HelpId = CMD_FN_REDLINE_REJECT_DIRECT ; \
+ Text [ en-US ] = "Reject Change" ; \
+ }; \
+ SEPARATOR ;
+#define _MN_EDIT_BIB_ENTRY_DLG \
+ MenuItem \
+ { \
+ Identifier = FN_EDIT_AUTH_ENTRY_DLG ; \
+ HelpId = CMD_FN_EDIT_AUTH_ENTRY_DLG ; \
+ Text [ en-US ] = "~Bibliography Entry..."; \
+ }; \
+ SEPARATOR ;
+
+#define _MN_EDIT_OPEN_HYPERLINK \
+ MenuItem \
+ { \
+ ITEM_OPEN_HYPERLINK \
+ };\
+ MenuItem \
+ { \
+ Identifier = FN_EDIT_HYPERLINK ; \
+ HelpId = CMD_FN_EDIT_HYPERLINK ; \
+ Text [ en-US ] = "Edit Hyperlink..."; \
+ }; \
+ MenuItem \
+ { \
+ Identifier = FN_COPY_HYPERLINK_LOCATION; \
+ HelpId = CMD_FN_COPY_HYPERLINK_LOCATION; \
+ Text [ en-US ] = "Copy Hyperlink ~Location"; \
+ }; \
+ MenuItem \
+ { \
+ Identifier = FN_REMOVE_HYPERLINK ; \
+ HelpId = CMD_FN_REMOVE_HYPERLINK ; \
+ Text [ en-US ] = "Remo~ve Hyperlink"; \
+ };
+
+#define _MN_EDIT_OPEN_SMARTTAGMENU \
+ MenuItem \
+ { \
+ ITEM_OPEN_SMARTTAGMENU \
+ };
+
+#define _MN_EDIT__HYPERLINK \
+ MenuItem\
+ {\
+ Identifier = FN_EDIT_HYPERLINK ; \
+ HelpId = CMD_FN_EDIT_HYPERLINK ; \
+ Text [ en-US ] = "~Edit Hyperlink" ; \
+ };
+
+#define _DEFAULT_TEXT_EDIT_ELEMENTS \
+ _MN_EDIT_FIELD \
+ _MN_EDIT_FOOTNOTE \
+ _MN_EDIT_IDX_ENTRY_DLG \
+ _MN_EDIT_BIB_ENTRY_DLG \
+ _MN_EDIT_REDLINE \
+ MenuItem \
+ { \
+ ITEM_POPUP_TEMPLATE_EDIT \
+ }; \
+ SEPARATOR ; \
+ _MN_EDIT_OPEN_HYPERLINK \
+ _MN_EDIT_OPEN_SMARTTAGMENU
+
+
+#define MN_RESET\
+ MenuItem\
+ {\
+ Identifier = FN_FORMAT_RESET ; \
+ HelpId = CMD_FN_FORMAT_RESET ; \
+ Text [ en-US ] = "~Default Formatting" ; \
+ };
+
+#define _NUMBERING_RELATED_MENU \
+ SEPARATOR ; \
+ MenuItem \
+ { \
+ Identifier = FN_NUMBER_NEWSTART; \
+ HelpId = CMD_FN_NUMBER_NEWSTART; \
+ Text[ en-US ] = "Restart Numbering"; \
+ }; \
+ MenuItem \
+ { \
+ Identifier = FN_NUM_CONTINUE; \
+ HelpId = CMD_FN_NUM_CONTINUE; \
+ Text[ en-US ] = "Continue previous numbering"; \
+ }; \
+ MenuItem \
+ { \
+ Identifier = FN_NUM_BULLET_UP; \
+ HelpId = CMD_FN_NUM_BULLET_UP; \
+ Text[ en-US ] = "Up One Level"; \
+ }; \
+ MenuItem \
+ { \
+ Identifier = FN_NUM_BULLET_DOWN; \
+ HelpId = CMD_FN_NUM_BULLET_DOWN; \
+ Text[ en-US ] = "Down One Level"; \
+ };
+
+#define BASE_TEXT_POPUPMENU_BEGIN \
+{ \
+ ItemList = \
+ { \
+ MN_RESET \
+ _NUMBERING_RELATED_MENU \
+ SEPARATOR ; \
+ MN_TEXT_ATTR \
+ SEPARATOR ; \
+ MN_TXT \
+ MN_NUMBERING \
+ ITEM_TRANSLITERATE_MENU \
+ SEPARATOR ;
+
+// not in Writer/Web
+#define BASE_TEXT_POPUPMENU_NOWEB \
+ MenuItem \
+ { \
+ Identifier = FN_UPDATE_CUR_TOX ; \
+ HelpId = CMD_FN_UPDATE_CUR_TOX ; \
+ Text [ en-US ] = "~Update Index/Table"; \
+ }; \
+ MenuItem \
+ { \
+ Identifier = FN_EDIT_CURRENT_TOX; \
+ HelpId = CMD_FN_EDIT_CURRENT_TOX; \
+ Text [ en-US ] = "~Edit Index/Table"; \
+ }; \
+ MenuItem \
+ { \
+ Identifier = FN_REMOVE_CUR_TOX; \
+ HelpId = CMD_FN_REMOVE_CUR_TOX; \
+ Text [ en-US ] = "Delete Index/Table"; \
+ }; \
+ SEPARATOR ;
+
+#define BASE_TEXT_POPUPMENU_END \
+ _DEFAULT_TEXT_EDIT_ELEMENTS \
+ }; \
+};
/*------------------------------------------------------------------------
Description: Menu Window
@@ -35,7 +377,7 @@
MenuItem\
{\
Identifier = FN_INSERT_CAPTION ;\
- HelpID = FN_INSERT_CAPTION ;\
+ HelpId = CMD_FN_INSERT_CAPTION ;\
Text [ en-US ] = "~Caption..." ;\
};
@@ -43,31 +385,30 @@
MenuItem\
{\
Identifier = FN_FORMAT_TABLE_DLG ; \
- HelpID = FN_FORMAT_TABLE_DLG ; \
+ HelpId = CMD_FN_FORMAT_TABLE_DLG ; \
Text [ en-US ] = "~Table..." ; \
};\
MenuItem\
{\
Identifier = FN_TABLE_MERGE_TABLE ; \
- HelpID = FN_TABLE_MERGE_TABLE ; \
+ HelpId = CMD_FN_TABLE_MERGE_TABLE ; \
Text [ en-US ] = "Merge Tables";\
};\
MenuItem\
{\
Identifier = FN_TABLE_SPLIT_TABLE ; \
- HelpID = FN_TABLE_SPLIT_TABLE ; \
+ HelpId = CMD_FN_TABLE_SPLIT_TABLE ; \
Text [ en-US ] = "~Split Table" ; \
};\
MenuItem\
{\
Identifier = FN_NUM_FORMAT_TABLE_DLG ; \
- HelpID = FN_NUM_FORMAT_TABLE_DLG ; \
+ HelpId = CMD_FN_NUM_FORMAT_TABLE_DLG ; \
Text [ en-US ] = "N~umber Format..." ; \
};\
MenuItem\
{\
Identifier = MN_CELL ; \
- HelpID = MN_CELL ; \
Command = ".uno:CellMenu" ; \
Text [ en-US ] = "~Cell" ; \
SubMenu = Menu\
@@ -77,45 +418,45 @@
MenuItem\
{\
Identifier = FN_TABLE_MERGE_CELLS ; \
- HelpID = FN_TABLE_MERGE_CELLS ; \
+ HelpId = CMD_FN_TABLE_MERGE_CELLS ; \
Text [ en-US ] = "~Merge" ; \
};\
MenuItem\
{\
Identifier = FN_TABLE_SPLIT_CELLS ; \
- HelpID = FN_TABLE_SPLIT_CELLS ; \
+ HelpId = CMD_FN_TABLE_SPLIT_CELLS ; \
Text [ en-US ] = "~Split..." ; \
};\
SEPARATOR ; \
MenuItem\
{\
Identifier = FN_TABLE_VERT_NONE ; \
- HelpID = FN_TABLE_VERT_NONE ; \
+ HelpId = CMD_FN_TABLE_VERT_NONE ; \
Text [ en-US ] = "~Top" ; \
};\
MenuItem\
{\
Identifier = FN_TABLE_VERT_CENTER ; \
- HelpID = FN_TABLE_VERT_CENTER ; \
+ HelpId = CMD_FN_TABLE_VERT_CENTER ; \
Text [ en-US ] = "C~enter" ; \
};\
MenuItem\
{\
Identifier = FN_TABLE_VERT_BOTTOM ; \
- HelpID = FN_TABLE_VERT_BOTTOM ; \
+ HelpId = CMD_FN_TABLE_VERT_BOTTOM ; \
Text [ en-US ] = "~Bottom" ; \
};\
SEPARATOR ; \
MenuItem\
{\
Identifier = FN_TABLE_SET_READ_ONLY_CELLS ; \
- HelpID = FN_TABLE_SET_READ_ONLY_CELLS ; \
+ HelpId = CMD_FN_TABLE_SET_READ_ONLY_CELLS ; \
Text [ en-US ] = "~Protect" ; \
};\
MenuItem\
{\
Identifier = FN_TABLE_UNSET_READ_ONLY_CELLS ; \
- HelpID = FN_TABLE_UNSET_READ_ONLY_CELLS ; \
+ HelpId = CMD_FN_TABLE_UNSET_READ_ONLY_CELLS ; \
Text [ en-US ] = "~Unprotect" ; \
};\
};\
@@ -136,44 +477,44 @@
MenuItem\
{\
Identifier = FN_TABLE_SET_ROW_HEIGHT ; \
- HelpID = FN_TABLE_SET_ROW_HEIGHT ; \
+ HelpId = CMD_FN_TABLE_SET_ROW_HEIGHT ; \
Text [ en-US ] = "~Height..." ; \
};\
MenuItem\
{\
Identifier = FN_TABLE_ROW_SPLIT;\
- HelpID = FN_TABLE_ROW_SPLIT ; \
+ HelpId = CMD_FN_TABLE_ROW_SPLIT ; \
Text [ en-US ] = "Allow Row to Break A~cross Pages and Columns" ; \
};\
MenuItem\
{\
Identifier = FN_TABLE_OPTIMAL_HEIGHT ; \
- HelpID = FN_TABLE_OPTIMAL_HEIGHT ; \
+ HelpId = CMD_FN_TABLE_OPTIMAL_HEIGHT ; \
Text [ en-US ] = "~Optimal Height" ; \
};\
MenuItem\
{\
Identifier = FN_TABLE_BALANCE_ROWS ; \
- HelpID = FN_TABLE_BALANCE_ROWS ; \
+ HelpId = CMD_FN_TABLE_BALANCE_ROWS ; \
Text [ en-US ] = "Space ~Equally" ; \
};\
SEPARATOR ; \
MenuItem\
{\
Identifier = FN_TABLE_SELECT_ROW ; \
- HelpID = FN_TABLE_SELECT_ROW ; \
+ HelpId = CMD_FN_TABLE_SELECT_ROW ; \
Text [ en-US ] = "~Select" ; \
};\
MenuItem\
{\
Identifier = FN_TABLE_INSERT_ROW_DLG ; \
- HelpID = FN_TABLE_INSERT_ROW_DLG ; \
+ HelpId = CMD_FN_TABLE_INSERT_ROW_DLG ; \
Text [ en-US ] = "~Insert..." ; \
};\
MenuItem\
{\
Identifier = FN_TABLE_DELETE_ROW ; \
- HelpID = FN_TABLE_DELETE_ROW ; \
+ HelpId = CMD_FN_TABLE_DELETE_ROW ; \
Text [ en-US ] = "~Delete" ; \
};\
};\
@@ -192,38 +533,38 @@
MenuItem\
{\
Identifier = FN_TABLE_SET_COL_WIDTH ; \
- HelpID = FN_TABLE_SET_COL_WIDTH ; \
+ HelpId = CMD_FN_TABLE_SET_COL_WIDTH ; \
Text [ en-US ] = "~Width..." ; \
};\
MenuItem\
{\
Identifier = FN_TABLE_ADJUST_CELLS ; \
- HelpID = FN_TABLE_ADJUST_CELLS ; \
+ HelpId = CMD_FN_TABLE_ADJUST_CELLS ; \
Text [ en-US ] = "~Optimal Width " ; \
};\
MenuItem\
{\
Identifier = FN_TABLE_BALANCE_CELLS ; \
- HelpID = FN_TABLE_BALANCE_CELLS ; \
+ HelpId = CMD_FN_TABLE_BALANCE_CELLS ; \
Text [ en-US ] = "Space ~Equally" ; \
};\
SEPARATOR ; \
MenuItem\
{\
Identifier = FN_TABLE_SELECT_COL ; \
- HelpID = FN_TABLE_SELECT_COL ; \
+ HelpId = CMD_FN_TABLE_SELECT_COL ; \
Text [ en-US ] = "~Select" ; \
};\
MenuItem\
{\
Identifier = FN_TABLE_INSERT_COL_DLG ; \
- HelpID = FN_TABLE_INSERT_COL_DLG ; \
+ HelpId = CMD_FN_TABLE_INSERT_COL_DLG ; \
Text [ en-US ] = "~Insert..." ; \
};\
MenuItem\
{\
Identifier = FN_TABLE_DELETE_COL ; \
- HelpID = FN_TABLE_DELETE_COL ; \
+ HelpId = CMD_FN_TABLE_DELETE_COL ; \
Text [ en-US ] = "~Delete" ; \
};\
};\
@@ -244,7 +585,7 @@
MenuItem\
{\
Identifier = FN_DRAWTEXT_ATTR_DLG ; \
- HelpID = FN_DRAWTEXT_ATTR_DLG ; \
+ HelpId = CMD_FN_DRAWTEXT_ATTR_DLG ; \
Text [ en-US ] = "Te~xt..." ; \
};
@@ -252,7 +593,7 @@
MenuItem\
{\
Identifier = FN_NAME_SHAPE ; \
- HelpID = FN_NAME_SHAPE ; \
+ HelpId = CMD_FN_NAME_SHAPE ; \
Text [ en-US ] = "Name..." ; \
};
@@ -260,7 +601,7 @@
MenuItem\
{\
Identifier = FN_TITLE_DESCRIPTION_SHAPE; \
- HelpID = FN_TITLE_DESCRIPTION_SHAPE; \
+ HelpId = CMD_FN_TITLE_DESCRIPTION_SHAPE; \
Text [ en-US ] = "Description..." ; \
};
@@ -268,7 +609,7 @@
MenuItem\
{\
Identifier = FN_FORMAT_FRAME_DLG ; \
- HelpID = FN_FORMAT_FRAME_DLG ; \
+ HelpId = CMD_FN_FORMAT_FRAME_DLG ; \
Text [ en-US ] = "~Frame..." ; \
};
@@ -323,13 +664,13 @@
MenuItem\
{\
Identifier = FN_FRAME_UP ; \
- HelpID = FN_FRAME_UP ; \
+ HelpId = CMD_FN_FRAME_UP ; \
Text [ en-US ] = "Bring ~Forward" ; \
};\
MenuItem\
{\
Identifier = FN_FRAME_DOWN ; \
- HelpID = FN_FRAME_DOWN ; \
+ HelpId = CMD_FN_FRAME_DOWN ; \
Text [ en-US ] = "Send Back~ward" ; \
};
@@ -409,45 +750,45 @@
MenuItem\
{\
Identifier = FN_REPLY ;\
- HelpID = FN_DELETE_NOTE ;\
+ HelpID = CMD_FN_REPLY ;\
Text [ en-US ] = "Reply" ;\
};\
SEPARATOR ; \
MenuItem\
{\
- Identifier = FN_DELETE_NOTE ;\
- HelpID = FN_DELETE_NOTE ;\
+ Identifier = FN_DELETE_COMMENT ;\
+ HelpID = CMD_FN_DELETE_COMMENT ;\
Text [ en-US ] = "Delete ~Comment" ;\
};\
MenuItem\
{\
Identifier = FN_DELETE_NOTE_AUTHOR ;\
- HelpID = FN_DELETE_NOTE_AUTHOR ;\
+ HelpId = CMD_FN_DELETE_NOTE_AUTHOR ;\
Text [ en-US ] = "Delete ~All Comments by $1" ;\
};\
MenuItem\
{\
Identifier = FN_DELETE_ALL_NOTES ;\
- HelpID = FN_DELETE_ALL_NOTES ;\
+ HelpId = CMD_FN_DELETE_ALL_NOTES ;\
Text [ en-US ] = "~Delete All Comments" ;\
};\
/*
MenuItem\
{\
Identifier = FN_HIDE_NOTE ;\
- HelpID = FN_HIDE_NOTE ;\
+ HelpId = CMD_FN_HIDE_NOTE ;\
Text [ en-US ] = "~Hide comment" ;\
};\
MenuItem\
{\
Identifier = FN_HIDE_NOTE_AUTHOR ;\
- HelpID = FN_HIDE_NOTE_AUTHOR ;\
+ HelpId = CMD_FN_HIDE_NOTE_AUTHOR ;\
Text [ en-US ] = "Hide ~author" ;\
};\
MenuItem\
{\
Identifier = FN_HIDE_ALL_NOTES ;\
- HelpID = FN_HIDE_ALL_NOTES ;\
+ HelpId = CMD_FN_HIDE_ALL_NOTES ;\
Text [ en-US ] = "Hide all ~comments" ;\
};
*/
@@ -490,13 +831,13 @@ Menu MN_TAB_POPUPMENU
MenuItem
{
Identifier = FN_VIEW_TABLEGRID ;
- HelpID = FN_VIEW_TABLEGRID ;
+ HelpId = CMD_FN_VIEW_TABLEGRID ;
Text [ en-US ] = "Table Boundaries" ;
};
MenuItem
{
Identifier = FN_SET_MODOPT_TBLNUMFMT ;
- HelpID = FN_SET_MODOPT_TBLNUMFMT ;
+ HelpId = CMD_FN_SET_MODOPT_TBLNUMFMT ;
Text [ en-US ] = "~Number Recognition";
};
SEPARATOR ;
@@ -508,7 +849,7 @@ Menu MN_TAB_POPUPMENU
MenuItem\
{\
Identifier = FN_FRAME_WRAP_CONTOUR ; \
- HelpID = FN_FRAME_WRAP_CONTOUR ; \
+ HelpId = CMD_FN_FRAME_WRAP_CONTOUR ; \
Text [ en-US ] = "~Contour" ; \
};
@@ -516,7 +857,7 @@ Menu MN_TAB_POPUPMENU
MenuItem\
{\
Identifier = SID_CONTOUR_DLG ; \
- HelpID = SID_CONTOUR_DLG ; \
+ HelpId = CMD_SID_CONTOUR_DLG ; \
Text [ en-US ] = "~Edit Contour..." ; \
};
@@ -527,7 +868,6 @@ Menu MN_TAB_POPUPMENU
MenuItem\
{\
Identifier = MN_WRAP ; \
- HelpID = MN_WRAP ; \
Command = ".uno:WrapMenu" ; \
Text [ en-US ] = "~Wrap" ; \
SubMenu = Menu\
@@ -538,35 +878,35 @@ Menu MN_TAB_POPUPMENU
{\
RadioCheck = TRUE ; \
Identifier = FN_FRAME_NOWRAP ; \
- HelpID = FN_FRAME_NOWRAP ; \
+ HelpId = CMD_FN_FRAME_NOWRAP ; \
Text [ en-US ] = "~No Wrap" ; \
};\
MenuItem\
{\
RadioCheck = TRUE ; \
Identifier = FN_FRAME_WRAP ; \
- HelpID = FN_FRAME_WRAP ; \
+ HelpId = CMD_FN_FRAME_WRAP ; \
Text [ en-US ] = "~Page Wrap" ; \
};\
MenuItem\
{\
RadioCheck = TRUE ; \
Identifier = FN_FRAME_WRAP_IDEAL ; \
- HelpID = FN_FRAME_WRAP_IDEAL ; \
+ HelpId = CMD_FN_FRAME_WRAP_IDEAL ; \
Text [ en-US ] = "~Optimal Page Wrap" ; \
};\
MenuItem\
{\
RadioCheck = TRUE ; \
Identifier = FN_FRAME_WRAPTHRU ; \
- HelpID = FN_FRAME_WRAPTHRU ; \
+ HelpId = CMD_FN_FRAME_WRAPTHRU ; \
Text [ en-US ] = "~Wrap Through" ; \
};\
MenuItem\
{\
RadioCheck = TRUE ; \
Identifier = FN_FRAME_WRAPTHRU_TRANSP ; \
- HelpID = FN_FRAME_WRAPTHRU_TRANSP ; \
+ HelpId = CMD_FN_FRAME_WRAPTHRU_TRANSP ; \
Text [ en-US ] = "In ~Background" ; \
};\
SEPARATOR ; \
@@ -576,7 +916,7 @@ Menu MN_TAB_POPUPMENU
{\
Checkable = TRUE ; \
Identifier = FN_WRAP_ANCHOR_ONLY ; \
- HelpID = FN_WRAP_ANCHOR_ONLY ; \
+ HelpId = CMD_FN_WRAP_ANCHOR_ONLY ; \
Text [ en-US ] = "~First Paragraph" ; \
};\
};\
@@ -594,7 +934,6 @@ String MN_DRAW_POPUPMENU
MenuItem\
{\
Identifier = MN_WRAP ; \
- HelpID = MN_WRAP ; \
Command = ".uno:WrapMenu" ; \
SubMenu = Menu\
{\
@@ -604,35 +943,35 @@ String MN_DRAW_POPUPMENU
{\
RadioCheck = TRUE ; \
Identifier = FN_FRAME_NOWRAP ; \
- HelpID = FN_FRAME_NOWRAP ; \
+ HelpId = CMD_FN_FRAME_NOWRAP ; \
Text [ en-US ] = "~No Wrap" ; \
};\
MenuItem\
{\
RadioCheck = TRUE ; \
Identifier = FN_FRAME_WRAP ; \
- HelpID = FN_FRAME_WRAP ; \
+ HelpId = CMD_FN_FRAME_WRAP ; \
Text [ en-US ] = "~Page Wrap" ; \
};\
MenuItem\
{\
RadioCheck = TRUE ; \
Identifier = FN_FRAME_WRAP_IDEAL ; \
- HelpID = FN_FRAME_WRAP_IDEAL ; \
+ HelpId = CMD_FN_FRAME_WRAP_IDEAL ; \
Text [ en-US ] = "~Optimal Page Wrap" ; \
};\
MenuItem\
{\
RadioCheck = TRUE ; \
Identifier = FN_FRAME_WRAPTHRU ; \
- HelpID = FN_FRAME_WRAPTHRU ; \
+ HelpId = CMD_FN_FRAME_WRAPTHRU ; \
Text [ en-US ] = "~Wrap Through" ; \
};\
MenuItem\
{\
RadioCheck = TRUE ; \
Identifier = FN_FRAME_WRAPTHRU_TRANSP ; \
- HelpID = FN_FRAME_WRAPTHRU_TRANSP ; \
+ HelpId = CMD_FN_FRAME_WRAPTHRU_TRANSP ; \
Text [ en-US ] = "In ~Background" ; \
};\
SEPARATOR ; \
@@ -641,14 +980,14 @@ String MN_DRAW_POPUPMENU
{\
Checkable = TRUE ; \
Identifier = FN_WRAP_ANCHOR_ONLY ; \
- HelpID = FN_WRAP_ANCHOR_ONLY ; \
+ HelpId = CMD_FN_WRAP_ANCHOR_ONLY ; \
Text [ en-US ] = "~First Paragraph" ; \
};\
SEPARATOR ; \
MenuItem\
{\
Identifier = FN_DRAW_WRAP_DLG ; \
- HelpID = FN_DRAW_WRAP_DLG ; \
+ HelpId = CMD_FN_DRAW_WRAP_DLG ; \
Text [ en-US ] = "~Edit..." ; \
};\
};\
@@ -667,7 +1006,7 @@ String MN_DRAW_POPUPMENU
{\
RadioCheck = TRUE ; \
Identifier = FN_TOOL_ANKER_FRAME ; \
- HelpID = FN_TOOL_ANKER_FRAME ; \
+ HelpId = CMD_FN_TOOL_ANKER_FRAME ; \
Text [ en-US ] = "To ~Frame" ; \
};
@@ -675,7 +1014,7 @@ String MN_DRAW_POPUPMENU
MenuItem\
{\
Identifier = FN_TOOL_ANKER ; \
- HelpID = FN_TOOL_ANKER ; \
+ HelpId = CMD_FN_TOOL_ANKER ; \
Command = ".uno:AnchorMenu" ; \
Text [ en-US ] = "An~chor" ; \
SubMenu = Menu\
@@ -686,28 +1025,28 @@ String MN_DRAW_POPUPMENU
{\
RadioCheck = TRUE ; \
Identifier = FN_TOOL_ANKER_PAGE ; \
- HelpID = FN_TOOL_ANKER_PAGE ; \
+ HelpId = CMD_FN_TOOL_ANKER_PAGE ; \
Text [ en-US ] = "To P~age" ; \
};\
MenuItem\
{\
RadioCheck = TRUE ; \
Identifier = FN_TOOL_ANKER_PARAGRAPH ; \
- HelpID = FN_TOOL_ANKER_PARAGRAPH ; \
+ HelpId = CMD_FN_TOOL_ANKER_PARAGRAPH ; \
Text [ en-US ] = "To ~Paragraph" ; \
};\
MenuItem\
{\
RadioCheck = TRUE ; \
Identifier = FN_TOOL_ANKER_AT_CHAR ; \
- HelpID = FN_TOOL_ANKER_AT_CHAR ; \
+ HelpId = CMD_FN_TOOL_ANKER_AT_CHAR ; \
Text [ en-US ] = "To ~Character" ; \
};\
MenuItem\
{\
RadioCheck = TRUE ; \
Identifier = FN_TOOL_ANKER_CHAR ; \
- HelpID = FN_TOOL_ANKER_CHAR ; \
+ HelpId = CMD_FN_TOOL_ANKER_CHAR ; \
Text [ en-US ] = "As C~haracter" ; \
};\
MN_AT_FRAME\
@@ -793,7 +1132,7 @@ Menu MN_DRWTXT_POPUPMENU
MenuItem\
{\
Identifier = FN_DELETE_COMMENT ;\
- HelpID = FN_DELETE_COMMENT ;\
+ HelpId = CMD_FN_DELETE_COMMENT ;\
Text [ en-US ] = "Delete ~Changes Note" ;\
};\
@@ -870,7 +1209,6 @@ String MN_GRF_POPUPMENU
MenuItem\
{\
Identifier = MN_FORMAT_FRM_HORZ ; \
- HelpID = MN_FORMAT_FRM_HORZ ; \
Command = ".uno:AlignFrameMenu" ; \
SubMenu = Menu\
{\
@@ -879,38 +1217,38 @@ String MN_GRF_POPUPMENU
MenuItem\
{\
Identifier = FN_FRAME_ALIGN_HORZ_LEFT ; \
- HelpID = FN_FRAME_ALIGN_HORZ_LEFT ; \
+ HelpId = CMD_FN_FRAME_ALIGN_HORZ_LEFT ; \
Text [ en-US ] = "~Left" ; \
};\
MenuItem\
{\
Identifier = FN_FRAME_ALIGN_HORZ_CENTER ; \
- HelpID = FN_FRAME_ALIGN_HORZ_CENTER ; \
+ HelpId = CMD_FN_FRAME_ALIGN_HORZ_CENTER ; \
Text [ en-US ] = "~Centered" ; \
};\
MenuItem\
{\
Identifier = FN_FRAME_ALIGN_HORZ_RIGHT ; \
- HelpID = FN_FRAME_ALIGN_HORZ_RIGHT ; \
+ HelpId = CMD_FN_FRAME_ALIGN_HORZ_RIGHT ; \
Text [ en-US ] = "~Right" ; \
};\
SEPARATOR ; \
MenuItem\
{\
Identifier = FN_FRAME_ALIGN_VERT_TOP ; \
- HelpID = FN_FRAME_ALIGN_VERT_TOP ; \
+ HelpId = CMD_FN_FRAME_ALIGN_VERT_TOP ; \
Text [ en-US ] = "Base at ~Top" ; \
};\
MenuItem\
{\
Identifier = FN_FRAME_ALIGN_VERT_CENTER ; \
- HelpID = FN_FRAME_ALIGN_VERT_CENTER ; \
+ HelpId = CMD_FN_FRAME_ALIGN_VERT_CENTER ; \
Text [ en-US ] = "Base in ~Middle" ; \
};\
MenuItem\
{\
Identifier = FN_FRAME_ALIGN_VERT_BOTTOM ; \
- HelpID = FN_FRAME_ALIGN_VERT_BOTTOM ; \
+ HelpId = CMD_FN_FRAME_ALIGN_VERT_BOTTOM ; \
Text [ en-US ] = "Base at ~Bottom" ; \
};\
};\
@@ -931,13 +1269,13 @@ Menu MN_GRF_POPUPMENU
MenuItem
{
Identifier = FN_FORMAT_GRAFIC_DLG ;
- HelpID = FN_FORMAT_GRAFIC_DLG ;
+ HelpId = CMD_FN_FORMAT_GRAFIC_DLG ;
Text [ en-US ] = "~Picture..." ;
};
MenuItem
{
Identifier = FN_SAVE_GRAPHIC;
- HelpID = FN_SAVE_GRAPHIC;
+ HelpId = CMD_FN_SAVE_GRAPHIC;
Text [ en-US ] = "Save Graphics..." ;
};
MN_FRM_CAPTION_ITEM
@@ -945,7 +1283,7 @@ Menu MN_GRF_POPUPMENU
MenuItem
{
Identifier = FN_EXTERNAL_EDIT ;
- HelpID = FN_EXTERNAL_EDIT ;
+ HelpID = CMD_FN_EXTERNAL_EDIT ;
Text [ en-US ] = "Edit with External Tool...";
};
SEPARATOR;
@@ -972,13 +1310,13 @@ String MN_OLE_POPUPMENU
MenuItem\
{\
Identifier = FN_EXPORT_OLE_AS_PDF ;\
- HelpID = FN_EXPORT_OLE_AS_PDF ; \
+ HelpID = CMD_FN_EXPORT_OLE_AS_PDF ; \
Text [ en-US ] = "Export as P~DF..." ; \
};\
MenuItem\
{\
Identifier = FN_EXPORT_OLE_AS_GRAPHIC ;\
- HelpID = FN_EXPORT_OLE_AS_GRAPHIC ; \
+ HelpID = CMD_FN_EXPORT_OLE_AS_GRAPHIC ; \
Text [ en-US ] = "Export as JPG..." ; \
};\
};\
@@ -997,7 +1335,7 @@ Menu MN_OLE_POPUPMENU
MenuItem
{
Identifier = FN_FORMAT_FRAME_DLG ;
- HelpID = FN_FORMAT_FRAME_DLG ;
+ HelpId = CMD_FN_FORMAT_FRAME_DLG ;
Text [ en-US ] = "Object..." ;
};
SEPARATOR ;
@@ -1040,13 +1378,13 @@ Menu MN_PPREVIEW_POPUPMENU
MenuItem
{
Identifier = FN_PAGEUP ;
- HelpID = FN_PAGEUP ;
+ HelpId = CMD_FN_PAGEUP ;
Text [ en-US ] = "Previous Page" ;
};
MenuItem
{
Identifier = FN_PAGEDOWN ;
- HelpID = FN_PAGEDOWN ;
+ HelpId = CMD_FN_PAGEDOWN ;
Text [ en-US ] = "Next Page" ;
};
MenuItem
@@ -1057,14 +1395,14 @@ Menu MN_PPREVIEW_POPUPMENU
MenuItem
{
Identifier = FN_PRINT_PAGEPREVIEW ;
- HelpID = FN_PRINT_PAGEPREVIEW ;
+ HelpId = CMD_FN_PRINT_PAGEPREVIEW ;
Text [ en-US ] = "Print" ;
};
SEPARATOR ;
MenuItem
{
Identifier = SID_PRINTPREVIEW;
- HelpID = SID_PRINTPREVIEW;
+ HelpId = CMD_SID_PRINTPREVIEW;
Text [ en-US ] = "Close Preview" ;
};
};
diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx
index 47f04dd50157..aac2ba7df26e 100644
--- a/sw/source/ui/app/swmodul1.cxx
+++ b/sw/source/ui/app/swmodul1.cxx
@@ -145,7 +145,7 @@ SwView* SwModule::GetNextView(SwView* pView)
{
OSL_ENSURE(PTR_CAST(SwView, pView),"return no SwView");
const TypeId aTypeId = TYPE(SwView);
- SwView* pNView = (SwView*)SfxViewShell::GetNext(*pView, &aTypeId, TRUE);
+ SwView* pNView = (SwView*)SfxViewShell::GetNext(*pView, &aTypeId, sal_True);
return pNView;
}
@@ -222,7 +222,7 @@ void SwModule::ApplyUsrPref(const SwViewOption &rUsrPref, SwView* pActView,
pPref->SetIdle(sal_True);
}
-void SwModule::ApplyUserMetric( FieldUnit eMetric, BOOL bWeb )
+void SwModule::ApplyUserMetric( FieldUnit eMetric, sal_Bool bWeb )
{
SwMasterUsrPref* pPref;
if(bWeb)
@@ -258,7 +258,7 @@ void SwModule::ApplyUserMetric( FieldUnit eMetric, BOOL bWeb )
}
}
-void SwModule::ApplyRulerMetric( FieldUnit eMetric, BOOL bHorizontal, BOOL bWeb )
+void SwModule::ApplyRulerMetric( FieldUnit eMetric, sal_Bool bHorizontal, sal_Bool bWeb )
{
SwMasterUsrPref* pPref;
if(bWeb)
@@ -297,7 +297,7 @@ void SwModule::ApplyRulerMetric( FieldUnit eMetric, BOOL bHorizontal, BOOL bWeb
set the usrpref 's char unit attribute and set ruler
's unit as char if the "apply char unit" is checked
--------------------------------------------------*/
-void SwModule::ApplyUserCharUnit(BOOL bApplyChar, BOOL bWeb)
+void SwModule::ApplyUserCharUnit(sal_Bool bApplyChar, sal_Bool bWeb)
{
SwMasterUsrPref* pPref;
if(bWeb)
@@ -312,12 +312,12 @@ void SwModule::ApplyUserCharUnit(BOOL bApplyChar, BOOL bWeb)
GetUsrPref(sal_False);
pPref = pUsrPref;
}
- BOOL bOldApplyCharUnit = pPref->IsApplyCharUnit();
- BOOL bHasChanged = FALSE;
+ sal_Bool bOldApplyCharUnit = pPref->IsApplyCharUnit();
+ sal_Bool bHasChanged = sal_False;
if(bOldApplyCharUnit != bApplyChar)
{
pPref->SetApplyCharUnit(bApplyChar);
- bHasChanged = TRUE;
+ bHasChanged = sal_True;
}
if( !bHasChanged )
@@ -369,11 +369,11 @@ SwPrintOptions* SwModule::GetPrtOptions(sal_Bool bWeb)
{
if(bWeb && !pWebPrtOpt)
{
- pWebPrtOpt = new SwPrintOptions(TRUE);
+ pWebPrtOpt = new SwPrintOptions(sal_True);
}
else if(!bWeb && !pPrtOpt)
{
- pPrtOpt = new SwPrintOptions(FALSE);
+ pPrtOpt = new SwPrintOptions(sal_False);
}
return bWeb ? pWebPrtOpt : pPrtOpt;
@@ -386,7 +386,7 @@ SwChapterNumRules* SwModule::GetChapterNumRules()
return pChapterNumRules;
}
-void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, BOOL /*bOnlyIfAvailable*/)
+void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, sal_Bool /*bOnlyIfAvailable*/)
{
Reference<XFrame> xFrame = rView.GetViewFrame()->GetFrame().GetFrameInterface();
Reference<XDispatchProvider> xDP(xFrame, uno::UNO_QUERY);
diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx
index cd525952deac..09154f98e3fd 100644
--- a/sw/source/ui/app/swmodule.cxx
+++ b/sw/source/ui/app/swmodule.cxx
@@ -426,7 +426,7 @@ void SwDLL::RegisterControls()
::avmedia::MediaPlayer::RegisterChildWindow(0, pMod);
SvxSmartTagsControl::RegisterControl(SID_OPEN_SMARTTAGMENU, pMod);
- ::sfx2::TaskPaneWrapper::RegisterChildWindow( FALSE, pMod );
+ ::sfx2::TaskPaneWrapper::RegisterChildWindow( sal_False, pMod );
}
diff --git a/sw/source/ui/app/swwait.cxx b/sw/source/ui/app/swwait.cxx
index 86a12833817b..e85e81732269 100644
--- a/sw/source/ui/app/swwait.cxx
+++ b/sw/source/ui/app/swwait.cxx
@@ -37,31 +37,31 @@
#include <swwait.hxx>
-void SwDocShell::EnterWait( BOOL bLockDispatcher )
+void SwDocShell::EnterWait( sal_Bool bLockDispatcher )
{
- SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, FALSE );
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, sal_False );
while ( pFrame )
{
pFrame->GetWindow().EnterWait();
if ( bLockDispatcher )
- pFrame->GetDispatcher()->Lock( TRUE );
- pFrame = SfxViewFrame::GetNext( *pFrame, this, FALSE );
+ pFrame->GetDispatcher()->Lock( sal_True );
+ pFrame = SfxViewFrame::GetNext( *pFrame, this, sal_False );
}
}
-void SwDocShell::LeaveWait( BOOL bLockDispatcher )
+void SwDocShell::LeaveWait( sal_Bool bLockDispatcher )
{
- SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, FALSE );
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, sal_False );
while ( pFrame )
{
pFrame->GetWindow().LeaveWait();
if ( bLockDispatcher )
- pFrame->GetDispatcher()->Lock( FALSE );
- pFrame = SfxViewFrame::GetNext( *pFrame, this, FALSE );
+ pFrame->GetDispatcher()->Lock( sal_False );
+ pFrame = SfxViewFrame::GetNext( *pFrame, this, sal_False );
}
}
-SwWait::SwWait( SwDocShell &rDocShell, BOOL bLockDispatcher ) :
+SwWait::SwWait( SwDocShell &rDocShell, sal_Bool bLockDispatcher ) :
rDoc ( rDocShell ),
bLock( bLockDispatcher )
{
diff --git a/sw/source/ui/cctrl/actctrl.cxx b/sw/source/ui/cctrl/actctrl.cxx
index 655e2c5393d8..105691be41ce 100644
--- a/sw/source/ui/cctrl/actctrl.cxx
+++ b/sw/source/ui/cctrl/actctrl.cxx
@@ -45,7 +45,7 @@ long NumEditAction::Notify( NotifyEvent& rNEvt )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
const KeyCode aKeyCode = pKEvt->GetKeyCode();
- const USHORT nModifier = aKeyCode.GetModifier();
+ const sal_uInt16 nModifier = aKeyCode.GetModifier();
if( aKeyCode.GetCode() == KEY_RETURN &&
!nModifier)
{
@@ -71,12 +71,12 @@ NoSpaceEdit::~NoSpaceEdit()
void NoSpaceEdit::KeyInput(const KeyEvent& rEvt)
{
- BOOL bCallParent = TRUE;
+ sal_Bool bCallParent = sal_True;
if(rEvt.GetCharCode())
{
String sKey = rEvt.GetCharCode();
if( STRING_NOTFOUND != sForbiddenChars.Search(sKey))
- bCallParent = FALSE;
+ bCallParent = sal_False;
}
if(bCallParent)
Edit::KeyInput(rEvt);
@@ -86,11 +86,11 @@ void NoSpaceEdit::Modify()
{
Selection aSel = GetSelection();
String sTemp = GetText();
- for(USHORT i = 0; i < sForbiddenChars.Len(); i++)
+ for(sal_uInt16 i = 0; i < sForbiddenChars.Len(); i++)
{
sTemp.EraseAllChars( sForbiddenChars.GetChar(i) );
}
- USHORT nDiff = GetText().Len() - sTemp.Len();
+ sal_uInt16 nDiff = GetText().Len() - sTemp.Len();
if(nDiff)
{
aSel.setMin(aSel.getMin() - nDiff);
@@ -109,7 +109,7 @@ ReturnActionEdit::~ReturnActionEdit()
void ReturnActionEdit::KeyInput( const KeyEvent& rEvt)
{
const KeyCode aKeyCode = rEvt.GetKeyCode();
- const USHORT nModifier = aKeyCode.GetModifier();
+ const sal_uInt16 nModifier = aKeyCode.GetModifier();
if( aKeyCode.GetCode() == KEY_RETURN &&
!nModifier)
{
diff --git a/sw/source/ui/cctrl/makefile.mk b/sw/source/ui/cctrl/makefile.mk
deleted file mode 100644
index 9a72754367f4..000000000000
--- a/sw/source/ui/cctrl/makefile.mk
+++ /dev/null
@@ -1,59 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=cctrl
-
-AUTOSEG=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-CXXFILES = \
- actctrl.cxx \
- popbox.cxx \
- swlbox.cxx
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-EXCEPTIONSFILES = \
- $(SLO)$/actctrl.obj \
- $(SLO)$/popbox.obj \
- $(SLO)$/swlbox.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/cctrl/popbox.cxx b/sw/source/ui/cctrl/popbox.cxx
index 62aa59d9d5f7..6e457738fcf2 100644
--- a/sw/source/ui/cctrl/popbox.cxx
+++ b/sw/source/ui/cctrl/popbox.cxx
@@ -58,8 +58,8 @@ long SwHelpToolBox::DoubleClick( ToolBox* pCaller )
{
// No doubleclick on button
if( 0 == pCaller->GetCurItemId() && aDoubleClickLink.Call(0) )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
SwHelpToolBox::~SwHelpToolBox() {}
diff --git a/sw/source/ui/cctrl/swlbox.cxx b/sw/source/ui/cctrl/swlbox.cxx
index 4d01fe604d42..e11ff0b7630e 100644
--- a/sw/source/ui/cctrl/swlbox.cxx
+++ b/sw/source/ui/cctrl/swlbox.cxx
@@ -42,15 +42,15 @@ SV_IMPL_PTRARR(SwEntryLst, SwBoxEntry*)
// Description: ListboxElement
SwBoxEntry::SwBoxEntry() :
- bModified(FALSE),
- bNew(FALSE),
+ bModified(sal_False),
+ bNew(sal_False),
nId(LISTBOX_APPEND)
{
}
-SwBoxEntry::SwBoxEntry(const String& aNam, USHORT nIdx) :
- bModified(FALSE),
- bNew(FALSE),
+SwBoxEntry::SwBoxEntry(const String& aNam, sal_uInt16 nIdx) :
+ bModified(sal_False),
+ bNew(sal_False),
aName(aNam),
nId(nIdx)
{
@@ -64,13 +64,13 @@ SwBoxEntry::SwBoxEntry(const SwBoxEntry& rOld) :
{
}
-SwComboBox::SwComboBox(Window* pParent, const ResId& rId, USHORT nStyleBits ):
+SwComboBox::SwComboBox(Window* pParent, const ResId& rId, sal_uInt16 nStyleBits ):
ComboBox(pParent, rId),
nStyle(nStyleBits)
{
// create administration for the resource's Stringlist
- USHORT nSize = GetEntryCount();
- for( USHORT i=0; i < nSize; ++i )
+ sal_uInt16 nSize = GetEntryCount();
+ for( sal_uInt16 i=0; i < nSize; ++i )
{
const SwBoxEntry* pTmp = new SwBoxEntry(ComboBox::GetEntry(i), i);
aEntryLst.Insert(pTmp, aEntryLst.Count() );
@@ -87,7 +87,7 @@ void SwComboBox::InsertEntry(const SwBoxEntry& rEntry)
InsertSorted(new SwBoxEntry(rEntry));
}
-void SwComboBox::RemoveEntry(USHORT nPos)
+void SwComboBox::RemoveEntry(sal_uInt16 nPos)
{
if(nPos >= aEntryLst.Count())
return;
@@ -105,12 +105,12 @@ void SwComboBox::RemoveEntry(USHORT nPos)
aDelEntryLst.C40_INSERT(SwBoxEntry, pEntry, aDelEntryLst.Count());
}
-USHORT SwComboBox::GetEntryPos(const SwBoxEntry& rEntry) const
+sal_uInt16 SwComboBox::GetEntryPos(const SwBoxEntry& rEntry) const
{
return ComboBox::GetEntryPos(rEntry.aName);
}
-const SwBoxEntry& SwComboBox::GetEntry(USHORT nPos) const
+const SwBoxEntry& SwComboBox::GetEntry(sal_uInt16 nPos) const
{
if(nPos < aEntryLst.Count())
return *aEntryLst[nPos];
@@ -118,12 +118,12 @@ const SwBoxEntry& SwComboBox::GetEntry(USHORT nPos) const
return aDefault;
}
-USHORT SwComboBox::GetRemovedCount() const
+sal_uInt16 SwComboBox::GetRemovedCount() const
{
return aDelEntryLst.Count();
}
-const SwBoxEntry& SwComboBox::GetRemovedEntry(USHORT nPos) const
+const SwBoxEntry& SwComboBox::GetRemovedEntry(sal_uInt16 nPos) const
{
if(nPos < aDelEntryLst.Count())
return *aDelEntryLst[nPos];
@@ -134,13 +134,13 @@ const SwBoxEntry& SwComboBox::GetRemovedEntry(USHORT nPos) const
void SwComboBox::InsertSorted(SwBoxEntry* pEntry)
{
ComboBox::InsertEntry(pEntry->aName);
- USHORT nPos = ComboBox::GetEntryPos(pEntry->aName);
+ sal_uInt16 nPos = ComboBox::GetEntryPos(pEntry->aName);
aEntryLst.C40_INSERT(SwBoxEntry, pEntry, nPos);
}
void SwComboBox::KeyInput( const KeyEvent& rKEvt )
{
- USHORT nChar = rKEvt.GetCharCode();
+ sal_uInt16 nChar = rKEvt.GetCharCode();
if(nStyle & CBS_FILENAME)
{
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx
index 5a04284cdec0..39287e7169bb 100644
--- a/sw/source/ui/chrdlg/break.cxx
+++ b/sw/source/ui/chrdlg/break.cxx
@@ -63,11 +63,11 @@ void SwBreakDlg::Apply()
else if(aPageBtn.IsChecked())
{
nKind = 3;
- const USHORT nPos = aPageCollBox.GetSelectEntryPos();
+ const sal_uInt16 nPos = aPageCollBox.GetSelectEntryPos();
if(0 != nPos && LISTBOX_ENTRY_NOTFOUND != nPos)
{
aTemplate = aPageCollBox.GetSelectEntry();
- nPgNum = aPageNumBox.IsChecked() ? (USHORT)aPageNumEdit.GetValue() : 0;
+ nPgNum = aPageNumBox.IsChecked() ? (sal_uInt16)aPageNumEdit.GetValue() : 0;
}
}
}
@@ -113,18 +113,18 @@ IMPL_LINK( SwBreakDlg, OkHdl, Button *, EMPTYARG )
{
if(aPageNumBox.IsChecked()) {
// In case of differing page descriptions, test validity
- const USHORT nPos = aPageCollBox.GetSelectEntryPos();
+ const sal_uInt16 nPos = aPageCollBox.GetSelectEntryPos();
// position 0 says 'Without'.
const SwPageDesc *pPageDesc;
if ( 0 != nPos && LISTBOX_ENTRY_NOTFOUND != nPos )
pPageDesc = rSh.FindPageDescByName( aPageCollBox.GetSelectEntry(),
- TRUE );
+ sal_True );
else
pPageDesc = &rSh.GetPageDesc(rSh.GetCurPageDesc());
OSL_ENSURE(pPageDesc, "Page description not found.");
- const USHORT nUserPage = USHORT(aPageNumEdit.GetValue());
- BOOL bOk = TRUE;
+ const sal_uInt16 nUserPage = sal_uInt16(aPageNumEdit.GetValue());
+ sal_Bool bOk = sal_True;
switch(pPageDesc->GetUseOn())
{
case nsUseOnPage::PD_MIRROR:
@@ -148,6 +148,7 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
SvxStandardDialog( pParent,SW_RES(DLG_BREAK) ),
rSh(rS),
+ aBreakFL(this,SW_RES(FL_BREAK)),
aLineBtn(this,SW_RES(RB_LINE)),
aColumnBtn(this,SW_RES(RB_COL)),
aPageBtn(this,SW_RES(RB_PAGE)),
@@ -155,7 +156,6 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
aPageCollBox(this, SW_RES(LB_COLL)),
aPageNumBox(this, SW_RES(CB_PAGENUM)),
aPageNumEdit(this, SW_RES(ED_PAGENUM)),
- aBreakFL(this,SW_RES(FL_BREAK)),
aOkBtn(this,SW_RES(BT_OK)),
aCancelBtn(this,SW_RES(BT_CANCEL)),
@@ -166,6 +166,9 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
bHtmlMode(0 != ::GetHtmlMode(rS.GetView().GetDocShell()))
{
+ aPageNumEdit.SetAccessibleRelationLabeledBy(&aPageNumBox);
+ aPageNumEdit.SetAccessibleName(aPageNumBox.GetText());
+
Link aLk = LINK(this,SwBreakDlg,ClickHdl);
aPageBtn.SetClickHdl( aLk );
aLineBtn.SetClickHdl( aLk );
@@ -178,8 +181,8 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
// Insert page description to Listbox
- const USHORT nCount = rSh.GetPageDescCnt();
- USHORT i;
+ const sal_uInt16 nCount = rSh.GetPageDescCnt();
+ sal_uInt16 i;
for( i = 0; i < nCount; ++i)
{
@@ -188,7 +191,7 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
}
String aFmtName;
- for(i = RES_POOLPAGE_BEGIN; i <= RES_POOLPAGE_REGISTER; ++i)
+ for(i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i)
if(LISTBOX_ENTRY_NOTFOUND == aPageCollBox.GetEntryPos( aFmtName =
SwStyleNameMapper::GetUIName( i, aFmtName )))
::InsertStringSorted(aFmtName, aPageCollBox, 1 );
@@ -203,22 +206,22 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
void SwBreakDlg::CheckEnable()
{
- BOOL bEnable = TRUE;
+ sal_Bool bEnable = sal_True;
if ( bHtmlMode )
{
- aColumnBtn .Enable(FALSE);
- aPageCollBox.Enable(FALSE);
- bEnable = FALSE;
+ aColumnBtn .Enable(sal_False);
+ aPageCollBox.Enable(sal_False);
+ bEnable = sal_False;
}
- else if(rSh.GetFrmType(0,TRUE)
+ else if(rSh.GetFrmType(0,sal_True)
& (FRMTYPE_FLY_ANY | FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE))
{
- aPageBtn.Enable(FALSE);
+ aPageBtn.Enable(sal_False);
if(aPageBtn.IsChecked())
- aLineBtn.Check(TRUE);
- bEnable = FALSE;
+ aLineBtn.Check(sal_True);
+ bEnable = sal_False;
}
- const BOOL bPage = aPageBtn.IsChecked();
+ const sal_Bool bPage = aPageBtn.IsChecked();
aPageCollText.Enable( bPage );
aPageCollBox.Enable ( bPage );
@@ -226,9 +229,9 @@ void SwBreakDlg::CheckEnable()
if ( bEnable )
{
// position 0 says 'Without' page template.
- const USHORT nPos = aPageCollBox.GetSelectEntryPos();
+ const sal_uInt16 nPos = aPageCollBox.GetSelectEntryPos();
if ( 0 == nPos || LISTBOX_ENTRY_NOTFOUND == nPos )
- bEnable = FALSE;
+ bEnable = sal_False;
}
aPageNumBox .Enable(bEnable);
aPageNumEdit.Enable(bEnable);
diff --git a/sw/source/ui/chrdlg/ccoll.cxx b/sw/source/ui/chrdlg/ccoll.cxx
index 117ece64c2bb..9a381071df56 100644
--- a/sw/source/ui/chrdlg/ccoll.cxx
+++ b/sw/source/ui/chrdlg/ccoll.cxx
@@ -153,7 +153,7 @@ TYPEINIT1_AUTOFACTORY(SwCondCollItem, SfxPoolItem)
****************************************************************************/
-SwCondCollItem::SwCondCollItem(USHORT _nWhich ) :
+SwCondCollItem::SwCondCollItem(sal_uInt16 _nWhich ) :
SfxPoolItem(_nWhich)
{
@@ -171,23 +171,23 @@ SfxPoolItem* SwCondCollItem::Clone( SfxItemPool * /*pPool*/ ) const
int SwCondCollItem::operator==( const SfxPoolItem& rItem) const
{
OSL_ENSURE( SfxPoolItem::operator==(rItem), "different types" );
- BOOL bReturn = TRUE;
- for(USHORT i = 0; i < COND_COMMAND_COUNT; i++)
+ sal_Bool bReturn = sal_True;
+ for(sal_uInt16 i = 0; i < COND_COMMAND_COUNT; i++)
if(sStyles[i] != ((SwCondCollItem&)rItem).sStyles[i])
{
- bReturn = FALSE;
+ bReturn = sal_False;
break;
}
return bReturn;
}
-const String& SwCondCollItem::GetStyle(USHORT nPos) const
+const String& SwCondCollItem::GetStyle(sal_uInt16 nPos) const
{
return nPos < COND_COMMAND_COUNT ? sStyles[nPos] : aEmptyStr;
}
-void SwCondCollItem::SetStyle(const String* pStyle, USHORT nPos)
+void SwCondCollItem::SetStyle(const String* pStyle, sal_uInt16 nPos)
{
if( nPos < COND_COMMAND_COUNT )
sStyles[nPos] = pStyle ? *pStyle : aEmptyStr;
diff --git a/sw/source/ui/chrdlg/ccoll.src b/sw/source/ui/chrdlg/ccoll.src
index f8195b466fde..8247888309cd 100644
--- a/sw/source/ui/chrdlg/ccoll.src
+++ b/sw/source/ui/chrdlg/ccoll.src
@@ -44,6 +44,7 @@ TabPage TP_CONDCOLL
};
CheckBox CB_CONDITION
{
+ HelpID = "sw:CheckBox:TP_CONDCOLL:CB_CONDITION";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
TabStop = TRUE ;
@@ -83,6 +84,7 @@ TabPage TP_CONDCOLL
};
ListBox LB_STYLE
{
+ HelpID = "sw:ListBox:TP_CONDCOLL:LB_STYLE";
Pos = MAP_APPFONT ( 188 , 39 ) ;
Size = MAP_APPFONT ( 60 , 108 ) ;
TabStop = TRUE ;
@@ -93,6 +95,7 @@ TabPage TP_CONDCOLL
};
ListBox LB_FILTER
{
+ HelpID = "sw:ListBox:TP_CONDCOLL:LB_FILTER";
Pos = MAP_APPFONT ( 188 , 150 ) ;
Size = MAP_APPFONT ( 60 , 50 ) ;
DropDown = TRUE ;
@@ -103,6 +106,7 @@ TabPage TP_CONDCOLL
};
PushButton PB_REMOVE
{
+ HelpID = "sw:PushButton:TP_CONDCOLL:PB_REMOVE";
Pos = MAP_APPFONT ( 129 , 165 ) ;
Size = MAP_APPFONT ( 50 , 12 ) ;
TabStop = TRUE ;
@@ -111,6 +115,7 @@ TabPage TP_CONDCOLL
};
PushButton PB_ASSIGN
{
+ HelpID = "sw:PushButton:TP_CONDCOLL:PB_ASSIGN";
Pos = MAP_APPFONT ( 185 , 165 ) ;
Size = MAP_APPFONT ( 50 , 12 ) ;
TabStop = TRUE ;
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 38f37d173db6..fb5abe72b3a0 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -76,7 +76,7 @@ using namespace ::com::sun::star::uno;
using namespace ::sfx2;
SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
- const String* pStr, BOOL bIsDrwTxtDlg) :
+ const String* pStr, sal_Bool bIsDrwTxtDlg) :
SfxTabDialog(pParent, SW_RES(DLG_CHAR), &rCoreSet, pStr != 0),
rView(rVw),
bIsDrwTxtMode(bIsDrwTxtDlg)
@@ -119,7 +119,7 @@ SwCharDlg::~SwCharDlg()
Description: set FontList
--------------------------------------------------------------------*/
-void SwCharDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SwCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
switch( nId )
@@ -176,18 +176,20 @@ SwCharURLPage::SwCharURLPage( Window* pParent,
aNotVisitedFT( this, SW_RES(FT_NOT_VISITED)),
aNotVisitedLB( this, SW_RES(LB_NOT_VISITED)),
pINetItem(0),
- bModified(FALSE)
+ bModified(sal_False)
{
FreeResource();
+ aEventPB.SetAccessibleRelationMemberOf(&aURLFL);
+
const SfxPoolItem* pItem;
SfxObjectShell* pShell;
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem) ||
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, sal_False, &pItem) ||
( 0 != ( pShell = SfxObjectShell::Current()) &&
0 != (pItem = pShell->GetItem(SID_HTML_MODE))))
{
- USHORT nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue();
if(HTMLMODE_ON & nHtmlMode)
{
aStyleFL.Hide();
@@ -233,7 +235,7 @@ SwCharURLPage::~SwCharURLPage()
void SwCharURLPage::Reset(const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(RES_TXTATR_INETFMT, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(RES_TXTATR_INETFMT, sal_False, &pItem))
{
const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*)pItem;
aURLED.SetText( INetURLObject::decode( pINetFmt->GetValue(),
@@ -260,15 +262,15 @@ void SwCharURLPage::Reset(const SfxItemSet& rSet)
if( pINetFmt->GetMacroTbl() )
pINetItem->SetMacroTable( *pINetFmt->GetMacroTbl() );
}
- if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_SELECTION, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_SELECTION, sal_False, &pItem))
{
aTextED.SetText(((const SfxStringItem*)pItem)->GetValue());
- aTextFT.Enable( FALSE );
- aTextED.Enable( FALSE );
+ aTextFT.Enable( sal_False );
+ aTextED.Enable( sal_False );
}
}
-BOOL SwCharURLPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwCharURLPage::FillItemSet(SfxItemSet& rSet)
{
::rtl::OUString sURL = aURLED.GetText();
if(sURL.getLength())
@@ -289,7 +291,7 @@ BOOL SwCharURLPage::FillItemSet(SfxItemSet& rSet)
// set valid settings first
String sEntry = aVisitedLB.GetSelectEntry();
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName( sEntry, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sEntry, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
aINetFmt.SetVisitedFmtId(nId);
aINetFmt.SetVisitedFmt(nId == RES_POOLCHR_INET_VISIT ? aEmptyStr : sEntry);
@@ -302,14 +304,14 @@ BOOL SwCharURLPage::FillItemSet(SfxItemSet& rSet)
aINetFmt.SetMacroTbl( &pINetItem->GetMacroTable() );
if(aVisitedLB.GetSavedValue() != aVisitedLB.GetSelectEntryPos())
- bModified = TRUE;
+ bModified = sal_True;
if(aNotVisitedLB.GetSavedValue() != aNotVisitedLB.GetSelectEntryPos())
- bModified = TRUE;
+ bModified = sal_True;
if(aTextED.IsModified())
{
- bModified = TRUE;
+ bModified = sal_True;
rSet.Put(SfxStringItem(FN_PARAM_SELECTION, aTextED.GetText()));
}
if(bModified)
diff --git a/sw/source/ui/chrdlg/chardlg.src b/sw/source/ui/chrdlg/chardlg.src
index 8340b4f60669..2117a9024a2a 100644
--- a/sw/source/ui/chrdlg/chardlg.src
+++ b/sw/source/ui/chrdlg/chardlg.src
@@ -120,6 +120,7 @@ TabPage TP_CHAR_URL
};
Edit ED_URL
{
+ HelpID = "sw:Edit:TP_CHAR_URL:ED_URL";
Pos = MAP_APPFONT ( 88 , 15 ) ;
Size = MAP_APPFONT ( 104 , 12 ) ;
Border = TRUE ;
@@ -127,6 +128,7 @@ TabPage TP_CHAR_URL
};
PushButton PB_URL
{
+ HelpID = "sw:PushButton:TP_CHAR_URL:PB_URL";
Pos = MAP_APPFONT ( 198 , 14 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -140,6 +142,7 @@ TabPage TP_CHAR_URL
};
Edit ED_TEXT
{
+ HelpID = "sw:Edit:TP_CHAR_URL:ED_TEXT";
Pos = MAP_APPFONT ( 88 , 31 ) ;
Size = MAP_APPFONT ( 104 , 12 ) ;
Border = TRUE ;
@@ -154,6 +157,7 @@ TabPage TP_CHAR_URL
};
Edit ED_NAME
{
+ HelpID = "sw:Edit:TP_CHAR_URL:ED_NAME";
Pos = MAP_APPFONT ( 88 , 47 ) ;
Size = MAP_APPFONT ( 104 , 12 ) ;
Border = TRUE ;
@@ -168,6 +172,7 @@ TabPage TP_CHAR_URL
};
ComboBox LB_TARGET
{
+ HelpID = "sw:ComboBox:TP_CHAR_URL:LB_TARGET";
Pos = MAP_APPFONT ( 88 , 63 ) ;
Size = MAP_APPFONT ( 104 , 60 ) ;
TabStop = TRUE ;
@@ -177,6 +182,7 @@ TabPage TP_CHAR_URL
};
PushButton PB_EVENT
{
+ HelpID = "sw:PushButton:TP_CHAR_URL:PB_EVENT";
Pos = MAP_APPFONT ( 12 , 79 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -196,6 +202,7 @@ TabPage TP_CHAR_URL
};
ListBox LB_VISITED
{
+ HelpID = "sw:ListBox:TP_CHAR_URL:LB_VISITED";
Pos = MAP_APPFONT ( 88 , 113 ) ;
Size = MAP_APPFONT ( 104 , 60 ) ;
Border = TRUE ;
@@ -212,6 +219,7 @@ TabPage TP_CHAR_URL
};
ListBox LB_NOT_VISITED
{
+ HelpID = "sw:ListBox:TP_CHAR_URL:LB_NOT_VISITED";
Pos = MAP_APPFONT ( 88 , 129 ) ;
Size = MAP_APPFONT ( 104 , 60 ) ;
Border = TRUE ;
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index a78fea71c3af..7f54948fd56a 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -81,7 +81,7 @@ using namespace ::com::sun::star::lang;
// Globals ******************************************************************
-static USHORT aPageRg[] = {
+static sal_uInt16 aPageRg[] = {
RES_PARATR_DROP, RES_PARATR_DROP,
0
};
@@ -92,14 +92,14 @@ class SwDropCapsPict : public Control
String maScriptText;
Color maBackColor;
Color maTextLineColor;
- BYTE mnLines;
+ sal_uInt8 mnLines;
long mnTotLineH;
long mnLineH;
long mnTextH;
- USHORT mnDistance;
+ sal_uInt16 mnDistance;
sal_Int32 mnLeading;
Printer* mpPrinter;
- BOOL mbDelPrinter;
+ sal_Bool mbDelPrinter;
SvULongs maTextWidth;
SvXub_StrLens maScriptChg;
SvUShorts maScriptType;
@@ -114,7 +114,7 @@ class SwDropCapsPict : public Control
Size CalcTextSize( void );
inline void InitPrinter( void );
void _InitPrinter( void );
- void GetFontSettings( const SwDropCapsPage& _rPage, Font& _rFont, USHORT _nWhich );
+ void GetFontSettings( const SwDropCapsPage& _rPage, Font& _rFont, sal_uInt16 _nWhich );
public:
SwDropCapsPict(Window *pParent, const ResId &rResId)
@@ -123,16 +123,16 @@ public:
, mnLineH(0)
, mnTextH(0)
, mpPrinter( NULL )
- , mbDelPrinter( FALSE )
+ , mbDelPrinter( sal_False )
{}
~SwDropCapsPict();
void UpdatePaintSettings( void ); // also invalidates control!
inline void SetText( const String& rT );
- inline void SetLines( BYTE nL );
- inline void SetDistance( USHORT nD );
- inline void SetValues( const String& rText, BYTE nLines, USHORT nDistance );
+ inline void SetLines( sal_uInt8 nL );
+ inline void SetDistance( sal_uInt16 nD );
+ inline void SetValues( const String& rText, sal_uInt8 nLines, sal_uInt16 nDistance );
void DrawPrev( const Point& rPt );
};
@@ -143,19 +143,19 @@ inline void SwDropCapsPict::SetText( const String& rT )
UpdatePaintSettings();
}
-inline void SwDropCapsPict::SetLines( BYTE nL )
+inline void SwDropCapsPict::SetLines( sal_uInt8 nL )
{
mnLines = nL;
UpdatePaintSettings();
}
-inline void SwDropCapsPict::SetDistance( USHORT nD )
+inline void SwDropCapsPict::SetDistance( sal_uInt16 nD )
{
mnDistance = nD;
UpdatePaintSettings();
}
-inline void SwDropCapsPict::SetValues( const String& rText, BYTE nLines, USHORT nDistance )
+inline void SwDropCapsPict::SetValues( const String& rText, sal_uInt8 nLines, sal_uInt16 nDistance )
{
maText = rText;
mnLines = nLines;
@@ -175,10 +175,10 @@ inline void SwDropCapsPict::InitPrinter( void )
****************************************************************************/
-String GetDefaultString(USHORT nChars)
+String GetDefaultString(sal_uInt16 nChars)
{
String aStr;
- for (USHORT i = 0; i < nChars; i++)
+ for (sal_uInt16 i = 0; i < nChars; i++)
aStr += String((char) (i + 65));
return aStr;
}
@@ -203,7 +203,7 @@ static void calcFontHeightAnyAscent( OutputDevice* _pWin, Font& _rFont, long& _n
#define LINES 10
#define BORDER 2
-void SwDropCapsPict::GetFontSettings( const SwDropCapsPage& _rPage, Font& _rFont, USHORT _nWhich )
+void SwDropCapsPict::GetFontSettings( const SwDropCapsPage& _rPage, Font& _rFont, sal_uInt16 _nWhich )
{
SfxItemSet aSet( _rPage.rSh.GetAttrPool(), _nWhich, _nWhich);
_rPage.rSh.GetCurAttr(aSet);
@@ -246,7 +246,7 @@ void SwDropCapsPict::UpdatePaintSettings( void )
// CTL
GetFontSettings( *pPage, maCTLFont, RES_CHRATR_CTL_FONT );
- pPage->rSh.Pop(FALSE);
+ pPage->rSh.Pop(sal_False);
pPage->rSh.EndCrsrMove();
}
else
@@ -270,9 +270,9 @@ void SwDropCapsPict::UpdatePaintSettings( void )
maCJKFont.SetSize(Size(0, mnTextH));
maCTLFont.SetSize(Size(0, mnTextH));
- aFont.SetTransparent(TRUE);
- maCJKFont.SetTransparent(TRUE);
- maCTLFont.SetTransparent(TRUE);
+ aFont.SetTransparent(sal_True);
+ maCJKFont.SetTransparent(sal_True);
+ maCTLFont.SetTransparent(sal_True);
aFont.SetColor( SwViewOption::GetFontColor() );
maCJKFont.SetColor( SwViewOption::GetFontColor() );
@@ -322,12 +322,12 @@ void SwDropCapsPict::Paint(const Rectangle &/*rRect*/)
OSL_ENSURE(mnLineH > 0, "We cannot make it that small");
long nY0 = (aOutputSizePixel.Height() - (LINES * mnTotLineH)) / 2;
SetFillColor( maTextLineColor );
- for (USHORT i = 0; i < LINES; ++i)
+ for (sal_uInt16 i = 0; i < LINES; ++i)
DrawRect(Rectangle(Point(BORDER, nY0 + i * mnTotLineH), Size(aOutputSizePixel.Width() - 2 * BORDER, mnLineH)));
// Text background with gap (240 twips ~ 1 line height)
- ULONG lDistance = mnDistance;
- USHORT nDistW = (USHORT) (ULONG) (((lDistance * 100) / 240) * mnTotLineH) / 100;
+ sal_uLong lDistance = mnDistance;
+ sal_uInt16 nDistW = (sal_uInt16) (sal_uLong) (((lDistance * 100) / 240) * mnTotLineH) / 100;
SetFillColor( maBackColor );
if(((SwDropCapsPage*)GetParent())->aDropCapsBox.IsChecked())
{
@@ -348,11 +348,11 @@ void SwDropCapsPict::DrawPrev( const Point& rPt )
InitPrinter();
Font aOldFont = mpPrinter->GetFont();
- USHORT nScript;
- USHORT nIdx = 0;
+ sal_uInt16 nScript;
+ size_t nIdx = 0;
xub_StrLen nStart = 0;
xub_StrLen nEnd;
- USHORT nCnt = maScriptChg.Count();
+ size_t nCnt = maScriptChg.size();
if( nCnt )
{
@@ -381,7 +381,7 @@ void SwDropCapsPict::DrawPrev( const Point& rPt )
else
break;
}
- while( TRUE );
+ while( sal_True );
mpPrinter->SetFont( aOldFont );
}
@@ -391,10 +391,10 @@ void SwDropCapsPict::CheckScript( void )
return;
maScriptText = maText;
- USHORT nCnt = maScriptChg.Count();
+ size_t nCnt = maScriptChg.size();
if( nCnt )
{
- maScriptChg.Remove( 0, nCnt );
+ maScriptChg.clear();
maScriptType.Remove( 0, nCnt );
maTextWidth.Remove( 0, nCnt );
nCnt = 0;
@@ -407,8 +407,8 @@ void SwDropCapsPict::CheckScript( void )
}
if( xBreak.is() )
{
- USHORT nScript = xBreak->getScriptType( maText, 0 );
- USHORT nChg = 0;
+ sal_uInt16 nScript = xBreak->getScriptType( maText, 0 );
+ sal_uInt16 nChg = 0;
if( I18N_SCRIPTTYPE::WEAK == nScript )
{
nChg = (xub_StrLen)xBreak->endOfScript( maText, nChg, nScript );
@@ -421,15 +421,15 @@ void SwDropCapsPict::CheckScript( void )
do
{
nChg = (xub_StrLen)xBreak->endOfScript( maText, nChg, nScript );
- maScriptChg.Insert( nChg, nCnt );
+ maScriptChg.push_back( nChg );
maScriptType.Insert( nScript, nCnt );
- maTextWidth.Insert( ULONG(0), nCnt++ );
+ maTextWidth.Insert( sal_uLong(0), nCnt++ );
if( nChg < maText.Len() )
nScript = xBreak->getScriptType( maText, nChg );
else
break;
- } while( TRUE );
+ } while( sal_True );
}
}
@@ -437,11 +437,11 @@ Size SwDropCapsPict::CalcTextSize( void )
{
InitPrinter();
- USHORT nScript;
- USHORT nIdx = 0;
+ sal_uInt16 nScript;
+ size_t nIdx = 0;
xub_StrLen nStart = 0;
xub_StrLen nEnd;
- USHORT nCnt = maScriptChg.Count();
+ size_t nCnt = maScriptChg.size();
if( nCnt )
{
nEnd = maScriptChg[ nIdx ];
@@ -463,7 +463,7 @@ Size SwDropCapsPict::CalcTextSize( void )
{
SvxFont& rFnt = ( nScript == I18N_SCRIPTTYPE::ASIAN )? maCJKFont :
( ( nScript == I18N_SCRIPTTYPE::COMPLEX )? maCTLFont : maFont );
- ULONG nWidth = rFnt.GetTxtSize( mpPrinter, maText, nStart, nEnd-nStart ).Width();
+ sal_uLong nWidth = rFnt.GetTxtSize( mpPrinter, maText, nStart, nEnd-nStart ).Width();
if( nIdx < maTextWidth.Count() )
maTextWidth[ nIdx++ ] = nWidth;
@@ -489,7 +489,7 @@ Size SwDropCapsPict::CalcTextSize( void )
else
break;
}
- while( TRUE );
+ while( sal_True );
nHeight -= nAscent;
nCJKHeight -= nCJKAscent;
nCTLHeight -= nCTLAscent;
@@ -517,7 +517,7 @@ void SwDropCapsPict::_InitPrinter()
if ( !mpPrinter )
{
mpPrinter = new Printer;
- mbDelPrinter = TRUE;
+ mbDelPrinter = sal_True;
}
}
@@ -527,7 +527,7 @@ SwDropCapsDlg::SwDropCapsDlg(Window *pParent, const SfxItemSet &rSet ) :
{
SwDropCapsPage* pNewPage = (SwDropCapsPage*) SwDropCapsPage::Create(this, rSet);
- pNewPage->SetFormat(FALSE);
+ pNewPage->SetFormat(sal_False);
SetTabPage(pNewPage);
}
@@ -539,6 +539,7 @@ SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet) :
SfxTabPage(pParent, SW_RES(TP_DROPCAPS), rSet),
+ aSettingsFL (this, SW_RES(FL_SETTINGS)),
aDropCapsBox (this, SW_RES(CB_SWITCH )),
aWholeWordCB (this, SW_RES(CB_WORD )),
aSwitchText (this, SW_RES(FT_DROPCAPS )),
@@ -547,25 +548,24 @@ SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet) :
aLinesField (this, SW_RES(FLD_LINES )),
aDistanceText (this, SW_RES(TXT_DISTANCE)),
aDistanceField(this, SW_RES(FLD_DISTANCE)),
- aSettingsFL (this, SW_RES(FL_SETTINGS)),
+ aContentFL (this, SW_RES(FL_CONTENT )),
aTextText (this, SW_RES(TXT_TEXT )),
aTextEdit (this, SW_RES(EDT_TEXT )),
aTemplateText (this, SW_RES(TXT_TEMPLATE)),
aTemplateBox (this, SW_RES(BOX_TEMPLATE)),
- aContentFL (this, SW_RES(FL_CONTENT )),
pPict (new SwDropCapsPict(this, SW_RES(CNT_PICT))),
- bModified(FALSE),
- bFormat(TRUE),
+ bModified(sal_False),
+ bFormat(sal_True),
rSh(::GetActiveView()->GetWrtShell())
{
FreeResource();
SetExchangeSupport();
- USHORT nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
- bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE;
+ sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
+ bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
// In the template dialog the text is not influenceable
aTextText.Enable( !bFormat );
@@ -614,7 +614,7 @@ SfxTabPage* SwDropCapsPage::Create(Window *pParent,
Page: FillItemSet-Overload
****************************************************************************/
-BOOL SwDropCapsPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwDropCapsPage::FillItemSet(SfxItemSet &rSet)
{
if(bModified)
FillSet(rSet);
@@ -643,7 +643,7 @@ void SwDropCapsPage::Reset(const SfxItemSet &rSet)
aDistanceField.SetValue(0);
}
- ::FillCharStyleListBox(aTemplateBox, rSh.GetView().GetDocShell(), TRUE);
+ ::FillCharStyleListBox(aTemplateBox, rSh.GetView().GetDocShell(), sal_True);
aTemplateBox.InsertEntry(SW_RESSTR(SW_STR_NONE), 0);
@@ -654,7 +654,7 @@ void SwDropCapsPage::Reset(const SfxItemSet &rSet)
// Enable controls
aDropCapsBox.Check(aFmtDrop.GetLines() > 1);
- const USHORT nVal = USHORT(aDropCapsField.GetValue());
+ const sal_uInt16 nVal = sal_uInt16(aDropCapsField.GetValue());
if (bFormat)
aTextEdit.SetText(GetDefaultString(nVal));
else
@@ -666,11 +666,11 @@ void SwDropCapsPage::Reset(const SfxItemSet &rSet)
// Preview
pPict->SetValues( aTextEdit.GetText(),
- BYTE( aLinesField.GetValue() ),
- USHORT( aDistanceField.Denormalize( aDistanceField.GetValue( FUNIT_TWIP ) ) ) );
+ sal_uInt8( aLinesField.GetValue() ),
+ sal_uInt16( aDistanceField.Denormalize( aDistanceField.GetValue( FUNIT_TWIP ) ) ) );
ClickHdl(&aDropCapsBox);
- bModified = FALSE;
+ bModified = sal_False;
}
/****************************************************************************
@@ -680,7 +680,7 @@ Page: CheckBox's Click-Handler
IMPL_LINK( SwDropCapsPage, ClickHdl, Button *, EMPTYARG )
{
- BOOL bChecked = aDropCapsBox.IsChecked();
+ sal_Bool bChecked = aDropCapsBox.IsChecked();
aWholeWordCB .Enable( bChecked && !bHtmlMode );
@@ -703,7 +703,7 @@ IMPL_LINK( SwDropCapsPage, ClickHdl, Button *, EMPTYARG )
else
pPict->SetText(aEmptyStr);
- bModified = TRUE;
+ bModified = sal_True;
return 0;
}
@@ -719,7 +719,7 @@ IMPL_LINK( SwDropCapsPage, WholeWordHdl, CheckBox *, EMPTYARG )
ModifyHdl(&aDropCapsField);
- bModified = TRUE;
+ bModified = sal_True;
return 0;
}
@@ -736,11 +736,11 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
// set text if applicable
if (pEdit == &aDropCapsField)
{
- USHORT nVal;
- BOOL bSetText = FALSE;
+ sal_uInt16 nVal;
+ sal_Bool bSetText = sal_False;
if (!aWholeWordCB.IsChecked())
- nVal = (USHORT)aDropCapsField.GetValue();
+ nVal = (sal_uInt16)aDropCapsField.GetValue();
else
nVal = 0;
@@ -748,7 +748,7 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
sPreview = GetDefaultString(nVal);
else
{
- bSetText = TRUE;
+ bSetText = sal_True;
sPreview = rSh.GetDropTxt(nVal);
}
@@ -757,7 +757,7 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
if (sEdit.Len() && sPreview.CompareTo(sEdit, sEdit.Len()) != COMPARE_EQUAL)
{
sPreview = sEdit.Copy(0, sPreview.Len());
- bSetText = FALSE;
+ bSetText = sal_False;
}
if (bSetText)
@@ -765,8 +765,8 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
}
else if (pEdit == &aTextEdit) // set quantity if applicable
{
- USHORT nTmp = aTextEdit.GetText().Len();
- aDropCapsField.SetValue(Max((USHORT)1, nTmp));
+ sal_uInt16 nTmp = aTextEdit.GetText().Len();
+ aDropCapsField.SetValue(Max((sal_uInt16)1, nTmp));
sPreview = aTextEdit.GetText().Copy(0, nTmp);
}
@@ -775,11 +775,11 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
if (pEdit == &aDropCapsField || pEdit == &aTextEdit)
pPict->SetText (sPreview);
else if (pEdit == &aLinesField)
- pPict->SetLines((BYTE)aLinesField.GetValue());
+ pPict->SetLines((sal_uInt8)aLinesField.GetValue());
else
- pPict->SetDistance((USHORT)aDistanceField.Denormalize(aDistanceField.GetValue(FUNIT_TWIP)));
+ pPict->SetDistance((sal_uInt16)aDistanceField.Denormalize(aDistanceField.GetValue(FUNIT_TWIP)));
- bModified = TRUE;
+ bModified = sal_True;
return 0;
}
@@ -792,12 +792,12 @@ Page: Template-Box' Select-Handler.
IMPL_LINK_INLINE_START( SwDropCapsPage, SelectHdl, ListBox *, EMPTYARG )
{
pPict->UpdatePaintSettings();
- bModified = TRUE;
+ bModified = sal_True;
return 0;
}
IMPL_LINK_INLINE_END( SwDropCapsPage, SelectHdl, ListBox *, EMPTYARG )
-USHORT* SwDropCapsPage::GetRanges()
+sal_uInt16* SwDropCapsPage::GetRanges()
{
return aPageRg;
}
@@ -808,13 +808,13 @@ void SwDropCapsPage::FillSet( SfxItemSet &rSet )
{
SwFmtDrop aFmt;
- BOOL bOn = aDropCapsBox.IsChecked();
+ sal_Bool bOn = aDropCapsBox.IsChecked();
if(bOn)
{
// quantity, lines, gap
- aFmt.GetChars() = (BYTE) aDropCapsField.GetValue();
- aFmt.GetLines() = (BYTE) aLinesField.GetValue();
- aFmt.GetDistance() = (USHORT) aDistanceField.Denormalize(aDistanceField.GetValue(FUNIT_TWIP));
+ aFmt.GetChars() = (sal_uInt8) aDropCapsField.GetValue();
+ aFmt.GetLines() = (sal_uInt8) aLinesField.GetValue();
+ aFmt.GetDistance() = (sal_uInt16) aDistanceField.Denormalize(aDistanceField.GetValue(FUNIT_TWIP));
aFmt.GetWholeWord() = aWholeWordCB.IsChecked();
// template
diff --git a/sw/source/ui/chrdlg/drpcps.src b/sw/source/ui/chrdlg/drpcps.src
index d18fad43026e..82cdc5ecf445 100644
--- a/sw/source/ui/chrdlg/drpcps.src
+++ b/sw/source/ui/chrdlg/drpcps.src
@@ -58,12 +58,14 @@ TabPage TP_DROPCAPS
Hide = TRUE ;
CheckBox CB_SWITCH
{
+ HelpID = "sw:CheckBox:TP_DROPCAPS:CB_SWITCH";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Text [ en-US ] = "Display drop caps" ;
};
CheckBox CB_WORD
{
+ HelpID = "sw:CheckBox:TP_DROPCAPS:CB_WORD";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Text [ en-US ] = "~Whole word" ;
@@ -76,6 +78,7 @@ TabPage TP_DROPCAPS
};
NumericField FLD_DROPCAPS
{
+ HelpID = "sw:NumericField:TP_DROPCAPS:FLD_DROPCAPS";
Border = TRUE ;
First = 1 ;
Last = 9 ;
@@ -97,6 +100,7 @@ TabPage TP_DROPCAPS
};
NumericField FLD_LINES
{
+ HelpID = "sw:NumericField:TP_DROPCAPS:FLD_LINES";
Border = TRUE ;
First = 2 ;
Last = 9 ;
@@ -118,6 +122,7 @@ TabPage TP_DROPCAPS
};
MetricField FLD_DISTANCE
{
+ HelpID = "sw:MetricField:TP_DROPCAPS:FLD_DISTANCE";
Border = TRUE ;
DecimalDigits = 2 ;
First = 0 ;
@@ -154,6 +159,7 @@ TabPage TP_DROPCAPS
};
Edit EDT_TEXT
{
+ HelpID = "sw:Edit:TP_DROPCAPS:EDT_TEXT";
Border = TRUE ;
Left = TRUE ;
Pos = MAP_APPFONT ( 143 , 100 ) ;
@@ -170,6 +176,7 @@ TabPage TP_DROPCAPS
};
ListBox BOX_TEMPLATE
{
+ HelpID = "sw:ListBox:TP_DROPCAPS:BOX_TEMPLATE";
Border = TRUE ;
DropDown = TRUE ;
Pos = MAP_APPFONT ( 143 , 116 ) ;
diff --git a/sw/source/ui/chrdlg/makefile.mk b/sw/source/ui/chrdlg/makefile.mk
deleted file mode 100644
index 8d8c3624b3f3..000000000000
--- a/sw/source/ui/chrdlg/makefile.mk
+++ /dev/null
@@ -1,72 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=chrdlg
-LIBTARGET=NO
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- swbreak.src \
- chardlg.src \
- chrdlg.src \
- drpcps.src \
- ccoll.src \
- paradlg.src \
- numpara.src
-
-EXCEPTIONSFILES = \
- $(SLO)$/break.obj \
- $(SLO)$/ccoll.obj \
- $(SLO)$/chardlg.obj \
- $(SLO)$/drpcps.obj \
- $(SLO)$/numpara.obj \
- $(SLO)$/pardlg.obj \
- $(SLO)$/swuiccoll.obj \
- $(SLO)$/tblnumfm.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-LIB1TARGET = $(SLB)$/$(TARGET).lib
-
-LIB1OBJFILES = \
- $(SLO)$/ccoll.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index b0e02e85651e..0b3de84f24b9 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -53,7 +53,7 @@
// Globals ******************************************************************
-static USHORT aPageRg[] = {
+static sal_uInt16 aPageRg[] = {
FN_NUMBER_NEWSTART, FN_NUMBER_NEWSTART_AT,
0
};
@@ -64,10 +64,10 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent,
aOutlineStartFL ( this, SW_RES( FL_OUTLINE_START )),
aOutlineLvFT ( this, SW_RES( FT_OUTLINE_LEVEL )),
aOutlineLvLB ( this, SW_RES( LB_OUTLINE_LEVEL )),
+ aNewStartFL ( this, SW_RES( FL_NEW_START ) ),
aNumberStyleFT ( this, SW_RES( FT_NUMBER_STYLE ) ),
aNumberStyleLB ( this, SW_RES( LB_NUMBER_STYLE ) ),
- aNewStartFL ( this, SW_RES( FL_NEW_START ) ),
- aNewStartCB ( this, SW_RES( CB_NEW_START ) ),
+ aNewStartCB ( this, SW_RES( CB_NEW_START ) ),
aNewStartNumberCB ( this, SW_RES( CB_NUMBER_NEW_START ) ),
aNewStartNF ( this, SW_RES( NF_NEW_START ) ),
aCountParaFL ( this, SW_RES( FL_COUNT_PARA ) ),
@@ -76,18 +76,18 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent,
aRestartFT ( this, SW_RES( FT_RESTART_NO ) ),
aRestartNF ( this, SW_RES( NF_RESTART_PARA ) ),
msOutlineNumbering( SW_RES( STR_OUTLINE_NUMBERING ) ),
- bModified(FALSE),
- bCurNumrule(FALSE)
+ bModified(sal_False),
+ bCurNumrule(sal_False)
{
FreeResource();
const SfxPoolItem* pItem;
SfxObjectShell* pObjSh;
- if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, FALSE, &pItem) ||
+ if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, sal_False, &pItem) ||
( 0 != ( pObjSh = SfxObjectShell::Current()) &&
0 != (pItem = pObjSh->GetItem(SID_HTML_MODE))))
{
- USHORT nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue();
if(HTMLMODE_ON & nHtmlMode)
{
aCountParaFL .Hide();
@@ -104,6 +104,8 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent,
SwParagraphNumTabPage, LineCountHdl_Impl));
aRestartParaCountCB.SetClickHdl(
LINK(this, SwParagraphNumTabPage, LineCountHdl_Impl));
+ aNewStartNF.SetAccessibleName(aNewStartNumberCB.GetText());
+ aNewStartNF.SetAccessibleRelationLabeledBy(&aNewStartNumberCB);
}
SwParagraphNumTabPage::~SwParagraphNumTabPage()
@@ -116,22 +118,22 @@ SfxTabPage* SwParagraphNumTabPage::Create( Window* pParent,
return new SwParagraphNumTabPage(pParent, rSet);
}
-USHORT* SwParagraphNumTabPage::GetRanges()
+sal_uInt16* SwParagraphNumTabPage::GetRanges()
{
return aPageRg;
}
-BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
{
if( aOutlineLvLB.GetSelectEntryPos() != aOutlineLvLB.GetSavedValue())
{
- USHORT aOutlineLv = aOutlineLvLB.GetSelectEntryPos();
+ sal_uInt16 aOutlineLv = aOutlineLvLB.GetSelectEntryPos();
const SfxUInt16Item* pOldOutlineLv = (const SfxUInt16Item*)GetOldItem( rSet, SID_ATTR_PARA_OUTLINE_LEVEL);
SfxUInt16Item* pOutlineLv = (SfxUInt16Item*)pOldOutlineLv->Clone();
pOutlineLv->SetValue( aOutlineLv );
rSet.Put(*pOutlineLv);
delete pOutlineLv;
- bModified = TRUE;
+ bModified = sal_True;
}
if( aNumberStyleLB.GetSelectEntryPos() != aNumberStyleLB.GetSavedValue())
@@ -144,18 +146,18 @@ BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
pRule->SetValue(aStyle);
rSet.Put(*pRule);
delete pRule;
- bModified = TRUE;
+ bModified = sal_True;
}
if(aNewStartCB.GetState() != aNewStartCB.GetSavedValue() ||
aNewStartNumberCB.GetState() != aNewStartNumberCB.GetSavedValue()||
aNewStartNF.GetText() != aNewStartNF.GetSavedValue())
{
- bModified = TRUE;
- BOOL bNewStartChecked = STATE_CHECK == aNewStartCB.GetState();
- BOOL bNumberNewStartChecked = STATE_CHECK == aNewStartNumberCB.GetState();
+ bModified = sal_True;
+ sal_Bool bNewStartChecked = STATE_CHECK == aNewStartCB.GetState();
+ sal_Bool bNumberNewStartChecked = STATE_CHECK == aNewStartNumberCB.GetState();
rSet.Put(SfxBoolItem(FN_NUMBER_NEWSTART, bNewStartChecked));
rSet.Put(SfxUInt16Item(FN_NUMBER_NEWSTART_AT,
- bNumberNewStartChecked && bNewStartChecked ? (USHORT)aNewStartNF.GetValue() : USHRT_MAX));
+ bNumberNewStartChecked && bNewStartChecked ? (sal_uInt16)aNewStartNF.GetValue() : USHRT_MAX));
}
if(aCountParaCB.GetSavedValue() != aCountParaCB.GetState() ||
@@ -163,18 +165,18 @@ BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
aRestartNF.GetSavedValue() != aRestartNF.GetText() )
{
SwFmtLineNumber aFmt;
- aFmt.SetStartValue( static_cast< ULONG >(aRestartParaCountCB.GetState() == STATE_CHECK ?
+ aFmt.SetStartValue( static_cast< sal_uLong >(aRestartParaCountCB.GetState() == STATE_CHECK ?
aRestartNF.GetValue() : 0 ));
aFmt.SetCountLines( aCountParaCB.IsChecked() );
rSet.Put(aFmt);
- bModified = TRUE;
+ bModified = sal_True;
}
return bModified;
}
void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
{
- BOOL bHasNumberStyle = FALSE;
+ sal_Bool bHasNumberStyle = sal_False;
SfxItemState eItemState = rSet.GetItemState( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) );
@@ -209,7 +211,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
else
aNumberStyleLB.SelectEntry( aStyle );
- bHasNumberStyle = TRUE;
+ bHasNumberStyle = sal_True;
}
else
{
@@ -221,12 +223,12 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
eItemState = rSet.GetItemState( FN_NUMBER_NEWSTART );
if(eItemState > SFX_ITEM_AVAILABLE )
{
- bCurNumrule = TRUE;
+ bCurNumrule = sal_True;
const SfxBoolItem& rStart = (const SfxBoolItem&)rSet.Get(FN_NUMBER_NEWSTART);
aNewStartCB.SetState(
rStart.GetValue() ?
STATE_CHECK : STATE_NOCHECK );
- aNewStartCB.EnableTriState(FALSE);
+ aNewStartCB.EnableTriState(sal_False);
}
else
aNewStartCB.SetState(bHasNumberStyle ? STATE_NOCHECK : STATE_DONTKNOW);
@@ -235,13 +237,13 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
eItemState = rSet.GetItemState( FN_NUMBER_NEWSTART_AT);
if( eItemState > SFX_ITEM_AVAILABLE )
{
- USHORT nNewStart = ((const SfxUInt16Item&)rSet.Get(FN_NUMBER_NEWSTART_AT)).GetValue();
+ sal_uInt16 nNewStart = ((const SfxUInt16Item&)rSet.Get(FN_NUMBER_NEWSTART_AT)).GetValue();
aNewStartNumberCB.Check(USHRT_MAX != nNewStart);
if(USHRT_MAX == nNewStart)
nNewStart = 1;
aNewStartNF.SetValue(nNewStart);
- aNewStartNumberCB.EnableTriState(FALSE);
+ aNewStartNumberCB.EnableTriState(sal_False);
}
else
aNewStartCB.SetState(STATE_DONTKNOW);
@@ -252,14 +254,14 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
if( SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_LINENUMBER))
{
SwFmtLineNumber& rNum = (SwFmtLineNumber&)rSet.Get(RES_LINENUMBER);
- ULONG nStartValue = rNum.GetStartValue();
- BOOL bCount = rNum.IsCount();
+ sal_uLong nStartValue = rNum.GetStartValue();
+ sal_Bool bCount = rNum.IsCount();
aCountParaCB.SetState( bCount ? STATE_CHECK : STATE_NOCHECK );
aRestartParaCountCB.SetState( 0 != nStartValue ? STATE_CHECK : STATE_NOCHECK );
aRestartNF.SetValue(nStartValue == 0 ? 1 : nStartValue);
LineCountHdl_Impl(&aCountParaCB);
- aCountParaCB.EnableTriState(FALSE);
- aRestartParaCountCB.EnableTriState(FALSE);
+ aCountParaCB.EnableTriState(sal_False);
+ aRestartParaCountCB.EnableTriState(sal_False);
}
else
{
@@ -270,7 +272,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
aRestartParaCountCB.SaveValue();
aRestartNF.SaveValue();
- bModified = FALSE;
+ bModified = sal_False;
}
void SwParagraphNumTabPage::DisableOutline()
@@ -294,7 +296,7 @@ void SwParagraphNumTabPage::EnableNewStart()
IMPL_LINK( SwParagraphNumTabPage, NewStartHdl_Impl, CheckBox*, EMPTYARG )
{
- BOOL bEnable = aNewStartCB.IsChecked();
+ sal_Bool bEnable = aNewStartCB.IsChecked();
aNewStartNumberCB.Enable(bEnable);
aNewStartNF.Enable(bEnable && aNewStartNumberCB.IsChecked());
return 0;
@@ -304,7 +306,7 @@ IMPL_LINK( SwParagraphNumTabPage, LineCountHdl_Impl, CheckBox* , EMPTYARG)
{
aRestartParaCountCB.Enable(aCountParaCB.IsChecked());
- BOOL bEnableRestartValue = aRestartParaCountCB.IsEnabled() &&
+ sal_Bool bEnableRestartValue = aRestartParaCountCB.IsEnabled() &&
aRestartParaCountCB.IsChecked();
aRestartFT.Enable(bEnableRestartValue);
aRestartNF.Enable(bEnableRestartValue);
@@ -314,7 +316,7 @@ IMPL_LINK( SwParagraphNumTabPage, LineCountHdl_Impl, CheckBox* , EMPTYARG)
IMPL_LINK( SwParagraphNumTabPage, StyleHdl_Impl, ListBox*, pBox )
{
- BOOL bEnable = bCurNumrule || pBox->GetSelectEntryPos() > 0;
+ sal_Bool bEnable = bCurNumrule || pBox->GetSelectEntryPos() > 0;
aNewStartCB.Enable(bEnable);
NewStartHdl_Impl(&aNewStartCB);
diff --git a/sw/source/ui/chrdlg/numpara.src b/sw/source/ui/chrdlg/numpara.src
index eb14f0bbfd10..67ce361330e9 100644
--- a/sw/source/ui/chrdlg/numpara.src
+++ b/sw/source/ui/chrdlg/numpara.src
@@ -50,6 +50,7 @@ TabPage TP_NUMPARA
};
ListBox LB_OUTLINE_LEVEL
{
+ HelpID = "sw:ListBox:TP_NUMPARA:LB_OUTLINE_LEVEL";
Pos = MAP_APPFONT ( 130 , 14 ) ;
Size = MAP_APPFONT ( 118 , 65 ) ;
DropDown = TRUE ;
@@ -97,6 +98,7 @@ TabPage TP_NUMPARA
};
ListBox LB_NUMBER_STYLE
{
+ HelpID = "sw:ListBox:TP_NUMPARA:LB_NUMBER_STYLE";
Pos = MAP_APPFONT ( 130 , 41 ) ;
Size = MAP_APPFONT ( 118 , 65 ) ;
DropDown = TRUE ;
@@ -108,6 +110,7 @@ TabPage TP_NUMPARA
};
TriStateBox CB_NEW_START
{
+ HelpID = "sw:TriStateBox:TP_NUMPARA:CB_NEW_START";
Pos = MAP_APPFONT ( 12 , 58 ) ;
Size = MAP_APPFONT ( 160 , 10 ) ;
Hide = TRUE ;
@@ -116,6 +119,7 @@ TabPage TP_NUMPARA
};
TriStateBox CB_NUMBER_NEW_START
{
+ HelpID = "sw:TriStateBox:TP_NUMPARA:CB_NUMBER_NEW_START";
Pos = MAP_APPFONT ( 21 , 73 ) ;
Size = MAP_APPFONT ( 103 , 10 ) ;
Hide = TRUE ;
@@ -124,6 +128,7 @@ TabPage TP_NUMPARA
};
NumericField NF_NEW_START
{
+ HelpID = "sw:NumericField:TP_NUMPARA:NF_NEW_START";
Border = TRUE ;
Pos = MAP_APPFONT ( 130 , 72 ) ;
Size = MAP_APPFONT ( 26 , 12 ) ;
@@ -147,6 +152,7 @@ TabPage TP_NUMPARA
};
TriStateBox CB_COUNT_PARA
{
+ HelpID = "sw:TriStateBox:TP_NUMPARA:CB_COUNT_PARA";
Pos = MAP_APPFONT ( 12 , 100 ) ;
Size = MAP_APPFONT ( 160 , 10 ) ;
TabStop = TRUE ;
@@ -154,6 +160,7 @@ TabPage TP_NUMPARA
};
TriStateBox CB_RESTART_PARACOUNT
{
+ HelpID = "sw:TriStateBox:TP_NUMPARA:CB_RESTART_PARACOUNT";
Pos = MAP_APPFONT ( 12 , 116 ) ;
Size = MAP_APPFONT ( 160 , 10 ) ;
TabStop = TRUE ;
@@ -168,6 +175,7 @@ TabPage TP_NUMPARA
};
NumericField NF_RESTART_PARA
{
+ HelpID = "sw:NumericField:TP_NUMPARA:NF_RESTART_PARA";
Border = TRUE ;
Pos = MAP_APPFONT ( 130 , 130 ) ;
Size = MAP_APPFONT ( 26 , 12 ) ;
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index cf2e153d2853..b4f654e0de2c 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -69,10 +69,10 @@
SwParaDlg::SwParaDlg(Window *pParent,
SwView& rVw,
const SfxItemSet& rCoreSet,
- BYTE nDialogMode,
+ sal_uInt8 nDialogMode,
const String *pTitle,
- BOOL bDraw,
- UINT16 nDefPage):
+ sal_Bool bDraw,
+ sal_uInt16 nDefPage):
SfxTabDialog(pParent, bDraw ? SW_RES(DLG_DRAWPARA) : SW_RES(DLG_PARA),
&rCoreSet, 0 != pTitle),
@@ -85,7 +85,7 @@ SwParaDlg::SwParaDlg(Window *pParent,
FreeResource();
nHtmlMode = ::GetHtmlMode(rVw.GetDocShell());
- BOOL bHtmlMode = static_cast< BOOL >(nHtmlMode & HTMLMODE_ON);
+ sal_Bool bHtmlMode = static_cast< sal_Bool >(nHtmlMode & HTMLMODE_ON);
if(pTitle)
{
// Update title
@@ -126,8 +126,8 @@ SwParaDlg::SwParaDlg(Window *pParent,
else
RemoveTabPage(TP_PARA_ASIAN);
- USHORT nWhich(rCoreSet.GetPool()->GetWhich(SID_ATTR_LRSPACE));
- BOOL bLRValid = SFX_ITEM_AVAILABLE <= rCoreSet.GetItemState(nWhich);
+ sal_uInt16 nWhich(rCoreSet.GetPool()->GetWhich(SID_ATTR_LRSPACE));
+ sal_Bool bLRValid = SFX_ITEM_AVAILABLE <= rCoreSet.GetItemState(nWhich);
if(bHtmlMode || !bLRValid)
RemoveTabPage(TP_TABULATOR);
else
@@ -181,7 +181,7 @@ SwParaDlg::~SwParaDlg()
}
-void SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
+void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
{
SwWrtShell& rSh = rView.GetWrtShell();
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
@@ -195,7 +195,7 @@ void SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
else if( nId == TP_PARA_STD )
{
aSet.Put(SfxUInt16Item(SID_SVXSTDPARAGRAPHTABPAGE_PAGEWIDTH,
- static_cast< UINT16 >(rSh.GetAnyCurRect(RECT_PAGE_PRT).Width()) ));
+ static_cast< sal_uInt16 >(rSh.GetAnyCurRect(RECT_PAGE_PRT).Width()) ));
if (!bDrawParaDlg)
{
@@ -209,24 +209,24 @@ void SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
{
if (!bDrawParaDlg)
{
- aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,TRUE));
+ aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,sal_True));
rPage.PageCreated(aSet);
}
}
else if( TP_PARA_EXT == nId )
{
// pagebreak only when the cursor is in the body-area and not in a table
- const USHORT eType = rSh.GetFrmType(0,TRUE);
+ const sal_uInt16 eType = rSh.GetFrmType(0,sal_True);
if( !(FRMTYPE_BODY & eType) ||
rSh.GetSelectionType() & nsSelectionType::SEL_TBL )
{
- aSet.Put(SfxBoolItem(SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK,TRUE));
+ aSet.Put(SfxBoolItem(SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK,sal_True));
rPage.PageCreated(aSet);
}
}
else if( TP_DROPCAPS == nId )
{
- ((SwDropCapsPage&)rPage).SetFormat(FALSE);
+ ((SwDropCapsPage&)rPage).SetFormat(sal_False);
}
else if( TP_BACKGROUND == nId )
{
@@ -256,7 +256,7 @@ void SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
aNames.Insert(new String(pBase->GetName()));
pBase = pPool->Next();
}
- for(USHORT i = 0; i < aNames.Count(); i++)
+ for(sal_uInt16 i = 0; i < aNames.Count(); i++)
rBox.InsertEntry(*aNames.GetObject(i));
}
diff --git a/sw/source/ui/chrdlg/swbreak.src b/sw/source/ui/chrdlg/swbreak.src
index 4a16489a5244..c75e7d67ddf6 100644
--- a/sw/source/ui/chrdlg/swbreak.src
+++ b/sw/source/ui/chrdlg/swbreak.src
@@ -32,7 +32,7 @@
// #define DLG_BREAK 256
ModalDialog DLG_BREAK
{
- HelpID = FN_INSERT_BREAK_DLG ;
+ HelpID = CMD_FN_INSERT_BREAK_DLG ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 161 , 114 ) ;
@@ -62,6 +62,7 @@ ModalDialog DLG_BREAK
};
RadioButton RB_LINE
{
+ HelpID = "sw:RadioButton:DLG_BREAK:RB_LINE";
Pos = MAP_APPFONT ( 12 , 15 ) ;
Size = MAP_APPFONT ( 63 , 10 ) ;
Text [ en-US ] = "~Line break" ;
@@ -70,6 +71,7 @@ ModalDialog DLG_BREAK
};
RadioButton RB_PAGE
{
+ HelpID = "sw:RadioButton:DLG_BREAK:RB_PAGE";
Pos = MAP_APPFONT ( 12 , 39 ) ;
Size = MAP_APPFONT ( 63 , 10 ) ;
Text [ en-US ] = "~Page break" ;
@@ -78,6 +80,7 @@ ModalDialog DLG_BREAK
};
RadioButton RB_COL
{
+ HelpID = "sw:RadioButton:DLG_BREAK:RB_COL";
Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 69 , 10 ) ;
Text [ en-US ] = "~Column break" ;
@@ -99,6 +102,7 @@ ModalDialog DLG_BREAK
};
ListBox LB_COLL
{
+ HelpID = "sw:ListBox:DLG_BREAK:LB_COLL";
Pos = MAP_APPFONT ( 12 , 62 ) ;
Size = MAP_APPFONT ( 75 , 50 ) ;
TabStop = TRUE ;
@@ -111,6 +115,7 @@ ModalDialog DLG_BREAK
};
CheckBox CB_PAGENUM
{
+ HelpID = "sw:CheckBox:DLG_BREAK:CB_PAGENUM";
Pos = MAP_APPFONT ( 12 , 79 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "Change page ~number" ;
@@ -118,6 +123,7 @@ ModalDialog DLG_BREAK
};
NumericField ED_PAGENUM
{
+ HelpID = "sw:NumericField:DLG_BREAK:ED_PAGENUM";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 94 ) ;
Size = MAP_APPFONT ( 31 , 12 ) ;
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index ed3b99d18343..b37bd7b49382 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -56,7 +56,7 @@
#include "swuiccoll.hxx"
-static USHORT aPageRg[] = {
+static sal_uInt16 aPageRg[] = {
FN_COND_COLL, FN_COND_COLL,
0
};
@@ -86,11 +86,15 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet)
pCmds( SwCondCollItem::GetCmds() ),
pFmt(0),
- bNewTemplate(FALSE)
+ bNewTemplate(sal_False)
{
FreeResource();
SetExchangeSupport();
+ aRemovePB.SetAccessibleRelationMemberOf(&aConditionFL);
+ aAssignPB.SetAccessibleRelationMemberOf(&aConditionFL);
+ aTbLinks.SetAccessibleRelationLabeledBy(&aConditionCB);
+
// Install handlers
aConditionCB.SetClickHdl( LINK(this, SwCondCollPage, OnOffHdl));
aTbLinks.SetDoubleClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl ));
@@ -101,7 +105,7 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet)
aStyleLB.SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl));
aFilterLB.SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl));
- aTbLinks.SetWindowBits(WB_HSCROLL|WB_CLIPCHILDREN);
+ aTbLinks.SetStyle(aTbLinks.GetStyle()|WB_HSCROLL|WB_CLIPCHILDREN);
aTbLinks.SetSelectionMode( SINGLE_SELECTION );
aTbLinks.SetTabs( &nTabs[0], MAP_APPFONT );
aTbLinks.Resize(); // OS: Hack for the right selection
@@ -114,7 +118,7 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet)
size_t nCount = aFamilies.size();
for( size_t i = 0; i < nCount; ++i )
{
- if(SFX_STYLE_FAMILY_PARA == (USHORT)(pFamilyItem = aFamilies.at( i ))->GetFamily())
+ if(SFX_STYLE_FAMILY_PARA == (sal_uInt16)(pFamilyItem = aFamilies.at( i ))->GetFamily())
break;
}
@@ -122,7 +126,7 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet)
for( size_t i = 0; i < rFilterList.size(); ++i )
{
aFilterLB.InsertEntry( rFilterList[ i ]->aName);
- USHORT* pFilter = new USHORT( rFilterList[ i ]->nFlags);
+ sal_uInt16* pFilter = new sal_uInt16(rFilterList[i]->nFlags);
aFilterLB.SetEntryData(i, pFilter);
}
aFilterLB.SelectEntryPos(1);
@@ -138,8 +142,8 @@ Page: Dtor
SwCondCollPage::~SwCondCollPage()
{
- for(USHORT i = 0; i < aFilterLB.GetEntryCount(); ++i)
- delete (USHORT*)aFilterLB.GetEntryData(i);
+ for(sal_uInt16 i = 0; i < aFilterLB.GetEntryCount(); ++i)
+ delete (sal_uInt16*)aFilterLB.GetEntryData(i);
}
@@ -167,11 +171,11 @@ Page: FillItemSet-Overload
****************************************************************************/
-BOOL SwCondCollPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwCondCollPage::FillItemSet(SfxItemSet &rSet)
{
- BOOL bModified = TRUE;
+ sal_Bool bModified = sal_True;
SwCondCollItem aCondItem;
- for(USHORT i = 0; i < aStrArr.Count(); i++)
+ for(sal_uInt16 i = 0; i < aStrArr.Count(); i++)
{
String sEntry = aTbLinks.GetEntryText(i, 1);
aCondItem.SetStyle( &sEntry, i);
@@ -207,7 +211,7 @@ void SwCondCollPage::Reset(const SfxItemSet &/*rSet*/)
}
aStyleLB.SelectEntryPos(0);
- for( USHORT n = 0; n < aStrArr.Count(); n++)
+ for( sal_uInt16 n = 0; n < aStrArr.Count(); n++)
{
String aEntry( aStrArr.GetString(n) );
aEntry += '\t';
@@ -228,17 +232,17 @@ void SwCondCollPage::Reset(const SfxItemSet &/*rSet*/)
}
-USHORT* SwCondCollPage::GetRanges()
+sal_uInt16* SwCondCollPage::GetRanges()
{
return aPageRg;
}
IMPL_LINK( SwCondCollPage, OnOffHdl, CheckBox*, pBox )
{
- const BOOL bEnable = pBox->IsChecked();
+ const sal_Bool bEnable = pBox->IsChecked();
aContextFT.Enable( bEnable );
aUsedFT .Enable( bEnable );
- aTbLinks .EnableList( bEnable != FALSE );
+ aTbLinks .EnableList( bEnable != sal_False );
aStyleFT .Enable( bEnable );
aStyleLB .Enable( bEnable );
aFilterLB .Enable( bEnable );
@@ -252,7 +256,7 @@ IMPL_LINK( SwCondCollPage, OnOffHdl, CheckBox*, pBox )
IMPL_LINK( SwCondCollPage, AssignRemoveHdl, PushButton*, pBtn)
{
SvLBoxEntry* pE = aTbLinks.FirstSelected();
- ULONG nPos;
+ sal_uLong nPos;
if( !pE || LISTBOX_ENTRY_NOTFOUND ==
( nPos = aTbLinks.GetModel()->GetAbsPos( pE ) ) )
{
@@ -260,21 +264,21 @@ IMPL_LINK( SwCondCollPage, AssignRemoveHdl, PushButton*, pBtn)
return 0;
}
- String sSel = aStrArr.GetString( USHORT(nPos) );
+ String sSel = aStrArr.GetString( sal_uInt16(nPos) );
sSel += '\t';
- const BOOL bAssEnabled = pBtn != &aRemovePB && aAssignPB.IsEnabled();
+ const sal_Bool bAssEnabled = pBtn != &aRemovePB && aAssignPB.IsEnabled();
aAssignPB.Enable( !bAssEnabled );
aRemovePB.Enable( bAssEnabled );
if ( bAssEnabled )
sSel += aStyleLB.GetSelectEntry();
- aTbLinks.SetUpdateMode(FALSE);
+ aTbLinks.SetUpdateMode(sal_False);
aTbLinks.GetModel()->Remove(pE);
pE = aTbLinks.InsertEntryToColumn(sSel, nPos);
aTbLinks.Select(pE);
aTbLinks.MakeVisible(pE);
- aTbLinks.SetUpdateMode(TRUE);
+ aTbLinks.SetUpdateMode(sal_True);
return 0;
}
@@ -283,8 +287,8 @@ IMPL_LINK( SwCondCollPage, SelectHdl, ListBox*, pBox)
if(pBox == &aFilterLB)
{
aStyleLB.Clear();
- USHORT nSearchFlags = pBox->GetSelectEntryPos();
- nSearchFlags = *(USHORT*)aFilterLB.GetEntryData(nSearchFlags);
+ sal_uInt16 nSearchFlags = pBox->GetSelectEntryPos();
+ nSearchFlags = *(sal_uInt16*)aFilterLB.GetEntryData(nSearchFlags);
SfxStyleSheetBasePool* pPool = rSh.GetView().GetDocShell()->GetStyleSheetPool();
pPool->SetSearchMask(SFX_STYLE_FAMILY_PARA, nSearchFlags);
const SfxStyleSheetBase* pBase = pPool->First();
@@ -316,7 +320,7 @@ IMPL_LINK( SwCondCollPage, SelectHdl, ListBox*, pBox)
return 0;
}
-void SwCondCollPage::SetCollection( SwFmt* pFormat, BOOL bNew )
+void SwCondCollPage::SetCollection( SwFmt* pFormat, sal_Bool bNew )
{
pFmt = pFormat;
bNewTemplate = bNew;
diff --git a/sw/source/ui/config/barcfg.cxx b/sw/source/ui/config/barcfg.cxx
index 2ed843925e53..9fcc614f6de8 100644
--- a/sw/source/ui/config/barcfg.cxx
+++ b/sw/source/ui/config/barcfg.cxx
@@ -48,11 +48,11 @@ using namespace com::sun::star::uno;
#define SEL_TYPE_BEZIER 3
#define SEL_TYPE_GRAPHIC 4
-SwToolbarConfigItem::SwToolbarConfigItem( BOOL bWeb ) :
+SwToolbarConfigItem::SwToolbarConfigItem( sal_Bool bWeb ) :
ConfigItem(bWeb ? C2U("Office.WriterWeb/ObjectBar") : C2U("Office.Writer/ObjectBar"),
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE)
{
- for(USHORT i = 0; i <= SEL_TYPE_GRAPHIC; i++ )
+ for(sal_uInt16 i = 0; i <= SEL_TYPE_GRAPHIC; i++ )
aTbxIdArray[i] = -1;
Sequence<OUString> aNames = GetPropertyNames();
diff --git a/sw/source/ui/config/caption.cxx b/sw/source/ui/config/caption.cxx
index 2ba821c99063..405a97694250 100644
--- a/sw/source/ui/config/caption.cxx
+++ b/sw/source/ui/config/caption.cxx
@@ -39,15 +39,15 @@
#define CAPTION_VERSION VERSION_01
InsCaptionOpt::InsCaptionOpt(const SwCapObjType eType, const SvGlobalName* pOleId) :
- bUseCaption(FALSE),
+ bUseCaption(sal_False),
eObjType(eType),
nNumType(SVX_NUM_ARABIC),
sNumberSeparator(RTL_CONSTASCII_USTRINGPARAM((". "))),
nPos(1),
nLevel(0),
sSeparator( String::CreateFromAscii( ": " ) ),
- bIgnoreSeqOpts(FALSE),
- bCopyAttributes(FALSE)
+ bIgnoreSeqOpts(sal_False),
+ bCopyAttributes(sal_False)
{
if (pOleId)
aOleId = *pOleId;
@@ -81,7 +81,7 @@ InsCaptionOpt& InsCaptionOpt::operator=( const InsCaptionOpt& rOpt )
return *this;
}
-BOOL InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const
+sal_Bool InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const
{
return (eObjType == rOpt.eObjType &&
aOleId == rOpt.aOleId); // So that identical Ole-IDs can't be added multiple
diff --git a/sw/source/ui/config/cfgitems.cxx b/sw/source/ui/config/cfgitems.cxx
index 9c4dde18dce2..abacb5330812 100644
--- a/sw/source/ui/config/cfgitems.cxx
+++ b/sw/source/ui/config/cfgitems.cxx
@@ -48,7 +48,7 @@ TYPEINIT1_AUTOFACTORY(SwElemItem, SfxPoolItem)
TYPEINIT1_AUTOFACTORY(SwAddPrinterItem, SfxPoolItem)
TYPEINIT1_AUTOFACTORY(SwShadowCursorItem, SfxPoolItem)
-SwDocDisplayItem::SwDocDisplayItem( USHORT _nWhich ) :
+SwDocDisplayItem::SwDocDisplayItem( sal_uInt16 _nWhich ) :
SfxPoolItem(_nWhich),
aIndexBackgrndCol(COL_GRAY)
{
@@ -60,7 +60,7 @@ SwDocDisplayItem::SwDocDisplayItem( USHORT _nWhich ) :
bFldHiddenText =
bCharHiddenText =
bManualBreak =
- bShowHiddenPara = FALSE;
+ bShowHiddenPara = sal_False;
};
@@ -73,17 +73,17 @@ SwDocDisplayItem::SwDocDisplayItem( const SwDocDisplayItem& rDocDisplayItem ):
*this = rDocDisplayItem;
};
-SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt, USHORT _nWhich ) :
+SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt, sal_uInt16 _nWhich ) :
SfxPoolItem( _nWhich )
{
- bParagraphEnd = rVOpt.IsParagraph(TRUE);
- bTab = rVOpt.IsTab(TRUE);
- bSpace = rVOpt.IsBlank(TRUE);
+ bParagraphEnd = rVOpt.IsParagraph(sal_True);
+ bTab = rVOpt.IsTab(sal_True);
+ bSpace = rVOpt.IsBlank(sal_True);
bNonbreakingSpace = rVOpt.IsHardBlank();
bSoftHyphen = rVOpt.IsSoftHyph();
- bCharHiddenText = rVOpt.IsShowHiddenChar(TRUE);
+ bCharHiddenText = rVOpt.IsShowHiddenChar(sal_True);
bFldHiddenText = rVOpt.IsShowHiddenField();
- bManualBreak = rVOpt.IsLineBreak(TRUE);
+ bManualBreak = rVOpt.IsLineBreak(sal_True);
bShowHiddenPara = rVOpt.IsShowHiddenPara();
}
@@ -135,7 +135,7 @@ void SwDocDisplayItem::FillViewOptions( SwViewOption& rVOpt) const
rVOpt.SetShowHiddenPara(bShowHiddenPara );
}
-SwElemItem::SwElemItem( USHORT _nWhich ) :
+SwElemItem::SwElemItem( sal_uInt16 _nWhich ) :
SfxPoolItem(_nWhich)
{
bHorzScrollbar =
@@ -152,7 +152,7 @@ SwElemItem::SwElemItem( USHORT _nWhich ) :
bGraphic =
bDrawing =
bFieldName =
- bNotes = FALSE;
+ bNotes = sal_False;
}
SwElemItem::SwElemItem( const SwElemItem& rElemItem ):
@@ -161,14 +161,14 @@ SwElemItem::SwElemItem( const SwElemItem& rElemItem ):
*this = rElemItem;
}
-SwElemItem::SwElemItem(const SwViewOption& rVOpt, USHORT _nWhich) :
+SwElemItem::SwElemItem(const SwViewOption& rVOpt, sal_uInt16 _nWhich) :
SfxPoolItem( _nWhich )
{
bHorzScrollbar = rVOpt.IsViewHScrollBar();
bVertScrollbar = rVOpt.IsViewVScrollBar();
bAnyRuler = rVOpt.IsViewAnyRuler();
- bHorzRuler = rVOpt.IsViewHRuler(TRUE);
- bVertRuler = rVOpt.IsViewVRuler(TRUE);
+ bHorzRuler = rVOpt.IsViewHRuler(sal_True);
+ bVertRuler = rVOpt.IsViewVRuler(sal_True);
bVertRulerRight = rVOpt.IsVRulerRight();
bCrosshair = rVOpt.IsCrossHair();
bHandles = rVOpt.IsSolidMarkHdl();
@@ -261,7 +261,7 @@ SwAddPrinterItem::SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem ):
/*--------------------------------------------------------------------
Description: CTOR for empty Item
--------------------------------------------------------------------*/
-SwAddPrinterItem::SwAddPrinterItem( USHORT _nWhich):
+SwAddPrinterItem::SwAddPrinterItem( sal_uInt16 _nWhich):
SfxPoolItem(_nWhich)
{
}
@@ -269,7 +269,7 @@ SwAddPrinterItem::SwAddPrinterItem( USHORT _nWhich):
/*--------------------------------------------------------------------
Description: CTOR from SwPrintOptions
--------------------------------------------------------------------*/
-SwAddPrinterItem::SwAddPrinterItem( USHORT _nWhich, const SwPrintData& rPrtData ) :
+SwAddPrinterItem::SwAddPrinterItem( sal_uInt16 _nWhich, const SwPrintData& rPrtData ) :
SfxPoolItem(_nWhich)
{
SwPrintData::operator=(rPrtData);
@@ -292,10 +292,10 @@ int SwAddPrinterItem::operator==( const SfxPoolItem& rAttr ) const
/*--------------------------------------------------
Item for Settings dialog, ShadowCursorPage
--------------------------------------------------*/
-SwShadowCursorItem::SwShadowCursorItem( USHORT _nWhich )
+SwShadowCursorItem::SwShadowCursorItem( sal_uInt16 _nWhich )
: SfxPoolItem( _nWhich ),
eMode( FILL_TAB )
- ,bOn( FALSE )
+ ,bOn( sal_False )
{
}
@@ -307,7 +307,7 @@ SwShadowCursorItem::SwShadowCursorItem( const SwShadowCursorItem& rCpy )
{
}
-SwShadowCursorItem::SwShadowCursorItem( const SwViewOption& rVOpt, USHORT _nWhich )
+SwShadowCursorItem::SwShadowCursorItem( const SwViewOption& rVOpt, sal_uInt16 _nWhich )
: SfxPoolItem( _nWhich ),
eMode( rVOpt.GetShdwCrsrFillMode() )
,bOn( rVOpt.IsShadowCursor() )
@@ -382,4 +382,4 @@ int SwTestItem::operator==( const SfxPoolItem& rAttr ) const
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sw/source/ui/config/fontcfg.cxx b/sw/source/ui/config/fontcfg.cxx
index 136f5b2eee5c..efc3c670fb15 100644
--- a/sw/source/ui/config/fontcfg.cxx
+++ b/sw/source/ui/config/fontcfg.cxx
@@ -179,9 +179,9 @@ SwStdFontConfig::~SwStdFontConfig()
{
}
-BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const
+sal_Bool SwStdFontConfig::IsFontDefault(sal_uInt16 nFontType) const
{
- BOOL bSame = sal_False;
+ sal_Bool bSame = sal_False;
SvtLinguOptions aLinguOpt;
SvtLinguConfig().GetOptions( aLinguOpt );
@@ -221,7 +221,7 @@ BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const
case FONT_CAPTION_CJK :
case FONT_INDEX_CJK :
{
- BOOL b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCJK;
+ sal_Bool b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCJK;
bSame = b1 && sDefaultFonts[nFontType] == sDefFontCJK;
}
break;
@@ -229,7 +229,7 @@ BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const
case FONT_CAPTION_CTL :
case FONT_INDEX_CTL :
{
- BOOL b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCTL;
+ sal_Bool b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCTL;
bSame = b1 && sDefaultFonts[nFontType] == sDefFontCTL;
}
break;
@@ -237,10 +237,10 @@ BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const
return bSame;
}
-String SwStdFontConfig::GetDefaultFor(USHORT nFontType, LanguageType eLang)
+String SwStdFontConfig::GetDefaultFor(sal_uInt16 nFontType, LanguageType eLang)
{
String sRet;
- USHORT nFontId;
+ sal_uInt16 nFontId;
switch( nFontType )
{
case FONT_OUTLINE :
@@ -271,7 +271,7 @@ String SwStdFontConfig::GetDefaultFor(USHORT nFontType, LanguageType eLang)
return aFont.GetName();
}
-sal_Int32 SwStdFontConfig::GetDefaultHeightFor(USHORT nFontType, LanguageType eLang)
+sal_Int32 SwStdFontConfig::GetDefaultHeightFor(sal_uInt16 nFontType, LanguageType eLang)
{
sal_Int32 nRet = FONTSIZE_DEFAULT;
switch( nFontType )
@@ -292,7 +292,7 @@ sal_Int32 SwStdFontConfig::GetDefaultHeightFor(USHORT nFontType, LanguageType eL
return nRet;
}
-void SwStdFontConfig::ChangeInt( USHORT nFontType, sal_Int32 nHeight )
+void SwStdFontConfig::ChangeInt( sal_uInt16 nFontType, sal_Int32 nHeight )
{
OSL_ENSURE( nFontType < DEF_FONT_COUNT, "invalid index in SwStdFontConfig::ChangInt()");
if( nFontType < DEF_FONT_COUNT && nDefaultFontHeight[nFontType] != nHeight)
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index 88e6e9c178e7..60206c39bb4c 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -184,7 +184,7 @@ SfxTabPage* SwMailConfigPage::Create( Window* pParent, const SfxItemSet& rAttrS
return new SwMailConfigPage(pParent, rAttrSet);
}
-BOOL SwMailConfigPage::FillItemSet( SfxItemSet& /*rSet*/ )
+sal_Bool SwMailConfigPage::FillItemSet( SfxItemSet& /*rSet*/ )
{
if(m_aDisplayNameED.GetText() != m_aDisplayNameED.GetSavedValue())
m_pConfigItem->SetMailDisplayName(m_aDisplayNameED.GetText());
@@ -306,7 +306,7 @@ SwTestAccountSettingsDialog::SwTestAccountSettingsDialog(SwMailConfigPage* pPare
m_aStatusLB.SetHelpId(HID_MM_TESTACCOUNTSETTINGS_TLB);
static long nTabs[] = {2, 0, aSz.Width()/2 };
- m_aStatusLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP );
+ m_aStatusLB.SetStyle( m_aStatusLB.GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP );
m_aStatusLB.SetSelectionMode( SINGLE_SELECTION );
m_aStatusLB.SetTabs(&nTabs[0], MAP_PIXEL);
short nEntryHeight = m_aStatusLB.GetEntryHeight();
diff --git a/sw/source/ui/config/mailconfigpage.src b/sw/source/ui/config/mailconfigpage.src
index 45401a0d4414..523f25e8e5f9 100644
--- a/sw/source/ui/config/mailconfigpage.src
+++ b/sw/source/ui/config/mailconfigpage.src
@@ -53,6 +53,7 @@ TabPage TP_MAILCONFIG
};
Edit ED_DISPLAYNAME
{
+ HelpID = "sw:Edit:TP_MAILCONFIG:ED_DISPLAYNAME";
Pos = MAP_APPFONT ( 88 , 14 ) ;
Size = MAP_APPFONT ( 160 , 12 ) ;
Border = TRUE;
@@ -65,12 +66,14 @@ TabPage TP_MAILCONFIG
};
Edit ED_ADDRESS
{
+ HelpID = "sw:Edit:TP_MAILCONFIG:ED_ADDRESS";
Pos = MAP_APPFONT ( 88 , 29 ) ;
Size = MAP_APPFONT ( 160 , 12 ) ;
Border = TRUE;
};
CheckBox CB_REPLYTO
{
+ HelpID = "sw:CheckBox:TP_MAILCONFIG:CB_REPLYTO";
Pos = MAP_APPFONT ( 12 , 45 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
Text[ en-US ] = "Send replies to ~different e-mail address";
@@ -83,6 +86,7 @@ TabPage TP_MAILCONFIG
};
Edit ED_REPLYTO
{
+ HelpID = "sw:Edit:TP_MAILCONFIG:ED_REPLYTO";
Pos = MAP_APPFONT ( 88 , 58 ) ;
Size = MAP_APPFONT ( 160 , 12 ) ;
Border = TRUE;
@@ -101,6 +105,7 @@ TabPage TP_MAILCONFIG
};
Edit ED_SERVER
{
+ HelpID = "sw:Edit:TP_MAILCONFIG:ED_SERVER";
Pos = MAP_APPFONT ( 88 , 87 ) ;
Size = MAP_APPFONT ( 105 , 12 ) ;
Border = TRUE;
@@ -114,6 +119,7 @@ TabPage TP_MAILCONFIG
};
NumericField NF_PORT
{
+ HelpID = "sw:NumericField:TP_MAILCONFIG:NF_PORT";
Pos = MAP_APPFONT ( 223 , 87 ) ;
Size = MAP_APPFONT ( 25 , 12 ) ;
Border = TRUE;
@@ -127,12 +133,14 @@ TabPage TP_MAILCONFIG
};
CheckBox CB_SECURE
{
+ HelpID = "sw:CheckBox:TP_MAILCONFIG:CB_SECURE";
Pos = MAP_APPFONT ( 12 , 104 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
Text[ en-US ] = "~Use secure connection (SSL)";
};
PushButton PB_AUTHENTICATION
{
+ HelpID = "sw:PushButton:TP_MAILCONFIG:PB_AUTHENTICATION";
Pos = MAP_APPFONT ( 88 , 118 ) ;
Size = MAP_APPFONT ( 105 , 14 ) ;
Text[ en-US ] = "Server Au~thentication";
@@ -144,6 +152,7 @@ TabPage TP_MAILCONFIG
};
PushButton PB_TEST
{
+ HelpID = "sw:PushButton:TP_MAILCONFIG:PB_TEST";
Pos = MAP_APPFONT ( 88 , 164 ) ;
Size = MAP_APPFONT ( 105 , 14 ) ;
Text[ en-US ] = "Test S~ettings...";
@@ -179,6 +188,7 @@ ModalDialog DLG_MM_TESTACCOUNTSETTINGS
};
MultiLineEdit ED_ERROR
{
+ HelpID = "sw:MultiLineEdit:DLG_MM_TESTACCOUNTSETTINGS:ED_ERROR";
Pos = MAP_APPFONT ( 6 , 79 ) ;
Size = MAP_APPFONT ( 238 , 60 ) ;
Border = TRUE;
@@ -191,6 +201,7 @@ ModalDialog DLG_MM_TESTACCOUNTSETTINGS
};
PushButton PB_STOP
{
+ HelpID = "sw:PushButton:DLG_MM_TESTACCOUNTSETTINGS:PB_STOP";
Pos = MAP_APPFONT ( 85 , 156 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text[ en-US ] = "~Stop";
@@ -261,12 +272,14 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION
CheckBox CB_AUTHENTICATION
{
+ HelpID = "sw:CheckBox:DLG_MM_SERVERAUTHENTICATION:CB_AUTHENTICATION";
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 238 , 10 ) ;
Text[ en-US ] = "The outgoing mail server (SMTP) requires au~thentication";
};
RadioButton RB_SEP_AUTHENTICATION
{
+ HelpID = "sw:RadioButton:DLG_MM_SERVERAUTHENTICATION:RB_SEP_AUTHENTICATION";
Pos = MAP_APPFONT ( 12 , 17 ) ;
Size = MAP_APPFONT ( 232 , 10 ) ;
Text[ en-US ] = "The outgoing mail server (SMTP) requires ~separate authentication";
@@ -285,6 +298,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION
};
Edit ED_USERNAME
{
+ HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_USERNAME";
Pos = MAP_APPFONT ( 78 , 42 ) ;
Size = MAP_APPFONT ( 115 , 12 ) ;
Border = TRUE;
@@ -297,6 +311,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION
};
Edit ED_OUTPASSWORD
{
+ HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_OUTPASSWORD";
Pos = MAP_APPFONT ( 78 , 57 ) ;
Size = MAP_APPFONT ( 115 , 12 ) ;
Border = TRUE;
@@ -304,6 +319,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION
};
RadioButton RB_SMPTAFTERPOP
{
+ HelpID = "sw:RadioButton:DLG_MM_SERVERAUTHENTICATION:RB_SMPTAFTERPOP";
Pos = MAP_APPFONT ( 12 , 73 ) ;
Size = MAP_APPFONT ( 232 , 20 ) ;
WordBreak = TRUE;
@@ -323,6 +339,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION
};
Edit ED_SERVER
{
+ HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_SERVER";
Pos = MAP_APPFONT ( 78 , 108 ) ;
Size = MAP_APPFONT ( 115 , 12 ) ;
Border = TRUE;
@@ -336,6 +353,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION
};
NumericField NF_PORT
{
+ HelpID = "sw:NumericField:DLG_MM_SERVERAUTHENTICATION:NF_PORT";
Pos = MAP_APPFONT ( 219 , 108 ) ;
Size = MAP_APPFONT ( 25 , 12 ) ;
Border = TRUE;
@@ -355,12 +373,14 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION
};
RadioButton RB_POP3
{
+ HelpID = "sw:RadioButton:DLG_MM_SERVERAUTHENTICATION:RB_POP3";
Pos = MAP_APPFONT ( 78 , 125 ) ;
Size = MAP_APPFONT ( 115 , 10 ) ;
Text[ en-US ] = "~POP 3";
};
RadioButton RB_IMAP
{
+ HelpID = "sw:RadioButton:DLG_MM_SERVERAUTHENTICATION:RB_IMAP";
Pos = MAP_APPFONT ( 78 , 138 ) ;
Size = MAP_APPFONT ( 115 , 10 ) ;
Text[ en-US ] = "~IMAP";
@@ -373,6 +393,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION
};
Edit ED_INUSERNAME
{
+ HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_INUSERNAME";
Pos = MAP_APPFONT ( 78 , 150 ) ;
Size = MAP_APPFONT ( 115 , 12 ) ;
Border = TRUE;
@@ -385,6 +406,7 @@ ModalDialog DLG_MM_SERVERAUTHENTICATION
};
Edit ED_INPASSWORD
{
+ HelpID = "sw:Edit:DLG_MM_SERVERAUTHENTICATION:ED_INPASSWORD";
Pos = MAP_APPFONT ( 78 , 165 ) ;
Size = MAP_APPFONT ( 115 , 12 ) ;
Border = TRUE;
diff --git a/sw/source/ui/config/makefile.mk b/sw/source/ui/config/makefile.mk
deleted file mode 100644
index d624e466c8bb..000000000000
--- a/sw/source/ui/config/makefile.mk
+++ /dev/null
@@ -1,87 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=config
-LIBTARGET=NO
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-IMGLST_SRS=$(SRS)$/config.srs
-BMP_IN=$(PRJ)$/win/imglst
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- mailconfigpage.src \
- optdlg.src \
- optload.src \
- optcomp.src \
- redlopt.src
-
-EXCEPTIONSFILES = \
- $(SLO)$/barcfg.obj \
- $(SLO)$/cfgitems.obj \
- $(SLO)$/fontcfg.obj \
- $(SLO)$/mailconfigpage.obj \
- $(SLO)$/modcfg.obj \
- $(SLO)$/optcomp.obj \
- $(SLO)$/optload.obj \
- $(SLO)$/optpage.obj \
- $(SLO)$/prtopt.obj \
- $(SLO)$/uinums.obj \
- $(SLO)$/usrpref.obj \
- $(SLO)$/viewopt.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/caption.obj \
- $(SLO)$/dbconfig.obj
-
-LIB1TARGET= $(SLB)$/$(TARGET).lib
-
-LIB1OBJFILES = \
- $(SLO)$/barcfg.obj \
- $(SLO)$/caption.obj \
- $(SLO)$/cfgitems.obj \
- $(SLO)$/dbconfig.obj \
- $(SLO)$/fontcfg.obj \
- $(SLO)$/modcfg.obj \
- $(SLO)$/prtopt.obj \
- $(SLO)$/uinums.obj \
- $(SLO)$/usrpref.obj \
- $(SLO)$/viewopt.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx
index 2d25081afb28..737d22d16660 100644
--- a/sw/source/ui/config/modcfg.cxx
+++ b/sw/source/ui/config/modcfg.cxx
@@ -64,7 +64,7 @@ SV_IMPL_PTRARR_SORT(InsCapOptArr, InsCaptionOptPtr)
InsCaptionOpt* InsCaptionOptArr::Find(const SwCapObjType eType, const SvGlobalName *pOleId) const
{
- for (USHORT i = 0; i < Count(); i++ )
+ for (sal_uInt16 i = 0; i < Count(); i++ )
{
InsCaptionOpt* pObj = GetObject(i);
if (pObj->GetObjType() == eType &&
@@ -78,7 +78,7 @@ InsCaptionOpt* InsCaptionOptArr::Find(const SwCapObjType eType, const SvGlobalNa
}
const InsCaptionOpt* SwModuleOptions::GetCapOption(
- BOOL bHTML, const SwCapObjType eType, const SvGlobalName *pOleId)
+ sal_Bool bHTML, const SwCapObjType eType, const SvGlobalName *pOleId)
{
if(bHTML)
{
@@ -87,10 +87,10 @@ const InsCaptionOpt* SwModuleOptions::GetCapOption(
}
else
{
- sal_Bool bFound = FALSE;
+ sal_Bool bFound = sal_False;
if(eType == OLE_CAP && pOleId)
{
- for( USHORT nId = 0; nId <= GLOB_NAME_CHART && !bFound; nId++)
+ for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART && !bFound; nId++)
bFound = *pOleId == aInsertConfig.aGlobalNames[nId ];
if(!bFound)
return aInsertConfig.pOLEMiscOpt;
@@ -99,9 +99,9 @@ const InsCaptionOpt* SwModuleOptions::GetCapOption(
}
}
-BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt)
+sal_Bool SwModuleOptions::SetCapOption(sal_Bool bHTML, const InsCaptionOpt* pOpt)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if(bHTML)
{
@@ -109,10 +109,10 @@ BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt)
}
else if (pOpt)
{
- sal_Bool bFound = FALSE;
+ sal_Bool bFound = sal_False;
if(pOpt->GetObjType() == OLE_CAP && &pOpt->GetOleId())
{
- for( USHORT nId = 0; nId <= GLOB_NAME_CHART; nId++)
+ for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART; nId++)
bFound = pOpt->GetOleId() == aInsertConfig.aGlobalNames[nId ];
if(!bFound)
{
@@ -134,22 +134,22 @@ BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt)
rArr.Insert(new InsCaptionOpt(*pOpt));
aInsertConfig.SetModified();
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
SwModuleOptions::SwModuleOptions() :
- aInsertConfig(FALSE),
- aWebInsertConfig(TRUE),
- aTableConfig(FALSE),
- aWebTableConfig(TRUE),
- bHideFieldTips(FALSE)
+ aInsertConfig(sal_False),
+ aWebInsertConfig(sal_True),
+ aTableConfig(sal_False),
+ aWebTableConfig(sal_True),
+ bHideFieldTips(sal_False)
{
}
-String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI)
+String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, sal_Bool bFromUI)
{
String sReturn;
if(bFromUI)
@@ -176,7 +176,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI)
case 'x':
{
sal_Unicode nVal, nChar;
- BOOL bValidData = TRUE;
+ sal_Bool bValidData = sal_True;
xub_StrLen n;
for( n = 0, nChar = 0; n < 2 && i < rDelim.Len(); ++n, ++i )
{
@@ -189,7 +189,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI)
else
{
OSL_FAIL("wrong hex value" );
- bValidData = FALSE;
+ bValidData = sal_False;
break;
}
@@ -930,7 +930,7 @@ void SwInsertConfig::Load()
else if(!bIsWeb)
return;
- USHORT nInsTblFlags = 0;
+ sal_uInt16 nInsTblFlags = 0;
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
{
if(pValues[nProp].hasValue())
@@ -1204,10 +1204,10 @@ void SwTableConfig::Load()
sal_Int32 nTemp = 0;
switch(nProp)
{
- case 0 : pValues[nProp] >>= nTemp; nTblHMove = (USHORT)MM100_TO_TWIP(nTemp); break; //"Shift/Row",
- case 1 : pValues[nProp] >>= nTemp; nTblVMove = (USHORT)MM100_TO_TWIP(nTemp); break; //"Shift/Column",
- case 2 : pValues[nProp] >>= nTemp; nTblHInsert = (USHORT)MM100_TO_TWIP(nTemp); break; //"Insert/Row",
- case 3 : pValues[nProp] >>= nTemp; nTblVInsert = (USHORT)MM100_TO_TWIP(nTemp); break; //"Insert/Column",
+ case 0 : pValues[nProp] >>= nTemp; nTblHMove = (sal_uInt16)MM100_TO_TWIP(nTemp); break; //"Shift/Row",
+ case 1 : pValues[nProp] >>= nTemp; nTblVMove = (sal_uInt16)MM100_TO_TWIP(nTemp); break; //"Shift/Column",
+ case 2 : pValues[nProp] >>= nTemp; nTblHInsert = (sal_uInt16)MM100_TO_TWIP(nTemp); break; //"Insert/Row",
+ case 3 : pValues[nProp] >>= nTemp; nTblVInsert = (sal_uInt16)MM100_TO_TWIP(nTemp); break; //"Insert/Column",
case 4 : pValues[nProp] >>= nTemp; eTblChgMode = (TblChgMode)nTemp; break; //"Change/Effect",
case 5 : bInsTblFormatNum = *(sal_Bool*)pValues[nProp].getValue(); break; //"Input/NumberRecognition",
case 6 : bInsTblChangeNumFormat = *(sal_Bool*)pValues[nProp].getValue(); break; //"Input/NumberFormatRecognition",
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 3a9106fba4d9..3fa35d7e1c51 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -136,7 +136,7 @@ SwCompatibilityOptPage::SwCompatibilityOptPage( Window* pParent, const SfxItemSe
{
// init options strings with local resource ids -> so do it before FreeResource()
- for ( USHORT nResId = STR_COMP_OPTIONS_START; nResId < STR_COMP_OPTIONS_END; ++nResId )
+ for ( sal_uInt16 nResId = STR_COMP_OPTIONS_START; nResId < STR_COMP_OPTIONS_END; ++nResId )
{
String sEntry = String( SW_RES( nResId ) );
if ( STR_TAB_ALIGNMENT == nResId ||
@@ -148,10 +148,10 @@ SwCompatibilityOptPage::SwCompatibilityOptPage( Window* pParent, const SfxItemSe
if ( pEntry )
{
m_aOptionsLB.SetCheckButtonState( pEntry, SV_BUTTON_UNCHECKED );
- pEntry->SetUserData( (void*)(ULONG)nResId );
+ pEntry->SetUserData( (void*)(sal_uLong)nResId );
}
}
- m_aOptionsLB.SetWindowBits( m_aOptionsLB.GetStyle() | WB_HSCROLL | WB_HIDESELECTION );
+ m_aOptionsLB.SetStyle( m_aOptionsLB.GetStyle() | WB_HSCROLL | WB_HIDESELECTION );
m_aOptionsLB.SetHighlightRange();
FreeResource();
@@ -211,7 +211,7 @@ void SwCompatibilityOptPage::ReplaceFormatName( String& rEntry )
}
}
-ULONG convertBools2Ulong_Impl
+sal_uLong convertBools2Ulong_Impl
(
bool _bUsePrtMetrics,
bool _bAddSpacing,
@@ -226,8 +226,8 @@ ULONG convertBools2Ulong_Impl
bool _bExpandWordSpace
)
{
- ULONG nRet = 0;
- ULONG nSetBit = 1;
+ sal_uLong nRet = 0;
+ sal_uLong nSetBit = 1;
if ( _bUsePrtMetrics )
nRet |= nSetBit;
@@ -271,7 +271,7 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
String sDocTitle;
const SfxPoolItem* pItem = NULL;
SfxObjectShell* pObjShell = NULL;
- if ( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_WRTSHELL, FALSE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_WRTSHELL, sal_False, &pItem ) )
m_pWrtShell = (SwWrtShell*)( (const SwPtrItem*)pItem )->GetValue();
if ( m_pWrtShell )
{
@@ -369,8 +369,8 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
if ( sNewEntry.Len() == 0 )
sNewEntry = sName;
- USHORT nPos = m_aFormattingLB.InsertEntry( sNewEntry );
- ULONG nOptions = convertBools2Ulong_Impl(
+ sal_uInt16 nPos = m_aFormattingLB.InsertEntry( sNewEntry );
+ sal_uLong nOptions = convertBools2Ulong_Impl(
bUsePrtMetrics, bAddSpacing, bAddSpacingAtPages,
bUseOurTabStops, bNoExtLeading, bUseLineSpacing,
bAddTableSpacing, bUseObjPos, bUseOurTextWrapping,
@@ -399,8 +399,8 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
IMPL_LINK( SwCompatibilityOptPage, SelectHdl, ListBox*, EMPTYARG )
{
- USHORT nPos = m_aFormattingLB.GetSelectEntryPos();
- ULONG nOptions = (ULONG)(void*)m_aFormattingLB.GetEntryData( nPos );
+ sal_uInt16 nPos = m_aFormattingLB.GetSelectEntryPos();
+ sal_uLong nOptions = (sal_uLong)(void*)m_aFormattingLB.GetEntryData( nPos );
SetCurrentOptions( nOptions );
return 0;
@@ -416,10 +416,10 @@ IMPL_LINK( SwCompatibilityOptPage, UseAsDefaultHdl, PushButton*, EMPTYARG )
{
if ( pItem->m_bIsDefault )
{
- USHORT nCount = static_cast< USHORT >( m_aOptionsLB.GetEntryCount() );
- for ( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = static_cast< sal_uInt16 >( m_aOptionsLB.GetEntryCount() );
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
- bool bChecked = ( m_aOptionsLB.IsChecked(i) != FALSE );
+ bool bChecked = ( m_aOptionsLB.IsChecked(i) != sal_False );
CompatibilityOptions eOption = static_cast< CompatibilityOptions >(i);
switch ( eOption )
{
@@ -450,21 +450,21 @@ IMPL_LINK( SwCompatibilityOptPage, UseAsDefaultHdl, PushButton*, EMPTYARG )
return 0;
}
-void SwCompatibilityOptPage::SetCurrentOptions( ULONG nOptions )
+void SwCompatibilityOptPage::SetCurrentOptions( sal_uLong nOptions )
{
- ULONG nCount = m_aOptionsLB.GetEntryCount();
+ sal_uLong nCount = m_aOptionsLB.GetEntryCount();
OSL_ENSURE( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" );
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
- BOOL bChecked = ( ( nOptions & 0x00000001 ) == 0x00000001 );
+ sal_Bool bChecked = ( ( nOptions & 0x00000001 ) == 0x00000001 );
m_aOptionsLB.CheckEntryPos( i, bChecked );
nOptions = nOptions >> 1;
}
}
-ULONG SwCompatibilityOptPage::GetDocumentOptions() const
+sal_uLong SwCompatibilityOptPage::GetDocumentOptions() const
{
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if ( m_pWrtShell )
{
const IDocumentSettingAccess& rIDocumentSettingAccess = *m_pWrtShell->getIDocumentSettingAccess();
@@ -503,75 +503,75 @@ SfxTabPage* SwCompatibilityOptPage::Create( Window* pParent, const SfxItemSet& r
return new SwCompatibilityOptPage( pParent, rAttrSet );
}
-BOOL SwCompatibilityOptPage::FillItemSet( SfxItemSet& )
+sal_Bool SwCompatibilityOptPage::FillItemSet( SfxItemSet& )
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if ( m_pWrtShell )
{
- ULONG nSavedOptions = m_nSavedOptions;
- ULONG nCount = m_aOptionsLB.GetEntryCount();
+ sal_uLong nSavedOptions = m_nSavedOptions;
+ sal_uLong nCount = m_aOptionsLB.GetEntryCount();
OSL_ENSURE( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" );
bool bSetParaSpaceMax = false;
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
CompatibilityOptions nOption = static_cast< CompatibilityOptions >(i);
- BOOL bChecked = m_aOptionsLB.IsChecked(i);
- BOOL bSavedChecked = ( ( nSavedOptions & 0x00000001 ) == 0x00000001 );
+ sal_Bool bChecked = m_aOptionsLB.IsChecked(i);
+ sal_Bool bSavedChecked = ( ( nSavedOptions & 0x00000001 ) == 0x00000001 );
if ( bChecked != bSavedChecked )
{
if ( COPT_USE_PRINTERDEVICE == nOption )
{
m_pWrtShell->SetUseVirDev( !bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( ( COPT_ADD_SPACING == nOption || COPT_ADD_SPACING_AT_PAGES == nOption ) && !bSetParaSpaceMax )
bSetParaSpaceMax = true;
else if ( COPT_USE_OUR_TABSTOPS == nOption )
{
m_pWrtShell->SetTabCompat( !bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_NO_EXTLEADING == nOption )
{
m_pWrtShell->SetAddExtLeading( !bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_USE_LINESPACING == nOption )
{
m_pWrtShell->SetUseFormerLineSpacing( bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_ADD_TABLESPACING == nOption )
{
m_pWrtShell->SetAddParaSpacingToTableCells( bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_ADD_TABLESPACING == nOption )
{
m_pWrtShell->SetAddParaSpacingToTableCells( bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_USE_OBJECTPOSITIONING == nOption )
{
m_pWrtShell->SetUseFormerObjectPositioning( bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_USE_OUR_TEXTWRAPPING == nOption )
{
m_pWrtShell->SetUseFormerTextWrapping( bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_CONSIDER_WRAPPINGSTYLE == nOption )
{
m_pWrtShell->SetConsiderWrapOnObjPos( bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
else if ( COPT_EXPAND_WORDSPACE == nOption )
{
m_pWrtShell->SetDoNotJustifyLinesWithManualBreak( !bChecked );
- bModified = TRUE;
+ bModified = sal_True;
}
}
@@ -580,9 +580,9 @@ BOOL SwCompatibilityOptPage::FillItemSet( SfxItemSet& )
if ( bSetParaSpaceMax )
{
- m_pWrtShell->SetParaSpaceMax( m_aOptionsLB.IsChecked( (USHORT)COPT_ADD_SPACING ) );
- m_pWrtShell->SetParaSpaceMaxAtPages( m_aOptionsLB.IsChecked( (USHORT)COPT_ADD_SPACING_AT_PAGES ) );
- bModified = TRUE;
+ m_pWrtShell->SetParaSpaceMax( m_aOptionsLB.IsChecked( (sal_uInt16)COPT_ADD_SPACING ) );
+ m_pWrtShell->SetParaSpaceMaxAtPages( m_aOptionsLB.IsChecked( (sal_uInt16)COPT_ADD_SPACING_AT_PAGES ) );
+ bModified = sal_True;
}
}
@@ -596,7 +596,7 @@ void SwCompatibilityOptPage::Reset( const SfxItemSet& )
{
m_aOptionsLB.SelectEntryPos( 0 );
- ULONG nOptions = GetDocumentOptions();
+ sal_uLong nOptions = GetDocumentOptions();
SetCurrentOptions( nOptions );
m_nSavedOptions = nOptions;
}
diff --git a/sw/source/ui/config/optcomp.src b/sw/source/ui/config/optcomp.src
index 927eadc183a1..bdaa609b26b0 100644
--- a/sw/source/ui/config/optcomp.src
+++ b/sw/source/ui/config/optcomp.src
@@ -50,6 +50,7 @@ TabPage TP_OPTCOMPATIBILITY_PAGE
};
ListBox LB_FORMATTING
{
+ HelpID = "sw:ListBox:TP_OPTCOMPATIBILITY_PAGE:LB_FORMATTING";
Pos = MAP_APPFONT ( 12 , 25 ) ;
Size = MAP_APPFONT ( 118 , 24 ) ;
DropDown = TRUE;
@@ -70,12 +71,14 @@ TabPage TP_OPTCOMPATIBILITY_PAGE
};
PushButton PB_RESET
{
+ HelpID = "sw:PushButton:TP_OPTCOMPATIBILITY_PAGE:PB_RESET";
Pos = MAP_APPFONT ( 125 , 165 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "~Reset";
};
PushButton PB_DEFAULT
{
+ HelpID = "sw:PushButton:TP_OPTCOMPATIBILITY_PAGE:PB_DEFAULT";
Pos = MAP_APPFONT ( 188 , 165 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "Use as ~Default";
diff --git a/sw/source/ui/config/optdlg.hrc b/sw/source/ui/config/optdlg.hrc
index 1e129daf94c9..4ae710af5ea0 100644
--- a/sw/source/ui/config/optdlg.hrc
+++ b/sw/source/ui/config/optdlg.hrc
@@ -30,7 +30,7 @@
#define FL_NOPRINT 2
#define FL_WINDOW 3
-#define CB_GRF 1
+#define CB_GRF 1
#define CB_TBL 2
#define CB_DRWFAST 3
#define CB_FIELD 4
@@ -39,10 +39,10 @@
#define CB_SPACE 7
#define CB_HSPACE 8
#define CB_SHYPH 9
-#define CB_FLD_HIDDEN 10
+#define CB_FLD_HIDDEN 10
#define CB_BREAK 11
#define CB_ANY_RULER 12
-#define CB_CROSS 14
+#define CB_CROSS 14
#define CB_HSCROLL 15
#define CB_VSCROLL 16
#define CB_HRULER 17
@@ -50,7 +50,7 @@
#define FL_LINE 22
#define CB_POSTIT 23
#define CB_VRULER_RIGHT 24
-#define CB_BIGHANDLE 25
+#define CB_BIGHANDLE 25
#define FL_SETTINGS 26
#define LB_METRIC 27
@@ -191,7 +191,7 @@
#define FL_TABLE_SEPARATOR 139
#define CB_PROSPECT_RTL 140
-#define FL_SHDWCRSFLAG 1
+#define FL_SHDWCRSFLAG 1
#define CB_SHDWCRSONOFF 2
#define FL_SHDWCRSMODE 3
#define FT_SHDWCRSFILLMODE 4
@@ -201,5 +201,8 @@
#define RB_SHDWCRSFILLSPACE 8
#define CB_ALLOW_IN_PROT 12
#define FL_CRSR_OPT 13
-#define FL_SEPARATOR_SHDW 14
+#define FL_SEPARATOR_SHDW 14
+#define FL_LAYOUT_OPTIONS 15
+#define CB_MATH_BASELINE_ALIGNMENT 16
+
diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src
index e3d497653131..70113fdf6842 100644
--- a/sw/source/ui/config/optdlg.src
+++ b/sw/source/ui/config/optdlg.src
@@ -56,18 +56,21 @@ TabPage TP_CONTENT_OPT
};
CheckBox CB_CROSS
{
+ HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_CROSS";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 118 , 10 ) ;
Text [ en-US ] = "Guides ~while moving";
};
CheckBox CB_HANDLE
{
+ HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_HANDLE";
Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 118 , 10 ) ;
Text [ en-US ] = "Sim~ple handles";
};
CheckBox CB_BIGHANDLE
{
+ HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_BIGHANDLE";
Pos = MAP_APPFONT ( 12 , 40 ) ;
Size = MAP_APPFONT ( 118 , 10 ) ;
Text [ en-US ] = "Large handles";
@@ -81,54 +84,63 @@ TabPage TP_CONTENT_OPT
};
CheckBox CB_HSCROLL
{
+ HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_HSCROLL";
Pos = MAP_APPFONT ( 136 , 14 ) ;
Size = MAP_APPFONT ( 108 , 10 ) ;
Text [ en-US ] = "H~orizontal scrollbar" ;
};
CheckBox CB_VSCROLL
{
+ HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_VSCROLL";
Pos = MAP_APPFONT ( 136 , 27 ) ;
Size = MAP_APPFONT ( 108 , 10 ) ;
Text [ en-US ] = "~Vertical scrollbar" ;
};
CheckBox CB_ANY_RULER
{
+ HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_ANY_RULER";
Pos = MAP_APPFONT ( 136 , 40 ) ;
Size = MAP_APPFONT ( 65 , 10 ) ;
Text [ en-US ] = "R~uler" ;
};
CheckBox CB_HRULER
{
+ HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_HRULER";
Pos = MAP_APPFONT ( 142 , 53 ) ;
Size = MAP_APPFONT ( 62 , 10 ) ;
Text [ en-US ] = "Hori~zontal ruler" ;
};
ListBox LB_HMETRIC
{
+ HelpID = "sw:ListBox:TP_CONTENT_OPT:LB_HMETRIC";
Pos = MAP_APPFONT ( 206 , 51 ) ;
Size = MAP_APPFONT ( 45 , 60 ) ;
DropDown = TRUE;
};
CheckBox CB_VRULER
{
+ HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_VRULER";
Pos = MAP_APPFONT ( 142 , 66 ) ;
Size = MAP_APPFONT ( 62 , 10 ) ;
Text [ en-US ] = "Verti~cal ruler" ;
};
CheckBox CB_VRULER_RIGHT
{
+ HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_VRULER_RIGHT";
Pos = MAP_APPFONT ( 148 , 79 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "Right-aligned";
};
ListBox LB_VMETRIC
{
+ HelpID = "sw:ListBox:TP_CONTENT_OPT:LB_VMETRIC";
Pos = MAP_APPFONT ( 206 , 64 ) ;
Size = MAP_APPFONT ( 45 , 60 ) ;
DropDown = TRUE;
};
CheckBox CB_SMOOTH_SCROLL
{
+ HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_SMOOTH_SCROLL";
Pos = MAP_APPFONT ( 136 , 79 ) ;
Size = MAP_APPFONT ( 108 , 10 ) ;
Text [ en-US ] = "S~mooth scroll" ;
@@ -142,6 +154,7 @@ TabPage TP_CONTENT_OPT
};
CheckBox CB_GRF
{
+ HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_GRF";
Pos = MAP_APPFONT ( 12 , 67 ) ;
Size = MAP_APPFONT ( 108 , 10 ) ;
Text [ en-US ] = "~Graphics and objects" ;
@@ -150,24 +163,28 @@ TabPage TP_CONTENT_OPT
};
CheckBox CB_TBL
{
+ HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_TBL";
Pos = MAP_APPFONT ( 12 , 80 ) ;
Size = MAP_APPFONT ( 108 , 10 ) ;
Text [ en-US ] = "~Tables " ;
};
CheckBox CB_DRWFAST
{
+ HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_DRWFAST";
Pos = MAP_APPFONT ( 12 , 93 ) ;
Size = MAP_APPFONT ( 108 , 10 ) ;
Text [ en-US ] = "Dra~wings and controls" ;
};
CheckBox CB_FIELD
{
+ HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_FIELD";
Pos = MAP_APPFONT ( 12 , 106 ) ;
Size = MAP_APPFONT ( 108 , 10 ) ;
Text [ en-US ] = "~Field codes" ;
};
CheckBox CB_POSTIT
{
+ HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_POSTIT";
Pos = MAP_APPFONT ( 12 , 119 ) ;
Size = MAP_APPFONT ( 108 , 10 ) ;
Text [ en-US ] = "~Comments" ;
@@ -188,6 +205,7 @@ TabPage TP_CONTENT_OPT
};
ListBox LB_METRIC
{
+ HelpID = "sw:ListBox:TP_CONTENT_OPT:LB_METRIC";
Pos = MAP_APPFONT ( 199, 133 ) ;
Size = MAP_APPFONT ( 50 , 50 ) ;
Border = TRUE ;
@@ -214,6 +232,7 @@ TabPage TP_OPTPRINT_PAGE
};
CheckBox CB_PGRF /*functionally merged with CB_PDRAW*/
{
+ HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PGRF";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "~Pictures and objects" ;
@@ -224,6 +243,7 @@ TabPage TP_OPTPRINT_PAGE
removed, tables now always get printed
CheckBox CB_PTAB
{
+ HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PTAB";
Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "~Tables" ;
@@ -233,6 +253,7 @@ TabPage TP_OPTPRINT_PAGE
functionally merged with CB_PGRF (pictures and graphics)
CheckBox CB_PDRAW
{
+ HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PDRAW";
Pos = MAP_APPFONT ( 12 , 40 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Dra~wings" ;
@@ -240,30 +261,35 @@ TabPage TP_OPTPRINT_PAGE
*/
CheckBox CB_CTRLFLD
{
+ HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_CTRLFLD";
Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Form control~s" ;
};
CheckBox CB_BACKGROUND
{
+ HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_BACKGROUND";
Pos = MAP_APPFONT ( 12 , 40 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Page ba~ckground" ;
};
CheckBox CB_BLACK_FONT
{
+ HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_BLACK_FONT";
Pos = MAP_APPFONT ( 12 , 53 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Print text in blac~k" ;
};
CheckBox CB_HIDDEN_TEXT
{
+ HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_HIDDEN_TEXT";
Pos = MAP_APPFONT ( 12 , 66 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Hidden te~xt" ;
};
CheckBox CB_TEXT_PLACEHOLDER
{
+ HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_TEXT_PLACEHOLDER";
Pos = MAP_APPFONT ( 12 , 79 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Text ~placeholder" ;
@@ -283,6 +309,7 @@ TabPage TP_OPTPRINT_PAGE
};
CheckBox CB_LEFTP
{
+ HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_LEFTP";
Pos = MAP_APPFONT ( 96 , 14 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "~Left pages" ;
@@ -291,6 +318,7 @@ TabPage TP_OPTPRINT_PAGE
};
CheckBox CB_RIGHTP
{
+ HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_RIGHTP";
Pos = MAP_APPFONT ( 96 , 27 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "~Right pages" ;
@@ -299,6 +327,7 @@ TabPage TP_OPTPRINT_PAGE
removed, noe handled by the new print dialog (i.e. vcl) itself
CheckBox CB_REVERSE
{
+ HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_REVERSE";
Pos = MAP_APPFONT ( 96 , 40 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Re~versed" ;
@@ -306,12 +335,14 @@ TabPage TP_OPTPRINT_PAGE
*/
CheckBox CB_PROSPECT
{
+ HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PROSPECT";
Pos = MAP_APPFONT ( 96 , 40 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Broch~ure" ;
};
CheckBox CB_PROSPECT_RTL
{
+ HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PROSPECT_RTL";
Pos = MAP_APPFONT ( 103 , 53 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Right to Left" ;
@@ -319,6 +350,7 @@ TabPage TP_OPTPRINT_PAGE
};
RadioButton RB_NO
{
+ HelpID = "sw:RadioButton:TP_OPTPRINT_PAGE:RB_NO";
Pos = MAP_APPFONT ( 180 , 14 ) ;
Size = MAP_APPFONT ( 74 , 10 ) ;
Text [ en-US ] = "~None" ;
@@ -327,18 +359,21 @@ TabPage TP_OPTPRINT_PAGE
};
RadioButton RB_ONLY
{
+ HelpID = "sw:RadioButton:TP_OPTPRINT_PAGE:RB_ONLY";
Pos = MAP_APPFONT ( 180 , 27 ) ;
Size = MAP_APPFONT ( 74 , 10 ) ;
Text [ en-US ] = "Comments ~only" ;
};
RadioButton RB_END
{
+ HelpID = "sw:RadioButton:TP_OPTPRINT_PAGE:RB_END";
Pos = MAP_APPFONT ( 180 , 40 ) ;
Size = MAP_APPFONT ( 74 , 10 ) ;
Text [ en-US ] = "End of docu~ment" ;
};
RadioButton RB_PAGEEND
{
+ HelpID = "sw:RadioButton:TP_OPTPRINT_PAGE:RB_PAGEEND";
Pos = MAP_APPFONT ( 180 , 53 ) ;
Size = MAP_APPFONT ( 74 , 10 ) ;
Text [ en-US ] = "~End of page" ;
@@ -365,6 +400,7 @@ TabPage TP_OPTPRINT_PAGE
};
CheckBox CB_PRINTEMPTYPAGES
{
+ HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PRINTEMPTYPAGES";
Pos = MAP_APPFONT ( 12 , 106 ) ;
Size = MAP_APPFONT ( 200 , 10 ) ;
TabStop = TRUE ;
@@ -373,6 +409,7 @@ TabPage TP_OPTPRINT_PAGE
/*
CheckBox CB_SINGLEJOBS
{
+ HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_SINGLEJOBS";
Pos = MAP_APPFONT ( 12 , 119 ) ;
Size = MAP_APPFONT ( 200 , 10 ) ;
TabStop = TRUE ;
@@ -381,6 +418,7 @@ TabPage TP_OPTPRINT_PAGE
*/
CheckBox CB_PAPERFROMSETUP
{
+ HelpID = "sw:CheckBox:TP_OPTPRINT_PAGE:CB_PAPERFROMSETUP";
Pos = MAP_APPFONT ( 12 , 119 ) ;
Size = MAP_APPFONT ( 200 , 10 ) ;
TabStop = TRUE ;
@@ -395,6 +433,7 @@ TabPage TP_OPTPRINT_PAGE
};
ListBox LB_FAX
{
+ HelpID = "sw:ListBox:TP_OPTPRINT_PAGE:LB_FAX";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 132 ) ;
Size = MAP_APPFONT ( 184 , 70 ) ;
@@ -437,6 +476,7 @@ TabPage TP_STD_FONT
};
MetricBox LB_STANDARD_SIZE
{
+ HelpID = "sw:MetricBox:TP_STD_FONT:LB_STANDARD_SIZE";
Pos = MAP_APPFONT ( 204 , 25 ) ;
Size = MAP_APPFONT ( 30 , 60 ) ;
Border = TRUE ;
@@ -444,6 +484,7 @@ TabPage TP_STD_FONT
};
MetricBox LB_TITLE_SIZE
{
+ HelpID = "sw:MetricBox:TP_STD_FONT:LB_TITLE_SIZE";
Pos = MAP_APPFONT ( 204 , 42 ) ;
Size = MAP_APPFONT ( 30 , 60 ) ;
Border = TRUE ;
@@ -451,6 +492,7 @@ TabPage TP_STD_FONT
};
MetricBox LB_LIST_SIZE
{
+ HelpID = "sw:MetricBox:TP_STD_FONT:LB_LIST_SIZE";
Pos = MAP_APPFONT ( 204 , 59 ) ;
Size = MAP_APPFONT ( 30 , 60 ) ;
Border = TRUE ;
@@ -458,6 +500,7 @@ TabPage TP_STD_FONT
};
MetricBox LB_LABEL_SIZE
{
+ HelpID = "sw:MetricBox:TP_STD_FONT:LB_LABEL_SIZE";
Pos = MAP_APPFONT ( 204 , 76 ) ;
Size = MAP_APPFONT ( 30 , 60 ) ;
Border = TRUE ;
@@ -465,6 +508,7 @@ TabPage TP_STD_FONT
};
MetricBox LB_INDEX_SIZE
{
+ HelpID = "sw:MetricBox:TP_STD_FONT:LB_INDEX_SIZE";
Pos = MAP_APPFONT ( 204 , 93 ) ;
Size = MAP_APPFONT ( 30 , 60 ) ;
Border = TRUE ;
@@ -507,6 +551,7 @@ TabPage TP_STD_FONT
};
ComboBox LB_STANDARD
{
+ HelpID = "sw:ComboBox:TP_STD_FONT:LB_STANDARD";
Pos = MAP_APPFONT ( 63 , 25 ) ;
Size = MAP_APPFONT ( 135 , 73 ) ;
TabStop = TRUE ;
@@ -515,6 +560,7 @@ TabPage TP_STD_FONT
};
ComboBox LB_TITLE
{
+ HelpID = "sw:ComboBox:TP_STD_FONT:LB_TITLE";
Pos = MAP_APPFONT ( 63 , 42 ) ;
Size = MAP_APPFONT ( 135, 73 ) ;
TabStop = TRUE ;
@@ -523,6 +569,7 @@ TabPage TP_STD_FONT
};
ComboBox LB_LIST
{
+ HelpID = "sw:ComboBox:TP_STD_FONT:LB_LIST";
Pos = MAP_APPFONT ( 63 , 59 ) ;
Size = MAP_APPFONT ( 135 , 73 ) ;
TabStop = TRUE ;
@@ -531,6 +578,7 @@ TabPage TP_STD_FONT
};
ComboBox LB_LABEL
{
+ HelpID = "sw:ComboBox:TP_STD_FONT:LB_LABEL";
Pos = MAP_APPFONT ( 63 , 76 ) ;
Size = MAP_APPFONT ( 135 , 73 ) ;
TabStop = TRUE ;
@@ -539,6 +587,7 @@ TabPage TP_STD_FONT
};
ComboBox LB_IDX
{
+ HelpID = "sw:ComboBox:TP_STD_FONT:LB_IDX";
Pos = MAP_APPFONT ( 63 , 94 ) ;
Size = MAP_APPFONT ( 135, 73 ) ;
TabStop = TRUE ;
@@ -547,12 +596,14 @@ TabPage TP_STD_FONT
};
CheckBox CB_DOCONLY
{
+ HelpID = "sw:CheckBox:TP_STD_FONT:CB_DOCONLY";
Pos = MAP_APPFONT ( 12 , 111 ) ;
Size = MAP_APPFONT ( 147 , 10 ) ;
Text [ en-US ] = "C~urrent document only" ;
};
PushButton PB_STANDARD
{
+ HelpID = "sw:PushButton:TP_STD_FONT:PB_STANDARD";
Pos = MAP_APPFONT ( 204 , 165 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Default" ;
@@ -588,6 +639,7 @@ TabPage TP_OPTTABLE_PAGE
};
CheckBox CB_HEADER
{
+ HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_HEADER";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 107 , 10 ) ;
TabStop = TRUE ;
@@ -595,6 +647,7 @@ TabPage TP_OPTTABLE_PAGE
};
CheckBox CB_REPEAT_HEADER
{
+ HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_REPEAT_HEADER";
Pos = MAP_APPFONT ( 21 , 27 ) ;
Size = MAP_APPFONT ( 99 , 10 ) ;
TabStop = TRUE ;
@@ -602,6 +655,7 @@ TabPage TP_OPTTABLE_PAGE
};
CheckBox CB_DONT_SPLIT
{
+ HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_DONT_SPLIT";
Pos = MAP_APPFONT ( 12 , 40 ) ;
Size = MAP_APPFONT ( 107 , 10 ) ;
TabStop = TRUE ;
@@ -609,6 +663,7 @@ TabPage TP_OPTTABLE_PAGE
};
CheckBox CB_BORDER
{
+ HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_BORDER";
Pos = MAP_APPFONT ( 12 , 53 ) ;
Size = MAP_APPFONT ( 107 , 10 ) ;
TabStop = TRUE ;
@@ -628,6 +683,7 @@ TabPage TP_OPTTABLE_PAGE
};
CheckBox CB_NUMFORMATTING
{
+ HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_NUMFORMATTING";
Pos = MAP_APPFONT ( 131 , 14 ) ;
Size = MAP_APPFONT ( 118 , 10 ) ;
TabStop = TRUE ;
@@ -635,6 +691,7 @@ TabPage TP_OPTTABLE_PAGE
};
CheckBox CB_NUMFMT_FORMATTING
{
+ HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_NUMFMT_FORMATTING";
Pos = MAP_APPFONT ( 140 , 27 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
TabStop = TRUE ;
@@ -642,6 +699,7 @@ TabPage TP_OPTTABLE_PAGE
};
CheckBox CB_NUMALIGNMENT
{
+ HelpID = "sw:CheckBox:TP_OPTTABLE_PAGE:CB_NUMALIGNMENT";
Pos = MAP_APPFONT ( 140 , 40 ) ;
Size = MAP_APPFONT ( 114 , 10 ) ;
TabStop = TRUE ;
@@ -667,6 +725,7 @@ TabPage TP_OPTTABLE_PAGE
};
MetricField MF_ROWMOVE
{
+ HelpID = "sw:MetricField:TP_OPTTABLE_PAGE:MF_ROWMOVE";
Border = TRUE ;
Pos = MAP_APPFONT ( 83 , 91 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -689,6 +748,7 @@ TabPage TP_OPTTABLE_PAGE
};
MetricField MF_COLMOVE
{
+ HelpID = "sw:MetricField:TP_OPTTABLE_PAGE:MF_COLMOVE";
Border = TRUE ;
Pos = MAP_APPFONT ( 83 , 106 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -717,6 +777,7 @@ TabPage TP_OPTTABLE_PAGE
};
MetricField MF_ROWINSERT
{
+ HelpID = "sw:MetricField:TP_OPTTABLE_PAGE:MF_ROWINSERT";
Border = TRUE ;
Pos = MAP_APPFONT ( 211 , 91 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -739,6 +800,7 @@ TabPage TP_OPTTABLE_PAGE
};
MetricField MF_COLINSERT
{
+ HelpID = "sw:MetricField:TP_OPTTABLE_PAGE:MF_COLINSERT";
Border = TRUE ;
Pos = MAP_APPFONT ( 211 , 106 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -761,6 +823,7 @@ TabPage TP_OPTTABLE_PAGE
};
RadioButton RB_FIX
{
+ HelpID = "sw:RadioButton:TP_OPTTABLE_PAGE:RB_FIX";
Pos = MAP_APPFONT ( 21 , 133 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "~Fixed" ;
@@ -774,6 +837,7 @@ TabPage TP_OPTTABLE_PAGE
};
RadioButton RB_FIXPROP
{
+ HelpID = "sw:RadioButton:TP_OPTTABLE_PAGE:RB_FIXPROP";
Pos = MAP_APPFONT ( 21 , 151 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "Fi~xed, proportional" ;
@@ -787,6 +851,7 @@ TabPage TP_OPTTABLE_PAGE
};
RadioButton RB_VAR
{
+ HelpID = "sw:RadioButton:TP_OPTTABLE_PAGE:RB_VAR";
Pos = MAP_APPFONT ( 21 , 169 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "~Variable" ;
@@ -820,6 +885,7 @@ TabPage TP_OPTSHDWCRSR
};
CheckBox CB_PARA
{
+ HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_PARA";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 108 , 10 ) ;
Text [ en-US ] = "Pa~ragraph end" ;
@@ -828,48 +894,56 @@ TabPage TP_OPTSHDWCRSR
};
CheckBox CB_SHYPH
{
+ HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_SHYPH";
Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 108 , 10 ) ;
Text [ en-US ] = "Custom h~yphens" ;
};
CheckBox CB_SPACE
{
+ HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_SPACE";
Pos = MAP_APPFONT ( 12 , 40 ) ;
Size = MAP_APPFONT ( 108 , 10 ) ;
Text [ en-US ] = "Spac~es" ;
};
CheckBox CB_HSPACE
{
+ HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_HSPACE";
Pos = MAP_APPFONT ( 12 , 53 ) ;
Size = MAP_APPFONT ( 108 , 10 ) ;
Text [ en-US ] = "Non-breaking s~paces" ;
};
CheckBox CB_TAB
{
+ HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_TAB";
Pos = MAP_APPFONT ( 12 , 66 ) ;
Size = MAP_APPFONT ( 108 , 10 ) ;
Text [ en-US ] = "Ta~bs" ;
};
CheckBox CB_BREAK
{
+ HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_BREAK";
Pos = MAP_APPFONT ( 12 , 79 ) ;
Size = MAP_APPFONT ( 108 , 10 ) ;
Text [ en-US ] = "Brea~ks" ;
};
CheckBox CB_CHAR_HIDDEN
{
+ HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_CHAR_HIDDEN";
Pos = MAP_APPFONT ( 12 , 92 ) ;
Size = MAP_APPFONT ( 108 , 10 ) ;
Text [ en-US ] = "Hidden text" ;
};
CheckBox CB_FLD_HIDDEN
{
+ HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_FLD_HIDDEN";
Pos = MAP_APPFONT ( 12 , 105 ) ;
Size = MAP_APPFONT ( 108 , 10 ) ;
Text [ en-US ] = "Fields: Hidden te~xt" ;
};
CheckBox CB_FLD_HIDDEN_PARA
{
+ HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_FLD_HIDDEN_PARA";
Pos = MAP_APPFONT ( 12 , 118 ) ;
Size = MAP_APPFONT ( 108 , 10 ) ;
Text [ en-US ] = "Fields: Hidden p~aragraphs" ;
@@ -888,6 +962,7 @@ TabPage TP_OPTSHDWCRSR
};
CheckBox CB_SHDWCRSONOFF
{
+ HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_SHDWCRSONOFF";
Pos = MAP_APPFONT ( 136 , 14 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
TabStop = TRUE ;
@@ -903,6 +978,7 @@ TabPage TP_OPTSHDWCRSR
};
RadioButton RB_SHDWCRSFILLMARGIN
{
+ HelpID = "sw:RadioButton:TP_OPTSHDWCRSR:RB_SHDWCRSFILLMARGIN";
Pos = MAP_APPFONT ( 145 , 39 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
TabStop = TRUE ;
@@ -911,18 +987,21 @@ TabPage TP_OPTSHDWCRSR
};
RadioButton RB_SHDWCRSFILLINDENT
{
+ HelpID = "sw:RadioButton:TP_OPTSHDWCRSR:RB_SHDWCRSFILLINDENT";
Pos = MAP_APPFONT ( 145 , 52 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "~Left paragraph margin" ;
};
RadioButton RB_SHDWCRSFILLTAB
{
+ HelpID = "sw:RadioButton:TP_OPTSHDWCRSR:RB_SHDWCRSFILLTAB";
Pos = MAP_APPFONT ( 145 , 66 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "~Tabs" ;
};
RadioButton RB_SHDWCRSFILLSPACE
{
+ HelpID = "sw:RadioButton:TP_OPTSHDWCRSR:RB_SHDWCRSFILLSPACE";
Pos = MAP_APPFONT ( 145 , 79 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "Tabs a~nd spaces" ;
@@ -935,15 +1014,27 @@ TabPage TP_OPTSHDWCRSR
};
CheckBox CB_ALLOW_IN_PROT
{
+ HelpID = "sw:CheckBox:TP_OPTSHDWCRSR:CB_ALLOW_IN_PROT";
Pos = MAP_APPFONT ( 136 , 107 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
TabStop = TRUE ;
Group = TRUE ;
Text [ en-US ] = "Enable";
};
+ FixedLine FL_LAYOUT_OPTIONS
+ {
+ Pos = MAP_APPFONT ( 6 , 133 ) ;
+ Size = MAP_APPFONT ( 118 , 8 ) ;
+ Text [ en-US ] = "Layout assistance";
+ };
+ CheckBox CB_MATH_BASELINE_ALIGNMENT
+ {
+ Pos = MAP_APPFONT ( 12 , 144 ) ;
+ Size = MAP_APPFONT ( 236 , 10 ) ;
+ Text [ en-US ] = "Math baseline alignment";
+ };
};
-
StringArray STR_PRINTOPTUI
{
ItemList [en-US] =
@@ -951,47 +1042,33 @@ StringArray STR_PRINTOPTUI
< "%PRODUCTNAME %s"; >;
< "Contents"; >;
< "Page ba~ckground"; >;
- < "Specifies whether to include colors and objects that are inserted to the background of the page (Format - Page - Background) in the printed document."; >;
< "P~ictures and other graphic objects"; >;
- < "Specifies whether the graphics and drawing or OLE objects of your text document are printed"; >;
< "Hidden te~xt"; >;
- < "Enable this option to print text that is marked as hidden."; >;
< "~Text placeholders"; >;
- < "Enable this option to print text placeholders. Disable this option to leave the text placeholders blank in the printout."; >;
< "Form control~s"; >;
- < "Specifies whether the form control fields of the text document are printed"; >;
< "Color"; >;
< "Print text in blac~k"; >;
- < "Specifies whether to always print text in black."; >;
< "Pages"; >;
< "Print ~automatically inserted blank pages"; >;
- < "If this option is enabled automatically inserted blank pages are printed. This is best if you are printing double-sided. For example, in a book, a \"chapter\" paragraph style has been set to always start with an odd numbered page. If the previous chapter ends on an odd page, %PRODUCTNAME inserts an even numbered blank page. This option controls whether to print that even numbered page or not"; >;
< "~Use only paper tray from printer preferences"; >;
- < "For printers with multiple trays this option specifies whether the paper tray used is specified by the system settings of the printer."; >;
< "Print"; >;
< "None (document only)"; >;
< "Comments only"; >;
< "Place at end of document"; >;
< "Place at end of page"; >;
- < "Specify where to print comments (if any)."; >;
< "~Comments"; >;
< "Page sides";>;
< "All pages"; >;
< "Back sides / left pages"; >;
< "Front sides / right pages"; >;
- < "Specify which pages to include in the output"; >;
< "Include"; >;
< "Broch~ure"; >;
- < "Select the Brochure option to print the document in brochure format."; >;
< "Left-to-right script"; >;
< "Right-to-left script"; >;
< "Range and copies"; >;
< "~All pages"; >;
- < "Print the whole document."; >;
< "Pa~ges"; >;
- < "Print a range of pages of the document."; >;
< "~Selection"; >;
- < "Print only the selected parts of the document"; >;
};
};
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index fd7104468b1c..06334a6de341 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -97,7 +97,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) :
aUseCharUnit ( this , SW_RES( CB_USE_CHAR_UNIT ) ),
pWrtShell ( NULL ),
- bHTMLMode ( FALSE ),
+ bHTMLMode ( sal_False ),
nLastTab ( 0 ),
nOldLinkMode( MANUAL )
@@ -105,7 +105,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) :
FreeResource();
SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) );
- for ( USHORT i = 0; i < aMetricArr.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i )
{
String sMetric = aMetricArr.GetStringByPos( i );
FieldUnit eFUnit = (FieldUnit)aMetricArr.GetValue( i );
@@ -119,7 +119,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) :
case FUNIT_INCH:
{
// use only these metrics
- USHORT nPos = aMetricLB.InsertEntry( sMetric );
+ sal_uInt16 nPos = aMetricLB.InsertEntry( sMetric );
aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit );
}
default:; //prevent warning
@@ -128,7 +128,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) :
aMetricLB.SetSelectHdl(LINK(this, SwLoadOptPage, MetricHdl));
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem )
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem )
&& ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
{
aTabFT.Hide();
@@ -153,12 +153,12 @@ SfxTabPage* SwLoadOptPage::Create( Window* pParent,
return new SwLoadOptPage(pParent, rAttrSet );
}
-BOOL SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwModule* pMod = SW_MOD();
- USHORT nNewLinkMode = AUTOMATIC;
+ sal_uInt16 nNewLinkMode = AUTOMATIC;
if (aNeverRB.IsChecked())
nNewLinkMode = NEVER;
else if (aRequestRB.IsChecked())
@@ -187,23 +187,23 @@ BOOL SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
pWrtShell->SetModified();
}
- bRet = TRUE;
+ bRet = sal_True;
}
- const USHORT nMPos = aMetricLB.GetSelectEntryPos();
+ const sal_uInt16 nMPos = aMetricLB.GetSelectEntryPos();
if ( nMPos != aMetricLB.GetSavedValue() )
{
// Double-Cast for VA3.0
- USHORT nFieldUnit = (USHORT)(long)aMetricLB.GetEntryData( nMPos );
- rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (UINT16)nFieldUnit ) );
- bRet = TRUE;
+ sal_uInt16 nFieldUnit = (sal_uInt16)(long)aMetricLB.GetEntryData( nMPos );
+ rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (sal_uInt16)nFieldUnit ) );
+ bRet = sal_True;
}
if(aTabMF.IsVisible() && aTabMF.GetText() != aTabMF.GetSavedValue())
{
rSet.Put(SfxUInt16Item(SID_ATTR_DEFTABSTOP,
- (USHORT)aTabMF.Denormalize(aTabMF.GetValue(FUNIT_TWIP))));
- bRet = TRUE;
+ (sal_uInt16)aTabMF.Denormalize(aTabMF.GetValue(FUNIT_TWIP))));
+ bRet = sal_True;
}
sal_Bool bIsUseCharUnitFlag = aUseCharUnit.IsChecked();
@@ -212,7 +212,7 @@ BOOL SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
if( bIsUseCharUnitFlag != aUseCharUnit.GetSavedValue())
{
rSet.Put(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, bIsUseCharUnitFlag ));
- bRet = TRUE;
+ bRet = sal_True;
}
sal_Bool bIsSquaredPageModeFlag = aUseSquaredPageMode.IsChecked();
@@ -225,7 +225,7 @@ BOOL SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
pDoc->SetDefaultPageMode( bIsSquaredPageModeFlag );
pWrtShell->SetModified();
}
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -233,18 +233,18 @@ BOOL SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
void SwLoadOptPage::Reset( const SfxItemSet& rSet)
{
- const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref(FALSE);
+ const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref(sal_False);
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_WRTSHELL, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_WRTSHELL, sal_False, &pItem))
pWrtShell = (SwWrtShell*)((const SwPtrItem*)pItem)->GetValue();
SwFldUpdateFlags eFldFlags = AUTOUPD_GLOBALSETTING;
nOldLinkMode = GLOBALSETTING;
if (pWrtShell)
{
- eFldFlags = pWrtShell->GetFldUpdateFlags(TRUE);
- nOldLinkMode = pWrtShell->GetLinkUpdMode(TRUE);
+ eFldFlags = pWrtShell->GetFldUpdateFlags(sal_True);
+ nOldLinkMode = pWrtShell->GetLinkUpdMode(sal_True);
}
if(GLOBALSETTING == nOldLinkMode)
nOldLinkMode = pUsrPref->GetUpdateLinkMode();
@@ -269,7 +269,7 @@ void SwLoadOptPage::Reset( const SfxItemSet& rSet)
const SfxUInt16Item& rItem = (SfxUInt16Item&)rSet.Get( SID_ATTR_METRIC );
FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue();
- for ( USHORT i = 0; i < aMetricLB.GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < aMetricLB.GetEntryCount(); ++i )
{
if ( (int)(sal_IntPtr)aMetricLB.GetEntryData( i ) == (int)eFieldUnit )
{
@@ -280,14 +280,14 @@ void SwLoadOptPage::Reset( const SfxItemSet& rSet)
::SetFieldUnit(aTabMF, eFieldUnit);
}
aMetricLB.SaveValue();
- if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, sal_False, &pItem))
{
nLastTab = ((SfxUInt16Item*)pItem)->GetValue();
aTabMF.SetValue(aTabMF.Normalize(nLastTab), FUNIT_TWIP);
}
aTabMF.SaveValue();
- if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem))
{
bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON);
}
@@ -300,9 +300,9 @@ void SwLoadOptPage::Reset( const SfxItemSet& rSet)
aUseSquaredPageMode.SaveValue();
}
- if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_APPLYCHARUNIT, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_APPLYCHARUNIT, sal_False, &pItem))
{
- BOOL bUseCharUnit = ((const SfxBoolItem*)pItem)->GetValue();
+ sal_Bool bUseCharUnit = ((const SfxBoolItem*)pItem)->GetValue();
aUseCharUnit.Check(bUseCharUnit);
}
else
@@ -317,12 +317,12 @@ void SwLoadOptPage::Reset( const SfxItemSet& rSet)
--------------------------------------------------*/
IMPL_LINK(SwLoadOptPage, MetricHdl, ListBox*, EMPTYARG)
{
- const USHORT nMPos = aMetricLB.GetSelectEntryPos();
+ const sal_uInt16 nMPos = aMetricLB.GetSelectEntryPos();
if(nMPos != USHRT_MAX)
{
// Double-Cast for VA3.0
FieldUnit eFieldUnit = (FieldUnit)(long)aMetricLB.GetEntryData( nMPos );
- BOOL bModified = aTabMF.IsModified();
+ sal_Bool bModified = aTabMF.IsModified();
long nVal = bModified ?
sal::static_int_cast<sal_Int32, sal_Int64 >( aTabMF.Denormalize( aTabMF.GetValue( FUNIT_TWIP ) )) :
nLastTab;
@@ -426,7 +426,7 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet )
sNone (SW_RESSTR( STR_CATEGORY_NONE )),
pMgr (new SwFldMgr()),
- bHTMLMode(FALSE)
+ bHTMLMode(sal_False)
{
Wallpaper aBack( GetSettings().GetStyleSettings().GetWindowColor() );
aPreview.SetBackground( aBack );
@@ -436,11 +436,11 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet )
SwStyleNameMapper::FillUIName( RES_POOLCOLL_LABEL_FRAME, sText );
SwStyleNameMapper::FillUIName( RES_POOLCOLL_LABEL_DRAWING, sDrawing );
- USHORT i, nCount;
+ sal_uInt16 i, nCount;
SwWrtShell *pSh = ::GetActiveWrtShell();
// aFormatBox
- USHORT nSelFmt = SVX_NUM_ARABIC;
+ sal_uInt16 nSelFmt = SVX_NUM_ARABIC;
if (pSh)
{
nCount = pMgr->GetFldTypeCount();
@@ -449,19 +449,19 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet )
if( ( pFldType = pMgr->GetFldType(USHRT_MAX, --i))->GetName() ==
aCategoryBox.GetText() )
{
- nSelFmt = (USHORT)((SwSetExpFieldType*)pFldType)->GetSeqFormat();
+ nSelFmt = (sal_uInt16)((SwSetExpFieldType*)pFldType)->GetSeqFormat();
break;
}
- ::FillCharStyleListBox( aCharStyleLB, pSh->GetView().GetDocShell(), TRUE, TRUE );
+ ::FillCharStyleListBox( aCharStyleLB, pSh->GetView().GetDocShell(), sal_True, sal_True );
}
- nCount = pMgr->GetFormatCount(TYP_SEQFLD, FALSE);
+ nCount = pMgr->GetFormatCount(TYP_SEQFLD, sal_False);
for ( i = 0; i < nCount; ++i )
{
aFormatBox.InsertEntry( pMgr->GetFormatStr(TYP_SEQFLD, i) );
- USHORT nFmtId = pMgr->GetFormatId(TYP_SEQFLD, i);
+ sal_uInt16 nFmtId = pMgr->GetFormatId(TYP_SEQFLD, i);
aFormatBox.SetEntryData( i, reinterpret_cast<void*>(nFmtId) );
if( nFmtId == nSelFmt )
aFormatBox.SelectEntryPos( i );
@@ -519,9 +519,9 @@ SfxTabPage* SwCaptionOptPage::Create( Window* pParent,
return new SwCaptionOptPage(pParent, rAttrSet );
}
-BOOL SwCaptionOptPage::FillItemSet( SfxItemSet& )
+sal_Bool SwCaptionOptPage::FillItemSet( SfxItemSet& )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
SaveEntry(aCheckLB.FirstSelected()); // apply current entry
@@ -535,7 +535,7 @@ BOOL SwCaptionOptPage::FillItemSet( SfxItemSet& )
pEntry = aCheckLB.Next(pEntry);
}
- USHORT nCheckCount = aCheckLB.GetCheckedEntryCount();
+ sal_uInt16 nCheckCount = aCheckLB.GetCheckedEntryCount();
pModOpt->SetInsWithCaption( bHTMLMode, nCheckCount > 0 );
sal_Int32 nPos = aLbCaptionOrder.GetSelectEntryPos();
@@ -547,7 +547,7 @@ BOOL SwCaptionOptPage::FillItemSet( SfxItemSet& )
void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem))
{
bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON);
}
@@ -556,7 +556,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
aCheckLB.GetModel()->Clear(); // remove all entries
// Writer objects
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
aCheckLB.InsertEntry(sSWTable);
SetOptions(nPos++, TABLE_CAP);
aCheckLB.InsertEntry(sSWFrame);
@@ -593,7 +593,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
aObjS.FillInsertObjects();
aObjS.Remove( SvGlobalName( SO3_SW_CLASSID ) ); // remove Writer-ID
- for ( ULONG i = 0; i < aObjS.Count(); ++i )
+ for ( sal_uLong i = 0; i < aObjS.Count(); ++i )
{
const SvGlobalName &rOleId = aObjS[i].GetClassName();
const String* pClassName = &aObjS[i].GetHumanName();
@@ -610,7 +610,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
ModifyHdl();
}
-void SwCaptionOptPage::SetOptions(const USHORT nPos,
+void SwCaptionOptPage::SetOptions(const sal_uInt16 nPos,
const SwCapObjType eObjType, const SvGlobalName *pOleId)
{
SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
@@ -643,7 +643,7 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG )
if (pSelEntry)
{
- sal_Bool bChecked = aCheckLB.IsChecked((USHORT)aCheckLB.GetModel()->GetAbsPos(pSelEntry));
+ sal_Bool bChecked = aCheckLB.IsChecked((sal_uInt16)aCheckLB.GetModel()->GetAbsPos(pSelEntry));
aSettingsGroupFL.Enable( bChecked );
aCategoryText.Enable( bChecked );
@@ -676,9 +676,9 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG )
aCategoryBox.InsertEntry( sNone );
if (pSh)
{
- USHORT nCount = pMgr->GetFldTypeCount();
+ sal_uInt16 nCount = pMgr->GetFldTypeCount();
- for (USHORT i = 0; i < nCount; i++)
+ for (sal_uInt16 i = 0; i < nCount; i++)
{
SwFieldType *pType = pMgr->GetFldType( USHRT_MAX, i );
if( pType->Which() == RES_SETEXPFLD &&
@@ -703,7 +703,7 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG )
aCategoryBox.InsertEntry(pOpt->GetCategory());
if (!aCategoryBox.GetText().Len())
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
switch(pOpt->GetObjType())
{
case OLE_CAP:
@@ -714,9 +714,9 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG )
aCategoryBox.SetText(aCategoryBox.GetEntry(nPos).GetName());
}
- for (USHORT i = 0; i < aFormatBox.GetEntryCount(); i++)
+ for (sal_uInt16 i = 0; i < aFormatBox.GetEntryCount(); i++)
{
- if (pOpt->GetNumType() == (USHORT)(ULONG)aFormatBox.GetEntryData(i))
+ if (pOpt->GetNumType() == (sal_uInt16)(sal_uLong)aFormatBox.GetEntryData(i))
{
aFormatBox.SelectEntryPos(i);
break;
@@ -744,7 +744,7 @@ IMPL_LINK( SwCaptionOptPage, ShowEntryHdl, SvxCheckListBox *, EMPTYARG )
aPosText.IsEnabled() );
aPosBox.SelectEntryPos(pOpt->GetPos());
- USHORT nLevelPos = ( pOpt->GetLevel() < MAXLEVEL ) ? pOpt->GetLevel() + 1 : 0;
+ sal_uInt16 nLevelPos = ( pOpt->GetLevel() < MAXLEVEL ) ? pOpt->GetLevel() + 1 : 0;
aLbLevel.SelectEntryPos( nLevelPos );
aEdDelim.SetText(pOpt->GetSeparator());
aNumberingSeparatorED.SetText( pOpt->GetNumSeparator() );
@@ -778,7 +778,7 @@ void SwCaptionOptPage::SaveEntry(SvLBoxEntry* pEntry)
{
InsCaptionOpt* pOpt = (InsCaptionOpt*)pEntry->GetUserData();
- pOpt->UseCaption() = aCheckLB.IsChecked((USHORT)aCheckLB.GetModel()->GetAbsPos(pEntry));
+ pOpt->UseCaption() = aCheckLB.IsChecked((sal_uInt16)aCheckLB.GetModel()->GetAbsPos(pEntry));
String aName( aCategoryBox.GetText() );
if(aName == sNone)
pOpt->SetCategory(aEmptyStr);
@@ -788,11 +788,11 @@ void SwCaptionOptPage::SaveEntry(SvLBoxEntry* pEntry)
aName.EraseTrailingChars(' ');
pOpt->SetCategory(aName);
}
- pOpt->SetNumType((USHORT)(ULONG)aFormatBox.GetEntryData(aFormatBox.GetSelectEntryPos()));
+ pOpt->SetNumType((sal_uInt16)(sal_uLong)aFormatBox.GetEntryData(aFormatBox.GetSelectEntryPos()));
pOpt->SetCaption(aTextEdit.IsEnabled() ? aTextEdit.GetText() : aEmptyStr );
pOpt->SetPos(aPosBox.GetSelectEntryPos());
- USHORT nPos = aLbLevel.GetSelectEntryPos();
- USHORT nLevel = ( nPos > 0 && nPos != LISTBOX_ENTRY_NOTFOUND ) ? nPos - 1 : MAXLEVEL;
+ sal_uInt16 nPos = aLbLevel.GetSelectEntryPos();
+ sal_uInt16 nLevel = ( nPos > 0 && nPos != LISTBOX_ENTRY_NOTFOUND ) ? nPos - 1 : MAXLEVEL;
pOpt->SetLevel(nLevel);
pOpt->SetSeparator(aEdDelim.GetText());
pOpt->SetNumSeparator( aNumberingSeparatorED.GetText());
@@ -848,7 +848,7 @@ void SwCaptionOptPage::DrawSample()
//#i61007# order of captions
bool bOrderNumberingFirst = aLbCaptionOrder.GetSelectEntryPos() == 1;
// number
- USHORT nNumFmt = (USHORT)(ULONG)aFormatBox.GetEntryData(
+ sal_uInt16 nNumFmt = (sal_uInt16)(sal_uLong)aFormatBox.GetEntryData(
aFormatBox.GetSelectEntryPos() );
if( SVX_NUM_NUMBER_NONE != nNumFmt )
{
@@ -868,13 +868,13 @@ void SwCaptionOptPage::DrawSample()
RES_SETEXPFLD, sFldTypeName );
if( pFldType && pFldType->GetOutlineLvl() < MAXLEVEL )
{
- BYTE nLvl = pFldType->GetOutlineLvl();
+ sal_uInt8 nLvl = pFldType->GetOutlineLvl();
SwNumberTree::tNumberVector aNumVector;
- for( BYTE i = 0; i <= nLvl; ++i )
+ for( sal_uInt8 i = 0; i <= nLvl; ++i )
aNumVector.push_back(1);
String sNumber( pSh->GetOutlineNumRule()->MakeNumString(
- aNumVector, FALSE ));
+ aNumVector, sal_False ));
if( sNumber.Len() )
(aStr += sNumber) += pFldType->GetDelimiter();
}
diff --git a/sw/source/ui/config/optload.src b/sw/source/ui/config/optload.src
index c53234b02d5a..b5e51ef665ae 100644
--- a/sw/source/ui/config/optload.src
+++ b/sw/source/ui/config/optload.src
@@ -53,6 +53,7 @@ TabPage TP_OPTLOAD_PAGE
};
RadioButton RB_ALWAYS
{
+ HelpID = "sw:RadioButton:TP_OPTLOAD_PAGE:RB_ALWAYS";
Pos = MAP_APPFONT ( 18 , 26 ) ;
Size = MAP_APPFONT ( 75 , 10 ) ;
TabStop = TRUE ;
@@ -60,6 +61,7 @@ TabPage TP_OPTLOAD_PAGE
};
RadioButton RB_REQUEST
{
+ HelpID = "sw:RadioButton:TP_OPTLOAD_PAGE:RB_REQUEST";
Pos = MAP_APPFONT ( 18 , 39 ) ;
Size = MAP_APPFONT ( 75 , 10 ) ;
TabStop = TRUE ;
@@ -67,6 +69,7 @@ TabPage TP_OPTLOAD_PAGE
};
RadioButton RB_NEVER
{
+ HelpID = "sw:RadioButton:TP_OPTLOAD_PAGE:RB_NEVER";
Pos = MAP_APPFONT ( 18 , 52 ) ;
Size = MAP_APPFONT ( 75 , 10 ) ;
TabStop = TRUE ;
@@ -80,12 +83,14 @@ TabPage TP_OPTLOAD_PAGE
};
CheckBox CB_AUTO_UPDATE_FIELDS
{
+ HelpID = "sw:CheckBox:TP_OPTLOAD_PAGE:CB_AUTO_UPDATE_FIELDS";
Pos = MAP_APPFONT ( 136 , 26) ;
Size = MAP_APPFONT ( 118 , 10 ) ;
Text [ en-US ] = "~Fields";
};
CheckBox CB_AUTO_UPDATE_CHARTS
{
+ HelpID = "sw:CheckBox:TP_OPTLOAD_PAGE:CB_AUTO_UPDATE_CHARTS";
Pos = MAP_APPFONT ( 136 , 39) ;
Size = MAP_APPFONT ( 109 , 10 ) ;
Text [ en-US ] = "~Charts";
@@ -104,6 +109,7 @@ TabPage TP_OPTLOAD_PAGE
};
ListBox LB_METRIC
{
+ HelpID = "sw:ListBox:TP_OPTLOAD_PAGE:LB_METRIC";
Pos = MAP_APPFONT ( 130, 77 ) ;
Size = MAP_APPFONT ( 50 , 50 ) ;
Border = TRUE ;
@@ -118,6 +124,7 @@ TabPage TP_OPTLOAD_PAGE
};
MetricField MF_TAB
{
+ HelpID = "sw:MetricField:TP_OPTLOAD_PAGE:MF_TAB";
Border = TRUE ;
Pos = MAP_APPFONT ( 130 , 93 ) ;
Size = MAP_APPFONT ( 50 , 12 ) ;
@@ -134,6 +141,7 @@ TabPage TP_OPTLOAD_PAGE
};
CheckBox CB_USE_SQUARE_PAGE_MODE
{
+ HelpID = "sw:CheckBox:TP_OPTLOAD_PAGE:CB_USE_SQUARE_PAGE_MODE";
Pos = MAP_APPFONT ( 12 , 111) ;
Size = MAP_APPFONT ( 248 , 10 ) ;
Text [ en-US ] = "Use square page mode for text grid";
@@ -182,6 +190,7 @@ TabPage TP_OPTCAPTION_PAGE
};
ListBox LB_ORDER
{
+ HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:LB_ORDER";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 141 ) ;
Size = MAP_APPFONT ( 106 , 60 ) ;
@@ -231,6 +240,7 @@ TabPage TP_OPTCAPTION_PAGE
};
ComboBox BOX_CATEGORY
{
+ HelpID = "sw:ComboBox:TP_OPTCAPTION_PAGE:BOX_CATEGORY";
Pos = MAP_APPFONT ( 189 , 14 ) ;
Size = MAP_APPFONT ( 59 , 61 ) ;
DropDown = TRUE ;
@@ -246,6 +256,7 @@ TabPage TP_OPTCAPTION_PAGE
};
ListBox BOX_FORMAT
{
+ HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:BOX_FORMAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 189 , 29 ) ;
Size = MAP_APPFONT ( 59 , 61 ) ;
@@ -261,6 +272,7 @@ TabPage TP_OPTCAPTION_PAGE
};
Edit ED_NUM_SEP
{
+ HelpID = "sw:Edit:TP_OPTCAPTION_PAGE:ED_NUM_SEP";
Pos = MAP_APPFONT ( 189 , 44 ) ;
Size = MAP_APPFONT ( 59 , 12 ) ;
Border = TRUE ;
@@ -277,6 +289,7 @@ TabPage TP_OPTCAPTION_PAGE
};
Edit EDT_TEXT
{
+ HelpID = "sw:Edit:TP_OPTCAPTION_PAGE:EDT_TEXT";
Pos = MAP_APPFONT ( 189 , 59 ) ;
Size = MAP_APPFONT ( 59 , 12 ) ;
Border = TRUE ;
@@ -292,6 +305,7 @@ TabPage TP_OPTCAPTION_PAGE
};
ListBox BOX_POS
{
+ HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:BOX_POS";
Pos = MAP_APPFONT ( 189 , 74 ) ;
Size = MAP_APPFONT ( 59 , 61 ) ;
DropDown = TRUE ;
@@ -313,6 +327,7 @@ TabPage TP_OPTCAPTION_PAGE
};
ListBox LB_LEVEL
{
+ HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:LB_LEVEL";
Border = TRUE ;
Pos = MAP_APPFONT ( 189 , 100 ) ;
Size = MAP_APPFONT ( 59 , 60 ) ;
@@ -331,6 +346,7 @@ TabPage TP_OPTCAPTION_PAGE
};
Edit ED_SEPARATOR
{
+ HelpID = "sw:Edit:TP_OPTCAPTION_PAGE:ED_SEPARATOR";
Pos = MAP_APPFONT ( 189 , 115 ) ;
Size = MAP_APPFONT ( 59 , 12 ) ;
Border = TRUE ;
@@ -351,6 +367,7 @@ TabPage TP_OPTCAPTION_PAGE
};
ListBox LB_CHARSTYLE
{
+ HelpID = "sw:ListBox:TP_OPTCAPTION_PAGE:LB_CHARSTYLE";
Border = TRUE ;
Pos = MAP_APPFONT ( 189 , 141 ) ;
Size = MAP_APPFONT ( 59 , 60 ) ;
@@ -363,6 +380,7 @@ TabPage TP_OPTCAPTION_PAGE
};
CheckBox CB_APPLYBORDER
{
+ HelpID = "sw:CheckBox:TP_OPTCAPTION_PAGE:CB_APPLYBORDER";
Pos = MAP_APPFONT ( 125 , 158 ) ;
Size = MAP_APPFONT ( 124 , 10 ) ;
Text [ en-US ] = "Apply border and shadow" ;
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 6bd07d52fa76..f4e5290b0fd9 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -28,29 +28,20 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#ifdef SW_DLLIMPLEMENTATION
#undef SW_DLLIMPLEMENTATION
#endif
-
-#include <hintids.hxx>
-#include <cmdid.h>
-#include <vcl/svapp.hxx>
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
#include <svl/svstdarr.hxx>
#endif
-#include <svl/cjkoptions.hxx>
-#include <svtools/ctrltool.hxx>
-#include <svl/eitem.hxx>
-#include <svx/htmlmode.hxx>
-#include <sfx2/printer.hxx>
-#include <sfx2/bindings.hxx>
-#include <svx/xtable.hxx>
-#include <editeng/fhgtitem.hxx>
-#include <editeng/fontitem.hxx>
-#include <editeng/langitem.hxx>
-#include <svx/dlgutil.hxx>
+
+#include <optpage.hxx>
+#include <doc.hxx>
+#include <hintids.hxx>
+#include <cmdid.h>
#include <fmtcol.hxx>
#include <charatr.hxx>
#include <swtypes.hxx>
@@ -64,8 +55,7 @@
#include <poolfmt.hxx>
#include <uiitems.hxx>
#include <initui.hxx>
-#include <optpage.hxx>
-#include <swprtopt.hxx>
+#include <printdata.hxx>
#include <modcfg.hxx>
#include <srcview.hxx>
#include <crstate.hxx>
@@ -74,13 +64,26 @@
#include <config.hrc>
#include <redlopt.hrc>
#include <optdlg.hrc>
-#include <svx/strarray.hxx>
-#include <svl/slstitm.hxx>
-#include <sfx2/request.hxx>
#include <swwrtshitem.hxx>
+#include <unomid.h>
+
+#include <editeng/fhgtitem.hxx>
+#include <editeng/fontitem.hxx>
+#include <editeng/langitem.hxx>
+#include <sfx2/request.hxx>
+#include <sfx2/printer.hxx>
+#include <sfx2/bindings.hxx>
+#include <svl/slstitm.hxx>
#include <svl/ctloptions.hxx>
+#include <svl/eitem.hxx>
+#include <svl/cjkoptions.hxx>
+#include <svtools/ctrltool.hxx>
+#include <svx/htmlmode.hxx>
+#include <svx/xtable.hxx>
+#include <svx/dlgutil.hxx>
+#include <svx/strarray.hxx>
+#include <vcl/svapp.hxx>
-#include <unomid.h>
using namespace ::com::sun::star;
@@ -116,7 +119,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
{
FreeResource();
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem )
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, sal_False, &pItem )
&& ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
{
aMetricLB.Show();
@@ -136,7 +139,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
aAnyRulerCB.SetClickHdl(LINK(this, SwContentOptPage, AnyRulerHdl));
SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) );
- for ( USHORT i = 0; i < aMetricArr.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i )
{
String sMetric = aMetricArr.GetStringByPos( i );
FieldUnit eFUnit = (FieldUnit)aMetricArr.GetValue( i );
@@ -156,7 +159,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
// there isn't 'line' unit in HTML format
if ( eFUnit != FUNIT_LINE )
{
- USHORT nPos = aMetricLB.InsertEntry( sMetric );
+ sal_uInt16 nPos = aMetricLB.InsertEntry( sMetric );
aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit );
aHMetric.InsertEntry( sMetric );
aHMetric.SetEntryData( nPos, (void*)(long)eFUnit );
@@ -164,7 +167,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
// a vertical ruler has not the 'character' unit
if ( eFUnit != FUNIT_CHAR )
{
- USHORT nPos = aVMetric.InsertEntry( sMetric );
+ sal_uInt16 nPos = aVMetric.InsertEntry( sMetric );
aVMetric.SetEntryData( nPos, (void*)(long)eFUnit );
}
}
@@ -183,13 +186,13 @@ SfxTabPage* SwContentOptPage::Create( Window* pParent,
return new SwContentOptPage(pParent, rAttrSet);
}
-static void lcl_SelectMetricLB(ListBox& rMetric, USHORT nSID, const SfxItemSet& rSet)
+static void lcl_SelectMetricLB(ListBox& rMetric, sal_uInt16 nSID, const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
- if( rSet.GetItemState( nSID, FALSE, &pItem ) >= SFX_ITEM_AVAILABLE )
+ if( rSet.GetItemState( nSID, sal_False, &pItem ) >= SFX_ITEM_AVAILABLE )
{
FieldUnit eFieldUnit = (FieldUnit)((SfxUInt16Item*)pItem)->GetValue();
- for ( USHORT i = 0; i < rMetric.GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < rMetric.GetEntryCount(); ++i )
{
if ( (int)(sal_IntPtr)rMetric.GetEntryData( i ) == (int)eFieldUnit )
{
@@ -205,7 +208,7 @@ void SwContentOptPage::Reset(const SfxItemSet& rSet)
{
const SwElemItem* pElemAttr = 0;
- rSet.GetItemState( FN_PARAM_ELEM , FALSE,
+ rSet.GetItemState( FN_PARAM_ELEM , sal_False,
(const SfxPoolItem**)&pElemAttr );
if(pElemAttr)
{
@@ -232,7 +235,7 @@ void SwContentOptPage::Reset(const SfxItemSet& rSet)
AnyRulerHdl(&aAnyRulerCB);
}
-BOOL SwContentOptPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet)
{
const SwElemItem* pOldAttr = (const SwElemItem*)
GetOldItem(GetItemSet(), FN_PARAM_ELEM);
@@ -257,34 +260,34 @@ BOOL SwContentOptPage::FillItemSet(SfxItemSet& rSet)
aElem.bSmoothScroll = aSmoothCBox.IsChecked();
- BOOL bRet = !pOldAttr || aElem != *pOldAttr;
+ sal_Bool bRet = !pOldAttr || aElem != *pOldAttr;
if(bRet)
bRet = 0 != rSet.Put(aElem);
- USHORT nMPos = aMetricLB.GetSelectEntryPos();
- USHORT nGlobalMetricPos = nMPos;
+ sal_uInt16 nMPos = aMetricLB.GetSelectEntryPos();
+ sal_uInt16 nGlobalMetricPos = nMPos;
if ( nMPos != aMetricLB.GetSavedValue() )
{
// Double-Cast for VA3.0
- USHORT nFieldUnit = (USHORT)(long)aMetricLB.GetEntryData( nMPos );
- rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (UINT16)nFieldUnit ) );
- bRet = TRUE;
+ sal_uInt16 nFieldUnit = (sal_uInt16)(long)aMetricLB.GetEntryData( nMPos );
+ rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (sal_uInt16)nFieldUnit ) );
+ bRet = sal_True;
}
nMPos = aHMetric.GetSelectEntryPos();
if ( nMPos != aHMetric.GetSavedValue() || nMPos != nGlobalMetricPos )
{
// Double-Cast for VA3.0
- USHORT nFieldUnit = (USHORT)(long)aHMetric.GetEntryData( nMPos );
- rSet.Put( SfxUInt16Item( FN_HSCROLL_METRIC, (UINT16)nFieldUnit ) );
- bRet = TRUE;
+ sal_uInt16 nFieldUnit = (sal_uInt16)(long)aHMetric.GetEntryData( nMPos );
+ rSet.Put( SfxUInt16Item( FN_HSCROLL_METRIC, (sal_uInt16)nFieldUnit ) );
+ bRet = sal_True;
}
nMPos = aVMetric.GetSelectEntryPos();
if ( nMPos != aVMetric.GetSavedValue() || nMPos != nGlobalMetricPos )
{
// Double-Cast for VA3.0
- USHORT nFieldUnit = (USHORT)(long)aVMetric.GetEntryData( nMPos );
- rSet.Put( SfxUInt16Item( FN_VSCROLL_METRIC, (UINT16)nFieldUnit ) );
- bRet = TRUE;
+ sal_uInt16 nFieldUnit = (sal_uInt16)(long)aVMetric.GetEntryData( nMPos );
+ rSet.Put( SfxUInt16Item( FN_VSCROLL_METRIC, (sal_uInt16)nFieldUnit ) );
+ bRet = sal_True;
}
return bRet;
}
@@ -297,7 +300,7 @@ IMPL_LINK(SwContentOptPage, VertRulerHdl, CheckBox*, pBox)
IMPL_LINK( SwContentOptPage, AnyRulerHdl, CheckBox*, pBox)
{
- BOOL bChecked = pBox->IsChecked();
+ sal_Bool bChecked = pBox->IsChecked();
aHRulerCBox .Enable(bChecked);
aHMetric .Enable(bChecked);
aVRulerCBox .Enable(bChecked);
@@ -325,19 +328,19 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aProspectCB (this, SW_RES(CB_PROSPECT)),
aProspectCB_RTL (this, SW_RES(CB_PROSPECT_RTL)),
aSeparatorRFL (this, SW_RES(FL_SEP_PRT_RIGHT)),
+ aFL3 (this, SW_RES(FL_3)),
aNoRB (this, SW_RES(RB_NO)),
aOnlyRB (this, SW_RES(RB_ONLY)),
aEndRB (this, SW_RES(RB_END)),
aEndPageRB (this, SW_RES(RB_PAGEEND)),
- aFL3 (this, SW_RES(FL_3)),
aFL4 (this, SW_RES(FL_4)),
aPrintEmptyPagesCB(this, SW_RES(CB_PRINTEMPTYPAGES)),
aPaperFromSetupCB(this, SW_RES(CB_PAPERFROMSETUP)),
aFaxFT (this, SW_RES(FT_FAX)),
aFaxLB (this, SW_RES(LB_FAX)),
sNone(SW_RES(ST_NONE)),
- bAttrModified( FALSE ),
- bPreview ( FALSE )
+ bAttrModified( sal_False ),
+ bPreview ( sal_False )
{
Init();
FreeResource();
@@ -361,7 +364,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aFaxLB.SetSelectHdl( LINK( this, SwAddPrinterTabPage, SelectHdl ) );
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem )
+ if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, sal_False, &pItem )
&& ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
{
aLeftPageCB .Hide();
@@ -391,7 +394,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
aProspectCB_RTL.Show(aCTLOptions.IsCTLFontEnabled());
}
-void SwAddPrinterTabPage::SetPreview(BOOL bPrev)
+void SwAddPrinterTabPage::SetPreview(sal_Bool bPrev)
{
bPreview = bPrev;
@@ -415,13 +418,13 @@ SfxTabPage* SwAddPrinterTabPage::Create( Window* pParent,
return ( new SwAddPrinterTabPage( pParent, rAttrSet ) );
}
-BOOL SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet )
+sal_Bool SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet )
{
if ( bAttrModified )
{
SwAddPrinterItem aAddPrinterAttr (FN_PARAM_ADDPRINTER);
aAddPrinterAttr.bPrintGraphic = aGrfCB.IsChecked();
- aAddPrinterAttr.bPrintTable = TRUE; // always enabled since CWS printerpullgpages /*aTabCB.IsChecked();*/
+ aAddPrinterAttr.bPrintTable = sal_True; // always enabled since CWS printerpullgpages /*aTabCB.IsChecked();*/
aAddPrinterAttr.bPrintDraw = aGrfCB.IsChecked(); // UI merged with aGrfCB in CWS printerpullgpages /*aDrawCB.IsChecked()*/;
aAddPrinterAttr.bPrintControl = aCtrlFldCB.IsChecked();
aAddPrinterAttr.bPrintPageBackground = aBackgroundCB.IsChecked();
@@ -431,12 +434,12 @@ BOOL SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet )
aAddPrinterAttr.bPrintLeftPages = aLeftPageCB.IsChecked();
aAddPrinterAttr.bPrintRightPages = aRightPageCB.IsChecked();
- aAddPrinterAttr.bPrintReverse = FALSE; // handled by vcl itself since CWS printerpullpages /*aReverseCB.IsChecked()*/;
+ aAddPrinterAttr.bPrintReverse = sal_False; // handled by vcl itself since CWS printerpullpages /*aReverseCB.IsChecked()*/;
aAddPrinterAttr.bPrintProspect = aProspectCB.IsChecked();
aAddPrinterAttr.bPrintProspectRTL = aProspectCB_RTL.IsChecked();
aAddPrinterAttr.bPaperFromSetup = aPaperFromSetupCB.IsChecked();
aAddPrinterAttr.bPrintEmptyPages = aPrintEmptyPagesCB.IsChecked();
- aAddPrinterAttr.bPrintSingleJobs = TRUE; // handled by vcl in new print dialog since CWS printerpullpages /*aSingleJobsCB.IsChecked()*/;
+ aAddPrinterAttr.bPrintSingleJobs = sal_True; // handled by vcl in new print dialog since CWS printerpullpages /*aSingleJobsCB.IsChecked()*/;
if (aNoRB.IsChecked()) aAddPrinterAttr.nPrintPostIts =
POSTITS_NONE;
@@ -459,7 +462,7 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& )
const SfxItemSet& rSet = GetItemSet();
const SwAddPrinterItem* pAddPrinterAttr = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , FALSE,
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , sal_False,
(const SfxPoolItem**)&pAddPrinterAttr ))
{
aGrfCB.Check( pAddPrinterAttr->bPrintGraphic || pAddPrinterAttr->bPrintDraw );
@@ -483,14 +486,14 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& )
}
if (aProspectCB.IsChecked())
{
- aProspectCB_RTL.Enable(TRUE);
- aNoRB.Enable( FALSE );
- aOnlyRB.Enable( FALSE );
- aEndRB.Enable( FALSE );
- aEndPageRB.Enable( FALSE );
+ aProspectCB_RTL.Enable(sal_True);
+ aNoRB.Enable( sal_False );
+ aOnlyRB.Enable( sal_False );
+ aEndRB.Enable( sal_False );
+ aEndPageRB.Enable( sal_False );
}
else
- aProspectCB_RTL.Enable( FALSE );
+ aProspectCB_RTL.Enable( sal_False );
}
void SwAddPrinterTabPage::Init()
@@ -500,10 +503,10 @@ void SwAddPrinterTabPage::Init()
IMPL_LINK_INLINE_START( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
{
- bAttrModified = TRUE;
+ bAttrModified = sal_True;
bool bIsProspect = aProspectCB.IsChecked();
if (!bIsProspect)
- aProspectCB_RTL.Check( FALSE );
+ aProspectCB_RTL.Check( sal_False );
aProspectCB_RTL.Enable( bIsProspect );
aNoRB.Enable( !bIsProspect );
aOnlyRB.Enable( !bIsProspect );
@@ -516,14 +519,14 @@ IMPL_LINK_INLINE_END( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
void SwAddPrinterTabPage::SetFax( const SvStringsDtor& rFaxLst )
{
aFaxLB.InsertEntry(sNone);
- for ( USHORT i = 0; i < rFaxLst.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rFaxLst.Count(); ++i )
aFaxLB.InsertEntry( *rFaxLst.GetObject(i) );
aFaxLB.SelectEntryPos(0);
}
IMPL_LINK_INLINE_START( SwAddPrinterTabPage, SelectHdl, ListBox *, EMPTYARG )
{
- bAttrModified=TRUE;
+ bAttrModified=sal_True;
return 0;
}
IMPL_LINK_INLINE_END( SwAddPrinterTabPage, SelectHdl, ListBox *, EMPTYARG )
@@ -590,20 +593,20 @@ SwStdFontTabPage::SwStdFontTabPage( Window* pParent,
pWrtShell(0),
eLanguage( GetAppLanguage() ),
- bListDefault(FALSE),
- bSetListDefault(TRUE),
- bLabelDefault(FALSE),
- bSetLabelDefault(TRUE),
- bIdxDefault(FALSE),
- bSetIdxDefault(TRUE),
- bDeletePrinter(FALSE),
-
- bListHeightDefault (FALSE),
- bSetListHeightDefault (FALSE),
- bLabelHeightDefault (FALSE),
- bSetLabelHeightDefault(FALSE),
- bIndexHeightDefault (FALSE),
- bSetIndexHeightDefault (FALSE),
+ bListDefault(sal_False),
+ bSetListDefault(sal_True),
+ bLabelDefault(sal_False),
+ bSetLabelDefault(sal_True),
+ bIdxDefault(sal_False),
+ bSetIdxDefault(sal_True),
+ bDeletePrinter(sal_False),
+
+ bListHeightDefault (sal_False),
+ bSetListHeightDefault (sal_False),
+ bLabelHeightDefault (sal_False),
+ bSetLabelHeightDefault(sal_False),
+ bIndexHeightDefault (sal_False),
+ bSetIndexHeightDefault (sal_False),
nFontGroup(FONT_GROUP_DEFAULT),
@@ -646,28 +649,20 @@ SfxTabPage* SwStdFontTabPage::Create( Window* pParent,
return new SwStdFontTabPage(pParent, rAttrSet);
}
-void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType,
+void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
SfxPrinter* pPrt, const String& rStyle,
- USHORT nFontWhich)
+ sal_uInt16 nFontWhich)
{
- BOOL bDelete = FALSE;
- const SfxFont* pFnt = pPrt ? pPrt->GetFontByName(rStyle): 0;
- if(!pFnt)
- {
- pFnt = new SfxFont(FAMILY_DONTKNOW, rStyle);
- bDelete = TRUE;
- }
+ Font aFont( rStyle, Size( 0, 10 ) );
+ if( pPrt )
+ aFont = pPrt->GetFontMetric( aFont );
SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(nType);
- pColl->SetFmtAttr(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(),
- aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich));
- if(bDelete)
- {
- delete (SfxFont*) pFnt;
- }
+ pColl->SetFmtAttr(SvxFontItem(aFont.GetFamily(), aFont.GetName(),
+ aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich));
}
-void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType,
- sal_Int32 nHeight, USHORT nFontHeightWhich)
+void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
+ sal_Int32 nHeight, sal_uInt16 nFontHeightWhich)
{
float fSize = (float)nHeight / 10;
nHeight = CalcToUnit( fSize, SFX_MAPUNIT_TWIP );
@@ -675,9 +670,9 @@ void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType,
pColl->SetFmtAttr(SvxFontHeightItem(nHeight, 100, nFontHeightWhich));
}
-BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& )
+sal_Bool SwStdFontTabPage::FillItemSet( SfxItemSet& )
{
- BOOL bNotDocOnly = !aDocOnlyCB.IsChecked();
+ sal_Bool bNotDocOnly = !aDocOnlyCB.IsChecked();
SW_MOD()->GetModuleConfig()->SetDefaultFontInCurrDocOnly(!bNotDocOnly);
String sStandard = aStandardBox.GetText();
@@ -733,32 +728,23 @@ BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& )
{
pWrtShell->StartAllAction();
SfxPrinter* pPrinter = pWrtShell->getIDocumentDeviceAccess()->getPrinter( false );
- BOOL bMod = FALSE;
- USHORT nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
+ sal_Bool bMod = sal_False;
+ sal_uInt16 nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONT :
FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONT : RES_CHRATR_CTL_FONT);
- USHORT nFontHeightWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
+ sal_uInt16 nFontHeightWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONTSIZE :
FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONTSIZE : RES_CHRATR_CTL_FONTSIZE);
if(sStandard != sShellStd)
{
- BOOL bDelete = FALSE;
- const SfxFont* pFnt = pPrinter ? pPrinter->GetFontByName(sStandard): 0;
- if(!pFnt)
- {
- pFnt = new SfxFont(FAMILY_DONTKNOW, sStandard);
- bDelete = TRUE;
- }
- pWrtShell->SetDefault(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(),
- aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich));
+ Font aFont( sStandard, Size( 0, 10 ) );
+ if( pPrinter )
+ aFont = pPrinter->GetFontMetric( aFont );
+ pWrtShell->SetDefault(SvxFontItem(aFont.GetFamily(), aFont.GetName(),
+ aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich));
SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD);
pColl->ResetFmtAttr(nFontWhich);
- if(bDelete)
- {
- delete (SfxFont*) pFnt;
- bDelete = FALSE;
- }
- bMod = TRUE;
+ bMod = sal_True;
}
if(bStandardHeightChanged)
{
@@ -766,69 +752,69 @@ BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& )
pWrtShell->SetDefault(SvxFontHeightItem( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), 100, nFontHeightWhich ) );
SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD);
pColl->ResetFmtAttr(nFontHeightWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(sTitle != sShellTitle )
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_HEADLINE_BASE, pPrinter, sTitle, nFontWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(bTitleHeightChanged)
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_HEADLINE_BASE,
sal::static_int_cast< sal_uInt16, sal_Int64 >(aTitleHeightLB.GetValue()), nFontHeightWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(sList != sShellList && (!bListDefault || !bSetListDefault ))
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_NUMBUL_BASE, pPrinter, sList, nFontWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(bListHeightChanged)
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_NUMBUL_BASE,
sal::static_int_cast< sal_uInt16, sal_Int64 >(aListHeightLB.GetValue()), nFontHeightWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(sLabel != sShellLabel && (!bLabelDefault || !bSetLabelDefault))
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_LABEL, pPrinter, sLabel, nFontWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(bLabelHeightChanged)
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_LABEL,
sal::static_int_cast< sal_uInt16, sal_Int64 >(aLabelHeightLB.GetValue()), nFontHeightWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(sIdx != sShellIndex && (!bIdxDefault || !bSetIdxDefault))
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_REGISTER_BASE, pPrinter, sIdx, nFontWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if(bIndexHeightChanged)
{
lcl_SetColl(pWrtShell, RES_POOLCOLL_REGISTER_BASE,
sal::static_int_cast< sal_uInt16, sal_Int64 >(aIndexHeightLB.GetValue()), nFontHeightWhich);
- bMod = TRUE;
+ bMod = sal_True;
}
if ( bMod )
pWrtShell->SetModified();
pWrtShell->EndAllAction();
}
- return FALSE;
+ return sal_False;
}
void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
{
const SfxPoolItem* pLang;
- USHORT nLangSlot = nFontGroup == FONT_GROUP_DEFAULT ? SID_ATTR_LANGUAGE :
+ sal_uInt16 nLangSlot = nFontGroup == FONT_GROUP_DEFAULT ? SID_ATTR_LANGUAGE :
FONT_GROUP_CJK == nFontGroup ? SID_ATTR_CHAR_CJK_LANGUAGE : SID_ATTR_CHAR_CTL_LANGUAGE;
- if( SFX_ITEM_SET == rSet.GetItemState(nLangSlot, FALSE, &pLang))
+ if( SFX_ITEM_SET == rSet.GetItemState(nLangSlot, sal_False, &pLang))
eLanguage = ((const SvxLanguageItem*)pLang)->GetValue();
String sTmp(aStdChrFL.GetText());
@@ -842,7 +828,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
aStdChrFL.SetText(sTmp);
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_PRINTER, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_PRINTER, sal_False, &pItem))
{
pPrt = (SfxPrinter*)((const SwPtrItem*)pItem)->GetValue();
}
@@ -853,29 +839,38 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
0 );
pPrt = new SfxPrinter(pPrinterSet);
- bDeletePrinter = TRUE;
+ bDeletePrinter = sal_True;
}
pFontList = new FontList( pPrt );
// #i94536# prevent duplication of font entries when 'reset' button is pressed
if( !aStandardBox.GetEntryCount() )
{
- const USHORT nCount = pPrt->GetFontCount();
- for (USHORT i = 0; i < nCount; ++i)
+ // get the set of disctinct available family names
+ std::set< String > aFontNames;
+ int nFontNames = pPrt->GetDevFontCount();
+ for( int i = 0; i < nFontNames; i++ )
{
- const String &rString = pPrt->GetFont(i)->GetName();
- aStandardBox.InsertEntry( rString );
- aTitleBox .InsertEntry( rString );
- aListBox .InsertEntry( rString );
- aLabelBox .InsertEntry( rString );
- aIdxBox .InsertEntry( rString );
+ FontInfo aInf( pPrt->GetDevFont( i ) );
+ aFontNames.insert( aInf.GetName() );
+ }
+
+ // insert to listboxes
+ for( std::set< String >::const_iterator it = aFontNames.begin();
+ it != aFontNames.end(); ++it )
+ {
+ aStandardBox.InsertEntry( *it );
+ aTitleBox .InsertEntry( *it );
+ aListBox .InsertEntry( *it );
+ aLabelBox .InsertEntry( *it );
+ aIdxBox .InsertEntry( *it );
}
}
- if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_STDFONTS, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_STDFONTS, sal_False, &pItem))
{
pFontConfig = (SwStdFontConfig*)((const SwPtrItem*)pItem)->GetValue();
}
- if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_WRTSHELL, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_WRTSHELL, sal_False, &pItem))
{
pWrtShell = (SwWrtShell*)((const SwPtrItem*)pItem)->GetValue();
}
@@ -913,7 +908,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
if( nIndexHeight <= 0)
nIndexHeight = pFontConfig->GetDefaultHeightFor( FONT_INDEX + nFontGroup * FONT_PER_GROUP, eLanguage);
- aDocOnlyCB.Enable(FALSE);
+ aDocOnlyCB.Enable(sal_False);
}
else
{
@@ -922,7 +917,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont();
sShellStd = sStdBackup = rFont.GetFamilyName();
- USHORT nFontHeightWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
+ sal_uInt16 nFontHeightWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONTSIZE :
FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONTSIZE : RES_CHRATR_CTL_FONTSIZE );
const SvxFontHeightItem& rFontHeightStandard = (const SvxFontHeightItem& )pColl->GetFmtAttr(nFontHeightWhich);
@@ -936,37 +931,37 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
const SvxFontHeightItem& rFontHeightTitle = (const SvxFontHeightItem&)pColl->GetFmtAttr( nFontHeightWhich, sal_True );
nTitleHeight = (sal_Int32)rFontHeightTitle.GetHeight();
- USHORT nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
+ sal_uInt16 nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONT :
FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONT : RES_CHRATR_CTL_FONT);
pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_NUMBUL_BASE);
const SvxFontItem& rFontLS = !nFontGroup ? pColl->GetFont() :
FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont();
- bListDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE);
+ bListDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False);
sShellList = sListBackup = rFontLS.GetFamilyName();
const SvxFontHeightItem& rFontHeightList = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, sal_True);
nListHeight = (sal_Int32)rFontHeightList.GetHeight();
- bListHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE);
+ bListHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False);
pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_LABEL);
- bLabelDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE);
+ bLabelDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False);
const SvxFontItem& rFontCP = !nFontGroup ? pColl->GetFont() :
FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont();
sShellLabel = sCapBackup = rFontCP.GetFamilyName();
const SvxFontHeightItem& rFontHeightLabel = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, sal_True);
nLabelHeight = (sal_Int32)rFontHeightLabel.GetHeight();
- bLabelHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE);
+ bLabelHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False);
pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_REGISTER_BASE);
- bIdxDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE);
+ bIdxDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False);
const SvxFontItem& rFontIDX = !nFontGroup ? pColl->GetFont() :
FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont();
sShellIndex = sIdxBackup = rFontIDX.GetFamilyName();
const SvxFontHeightItem& rFontHeightIndex = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, sal_True);
nIndexHeight = (sal_Int32)rFontHeightIndex.GetHeight();
- bIndexHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE);
+ bIndexHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, sal_False);
}
aStandardBox.SetText(sStdBackup );
aTitleBox .SetText(sOutBackup );
@@ -1052,15 +1047,15 @@ IMPL_LINK( SwStdFontTabPage, ModifyHdl, ComboBox*, pBox )
}
else if(pBox == &aListBox)
{
- bSetListDefault = FALSE;
+ bSetListDefault = sal_False;
}
else if(pBox == &aLabelBox)
{
- bSetLabelDefault = FALSE;
+ bSetLabelDefault = sal_False;
}
else if(pBox == &aIdxBox)
{
- bSetIdxDefault = FALSE;
+ bSetIdxDefault = sal_False;
}
return 0;
}
@@ -1079,15 +1074,15 @@ IMPL_LINK( SwStdFontTabPage, ModifyHeightHdl, FontSizeBox*, pBox )
}
else if(pBox == &aListHeightLB)
{
- bSetListHeightDefault = FALSE;
+ bSetListHeightDefault = sal_False;
}
else if(pBox == &aLabelHeightLB)
{
- bSetLabelHeightDefault = FALSE;
+ bSetLabelHeightDefault = sal_False;
}
else if(pBox == &aIndexHeightLB)
{
- bSetIndexHeightDefault = FALSE;
+ bSetIndexHeightDefault = sal_False;
}
return 0;
}
@@ -1166,7 +1161,7 @@ SwTableOptionsTabPage::SwTableOptionsTabPage( Window* pParent, const SfxItemSet&
aFixPropFT( this, SW_RES(FT_FIXPROP )),
aVarFT( this, SW_RES(FT_VAR )),
pWrtShell(0),
- bHTMLMode(FALSE)
+ bHTMLMode(sal_False)
{
FreeResource();
@@ -1186,22 +1181,22 @@ SfxTabPage* SwTableOptionsTabPage::Create( Window* pParent,
return new SwTableOptionsTabPage(pParent, rAttrSet );
}
-BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& )
+sal_Bool SwTableOptionsTabPage::FillItemSet( SfxItemSet& )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
if(aRowMoveMF.IsModified())
- pModOpt->SetTblHMove( (USHORT)aRowMoveMF.Denormalize( aRowMoveMF.GetValue(FUNIT_TWIP)));
+ pModOpt->SetTblHMove( (sal_uInt16)aRowMoveMF.Denormalize( aRowMoveMF.GetValue(FUNIT_TWIP)));
if(aColMoveMF.IsModified())
- pModOpt->SetTblVMove( (USHORT)aColMoveMF.Denormalize( aColMoveMF.GetValue(FUNIT_TWIP)));
+ pModOpt->SetTblVMove( (sal_uInt16)aColMoveMF.Denormalize( aColMoveMF.GetValue(FUNIT_TWIP)));
if(aRowInsertMF.IsModified())
- pModOpt->SetTblHInsert((USHORT)aRowInsertMF.Denormalize( aRowInsertMF.GetValue(FUNIT_TWIP)));
+ pModOpt->SetTblHInsert((sal_uInt16)aRowInsertMF.Denormalize( aRowInsertMF.GetValue(FUNIT_TWIP)));
if(aColInsertMF.IsModified())
- pModOpt->SetTblVInsert((USHORT)aColInsertMF.Denormalize( aColInsertMF.GetValue(FUNIT_TWIP)));
+ pModOpt->SetTblVInsert((sal_uInt16)aColInsertMF.Denormalize( aColInsertMF.GetValue(FUNIT_TWIP)));
TblChgMode eMode;
if(aFixRB.IsChecked())
@@ -1218,7 +1213,7 @@ BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& )
if(pWrtShell && nsSelectionType::SEL_TBL & pWrtShell->GetSelectionType())
{
pWrtShell->SetTblChgMode(eMode);
- static USHORT const aInva[] =
+ static sal_uInt16 aInva[] =
{ FN_TABLE_MODE_FIX,
FN_TABLE_MODE_FIX_PROP,
FN_TABLE_MODE_VARIABLE,
@@ -1227,7 +1222,7 @@ BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& )
pWrtShell->GetView().GetViewFrame()->GetBindings().Invalidate( aInva );
}
- bRet = TRUE;
+ bRet = sal_True;
}
SwInsertTableOptions aInsOpts( 0, 0 );
@@ -1255,19 +1250,19 @@ BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& )
if (aNumFormattingCB.GetSavedValue() != aNumFormattingCB.GetState())
{
pModOpt->SetInsTblFormatNum(bHTMLMode, aNumFormattingCB.IsChecked());
- bRet = TRUE;
+ bRet = sal_True;
}
if (aNumFmtFormattingCB.GetSavedValue() != aNumFmtFormattingCB.GetState())
{
pModOpt->SetInsTblChangeNumFormat(bHTMLMode, aNumFmtFormattingCB.IsChecked());
- bRet = TRUE;
+ bRet = sal_True;
}
if (aNumAlignmentCB.GetSavedValue() != aNumAlignmentCB.GetState())
{
pModOpt->SetInsTblAlignNum(bHTMLMode, aNumAlignmentCB.IsChecked());
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -1298,7 +1293,7 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet& rSet)
case TBLVAR_CHGABS: aVarRB.Check(); break;
}
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem))
{
bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON);
}
@@ -1311,7 +1306,7 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet& rSet)
}
SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode);
- USHORT nInsTblFlags = aInsOpts.mnInsMode;
+ sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode;
aHeaderCB.Check(0 != (nInsTblFlags & tabopts::HEADLINE));
aRepeatHeaderCB.Check(aInsOpts.mnRowsToRepeat > 0);
@@ -1373,24 +1368,26 @@ SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( Window* pParent,
aFillTabRB( this, SW_RES( RB_SHDWCRSFILLTAB )),
aFillSpaceRB( this, SW_RES( RB_SHDWCRSFILLSPACE )),
aCrsrOptFL ( this, SW_RES( FL_CRSR_OPT)),
- aCrsrInProtCB( this, SW_RES( CB_ALLOW_IN_PROT ))
+ aCrsrInProtCB( this, SW_RES( CB_ALLOW_IN_PROT )),
+ m_aLayoutOptionsFL( this, SW_RES( FL_LAYOUT_OPTIONS ) ),
+ m_aMathBaselineAlignmentCB( this, SW_RES( CB_MATH_BASELINE_ALIGNMENT ) ),
+ m_pWrtShell( NULL )
{
FreeResource();
const SfxPoolItem* pItem = 0;
- SwShadowCursorItem aOpt;
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem ))
+ SwShadowCursorItem aOpt;
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem ))
aOpt = *(SwShadowCursorItem*)pItem;
-
aOnOffCB.Check( aOpt.IsOn() );
- BYTE eMode = aOpt.GetMode();
+ sal_uInt8 eMode = aOpt.GetMode();
aFillIndentRB.Check( FILL_INDENT == eMode );
aFillMarginRB.Check( FILL_MARGIN == eMode );
aFillTabRB.Check( FILL_TAB == eMode );
aFillSpaceRB.Check( FILL_SPACE == eMode );
- if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem )
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem )
&& ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
{
aTabCB .Hide();
@@ -1425,12 +1422,21 @@ SfxTabPage* SwShdwCrsrOptionsTabPage::Create( Window* pParent, const SfxItemSet&
return new SwShdwCrsrOptionsTabPage( pParent, rSet );
}
-BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet )
+
+void SwShdwCrsrOptionsTabPage::PageCreated( SfxAllItemSet aSet )
+{
+ SFX_ITEMSET_ARG (&aSet,pWrtSh,SwWrtShellItem,SID_WRT_SHELL,sal_False);
+ if (pWrtSh)
+ SetWrtShell(pWrtSh->GetValue());
+}
+
+
+sal_Bool SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet )
{
SwShadowCursorItem aOpt;
aOpt.SetOn( aOnOffCB.IsChecked() );
- BYTE eMode;
+ sal_uInt8 eMode;
if( aFillIndentRB.IsChecked() )
eMode= FILL_INDENT;
else if( aFillMarginRB.IsChecked() )
@@ -1441,19 +1447,23 @@ BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet )
eMode = FILL_SPACE;
aOpt.SetMode( eMode );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SfxPoolItem* pItem = 0;
- if( SFX_ITEM_SET != rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem )
+ if( SFX_ITEM_SET != rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem )
|| ((SwShadowCursorItem&)*pItem) != aOpt )
{
rSet.Put( aOpt );
- bRet = TRUE;
+ bRet = sal_True;
}
+ m_pWrtShell->GetDoc()->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT,
+ m_aMathBaselineAlignmentCB.IsChecked() );
+ bRet |= m_aMathBaselineAlignmentCB.IsChecked() != m_aMathBaselineAlignmentCB.GetSavedValue();
+
if( aCrsrInProtCB.IsChecked() != aCrsrInProtCB.GetSavedValue())
{
rSet.Put(SfxBoolItem(FN_PARAM_CRSR_IN_PROTECTED, aCrsrInProtCB.IsChecked()));
- bRet |= TRUE;
+ bRet |= sal_True;
}
const SwDocDisplayItem* pOldAttr = (const SwDocDisplayItem*)
@@ -1483,26 +1493,28 @@ BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet )
void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet )
{
const SfxPoolItem* pItem = 0;
- SwShadowCursorItem aOpt;
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem ))
+ SwShadowCursorItem aOpt;
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem ))
aOpt = *(SwShadowCursorItem*)pItem;
-
aOnOffCB.Check( aOpt.IsOn() );
- BYTE eMode = aOpt.GetMode();
+ sal_uInt8 eMode = aOpt.GetMode();
aFillIndentRB.Check( FILL_INDENT == eMode );
aFillMarginRB.Check( FILL_MARGIN == eMode );
aFillTabRB.Check( FILL_TAB == eMode );
aFillSpaceRB.Check( FILL_SPACE == eMode );
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem ))
+ m_aMathBaselineAlignmentCB.Check( m_pWrtShell->GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) );
+ m_aMathBaselineAlignmentCB.SaveValue();
+
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, sal_False, &pItem ))
aCrsrInProtCB.Check(((const SfxBoolItem*)pItem)->GetValue());
aCrsrInProtCB.SaveValue();
const SwDocDisplayItem* pDocDisplayAttr = 0;
- rSet.GetItemState( FN_PARAM_DOCDISP, FALSE,
+ rSet.GetItemState( FN_PARAM_DOCDISP, sal_False,
(const SfxPoolItem**)&pDocDisplayAttr );
if(pDocDisplayAttr)
{
@@ -1523,8 +1535,8 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet )
--------------------------------------------------*/
struct CharAttr
{
- USHORT nItemId;
- USHORT nAttr;
+ sal_uInt16 nItemId;
+ sal_uInt16 nAttr;
};
// Edit corresponds to Paste-attributes
@@ -1544,15 +1556,15 @@ static CharAttr aRedlineAttr[] =
};
// Items from aRedlineAttr relevant for InsertAttr: strikethrough is
// not used
-static USHORT aInsertAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
+static sal_uInt16 aInsertAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
// Items from aRedlineAttr relevant for DeleteAttr: underline and
// double underline is not used
-static USHORT aDeletedAttrMap[] = { 0, 1, 2, 5, 6, 7, 8, 9, 10 };
+static sal_uInt16 aDeletedAttrMap[] = { 0, 1, 2, 5, 6, 7, 8, 9, 10 };
// Items from aRedlineAttr relevant for ChangeAttr: strikethrough is
// not used
-static USHORT aChangedAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
+static sal_uInt16 aChangedAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
/*-----------------------------------------------------------------------
Description: Preview of selection
@@ -1573,18 +1585,18 @@ SwMarkPreview::SwMarkPreview( Window *pParent, const ResId& rResID ) :
// Page
aPage.SetSize(Size(aSz.Width() - 3, aSz.Height() - 3));
- ULONG nOutWPix = aPage.GetWidth();
- ULONG nOutHPix = aPage.GetHeight();
+ sal_uLong nOutWPix = aPage.GetWidth();
+ sal_uLong nOutHPix = aPage.GetHeight();
// PrintArea
- ULONG nLBorder = 8;
- ULONG nRBorder = 8;
- ULONG nTBorder = 4;
- ULONG nBBorder = 4;
+ sal_uLong nLBorder = 8;
+ sal_uLong nRBorder = 8;
+ sal_uLong nTBorder = 4;
+ sal_uLong nBBorder = 4;
aLeftPagePrtArea = Rectangle(Point(nLBorder, nTBorder), Point((nOutWPix - 1) - nRBorder, (nOutHPix - 1) - nBBorder));
- USHORT nWidth = (USHORT)aLeftPagePrtArea.GetWidth();
- USHORT nKorr = (nWidth & 1) != 0 ? 0 : 1;
+ sal_uInt16 nWidth = (sal_uInt16)aLeftPagePrtArea.GetWidth();
+ sal_uInt16 nKorr = (nWidth & 1) != 0 ? 0 : 1;
aLeftPagePrtArea.SetSize(Size(nWidth / 2 - (nLBorder + nRBorder) / 2 + nKorr, aLeftPagePrtArea.GetHeight()));
aRightPagePrtArea = aLeftPagePrtArea;
@@ -1602,7 +1614,7 @@ void SwMarkPreview::InitColors( void )
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
m_aBgCol = Color( rSettings.GetWindowColor() );
- BOOL bHC = rSettings.GetHighContrastMode();
+ sal_Bool bHC = rSettings.GetHighContrastMode();
m_aLineCol = bHC? SwViewOption::GetFontColor() : Color( COL_BLACK );
m_aShadowCol = bHC? m_aBgCol : rSettings.GetShadowColor();
m_aTxtCol = bHC? SwViewOption::GetFontColor() : Color( COL_GRAY );
@@ -1671,9 +1683,9 @@ void SwMarkPreview::PaintPage(const Rectangle &rRect)
DrawRect(rRect, m_aTransCol, m_aPrintAreaCol );
// draw Testparagraph
- ULONG nLTxtBorder = 4;
- ULONG nRTxtBorder = 4;
- ULONG nTTxtBorder = 4;
+ sal_uLong nLTxtBorder = 4;
+ sal_uLong nRTxtBorder = 4;
+ sal_uLong nTTxtBorder = 4;
Rectangle aTextLine = rRect;
aTextLine.SetSize(Size(aTextLine.GetWidth(), 2));
@@ -1682,13 +1694,13 @@ void SwMarkPreview::PaintPage(const Rectangle &rRect)
aTextLine.Move(0, nTTxtBorder);
sal_Int32 nStep;
- USHORT nLines;
+ sal_uInt16 nLines;
nStep = aTextLine.GetHeight() + 2;
- nLines = (USHORT)(rRect.GetHeight() / (aTextLine.GetHeight() + 2)) - 1;
+ nLines = (sal_uInt16)(rRect.GetHeight() / (aTextLine.GetHeight() + 2)) - 1;
// simulate text
- for (USHORT i = 0; i < nLines; ++i)
+ for (sal_uInt16 i = 0; i < nLines; ++i)
{
if (i == (nLines - 1))
aTextLine.SetSize(Size(aTextLine.GetWidth() / 2, aTextLine.GetHeight()));
@@ -1712,9 +1724,9 @@ namespace
{
void lcl_FillRedlineAttrListBox(
ListBox& rLB, const AuthorCharAttr& rAttrToSelect,
- const USHORT* pAttrMap, const USHORT nAttrMapSize)
+ const sal_uInt16* pAttrMap, const sal_uInt16 nAttrMapSize)
{
- for (USHORT i = 0; i != nAttrMapSize; ++i)
+ for (sal_uInt16 i = 0; i != nAttrMapSize; ++i)
{
CharAttr& rAttr(aRedlineAttr[pAttrMap[i]]);
rLB.SetEntryData(i, &rAttr);
@@ -1766,7 +1778,7 @@ SwRedlineOptionsTabPage::SwRedlineOptionsTabPage( Window* pParent,
{
FreeResource();
- for(USHORT i = 0; i < aInsertLB.GetEntryCount(); i++)
+ for(sal_uInt16 i = 0; i < aInsertLB.GetEntryCount(); i++)
{
String sEntry(aInsertLB.GetEntry(i));
aDeletedLB.InsertEntry(sEntry);
@@ -1793,6 +1805,13 @@ SwRedlineOptionsTabPage::SwRedlineOptionsTabPage( Window* pParent,
aLk = LINK(this, SwRedlineOptionsTabPage, ChangedMaskPrevHdl);
aMarkPosLB.SetSelectHdl( aLk );
aMarkColorLB.SetSelectHdl( aLk );
+//IAccessibility2 Impplementaton 2009-----
+ //solution: set different accessible name of four color box
+ aInsertColorLB.SetAccessibleName(::rtl::OUString( aInsertFT.GetDisplayText()) + ::rtl::OUString(aInsertColorFT.GetDisplayText()));
+ aDeletedColorLB.SetAccessibleName(::rtl::OUString( aDeletedFT.GetDisplayText()) + ::rtl::OUString( aDeletedColorFT.GetDisplayText()));
+ aChangedColorLB.SetAccessibleName(::rtl::OUString( aChangedFT.GetDisplayText()) + ::rtl::OUString( aChangedColorFT.GetDisplayText()));
+ aMarkColorLB.SetAccessibleName(::rtl::OUString( aMarkPosFT.GetDisplayText()) + ::rtl::OUString( aMarkColorFT.GetDisplayText()));
+//-----IAccessibility2 Impplementaton 2009
}
SwRedlineOptionsTabPage::~SwRedlineOptionsTabPage()
@@ -1804,7 +1823,7 @@ SfxTabPage* SwRedlineOptionsTabPage::Create( Window* pParent, const SfxItemSet&
return new SwRedlineOptionsTabPage( pParent, rSet );
}
-BOOL SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& )
+sal_Bool SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& )
{
CharAttr *pAttr;
SwModuleOptions *pOpt = SW_MOD()->GetModuleConfig();
@@ -1818,9 +1837,9 @@ BOOL SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& )
AuthorCharAttr aOldChangedAttr(pOpt->GetFormatAuthorAttr());
ColorData nOldMarkColor = pOpt->GetMarkAlignColor().GetColor();
- USHORT nOldMarkMode = pOpt->GetMarkAlignMode();
+ sal_uInt16 nOldMarkMode = pOpt->GetMarkAlignMode();
- USHORT nPos = aInsertLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aInsertLB.GetSelectEntryPos();
if (nPos != LISTBOX_ENTRY_NOTFOUND)
{
pAttr = (CharAttr *)aInsertLB.GetEntryData(nPos);
@@ -1928,7 +1947,7 @@ BOOL SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& )
}
}
- return FALSE;
+ return sal_False;
}
void SwRedlineOptionsTabPage::Reset( const SfxItemSet& )
@@ -1946,10 +1965,10 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& )
// initialise colour list box
String sColor;
- aInsertColorLB.SetUpdateMode(FALSE);
- aDeletedColorLB.SetUpdateMode(FALSE);
- aChangedColorLB.SetUpdateMode(FALSE);
- aMarkColorLB.SetUpdateMode(FALSE);
+ aInsertColorLB.SetUpdateMode(sal_False);
+ aDeletedColorLB.SetUpdateMode(sal_False);
+ aChangedColorLB.SetUpdateMode(sal_False);
+ aMarkColorLB.SetUpdateMode(sal_False);
aInsertColorLB.InsertEntry(sNone);
aDeletedColorLB.InsertEntry(sNone);
@@ -1960,7 +1979,7 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& )
aChangedColorLB.InsertEntry(sAuthor);
XColorTable* pColorTbl = XColorTable::GetStdColorTable();
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < pColorTbl->Count(); ++i )
{
XColorEntry* pEntry = pColorTbl->GetColor( i );
@@ -1972,10 +1991,10 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& )
aChangedColorLB.InsertEntry( aColor, sName );
aMarkColorLB.InsertEntry( aColor, sName );
}
- aInsertColorLB.SetUpdateMode( TRUE );
- aDeletedColorLB.SetUpdateMode( TRUE );
- aChangedColorLB.SetUpdateMode( TRUE );
- aMarkColorLB.SetUpdateMode( TRUE );
+ aInsertColorLB.SetUpdateMode( sal_True );
+ aDeletedColorLB.SetUpdateMode( sal_True );
+ aChangedColorLB.SetUpdateMode( sal_True );
+ aMarkColorLB.SetUpdateMode( sal_True );
ColorData nColor = rInsertAttr.nColor;
@@ -2026,13 +2045,13 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& )
aChangedLB.SelectEntryPos(0);
lcl_FillRedlineAttrListBox(aInsertLB, rInsertAttr, aInsertAttrMap,
- sizeof(aInsertAttrMap) / sizeof(USHORT));
+ sizeof(aInsertAttrMap) / sizeof(sal_uInt16));
lcl_FillRedlineAttrListBox(aDeletedLB, rDeletedAttr, aDeletedAttrMap,
- sizeof(aDeletedAttrMap) / sizeof(USHORT));
+ sizeof(aDeletedAttrMap) / sizeof(sal_uInt16));
lcl_FillRedlineAttrListBox(aChangedLB, rChangedAttr, aChangedAttrMap,
- sizeof(aChangedAttrMap) / sizeof(USHORT));
+ sizeof(aChangedAttrMap) / sizeof(sal_uInt16));
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
switch (pOpt->GetMarkAlignMode())
{
case text::HoriOrientation::NONE: nPos = 0; break;
@@ -2089,7 +2108,7 @@ IMPL_LINK( SwRedlineOptionsTabPage, AttribHdl, ListBox *, pLB )
rFont.SetCaseMap(SVX_CASEMAP_NOT_MAPPED);
rCJKFont.SetCaseMap(SVX_CASEMAP_NOT_MAPPED);
- USHORT nPos = pColorLB->GetSelectEntryPos();
+ sal_uInt16 nPos = pColorLB->GetSelectEntryPos();
switch( nPos )
{
@@ -2184,7 +2203,7 @@ IMPL_LINK( SwRedlineOptionsTabPage, ColorHdl, ColorListBox *, pColorLB )
SvxFont& rFont = pPrev->GetFont();
SvxFont& rCJKFont = pPrev->GetCJKFont();
- USHORT nPos = pLB->GetSelectEntryPos();
+ sal_uInt16 nPos = pLB->GetSelectEntryPos();
if( nPos == LISTBOX_ENTRY_NOTFOUND )
nPos = 0;
@@ -2306,7 +2325,7 @@ SwTestTabPage::SwTestTabPage( Window* pParent,
aTest8CBox ( this, 0 ),
aTest9CBox ( this, 0 ),
aTest10CBox ( this, 0 ),
- bAttrModified( FALSE )
+ bAttrModified( sal_False )
{
lcl_SetPosSize(*this, Point(0,0), Size(260 , 135));
lcl_SetPosSize(aTestFL, Point(6,2), Size(209,8));
@@ -2353,7 +2372,7 @@ SfxTabPage* SwTestTabPage::Create( Window* pParent,
return ( new SwTestTabPage( pParent, rAttrSet ) );
}
-BOOL SwTestTabPage::FillItemSet( SfxItemSet& rCoreSet )
+sal_Bool SwTestTabPage::FillItemSet( SfxItemSet& rCoreSet )
{
if ( bAttrModified )
@@ -2379,7 +2398,7 @@ void SwTestTabPage::Reset( const SfxItemSet& )
const SfxItemSet& rSet = GetItemSet();
const SwTestItem* pTestAttr = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SWTEST , FALSE,
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SWTEST , sal_False,
(const SfxPoolItem**)&pTestAttr ))
{
aTest1CBox.Check(pTestAttr->bTest1);
@@ -2413,7 +2432,7 @@ void SwTestTabPage::Init()
IMPL_LINK_INLINE_START( SwTestTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
{
- bAttrModified = TRUE;
+ bAttrModified = sal_True;
return 0;
}
IMPL_LINK_INLINE_END( SwTestTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
diff --git a/sw/source/ui/config/prtopt.cxx b/sw/source/ui/config/prtopt.cxx
index 318190b36a4c..d3ecdc2c4a70 100644
--- a/sw/source/ui/config/prtopt.cxx
+++ b/sw/source/ui/config/prtopt.cxx
@@ -29,16 +29,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <unotools/configmgr.hxx>
#include <prtopt.hxx>
-#include <swprtopt.hxx>
#include <osl/diagnose.h>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <unomid.h>
+
using namespace utl;
using rtl::OUString;
using namespace com::sun::star::uno;
@@ -154,7 +153,7 @@ void SwPrintOptions::Commit()
Any* pValues = aValues.getArray();
const Type& rType = ::getBooleanCppuType();
- BOOL bVal;
+ sal_Bool bVal;
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
{
switch(nProp)
diff --git a/sw/source/ui/config/redlopt.src b/sw/source/ui/config/redlopt.src
index 4d6816dcec23..b7ec8c42686d 100644
--- a/sw/source/ui/config/redlopt.src
+++ b/sw/source/ui/config/redlopt.src
@@ -65,6 +65,7 @@ TabPage TP_REDLINE_OPT
};
ListBox LB_INS_ATTR
{
+ HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_INS_ATTR";
Pos = MAP_APPFONT ( 90 , 25 ) ;
Size = MAP_APPFONT ( 80 , 80 ) ;
TabStop = TRUE ;
@@ -92,6 +93,7 @@ TabPage TP_REDLINE_OPT
};
ListBox LB_INS_COL
{
+ HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_INS_COL";
Pos = MAP_APPFONT ( 90 , 40 ) ;
Size = MAP_APPFONT ( 80 , 80 ) ;
TabStop = TRUE ;
@@ -118,6 +120,7 @@ TabPage TP_REDLINE_OPT
};
ListBox LB_DEL_ATTR
{
+ HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_DEL_ATTR";
Pos = MAP_APPFONT ( 90 , 67 ) ;
Size = MAP_APPFONT ( 80 , 80 ) ;
TabStop = TRUE ;
@@ -131,6 +134,7 @@ TabPage TP_REDLINE_OPT
};
ListBox LB_DEL_COL
{
+ HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_DEL_COL";
Pos = MAP_APPFONT ( 90 , 82 ) ;
Size = MAP_APPFONT ( 80 , 80 ) ;
TabStop = TRUE ;
@@ -157,6 +161,7 @@ TabPage TP_REDLINE_OPT
};
ListBox LB_CHG_ATTR
{
+ HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_CHG_ATTR";
Pos = MAP_APPFONT ( 90 , 111 ) ;
Size = MAP_APPFONT ( 80 , 80 ) ;
TabStop = TRUE ;
@@ -170,6 +175,7 @@ TabPage TP_REDLINE_OPT
};
ListBox LB_CHG_COL
{
+ HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_CHG_COL";
Pos = MAP_APPFONT ( 90 , 126 ) ;
Size = MAP_APPFONT ( 80 , 80 ) ;
TabStop = TRUE ;
@@ -196,6 +202,7 @@ TabPage TP_REDLINE_OPT
};
ListBox LB_MARKPOS
{
+ HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_MARKPOS";
Pos = MAP_APPFONT ( 90 , 155 ) ;
Size = MAP_APPFONT ( 80 , 80 ) ;
TabStop = TRUE ;
@@ -217,6 +224,7 @@ TabPage TP_REDLINE_OPT
};
ListBox LB_LC_COL
{
+ HelpID = "sw:ListBox:TP_REDLINE_OPT:LB_LC_COL";
Pos = MAP_APPFONT ( 90 , 170 ) ;
Size = MAP_APPFONT ( 80 , 80 ) ;
TabStop = TRUE ;
diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx
index 98b2e81330dc..665ed2c168cf 100644
--- a/sw/source/ui/config/uinums.cxx
+++ b/sw/source/ui/config/uinums.cxx
@@ -51,11 +51,11 @@
using namespace ::com::sun::star;
-#define VERSION_30B ((USHORT)250)
-#define VERSION_31B ((USHORT)326)
-#define VERSION_40A ((USHORT)364)
-#define VERSION_50A ((USHORT)373)
-#define VERSION_53A ((USHORT)596)
+#define VERSION_30B ((sal_uInt16)250)
+#define VERSION_31B ((sal_uInt16)326)
+#define VERSION_40A ((sal_uInt16)364)
+#define VERSION_50A ((sal_uInt16)373)
+#define VERSION_53A ((sal_uInt16)596)
#define ACT_NUM_VERSION VERSION_53A
#define NUMRULE_FILENAME "numrule.cfg"
@@ -77,7 +77,7 @@ SwBaseNumRules::SwBaseNumRules( const String& rFileName )
:
sFileName( rFileName ),
nVersion(0),
- bModified( FALSE )
+ bModified( sal_False )
{
Init();
}
@@ -93,29 +93,29 @@ SwBaseNumRules::~SwBaseNumRules()
INetURLObject aTempObj(sNm);
sNm = aTempObj.GetFull();
SfxMedium aStrm( sNm, STREAM_WRITE | STREAM_TRUNC |
- STREAM_SHARE_DENYALL, TRUE );
+ STREAM_SHARE_DENYALL, sal_True );
Store( *aStrm.GetOutStream() );
}
- for( USHORT i = 0; i < nMaxRules; ++i )
+ for( sal_uInt16 i = 0; i < nMaxRules; ++i )
delete pNumRules[i];
}
void SwBaseNumRules::Init()
{
- for(USHORT i = 0; i < nMaxRules; ++i )
+ for(sal_uInt16 i = 0; i < nMaxRules; ++i )
pNumRules[i] = 0;
String sNm( sFileName );
SvtPathOptions aOpt;
if( aOpt.SearchFile( sNm, SvtPathOptions::PATH_USERCONFIG ))
{
- SfxMedium aStrm( sNm, STREAM_STD_READ, TRUE );
+ SfxMedium aStrm( sNm, STREAM_STD_READ, sal_True );
Load( *aStrm.GetInStream() );
}
}
-void SwBaseNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, USHORT nIdx)
+void SwBaseNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, sal_uInt16 nIdx)
{
OSL_ENSURE(nIdx < nMaxRules, "Array der NumRules ueberindiziert.");
if( !pNumRules[nIdx] )
@@ -125,22 +125,22 @@ void SwBaseNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, USHORT nIdx)
}
// PROTECTED METHODS ----------------------------------------------------
-BOOL SwBaseNumRules::Store(SvStream &rStream)
+sal_Bool SwBaseNumRules::Store(SvStream &rStream)
{
rStream << ACT_NUM_VERSION;
// Write, what positions are occupied by a rule
// Then write each of the rules
- for(USHORT i = 0; i < nMaxRules; ++i)
+ for(sal_uInt16 i = 0; i < nMaxRules; ++i)
{
if(pNumRules[i])
{
- rStream << (unsigned char) TRUE;
+ rStream << (unsigned char) sal_True;
pNumRules[i]->Store( rStream );
}
else
- rStream << (unsigned char) FALSE;
+ rStream << (unsigned char) sal_False;
}
- return TRUE;
+ return sal_True;
}
int SwBaseNumRules::Load(SvStream &rStream)
@@ -158,8 +158,8 @@ int SwBaseNumRules::Load(SvStream &rStream)
else if( VERSION_30B == nVersion || VERSION_31B == nVersion ||
ACT_NUM_VERSION >= nVersion )
{
- unsigned char bRule = FALSE;
- for(USHORT i = 0; i < nMaxRules; ++i)
+ unsigned char bRule = sal_False;
+ for(sal_uInt16 i = 0; i < nMaxRules; ++i)
{
rStream >> bRule;
if(bRule)
@@ -183,9 +183,9 @@ SwChapterNumRules::SwChapterNumRules() :
{
}
-void SwChapterNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, USHORT nIdx)
+void SwChapterNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, sal_uInt16 nIdx)
{
- bModified = TRUE;
+ bModified = sal_True;
SwBaseNumRules::ApplyNumRules(rCopy, nIdx);
}
@@ -193,7 +193,7 @@ SwNumRulesWithName::SwNumRulesWithName( const SwNumRule &rCopy,
const String &rName )
: aName(rName)
{
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
{
const SwNumFmt* pFmt = rCopy.GetNumFmt( n );
if( pFmt )
@@ -234,13 +234,13 @@ const SwNumRulesWithName& SwNumRulesWithName::operator=(const SwNumRulesWithName
return *this;
}
-SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, USHORT nVersion )
+SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, sal_uInt16 nVersion )
{
CharSet eEncoding = gsl_getSystemTextEncoding();
rStream.ReadByteString(aName, eEncoding);
char c;
- for(USHORT n = 0; n < MAXLEVEL; ++n )
+ for(sal_uInt16 n = 0; n < MAXLEVEL; ++n )
{
if( VERSION_30B == nVersion )
c = 1;
@@ -262,9 +262,9 @@ void SwNumRulesWithName::MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const
{
// #i89178#
rChg = SwNumRule( aName, numfunc::GetDefaultPositionAndSpaceMode() );
- rChg.SetAutoRule( FALSE );
+ rChg.SetAutoRule( sal_False );
_SwNumFmtGlobal* pFmt;
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
if( 0 != ( pFmt = aFmts[ n ] ) )
{
SwNumFmt aNew;
@@ -278,7 +278,7 @@ void SwNumRulesWithName::Store( SvStream &rStream )
CharSet eEncoding = gsl_getSystemTextEncoding();
rStream.WriteByteString(aName, eEncoding);
- for( USHORT n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
{
_SwNumFmtGlobal* pFmt = aFmts[ n ];
if( pFmt )
@@ -305,7 +305,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const SwNumFmt& rFmt )
{
SfxItemIter aIter( pFmt->GetAttrSet() );
const SfxPoolItem *pCurr = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
aItems.Insert( pCurr->Clone(), aItems.Count() );
if( aIter.IsAtEnd() )
@@ -324,19 +324,19 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const _SwNumFmtGlobal& rFm
sCharFmtName( rFmt.sCharFmtName ),
nCharPoolId( rFmt.nCharPoolId )
{
- for( USHORT n = rFmt.aItems.Count(); n; )
+ for( sal_uInt16 n = rFmt.aItems.Count(); n; )
aItems.Insert( rFmt.aItems[ --n ]->Clone(), aItems.Count() );
}
SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
- USHORT nVersion )
+ sal_uInt16 nVersion )
: nCharPoolId( USHRT_MAX )
{
CharSet eEncoding = gsl_getSystemTextEncoding();
{
- USHORT nUS;
+ sal_uInt16 nUS;
sal_Char cChar;
- BOOL bFlag;
+ sal_Bool bFlag;
String sStr;
rStream >> nUS; aFmt.SetNumberingType((sal_Int16)nUS );
@@ -354,7 +354,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
if( VERSION_30B == nVersion )
{
long nL;
- rStream >> cChar; aFmt.SetStart( (USHORT)cChar );
+ rStream >> cChar; aFmt.SetStart( (sal_uInt16)cChar );
rStream.ReadByteString(sStr, eEncoding);
aFmt.SetPrefix( sStr );
@@ -380,11 +380,11 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
rStream >> bFlag;
}
- USHORT nFamily;
- USHORT nCharSet;
+ sal_uInt16 nFamily;
+ sal_uInt16 nCharSet;
short nWidth;
short nHeight;
- USHORT nPitch;
+ sal_uInt16 nPitch;
String aName;
rStream.ReadByteString(aName, eEncoding);
@@ -409,14 +409,14 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
if( VERSION_30B != nVersion )
{
- USHORT nItemCount;
+ sal_uInt16 nItemCount;
rStream >> nCharPoolId;
rStream.ReadByteString(sCharFmtName, eEncoding);
rStream >> nItemCount;
while( nItemCount-- )
{
- USHORT nWhich, nVers;
+ sal_uInt16 nWhich, nVers;
rStream >> nWhich >> nVers;
aItems.Insert( GetDfltAttr( nWhich )->Create( rStream, nVers ),
aItems.Count() );
@@ -425,7 +425,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
if( VERSION_40A == nVersion && SVX_NUM_BITMAP == aFmt.GetNumberingType() )
{
- BYTE cF;
+ sal_uInt8 cF;
Size aSz;
rStream >> aSz.Width() >> aSz.Height();
@@ -435,7 +435,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
{
SvxBrushItem* pBrush = 0;
SwFmtVertOrient* pVOrient = 0;
- USHORT nVer;
+ sal_uInt16 nVer;
if( cF & 1 )
{
@@ -467,32 +467,32 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream )
CharSet eEncoding = gsl_getSystemTextEncoding();
{
String aName;
- USHORT nFamily = FAMILY_DONTKNOW, nCharSet = 0, nPitch = 0;
+ sal_uInt16 nFamily = FAMILY_DONTKNOW, nCharSet = 0, nPitch = 0;
short nWidth = 0, nHeight = 0;
const Font* pFnt = aFmt.GetBulletFont();
if( pFnt )
{
aName = pFnt->GetName();
- nFamily = (USHORT)pFnt->GetFamily();
- nCharSet = (USHORT)pFnt->GetCharSet();
+ nFamily = (sal_uInt16)pFnt->GetFamily();
+ nCharSet = (sal_uInt16)pFnt->GetCharSet();
nWidth = (short)pFnt->GetSize().Width();
nHeight = (short)pFnt->GetSize().Height();
- nPitch = (USHORT)pFnt->GetPitch();
+ nPitch = (sal_uInt16)pFnt->GetPitch();
}
- rStream << USHORT(aFmt.GetNumberingType())
+ rStream << sal_uInt16(aFmt.GetNumberingType())
<< aFmt.GetBulletChar()
<< (aFmt.GetIncludeUpperLevels() > 0)
<< aFmt.GetStart();
rStream.WriteByteString( aFmt.GetPrefix(), eEncoding );
rStream.WriteByteString( aFmt.GetSuffix(), eEncoding );
- rStream << USHORT( aFmt.GetNumAdjust() )
+ rStream << sal_uInt16( aFmt.GetNumAdjust() )
<< aFmt.GetAbsLSpace()
<< aFmt.GetFirstLineOffset()
<< aFmt.GetCharTextDistance()
<< aFmt.GetLSpace()
- << FALSE;//aFmt.IsRelLSpace();
+ << sal_False;//aFmt.IsRelLSpace();
rStream.WriteByteString( aName, eEncoding );
rStream << nFamily
<< nCharSet
@@ -504,10 +504,10 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream )
rStream.WriteByteString( sCharFmtName, eEncoding );
rStream << aItems.Count();
- for( USHORT n = aItems.Count(); n; )
+ for( sal_uInt16 n = aItems.Count(); n; )
{
SfxPoolItem* pItem = aItems[ --n ];
- USHORT nIVers = pItem->GetVersion( SOFFICE_FILEFORMAT_50 );
+ sal_uInt16 nIVers = pItem->GetVersion( SOFFICE_FILEFORMAT_50 );
OSL_ENSURE( nIVers != USHRT_MAX,
"Was'n das: Item-Version USHRT_MAX in der aktuellen Version" );
rStream << pItem->Which()
@@ -519,21 +519,21 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream )
if( SVX_NUM_BITMAP == aFmt.GetNumberingType() )
{
- rStream << (INT32)aFmt.GetGraphicSize().Width()
- << (INT32)aFmt.GetGraphicSize().Height();
- BYTE cFlg = ( 0 != aFmt.GetBrush() ? 1 : 0 ) +
+ rStream << (sal_Int32)aFmt.GetGraphicSize().Width()
+ << (sal_Int32)aFmt.GetGraphicSize().Height();
+ sal_uInt8 cFlg = ( 0 != aFmt.GetBrush() ? 1 : 0 ) +
( 0 != aFmt.GetGraphicOrientation() ? 2 : 0 );
rStream << cFlg;
if( aFmt.GetBrush() )
{
- USHORT nVersion = aFmt.GetBrush()->GetVersion( SOFFICE_FILEFORMAT_50 );
+ sal_uInt16 nVersion = aFmt.GetBrush()->GetVersion( SOFFICE_FILEFORMAT_50 );
rStream << nVersion;
aFmt.GetBrush()->Store( rStream, nVersion );
}
if( aFmt.GetGraphicOrientation() )
{
- USHORT nVersion = aFmt.GetGraphicOrientation()->GetVersion( SOFFICE_FILEFORMAT_50 );
+ sal_uInt16 nVersion = aFmt.GetGraphicOrientation()->GetVersion( SOFFICE_FILEFORMAT_50 );
rStream << nVersion;
aFmt.GetGraphicOrientation()->Store( rStream, nVersion );
}
@@ -547,8 +547,8 @@ void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh,
if( sCharFmtName.Len() )
{
// at first, look for the name
- USHORT nArrLen = rSh.GetCharFmtCount();
- for( USHORT i = 1; i < nArrLen; ++i )
+ sal_uInt16 nArrLen = rSh.GetCharFmtCount();
+ for( sal_uInt16 i = 1; i < nArrLen; ++i )
{
pFmt = &rSh.GetCharFmt( i );
if( COMPARE_EQUAL == pFmt->GetName().CompareTo( sCharFmtName ))
@@ -562,13 +562,13 @@ void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh,
if( IsPoolUserFmt( nCharPoolId ) )
{
pFmt = rSh.MakeCharFmt( sCharFmtName );
- pFmt->SetAuto( FALSE );
+ pFmt->SetAuto( sal_False );
}
else
pFmt = rSh.GetCharFmtFromPool( nCharPoolId );
if( !pFmt->GetDepends() ) // set attributes
- for( USHORT n = aItems.Count(); n; )
+ for( sal_uInt16 n = aItems.Count(); n; )
pFmt->SetFmtAttr( *aItems[ --n ] );
}
}
diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx
index ca06f3d56c8d..2d5acfa0c9a4 100644
--- a/sw/source/ui/config/usrpref.cxx
+++ b/sw/source/ui/config/usrpref.cxx
@@ -59,7 +59,7 @@ void SwMasterUsrPref::SetUsrPref(const SwViewOption &rCopy)
*((SwViewOption*)this) = rCopy;
}
-SwMasterUsrPref::SwMasterUsrPref(BOOL bWeb) :
+SwMasterUsrPref::SwMasterUsrPref(sal_Bool bWeb) :
eFldUpdateFlags(AUTOUPD_OFF),
nLinkUpdateMode(0),
bIsHScrollMetricSet(sal_False),
@@ -114,13 +114,13 @@ Sequence<OUString> SwContentViewConfig::GetPropertyNames()
"NonprintingCharacter/Space", // 9
"NonprintingCharacter/Break", // 10
"NonprintingCharacter/ProtectedSpace", // 11
- "NonprintingCharacter/Tab", // 12 //not in Writer/Web
- "NonprintingCharacter/HiddenText", // 13
- "NonprintingCharacter/HiddenParagraph", // 14
- "NonprintingCharacter/HiddenCharacter", // 15
- "Update/Link", // 16
- "Update/Field", // 17
- "Update/Chart" // 18
+ "NonprintingCharacter/Tab", // 12 //not in Writer/Web
+ "NonprintingCharacter/HiddenText", // 13
+ "NonprintingCharacter/HiddenParagraph", // 14
+ "NonprintingCharacter/HiddenCharacter", // 15
+ "Update/Link", // 16
+ "Update/Field", // 17
+ "Update/Chart" // 18
};
@@ -134,7 +134,7 @@ Sequence<OUString> SwContentViewConfig::GetPropertyNames()
return aNames;
}
-SwContentViewConfig::SwContentViewConfig(BOOL bIsWeb, SwMasterUsrPref& rPar) :
+SwContentViewConfig::SwContentViewConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) :
ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Content") : C2U("Office.Writer/Content")),
rParent(rPar),
bWeb(bIsWeb)
@@ -161,7 +161,7 @@ void SwContentViewConfig::Commit()
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
{
- sal_Bool bVal = FALSE;
+ sal_Bool bVal = sal_False;
switch(nProp)
{
case 0: bVal = rParent.IsGraphic(); break;// "Display/GraphicObject",
@@ -225,11 +225,11 @@ void SwContentViewConfig::Load()
{
sal_Int32 nSet = 0;
pValues[nProp] >>= nSet;
- rParent.SetUpdateLinkMode(nSet, TRUE);
+ rParent.SetUpdateLinkMode(nSet, sal_True);
}
break;// "Update/Link",
- case 17: rParent.SetUpdateFields(bSet, TRUE); break;// "Update/Field",
- case 18: rParent.SetUpdateCharts(bSet, TRUE); break;// "Update/Chart"
+ case 17: rParent.SetUpdateFields(bSet, sal_True); break;// "Update/Field",
+ case 18: rParent.SetUpdateCharts(bSet, sal_True); break;// "Update/Chart"
}
}
}
@@ -240,28 +240,30 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames()
{
static const char* aPropNames[] =
{
- "Line/Guide", // 0
- "Line/SimpleControlPoint", // 1
- "Line/LargeControlPoint", // 2
- "Window/HorizontalScroll", // 3
- "Window/VerticalScroll", // 4
- "Window/ShowRulers", // 5
- "Window/HorizontalRuler", // 6
- "Window/VerticalRuler", // 7
- "Window/HorizontalRulerUnit", // 8
- "Window/VerticalRulerUnit", // 9
- "Window/SmoothScroll", //10
- "Zoom/Value", //11
- "Zoom/Type", //12
- "Other/MeasureUnit", //13
- "Other/TabStop", //14
- "Window/IsVerticalRulerRight", //15
- "ViewLayout/Columns", //16
- "ViewLayout/BookMode", //17
- "Other/IsSquaredPageMode", //18
- "Other/ApplyCharUnit" //19
+ "Line/Guide", // 0
+ "Line/SimpleControlPoint", // 1
+ "Line/LargeControlPoint", // 2
+ "Window/HorizontalScroll", // 3
+ "Window/VerticalScroll", // 4
+ "Window/ShowRulers", // 5
+ "Window/HorizontalRuler", // 6
+ "Window/VerticalRuler", // 7
+ "Window/HorizontalRulerUnit", // 8
+ "Window/VerticalRulerUnit", // 9
+ "Window/SmoothScroll", //10
+ "Zoom/Value", //11
+ "Zoom/Type", //12
+ "Other/IsAlignMathObjectsToBaseline", //13
+ "Other/MeasureUnit", //14
+ // below properties are not available in WriterWeb
+ "Other/TabStop", //15
+ "Window/IsVerticalRulerRight", //16
+ "ViewLayout/Columns", //17
+ "ViewLayout/BookMode", //18
+ "Other/IsSquaredPageMode" //19
+ "Other/ApplyCharUnit" //20
};
- const int nCount = bWeb ? 14 : 20;
+ const int nCount = bWeb ? 15 : 21;
Sequence<OUString> aNames(nCount);
OUString* pNames = aNames.getArray();
for(int i = 0; i < nCount; i++)
@@ -271,7 +273,7 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames()
return aNames;
}
-SwLayoutViewConfig::SwLayoutViewConfig(BOOL bIsWeb, SwMasterUsrPref& rPar) :
+SwLayoutViewConfig::SwLayoutViewConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) :
ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Layout") : C2U("Office.Writer/Layout"),
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE),
rParent(rPar),
@@ -292,40 +294,39 @@ void SwLayoutViewConfig::Commit()
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
{
- sal_Bool bSet;
+ Any &rVal = pValues[nProp];
switch(nProp)
{
- case 0: bSet = rParent.IsCrossHair(); break;// "Line/Guide",
- case 1: bSet = rParent.IsSolidMarkHdl(); break;// "Line/SimpleControlPoint",
- case 2: bSet = rParent.IsBigMarkHdl(); break;// "Line/LargeControlPoint",
- case 3: bSet = rParent.IsViewHScrollBar(); break;// "Window/HorizontalScroll",
- case 4: bSet = rParent.IsViewVScrollBar(); break;// "Window/VerticalScroll",
- case 5: bSet = rParent.IsViewAnyRuler(); break; // "Window/ShowRulers"
- // #i14593# use IsView*Ruler(TRUE) instead of IsView*Ruler()
+ case 0: rVal <<= (sal_Bool) rParent.IsCrossHair(); break; // "Line/Guide",
+ case 1: rVal <<= (sal_Bool) rParent.IsSolidMarkHdl(); break; // "Line/SimpleControlPoint",
+ case 2: rVal <<= (sal_Bool) rParent.IsBigMarkHdl(); break; // "Line/LargeControlPoint",
+ case 3: rVal <<= (sal_Bool) rParent.IsViewHScrollBar(); break; // "Window/HorizontalScroll",
+ case 4: rVal <<= (sal_Bool) rParent.IsViewVScrollBar(); break; // "Window/VerticalScroll",
+ case 5: rVal <<= (sal_Bool) rParent.IsViewAnyRuler(); break; // "Window/ShowRulers"
+ // #i14593# use IsView*Ruler(sal_True) instead of IsView*Ruler()
// this preserves the single ruler states even if "Window/ShowRulers" is off
- case 6: bSet = rParent.IsViewHRuler(TRUE); break;// "Window/HorizontalRuler",
- case 7: bSet = rParent.IsViewVRuler(TRUE); break;// "Window/VerticalRuler",
+ case 6: rVal <<= (sal_Bool) rParent.IsViewHRuler(sal_True); break; // "Window/HorizontalRuler",
+ case 7: rVal <<= (sal_Bool) rParent.IsViewVRuler(sal_True); break; // "Window/VerticalRuler",
case 8:
if(rParent.bIsHScrollMetricSet)
- pValues[nProp] <<= (sal_Int32)rParent.eHScrollMetric; // "Window/HorizontalRulerUnit"
+ rVal <<= (sal_Int32)rParent.eHScrollMetric; // "Window/HorizontalRulerUnit"
break;
case 9:
if(rParent.bIsVScrollMetricSet)
- pValues[nProp] <<= (sal_Int32)rParent.eVScrollMetric; // "Window/VerticalRulerUnit"
+ rVal <<= (sal_Int32)rParent.eVScrollMetric; // "Window/VerticalRulerUnit"
break;
- case 10: bSet = rParent.IsSmoothScroll(); break;// "Window/SmoothScroll",
- case 11: pValues[nProp] <<= (sal_Int32)rParent.GetZoom(); break;// "Zoom/Value",
- case 12: pValues[nProp] <<= (sal_Int32)rParent.GetZoomType(); break;// "Zoom/Type",
- case 13: pValues[nProp] <<= (sal_Int32)rParent.GetMetric(); break;// "Other/MeasureUnit",
- case 14: pValues[nProp] <<= static_cast<sal_Int32>(TWIP_TO_MM100(rParent.GetDefTab())); break;// "Other/TabStop",
- case 15: bSet = rParent.IsVRulerRight(); break;// "Window/IsVerticalRulerRight",
- case 16: pValues[nProp] <<= (sal_Int32)rParent.GetViewLayoutColumns(); break;// "ViewLayout/Columns",
- case 17: bSet = rParent.IsViewLayoutBookMode(); break;// "ViewLayout/BookMode",
- case 18: bSet = rParent.IsSquaredPageMode(); break;// "Other/IsSquaredPageMode",
- case 19: bSet = rParent.IsApplyCharUnit(); break;// "Other/ApplyCharUnit",
+ case 10: rVal <<= (sal_Bool) rParent.IsSmoothScroll(); break; // "Window/SmoothScroll",
+ case 11: rVal <<= (sal_Int32)rParent.GetZoom(); break; // "Zoom/Value",
+ case 12: rVal <<= (sal_Int32)rParent.GetZoomType(); break; // "Zoom/Type",
+ case 13: rVal <<= (sal_Bool) rParent.IsAlignMathObjectsToBaseline(); break; // "Other/IsAlignMathObjectsToBaseline"
+ case 14: rVal <<= (sal_Int32)rParent.GetMetric(); break; // "Other/MeasureUnit",
+ case 15: rVal <<= static_cast<sal_Int32>(TWIP_TO_MM100(rParent.GetDefTab())); break;// "Other/TabStop",
+ case 16: rVal <<= (sal_Bool) rParent.IsVRulerRight(); break; // "Window/IsVerticalRulerRight",
+ case 17: rVal <<= (sal_Int32)rParent.GetViewLayoutColumns(); break; // "ViewLayout/Columns",
+ case 18: rVal <<= (sal_Bool) rParent.IsViewLayoutBookMode(); break; // "ViewLayout/BookMode",
+ case 19: rVal <<= (sal_Bool) rParent.IsSquaredPageMode(); break; // "Other/IsSquaredPageMode",
+ case 20: rVal <<= (sal_Bool) rParent.IsApplyCharUnit(); break; // "Other/IsSquaredPageMode",
}
- if(nProp < 8 || nProp == 10 || nProp == 15 || nProp == 17 || nProp == 18 || nProp == 19 )
- pValues[nProp].setValue(&bSet, ::getBooleanCppuType());
}
PutProperties(aNames, aValues);
}
@@ -342,7 +343,11 @@ void SwLayoutViewConfig::Load()
{
if(pValues[nProp].hasValue())
{
- sal_Bool bSet = nProp < 8 || nProp == 10 || nProp == 17 || nProp == 18 || nProp == 19 ? *(sal_Bool*)pValues[nProp].getValue() : sal_False;
+ sal_Int32 nInt32Val = 0;
+ sal_Bool bSet = sal_False;
+ pValues[nProp] >>= nInt32Val;
+ pValues[nProp] >>= bSet;
+
switch(nProp)
{
case 0: rParent.SetCrossHair(bSet); break;// "Line/Guide",
@@ -356,59 +361,26 @@ void SwLayoutViewConfig::Load()
case 8:
{
rParent.bIsHScrollMetricSet = sal_True;
- sal_Int32 nUnit = 0;
- pValues[nProp] >>= nUnit;
- rParent.eHScrollMetric = ((FieldUnit)nUnit); // "Window/HorizontalRulerUnit"
+ rParent.eHScrollMetric = ((FieldUnit)nInt32Val); // "Window/HorizontalRulerUnit"
}
break;
case 9:
{
rParent.bIsVScrollMetricSet = sal_True;
- sal_Int32 nUnit = 0;
- pValues[nProp] >>= nUnit;
- rParent.eVScrollMetric = ((FieldUnit)nUnit); // "Window/VerticalRulerUnit"
+ rParent.eVScrollMetric = ((FieldUnit)nInt32Val); // "Window/VerticalRulerUnit"
}
break;
case 10: rParent.SetSmoothScroll(bSet); break;// "Window/SmoothScroll",
- case 11:
- {
- sal_Int32 nVal = 0;
- pValues[nProp] >>= nVal;
- rParent.SetZoom( static_cast< USHORT >(nVal) );
- }
- break;// "Zoom/Value",
- case 12:
- {
- sal_Int32 nVal = 0;
- pValues[nProp] >>= nVal;
- rParent.SetZoomType( static_cast< SvxZoomType >(nVal) );
- }
- break;// "Zoom/Type",
- case 13:
- {
- sal_Int32 nUnit = 0;
- pValues[nProp] >>= nUnit;
- rParent.SetMetric((FieldUnit)nUnit, TRUE);
- }
- break;// "Other/MeasureUnit",
- case 14:
- {
- sal_Int32 nTab = 0;
- pValues[nProp] >>= nTab;
- rParent.SetDefTab(MM100_TO_TWIP(nTab), TRUE);
- }
- break;// "Other/TabStop",
- case 15: rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight",
- case 16:
- {
- sal_Int32 nColumns = 0;
- pValues[nProp] >>= nColumns;
- rParent.SetViewLayoutColumns( static_cast<USHORT>(nColumns) );
- }
- break;// "ViewLayout/Columns",
- case 17: rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode",
- case 18: rParent.SetDefaultPageMode(bSet,TRUE); break;// "Other/IsSquaredPageMode",
- case 19: rParent.SetApplyCharUnit(bSet); break;// "Other/ApplyUserChar"
+ case 11: rParent.SetZoom( static_cast< sal_uInt16 >(nInt32Val) ); break;// "Zoom/Value",
+ case 12: rParent.SetZoomType( static_cast< SvxZoomType >(nInt32Val) ); break;// "Zoom/Type",
+ case 13: rParent.SetAlignMathObjectsToBaseline(bSet); break;// "Other/IsAlignMathObjectsToBaseline"
+ case 14: rParent.SetMetric((FieldUnit)nInt32Val, sal_True); break;// "Other/MeasureUnit",
+ case 15: rParent.SetDefTab(MM100_TO_TWIP(nInt32Val), sal_True); break;// "Other/TabStop",
+ case 16: rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight",
+ case 17: rParent.SetViewLayoutColumns( static_cast<sal_uInt16>(nInt32Val) ); break;// "ViewLayout/Columns",
+ case 18: rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode",
+ case 19: rParent.SetDefaultPageMode(bSet,sal_True); break;// "Other/IsSquaredPageMode",
+ case 20: rParent.SetApplyCharUnit(bSet); break;// "Other/ApplyUserChar"
}
}
}
@@ -439,7 +411,7 @@ Sequence<OUString> SwGridConfig::GetPropertyNames()
return aNames;
}
-SwGridConfig::SwGridConfig(BOOL bIsWeb, SwMasterUsrPref& rPar) :
+SwGridConfig::SwGridConfig(sal_Bool bIsWeb, SwMasterUsrPref& rPar) :
ConfigItem(bIsWeb ? C2U("Office.WriterWeb/Grid") : C2U("Office.Writer/Grid"),
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE),
rParent(rPar),
@@ -583,7 +555,7 @@ void SwCursorConfig::Load()
switch(nProp)
{
case 0: rParent.SetShadowCursor(bSet); break;// "DirectCursor/UseDirectCursor",
- case 1: rParent.SetShdwCrsrFillMode((BYTE)nSet); break;// "DirectCursor/Insert",
+ case 1: rParent.SetShdwCrsrFillMode((sal_uInt8)nSet); break;// "DirectCursor/Insert",
case 2: rParent.SetCursorInProtectedArea(bSet); break;// "Option/ProtectedArea"
}
}
diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx
index 648cd4cfb66a..fc8c87827957 100644
--- a/sw/source/ui/config/viewopt.cxx
+++ b/sw/source/ui/config/viewopt.cxx
@@ -53,7 +53,7 @@
#include <editeng/acorrcfg.hxx>
#if OSL_DEBUG_LEVEL > 1
-BOOL SwViewOption::bTest9 = FALSE; //DrawingLayerNotLoading
+sal_Bool SwViewOption::bTest9 = sal_False; //DrawingLayerNotLoading
#endif
Color SwViewOption::aDocBoundColor(COL_LIGHTGRAY);
Color SwViewOption::aObjectBoundColor(COL_LIGHTGRAY);
@@ -75,7 +75,7 @@ Color SwViewOption::aScriptIndicatorColor(COL_GREEN);
Color SwViewOption::aShadowColor(COL_GRAY);
sal_Int32 SwViewOption::nAppearanceFlags = VIEWOPT_DOC_BOUNDARIES|VIEWOPT_OBJECT_BOUNDARIES;
-USHORT SwViewOption::nPixelTwips = 0; // one pixel on the screen
+sal_uInt16 SwViewOption::nPixelTwips = 0; // one pixel on the screen
#define LINEBREAK_SIZE 12, 8
@@ -88,7 +88,7 @@ USHORT SwViewOption::nPixelTwips = 0; // one pixel on the screen
static const char aPostItStr[] = " ";
-BOOL SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const
+sal_Bool SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const
{
return nCoreOptions == rOpt.nCoreOptions
&& nCore2Options == rOpt.nCore2Options
@@ -145,10 +145,10 @@ void SwViewOption::DrawRectPrinter( OutputDevice *pOut,
pOut->SetLineColor( aOldColor );
}
-USHORT SwViewOption::GetPostItsWidth( const OutputDevice *pOut ) const
+sal_uInt16 SwViewOption::GetPostItsWidth( const OutputDevice *pOut ) const
{
OSL_ENSURE( pOut, "no Outdev" );
- return USHORT(pOut->GetTextWidth( String::CreateFromAscii(aPostItStr )));
+ return sal_uInt16(pOut->GetTextWidth( String::CreateFromAscii(aPostItStr )));
}
void SwViewOption::PaintPostIts( OutputDevice *pOut, const SwRect &rRect, sal_Bool bIsScript ) const
@@ -158,7 +158,7 @@ void SwViewOption::PaintPostIts( OutputDevice *pOut, const SwRect &rRect, sal_Bo
Color aOldLineColor( pOut->GetLineColor() );
pOut->SetLineColor( Color(COL_GRAY ) );
// to make it look nice, we subtract two pixels everywhere
- USHORT nPix = GetPixelTwips() * 2;
+ sal_uInt16 nPix = GetPixelTwips() * 2;
if( rRect.Width() <= 2 * nPix || rRect.Height() <= 2 * nPix )
nPix = 0;
const Point aTopLeft( rRect.Left() + nPix, rRect.Top() + nPix );
@@ -176,14 +176,14 @@ SwViewOption::SwViewOption() :
nPagePrevRow( 1 ),
nPagePrevCol( 2 ),
nShdwCrsrFillMode( FILL_TAB ),
- bReadonly(FALSE),
- bStarOneSetting(FALSE),
- bIsPagePreview(FALSE),
- bSelectionInReadonly(FALSE),
+ bReadonly(sal_False),
+ bStarOneSetting(sal_False),
+ bIsPagePreview(sal_False),
+ bSelectionInReadonly(sal_False),
// #114856# Formular view
- bFormView(FALSE),
- bBookview(FALSE),
- mbViewLayoutBookMode(FALSE),
+ bFormView(sal_False),
+ bBookview(sal_False),
+ mbViewLayoutBookMode(sal_False),
bShowPlaceHolderFields( sal_True ),
nZoom( 100 ),
eZoom( SVX_ZOOM_PERCENT ),
@@ -213,14 +213,14 @@ SwViewOption::SwViewOption() :
#if OSL_DEBUG_LEVEL > 1
// correspond to the statements in ui/config/cfgvw.src
bTest1 = bTest2 = bTest3 = bTest4 =
- bTest5 = bTest6 = bTest7 = bTest8 = bTest10 = FALSE;
+ bTest5 = bTest6 = bTest7 = bTest8 = bTest10 = sal_False;
#endif
}
SwViewOption::SwViewOption(const SwViewOption& rVOpt)
{
- bReadonly = FALSE;
- bSelectionInReadonly = FALSE;
+ bReadonly = sal_False;
+ bSelectionInReadonly = sal_False;
// #114856# Formular view
bFormView = rVOpt.bFormView;
nZoom = rVOpt.nZoom ;
@@ -308,11 +308,11 @@ void SwViewOption::Init( Window *pWin )
{
if( !nPixelTwips && pWin )
{
- nPixelTwips = (USHORT)pWin->PixelToLogic( Size(1,1) ).Height();
+ nPixelTwips = (sal_uInt16)pWin->PixelToLogic( Size(1,1) ).Height();
}
}
-BOOL SwViewOption::IsAutoCompleteWords() const
+sal_Bool SwViewOption::IsAutoCompleteWords() const
{
const SvxSwAutoFmtFlags& rFlags = SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags();
return rFlags.bAutoCmpltCollectWords;
@@ -325,9 +325,9 @@ AuthorCharAttr::AuthorCharAttr() :
{
}
-USHORT GetHtmlMode(const SwDocShell* pShell)
+sal_uInt16 GetHtmlMode(const SwDocShell* pShell)
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if(!pShell || PTR_CAST(SwWebDocShell, pShell))
{
nRet = HTMLMODE_ON;
@@ -512,7 +512,7 @@ void SwViewOption::ApplyColorConfigValues(const svtools::ColorConfig& rConfig )
aScriptIndicatorColor.SetColor(rConfig.GetColorValue(svtools::WRITERSCRIPTINDICATOR).nColor);
}
-void SwViewOption::SetAppearanceFlag(sal_Int32 nFlag, BOOL bSet, BOOL bSaveInConfig )
+void SwViewOption::SetAppearanceFlag(sal_Int32 nFlag, sal_Bool bSet, sal_Bool bSaveInConfig )
{
if(bSet)
nAppearanceFlags |= nFlag;
@@ -554,7 +554,7 @@ void SwViewOption::SetAppearanceFlag(sal_Int32 nFlag, BOOL bSet, BOOL bSaveInCon
}
}
-BOOL SwViewOption::IsAppearanceFlag(sal_Int32 nFlag)
+sal_Bool SwViewOption::IsAppearanceFlag(sal_Int32 nFlag)
{
return 0 != (nAppearanceFlags & nFlag);
}
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 1103f0489234..95d6c9bb2184 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -211,7 +211,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) :
m_aListLB.SetHelpId(HID_MM_ADDRESSLIST_TLB);
static long nTabs[] = {2, 0, aSz.Width()/2 };
- m_aListLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP );
+ m_aListLB.SetStyle( m_aListLB.GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP );
m_aListLB.SetSelectionMode( SINGLE_SELECTION );
m_aListLB.SetTabs(&nTabs[0], MAP_PIXEL);
m_aOK.SetClickHdl( LINK( this, SwAddressListDialog, OKHdl_Impl));
@@ -228,7 +228,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) :
OSL_ENSURE(m_xDBContext.is(), "service 'com.sun.star.sdb.DatabaseContext' not found!");
sal_Bool bEnableEdit = sal_False;
sal_Bool bEnableOK = sal_True;
- m_aListLB.SelectAll( FALSE );
+ m_aListLB.SelectAll( sal_False );
if(m_xDBContext.is())
{
@@ -445,7 +445,7 @@ IMPL_LINK(SwAddressListDialog, CreateHdl_Impl, PushButton*, pButton)
pUserData->sURL = sURL;
m_pCreatedDataSource->SetUserData(pUserData);
m_aListLB.Select(m_pCreatedDataSource);
- m_aCreateListPB.Enable(FALSE);
+ m_aCreateListPB.Enable(sal_False);
}
catch(Exception& )
@@ -512,7 +512,7 @@ IMPL_STATIC_LINK(SwAddressListDialog, StaticListBoxSelectHdl_Impl, SvLBoxEntry*,
pThis->m_aListLB.SetEntryText(pThis->m_sConnecting, pSelect, ITEMID_TABLE - 1);
// allow painting of the new entry
pThis->m_aListLB.Window::Invalidate(INVALIDATE_UPDATE);
- for (USHORT i = 0; i < 10; i++)
+ for (sal_uInt16 i = 0; i < 10; i++)
Application::Reschedule();
}
@@ -674,7 +674,7 @@ IMPL_LINK(SwAddressListDialog, TableSelectHdl_Impl, PushButton*, pButton)
IMPL_LINK(SwAddressListDialog, OKHdl_Impl, PushButton*, EMPTYARG)
{
- EndDialog(TRUE);
+ EndDialog(sal_True);
return 0;
}
diff --git a/sw/source/ui/dbui/addresslistdialog.src b/sw/source/ui/dbui/addresslistdialog.src
index 38a82e65ea76..aa815866cf48 100644
--- a/sw/source/ui/dbui/addresslistdialog.src
+++ b/sw/source/ui/dbui/addresslistdialog.src
@@ -61,30 +61,35 @@ ModalDialog DLG_MM_ADDRESSLISTDIALOG
};
PushButton PB_LOADLIST
{
+ HelpID = "sw:PushButton:DLG_MM_ADDRESSLISTDIALOG:PB_LOADLIST";
Pos = MAP_APPFONT ( 194 , 43 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "~Add...";
};
PushButton PB_CREATELIST
{
+ HelpID = "sw:PushButton:DLG_MM_ADDRESSLISTDIALOG:PB_CREATELIST";
Pos = MAP_APPFONT ( 194 , 60 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "~Create...";
};
PushButton PB_FILTER
{
+ HelpID = "sw:PushButton:DLG_MM_ADDRESSLISTDIALOG:PB_FILTER";
Pos = MAP_APPFONT ( 194 , 77 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "~Filter...";
};
PushButton PB_EDIT
{
+ HelpID = "sw:PushButton:DLG_MM_ADDRESSLISTDIALOG:PB_EDIT";
Pos = MAP_APPFONT ( 194 , 94 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "~Edit...";
};
PushButton PB_TABLE
{
+ HelpID = "sw:PushButton:DLG_MM_ADDRESSLISTDIALOG:PB_TABLE";
Pos = MAP_APPFONT ( 194 , 111 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
Text [ en-US ] = "Change ~Table...";
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 56229c29dd33..1c63829ba54d 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -212,11 +212,11 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData)
if(nContentHeight < m_aScrollBar.GetSizePixel().Height())
{
nContentHeight = m_aScrollBar.GetSizePixel().Height();
- m_aScrollBar.Enable(FALSE);
+ m_aScrollBar.Enable(sal_False);
}
else
{
- m_aScrollBar.Enable(TRUE);
+ m_aScrollBar.Enable(sal_True);
m_aScrollBar.SetRange(Range(0, nLines));
m_aScrollBar.SetThumbPos(0);
m_aScrollBar.SetVisibleSize(nVisibleLines);
@@ -339,7 +339,7 @@ long SwAddressControl_Impl::PreNotify( NotifyEvent& rNEvt )
if(rNEvt.GetType() == EVENT_COMMAND)
{
const CommandEvent* pCEvt = rNEvt.GetCommandEvent();
- USHORT nCmd = pCEvt->GetCommand();
+ sal_uInt16 nCmd = pCEvt->GetCommand();
if( COMMAND_WHEEL == nCmd )
{
Command(*pCEvt);
@@ -399,7 +399,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
if(m_sURL.Len())
{
//file exists, has to be loaded here
- SfxMedium aMedium( m_sURL, STREAM_READ, TRUE );
+ SfxMedium aMedium( m_sURL, STREAM_READ, sal_True );
SvStream* pStream = aMedium.GetInStream();
if(pStream)
{
@@ -413,7 +413,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
OUString sMiddle(sTempMiddle);
String sLine;
- BOOL bRead = pStream->ReadUniOrByteStringLine( sLine, RTL_TEXTENCODING_UTF8 );
+ sal_Bool bRead = pStream->ReadUniOrByteStringLine( sLine, RTL_TEXTENCODING_UTF8 );
if(bRead)
{
@@ -458,7 +458,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
//database has to be created
const ResStringArray& rAddressHeader = rConfig.GetDefaultAddressHeaders();
sal_uInt32 nCount = rAddressHeader.Count();
- for(USHORT nHeader = 0; nHeader < nCount; ++nHeader)
+ for(sal_uInt16 nHeader = 0; nHeader < nCount; ++nHeader)
m_pCSVData->aDBColumnHeaders.push_back( rAddressHeader.GetString(nHeader));
::std::vector<OUString> aNewData;
String sTemp;
@@ -509,7 +509,7 @@ IMPL_LINK(SwCreateAddressListDialog, DeleteHdl_Impl, PushButton*, EMPTYARG)
// if only one set is available then clear the data
String sTemp;
m_pCSVData->aDBData[0].assign(m_pCSVData->aDBData[0].size(), sTemp);
- m_aDeletePB.Enable(FALSE);
+ m_aDeletePB.Enable(sal_False);
}
m_pAddressControl->SetCurrentDataSet(nCurrent);
m_aSetNoNF.SetMax(m_pCSVData->aDBData.size());
@@ -586,7 +586,7 @@ IMPL_LINK(SwCreateAddressListDialog, OkHdl_Impl, PushButton*, EMPTYARG)
}
if(m_sURL.Len())
{
- SfxMedium aMedium( m_sURL, STREAM_READWRITE|STREAM_TRUNC, TRUE );
+ SfxMedium aMedium( m_sURL, STREAM_READWRITE|STREAM_TRUNC, sal_True );
SvStream* pStream = aMedium.GetOutStream();
pStream->SetLineDelimiter( LINEEND_LF );
pStream->SetStreamCharSet(RTL_TEXTENCODING_UTF8);
@@ -769,7 +769,7 @@ IMPL_LINK(SwFindEntryDialog, FindEnableHdl_Impl, Edit*, EMPTYARG)
IMPL_LINK(SwFindEntryDialog, CloseHdl_Impl, PushButton*, EMPTYARG)
{
- Show(FALSE);
+ Show(sal_False);
return 0;
}
diff --git a/sw/source/ui/dbui/createaddresslistdialog.src b/sw/source/ui/dbui/createaddresslistdialog.src
index c7bbe2f1b658..9911007c78f7 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.src
+++ b/sw/source/ui/dbui/createaddresslistdialog.src
@@ -67,24 +67,28 @@ ModalDialog DLG_MM_CREATEADDRESSLIST
};
PushButton PB_NEW
{
+ HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_NEW";
Pos = MAP_APPFONT ( 262 , 14 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~New";
};
PushButton PB_DELETE
{
+ HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_DELETE";
Pos = MAP_APPFONT ( 262 , 32 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete";
};
PushButton PB_FIND
{
+ HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_FIND";
Pos = MAP_APPFONT ( 262 , 50 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Find...";
};
PushButton PB_CUSTOMIZE
{
+ HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_CUSTOMIZE";
Pos = MAP_APPFONT ( 262 , 68 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "C~ustomize...";
@@ -97,18 +101,21 @@ ModalDialog DLG_MM_CREATEADDRESSLIST
};
PushButton PB_START
{
+ HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_START";
Pos = MAP_APPFONT ( 100 , 180 ) ;
Size = MAP_APPFONT ( 20 , 14 ) ;
Text = "|<";
};
PushButton PB_PREV
{
+ HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_PREV";
Pos = MAP_APPFONT ( 123 , 180 ) ;
Size = MAP_APPFONT ( 20 , 14 ) ;
Text = "<";
};
NumericField NF_SETNO
{
+ HelpID = "sw:NumericField:DLG_MM_CREATEADDRESSLIST:NF_SETNO";
Pos = MAP_APPFONT ( 146 , 180 ) ;
Size = MAP_APPFONT ( 20 , 14 ) ;
Border = TRUE;
@@ -122,12 +129,14 @@ ModalDialog DLG_MM_CREATEADDRESSLIST
};
PushButton PB_NEXT
{
+ HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_NEXT";
Pos = MAP_APPFONT ( 169 , 180 ) ;
Size = MAP_APPFONT ( 20 , 14 ) ;
Text = ">";
};
PushButton PB_END
{
+ HelpID = "sw:PushButton:DLG_MM_CREATEADDRESSLIST:PB_END";
Pos = MAP_APPFONT ( 192 , 180 ) ;
Size = MAP_APPFONT ( 20 , 14 ) ;
Text = ">|";
@@ -179,18 +188,21 @@ ModelessDialog DLG_MM_FIND_ENTRY
};
Edit ED_FIND
{
+ HelpID = "sw:Edit:DLG_MM_FIND_ENTRY:ED_FIND";
Pos = MAP_APPFONT ( 6 , 14) ;
Size = MAP_APPFONT ( 120 , 12 ) ;
Border = TRUE;
};
CheckBox CB_FINDONLY
{
+ HelpID = "sw:CheckBox:DLG_MM_FIND_ENTRY:CB_FINDONLY";
Pos = MAP_APPFONT ( 6 , 32 ) ;
Size = MAP_APPFONT ( 120 , 10 ) ;
Text [ en-US ] = "Find ~only in";
};
ListBox LB_FINDONLY
{
+ HelpID = "sw:ListBox:DLG_MM_FIND_ENTRY:LB_FINDONLY";
Pos = MAP_APPFONT ( 12 , 45 ) ;
Size = MAP_APPFONT ( 114 , 50 ) ;
Border = TRUE;
@@ -198,6 +210,7 @@ ModelessDialog DLG_MM_FIND_ENTRY
};
PushButton PB_FIND
{
+ HelpID = "sw:PushButton:DLG_MM_FIND_ENTRY:PB_FIND";
Pos = MAP_APPFONT ( 132 , 3 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
DefButton = TRUE;
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
index 06a8c074fa79..b7be738f7019 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
@@ -96,7 +96,7 @@ IMPL_LINK(SwCustomizeAddressListDialog, ListBoxSelectHdl_Impl, ListBox*, EMPTYAR
IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, PushButton*, pButton)
{
bool bRename = pButton == &m_aRenamePB;
- USHORT nPos = m_aFieldsLB.GetSelectEntryPos();
+ sal_uInt16 nPos = m_aFieldsLB.GetSelectEntryPos();
if(nPos == LISTBOX_ENTRY_NOTFOUND)
nPos = 0;
@@ -139,7 +139,7 @@ IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, PushButton*, pButton)
IMPL_LINK(SwCustomizeAddressListDialog, DeleteHdl_Impl, PushButton*, EMPTYARG)
{
- USHORT nPos = m_aFieldsLB.GetSelectEntryPos();
+ sal_uInt16 nPos = m_aFieldsLB.GetSelectEntryPos();
m_aFieldsLB.RemoveEntry(m_aFieldsLB.GetSelectEntryPos());
m_aFieldsLB.SelectEntryPos(nPos > m_aFieldsLB.GetEntryCount() - 1 ? nPos - 1 : nPos);
@@ -156,8 +156,8 @@ IMPL_LINK(SwCustomizeAddressListDialog, DeleteHdl_Impl, PushButton*, EMPTYARG)
IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, PushButton*, pButton)
{
- USHORT nPos;
- USHORT nOldPos = nPos = m_aFieldsLB.GetSelectEntryPos();
+ sal_uInt16 nPos;
+ sal_uInt16 nOldPos = nPos = m_aFieldsLB.GetSelectEntryPos();
String aTemp = m_aFieldsLB.GetEntry(nPos);
m_aFieldsLB.RemoveEntry( nPos );
if(pButton == &m_aUpPB)
@@ -184,8 +184,8 @@ IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, PushButton*, pButton)
void SwCustomizeAddressListDialog::UpdateButtons()
{
- USHORT nPos = m_aFieldsLB.GetSelectEntryPos();
- USHORT nEntries = m_aFieldsLB.GetEntryCount();
+ sal_uInt16 nPos = m_aFieldsLB.GetSelectEntryPos();
+ sal_uInt16 nEntries = m_aFieldsLB.GetEntryCount();
m_aUpPB.Enable(nPos > 0 && nEntries > 0);
m_aDownPB.Enable(nPos < nEntries -1);
m_aDeletePB.Enable(nEntries > 0);
@@ -229,7 +229,7 @@ SwAddRenameEntryDialog::~SwAddRenameEntryDialog()
IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit)
{
::rtl::OUString sEntry = pEdit->GetText();
- BOOL bFound = sEntry.getLength() ? FALSE : TRUE;
+ sal_Bool bFound = sEntry.getLength() ? sal_False : sal_True;
if(!bFound)
{
@@ -239,7 +239,7 @@ IMPL_LINK(SwAddRenameEntryDialog, ModifyHdl_Impl, Edit*, pEdit)
++aHeaderIter)
if(*aHeaderIter == sEntry)
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.src b/sw/source/ui/dbui/customizeaddresslistdialog.src
index ae81c4a2eef6..6c4ae08a4d9c 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.src
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.src
@@ -47,30 +47,35 @@ ModalDialog DLG_MM_CUSTOMIZE_ADDRESS_LIST
};
ListBox LB_FIELDS
{
+ HelpID = "sw:ListBox:DLG_MM_CUSTOMIZE_ADDRESS_LIST:LB_FIELDS";
Pos = MAP_APPFONT ( 6 , 14 ) ;
Size = MAP_APPFONT ( 112 , 120 ) ;
Border = TRUE;
};
PushButton PB_ADD
{
+ HelpID = "sw:PushButton:DLG_MM_CUSTOMIZE_ADDRESS_LIST:PB_ADD";
Pos = MAP_APPFONT ( 144 , 3 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Add...";
};
PushButton PB_DELETE
{
+ HelpID = "sw:PushButton:DLG_MM_CUSTOMIZE_ADDRESS_LIST:PB_DELETE";
Pos = MAP_APPFONT ( 144 , 20 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete";
};
PushButton PB_RENAME
{
+ HelpID = "sw:PushButton:DLG_MM_CUSTOMIZE_ADDRESS_LIST:PB_RENAME";
Pos = MAP_APPFONT ( 144 , 37 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Rename...";
};
ImageButton PB_UP
{
+ HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZE_ADDRESS_LIST:PB_UP";
Pos = MAP_APPFONT ( 124 , 58 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
SYMBOL = IMAGEBUTTON_ARROW_UP;
@@ -78,6 +83,7 @@ ModalDialog DLG_MM_CUSTOMIZE_ADDRESS_LIST
};
ImageButton PB_DOWN
{
+ HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZE_ADDRESS_LIST:PB_DOWN";
Pos = MAP_APPFONT ( 124 , 75 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
SYMBOL = IMAGEBUTTON_ARROW_DOWN;
@@ -124,6 +130,7 @@ ModalDialog DLG_MM_ADD_RENAME_ENTRY
};
Edit ED_FIELDNAME
{
+ HelpID = "sw:Edit:DLG_MM_ADD_RENAME_ENTRY:ED_FIELDNAME";
Pos = MAP_APPFONT ( 6 , 14 ) ;
Size = MAP_APPFONT ( 120 , 12 ) ;
Border = TRUE;
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 2308bd790e58..f50805fabf99 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -136,7 +136,7 @@ struct _DB_Column
union {
String* pText;
SwField* pField;
- ULONG nFormat;
+ sal_uLong nFormat;
} DB_ColumnData;
const SwInsDBColumn* pColInfo;
@@ -154,7 +154,7 @@ struct _DB_Column
eColType = DB_FILLTEXT;
}
- _DB_Column( const SwInsDBColumn& rInfo, ULONG nFormat )
+ _DB_Column( const SwInsDBColumn& rInfo, sal_uLong nFormat )
{
pColInfo = &rInfo;
DB_ColumnData.nFormat = nFormat;
@@ -193,15 +193,15 @@ struct _DB_ColumnConfigData
{
SwInsDBColumns aDBColumns;
rtl::OUString sSource, sTable, sEdit, sTblList, sTmplNm, sTAutoFmtNm;
- BOOL bIsTable : 1,
+ sal_Bool bIsTable : 1,
bIsField : 1,
bIsHeadlineOn : 1,
bIsEmptyHeadln : 1;
_DB_ColumnConfigData()
{
- bIsTable = bIsHeadlineOn = TRUE;
- bIsField = bIsEmptyHeadln = FALSE;
+ bIsTable = bIsHeadlineOn = sal_True;
+ bIsField = bIsEmptyHeadln = sal_False;
}
~_DB_ColumnConfigData();
@@ -304,7 +304,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
long nCount = aColNames.getLength();
for (long n = 0; n < nCount; n++)
{
- SwInsDBColumn* pNew = new SwInsDBColumn( pColNames[n], (USHORT)n );
+ SwInsDBColumn* pNew = new SwInsDBColumn( pColNames[n], (sal_uInt16)n );
Any aCol = xCols->getByName(pColNames[n]);
Reference <XPropertySet> xCol;
aCol >>= xCol;
@@ -328,7 +328,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
case DataType::TIME:
case DataType::TIMESTAMP:
{
- pNew->bHasFmt = TRUE;
+ pNew->bHasFmt = sal_True;
Any aFormat = xCol->getPropertyValue(C2U("FormatKey"));
if(aFormat.hasValue())
{
@@ -393,16 +393,16 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
// when the cursor is inside of a table, table must NEVER be selectable
if( pView->GetWrtShell().GetTableFmt() )
{
- aRbAsTable.Enable( FALSE );
- aRbAsField.Check( TRUE );
- aRbDbFmtFromDb.Check( TRUE );
+ aRbAsTable.Enable( sal_False );
+ aRbAsField.Check( sal_True );
+ aRbDbFmtFromDb.Check( sal_True );
}
else
{
- aRbAsTable.Check( TRUE );
- aRbDbFmtFromDb.Check( TRUE );
- aIbDbcolOneFrom.Enable( FALSE );
- aIbDbcolAllFrom.Enable( FALSE );
+ aRbAsTable.Check( sal_True );
+ aRbDbFmtFromDb.Check( sal_True );
+ aIbDbcolOneFrom.Enable( sal_False );
+ aIbDbcolAllFrom.Enable( sal_False );
}
aRbAsTable.SetClickHdl( LINK(this, SwInsertDBColAutoPilot, PageHdl ));
@@ -434,7 +434,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
aLbTblDbColumn.SetDoubleClickHdl( LINK( this, SwInsertDBColAutoPilot, DblClickHdl ));
aLbTableCol.SetDoubleClickHdl( LINK( this, SwInsertDBColAutoPilot, DblClickHdl ));
- for( USHORT n = 0; n < aDBColumns.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aDBColumns.Count(); ++n )
{
const String& rS = aDBColumns[ n ]->sColumn;
aLbTblDbColumn.InsertEntry( rS, n );
@@ -460,7 +460,7 @@ SwInsertDBColAutoPilot::~SwInsertDBColAutoPilot()
IMPL_LINK( SwInsertDBColAutoPilot, PageHdl, Button*, pButton )
{
- BOOL bShowTbl = pButton == &aRbAsTable;
+ sal_Bool bShowTbl = pButton == &aRbAsTable;
String sTxt( pButton->GetText() );
aFlHead.SetText( MnemonicGenerator::EraseAllMnemonicChars( sTxt ) );
@@ -494,7 +494,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, PageHdl, Button*, pButton )
IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton )
{
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
ListBox& rBox = aRbAsTable.IsChecked()
? ( 0 == aLbTableCol.GetEntryData( 0 )
? aLbTblDbColumn
@@ -504,7 +504,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton )
SwInsDBColumn aSrch( rBox.GetSelectEntry(), 0 );
aDBColumns.Seek_Entry( &aSrch, &nFndPos );
- BOOL bFromDB = &aRbDbFmtFromDb == pButton;
+ sal_Bool bFromDB = &aRbDbFmtFromDb == pButton;
aDBColumns[ nFndPos ]->bIsDBFmt = bFromDB;
aLbDbFmtFromUsr.Enable( !bFromDB );
@@ -513,15 +513,15 @@ IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton )
IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
{
- BOOL bChgEnable = TRUE, bEnableTo = TRUE, bEnableFrom = TRUE;
- aLbTblDbColumn.SetUpdateMode( FALSE );
- aLbTableCol.SetUpdateMode( FALSE );
+ sal_Bool bChgEnable = sal_True, bEnableTo = sal_True, bEnableFrom = sal_True;
+ aLbTblDbColumn.SetUpdateMode( sal_False );
+ aLbTableCol.SetUpdateMode( sal_False );
if( pButton == &aIbDbcolAllTo )
{
- bEnableTo = FALSE;
+ bEnableTo = sal_False;
- USHORT n, nInsPos = aLbTableCol.GetSelectEntryPos(),
+ sal_uInt16 n, nInsPos = aLbTableCol.GetSelectEntryPos(),
nCnt = aLbTblDbColumn.GetEntryCount();
if( LISTBOX_APPEND == nInsPos )
for( n = 0; n < nCnt; ++n )
@@ -537,7 +537,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
else if( pButton == &aIbDbcolOneTo &&
LISTBOX_ENTRY_NOTFOUND != aLbTblDbColumn.GetSelectEntryPos() )
{
- USHORT nInsPos = aLbTableCol.GetSelectEntryPos(),
+ sal_uInt16 nInsPos = aLbTableCol.GetSelectEntryPos(),
nDelPos = aLbTblDbColumn.GetSelectEntryPos(),
nTopPos = aLbTblDbColumn.GetTopEntry();
aLbTableCol.InsertEntry( aLbTblDbColumn.GetEntry( nDelPos ), nInsPos );
@@ -555,7 +555,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
{
if( LISTBOX_ENTRY_NOTFOUND != aLbTableCol.GetSelectEntryPos() )
{
- USHORT nFndPos, nInsPos,
+ sal_uInt16 nFndPos, nInsPos,
nDelPos = aLbTableCol.GetSelectEntryPos(),
nTopPos = aLbTableCol.GetTopEntry();
@@ -592,24 +592,24 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
}
else if( pButton == &aIbDbcolAllFrom )
{
- bEnableFrom = FALSE;
+ bEnableFrom = sal_False;
aLbTblDbColumn.Clear();
aLbTableCol.Clear();
- for( USHORT n = 0; n < aDBColumns.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aDBColumns.Count(); ++n )
aLbTblDbColumn.InsertEntry( aDBColumns[ n ]->sColumn, n );
aLbTblDbColumn.SelectEntryPos( 0 );
}
else if( pButton == &aIbDbcolToEdit )
{
- bChgEnable = FALSE;
+ bChgEnable = sal_False;
// move data to Edit:
String aFld( aLbTxtDbColumn.GetSelectEntry() );
if( aFld.Len() )
{
String aStr( aEdDbText.GetText() );
- USHORT nPos = (USHORT)aEdDbText.GetSelection().Min();
- USHORT nSel = USHORT(aEdDbText.GetSelection().Max()) - nPos;
+ sal_uInt16 nPos = (sal_uInt16)aEdDbText.GetSelection().Min();
+ sal_uInt16 nSel = sal_uInt16(aEdDbText.GetSelection().Max()) - nPos;
if( nSel )
// first delete the existing selection
aStr.Erase( nPos, nSel );
@@ -646,14 +646,14 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton )
aIbDbcolOneFrom.Enable( bEnableFrom );
aIbDbcolAllFrom.Enable( bEnableFrom );
- aRbDbFmtFromDb.Enable( FALSE );
- aRbDbFmtFromUsr.Enable( FALSE );
- aLbDbFmtFromUsr.Enable( FALSE );
+ aRbDbFmtFromDb.Enable( sal_False );
+ aRbDbFmtFromUsr.Enable( sal_False );
+ aLbDbFmtFromUsr.Enable( sal_False );
aPbTblFormat.Enable( bEnableFrom );
}
- aLbTblDbColumn.SetUpdateMode( TRUE );
- aLbTableCol.SetUpdateMode( TRUE );
+ aLbTblDbColumn.SetUpdateMode( sal_True );
+ aLbTableCol.SetUpdateMode( sal_True );
return 0;
}
@@ -677,10 +677,10 @@ IMPL_LINK( SwInsertDBColAutoPilot, DblClickHdl, ListBox*, pBox )
IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
{
SwWrtShell& rSh = pView->GetWrtShell();
- BOOL bNewSet = FALSE;
+ sal_Bool bNewSet = sal_False;
if( !pTblSet )
{
- bNewSet = TRUE;
+ bNewSet = sal_True;
pTblSet = new SfxItemSet( rSh.GetAttrPool(), SwuiGetUITableAttrRange() );
// At first acquire the simple attributes
@@ -697,19 +697,19 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
// table variant, when multiple table cells are selected
- aBoxInfo.SetTable( TRUE );
+ aBoxInfo.SetTable( sal_True );
// always show gap field
- aBoxInfo.SetDist( TRUE);
+ aBoxInfo.SetDist( sal_True);
// set minimum size in tables and paragraphs
- aBoxInfo.SetMinDist( FALSE );
+ aBoxInfo.SetMinDist( sal_False );
// always set default-gap
aBoxInfo.SetDefDist( MIN_BORDER_DIST );
// Single lines can have DontCare-status only in tables
- aBoxInfo.SetValid( VALID_DISABLE, TRUE );
+ aBoxInfo.SetValid( VALID_DISABLE, sal_True );
pTblSet->Put( aBoxInfo );
SwGetCurColNumPara aPara;
- const USHORT nNum = rSh.GetCurColNum( &aPara );
+ const sal_uInt16 nNum = rSh.GetCurColNum( &aPara );
long nWidth;
if( nNum )
@@ -722,11 +722,11 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
long nWidth1 = 0,
nStart1 = 0,
nEnd1 = nWidth;
- for( USHORT i = 0; i < nNum; ++i )
+ for( sal_uInt16 i = 0; i < nNum; ++i )
{
SwColumn* pCol = rCols[i];
nStart1 = pCol->GetLeft() + nWidth1;
- nWidth1 += (long)rCol.CalcColWidth( i, (USHORT)nWidth );
+ nWidth1 += (long)rCol.CalcColWidth( i, (sal_uInt16)nWidth );
nEnd1 = nWidth1 - pCol->GetRight();
}
if(nStart1 || nEnd1 != nWidth)
@@ -734,14 +734,14 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
}
else
nWidth = rSh.GetAnyCurRect(
- FRMTYPE_FLY_ANY & rSh.GetFrmType( 0, TRUE )
+ FRMTYPE_FLY_ANY & rSh.GetFrmType( 0, sal_True )
? RECT_FLY_PRT_EMBEDDED
: RECT_PAGE_PRT ).Width();
SwTabCols aTabCols;
aTabCols.SetRight( nWidth );
aTabCols.SetRightMax( nWidth );
- pRep = new SwTableRep( aTabCols, FALSE );
+ pRep = new SwTableRep( aTabCols, sal_False );
pRep->SetAlign( text::HoriOrientation::NONE );
pRep->SetSpace( nWidth );
pRep->SetWidth( nWidth );
@@ -756,18 +756,18 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
{
// Number of columns has changed: then the TabCols have to be adjusted
long nWidth = pRep->GetWidth();
- USHORT nCols = aLbTableCol.GetEntryCount() - 1;
+ sal_uInt16 nCols = aLbTableCol.GetEntryCount() - 1;
SwTabCols aTabCols( nCols );
aTabCols.SetRight( nWidth );
aTabCols.SetRightMax( nWidth );
if( nCols )
- for( USHORT n = 0, nStep = (USHORT)(nWidth / (nCols+1)), nW = nStep;
+ for( sal_uInt16 n = 0, nStep = (sal_uInt16)(nWidth / (nCols+1)), nW = nStep;
n < nCols; ++n, nW = nW + nStep )
{
- aTabCols.Insert( nW, FALSE, n );
+ aTabCols.Insert( nW, sal_False, n );
}
delete pRep;
- pRep = new SwTableRep( aTabCols, FALSE );
+ pRep = new SwTableRep( aTabCols, sal_False );
pRep->SetAlign( text::HoriOrientation::NONE );
pRep->SetSpace( nWidth );
pRep->SetWidth( nWidth );
@@ -797,7 +797,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, AutoFmtHdl, PushButton*, pButton )
SwAbstractDialogFactory* pFact = swui::GetFactory();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pView->GetWrtShellPtr(),DLG_AUTOFMT_TABLE, FALSE, pTAutoFmt);
+ AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pView->GetWrtShellPtr(),DLG_AUTOFMT_TABLE, sal_False, pTAutoFmt);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute())
pDlg->FillAutoFmtOfIndex( pTAutoFmt );
@@ -815,7 +815,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox )
: &aLbTxtDbColumn )
: pBox;
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
SwInsDBColumn aSrch( pGetBox->GetSelectEntry(), 0 );
aDBColumns.Seek_Entry( &aSrch, &nFndPos );
@@ -834,13 +834,13 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox )
String sTxt( aFlFormat.GetText().Copy( 0, nGBFmtLen ));
if( !aSrch.sColumn.getLength() )
{
- aRbDbFmtFromDb.Enable( FALSE );
- aRbDbFmtFromUsr.Enable( FALSE );
- aLbDbFmtFromUsr.Enable( FALSE );
+ aRbDbFmtFromDb.Enable( sal_False );
+ aRbDbFmtFromUsr.Enable( sal_False );
+ aLbDbFmtFromUsr.Enable( sal_False );
}
else
{
- BOOL bEnableFmt = aDBColumns[ nFndPos ]->bHasFmt;
+ sal_Bool bEnableFmt = aDBColumns[ nFndPos ]->bHasFmt;
aRbDbFmtFromDb.Enable( bEnableFmt );
aRbDbFmtFromUsr.Enable( bEnableFmt );
@@ -849,7 +849,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox )
(( sTxt += C2S(" (" )) += String(aSrch.sColumn) ) += (sal_Unicode)')';
}
- BOOL bIsDBFmt = aDBColumns[ nFndPos ]->bIsDBFmt;
+ sal_Bool bIsDBFmt = aDBColumns[ nFndPos ]->bIsDBFmt;
aRbDbFmtFromDb.Check( bIsDBFmt );
aRbDbFmtFromUsr.Check( !bIsDBFmt );
aLbDbFmtFromUsr.Enable( !bIsDBFmt );
@@ -871,7 +871,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton )
{
if( pButton == &aCbTableHeadon )
{
- BOOL bEnable = aCbTableHeadon.IsChecked();
+ sal_Bool bEnable = aCbTableHeadon.IsChecked();
aRbHeadlColnms.Enable( bEnable );
aRbHeadlEmpty.Enable( bEnable );
@@ -882,7 +882,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, HeaderHdl, Button*, pButton )
static void lcl_InsTextInArr( const String& rTxt, _DB_Columns& rColArr )
{
_DB_Column* pNew;
- USHORT nSttPos = 0, nFndPos;
+ sal_uInt16 nSttPos = 0, nFndPos;
while( STRING_NOTFOUND != ( nFndPos = rTxt.Search( '\x0A', nSttPos )) )
{
if( 1 < nFndPos )
@@ -901,15 +901,15 @@ static void lcl_InsTextInArr( const String& rTxt, _DB_Columns& rColArr )
}
}
-BOOL SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt,
+sal_Bool SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt,
_DB_Columns& rColArr,
- BOOL bInsField )
+ sal_Bool bInsField )
{
// create each of the database columns from the text again
// and then save in an array
// database columns are in <> and must be present in the columns' array:
String sTxt( rTxt );
- USHORT nFndPos, nEndPos, nSttPos = 0;
+ sal_uInt16 nFndPos, nEndPos, nSttPos = 0;
while( STRING_NOTFOUND != ( nFndPos = sTxt.Search( cDBFldStart, nSttPos )))
{
@@ -935,8 +935,8 @@ BOOL SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt,
sTxt.Erase( 0, (xub_StrLen)(rFndCol.sColumn.getLength() + 2) );
nSttPos = 0;
- USHORT nSubType = 0;
- ULONG nFormat;
+ sal_uInt16 nSubType = 0;
+ sal_uLong nFormat;
if( rFndCol.bHasFmt )
{
if( rFndCol.bIsDBFmt )
@@ -985,7 +985,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
SwWrtShell& rSh = pView->GetWrtShell();
//with the drag and drop interface no result set is initially available
- BOOL bDisposeResultSet = FALSE;
+ sal_Bool bDisposeResultSet = sal_False;
// we don't have a cursor, so we have to create our own RowSet
if ( !xResultSet.is() )
{
@@ -998,11 +998,11 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
return;
rSh.StartAllAction();
- BOOL bUndo = rSh.DoesUndo();
+ sal_Bool bUndo = rSh.DoesUndo();
if( bUndo )
rSh.StartUndo( UNDO_EMPTY );
- BOOL bAsTable = aRbAsTable.IsChecked();
+ sal_Bool bAsTable = aRbAsTable.IsChecked();
SvNumberFormatter& rNumFmtr = *rSh.GetNumberFormatter();
if( rSh.HasSelection() )
@@ -1016,22 +1016,22 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
do{ // middle checked loop!!
if( bAsTable ) // Daten als Tabelle einfuegen
{
- rSh.DoUndo( FALSE );
+ rSh.DoUndo( sal_False );
- USHORT n, nRows = 0, nCols = aLbTableCol.GetEntryCount();
+ sal_uInt16 n, nRows = 0, nCols = aLbTableCol.GetEntryCount();
if( aCbTableHeadon.IsChecked() )
nRows++;
if( pSelection )
- nRows = nRows + (USHORT)rSelection.getLength();
+ nRows = nRows + (sal_uInt16)rSelection.getLength();
else
++nRows;
// prepare the array for the selected columns
- SwInsDBColumns_SAR aColFlds( 255 >= nCols ? (BYTE)nCols : 255, 5 );
+ SwInsDBColumns_SAR aColFlds( 255 >= nCols ? (sal_uInt8)nCols : 255, 5 );
for( n = 0; n < nCols; ++n )
{
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
SwInsDBColumn aSrch( aLbTableCol.GetEntry( n ), 0 );
if( aDBColumns.Seek_Entry( &aSrch, &nFndPos ) )
aColFlds.Insert( aDBColumns[ nFndPos ], n );
@@ -1054,7 +1054,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
- BOOL bHTML = 0 != (::GetHtmlMode( pView->GetDocShell() ) & HTMLMODE_ON);
+ sal_Bool bHTML = 0 != (::GetHtmlMode( pView->GetDocShell() ) & HTMLMODE_ON);
rSh.InsertTable(
pModOpt->GetInsTblFlags(bHTML),
nRows, nCols, text::HoriOrientation::FULL, (pSelection ? pTAutoFmt : 0) );
@@ -1065,8 +1065,8 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
SfxItemSet aTblSet( rSh.GetAttrPool(), RES_BOXATR_FORMAT,
RES_BOXATR_VALUE );
- BOOL bIsAutoUpdateCells = rSh.IsAutoUpdateCells();
- rSh.SetAutoUpdateCells( FALSE );
+ sal_Bool bIsAutoUpdateCells = rSh.IsAutoUpdateCells();
+ rSh.SetAutoUpdateCells( sal_False );
if( aCbTableHeadon.IsChecked() )
@@ -1085,7 +1085,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
for( sal_Int32 i = 0 ; ; ++i )
{
- BOOL bBreak = FALSE;
+ sal_Bool bBreak = sal_False;
try
{
if(pSelection)
@@ -1099,7 +1099,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
}
catch(const Exception& )
{
- bBreak = TRUE;
+ bBreak = sal_True;
}
if(bBreak)
break;
@@ -1198,7 +1198,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
break;
if( 10 == i )
- pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), TRUE ));
+ pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), sal_True ));
}
rSh.MoveTable( GetfnTableCurr(), GetfnTableStart() );
@@ -1228,7 +1228,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
rSh.SwCrsrShell::Left(1,CRSR_SKIP_CHARS);
}
- rSh.DoUndo( FALSE );
+ rSh.DoUndo( sal_False );
SwTxtFmtColl* pColl = 0;
{
@@ -1238,7 +1238,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
pColl = rSh.FindTxtFmtCollByName( sTmplNm );
if( !pColl )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName( sTmplNm, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sTmplNm, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if( USHRT_MAX != nId )
pColl = rSh.GetTxtCollFromPool( nId );
else
@@ -1282,12 +1282,12 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
C2S("1"), aEmptyStr, aDBData );
- BOOL bSetCrsr = TRUE;
- USHORT n = 0, nCols = aColArr.Count();
+ sal_Bool bSetCrsr = sal_True;
+ sal_uInt16 n = 0, nCols = aColArr.Count();
::sw::mark::IMark* pMark = NULL;
for( sal_Int32 i = 0 ; ; ++i )
{
- BOOL bBreak = FALSE;
+ sal_Bool bBreak = sal_False;
try
{
if(pSelection)
@@ -1301,7 +1301,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
}
catch(Exception&)
{
- bBreak = TRUE;
+ bBreak = sal_True;
}
if(bBreak)
@@ -1355,7 +1355,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
if(aStandard != aCompare)
nValue += (aStandard - aCompare);
}
- pFld->ChgValue( nValue, TRUE );
+ pFld->ChgValue( nValue, sal_True );
}
pFld->SetInitialized();
@@ -1408,13 +1408,13 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
::rtl::OUString(), IDocumentMarkAccess::UNO_BOOKMARK );
rSh.SwCrsrShell::MovePara(
GetfnParaCurr(), GetfnParaEnd() );
- bSetCrsr = FALSE;
+ bSetCrsr = sal_False;
}
}
if( !pSelection )
{
- BOOL bNext = xResultSet->next();
+ sal_Bool bNext = xResultSet->next();
if(!bNext)
break;
}
@@ -1428,7 +1428,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
rSh.SwEditShell::SplitNode();
if( 10 == i )
- pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), TRUE ));
+ pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), sal_True ));
}
if( !bSetCrsr && pMark != NULL)
@@ -1442,11 +1442,11 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
}
// write configuration
Commit();
- }while( FALSE ); // middle checked loop
+ }while( sal_False ); // middle checked loop
if( bUndo )
{
- rSh.DoUndo( TRUE );
+ rSh.DoUndo( sal_True );
rSh.AppendUndoForInsertFromDB( bAsTable );
rSh.EndUndo( UNDO_EMPTY );
}
@@ -1481,15 +1481,15 @@ void SwInsertDBColAutoPilot::SetTabSet()
{
// remove the defaults again, it makes no sense to set them
SvxBrushItem aBrush( RES_BACKGROUND );
- static USHORT const aIds[3] =
+ static sal_uInt16 aIds[3] =
{ RES_BACKGROUND, SID_ATTR_BRUSH_ROW, SID_ATTR_BRUSH_TABLE };
for( int i = 0; i < 3; ++i )
if( SFX_ITEM_SET == pTblSet->GetItemState( aIds[ i ],
- FALSE, &pItem ) && *pItem == aBrush )
+ sal_False, &pItem ) && *pItem == aBrush )
pTblSet->ClearItem( aIds[ i ] );
}
- if( SFX_ITEM_SET == pTblSet->GetItemState( FN_PARAM_TABLE_NAME, FALSE,
+ if( SFX_ITEM_SET == pTblSet->GetItemState( FN_PARAM_TABLE_NAME, sal_False,
&pItem ) && ((const SfxStringItem*)pItem)->GetValue() ==
rSh.GetTableFmt()->GetName() )
pTblSet->ClearItem( FN_PARAM_TABLE_NAME );
@@ -1630,7 +1630,7 @@ void SwInsertDBColAutoPilot::Commit()
pValues[3].Value <<= rtl::OUString(aEdDbText.GetText());
String sTmp;
- for( USHORT n = 0, nCnt = aLbTableCol.GetEntryCount(); n < nCnt; ++n )
+ for( sal_uInt16 n = 0, nCnt = aLbTableCol.GetEntryCount(); n < nCnt; ++n )
( sTmp += aLbTableCol.GetEntry( n ) ) += '\x0a';
if( sTmp.Len() )
@@ -1664,7 +1664,7 @@ void SwInsertDBColAutoPilot::Commit()
rtl::OUString sPrevLang;
SvNumberFormatter& rNFmtr = *pView->GetWrtShell().GetNumberFormatter();
- for(USHORT nCol = 0; nCol < aDBColumns.Count(); nCol++)
+ for(sal_uInt16 nCol = 0; nCol < aDBColumns.Count(); nCol++)
{
rtl::OUString sColumnNode = sNewNode;
SwInsDBColumn* pColumn = aDBColumns[nCol];
@@ -1773,7 +1773,7 @@ void SwInsertDBColAutoPilot::Load()
sal_Bool bFound = sal_False;
for(sal_Int32 nRealColumn = 0; nRealColumn < aDBColumns.Count(); nRealColumn++)
{
- if(aDBColumns[(USHORT)nRealColumn]->sColumn == sColumn)
+ if(aDBColumns[(sal_uInt16)nRealColumn]->sColumn == sColumn)
{
bFound = sal_True;
break;
@@ -1804,7 +1804,7 @@ void SwInsertDBColAutoPilot::Load()
pNewData->aDBColumns.Insert(pInsDBColumn);
}
- USHORT n = 0;
+ sal_uInt16 n = 0;
String sTmp( pNewData->sTblList );
if( sTmp.Len() )
{
@@ -1820,11 +1820,11 @@ void SwInsertDBColAutoPilot::Load()
if( !aLbTblDbColumn.GetEntryCount() )
{
- aIbDbcolAllTo.Enable( FALSE );
- aIbDbcolOneTo.Enable( FALSE );
+ aIbDbcolAllTo.Enable( sal_False );
+ aIbDbcolOneTo.Enable( sal_False );
}
- aIbDbcolOneFrom.Enable( TRUE );
- aIbDbcolAllFrom.Enable( TRUE );
+ aIbDbcolOneFrom.Enable( sal_True );
+ aIbDbcolAllFrom.Enable( sal_True );
}
aEdDbText.SetText( pNewData->sEdit );
@@ -1842,7 +1842,7 @@ void SwInsertDBColAutoPilot::Load()
// then load the AutoFmt file and look for Autoformat first
SwTableAutoFmtTbl aAutoFmtTbl;
aAutoFmtTbl.Load();
- for( USHORT nAutoFmt = aAutoFmtTbl.Count(); nAutoFmt; )
+ for( sal_uInt16 nAutoFmt = aAutoFmtTbl.Count(); nAutoFmt; )
if( sTmp == aAutoFmtTbl[ --nAutoFmt ]->GetName() )
{
pTAutoFmt = new SwTableAutoFmt( *aAutoFmtTbl[ nAutoFmt ] );
@@ -1864,14 +1864,14 @@ void SwInsertDBColAutoPilot::Load()
for( n = 0; n < aDBColumns.Count() ; ++n )
{
SwInsDBColumn& rSet = *aDBColumns[ n ];
- for( USHORT m = 0; m < pNewData->aDBColumns.Count() ; ++m )
+ for( sal_uInt16 m = 0; m < pNewData->aDBColumns.Count() ; ++m )
{
SwInsDBColumn& rGet = *pNewData->aDBColumns[ m ];
if(rGet.sColumn == rSet.sColumn)
{
if( rGet.bHasFmt && !rGet.bIsDBFmt )
{
- rSet.bIsDBFmt = FALSE;
+ rSet.bIsDBFmt = sal_False;
rSet.nUsrNumFmt = rNFmtr.GetEntryKey( rGet.sUsrNumFmt,
rGet.eUsrNumFmtLng );
if( NUMBERFORMAT_ENTRY_NOT_FOUND == rSet.nUsrNumFmt )
@@ -1891,7 +1891,7 @@ void SwInsertDBColAutoPilot::Load()
// when the cursor is inside of a table, table must NEVER be selectable
if( !aRbAsTable.IsEnabled() && aRbAsTable.IsChecked() )
- aRbAsField.Check( TRUE );
+ aRbAsField.Check( sal_True );
delete pNewData;
break;
}
diff --git a/sw/source/ui/dbui/dbinsdlg.src b/sw/source/ui/dbui/dbinsdlg.src
index 28e045a3a235..fbbf6785527c 100644
--- a/sw/source/ui/dbui/dbinsdlg.src
+++ b/sw/source/ui/dbui/dbinsdlg.src
@@ -46,6 +46,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL
};
RadioButton RB_AS_TABLE
{
+ HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_AS_TABLE";
Pos = MAP_APPFONT ( 80 , 6 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
TabStop = TRUE ;
@@ -54,6 +55,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL
};
RadioButton RB_AS_FIELD
{
+ HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_AS_FIELD";
Pos = MAP_APPFONT ( 145 , 6 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
TabStop = TRUE ;
@@ -61,6 +63,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL
};
RadioButton RB_AS_TEXT
{
+ HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_AS_TEXT";
Pos = MAP_APPFONT ( 210 , 6 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
TabStop = TRUE ;
@@ -106,6 +109,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL
};
RadioButton RB_DBFMT_FROM_DB
{
+ HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_DBFMT_FROM_DB";
Pos = MAP_APPFONT ( 15 , 128 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
TabStop = TRUE ;
@@ -114,12 +118,14 @@ ModalDialog DLG_AP_INSERT_DB_SEL
};
RadioButton RB_DBFMT_FROM_USR
{
+ HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_DBFMT_FROM_USR";
Pos = MAP_APPFONT ( 15 , 143 ) ;
Size = MAP_APPFONT ( 10 , 10 ) ;
TabStop = TRUE ;
};
ListBox LB_DBFMT_FROM_USR
{
+ HelpID = "sw:ListBox:DLG_AP_INSERT_DB_SEL:LB_DBFMT_FROM_USR";
Border = TRUE ;
Pos = MAP_APPFONT ( 30 , 142 ) ;
Size = MAP_APPFONT ( 75 , 44 ) ;
@@ -130,6 +136,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL
/* -------------- Page Text / Fields -------------------------------- */
ListBox LB_TXT_DB_COLUMN
{
+ HelpID = "sw:ListBox:DLG_AP_INSERT_DB_SEL:LB_TXT_DB_COLUMN";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 41 ) ;
Size = MAP_APPFONT ( 93 , 70 ) ;
@@ -138,6 +145,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL
};
ImageButton IB_DBCOL_TOEDIT
{
+ HelpID = "sw:ImageButton:DLG_AP_INSERT_DB_SEL:IB_DBCOL_TOEDIT";
Pos = MAP_APPFONT ( 111 , 41 ) ;
Size = MAP_APPFONT ( 20 , 12 ) ;
TabStop = TRUE ;
@@ -153,6 +161,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL
};
MultiLineEdit ED_DB_TEXT
{
+ HelpID = "sw:MultiLineEdit:DLG_AP_INSERT_DB_SEL:ED_DB_TEXT";
Border = TRUE ;
Pos = MAP_APPFONT ( 137 , 41 ) ;
Size = MAP_APPFONT ( 142 , 70 ) ;
@@ -172,6 +181,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL
};
ListBox LB_DB_PARA_COLL
{
+ HelpID = "sw:ListBox:DLG_AP_INSERT_DB_SEL:LB_DB_PARA_COLL";
Border = TRUE ;
Pos = MAP_APPFONT ( 182 , 127 ) ;
Size = MAP_APPFONT ( 97 , 59 ) ;
@@ -183,6 +193,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL
/* -------------- Page Table ---------------------------------------- */
ListBox LB_TBL_DB_COLUMN
{
+ HelpID = "sw:ListBox:DLG_AP_INSERT_DB_SEL:LB_TBL_DB_COLUMN";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 41 ) ;
Size = MAP_APPFONT ( 93 , 70 ) ;
@@ -190,6 +201,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL
};
ImageButton IB_DBCOL_ALL_TO
{
+ HelpID = "sw:ImageButton:DLG_AP_INSERT_DB_SEL:IB_DBCOL_ALL_TO";
Pos = MAP_APPFONT ( 111 , 41 ) ;
Size = MAP_APPFONT ( 20 , 12 ) ;
TabStop = TRUE ;
@@ -204,6 +216,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL
};
ImageButton IB_DBCOL_ONE_TO
{
+ HelpID = "sw:ImageButton:DLG_AP_INSERT_DB_SEL:IB_DBCOL_ONE_TO";
Pos = MAP_APPFONT ( 111 , 56 ) ;
Size = MAP_APPFONT ( 20 , 12 ) ;
TabStop = TRUE ;
@@ -218,6 +231,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL
};
ImageButton IB_DBCOL_ONE_FROM
{
+ HelpID = "sw:ImageButton:DLG_AP_INSERT_DB_SEL:IB_DBCOL_ONE_FROM";
Pos = MAP_APPFONT ( 111 , 84 ) ;
Size = MAP_APPFONT ( 20 , 12 ) ;
TabStop = TRUE ;
@@ -232,6 +246,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL
};
ImageButton IB_DBCOL_ALL_FROM
{
+ HelpID = "sw:ImageButton:DLG_AP_INSERT_DB_SEL:IB_DBCOL_ALL_FROM";
Pos = MAP_APPFONT ( 111 , 99 ) ;
Size = MAP_APPFONT ( 20 , 12 ) ;
TabStop = TRUE ;
@@ -253,6 +268,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL
};
ListBox LB_TABLE_COL
{
+ HelpID = "sw:ListBox:DLG_AP_INSERT_DB_SEL:LB_TABLE_COL";
Border = TRUE ;
Pos = MAP_APPFONT ( 137 , 41 ) ;
Size = MAP_APPFONT ( 75 , 70 ) ;
@@ -265,6 +281,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL
};
CheckBox CB_TABLE_HEADON
{
+ HelpID = "sw:CheckBox:DLG_AP_INSERT_DB_SEL:CB_TABLE_HEADON";
Pos = MAP_APPFONT ( 111 , 128 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
TabStop = TRUE ;
@@ -273,6 +290,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL
};
RadioButton RB_HEADL_COLNMS
{
+ HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_HEADL_COLNMS";
Pos = MAP_APPFONT ( 120 , 142 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
TabStop = TRUE ;
@@ -281,6 +299,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL
};
RadioButton RB_HEADL_EMPTY
{
+ HelpID = "sw:RadioButton:DLG_AP_INSERT_DB_SEL:RB_HEADL_EMPTY";
Pos = MAP_APPFONT ( 120 , 155 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
TabStop = TRUE ;
@@ -288,6 +307,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL
};
PushButton PB_TBL_FORMAT
{
+ HelpID = "sw:PushButton:DLG_AP_INSERT_DB_SEL:PB_TBL_FORMAT";
Pos = MAP_APPFONT ( 214 , 128 ) ;
Size = MAP_APPFONT ( 65 , 12 ) ;
Text [ en-US ] = "Pr~operties..." ;
@@ -295,6 +315,7 @@ ModalDialog DLG_AP_INSERT_DB_SEL
};
PushButton PB_TBL_AUTOFMT
{
+ HelpID = "sw:PushButton:DLG_AP_INSERT_DB_SEL:PB_TBL_AUTOFMT";
Pos = MAP_APPFONT ( 214 , 144 ) ;
Size = MAP_APPFONT ( 65 , 12 ) ;
TabStop = TRUE ;
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 783da8b1b9a0..829b029ecbb3 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -61,10 +61,8 @@
#include <unotools/tempfile.hxx>
#include <unotools/pathoptions.hxx>
#include <svl/urihelper.hxx>
-#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
#include <svl/svstdarr.hxx>
-#endif
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
#include <svl/stritem.hxx>
@@ -85,7 +83,6 @@
#include <swundo.hxx>
#include <flddat.hxx>
#include <modcfg.hxx>
-#include <swprtopt.hxx>
#include <shellio.hxx>
#include <dbui.hxx>
#include <dbmgr.hxx>
@@ -135,6 +132,7 @@
#include <memory>
#include <vector>
#include <unomid.h>
+#include <section.hxx>
using namespace ::osl;
using namespace ::svx;
@@ -270,9 +268,9 @@ void lcl_InitNumberFormatter(SwDSParam& rParam, uno::Reference<XDataSource> xSou
}
}
-BOOL lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos)
+sal_Bool lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
try
{
if(pParam->bScrollable)
@@ -290,7 +288,7 @@ BOOL lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos)
return bRet;
}
-BOOL lcl_GetColumnCnt(SwDSParam* pParam,
+sal_Bool lcl_GetColumnCnt(SwDSParam* pParam,
const String& rColumnName, long nLanguage, String& rResult, double* pNumber)
{
uno::Reference< XColumnsSupplier > xColsSupp( pParam->xResultSet, UNO_QUERY );
@@ -303,7 +301,7 @@ BOOL lcl_GetColumnCnt(SwDSParam* pParam,
{
}
if(!xCols.is() || !xCols->hasByName(rColumnName))
- return FALSE;
+ return sal_False;
Any aCol = xCols->getByName(rColumnName);
uno::Reference< XPropertySet > xColumnProps;
aCol >>= xColumnProps;
@@ -321,13 +319,13 @@ BOOL lcl_GetColumnCnt(SwDSParam* pParam,
MsLangId::convertLanguageToLocale( (LanguageType)nLanguage, aFormatData.aLocale );
rResult = SwNewDBMgr::GetDBField( xColumnProps, aFormatData, pNumber);
- return TRUE;
+ return sal_True;
};
/*--------------------------------------------------------------------
Description: import data
--------------------------------------------------------------------*/
-BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
+sal_Bool SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
{
SetMergeType( rMergeDesc.nMergeType );
@@ -352,11 +350,11 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
if(!aData.sDataSource.getLength() || !aData.sCommand.getLength() || !xResSet.is())
{
- return FALSE;
+ return sal_False;
}
pImpl->pMergeData = new SwDSParam(aData, xResSet, aSelection);
- SwDSParam* pTemp = FindDSData(aData, FALSE);
+ SwDSParam* pTemp = FindDSData(aData, sal_False);
if(pTemp)
*pTemp = *pImpl->pMergeData;
else
@@ -366,7 +364,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
//DSData and set the correct CommandType
SwDBData aTempData(aData);
aData.nCommandType = -1;
- pTemp = FindDSData(aData, FALSE);
+ pTemp = FindDSData(aData, sal_False);
if(pTemp)
*pTemp = *pImpl->pMergeData;
else
@@ -397,7 +395,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
pImpl->pMergeData->bEndOfDB = !pImpl->pMergeData->xResultSet->absolute( nPos );
pImpl->pMergeData->CheckEndOfDB();
if(pImpl->pMergeData->nSelectionIndex >= pImpl->pMergeData->aSelection.getLength())
- pImpl->pMergeData->bEndOfDB = TRUE;
+ pImpl->pMergeData->bEndOfDB = sal_True;
}
else
{
@@ -407,7 +405,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
}
catch(Exception&)
{
- pImpl->pMergeData->bEndOfDB = TRUE;
+ pImpl->pMergeData->bEndOfDB = sal_True;
pImpl->pMergeData->CheckEndOfDB();
OSL_FAIL("exception in MergeNew()");
}
@@ -417,7 +415,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
lcl_InitNumberFormatter(*pImpl->pMergeData, xSource);
rMergeDesc.rSh.ChgDBData(aData);
- bInMerge = TRUE;
+ bInMerge = sal_True;
if (IsInitDBFields())
{
@@ -431,10 +429,10 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
sDBName += DB_DELIM;
sDBName += String::CreateFromInt32(aInsertData.nCommandType);
rMergeDesc.rSh.ChangeDBFields( aDBNames, sDBName);
- SetInitDBFields(FALSE);
+ SetInitDBFields(sal_False);
}
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
switch(rMergeDesc.nMergeType)
{
case DBMGR_MERGE:
@@ -464,16 +462,16 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
/*--------------------------------------------------------------------
Description: import data
--------------------------------------------------------------------*/
-BOOL SwNewDBMgr::Merge(SwWrtShell* pSh)
+sal_Bool SwNewDBMgr::Merge(SwWrtShell* pSh)
{
pSh->StartAllAction();
- pSh->ViewShell::UpdateFlds(TRUE);
+ pSh->ViewShell::UpdateFlds(sal_True);
pSh->SetModified();
pSh->EndAllAction();
- return TRUE;
+ return sal_True;
}
void SwNewDBMgr::ImportFromConnection( SwWrtShell* pSh )
@@ -483,8 +481,8 @@ void SwNewDBMgr::ImportFromConnection( SwWrtShell* pSh )
{
pSh->StartAllAction();
pSh->StartUndo(UNDO_EMPTY);
- BOOL bGroupUndo(pSh->DoesGroupUndo());
- pSh->DoGroupUndo(FALSE);
+ sal_Bool bGroupUndo(pSh->DoesGroupUndo());
+ pSh->DoGroupUndo(sal_False);
if( pSh->HasSelection() )
pSh->DelRight();
@@ -492,12 +490,12 @@ void SwNewDBMgr::ImportFromConnection( SwWrtShell* pSh )
SwWait *pWait = 0;
{
- ULONG i = 0;
+ sal_uLong i = 0;
do {
ImportDBEntry(pSh);
if( 10 == ++i )
- pWait = new SwWait( *pSh->GetView().GetDocShell(), TRUE);
+ pWait = new SwWait( *pSh->GetView().GetDocShell(), sal_True);
} while(ToNextMergeRecord());
}
@@ -510,10 +508,10 @@ void SwNewDBMgr::ImportFromConnection( SwWrtShell* pSh )
}
}
-String lcl_FindColumn(const String& sFormatStr,USHORT &nUsedPos, BYTE &nSeparator)
+String lcl_FindColumn(const String& sFormatStr,sal_uInt16 &nUsedPos, sal_uInt8 &nSeparator)
{
String sReturn;
- USHORT nLen = sFormatStr.Len();
+ sal_uInt16 nLen = sFormatStr.Len();
nSeparator = 0xff;
while(nUsedPos < nLen && nSeparator == 0xff)
{
@@ -548,13 +546,13 @@ void SwNewDBMgr::ImportDBEntry(SwWrtShell* pSh)
uno::Reference< XColumnsSupplier > xColsSupp( pImpl->pMergeData->xResultSet, UNO_QUERY );
uno::Reference<XNameAccess> xCols = xColsSupp->getColumns();
String sFormatStr;
- USHORT nFmtLen = sFormatStr.Len();
+ sal_uInt16 nFmtLen = sFormatStr.Len();
if( nFmtLen )
{
const char cSpace = ' ';
const char cTab = '\t';
- USHORT nUsedPos = 0;
- BYTE nSeparator;
+ sal_uInt16 nUsedPos = 0;
+ sal_uInt8 nSeparator;
String sColumn = lcl_FindColumn(sFormatStr, nUsedPos, nSeparator);
while( sColumn.Len() )
{
@@ -614,19 +612,20 @@ void SwNewDBMgr::ImportDBEntry(SwWrtShell* pSh)
/*--------------------------------------------------------------------
Description: fill Listbox with tablelist
--------------------------------------------------------------------*/
-BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
+sal_Bool SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
String sOldTableName(pListBox->GetSelectEntry());
pListBox->Clear();
- SwDSParam* pParam = FindDSConnection(rDBName, FALSE);
+ SwDSParam* pParam = FindDSConnection(rDBName, sal_False);
uno::Reference< XConnection> xConnection;
if(pParam && pParam->xConnection.is())
xConnection = pParam->xConnection;
else
{
rtl::OUString sDBName(rDBName);
- xConnection = RegisterConnection( sDBName );
+ if ( sDBName.getLength() )
+ xConnection = RegisterConnection( sDBName );
}
if(xConnection.is())
{
@@ -638,7 +637,7 @@ BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
const rtl::OUString* pTbls = aTbls.getConstArray();
for(long i = 0; i < aTbls.getLength(); i++)
{
- USHORT nEntry = pListBox->InsertEntry(pTbls[i]);
+ sal_uInt16 nEntry = pListBox->InsertEntry(pTbls[i]);
pListBox->SetEntryData(nEntry, (void*)0);
}
}
@@ -650,13 +649,13 @@ BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
const rtl::OUString* pQueries = aQueries.getConstArray();
for(long i = 0; i < aQueries.getLength(); i++)
{
- USHORT nEntry = pListBox->InsertEntry(pQueries[i]);
+ sal_uInt16 nEntry = pListBox->InsertEntry(pQueries[i]);
pListBox->SetEntryData(nEntry, (void*)1);
}
}
if (sOldTableName.Len())
pListBox->SelectEntry(sOldTableName);
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
@@ -664,8 +663,8 @@ BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
/*--------------------------------------------------------------------
Description: fill Listbox with column names of a database
--------------------------------------------------------------------*/
-BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
- const String& rDBName, const String& rTableName, BOOL bAppend)
+sal_Bool SwNewDBMgr::GetColumnNames(ListBox* pListBox,
+ const String& rDBName, const String& rTableName, sal_Bool bAppend)
{
if (!bAppend)
pListBox->Clear();
@@ -673,7 +672,7 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
aData.sDataSource = rDBName;
aData.sCommand = rTableName;
aData.nCommandType = -1;
- SwDSParam* pParam = FindDSData(aData, FALSE);
+ SwDSParam* pParam = FindDSData(aData, sal_False);
uno::Reference< XConnection> xConnection;
if(pParam && pParam->xConnection.is())
xConnection = pParam->xConnection;
@@ -694,12 +693,12 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
}
::comphelper::disposeComponent( xColsSupp );
}
- return(TRUE);
+ return(sal_True);
}
-BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
+sal_Bool SwNewDBMgr::GetColumnNames(ListBox* pListBox,
uno::Reference< XConnection> xConnection,
- const String& rTableName, BOOL bAppend)
+ const String& rTableName, sal_Bool bAppend)
{
if (!bAppend)
pListBox->Clear();
@@ -715,7 +714,7 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
}
::comphelper::disposeComponent( xColsSupp );
}
- return(TRUE);
+ return(sal_True);
}
/*--------------------------------------------------------------------
@@ -723,10 +722,10 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
--------------------------------------------------------------------*/
SwNewDBMgr::SwNewDBMgr() :
nMergeType(DBMGR_INSERT),
- bInitDBFields(FALSE),
- bInMerge(FALSE),
- bMergeSilent(FALSE),
- bMergeLock(FALSE),
+ bInitDBFields(sal_False),
+ bInMerge(sal_False),
+ bMergeSilent(sal_False),
+ bMergeLock(sal_False),
pImpl(new SwNewDBMgr_Impl(*this)),
pMergeEvtSrc(NULL)
{
@@ -734,7 +733,7 @@ SwNewDBMgr::SwNewDBMgr() :
SwNewDBMgr::~SwNewDBMgr()
{
- for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
+ for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
{
SwDSParam* pParam = aDataSourceParams[nPos];
if(pParam->xConnection.is())
@@ -757,7 +756,7 @@ SwNewDBMgr::~SwNewDBMgr()
/*--------------------------------------------------------------------
Description: save bulk letters as single documents
--------------------------------------------------------------------*/
-String lcl_FindUniqueName(SwWrtShell* pTargetShell, const String& rStartingPageDesc, ULONG nDocNo )
+String lcl_FindUniqueName(SwWrtShell* pTargetShell, const String& rStartingPageDesc, sal_uLong nDocNo )
{
do
{
@@ -771,7 +770,7 @@ String lcl_FindUniqueName(SwWrtShell* pTargetShell, const String& rStartingPageD
void lcl_CopyDynamicDefaults( const SwDoc& rSource, SwDoc& rTarget )
{
- USHORT aRangeOfDefaults[] = {
+ sal_uInt16 aRangeOfDefaults[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -782,8 +781,8 @@ void lcl_CopyDynamicDefaults( const SwDoc& rSource, SwDoc& rTarget )
SfxItemSet aNewDefaults( rTarget.GetAttrPool(), aRangeOfDefaults );
- USHORT nWhich;
- USHORT nRange = 0;
+ sal_uInt16 nWhich;
+ sal_uInt16 nRange = 0;
while( aRangeOfDefaults[nRange] != 0)
{
for( nWhich = aRangeOfDefaults[nRange]; nWhich < aRangeOfDefaults[nRange + 1]; ++nWhich )
@@ -802,7 +801,7 @@ void lcl_CopyFollowPageDesc(
SwWrtShell& rTargetShell,
const SwPageDesc& rSourcePageDesc,
const SwPageDesc& rTargetPageDesc,
- const ULONG nDocNo )
+ const sal_uLong nDocNo )
{
//now copy the follow page desc, too
const SwPageDesc* pFollowPageDesc = rSourcePageDesc.GetFollow();
@@ -821,13 +820,30 @@ void lcl_CopyFollowPageDesc(
}
}
-BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
+void lcl_RemoveSectionLinks( SwWrtShell& rWorkShell )
+{
+ //reset all links of the sections of synchronized labels
+ sal_uInt16 nSections = rWorkShell.GetSectionFmtCount();
+ for( sal_uInt16 nSection = 0; nSection < nSections; ++nSection )
+ {
+ SwSectionData aSectionData( *rWorkShell.GetSectionFmt( nSection ).GetSection() );
+ if( aSectionData.GetType() == FILE_LINK_SECTION )
+ {
+ aSectionData.SetType( CONTENT_SECTION );
+ aSectionData.SetLinkFileName( String() );
+ rWorkShell.UpdateSection( nSection, aSectionData );
+ }
+ }
+ rWorkShell.SetLabelDoc( sal_False );
+}
+
+sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
const SwMergeDescriptor& rMergeDescriptor)
{
//check if the doc is synchronized and contains at least one linked section
- BOOL bSynchronizedDoc = pSourceShell->IsLabelDoc() && pSourceShell->GetSectionFmtCount() > 1;
- BOOL bLoop = TRUE;
- BOOL bEMail = rMergeDescriptor.nMergeType == DBMGR_MERGE_MAILING;
+ sal_Bool bSynchronizedDoc = pSourceShell->IsLabelDoc() && pSourceShell->GetSectionFmtCount() > 1;
+ sal_Bool bLoop = sal_True;
+ sal_Bool bEMail = rMergeDescriptor.nMergeType == DBMGR_MERGE_MAILING;
const bool bAsSingleFile = rMergeDescriptor.nMergeType == DBMGR_MERGE_SINGLE_FILE;
::rtl::Reference< MailDispatcher > xMailDispatcher;
@@ -852,14 +868,14 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
uno::Reference< XPropertySet > xColumnProp;
{
- BOOL bColumnName = sEMailAddrFld.Len() > 0;
+ sal_Bool bColumnName = sEMailAddrFld.Len() > 0;
if (bColumnName)
{
uno::Reference< XColumnsSupplier > xColsSupp( pImpl->pMergeData->xResultSet, UNO_QUERY );
uno::Reference<XNameAccess> xCols = xColsSupp->getColumns();
if(!xCols->hasByName(sEMailAddrFld))
- return FALSE;
+ return sal_False;
Any aCol = xCols->getByName(sEMailAddrFld);
aCol >>= xColumnProp;
}
@@ -895,16 +911,20 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
pStoreToFilterOptions = &rMergeDescriptor.sSaveToFilterOptions;
}
}
- bCancel = FALSE;
+ bCancel = sal_False;
// in case of creating a single resulting file this has to be created here
SwWrtShell* pTargetShell = 0;
- SfxObjectShellRef xTargetDocShell;
+
+ // the shell will be explicitly closed at the end of the method, but it is
+ // still more safe to use SfxObjectShellLock here
+ SfxObjectShellLock xTargetDocShell;
+
SwView* pTargetView = 0;
std::auto_ptr< utl::TempFile > aTempFile;
String sModifiedStartingPageDesc;
String sStartingPageDesc;
- USHORT nStartingPageNo = 0;
+ sal_uInt16 nStartingPageNo = 0;
bool bPageStylesWithHeaderFooter = false;
if(bAsSingleFile || rMergeDescriptor.bCreateSingleFile)
{
@@ -928,7 +948,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
pTargetView->GetDocShell()->LoadStylesFromFile(
sSourceDocumentURL, aOpt, sal_True );
//determine the page style and number used at the start of the source document
- pSourceShell->SttEndDoc(TRUE);
+ pSourceShell->SttEndDoc(sal_True);
nStartingPageNo = pSourceShell->GetVirtPageNum();
sStartingPageDesc = sModifiedStartingPageDesc = pSourceShell->GetPageDesc(
pSourceShell->GetCurPageDesc()).GetName();
@@ -958,10 +978,10 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
SfxViewFrame* pViewFrm = SfxViewFrame::GetFirst(pSourrceDocSh);
while (pViewFrm)
{
- pViewFrm->GetDispatcher()->Lock(TRUE);
+ pViewFrm->GetDispatcher()->Lock(sal_True);
pViewFrm = SfxViewFrame::GetNext(*pViewFrm, pSourrceDocSh);
}
- ULONG nDocNo = 1;
+ sal_uLong nDocNo = 1;
long nStartRow, nEndRow;
// collect temporary files
@@ -1007,8 +1027,8 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
if( !aTempFile->IsValid() )
{
ErrorHandler::HandleError( ERRCODE_IO_NOTSUPPORTED );
- bLoop = FALSE;
- bCancel = TRUE;
+ bLoop = sal_False;
+ bCancel = sal_True;
}
else
{
@@ -1020,12 +1040,13 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
aPrtMonDlg.aPrintInfo.SetText(sStat);
// computation time for Save-Monitor:
- for (USHORT i = 0; i < 10; i++)
+ for (sal_uInt16 i = 0; i < 10; i++)
Application::Reschedule();
- // create and save new document
- SfxObjectShellRef xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
- SfxMedium* pWorkMed = new SfxMedium( sSourceDocumentURL, STREAM_STD_READ, TRUE );
+ // Create and save new document
+ // The SfxObjectShell will be closed explicitly later but it is more safe to use SfxObjectShellLock here
+ SfxObjectShellLock xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
+ SfxMedium* pWorkMed = new SfxMedium( sSourceDocumentURL, STREAM_STD_READ, sal_True );
pWorkMed->SetFilter( pSfxFlt );
if (xWorkDocSh->DoLoad(pWorkMed))
@@ -1060,12 +1081,16 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
// copy created file into the target document
rWorkShell.ConvertFieldsToText();
rWorkShell.SetNumberingRestart();
+ if( bSynchronizedDoc )
+ {
+ lcl_RemoveSectionLinks( rWorkShell );
+ }
// insert the document into the target document
- rWorkShell.SttEndDoc(FALSE);
- rWorkShell.SttEndDoc(TRUE);
+ rWorkShell.SttEndDoc(sal_False);
+ rWorkShell.SttEndDoc(sal_True);
rWorkShell.SelAll();
- pTargetShell->SwCrsrShell::SttEndDoc( FALSE );
+ pTargetShell->SwCrsrShell::SttEndDoc( sal_False );
//#i72517# the headers and footers are still those from the source - update in case of fields inside header/footer
if( !nDocNo && bPageStylesWithHeaderFooter )
pTargetShell->GetView().GetDocShell()->_LoadStyles( *rWorkShell.GetView().GetDocShell(), sal_True );
@@ -1119,7 +1144,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
String sFileURL = aTempFileURL.GetMainURL( INetURLObject::NO_DECODE );
SfxMedium* pDstMed = new SfxMedium(
sFileURL,
- STREAM_STD_READWRITE, TRUE );
+ STREAM_STD_READWRITE, sal_True );
pDstMed->SetFilter( pStoreToFilter );
if(pDstMed->GetItemSet())
{
@@ -1139,8 +1164,8 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
{
// error message ??
ErrorHandler::HandleError( xWorkDocSh->GetError() );
- bCancel = TRUE;
- bLoop = FALSE;
+ bCancel = sal_True;
+ bLoop = sal_False;
}
if( bEMail )
{
@@ -1176,7 +1201,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
{
{
//read in the temporary file and use it as mail body
- SfxMedium aMedium( sFileURL, STREAM_READ, TRUE);
+ SfxMedium aMedium( sFileURL, STREAM_READ, sal_True);
SvStream* pInStream = aMedium.GetInStream();
OSL_ENSURE(pInStream, "no output file created?");
if(pInStream)
@@ -1230,7 +1255,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
} while( !bCancel &&
(bSynchronizedDoc && (nStartRow != nEndRow)? ExistsNextRecord() : ToNextMergeRecord()));
- aPrtMonDlg.Show( FALSE );
+ aPrtMonDlg.Show( sal_False );
// save the single output document
if(rMergeDescriptor.bCreateSingleFile || bAsSingleFile)
@@ -1241,7 +1266,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
INetURLObject aTempFileURL(bAsSingleFile ? sSubject : aTempFile->GetURL());
SfxMedium* pDstMed = new SfxMedium(
aTempFileURL.GetMainURL( INetURLObject::NO_DECODE ),
- STREAM_STD_READWRITE, TRUE );
+ STREAM_STD_READWRITE, sal_True );
pDstMed->SetFilter( pStoreToFilter );
if(pDstMed->GetItemSet())
{
@@ -1257,7 +1282,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
{
// error message ??
ErrorHandler::HandleError( xTargetDocShell->GetError() );
- bLoop = FALSE;
+ bLoop = sal_False;
}
}
else if( pTargetView ) // must be available!
@@ -1315,7 +1340,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
pViewFrm = SfxViewFrame::GetFirst(pSourrceDocSh);
while (pViewFrm)
{
- pViewFrm->GetDispatcher()->Lock(FALSE);
+ pViewFrm->GetDispatcher()->Lock(sal_False);
pViewFrm = SfxViewFrame::GetNext(*pViewFrm, pSourrceDocSh);
}
@@ -1338,7 +1363,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
IMPL_LINK_INLINE_START( SwNewDBMgr, PrtCancelHdl, Button *, pButton )
{
pButton->GetParent()->Hide();
- bCancel = TRUE;
+ bCancel = sal_True;
return 0;
}
IMPL_LINK_INLINE_END( SwNewDBMgr, PrtCancelHdl, Button *, pButton )
@@ -1347,13 +1372,13 @@ IMPL_LINK_INLINE_END( SwNewDBMgr, PrtCancelHdl, Button *, pButton )
Description: determine the column's Numberformat and transfer
to the forwarded Formatter, if applicable.
--------------------------------------------------------------------*/
-ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName,
+sal_uLong SwNewDBMgr::GetColumnFmt( const String& rDBName,
const String& rTableName,
const String& rColNm,
SvNumberFormatter* pNFmtr,
long nLanguage )
{
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if(pNFmtr)
{
uno::Reference< XDataSource> xSource;
@@ -1375,7 +1400,7 @@ ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName,
aData.sDataSource = rDBName;
aData.sCommand = rTableName;
aData.nCommandType = -1;
- SwDSParam* pParam = FindDSData(aData, FALSE);
+ SwDSParam* pParam = FindDSData(aData, sal_False);
if(pParam && pParam->xConnection.is())
{
xConnection = pParam->xConnection;
@@ -1427,19 +1452,20 @@ ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName,
return nRet;
}
-ULONG SwNewDBMgr::GetColumnFmt( uno::Reference< XDataSource> xSource,
+sal_uLong SwNewDBMgr::GetColumnFmt( uno::Reference< XDataSource> xSource,
uno::Reference< XConnection> xConnection,
uno::Reference< XPropertySet> xColumn,
SvNumberFormatter* pNFmtr,
long nLanguage )
{
// set the NumberFormat in the doc if applicable
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if(!xSource.is())
{
uno::Reference<XChild> xChild(xConnection, UNO_QUERY);
- xSource = uno::Reference<XDataSource>(xChild->getParent(), UNO_QUERY);
+ if ( xChild.is() )
+ xSource = uno::Reference<XDataSource>(xChild->getParent(), UNO_QUERY);
}
if(xSource.is() && xConnection.is() && xColumn.is() && pNFmtr)
{
@@ -1517,7 +1543,7 @@ sal_Int32 SwNewDBMgr::GetColumnType( const String& rDBName,
aData.sDataSource = rDBName;
aData.sCommand = rTableName;
aData.nCommandType = -1;
- SwDSParam* pParam = FindDSData(aData, FALSE);
+ SwDSParam* pParam = FindDSData(aData, sal_False);
uno::Reference< XConnection> xConnection;
uno::Reference< XColumnsSupplier > xColsSupp;
bool bDispose = false;
@@ -1576,7 +1602,7 @@ uno::Reference< sdbc::XConnection> SwNewDBMgr::GetConnection(const String& rData
uno::Reference< sdbcx::XColumnsSupplier> SwNewDBMgr::GetColumnSupplier(uno::Reference<sdbc::XConnection> xConnection,
const String& rTableOrQuery,
- BYTE eTableOrQuery)
+ sal_uInt8 eTableOrQuery)
{
Reference< sdbcx::XColumnsSupplier> xRet;
try
@@ -1668,7 +1694,7 @@ String SwNewDBMgr::GetDBField(uno::Reference<XPropertySet> xColumnProps,
try
{
SwDbtoolsClient& aClient = SwNewDBMgr::GetDbtoolsClient();
- sRet = aClient.getValue(
+ sRet = aClient.getFormattedValue(
xColumnProps,
rDBFormatData.xFormatter,
rDBFormatData.aLocale,
@@ -1698,13 +1724,13 @@ String SwNewDBMgr::GetDBField(uno::Reference<XPropertySet> xColumnProps,
void SwNewDBMgr::EndMerge()
{
OSL_ENSURE(bInMerge, "merge is not active");
- bInMerge = FALSE;
+ bInMerge = sal_False;
delete pImpl->pMergeData;
pImpl->pMergeData = 0;
}
// checks if a desired data source table or query is open
-BOOL SwNewDBMgr::IsDataSourceOpen(const String& rDataSource,
+sal_Bool SwNewDBMgr::IsDataSourceOpen(const String& rDataSource,
const String& rTableOrQuery, sal_Bool bMergeOnly)
{
if(pImpl->pMergeData)
@@ -1722,19 +1748,19 @@ BOOL SwNewDBMgr::IsDataSourceOpen(const String& rDataSource,
aData.sDataSource = rDataSource;
aData.sCommand = rTableOrQuery;
aData.nCommandType = -1;
- SwDSParam* pFound = FindDSData(aData, FALSE);
+ SwDSParam* pFound = FindDSData(aData, sal_False);
return (pFound && pFound->xResultSet.is());
}
return sal_False;
}
// read column data at a specified position
-BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableName,
+sal_Bool SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableName,
const String& rColumnName, sal_uInt32 nAbsRecordId,
long nLanguage,
String& rResult, double* pNumber)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwDSParam* pFound = 0;
//check if it's the merge data source
if(pImpl->pMergeData &&
@@ -1749,7 +1775,7 @@ BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableNam
aData.sDataSource = rSourceName;
aData.sCommand = rTableName;
aData.nCommandType = -1;
- pFound = FindDSData(aData, FALSE);
+ pFound = FindDSData(aData, sal_False);
}
//check validity of supplied record Id
if(pFound->aSelection.getLength())
@@ -1765,7 +1791,7 @@ BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableNam
bFound = sal_True;
}
if(!bFound)
- return FALSE;
+ return sal_False;
}
if(pFound && pFound->xResultSet.is() && !pFound->bAfterSelection)
{
@@ -1776,10 +1802,10 @@ BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableNam
}
catch(const Exception& )
{
- return FALSE;
+ return sal_False;
}
//position to the desired index
- BOOL bMove = TRUE;
+ sal_Bool bMove = sal_True;
if ( nOldRow != static_cast<sal_Int32>(nAbsRecordId) )
bMove = lcl_MoveAbsolute(pFound, nAbsRecordId);
if(bMove)
@@ -1794,26 +1820,26 @@ BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableNam
// reads the column data at the current position
-BOOL SwNewDBMgr::GetMergeColumnCnt(const String& rColumnName, USHORT nLanguage,
+sal_Bool SwNewDBMgr::GetMergeColumnCnt(const String& rColumnName, sal_uInt16 nLanguage,
String &rResult, double *pNumber, sal_uInt32 * /*pFormat*/)
{
if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is() || pImpl->pMergeData->bAfterSelection )
{
rResult.Erase();
- return FALSE;
+ return sal_False;
}
- BOOL bRet = lcl_GetColumnCnt(pImpl->pMergeData, rColumnName, nLanguage, rResult, pNumber);
+ sal_Bool bRet = lcl_GetColumnCnt(pImpl->pMergeData, rColumnName, nLanguage, rResult, pNumber);
return bRet;
}
-BOOL SwNewDBMgr::ToNextMergeRecord()
+sal_Bool SwNewDBMgr::ToNextMergeRecord()
{
OSL_ENSURE(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
return ToNextRecord(pImpl->pMergeData);
}
-BOOL SwNewDBMgr::ToNextRecord(
+sal_Bool SwNewDBMgr::ToNextRecord(
const String& rDataSource, const String& rCommand, sal_Int32 /*nCommandType*/)
{
SwDSParam* pFound = 0;
@@ -1827,20 +1853,20 @@ BOOL SwNewDBMgr::ToNextRecord(
aData.sDataSource = rDataSource;
aData.sCommand = rCommand;
aData.nCommandType = -1;
- pFound = FindDSData(aData, FALSE);
+ pFound = FindDSData(aData, sal_False);
}
return ToNextRecord(pFound);
}
-BOOL SwNewDBMgr::ToNextRecord(SwDSParam* pParam)
+sal_Bool SwNewDBMgr::ToNextRecord(SwDSParam* pParam)
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if(!pParam || !pParam->xResultSet.is() || pParam->bEndOfDB ||
(pParam->aSelection.getLength() && pParam->aSelection.getLength() <= pParam->nSelectionIndex))
{
if(pParam)
pParam->CheckEndOfDB();
- return FALSE;
+ return sal_False;
}
try
{
@@ -1852,7 +1878,7 @@ BOOL SwNewDBMgr::ToNextRecord(SwDSParam* pParam)
pParam->CheckEndOfDB();
bRet = !pParam->bEndOfDB;
if(pParam->nSelectionIndex >= pParam->aSelection.getLength())
- pParam->bEndOfDB = TRUE;
+ pParam->bEndOfDB = sal_True;
}
else
{
@@ -1880,7 +1906,7 @@ BOOL SwNewDBMgr::ToNextRecord(SwDSParam* pParam)
to assure that the next page can be created in mail merge
the cursor position must be validated
---------------------------------------------------------------------------*/
-BOOL SwNewDBMgr::ExistsNextRecord() const
+sal_Bool SwNewDBMgr::ExistsNextRecord() const
{
return pImpl->pMergeData && !pImpl->pMergeData->bEndOfDB;
}
@@ -1890,7 +1916,7 @@ sal_uInt32 SwNewDBMgr::GetSelectedRecordId()
sal_uInt32 nRet = 0;
OSL_ENSURE(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is())
- return FALSE;
+ return sal_False;
try
{
nRet = pImpl->pMergeData->xResultSet->getRow();
@@ -1905,8 +1931,8 @@ sal_Bool SwNewDBMgr::ToRecordId(sal_Int32 nSet)
{
OSL_ENSURE(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is()|| nSet < 0)
- return FALSE;
- sal_Bool bRet = FALSE;
+ return sal_False;
+ sal_Bool bRet = sal_False;
sal_Int32 nAbsPos = nSet;
if(nAbsPos >= 0)
@@ -1918,7 +1944,7 @@ sal_Bool SwNewDBMgr::ToRecordId(sal_Int32 nSet)
return bRet;
}
-BOOL SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableOrQuery,
+sal_Bool SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableOrQuery,
sal_Int32 nCommandType, bool bCreate)
{
SwDBData aData;
@@ -1926,11 +1952,11 @@ BOOL SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableO
aData.sCommand = rTableOrQuery;
aData.nCommandType = nCommandType;
- SwDSParam* pFound = FindDSData(aData, TRUE);
+ SwDSParam* pFound = FindDSData(aData, sal_True);
uno::Reference< XDataSource> xSource;
if(pFound->xResultSet.is())
- return TRUE;
- SwDSParam* pParam = FindDSConnection(rDataSource, FALSE);
+ return sal_True;
+ SwDSParam* pParam = FindDSConnection(rDataSource, sal_False);
uno::Reference< XConnection> xConnection;
if(pParam && pParam->xConnection.is())
pFound->xConnection = pParam->xConnection;
@@ -1952,7 +1978,7 @@ BOOL SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableO
catch(Exception&)
{
// DB driver may not be ODBC 3.0 compliant
- pFound->bScrollable = TRUE;
+ pFound->bScrollable = sal_True;
}
pFound->xStatement = pFound->xConnection->createStatement();
rtl::OUString aQuoteChar = xMetaData->getIdentifierQuoteString();
@@ -1981,7 +2007,7 @@ BOOL SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableO
uno::Reference< XConnection> SwNewDBMgr::RegisterConnection(rtl::OUString& rDataSource)
{
- SwDSParam* pFound = SwNewDBMgr::FindDSConnection(rDataSource, TRUE);
+ SwDSParam* pFound = SwNewDBMgr::FindDSConnection(rDataSource, sal_True);
uno::Reference< XDataSource> xSource;
if(!pFound->xConnection.is())
{
@@ -2015,7 +2041,7 @@ sal_uInt32 SwNewDBMgr::GetSelectedRecordId(
aData.sDataSource = rDataSource;
aData.sCommand = rTableOrQuery;
aData.nCommandType = nCommandType;
- SwDSParam* pFound = FindDSData(aData, FALSE);
+ SwDSParam* pFound = FindDSData(aData, sal_False);
if(pFound && pFound->xResultSet.is())
{
try
@@ -2039,11 +2065,11 @@ sal_uInt32 SwNewDBMgr::GetSelectedRecordId(
// close all data sources - after fields were updated
-void SwNewDBMgr::CloseAll(BOOL bIncludingMerge)
+void SwNewDBMgr::CloseAll(sal_Bool bIncludingMerge)
{
//the only thing done here is to reset the selection index
//all connections stay open
- for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
+ for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
{
SwDSParam* pParam = aDataSourceParams[nPos];
if(bIncludingMerge || pParam != pImpl->pMergeData)
@@ -2062,7 +2088,7 @@ void SwNewDBMgr::CloseAll(BOOL bIncludingMerge)
}
}
-SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, BOOL bCreate)
+SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, sal_Bool bCreate)
{
//prefer merge data if available
if(pImpl->pMergeData && rData.sDataSource == pImpl->pMergeData->sDataSource &&
@@ -2074,7 +2100,7 @@ SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, BOOL bCreate)
}
SwDSParam* pFound = 0;
- for(USHORT nPos = aDataSourceParams.Count(); nPos; nPos--)
+ for(sal_uInt16 nPos = aDataSourceParams.Count(); nPos; nPos--)
{
SwDSParam* pParam = aDataSourceParams[nPos - 1];
if(rData.sDataSource == pParam->sDataSource &&
@@ -2111,7 +2137,7 @@ SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, BOOL bCreate)
return pFound;
}
-SwDSParam* SwNewDBMgr::FindDSConnection(const rtl::OUString& rDataSource, BOOL bCreate)
+SwDSParam* SwNewDBMgr::FindDSConnection(const rtl::OUString& rDataSource, sal_Bool bCreate)
{
//prefer merge data if available
if(pImpl->pMergeData && rDataSource == pImpl->pMergeData->sDataSource )
@@ -2119,7 +2145,7 @@ SwDSParam* SwNewDBMgr::FindDSConnection(const rtl::OUString& rDataSource, BOOL
return pImpl->pMergeData;
}
SwDSParam* pFound = 0;
- for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
+ for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
{
SwDSParam* pParam = aDataSourceParams[nPos];
if(rDataSource == pParam->sDataSource)
@@ -2361,7 +2387,7 @@ String SwNewDBMgr::LoadAndRegisterDataSource()
void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
const Sequence<PropertyValue>& rProperties,
- BOOL bWithDataSourceBrowser)
+ sal_Bool bWithDataSourceBrowser)
{
//prevent second call
if(pImpl->pMergeDialog)
@@ -2393,7 +2419,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
if(!xConnection.is())
{
xConnection = SwNewDBMgr::RegisterConnection(sDataSource);
- pFound = FindDSConnection(sDataSource, TRUE);
+ pFound = FindDSConnection(sDataSource, sal_True);
}
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
@@ -2413,6 +2439,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
if(xResSet.is())
aDescriptor[daCursor] <<= xResSet;
+ // SfxObjectShellRef is ok, since there should be no control over the document lifetime here
SfxObjectShellRef xDocShell = rSh.GetView().GetViewFrame()->GetObjectShell();
SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), xDocShell));
{
@@ -2443,8 +2470,10 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
}
else
{
- SfxObjectShellRef xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
- SfxMedium* pWorkMed = new SfxMedium( sTempURL, STREAM_STD_READ, TRUE );
+ // the shell will be explicitly closed, but it is more safe to use SfxObjectShellLock here
+ // especially for the case that the loading has failed
+ SfxObjectShellLock xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
+ SfxMedium* pWorkMed = new SfxMedium( sTempURL, STREAM_STD_READ, sal_True );
pWorkMed->SetFilter( pSfxFlt );
if( xWorkDocSh->DoLoad(pWorkMed) )
{
@@ -2489,7 +2518,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh,
}
if(pFound)
{
- for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
+ for(sal_uInt16 nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
{
SwDSParam* pParam = aDataSourceParams[nPos];
if(pParam == pFound)
@@ -2664,7 +2693,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
uno::Reference< XResultSet> xResultSet = rMMConfig.GetResultSet();
if(!xResultSet.is())
return false;
- bInMerge = TRUE;
+ bInMerge = sal_True;
sal_Int32 nRet = 0;
pImpl->pMergeData = new SwDSParam(
rMMConfig.GetCurrentDBData(), xResultSet, rMMConfig.GetSelection());
@@ -2678,7 +2707,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
pImpl->pMergeData->bEndOfDB = !pImpl->pMergeData->xResultSet->absolute( nPos );
pImpl->pMergeData->CheckEndOfDB();
if(pImpl->pMergeData->nSelectionIndex >= pImpl->pMergeData->aSelection.getLength())
- pImpl->pMergeData->bEndOfDB = TRUE;
+ pImpl->pMergeData->bEndOfDB = sal_True;
}
else
{
@@ -2688,13 +2717,13 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
}
catch(Exception&)
{
- pImpl->pMergeData->bEndOfDB = TRUE;
+ pImpl->pMergeData->bEndOfDB = sal_True;
pImpl->pMergeData->CheckEndOfDB();
OSL_FAIL("exception in MergeNew()");
}
//bCancel is set from the PrintMonitor
- bCancel = FALSE;
+ bCancel = sal_False;
CreateMonitor aMonitorDlg(&rSourceView.GetEditWin());
aMonitorDlg.SetCancelHdl(LINK(this, SwNewDBMgr, PrtCancelHdl));
@@ -2704,15 +2733,15 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
aMonitorDlg.Invalidate();
aMonitorDlg.Update();
// the print monitor needs some time to act
- for( USHORT i = 0; i < 25; i++)
+ for( sal_uInt16 i = 0; i < 25; i++)
Application::Reschedule();
}
SwWrtShell& rSourceShell = rSourceView.GetWrtShell();
- BOOL bSynchronizedDoc = rSourceShell.IsLabelDoc() && rSourceShell.GetSectionFmtCount() > 1;
+ sal_Bool bSynchronizedDoc = rSourceShell.IsLabelDoc() && rSourceShell.GetSectionFmtCount() > 1;
//save the settings of the first
- rSourceShell.SttEndDoc(TRUE);
- USHORT nStartingPageNo = rSourceShell.GetVirtPageNum();
+ rSourceShell.SttEndDoc(sal_True);
+ sal_uInt16 nStartingPageNo = rSourceShell.GetVirtPageNum();
String sModifiedStartingPageDesc;
String sStartingPageDesc = sModifiedStartingPageDesc = rSourceShell.GetPageDesc(
rSourceShell.GetCurPageDesc()).GetName();
@@ -2748,7 +2777,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
long nStartRow, nEndRow;
- ULONG nDocNo = 1;
+ sal_uLong nDocNo = 1;
sal_Int32 nDocCount = 0;
if( !IsMergeSilent() && lcl_getCountFromResultSet( nDocCount, pImpl->pMergeData->xResultSet ) )
aMonitorDlg.SetTotalCount( nDocCount );
@@ -2762,12 +2791,13 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
aMonitorDlg.Invalidate();
aMonitorDlg.Update();
// the print monitor needs some time to act
- for( USHORT i = 0; i < 25; i++)
+ for( sal_uInt16 i = 0; i < 25; i++)
Application::Reschedule();
}
// copy the source document
- SfxObjectShellRef xWorkDocSh;
+ // the copy will be closed later, but it is more safe to use SfxObjectShellLock here
+ SfxObjectShellLock xWorkDocSh;
if(nDocNo == 1 )
{
uno::Reference< util::XCloneable > xClone( rSourceView.GetDocShell()->GetModel(), uno::UNO_QUERY);
@@ -2789,8 +2819,14 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
SwNewDBMgr* pWorkDBMgr = pWorkDoc->GetNewDBMgr();
pWorkDoc->SetNewDBMgr( this );
pWorkDoc->EmbedAllLinks();
- if(UNDO_UI_DELETE_INVISIBLECNTNT == rWorkShell.GetUndoIds())
- rWorkShell.Undo();
+ SwUndoId nLastUndoId(UNDO_EMPTY);
+ if (rWorkShell.GetLastUndoInfo(0, & nLastUndoId))
+ {
+ if (UNDO_UI_DELETE_INVISIBLECNTNT == nLastUndoId)
+ {
+ rWorkShell.Undo();
+ }
+ }
// #i69485# lock fields to prevent access to the result set while calculating layout
rWorkShell.LockExpFlds();
// create a layout
@@ -2804,13 +2840,16 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
rWorkShell.RemoveInvisibleContent();
rWorkShell.ConvertFieldsToText();
rWorkShell.SetNumberingRestart();
-
+ if( bSynchronizedDoc )
+ {
+ lcl_RemoveSectionLinks( rWorkShell );
+ }
// insert the document into the target document
- rWorkShell.SttEndDoc(FALSE);
- rWorkShell.SttEndDoc(TRUE);
+ rWorkShell.SttEndDoc(sal_False);
+ rWorkShell.SttEndDoc(sal_True);
rWorkShell.SelAll();
- pTargetShell->SttEndDoc(FALSE);
+ pTargetShell->SttEndDoc(sal_False);
//#i63806# put the styles to the target document
//if the source uses headers or footers each new copy need to copy a new page styles
@@ -2844,7 +2883,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
{
pTargetShell->SetPageStyle(sModifiedStartingPageDesc);
}
- USHORT nPageCountBefore = pTargetShell->GetPageCnt();
+ sal_uInt16 nPageCountBefore = pTargetShell->GetPageCnt();
OSL_ENSURE(!pTargetShell->GetTableFmt(),"target document ends with a table - paragraph should be appended");
//#i51359# add a second paragraph in case there's only one
{
@@ -2875,7 +2914,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
++nRet;
// the print monitor needs some time to act
- for( USHORT i = 0; i < 25; i++)
+ for( sal_uInt16 i = 0; i < 25; i++)
Application::Reschedule();
//restore the ole DBMgr
@@ -2906,7 +2945,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
OSL_FAIL("exception caught in SwNewDBMgr::MergeDocuments");
}
DELETEZ(pImpl->pMergeData);
- bInMerge = FALSE;
+ bInMerge = sal_False;
return nRet;
}
@@ -2924,7 +2963,7 @@ void SwConnectionDisposedListener_Impl::disposing( const EventObject& rSource )
{
::SolarMutexGuard aGuard;
uno::Reference<XConnection> xSource(rSource.Source, UNO_QUERY);
- for(USHORT nPos = rDBMgr.aDataSourceParams.Count(); nPos; nPos--)
+ for(sal_uInt16 nPos = rDBMgr.aDataSourceParams.Count(); nPos; nPos--)
{
SwDSParam* pParam = rDBMgr.aDataSourceParams[nPos - 1];
if(pParam->xConnection.is() &&
diff --git a/sw/source/ui/dbui/dbtree.cxx b/sw/source/ui/dbui/dbtree.cxx
index 9f7dfc0aeaa0..4af7627b3a6b 100644
--- a/sw/source/ui/dbui/dbtree.cxx
+++ b/sw/source/ui/dbui/dbtree.cxx
@@ -95,7 +95,7 @@ class SwDBTreeList_Impl : public cppu::WeakImplHelper1 < XContainerListener >
virtual void SAL_CALL elementReplaced( const ContainerEvent& Event ) throw (RuntimeException);
virtual void SAL_CALL disposing( const EventObject& Source ) throw (RuntimeException);
- BOOL HasContext();
+ sal_Bool HasContext();
SwWrtShell* GetWrtShell() { return pWrtSh;}
void SetWrtShell(SwWrtShell& rSh) { pWrtSh = &rSh;}
Reference< XNameAccess > GetContext() const {return xDBContext;}
@@ -127,7 +127,7 @@ void SwDBTreeList_Impl::elementRemoved( const ContainerEvent& rEvent ) throw (Ru
SolarMutexGuard aGuard;
::rtl::OUString sSource;
rEvent.Accessor >>= sSource;
- for(USHORT i = 0; i < aConnections.Count(); i++)
+ for(sal_uInt16 i = 0; i < aConnections.Count(); i++)
{
SwConnectionDataPtr pPtr = aConnections[i];
if(pPtr->sSourceName == sSource)
@@ -148,7 +148,7 @@ void SwDBTreeList_Impl::elementReplaced( const ContainerEvent& rEvent ) throw (R
elementRemoved(rEvent);
}
-BOOL SwDBTreeList_Impl::HasContext()
+sal_Bool SwDBTreeList_Impl::HasContext()
{
if(!xDBContext.is())
{
@@ -170,7 +170,7 @@ BOOL SwDBTreeList_Impl::HasContext()
Reference<XConnection> SwDBTreeList_Impl::GetConnection(const rtl::OUString& rSourceName)
{
Reference<XConnection> xRet;
- for(USHORT i = 0; i < aConnections.Count(); i++)
+ for(sal_uInt16 i = 0; i < aConnections.Count(); i++)
{
SwConnectionDataPtr pPtr = aConnections[i];
if(pPtr->sSourceName == rSourceName)
@@ -191,12 +191,12 @@ Reference<XConnection> SwDBTreeList_Impl::GetConnection(const rtl::OUString& rS
SwDBTreeList::SwDBTreeList(Window *pParent, const ResId& rResId,
SwWrtShell* pSh,
- const String& rDefDBName, const BOOL bShowCol):
+ const String& rDefDBName, const sal_Bool bShowCol):
SvTreeListBox (pParent, rResId),
aImageList (SW_RES(ILIST_DB_DLG )),
sDefDBName (rDefDBName),
- bInitialized (FALSE),
+ bInitialized (sal_False),
bShowColumns (bShowCol),
pImpl(new SwDBTreeList_Impl(pSh))
{
@@ -216,7 +216,7 @@ void SwDBTreeList::InitTreeList()
if(!pImpl->HasContext() && pImpl->GetWrtShell())
return;
SetSelectionMode(SINGLE_SELECTION);
- SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
+ SetStyle(GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
// don't set font, so that the Control's font is being applied!
SetSpaceBetweenEntries(0);
SetNodeBitmaps( aImageList.GetImage(IMG_COLLAPSE),
@@ -234,24 +234,24 @@ void SwDBTreeList::InitTreeList()
for(long i = 0; i < nCount; i++)
{
String sDBName(pDBNames[i]);
- InsertEntry(sDBName, aImg, aImg, NULL, TRUE);
+ InsertEntry(sDBName, aImg, aImg, NULL, sal_True);
}
String sDBName(sDefDBName.GetToken(0, DB_DELIM));
String sTableName(sDefDBName.GetToken(1, DB_DELIM));
String sColumnName(sDefDBName.GetToken(2, DB_DELIM));
Select(sDBName, sTableName, sColumnName);
- bInitialized = TRUE;
+ bInitialized = sal_True;
}
void SwDBTreeList::AddDataSource(const String& rSource)
{
Image aImg = aImageList.GetImage(IMG_DB);
- SvLBoxEntry* pEntry = InsertEntry(rSource, aImg, aImg, NULL, TRUE);
+ SvLBoxEntry* pEntry = InsertEntry(rSource, aImg, aImg, NULL, sal_True);
SvTreeListBox::Select(pEntry);
}
-void SwDBTreeList::ShowColumns(BOOL bShowCol)
+void SwDBTreeList::ShowColumns(sal_Bool bShowCol)
{
if (bShowCol != bShowColumns)
{
@@ -259,7 +259,7 @@ void SwDBTreeList::ShowColumns(BOOL bShowCol)
String sTableName, sColumnName;
String sDBName(GetDBName(sTableName, sColumnName));
- SetUpdateMode(FALSE);
+ SetUpdateMode(sal_False);
SvLBoxEntry* pEntry = First();
@@ -279,7 +279,7 @@ void SwDBTreeList::ShowColumns(BOOL bShowCol)
{
Select(sDBName, sTableName, sColumnName); // force RequestingChilds
}
- SetUpdateMode(TRUE);
+ SetUpdateMode(sal_True);
}
}
@@ -298,7 +298,7 @@ void SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent)
if(!pImpl->GetContext()->hasByName(sSourceName))
return;
Reference<XConnection> xConnection = pImpl->GetConnection(sSourceName);
- BOOL bTable = pParent->GetUserData() == 0;
+ sal_Bool bTable = pParent->GetUserData() == 0;
Reference<XColumnsSupplier> xColsSupplier;
if(bTable)
{
@@ -420,7 +420,7 @@ IMPL_LINK( SwDBTreeList, DBCompare, SvSortData*, pData )
return DefaultCompare(pData); // otherwise call base class
}
-String SwDBTreeList::GetDBName(String& rTableName, String& rColumnName, BOOL* pbIsTable)
+String SwDBTreeList::GetDBName(String& rTableName, String& rColumnName, sal_Bool* pbIsTable)
{
String sDBName;
SvLBoxEntry* pEntry = FirstSelected();
@@ -449,8 +449,8 @@ void SwDBTreeList::Select(const String& rDBName, const String& rTableName, const
{
SvLBoxEntry* pParent;
SvLBoxEntry* pChild;
- USHORT nParent = 0;
- USHORT nChild = 0;
+ sal_uInt16 nParent = 0;
+ sal_uInt16 nChild = 0;
while ((pParent = GetEntry(nParent++)) != NULL)
{
diff --git a/sw/source/ui/dbui/dbui.src b/sw/source/ui/dbui/dbui.src
index 92c087677db5..169c1b6a23ee 100644
--- a/sw/source/ui/dbui/dbui.src
+++ b/sw/source/ui/dbui/dbui.src
@@ -31,6 +31,7 @@
ModalDialog DLG_DBSELECTION
{
+ HelpID = "sw:ModalDialog:DLG_DBSELECTION";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 168 , 132 ) ;
diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx
index 9ea589a7143a..c5146db13c4a 100644
--- a/sw/source/ui/dbui/mailmergechildwindow.cxx
+++ b/sw/source/ui/dbui/mailmergechildwindow.cxx
@@ -60,7 +60,7 @@ using namespace ::com::sun::star;
SFX_IMPL_FLOATINGWINDOW( SwMailMergeChildWindow, FN_MAILMERGE_CHILDWINDOW )
SwMailMergeChildWindow::SwMailMergeChildWindow( Window* _pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo ) :
SfxChildWindow( _pParent, nId )
@@ -366,7 +366,7 @@ SwSendMailDialog::SwSendMailDialog(Window *pParent, SwMailMergeConfigItem& rConf
m_aStatusLB.SetHelpId(HID_MM_MAILSTATUS_TLB);
static long nTabs[] = {3, 0, nPos1, aSz.Width() };
- m_aStatusLB.SetWindowBits( WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP );
+ m_aStatusLB.SetStyle( m_aStatusLB.GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP );
m_aStatusLB.SetSelectionMode( SINGLE_SELECTION );
m_aStatusLB.SetTabs(&nTabs[0], MAP_PIXEL);
m_aStatusLB.SetSpaceBetweenEntries(3);
@@ -692,7 +692,7 @@ void SwSendMailDialog::UpdateTransferStatus()
m_aErrorStatusFT.SetText(sStatus);
if(m_pImpl->aDescriptors.size())
- m_aProgressBar.SetValue((USHORT)(m_nSendCount * 100 / m_pImpl->aDescriptors.size()));
+ m_aProgressBar.SetValue((sal_uInt16)(m_nSendCount * 100 / m_pImpl->aDescriptors.size()));
else
m_aProgressBar.SetValue(0);
}
diff --git a/sw/source/ui/dbui/mailmergechildwindow.src b/sw/source/ui/dbui/mailmergechildwindow.src
index b42043406947..6f2f9da46b4c 100644
--- a/sw/source/ui/dbui/mailmergechildwindow.src
+++ b/sw/source/ui/dbui/mailmergechildwindow.src
@@ -244,6 +244,7 @@ ModalDialog DLG_MM_SENDWARNING
};
MultiLineEdit ED_DETAILS
{
+ HelpID = "sw:MultiLineEdit:DLG_MM_SENDWARNING:ED_DETAILS";
Pos = MAP_APPFONT ( 40 , 50 ) ;
Size = MAP_APPFONT ( 194 , 50 ) ;
Border = TRUE;
diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx
index 473321b2d9de..f0988d0b6a9b 100644
--- a/sw/source/ui/dbui/mailmergehelper.cxx
+++ b/sw/source/ui/dbui/mailmergehelper.cxx
@@ -247,7 +247,7 @@ void SwAddressPreview::SetAddress(const ::rtl::OUString& rAddress)
{
pImpl->aAdresses.clear();
pImpl->aAdresses.push_back(rAddress);
- aVScrollBar.Show(FALSE);
+ aVScrollBar.Show(sal_False);
Invalidate();
}
@@ -389,7 +389,7 @@ void SwAddressPreview::MouseButtonDown( const MouseEvent& rMEvt )
void SwAddressPreview::KeyInput( const KeyEvent& rKEvt )
{
- USHORT nKey = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nKey = rKEvt.GetKeyCode().GetCode();
if(pImpl->nRows || pImpl->nColumns)
{
sal_uInt32 nSelectedRow = (pImpl->nSelectedAddress + 1)/ pImpl->nColumns;
@@ -502,7 +502,7 @@ String SwAddressPreview::FillData(
//find the appropriate assignment
String sConvertedColumn = aItem.sText;
- for(USHORT nColumn = 0;
+ for(sal_uInt16 nColumn = 0;
nColumn < rDefHeaders.Count() && nColumn < aAssignment.getLength();
++nColumn)
{
@@ -717,7 +717,7 @@ uno::Any SwMailTransferable::getTransferData( const datatransfer::DataFlavor& /*
else
{
Sequence<sal_Int8> aData;
- SfxMedium aMedium( m_aURL, STREAM_STD_READ, FALSE );
+ SfxMedium aMedium( m_aURL, STREAM_STD_READ, sal_False );
SvStream* pStream = aMedium.GetInStream();
if ( aMedium.GetErrorCode() == ERRCODE_NONE && pStream)
{
diff --git a/sw/source/ui/dbui/mailmergewizard.src b/sw/source/ui/dbui/mailmergewizard.src
index d3da4d7c9945..fc19ee422f8a 100644
--- a/sw/source/ui/dbui/mailmergewizard.src
+++ b/sw/source/ui/dbui/mailmergewizard.src
@@ -30,6 +30,7 @@
ModalDialog DLG_MAILMERGEWIZARD
{
+ HelpID = "sw:ModalDialog:DLG_MAILMERGEWIZARD";
OutputSize = TRUE ;
SVLook = TRUE ;
Text [ en-US ] = "Mail Merge Wizard" ;
diff --git a/sw/source/ui/dbui/makefile.mk b/sw/source/ui/dbui/makefile.mk
deleted file mode 100644
index f125f078510f..000000000000
--- a/sw/source/ui/dbui/makefile.mk
+++ /dev/null
@@ -1,108 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=dbui
-LIBTARGET=no
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-IMGLST_SRS=$(SRS)$/dbui.srs
-BMP_IN=$(PRJ)$/win/imglst
-
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- addresslistdialog.src \
- createaddresslistdialog.src \
- customizeaddresslistdialog.src \
- dbinsdlg.src \
- dbui.src \
- dbtablepreviewdialog.src \
- mailmergechildwindow.src \
- mailmergewizard.src \
- mmdocselectpage.src \
- mmlayoutpage.src \
- mmoutputpage.src \
- mmoutputtypepage.src \
- mmaddressblockpage.src \
- mmgreetingspage.src \
- mmmergepage.src \
- mmpreparemergepage.src \
- selectdbtabledialog.src \
-
-EXCEPTIONSFILES= \
- $(SLO)$/addresslistdialog.obj \
- $(SLO)$/createaddresslistdialog.obj \
- $(SLO)$/customizeaddresslistdialog.obj \
- $(SLO)$/dbinsdlg.obj \
- $(SLO)$/dbmgr.obj \
- $(SLO)$/dbtablepreviewdialog.obj \
- $(SLO)$/dbtree.obj \
- $(SLO)$/dbui.obj \
- $(SLO)$/maildispatcher.obj \
- $(SLO)$/mailmergechildwindow.obj \
- $(SLO)$/mailmergehelper.obj \
- $(SLO)$/mailmergewizard.obj \
- $(SLO)$/mmaddressblockpage.obj \
- $(SLO)$/mmconfigitem.obj \
- $(SLO)$/mmdocselectpage.obj \
- $(SLO)$/mmgreetingspage.obj \
- $(SLO)$/mmlayoutpage.obj \
- $(SLO)$/mmmergepage.obj \
- $(SLO)$/mmoutputpage.obj \
- $(SLO)$/mmoutputtypepage.obj \
- $(SLO)$/mmpreparemergepage.obj \
- $(SLO)$/selectdbtabledialog.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/swdbtoolsclient.obj
-
-
-LIB1TARGET = $(SLB)$/$(TARGET).lib
-
-LIB1OBJFILES = \
- $(SLO)$/dbmgr.obj \
- $(SLO)$/dbtree.obj \
- $(SLO)$/dbui.obj \
- $(SLO)$/maildispatcher.obj \
- $(SLO)$/mailmergehelper.obj \
- $(SLO)$/mailmergechildwindow.obj \
- $(SLO)$/mmconfigitem.obj \
- $(SLO)$/swdbtoolsclient.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index be144c9cd2af..821500a3df17 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -296,16 +296,16 @@ IMPL_LINK(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, ImageButton*, pButton
}
else
{
- BOOL bNext = pButton == &m_aNextSetIB;
+ sal_Bool bNext = pButton == &m_aNextSetIB;
sal_Int32 nPos = rConfig.GetResultSetPosition();
rConfig.MoveResultSet( bNext ? ++nPos : --nPos);
}
m_pWizard->LeaveWait();
sal_Int32 nPos = rConfig.GetResultSetPosition();
- BOOL bEnable = TRUE;
+ sal_Bool bEnable = sal_True;
if(nPos < 1)
{
- bEnable = FALSE;
+ bEnable = sal_False;
nPos = 1;
}
else
@@ -507,12 +507,12 @@ SwRestrictedComboBox::~SwRestrictedComboBox()
void SwRestrictedComboBox::KeyInput(const KeyEvent& rEvt)
{
- BOOL bCallParent = TRUE;
+ sal_Bool bCallParent = sal_True;
if(rEvt.GetCharCode())
{
String sKey = rEvt.GetCharCode();
if( STRING_NOTFOUND != sForbiddenChars.Search(sKey))
- bCallParent = FALSE;
+ bCallParent = sal_False;
}
if(bCallParent)
ComboBox::KeyInput(rEvt);
@@ -522,11 +522,11 @@ void SwRestrictedComboBox::Modify()
{
Selection aSel = GetSelection();
String sTemp = GetText();
- for(USHORT i = 0; i < sForbiddenChars.Len(); i++)
+ for(sal_uInt16 i = 0; i < sForbiddenChars.Len(); i++)
{
sTemp.EraseAllChars( sForbiddenChars.GetChar(i) );
}
- USHORT nDiff = GetText().Len() - sTemp.Len();
+ sal_uInt16 nDiff = GetText().Len() - sTemp.Len();
if(nDiff)
{
aSel.setMin(aSel.getMin() - nDiff);
@@ -617,7 +617,7 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog(
}
FreeResource();
const ResStringArray& rHeaders = m_rConfigItem.GetDefaultAddressHeaders();
- for(USHORT i = 0; i < rHeaders.Count(); ++i)
+ for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i)
{
const XubString& rHeader = rHeaders.GetString( i );
SvLBoxEntry* pEntry = m_aAddressElementsLB.InsertEntry(rHeader);
@@ -705,7 +705,7 @@ sal_Int32 SwCustomizeAddressBlockDialog::GetSelectedItem_Impl()
sal_Int32 nRet = USER_DATA_NONE;
String sSelected = m_aDragED.GetCurrentItem();
if(sSelected.Len())
- for(ULONG i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
+ for(sal_uLong i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
{
SvLBoxEntry* pEntry = m_aAddressElementsLB.GetEntry(i);
String sEntry = m_aAddressElementsLB.GetEntryText(pEntry);
@@ -722,7 +722,7 @@ bool SwCustomizeAddressBlockDialog::HasItem_Impl(sal_Int32 nUserData)
{
//get the entry from the ListBox
String sEntry;
- for(ULONG i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
+ for(sal_uLong i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
{
SvLBoxEntry* pEntry = m_aAddressElementsLB.GetEntry(i);
if((sal_Int32)(sal_IntPtr)pEntry->GetUserData() == nUserData)
@@ -841,7 +841,7 @@ void SwCustomizeAddressBlockDialog::SetAddress(const ::rtl::OUString& rAddress)
//remove placeholders by the actual content
if(m_aFieldFT.IsVisible())
{
- for(ULONG i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
+ for(sal_uLong i = 0; i < m_aAddressElementsLB.GetEntryCount(); ++i)
{
SvLBoxEntry* pEntry = m_aAddressElementsLB.GetEntry(i);
String sEntry = m_aAddressElementsLB.GetEntryText(pEntry);
@@ -1010,8 +1010,27 @@ SwAssignFieldsControl::SwAssignFieldsControl(
uno::Sequence< ::rtl::OUString> aAssignments = rConfigItem.GetColumnAssignment( rConfigItem.GetCurrentDBData() );
Link aMatchHdl = LINK(this, SwAssignFieldsControl, MatchHdl_Impl);
Link aFocusHdl = LINK(this, SwAssignFieldsControl, GotFocusHdl_Impl);
+
+ static const char* aHIDs[] =
+ {
+ HID_MM_HEADER_0,
+ HID_MM_HEADER_1,
+ HID_MM_HEADER_2,
+ HID_MM_HEADER_3,
+ HID_MM_HEADER_4,
+ HID_MM_HEADER_5,
+ HID_MM_HEADER_6,
+ HID_MM_HEADER_7,
+ HID_MM_HEADER_8,
+ HID_MM_HEADER_9,
+ HID_MM_HEADER_10,
+ HID_MM_HEADER_11,
+ HID_MM_HEADER_12,
+ HID_MM_HEADER_13
+ };
+
//fill the controls
- for(USHORT i = 0; i < rHeaders.Count(); ++i)
+ for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i)
{
const XubString& rHeader = rHeaders.GetString( i );
FixedInfo* pNewText = new FixedInfo(&m_aWindow, ResId( FT_FIELDS, *rResId.GetResMgr()));
@@ -1019,7 +1038,7 @@ SwAssignFieldsControl::SwAssignFieldsControl(
sLabel.Insert(rHeader, 1);
pNewText->SetText(sLabel);
ListBox* pNewLB = new ListBox(&m_aWindow, ResId(LB_FIELDS, *rResId.GetResMgr()));
- pNewLB->SetHelpId( HID_MM_HEADER_0 + i );
+ pNewLB->SetHelpId( aHIDs[i] );
pNewLB->SelectEntryPos(0);
for(sal_Int32 nField = 0; nField < aFields.getLength(); ++nField)
pNewLB->InsertEntry(pFields[nField]);
@@ -1115,7 +1134,7 @@ long SwAssignFieldsControl::PreNotify( NotifyEvent& rNEvt )
if(rNEvt.GetType() == EVENT_COMMAND)
{
const CommandEvent* pCEvt = rNEvt.GetCommandEvent();
- USHORT nCmd = pCEvt->GetCommand();
+ sal_uInt16 nCmd = pCEvt->GetCommand();
if( COMMAND_WHEEL == nCmd )
{
Command(*pCEvt);
@@ -1147,7 +1166,7 @@ IMPL_LINK(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll)
// The first line has to be -(nThumb * m_nYOffset) in the negative
long nMove = m_nFirstYPos - (*m_aMatches.begin())->GetPosPixel().Y() - (nThumb * m_nYOffset);
- SetUpdateMode(FALSE);
+ SetUpdateMode(sal_False);
long nIndex;
::std::vector<FixedInfo*>::iterator aFIIter;
for(nIndex = 0, aFIIter = m_aFieldNames.begin(); aFIIter != m_aFieldNames.end(); ++aFIIter, ++nIndex)
@@ -1157,7 +1176,7 @@ IMPL_LINK(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll)
lcl_Move(*aLBIter, nMove);
for(nIndex = 0, aFIIter = m_aPreviews.begin(); aFIIter != m_aPreviews.end(); ++aFIIter, ++nIndex)
lcl_Move(*aFIIter, nMove);
- SetUpdateMode(TRUE);
+ SetUpdateMode(sal_True);
return 0;
}
@@ -1315,11 +1334,11 @@ DDListBox::DDListBox(SwCustomizeAddressBlockDialog* pParent, const ResId rResId)
SvTreeListBox(pParent, rResId),
m_pParentDialog(pParent)
{
- SetWindowBits( /*WB_HASBUTTONS|WB_HASBUTTONSATROOT|*/
+ SetStyle( GetStyle() | /*WB_HASBUTTONS|WB_HASBUTTONSATROOT|*/
WB_CLIPCHILDREN );
SetSelectionMode( SINGLE_SELECTION );
SetDragDropMode( SV_DRAGDROP_CTRL_COPY );
- EnableAsyncDrag(TRUE);
+ EnableAsyncDrag(sal_True);
SetHelpId(HID_MM_CUSTOMFIELDS);
// expand selection to the complete width of the ListBox
SetHighlightRange();
@@ -1366,7 +1385,7 @@ AddressMultiLineEdit::AddressMultiLineEdit(SwCustomizeAddressBlockDialog* pParen
{
GetTextView()->SupportProtectAttribute(sal_True);
StartListening(*GetTextEngine());
- EnableFocusSelectionHide(FALSE);
+ EnableFocusSelectionHide(sal_False);
}
AddressMultiLineEdit::~AddressMultiLineEdit()
@@ -1416,8 +1435,8 @@ void AddressMultiLineEdit::SetText( const String& rStr )
ExtTextEngine* pTextEngine = GetTextEngine();
TextAttribProtect aProtectAttr;
- ULONG nParaCount = pTextEngine->GetParagraphCount();
- for(ULONG nPara = 0; nPara < nParaCount; ++nPara)
+ sal_uLong nParaCount = pTextEngine->GetParagraphCount();
+ for(sal_uLong nPara = 0; nPara < nParaCount; ++nPara)
{
xub_StrLen nIndex = 0;
String sPara = pTextEngine->GetText( nPara );
@@ -1428,11 +1447,11 @@ void AddressMultiLineEdit::SetText( const String& rStr )
}
while(true)
{
- USHORT nStart = sPara.Search( '<', nIndex );
- USHORT nEnd = sPara.Search( '>', nStart );
+ sal_uInt16 nStart = sPara.Search( '<', nIndex );
+ sal_uInt16 nEnd = sPara.Search( '>', nStart );
nIndex = nEnd;
if(nStart != STRING_NOTFOUND && nEnd != STRING_NOTFOUND)
- pTextEngine->SetAttrib( aProtectAttr, nPara, nStart, nEnd + 1, FALSE );
+ pTextEngine->SetAttrib( aProtectAttr, nPara, nStart, nEnd + 1, sal_False );
else
break;
}
@@ -1458,8 +1477,8 @@ void AddressMultiLineEdit::InsertNewEntry( const String& rStr )
// insert new entry after current selected one.
ExtTextView* pTextView = GetTextView();
const TextSelection& rSelection = pTextView->GetSelection();
- ULONG nPara = rSelection.GetStart().GetPara();
- USHORT nIndex = rSelection.GetEnd().GetIndex();
+ sal_uLong nPara = rSelection.GetStart().GetPara();
+ sal_uInt16 nIndex = rSelection.GetEnd().GetIndex();
ExtTextEngine *pTextEngine = GetTextEngine();
const TextCharAttrib *pAttrib;
if(0 != (pAttrib = pTextEngine->FindCharAttrib( rSelection.GetStart(), TEXTATTR_PROTECTED )))
@@ -1474,7 +1493,7 @@ void AddressMultiLineEdit::InsertNewEntry( const String& rStr )
Modify();
}
-void AddressMultiLineEdit::InsertNewEntryAtPosition( const String& rStr, ULONG nPara, USHORT nIndex )
+void AddressMultiLineEdit::InsertNewEntryAtPosition( const String& rStr, sal_uLong nPara, sal_uInt16 nIndex )
{
ExtTextEngine* pTextEngine = GetTextEngine();
TextPaM aInsertPos( nPara, nIndex );
@@ -1500,7 +1519,7 @@ void AddressMultiLineEdit::RemoveCurrentEntry()
(pBeginAttrib->GetStart() <= rSelection.GetStart().GetIndex()
&& pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()))
{
- ULONG nPara = rSelection.GetStart().GetPara();
+ sal_uLong nPara = rSelection.GetStart().GetPara();
TextSelection aEntrySel(TextPaM( nPara, pBeginAttrib->GetStart()), TextPaM(nPara, pBeginAttrib->GetEnd()));
pTextEngine->ReplaceText(aEntrySel, String());
//restore the attributes
@@ -1520,8 +1539,8 @@ void AddressMultiLineEdit::MoveCurrentItem(sal_uInt16 nMove)
&& pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()))
{
//current item has been found
- ULONG nPara = rSelection.GetStart().GetPara();
- USHORT nIndex = pBeginAttrib->GetStart();
+ sal_uLong nPara = rSelection.GetStart().GetPara();
+ sal_uInt16 nIndex = pBeginAttrib->GetStart();
TextSelection aEntrySel(TextPaM( nPara, pBeginAttrib->GetStart()), TextPaM(nPara, pBeginAttrib->GetEnd()));
String sCurrentItem = pTextEngine->GetText(aEntrySel);
pTextEngine->RemoveAttrib( nPara, *pBeginAttrib );
@@ -1625,7 +1644,7 @@ String AddressMultiLineEdit::GetCurrentItem()
(pBeginAttrib->GetStart() <= rSelection.GetStart().GetIndex()
&& pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()))
{
- ULONG nPara = rSelection.GetStart().GetPara();
+ sal_uLong nPara = rSelection.GetStart().GetPara();
TextSelection aEntrySel(TextPaM( nPara, pBeginAttrib->GetStart()), TextPaM(nPara, pBeginAttrib->GetEnd()));
sRet = pTextEngine->GetText( aEntrySel );
}
@@ -1642,7 +1661,7 @@ void AddressMultiLineEdit::SelectCurrentItem()
(pBeginAttrib->GetStart() <= rSelection.GetStart().GetIndex()
&& pBeginAttrib->GetEnd() >= rSelection.GetEnd().GetIndex()))
{
- ULONG nPara = rSelection.GetStart().GetPara();
+ sal_uLong nPara = rSelection.GetStart().GetPara();
TextSelection aEntrySel(TextPaM( nPara, pBeginAttrib->GetStart()), TextPaM(nPara, pBeginAttrib->GetEnd()));
pTextView->SetSelection(aEntrySel);
Invalidate();
@@ -1653,8 +1672,8 @@ String AddressMultiLineEdit::GetAddress()
{
String sRet;
ExtTextEngine* pTextEngine = GetTextEngine();
- ULONG nParaCount = pTextEngine->GetParagraphCount();
- for(ULONG nPara = nParaCount; nPara; --nPara)
+ sal_uLong nParaCount = pTextEngine->GetParagraphCount();
+ for(sal_uLong nPara = nParaCount; nPara; --nPara)
{
String sPara = pTextEngine->GetText( nPara - 1);
sPara.EraseTrailingChars(' ');
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx
index b5e90d7fc4f2..d6b92245e2ac 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -186,7 +186,7 @@ public:
String GetAddress();
void InsertNewEntry( const String& rStr );
- void InsertNewEntryAtPosition( const String& rStr, ULONG nPara, USHORT nIndex );
+ void InsertNewEntryAtPosition( const String& rStr, sal_uLong nPara, sal_uInt16 nIndex );
void RemoveCurrentEntry();
void MoveCurrentItem(sal_uInt16 nMove);
diff --git a/sw/source/ui/dbui/mmaddressblockpage.src b/sw/source/ui/dbui/mmaddressblockpage.src
index 9db19f59bd6b..ced9027851b0 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.src
+++ b/sw/source/ui/dbui/mmaddressblockpage.src
@@ -63,6 +63,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE
};
PushButton PB_ADDRESSLIST
{
+ HelpID = "sw:PushButton:DLG_MM_ADDRESSBLOCK_PAGE:PB_ADDRESSLIST";
Pos = MAP_APPFONT ( 154 , 27 ) ;
Size = MAP_APPFONT ( 100 , 14 ) ;
Text[ en-US ] = "Select A~ddress List...";
@@ -91,6 +92,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE
};
CheckBox CB_ADDRESS
{
+ HelpID = "sw:CheckBox:DLG_MM_ADDRESSBLOCK_PAGE:CB_ADDRESS";
Pos = MAP_APPFONT ( 16 , 66 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
Text[ en-US ] = "~This document shall contain an address block";
@@ -103,6 +105,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE
};
PushButton PB_SETTINGS
{
+ HelpID = "sw:PushButton:DLG_MM_ADDRESSBLOCK_PAGE:PB_SETTINGS";
Pos = MAP_APPFONT ( 194 , 110 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
Group = FALSE;
@@ -110,6 +113,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE
};
CheckBox CB_HIDE_EMPTY_PARA
{
+ HelpID = "sw:CheckBox:DLG_MM_ADDRESSBLOCK_PAGE:CB_HIDE_EMPTY_PARA";
Pos = MAP_APPFONT ( 24 , 127 ) ;
Size = MAP_APPFONT ( 230 , 10 ) ;
Text[ en-US ] = "~Suppress lines with just empty fields";
@@ -134,6 +138,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE
};
PushButton PB_ASSIGN
{
+ HelpID = "sw:PushButton:DLG_MM_ADDRESSBLOCK_PAGE:PB_ASSIGN";
Pos = MAP_APPFONT ( 194 , 151 ) ;
Size = MAP_APPFONT ( 60 , 14 ) ;
Text[ en-US ] = "Match ~Fields...";
@@ -169,6 +174,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE
};
ImageButton IB_PREVSET
{
+ HelpID = "sw:ImageButton:DLG_MM_ADDRESSBLOCK_PAGE:IB_PREVSET";
Pos = MAP_APPFONT ( 167 , 238 ) ;
Size = MAP_APPFONT ( 10 , 10 ) ;
SYMBOL = IMAGEBUTTON_PREV;
@@ -176,6 +182,7 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE
};
ImageButton IB_NEXTSET
{
+ HelpID = "sw:ImageButton:DLG_MM_ADDRESSBLOCK_PAGE:IB_NEXTSET";
Pos = MAP_APPFONT ( 178 , 238 ) ;
Size = MAP_APPFONT ( 10 , 10 ) ;
SYMBOL = IMAGEBUTTON_NEXT ;
@@ -212,18 +219,21 @@ ModalDialog DLG_MM_SELECTADDRESSBLOCK
};
PushButton PB_NEW
{
+ HelpID = "sw:PushButton:DLG_MM_SELECTADDRESSBLOCK:PB_NEW";
Pos = MAP_APPFONT ( 204 , 14 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text[ en-US ] = "~New...";
};
PushButton PB_CUSTOMIZE
{
+ HelpID = "sw:PushButton:DLG_MM_SELECTADDRESSBLOCK:PB_CUSTOMIZE";
Pos = MAP_APPFONT ( 204 , 31 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text[ en-US ] = "~Edit...";
};
PushButton PB_DELETE
{
+ HelpID = "sw:PushButton:DLG_MM_SELECTADDRESSBLOCK:PB_DELETE";
Pos = MAP_APPFONT ( 204 , 48 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Group = FALSE;
@@ -238,24 +248,28 @@ ModalDialog DLG_MM_SELECTADDRESSBLOCK
};
RadioButton RB_NEVER
{
+ HelpID = "sw:RadioButton:DLG_MM_SELECTADDRESSBLOCK:RB_NEVER";
Pos = MAP_APPFONT ( 12 , 131 ) ;
Size = MAP_APPFONT ( 150 , 10 ) ;
Text[ en-US ] = "N~ever include the country/region";
};
RadioButton RB_ALWAYS
{
+ HelpID = "sw:RadioButton:DLG_MM_SELECTADDRESSBLOCK:RB_ALWAYS";
Pos = MAP_APPFONT ( 12 , 145 ) ;
Size = MAP_APPFONT ( 150 , 10 ) ;
Text[ en-US ] = "~Always include the country/region";
};
RadioButton RB_DEPENDENT
{
+ HelpID = "sw:RadioButton:DLG_MM_SELECTADDRESSBLOCK:RB_DEPENDENT";
Pos = MAP_APPFONT ( 12 , 159 ) ;
Size = MAP_APPFONT ( 150 , 10 ) ;
Text[ en-US ] = "Only ~include the country/region if it is not:";
};
Edit ED_COUNTRY
{
+ HelpID = "sw:Edit:DLG_MM_SELECTADDRESSBLOCK:ED_COUNTRY";
Pos = MAP_APPFONT ( 18 , 172 ) ;
Size = MAP_APPFONT ( 180 , 12 ) ;
Border = TRUE;
@@ -330,6 +344,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK
};
ImageButton IB_INSERTFIELD
{
+ HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_INSERTFIELD";
Pos = MAP_APPFONT ( 80 , 29 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
Symbol = IMAGEBUTTON_ARROW_RIGHT;
@@ -341,6 +356,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK
};
ImageButton IB_REMOVEFIELD
{
+ HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_REMOVEFIELD";
Pos = MAP_APPFONT ( 80 , 46 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
Symbol = IMAGEBUTTON_ARROW_LEFT;
@@ -362,12 +378,14 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK
};
MultiLineEdit ED_DRAG
{
+ HelpID = "sw:MultiLineEdit:DLG_MM_CUSTOMIZEADDRESSBLOCK:ED_DRAG";
Pos = MAP_APPFONT ( 106 , 14 ) ;
Size = MAP_APPFONT ( 160 , 60 ) ;
Border = TRUE;
};
ImageButton IB_UP
{
+ HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_UP";
Pos = MAP_APPFONT ( 285 , 14 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
Symbol = IMAGEBUTTON_ARROW_UP;
@@ -375,6 +393,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK
};
ImageButton IB_LEFT
{
+ HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_LEFT";
Pos = MAP_APPFONT ( 270 , 29 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
Symbol = IMAGEBUTTON_ARROW_LEFT;
@@ -382,6 +401,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK
};
ImageButton IB_RIGHT
{
+ HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_RIGHT";
Pos = MAP_APPFONT ( 300 , 29 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
Symbol = IMAGEBUTTON_ARROW_RIGHT;
@@ -389,6 +409,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK
};
ImageButton IB_DOWN
{
+ HelpID = "sw:ImageButton:DLG_MM_CUSTOMIZEADDRESSBLOCK:IB_DOWN";
Pos = MAP_APPFONT ( 285 , 48 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
Symbol = IMAGEBUTTON_ARROW_DOWN;
@@ -403,6 +424,7 @@ ModalDialog DLG_MM_CUSTOMIZEADDRESSBLOCK
};
ComboBox CB_FIELD
{
+ HelpID = "sw:ComboBox:DLG_MM_CUSTOMIZEADDRESSBLOCK:CB_FIELD";
Pos = MAP_APPFONT ( 106 , 89 ) ;
Size = MAP_APPFONT ( 160 , 50 ) ;
Border = TRUE;
@@ -551,6 +573,7 @@ ModalDialog DLG_MM_ASSIGNFIELDS
};
ListBox LB_FIELDS
{
+ HelpID = "sw:ListBox:DLG_MM_ASSIGNFIELDS:LB_FIELDS";
Pos = MAP_APPFONT ( 83 , 4 ) ;
Size = MAP_APPFONT ( 74 , 50 ) ;
TabStop = TRUE;
diff --git a/sw/source/ui/dbui/mmconfigitem.cxx b/sw/source/ui/dbui/mmconfigitem.cxx
index 70d64a85c4ba..11c3e1ed75f7 100644
--- a/sw/source/ui/dbui/mmconfigitem.cxx
+++ b/sw/source/ui/dbui/mmconfigitem.cxx
@@ -408,7 +408,7 @@ void lcl_ConvertToNumbers(OUString& rBlock, const ResStringArray& rHeaders )
//convert the strings used for UI to numbers used for the configuration
String sBlock(rBlock);
sBlock.SearchAndReplaceAllAscii("\n", String::CreateFromAscii("\\n"));
- for(USHORT i = 0; i < rHeaders.Count(); ++i)
+ for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i)
{
String sHeader = rHeaders.GetString( i );
sHeader.Insert('<', 0);
@@ -997,7 +997,7 @@ sal_Int32 SwMailMergeConfigItem::MoveResultSet(sal_Int32 nTarget)
{
if(nTarget > 0)
{
- BOOL bMoved = m_pImpl->xResultSet->absolute(nTarget);
+ sal_Bool bMoved = m_pImpl->xResultSet->absolute(nTarget);
if(!bMoved)
{
if(nTarget > 1)
@@ -1326,7 +1326,7 @@ bool SwMailMergeConfigItem::IsAddressFieldsAssigned() const
if(aItem.bIsColumn)
{
String sConvertedColumn = aItem.sText;
- for(USHORT nColumn = 0;
+ for(sal_uInt16 nColumn = 0;
nColumn < rHeaders.Count() && nColumn < aAssignment.getLength();
++nColumn)
{
@@ -1385,7 +1385,7 @@ bool SwMailMergeConfigItem::IsGreetingFieldsAssigned() const
if(aItem.bIsColumn)
{
String sConvertedColumn = aItem.sText;
- for(USHORT nColumn = 0;
+ for(sal_uInt16 nColumn = 0;
nColumn < rHeaders.Count() && nColumn < aAssignment.getLength();
++nColumn)
{
@@ -1666,13 +1666,13 @@ sal_uInt32 SwMailMergeConfigItem::GetMergedDocumentCount() const
SwView* lcl_ExistsView(SwView* pView)
{
const TypeId aType(TYPE(SwView));
- SfxViewShell* pViewShell = SfxViewShell::GetFirst( &aType, FALSE );
+ SfxViewShell* pViewShell = SfxViewShell::GetFirst( &aType, sal_False );
while(pViewShell)
{
if(pViewShell == pView)
return pView;
- pViewShell = SfxViewShell::GetNext( *pViewShell, &aType, FALSE );
+ pViewShell = SfxViewShell::GetNext( *pViewShell, &aType, sal_False );
}
return 0;
}
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index 2e106f91e0a4..06ec019efd12 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -132,7 +132,7 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton)
{
m_aLoadTemplateRB.Check();
SfxNewFileDialog* pNewFileDlg = new SfxNewFileDialog(this, 0);
- USHORT nRet = pNewFileDlg->Execute();
+ sal_uInt16 nRet = pNewFileDlg->Execute();
if(RET_TEMPLATE_LOAD == nRet)
bTemplate = false;
else if(RET_CANCEL != nRet)
diff --git a/sw/source/ui/dbui/mmdocselectpage.src b/sw/source/ui/dbui/mmdocselectpage.src
index 9bc2077c6619..25ffe0cee67c 100644
--- a/sw/source/ui/dbui/mmdocselectpage.src
+++ b/sw/source/ui/dbui/mmdocselectpage.src
@@ -47,48 +47,56 @@ TabPage DLG_MM_DOCSELECT_PAGE
};
RadioButton RB_CURRENTDOC
{
+ HelpID = "sw:RadioButton:DLG_MM_DOCSELECT_PAGE:RB_CURRENTDOC";
Pos = MAP_APPFONT ( 12 , 48 ) ;
Size = MAP_APPFONT ( 190 , 10 ) ;
Text[ en-US ] = "Use the current ~document";
};
RadioButton RB_NEWDOC
{
+ HelpID = "sw:RadioButton:DLG_MM_DOCSELECT_PAGE:RB_NEWDOC";
Pos = MAP_APPFONT ( 12 , 66 ) ;
Size = MAP_APPFONT ( 190 , 10 ) ;
Text[ en-US ] = "Create a ne~w document";
};
RadioButton RB_LOADDOC
{
+ HelpID = "sw:RadioButton:DLG_MM_DOCSELECT_PAGE:RB_LOADDOC";
Pos = MAP_APPFONT ( 12 , 84) ;
Size = MAP_APPFONT ( 190 , 10 ) ;
Text[ en-US ] = "Start from ~existing document";
};
PushButton PB_LOADDOC
{
+ HelpID = "sw:PushButton:DLG_MM_DOCSELECT_PAGE:PB_LOADDOC";
Pos = MAP_APPFONT ( 204 , 80) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text[ en-US ] = "B~rowse...";
};
RadioButton RB_LOADTEMPLATE
{
+ HelpID = "sw:RadioButton:DLG_MM_DOCSELECT_PAGE:RB_LOADTEMPLATE";
Pos = MAP_APPFONT ( 12 , 103 ) ;
Size = MAP_APPFONT ( 190 , 10 ) ;
Text[ en-US ] = "Start from a t~emplate";
};
PushButton PB_BROWSETEMPLATE
{
+ HelpID = "sw:PushButton:DLG_MM_DOCSELECT_PAGE:PB_BROWSETEMPLATE";
Pos = MAP_APPFONT ( 204 , 99 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text[ en-US ] = "B~rowse...";
};
RadioButton RB_RECENTDOC
{
+ HelpID = "sw:RadioButton:DLG_MM_DOCSELECT_PAGE:RB_RECENTDOC";
Pos = MAP_APPFONT ( 12 , 120) ;
Size = MAP_APPFONT ( 190 , 10 ) ;
Text[ en-US ] = "Start fro~m a recently saved starting document";
};
ListBox LB_RECENTDOC
{
+ HelpID = "sw:ListBox:DLG_MM_DOCSELECT_PAGE:LB_RECENTDOC";
Pos = MAP_APPFONT ( 20 , 134 ) ;
Size = MAP_APPFONT ( 180 , 50 ) ;
DropDown = TRUE;
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index 5274f90ee0a4..6c8ea5282962 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -56,7 +56,7 @@ void lcl_FillGreetingsBox(ListBox& rBox,
const Sequence< ::rtl::OUString> rEntries = rConfig.GetGreetings(eType);
for(sal_Int32 nEntry = 0; nEntry < rEntries.getLength(); ++nEntry)
rBox.InsertEntry(rEntries[nEntry]);
- rBox.SelectEntryPos((USHORT)rConfig.GetCurrentGreeting(eType));
+ rBox.SelectEntryPos((sal_uInt16)rConfig.GetCurrentGreeting(eType));
}
void lcl_FillGreetingsBox(ComboBox& rBox,
@@ -66,7 +66,7 @@ void lcl_FillGreetingsBox(ComboBox& rBox,
const Sequence< ::rtl::OUString> rEntries = rConfig.GetGreetings(eType);
for(sal_Int32 nEntry = 0; nEntry < rEntries.getLength(); ++nEntry)
rBox.InsertEntry(rEntries[nEntry]);
- rBox.SelectEntryPos((USHORT)rConfig.GetCurrentGreeting(eType));
+ rBox.SelectEntryPos((sal_uInt16)rConfig.GetCurrentGreeting(eType));
}
void lcl_StoreGreetingsBox(ListBox& rBox,
@@ -75,7 +75,7 @@ void lcl_StoreGreetingsBox(ListBox& rBox,
{
Sequence< ::rtl::OUString> aEntries(rBox.GetEntryCount());
::rtl::OUString* pEntries = aEntries.getArray();
- for(USHORT nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry)
+ for(sal_uInt16 nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry)
pEntries[nEntry] = rBox.GetEntry(nEntry);
rConfig.SetGreetings(eType, aEntries);
rConfig.SetCurrentGreeting(eType, rBox.GetSelectEntryPos());
@@ -87,7 +87,7 @@ void lcl_StoreGreetingsBox(ComboBox& rBox,
{
Sequence< ::rtl::OUString> aEntries(rBox.GetEntryCount());
::rtl::OUString* pEntries = aEntries.getArray();
- for(USHORT nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry)
+ for(sal_uInt16 nEntry = 0; nEntry < rBox.GetEntryCount(); ++nEntry)
pEntries[nEntry] = rBox.GetEntry(nEntry);
rConfig.SetGreetings(eType, aEntries);
rConfig.SetCurrentGreeting(eType, rBox.GetSelectEntryPos());
@@ -95,7 +95,7 @@ void lcl_StoreGreetingsBox(ComboBox& rBox,
IMPL_LINK(SwGreetingsHandler, IndividualHdl_Impl, CheckBox*, EMPTYARG)
{
- BOOL bIndividual = m_pPersonalizedCB->IsEnabled() && m_pPersonalizedCB->IsChecked();
+ sal_Bool bIndividual = m_pPersonalizedCB->IsEnabled() && m_pPersonalizedCB->IsChecked();
m_pFemaleFT->Enable(bIndividual);
m_pFemaleLB->Enable(bIndividual);
m_pFemalePB->Enable(bIndividual);
@@ -388,10 +388,10 @@ sal_Bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPage
lcl_StoreGreetingsBox(m_aFemaleLB, rConfig, SwMailMergeConfigItem::FEMALE);
lcl_StoreGreetingsBox(m_aMaleLB, rConfig, SwMailMergeConfigItem::MALE);
- USHORT nCurrentTextPos = m_aNeutralCB.GetEntryPos( m_aNeutralCB.GetText() );
+ sal_uInt16 nCurrentTextPos = m_aNeutralCB.GetEntryPos( m_aNeutralCB.GetText() );
if(LISTBOX_ENTRY_NOTFOUND == nCurrentTextPos)
{
- USHORT nCount = m_aNeutralCB.GetEntryCount();
+ sal_uInt16 nCount = m_aNeutralCB.GetEntryCount();
m_aNeutralCB.InsertEntry( m_aNeutralCB.GetText(), nCount );
m_aNeutralCB.SelectEntryPos(nCount);
}
@@ -427,15 +427,15 @@ IMPL_LINK(SwMailMergeGreetingsPage, InsertDataHdl_Impl, ImageButton*, pButton)
}
else
{
- BOOL bNext = pButton == &m_aNextSetIB;
+ sal_Bool bNext = pButton == &m_aNextSetIB;
sal_Int32 nPos = rConfig.GetResultSetPosition();
rConfig.MoveResultSet( bNext ? ++nPos : --nPos);
}
sal_Int32 nPos = rConfig.GetResultSetPosition();
- BOOL bEnable = TRUE;
+ sal_Bool bEnable = sal_True;
if(nPos < 1)
{
- bEnable = FALSE;
+ bEnable = sal_False;
nPos = 1;
}
else
diff --git a/sw/source/ui/dbui/mmgreetingspage.src b/sw/source/ui/dbui/mmgreetingspage.src
index a9447034d749..eda855dc5095 100644
--- a/sw/source/ui/dbui/mmgreetingspage.src
+++ b/sw/source/ui/dbui/mmgreetingspage.src
@@ -144,6 +144,7 @@ TabPage DLG_MM_GREETINGS_PAGE
};
CheckBox CB_GREETINGLINE
{
+ HelpID = "sw:CheckBox:DLG_MM_GREETINGS_PAGE:CB_GREETINGLINE";
Pos = MAP_APPFONT ( 12 , 27 );
Size = MAP_APPFONT ( 242 , 10 );
Text[ en-US ] = "This document should contain a salutation";
@@ -163,6 +164,7 @@ TabPage DLG_MM_GREETINGS_PAGE
};
PushButton PB_ASSIGN
{
+ HelpID = "sw:PushButton:DLG_MM_GREETINGS_PAGE:PB_ASSIGN";
Pos = MAP_APPFONT ( 204 , 179 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text[ en-US ] = "~Match fields...";
@@ -175,6 +177,7 @@ TabPage DLG_MM_GREETINGS_PAGE
};
ImageButton IB_PREVSET
{
+ HelpID = "sw:ImageButton:DLG_MM_GREETINGS_PAGE:IB_PREVSET";
Pos = MAP_APPFONT ( 177 , 204 ) ;
Size = MAP_APPFONT ( 10 , 10 ) ;
SYMBOL = IMAGEBUTTON_PREV;
@@ -182,6 +185,7 @@ TabPage DLG_MM_GREETINGS_PAGE
};
ImageButton IB_NEXTSET
{
+ HelpID = "sw:ImageButton:DLG_MM_GREETINGS_PAGE:IB_NEXTSET";
Pos = MAP_APPFONT ( 188 , 204 ) ;
Size = MAP_APPFONT ( 10 , 10 ) ;
SYMBOL = IMAGEBUTTON_NEXT ;
@@ -208,6 +212,7 @@ ModalDialog DLG_MM_MAILBODY
Text [ en-US ] = "E-Mail Message";
CheckBox CB_GREETINGLINE
{
+ HelpID = "sw:CheckBox:DLG_MM_MAILBODY:CB_GREETINGLINE";
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
Text[ en-US ] = "This e-mail should contain a salutation";
@@ -221,6 +226,7 @@ ModalDialog DLG_MM_MAILBODY
};
MultiLineEdit MLE_BODY
{
+ HelpID = "sw:MultiLineEdit:DLG_MM_MAILBODY:MLE_BODY";
Pos = MAP_APPFONT ( 12, 151 ) ;
Size = MAP_APPFONT ( 180 , 50 ) ;
Border = TRUE;
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 2c08e6df3e4b..bbd2d33cca55 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -147,8 +147,8 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) :
m_pExampleFrame = new SwOneExampleFrame( m_aExampleWIN,
EX_SHOW_DEFAULT_PAGE, &aLink, &m_sExampleURL );
- m_aExampleWIN.Show( FALSE );
- m_aExampleContainerWIN.Show(TRUE);
+ m_aExampleWIN.Show( sal_False );
+ m_aExampleContainerWIN.Show(sal_True);
m_aLeftMF.SetValue(m_aLeftMF.Normalize(DEFAULT_LEFT_DISTANCE), FUNIT_TWIP);
m_aTopMF.SetValue(m_aTopMF.Normalize(DEFAULT_TOP_DISTANCE), FUNIT_TWIP);
@@ -230,7 +230,7 @@ void SwMailMergeLayoutPage::ActivatePage()
m_pExampleWrtShell->GotoFly( m_pAddressBlockFormat->GetName() );
m_pExampleWrtShell->DelRight();
m_pAddressBlockFormat = 0;
- m_pExampleWrtShell->Pop(FALSE);
+ m_pExampleWrtShell->Pop(sal_False);
}
else
{
@@ -368,7 +368,7 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame(
if(aItem.bIsColumn)
{
String sConvertedColumn = aItem.sText;
- for(USHORT nColumn = 0;
+ for(sal_uInt16 nColumn = 0;
nColumn < rHeaders.Count() && nColumn < aAssignment.getLength();
++nColumn)
{
@@ -459,7 +459,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
{
//there's already text at the desired position
//go to start of the doc, directly!
- rShell.SttEndDoc(TRUE);
+ rShell.SttEndDoc(sal_True);
//and go by paragraph until the position is reached
long nYPos = rShell.GetCharRect().Top();
while(nYPos < GREETING_TOP_DISTANCE)
@@ -625,7 +625,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
{
String sDB(sDBName);
String sConvertedColumn = aItem.sText;
- for(USHORT nColumn = 0;
+ for(sal_uInt16 nColumn = 0;
nColumn < rHeaders.Count() && nColumn < aAssignment.getLength();
++nColumn)
{
@@ -666,7 +666,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
{
rShell.Push();
rShell.SplitNode();
- rShell.Pop(FALSE);
+ rShell.Pop(sal_False);
}
//put the cursor to the start of the paragraph
rShell.SttPara();
@@ -676,8 +676,8 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
IMPL_LINK(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl, void*, EMPTYARG)
{
- m_aExampleWIN.Show( TRUE );
- m_aExampleContainerWIN.Show(FALSE);
+ m_aExampleWIN.Show( sal_True );
+ m_aExampleContainerWIN.Show(sal_False);
Reference< XModel > & xModel = m_pExampleFrame->GetModel();
//now the ViewOptions should be set properly
@@ -763,7 +763,7 @@ IMPL_LINK(SwMailMergeLayoutPage, ChangeAddressHdl_Impl, MetricField*, EMPTYARG)
IMPL_LINK(SwMailMergeLayoutPage, GreetingsHdl_Impl, PushButton*, pButton)
{
bool bDown = pButton == &m_aDownPB;
- BOOL bMoved = m_pExampleWrtShell->MoveParagraph( bDown ? 1 : -1 );
+ sal_Bool bMoved = m_pExampleWrtShell->MoveParagraph( bDown ? 1 : -1 );
if (bMoved || bDown)
m_pWizard->GetConfigItem().MoveGreeting(bDown ? 1 : -1 );
if(!bMoved && bDown)
diff --git a/sw/source/ui/dbui/mmlayoutpage.src b/sw/source/ui/dbui/mmlayoutpage.src
index 8e012674719d..55750c2de6e4 100644
--- a/sw/source/ui/dbui/mmlayoutpage.src
+++ b/sw/source/ui/dbui/mmlayoutpage.src
@@ -48,6 +48,7 @@ TabPage DLG_MM_LAYOUT_PAGE
};
CheckBox CB_ALIGN
{
+ HelpID = "sw:CheckBox:DLG_MM_LAYOUT_PAGE:CB_ALIGN";
Pos = MAP_APPFONT ( 6 , 40 ) ;
Size = MAP_APPFONT ( 118 , 10 ) ;
Text[ en-US ] = "Align to text body";
@@ -60,6 +61,7 @@ TabPage DLG_MM_LAYOUT_PAGE
};
MetricField MF_LEFT
{
+ HelpID = "sw:MetricField:DLG_MM_LAYOUT_PAGE:MF_LEFT";
Pos = MAP_APPFONT ( 78 , 52 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Border = TRUE ;
@@ -83,6 +85,7 @@ TabPage DLG_MM_LAYOUT_PAGE
};
MetricField MF_TOP
{
+ HelpID = "sw:MetricField:DLG_MM_LAYOUT_PAGE:MF_TOP";
Pos = MAP_APPFONT ( 78 , 67 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Border = TRUE ;
@@ -112,6 +115,7 @@ TabPage DLG_MM_LAYOUT_PAGE
};
PushButton MF_UP
{
+ HelpID = "sw:PushButton:DLG_MM_LAYOUT_PAGE:MF_UP";
Pos = MAP_APPFONT ( 68 , 96 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text[ en-US ] = "~Up";
@@ -124,6 +128,7 @@ TabPage DLG_MM_LAYOUT_PAGE
};
PushButton PB_DOWN
{
+ HelpID = "sw:PushButton:DLG_MM_LAYOUT_PAGE:PB_DOWN";
Pos = MAP_APPFONT ( 68 , 113 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text[ en-US ] = "~Down";
@@ -143,6 +148,7 @@ TabPage DLG_MM_LAYOUT_PAGE
};
ListBox LB_ZOOM
{
+ HelpID = "sw:ListBox:DLG_MM_LAYOUT_PAGE:LB_ZOOM";
Pos = MAP_APPFONT ( 204 , 182 ) ;
Size = MAP_APPFONT ( 50 , 50 ) ;
Border = TRUE;
diff --git a/sw/source/ui/dbui/mmmergepage.src b/sw/source/ui/dbui/mmmergepage.src
index d2f55bceb978..a66480abacce 100644
--- a/sw/source/ui/dbui/mmmergepage.src
+++ b/sw/source/ui/dbui/mmmergepage.src
@@ -49,6 +49,7 @@ TabPage DLG_MM_MERGE_PAGE
};
PushButton PB_EDIT
{
+ HelpID = "sw:PushButton:DLG_MM_MERGE_PAGE:PB_EDIT";
Pos = MAP_APPFONT ( 70 , 67 ) ;
Size = MAP_APPFONT ( 120 , 14 ) ;
Text [ en-US ] = "~Edit individual document...";
@@ -67,30 +68,35 @@ TabPage DLG_MM_MERGE_PAGE
};
Edit ED_FIND
{
+ HelpID = "sw:Edit:DLG_MM_MERGE_PAGE:ED_FIND";
Pos = MAP_APPFONT ( 55 ,114 ) ;
Size = MAP_APPFONT ( 140 , 12 ) ;
Border = TRUE;
};
PushButton PB_FIND
{
+ HelpID = "sw:PushButton:DLG_MM_MERGE_PAGE:PB_FIND";
Pos = MAP_APPFONT ( 198 ,113 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Find...";
};
CheckBox CB_WHOLEWORDS
{
+ HelpID = "sw:CheckBox:DLG_MM_MERGE_PAGE:CB_WHOLEWORDS";
Pos = MAP_APPFONT ( 55 , 131 ) ;
Size = MAP_APPFONT ( 180 , 10 ) ;
Text [ en-US ] = "Whole wor~ds only";
};
CheckBox CB_BACKWARDS
{
+ HelpID = "sw:CheckBox:DLG_MM_MERGE_PAGE:CB_BACKWARDS";
Pos = MAP_APPFONT ( 55 , 144 ) ;
Size = MAP_APPFONT ( 180 , 10 ) ;
Text [ en-US ] = "Back~wards";
};
CheckBox CB_MATCHCASE
{
+ HelpID = "sw:CheckBox:DLG_MM_MERGE_PAGE:CB_MATCHCASE";
Pos = MAP_APPFONT ( 55 , 157 ) ;
Size = MAP_APPFONT ( 180 , 10 ) ;
Text [ en-US ] = "Ma~tch case";
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index 6f21187e2946..abb762d79a43 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -84,7 +84,7 @@ using namespace svt;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-String lcl_GetExtensionForDocType(ULONG nDocType)
+String lcl_GetExtensionForDocType(sal_uLong nDocType)
{
String sExtension;
switch( nDocType )
@@ -447,7 +447,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton)
&m_aSendAllRB, &m_aSendDocumentsPB,
0
};
- SetUpdateMode(TRUE);
+ SetUpdateMode(sal_True);
Control** pControl = aControls;
do
{
@@ -543,7 +543,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton)
String sAttach( m_sDefaultAttachmentST );
sAttach += '.';
sAttach += lcl_GetExtensionForDocType(
- (ULONG)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos()));
+ (sal_uLong)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos()));
m_aAttachmentED.SetText( sAttach );
}
@@ -589,7 +589,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton)
}
m_aFromRB.GetClickHdl().Call(m_aFromRB.IsChecked() ? &m_aFromRB : 0);
- SetUpdateMode(FALSE);
+ SetUpdateMode(sal_False);
return 0;
}
@@ -647,9 +647,9 @@ IMPL_LINK(SwMailMergeOutputPage, SaveStartHdl_Impl, PushButton*, pButton)
rConfigItem.AddSavedDocument(
aURL.GetMainURL(INetURLObject::DECODE_TO_IURI));
- pButton->Enable(FALSE);
+ pButton->Enable(sal_False);
m_pWizard->enableButtons(WZB_FINISH, sal_True);
- pButton->Enable(FALSE);
+ pButton->Enable(sal_False);
}
}
@@ -782,7 +782,8 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton)
aSaveMonitor.aPrintInfo.SetText(sStat);
//now extract a document from the target document
- SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
+ // the shell will be closed at the end, but it is more safe to use SfxObjectShellLock here
+ SfxObjectShellLock xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
xTempDocShell->DoInitNew( 0 );
SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 );
SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() );
@@ -797,7 +798,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton)
sTargetTempURL, aOpt, sal_True );
pTargetView->GetWrtShell().PastePages(pTempView->GetWrtShell(),
- (USHORT)rInfo.nStartPageInTarget, (USHORT)rInfo.nEndPageInTarget );
+ (sal_uInt16)rInfo.nStartPageInTarget, (sal_uInt16)rInfo.nEndPageInTarget );
pTargetView->GetWrtShell().EndAction();
//then save it
String sOutPath = aURL.GetMainURL(INetURLObject::DECODE_TO_IURI);
@@ -907,7 +908,7 @@ IMPL_LINK(SwMailMergeOutputPage, PrintHdl_Impl, PushButton*, EMPTYARG)
if(nEnd > rConfigItem.GetMergedDocumentCount())
nEnd = rConfigItem.GetMergedDocumentCount();
}
- rConfigItem.SetPrintRange( (USHORT)nBegin, (USHORT)nEnd );
+ rConfigItem.SetPrintRange( (sal_uInt16)nBegin, (sal_uInt16)nEnd );
SwDocMergeInfo& rStartInfo = rConfigItem.GetDocumentMergeInfo(nBegin);
SwDocMergeInfo& rEndInfo = rConfigItem.GetDocumentMergeInfo(nEnd - 1);
@@ -955,7 +956,7 @@ IMPL_LINK(SwMailMergeOutputPage, PrinterSetupHdl_Impl, PushButton*, pButton)
IMPL_LINK(SwMailMergeOutputPage, SendTypeHdl_Impl, ListBox*, pBox)
{
- ULONG nDocType = (ULONG)pBox->GetEntryData(pBox->GetSelectEntryPos());
+ sal_uLong nDocType = (sal_uLong)pBox->GetEntryData(pBox->GetSelectEntryPos());
sal_Bool bEnable = MM_DOCTYPE_HTML != nDocType && MM_DOCTYPE_TEXT != nDocType;
m_aSendAsPB.Enable( bEnable );
m_aAttachmentFT.Enable( bEnable );
@@ -1008,7 +1009,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
!SwMailMergeHelper::CheckMailAddress(rConfigItem.GetMailAddress()) )
{
QueryBox aQuery(pButton, WB_YES_NO_CANCEL, m_sConfigureMail);
- USHORT nRet = aQuery.Execute();
+ sal_uInt16 nRet = aQuery.Execute();
if(RET_YES == nRet )
{
SfxAllItemSet aSet(pTargetView->GetPool());
@@ -1020,8 +1021,6 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
if(nRet != RET_OK && nRet != RET_YES)
return 0;
}
- //create the send dialog
- SwSendMailDialog* pDlg = new SwSendMailDialog( pButton, rConfigItem );
//add the documents
sal_uInt32 nBegin = 0;
sal_uInt32 nEnd = 0;
@@ -1041,12 +1040,31 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
rtl_TextEncoding eEncoding = ::gsl_getSystemTextEncoding();
SfxFilterContainer* pFilterContainer = SwDocShell::Factory().GetFilterContainer();
const SfxFilter *pSfxFlt = 0;
- ULONG nDocType = (ULONG)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos());
+ sal_uLong nDocType = (sal_uLong)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos());
String sExtension = lcl_GetExtensionForDocType(nDocType);
switch( nDocType )
{
case MM_DOCTYPE_OOO : break;
- case MM_DOCTYPE_PDF : break;
+ case MM_DOCTYPE_PDF :
+ {
+ //the method SwIOSystemGetFilterOfFormat( ) returns the template filter
+ //because it uses the same user data :-(
+ SfxFilterMatcher aMatcher( pFilterContainer->GetName() );
+ SfxFilterMatcherIter aIter( &aMatcher );
+ const SfxFilter* pFilter = aIter.First();
+ String sFilterMime( String::CreateFromAscii( "application/pdf" ));
+ while ( pFilter )
+ {
+ if( pFilter->GetMimeType() == sFilterMime && pFilter->CanExport() )
+ {
+ pSfxFlt = pFilter;
+ break;
+ }
+ pFilter = aIter.Next();
+ }
+
+ }
+ break;
case MM_DOCTYPE_WORD:
{
//the method SwIOSystemGetFilterOfFormat( ) returns the template filter
@@ -1112,7 +1130,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
++nTokenCount;
}
sAttach.SetToken( nTokenCount - 1, '.', lcl_GetExtensionForDocType(
- (ULONG)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos())));
+ (sal_uLong)m_aSendAsLB.GetEntryData(m_aSendAsLB.GetSelectEntryPos())));
m_aAttachmentED.SetText(sAttach);
}
else
@@ -1130,8 +1148,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
if(MM_DOCTYPE_TEXT == nDocType)
{
SwAsciiOptions aOpt;
- USHORT nAppScriptType = GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() );
- USHORT nWhich = GetWhichOfScript( RES_CHRATR_LANGUAGE, nAppScriptType);
+ sal_uInt16 nAppScriptType = GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
+ sal_uInt16 nWhich = GetWhichOfScript( RES_CHRATR_LANGUAGE, nAppScriptType);
aOpt.SetLanguage( ((SvxLanguageItem&)pTargetView->GetWrtShell().
GetDefault( nWhich )).GetLanguage());
aOpt.SetParaFlags( LINEEND_CR );
@@ -1152,6 +1170,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
uno::Reference< frame::XStorable > xStore( pTargetView->GetDocShell()->GetModel(), uno::UNO_QUERY);
xStore->storeToURL( sTargetTempURL, aValues );
+ //create the send dialog
+ SwSendMailDialog* pDlg = new SwSendMailDialog( pButton, rConfigItem );
pDlg->SetDocumentCount( nEnd );
pDlg->ShowDialog();
//help to force painting the dialog
@@ -1165,7 +1185,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
SwDocMergeInfo& rInfo = rConfigItem.GetDocumentMergeInfo(nDoc);
//now extract a document from the target document
- SfxObjectShellRef xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
+ // the shell will be closed at the end, but it is more safe to use SfxObjectShellLock here
+ SfxObjectShellLock xTempDocShell( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
xTempDocShell->DoInitNew( 0 );
SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 );
SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() );
@@ -1179,7 +1200,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
pTempView->GetDocShell()->LoadStylesFromFile(
sTargetTempURL, aOpt, sal_True );
pTargetView->GetWrtShell().PastePages(pTempView->GetWrtShell(),
- (USHORT)rInfo.nStartPageInTarget, (USHORT)rInfo.nEndPageInTarget );
+ (sal_uInt16)rInfo.nStartPageInTarget, (sal_uInt16)rInfo.nEndPageInTarget );
pTargetView->GetWrtShell().EndAction();
//then save it
@@ -1216,7 +1237,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
{
{
//read in the temporary file and use it as mail body
- SfxMedium aMedium( aName.GetValue(), STREAM_READ, TRUE);
+ SfxMedium aMedium( aName.GetValue(), STREAM_READ, sal_True);
SvStream* pInStream = aMedium.GetInStream();
if(pInStream)
pInStream->SetStreamCharSet( eEncoding );
diff --git a/sw/source/ui/dbui/mmoutputpage.src b/sw/source/ui/dbui/mmoutputpage.src
index efe84e34bfe9..cb3a635af5fb 100644
--- a/sw/source/ui/dbui/mmoutputpage.src
+++ b/sw/source/ui/dbui/mmoutputpage.src
@@ -48,24 +48,28 @@ TabPage DLG_MM_OUTPUT_PAGE
};
RadioButton RB_SAVESTARTDOC
{
+ HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SAVESTARTDOC";
Pos = MAP_APPFONT ( 45 , 40 ) ;
Size = MAP_APPFONT ( 209 , 10 ) ;
Text[ en-US ] = "~Save starting document";
};
RadioButton RB_SAVEMERGEDDOC
{
+ HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SAVEMERGEDDOC";
Pos = MAP_APPFONT ( 45 , 53 ) ;
Size = MAP_APPFONT ( 209 , 10 ) ;
Text[ en-US ] = "Save ~merged document" ;
};
RadioButton RB_PRINT
{
+ HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_PRINT";
Pos = MAP_APPFONT ( 45 , 66 ) ;
Size = MAP_APPFONT ( 209 , 10 ) ;
Text[ en-US ] = "~Print merged document";
};
RadioButton RB_SENDMAIL
{
+ HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SENDMAIL";
Pos = MAP_APPFONT ( 45 , 79 ) ;
Size = MAP_APPFONT ( 209 , 10 ) ;
Text[ en-US ] = "Send merged document as ~E-Mail";
@@ -77,30 +81,35 @@ TabPage DLG_MM_OUTPUT_PAGE
};
PushButton PB_SAVESTARTDOC
{
+ HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_SAVESTARTDOC";
Pos = MAP_APPFONT ( 55 , 108 ) ;
Size = MAP_APPFONT ( 100 , 14 ) ;
Text[ en-US ] = "Save starting ~document";
};
RadioButton RB_SAVEASONE
{
+ HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SAVEASONE";
Pos = MAP_APPFONT ( 45 , 109 ) ;
Size = MAP_APPFONT ( 150 , 10 ) ;
Text[ en-US ] = "S~ave as single document";
};
RadioButton RB_SAVEINDIVIDUAL
{
+ HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SAVEINDIVIDUAL";
Pos = MAP_APPFONT ( 45, 123 ) ;
Size = MAP_APPFONT ( 150 , 10 ) ;
Text[ en-US ] = "Sa~ve as individual documents";
};
RadioButton RB_FROM
{
+ HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_FROM";
Pos = MAP_APPFONT ( 45 , 137 ) ;
Size = MAP_APPFONT ( 30 , 10 ) ;
Text[ en-US ] = "~From";
};
NumericField NF_FROM
{
+ HelpID = "sw:NumericField:DLG_MM_OUTPUT_PAGE:NF_FROM";
Pos = MAP_APPFONT ( 78 , 136 ) ;
Size = MAP_APPFONT ( 20 , 10 ) ;
Border = TRUE;
@@ -120,6 +129,7 @@ TabPage DLG_MM_OUTPUT_PAGE
};
NumericField NF_TO
{
+ HelpID = "sw:NumericField:DLG_MM_OUTPUT_PAGE:NF_TO";
Pos = MAP_APPFONT ( 124 , 136 ) ;
Size = MAP_APPFONT ( 20 , 10 ) ;
Border = TRUE;
@@ -132,6 +142,7 @@ TabPage DLG_MM_OUTPUT_PAGE
};
PushButton PB_SAVENOW
{
+ HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_SAVENOW";
Pos = MAP_APPFONT ( 45 , 150 ) ;
Size = MAP_APPFONT ( 80 , 14 ) ;
Text[ en-US ] = "Save Do~cuments";
@@ -144,6 +155,7 @@ TabPage DLG_MM_OUTPUT_PAGE
};
ListBox LB_PRINT
{
+ HelpID = "sw:ListBox:DLG_MM_OUTPUT_PAGE:LB_PRINT";
Pos = MAP_APPFONT ( 45 , 109 ) ;
Size = MAP_APPFONT ( 147 , 50 ) ;
Border = TRUE;
@@ -152,18 +164,21 @@ TabPage DLG_MM_OUTPUT_PAGE
};
PushButton PB_PRINTERSETTINGS
{
+ HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_PRINTERSETTINGS";
Pos = MAP_APPFONT ( 198 , 108 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text[ en-US ] = "P~roperties...";
};
RadioButton RB_PRINTALL
{
+ HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_PRINTALL";
Pos = MAP_APPFONT ( 45 , 126 ) ;
Size = MAP_APPFONT ( 150 , 10 ) ;
Text[ en-US ] = "Print ~all documents";
};
PushButton PB_PRINTNOW
{
+ HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_PRINTNOW";
Pos = MAP_APPFONT ( 45 , 155 ) ;
Size = MAP_APPFONT ( 80 , 14 ) ;
Text[ en-US ] = "Prin~t Documents";
@@ -177,6 +192,7 @@ TabPage DLG_MM_OUTPUT_PAGE
};
ListBox LB_MAILTO
{
+ HelpID = "sw:ListBox:DLG_MM_OUTPUT_PAGE:LB_MAILTO";
Pos = MAP_APPFONT ( 45 , 109 ) ;
Size = MAP_APPFONT ( 147 , 50 ) ;
DropDown = TRUE;
@@ -184,6 +200,7 @@ TabPage DLG_MM_OUTPUT_PAGE
};
PushButton PB_COPYTO
{
+ HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_COPYTO";
Pos = MAP_APPFONT ( 198 , 108 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text[ en-US ] = "~Copy to...";
@@ -196,6 +213,7 @@ TabPage DLG_MM_OUTPUT_PAGE
};
Edit ED_SUBJECT
{
+ HelpID = "sw:Edit:DLG_MM_OUTPUT_PAGE:ED_SUBJECT";
Pos = MAP_APPFONT ( 45 , 125 ) ;
Size = MAP_APPFONT ( 147 , 12 ) ;
Border = TRUE;
@@ -208,6 +226,7 @@ TabPage DLG_MM_OUTPUT_PAGE
};
ListBox LB_SENDAS
{
+ HelpID = "sw:ListBox:DLG_MM_OUTPUT_PAGE:LB_SENDAS";
Pos = MAP_APPFONT ( 45 , 141 ) ;
Size = MAP_APPFONT (147 , 70 ) ;
DropDown = TRUE;
@@ -231,6 +250,7 @@ TabPage DLG_MM_OUTPUT_PAGE
};
PushButton PB_SENDAS
{
+ HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_SENDAS";
Pos = MAP_APPFONT ( 198 , 140 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text[ en-US ] = "Pr~operties...";
@@ -243,18 +263,21 @@ TabPage DLG_MM_OUTPUT_PAGE
};
Edit ED_ATTACHMENT
{
+ HelpID = "sw:Edit:DLG_MM_OUTPUT_PAGE:ED_ATTACHMENT";
Pos = MAP_APPFONT ( 45 , 168 ) ;
Size = MAP_APPFONT ( 147 , 12 ) ;
Border = TRUE;
};
RadioButton RB_SENDALL
{
+ HelpID = "sw:RadioButton:DLG_MM_OUTPUT_PAGE:RB_SENDALL";
Pos = MAP_APPFONT ( 45 , 184 ) ;
Size = MAP_APPFONT ( 153 , 10 ) ;
Text[ en-US ] = "S~end all documents";
};
PushButton PB_SENDDOCUMENTS
{
+ HelpID = "sw:PushButton:DLG_MM_OUTPUT_PAGE:PB_SENDDOCUMENTS";
Pos = MAP_APPFONT ( 45 , 212 ) ;
Size = MAP_APPFONT ( 80 , 14 ) ;
Text[ en-US ] = "Se~nd documents";
@@ -321,6 +344,7 @@ ModalDialog DLG_MM_COPYTO
};
Edit ED_CC
{
+ HelpID = "sw:Edit:DLG_MM_COPYTO:ED_CC";
Pos = MAP_APPFONT ( 40 , 15 ) ;
Size = MAP_APPFONT ( 204 , 12 ) ;
Border = TRUE;
@@ -333,6 +357,7 @@ ModalDialog DLG_MM_COPYTO
};
Edit ED_BCC
{
+ HelpID = "sw:Edit:DLG_MM_COPYTO:ED_BCC";
Pos = MAP_APPFONT ( 40 , 31 ) ;
Size = MAP_APPFONT ( 204 , 12 ) ;
Border = TRUE;
@@ -396,6 +421,7 @@ ModalDialog DLG_MM_SAVEWARNING
};
Edit ED_FILENAME
{
+ HelpID = "sw:Edit:DLG_MM_SAVEWARNING:ED_FILENAME";
Pos = MAP_APPFONT ( 40 , 50 ) ;
Size = MAP_APPFONT ( 154 , 12 ) ;
Border = TRUE;
@@ -439,6 +465,7 @@ ModalDialog DLG_MM_QUERY
};
Edit ED_TEXT
{
+ HelpID = "sw:Edit:DLG_MM_QUERY:ED_TEXT";
Pos = MAP_APPFONT ( 40 , 39 ) ;
Size = MAP_APPFONT ( 194 , 12 ) ;
Border = TRUE;
diff --git a/sw/source/ui/dbui/mmoutputtypepage.src b/sw/source/ui/dbui/mmoutputtypepage.src
index 3c776ff8fb59..f1b9fda069ce 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.src
+++ b/sw/source/ui/dbui/mmoutputtypepage.src
@@ -48,12 +48,14 @@ TabPage DLG_MM_OUTPUTTYPE_PAGE
};
RadioButton RB_LETTER
{
+ HelpID = "sw:RadioButton:DLG_MM_OUTPUTTYPE_PAGE:RB_LETTER";
Pos = MAP_APPFONT ( 12 , 43 ) ;
Size = MAP_APPFONT ( 240 , 10 ) ;
Text[ en-US ] = "~Letter";
};
RadioButton RB_MAIL
{
+ HelpID = "sw:RadioButton:DLG_MM_OUTPUTTYPE_PAGE:RB_MAIL";
Pos = MAP_APPFONT ( 12 , 57 ) ;
Size = MAP_APPFONT ( 240 , 10 ) ;
Text[ en-US ] = "~E-mail message";
diff --git a/sw/source/ui/dbui/mmpreparemergepage.src b/sw/source/ui/dbui/mmpreparemergepage.src
index eac858b1b814..a94c38bc40fa 100644
--- a/sw/source/ui/dbui/mmpreparemergepage.src
+++ b/sw/source/ui/dbui/mmpreparemergepage.src
@@ -57,6 +57,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE
PushButton PB_FIRST
{
+ HelpID = "sw:PushButton:DLG_MM_PREPAREMERGE_PAGE:PB_FIRST";
Pos = MAP_APPFONT ( 75 , 55 ) ;
Size = MAP_APPFONT ( 20 , 14 ) ;
Text = "|<" ;
@@ -64,6 +65,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE
};
PushButton PB_PREV
{
+ HelpID = "sw:PushButton:DLG_MM_PREPAREMERGE_PAGE:PB_PREV";
Pos = MAP_APPFONT ( 98 , 55 ) ;
Size = MAP_APPFONT ( 20 , 14 ) ;
Text = "<" ;
@@ -71,6 +73,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE
};
NumericField ED_RECORD
{
+ HelpID = "sw:NumericField:DLG_MM_PREPAREMERGE_PAGE:ED_RECORD";
Pos = MAP_APPFONT ( 121 , 56 ) ;
Size = MAP_APPFONT ( 20 , 12 ) ;
Border = TRUE ;
@@ -83,6 +86,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE
};
PushButton PB_NEXT
{
+ HelpID = "sw:PushButton:DLG_MM_PREPAREMERGE_PAGE:PB_NEXT";
Pos = MAP_APPFONT ( 144 , 55 ) ;
Size = MAP_APPFONT ( 20 , 14 ) ;
Text = ">" ;
@@ -90,6 +94,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE
};
PushButton PB_LAST
{
+ HelpID = "sw:PushButton:DLG_MM_PREPAREMERGE_PAGE:PB_LAST";
Pos = MAP_APPFONT ( 167 , 55 ) ;
Size = MAP_APPFONT ( 20 , 14 ) ;
Text = ">|" ;
@@ -97,6 +102,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE
};
CheckBox CB_EXCLUDE
{
+ HelpID = "sw:CheckBox:DLG_MM_PREPAREMERGE_PAGE:CB_EXCLUDE";
Pos = MAP_APPFONT ( 75, 77 ) ;
Size = MAP_APPFONT ( 179 , 10 ) ;
Text[ en-US ] = "E~xclude this recipient";
@@ -116,6 +122,7 @@ TabPage DLG_MM_PREPAREMERGE_PAGE
};
PushButton PB_EDIT
{
+ HelpID = "sw:PushButton:DLG_MM_PREPAREMERGE_PAGE:PB_EDIT";
Pos = MAP_APPFONT ( 90 , 185 ) ;
Size = MAP_APPFONT ( 80 , 14 ) ;
Text[ en-US ] = "~Edit Document...";
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index e3f4f3faa224..8d82198c0725 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -107,11 +107,11 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(Window* pParent,
static long nTabs[] = {3, 0, aSz.Width()/2, aSz.Width() };
m_aTableLB.SetTabs(&nTabs[0], MAP_PIXEL);
m_aTableLB.SetHelpId(HID_MM_SELECTDBTABLEDDIALOG_LISTBOX);
- m_aTableLB.SetWindowBits( WB_CLIPCHILDREN );
+ m_aTableLB.SetStyle( m_aTableLB.GetStyle() | WB_CLIPCHILDREN );
m_aTableLB.SetSpaceBetweenEntries(3);
m_aTableLB.SetSelectionMode( SINGLE_SELECTION );
m_aTableLB.SetDragDropMode( 0 );
- m_aTableLB.EnableAsyncDrag(FALSE);
+ m_aTableLB.EnableAsyncDrag(sal_False);
m_aPreviewPB.SetClickHdl(LINK(this, SwSelectDBTableDialog, PreviewHdl));
diff --git a/sw/source/ui/dbui/selectdbtabledialog.src b/sw/source/ui/dbui/selectdbtabledialog.src
index 271201463fef..157a05faf9f8 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.src
+++ b/sw/source/ui/dbui/selectdbtabledialog.src
@@ -54,6 +54,7 @@ ModalDialog DLG_MM_SELECTDBTABLEDDIALOG
};
PushButton PB_PREVIEW
{
+ HelpID = "sw:PushButton:DLG_MM_SELECTDBTABLEDDIALOG:PB_PREVIEW";
Pos = MAP_APPFONT ( 6 , 84 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Preview";
diff --git a/sw/source/ui/dbui/swdbtoolsclient.cxx b/sw/source/ui/dbui/swdbtoolsclient.cxx
index 351be634b75e..72e4ded03340 100644
--- a/sw/source/ui/dbui/swdbtoolsclient.cxx
+++ b/sw/source/ui/dbui/swdbtoolsclient.cxx
@@ -211,7 +211,7 @@ sal_Int32 SwDbtoolsClient::getDefaultNumberFormat(
return nRet;
}
-::rtl::OUString SwDbtoolsClient::getValue(
+::rtl::OUString SwDbtoolsClient::getFormattedValue(
const uno::Reference< beans::XPropertySet>& _rxColumn,
const uno::Reference< util::XNumberFormatter>& _rxFormatter,
const lang::Locale& _rLocale,
@@ -223,7 +223,7 @@ sal_Int32 SwDbtoolsClient::getDefaultNumberFormat(
getAccessTypeConversion();
rtl::OUString sRet;
if(xConversion.is())
- sRet = xConversion->getValue(_rxColumn, _rxFormatter, _rLocale, _rNullDate);
+ sRet = xConversion->getFormattedValue(_rxColumn, _rxFormatter, _rLocale, _rNullDate);
return sRet;
}
diff --git a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
index 28196d218516..5b5372308eb7 100644
--- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
@@ -81,7 +81,7 @@ struct SpellState
bool m_bLostFocus;
//restart and progress information
- USHORT m_SpellStartPosition;
+ sal_uInt16 m_SpellStartPosition;
bool m_bBodySpelled; //body already spelled
bool m_bOtherSpelled; //frames, footnotes, headers and footers spelled
bool m_bStartedInOther; //started the spelling insided of the _other_ area
@@ -150,7 +150,7 @@ void lcl_LeaveDrawText(SwWrtShell& rSh)
{
if(rSh.GetDrawView())
{
- rSh.GetDrawView()->SdrEndTextEdit( TRUE );
+ rSh.GetDrawView()->SdrEndTextEdit( sal_True );
Point aPt(LONG_MIN, LONG_MIN);
//go out of the frame
rSh.SelectObj(aPt, SW_LEAVE_FRAME);
@@ -161,7 +161,7 @@ void lcl_LeaveDrawText(SwWrtShell& rSh)
SwSpellDialogChildWindow::SwSpellDialogChildWindow (
Window* _pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo) :
svx::SpellDialogChildWindow (
@@ -185,7 +185,7 @@ SwSpellDialogChildWindow::~SwSpellDialogChildWindow ()
SfxChildWinInfo SwSpellDialogChildWindow::GetInfo (void) const
{
SfxChildWinInfo aInfo = svx::SpellDialogChildWindow::GetInfo();
- aInfo.bVisible = FALSE;
+ aInfo.bVisible = sal_False;
return aInfo;
}
@@ -245,7 +245,7 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck)
{
m_pSpellState->pOtherCursor = new SwPaM(*pWrtShell->GetCrsr()->GetPoint());
m_pSpellState->m_bStartedInOther = true;
- pWrtShell->SpellStart( DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_CURR, FALSE );
+ pWrtShell->SpellStart( DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_CURR, sal_False );
}
else
{
@@ -258,7 +258,7 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck)
*pWrtShell->GetDoc(),
*pCrsr->Start(), pCrsr->End());
}
- pWrtShell->SpellStart( DOCPOS_START, DOCPOS_END, DOCPOS_CURR, FALSE );
+ pWrtShell->SpellStart( DOCPOS_START, DOCPOS_END, DOCPOS_CURR, sal_False );
}
}
else
@@ -303,7 +303,7 @@ The code below would only be part of the solution.
//if there's any that has not been spelled yet
if(!m_pSpellState->m_bOtherSpelled && pWrtShell->HasOtherCnt())
{
- pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, FALSE );
+ pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, sal_False );
if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
{
pWrtShell->SpellEnd();
@@ -315,7 +315,7 @@ The code below would only be part of the solution.
//if no result has been found try at the body text - completely
if(!m_pSpellState->m_bBodySpelled && !aRet.size())
{
- pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, FALSE );
+ pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, sal_False );
if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
{
m_pSpellState->m_bBodySpelled = true;
@@ -344,7 +344,7 @@ The code below would only be part of the solution.
pWrtShell->SpellEnd();
delete m_pSpellState->pOtherCursor;
m_pSpellState->pOtherCursor = 0;
- pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART, FALSE );
+ pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART, sal_False );
pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn);
}
if(!aRet.size())
@@ -357,7 +357,7 @@ The code below would only be part of the solution.
//has the body been spelled?
if(!m_pSpellState->m_bBodySpelled)
{
- pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, FALSE );
+ pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, sal_False );
if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
{
m_pSpellState->m_bBodySpelled = true;
@@ -370,7 +370,7 @@ The code below would only be part of the solution.
m_pSpellState->m_bBodySpelled = true;
if(!m_pSpellState->m_bOtherSpelled && pWrtShell->HasOtherCnt())
{
- pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, FALSE );
+ pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, sal_False );
if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
{
pWrtShell->SpellEnd();
@@ -405,7 +405,7 @@ The code below would only be part of the solution.
if(m_pSpellState->m_xStartRange.is())
{
LockFocusNotification( true );
- USHORT nRet = QueryBox( GetWindow(), SW_RES(RID_QB_SPELL_CONTINUE)).Execute();
+ sal_uInt16 nRet = QueryBox( GetWindow(), SW_RES(RID_QB_SPELL_CONTINUE)).Execute();
if(RET_YES == nRet)
{
SwUnoInternalPaM aPam(*pWrtShell->GetDoc());
@@ -559,8 +559,8 @@ void SwSpellDialogChildWindow::GetFocus()
case SHELL_MODE_TABLE_LIST_TEXT:
{
SwPaM* pCursor = pWrtShell->GetCrsr();
- if(m_pSpellState->m_pPointNode != pCursor->GetNode(TRUE) ||
- m_pSpellState->m_pMarkNode != pCursor->GetNode(FALSE)||
+ if(m_pSpellState->m_pPointNode != pCursor->GetNode(sal_True) ||
+ m_pSpellState->m_pMarkNode != pCursor->GetNode(sal_False)||
m_pSpellState->m_nPointPos != pCursor->GetPoint()->nContent.GetIndex()||
m_pSpellState->m_nMarkPos != pCursor->GetMark()->nContent.GetIndex())
bInvalidate = true;
@@ -616,8 +616,8 @@ void SwSpellDialogChildWindow::LoseFocus()
{
//store a node pointer and a pam-position to be able to check on next GetFocus();
SwPaM* pCursor = pWrtShell->GetCrsr();
- m_pSpellState->m_pPointNode = pCursor->GetNode(TRUE);
- m_pSpellState->m_pMarkNode = pCursor->GetNode(FALSE);
+ m_pSpellState->m_pPointNode = pCursor->GetNode(sal_True);
+ m_pSpellState->m_pMarkNode = pCursor->GetNode(sal_False);
m_pSpellState->m_nPointPos = pCursor->GetPoint()->nContent.GetIndex();
m_pSpellState->m_nMarkPos = pCursor->GetMark()->nContent.GetIndex();
@@ -658,7 +658,7 @@ SwWrtShell* SwSpellDialogChildWindow::GetWrtShell_Impl()
SwView* pView = 0;
if(pDispatch)
{
- USHORT nShellIdx = 0;
+ sal_uInt16 nShellIdx = 0;
SfxShell* pShell;
while(0 != (pShell = pDispatch->GetShell(nShellIdx++)))
if(pShell->ISA(SwView))
@@ -846,13 +846,13 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh)
{
//now the current one has to be deselected
if(pCurrentTextObj)
- pDrView->SdrEndTextEdit( TRUE );
+ pDrView->SdrEndTextEdit( sal_True );
//and the found one should be activated
rSh.MakeVisible(pTextObj->GetLogicRect());
Point aTmp( 0,0 );
rSh.SelectObj( aTmp, 0, pTextObj );
SdrPageView* pPV = pDrView->GetSdrPageView();
- rView.BeginTextEdit( pTextObj, pPV, &rView.GetEditWin(), FALSE, TRUE );
+ rView.BeginTextEdit( pTextObj, pPV, &rView.GetEditWin(), sal_False, sal_True );
rView.AttrChangedNotify(&rSh);
bNextDoc = true;
}
diff --git a/sw/source/ui/dialog/abstract.cxx b/sw/source/ui/dialog/abstract.cxx
index ed4588fbbb37..0a651db3cb1f 100644
--- a/sw/source/ui/dialog/abstract.cxx
+++ b/sw/source/ui/dialog/abstract.cxx
@@ -61,14 +61,14 @@ SwInsertAbstractDlg::~SwInsertAbstractDlg()
{
}
-BYTE SwInsertAbstractDlg::GetLevel() const
+sal_uInt8 SwInsertAbstractDlg::GetLevel() const
{
- return static_cast< BYTE >(aLevelNF.GetValue() - 1);
+ return static_cast< sal_uInt8 >(aLevelNF.GetValue() - 1);
}
-BYTE SwInsertAbstractDlg::GetPara() const
+sal_uInt8 SwInsertAbstractDlg::GetPara() const
{
- return (BYTE) aParaNF.GetValue();
+ return (sal_uInt8) aParaNF.GetValue();
}
diff --git a/sw/source/ui/dialog/abstract.src b/sw/source/ui/dialog/abstract.src
index 20cbccd469f4..9d318cba23a9 100644
--- a/sw/source/ui/dialog/abstract.src
+++ b/sw/source/ui/dialog/abstract.src
@@ -50,6 +50,7 @@ ModalDialog DLG_INSERT_ABSTRACT
};
NumericField NF_LEVEL
{
+ HelpID = "sw:NumericField:DLG_INSERT_ABSTRACT:NF_LEVEL";
Border = TRUE ;
Pos = MAP_APPFONT ( 153 , 12 ) ;
Size = MAP_APPFONT ( 24 , 12 ) ;
@@ -71,6 +72,7 @@ ModalDialog DLG_INSERT_ABSTRACT
};
NumericField NF_PARA
{
+ HelpID = "sw:NumericField:DLG_INSERT_ABSTRACT:NF_PARA";
Border = TRUE ;
Pos = MAP_APPFONT ( 153 , 27 ) ;
Size = MAP_APPFONT ( 24 , 12 ) ;
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index 52cfdba6b2cd..eb82e9f2fff5 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -54,13 +54,15 @@
#include <dialog.hrc>
#include <ascfldlg.hrc>
+#include "vcl/metric.hxx"
+
using namespace ::com::sun::star;
const sal_Unicode cDialogExtraDataClose = '}';
const char sDialogImpExtraData[] = "EncImpDlg:{";
const char sDialogExpExtraData[] = "EncExpDlg:{";
-const USHORT nDialogExtraDataLen = 11; // 12345678901
+const sal_uInt16 nDialogExtraDataLen = 11; // 12345678901
SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
SvStream* pStream )
@@ -80,7 +82,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
aCancelPB( this, SW_RES( PB_CANCEL )),
aHelpPB( this, SW_RES( PB_HELP )),
sSystemCharSet( SW_RES( STR_SYS_CHARSET )),
- bSaveLineStatus( TRUE )
+ bSaveLineStatus( sal_True )
{
FreeResource();
@@ -89,7 +91,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
const String& rFindNm = String::CreateFromAscii(
pStream ? sDialogImpExtraData
: sDialogExpExtraData);
- USHORT nEnd, nStt = GetExtraData().Search( rFindNm );
+ sal_uInt16 nEnd, nStt = GetExtraData().Search( rFindNm );
if( STRING_NOTFOUND != nStt )
{
nStt += nDialogExtraDataLen;
@@ -107,8 +109,8 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
if( pStream )
{
char aBuffer[ 4098 ];
- ULONG nOldPos = pStream->Tell();
- ULONG nBytesRead = pStream->Read( aBuffer, 4096 );
+ sal_uLong nOldPos = pStream->Tell();
+ sal_uLong nBytesRead = pStream->Read( aBuffer, 4096 );
pStream->Seek( nOldPos );
if( nBytesRead <= 4096 )
@@ -119,13 +121,13 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
aBuffer[ nBytesRead + 2 ] = '0';
}
- BOOL bCR = FALSE, bLF = FALSE, bNullChar = FALSE;
- for( USHORT nCnt = 0; nCnt < nBytesRead; ++nCnt )
+ sal_Bool bCR = sal_False, bLF = sal_False, bNullChar = sal_False;
+ for( sal_uInt16 nCnt = 0; nCnt < nBytesRead; ++nCnt )
switch( aBuffer[ nCnt ] )
{
- case 0x0: bNullChar = TRUE; break;
- case 0xA: bLF = TRUE; break;
- case 0xD: bCR = TRUE; break;
+ case 0x0: bNullChar = sal_True; break;
+ case 0xA: bLF = sal_True; break;
+ case 0xD: bCR = sal_True; break;
case 0xC:
case 0x1A:
case 0x9: break;
@@ -153,9 +155,9 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
SwDoc* pDoc = rDocSh.GetDoc();
- USHORT nAppScriptType = GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() );
+ sal_uInt16 nAppScriptType = GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
{
- BOOL bDelPrinter = FALSE;
+ sal_Bool bDelPrinter = sal_False;
SfxPrinter* pPrt = pDoc ? pDoc->getPrinter(false) : 0;
if( !pPrt )
{
@@ -164,21 +166,31 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
0 );
pPrt = new SfxPrinter( pSet );
- bDelPrinter = TRUE;
+ bDelPrinter = sal_True;
+ }
+
+
+ // get the set of disctinct available family names
+ std::set< String > aFontNames;
+ int nFontNames = pPrt->GetDevFontCount();
+ for( int i = 0; i < nFontNames; i++ )
+ {
+ FontInfo aInf( pPrt->GetDevFont( i ) );
+ aFontNames.insert( aInf.GetName() );
}
- const USHORT nCount = pPrt->GetFontCount();
- for (USHORT i = 0; i < nCount; ++i)
+ // insert to listbox
+ for( std::set< String >::const_iterator it = aFontNames.begin();
+ it != aFontNames.end(); ++it )
{
- const String &rStr = pPrt->GetFont(i)->GetName();
- aFontLB.InsertEntry( rStr );
+ aFontLB.InsertEntry( *it );
}
if( !aOpt.GetFontName().Len() )
{
if(pDoc)
{
- USHORT nFontRes = RES_CHRATR_FONT;
+ sal_uInt16 nFontRes = RES_CHRATR_FONT;
if(SCRIPTTYPE_ASIAN == nAppScriptType)
nFontRes = RES_CHRATR_CJK_FONT;
else if(SCRIPTTYPE_COMPLEX == nAppScriptType)
@@ -189,7 +201,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
}
else
{
- USHORT nFontType = FONT_STANDARD;
+ sal_uInt16 nFontType = FONT_STANDARD;
if(SCRIPTTYPE_ASIAN == nAppScriptType)
nFontType = FONT_STANDARD_CJK;
else if(SCRIPTTYPE_COMPLEX == nAppScriptType)
@@ -209,7 +221,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
{
if(pDoc)
{
- USHORT nWhich = GetWhichOfScript( RES_CHRATR_LANGUAGE, nAppScriptType);
+ sal_uInt16 nWhich = GetWhichOfScript( RES_CHRATR_LANGUAGE, nAppScriptType);
aOpt.SetLanguage( ((SvxLanguageItem&)pDoc->
GetDefault( nWhich )).GetLanguage());
}
@@ -232,7 +244,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
}
}
- aLanguageLB.SetLanguageList( LANG_LIST_ALL, TRUE, FALSE );
+ aLanguageLB.SetLanguageList( LANG_LIST_ALL, sal_True, sal_False );
aLanguageLB.SelectLanguage( aOpt.GetLanguage() );
}
}
@@ -290,18 +302,18 @@ SwAsciiFilterDlg::~SwAsciiFilterDlg()
void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions )
{
- ULONG nCCode = aCharSetLB.GetSelectTextEncoding();
+ sal_uLong nCCode = aCharSetLB.GetSelectTextEncoding();
String sFont;
- ULONG nLng = 0;
+ sal_uLong nLng = 0;
if( aFontLB.IsVisible() )
{
sFont = aFontLB.GetSelectEntry();
- nLng = (ULONG)aLanguageLB.GetSelectLanguage();
+ nLng = (sal_uLong)aLanguageLB.GetSelectLanguage();
}
rOptions.SetFontName( sFont );
rOptions.SetCharSet( rtl_TextEncoding( nCCode ) );
- rOptions.SetLanguage( USHORT( nLng ) );
+ rOptions.SetLanguage( sal_uInt16( nLng ) );
rOptions.SetParaFlags( GetCRLF() );
// save the user settings
@@ -312,7 +324,7 @@ void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions )
const String& rFindNm = String::CreateFromAscii(
aFontLB.IsVisible() ? sDialogImpExtraData
: sDialogExpExtraData);
- USHORT nEnd, nStt = GetExtraData().Search( rFindNm );
+ sal_uInt16 nEnd, nStt = GetExtraData().Search( rFindNm );
if( STRING_NOTFOUND != nStt )
{
// called twice, so remove "old" settings
@@ -406,7 +418,7 @@ IMPL_LINK( SwAsciiFilterDlg, CharSetSelHdl, SvxTextEncodingBox*, pBox )
}
}
- bSaveLineStatus = FALSE;
+ bSaveLineStatus = sal_False;
if( eEnd != (LineEnd)-1 ) // changed?
{
if( eOldEnd != eEnd )
@@ -419,7 +431,7 @@ IMPL_LINK( SwAsciiFilterDlg, CharSetSelHdl, SvxTextEncodingBox*, pBox )
aCR_RB.Check( aCR_RB.GetSavedValue() );
aLF_RB.Check( aLF_RB.GetSavedValue() );
}
- bSaveLineStatus = TRUE;
+ bSaveLineStatus = sal_True;
if( nOldLng != nLng && aFontLB.IsVisible() )
aLanguageLB.SelectLanguage( nLng );
diff --git a/sw/source/ui/dialog/ascfldlg.src b/sw/source/ui/dialog/ascfldlg.src
index 6ef0ea42b656..78dc6df5ff15 100644
--- a/sw/source/ui/dialog/ascfldlg.src
+++ b/sw/source/ui/dialog/ascfldlg.src
@@ -50,6 +50,7 @@ ModalDialog DLG_ASCII_FILTER
};
ListBox LB_CHARSET
{
+ HelpID = "sw:ListBox:DLG_ASCII_FILTER:LB_CHARSET";
Pos = MAP_APPFONT ( 80 , 14 ) ;
Size = MAP_APPFONT ( 90 , 61 ) ;
TabStop = TRUE ;
@@ -64,6 +65,7 @@ ModalDialog DLG_ASCII_FILTER
};
ListBox LB_FONT
{
+ HelpID = "sw:ListBox:DLG_ASCII_FILTER:LB_FONT";
Pos = MAP_APPFONT ( 80 , 30 ) ;
Size = MAP_APPFONT ( 90 , 61 ) ;
TabStop = TRUE ;
@@ -78,6 +80,7 @@ ModalDialog DLG_ASCII_FILTER
};
ListBox LB_LANGUAGE
{
+ HelpID = "sw:ListBox:DLG_ASCII_FILTER:LB_LANGUAGE";
Pos = MAP_APPFONT ( 80 , 46 ) ;
Size = MAP_APPFONT ( 90 , 61 ) ;
TabStop = TRUE ;
@@ -92,6 +95,7 @@ ModalDialog DLG_ASCII_FILTER
};
RadioButton RB_CRLF
{
+ HelpID = "sw:RadioButton:DLG_ASCII_FILTER:RB_CRLF";
Pos = MAP_APPFONT ( 80 , 64 ) ;
Size = MAP_APPFONT ( 40 , 10 ) ;
TabStop = TRUE ;
@@ -100,6 +104,7 @@ ModalDialog DLG_ASCII_FILTER
};
RadioButton RB_CR
{
+ HelpID = "sw:RadioButton:DLG_ASCII_FILTER:RB_CR";
Pos = MAP_APPFONT ( 121 , 64 ) ;
Size = MAP_APPFONT ( 20 , 10 ) ;
// TabStop = TRUE ;
@@ -107,6 +112,7 @@ ModalDialog DLG_ASCII_FILTER
};
RadioButton RB_LF
{
+ HelpID = "sw:RadioButton:DLG_ASCII_FILTER:RB_LF";
Pos = MAP_APPFONT ( 155 , 64 ) ;
Size = MAP_APPFONT ( 20 , 10 ) ;
// TabStop = TRUE ;
diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx
index de4adfaba8d0..083a33a16b2d 100644
--- a/sw/source/ui/dialog/docstdlg.cxx
+++ b/sw/source/ui/dialog/docstdlg.cxx
@@ -61,25 +61,23 @@ SfxTabPage * SwDocStatPage::Create(Window *pParent, const SfxItemSet &rSet)
SwDocStatPage::SwDocStatPage(Window *pParent, const SfxItemSet &rSet) :
SfxTabPage (pParent, SW_RES(TP_DOC_STAT), rSet),
-
- aTableLbl (this, SW_RES( FT_TABLE )),
- aGrfLbl (this, SW_RES( FT_GRF )),
- aOLELbl (this, SW_RES( FT_OLE )),
aPageLbl (this, SW_RES( FT_PAGE )),
- aParaLbl (this, SW_RES( FT_PARA )),
- aWordLbl (this, SW_RES( FT_WORD )),
- aCharLbl (this, SW_RES( FT_CHAR )),
- aCharExclSpacesLbl (this, SW_RES( FT_CHAR_EXCL_SPACES )),
- aLineLbl (this, SW_RES( FT_LINE )),
-
+ aPageNo (this, SW_RES( FT_PAGE_COUNT )),
+ aTableLbl (this, SW_RES( FT_TABLE )),
aTableNo (this, SW_RES( FT_TABLE_COUNT)),
+ aGrfLbl (this, SW_RES( FT_GRF )),
aGrfNo (this, SW_RES( FT_GRF_COUNT )),
+ aOLELbl (this, SW_RES( FT_OLE )),
aOLENo (this, SW_RES( FT_OLE_COUNT )),
- aPageNo (this, SW_RES( FT_PAGE_COUNT )),
+ aParaLbl (this, SW_RES( FT_PARA )),
aParaNo (this, SW_RES( FT_PARA_COUNT )),
+ aWordLbl (this, SW_RES( FT_WORD )),
aWordNo (this, SW_RES( FT_WORD_COUNT )),
+ aCharLbl (this, SW_RES( FT_CHAR )),
aCharNo (this, SW_RES( FT_CHAR_COUNT )),
+ aCharExclSpacesLbl (this, SW_RES( FT_CHAR_EXCL_SPACES )),
aCharExclSpacesNo (this, SW_RES( FT_CHAR_COUNT_EXCL_SPACES )),
+ aLineLbl (this, SW_RES( FT_LINE )),
aLineNo (this, SW_RES( FT_LINE_COUNT )),
aUpdatePB (this, SW_RES( PB_PDATE ))
{
@@ -91,9 +89,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);
}
}
@@ -108,9 +106,9 @@ SwDocStatPage::SwDocStatPage(Window *pParent, const SfxItemSet &rSet) :
--------------------------------------------------------------------*/
-BOOL SwDocStatPage::FillItemSet(SfxItemSet & /*rSet*/)
+sal_Bool SwDocStatPage::FillItemSet(SfxItemSet & /*rSet*/)
{
- return FALSE;
+ return sal_False;
}
void SwDocStatPage::Reset(const SfxItemSet &/*rSet*/)
@@ -149,7 +147,7 @@ void SwDocStatPage::Update()
OSL_ENSURE( pSh, "Shell not found" );
- SwWait aWait( *pSh->GetDoc()->GetDocShell(), TRUE );
+ SwWait aWait( *pSh->GetDoc()->GetDocShell(), sal_True );
pSh->StartAction();
aDocStat = pSh->GetDoc()->GetDocStat();
pSh->GetDoc()->UpdateDocStat( aDocStat );
@@ -167,7 +165,7 @@ IMPL_LINK( SwDocStatPage, UpdateHdl, PushButton*, EMPTYARG)
SwDocShell* pDocShell = (SwDocShell*) SfxObjectShell::Current();
SwFEShell* pFEShell = pDocShell->GetFEShell();
if(pFEShell)
- aLineNo.SetText( String::CreateFromInt32( pFEShell->GetLineCount(FALSE)));
+ aLineNo.SetText( String::CreateFromInt32( pFEShell->GetLineCount(sal_False)));
//pButton->Disable();
return 0;
}
diff --git a/sw/source/ui/dialog/docstdlg.hrc b/sw/source/ui/dialog/docstdlg.hrc
index 2519bc405507..93ea9171ba60 100644
--- a/sw/source/ui/dialog/docstdlg.hrc
+++ b/sw/source/ui/dialog/docstdlg.hrc
@@ -32,7 +32,6 @@
#define FT_PARA 5
#define FT_WORD 6
#define FT_CHAR 9
-#define FT_CHAR_EXCL_SPACES 21
#define FT_TABLE_COUNT 10
#define FT_GRF_COUNT 11
#define FT_OLE_COUNT 12
@@ -40,10 +39,11 @@
#define FT_PARA_COUNT 14
#define FT_WORD_COUNT 15
#define FT_CHAR_COUNT 16
-#define FT_CHAR_COUNT_EXCL_SPACES 20
#define FT_LINE 17
#define FT_LINE_COUNT 18
#define PB_PDATE 19
+#define FT_CHAR_COUNT_EXCL_SPACES 20
+#define FT_CHAR_EXCL_SPACES 21
#define BT_OK 100
diff --git a/sw/source/ui/dialog/docstdlg.src b/sw/source/ui/dialog/docstdlg.src
index 08c28acb27af..71706177225e 100644
--- a/sw/source/ui/dialog/docstdlg.src
+++ b/sw/source/ui/dialog/docstdlg.src
@@ -153,6 +153,7 @@ TabPage TP_DOC_STAT
};
PushButton PB_PDATE
{
+ HelpID = "sw:PushButton:TP_DOC_STAT:PB_PDATE";
Pos = MAP_APPFONT ( 204 , 108 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Update" ;
diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx
index 692ed3c7c4c9..d6379ba4294b 100644
--- a/sw/source/ui/dialog/macassgn.cxx
+++ b/sw/source/ui/dialog/macassgn.cxx
@@ -64,9 +64,9 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType )
{
SfxEventNamesItem aItem(SID_EVENTCONFIG);
- BOOL bHtmlMode = FALSE;
- USHORT nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
- bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE;
+ sal_Bool bHtmlMode = sal_False;
+ sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
+ bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
switch( eType )
{
@@ -127,10 +127,10 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType )
}
-BOOL SwMacroAssignDlg::INetFmtDlg( Window* pParent, SwWrtShell& rSh,
+sal_Bool SwMacroAssignDlg::INetFmtDlg( Window* pParent, SwWrtShell& rSh,
SvxMacroItem*& rpINetItem )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SfxItemSet aSet( rSh.GetAttrPool(), RES_FRMMACRO, RES_FRMMACRO, SID_EVENTCONFIG, SID_EVENTCONFIG, 0 );
SvxMacroItem aItem( RES_FRMMACRO );
if( !rpINetItem )
@@ -149,13 +149,13 @@ BOOL SwMacroAssignDlg::INetFmtDlg( Window* pParent, SwWrtShell& rSh,
{
const SfxItemSet* pOutSet = pMacroDlg->GetOutputItemSet();
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pOutSet->GetItemState( RES_FRMMACRO, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pOutSet->GetItemState( RES_FRMMACRO, sal_False, &pItem ))
{
rpINetItem->SetMacroTable( ((SvxMacroItem*)pItem)->GetMacroTable() );
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sw/source/ui/dialog/makefile.mk b/sw/source/ui/dialog/makefile.mk
deleted file mode 100644
index 033703f686d0..000000000000
--- a/sw/source/ui/dialog/makefile.mk
+++ /dev/null
@@ -1,99 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=dialog
-LIBTARGET=no
-
-# future: DEMO\dialog.srs
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- abstract.src \
- ascfldlg.src \
- dialog.src \
- docstdlg.src \
- regionsw.src \
- wordcountdialog.src
-
-EXCEPTIONSFILES = \
- $(SLO)$/SwSpellDialogChildWindow.obj \
- $(SLO)$/abstract.obj \
- $(SLO)$/addrdlg.obj \
- $(SLO)$/ascfldlg.obj \
- $(SLO)$/docstdlg.obj \
- $(SLO)$/macassgn.obj \
- $(SLO)$/regionsw.obj \
- $(SLO)$/swabstdlg.obj \
- $(SLO)$/swdialmgr.obj \
- $(SLO)$/swdlgfact.obj \
- $(SLO)$/swuiexp.obj \
- $(SLO)$/uiregionsw.obj \
- $(SLO)$/wordcountdialog.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/swwrtshitem.obj
-
-LIB1TARGET = $(SLB)$/$(TARGET).lib
-
-LIB1OBJFILES = \
- $(SLO)$/regionsw.obj \
- $(SLO)$/swabstdlg.obj \
- $(SLO)$/SwSpellDialogChildWindow.obj \
- $(SLO)$/swwrtshitem.obj
-
-# $(SLO)$/macassgn.obj \
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-$(INCCOM)$/swuilib.hxx: makefile.mk
-.IF "$(GUI)"=="UNX"
- $(RM) $@
- echo \#define DLL_NAME \"libswui$(DLLPOSTFIX)$(DLLPOST)\" >$@
-.ELSE
- echo \#define DLL_NAME \"swui$(DLLPOSTFIX)$(DLLPOST)\" >$@
-.ENDIF
-
-$(SLO)$/swabstdlg.obj : $(INCCOM)$/swuilib.hxx
-
-
-
-
-
-
-
diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx
index 4a82fc4b016b..74f1e206c7f2 100644
--- a/sw/source/ui/dialog/regionsw.cxx
+++ b/sw/source/ui/dialog/regionsw.cxx
@@ -107,7 +107,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
const SfxPoolItem *pItem = 0;
String aTmpStr;
if ( SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_REGION_NAME, TRUE, &pItem) )
+ pSet->GetItemState(FN_PARAM_REGION_NAME, sal_True, &pItem) )
aTmpStr = rSh.GetUniqueSectionName(
&((const SfxStringItem *)pItem)->GetValue() );
else
@@ -117,36 +117,36 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
rReq.SetReturnValue(SfxStringItem(FN_INSERT_REGION, aTmpStr));
aSet.Put( *pSet );
- if(SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem)||
- SFX_ITEM_SET == pSet->GetItemState(FN_INSERT_REGION, FALSE, &pItem))
+ if(SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem)||
+ SFX_ITEM_SET == pSet->GetItemState(FN_INSERT_REGION, sal_False, &pItem))
{
SwFmtCol aCol;
SwRect aRect;
rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nWidth = aRect.Width();
- USHORT nCol = ((SfxUInt16Item *)pItem)->GetValue();
+ sal_uInt16 nCol = ((SfxUInt16Item *)pItem)->GetValue();
if(nCol)
{
- aCol.Init( nCol, 0, static_cast< USHORT >(nWidth) );
+ aCol.Init( nCol, 0, static_cast< sal_uInt16 >(nWidth) );
aSet.Put(aCol);
}
}
- else if(SFX_ITEM_SET == pSet->GetItemState(RES_COL, FALSE, &pItem))
+ else if(SFX_ITEM_SET == pSet->GetItemState(RES_COL, sal_False, &pItem))
{
aSet.Put(*pItem);
}
- const BOOL bHidden = SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_REGION_HIDDEN, TRUE, &pItem)?
- (BOOL)((const SfxBoolItem *)pItem)->GetValue():FALSE;
- const BOOL bProtect = SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_REGION_PROTECT, TRUE, &pItem)?
- (BOOL)((const SfxBoolItem *)pItem)->GetValue():FALSE;
+ const sal_Bool bHidden = SFX_ITEM_SET ==
+ pSet->GetItemState(FN_PARAM_REGION_HIDDEN, sal_True, &pItem)?
+ (sal_Bool)((const SfxBoolItem *)pItem)->GetValue():sal_False;
+ const sal_Bool bProtect = SFX_ITEM_SET ==
+ pSet->GetItemState(FN_PARAM_REGION_PROTECT, sal_True, &pItem)?
+ (sal_Bool)((const SfxBoolItem *)pItem)->GetValue():sal_False;
// #114856# edit in readonly sections
- const BOOL bEditInReadonly = SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_REGION_EDIT_IN_READONLY, TRUE, &pItem)?
- (BOOL)((const SfxBoolItem *)pItem)->GetValue():FALSE;
+ const sal_Bool bEditInReadonly = SFX_ITEM_SET ==
+ pSet->GetItemState(FN_PARAM_REGION_EDIT_IN_READONLY, sal_True, &pItem)?
+ (sal_Bool)((const SfxBoolItem *)pItem)->GetValue():sal_False;
aSection.SetProtectFlag(bProtect);
aSection.SetHidden(bHidden);
@@ -154,16 +154,16 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
aSection.SetEditInReadonlyFlag(bEditInReadonly);
if(SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_REGION_CONDITION, TRUE, &pItem))
+ pSet->GetItemState(FN_PARAM_REGION_CONDITION, sal_True, &pItem))
aSection.SetCondition(((const SfxStringItem *)pItem)->GetValue());
String aFile, aSub;
if(SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_1, TRUE, &pItem))
+ pSet->GetItemState(FN_PARAM_1, sal_True, &pItem))
aFile = ((const SfxStringItem *)pItem)->GetValue();
if(SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_3, TRUE, &pItem))
+ pSet->GetItemState(FN_PARAM_3, sal_True, &pItem))
aSub = ((const SfxStringItem *)pItem)->GetValue();
@@ -174,7 +174,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
sLinkFileName.SetToken(0, sfx2::cTokenSeperator,aFile);
if(SFX_ITEM_SET ==
- pSet->GetItemState(FN_PARAM_2, TRUE, &pItem))
+ pSet->GetItemState(FN_PARAM_2, sal_True, &pItem))
sLinkFileName.SetToken(1, sfx2::cTokenSeperator,
((const SfxStringItem *)pItem)->GetValue());
@@ -220,10 +220,10 @@ IMPL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSectionData*, pSect )
void SwBaseShell::EditRegionDialog(SfxRequest& rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxPoolItem* pItem = 0;
if(pArgs)
- pArgs->GetItemState(nSlot, FALSE, &pItem);
+ pArgs->GetItemState(nSlot, sal_False, &pItem);
SwWrtShell& rWrtShell = GetShell();
switch ( nSlot )
@@ -231,7 +231,7 @@ void SwBaseShell::EditRegionDialog(SfxRequest& rReq)
case FN_EDIT_REGION:
{
Window* pParentWin = &GetView().GetViewFrame()->GetWindow();
- BOOL bStart = TRUE;
+ sal_Bool bStart = sal_True;
if(bStart)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
diff --git a/sw/source/ui/dialog/regionsw.src b/sw/source/ui/dialog/regionsw.src
index ece6915f46e8..97d7dabdd1ec 100644
--- a/sw/source/ui/dialog/regionsw.src
+++ b/sw/source/ui/dialog/regionsw.src
@@ -87,7 +87,7 @@
*************************************************************************/
ModalDialog MD_EDIT_REGION
{
- HelpID = FN_EDIT_REGION ;
+ HelpID = CMD_FN_EDIT_REGION ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 316 , 185 ) ;
@@ -102,6 +102,7 @@ ModalDialog MD_EDIT_REGION
};
Edit ED_RANAME
{
+ HelpID = "sw:Edit:MD_EDIT_REGION:ED_RANAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 71 , 12 ) ;
@@ -124,6 +125,7 @@ ModalDialog MD_EDIT_REGION
};
TriStateBox CB_FILE
{
+ HelpID = "sw:TriStateBox:MD_EDIT_REGION:CB_FILE";
Pos = MAP_APPFONT ( 98 , 14 ) ;
Size = MAP_APPFONT ( 59 , 10 ) ;
TabStop = TRUE ;
@@ -131,6 +133,7 @@ ModalDialog MD_EDIT_REGION
};
CheckBox CB_DDE
{
+ HelpID = "sw:CheckBox:MD_EDIT_REGION:CB_DDE";
Pos = MAP_APPFONT ( 98 , 28 ) ;
Size = MAP_APPFONT ( 30 , 10 ) ;
Disable = TRUE ;
@@ -152,6 +155,7 @@ ModalDialog MD_EDIT_REGION
};
Edit ED_FILE
{
+ HelpID = "sw:Edit:MD_EDIT_REGION:ED_FILE";
Border = TRUE ;
Pos = MAP_APPFONT ( 165 , 42 ) ;
Size = MAP_APPFONT ( 68 , 12 ) ;
@@ -160,6 +164,7 @@ ModalDialog MD_EDIT_REGION
};
PushButton PB_FILE
{
+ HelpID = "sw:PushButton:MD_EDIT_REGION:PB_FILE";
Pos = MAP_APPFONT ( 239 , 42 ) ;
Size = MAP_APPFONT ( 12 , 12 ) ;
TabStop = TRUE ;
@@ -175,6 +180,7 @@ ModalDialog MD_EDIT_REGION
};
ComboBox LB_SUBREG
{
+ HelpID = "sw:ComboBox:MD_EDIT_REGION:LB_SUBREG";
Pos = MAP_APPFONT ( 165 , 57 ) ;
Size = MAP_APPFONT ( 68 , 50 ) ;
Disable = TRUE ;
@@ -191,6 +197,7 @@ ModalDialog MD_EDIT_REGION
};
TriStateBox CB_PROTECT
{
+ HelpID = "sw:TriStateBox:MD_EDIT_REGION:CB_PROTECT";
Pos = MAP_APPFONT ( 98 , 86 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
TabStop = TRUE ;
@@ -200,6 +207,7 @@ ModalDialog MD_EDIT_REGION
};
CheckBox CB_PASSWD
{
+ HelpID = "sw:CheckBox:MD_EDIT_REGION:CB_PASSWD";
Pos = MAP_APPFONT ( 107 , 100 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
TabStop = TRUE ;
@@ -207,6 +215,7 @@ ModalDialog MD_EDIT_REGION
};
PushButton PB_PASSWD
{
+ HelpID = "sw:PushButton:MD_EDIT_REGION:PB_PASSWD";
Pos = MAP_APPFONT ( 239 , 98 ) ;
Size = MAP_APPFONT ( 12 , 12 ) ;
TabStop = TRUE ;
@@ -221,6 +230,7 @@ ModalDialog MD_EDIT_REGION
};
TriStateBox CB_HIDE
{
+ HelpID = "sw:TriStateBox:MD_EDIT_REGION:CB_HIDE";
Pos = MAP_APPFONT ( 98 , 127 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
TabStop = TRUE ;
@@ -236,6 +246,7 @@ ModalDialog MD_EDIT_REGION
};
Edit ED_CONDITION
{
+ HelpID = "sw:Edit:MD_EDIT_REGION:ED_CONDITION";
Border = TRUE ;
Pos = MAP_APPFONT ( 165 , 141) ;
Size = MAP_APPFONT ( 86 , 12 ) ;
@@ -252,6 +263,7 @@ ModalDialog MD_EDIT_REGION
};
TriStateBox CB_EDIT_IN_READONLY
{
+ HelpID = "sw:TriStateBox:MD_EDIT_REGION:CB_EDIT_IN_READONLY";
Pos = MAP_APPFONT ( 98 , 170 ) ;
Size = MAP_APPFONT ( 156 , 10 ) ;
TabStop = TRUE ;
@@ -275,6 +287,7 @@ ModalDialog MD_EDIT_REGION
};
PushButton PB_OPTIONS
{
+ HelpID = "sw:PushButton:MD_EDIT_REGION:PB_OPTIONS";
Pos = MAP_APPFONT ( 263 , 40 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -283,6 +296,7 @@ ModalDialog MD_EDIT_REGION
};
PushButton CB_DISMISS
{
+ HelpID = "sw:PushButton:MD_EDIT_REGION:CB_DISMISS";
Pos = MAP_APPFONT ( 263 , 57 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Disable = TRUE ;
@@ -406,6 +420,7 @@ TabPage TP_INSERT_SECTION
};
ComboBox ED_RNAME
{
+ HelpID = "sw:ComboBox:TP_INSERT_SECTION:ED_RNAME";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 69 , 140 ) ;
TabStop = TRUE ;
@@ -421,6 +436,7 @@ TabPage TP_INSERT_SECTION
};
CheckBox CB_FILE
{
+ HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_FILE";
Pos = MAP_APPFONT ( 96 , 14 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
TabStop = TRUE ;
@@ -428,6 +444,7 @@ TabPage TP_INSERT_SECTION
};
CheckBox CB_DDE
{
+ HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_DDE";
Pos = MAP_APPFONT ( 96 , 28) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
Disable = TRUE ;
@@ -449,6 +466,7 @@ TabPage TP_INSERT_SECTION
};
Edit ED_FILE
{
+ HelpID = "sw:Edit:TP_INSERT_SECTION:ED_FILE";
Border = TRUE ;
Pos = MAP_APPFONT ( 160 , 42 ) ;
Size = MAP_APPFONT ( 76 , 12 ) ;
@@ -457,6 +475,7 @@ TabPage TP_INSERT_SECTION
};
PushButton PB_FILE
{
+ HelpID = "sw:PushButton:TP_INSERT_SECTION:PB_FILE";
Pos = MAP_APPFONT ( 239 , 42 ) ;
Size = MAP_APPFONT ( 12 , 12 ) ;
Disable = TRUE ;
@@ -472,6 +491,7 @@ TabPage TP_INSERT_SECTION
};
ComboBox LB_SUBREG
{
+ HelpID = "sw:ComboBox:TP_INSERT_SECTION:LB_SUBREG";
Pos = MAP_APPFONT ( 160 , 58 ) ;
Size = MAP_APPFONT ( 76 , 50 ) ;
DropDown = TRUE ;
@@ -488,6 +508,7 @@ TabPage TP_INSERT_SECTION
};
CheckBox CB_PROTECT
{
+ HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_PROTECT";
Pos = MAP_APPFONT ( 96 , 87 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
TabStop = TRUE ;
@@ -495,6 +516,7 @@ TabPage TP_INSERT_SECTION
};
CheckBox CB_PASSWD
{
+ HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_PASSWD";
Pos = MAP_APPFONT ( 105 , 101 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
TabStop = TRUE ;
@@ -502,6 +524,7 @@ TabPage TP_INSERT_SECTION
};
PushButton PB_PASSWD
{
+ HelpID = "sw:PushButton:TP_INSERT_SECTION:PB_PASSWD";
Pos = MAP_APPFONT ( 239 , 99 ) ;
Size = MAP_APPFONT ( 12 , 12 ) ;
TabStop = TRUE ;
@@ -516,6 +539,7 @@ TabPage TP_INSERT_SECTION
};
CheckBox CB_HIDE
{
+ HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_HIDE";
Pos = MAP_APPFONT ( 96 , 128 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
CB_HIDE_TEXT
@@ -529,6 +553,7 @@ TabPage TP_INSERT_SECTION
};
Edit ED_CONDITION
{
+ HelpID = "sw:Edit:TP_INSERT_SECTION:ED_CONDITION";
Border = TRUE ;
Pos = MAP_APPFONT ( 160 , 142 ) ;
Size = MAP_APPFONT ( 91 , 12 ) ;
@@ -545,6 +570,7 @@ TabPage TP_INSERT_SECTION
};
CheckBox CB_EDIT_IN_READONLY
{
+ HelpID = "sw:CheckBox:TP_INSERT_SECTION:CB_EDIT_IN_READONLY";
Pos = MAP_APPFONT ( 96 , 170 ) ;
Size = MAP_APPFONT ( 158 , 10 ) ;
CB_EDIT_IN_READONLY_TEXT
@@ -609,6 +635,7 @@ TabPage TP_SECTION_FTNENDNOTES
};
CheckBox CB_FTN_AT_TXTEND
{
+ HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_FTN_AT_TXTEND";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
TabStop = TRUE ;
@@ -617,6 +644,7 @@ TabPage TP_SECTION_FTNENDNOTES
};
CheckBox CB_FTN_NUM
{
+ HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_FTN_NUM";
Pos = MAP_APPFONT ( 18 , 29 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
TabStop = TRUE ;
@@ -631,6 +659,7 @@ TabPage TP_SECTION_FTNENDNOTES
};
NumericField FLD_FTN_OFFSET
{
+ HelpID = "sw:NumericField:TP_SECTION_FTNENDNOTES:FLD_FTN_OFFSET";
Pos = MAP_APPFONT ( 90 , 44 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
Spin = TRUE ;
@@ -643,6 +672,7 @@ TabPage TP_SECTION_FTNENDNOTES
};
CheckBox CB_FTN_NUM_FMT
{
+ HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_FTN_NUM_FMT";
Pos = MAP_APPFONT ( 24 , 61 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
TabStop = TRUE ;
@@ -657,6 +687,7 @@ TabPage TP_SECTION_FTNENDNOTES
};
Edit ED_FTN_PREFIX
{
+ HelpID = "sw:Edit:TP_SECTION_FTNENDNOTES:ED_FTN_PREFIX";
Border = TRUE ;
Pos = MAP_APPFONT ( 90 , 74 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
@@ -666,6 +697,7 @@ TabPage TP_SECTION_FTNENDNOTES
};
ListBox LB_FTN_NUMVIEW
{
+ HelpID = "sw:ListBox:TP_SECTION_FTNENDNOTES:LB_FTN_NUMVIEW";
Border = TRUE ;
Pos = MAP_APPFONT ( 123 , 74 ) ;
Size = MAP_APPFONT ( 62 , 50 ) ;
@@ -682,6 +714,7 @@ TabPage TP_SECTION_FTNENDNOTES
};
Edit ED_FTN_SUFFIX
{
+ HelpID = "sw:Edit:TP_SECTION_FTNENDNOTES:ED_FTN_SUFFIX";
Border = TRUE ;
Pos = MAP_APPFONT ( 219 , 74 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
@@ -700,6 +733,7 @@ TabPage TP_SECTION_FTNENDNOTES
};
CheckBox CB_END_AT_TXTEND
{
+ HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_END_AT_TXTEND";
Pos = MAP_APPFONT ( 12 , 103 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
TabStop = TRUE ;
@@ -707,6 +741,7 @@ TabPage TP_SECTION_FTNENDNOTES
};
CheckBox CB_END_NUM
{
+ HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_END_NUM";
Pos = MAP_APPFONT ( 16 , 118 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
TabStop = TRUE ;
@@ -721,6 +756,7 @@ TabPage TP_SECTION_FTNENDNOTES
};
NumericField FLD_END_OFFSET
{
+ HelpID = "sw:NumericField:TP_SECTION_FTNENDNOTES:FLD_END_OFFSET";
Pos = MAP_APPFONT ( 90 , 133 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
Spin = TRUE ;
@@ -733,6 +769,7 @@ TabPage TP_SECTION_FTNENDNOTES
};
CheckBox CB_END_NUM_FMT
{
+ HelpID = "sw:CheckBox:TP_SECTION_FTNENDNOTES:CB_END_NUM_FMT";
Pos = MAP_APPFONT ( 24 , 150 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
TabStop = TRUE ;
@@ -748,6 +785,7 @@ TabPage TP_SECTION_FTNENDNOTES
};
Edit ED_END_PREFIX
{
+ HelpID = "sw:Edit:TP_SECTION_FTNENDNOTES:ED_END_PREFIX";
Border = TRUE ;
Pos = MAP_APPFONT ( 90 , 163 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
@@ -757,6 +795,7 @@ TabPage TP_SECTION_FTNENDNOTES
};
ListBox LB_END_NUMVIEW
{
+ HelpID = "sw:ListBox:TP_SECTION_FTNENDNOTES:LB_END_NUMVIEW";
Border = TRUE ;
Pos = MAP_APPFONT ( 123 , 163 ) ;
Size = MAP_APPFONT ( 62 , 50 ) ;
@@ -774,6 +813,7 @@ TabPage TP_SECTION_FTNENDNOTES
};
Edit ED_END_SUFFIX
{
+ HelpID = "sw:Edit:TP_SECTION_FTNENDNOTES:ED_END_SUFFIX";
Border = TRUE ;
Pos = MAP_APPFONT ( 219 , 163 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
@@ -805,6 +845,7 @@ TabPage TP_SECTION_INDENTS
};
MetricField MF_BEFORE
{
+ HelpID = "sw:MetricField:TP_SECTION_INDENTS:MF_BEFORE";
Border = TRUE ;
Pos = MAP_APPFONT ( 135 , 14 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -828,6 +869,7 @@ TabPage TP_SECTION_INDENTS
};
MetricField MF_AFTER
{
+ HelpID = "sw:MetricField:TP_SECTION_INDENTS:MF_AFTER";
Border = TRUE ;
Pos = MAP_APPFONT ( 135 , 30 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
diff --git a/sw/source/ui/dialog/swabstdlg.cxx b/sw/source/ui/dialog/swabstdlg.cxx
index 51f657d5df13..1f97f9ddf717 100644
--- a/sw/source/ui/dialog/swabstdlg.cxx
+++ b/sw/source/ui/dialog/swabstdlg.cxx
@@ -30,10 +30,10 @@
#include "precompiled_sw.hxx"
#include "swabstdlg.hxx"
-#include "swuilib.hxx"
#include <osl/module.hxx>
#include <tools/string.hxx>
+#include <vcl/unohelp.hxx>
typedef SwAbstractDialogFactory* (__LOADONCALLAPI *SwFuncPtrCreateDialogFactory)();
@@ -43,7 +43,8 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create()
{
SwFuncPtrCreateDialogFactory fp = 0;
static ::osl::Module aDialogLibrary;
- if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( RTL_CONSTASCII_USTRINGPARAM( DLL_NAME ) ) ) )
+ static const ::rtl::OUString sLibName(::vcl::unohelper::CreateLibraryName("swui", sal_True));
+ if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, String( sLibName ) ) )
fp = ( SwAbstractDialogFactory* (__LOADONCALLAPI*)() )
aDialogLibrary.getFunctionSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreateDialogFactory")));
if ( fp )
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index afdcc1d89401..e12ca876d899 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -144,7 +144,7 @@ IMPL_ABSTDLG_BASE(AbstractInsertSectionTabDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractIndexMarkFloatDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractAuthMarkFloatDlg_Impl);
-void AbstractTabDialog_Impl::SetCurPageId( USHORT nId )
+void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
{
pDlg->SetCurPageId( nId );
}
@@ -154,7 +154,7 @@ const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const
return pDlg->GetOutputItemSet();
}
-const USHORT* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
+const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return pDlg->GetInputRanges( pItem );
}
@@ -180,12 +180,11 @@ void AbstractSwWordCountDialog_Impl::SetValues(const SwDocStat& rCurrent, con
pDlg->SetValues(rCurrent, rDoc);
}
-BYTE AbstractSwInsertAbstractDlg_Impl::GetLevel() const
+sal_uInt8 AbstractSwInsertAbstractDlg_Impl::GetLevel() const
{
return pDlg->GetLevel();
}
-
-BYTE AbstractSwInsertAbstractDlg_Impl::GetPara() const
+sal_uInt8 AbstractSwInsertAbstractDlg_Impl::GetPara() const
{
return pDlg->GetPara();
}
@@ -221,12 +220,12 @@ String AbstractSwBreakDlg_Impl::GetTemplateName()
return pDlg->GetTemplateName();
}
-USHORT AbstractSwBreakDlg_Impl:: GetKind()
+sal_uInt16 AbstractSwBreakDlg_Impl:: GetKind()
{
return pDlg->GetKind();
}
-USHORT AbstractSwBreakDlg_Impl:: GetPageNumber()
+sal_uInt16 AbstractSwBreakDlg_Impl:: GetPageNumber()
{
return pDlg->GetPageNumber();
}
@@ -245,7 +244,7 @@ void AbstractSwInsertDBColAutoPilot_Impl::DataToDoc( const uno::Sequence< uno::A
pDlg->DataToDoc(rSelection, rxSource, xConnection, xResultSet);
}
-ByteString AbstractDropDownFieldDialog_Impl::GetWindowState( ULONG nMask ) const
+ByteString AbstractDropDownFieldDialog_Impl::GetWindowState( sal_uLong nMask ) const
{
return pDlg->GetWindowState(nMask);
}
@@ -255,7 +254,7 @@ void AbstractDropDownFieldDialog_Impl::SetWindowState( const ByteString& r
pDlg->SetWindowState(rStr);
}
-void AbstractSwLabDlg_Impl::SetCurPageId( USHORT nId )
+void AbstractSwLabDlg_Impl::SetCurPageId( sal_uInt16 nId )
{
pDlg->SetCurPageId( nId );
}
@@ -265,7 +264,7 @@ const SfxItemSet* AbstractSwLabDlg_Impl::GetOutputItemSet() const
return pDlg->GetOutputItemSet();
}
-const USHORT* AbstractSwLabDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
+const sal_uInt16* AbstractSwLabDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return pDlg->GetInputRanges( pItem );
}
@@ -300,12 +299,12 @@ void AbstractSwSelGlossaryDlg_Impl::InsertGlos(const String &rRegion, const Stri
pDlg->InsertGlos( rRegion, rGlosName );
}
-USHORT AbstractSwSelGlossaryDlg_Impl::GetSelectedIdx() const
+sal_uInt16 AbstractSwSelGlossaryDlg_Impl::GetSelectedIdx() const
{
return pDlg->GetSelectedIdx();
}
-void AbstractSwSelGlossaryDlg_Impl::SelectEntryPos(USHORT nIdx)
+void AbstractSwSelGlossaryDlg_Impl::SelectEntryPos(sal_uInt16 nIdx)
{
pDlg->SelectEntryPos( nIdx );
}
@@ -315,7 +314,7 @@ void AbstractSwAutoFormatDlg_Impl::FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill
pDlg->FillAutoFmtOfIndex(rToFill);
}
-void AbstractSwFldDlg_Impl::SetCurPageId( USHORT nId )
+void AbstractSwFldDlg_Impl::SetCurPageId( sal_uInt16 nId )
{
pDlg->SetCurPageId( nId );
}
@@ -325,7 +324,7 @@ const SfxItemSet* AbstractSwFldDlg_Impl::GetOutputItemSet() const
return pDlg->GetOutputItemSet();
}
-const USHORT* AbstractSwFldDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
+const sal_uInt16* AbstractSwFldDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return pDlg->GetInputRanges( pItem );
}
@@ -345,7 +344,7 @@ String AbstractSwFldDlg_Impl::GetText() const
return pDlg->GetText();
}
-void AbstractSwFldDlg_Impl::Start( BOOL bShowl )
+void AbstractSwFldDlg_Impl::Start( sal_Bool bShowl )
{
pDlg->Start( bShowl );
}
@@ -369,8 +368,7 @@ Window* AbstractSwFldDlg_Impl::GetWindow()
{
return (Window*)pDlg;
}
-
-void AbstractSwFldDlg_Impl::ShowPage( USHORT nId )
+void AbstractSwFldDlg_Impl::ShowPage( sal_uInt16 nId )
{
pDlg->ShowPage(nId);
}
@@ -387,7 +385,7 @@ void AbstractSwRenameXNamedDlg_Impl::SetAlternativeAccess(
pDlg->SetAlternativeAccess( xSecond, xThird);
}
-void AbstractSwModalRedlineAcceptDlg_Impl::AcceptAll( BOOL bAccept )
+void AbstractSwModalRedlineAcceptDlg_Impl::AcceptAll( sal_Bool bAccept )
{
pDlg->AcceptAll( bAccept);
}
@@ -407,7 +405,7 @@ void AbstractFldInputDlg_Impl::SetWindowState( const ByteString& rStr )
pDlg->SetWindowState( rStr );
}
-ByteString AbstractFldInputDlg_Impl::GetWindowState( ULONG nMask ) const
+ByteString AbstractFldInputDlg_Impl::GetWindowState( sal_uLong nMask ) const
{
return pDlg->GetWindowState( nMask );
}
@@ -416,8 +414,7 @@ String AbstractInsFootNoteDlg_Impl::GetFontName()
{
return pDlg->GetFontName();
}
-
-BOOL AbstractInsFootNoteDlg_Impl::IsEndNote()
+sal_Bool AbstractInsFootNoteDlg_Impl::IsEndNote()
{
return pDlg->IsEndNote();
}
@@ -426,10 +423,9 @@ String AbstractInsFootNoteDlg_Impl::GetStr()
{
return pDlg->GetStr();
}
-
-void AbstractInsFootNoteDlg_Impl::SetHelpId( ULONG nHelpId )
+void AbstractInsFootNoteDlg_Impl::SetHelpId( const rtl::OString& sHelpId )
{
- pDlg->SetHelpId( nHelpId );
+ pDlg->SetHelpId( sHelpId );
}
void AbstractInsFootNoteDlg_Impl::SetText( const XubString& rStr )
@@ -441,18 +437,16 @@ String AbstractInsertGrfRulerDlg_Impl::GetGraphicName()
{
return pDlg->GetGraphicName();
}
-
-BOOL AbstractInsertGrfRulerDlg_Impl::IsSimpleLine()
+sal_Bool AbstractInsertGrfRulerDlg_Impl::IsSimpleLine()
{
return pDlg->IsSimpleLine();
}
-
-BOOL AbstractInsertGrfRulerDlg_Impl::HasImages() const
+sal_Bool AbstractInsertGrfRulerDlg_Impl::HasImages() const
{
return pDlg->HasImages();
}
-void AbstractInsTableDlg_Impl::GetValues( String& rName, USHORT& rRow, USHORT& rCol,
+void AbstractInsTableDlg_Impl::GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol,
SwInsertTableOptions& rInsTblFlags, String& rTableAutoFmtName,
SwTableAutoFmt *& prTAFmt )
{
@@ -468,23 +462,20 @@ String AbstractJavaEditDialog_Impl::GetType()
{
return pDlg->GetType();
}
-
-BOOL AbstractJavaEditDialog_Impl::IsUrl()
+sal_Bool AbstractJavaEditDialog_Impl::IsUrl()
{
return pDlg->IsUrl();
}
-
-BOOL AbstractJavaEditDialog_Impl::IsNew()
+sal_Bool AbstractJavaEditDialog_Impl::IsNew()
{
return pDlg->IsNew();
}
-
-BOOL AbstractJavaEditDialog_Impl::IsUpdate()
+sal_Bool AbstractJavaEditDialog_Impl::IsUpdate()
{
return pDlg->IsUpdate();
}
-USHORT AbstractMailMergeDlg_Impl::GetMergeType()
+sal_uInt16 AbstractMailMergeDlg_Impl::GetMergeType()
{
return pDlg->GetMergeType();
}
@@ -504,12 +495,12 @@ uno::Reference< sdbc::XResultSet> AbstractMailMergeDlg_Impl::GetResultSet() cons
return pDlg->GetResultSet();
}
-BOOL AbstractMailMergeCreateFromDlg_Impl::IsThisDocument() const
+sal_Bool AbstractMailMergeCreateFromDlg_Impl::IsThisDocument() const
{
return pDlg->IsThisDocument();
}
-BOOL AbstractMailMergeFieldConnectionsDlg_Impl::IsUseExistingConnections() const
+sal_Bool AbstractMailMergeFieldConnectionsDlg_Impl::IsUseExistingConnections() const
{
return pDlg->IsUseExistingConnections();
}
@@ -607,8 +598,7 @@ const String& AbstractMailMergeWizard_Impl::GetReloadDocument() const
{
return pDlg->GetReloadDocument();
}
-
-BOOL AbstractMailMergeWizard_Impl::ShowPage( USHORT nLevel )
+sal_Bool AbstractMailMergeWizard_Impl::ShowPage( sal_uInt16 nLevel )
{
return pDlg->skipUntil(nLevel);
}
@@ -754,7 +744,7 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg( SwView&
SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, int nResId, // add for SwCharDlg
- const String* pFmtStr , BOOL bIsDrwTxtDlg )
+ const String* pFmtStr , sal_Bool bIsDrwTxtDlg )
{
SfxTabDialog* pDlg=NULL;
@@ -849,7 +839,7 @@ SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwFootNoteOptionDlg(
}
AbstractDropDownFieldDialog * SwAbstractDialogFactory_Impl::CreateDropDownFieldDialog ( Window *pParent, SwWrtShell &rSh, //add for DropDownFieldDialog
- SwField* pField,int nResId, BOOL bNextButton )
+ SwField* pField,int nResId, sal_Bool bNextButton )
{
sw::DropDownFieldDialog* pDlg=NULL;
switch ( nResId )
@@ -869,7 +859,7 @@ AbstractDropDownFieldDialog * SwAbstractDialogFactory_Impl::CreateDropDownField
SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet,
SwWrtShell* pWrtSh, Printer* pPrt,
- BOOL bInsert,int nResId ) //add for SwEnvDlg
+ sal_Bool bInsert,int nResId ) //add for SwEnvDlg
{
SfxTabDialog* pDlg=NULL;
switch ( nResId )
@@ -888,7 +878,7 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwEnvDlg ( Window* pPa
}
AbstractSwLabDlg* SwAbstractDialogFactory_Impl::CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg
- SwNewDBMgr* pNewDBMgr, BOOL bLabel,int nResId )
+ SwNewDBMgr* pNewDBMgr, sal_Bool bLabel,int nResId )
{
SwLabDlg* pDlg=NULL;
switch ( nResId )
@@ -914,10 +904,10 @@ SwLabDlgMethod SwAbstractDialogFactory_Impl::GetSwLabDlgStaticMethod ()
SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwParaDlg ( Window *pParent, SwView& rVw,
const SfxItemSet& rCoreSet ,
- BYTE nDialogMode,
+ sal_uInt8 nDialogMode,
int nResId,
const String *pCollName,
- BOOL bDraw , UINT16 nDefPage)
+ sal_Bool bDraw , sal_uInt16 nDefPage)
{
SfxTabDialog* pDlg=NULL;
switch ( nResId )
@@ -988,7 +978,7 @@ AbstractSwSelGlossaryDlg * SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg
AbstractSwAutoFormatDlg * SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg( Window* pParent, SwWrtShell* pShell,
int nResId,
- BOOL bSetAutoFmt,
+ sal_Bool bSetAutoFmt,
const SwTableAutoFmt* pSelFmt )
{
SwAutoFormatDlg* pDlg=NULL;
@@ -1007,7 +997,7 @@ AbstractSwAutoFormatDlg * SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg( W
return 0;
}
-SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, USHORT nType,int nResId )
+SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, sal_uInt16 nType,int nResId )
{
SfxModalDialog* pDlg=NULL;
switch ( nResId )
@@ -1024,7 +1014,7 @@ SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg (Window* pPa
return 0;
}
-SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode, int nResId )
+SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode, int nResId )
{
SfxModalDialog* pDlg=NULL;
switch ( nResId )
@@ -1150,7 +1140,7 @@ AbstractSwModalRedlineAcceptDlg * SwAbstractDialogFactory_Impl::CreateSwModalRed
}
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwVclDialog( int nResId,
- Window* pParent, BOOL& rWithPrev ) //add for SwMergeTblDlg
+ Window* pParent, sal_Bool& rWithPrev ) //add for SwMergeTblDlg
{
Dialog* pDlg=NULL;
switch ( nResId )
@@ -1169,10 +1159,10 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwVclDialog( int nResId,
SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrmTabDialog( int nResId,
SfxViewFrame *pFrame, Window *pParent,
const SfxItemSet& rCoreSet,
- BOOL bNewFrm,
- USHORT nResType,
- BOOL bFmt,
- UINT16 nDefPage,
+ sal_Bool bNewFrm,
+ sal_uInt16 nResType,
+ sal_Bool bFmt,
+ sal_uInt16 nDefPage,
const String* pFmtStr ) //add for SwFrmDlg
{
SfxTabDialog* pDlg=NULL;
@@ -1195,10 +1185,10 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrmTabDialog( int nRes
SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateTemplateDialog( int nResId,
Window* pParent,
SfxStyleSheetBase& rBase,
- USHORT nRegion,
- BOOL bColumn,
+ sal_uInt16 nRegion,
+ sal_Bool bColumn,
SwWrtShell* pActShell,
- BOOL bNew ) //add for SwTemplateDlg
+ sal_Bool bNew ) //add for SwTemplateDlg
{
SfxTabDialog* pDlg=NULL;
switch ( nResId )
@@ -1236,7 +1226,7 @@ AbstractGlossaryDlg* SwAbstractDialogFactory_Impl::CreateGlossaryDlg( int nResId
AbstractFldInputDlg* SwAbstractDialogFactory_Impl::CreateFldInputDlg( int nResId,
Window *pParent, SwWrtShell &rSh,
- SwField* pField, BOOL bNextButton ) //add for SwFldInputDlg
+ SwField* pField, sal_Bool bNextButton ) //add for SwFldInputDlg
{
SwFldInputDlg* pDlg=NULL;
switch ( nResId )
@@ -1253,7 +1243,7 @@ AbstractFldInputDlg* SwAbstractDialogFactory_Impl::CreateFldInputDlg( int nResId
}
AbstractInsFootNoteDlg* SwAbstractDialogFactory_Impl::CreateInsFootNoteDlg( int nResId,
- Window * pParent, SwWrtShell &rSh, BOOL bEd ) //add for SwInsFootNoteDlg
+ Window * pParent, SwWrtShell &rSh, sal_Bool bEd ) //add for SwInsFootNoteDlg
{
SwInsFootNoteDlg* pDlg=NULL;
switch ( nResId )
@@ -1278,7 +1268,7 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateTitlePageDlg ( Window *p
}
VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateVclSwViewDialog( int nResId,
- SwView& rView, BOOL /*bCol*/ ) //add for SwInsRowColDlg, SwLineNumberingDlg
+ SwView& rView, sal_Bool /*bCol*/ ) //add for SwInsRowColDlg, SwLineNumberingDlg
{
Dialog* pDlg=NULL;
switch ( nResId )
@@ -1446,8 +1436,8 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwTabDialog( int nResI
AbstractMultiTOXTabDialog * SwAbstractDialogFactory_Impl::CreateMultiTOXTabDialog( int nResId,
Window* pParent, const SfxItemSet& rSet,
SwWrtShell &rShell,
- SwTOXBase* pCurTOX, USHORT nToxType,
- BOOL bGlobal ) //add for SwMultiTOXTabDialog
+ SwTOXBase* pCurTOX, sal_uInt16 nToxType,
+ sal_Bool bGlobal ) //add for SwMultiTOXTabDialog
{
SwMultiTOXTabDialog* pDlg=NULL;
switch ( nResId )
@@ -1569,7 +1559,7 @@ AbstractMailMergeWizard* SwAbstractDialogFactory_Impl::CreateMailMergeWizard(
}
//add for static func in SwGlossaryDlg
-GlossaryGetCurrGroup SwAbstractDialogFactory_Impl::GetGlossaryCurrGroupFunc( USHORT nId )
+GlossaryGetCurrGroup SwAbstractDialogFactory_Impl::GetGlossaryCurrGroupFunc( sal_uInt16 nId )
{
switch ( nId )
{
@@ -1580,7 +1570,7 @@ GlossaryGetCurrGroup SwAbstractDialogFactory_Impl::GetGlossaryCurrGroupFunc(
}
return 0;
}
-GlossarySetActGroup SwAbstractDialogFactory_Impl::SetGlossaryActGroupFunc( USHORT nId )
+GlossarySetActGroup SwAbstractDialogFactory_Impl::SetGlossaryActGroupFunc( sal_uInt16 nId )
{
switch ( nId )
{
@@ -1593,7 +1583,7 @@ GlossarySetActGroup SwAbstractDialogFactory_Impl::SetGlossaryActGroupFunc( USHOR
}
//------------------ Factories for TabPages
-CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId )
+CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId )
{
CreateTabPage pRet = 0;
switch ( nId )
@@ -1656,7 +1646,7 @@ CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId )
return pRet;
}
-GetTabPageRanges SwAbstractDialogFactory_Impl::GetTabPageRangesFunc( USHORT nId )
+GetTabPageRanges SwAbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nId )
{
switch ( nId )
{
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index f5076d1d9e4c..2c5709d85004 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -64,7 +64,7 @@ public: \
{} \
virtual ~Class(); \
virtual short Execute() ;
-// virtual void Show( BOOL bVisible = TRUE, USHORT nFlags = 0 )
+// virtual void Show( sal_Bool bVisible = sal_True, sal_uInt16 nFlags = 0 )
#define IMPL_ABSTDLG_BASE(Class) \
Class::~Class() \
@@ -87,8 +87,8 @@ class AbstractSwWordCountDialog_Impl : public AbstractSwWordCountDialog
class AbstractSwInsertAbstractDlg_Impl : public AbstractSwInsertAbstractDlg
{
DECL_ABSTDLG_BASE(AbstractSwInsertAbstractDlg_Impl,SwInsertAbstractDlg)
- virtual BYTE GetLevel() const ;
- virtual BYTE GetPara() const ;
+ virtual sal_uInt8 GetLevel() const ;
+ virtual sal_uInt8 GetPara() const ;
};
//add for SwInsertAbstractDlg end
@@ -125,8 +125,8 @@ class AbstractSwBreakDlg_Impl : public AbstractSwBreakDlg // add for SwBreakDlg
{
DECL_ABSTDLG_BASE(AbstractSwBreakDlg_Impl,SwBreakDlg)
virtual String GetTemplateName();
- virtual USHORT GetKind();
- virtual USHORT GetPageNumber();
+ virtual sal_uInt16 GetKind();
+ virtual sal_uInt16 GetPageNumber();
};
class AbstractSplitTableDialog_Impl : public AbstractSplitTableDialog // add for
@@ -141,9 +141,9 @@ class AbstractSplitTableDialog_Impl : public AbstractSplitTableDialog // add for
class AbstractTabDialog_Impl : public SfxAbstractTabDialog
{
DECL_ABSTDLG_BASE( AbstractTabDialog_Impl,SfxTabDialog )
- virtual void SetCurPageId( USHORT nId );
+ virtual void SetCurPageId( sal_uInt16 nId );
virtual const SfxItemSet* GetOutputItemSet() const;
- virtual const USHORT* GetInputRanges( const SfxItemPool& pItem );
+ virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
virtual void SetText( const XubString& rStr );
@@ -175,7 +175,7 @@ class AbstractSwInsertDBColAutoPilot_Impl : public AbstractSwInsertDBColAutoPil
class AbstractDropDownFieldDialog_Impl : public AbstractDropDownFieldDialog //add for DropDownFieldDialog
{
DECL_ABSTDLG_BASE(AbstractDropDownFieldDialog_Impl, sw::DropDownFieldDialog)
- virtual ByteString GetWindowState( ULONG nMask = WINDOWSTATE_MASK_ALL ) const; //this method inherit from SystemWindow
+ virtual ByteString GetWindowState( sal_uLong nMask = WINDOWSTATE_MASK_ALL ) const; //this method inherit from SystemWindow
virtual void SetWindowState( const ByteString& rStr );//this method inherit from SystemWindow
};
//add for DropDownFieldDialog end
@@ -184,9 +184,9 @@ class AbstractDropDownFieldDialog_Impl : public AbstractDropDownFieldDialog //ad
class AbstractSwLabDlg_Impl : public AbstractSwLabDlg
{
DECL_ABSTDLG_BASE(AbstractSwLabDlg_Impl,SwLabDlg)
- virtual void SetCurPageId( USHORT nId );
+ virtual void SetCurPageId( sal_uInt16 nId );
virtual const SfxItemSet* GetOutputItemSet() const;
- virtual const USHORT* GetInputRanges( const SfxItemPool& pItem );
+ virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
virtual void SetText( const XubString& rStr );
@@ -201,8 +201,8 @@ class AbstractSwSelGlossaryDlg_Impl : public AbstractSwSelGlossaryDlg
{
DECL_ABSTDLG_BASE(AbstractSwSelGlossaryDlg_Impl,SwSelGlossaryDlg)
virtual void InsertGlos(const String &rRegion, const String &rGlosName); // inline
- virtual USHORT GetSelectedIdx() const; // inline
- virtual void SelectEntryPos(USHORT nIdx); // inline
+ virtual sal_uInt16 GetSelectedIdx() const; // inline
+ virtual void SelectEntryPos(sal_uInt16 nIdx); // inline
};
//add for SwSelGlossaryDlg end
@@ -219,15 +219,15 @@ class AbstractSwAutoFormatDlg_Impl : public AbstractSwAutoFormatDlg
class AbstractSwFldDlg_Impl : public AbstractSwFldDlg //add for SwFldDlg
{
DECL_ABSTDLG_BASE(AbstractSwFldDlg_Impl,SwFldDlg )
- virtual void SetCurPageId( USHORT nId );
+ virtual void SetCurPageId( sal_uInt16 nId );
virtual const SfxItemSet* GetOutputItemSet() const;
- virtual const USHORT* GetInputRanges( const SfxItemPool& pItem );
+ virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
virtual void SetText( const XubString& rStr );
virtual String GetText() const;
- virtual void Start( BOOL bShow = TRUE ); //this method from SfxTabDialog
- virtual void ShowPage( USHORT nId );// this method from SfxTabDialog
+ virtual void Start( sal_Bool bShow = sal_True ); //this method from SfxTabDialog
+ virtual void ShowPage( sal_uInt16 nId );// this method from SfxTabDialog
virtual void Initialize(SfxChildWinInfo *pInfo);
virtual void ReInitDlg();
virtual void ActivateDatabasePage();
@@ -249,7 +249,7 @@ class AbstractSwRenameXNamedDlg_Impl : public AbstractSwRenameXNamedDlg
class AbstractSwModalRedlineAcceptDlg_Impl : public AbstractSwModalRedlineAcceptDlg
{
DECL_ABSTDLG_BASE(AbstractSwModalRedlineAcceptDlg_Impl,SwModalRedlineAcceptDlg )
- virtual void AcceptAll( BOOL bAccept );
+ virtual void AcceptAll( sal_Bool bAccept );
};
//add for SwModalRedlineAcceptDlg end
@@ -270,7 +270,7 @@ class AbstractFldInputDlg_Impl : public AbstractFldInputDlg
DECL_ABSTDLG_BASE(AbstractFldInputDlg_Impl,SwFldInputDlg)
//from class SalFrame
virtual void SetWindowState( const ByteString& rStr ) ;
- virtual ByteString GetWindowState( ULONG nMask = WINDOWSTATE_MASK_ALL ) const ;
+ virtual ByteString GetWindowState( sal_uLong nMask = WINDOWSTATE_MASK_ALL ) const ;
};
//for SwFldInputDlg end
@@ -280,10 +280,10 @@ class AbstractInsFootNoteDlg_Impl : public AbstractInsFootNoteDlg
{
DECL_ABSTDLG_BASE(AbstractInsFootNoteDlg_Impl,SwInsFootNoteDlg)
virtual String GetFontName();
- virtual BOOL IsEndNote();
+ virtual sal_Bool IsEndNote();
virtual String GetStr();
//from class Window
- virtual void SetHelpId( ULONG nHelpId );
+ virtual void SetHelpId( const rtl::OString& sHelpId );
virtual void SetText( const XubString& rStr );
};
//for SwInsFootNoteDlg end
@@ -294,8 +294,8 @@ class AbstractInsertGrfRulerDlg_Impl : public AbstractInsertGrfRulerDlg
{
DECL_ABSTDLG_BASE(AbstractInsertGrfRulerDlg_Impl,SwInsertGrfRulerDlg)
virtual String GetGraphicName();
- virtual BOOL IsSimpleLine();
- virtual BOOL HasImages() const ;
+ virtual sal_Bool IsSimpleLine();
+ virtual sal_Bool HasImages() const ;
};
//for SwInsertGrfRulerDlg end
@@ -304,7 +304,7 @@ class SwInsTableDlg;
class AbstractInsTableDlg_Impl : public AbstractInsTableDlg
{
DECL_ABSTDLG_BASE(AbstractInsTableDlg_Impl,SwInsTableDlg)
- virtual void GetValues( String& rName, USHORT& rRow, USHORT& rCol,
+ virtual void GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol,
SwInsertTableOptions& rInsTblFlags, String& rTableAutoFmtName,
SwTableAutoFmt *& prTAFmt );
};
@@ -317,9 +317,9 @@ class AbstractJavaEditDialog_Impl : public AbstractJavaEditDialog
DECL_ABSTDLG_BASE(AbstractJavaEditDialog_Impl,SwJavaEditDialog)
virtual String GetText();
virtual String GetType();
- virtual BOOL IsUrl();
- virtual BOOL IsNew();
- virtual BOOL IsUpdate();
+ virtual sal_Bool IsUrl();
+ virtual sal_Bool IsNew();
+ virtual sal_Bool IsUpdate();
};
//for SwJavaEditDialog end
@@ -328,7 +328,7 @@ class SwMailMergeDlg;
class AbstractMailMergeDlg_Impl : public AbstractMailMergeDlg
{
DECL_ABSTDLG_BASE(AbstractMailMergeDlg_Impl,SwMailMergeDlg)
- virtual USHORT GetMergeType() ;
+ virtual sal_uInt16 GetMergeType() ;
virtual const ::rtl::OUString& GetSaveFilter() const;
virtual const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const ;
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const;
@@ -339,7 +339,7 @@ class SwMailMergeCreateFromDlg;
class AbstractMailMergeCreateFromDlg_Impl : public AbstractMailMergeCreateFromDlg
{
DECL_ABSTDLG_BASE(AbstractMailMergeCreateFromDlg_Impl,SwMailMergeCreateFromDlg)
- virtual BOOL IsThisDocument() const ;
+ virtual sal_Bool IsThisDocument() const ;
};
//for SwMailMergeCreateFromDlg end
//for SwMailMergeFieldConnectionsDlg begin
@@ -347,7 +347,7 @@ class SwMailMergeFieldConnectionsDlg;
class AbstractMailMergeFieldConnectionsDlg_Impl : public AbstractMailMergeFieldConnectionsDlg
{
DECL_ABSTDLG_BASE(AbstractMailMergeFieldConnectionsDlg_Impl,SwMailMergeFieldConnectionsDlg)
- virtual BOOL IsUseExistingConnections() const ;
+ virtual sal_Bool IsUseExistingConnections() const ;
};
//for SwMailMergeFieldConnectionsDlg end
@@ -418,7 +418,7 @@ public:
virtual void SetReloadDocument(const String& rURL);
virtual const String& GetReloadDocument() const;
- virtual BOOL ShowPage( USHORT nLevel );
+ virtual sal_Bool ShowPage( sal_uInt16 nLevel );
virtual sal_uInt16 GetRestartPage() const;
};
@@ -441,7 +441,7 @@ public:
virtual AbstractSwBreakDlg * CreateSwBreakDlg ( Window *pParent, SwWrtShell &rSh,int nResId ); // add for SwBreakDlg
virtual VclAbstractDialog * CreateSwChangeDBDlg( SwView& rVw, int nResId ); //add for SwChangeDBDlg
virtual SfxAbstractTabDialog * CreateSwCharDlg( Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, int nResId, // add for SwCharDlg
- const String* pFmtStr = 0, BOOL bIsDrwTxtDlg = FALSE);
+ const String* pFmtStr = 0, sal_Bool bIsDrwTxtDlg = sal_False);
virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg ( SwView& rView, int nResId, bool bToTable ); //add for SwConvertTableDlg
virtual VclAbstractDialog * CreateSwCaptionDialog ( Window *pParent, SwView &rV,int nResId); //add for SwCaptionDialog
@@ -452,20 +452,20 @@ public:
virtual SfxAbstractTabDialog * CreateSwFootNoteOptionDlg( Window *pParent, SwWrtShell &rSh,int nResId);//add for SwFootNoteOptionDlg
virtual AbstractDropDownFieldDialog * CreateDropDownFieldDialog ( Window *pParent, SwWrtShell &rSh, //add for DropDownFieldDialog
- SwField* pField,int nResId, BOOL bNextButton = FALSE );
- virtual SfxAbstractTabDialog* CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, BOOL bInsert,int nResId ); //add for SwEnvDlg
+ SwField* pField,int nResId, sal_Bool bNextButton = sal_False );
+ virtual SfxAbstractTabDialog* CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert,int nResId ); //add for SwEnvDlg
virtual AbstractSwLabDlg* CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg
- SwNewDBMgr* pNewDBMgr, BOOL bLabel,int nResId );
+ SwNewDBMgr* pNewDBMgr, sal_Bool bLabel,int nResId );
virtual SwLabDlgMethod GetSwLabDlgStaticMethod (); //add for SwLabDlg
virtual SfxAbstractTabDialog* CreateSwParaDlg ( Window *pParent, //add for SwParaDlg
SwView& rVw,
const SfxItemSet& rCoreSet,
- BYTE nDialogMode,
+ sal_uInt8 nDialogMode,
int nResId,
const String *pCollName = 0,
- BOOL bDraw = FALSE,
- UINT16 nDefPage = 0);
+ sal_Bool bDraw = sal_False,
+ sal_uInt16 nDefPage = 0);
virtual AbstractSwSelGlossaryDlg * CreateSwSelGlossaryDlg ( Window * pParent, const String &rShortName, int nResId ); //add for SwSelGlossaryDlg
virtual VclAbstractDialog * CreateVclAbstractDialog ( Window * pParent, SwWrtShell &rSh, int nResId ); //add for SwTableHeightDlg SwSortDlg
@@ -473,11 +473,11 @@ public:
virtual AbstractSwAutoFormatDlg * CreateSwAutoFormatDlg( Window* pParent, SwWrtShell* pShell, //add for SwAutoFormatDlg
int nResId,
- BOOL bSetAutoFmt = TRUE,
+ sal_Bool bSetAutoFmt = sal_True,
const SwTableAutoFmt* pSelFmt = 0 );
- virtual SfxAbstractDialog * CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, USHORT nType,int nResId );//add for SwBorderDlg
+ virtual SfxAbstractDialog * CreateSwBorderDlg (Window* pParent, SfxItemSet& rSet, sal_uInt16 nType,int nResId );//add for SwBorderDlg
- virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode, int nResId ); //add for SwWrapDlg
+ virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode, int nResId ); //add for SwWrapDlg
virtual VclAbstractDialog * CreateSwTableWidthDlg ( Window *pParent, SwTableFUNC &rFnc , int nResId ); //add for SwTableWidthDlg
virtual SfxAbstractTabDialog* CreateSwTableTabDlg( Window* pParent, SfxItemPool& Pool,
const SfxItemSet* pItemSet, SwWrtShell* pSh,int nResId ); //add for SwTableTabDlg
@@ -489,34 +489,34 @@ public:
virtual AbstractSwModalRedlineAcceptDlg * CreateSwModalRedlineAcceptDlg ( Window *pParent, int nResId ); //add for SwModalRedlineAcceptDlg
virtual VclAbstractDialog* CreateSwVclDialog( int nResId,
- Window* pParent, BOOL& rWithPrev ); //add for SwMergeTblDlg
+ Window* pParent, sal_Bool& rWithPrev ); //add for SwMergeTblDlg
virtual SfxAbstractTabDialog* CreateFrmTabDialog( int nResId,
SfxViewFrame *pFrame, Window *pParent,
const SfxItemSet& rCoreSet,
- BOOL bNewFrm = TRUE,
- USHORT nResType = DLG_FRM_STD,
- BOOL bFmt = FALSE,
- UINT16 nDefPage = 0,
+ sal_Bool bNewFrm = sal_True,
+ sal_uInt16 nResType = DLG_FRM_STD,
+ sal_Bool bFmt = sal_False,
+ sal_uInt16 nDefPage = 0,
const String* pFmtStr = 0); //add for SwFrmDlg
virtual SfxAbstractTabDialog* CreateTemplateDialog( int nResId,
Window* pParent,
SfxStyleSheetBase& rBase,
- USHORT nRegion,
- BOOL bColumn = FALSE,
+ sal_uInt16 nRegion,
+ sal_Bool bColumn = sal_False,
SwWrtShell* pActShell = 0,
- BOOL bNew = FALSE ); //add for SwTemplateDlg
+ sal_Bool bNew = sal_False ); //add for SwTemplateDlg
virtual AbstractGlossaryDlg* CreateGlossaryDlg( int nResId,
SfxViewFrame* pViewFrame,
SwGlossaryHdl* pGlosHdl,
SwWrtShell *pWrtShell); //add for SwGlossaryDlg
virtual AbstractFldInputDlg* CreateFldInputDlg( int nResId,
Window *pParent, SwWrtShell &rSh,
- SwField* pField, BOOL bNextButton = FALSE ); //add for SwFldInputDlg
+ SwField* pField, sal_Bool bNextButton = sal_False ); //add for SwFldInputDlg
virtual AbstractInsFootNoteDlg* CreateInsFootNoteDlg( int nResId,
- Window * pParent, SwWrtShell &rSh, BOOL bEd = FALSE); //add for SwInsFootNoteDlg
+ Window * pParent, SwWrtShell &rSh, sal_Bool bEd = sal_False); //add for SwInsFootNoteDlg
virtual VclAbstractDialog * CreateTitlePageDlg ( Window * pParent );
virtual VclAbstractDialog * CreateVclSwViewDialog( int nResId,
- SwView& rView, BOOL bCol = FALSE ); //add for SwInsRowColDlg, SwLineNumberingDlg
+ SwView& rView, sal_Bool bCol = sal_False ); //add for SwInsRowColDlg, SwLineNumberingDlg
virtual AbstractInsertGrfRulerDlg* CreateInsertGrfRulerDlg( int nResId,
Window * pParent ); //add for SwInsertGrfRulerDlg
virtual AbstractInsTableDlg* CreateInsTableDlg( int nResId,
@@ -543,8 +543,8 @@ public:
virtual AbstractMultiTOXTabDialog* CreateMultiTOXTabDialog( int nResId,
Window* pParent, const SfxItemSet& rSet,
SwWrtShell &rShell,
- SwTOXBase* pCurTOX, USHORT nToxType = USHRT_MAX,
- BOOL bGlobal = FALSE); //add for SwMultiTOXTabDialog
+ SwTOXBase* pCurTOX, sal_uInt16 nToxType = USHRT_MAX,
+ sal_Bool bGlobal = sal_False); //add for SwMultiTOXTabDialog
virtual AbstractEditRegionDlg* CreateEditRegionDlg( int nResId,
Window* pParent, SwWrtShell& rWrtSh ); //add for SwEditRegionDlg
virtual AbstractInsertSectionTabDialog* CreateInsertSectionTabDialog( int nResId,
@@ -567,13 +567,13 @@ public:
virtual AbstractMailMergeWizard* CreateMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rConfigItem);
//add for static func in SwGlossaryDlg
- virtual GlossaryGetCurrGroup GetGlossaryCurrGroupFunc( USHORT nId );
- virtual GlossarySetActGroup SetGlossaryActGroupFunc( USHORT nId );
+ virtual GlossaryGetCurrGroup GetGlossaryCurrGroupFunc( sal_uInt16 nId );
+ virtual GlossarySetActGroup SetGlossaryActGroupFunc( sal_uInt16 nId );
// For TabPage
- virtual CreateTabPage GetTabPageCreatorFunc( USHORT nId );
+ virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId );
- virtual GetTabPageRanges GetTabPageRangesFunc( USHORT nId );
+ virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId );
};
@@ -584,5 +584,4 @@ struct SwDialogsResMgr
#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sw/source/ui/dialog/swwrtshitem.cxx b/sw/source/ui/dialog/swwrtshitem.cxx
index 9934daa98057..1385705b9488 100644
--- a/sw/source/ui/dialog/swwrtshitem.cxx
+++ b/sw/source/ui/dialog/swwrtshitem.cxx
@@ -30,7 +30,7 @@
#include "precompiled_sw.hxx"
#include "swwrtshitem.hxx"
TYPEINIT1(SwWrtShellItem,SfxPoolItem);
-SwWrtShellItem::SwWrtShellItem( USHORT _nWhich, SwWrtShell* pSh )
+SwWrtShellItem::SwWrtShellItem( sal_uInt16 _nWhich, SwWrtShell* pSh )
: SfxPoolItem( _nWhich ), pWrtSh( pSh )
{
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 3125d832640e..29f582762239 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -94,8 +94,8 @@ void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAvailNames
const SwSectionFmt* pFmt;
if( !pNewFmt )
{
- USHORT nCount = rSh.GetSectionFmtCount();
- for(USHORT i=0;i<nCount;i++)
+ sal_uInt16 nCount = rSh.GetSectionFmtCount();
+ for(sal_uInt16 i=0;i<nCount;i++)
{
SectionType eTmpType;
if( !(pFmt = &rSh.GetSectionFmt(i))->GetParent() &&
@@ -115,11 +115,11 @@ void lcl_FillList( SwWrtShell& rSh, ComboBox& rSubRegions, ComboBox* pAvailNames
else
{
SwSections aTmpArr;
- USHORT nCnt = pNewFmt->GetChildSections(aTmpArr,SORTSECT_POS);
+ sal_uInt16 nCnt = pNewFmt->GetChildSections(aTmpArr,SORTSECT_POS);
if( nCnt )
{
SectionType eTmpType;
- for( USHORT n = 0; n < nCnt; ++n )
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
if( (pFmt = aTmpArr[n]->GetFmt())->IsInNodesArr()&&
(eTmpType = pFmt->GetSection()->GetType()) != TOX_CONTENT_SECTION
&& TOX_HEADER_SECTION != eTmpType )
@@ -174,7 +174,7 @@ private:
SwFmtNoBalancedColumns m_Balance;
SvxFrameDirectionItem m_FrmDirItem;
SvxLRSpaceItem m_LRSpaceItem;
- USHORT m_nArrPos;
+ sal_uInt16 m_nArrPos;
// shows, if maybe textcontent is in the region
bool m_bContent : 1;
// for multiselection, mark at first, then work with TreeListBox!
@@ -182,7 +182,7 @@ private:
uno::Sequence<sal_Int8> m_TempPasswd;
public:
- SectRepr(USHORT nPos, SwSection& rSect);
+ SectRepr(sal_uInt16 nPos, SwSection& rSect);
bool operator==(SectRepr& rSectRef) const
{ return m_nArrPos == rSectRef.GetArrPos(); }
@@ -199,7 +199,7 @@ public:
SvxFrameDirectionItem& GetFrmDir() { return m_FrmDirItem; }
SvxLRSpaceItem& GetLRSpace() { return m_LRSpaceItem; }
- USHORT GetArrPos() const { return m_nArrPos; }
+ sal_uInt16 GetArrPos() const { return m_nArrPos; }
String GetFile() const;
String GetSubRegion() const;
void SetFile(String const& rFile);
@@ -220,7 +220,7 @@ public:
SV_IMPL_OP_PTRARR_SORT( SectReprArr, SectReprPtr )
-SectRepr::SectRepr( USHORT nPos, SwSection& rSect )
+SectRepr::SectRepr( sal_uInt16 nPos, SwSection& rSect )
: m_SectionData( rSect )
, m_Brush( RES_BACKGROUND )
, m_FrmDirItem( FRMDIR_ENVIRONMENT, RES_FRAMEDIR )
@@ -325,7 +325,7 @@ String SectRepr::GetFile() const
{
if (DDE_LINK_SECTION == m_SectionData.GetType())
{
- USHORT n = sLinkFile.SearchAndReplace( sfx2::cTokenSeperator, ' ' );
+ sal_uInt16 n = sLinkFile.SearchAndReplace( sfx2::cTokenSeperator, ' ' );
sLinkFile.SearchAndReplace( sfx2::cTokenSeperator, ' ', n );
}
else
@@ -422,7 +422,7 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh )
aTree.SetHelpId(HID_REGION_TREE);
aTree.SetSelectionMode( MULTIPLE_SELECTION );
- aTree.SetWindowBits(WB_HASBUTTONSATROOT|WB_CLIPCHILDREN|WB_HSCROLL);
+ aTree.SetStyle(aTree.GetStyle()|WB_HASBUTTONSATROOT|WB_CLIPCHILDREN|WB_HSCROLL);
aTree.SetSpaceBetweenEntries(0);
if(bWeb)
@@ -446,13 +446,17 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh )
aTree.Select( aTree.First() );
aTree.Show();
bDontCheckPasswd = sal_False;
+
+ aPasswdPB.SetAccessibleRelationMemberOf(&aProtectFL);
+ aPasswdPB.SetAccessibleRelationLabeledBy(&aPasswdCB);
+ aSubRegionED.SetAccessibleName(aSubRegionFT.GetText());
}
-BOOL SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
+sal_Bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
{
if(bDontCheckPasswd)
- return TRUE;
- sal_Bool bRet = TRUE;
+ return sal_True;
+ sal_Bool bRet = sal_True;
SvLBoxEntry* pEntry = aTree.FirstSelected();
while( pEntry )
{
@@ -461,7 +465,7 @@ BOOL SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
&& pRepr->GetSectionData().GetPassword().getLength())
{
SwTestPasswdDlg aPasswdDlg(this);
- bRet = FALSE;
+ bRet = sal_False;
if (aPasswdDlg.Execute())
{
String sNewPasswd( aPasswdDlg.GetPassword() );
@@ -471,7 +475,7 @@ BOOL SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
pRepr->GetSectionData().GetPassword(), sNewPasswd))
{
pRepr->SetTempPasswd(aNewPasswd);
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -503,8 +507,8 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry
if (!pFmt)
{
- USHORT nCount=rSh.GetSectionFmtCount();
- for ( USHORT n=0; n < nCount; n++ )
+ sal_uInt16 nCount=rSh.GetSectionFmtCount();
+ for ( sal_uInt16 n=0; n < nCount; n++ )
{
SectionType eTmpType;
if( !( pFmt = &rSh.GetSectionFmt(n))->GetParent() &&
@@ -529,10 +533,10 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry
{
SwSections aTmpArr;
SvLBoxEntry* pNEntry;
- USHORT nCnt = pFmt->GetChildSections(aTmpArr,SORTSECT_POS);
+ sal_uInt16 nCnt = pFmt->GetChildSections(aTmpArr,SORTSECT_POS);
if( nCnt )
{
- for( USHORT n = 0; n < nCnt; ++n )
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
SectionType eTmpType;
pFmt = aTmpArr[n]->GetFmt();
@@ -564,10 +568,10 @@ void SwEditRegionDlg::RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry
}
}
-USHORT SwEditRegionDlg::FindArrPos(const SwSectionFmt* pFmt )
+sal_uInt16 SwEditRegionDlg::FindArrPos(const SwSectionFmt* pFmt )
{
- USHORT nCount=rSh.GetSectionFmtCount();
- for (USHORT i=0;i<nCount;i++)
+ sal_uInt16 nCount=rSh.GetSectionFmtCount();
+ for (sal_uInt16 i=0;i<nCount;i++)
if (pFmt==&rSh.GetSectionFmt(i))
return i;
@@ -600,7 +604,7 @@ void SwEditRegionDlg::SelectSection(const String& rSectionName)
}
if(pEntry)
{
- aTree.SelectAll( FALSE);
+ aTree.SelectAll( sal_False);
aTree.Select(pEntry);
aTree.MakeVisible(pEntry);
}
@@ -615,21 +619,21 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
{
bDontCheckPasswd = sal_True;
SvLBoxEntry* pEntry=pBox->FirstSelected();
- aHideCB .Enable(TRUE);
+ aHideCB .Enable(sal_True);
// edit in readonly sections
- aEditInReadonlyCB.Enable(TRUE);
+ aEditInReadonlyCB.Enable(sal_True);
- aProtectCB .Enable(TRUE);
- aFileCB .Enable(TRUE);
+ aProtectCB .Enable(sal_True);
+ aFileCB .Enable(sal_True);
UNO_NMSPC::Sequence <sal_Int8> aCurPasswd;
if( 1 < pBox->GetSelectionCount() )
{
- aHideCB.EnableTriState( TRUE );
- aProtectCB.EnableTriState( TRUE );
+ aHideCB.EnableTriState( sal_True );
+ aProtectCB.EnableTriState( sal_True );
// edit in readonly sections
- aEditInReadonlyCB.EnableTriState ( TRUE );
+ aEditInReadonlyCB.EnableTriState ( sal_True );
- aFileCB.EnableTriState( TRUE );
+ aFileCB.EnableTriState( sal_True );
bool bHiddenValid = true;
bool bProtectValid = true;
@@ -641,10 +645,10 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
bool bHidden = true;
bool bProtect = true;
String sCondition;
- BOOL bFirst = TRUE;
- BOOL bFileValid = TRUE;
- BOOL bFile = TRUE;
- BOOL bPasswdValid = TRUE;
+ sal_Bool bFirst = sal_True;
+ sal_Bool bFileValid = sal_True;
+ sal_Bool bFile = sal_True;
+ sal_Bool bPasswdValid = sal_True;
while( pEntry )
{
@@ -665,7 +669,7 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
{
String sTemp(rData.GetCondition());
if(sCondition != sTemp)
- bConditionValid = FALSE;
+ bConditionValid = sal_False;
bHiddenValid = (bHidden == rData.IsHidden());
bProtectValid = (bProtect == rData.IsProtectFlag());
// edit in readonly sections
@@ -677,7 +681,7 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
bPasswdValid = (aCurPasswd == rData.GetPassword());
}
pEntry = pBox->NextSelected(pEntry);
- bFirst = FALSE;
+ bFirst = sal_False;
}
aHideCB.SetState( !bHiddenValid ? STATE_DONTKNOW :
@@ -695,26 +699,26 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
aConditionED.SetText(sCondition);
else
{
- aConditionFT.Enable(FALSE);
- aConditionED.Enable(FALSE);
+ aConditionFT.Enable(sal_False);
+ aConditionED.Enable(sal_False);
}
- aFilePB.Enable(FALSE);
- aFileNameFT .Enable(FALSE);
- aFileNameED .Enable(FALSE);
- aSubRegionFT.Enable(FALSE);
- aSubRegionED.Enable(FALSE);
- aCurName .Enable(FALSE);
- aOptionsPB .Enable(FALSE);
- aDDECB .Enable(FALSE);
- aDDECommandFT .Enable(FALSE);
- BOOL bPasswdEnabled = aProtectCB.GetState() == STATE_CHECK;
+ aFilePB.Enable(sal_False);
+ aFileNameFT .Enable(sal_False);
+ aFileNameED .Enable(sal_False);
+ aSubRegionFT.Enable(sal_False);
+ aSubRegionED.Enable(sal_False);
+ aCurName .Enable(sal_False);
+ aOptionsPB .Enable(sal_False);
+ aDDECB .Enable(sal_False);
+ aDDECommandFT .Enable(sal_False);
+ sal_Bool bPasswdEnabled = aProtectCB.GetState() == STATE_CHECK;
aPasswdCB.Enable(bPasswdEnabled);
aPasswdPB.Enable(bPasswdEnabled);
if(!bPasswdValid)
{
pEntry = pBox->FirstSelected();
- pBox->SelectAll( FALSE );
+ pBox->SelectAll( sal_False );
pBox->Select( pEntry );
GetFirstEntryHdl(pBox);
return 0;
@@ -724,14 +728,14 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
}
else if (pEntry )
{
- aCurName .Enable(TRUE);
- aOptionsPB .Enable(TRUE);
+ aCurName .Enable(sal_True);
+ aOptionsPB .Enable(sal_True);
SectRepr* pRepr=(SectRepr*) pEntry->GetUserData();
SwSectionData const& rData( pRepr->GetSectionData() );
aConditionED.SetText(rData.GetCondition());
aHideCB.Enable();
aHideCB.SetState((rData.IsHidden()) ? STATE_CHECK : STATE_NOCHECK);
- BOOL bHide = STATE_CHECK == aHideCB.GetState();
+ sal_Bool bHide = STATE_CHECK == aHideCB.GetState();
aConditionED.Enable(bHide);
aConditionFT.Enable(bHide);
aPasswdCB.Check(rData.GetPassword().getLength() > 0);
@@ -747,17 +751,17 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
aSubRegionED.Clear();
if(aFile.Len()||sSub.Len())
{
- aFileCB.Check(TRUE);
+ aFileCB.Check(sal_True);
aFileNameED.SetText(aFile);
aSubRegionED.SetText(sSub);
aDDECB.Check(rData.GetType() == DDE_LINK_SECTION);
}
else
{
- aFileCB.Check(FALSE);
+ aFileCB.Check(sal_False);
aFileNameED.SetText(aFile);
- aDDECB.Enable(FALSE);
- aDDECB.Check(FALSE);
+ aDDECB.Enable(sal_False);
+ aDDECB.Check(sal_False);
}
UseFileHdl(&aFileCB);
DDEHdl( &aDDECB );
@@ -770,7 +774,7 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
? STATE_CHECK : STATE_NOCHECK);
aEditInReadonlyCB.Enable();
- BOOL bPasswdEnabled = aProtectCB.IsChecked();
+ sal_Bool bPasswdEnabled = aProtectCB.IsChecked();
aPasswdCB.Enable(bPasswdEnabled);
aPasswdPB.Enable(bPasswdEnabled);
}
@@ -782,24 +786,24 @@ IMPL_LINK( SwEditRegionDlg, DeselectHdl, SvTreeListBox *, pBox )
{
if( !pBox->GetSelectionCount() )
{
- aHideCB .Enable(FALSE);
- aProtectCB .Enable(FALSE);
+ aHideCB .Enable(sal_False);
+ aProtectCB .Enable(sal_False);
// edit in readonly sections
- aEditInReadonlyCB.Enable(FALSE);
-
- aPasswdCB .Enable(FALSE);
- aPasswdCB .Enable(FALSE);
- aConditionFT .Enable(FALSE);
- aConditionED.Enable(FALSE);
- aFileCB .Enable(FALSE);
- aFilePB .Enable(FALSE);
- aFileNameFT .Enable(FALSE);
- aFileNameED .Enable(FALSE);
- aSubRegionFT .Enable(FALSE);
- aSubRegionED .Enable(FALSE);
- aCurName .Enable(FALSE);
- aDDECB .Enable(FALSE);
- aDDECommandFT .Enable(FALSE);
+ aEditInReadonlyCB.Enable(sal_False);
+
+ aPasswdCB .Enable(sal_False);
+ aPasswdCB .Enable(sal_False);
+ aConditionFT .Enable(sal_False);
+ aConditionED.Enable(sal_False);
+ aFileCB .Enable(sal_False);
+ aFilePB .Enable(sal_False);
+ aFileNameFT .Enable(sal_False);
+ aFileNameED .Enable(sal_False);
+ aSubRegionFT .Enable(sal_False);
+ aSubRegionED .Enable(sal_False);
+ aCurName .Enable(sal_False);
+ aDDECB .Enable(sal_False);
+ aDDECommandFT .Enable(sal_False);
UseFileHdl(&aFileCB);
DDEHdl( &aDDECB );
@@ -826,7 +830,7 @@ IMPL_LINK( SwEditRegionDlg, OkHdl, CheckBox *, EMPTYARG )
rSh.StartAllAction();
rSh.StartUndo();
- rSh.ResetSelect( 0,FALSE );
+ rSh.ResetSelect( 0,sal_False );
SvLBoxEntry* pEntry = aTree.First();
while( pEntry )
@@ -837,20 +841,20 @@ IMPL_LINK( SwEditRegionDlg, OkHdl, CheckBox *, EMPTYARG )
{
pRepr->GetSectionData().SetPassword(uno::Sequence<sal_Int8 >());
}
- USHORT nNewPos = rDocFmts.GetPos( pFmt );
+ sal_uInt16 nNewPos = rDocFmts.GetPos( pFmt );
if( USHRT_MAX != nNewPos )
{
- SfxItemSet* pSet = pFmt->GetAttrSet().Clone( FALSE );
+ SfxItemSet* pSet = pFmt->GetAttrSet().Clone( sal_False );
if( pFmt->GetCol() != pRepr->GetCol() )
pSet->Put( pRepr->GetCol() );
- if( pFmt->GetBackground(FALSE) != pRepr->GetBackground() )
+ if( pFmt->GetBackground(sal_False) != pRepr->GetBackground() )
pSet->Put( pRepr->GetBackground() );
- if( pFmt->GetFtnAtTxtEnd(FALSE) != pRepr->GetFtnNtAtEnd() )
+ if( pFmt->GetFtnAtTxtEnd(sal_False) != pRepr->GetFtnNtAtEnd() )
pSet->Put( pRepr->GetFtnNtAtEnd() );
- if( pFmt->GetEndAtTxtEnd(FALSE) != pRepr->GetEndNtAtEnd() )
+ if( pFmt->GetEndAtTxtEnd(sal_False) != pRepr->GetEndNtAtEnd() )
pSet->Put( pRepr->GetEndNtAtEnd() );
if( pFmt->GetBalancedColumns() != pRepr->GetBalance() )
@@ -869,10 +873,10 @@ IMPL_LINK( SwEditRegionDlg, OkHdl, CheckBox *, EMPTYARG )
pEntry = aTree.Next( pEntry );
}
- for(USHORT i = aSectReprArr.Count(); i; )
+ for(sal_uInt16 i = aSectReprArr.Count(); i; )
{
SwSectionFmt* pFmt = aOrigArray[ aSectReprArr[ --i ]->GetArrPos() ];
- USHORT nNewPos = rDocFmts.GetPos( pFmt );
+ sal_uInt16 nNewPos = rDocFmts.GetPos( pFmt );
if( USHRT_MAX != nNewPos )
rSh.DelSectionFmt( nNewPos );
}
@@ -896,10 +900,10 @@ IMPL_LINK( SwEditRegionDlg, ChangeProtectHdl, TriStateBox *, pBox )
{
if(!CheckPasswd(pBox))
return 0;
- pBox->EnableTriState( FALSE );
+ pBox->EnableTriState( sal_False );
SvLBoxEntry* pEntry=aTree.FirstSelected();
OSL_ENSURE(pEntry,"no entry found");
- BOOL bCheck = STATE_CHECK == pBox->GetState();
+ sal_Bool bCheck = STATE_CHECK == pBox->GetState();
while( pEntry )
{
SectReprPtr pRepr = (SectReprPtr) pEntry->GetUserData();
@@ -922,7 +926,7 @@ IMPL_LINK( SwEditRegionDlg, ChangeHideHdl, TriStateBox *, pBox )
{
if(!CheckPasswd(pBox))
return 0;
- pBox->EnableTriState( FALSE );
+ pBox->EnableTriState( sal_False );
SvLBoxEntry* pEntry=aTree.FirstSelected();
OSL_ENSURE(pEntry,"no entry found");
while( pEntry )
@@ -938,7 +942,7 @@ IMPL_LINK( SwEditRegionDlg, ChangeHideHdl, TriStateBox *, pBox )
pEntry = aTree.NextSelected(pEntry);
}
- BOOL bHide = STATE_CHECK == pBox->GetState();
+ sal_Bool bHide = STATE_CHECK == pBox->GetState();
aConditionED.Enable(bHide);
aConditionFT.Enable(bHide);
return 0;
@@ -951,7 +955,7 @@ IMPL_LINK( SwEditRegionDlg, ChangeEditInReadonlyHdl, TriStateBox *, pBox )
{
if(!CheckPasswd(pBox))
return 0;
- pBox->EnableTriState( FALSE );
+ pBox->EnableTriState( sal_False );
SvLBoxEntry* pEntry=aTree.FirstSelected();
OSL_ENSURE(pEntry,"no entry found");
while( pEntry )
@@ -988,14 +992,14 @@ IMPL_LINK( SwEditRegionDlg, ChangeDismissHdl, CheckBox *, EMPTYARG )
{
const SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData();
SvLBoxEntry* pRemove = 0;
- BOOL bRestart = FALSE;
+ sal_Bool bRestart = sal_False;
if(pSectRepr->IsSelected())
{
aSectReprArr.Insert( pSectRepr );
while( (pChild = aTree.FirstChild(pEntry) )!= 0 )
{
// because of the repositioning we have to start at the beginning again
- bRestart = TRUE;
+ bRestart = sal_True;
pParent=aTree.GetParent(pEntry);
aTree.GetModel()->Move(pChild, pParent, aTree.GetModel()->GetRelPos(pEntry));
}
@@ -1011,20 +1015,20 @@ IMPL_LINK( SwEditRegionDlg, ChangeDismissHdl, CheckBox *, EMPTYARG )
if ( (pEntry=aTree.FirstSelected()) == 0 )
{
- aConditionFT. Enable(FALSE);
- aConditionED. Enable(FALSE);
- aDismiss. Enable(FALSE);
- aCurName. Enable(FALSE);
- aProtectCB. Enable(FALSE);
- aPasswdCB. Enable(FALSE);
- aHideCB. Enable(FALSE);
+ aConditionFT. Enable(sal_False);
+ aConditionED. Enable(sal_False);
+ aDismiss. Enable(sal_False);
+ aCurName. Enable(sal_False);
+ aProtectCB. Enable(sal_False);
+ aPasswdCB. Enable(sal_False);
+ aHideCB. Enable(sal_False);
// edit in readonly sections
- aEditInReadonlyCB.Enable(FALSE);
+ aEditInReadonlyCB.Enable(sal_False);
aEditInReadonlyCB.SetState(STATE_NOCHECK);
aProtectCB. SetState(STATE_NOCHECK);
- aPasswdCB. Check(FALSE);
+ aPasswdCB. Check(sal_False);
aHideCB. SetState(STATE_NOCHECK);
- aFileCB. Check(FALSE);
+ aFileCB. Check(sal_False);
// otherwise the focus would be on HelpButton
aOK.GrabFocus();
UseFileHdl(&aFileCB);
@@ -1040,22 +1044,22 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox )
if(!CheckPasswd(pBox))
return 0;
SvLBoxEntry* pEntry = aTree.FirstSelected();
- pBox->EnableTriState(FALSE);
- BOOL bMulti = 1 < aTree.GetSelectionCount();
- BOOL bFile = pBox->IsChecked();
+ pBox->EnableTriState(sal_False);
+ sal_Bool bMulti = 1 < aTree.GetSelectionCount();
+ sal_Bool bFile = pBox->IsChecked();
if(pEntry)
{
while(pEntry)
{
const SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData();
- BOOL bContent = pSectRepr->IsContent();
+ sal_Bool bContent = pSectRepr->IsContent();
if( pBox->IsChecked() && bContent && rSh.HasSelection() )
{
if( RET_NO == QueryBox( this, SW_RES(QB_CONNECT) ).Execute() )
- pBox->Check( FALSE );
+ pBox->Check( sal_False );
}
if( bFile )
- pSectRepr->SetContent(FALSE);
+ pSectRepr->SetContent(sal_False);
else
{
pSectRepr->SetFile(aEmptyStr);
@@ -1080,23 +1084,23 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox )
}
else
{
- aDDECB.Check(FALSE);
+ aDDECB.Check(sal_False);
DDEHdl(&aDDECB);
aSubRegionED.SetText(aEmptyStr);
}
}
else
{
- pBox->Check(FALSE);
- pBox->Enable(FALSE);
- aFilePB.Enable(FALSE);
- aFileNameED.Enable(FALSE);
- aFileNameFT.Enable(FALSE);
- aSubRegionED.Enable(FALSE);
- aSubRegionFT.Enable(FALSE);
- aDDECB.Check(FALSE);
- aDDECB.Enable(FALSE);
- aDDECommandFT.Enable(FALSE);
+ pBox->Check(sal_False);
+ pBox->Enable(sal_False);
+ aFilePB.Enable(sal_False);
+ aFileNameED.Enable(sal_False);
+ aFileNameFT.Enable(sal_False);
+ aSubRegionED.Enable(sal_False);
+ aSubRegionFT.Enable(sal_False);
+ aDDECB.Check(sal_False);
+ aDDECB.Enable(sal_False);
+ aDDECommandFT.Enable(sal_False);
}
return 0;
}
@@ -1168,19 +1172,19 @@ IMPL_LINK( SwEditRegionDlg, OptionsHdl, PushButton *, EMPTYARG )
*pFtnItem, *pEndItem, *pBalanceItem,
*pFrmDirItem, *pLRSpaceItem;
SfxItemState eColState = pOutSet->GetItemState(
- RES_COL, FALSE, &pColItem );
+ RES_COL, sal_False, &pColItem );
SfxItemState eBrushState = pOutSet->GetItemState(
- RES_BACKGROUND, FALSE, &pBrushItem );
+ RES_BACKGROUND, sal_False, &pBrushItem );
SfxItemState eFtnState = pOutSet->GetItemState(
- RES_FTN_AT_TXTEND, FALSE, &pFtnItem );
+ RES_FTN_AT_TXTEND, sal_False, &pFtnItem );
SfxItemState eEndState = pOutSet->GetItemState(
- RES_END_AT_TXTEND, FALSE, &pEndItem );
+ RES_END_AT_TXTEND, sal_False, &pEndItem );
SfxItemState eBalanceState = pOutSet->GetItemState(
- RES_COLUMNBALANCE, FALSE, &pBalanceItem );
+ RES_COLUMNBALANCE, sal_False, &pBalanceItem );
SfxItemState eFrmDirState = pOutSet->GetItemState(
- RES_FRAMEDIR, FALSE, &pFrmDirItem );
+ RES_FRAMEDIR, sal_False, &pFrmDirItem );
SfxItemState eLRState = pOutSet->GetItemState(
- RES_LR_SPACE, FALSE, &pLRSpaceItem);
+ RES_LR_SPACE, sal_False, &pLRSpaceItem);
if( SFX_ITEM_SET == eColState ||
SFX_ITEM_SET == eBrushState ||
@@ -1239,7 +1243,7 @@ IMPL_LINK( SwEditRegionDlg, FileNameHdl, Edit *, pEdit )
if( aDDECB.IsChecked() )
{
String sLink( pEdit->GetText() );
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while( STRING_NOTFOUND != (nPos = sLink.SearchAscii( " ", nPos )) )
sLink.Erase( nPos--, 1 );
@@ -1279,10 +1283,10 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox )
SvLBoxEntry* pEntry=aTree.FirstSelected();
if(pEntry)
{
- BOOL bFile = aFileCB.IsChecked();
+ sal_Bool bFile = aFileCB.IsChecked();
SectReprPtr pSectRepr = (SectRepr*)pEntry->GetUserData();
SwSectionData & rData( pSectRepr->GetSectionData() );
- BOOL bDDE = pBox->IsChecked();
+ sal_Bool bDDE = pBox->IsChecked();
if(bDDE)
{
aFileNameFT.Hide();
@@ -1297,6 +1301,7 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox )
rData.SetLinkFilePassword( aEmptyStr );
}
rData.SetType(DDE_LINK_SECTION);
+ aFileNameED.SetAccessibleName(aDDECommandFT.GetText());
}
else
{
@@ -1315,6 +1320,7 @@ IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox )
rData.SetLinkFilePassword( aEmptyStr );
aFileNameED.SetText(aEmptyStr);
}
+ aFileNameED.SetAccessibleName(aFileNameFT.GetText());
}
aFilePB.Enable(bFile && !bDDE);
}
@@ -1359,7 +1365,7 @@ IMPL_LINK( SwEditRegionDlg, ChangePasswdHdl, Button *, pBox )
else
{
if(!bChange)
- aPasswdCB.Check(FALSE);
+ aPasswdCB.Check(sal_False);
break;
}
}
@@ -1425,7 +1431,7 @@ IMPL_LINK( SwEditRegionDlg, DlgClosedHdl, sfx2::FileDialogHelper *, _pFileDlg )
sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
sFilterName = pMedium->GetFilter()->GetFilterName();
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, FALSE, &pItem ) )
+ if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, sal_False, &pItem ) )
sPassword = ( (SfxStringItem*)pItem )->GetValue();
::lcl_ReadSections( *pMedium, aSubRegionED );
delete pMedium;
@@ -1475,7 +1481,7 @@ IMPL_LINK( SwEditRegionDlg, SubRegionEventHdl, VclWindowEvent *, pEvent )
return 0;
}
-Image SwEditRegionDlg::BuildBitmap(BOOL bProtect,BOOL bHidden)
+Image SwEditRegionDlg::BuildBitmap( sal_Bool bProtect, sal_Bool bHidden )
{
ImageList& rImgLst = aImageIL;
return rImgLst.GetImage((!bHidden+(bProtect<<1)) + 1);
@@ -1496,7 +1502,7 @@ static void lcl_ReadSections( SfxMedium& rMedium, ComboBox& rBox )
nFormat == SOT_FORMATSTR_ID_STARWRITER_8 || nFormat == SOT_FORMATSTR_ID_STARWRITERGLOB_8)
SwGetReaderXML()->GetSectionList( rMedium, aArr );
- for( USHORT n = 0; n < aArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aArr.Count(); ++n )
rBox.InsertEntry( *aArr[ n ] );
aArr.DeleteAndDestroy(0, aArr.Count());
@@ -1523,7 +1529,7 @@ SwInsertSectionTabDialog::SwInsertSectionTabDialog(
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
long nHtmlMode = pHtmlOpt->GetExportMode();
- BOOL bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
+ sal_Bool bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
if(bWeb)
{
RemoveTabPage(TP_SECTION_FTNENDNOTES);
@@ -1538,7 +1544,7 @@ SwInsertSectionTabDialog::~SwInsertSectionTabDialog()
{
}
-void SwInsertSectionTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SwInsertSectionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
if(TP_INSERT_SECTION == nId)
((SwInsertSectionTabPage&)rPage).SetWrtShell(rWrtSh);
@@ -1552,8 +1558,8 @@ void SwInsertSectionTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
{
const SwFmtFrmSize& rSize = (const SwFmtFrmSize&)GetInputSetImpl()->Get(RES_FRM_SIZE);
((SwColumnPage&)rPage).SetPageWidth(rSize.GetWidth());
- ((SwColumnPage&)rPage).ShowBalance(TRUE);
- ((SwColumnPage&)rPage).SetInSection(TRUE);
+ ((SwColumnPage&)rPage).ShowBalance(sal_True);
+ ((SwColumnPage&)rPage).SetInSection(sal_True);
}
else if(TP_SECTION_INDENTS == nId)
((SwSectionIndentTabPage&)rPage).SetWrtShell(rWrtSh);
@@ -1578,7 +1584,7 @@ short SwInsertSectionTabDialog::Ok()
{
SfxRequest aRequest( pViewFrm, FN_INSERT_REGION);
const SfxPoolItem* pCol;
- if(SFX_ITEM_SET == pOutputItemSet->GetItemState(RES_COL, FALSE, &pCol))
+ if(SFX_ITEM_SET == pOutputItemSet->GetItemState(RES_COL, sal_False, &pCol))
{
aRequest.AppendItem(SfxUInt16Item(SID_ATTR_COLUMNS,
((const SwFmtCol*)pCol)->GetColumns().Count()));
@@ -1649,6 +1655,7 @@ SwInsertSectionTabPage::SwInsertSectionTabPage(
aCurName.SetModifyHdl ( LINK( this, SwInsertSectionTabPage, NameEditHdl));
aDDECB.SetClickHdl ( LINK( this, SwInsertSectionTabPage, DDEHdl ));
ChangeProtectHdl(&aProtectCB);
+ aPasswdPB.SetAccessibleRelationMemberOf(&aProtectFL);
aSubRegionED.EnableAutocomplete( sal_True, sal_True );
}
@@ -1661,7 +1668,7 @@ void SwInsertSectionTabPage::SetWrtShell(SwWrtShell& rSh)
{
m_pWrtSh = &rSh;
- BOOL bWeb = 0 != PTR_CAST(SwWebDocShell, m_pWrtSh->GetView().GetDocShell());
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebDocShell, m_pWrtSh->GetView().GetDocShell());
if(bWeb)
{
aHideCB .Hide();
@@ -1693,11 +1700,11 @@ void SwInsertSectionTabPage::SetWrtShell(SwWrtShell& rSh)
}
}
-BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
+sal_Bool SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
{
SwSectionData aSection(CONTENT_SECTION, aCurName.GetText());
aSection.SetCondition(aConditionED.GetText());
- BOOL bProtected = aProtectCB.IsChecked();
+ sal_Bool bProtected = aProtectCB.IsChecked();
aSection.SetProtectFlag(bProtected);
aSection.SetHidden(aHideCB.IsChecked());
// edit in readonly sections
@@ -1709,7 +1716,7 @@ BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
}
String sFileName = aFileNameED.GetText();
String sSubRegion = aSubRegionED.GetText();
- BOOL bDDe = aDDECB.IsChecked();
+ sal_Bool bDDe = aDDECB.IsChecked();
if(aFileCB.IsChecked() && (sFileName.Len() || sSubRegion.Len() || bDDe))
{
String aLinkFile;
@@ -1717,7 +1724,7 @@ BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
{
aLinkFile = sFileName;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while( STRING_NOTFOUND != (nPos = aLinkFile.SearchAscii( " ", nPos )) )
aLinkFile.Erase( nPos--, 1 );
@@ -1752,7 +1759,7 @@ BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
}
}
((SwInsertSectionTabDialog*)GetTabDialog())->SetSectionData(aSection);
- return TRUE;
+ return sal_True;
}
void SwInsertSectionTabPage::Reset( const SfxItemSet& )
@@ -1767,7 +1774,7 @@ SfxTabPage* SwInsertSectionTabPage::Create( Window* pParent,
IMPL_LINK( SwInsertSectionTabPage, ChangeHideHdl, CheckBox *, pBox )
{
- BOOL bHide = pBox->IsChecked();
+ sal_Bool bHide = pBox->IsChecked();
aConditionED.Enable(bHide);
aConditionFT.Enable(bHide);
return 0;
@@ -1809,7 +1816,7 @@ IMPL_LINK( SwInsertSectionTabPage, ChangePasswdHdl, Button *, pButton )
}
}
else if(!bChange)
- aPasswdCB.Check(FALSE);
+ aPasswdCB.Check(sal_False);
}
}
else
@@ -1831,10 +1838,10 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, CheckBox *, pBox )
{
if( m_pWrtSh->HasSelection() &&
RET_NO == QueryBox( this, SW_RES(QB_CONNECT) ).Execute() )
- pBox->Check( FALSE );
+ pBox->Check( sal_False );
}
- BOOL bFile = pBox->IsChecked();
+ sal_Bool bFile = pBox->IsChecked();
aFileNameFT.Enable(bFile);
aFileNameED.Enable(bFile);
aFilePB.Enable(bFile);
@@ -1845,11 +1852,11 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, CheckBox *, pBox )
if( bFile )
{
aFileNameED.GrabFocus();
- aProtectCB.Check( TRUE );
+ aProtectCB.Check( sal_True );
}
else
{
- aDDECB.Check(FALSE);
+ aDDECB.Check(sal_False);
DDEHdl(&aDDECB);
}
return 0;
@@ -1868,8 +1875,8 @@ IMPL_LINK( SwInsertSectionTabPage, FileSearchHdl, PushButton *, EMPTYARG )
IMPL_LINK( SwInsertSectionTabPage, DDEHdl, CheckBox*, pBox )
{
- BOOL bDDE = pBox->IsChecked();
- BOOL bFile = aFileCB.IsChecked();
+ sal_Bool bDDE = pBox->IsChecked();
+ sal_Bool bFile = aFileCB.IsChecked();
aFilePB.Enable(!bDDE && bFile);
if(bDDE)
{
@@ -1878,6 +1885,7 @@ IMPL_LINK( SwInsertSectionTabPage, DDEHdl, CheckBox*, pBox )
aDDECommandFT.Show();
aSubRegionFT.Hide();
aSubRegionED.Hide();
+ aFileNameED.SetAccessibleName(aDDECommandFT.GetText());
}
else
{
@@ -1887,6 +1895,7 @@ IMPL_LINK( SwInsertSectionTabPage, DDEHdl, CheckBox*, pBox )
aSubRegionFT.Show();
aSubRegionED.Show();
aSubRegionED.Enable(bFile);
+ aFileNameED.SetAccessibleName(aFileNameFT.GetText());
}
return 0;
}
@@ -1901,7 +1910,7 @@ IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFil
m_sFileName = pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE );
m_sFilterName = pMedium->GetFilter()->GetFilterName();
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, FALSE, &pItem ) )
+ if ( SFX_ITEM_SET == pMedium->GetItemSet()->GetItemState( SID_PASSWORD, sal_False, &pItem ) )
m_sFilePasswd = ( (SfxStringItem*)pItem )->GetValue();
aFileNameED.SetText( INetURLObject::decode(
m_sFileName, INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_UTF8 ) );
@@ -1928,12 +1937,12 @@ IMPL_LINK( SwInsertSectionTabPage, DlgClosedHdl, sfx2::FileDialogHelper *, _pFil
// 5 - A, .., AA, .., - 9
// 6 - a, .., aa, .., - 10
-inline USHORT GetNumPos( USHORT n )
+inline sal_uInt16 GetNumPos( sal_uInt16 n )
{
return SVX_NUM_ARABIC < n ? n - 4 : n;
}
-inline SvxExtNumType GetNumType( USHORT n )
+inline SvxExtNumType GetNumType( sal_uInt16 n )
{
return (SvxExtNumType)(4 < n ? n + 4 : n );
}
@@ -1984,7 +1993,7 @@ SwSectionFtnEndTabPage::~SwSectionFtnEndTabPage()
{
}
-BOOL SwSectionFtnEndTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SwSectionFtnEndTabPage::FillItemSet( SfxItemSet& rSet )
{
SwFmtFtnAtTxtEnd aFtn( aFtnNtAtTextEndCB.IsChecked()
? ( aFtnNtNumCB.IsChecked()
@@ -2003,7 +2012,7 @@ BOOL SwSectionFtnEndTabPage::FillItemSet( SfxItemSet& rSet )
// no break;
case FTNEND_ATTXTEND_OWNNUMSEQ:
- aFtn.SetOffset( static_cast< USHORT >( aFtnOffsetFld.GetValue()-1 ) );
+ aFtn.SetOffset( static_cast< sal_uInt16 >( aFtnOffsetFld.GetValue()-1 ) );
// no break;
}
@@ -2024,17 +2033,17 @@ BOOL SwSectionFtnEndTabPage::FillItemSet( SfxItemSet& rSet )
// no break;
case FTNEND_ATTXTEND_OWNNUMSEQ:
- aEnd.SetOffset( static_cast< USHORT >( aEndOffsetFld.GetValue()-1 ) );
+ aEnd.SetOffset( static_cast< sal_uInt16 >( aEndOffsetFld.GetValue()-1 ) );
// no break;
}
rSet.Put( aFtn );
rSet.Put( aEnd );
- return TRUE;
+ return sal_True;
}
-void SwSectionFtnEndTabPage::ResetState( BOOL bFtn,
+void SwSectionFtnEndTabPage::ResetState( sal_Bool bFtn,
const SwFmtFtnEndAtTxtEnd& rAttr )
{
CheckBox *pNtAtTextEndCB, *pNtNumCB, *pNtNumFmtCB;
@@ -2071,7 +2080,7 @@ void SwSectionFtnEndTabPage::ResetState( BOOL bFtn,
pOffsetFld = &aEndOffsetFld;
}
- USHORT eState = rAttr.GetValue();
+ sal_uInt16 eState = rAttr.GetValue();
switch( eState )
{
case FTNEND_ATTXTEND_OWNNUMANDFMT:
@@ -2095,31 +2104,31 @@ void SwSectionFtnEndTabPage::ResetState( BOOL bFtn,
switch( eState )
{
case FTNEND_ATPGORDOCEND:
- pNtNumCB->Enable( FALSE );
+ pNtNumCB->Enable( sal_False );
// no break;
case FTNEND_ATTXTEND:
- pNtNumFmtCB->Enable( FALSE );
- pOffsetFld->Enable( FALSE );
- pOffsetTxt->Enable( FALSE );
+ pNtNumFmtCB->Enable( sal_False );
+ pOffsetFld->Enable( sal_False );
+ pOffsetTxt->Enable( sal_False );
// no break;
case FTNEND_ATTXTEND_OWNNUMSEQ:
- pNumViewBox->Enable( FALSE );
- pPrefixFT->Enable( FALSE );
- pPrefixED->Enable( FALSE );
- pSuffixFT->Enable( FALSE );
- pSuffixED->Enable( FALSE );
+ pNumViewBox->Enable( sal_False );
+ pPrefixFT->Enable( sal_False );
+ pPrefixED->Enable( sal_False );
+ pSuffixFT->Enable( sal_False );
+ pSuffixED->Enable( sal_False );
// no break;
}
}
void SwSectionFtnEndTabPage::Reset( const SfxItemSet& rSet )
{
- ResetState( TRUE, (const SwFmtFtnAtTxtEnd&)rSet.Get(
- RES_FTN_AT_TXTEND, FALSE ));
- ResetState( FALSE, (const SwFmtEndAtTxtEnd&)rSet.Get(
- RES_END_AT_TXTEND, FALSE ));
+ ResetState( sal_True, (const SwFmtFtnAtTxtEnd&)rSet.Get(
+ RES_FTN_AT_TXTEND, sal_False ));
+ ResetState( sal_False, (const SwFmtEndAtTxtEnd&)rSet.Get(
+ RES_END_AT_TXTEND, sal_False ));
}
SfxTabPage* SwSectionFtnEndTabPage::Create( Window* pParent,
@@ -2130,7 +2139,7 @@ SfxTabPage* SwSectionFtnEndTabPage::Create( Window* pParent,
IMPL_LINK( SwSectionFtnEndTabPage, FootEndHdl, CheckBox *, pBox )
{
- BOOL bFoot = &aFtnNtAtTextEndCB == pBox || &aFtnNtNumCB == pBox ||
+ sal_Bool bFoot = &aFtnNtAtTextEndCB == pBox || &aFtnNtNumCB == pBox ||
&aFtnNtNumFmtCB == pBox ;
CheckBox *pNumBox, *pNumFmtBox, *pEndBox;
@@ -2167,9 +2176,9 @@ IMPL_LINK( SwSectionFtnEndTabPage, FootEndHdl, CheckBox *, pBox )
pSuffixED = &aEndSuffixED;
}
- BOOL bEnableAtEnd = STATE_CHECK == pEndBox->GetState();
- BOOL bEnableNum = bEnableAtEnd && STATE_CHECK == pNumBox->GetState();
- BOOL bEnableNumFmt = bEnableNum && STATE_CHECK == pNumFmtBox->GetState();
+ sal_Bool bEnableAtEnd = STATE_CHECK == pEndBox->GetState();
+ sal_Bool bEnableNum = bEnableAtEnd && STATE_CHECK == pNumBox->GetState();
+ sal_Bool bEnableNumFmt = bEnableNum && STATE_CHECK == pNumFmtBox->GetState();
pNumBox->Enable( bEnableAtEnd );
pOffsetTxt->Enable( bEnableNum );
@@ -2199,7 +2208,7 @@ SwSectionPropertyTabDialog::SwSectionPropertyTabDialog(
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
long nHtmlMode = pHtmlOpt->GetExportMode();
- BOOL bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
+ sal_Bool bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
if(bWeb)
{
RemoveTabPage(TP_SECTION_FTNENDNOTES);
@@ -2213,7 +2222,7 @@ SwSectionPropertyTabDialog::~SwSectionPropertyTabDialog()
{
}
-void SwSectionPropertyTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SwSectionPropertyTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
if( TP_BACKGROUND == nId )
{
@@ -2223,8 +2232,8 @@ void SwSectionPropertyTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
}
else if( TP_COLUMN == nId )
{
- ((SwColumnPage&)rPage).ShowBalance(TRUE);
- ((SwColumnPage&)rPage).SetInSection(TRUE);
+ ((SwColumnPage&)rPage).ShowBalance(sal_True);
+ ((SwColumnPage&)rPage).SetInSection(sal_True);
}
else if(TP_SECTION_INDENTS == nId)
((SwSectionIndentTabPage&)rPage).SetWrtShell(rWrtSh);
@@ -2243,13 +2252,14 @@ SwSectionIndentTabPage::SwSectionIndentTabPage( Window *pParent, const SfxItemSe
Link aLk = LINK(this, SwSectionIndentTabPage, IndentModifyHdl);
aBeforeMF.SetModifyHdl(aLk);
aAfterMF.SetModifyHdl(aLk);
+ aPreviewWin.SetAccessibleName(aIndentFL.GetText());
}
SwSectionIndentTabPage::~SwSectionIndentTabPage()
{
}
-BOOL SwSectionIndentTabPage::FillItemSet( SfxItemSet& rSet)
+sal_Bool SwSectionIndentTabPage::FillItemSet( SfxItemSet& rSet)
{
if(aBeforeMF.IsValueModified() ||
aAfterMF.IsValueModified())
@@ -2259,13 +2269,13 @@ BOOL SwSectionIndentTabPage::FillItemSet( SfxItemSet& rSet)
static_cast< long >(aAfterMF.Denormalize(aAfterMF.GetValue(FUNIT_TWIP))), 0, 0, RES_LR_SPACE);
rSet.Put(aLRSpace);
}
- return TRUE;
+ return sal_True;
}
void SwSectionIndentTabPage::Reset( const SfxItemSet& rSet)
{
//this page doesn't show up in HTML mode
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric(aBeforeMF, aMetric);
SetMetric(aAfterMF , aMetric);
@@ -2307,7 +2317,7 @@ IMPL_LINK(SwSectionIndentTabPage, IndentModifyHdl, MetricField*, EMPTYARG)
{
aPreviewWin.SetLeftMargin( static_cast< long >(aBeforeMF.Denormalize(aBeforeMF.GetValue(FUNIT_TWIP))) );
aPreviewWin.SetRightMargin( static_cast< long >(aAfterMF.Denormalize(aAfterMF.GetValue(FUNIT_TWIP))) );
- aPreviewWin.Draw(TRUE);
+ aPreviewWin.Draw(sal_True);
return 0;
}
diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx
index e2b5afc9e020..23d54bfa0d80 100644
--- a/sw/source/ui/dochdl/gloshdl.cxx
+++ b/sw/source/ui/dochdl/gloshdl.cxx
@@ -123,7 +123,7 @@ void SwGlossaryHdl::GlossaryDlg()
Description: set the default group; if called from the dialog
the group is created temporarily for faster access
------------------------------------------------------------------------*/
-void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreateNew )
+void SwGlossaryHdl::SetCurGroup(const String &rGrp, sal_Bool bApi, sal_Bool bAlwaysCreateNew )
{
String sGroup(rGrp);
if(STRING_NOTFOUND == sGroup.Search(GLOS_DELIM) && !FindGroupName(sGroup))
@@ -133,7 +133,7 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreat
}
if(pCurGrp)
{
- BOOL bPathEqual = FALSE;
+ sal_Bool bPathEqual = sal_False;
if(!bAlwaysCreateNew)
{
INetURLObject aTemp( pCurGrp->GetFileName() );
@@ -141,8 +141,8 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreat
aTemp.removeSegment();
const String sCurEntryPath = aTemp.GetMainURL(INetURLObject::NO_DECODE);
const SvStrings* pPathArr = rStatGlossaries.GetPathArray();
- USHORT nCurrentPath = USHRT_MAX;
- for(USHORT nPath = 0; nPath < pPathArr->Count(); nPath++)
+ sal_uInt16 nCurrentPath = USHRT_MAX;
+ for(sal_uInt16 nPath = 0; nPath < pPathArr->Count(); nPath++)
{
if(sCurEntryPath == *(*pPathArr)[nPath])
{
@@ -151,10 +151,10 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreat
}
}
String sPath = sGroup.GetToken(1, GLOS_DELIM);
- USHORT nComparePath = (USHORT)sPath.ToInt32();
+ sal_uInt16 nComparePath = (sal_uInt16)sPath.ToInt32();
if(nCurrentPath == nComparePath &&
sGroup.GetToken(0, GLOS_DELIM) == sCurBase)
- bPathEqual = TRUE;
+ bPathEqual = sal_True;
}
// When path changed, the name is not reliable
@@ -169,21 +169,21 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, BOOL bApi, BOOL bAlwaysCreat
rStatGlossaries.PutGroupDoc(pCurGrp);
pCurGrp = 0;
}
- pCurGrp = rStatGlossaries.GetGroupDoc(aCurGrp, TRUE);
+ pCurGrp = rStatGlossaries.GetGroupDoc(aCurGrp, sal_True);
}
}
-USHORT SwGlossaryHdl::GetGroupCnt() const
+sal_uInt16 SwGlossaryHdl::GetGroupCnt() const
{
return rStatGlossaries.GetGroupCnt();
}
-String SwGlossaryHdl::GetGroupName( USHORT nId, String* pTitle )
+String SwGlossaryHdl::GetGroupName( sal_uInt16 nId, String* pTitle )
{
String sRet = rStatGlossaries.GetGroupName(nId);
if(pTitle)
{
- SwTextBlocks* pGroup = rStatGlossaries.GetGroupDoc(sRet, FALSE);
+ SwTextBlocks* pGroup = rStatGlossaries.GetGroupDoc(sRet, sal_False);
if(pGroup && !pGroup->GetError())
{
*pTitle = pGroup->GetName();
@@ -200,27 +200,27 @@ String SwGlossaryHdl::GetGroupName( USHORT nId, String* pTitle )
return sRet;
}
-BOOL SwGlossaryHdl::NewGroup(String &rGrpName, const String& rTitle)
+sal_Bool SwGlossaryHdl::NewGroup(String &rGrpName, const String& rTitle)
{
if(STRING_NOTFOUND == rGrpName.Search(GLOS_DELIM))
FindGroupName(rGrpName);
return rStatGlossaries.NewGroupDoc(rGrpName, rTitle);
}
-BOOL SwGlossaryHdl::RenameGroup(const String & rOld, String& rNew, const String& rNewTitle)
+sal_Bool SwGlossaryHdl::RenameGroup(const String & rOld, String& rNew, const String& rNewTitle)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
String sOldGroup(rOld);
if(STRING_NOTFOUND == rOld.Search(GLOS_DELIM))
FindGroupName(sOldGroup);
if(rOld == rNew)
{
- SwTextBlocks* pGroup = rStatGlossaries.GetGroupDoc(sOldGroup, FALSE);
+ SwTextBlocks* pGroup = rStatGlossaries.GetGroupDoc(sOldGroup, sal_False);
if(pGroup)
{
pGroup->SetName(rNewTitle);
rStatGlossaries.PutGroupDoc( pGroup );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else
@@ -237,19 +237,19 @@ BOOL SwGlossaryHdl::RenameGroup(const String & rOld, String& rNew, const String&
return bRet;
}
-BOOL SwGlossaryHdl::CopyOrMove( const String& rSourceGroupName, String& rSourceShortName,
- const String& rDestGroupName, const String& rLongName, BOOL bMove )
+sal_Bool SwGlossaryHdl::CopyOrMove( const String& rSourceGroupName, String& rSourceShortName,
+ const String& rDestGroupName, const String& rLongName, sal_Bool bMove )
{
- SwTextBlocks* pSourceGroup = rStatGlossaries.GetGroupDoc(rSourceGroupName, FALSE);
+ SwTextBlocks* pSourceGroup = rStatGlossaries.GetGroupDoc(rSourceGroupName, sal_False);
- SwTextBlocks* pDestGroup = rStatGlossaries.GetGroupDoc(rDestGroupName, FALSE);
+ SwTextBlocks* pDestGroup = rStatGlossaries.GetGroupDoc(rDestGroupName, sal_False);
if(pDestGroup->IsReadOnly() || (bMove && pSourceGroup->IsReadOnly()) )
- return FALSE;
+ return sal_False;
//The index must be determined here because rSourceShortName maybe changed in CopyBlock
- USHORT nDeleteIdx = pSourceGroup->GetIndex( rSourceShortName );
+ sal_uInt16 nDeleteIdx = pSourceGroup->GetIndex( rSourceShortName );
OSL_ENSURE(USHRT_MAX != nDeleteIdx, "entry not found");
- ULONG nRet = pSourceGroup->CopyBlock( *pDestGroup, rSourceShortName, rLongName );
+ sal_uLong nRet = pSourceGroup->CopyBlock( *pDestGroup, rSourceShortName, rLongName );
if(!nRet && bMove)
{
// the index must be existing
@@ -263,7 +263,7 @@ BOOL SwGlossaryHdl::CopyOrMove( const String& rSourceGroupName, String& rSource
/*------------------------------------------------------------------------
Description: delete a autotext-file-group
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::DelGroup(const String &rGrpName)
+sal_Bool SwGlossaryHdl::DelGroup(const String &rGrpName)
{
String sGroup(rGrpName);
if(STRING_NOTFOUND == sGroup.Search(GLOS_DELIM))
@@ -276,26 +276,26 @@ BOOL SwGlossaryHdl::DelGroup(const String &rGrpName)
if(aMac_Tmp == sGroup)
DELETEZ(pCurGrp);
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*------------------------------------------------------------------------
Description: ask for number of autotexts
------------------------------------------------------------------------*/
-USHORT SwGlossaryHdl::GetGlossaryCnt()
+sal_uInt16 SwGlossaryHdl::GetGlossaryCnt()
{
return pCurGrp ? pCurGrp->GetCount() : 0;
}
-String SwGlossaryHdl::GetGlossaryName( USHORT nId )
+String SwGlossaryHdl::GetGlossaryName( sal_uInt16 nId )
{
OSL_ENSURE(nId < GetGlossaryCnt(), "Textbausteinarray ueberindiziert.");
return pCurGrp->GetLongName( nId );
}
-String SwGlossaryHdl::GetGlossaryShortName(USHORT nId)
+String SwGlossaryHdl::GetGlossaryShortName(sal_uInt16 nId)
{
OSL_ENSURE(nId < GetGlossaryCnt(), "Textbausteinarray ueberindiziert.");
return pCurGrp->GetShortName( nId );
@@ -308,11 +308,11 @@ String SwGlossaryHdl::GetGlossaryShortName(const String &rName)
{
String sReturn;
SwTextBlocks *pTmp =
- pCurGrp ? pCurGrp: rStatGlossaries.GetGroupDoc( aCurGrp, FALSE );
+ pCurGrp ? pCurGrp: rStatGlossaries.GetGroupDoc( aCurGrp, sal_False );
if(pTmp)
{
- USHORT nIdx = pTmp->GetLongIndex( rName );
- if( nIdx != (USHORT) -1 )
+ sal_uInt16 nIdx = pTmp->GetLongIndex( rName );
+ if( nIdx != (sal_uInt16) -1 )
sReturn = pTmp->GetShortName( nIdx );
if( !pCurGrp )
rStatGlossaries.PutGroupDoc( pTmp );
@@ -323,79 +323,79 @@ String SwGlossaryHdl::GetGlossaryShortName(const String &rName)
/*------------------------------------------------------------------------
Description: short name for autotext already used?
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::HasShortName(const String& rShortName) const
+sal_Bool SwGlossaryHdl::HasShortName(const String& rShortName) const
{
SwTextBlocks *pBlock = pCurGrp ? pCurGrp
: rStatGlossaries.GetGroupDoc( aCurGrp );
- BOOL bRet = pBlock->GetIndex( rShortName ) != (USHORT) -1;
+ sal_Bool bRet = pBlock->GetIndex( rShortName ) != (sal_uInt16) -1;
if( !pCurGrp )
rStatGlossaries.PutGroupDoc( pBlock );
return bRet;
}
-BOOL SwGlossaryHdl::ConvertToNew(SwTextBlocks& /*rOld*/)
+sal_Bool SwGlossaryHdl::ConvertToNew(SwTextBlocks& /*rOld*/)
{
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
Desription: Create autotext
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::NewGlossary(const String& rName, const String& rShortName,
- BOOL bCreateGroup, BOOL bNoAttr)
+sal_Bool SwGlossaryHdl::NewGlossary(const String& rName, const String& rShortName,
+ sal_Bool bCreateGroup, sal_Bool bNoAttr)
{
SwTextBlocks *pTmp =
pCurGrp ? pCurGrp: rStatGlossaries.GetGroupDoc( aCurGrp, bCreateGroup );
//pTmp == 0 if the AutoText path setting is wrong
if(!pTmp)
- return FALSE;
+ return sal_False;
if(!ConvertToNew(*pTmp))
- return FALSE;
+ return sal_False;
String sOnlyTxt;
String* pOnlyTxt = 0;
if( bNoAttr )
{
if( !pWrtShell->GetSelectedText( sOnlyTxt, GETSELTXT_PARABRK_TO_ONLYCR ))
- return FALSE;
+ return sal_False;
pOnlyTxt = &sOnlyTxt;
}
const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
- const USHORT nSuccess = pWrtShell->MakeGlossary( *pTmp, rName, rShortName,
+ const sal_uInt16 nSuccess = pWrtShell->MakeGlossary( *pTmp, rName, rShortName,
pCfg->IsSaveRelFile(), pOnlyTxt );
- if(nSuccess == (USHORT) -1 )
+ if(nSuccess == (sal_uInt16) -1 )
{
InfoBox(pWrtShell->GetView().GetWindow(), SW_RES(MSG_ERR_INSERT_GLOS)).Execute();
}
if( !pCurGrp )
rStatGlossaries.PutGroupDoc( pTmp );
- return BOOL( nSuccess != (USHORT) -1 );
+ return sal_Bool( nSuccess != (sal_uInt16) -1 );
}
/*------------------------------------------------------------------------
Description: Delete a autotext
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::DelGlossary(const String &rShortName)
+sal_Bool SwGlossaryHdl::DelGlossary(const String &rShortName)
{
SwTextBlocks *pGlossary = pCurGrp ? pCurGrp
: rStatGlossaries.GetGroupDoc(aCurGrp);
//pTmp == 0 if the AutoText path setting is wrong
if(!pGlossary || !ConvertToNew(*pGlossary))
- return FALSE;
+ return sal_False;
- USHORT nIdx = pGlossary->GetIndex( rShortName );
- if( nIdx != (USHORT) -1 )
+ sal_uInt16 nIdx = pGlossary->GetIndex( rShortName );
+ if( nIdx != (sal_uInt16) -1 )
pGlossary->Delete( nIdx );
if( !pCurGrp )
rStatGlossaries.PutGroupDoc( pGlossary );
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
Description: expand short name
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::ExpandGlossary()
+sal_Bool SwGlossaryHdl::ExpandGlossary()
{
OSL_ENSURE(pWrtShell->CanInsert(), "illegal");
SwTextBlocks *pGlossary;
@@ -429,37 +429,37 @@ BOOL SwGlossaryHdl::ExpandGlossary()
if(pWrtShell->IsSelection())
aShortName = pWrtShell->GetSelTxt();
}
- return pGlossary ? Expand( aShortName, &rStatGlossaries, pGlossary ) : FALSE;
+ return pGlossary ? Expand( aShortName, &rStatGlossaries, pGlossary ) : sal_False;
}
-BOOL SwGlossaryHdl::Expand( const String& rShortName,
+sal_Bool SwGlossaryHdl::Expand( const String& rShortName,
SwGlossaries *pGlossaries,
SwTextBlocks *pGlossary )
{
TextBlockInfoArr aFoundArr;
String aShortName( rShortName );
- BOOL bCancel = FALSE;
+ sal_Bool bCancel = sal_False;
// search for text block
//#b6633427# - don't prefer current group depending on configuration setting
const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
- USHORT nFound = !pCfg->IsSearchInAllCategories() ? pGlossary->GetIndex( aShortName ) : -1;
+ sal_uInt16 nFound = !pCfg->IsSearchInAllCategories() ? pGlossary->GetIndex( aShortName ) : -1;
// if not found then search in all groups
- if( nFound == (USHORT) -1 )
+ if( nFound == (sal_uInt16) -1 )
{
const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore();
SwGlossaryList* pGlossaryList = ::GetGlossaryList();
- USHORT nGroupCount = pGlossaryList->GetGroupCount();
- for(USHORT i = 1; i <= nGroupCount; i++)
+ sal_uInt16 nGroupCount = pGlossaryList->GetGroupCount();
+ for(sal_uInt16 i = 1; i <= nGroupCount; i++)
{
// get group name with path-extension
String sTitle;
- String sGroupName = pGlossaryList->GetGroupName(i - 1, FALSE, &sTitle);
+ String sGroupName = pGlossaryList->GetGroupName(i - 1, sal_False, &sTitle);
if(sGroupName == pGlossary->GetName())
continue;
- USHORT nBlockCount = pGlossaryList->GetBlockCount(i -1);
+ sal_uInt16 nBlockCount = pGlossaryList->GetBlockCount(i -1);
if(nBlockCount)
{
- for(USHORT j = 0; j < nBlockCount; j++)
+ for(sal_uInt16 j = 0; j < nBlockCount; j++)
{
String sEntry;
String sLongName(pGlossaryList->GetBlockName(i - 1, j, sEntry));
@@ -490,13 +490,13 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
AbstractSwSelGlossaryDlg* pDlg = pFact->CreateSwSelGlossaryDlg( 0, aShortName, DLG_SEL_GLOS );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
- for(USHORT i = 0; i < aFoundArr.Count(); ++i)
+ for(sal_uInt16 i = 0; i < aFoundArr.Count(); ++i)
{
TextBlockInfo_Impl* pData = aFoundArr.GetObject(i);
pDlg->InsertGlos(pData->sTitle, pData->sLongName);
}
pDlg->SelectEntryPos(0);
- const USHORT nRet = RET_OK == pDlg->Execute()?
+ const sal_uInt16 nRet = RET_OK == pDlg->Execute()?
pDlg->GetSelectedIdx():
LISTBOX_ENTRY_NOTFOUND;
delete pDlg;
@@ -508,21 +508,21 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
}
else
{
- nFound = (USHORT) -1;
- bCancel = TRUE;
+ nFound = (sal_uInt16) -1;
+ bCancel = sal_True;
}
}
}
}
// not found
- if( nFound == (USHORT) -1 )
+ if( nFound == (sal_uInt16) -1 )
{
if( !bCancel )
{
pGlossaries->PutGroupDoc(pGlossary);
- const USHORT nMaxLen = 50;
+ const sal_uInt16 nMaxLen = 50;
if(pWrtShell->IsSelection() && aShortName.Len() > nMaxLen)
{
aShortName.Erase(nMaxLen);
@@ -533,7 +533,7 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
InfoBox( pWrtShell->GetView().GetWindow(), aTmp ).Execute();
}
- return FALSE;
+ return sal_False;
}
else
{
@@ -554,7 +554,7 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
pWrtShell->StartAllAction();
// cache all InputFields
- SwInputFieldList aFldLst( pWrtShell, TRUE );
+ SwInputFieldList aFldLst( pWrtShell, sal_True );
pWrtShell->InsertGlossary(*pGlossary, aShortName);
pWrtShell->EndAllAction();
@@ -569,13 +569,13 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
pWrtShell->UpdateInputFlds( &aFldLst );
}
pGlossaries->PutGroupDoc(pGlossary);
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
Description: add autotext
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::InsertGlossary(const String &rName)
+sal_Bool SwGlossaryHdl::InsertGlossary(const String &rName)
{
OSL_ENSURE(pWrtShell->CanInsert(), "illegal");
@@ -583,7 +583,7 @@ BOOL SwGlossaryHdl::InsertGlossary(const String &rName)
pCurGrp? pCurGrp: rStatGlossaries.GetGroupDoc(aCurGrp);
if (!pGlos)
- return FALSE;
+ return sal_False;
SvxMacro aStartMacro(aEmptyStr, aEmptyStr, STARBASIC);
SvxMacro aEndMacro(aEmptyStr, aEmptyStr, STARBASIC);
@@ -600,7 +600,7 @@ BOOL SwGlossaryHdl::InsertGlossary(const String &rName)
pWrtShell->StartAllAction();
// cache all InputFields
- SwInputFieldList aFldLst( pWrtShell, TRUE );
+ SwInputFieldList aFldLst( pWrtShell, sal_True );
pWrtShell->InsertGlossary(*pGlos, rName);
pWrtShell->EndAllAction();
@@ -615,7 +615,7 @@ BOOL SwGlossaryHdl::InsertGlossary(const String &rName)
if(!pCurGrp)
rStatGlossaries.PutGroupDoc(pGlos);
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
@@ -634,7 +634,7 @@ void SwGlossaryHdl::SetMacros(const String& rShortName,
aMacroTbl.Insert( SW_EVENT_START_INS_GLOSSARY, new SvxMacro(*pStart));
if( pEnd )
aMacroTbl.Insert( SW_EVENT_END_INS_GLOSSARY, new SvxMacro(*pEnd));
- USHORT nIdx = pGlos->GetIndex( rShortName );
+ sal_uInt16 nIdx = pGlos->GetIndex( rShortName );
if( !pGlos->SetMacroTable( nIdx, aMacroTbl ) && pGlos->GetError() )
ErrorHandler::HandleError( pGlos->GetError() );
@@ -650,7 +650,7 @@ void SwGlossaryHdl::GetMacros( const String &rShortName,
SwTextBlocks *pGlos = pGlossary ? pGlossary
: pCurGrp ? pCurGrp
: rStatGlossaries.GetGroupDoc(aCurGrp);
- USHORT nIndex = pGlos->GetIndex( rShortName );
+ sal_uInt16 nIndex = pGlos->GetIndex( rShortName );
if( nIndex != USHRT_MAX )
{
SvxMacroTableDtor aMacroTbl;
@@ -692,20 +692,20 @@ SwGlossaryHdl::~SwGlossaryHdl()
/*------------------------------------------------------------------------
Description: rename an autotext
------------------------------------------------------------------------*/
-BOOL SwGlossaryHdl::Rename(const String& rOldShort, const String& rNewShortName,
+sal_Bool SwGlossaryHdl::Rename(const String& rOldShort, const String& rNewShortName,
const String& rNewName )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwTextBlocks *pGlossary = pCurGrp ? pCurGrp
: rStatGlossaries.GetGroupDoc(aCurGrp);
if(pGlossary)
{
if(!ConvertToNew(*pGlossary))
- return FALSE;
+ return sal_False;
- USHORT nIdx = pGlossary->GetIndex( rOldShort );
- USHORT nOldLongIdx = pGlossary->GetLongIndex( rNewName );
- USHORT nOldIdx = pGlossary->GetIndex( rNewShortName );
+ sal_uInt16 nIdx = pGlossary->GetIndex( rOldShort );
+ sal_uInt16 nOldLongIdx = pGlossary->GetLongIndex( rNewName );
+ sal_uInt16 nOldIdx = pGlossary->GetIndex( rNewShortName );
if( nIdx != USHRT_MAX &&
(nOldLongIdx == USHRT_MAX || nOldLongIdx == nIdx )&&
@@ -723,7 +723,7 @@ BOOL SwGlossaryHdl::Rename(const String& rOldShort, const String& rNewShortName,
}
-BOOL SwGlossaryHdl::IsReadOnly( const String* pGrpNm ) const
+sal_Bool SwGlossaryHdl::IsReadOnly( const String* pGrpNm ) const
{
SwTextBlocks *pGlossary = 0;
@@ -734,18 +734,18 @@ BOOL SwGlossaryHdl::IsReadOnly( const String* pGrpNm ) const
else
pGlossary = rStatGlossaries.GetGroupDoc(aCurGrp);
- BOOL bRet = pGlossary ? pGlossary->IsReadOnly() : TRUE;
+ sal_Bool bRet = pGlossary ? pGlossary->IsReadOnly() : sal_True;
if( pGrpNm || !pCurGrp )
delete pGlossary;
return bRet;
}
-BOOL SwGlossaryHdl::IsOld() const
+sal_Bool SwGlossaryHdl::IsOld() const
{
SwTextBlocks *pGlossary = pCurGrp ? pCurGrp
: rStatGlossaries.GetGroupDoc(aCurGrp);
- BOOL bRet = pGlossary ? pGlossary->IsOld() : FALSE;
+ sal_Bool bRet = pGlossary ? pGlossary->IsOld() : sal_False;
if( !pCurGrp )
delete pGlossary;
return bRet;
@@ -754,12 +754,12 @@ BOOL SwGlossaryHdl::IsOld() const
/*--------------------------------------------------
find group without path index
--------------------------------------------------*/
-BOOL SwGlossaryHdl::FindGroupName(String & rGroup)
+sal_Bool SwGlossaryHdl::FindGroupName(String & rGroup)
{
return rStatGlossaries.FindGroupName(rGroup);
}
-BOOL SwGlossaryHdl::CopyToClipboard(SwWrtShell& rSh, const String& rShortName)
+sal_Bool SwGlossaryHdl::CopyToClipboard(SwWrtShell& rSh, const String& rShortName)
{
SwTextBlocks *pGlossary = pCurGrp ? pCurGrp
: rStatGlossaries.GetGroupDoc(aCurGrp);
@@ -774,16 +774,16 @@ BOOL SwGlossaryHdl::CopyToClipboard(SwWrtShell& rSh, const String& rShortName)
return 0 != nRet;
}
-BOOL SwGlossaryHdl::ImportGlossaries( const String& rName )
+sal_Bool SwGlossaryHdl::ImportGlossaries( const String& rName )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rName.Len() )
{
const SfxFilter* pFilter = 0;
- SfxMedium* pMed = new SfxMedium( rName, STREAM_READ, TRUE, 0, 0 );
+ SfxMedium* pMed = new SfxMedium( rName, STREAM_READ, sal_True, 0, 0 );
SfxFilterMatcher aMatcher( String::CreateFromAscii("swriter") );
- pMed->UseInteractionHandler( TRUE );
- if( !aMatcher.GuessFilter( *pMed, &pFilter, FALSE ) )
+ pMed->UseInteractionHandler( sal_True );
+ if( !aMatcher.GuessFilter( *pMed, &pFilter, sal_False ) )
{
SwTextBlocks *pGlossary;
pMed->SetFilter( pFilter );
diff --git a/sw/source/ui/dochdl/makefile.mk b/sw/source/ui/dochdl/makefile.mk
deleted file mode 100644
index 5728eaa3c3c4..000000000000
--- a/sw/source/ui/dochdl/makefile.mk
+++ /dev/null
@@ -1,65 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=dochdl
-LIBTARGET=no
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- dochdl.src \
- selglos.src
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-EXCEPTIONSFILES = \
- $(SLO)$/gloshdl.obj \
- $(SLO)$/selglos.obj \
- $(SLO)$/swdtflvr.obj
-
-# $(SLO)$/dataex.obj \
-
-LIB1TARGET = $(SLB)$/$(TARGET).lib
-
-LIB1OBJFILES = \
- $(SLO)$/gloshdl.obj \
- $(SLO)$/swdtflvr.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/dochdl/selglos.src b/sw/source/ui/dochdl/selglos.src
index ba0ba695c6fe..960c7855d41c 100644
--- a/sw/source/ui/dochdl/selglos.src
+++ b/sw/source/ui/dochdl/selglos.src
@@ -33,7 +33,7 @@
// #define DLG_SEL_GLOS 256
ModalDialog DLG_SEL_GLOS
{
- HelpID = FN_EXPAND_GLOSSARY ;
+ HelpID = CMD_FN_EXPAND_GLOSSARY ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 220 , 100 ) ;
@@ -66,6 +66,7 @@ ModalDialog DLG_SEL_GLOS
};
ListBox LB_GLOS
{
+ HelpID = "sw:ListBox:DLG_SEL_GLOS:LB_GLOS";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 140 , 74 ) ;
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index b13edbfa26cc..e10f4b61751b 100644
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -89,6 +89,7 @@
#include <shellio.hxx>
#include <ddefld.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pagedesc.hxx>
#include <IMark.hxx>
#include <docary.hxx>
@@ -133,15 +134,14 @@
// #109590#
#include <swcrsr.hxx>
#include <SwRewriter.hxx>
-#include <undobj.hxx>
#include <globals.hrc>
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <swserv.hxx>
-extern BOOL bFrmDrag;
-extern BOOL bDDINetAttr;
-extern BOOL bExecuteDrag;
+extern sal_Bool bFrmDrag;
+extern sal_Bool bDDINetAttr;
+extern sal_Bool bExecuteDrag;
#define OLESIZE 11905 - 2 * lMinBorder, 6 * MM50
@@ -188,11 +188,11 @@ class SwTrnsfrDdeLink : public ::sfx2::SvBaseLink
::sfx2::SvLinkSourceRef refObj;
SwTransferable& rTrnsfr;
SwDocShell* pDocShell;
- ULONG nOldTimeOut;
- BOOL bDelBookmrk : 1;
- BOOL bInDisconnect : 1;
+ sal_uLong nOldTimeOut;
+ sal_Bool bDelBookmrk : 1;
+ sal_Bool bInDisconnect : 1;
- BOOL FindDocShell();
+ sal_Bool FindDocShell();
using sfx2::SvBaseLink::Disconnect;
@@ -206,9 +206,9 @@ public:
const uno::Any & rValue );
virtual void Closed();
- BOOL WriteData( SvStream& rStrm );
+ sal_Bool WriteData( SvStream& rStrm );
- void Disconnect( BOOL bRemoveDataAdvise );
+ void Disconnect( sal_Bool bRemoveDataAdvise );
};
// helper class for Action and Undo enclosing
@@ -219,7 +219,7 @@ class SwTrnsfrActionAndUndo
public:
SwTrnsfrActionAndUndo( SwWrtShell *pS, SwUndoId nId,
const SwRewriter * pRewriter = 0,
- BOOL bDelSel = FALSE)
+ sal_Bool bDelSel = sal_False)
: pSh( pS ), eUndoId( nId )
{
pSh->StartUndo( eUndoId, pRewriter );
@@ -229,7 +229,7 @@ public:
}
~SwTrnsfrActionAndUndo()
{
- pSh->EndUndo( eUndoId );
+ pSh->EndUndo();
pSh->EndAllAction();
}
};
@@ -271,7 +271,7 @@ SwTransferable::~SwTransferable()
// the DDELink still needs the WrtShell!
if( refDdeLink.Is() )
{
- ((SwTrnsfrDdeLink*)&refDdeLink)->Disconnect( TRUE );
+ ((SwTrnsfrDdeLink*)&refDdeLink)->Disconnect( sal_True );
refDdeLink.Clear();
}
@@ -432,14 +432,14 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
pClpDocFac = new SwDocFac;
SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac);
- pTmpDoc->SetRefForDocShell( boost::addressof(aDocShellRef) );
pTmpDoc->LockExpFlds(); // never update fields - leave text as it is
pWrtShell->Copy( pTmpDoc );
// in CORE a new one was created (OLE-Objekte copied!)
+ aDocShellRef = pTmpDoc->GetTmpDocShell();
if( aDocShellRef.Is() )
SwTransferable::InitOle( aDocShellRef, *pTmpDoc );
- pTmpDoc->SetRefForDocShell( 0 );
+ pTmpDoc->SetTmpDocShell( (SfxObjectShell*)NULL );
if( nSelectionType & nsSelectionType::SEL_TXT && !pWrtShell->HasMark() )
{
@@ -447,7 +447,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
Point aPos( SwEditWin::GetDDStartPosX(), SwEditWin::GetDDStartPosY());
- BOOL bSelect = bExecuteDrag &&
+ sal_Bool bSelect = bExecuteDrag &&
pWrtShell->GetView().GetDocShell() &&
!pWrtShell->GetView().GetDocShell()->IsReadOnly();
if( pWrtShell->GetContentAtPos( aPos, aCntntAtPos, bSelect ) )
@@ -661,7 +661,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, sal_False );
// mba: no BaseURL for clipboard
SfxMedium aMedium( xWorkStore, String() );
- bRet = pEmbObj->DoSaveObjectAs( aMedium, FALSE );
+ bRet = pEmbObj->DoSaveObjectAs( aMedium, sal_False );
pEmbObj->DoSaveCompleted();
uno::Reference< embed::XTransactedObject > xTransact( xWorkStore, uno::UNO_QUERY );
@@ -676,7 +676,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
delete pSrcStm;
}
- bRet = TRUE;
+ bRet = sal_True;
xWorkStore->dispose();
xWorkStore = uno::Reference < embed::XStorage >();
@@ -719,7 +719,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
xWrt->SetAsciiOptions( aAOpt );
// no start char for clipboard
- xWrt->bUCS2_WithStartChar = FALSE;
+ xWrt->bUCS2_WithStartChar = sal_False;
}
break;
}
@@ -727,9 +727,9 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
if( xWrt.Is() )
{
SwDoc* pDoc = (SwDoc*)pObject;
- xWrt->bWriteClipboardDoc = TRUE;
+ xWrt->bWriteClipboardDoc = sal_True;
xWrt->bWriteOnlyFirstTable = 0 != (TRNSFR_TABELLE & eBufferType);
- xWrt->SetShowProgress( FALSE );
+ xWrt->SetShowProgress( sal_False );
SwWriter aWrt( *xStream, *pDoc );
if( !IsError( aWrt.Write( xWrt )) )
{
@@ -744,7 +744,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
int SwTransferable::Cut()
{
- int nRet = Copy( TRUE );
+ int nRet = Copy( sal_True );
if( nRet )
DeleteSelection();
return nRet;
@@ -763,7 +763,7 @@ void SwTransferable::DeleteSelection()
pWrtShell->EndUndo( UNDO_DELETE );
}
-int SwTransferable::PrepareForCopy( BOOL bIsCut )
+int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
{
int nRet = 1;
if(!pWrtShell)
@@ -821,7 +821,7 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
{
SwWait *pWait = 0;
if( pWrtShell->ShouldWait() )
- pWait = new SwWait( *pWrtShell->GetView().GetDocShell(), TRUE );
+ pWait = new SwWait( *pWrtShell->GetView().GetDocShell(), sal_True );
pClpDocFac = new SwDocFac;
@@ -834,7 +834,6 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac);
- pTmpDoc->SetRefForDocShell( boost::addressof(aDocShellRef) );
pTmpDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen
pWrtShell->Copy( pTmpDoc );
@@ -857,16 +856,17 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
}
// a new one was created in CORE (OLE-Objekte copied!)
+ aDocShellRef = pTmpDoc->GetTmpDocShell();
if( aDocShellRef.Is() )
SwTransferable::InitOle( aDocShellRef, *pTmpDoc );
- pTmpDoc->SetRefForDocShell( 0 );
+ pTmpDoc->SetTmpDocShell( (SfxObjectShell*)NULL );
if( pWrtShell->IsObjSelected() )
eBufferType = TRNSFR_DRAWING;
else
{
eBufferType = TRNSFR_DOCUMENT;
- if (pWrtShell->IntelligentCut(nSelection, FALSE) != SwWrtShell::NO_WORD)
+ if (pWrtShell->IntelligentCut(nSelection, sal_False) != SwWrtShell::NO_WORD)
eBufferType = (TransferBufferType)(TRNSFR_DOCUMENT_WORD | eBufferType);
}
@@ -934,7 +934,7 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
//ObjectDescriptor was already filly from the old DocShell.
//Now adjust it. Thus in GetData the first query can still
//be answered with delayed rendering.
- aObjDesc.mbCanLink = FALSE;
+ aObjDesc.mbCanLink = sal_False;
Size aSz( OLESIZE );
aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MAP_TWIP, MAP_100TH_MM );
@@ -968,7 +968,7 @@ int SwTransferable::PrepareForCopy( BOOL bIsCut )
return nRet;
}
-int SwTransferable::Copy( BOOL bIsCut )
+int SwTransferable::Copy( sal_Bool bIsCut )
{
int nRet = PrepareForCopy( bIsCut );
if ( nRet )
@@ -982,7 +982,7 @@ int SwTransferable::CalculateAndCopy()
{
if(!pWrtShell)
return 0;
- SwWait aWait( *pWrtShell->GetView().GetDocShell(), TRUE );
+ SwWait aWait( *pWrtShell->GetView().GetDocShell(), sal_True );
String aStr( pWrtShell->Calculate() );
@@ -1002,7 +1002,7 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary,
{
if(!pWrtShell)
return 0;
- SwWait aWait( *pWrtShell->GetView().GetDocShell(), TRUE );
+ SwWait aWait( *pWrtShell->GetView().GetDocShell(), sal_True );
pClpDocFac = new SwDocFac;
SwDoc *const pCDoc = lcl_GetDoc(*pClpDocFac);
@@ -1012,15 +1012,15 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary,
SwCntntNode* pCNd = rNds.GoNext( &aNodeIdx ); // go to 1st ContentNode
SwPaM aPam( *pCNd );
- pCDoc->SetRefForDocShell( boost::addressof(aDocShellRef) );
pCDoc->LockExpFlds(); // never update fields - leave text as it is
pCDoc->InsertGlossary( rGlossary, rStr, aPam, 0 );
// a new one was created in CORE (OLE-Objects copied!)
+ aDocShellRef = pCDoc->GetTmpDocShell();
if( aDocShellRef.Is() )
SwTransferable::InitOle( aDocShellRef, *pCDoc );
- pCDoc->SetRefForDocShell( 0 );
+ pCDoc->SetTmpDocShell( (SfxObjectShell*)NULL );
eBufferType = TRNSFR_DOCUMENT;
@@ -1033,7 +1033,7 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary,
//ObjectDescriptor was already filled from the old DocShell.
//Now adjust it. Thus in GetData the first query can still
//be answered with delayed rendering.
- aObjDesc.mbCanLink = FALSE;
+ aObjDesc.mbCanLink = sal_False;
Size aSz( OLESIZE );
aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MAP_TWIP, MAP_100TH_MM );
@@ -1050,7 +1050,7 @@ static inline uno::Reference < XTransferable > * lcl_getTransferPointer ( uno::R
return &xRef;
}
-BOOL SwTransferable::IsPaste( const SwWrtShell& rSh,
+sal_Bool SwTransferable::IsPaste( const SwWrtShell& rSh,
const TransferableDataHelper& rData )
{
// Check the common case first: We can always paste our own data!
@@ -1065,8 +1065,8 @@ BOOL SwTransferable::IsPaste( const SwWrtShell& rSh,
// determine the proper paste action, and return true if we find one
uno::Reference<XTransferable> xTransferable( rData.GetXTransferable() );
- USHORT nDestination = SwTransferable::GetSotDestination( rSh );
- USHORT nSourceOptions =
+ sal_uInt16 nDestination = SwTransferable::GetSotDestination( rSh );
+ sal_uInt16 nSourceOptions =
(( EXCHG_DEST_DOC_TEXTFRAME == nDestination ||
EXCHG_DEST_SWDOC_FREE_AREA == nDestination ||
EXCHG_DEST_DOC_TEXTFRAME_WEB == nDestination ||
@@ -1074,9 +1074,9 @@ BOOL SwTransferable::IsPaste( const SwWrtShell& rSh,
? EXCHG_IN_ACTION_COPY
: EXCHG_IN_ACTION_MOVE);
- ULONG nFormat; // output param for GetExchangeAction
- USHORT nEventAction; // output param for GetExchangeAction
- USHORT nAction = SotExchange::GetExchangeAction(
+ sal_uLong nFormat; // output param for GetExchangeAction
+ sal_uInt16 nEventAction; // output param for GetExchangeAction
+ sal_uInt16 nAction = SotExchange::GetExchangeAction(
rData.GetDataFlavorExVector(),
nDestination,
nSourceOptions, /* ?? */
@@ -1093,9 +1093,9 @@ BOOL SwTransferable::IsPaste( const SwWrtShell& rSh,
int SwTransferable::Paste( SwWrtShell& rSh, TransferableDataHelper& rData )
{
- USHORT nEventAction, nAction=0,
+ sal_uInt16 nEventAction, nAction=0,
nDestination = SwTransferable::GetSotDestination( rSh );
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
if( GetSwTransferable( rData ) )
{
@@ -1103,7 +1103,7 @@ int SwTransferable::Paste( SwWrtShell& rSh, TransferableDataHelper& rData )
}
else
{
- USHORT nSourceOptions =
+ sal_uInt16 nSourceOptions =
(( EXCHG_DEST_DOC_TEXTFRAME == nDestination ||
EXCHG_DEST_SWDOC_FREE_AREA == nDestination ||
EXCHG_DEST_DOC_TEXTFRAME_WEB == nDestination ||
@@ -1132,18 +1132,18 @@ int SwTransferable::Paste( SwWrtShell& rSh, TransferableDataHelper& rData )
return EXCHG_INOUT_ACTION_NONE != nAction &&
SwTransferable::PasteData( rData, rSh, nAction, nFormat,
- nDestination, FALSE, FALSE );
+ nDestination, sal_False, sal_False );
}
int SwTransferable::PasteData( TransferableDataHelper& rData,
- SwWrtShell& rSh, USHORT nAction, ULONG nFormat,
- USHORT nDestination, BOOL bIsPasteFmt,
+ SwWrtShell& rSh, sal_uInt16 nAction, sal_uLong nFormat,
+ sal_uInt16 nDestination, sal_Bool bIsPasteFmt,
sal_Bool bIsDefault,
const Point* pPt, sal_Int8 nDropAction,
- BOOL bPasteSelection )
+ sal_Bool bPasteSelection )
{
SwWait aWait( *rSh.GetView().
- GetDocShell(), FALSE );
+ GetDocShell(), sal_False );
SwTrnsfrActionAndUndo* pAction = 0;
SwModule* pMod = SW_MOD();
@@ -1166,11 +1166,11 @@ int SwTransferable::PasteData( TransferableDataHelper& rData,
case EXCHG_DEST_DOC_URLBUTTON:
case EXCHG_DEST_DOC_GROUPOBJ:
// select frames/objects
- SwTransferable::SetSelInShell( rSh, TRUE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_True, pPt );
break;
default:
- SwTransferable::SetSelInShell( rSh, FALSE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_False, pPt );
break;
}
}
@@ -1185,21 +1185,21 @@ int SwTransferable::PasteData( TransferableDataHelper& rData,
// - at ReRead of a graphic/DDEData
// - at D&D, for the right selection was taken care of
// in Drop-Handler
- BOOL bDelSel = FALSE;
+ sal_Bool bDelSel = sal_False;
switch( nDestination )
{
case EXCHG_DEST_DOC_TEXTFRAME:
case EXCHG_DEST_SWDOC_FREE_AREA:
case EXCHG_DEST_DOC_TEXTFRAME_WEB:
case EXCHG_DEST_SWDOC_FREE_AREA_WEB:
- bDelSel = TRUE;
+ bDelSel = sal_True;
break;
}
if( bDelSel )
// #i34830#
pAction = new SwTrnsfrActionAndUndo( &rSh, UNDO_PASTE_CLIPBOARD, NULL,
- TRUE );
+ sal_True );
}
SwTransferable *pTrans=0, *pTunneledTrans=GetSwTransferable( rData );
@@ -1225,10 +1225,10 @@ int SwTransferable::PasteData( TransferableDataHelper& rData,
}
// in Drag&Drop MessageBoxes must not be showed
- BOOL bMsg = 0 == pPt;
- BYTE nActionFlags = static_cast< BYTE >(( nAction >> 8 ) & 0xFF);
+ sal_Bool bMsg = 0 == pPt;
+ sal_uInt8 nActionFlags = static_cast< sal_uInt8 >(( nAction >> 8 ) & 0xFF);
- USHORT nClearedAction = ( nAction & EXCHG_ACTION_MASK );
+ sal_uInt16 nClearedAction = ( nAction & EXCHG_ACTION_MASK );
// delete selections
switch( nClearedAction )
@@ -1348,7 +1348,7 @@ int SwTransferable::PasteData( TransferableDataHelper& rData,
case SOT_FORMATSTR_ID_NETSCAPE_IMAGE:
nRet = SwTransferable::_PasteTargetURL( rData, rSh,
SW_PASTESDR_INSERT,
- pPt, TRUE );
+ pPt, sal_True );
break;
default:
@@ -1371,7 +1371,7 @@ int SwTransferable::PasteData( TransferableDataHelper& rData,
case EXCHG_OUT_ACTION_INSERT_DDE:
{
- BOOL bReRead = 0 != CNT_HasGrf( rSh.GetCntType() );
+ sal_Bool bReRead = 0 != CNT_HasGrf( rSh.GetCntType() );
nRet = SwTransferable::_PasteDDE( rData, rSh, bReRead, bMsg );
}
break;
@@ -1486,10 +1486,10 @@ int SwTransferable::PasteData( TransferableDataHelper& rData,
return nRet;
}
-USHORT SwTransferable::GetSotDestination( const SwWrtShell& rSh,
+sal_uInt16 SwTransferable::GetSotDestination( const SwWrtShell& rSh,
const Point* pPt )
{
- USHORT nRet = EXCHG_INOUT_ACTION_NONE;
+ sal_uInt16 nRet = EXCHG_INOUT_ACTION_NONE;
ObjCntType eOType;
if( pPt )
@@ -1504,7 +1504,7 @@ USHORT SwTransferable::GetSotDestination( const SwWrtShell& rSh,
{
case OBJCNT_GRF:
{
- BOOL bIMap, bLink;
+ sal_Bool bIMap, bLink;
if( pPt )
{
bIMap = 0 != rSh.GetFmtFromObj( *pPt )->GetURL().GetMap();
@@ -1557,9 +1557,9 @@ USHORT SwTransferable::GetSotDestination( const SwWrtShell& rSh,
}
int SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
- SwWrtShell& rSh, ULONG nFmt, BOOL bMsg )
+ SwWrtShell& rSh, sal_uLong nFmt, sal_Bool bMsg )
{
- USHORT nResId = MSG_CLPBRD_FORMAT_ERROR;
+ sal_uInt16 nResId = MSG_CLPBRD_FORMAT_ERROR;
int nRet = 0;
MSE40HTMLClipFormatObj aMSE40ClpObj;
@@ -1600,9 +1600,9 @@ int SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
{
pStream = aMSE40ClpObj.IsValid( *xStrm );
pRead = ReadHTML;
- pRead->SetReadUTF8( TRUE );
+ pRead->SetReadUTF8( sal_True );
- BOOL bNoComments =
+ sal_Bool bNoComments =
( nFmt == SOT_FORMATSTR_ID_HTML_NO_COMMENT );
pRead->SetIgnoreHTMLComments( bNoComments );
}
@@ -1614,7 +1614,7 @@ int SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
else if( !pRead )
{
pRead = ReadHTML;
- pRead->SetReadUTF8( TRUE );
+ pRead->SetReadUTF8( sal_True );
}
}
}
@@ -1651,7 +1651,7 @@ int SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
}
int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
- ULONG nFmt, BYTE nActionFlags, BOOL bMsg )
+ sal_uLong nFmt, sal_uInt8 nActionFlags, sal_Bool bMsg )
{
int nRet = 0;
TransferableObjectDescriptor aObjDesc;
@@ -1774,7 +1774,7 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
// try to get the replacement image from the clipboard
Graphic aGraphic;
- ULONG nGrFormat = 0;
+ sal_uLong nGrFormat = 0;
// insert replacement image ( if there is one ) into the object helper
if ( nGrFormat )
@@ -1850,7 +1850,7 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
if( nRet && ( nActionFlags &
( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) ))
- SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, FALSE );
+ SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, sal_False );
// let the object be unloaded if possible
SwOLEObj::UnloadObject( xObj, rSh.GetDoc(), embed::Aspects::MSOLE_CONTENT );
@@ -1860,8 +1860,8 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
}
int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
- SwWrtShell& rSh, USHORT nAction,
- const Point* pPt, BOOL bInsertGRF )
+ SwWrtShell& rSh, sal_uInt16 nAction,
+ const Point* pPt, sal_Bool bInsertGRF )
{
int nRet = 0;
INetImage aINetImg;
@@ -1884,7 +1884,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
switch( nAction )
{
case SW_PASTESDR_INSERT:
- SwTransferable::SetSelInShell( rSh, FALSE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_False, pPt );
rSh.Insert( sURL, aEmptyStr, aGrf );
break;
@@ -1893,7 +1893,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
{
rSh.ReplaceSdrObj( sURL, aEmptyStr, &aGrf );
Point aPt( pPt ? *pPt : rSh.GetCrsrDocPos() );
- SwTransferable::SetSelInShell( rSh, TRUE, &aPt );
+ SwTransferable::SetSelInShell( rSh, sal_True, &aPt );
}
else
rSh.ReRead( sURL, aEmptyStr, &aGrf );
@@ -1906,7 +1906,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
rSh.ReRead( sURL, aEmptyStr, &aGrf );
else
{
- SwTransferable::SetSelInShell( rSh, FALSE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_False, pPt );
rSh.Insert( sURL, aEmptyStr, aGrf );
}
break;
@@ -1928,7 +1928,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
if( aURL.GetURL() != aINetImg.GetTargetURL() ||
aURL.GetTargetFrameName() != aINetImg.GetTargetFrame() )
{
- aURL.SetURL( aINetImg.GetTargetURL(), FALSE );
+ aURL.SetURL( aINetImg.GetTargetURL(), sal_False );
aURL.SetTargetFrameName( aINetImg.GetTargetFrame() );
aSet.Put( aURL );
rSh.SetFlyFrmAttr( aSet );
@@ -1937,7 +1937,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
return nRet;
}
-void SwTransferable::SetSelInShell( SwWrtShell& rSh, BOOL bSelectFrm,
+void SwTransferable::SetSelInShell( SwWrtShell& rSh, sal_Bool bSelectFrm,
const Point* pPt )
{
if( bSelectFrm )
@@ -1950,7 +1950,7 @@ void SwTransferable::SetSelInShell( SwWrtShell& rSh, BOOL bSelectFrm,
{
rSh.HideCrsr();
rSh.EnterSelFrmMode( pPt );
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
}
}
}
@@ -1961,20 +1961,20 @@ void SwTransferable::SetSelInShell( SwWrtShell& rSh, BOOL bSelectFrm,
rSh.UnSelectFrm();
rSh.LeaveSelFrmMode();
rSh.GetView().GetEditWin().StopInsFrm();
- bFrmDrag = FALSE;
+ bFrmDrag = sal_False;
}
else if( rSh.GetView().GetDrawFuncPtr() )
rSh.GetView().GetEditWin().StopInsFrm();
rSh.EnterStdMode();
if( pPt )
- rSh.SwCrsrShell::SetCrsr( *pPt, TRUE );
+ rSh.SwCrsrShell::SetCrsr( *pPt, sal_True );
}
}
int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
- SwWrtShell& rWrtShell, BOOL bReReadGrf,
- BOOL bMsg )
+ SwWrtShell& rWrtShell, sal_Bool bReReadGrf,
+ sal_Bool bMsg )
{
// data from Clipboardformat
String aApp, aTopic, aItem;
@@ -1997,7 +1997,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
sfx2::MakeLnkName( aCmd, &aApp, aTopic, aItem );
// do we want to read in a graphic now?
- ULONG nFormat;
+ sal_uLong nFormat;
if( !rData.HasFormat( FORMAT_RTF ) &&
!rData.HasFormat( SOT_FORMATSTR_ID_HTML ) &&
!rData.HasFormat( FORMAT_STRING ) &&
@@ -2019,10 +2019,10 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
}
SwFieldType* pTyp = 0;
- USHORT i = 1,j;
+ sal_uInt16 i = 1,j;
String aName;
- BOOL bAlreadyThere = FALSE, bDoublePaste = FALSE;
- USHORT nSize = rWrtShell.GetFldTypeCount();
+ sal_Bool bAlreadyThere = sal_False, bDoublePaste = sal_False;
+ sal_uInt16 nSize = rWrtShell.GetFldTypeCount();
const ::utl::TransliterationWrapper& rColl = ::GetAppCmpStrIgnore();
do {
@@ -2038,7 +2038,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
sfx2::LINKUPDATE_ALWAYS == ((SwDDEFieldType*)pTyp)->GetType() )
{
aName = pTyp->GetName();
- bDoublePaste = TRUE;
+ bDoublePaste = sal_True;
break;
}
else if( rColl.isEqual( aName, pTyp->GetName() ) )
@@ -2046,10 +2046,10 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
}
}
if( j == nSize )
- bAlreadyThere = FALSE;
+ bAlreadyThere = sal_False;
else
{
- bAlreadyThere = TRUE;
+ bAlreadyThere = sal_True;
i++;
}
}
@@ -2116,7 +2116,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
rWrtShell.Insert( aSwDDEField );
}
- } while( FALSE );
+ } while( sal_False );
}
else
pDDETyp = 0; // remove FieldTypes again
@@ -2136,8 +2136,8 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData,
}
int SwTransferable::_PasteSdrFormat( TransferableDataHelper& rData,
- SwWrtShell& rSh, USHORT nAction,
- const Point* pPt, BYTE nActionFlags )
+ SwWrtShell& rSh, sal_uInt16 nAction,
+ const Point* pPt, sal_uInt8 nActionFlags )
{
int nRet = 0;
SotStorageStreamRef xStrm;
@@ -2149,20 +2149,20 @@ int SwTransferable::_PasteSdrFormat( TransferableDataHelper& rData,
if( nRet && ( nActionFlags &
( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) ))
- SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, FALSE );
+ SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, sal_False );
}
return nRet;
}
int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
- ULONG nFmt, USHORT nAction, const Point* pPt,
- BYTE nActionFlags, BOOL /*bMsg*/ )
+ sal_uLong nFmt, sal_uInt16 nAction, const Point* pPt,
+ sal_uInt8 nActionFlags, sal_Bool /*bMsg*/ )
{
int nRet = 0;
Graphic aGrf;
INetBookmark aBkmk;
- BOOL bCheckForGrf = FALSE, bCheckForImageMap = FALSE;
+ sal_Bool bCheckForGrf = sal_False, bCheckForImageMap = sal_False;
switch( nFmt )
{
@@ -2179,7 +2179,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
if( SW_PASTESDR_SETATTR == nAction )
nFmt = SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK;
else
- bCheckForGrf = TRUE;
+ bCheckForGrf = sal_True;
}
break;
@@ -2194,7 +2194,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
aBkmk = INetBookmark(
URIHelper::SmartRel2Abs(INetURLObject(), sTxt, Link(), false ),
sDesc );
- bCheckForGrf = TRUE;
+ bCheckForGrf = sal_True;
bCheckForImageMap = SW_PASTESDR_REPLACE == nAction;
}
}
@@ -2218,7 +2218,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
{
// then set as hyperlink after the graphic
nFmt = SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK;
- nRet = TRUE;
+ nRet = sal_True;
}
}
@@ -2231,7 +2231,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
switch( nAction )
{
case SW_PASTESDR_INSERT:
- SwTransferable::SetSelInShell( rSh, FALSE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_False, pPt );
rSh.Insert( sURL, aEmptyStr, aGrf );
break;
@@ -2240,7 +2240,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
{
rSh.ReplaceSdrObj( sURL, aEmptyStr, &aGrf );
Point aPt( pPt ? *pPt : rSh.GetCrsrDocPos() );
- SwTransferable::SetSelInShell( rSh, TRUE, &aPt );
+ SwTransferable::SetSelInShell( rSh, sal_True, &aPt );
}
else
rSh.ReRead( sURL, aEmptyStr, &aGrf );
@@ -2254,7 +2254,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
rSh.GetFlyFrmAttr( aSet );
SwFmtURL aURL( (SwFmtURL&)aSet.Get( RES_URL ) );
- aURL.SetURL( aBkmk.GetURL(), FALSE );
+ aURL.SetURL( aBkmk.GetURL(), sal_False );
aSet.Put( aURL );
rSh.SetFlyFrmAttr( aSet );
}
@@ -2265,7 +2265,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
rSh.ReRead( sURL, aEmptyStr, &aGrf );
else
{
- SwTransferable::SetSelInShell( rSh, FALSE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_False, pPt );
rSh.Insert( aBkmk.GetURL(), aEmptyStr, aGrf );
}
break;
@@ -2284,14 +2284,14 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
if( nActionFlags &
( EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL >> 8) )
- SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, FALSE );
+ SwTransferable::_PasteTargetURL( rData, rSh, 0, 0, sal_False );
}
else if( bCheckForImageMap )
{
// or should the file be an ImageMap-File?
ImageMap aMap;
SfxMedium aMed( INetURLObject(aBkmk.GetURL()).GetFull(),
- STREAM_STD_READ, FALSE );
+ STREAM_STD_READ, sal_False );
SvStream* pStream = aMed.GetInStream();
if( pStream != NULL &&
!pStream->GetError() &&
@@ -2338,7 +2338,7 @@ int SwTransferable::_PasteImageMap( TransferableDataHelper& rData,
}
int SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData,
- SwWrtShell& rSh, ULONG nFmt )
+ SwWrtShell& rSh, sal_uLong nFmt )
{
int nRet = 0;
String sFile;
@@ -2362,7 +2362,7 @@ int SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData,
SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
rSh.GetFlyFrmAttr( aSet );
SwFmtURL aURL2( (SwFmtURL&)aSet.Get( RES_URL ) );
- aURL2.SetURL( sFile, FALSE );
+ aURL2.SetURL( sFile, sal_False );
if( !aURL2.GetName().Len() )
aURL2.SetName( sFile );
aSet.Put( aURL2 );
@@ -2376,15 +2376,15 @@ int SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData,
sDesc.Len() ? sDesc : sFile );
}
}
- nRet = TRUE;
+ nRet = sal_True;
}
return nRet;
}
int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
- SwWrtShell& rSh, ULONG nFmt,
- USHORT nAction, const Point* pPt,
- BYTE nActionFlags, BOOL bMsg )
+ SwWrtShell& rSh, sal_uLong nFmt,
+ sal_uInt16 nAction, const Point* pPt,
+ sal_uInt8 nActionFlags, sal_Bool bMsg )
{
int nRet = SwTransferable::_PasteGrf( rData, rSh, nFmt, nAction,
pPt, nActionFlags, bMsg );
@@ -2409,7 +2409,7 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
}
else
{
- BOOL bIsURLFile = SwTransferable::_CheckForURLOrLNKFile( rData, sFile, &sDesc );
+ sal_Bool bIsURLFile = SwTransferable::_CheckForURLOrLNKFile( rData, sFile, &sDesc );
//Own FileFormat? --> insert, not for StarWriter/Web
String sFileURL = URIHelper::SmartRel2Abs(INetURLObject(), sFile, Link(), false );
@@ -2449,7 +2449,7 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
rSh.GetFlyFrmAttr( aSet );
SwFmtURL aURL2( (SwFmtURL&)aSet.Get( RES_URL ) );
- aURL2.SetURL( sFile, FALSE );
+ aURL2.SetURL( sFile, sal_False );
if( !aURL2.GetName().Len() )
aURL2.SetName( sFile );
aSet.Put( aURL2 );
@@ -2463,7 +2463,7 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
sDesc.Len() ? sDesc : sFile );
}
}
- nRet = TRUE;
+ nRet = sal_True;
}
}
}
@@ -2472,14 +2472,14 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData,
}
int SwTransferable::_PasteDBData( TransferableDataHelper& rData,
- SwWrtShell& rSh, ULONG nFmt, BOOL bLink,
- const Point* pDragPt, BOOL bMsg )
+ SwWrtShell& rSh, sal_uLong nFmt, sal_Bool bLink,
+ const Point* pDragPt, sal_Bool bMsg )
{
int nRet = 0;
String sTxt;
if( rData.GetString( nFmt, sTxt ) && sTxt.Len() )
{
- USHORT nWh = SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE == nFmt
+ sal_uInt16 nWh = SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE == nFmt
? 0
: SOT_FORMATSTR_ID_SBA_DATAEXCHANGE == nFmt
? (bLink
@@ -2514,14 +2514,14 @@ int SwTransferable::_PasteDBData( TransferableDataHelper& rData,
SfxUsrAnyItem* pColumnNameItem = 0;
SfxUsrAnyItem* pSelectionItem = 0;
- BOOL bDataAvailable = TRUE;
+ sal_Bool bDataAvailable = sal_True;
ODataAccessDescriptor aDesc;
if(bHaveColumnDescriptor)
aDesc = OColumnTransferable::extractColumnDescriptor(rData);
else if(ODataAccessObjectTransferable::canExtractObjectDescriptor(rVector) )
aDesc = ODataAccessObjectTransferable::extractObjectDescriptor(rData);
else
- bDataAvailable = FALSE;
+ bDataAvailable = sal_False;
if ( bDataAvailable )
{
@@ -2574,30 +2574,30 @@ int SwTransferable::_PasteDBData( TransferableDataHelper& rData,
}
int SwTransferable::_PasteFileList( TransferableDataHelper& rData,
- SwWrtShell& rSh, BOOL bLink,
- const Point* pPt, BOOL bMsg )
+ SwWrtShell& rSh, sal_Bool bLink,
+ const Point* pPt, sal_Bool bMsg )
{
int nRet = 0;
FileList aFileList;
if( rData.GetFileList( SOT_FORMAT_FILE_LIST, aFileList ) &&
aFileList.Count() )
{
- USHORT nAct = bLink ? SW_PASTESDR_SETATTR : SW_PASTESDR_INSERT;
+ sal_uInt16 nAct = bLink ? SW_PASTESDR_SETATTR : SW_PASTESDR_INSERT;
String sFlyNm;
// iterate over the filelist
- for( ULONG n = 0, nEnd = aFileList.Count(); n < nEnd; ++n )
+ for( sal_uLong n = 0, nEnd = aFileList.Count(); n < nEnd; ++n )
{
TransferDataContainer* pHlp = new TransferDataContainer;
pHlp->CopyString( FORMAT_FILE, aFileList.GetFile( n ));
TransferableDataHelper aData( pHlp );
if( SwTransferable::_PasteFileName( aData, rSh, SOT_FORMAT_FILE, nAct,
- pPt, FALSE, bMsg ))
+ pPt, sal_False, bMsg ))
{
if( bLink )
{
sFlyNm = rSh.GetFlyName();
- SwTransferable::SetSelInShell( rSh, FALSE, pPt );
+ SwTransferable::SetSelInShell( rSh, sal_False, pPt );
}
nRet = 1;
}
@@ -2612,17 +2612,17 @@ int SwTransferable::_PasteFileList( TransferableDataHelper& rData,
return nRet;
}
-BOOL SwTransferable::_CheckForURLOrLNKFile( TransferableDataHelper& rData,
+sal_Bool SwTransferable::_CheckForURLOrLNKFile( TransferableDataHelper& rData,
String& rFileName, String* pTitle )
{
- BOOL bIsURLFile = FALSE;
+ sal_Bool bIsURLFile = sal_False;
INetBookmark aBkmk;
if( rData.GetINetBookmark( SOT_FORMATSTR_ID_SOLK, aBkmk ) )
{
rFileName = aBkmk.GetURL();
if( pTitle )
*pTitle = aBkmk.GetDescription();
- bIsURLFile = TRUE;
+ bIsURLFile = sal_True;
}
else
{
@@ -2639,7 +2639,7 @@ BOOL SwTransferable::_CheckForURLOrLNKFile( TransferableDataHelper& rData,
return bIsURLFile;
}
-BOOL SwTransferable::IsPasteSpecial( const SwWrtShell& rWrtShell,
+sal_Bool SwTransferable::IsPasteSpecial( const SwWrtShell& rWrtShell,
const TransferableDataHelper& rData )
{
// we can paste-special if there's an entry in the paste-special-format list
@@ -2650,12 +2650,12 @@ BOOL SwTransferable::IsPasteSpecial( const SwWrtShell& rWrtShell,
int SwTransferable::PasteFormat( SwWrtShell& rSh,
TransferableDataHelper& rData,
- ULONG nFormat )
+ sal_uLong nFormat )
{
- SwWait aWait( *rSh.GetView().GetDocShell(), FALSE );
+ SwWait aWait( *rSh.GetView().GetDocShell(), sal_False );
int nRet = 0;
- ULONG nPrivateFmt = FORMAT_PRIVATE;
+ sal_uLong nPrivateFmt = FORMAT_PRIVATE;
SwTransferable *pClipboard = GetSwTransferable( rData );
if( pClipboard &&
((TRNSFR_DOCUMENT|TRNSFR_GRAPHIC|TRNSFR_OLE) & pClipboard->eBufferType ))
@@ -2666,7 +2666,7 @@ int SwTransferable::PasteFormat( SwWrtShell& rSh,
else if( rData.HasFormat( nFormat ) )
{
uno::Reference<XTransferable> xTransferable( rData.GetXTransferable() );
- USHORT nEventAction,
+ sal_uInt16 nEventAction,
nDestination = SwTransferable::GetSotDestination( rSh ),
nSourceOptions =
(( EXCHG_DEST_DOC_TEXTFRAME == nDestination ||
@@ -2685,15 +2685,15 @@ int SwTransferable::PasteFormat( SwWrtShell& rSh,
if( EXCHG_INOUT_ACTION_NONE != nAction )
nRet = SwTransferable::PasteData( rData, rSh, nAction, nFormat,
- nDestination, TRUE, FALSE );
+ nDestination, sal_True, sal_False );
}
return nRet;
}
int SwTransferable::_TestAllowedFormat( const TransferableDataHelper& rData,
- ULONG nFormat, USHORT nDestination )
+ sal_uLong nFormat, sal_uInt16 nDestination )
{
- USHORT nAction = EXCHG_INOUT_ACTION_NONE, nEventAction;
+ sal_uInt16 nAction = EXCHG_INOUT_ACTION_NONE, nEventAction;
if( rData.HasFormat( nFormat )) {
uno::Reference<XTransferable> xTransferable( rData.GetXTransferable() );
nAction = SotExchange::GetExchangeAction(
@@ -2710,7 +2710,7 @@ int SwTransferable::_TestAllowedFormat( const TransferableDataHelper& rData,
* the list of formats which will be offered to the user in the 'Paste
* Special...' dialog and the paste button menu
*/
-static USHORT aPasteSpecialIds[] =
+static sal_uInt16 aPasteSpecialIds[] =
{
SOT_FORMATSTR_ID_HTML,
SOT_FORMATSTR_ID_HTML_SIMPLE,
@@ -2734,7 +2734,7 @@ int SwTransferable::PasteUnformatted( SwWrtShell& rSh, TransferableDataHelper& r
return SwTransferable::PasteFormat( rSh, rData, SOT_FORMAT_STRING );
}
-int SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData, ULONG& rFormatUsed )
+int SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData, sal_uLong& rFormatUsed )
{
int nRet = 0;
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
@@ -2743,13 +2743,13 @@ int SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData
DataFlavorExVector aFormats( rData.GetDataFlavorExVector() );
TransferableObjectDescriptor aDesc;
- USHORT nDest = SwTransferable::GetSotDestination( rSh );
+ sal_uInt16 nDest = SwTransferable::GetSotDestination( rSh );
SwTransferable *pClipboard = GetSwTransferable( rData );
if( pClipboard )
{
aDesc = pClipboard->aObjDesc;
- USHORT nResId;
+ sal_uInt16 nResId;
if( pClipboard->eBufferType & TRNSFR_DOCUMENT )
nResId = STR_PRIVATETEXT;
else if( pClipboard->eBufferType & TRNSFR_GRAPHIC )
@@ -2789,11 +2789,11 @@ int SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData
if( SwTransferable::_TestAllowedFormat( rData, SOT_FORMATSTR_ID_LINK, nDest ))
pDlg->Insert( SOT_FORMATSTR_ID_LINK, SW_RES(STR_DDEFORMAT) );
- for( USHORT* pIds = aPasteSpecialIds; *pIds; ++pIds )
+ for( sal_uInt16* pIds = aPasteSpecialIds; *pIds; ++pIds )
if( SwTransferable::_TestAllowedFormat( rData, *pIds, nDest ))
pDlg->Insert( *pIds, aEmptyStr );
- ULONG nFormat = pDlg->GetFormat( rData.GetTransferable() );
+ sal_uLong nFormat = pDlg->GetFormat( rData.GetTransferable() );
if( nFormat )
nRet = SwTransferable::PasteFormat( rSh, rData, nFormat );
@@ -2809,12 +2809,12 @@ void SwTransferable::FillClipFmtItem( const SwWrtShell& rSh,
const TransferableDataHelper& rData,
SvxClipboardFmtItem & rToFill )
{
- USHORT nDest = SwTransferable::GetSotDestination( rSh );
+ sal_uInt16 nDest = SwTransferable::GetSotDestination( rSh );
SwTransferable *pClipboard = GetSwTransferable( rData );
if( pClipboard )
{
- USHORT nResId;
+ sal_uInt16 nResId;
if( pClipboard->eBufferType & TRNSFR_DOCUMENT )
nResId = STR_PRIVATETEXT;
else if( pClipboard->eBufferType & TRNSFR_GRAPHIC )
@@ -2853,7 +2853,7 @@ void SwTransferable::FillClipFmtItem( const SwWrtShell& rSh,
if( SwTransferable::_TestAllowedFormat( rData, SOT_FORMATSTR_ID_LINK, nDest ))
rToFill.AddClipbrdFormat( SOT_FORMATSTR_ID_LINK, SW_RES(STR_DDEFORMAT) );
- for( USHORT* pIds = aPasteSpecialIds; *pIds; ++pIds )
+ for( sal_uInt16* pIds = aPasteSpecialIds; *pIds; ++pIds )
if( SwTransferable::_TestAllowedFormat( rData, *pIds, nDest ))
rToFill.AddClipbrdFormat( *pIds, aEmptyStr );
}
@@ -2894,7 +2894,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
{
eBufferType = TRNSFR_DOCUMENT;
if( SwWrtShell::NO_WORD !=
- pWrtShell->IntelligentCut( nSelection, FALSE ))
+ pWrtShell->IntelligentCut( nSelection, sal_False ))
eBufferType = TransferBufferType( TRNSFR_DOCUMENT_WORD
| eBufferType);
}
@@ -2947,7 +2947,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
//ObjectDescriptor was already filled from the old DocShell.
//Now adjust it. Thus in GetData the first query can still
//be answered with delayed rendering.
- aObjDesc.mbCanLink = FALSE;
+ aObjDesc.mbCanLink = sal_False;
aObjDesc.maDragStartPos = rSttPos;
aObjDesc.maSize = OutputDevice::LogicToLogic( Size( OLESIZE ),
MAP_TWIP, MAP_100TH_MM );
@@ -2997,9 +2997,9 @@ void SwTransferable::StartDrag( Window* pWin, const Point& rPos )
if(!pWrtShell)
return;
bOldIdle = pWrtShell->GetViewOptions()->IsIdle();
- bCleanUp = TRUE;
+ bCleanUp = sal_True;
- ((SwViewOption *)pWrtShell->GetViewOptions())->SetIdle( FALSE );
+ ((SwViewOption *)pWrtShell->GetViewOptions())->SetIdle( sal_False );
if( pWrtShell->IsSelFrmMode() )
pWrtShell->ShowCrsr();
@@ -3034,7 +3034,7 @@ void SwTransferable::DragFinished( sal_Int8 nAction )
{
if ( !(pWrtShell->IsSelFrmMode() || pWrtShell->IsObjSelected()) )
//SmartCut, take one of the blanks along
- pWrtShell->IntelligentCut( pWrtShell->GetSelectionType(), TRUE );
+ pWrtShell->IntelligentCut( pWrtShell->GetSelectionType(), sal_True );
pWrtShell->DelRight();
}
pWrtShell->EndUndo( UNDO_UI_DRAG_AND_MOVE );
@@ -3066,7 +3066,7 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell )
// (otherwise it's not pasted into a TableSelection!!!)
OSL_ENSURE( !rShell.ActionPend(), "Paste darf nie eine Actionklammerung haben" );
if ( !pClpDocFac )
- return sal_False; // the return value of the SwFEShell::Paste also is BOOL!
+ return sal_False; // the return value of the SwFEShell::Paste also is sal_Bool!
const int nSelection = rShell.GetSelectionType();
@@ -3090,12 +3090,12 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell )
{
// position the cursor again
Point aPt( rShell.GetCharRect().Pos() );
- rShell.SwCrsrShell::SetCrsr( aPt, TRUE );
+ rShell.SwCrsrShell::SetCrsr( aPt, sal_True );
}
rShell.SetRetainSelection( false );
}
- BOOL bInWrd = FALSE, bEndWrd = FALSE, bSttWrd = FALSE,
+ sal_Bool bInWrd = sal_False, bEndWrd = sal_False, bSttWrd = sal_False,
bSmart = 0 != (TRNSFR_DOCUMENT_WORD & eBufferType);
if( bSmart )
{
@@ -3126,15 +3126,15 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell )
}
int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
- BOOL bMove, BOOL bIsXSelection )
+ sal_Bool bMove, sal_Bool bIsXSelection )
{
int cWord = 0;
- BOOL bInWrd = FALSE;
- BOOL bEndWrd = FALSE;
- BOOL bSttWrd = FALSE;
- BOOL bSttPara= FALSE;
- BOOL bTblSel = FALSE;
- BOOL bFrmSel = FALSE;
+ sal_Bool bInWrd = sal_False;
+ sal_Bool bEndWrd = sal_False;
+ sal_Bool bSttWrd = sal_False;
+ sal_Bool bSttPara= sal_False;
+ sal_Bool bTblSel = sal_False;
+ sal_Bool bFrmSel = sal_False;
SwWrtShell& rSrcSh = *GetShell();
@@ -3153,7 +3153,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
{
rSh.HideCrsr();
rSh.EnterSelFrmMode( &rDragPt );
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
}
const int nSelection = rSh.GetSelectionType();
@@ -3164,7 +3164,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
rSh.GetFlyFrmAttr( aSet );
SwFmtURL aURL( (SwFmtURL&)aSet.Get( RES_URL ) );
- aURL.SetURL( aTmp.GetURL(), FALSE );
+ aURL.SetURL( aTmp.GetURL(), sal_False );
aSet.Put( aURL );
rSh.SetFlyFrmAttr( aSet );
return 1;
@@ -3175,7 +3175,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
rSh.LeaveSelFrmMode();
rSh.UnSelectFrm();
rSh.ShowCrsr();
- bFrmDrag = FALSE;
+ bFrmDrag = sal_False;
}
}
}
@@ -3196,14 +3196,14 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
return 0;
if( rSrcSh.IsTableMode() )
- bTblSel = TRUE;
+ bTblSel = sal_True;
else if( rSrcSh.IsSelFrmMode() || rSrcSh.IsObjSelected() )
{
// don't move position-protected objects!
if( bMove && rSrcSh.IsSelObjProtected( FLYPROTECT_POS ) )
return 0;
- bFrmSel = TRUE;
+ bFrmSel = sal_True;
}
const int nSel = rSrcSh.GetSelectionType();
@@ -3224,8 +3224,8 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
if( &rSrcSh != &rSh )
{
rSh.EnterStdMode();
- rSh.SwCrsrShell::SetCrsr( rDragPt, TRUE );
- cWord = rSrcSh.IntelligentCut( nSel, FALSE );
+ rSh.SwCrsrShell::SetCrsr( rDragPt, sal_True );
+ cWord = rSrcSh.IntelligentCut( nSel, sal_False );
}
else if( !bTblSel && !bFrmSel )
{
@@ -3240,9 +3240,9 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
rSh.SwCrsrShell::CreateCrsr();
}
- rSh.SwCrsrShell::SetCrsr( rDragPt, TRUE, false );
+ rSh.SwCrsrShell::SetCrsr( rDragPt, sal_True, false );
rSh.GoPrevCrsr();
- cWord = rSh.IntelligentCut( rSh.GetSelectionType(), FALSE );
+ cWord = rSh.IntelligentCut( rSh.GetSelectionType(), sal_False );
rSh.GoNextCrsr();
}
@@ -3259,13 +3259,13 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
if( &rSrcSh == &rSh )
{
rSh.GoPrevCrsr();
- rSh.SwCrsrShell::SetCrsr( aSttPt, TRUE );
+ rSh.SwCrsrShell::SetCrsr( aSttPt, sal_True );
rSh.SelectTxtAttr( RES_TXTATR_INETFMT );
if( rSh.ChgCurrPam( rDragPt ) )
{
// don't copy/move inside of yourself
rSh.DestroyCrsr();
- rSh.EndUndo( eUndoId );
+ rSh.EndUndo();
rSh.EndAction();
rSh.EndAction();
return 0;
@@ -3274,14 +3274,14 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
}
else
{
- rSrcSh.SwCrsrShell::SetCrsr( aSttPt, TRUE );
+ rSrcSh.SwCrsrShell::SetCrsr( aSttPt, sal_True );
rSrcSh.SelectTxtAttr( RES_TXTATR_INETFMT );
}
// is there an URL attribute at the insert point? Then replace that,
// so simply put up a selection?
rSh.DelINetAttrWithText();
- bDDINetAttr = TRUE;
+ bDDINetAttr = sal_True;
}
if ( rSrcSh.IsSelFrmMode() )
@@ -3290,7 +3290,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
aSttPt -= aSttPt - rSrcSh.GetObjRect().Pos();
}
- BOOL bRet = rSrcSh.SwFEShell::Copy( &rSh, aSttPt, rDragPt, bMove,
+ sal_Bool bRet = rSrcSh.SwFEShell::Copy( &rSh, aSttPt, rDragPt, bMove,
!bIsXSelection );
if( !bIsXSelection )
@@ -3308,14 +3308,14 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
//SmartCut, take one of the blanks along.
rSh.SwCrsrShell::DestroyCrsr();
if ( cWord == SwWrtShell::WORD_SPACE_BEFORE )
- rSh.ExtendSelection( FALSE );
+ rSh.ExtendSelection( sal_False );
else if ( cWord == SwWrtShell::WORD_SPACE_AFTER )
rSh.ExtendSelection();
rSrcSh.DelRight();
}
}
rSrcSh.KillPams();
- rSrcSh.Pop( FALSE );
+ rSrcSh.Pop( sal_False );
/* after dragging a table selection inside one shell
set cursor to the drop position. */
@@ -3373,8 +3373,8 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
rSrcSh.LeaveSelFrmMode();
if( rSrcSh.GetDoc() != rSh.GetDoc() )
- rSrcSh.EndUndo( eUndoId );
- rSh.EndUndo( eUndoId );
+ rSrcSh.EndUndo();
+ rSh.EndUndo();
// put the shell in the right state
if( &rSrcSh != &rSh && ( rSh.IsFrmSelected() || rSh.IsObjSelected() ))
@@ -3456,7 +3456,7 @@ SwTransferable* SwTransferable::GetSwTransferable( const TransferableDataHelper&
SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
: rTrnsfr( rTrans ), pDocShell( 0 ),
- bDelBookmrk( FALSE ), bInDisconnect( FALSE )
+ bDelBookmrk( sal_False ), bInDisconnect( sal_False )
{
// we only end up here with table- or text selection
const int nSelection = rSh.GetSelectionType();
@@ -3469,9 +3469,9 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
else
{
// creating a temp. bookmark without undo
- BOOL bUndo = rSh.DoesUndo();
- rSh.DoUndo( FALSE );
- BOOL bIsModified = rSh.IsModified();
+ sal_Bool bUndo = rSh.DoesUndo();
+ rSh.DoUndo( sal_False );
+ sal_Bool bIsModified = rSh.IsModified();
::sw::mark::IMark* pMark = rSh.SetBookmark(
KeyCode(),
@@ -3481,7 +3481,7 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
if(pMark)
{
sName = pMark->GetName();
- bDelBookmrk = TRUE;
+ bDelBookmrk = sal_True;
if( !bIsModified )
rSh.ResetModified();
}
@@ -3510,7 +3510,7 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
SwTrnsfrDdeLink::~SwTrnsfrDdeLink()
{
if( refObj.Is() )
- Disconnect( TRUE );
+ Disconnect( sal_True );
}
void SwTrnsfrDdeLink::DataChanged( const String& ,
@@ -3521,14 +3521,14 @@ void SwTrnsfrDdeLink::DataChanged( const String& ,
{
if( FindDocShell() && pDocShell->GetView() )
rTrnsfr.RemoveDDELinkFormat( pDocShell->GetView()->GetEditWin() );
- Disconnect( FALSE );
+ Disconnect( sal_False );
}
}
-BOOL SwTrnsfrDdeLink::WriteData( SvStream& rStrm )
+sal_Bool SwTrnsfrDdeLink::WriteData( SvStream& rStrm )
{
if( !refObj.Is() || !FindDocShell() )
- return FALSE;
+ return sal_False;
rtl_TextEncoding eEncoding = DDE_TXT_ENCODING;
const ByteString aAppNm( GetpApp()->GetAppName(), eEncoding );
@@ -3589,25 +3589,24 @@ BOOL SwTrnsfrDdeLink::WriteData( SvStream& rStrm )
return true;
}
-void SwTrnsfrDdeLink::Disconnect( BOOL bRemoveDataAdvise )
+void SwTrnsfrDdeLink::Disconnect( sal_Bool bRemoveDataAdvise )
{
// don't accept DataChanged anymore, when already in Disconnect!
// (DTOR from Bookmark sends a DataChanged!)
- BOOL bOldDisconnect = bInDisconnect;
- bInDisconnect = TRUE;
+ sal_Bool bOldDisconnect = bInDisconnect;
+ bInDisconnect = sal_True;
// destroy the unused bookmark again (without Undo!)?
if( bDelBookmrk && refObj.Is() && FindDocShell() )
{
SwDoc* pDoc = pDocShell->GetDoc();
- BOOL bUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
// #i58448#
Link aSavedOle2Link( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
- BOOL bIsModified = pDoc->IsModified();
+ sal_Bool bIsModified = pDoc->IsModified();
IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
pMarkAccess->deleteMark(pMarkAccess->findMark(sName));
@@ -3617,8 +3616,7 @@ void SwTrnsfrDdeLink::Disconnect( BOOL bRemoveDataAdvise )
// #i58448#
pDoc->SetOle2Link( aSavedOle2Link );
- pDoc->DoUndo( bUndo );
- bDelBookmrk = FALSE;
+ bDelBookmrk = sal_False;
}
if( refObj.Is() )
@@ -3636,7 +3634,7 @@ void SwTrnsfrDdeLink::Disconnect( BOOL bRemoveDataAdvise )
bInDisconnect = bOldDisconnect;
}
-BOOL SwTrnsfrDdeLink::FindDocShell()
+sal_Bool SwTrnsfrDdeLink::FindDocShell()
{
TypeId aType( TYPE( SwDocShell ) );
SfxObjectShell* pTmpSh = SfxObjectShell::GetFirst( &aType );
@@ -3645,14 +3643,14 @@ BOOL SwTrnsfrDdeLink::FindDocShell()
if( pTmpSh == pDocShell ) // that's what we want to have
{
if( pDocShell->GetDoc() )
- return TRUE;
+ return sal_True;
break; // the Doc is not there anymore, so leave!
}
pTmpSh = SfxObjectShell::GetNext( *pTmpSh, &aType );
}
pDocShell = 0;
- return FALSE;
+ return sal_False;
}
void SwTrnsfrDdeLink::Closed()
diff --git a/sw/source/ui/docvw/AnnotationMenuButton.cxx b/sw/source/ui/docvw/AnnotationMenuButton.cxx
index 27f7ddb78908..4407e1c6fd34 100644
--- a/sw/source/ui/docvw/AnnotationMenuButton.cxx
+++ b/sw/source/ui/docvw/AnnotationMenuButton.cxx
@@ -47,13 +47,13 @@
namespace sw { namespace annotation {
-Color ColorFromAlphaColor( const UINT8 aTransparency,
+Color ColorFromAlphaColor( const sal_uInt8 aTransparency,
const Color &aFront,
const Color &aBack )
{
- return Color((UINT8)(aFront.GetRed() * aTransparency/(double)255 + aBack.GetRed() * (1-aTransparency/(double)255)),
- (UINT8)(aFront.GetGreen() * aTransparency/(double)255 + aBack.GetGreen() * (1-aTransparency/(double)255)),
- (UINT8)(aFront.GetBlue() * aTransparency/(double)255 + aBack.GetBlue() * (1-aTransparency/(double)255)));
+ return Color((sal_uInt8)(aFront.GetRed() * aTransparency/(double)255 + aBack.GetRed() * (1-aTransparency/(double)255)),
+ (sal_uInt8)(aFront.GetGreen() * aTransparency/(double)255 + aBack.GetGreen() * (1-aTransparency/(double)255)),
+ (sal_uInt8)(aFront.GetBlue() * aTransparency/(double)255 + aBack.GetBlue() * (1-aTransparency/(double)255)));
}
AnnotationMenuButton::AnnotationMenuButton( sw::sidebarwindows::SwSidebarWin& rSidebarWin )
@@ -83,20 +83,13 @@ void AnnotationMenuButton::MouseButtonDown( const MouseEvent& rMEvt )
if ( mrSidebarWin.IsReadOnly() )
{
pButtonPopup->EnableItem( FN_REPLY, false );
- pButtonPopup->EnableItem( FN_DELETE_NOTE, false );
+ pButtonPopup->EnableItem( FN_DELETE_COMMENT, false );
pButtonPopup->EnableItem( FN_DELETE_NOTE_AUTHOR, false );
pButtonPopup->EnableItem( FN_DELETE_ALL_NOTES, false );
}
else
{
- if ( mrSidebarWin.IsProtected() )
- {
- pButtonPopup->EnableItem( FN_DELETE_NOTE, false );
- }
- else
- {
- pButtonPopup->EnableItem( FN_DELETE_NOTE, true );
- }
+ pButtonPopup->EnableItem( FN_DELETE_COMMENT, !mrSidebarWin.IsProtected() );
pButtonPopup->EnableItem( FN_DELETE_NOTE_AUTHOR, true );
pButtonPopup->EnableItem( FN_DELETE_ALL_NOTES, true );
}
@@ -204,7 +197,7 @@ void AnnotationMenuButton::Paint( const Rectangle& /*rRect*/ )
void AnnotationMenuButton::KeyInput( const KeyEvent& rKeyEvt )
{
const KeyCode& rKeyCode = rKeyEvt.GetKeyCode();
- const USHORT nKey = rKeyCode.GetCode();
+ const sal_uInt16 nKey = rKeyCode.GetCode();
if ( nKey == KEY_TAB )
{
mrSidebarWin.ActivatePostIt();
diff --git a/sw/source/ui/docvw/AnnotationWin.cxx b/sw/source/ui/docvw/AnnotationWin.cxx
index bf74131ea5f4..214fef8f3d31 100644
--- a/sw/source/ui/docvw/AnnotationWin.cxx
+++ b/sw/source/ui/docvw/AnnotationWin.cxx
@@ -26,7 +26,6 @@
*
************************************************************************/
-
#include "precompiled_sw.hxx"
#include <AnnotationWin.hxx>
@@ -60,8 +59,10 @@
#include <wrtsh.hxx>
#include <docsh.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <SwUndoField.hxx>
+
namespace sw { namespace annotation {
SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin,
@@ -86,7 +87,7 @@ void SwAnnotationWin::SetPostItText()
{
// get text from SwPostItField and insert into our textview
Engine()->SetModifyHdl( Link() );
- Engine()->EnableUndo( FALSE );
+ Engine()->EnableUndo( sal_False );
mpFld = static_cast<SwPostItField*>(mpFmtFld->GetFld());
if( mpFld->GetTextObject() )
Engine()->SetText( *mpFld->GetTextObject() );
@@ -99,7 +100,7 @@ void SwAnnotationWin::SetPostItText()
Engine()->ClearModifyFlag();
Engine()->GetUndoManager().Clear();
- Engine()->EnableUndo( TRUE );
+ Engine()->EnableUndo( sal_True );
Engine()->SetModifyHdl( LINK( this, SwAnnotationWin, ModifyHdl ) );
Invalidate();
}
@@ -114,7 +115,8 @@ void SwAnnotationWin::UpdateData()
SwField* pOldField = mpFld->Copy();
mpFld->SetPar2(Engine()->GetEditEngine().GetText());
mpFld->SetTextObject(Engine()->CreateParaObject());
- DocView().GetDocShell()->GetDoc()->AppendUndo(new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true));
+ DocView().GetDocShell()->GetDoc()->GetIDocumentUndoRedo().AppendUndo(
+ new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true));
delete pOldField;
// so we get a new layout of notes (anchor position is still the same and we would otherwise not get one)
Mgr().SetLayout();
@@ -244,7 +246,8 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText)
SwField* pOldField = mpFld->Copy();
mpFld->SetPar2(Engine()->GetEditEngine().GetText());
mpFld->SetTextObject(Engine()->CreateParaObject());
- DocView().GetDocShell()->GetDoc()->AppendUndo(new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true));
+ DocView().GetDocShell()->GetDoc()->GetIDocumentUndoRedo().AppendUndo(
+ new SwUndoFieldFromDoc(aPosition, *pOldField, *mpFld, 0, true));
delete pOldField;
Engine()->SetModifyHdl( LINK( this, SwAnnotationWin, ModifyHdl ) );
Engine()->ClearModifyFlag();
@@ -254,8 +257,8 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText)
SvxLanguageItem SwAnnotationWin::GetLanguage(void)
{
// set initial language for outliner
- USHORT nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( mpFld->GetLanguage() );
- USHORT nLangWhichId = 0;
+ sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( mpFld->GetLanguage() );
+ sal_uInt16 nLangWhichId = 0;
switch (nScriptType)
{
case SCRIPTTYPE_LATIN : nLangWhichId = EE_CHAR_LANGUAGE ; break;
diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx
index 43a80ad35eeb..1c014de82f5e 100644
--- a/sw/source/ui/docvw/PostItMgr.cxx
+++ b/sw/source/ui/docvw/PostItMgr.cxx
@@ -60,7 +60,6 @@
#include <redline.hxx>
#include <docary.hxx>
#include <SwRewriter.hxx>
-#include <undobj.hxx>
#include <tools/color.hxx>
#include <swmodule.hxx>
@@ -363,8 +362,8 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
if ((*i)->pPostIt)
{
- USHORT nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( (*i)->GetFmtFld()->GetFld()->GetLanguage() );
- USHORT nLangWhichId = 0;
+ sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( (*i)->GetFmtFld()->GetFld()->GetLanguage() );
+ sal_uInt16 nLangWhichId = 0;
switch (nScriptType)
{
case SCRIPTTYPE_LATIN : nLangWhichId = EE_CHAR_LANGUAGE ; break;
@@ -892,7 +891,7 @@ void SwPostItMgr::MakeVisible(const SwSidebarWin* pPostIt,long aPage )
mpWrtShell->MakeVisible(SwRect(mpEditWin->PixelToLogic(aNoteRect)));
}
-bool SwPostItMgr::ArrowEnabled(USHORT aDirection,unsigned long aPage) const
+bool SwPostItMgr::ArrowEnabled(sal_uInt16 aDirection,unsigned long aPage) const
{
switch (aDirection)
{
@@ -908,7 +907,7 @@ bool SwPostItMgr::ArrowEnabled(USHORT aDirection,unsigned long aPage) const
}
}
-Color SwPostItMgr::GetArrowColor(USHORT aDirection,unsigned long aPage) const
+Color SwPostItMgr::GetArrowColor(sal_uInt16 aDirection,unsigned long aPage) const
{
if (ArrowEnabled(aDirection,aPage))
{
@@ -1164,7 +1163,7 @@ void SwPostItMgr::Delete(String aAuthor)
mpWrtShell->GotoField( *(*i) );
mpWrtShell->DelRight();
}
- mpWrtShell->EndUndo( UNDO_DELETE );
+ mpWrtShell->EndUndo();
PrepareView();
mpWrtShell->EndAllAction();
mbLayout = true;
@@ -1193,7 +1192,7 @@ void SwPostItMgr::Delete()
mpWrtShell->DelRight();
}
- mpWrtShell->EndUndo( UNDO_DELETE );
+ mpWrtShell->EndUndo();
PrepareView();
mpWrtShell->EndAllAction();
mbLayout = true;
@@ -1266,7 +1265,7 @@ sw::annotation::SwAnnotationWin* SwPostItMgr::GetAnnotationWin(const SwPostItFie
return NULL;
}
-SwSidebarWin* SwPostItMgr::GetNextPostIt( USHORT aDirection,
+SwSidebarWin* SwPostItMgr::GetNextPostIt( sal_uInt16 aDirection,
SwSidebarWin* aPostIt )
{
if (mvPostItFlds.size()>1)
diff --git a/sw/source/ui/docvw/SidebarTxtControl.cxx b/sw/source/ui/docvw/SidebarTxtControl.cxx
index cff71082298c..473c7b872bb4 100644
--- a/sw/source/ui/docvw/SidebarTxtControl.cxx
+++ b/sw/source/ui/docvw/SidebarTxtControl.cxx
@@ -62,7 +62,6 @@
#include <wrtsh.hxx>
#include <shellres.hxx>
#include <SwRewriter.hxx>
-#include <undobj.hxx>
namespace css = ::com::sun::star;
@@ -114,7 +113,7 @@ void SidebarTxtControl::LoseFocus()
void SidebarTxtControl::RequestHelp(const HelpEvent &rEvt)
{
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
switch( mrSidebarWin.GetLayoutStatus() )
{
case SwPostItHelper::INSERTED: nResId = STR_REDLINE_INSERT; break;
@@ -179,7 +178,7 @@ void SidebarTxtControl::Paint( const Rectangle& rRect)
void SidebarTxtControl::KeyInput( const KeyEvent& rKeyEvt )
{
const KeyCode& rKeyCode = rKeyEvt.GetKeyCode();
- USHORT nKey = rKeyCode.GetCode();
+ sal_uInt16 nKey = rKeyCode.GetCode();
if ( ( rKeyCode.IsMod1() && rKeyCode.IsMod2() ) &&
( (nKey == KEY_PAGEUP) || (nKey == KEY_PAGEDOWN) ) )
{
@@ -234,7 +233,7 @@ void SidebarTxtControl::KeyInput( const KeyEvent& rKeyEvt )
}
}
- mrDocView.GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ mrDocView.GetViewFrame()->GetBindings().InvalidateAll(sal_False);
}
void SidebarTxtControl::MouseMove( const MouseEvent& rMEvt )
@@ -301,7 +300,7 @@ void SidebarTxtControl::MouseButtonDown( const MouseEvent& rMEvt )
{
GetTextView()->MouseButtonDown( rMEvt );
}
- mrDocView.GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ mrDocView.GetViewFrame()->GetBindings().InvalidateAll(sal_False);
}
void SidebarTxtControl::MouseButtonUp( const MouseEvent& rMEvt )
@@ -331,7 +330,7 @@ void SidebarTxtControl::Command( const CommandEvent& rCEvt )
{
if ( !mrSidebarWin.IsProtected() &&
GetTextView() &&
- GetTextView()->IsWrongSpelledWordAtPos( rCEvt.GetMousePosPixel(),TRUE ))
+ GetTextView()->IsWrongSpelledWordAtPos( rCEvt.GetMousePosPixel(),sal_True ))
{
Link aLink = LINK(this, SidebarTxtControl, OnlineSpellCallback);
GetTextView()->ExecuteSpellPopup(rCEvt.GetMousePosPixel(),&aLink);
diff --git a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
index 9197cacf0132..52ddacabb3df 100644
--- a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
+++ b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
@@ -78,7 +78,7 @@ class SidebarTextEditSource : public SvxEditSource,
SidebarTextEditSource::SidebarTextEditSource( SidebarTxtControl& rSidebarTxtControl )
: SvxEditSource()
, mrSidebarTxtControl( rSidebarTxtControl )
- , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), FALSE )
+ , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), sal_False )
, mViewForwarder( *(rSidebarTxtControl.GetTextView()) )
{
if ( mrSidebarTxtControl.GetTextView() )
diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx
index 4aeee7624e1c..a4715c842e16 100644
--- a/sw/source/ui/docvw/SidebarWin.cxx
+++ b/sw/source/ui/docvw/SidebarWin.cxx
@@ -332,7 +332,7 @@ void SwSidebarWin::InitControls()
SwDocShell* aShell = mrView.GetDocShell();
mpOutliner = new Outliner(&aShell->GetPool(),OUTLINERMODE_TEXTOBJECT);
aShell->GetDoc()->SetCalcFieldValueHdl( mpOutliner );
- mpOutliner->SetUpdateMode( TRUE );
+ mpOutliner->SetUpdateMode( sal_True );
Rescale();
mpOutlinerView = new OutlinerView ( mpOutliner, mpSidebarTxtControl );
@@ -355,7 +355,7 @@ void SwSidebarWin::InitControls()
mpVScrollbar->AddEventListener( LINK( this, SwSidebarWin, WindowEventListener ) );
const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions();
- ULONG nCntrl = mpOutliner->GetControlWord();
+ sal_uLong nCntrl = mpOutliner->GetControlWord();
// TODO: crash when AUTOCOMPLETE enabled
nCntrl |= EE_CNTRL_MARKFIELDS | EE_CNTRL_PASTESPECIAL | EE_CNTRL_AUTOCORRECT | EV_CNTRL_AUTOSCROLL | EE_CNTRL_URLSFXEXECUTE; // | EE_CNTRL_AUTOCOMPLETE;
if (pVOpt->IsFieldShadings())
@@ -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();
@@ -935,7 +935,6 @@ void SwSidebarWin::ExecuteCommand(USHORT nSlot)
break;
}
case FN_DELETE_COMMENT:
- case FN_DELETE_NOTE:
//Delete(); // do not kill the parent of our open popup menu
mnEventId = Application::PostUserEvent( LINK( this, SwSidebarWin, DeleteHdl), 0 );
@@ -971,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)
@@ -1011,8 +1010,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() )
{
@@ -1068,8 +1067,8 @@ IMPL_LINK(SwSidebarWin, DeleteHdl, void*, EMPTYARG)
void SwSidebarWin::ResetAttributes()
{
- mpOutlinerView->RemoveAttribsKeepLanguages(TRUE);
- mpOutliner->RemoveFields(TRUE);
+ mpOutlinerView->RemoveAttribsKeepLanguages(sal_True);
+ mpOutliner->RemoveFields(sal_True);
mpOutlinerView->SetAttribs(DefaultItem());
}
@@ -1107,7 +1106,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
@@ -1203,7 +1202,7 @@ void SwSidebarWin::SwitchToFieldPos()
GotoPos();
sal_uInt32 aCount = MoveCaret();
if (aCount)
- mrView.GetDocShell()->GetWrtShell()->SwCrsrShell::Right(aCount, 0, FALSE);
+ mrView.GetDocShell()->GetWrtShell()->SwCrsrShell::Right(aCount, 0, sal_False);
GrabFocusToDocument();
}
diff --git a/sw/source/ui/docvw/access.src b/sw/source/ui/docvw/access.src
index 42081d3ab7e7..d455c01d0cf3 100644
--- a/sw/source/ui/docvw/access.src
+++ b/sw/source/ui/docvw/access.src
@@ -100,3 +100,22 @@ String STR_ACCESS_ANNOTATION_BUTTON_DESC
Text [ en-US ] = "Activate this button to open a list of actions which can be performed on this comment and other comments";
};
+//IAccessibility2 Implementation 2009-----
+String STR_ACCESS_PREVIEW_DOC_NAME
+{
+ Text [ en-US ] = "Document preview";
+};
+String STR_ACCESS_PREVIEW_DOC_SUFFIX
+{
+ Text [ en-US ] = "(Preview mode)";
+};
+String STR_ACCESS_DOC_WORDPROCESSING
+{
+ Text [ en-US ] = "%PRODUCTNAME Document";
+};
+String STR_ACCESS_DOC_WORDPROCESSING_READONLY
+{
+ Text [ en-US ] = "(read-only)";
+};
+//-----IAccessibility2 Implementation 2009
+
diff --git a/sw/source/ui/docvw/docvw.src b/sw/source/ui/docvw/docvw.src
index 658690396bf0..b4f57bbcc215 100644
--- a/sw/source/ui/docvw/docvw.src
+++ b/sw/source/ui/docvw/docvw.src
@@ -36,56 +36,56 @@ Menu MN_READONLY_POPUP
MenuItem
{
Identifier = MN_READONLY_OPENURL ;
- HelpID = SID_OPENDOC ;
+ HelpId = CMD_SID_OPENDOC ;
Text [ en-US ] = "~Open" ;
};
MenuItem
{
Identifier = MN_READONLY_OPENURLNEW ;
- HelpID = SID_OPENDOC ;
+ HelpId = CMD_SID_OPENDOC ;
Text [ en-US ] = "Open in New Window" ;
};
MenuItem
{
Identifier = MN_READONLY_EDITDOC ;
- HelpID = SID_EDITDOC ;
+ HelpId = CMD_SID_EDITDOC ;
Text [ en-US ] = "~Edit" ;
};
MenuItem
{
Identifier = MN_READONLY_SELECTION_MODE ;
- HelpID = FN_READONLY_SELECTION_MODE ;
+ HelpId = CMD_FN_READONLY_SELECTION_MODE ;
Text [ en-US ] = "Select Text";
};
MenuItem
{
Identifier = MN_READONLY_RELOAD;
- HelpID = SID_RELOAD;
+ HelpId = CMD_SID_RELOAD;
Text [ en-US ] = "Re~load";
};
MenuItem
{
Identifier = MN_READONLY_RELOAD_FRAME;
- HelpID = SID_RELOAD;
+ HelpId = CMD_SID_RELOAD;
Text [ en-US ] = "Reload Frame";
};
MenuItem
{
Identifier = MN_READONLY_SOURCEVIEW ;
- HelpID = HID_SOURCEVIEW ;
+ HelpId = HID_SOURCEVIEW ;
Text [ en-US ] = "HT~ML Source" ;
};
SEPARATOR
MenuItem
{
Identifier = MN_READONLY_BROWSE_BACKWARD ;
- HelpID = SID_BROWSE_BACKWARD ;
+ HelpId = CMD_SID_BROWSE_BACKWARD ;
Text [ en-US ] = "Backwards" ;
};
MenuItem
{
Identifier = MN_READONLY_BROWSE_FORWARD ;
- HelpID = SID_BROWSE_FORWARD ;
+ HelpId = CMD_SID_BROWSE_FORWARD ;
Text [ en-US ] = "~Forward" ;
};
SEPARATOR
@@ -187,14 +187,14 @@ Menu MN_READONLY_POPUP
MenuItem
{
Identifier = SID_WIN_FULLSCREEN;
- HelpID = SID_WIN_FULLSCREEN;
+ HelpId = CMD_SID_WIN_FULLSCREEN;
Text [ en-US ] = "Leave Full-Screen Mode" ;
};
SEPARATOR
MenuItem
{
Identifier = MN_READONLY_COPY ;
- HelpID = SID_COPY;
+ HelpId = CMD_SID_COPY;
Text [ en-US ] = "~Copy" ;
};
};
diff --git a/sw/source/ui/docvw/edtdd.cxx b/sw/source/ui/docvw/edtdd.cxx
index 544d407ec5bf..c5589a57d351 100644
--- a/sw/source/ui/docvw/edtdd.cxx
+++ b/sw/source/ui/docvw/edtdd.cxx
@@ -57,27 +57,27 @@ using namespace ::com::sun::star;
// no include "dbgoutsw.hxx" here!!!!!!
-extern BOOL bNoInterrupt;
-extern BOOL bFrmDrag;
-extern BOOL bDDTimerStarted;
+extern sal_Bool bNoInterrupt;
+extern sal_Bool bFrmDrag;
+extern sal_Bool bDDTimerStarted;
-BOOL bExecuteDrag = FALSE;
+sal_Bool bExecuteDrag = sal_False;
void SwEditWin::StartDDTimer()
{
aTimer.SetTimeoutHdl(LINK(this, SwEditWin, DDHandler));
aTimer.SetTimeout(480);
aTimer.Start();
- bDDTimerStarted = TRUE;
+ bDDTimerStarted = sal_True;
}
void SwEditWin::StopDDTimer(SwWrtShell *pSh, const Point &rPt)
{
aTimer.Stop();
- bDDTimerStarted = FALSE;
+ bDDTimerStarted = sal_False;
if(!pSh->IsSelFrmMode())
- (pSh->*pSh->fnSetCrsr)(&rPt,FALSE);
+ (pSh->*pSh->fnSetCrsr)(&rPt,sal_False);
aTimer.SetTimeoutHdl(LINK(this,SwEditWin, TimerHandler));
}
@@ -86,36 +86,36 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel )
SwWrtShell &rSh = rView.GetWrtShell();
if( rSh.GetDrawView() )
{
- CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, TRUE );
+ CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, sal_True );
if( rSh.GetDrawView()->Command( aDragEvent, this ) )
{
- rView.GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ rView.GetViewFrame()->GetBindings().InvalidateAll(sal_False);
return; // Event von der SdrView ausgewertet
}
}
if ( !pApplyTempl && !rSh.IsDrawCreate() && !IsDrawAction())
{
- BOOL bStart = FALSE, bDelSelect = FALSE;
+ sal_Bool bStart = sal_False, bDelSelect = sal_False;
SdrObject *pObj = NULL;
Point aDocPos( PixelToLogic( rPosPixel ) );
- if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPos, TRUE, TRUE))
+ if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPos, sal_True, sal_True))
//We are not selecting and aren't at a selection
- bStart = TRUE;
+ bStart = sal_True;
else if ( !bFrmDrag && rSh.IsSelFrmMode() &&
rSh.IsInsideSelectedObj( aDocPos ) )
{
//We are not dragging internally and are not at an
//object (frame, draw object)
- bStart = TRUE;
+ bStart = sal_True;
}
else if( !bFrmDrag && rView.GetDocShell()->IsReadOnly() &&
OBJCNT_NONE != rSh.GetObjCntType( aDocPos, pObj ))
{
rSh.LockPaint();
if( rSh.SelectObj( aDocPos, 0, pObj ))
- bStart = bDelSelect = TRUE;
+ bStart = bDelSelect = sal_True;
else
rSh.UnlockPaint();
}
@@ -124,15 +124,15 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel )
SwContentAtPos aSwContentAtPos( SwContentAtPos::SW_INETATTR );
bStart = rSh.GetContentAtPos( aDocPos,
aSwContentAtPos,
- FALSE );
+ sal_False );
}
if ( bStart && !bIsInDrag )
{
- bMBPressed = FALSE;
+ bMBPressed = sal_False;
ReleaseMouse();
- bFrmDrag = FALSE;
- bExecuteDrag = TRUE;
+ bFrmDrag = sal_False;
+ bExecuteDrag = sal_True;
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
aMovePos = aDocPos;
@@ -151,7 +151,7 @@ void SwEditWin::StartExecuteDrag()
if( !bExecuteDrag || bIsInDrag )
return;
- bIsInDrag = TRUE;
+ bIsInDrag = sal_True;
SwTransferable* pTransfer = new SwTransferable( rView.GetWrtShell() );
uno::Reference<
@@ -164,7 +164,7 @@ void SwEditWin::DragFinished()
{
DropCleanup();
aTimer.SetTimeoutHdl( LINK(this,SwEditWin, TimerHandler) );
- bIsInDrag = FALSE;
+ bIsInDrag = sal_False;
}
@@ -173,11 +173,11 @@ void SwEditWin::DropCleanup()
SwWrtShell &rSh = rView.GetWrtShell();
// reset statuses
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
if ( bOldIdleSet )
{
((SwViewOption*)rSh.GetViewOptions())->SetIdle( bOldIdle );
- bOldIdleSet = FALSE;
+ bOldIdleSet = sal_False;
}
if ( pUserMarker )
CleanupDropUserMarker();
@@ -238,7 +238,7 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt )
// (according to KA due to Java D&D), we'll have to
// reevaluate the drop action once more _with_ the
// Transferable.
- USHORT nEventAction;
+ sal_uInt16 nEventAction;
sal_Int8 nUserOpt = rEvt.mbDefault ? EXCHG_IN_ACTION_DEFAULT
: rEvt.mnAction;
m_nDropAction = SotExchange::GetExchangeAction(
@@ -252,17 +252,17 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt )
TransferableDataHelper aData( rEvt.maDropEvent.Transferable );
nRet = rEvt.mnAction;
if( !SwTransferable::PasteData( aData, rSh, m_nDropAction, m_nDropFormat,
- m_nDropDestination, FALSE, rEvt.mbDefault, &aDocPt, nRet))
+ m_nDropDestination, sal_False, rEvt.mbDefault, &aDocPt, nRet))
nRet = DND_ACTION_NONE;
else if ( SW_MOD()->pDragDrop )
//Don't clean up anymore at internal D&D!
- SW_MOD()->pDragDrop->SetCleanUp( FALSE );
+ SW_MOD()->pDragDrop->SetCleanUp( sal_False );
return nRet;
}
-USHORT SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj )
+sal_uInt16 SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj )
{
SwWrtShell &rSh = rView.GetWrtShell();
const Point aDocPt( PixelToLogic( rPixPnt ) );
@@ -287,7 +287,7 @@ USHORT SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj )
}
//What do we want to drop on now?
- USHORT nDropDestination = 0;
+ sal_uInt16 nDropDestination = 0;
//Did anything else arrive from the DrawingEngine?
if( OBJCNT_NONE != eType )
@@ -296,7 +296,7 @@ USHORT SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj )
{
case OBJCNT_GRF:
{
- BOOL bLink,
+ sal_Bool bLink,
bIMap = 0 != rSh.GetFmtFromObj( aDocPt )->GetURL().GetMap();
String aDummy;
rSh.GetGrfAtPos( aDocPt, aDummy, bLink );
@@ -362,14 +362,14 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
aWin.Right() -= nMargin;
aWin.Bottom() -= nMargin;
if(!aWin.IsInside(aPixPt)) {
- static ULONG last_tick = 0;
- ULONG current_tick = Time::GetSystemTicks();
+ static sal_uLong last_tick = 0;
+ sal_uLong current_tick = Time::GetSystemTicks();
if((current_tick-last_tick) > 500) {
last_tick = current_tick;
if(!bOldIdleSet) {
bOldIdle = rSh.GetViewOptions()->IsIdle();
- ((SwViewOption *)rSh.GetViewOptions())->SetIdle(FALSE);
- bOldIdleSet = TRUE;
+ ((SwViewOption *)rSh.GetViewOptions())->SetIdle(sal_False);
+ bOldIdleSet = sal_True;
}
CleanupDropUserMarker();
if(aPixPt.X() > aWin.Right()) aPixPt.X() += nMargin;
@@ -384,7 +384,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
if(bOldIdleSet) {
((SwViewOption *)rSh.GetViewOptions())->SetIdle( bOldIdle );
- bOldIdleSet = FALSE;
+ bOldIdleSet = sal_False;
}
SdrObject *pObj = NULL;
@@ -392,7 +392,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
if( !m_nDropDestination )
return DND_ACTION_NONE;
- USHORT nEventAction;
+ sal_uInt16 nEventAction;
sal_Int8 nUserOpt = rEvt.mbDefault ? EXCHG_IN_ACTION_DEFAULT
: rEvt.mnAction;
@@ -410,21 +410,21 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
SwModule *pMod = SW_MOD();
if( pMod->pDragDrop )
{
- BOOL bCleanup = FALSE;
+ sal_Bool bCleanup = sal_False;
//Drawing objects in Headers/Footers are not allowed
SwWrtShell *pSrcSh = pMod->pDragDrop->GetShell();
if( (pSrcSh->GetSelFrmType() == FRMTYPE_DRAWOBJ) &&
pSrcSh->IsSelContainsControl() &&
- (rSh.GetFrmType( &aDocPt, FALSE ) & (FRMTYPE_HEADER|FRMTYPE_FOOTER)) )
+ (rSh.GetFrmType( &aDocPt, sal_False ) & (FRMTYPE_HEADER|FRMTYPE_FOOTER)) )
{
- bCleanup = TRUE;
+ bCleanup = sal_True;
}
// don't more position protected objects!
else if( DND_ACTION_MOVE == rEvt.mnAction &&
pSrcSh->IsSelObjProtected( FLYPROTECT_POS ) )
{
- bCleanup = TRUE;
+ bCleanup = sal_True;
}
else if( rEvt.mbDefault )
{
@@ -496,16 +496,16 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
IMPL_LINK( SwEditWin, DDHandler, Timer *, EMPTYARG )
{
- bDDTimerStarted = FALSE;
+ bDDTimerStarted = sal_False;
aTimer.Stop();
aTimer.SetTimeout(240);
- bMBPressed = FALSE;
+ bMBPressed = sal_False;
ReleaseMouse();
- bFrmDrag = FALSE;
+ bFrmDrag = sal_False;
if ( rView.GetViewFrame() )
{
- bExecuteDrag = TRUE;
+ bExecuteDrag = sal_True;
StartExecuteDrag();
}
return 0;
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 29db1d774532..2a6124aba578 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -147,22 +147,22 @@ using namespace ::com::sun::star;
--------------------------------------------------------------------*/
static bool bInputLanguageSwitched = false;
-extern BOOL bNoInterrupt; // in mainwn.cxx
+extern sal_Bool bNoInterrupt; // in mainwn.cxx
// Usually in MouseButtonUp a selection is revoked when the selection is
// not currently being pulled open. Unfortunately in MouseButtonDown there
// is being selected at double/triple click. That selection is completely
// finished in the Handler and thus can't be distinguished in the Up.
// To resolve this bHoldSelection is set in Down at evaluated in Up.
-static BOOL bHoldSelection = FALSE;
-
-BOOL bFrmDrag = FALSE;
-BOOL bValidCrsrPos = FALSE;
-BOOL bModePushed = FALSE;
-BOOL bDDTimerStarted = FALSE;
-BOOL bFlushCharBuffer = FALSE;
-BOOL SwEditWin::bReplaceQuote = FALSE;
-BOOL bDDINetAttr = FALSE;
+static sal_Bool bHoldSelection = sal_False;
+
+sal_Bool bFrmDrag = sal_False;
+sal_Bool bValidCrsrPos = sal_False;
+sal_Bool bModePushed = sal_False;
+sal_Bool bDDTimerStarted = sal_False;
+sal_Bool bFlushCharBuffer = sal_False;
+sal_Bool SwEditWin::bReplaceQuote = sal_False;
+sal_Bool bDDINetAttr = sal_False;
SdrHdlKind eSdrMoveHdl = HDL_USER;
QuickHelpData* SwEditWin::pQuickHlpData = 0;
@@ -171,9 +171,9 @@ long SwEditWin::nDDStartPosY = 0;
long SwEditWin::nDDStartPosX = 0;
Color SwEditWin::aTextBackColor(COL_YELLOW);
Color SwEditWin::aTextColor(COL_RED);
-BOOL SwEditWin::bTransparentBackColor = FALSE; // background not transparent
+sal_Bool SwEditWin::bTransparentBackColor = sal_False; // background not transparent
-extern BOOL bExecuteDrag;
+extern sal_Bool bExecuteDrag;
SfxShell* lcl_GetShellFromDispatcher( SwView& rView, TypeId nType );
@@ -226,27 +226,27 @@ public:
struct QuickHelpData
{
SvStringsISortDtor aArr;
- USHORT* pAttrs;
+ sal_uInt16* pAttrs;
CommandExtTextInputData* pCETID;
- ULONG nTipId;
- USHORT nLen, nCurArrPos;
- BOOL bClear : 1, bChkInsBlank : 1, bIsTip : 1, bIsAutoText : 1;
+ sal_uLong nTipId;
+ sal_uInt16 nLen, nCurArrPos;
+ sal_Bool bClear : 1, bChkInsBlank : 1, bIsTip : 1, bIsAutoText : 1;
QuickHelpData() : pAttrs( 0 ), pCETID( 0 ) { ClearCntnt(); }
void Move( QuickHelpData& rCpy );
void ClearCntnt();
- void Start( SwWrtShell& rSh, USHORT nWrdLen );
+ void Start( SwWrtShell& rSh, sal_uInt16 nWrdLen );
void Stop( SwWrtShell& rSh );
- BOOL HasCntnt() const { return aArr.Count() && 0 != nLen; }
+ sal_Bool HasCntnt() const { return aArr.Count() && 0 != nLen; }
- void Inc( BOOL bEndLess )
+ void Inc( sal_Bool bEndLess )
{
if( ++nCurArrPos >= aArr.Count() )
nCurArrPos = (bEndLess && !bIsAutoText )? 0 : nCurArrPos-1;
}
- void Dec( BOOL bEndLess )
+ void Dec( sal_Bool bEndLess )
{
if( 0 == nCurArrPos-- )
nCurArrPos = (bEndLess && !bIsAutoText ) ? aArr.Count()-1 : 0;
@@ -261,7 +261,7 @@ struct QuickHelpData
#define HIT_PIX 2 /* hit tolerance in pixel */
#define MIN_MOVE 4
-inline BOOL IsMinMove(const Point &rStartPos, const Point &rLPt)
+inline sal_Bool IsMinMove(const Point &rStartPos, const Point &rLPt)
{
return Abs(rStartPos.X() - rLPt.X()) > MIN_MOVE ||
Abs(rStartPos.Y() - rLPt.Y()) > MIN_MOVE;
@@ -273,9 +273,9 @@ inline BOOL IsMinMove(const Point &rStartPos, const Point &rLPt)
in selecting, with DrawObjects; at SwgFlys to trigger
hyperlinks if applicable (DownLoad/NewWindow!)
--------------------------------------------------------------------*/
-inline BOOL IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt )
+inline sal_Bool IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
SdrObject* pObj;
switch( rSh.GetObjCntType( rPt, pObj ))
{
@@ -283,7 +283,7 @@ inline BOOL IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt )
case OBJCNT_FLY:
case OBJCNT_GRF:
case OBJCNT_OLE:
- bRet = FALSE;
+ bRet = sal_False;
break;
default:; //prevent warning
}
@@ -294,7 +294,7 @@ inline BOOL IsDrawObjSelectable( const SwWrtShell& rSh, const Point& rPt )
Description: switch pointer
--------------------------------------------------------------------*/
-void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier )
+void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
{
SwWrtShell &rSh = rView.GetWrtShell();
if( pApplyTempl )
@@ -377,43 +377,43 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier )
return;
}
- BOOL bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
+ sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
if ( !bExecHyperlinks )
{
SvtSecurityOptions aSecOpts;
- const BOOL bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+ const sal_Bool bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
if ( ( bSecureOption && nModifier == KEY_MOD1 ) ||
( !bSecureOption && nModifier != KEY_MOD1 ) )
- bExecHyperlinks = TRUE;
+ bExecHyperlinks = sal_True;
}
- const BOOL bExecSmarttags = nModifier == KEY_MOD1;
+ const sal_Bool bExecSmarttags = nModifier == KEY_MOD1;
SdrView *pSdrView = rSh.GetDrawView();
- BOOL bPrefSdrPointer = FALSE;
- BOOL bHitHandle = FALSE;
- BOOL bCntAtPos = FALSE;
- BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
+ sal_Bool bPrefSdrPointer = sal_False;
+ sal_Bool bHitHandle = sal_False;
+ sal_Bool bCntAtPos = sal_False;
+ sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly() &&
rSh.IsCrsrReadonly();
aActHitType = SDRHIT_NONE;
PointerStyle eStyle = POINTER_TEXT;
if ( !pSdrView )
- bCntAtPos = TRUE;
- else if ( TRUE == (bHitHandle = pSdrView->PickHandle( rLPt ) != 0) )
+ bCntAtPos = sal_True;
+ else if ( sal_True == (bHitHandle = pSdrView->PickHandle( rLPt ) != 0) )
{
aActHitType = SDRHIT_OBJECT;
- bPrefSdrPointer = TRUE;
+ bPrefSdrPointer = sal_True;
}
else
{
- const BOOL bNotInSelObj = !rSh.IsInsideSelectedObj( rLPt );
+ const sal_Bool bNotInSelObj = !rSh.IsInsideSelectedObj( rLPt );
if ( rView.GetDrawFuncPtr() && !bInsDraw && bNotInSelObj )
{
aActHitType = SDRHIT_OBJECT;
if (IsObjectSelect())
eStyle = POINTER_ARROW;
else
- bPrefSdrPointer = TRUE;
+ bPrefSdrPointer = sal_True;
}
else
{
@@ -438,7 +438,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier )
if (pSdrView->IsTextEdit())
{
aActHitType = SDRHIT_NONE;
- bPrefSdrPointer = TRUE;
+ bPrefSdrPointer = sal_True;
}
else
{
@@ -448,7 +448,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier )
if (eHit == SDRHIT_URLFIELD && bExecHyperlinks)
{
aActHitType = SDRHIT_OBJECT;
- bPrefSdrPointer = TRUE;
+ bPrefSdrPointer = sal_True;
}
else
{
@@ -487,9 +487,9 @@ void SwEditWin::UpdatePointer(const Point &rLPt, USHORT nModifier )
else
{
if ( rView.GetDrawFuncPtr() )
- bPrefSdrPointer = TRUE;
+ bPrefSdrPointer = sal_True;
else
- bCntAtPos = TRUE;
+ bCntAtPos = sal_True;
}
}
}
@@ -552,7 +552,7 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG )
SwWrtShell &rSh = rView.GetWrtShell();
Point aModPt( aMovePos );
const SwRect aOldVis( rSh.VisArea() );
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if ( !rSh.VisArea().IsInside( aModPt ) )
{
@@ -560,12 +560,12 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG )
{
const int nMaxScroll = 40;
rView.Scroll( Rectangle(aModPt,Size(1,1)), nMaxScroll, nMaxScroll);
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( bFrmDrag )
{
- (rSh.*rSh.fnDrag)(&aModPt,FALSE);
- bDone = TRUE;
+ (rSh.*rSh.fnDrag)(&aModPt,sal_False);
+ bDone = sal_True;
}
if ( !bDone )
aModPt = rSh.GetCntntPos( aModPt,aModPt.Y() > rSh.VisArea().Bottom() );
@@ -578,7 +578,7 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG )
rSh.SelectTableRowCol( *pRowColumnSelectionStart, &aPos, bIsRowDrag );
}
else
- (rSh.*rSh.fnSetCrsr)( &aModPt, FALSE );
+ (rSh.*rSh.fnSetCrsr)( &aModPt, sal_False );
// It can be that a "jump" over a table cannot be accomplished like
// that. So we jump over the table by Up/Down here.
@@ -588,9 +588,9 @@ IMPL_LINK( SwEditWin, TimerHandler, Timer *, EMPTYARG )
// take the center point of VisArea to
// decide in which direction the user want.
if( aModPt.Y() < ( rVisArea.Top() + rVisArea.Height() / 2 ) )
- rSh.Up( TRUE, 1 );
+ rSh.Up( sal_True, 1 );
else
- rSh.Down( TRUE, 1 );
+ rSh.Down( sal_True, 1 );
}
}
@@ -634,14 +634,14 @@ inline void SwEditWin::EnterArea()
Description: insert mode for frames
------------------------------------------------------------------------*/
-void SwEditWin::InsFrm(USHORT nCols)
+void SwEditWin::InsFrm(sal_uInt16 nCols)
{
- StdDrawMode( OBJ_NONE, FALSE );
- bInsFrm = TRUE;
+ StdDrawMode( OBJ_NONE, sal_False );
+ bInsFrm = sal_True;
nInsFrmColCount = nCols;
}
-void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, BOOL bObjSelect )
+void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, sal_Bool bObjSelect )
{
SetSdrDrawMode( eSdrObjectKind );
@@ -655,8 +655,8 @@ void SwEditWin::StdDrawMode( SdrObjKind eSdrObjectKind, BOOL bObjSelect )
if (bObjSelect)
rView.GetDrawFuncPtr()->Activate( SID_OBJECT_SELECT );
else
- rView.GetDrawFuncPtr()->Activate( sal::static_int_cast< USHORT >(eSdrObjectKind) );
- bInsFrm = FALSE;
+ rView.GetDrawFuncPtr()->Activate( sal::static_int_cast< sal_uInt16 >(eSdrObjectKind) );
+ bInsFrm = sal_False;
nInsFrmColCount = 1;
}
@@ -668,22 +668,22 @@ void SwEditWin::StopInsFrm()
rView.SetDrawFuncPtr(NULL);
}
rView.LeaveDrawCreate(); // leave construction mode
- bInsFrm = FALSE;
+ bInsFrm = sal_False;
nInsFrmColCount = 1;
}
-BOOL SwEditWin::IsInputSequenceCheckingRequired( const String &rText, const SwPaM& rCrsr ) const
+sal_Bool SwEditWin::IsInputSequenceCheckingRequired( const String &rText, const SwPaM& rCrsr ) const
{
const SvtCTLOptions& rCTLOptions = SW_MOD()->GetCTLOptions();
if ( !rCTLOptions.IsCTLFontEnabled() ||
!rCTLOptions.IsCTLSequenceChecking() )
- return FALSE;
+ return sal_False;
const xub_StrLen nFirstPos = rCrsr.Start()->nContent.GetIndex();
if ( 0 == nFirstPos ) /* first char needs not to be checked */
- return FALSE;
+ return sal_False;
SwBreakIt *pBreakIter = SwBreakIt::Get();
uno::Reference < i18n::XBreakIterator > xBI = pBreakIter->GetBreakIter();
@@ -795,7 +795,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;
@@ -830,7 +830,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;
@@ -842,7 +842,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 )
@@ -909,7 +909,7 @@ void SwEditWin::FlushInBuffer()
rSh.Insert( aInBuffer );
eBufferLanguage = LANGUAGE_DONTKNOW;
aInBuffer.Erase();
- bFlushCharBuffer = FALSE;
+ bFlushCharBuffer = sal_False;
}
}
@@ -922,7 +922,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();
@@ -951,10 +951,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;
@@ -990,7 +990,7 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
case MOVE_DOWN_BIG: aTmp.Top( aTmp.Top() + nDown ); break;
default: OSL_ENSURE(true, "ChangeFly: Unknown direction." );
}
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
if ((FLY_AS_CHAR == eAnchorId) && ( nDir % 2 ))
{
long aDiff = aTmp.Top() - aRefPoint.Y();
@@ -1003,7 +1003,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:
@@ -1034,7 +1034,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 ))
@@ -1058,23 +1058,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 )
@@ -1083,7 +1083,7 @@ void SwEditWin::ChangeFly( BYTE nDir, BOOL bWeb )
}
}
-void SwEditWin::ChangeDrawing( BYTE nDir )
+void SwEditWin::ChangeDrawing( sal_uInt8 nDir )
{
// start undo action in order to get only one
// undo action for this change.
@@ -1093,7 +1093,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:
@@ -1127,14 +1127,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));
@@ -1153,8 +1153,8 @@ void SwEditWin::ChangeDrawing( BYTE nDir )
if(0 == (nProtect&FLYPROTECT_POS))
{
// Check if object is anchored as character and move direction
- BOOL bDummy;
- bool bVertAnchor = rSh.IsFrmVertical( TRUE, bDummy );
+ sal_Bool bDummy1, bDummy2;
+ const bool bVertAnchor = rSh.IsFrmVertical( sal_True, bDummy1, bDummy2 );
bool bHoriMove = !bVertAnchor == !( nDir % 2 );
bool bMoveAllowed =
!bHoriMove || (rSh.GetAnchorId() != FLY_AS_CHAR);
@@ -1190,14 +1190,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();
@@ -1243,7 +1243,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
@@ -1264,7 +1264,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
// OS:the DrawView also needs a readonly-Flag as well
if ( !bIsDocReadOnly && rSh.GetDrawView() && rSh.GetDrawView()->KeyInput( rKEvt, this ) )
{
- rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll( FALSE );
+ rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll( sal_False );
rSh.SetModified();
return; // Event evaluated by SdrView
}
@@ -1275,10 +1275,10 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
rSh.Edit();
}
- BOOL bFlushBuffer = FALSE;
- BOOL bNormalChar = FALSE;
- BOOL bChkInsBlank = pQuickHlpData->bChkInsBlank;
- pQuickHlpData->bChkInsBlank = FALSE;
+ sal_Bool bFlushBuffer = sal_False;
+ sal_Bool bNormalChar = sal_False;
+ sal_Bool bChkInsBlank = pQuickHlpData->bChkInsBlank;
+ pQuickHlpData->bChkInsBlank = sal_False;
#if OSL_DEBUG_LEVEL > 1
if (rKEvt.GetKeyCode().GetCode() == KEY_F12)
@@ -1304,7 +1304,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
// must changed from switch to if, because the Linux
// compiler has problem with the code. Has to remove if the new general
// handler exist.
- USHORT nKey = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nKey = rKEvt.GetKeyCode().GetCode();
if( KEY_UP == nKey || KEY_DOWN == nKey ||
KEY_LEFT == nKey || KEY_RIGHT == nKey )
@@ -1321,11 +1321,14 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
if( ( bVertText && ( !bTblCrsr || bVertTable ) ) ||
( bTblCrsr && bVertTable ) )
{
+ // Attempt to integrate cursor travelling for mongolian layout does not work.
+ // Thus, back to previous mapping of cursor keys to direction keys.
if( KEY_UP == nKey ) nKey = KEY_LEFT;
else if( KEY_DOWN == nKey ) nKey = KEY_RIGHT;
else if( KEY_LEFT == nKey ) nKey = KEY_DOWN;
else if( KEY_RIGHT == nKey ) nKey = KEY_UP;
}
+
if ( rSh.IsInRightToLeftText() )
{
if( KEY_LEFT == nKey ) nKey = KEY_RIGHT;
@@ -1354,7 +1357,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() ))
@@ -1415,8 +1418,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,
@@ -1463,7 +1466,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
SW_KeyState eKeyState = bIsDocReadOnly ? KS_CheckDocReadOnlyKeys
: KS_CheckKey,
eNextKeyState = KS_Ende;
- BYTE nDir = 0;
+ sal_uInt8 nDir = 0;
if (nKS_NUMDOWN_Count > 0)
nKS_NUMDOWN_Count--;
@@ -1507,12 +1510,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
{
@@ -1605,7 +1608,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;
@@ -1627,7 +1630,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;
@@ -1643,7 +1646,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;
@@ -1660,7 +1663,7 @@ KEYINPUT_CHECKTABLE:
KEYINPUT_CHECKTABLE_INSDEL:
if( rSh.IsTableMode() || !rSh.GetTableFmt() ||
!bTblInsDelMode ||
- FALSE /* table protected */
+ sal_False /* table protected */
)
{
const int nSelectionType = rSh.GetSelectionType();
@@ -1687,7 +1690,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
if ( !rSh.HasReadonlySel() )
{
if (rSh.IsInFrontOfLabel() &&
- rSh.NumOrNoNum(FALSE))
+ rSh.NumOrNoNum(sal_False))
eKeyState = KS_NumOrNoNum;
}
else
@@ -1701,22 +1704,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;
@@ -1767,7 +1770,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
case KEY_BACKSPACE | KEY_SHIFT:
if( !rSh.HasReadonlySel() )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
// try to add comment for code snip:
// Remove the paragraph indent, if the cursor is at the
// beginning of a paragraph, there is no selection
@@ -1797,13 +1800,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;
}
}
@@ -1844,7 +1847,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
}
if ( bCallNumOrNoNum &&
- rSh.NumOrNoNum( !bOnlyBackspaceKey, TRUE ) )
+ rSh.NumOrNoNum( !bOnlyBackspaceKey, sal_True ) )
{
eKeyState = KS_NumOrNoNum;
}
@@ -1869,9 +1872,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;
}
@@ -1921,9 +1924,10 @@ KEYINPUT_CHECKTABLE_INSDEL:
case KEY_TAB | KEY_SHIFT:
{
#ifdef SW_CRSR_TIMER
- BOOL bOld = rSh.ChgCrsrTimerFlag( FALSE );
+ sal_Bool bOld = rSh.ChgCrsrTimerFlag( sal_False );
+ sal_Bool bOld = rSh.ChgCrsrTimerFlag( sal_False );
#endif
- if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark()|| rSh.GetChar(FALSE)==CH_TXT_ATR_FORMELEMENT) {
+ if (rSh.IsFormProtected() || rSh.GetCurrentFieldmark()|| rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT) {
eKeyState=KS_GotoPrevFieldMark;
}
else if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
@@ -2027,7 +2031,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 |
@@ -2053,10 +2057,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);
}
@@ -2073,12 +2077,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;
@@ -2097,14 +2101,14 @@ KEYINPUT_CHECKTABLE_INSDEL:
if (bNormalChar && rSh.IsInFrontOfLabel())
{
- rSh.NumOrNoNum(FALSE);
+ rSh.NumOrNoNum(sal_False);
}
if( aInBuffer.Len() && ( !bNormalChar || bIsDocReadOnly ))
FlushInBuffer();
if( rView.KeyInput( aKeyEvent ) )
- bFlushBuffer = TRUE, bNormalChar = FALSE;
+ bFlushBuffer = sal_True, bNormalChar = sal_False;
else
{
// Because Sfx accelerators are only called when they were
@@ -2140,7 +2144,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
else
{
- bNormalChar = FALSE;
+ bNormalChar = sal_False;
Window::KeyInput( aKeyEvent );
}
}
@@ -2189,7 +2193,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
aCh = '\t';
// no break!
case KS_InsChar:
- if (rSh.GetChar(FALSE)==CH_TXT_ATR_FORMELEMENT)
+ if (rSh.GetChar(sal_False)==CH_TXT_ATR_FORMELEMENT)
{
::sw::mark::ICheckboxFieldmark* pFieldmark =
dynamic_cast< ::sw::mark::ICheckboxFieldmark* >
@@ -2222,7 +2226,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() ))
@@ -2232,8 +2236,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
aInBuffer.Expand( aInBuffer.Len() + 1, ' ' );
}
- BOOL bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh );
- BOOL bRunNext = pACorr && pACorr->HasRunNext();
+ sal_Bool bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh );
+ sal_Bool bRunNext = pACorr && pACorr->HasRunNext();
if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) &&
pACfg->IsAutoFmtByInput() &&
(( pACorr->IsAutoCorrFlag( ChgWeightUnderl ) &&
@@ -2293,7 +2297,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
default:
{
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
FlushInBuffer();
switch( eKeyState )
{
@@ -2314,11 +2318,11 @@ KEYINPUT_CHECKTABLE_INSDEL:
break;
case KS_NumDown:
- rSh.NumUpDown( TRUE );
+ rSh.NumUpDown( sal_True );
nKS_NUMDOWN_Count = 2;
break;
case KS_NumUp:
- rSh.NumUpDown( FALSE );
+ rSh.NumUpDown( sal_False );
break;
case KS_NumIndentInc:
@@ -2361,7 +2365,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
nSlotId = FN_GOTO_PREV_CELL;
break;
case KS_AutoFmtByInput:
- rSh.SplitNode( TRUE );
+ rSh.SplitNode( sal_True );
break;
case KS_NextObject:
@@ -2394,11 +2398,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
@@ -2418,7 +2422,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 );
@@ -2493,7 +2497,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
if( bStopKeyInputTimer )
{
aKeyInputTimer.Stop();
- bTblInsDelMode = FALSE;
+ bTblInsDelMode = sal_False;
}
// in case the buffered characters are inserted
@@ -2501,7 +2505,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
// bFlushCharBuffer was not resetted here
// why not?
- BOOL bSave = bFlushCharBuffer;
+ sal_Bool bSave = bFlushCharBuffer;
FlushInBuffer();
bFlushCharBuffer = bSave;
@@ -2527,7 +2531,7 @@ void SwEditWin::RstMBDownFlags()
// of the modal dialog (like on WINDOWS).
// So reset the statuses here and release the mouse
// for the dialog.
- bMBPressed = bNoInterrupt = FALSE;
+ bMBPressed = bNoInterrupt = sal_False;
EnterArea();
ReleaseMouse();
}
@@ -2543,7 +2547,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
// the contex menu is closed by VCL asynchronously which in the end
// would work on deleted objects or the context menu has no parent anymore)
SfxInPlaceClient* pIPClient = rSh.GetSfxViewShell()->GetIPClient();
- BOOL bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() );
+ sal_Bool bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() );
if ( bIsOleActive && PopupMenu::IsInExecute() )
return;
@@ -2559,7 +2563,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(),
@@ -2574,7 +2578,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 ) )
@@ -2587,12 +2591,12 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
// work but in practice ...
lcl_SelectShellForDrop( rView );
- BOOL bIsDocReadOnly = rView.GetDocShell()->IsReadOnly();
- BOOL bCallBase = TRUE;
+ sal_Bool bIsDocReadOnly = rView.GetDocShell()->IsReadOnly();
+ sal_Bool bCallBase = sal_True;
if( pQuickHlpData->bClear )
pQuickHlpData->Stop( rSh );
- pQuickHlpData->bChkInsBlank = FALSE;
+ pQuickHlpData->bChkInsBlank = sal_False;
if( rSh.FinishOLEObj() )
return; // end InPlace and the click doesn't count anymore
@@ -2604,17 +2608,17 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
if (pSdrView->MouseButtonDown( rMEvt, this ) )
{
- rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False);
return; // SdrView's event evaluated
}
}
- bIsInMove = FALSE;
+ bIsInMove = sal_False;
aStartPos = rMEvt.GetPosPixel();
aRszMvHdlPt.X() = 0, aRszMvHdlPt.Y() = 0;
- BYTE nMouseTabCol = 0;
- const BOOL bTmp = !rSh.IsDrawCreate() && !pApplyTempl && !rSh.IsInSelect() &&
+ sal_uInt8 nMouseTabCol = 0;
+ const sal_Bool bTmp = !rSh.IsDrawCreate() && !pApplyTempl && !rSh.IsInSelect() &&
rMEvt.GetClicks() == 1 && MOUSE_LEFT == rMEvt.GetButtons();
if ( bTmp &&
0 != (nMouseTabCol = rSh.WhichMouseTabCol( aDocPos ) ) &&
@@ -2630,7 +2634,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;
@@ -2640,9 +2644,9 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
// comes from table columns out of the document.
if(SW_TABCOL_VERT == nMouseTabCol || SW_TABCOL_HORI == nMouseTabCol)
- rView.SetTabColFromDoc( TRUE );
+ rView.SetTabColFromDoc( sal_True );
else
- rView.SetTabRowFromDoc( TRUE );
+ rView.SetTabRowFromDoc( sal_True );
rView.SetTabColFromDocPos( aDocPos );
rView.InvalidateRulerPos();
@@ -2651,11 +2655,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
{
@@ -2678,7 +2682,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rView.SetNumRuleNodeFromDoc( NULL );
rView.InvalidateRulerPos();
rBind.Update();
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
else
{
@@ -2702,8 +2706,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
// click releases the selection.
if ( MOUSE_LEFT == rMEvt.GetButtons() )
{
- BOOL bOnlyText = FALSE;
- bMBPressed = bNoInterrupt = TRUE;
+ sal_Bool bOnlyText = sal_False;
+ bMBPressed = bNoInterrupt = sal_True;
nKS_NUMDOWN_Count = 0;
CaptureMouse();
@@ -2732,7 +2736,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
}
if ( EnterDrawMode( rMEvt, aDocPos ) )
{
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
return;
}
else if ( rView.GetDrawFuncPtr() && bInsFrm )
@@ -2747,7 +2751,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) &&
@@ -2763,30 +2767,30 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
}
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
}
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
return;
}
}
}
}
- BOOL bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
+ sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
if ( !bExecHyperlinks )
{
SvtSecurityOptions aSecOpts;
- const BOOL bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+ const sal_Bool bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
if ( ( bSecureOption && rMEvt.GetModifier() == KEY_MOD1 ) ||
( !bSecureOption && rMEvt.GetModifier() != KEY_MOD1 ) )
- bExecHyperlinks = TRUE;
+ bExecHyperlinks = sal_True;
}
- BYTE nNumberOfClicks = static_cast< BYTE >(rMEvt.GetClicks() % 4);
+ sal_uInt8 nNumberOfClicks = static_cast< sal_uInt8 >(rMEvt.GetClicks() % 4);
if ( 0 == nNumberOfClicks && 0 < rMEvt.GetClicks() )
nNumberOfClicks = 4;
- BOOL bExecDrawTextLink = FALSE;
+ sal_Bool bExecDrawTextLink = sal_False;
switch ( rMEvt.GetModifier() + rMEvt.GetButtons() )
{
@@ -2808,7 +2812,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
pSdrView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
if (aVEvt.eEvent == SDREVENT_EXECUTEURL)
- bExecDrawTextLink = TRUE;
+ bExecDrawTextLink = sal_True;
}
// only try to select frame, if pointer already was
@@ -2825,12 +2829,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 )
{
@@ -2849,13 +2853,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();
@@ -2880,9 +2884,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;
@@ -2893,18 +2897,18 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rView.AttrChangedNotify(&rSh);
}
- BOOL bSelObj = rSh.SelectObj( aDocPos, nFlag );
+ sal_Bool bSelObj = rSh.SelectObj( aDocPos, nFlag );
if( bUnLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
if( !bSelObj )
{
// move cursor here so that it is not drawn in the
// frame first; ShowCrsr() happens in LeaveSelFrmMode()
- bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,FALSE));
+ bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,sal_False));
rSh.LeaveSelFrmMode();
rView.AttrChangedNotify( &rSh );
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
else
{
@@ -2912,7 +2916,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.EnterSelFrmMode( &aDocPos );
rSh.SelFlyGrabCrsr();
rSh.MakeSelVisible();
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
if( rSh.IsFrmSelected() &&
rView.GetDrawFuncPtr() )
{
@@ -2931,7 +2935,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 ) )
@@ -2977,7 +2981,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
return;
SwField *pFld;
- BOOL bFtn = FALSE;
+ sal_Bool bFtn = sal_False;
if( !bIsDocReadOnly &&
( 0 != ( pFld = rSh.GetCurFld() ) ||
@@ -2988,7 +2992,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 )
{
@@ -2996,8 +3000,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
case TYP_SCRIPTFLD:
{
// if it's a Readonly region, status has to be enabled
- USHORT nSlot = TYP_POSTITFLD == nTypeId ? FN_POSTIT : FN_JAVAEDIT;
- SfxBoolItem aItem(nSlot, TRUE);
+ sal_uInt16 nSlot = TYP_POSTITFLD == nTypeId ? FN_POSTIT : FN_JAVAEDIT;
+ SfxBoolItem aItem(nSlot, sal_True);
pVFrame->GetBindings().SetState(aItem);
pVFrame->GetBindings().Execute(nSlot);
break;
@@ -3025,13 +3029,13 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
}
else
rSh.SelWrd( &aDocPos );
- bHoldSelection = TRUE;
+ bHoldSelection = sal_True;
return;
}
case 3:
case 4:
{
- bFrmDrag = FALSE;
+ bFrmDrag = sal_False;
// in extended mode double and triple
// click has no effect.
if ( rSh.IsExtMode() )
@@ -3057,7 +3061,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if ( bMod )
rSh.LeaveAddMode();
- bHoldSelection = TRUE;
+ bHoldSelection = sal_True;
return;
}
@@ -3068,7 +3072,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() )
{
@@ -3086,7 +3090,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.EnterSelFrmMode( &aDocPos );
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
return;
}
}
@@ -3094,8 +3098,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;
}
}
@@ -3115,7 +3119,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.EnterSelFrmMode( &aDocPos );
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
return;
}
}
@@ -3123,8 +3127,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
@@ -3132,15 +3136,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;
@@ -3149,14 +3153,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:
@@ -3174,7 +3178,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
rSh.LeaveSelFrmMode();
rView.AttrChangedNotify(&rSh);
- bFrmDrag = FALSE;
+ bFrmDrag = sal_False;
}
}
else
@@ -3183,7 +3187,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.EnterSelFrmMode( &aDocPos );
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
return;
}
}
@@ -3196,7 +3200,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() )
@@ -3204,18 +3208,18 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.UnSelectFrm();
rSh.LeaveSelFrmMode();
rView.AttrChangedNotify(&rSh);
- bFrmDrag = FALSE;
+ bFrmDrag = sal_False;
}
if ( !rSh.IsExtMode() )
{
// don't start a selection when an
// URL field or a graphic is clicked
- BOOL bSttSelect = rSh.HasSelection() ||
+ sal_Bool bSttSelect = rSh.HasSelection() ||
Pointer(POINTER_REFHAND) != GetPointer();
if( !bSttSelect )
{
- bSttSelect = TRUE;
+ bSttSelect = sal_True;
if( bExecHyperlinks )
{
SwContentAtPos aCntntAtPos(
@@ -3227,12 +3231,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;
}
}
@@ -3240,7 +3244,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
rSh.SttSelect();
}
}
- bCallBase = FALSE;
+ bCallBase = sal_False;
break;
}
default:
@@ -3248,10 +3252,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;
}
}
@@ -3261,19 +3265,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;
@@ -3282,7 +3286,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
MV_KONTEXT( &rSh );
nTmpSetCrsr = (rSh.*rSh.fnSetCrsr)(&aDocPos,bOnlyText);
bValidCrsrPos = !(CRSR_POSCHG & nTmpSetCrsr);
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
// notify the edit window that from now on we do not use the input language
@@ -3290,7 +3294,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
SetUseInputLanguage( sal_False );
if( bLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
bNoInterrupt = bTmpNoInterrupt;
}
@@ -3307,7 +3311,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
if( !rSh.IsFrmSelected() )
rSh.GotoNextFly();
rSh.EnterSelFrmMode();
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
}
// don't reset here any longer so that, in case through MouseMove
@@ -3331,7 +3335,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(),
@@ -3347,7 +3351,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 );
@@ -3376,7 +3380,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
}
const Point aOldPt( rSh.VisArea().Pos() );
- const BOOL bInsWin = rSh.VisArea().IsInside( aDocPt );
+ const sal_Bool bInsWin = rSh.VisArea().IsInside( aDocPt );
if( pShadCrsr && !bInsWin )
delete pShadCrsr, pShadCrsr = 0;
@@ -3436,13 +3440,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 )
@@ -3490,7 +3494,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
{
// i#42921 - consider vertical mode
SwTxtNode* pNodeAtPos = rSh.GetNumRuleNodeAtPos( aDocPt );
- const USHORT nPointer =
+ const sal_uInt16 nPointer =
rSh.IsVerticalModeAtNdAndPos( *pNodeAtPos, aDocPt )
? POINTER_VSIZEBAR
: POINTER_HSIZEBAR;
@@ -3500,7 +3504,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
}
}
- BOOL bDelShadCrsr = TRUE;
+ sal_Bool bDelShadCrsr = sal_True;
switch ( rMEvt.GetModifier() + rMEvt.GetButtons() )
{
@@ -3550,10 +3554,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;
}
@@ -3584,7 +3588,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;
@@ -3595,7 +3599,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;
@@ -3605,7 +3609,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 );
}
@@ -3633,17 +3637,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;
@@ -3665,9 +3669,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 )
{
@@ -3682,14 +3686,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:
{
@@ -3702,7 +3706,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)
@@ -3721,7 +3725,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
case KEY_MOD1:
if ( !bInsDraw )
{
- BOOL bTstShdwCrsr = TRUE;
+ sal_Bool bTstShdwCrsr = sal_True;
UpdatePointer( aDocPt, rMEvt.GetModifier() );
@@ -3736,7 +3740,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
@@ -3754,7 +3758,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
{
if( aLastCallEvent.HasEvent() )
rSh.CallEvent( SFX_EVENT_MOUSEOUT_OBJECT,
- aLastCallEvent, TRUE );
+ aLastCallEvent, sal_True );
// 0 says that the object doesn't have any table
if( !rSh.CallEvent( SFX_EVENT_MOUSEOVER_OBJECT,
aSaveCallEvent ))
@@ -3765,7 +3769,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
{
// cursor was on an object
rSh.CallEvent( SFX_EVENT_MOUSEOUT_OBJECT,
- aLastCallEvent, TRUE );
+ aLastCallEvent, sal_True );
}
if( bTstShdwCrsr && bInsWin && !bIsDocReadOnly &&
@@ -3785,8 +3789,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;
}
}
}
@@ -3794,8 +3798,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;
@@ -3803,7 +3807,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
if( bDelShadCrsr && pShadCrsr )
delete pShadCrsr, pShadCrsr = 0;
- bWasShdwCrsr = FALSE;
+ bWasShdwCrsr = sal_False;
}
/*--------------------------------------------------------------------
@@ -3812,10 +3816,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;
@@ -3826,7 +3830,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
eSdrMoveHdl = HDL_USER; // for MoveEvents - reset again
// preventively reset
- rView.SetTabColFromDoc( FALSE );
+ rView.SetTabColFromDoc( sal_False );
rView.SetNumRuleNodeFromDoc(NULL);
SwWrtShell &rSh = rView.GetWrtShell();
@@ -3834,11 +3838,11 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
SdrView *pSdrView = rSh.GetDrawView();
if ( pSdrView )
{
- pSdrView->SetOrtho(FALSE);
+ pSdrView->SetOrtho(sal_False);
if ( pSdrView->MouseButtonUp( rMEvt,this ) )
{
- rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False);
return; // SdrView's event evaluated
}
}
@@ -3856,13 +3860,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;
}
@@ -3872,7 +3876,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
Point aPnt( pAnchorMarker->GetLastPos() );
DELETEZ( pAnchorMarker );
if( aPnt.X() || aPnt.Y() )
- rSh.FindAnchorPos( aPnt, TRUE );
+ rSh.FindAnchorPos( aPnt, sal_True );
}
if ( bInsDraw && rView.GetDrawFuncPtr() )
{
@@ -3895,7 +3899,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() )
{
@@ -3905,7 +3909,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();
}
@@ -3914,17 +3918,17 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
else if (rMEvt.GetButtons() == MOUSE_RIGHT && rSh.IsDrawCreate())
rView.GetDrawFuncPtr()->BreakCreate(); // abort drawing
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
ReleaseMouse();
return;
}
- BOOL bPopMode = FALSE;
+ sal_Bool bPopMode = sal_False;
switch ( rMEvt.GetModifier() + rMEvt.GetButtons() )
{
case MOUSE_LEFT:
if ( bInsDraw && rSh.IsDrawCreate() )
{
- if ( rView.GetDrawFuncPtr() && rView.GetDrawFuncPtr()->MouseButtonUp(rMEvt) == TRUE )
+ if ( rView.GetDrawFuncPtr() && rView.GetDrawFuncPtr()->MouseButtonUp(rMEvt) == sal_True )
{
rView.GetDrawFuncPtr()->Deactivate();
rView.AttrChangedNotify( &rSh );
@@ -3933,7 +3937,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if ( rView.GetDrawFuncPtr() && bInsFrm )
StopInsFrm();
}
- bCallBase = FALSE;
+ bCallBase = sal_False;
break;
}
case MOUSE_LEFT + KEY_MOD1:
@@ -3963,12 +3967,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
{
@@ -3976,7 +3980,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;
@@ -3986,7 +3990,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() );
@@ -3995,7 +3999,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 );
}
@@ -4017,82 +4021,82 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
CaptureMouse();
}
}
- (rSh.*rSh.fnEndDrag)( &aDocPt,FALSE );
+ (rSh.*rSh.fnEndDrag)( &aDocPt,sal_False );
}
- bFrmDrag = FALSE;
- bCallBase = FALSE;
+ bFrmDrag = sal_False;
+ bCallBase = sal_False;
break;
}
- bPopMode = TRUE;
+ bPopMode = sal_True;
// no break
case MOUSE_LEFT + KEY_SHIFT:
if (rSh.IsSelFrmMode())
{
- (rSh.*rSh.fnEndDrag)( &aDocPt, FALSE );
- bFrmDrag = FALSE;
- bCallBase = FALSE;
+ (rSh.*rSh.fnEndDrag)( &aDocPt, sal_False );
+ bFrmDrag = sal_False;
+ bCallBase = sal_False;
break;
}
if( bHoldSelection )
{
// the EndDrag should be called in any case
- bHoldSelection = FALSE;
- (rSh.*rSh.fnEndDrag)( &aDocPt, FALSE );
+ bHoldSelection = sal_False;
+ (rSh.*rSh.fnEndDrag)( &aDocPt, sal_False );
}
else
{
if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPt ) )
{
- const BOOL bTmpNoInterrupt = bNoInterrupt;
- bNoInterrupt = FALSE;
+ const sal_Bool bTmpNoInterrupt = bNoInterrupt;
+ bNoInterrupt = sal_False;
{ // create only temporary move context because otherwise
// the query to the content form doesn't work!!!
MV_KONTEXT( &rSh );
const Point aDocPos( PixelToLogic( aStartPos ) );
- bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,FALSE));
+ bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,sal_False));
}
bNoInterrupt = bTmpNoInterrupt;
}
else
{
- BOOL bInSel = rSh.IsInSelect();
- (rSh.*rSh.fnEndDrag)( &aDocPt, FALSE );
+ sal_Bool bInSel = rSh.IsInSelect();
+ (rSh.*rSh.fnEndDrag)( &aDocPt, sal_False );
// Internetfield? --> call link (load doc!!)
if( !bInSel )
{
- USHORT nFilter = URLLOAD_NOFILTER;
+ sal_uInt16 nFilter = URLLOAD_NOFILTER;
if( KEY_MOD1 == rMEvt.GetModifier() )
nFilter |= URLLOAD_NEWVIEW;
- BOOL bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
+ sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
if ( !bExecHyperlinks )
{
SvtSecurityOptions aSecOpts;
- const BOOL bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
+ const sal_Bool bSecureOption = aSecOpts.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
if ( ( bSecureOption && rMEvt.GetModifier() == KEY_MOD1 ) ||
( !bSecureOption && rMEvt.GetModifier() != KEY_MOD1 ) )
- bExecHyperlinks = TRUE;
+ bExecHyperlinks = sal_True;
}
- const BOOL bExecSmarttags = rMEvt.GetModifier() == KEY_MOD1;
+ const sal_Bool bExecSmarttags = rMEvt.GetModifier() == KEY_MOD1;
if(pApplyTempl)
- bExecHyperlinks = FALSE;
+ bExecHyperlinks = sal_False;
SwContentAtPos aCntntAtPos( SwContentAtPos::SW_CLICKFIELD |
SwContentAtPos::SW_INETATTR |
SwContentAtPos::SW_SMARTTAG | SwContentAtPos::SW_FORMCTRL);
- if( rSh.GetContentAtPos( aDocPt, aCntntAtPos, TRUE ) )
+ if( rSh.GetContentAtPos( aDocPt, aCntntAtPos, sal_True ) )
{
- BOOL bViewLocked = rSh.IsViewLocked();
+ sal_Bool bViewLocked = rSh.IsViewLocked();
if( !bViewLocked && !rSh.IsReadOnlyAvailable() &&
aCntntAtPos.IsInProtectSect() )
- rSh.LockView( TRUE );
+ rSh.LockView( sal_True );
ReleaseMouse();
@@ -4134,12 +4138,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;
@@ -4156,14 +4160,14 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
String sTarget(pField->GetTargetFrame());
::LoadURL( sURL, &rSh, nFilter, &sTarget);
}
- bCallShadowCrsr = FALSE;
+ bCallShadowCrsr = sal_False;
}
else
{
// hit graphic
ReleaseMouse();
if( rSh.ClickToINetGrf( aDocPt, nFilter ))
- bCallShadowCrsr = FALSE;
+ bCallShadowCrsr = sal_False;
}
}
}
@@ -4175,14 +4179,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;
}
@@ -4190,8 +4200,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if ( bPopMode && bModePushed )
{
rSh.PopMode();
- bModePushed = FALSE;
- bCallBase = FALSE;
+ bModePushed = sal_False;
+ bCallBase = sal_False;
}
break;
@@ -4229,7 +4239,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:
@@ -4256,8 +4266,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)
@@ -4277,8 +4287,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();
}
@@ -4291,8 +4301,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();
}
@@ -4302,9 +4312,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();
}
@@ -4315,7 +4325,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() )
@@ -4323,8 +4333,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
rSh.SetCurNumRule( *pApplyTempl->aColl.pNumRule,
false,
pApplyTempl->aColl.pNumRule->GetDefaultListId() );
- bCallBase = FALSE;
- pApplyTempl->bUndo = TRUE;
+ bCallBase = sal_False;
+ pApplyTempl->bUndo = sal_True;
if( pApplyTempl->aColl.pNumRule )
aStyleName = pApplyTempl->aColl.pNumRule->GetName();
}
@@ -4340,7 +4350,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();
}
}
@@ -4350,12 +4360,12 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
ReleaseMouse();
// Only processed MouseEvents arrive here; only at these the moduses can
// be resetted.
- bMBPressed = FALSE;
+ bMBPressed = sal_False;
//sicherheitshalber aufrufen, da jetzt das Selektieren bestimmt zu Ende ist.
//Andernfalls koennte der Timeout des Timers Kummer machen.
EnterArea();
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
if (bCallBase)
Window::MouseButtonUp(rMEvt);
@@ -4367,7 +4377,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();
@@ -4375,25 +4385,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
{
@@ -4405,7 +4415,7 @@ void SwEditWin::SetApplyTemplate(const SwApplyTemplate &rTempl)
rSh.Edit();
}
- static USHORT const aInva[] =
+ static sal_uInt16 aInva[] =
{
SID_STYLE_WATERCAN,
SID_ATTR_CHAR_COLOR_EXT,
@@ -4442,8 +4452,8 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView):
nInsFrmColCount( 1 ),
eDrawMode(OBJ_NONE),
- bLockInput(FALSE),
- bObjectSelect( FALSE ),
+ bLockInput(sal_False),
+ bObjectSelect( sal_False ),
nKS_NUMDOWN_Count(0),
nKS_NUMINDENTINC_Count(0)
{
@@ -4452,7 +4462,7 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView):
SetDialogControlFlags( WINDOW_DLGCTRL_RETURN | WINDOW_DLGCTRL_WANTFOCUS );
bLinkRemoved = bMBPressed = bInsDraw = bInsFrm =
- bIsInDrag = bOldIdle = bOldIdleSet = bChainMode = bWasShdwCrsr = FALSE;
+ bIsInDrag = bOldIdle = bOldIdleSet = bChainMode = bWasShdwCrsr = sal_False;
// initially use the input language
bUseInputLanguage = sal_True;
@@ -4461,7 +4471,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));
@@ -4490,7 +4500,7 @@ SwEditWin::~SwEditWin()
delete pRowColumnSelectionStart;
if( pQuickHlpData->bClear && rView.GetWrtShellPtr() )
pQuickHlpData->Stop( rView.GetWrtShell() );
- bExecuteDrag = FALSE;
+ bExecuteDrag = sal_False;
delete pApplyTempl;
rView.SetDrawFuncPtr(NULL);
@@ -4508,7 +4518,7 @@ SwEditWin::~SwEditWin()
void SwEditWin::EnterDrawTextMode( const Point& aDocPos )
{
- if ( rView.EnterDrawTextMode(aDocPos) == TRUE )
+ if ( rView.EnterDrawTextMode(aDocPos) == sal_True )
{
if (rView.GetDrawFuncPtr())
{
@@ -4525,7 +4535,7 @@ void SwEditWin::EnterDrawTextMode( const Point& aDocPos )
* Description: turn on DrawMode
******************************************************************************/
-BOOL SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos)
+sal_Bool SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos)
{
SwWrtShell &rSh = rView.GetWrtShell();
SdrView *pSdrView = rSh.GetDrawView();
@@ -4533,17 +4543,17 @@ BOOL SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos)
if ( rView.GetDrawFuncPtr() )
{
if (rSh.IsDrawCreate())
- return TRUE;
+ return sal_True;
- BOOL bRet = rView.GetDrawFuncPtr()->MouseButtonDown( rMEvt );
+ sal_Bool bRet = rView.GetDrawFuncPtr()->MouseButtonDown( rMEvt );
rView.AttrChangedNotify( &rSh );
return bRet;
}
if ( pSdrView && pSdrView->IsTextEdit() )
{
- BOOL bUnLockView = !rSh.IsViewLocked();
- rSh.LockView( TRUE );
+ sal_Bool bUnLockView = !rSh.IsViewLocked();
+ rSh.LockView( sal_True );
rSh.EndTextEdit(); // clicked aside, end Edit
rSh.SelectObj( aDocPos );
@@ -4553,17 +4563,17 @@ BOOL SwEditWin::EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos)
{
SwEditWin::nDDStartPosY = aDocPos.Y();
SwEditWin::nDDStartPosX = aDocPos.X();
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
}
if( bUnLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
rView.AttrChangedNotify( &rSh );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwEditWin::IsDrawSelMode()
+sal_Bool SwEditWin::IsDrawSelMode()
{
return IsObjectSelect();
}
@@ -4607,20 +4617,20 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
// to deactivate the inplace client without any problem regarding parent
// windows and code on the stack.
SfxInPlaceClient* pIPClient = rSh.GetSfxViewShell()->GetIPClient();
- BOOL bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() );
+ sal_Bool bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() );
if ( bIsOleActive && ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU ))
{
rSh.FinishOLEObj();
return;
}
- BOOL bCallBase = TRUE;
+ sal_Bool bCallBase = sal_True;
switch ( rCEvt.GetCommand() )
{
case COMMAND_CONTEXTMENU:
{
- const USHORT nId = SwInputChild::GetChildWindowId();
+ const sal_uInt16 nId = SwInputChild::GetChildWindowId();
SwInputChild* pChildWin = (SwInputChild*)GetView().GetViewFrame()->
GetChildWindow( nId );
@@ -4633,11 +4643,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() )
@@ -4664,7 +4674,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);
}
@@ -4678,7 +4688,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
}
else if (pApplyTempl->bUndo)
rSh.Do(SwWrtShell::UNDO);
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
}
break;
@@ -4696,7 +4706,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
// forward to Outliner if applicable
if ( rSh.HasDrawView() && rSh.GetDrawView()->IsTextEdit() )
{
- bCallBase = FALSE;
+ bCallBase = sal_False;
rSh.GetDrawView()->GetTextEditOutlinerView()->Command( rCEvt );
break;
}
@@ -4705,7 +4715,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
if ( VOICECOMMANDTYPE_CONTROL == pCData->GetType() )
break;
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
SfxPoolItem *pItem = 0;
switch ( pCData->GetCommand() )
@@ -4764,7 +4774,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
}
if ( nSlotId )
{
- bCallBase = FALSE;
+ bCallBase = sal_False;
if ( pItem )
{
const SfxPoolItem* aArgs[2];
@@ -4782,13 +4792,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
@@ -4796,7 +4806,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
if( rSh.HasSelection() )
rSh.DelRight();
- bCallBase = FALSE;
+ bCallBase = sal_False;
LanguageType eInputLanguage = GetInputLanguage();
rSh.CreateExtTextInput(eInputLanguage);
}
@@ -4805,18 +4815,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();
@@ -4856,7 +4866,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)
{
@@ -4869,7 +4879,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
@@ -4878,7 +4888,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
if( pData )
{
sWord = pData->GetText();
- bCallBase = FALSE;
+ bCallBase = sal_False;
rSh.SetExtTextInputData( *pData );
}
}
@@ -4911,8 +4921,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;
@@ -4926,9 +4936,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;
@@ -4937,7 +4947,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())
@@ -4960,10 +4970,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:
@@ -4987,9 +4997,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() )
@@ -5003,7 +5013,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 )
{
@@ -5018,10 +5028,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;
@@ -5036,9 +5046,9 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
/* i#18686 select the object/cursor at the mouse
position of the context menu request */
-BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
+sal_Bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const Point aDocPos( PixelToLogic( rMousePos ) );
const bool bIsInsideSelectedObj( rSh.IsInsideSelectedObj( aDocPos ) );
//create a synthetic mouse event out of the coordinates
@@ -5068,7 +5078,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();
@@ -5090,7 +5100,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
aSelection.Adjust();
if(!aCompare.IsLess(aSelection) && !aCompare.IsGreater(aSelection))
{
- return FALSE;
+ return sal_False;
}
}
@@ -5099,15 +5109,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 )
{
@@ -5128,15 +5138,15 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
rView.NoRotate();
rSh.HideCrsr();
- BOOL bUnLockView = !rSh.IsViewLocked();
- rSh.LockView( TRUE );
- BOOL bSelObj = rSh.SelectObj( aDocPos, 0);
+ sal_Bool bUnLockView = !rSh.IsViewLocked();
+ rSh.LockView( sal_True );
+ sal_Bool bSelObj = rSh.SelectObj( aDocPos, 0);
if( bUnLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
if( bSelObj )
{
- bRet = TRUE;
+ bRet = sal_True;
// in case the frame was deselected in the macro
// just the cursor has to be displayed again.
if( FRMTYPE_NONE == rSh.GetSelFrmType() )
@@ -5152,7 +5162,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
}
rSh.EnterSelFrmMode( &aDocPos );
- bFrmDrag = TRUE;
+ bFrmDrag = sal_True;
UpdatePointer( aDocPos, 0 );
return bRet;
}
@@ -5167,31 +5177,31 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
!bIsInsideSelectedObj))
{
rView.NoRotate();
- BOOL bUnLockView = !rSh.IsViewLocked();
- rSh.LockView( TRUE );
- BYTE nFlag = 0;
+ sal_Bool bUnLockView = !rSh.IsViewLocked();
+ rSh.LockView( sal_True );
+ sal_uInt8 nFlag = 0;
if ( rSh.IsSelFrmMode() )
{
rSh.UnSelectFrm();
rSh.LeaveSelFrmMode();
rView.AttrChangedNotify(&rSh);
- bRet = TRUE;
+ bRet = sal_True;
}
- BOOL bSelObj = rSh.SelectObj( aDocPos, nFlag );
+ sal_Bool bSelObj = rSh.SelectObj( aDocPos, nFlag );
if( bUnLockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
if( !bSelObj )
{
// move cursor here so that it is not drawn in the
// frame at first; ShowCrsr() happens in LeaveSelFrmMode()
- bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,FALSE));
+ bValidCrsrPos = !(CRSR_POSCHG & (rSh.*rSh.fnSetCrsr)(&aDocPos,sal_False));
rSh.LeaveSelFrmMode();
rView.LeaveDrawCreate();
rView.AttrChangedNotify( &rSh );
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -5199,7 +5209,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() )
{
@@ -5209,13 +5219,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() )
@@ -5224,7 +5234,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 );
@@ -5233,8 +5243,8 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
{ // create only temporary move context because otherwise
// the query against the content form doesn't work!!!
MV_KONTEXT( &rSh );
- (rSh.*rSh.fnSetCrsr)(&aDocPos, FALSE);
- bRet = TRUE;
+ (rSh.*rSh.fnSetCrsr)(&aDocPos, sal_False);
+ bRet = sal_True;
}
}
if( !bOverURLGrf )
@@ -5247,7 +5257,7 @@ BOOL SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos )
if( !rSh.IsFrmSelected() )
rSh.GotoNextFly();
rSh.EnterSelFrmMode();
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
@@ -5258,7 +5268,7 @@ SfxShell* lcl_GetShellFromDispatcher( SwView& rView, TypeId nType )
// determine Shell
SfxShell* pShell;
SfxDispatcher* pDispatcher = rView.GetViewFrame()->GetDispatcher();
- for(USHORT i = 0; TRUE; ++i )
+ for(sal_uInt16 i = 0; sal_True; ++i )
{
pShell = pDispatcher->GetShell( i );
if( !pShell || pShell->IsA( nType ) )
@@ -5279,7 +5289,7 @@ IMPL_LINK( SwEditWin, KeyInputFlushHandler, Timer *, EMPTYARG )
IMPL_LINK( SwEditWin, KeyInputTimerHandler, Timer *, EMPTYARG )
{
- bTblInsDelMode = FALSE;
+ bTblInsDelMode = sal_False;
return 0;
}
@@ -5306,7 +5316,7 @@ IMPL_LINK(SwEditWin, TemplateTimerHdl, Timer*, EMPTYARG)
return 0;
}
-void SwEditWin::SetChainMode( BOOL bOn )
+void SwEditWin::SetChainMode( sal_Bool bOn )
{
if ( !bChainMode )
StopInsFrm();
@@ -5321,7 +5331,7 @@ void SwEditWin::SetChainMode( BOOL bOn )
if ( !bChainMode )
rView.GetViewFrame()->HideStatusText();
- static USHORT const aInva[] =
+ static sal_uInt16 aInva[] =
{
FN_FRAME_CHAIN, FN_FRAME_UNCHAIN, 0
};
@@ -5347,7 +5357,7 @@ void QuickHelpData::Move( QuickHelpData& rCpy )
{
// move pointer
aArr.Insert( &rCpy.aArr );
- rCpy.aArr.Remove( (USHORT)0, rCpy.aArr.Count() );
+ rCpy.aArr.Remove( (sal_uInt16)0, rCpy.aArr.Count() );
bClear = rCpy.bClear;
nLen = rCpy.nLen;
nCurArrPos = rCpy.nCurArrPos;
@@ -5368,16 +5378,16 @@ void QuickHelpData::Move( QuickHelpData& rCpy )
void QuickHelpData::ClearCntnt()
{
nLen = nCurArrPos = 0;
- bClear = bChkInsBlank = FALSE;
+ bClear = bChkInsBlank = sal_False;
nTipId = 0;
aArr.DeleteAndDestroy( 0 , aArr.Count() );
- bIsTip = TRUE;
- bIsAutoText = TRUE;
+ bIsTip = sal_True;
+ bIsAutoText = sal_True;
delete pCETID, pCETID = 0;
delete[] pAttrs, pAttrs = 0;
}
-void QuickHelpData::Start( SwWrtShell& rSh, USHORT nWrdLen )
+void QuickHelpData::Start( SwWrtShell& rSh, sal_uInt16 nWrdLen )
{
if( pCETID ) delete pCETID, pCETID = 0;
if( pAttrs ) delete[] pAttrs, pAttrs = 0;
@@ -5387,7 +5397,7 @@ void QuickHelpData::Start( SwWrtShell& rSh, USHORT nWrdLen )
nLen = nWrdLen;
nCurArrPos = 0;
}
- bClear = TRUE;
+ bClear = sal_True;
Window& rWin = rSh.GetView().GetEditWin();
if( bIsTip )
@@ -5403,13 +5413,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 );
}
@@ -5418,7 +5428,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();
@@ -5455,7 +5465,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 )
@@ -5509,12 +5519,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 59f42c0b3bf1..2fc5a877319b 100644
--- a/sw/source/ui/docvw/edtwin2.cxx
+++ b/sw/source/ui/docvw/edtwin2.cxx
@@ -84,9 +84,9 @@
/*--------------------------------------------------------------------
Description: KeyEvents
--------------------------------------------------------------------*/
-static void lcl_GetRedlineHelp( const SwRedline& rRedl, String& rTxt, BOOL bBalloon )
+static void lcl_GetRedlineHelp( const SwRedline& rRedl, String& rTxt, sal_Bool bBalloon )
{
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
switch( rRedl.GetType() )
{
case nsRedlineType_t::REDLINE_INSERT: nResId = STR_REDLINE_INSERT; break;
@@ -112,14 +112,14 @@ static void lcl_GetRedlineHelp( const SwRedline& rRedl, String& rTxt, BOOL bBall
void SwEditWin::RequestHelp(const HelpEvent &rEvt)
{
SwWrtShell &rSh = rView.GetWrtShell();
- BOOL bQuickBalloon = 0 != (rEvt.GetMode() & ( HELPMODE_QUICK | HELPMODE_BALLOON ));
+ sal_Bool bQuickBalloon = 0 != (rEvt.GetMode() & ( HELPMODE_QUICK | HELPMODE_BALLOON ));
if(bQuickBalloon && rSh.GetViewOptions()->IsPreventTips())
return;
- BOOL bWeiter = TRUE;
+ sal_Bool bWeiter = sal_True;
SET_CURR_SHELL(&rSh);
String sTxt;
Point aPos( PixelToLogic( ScreenToOutputPixel( rEvt.GetMousePosPixel() ) ));
- BOOL bBalloon = static_cast< BOOL >(rEvt.GetMode() & HELPMODE_BALLOON);
+ sal_Bool bBalloon = static_cast< sal_Bool >(rEvt.GetMode() & HELPMODE_BALLOON);
SdrView *pSdrView = rSh.GetDrawView();
@@ -149,9 +149,9 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
#endif
SwContentAtPos::SW_TABLEBOXFML );
- if( rSh.GetContentAtPos( aPos, aCntntAtPos, FALSE, &aFldRect ) )
+ if( rSh.GetContentAtPos( aPos, aCntntAtPos, sal_False, &aFldRect ) )
{
- USHORT nStyle = 0; // style of quick help
+ sal_uInt16 nStyle = 0; // style of quick help
switch( aCntntAtPos.eCntntAtPos )
{
case SwContentAtPos::SW_TABLEBOXFML:
@@ -224,7 +224,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
}
}
// #i80029#
- BOOL bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
+ sal_Bool bExecHyperlinks = rView.GetDocShell()->IsReadOnly();
if ( !bExecHyperlinks )
{
SvtSecurityOptions aSecOpts;
@@ -301,10 +301,9 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
case RES_TABLEFLD:
case RES_GETEXPFLD:
{
- USHORT nOldSubType = pFld->GetSubType();
+ sal_uInt16 nOldSubType = pFld->GetSubType();
((SwField*)pFld)->SetSubType(nsSwExtendedSubType::SUB_CMD);
- sTxt =
- pFld->ExpandField(rSh.GetDoc()->IsClipBoard());
+ sTxt = pFld->ExpandField(true);
((SwField*)pFld)->SetSubType(nOldSubType);
}
break;
@@ -314,14 +313,14 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
break;
}
case RES_INPUTFLD: // BubbleHelp, because the suggestion could be quite long
- bBalloon = TRUE;
+ bBalloon = sal_True;
/* no break */
case RES_JUMPEDITFLD:
sTxt = pFld->GetPar2();
break;
case RES_DBFLD:
- sTxt = ((SwDBField*)pFld)->GetCntnt(TRUE);
+ sTxt = pFld->GetFieldName();
break;
case RES_USERFLD:
@@ -369,7 +368,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if( !sTxt.Len() )
{
aCntntAtPos.eCntntAtPos = SwContentAtPos::SW_REDLINE;
- if( rSh.GetContentAtPos( aPos, aCntntAtPos, FALSE, &aFldRect ) )
+ if( rSh.GetContentAtPos( aPos, aCntntAtPos, sal_False, &aFldRect ) )
lcl_GetRedlineHelp( *aCntntAtPos.aFnd.pRedl,
sTxt, bBalloon );
}
@@ -393,12 +392,12 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
}
}
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
if( bWeiter )
{
- BYTE nTabCols = rSh.WhichMouseTabCol(aPos);
- USHORT nTabRes = 0;
+ sal_uInt8 nTabCols = rSh.WhichMouseTabCol(aPos);
+ sal_uInt16 nTabRes = 0;
switch(nTabCols)
{
case SW_TABCOL_HORI:
@@ -432,7 +431,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
Rectangle aRect(rEvt.GetMousePosPixel(), aTxtSize);
Help::ShowQuickHelp(this, aRect, sTxt);
}
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
@@ -451,7 +450,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
pObj = aVEvt.pObj;
sTxt = pField->GetURL();
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
if (bWeiter && eHit == SDRHIT_TEXTEDIT)
@@ -476,7 +475,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if (pField )
{
sTxt = ((const SvxURLField*) pField)->GetURL();
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
}
@@ -515,7 +514,7 @@ void SwEditWin::Paint(const Rectangle& rRect)
SwWrtShell* pWrtShell = GetView().GetWrtShellPtr();
if(!pWrtShell)
return;
- BOOL bPaintShadowCrsr = FALSE;
+ sal_Bool bPaintShadowCrsr = sal_False;
if( pShadCrsr )
{
Rectangle aRect( pShadCrsr->GetRect());
@@ -528,7 +527,7 @@ void SwEditWin::Paint(const Rectangle& rRect)
// resides somewhat above, then everything is clipped outside
// and we have to make the "inner part" at the end of the
// Paint visible again. Otherwise Paint errors occur!
- bPaintShadowCrsr = TRUE;
+ bPaintShadowCrsr = sal_True;
}
}
diff --git a/sw/source/ui/docvw/edtwin3.cxx b/sw/source/ui/docvw/edtwin3.cxx
index 208aacd42e03..34b4103d7537 100644
--- a/sw/source/ui/docvw/edtwin3.cxx
+++ b/sw/source/ui/docvw/edtwin3.cxx
@@ -57,7 +57,7 @@
void ScrollMDI( ViewShell* pVwSh, const SwRect &rRect,
- USHORT nRangeX, USHORT nRangeY)
+ sal_uInt16 nRangeX, sal_uInt16 nRangeY)
{
SfxViewShell *pSfxVwSh = pVwSh->GetSfxViewShell();
if (pSfxVwSh && pSfxVwSh->ISA(SwView))
@@ -70,12 +70,12 @@ void ScrollMDI( ViewShell* pVwSh, const SwRect &rRect,
-BOOL IsScrollMDI( ViewShell* pVwSh, const SwRect &rRect )
+sal_Bool IsScrollMDI( ViewShell* pVwSh, const SwRect &rRect )
{
SfxViewShell *pSfxVwSh = pVwSh->GetSfxViewShell();
if (pSfxVwSh && pSfxVwSh->ISA(SwView))
return (((SwView *)pSfxVwSh)->IsScroll(rRect.SVRect()));
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -102,7 +102,7 @@ void SizeNotify(ViewShell* pVwSh, const Size &rSize)
-void PageNumNotify( ViewShell* pVwSh, USHORT nPhyNum, USHORT nVirtNum,
+void PageNumNotify( ViewShell* pVwSh, sal_uInt16 nPhyNum, sal_uInt16 nVirtNum,
const String& rPgStr)
{
SfxViewShell *pSfxVwSh = pVwSh->GetSfxViewShell();
@@ -127,7 +127,7 @@ void FrameNotify( ViewShell* pVwSh, FlyMode eMode )
/*--------------------------------------------------------------------
Description: Notify for page number update
--------------------------------------------------------------------*/
-BOOL SwEditWin::RulerColumnDrag( const MouseEvent& rMEvt, BOOL bVerticalMode)
+sal_Bool SwEditWin::RulerColumnDrag( const MouseEvent& rMEvt, sal_Bool bVerticalMode)
{
SvxRuler& rRuler = bVerticalMode ? rView.GetVLineal() : rView.GetHLineal();
return (!rRuler.StartDocDrag( rMEvt, RULER_TYPE_BORDER ) &&
@@ -138,7 +138,7 @@ BOOL SwEditWin::RulerColumnDrag( const MouseEvent& rMEvt, BOOL bVerticalMode)
// #i23726#
// #i42921# - add 3rd parameter <bVerticalMode> in order
// to consider vertical layout
-BOOL SwEditWin::RulerMarginDrag( const MouseEvent& rMEvt,
+sal_Bool SwEditWin::RulerMarginDrag( const MouseEvent& rMEvt,
const bool bVerticalMode )
{
SvxRuler& rRuler = bVerticalMode ? rView.GetVLineal() : rView.GetHLineal();
@@ -163,12 +163,12 @@ void RepaintPagePreview( ViewShell* pVwSh, const SwRect& rRect )
((SwPagePreView *)pSfxVwSh)->RepaintCoreRect( rRect );
}
-BOOL JumpToSwMark( ViewShell* pVwSh, const String& rMark )
+sal_Bool JumpToSwMark( ViewShell* pVwSh, const String& rMark )
{
SfxViewShell *pSfxVwSh = pVwSh->GetSfxViewShell();
if( pSfxVwSh && pSfxVwSh->ISA( SwView ) )
return ((SwView *)pSfxVwSh)->JumpToSwMark( rMark );
- return FALSE;
+ return sal_False;
}
void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt )
@@ -180,8 +180,8 @@ void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt )
// the SwWrtShell
if(!pSh)
return;
- BOOL bViewWasLocked = pSh->IsViewLocked(), bUnlockPaint = FALSE;
- pSh->LockView( TRUE );
+ sal_Bool bViewWasLocked = pSh->IsViewLocked(), bUnlockPaint = sal_False;
+ pSh->LockView( sal_True );
switch( rDCEvt.GetType() )
{
case DATACHANGED_SETTINGS:
@@ -192,7 +192,7 @@ void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt )
if( rDCEvt.GetFlags() & SETTINGS_STYLE )
{
pSh->LockPaint();
- bUnlockPaint = TRUE;
+ bUnlockPaint = sal_True;
ViewShell::DeleteReplacementBitmaps();
GetView().InvalidateBorder(); //Scrollbar work
}
@@ -203,7 +203,7 @@ void SwEditWin::DataChanged( const DataChangedEvent& rDCEvt )
case DATACHANGED_FONTS:
case DATACHANGED_FONTSUBSTITUTION:
pSh->LockPaint();
- bUnlockPaint = TRUE;
+ bUnlockPaint = sal_True;
GetView().GetDocShell()->UpdateFontList(); //e.g. printer change
break;
}
diff --git a/sw/source/ui/docvw/extedit.cxx b/sw/source/ui/docvw/extedit.cxx
index 7f318dbf7a0d..73046addddcb 100644
--- a/sw/source/ui/docvw/extedit.cxx
+++ b/sw/source/ui/docvw/extedit.cxx
@@ -121,7 +121,7 @@ void EditWithExternalTool(GraphicObject *pGraphicObject, SwWrtShell *rSh)
//Write Graphic to the Temp File
GraphicFilter& rGF = *GraphicFilter::GetGraphicFilter();
- USHORT nFilter(rGF.GetExportFormatNumber(fExt));
+ sal_uInt16 nFilter(rGF.GetExportFormatNumber(fExt));
String aFilter(rGF.GetExportFormatShortName(nFilter));
String sPath(tempFileName.getStr());
diff --git a/sw/source/ui/docvw/makefile.mk b/sw/source/ui/docvw/makefile.mk
deleted file mode 100644
index 5e9f739a7720..000000000000
--- a/sw/source/ui/docvw/makefile.mk
+++ /dev/null
@@ -1,70 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=docvw
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- access.src \
- docvw.src \
- annotation.src
-
-SLOFILES = \
- $(SLO)$/edtdd.obj \
- $(SLO)$/edtwin.obj \
- $(SLO)$/edtwin2.obj \
- $(SLO)$/edtwin3.obj \
- $(SLO)$/romenu.obj \
- $(SLO)$/extedit.obj \
- $(SLO)$/srcedtw.obj \
- $(SLO)$/PostItMgr.obj \
- $(SLO)$/frmsidebarwincontainer.obj \
- $(SLO)$/AnchorOverlayObject.obj \
- $(SLO)$/ShadowOverlayObject.obj \
- $(SLO)$/SidebarWin.obj \
- $(SLO)$/SidebarWinAcc.obj \
- $(SLO)$/AnnotationWin.obj \
- $(SLO)$/AnnotationMenuButton.obj \
- $(SLO)$/SidebarTxtControl.obj \
- $(SLO)$/SidebarTxtControlAcc.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx
index 141b7df4adec..1d68327189d6 100644
--- a/sw/source/ui/docvw/romenu.cxx
+++ b/sw/source/ui/docvw/romenu.cxx
@@ -99,13 +99,13 @@ SwReadOnlyPopup::~SwReadOnlyPopup()
delete pTargetURL;
}
-void SwReadOnlyPopup::Check( USHORT nMID, USHORT nSID, SfxDispatcher &rDis )
+void SwReadOnlyPopup::Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher &rDis )
{
SfxPoolItem *_pItem = 0;
SfxItemState eState = rDis.GetBindings()->QueryState( nSID, _pItem );
if (eState >= SFX_ITEM_AVAILABLE)
{
- EnableItem( nMID, TRUE );
+ EnableItem( nMID, sal_True );
if (_pItem)
{
CheckItem ( nMID, !_pItem->ISA(SfxVoidItem) &&
@@ -113,11 +113,11 @@ void SwReadOnlyPopup::Check( USHORT nMID, USHORT nSID, SfxDispatcher &rDis )
((SfxBoolItem*)_pItem)->GetValue());
//remove full screen entry when not in full screen mode
if(SID_WIN_FULLSCREEN == nSID && !IsItemChecked(SID_WIN_FULLSCREEN) )
- EnableItem(nMID, FALSE);
+ EnableItem(nMID, sal_False);
}
}
else
- EnableItem( nMID, FALSE );
+ EnableItem( nMID, sal_False );
delete _pItem;
}
@@ -136,7 +136,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
if ( !sURL.Len() )
{
SwContentAtPos aCntntAtPos( SwContentAtPos::SW_INETATTR );
- if( rSh.GetContentAtPos( rDocPos, aCntntAtPos, FALSE))
+ if( rSh.GetContentAtPos( rDocPos, aCntntAtPos, sal_False))
{
SwFmtINetFmt &rIItem = *(SwFmtINetFmt*)aCntntAtPos.aFnd.pAttr;
sURL = rIItem.GetValue();
@@ -145,12 +145,12 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
}
}
- BOOL bLink = FALSE;
+ sal_Bool bLink = sal_False;
const Graphic *pGrf;
if ( 0 == (pGrf = rSh.GetGrfAtPos( rDocPos, sGrfName, bLink )) )
{
- EnableItem( MN_READONLY_SAVEGRAPHIC, FALSE );
- EnableItem( MN_READONLY_COPYGRAPHIC, FALSE );
+ EnableItem( MN_READONLY_SAVEGRAPHIC, sal_False );
+ EnableItem( MN_READONLY_COPYGRAPHIC, sal_False );
}
else
{
@@ -158,7 +158,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
const SwFrmFmt* pGrfFmt = rSh.GetFmtFromObj( rDocPos );
const SfxPoolItem* pURLItem;
if( pGrfFmt && SFX_ITEM_SET == pGrfFmt->GetItemState(
- RES_URL, TRUE, &pURLItem ))
+ RES_URL, sal_True, &pURLItem ))
{
const SwFmtURL& rURL = *(SwFmtURL*)pURLItem;
if( rURL.GetMap() )
@@ -180,7 +180,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
pMenu->CheckItem( MN_READONLY_TOGALLERYLINK, bGrfToGalleryAsLnk );
pMenu->CheckItem( MN_READONLY_TOGALLERYCOPY, !bGrfToGalleryAsLnk );
- for ( USHORT i=0; i < aThemeList.size(); ++i )
+ for ( sal_uInt16 i=0; i < aThemeList.size(); ++i )
pMenu->InsertItem( MN_READONLY_GRAPHICTOGALLERY+i + 3, aThemeList[ i ] );
}
else
@@ -193,12 +193,12 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
SfxDispatcher &rDis = *pVFrame->GetDispatcher();
const SwPageDesc &rDesc = rSh.GetPageDesc( rSh.GetCurPageDesc() );
pItem = &rDesc.GetMaster().GetBackground();
- BOOL bEnableBackGallery = FALSE,
- bEnableBack = FALSE;
+ sal_Bool bEnableBackGallery = sal_False,
+ bEnableBack = sal_False;
if ( GPOS_NONE != pItem->GetGraphicPos() )
{
- bEnableBack = TRUE;
+ bEnableBack = sal_True;
if ( pItem->GetGraphicLink() )
{
if ( aThemeList.empty() )
@@ -209,9 +209,9 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
PopupMenu *pMenu = GetPopupMenu(MN_READONLY_BACKGROUNDTOGALLERY);
pMenu->CheckItem( MN_READONLY_TOGALLERYLINK, bGrfToGalleryAsLnk );
pMenu->CheckItem( MN_READONLY_TOGALLERYCOPY, !bGrfToGalleryAsLnk );
- bEnableBackGallery = TRUE;
+ bEnableBackGallery = sal_True;
- for ( USHORT i=0; i < aThemeList.size(); ++i )
+ for ( sal_uInt16 i=0; i < aThemeList.size(); ++i )
pMenu->InsertItem( MN_READONLY_GRAPHICTOGALLERY+i + 3, aThemeList[ i ] );
}
}
@@ -222,9 +222,9 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
if ( !rSh.GetViewOptions()->IsGraphic() )
CheckItem( MN_READONLY_GRAPHICOFF );
else
- EnableItem( MN_READONLY_LOADGRAPHIC, FALSE );
+ EnableItem( MN_READONLY_LOADGRAPHIC, sal_False );
- BOOL bReloadFrame = 0 != rSh.GetView().GetViewFrame()->GetFrame().GetParentFrame();
+ sal_Bool bReloadFrame = 0 != rSh.GetView().GetViewFrame()->GetFrame().GetParentFrame();
EnableItem( MN_READONLY_RELOAD_FRAME,
bReloadFrame );
EnableItem( MN_READONLY_RELOAD, !bReloadFrame);
@@ -245,7 +245,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
SfxItemState eState = pVFrame->GetBindings().QueryState( SID_COPY, pState );
Check( MN_READONLY_COPY, SID_COPY, rDis );
if(eState < SFX_ITEM_AVAILABLE)
- EnableItem( MN_READONLY_COPY, FALSE );
+ EnableItem( MN_READONLY_COPY, sal_False );
eState = pVFrame->GetBindings().QueryState( SID_EDITDOC, pState );
if (
@@ -253,23 +253,23 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
(rSh.IsGlobalDoc() && rView.GetDocShell()->IsReadOnlyUI())
)
{
- EnableItem( MN_READONLY_EDITDOC, FALSE );
+ EnableItem( MN_READONLY_EDITDOC, sal_False );
}
if ( !sURL.Len() )
{
- EnableItem( MN_READONLY_OPENURL, FALSE );
- EnableItem( MN_READONLY_OPENURLNEW, FALSE );
- EnableItem( MN_READONLY_COPYLINK, FALSE );
+ EnableItem( MN_READONLY_OPENURL, sal_False );
+ EnableItem( MN_READONLY_OPENURLNEW, sal_False );
+ EnableItem( MN_READONLY_COPYLINK, sal_False );
}
Check( SID_WIN_FULLSCREEN, SID_WIN_FULLSCREEN, rDis );
- RemoveDisabledEntries( TRUE, TRUE );
+ RemoveDisabledEntries( sal_True, sal_True );
}
void SwReadOnlyPopup::Execute( Window* pWin, const Point &rPixPos )
{
- USHORT nId = PopupMenu::Execute(
+ sal_uInt16 nId = PopupMenu::Execute(
pWin,
rPixPos );
Execute(pWin, nId);
@@ -278,14 +278,14 @@ void SwReadOnlyPopup::Execute( Window* pWin, const Point &rPixPos )
/*-------------------------------------------------------------------------
execute the resulting ID only - necessary to support XContextMenuInterception
-----------------------------------------------------------------------*/
-void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId )
+void SwReadOnlyPopup::Execute( Window* pWin, sal_uInt16 nId )
{
SwWrtShell &rSh = rView.GetWrtShell();
SfxDispatcher &rDis = *rView.GetViewFrame()->GetDispatcher();
if ( nId >= MN_READONLY_GRAPHICTOGALLERY )
{
String sTmp;
- USHORT nSaveId;
+ sal_uInt16 nSaveId;
if ( nId >= MN_READONLY_BACKGROUNDTOGALLERY )
{
nId -= MN_READONLY_BACKGROUNDTOGALLERY+3;
@@ -309,8 +309,8 @@ void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId )
TransferDataContainer* pClipCntnr = 0;
- USHORT nExecId = USHRT_MAX;
- USHORT nFilter = USHRT_MAX;
+ sal_uInt16 nExecId = USHRT_MAX;
+ sal_uInt16 nFilter = USHRT_MAX;
switch( nId )
{
case SID_WIN_FULLSCREEN : nExecId = SID_WIN_FULLSCREEN; break;
@@ -351,9 +351,9 @@ void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId )
case MN_READONLY_LOADGRAPHIC:
{
- BOOL bModified = rSh.IsModified();
+ sal_Bool bModified = rSh.IsModified();
SwViewOption aOpt( *rSh.GetViewOptions() );
- aOpt.SetGraphic( TRUE );
+ aOpt.SetGraphic( sal_True );
rSh.ApplyViewOptions( aOpt );
if(!bModified)
rSh.ResetModified();
@@ -364,10 +364,10 @@ void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId )
case MN_READONLY_PLUGINOFF: nExecId = SID_PLUGINS_ACTIVE; break;
#endif
case MN_READONLY_TOGALLERYLINK:
- SW_MOD()->GetModuleConfig()->SetGrfToGalleryAsLnk( TRUE );
+ SW_MOD()->GetModuleConfig()->SetGrfToGalleryAsLnk( sal_True );
break;
case MN_READONLY_TOGALLERYCOPY:
- SW_MOD()->GetModuleConfig()->SetGrfToGalleryAsLnk( FALSE );
+ SW_MOD()->GetModuleConfig()->SetGrfToGalleryAsLnk( sal_False );
break;
default: //forward the id to the SfxBindings
@@ -386,7 +386,7 @@ void SwReadOnlyPopup::Execute( Window* pWin, USHORT nId )
}
}
-String SwReadOnlyPopup::SaveGraphic( USHORT nId )
+String SwReadOnlyPopup::SaveGraphic( sal_uInt16 nId )
{
// fish out the graphic's name
@@ -430,18 +430,18 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
aDlgHelper.SetFileName( aURL.GetName() );
GraphicFilter& rGF = *GraphicFilter::GetGraphicFilter();
- const USHORT nCount = rGF.GetExportFormatCount();
+ const sal_uInt16 nCount = rGF.GetExportFormatCount();
String aExt( aURL.GetExtension() );
if( !aExt.Len() )
GetPreferedExtension( aExt, rGraphic );
aExt.ToLowerAscii();
- USHORT nDfltFilter = USHRT_MAX;
+ sal_uInt16 nDfltFilter = USHRT_MAX;
Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY);
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
xFltMgr->appendFilter( rGF.GetExportFormatName( i ), rGF.GetExportWildcard( i ) );
if ( COMPARE_EQUAL == aExt.CompareIgnoreCaseToAscii(rGF.GetExportFormatShortName( i ).ToLowerAscii() ))
@@ -451,7 +451,7 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
{
// "wrong" extension?
GetPreferedExtension( aExt, rGraphic );
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
if ( aExt == rGF.GetExportFormatShortName( i ).ToLowerAscii() )
{
nDfltFilter = i;
@@ -475,11 +475,11 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
{
// try to save the original graphic
SfxMedium aIn( rGrfName, STREAM_READ | STREAM_NOCREATE,
- TRUE );
+ sal_True );
if( aIn.GetInStream() && !aIn.GetInStream()->GetError() )
{
SfxMedium aOut( sPath, STREAM_WRITE | STREAM_SHARE_DENYNONE,
- FALSE);
+ sal_False);
if( aOut.GetOutStream() && !aOut.GetOutStream()->GetError())
{
*aOut.GetOutStream() << *aIn.GetInStream();
@@ -494,7 +494,7 @@ String ExportGraphic( const Graphic &rGraphic, const String &rGrfName )
}
}
- USHORT nFilter;
+ sal_uInt16 nFilter;
if ( xFltMgr->getCurrentFilter().getLength() && rGF.GetExportFormatCount() )
nFilter = rGF.GetExportFormatNumber( xFltMgr->getCurrentFilter() );
else
diff --git a/sw/source/ui/docvw/romenu.hxx b/sw/source/ui/docvw/romenu.hxx
index 95d2ac2bdddd..25440ee8be79 100644
--- a/sw/source/ui/docvw/romenu.hxx
+++ b/sw/source/ui/docvw/romenu.hxx
@@ -49,12 +49,12 @@ class SwReadOnlyPopup : public PopupMenu
sDescription,
sGrfName;
std::vector<String> aThemeList;
- BOOL bGrfToGalleryAsLnk;
+ sal_Bool bGrfToGalleryAsLnk;
ImageMap* pImageMap;
INetImage* pTargetURL;
- void Check( USHORT nMID, USHORT nSID, SfxDispatcher &rDis );
- String SaveGraphic( USHORT nId );
+ void Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher &rDis );
+ String SaveGraphic( sal_uInt16 nId );
using PopupMenu::Execute;
@@ -63,7 +63,7 @@ public:
~SwReadOnlyPopup();
void Execute( Window* pWin, const Point &rPPos );
- void Execute( Window* pWin, USHORT nId );
+ void Execute( Window* pWin, sal_uInt16 nId );
};
void GetPreferedExtension( String &rExt, const Graphic &rGrf );
diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx
index 3aa3d3f1f88f..d84c4d2d26f0 100644
--- a/sw/source/ui/docvw/srcedtw.cxx
+++ b/sw/source/ui/docvw/srcedtw.cxx
@@ -51,12 +51,14 @@
#include <docsh.hxx>
#include <srcview.hxx>
#include <helpid.h>
+#include <deque>
+
struct SwTextPortion
{
- USHORT nLine;
- USHORT nStart, nEnd;
+ sal_uInt16 nLine;
+ sal_uInt16 nStart, nEnd;
svtools::ColorConfigEntry eType;
};
@@ -64,9 +66,7 @@ struct SwTextPortion
#define MAX_HIGHLIGHTTIME 200
#define SYNTAX_HIGHLIGHT_TIMEOUT 200
-SV_DECL_VARARR(SwTextPortions, SwTextPortion,16,16)
-
-SV_IMPL_VARARR(SwTextPortions, SwTextPortion)
+typedef std::deque<SwTextPortion> SwTextPortions;
static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
{
@@ -81,12 +81,12 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
const sal_Unicode cCR = 0x0d;
- const USHORT nStrLen = rSource.Len();
- USHORT nInsert = 0; // number of inserted portions
- USHORT nActPos = 0; // position, where '<' was found
- USHORT nOffset = 0; // Offset of nActPos to '<'
- USHORT nPortStart = USHRT_MAX; // for the TextPortion
- USHORT nPortEnd = 0; //
+ const sal_uInt16 nStrLen = rSource.Len();
+ sal_uInt16 nInsert = 0; // number of inserted portions
+ sal_uInt16 nActPos = 0; // position, where '<' was found
+ sal_uInt16 nOffset = 0; // Offset of nActPos to '<'
+ sal_uInt16 nPortStart = USHRT_MAX; // for the TextPortion
+ sal_uInt16 nPortEnd = 0; //
SwTextPortion aText;
while(nActPos < nStrLen)
{
@@ -103,7 +103,8 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
aText.nStart += 1;
aText.nEnd = nActPos - 1;
aText.eType = svtools::HTMLUNKNOWN;
- aPortionList.Insert(aText, nInsert++);
+ aPortionList.push_back( aText );
+ nInsert++;
}
sal_Unicode cFollowFirst = rSource.GetChar((xub_StrLen)(nActPos + 1));
sal_Unicode cFollowNext = rSource.GetChar((xub_StrLen)(nActPos + 2));
@@ -130,7 +131,7 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
if(svtools::HTMLUNKNOWN == eFoundType)
{
// now here a keyword could follow
- USHORT nSrchPos = nActPos;
+ sal_uInt16 nSrchPos = nActPos;
while(++nSrchPos < nStrLen - 1)
{
sal_Unicode cNext = rSource.GetChar(nSrchPos);
@@ -171,18 +172,18 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
// now we still have to look for '>'
if(svtools::HTMLUNKNOWN != eFoundType)
{
- BOOL bFound = FALSE;
- for(USHORT i = nPortEnd; i < nStrLen; i++)
+ sal_Bool bFound = sal_False;
+ for(sal_uInt16 i = nPortEnd; i < nStrLen; i++)
if(cCloseBracket == rSource.GetChar(i))
{
- bFound = TRUE;
+ bFound = sal_True;
nPortEnd = i;
break;
}
if(!bFound && (eFoundType == svtools::HTMLCOMMENT))
{
// comment without ending in this line
- bFound = TRUE;
+ bFound = sal_True;
nPortEnd = nStrLen - 1;
}
@@ -193,7 +194,8 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
aTextPortion.nStart = nPortStart + 1;
aTextPortion.nEnd = nPortEnd;
aTextPortion.eType = eFoundType;
- aPortionList.Insert(aTextPortion, nInsert++);
+ aPortionList.push_back( aTextPortion );
+ nInsert++;
eFoundType = svtools::HTMLUNKNOWN;
}
@@ -207,7 +209,8 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
aText.nStart = nPortEnd + 1;
aText.nEnd = nActPos - 1;
aText.eType = svtools::HTMLUNKNOWN;
- aPortionList.Insert(aText, nInsert++);
+ aPortionList.push_back( aText );
+ nInsert++;
}
}
@@ -226,8 +229,8 @@ SwSrcEditWindow::SwSrcEditWindow( Window* pParent, SwSrcView* pParentView ) :
nCurTextWidth(0),
nStartLine(USHRT_MAX),
eSourceEncoding(gsl_getSystemTextEncoding()),
- bDoSyntaxHighlight(TRUE),
- bHighlighting(FALSE)
+ bDoSyntaxHighlight(sal_True),
+ bHighlighting(sal_False)
{
SetHelpId(HID_SOURCE_EDITWIN);
CreateTextEngine();
@@ -397,9 +400,9 @@ void TextViewOutWin::Command( const CommandEvent& rCEvt )
void TextViewOutWin::KeyInput( const KeyEvent& rKEvt )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
SwSrcEditWindow* pSrcEditWin = (SwSrcEditWindow*)GetParent();
- BOOL bChange = !pSrcEditWin->IsReadonly() || !TextEngine::DoesKeyChangeText( rKEvt );
+ sal_Bool bChange = !pSrcEditWin->IsReadonly() || !TextEngine::DoesKeyChangeText( rKEvt );
if(bChange)
bDone = pTextView->KeyInput( rKEvt );
@@ -460,14 +463,14 @@ void SwSrcEditWindow::CreateTextEngine()
pTextEngine = new ExtTextEngine;
pTextView = new ExtTextView( pTextEngine, pOutWin );
- pTextView->SetAutoIndentMode(TRUE);
+ pTextView->SetAutoIndentMode(sal_True);
pOutWin->SetTextView(pTextView);
- pTextEngine->SetUpdateMode( FALSE );
+ pTextEngine->SetUpdateMode( sal_False );
pTextEngine->InsertView( pTextView );
Font aFont;
- aFont.SetTransparent( FALSE );
+ aFont.SetTransparent( sal_False );
aFont.SetFillColor( rCol );
SetPointFont( aFont );
aFont = GetFont();
@@ -478,10 +481,10 @@ void SwSrcEditWindow::CreateTextEngine()
aSyntaxIdleTimer.SetTimeout( SYNTAX_HIGHLIGHT_TIMEOUT );
aSyntaxIdleTimer.SetTimeoutHdl( LINK( this, SwSrcEditWindow, SyntaxTimerHdl ) );
- pTextEngine->EnableUndo( TRUE );
- pTextEngine->SetUpdateMode( TRUE );
+ pTextEngine->EnableUndo( sal_True );
+ pTextEngine->SetUpdateMode( sal_True );
- pTextView->ShowCursor( TRUE, TRUE );
+ pTextView->ShowCursor( sal_True, sal_True );
InitScrollBars();
StartListening( *pTextEngine );
@@ -519,14 +522,14 @@ IMPL_LINK(SwSrcEditWindow, ScrollHdl, ScrollBar*, pScroll)
{
long nDiff = pTextView->GetStartDocPos().Y() - pScroll->GetThumbPos();
GetTextView()->Scroll( 0, nDiff );
- pTextView->ShowCursor( FALSE, TRUE );
+ pTextView->ShowCursor( sal_False, sal_True );
pScroll->SetThumbPos( pTextView->GetStartDocPos().Y() );
}
else
{
long nDiff = pTextView->GetStartDocPos().X() - pScroll->GetThumbPos();
GetTextView()->Scroll( nDiff, 0 );
- pTextView->ShowCursor( FALSE, TRUE );
+ pTextView->ShowCursor( sal_False, sal_True );
pScroll->SetThumbPos( pTextView->GetStartDocPos().X() );
}
GetSrcView()->GetViewFrame()->GetBindings().Invalidate( SID_TABLE_CELL );
@@ -538,18 +541,18 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer )
Time aSyntaxCheckStart;
OSL_ENSURE( pTextView, "Noch keine View, aber Syntax-Highlight ?!" );
- bHighlighting = TRUE;
- USHORT nLine;
- USHORT nCount = 0;
+ bHighlighting = sal_True;
+ sal_uInt16 nLine;
+ sal_uInt16 nCount = 0;
// at first the region around the cursor is processed
TextSelection aSel = pTextView->GetSelection();
- USHORT nCur = (USHORT)aSel.GetStart().GetPara();
+ sal_uInt16 nCur = (sal_uInt16)aSel.GetStart().GetPara();
if(nCur > 40)
nCur -= 40;
else
nCur = 0;
if(aSyntaxLineTable.Count())
- for(USHORT i = 0; i < 80 && nCount < 40; i++, nCur++)
+ for(sal_uInt16 i = 0; i < 80 && nCount < 40; i++, nCur++)
{
void * p = aSyntaxLineTable.Get(nCur);
if(p)
@@ -571,9 +574,9 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer )
void* p = aSyntaxLineTable.First();
while ( p && nCount < MAX_SYNTAX_HIGHLIGHT)
{
- nLine = (USHORT)aSyntaxLineTable.GetCurKey();
+ nLine = (sal_uInt16)aSyntaxLineTable.GetCurKey();
DoSyntaxHighlight( nLine );
- USHORT nCurKey = (USHORT)aSyntaxLineTable.GetCurKey();
+ sal_uInt16 nCurKey = (sal_uInt16)aSyntaxLineTable.GetCurKey();
p = aSyntaxLineTable.Next();
aSyntaxLineTable.Remove(nCurKey);
nCount ++;
@@ -592,50 +595,50 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Timer *, pTimer )
nCurTextWidth = pTextEngine->CalcTextWidth() + 25; // kleine Toleranz
if ( nCurTextWidth != nPrevTextWidth )
SetScrollBarRanges();
- bHighlighting = FALSE;
+ bHighlighting = sal_False;
return 0;
}
-void SwSrcEditWindow::DoSyntaxHighlight( USHORT nPara )
+void SwSrcEditWindow::DoSyntaxHighlight( sal_uInt16 nPara )
{
// Because of DelayedSyntaxHighlight it could happen,
// that the line doesn't exist anymore!
if ( nPara < pTextEngine->GetParagraphCount() )
{
- BOOL bTempModified = IsModified();
- pTextEngine->RemoveAttribs( nPara, (BOOL)TRUE );
+ sal_Bool bTempModified = IsModified();
+ pTextEngine->RemoveAttribs( nPara, (sal_Bool)sal_True );
String aSource( pTextEngine->GetText( nPara ) );
- pTextEngine->SetUpdateMode( FALSE );
+ pTextEngine->SetUpdateMode( sal_False );
ImpDoHighlight( aSource, nPara );
TextView* pTmp = pTextEngine->GetActiveView();
- pTmp->SetAutoScroll(FALSE);
+ pTmp->SetAutoScroll(sal_False);
pTextEngine->SetActiveView(0);
- pTextEngine->SetUpdateMode( TRUE );
+ pTextEngine->SetUpdateMode( sal_True );
pTextEngine->SetActiveView(pTmp);
- pTmp->SetAutoScroll(TRUE);
- pTmp->ShowCursor( FALSE/*pTmp->IsAutoScroll()*/ );
+ pTmp->SetAutoScroll(sal_True);
+ pTmp->ShowCursor( sal_False/*pTmp->IsAutoScroll()*/ );
if(!bTempModified)
ClearModifyFlag();
}
}
-void SwSrcEditWindow::DoDelayedSyntaxHighlight( USHORT nPara )
+void SwSrcEditWindow::DoDelayedSyntaxHighlight( sal_uInt16 nPara )
{
if ( !bHighlighting && bDoSyntaxHighlight )
{
- aSyntaxLineTable.Insert( nPara, (void*)(USHORT)1 );
+ aSyntaxLineTable.Insert( nPara, (void*)(sal_uInt16)1 );
aSyntaxIdleTimer.Start();
}
}
-void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
+void SwSrcEditWindow::ImpDoHighlight( const String& rSource, sal_uInt16 nLineOff )
{
SwTextPortions aPortionList;
lcl_Highlight(rSource, aPortionList);
- USHORT nCount = aPortionList.Count();
+ size_t nCount = aPortionList.size();
if ( !nCount )
return;
@@ -643,7 +646,7 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
if ( rLast.nStart > rLast.nEnd ) // Only until Bug from MD is resolved
{
nCount--;
- aPortionList.Remove( nCount);
+ aPortionList.pop_back();
if ( !nCount )
return;
}
@@ -651,19 +654,19 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
// maybe optimize:
// If frequently the same color, blank without color in between,
// maybe summarize or at least the blank; for less attributes
- BOOL bOptimizeHighlight = TRUE; // war in der BasicIDE static
+ sal_Bool bOptimizeHighlight = sal_True; // war in der BasicIDE static
if ( bOptimizeHighlight )
{
// Only blanks and tabs have to be attributed along.
// When two identical attributes are placed consecutively,
// it optimises the TextEngine.
- USHORT nLastEnd = 0;
+ sal_uInt16 nLastEnd = 0;
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( size_t i = 0; i < nCount; i++ )
{
SwTextPortion& r = aPortionList[i];
#if OSL_DEBUG_LEVEL > 1
- USHORT nLine = aPortionList[0].nLine;
+ sal_uInt16 nLine = aPortionList[0].nLine;
OSL_ENSURE( r.nLine == nLine, "doch mehrere Zeilen ?" );
#endif
if ( r.nStart > r.nEnd ) // only until Bug from MD is resolved
@@ -681,7 +684,7 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
}
}
- for ( USHORT i = 0; i < aPortionList.Count(); i++ )
+ for ( size_t i = 0; i < aPortionList.size(); i++ )
{
SwTextPortion& r = aPortionList[i];
if ( r.nStart > r.nEnd ) // only until Bug from MD is resolved
@@ -692,8 +695,8 @@ void SwSrcEditWindow::ImpDoHighlight( const String& rSource, USHORT nLineOff )
r.eType != svtools::HTMLUNKNOWN)
r.eType = svtools::HTMLUNKNOWN;
Color aColor((ColorData)SW_MOD()->GetColorConfig().GetColorValue((svtools::ColorConfigEntry)r.eType).nColor);
- USHORT nLine = nLineOff+r.nLine; //
- pTextEngine->SetAttrib( TextAttribFontColor( aColor ), nLine, r.nStart, r.nEnd+1, TRUE );
+ sal_uInt16 nLine = nLineOff+r.nLine; //
+ pTextEngine->SetAttrib( TextAttribFontColor( aColor ), nLine, r.nStart, r.nEnd+1, sal_True );
}
}
@@ -717,7 +720,7 @@ void SwSrcEditWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
else if( ( rTextHint.GetId() == TEXT_HINT_PARAINSERTED ) ||
( rTextHint.GetId() == TEXT_HINT_PARACONTENTCHANGED ) )
{
- DoDelayedSyntaxHighlight( (USHORT)rTextHint.GetValue() );
+ DoDelayedSyntaxHighlight( (sal_uInt16)rTextHint.GetValue() );
}
}
}
@@ -728,7 +731,7 @@ void SwSrcEditWindow::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdC
SetFont();
}
-void SwSrcEditWindow::Invalidate(USHORT )
+void SwSrcEditWindow::Invalidate(sal_uInt16 )
{
pOutWin->Invalidate();
Window::Invalidate();
@@ -764,7 +767,7 @@ void SwSrcEditWindow::GetFocus()
pOutWin->GrabFocus();
}
-BOOL lcl_GetLanguagesForEncoding(rtl_TextEncoding eEnc, LanguageType aLanguages[])
+sal_Bool lcl_GetLanguagesForEncoding(rtl_TextEncoding eEnc, LanguageType aLanguages[])
{
switch(eEnc)
{
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index 1af860cbff2a..2fc5003f46ca 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -111,7 +111,7 @@ SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) :
SetExchangeSupport();
// Metrics
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric(aAddrLeftField, aMetric);
SetMetric(aAddrTopField, aMetric);
SetMetric(aSendLeftField, aMetric);
@@ -156,29 +156,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());
}
@@ -200,13 +200,13 @@ IMPL_LINK_INLINE_START( SwEnvFmtPage, ModifyHdl, Edit *, pEdit )
if (pEdit == &aSizeWidthField || pEdit == &aSizeHeightField)
{
Paper ePaper = SvxPaperInfo::GetSvxPaper(
- Size(lHeight, lWidth), MAP_TWIP, TRUE);
- for (USHORT i = 0; i < aIDs.Count(); i++)
- if (aIDs[i] == (USHORT)ePaper)
+ Size(lHeight, lWidth), MAP_TWIP, sal_True);
+ for (sal_uInt16 i = 0; i < aIDs.Count(); i++)
+ if (aIDs[i] == (sal_uInt16)ePaper)
aSizeFormatBox.SelectEntryPos(i);
// remember user size
- if (aIDs[aSizeFormatBox.GetSelectEntryPos()] == (USHORT)PAPER_USER)
+ if (aIDs[aSizeFormatBox.GetSelectEntryPos()] == (sal_uInt16)PAPER_USER)
{
lUserW = lWidth ;
lUserH = lHeight;
@@ -230,9 +230,9 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
OSL_ENSURE(pSh, "Shell missing");
// determine collection-ptr
- BOOL bSender = pButton != &aAddrEditButton;
+ sal_Bool bSender = pButton != &aAddrEditButton;
- SwTxtFmtColl* pColl = pSh->GetTxtCollFromPool( static_cast< USHORT >(
+ SwTxtFmtColl* pColl = pSh->GetTxtCollFromPool( static_cast< sal_uInt16 >(
bSender ? RES_POOLCOLL_SENDADRESS : RES_POOLCOLL_JAKETADRESS));
OSL_ENSURE(pColl, "Text collection missing");
@@ -250,7 +250,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 );
@@ -268,7 +268,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 );
@@ -293,7 +293,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 );
@@ -317,10 +317,10 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
// maybe relocate defaults
const SfxPoolItem* pItem = 0;
SfxItemSet* pOutputSet = (SfxItemSet*)pDlg->GetOutputItemSet();
- USHORT nNewDist;
+ sal_uInt16 nNewDist;
if( SFX_ITEM_SET == pOutputSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS,
- FALSE, &pItem ) &&
+ sal_False, &pItem ) &&
nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) )
{
SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
@@ -344,16 +344,16 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
Description: A temporary Itemset that gets discarded at abort
------------------------------------------------------------------------*/
-SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender)
+SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, sal_Bool bSender)
{
SfxItemSet *&pAddrSet = bSender ? GetParent()->pSenderSet : GetParent()->pAddresseeSet;
if (!pAddrSet)
{
// determine range (merge both Itemsets' ranges)
- const USHORT *pRanges = pColl->GetAttrSet().GetRanges();
+ const sal_uInt16 *pRanges = pColl->GetAttrSet().GetRanges();
- static USHORT const aRanges[] =
+ static sal_uInt16 const aRanges[] =
{
RES_PARATR_BEGIN, RES_PARATR_ADJUST,
RES_PARATR_TABSTOP, RES_PARATR_END-1,
@@ -367,12 +367,12 @@ SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender)
};
// BruteForce merge because MergeRange in SvTools is buggy:
- USHORT i = 0;
+ sal_uInt16 i = 0;
SvLongsSort aMergedRanges( 0, 10 );
while (pRanges[i])
{
- for (USHORT nPos = pRanges[i]; nPos <= pRanges[i+1]; nPos++)
+ for (sal_uInt16 nPos = pRanges[i]; nPos <= pRanges[i+1]; nPos++)
aMergedRanges.Insert(nPos);
i += 2;
}
@@ -381,13 +381,13 @@ SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender)
while (aRanges[i])
{
- for (USHORT nPos = aRanges[i]; nPos <= aRanges[i+1]; nPos++)
+ for (sal_uInt16 nPos = aRanges[i]; nPos <= aRanges[i+1]; nPos++)
aMergedRanges.Insert(nPos);
i += 2;
}
// compact ranges
- std::vector<USHORT> aCompactedRanges;
+ std::vector<sal_uInt16> aCompactedRanges;
aCompactedRanges.push_back(aMergedRanges[0]);
@@ -407,7 +407,7 @@ SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender)
}
// create new ranges
- USHORT *pNewRanges = new USHORT[aCompactedRanges.size() + 1];
+ sal_uInt16 *pNewRanges = new sal_uInt16[aCompactedRanges.size() + 1];
for (i = 0; i < aCompactedRanges.size(); ++i)
pNewRanges[i] = aCompactedRanges[i];
@@ -432,8 +432,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());
@@ -528,8 +528,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));
@@ -545,11 +545,11 @@ void SwEnvFmtPage::FillItem(SwEnvItem& rItem)
}
}
-BOOL SwEnvFmtPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwEnvFmtPage::FillItemSet(SfxItemSet& rSet)
{
FillItem(GetParent()->aEnvItem);
rSet.Put(GetParent()->aEnvItem);
- return TRUE;
+ return sal_True;
}
void SwEnvFmtPage::Reset(const SfxItemSet& rSet)
@@ -558,9 +558,9 @@ void SwEnvFmtPage::Reset(const SfxItemSet& rSet)
Paper ePaper = SvxPaperInfo::GetSvxPaper(
Size( Min(rItem.lWidth, rItem.lHeight),
- Max(rItem.lWidth, rItem.lHeight)), MAP_TWIP, TRUE);
- for (USHORT i = 0; i < (USHORT) aIDs.Count(); i++)
- if (aIDs[i] == (USHORT)ePaper)
+ Max(rItem.lWidth, rItem.lHeight)), MAP_TWIP, sal_True);
+ for (sal_uInt16 i = 0; i < (sal_uInt16) aIDs.Count(); i++)
+ if (aIDs[i] == (sal_uInt16)ePaper)
aSizeFormatBox.SelectEntryPos(i);
// Metric fields
diff --git a/sw/source/ui/envelp/envfmt.hxx b/sw/source/ui/envelp/envfmt.hxx
index 71159e904b05..097eb46cfb47 100644
--- a/sw/source/ui/envelp/envfmt.hxx
+++ b/sw/source/ui/envelp/envfmt.hxx
@@ -83,7 +83,7 @@ class SwEnvFmtPage : public SfxTabPage
void SetMinMax();
- SfxItemSet *GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender);
+ SfxItemSet *GetCollItemSet(SwTxtFmtColl* pColl, sal_Bool bSender);
using Window::GetParent;
SwEnvDlg *GetParent() {return (SwEnvDlg*) SfxTabPage::GetParent()->GetParent();}
@@ -98,7 +98,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet* pSet = 0);
void FillItem(SwEnvItem& rItem);
- virtual BOOL FillItemSet(SfxItemSet& rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet& rSet);
virtual void Reset(const SfxItemSet& rSet);
};
diff --git a/sw/source/ui/envelp/envfmt.src b/sw/source/ui/envelp/envfmt.src
index d87223fee066..02ea2ea4487c 100644
--- a/sw/source/ui/envelp/envfmt.src
+++ b/sw/source/ui/envelp/envfmt.src
@@ -56,6 +56,7 @@ TabPage TP_ENV_FMT
};
MetricField FLD_ADDR_LEFT
{
+ HelpID = "sw:MetricField:TP_ENV_FMT:FLD_ADDR_LEFT";
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 25 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -80,6 +81,7 @@ TabPage TP_ENV_FMT
};
MetricField FLD_ADDR_TOP
{
+ HelpID = "sw:MetricField:TP_ENV_FMT:FLD_ADDR_TOP";
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 41 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -104,6 +106,7 @@ TabPage TP_ENV_FMT
};
MenuButton BTN_ADDR_EDIT
{
+ HelpID = "sw:MenuButton:TP_ENV_FMT:BTN_ADDR_EDIT";
Pos = MAP_APPFONT ( 194 , 24 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -131,6 +134,7 @@ TabPage TP_ENV_FMT
};
MetricField FLD_SEND_LEFT
{
+ HelpID = "sw:MetricField:TP_ENV_FMT:FLD_SEND_LEFT";
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 78 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -155,6 +159,7 @@ TabPage TP_ENV_FMT
};
MetricField FLD_SEND_TOP
{
+ HelpID = "sw:MetricField:TP_ENV_FMT:FLD_SEND_TOP";
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 94 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -179,6 +184,7 @@ TabPage TP_ENV_FMT
};
MenuButton BTN_SEND_EDIT
{
+ HelpID = "sw:MenuButton:TP_ENV_FMT:BTN_SEND_EDIT";
Pos = MAP_APPFONT ( 194 , 77 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "Edit" ;
@@ -199,6 +205,7 @@ TabPage TP_ENV_FMT
};
ListBox BOX_SIZE_FORMAT
{
+ HelpID = "sw:ListBox:TP_ENV_FMT:BOX_SIZE_FORMAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 120 ) ;
Size = MAP_APPFONT ( 40 , 72 ) ;
@@ -214,6 +221,7 @@ TabPage TP_ENV_FMT
};
MetricField FLD_SIZE_WIDTH
{
+ HelpID = "sw:MetricField:TP_ENV_FMT:FLD_SIZE_WIDTH";
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 136 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -238,6 +246,7 @@ TabPage TP_ENV_FMT
};
MetricField FLD_SIZE_HEIGHT
{
+ HelpID = "sw:MetricField:TP_ENV_FMT:FLD_SIZE_HEIGHT";
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 152 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
diff --git a/sw/source/ui/envelp/envimg.cxx b/sw/source/ui/envelp/envimg.cxx
index ae28dbb70552..d83deaa3eab2 100644
--- a/sw/source/ui/envelp/envimg.cxx
+++ b/sw/source/ui/envelp/envimg.cxx
@@ -47,7 +47,7 @@
#include <unomid.h>
-#ifdef WIN
+#ifdef WNT
#define NEXTLINE UniString::CreateFromAscii("\r\n")
#else
#define NEXTLINE '\n'
@@ -68,7 +68,7 @@ SW_DLLPUBLIC String MakeSender()
String sRet;
String sSenderToken(SW_RES(STR_SENDER_TOKENS));
xub_StrLen nSttPos = 0, nTokenCount = sSenderToken.GetTokenCount(';');
- BOOL bLastLength = TRUE;
+ sal_Bool bLastLength = sal_True;
for( xub_StrLen i = 0; i < nTokenCount; i++ )
{
String sToken = sSenderToken.GetToken( 0, ';', nSttPos );
@@ -82,7 +82,7 @@ SW_DLLPUBLIC String MakeSender()
{
if(bLastLength)
sRet +=NEXTLINE;
- bLastLength = TRUE;
+ bLastLength = sal_True;
}
else if(sToken.EqualsAscii("FIRSTNAME"))
sRet += (String)rUserOpt.GetFirstName();
@@ -108,7 +108,7 @@ SwEnvItem::SwEnvItem() :
SfxPoolItem(FN_ENVELOP)
{
aAddrText = aEmptyStr;
- bSend = TRUE;
+ bSend = sal_True;
aSendText = MakeSender();
lSendFromLeft = 566; // 1 cm
lSendFromTop = 566; // 1 cm
@@ -116,7 +116,7 @@ SwEnvItem::SwEnvItem() :
lWidth = aEnvSz.Width();
lHeight = aEnvSz.Height();
eAlign = ENV_HOR_LEFT;
- bPrintFromAbove = TRUE;
+ bPrintFromAbove = sal_True;
lShiftRight = 0;
lShiftDown = 0;
@@ -310,7 +310,7 @@ Sequence<rtl::OUString> SwEnvCfgItem::GetPropertyNames()
return aNames;
}
-bool SwEnvItem::QueryValue( Any& rVal, BYTE nMemberId ) const
+bool SwEnvItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
{
sal_Bool bRet = true;
switch(nMemberId & ~CONVERT_TWIPS)
@@ -335,7 +335,7 @@ bool SwEnvItem::QueryValue( Any& rVal, BYTE nMemberId ) const
return bRet;
}
-bool SwEnvItem::PutValue(const Any& rVal, BYTE nMemberId)
+bool SwEnvItem::PutValue(const Any& rVal, sal_uInt8 nMemberId)
{
bool bRet = false;
switch(nMemberId & ~CONVERT_TWIPS)
diff --git a/sw/source/ui/envelp/envlop.src b/sw/source/ui/envelp/envlop.src
index 951d1eb10ccc..32bc1856441b 100644
--- a/sw/source/ui/envelp/envlop.src
+++ b/sw/source/ui/envelp/envlop.src
@@ -85,6 +85,7 @@ TabPage TP_ENV_ENV
};
MultiLineEdit EDT_ADDR
{
+ HelpID = "sw:MultiLineEdit:TP_ENV_ENV:EDT_ADDR";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 124 , 66 ) ;
@@ -102,6 +103,7 @@ TabPage TP_ENV_ENV
};
ListBox LB_DATABASE
{
+ HelpID = "sw:ListBox:TP_ENV_ENV:LB_DATABASE";
Border = TRUE ;
Pos = MAP_APPFONT ( 162 , 17 ) ;
Size = MAP_APPFONT ( 82 , 50 ) ;
@@ -116,6 +118,7 @@ TabPage TP_ENV_ENV
};
ListBox LB_TABLE
{
+ HelpID = "sw:ListBox:TP_ENV_ENV:LB_TABLE";
Border = TRUE ;
Pos = MAP_APPFONT ( 162 , 44 ) ;
Size = MAP_APPFONT ( 82 , 50 ) ;
@@ -124,6 +127,7 @@ TabPage TP_ENV_ENV
};
ImageButton BTN_INSERT
{
+ HelpID = "sw:ImageButton:TP_ENV_ENV:BTN_INSERT";
Pos = MAP_APPFONT ( 137 , 71 ) ;
Size = MAP_APPFONT ( 18 , 12 ) ;
SYMBOL = IMAGEBUTTON_ARROW_LEFT ;
@@ -137,6 +141,7 @@ TabPage TP_ENV_ENV
};
ListBox LB_DBFIELD
{
+ HelpID = "sw:ListBox:TP_ENV_ENV:LB_DBFIELD";
Border = TRUE ;
Pos = MAP_APPFONT ( 162 , 71 ) ;
Size = MAP_APPFONT ( 82 , 50 ) ;
@@ -145,6 +150,7 @@ TabPage TP_ENV_ENV
};
CheckBox BOX_SEND
{
+ HelpID = "sw:CheckBox:TP_ENV_ENV:BOX_SEND";
Pos = MAP_APPFONT ( 6 , 105 ) ;
Size = MAP_APPFONT ( 124 , 8 ) ;
Text [ en-US ] = "~Sender" ;
@@ -152,6 +158,7 @@ TabPage TP_ENV_ENV
};
MultiLineEdit EDT_SEND
{
+ HelpID = "sw:MultiLineEdit:TP_ENV_ENV:EDT_SEND";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 116) ;
Size = MAP_APPFONT ( 124 , 63 ) ;
diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index 2e36634f8d8b..a0e4525f8df3 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -89,12 +89,12 @@ void SwEnvPreview::Paint(const Rectangle &)
const SwEnvItem& rItem =
((SwEnvDlg*) GetParent()->GetParent()->GetParent())->aEnvItem;
- USHORT nPageW = (USHORT) Max(rItem.lWidth, rItem.lHeight),
- nPageH = (USHORT) Min(rItem.lWidth, rItem.lHeight);
+ sal_uInt16 nPageW = (sal_uInt16) Max(rItem.lWidth, rItem.lHeight),
+ nPageH = (sal_uInt16) Min(rItem.lWidth, rItem.lHeight);
- float fx = static_cast< float >(GetOutputSizePixel().Width () / nPageW),
- fy = static_cast< float >(GetOutputSizePixel().Height() / nPageH),
- f = static_cast< float >(0.8 * ( fx < fy ? fx : fy ));
+ float fx = (float)GetOutputSizePixel().Width () / (float)nPageW,
+ fy = (float)GetOutputSizePixel().Height() / (float)nPageH,
+ f = 0.8f * ( fx < fy ? fx : fy );
Color aBack = rSettings.GetWindowColor( );
Color aFront = SwViewOption::GetFontColor();
@@ -106,8 +106,8 @@ void SwEnvPreview::Paint(const Rectangle &)
SetLineColor( aFront );
// Envelope
- long nW = (USHORT) (f * nPageW),
- nH = (USHORT) (f * nPageH),
+ long nW = (sal_uInt16) (f * nPageW),
+ nH = (sal_uInt16) (f * nPageH),
nX = (GetOutputSizePixel().Width () - nW) / 2,
nY = (GetOutputSizePixel().Height() - nH) / 2;
SetFillColor( aBack );
@@ -116,37 +116,37 @@ void SwEnvPreview::Paint(const Rectangle &)
// Sender
if (rItem.bSend)
{
- long nSendX = nX + (USHORT) (f * rItem.lSendFromLeft),
- nSendY = nY + (USHORT) (f * rItem.lSendFromTop ),
- nSendW = (USHORT) (f * (rItem.lAddrFromLeft - rItem.lSendFromLeft)),
- nSendH = (USHORT) (f * (rItem.lAddrFromTop - rItem.lSendFromTop - 566));
+ long nSendX = nX + (sal_uInt16) (f * rItem.lSendFromLeft),
+ nSendY = nY + (sal_uInt16) (f * rItem.lSendFromTop ),
+ nSendW = (sal_uInt16) (f * (rItem.lAddrFromLeft - rItem.lSendFromLeft)),
+ nSendH = (sal_uInt16) (f * (rItem.lAddrFromTop - rItem.lSendFromTop - 566));
SetFillColor( aMedium );
DrawRect(Rectangle(Point(nSendX, nSendY), Size(nSendW, nSendH)));
}
// Addressee
- long nAddrX = nX + (USHORT) (f * rItem.lAddrFromLeft),
- nAddrY = nY + (USHORT) (f * rItem.lAddrFromTop ),
- nAddrW = (USHORT) (f * (nPageW - rItem.lAddrFromLeft - 566)),
- nAddrH = (USHORT) (f * (nPageH - rItem.lAddrFromTop - 566));
+ long nAddrX = nX + (sal_uInt16) (f * rItem.lAddrFromLeft),
+ nAddrY = nY + (sal_uInt16) (f * rItem.lAddrFromTop ),
+ nAddrW = (sal_uInt16) (f * (nPageW - rItem.lAddrFromLeft - 566)),
+ nAddrH = (sal_uInt16) (f * (nPageH - rItem.lAddrFromTop - 566));
SetFillColor( aMedium );
DrawRect(Rectangle(Point(nAddrX, nAddrY), Size(nAddrW, nAddrH)));
// Stamp
- long nStmpW = (USHORT) (f * 1417 /* 2,5 cm */),
- nStmpH = (USHORT) (f * 1701 /* 3,0 cm */),
- nStmpX = nX + nW - (USHORT) (f * 566) - nStmpW,
- nStmpY = nY + (USHORT) (f * 566);
+ long nStmpW = (sal_uInt16) (f * 1417 /* 2,5 cm */),
+ nStmpH = (sal_uInt16) (f * 1701 /* 3,0 cm */),
+ nStmpX = nX + nW - (sal_uInt16) (f * 566) - nStmpW,
+ nStmpY = nY + (sal_uInt16) (f * 566);
SetFillColor( aBack );
DrawRect(Rectangle(Point(nStmpX, nStmpY), Size(nStmpW, nStmpH)));
}
SwEnvDlg::SwEnvDlg(Window* pParent, const SfxItemSet& rSet,
- SwWrtShell* pWrtSh, Printer* pPrt, BOOL bInsert) :
+ SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert) :
- SfxTabDialog(pParent, SW_RES(DLG_ENV), &rSet, FALSE, &aEmptyStr),
+ SfxTabDialog(pParent, SW_RES(DLG_ENV), &rSet, sal_False, &aEmptyStr),
sInsert(SW_RES(ST_INSERT)),
sChange(SW_RES(ST_CHANGE)),
aEnvItem((const SwEnvItem&) rSet.Get(FN_ENVELOP)),
@@ -177,7 +177,7 @@ SwEnvDlg::~SwEnvDlg()
delete pSenderSet;
}
-void SwEnvDlg::PageCreated(USHORT nId, SfxTabPage &rPage)
+void SwEnvDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage)
{
if (nId == TP_ENV_PRT)
{
@@ -248,7 +248,7 @@ SwEnvPage::~SwEnvPage()
IMPL_LINK( SwEnvPage, DatabaseHdl, ListBox *, pListBox )
{
- SwWait aWait( *pSh->GetView().GetDocShell(), TRUE );
+ SwWait aWait( *pSh->GetView().GetDocShell(), sal_True );
if (pListBox == &aDatabaseLB)
{
@@ -283,7 +283,7 @@ IMPL_LINK( SwEnvPage, FieldHdl, Button *, EMPTYARG )
IMPL_LINK( SwEnvPage, SenderHdl, Button *, EMPTYARG )
{
- const BOOL bEnable = aSenderBox.IsChecked();
+ const sal_Bool bEnable = aSenderBox.IsChecked();
GetParent()->aEnvItem.bSend = bEnable;
aSenderEdit.Enable(bEnable);
if ( bEnable )
@@ -348,11 +348,11 @@ void SwEnvPage::FillItem(SwEnvItem& rItem)
rItem.aSendText = aSenderEdit.GetText();
}
-BOOL SwEnvPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwEnvPage::FillItemSet(SfxItemSet& rSet)
{
FillItem(GetParent()->aEnvItem);
rSet.Put(GetParent()->aEnvItem);
- return TRUE;
+ return sal_True;
}
void SwEnvPage::Reset(const SfxItemSet& rSet)
diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx
index de01f9bfb57b..72b80d531a7d 100644
--- a/sw/source/ui/envelp/envprt.cxx
+++ b/sw/source/ui/envelp/envprt.cxx
@@ -66,7 +66,7 @@ SwEnvPrtPage::SwEnvPrtPage(Window* pParent, const SfxItemSet& rSet) :
SetExchangeSupport();
// Metrics
- FieldUnit eUnit = ::GetDfltMetric(FALSE);
+ FieldUnit eUnit = ::GetDfltMetric(sal_False);
SetMetric(aRightField, eUnit);
SetMetric(aDownField , eUnit);
@@ -136,15 +136,15 @@ IMPL_LINK( SwEnvPrtPage, AlignHdl, ToolBox *, EMPTYARG )
{
if (aAlignBox.GetCurItemId())
{
- for (USHORT i = ITM_HOR_LEFT; i <= ITM_VER_RGHT; i++)
- aAlignBox.CheckItem(i, FALSE);
- aAlignBox.CheckItem(aAlignBox.GetCurItemId(), TRUE);
+ for (sal_uInt16 i = ITM_HOR_LEFT; i <= ITM_VER_RGHT; i++)
+ aAlignBox.CheckItem(i, sal_False);
+ aAlignBox.CheckItem(aAlignBox.GetCurItemId(), sal_True);
}
else
{
// GetCurItemId() == 0 is possible!
const SwEnvItem& rItem = (const SwEnvItem&) GetItemSet().Get(FN_ENVELOP);
- aAlignBox.CheckItem((USHORT) rItem.eAlign + ITM_HOR_LEFT, TRUE);
+ aAlignBox.CheckItem((sal_uInt16) rItem.eAlign + ITM_HOR_LEFT, sal_True);
}
return 0;
}
@@ -169,8 +169,8 @@ int SwEnvPrtPage::DeactivatePage(SfxItemSet* _pSet)
void SwEnvPrtPage::FillItem(SwEnvItem& rItem)
{
- USHORT nID = 0;
- for (USHORT i = ITM_HOR_LEFT; i <= ITM_VER_RGHT && !nID; i++)
+ sal_uInt16 nID = 0;
+ for (sal_uInt16 i = ITM_HOR_LEFT; i <= ITM_VER_RGHT && !nID; i++)
if (aAlignBox.IsItemChecked(i))
nID = i;
@@ -180,18 +180,18 @@ void SwEnvPrtPage::FillItem(SwEnvItem& rItem)
rItem.lShiftDown = static_cast< sal_Int32 >(GetFldVal(aDownField ));
}
-BOOL SwEnvPrtPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwEnvPrtPage::FillItemSet(SfxItemSet& rSet)
{
FillItem(GetParent()->aEnvItem);
rSet.Put(GetParent()->aEnvItem);
- return TRUE;
+ return sal_True;
}
void SwEnvPrtPage::Reset(const SfxItemSet& rSet)
{
// Read item
const SwEnvItem& rItem = (const SwEnvItem&) rSet.Get(FN_ENVELOP);
- aAlignBox.CheckItem((USHORT) rItem.eAlign + ITM_HOR_LEFT);
+ aAlignBox.CheckItem((sal_uInt16) rItem.eAlign + ITM_HOR_LEFT);
if (rItem.bPrintFromAbove)
aTopButton .Check();
diff --git a/sw/source/ui/envelp/envprt.hxx b/sw/source/ui/envelp/envprt.hxx
index e309aa02c4c7..c5a8903dc66e 100644
--- a/sw/source/ui/envelp/envprt.hxx
+++ b/sw/source/ui/envelp/envprt.hxx
@@ -82,7 +82,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet* pSet = 0);
void FillItem(SwEnvItem& rItem);
- virtual BOOL FillItemSet(SfxItemSet& rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet& rSet);
virtual void Reset(const SfxItemSet& rSet);
inline void SetPrt(Printer* pPrinter) { pPrt = pPrinter; }
diff --git a/sw/source/ui/envelp/envprt.src b/sw/source/ui/envelp/envprt.src
index 7c971a7a5de7..706040970163 100644
--- a/sw/source/ui/envelp/envprt.src
+++ b/sw/source/ui/envelp/envprt.src
@@ -48,37 +48,38 @@ TabPage TP_ENV_PRT
ToolBoxItem
{
Identifier = ITM_HOR_LEFT ;
- HelpID = ITM_HOR_LEFT ;
+ HelpID = HID_ITM_HOR_LEFT ;
};
ToolBoxItem
{
Identifier = ITM_HOR_CNTR ;
- HelpID = ITM_HOR_CNTR ;
+ HelpID = HID_ITM_HOR_CNTR ;
};
ToolBoxItem
{
Identifier = ITM_HOR_RGHT ;
- HelpID = ITM_HOR_RGHT ;
+ HelpID = HID_ITM_HOR_RGHT ;
};
ToolBoxItem
{
Identifier = ITM_VER_LEFT ;
- HelpID = ITM_VER_LEFT ;
+ HelpID = HID_ITM_VER_LEFT ;
};
ToolBoxItem
{
Identifier = ITM_VER_CNTR ;
- HelpID = ITM_VER_CNTR ;
+ HelpID = HID_ITM_VER_CNTR ;
};
ToolBoxItem
{
Identifier = ITM_VER_RGHT ;
- HelpID = ITM_VER_RGHT ;
+ HelpID = HID_ITM_VER_RGHT ;
};
};
};
RadioButton BTN_TOP
{
+ HelpID = "sw:RadioButton:TP_ENV_PRT:BTN_TOP";
Pos = MAP_APPFONT ( 18 , 42 ) ;
Size = MAP_APPFONT ( 179 , 10 ) ;
Text [ en-US ] = "~Print from top" ;
@@ -88,6 +89,7 @@ TabPage TP_ENV_PRT
};
RadioButton BTN_BOTTOM
{
+ HelpID = "sw:RadioButton:TP_ENV_PRT:BTN_BOTTOM";
Pos = MAP_APPFONT ( 18 , 56 ) ;
Size = MAP_APPFONT ( 179 , 10 ) ;
Text [ en-US ] = "Print from ~bottom" ;
@@ -102,6 +104,7 @@ TabPage TP_ENV_PRT
};
MetricField FLD_RIGHT
{
+ HelpID = "sw:MetricField:TP_ENV_PRT:FLD_RIGHT";
Border = TRUE ;
Pos = MAP_APPFONT ( 86 , 72 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -126,6 +129,7 @@ TabPage TP_ENV_PRT
};
MetricField FLD_DOWN
{
+ HelpID = "sw:MetricField:TP_ENV_PRT:FLD_DOWN";
Border = TRUE ;
Pos = MAP_APPFONT ( 86 , 88 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -156,6 +160,7 @@ TabPage TP_ENV_PRT
};
PushButton BTN_PRTSETUP
{
+ HelpID = "sw:PushButton:TP_ENV_PRT:BTN_PRTSETUP";
Pos = MAP_APPFONT ( 198 , 114 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
diff --git a/sw/source/ui/envelp/label.src b/sw/source/ui/envelp/label.src
index 13081f7604a6..7d554d282e8f 100644
--- a/sw/source/ui/envelp/label.src
+++ b/sw/source/ui/envelp/label.src
@@ -109,6 +109,7 @@ TabPage TP_LAB_LAB
};
CheckBox BOX_ADDR
{
+ HelpID = "sw:CheckBox:TP_LAB_LAB:BOX_ADDR";
Pos = MAP_APPFONT ( 67 , 14 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
TabStop = TRUE ;
@@ -116,6 +117,7 @@ TabPage TP_LAB_LAB
};
MultiLineEdit EDT_WRITING
{
+ HelpID = "sw:MultiLineEdit:TP_LAB_LAB:EDT_WRITING";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 105 , 89 ) ;
@@ -133,6 +135,7 @@ TabPage TP_LAB_LAB
};
ListBox LB_DATABASE
{
+ HelpID = "sw:ListBox:TP_LAB_LAB:LB_DATABASE";
Border = TRUE ;
Pos = MAP_APPFONT ( 149 , 27 ) ;
Size = MAP_APPFONT ( 99 , 70 ) ;
@@ -147,6 +150,7 @@ TabPage TP_LAB_LAB
};
ListBox LB_TABLE
{
+ HelpID = "sw:ListBox:TP_LAB_LAB:LB_TABLE";
Border = TRUE ;
Pos = MAP_APPFONT ( 149 , 56 ) ;
Size = MAP_APPFONT ( 99 , 70 ) ;
@@ -155,6 +159,7 @@ TabPage TP_LAB_LAB
};
ImageButton BTN_INSERT
{
+ HelpID = "sw:ImageButton:TP_LAB_LAB:BTN_INSERT";
Pos = MAP_APPFONT ( 124 , 92 ) ;
Size = MAP_APPFONT ( 18 , 12 ) ;
SYMBOL = IMAGEBUTTON_ARROW_LEFT ;
@@ -168,6 +173,7 @@ TabPage TP_LAB_LAB
};
ListBox LB_DBFIELD
{
+ HelpID = "sw:ListBox:TP_LAB_LAB:LB_DBFIELD";
Border = TRUE ;
Pos = MAP_APPFONT ( 149 , 92 ) ;
Size = MAP_APPFONT ( 99 , 70 ) ;
@@ -183,6 +189,7 @@ TabPage TP_LAB_LAB
};
RadioButton BTN_CONT
{
+ HelpID = "sw:RadioButton:TP_LAB_LAB:BTN_CONT";
Pos = MAP_APPFONT ( 12 , 137 ) ;
Size = MAP_APPFONT ( 65 , 10 ) ;
TabStop = TRUE ;
@@ -191,6 +198,7 @@ TabPage TP_LAB_LAB
};
RadioButton BTN_SHEET
{
+ HelpID = "sw:RadioButton:TP_LAB_LAB:BTN_SHEET";
Pos = MAP_APPFONT ( 12 , 153 ) ;
Size = MAP_APPFONT ( 65 , 10 ) ;
Text [ en-US ] = "~Sheet" ;
@@ -204,6 +212,7 @@ TabPage TP_LAB_LAB
};
ListBox BOX_MAKE
{
+ HelpID = "sw:ListBox:TP_LAB_LAB:BOX_MAKE";
Border = TRUE ;
Pos = MAP_APPFONT ( 124 , 136 ) ;
Size = MAP_APPFONT ( 124 , 90 ) ;
@@ -219,6 +228,7 @@ TabPage TP_LAB_LAB
};
ListBox BOX_TYPE
{
+ HelpID = "sw:ListBox:TP_LAB_LAB:BOX_TYPE";
Border = TRUE ;
Pos = MAP_APPFONT ( 124 , 152 ) ;
Size = MAP_APPFONT ( 124 , 90 ) ;
@@ -254,6 +264,7 @@ FloatingWindow DLG_SYNC_BTN
Hide = TRUE ;
PushButton BTN_SYNC
{
+ HelpID = "sw:PushButton:DLG_SYNC_BTN:BTN_SYNC";
Pos = MAP_APPFONT ( 1 , 1 ) ;
Size = MAP_APPFONT ( WIDTH - 1 , HEIGHT - 1 ) ;
Text [ en-US ] = "Synchronize Labels" ;
@@ -290,6 +301,7 @@ TabPage TP_VISITING_CARDS
};
ListBox LB_AUTO_TEXT_GROUP
{
+ HelpID = "sw:ListBox:TP_VISITING_CARDS:LB_AUTO_TEXT_GROUP";
Pos = MAP_APPFONT ( 12 , 164) ;
Size = MAP_APPFONT ( 109 , 50 ) ;
Border = TRUE ;
@@ -331,18 +343,21 @@ TabPage TP_PRIVATE_DATA
};
Edit ED_FIRSTNAME
{
+ HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_FIRSTNAME";
Pos = MAP_APPFONT ( 105 , 14 ) ;
Size = MAP_APPFONT ( 55 , 12 ) ;
Border = TRUE ;
};
Edit ED_NAME
{
+ HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_NAME";
Pos = MAP_APPFONT ( 163 , 14 ) ;
Size = MAP_APPFONT ( 55 , 12 ) ;
Border = TRUE ;
};
Edit ED_SHORTCUT
{
+ HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_SHORTCUT";
Pos = MAP_APPFONT ( 221 , 14 ) ;
Size = MAP_APPFONT ( 27 , 12 ) ;
Border = TRUE ;
@@ -355,18 +370,21 @@ TabPage TP_PRIVATE_DATA
};
Edit ED_FIRSTNAME_2
{
+ HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_FIRSTNAME_2";
Pos = MAP_APPFONT ( 105 , 30 ) ;
Size = MAP_APPFONT ( 55 , 12 ) ;
Border = TRUE ;
};
Edit ED_NAME_2
{
+ HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_NAME_2";
Pos = MAP_APPFONT ( 163 , 30 ) ;
Size = MAP_APPFONT ( 55 , 12 ) ;
Border = TRUE ;
};
Edit ED_SHORTCUT_2
{
+ HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_SHORTCUT_2";
Pos = MAP_APPFONT ( 221 , 30 ) ;
Size = MAP_APPFONT ( 27 , 12 ) ;
Border = TRUE ;
@@ -379,6 +397,7 @@ TabPage TP_PRIVATE_DATA
};
Edit ED_STREET
{
+ HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_STREET";
Pos = MAP_APPFONT ( 105 , 46 ) ;
Size = MAP_APPFONT ( 143 , 12 ) ;
Border = TRUE ;
@@ -391,12 +410,14 @@ TabPage TP_PRIVATE_DATA
};
Edit ED_ZIP
{
+ HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_ZIP";
Pos = MAP_APPFONT ( 105 , 62 ) ;
Size = MAP_APPFONT ( 50 , 12 ) ;
Border = TRUE ;
};
Edit ED_CITY
{
+ HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_CITY";
Pos = MAP_APPFONT ( 158 , 62 ) ;
Size = MAP_APPFONT ( 90 , 12 ) ;
Border = TRUE ;
@@ -409,12 +430,14 @@ TabPage TP_PRIVATE_DATA
};
Edit ED_COUNTRY
{
+ HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_COUNTRY";
Pos = MAP_APPFONT ( 105 , 78 ) ;
Size = MAP_APPFONT ( 71 , 12 ) ;
Border = TRUE ;
};
Edit ED_STATE
{
+ HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_STATE";
Pos = MAP_APPFONT ( 179 , 78 ) ;
Size = MAP_APPFONT ( 69 , 12 ) ;
Border = TRUE ;
@@ -427,12 +450,14 @@ TabPage TP_PRIVATE_DATA
};
Edit ED_TITLE
{
+ HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_TITLE";
Pos = MAP_APPFONT ( 105 , 94 ) ;
Size = MAP_APPFONT ( 71 , 12 ) ;
Border = TRUE ;
};
Edit ED_PROFESSION
{
+ HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_PROFESSION";
Pos = MAP_APPFONT ( 179 , 94 ) ;
Size = MAP_APPFONT ( 69 , 12 ) ;
Border = TRUE ;
@@ -445,12 +470,14 @@ TabPage TP_PRIVATE_DATA
};
Edit ED_PHONE
{
+ HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_PHONE";
Pos = MAP_APPFONT ( 105 , 110 ) ;
Size = MAP_APPFONT ( 71 , 12 ) ;
Border = TRUE ;
};
Edit ED_MOBILE
{
+ HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_MOBILE";
Pos = MAP_APPFONT ( 179 , 110 ) ;
Size = MAP_APPFONT ( 69 , 12 ) ;
Border = TRUE ;
@@ -463,6 +490,7 @@ TabPage TP_PRIVATE_DATA
};
Edit ED_FAX
{
+ HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_FAX";
Pos = MAP_APPFONT ( 105 , 126 ) ;
Size = MAP_APPFONT ( 143 , 12 ) ;
Border = TRUE ;
@@ -475,12 +503,14 @@ TabPage TP_PRIVATE_DATA
};
Edit ED_WWW
{
+ HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_WWW";
Pos = MAP_APPFONT ( 105 , 142) ;
Size = MAP_APPFONT ( 71 , 12 ) ;
Border = TRUE ;
};
Edit ED_MAIL
{
+ HelpID = "sw:Edit:TP_PRIVATE_DATA:ED_MAIL";
Pos = MAP_APPFONT ( 179 , 142) ;
Size = MAP_APPFONT ( 69 , 12 ) ;
Border = TRUE ;
@@ -505,6 +535,7 @@ TabPage TP_BUSINESS_DATA
};
Edit ED_COMP
{
+ HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_COMP";
Pos = MAP_APPFONT ( 105 , 14) ;
Size = MAP_APPFONT ( 143 , 12 ) ;
Border = TRUE ;
@@ -517,6 +548,7 @@ TabPage TP_BUSINESS_DATA
};
Edit ED_COMP_EXT
{
+ HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_COMP_EXT";
Pos = MAP_APPFONT ( 105 , 30) ;
Size = MAP_APPFONT ( 143 , 12 ) ;
Border = TRUE ;
@@ -529,6 +561,7 @@ TabPage TP_BUSINESS_DATA
};
Edit ED_SLOGAN
{
+ HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_SLOGAN";
Pos = MAP_APPFONT ( 105 , 46) ;
Size = MAP_APPFONT ( 143 , 12 ) ;
Border = TRUE ;
@@ -541,6 +574,7 @@ TabPage TP_BUSINESS_DATA
};
Edit ED_STREET
{
+ HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_STREET";
Pos = MAP_APPFONT ( 105 , 62) ;
Size = MAP_APPFONT ( 143 , 12 ) ;
Border = TRUE ;
@@ -553,12 +587,14 @@ TabPage TP_BUSINESS_DATA
};
Edit ED_ZIP
{
+ HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_ZIP";
Pos = MAP_APPFONT ( 105 , 78) ;
Size = MAP_APPFONT ( 50 , 12 ) ;
Border = TRUE ;
};
Edit ED_CITY
{
+ HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_CITY";
Pos = MAP_APPFONT ( 158 , 78) ;
Size = MAP_APPFONT ( 90 , 12 ) ;
Border = TRUE ;
@@ -571,12 +607,14 @@ TabPage TP_BUSINESS_DATA
};
Edit ED_COUNTRY
{
+ HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_COUNTRY";
Pos = MAP_APPFONT ( 105 , 94) ;
Size = MAP_APPFONT ( 71 , 12 ) ;
Border = TRUE ;
};
Edit ED_STATE
{
+ HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_STATE";
Pos = MAP_APPFONT ( 179 , 94) ;
Size = MAP_APPFONT ( 69 , 12 ) ;
Border = TRUE ;
@@ -589,6 +627,7 @@ TabPage TP_BUSINESS_DATA
};
Edit ED_POSITION
{
+ HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_POSITION";
Pos = MAP_APPFONT ( 105 , 110) ;
Size = MAP_APPFONT ( 143 , 12 ) ;
Border = TRUE ;
@@ -601,12 +640,14 @@ TabPage TP_BUSINESS_DATA
};
Edit ED_PHONE
{
+ HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_PHONE";
Pos = MAP_APPFONT ( 105 , 126) ;
Size = MAP_APPFONT ( 71 , 12 ) ;
Border = TRUE ;
};
Edit ED_MOBILE
{
+ HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_MOBILE";
Pos = MAP_APPFONT ( 179 , 126) ;
Size = MAP_APPFONT ( 69 , 12 ) ;
Border = TRUE ;
@@ -619,6 +660,7 @@ TabPage TP_BUSINESS_DATA
};
Edit ED_FAX
{
+ HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_FAX";
Pos = MAP_APPFONT ( 105 , 142) ;
Size = MAP_APPFONT ( 143 , 12 ) ;
Border = TRUE ;
@@ -631,12 +673,14 @@ TabPage TP_BUSINESS_DATA
};
Edit ED_WWW
{
+ HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_WWW";
Pos = MAP_APPFONT ( 105 , 158) ;
Size = MAP_APPFONT ( 71 , 12 ) ;
Border = TRUE ;
};
Edit ED_MAIL
{
+ HelpID = "sw:Edit:TP_BUSINESS_DATA:ED_MAIL";
Pos = MAP_APPFONT ( 179 , 158) ;
Size = MAP_APPFONT ( 69 , 12 ) ;
Border = TRUE ;
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index a678231c908c..86ddf85552d8 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -247,6 +247,7 @@ SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& rSet) :
pNewDBMgr(NULL),
aItem ((const SwLabItem&) rSet.Get(FN_LABEL)),
+ aWritingFL (this, SW_RES(FL_WRITING)),
aWritingText (this, SW_RES(TXT_WRITING)),
aAddrBox (this, SW_RES(BOX_ADDR )),
aWritingEdit (this, SW_RES(EDT_WRITING)),
@@ -257,7 +258,7 @@ SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& rSet) :
aInsertBT (this, SW_RES(BTN_INSERT )),
aDBFieldFT (this, SW_RES(FT_DBFIELD )),
aDBFieldLB (this, SW_RES(LB_DBFIELD )),
- aWritingFL (this, SW_RES(FL_WRITING)),
+ aFormatFL (this, SW_RES(FL_FORMAT )),
aContButton (this, SW_RES(BTN_CONT )),
aSheetButton (this, SW_RES(BTN_SHEET )),
aMakeText (this, SW_RES(TXT_MAKE )),
@@ -265,9 +266,8 @@ SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& rSet) :
aTypeText (this, SW_RES(TXT_TYPE )),
aTypeBox (this, SW_RES(BOX_TYPE )),
aHiddenSortTypeBox(this, WB_SORT|WB_HIDE),
- aFormatInfo (this, SW_RES(INF_FORMAT )),
- aFormatFL (this, SW_RES(FL_FORMAT ))
-{
+ aFormatInfo (this, SW_RES(INF_FORMAT ))
+ {
WaitObject aWait( pParent );
FreeResource();
@@ -427,17 +427,17 @@ IMPL_LINK( SwLabPage, MakeHdl, ListBox *, EMPTYARG )
for ( sal_uInt16 i = 0; i < nCount; ++i )
{
const String aType ( GetParent()->Recs()[i]->aType );
- BOOL bInsert = FALSE;
+ sal_Bool bInsert = sal_False;
if ( GetParent()->Recs()[i]->aType == sCustom )
{
- bInsert = TRUE;
+ bInsert = sal_True;
aTypeBox.InsertEntry(aType );
}
else if ( GetParent()->Recs()[i]->bCont == bCont )
{
if ( aHiddenSortTypeBox.GetEntryPos(aType) == LISTBOX_ENTRY_NOTFOUND )
{
- bInsert = TRUE;
+ bInsert = sal_True;
aHiddenSortTypeBox.InsertEntry( aType );
}
}
@@ -471,7 +471,7 @@ IMPL_LINK_INLINE_END( SwLabPage, TypeHdl, ListBox *, EMPTYARG )
void SwLabPage::DisplayFormat()
{
MetricField aField(this, WinBits(0));
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric(aField, aMetric);
aField.SetDecimalDigits(2);
aField.SetMin (0);
@@ -636,16 +636,16 @@ void SwVisitingCardPage::SetUserData( sal_uInt32 nCnt,
SwVisitingCardPage::SwVisitingCardPage(Window* pParent, const SfxItemSet& rSet) :
SfxTabPage(pParent, SW_RES(TP_VISITING_CARDS), rSet),
+ aContentFL(this, SW_RES( FL_CONTENT )),
aAutoTextLB(this, SW_RES( LB_AUTO_TEXT )),
aAutoTextGroupFT(this, SW_RES( FT_AUTO_TEXT_GROUP )),
aAutoTextGroupLB(this, SW_RES( LB_AUTO_TEXT_GROUP )),
- aContentFL(this, SW_RES( FL_CONTENT )),
aExampleWIN(this, SW_RES( WIN_EXAMPLE )),
sVisCardGroup(SW_RES(ST_VISCARD_GROUP)),
pExampleFrame(0)
{
FreeResource();
- aAutoTextLB.SetWindowBits( WB_HSCROLL );
+ aAutoTextLB.SetStyle( aAutoTextLB.GetStyle() | WB_HSCROLL );
aAutoTextLB.SetSpaceBetweenEntries(0);
aAutoTextLB.SetSelectionMode( SINGLE_SELECTION );
aAutoTextLB.SetHelpId(HID_BUSINESS_CARD_CONTENT);
diff --git a/sw/source/ui/envelp/labelcfg.cxx b/sw/source/ui/envelp/labelcfg.cxx
index 45ceda1bf36c..4eb09d6008a5 100644
--- a/sw/source/ui/envelp/labelcfg.cxx
+++ b/sw/source/ui/envelp/labelcfg.cxx
@@ -91,8 +91,8 @@ SwLabRec* lcl_CreateSwLabRec(Sequence<Any>& rValues, const OUString& rManufactur
//except for the continuous flag ('C'/'S')
pValues[nProp] >>= sTmp;
String sMeasure(sTmp);
- USHORT nTokenCount = sMeasure.GetTokenCount(';');
- for(USHORT i = 0; i < nTokenCount; i++)
+ sal_uInt16 nTokenCount = sMeasure.GetTokenCount(';');
+ for(sal_uInt16 i = 0; i < nTokenCount; i++)
{
String sToken(sMeasure.GetToken(i, ';' ));
int nVal = sToken.ToInt32();
diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx
index 7f8bfcba0141..5e8bef108bb9 100644
--- a/sw/source/ui/envelp/labelexp.cxx
+++ b/sw/source/ui/envelp/labelexp.cxx
@@ -179,7 +179,7 @@ IMPL_LINK( SwVisitingCardPage, AutoTextSelectHdl, void*, pBox )
aBlockNames.getConstArray() );
}
if(pExampleFrame->IsInitialized())
- pExampleFrame->ClearDocument( TRUE );
+ pExampleFrame->ClearDocument( sal_True );
}
return 0;
}
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index 3ff1497c582e..4567ae74c747 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -54,7 +54,7 @@ using namespace ::com::sun::star::beans;
using ::rtl::OUString;
-#define ROUND(x) ((USHORT) ((x) + .5))
+#define ROUND(x) ((sal_uInt16) ((x) + .5))
SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) :
@@ -78,7 +78,7 @@ SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) :
SetBackground(Wallpaper(rWinColor));
Font aFont = GetFont();
- aFont.SetTransparent(TRUE);
+ aFont.SetTransparent(sal_True);
aFont.SetWeight (WEIGHT_NORMAL);
SetFont(aFont);
@@ -125,7 +125,7 @@ void SwLabPreview::Paint(const Rectangle &)
SetLineColor(rWinColor);
SetFillColor(aGrayColor);
Font aPaintFont(GetFont());
- aPaintFont.SetTransparent(FALSE);
+ aPaintFont.SetTransparent(sal_False);
SetFont(aPaintFont);
// size of region to be displayed
@@ -173,8 +173,8 @@ void SwLabPreview::Paint(const Rectangle &)
// Labels
SetClipRegion (Rectangle(Point(lX0, lY0), Size(lOutlineW, lOutlineH)));
SetFillColor(rWinColor);
- for (USHORT nRow = 0; nRow < Min((USHORT) 2, (USHORT) aItem.nRows); nRow++)
- for (USHORT nCol = 0; nCol < Min((USHORT) 2, (USHORT) aItem.nCols); nCol++)
+ for (sal_uInt16 nRow = 0; nRow < Min((sal_uInt16) 2, (sal_uInt16) aItem.nRows); nRow++)
+ for (sal_uInt16 nCol = 0; nCol < Min((sal_uInt16) 2, (sal_uInt16) aItem.nCols); nCol++)
DrawRect(Rectangle(
Point(ROUND(lX0 + f * (aItem.lLeft + nCol * aItem.lHDist)),
ROUND(lY0 + f * (aItem.lUpper + nRow * aItem.lVDist))),
@@ -186,15 +186,15 @@ void SwLabPreview::Paint(const Rectangle &)
if (aItem.lLeft)
{
long lX = (lX0 + lX1) / 2;
- DrawArrow(Point(lX0, lY0 - 5), Point(lX1, lY0 - 5), FALSE);
- DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), TRUE);
+ DrawArrow(Point(lX0, lY0 - 5), Point(lX1, lY0 - 5), sal_False);
+ DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), sal_True);
DrawText(Point(lX1 - lLeftWidth, lY0 - 10 - lXHeight), aLeftStr);
}
// annotation: upper border
if (aItem.lUpper)
{
- DrawArrow(Point(lX0 - 5, lY0), Point(lX0 - 5, lY1), FALSE);
+ DrawArrow(Point(lX0 - 5, lY0), Point(lX0 - 5, lY1), sal_False);
DrawText(Point(lX0 - 10 - lUpperWidth, ROUND(lY0 + f * aItem.lUpper / 2 - lXHeight / 2)), aUpperStr);
}
@@ -214,36 +214,36 @@ void SwLabPreview::Paint(const Rectangle &)
if (aItem.nCols > 1)
{
long lX = (lX1 + lX3) / 2;
- DrawArrow(Point(lX1, lY0 - 5), Point(lX3, lY0 - 5), FALSE);
- DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), TRUE);
+ DrawArrow(Point(lX1, lY0 - 5), Point(lX3, lY0 - 5), sal_False);
+ DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), sal_True);
DrawText(Point(lX - lHDistWidth / 2, lY0 - 10 - lXHeight), aHDistStr);
}
// annotation: vertical gap
if (aItem.nRows > 1)
{
- DrawArrow(Point(lX0 - 5, lY1), Point(lX0 - 5, lY3), FALSE);
+ DrawArrow(Point(lX0 - 5, lY1), Point(lX0 - 5, lY3), sal_False);
DrawText(Point(lX0 - 10 - lVDistWidth, ROUND(lY1 + f * aItem.lVDist / 2 - lXHeight / 2)), aVDistStr);
}
// annotation: columns
{
long lY = lY0 + lOutlineH + 4;
- DrawArrow(Point(lX0, lY), Point(lX0 + lOutlineW - 1, lY), TRUE);
+ DrawArrow(Point(lX0, lY), Point(lX0 + lOutlineW - 1, lY), sal_True);
DrawText(Point((lX0 + lX0 + lOutlineW - 1) / 2 - lColsWidth / 2, lY + 5), aColsStr);
}
// annotation: lines
{
long lX = lX0 + lOutlineW + 4;
- DrawArrow(Point(lX, lY0), Point(lX, lY0 + lOutlineH - 1), TRUE);
+ DrawArrow(Point(lX, lY0), Point(lX, lY0 + lOutlineH - 1), sal_True);
DrawText(Point(lX + 5, (lY0 + lY0 + lOutlineH - 1 - lXHeight / 2) / 2), aRowsStr);
}
}
// Arror or interval character --------------------------------------------
-void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, BOOL bArrow)
+void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, sal_Bool bArrow)
{
DrawLine(rP1, rP2);
@@ -324,14 +324,14 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
aRowsText (this, SW_RES(TXT_ROWS )),
aRowsField (this, SW_RES(FLD_ROWS )),
aSavePB (this, SW_RES(PB_SAVE )),
- bModified(FALSE),
+ bModified(sal_False),
aItem ((const SwLabItem&) rSet.Get(FN_LABEL))
{
FreeResource();
SetExchangeSupport();
// Metrics
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric(aHDistField , aMetric);
SetMetric(aVDistField , aMetric);
SetMetric(aWidthField , aMetric);
@@ -373,7 +373,7 @@ SwLabFmtPage::~SwLabFmtPage()
// Modify-handler of MetricFields. start preview timer
IMPL_LINK_INLINE_START( SwLabFmtPage, ModifyHdl, Edit *, EMPTYARG )
{
- bModified = TRUE;
+ bModified = sal_True;
aPreviewTimer.Start();
return 0;
}
@@ -477,7 +477,7 @@ int SwLabFmtPage::DeactivatePage(SfxItemSet* _pSet)
if (_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
void SwLabFmtPage::FillItem(SwLabItem& rItem)
@@ -493,17 +493,17 @@ void SwLabFmtPage::FillItem(SwLabItem& rItem)
rItem.lHeight = rRec.lHeight = static_cast< long >(GETFLDVAL(aHeightField));
rItem.lLeft = rRec.lLeft = static_cast< long >(GETFLDVAL(aLeftField ));
rItem.lUpper = rRec.lUpper = static_cast< long >(GETFLDVAL(aUpperField ));
- rItem.nCols = rRec.nCols = (USHORT) aColsField.GetValue();
- rItem.nRows = rRec.nRows = (USHORT) aRowsField.GetValue();
+ rItem.nCols = rRec.nCols = (sal_uInt16) aColsField.GetValue();
+ rItem.nRows = rRec.nRows = (sal_uInt16) aRowsField.GetValue();
}
}
-BOOL SwLabFmtPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwLabFmtPage::FillItemSet(SfxItemSet& rSet)
{
FillItem(aItem);
rSet.Put(aItem);
- return TRUE;
+ return sal_True;
}
void SwLabFmtPage::Reset(const SfxItemSet& )
@@ -544,18 +544,18 @@ IMPL_LINK( SwLabFmtPage, SaveHdl, PushButton *, EMPTYARG )
aRec.lHeight = static_cast< long >(GETFLDVAL(aHeightField));
aRec.lLeft = static_cast< long >(GETFLDVAL(aLeftField ));
aRec.lUpper = static_cast< long >(GETFLDVAL(aUpperField ));
- aRec.nCols = (USHORT) aColsField.GetValue();
- aRec.nRows = (USHORT) aRowsField.GetValue();
+ aRec.nCols = (sal_uInt16) aColsField.GetValue();
+ aRec.nRows = (sal_uInt16) aRowsField.GetValue();
aRec.bCont = aItem.bCont;
SwSaveLabelDlg* pSaveDlg = new SwSaveLabelDlg(this, aRec);
pSaveDlg->SetLabel(aItem.aLstMake, aItem.aLstType);
pSaveDlg->Execute();
if(pSaveDlg->GetLabel(aItem))
{
- bModified = FALSE;
+ bModified = sal_False;
const Sequence<OUString>& rMan = GetParent()->GetLabelsConfig().GetManufacturers();
SvStringsDtor& rMakes = GetParent()->Makes();
- if(rMakes.Count() < (USHORT)rMan.getLength())
+ if(rMakes.Count() < (sal_uInt16)rMan.getLength())
{
rMakes.DeleteAndDestroy(0, rMakes.Count());
const OUString* pMan = rMan.getConstArray();
diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx
index b0628ae7e61e..6019081157d1 100644
--- a/sw/source/ui/envelp/labfmt.hxx
+++ b/sw/source/ui/envelp/labfmt.hxx
@@ -67,7 +67,7 @@ class SwLabPreview : public Window
void Paint(const Rectangle&);
- void DrawArrow(const Point& rP1, const Point& rP2, BOOL bArrow);
+ void DrawArrow(const Point& rP1, const Point& rP2, sal_Bool bArrow);
using Window::GetParent;
SwLabFmtPage* GetParent() {return (SwLabFmtPage*) Window::GetParent();}
@@ -108,7 +108,7 @@ class SwLabFmtPage : public SfxTabPage
PushButton aSavePB;
Timer aPreviewTimer;
- BOOL bModified;
+ sal_Bool bModified;
SwLabItem aItem;
@@ -133,7 +133,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet* pSet = 0);
void FillItem(SwLabItem& rItem);
- virtual BOOL FillItemSet(SfxItemSet& rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet& rSet);
virtual void Reset(const SfxItemSet& rSet);
SwLabDlg* GetParent() {return (SwLabDlg*) SfxTabPage::GetParent()->GetParent();}
diff --git a/sw/source/ui/envelp/labfmt.src b/sw/source/ui/envelp/labfmt.src
index 2ad95e2b65a9..1d0c7b7cb557 100644
--- a/sw/source/ui/envelp/labfmt.src
+++ b/sw/source/ui/envelp/labfmt.src
@@ -60,6 +60,7 @@ TabPage TP_LAB_FMT
};
MetricField FLD_HDIST
{
+ HelpID = "sw:MetricField:TP_LAB_FMT:FLD_HDIST";
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 17 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -80,6 +81,7 @@ TabPage TP_LAB_FMT
};
MetricField FLD_VDIST
{
+ HelpID = "sw:MetricField:TP_LAB_FMT:FLD_VDIST";
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 33 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -100,6 +102,7 @@ TabPage TP_LAB_FMT
};
MetricField FLD_WIDTH
{
+ HelpID = "sw:MetricField:TP_LAB_FMT:FLD_WIDTH";
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 49 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -120,6 +123,7 @@ TabPage TP_LAB_FMT
};
MetricField FLD_HEIGHT
{
+ HelpID = "sw:MetricField:TP_LAB_FMT:FLD_HEIGHT";
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 65 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -140,6 +144,7 @@ TabPage TP_LAB_FMT
};
MetricField FLD_LEFT
{
+ HelpID = "sw:MetricField:TP_LAB_FMT:FLD_LEFT";
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 81 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -162,6 +167,7 @@ TabPage TP_LAB_FMT
};
MetricField FLD_UPPER
{
+ HelpID = "sw:MetricField:TP_LAB_FMT:FLD_UPPER";
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 97 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -184,6 +190,7 @@ TabPage TP_LAB_FMT
};
NumericField FLD_COLUMNS
{
+ HelpID = "sw:NumericField:TP_LAB_FMT:FLD_COLUMNS";
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 113 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -203,6 +210,7 @@ TabPage TP_LAB_FMT
};
NumericField FLD_ROWS
{
+ HelpID = "sw:NumericField:TP_LAB_FMT:FLD_ROWS";
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 129 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -215,6 +223,7 @@ TabPage TP_LAB_FMT
};
PushButton PB_SAVE
{
+ HelpID = "sw:PushButton:TP_LAB_FMT:PB_SAVE";
Pos = MAP_APPFONT ( 50 , 148 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Save...";
@@ -269,6 +278,7 @@ ModalDialog DLG_SAVE_LABEL
};
ComboBox CB_MAKE
{
+ HelpID = "sw:ComboBox:DLG_SAVE_LABEL:CB_MAKE";
Pos = MAP_APPFONT ( 65 , 15 ) ;
Size = MAP_APPFONT ( 100 , 50 ) ;
Border = TRUE;
@@ -283,6 +293,7 @@ ModalDialog DLG_SAVE_LABEL
};
Edit ED_TYPE
{
+ HelpID = "sw:Edit:DLG_SAVE_LABEL:ED_TYPE";
Pos = MAP_APPFONT ( 65 , 30 ) ;
Size = MAP_APPFONT ( 100 , 12 ) ;
Border = TRUE;
diff --git a/sw/source/ui/envelp/labimg.cxx b/sw/source/ui/envelp/labimg.cxx
index 7b01f4c0390a..48715c375ece 100644
--- a/sw/source/ui/envelp/labimg.cxx
+++ b/sw/source/ui/envelp/labimg.cxx
@@ -57,8 +57,8 @@ SwLabItem::SwLabItem() :
nCol (1),
nRow (1)
{
- bAddr = bCont = bSynchron = FALSE;
- bPage = TRUE;
+ bAddr = bCont = bSynchron = sal_False;
+ bPage = sal_True;
lHDist =
lVDist =
lWidth =
@@ -387,7 +387,7 @@ SwLabCfgItem::SwLabCfgItem(sal_Bool bLabel) :
aItem.aCompFax = aItem.aPrivFax = rUserOpt.GetFax();
aItem.aCompMail = aItem.aPrivMail = rUserOpt.GetEmail();
aItem.aCompState = aItem.aPrivState = rUserOpt.GetState();
- aItem.bSynchron = TRUE;
+ aItem.bSynchron = sal_True;
SetModified();
}
}
diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx
index 83b0c5b6aa1d..afabaf3cf234 100644
--- a/sw/source/ui/envelp/labprt.cxx
+++ b/sw/source/ui/envelp/labprt.cxx
@@ -51,6 +51,7 @@ SwLabPrtPage::SwLabPrtPage(Window* pParent, const SfxItemSet& rSet) :
SfxTabPage(pParent, SW_RES(TP_LAB_PRT), rSet),
pPrinter( 0 ),
+ aFLDontKnow (this, SW_RES(FL_DONTKNOW)),
aPageButton (this, SW_RES(BTN_PAGE )),
aSingleButton (this, SW_RES(BTN_SINGLE )),
aColText (this, SW_RES(TXT_COL )),
@@ -58,10 +59,9 @@ SwLabPrtPage::SwLabPrtPage(Window* pParent, const SfxItemSet& rSet) :
aRowText (this, SW_RES(TXT_ROW )),
aRowField (this, SW_RES(FLD_ROW )),
aSynchronCB (this, SW_RES(CB_SYNCHRON)),
- aFLDontKnow (this, SW_RES(FL_DONTKNOW)),
+ aFLPrinter (this, SW_RES(FL_PRINTER )),
aPrinterInfo (this, SW_RES(INF_PRINTER)),
- aPrtSetup (this, SW_RES(BTN_PRTSETUP)),
- aFLPrinter (this, SW_RES(FL_PRINTER ))
+ aPrtSetup (this, SW_RES(BTN_PRTSETUP))
{
FreeResource();
@@ -107,7 +107,7 @@ IMPL_LINK( SwLabPrtPage, CountHdl, Button *, pButton )
aPrinterInfo.SetText(pPrinter->GetName());
return 0;
}
- const BOOL bEnable = pButton == &aSingleButton;
+ const sal_Bool bEnable = pButton == &aSingleButton;
aColText .Enable(bEnable);
aColField.Enable(bEnable);
aRowText .Enable(bEnable);
@@ -138,25 +138,25 @@ int SwLabPrtPage::DeactivatePage(SfxItemSet* _pSet)
if ( _pSet )
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
void SwLabPrtPage::FillItem(SwLabItem& rItem)
{
rItem.bPage = aPageButton.IsChecked();
- rItem.nCol = (USHORT) aColField.GetValue();
- rItem.nRow = (USHORT) aRowField.GetValue();
+ rItem.nCol = (sal_uInt16) aColField.GetValue();
+ rItem.nRow = (sal_uInt16) aRowField.GetValue();
rItem.bSynchron = aSynchronCB.IsChecked() && aSynchronCB.IsEnabled();
}
-BOOL SwLabPrtPage::FillItemSet(SfxItemSet& rSet)
+sal_Bool SwLabPrtPage::FillItemSet(SfxItemSet& rSet)
{
SwLabItem aItem;
GetParent()->GetLabItem(aItem);
FillItem(aItem);
rSet.Put(aItem);
- return TRUE;
+ return sal_True;
}
void SwLabPrtPage::Reset(const SfxItemSet& )
diff --git a/sw/source/ui/envelp/labprt.hxx b/sw/source/ui/envelp/labprt.hxx
index 72f735fedf52..23f163d0a4b3 100644
--- a/sw/source/ui/envelp/labprt.hxx
+++ b/sw/source/ui/envelp/labprt.hxx
@@ -44,6 +44,7 @@ class SwLabPrtPage : public SfxTabPage
{
Printer* pPrinter; // for the shaft setting - unfortunately
+ FixedLine aFLDontKnow;
RadioButton aPageButton;
RadioButton aSingleButton;
FixedText aColText;
@@ -51,11 +52,10 @@ class SwLabPrtPage : public SfxTabPage
FixedText aRowText;
NumericField aRowField;
CheckBox aSynchronCB;
- FixedLine aFLDontKnow;
+ FixedLine aFLPrinter;
FixedInfo aPrinterInfo;
PushButton aPrtSetup;
- FixedLine aFLPrinter;
SwLabPrtPage(Window* pParent, const SfxItemSet& rSet);
~SwLabPrtPage();
@@ -75,7 +75,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet* pSet = 0);
void FillItem(SwLabItem& rItem);
- virtual BOOL FillItemSet(SfxItemSet& rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet& rSet);
virtual void Reset(const SfxItemSet& rSet);
inline Printer* GetPrt() { return (pPrinter); }
};
diff --git a/sw/source/ui/envelp/labprt.src b/sw/source/ui/envelp/labprt.src
index 4095b3af3750..35dac125468f 100644
--- a/sw/source/ui/envelp/labprt.src
+++ b/sw/source/ui/envelp/labprt.src
@@ -36,6 +36,7 @@ TabPage TP_LAB_PRT
Hide = TRUE ;
RadioButton BTN_PAGE
{
+ HelpID = "sw:RadioButton:TP_LAB_PRT:BTN_PAGE";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
TabStop = TRUE ;
@@ -44,6 +45,7 @@ TabPage TP_LAB_PRT
};
RadioButton BTN_SINGLE
{
+ HelpID = "sw:RadioButton:TP_LAB_PRT:BTN_SINGLE";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "~Single label" ;
@@ -57,6 +59,7 @@ TabPage TP_LAB_PRT
};
NumericField FLD_COL
{
+ HelpID = "sw:NumericField:TP_LAB_PRT:FLD_COL";
Border = TRUE ;
Pos = MAP_APPFONT ( 160 , 27 ) ;
Size = MAP_APPFONT ( 24 , 12 ) ;
@@ -76,6 +79,7 @@ TabPage TP_LAB_PRT
};
NumericField FLD_ROW
{
+ HelpID = "sw:NumericField:TP_LAB_PRT:FLD_ROW";
Border = TRUE ;
Pos = MAP_APPFONT ( 224 , 27 ) ;
Size = MAP_APPFONT ( 24 , 12 ) ;
@@ -88,6 +92,7 @@ TabPage TP_LAB_PRT
};
CheckBox CB_SYNCHRON
{
+ HelpID = "sw:CheckBox:TP_LAB_PRT:CB_SYNCHRON";
Pos = MAP_APPFONT ( 12 , 43 ) ;
Size = MAP_APPFONT ( 120 , 10 ) ;
TabStop = TRUE ;
@@ -108,6 +113,7 @@ TabPage TP_LAB_PRT
};
PushButton BTN_PRTSETUP
{
+ HelpID = "sw:PushButton:TP_LAB_PRT:BTN_PRTSETUP";
Pos = MAP_APPFONT ( 198 , 70 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index 735d86b7596f..90ee8072086e 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -215,16 +215,16 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
FreeResource();
aSingleJobsCB.Show(sal_False); // not supported in since cws printerpullpages anymore
//task #97066# mailing of form letters is currently not supported
- aMailingRB.Show(FALSE);
- aSubjectFT.Show(FALSE);
- aSubjectED.Show(FALSE);
- aFormatFT.Show(FALSE);
- aFormatSwCB.Show(FALSE);
- aFormatHtmlCB.Show(FALSE);
- aFormatRtfCB.Show(FALSE);
- aAttachFT.Show(FALSE);
- aAttachED.Show(FALSE);
- aAttachPB.Show(FALSE);
+ aMailingRB.Show(sal_False);
+ aSubjectFT.Show(sal_False);
+ aSubjectED.Show(sal_False);
+ aFormatFT.Show(sal_False);
+ aFormatSwCB.Show(sal_False);
+ aFormatHtmlCB.Show(sal_False);
+ aFormatRtfCB.Show(sal_False);
+ aAttachFT.Show(sal_False);
+ aAttachED.Show(sal_False);
+ aAttachPB.Show(sal_False);
Point aMailPos = aMailingRB.GetPosPixel();
Point aFilePos = aFileRB.GetPosPixel();
@@ -236,7 +236,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
m_aSelection = *pSelection;
//move all controls
long nDiff = aRecordFL.GetPosPixel().Y() - pBeamerWin->GetPosPixel().Y();
- pBeamerWin->Show(FALSE);
+ pBeamerWin->Show(sal_False);
::Size aSize = GetSizePixel();
aSize.Height() -= nDiff;
SetSizePixel(aSize);
@@ -339,7 +339,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
aFormatHtmlCB.Check((nMailingMode & TXTFORMAT_HTML) != 0);
aFormatRtfCB.Check((nMailingMode & TXTFORMAT_RTF) != 0);
- aAllRB.Check(TRUE);
+ aAllRB.Check(sal_True);
// Install handlers
Link aLk = LINK(this, SwMailMergeDlg, ButtonHdl);
@@ -360,7 +360,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
aLk = LINK(this, SwMailMergeDlg, FilenameHdl);
aGenerateFromDataBaseCB.SetClickHdl( aLk );
- BOOL bColumn = pModOpt->IsNameFromColumn();
+ sal_Bool bColumn = pModOpt->IsNameFromColumn();
if(bColumn)
aGenerateFromDataBaseCB.Check();
@@ -382,7 +382,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
pNewDBMgr->GetColumnNames(&aAddressFldLB, _xConnection, rTableName);
else
pNewDBMgr->GetColumnNames(&aAddressFldLB, rDBName, rTableName);
- for(USHORT nEntry = 0; nEntry < aAddressFldLB.GetEntryCount(); nEntry++)
+ for(sal_uInt16 nEntry = 0; nEntry < aAddressFldLB.GetEntryCount(); nEntry++)
aColumnLB.InsertEntry(aAddressFldLB.GetEntry(nEntry));
aAddressFldLB.SelectEntry(C2S("EMAIL"));
@@ -411,14 +411,14 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
if (aColumnLB.GetSelectEntryCount() == 0)
aColumnLB.SelectEntryPos(0);
- const BOOL bEnable = m_aSelection.getLength() != 0;
+ const sal_Bool bEnable = m_aSelection.getLength() != 0;
aMarkedRB.Enable(bEnable);
if (bEnable)
aMarkedRB.Check();
else
{
aAllRB.Check();
- aMarkedRB.Enable(FALSE);
+ aMarkedRB.Enable(sal_False);
}
SetMinOutputSizePixel(m_aDialogSize);
try
@@ -435,7 +435,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
const ::rtl::OUString sName(RTL_CONSTASCII_USTRINGPARAM("Name"));
const ::rtl::OUString sFlags(RTL_CONSTASCII_USTRINGPARAM("Flags"));
const ::rtl::OUString sUIName(RTL_CONSTASCII_USTRINGPARAM("UIName"));
- USHORT nODT = USHRT_MAX;
+ sal_uInt16 nODT = USHRT_MAX;
while(xList->hasMoreElements())
{
comphelper::SequenceAsHashMap aFilter(xList->nextElement());
@@ -456,7 +456,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
}
if( sUIName2.getLength() )
{
- USHORT nFilter = aFilterLB.InsertEntry( sUIName2 );
+ sal_uInt16 nFilter = aFilterLB.InsertEntry( sUIName2 );
if( 0 == sFilter.compareToAscii("writer8") )
nODT = nFilter;
aFilterLB.SetEntryData( nFilter, new ::rtl::OUString( sFilter ) );
@@ -479,7 +479,7 @@ SwMailMergeDlg::~SwMailMergeDlg()
else
delete pBeamerWin;
- for( USHORT nFilter = 0; nFilter < aFilterLB.GetEntryCount(); ++nFilter )
+ for( sal_uInt16 nFilter = 0; nFilter < aFilterLB.GetEntryCount(); ++nFilter )
{
::rtl::OUString* pData = reinterpret_cast< ::rtl::OUString* >( aFilterLB.GetEntryData(nFilter) );
delete pData;
@@ -651,7 +651,7 @@ IMPL_LINK( SwMailMergeDlg, SaveTypeHdl, RadioButton*, pBtn )
IMPL_LINK( SwMailMergeDlg, FilenameHdl, CheckBox*, pBox )
{
- BOOL bEnable = pBox->IsChecked();
+ sal_Bool bEnable = pBox->IsChecked();
aColumnFT.Enable( bEnable );
aColumnLB.Enable(bEnable);
aPathFT.Enable( bEnable );
@@ -687,7 +687,7 @@ bool SwMailMergeDlg::ExecQryShell()
}
else
{
- nMergeType = static_cast< USHORT >( aSaveSingleDocRB.IsChecked() ?
+ nMergeType = static_cast< sal_uInt16 >( aSaveSingleDocRB.IsChecked() ?
DBMGR_MERGE_SINGLE_FILE : DBMGR_MERGE_MAILFILES );
SfxMedium* pMedium = rSh.GetView().GetDocShell()->GetMedium();
INetURLObject aAbs;
@@ -738,7 +738,7 @@ bool SwMailMergeDlg::ExecQryShell()
m_aSelection.realloc(nEnd - nStart + 1);
Any* pSelection = m_aSelection.getArray();
- for (sal_Int32 i = nStart; i != nEnd; ++i, ++pSelection)
+ for (sal_Int32 i = nStart; i <= nEnd; ++i, ++pSelection)
*pSelection <<= i;
}
else if (aAllRB.IsChecked() )
@@ -763,17 +763,14 @@ bool SwMailMergeDlg::ExecQryShell()
}
}
}
- SwPrintData aPrtData = *SW_MOD()->GetPrtOptions(FALSE);
IDocumentDeviceAccess* pIDDA = rSh.getIDocumentDeviceAccess();
- SwPrintData* pShellPrintData = pIDDA->getPrintData();
- if(pShellPrintData)
- aPrtData = *pShellPrintData;
+ SwPrintData aPrtData( pIDDA->getPrintData() );
aPrtData.SetPrintSingleJobs(aSingleJobsCB.IsChecked());
pIDDA->setPrintData(aPrtData);
pModOpt->SetSinglePrintJob(aSingleJobsCB.IsChecked());
- BYTE nMailingMode = 0;
+ sal_uInt8 nMailingMode = 0;
if (aFormatSwCB.IsChecked())
nMailingMode |= TXTFORMAT_OFFICE;
diff --git a/sw/source/ui/envelp/mailmrge.src b/sw/source/ui/envelp/mailmrge.src
index 244662b4df54..bfce23e9eb2d 100644
--- a/sw/source/ui/envelp/mailmrge.src
+++ b/sw/source/ui/envelp/mailmrge.src
@@ -40,7 +40,7 @@ ModalDialog DLG_MAILMERGE
_MAIL_MERGE_STRING_
Moveable = TRUE ;
Sizeable = TRUE;
- HelpID = FN_QRY_MERGE ;
+ HelpID = CMD_FN_QRY_MERGE ;
Window WIN_BEAMER
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
@@ -48,6 +48,7 @@ ModalDialog DLG_MAILMERGE
};
RadioButton RB_ALL
{
+ HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_ALL";
Pos = MAP_APPFONT ( 12 , 97 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "~All" ;
@@ -55,6 +56,7 @@ ModalDialog DLG_MAILMERGE
};
RadioButton RB_MARKED
{
+ HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_MARKED";
Pos = MAP_APPFONT ( 12 , 110 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "~Selected records" ;
@@ -62,6 +64,7 @@ ModalDialog DLG_MAILMERGE
};
RadioButton RB_FROM
{
+ HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_FROM";
Pos = MAP_APPFONT ( 12 , 123 ) ;
Size = MAP_APPFONT ( 33 , 10 ) ;
Text [ en-US ] = "~From:" ;
@@ -69,6 +72,7 @@ ModalDialog DLG_MAILMERGE
};
NumericField NF_FROM
{
+ HelpID = "sw:NumericField:DLG_MAILMERGE:NF_FROM";
Border = TRUE ;
Pos = MAP_APPFONT ( 48 , 122 ) ;
Size = MAP_APPFONT ( 24 , 12 ) ;
@@ -86,6 +90,7 @@ ModalDialog DLG_MAILMERGE
};
NumericField NF_TO
{
+ HelpID = "sw:NumericField:DLG_MAILMERGE:NF_TO";
Border = TRUE ;
Pos = MAP_APPFONT ( 105 , 122 ) ;
Size = MAP_APPFONT ( 24 , 12 ) ;
@@ -102,6 +107,7 @@ ModalDialog DLG_MAILMERGE
};
RadioButton RB_PRINTER
{
+ HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_PRINTER";
Pos = MAP_APPFONT ( 144 , 97 ) ;
Size = MAP_APPFONT ( 53 , 10 ) ;
Check = TRUE ;
@@ -110,6 +116,7 @@ ModalDialog DLG_MAILMERGE
};
RadioButton RB_MAILING
{
+ HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_MAILING";
Pos = MAP_APPFONT ( 200 , 97 ) ;
Size = MAP_APPFONT ( 53 , 10 ) ;
TabStop = TRUE ;
@@ -117,6 +124,7 @@ ModalDialog DLG_MAILMERGE
};
RadioButton RB_FILE
{
+ HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_FILE";
Pos = MAP_APPFONT ( 256 , 97 ) ;
Size = MAP_APPFONT ( 56 , 10 ) ;
TabStop = TRUE ;
@@ -124,6 +132,7 @@ ModalDialog DLG_MAILMERGE
};
CheckBox CB_SINGLE_JOBS
{
+ HelpID = "sw:CheckBox:DLG_MAILMERGE:CB_SINGLE_JOBS";
Pos = MAP_APPFONT ( 150 , 112 ) ;
Size = MAP_APPFONT ( 142 , 10 ) ;
TabStop = TRUE ;
@@ -137,6 +146,7 @@ ModalDialog DLG_MAILMERGE
};
RadioButton RB_SAVE_SINGLE_DOC
{
+ HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_SAVE_SINGLE_DOC";
Pos = MAP_APPFONT ( 150, 139 ) ;
Size = MAP_APPFONT ( 150 , 10 ) ;
TabStop = TRUE ;
@@ -144,6 +154,7 @@ ModalDialog DLG_MAILMERGE
};
RadioButton RB_SAVE_INDIVIDUAL
{
+ HelpID = "sw:RadioButton:DLG_MAILMERGE:RB_SAVE_INDIVIDUAL";
Pos = MAP_APPFONT ( 150, 152 ) ;
Size = MAP_APPFONT ( 150 , 10 ) ;
TabStop = TRUE ;
@@ -151,6 +162,7 @@ ModalDialog DLG_MAILMERGE
};
CheckBox RB_GENERATE_FROM_DATABASE
{
+ HelpID = "sw:CheckBox:DLG_MAILMERGE:RB_GENERATE_FROM_DATABASE";
Pos = MAP_APPFONT ( 156, 168 ) ;
Size = MAP_APPFONT ( 144 , 10 ) ;
TabStop = TRUE ;
@@ -164,6 +176,7 @@ ModalDialog DLG_MAILMERGE
};
ListBox LB_COLUMN
{
+ HelpID = "sw:ListBox:DLG_MAILMERGE:LB_COLUMN";
Border = TRUE ;
Pos = MAP_APPFONT ( 205 , 182 ) ;
Size = MAP_APPFONT ( 103 , 84 ) ;
@@ -178,6 +191,7 @@ ModalDialog DLG_MAILMERGE
};
Edit ED_PATH
{
+ HelpID = "sw:Edit:DLG_MAILMERGE:ED_PATH";
Pos = MAP_APPFONT ( 205 , 198 ) ;
Size = MAP_APPFONT ( 86 , 12 ) ;
Border = TRUE ;
@@ -185,6 +199,7 @@ ModalDialog DLG_MAILMERGE
};
PushButton PB_PATH
{
+ HelpID = "sw:PushButton:DLG_MAILMERGE:PB_PATH";
Pos = MAP_APPFONT ( 294 , 198 ) ;
Size = MAP_APPFONT ( 14 , 12 ) ;
// Soll Groesse des Edits haben (12)!
@@ -199,6 +214,7 @@ ModalDialog DLG_MAILMERGE
};
ListBox LB_FILTER
{
+ HelpID = "sw:ListBox:DLG_MAILMERGE:LB_FILTER";
Border = TRUE ;
Pos = MAP_APPFONT ( 205 , 214 ) ;
Size = MAP_APPFONT ( 103 , 84 ) ;
@@ -208,6 +224,7 @@ ModalDialog DLG_MAILMERGE
};
ListBox LB_ADDRESSFLD
{
+ HelpID = "sw:ListBox:DLG_MAILMERGE:LB_ADDRESSFLD";
Border = TRUE ;
Pos = MAP_APPFONT ( 220 , 110 ) ;
Size = MAP_APPFONT ( 74 , 84 ) ;
@@ -225,6 +242,7 @@ ModalDialog DLG_MAILMERGE
};
Edit ED_SUBJECT
{
+ HelpID = "sw:Edit:DLG_MAILMERGE:ED_SUBJECT";
Border = TRUE ;
Pos = MAP_APPFONT ( 220 , 127 ) ;
Size = MAP_APPFONT ( 88 , 12 ) ;
@@ -240,6 +258,7 @@ ModalDialog DLG_MAILMERGE
};
Edit ED_ATTACH
{
+ HelpID = "sw:Edit:DLG_MAILMERGE:ED_ATTACH";
Border = TRUE ;
Pos = MAP_APPFONT ( 220 , 140 ) ;
Size = MAP_APPFONT ( 72 , 12 ) ;
@@ -249,6 +268,7 @@ ModalDialog DLG_MAILMERGE
};
PushButton PB_ATTACH
{
+ HelpID = "sw:PushButton:DLG_MAILMERGE:PB_ATTACH";
Pos = MAP_APPFONT ( 294 , 140 ) ;
Size = MAP_APPFONT ( 14 , 12 ) ;
// Soll Groesse des Edits haben (12)!
@@ -265,6 +285,7 @@ ModalDialog DLG_MAILMERGE
};
CheckBox CB_FORMAT_HTML
{
+ HelpID = "sw:CheckBox:DLG_MAILMERGE:CB_FORMAT_HTML";
Pos = MAP_APPFONT ( 220 , 156 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Disable = TRUE ;
@@ -273,6 +294,7 @@ ModalDialog DLG_MAILMERGE
};
CheckBox CB_FORMAT_RTF
{
+ HelpID = "sw:CheckBox:DLG_MAILMERGE:CB_FORMAT_RTF";
Pos = MAP_APPFONT ( 220 , 169 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Disable = TRUE ;
@@ -281,6 +303,7 @@ ModalDialog DLG_MAILMERGE
};
CheckBox CB_FORMAT_SW
{
+ HelpID = "sw:CheckBox:DLG_MAILMERGE:CB_FORMAT_SW";
Pos = MAP_APPFONT ( 220, 182 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Disable = TRUE ;
@@ -338,6 +361,7 @@ ModalDialog DLG_MERGE_CREATE
};
RadioButton RB_THISDOC
{
+ HelpID = "sw:RadioButton:DLG_MERGE_CREATE:RB_THISDOC";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Check = TRUE;
@@ -346,6 +370,7 @@ ModalDialog DLG_MERGE_CREATE
};
RadioButton RB_TEMPLATE
{
+ HelpID = "sw:RadioButton:DLG_MERGE_CREATE:RB_TEMPLATE";
Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
TabStop = TRUE ;
@@ -385,6 +410,7 @@ ModalDialog DLG_MERGE_FIELD_CONNECTIONS
};
RadioButton RB_USEEXISTING
{
+ HelpID = "sw:RadioButton:DLG_MERGE_FIELD_CONNECTIONS:RB_USEEXISTING";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 130 , 10 ) ;
Check = TRUE;
@@ -393,6 +419,7 @@ ModalDialog DLG_MERGE_FIELD_CONNECTIONS
};
RadioButton RB_CREATENEW
{
+ HelpID = "sw:RadioButton:DLG_MERGE_FIELD_CONNECTIONS:RB_CREATENEW";
Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 130 , 10 ) ;
TabStop = TRUE ;
diff --git a/sw/source/ui/envelp/makefile.mk b/sw/source/ui/envelp/makefile.mk
deleted file mode 100644
index cb38ffd84714..000000000000
--- a/sw/source/ui/envelp/makefile.mk
+++ /dev/null
@@ -1,79 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=envelp
-LIBTARGET=no
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES =\
- envelp.src \
- envfmt.src \
- envlop.src \
- envprt.src \
- label.src \
- labfmt.src \
- labprt.src \
- mailmrge.src
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/labimg.obj
-
-EXCEPTIONSFILES= \
- $(SLO)$/envfmt.obj \
- $(SLO)$/envimg.obj \
- $(SLO)$/envlop1.obj \
- $(SLO)$/envprt.obj \
- $(SLO)$/label1.obj \
- $(SLO)$/labelcfg.obj \
- $(SLO)$/labelexp.obj \
- $(SLO)$/labfmt.obj \
- $(SLO)$/labprt.obj \
- $(SLO)$/mailmrge.obj \
- $(SLO)$/syncbtn.obj
-
-LIB1TARGET = $(SLB)$/$(TARGET).lib
-
-LIB1OBJFILES = \
- $(SLO)$/envimg.obj \
- $(SLO)$/labelcfg.obj \
- $(SLO)$/labimg.obj \
- $(SLO)$/syncbtn.obj
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx
index fd248b19cbc5..2f3558341797 100644
--- a/sw/source/ui/envelp/swuilabimp.hxx
+++ b/sw/source/ui/envelp/swuilabimp.hxx
@@ -35,6 +35,7 @@ class SwLabPage : public SfxTabPage
String sActDBName;
SwLabItem aItem;
+ FixedLine aWritingFL;
FixedText aWritingText;
CheckBox aAddrBox;
MultiLineEdit aWritingEdit;
@@ -46,8 +47,8 @@ class SwLabPage : public SfxTabPage
FixedText aDBFieldFT;
ListBox aDBFieldLB;
// PushButton aDatabaseButton;
- FixedLine aWritingFL;
+ FixedLine aFormatFL;
RadioButton aContButton;
RadioButton aSheetButton;
FixedText aMakeText;
@@ -56,7 +57,6 @@ class SwLabPage : public SfxTabPage
ListBox aTypeBox;
ListBox aHiddenSortTypeBox;
FixedInfo aFormatInfo;
- FixedLine aFormatFL;
sal_Bool m_bLabel;
@@ -100,12 +100,11 @@ public:
class SwOneExampleFrame;
class SwVisitingCardPage : public SfxTabPage
{
+ FixedLine aContentFL;
SvTreeListBox aAutoTextLB;
FixedText aAutoTextGroupFT;
ListBox aAutoTextGroupLB;
- FixedLine aContentFL;
-
Window aExampleWIN;
String sVisCardGroup;
diff --git a/sw/source/ui/envelp/syncbtn.cxx b/sw/source/ui/envelp/syncbtn.cxx
index 2564392802e8..7998ea3ef264 100644
--- a/sw/source/ui/envelp/syncbtn.cxx
+++ b/sw/source/ui/envelp/syncbtn.cxx
@@ -48,7 +48,7 @@
SFX_IMPL_FLOATINGWINDOW( SwSyncChildWin, FN_SYNC_LABELS )
SwSyncChildWin::SwSyncChildWin( Window* _pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo ) :
SfxChildWindow( _pParent, nId )
diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx
index 330be8dce036..a5f2b6fe5bd3 100644
--- a/sw/source/ui/fldui/DropDownFieldDialog.cxx
+++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx
@@ -33,7 +33,6 @@
#undef SW_DLLIMPLEMENTATION
#endif
-
#include <wrtsh.hxx>
#include <fldbas.hxx>
#include <fldmgr.hxx>
@@ -50,7 +49,7 @@ using namespace ::com::sun::star;
Description: edit insert-field
--------------------------------------------------------------------*/
sw::DropDownFieldDialog::DropDownFieldDialog( Window *pParent, SwWrtShell &rS,
- SwField* pField, BOOL bNextButton ) :
+ SwField* pField, sal_Bool bNextButton ) :
SvxStandardDialog(pParent, SW_RES(DLG_FLD_DROPDOWN)),
aItemsFL( this, SW_RES( FL_ITEMS )),
@@ -94,7 +93,7 @@ sw::DropDownFieldDialog::DropDownFieldDialog( Window *pParent, SwWrtShell &rS,
aListItemsLB.SelectEntry(pDropField->GetSelectedItem());
}
- BOOL bEnable = !rSh.IsCrsrReadonly();
+ sal_Bool bEnable = !rSh.IsCrsrReadonly();
aOKPB.Enable( bEnable );
aListItemsLB.GrabFocus();
@@ -114,13 +113,12 @@ void sw::DropDownFieldDialog::Apply()
{
rSh.StartAllAction();
- SwDropDownField * pCopy = (SwDropDownField *) pDropField->Copy();
+ ::std::auto_ptr<SwDropDownField> const pCopy(
+ static_cast<SwDropDownField *>( pDropField->CopyField() ) );
pCopy->SetPar1(sSelect);
rSh.SwEditShell::UpdateFlds(*pCopy);
- delete pCopy;
-
rSh.SetUndoNoResetModified();
rSh.EndAllAction();
}
diff --git a/sw/source/ui/fldui/DropDownFieldDialog.src b/sw/source/ui/fldui/DropDownFieldDialog.src
index 407ee199a8ef..e84b3d73c854 100644
--- a/sw/source/ui/fldui/DropDownFieldDialog.src
+++ b/sw/source/ui/fldui/DropDownFieldDialog.src
@@ -45,6 +45,7 @@ ModalDialog DLG_FLD_DROPDOWN
};
ListBox LB_LISTITEMS
{
+ HelpID = "sw:ListBox:DLG_FLD_DROPDOWN:LB_LISTITEMS";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 115 , 99 ) ;
@@ -67,6 +68,7 @@ ModalDialog DLG_FLD_DROPDOWN
};
PushButton PB_NEXT
{
+ HelpID = "sw:PushButton:DLG_FLD_DROPDOWN:PB_NEXT";
Pos = MAP_APPFONT ( 139 , 40 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -81,6 +83,7 @@ ModalDialog DLG_FLD_DROPDOWN
};
PushButton PB_EDIT
{
+ HelpID = "sw:PushButton:DLG_FLD_DROPDOWN:PB_EDIT";
Pos = MAP_APPFONT ( 139 , 99 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index b90a8b9b7833..d1377bebd85e 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -99,7 +99,7 @@ SwChangeDBDlg::SwChangeDBDlg(SwView& rVw) :
aAddDBPB.SetClickHdl(LINK(this, SwChangeDBDlg, AddDBHdl));
aUsedDBTLB.SetSelectionMode(MULTIPLE_SELECTION);
- aUsedDBTLB.SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
+ aUsedDBTLB.SetStyle(aUsedDBTLB.GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
aUsedDBTLB.SetSpaceBetweenEntries(0);
aUsedDBTLB.SetNodeBitmaps( aImageList.GetImage(IMG_COLLAPSE), aImageList.GetImage(IMG_EXPAND));
@@ -144,12 +144,12 @@ void SwChangeDBDlg::FillDBPopup()
SvStringsDtor aDBNameList(5, 1);
pSh->GetAllUsedDB( aDBNameList, &aAllDBNames );
- USHORT nCount = aDBNameList.Count();
+ sal_uInt16 nCount = aDBNameList.Count();
aUsedDBTLB.Clear();
SvLBoxEntry *pFirst = 0;
SvLBoxEntry *pLast = 0;
- for (USHORT k = 0; k < nCount; k++)
+ for (sal_uInt16 k = 0; k < nCount; k++)
{
sDBName = *aDBNameList.GetObject(k);
sDBName = sDBName.GetToken(0);
@@ -174,8 +174,8 @@ SvLBoxEntry* SwChangeDBDlg::Insert(const String& rDBName)
SvLBoxEntry* pParent;
SvLBoxEntry* pChild;
- USHORT nParent = 0;
- USHORT nChild = 0;
+ sal_uInt16 nParent = 0;
+ sal_uInt16 nChild = 0;
Image aTableImg = aImageList.GetImage(IMG_DBTABLE);
Image aDBImg = aImageList.GetImage(IMG_DB);
@@ -220,7 +220,7 @@ void SwChangeDBDlg::Apply()
void SwChangeDBDlg::UpdateFlds()
{
- SvStringsDtor aDBNames( (BYTE)aUsedDBTLB.GetSelectionCount(), 1 );
+ SvStringsDtor aDBNames( (sal_uInt8)aUsedDBTLB.GetSelectionCount(), 1 );
SvLBoxEntry* pEntry = aUsedDBTLB.FirstSelected();
while( pEntry )
@@ -232,7 +232,7 @@ void SwChangeDBDlg::UpdateFlds()
*pTmp += DB_DELIM;
*pTmp += aUsedDBTLB.GetEntryText( pEntry );
*pTmp += DB_DELIM;
- int nCommandType = (int)(ULONG)pEntry->GetUserData();
+ int nCommandType = (int)(sal_uLong)pEntry->GetUserData();
*pTmp += String::CreateFromInt32(nCommandType);
aDBNames.Insert(pTmp, aDBNames.Count() );
}
@@ -268,14 +268,14 @@ IMPL_LINK( SwChangeDBDlg, ButtonHdl, Button *, EMPTYARG )
IMPL_LINK( SwChangeDBDlg, TreeSelectHdl, SvTreeListBox *, EMPTYARG )
{
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
SvLBoxEntry* pEntry = aAvailDBTLB.GetCurEntry();
if (pEntry)
{
if (aAvailDBTLB.GetParent(pEntry))
- bEnable = TRUE;
+ bEnable = sal_True;
aOKBT.Enable( bEnable );
}
return 0;
@@ -291,7 +291,7 @@ void SwChangeDBDlg::ShowDBName(const SwDBData& rDBData)
sTmp += '.';
sTmp += (String)rDBData.sCommand;
- for (USHORT i = 0; i < sTmp.Len(); i++)
+ for (sal_uInt16 i = 0; i < sTmp.Len(); i++)
{
sName += sTmp.GetChar(i);
if (sTmp.GetChar(i) == '~')
diff --git a/sw/source/ui/fldui/changedb.src b/sw/source/ui/fldui/changedb.src
index babf0b5bba13..7a67a360eda7 100644
--- a/sw/source/ui/fldui/changedb.src
+++ b/sw/source/ui/fldui/changedb.src
@@ -31,6 +31,7 @@
ModalDialog DLG_CHANGE_DB
{
+ HelpID = "sw:ModalDialog:DLG_CHANGE_DB";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 286 , 175 ) ;
@@ -74,6 +75,7 @@ ModalDialog DLG_CHANGE_DB
};
PushButton PB_ADDDB
{
+ HelpID = "sw:PushButton:DLG_CHANGE_DB:PB_ADDDB";
Pos = MAP_APPFONT ( 118 , 90 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "Browse..." ;
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 2a539af31764..9d1ac103ae29 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -55,7 +55,7 @@ SwFldDBPage::SwFldDBPage(Window* pParent, const SfxItemSet& rCoreSet ) :
aTypeFT (this, SW_RES(FT_DBTYPE)),
aTypeLB (this, SW_RES(LB_DBTYPE)),
aSelectionFT(this, SW_RES(FT_DBSELECTION)),
- aDatabaseTLB(this, SW_RES(TLB_DBLIST), 0, aEmptyStr, FALSE),
+ aDatabaseTLB(this, SW_RES(TLB_DBLIST), 0, aEmptyStr, sal_False),
aAddDBFT(this, SW_RES(FT_ADDDB)),
aAddDBPB(this, SW_RES(PB_ADDDB)),
aConditionFT(this, SW_RES(FT_DBCONDITION)),
@@ -92,13 +92,13 @@ void SwFldDBPage::Reset(const SfxItemSet&)
{
Init(); // Allgemeine initialisierung
- aTypeLB.SetUpdateMode(FALSE);
- USHORT nOldPos = aTypeLB.GetSelectEntryPos();
+ aTypeLB.SetUpdateMode(sal_False);
+ sal_uInt16 nOldPos = aTypeLB.GetSelectEntryPos();
sOldDBName = aDatabaseTLB.GetDBName(sOldTableName, sOldColumnName);
aTypeLB.Clear();
- USHORT nPos, nTypeId, i;
+ sal_uInt16 nPos, nTypeId, i;
if (!IsFldEdit())
{
@@ -125,11 +125,11 @@ void SwFldDBPage::Reset(const SfxItemSet&)
aFormatLB.Clear();
- USHORT nSize = GetFldMgr().GetFormatCount(TYP_DBSETNUMBERFLD, FALSE, IsFldDlgHtmlMode());
+ sal_uInt16 nSize = GetFldMgr().GetFormatCount(TYP_DBSETNUMBERFLD, sal_False, IsFldDlgHtmlMode());
for( i = 0; i < nSize; ++i )
{
- USHORT nEntryPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(TYP_DBSETNUMBERFLD, i));
- USHORT nFmtId = GetFldMgr().GetFormatId( TYP_DBSETNUMBERFLD, i );
+ sal_uInt16 nEntryPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(TYP_DBSETNUMBERFLD, i));
+ sal_uInt16 nFmtId = GetFldMgr().GetFormatId( TYP_DBSETNUMBERFLD, i );
aFormatLB.SetEntryData( nEntryPos, reinterpret_cast<void*>(nFmtId) );
if( SVX_NUM_ARABIC == nFmtId )
aFormatLB.SelectEntryPos( nEntryPos );
@@ -163,11 +163,11 @@ void SwFldDBPage::Reset(const SfxItemSet&)
if(sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1))
{
String sVal = sUserData.GetToken(1, ';');
- USHORT nVal = (USHORT)sVal.ToInt32();
+ sal_uInt16 nVal = (sal_uInt16)sVal.ToInt32();
if(nVal != USHRT_MAX)
{
for(i = 0; i < aTypeLB.GetEntryCount(); i++)
- if(nVal == (USHORT)(ULONG)aTypeLB.GetEntryData(i))
+ if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i))
{
aTypeLB.SelectEntryPos(i);
break;
@@ -177,7 +177,7 @@ void SwFldDBPage::Reset(const SfxItemSet&)
}
TypeHdl(0);
- aTypeLB.SetUpdateMode(TRUE);
+ aTypeLB.SetUpdateMode(sal_True);
aTypeLB.SetSelectHdl(LINK(this, SwFldDBPage, TypeHdl));
aTypeLB.SetDoubleClickHdl(LINK(this, SwFldDBPage, InsertHdl));
@@ -191,7 +191,7 @@ void SwFldDBPage::Reset(const SfxItemSet&)
}
}
-BOOL SwFldDBPage::FillItemSet(SfxItemSet& )
+sal_Bool SwFldDBPage::FillItemSet(SfxItemSet& )
{
String sTableName, sColumnName;
SwDBData aData;
@@ -208,11 +208,11 @@ BOOL SwFldDBPage::FillItemSet(SfxItemSet& )
if(aData.sDataSource.getLength()) // without database no new field command
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
String aVal(aValueED.GetText());
String aName(aConditionED.GetText());
- ULONG nFormat = 0;
- USHORT nSubType = 0;
+ sal_uLong nFormat = 0;
+ sal_uInt16 nSubType = 0;
String sDBName = aData.sDataSource;
sDBName += DB_DELIM;
@@ -237,7 +237,7 @@ BOOL SwFldDBPage::FillItemSet(SfxItemSet& )
break;
case TYP_DBSETNUMBERFLD:
- nFormat = (USHORT)(ULONG)aFormatLB.GetEntryData(
+ nFormat = (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(
aFormatLB.GetSelectEntryPos() );
break;
}
@@ -245,7 +245,7 @@ BOOL SwFldDBPage::FillItemSet(SfxItemSet& )
String sTempDBName, sTempTableName, sTempColumnName;
sTempDBName = aDatabaseTLB.GetDBName(sTempTableName, sTempColumnName);
- BOOL bDBListBoxChanged = sOldDBName != sTempDBName ||
+ sal_Bool bDBListBoxChanged = sOldDBName != sTempDBName ||
sOldTableName != sTempTableName || sOldColumnName != sTempColumnName;
if (!IsFldEdit() ||
aConditionED.GetSavedValue() != aConditionED.GetText() ||
@@ -257,7 +257,7 @@ BOOL SwFldDBPage::FillItemSet(SfxItemSet& )
}
}
- return FALSE;
+ return sal_False;
}
SfxTabPage* SwFldDBPage::Create( Window* pParent,
@@ -266,7 +266,7 @@ SfxTabPage* SwFldDBPage::Create( Window* pParent,
return ( new SwFldDBPage( pParent, rAttrSet ) );
}
-USHORT SwFldDBPage::GetGroup()
+sal_uInt16 SwFldDBPage::GetGroup()
{
return GRP_DB;
}
@@ -274,7 +274,7 @@ USHORT SwFldDBPage::GetGroup()
IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
{
// save old ListBoxPos
- const USHORT nOld = GetTypeSel();
+ const sal_uInt16 nOld = GetTypeSel();
// current ListBoxPos
SetTypeSel(aTypeLB.GetSelectEntryPos());
@@ -290,8 +290,8 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
SwWrtShell *pSh = GetWrtShell();
if(!pSh)
pSh = ::GetActiveWrtShell();
- BOOL bCond = FALSE, bSetNo = FALSE, bFormat = FALSE, bDBFormat = FALSE;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_Bool bCond = sal_False, bSetNo = sal_False, bFormat = sal_False, bDBFormat = sal_False;
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
aDatabaseTLB.ShowColumns(nTypeId == TYP_DBFLD);
@@ -314,8 +314,8 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
switch (nTypeId)
{
case TYP_DBFLD:
- bFormat = TRUE;
- bDBFormat = TRUE;
+ bFormat = sal_True;
+ bDBFormat = sal_True;
aNumFormatLB.Show();
aFormatLB.Hide();
@@ -335,10 +335,10 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
break;
case TYP_DBNUMSETFLD:
- bSetNo = TRUE;
+ bSetNo = sal_True;
// no break!
case TYP_DBNEXTSETFLD:
- bCond = TRUE;
+ bCond = sal_True;
if (IsFldEdit())
{
aConditionED.SetText(GetCurField()->GetPar1());
@@ -350,14 +350,14 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
break;
case TYP_DBSETNUMBERFLD:
- bFormat = TRUE;
+ bFormat = sal_True;
aNewFormatRB.Check();
aNumFormatLB.Hide();
aFormatLB.Show();
if( IsFldEdit() )
{
- for( USHORT nI = aFormatLB.GetEntryCount(); nI; )
- if( GetCurField()->GetFormat() == (USHORT)(ULONG)
+ for( sal_uInt16 nI = aFormatLB.GetEntryCount(); nI; )
+ if( GetCurField()->GetFormat() == (sal_uInt16)(sal_uLong)
aFormatLB.GetEntryData( --nI ))
{
aFormatLB.SelectEntryPos( nI );
@@ -385,7 +385,7 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox *, pBox )
aValueED.SetText(aEmptyStr);
if (bCond)
aConditionED.SetText( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "TRUE" )));
+ RTL_CONSTASCII_STRINGPARAM( "sal_True" )));
else
aConditionED.SetText(aEmptyStr);
}
@@ -406,8 +406,8 @@ IMPL_LINK( SwFldDBPage, NumSelectHdl, NumFormatListBox *, pLB )
void SwFldDBPage::CheckInsert()
{
- BOOL bInsert = TRUE;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_Bool bInsert = sal_True;
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
SvLBoxEntry* pEntry = aDatabaseTLB.GetCurEntry();
@@ -421,11 +421,11 @@ void SwFldDBPage::CheckInsert()
bInsert &= pEntry != 0;
}
else
- bInsert = FALSE;
+ bInsert = sal_False;
if (nTypeId == TYP_DBNUMSETFLD)
{
- BOOL bHasValue = aValueED.GetText().Len() != 0;
+ sal_Bool bHasValue = aValueED.GetText().Len() != 0;
bInsert &= bHasValue;
}
@@ -439,7 +439,7 @@ IMPL_LINK( SwFldDBPage, TreeSelectHdl, SvTreeListBox *, pBox )
SvLBoxEntry* pEntry = pColEntry = pBox->GetCurEntry();
if (pEntry)
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
pEntry = aDatabaseTLB.GetParent(pEntry);
@@ -450,13 +450,13 @@ IMPL_LINK( SwFldDBPage, TreeSelectHdl, SvTreeListBox *, pBox )
if (nTypeId == TYP_DBFLD)
{
- BOOL bNumFormat = FALSE;
+ sal_Bool bNumFormat = sal_False;
if (pEntry != 0)
{
String sTableName;
String sColumnName;
- BOOL bIsTable;
+ sal_Bool bIsTable;
String sDBName = aDatabaseTLB.GetDBName(sTableName, sColumnName, &bIsTable);
bNumFormat = GetFldMgr().IsDBNumeric(sDBName,
sTableName,
@@ -499,19 +499,19 @@ void SwFldDBPage::FillUserData()
String sData( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( USER_DATA_VERSION )));
sData += ';';
- USHORT nTypeSel = aTypeLB.GetSelectEntryPos();
+ sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
else
- nTypeSel = (USHORT)(ULONG)aTypeLB.GetEntryData( nTypeSel );
+ nTypeSel = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData( nTypeSel );
sData += String::CreateFromInt32( nTypeSel );
SetUserData(sData);
}
void SwFldDBPage::ActivateMailMergeAddress()
{
- ULONG nData = TYP_DBFLD;
+ sal_uLong nData = TYP_DBFLD;
aTypeLB.SelectEntryPos(aTypeLB.GetEntryPos( (const void*) nData ));
aTypeLB.GetSelectHdl().Call(&aTypeLB);
const SwDBData& rData = SW_MOD()->GetDBConfig()->GetAddressSource();
diff --git a/sw/source/ui/fldui/flddb.hxx b/sw/source/ui/fldui/flddb.hxx
index d473d6bf828f..07e76a171708 100644
--- a/sw/source/ui/fldui/flddb.hxx
+++ b/sw/source/ui/fldui/flddb.hxx
@@ -63,8 +63,8 @@ class SwFldDBPage : public SwFldPage
String sOldDBName;
String sOldTableName;
String sOldColumnName;
- ULONG nOldFormat;
- USHORT nOldSubType;
+ sal_uLong nOldFormat;
+ sal_uInt16 nOldSubType;
Link aOldNumSelectHdl;
DECL_LINK( TypeHdl, ListBox* );
@@ -78,7 +78,7 @@ class SwFldDBPage : public SwFldPage
using SwFldPage::SetWrtShell;
protected:
- virtual USHORT GetGroup();
+ virtual sal_uInt16 GetGroup();
public:
SwFldDBPage(Window* pParent, const SfxItemSet& rSet);
@@ -87,7 +87,7 @@ public:
static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void FillUserData();
diff --git a/sw/source/ui/fldui/flddb.src b/sw/source/ui/fldui/flddb.src
index ce9f3dd8a09a..6e715c455473 100644
--- a/sw/source/ui/fldui/flddb.src
+++ b/sw/source/ui/fldui/flddb.src
@@ -43,6 +43,7 @@ TabPage TP_FLD_DB
};
ListBox LB_DBTYPE
{
+ HelpID = "sw:ListBox:TP_FLD_DB:LB_DBTYPE";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 14 ) ;
Size = MAP_APPFONT ( 76 , 104 ) ;
@@ -67,6 +68,7 @@ TabPage TP_FLD_DB
};
Edit ED_DBCONDITION
{
+ HelpID = "sw:Edit:TP_FLD_DB:ED_DBCONDITION";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 137 ) ;
Size = MAP_APPFONT ( 76 , 12 ) ;
@@ -82,6 +84,7 @@ TabPage TP_FLD_DB
};
Edit ED_DBSETNUMBER
{
+ HelpID = "sw:Edit:TP_FLD_DB:ED_DBSETNUMBER";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 167 ) ;
Size = MAP_APPFONT ( 76 , 12 ) ;
@@ -110,6 +113,7 @@ TabPage TP_FLD_DB
};
PushButton PB_ADDDB
{
+ HelpID = "sw:PushButton:TP_FLD_DB:PB_ADDDB";
Pos = MAP_APPFONT ( 198 , 121) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "Browse..." ;
@@ -117,6 +121,7 @@ TabPage TP_FLD_DB
RadioButton RB_DBOWNFORMAT
{
+ HelpID = "sw:RadioButton:TP_FLD_DB:RB_DBOWNFORMAT";
Pos = MAP_APPFONT ( 94 , 153 ) ;
Size = MAP_APPFONT ( 150 , 10 ) ;
Check = TRUE ;
@@ -124,12 +129,14 @@ TabPage TP_FLD_DB
};
RadioButton RB_DBFORMAT
{
+ HelpID = "sw:RadioButton:TP_FLD_DB:RB_DBFORMAT";
Pos = MAP_APPFONT ( 94 , 166 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "User-defined" ;
};
ListBox LB_DBNUMFORMAT
{
+ HelpID = "sw:ListBox:TP_FLD_DB:LB_DBNUMFORMAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 195 , 164 ) ;
Size = MAP_APPFONT ( 53 , 60 ) ;
@@ -139,6 +146,7 @@ TabPage TP_FLD_DB
};
ListBox LB_DBFORMAT
{
+ HelpID = "sw:ListBox:TP_FLD_DB:LB_DBFORMAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 195 , 163 ) ;
Size = MAP_APPFONT ( 53 , 60 ) ;
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 941399238f52..9d29019bf3b1 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -81,16 +81,16 @@ SwFldDokInfPage::SwFldDokInfPage(Window* pWindow, const SfxItemSet& rCoreSet ) :
aTypeTLB.SetHelpId(HID_FIELD_DINF_TYPE);
aTypeTLB.SetSelectionMode(SINGLE_SELECTION);
- aTypeTLB.SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
+ aTypeTLB.SetStyle(aTypeTLB.GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
// Don't set font, so that the control's font is adobted!
// Otherwise at wrong font bug to OV.
aTypeTLB.SetSpaceBetweenEntries(0);
aTypeTLB.SetNodeDefaultImages();
//enable 'active' language selection
- aFormatLB.SetShowLanguageControl(TRUE);
+ aFormatLB.SetShowLanguageControl(sal_True);
- SFX_ITEMSET_ARG( &rCoreSet, pItem, SfxUnoAnyItem, SID_DOCINFO, FALSE );
+ SFX_ITEMSET_ARG( &rCoreSet, pItem, SfxUnoAnyItem, SID_DOCINFO, sal_False );
if ( pItem )
pItem->GetValue() >>= xCustomPropertySet;
}
@@ -104,17 +104,17 @@ void SwFldDokInfPage::Reset(const SfxItemSet& )
Init(); // general initialisation
// initialise TypeListBox
- aTypeTLB.SetUpdateMode(FALSE);
+ aTypeTLB.SetUpdateMode(sal_False);
aTypeTLB.Clear();
pSelEntry = 0;
// display SubTypes in TypeLB
- USHORT nTypeId = TYP_DOCINFOFLD;
+ sal_uInt16 nTypeId = TYP_DOCINFOFLD;
SvLBoxEntry* pEntry = 0;
SvLBoxEntry* pInfo = 0;
- USHORT nSubType = USHRT_MAX;
+ sal_uInt16 nSubType = USHRT_MAX;
if (IsFldEdit())
{
const SwField* pCurField = GetCurField();
@@ -133,17 +133,17 @@ void SwFldDokInfPage::Reset(const SfxItemSet& )
}
}
- USHORT nSelEntryData = USHRT_MAX;
+ sal_uInt16 nSelEntryData = USHRT_MAX;
String sUserData = GetUserData();
if(sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1))
{
String sVal = sUserData.GetToken(1, ';');
- nSelEntryData = static_cast< USHORT >(sVal.ToInt32());
+ nSelEntryData = static_cast< sal_uInt16 >(sVal.ToInt32());
}
SvStringsDtor aLst;
GetFldMgr().GetSubTypes(nTypeId, aLst);
- for (USHORT i = 0; i < aLst.Count(); ++i)
+ for (sal_uInt16 i = 0; i < aLst.Count(); ++i)
{
if (!IsFldEdit() || nSubType == i)
{
@@ -190,19 +190,19 @@ void SwFldDokInfPage::Reset(const SfxItemSet& )
if (pSelEntry != 0)
{
aTypeTLB.Select(pSelEntry);
- nSubType = (USHORT)(ULONG)pSelEntry->GetUserData();
+ nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData();
}
else if ( aTypeTLB.GetEntry(0) )
{
pSelEntry = aTypeTLB.GetEntry(0);
- nSubType = (USHORT)(ULONG)pSelEntry->GetUserData();
+ nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData();
}
FillSelectionLB(nSubType);
if ( pSelEntry )
TypeHdl();
- aTypeTLB.SetUpdateMode(TRUE);
+ aTypeTLB.SetUpdateMode(sal_True);
aTypeTLB.SetSelectHdl(LINK(this, SwFldDokInfPage, TypeHdl));
aTypeTLB.SetDoubleClickHdl(LINK(this, SwFldDokInfPage, InsertHdl));
aSelectionLB.SetSelectHdl(LINK(this, SwFldDokInfPage, SubTypeHdl));
@@ -233,7 +233,7 @@ IMPL_LINK( SwFldDokInfPage, TypeHdl, ListBox *, EMPTYARG )
else
if (pOldEntry != pSelEntry)
- FillSelectionLB((USHORT)(ULONG)pSelEntry->GetUserData());
+ FillSelectionLB((sal_uInt16)(sal_uLong)pSelEntry->GetUserData());
SubTypeHdl();
@@ -242,10 +242,10 @@ IMPL_LINK( SwFldDokInfPage, TypeHdl, ListBox *, EMPTYARG )
IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
{
- USHORT nSubType = (USHORT)(ULONG)pSelEntry->GetUserData();
- USHORT nPos = aSelectionLB.GetSelectEntryPos();
- USHORT nExtSubType;
- USHORT nNewType = 0;
+ sal_uInt16 nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData();
+ sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nExtSubType;
+ sal_uInt16 nNewType = 0;
if (nSubType != DI_EDIT)
{
@@ -254,8 +254,8 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
if (!aSelectionLB.GetEntryCount())
{
aFormatLB.Clear();
- aFormatLB.Enable(FALSE);
- aFormatFT.Enable(FALSE);
+ aFormatLB.Enable(sal_False);
+ aFormatFT.Enable(sal_False);
if( nSubType == DI_CUSTOM )
{
//find out which type the custom field has - for a start set to DATE format
@@ -287,14 +287,14 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
nPos = 0;
}
- nExtSubType = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
+ nExtSubType = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
}
else
nExtSubType = DI_SUB_TIME;
- USHORT nOldType = 0;
- BOOL bEnable = FALSE;
- BOOL bOneArea = FALSE;
+ sal_uInt16 nOldType = 0;
+ sal_Bool bEnable = sal_False;
+ sal_Bool bOneArea = sal_False;
if (aFormatLB.IsEnabled())
nOldType = aFormatLB.GetFormatType();
@@ -306,12 +306,12 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
case DI_SUB_DATE:
nNewType = NUMBERFORMAT_DATE;
- bOneArea = TRUE;
+ bOneArea = sal_True;
break;
case DI_SUB_TIME:
nNewType = NUMBERFORMAT_TIME;
- bOneArea = TRUE;
+ bOneArea = sal_True;
break;
}
if (!nNewType)
@@ -325,19 +325,19 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
aFormatLB.SetFormatType(nNewType);
aFormatLB.SetOneArea(bOneArea);
}
- bEnable = TRUE;
+ bEnable = sal_True;
}
- ULONG nFormat = IsFldEdit() ? ((SwDocInfoField*)GetCurField())->GetFormat() : 0;
+ sal_uLong nFormat = IsFldEdit() ? ((SwDocInfoField*)GetCurField())->GetFormat() : 0;
- USHORT nOldSubType = IsFldEdit() ? (((SwDocInfoField*)GetCurField())->GetSubType() & 0xff00) : 0;
+ sal_uInt16 nOldSubType = IsFldEdit() ? (((SwDocInfoField*)GetCurField())->GetSubType() & 0xff00) : 0;
if (IsFldEdit())
{
nPos = aSelectionLB.GetSelectEntryPos();
if (nPos != LISTBOX_ENTRY_NOTFOUND )
{
- nSubType = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
+ nSubType = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
nOldSubType &= ~DI_SUB_FIXED;
if (nOldSubType == nSubType)
@@ -375,10 +375,10 @@ IMPL_LINK( SwFldDokInfPage, SubTypeHdl, ListBox *, EMPTYARG )
return 0;
}
-USHORT SwFldDokInfPage::FillSelectionLB(USHORT nSubType)
+sal_uInt16 SwFldDokInfPage::FillSelectionLB(sal_uInt16 nSubType)
{
// fill Format-Listbox
- USHORT nTypeId = TYP_DOCINFOFLD;
+ sal_uInt16 nTypeId = TYP_DOCINFOFLD;
EnableInsert(nSubType != USHRT_MAX);
@@ -387,9 +387,9 @@ USHORT SwFldDokInfPage::FillSelectionLB(USHORT nSubType)
aSelectionLB.Clear();
- USHORT nSize = 0;
- USHORT nSelPos = USHRT_MAX;
- USHORT nExtSubType = IsFldEdit() ? (((SwDocInfoField*)GetCurField())->GetSubType() & 0xff00) : 0;
+ sal_uInt16 nSize = 0;
+ sal_uInt16 nSelPos = USHRT_MAX;
+ sal_uInt16 nExtSubType = IsFldEdit() ? (((SwDocInfoField*)GetCurField())->GetSubType() & 0xff00) : 0;
if (IsFldEdit())
{
@@ -403,24 +403,24 @@ USHORT SwFldDokInfPage::FillSelectionLB(USHORT nSubType)
}
else
{
- nSize = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode());
- for (USHORT i = 0; i < nSize; i++)
+ nSize = GetFldMgr().GetFormatCount(nTypeId, sal_False, IsFldDlgHtmlMode());
+ for (sal_uInt16 i = 0; i < nSize; i++)
{
- USHORT nPos = aSelectionLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
+ sal_uInt16 nPos = aSelectionLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId(nTypeId, i)));
if (IsFldEdit() && i == nExtSubType)
nSelPos = nPos;
}
}
- BOOL bEnable = nSize != 0;
+ sal_Bool bEnable = nSize != 0;
if (nSize)
{
if (!aSelectionLB.GetSelectEntryCount())
aSelectionLB.SelectEntryPos(nSelPos == USHRT_MAX ? 0 : nSelPos);
- bEnable = TRUE;
+ bEnable = sal_True;
}
aSelectionFT.Enable(bEnable);
@@ -429,24 +429,24 @@ USHORT SwFldDokInfPage::FillSelectionLB(USHORT nSubType)
return nSize;
}
-BOOL SwFldDokInfPage::FillItemSet(SfxItemSet& )
+sal_Bool SwFldDokInfPage::FillItemSet(SfxItemSet& )
{
- if (!pSelEntry || (USHORT)(ULONG)pSelEntry->GetUserData() == USHRT_MAX)
- return FALSE;
+ if (!pSelEntry || (sal_uInt16)(sal_uLong)pSelEntry->GetUserData() == USHRT_MAX)
+ return sal_False;
- USHORT nTypeId = TYP_DOCINFOFLD;
- USHORT nSubType = (USHORT)(ULONG)pSelEntry->GetUserData();
+ sal_uInt16 nTypeId = TYP_DOCINFOFLD;
+ sal_uInt16 nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData();
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
- USHORT nPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
::rtl::OUString aName;
if (DI_CUSTOM == nSubType)
aName = aTypeTLB.GetEntryText(pSelEntry);
if (nPos != LISTBOX_ENTRY_NOTFOUND)
- nSubType |= (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
+ nSubType |= (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
if (aFixedCB.IsChecked())
nSubType |= DI_SUB_FIXED;
@@ -463,7 +463,7 @@ BOOL SwFldDokInfPage::FillItemSet(SfxItemSet& )
' ', aFormatLB.IsAutomaticLanguage());
}
- return FALSE;
+ return sal_False;
}
SfxTabPage* SwFldDokInfPage::Create( Window* pParent,
@@ -472,7 +472,7 @@ SfxTabPage* SwFldDokInfPage::Create( Window* pParent,
return ( new SwFldDokInfPage( pParent, rAttrSet ) );
}
-USHORT SwFldDokInfPage::GetGroup()
+sal_uInt16 SwFldDokInfPage::GetGroup()
{
return GRP_REG;
}
@@ -483,7 +483,7 @@ void SwFldDokInfPage::FillUserData()
RTL_CONSTASCII_STRINGPARAM( USER_DATA_VERSION )));
sData += ';';
SvLBoxEntry* pEntry = aTypeTLB.FirstSelected();
- USHORT nTypeSel = pEntry ? sal::static_int_cast< USHORT >(reinterpret_cast< sal_uIntPtr >(pEntry->GetUserData())) : USHRT_MAX;
+ sal_uInt16 nTypeSel = pEntry ? sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(pEntry->GetUserData())) : USHRT_MAX;
sData += String::CreateFromInt32( nTypeSel );
SetUserData(sData);
}
diff --git a/sw/source/ui/fldui/flddinf.hxx b/sw/source/ui/fldui/flddinf.hxx
index ead747e26774..ac19388d5c9f 100644
--- a/sw/source/ui/fldui/flddinf.hxx
+++ b/sw/source/ui/fldui/flddinf.hxx
@@ -57,17 +57,17 @@ class SwFldDokInfPage : public SwFldPage
String aInfoStr;
- USHORT nOldSel;
- ULONG nOldFormat;
+ sal_uInt16 nOldSel;
+ sal_uLong nOldFormat;
::rtl::OUString m_sOldCustomFieldName;
DECL_LINK( TypeHdl, ListBox* pLB = 0 );
DECL_LINK( SubTypeHdl, ListBox* pLB = 0 );
- USHORT FillSelectionLB(USHORT nSubTypeId);
+ sal_uInt16 FillSelectionLB(sal_uInt16 nSubTypeId);
protected:
- virtual USHORT GetGroup();
+ virtual sal_uInt16 GetGroup();
public:
SwFldDokInfPage(Window* pWindow, const SfxItemSet& rSet);
@@ -76,7 +76,7 @@ public:
static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void FillUserData();
diff --git a/sw/source/ui/fldui/flddinf.src b/sw/source/ui/fldui/flddinf.src
index 8a3e86c4548b..824345a7162c 100644
--- a/sw/source/ui/fldui/flddinf.src
+++ b/sw/source/ui/fldui/flddinf.src
@@ -57,6 +57,7 @@ TabPage TP_FLD_DOKINF
};
ListBox LB_DOKINFSELECTION
{
+ HelpID = "sw:ListBox:TP_FLD_DOKINF:LB_DOKINFSELECTION";
Border = TRUE ;
Pos = MAP_APPFONT ( 88 , 16 ) ;
Size = MAP_APPFONT ( 76 , 163 ) ;
@@ -78,6 +79,7 @@ TabPage TP_FLD_DOKINF
};
ListBox LB_DOKINFFORMAT
{
+ HelpID = "sw:ListBox:TP_FLD_DOKINF:LB_DOKINFFORMAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 170 , 16 ) ;
Size = MAP_APPFONT ( 84 , 148 ) ;
@@ -86,6 +88,7 @@ TabPage TP_FLD_DOKINF
};
CheckBox CB_DOKINFFIXEDCONTENT
{
+ HelpID = "sw:CheckBox:TP_FLD_DOKINF:CB_DOKINFFIXEDCONTENT";
Pos = MAP_APPFONT ( 170 , 170 ) ;
Size = MAP_APPFONT ( 72 , 10 ) ;
TabStop = TRUE ;
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index 97e62218e85c..678d30eddb90 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -83,7 +83,7 @@ SwFldDokPage::SwFldDokPage(Window* pWindow, const SfxItemSet& rCoreSet ) :
aDateOffsetED.SetMin(LONG_MIN);
aDateOffsetED.SetMax(LONG_MAX);
//enable 'active' language selection
- aNumFormatLB.SetShowLanguageControl(TRUE);
+ aNumFormatLB.SetShowLanguageControl(sal_True);
}
SwFldDokPage::~SwFldDokPage()
@@ -98,11 +98,11 @@ void SwFldDokPage::Reset(const SfxItemSet& )
// initialise TypeListBox
const SwFldGroupRgn& rRg = GetFldMgr().GetGroupRange(IsFldDlgHtmlMode(), GetGroup());
- aTypeLB.SetUpdateMode(FALSE);
+ aTypeLB.SetUpdateMode(sal_False);
aTypeLB.Clear();
- USHORT nPos, nTypeId;
- BOOL bPage = FALSE;
+ sal_uInt16 nPos, nTypeId;
+ sal_Bool bPage = sal_False;
if (!IsFldEdit())
{
@@ -120,7 +120,7 @@ void SwFldDokPage::Reset(const SfxItemSet& )
{
nPos = aTypeLB.InsertEntry(SW_RESSTR(FMT_REF_PAGE));
aTypeLB.SetEntryData(nPos, (void*)USHRT_MAX);
- bPage = TRUE;
+ bPage = sal_True;
}
break;
@@ -156,7 +156,7 @@ void SwFldDokPage::Reset(const SfxItemSet& )
// select old Pos
RestorePos(&aTypeLB);
- aTypeLB.SetUpdateMode(TRUE);
+ aTypeLB.SetUpdateMode(sal_True);
aTypeLB.SetDoubleClickHdl(LINK(this, SwFldDokPage, InsertHdl));
aTypeLB.SetSelectHdl(LINK(this, SwFldDokPage, TypeHdl));
aFormatLB.SetSelectHdl(LINK(this, SwFldDokPage, FormatHdl));
@@ -167,11 +167,11 @@ void SwFldDokPage::Reset(const SfxItemSet& )
if( sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1 ))
{
String sVal = sUserData.GetToken(1, ';');
- USHORT nVal = static_cast< USHORT >(sVal.ToInt32());
+ sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.ToInt32());
if(nVal != USHRT_MAX)
{
- for(USHORT i = 0; i < aTypeLB.GetEntryCount(); i++)
- if(nVal == (USHORT)(ULONG)aTypeLB.GetEntryData(i))
+ for(sal_uInt16 i = 0; i < aTypeLB.GetEntryCount(); i++)
+ if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i))
{
aTypeLB.SelectEntryPos(i);
break;
@@ -195,7 +195,7 @@ void SwFldDokPage::Reset(const SfxItemSet& )
IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
{
// save old ListBoxPos
- const USHORT nOld = GetTypeSel();
+ const sal_uInt16 nOld = GetTypeSel();
// current ListBoxPos
SetTypeSel(aTypeLB.GetSelectEntryPos());
@@ -206,11 +206,11 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
aTypeLB.SelectEntryPos(0);
}
- USHORT nCount;
+ sal_uInt16 nCount;
if (nOld != GetTypeSel())
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
// fill Selection-Listbox
aSelectionLB.Clear();
@@ -223,11 +223,11 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
if (nTypeId != TYP_AUTHORFLD)
nCount = aLst.Count();
else
- nCount = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode());
+ nCount = GetFldMgr().GetFormatCount(nTypeId, sal_False, IsFldDlgHtmlMode());
- USHORT nPos;
+ sal_uInt16 nPos;
- for (USHORT i = 0; i < nCount; ++i)
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
if (!IsFldEdit())
{
@@ -240,7 +240,7 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
}
else
{
- BOOL bInsert = FALSE;
+ sal_Bool bInsert = sal_False;
switch (nTypeId)
{
@@ -273,7 +273,7 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
default:
if (*aLst[i] == GetCurField()->GetPar1())
- bInsert = TRUE;
+ bInsert = sal_True;
break;
}
if (bInsert)
@@ -291,12 +291,12 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
AddSubType(TYP_PAGENUMBERFLD);
AddSubType(TYP_PREVPAGEFLD);
AddSubType(TYP_NEXTPAGEFLD);
- nTypeId = (USHORT)(ULONG)aSelectionLB.GetEntryData(0);
+ nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(0);
nCount = 3;
aSelectionLB.SetSelectHdl(LINK(this, SwFldDokPage, SubTypeHdl));
}
- BOOL bEnable = nCount != 0;
+ sal_Bool bEnable = nCount != 0;
if (bEnable && !aSelectionLB.GetSelectEntryCount())
aSelectionLB.SelectEntryPos(0);
@@ -305,18 +305,18 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
aSelectionFT.Enable( bEnable );
// fill Format-Listbox
- USHORT nSize = FillFormatLB(nTypeId);
+ sal_uInt16 nSize = FillFormatLB(nTypeId);
- BOOL bValue = FALSE, bLevel = FALSE, bNumFmt = FALSE, bOffset = FALSE;
- BOOL bFormat = nSize != 0;
- BOOL bOneArea = FALSE;
- BOOL bFixed = FALSE;
- USHORT nFmtType = 0;
+ sal_Bool bValue = sal_False, bLevel = sal_False, bNumFmt = sal_False, bOffset = sal_False;
+ sal_Bool bFormat = nSize != 0;
+ sal_Bool bOneArea = sal_False;
+ sal_Bool bFixed = sal_False;
+ sal_uInt16 nFmtType = 0;
switch (nTypeId)
{
case TYP_DATEFLD:
- bFormat = bNumFmt = bOneArea = bOffset = TRUE;
+ bFormat = bNumFmt = bOneArea = bOffset = sal_True;
nFmtType = NUMBERFORMAT_DATE;
aValueFT.SetText(sDateOffset);
@@ -328,7 +328,7 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
break;
case TYP_TIMEFLD:
- bFormat = bNumFmt = bOneArea = bOffset = TRUE;
+ bFormat = bNumFmt = bOneArea = bOffset = sal_True;
nFmtType = NUMBERFORMAT_TIME;
aValueFT.SetText(sTimeOffset);
@@ -343,13 +343,13 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
case TYP_NEXTPAGEFLD:
if (IsFldEdit())
{
- USHORT nTmp = (USHORT)(ULONG)aFormatLB.GetEntryData(
+ sal_uInt16 nTmp = (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(
aFormatLB.GetSelectEntryPos() );
String sOldTxt(aValueFT.GetText());
if(SVX_NUM_CHAR_SPECIAL != nTmp)
{
- INT32 nOff = GetCurField()->GetPar2().ToInt32();
+ sal_Int32 nOff = GetCurField()->GetPar2().ToInt32();
if( TYP_NEXTPAGEFLD == nTypeId && 1 != nOff )
aValueED.SetText(
String::CreateFromInt32(nOff - 1) );
@@ -362,27 +362,27 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
else
aValueED.SetText(((SwPageNumberField*)GetCurField())->GetUserString());
}
- bValue = TRUE;
+ bValue = sal_True;
break;
case TYP_CHAPTERFLD:
aValueFT.SetText(SW_RESSTR(STR_LEVEL));
if (IsFldEdit())
aLevelED.SetText(String::CreateFromInt32(((SwChapterField*)GetCurField())->GetLevel() + 1));
- bLevel = TRUE;
+ bLevel = sal_True;
break;
case TYP_PAGENUMBERFLD:
aValueFT.SetText( SW_RESSTR( STR_OFFSET ));
if (IsFldEdit())
aValueED.SetText(GetCurField()->GetPar2());
- bValue = TRUE;
+ bValue = sal_True;
break;
case TYP_EXTUSERFLD:
case TYP_AUTHORFLD:
case TYP_FILENAMEFLD:
- bFixed = TRUE;
+ bFixed = sal_True;
break;
default:
@@ -435,7 +435,7 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
aFixedCB.Enable(bFixed);
if (IsFldEdit())
- aFixedCB.Check( static_cast< BOOL >(((GetCurField()->GetFormat() & AF_FIXED) != 0) & bFixed));
+ aFixedCB.Check( static_cast< sal_Bool >(((GetCurField()->GetFormat() & AF_FIXED) != 0) & bFixed));
if (aNumFormatLB.GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND)
aNumFormatLB.SelectEntryPos(0);
@@ -446,22 +446,22 @@ IMPL_LINK( SwFldDokPage, TypeHdl, ListBox *, EMPTYARG )
return 0;
}
-void SwFldDokPage::AddSubType(USHORT nTypeId)
+void SwFldDokPage::AddSubType(sal_uInt16 nTypeId)
{
- USHORT nPos = aSelectionLB.InsertEntry(SwFieldType::GetTypeStr(nTypeId));
+ sal_uInt16 nPos = aSelectionLB.InsertEntry(SwFieldType::GetTypeStr(nTypeId));
aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(nTypeId));
}
IMPL_LINK( SwFldDokPage, SubTypeHdl, ListBox *, EMPTYARG )
{
- USHORT nPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
if(nPos == LISTBOX_ENTRY_NOTFOUND)
nPos = 0;
- USHORT nTypeId = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
FillFormatLB(nTypeId);
- USHORT nTextRes = 0;
+ sal_uInt16 nTextRes = 0;
switch (nTypeId)
{
case TYP_CHAPTERFLD:
@@ -470,7 +470,7 @@ IMPL_LINK( SwFldDokPage, SubTypeHdl, ListBox *, EMPTYARG )
case TYP_PREVPAGEFLD:
case TYP_NEXTPAGEFLD:
- nTextRes = SVX_NUM_CHAR_SPECIAL == (USHORT)(ULONG)aFormatLB.GetEntryData(
+ nTextRes = SVX_NUM_CHAR_SPECIAL == (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(
aFormatLB.GetSelectEntryPos() )
? STR_VALUE : STR_OFFSET;
break;
@@ -486,7 +486,7 @@ IMPL_LINK( SwFldDokPage, SubTypeHdl, ListBox *, EMPTYARG )
return 0;
}
-USHORT SwFldDokPage::FillFormatLB(USHORT nTypeId)
+sal_uInt16 SwFldDokPage::FillFormatLB(sal_uInt16 nTypeId)
{
// fill Format-Listbox
aFormatLB.Clear();
@@ -494,12 +494,12 @@ USHORT SwFldDokPage::FillFormatLB(USHORT nTypeId)
if (nTypeId == TYP_AUTHORFLD)
return aFormatLB.GetEntryCount();
- USHORT nSize = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode());
+ sal_uInt16 nSize = GetFldMgr().GetFormatCount(nTypeId, sal_False, IsFldDlgHtmlMode());
- for( USHORT i = 0; i < nSize; ++i )
+ for( sal_uInt16 i = 0; i < nSize; ++i )
{
- USHORT nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
- USHORT nFmtId = GetFldMgr().GetFormatId( nTypeId, i );
+ sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
+ sal_uInt16 nFmtId = GetFldMgr().GetFormatId( nTypeId, i );
aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>( nFmtId ));
if (IsFldEdit() && nFmtId == (GetCurField()->GetFormat() & ~AF_FIXED))
aFormatLB.SelectEntryPos( nPos );
@@ -523,21 +523,21 @@ USHORT SwFldDokPage::FillFormatLB(USHORT nTypeId)
IMPL_LINK( SwFldDokPage, FormatHdl, ListBox *, EMPTYARG )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
if (nTypeId == USHRT_MAX)
{
- USHORT nPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
if(nPos == LISTBOX_ENTRY_NOTFOUND)
nPos = 0;
- nTypeId = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
+ nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
}
if (nTypeId == TYP_NEXTPAGEFLD || nTypeId == TYP_PREVPAGEFLD)
{
// Prev/Next - PageNumFields special treatment:
- USHORT nTmp = (USHORT)(ULONG)aFormatLB.GetEntryData(
+ sal_uInt16 nTmp = (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(
aFormatLB.GetSelectEntryPos() );
String sOldTxt( aValueFT.GetText() );
String sNewTxt( SW_RES( SVX_NUM_CHAR_SPECIAL == nTmp ? STR_VALUE
@@ -553,34 +553,34 @@ IMPL_LINK( SwFldDokPage, FormatHdl, ListBox *, EMPTYARG )
return 0;
}
-BOOL SwFldDokPage::FillItemSet(SfxItemSet& )
+sal_Bool SwFldDokPage::FillItemSet(SfxItemSet& )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
if (nTypeId == USHRT_MAX)
{
- USHORT nPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
if(nPos == LISTBOX_ENTRY_NOTFOUND)
nPos = 0;
- nTypeId = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
+ nTypeId = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
}
String aVal(aValueED.GetText());
- ULONG nFormat = 0;
- USHORT nSubType = 0;
+ sal_uLong nFormat = 0;
+ sal_uInt16 nSubType = 0;
if (aFormatLB.IsEnabled())
{
- USHORT nPos = aFormatLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aFormatLB.GetSelectEntryPos();
if(nPos != LISTBOX_ENTRY_NOTFOUND)
- nFormat = (USHORT)(ULONG)aFormatLB.GetEntryData(nPos);
+ nFormat = (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(nPos);
}
if (aSelectionLB.IsEnabled())
{
- USHORT nPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
if(nPos != LISTBOX_ENTRY_NOTFOUND)
- nSubType = (USHORT)(ULONG)aSelectionLB.GetEntryData(nPos);
+ nSubType = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
}
switch (nTypeId)
@@ -617,7 +617,7 @@ BOOL SwFldDokPage::FillItemSet(SfxItemSet& )
if( SVX_NUM_CHAR_SPECIAL != nFormat &&
(TYP_PREVPAGEFLD == nTypeId || TYP_NEXTPAGEFLD == nTypeId))
{
- INT32 nVal = aValueED.GetText().ToInt32();
+ sal_Int32 nVal = aValueED.GetText().ToInt32();
aVal = String::CreateFromInt32(nVal);
}
break;
@@ -642,7 +642,7 @@ BOOL SwFldDokPage::FillItemSet(SfxItemSet& )
InsertFld( nTypeId, nSubType, aEmptyStr, aVal, nFormat, ' ', aNumFormatLB.IsAutomaticLanguage() );
}
- return FALSE;
+ return sal_False;
}
SfxTabPage* SwFldDokPage::Create( Window* pParent,
@@ -651,7 +651,7 @@ SfxTabPage* SwFldDokPage::Create( Window* pParent,
return ( new SwFldDokPage( pParent, rAttrSet ) );
}
-USHORT SwFldDokPage::GetGroup()
+sal_uInt16 SwFldDokPage::GetGroup()
{
return GRP_DOC;
}
@@ -661,11 +661,11 @@ void SwFldDokPage::FillUserData()
String sData( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( USER_DATA_VERSION )));
sData += ';';
- USHORT nTypeSel = aTypeLB.GetSelectEntryPos();
+ sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
else
- nTypeSel = sal::static_int_cast< USHORT >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel )));
+ nTypeSel = sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel )));
sData += String::CreateFromInt32( nTypeSel );
SetUserData(sData);
}
diff --git a/sw/source/ui/fldui/flddok.hxx b/sw/source/ui/fldui/flddok.hxx
index 32031c14c247..9bff88a0bb9c 100644
--- a/sw/source/ui/fldui/flddok.hxx
+++ b/sw/source/ui/fldui/flddok.hxx
@@ -59,18 +59,18 @@ class SwFldDokPage : public SwFldPage
Bitmap aRootOpened;
Bitmap aRootClosed;
- USHORT nOldSel;
- ULONG nOldFormat;
+ sal_uInt16 nOldSel;
+ sal_uLong nOldFormat;
DECL_LINK( TypeHdl, ListBox* pLB = 0 );
DECL_LINK( FormatHdl, ListBox* pLB = 0 );
DECL_LINK( SubTypeHdl, ListBox* pLB = 0 );
- void AddSubType(USHORT nTypeId);
- USHORT FillFormatLB(USHORT nTypeId);
+ void AddSubType(sal_uInt16 nTypeId);
+ sal_uInt16 FillFormatLB(sal_uInt16 nTypeId);
protected:
- virtual USHORT GetGroup();
+ virtual sal_uInt16 GetGroup();
public:
SwFldDokPage(Window* pWindow, const SfxItemSet& rSet);
@@ -79,7 +79,7 @@ public:
static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void FillUserData();
diff --git a/sw/source/ui/fldui/flddok.src b/sw/source/ui/fldui/flddok.src
index f566ab716362..fe595268ce85 100644
--- a/sw/source/ui/fldui/flddok.src
+++ b/sw/source/ui/fldui/flddok.src
@@ -43,6 +43,7 @@ TabPage TP_FLD_DOK
};
ListBox LB_DOKTYPE
{
+ HelpID = "sw:ListBox:TP_FLD_DOK:LB_DOKTYPE";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 14 ) ;
Size = MAP_APPFONT ( 76 , 165 ) ;
@@ -59,6 +60,7 @@ TabPage TP_FLD_DOK
};
ListBox LB_DOKSELECTION
{
+ HelpID = "sw:ListBox:TP_FLD_DOK:LB_DOKSELECTION";
Border = TRUE ;
Pos = MAP_APPFONT ( 88 , 15 ) ;
Size = MAP_APPFONT ( 76 , 165 ) ;
@@ -73,6 +75,7 @@ TabPage TP_FLD_DOK
};
ListBox LB_DOKFORMAT
{
+ HelpID = "sw:ListBox:TP_FLD_DOK:LB_DOKFORMAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 170 , 14 ) ;
Size = MAP_APPFONT ( 84 , 151 ) ;
@@ -83,6 +86,7 @@ TabPage TP_FLD_DOK
};
ListBox LB_DOKNUMFORMAT
{
+ HelpID = "sw:ListBox:TP_FLD_DOK:LB_DOKNUMFORMAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 170 , 14 ) ;
Size = MAP_APPFONT ( 84 , 151 ) ;
@@ -100,6 +104,7 @@ TabPage TP_FLD_DOK
};
Edit ED_DOKVALUE
{
+ HelpID = "sw:Edit:TP_FLD_DOK:ED_DOKVALUE";
Border = TRUE ;
Pos = MAP_APPFONT ( 170 , 167 ) ;
Size = MAP_APPFONT ( 84 , 12 ) ;
@@ -109,6 +114,7 @@ TabPage TP_FLD_DOK
};
NumericField ED_DOKLEVEL
{
+ HelpID = "sw:NumericField:TP_FLD_DOK:ED_DOKLEVEL";
Border = TRUE ;
Pos = MAP_APPFONT ( 170 , 167 ) ;
Size = MAP_APPFONT ( 84 , 12 ) ;
@@ -125,6 +131,7 @@ TabPage TP_FLD_DOK
};
NumericField ED_DOKDATEOFF
{
+ HelpID = "sw:NumericField:TP_FLD_DOK:ED_DOKDATEOFF";
Border = TRUE ;
Pos = MAP_APPFONT ( 170 , 167 ) ;
Size = MAP_APPFONT ( 84 , 12 ) ;
@@ -138,6 +145,7 @@ TabPage TP_FLD_DOK
};
CheckBox CB_DOKFIXEDCONTENT
{
+ HelpID = "sw:CheckBox:TP_FLD_DOK:CB_DOKFIXEDCONTENT";
Pos = MAP_APPFONT ( 170 , 170 ) ;
Size = MAP_APPFONT ( 72 , 10 ) ;
TabStop = TRUE ;
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index c42f7e064e31..279701c13284 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -84,11 +84,11 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) :
/* #108536# Only create selection if there is none
already. Normalize PaM instead of swapping. */
if ( ! pSh->HasSelection() )
- pSh->Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ pSh->Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False );
pSh->NormalizePam();
- USHORT nGroup = aMgr.GetGroup(FALSE, pCurFld->GetTypeId(), pCurFld->GetSubType());
+ sal_uInt16 nGroup = aMgr.GetGroup(sal_False, pCurFld->GetTypeId(), pCurFld->GetSubType());
CreatePage(nGroup);
@@ -98,7 +98,7 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) :
// varying, they are in the woods, and because PB uses fixed pixel sizes
// for its buttons and dialog width in SingleTabDlg.
aPrevBT.SetPosPixel(Point(GetOKButton()->GetPosPixel().X(), aPrevBT.GetPosPixel().Y()));
- USHORT nWidth = static_cast< USHORT >(GetOKButton()->GetOutputSize().Width() / 2 - 3);
+ sal_uInt16 nWidth = static_cast< sal_uInt16 >(GetOKButton()->GetOutputSize().Width() / 2 - 3);
Size aNewSize(LogicToPixel(Size(nWidth, GetOKButton()->GetOutputSize().Height())));
aPrevBT.SetSizePixel(aNewSize);
@@ -140,7 +140,7 @@ void SwFldEditDlg::Init()
pSh->StartAction();
pSh->CreateCrsr();
- BOOL bMove = rMgr.GoNext();
+ sal_Bool bMove = rMgr.GoNext();
if( bMove )
rMgr.GoPrev();
aNextBT.Enable(bMove);
@@ -160,25 +160,25 @@ void SwFldEditDlg::Init()
!pSh->HasReadonlySel() );
}
-SfxTabPage* SwFldEditDlg::CreatePage(USHORT nGroup)
+SfxTabPage* SwFldEditDlg::CreatePage(sal_uInt16 nGroup)
{
// create TabPage
SfxTabPage* pTabPage = 0;
- USHORT nHelpId = 0;
+ const char* pHelpId = 0;
switch (nGroup)
{
case GRP_DOC:
pTabPage = SwFldDokPage::Create(this, *(SfxItemSet*)0);
- nHelpId = HID_EDIT_FLD_DOK;
+ pHelpId = HID_EDIT_FLD_DOK;
break;
case GRP_FKT:
pTabPage = SwFldFuncPage::Create(this, *(SfxItemSet*)0);
- nHelpId = HID_EDIT_FLD_FUNC;
+ pHelpId = HID_EDIT_FLD_FUNC;
break;
case GRP_REF:
pTabPage = SwFldRefPage::Create(this, *(SfxItemSet*)0);
- nHelpId = HID_EDIT_FLD_REF;
+ pHelpId = HID_EDIT_FLD_REF;
break;
case GRP_REG:
{
@@ -194,21 +194,22 @@ SfxTabPage* SwFldEditDlg::CreatePage(USHORT nGroup)
uno::UNO_QUERY_THROW);
pSet->Put( SfxUnoAnyItem( SID_DOCINFO, uno::makeAny(xUDProps) ) );
pTabPage = SwFldDokInfPage::Create(this, *pSet);
- nHelpId = HID_EDIT_FLD_DOKINF;
+ pHelpId = HID_EDIT_FLD_DOKINF;
break;
}
case GRP_DB:
pTabPage = SwFldDBPage::Create(this, *(SfxItemSet*)0);
static_cast<SwFldDBPage*>(pTabPage)->SetWrtShell(*pSh);
- nHelpId = HID_EDIT_FLD_DB;
+ pHelpId = HID_EDIT_FLD_DB;
break;
case GRP_VAR:
pTabPage = SwFldVarPage::Create(this, *(SfxItemSet*)0);
- nHelpId = HID_EDIT_FLD_VAR;
+ pHelpId = HID_EDIT_FLD_VAR;
break;
}
- pTabPage->SetHelpId(nHelpId);
+
+ pTabPage->SetHelpId(pHelpId);
static_cast<SwFldPage*>(pTabPage)->SetWrtShell(pSh);
SetTabPage(pTabPage);
@@ -227,10 +228,10 @@ SwFldEditDlg::~SwFldEditDlg()
pSh->EnterStdMode();
}
-void SwFldEditDlg::EnableInsert(BOOL bEnable)
+void SwFldEditDlg::EnableInsert(sal_Bool bEnable)
{
if( bEnable && pSh->IsReadOnlyAvailable() && pSh->HasReadonlySel() )
- bEnable = FALSE;
+ bEnable = sal_False;
GetOKButton()->Enable( bEnable );
}
@@ -269,7 +270,7 @@ short SwFldEditDlg::Execute()
--------------------------------------------------------------------*/
IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton )
{
- BOOL bNext = pButton == &aNextBT;
+ sal_Bool bNext = pButton == &aNextBT;
pSh->EnterStdMode();
@@ -292,11 +293,11 @@ IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton )
/* #108536# Only create selection if there is none
already. Normalize PaM instead of swapping. */
if ( ! pSh->HasSelection() )
- pSh->Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ pSh->Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False );
pSh->NormalizePam();
- USHORT nGroup = rMgr.GetGroup(FALSE, pCurFld->GetTypeId(), pCurFld->GetSubType());
+ sal_uInt16 nGroup = rMgr.GetGroup(sal_False, pCurFld->GetTypeId(), pCurFld->GetSubType());
if (nGroup != pTabPage->GetGroup())
pTabPage = (SwFldPage*)CreatePage(nGroup);
@@ -318,7 +319,7 @@ IMPL_LINK( SwFldEditDlg, AddressHdl, PushButton *, EMPTYARG )
SID_FIELD_GRABFOCUS, SID_FIELD_GRABFOCUS,
0L );
- USHORT nEditPos = UNKNOWN_EDIT;
+ sal_uInt16 nEditPos = UNKNOWN_EDIT;
switch(pCurFld->GetSubType())
{
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index 31409180a3f6..719f8e892883 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -95,8 +95,8 @@ SwFldFuncPage::SwFldFuncPage(Window* pParent, const SfxItemSet& rCoreSet ) :
sOldValueFT = aValueFT.GetText();
sOldNameFT = aNameFT.GetText();
- aCond1ED.ShowBrackets(FALSE);
- aCond2ED.ShowBrackets(FALSE);
+ aCond1ED.ShowBrackets(sal_False);
+ aCond2ED.ShowBrackets(sal_False);
}
@@ -109,10 +109,10 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
SavePos(&aTypeLB);
Init(); // general initialisation
- aTypeLB.SetUpdateMode(FALSE);
+ aTypeLB.SetUpdateMode(sal_False);
aTypeLB.Clear();
- USHORT nPos, nTypeId;
+ sal_uInt16 nPos, nTypeId;
if (!IsFldEdit())
{
@@ -165,11 +165,11 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
if(sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1))
{
String sVal = sUserData.GetToken(1, ';');
- USHORT nVal = static_cast< USHORT >(sVal.ToInt32());
+ sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.ToInt32());
if(nVal != USHRT_MAX)
{
- for(USHORT i = 0; i < aTypeLB.GetEntryCount(); i++)
- if(nVal == (USHORT)(ULONG)aTypeLB.GetEntryData(i))
+ for(sal_uInt16 i = 0; i < aTypeLB.GetEntryCount(); i++)
+ if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i))
{
aTypeLB.SelectEntryPos(i);
break;
@@ -179,7 +179,7 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
}
TypeHdl(0);
- aTypeLB.SetUpdateMode(TRUE);
+ aTypeLB.SetUpdateMode(sal_True);
if (IsFldEdit())
{
@@ -194,7 +194,7 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
{
// save old ListBoxPos
- const USHORT nOld = GetTypeSel();
+ const sal_uInt16 nOld = GetTypeSel();
// current ListBoxPos
SetTypeSel(aTypeLB.GetSelectEntryPos());
@@ -207,7 +207,7 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
if (nOld != GetTypeSel())
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
// fill Selection-Listbox
UpdateSubType();
@@ -215,30 +215,30 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
// fill Format-Listbox
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;
// two controls for conditional text
- BOOL bDropDown = TYP_DROPDOWN == nTypeId;
- BOOL bCondTxtFld = TYP_CONDTXTFLD == nTypeId;
+ sal_Bool bDropDown = TYP_DROPDOWN == nTypeId;
+ sal_Bool bCondTxtFld = TYP_CONDTXTFLD == nTypeId;
aCond1FT.Show(!bDropDown && bCondTxtFld);
aCond1ED.Show(!bDropDown && bCondTxtFld);
@@ -261,7 +261,7 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
aListNameFT.Show(bDropDown);
aListNameED.Show(bDropDown);
- aNameED.SetDropEnable(FALSE);
+ aNameED.SetDropEnable(sal_False);
if (IsFldEdit())
{
@@ -300,67 +300,81 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
switch (nTypeId)
{
case TYP_MACROFLD:
- bMacro = TRUE;
+ bMacro = sal_True;
if (GetFldMgr().GetMacroPath().Len())
- bValue = TRUE;
+ bValue = sal_True;
else
- bInsert = FALSE;
+ bInsert = sal_False;
aNameFT.SetText(SW_RESSTR(STR_MACNAME));
aValueFT.SetText(SW_RESSTR(STR_PROMPT));
aNameED.SetText(GetFldMgr().GetMacroName());
+ aNameED.SetAccessibleName(aNameFT.GetText());
+ aValueED.SetAccessibleName(aValueFT.GetText());
break;
case TYP_HIDDENPARAFLD:
aNameFT.SetText(SW_RESSTR(STR_COND));
- aNameED.SetDropEnable(TRUE);
- bName = TRUE;
+ aNameED.SetDropEnable(sal_True);
+ bName = sal_True;
+ aNameED.SetAccessibleName(aNameFT.GetText());
+ aValueED.SetAccessibleName(aValueFT.GetText());
break;
case TYP_HIDDENTXTFLD:
{
aNameFT.SetText(SW_RESSTR(STR_COND));
- aNameED.SetDropEnable(TRUE);
+ aNameED.SetDropEnable(sal_True);
aValueFT.SetText(SW_RESSTR(STR_INSTEXT));
SwWrtShell* pSh = GetActiveWrtShell();
if (!IsFldEdit() && pSh )
aValueED.SetText(pSh->GetSelTxt());
- bName = bValue = TRUE;
+ bName = bValue = sal_True;
+ aNameED.SetAccessibleName(aNameFT.GetText());
+ aValueED.SetAccessibleName(aValueFT.GetText());
}
break;
case TYP_CONDTXTFLD:
aNameFT.SetText(SW_RESSTR(STR_COND));
- aNameED.SetDropEnable(TRUE);
+ aNameED.SetDropEnable(sal_True);
if (IsFldEdit())
{
aCond1ED.SetText(GetCurField()->GetPar2().GetToken(0, '|'));
aCond2ED.SetText(GetCurField()->GetPar2().GetToken(1, '|'));
}
- bName = bValue = TRUE;
+ bName = bValue = sal_True;
+ aNameED.SetAccessibleName(aNameFT.GetText());
+ aValueED.SetAccessibleName(aValueFT.GetText());
break;
case TYP_JUMPEDITFLD:
aNameFT.SetText(SW_RESSTR(STR_JUMPEDITFLD));
aValueFT.SetText(SW_RESSTR(STR_PROMPT));
- bName = bValue = TRUE;
+ bName = bValue = sal_True;
+ aNameED.SetAccessibleName(aNameFT.GetText());
+ aValueED.SetAccessibleName(aValueFT.GetText());
break;
case TYP_INPUTFLD:
aValueFT.SetText(SW_RESSTR(STR_PROMPT));
- bValue = TRUE;
+ bValue = sal_True;
+ aNameED.SetAccessibleName(aNameFT.GetText());
+ aValueED.SetAccessibleName(aValueFT.GetText());
break;
case TYP_COMBINED_CHARS:
{
aNameFT.SetText(SW_RESSTR(STR_COMBCHRS_FT));
- aNameED.SetDropEnable(TRUE);
- bName = TRUE;
+ aNameED.SetDropEnable(sal_True);
+ bName = sal_True;
- const USHORT nLen = aNameED.GetText().Len();
+ const sal_uInt16 nLen = aNameED.GetText().Len();
if( !nLen || nLen > MAX_COMBINED_CHARACTERS )
- bInsert = FALSE;
+ bInsert = sal_False;
+ aNameED.SetAccessibleName(aNameFT.GetText());
+ aValueED.SetAccessibleName(aValueFT.GetText());
}
break;
case TYP_DROPDOWN :
@@ -400,7 +414,7 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
IMPL_LINK( SwFldFuncPage, SelectHdl, ListBox *, EMPTYARG )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
if( TYP_MACROFLD == nTypeId )
aNameED.SetText( aSelectionLB.GetSelectEntry() );
@@ -418,7 +432,7 @@ IMPL_LINK( SwFldFuncPage, InsertMacroHdl, ListBox *, EMPTYARG )
IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl)
{
- aListItemsLB.SetUpdateMode(FALSE);
+ aListItemsLB.SetUpdateMode(sal_False);
if(pControl == &aListAddPB ||
(pControl == &aListItemED && aListAddPB.IsEnabled()))
{
@@ -428,7 +442,7 @@ IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl)
}
else if(aListItemsLB.GetSelectEntryCount())
{
- USHORT nSelPos = aListItemsLB.GetSelectEntryPos();
+ sal_uInt16 nSelPos = aListItemsLB.GetSelectEntryPos();
if(pControl == &aListRemovePB)
{
aListItemsLB.RemoveEntry(nSelPos);
@@ -458,7 +472,7 @@ IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl)
}
}
bDropDownLBChanged = true;
- aListItemsLB.SetUpdateMode(TRUE);
+ aListItemsLB.SetUpdateMode(sal_True);
ListEnableHdl(0);
return 0;
}
@@ -468,7 +482,7 @@ IMPL_LINK( SwFldFuncPage, ListEnableHdl, void*, EMPTYARG)
//enable "Add" button when text is in the Edit that's not already member of the box
aListAddPB.Enable(aListItemED.GetText().Len() &&
LISTBOX_ENTRY_NOTFOUND == aListItemsLB.GetEntryPos(aListItemED.GetText()));
- BOOL bEnableButtons = aListItemsLB.GetSelectEntryCount() > 0;
+ sal_Bool bEnableButtons = aListItemsLB.GetSelectEntryCount() > 0;
aListRemovePB.Enable(bEnableButtons);
aListUpPB.Enable(bEnableButtons && (aListItemsLB.GetSelectEntryPos() > 0));
aListDownPB.Enable(bEnableButtons &&
@@ -482,23 +496,23 @@ IMPL_LINK( SwFldFuncPage, ListEnableHdl, void*, EMPTYARG)
--------------------------------------------------------------------*/
void SwFldFuncPage::UpdateSubType()
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
// fill Selction-Listbox
- aSelectionLB.SetUpdateMode(FALSE);
+ aSelectionLB.SetUpdateMode(sal_False);
aSelectionLB.Clear();
SvStringsDtor aLst;
GetFldMgr().GetSubTypes(nTypeId, aLst);
- USHORT nCount = aLst.Count();
+ sal_uInt16 nCount = aLst.Count();
- for (USHORT i = 0; i < nCount; ++i)
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
- USHORT nPos = aSelectionLB.InsertEntry(*aLst[i]);
+ sal_uInt16 nPos = aSelectionLB.InsertEntry(*aLst[i]);
aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(i));
}
- BOOL bEnable = nCount != 0;
+ sal_Bool bEnable = nCount != 0;
aSelectionLB.Enable( bEnable );
aSelectionFT.Enable( bEnable );
@@ -510,7 +524,7 @@ void SwFldFuncPage::UpdateSubType()
if (nTypeId == TYP_MACROFLD)
{
- BOOL bHasMacro = GetFldMgr().GetMacroPath().Len() != 0;
+ sal_Bool bHasMacro = GetFldMgr().GetMacroPath().Len() != 0;
if (bHasMacro)
{
@@ -521,7 +535,7 @@ void SwFldFuncPage::UpdateSubType()
EnableInsert(bHasMacro);
}
- aSelectionLB.SetUpdateMode(TRUE);
+ aSelectionLB.SetUpdateMode(sal_True);
}
/*--------------------------------------------------------------------
@@ -543,18 +557,18 @@ IMPL_LINK( SwFldFuncPage, MacroHdl, Button *, pBtn )
return 0;
}
-BOOL SwFldFuncPage::FillItemSet(SfxItemSet& )
+sal_Bool SwFldFuncPage::FillItemSet(SfxItemSet& )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
- USHORT nSubType = 0;
+ sal_uInt16 nSubType = 0;
- ULONG nFormat = aFormatLB.GetSelectEntryPos();
+ sal_uLong nFormat = aFormatLB.GetSelectEntryPos();
if(nFormat == LISTBOX_ENTRY_NOTFOUND)
nFormat = 0;
else
- nFormat = (ULONG)aFormatLB.GetEntryData((USHORT)nFormat);
+ nFormat = (sal_uLong)aFormatLB.GetEntryData((sal_uInt16)nFormat);
String aVal(aValueED.GetText());
String aName(aNameED.GetText());
@@ -582,7 +596,7 @@ BOOL SwFldFuncPage::FillItemSet(SfxItemSet& )
case TYP_DROPDOWN :
{
aName = aListNameED.GetText();
- for(USHORT i = 0; i < aListItemsLB.GetEntryCount(); i++)
+ for(sal_uInt16 i = 0; i < aListItemsLB.GetEntryCount(); i++)
{
if(i)
aVal += DB_DELIM;
@@ -608,7 +622,7 @@ BOOL SwFldFuncPage::FillItemSet(SfxItemSet& )
ModifyHdl(); // enable/disable Insert if applicable
- return FALSE;
+ return sal_False;
}
String SwFldFuncPage::TurnMacroString(const String &rMacro)
@@ -617,9 +631,9 @@ String SwFldFuncPage::TurnMacroString(const String &rMacro)
{
// reverse content of aName
String sTmp, sBuf;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
- for (USHORT i = 0; i < 4 && nPos != STRING_NOTFOUND; i++)
+ for (sal_uInt16 i = 0; i < 4 && nPos != STRING_NOTFOUND; i++)
{
if (i == 3)
sTmp = rMacro.Copy(nPos);
@@ -642,7 +656,7 @@ SfxTabPage* SwFldFuncPage::Create( Window* pParent,
return ( new SwFldFuncPage( pParent, rAttrSet ) );
}
-USHORT SwFldFuncPage::GetGroup()
+sal_uInt16 SwFldFuncPage::GetGroup()
{
return GRP_FKT;
}
@@ -652,11 +666,11 @@ void SwFldFuncPage::FillUserData()
String sData( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( USER_DATA_VERSION )));
sData += ';';
- USHORT nTypeSel = aTypeLB.GetSelectEntryPos();
+ sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
else
- nTypeSel = sal::static_int_cast< USHORT >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel )));
+ nTypeSel = sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel )));
sData += String::CreateFromInt32( nTypeSel );
SetUserData(sData);
}
@@ -664,14 +678,14 @@ void SwFldFuncPage::FillUserData()
IMPL_LINK( SwFldFuncPage, ModifyHdl, Edit *, EMPTYARG )
{
String aName(aNameED.GetText());
- const USHORT nLen = aName.Len();
+ const sal_uInt16 nLen = aName.Len();
- BOOL bEnable = TRUE;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_Bool bEnable = sal_True;
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
if( TYP_COMBINED_CHARS == nTypeId &&
(!nLen || nLen > MAX_COMBINED_CHARACTERS ))
- bEnable = FALSE;
+ bEnable = sal_False;
EnableInsert( bEnable );
diff --git a/sw/source/ui/fldui/fldfunc.hxx b/sw/source/ui/fldui/fldfunc.hxx
index 522e8a8aec57..9db7ed3d2fbe 100644
--- a/sw/source/ui/fldui/fldfunc.hxx
+++ b/sw/source/ui/fldui/fldfunc.hxx
@@ -72,7 +72,7 @@ class SwFldFuncPage : public SwFldPage
String sOldValueFT;
String sOldNameFT;
- ULONG nOldFormat;
+ sal_uLong nOldFormat;
bool bDropDownLBChanged;
DECL_LINK( TypeHdl, ListBox* pLB = 0 );
@@ -89,7 +89,7 @@ class SwFldFuncPage : public SwFldPage
String TurnMacroString(const String &rMacro);
protected:
- virtual USHORT GetGroup();
+ virtual sal_uInt16 GetGroup();
public:
SwFldFuncPage(Window* pParent, const SfxItemSet& rSet);
@@ -98,7 +98,7 @@ public:
static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void FillUserData();
diff --git a/sw/source/ui/fldui/fldfunc.src b/sw/source/ui/fldui/fldfunc.src
index 312299fac02d..538aeb8e1ce3 100644
--- a/sw/source/ui/fldui/fldfunc.src
+++ b/sw/source/ui/fldui/fldfunc.src
@@ -43,6 +43,7 @@ TabPage TP_FLD_FUNC
};
ListBox LB_FUNCTYPE
{
+ HelpID = "sw:ListBox:TP_FLD_FUNC:LB_FUNCTYPE";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 14 ) ;
Size = MAP_APPFONT ( 76 , 165 ) ;
@@ -60,6 +61,7 @@ TabPage TP_FLD_FUNC
};
ListBox LB_FUNCSELECTION
{
+ HelpID = "sw:ListBox:TP_FLD_FUNC:LB_FUNCSELECTION";
Border = TRUE ;
Pos = MAP_APPFONT ( 88 , 14 ) ;
Size = MAP_APPFONT ( 76 , 165 ) ;
@@ -77,6 +79,7 @@ TabPage TP_FLD_FUNC
};
ListBox LB_FUNCFORMAT
{
+ HelpID = "sw:ListBox:TP_FLD_FUNC:LB_FUNCFORMAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 88 , 14 ) ;
Size = MAP_APPFONT ( 76 , 165 ) ;
@@ -91,6 +94,7 @@ TabPage TP_FLD_FUNC
};
Edit ED_FUNCNAME
{
+ HelpID = "sw:Edit:TP_FLD_FUNC:ED_FUNCNAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 170 , 14 ) ;
Size = MAP_APPFONT ( 84 , 12 ) ;
@@ -106,6 +110,7 @@ TabPage TP_FLD_FUNC
};
Edit ED_FUNCVALUE
{
+ HelpID = "sw:Edit:TP_FLD_FUNC:ED_FUNCVALUE";
Border = TRUE ;
Pos = MAP_APPFONT ( 170 , 41 ) ;
Size = MAP_APPFONT ( 84 , 12 ) ;
@@ -122,6 +127,7 @@ TabPage TP_FLD_FUNC
};
Edit ED_FUNCCOND1
{
+ HelpID = "sw:Edit:TP_FLD_FUNC:ED_FUNCCOND1";
Border = TRUE ;
Pos = MAP_APPFONT ( 170 , 41 ) ;
Size = MAP_APPFONT ( 84 , 12 ) ;
@@ -139,6 +145,7 @@ TabPage TP_FLD_FUNC
};
Edit ED_FUNCCOND2
{
+ HelpID = "sw:Edit:TP_FLD_FUNC:ED_FUNCCOND2";
Border = TRUE ;
Pos = MAP_APPFONT ( 170 , 68 ) ;
Size = MAP_APPFONT ( 84 , 12 ) ;
@@ -148,6 +155,7 @@ TabPage TP_FLD_FUNC
};
PushButton BT_FUNCMACRO
{
+ HelpID = "sw:PushButton:TP_FLD_FUNC:BT_FUNCMACRO";
Pos = MAP_APPFONT ( 204 , 165 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Macro..." ;
@@ -163,6 +171,7 @@ TabPage TP_FLD_FUNC
};
Edit ED_LISTITEM
{
+ HelpID = "sw:Edit:TP_FLD_FUNC:ED_LISTITEM";
Border = TRUE ;
Pos = MAP_APPFONT ( 170 , 14 ) ;
Size = MAP_APPFONT ( 84 , 12 ) ;
@@ -172,6 +181,7 @@ TabPage TP_FLD_FUNC
};
PushButton PB_LISTADD
{
+ HelpID = "sw:PushButton:TP_FLD_FUNC:PB_LISTADD";
Pos = MAP_APPFONT ( 170 , 29 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Hide = TRUE;
@@ -186,6 +196,7 @@ TabPage TP_FLD_FUNC
};
ListBox LB_LISTITEMS
{
+ HelpID = "sw:ListBox:TP_FLD_FUNC:LB_LISTITEMS";
Border = TRUE ;
Pos = MAP_APPFONT ( 170 , 57 ) ;
Size = MAP_APPFONT ( 83 , 44 ) ;
@@ -195,6 +206,7 @@ TabPage TP_FLD_FUNC
};
PushButton PB_LISTREMOVE
{
+ HelpID = "sw:PushButton:TP_FLD_FUNC:PB_LISTREMOVE";
Pos = MAP_APPFONT ( 203 , 104 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Hide = TRUE;
@@ -202,6 +214,7 @@ TabPage TP_FLD_FUNC
};
PushButton PB_LISTUP
{
+ HelpID = "sw:PushButton:TP_FLD_FUNC:PB_LISTUP";
Pos = MAP_APPFONT ( 203 , 121 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Hide = TRUE;
@@ -209,6 +222,7 @@ TabPage TP_FLD_FUNC
};
PushButton PB_LISTDOWN
{
+ HelpID = "sw:PushButton:TP_FLD_FUNC:PB_LISTDOWN";
Pos = MAP_APPFONT ( 203 , 138 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Hide = TRUE;
@@ -223,6 +237,7 @@ TabPage TP_FLD_FUNC
};
Edit ED_LISTNAME
{
+ HelpID = "sw:Edit:TP_FLD_FUNC:ED_LISTNAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 170 , 167 ) ;
Size = MAP_APPFONT ( 84 , 12 ) ;
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx
index a8107e46cd4f..314e12498093 100644
--- a/sw/source/ui/fldui/fldmgr.cxx
+++ b/sw/source/ui/fldui/fldmgr.cxx
@@ -144,48 +144,48 @@ enum
/*--------------------------------------------------------------------
Description: formats in the correct order
--------------------------------------------------------------------*/
-static const USHORT aSetFmt[] =
+static const sal_uInt16 aSetFmt[] =
{
// at first the order has to match the ResourceIds for FMT_SETVAR_???
0,
0
};
-static const USHORT aGetFmt[] =
+static const sal_uInt16 aGetFmt[] =
{
// at first the order has to match the ResourceIds for FMT_GETVAR_???
0
};
-static const USHORT aUsrFmt[] =
+static const sal_uInt16 aUsrFmt[] =
{
// at first the order has to match the ResourceIds for FMT_SETVAR_???
0,
nsSwExtendedSubType::SUB_CMD
};
-static const USHORT aDBFmt[] =
+static const sal_uInt16 aDBFmt[] =
{
// at first the order has to match the ResourceIds for FMT_DBFLD_???
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);
/*--------------------------------------------------------------------
Description: field types and 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;
};
/*--------------------------------------------------------------------
@@ -257,7 +257,7 @@ static SwWrtShell* lcl_GetShell()
return 0;
}
-inline USHORT GetPackCount() { return sizeof(aSwFlds) / sizeof(SwFldPack); }
+inline sal_uInt16 GetPackCount() { return sizeof(aSwFlds) / sizeof(SwFldPack); }
/*--------------------------------------------------------------------
Description: FieldManager controls inserting and updating of fields
@@ -267,7 +267,7 @@ SwFldMgr::SwFldMgr(SwWrtShell* pSh ) :
pModule(0),
pMacroItem(0),
pWrtShell(pSh),
- bEvalExp(TRUE)
+ bEvalExp(sal_True)
{
// determine current field if existing
GetCurFld();
@@ -282,14 +282,14 @@ SwFldMgr::~SwFldMgr()
Description: organise RefMark by names
--------------------------------------------------------------------*/
-BOOL SwFldMgr::CanInsertRefMark( const String& rStr )
+sal_Bool SwFldMgr::CanInsertRefMark( const String& rStr )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwWrtShell *pSh = pWrtShell ? pWrtShell : lcl_GetShell();
OSL_ENSURE(pSh, "no SwWrtShell found");
if(pSh)
{
- USHORT nCnt = pSh->GetCrsrCnt();
+ sal_uInt16 nCnt = pSh->GetCrsrCnt();
// the last Crsr doesn't have to be a spanned selection
if( 1 < nCnt && !pSh->SwCrsrShell::HasSelection() )
@@ -304,7 +304,7 @@ BOOL SwFldMgr::CanInsertRefMark( const String& rStr )
Description: access over ResIds
--------------------------------------------------------------------*/
-void SwFldMgr::RemoveFldType(USHORT nResId, const String& rName )
+void SwFldMgr::RemoveFldType(sal_uInt16 nResId, const String& rName )
{
SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell();
OSL_ENSURE(pSh, "no SwWrtShell found");
@@ -312,7 +312,7 @@ void SwFldMgr::RemoveFldType(USHORT nResId, const String& rName )
pSh->RemoveFldType(nResId, rName);
}
-USHORT SwFldMgr::GetFldTypeCount(USHORT nResId) const
+sal_uInt16 SwFldMgr::GetFldTypeCount(sal_uInt16 nResId) const
{
SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell();
OSL_ENSURE(pSh, "no SwWrtShell found");
@@ -320,7 +320,7 @@ USHORT SwFldMgr::GetFldTypeCount(USHORT nResId) const
}
-SwFieldType* SwFldMgr::GetFldType(USHORT nResId, USHORT nId) const
+SwFieldType* SwFldMgr::GetFldType(sal_uInt16 nResId, sal_uInt16 nId) const
{
SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell();
OSL_ENSURE(pSh, "no SwWrtShell found");
@@ -328,7 +328,7 @@ SwFieldType* SwFldMgr::GetFldType(USHORT nResId, USHORT nId) const
}
-SwFieldType* SwFldMgr::GetFldType(USHORT nResId, const String& rName) const
+SwFieldType* SwFldMgr::GetFldType(sal_uInt16 nResId, const String& rName) const
{
SwWrtShell * pSh = pWrtShell ? pWrtShell : lcl_GetShell();
OSL_ENSURE(pSh, "no SwWrtShell found");
@@ -358,7 +358,7 @@ SwField* SwFldMgr::GetCurFld()
// preprocess current values; determine parameter 1 and parameter 2
// as well as the format
- const USHORT nTypeId = pCurFld->GetTypeId();
+ const sal_uInt16 nTypeId = pCurFld->GetTypeId();
nCurFmt = pCurFld->GetFormat();
aCurPar1 = pCurFld->GetPar1();
@@ -382,7 +382,7 @@ SwField* SwFldMgr::GetCurFld()
--------------------------------------------------------------------*/
-const SwFldGroupRgn& SwFldMgr::GetGroupRange(BOOL bHtmlMode, USHORT nGrpId) const
+const SwFldGroupRgn& SwFldMgr::GetGroupRange(sal_Bool bHtmlMode, sal_uInt16 nGrpId) const
{
static SwFldGroupRgn const aRanges[] =
{
@@ -404,16 +404,16 @@ static SwFldGroupRgn const aWebRanges[] =
};
if (bHtmlMode)
- return aWebRanges[(USHORT)nGrpId];
+ return aWebRanges[(sal_uInt16)nGrpId];
else
- return aRanges[(USHORT)nGrpId];
+ return aRanges[(sal_uInt16)nGrpId];
}
/*--------------------------------------------------------------------
Description: determine GroupId
--------------------------------------------------------------------*/
-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;
@@ -427,10 +427,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;
@@ -445,18 +445,18 @@ USHORT SwFldMgr::GetGroup(BOOL bHtmlMode, USHORT nTypeId, USHORT nSubType) const
--------------------------------------------------------------------*/
-USHORT SwFldMgr::GetTypeId(USHORT nPos)
+sal_uInt16 SwFldMgr::GetTypeId(sal_uInt16 nPos)
{
OSL_ENSURE(nPos < ::GetPackCount(), "forbidden Pos");
return aSwFlds[ nPos ].nTypeId;
}
-const String& SwFldMgr::GetTypeStr(USHORT nPos)
+const String& SwFldMgr::GetTypeStr(sal_uInt16 nPos)
{
OSL_ENSURE(nPos < ::GetPackCount(), "forbidden TypeId");
- USHORT nFldWh = aSwFlds[ nPos ].nTypeId;
+ sal_uInt16 nFldWh = aSwFlds[ nPos ].nTypeId;
// special treatment for date/time fields (without var/fix)
if( TYP_DATEFLD == nFldWh )
@@ -478,7 +478,7 @@ const String& SwFldMgr::GetTypeStr(USHORT nPos)
--------------------------------------------------------------------*/
-USHORT SwFldMgr::GetPos(USHORT nTypeId)
+sal_uInt16 SwFldMgr::GetPos(sal_uInt16 nTypeId)
{
switch( nTypeId )
{
@@ -488,7 +488,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;
@@ -499,14 +499,14 @@ USHORT SwFldMgr::GetPos(USHORT nTypeId)
Description: localise subtypes of a field
--------------------------------------------------------------------*/
-BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
+sal_Bool SwFldMgr::GetSubTypes(sal_uInt16 nTypeId, SvStringsDtor& rToFill)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwWrtShell *pSh = pWrtShell ? pWrtShell : lcl_GetShell();
OSL_ENSURE(pSh, "no SwWrtShell found");
if(pSh)
{
- const USHORT nPos = GetPos(nTypeId);
+ const sal_uInt16 nPos = GetPos(nTypeId);
switch(nTypeId)
{
@@ -534,11 +534,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) ||
@@ -556,7 +556,7 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
((nTypeId == TYP_INPUTFLD || nTypeId == TYP_FORMELFLD) &&
(nWhich == RES_USERFLD ||
(nWhich == RES_SETEXPFLD &&
- !(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ)) )) )
+ !(((SwSetExpFieldType*)pFldType)->GetType() & nsSwGetSetExpType::GSE_SEQ))) ) )
{
String* pNew = new String(pFldType->GetName());
rToFill.Insert(pNew, rToFill.Count());
@@ -575,13 +575,13 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
// static 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)
@@ -599,7 +599,7 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
}
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
@@ -610,18 +610,18 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
--------------------------------------------------------------------*/
-USHORT SwFldMgr::GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode) const
+sal_uInt16 SwFldMgr::GetFormatCount(sal_uInt16 nTypeId, sal_Bool bIsText, sal_Bool bHtmlMode) const
{
OSL_ENSURE(nTypeId < TYP_END, "forbidden TypeId");
{
- const USHORT nPos = GetPos(nTypeId);
+ const sal_uInt16 nPos = GetPos(nTypeId);
if(nPos == USHRT_MAX || (bHtmlMode && nTypeId == TYP_SETFLD))
return 0;
- ULONG nStart = aSwFlds[nPos].nFmtBegin;
- ULONG nEnd = aSwFlds[nPos].nFmtEnd;
+ sal_uLong nStart = aSwFlds[nPos].nFmtBegin;
+ sal_uLong nEnd = aSwFlds[nPos].nFmtEnd;
if (bIsText && nEnd - nStart >= 2)
return 2;
@@ -637,7 +637,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())
{
@@ -658,7 +658,7 @@ USHORT SwFldMgr::GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode) co
}
}
- return (USHORT)(nEnd - nStart);
+ return (sal_uInt16)(nEnd - nStart);
}
}
@@ -667,17 +667,17 @@ USHORT SwFldMgr::GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode) co
--------------------------------------------------------------------*/
-String SwFldMgr::GetFormatStr(USHORT nTypeId, ULONG nFormatId) const
+String SwFldMgr::GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const
{
String aRet;
OSL_ENSURE(nTypeId < TYP_END, "forbidden TypeId");
- const USHORT nPos = GetPos(nTypeId);
+ const sal_uInt16 nPos = GetPos(nTypeId);
if(nPos == USHRT_MAX)
return aRet;
- ULONG nStart;
+ sal_uLong nStart;
nStart = aSwFlds[nPos].nFmtBegin;
@@ -685,7 +685,7 @@ String SwFldMgr::GetFormatStr(USHORT nTypeId, ULONG nFormatId) const
nFormatId &= ~FF_FIXED; // mask out Fixed-Flag
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())
@@ -717,9 +717,9 @@ String SwFldMgr::GetFormatStr(USHORT nTypeId, ULONG nFormatId) const
Description: determine FormatId from Pseudo-ID
--------------------------------------------------------------------*/
-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 )
{
@@ -740,9 +740,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 )
@@ -798,15 +798,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
@@ -819,7 +819,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;
}
/*--------------------------------------------------------------------
@@ -840,7 +840,7 @@ void SwFldMgr::InsertFldType(SwFieldType& rType)
--------------------------------------------------------------------*/
-USHORT SwFldMgr::GetCurTypeId() const
+sal_uInt16 SwFldMgr::GetCurTypeId() const
{
return pCurFld ? pCurFld->GetTypeId() : USHRT_MAX;
}
@@ -850,21 +850,21 @@ USHORT SwFldMgr::GetCurTypeId() const
--------------------------------------------------------------------*/
-BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
+sal_Bool SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
{
SwField* pFld = 0;
- BOOL bExp = FALSE;
- BOOL bTbl = FALSE;
- BOOL bPageVar = FALSE;
- ULONG nFormatId = rData.nFormatId;
- USHORT nSubType = rData.nSubType;
+ sal_Bool bExp = sal_False;
+ sal_Bool bTbl = sal_False;
+ sal_Bool bPageVar = sal_False;
+ sal_uLong nFormatId = rData.nFormatId;
+ sal_uInt16 nSubType = rData.nSubType;
sal_Unicode cSeparator = rData.cSeparator;
SwWrtShell* pCurShell = rData.pSh;
if(!pCurShell)
pCurShell = pWrtShell ? pWrtShell : ::lcl_GetShell();
OSL_ENSURE(pCurShell, "no SwWrtShell found");
if(!pCurShell)
- return FALSE;
+ return sal_False;
switch(rData.nTypeId)
{ // ATTENTION this field is inserted by a seperate dialog
@@ -878,7 +878,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:
@@ -904,7 +904,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 =
@@ -929,14 +929,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:
@@ -990,8 +990,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:
@@ -999,7 +999,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:
@@ -1007,17 +1007,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:
@@ -1025,11 +1025,11 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
//JP 28.08.95: DDE-Topics/-Items can have blanks in their names!
// That's not yet considered here.
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;
}
@@ -1117,7 +1117,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
}
pFld->ChangeFormat( nFormatId );
- bExp = TRUE;
+ bExp = sal_True;
break;
}
case TYP_DBSETNUMBERFLD:
@@ -1125,7 +1125,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;
@@ -1166,7 +1166,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:
@@ -1174,7 +1174,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:
@@ -1182,7 +1182,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;
}
}
@@ -1204,7 +1204,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:
@@ -1221,16 +1221,16 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
new SwSetExpField(pTyp, aEmptyStr, nFormatId);
// Don't change type of SwSetExpFieldType:
- 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
{
@@ -1243,13 +1243,13 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
}
// start dialog
- pCurShell->StartInputFldDlg(pFld, FALSE, rData.pParent);
+ pCurShell->StartInputFldDlg(pFld, sal_False, rData.pParent);
break;
}
case TYP_SETFLD:
{
if (!rData.sPar2.Len()) // empty variables are not allowed
- return FALSE;
+ return sal_False;
SwSetExpFieldType* pTyp = (SwSetExpFieldType*)pCurShell->InsertFldType(
SwSetExpFieldType(pCurShell->GetDoc(), rData.sPar1) );
@@ -1257,7 +1257,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;
}
@@ -1266,7 +1266,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)
@@ -1274,7 +1274,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;
@@ -1291,15 +1291,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();
@@ -1326,7 +1326,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
pCurShell->UpdateTable();
pCurShell->EndAllAction();
- return TRUE;
+ return sal_True;
}
else
@@ -1335,7 +1335,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;
}
@@ -1343,13 +1343,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 :
{
@@ -1365,7 +1365,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
break;
default:
{ OSL_ENSURE(!this, "wrong field type");
- return FALSE;
+ return sal_False;
}
}
OSL_ENSURE(pFld, "field not available");
@@ -1373,7 +1373,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);
// insert
@@ -1382,13 +1382,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();
@@ -1399,7 +1399,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
delete pFld;
pCurShell->EndAllAction();
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -1407,7 +1407,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#
@@ -1428,7 +1428,7 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
}
SwFieldType* pType = pTmpFld->GetTyp();
- const USHORT nTypeId = pTmpFld->GetTypeId();
+ const sal_uInt16 nTypeId = pTmpFld->GetTypeId();
SwWrtShell* pSh = pWrtShell ? pWrtShell : ::lcl_GetShell();
OSL_ENSURE(pSh, "no SwWrtShell found");
@@ -1436,8 +1436,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 );
@@ -1446,26 +1446,26 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
{
case TYP_DDEFLD:
{
- //JP 28.08.95: DDE-Topics/-Items can have blanks in their names!
- // That's not yet considered here!
- USHORT nTmpPos = sPar2.SearchAndReplace( ' ', sfx2::cTokenSeperator );
+ // DDE-Topics/-Items can have blanks in their names!
+ // That's not yet considered here!
+ 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:
@@ -1509,11 +1509,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:
@@ -1525,7 +1525,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 :
@@ -1534,7 +1534,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 ) )
@@ -1545,8 +1545,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;
}
@@ -1591,11 +1591,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 )
@@ -1605,9 +1605,9 @@ USHORT SwFldMgr::GetCurrLanguage() const
void SwFieldType::_GetFldName()
{
- static const USHORT coFldCnt = STR_TYPE_END - STR_TYPE_BEGIN;
+ static const sal_uInt16 coFldCnt = STR_TYPE_END - STR_TYPE_BEGIN;
- static USHORT const coFldNms[ coFldCnt ] = {
+ static sal_uInt16 coFldNms[ coFldCnt ] = {
FLD_DATE_STD,
FLD_TIME_STD,
STR_FILENAMEFLD,
@@ -1654,8 +1654,8 @@ void SwFieldType::_GetFldName()
};
// insert infos for fields
- 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 ) );
@@ -1663,9 +1663,9 @@ void SwFieldType::_GetFldName()
}
}
-BOOL SwFldMgr::ChooseMacro(const String&)
+sal_Bool SwFldMgr::ChooseMacro(const String&)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// choose script dialog
::rtl::OUString aScriptURL = SfxApplication::ChooseScript();
@@ -1674,7 +1674,7 @@ BOOL SwFldMgr::ChooseMacro(const String&)
if ( aScriptURL.getLength() != 0 )
{
SetMacroPath( aScriptURL );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -1708,7 +1708,7 @@ void SwFldMgr::SetMacroPath(const String& rPath)
}
}
-ULONG SwFldMgr::GetDefaultFormat(USHORT nTypeId, BOOL bIsText, SvNumberFormatter* pFormatter, double* pVal)
+sal_uLong SwFldMgr::GetDefaultFormat(sal_uInt16 nTypeId, sal_Bool bIsText, SvNumberFormatter* pFormatter, double* pVal)
{
double fValue;
short nDefFormat;
@@ -1725,8 +1725,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 1efad58e207d..1f1594c0f9d7 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -62,14 +62,14 @@ SwFldPage::SwFldPage( Window *pParent, const ResId &rId,
:SfxTabPage (pParent, rId, rAttrSet),
m_pCurFld (0),
m_pWrtShell (0),
- m_nPageId ( static_cast< USHORT >(rId.GetId()) ),
+ m_nPageId ( static_cast< sal_uInt16 >(rId.GetId()) ),
m_nTypeSel (LISTBOX_ENTRY_NOTFOUND),
m_nSelectionSel (LISTBOX_ENTRY_NOTFOUND),
- m_bFldEdit (FALSE),
- m_bInsert (TRUE),
- m_bFldDlgHtmlMode (FALSE),
- m_bRefresh (FALSE),
- m_bFirstHTMLInit (TRUE)
+ m_bFldEdit (sal_False),
+ m_bInsert (sal_True),
+ m_bFldDlgHtmlMode (sal_False),
+ m_bRefresh (sal_False),
+ m_bFirstHTMLInit (sal_True)
{
}
@@ -85,7 +85,7 @@ SwFldPage::~SwFldPage()
void SwFldPage::Init()
{
SwDocShell* pDocSh = (SwDocShell*)SfxObjectShell::Current();
- BOOL bNewMode = 0 != (::GetHtmlMode(pDocSh) & HTMLMODE_ON);
+ sal_Bool bNewMode = 0 != (::GetHtmlMode(pDocSh) & HTMLMODE_ON);
m_bFldEdit = 0 == GetTabDialog();
@@ -100,7 +100,7 @@ void SwFldPage::Init()
// initialise Rangelistbox
if( m_bFldDlgHtmlMode && m_bFirstHTMLInit )
{
- m_bFirstHTMLInit = FALSE;
+ m_bFirstHTMLInit = sal_False;
SwWrtShell *pSh = m_pWrtShell;
if(! pSh)
pSh = ::GetActiveWrtShell();
@@ -129,27 +129,27 @@ void SwFldPage::ActivatePage()
Description: complete reset; edit new field
--------------------------------------------------------------------*/
-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;
}
/*--------------------------------------------------------------------
Description: insert field
--------------------------------------------------------------------*/
-BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1,
- const String& rPar2, ULONG nFormatId,
- sal_Unicode cSeparator, BOOL bIsAutomaticLanguage)
+sal_Bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const String& rPar1,
+ const String& rPar2, sal_uLong nFormatId,
+ sal_Unicode cSeparator, sal_Bool bIsAutomaticLanguage)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwView* pView = GetActiveView();
SwWrtShell *pSh = m_pWrtShell ? m_pWrtShell : pView->GetWrtShellPtr();
@@ -164,7 +164,7 @@ BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1,
pView->GetViewFrame()->GetBindings().GetRecorder();
if ( xRecorder.is() )
{
- BOOL bRecordDB = TYP_DBFLD == nTypeId ||
+ sal_Bool bRecordDB = TYP_DBFLD == nTypeId ||
TYP_DBSETNUMBERFLD == nTypeId ||
TYP_DBNUMSETFLD == nTypeId ||
TYP_DBNEXTSETFLD == nTypeId ||
@@ -207,7 +207,7 @@ BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1,
{
case TYP_DATEFLD:
case TYP_TIMEFLD:
- nSubType = static_cast< USHORT >(((nTypeId == TYP_DATEFLD) ? DATEFLD : TIMEFLD) |
+ nSubType = static_cast< sal_uInt16 >(((nTypeId == TYP_DATEFLD) ? DATEFLD : TIMEFLD) |
((nSubType == DATE_VAR) ? 0 : FIXEDFLD));
break;
@@ -258,7 +258,7 @@ BOOL SwFldPage::InsertFld(USHORT nTypeId, USHORT nSubType, const String& rPar1,
case TYP_SEQFLD:
{
SwSetExpFieldType* pTyp = (SwSetExpFieldType*)pTmpFld->GetTyp();
- pTyp->SetOutlineLvl( static_cast< BYTE >(nSubType & 0xff));
+ pTyp->SetOutlineLvl( static_cast< sal_uInt8 >(nSubType & 0xff));
pTyp->SetDelimiter(cSeparator);
nSubType = nsSwGetSetExpType::GSE_SEQ;
@@ -327,7 +327,7 @@ void SwFldPage::SavePos( const ListBox* pLst1, const ListBox* pLst2,
void SwFldPage::RestorePos(ListBox* pLst1, ListBox* pLst2, ListBox* pLst3)
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
ListBox* aLBArr [ coLBCount ] = { pLst1, pLst2, pLst3 };
ListBox** ppLB = aLBArr;
for( int i = 0; i < coLBCount; ++i, ++ppLB )
@@ -365,7 +365,7 @@ IMPL_LINK( SwFldPage, InsertHdl, Button *, pBtn )
Description: enable/disable "Insert"-Button
--------------------------------------------------------------------*/
-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 214d6814dde7..40c4ef60ae75 100644
--- a/sw/source/ui/fldui/fldpage.hxx
+++ b/sw/source/ui/fldui/fldpage.hxx
@@ -41,23 +41,23 @@ class SwFldPage : public SfxTabPage
SwFldMgr m_aMgr;
SwField *m_pCurFld;
SwWrtShell* m_pWrtShell;
- USHORT m_nPageId;
- USHORT m_nTypeSel;
- USHORT m_nSelectionSel;
- BOOL m_bFldEdit;
- BOOL m_bInsert;
- BOOL m_bFldDlgHtmlMode;
- BOOL m_bRefresh;
- BOOL m_bFirstHTMLInit;
+ sal_uInt16 m_nPageId;
+ sal_uInt16 m_nTypeSel;
+ sal_uInt16 m_nSelectionSel;
+ sal_Bool m_bFldEdit;
+ sal_Bool m_bInsert;
+ sal_Bool m_bFldDlgHtmlMode;
+ sal_Bool m_bRefresh;
+ sal_Bool m_bFirstHTMLInit;
protected:
- USHORT GetTypeSel() const { return m_nTypeSel;}
- void SetTypeSel(USHORT nSet) { m_nTypeSel = nSet;}
- USHORT GetSelectionSel() const { return m_nSelectionSel;}
- void SetSelectionSel(USHORT nSet){ m_nSelectionSel = nSet;}
- BOOL IsFldDlgHtmlMode() const { return m_bFldDlgHtmlMode;}
- BOOL IsRefresh() const { return m_bRefresh;}
+ sal_uInt16 GetTypeSel() const { return m_nTypeSel;}
+ void SetTypeSel(sal_uInt16 nSet) { m_nTypeSel = nSet;}
+ sal_uInt16 GetSelectionSel() const { return m_nSelectionSel;}
+ void SetSelectionSel(sal_uInt16 nSet){ m_nSelectionSel = nSet;}
+ sal_Bool IsFldDlgHtmlMode() const { return m_bFldDlgHtmlMode;}
+ sal_Bool IsRefresh() const { return m_bRefresh;}
SwField* GetCurField() { return m_pCurFld;}
SwWrtShell* GetWrtShell() { return m_pWrtShell;}
@@ -70,17 +70,17 @@ protected:
const ListBox* pLst3 = 0);
void RestorePos( ListBox* pLst1, ListBox* pLst2 = 0,
ListBox* pLst3 = 0 );
- void EnableInsert(BOOL bEnable = TRUE);
- inline BOOL IsFldEdit() const { return m_bFldEdit; }
+ void EnableInsert(sal_Bool bEnable = sal_True);
+ inline sal_Bool IsFldEdit() const { return m_bFldEdit; }
// insert field
- BOOL InsertFld( USHORT nTypeId,
- USHORT nSubType,
+ sal_Bool InsertFld( sal_uInt16 nTypeId,
+ sal_uInt16 nSubType,
const String& rPar1,
const String& rPar2,
- ULONG nFormatId,
+ sal_uLong nFormatId,
sal_Unicode cDelim = ' ',
- BOOL bIsAutomaticLanguage = TRUE);
+ sal_Bool bIsAutomaticLanguage = sal_True);
using SfxTabPage::ActivatePage;
@@ -95,8 +95,8 @@ public:
inline SwFldMgr& GetFldMgr() { return m_aMgr; }
void SetWrtShell( SwWrtShell* m_pWrtShell );
- void EditNewField( BOOL bOnlyActivate = FALSE );
- virtual USHORT GetGroup() = 0;
+ void EditNewField( sal_Bool bOnlyActivate = sal_False );
+ virtual sal_uInt16 GetGroup() = 0;
};
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 5b7845223143..dcd3da028195 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -65,7 +65,7 @@ SV_IMPL_PTRARR( _SwSeqFldList, _SeqFldLstElem* )
#define REFFLDFLAG_NUMITEM 0x7200
// <--
-USHORT nFldDlgFmtSel = 0;
+sal_uInt16 nFldDlgFmtSel = 0;
#define USER_DATA_VERSION_1 "1"
#define USER_DATA_VERSION USER_DATA_VERSION_1
@@ -112,7 +112,7 @@ SwFldRefPage::SwFldRefPage(Window* pParent, const SfxItemSet& rCoreSet ) :
// --> OD 2007-11-21 #i83479#
aSelectionToolTipLB.SetSelectHdl( LINK(this, SwFldRefPage, SubTypeHdl) );
aSelectionToolTipLB.SetDoubleClickHdl( LINK(this, SwFldRefPage, InsertHdl) );
- aSelectionToolTipLB.SetWindowBits( aSelectionToolTipLB.GetWindowBits() | WB_HSCROLL );
+ aSelectionToolTipLB.SetStyle( aSelectionToolTipLB.GetStyle() | WB_HSCROLL );
aSelectionToolTipLB.SetSpaceBetweenEntries(1);
aSelectionToolTipLB.SetHighlightRange();
// <--
@@ -132,7 +132,7 @@ void SwFldRefPage::SaveSelectedTxtNode()
SvLBoxEntry* pEntry = aSelectionToolTipLB.GetCurEntry();
if ( pEntry )
{
- const USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ const sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
SwWrtShell *pSh = GetWrtShell();
if ( !pSh )
{
@@ -140,7 +140,7 @@ void SwFldRefPage::SaveSelectedTxtNode()
}
if ( nTypeId == REFFLDFLAG_HEADING )
{
- mnSavedSelectedPos = static_cast<sal_uInt16>(reinterpret_cast<ULONG>(pEntry->GetUserData()));
+ mnSavedSelectedPos = static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(pEntry->GetUserData()));
if ( mnSavedSelectedPos < maOutlineNodes.size() )
{
mpSavedSelectedTxtNode = maOutlineNodes[mnSavedSelectedPos];
@@ -148,7 +148,7 @@ void SwFldRefPage::SaveSelectedTxtNode()
}
else if ( nTypeId == REFFLDFLAG_NUMITEM )
{
- mnSavedSelectedPos = static_cast<sal_uInt16>(reinterpret_cast<ULONG>(pEntry->GetUserData()));
+ mnSavedSelectedPos = static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(pEntry->GetUserData()));
if ( mnSavedSelectedPos < maNumItems.size() )
{
mpSavedSelectedTxtNode = maNumItems[mnSavedSelectedPos]->GetTxtNode();
@@ -184,18 +184,18 @@ void SwFldRefPage::Reset(const SfxItemSet& )
Init(); // general initialisation
// initialise TypeListBox
- aTypeLB.SetUpdateMode(FALSE);
+ aTypeLB.SetUpdateMode(sal_False);
aTypeLB.Clear();
// fill Type-Listbox
- USHORT nPos;
+ sal_uInt16 nPos;
// set/insert reference
const SwFldGroupRgn& rRg = GetFldMgr().GetGroupRange(IsFldDlgHtmlMode(), GetGroup());
for (short i = rRg.nStart; i < rRg.nEnd; ++i)
{
- const USHORT nTypeId = GetFldMgr().GetTypeId(i);
+ const sal_uInt16 nTypeId = GetFldMgr().GetTypeId(i);
if (!IsFldEdit() || nTypeId != TYP_SETREFFLD)
{
@@ -217,9 +217,9 @@ void SwFldRefPage::Reset(const SfxItemSet& )
if(!pSh)
pSh = ::GetActiveWrtShell();
- USHORT nFldTypeCnt = pSh->GetFldTypeCount(RES_SETEXPFLD);
+ sal_uInt16 nFldTypeCnt = pSh->GetFldTypeCount(RES_SETEXPFLD);
- for (USHORT n = 0; n < nFldTypeCnt; ++n)
+ for (sal_uInt16 n = 0; n < nFldTypeCnt; ++n)
{
SwSetExpFieldType* pType = (SwSetExpFieldType*)pSh->GetFldType(n, RES_SETEXPFLD);
@@ -252,7 +252,7 @@ void SwFldRefPage::Reset(const SfxItemSet& )
if (!IsFldEdit())
RestorePos(&aTypeLB);
- aTypeLB.SetUpdateMode(TRUE);
+ aTypeLB.SetUpdateMode(sal_True);
nFldDlgFmtSel = 0;
@@ -263,11 +263,11 @@ void SwFldRefPage::Reset(const SfxItemSet& )
EqualsIgnoreCaseAscii(USER_DATA_VERSION_1))
{
String sVal = sUserData.GetToken(1, ';');
- USHORT nVal = static_cast< USHORT >(sVal.ToInt32());
+ sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.ToInt32());
if(nVal != USHRT_MAX)
{
- for(USHORT i = 0; i < aTypeLB.GetEntryCount(); i++)
- if(nVal == (USHORT)(ULONG)aTypeLB.GetEntryData(i))
+ for(sal_uInt16 i = 0; i < aTypeLB.GetEntryCount(); i++)
+ if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i))
{
aTypeLB.SelectEntryPos(i);
break;
@@ -290,7 +290,7 @@ void SwFldRefPage::Reset(const SfxItemSet& )
IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
{
// save old ListBoxPos
- const USHORT nOld = GetTypeSel();
+ const sal_uInt16 nOld = GetTypeSel();
// current ListBoxPos
SetTypeSel(aTypeLB.GetSelectEntryPos());
@@ -301,7 +301,7 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
{
// select positions
String sName;
- USHORT nFlag = 0;
+ sal_uInt16 nFlag = 0;
switch( GetCurField()->GetSubType() )
{
@@ -353,7 +353,7 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
if (aTypeLB.GetEntryPos(sName) == LISTBOX_ENTRY_NOTFOUND) // reference to deleted mark
{
- USHORT nPos = aTypeLB.InsertEntry(sName);
+ sal_uInt16 nPos = aTypeLB.InsertEntry(sName);
aTypeLB.SetEntryData(nPos, reinterpret_cast<void*>(nFlag));
}
@@ -369,12 +369,12 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
if (nOld != GetTypeSel())
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
// fill selection-ListBox
UpdateSubType();
- BOOL bName = FALSE; nFldDlgFmtSel = 0;
+ sal_Bool bName = sal_False; nFldDlgFmtSel = 0;
if ( ( !IsFldEdit() || aSelectionLB.GetEntryCount() ) &&
nOld != LISTBOX_ENTRY_NOTFOUND )
@@ -386,23 +386,23 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
switch (nTypeId)
{
case TYP_GETREFFLD:
- if (REFFLDFLAG & (USHORT)(ULONG)aTypeLB.GetEntryData(nOld))
+ if (REFFLDFLAG & (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(nOld))
// the the old one stays
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;
// no 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 )
// then the old one stays
nFldDlgFmtSel = aFormatLB.GetSelectEntryPos();
@@ -414,8 +414,8 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
aNameFT.Enable(bName);
// fill Format-Listbox
- USHORT nSize = FillFormatLB(nTypeId);
- BOOL bFormat = nSize != 0;
+ sal_uInt16 nSize = FillFormatLB(nTypeId);
+ sal_Bool bFormat = nSize != 0;
aFormatLB.Enable(bFormat);
aFormatFT.Enable(bFormat);
@@ -428,7 +428,7 @@ IMPL_LINK( SwFldRefPage, TypeHdl, ListBox *, EMPTYARG )
IMPL_LINK( SwFldRefPage, SubTypeHdl, ListBox *, EMPTYARG )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
switch(nTypeId)
{
@@ -484,13 +484,13 @@ void SwFldRefPage::UpdateSubType()
if(!pSh)
pSh = ::GetActiveWrtShell();
SwGetRefField* pRefFld = (SwGetRefField*)GetCurField();
- const USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ const sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
String sOldSel;
// --> OD 2007-11-22 #i83479#
if ( aSelectionLB.IsVisible() )
{
- const USHORT nSelectionSel = aSelectionLB.GetSelectEntryPos();
+ const sal_uInt16 nSelectionSel = aSelectionLB.GetSelectEntryPos();
if (nSelectionSel != LISTBOX_ENTRY_NOTFOUND)
{
sOldSel = aSelectionLB.GetEntry(nSelectionSel);
@@ -500,10 +500,10 @@ void SwFldRefPage::UpdateSubType()
if (IsFldEdit() && !sOldSel.Len())
sOldSel = String::CreateFromInt32( pRefFld->GetSeqNo() + 1 );
- aSelectionLB.SetUpdateMode(FALSE);
+ aSelectionLB.SetUpdateMode(sal_False);
aSelectionLB.Clear();
// --> OD 2007-11-21 #i83479#
- aSelectionToolTipLB.SetUpdateMode(FALSE);
+ aSelectionToolTipLB.SetUpdateMode(sal_False);
aSelectionToolTipLB.Clear();
bool bShowSelectionToolTipLB( false );
// <--
@@ -530,9 +530,9 @@ void SwFldRefPage::UpdateSubType()
{
aSelectionLB.SetStyle(aSelectionLB.GetStyle() & ~WB_SORT);
SwSeqFldList aArr;
- USHORT nCnt = pSh->GetSeqFtnList( aArr );
+ sal_uInt16 nCnt = pSh->GetSeqFtnList( aArr );
- for( USHORT n = 0; n < nCnt; ++n )
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
aSelectionLB.InsertEntry( aArr[ n ]->sDlgEntry );
if (IsFldEdit() && pRefFld->GetSeqNo() == aArr[ n ]->nSeqNo)
@@ -543,9 +543,9 @@ void SwFldRefPage::UpdateSubType()
{
aSelectionLB.SetStyle(aSelectionLB.GetStyle() & ~WB_SORT);
SwSeqFldList aArr;
- USHORT nCnt = pSh->GetSeqFtnList( aArr, true );
+ sal_uInt16 nCnt = pSh->GetSeqFtnList( aArr, true );
- for( USHORT n = 0; n < nCnt; ++n )
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
aSelectionLB.InsertEntry( aArr[ n ]->sDlgEntry );
if (IsFldEdit() && pRefFld->GetSeqNo() == aArr[ n ]->nSeqNo)
@@ -628,8 +628,8 @@ void SwFldRefPage::UpdateSubType()
if(IsFldEdit())
sOldSel.Erase();
- USHORT nCnt = pType->GetSeqFldList( aArr );
- for( USHORT n = 0; n < nCnt; ++n )
+ sal_uInt16 nCnt = pType->GetSeqFldList( aArr );
+ for( sal_uInt16 n = 0; n < nCnt; ++n )
{
aSelectionLB.InsertEntry( aArr[ n ]->sDlgEntry );
if (IsFldEdit() && !sOldSel.Len() &&
@@ -646,7 +646,7 @@ void SwFldRefPage::UpdateSubType()
{
SvStringsDtor aLst;
GetFldMgr().GetSubTypes(nTypeId, aLst);
- for (USHORT i = 0; i < aLst.Count(); ++i)
+ for (sal_uInt16 i = 0; i < aLst.Count(); ++i)
aSelectionLB.InsertEntry(*aLst[i]);
if (IsFldEdit())
@@ -658,9 +658,9 @@ void SwFldRefPage::UpdateSubType()
aSelectionLB.Show( !bShowSelectionToolTipLB );
if ( bShowSelectionToolTipLB )
{
- aSelectionToolTipLB.SetUpdateMode(TRUE);
+ aSelectionToolTipLB.SetUpdateMode(sal_True);
- BOOL bEnable = aSelectionToolTipLB.GetEntryCount() != 0;
+ sal_Bool bEnable = aSelectionToolTipLB.GetEntryCount() != 0;
aSelectionToolTipLB.Enable( bEnable );
aSelectionFT.Enable( bEnable );
@@ -676,10 +676,10 @@ void SwFldRefPage::UpdateSubType()
}
else
{
- aSelectionLB.SetUpdateMode(TRUE);
+ aSelectionLB.SetUpdateMode(sal_True);
// enable or disable
- BOOL bEnable = aSelectionLB.GetEntryCount() != 0;
+ sal_Bool bEnable = aSelectionLB.GetEntryCount() != 0;
aSelectionLB.Enable( bEnable );
aSelectionFT.Enable( bEnable );
@@ -696,11 +696,11 @@ void SwFldRefPage::UpdateSubType()
// <--
}
-USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId)
+sal_uInt16 SwFldRefPage::FillFormatLB(sal_uInt16 nTypeId)
{
String sOldSel;
- USHORT nFormatSel = aFormatLB.GetSelectEntryPos();
+ sal_uInt16 nFormatSel = aFormatLB.GetSelectEntryPos();
if (nFormatSel != LISTBOX_ENTRY_NOTFOUND)
sOldSel = aFormatLB.GetEntry(nFormatSel);
@@ -708,7 +708,7 @@ USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId)
aFormatLB.Clear();
// refernce has less that the annotation
- USHORT nSize( 0 );
+ sal_uInt16 nSize( 0 );
bool bAddCrossRefFormats( false );
switch (nTypeId)
{
@@ -735,7 +735,7 @@ USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId)
}
else
{
- nSize = GetFldMgr().GetFormatCount( nTypeId, FALSE, IsFldDlgHtmlMode() );
+ nSize = GetFldMgr().GetFormatCount( nTypeId, sal_False, IsFldDlgHtmlMode() );
}
break;
}
@@ -743,16 +743,16 @@ USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId)
if (REFFLDFLAG & nTypeId)
nTypeId = TYP_GETREFFLD;
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
{
- USHORT nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr( nTypeId, i ));
+ sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr( nTypeId, i ));
aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, i )));
}
// --> OD 2007-11-16 #i83479#
if ( bAddCrossRefFormats )
{
- USHORT nFormat = FMT_REF_NUMBER - FMT_REF_BEGIN;
- USHORT nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr( nTypeId, nFormat ));
+ sal_uInt16 nFormat = FMT_REF_NUMBER - FMT_REF_BEGIN;
+ sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr( nTypeId, nFormat ));
aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, nFormat )));
nFormat = FMT_REF_NUMBER_NO_CONTEXT - FMT_REF_BEGIN;
nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr( nTypeId, nFormat ));
@@ -770,7 +770,7 @@ USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId)
if (!IsFldEdit())
aFormatLB.SelectEntry(sOldSel);
else
- aFormatLB.SelectEntry(SW_RESSTR(FMT_REF_BEGIN + (USHORT)GetCurField()->GetFormat()));
+ aFormatLB.SelectEntry(SW_RESSTR(FMT_REF_BEGIN + (sal_uInt16)GetCurField()->GetFormat()));
if (!aFormatLB.GetSelectEntryCount())
{
@@ -790,15 +790,15 @@ USHORT SwFldRefPage::FillFormatLB(USHORT nTypeId)
IMPL_LINK( SwFldRefPage, ModifyHdl, Edit *, EMPTYARG )
{
String aName(aNameED.GetText());
- const USHORT nLen = aName.Len();
+ const sal_uInt16 nLen = aName.Len();
- BOOL bEnable = TRUE;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_Bool bEnable = sal_True;
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
if ((nTypeId == TYP_SETREFFLD && !GetFldMgr().CanInsertRefMark(aName)) ||
(nLen == 0 && (nTypeId == TYP_GETREFFLD || nTypeId == TYP_SETREFFLD ||
nTypeId == REFFLDFLAG_BOOKMARK)))
- bEnable = FALSE;
+ bEnable = sal_False;
EnableInsert(bEnable);
@@ -807,20 +807,20 @@ IMPL_LINK( SwFldRefPage, ModifyHdl, Edit *, EMPTYARG )
return 0;
}
-BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
+sal_Bool SwFldRefPage::FillItemSet(SfxItemSet& )
{
- BOOL bModified = FALSE;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_Bool bModified = sal_False;
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
- USHORT nSubType = 0;
- ULONG nFormat;
+ sal_uInt16 nSubType = 0;
+ sal_uLong nFormat;
nFormat = aFormatLB.GetSelectEntryPos();
if(nFormat == LISTBOX_ENTRY_NOTFOUND)
nFormat = 0;
else
- nFormat = (ULONG)aFormatLB.GetEntryData((USHORT)nFormat);
+ nFormat = (sal_uLong)aFormatLB.GetEntryData((sal_uInt16)nFormat);
String aVal(aValueED.GetText());
String aName(aNameED.GetText());
@@ -865,7 +865,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
SwSeqFldList aArr;
_SeqFldLstElem aElem( aSelectionLB.GetSelectEntry(), 0 );
- USHORT nPos;
+ sal_uInt16 nPos;
nTypeId = TYP_GETREFFLD;
nSubType = REF_FOOTNOTE;
@@ -876,7 +876,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
aVal = String::CreateFromInt32( aArr[nPos]->nSeqNo );
if (IsFldEdit() && aArr[nPos]->nSeqNo == pRefFld->GetSeqNo())
- bModified = TRUE; // can happen with fields of which the references were deleted
+ bModified = sal_True; // can happen with fields of which the references were deleted
}
else if (IsFldEdit())
aVal = String::CreateFromInt32( pRefFld->GetSeqNo() );
@@ -886,7 +886,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
SwSeqFldList aArr;
_SeqFldLstElem aElem( aSelectionLB.GetSelectEntry(), 0 );
- USHORT nPos;
+ sal_uInt16 nPos;
nTypeId = TYP_GETREFFLD;
nSubType = REF_ENDNOTE;
@@ -897,7 +897,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
aVal = String::CreateFromInt32( aArr[nPos]->nSeqNo );
if (IsFldEdit() && aArr[nPos]->nSeqNo == pRefFld->GetSeqNo())
- bModified = TRUE; // can happen with fields of which the reference was deleted
+ bModified = sal_True; // can happen with fields of which the reference was deleted
}
else if (IsFldEdit())
aVal = String::CreateFromInt32( pRefFld->GetSeqNo() );
@@ -910,7 +910,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
"<SwFldRefPage::FillItemSet(..)> - no entry selected in selection tool tip listbox!" );
if ( pEntry )
{
- const sal_uInt16 nOutlIdx( static_cast<sal_uInt16>(reinterpret_cast<ULONG>(pEntry->GetUserData())) );
+ const sal_uInt16 nOutlIdx( static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(pEntry->GetUserData())) );
pSh->getIDocumentOutlineNodesAccess()->getOutlineNodes( maOutlineNodes );
if ( nOutlIdx < maOutlineNodes.size() )
{
@@ -930,7 +930,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
"<SwFldRefPage::FillItemSet(..)> - no entry selected in selection tool tip listbox!" );
if ( pEntry )
{
- const sal_uInt16 nNumItemIdx( static_cast<sal_uInt16>(reinterpret_cast<ULONG>(pEntry->GetUserData())) );
+ const sal_uInt16 nNumItemIdx( static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(pEntry->GetUserData())) );
pSh->getIDocumentListItemsAccess()->getNumItems( maNumItems );
if ( nNumItemIdx < maNumItems.size() )
{
@@ -954,7 +954,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
SwSeqFldList aArr;
_SeqFldLstElem aElem( aSelectionLB.GetSelectEntry(), 0 );
- USHORT nPos;
+ sal_uInt16 nPos;
nTypeId = TYP_GETREFFLD;
nSubType = REF_SEQUENCEFLD;
@@ -965,7 +965,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
aVal = String::CreateFromInt32( aArr[nPos]->nSeqNo );
if (IsFldEdit() && aArr[nPos]->nSeqNo == pRefFld->GetSeqNo())
- bModified = TRUE; // can happen with fields of which the reference was deleted
+ bModified = sal_True; // can happen with fields of which the reference was deleted
}
else if (IsFldEdit())
aVal = String::CreateFromInt32( pRefFld->GetSeqNo() );
@@ -991,7 +991,7 @@ BOOL SwFldRefPage::FillItemSet(SfxItemSet& )
ModifyHdl(); // enable/disable insert if applicable
- return FALSE;
+ return sal_False;
}
SfxTabPage* SwFldRefPage::Create( Window* pParent,
@@ -1000,7 +1000,7 @@ SfxTabPage* SwFldRefPage::Create( Window* pParent,
return ( new SwFldRefPage( pParent, rAttrSet ) );
}
-USHORT SwFldRefPage::GetGroup()
+sal_uInt16 SwFldRefPage::GetGroup()
{
return GRP_REF;
}
@@ -1010,11 +1010,11 @@ void SwFldRefPage::FillUserData()
String sData( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( USER_DATA_VERSION )));
sData += ';';
- USHORT nTypeSel = aTypeLB.GetSelectEntryPos();
+ sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
else
- nTypeSel = sal::static_int_cast< USHORT >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel )));
+ nTypeSel = sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel )));
sData += String::CreateFromInt32( nTypeSel );
SetUserData(sData);
}
diff --git a/sw/source/ui/fldui/fldref.hxx b/sw/source/ui/fldui/fldref.hxx
index b1daeaf3684f..f0b407c36ecf 100644
--- a/sw/source/ui/fldui/fldref.hxx
+++ b/sw/source/ui/fldui/fldref.hxx
@@ -80,7 +80,7 @@ class SwFldRefPage : public SwFldPage
DECL_LINK( ModifyHdl, Edit *pEd = 0 );
void UpdateSubType();
- USHORT FillFormatLB(USHORT nTypeId);
+ sal_uInt16 FillFormatLB(sal_uInt16 nTypeId);
// --> OD 2007-12-05 #i83479#
void SaveSelectedTxtNode();
@@ -89,7 +89,7 @@ class SwFldRefPage : public SwFldPage
// <--
protected:
- virtual USHORT GetGroup();
+ virtual sal_uInt16 GetGroup();
public:
SwFldRefPage(Window* pParent, const SfxItemSet& rSet);
@@ -98,7 +98,7 @@ public:
static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void FillUserData();
diff --git a/sw/source/ui/fldui/fldref.src b/sw/source/ui/fldui/fldref.src
index 847c9358db69..5a589e276592 100644
--- a/sw/source/ui/fldui/fldref.src
+++ b/sw/source/ui/fldui/fldref.src
@@ -43,6 +43,7 @@ TabPage TP_FLD_REF
};
ListBox LB_REFTYPE
{
+ HelpID = "sw:ListBox:TP_FLD_REF:LB_REFTYPE";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 14 ) ;
Size = MAP_APPFONT ( 76 , 165 ) ;
@@ -58,6 +59,7 @@ TabPage TP_FLD_REF
};
ListBox LB_REFSELECTION
{
+ HelpID = "sw:ListBox:TP_FLD_REF:LB_REFSELECTION";
Border = TRUE ;
Pos = MAP_APPFONT ( 88 , 14 ) ;
Size = MAP_APPFONT ( 166 , 73 ) ;
@@ -82,6 +84,7 @@ TabPage TP_FLD_REF
};
ListBox LB_REFFORMAT
{
+ HelpID = "sw:ListBox:TP_FLD_REF:LB_REFFORMAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 88 , 104 ) ;
Size = MAP_APPFONT ( 76 , 75 ) ;
@@ -98,6 +101,7 @@ TabPage TP_FLD_REF
};
Edit ED_REFNAME
{
+ HelpID = "sw:Edit:TP_FLD_REF:ED_REFNAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 170 , 104 ) ;
Size = MAP_APPFONT ( 84 , 12 ) ;
@@ -114,6 +118,7 @@ TabPage TP_FLD_REF
};
Edit ED_REFVALUE
{
+ HelpID = "sw:Edit:TP_FLD_REF:ED_REFVALUE";
Border = TRUE ;
Pos = MAP_APPFONT ( 170 , 136 ) ;
Size = MAP_APPFONT ( 84 , 12 ) ;
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx
index e5ef080abfc1..2c97dedcee18 100644
--- a/sw/source/ui/fldui/fldtdlg.cxx
+++ b/sw/source/ui/fldui/fldtdlg.cxx
@@ -75,7 +75,7 @@ SwFldDlg::SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent)
: SfxTabDialog( pParent, SW_RES( DLG_FLD_INSERT )),
m_pChildWin(pCW),
m_pBindings(pB),
- m_bDataBaseMode(FALSE)
+ m_bDataBaseMode(sal_False)
{
SetStyle(GetStyle()|WB_STDMODELESS);
m_bHtmlMode = (::GetHtmlMode((SwDocShell*)SfxObjectShell::Current()) & HTMLMODE_ON) != 0;
@@ -133,12 +133,12 @@ SwFldDlg::~SwFldDlg()
{
}
-BOOL SwFldDlg::Close()
+sal_Bool SwFldDlg::Close()
{
m_pBindings->GetDispatcher()->
Execute(m_bDataBaseMode ? FN_INSERT_FIELD_DATA_ONLY : FN_INSERT_FIELD,
SFX_CALLMODE_ASYNCHRON|SFX_CALLMODE_RECORD);
- return TRUE;
+ return sal_True;
}
void SwFldDlg::Initialize(SfxChildWinInfo *pInfo)
@@ -187,7 +187,7 @@ void SwFldDlg::Initialize(SfxChildWinInfo *pInfo)
SetPosPixel( aPos );
}
-SfxItemSet* SwFldDlg::CreateInputItemSet( USHORT nID )
+SfxItemSet* SwFldDlg::CreateInputItemSet( sal_uInt16 nID )
{
if ( nID == TP_FLD_DOKINF )
{
@@ -232,7 +232,7 @@ IMPL_LINK( SwFldDlg, OKHdl, Button *, EMPTYARG )
void SwFldDlg::ReInitDlg()
{
SwDocShell* pDocSh = (SwDocShell*)SfxObjectShell::Current();
- BOOL bNewMode = (::GetHtmlMode(pDocSh) & HTMLMODE_ON) != 0;
+ sal_Bool bNewMode = (::GetHtmlMode(pDocSh) & HTMLMODE_ON) != 0;
if (bNewMode != m_bHtmlMode)
{
@@ -266,7 +266,7 @@ void SwFldDlg::ReInitDlg()
Description: newly initialise TabPage after Doc-Switch
--------------------------------------------------------------------*/
-void SwFldDlg::ReInitTabPage( USHORT nPageId, BOOL bOnlyActivate )
+void SwFldDlg::ReInitTabPage( sal_uInt16 nPageId, sal_Bool bOnlyActivate )
{
SwFldPage* pPage = (SwFldPage* )GetTabPage(nPageId);
@@ -283,22 +283,22 @@ void SwFldDlg::Activate()
SwView* pView = ::GetActiveView();
if( pView )
{
- BOOL bHtmlMode = (::GetHtmlMode((SwDocShell*)SfxObjectShell::Current()) & HTMLMODE_ON) != 0;
+ sal_Bool bHtmlMode = (::GetHtmlMode((SwDocShell*)SfxObjectShell::Current()) & HTMLMODE_ON) != 0;
const SwWrtShell& rSh = pView->GetWrtShell();
GetOKButton().Enable( !rSh.IsReadOnlyAvailable() ||
!rSh.HasReadonlySel() );
- ReInitTabPage( TP_FLD_VAR, TRUE );
+ ReInitTabPage( TP_FLD_VAR, sal_True );
if( !bHtmlMode )
{
- ReInitTabPage( TP_FLD_REF, TRUE );
- ReInitTabPage( TP_FLD_FUNC, TRUE );
+ ReInitTabPage( TP_FLD_REF, sal_True );
+ ReInitTabPage( TP_FLD_FUNC, sal_True );
}
}
}
-void SwFldDlg::EnableInsert(BOOL bEnable)
+void SwFldDlg::EnableInsert(sal_Bool bEnable)
{
if( bEnable )
{
@@ -307,7 +307,7 @@ void SwFldDlg::EnableInsert(BOOL bEnable)
if( !pView ||
(pView->GetWrtShell().IsReadOnlyAvailable() &&
pView->GetWrtShell().HasReadonlySel()) )
- bEnable = FALSE;
+ bEnable = sal_False;
}
GetOKButton().Enable(bEnable);
}
@@ -319,7 +319,7 @@ void SwFldDlg::InsertHdl()
void SwFldDlg::ActivateDatabasePage()
{
- m_bDataBaseMode = TRUE;
+ m_bDataBaseMode = sal_True;
ShowPage( TP_FLD_DB );
SfxTabPage* pDBPage = GetTabPage( TP_FLD_DB );
if( pDBPage )
@@ -334,7 +334,7 @@ void SwFldDlg::ActivateDatabasePage()
RemoveTabPage(TP_FLD_FUNC);
}
-void SwFldDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
+void SwFldDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
{
if( TP_FLD_DB == nId)
{
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index c51cc645c6d2..3167b3a22dd6 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -74,7 +74,7 @@ SwFldVarPage::SwFldVarPage(Window* pParent, const SfxItemSet& rCoreSet ) :
aSeparatorFT (this, SW_RES(FT_VARSEPARATOR)),
aSeparatorED (this, SW_RES(ED_VARSEPARATOR)),
aNewDelTBX (this, SW_RES(TBX_VARNEWDEL)),
- bInit (TRUE)
+ bInit (sal_True)
{
FreeResource();
@@ -89,12 +89,12 @@ SwFldVarPage::SwFldVarPage(Window* pParent, const SfxItemSet& rCoreSet ) :
sOldValueFT = aValueFT.GetText();
sOldNameFT = aNameFT.GetText();
- for (USHORT i = 1; i <= MAXLEVEL; i++)
+ for (sal_uInt16 i = 1; i <= MAXLEVEL; i++)
aChapterLevelLB.InsertEntry(String::CreateFromInt32(i));
aChapterLevelLB.SelectEntryPos(0);
//enable 'active' language selection
- aNumFormatLB.SetShowLanguageControl(TRUE);
+ aNumFormatLB.SetShowLanguageControl(sal_True);
}
SwFldVarPage::~SwFldVarPage()
@@ -107,10 +107,10 @@ void SwFldVarPage::Reset(const SfxItemSet& )
Init(); // general initialisation
- aTypeLB.SetUpdateMode(FALSE);
+ aTypeLB.SetUpdateMode(sal_False);
aTypeLB.Clear();
- USHORT nPos, nTypeId;
+ sal_uInt16 nPos, nTypeId;
if (!IsFldEdit())
{
@@ -165,11 +165,11 @@ void SwFldVarPage::Reset(const SfxItemSet& )
if(!IsRefresh() && sUserData.GetToken(0, ';').EqualsIgnoreCaseAscii(USER_DATA_VERSION_1))
{
String sVal = sUserData.GetToken(1, ';');
- USHORT nVal = (USHORT)sVal.ToInt32();
+ sal_uInt16 nVal = (sal_uInt16)sVal.ToInt32();
if( USHRT_MAX != nVal )
{
- for(USHORT i = 0; i < aTypeLB.GetEntryCount(); i++)
- if(nVal == (USHORT)(ULONG)aTypeLB.GetEntryData(i))
+ for(sal_uInt16 i = 0; i < aTypeLB.GetEntryCount(); i++)
+ if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i))
{
aTypeLB.SelectEntryPos(i);
break;
@@ -179,7 +179,7 @@ void SwFldVarPage::Reset(const SfxItemSet& )
}
TypeHdl(0);
- aTypeLB.SetUpdateMode(TRUE);
+ aTypeLB.SetUpdateMode(sal_True);
if (IsFldEdit())
{
@@ -197,7 +197,7 @@ void SwFldVarPage::Reset(const SfxItemSet& )
IMPL_LINK( SwFldVarPage, TypeHdl, ListBox *, EMPTYARG )
{
// save old ListBoxPos
- const USHORT nOld = GetTypeSel();
+ const sal_uInt16 nOld = GetTypeSel();
// current ListBoxPos
SetTypeSel(aTypeLB.GetSelectEntryPos());
@@ -210,29 +210,29 @@ IMPL_LINK( SwFldVarPage, TypeHdl, ListBox *, EMPTYARG )
if (nOld != GetTypeSel() || nOld == LISTBOX_ENTRY_NOTFOUND)
{
- bInit = TRUE;
+ bInit = sal_True;
if (nOld != LISTBOX_ENTRY_NOTFOUND)
{
aNameED.SetText(aEmptyStr);
aValueED.SetText(aEmptyStr);
}
- aValueED.SetDropEnable(FALSE);
+ aValueED.SetDropEnable(sal_False);
UpdateSubType(); // initialise selection-listboxes
}
- bInit = FALSE;
+ bInit = sal_False;
return 0;
}
IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
- USHORT nSelPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nSelPos = aSelectionLB.GetSelectEntryPos();
if (nSelPos != LISTBOX_ENTRY_NOTFOUND)
- nSelPos = (USHORT)(ULONG)aSelectionLB.GetEntryData(nSelPos);
+ nSelPos = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nSelPos);
if (IsFldEdit() && (!pBox || bInit))
{
@@ -247,15 +247,15 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if (aValueFT.GetText() != sOldValueFT)
aValueFT.SetText(sOldValueFT);
- aNumFormatLB.SetUpdateMode(FALSE);
- aFormatLB.SetUpdateMode(FALSE);
+ aNumFormatLB.SetUpdateMode(sal_False);
+ aFormatLB.SetUpdateMode(sal_False);
FillFormatLB(nTypeId);
- USHORT nSize = aFormatLB.GetEntryCount();
+ sal_uInt16 nSize = aFormatLB.GetEntryCount();
- BOOL bValue = FALSE, bName = FALSE, bNumFmt = FALSE,
- bInvisible = FALSE, bSeparator = FALSE, bChapterLevel = FALSE;
- BOOL bFormat = nSize != 0;
+ sal_Bool bValue = sal_False, bName = sal_False, bNumFmt = sal_False,
+ bInvisible = sal_False, bSeparator = sal_False, bChapterLevel = sal_False;
+ sal_Bool bFormat = nSize != 0;
switch (nTypeId)
{
@@ -293,23 +293,23 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
aValueED.SetText(aEmptyStr);
}
}
- bValue = bName = bNumFmt = bInvisible = TRUE;
+ bValue = bName = bNumFmt = bInvisible = sal_True;
- aValueED.SetDropEnable(TRUE);
+ aValueED.SetDropEnable(sal_True);
break;
}
case TYP_SETFLD:
- bValue = TRUE;
+ bValue = sal_True;
- bNumFmt = bInvisible = TRUE;
+ bNumFmt = bInvisible = sal_True;
if (!IsFldDlgHtmlMode())
- bName = TRUE;
+ bName = sal_True;
else
{
aNumFormatLB.Clear();
- USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0);
+ sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
aNumFormatLB.SelectEntryPos(0);
}
@@ -346,15 +346,15 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
// (instead of test2 = test + 1)
aValueED.SetText(((SwSetExpField*)GetCurField())->GetFormula());
}
- aValueED.SetDropEnable(TRUE);
+ aValueED.SetDropEnable(sal_True);
break;
case TYP_FORMELFLD:
{
- bValue = TRUE;
- bNumFmt = TRUE;
+ bValue = sal_True;
+ bNumFmt = sal_True;
aValueFT.SetText(SW_RESSTR(STR_FORMULA));
- aValueED.SetDropEnable(TRUE);
+ aValueED.SetDropEnable(sal_True);
}
break;
@@ -384,14 +384,14 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if(pSetTyp)
{
if (pSetTyp->GetType() & nsSwGetSetExpType::GSE_STRING) // textual?
- bFormat = TRUE;
+ bFormat = sal_True;
else // numeric
- bNumFmt = TRUE;
+ bNumFmt = sal_True;
}
}
}
else
- bFormat = FALSE;
+ bFormat = sal_False;
EnableInsert(bFormat|bNumFmt);
}
@@ -402,7 +402,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if (nSelPos != LISTBOX_ENTRY_NOTFOUND)
{
- bValue = bNumFmt = TRUE;
+ bValue = bNumFmt = sal_True;
String sName;
@@ -410,8 +410,8 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
aNameED.SetText( sName );
// User- or SetField ?
- USHORT nInpType = 0;
- nInpType = static_cast< USHORT >(GetFldMgr().GetFldType(RES_USERFLD, sName) ? 0 : TYP_SETINPFLD);
+ sal_uInt16 nInpType = 0;
+ nInpType = static_cast< sal_uInt16 >(GetFldMgr().GetFldType(RES_USERFLD, sName) ? 0 : TYP_SETINPFLD);
if (nInpType) // SETEXPFLD
{
@@ -425,7 +425,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
{
aNumFormatLB.Clear();
- USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_USERVAR_TEXT), 0);
+ sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_USERVAR_TEXT), 0);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
aNumFormatLB.SelectEntryPos(0);
}
@@ -434,7 +434,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
aValueED.SetText(((SwSetExpField*)GetCurField())->GetPromptText());
}
else // USERFLD
- bFormat = bNumFmt = FALSE;
+ bFormat = bNumFmt = sal_False;
}
break;
@@ -455,7 +455,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
//JP 28.08.95: DDE-Topics/-Items can have blanks in their names!
// That's not considered here yet
String sCmd( pType->GetCmd() );
- USHORT nTmpPos = sCmd.SearchAndReplace( sfx2::cTokenSeperator, ' ' );
+ sal_uInt16 nTmpPos = sCmd.SearchAndReplace( sfx2::cTokenSeperator, ' ' );
sCmd.SearchAndReplace( sfx2::cTokenSeperator, ' ', nTmpPos );
aValueED.SetText( sCmd );
@@ -463,12 +463,12 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
}
}
}
- bName = bValue = TRUE;
+ bName = bValue = sal_True;
break;
case TYP_SEQFLD:
{
- bName = bValue = bSeparator = bChapterLevel = TRUE;
+ bName = bValue = bSeparator = bChapterLevel = sal_True;
SwFieldType* pFldTyp;
if( IsFldEdit() )
@@ -492,7 +492,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if( pFldTyp )
{
- BYTE nLevel = ((SwSetExpFieldType*)pFldTyp)->GetOutlineLvl();
+ sal_uInt8 nLevel = ((SwSetExpFieldType*)pFldTyp)->GetOutlineLvl();
if( 0x7f == nLevel )
aChapterLevelLB.SelectEntryPos( 0 );
else
@@ -506,7 +506,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
case TYP_SETREFPAGEFLD:
{
- bValue = FALSE;
+ bValue = sal_False;
aValueFT.SetText( SW_RESSTR( STR_OFFSET ));
if (IsFldEdit() || pBox) // only when interacting via mouse
@@ -514,7 +514,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if (nSelPos != 0 && nSelPos != LISTBOX_ENTRY_NOTFOUND)
{
- bValue = TRUE; // SubType OFF - knows no Offset
+ bValue = sal_True; // SubType OFF - knows no Offset
if (IsFldEdit())
aValueED.SetText(String::CreateFromInt32(((SwRefPageSetField*)GetCurField())->GetOffset()));
}
@@ -531,7 +531,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
aFormatLB.Show(!bNumFmt);
if (IsFldEdit())
- bName = FALSE;
+ bName = sal_False;
aFormatLB.Enable(bFormat);
aFormatFT.Enable(bFormat|bNumFmt);
@@ -559,12 +559,12 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
ModifyHdl(); // apply/insert/delete status update
- aNumFormatLB.SetUpdateMode(TRUE);
- aFormatLB.SetUpdateMode(TRUE);
+ aNumFormatLB.SetUpdateMode(sal_True);
+ aFormatLB.SetUpdateMode(sal_True);
if(aSelectionLB.IsCallAddSelection())
{
- nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
switch (nTypeId)
{
@@ -573,7 +573,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
nSelPos = aSelectionLB.GetSelectEntryPos();
if (nSelPos != LISTBOX_ENTRY_NOTFOUND)
- nSelPos = (USHORT)(ULONG)aSelectionLB.GetEntryData(nSelPos);
+ nSelPos = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nSelPos);
if (nSelPos != LISTBOX_ENTRY_NOTFOUND && pBox && !bInit)
{
@@ -594,22 +594,22 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
void SwFldVarPage::UpdateSubType()
{
String sOldSel;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
SetSelectionSel(aSelectionLB.GetSelectEntryPos());
if(GetSelectionSel() != LISTBOX_ENTRY_NOTFOUND)
sOldSel = aSelectionLB.GetEntry(GetSelectionSel());
// fill Selection-Listbox
- aSelectionLB.SetUpdateMode(FALSE);
+ aSelectionLB.SetUpdateMode(sal_False);
aSelectionLB.Clear();
SvStringsDtor aList;
GetFldMgr().GetSubTypes(nTypeId, aList);
- USHORT nCount = aList.Count();
- USHORT nPos;
+ sal_uInt16 nCount = aList.Count();
+ sal_uInt16 nPos;
- for (USHORT i = 0; i < nCount; ++i)
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
if (nTypeId != TYP_INPUTFLD || i)
{
@@ -620,29 +620,29 @@ void SwFldVarPage::UpdateSubType()
}
else
{
- BOOL bInsert = FALSE;
+ sal_Bool bInsert = sal_False;
switch (nTypeId)
{
case TYP_INPUTFLD:
if (*aList[i] == GetCurField()->GetPar1())
- bInsert = TRUE;
+ bInsert = sal_True;
break;
case TYP_FORMELFLD:
- bInsert = TRUE;
+ bInsert = sal_True;
break;
case TYP_GETFLD:
if (*aList[i] == ((SwFormulaField*)GetCurField())->GetFormula())
- bInsert = TRUE;
+ bInsert = sal_True;
break;
case TYP_SETFLD:
case TYP_USERFLD:
if (*aList[i] == GetCurField()->GetTyp()->GetName())
{
- bInsert = TRUE;
+ bInsert = sal_True;
if (GetCurField()->GetSubType() & nsSwExtendedSubType::SUB_INVISIBLE)
aInvisibleCB.Check();
}
@@ -660,7 +660,7 @@ void SwFldVarPage::UpdateSubType()
default:
if (*aList[i] == GetCurField()->GetPar1())
- bInsert = TRUE;
+ bInsert = sal_True;
break;
}
if (bInsert)
@@ -674,7 +674,7 @@ void SwFldVarPage::UpdateSubType()
}
}
- BOOL bEnable = aSelectionLB.GetEntryCount() != 0;
+ sal_Bool bEnable = aSelectionLB.GetEntryCount() != 0;
ListBox *pLB = 0;
if (bEnable)
@@ -691,19 +691,19 @@ void SwFldVarPage::UpdateSubType()
aSelectionFT.Enable( bEnable );
SubTypeHdl(pLB);
- aSelectionLB.SetUpdateMode(TRUE);
+ aSelectionLB.SetUpdateMode(sal_True);
}
-USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
+sal_uInt16 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId)
{
String sOldSel, sOldNumSel;
- ULONG nOldNumFormat = 0;
+ sal_uLong nOldNumFormat = 0;
- USHORT nFormatSel = aFormatLB.GetSelectEntryPos();
+ sal_uInt16 nFormatSel = aFormatLB.GetSelectEntryPos();
if (nFormatSel != LISTBOX_ENTRY_NOTFOUND)
sOldSel = aFormatLB.GetEntry(nFormatSel);
- USHORT nNumFormatSel = aNumFormatLB.GetSelectEntryPos();
+ sal_uInt16 nNumFormatSel = aNumFormatLB.GetSelectEntryPos();
if (nNumFormatSel != LISTBOX_ENTRY_NOTFOUND)
{
sOldNumSel = aNumFormatLB.GetEntry(nNumFormatSel);
@@ -713,7 +713,7 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
// fill Format-Listbox
aFormatLB.Clear();
aNumFormatLB.Clear();
- BOOL bSpecialFmt = FALSE;
+ sal_Bool bSpecialFmt = sal_False;
if( TYP_GETREFPAGEFLD != nTypeId )
{
@@ -745,7 +745,7 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
{
if (!IsFldEdit() || bSpecialFmt)
{
- USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_MARK_TEXT), 0);
+ sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_MARK_TEXT), 0);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_USERVAR_CMD), 1);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
@@ -757,7 +757,7 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
{
if (!IsFldEdit() || bSpecialFmt)
{
- USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0);
+ sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_SETVAR_TEXT), 0);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
}
}
@@ -765,14 +765,14 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
case TYP_FORMELFLD:
{
- USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0);
+ sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
}
break;
case TYP_GETFLD:
{
- USHORT nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0);
+ sal_uInt16 nPos = aNumFormatLB.InsertEntry(SW_RESSTR(FMT_GETVAR_NAME), 0);
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
}
break;
@@ -793,12 +793,12 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
aNumFormatLB.SelectEntry(sOldSel);
}
- USHORT nSize = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode());
+ sal_uInt16 nSize = GetFldMgr().GetFormatCount(nTypeId, sal_False, IsFldDlgHtmlMode());
- for (USHORT i = 0; i < nSize; i++)
+ for (sal_uInt16 i = 0; i < nSize; i++)
{
- USHORT nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
- USHORT nFldId = GetFldMgr().GetFormatId( nTypeId, i );
+ sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
+ sal_uInt16 nFldId = GetFldMgr().GetFormatId( nTypeId, i );
aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>(nFldId) );
if (IsFldEdit() && nFldId == GetCurField()->GetFormat())
aFormatLB.SelectEntryPos( nPos );
@@ -829,9 +829,9 @@ USHORT SwFldVarPage::FillFormatLB(USHORT nTypeId)
IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
{
String sValue(aValueED.GetText());
- BOOL bHasValue = sValue.Len() != 0;
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
- BOOL bInsert = FALSE, bApply = FALSE, bDelete = FALSE;
+ sal_Bool bHasValue = sValue.Len() != 0;
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
+ sal_Bool bInsert = sal_False, bApply = sal_False, bDelete = sal_False;
String sName( aNameED.GetText() );
xub_StrLen nLen = sName.Len();
@@ -861,7 +861,7 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
if( nLen )
{
// is there already a corrensponding type
- bInsert = bApply = TRUE;
+ bInsert = bApply = sal_True;
SwFieldType* pType = GetFldMgr().GetFldType(RES_DDEFLD, sName);
@@ -890,13 +890,13 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
{
// user fields can also be inserted without content!
// Bug #56845
- bInsert = bApply = TRUE;
+ bInsert = bApply = sal_True;
}
}
break;
default:
- bInsert = TRUE;
+ bInsert = sal_True;
if (nTypeId == TYP_SETFLD || nTypeId == TYP_SEQFLD)
{
@@ -912,7 +912,7 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
if(pSh)
{
const SwFldTypes* p = pSh->GetDoc()->GetFldTypes();
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i < INIT_FLDTYPES; i++)
{
@@ -922,26 +922,26 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
}
if (i >= INIT_FLDTYPES && !pSh->IsUsed(*pFldType))
- bDelete = TRUE;
+ bDelete = sal_True;
if (nTypeId == TYP_SEQFLD && !(pFldType->GetType() & nsSwGetSetExpType::GSE_SEQ))
- bInsert = FALSE;
+ bInsert = sal_False;
if (nTypeId == TYP_SETFLD && (pFldType->GetType() & nsSwGetSetExpType::GSE_SEQ))
- bInsert = FALSE;
+ bInsert = sal_False;
}
}
if (GetFldMgr().GetFldType(RES_USERFLD, sName))
- bInsert = FALSE;
+ bInsert = sal_False;
}
if( !nLen && ( nTypeId == TYP_SETFLD ||
(!IsFldEdit() && nTypeId == TYP_GETFLD ) ) )
- bInsert = FALSE;
+ bInsert = sal_False;
if( (nTypeId == TYP_SETFLD || nTypeId == TYP_FORMELFLD) &&
!bHasValue )
- bInsert = FALSE;
+ bInsert = sal_False;
break;
}
@@ -954,7 +954,7 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
switch (pBox->GetCurItemId())
{
@@ -964,7 +964,7 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
GetFldMgr().RemoveFldType(RES_USERFLD, aSelectionLB.GetSelectEntry());
else
{
- USHORT nWhich;
+ sal_uInt16 nWhich;
switch(nTypeId)
{
@@ -995,8 +995,8 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
{
String sName(aNameED.GetText()), sValue(aValueED.GetText());
SwFieldType* pType = 0;
- USHORT nId = 0;
- USHORT nNumFormatPos = aNumFormatLB.GetSelectEntryPos();
+ sal_uInt16 nId = 0;
+ sal_uInt16 nNumFormatPos = aNumFormatLB.GetSelectEntryPos();
switch (nTypeId)
{
@@ -1006,9 +1006,9 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
}
pType = GetFldMgr().GetFldType(nId, sName);
- ULONG nFormat = aFormatLB.GetSelectEntryPos();
+ sal_uLong nFormat = aFormatLB.GetSelectEntryPos();
if (nFormat != LISTBOX_ENTRY_NOTFOUND)
- nFormat = (ULONG)aFormatLB.GetEntryData((USHORT)nFormat);
+ nFormat = (sal_uLong)aFormatLB.GetEntryData((sal_uInt16)nFormat);
if (pType) // change
{
@@ -1023,7 +1023,7 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
{
if (nNumFormatPos != LISTBOX_ENTRY_NOTFOUND)
{
- ULONG nFmt = nNumFormatPos == 0 ? 0 : aNumFormatLB.GetFormat();
+ sal_uLong nFmt = nNumFormatPos == 0 ? 0 : aNumFormatLB.GetFormat();
if (nFmt)
{ // Switch language to office-language because Kalkulator expects
// String in office format and it should be fed into dialog like
@@ -1039,12 +1039,12 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
{
if (nFormat != LISTBOX_ENTRY_NOTFOUND)
{
- //JP 28.08.95: DDE-Topics/-Items can have blanks in their names!
- // That's not being considered here yet.
- USHORT nTmpPos = sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator );
+ // DDE-Topics/-Items can have blanks in their names!
+ // That's not being considered here yet.
+ 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();
@@ -1077,12 +1077,12 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
{
if (nFormat != LISTBOX_ENTRY_NOTFOUND)
{
- //JP 28.08.95: DDE-Topics/-Items can have blanks in their names!
- // That's not being considered here yet.
- USHORT nTmpPos = sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator );
+ // DDE-Topics/-Items can have blanks in their names!
+ // That's not being considered here yet.
+ 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-Field new
@@ -1097,12 +1097,12 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
break;
}
- return TRUE;
+ return sal_True;
}
IMPL_LINK( SwFldVarPage, ChapterHdl, ListBox *, EMPTYARG )
{
- BOOL bEnable = aChapterLevelLB.GetSelectEntryPos() != 0;
+ sal_Bool bEnable = aChapterLevelLB.GetSelectEntryPos() != 0;
aSeparatorED.Enable(bEnable);
aSeparatorFT.Enable(bEnable);
@@ -1113,27 +1113,27 @@ IMPL_LINK( SwFldVarPage, ChapterHdl, ListBox *, EMPTYARG )
IMPL_LINK( SwFldVarPage, SeparatorHdl, Edit *, EMPTYARG )
{
- BOOL bEnable = aSeparatorED.GetText().Len() != 0 ||
+ sal_Bool bEnable = aSeparatorED.GetText().Len() != 0 ||
aChapterLevelLB.GetSelectEntryPos() == 0;
EnableInsert(bEnable);
return 0;
}
-BOOL SwFldVarPage::FillItemSet(SfxItemSet& )
+sal_Bool SwFldVarPage::FillItemSet(SfxItemSet& )
{
- USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
String aVal(aValueED.GetText());
String aName(aNameED.GetText());
- USHORT nSubType = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nSubType = aSelectionLB.GetSelectEntryPos();
if(nSubType == LISTBOX_ENTRY_NOTFOUND)
nSubType = 0;
else
- nSubType = (USHORT)(ULONG)aSelectionLB.GetEntryData(nSubType);
+ nSubType = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nSubType);
- ULONG nFormat;
+ sal_uLong nFormat;
if (!aNumFormatLB.IsVisible())
{
@@ -1142,7 +1142,7 @@ BOOL SwFldVarPage::FillItemSet(SfxItemSet& )
if(nFormat == LISTBOX_ENTRY_NOTFOUND)
nFormat = 0;
else
- nFormat = (ULONG)aFormatLB.GetEntryData((USHORT)nFormat);
+ nFormat = (sal_uLong)aFormatLB.GetEntryData((sal_uInt16)nFormat);
}
else
{
@@ -1193,7 +1193,7 @@ BOOL SwFldVarPage::FillItemSet(SfxItemSet& )
case TYP_INPUTFLD:
{
SwFieldType* pType = GetFldMgr().GetFldType(RES_USERFLD, aName);
- nSubType = static_cast< USHORT >((nSubType & 0xff00) | ((pType) ? INP_USR : INP_VAR));
+ nSubType = static_cast< sal_uInt16 >((nSubType & 0xff00) | ((pType) ? INP_USR : INP_VAR));
break;
}
@@ -1246,7 +1246,7 @@ BOOL SwFldVarPage::FillItemSet(SfxItemSet& )
UpdateSubType();
- return FALSE;
+ return sal_False;
}
SfxTabPage* SwFldVarPage::Create( Window* pParent,
@@ -1255,7 +1255,7 @@ SfxTabPage* SwFldVarPage::Create( Window* pParent,
return ( new SwFldVarPage( pParent, rAttrSet ) );
}
-USHORT SwFldVarPage::GetGroup()
+sal_uInt16 SwFldVarPage::GetGroup()
{
return GRP_VAR;
}
@@ -1263,7 +1263,7 @@ USHORT SwFldVarPage::GetGroup()
SelectionListBox::SelectionListBox( SwFldVarPage* pDialog, const ResId& rResId ) :
ListBox (pDialog, rResId),
pDlg (pDialog),
- bCallAddSelection(FALSE)
+ bCallAddSelection(sal_False)
{
}
@@ -1274,16 +1274,16 @@ long SelectionListBox::PreNotify( NotifyEvent& rNEvt )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
const KeyCode aKeyCode = pKEvt->GetKeyCode();
- const USHORT nModifier = aKeyCode.GetModifier();
+ const sal_uInt16 nModifier = aKeyCode.GetModifier();
if( aKeyCode.GetCode() == KEY_SPACE && !nModifier)
- bCallAddSelection = TRUE;
+ bCallAddSelection = sal_True;
}
if ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN )
{
const MouseEvent* pMEvt = rNEvt.GetMouseEvent();
if (pMEvt && (pMEvt->IsMod1() || pMEvt->IsMod2())) // Alt or Ctrl
- bCallAddSelection = TRUE;
+ bCallAddSelection = sal_True;
}
return nHandled;
@@ -1293,11 +1293,11 @@ void SwFldVarPage::FillUserData()
{
String sData(String::CreateFromAscii(USER_DATA_VERSION));
sData += ';';
- USHORT nTypeSel = aTypeLB.GetSelectEntryPos();
+ sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
else
- nTypeSel = (USHORT)(ULONG)aTypeLB.GetEntryData( nTypeSel );
+ nTypeSel = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData( nTypeSel );
sData += String::CreateFromInt32( nTypeSel );
SetUserData(sData);
}
diff --git a/sw/source/ui/fldui/fldvar.hxx b/sw/source/ui/fldui/fldvar.hxx
index b3b1351e8056..f4d55ceb5755 100644
--- a/sw/source/ui/fldui/fldvar.hxx
+++ b/sw/source/ui/fldui/fldvar.hxx
@@ -45,7 +45,7 @@ class SwFldVarPage;
class SelectionListBox : public ListBox
{
SwFldVarPage* pDlg;
- BOOL bCallAddSelection;
+ sal_Bool bCallAddSelection;
virtual long PreNotify( NotifyEvent& rNEvt );
@@ -53,8 +53,8 @@ public:
SelectionListBox( SwFldVarPage* pDialog, const ResId& rResId );
// detect selection via Ctrl or Alt and evaluate with SelectHdl
- BOOL IsCallAddSelection() const {return bCallAddSelection;}
- void ResetCallAddSelection() {bCallAddSelection = FALSE;}
+ sal_Bool IsCallAddSelection() const {return bCallAddSelection;}
+ void ResetCallAddSelection() {bCallAddSelection = sal_False;}
};
class SwFldVarPage : public SwFldPage
@@ -83,8 +83,8 @@ class SwFldVarPage : public SwFldPage
String sOldValueFT;
String sOldNameFT;
- ULONG nOldFormat;
- BOOL bInit;
+ sal_uLong nOldFormat;
+ sal_Bool bInit;
DECL_LINK( TypeHdl, ListBox* pLB = 0 );
DECL_LINK( SubTypeHdl, ListBox* pLB = 0 );
@@ -94,10 +94,10 @@ class SwFldVarPage : public SwFldPage
DECL_LINK( SeparatorHdl, Edit *pED = 0 );
void UpdateSubType();
- USHORT FillFormatLB(USHORT nTypeId);
+ sal_uInt16 FillFormatLB(sal_uInt16 nTypeId);
protected:
- virtual USHORT GetGroup();
+ virtual sal_uInt16 GetGroup();
public:
SwFldVarPage(Window* pParent, const SfxItemSet& rSet);
@@ -106,7 +106,7 @@ public:
static SfxTabPage* Create(Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void FillUserData();
diff --git a/sw/source/ui/fldui/fldvar.src b/sw/source/ui/fldui/fldvar.src
index 7405a2956849..7057096f72ab 100644
--- a/sw/source/ui/fldui/fldvar.src
+++ b/sw/source/ui/fldui/fldvar.src
@@ -44,6 +44,7 @@ TabPage TP_FLD_VAR
};
ListBox LB_VARTYPE
{
+ HelpID = "sw:ListBox:TP_FLD_VAR:LB_VARTYPE";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 14 ) ;
Size = MAP_APPFONT ( 76 , 135 ) ;
@@ -60,6 +61,7 @@ TabPage TP_FLD_VAR
};
ListBox LB_VARSELECTION
{
+ HelpID = "sw:ListBox:TP_FLD_VAR:LB_VARSELECTION";
Border = TRUE ;
Pos = MAP_APPFONT ( 88 , 14 ) ;
Size = MAP_APPFONT ( 76 , 135 ) ;
@@ -75,6 +77,7 @@ TabPage TP_FLD_VAR
};
ListBox LB_VARFORMAT
{
+ HelpID = "sw:ListBox:TP_FLD_VAR:LB_VARFORMAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 170 , 14 ) ;
Size = MAP_APPFONT ( 84 , 123 ) ;
@@ -83,6 +86,7 @@ TabPage TP_FLD_VAR
};
ListBox LB_VARNUMFORMAT
{
+ HelpID = "sw:ListBox:TP_FLD_VAR:LB_VARNUMFORMAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 170 , 14 ) ;
Size = MAP_APPFONT ( 84 , 123 ) ;
@@ -91,6 +95,7 @@ TabPage TP_FLD_VAR
};
CheckBox CB_VARINVISIBLE
{
+ HelpID = "sw:CheckBox:TP_FLD_VAR:CB_VARINVISIBLE";
Pos = MAP_APPFONT ( 170 , 141 ) ;
Size = MAP_APPFONT ( 84 , 10 ) ;
Text [ en-US ] = "Invisi~ble" ;
@@ -112,6 +117,7 @@ TabPage TP_FLD_VAR
};
ListBox LB_VARCHAPTERLEVEL
{
+ HelpID = "sw:ListBox:TP_FLD_VAR:LB_VARCHAPTERLEVEL";
Border = TRUE ;
Hide = TRUE ;
Pos = MAP_APPFONT ( 208 , 123 ) ;
@@ -132,6 +138,7 @@ TabPage TP_FLD_VAR
};
Edit ED_VARSEPARATOR
{
+ HelpID = "sw:Edit:TP_FLD_VAR:ED_VARSEPARATOR";
Pos = MAP_APPFONT ( 208 , 138 ) ;
Size = MAP_APPFONT ( 46 , 12 ) ;
Border = TRUE ;
@@ -148,6 +155,7 @@ TabPage TP_FLD_VAR
};
Edit ED_VARNAME
{
+ HelpID = "sw:Edit:TP_FLD_VAR:ED_VARNAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 166 ) ;
Size = MAP_APPFONT ( 76 , 12 ) ;
@@ -163,6 +171,7 @@ TabPage TP_FLD_VAR
};
Edit ED_VARVALUE
{
+ HelpID = "sw:Edit:TP_FLD_VAR:ED_VARVALUE";
Border = TRUE ;
Pos = MAP_APPFONT ( 88 , 166 ) ;
Size = MAP_APPFONT ( 76 , 12 ) ;
diff --git a/sw/source/ui/fldui/fldwrap.cxx b/sw/source/ui/fldui/fldwrap.cxx
index f2d1ecc75232..e8217701cc5d 100644
--- a/sw/source/ui/fldui/fldwrap.cxx
+++ b/sw/source/ui/fldui/fldwrap.cxx
@@ -52,7 +52,7 @@
SFX_IMPL_CHILDWINDOW(SwFldDlgWrapper, FN_INSERT_FIELD)
-SwChildWinWrapper::SwChildWinWrapper(Window *pParentWindow, USHORT nId) :
+SwChildWinWrapper::SwChildWinWrapper(Window *pParentWindow, sal_uInt16 nId) :
SfxChildWindow(pParentWindow, nId),
m_pDocSh(0)
{
@@ -71,14 +71,14 @@ IMPL_LINK( SwChildWinWrapper, UpdateHdl, void*, EMPTYARG )
/*--------------------------------------------------------------------
Description: newly initialise dialog after Doc switch
--------------------------------------------------------------------*/
-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; // immediate Update
+ bRet = sal_True; // immediate Update
}
else
m_aUpdateTimer.Start();
@@ -93,7 +93,7 @@ SfxChildWinInfo SwFldDlgWrapper::GetInfo() const
return aInfo;
}
-SwFldDlgWrapper::SwFldDlgWrapper( Window* _pParent, USHORT nId,
+SwFldDlgWrapper::SwFldDlgWrapper( Window* _pParent, sal_uInt16 nId,
SfxBindings* pB,
SfxChildWinInfo* )
: SwChildWinWrapper( _pParent, nId )
@@ -112,11 +112,11 @@ SwFldDlgWrapper::SwFldDlgWrapper( Window* _pParent, USHORT nId,
/*--------------------------------------------------------------------
Description: newly initialise dialog after Doc switch
--------------------------------------------------------------------*/
-BOOL SwFldDlgWrapper::ReInitDlg(SwDocShell *pDocSh)
+sal_Bool SwFldDlgWrapper::ReInitDlg(SwDocShell *pDocSh)
{
- BOOL bRet;
+ sal_Bool bRet;
- if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == TRUE) // update immediately, Doc switch
+ if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == sal_True) // update immediately, Doc switch
{
pDlgInterface->ReInitDlg();
}
@@ -124,7 +124,7 @@ BOOL SwFldDlgWrapper::ReInitDlg(SwDocShell *pDocSh)
return bRet;
}
-void SwFldDlgWrapper::ShowPage(USHORT nPage)
+void SwFldDlgWrapper::ShowPage(sal_uInt16 nPage)
{
pDlgInterface->ShowPage(nPage ? nPage : TP_FLD_REF);
}
@@ -136,11 +136,11 @@ SfxChildWinInfo SwFldDataOnlyDlgWrapper::GetInfo() const
SfxChildWinInfo aInfo = SfxChildWindow::GetInfo();
// prevent instatiation of dialog other than by calling
// the mail merge dialog
- aInfo.bVisible = FALSE;
+ aInfo.bVisible = sal_False;
return aInfo;
}
-SwFldDataOnlyDlgWrapper::SwFldDataOnlyDlgWrapper( Window* _pParent, USHORT nId,
+SwFldDataOnlyDlgWrapper::SwFldDataOnlyDlgWrapper( Window* _pParent, sal_uInt16 nId,
SfxBindings* pB,
SfxChildWinInfo* pInfo )
: SwChildWinWrapper( _pParent, nId )
@@ -162,10 +162,10 @@ SwFldDataOnlyDlgWrapper::SwFldDataOnlyDlgWrapper( Window* _pParent, USHORT nId,
/* --------------------------------------------------
* re-init after doc activation
* --------------------------------------------------*/
-BOOL SwFldDataOnlyDlgWrapper::ReInitDlg(SwDocShell *pDocSh)
+sal_Bool SwFldDataOnlyDlgWrapper::ReInitDlg(SwDocShell *pDocSh)
{
- BOOL bRet;
- if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == TRUE) // update immediately, Doc switch
+ sal_Bool bRet;
+ if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == sal_True) // update immediately, Doc switch
{
pDlgInterface->ReInitDlg();
}
diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx
index e1f6867ef101..ed1b04bc45da 100644
--- a/sw/source/ui/fldui/inpdlg.cxx
+++ b/sw/source/ui/fldui/inpdlg.cxx
@@ -33,10 +33,6 @@
#undef SW_DLLIMPLEMENTATION
#endif
-
-
-#define _INPDLG_CXX
-
#include <vcl/msgbox.hxx>
#include <unotools/charclass.hxx>
#include <editeng/unolingu.hxx>
@@ -56,7 +52,7 @@
--------------------------------------------------------------------*/
SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS,
- SwField* pField, BOOL bNextButton ) :
+ SwField* pField, sal_Bool bNextButton ) :
SvxStandardDialog(pParent, SW_RES(DLG_FLD_INPUT)),
@@ -99,7 +95,7 @@ SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS,
//
pInpFld = (SwInputField*)pField;
aLabelED.SetText( pInpFld->GetPar2() );
- USHORT nSubType = pInpFld->GetSubType();
+ sal_uInt16 nSubType = pInpFld->GetSubType();
switch(nSubType & 0xff)
{
@@ -123,7 +119,9 @@ SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS,
//values are formatted - formulas are not
CharClass aCC( SvxCreateLocale( pSetFld->GetLanguage() ));
if( aCC.isNumeric( sFormula ))
- aStr = pSetFld->Expand();
+ {
+ aStr = pSetFld->ExpandField(true);
+ }
else
aStr = sFormula;
aLabelED.SetText( pSetFld->GetPromptText() );
@@ -131,7 +129,7 @@ SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS,
// JP 31.3.00: Inputfields in readonly regions must be allowed to
// input any content. - 74639
- BOOL bEnable = !rSh.IsCrsrReadonly();
+ sal_Bool bEnable = !rSh.IsCrsrReadonly();
aOKBT.Enable( bEnable );
aEditED.SetReadOnly( !bEnable );
@@ -162,7 +160,7 @@ void SwFldInputDlg::Apply()
aTmp.EraseAllChars( '\r' );
rSh.StartAllAction();
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if(pInpFld)
{
if(pUsrType)
@@ -171,21 +169,21 @@ void SwFldInputDlg::Apply()
{
pUsrType->SetContent(aTmp);
pUsrType->UpdateFlds();
- bModified = TRUE;
+ bModified = sal_True;
}
}
else if( aTmp != pInpFld->GetPar1() )
{
pInpFld->SetPar1(aTmp);
rSh.SwEditShell::UpdateFlds(*pInpFld);
- bModified = TRUE;
+ bModified = sal_True;
}
}
else if( aTmp != pSetFld->GetPar2() )
{
pSetFld->SetPar2(aTmp);
rSh.SwEditShell::UpdateFlds(*pSetFld);
- bModified = TRUE;
+ bModified = sal_True;
}
if( bModified )
diff --git a/sw/source/ui/fldui/inpdlg.src b/sw/source/ui/fldui/inpdlg.src
index 8b60525dfe5c..799afe0ceaa8 100644
--- a/sw/source/ui/fldui/inpdlg.src
+++ b/sw/source/ui/fldui/inpdlg.src
@@ -46,6 +46,7 @@ ModalDialog DLG_FLD_INPUT
};*/
Edit ED_LABEL
{
+ HelpID = "sw:Edit:DLG_FLD_INPUT:ED_LABEL";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 115 , 12 ) ;
@@ -56,6 +57,7 @@ ModalDialog DLG_FLD_INPUT
};
MultiLineEdit ED_EDIT
{
+ HelpID = "sw:MultiLineEdit:DLG_FLD_INPUT:ED_EDIT";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 32 ) ;
Size = MAP_APPFONT ( 115 , 72 ) ;
@@ -83,6 +85,7 @@ ModalDialog DLG_FLD_INPUT
};
PushButton PB_NEXT
{
+ HelpID = "sw:PushButton:DLG_FLD_INPUT:PB_NEXT";
Pos = MAP_APPFONT ( 139 , 40 ) ;
Size = MAP_APPFONT ( 50 , 15 ) ;
TabStop = TRUE ;
diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx
index 88416d6f7f8b..ba7f91d44714 100644
--- a/sw/source/ui/fldui/javaedit.cxx
+++ b/sw/source/ui/fldui/javaedit.cxx
@@ -82,8 +82,8 @@ SwJavaEditDialog::SwJavaEditDialog(Window* pParent, SwWrtShell* pWrtSh) :
aNextBtn ( this, SW_RES( BTN_NEXT ) ),
aHelpBtn ( this, SW_RES( BTN_POST_HELP ) ),
- bNew(TRUE),
- bIsUrl(FALSE),
+ bNew(sal_True),
+ bIsUrl(sal_False),
pSh(pWrtSh),
pFileDlg(NULL),
@@ -165,8 +165,8 @@ void SwJavaEditDialog::Apply()
void SwJavaEditDialog::CheckTravel()
{
- BOOL bTravel = FALSE;
- BOOL bNext(FALSE), bPrev(FALSE);
+ sal_Bool bTravel = sal_False;
+ sal_Bool bNext(sal_False), bPrev(sal_False);
if(!bNew)
{
@@ -248,14 +248,14 @@ void SwJavaEditDialog::SetFld()
aType = String::CreateFromAscii("JavaScript");
}
-BOOL SwJavaEditDialog::IsUpdate()
+sal_Bool SwJavaEditDialog::IsUpdate()
{
return pFld && ( bIsUrl != pFld->GetFormat() || pFld->GetPar2() != aType || pFld->GetPar1() != aText );
}
IMPL_LINK( SwJavaEditDialog, RadioButtonHdl, RadioButton *, EMPTYARG )
{
- BOOL bEnable = aUrlRB.IsChecked();
+ sal_Bool bEnable = aUrlRB.IsChecked();
aUrlPB.Enable(bEnable);
aUrlED.Enable(bEnable);
aEditED.Enable(!bEnable);
@@ -268,7 +268,7 @@ IMPL_LINK( SwJavaEditDialog, RadioButtonHdl, RadioButton *, EMPTYARG )
aEditED.SetReadOnly( !bEnable);
aTypeED.SetReadOnly( !bEnable);
if( aUrlPB.IsEnabled() && !bEnable )
- aUrlPB.Enable( FALSE );
+ aUrlPB.Enable( sal_False );
}
return 0;
}
diff --git a/sw/source/ui/fldui/javaedit.src b/sw/source/ui/fldui/javaedit.src
index 373230024893..a5ebb890fb50 100644
--- a/sw/source/ui/fldui/javaedit.src
+++ b/sw/source/ui/fldui/javaedit.src
@@ -33,6 +33,7 @@
// RID_SVXDLG_POSTIT -----------------------------------------------------
ModalDialog DLG_JAVAEDIT
{
+ HelpID = "sw:ModalDialog:DLG_JAVAEDIT";
OutputSize = TRUE ;
SvLook = TRUE ;
Size = MAP_APPFONT ( 248 , 157 ) ;
@@ -45,6 +46,7 @@ ModalDialog DLG_JAVAEDIT
};
Edit ED_TYPE
{
+ HelpID = "sw:Edit:DLG_JAVAEDIT:ED_TYPE";
Border = TRUE ;
Text = "JavaScript" ;
// Nicht uebersetzen!!!
@@ -54,6 +56,7 @@ ModalDialog DLG_JAVAEDIT
};
RadioButton RB_URL
{
+ HelpID = "sw:RadioButton:DLG_JAVAEDIT:RB_URL";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 55 , 10 ) ;
TabStop = TRUE ;
@@ -61,6 +64,7 @@ ModalDialog DLG_JAVAEDIT
};
Edit ED_URL
{
+ HelpID = "sw:Edit:DLG_JAVAEDIT:ED_URL";
Border = TRUE ;
Pos = MAP_APPFONT ( 70 , 27 ) ;
Size = MAP_APPFONT ( 87 , 12 ) ;
@@ -68,6 +72,7 @@ ModalDialog DLG_JAVAEDIT
};
PushButton PB_URL
{
+ HelpID = "sw:PushButton:DLG_JAVAEDIT:PB_URL";
Pos = MAP_APPFONT ( 163 , 26 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
Text = "~..." ;
@@ -75,6 +80,7 @@ ModalDialog DLG_JAVAEDIT
};
RadioButton RB_EDIT
{
+ HelpID = "sw:RadioButton:DLG_JAVAEDIT:RB_EDIT";
Pos = MAP_APPFONT ( 12 , 40 ) ;
Size = MAP_APPFONT ( 140 , 10 ) ;
Text [ en-US ] = "~Text" ;
@@ -83,6 +89,7 @@ ModalDialog DLG_JAVAEDIT
};
MultiLineEdit ED_EDIT
{
+ HelpID = "sw:MultiLineEdit:DLG_JAVAEDIT:ED_EDIT";
Border = TRUE ;
Pos = MAP_APPFONT ( 23 , 54 ) ;
Size = MAP_APPFONT ( 155 , 91 ) ;
@@ -116,12 +123,14 @@ ModalDialog DLG_JAVAEDIT
};
ImageButton BTN_PREV
{
+ HelpID = "sw:ImageButton:DLG_JAVAEDIT:BTN_PREV";
Pos = MAP_APPFONT ( 191 , 60 ) ;
Size = MAP_APPFONT ( 24 , 14 ) ;
Symbol = IMAGEBUTTON_ARROW_LEFT ;
};
ImageButton BTN_NEXT
{
+ HelpID = "sw:ImageButton:DLG_JAVAEDIT:BTN_NEXT";
Pos = MAP_APPFONT ( 217 , 60 ) ;
Size = MAP_APPFONT ( 24 , 14 ) ;
Symbol = IMAGEBUTTON_ARROW_RIGHT ;
diff --git a/sw/source/ui/fldui/makefile.mk b/sw/source/ui/fldui/makefile.mk
deleted file mode 100644
index 212c3da6bacf..000000000000
--- a/sw/source/ui/fldui/makefile.mk
+++ /dev/null
@@ -1,90 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-LIBTARGET=no
-PRJNAME=sw
-TARGET=fldui
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- changedb.src \
- DropDownFieldDialog.src\
- flddb.src \
- flddinf.src \
- flddok.src \
- fldfunc.src \
- fldref.src \
- fldtdlg.src \
- fldui.src \
- fldvar.src \
- javaedit.src \
- inpdlg.src
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-EXCEPTIONSFILES = \
- $(SLO)$/DropDownFieldDialog.obj \
- $(SLO)$/FldRefTreeListBox.obj \
- $(SLO)$/changedb.obj \
- $(SLO)$/flddb.obj \
- $(SLO)$/flddinf.obj \
- $(SLO)$/flddok.obj \
- $(SLO)$/fldedt.obj \
- $(SLO)$/fldfunc.obj \
- $(SLO)$/fldmgr.obj \
- $(SLO)$/fldpage.obj \
- $(SLO)$/fldref.obj \
- $(SLO)$/fldtdlg.obj \
- $(SLO)$/fldvar.obj \
- $(SLO)$/fldwrap.obj \
- $(SLO)$/inpdlg.obj \
- $(SLO)$/javaedit.obj \
- $(SLO)$/xfldui.obj
-
-LIB1TARGET = $(SLB)$/$(TARGET).lib
-
-LIB1OBJFILES = \
- $(SLO)$/fldmgr.obj \
- $(SLO)$/fldwrap.obj \
- $(SLO)$/xfldui.obj
-
-# $(SLO)$/DropDownFieldDialog.obj \
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/fldui/xfldui.cxx b/sw/source/ui/fldui/xfldui.cxx
index f7a3152d8bfb..14b193eeb5df 100644
--- a/sw/source/ui/fldui/xfldui.cxx
+++ b/sw/source/ui/fldui/xfldui.cxx
@@ -64,13 +64,13 @@ using namespace ::com::sun::star::beans;
/*--------------------------------------------------------------------
Description: Is the database field numeric?
- remark: in case of error TURE is returned
+ remark: in case of error sal_True is returned
--------------------------------------------------------------------*/
-BOOL SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName,
- BOOL bIsTable, const String& rFldName)
+sal_Bool SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName,
+ sal_Bool bIsTable, const String& rFldName)
{
- BOOL bNumeric = TRUE;
+ sal_Bool bNumeric = sal_True;
SwNewDBMgr* pDBMgr = pWrtShell ? pWrtShell->GetNewDBMgr() :
::GetActiveView()->GetWrtShell().GetNewDBMgr();
@@ -171,7 +171,7 @@ BOOL SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName,
case DataType::VARCHAR:
case DataType::LONGVARCHAR:
default:
- bNumeric = FALSE;
+ bNumeric = sal_False;
}
}
}
diff --git a/sw/source/ui/fmtui/makefile.mk b/sw/source/ui/fmtui/makefile.mk
deleted file mode 100644
index 9474cfa135b3..000000000000
--- a/sw/source/ui/fmtui/makefile.mk
+++ /dev/null
@@ -1,54 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=fmtui
-LIBTARGET=NO
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- tmpdlg.src
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-EXCEPTIONSFILES = \
- $(SLO)$/tmpdlg.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index f55690b60c93..588660b83995 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -42,7 +42,7 @@
#endif
#include <vcl/msgbox.hxx>
#include <sfx2/viewfrm.hxx>
-#include <svx/hdft2.hxx>
+#include <svx/hdft.hxx>
#include <editeng/flstitem.hxx>
#include <svx/htmlmode.hxx>
#include <svtools/htmlcfg.hxx>
@@ -95,14 +95,14 @@ extern SW_DLLPUBLIC SwWrtShell* GetActiveWrtShell();
SwTemplateDlg::SwTemplateDlg(Window* pParent,
SfxStyleSheetBase& rBase,
- USHORT nRegion,
- BOOL bColumn,
+ sal_uInt16 nRegion,
+ sal_Bool bColumn,
SwWrtShell* pActShell,
- BOOL bNew ) :
+ sal_Bool bNew ) :
SfxStyleDialog( pParent,
SW_RES(DLG_TEMPLATE_BASE + nRegion),
rBase,
- FALSE,
+ sal_False,
0 ),
nType( nRegion ),
pWrtShell(pActShell),
@@ -272,7 +272,7 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
AddTabPage(TP_PAGE_STD, String(SW_RES(STR_PAGE_STD)),
pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ),
pFact->GetTabPageRangesFunc( RID_SVXPAGE_PAGE ),
- FALSE,
+ sal_False,
1 ); // nach der Verwalten-Page
if(!pActShell || 0 == ::GetHtmlMode(pWrtShell->GetView().GetDocShell()))
{
@@ -327,10 +327,10 @@ short SwTemplateDlg::Ok()
{
const SfxPoolItem *pOutItem, *pExItem;
if( SFX_ITEM_SET == pExampleSet->GetItemState(
- SID_ATTR_NUMBERING_RULE, FALSE, &pExItem ) &&
+ SID_ATTR_NUMBERING_RULE, sal_False, &pExItem ) &&
( !GetOutputItemSet() ||
SFX_ITEM_SET != GetOutputItemSet()->GetItemState(
- SID_ATTR_NUMBERING_RULE, FALSE, &pOutItem ) ||
+ SID_ATTR_NUMBERING_RULE, sal_False, &pOutItem ) ||
*pExItem != *pOutItem ))
{
if( GetOutputItemSet() )
@@ -354,7 +354,7 @@ const SfxItemSet* SwTemplateDlg::GetRefreshedSet()
return pInSet;
}
-void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
//Namen der Vorlagen und Metric setzen
String sNumCharFmt, sBulletCharFmt;
@@ -372,7 +372,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
GetDocShell()->GetItem( SID_ATTR_CHAR_FONTLIST ) ) );
aSet.Put (SvxFontListItem( aFontListItem.GetFontList(), SID_ATTR_CHAR_FONTLIST));
- UINT32 nFlags = 0;
+ sal_uInt32 nFlags = 0;
if(rPage.GetItemSet().GetParent() && 0 == (nHtmlMode & HTMLMODE_ON ))
nFlags = SVX_RELATIVE_MODE;
if( SFX_STYLE_FAMILY_CHAR == nType )
@@ -384,7 +384,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
case TP_CHAR_EXT:
{
- UINT32 nFlags = SVX_ENABLE_FLASH;
+ sal_uInt32 nFlags = SVX_ENABLE_FLASH;
if( SFX_STYLE_FAMILY_CHAR == nType )
nFlags = nFlags|SVX_PREVIEW_CHARACTER;
aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, nFlags));
@@ -439,35 +439,35 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
aNames.Insert(new String(pBase->GetName()));
pBase = pPool->Next();
}
- for(USHORT i = 0; i < aNames.Count(); i++)
+ for(sal_uInt16 i = 0; i < aNames.Count(); i++)
rBox.InsertEntry(*aNames.GetObject(i));
}
break;
case TP_PARA_ALIGN:
{
- aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,TRUE));
+ aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,sal_True));
rPage.PageCreated(aSet);
}
break;
case TP_FRM_STD:
- ((SwFrmPage&)rPage).SetNewFrame( TRUE );
- ((SwFrmPage&)rPage).SetFormatUsed( TRUE );
+ ((SwFrmPage&)rPage).SetNewFrame( sal_True );
+ ((SwFrmPage&)rPage).SetFormatUsed( sal_True );
break;
case TP_FRM_ADD:
- ((SwFrmAddPage&)rPage).SetFormatUsed(TRUE);
- ((SwFrmAddPage&)rPage).SetNewFrame(TRUE);
+ ((SwFrmAddPage&)rPage).SetFormatUsed(sal_True);
+ ((SwFrmAddPage&)rPage).SetNewFrame(sal_True);
break;
case TP_FRM_WRAP:
- ((SwWrapTabPage&)rPage).SetFormatUsed( TRUE, FALSE );
+ ((SwWrapTabPage&)rPage).SetFormatUsed( sal_True, sal_False );
break;
case TP_COLUMN:
if( nType == SFX_STYLE_FAMILY_FRAME )
- ((SwColumnPage&)rPage).SetFrmMode(TRUE);
- ((SwColumnPage&)rPage).SetFormatUsed( TRUE );
+ ((SwColumnPage&)rPage).SetFrmMode(sal_True);
+ ((SwColumnPage&)rPage).SetFormatUsed( sal_True );
break;
case TP_BACKGROUND:
@@ -494,7 +494,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
List aList;
String* pNew = new String;
SwStyleNameMapper::FillUIName( RES_POOLCOLL_TEXT, *pNew );
- aList.Insert( pNew, (ULONG)0 );
+ aList.Insert( pNew, (sal_uLong)0 );
if( pWrtShell )
{
SfxStyleSheetBasePool* pStyleSheetPool = pWrtShell->
@@ -510,7 +510,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
}
aSet.Put (SfxStringListItem(SID_COLLECT_LIST, &aList));
rPage.PageCreated(aSet);
- for( USHORT i = (USHORT)aList.Count(); i; --i )
+ for( sal_uInt16 i = (sal_uInt16)aList.Count(); i; --i )
delete (String*)aList.Remove(i);
}
break;
@@ -544,16 +544,16 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
SwDocShell* pDocShell = ::GetActiveWrtShell()->GetView().GetDocShell();
::FillCharStyleListBox(rCharFmtLB, pDocShell);
List aList;
- for(USHORT j = 0; j < rCharFmtLB.GetEntryCount(); j++)
+ for(sal_uInt16 j = 0; j < rCharFmtLB.GetEntryCount(); j++)
{
aList.Insert( new XubString(rCharFmtLB.GetEntry(j)), LIST_APPEND );
}
aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ;
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell));
- aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< USHORT >(eMetric)));
+ aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)));
rPage.PageCreated(aSet);
- for( USHORT i = (USHORT)aList.Count(); i; --i )
+ for( sal_uInt16 i = (sal_uInt16)aList.Count(); i; --i )
delete (XubString*)aList.Remove(i);
aList.Clear();
}
@@ -563,7 +563,7 @@ void SwTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
SwDocShell* pDocShell = ::GetActiveWrtShell()->GetView().GetDocShell();
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell));
- aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< USHORT >(eMetric)));
+ aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)));
rPage.PageCreated(aSet);
}
break;
diff --git a/sw/source/ui/frmdlg/colex.cxx b/sw/source/ui/frmdlg/colex.cxx
index 7b419132736c..ece5a214851e 100644
--- a/sw/source/ui/frmdlg/colex.cxx
+++ b/sw/source/ui/frmdlg/colex.cxx
@@ -58,9 +58,9 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
{
const SvxPageItem* pPage = 0;
SfxItemPool* pPool = rSet.GetPool();
- USHORT nWhich = pPool->GetWhich( SID_ATTR_PAGE );
+ sal_uInt16 nWhich = pPool->GetWhich( SID_ATTR_PAGE );
- if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET )
{
// Ausrichtung
pPage = (const SvxPageItem*)&rSet.Get( nWhich );
@@ -71,14 +71,14 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
nWhich = pPool->GetWhich( SID_ATTR_PAGE_SIZE );
- if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET )
{
// Orientation und Size aus dem PageItem
const SvxSizeItem& rSize = (const SvxSizeItem&)rSet.Get( nWhich );
SetSize( rSize.GetSize() );
}
nWhich = RES_LR_SPACE;
- if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET )
{
// linken und rechten Rand einstellen
const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)rSet.Get( nWhich );
@@ -94,7 +94,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
nWhich = RES_UL_SPACE;
- if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET )
{
// oberen und unteren Rand einstellen
const SvxULSpaceItem& rULSpace = (const SvxULSpaceItem&)rSet.Get( nWhich );
@@ -112,7 +112,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
// Kopfzeilen-Attribute auswerten
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rSet.GetItemState( pPool->GetWhich( SID_ATTR_PAGE_HEADERSET),
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rHeaderOn =
@@ -132,7 +132,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
SetHdDist( rUL.GetLower() );
SetHdLeft( rLR.GetLeft() );
SetHdRight( rLR.GetRight() );
- SetHeader( TRUE );
+ SetHeader( sal_True );
if ( rHeaderSet.GetItemState( RES_BACKGROUND ) == SFX_ITEM_SET )
{
const SvxBrushItem& rItem =
@@ -147,11 +147,11 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
}
}
else
- SetHeader( FALSE );
+ SetHeader( sal_False );
}
if( SFX_ITEM_SET == rSet.GetItemState( pPool->GetWhich( SID_ATTR_PAGE_FOOTERSET),
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rFooterOn =
@@ -171,7 +171,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
SetFtDist( rUL.GetUpper() );
SetFtLeft( rLR.GetLeft() );
SetFtRight( rLR.GetRight() );
- SetFooter( TRUE );
+ SetFooter( sal_True );
if( rFooterSet.GetItemState( RES_BACKGROUND ) == SFX_ITEM_SET )
{
const SvxBrushItem& rItem =
@@ -186,10 +186,10 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
}
}
else
- SetFooter( FALSE );
+ SetFooter( sal_False );
}
if( SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
SetColor( ( (const SvxBrushItem*)pItem )->GetColor() );
const Graphic* pGrf = ( (const SvxBrushItem*)pItem )->GetGraphic();
@@ -207,11 +207,11 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
}
void SwColExample::DrawPage( const Point& rOrg,
- const BOOL bSecond,
- const BOOL bEnabled )
+ const sal_Bool bSecond,
+ const sal_Bool bEnabled )
{
SwPageExample::DrawPage( rOrg, bSecond, bEnabled );
- USHORT nColumnCount;
+ sal_uInt16 nColumnCount;
if( pColMgr && 0 != (nColumnCount = pColMgr->GetCount()))
{
long nL = GetLeft();
@@ -244,18 +244,18 @@ void SwColExample::DrawPage( const Point& rOrg,
SetFillColor( GetColor() );
// #97495# make sure that the automatic column widht's are always equal
- BOOL bAutoWidth = pColMgr->IsAutoWidth();
+ sal_Bool bAutoWidth = pColMgr->IsAutoWidth();
sal_Int32 nAutoColWidth = 0;
if(bAutoWidth)
{
sal_Int32 nColumnWidthSum = 0;
- USHORT i;
+ sal_uInt16 i;
for(i = 0; i < nColumnCount; ++i)
nColumnWidthSum += pColMgr->GetColWidth( i );
nAutoColWidth = nColumnWidthSum / nColumnCount;
}
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < nColumnCount; i++)
{
if(!bAutoWidth)
@@ -318,7 +318,7 @@ SwColumnOnlyExample::SwColumnOnlyExample( Window* pParent, const ResId& rResId)
SetBorderStyle( WINDOW_BORDER_MONO );
m_aFrmSize = SvxPaperInfo::GetPaperSize(PAPER_A4);// DIN A4
- ::FitToActualSize(m_aCols, (USHORT)m_aFrmSize.Width());
+ ::FitToActualSize(m_aCols, (sal_uInt16)m_aFrmSize.Width());
long nHeight = m_aFrmSize.Height();
Fraction aScale( m_aWinSize.Height(), nHeight );
@@ -364,12 +364,12 @@ void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ )
long nLength = aLogSize.Height() - 2 * aTL.Y();
Point aUp( aTL );
Point aDown( aTL.X(), nLength );
- BOOL bLines = FALSE;
+ sal_Bool bLines = sal_False;
if(m_aCols.GetLineAdj() != COLADJ_NONE)
{
- bLines = TRUE;
+ bLines = sal_True;
- USHORT nPercent = m_aCols.GetLineHeight();
+ sal_uInt16 nPercent = m_aCols.GetLineHeight();
if( nPercent != 100 )
{
nLength -= nLength * nPercent / 100;
@@ -387,14 +387,14 @@ void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ )
}
const SwColumns& rCols = m_aCols.GetColumns();
- USHORT nColCount = rCols.Count();
+ sal_uInt16 nColCount = rCols.Count();
if( nColCount )
{
DrawRect(aRect);
SetFillColor( rFieldColor );
Rectangle aFrmRect(aTL, m_aFrmSize);
long nSum = aTL.X();
- for(USHORT i = 0; i < nColCount; i++)
+ for(sal_uInt16 i = 0; i < nColCount; i++)
{
SwColumn* pCol = rCols[i];
aFrmRect.Left() = nSum + pCol->GetLeft();//nSum + pCol->GetLeft() + aTL.X();
@@ -405,7 +405,7 @@ void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ )
if(bLines )
{
nSum = aTL.X();
- for(USHORT i = 0; i < nColCount - 1; i++)
+ for(sal_uInt16 i = 0; i < nColCount - 1; i++)
{
nSum += rCols[i]->GetWishWidth();
aUp.X() = nSum;
@@ -419,32 +419,32 @@ void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ )
void SwColumnOnlyExample::SetColumns(const SwFmtCol& rCol)
{
m_aCols = rCol;
- USHORT nWishSum = m_aCols.GetWishWidth();
+ sal_uInt16 nWishSum = m_aCols.GetWishWidth();
long nFrmWidth = m_aFrmSize.Width();
SwColumns& rCols = m_aCols.GetColumns();
- USHORT nColCount = rCols.Count();
+ sal_uInt16 nColCount = rCols.Count();
- for(USHORT i = 0; i < nColCount; i++)
+ for(sal_uInt16 i = 0; i < nColCount; i++)
{
SwColumn* pCol = rCols[i];
long nWish = pCol->GetWishWidth();
nWish *= nFrmWidth;
nWish /= nWishSum;
- pCol->SetWishWidth((USHORT)nWish);
+ pCol->SetWishWidth((sal_uInt16)nWish);
long nLeft = pCol->GetLeft();
nLeft *= nFrmWidth;
nLeft /= nWishSum;
- pCol->SetLeft((USHORT)nLeft);
+ pCol->SetLeft((sal_uInt16)nLeft);
long nRight = pCol->GetRight();
nRight *= nFrmWidth;
nRight /= nWishSum;
- pCol->SetRight((USHORT)nRight);
+ pCol->SetRight((sal_uInt16)nRight);
}
// #97495# make sure that the automatic column width's are always equal
if(nColCount && m_aCols.IsOrtho())
{
sal_Int32 nColumnWidthSum = 0;
- USHORT i;
+ sal_uInt16 i;
for(i = 0; i < nColCount; ++i)
{
SwColumn* pCol = rCols[i];
@@ -455,7 +455,7 @@ void SwColumnOnlyExample::SetColumns(const SwFmtCol& rCol)
for(i = 0; i < nColCount; ++i)
{
SwColumn* pCol = rCols[i];
- pCol->SetWishWidth( static_cast< USHORT >(nColumnWidthSum + pCol->GetRight() + pCol->GetLeft()));
+ pCol->SetWishWidth( static_cast< sal_uInt16 >(nColumnWidthSum + pCol->GetRight() + pCol->GetLeft()));
}
}
}
@@ -468,8 +468,8 @@ SwPageGridExample::~SwPageGridExample()
#define MAX_ROWS 10
#define MAX_LINES 15
void SwPageGridExample::DrawPage( const Point& rOrg,
- const BOOL bSecond,
- const BOOL bEnabled )
+ const sal_Bool bSecond,
+ const sal_Bool bEnabled )
{
SwPageExample::DrawPage(rOrg, bSecond, bEnabled);
if(pGridItem && pGridItem->GetGridType())
@@ -572,9 +572,9 @@ void SwPageGridExample::UpdateExample( const SfxItemSet& rSet )
{
DELETEZ(pGridItem);
//get the grid information
- if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, TRUE))
+ if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, sal_True))
pGridItem = (SwTextGridItem*)((const SwTextGridItem&)rSet.Get(RES_TEXTGRID)).Clone();
- if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( RES_FRAMEDIR, TRUE ))
+ if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( RES_FRAMEDIR, sal_True ))
{
const SvxFrameDirectionItem& rDirItem =
(const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR);
diff --git a/sw/source/ui/frmdlg/colmgr.cxx b/sw/source/ui/frmdlg/colmgr.cxx
index a13083735773..a4275c0039ad 100644
--- a/sw/source/ui/frmdlg/colmgr.cxx
+++ b/sw/source/ui/frmdlg/colmgr.cxx
@@ -43,12 +43,12 @@
/*------------------------------------------------------------------------
Beschreibung: Spaltenbreite auf aktuelle Breite einstellen
------------------------------------------------------------------------*/
-void FitToActualSize(SwFmtCol& rCol, USHORT nWidth)
+void FitToActualSize(SwFmtCol& rCol, sal_uInt16 nWidth)
{
- const USHORT nCount = rCol.GetColumns().Count();
- for(USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = rCol.GetColumns().Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
- const USHORT nTmp = rCol.CalcColWidth(i, nWidth);
+ const sal_uInt16 nTmp = rCol.CalcColWidth(i, nWidth);
rCol.GetColumns()[i]->SetWishWidth(nTmp);
}
rCol.SetWishWidth(nWidth);
@@ -58,16 +58,16 @@ void FitToActualSize(SwFmtCol& rCol, USHORT nWidth)
/*------------------------------------------------------------------------
Beschreibung: Setzen Spaltenanzahl und Gutterwidth
------------------------------------------------------------------------*/
-void SwColMgr::SetCount(USHORT nCount, USHORT nGutterWidth)
+void SwColMgr::SetCount(sal_uInt16 nCount, sal_uInt16 nGutterWidth)
{
aFmtCol.Init(nCount, nGutterWidth, nWidth);
aFmtCol.SetWishWidth(nWidth);
aFmtCol.SetGutterWidth(nGutterWidth, nWidth);
}
-USHORT SwColMgr::GetGutterWidth( USHORT nPos ) const
+sal_uInt16 SwColMgr::GetGutterWidth( sal_uInt16 nPos ) const
{
- USHORT nRet;
+ sal_uInt16 nRet;
if(nPos == USHRT_MAX )
nRet = GetCount() > 1 ? aFmtCol.GetGutterWidth() : DEF_GUTTER_WIDTH;
else
@@ -79,7 +79,7 @@ USHORT SwColMgr::GetGutterWidth( USHORT nPos ) const
return nRet;
}
-void SwColMgr::SetGutterWidth(USHORT nGutterWidth, USHORT nPos )
+void SwColMgr::SetGutterWidth(sal_uInt16 nGutterWidth, sal_uInt16 nPos )
{
if(nPos == USHRT_MAX)
aFmtCol.SetGutterWidth(nGutterWidth, nWidth);
@@ -87,7 +87,7 @@ void SwColMgr::SetGutterWidth(USHORT nGutterWidth, USHORT nPos )
{
OSL_ENSURE(nPos < GetCount() - 1, "Spalte ueberindiziert" );
SwColumns& rCols = aFmtCol.GetColumns();
- USHORT nGutterWidth2 = nGutterWidth / 2;
+ sal_uInt16 nGutterWidth2 = nGutterWidth / 2;
rCols.GetObject(nPos)->SetRight(nGutterWidth2);
rCols.GetObject(nPos + 1)->SetLeft(nGutterWidth2);
}
@@ -104,19 +104,19 @@ short SwColMgr::GetLineHeightPercent() const
void SwColMgr::SetLineHeightPercent(short nPercent)
{
OSL_ENSURE(nPercent <= 100, "line height may only be 100 \%");
- aFmtCol.SetLineHeight((BYTE)nPercent);
+ aFmtCol.SetLineHeight((sal_uInt8)nPercent);
}
/*------------------------------------------------------------------------
Beschreibung: Spaltenbreite
------------------------------------------------------------------------*/
-USHORT SwColMgr::GetColWidth(USHORT nIdx) const
+sal_uInt16 SwColMgr::GetColWidth(sal_uInt16 nIdx) const
{
OSL_ENSURE(nIdx < GetCount(), "Spaltenarray ueberindiziert.");
return aFmtCol.CalcPrtColWidth(nIdx, nWidth);
}
-void SwColMgr::SetColWidth(USHORT nIdx, USHORT nWd)
+void SwColMgr::SetColWidth(sal_uInt16 nIdx, sal_uInt16 nWd)
{
OSL_ENSURE(nIdx < GetCount(), "Spaltenarray ueberindiziert.");
aFmtCol.GetColumns()[nIdx]->SetWishWidth(nWd);
@@ -126,7 +126,7 @@ void SwColMgr::SetColWidth(USHORT nIdx, USHORT nWd)
/*--------------------------------------------------------------------
Beschreibung: Groesse neu setzen
--------------------------------------------------------------------*/
-void SwColMgr::SetActualWidth(USHORT nW)
+void SwColMgr::SetActualWidth(sal_uInt16 nW)
{
nWidth = nW;
::FitToActualSize(aFmtCol, nW);
@@ -135,18 +135,18 @@ void SwColMgr::SetActualWidth(USHORT nW)
/*--------------------------------------------------------------------
Beschreibung: ctor
--------------------------------------------------------------------*/
-SwColMgr::SwColMgr(const SfxItemSet& rSet, USHORT nActWidth) :
+SwColMgr::SwColMgr(const SfxItemSet& rSet, sal_uInt16 nActWidth) :
aFmtCol((const SwFmtCol&)rSet.Get(RES_COL)),
nWidth(nActWidth)
{
if(nWidth == USHRT_MAX)
{
- nWidth = (USHORT)((const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE)).GetWidth();
+ nWidth = (sal_uInt16)((const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE)).GetWidth();
if (nWidth < MINLAY)
nWidth = USHRT_MAX;
const SvxLRSpaceItem &rLR = (const SvxLRSpaceItem&)rSet.Get(RES_LR_SPACE);
- nWidth = nWidth - (USHORT)rLR.GetLeft();
- nWidth = nWidth - (USHORT)rLR.GetRight();
+ nWidth = nWidth - (sal_uInt16)rLR.GetLeft();
+ nWidth = nWidth - (sal_uInt16)rLR.GetRight();
}
::FitToActualSize(aFmtCol, nWidth);
}
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 7726cd847859..07b9bd10d720 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -70,6 +70,8 @@
#include <docary.hxx>
#include <pagedesc.hxx>
+#include "access.hrc"
+
#define FRAME_FORMAT_WIDTH 1000
// sw/inc/fmtclds.hxx
@@ -78,7 +80,7 @@ SV_IMPL_PTRARR( SwColumns, SwColumnPtr )
/*--------------------------------------------------------------------
Beschreibung: Statische Daten
--------------------------------------------------------------------*/
-static const USHORT nLines[] = {
+static const sal_uInt16 nLines[] = {
DEF_LINE_WIDTH_0,
DEF_LINE_WIDTH_1,
DEF_LINE_WIDTH_2,
@@ -86,13 +88,13 @@ static const USHORT nLines[] = {
DEF_LINE_WIDTH_4
};
-static const USHORT nLineCount = SAL_N_ELEMENTS(nLines);
-static const USHORT nVisCols = 3;
+static const sal_uInt16 nLineCount = SAL_N_ELEMENTS(nLines);
+static const sal_uInt16 nVisCols = 3;
-inline BOOL IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect )
+inline sal_Bool IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect )
{
rWrtSh.SwapPam();
- BOOL bRet = pSect == rWrtSh.GetCurrSection();
+ sal_Bool bRet = pSect == rWrtSh.GetCurrSection();
rWrtSh.SwapPam();
return bRet;
}
@@ -111,10 +113,10 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) :
pFrameSet(0),
nOldSelection(0),
nSelectionWidth(0),
- bPageChanged(FALSE),
- bSectionChanged(FALSE),
- bSelSectionChanged(FALSE),
- bFrameChanged(FALSE)
+ bPageChanged(sal_False),
+ bSectionChanged(sal_False),
+ bSelSectionChanged(sal_False),
+ bFrameChanged(sal_False)
{
FreeResource();
@@ -124,13 +126,13 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) :
nSelectionWidth = aRect.Width();
SfxItemSet* pColPgSet = 0;
- static USHORT const aSectIds[] = { RES_COL, RES_COL,
+ static sal_uInt16 const aSectIds[] = { RES_COL, RES_COL,
RES_FRM_SIZE, RES_FRM_SIZE,
RES_COLUMNBALANCE, RES_FRAMEDIR,
0 };
const SwSection* pCurrSection = rWrtShell.GetCurrSection();
- USHORT nFullSectCnt = rWrtShell.GetFullSelectedSectionCount();
+ sal_uInt16 nFullSectCnt = rWrtShell.GetFullSelectedSectionCount();
if( pCurrSection && ( !rWrtShell.HasSelection() || 0 != nFullSectCnt ))
{
nSelectionWidth = rSh.GetSectionWidth(*pCurrSection->GetFmt());
@@ -172,7 +174,7 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh) :
aApplyToLB.RemoveEntry(aApplyToLB.GetEntryPos( (void*) LISTBOX_FRAME ));
- USHORT nPagePos = aApplyToLB.GetEntryPos( (void*) LISTBOX_PAGE );
+ sal_uInt16 nPagePos = aApplyToLB.GetEntryPos( (void*) LISTBOX_PAGE );
const SwPageDesc* pPageDesc = rWrtShell.GetSelectedPageDescs();
if( pPageDesc )
{
@@ -245,19 +247,19 @@ IMPL_LINK(SwColumnDlg, ObjectHdl, ListBox*, pBox)
break;
case LISTBOX_SECTION :
pSet = pSectionSet;
- bSectionChanged = TRUE;
+ bSectionChanged = sal_True;
break;
case LISTBOX_SECTIONS :
pSet = pSectionSet;
- bSelSectionChanged = TRUE;
+ bSelSectionChanged = sal_True;
break;
case LISTBOX_PAGE :
pSet = pPageSet;
- bPageChanged = TRUE;
+ bPageChanged = sal_True;
break;
case LISTBOX_FRAME:
pSet = pFrameSet;
- bFrameChanged = TRUE;
+ bFrameChanged = sal_True;
break;
}
if(pBox)
@@ -288,10 +290,10 @@ IMPL_LINK(SwColumnDlg, ObjectHdl, ListBox*, pBox)
break;
}
- BOOL bIsSection = pSet == pSectionSet || pSet == pSelectionSet;
+ sal_Bool bIsSection = pSet == pSectionSet || pSet == pSelectionSet;
pTabPage->ShowBalance(bIsSection);
pTabPage->SetInSection(bIsSection);
- pTabPage->SetFrmMode(TRUE);
+ pTabPage->SetFrmMode(sal_True);
pTabPage->SetPageWidth(nWidth);
if( pSet )
pTabPage->Reset(*pSet);
@@ -309,19 +311,19 @@ IMPL_LINK(SwColumnDlg, OkHdl, OKButton*, EMPTYARG)
break;
case LISTBOX_SECTION :
pSet = pSectionSet;
- bSectionChanged = TRUE;
+ bSectionChanged = sal_True;
break;
case LISTBOX_SECTIONS :
pSet = pSectionSet;
- bSelSectionChanged = TRUE;
+ bSelSectionChanged = sal_True;
break;
case LISTBOX_PAGE :
pSet = pPageSet;
- bPageChanged = TRUE;
+ bPageChanged = sal_True;
break;
case LISTBOX_FRAME:
pSet = pFrameSet;
- bFrameChanged = TRUE;
+ bFrameChanged = sal_True;
break;
}
pTabPage->FillItemSet(*pSet);
@@ -340,7 +342,7 @@ IMPL_LINK(SwColumnDlg, OkHdl, OKButton*, EMPTYARG)
{
const SwSection* pCurrSection = rWrtShell.GetCurrSection();
const SwSectionFmt* pFmt = pCurrSection->GetFmt();
- USHORT nNewPos = rWrtShell.GetSectionFmtPos( *pFmt );
+ sal_uInt16 nNewPos = rWrtShell.GetSectionFmtPos( *pFmt );
SwSectionData aData(*pCurrSection);
rWrtShell.UpdateSection( nNewPos, aData, pSectionSet );
}
@@ -353,7 +355,7 @@ IMPL_LINK(SwColumnDlg, OkHdl, OKButton*, EMPTYARG)
if(pPageSet && SFX_ITEM_SET == pPageSet->GetItemState(RES_COL) && bPageChanged)
{
// aktuellen PageDescriptor ermitteln und damit den Set fuellen
- const USHORT nCurIdx = rWrtShell.GetCurPageDesc();
+ const sal_uInt16 nCurIdx = rWrtShell.GetCurPageDesc();
SwPageDesc aPageDesc(rWrtShell.GetPageDesc(nCurIdx));
SwFrmFmt &rFmt = aPageDesc.GetMaster();
rFmt.SetFmtAttr(pPageSet->Get(RES_COL));
@@ -382,25 +384,25 @@ IMPL_LINK(SwColumnDlg, OkHdl, OKButton*, EMPTYARG)
#if OSL_DEBUG_LEVEL < 2
inline
#endif
-USHORT GetMaxWidth( SwColMgr* pColMgr, USHORT nCols )
+sal_uInt16 GetMaxWidth( SwColMgr* pColMgr, sal_uInt16 nCols )
{
- USHORT nMax = pColMgr->GetActualSize();
+ sal_uInt16 nMax = pColMgr->GetActualSize();
if( --nCols )
nMax -= pColMgr->GetGutterWidth() * nCols;
return nMax;
}
-static USHORT aPageRg[] = {
+static sal_uInt16 aPageRg[] = {
RES_COL, RES_COL,
0
};
DBG_NAME(columnhdl)
-USHORT lcl_LineWidthToPos(ULONG nWidth)
+sal_uInt16 lcl_LineWidthToPos(sal_uLong nWidth)
{
- const USHORT nUShortWidth = (USHORT)nWidth;
- for(USHORT i = 0; i < nLineCount; ++i)
+ const sal_uInt16 nUShortWidth = (sal_uInt16)nWidth;
+ for(sal_uInt16 i = 0; i < nLineCount; ++i)
if(nUShortWidth == nLines[i])
return i;
return 0;
@@ -410,10 +412,10 @@ void SwColumnPage::ResetColWidth()
{
if( nCols )
{
- USHORT nWidth = GetMaxWidth( pColMgr, nCols );
+ sal_uInt16 nWidth = GetMaxWidth( pColMgr, nCols );
nWidth = nWidth / nCols;
- for(USHORT i = 0; i < nCols; ++i)
+ for(sal_uInt16 i = 0; i < nCols; ++i)
nColWidth[i] = (long) nWidth;
}
@@ -426,12 +428,13 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet)
: SfxTabPage(pParent, SW_RES(TP_COLUMN), rSet),
+ aFLGroup(this, SW_RES(FL_COLUMNS )),
aClNrLbl(this, SW_RES(FT_NUMBER )),
aCLNrEdt(this, SW_RES(ED_NUMBER )),
aDefaultVS(this, SW_RES(VS_DEFAULTS)),
aBalanceColsCB(this, SW_RES(CB_BALANCECOLS)),
- aFLGroup(this, SW_RES(FL_COLUMNS )),
+ aFLLayout(this, SW_RES(FL_LAYOUT)),
aBtnUp(this, SW_RES(BTN_DOWN)),
aColumnFT(this, SW_RES(FT_COLUMN)),
aWidthFT(this, SW_RES(FT_WIDTH)),
@@ -447,15 +450,13 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet)
aBtnDown(this, SW_RES(BTN_UP)),
aAutoWidthBox(this, SW_RES(CB_AUTO_WIDTH)),
- aFLLayout(this, SW_RES(FL_LAYOUT)),
-
+ aFLLineType(this, SW_RES(FL_LINETYPE)),
aLineTypeLbl(this, SW_RES(FT_STYLE)),
aLineTypeDLB(this, SW_RES(LB_STYLE)),
aLineHeightLbl(this, SW_RES(FT_HEIGHT)),
aLineHeightEdit(this, SW_RES(ED_HEIGHT)),
aLinePosLbl(this, SW_RES(FT_POSITION)),
aLinePosDLB(this, SW_RES(LB_POSITION)),
- aFLLineType(this, SW_RES(FL_LINETYPE)),
aVertFL(this, SW_RES(FL_VERT)),
aPropertiesFL( this, SW_RES( FL_PROPERTIES )),
@@ -470,16 +471,25 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet)
nFirstVis(0),
nMinWidth(MINLAY),
pModifiedField(0),
- bFormat(FALSE),
- bFrm(FALSE),
- bHtmlMode(FALSE),
- bLockUpdate(FALSE)
+ bFormat(sal_False),
+ bFrm(sal_False),
+ bHtmlMode(sal_False),
+ bLockUpdate(sal_False)
{
- USHORT i;
+ sal_uInt16 i;
FreeResource();
SetExchangeSupport();
+ aBtnDown.SetAccessibleRelationMemberOf(&aFLLayout);
+ aEd1.SetAccessibleRelationLabeledBy(&aWidthFT);
+ aEd2.SetAccessibleRelationLabeledBy(&aWidthFT);
+ aEd3.SetAccessibleRelationLabeledBy(&aWidthFT);
+ aDistEd1.SetAccessibleRelationLabeledBy(&aDistFT);
+ aDistEd2.SetAccessibleRelationLabeledBy(&aDistFT);
+ aBtnUp.SetAccessibleRelationLabeledBy(&aColumnFT);
+ aBtnDown.SetAccessibleRelationLabeledBy(&aColumnFT);
+
aDefaultVS.SetHelpId(HID_COLUMN_VALUESET);
aDefaultVS.SetColCount( 5 );
aDefaultVS.SetStyle( aDefaultVS.GetStyle()
@@ -552,11 +562,11 @@ void SwColumnPage::SetPageWidth(long nPageWidth)
void SwColumnPage::Reset(const SfxItemSet &rSet)
{
- USHORT nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
if(nHtmlMode & HTMLMODE_ON)
{
- bHtmlMode = TRUE;
- aAutoWidthBox.Enable(FALSE);
+ bHtmlMode = sal_True;
+ aAutoWidthBox.Enable(sal_False);
}
FieldUnit aMetric = ::GetDfltMetric(bHtmlMode);
SetMetric(aEd1, aMetric);
@@ -568,8 +578,8 @@ void SwColumnPage::Reset(const SfxItemSet &rSet)
delete pColMgr;
pColMgr = new SwColMgr(rSet);
nCols = pColMgr->GetCount() ;
- aCLNrEdt.SetMax(Max((USHORT)aCLNrEdt.GetMax(), (USHORT)nCols));
- aCLNrEdt.SetLast(Max(nCols,(USHORT)aCLNrEdt.GetMax()));
+ aCLNrEdt.SetMax(Max((sal_uInt16)aCLNrEdt.GetMax(), (sal_uInt16)nCols));
+ aCLNrEdt.SetLast(Max(nCols,(sal_uInt16)aCLNrEdt.GetMax()));
if(bFrm)
{
@@ -579,16 +589,16 @@ void SwColumnPage::Reset(const SfxItemSet &rSet)
{
const SwFmtFrmSize& rSize = (const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE);
const SvxBoxItem& rBox = (const SvxBoxItem&) rSet.Get(RES_BOX);
- pColMgr->SetActualWidth((USHORT)rSize.GetSize().Width() - rBox.GetDistance());
+ pColMgr->SetActualWidth((sal_uInt16)rSize.GetSize().Width() - rBox.GetDistance());
}
}
if(aBalanceColsCB.IsVisible())
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_COLUMNBALANCE, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_COLUMNBALANCE, sal_False, &pItem ))
aBalanceColsCB.Check(!((const SwFmtNoBalancedColumns*)pItem)->GetValue());
else
- aBalanceColsCB.Check( TRUE );
+ aBalanceColsCB.Check( sal_True );
}
//text direction
@@ -596,7 +606,7 @@ void SwColumnPage::Reset(const SfxItemSet &rSet)
{
const SvxFrameDirectionItem& rItem = (const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR);
sal_uIntPtr nVal = rItem.GetValue();
- USHORT nPos = aTextDirectionLB.GetEntryPos( (void*)nVal );
+ sal_uInt16 nPos = aTextDirectionLB.GetEntryPos( (void*) nVal );
aTextDirectionLB.SelectEntryPos( nPos );
aTextDirectionLB.SaveValue();
}
@@ -616,7 +626,7 @@ SfxTabPage* SwColumnPage::Create(Window *pParent, const SfxItemSet &rSet)
/*--------------------------------------------------------------------
Beschreibung: Attribute in den Set stopfen bei OK
--------------------------------------------------------------------*/
-BOOL SwColumnPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwColumnPage::FillItemSet(SfxItemSet &rSet)
{
if(aCLNrEdt.HasChildPathFocus())
aCLNrEdt.GetDownHdl().Call(&aCLNrEdt);
@@ -634,7 +644,7 @@ BOOL SwColumnPage::FillItemSet(SfxItemSet &rSet)
{
rSet.Put(SwFmtNoBalancedColumns(!aBalanceColsCB.IsChecked() ));
}
- USHORT nPos;
+ sal_uInt16 nPos;
if( aTextDirectionLB.IsVisible() &&
( nPos = aTextDirectionLB.GetSelectEntryPos() ) !=
aTextDirectionLB.GetSavedValue() )
@@ -642,7 +652,7 @@ BOOL SwColumnPage::FillItemSet(SfxItemSet &rSet)
sal_uInt32 nDirection = (sal_uInt32)(sal_IntPtr)aTextDirectionLB.GetEntryData( nPos );
rSet.Put( SvxFrameDirectionItem( (SvxFrameDirection)nDirection, RES_FRAMEDIR));
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -656,15 +666,15 @@ IMPL_LINK( SwColumnPage, UpdateColMgr, void *, /*pField*/ )
// Ermitteln, ob die schmalste Spalte zu schmal ist
// fuer den eingestellten Spaltenabstand
long nMin = nColWidth[0];
- USHORT i;
+ sal_uInt16 i;
for( i = 1; i < nCols; ++i)
nMin = Min(nMin, nColWidth[i]);
- BOOL bAutoWidth = aAutoWidthBox.IsChecked();
+ sal_Bool bAutoWidth = aAutoWidthBox.IsChecked();
if(!bAutoWidth)
{
- pColMgr->SetAutoWidth(FALSE);
+ pColMgr->SetAutoWidth(sal_False);
// falls der Benutzer nicht die Gesamtbreite vergeben hat,
// den fehlenden Betrag auf die letzte Spalte addieren.
long nSum = 0;
@@ -680,19 +690,19 @@ IMPL_LINK( SwColumnPage, UpdateColMgr, void *, /*pField*/ )
if( nSum < nMaxW )
nColWidth[nCols - 1] += nMaxW - nSum;
- pColMgr->SetColWidth( 0, static_cast< USHORT >(nColWidth[0] + (USHORT)nColDist[0]/2) );
+ pColMgr->SetColWidth( 0, static_cast< sal_uInt16 >(nColWidth[0] + (sal_uInt16)nColDist[0]/2) );
for( i = 1; i < nCols-1; ++i )
{
long nActDist = (nColDist[i] + nColDist[i - 1]) / 2;
- pColMgr->SetColWidth( i, (USHORT)nColWidth[i] + (USHORT)nActDist );
+ pColMgr->SetColWidth( i, (sal_uInt16)nColWidth[i] + (sal_uInt16)nActDist );
}
- pColMgr->SetColWidth( nCols-1, static_cast< USHORT >(nColWidth[nCols-1] + nColDist[nCols -2]/2) );
+ pColMgr->SetColWidth( nCols-1, static_cast< sal_uInt16 >(nColWidth[nCols-1] + nColDist[nCols -2]/2) );
}
// keins ist ausgeschaltet
- const USHORT nPos = aLineTypeDLB.GetSelectEntryPos();
- BOOL bEnable = 0 != nPos;
+ const sal_uInt16 nPos = aLineTypeDLB.GetSelectEntryPos();
+ sal_Bool bEnable = 0 != nPos;
aLineHeightEdit.Enable( bEnable );
aLineHeightLbl.Enable( bEnable );
if( !bEnable )
@@ -742,12 +752,12 @@ void SwColumnPage::Init()
{
aCLNrEdt.SetValue(nCols);
- BOOL bAutoWidth = pColMgr->IsAutoWidth() || bHtmlMode;
+ sal_Bool bAutoWidth = pColMgr->IsAutoWidth() || bHtmlMode;
aAutoWidthBox.Check( bAutoWidth );
sal_Int32 nColumnWidthSum = 0;
// Setzen der Breiten
- USHORT i;
+ sal_uInt16 i;
for(i = 0; i < nCols; ++i)
{
nColWidth[i] = pColMgr->GetColWidth(i);
@@ -778,7 +788,7 @@ void SwColumnPage::Init()
aLineTypeDLB.SelectEntryPos( lcl_LineWidthToPos(( pColMgr->GetLineWidth() )) + 1);
aLineHeightEdit.SetValue( pColMgr->GetLineHeightPercent() );
}
- aLinePosDLB.SelectEntryPos( static_cast< USHORT >(eAdj - 1) );
+ aLinePosDLB.SelectEntryPos( static_cast< sal_uInt16 >(eAdj - 1) );
}
else
{
@@ -808,13 +818,13 @@ void SwColumnPage::Init()
------------------------------------------------------------------------*/
void SwColumnPage::UpdateCols()
{
- BOOL bEnableBtns= FALSE;
- BOOL bEnable12 = FALSE;
- BOOL bEnable3 = FALSE;
- const BOOL bEdit = !aAutoWidthBox.IsChecked();
+ sal_Bool bEnableBtns= sal_False;
+ sal_Bool bEnable12 = sal_False;
+ sal_Bool bEnable3 = sal_False;
+ const sal_Bool bEdit = !aAutoWidthBox.IsChecked();
if ( nCols > nVisCols )
{
- bEnableBtns = TRUE && !bHtmlMode;
+ bEnableBtns = sal_True && !bHtmlMode;
bEnable12 = bEnable3 = bEdit;
}
else if( bEdit )
@@ -822,8 +832,8 @@ void SwColumnPage::UpdateCols()
// hier gibt es absichtlich kaum noch breaks
switch(nCols)
{
- case 3: bEnable3 = TRUE;
- case 2: bEnable12= TRUE; break;
+ case 3: bEnable3 = sal_True;
+ case 2: bEnable12= sal_True; break;
default: /* do nothing */;
}
}
@@ -838,11 +848,11 @@ void SwColumnPage::UpdateCols()
aBtnUp.Enable( bEnableBtns );
aBtnDown.Enable( bEnableBtns );
- const BOOL bEnable = nCols > 1;
+ const sal_Bool bEnable = nCols > 1;
if( !bEnable )
{
- aLinePosDLB.Enable( FALSE );
- aLinePosLbl.Enable( FALSE );
+ aLinePosDLB.Enable( sal_False );
+ aLinePosLbl.Enable( sal_False );
}
aLineHeightEdit.Enable( bEnable );
aLineHeightLbl.Enable( bEnable );
@@ -851,21 +861,46 @@ void SwColumnPage::UpdateCols()
aAutoWidthBox.Enable( bEnable && !bHtmlMode );
}
-void SwColumnPage::SetLabels( USHORT nVis )
+void SwColumnPage::SetLabels( sal_uInt16 nVis )
{
String sLbl( '~' );
String sLbl2( String::CreateFromInt32( nVis + 1 ));
+ String tmp1(sLbl2);
sLbl2.Insert(sLbl, sLbl2.Len() - 1);
aLbl1.SetText(sLbl2);
sLbl2 = String::CreateFromInt32( nVis + 2 );
+ String tmp2(sLbl2);
sLbl2.Insert(sLbl, sLbl2.Len() - 1);
aLbl2.SetText(sLbl2);
sLbl2 = String::CreateFromInt32( nVis + 3 );
+ String tmp3(sLbl2);
sLbl2.Insert(sLbl, sLbl2.Len() - 1);
aLbl3.SetText(sLbl2);
+ String sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ;
+ sColumnWidth.SearchAndReplaceAscii("%1", tmp1);
+ aEd1.SetAccessibleName(sColumnWidth);
+
+ sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ;
+ sColumnWidth.SearchAndReplaceAscii("%1", tmp2);
+ aEd2.SetAccessibleName(sColumnWidth);
+
+ sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ;
+ sColumnWidth.SearchAndReplaceAscii("%1", tmp3);
+ aEd3.SetAccessibleName(sColumnWidth);
+
+ String sDist = SW_RESSTR( STR_ACCESS_PAGESETUP_SPACING ) ;
+ String sDist1 = sDist;
+ sDist1.SearchAndReplaceAscii("%1", tmp1);
+ sDist1.SearchAndReplaceAscii("%2", tmp2);
+ aDistEd1.SetAccessibleName(sDist1);
+
+ String sDist2 = sDist;
+ sDist2.SearchAndReplaceAscii("%1", tmp2);
+ sDist2.SearchAndReplaceAscii("%2", tmp3);
+ aDistEd2.SetAccessibleName(sDist2);
}
/*------------------------------------------------------------------------
@@ -877,7 +912,7 @@ void SwColumnPage::SetLabels( USHORT nVis )
------------------------------------------------------------------------*/
IMPL_LINK( SwColumnPage, ColModify, NumericField *, pNF )
{
- nCols = (USHORT)aCLNrEdt.GetValue();
+ nCols = (sal_uInt16)aCLNrEdt.GetValue();
//#107890# the handler is also called from LoseFocus()
//then no change has been made and thus no action should be taken
// #i17816# changing the displayed types within the ValueSet
@@ -888,8 +923,8 @@ IMPL_LINK( SwColumnPage, ColModify, NumericField *, pNF )
if(pNF)
aDefaultVS.SetNoSelection();
long nDist = static_cast< long >(aDistEd1.DenormalizePercent(aDistEd1.GetValue(FUNIT_TWIP)));
- pColMgr->SetCount(nCols, (USHORT)nDist);
- for(USHORT i = 0; i < nCols; i++)
+ pColMgr->SetCount(nCols, (sal_uInt16)nDist);
+ for(sal_uInt16 i = 0; i < nCols; i++)
nColDist[i] = nDist;
nFirstVis = 0;
SetLabels( nFirstVis );
@@ -917,7 +952,7 @@ IMPL_LINK( SwColumnPage, GapModify, PercentField *, pFld )
return 0;
if(aAutoWidthBox.IsChecked())
{
- USHORT nMaxGap = pColMgr->GetActualSize() - nCols * MINLAY;
+ sal_uInt16 nMaxGap = pColMgr->GetActualSize() - nCols * MINLAY;
OSL_ENSURE(nCols, "Abstand kann nicht ohne Spalten eingestellt werden");
nMaxGap /= nCols - 1;
if(nActValue > nMaxGap)
@@ -925,8 +960,8 @@ IMPL_LINK( SwColumnPage, GapModify, PercentField *, pFld )
nActValue = nMaxGap;
aDistEd1.SetPrcntValue(aDistEd1.NormalizePercent(nMaxGap), FUNIT_TWIP);
}
- pColMgr->SetGutterWidth((USHORT)nActValue);
- for(USHORT i = 0; i < nCols; i++)
+ pColMgr->SetGutterWidth((sal_uInt16)nActValue);
+ for(sal_uInt16 i = 0; i < nCols; i++)
nColDist[i] = nActValue;
ResetColWidth();
@@ -935,7 +970,7 @@ IMPL_LINK( SwColumnPage, GapModify, PercentField *, pFld )
else
{
- USHORT nOffset = 0;
+ sal_uInt16 nOffset = 0;
if(pFld == &aDistEd2)
{
nOffset = 1;
@@ -971,9 +1006,9 @@ IMPL_LINK( SwColumnPage, GapModify, PercentField *, pFld )
nColWidth[nFirstVis + nOffset + 1] = nRight;
nColDist[nFirstVis + nOffset] += nDiff;
- pColMgr->SetColWidth( nFirstVis + nOffset, USHORT(nLeft) );
- pColMgr->SetColWidth( nFirstVis + nOffset + 1, USHORT(nRight) );
- pColMgr->SetGutterWidth( USHORT(nColDist[nFirstVis + nOffset]), nFirstVis + nOffset );
+ pColMgr->SetColWidth( nFirstVis + nOffset, sal_uInt16(nLeft) );
+ pColMgr->SetColWidth( nFirstVis + nOffset + 1, sal_uInt16(nRight) );
+ pColMgr->SetGutterWidth( sal_uInt16(nColDist[nFirstVis + nOffset]), nFirstVis + nOffset );
}
}
@@ -996,15 +1031,15 @@ IMPL_LINK( SwColumnPage, EdModify, PercentField *, pField )
IMPL_LINK( SwColumnPage, AutoWidthHdl, CheckBox *, pBox )
{
long nDist = static_cast< long >(aDistEd1.DenormalizePercent(aDistEd1.GetValue(FUNIT_TWIP)));
- pColMgr->SetCount(nCols, (USHORT)nDist);
- for(USHORT i = 0; i < nCols; i++)
+ pColMgr->SetCount(nCols, (sal_uInt16)nDist);
+ for(sal_uInt16 i = 0; i < nCols; i++)
nColDist[i] = nDist;
if(pBox->IsChecked())
{
- pColMgr->SetGutterWidth(USHORT(nDist));
+ pColMgr->SetGutterWidth(sal_uInt16(nDist));
ResetColWidth();
}
- pColMgr->SetAutoWidth(pBox->IsChecked(), USHORT(nDist));
+ pColMgr->SetAutoWidth(pBox->IsChecked(), sal_uInt16(nDist));
UpdateCols();
Update();
return 0;
@@ -1049,13 +1084,13 @@ IMPL_LINK( SwColumnPage, Timeout, Timer *, EMPTYARG )
if(pModifiedField)
{
// Finden der veraenderten Spalte
- USHORT nChanged = nFirstVis;
+ sal_uInt16 nChanged = nFirstVis;
if(pModifiedField == &aEd2)
++nChanged;
else if(pModifiedField == &aEd3)
nChanged += 2;
- long nNewWidth = (USHORT)
+ long nNewWidth = (sal_uInt16)
pModifiedField->DenormalizePercent(pModifiedField->GetValue(FUNIT_TWIP));
long nDiff = nNewWidth - nColWidth[nChanged];
@@ -1134,7 +1169,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)rSet.Get(
RES_LR_SPACE );
const SvxBoxItem& rBox = (const SvxBoxItem&) rSet.Get(RES_BOX);
- USHORT nActWidth = static_cast< USHORT >(rSize.GetSize().Width()
+ sal_uInt16 nActWidth = static_cast< sal_uInt16 >(rSize.GetSize().Width()
- rLRSpace.GetLeft() - rLRSpace.GetRight() - rBox.GetDistance());
if( pColMgr->GetActualSize() != nActWidth)
@@ -1159,7 +1194,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
const SvxBoxItem& rBox = (const SvxBoxItem&) rSet.Get(RES_BOX);
long nDistance = rBox.GetDistance();
- const USHORT nTotalWish = bFormat ? FRAME_FORMAT_WIDTH : USHORT(rSize.GetWidth() - 2 * nDistance);
+ const sal_uInt16 nTotalWish = bFormat ? FRAME_FORMAT_WIDTH : sal_uInt16(rSize.GetWidth() - 2 * nDistance);
// Maximalwerte der Spaltenbreiten setzen
SetPageWidth(nTotalWish);
@@ -1169,7 +1204,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
pColMgr->SetActualWidth(nTotalWish);
Init();
}
- BOOL bPercent;
+ sal_Bool bPercent;
// im Rahmenformat nur relative Angaben
if ( bFormat || (rSize.GetWidthPercent() && rSize.GetWidthPercent() != 0xff) )
{
@@ -1181,10 +1216,10 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
aDistEd2.SetRefValue(nTotalWish);
// Auf %-Darstellung umschalten
- bPercent = TRUE;
+ bPercent = sal_True;
}
else
- bPercent = FALSE;
+ bPercent = sal_False;
aEd1.ShowPercent(bPercent);
aEd2.ShowPercent(bPercent);
@@ -1202,17 +1237,17 @@ int SwColumnPage::DeactivatePage(SfxItemSet *_pSet)
if(_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
-USHORT* SwColumnPage::GetRanges()
+sal_uInt16* SwColumnPage::GetRanges()
{
return aPageRg;
}
IMPL_LINK( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS )
{
- USHORT nItem = pVS->GetSelectItemId();
+ sal_uInt16 nItem = pVS->GetSelectItemId();
if( nItem < 4 )
{
aCLNrEdt.SetValue( nItem );
@@ -1222,13 +1257,13 @@ IMPL_LINK( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS )
}
else
{
- bLockUpdate = TRUE;
+ bLockUpdate = sal_True;
aCLNrEdt.SetValue( 2 );
- aAutoWidthBox.Check(FALSE);
+ aAutoWidthBox.Check(sal_False);
aDistEd1.SetPrcntValue(0);
ColModify(0);
// jetzt noch das Breitenverhaeltnisse auf 2 : 1 bzw. 1 : 2 stellen
- USHORT nSmall = pColMgr->GetActualSize() / 3;
+ sal_uInt16 nSmall = pColMgr->GetActualSize() / 3;
if(nItem == 4)
{
aEd2.SetPrcntValue(aEd2.NormalizePercent(long(nSmall)), FUNIT_TWIP);
@@ -1239,19 +1274,19 @@ IMPL_LINK( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS )
aEd1.SetPrcntValue(aEd1.NormalizePercent(long(nSmall)), FUNIT_TWIP);
pModifiedField = &aEd1;
}
- bLockUpdate = FALSE;
+ bLockUpdate = sal_False;
Timeout(0);
}
return 0;
}
-void SwColumnPage::SetFrmMode(BOOL bMod)
+void SwColumnPage::SetFrmMode(sal_Bool bMod)
{
bFrm = bMod;
}
-void SwColumnPage::SetInSection(BOOL bSet)
+void SwColumnPage::SetInSection(sal_Bool bSet)
{
if(!SW_MOD()->GetCTLOptions().IsCTLFontEnabled())
return;
@@ -1283,7 +1318,7 @@ void ColumnValueSet::UserDraw( const UserDrawEvent& rUDEvt )
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Rectangle aRect = rUDEvt.GetRect();
- USHORT nItemId = rUDEvt.GetItemId();
+ sal_uInt16 nItemId = rUDEvt.GetItemId();
long nRectWidth = aRect.GetWidth();
long nRectHeight = aRect.GetHeight();
@@ -1295,7 +1330,7 @@ void ColumnValueSet::UserDraw( const UserDrawEvent& rUDEvt )
long nStep = Abs(Abs(nRectHeight * 95 /100) / 11);
long nTop = (nRectHeight - 11 * nStep ) / 2;
- USHORT nCols = 0;
+ sal_uInt16 nCols = 0;
long nStarts[3];
long nEnds[3];
nStarts[0] = nRectWidth * 10 / 100;
@@ -1328,11 +1363,11 @@ void ColumnValueSet::UserDraw( const UserDrawEvent& rUDEvt )
nEnds[1] = nRectWidth * 9 / 10;
break;
}
- for(USHORT j = 0; j < nCols; j++ )
+ for(sal_uInt16 j = 0; j < nCols; j++ )
{
Point aStart(aBLPos.X() + nStarts[j], 0);
Point aEnd(aBLPos.X() + nEnds[j], 0);
- for( USHORT i = 0; i < 12; i ++)
+ for( sal_uInt16 i = 0; i < 12; i ++)
{
aStart.Y() = aEnd.Y() = aBLPos.Y() + nTop + i * nStep;
pDev->DrawLine(aStart, aEnd);
diff --git a/sw/source/ui/frmdlg/column.hrc b/sw/source/ui/frmdlg/column.hrc
index dd8b81e0c91a..e46697a8c618 100644
--- a/sw/source/ui/frmdlg/column.hrc
+++ b/sw/source/ui/frmdlg/column.hrc
@@ -79,7 +79,6 @@
#define FT_TEXTDIRECTION 60
#define LB_TEXTDIRECTION 61
#define FL_VERT 62
-
#define LISTBOX_SELECTION 0
#define LISTBOX_SECTION 1
#define LISTBOX_SECTIONS 2
diff --git a/sw/source/ui/frmdlg/column.src b/sw/source/ui/frmdlg/column.src
index 7f260501cbbe..c5ba19c9a958 100644
--- a/sw/source/ui/frmdlg/column.src
+++ b/sw/source/ui/frmdlg/column.src
@@ -30,6 +30,8 @@
#include "frmui.hrc"
#include "cmdid.h"
#include "helpid.h"
+#include "access.hrc"
+
// #define TP_COLUMN 256
TabPage TP_COLUMN
{
@@ -46,6 +48,7 @@ TabPage TP_COLUMN
};
NumericField ED_NUMBER
{
+ HelpID = "sw:NumericField:TP_COLUMN:ED_NUMBER";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 30 ) ;
Size = MAP_APPFONT ( 24 , 12 ) ;
@@ -68,6 +71,7 @@ TabPage TP_COLUMN
};
CheckBox CB_BALANCECOLS
{
+ HelpID = "sw:CheckBox:TP_COLUMN:CB_BALANCECOLS";
Pos = MAP_APPFONT ( 7 , 46 ) ;
Size = MAP_APPFONT ( 163 , 10 ) ;
Hide = TRUE;
@@ -93,6 +97,7 @@ TabPage TP_COLUMN
};
ImageButton BTN_DOWN
{
+ HelpID = "sw:ImageButton:TP_COLUMN:BTN_DOWN";
Disable = TRUE ;
Pos = MAP_APPFONT ( 62 , 69 ) ;
Size = MAP_APPFONT ( 10 , 10 ) ;
@@ -122,6 +127,7 @@ TabPage TP_COLUMN
};
ImageButton BTN_UP
{
+ HelpID = "sw:ImageButton:TP_COLUMN:BTN_UP";
Disable = TRUE ;
Pos = MAP_APPFONT ( 238 , 69 ) ;
Size = MAP_APPFONT ( 10 , 10 ) ;
@@ -137,6 +143,7 @@ TabPage TP_COLUMN
};
MetricField ED_1
{
+ HelpID = "sw:MetricField:TP_COLUMN:ED_1";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 87 , 83 ) ;
@@ -155,6 +162,7 @@ TabPage TP_COLUMN
};
MetricField ED_2
{
+ HelpID = "sw:MetricField:TP_COLUMN:ED_2";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 137 , 83 ) ;
@@ -173,6 +181,7 @@ TabPage TP_COLUMN
};
MetricField ED_3
{
+ HelpID = "sw:MetricField:TP_COLUMN:ED_3";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 187 , 83 ) ;
@@ -198,6 +207,7 @@ TabPage TP_COLUMN
};
MetricField ED_DIST1
{
+ HelpID = "sw:MetricField:TP_COLUMN:ED_DIST1";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 112 , 99 ) ;
@@ -216,6 +226,7 @@ TabPage TP_COLUMN
};
MetricField ED_DIST2
{
+ HelpID = "sw:MetricField:TP_COLUMN:ED_DIST2";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 162 , 99 ) ;
@@ -234,6 +245,7 @@ TabPage TP_COLUMN
};
CheckBox CB_AUTO_WIDTH
{
+ HelpID = "sw:CheckBox:TP_COLUMN:CB_AUTO_WIDTH";
Pos = MAP_APPFONT ( 87 , 115 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "Auto~Width" ;
@@ -255,6 +267,7 @@ TabPage TP_COLUMN
};
ListBox LB_STYLE
{
+ HelpID = "sw:ListBox:TP_COLUMN:LB_STYLE";
Pos = MAP_APPFONT ( 50 , 138 ) ;
Size = MAP_APPFONT ( 60 , 66 ) ;
TabStop = TRUE ;
@@ -273,6 +286,7 @@ TabPage TP_COLUMN
};
MetricField ED_HEIGHT
{
+ HelpID = "sw:MetricField:TP_COLUMN:ED_HEIGHT";
Border = TRUE ;
Pos = MAP_APPFONT ( 50 , 154 ) ;
Size = MAP_APPFONT ( 60 , 12 ) ;
@@ -297,6 +311,7 @@ TabPage TP_COLUMN
};
ListBox LB_POSITION
{
+ HelpID = "sw:ListBox:TP_COLUMN:LB_POSITION";
Pos = MAP_APPFONT ( 50 , 170 ) ;
Size = MAP_APPFONT ( 60 , 40 ) ;
TabStop = TRUE ;
@@ -337,6 +352,7 @@ TabPage TP_COLUMN
};
ListBox LB_TEXTDIRECTION
{
+ HelpID = "sw:ListBox:TP_COLUMN:LB_TEXTDIRECTION";
Border = TRUE ;
Pos = MAP_APPFONT ( 127 , 149 ) ;
Size = MAP_APPFONT ( 127 , 50 ) ;
@@ -385,6 +401,7 @@ ModalDialog DLG_COLUMN
};
ListBox LB_APPLY_TO
{
+ HelpID = "sw:ListBox:DLG_COLUMN:LB_APPLY_TO";
Pos = MAP_APPFONT ( 260 , 74 ) ;
Size = MAP_APPFONT ( 50 , 66 ) ;
TabStop = TRUE ;
@@ -401,4 +418,14 @@ ModalDialog DLG_COLUMN
Text [ en-US ] = "Columns";
};
+//IAccessibility2 Impplementaton 2009-----
+String STR_ACCESS_PAGESETUP_SPACING
+{
+ Text [ en-US ] = "Spacing between %1 and %2";
+};
+String STR_ACCESS_COLUMN_WIDTH
+{
+ Text [ en-US ] = "Column %1 Width";
+};
+//-----IAccessibility2 Impplementaton 2009
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index ad161ce684ac..c96a022a89de 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -138,7 +138,7 @@ SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView &rV ) :
aPrevWin (this, SW_RES(WIN_SAMPLE )),
rView( rV ),
pMgr( new SwFldMgr(rView.GetWrtShellPtr()) ),
- bCopyAttributes( FALSE ),
+ bCopyAttributes( sal_False ),
bOrderNumberingFirst( SW_MOD()->GetModuleConfig()->IsCaptionOrderNumberingFirst() )
{
//#i61007# order of captions
@@ -183,7 +183,7 @@ SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView &rV ) :
{
nPoolId = RES_POOLCOLL_LABEL_ABB;
pString = ::GetOldGrfCat();
- bCopyAttributes = TRUE;
+ bCopyAttributes = sal_True;
sObjectName = rSh.GetFlyName();
//if not OLE
if(!xNameAccess.is())
@@ -518,7 +518,7 @@ SwSequenceOptionDialog::SwSequenceOptionDialog( Window *pParent, SwView &rV,
aLbLevel.SelectEntryPos( nLvl < MAXLEVEL ? nLvl + 1 : 0 );
aEdDelim.SetText( sDelim );
- ::FillCharStyleListBox( aLbCharStyle, rView.GetDocShell(), TRUE, TRUE );
+ ::FillCharStyleListBox( aLbCharStyle, rView.GetDocShell(), sal_True, sal_True );
aLbCharStyle.SelectEntryPos( 0 );
}
@@ -578,7 +578,7 @@ long SwCaptionDialog::CategoryBox::PreNotify( NotifyEvent& rNEvt )
{
const KeyEvent* pEvent = rNEvt.GetKeyEvent();
const KeyCode& rKeyCode = pEvent->GetKeyCode();
- USHORT nTmpCode = rKeyCode.GetFullCode() & ~KEY_ALLMODTYPE;
+ sal_uInt16 nTmpCode = rKeyCode.GetFullCode() & ~KEY_ALLMODTYPE;
if(nTmpCode != KEY_BACKSPACE && nTmpCode != KEY_RETURN
&& nTmpCode != KEY_TAB && nTmpCode != KEY_ESCAPE)
diff --git a/sw/source/ui/frmdlg/cption.src b/sw/source/ui/frmdlg/cption.src
index 711bf796e2a7..ea63227e8695 100644
--- a/sw/source/ui/frmdlg/cption.src
+++ b/sw/source/ui/frmdlg/cption.src
@@ -61,6 +61,7 @@ ModalDialog DLG_CAPTION
};
PushButton BTN_AUTOCAPTION
{
+ HelpID = "sw:PushButton:DLG_CAPTION:BTN_AUTOCAPTION";
Pos = MAP_APPFONT ( 194 , 63 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -68,6 +69,7 @@ ModalDialog DLG_CAPTION
};
PushButton BTN_OPTION
{
+ HelpID = "sw:PushButton:DLG_CAPTION:BTN_OPTION";
Pos = MAP_APPFONT ( 194 , 80 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -83,6 +85,7 @@ ModalDialog DLG_CAPTION
};
Edit EDT_TEXT
{
+ HelpID = "sw:Edit:DLG_CAPTION:EDT_TEXT";
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 182 , 12 ) ;
Border = TRUE ;
@@ -104,6 +107,7 @@ ModalDialog DLG_CAPTION
};
ComboBox BOX_CATEGORY
{
+ HelpID = "sw:ComboBox:DLG_CAPTION:BOX_CATEGORY";
Pos = MAP_APPFONT ( 82 , 46 ) ;
Size = MAP_APPFONT ( 106 , 61 ) ;
DropDown = TRUE ;
@@ -119,6 +123,7 @@ ModalDialog DLG_CAPTION
};
ListBox BOX_FORMAT
{
+ HelpID = "sw:ListBox:DLG_CAPTION:BOX_FORMAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 82 , 63 ) ;
Size = MAP_APPFONT ( 106 , 83 ) ;
@@ -135,6 +140,7 @@ ModalDialog DLG_CAPTION
};
Edit ED_NUM_SEP
{
+ HelpID = "sw:Edit:DLG_CAPTION:ED_NUM_SEP";
Pos = MAP_APPFONT ( 82 , 63 ) ;
Size = MAP_APPFONT ( 106 , 12 ) ;
Border = TRUE ;
@@ -152,6 +158,7 @@ ModalDialog DLG_CAPTION
};
Edit EDT_SEP
{
+ HelpID = "sw:Edit:DLG_CAPTION:EDT_SEP";
Pos = MAP_APPFONT ( 82 , 80 ) ;
Size = MAP_APPFONT ( 106 , 12 ) ;
Border = TRUE ;
@@ -168,6 +175,7 @@ ModalDialog DLG_CAPTION
};
ListBox BOX_POS
{
+ HelpID = "sw:ListBox:DLG_CAPTION:BOX_POS";
Pos = MAP_APPFONT ( 82 , 97 ) ;
Size = MAP_APPFONT ( 106 , 61 ) ;
DropDown = TRUE ;
@@ -244,6 +252,7 @@ ModalDialog DLG_SEQUENCE_OPTION
};
ListBox LB_LEVEL
{
+ HelpID = "sw:ListBox:DLG_SEQUENCE_OPTION:LB_LEVEL";
Border = TRUE ;
Pos = MAP_APPFONT ( 65 , 18 ) ;
Size = MAP_APPFONT ( 72 , 60 ) ;
@@ -262,6 +271,7 @@ ModalDialog DLG_SEQUENCE_OPTION
};
Edit ED_SEPARATOR
{
+ HelpID = "sw:Edit:DLG_SEQUENCE_OPTION:ED_SEPARATOR";
Pos = MAP_APPFONT ( 65 , 34 ) ;
Size = MAP_APPFONT ( 72 , 12 ) ;
Border = TRUE ;
@@ -282,6 +292,7 @@ ModalDialog DLG_SEQUENCE_OPTION
};
ListBox LB_CHARSTYLE
{
+ HelpID = "sw:ListBox:DLG_SEQUENCE_OPTION:LB_CHARSTYLE";
Border = TRUE ;
Pos = MAP_APPFONT ( 65 , 68 ) ;
Size = MAP_APPFONT ( 72 , 60 ) ;
@@ -294,6 +305,7 @@ ModalDialog DLG_SEQUENCE_OPTION
};
CheckBox CB_APPLYBAS
{
+ HelpID = "sw:CheckBox:DLG_SEQUENCE_OPTION:CB_APPLYBAS";
Pos = MAP_APPFONT ( 12 , 84 ) ;
Size = MAP_APPFONT ( 136 , 10 ) ;
TabStop = TRUE ;
@@ -313,6 +325,7 @@ ModalDialog DLG_SEQUENCE_OPTION
};
ListBox LB_ORDER
{
+ HelpID = "sw:ListBox:DLG_SEQUENCE_OPTION:LB_ORDER";
Border = TRUE ;
Pos = MAP_APPFONT ( 65 , 114 ) ;
Size = MAP_APPFONT ( 72 , 60 ) ;
diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx
index 32d01d479e90..adc5b2d3ec89 100644
--- a/sw/source/ui/frmdlg/frmdlg.cxx
+++ b/sw/source/ui/frmdlg/frmdlg.cxx
@@ -60,10 +60,10 @@
SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
Window* pParent,
const SfxItemSet& rCoreSet,
- BOOL bNewFrm,
- USHORT nResType,
- BOOL bFormat,
- UINT16 nDefPage,
+ sal_Bool bNewFrm,
+ sal_uInt16 nResType,
+ sal_Bool bFormat,
+ sal_uInt16 nDefPage,
const String* pStr) :
SfxTabDialog(pViewFrame, pParent, SW_RES(nResType), &rCoreSet, pStr != 0),
@@ -74,8 +74,8 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
m_pWrtShell(((SwView*)pViewFrame->GetViewShell())->GetWrtShellPtr())
{
FreeResource();
- USHORT nHtmlMode = ::GetHtmlMode(m_pWrtShell->GetView().GetDocShell());
- m_bHTMLMode = static_cast< BOOL >(nHtmlMode & HTMLMODE_ON);
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(m_pWrtShell->GetView().GetDocShell());
+ m_bHTMLMode = static_cast< sal_Bool >(nHtmlMode & HTMLMODE_ON);
// BspFont fuer beide Bsp-TabPages
//
@@ -86,6 +86,7 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
aTmp += *pStr;
aTmp += ')';
}
+
AddTabPage(TP_FRM_STD, SwFrmPage::Create, 0);
AddTabPage(TP_FRM_ADD, SwFrmAddPage::Create, 0);
AddTabPage(TP_FRM_WRAP, SwWrapTabPage::Create, 0);
@@ -138,7 +139,7 @@ SwFrmDlg::~SwFrmDlg()
{
}
-void SwFrmDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SwFrmDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
switch ( nId )
@@ -158,13 +159,13 @@ void SwFrmDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
case TP_FRM_WRAP:
((SwWrapTabPage&)rPage).SetNewFrame(m_bNew);
- ((SwWrapTabPage&)rPage).SetFormatUsed(m_bFormat, FALSE);
+ ((SwWrapTabPage&)rPage).SetFormatUsed(m_bFormat, sal_False);
((SwWrapTabPage&)rPage).SetShell(m_pWrtShell);
break;
case TP_COLUMN:
{
- ((SwColumnPage&)rPage).SetFrmMode(TRUE);
+ ((SwColumnPage&)rPage).SetFrmMode(sal_True);
((SwColumnPage&)rPage).SetFormatUsed(m_bFormat);
const SwFmtFrmSize& rSize = (const SwFmtFrmSize&)
diff --git a/sw/source/ui/frmdlg/frmmgr.cxx b/sw/source/ui/frmdlg/frmmgr.cxx
index e5c52869f641..a045a2e80635 100644
--- a/sw/source/ui/frmdlg/frmmgr.cxx
+++ b/sw/source/ui/frmdlg/frmmgr.cxx
@@ -56,7 +56,7 @@
using namespace ::com::sun::star;
-static USHORT aFrmMgrRange[] = {
+static sal_uInt16 aFrmMgrRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
FN_SET_FRM_NAME, FN_SET_FRM_NAME,
@@ -65,17 +65,18 @@ static USHORT aFrmMgrRange[] = {
/*--------------------------------------------------------------------
Beschreibung: Rahmen-Attribute ueber Shell ermitteln
--------------------------------------------------------------------*/
-SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, BYTE nType ) :
+SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell* pSh, sal_uInt8 nType ) :
aSet( (SwAttrPool&)pSh->GetAttrPool(), aFrmMgrRange ),
pOwnSh( pSh ),
- bAbsPos( FALSE ),
+ bAbsPos( sal_False ),
bNewFrm( bNew ),
- bIsInVertical( FALSE )
+ bIsInVertical( sal_False ),
+ bIsInVerticalL2R( sal_False )
{
if ( bNewFrm )
{
// Defaults einstellen:
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( nType )
{
case FRMMGR_TYPE_TEXT: nId = RES_POOLFRM_FRAME; break;
@@ -90,23 +91,24 @@ SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, BYTE nType ) :
else if ( nType == FRMMGR_TYPE_NONE )
{
pOwnSh->GetFlyFrmAttr( aSet );
- BOOL bRightToLeft;
- bIsInVertical = pOwnSh->IsFrmVertical(TRUE, bRightToLeft);
+ sal_Bool bRightToLeft;
+ bIsInVertical = pOwnSh->IsFrmVertical(sal_True, bRightToLeft, bIsInVerticalL2R);
}
::PrepareBoxInfo( aSet, *pOwnSh );
}
-SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, const SfxItemSet &rSet ) :
+SwFlyFrmAttrMgr::SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell* pSh, const SfxItemSet &rSet ) :
aSet( rSet ),
pOwnSh( pSh ),
- bAbsPos( FALSE ),
+ bAbsPos( sal_False ),
bNewFrm( bNew ),
- bIsInVertical(FALSE)
+ bIsInVertical(sal_False),
+ bIsInVerticalL2R(sal_False)
{
if(!bNew)
{
- BOOL bRightToLeft;
- bIsInVertical = pSh->IsFrmVertical(TRUE, bRightToLeft);
+ sal_Bool bRightToLeft;
+ bIsInVertical = pSh->IsFrmVertical(sal_True, bRightToLeft, bIsInVerticalL2R);
}
}
@@ -124,7 +126,7 @@ void SwFlyFrmAttrMgr::_UpdateFlyFrm()
{
const SfxPoolItem* pItem = 0;
- if (aSet.GetItemState(FN_SET_FRM_NAME, FALSE, &pItem) == SFX_ITEM_SET)
+ if (aSet.GetItemState(FN_SET_FRM_NAME, sal_False, &pItem) == SFX_ITEM_SET)
pOwnSh->SetFlyName(((SfxStringItem *)pItem)->GetValue());
pOwnSh->SetModified();
@@ -132,7 +134,7 @@ void SwFlyFrmAttrMgr::_UpdateFlyFrm()
if ( bAbsPos )
{
pOwnSh->SetFlyPos( aAbsPos );
- bAbsPos = FALSE;
+ bAbsPos = sal_False;
}
}
@@ -148,11 +150,11 @@ void SwFlyFrmAttrMgr::UpdateFlyFrm()
{
//JP 6.8.2001: set never an invalid anchor into the core.
const SfxPoolItem *pGItem, *pItem;
- if( SFX_ITEM_SET == aSet.GetItemState( RES_ANCHOR, FALSE, &pItem ))
+ if( SFX_ITEM_SET == aSet.GetItemState( RES_ANCHOR, sal_False, &pItem ))
{
SfxItemSet aGetSet( *aSet.GetPool(), RES_ANCHOR, RES_ANCHOR );
if( pOwnSh->GetFlyFrmAttr( aGetSet ) && 1 == aGetSet.Count() &&
- SFX_ITEM_SET == aGetSet.GetItemState( RES_ANCHOR, FALSE, &pGItem )
+ SFX_ITEM_SET == aGetSet.GetItemState( RES_ANCHOR, sal_False, &pGItem )
&& ((SwFmtAnchor*)pGItem)->GetAnchorId() ==
((SwFmtAnchor*)pItem)->GetAnchorId() )
aSet.ClearItem( RES_ANCHOR );
@@ -172,11 +174,11 @@ void SwFlyFrmAttrMgr::UpdateFlyFrm()
/*--------------------------------------------------------------------
Beschreibung: Rahmen einfuegen
--------------------------------------------------------------------*/
-BOOL SwFlyFrmAttrMgr::InsertFlyFrm()
+sal_Bool SwFlyFrmAttrMgr::InsertFlyFrm()
{
pOwnSh->StartAllAction();
- BOOL bRet = 0 != pOwnSh->NewFlyFrm( aSet );
+ sal_Bool bRet = 0 != pOwnSh->NewFlyFrm( aSet );
// richtigen Mode an der Shell einschalten, Rahmen wurde aut. selektiert.
if ( bRet )
@@ -198,7 +200,7 @@ BOOL SwFlyFrmAttrMgr::InsertFlyFrm()
void SwFlyFrmAttrMgr::InsertFlyFrm(RndStdIds eAnchorType,
const Point &rPos,
const Size &rSize,
- BOOL bAbs )
+ sal_Bool bAbs )
{
OSL_ENSURE( eAnchorType == FLY_AT_PAGE ||
eAnchorType == FLY_AT_PARA ||
@@ -221,7 +223,7 @@ void SwFlyFrmAttrMgr::InsertFlyFrm(RndStdIds eAnchorType,
--------------------------------------------------------------------*/
void SwFlyFrmAttrMgr::SetAnchor( RndStdIds eId )
{
- USHORT nPhyPageNum, nVirtPageNum;
+ sal_uInt16 nPhyPageNum, nVirtPageNum;
pOwnSh->GetPageNum( nPhyPageNum, nVirtPageNum );
aSet.Put( SwFmtAnchor( eId, nPhyPageNum ) );
@@ -250,7 +252,7 @@ void SwFlyFrmAttrMgr::SetCol( const SwFmtCol &rCol )
--------------------------------------------------------------------*/
void SwFlyFrmAttrMgr::SetAbsPos( const Point& rPoint )
{
- bAbsPos = TRUE;
+ bAbsPos = sal_True;
aAbsPos = rPoint;
SwFmtVertOrient aVertOrient( GetVertOrient() );
@@ -266,7 +268,7 @@ void SwFlyFrmAttrMgr::SetAbsPos( const Point& rPoint )
--------------------------------------------------------------------*/
void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
const SwPosition* pToCharCntntPos,
- BOOL bOnlyPercentRefValue )
+ sal_Bool bOnlyPercentRefValue )
{
if (!bOnlyPercentRefValue)
{
@@ -289,7 +291,9 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
if (bOnlyPercentRefValue)
return;
- if(bIsInVertical)
+ // --> OD 2009-09-01 #mongolianlayout#
+ if ( bIsInVertical || bIsInVerticalL2R )
+ // <--
{
Point aPos(aBoundRect.Pos());
long nTmp = aPos.X();
@@ -486,7 +490,9 @@ void SwFlyFrmAttrMgr::ValidateMetrics( SvxSwFrameValidation& rVal,
rVal.nMaxVPos = -aBoundRect.Height();
}
}
- if(bIsInVertical)
+ // --> OD 2009-09-01 #mongolianlayout#
+ if ( bIsInVertical || bIsInVerticalL2R )
+ // <--
{
//restore width/height exchange
long nTmp = rVal.nWidth;
@@ -534,7 +540,7 @@ SwTwips SwFlyFrmAttrMgr::CalcRightSpace()
/*--------------------------------------------------------------------
Beschreibung: Attribut aus dem Set loeschen
--------------------------------------------------------------------*/
-void SwFlyFrmAttrMgr::DelAttr( USHORT nId )
+void SwFlyFrmAttrMgr::DelAttr( sal_uInt16 nId )
{
aSet.ClearItem( nId );
}
@@ -545,9 +551,9 @@ void SwFlyFrmAttrMgr::SetLRSpace( long nLeft, long nRight )
SvxLRSpaceItem aTmp( (SvxLRSpaceItem&)aSet.Get( RES_LR_SPACE ) );
if( LONG_MAX != nLeft )
- aTmp.SetLeft( USHORT(nLeft) );
+ aTmp.SetLeft( sal_uInt16(nLeft) );
if( LONG_MAX != nRight )
- aTmp.SetRight( USHORT(nRight) );
+ aTmp.SetRight( sal_uInt16(nRight) );
aSet.Put( aTmp );
}
@@ -557,9 +563,9 @@ void SwFlyFrmAttrMgr::SetULSpace( long nTop, long nBottom )
SvxULSpaceItem aTmp( (SvxULSpaceItem&)aSet.Get( RES_UL_SPACE ) );
if( LONG_MAX != nTop )
- aTmp.SetUpper( USHORT(nTop) );
+ aTmp.SetUpper( sal_uInt16(nTop) );
if( LONG_MAX != nBottom )
- aTmp.SetLower( USHORT(nBottom) );
+ aTmp.SetLower( sal_uInt16(nBottom) );
aSet.Put( aTmp );
}
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 245c75cca4e4..be483c12545e 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -92,16 +92,16 @@ struct FrmMap
{
SvxSwFramePosString::StringId eStrId;
SvxSwFramePosString::StringId eMirrorStrId;
- USHORT nAlign;
- ULONG nLBRelations;
+ sal_uInt16 nAlign;
+ sal_uLong nLBRelations;
};
struct RelationMap
{
SvxSwFramePosString::StringId eStrId;
SvxSwFramePosString::StringId eMirrorStrId;
- ULONG nLBRelation;
- USHORT nRelation;
+ sal_uLong nLBRelation;
+ sal_uInt16 nRelation;
};
struct StringIdPair_Impl
@@ -385,14 +385,14 @@ static FrmMap aVAsCharHtmlMap[] =
{SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, text::VertOrientation::LINE_CENTER, LB_REL_ROW}
};
-static USHORT aPageRg[] = {
+static sal_uInt16 aPageRg[] = {
RES_FRM_SIZE, RES_FRM_SIZE,
RES_VERT_ORIENT, RES_ANCHOR,
RES_COL, RES_COL,
RES_FOLLOW_TEXT_FLOW, RES_FOLLOW_TEXT_FLOW,
0
};
-static USHORT aAddPgRg[] = {
+static sal_uInt16 aAddPgRg[] = {
RES_PROTECT, RES_PROTECT,
RES_PRINT, RES_PRINT,
FN_SET_FRM_NAME, FN_SET_FRM_NAME,
@@ -455,7 +455,7 @@ void lcl_InsertVectors(ListBox& rBox,
const ::std::vector< String >& rNext, const ::std::vector< String >& rRemain)
{
::std::vector< String >::const_iterator aIt;
- USHORT nEntry = 0;
+ sal_uInt16 nEntry = 0;
for(aIt = rPrev.begin(); aIt != rPrev.end(); aIt++)
nEntry = rBox.InsertEntry(*aIt);
for(aIt = rThis.begin(); aIt != rThis.end(); aIt++)
@@ -464,7 +464,7 @@ void lcl_InsertVectors(ListBox& rBox,
nEntry = rBox.InsertEntry(*aIt);
rBox.SetSeparatorPos(nEntry);
//now insert all strings sorted
- USHORT nStartPos = rBox.GetEntryCount();
+ sal_uInt16 nStartPos = rBox.GetEntryCount();
for(aIt = rPrev.begin(); aIt != rPrev.end(); aIt++)
::InsertStringSorted(*aIt, rBox, nStartPos );
@@ -476,17 +476,32 @@ void lcl_InsertVectors(ListBox& rBox,
::InsertStringSorted(*aIt, rBox, nStartPos );
}
-SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString::StringId eStringId, BOOL bVertical, BOOL bRTL)
+// --> OD 2009-08-31 #mongolianlayout#
+// add input parameter
+SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString::StringId eStringId, sal_Bool bVertical, sal_Bool bVerticalL2R, sal_Bool bRTL)
{
//special handling of STR_FROMLEFT
- if(SwFPos::FROMLEFT == eStringId)
+ if ( SwFPos::FROMLEFT == eStringId )
+ {
+ eStringId = bVertical
+ ? ( bRTL
+ ? SwFPos::FROMBOTTOM
+ : SwFPos::FROMTOP )
+ : ( bRTL
+ ? SwFPos::FROMRIGHT
+ : SwFPos::FROMLEFT );
+ return eStringId;
+ }
+ // --> OD 2009-08-31 #mongolianlayout#
+ // special handling of STR_FROMTOP in case of mongolianlayout (vertical left-to-right)
+ if ( SwFPos::FROMTOP == eStringId &&
+ bVertical && bVerticalL2R )
{
- eStringId = bVertical ?
- bRTL ? SwFPos::FROMBOTTOM : SwFPos::FROMTOP :
- bRTL ? SwFPos::FROMRIGHT : SwFPos::FROMLEFT;
+ eStringId = SwFPos::FROMLEFT;
return eStringId;
}
- if(bVertical)
+ // <--
+ if ( bVertical )
{
//exchange horizontal strings with vertical strings and vice versa
static const StringIdPair_Impl aHoriIds[] =
@@ -511,7 +526,20 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString
{SwFPos::REL_FRM_TOP, SwFPos::REL_FRM_LEFT },
{SwFPos::REL_FRM_BOTTOM, SwFPos::REL_FRM_RIGHT }
};
- USHORT nIndex;
+ // --> OD 2009-08-31 #monglianlayout#
+ static const StringIdPair_Impl aVertL2RIds[] =
+ {
+ {SwFPos::TOP, SwFPos::LEFT },
+ {SwFPos::BOTTOM, SwFPos::RIGHT },
+ {SwFPos::CENTER_VERT, SwFPos::CENTER_HORI },
+ {SwFPos::FROMTOP, SwFPos::FROMLEFT },
+ {SwFPos::REL_PG_TOP, SwFPos::REL_PG_LEFT },
+ {SwFPos::REL_PG_BOTTOM, SwFPos::REL_PG_RIGHT } ,
+ {SwFPos::REL_FRM_TOP, SwFPos::REL_FRM_LEFT },
+ {SwFPos::REL_FRM_BOTTOM, SwFPos::REL_FRM_RIGHT }
+ };
+ // <--
+ sal_uInt16 nIndex;
for(nIndex = 0; nIndex < sizeof(aHoriIds) / sizeof(StringIdPair_Impl); ++nIndex)
{
if(aHoriIds[nIndex].eHori == eStringId)
@@ -523,11 +551,24 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString
nIndex = 0;
for(nIndex = 0; nIndex < sizeof(aVertIds) / sizeof(StringIdPair_Impl); ++nIndex)
{
- if(aVertIds[nIndex].eHori == eStringId)
+ // --> OD 2009-08-31 #mongolianlayout#
+ if ( !bVerticalL2R )
{
- eStringId = aVertIds[nIndex].eVert;
- break;
+ if(aVertIds[nIndex].eHori == eStringId)
+ {
+ eStringId = aVertIds[nIndex].eVert;
+ break;
+ }
}
+ else
+ {
+ if(aVertL2RIds[nIndex].eHori == eStringId)
+ {
+ eStringId = aVertL2RIds[nIndex].eVert;
+ break;
+ }
+ }
+ // <--
}
}
return eStringId;
@@ -535,9 +576,9 @@ SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString
// helper method in order to determine all possible
// listbox relations in a relation map for a given relation
-ULONG lcl_GetLBRelationsForRelations( const USHORT _nRel )
+sal_uLong lcl_GetLBRelationsForRelations( const sal_uInt16 _nRel )
{
- ULONG nLBRelations = 0L;
+ sal_uLong nLBRelations = 0L;
sal_uInt16 nRelMapSize = sizeof(aRelationMap) / sizeof(RelationMap);
for ( sal_uInt16 nRelMapPos = 0; nRelMapPos < nRelMapSize; ++nRelMapPos )
@@ -553,11 +594,11 @@ ULONG lcl_GetLBRelationsForRelations( const USHORT _nRel )
// helper method on order to determine all possible
// listbox relations in a relation map for a given string ID
-ULONG lcl_GetLBRelationsForStrID( const FrmMap* _pMap,
+sal_uLong lcl_GetLBRelationsForStrID( const FrmMap* _pMap,
const SvxSwFramePosString::StringId _eStrId,
const bool _bUseMirrorStr )
{
- ULONG nLBRelations = 0L;
+ sal_uLong nLBRelations = 0L;
size_t nRelMapSize = lcl_GetFrmMapCount( _pMap );
for ( size_t nRelMapPos = 0; nRelMapPos < nRelMapSize; ++nRelMapPos )
@@ -577,7 +618,7 @@ ULONG lcl_GetLBRelationsForStrID( const FrmMap* _pMap,
--------------------------------------------------------------------*/
namespace
{
- void HandleAutoCB( BOOL _bChecked, FixedText& _rFT_man, FixedText& _rFT_auto )
+ void HandleAutoCB( sal_Bool _bChecked, FixedText& _rFT_man, FixedText& _rFT_auto )
{
_rFT_man.Show( !_bChecked );
_rFT_auto.Show( _bChecked );
@@ -587,6 +628,7 @@ namespace
SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) :
SfxTabPage (pParent, SW_RES(TP_FRM_STD), rSet),
+ aSizeFL (this, SW_RES(FL_SIZE)),
aWidthFT (this, SW_RES(FT_WIDTH)),
aWidthAutoFT (this, SW_RES(FT_WIDTH_AUTO)),
aWidthED (this, SW_RES(ED_WIDTH)),
@@ -599,16 +641,16 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) :
aAutoHeightCB (this, SW_RES(CB_AUTOHEIGHT)),
aFixedRatioCB (this, SW_RES(CB_FIXEDRATIO)),
aRealSizeBT (this, SW_RES(BT_REALSIZE)),
- aSizeFL (this, SW_RES(FL_SIZE)),
- aTypeFL (this, SW_RES(FL_TYPE)),
aTypeSepFL (this, SW_RES(FL_TYPE_SEP)),
+ aTypeFL (this, SW_RES(FL_TYPE)),
aAnchorAtPageRB (this, SW_RES(RB_ANCHOR_PAGE)),
aAnchorAtParaRB (this, SW_RES(RB_ANCHOR_PARA)),
aAnchorAtCharRB (this, SW_RES(RB_ANCHOR_AT_CHAR)),
aAnchorAsCharRB (this, SW_RES(RB_ANCHOR_AS_CHAR)),
aAnchorAtFrameRB(this, SW_RES(RB_ANCHOR_FRAME)),
+ aPositionFL (this, SW_RES(FL_POSITION)),
aHorizontalFT (this, SW_RES(FT_HORIZONTAL)),
aHorizontalDLB (this, SW_RES(DLB_HORIZONTAL)),
aAtHorzPosFT (this, SW_RES(FT_AT_HORZ_POS)),
@@ -623,20 +665,21 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) :
aVertRelationFT (this, SW_RES(FT_VERT_RELATION)),
aVertRelationLB (this, SW_RES(LB_VERT_RELATION)),
aFollowTextFlowCB(this, SW_RES(CB_FOLLOWTEXTFLOW)),
- aPositionFL (this, SW_RES(FL_POSITION)),
aExampleWN (this, SW_RES(WN_BSP)),
- bAtHorzPosModified( FALSE ),
- bAtVertPosModified( FALSE ),
-
- bFormat(FALSE),
- bNew(TRUE),
- bNoModifyHdl(TRUE),
- bVerticalChanged(FALSE),
- bIsVerticalFrame(FALSE),
- bIsInRightToLeft(FALSE),
- bHtmlMode(FALSE),
+ bAtHorzPosModified( sal_False ),
+ bAtVertPosModified( sal_False ),
+ bFormat(sal_False),
+ bNew(sal_True),
+ bNoModifyHdl(sal_True),
+ // --> OD 2009-08-31 #mongolianlayout# - no used
+// bVerticalChanged(sal_False),
+ // <--
+ bIsVerticalFrame(sal_False),
+ bIsVerticalL2R(sal_False),
+ bIsInRightToLeft(sal_False),
+ bHtmlMode(sal_False),
nHtmlMode(0),
nDlgType(0),
nUpperBorder(0),
@@ -649,11 +692,16 @@ SwFrmPage::SwFrmPage ( Window *pParent, const SfxItemSet &rSet ) :
nOldV(text::VertOrientation::TOP),
nOldVRel(text::RelOrientation::PRINT_AREA),
pVMap( 0 ),
- pHMap( 0 )
+ pHMap( 0 ),
+ m_bAllowVertPositioning( true ),
+ m_bIsMathOLE( false ),
+ m_bIsMathBaselineAlignment( true )
{
FreeResource();
SetExchangeSupport();
+ aRealSizeBT.SetAccessibleRelationMemberOf(&aSizeFL);
+
Link aLk = LINK(this, SwFrmPage, RangeModifyHdl);
aWidthED. SetLoseFocusHdl( aLk );
aHeightED. SetLoseFocusHdl( aLk );
@@ -744,7 +792,7 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
((SwFrmDlg*)GetParent()->GetParent())->GetWrtShell();
nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell());
- bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE;
+ bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
FieldUnit aMetric = ::GetDfltMetric(bHtmlMode);
SetMetric( aWidthED, aMetric );
@@ -752,38 +800,48 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
SetMetric( aAtHorzPosED, aMetric );
SetMetric( aAtVertPosED, aMetric );
+ const SfxPoolItem* pItem = NULL;
const SwFmtAnchor& rAnchor = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR);
+ if (SFX_ITEM_SET == rSet.GetItemState(FN_OLE_IS_MATH, sal_False, &pItem))
+ m_bIsMathOLE = ((const SfxBoolItem*)pItem)->GetValue();
+ if (SFX_ITEM_SET == rSet.GetItemState(FN_MATH_BASELINE_ALIGNMENT, sal_False, &pItem))
+ m_bIsMathBaselineAlignment = ((const SfxBoolItem*)pItem)->GetValue();
+ EnableVerticalPositioning( !(m_bIsMathOLE && m_bIsMathBaselineAlignment
+ && FLY_AS_CHAR == rAnchor.GetAnchorId()) );
+
if (bFormat)
{
// Bei Formaten keine Ankerbearbeitung
- aAnchorAtPageRB.Enable( FALSE );
- aAnchorAtParaRB.Enable( FALSE );
- aAnchorAtCharRB.Enable( FALSE );
- aAnchorAsCharRB.Enable( FALSE );
- aAnchorAtFrameRB.Enable( FALSE );
- aTypeFL.Enable( FALSE );
- aFixedRatioCB.Enable(FALSE);
+ aAnchorAtPageRB.Enable( sal_False );
+ aAnchorAtParaRB.Enable( sal_False );
+ aAnchorAtCharRB.Enable( sal_False );
+ aAnchorAsCharRB.Enable( sal_False );
+ aAnchorAtFrameRB.Enable( sal_False );
+ aTypeFL.Enable( sal_False );
+ aFixedRatioCB.Enable(sal_False);
}
else
{
if (rAnchor.GetAnchorId() != FLY_AT_FLY && !pSh->IsFlyInFly())
aAnchorAtFrameRB.Hide();
- if(!bVerticalChanged && pSh->IsFrmVertical(TRUE, bIsInRightToLeft))
+ // --> OD 2009-08-31 #mongolianlayout#
+// if ( !bVerticalChanged && pSh->IsFrmVertical(sal_True, bIsInRightToLeft) )
+ if ( pSh->IsFrmVertical( sal_True, bIsInRightToLeft, bIsVerticalL2R ) )
+ // <--
{
String sHLabel = aHorizontalFT.GetText();
aHorizontalFT.SetText(aVerticalFT.GetText());
aVerticalFT.SetText(sHLabel);
- bIsVerticalFrame = TRUE;
+ bIsVerticalFrame = sal_True;
}
}
if ( nDlgType == DLG_FRM_GRF || nDlgType == DLG_FRM_OLE )
{
OSL_ENSURE(pSh , "shell not found");
- const SfxPoolItem* pItem;
//OS: nur fuer die Variante Einfuegen/Grafik/Eigenschaften
- if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_GRF_REALSIZE, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_GRF_REALSIZE, sal_False, &pItem))
aGrfSize = ((const SvxSizeItem*)pItem)->GetSize();
else
pSh->GetGrfSize( aGrfSize );
@@ -795,7 +853,7 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
}
if ( nDlgType == DLG_FRM_GRF )
- aFixedRatioCB.Check( FALSE );
+ aFixedRatioCB.Check( sal_False );
else
{
if ( bNew )
@@ -858,9 +916,9 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
if(nDlgType == DLG_FRM_STD &&
0 == (nHtmlMode & HTMLMODE_FULL_ABS_POS))
{
- aHeightFT .Enable( FALSE );
- aHeightED .Enable( FALSE );
- aRelHeightCB.Enable( FALSE );
+ aHeightFT .Enable( sal_False );
+ aHeightED .Enable( sal_False );
+ aRelHeightCB.Enable( sal_False );
}
if( 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS))
{
@@ -868,15 +926,15 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
{
aAnchorAtParaRB.Check();
}
- aAnchorAtPageRB.Enable(FALSE);
+ aAnchorAtPageRB.Enable(sal_False);
}
- aAutoHeightCB.Enable(FALSE);
- aAutoWidthCB.Enable(FALSE);
- aMirrorPagesCB.Show(FALSE);
+ aAutoHeightCB.Enable(sal_False);
+ aAutoWidthCB.Enable(sal_False);
+ aMirrorPagesCB.Show(sal_False);
if(nDlgType == DLG_FRM_STD)
- aFixedRatioCB.Enable(FALSE);
+ aFixedRatioCB.Enable(sal_False);
// i#18732 hide checkbox in HTML mode
- aFollowTextFlowCB.Show(FALSE);
+ aFollowTextFlowCB.Show(sal_False);
}
else
{
@@ -891,12 +949,12 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
aAnchorAtFrameRB.IsChecked() );
}
- Init( rSet, TRUE );
+ Init( rSet, sal_True );
aAtVertPosED.SaveValue();
aAtHorzPosED.SaveValue();
aFollowTextFlowCB.SaveValue();
- bNoModifyHdl = FALSE;
+ bNoModifyHdl = sal_False;
//lock PercentFields
aWidthED.LockAutoCalculation(sal_True);
aHeightED.LockAutoCalculation(sal_True);
@@ -915,9 +973,9 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
/*--------------------------------------------------------------------
Beschreibung: Attribute in den Set stopfen bei OK
--------------------------------------------------------------------*/
-BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwFrmPage::FillItemSet(SfxItemSet &rSet)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwWrtShell* pSh = bFormat ? ::GetActiveWrtShell()
: ((SwFrmDlg*)GetParent()->GetParent())->GetWrtShell();
OSL_ENSURE( pSh , "shell not found");
@@ -941,7 +999,7 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
SwFmtHoriOrient aHoriOrient( (const SwFmtHoriOrient&)
rOldSet.Get(RES_HORI_ORIENT) );
- USHORT nMapPos = GetMapPos(pHMap, aHorizontalDLB);
+ sal_uInt16 nMapPos = GetMapPos(pHMap, aHorizontalDLB);
short nAlign = GetAlignment(pHMap, nMapPos, aHorizontalDLB, aHoriRelationLB);
short nRel = GetRelation(pHMap, aHoriRelationLB);
@@ -952,7 +1010,7 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
aHoriOrient.SetRelationOrient( eRel );
aHoriOrient.SetPosToggle(aMirrorPagesCB.IsChecked());
- BOOL bMod = aAtHorzPosED.GetText() != aAtHorzPosED.GetSavedValue();
+ sal_Bool bMod = aAtHorzPosED.GetText() != aAtHorzPosED.GetSavedValue();
bMod |= aMirrorPagesCB.GetState() != aMirrorPagesCB.GetSavedValue();
if ( eHOri == text::HoriOrientation::NONE &&
@@ -963,10 +1021,10 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
}
pOldItem = GetOldItem(rSet, FN_HORI_ORIENT);
- BOOL bSame = FALSE;
+ sal_Bool bSame = sal_False;
if ((bNew == bFormat) && pOldItem)
{
- bSame = static_cast< BOOL >(aHoriOrient == (SwFmtHoriOrient&)*pOldItem);
+ bSame = static_cast< sal_Bool >(aHoriOrient == (SwFmtHoriOrient&)*pOldItem);
}
if ((bNew && !bFormat) || ((bAtHorzPosModified || bMod) && !bSame))
{
@@ -980,7 +1038,7 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
SwFmtVertOrient aVertOrient( (const SwFmtVertOrient&)
rOldSet.Get(RES_VERT_ORIENT) );
- USHORT nMapPos = GetMapPos(pVMap, aVerticalDLB);
+ sal_uInt16 nMapPos = GetMapPos(pVMap, aVerticalDLB);
short nAlign = GetAlignment(pVMap, nMapPos, aVerticalDLB, aVertRelationLB);
short nRel = GetRelation(pVMap, aVertRelationLB);
@@ -990,7 +1048,7 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
aVertOrient.SetVertOrient ( eVOri);
aVertOrient.SetRelationOrient( eRel );
- BOOL bMod = aAtVertPosED.GetText() != aAtVertPosED.GetSavedValue();
+ sal_Bool bMod = aAtVertPosED.GetText() != aAtVertPosED.GetSavedValue();
if ( eVOri == text::VertOrientation::NONE &&
( bNew || (bAtVertPosModified || bMod) || nOldV != eVOri) )
@@ -1005,10 +1063,10 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
aVertOrient.SetPos( nY );
}
pOldItem = GetOldItem(rSet, FN_VERT_ORIENT);
- BOOL bSame = FALSE;
+ sal_Bool bSame = sal_False;
if((bNew == bFormat) && pOldItem)
{
- bSame = static_cast< BOOL >( bFormat ?
+ bSame = static_cast< sal_Bool >( bFormat ?
aVertOrient.GetVertOrient() == ((SwFmtVertOrient*)pOldItem)->GetVertOrient() &&
aVertOrient.GetRelationOrient() == ((SwFmtVertOrient*)pOldItem)->GetRelationOrient() &&
aVertOrient.GetPos() == ((SwFmtVertOrient*)pOldItem)->GetPos()
@@ -1029,11 +1087,11 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
const SwFmtFrmSize& rOldSize = (const SwFmtFrmSize& )rOldSet.Get(RES_FRM_SIZE);
SwFmtFrmSize aSz( rOldSize );
- BOOL bValueModified = (aWidthED.IsValueModified() || aHeightED.IsValueModified());
- BOOL bCheckChanged = (aRelWidthCB.GetSavedValue() != aRelWidthCB.IsChecked()
+ sal_Bool bValueModified = (aWidthED.IsValueModified() || aHeightED.IsValueModified());
+ sal_Bool bCheckChanged = (aRelWidthCB.GetSavedValue() != aRelWidthCB.IsChecked()
|| aRelHeightCB.GetSavedValue() != aRelHeightCB.IsChecked());
- BOOL bLegalValue = !(!rOldSize.GetWidth () && !rOldSize.GetHeight() &&
+ sal_Bool bLegalValue = !(!rOldSize.GetWidth () && !rOldSize.GetHeight() &&
aWidthED .GetValue() == aWidthED .GetMin() &&
aHeightED.GetValue() == aHeightED.GetMin());
@@ -1046,12 +1104,12 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
if (aRelWidthCB.IsChecked())
{
- aSz.SetWidthPercent((BYTE)Min( static_cast< sal_Int64 >(MAX_PERCENT_WIDTH), aWidthED.Convert(aWidthED.NormalizePercent(nNewWidth), FUNIT_TWIP, FUNIT_CUSTOM)));
+ aSz.SetWidthPercent((sal_uInt8)Min( static_cast< sal_Int64 >(MAX_PERCENT_WIDTH), aWidthED.Convert(aWidthED.NormalizePercent(nNewWidth), FUNIT_TWIP, FUNIT_CUSTOM)));
}
else
aSz.SetWidthPercent(0);
if (aRelHeightCB.IsChecked())
- aSz.SetHeightPercent((BYTE)Min(static_cast< sal_Int64 >(MAX_PERCENT_HEIGHT), aHeightED.Convert(aHeightED.NormalizePercent(nNewHeight), FUNIT_TWIP, FUNIT_CUSTOM)));
+ aSz.SetHeightPercent((sal_uInt8)Min(static_cast< sal_Int64 >(MAX_PERCENT_HEIGHT), aHeightED.Convert(aHeightED.NormalizePercent(nNewHeight), FUNIT_TWIP, FUNIT_CUSTOM)));
else
aSz.SetHeightPercent(0);
@@ -1104,14 +1162,14 @@ BOOL SwFrmPage::FillItemSet(SfxItemSet &rSet)
Beschreibung: Horizontale und vertikale Pos initialisieren
--------------------------------------------------------------------*/
void SwFrmPage::InitPos(RndStdIds eId,
- USHORT nH,
- USHORT nHRel,
- USHORT nV,
- USHORT nVRel,
+ sal_uInt16 nH,
+ sal_uInt16 nHRel,
+ sal_uInt16 nV,
+ sal_uInt16 nVRel,
long nX,
long nY)
{
- USHORT nPos = aVerticalDLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aVerticalDLB.GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND && pVMap )
{
nOldV = pVMap[nPos].nAlign;
@@ -1131,7 +1189,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
nOldHRel = ((RelationMap *)aHoriRelationLB.GetEntryData(nPos))->nRelation;
}
- BOOL bEnable = TRUE;
+ sal_Bool bEnable = sal_True;
if ( eId == FLY_AT_PAGE )
{
pVMap = bHtmlMode ? aVPageHtmlMap : aVPageMap;
@@ -1174,7 +1232,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
{
pVMap = bHtmlMode ? aVAsCharHtmlMap : aVAsCharMap;
pHMap = 0;
- bEnable = FALSE;
+ bEnable = sal_False;
}
aHorizontalDLB.Enable( bEnable );
aHorizontalFT.Enable( bEnable );
@@ -1186,7 +1244,7 @@ void SwFrmPage::InitPos(RndStdIds eId,
nH = nOldH;
nHRel = nOldHRel;
}
- USHORT nMapPos = FillPosLB(pHMap, nH, nHRel, aHorizontalDLB);
+ sal_uInt16 nMapPos = FillPosLB(pHMap, nH, nHRel, aHorizontalDLB);
FillRelLB(pHMap, nMapPos, nH, nHRel, aHoriRelationLB, aHoriRelationFT);
// Vertikal
@@ -1232,14 +1290,14 @@ void SwFrmPage::InitPos(RndStdIds eId,
if ( nY != LONG_MAX )
aAtVertPosED.SetValue( aAtVertPosED.Normalize(nY), FUNIT_TWIP );
}
- aAtVertPosFT.Enable( bEnable );
- aAtVertPosED.Enable( bEnable );
+ aAtVertPosFT.Enable( bEnable && m_bAllowVertPositioning );
+ aAtVertPosED.Enable( bEnable && m_bAllowVertPositioning );
UpdateExample();
}
-USHORT SwFrmPage::FillPosLB(const FrmMap* _pMap,
- const USHORT _nAlign,
- const USHORT _nRel,
+sal_uInt16 SwFrmPage::FillPosLB(const FrmMap* _pMap,
+ const sal_uInt16 _nAlign,
+ const sal_uInt16 _nRel,
ListBox& _rLB )
{
String sSelEntry, sOldEntry;
@@ -1249,7 +1307,7 @@ USHORT SwFrmPage::FillPosLB(const FrmMap* _pMap,
// i#22341 determine all possible listbox relations for
// given relation for map <aVCharMap>
- const ULONG nLBRelations = (_pMap != aVCharMap)
+ const sal_uLong nLBRelations = (_pMap != aVCharMap)
? 0L
: ::lcl_GetLBRelationsForRelations( _nRel );
@@ -1260,7 +1318,12 @@ USHORT SwFrmPage::FillPosLB(const FrmMap* _pMap,
// Warum nicht von links/von innen bzw. von oben?
{
SvxSwFramePosString::StringId eStrId = aMirrorPagesCB.IsChecked() ? _pMap[i].eMirrorStrId : _pMap[i].eStrId;
- eStrId = lcl_ChangeResIdToVerticalOrRTL(eStrId, bIsVerticalFrame, bIsInRightToLeft);
+ // --> OD 2009-08-31 #mongolianlayout#
+ eStrId = lcl_ChangeResIdToVerticalOrRTL( eStrId,
+ bIsVerticalFrame,
+ bIsVerticalL2R,
+ bIsInRightToLeft);
+ // <--
String sEntry(aFramePosString.GetString(eStrId));
if (_rLB.GetEntryPos(sEntry) == LISTBOX_ENTRY_NOTFOUND)
{
@@ -1289,15 +1352,15 @@ USHORT SwFrmPage::FillPosLB(const FrmMap* _pMap,
return GetMapPos(_pMap, _rLB);
}
-ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
- const USHORT _nLBSelPos,
- const USHORT _nAlign,
- USHORT _nRel,
+sal_uLong SwFrmPage::FillRelLB( const FrmMap* _pMap,
+ const sal_uInt16 _nLBSelPos,
+ const sal_uInt16 _nAlign,
+ sal_uInt16 _nRel,
ListBox& _rLB,
FixedText& _rFT )
{
String sSelEntry;
- ULONG nLBRelations = 0;
+ sal_uLong nLBRelations = 0;
size_t nMapCount = ::lcl_GetFrmMapCount(_pMap);
_rLB.Clear();
@@ -1307,7 +1370,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
if (_pMap == aVAsCharHtmlMap || _pMap == aVAsCharMap)
{
String sOldEntry(_rLB.GetSelectEntry());
- USHORT nRelCount = sizeof(aAsCharRelationMap) / sizeof(RelationMap);
+ sal_uInt16 nRelCount = sizeof(aAsCharRelationMap) / sizeof(RelationMap);
SvxSwFramePosString::StringId eStrId = _pMap[_nLBSelPos].eStrId;
for (size_t nMapPos = 0; nMapPos < nMapCount; nMapPos++)
@@ -1315,15 +1378,21 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
if (_pMap[nMapPos].eStrId == eStrId)
{
nLBRelations = _pMap[nMapPos].nLBRelations;
- for (USHORT nRelPos = 0; nRelPos < nRelCount; nRelPos++)
+ for (sal_uInt16 nRelPos = 0; nRelPos < nRelCount; nRelPos++)
{
if (nLBRelations & aAsCharRelationMap[nRelPos].nLBRelation)
{
SvxSwFramePosString::StringId sStrId1 = aAsCharRelationMap[nRelPos].eStrId;
- sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, bIsVerticalFrame, bIsInRightToLeft);
+ // --> OD 2009-08-31 #mongolianlayout#
+ sStrId1 =
+ lcl_ChangeResIdToVerticalOrRTL( sStrId1,
+ bIsVerticalFrame,
+ bIsVerticalL2R,
+ bIsInRightToLeft);
+ // <--
String sEntry = aFramePosString.GetString(sStrId1);
- USHORT nPos = _rLB.InsertEntry(sEntry);
+ sal_uInt16 nPos = _rLB.InsertEntry(sEntry);
_rLB.SetEntryData(nPos, &aAsCharRelationMap[nRelPos]);
if (_pMap[nMapPos].nAlign == _nAlign)
sSelEntry = sEntry;
@@ -1340,7 +1409,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
if (!_rLB.GetSelectEntryCount())
{
- for (USHORT i = 0; i < _rLB.GetEntryCount(); i++)
+ for (sal_uInt16 i = 0; i < _rLB.GetEntryCount(); i++)
{
RelationMap *pEntry = (RelationMap *)_rLB.GetEntryData(i);
if (pEntry->nLBRelation == LB_REL_CHAR) // Default
@@ -1354,7 +1423,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
}
else
{
- USHORT nRelCount = sizeof(aRelationMap) / sizeof(RelationMap);
+ sal_uInt16 nRelCount = sizeof(aRelationMap) / sizeof(RelationMap);
// special handling for map <aVCharMap>,
// because its ambigous in its <eStrId>/<eMirrorStrId>.
@@ -1371,19 +1440,25 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
nLBRelations = _pMap[_nLBSelPos].nLBRelations;
}
- for (ULONG nBit = 1; nBit < 0x80000000; nBit <<= 1)
+ for (sal_uLong nBit = 1; nBit < 0x80000000; nBit <<= 1)
{
if (nLBRelations & nBit)
{
- for (USHORT nRelPos = 0; nRelPos < nRelCount; nRelPos++)
+ for (sal_uInt16 nRelPos = 0; nRelPos < nRelCount; nRelPos++)
{
if (aRelationMap[nRelPos].nLBRelation == nBit)
{
SvxSwFramePosString::StringId eStrId1 = aMirrorPagesCB.IsChecked() ?
aRelationMap[nRelPos].eMirrorStrId : aRelationMap[nRelPos].eStrId;
- eStrId1 = lcl_ChangeResIdToVerticalOrRTL(eStrId1, bIsVerticalFrame, bIsInRightToLeft);
+ // --> OD 2009-08-31 #mongolianlayout#
+ eStrId1 =
+ lcl_ChangeResIdToVerticalOrRTL( eStrId1,
+ bIsVerticalFrame,
+ bIsVerticalL2R,
+ bIsInRightToLeft);
+ // <--
String sEntry = aFramePosString.GetString(eStrId1);
- USHORT nPos = _rLB.InsertEntry(sEntry);
+ sal_uInt16 nPos = _rLB.InsertEntry(sEntry);
_rLB.SetEntryData(nPos, &aRelationMap[nRelPos]);
if (!sSelEntry.Len() && aRelationMap[nRelPos].nRelation == _nRel)
sSelEntry = sEntry;
@@ -1416,7 +1491,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
break;
}
- for (USHORT i = 0; i < _rLB.GetEntryCount(); i++)
+ for (sal_uInt16 i = 0; i < _rLB.GetEntryCount(); i++)
{
RelationMap *pEntry = (RelationMap *)_rLB.GetEntryData(i);
if (pEntry->nRelation == _nRel)
@@ -1432,8 +1507,10 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
}
}
- _rLB.Enable(_rLB.GetEntryCount() != 0);
- _rFT.Enable(_rLB.GetEntryCount() != 0);
+ const bool bEnable = _rLB.GetEntryCount() != 0
+ && (&_rLB != &aVertRelationLB || m_bAllowVertPositioning);
+ _rLB.Enable( bEnable );
+ _rFT.Enable( bEnable );
RelHdl(&_rLB);
@@ -1443,7 +1520,7 @@ ULONG SwFrmPage::FillRelLB( const FrmMap* _pMap,
short SwFrmPage::GetRelation(FrmMap * /*pMap*/, ListBox &rRelationLB)
{
short nRel = 0;
- USHORT nPos = rRelationLB.GetSelectEntryPos();
+ sal_uInt16 nPos = rRelationLB.GetSelectEntryPos();
if (nPos != LISTBOX_ENTRY_NOTFOUND)
{
@@ -1454,7 +1531,7 @@ short SwFrmPage::GetRelation(FrmMap * /*pMap*/, ListBox &rRelationLB)
return nRel;
}
-short SwFrmPage::GetAlignment(FrmMap *pMap, USHORT nMapPos,
+short SwFrmPage::GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos,
ListBox &/*rAlignLB*/, ListBox &rRelationLB)
{
short nAlign = 0;
@@ -1466,7 +1543,7 @@ short SwFrmPage::GetAlignment(FrmMap *pMap, USHORT nMapPos,
{
if (rRelationLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND)
{
- ULONG nRel = ((RelationMap *)rRelationLB.GetEntryData(rRelationLB.GetSelectEntryPos()))->nLBRelation;
+ sal_uLong nRel = ((RelationMap *)rRelationLB.GetEntryData(rRelationLB.GetSelectEntryPos()))->nLBRelation;
size_t nMapCount = ::lcl_GetFrmMapCount(pMap);
SvxSwFramePosString::StringId eStrId = pMap[nMapPos].eStrId;
@@ -1474,7 +1551,7 @@ short SwFrmPage::GetAlignment(FrmMap *pMap, USHORT nMapPos,
{
if (pMap[i].eStrId == eStrId)
{
- ULONG nLBRelations = pMap[i].nLBRelations;
+ sal_uLong nLBRelations = pMap[i].nLBRelations;
if (nLBRelations & nRel)
{
nAlign = pMap[i].nAlign;
@@ -1490,10 +1567,10 @@ short SwFrmPage::GetAlignment(FrmMap *pMap, USHORT nMapPos,
return nAlign;
}
-USHORT SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB )
+sal_uInt16 SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB )
{
- USHORT nMapPos = 0;
- USHORT nLBSelPos = rAlignLB.GetSelectEntryPos();
+ sal_uInt16 nMapPos = 0;
+ sal_uInt16 nLBSelPos = rAlignLB.GetSelectEntryPos();
if (nLBSelPos != LISTBOX_ENTRY_NOTFOUND)
{
@@ -1511,7 +1588,7 @@ USHORT SwFrmPage::GetMapPos( const FrmMap *pMap, ListBox &rAlignLB )
if (sEntry == sSelEntry)
{
- nMapPos = static_cast< USHORT >(i);
+ nMapPos = static_cast< sal_uInt16 >(i);
break;
}
}
@@ -1550,9 +1627,9 @@ RndStdIds SwFrmPage::GetAnchor()
--------------------------------------------------------------------*/
void SwFrmPage::ActivatePage(const SfxItemSet& rSet)
{
- bNoModifyHdl = TRUE;
+ bNoModifyHdl = sal_True;
Init(rSet);
- bNoModifyHdl = FALSE;
+ bNoModifyHdl = sal_False;
//lock PercentFields
aWidthED.LockAutoCalculation(sal_True);
aHeightED.LockAutoCalculation(sal_True);
@@ -1578,7 +1655,7 @@ int SwFrmPage::DeactivatePage(SfxItemSet * _pSet)
_pSet->Put( aAnc );
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -1632,7 +1709,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
SwFlyFrmAttrMgr aMgr( bNew, pSh, (const SwAttrSet&)GetItemSet() );
SvxSwFrameValidation aVal;
- aVal.nAnchorType = static_cast< USHORT >(GetAnchor());
+ aVal.nAnchorType = static_cast< sal_uInt16 >(GetAnchor());
aVal.bAutoHeight = aAutoHeightCB.IsChecked();
aVal.bAutoWidth = aAutoWidthCB.IsChecked();
aVal.bMirror = aMirrorPagesCB.IsChecked();
@@ -1641,7 +1718,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
if ( pHMap )
{
// Ausrichtung Horizontal
- USHORT nMapPos = GetMapPos(pHMap, aHorizontalDLB);
+ sal_uInt16 nMapPos = GetMapPos(pHMap, aHorizontalDLB);
short nAlign = GetAlignment(pHMap, nMapPos, aHorizontalDLB, aHoriRelationLB);
short nRel = GetRelation(pHMap, aHoriRelationLB);
@@ -1654,7 +1731,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
if ( pVMap )
{
// Ausrichtung Vertikal
- USHORT nMapPos = GetMapPos(pVMap, aVerticalDLB);
+ sal_uInt16 nMapPos = GetMapPos(pVMap, aVerticalDLB);
short nAlign = GetAlignment(pVMap, nMapPos, aVerticalDLB, aVertRelationLB);
short nRel = GetRelation(pVMap, aVertRelationLB);
@@ -1672,7 +1749,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
aVal.nHPos = nAtHorzPosVal;
aVal.nVPos = nAtVertPosVal;
- aMgr.ValidateMetrics(aVal, mpToCharCntntPos, TRUE); // Einmal, um Referenzwerte fuer prozentuale Werte zu erhalten
+ aMgr.ValidateMetrics(aVal, mpToCharCntntPos, sal_True); // Einmal, um Referenzwerte fuer prozentuale Werte zu erhalten
// Referenzwerte fuer fuer Prozentwerte setzen (100%) ...
aWidthED.SetRefValue(aVal.aPercentSize.Width());
@@ -1693,7 +1770,7 @@ IMPL_LINK( SwFrmPage, RangeModifyHdl, Edit *, EMPTYARG )
const SwFmtCol& rCol = (const SwFmtCol&)GetTabDialog()->GetExampleSet()->Get(RES_COL);
if ( rCol.GetColumns().Count() > 1 )
{
- for ( USHORT i = 0; i < rCol.GetColumns().Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rCol.GetColumns().Count(); ++i )
{
aVal.nMinWidth += rCol.GetColumns()[i]->GetLeft() +
rCol.GetColumns()[i]->GetRight() +
@@ -1770,28 +1847,32 @@ IMPL_LINK( SwFrmPage, AnchorTypeHdl, RadioButton *, EMPTYARG )
PosHdl(&aHorizontalDLB);
PosHdl(&aVerticalDLB);
}
+
+ EnableVerticalPositioning( !(m_bIsMathOLE && m_bIsMathBaselineAlignment
+ && FLY_AS_CHAR == eId) );
+
return 0;
}
IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
{
- BOOL bHori = pLB == &aHorizontalDLB;
+ sal_Bool bHori = pLB == &aHorizontalDLB;
ListBox *pRelLB = bHori ? &aHoriRelationLB : &aVertRelationLB;
FixedText *pRelFT = bHori ? &aHoriRelationFT : &aVertRelationFT;
FrmMap *pMap = bHori ? pHMap : pVMap;
- USHORT nMapPos = GetMapPos(pMap, *pLB);
+ sal_uInt16 nMapPos = GetMapPos(pMap, *pLB);
short nAlign = GetAlignment(pMap, nMapPos, *pLB, *pRelLB);
if (bHori)
{
- BOOL bEnable = text::HoriOrientation::NONE == nAlign;
+ sal_Bool bEnable = text::HoriOrientation::NONE == nAlign;
aAtHorzPosED.Enable( bEnable );
aAtHorzPosFT.Enable( bEnable );
}
else
{
- BOOL bEnable = text::VertOrientation::NONE == nAlign;
+ sal_Bool bEnable = text::VertOrientation::NONE == nAlign && m_bAllowVertPositioning;
aAtVertPosED.Enable( bEnable );
aAtVertPosFT.Enable( bEnable );
}
@@ -1799,7 +1880,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
if (pLB) // Nur wenn Handler durch Aenderung des Controllers gerufen wurde
RangeModifyHdl( 0 );
- USHORT nRel = 0;
+ sal_uInt16 nRel = 0;
if (pLB->GetSelectEntryCount())
{
@@ -1814,15 +1895,15 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
UpdateExample();
if (bHori)
- bAtHorzPosModified = TRUE;
+ bAtHorzPosModified = sal_True;
else
- bAtVertPosModified = TRUE;
+ bAtVertPosModified = sal_True;
// Sonderbehandlung fuer HTML-Mode mit horz-vert-Abhaengigkeiten
if(bHtmlMode && nHtmlMode&HTMLMODE_SOME_ABS_POS &&
(FLY_AT_CHAR == GetAnchor()))
{
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
if(bHori)
{
// rechts ist nur unterhalb erlaubt - von links nur oben
@@ -1834,17 +1915,17 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
aVerticalDLB.SelectEntryPos(1);
else
aVerticalDLB.SelectEntryPos(0);
- bSet = TRUE;
+ bSet = sal_True;
}
else if(text::HoriOrientation::LEFT == nAlign && 1 == aVerticalDLB.GetSelectEntryPos())
{
aVerticalDLB.SelectEntryPos(0);
- bSet = TRUE;
+ bSet = sal_True;
}
else if(text::HoriOrientation::NONE == nAlign && 1 == aVerticalDLB.GetSelectEntryPos())
{
aVerticalDLB.SelectEntryPos(0);
- bSet = TRUE;
+ bSet = sal_True;
}
if(bSet)
PosHdl(&aVerticalDLB);
@@ -1856,7 +1937,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
if(1 == aHorizontalDLB.GetSelectEntryPos())
{
aHorizontalDLB.SelectEntryPos(0);
- bSet = TRUE;
+ bSet = sal_True;
}
aHoriRelationLB.SelectEntryPos(1);
}
@@ -1865,7 +1946,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
if(2 == aHorizontalDLB.GetSelectEntryPos())
{
aHorizontalDLB.SelectEntryPos(0);
- bSet = TRUE;
+ bSet = sal_True;
}
aHoriRelationLB.SelectEntryPos(0) ;
}
@@ -1882,20 +1963,20 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB )
--------------------------------------------------------------------*/
IMPL_LINK( SwFrmPage, RelHdl, ListBox *, pLB )
{
- BOOL bHori = pLB == &aHoriRelationLB;
+ sal_Bool bHori = pLB == &aHoriRelationLB;
UpdateExample();
if (bHori)
- bAtHorzPosModified = TRUE;
+ bAtHorzPosModified = sal_True;
else
- bAtVertPosModified = TRUE;
+ bAtVertPosModified = sal_True;
if (bHtmlMode && (FLY_AT_CHAR == GetAnchor()))
{
if(bHori)
{
- USHORT nRel = GetRelation(pHMap, aHoriRelationLB);
+ sal_uInt16 nRel = GetRelation(pHMap, aHoriRelationLB);
if(text::RelOrientation::PRINT_AREA == nRel && 0 == aVerticalDLB.GetSelectEntryPos())
{
aVerticalDLB.SelectEntryPos(1);
@@ -1960,10 +2041,10 @@ IMPL_LINK( SwFrmPage, ModifyHdl, Edit *, pEdit )
void SwFrmPage::UpdateExample()
{
- USHORT nPos = aHorizontalDLB.GetSelectEntryPos();
+ sal_uInt16 nPos = aHorizontalDLB.GetSelectEntryPos();
if ( pHMap && nPos != LISTBOX_ENTRY_NOTFOUND )
{
- USHORT nMapPos = GetMapPos(pHMap, aHorizontalDLB);
+ sal_uInt16 nMapPos = GetMapPos(pHMap, aHorizontalDLB);
short nAlign = GetAlignment(pHMap, nMapPos, aHorizontalDLB, aHoriRelationLB);
short nRel = GetRelation(pHMap, aHoriRelationLB);
@@ -1974,7 +2055,7 @@ void SwFrmPage::UpdateExample()
nPos = aVerticalDLB.GetSelectEntryPos();
if ( pVMap && nPos != LISTBOX_ENTRY_NOTFOUND )
{
- USHORT nMapPos = GetMapPos(pVMap, aVerticalDLB);
+ sal_uInt16 nMapPos = GetMapPos(pVMap, aVerticalDLB);
short nAlign = GetAlignment(pVMap, nMapPos, aVerticalDLB, aVertRelationLB);
short nRel = GetRelation(pVMap, aVertRelationLB);
@@ -1987,18 +2068,18 @@ void SwFrmPage::UpdateExample()
long nYPos = static_cast< long >(aAtVertPosED.Denormalize(aAtVertPosED.GetValue(FUNIT_TWIP)));
aExampleWN.SetRelPos(Point(nXPos, nYPos));
- aExampleWN.SetAnchor( static_cast< USHORT >(GetAnchor()) );
+ aExampleWN.SetAnchor( static_cast< sal_uInt16 >(GetAnchor()) );
aExampleWN.Invalidate();
}
-void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
+void SwFrmPage::Init(const SfxItemSet& rSet, sal_Bool bReset)
{
if(!bFormat)
{
SwWrtShell* pSh = ((SwFrmDlg*)GetParent()->GetParent())->GetWrtShell();
// Size
- const BOOL bSizeFixed = pSh->IsSelObjProtected( FLYPROTECT_FIXED );
+ const sal_Bool bSizeFixed = pSh->IsSelObjProtected( FLYPROTECT_FIXED );
aWidthED .Enable( !bSizeFixed );
aHeightED.Enable( !bSizeFixed );
@@ -2010,9 +2091,9 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
const SvGlobalName& rFactNm( pSh->GetOLEObject()->getClassID() );
struct _GlobalNameId {
- UINT32 n1;
- USHORT n2, n3;
- BYTE b8, b9, b10, b11, b12, b13, b14, b15;
+ sal_uInt32 n1;
+ sal_uInt16 n2, n3;
+ sal_uInt8 b8, b9, b10, b11, b12, b13, b14, b15;
} aGlbNmIds[4] = { { SO3_SM_CLASSID_60 }, { SO3_SM_CLASSID_50 },
{ SO3_SM_CLASSID_40 }, { SO3_SM_CLASSID_30 } };
@@ -2075,7 +2156,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
if (!IsInGraficMode())
{
SwFrmSize eSize = rSize.GetHeightSizeType();
- BOOL bCheck = eSize != ATT_FIX_SIZE;
+ sal_Bool bCheck = eSize != ATT_FIX_SIZE;
aAutoHeightCB.Check( bCheck );
HandleAutoCB( bCheck, aHeightFT, aHeightAutoFT );
if( eSize == ATT_VAR_SIZE )
@@ -2093,7 +2174,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
SwWrtShell* pSh = ((SwFrmDlg*)GetParent()->GetParent())->GetWrtShell();
const SwFrmFmt* pFmt = pSh->GetFlyFrmFmt();
if( pFmt && pFmt->GetChain().GetNext() )
- aAutoHeightCB.Enable( FALSE );
+ aAutoHeightCB.Enable( sal_False );
}
}
else
@@ -2112,7 +2193,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
// Spalten
SwFmtCol aCol( (const SwFmtCol&)rSet.Get(RES_COL) );
- ::FitToActualSize( aCol, (USHORT)rSize.GetWidth() );
+ ::FitToActualSize( aCol, (sal_uInt16)rSize.GetWidth() );
RndStdIds eAnchorId = (RndStdIds)GetAnchor();
@@ -2154,7 +2235,7 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
// Transparent fuers Bsp
// Umlauf fuers Bsp
const SwFmtSurround& rSurround = (const SwFmtSurround&)rSet.Get(RES_SURROUND);
- aExampleWN.SetWrap ( static_cast< USHORT >(rSurround.GetSurround()) );
+ aExampleWN.SetWrap ( static_cast< sal_uInt16 >(rSurround.GetSurround()) );
if ( rSurround.GetSurround() == SURROUND_THROUGHT )
{
@@ -2166,18 +2247,18 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
RangeModifyHdl(&aWidthED); // Referenzwerte setzen (fuer 100%)
if (rSize.GetWidthPercent() == 0xff || rSize.GetHeightPercent() == 0xff)
- aFixedRatioCB.Check(TRUE);
+ aFixedRatioCB.Check(sal_True);
if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != 0xff &&
!aRelWidthCB.IsChecked())
{
- aRelWidthCB.Check(TRUE);
+ aRelWidthCB.Check(sal_True);
RelSizeClickHdl(&aRelWidthCB);
aWidthED.SetPrcntValue(rSize.GetWidthPercent(), FUNIT_CUSTOM);
}
if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != 0xff &&
!aRelHeightCB.IsChecked())
{
- aRelHeightCB.Check(TRUE);
+ aRelHeightCB.Check(sal_True);
RelSizeClickHdl(&aRelHeightCB);
aHeightED.SetPrcntValue(rSize.GetHeightPercent(), FUNIT_CUSTOM);
}
@@ -2185,12 +2266,12 @@ void SwFrmPage::Init(const SfxItemSet& rSet, BOOL bReset)
aRelHeightCB.SaveValue();
}
-USHORT* SwFrmPage::GetRanges()
+sal_uInt16* SwFrmPage::GetRanges()
{
return aPageRg;
}
-void SwFrmPage::SetFormatUsed(BOOL bFmt)
+void SwFrmPage::SetFormatUsed(sal_Bool bFmt)
{
bFormat = bFmt;
if(bFormat)
@@ -2205,6 +2286,19 @@ void SwFrmPage::SetFormatUsed(BOOL bFmt)
}
}
+
+void SwFrmPage::EnableVerticalPositioning( bool bEnable )
+{
+ m_bAllowVertPositioning = bEnable;
+ aVerticalFT.Enable( bEnable );
+ aVerticalDLB.Enable( bEnable );
+ aAtVertPosFT.Enable( bEnable );
+ aAtVertPosED.Enable( bEnable );
+ aVertRelationFT.Enable( bEnable );
+ aVertRelationLB.Enable( bEnable );
+}
+
+
SwGrfExtPage::SwGrfExtPage(Window *pParent, const SfxItemSet &rSet) :
SfxTabPage( pParent, SW_RES(TP_GRF_EXT), rSet ),
aMirrorFL (this, SW_RES( FL_MIRROR )),
@@ -2222,6 +2316,8 @@ SwGrfExtPage::SwGrfExtPage(Window *pParent, const SfxItemSet &rSet) :
{
FreeResource();
+ aBrowseBT.SetAccessibleRelationMemberOf(&aConnectFL);
+
SetExchangeSupport();
aMirrorHorzBox.SetClickHdl( LINK(this, SwGrfExtPage, MirrorHdl));
aMirrorVertBox.SetClickHdl( LINK(this, SwGrfExtPage, MirrorHdl));
@@ -2241,14 +2337,14 @@ SfxTabPage* SwGrfExtPage::Create( Window *pParent, const SfxItemSet &rSet )
void SwGrfExtPage::Reset(const SfxItemSet &rSet)
{
const SfxPoolItem* pItem;
- USHORT nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
- bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE;
+ sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
+ bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_GRF_CONNECT, TRUE, &pItem)
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_GRF_CONNECT, sal_True, &pItem)
&& ((const SfxBoolItem *)pItem)->GetValue() )
{
aBrowseBT.Enable();
- aConnectED.SetReadOnly(FALSE);
+ aConnectED.SetReadOnly(sal_False);
}
ActivatePage(rSet);
@@ -2257,34 +2353,34 @@ void SwGrfExtPage::Reset(const SfxItemSet &rSet)
void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
{
const SvxProtectItem& rProt = (const SvxProtectItem& )rSet.Get(RES_PROTECT);
- BOOL bProtCntnt = rProt.IsCntntProtected();
+ sal_Bool bProtCntnt = rProt.IsCntntProtected();
const SfxPoolItem* pItem = 0;
- BOOL bEnable = FALSE;
- BOOL bEnableMirrorRB = FALSE;
+ sal_Bool bEnable = sal_False;
+ sal_Bool bEnableMirrorRB = sal_False;
- SfxItemState eState = rSet.GetItemState(RES_GRFATR_MIRRORGRF, TRUE, &pItem);
+ SfxItemState eState = rSet.GetItemState(RES_GRFATR_MIRRORGRF, sal_True, &pItem);
if( SFX_ITEM_UNKNOWN != eState && !bProtCntnt && !bHtmlMode )
{
if( SFX_ITEM_SET != eState )
pItem = &rSet.Get( RES_GRFATR_MIRRORGRF );
- bEnable = TRUE;
+ bEnable = sal_True;
MirrorGraph eMirror = static_cast< MirrorGraph >(((const SwMirrorGrf* )pItem)->GetValue());
switch( eMirror )
{
case RES_MIRROR_GRAPH_DONT: break;
- case RES_MIRROR_GRAPH_VERT: aMirrorHorzBox.Check(TRUE); break;
- case RES_MIRROR_GRAPH_HOR: aMirrorVertBox.Check(TRUE); break;
- case RES_MIRROR_GRAPH_BOTH: aMirrorHorzBox.Check(TRUE);
- aMirrorVertBox.Check(TRUE);
+ case RES_MIRROR_GRAPH_VERT: aMirrorHorzBox.Check(sal_True); break;
+ case RES_MIRROR_GRAPH_HOR: aMirrorVertBox.Check(sal_True); break;
+ case RES_MIRROR_GRAPH_BOTH: aMirrorHorzBox.Check(sal_True);
+ aMirrorVertBox.Check(sal_True);
break;
default:
;
}
- USHORT nPos = ((const SwMirrorGrf* )pItem)->IsGrfToggle() ? 1 : 0;
+ sal_uInt16 nPos = ((const SwMirrorGrf* )pItem)->IsGrfToggle() ? 1 : 0;
nPos += (eMirror == RES_MIRROR_GRAPH_VERT || eMirror == RES_MIRROR_GRAPH_BOTH)
? 2 : 0;
@@ -2294,7 +2390,7 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
{
case 1: // Auf linken bzw geraden Seiten spiegeln
aLeftPagesRB.Check();
- aMirrorHorzBox.Check(TRUE);
+ aMirrorHorzBox.Check(sal_True);
break;
case 2: // Auf allen Seiten spiegeln
aAllPagesRB.Check();
@@ -2308,7 +2404,7 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
}
}
- if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, sal_False, &pItem ) )
{
const SvxBrushItem& rBrush = *(SvxBrushItem*)pItem;
if( rBrush.GetGraphicLink() )
@@ -2339,22 +2435,22 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet)
aBmpWin.Invalidate();
}
-BOOL SwGrfExtPage::FillItemSet( SfxItemSet &rSet )
+sal_Bool SwGrfExtPage::FillItemSet( SfxItemSet &rSet )
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if ( aMirrorHorzBox.GetSavedValue() != aMirrorHorzBox.IsChecked() ||
aMirrorVertBox.GetSavedValue() != aMirrorVertBox.IsChecked() ||
aAllPagesRB .GetSavedValue() != aAllPagesRB .IsChecked() ||
aLeftPagesRB.GetSavedValue() != aLeftPagesRB.IsChecked() ||
aRightPagesRB.GetSavedValue() != aRightPagesRB.IsChecked())
{
- bModified = TRUE;
+ bModified = sal_True;
- BOOL bHori = FALSE;
+ sal_Bool bHori = sal_False;
if (aMirrorHorzBox.IsChecked() &&
!aLeftPagesRB.IsChecked())
- bHori = TRUE;
+ bHori = sal_True;
MirrorGraph eMirror;
eMirror = aMirrorVertBox.IsChecked() && bHori ?
@@ -2362,7 +2458,7 @@ BOOL SwGrfExtPage::FillItemSet( SfxItemSet &rSet )
RES_MIRROR_GRAPH_VERT : aMirrorVertBox.IsChecked() ?
RES_MIRROR_GRAPH_HOR : RES_MIRROR_GRAPH_DONT;
- BOOL bMirror = !aAllPagesRB.IsChecked();
+ sal_Bool bMirror = !aAllPagesRB.IsChecked();
SwMirrorGrf aMirror( eMirror );
aMirror.SetGrfToggle(bMirror );
rSet.Put( aMirror );
@@ -2370,7 +2466,7 @@ BOOL SwGrfExtPage::FillItemSet( SfxItemSet &rSet )
if( aGrfName != aNewGrfName || aConnectED.IsModified() )
{
- bModified = TRUE;
+ bModified = sal_True;
aGrfName = aConnectED.GetText();
rSet.Put( SvxBrushItem( aGrfName, aFilterName, GPOS_LT,
SID_ATTR_GRAF_GRAPHIC ));
@@ -2382,7 +2478,7 @@ int SwGrfExtPage::DeactivatePage(SfxItemSet *_pSet)
{
if( _pSet )
FillItemSet( *_pSet );
- return TRUE;
+ return sal_True;
}
IMPL_LINK( SwGrfExtPage, BrowseHdl, Button *, EMPTYARG )
@@ -2411,19 +2507,19 @@ IMPL_LINK( SwGrfExtPage, BrowseHdl, Button *, EMPTYARG )
//Spiegeln zuruecksetzen, da u. U. eine Bitmap
//gegen eine andere Art von Grafik ausgetauscht worden ist,
//die nicht gespiegelt werden kann.
- aMirrorVertBox.Check(FALSE);
- aMirrorHorzBox.Check(FALSE);
- aAllPagesRB .Enable(FALSE);
- aLeftPagesRB.Enable(FALSE);
- aRightPagesRB.Enable(FALSE);
- aBmpWin.MirrorHorz(FALSE);
- aBmpWin.MirrorVert(FALSE);
+ aMirrorVertBox.Check(sal_False);
+ aMirrorHorzBox.Check(sal_False);
+ aAllPagesRB .Enable(sal_False);
+ aLeftPagesRB.Enable(sal_False);
+ aRightPagesRB.Enable(sal_False);
+ aBmpWin.MirrorHorz(sal_False);
+ aBmpWin.MirrorVert(sal_False);
Graphic aGraphic;
GraphicFilter::LoadGraphic( pGrfDlg->GetPath(), aEmptyStr, aGraphic );
aBmpWin.SetGraphic(aGraphic);
- BOOL bEnable = GRAPHIC_BITMAP == aGraphic.GetType() ||
+ sal_Bool bEnable = GRAPHIC_BITMAP == aGraphic.GetType() ||
GRAPHIC_GDIMETAFILE == aGraphic.GetType();
aMirrorVertBox.Enable(bEnable);
aMirrorHorzBox.Enable(bEnable);
@@ -2436,7 +2532,7 @@ IMPL_LINK( SwGrfExtPage, BrowseHdl, Button *, EMPTYARG )
IMPL_LINK( SwGrfExtPage, MirrorHdl, CheckBox *, EMPTYARG )
{
- BOOL bEnable = aMirrorHorzBox.IsChecked();
+ sal_Bool bEnable = aMirrorHorzBox.IsChecked();
aBmpWin.MirrorHorz( aMirrorVertBox.IsChecked() );
aBmpWin.MirrorVert( bEnable );
@@ -2454,15 +2550,15 @@ IMPL_LINK( SwGrfExtPage, MirrorHdl, CheckBox *, EMPTYARG )
/*--------------------------------------------------------------------
Beschreibung: BeispielWindow
--------------------------------------------------------------------*/
-BmpWindow::BmpWindow( Window* pPar, USHORT nId,
+BmpWindow::BmpWindow( Window* pPar, sal_uInt16 nId,
const Graphic& rGraphic, const BitmapEx& rBmp ) :
Window(pPar, SW_RES(nId)),
aGraphic(rGraphic),
aBmp(rBmp),
- bHorz(FALSE),
- bVert(FALSE),
- bGraphic(FALSE),
- bLeftAlign(FALSE)
+ bHorz(sal_False),
+ bVert(sal_False),
+ bGraphic(sal_False),
+ bLeftAlign(sal_False)
{
SetBackground();
}
@@ -2550,7 +2646,7 @@ SwFrmURLPage::~SwFrmURLPage()
void SwFrmURLPage::Reset( const SfxItemSet &rSet )
{
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == rSet.GetItemState( SID_DOCFRAME, TRUE, &pItem))
+ if ( SFX_ITEM_SET == rSet.GetItemState( SID_DOCFRAME, sal_True, &pItem))
{
TargetList* pList = new TargetList;
((const SfxFrameItem*)pItem)->GetFrame()->GetTargetList(*pList);
@@ -2569,7 +2665,7 @@ void SwFrmURLPage::Reset( const SfxItemSet &rSet )
delete pList;
}
- if ( SFX_ITEM_SET == rSet.GetItemState( RES_URL, TRUE, &pItem ) )
+ if ( SFX_ITEM_SET == rSet.GetItemState( RES_URL, sal_True, &pItem ) )
{
const SwFmtURL* pFmtURL = (const SwFmtURL*)pItem;
aURLED.SetText( INetURLObject::decode( pFmtURL->GetURL(),
@@ -2586,15 +2682,15 @@ void SwFrmURLPage::Reset( const SfxItemSet &rSet )
aFrameCB.SaveValue();
}
else
- aClientCB.Enable( FALSE );
+ aClientCB.Enable( sal_False );
aServerCB.SaveValue();
aClientCB.SaveValue();
}
-BOOL SwFrmURLPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwFrmURLPage::FillItemSet(SfxItemSet &rSet)
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
const SwFmtURL* pOldURL = (SwFmtURL*)GetOldItem(rSet, RES_URL);
SwFmtURL* pFmtURL;
if(pOldURL)
@@ -2611,20 +2707,20 @@ BOOL SwFrmURLPage::FillItemSet(SfxItemSet &rSet)
{
pFmtURL->SetURL( sText, aServerCB.IsChecked() );
pFmtURL->SetName( aNameED.GetText() );
- bModified = TRUE;
+ bModified = sal_True;
}
}
if(!aClientCB.IsChecked() && pFmtURL->GetMap() != 0)
{
pFmtURL->SetMap(0);
- bModified = TRUE;
+ bModified = sal_True;
}
if(pFmtURL->GetTargetFrameName() != aFrameCB.GetText())
{
pFmtURL->SetTargetFrameName(aFrameCB.GetText());
- bModified = TRUE;
+ bModified = sal_True;
}
rSet.Put(*pFmtURL);
delete pFmtURL;
@@ -2669,6 +2765,7 @@ void lcl_Move(Window& rWin, sal_Int32 nDiff)
SwFrmAddPage::SwFrmAddPage(Window *pParent, const SfxItemSet &rSet ) :
SfxTabPage(pParent, SW_RES(TP_FRM_ADD), rSet),
+ aNamesFL (this, SW_RES(FL_NAME)),
aNameFT (this, SW_RES(FT_NAME)),
aNameED (this, SW_RES(ED_NAME)),
aAltNameFT (this, SW_RES(FT_ALT_NAME)),
@@ -2677,20 +2774,18 @@ SwFrmAddPage::SwFrmAddPage(Window *pParent, const SfxItemSet &rSet ) :
aPrevLB (this, SW_RES(LB_PREV)),
aNextFT (this, SW_RES(FT_NEXT)),
aNextLB (this, SW_RES(LB_NEXT)),
- aNamesFL (this, SW_RES(FL_NAME)),
+ aProtectFL (this, SW_RES(FL_PROTECT)),
aProtectContentCB (this, SW_RES(CB_PROTECT_CONTENT)),
aProtectFrameCB (this, SW_RES(CB_PROTECT_FRAME)),
aProtectSizeCB (this, SW_RES(CB_PROTECT_SIZE)),
- aProtectFL (this, SW_RES(FL_PROTECT)),
+ aExtFL (this, SW_RES(FL_EXT)),
aEditInReadonlyCB (this, SW_RES(CB_EDIT_IN_READONLY)),
aPrintFrameCB (this, SW_RES(CB_PRINT_FRAME)),
aTextFlowFT (this, SW_RES(FT_TEXTFLOW)),
aTextFlowLB (this, SW_RES(LB_TEXTFLOW)),
- aExtFL (this, SW_RES(FL_EXT)),
-
pWrtSh(0),
nDlgType(0),
@@ -2714,8 +2809,8 @@ SfxTabPage* SwFrmAddPage::Create(Window *pParent, const SfxItemSet &rSet)
void SwFrmAddPage::Reset(const SfxItemSet &rSet )
{
const SfxPoolItem* pItem;
- USHORT nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
- bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE;
+ sal_uInt16 nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
+ bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
if(bHtmlMode)
{
aProtectContentCB .Hide();
@@ -2732,7 +2827,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
aPrintFrameCB.SetPosPixel(aEditInReadonlyCB.GetPosPixel());
}
- if(SFX_ITEM_SET == rSet.GetItemState(FN_SET_FRM_ALT_NAME, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_SET_FRM_ALT_NAME, sal_False, &pItem))
{
aAltNameED.SetText(((const SfxStringItem*)pItem)->GetValue());
aAltNameED.SaveValue();
@@ -2743,7 +2838,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
// Grafik einfuegen - Eigenschaften
// bNew ist nicht gesetzt, deswegen ueber Selektion erkennen
String aTmpName1;
- if(SFX_ITEM_SET == rSet.GetItemState(FN_SET_FRM_NAME, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(FN_SET_FRM_NAME, sal_False, &pItem))
{
aTmpName1 = ((const SfxStringItem*)pItem)->GetValue();
}
@@ -2769,11 +2864,11 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
}
else
{
- aNameED.Enable( FALSE );
- aAltNameED.Enable(FALSE);
- aNameFT.Enable( FALSE );
- aAltNameFT.Enable(FALSE);
- aNamesFL.Enable(FALSE);
+ aNameED.Enable( sal_False );
+ aAltNameED.Enable(sal_False);
+ aNameFT.Enable( sal_False );
+ aAltNameFT.Enable(sal_False);
+ aNamesFL.Enable(sal_False);
}
if(nDlgType == DLG_FRM_STD && aAltNameFT.IsVisible())
{
@@ -2833,7 +2928,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
::std::vector< String > aThisPageFrames;
::std::vector< String > aNextPageFrames;
::std::vector< String > aRemainFrames;
- pWrtSh->GetConnectableFrmFmts(*pFmt, sNextChain, FALSE,
+ pWrtSh->GetConnectableFrmFmts(*pFmt, sNextChain, sal_False,
aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames );
lcl_InsertVectors(aPrevLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames);
if(sPrevChain.Len())
@@ -2849,7 +2944,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
aThisPageFrames.erase(aThisPageFrames.begin(), aThisPageFrames.end());
aRemainFrames.erase(aRemainFrames.begin(), aRemainFrames.end());
- pWrtSh->GetConnectableFrmFmts(*pFmt, sPrevChain, TRUE,
+ pWrtSh->GetConnectableFrmFmts(*pFmt, sPrevChain, sal_True,
aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames );
lcl_InsertVectors(aNextLB, aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames);
if(sNextChain.Len())
@@ -2883,7 +2978,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
if( (!bHtmlMode || (0 != (nHtmlMode&HTMLMODE_SOME_STYLES)))
&& DLG_FRM_GRF != nDlgType && DLG_FRM_OLE != nDlgType &&
SFX_ITEM_UNKNOWN != ( eState = rSet.GetItemState(
- RES_FRAMEDIR, TRUE )) )
+ RES_FRAMEDIR, sal_True )) )
{
aTextFlowFT.Show();
aTextFlowLB.Show();
@@ -2891,7 +2986,7 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
//vertical text flow is not possible in HTML
if(bHtmlMode)
{
- ULONG nData = FRMDIR_VERT_TOP_RIGHT;
+ sal_uLong nData = FRMDIR_VERT_TOP_RIGHT;
aTextFlowLB.RemoveEntry(aTextFlowLB.GetEntryPos((void*)nData));
}
sal_uInt16 nPos, nVal = ((SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR)).GetValue();
@@ -2908,9 +3003,9 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
}
}
-BOOL SwFrmAddPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwFrmAddPage::FillItemSet(SfxItemSet &rSet)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (aNameED.GetText() != aNameED.GetSavedValue())
bRet |= 0 != rSet.Put(SfxStringItem(FN_SET_FRM_NAME, aNameED.GetText()));
if (aAltNameED.GetText() != aAltNameED.GetSavedValue())
@@ -2925,7 +3020,7 @@ BOOL SwFrmAddPage::FillItemSet(SfxItemSet &rSet)
aProt != *pOldItem )
bRet |= 0 != rSet.Put( aProt);
- BOOL bChecked;
+ sal_Bool bChecked;
if ( (bChecked = aEditInReadonlyCB.IsChecked()) != aEditInReadonlyCB.GetSavedValue() )
bRet |= 0 != rSet.Put( SwFmtEditInReadonly( RES_EDIT_IN_READONLY, bChecked));
@@ -2970,34 +3065,34 @@ BOOL SwFrmAddPage::FillItemSet(SfxItemSet &rSet)
return bRet;
}
-USHORT* SwFrmAddPage::GetRanges()
+sal_uInt16* SwFrmAddPage::GetRanges()
{
return aAddPgRg;
}
IMPL_LINK(SwFrmAddPage, EditModifyHdl, Edit*, EMPTYARG)
{
- BOOL bEnable = 0 != aNameED.GetText().Len();
+ sal_Bool bEnable = 0 != aNameED.GetText().Len();
aAltNameED.Enable(bEnable);
aAltNameFT.Enable(bEnable);
return 0;
}
-void SwFrmAddPage::SetFormatUsed(BOOL bFmt)
+void SwFrmAddPage::SetFormatUsed(sal_Bool bFmt)
{
bFormat = bFmt;
if(bFormat)
{
- aNameFT.Show(FALSE);
- aNameED.Show(FALSE);
- aAltNameFT.Show(FALSE);
- aAltNameED.Show(FALSE);
- aPrevFT.Show(FALSE);
- aPrevLB.Show(FALSE);
- aNextFT.Show(FALSE);
- aNextLB.Show(FALSE);
- aNamesFL.Show(FALSE);
+ aNameFT.Show(sal_False);
+ aNameED.Show(sal_False);
+ aAltNameFT.Show(sal_False);
+ aAltNameED.Show(sal_False);
+ aPrevFT.Show(sal_False);
+ aPrevLB.Show(sal_False);
+ aNextFT.Show(sal_False);
+ aNextLB.Show(sal_False);
+ aNamesFL.Show(sal_False);
sal_Int32 nDiff = aExtFL.GetPosPixel().Y() - aNamesFL.GetPosPixel().Y();
Window* aWindows[] =
@@ -3029,9 +3124,9 @@ IMPL_LINK(SwFrmAddPage, ChainModifyHdl, ListBox*, pBox)
SwFrmFmt* pFmt = pWrtSh->GetFlyFrmFmt();
if (pFmt)
{
- BOOL bNextBox = &aNextLB == pBox;
+ sal_Bool bNextBox = &aNextLB == pBox;
ListBox& rChangeLB = bNextBox ? aPrevLB : aNextLB;
- for(USHORT nEntry = rChangeLB.GetEntryCount(); nEntry > 1; nEntry--)
+ for(sal_uInt16 nEntry = rChangeLB.GetEntryCount(); nEntry > 1; nEntry--)
rChangeLB.RemoveEntry(nEntry - 1);
//determine chainable frames
::std::vector< String > aPrevPageFrames;
diff --git a/sw/source/ui/frmdlg/frmpage.src b/sw/source/ui/frmdlg/frmpage.src
index 0004d47c6473..f813471c5b76 100644
--- a/sw/source/ui/frmdlg/frmpage.src
+++ b/sw/source/ui/frmdlg/frmpage.src
@@ -243,6 +243,7 @@ TabPage TP_FRM_STD
};
MetricField ED_WIDTH
{
+ HelpID = "sw:MetricField:TP_FRM_STD:ED_WIDTH";
Border = TRUE ;
Pos = MAP_APPFONT ( SWFRMPG_COL_3 , SWFRMPG_ROW_1 ) ;
Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_3) , RSC_CD_TEXTBOX_HEIGHT ) ;
@@ -261,6 +262,7 @@ TabPage TP_FRM_STD
};
CheckBox CB_REL_WIDTH
{
+ HelpID = "sw:CheckBox:TP_FRM_STD:CB_REL_WIDTH";
Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_3 ) ;
Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_2) , RSC_CD_CHECKBOX_HEIGHT ) ;
TabStop = TRUE ;
@@ -268,6 +270,7 @@ TabPage TP_FRM_STD
};
CheckBox CB_AUTOWIDTH
{
+ HelpID = "sw:CheckBox:TP_FRM_STD:CB_AUTOWIDTH";
Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_4 ) ;
Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_2) , RSC_CD_CHECKBOX_HEIGHT ) ;
TabStop = TRUE ;
@@ -289,6 +292,7 @@ TabPage TP_FRM_STD
};
MetricField ED_HEIGHT
{
+ HelpID = "sw:MetricField:TP_FRM_STD:ED_HEIGHT";
Border = TRUE ;
Pos = MAP_APPFONT ( SWFRMPG_COL_3 , SWFRMPG_ROW_5 ) ;
Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_3) , RSC_CD_TEXTBOX_HEIGHT ) ;
@@ -306,6 +310,7 @@ TabPage TP_FRM_STD
};
CheckBox CB_REL_HEIGHT
{
+ HelpID = "sw:CheckBox:TP_FRM_STD:CB_REL_HEIGHT";
Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_7 ) ;
Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_2) , RSC_CD_CHECKBOX_HEIGHT ) ;
TabStop = TRUE ;
@@ -313,6 +318,7 @@ TabPage TP_FRM_STD
};
CheckBox CB_AUTOHEIGHT
{
+ HelpID = "sw:CheckBox:TP_FRM_STD:CB_AUTOHEIGHT";
Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_8 ) ;
Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_2) , RSC_CD_CHECKBOX_HEIGHT ) ;
TabStop = TRUE ;
@@ -320,6 +326,7 @@ TabPage TP_FRM_STD
};
CheckBox CB_FIXEDRATIO
{
+ HelpID = "sw:CheckBox:TP_FRM_STD:CB_FIXEDRATIO";
Pos = MAP_APPFONT ( SWFRMPG_COL_1 , SWFRMPG_ROW_9 ) ;
Size = MAP_APPFONT ( (SWFRMPG_COL_4-SWFRMPG_COL_1) , RSC_CD_CHECKBOX_HEIGHT ) ;
TabStop = TRUE ;
@@ -327,6 +334,7 @@ TabPage TP_FRM_STD
};
PushButton BT_REALSIZE
{
+ HelpID = "sw:PushButton:TP_FRM_STD:BT_REALSIZE";
Pos = MAP_APPFONT ( 35 , 86 ) ;
Size = MAP_APPFONT ( 70 , 14 ) ;
TabStop = TRUE ;
@@ -347,30 +355,35 @@ TabPage TP_FRM_STD
};
RadioButton RB_ANCHOR_PAGE
{
+ HelpID = "sw:RadioButton:TP_FRM_STD:RB_ANCHOR_PAGE";
Pos = MAP_APPFONT ( 122 , 14 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "To ~page";
};
RadioButton RB_ANCHOR_PARA
{
+ HelpID = "sw:RadioButton:TP_FRM_STD:RB_ANCHOR_PARA";
Pos = MAP_APPFONT ( 122 , 28 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "To paragrap~h";
};
RadioButton RB_ANCHOR_AT_CHAR
{
+ HelpID = "sw:RadioButton:TP_FRM_STD:RB_ANCHOR_AT_CHAR";
Pos = MAP_APPFONT ( 122 , 42 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "To cha~racter";
};
RadioButton RB_ANCHOR_AS_CHAR
{
+ HelpID = "sw:RadioButton:TP_FRM_STD:RB_ANCHOR_AS_CHAR";
Pos = MAP_APPFONT ( 122 , 56 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "~As character" ;
};
RadioButton RB_ANCHOR_FRAME
{
+ HelpID = "sw:RadioButton:TP_FRM_STD:RB_ANCHOR_FRAME";
Pos = MAP_APPFONT ( 122 , 70 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "To ~frame";
@@ -395,6 +408,7 @@ TabPage TP_FRM_STD
};
ListBox DLB_HORIZONTAL
{
+ HelpID = "sw:ListBox:TP_FRM_STD:DLB_HORIZONTAL";
Pos = MAP_APPFONT ( 49 , SWFRMPG_ROW_11 ) ;
Size = MAP_APPFONT ( 50 , 60 ) ;
TabStop = TRUE ;
@@ -409,6 +423,7 @@ TabPage TP_FRM_STD
};
MetricField ED_AT_HORZ_POS
{
+ HelpID = "sw:MetricField:TP_FRM_STD:ED_AT_HORZ_POS";
Border = TRUE ;
Pos = MAP_APPFONT ( 123 , SWFRMPG_ROW_11 ) ;
Size = MAP_APPFONT ( 35 , RSC_CD_TEXTBOX_HEIGHT ) ;
@@ -433,6 +448,7 @@ TabPage TP_FRM_STD
};
ListBox LB_HORI_RELATION
{
+ HelpID = "sw:ListBox:TP_FRM_STD:LB_HORI_RELATION";
Pos = MAP_APPFONT ( 183 , SWFRMPG_ROW_11 ) ;
Size = MAP_APPFONT ( 65 , 60 ) ;
TabStop = TRUE ;
@@ -440,6 +456,7 @@ TabPage TP_FRM_STD
};
CheckBox CB_MIRROR
{
+ HelpID = "sw:CheckBox:TP_FRM_STD:CB_MIRROR";
Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_13 ) ;
Size = MAP_APPFONT ( (260-SWFRMPG_COL_2-1) , RSC_CD_CHECKBOX_HEIGHT ) ;
TabStop = TRUE ;
@@ -454,6 +471,7 @@ TabPage TP_FRM_STD
};
ListBox DLB_VERTICAL
{
+ HelpID = "sw:ListBox:TP_FRM_STD:DLB_VERTICAL";
Pos = MAP_APPFONT ( 49 , SWFRMPG_ROW_14 ) ;
Size = MAP_APPFONT ( 50 , 60 ) ;
TabStop = TRUE ;
@@ -468,6 +486,7 @@ TabPage TP_FRM_STD
};
MetricField ED_AT_VERT_POS
{
+ HelpID = "sw:MetricField:TP_FRM_STD:ED_AT_VERT_POS";
Border = TRUE ;
Pos = MAP_APPFONT ( 123 , SWFRMPG_ROW_14 ) ;
Size = MAP_APPFONT ( 35 , RSC_CD_TEXTBOX_HEIGHT ) ;
@@ -492,6 +511,7 @@ TabPage TP_FRM_STD
};
ListBox LB_VERT_RELATION
{
+ HelpID = "sw:ListBox:TP_FRM_STD:LB_VERT_RELATION";
Pos = MAP_APPFONT ( 183 , SWFRMPG_ROW_14 ) ;
Size = MAP_APPFONT ( 65 , 60 ) ;
TabStop = TRUE ;
@@ -499,6 +519,7 @@ TabPage TP_FRM_STD
};
CheckBox CB_FOLLOWTEXTFLOW
{
+ HelpID = "sw:CheckBox:TP_FRM_STD:CB_FOLLOWTEXTFLOW";
Pos = MAP_APPFONT ( SWFRMPG_COL_2 , SWFRMPG_ROW_16 ) ;
Size = MAP_APPFONT ( (260-SWFRMPG_COL_2-1) , RSC_CD_CHECKBOX_HEIGHT ) ;
TabStop = TRUE ;
@@ -536,6 +557,7 @@ TabPage TP_GRF_EXT
};
Edit ED_CONNECT
{
+ HelpID = "sw:Edit:TP_GRF_EXT:ED_CONNECT";
Pos = MAP_APPFONT ( 13 , 109 ) ;
Size = MAP_APPFONT ( 200 , 12 ) ;
Text [ en-US ] = "[None]" ;
@@ -545,6 +567,7 @@ TabPage TP_GRF_EXT
};
PushButton PB_BROWSE
{
+ HelpID = "sw:PushButton:TP_GRF_EXT:PB_BROWSE";
Disable = TRUE ;
Pos = MAP_APPFONT ( 230 , 109 ) ;
Size = MAP_APPFONT ( 12 , 12 ) ;
@@ -554,6 +577,7 @@ TabPage TP_GRF_EXT
};
CheckBox CB_VERT
{
+ HelpID = "sw:CheckBox:TP_GRF_EXT:CB_VERT";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 48 , 10 ) ;
TabStop = TRUE ;
@@ -562,6 +586,7 @@ TabPage TP_GRF_EXT
};
CheckBox CB_HOR
{
+ HelpID = "sw:CheckBox:TP_GRF_EXT:CB_HOR";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
TabStop = TRUE ;
@@ -569,6 +594,7 @@ TabPage TP_GRF_EXT
};
RadioButton RB_MIRROR_ALL_PAGES
{
+ HelpID = "sw:RadioButton:TP_GRF_EXT:RB_MIRROR_ALL_PAGES";
Pos = MAP_APPFONT ( 18 , 42 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
TabStop = TRUE ;
@@ -576,6 +602,7 @@ TabPage TP_GRF_EXT
};
RadioButton RB_MIRROR_LEFT_PAGES
{
+ HelpID = "sw:RadioButton:TP_GRF_EXT:RB_MIRROR_LEFT_PAGES";
Pos = MAP_APPFONT ( 18 , 56 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
TabStop = TRUE ;
@@ -583,6 +610,7 @@ TabPage TP_GRF_EXT
};
RadioButton RB_MIRROR_RIGHT_PAGES
{
+ HelpID = "sw:RadioButton:TP_GRF_EXT:RB_MIRROR_RIGHT_PAGES";
Pos = MAP_APPFONT ( 18 , 70 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
TabStop = TRUE ;
@@ -620,6 +648,7 @@ TabPage TP_FRM_URL
};
Edit ED_URL
{
+ HelpID = "sw:Edit:TP_FRM_URL:ED_URL";
Pos = MAP_APPFONT ( 45 , 14 ) ;
Size = MAP_APPFONT ( 149 , 12 ) ;
Left = TRUE ;
@@ -634,6 +663,7 @@ TabPage TP_FRM_URL
};
Edit ED_NAME
{
+ HelpID = "sw:Edit:TP_FRM_URL:ED_NAME";
Pos = MAP_APPFONT ( 45 , 30 ) ;
Size = MAP_APPFONT ( 149 , 12 ) ;
Left = TRUE ;
@@ -648,6 +678,7 @@ TabPage TP_FRM_URL
};
ComboBox CB_FRAME
{
+ HelpID = "sw:ComboBox:TP_FRM_URL:CB_FRAME";
Pos = MAP_APPFONT ( 45 , 46 ) ;
Size = MAP_APPFONT ( 89 , 50 ) ;
Left = TRUE ;
@@ -656,6 +687,7 @@ TabPage TP_FRM_URL
};
PushButton PB_SEARCH
{
+ HelpID = "sw:PushButton:TP_FRM_URL:PB_SEARCH";
Pos = MAP_APPFONT ( 198 , 13 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -669,12 +701,14 @@ TabPage TP_FRM_URL
};
CheckBox CB_SERVER
{
+ HelpID = "sw:CheckBox:TP_FRM_URL:CB_SERVER";
Pos = MAP_APPFONT ( 12 , 75 ) ;
Size = MAP_APPFONT ( 236 , 10 ) ;
Text [ en-US ] = "~Server-side image map";
};
CheckBox CB_CLIENT
{
+ HelpID = "sw:CheckBox:TP_FRM_URL:CB_CLIENT";
Pos = MAP_APPFONT ( 12 , 89 ) ;
Size = MAP_APPFONT ( 236 , 10 ) ;
Text [ en-US ] = "~Client-side image map";
@@ -701,6 +735,7 @@ TabPage TP_FRM_ADD
};
Edit ED_NAME
{
+ HelpID = "sw:Edit:TP_FRM_ADD:ED_NAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 91 , 14 ) ;
Size = MAP_APPFONT ( 157 , 12 ) ;
@@ -714,6 +749,7 @@ TabPage TP_FRM_ADD
};
Edit ED_ALT_NAME
{
+ HelpID = "sw:Edit:TP_FRM_ADD:ED_ALT_NAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 91 , 30 ) ;
Size = MAP_APPFONT ( 157 , 12 ) ;
@@ -727,6 +763,7 @@ TabPage TP_FRM_ADD
};
ListBox LB_PREV
{
+ HelpID = "sw:ListBox:TP_FRM_ADD:LB_PREV";
Border = TRUE ;
Pos = MAP_APPFONT ( 91 , 46 ) ;
Size = MAP_APPFONT ( 157 , 50 ) ;
@@ -745,6 +782,7 @@ TabPage TP_FRM_ADD
};
ListBox LB_NEXT
{
+ HelpID = "sw:ListBox:TP_FRM_ADD:LB_NEXT";
Border = TRUE ;
Pos = MAP_APPFONT ( 91 , 62 ) ;
Size = MAP_APPFONT ( 157 , 50 ) ;
@@ -763,6 +801,7 @@ TabPage TP_FRM_ADD
};
CheckBox CB_PROTECT_CONTENT
{
+ HelpID = "sw:CheckBox:TP_FRM_ADD:CB_PROTECT_CONTENT";
Pos = MAP_APPFONT ( 12 , 91 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -770,6 +809,7 @@ TabPage TP_FRM_ADD
};
CheckBox CB_PROTECT_FRAME
{
+ HelpID = "sw:CheckBox:TP_FRM_ADD:CB_PROTECT_FRAME";
Pos = MAP_APPFONT ( 12 , 105 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -777,6 +817,7 @@ TabPage TP_FRM_ADD
};
CheckBox CB_PROTECT_SIZE
{
+ HelpID = "sw:CheckBox:TP_FRM_ADD:CB_PROTECT_SIZE";
Pos = MAP_APPFONT ( 12 , 119 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
@@ -790,6 +831,7 @@ TabPage TP_FRM_ADD
};
CheckBox CB_EDIT_IN_READONLY
{
+ HelpID = "sw:CheckBox:TP_FRM_ADD:CB_EDIT_IN_READONLY";
Pos = MAP_APPFONT ( 12 , 146 ) ;
Size = MAP_APPFONT ( 236 , 10 ) ;
TabStop = TRUE ;
@@ -797,6 +839,7 @@ TabPage TP_FRM_ADD
};
CheckBox CB_PRINT_FRAME
{
+ HelpID = "sw:CheckBox:TP_FRM_ADD:CB_PRINT_FRAME";
Pos = MAP_APPFONT ( 12 , 160 ) ;
Size = MAP_APPFONT ( 236 , 10 ) ;
TabStop = TRUE ;
@@ -819,6 +862,7 @@ TabPage TP_FRM_ADD
};
ListBox LB_TEXTFLOW
{
+ HelpID = "sw:ListBox:TP_FRM_ADD:LB_TEXTFLOW";
Border = TRUE ;
Pos = MAP_APPFONT ( 81 , 172 ) ;
Size = MAP_APPFONT ( 167 , 50 ) ;
diff --git a/sw/source/ui/frmdlg/makefile.mk b/sw/source/ui/frmdlg/makefile.mk
deleted file mode 100644
index 3caff5544e61..000000000000
--- a/sw/source/ui/frmdlg/makefile.mk
+++ /dev/null
@@ -1,78 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=frmdlg
-LIBTARGET=no
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- column.src \
- cption.src \
- frmpage.src \
- frmui.src \
- wrap.src
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/colmgr.obj
-
-EXCEPTIONSFILES = \
- $(SLO)$/colex.obj \
- $(SLO)$/column.obj \
- $(SLO)$/cption.obj \
- $(SLO)$/frmdlg.obj \
- $(SLO)$/frmmgr.obj \
- $(SLO)$/frmpage.obj \
- $(SLO)$/pattern.obj \
- $(SLO)$/uiborder.obj \
- $(SLO)$/wrap.obj
-
-LIB1TARGET = $(SLB)$/$(TARGET).lib
-
-LIB1OBJFILES = \
- $(SLO)$/colmgr.obj \
- $(SLO)$/colex.obj \
- $(SLO)$/frmmgr.obj
-
-
-
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/frmdlg/uiborder.cxx b/sw/source/ui/frmdlg/uiborder.cxx
index 58b468a8612d..5b1e402f94cb 100644
--- a/sw/source/ui/frmdlg/uiborder.cxx
+++ b/sw/source/ui/frmdlg/uiborder.cxx
@@ -48,7 +48,7 @@
-SwBorderDlg::SwBorderDlg(Window* pParent, SfxItemSet& rSet, USHORT nType) :
+SwBorderDlg::SwBorderDlg(Window* pParent, SfxItemSet& rSet, sal_uInt16 nType) :
SfxSingleTabDialog(pParent, rSet, 0)
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index a9eed6bbc4ee..6a7a4d194ae9 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -61,21 +61,21 @@
using namespace ::com::sun::star;
-static USHORT aWrapPageRg[] = {
+static sal_uInt16 aWrapPageRg[] = {
RES_LR_SPACE, RES_UL_SPACE,
RES_PROTECT, RES_SURROUND,
RES_PRINT, RES_PRINT,
0
};
-SwWrapDlg::SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode) :
+SwWrapDlg::SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode) :
SfxSingleTabDialog(pParent, rSet, 0),
pWrtShell(pSh)
{
// TabPage erzeugen
SwWrapTabPage* pNewPage = (SwWrapTabPage*) SwWrapTabPage::Create(this, rSet);
- pNewPage->SetFormatUsed(FALSE, bDrawMode);
+ pNewPage->SetFormatUsed(sal_False, bDrawMode);
pNewPage->SetShell(pWrtShell);
SetTabPage(pNewPage);
@@ -122,10 +122,10 @@ SwWrapTabPage::SwWrapTabPage(Window *pParent, const SfxItemSet &rSet) :
pWrtSh(0),
- bFormat(FALSE),
- bNew(TRUE),
- bHtmlMode(FALSE),
- bContourImage(FALSE)
+ bFormat(sal_False),
+ bNew(sal_True),
+ bHtmlMode(sal_False),
+ bContourImage(sal_False)
{
FreeResource();
@@ -190,14 +190,14 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
}
else
{
- BOOL bShowCB = bFormat;
+ sal_Bool bShowCB = bFormat;
if( !bFormat )
{
int nSelType = pWrtSh->GetSelectionType();
if( ( nSelType & nsSelectionType::SEL_GRF ) ||
( nSelType & nsSelectionType::SEL_OLE && GRAPHIC_NONE !=
pWrtSh->GetIMapGraphic().GetType() ))
- bShowCB = TRUE;
+ bShowCB = sal_True;
}
if( bShowCB )
{
@@ -207,7 +207,7 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
}
nHtmlMode = ::GetHtmlMode((const SwDocShell*)SfxObjectShell::Current());
- bHtmlMode = nHtmlMode & HTMLMODE_ON ? TRUE : FALSE;
+ bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
FieldUnit aMetric = ::GetDfltMetric(bHtmlMode);
SetMetric( aLeftMarginED , aMetric );
@@ -228,10 +228,10 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
}
else
{
- aWrapAnchorOnlyCB.Enable( FALSE );
+ aWrapAnchorOnlyCB.Enable( sal_False );
}
- BOOL bContour = rSurround.IsContour();
+ sal_Bool bContour = rSurround.IsContour();
aWrapOutlineCB.Check( bContour );
aWrapOutsideCB.Check( rSurround.IsOutside() );
aWrapThroughRB.Enable(!aWrapOutlineCB.IsChecked());
@@ -308,9 +308,9 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
/*--------------------------------------------------------------------
Beschreibung: Attribute in den Set stopfen bei OK
--------------------------------------------------------------------*/
-BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
const SfxPoolItem* pOldItem;
const SwFmtSurround& rOldSur = (const SwFmtSurround&)GetItemSet().Get(RES_SURROUND);
@@ -322,7 +322,7 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
{
const SvxOpaqueItem& rOpaque = (const SvxOpaqueItem&)GetItemSet().Get(RES_OPAQUE);
aOp = rOpaque;
- aOp.SetValue(TRUE);
+ aOp.SetValue(sal_True);
}
if (aNoWrapRB.IsChecked())
@@ -337,13 +337,13 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
{
aSur.SetSurround(SURROUND_THROUGHT);
if (aWrapTransparentCB.IsChecked() && !bDrawMode)
- aOp.SetValue(FALSE);
+ aOp.SetValue(sal_False);
}
else if (aIdealWrapRB.IsChecked())
aSur.SetSurround(SURROUND_IDEAL);
aSur.SetAnchorOnly( aWrapAnchorOnlyCB.IsChecked() );
- BOOL bContour = aWrapOutlineCB.IsChecked() && aWrapOutlineCB.IsEnabled();
+ sal_Bool bContour = aWrapOutlineCB.IsChecked() && aWrapOutlineCB.IsEnabled();
aSur.SetContour( bContour );
if ( bContour )
@@ -353,7 +353,7 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
aSur != *pOldItem )
{
rSet.Put(aSur);
- bModified = TRUE;
+ bModified = sal_True;
}
if (!bDrawMode)
@@ -362,16 +362,16 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
aOp != *pOldItem )
{
rSet.Put(aOp);
- bModified = TRUE;
+ bModified = sal_True;
}
}
- BOOL bTopMod = aTopMarginED.IsValueModified();
- BOOL bBottomMod = aBottomMarginED.IsValueModified();
+ sal_Bool bTopMod = aTopMarginED.IsValueModified();
+ sal_Bool bBottomMod = aBottomMarginED.IsValueModified();
SvxULSpaceItem aUL( RES_UL_SPACE );
- aUL.SetUpper((USHORT)aTopMarginED.Denormalize(aTopMarginED.GetValue(FUNIT_TWIP)));
- aUL.SetLower((USHORT)aBottomMarginED.Denormalize(aBottomMarginED.GetValue(FUNIT_TWIP)));
+ aUL.SetUpper((sal_uInt16)aTopMarginED.Denormalize(aTopMarginED.GetValue(FUNIT_TWIP)));
+ aUL.SetLower((sal_uInt16)aBottomMarginED.Denormalize(aBottomMarginED.GetValue(FUNIT_TWIP)));
if ( bTopMod || bBottomMod )
{
@@ -379,16 +379,16 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
aUL != *pOldItem )
{
rSet.Put( aUL, RES_UL_SPACE );
- bModified = TRUE;
+ bModified = sal_True;
}
}
- BOOL bLeftMod = aLeftMarginED.IsValueModified();
- BOOL bRightMod = aRightMarginED.IsValueModified();
+ sal_Bool bLeftMod = aLeftMarginED.IsValueModified();
+ sal_Bool bRightMod = aRightMarginED.IsValueModified();
SvxLRSpaceItem aLR( RES_LR_SPACE );
- aLR.SetLeft((USHORT)aLeftMarginED.Denormalize(aLeftMarginED.GetValue(FUNIT_TWIP)));
- aLR.SetRight((USHORT)aRightMarginED.Denormalize(aRightMarginED.GetValue(FUNIT_TWIP)));
+ aLR.SetLeft((sal_uInt16)aLeftMarginED.Denormalize(aLeftMarginED.GetValue(FUNIT_TWIP)));
+ aLR.SetRight((sal_uInt16)aRightMarginED.Denormalize(aRightMarginED.GetValue(FUNIT_TWIP)));
if ( bLeftMod || bRightMod )
{
@@ -396,13 +396,13 @@ BOOL SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
aLR != *pOldItem )
{
rSet.Put(aLR, RES_LR_SPACE);
- bModified = TRUE;
+ bModified = sal_True;
}
}
if ( bDrawMode )
{
- BOOL bChecked = aWrapTransparentCB.IsChecked() & aWrapTransparentCB.IsEnabled();
+ sal_Bool bChecked = aWrapTransparentCB.IsChecked() & aWrapTransparentCB.IsEnabled();
if (aWrapTransparentCB.GetSavedValue() != bChecked)
bModified |= 0 != rSet.Put(SfxInt16Item(FN_DRAW_WRAP_DLG, bChecked ? 0 : 1));
}
@@ -418,7 +418,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
// Anchor
const SwFmtAnchor &rAnch = (const SwFmtAnchor&)rSet.Get(RES_ANCHOR);
nAnchorId = rAnch.GetAnchorId();
- BOOL bEnable = (nAnchorId != FLY_AS_CHAR);
+ sal_Bool bEnable = (nAnchorId != FLY_AS_CHAR);
if (!bDrawMode)
{
@@ -433,10 +433,10 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
// Rand
const SvxULSpaceItem& rUL = (const SvxULSpaceItem&)rSet.Get(RES_UL_SPACE);
const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&)rSet.Get(RES_LR_SPACE);
- nOldLeftMargin = static_cast< USHORT >(rLR.GetLeft());
- nOldRightMargin = static_cast< USHORT >(rLR.GetRight());
- nOldUpperMargin = static_cast< USHORT >(rUL.GetUpper());
- nOldLowerMargin = static_cast< USHORT >(rUL.GetLower());
+ nOldLeftMargin = static_cast< sal_uInt16 >(rLR.GetLeft());
+ nOldRightMargin = static_cast< sal_uInt16 >(rLR.GetRight());
+ nOldUpperMargin = static_cast< sal_uInt16 >(rUL.GetUpper());
+ nOldLowerMargin = static_cast< sal_uInt16 >(rUL.GetLower());
// Position
const SwFmtHoriOrient& rHori = (const SwFmtHoriOrient&)rSet.Get(RES_HORI_ORIENT);
@@ -527,7 +527,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
aWrapTransparentCB.Enable( bEnable && !bHtmlMode && nSur == SURROUND_THROUGHT );
if(bHtmlMode)
{
- BOOL bSomeAbsPos = 0 != (nHtmlMode & HTMLMODE_SOME_ABS_POS);
+ sal_Bool bSomeAbsPos = 0 != (nHtmlMode & HTMLMODE_SOME_ABS_POS);
const SwFmtHoriOrient& rHori = (const SwFmtHoriOrient&)rSet.Get(RES_HORI_ORIENT);
sal_Int16 eHOrient = rHori.GetHoriOrient();
sal_Int16 eHRelOrient = rHori.GetRelationOrient();
@@ -537,12 +537,12 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
(eHOrient == text::HoriOrientation::RIGHT || eHOrient == text::HoriOrientation::LEFT);
aWrapAnchorOnlyCB.Enable( bAllHtmlModes && nSur != SURROUND_NONE );
aWrapOutsideCB.Hide();
- aIdealWrapRB.Enable( FALSE );
+ aIdealWrapRB.Enable( sal_False );
- aWrapTransparentCB.Enable( FALSE );
+ aWrapTransparentCB.Enable( sal_False );
aNoWrapRB.Enable( FLY_AT_PARA == nAnchorId );
- aWrapParallelRB.Enable( FALSE );
+ aWrapParallelRB.Enable( sal_False );
aWrapLeftRB .Enable
( (FLY_AT_PARA == nAnchorId)
|| ( (FLY_AT_CHAR == nAnchorId)
@@ -564,7 +564,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
if(aNoWrapRB.IsChecked() && !aNoWrapRB.IsEnabled())
{
if(aWrapThroughRB.IsEnabled())
- aWrapThroughRB.Check(TRUE);
+ aWrapThroughRB.Check(sal_True);
else if(aWrapLeftRB.IsEnabled())
aWrapLeftRB.Check();
else if(aWrapRightRB.IsEnabled())
@@ -612,7 +612,7 @@ int SwWrapTabPage::DeactivatePage(SfxItemSet* _pSet)
if(_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -662,7 +662,7 @@ IMPL_LINK( SwWrapTabPage, RangeModifyHdl, MetricField *, pEdit )
IMPL_LINK( SwWrapTabPage, WrapTypeHdl, ImageRadioButton *, pBtn )
{
- BOOL bWrapThrough = (pBtn == &aWrapThroughRB);
+ sal_Bool bWrapThrough = (pBtn == &aWrapThroughRB);
aWrapTransparentCB.Enable( bWrapThrough && !bHtmlMode );
bWrapThrough |= ( nAnchorId == FLY_AS_CHAR );
aWrapOutlineCB.Enable( !bWrapThrough && pBtn != &aNoWrapRB);
@@ -677,7 +677,7 @@ IMPL_LINK( SwWrapTabPage, WrapTypeHdl, ImageRadioButton *, pBtn )
IMPL_LINK( SwWrapTabPage, ContourHdl, CheckBox *, EMPTYARG )
{
- BOOL bEnable = !(aWrapOutlineCB.IsChecked() && aWrapOutlineCB.IsEnabled());
+ sal_Bool bEnable = !(aWrapOutlineCB.IsChecked() && aWrapOutlineCB.IsEnabled());
aWrapOutsideCB.Enable(!bEnable);
@@ -691,7 +691,7 @@ IMPL_LINK( SwWrapTabPage, ContourHdl, CheckBox *, EMPTYARG )
return 0;
}
-USHORT* SwWrapTabPage::GetRanges()
+sal_uInt16* SwWrapTabPage::GetRanges()
{
return aWrapPageRg;
}
@@ -710,7 +710,7 @@ void SwWrapTabPage::ApplyImageList()
ImageList& rImgLst = aWrapIL;
aWrapThroughRB.SetModeRadioImage(rImgLst.GetImage(IMG_THROUGH));
- BOOL bWrapOutline = !aWrapOutlineCB.IsChecked();
+ sal_Bool bWrapOutline = !aWrapOutlineCB.IsChecked();
if(bWrapOutline)
{
aNoWrapRB.SetModeRadioImage( rImgLst.GetImage( IMG_NONE ));
diff --git a/sw/source/ui/frmdlg/wrap.src b/sw/source/ui/frmdlg/wrap.src
index e512e63eec5d..5b4bbd19a48d 100644
--- a/sw/source/ui/frmdlg/wrap.src
+++ b/sw/source/ui/frmdlg/wrap.src
@@ -44,6 +44,7 @@ TabPage TP_FRM_WRAP
};
ImageRadioButton RB_NO_WRAP
{
+ HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_NO_WRAP";
Pos = MAP_APPFONT ( 6 , 14 ) ;
Size = MAP_APPFONT ( 40 , 37 ) ;
WordBreak = TRUE;
@@ -52,6 +53,7 @@ TabPage TP_FRM_WRAP
};
ImageRadioButton RB_WRAP_LEFT
{
+ HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_LEFT";
Pos = MAP_APPFONT ( 65 , 14 ) ;
Size = MAP_APPFONT ( 40 , 37 ) ;
WordBreak = TRUE;
@@ -60,6 +62,7 @@ TabPage TP_FRM_WRAP
};
ImageRadioButton RB_WRAP_RIGHT
{
+ HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_RIGHT";
Pos = MAP_APPFONT ( 121 , 14 ) ;
Size = MAP_APPFONT ( 40 , 37 ) ;
WordBreak = TRUE;
@@ -68,6 +71,7 @@ TabPage TP_FRM_WRAP
};
ImageRadioButton RB_WRAP_PARALLEL
{
+ HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_PARALLEL";
Pos = MAP_APPFONT ( 177 , 14 ) ;
Size = MAP_APPFONT ( 40 , 37 ) ;
WordBreak = TRUE;
@@ -76,6 +80,7 @@ TabPage TP_FRM_WRAP
};
ImageRadioButton RB_WRAP_THROUGH
{
+ HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_THROUGH";
Pos = MAP_APPFONT ( 6 , 57 ) ;
Size = MAP_APPFONT ( 40 , 37 ) ;
WordBreak = TRUE;
@@ -84,6 +89,7 @@ TabPage TP_FRM_WRAP
};
ImageRadioButton RB_WRAP_IDEAL
{
+ HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_IDEAL";
Pos = MAP_APPFONT ( 65 , 57 ) ;
Size = MAP_APPFONT ( 40 , 37 ) ;
WordBreak = TRUE;
@@ -93,18 +99,21 @@ TabPage TP_FRM_WRAP
CheckBox CB_ANCHOR_ONLY
{
+ HelpID = "sw:CheckBox:TP_FRM_WRAP:CB_ANCHOR_ONLY";
Pos = MAP_APPFONT ( 139 , 111 ) ;
Size = MAP_APPFONT ( 109 , 10 ) ;
Text [ en-US ] = "~First paragraph" ;
};
CheckBox CB_TRANSPARENT
{
+ HelpID = "sw:CheckBox:TP_FRM_WRAP:CB_TRANSPARENT";
Pos = MAP_APPFONT ( 139 , 125 ) ;
Size = MAP_APPFONT ( 109 , 10 ) ;
Text [ en-US ] = "In bac~kground" ;
};
CheckBox CB_OUTLINE
{
+ HelpID = "sw:CheckBox:TP_FRM_WRAP:CB_OUTLINE";
Pos = MAP_APPFONT ( 139 , 139 ) ;
Size = MAP_APPFONT ( 109 , 10 ) ;
Hide = TRUE ;
@@ -112,6 +121,7 @@ TabPage TP_FRM_WRAP
};
CheckBox CB_ONLYOUTSIDE
{
+ HelpID = "sw:CheckBox:TP_FRM_WRAP:CB_ONLYOUTSIDE";
Pos = MAP_APPFONT ( 139 , 153 ) ;
Size = MAP_APPFONT ( 109 , 10 ) ;
Hide = TRUE ;
@@ -138,6 +148,7 @@ TabPage TP_FRM_WRAP
};
MetricField ED_LEFT_MARGIN
{
+ HelpID = "sw:MetricField:TP_FRM_WRAP:ED_LEFT_MARGIN";
Border = TRUE ;
Pos = MAP_APPFONT ( 81 , 111 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -160,6 +171,7 @@ TabPage TP_FRM_WRAP
};
MetricField ED_RIGHT_MARGIN
{
+ HelpID = "sw:MetricField:TP_FRM_WRAP:ED_RIGHT_MARGIN";
Border = TRUE ;
Pos = MAP_APPFONT ( 81 , 127 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -182,6 +194,7 @@ TabPage TP_FRM_WRAP
};
MetricField ED_TOP_MARGIN
{
+ HelpID = "sw:MetricField:TP_FRM_WRAP:ED_TOP_MARGIN";
Border = TRUE ;
Pos = MAP_APPFONT ( 81 , 143 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -204,6 +217,7 @@ TabPage TP_FRM_WRAP
};
MetricField ED_BOTTOM_MARGIN
{
+ HelpID = "sw:MetricField:TP_FRM_WRAP:ED_BOTTOM_MARGIN";
Border = TRUE ;
Pos = MAP_APPFONT ( 81 , 159 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
diff --git a/sw/source/ui/globdoc/makefile.mk b/sw/source/ui/globdoc/makefile.mk
deleted file mode 100644
index f3563b819d35..000000000000
--- a/sw/source/ui/globdoc/makefile.mk
+++ /dev/null
@@ -1,54 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=globdoc
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- globdoc.src
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-EXCEPTIONSFILES = \
- $(SLO)$/globdoc.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/inc/DropDownFieldDialog.hxx b/sw/source/ui/inc/DropDownFieldDialog.hxx
index 293d76c7a3dc..cabf71ac46c1 100644
--- a/sw/source/ui/inc/DropDownFieldDialog.hxx
+++ b/sw/source/ui/inc/DropDownFieldDialog.hxx
@@ -61,7 +61,7 @@ class DropDownFieldDialog : public SvxStandardDialog
virtual void Apply();
public:
DropDownFieldDialog( Window *pParent, SwWrtShell &rSh,
- SwField* pField, BOOL bNextButton = FALSE );
+ SwField* pField, sal_Bool bNextButton = sal_False );
~DropDownFieldDialog();
};
} //namespace sw
diff --git a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
index 4b2af9f3238e..0d3cf88faac2 100644
--- a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
+++ b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
@@ -60,7 +60,7 @@ protected:
public:
SwSpellDialogChildWindow (
Window*pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo);
~SwSpellDialogChildWindow();
diff --git a/sw/source/ui/inc/abstract.hxx b/sw/source/ui/inc/abstract.hxx
index 29a60dff072d..755d30b61503 100644
--- a/sw/source/ui/inc/abstract.hxx
+++ b/sw/source/ui/inc/abstract.hxx
@@ -54,8 +54,8 @@ public:
SwInsertAbstractDlg( Window* pParent );
~SwInsertAbstractDlg();
- BYTE GetLevel() const;
- BYTE GetPara() const;
+ sal_uInt8 GetLevel() const;
+ sal_uInt8 GetPara() const;
};
#endif
diff --git a/sw/source/ui/inc/annotsh.hxx b/sw/source/ui/inc/annotsh.hxx
index 5d6d74a7614e..12de8a18618b 100644
--- a/sw/source/ui/inc/annotsh.hxx
+++ b/sw/source/ui/inc/annotsh.hxx
@@ -68,11 +68,12 @@ public:
void InsertSymbol(SfxRequest& rReq);
- void ExecSearch(SfxRequest&, BOOL bNoMessage = FALSE);
+ void ExecSearch(SfxRequest&, sal_Bool bNoMessage = sal_False);
void StateSearch(SfxItemSet &);
- virtual SfxUndoManager* GetUndoManager();
+ virtual ::svl::IUndoManager*
+ GetUndoManager();
};
#endif
diff --git a/sw/source/ui/inc/ascfldlg.hxx b/sw/source/ui/inc/ascfldlg.hxx
index 59d0ca231b07..763eaba3e55c 100644
--- a/sw/source/ui/inc/ascfldlg.hxx
+++ b/sw/source/ui/inc/ascfldlg.hxx
@@ -54,7 +54,7 @@ class SwAsciiFilterDlg : public SfxModalDialog
CancelButton aCancelPB;
HelpButton aHelpPB;
String sSystemCharSet;
- BOOL bSaveLineStatus;
+ sal_Bool bSaveLineStatus;
DECL_LINK( CharSetSelHdl, SvxTextEncodingBox* );
DECL_LINK( LineEndHdl, RadioButton* );
diff --git a/sw/source/ui/inc/basesh.hxx b/sw/source/ui/inc/basesh.hxx
index b5c6fe86df68..a3a97af2916d 100644
--- a/sw/source/ui/inc/basesh.hxx
+++ b/sw/source/ui/inc/basesh.hxx
@@ -70,7 +70,7 @@ protected:
inline SwView& GetView() { return rView; }
inline void SetGetStateSet( SfxItemSet* p ) { pGetStateSet = p; }
- inline BOOL AddGrfUpdateSlot( USHORT nSlot ){ return aGrfUpdateSlots.Insert( nSlot ); }
+ inline sal_Bool AddGrfUpdateSlot( sal_uInt16 nSlot ){ return aGrfUpdateSlots.Insert( nSlot ); }
DECL_STATIC_LINK( SwBaseShell, InsertDBTextHdl, DBTextStruct_Impl* );
@@ -109,7 +109,7 @@ public:
void GetBckColState(SfxItemSet &rSet);
void ExecBckCol(SfxRequest& rReq);
- void SetWrapMode( USHORT nSlot );
+ void SetWrapMode( sal_uInt16 nSlot );
void StateDisableItems(SfxItemSet &);
diff --git a/sw/source/ui/inc/bmpwin.hxx b/sw/source/ui/inc/bmpwin.hxx
index c602b9e9df1a..180e033f1b44 100644
--- a/sw/source/ui/inc/bmpwin.hxx
+++ b/sw/source/ui/inc/bmpwin.hxx
@@ -42,22 +42,22 @@ private:
Graphic aGraphic;
BitmapEx aBmp;
- BOOL bHorz : 1;
- BOOL bVert : 1;
- BOOL bGraphic : 1;
- BOOL bLeftAlign : 1;
+ sal_Bool bHorz : 1;
+ sal_Bool bVert : 1;
+ sal_Bool bGraphic : 1;
+ sal_Bool bLeftAlign : 1;
void Paint(const Rectangle& rRect);
public:
- BmpWindow(Window* pPar, USHORT nId,
+ BmpWindow(Window* pPar, sal_uInt16 nId,
const Graphic& rGraphic, const BitmapEx& rBmp);
BmpWindow(Window* pParent, const ResId rResId) :
Window(pParent, rResId),
- bHorz(FALSE), bVert(FALSE),bGraphic(FALSE), bLeftAlign(TRUE) {}
+ bHorz(sal_False), bVert(sal_False),bGraphic(sal_False), bLeftAlign(sal_True) {}
~BmpWindow();
- void MirrorVert(BOOL bMirror) { bVert = bMirror; Invalidate(); }
- void MirrorHorz(BOOL bMirror) { bHorz = bMirror; Invalidate(); }
+ void MirrorVert(sal_Bool bMirror) { bVert = bMirror; Invalidate(); }
+ void MirrorHorz(sal_Bool bMirror) { bHorz = bMirror; Invalidate(); }
void SetGraphic(const Graphic& rGrf);
};
diff --git a/sw/source/ui/inc/bookctrl.hxx b/sw/source/ui/inc/bookctrl.hxx
index c426aa93c071..0f9e96f50d73 100644
--- a/sw/source/ui/inc/bookctrl.hxx
+++ b/sw/source/ui/inc/bookctrl.hxx
@@ -40,13 +40,13 @@ class SwBookmarkControl : public SfxStatusBarControl
virtual void Command( const CommandEvent& rCEvt );
public:
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
virtual void Paint( const UserDrawEvent& rEvt );
SFX_DECL_STATUSBAR_CONTROL();
- SwBookmarkControl( USHORT nSlotId, USHORT nId, StatusBar& rStb );
+ SwBookmarkControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb );
~SwBookmarkControl();
private:
diff --git a/sw/source/ui/inc/bookmark.hxx b/sw/source/ui/inc/bookmark.hxx
index d6201069f8d6..effdba914367 100644
--- a/sw/source/ui/inc/bookmark.hxx
+++ b/sw/source/ui/inc/bookmark.hxx
@@ -40,24 +40,24 @@ class SfxRequest;
class BookmarkCombo : public SwComboBox
{
- USHORT GetFirstSelEntryPos() const;
- USHORT GetNextSelEntryPos(USHORT nPos) const;
- USHORT GetSelEntryPos(USHORT nPos) const;
+ sal_uInt16 GetFirstSelEntryPos() const;
+ sal_uInt16 GetNextSelEntryPos(sal_uInt16 nPos) const;
+ sal_uInt16 GetSelEntryPos(sal_uInt16 nPos) const;
virtual long PreNotify(NotifyEvent& rNEvt);
public:
BookmarkCombo( Window* pWin, const ResId& rResId );
- USHORT GetSelectEntryCount() const;
- USHORT GetSelectEntryPos( USHORT nSelIndex = 0 ) const;
+ sal_uInt16 GetSelectEntryCount() const;
+ sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const;
static const String aForbiddenChars;
};
class SwInsertBookmarkDlg: public SvxStandardDialog
{
- BookmarkCombo aBookmarkBox;
FixedLine aBookmarkFl;
+ BookmarkCombo aBookmarkBox;
OKButton aOkBtn;
CancelButton aCancelBtn;
PushButton aDeleteBtn;
diff --git a/sw/source/ui/inc/break.hxx b/sw/source/ui/inc/break.hxx
index 1d4236a90575..9ff55fde5d2b 100644
--- a/sw/source/ui/inc/break.hxx
+++ b/sw/source/ui/inc/break.hxx
@@ -43,6 +43,7 @@ class SwWrtShell;
class SwBreakDlg: public SvxStandardDialog
{
SwWrtShell &rSh;
+ FixedLine aBreakFL;
RadioButton aLineBtn;
RadioButton aColumnBtn;
RadioButton aPageBtn;
@@ -50,17 +51,16 @@ class SwBreakDlg: public SvxStandardDialog
ListBox aPageCollBox;
CheckBox aPageNumBox;
NumericField aPageNumEdit;
- FixedLine aBreakFL;
OKButton aOkBtn;
CancelButton aCancelBtn;
HelpButton aHelpBtn;
String aTemplate;
- USHORT nKind;
- USHORT nPgNum;
+ sal_uInt16 nKind;
+ sal_uInt16 nPgNum;
- BOOL bHtmlMode;
+ sal_Bool bHtmlMode;
DECL_LINK( ClickHdl, void * );
DECL_LINK( PageNumHdl, CheckBox * );
@@ -77,8 +77,8 @@ public:
~SwBreakDlg();
String GetTemplateName() { return aTemplate; }
- USHORT GetKind() { return nKind; }
- USHORT GetPageNumber() { return nPgNum; }
+ sal_uInt16 GetKind() { return nKind; }
+ sal_uInt16 GetPageNumber() { return nPgNum; }
};
#endif
diff --git a/sw/source/ui/inc/caption.hxx b/sw/source/ui/inc/caption.hxx
index 119f20a4f257..cf1260094ee2 100644
--- a/sw/source/ui/inc/caption.hxx
+++ b/sw/source/ui/inc/caption.hxx
@@ -36,29 +36,29 @@
class SW_DLLPUBLIC InsCaptionOpt
{
private:
- BOOL bUseCaption;
+ sal_Bool bUseCaption;
SwCapObjType eObjType;
SvGlobalName aOleId;
String sCategory;
- USHORT nNumType;
+ sal_uInt16 nNumType;
::rtl::OUString sNumberSeparator;
String sCaption;
- USHORT nPos;
- USHORT nLevel;
+ sal_uInt16 nPos;
+ sal_uInt16 nLevel;
// sal_Unicode cSeparator;
String sSeparator;
String sCharacterStyle;
- BOOL bIgnoreSeqOpts; // wird nicht gespeichert
- BOOL bCopyAttributes; // -""-
+ sal_Bool bIgnoreSeqOpts; // wird nicht gespeichert
+ sal_Bool bCopyAttributes; // -""-
public:
InsCaptionOpt(const SwCapObjType eType = FRAME_CAP, const SvGlobalName* pOleId = 0);
InsCaptionOpt(const InsCaptionOpt&);
~InsCaptionOpt();
- inline BOOL& UseCaption() { return bUseCaption; }
- inline BOOL UseCaption() const { return bUseCaption; }
+ inline sal_Bool& UseCaption() { return bUseCaption; }
+ inline sal_Bool UseCaption() const { return bUseCaption; }
inline SwCapObjType GetObjType() const { return eObjType; }
inline void SetObjType(const SwCapObjType eType) { eObjType = eType; }
@@ -69,8 +69,8 @@ public:
inline const String& GetCategory() const { return sCategory; }
inline void SetCategory(const String& rCat) { sCategory = rCat; }
- inline USHORT GetNumType() const { return nNumType; }
- inline void SetNumType(const USHORT nNT) { nNumType = nNT; }
+ inline sal_uInt16 GetNumType() const { return nNumType; }
+ inline void SetNumType(const sal_uInt16 nNT) { nNumType = nNT; }
const ::rtl::OUString& GetNumSeparator() const { return sNumberSeparator; }
void SetNumSeparator(const ::rtl::OUString& rSet) {sNumberSeparator = rSet;}
@@ -78,11 +78,11 @@ public:
inline const String& GetCaption() const { return sCaption; }
inline void SetCaption(const String& rCap) { sCaption = rCap; }
- inline USHORT GetPos() const { return nPos; }
- inline void SetPos(const USHORT nP) { nPos = nP; }
+ inline sal_uInt16 GetPos() const { return nPos; }
+ inline void SetPos(const sal_uInt16 nP) { nPos = nP; }
- inline USHORT GetLevel() const { return nLevel; }
- inline void SetLevel(const USHORT nLvl) { nLevel = nLvl; }
+ inline sal_uInt16 GetLevel() const { return nLevel; }
+ inline void SetLevel(const sal_uInt16 nLvl) { nLevel = nLvl; }
// inline sal_Unicode GetSeparator() const { return cSeparator; }
// inline void SetSeparator(const sal_Unicode cSep){ cSeparator = cSep; }
@@ -93,15 +93,15 @@ public:
void SetCharacterStyle(const String& rStyle)
{ sCharacterStyle = rStyle; }
- inline BOOL& IgnoreSeqOpts() { return bIgnoreSeqOpts; }
- inline BOOL IgnoreSeqOpts() const { return bIgnoreSeqOpts; }
+ inline sal_Bool& IgnoreSeqOpts() { return bIgnoreSeqOpts; }
+ inline sal_Bool IgnoreSeqOpts() const { return bIgnoreSeqOpts; }
- inline BOOL& CopyAttributes() { return bCopyAttributes; }
- inline BOOL CopyAttributes() const { return bCopyAttributes; }
+ inline sal_Bool& CopyAttributes() { return bCopyAttributes; }
+ inline sal_Bool CopyAttributes() const { return bCopyAttributes; }
- BOOL operator==( const InsCaptionOpt& rOpt ) const;
+ sal_Bool operator==( const InsCaptionOpt& rOpt ) const;
InsCaptionOpt& operator= ( const InsCaptionOpt& rOpt );
- inline BOOL operator< ( const InsCaptionOpt & rObj ) const
+ inline sal_Bool operator< ( const InsCaptionOpt & rObj ) const
{ return aOleId < rObj.aOleId; }
// friend SvStream& operator>>( SvStream& rIStream, InsCaptionOpt& rCapOpt );
// friend SvStream& operator<<( SvStream& rOStream, const InsCaptionOpt& rCapOpt );
diff --git a/sw/source/ui/inc/cfgdesc.hxx b/sw/source/ui/inc/cfgdesc.hxx
index 9de404744078..8ecc19a00b5c 100644
--- a/sw/source/ui/inc/cfgdesc.hxx
+++ b/sw/source/ui/inc/cfgdesc.hxx
@@ -35,25 +35,25 @@ class SwCfgDesc
protected:
String aFuncText;
String aLibName;
- USHORT nEvent;
+ sal_uInt16 nEvent;
- SwCfgDesc(const String &rFuncName, USHORT nId);
+ SwCfgDesc(const String &rFuncName, sal_uInt16 nId);
SwCfgDesc(const String &rLib,const String &rMacro);
~SwCfgDesc();
public:
- void SetEvent(USHORT nE); // inline
+ void SetEvent(sal_uInt16 nE); // inline
void SetFuncText(const String &rStr); // inline
void SetMacro(const String &rLib, const String &rMac);
- BOOL IsMacro() const;
- USHORT GetEvent() const; // inline
+ sal_Bool IsMacro() const;
+ sal_uInt16 GetEvent() const; // inline
String GetFuncText() const; // inline
String GetMacro() const; // inline
String GetLib() const; // inline
};
// INLINE METHODE --------------------------------------------------------
-inline void SwCfgDesc::SetEvent(USHORT nE) {
+inline void SwCfgDesc::SetEvent(sal_uInt16 nE) {
nEvent = nE;
}
@@ -61,7 +61,7 @@ inline void SwCfgDesc::SetFuncText(const String &rStr) {
aFuncText = rStr;
}
-inline USHORT SwCfgDesc::GetEvent() const { return nEvent; }
+inline sal_uInt16 SwCfgDesc::GetEvent() const { return nEvent; }
inline String SwCfgDesc::GetFuncText() const { return aFuncText; }
inline String SwCfgDesc::GetMacro() const { return aFuncText; }
inline String SwCfgDesc::GetLib() const { return aLibName; }
diff --git a/sw/source/ui/inc/cfgitems.hxx b/sw/source/ui/inc/cfgitems.hxx
index 8793a6d8ff00..d0d1103459c8 100644
--- a/sw/source/ui/inc/cfgitems.hxx
+++ b/sw/source/ui/inc/cfgitems.hxx
@@ -60,26 +60,26 @@ class SW_DLLPUBLIC SwDocDisplayItem : public SfxPoolItem
friend class SwShdwCrsrOptionsTabPage;
friend class SwModule;
- BOOL bParagraphEnd :1;
- BOOL bTab :1;
- BOOL bSpace :1;
- BOOL bNonbreakingSpace :1;
- BOOL bSoftHyphen :1;
- BOOL bCharHiddenText :1;
- BOOL bFldHiddenText :1;
- BOOL bManualBreak :1;
- BOOL bShowHiddenPara :1;
+ sal_Bool bParagraphEnd :1;
+ sal_Bool bTab :1;
+ sal_Bool bSpace :1;
+ sal_Bool bNonbreakingSpace :1;
+ sal_Bool bSoftHyphen :1;
+ sal_Bool bCharHiddenText :1;
+ sal_Bool bFldHiddenText :1;
+ sal_Bool bManualBreak :1;
+ sal_Bool bShowHiddenPara :1;
Color aIndexBackgrndCol;
public:
TYPEINFO();
- SwDocDisplayItem( USHORT nWhich = FN_PARAM_DOCDISP );
+ SwDocDisplayItem( sal_uInt16 nWhich = FN_PARAM_DOCDISP );
SwDocDisplayItem(
const SwDocDisplayItem& rSwDocDisplayItem );
SwDocDisplayItem( const SwViewOption& rVOpt,
- USHORT nWhich );
+ sal_uInt16 nWhich );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -94,31 +94,31 @@ Item fuer Einstellungsdialog, Elementeseite
class SW_DLLPUBLIC SwElemItem : public SfxPoolItem
{
//view
- BOOL bHorzScrollbar :1;
- BOOL bVertScrollbar :1;
- BOOL bAnyRuler : 1;
- BOOL bHorzRuler :1;
- BOOL bVertRuler :1;
- BOOL bVertRulerRight:1;
- BOOL bSmoothScroll :1;
+ sal_Bool bHorzScrollbar :1;
+ sal_Bool bVertScrollbar :1;
+ sal_Bool bAnyRuler : 1;
+ sal_Bool bHorzRuler :1;
+ sal_Bool bVertRuler :1;
+ sal_Bool bVertRulerRight:1;
+ sal_Bool bSmoothScroll :1;
//visual aids
- BOOL bCrosshair :1;
- BOOL bHandles :1;
- BOOL bBigHandles :1;
+ sal_Bool bCrosshair :1;
+ sal_Bool bHandles :1;
+ sal_Bool bBigHandles :1;
//display
- BOOL bTable :1;
- BOOL bGraphic :1;
- BOOL bDrawing :1;
- BOOL bFieldName :1;
- BOOL bNotes :1;
+ sal_Bool bTable :1;
+ sal_Bool bGraphic :1;
+ sal_Bool bDrawing :1;
+ sal_Bool bFieldName :1;
+ sal_Bool bNotes :1;
friend class SwContentOptPage;
public:
TYPEINFO();
- SwElemItem( USHORT nWhich = FN_PARAM_ELEM );
+ SwElemItem( sal_uInt16 nWhich = FN_PARAM_ELEM );
SwElemItem(const SwElemItem& rElemItem);
- SwElemItem(const SwViewOption& rVOpt, USHORT nWhich);
+ SwElemItem(const SwViewOption& rVOpt, sal_uInt16 nWhich);
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -140,8 +140,8 @@ class SW_DLLPUBLIC SwAddPrinterItem : public SfxPoolItem, public SwPrintData
public:
TYPEINFO();
- SwAddPrinterItem( USHORT nWhich = FN_PARAM_ADDPRINTER );
- SwAddPrinterItem( USHORT nWhich, const SwPrintData& rPrtData );
+ SwAddPrinterItem( sal_uInt16 nWhich = FN_PARAM_ADDPRINTER );
+ SwAddPrinterItem( sal_uInt16 nWhich, const SwPrintData& rPrtData );
SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem);
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -152,27 +152,27 @@ public:
void SetFax( const String& rFax) { sFaxName = rFax; }
- BOOL IsPrintProspect() const { return bPrintProspect; }
- BOOL IsPrintProspectRTL() const { return bPrintProspectRTL; }
- void SetPrintProspect(BOOL bFlag ){ bPrintProspect = bFlag; }
- void SetPrintProspectRTL(BOOL bFlag ){ bPrintProspectRTL = bFlag; }
- BOOL IsPrintGraphic () const { return bPrintGraphic; }
- BOOL IsPrintTable () const { return bPrintTable; }
- BOOL IsPrintDraw () const { return bPrintDraw; }
- BOOL IsPrintControl () const { return bPrintControl; }
- BOOL IsPrintLeftPage () const { return bPrintLeftPages; }
- BOOL IsPrintRightPage() const { return bPrintRightPages; }
- BOOL IsPrintReverse () const { return bPrintReverse; }
- BOOL IsPaperFromSetup() const { return bPaperFromSetup; }
- BOOL IsPrintEmptyPages() const { return bPrintEmptyPages; }
- BOOL IsPrintPageBackground() const { return bPrintPageBackground; }
- BOOL IsPrintBlackFont() const { return bPrintBlackFont; }
+ sal_Bool IsPrintProspect() const { return bPrintProspect; }
+ sal_Bool IsPrintProspectRTL() const { return bPrintProspectRTL; }
+ void SetPrintProspect(sal_Bool bFlag ){ bPrintProspect = bFlag; }
+ void SetPrintProspectRTL(sal_Bool bFlag ){ bPrintProspectRTL = bFlag; }
+ sal_Bool IsPrintGraphic () const { return bPrintGraphic; }
+ sal_Bool IsPrintTable () const { return bPrintTable; }
+ sal_Bool IsPrintDraw () const { return bPrintDraw; }
+ sal_Bool IsPrintControl () const { return bPrintControl; }
+ sal_Bool IsPrintLeftPage () const { return bPrintLeftPages; }
+ sal_Bool IsPrintRightPage() const { return bPrintRightPages; }
+ sal_Bool IsPrintReverse () const { return bPrintReverse; }
+ sal_Bool IsPaperFromSetup() const { return bPaperFromSetup; }
+ sal_Bool IsPrintEmptyPages() const { return bPrintEmptyPages; }
+ sal_Bool IsPrintPageBackground() const { return bPrintPageBackground; }
+ sal_Bool IsPrintBlackFont() const { return bPrintBlackFont; }
//#i81434# - printing of hidden text
sal_Bool IsPrintHiddenText() const { return bPrintHiddenText; }
sal_Bool IsPrintTextPlaceholder() const { return bPrintTextPlaceholder; }
- BOOL IsPrintSingleJobs() const { return bPrintSingleJobs; }
- ULONG GetPrintPostIts () const { return nPrintPostIts; }
+ sal_Bool IsPrintSingleJobs() const { return bPrintSingleJobs; }
+ sal_uLong GetPrintPostIts () const { return nPrintPostIts; }
};
@@ -181,13 +181,13 @@ Item fuer Einstellungsdialog, ShadowCursorSeite
--------------------------------------------------------- */
class SW_DLLPUBLIC SwShadowCursorItem : public SfxPoolItem
{
- BYTE eMode;
- BOOL bOn;
+ sal_uInt8 eMode;
+ sal_Bool bOn;
public:
TYPEINFO();
- SwShadowCursorItem( USHORT nWhich = FN_PARAM_SHADOWCURSOR );
+ SwShadowCursorItem( sal_uInt16 nWhich = FN_PARAM_SHADOWCURSOR );
SwShadowCursorItem( const SwShadowCursorItem& rElemItem );
- SwShadowCursorItem( const SwViewOption& rVOpt, USHORT nWhich );
+ SwShadowCursorItem( const SwViewOption& rVOpt, sal_uInt16 nWhich );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -196,11 +196,11 @@ public:
void FillViewOptions( SwViewOption& rVOpt) const;
- BYTE GetMode() const { return eMode; }
- BOOL IsOn() const { return bOn; }
+ sal_uInt8 GetMode() const { return eMode; }
+ sal_Bool IsOn() const { return bOn; }
- void SetMode( BYTE eM ) { eMode = eM; }
- void SetOn( BOOL bFlag ) { bOn = bFlag; }
+ void SetMode( sal_uInt8 eM ) { eMode = eM; }
+ void SetOn( sal_Bool bFlag ) { bOn = bFlag; }
};
#if OSL_DEBUG_LEVEL > 1
@@ -215,19 +215,19 @@ class SW_DLLPUBLIC SwTestItem : public SfxPoolItem
friend class SwTestTabPage;
friend class SwDocEditDialog;
- BOOL bTest1:1;
- BOOL bTest2:1;
- BOOL bTest3:1;
- BOOL bTest4:1;
- BOOL bTest5:1;
- BOOL bTest6:1;
- BOOL bTest7:1;
- BOOL bTest8:1;
- BOOL bTest9:1;
- BOOL bTest10:1;
+ sal_Bool bTest1:1;
+ sal_Bool bTest2:1;
+ sal_Bool bTest3:1;
+ sal_Bool bTest4:1;
+ sal_Bool bTest5:1;
+ sal_Bool bTest6:1;
+ sal_Bool bTest7:1;
+ sal_Bool bTest8:1;
+ sal_Bool bTest9:1;
+ sal_Bool bTest10:1;
public:
- SwTestItem( USHORT _nWhich):
+ SwTestItem( sal_uInt16 _nWhich):
SfxPoolItem(_nWhich){};
SwTestItem( const SwTestItem& pTestItem);
diff --git a/sw/source/ui/inc/chldwrap.hxx b/sw/source/ui/inc/chldwrap.hxx
index 4bd104d860c8..70b4e4385ab6 100644
--- a/sw/source/ui/inc/chldwrap.hxx
+++ b/sw/source/ui/inc/chldwrap.hxx
@@ -42,10 +42,10 @@ class SwChildWinWrapper : public SfxChildWindow
// Implementation in fldtdlg.cxx
protected:
- SwChildWinWrapper(Window *pParentWindow, USHORT nId);
+ SwChildWinWrapper(Window *pParentWindow, sal_uInt16 nId);
public:
- virtual BOOL ReInitDlg(SwDocShell *pDocSh);
+ virtual sal_Bool ReInitDlg(SwDocShell *pDocSh);
inline SwDocShell* GetOldDocShell() { return m_pDocSh; }
inline void SetOldDocShell(SwDocShell *pDcSh) { m_pDocSh = pDcSh; }
diff --git a/sw/source/ui/inc/chrdlg.hxx b/sw/source/ui/inc/chrdlg.hxx
index 7f3679beacf7..db5bf5bc50cb 100644
--- a/sw/source/ui/inc/chrdlg.hxx
+++ b/sw/source/ui/inc/chrdlg.hxx
@@ -51,15 +51,15 @@ class SvxMacroItem;
class SwCharDlg: public SfxTabDialog
{
SwView& rView;
- BOOL bIsDrwTxtMode;
+ sal_Bool bIsDrwTxtMode;
public:
SwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet,
- const String* pFmtStr = 0, BOOL bIsDrwTxtDlg = FALSE);
+ const String* pFmtStr = 0, sal_Bool bIsDrwTxtDlg = sal_False);
~SwCharDlg();
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
};
/*-----------------14.08.96 11.03-------------------
@@ -87,7 +87,7 @@ class SwCharURLPage : public SfxTabPage
ListBox aNotVisitedLB;
SvxMacroItem* pINetItem;
- BOOL bModified;
+ sal_Bool bModified;
DECL_LINK( InsertFileHdl, PushButton * );
DECL_LINK( EventHdl, PushButton * );
@@ -100,7 +100,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
diff --git a/sw/source/ui/inc/cnttab.hxx b/sw/source/ui/inc/cnttab.hxx
index 8c1616559d4e..9c1a3fca65cb 100644
--- a/sw/source/ui/inc/cnttab.hxx
+++ b/sw/source/ui/inc/cnttab.hxx
@@ -55,17 +55,17 @@
struct CurTOXType
{
TOXTypes eType;
- USHORT nIndex; //for TOX_USER only
+ sal_uInt16 nIndex; //for TOX_USER only
- BOOL operator==(const CurTOXType aCmp)
+ sal_Bool operator==(const CurTOXType aCmp)
{
return eType == aCmp.eType && nIndex == aCmp.nIndex;
}
- USHORT GetFlatIndex() const;
+ sal_uInt16 GetFlatIndex() const;
CurTOXType () : eType (TOX_INDEX), nIndex (0) {};
- CurTOXType (TOXTypes t, USHORT i) : eType (t), nIndex (i) {};
+ CurTOXType (TOXTypes t, sal_uInt16 i) : eType (t), nIndex (i) {};
};
class SwOLENames : public Resource
diff --git a/sw/source/ui/inc/colex.hxx b/sw/source/ui/inc/colex.hxx
index fb93c8d11ffa..f8d194a5fe7e 100644
--- a/sw/source/ui/inc/colex.hxx
+++ b/sw/source/ui/inc/colex.hxx
@@ -55,8 +55,8 @@ class SW_DLLPUBLIC SwPageGridExample : public SwPageExample
sal_Bool m_bVertical;
protected:
virtual void DrawPage( const Point& rPoint,
- const BOOL bSecond,
- const BOOL bEnabled );
+ const sal_Bool bSecond,
+ const sal_Bool bEnabled );
public:
SwPageGridExample(Window* pPar, const ResId& rResId ) :
SwPageExample(pPar, rResId ),
@@ -74,8 +74,8 @@ class SW_DLLPUBLIC SwColExample : public SwPageExample
protected:
virtual void DrawPage( const Point& rPoint,
- const BOOL bSecond,
- const BOOL bEnabled );
+ const sal_Bool bSecond,
+ const sal_Bool bEnabled );
public:
SwColExample(Window* pPar, const ResId& rResId ) :
diff --git a/sw/source/ui/inc/colmgr.hxx b/sw/source/ui/inc/colmgr.hxx
index cc2ecd26bd24..44273b8cc41e 100644
--- a/sw/source/ui/inc/colmgr.hxx
+++ b/sw/source/ui/inc/colmgr.hxx
@@ -31,33 +31,33 @@
#include "swdllapi.h"
#include <fmtclds.hxx>
-SW_DLLPUBLIC void FitToActualSize(SwFmtCol& rCol, USHORT nWidth);
+SW_DLLPUBLIC void FitToActualSize(SwFmtCol& rCol, sal_uInt16 nWidth);
class SW_DLLPUBLIC SwColMgr
{
public:
// lActWidth wird aus den Edits des Seitendialogs
// direkt uebergeben
- SwColMgr(const SfxItemSet &rSet, USHORT nActWidth = USHRT_MAX);
+ SwColMgr(const SfxItemSet &rSet, sal_uInt16 nActWidth = USHRT_MAX);
~SwColMgr();
- inline USHORT GetCount() const;
- void SetCount(USHORT nCount, USHORT nGutterWidth);
- USHORT GetGutterWidth(USHORT nPos = USHRT_MAX) const;
- void SetGutterWidth(USHORT nWidth, USHORT nPos = USHRT_MAX);
+ inline sal_uInt16 GetCount() const;
+ void SetCount(sal_uInt16 nCount, sal_uInt16 nGutterWidth);
+ sal_uInt16 GetGutterWidth(sal_uInt16 nPos = USHRT_MAX) const;
+ void SetGutterWidth(sal_uInt16 nWidth, sal_uInt16 nPos = USHRT_MAX);
- USHORT GetColWidth(USHORT nIdx) const;
- void SetColWidth(USHORT nIdx, USHORT nWidth);
+ sal_uInt16 GetColWidth(sal_uInt16 nIdx) const;
+ void SetColWidth(sal_uInt16 nIdx, sal_uInt16 nWidth);
- inline BOOL IsAutoWidth() const;
- void SetAutoWidth(BOOL bOn = TRUE, USHORT lGutterWidth = 0);
+ inline sal_Bool IsAutoWidth() const;
+ void SetAutoWidth(sal_Bool bOn = sal_True, sal_uInt16 lGutterWidth = 0);
- inline BOOL HasLine() const;
+ inline sal_Bool HasLine() const;
inline void SetNoLine();
- inline void SetLineWidthAndColor(ULONG nWidth, const Color& rCol);
- inline ULONG GetLineWidth() const;
+ inline void SetLineWidthAndColor(sal_uLong nWidth, const Color& rCol);
+ inline sal_uLong GetLineWidth() const;
inline const Color& GetLineColor() const;
inline SwColLineAdj GetAdjust() const;
@@ -71,29 +71,28 @@ public:
const SwFmtCol& GetColumns() const { return aFmtCol; }
- void SetActualWidth(USHORT nW);
- USHORT GetActualSize() const { return nWidth; }
+ void SetActualWidth(sal_uInt16 nW);
+ sal_uInt16 GetActualSize() const { return nWidth; }
private:
SwFmtCol aFmtCol;
- USHORT nWidth;
+ sal_uInt16 nWidth;
};
// INLINE METHODE --------------------------------------------------------
-inline USHORT SwColMgr::GetCount() const
+inline sal_uInt16 SwColMgr::GetCount() const
{
return aFmtCol.GetNumCols();
}
-inline void SwColMgr::SetLineWidthAndColor(ULONG nLWidth, const Color& rCol)
+inline void SwColMgr::SetLineWidthAndColor(sal_uLong nLWidth, const Color& rCol)
{
aFmtCol.SetLineWidth(nLWidth);
aFmtCol.SetLineColor(rCol);
}
-
-inline ULONG SwColMgr::GetLineWidth() const
+inline sal_uLong SwColMgr::GetLineWidth() const
{
return aFmtCol.GetLineWidth();
}
@@ -112,13 +111,11 @@ inline void SwColMgr::SetAdjust(SwColLineAdj eAdj)
{
aFmtCol.SetLineAdj(eAdj);
}
-
-inline BOOL SwColMgr::IsAutoWidth() const
+inline sal_Bool SwColMgr::IsAutoWidth() const
{
return aFmtCol.IsOrtho();
}
-
-inline void SwColMgr::SetAutoWidth(BOOL bOn, USHORT nGutterWidth)
+inline void SwColMgr::SetAutoWidth(sal_Bool bOn, sal_uInt16 nGutterWidth)
{
aFmtCol.SetOrtho(bOn, nGutterWidth, nWidth);
}
@@ -127,8 +124,7 @@ inline void SwColMgr::NoCols()
{
aFmtCol.GetColumns().DeleteAndDestroy(0, aFmtCol.GetColumns().Count());
}
-
-inline BOOL SwColMgr::HasLine() const
+inline sal_Bool SwColMgr::HasLine() const
{
return GetAdjust() != COLADJ_NONE;
}
diff --git a/sw/source/ui/inc/column.hxx b/sw/source/ui/inc/column.hxx
index 0ebdf821a42a..aceb0ae3ddef 100644
--- a/sw/source/ui/inc/column.hxx
+++ b/sw/source/ui/inc/column.hxx
@@ -37,7 +37,7 @@
#include <vcl/lstbox.hxx>
#include <vcl/button.hxx>
#include <vcl/timer.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <svtools/ctrlbox.hxx>
#include <svtools/valueset.hxx>
#include <sfx2/basedlgs.hxx>
@@ -71,10 +71,10 @@ class SwColumnDlg : public SfxModalDialog
long nSelectionWidth;
long nPageWidth;
- BOOL bPageChanged : 1;
- BOOL bSectionChanged : 1;
- BOOL bSelSectionChanged : 1;
- BOOL bFrameChanged : 1;
+ sal_Bool bPageChanged : 1;
+ sal_Bool bSectionChanged : 1;
+ sal_Bool bSelSectionChanged : 1;
+ sal_Bool bFrameChanged : 1;
DECL_LINK(ObjectHdl, ListBox*);
@@ -103,13 +103,14 @@ class ColumnValueSet : public ValueSet
--------------------------------------------------------------------*/
class SwColumnPage : public SfxTabPage
{
+ FixedLine aFLGroup;
FixedText aClNrLbl;
NumericField aCLNrEdt;
ColumnValueSet aDefaultVS;
ImageList aPreColsIL;
CheckBox aBalanceColsCB;
- FixedLine aFLGroup;
+ FixedLine aFLLayout;
ImageButton aBtnUp;
FixedText aColumnFT;
FixedText aWidthFT;
@@ -125,15 +126,14 @@ class SwColumnPage : public SfxTabPage
ImageButton aBtnDown;
CheckBox aAutoWidthBox;
- FixedLine aFLLayout;
+ FixedLine aFLLineType;
FixedText aLineTypeLbl;
LineListBox aLineTypeDLB;
FixedText aLineHeightLbl;
MetricField aLineHeightEdit;
FixedText aLinePosLbl;
ListBox aLinePosDLB;
- FixedLine aFLLineType;
FixedLine aVertFL;
FixedLine aPropertiesFL;
@@ -146,16 +146,16 @@ class SwColumnPage : public SfxTabPage
SwColMgr* pColMgr;
- USHORT nFirstVis;
- USHORT nCols;
+ sal_uInt16 nFirstVis;
+ sal_uInt16 nCols;
long nColWidth[nMaxCols];
long nColDist[nMaxCols];
- USHORT nMinWidth;
+ sal_uInt16 nMinWidth;
PercentField *pModifiedField;
- BOOL bFormat;
- BOOL bFrm;
- BOOL bHtmlMode;
- BOOL bLockUpdate;
+ sal_Bool bFormat;
+ sal_Bool bFrm;
+ sal_Bool bHtmlMode;
+ sal_Bool bLockUpdate;
// Handler
DECL_LINK( ColModify, NumericField * );
@@ -174,7 +174,7 @@ class SwColumnPage : public SfxTabPage
void UpdateCols();
void Init();
void ResetColWidth();
- void SetLabels( USHORT nVis );
+ void SetLabels( sal_uInt16 nVis );
using SfxTabPage::ActivatePage;
using SfxTabPage::DeactivatePage;
@@ -188,18 +188,18 @@ public:
virtual ~SwColumnPage();
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
- void SetFrmMode(BOOL bMod);
+ void SetFrmMode(sal_Bool bMod);
void SetPageWidth(long nPageWidth);
- void SetFormatUsed(BOOL bFmt) { bFormat = bFmt; }
+ void SetFormatUsed(sal_Bool bFmt) { bFormat = bFmt; }
- void ShowBalance(BOOL bShow) {aBalanceColsCB.Show(bShow);}
- void SetInSection(BOOL bSet);
+ void ShowBalance(sal_Bool bShow) {aBalanceColsCB.Show(bShow);}
+ void SetInSection(sal_Bool bSet);
void ActivateColumnControl() {aCLNrEdt.GrabFocus();}
};
diff --git a/sw/source/ui/inc/conarc.hxx b/sw/source/ui/inc/conarc.hxx
index 720af53b9057..5b8241e31c04 100644
--- a/sw/source/ui/inc/conarc.hxx
+++ b/sw/source/ui/inc/conarc.hxx
@@ -39,16 +39,16 @@
class ConstArc : public SwDrawBase
{
Point aStartPnt;
- UINT16 nAnzButUp;
+ sal_uInt16 nAnzButUp;
public:
ConstArc(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
// Mouse- & Key-Events
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
- virtual void Activate(const USHORT nSlotId); // Funktion aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Funktion aktivieren
virtual void Deactivate();
};
diff --git a/sw/source/ui/inc/concustomshape.hxx b/sw/source/ui/inc/concustomshape.hxx
index 85c096ed2c71..2fd1990dd864 100644
--- a/sw/source/ui/inc/concustomshape.hxx
+++ b/sw/source/ui/inc/concustomshape.hxx
@@ -53,10 +53,10 @@ class ConstCustomShape : public SwDrawBase
ConstCustomShape( SwWrtShell* pSh, SwEditWin* pWin, SwView* pView, SfxRequest& rReq );
// Mouse- & Key-Events
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
- virtual void Activate(const USHORT nSlotId); // Function aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren
rtl::OUString GetShapeType() const;
static rtl::OUString GetShapeTypeFromRequest( SfxRequest& rReq );
diff --git a/sw/source/ui/inc/condedit.hxx b/sw/source/ui/inc/condedit.hxx
index 4cd343986171..8287d54665c9 100644
--- a/sw/source/ui/inc/condedit.hxx
+++ b/sw/source/ui/inc/condedit.hxx
@@ -34,7 +34,7 @@
class SW_DLLPUBLIC ConditionEdit : public Edit, public DropTargetHelper
{
- BOOL bBrackets, bEnableDrop;
+ sal_Bool bBrackets, bEnableDrop;
SW_DLLPRIVATE virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
SW_DLLPRIVATE virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
@@ -42,10 +42,10 @@ class SW_DLLPUBLIC ConditionEdit : public Edit, public DropTargetHelper
public:
ConditionEdit( Window* pParent, const ResId& rResId );
- inline void ShowBrackets(BOOL bShow) { bBrackets = bShow; }
+ inline void ShowBrackets(sal_Bool bShow) { bBrackets = bShow; }
- inline void SetDropEnable( BOOL bFlag ) { bEnableDrop = bFlag; }
- inline BOOL IsDropEnable() const { return bEnableDrop; }
+ inline void SetDropEnable( sal_Bool bFlag ) { bEnableDrop = bFlag; }
+ inline sal_Bool IsDropEnable() const { return bEnableDrop; }
};
#endif
diff --git a/sw/source/ui/inc/conform.hxx b/sw/source/ui/inc/conform.hxx
index 7f450e730a98..82c7cd6f967a 100644
--- a/sw/source/ui/inc/conform.hxx
+++ b/sw/source/ui/inc/conform.hxx
@@ -36,9 +36,9 @@ public:
ConstFormControl(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
// Mouse- & Key-Events
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
- virtual void Activate(const USHORT nSlotId); // Function aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren
virtual void CreateDefaultObject();
};
diff --git a/sw/source/ui/inc/conpoly.hxx b/sw/source/ui/inc/conpoly.hxx
index 43244db17b2a..09220d15e1c7 100644
--- a/sw/source/ui/inc/conpoly.hxx
+++ b/sw/source/ui/inc/conpoly.hxx
@@ -44,11 +44,11 @@ public:
ConstPolygon(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
// Mouse- & Key-Events
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
- virtual void Activate(const USHORT nSlotId); // Function aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren
};
diff --git a/sw/source/ui/inc/conrect.hxx b/sw/source/ui/inc/conrect.hxx
index 3f07874a10d0..0ad80cfbc79a 100644
--- a/sw/source/ui/inc/conrect.hxx
+++ b/sw/source/ui/inc/conrect.hxx
@@ -39,8 +39,8 @@
class ConstRectangle : public SwDrawBase
{
- BOOL bMarquee;
- BOOL bCapVertical;
+ sal_Bool bMarquee;
+ sal_Bool bCapVertical;
// #93382#
sal_Bool mbVertical;
@@ -49,10 +49,10 @@ class ConstRectangle : public SwDrawBase
ConstRectangle(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
// Mouse- & Key-Events
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
- virtual void Activate(const USHORT nSlotId); // Function aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren
};
diff --git a/sw/source/ui/inc/content.hxx b/sw/source/ui/inc/content.hxx
index 5abb7ec6cfb4..31aeb8fdd6fc 100644
--- a/sw/source/ui/inc/content.hxx
+++ b/sw/source/ui/inc/content.hxx
@@ -46,7 +46,7 @@ class SwRedline;
class SwPopup : public PopupMenu
{
- USHORT nCurId;
+ sal_uInt16 nCurId;
virtual void Select(){nCurId = GetCurItemId();}
public:
@@ -54,7 +54,7 @@ public:
PopupMenu(),
nCurId(USHRT_MAX){}
- USHORT GetCurId() const { return nCurId; }
+ sal_uInt16 GetCurId() const { return nCurId; }
};
@@ -62,38 +62,38 @@ public:
class SwOutlineContent : public SwContent
{
- USHORT nOutlinePos;
- BYTE nOutlineLevel;
- BOOL bIsMoveable;
+ sal_uInt16 nOutlinePos;
+ sal_uInt8 nOutlineLevel;
+ sal_Bool bIsMoveable;
public:
SwOutlineContent( const SwContentType* pCnt,
const String& rName,
- USHORT nArrPos,
- BYTE nLevel,
- BOOL bMove,
+ sal_uInt16 nArrPos,
+ sal_uInt8 nLevel,
+ sal_Bool bMove,
long nYPos) :
SwContent(pCnt, rName, nYPos),
nOutlinePos(nArrPos), nOutlineLevel(nLevel), bIsMoveable(bMove) {}
- USHORT GetPos(){return nOutlinePos;}
- BYTE GetOutlineLevel(){return nOutlineLevel;}
- BOOL IsMoveable(){return bIsMoveable;};
+ sal_uInt16 GetPos(){return nOutlinePos;}
+ sal_uInt8 GetOutlineLevel(){return nOutlineLevel;}
+ sal_Bool IsMoveable(){return bIsMoveable;};
};
//----------------------------------------------------------------------------
class SwRegionContent : public SwContent
{
- BYTE nRegionLevel;
+ sal_uInt8 nRegionLevel;
public:
SwRegionContent( const SwContentType* pCnt,
const String& rName,
- BYTE nLevel,
+ sal_uInt8 nLevel,
long nYPos) :
SwContent(pCnt, rName, nYPos),
nRegionLevel(nLevel){}
- BYTE GetRegionLevel() const {return nRegionLevel;}
+ sal_uInt8 GetRegionLevel() const {return nRegionLevel;}
};
//----------------------------------------------------------------------------
@@ -111,7 +111,7 @@ public:
: SwContent( pCnt, rName, nYPos ), sURL( rURL ), pINetAttr( pAttr )
{}
- virtual BOOL IsProtect() const;
+ virtual sal_Bool IsProtect() const;
const String& GetURL() { return sURL; }
const SwTxtINetFmt* GetINetAttr() { return pINetAttr; }
};
@@ -138,7 +138,7 @@ public:
const SwFmtFld* GetPostIt() { return pFld; }
SwRedline* GetRedline() { return pRedline; }
- virtual BOOL IsProtect() const;
+ virtual sal_Bool IsProtect() const;
bool IsPostIt() {return mbPostIt; }
};
@@ -184,31 +184,31 @@ class SwContentType : public SwTypeNumber
String sContentTypeName; // Name der Inhaltsform
String sSingleContentTypeName; // Name der Inhaltsform, Singular
String sTypeToken; // Anhaengsel fuer URL
- USHORT nMemberCount; // Inhaltsanzahl
- USHORT nContentType; // Id der Inhaltsform
- BYTE nOutlineLevel;
- BOOL bMemberFilled : 1; // wurden die Inhalte bereits eingefuegt?
- BOOL bIsInternalDrag:1; // koennen die Inhalte verschoben werden?
- BOOL bDataValid : 1; //
- BOOL bEdit: 1; // kann diese Type bearbeitet werden ?
- BOOL bDelete: 1; // kann diese Type geloescht werden ?
+ sal_uInt16 nMemberCount; // Inhaltsanzahl
+ sal_uInt16 nContentType; // Id der Inhaltsform
+ sal_uInt8 nOutlineLevel;
+ sal_Bool bMemberFilled : 1; // wurden die Inhalte bereits eingefuegt?
+ sal_Bool bIsInternalDrag:1; // koennen die Inhalte verschoben werden?
+ sal_Bool bDataValid : 1; //
+ sal_Bool bEdit: 1; // kann diese Type bearbeitet werden ?
+ sal_Bool bDelete: 1; // kann diese Type geloescht werden ?
protected:
void RemoveNewline(String&);
public:
- SwContentType(SwWrtShell* pParent, USHORT nType, BYTE nLevel );
+ SwContentType(SwWrtShell* pParent, sal_uInt16 nType, sal_uInt8 nLevel );
~SwContentType();
- void Init(BOOL* pbInvalidateWindow = 0);
- void FillMemberList(BOOL* pbLevelChanged = NULL);
- USHORT GetMemberCount() const
+ void Init(sal_Bool* pbInvalidateWindow = 0);
+ void FillMemberList(sal_Bool* pbLevelChanged = NULL);
+ sal_uInt16 GetMemberCount() const
{return nMemberCount;};
- USHORT GetType() const {return nContentType;}
- const SwContent* GetMember(USHORT nIndex);
+ sal_uInt16 GetType() const {return nContentType;}
+ const SwContent* GetMember(sal_uInt16 nIndex);
const String& GetName() {return sContentTypeName;}
const String& GetSingleName() const {return sSingleContentTypeName;}
const String& GetTypeToken() const{return sTypeToken;}
- void SetOutlineLevel(BYTE nNew)
+ void SetOutlineLevel(sal_uInt8 nNew)
{
nOutlineLevel = nNew;
Invalidate();
@@ -216,8 +216,8 @@ public:
void Invalidate(); // nur nMemberCount wird neu gelesen
- BOOL IsEditable() const {return bEdit;}
- BOOL IsDeletable() const {return bDelete;}
+ sal_Bool IsEditable() const {return bEdit;}
+ sal_Bool IsDeletable() const {return bDelete;}
};
#endif
diff --git a/sw/source/ui/inc/conttree.hxx b/sw/source/ui/inc/conttree.hxx
index accf1d1b1818..433a8ebae34d 100644
--- a/sw/source/ui/inc/conttree.hxx
+++ b/sw/source/ui/inc/conttree.hxx
@@ -80,24 +80,24 @@ class SwContentTree : public SvTreeListBox
std::map< void*, sal_Bool > mOutLineNodeMap;
sal_Int32 nActiveBlock;
- USHORT nHiddenBlock;
- USHORT nRootType;
- USHORT nLastSelType;
- BYTE nOutlineLevel;
-
- BOOL bIsActive :1;
- BOOL bIsConstant :1;
- BOOL bIsHidden :1;
- BOOL bDocChgdInDragging :1;
- BOOL bIsInternalDrag :1;
- BOOL bIsRoot :1;
- BOOL bIsIdleClear :1;
- BOOL bIsLastReadOnly :1;
- BOOL bIsOutlineMoveable :1;
- BOOL bViewHasChanged :1;
- BOOL bIsImageListInitialized : 1;
-
- static BOOL bIsInDrag;
+ sal_uInt16 nHiddenBlock;
+ sal_uInt16 nRootType;
+ sal_uInt16 nLastSelType;
+ sal_uInt8 nOutlineLevel;
+
+ sal_Bool bIsActive :1;
+ sal_Bool bIsConstant :1;
+ sal_Bool bIsHidden :1;
+ sal_Bool bDocChgdInDragging :1;
+ sal_Bool bIsInternalDrag :1;
+ sal_Bool bIsRoot :1;
+ sal_Bool bIsIdleClear :1;
+ sal_Bool bIsLastReadOnly :1;
+ sal_Bool bIsOutlineMoveable :1;
+ sal_Bool bViewHasChanged :1;
+ sal_Bool bIsImageListInitialized : 1;
+
+ static sal_Bool bIsInDrag;
void FindActiveTypeAndRemoveUserData();
@@ -123,41 +123,41 @@ protected:
sal_Bool FillTransferData( TransferDataContainer& rTransfer,
sal_Int8& rDragMode );
- BOOL HasContentChanged();
+ sal_Bool HasContentChanged();
virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData,
SvLBoxEntry* );
- virtual BOOL NotifyAcceptDrop( SvLBoxEntry* );
+ virtual sal_Bool NotifyAcceptDrop( SvLBoxEntry* );
- virtual BOOL NotifyMoving( SvLBoxEntry* pTarget,
+ virtual sal_Bool NotifyMoving( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos
+ sal_uLong& rNewChildPos
);
- virtual BOOL NotifyCopying( SvLBoxEntry* pTarget,
+ virtual sal_Bool NotifyCopying( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos
+ sal_uLong& rNewChildPos
);
virtual void MouseButtonDown( const MouseEvent& rMEvt );
- void EditEntry( SvLBoxEntry* pEntry, BYTE nMode );
+ void EditEntry( SvLBoxEntry* pEntry, sal_uInt8 nMode );
void GotoContent(SwContent* pCnt);
- static void SetInDrag(BOOL bSet) {bIsInDrag = bSet;}
+ static void SetInDrag(sal_Bool bSet) {bIsInDrag = bSet;}
virtual PopupMenu* CreateContextMenu( void );
- virtual void ExcecuteContextMenuAction( USHORT nSelectedPopupEntry );
+ virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry );
public:
SwContentTree(Window* pParent, const ResId& rResId);
~SwContentTree();
- BOOL ToggleToRoot();
- BOOL IsRoot() const {return bIsRoot;}
- USHORT GetRootType() const {return nRootType;}
- void SetRootType(USHORT nType);
- void Display( BOOL bActiveView );
+ sal_Bool ToggleToRoot();
+ sal_Bool IsRoot() const {return bIsRoot;}
+ sal_uInt16 GetRootType() const {return nRootType;}
+ void SetRootType(sal_uInt16 nType);
+ void Display( sal_Bool bActiveView );
void Clear();
void SetHiddenShell(SwWrtShell* pSh);
void ShowHiddenShell();
@@ -170,26 +170,26 @@ public:
pActiveShell :
pHiddenShell;}
- static BOOL IsInDrag() {return bIsInDrag;}
- BOOL IsInternalDrag() const {return bIsInternalDrag != 0;}
+ static sal_Bool IsInDrag() {return bIsInDrag;}
+ sal_Bool IsInternalDrag() const {return bIsInternalDrag != 0;}
sal_Int32 GetActiveBlock() const {return nActiveBlock;}
- BYTE GetOutlineLevel()const {return nOutlineLevel;}
- void SetOutlineLevel(BYTE nSet);
+ sal_uInt8 GetOutlineLevel()const {return nOutlineLevel;}
+ void SetOutlineLevel(sal_uInt8 nSet);
- BOOL Expand( SvLBoxEntry* pParent );
+ sal_Bool Expand( SvLBoxEntry* pParent );
- BOOL Collapse( SvLBoxEntry* pParent );
+ sal_Bool Collapse( SvLBoxEntry* pParent );
- void ExecCommand(USHORT nCmd, BOOL bModifier);
+ void ExecCommand(sal_uInt16 nCmd, sal_Bool bModifier);
void ShowTree();
void HideTree();
- BOOL IsConstantView() {return bIsConstant;}
- BOOL IsActiveView() {return bIsActive;}
- BOOL IsHiddenView() {return bIsHidden;}
+ sal_Bool IsConstantView() {return bIsConstant;}
+ sal_Bool IsActiveView() {return bIsActive;}
+ sal_Bool IsHiddenView() {return bIsHidden;}
const SwWrtShell* GetActiveWrtShell() {return pActiveShell;}
SwWrtShell* GetHiddenWrtShell() {return pHiddenShell;}
@@ -202,7 +202,7 @@ public:
virtual void GetFocus();
virtual void KeyInput(const KeyEvent& rKEvt);
- virtual BOOL Select( SvLBoxEntry* pEntry, BOOL bSelect=TRUE );
+ virtual sal_Bool Select( SvLBoxEntry* pEntry, sal_Bool bSelect=sal_True );
};
@@ -214,12 +214,12 @@ class SwLBoxString : public SvLBoxString
{
public:
- SwLBoxString( SvLBoxEntry* pEntry, USHORT nFlags,
+ SwLBoxString( SvLBoxEntry* pEntry, sal_uInt16 nFlags,
const String& rStr ) : SvLBoxString(pEntry,nFlags,rStr)
{
}
- virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags,
+ virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags,
SvLBoxEntry* pEntry);
};
@@ -243,9 +243,9 @@ private:
SwGlblDocContent* pDocContent;
sfx2::DocumentInserter* pDocInserter;
- BOOL bIsInternalDrag :1;
- BOOL bLastEntryEmphasis :1; // Drag'n Drop
- BOOL bIsImageListInitialized : 1;
+ sal_Bool bIsInternalDrag :1;
+ sal_Bool bLastEntryEmphasis :1; // Drag'n Drop
+ sal_Bool bIsImageListInitialized : 1;
static const SfxObjectShell* pShowShell;
@@ -269,22 +269,22 @@ protected:
virtual void RequestHelp( const HelpEvent& rHEvt );
virtual long GetTabPos( SvLBoxEntry*, SvLBoxTab* );
- virtual BOOL NotifyMoving( SvLBoxEntry* pTarget,
+ virtual sal_Bool NotifyMoving( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos
+ sal_uLong& rNewChildPos
);
- virtual BOOL NotifyCopying( SvLBoxEntry* pTarget,
+ virtual sal_Bool NotifyCopying( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos
+ sal_uLong& rNewChildPos
);
virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
virtual void DragFinished( sal_Int8 );
virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData,
SvLBoxEntry* );
- virtual BOOL NotifyAcceptDrop( SvLBoxEntry* );
+ virtual sal_Bool NotifyAcceptDrop( SvLBoxEntry* );
virtual void MouseButtonDown( const MouseEvent& rMEvt );
virtual void KeyInput(const KeyEvent& rKEvt);
@@ -299,26 +299,26 @@ protected:
DECL_LINK( Timeout, Timer* );
DECL_LINK( DoubleClickHdl, SwGlobalTree * );
- BOOL IsInternalDrag() const {return bIsInternalDrag != 0;}
+ sal_Bool IsInternalDrag() const {return bIsInternalDrag != 0;}
SwNavigationPI* GetParentWindow()
{ return (SwNavigationPI*)Window::GetParent(); }
void OpenDoc(const SwGlblDocContent*);
void GotoContent(const SwGlblDocContent*);
- USHORT GetEnableFlags() const;
+ sal_uInt16 GetEnableFlags() const;
static const SfxObjectShell* GetShowShell() {return pShowShell;}
static void SetShowShell(const SfxObjectShell*pSet) {pShowShell = pSet;}
DECL_STATIC_LINK(SwGlobalTree, ShowFrameHdl, SwGlobalTree*);
virtual PopupMenu* CreateContextMenu( void );
- virtual void ExcecuteContextMenuAction( USHORT nSelectedPopupEntry );
+ virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry );
public:
SwGlobalTree(Window* pParent, const ResId& rResId);
virtual ~SwGlobalTree();
- void TbxMenuHdl(USHORT nTbxId, ToolBox* pBox);
+ void TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox);
void InsertRegion( const SwGlblDocContent* pCont,
const String* pFileName = 0 );
void EditContent(const SwGlblDocContent* pCont );
@@ -326,11 +326,11 @@ public:
void ShowTree();
void HideTree();
- void ExecCommand(USHORT nCmd);
+ void ExecCommand(sal_uInt16 nCmd);
- void Display(BOOL bOnlyUpdateUserData = FALSE);
+ void Display(sal_Bool bOnlyUpdateUserData = sal_False);
- BOOL Update(BOOL bHard);
+ sal_Bool Update(sal_Bool bHard);
};
#endif
diff --git a/sw/source/ui/inc/dbinsdlg.hxx b/sw/source/ui/inc/dbinsdlg.hxx
index 9ca9c15b06ef..56adecbaad8f 100644
--- a/sw/source/ui/inc/dbinsdlg.hxx
+++ b/sw/source/ui/inc/dbinsdlg.hxx
@@ -66,18 +66,18 @@ struct SwInsDBColumn
sal_Int32 nDBNumFmt;
sal_uInt32 nUsrNumFmt;
LanguageType eUsrNumFmtLng;
- USHORT nCol;
- BOOL bHasFmt : 1;
- BOOL bIsDBFmt : 1;
+ sal_uInt16 nCol;
+ sal_Bool bHasFmt : 1;
+ sal_Bool bIsDBFmt : 1;
- SwInsDBColumn( const String& rStr, USHORT nColumn )
+ SwInsDBColumn( const String& rStr, sal_uInt16 nColumn )
: sColumn( rStr ),
nDBNumFmt( 0 ),
nUsrNumFmt( 0 ),
eUsrNumFmtLng( LANGUAGE_SYSTEM ),
nCol( nColumn ),
- bHasFmt(FALSE),
- bIsDBFmt(TRUE)
+ bHasFmt(sal_False),
+ bIsDBFmt(sal_True)
{}
int operator==( const SwInsDBColumn& rCmp ) const
@@ -143,7 +143,7 @@ class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem
SfxItemSet* pTblSet;
SwTableRep* pRep;
- USHORT nGBFmtLen;
+ sal_uInt16 nGBFmtLen;
DECL_LINK( PageHdl, Button* );
DECL_LINK( AutoFmtHdl, PushButton* );
@@ -154,7 +154,7 @@ class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem
DECL_LINK( DblClickHdl, ListBox* );
DECL_LINK( HeaderHdl, Button* );
- BOOL SplitTextToColArr( const String& rTxt, _DB_Columns& rColArr, BOOL bInsField );
+ sal_Bool SplitTextToColArr( const String& rTxt, _DB_Columns& rColArr, sal_Bool bInsField );
using SfxModalDialog::Notify;
virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
virtual void Commit();
diff --git a/sw/source/ui/inc/dbtree.hxx b/sw/source/ui/inc/dbtree.hxx
index ec0bb0d970b5..090654b3f55c 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 69b65f12ae1e..172ca409317a 100644
--- a/sw/source/ui/inc/docfnote.hxx
+++ b/sw/source/ui/inc/docfnote.hxx
@@ -37,7 +37,7 @@ class SwFootNoteOptionDlg :public SfxTabDialog
SwWrtShell &rSh;
Link aOldOkHdl;
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
#ifdef _SOLAR__PRIVATE
DECL_LINK( OkHdl, Button * );
diff --git a/sw/source/ui/inc/docstdlg.hxx b/sw/source/ui/inc/docstdlg.hxx
index 5747e6914869..184ed0afbc0d 100644
--- a/sw/source/ui/inc/docstdlg.hxx
+++ b/sw/source/ui/inc/docstdlg.hxx
@@ -47,30 +47,29 @@ public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
protected:
- virtual BOOL FillItemSet( SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet( SfxItemSet &rSet);
virtual void Reset (const SfxItemSet &rSet);
DECL_LINK( UpdateHdl, PushButton*);
private:
- FixedText aTableLbl;
- FixedText aGrfLbl;
- FixedText aOLELbl;
FixedText aPageLbl;
- FixedText aParaLbl;
- FixedText aWordLbl;
- FixedText aCharLbl;
- FixedText aCharExclSpacesLbl;
- FixedText aLineLbl;
-
+ FixedInfo aPageNo;
+ FixedText aTableLbl;
FixedInfo aTableNo;
+ FixedText aGrfLbl;
FixedInfo aGrfNo;
+ FixedText aOLELbl;
FixedInfo aOLENo;
- FixedInfo aPageNo;
+ FixedText aParaLbl;
FixedInfo aParaNo;
+ FixedText aWordLbl;
FixedInfo aWordNo;
+ FixedText aCharLbl;
FixedInfo aCharNo;
+ FixedText aCharExclSpacesLbl;
FixedInfo aCharExclSpacesNo;
+ FixedText aLineLbl;
FixedInfo aLineNo;
PushButton aUpdatePB;
diff --git a/sw/source/ui/inc/drawbase.hxx b/sw/source/ui/inc/drawbase.hxx
index fa306a080db1..ebcd7fed227c 100644
--- a/sw/source/ui/inc/drawbase.hxx
+++ b/sw/source/ui/inc/drawbase.hxx
@@ -52,9 +52,9 @@ protected:
SwEditWin* m_pWin;
Point m_aStartPos; // Position von BeginCreate
Point m_aMDPos; // Position von MouseButtonDown
- USHORT m_nSlotId;
- BOOL m_bCreateObj :1;
- BOOL m_bInsForm :1;
+ sal_uInt16 m_nSlotId;
+ sal_Bool m_bCreateObj :1;
+ sal_Bool m_bInsForm :1;
Point GetDefaultCenterPos();
public:
@@ -63,20 +63,20 @@ public:
void SetDrawPointer();
void EnterSelectMode(const MouseEvent& rMEvt);
- inline BOOL IsInsertForm() const { return m_bInsForm; }
- inline BOOL IsCreateObj() const { return m_bCreateObj; }
+ inline sal_Bool IsInsertForm() const { return m_bInsForm; }
+ inline sal_Bool IsCreateObj() const { return m_bCreateObj; }
- // Mouse- & Key-Events; Returnwert=TRUE: Event wurde bearbeitet
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ // Mouse- & Key-Events; Returnwert=sal_True: Event wurde bearbeitet
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
void BreakCreate();
- void SetSlotId(USHORT nSlot) {m_nSlotId = nSlot;}
- USHORT GetSlotId() { return m_nSlotId;}
+ void SetSlotId(sal_uInt16 nSlot) {m_nSlotId = nSlot;}
+ sal_uInt16 GetSlotId() { return m_nSlotId;}
- virtual void Activate(const USHORT nSlotId); // Function aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
virtual void CreateDefaultObject();
diff --git a/sw/source/ui/inc/drpcps.hxx b/sw/source/ui/inc/drpcps.hxx
index 75ce9441c6ea..f9a8f7316c93 100644
--- a/sw/source/ui/inc/drpcps.hxx
+++ b/sw/source/ui/inc/drpcps.hxx
@@ -63,6 +63,7 @@ class SwDropCapsPage : public SfxTabPage
{
friend class SwDropCapsPict;
+ FixedLine aSettingsFL;
CheckBox aDropCapsBox;
CheckBox aWholeWordCB;
FixedText aSwitchText;
@@ -71,19 +72,18 @@ friend class SwDropCapsPict;
NumericField aLinesField;
FixedText aDistanceText;
MetricField aDistanceField;
- FixedLine aSettingsFL;
+ FixedLine aContentFL;
FixedText aTextText;
Edit aTextEdit;
FixedText aTemplateText;
ListBox aTemplateBox;
- FixedLine aContentFL;
SwDropCapsPict *pPict;
- BOOL bModified;
- BOOL bFormat;
- BOOL bHtmlMode;
+ sal_Bool bModified;
+ sal_Bool bFormat;
+ sal_Bool bHtmlMode;
SwWrtShell &rSh;
@@ -104,12 +104,12 @@ friend class SwDropCapsPict;
public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet( SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet( SfxItemSet &rSet);
virtual void Reset (const SfxItemSet &rSet);
- void SetFormat(BOOL bSet){bFormat = bSet;}
+ void SetFormat(sal_Bool bSet){bFormat = bSet;}
};
#endif
diff --git a/sw/source/ui/inc/drwbassh.hxx b/sw/source/ui/inc/drwbassh.hxx
index e57cf394183f..0b5628b99cad 100644
--- a/sw/source/ui/inc/drwbassh.hxx
+++ b/sw/source/ui/inc/drwbassh.hxx
@@ -39,9 +39,9 @@ class SwDrawBaseShell: public SwBaseShell
{
SwDrawBase* pDrawActual;
- UINT16 eDrawMode;
- BOOL bRotate : 1;
- BOOL bSelMove: 1;
+ sal_uInt16 eDrawMode;
+ sal_Bool bRotate : 1;
+ sal_Bool bSelMove: 1;
DECL_LINK( CheckGroupShapeNameHdl, AbstractSvxNameDialog* );
DECL_LINK(ValidatePosition, SvxSwFrameValidation* );
@@ -55,7 +55,7 @@ public:
void Execute(SfxRequest &);
void GetState(SfxItemSet &);
void DisableState(SfxItemSet &rSet) { Disable(rSet);}
- BOOL Disable(SfxItemSet& rSet, USHORT nWhich = 0);
+ sal_Bool Disable(SfxItemSet& rSet, sal_uInt16 nWhich = 0);
void StateStatusline(SfxItemSet &rSet);
diff --git a/sw/source/ui/inc/drwtxtsh.hxx b/sw/source/ui/inc/drwtxtsh.hxx
index a77eadf598b1..493a8ede30de 100644
--- a/sw/source/ui/inc/drwtxtsh.hxx
+++ b/sw/source/ui/inc/drwtxtsh.hxx
@@ -42,12 +42,12 @@ class SwDrawTextShell: public SfxShell
SdrView *pSdrView;
- BOOL bRotate : 1;
- BOOL bSelMove: 1;
+ sal_Bool bRotate : 1;
+ sal_Bool bSelMove: 1;
void SetAttrToMarked(const SfxItemSet& rAttr);
void InsertSymbol(SfxRequest& rReq);
- BOOL IsTextEdit();
+ sal_Bool IsTextEdit();
public:
SFX_DECL_INTERFACE(SW_DRWTXTSHELL)
TYPEINFO();
@@ -58,7 +58,8 @@ public:
SwDrawTextShell(SwView &rView);
virtual ~SwDrawTextShell();
- virtual SfxUndoManager* GetUndoManager();
+ virtual ::svl::IUndoManager*
+ GetUndoManager();
void StateDisableItems(SfxItemSet &);
diff --git a/sw/source/ui/inc/dselect.hxx b/sw/source/ui/inc/dselect.hxx
index 68af7d2a9366..ecd0eb7c8df3 100644
--- a/sw/source/ui/inc/dselect.hxx
+++ b/sw/source/ui/inc/dselect.hxx
@@ -42,9 +42,9 @@ class DrawSelection : public SwDrawBase
DrawSelection(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
- virtual void Activate(const USHORT nSlotId); // Function aktivieren
+ virtual void Activate(const sal_uInt16 nSlotId); // Function aktivieren
};
diff --git a/sw/source/ui/inc/edtwin.hxx b/sw/source/ui/inc/edtwin.hxx
index 3cc702f8cd3b..a81aa116aeca 100644
--- a/sw/source/ui/inc/edtwin.hxx
+++ b/sw/source/ui/inc/edtwin.hxx
@@ -61,23 +61,23 @@ class SwEditWin: public Window,
public DropTargetHelper, public DragSourceHelper
{
friend void ScrollMDI(ViewShell* pVwSh, const SwRect&,
- USHORT nRangeX, USHORT nRangeY);
-friend BOOL IsScrollMDI(ViewShell* pVwSh, const SwRect&);
+ sal_uInt16 nRangeX, sal_uInt16 nRangeY);
+friend sal_Bool IsScrollMDI(ViewShell* pVwSh, const SwRect&);
friend void SizeNotify(ViewShell* pVwSh, const Size &);
friend void PageNumNotify( ViewShell* pVwSh,
- USHORT nPhyNum,
- USHORT nVirtNum,
+ sal_uInt16 nPhyNum,
+ sal_uInt16 nVirtNum,
const String& rPg );
static QuickHelpData* pQuickHlpData;
- static BOOL bReplaceQuote;
+ static sal_Bool bReplaceQuote;
static long nDDStartPosX, nDDStartPosY;
static Color aTextColor; //Textfarbe, fuer die Giesskanne
- static BOOL bTransparentBackColor; // Hintergrund transparent
+ static sal_Bool bTransparentBackColor; // Hintergrund transparent
static Color aTextBackColor; //Texthintergrundfarbe, fuer die Giesskanne
/*
@@ -114,14 +114,14 @@ friend void PageNumNotify( ViewShell* pVwSh,
int aActHitType; // aktueller Mauspointer
- ULONG m_nDropFormat; //Format aus dem letzten QueryDrop
- USHORT m_nDropAction; //Action aus dem letzten QueryDrop
- USHORT m_nDropDestination; //Ziel aus dem letzten QueryDrop
+ sal_uLong m_nDropFormat; //Format aus dem letzten QueryDrop
+ sal_uInt16 m_nDropAction; //Action aus dem letzten QueryDrop
+ sal_uInt16 m_nDropDestination; //Ziel aus dem letzten QueryDrop
- UINT16 eBezierMode;
- UINT16 nInsFrmColCount; //Spaltenzahl fuer interaktiven Rahmen
+ sal_uInt16 eBezierMode;
+ sal_uInt16 nInsFrmColCount; //Spaltenzahl fuer interaktiven Rahmen
SdrObjKind eDrawMode;
- BOOL bLinkRemoved : 1,
+ sal_Bool bLinkRemoved : 1,
bMBPressed : 1,
bInsDraw : 1,
bInsFrm : 1,
@@ -143,8 +143,8 @@ friend void PageNumNotify( ViewShell* pVwSh,
bObjectSelect : 1;
- USHORT nKS_NUMDOWN_Count; // #i23725#
- USHORT nKS_NUMINDENTINC_Count;
+ sal_uInt16 nKS_NUMDOWN_Count; // #i23725#
+ sal_uInt16 nKS_NUMINDENTINC_Count;
void LeaveArea(const Point &);
void JustifyAreaTimer();
@@ -152,19 +152,19 @@ friend void PageNumNotify( ViewShell* pVwSh,
void RstMBDownFlags();
- void ChangeFly( BYTE nDir, BOOL bWeb = FALSE );
- void ChangeDrawing( BYTE nDir );
+ void ChangeFly( sal_uInt8 nDir, sal_Bool bWeb = sal_False );
+ void ChangeDrawing( sal_uInt8 nDir );
- BOOL EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos);
- BOOL RulerColumnDrag( const MouseEvent& rMEvt, BOOL bVerticalMode);
+ sal_Bool EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos);
+ sal_Bool RulerColumnDrag( const MouseEvent& rMEvt, sal_Bool bVerticalMode);
//Hilfsfunktionen fuer D&D
void DropCleanup();
void CleanupDropUserMarker();
- USHORT GetDropDestination( const Point& rPixPnt,
+ sal_uInt16 GetDropDestination( const Point& rPixPnt,
SdrObject ** ppObj = 0 );
//select the object/cursor at the mouse position of the context menu request
- BOOL SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos );
+ sal_Bool SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos );
/*
* Handler fuer das Weiterscrollen, wenn der Mauspointer innerhalb eines
@@ -218,45 +218,45 @@ protected:
SvxAutoCorrect* pACorr, sal_Bool bFromIME = sal_False );
public:
- void UpdatePointer(const Point &, USHORT nButtons = 0);
+ void UpdatePointer(const Point &, sal_uInt16 nButtons = 0);
- BOOL IsDrawSelMode();
- BOOL IsDrawAction() { return (bInsDraw); }
- void SetDrawAction(BOOL bFlag) { bInsDraw = bFlag; }
+ sal_Bool IsDrawSelMode();
+ sal_Bool IsDrawAction() { return (bInsDraw); }
+ void SetDrawAction(sal_Bool bFlag) { bInsDraw = bFlag; }
- void SetObjectSelect( BOOL bVal ) { bObjectSelect = bVal; }
- BOOL IsObjectSelect() const { return bObjectSelect; }
+ void SetObjectSelect( sal_Bool bVal ) { bObjectSelect = bVal; }
+ sal_Bool IsObjectSelect() const { return bObjectSelect; }
- inline SdrObjKind GetSdrDrawMode(/*BOOL bBuf = FALSE*/) const { return eDrawMode; }
- inline void SetSdrDrawMode( SdrObjKind eSdrObjectKind ) { eDrawMode = eSdrObjectKind; SetObjectSelect( FALSE ); }
- void StdDrawMode( SdrObjKind eSdrObjectKind, BOOL bObjSelect );
+ inline SdrObjKind GetSdrDrawMode(/*sal_Bool bBuf = sal_False*/) const { return eDrawMode; }
+ inline void SetSdrDrawMode( SdrObjKind eSdrObjectKind ) { eDrawMode = eSdrObjectKind; SetObjectSelect( sal_False ); }
+ void StdDrawMode( SdrObjKind eSdrObjectKind, sal_Bool bObjSelect );
- BOOL IsFrmAction() { return (bInsFrm); }
- inline UINT16 GetBezierMode() { return eBezierMode; }
- void SetBezierMode(UINT16 eBezMode) { eBezierMode = eBezMode; }
+ sal_Bool IsFrmAction() { return (bInsFrm); }
+ inline sal_uInt16 GetBezierMode() { return eBezierMode; }
+ void SetBezierMode(sal_uInt16 eBezMode) { eBezierMode = eBezMode; }
void EnterDrawTextMode(const Point& aDocPos); // DrawTextEditMode einschalten
- void InsFrm(USHORT nCols);
+ void InsFrm(sal_uInt16 nCols);
void StopInsFrm();
- UINT16 GetFrmColCount() const {return nInsFrmColCount;} //Spaltenzahl fuer interaktiven Rahmen
+ sal_uInt16 GetFrmColCount() const {return nInsFrmColCount;} //Spaltenzahl fuer interaktiven Rahmen
- void SetChainMode( BOOL bOn );
- BOOL IsChainMode() const { return bChainMode; }
+ void SetChainMode( sal_Bool bOn );
+ sal_Bool IsChainMode() const { return bChainMode; }
void FlushInBuffer();
- BOOL IsInputSequenceCheckingRequired( const String &rText, const SwPaM& rCrsr ) const;
+ sal_Bool IsInputSequenceCheckingRequired( const String &rText, const SwPaM& rCrsr ) const;
- static void SetReplaceQuote(BOOL bOn = TRUE) { bReplaceQuote = bOn; }
- static BOOL IsReplaceQuote() { return bReplaceQuote; }
+ static void SetReplaceQuote(sal_Bool bOn = sal_True) { bReplaceQuote = bOn; }
+ static sal_Bool IsReplaceQuote() { return bReplaceQuote; }
void SetApplyTemplate(const SwApplyTemplate &);
SwApplyTemplate* GetApplyTemplate() const { return pApplyTempl; }
void StartExecuteDrag();
void DragFinished();
- USHORT GetDropAction() const { return m_nDropAction; }
- ULONG GetDropFormat() const { return m_nDropFormat; }
+ sal_uInt16 GetDropAction() const { return m_nDropAction; }
+ sal_uLong GetDropFormat() const { return m_nDropFormat; }
Color GetTextColor() { return aTextColor; }
@@ -266,11 +266,11 @@ public:
{ return aTextBackColor; }
void SetTextBackColor(const Color& rCol )
{ aTextBackColor = rCol; }
- void SetTextBackColorTransparent(BOOL bSet)
+ void SetTextBackColorTransparent(sal_Bool bSet)
{ bTransparentBackColor = bSet; }
- BOOL IsTextBackColorTransparent()
+ sal_Bool IsTextBackColorTransparent()
{ return bTransparentBackColor; }
- void LockKeyInput(BOOL bSet){bLockInput = bSet;}
+ void LockKeyInput(sal_Bool bSet){bLockInput = bSet;}
const SwView &GetView() const { return rView; }
SwView &GetView() { return rView; }
@@ -290,7 +290,7 @@ public:
void StopQuickHelp();
// --> OD 2005-02-18 #i42921# - add parameter <bVerticalMode>
- BOOL RulerMarginDrag( const MouseEvent& rMEvt,
+ sal_Bool RulerMarginDrag( const MouseEvent& rMEvt,
const bool bVerticalMode );
// <--
diff --git a/sw/source/ui/inc/envimg.hxx b/sw/source/ui/inc/envimg.hxx
index d086b5bb8e2a..4e221ea487d4 100644
--- a/sw/source/ui/inc/envimg.hxx
+++ b/sw/source/ui/inc/envimg.hxx
@@ -75,8 +75,8 @@ public:
virtual int operator ==(const SfxPoolItem& rItem) const;
virtual SfxPoolItem* Clone(SfxItemPool* = 0) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
};
// class SwEnvCfgItem -------------------------------------------------------
diff --git a/sw/source/ui/inc/envlop.hxx b/sw/source/ui/inc/envlop.hxx
index 470edbf2661b..1deb5c788b2c 100644
--- a/sw/source/ui/inc/envlop.hxx
+++ b/sw/source/ui/inc/envlop.hxx
@@ -37,7 +37,7 @@
#include <vcl/lstbox.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include "envimg.hxx"
@@ -79,11 +79,11 @@ friend class SwEnvPreview;
SfxItemSet *pAddresseeSet;
SfxItemSet *pSenderSet;
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
virtual short Ok();
public:
- SwEnvDlg(Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, BOOL bInsert);
+ SwEnvDlg(Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert);
~SwEnvDlg();
};
@@ -128,7 +128,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet* pSet = 0);
void FillItem(SwEnvItem& rItem);
- virtual BOOL FillItemSet(SfxItemSet& rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet& rSet);
virtual void Reset(const SfxItemSet& rSet);
};
diff --git a/sw/source/ui/inc/fldedt.hxx b/sw/source/ui/inc/fldedt.hxx
index 47b85163e7a7..d41557e1636f 100644
--- a/sw/source/ui/inc/fldedt.hxx
+++ b/sw/source/ui/inc/fldedt.hxx
@@ -28,7 +28,7 @@
#ifndef _FLDEDT_HXX
#define _FLDEDT_HXX
#include <sfx2/basedlgs.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
class SwView;
class SwWrtShell;
@@ -44,7 +44,7 @@ class SwFldEditDlg : public SfxSingleTabDialog
DECL_LINK( NextPrevHdl, Button *pBt = 0 );
void Init();
- SfxTabPage* CreatePage(USHORT nGroup);
+ SfxTabPage* CreatePage(sal_uInt16 nGroup);
public:
@@ -55,7 +55,7 @@ public:
virtual short Execute();
- void EnableInsert(BOOL bEnable);
+ void EnableInsert(sal_Bool bEnable);
void InsertHdl();
};
diff --git a/sw/source/ui/inc/fldmgr.hxx b/sw/source/ui/inc/fldmgr.hxx
index da36b2ebed85..84c3be977a11 100644
--- a/sw/source/ui/inc/fldmgr.hxx
+++ b/sw/source/ui/inc/fldmgr.hxx
@@ -69,8 +69,8 @@ enum SwFldGroups
struct SwFldGroupRgn
{
- USHORT nStart;
- USHORT nEnd;
+ sal_uInt16 nStart;
+ sal_uInt16 nEnd;
};
/*--------------------------------------------------------------------
@@ -79,21 +79,21 @@ struct SwFldGroupRgn
--------------------------------------------------------------------*/
struct SwInsertFld_Data
{
- USHORT nTypeId;
- USHORT nSubType;
+ sal_uInt16 nTypeId;
+ sal_uInt16 nSubType;
const String sPar1;
const String sPar2;
- ULONG nFormatId;
+ sal_uLong nFormatId;
SwWrtShell* pSh;
sal_Unicode cSeparator;
- BOOL bIsAutomaticLanguage;
+ sal_Bool bIsAutomaticLanguage;
::com::sun::star::uno::Any aDBDataSource;
::com::sun::star::uno::Any aDBConnection;
::com::sun::star::uno::Any aDBColumn;
Window* pParent; // parent dialog used for SwWrtShell::StartInputFldDlg()
- SwInsertFld_Data(USHORT nType, USHORT nSub, const String& rPar1, const String& rPar2,
- ULONG nFmtId, SwWrtShell* pShell = NULL, sal_Unicode cSep = ' ', BOOL bIsAutoLanguage = TRUE) :
+ SwInsertFld_Data(sal_uInt16 nType, sal_uInt16 nSub, const String& rPar1, const String& rPar2,
+ sal_uLong nFmtId, SwWrtShell* pShell = NULL, sal_Unicode cSep = ' ', sal_Bool bIsAutoLanguage = sal_True) :
nTypeId(nType),
nSubType(nSub),
sPar1(rPar1),
@@ -107,7 +107,7 @@ struct SwInsertFld_Data
SwInsertFld_Data() :
pSh(0),
cSeparator(' '),
- bIsAutomaticLanguage(TRUE){}
+ bIsAutomaticLanguage(sal_True){}
};
@@ -125,10 +125,10 @@ private:
String sMacroPath;
String sMacroName;
- ULONG nCurFmt;
- BOOL bEvalExp;
+ sal_uLong nCurFmt;
+ sal_Bool bEvalExp;
- SW_DLLPRIVATE USHORT GetCurrLanguage() const;
+ SW_DLLPRIVATE sal_uInt16 GetCurrLanguage() const;
com::sun::star::uno::Reference<com::sun::star::container::XNameAccess> xDBContext;
com::sun::star::uno::Reference<com::sun::star::text::XNumberingTypeInfo> xNumberingInfo;
@@ -142,83 +142,83 @@ public:
{ pWrtShell = pShell; }
// Feld einfuegen ueber TypeId (TYP_ ...)
- BOOL InsertFld( const SwInsertFld_Data& rData );
+ sal_Bool InsertFld( const SwInsertFld_Data& rData );
// Direkt das aktuelle Feld aendern
- void UpdateCurFld(ULONG nFormat,
+ void UpdateCurFld(sal_uLong nFormat,
const String& rPar1,
const String& rPar2,
SwField * _pField = 0); // #111840#
inline const String& GetCurFldPar1() const;
inline const String& GetCurFldPar2() const;
- inline ULONG GetCurFldFmt() const;
+ inline sal_uLong GetCurFldFmt() const;
// Ein Feld ermitteln
SwField* GetCurFld();
void InsertFldType(SwFieldType& rType);
- BOOL ChooseMacro(const String &rSelMacro = aEmptyStr);
+ sal_Bool ChooseMacro(const String &rSelMacro = aEmptyStr);
void SetMacroPath(const String& rPath);
inline const String& GetMacroPath() const { return (sMacroPath); }
inline const String& GetMacroName() const { return (sMacroName); }
inline void SetMacroModule(SbModule* pMod) { pModule = pMod; }
// Vorheriger Naechster gleichen Typ
- BOOL GoNextPrev( BOOL bNext = TRUE, SwFieldType* pTyp = 0 );
- BOOL GoNext( SwFieldType* pTyp = 0 ) { return GoNextPrev( TRUE, pTyp ); }
- BOOL GoPrev( SwFieldType* pTyp = 0 ) { return GoNextPrev( FALSE, pTyp ); }
+ sal_Bool GoNextPrev( sal_Bool bNext = sal_True, SwFieldType* pTyp = 0 );
+ sal_Bool GoNext( SwFieldType* pTyp = 0 ) { return GoNextPrev( sal_True, pTyp ); }
+ sal_Bool GoPrev( SwFieldType* pTyp = 0 ) { return GoNextPrev( sal_False, pTyp ); }
// Erfragen von Werten aus Datenbankfeldern (BASIC )
// String GetDataBaseFieldValue(const String &rDBName, const String &rFieldName, SwWrtShell* pSh);
- BOOL IsDBNumeric(const String& rDBName, const String& rTblQryName,
- BOOL bIsTable, const String& rFldName);
+ sal_Bool IsDBNumeric(const String& rDBName, const String& rTblQryName,
+ sal_Bool bIsTable, const String& rFldName);
// RefMark mit Namen organisieren
- BOOL CanInsertRefMark( const String& rStr );
+ sal_Bool CanInsertRefMark( const String& rStr );
// Zugriff ueber ResId auf Feldtypen
- USHORT GetFldTypeCount(USHORT nResId = USHRT_MAX) const;
- SwFieldType* GetFldType(USHORT nResId, USHORT nId = 0) const;
- SwFieldType* GetFldType(USHORT nResId, const String& rName) const;
+ sal_uInt16 GetFldTypeCount(sal_uInt16 nResId = USHRT_MAX) const;
+ SwFieldType* GetFldType(sal_uInt16 nResId, sal_uInt16 nId = 0) const;
+ SwFieldType* GetFldType(sal_uInt16 nResId, const String& rName) const;
- void RemoveFldType(USHORT nResId, const String& rName);
+ void RemoveFldType(sal_uInt16 nResId, const String& rName);
// Zugriff ueber TypeId aus dem Dialog
// Ids fuer einen Bereich von Feldern
- const SwFldGroupRgn& GetGroupRange(BOOL bHtmlMode, USHORT nGrpId) const;
- USHORT GetGroup(BOOL bHtmlMode, USHORT nTypeId, USHORT nSubType = 0) const;
+ const SwFldGroupRgn& GetGroupRange(sal_Bool bHtmlMode, sal_uInt16 nGrpId) const;
+ sal_uInt16 GetGroup(sal_Bool bHtmlMode, sal_uInt16 nTypeId, sal_uInt16 nSubType = 0) const;
// TypeId des aktuellen Feldes
- USHORT GetCurTypeId() const;
+ sal_uInt16 GetCurTypeId() const;
// TypeId fuer einen konkrete Pos in der Liste
- static USHORT GetTypeId(USHORT nPos);
+ static sal_uInt16 GetTypeId(sal_uInt16 nPos);
// Name des Typen in der Liste der Felder
- static const String& GetTypeStr(USHORT nPos);
+ static const String& GetTypeStr(sal_uInt16 nPos);
// Pos in der Liste der Felder
- static USHORT GetPos(USHORT nTypeId);
+ static sal_uInt16 GetPos(sal_uInt16 nTypeId);
// Untertypen zu einem Typ
- BOOL GetSubTypes(USHORT nId, SvStringsDtor& rToFill);
+ sal_Bool GetSubTypes(sal_uInt16 nId, SvStringsDtor& rToFill);
// Formate zu einem Typ
- USHORT GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode = FALSE) const;
- String GetFormatStr(USHORT nTypeId, ULONG nFormatId) const;
- USHORT GetFormatId(USHORT nTypeId, ULONG nFormatId) const;
- ULONG GetDefaultFormat(USHORT nTypeId, BOOL bIsText, SvNumberFormatter* pFormatter, double* pVal = 0L);
+ sal_uInt16 GetFormatCount(sal_uInt16 nTypeId, sal_Bool bIsText, sal_Bool bHtmlMode = sal_False) const;
+ String GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const;
+ sal_uInt16 GetFormatId(sal_uInt16 nTypeId, sal_uLong nFormatId) const;
+ sal_uLong GetDefaultFormat(sal_uInt16 nTypeId, sal_Bool bIsText, SvNumberFormatter* pFormatter, double* pVal = 0L);
// Evaluierung der ExpressionFelder ausschalten fuer das Einfuegen
// vieler Expressionfelder (siehe Etiketten)
//
- inline void SetEvalExpFlds(BOOL bEval);
+ inline void SetEvalExpFlds(sal_Bool bEval);
void EvalExpFlds(SwWrtShell* pSh = NULL);
};
-inline void SwFldMgr::SetEvalExpFlds(BOOL bEval)
+inline void SwFldMgr::SetEvalExpFlds(sal_Bool bEval)
{ bEvalExp = bEval; }
inline const String& SwFldMgr::GetCurFldPar1() const
@@ -227,7 +227,7 @@ inline const String& SwFldMgr::GetCurFldPar1() const
inline const String& SwFldMgr::GetCurFldPar2() const
{ return aCurPar2; }
-inline ULONG SwFldMgr::GetCurFldFmt() const
+inline sal_uLong SwFldMgr::GetCurFldFmt() const
{ return nCurFmt; }
#endif
diff --git a/sw/source/ui/inc/fldtdlg.hxx b/sw/source/ui/inc/fldtdlg.hxx
index e8959a98e123..013002276b9c 100644
--- a/sw/source/ui/inc/fldtdlg.hxx
+++ b/sw/source/ui/inc/fldtdlg.hxx
@@ -38,16 +38,16 @@ class SwFldDlg: public SfxTabDialog
{
SwChildWinWrapper* m_pChildWin;
SfxBindings* m_pBindings;
- BOOL m_bHtmlMode;
- BOOL m_bDataBaseMode;
+ sal_Bool m_bHtmlMode;
+ sal_Bool m_bDataBaseMode;
- virtual BOOL Close();
- virtual SfxItemSet* CreateInputItemSet( USHORT nId );
+ virtual sal_Bool Close();
+ virtual SfxItemSet* CreateInputItemSet( sal_uInt16 nId );
virtual void Activate();
- virtual void PageCreated(USHORT nId, SfxTabPage& rPage);
+ virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage);
- void ReInitTabPage( USHORT nPageId,
- BOOL bOnlyActivate = FALSE );
+ void ReInitTabPage( sal_uInt16 nPageId,
+ sal_Bool bOnlyActivate = sal_False );
public:
SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent);
@@ -57,7 +57,7 @@ public:
void Initialize(SfxChildWinInfo *pInfo);
void ReInitDlg();
- void EnableInsert(BOOL bEnable);
+ void EnableInsert(sal_Bool bEnable);
void InsertHdl();
void ActivateDatabasePage();
};
diff --git a/sw/source/ui/inc/fldwrap.hxx b/sw/source/ui/inc/fldwrap.hxx
index 5dc979f9b66a..f2ed07bc3fba 100644
--- a/sw/source/ui/inc/fldwrap.hxx
+++ b/sw/source/ui/inc/fldwrap.hxx
@@ -35,13 +35,13 @@ class SwFldDlgWrapper : public SwChildWinWrapper
{
public:
AbstractSwFldDlg * pDlgInterface;
- SwFldDlgWrapper( Window* pParent, USHORT nId,
+ SwFldDlgWrapper( Window* pParent, sal_uInt16 nId,
SfxBindings* pBindings, SfxChildWinInfo* pInfo );
SFX_DECL_CHILDWINDOW(SwFldDlgWrapper);
- virtual BOOL ReInitDlg(SwDocShell *pDocSh);
- void ShowPage(USHORT nPage = 0);
+ virtual sal_Bool ReInitDlg(SwDocShell *pDocSh);
+ void ShowPage(sal_uInt16 nPage = 0);
};
/* --------------------------------------------------
@@ -52,12 +52,12 @@ class SwFldDataOnlyDlgWrapper : public SwChildWinWrapper
{
public:
AbstractSwFldDlg * pDlgInterface;
- SwFldDataOnlyDlgWrapper( Window* pParent, USHORT nId,
+ SwFldDataOnlyDlgWrapper( Window* pParent, sal_uInt16 nId,
SfxBindings* pBindings, SfxChildWinInfo* pInfo );
SFX_DECL_CHILDWINDOW(SwFldDataOnlyDlgWrapper);
- virtual BOOL ReInitDlg(SwDocShell *pDocSh);
+ virtual sal_Bool ReInitDlg(SwDocShell *pDocSh);
};
#endif
diff --git a/sw/source/ui/inc/fontcfg.hxx b/sw/source/ui/inc/fontcfg.hxx
index 554c5ccc88c4..5acd526bd16e 100644
--- a/sw/source/ui/inc/fontcfg.hxx
+++ b/sw/source/ui/inc/fontcfg.hxx
@@ -70,7 +70,7 @@ class SW_DLLPUBLIC SwStdFontConfig : public utl::ConfigItem
SW_DLLPRIVATE com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
- void ChangeString(USHORT nFontType, const String& rSet)
+ void ChangeString(sal_uInt16 nFontType, const String& rSet)
{
if(sDefaultFonts[nFontType] != rSet)
{
@@ -79,7 +79,7 @@ class SW_DLLPUBLIC SwStdFontConfig : public utl::ConfigItem
}
}
- void ChangeInt( USHORT nFontType, sal_Int32 nHeight );
+ void ChangeInt( sal_uInt16 nFontType, sal_Int32 nHeight );
public:
SwStdFontConfig();
@@ -94,8 +94,8 @@ public:
const String& GetFontCaption(sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_CAPTION + FONT_PER_GROUP * nFontGroup];}
const String& GetFontIndex (sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_INDEX + FONT_PER_GROUP * nFontGroup];}
- const String& GetFontFor(USHORT nFontType) const {return sDefaultFonts[nFontType];}
- BOOL IsFontDefault(USHORT nFontType) const;
+ const String& GetFontFor(sal_uInt16 nFontType) const {return sDefaultFonts[nFontType];}
+ sal_Bool IsFontDefault(sal_uInt16 nFontType) const;
void SetFontStandard(const String& rSet, sal_uInt8 nFontGroup)
{ChangeString(FONT_STANDARD + FONT_PER_GROUP * nFontGroup, rSet);}
@@ -114,8 +114,8 @@ public:
sal_Int32 GetFontHeight( sal_uInt8 nFont, sal_uInt8 nScriptType, LanguageType eLang );
- static String GetDefaultFor(USHORT nFontType, LanguageType eLang);
- static sal_Int32 GetDefaultHeightFor(USHORT nFontType, LanguageType eLang);
+ static String GetDefaultFor(sal_uInt16 nFontType, LanguageType eLang);
+ static sal_Int32 GetDefaultHeightFor(sal_uInt16 nFontType, LanguageType eLang);
};
#endif
diff --git a/sw/source/ui/inc/formedt.hxx b/sw/source/ui/inc/formedt.hxx
index f303f1e6f1d7..77968261799a 100644
--- a/sw/source/ui/inc/formedt.hxx
+++ b/sw/source/ui/inc/formedt.hxx
@@ -81,14 +81,14 @@ class SwIdxFormDlg : public SvxStandardDialog
SwWrtShell &rSh;
SwForm *pForm;
- USHORT nAktLevel;
- BOOL bLastLinkIsEnd;
+ sal_uInt16 nAktLevel;
+ sal_Bool bLastLinkIsEnd;
public:
SwIdxFormDlg( Window* pParent, SwWrtShell &rShell, const SwForm& rForm );
~SwIdxFormDlg();
- static BOOL IsNoNum(SwWrtShell& rSh, const String& rName);
+ static sal_Bool IsNoNum(SwWrtShell& rSh, const String& rName);
const SwForm& GetTOXForm();
};
diff --git a/sw/source/ui/inc/frmdlg.hxx b/sw/source/ui/inc/frmdlg.hxx
index d5e8b484384e..61be18818f41 100644
--- a/sw/source/ui/inc/frmdlg.hxx
+++ b/sw/source/ui/inc/frmdlg.hxx
@@ -38,23 +38,24 @@ class SwWrtShell;
--------------------------------------------------------------------*/
class SwFrmDlg : public SfxTabDialog
{
- BOOL m_bFormat;
- BOOL m_bNew;
- BOOL m_bHTMLMode;
+ sal_Bool m_bFormat;
+ sal_Bool m_bNew;
+ sal_Bool m_bHTMLMode;
+ bool m_bEnableVertPos;
const SfxItemSet& m_rSet;
- USHORT m_nDlgType;
+ sal_uInt16 m_nDlgType;
SwWrtShell* m_pWrtShell;
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
public:
SwFrmDlg( SfxViewFrame *pFrame, Window *pParent,
const SfxItemSet& rCoreSet,
- BOOL bNewFrm = TRUE,
- USHORT nResType = DLG_FRM_STD,
- BOOL bFmt = FALSE,
- UINT16 nDefPage = 0,
+ sal_Bool bNewFrm = sal_True,
+ sal_uInt16 nResType = DLG_FRM_STD,
+ sal_Bool bFmt = sal_False,
+ sal_uInt16 nDefPage = 0,
const String* pFmtStr = 0);
~SwFrmDlg();
diff --git a/sw/source/ui/inc/frmmgr.hxx b/sw/source/ui/inc/frmmgr.hxx
index de84a1ba1061..ce31fa734ab6 100644
--- a/sw/source/ui/inc/frmmgr.hxx
+++ b/sw/source/ui/inc/frmmgr.hxx
@@ -63,9 +63,12 @@ class SW_DLLPUBLIC SwFlyFrmAttrMgr
Point aAbsPos;
SwWrtShell *pOwnSh;
- BOOL bAbsPos,
+ sal_Bool bAbsPos,
bNewFrm;
- BOOL bIsInVertical;
+ sal_Bool bIsInVertical;
+ // --> OD 2009-09-01 #mongolianlayout#
+ sal_Bool bIsInVerticalL2R;
+ // <--
// interne Verrechnung fuer Umrandung
SW_DLLPRIVATE SwTwips CalcTopSpace();
@@ -76,10 +79,10 @@ class SW_DLLPUBLIC SwFlyFrmAttrMgr
SW_DLLPRIVATE void _UpdateFlyFrm(); //Nacharbeit nach Einfuegen oder Update
public:
- SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell* pSh, BYTE nType );
+ SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell* pSh, sal_uInt8 nType );
//CopyCtor fuer die Dialoge, zum Pruefen der Metrics
- SwFlyFrmAttrMgr( BOOL bNew, SwWrtShell *pSh, const SfxItemSet &rSet );
+ SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell *pSh, const SfxItemSet &rSet );
inline SwWrtShell* GetShell() { return pOwnSh; }
@@ -100,7 +103,7 @@ public:
void SetSize(const Size& rLSize);
inline const Size& GetSize() const;
- inline USHORT GetHeightPercent() const;
+ inline sal_uInt16 GetHeightPercent() const;
void SetHeightSizeType(SwFrmSize eType);
@@ -117,18 +120,18 @@ public:
void UpdateFlyFrm();
// neuen Rahmen erzeugen
- BOOL InsertFlyFrm();
+ sal_Bool InsertFlyFrm();
void InsertFlyFrm(RndStdIds eAnchorType,
const Point &rPos,
const Size &rSize,
- BOOL bAbsPos = FALSE);
+ sal_Bool bAbsPos = sal_False);
// Metriken pruefen und aendern
void ValidateMetrics(SvxSwFrameValidation& rVal,
const SwPosition* pToCharCntntPos,
- BOOL bOnlyPercentRefValue = FALSE);
+ sal_Bool bOnlyPercentRefValue = sal_False);
- void DelAttr(USHORT nId);
+ void DelAttr(sal_uInt16 nId);
// Set rausreichen
inline const SfxItemSet &GetAttrSet() const { return aSet; }
@@ -186,7 +189,7 @@ inline RndStdIds SwFlyFrmAttrMgr::GetAnchor() const
return ((SwFmtAnchor&)aSet.Get(RES_ANCHOR)).GetAnchorId();
}
-inline USHORT SwFlyFrmAttrMgr::GetHeightPercent() const
+inline sal_uInt16 SwFlyFrmAttrMgr::GetHeightPercent() const
{
return GetFrmSize().GetHeightPercent();
}
diff --git a/sw/source/ui/inc/frmpage.hxx b/sw/source/ui/inc/frmpage.hxx
index 1e82d3d75574..36ee618380ea 100644
--- a/sw/source/ui/inc/frmpage.hxx
+++ b/sw/source/ui/inc/frmpage.hxx
@@ -53,6 +53,7 @@ struct SwPosition;
class SwFrmPage: public SfxTabPage
{
// Size
+ FixedLine aSizeFL;
FixedText aWidthFT;
FixedText aWidthAutoFT;
PercentField aWidthED;
@@ -65,11 +66,10 @@ class SwFrmPage: public SfxTabPage
CheckBox aAutoHeightCB;
CheckBox aFixedRatioCB;
PushButton aRealSizeBT;
- FixedLine aSizeFL;
// Anker
- FixedLine aTypeFL;
FixedLine aTypeSepFL;
+ FixedLine aTypeFL;
RadioButton aAnchorAtPageRB;
RadioButton aAnchorAtParaRB;
RadioButton aAnchorAtCharRB;
@@ -77,6 +77,7 @@ class SwFrmPage: public SfxTabPage
RadioButton aAnchorAtFrameRB;
// Position
+ FixedLine aPositionFL;
FixedText aHorizontalFT;
ListBox aHorizontalDLB;
FixedText aAtHorzPosFT;
@@ -92,7 +93,6 @@ class SwFrmPage: public SfxTabPage
ListBox aVertRelationLB;
// OD 02.10.2003 #i18732# - check box for new option 'FollowTextFlow'
CheckBox aFollowTextFlowCB;
- FixedLine aPositionFL;
// Example
SvxSwFrameExample aExampleWN;
@@ -100,18 +100,21 @@ class SwFrmPage: public SfxTabPage
//'string provider'
SvxSwFramePosString aFramePosString;
- BOOL bAtHorzPosModified;
- BOOL bAtVertPosModified;
-
- BOOL bFormat;
- BOOL bNew;
- BOOL bNoModifyHdl;
- BOOL bVerticalChanged; //check done whether frame is in vertical environment
- BOOL bIsVerticalFrame; //current frame is in vertical environment - strings are exchanged
- BOOL bIsInRightToLeft; // current frame is in right-to-left environment - strings are exchanged
- BOOL bHtmlMode;
- USHORT nHtmlMode;
- USHORT nDlgType;
+ sal_Bool bAtHorzPosModified;
+ sal_Bool bAtVertPosModified;
+
+ sal_Bool bFormat;
+ sal_Bool bNew;
+ sal_Bool bNoModifyHdl;
+ sal_Bool bVerticalChanged; //check done whether frame is in vertical environment
+ sal_Bool bIsVerticalFrame; //current frame is in vertical environment - strings are exchanged
+ // --> OD 2009-08-31 #mongolianlayou#
+ sal_Bool bIsVerticalL2R;
+ // <--
+ sal_Bool bIsInRightToLeft; // current frame is in right-to-left environment - strings are exchanged
+ sal_Bool bHtmlMode;
+ sal_uInt16 nHtmlMode;
+ sal_uInt16 nDlgType;
Size aGrfSize;
Size aWrap;
SwTwips nUpperBorder;
@@ -131,6 +134,10 @@ class SwFrmPage: public SfxTabPage
FrmMap* pVMap;
FrmMap* pHMap;
+ bool m_bAllowVertPositioning;
+ bool m_bIsMathOLE;
+ bool m_bIsMathBaselineAlignment;
+
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet *pSet);
@@ -139,8 +146,8 @@ class SwFrmPage: public SfxTabPage
DECL_LINK( AnchorTypeHdl, RadioButton * );
DECL_LINK( PosHdl, ListBox * );
DECL_LINK( RelHdl, ListBox * );
- void InitPos(RndStdIds eId, USHORT nH, USHORT nHRel,
- USHORT nV, USHORT nVRel,
+ void InitPos(RndStdIds eId, sal_uInt16 nH, sal_uInt16 nHRel,
+ sal_uInt16 nV, sal_uInt16 nVRel,
long nX, long nY);
DECL_LINK( RealSizeHdl, Button * );
@@ -154,23 +161,23 @@ class SwFrmPage: public SfxTabPage
void UpdateExample();
DECL_LINK( ModifyHdl, Edit * );
- void Init(const SfxItemSet& rSet, BOOL bReset = FALSE);
+ void Init(const SfxItemSet& rSet, sal_Bool bReset = sal_False);
// OD 12.11.2003 #i22341# - adjustment to handle maps, that are ambigous
// in the alignment.
- USHORT FillPosLB( const FrmMap* _pMap,
- const USHORT _nAlign,
- const USHORT _nRel,
+ sal_uInt16 FillPosLB( const FrmMap* _pMap,
+ const sal_uInt16 _nAlign,
+ const sal_uInt16 _nRel,
ListBox& _rLB );
// OD 14.11.2003 #i22341# - adjustment to handle maps, that are ambigous
// in their string entries.
- ULONG FillRelLB( const FrmMap* _pMap,
- const USHORT _nLBSelPos,
- const USHORT _nAlign,
- USHORT _nRel,
+ sal_uLong FillRelLB( const FrmMap* _pMap,
+ const sal_uInt16 _nLBSelPos,
+ const sal_uInt16 _nAlign,
+ sal_uInt16 _nRel,
ListBox& _rLB,
FixedText& _rFT );
- USHORT GetMapPos( const FrmMap *pMap, ListBox &rAlignLB );
- short GetAlignment(FrmMap *pMap, USHORT nMapPos, ListBox &rAlignLB, ListBox &rRelationLB);
+ sal_uInt16 GetMapPos( const FrmMap *pMap, ListBox &rAlignLB );
+ short GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB);
short GetRelation(FrmMap *pMap, ListBox &rRelationLB);
RndStdIds GetAnchor();
@@ -185,15 +192,16 @@ class SwFrmPage: public SfxTabPage
public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
- void SetNewFrame(BOOL bNewFrame) { bNew = bNewFrame; }
- void SetFormatUsed(BOOL bFmt);
- void SetFrmType(USHORT nType) { nDlgType = nType; }
- inline BOOL IsInGraficMode( void ) { return nDlgType == DLG_FRM_GRF || nDlgType == DLG_FRM_OLE; }
+ void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; }
+ void SetFormatUsed(sal_Bool bFmt);
+ void SetFrmType(sal_uInt16 nType) { nDlgType = nType; }
+ inline sal_Bool IsInGraficMode( void ) { return nDlgType == DLG_FRM_GRF || nDlgType == DLG_FRM_OLE; }
+ void EnableVerticalPositioning( bool bEnable );
};
class SwGrfExtPage: public SfxTabPage
@@ -217,7 +225,7 @@ class SwGrfExtPage: public SfxTabPage
::sfx2::FileDialogHelper* pGrfDlg;
- BOOL bHtmlMode;
+ sal_Bool bHtmlMode;
// Handler fuer Spiegeln
DECL_LINK( MirrorHdl, CheckBox * );
@@ -234,7 +242,7 @@ public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
virtual int DeactivatePage(SfxItemSet *pSet);
};
@@ -269,12 +277,13 @@ public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
};
class SwFrmAddPage : public SfxTabPage
{
+ FixedLine aNamesFL;
FixedText aNameFT;
Edit aNameED;
FixedText aAltNameFT;
@@ -283,26 +292,25 @@ class SwFrmAddPage : public SfxTabPage
ListBox aPrevLB;
FixedText aNextFT;
ListBox aNextLB;
- FixedLine aNamesFL;
+ FixedLine aProtectFL;
CheckBox aProtectContentCB;
CheckBox aProtectFrameCB;
CheckBox aProtectSizeCB;
- FixedLine aProtectFL;
+ FixedLine aExtFL;
CheckBox aEditInReadonlyCB;
CheckBox aPrintFrameCB;
FixedText aTextFlowFT;
ListBox aTextFlowLB;
- FixedLine aExtFL;
SwWrtShell* pWrtSh;
- USHORT nDlgType;
- BOOL bHtmlMode;
- BOOL bFormat;
- BOOL bNew;
+ sal_uInt16 nDlgType;
+ sal_Bool bHtmlMode;
+ sal_Bool bFormat;
+ sal_Bool bNew;
DECL_LINK(EditModifyHdl, Edit*);
DECL_LINK(ChainModifyHdl, ListBox*);
@@ -313,14 +321,14 @@ class SwFrmAddPage : public SfxTabPage
public:
static SfxTabPage* Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
- void SetFormatUsed(BOOL bFmt);
- void SetFrmType(USHORT nType) { nDlgType = nType; }
- void SetNewFrame(BOOL bNewFrame) { bNew = bNewFrame; }
+ void SetFormatUsed(sal_Bool bFmt);
+ void SetFrmType(sal_uInt16 nType) { nDlgType = nType; }
+ void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; }
void SetShell(SwWrtShell* pSh) { pWrtSh = pSh; }
};
diff --git a/sw/source/ui/inc/glosbib.hxx b/sw/source/ui/inc/glosbib.hxx
index 8c38b3e91efd..c886ad6cea92 100644
--- a/sw/source/ui/inc/glosbib.hxx
+++ b/sw/source/ui/inc/glosbib.hxx
@@ -68,9 +68,11 @@ public:
class SwGlossaryGroupDlg : public SvxStandardDialog
{
-
+ FixedText aBibFT;
FEdit aNameED;
+ FixedText aPathFT;
ListBox aPathLB;
+ FixedText aSelectFT;
SwGlossaryGroupTLB aGroupTLB;
OKButton aOkPB;
@@ -79,9 +81,6 @@ class SwGlossaryGroupDlg : public SvxStandardDialog
PushButton aNewPB;
PushButton aDelPB;
PushButton aRenamePB;
- FixedText aBibFT;
- FixedText aPathFT;
- FixedText aSelectFT;
SvStrings* pRemovedArr;
SvStrings* pInsertedArr;
@@ -91,7 +90,7 @@ class SwGlossaryGroupDlg : public SvxStandardDialog
String sCreatedGroup;
- BOOL IsDeleteAllowed(const String &rGroup);
+ sal_Bool IsDeleteAllowed(const String &rGroup);
protected:
virtual void Apply();
diff --git a/sw/source/ui/inc/glosdoc.hxx b/sw/source/ui/inc/glosdoc.hxx
index 8a88d86fe3a6..b85e6fa74283 100644
--- a/sw/source/ui/inc/glosdoc.hxx
+++ b/sw/source/ui/inc/glosdoc.hxx
@@ -68,9 +68,9 @@ class SW_DLLPUBLIC SwGlossaries
String m_sErrPath;
SvStrings *m_pPathArr;
SvStrings *m_pGlosArr;
- BOOL m_bError;
+ sal_Bool m_bError;
- SW_DLLPRIVATE SwTextBlocks* GetGlosDoc(const String &rName, BOOL bCreate = TRUE) const;
+ SW_DLLPRIVATE SwTextBlocks* GetGlosDoc(const String &rName, sal_Bool bCreate = sal_True) const;
SW_DLLPRIVATE SvStrings *GetNameList();
// implementation in unoatxt.cxx
@@ -119,14 +119,14 @@ public:
bool _bCreate = false
);
- USHORT GetGroupCnt();
- String GetGroupName(USHORT );
+ sal_uInt16 GetGroupCnt();
+ String GetGroupName(sal_uInt16 );
String GetGroupTitle( const String& rGroupName );
- BOOL FindGroupName(String & rGroup);
+ sal_Bool FindGroupName(String & rGroup);
SwTextBlocks* GetGroupDoc(const String &rName,
- BOOL bCreate = FALSE) const;
+ sal_Bool bCreate = sal_False) const;
SwTextBlocks* GetDefGroupDoc() const {return GetGroupDoc(GetDefName());}
void PutGroupDoc(SwTextBlocks *pBlock);
static String GetDefName();
@@ -134,14 +134,14 @@ public:
String GetCompleteGroupName( const ::rtl::OUString& GroupName );
- BOOL NewGroupDoc(String &rGroupName, const String& rTitle);
- BOOL RenameGroupDoc(const String& sOldGroup, String& sNewGroup, const String& rNewTitle);
- BOOL DelGroupDoc(const String &);
- SwDocShellRef EditGroupDoc(const String &rGrpName, const String& rShortName, BOOL bShow = TRUE );
+ sal_Bool NewGroupDoc(String &rGroupName, const String& rTitle);
+ sal_Bool RenameGroupDoc(const String& sOldGroup, String& sNewGroup, const String& rNewTitle);
+ sal_Bool DelGroupDoc(const String &);
+ SwDocShellRef EditGroupDoc(const String &rGrpName, const String& rShortName, sal_Bool bShow = sal_True );
void SaveGroupDoc(const String &rGrpName, const String& rLongName );
- void UpdateGlosPath(BOOL bFull);
+ void UpdateGlosPath(sal_Bool bFull);
void ShowError();
- inline ULONG IsGlosPathErr() { return m_bError; }
+ inline sal_uLong IsGlosPathErr() { return m_bError; }
const SvStrings* GetPathArray() const {return m_pPathArr;}
};
diff --git a/sw/source/ui/inc/gloshdl.hxx b/sw/source/ui/inc/gloshdl.hxx
index 7e5d9fbfd619..365e56c4afd6 100644
--- a/sw/source/ui/inc/gloshdl.hxx
+++ b/sw/source/ui/inc/gloshdl.hxx
@@ -51,42 +51,42 @@ class SW_DLLPUBLIC SwGlossaryHdl
const SvxMacro *pStart,
const SvxMacro *pEnd);
- SW_DLLPRIVATE BOOL Expand( const String& rShortName,
+ SW_DLLPRIVATE sal_Bool Expand( const String& rShortName,
SwGlossaries* pGlossaries,
SwTextBlocks *pGlossary );
public:
- BOOL ConvertToNew(SwTextBlocks& rOld);
+ sal_Bool ConvertToNew(SwTextBlocks& rOld);
void GlossaryDlg();
- USHORT GetGroupCnt() const;
- String GetGroupName( USHORT, String* pTitle = 0 );
- BOOL NewGroup(String & rGroupName, const String& rTitle);
- BOOL DelGroup(const String &);
- BOOL RenameGroup(const String & rOld, String& rNew, const String& rNewTitle);
- void SetCurGroup(const String &aGrp, BOOL bApi = FALSE, BOOL bAlwaysCreateNew = FALSE);
+ sal_uInt16 GetGroupCnt() const;
+ String GetGroupName( sal_uInt16, String* pTitle = 0 );
+ sal_Bool NewGroup(String & rGroupName, const String& rTitle);
+ sal_Bool DelGroup(const String &);
+ sal_Bool RenameGroup(const String & rOld, String& rNew, const String& rNewTitle);
+ void SetCurGroup(const String &aGrp, sal_Bool bApi = sal_False, sal_Bool bAlwaysCreateNew = sal_False);
const String &GetCurGroup() const { return aCurGrp; }
- USHORT GetGlossaryCnt();
- String GetGlossaryName(USHORT);
+ sal_uInt16 GetGlossaryCnt();
+ String GetGlossaryName(sal_uInt16);
String GetGlossaryShortName(const String &rName);
- String GetGlossaryShortName(USHORT);
+ String GetGlossaryShortName(sal_uInt16);
- BOOL Rename( const String& rOldShortName, const String& rNewShortName,
+ sal_Bool Rename( const String& rOldShortName, const String& rNewShortName,
const String& rNewName);
- BOOL CopyOrMove( const String& rSourceGroupName, String& rSourceShortName,
- const String& rDestGroupName, const String& rLongName, BOOL bMove );
- BOOL HasShortName(const String &rShortName) const;
+ sal_Bool CopyOrMove( const String& rSourceGroupName, String& rSourceShortName,
+ const String& rDestGroupName, const String& rLongName, sal_Bool bMove );
+ sal_Bool HasShortName(const String &rShortName) const;
//wird NewGlossary vom Basic gerufen, dann soll dir zuvor eingestellte
//Gruppe ggf. neu erstellt werden
- BOOL NewGlossary(const String &rName, const String &rShortName,
- BOOL bApiCall = FALSE, BOOL bNoAttr = FALSE );
- BOOL DelGlossary(const String&);
- BOOL CopyToClipboard(SwWrtShell& rSh, const String& rShortName);
+ sal_Bool NewGlossary(const String &rName, const String &rShortName,
+ sal_Bool bApiCall = sal_False, sal_Bool bNoAttr = sal_False );
+ sal_Bool DelGlossary(const String&);
+ sal_Bool CopyToClipboard(SwWrtShell& rSh, const String& rShortName);
- BOOL ExpandGlossary();
- BOOL InsertGlossary(const String &rName);
+ sal_Bool ExpandGlossary();
+ sal_Bool InsertGlossary(const String &rName);
void SetMacros(const String& rName,
const SvxMacro* pStart,
@@ -97,12 +97,12 @@ public:
SvxMacro& rEnd,
SwTextBlocks* pGlossary = 0 );
- BOOL IsReadOnly( const String* = 0 ) const;
- BOOL IsOld() const;
+ sal_Bool IsReadOnly( const String* = 0 ) const;
+ sal_Bool IsOld() const;
- BOOL FindGroupName(String & rGroup); // Gruppe ohne Pfadindex finden
+ sal_Bool FindGroupName(String & rGroup); // Gruppe ohne Pfadindex finden
- BOOL ImportGlossaries( const String& rName );
+ sal_Bool ImportGlossaries( const String& rName );
SwGlossaryHdl(SfxViewFrame* pViewFrame, SwWrtShell *);
~SwGlossaryHdl();
diff --git a/sw/source/ui/inc/gloslst.hxx b/sw/source/ui/inc/gloslst.hxx
index dc50675b0ca5..1ce560ecceca 100644
--- a/sw/source/ui/inc/gloslst.hxx
+++ b/sw/source/ui/inc/gloslst.hxx
@@ -40,7 +40,7 @@ class SvStringsISortDtor;
struct AutoTextGroup
{
- USHORT nCount;
+ sal_uInt16 nCount;
String sName;
String sTitle;
String sLongNames; // durch 0x0A getrennte Langnamen
@@ -56,7 +56,7 @@ class SwGlossaryList : public AutoTimer
{
AutoTextGroups aGroupArr;
String sPath;
- BOOL bFilled;
+ sal_Bool bFilled;
AutoTextGroup* FindGroup(const String& rGroupName);
void FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGloss);
@@ -65,14 +65,14 @@ public:
SwGlossaryList();
~SwGlossaryList();
- BOOL HasLongName(const String& rBegin, SvStringsISortDtor* pLongNames );
- BOOL GetShortName(const String& rLongName,
+ sal_Bool HasLongName(const String& rBegin, SvStringsISortDtor* pLongNames );
+ sal_Bool GetShortName(const String& rLongName,
String& rShortName, String& rGroupName );
- USHORT GetGroupCount();
- String GetGroupName(USHORT nPos, BOOL bNoPath = TRUE, String* pTitle = 0);
- USHORT GetBlockCount(USHORT nGroup);
- String GetBlockName(USHORT nGroup, USHORT nBlock, String& rShortName);
+ sal_uInt16 GetGroupCount();
+ String GetGroupName(sal_uInt16 nPos, sal_Bool bNoPath = sal_True, String* pTitle = 0);
+ sal_uInt16 GetBlockCount(sal_uInt16 nGroup);
+ String GetBlockName(sal_uInt16 nGroup, sal_uInt16 nBlock, String& rShortName);
void Update();
diff --git a/sw/source/ui/inc/glossary.hxx b/sw/source/ui/inc/glossary.hxx
index 088fbe52e8d7..3f499a8c0def 100644
--- a/sw/source/ui/inc/glossary.hxx
+++ b/sw/source/ui/inc/glossary.hxx
@@ -72,12 +72,12 @@ class SwGlTreeListBox : public SvTreeListBox
virtual sal_Bool NotifyMoving( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos
+ sal_uLong& rNewChildPos
);
virtual sal_Bool NotifyCopying( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos);
+ sal_uLong& rNewChildPos);
public:
SwGlTreeListBox(Window* pParent, const ResId& rResId);
@@ -121,7 +121,7 @@ class SwGlossaryDlg : public SvxStandardDialog
String sResumeGroup;
String sResumeShortName;
- BOOL bResume;
+ sal_Bool bResume;
const sal_Bool bSelection : 1;
@@ -152,11 +152,11 @@ class SwGlossaryDlg : public SvxStandardDialog
void ShowAutoText(const String& rGroup, const String& rShortName);
void ResumeShowAutoText();
- BOOL GetResumeData(String& rGroup, String& rShortName)
+ sal_Bool GetResumeData(String& rGroup, String& rShortName)
{rGroup = sResumeGroup; rShortName = sResumeShortName; return bResume;}
void SetResumeData(const String& rGroup, const String& rShortName)
- {sResumeGroup = rGroup; sResumeShortName = rShortName; bResume = TRUE;}
- void ResetResumeData() {bResume = FALSE;}
+ {sResumeGroup = rGroup; sResumeShortName = rShortName; bResume = sal_True;}
+ void ResetResumeData() {bResume = sal_False;}
public:
SwGlossaryDlg(SfxViewFrame* pViewFrame, SwGlossaryHdl* pGlosHdl, SwWrtShell *pWrtShell);
~SwGlossaryDlg();
diff --git a/sw/source/ui/inc/glshell.hxx b/sw/source/ui/inc/glshell.hxx
index be8cd87ad1ba..2c073f8b3e07 100644
--- a/sw/source/ui/inc/glshell.hxx
+++ b/sw/source/ui/inc/glshell.hxx
@@ -39,7 +39,7 @@ class SwGlosDocShell : public SwDocShell
using SotObject::GetInterface;
protected:
- virtual BOOL Save();
+ virtual sal_Bool Save();
public:
@@ -70,7 +70,7 @@ class SwWebGlosDocShell : public SwWebDocShell
using SotObject::GetInterface;
protected:
- virtual BOOL Save();
+ virtual sal_Bool Save();
public:
diff --git a/sw/source/ui/inc/initui.hxx b/sw/source/ui/inc/initui.hxx
index 2bb8665d9712..897f1773d318 100644
--- a/sw/source/ui/inc/initui.hxx
+++ b/sw/source/ui/inc/initui.hxx
@@ -68,7 +68,7 @@ SW_DLLPUBLIC SwGlossaries* GetGlossaries();
class SwGlossaryList;
-BOOL HasGlossaryList();
+sal_Bool HasGlossaryList();
SwGlossaryList* GetGlossaryList();
extern void _InitUI();
diff --git a/sw/source/ui/inc/inpdlg.hxx b/sw/source/ui/inc/inpdlg.hxx
index 35aa82ed6c17..b57a59bb0228 100644
--- a/sw/source/ui/inc/inpdlg.hxx
+++ b/sw/source/ui/inc/inpdlg.hxx
@@ -67,7 +67,7 @@ class SwFldInputDlg: public SvxStandardDialog
DECL_LINK(NextHdl, PushButton*);
public:
SwFldInputDlg( Window *pParent, SwWrtShell &rSh,
- SwField* pField, BOOL bNextButton = FALSE );
+ SwField* pField, sal_Bool bNextButton = sal_False );
~SwFldInputDlg();
};
diff --git a/sw/source/ui/inc/inputwin.hxx b/sw/source/ui/inc/inputwin.hxx
index 72750bb7d251..1c0e7dc6fc4b 100644
--- a/sw/source/ui/inc/inputwin.hxx
+++ b/sw/source/ui/inc/inputwin.hxx
@@ -28,11 +28,11 @@
#ifndef SW_INPUTWIN_HXX
#define SW_INPUTWIN_HXX
-
+#include <vcl/edit.hxx>
#include <vcl/menu.hxx>
-#include <sfx2/childwin.hxx>
#include <vcl/toolbox.hxx>
-#include <vcl/edit.hxx>
+
+#include <sfx2/childwin.hxx>
class SwFldMgr;
class SwWrtShell;
@@ -67,16 +67,17 @@ friend class InputEdit;
SwView* pView;
SfxBindings* pBindings;
String aAktTableName, sOldFml;
- USHORT nActionCnt;
+ sal_Int32 m_nActionCount;
- BOOL bFirst : 1; //Initialisierungen beim ersten Aufruf
- BOOL bActive : 1; //fuer Hide/Show beim Dokumentwechsel
- BOOL bIsTable : 1;
- BOOL bDelSel : 1;
- BOOL bDoesUndo : 1;
- BOOL bResetUndo : 1;
- BOOL bCallUndo : 1;
+ sal_Bool bFirst : 1; //Initialisierungen beim ersten Aufruf
+ sal_Bool bActive : 1; //fuer Hide/Show beim Dokumentwechsel
+ sal_Bool bIsTable : 1;
+ sal_Bool bDelSel : 1;
+ bool m_bDoesUndo : 1;
+ bool m_bResetUndo : 1;
+ bool m_bCallUndo : 1;
+ void CleanupUglyHackWithUndo();
void DelBoxCntnt();
DECL_LINK( ModifyHdl, InputEdit* );
@@ -101,26 +102,26 @@ public:
void ShowWin();
- BOOL IsActive(){ return bActive; };
+ sal_Bool IsActive(){ return bActive; };
DECL_LINK( SelTblCellsNotify, SwWrtShell * );
- void SetFormula( const String& rFormula, BOOL bDelSel = TRUE );
+ void SetFormula( const String& rFormula, sal_Bool bDelSel = sal_True );
const SwView* GetView() const{return pView;}
};
class SwInputChild : public SfxChildWindow
{
- BOOL bObjVis;
+ sal_Bool bObjVis;
SfxDispatcher* pDispatch;
public:
SwInputChild( Window* ,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings*,
SfxChildWinInfo* );
~SwInputChild();
SFX_DECL_CHILDWINDOW( SwInputChild );
- void SetFormula( const String& rFormula, BOOL bDelSel = TRUE )
+ void SetFormula( const String& rFormula, sal_Bool bDelSel = sal_True )
{ ((SwInputWindow*)pWindow)->SetFormula(
rFormula, bDelSel ); }
const SwView* GetView() const{return ((SwInputWindow*)pWindow)->GetView();}
diff --git a/sw/source/ui/inc/insfnote.hxx b/sw/source/ui/inc/insfnote.hxx
index 3e16d9f75840..8e01cbc3b78e 100644
--- a/sw/source/ui/inc/insfnote.hxx
+++ b/sw/source/ui/inc/insfnote.hxx
@@ -45,18 +45,18 @@ class SwInsFootNoteDlg: public SvxStandardDialog
String aFontName;
CharSet eCharSet;
char cExtChar;
- BOOL bExtCharAvailable;
- BOOL bEdit;
+ sal_Bool bExtCharAvailable;
+ sal_Bool bEdit;
+ FixedLine aNumberFL;
RadioButton aNumberAutoBtn;
RadioButton aNumberCharBtn;
Edit aNumberCharEdit;
PushButton aNumberExtChar;
- FixedLine aNumberFL;
//Alles fuer die Auswahl Fussnote/Endnote
+ FixedLine aTypeFL;
RadioButton aFtnBtn;
RadioButton aEndNoteBtn;
- FixedLine aTypeFL;
OKButton aOkBtn;
CancelButton aCancelBtn;
@@ -75,13 +75,13 @@ class SwInsFootNoteDlg: public SvxStandardDialog
void Init();
public:
- SwInsFootNoteDlg(Window * pParent, SwWrtShell &rSh, BOOL bEd = FALSE);
+ SwInsFootNoteDlg(Window * pParent, SwWrtShell &rSh, sal_Bool bEd = sal_False);
~SwInsFootNoteDlg();
CharSet GetCharSet() { return eCharSet; }
- BOOL IsExtCharAvailable() { return bExtCharAvailable; }
+ sal_Bool IsExtCharAvailable() { return bExtCharAvailable; }
String GetFontName() { return aFontName; }
- BOOL IsEndNote() { return aEndNoteBtn.IsChecked(); }
+ sal_Bool IsEndNote() { return aEndNoteBtn.IsChecked(); }
String GetStr()
{
if ( aNumberCharBtn.IsChecked() )
diff --git a/sw/source/ui/inc/insrule.hxx b/sw/source/ui/inc/insrule.hxx
index e3a8473934a0..385fdaa1cade 100644
--- a/sw/source/ui/inc/insrule.hxx
+++ b/sw/source/ui/inc/insrule.hxx
@@ -42,7 +42,7 @@ class SwInsertGrfRulerDlg : public SfxModalDialog
List aGrfNames;
String sSimple;
String sRulers;
- USHORT nSelPos;
+ sal_uInt16 nSelPos;
SwRulerValueSet* pExampleVS;
@@ -55,8 +55,8 @@ public:
~SwInsertGrfRulerDlg();
String GetGraphicName();
- BOOL IsSimpleLine() {return nSelPos == 1;}
- BOOL HasImages() const {return 0 != aGrfNames.Count();}
+ sal_Bool IsSimpleLine() {return nSelPos == 1;}
+ sal_Bool HasImages() const {return 0 != aGrfNames.Count();}
};
#endif
diff --git a/sw/source/ui/inc/instable.hxx b/sw/source/ui/inc/instable.hxx
index a65320e294a6..9f222c918176 100644
--- a/sw/source/ui/inc/instable.hxx
+++ b/sw/source/ui/inc/instable.hxx
@@ -85,7 +85,7 @@ public:
SwInsTableDlg( SwView& rView );
~SwInsTableDlg();
- void GetValues( String& rName, USHORT& rRow, USHORT& rCol,
+ void GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol,
SwInsertTableOptions& rInsTblOpts, String& rTableAutoFmtName,
SwTableAutoFmt *& prTAFmt );
};
diff --git a/sw/source/ui/inc/javaedit.hxx b/sw/source/ui/inc/javaedit.hxx
index b1529ba85afd..767d05a7028c 100644
--- a/sw/source/ui/inc/javaedit.hxx
+++ b/sw/source/ui/inc/javaedit.hxx
@@ -38,7 +38,7 @@
#include <vcl/button.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
class SwWrtShell;
class SwFldMgr;
@@ -69,8 +69,8 @@ private:
String aText;
String aType;
- BOOL bNew;
- BOOL bIsUrl;
+ sal_Bool bNew;
+ sal_Bool bIsUrl;
SwScriptField* pFld;
SwFldMgr* pMgr;
@@ -101,9 +101,9 @@ public:
String GetType() { return aType; }
- BOOL IsUrl() { return bIsUrl; }
- BOOL IsNew() { return bNew; }
- BOOL IsUpdate();
+ sal_Bool IsUrl() { return bIsUrl; }
+ sal_Bool IsNew() { return bNew; }
+ sal_Bool IsUpdate();
};
diff --git a/sw/source/ui/inc/label.hxx b/sw/source/ui/inc/label.hxx
index 20791d16c43a..8a23e1e845ce 100644
--- a/sw/source/ui/inc/label.hxx
+++ b/sw/source/ui/inc/label.hxx
@@ -57,17 +57,17 @@ class SwLabDlg : public SfxTabDialog
String sBusinessCardDlg;
String sFormat;
String sMedium;
- BOOL m_bLabel;
+ sal_Bool m_bLabel;
void _ReplaceGroup( const String &rMake );
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
public:
SwLabDlg( Window* pParent, const SfxItemSet& rSet,
- SwNewDBMgr* pNewDBMgr, BOOL bLabel);
+ SwNewDBMgr* pNewDBMgr, sal_Bool bLabel);
~SwLabDlg();
- SwLabRec* GetRecord(const String &rRecName, BOOL bCont);
+ SwLabRec* GetRecord(const String &rRecName, sal_Bool bCont);
void GetLabItem(SwLabItem &rItem);
SwLabRecs &Recs() { return *pRecs; }
diff --git a/sw/source/ui/inc/langhelper.hxx b/sw/source/ui/inc/langhelper.hxx
index c798a34c7b93..90a8503cea6f 100644
--- a/sw/source/ui/inc/langhelper.hxx
+++ b/sw/source/ui/inc/langhelper.hxx
@@ -38,7 +38,7 @@ struct ESelection;
namespace SwLangHelper
{
- extern USHORT GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet );
+ extern sal_uInt16 GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet );
extern bool SetLanguageStatus( OutlinerView* pOLV, SfxRequest &rReq, SwView &rView, SwWrtShell &rSh );
extern void SetLanguage( SwWrtShell &rWrtSh, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet );
@@ -59,10 +59,10 @@ namespace SwLangHelper
extern String GetTextForLanguageGuessing( EditEngine* rEditEngine, ESelection aDocSelection );
extern String GetTextForLanguageGuessing( SwWrtShell &rSh );
- extern LanguageType GetLanguage( SfxItemSet aSet, USHORT nLangWhichId );
- extern LanguageType GetLanguage( SwWrtShell &rSh, USHORT nLangWhichId );
+ extern LanguageType GetLanguage( SfxItemSet aSet, sal_uInt16 nLangWhichId );
+ extern LanguageType GetLanguage( SwWrtShell &rSh, sal_uInt16 nLangWhichId );
- extern LanguageType GetCurrentLanguage( SfxItemSet aSet, USHORT nScriptType );
+ extern LanguageType GetCurrentLanguage( SfxItemSet aSet, sal_uInt16 nScriptType );
extern LanguageType GetCurrentLanguage( SwWrtShell &rSh );
}
diff --git a/sw/source/ui/inc/linenum.hxx b/sw/source/ui/inc/linenum.hxx
index e8a7c800aa93..a91490634e73 100644
--- a/sw/source/ui/inc/linenum.hxx
+++ b/sw/source/ui/inc/linenum.hxx
@@ -63,6 +63,7 @@ public:
class SwLineNumberingPage : public SfxTabPage
{
CheckBox aNumberingOnCB;
+ FixedLine aDisplayFL;
FixedText aCharStyleFT;
ListBox aCharStyleLB;
FixedText aFormatFT;
@@ -74,17 +75,16 @@ class SwLineNumberingPage : public SfxTabPage
FixedText aNumIntervalFT;
NumericField aNumIntervalNF;
FixedText aNumRowsFT;
- FixedLine aDisplayFL;
+ FixedLine aDivisorFL;
FixedText aDivisorFT;
Edit aDivisorED;
FixedText aDivIntervalFT;
NumericField aDivIntervalNF;
FixedText aDivRowsFT;
- FixedLine aDivisorFL;
+ FixedLine aCountFL;
CheckBox aCountEmptyLinesCB;
CheckBox aCountFrameLinesCB;
CheckBox aRestartEachPageCB;
- FixedLine aCountFL;
SwWrtShell* pSh;
@@ -98,7 +98,7 @@ public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
diff --git a/sw/source/ui/inc/macassgn.hxx b/sw/source/ui/inc/macassgn.hxx
index 304b760d5d54..291129d20ada 100644
--- a/sw/source/ui/inc/macassgn.hxx
+++ b/sw/source/ui/inc/macassgn.hxx
@@ -47,7 +47,7 @@ class SwMacroAssignDlg
{
public:
static SfxEventNamesItem AddEvents( DlgEventType eType );
- static BOOL INetFmtDlg( Window* pParent, SwWrtShell& rSh,
+ static sal_Bool INetFmtDlg( Window* pParent, SwWrtShell& rSh,
SvxMacroItem*& rpINetItem );
};
diff --git a/sw/source/ui/inc/mailconfigpage.hxx b/sw/source/ui/inc/mailconfigpage.hxx
index 9f2929771891..4c01efb74a90 100644
--- a/sw/source/ui/inc/mailconfigpage.hxx
+++ b/sw/source/ui/inc/mailconfigpage.hxx
@@ -81,7 +81,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
diff --git a/sw/source/ui/inc/mailmergechildwindow.hxx b/sw/source/ui/inc/mailmergechildwindow.hxx
index afa4af930ce4..a02ca949180c 100644
--- a/sw/source/ui/inc/mailmergechildwindow.hxx
+++ b/sw/source/ui/inc/mailmergechildwindow.hxx
@@ -51,7 +51,7 @@ class SwMailMergeChildWindow : public SfxChildWindow
{
public:
SwMailMergeChildWindow( Window* ,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings*,
SfxChildWinInfo* );
diff --git a/sw/source/ui/inc/mailmrge.hxx b/sw/source/ui/inc/mailmrge.hxx
index 810f98adf492..359027244a3e 100644
--- a/sw/source/ui/inc/mailmrge.hxx
+++ b/sw/source/ui/inc/mailmrge.hxx
@@ -117,7 +117,7 @@ class SwMailMergeDlg : public SvxStandardDialog
const String& rDBName;
const String& rTableName;
- USHORT nMergeType;
+ sal_uInt16 nMergeType;
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > m_aSelection;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame;
@@ -146,7 +146,7 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >* pSelection = 0);
~SwMailMergeDlg();
- inline USHORT GetMergeType() { return nMergeType; }
+ inline sal_uInt16 GetMergeType() { return nMergeType; }
const ::rtl::OUString& GetSaveFilter() const {return m_sSaveFilter;}
inline const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const { return m_aSelection; }
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const;
@@ -166,7 +166,7 @@ public:
SwMailMergeCreateFromDlg(Window* pParent);
~SwMailMergeCreateFromDlg();
- BOOL IsThisDocument() const {return aThisDocRB.IsChecked();}
+ sal_Bool IsThisDocument() const {return aThisDocRB.IsChecked();}
};
class SwMailMergeFieldConnectionsDlg : public ModalDialog
@@ -184,7 +184,7 @@ public:
SwMailMergeFieldConnectionsDlg(Window* pParent);
~SwMailMergeFieldConnectionsDlg();
- BOOL IsUseExistingConnections() const {return aUseExistingRB.IsChecked();}
+ sal_Bool IsUseExistingConnections() const {return aUseExistingRB.IsChecked();}
};
#endif
diff --git a/sw/source/ui/inc/mergetbl.hxx b/sw/source/ui/inc/mergetbl.hxx
index fb37057c40ec..8923a2a1c2f3 100644
--- a/sw/source/ui/inc/mergetbl.hxx
+++ b/sw/source/ui/inc/mergetbl.hxx
@@ -43,12 +43,12 @@ class SwMergeTblDlg : public SvxStandardDialog
RadioButton aMergePrevRB;
RadioButton aMergeNextRB;
- BOOL& rMergePrev;
+ sal_Bool& rMergePrev;
protected:
virtual void Apply();
public:
- SwMergeTblDlg( Window *pParent, BOOL& rWithPrev );
+ SwMergeTblDlg( Window *pParent, sal_Bool& rWithPrev );
};
#endif
diff --git a/sw/source/ui/inc/mmconfigitem.hxx b/sw/source/ui/inc/mmconfigitem.hxx
index 9fa90ea19c34..4ac5eab0da00 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 e7519740509c..e3f182b9583c 100644
--- a/sw/source/ui/inc/multmrk.hxx
+++ b/sw/source/ui/inc/multmrk.hxx
@@ -55,7 +55,7 @@ class SwMultiTOXMarkDlg : public SvxStandardDialog
CancelButton aCancelBT;
SwTOXMgr &rMgr;
- USHORT nPos;
+ sal_uInt16 nPos;
void Apply();
public:
diff --git a/sw/source/ui/inc/navicont.hxx b/sw/source/ui/inc/navicont.hxx
index 94e833d41dc7..db5208049990 100644
--- a/sw/source/ui/inc/navicont.hxx
+++ b/sw/source/ui/inc/navicont.hxx
@@ -44,19 +44,19 @@ class NaviContentBookmark
String aUrl; // URL inkl. Sprungmarke
String aDescr; // Description
long nDocSh; // Adresse der DocShell
- USHORT nDefDrag; // Description enthaelt defaultDragType
+ sal_uInt16 nDefDrag; // Description enthaelt defaultDragType
public:
NaviContentBookmark();
NaviContentBookmark( const String &rUrl, const String& rDesc,
- USHORT nDragType, const SwDocShell* );
+ sal_uInt16 nDragType, const SwDocShell* );
const String& GetURL() const { return aUrl; }
const String& GetDescription() const { return aDescr; }
- USHORT GetDefaultDragType() const { return nDefDrag; }
+ sal_uInt16 GetDefaultDragType() const { return nDefDrag; }
long GetDocShell() const { return nDocSh; }
void Copy( TransferDataContainer& rData ) const;
- BOOL Paste( TransferableDataHelper& rData );
+ sal_Bool Paste( TransferableDataHelper& rData );
};
#endif
diff --git a/sw/source/ui/inc/navipi.hxx b/sw/source/ui/inc/navipi.hxx
index 91e16972596b..f5ef00cff8a4 100644
--- a/sw/source/ui/inc/navipi.hxx
+++ b/sw/source/ui/inc/navipi.hxx
@@ -94,19 +94,19 @@ class SwNavigationPI : public Window,
long nDocLBIniHeight;
long nWishWidth;
- USHORT nAutoMarkIdx;
- USHORT nRegionMode; // 0 - URL, 1 - Bereich mit Link 2 - B. ohne Link
+ sal_uInt16 nAutoMarkIdx;
+ sal_uInt16 nRegionMode; // 0 - URL, 1 - Bereich mit Link 2 - B. ohne Link
short nZoomIn;
short nZoomOutInit;
short nZoomOut;
- BOOL bSmallMode : 1;
- BOOL bIsZoomedIn : 1;
- BOOL bPageCtrlsVisible : 1;
- BOOL bGlobalMode : 1;
+ sal_Bool bSmallMode : 1;
+ sal_Bool bIsZoomedIn : 1;
+ sal_Bool bPageCtrlsVisible : 1;
+ sal_Bool bGlobalMode : 1;
// --------- methods -----------------------------
- BOOL _IsZoomedIn() const {return bIsZoomedIn;}
+ sal_Bool _IsZoomedIn() const {return bIsZoomedIn;}
void _ZoomOut();
void _ZoomIn();
@@ -138,7 +138,7 @@ class SwNavigationPI : public Window,
protected:
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual void Resize();
virtual void DataChanged( const DataChangedEvent& rDCEvt );
@@ -147,8 +147,8 @@ protected:
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
NumEditAction& GetPageEdit();
- BOOL ToggleTree();
- void SetGlobalMode(BOOL bSet) {bGlobalMode = bSet;}
+ sal_Bool ToggleTree();
+ void SetGlobalMode(sal_Bool bSet) {bGlobalMode = bSet;}
public:
@@ -159,32 +159,32 @@ public:
void Update() { FillBox(); }
void UpdateListBox();
- void MoveOutline(USHORT nSource, USHORT nTarget, BOOL bWithCilds);
+ void MoveOutline(sal_uInt16 nSource, sal_uInt16 nTarget, sal_Bool bWithCilds);
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
static String CreateDropFileName( TransferableDataHelper& rData );
static void CleanEntry( String& rEntry );
- USHORT GetRegionDropMode() const {return nRegionMode;}
- void SetRegionDropMode(USHORT nNewMode);
+ sal_uInt16 GetRegionDropMode() const {return nRegionMode;}
+ void SetRegionDropMode(sal_uInt16 nNewMode);
sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
- BOOL IsGlobalDoc() const;
- BOOL IsGlobalMode() const {return bGlobalMode;}
+ sal_Bool IsGlobalDoc() const;
+ sal_Bool IsGlobalMode() const {return bGlobalMode;}
SwView* GetCreateView() const;
- void CreateNavigationTool(const Rectangle& rRect, BOOL bSetFocus);
+ void CreateNavigationTool(const Rectangle& rRect, sal_Bool bSetFocus);
};
class SwNavigationChild : public SfxChildWindowContext
{
public:
SwNavigationChild( Window* ,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings*,
SfxChildWinInfo* );
diff --git a/sw/source/ui/inc/navmgr.hxx b/sw/source/ui/inc/navmgr.hxx
index b2d35ae07eee..2a86172e6c1b 100644
--- a/sw/source/ui/inc/navmgr.hxx
+++ b/sw/source/ui/inc/navmgr.hxx
@@ -60,9 +60,9 @@ public:
/* Constructor that initializes the shell to the current shell */
SwNavigationMgr( SwWrtShell* pShell );
/* Can we go back in the history ? */
- BOOL backEnabled() ;
+ sal_Bool backEnabled() ;
/* Can we go forward in the history ? */
- BOOL forwardEnabled();
+ sal_Bool forwardEnabled();
/* The method that is called when we click the back button */
void goBack() ;
/* The method that is called when we click the forward button */
diff --git a/sw/source/ui/inc/num.hxx b/sw/source/ui/inc/num.hxx
index 290878bac53b..32cab6675abd 100644
--- a/sw/source/ui/inc/num.hxx
+++ b/sw/source/ui/inc/num.hxx
@@ -48,7 +48,7 @@ class SwOutlineTabDialog;
struct SwBmpItemInfo
{
SvxBrushItem* pBrushItem;
- USHORT nItemId;
+ sal_uInt16 nItemId;
};
#define NUM_PAGETYPE_BULLET 0
@@ -59,12 +59,12 @@ struct SwBmpItemInfo
class SwNumPositionTabPage : public SfxTabPage
{
- FixedLine aPositionFL;
- FixedLine aLevelFL;
+ FixedLine aLevelFL;
MultiListBox aLevelLB;
// former set of controls shown for numbering rules containing list level
// attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION
+ FixedLine aPositionFL;
FixedText aDistBorderFT;
MetricField aDistBorderMF;
CheckBox aRelativeCB;
@@ -97,11 +97,11 @@ class SwNumPositionTabPage : public SfxTabPage
SwWrtShell* pWrtSh;
SwOutlineTabDialog* pOutlineDlg;
- USHORT nActNumLvl;
+ sal_uInt16 nActNumLvl;
- BOOL bModified : 1;
- BOOL bPreset : 1;
- BOOL bInInintControl : 1; //Modify-Fehler umgehen, soll ab 391 behoben sein
+ sal_Bool bModified : 1;
+ sal_Bool bPreset : 1;
+ sal_Bool bInInintControl : 1; //Modify-Fehler umgehen, soll ab 391 behoben sein
bool bLabelAlignmentPosAndSpaceModeActive;
void InitControls();
@@ -131,7 +131,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet *pSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
static SfxTabPage* Create( Window* pParent,
@@ -140,10 +140,10 @@ public:
void SetOutlineTabDialog(SwOutlineTabDialog* pDlg){pOutlineDlg = pDlg;}
void SetWrtShell(SwWrtShell* pSh);
#if OSL_DEBUG_LEVEL > 1
- void SetModified(BOOL bRepaint = TRUE);
+ void SetModified(sal_Bool bRepaint = sal_True);
#else
- void SetModified(BOOL bRepaint = TRUE)
- { bModified = TRUE;
+ void SetModified(sal_Bool bRepaint = sal_True)
+ { bModified = sal_True;
if(bRepaint)
{
aPreviewWIN.SetLevel(nActNumLvl);
@@ -162,7 +162,7 @@ class SwSvxNumBulletTabDialog : public SfxTabDialog
protected:
virtual short Ok();
- virtual void PageCreated(USHORT nPageId, SfxTabPage& rPage);
+ virtual void PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage);
DECL_LINK(RemoveNumberingHdl, PushButton*);
public:
SwSvxNumBulletTabDialog(Window* pParent,
diff --git a/sw/source/ui/inc/numberingtypelistbox.hxx b/sw/source/ui/inc/numberingtypelistbox.hxx
index 3ac0d047b436..747328dd1378 100644
--- a/sw/source/ui/inc/numberingtypelistbox.hxx
+++ b/sw/source/ui/inc/numberingtypelistbox.hxx
@@ -45,10 +45,10 @@ class SW_DLLPUBLIC SwNumberingTypeListBox : public ListBox
public:
SwNumberingTypeListBox( Window* pWin, const ResId& rResId,
- USHORT nTypeFlags = INSERT_NUM_TYPE_PAGE_STYLE_NUMBERING|INSERT_NUM_TYPE_NO_NUMBERING|INSERT_NUM_EXTENDED_TYPES );
+ sal_uInt16 nTypeFlags = INSERT_NUM_TYPE_PAGE_STYLE_NUMBERING|INSERT_NUM_TYPE_NO_NUMBERING|INSERT_NUM_EXTENDED_TYPES );
~SwNumberingTypeListBox();
- void Reload(USHORT nTypeFlags);
+ void Reload(sal_uInt16 nTypeFlags);
sal_Int16 GetSelectedNumberingType();
sal_Bool SelectNumberingType(sal_Int16 nType);
diff --git a/sw/source/ui/inc/numfmtlb.hxx b/sw/source/ui/inc/numfmtlb.hxx
index 31ef802ebbb1..e19d7206535e 100644
--- a/sw/source/ui/inc/numfmtlb.hxx
+++ b/sw/source/ui/inc/numfmtlb.hxx
@@ -37,49 +37,49 @@ class SwView;
class SW_DLLPUBLIC NumFormatListBox : public ListBox
{
short nCurrFormatType;
- USHORT nStdEntry;
- BOOL bOneArea;
- ULONG nDefFormat;
+ sal_uInt16 nStdEntry;
+ sal_Bool bOneArea;
+ sal_uLong nDefFormat;
SwView* pVw;
SvNumberFormatter* pOwnFormatter;
LanguageType eCurLanguage;
- BOOL bShowLanguageControl; //determine whether the language control has
+ sal_Bool bShowLanguageControl; //determine whether the language control has
//to be shown in the number format dialog
- BOOL bUseAutomaticLanguage;//determine whether language is automatically assigned
+ sal_Bool bUseAutomaticLanguage;//determine whether language is automatically assigned
SW_DLLPRIVATE DECL_LINK( SelectHdl, ListBox * );
SW_DLLPRIVATE double GetDefValue(const short nFormatType) const;
- SW_DLLPRIVATE void Init(short nFormatType, BOOL bUsrFmts);
+ SW_DLLPRIVATE void Init(short nFormatType, sal_Bool bUsrFmts);
SW_DLLPRIVATE SwView* GetView();
public:
NumFormatListBox( Window* pWin, const ResId& rResId,
- short nFormatType = NUMBERFORMAT_NUMBER, ULONG nDefFmt = 0,
- BOOL bUsrFmts = TRUE );
+ short nFormatType = NUMBERFORMAT_NUMBER, sal_uLong nDefFmt = 0,
+ sal_Bool bUsrFmts = sal_True );
NumFormatListBox( Window* pWin, SwView* pView, const ResId& rResId,
- short nFormatType = NUMBERFORMAT_NUMBER, ULONG nDefFmt = 0,
- BOOL bUsrFmts = TRUE );
+ short nFormatType = NUMBERFORMAT_NUMBER, sal_uLong nDefFmt = 0,
+ sal_Bool bUsrFmts = sal_True );
~NumFormatListBox();
void Clear();
- inline void SetOneArea(BOOL bOnlyOne = TRUE) { bOneArea = bOnlyOne; }
+ inline void SetOneArea(sal_Bool bOnlyOne = sal_True) { bOneArea = bOnlyOne; }
void SetFormatType(const short nFormatType);
inline short GetFormatType() const { return nCurrFormatType; }
- void SetDefFormat(const ULONG nDefFmt);
- ULONG GetFormat() const;
+ void SetDefFormat(const sal_uLong nDefFmt);
+ sal_uLong GetFormat() const;
inline LanguageType GetCurLanguage() const { return eCurLanguage;}
void SetLanguage(LanguageType eSet) { eCurLanguage = eSet;}
- void SetAutomaticLanguage(BOOL bSet){bUseAutomaticLanguage = bSet;}
- BOOL IsAutomaticLanguage()const {return bUseAutomaticLanguage;}
+ void SetAutomaticLanguage(sal_Bool bSet){bUseAutomaticLanguage = bSet;}
+ sal_Bool IsAutomaticLanguage()const {return bUseAutomaticLanguage;}
- void SetShowLanguageControl(BOOL bSet){bShowLanguageControl = bSet;}
+ void SetShowLanguageControl(sal_Bool bSet){bShowLanguageControl = bSet;}
};
diff --git a/sw/source/ui/inc/numpara.hxx b/sw/source/ui/inc/numpara.hxx
index 236c0205c9a0..2cf7d903338c 100644
--- a/sw/source/ui/inc/numpara.hxx
+++ b/sw/source/ui/inc/numpara.hxx
@@ -47,10 +47,10 @@ class SwParagraphNumTabPage : public SfxTabPage
FixedText aOutlineLvFT;
ListBox aOutlineLvLB;
+ FixedLine aNewStartFL;
FixedText aNumberStyleFT;
ListBox aNumberStyleLB;
- FixedLine aNewStartFL;
TriStateBox aNewStartCB;
TriStateBox aNewStartNumberCB;
NumericField aNewStartNF;
@@ -65,8 +65,8 @@ class SwParagraphNumTabPage : public SfxTabPage
const String msOutlineNumbering;
// <--
- BOOL bModified : 1;
- BOOL bCurNumrule : 1;
+ sal_Bool bModified : 1;
+ sal_Bool bCurNumrule : 1;
DECL_LINK( NewStartHdl_Impl, CheckBox* );
DECL_LINK( StyleHdl_Impl, ListBox* );
@@ -80,9 +80,9 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rSet );
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
void EnableNewStart();
diff --git a/sw/source/ui/inc/numprevw.hxx b/sw/source/ui/inc/numprevw.hxx
index 939cdd0e0585..e40e49b41347 100644
--- a/sw/source/ui/inc/numprevw.hxx
+++ b/sw/source/ui/inc/numprevw.hxx
@@ -40,8 +40,8 @@ class NumberingPreview : public Window
Font aStdFont;
long nPageWidth;
const String* pOutlineNames;
- BOOL bPosition;
- UINT16 nActLevel;
+ sal_Bool bPosition;
+ sal_uInt16 nActLevel;
protected:
virtual void Paint( const Rectangle& rRect );
@@ -49,7 +49,7 @@ class NumberingPreview : public Window
public:
NumberingPreview(Window* pParent, const ResId& rResId ) :
Window(pParent, rResId),
- pActNum(0),nPageWidth(0), pOutlineNames(0), bPosition(FALSE), nActLevel(USHRT_MAX) {}
+ pActNum(0),nPageWidth(0), pOutlineNames(0), bPosition(sal_False), nActLevel(USHRT_MAX) {}
~NumberingPreview();
void SetNumRule(const SwNumRule* pNum)
@@ -59,8 +59,8 @@ class NumberingPreview : public Window
void SetOutlineNames(const String* pNames)
{pOutlineNames = pNames;}
void SetPositionMode()
- { bPosition = TRUE;}
- void SetLevel(USHORT nSet) {nActLevel = nSet;}
+ { bPosition = sal_True;}
+ void SetLevel(sal_uInt16 nSet) {nActLevel = nSet;}
};
diff --git a/sw/source/ui/inc/olmenu.hxx b/sw/source/ui/inc/olmenu.hxx
index f83feb7f27db..bc2c7a1e8973 100644
--- a/sw/source/ui/inc/olmenu.hxx
+++ b/sw/source/ui/inc/olmenu.hxx
@@ -65,7 +65,7 @@ class SwSpellPopup : public PopupMenu
Image aInfo16;
- void fillLangPopupMenu( PopupMenu *pPopupMenu, USHORT nLangStart,
+ void fillLangPopupMenu( PopupMenu *pPopupMenu, sal_uInt16 nLangStart,
::com::sun::star::uno::Sequence< ::rtl::OUString > aSeq, SwWrtShell* pWrtSh,
std::map< sal_Int16, ::rtl::OUString > &rLangTable );
@@ -84,7 +84,7 @@ public:
const String & rParaText );
sal_uInt16 Execute( const Rectangle& rPopupPos, Window* pWin );
- void Execute( USHORT nId );
+ void Execute( sal_uInt16 nId );
};
diff --git a/sw/source/ui/inc/optcomp.hxx b/sw/source/ui/inc/optcomp.hxx
index c4758b649ead..b9e95f5722bf 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 fb2bb6c26189..1c5d0bd4d5b0 100644
--- a/sw/source/ui/inc/optload.hxx
+++ b/sw/source/ui/inc/optload.hxx
@@ -67,7 +67,7 @@ private:
SwWrtShell* pWrtShell;
sal_Bool bHTMLMode;
- UINT16 nLastTab;
+ sal_uInt16 nLastTab;
sal_Int32 nOldLinkMode;
DECL_LINK(CaptionHdl, PushButton*);
@@ -80,7 +80,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
@@ -166,8 +166,8 @@ private:
String sNone;
SwFldMgr *pMgr;
- USHORT eType;
- BOOL bHTMLMode;
+ sal_uInt16 eType;
+ sal_Bool bHTMLMode;
DECL_LINK( SelectHdl, ListBox *pLB = 0 );
DECL_LINK( ModifyHdl, Edit *pEdt = 0 );
@@ -176,7 +176,7 @@ private:
DECL_LINK( SaveEntryHdl, SvxCheckListBox *pLB = 0 );
void DelUserData();
- void SetOptions( const USHORT nPos,
+ void SetOptions( const sal_uInt16 nPos,
const SwCapObjType eType,
const SvGlobalName *pOleId = 0);
void SaveEntry( SvLBoxEntry* pEntry );
@@ -190,7 +190,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
diff --git a/sw/source/ui/inc/optpage.hxx b/sw/source/ui/inc/optpage.hxx
index 81541a374496..9c175fecd680 100644
--- a/sw/source/ui/inc/optpage.hxx
+++ b/sw/source/ui/inc/optpage.hxx
@@ -89,7 +89,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
@@ -120,11 +120,11 @@ class SwAddPrinterTabPage : public SfxTabPage
FixedLine aSeparatorRFL;
+ FixedLine aFL3;
RadioButton aNoRB;
RadioButton aOnlyRB;
RadioButton aEndRB;
RadioButton aEndPageRB;
- FixedLine aFL3;
FixedLine aFL4;
CheckBox aPrintEmptyPagesCB;
// CheckBox aSingleJobsCB;
@@ -133,8 +133,8 @@ class SwAddPrinterTabPage : public SfxTabPage
ListBox aFaxLB;
String sNone;
- BOOL bAttrModified;
- BOOL bPreview;
+ sal_Bool bAttrModified;
+ sal_Bool bPreview;
void Init();
DECL_LINK( AutoClickHdl, CheckBox * );
@@ -148,11 +148,11 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
void SetFax( const SvStringsDtor& );
void SelectFax( const String& );
- void SetPreview(BOOL bPrev);
+ void SetPreview(sal_Bool bPrev);
virtual void PageCreated (SfxAllItemSet aSet);
};
@@ -200,20 +200,20 @@ class SwStdFontTabPage : public SfxTabPage
SwWrtShell* pWrtShell;
LanguageType eLanguage;
// waren nur defaults vorhanden? wurden sie mit den Boxen ueberschrieben
- BOOL bListDefault :1;
- BOOL bSetListDefault :1;
- BOOL bLabelDefault :1;
- BOOL bSetLabelDefault :1;
- BOOL bIdxDefault :1;
- BOOL bSetIdxDefault :1;
- BOOL bDeletePrinter :1;
-
- BOOL bListHeightDefault :1;
- BOOL bSetListHeightDefault :1;
- BOOL bLabelHeightDefault :1;
- BOOL bSetLabelHeightDefault :1;
- BOOL bIndexHeightDefault :1;
- BOOL bSetIndexHeightDefault :1;
+ sal_Bool bListDefault :1;
+ sal_Bool bSetListDefault :1;
+ sal_Bool bLabelDefault :1;
+ sal_Bool bSetLabelDefault :1;
+ sal_Bool bIdxDefault :1;
+ sal_Bool bSetIdxDefault :1;
+ sal_Bool bDeletePrinter :1;
+
+ sal_Bool bListHeightDefault :1;
+ sal_Bool bSetListHeightDefault :1;
+ sal_Bool bLabelHeightDefault :1;
+ sal_Bool bSetLabelHeightDefault :1;
+ sal_Bool bIndexHeightDefault :1;
+ sal_Bool bSetIndexHeightDefault :1;
sal_uInt8 nFontGroup; //fontcfg.hxx: FONT_GROUP_[STANDARD|CJK|CTL]
@@ -234,7 +234,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
void SetFontMode(sal_uInt8 nGroup) {nFontGroup = nGroup;}
@@ -278,7 +278,7 @@ class SwTableOptionsTabPage : public SfxTabPage
FixedText aVarFT;
SwWrtShell* pWrtShell;
- BOOL bHTMLMode;
+ sal_Bool bHTMLMode;
DECL_LINK(CheckBoxHdl, CheckBox *pCB);
@@ -292,7 +292,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
void SetWrtShell(SwWrtShell* pSh) {pWrtShell = pSh;}
@@ -331,6 +331,12 @@ class SwShdwCrsrOptionsTabPage : public SfxTabPage
FixedLine aCrsrOptFL;
CheckBox aCrsrInProtCB;
+ FixedLine m_aLayoutOptionsFL;
+ CheckBox m_aMathBaselineAlignmentCB;
+
+ SwWrtShell * m_pWrtShell;
+
+
SwShdwCrsrOptionsTabPage( Window* pParent, const SfxItemSet& rSet );
~SwShdwCrsrOptionsTabPage();
@@ -338,8 +344,11 @@ public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
+
+ void SetWrtShell( SwWrtShell * pSh ) { m_pWrtShell = pSh; }
+ virtual void PageCreated( SfxAllItemSet aSet );
};
/*-----------------------------------------------------------------------
@@ -359,7 +368,7 @@ class SwMarkPreview : public Window
Rectangle aLeftPagePrtArea;
Rectangle aRightPagePrtArea;
- USHORT nMarkPos;
+ sal_uInt16 nMarkPos;
using OutputDevice::DrawRect;
void DrawRect(const Rectangle &rRect, const Color &rFillColor, const Color &rLineColor);
@@ -376,7 +385,7 @@ public:
virtual ~SwMarkPreview();
inline void SetColor(const Color& rCol) { m_aMarkCol = rCol; }
- inline void SetMarkPos(USHORT nPos) { nMarkPos = nPos; }
+ inline void SetMarkPos(sal_uInt16 nPos) { nMarkPos = nPos; }
};
/*-----------------------------------------------------------------------
@@ -431,7 +440,7 @@ public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
};
@@ -450,7 +459,7 @@ public:
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet );
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
private:
@@ -466,7 +475,7 @@ private:
CheckBox aTest9CBox;
CheckBox aTest10CBox;
- BOOL bAttrModified;
+ sal_Bool bAttrModified;
void Init();
DECL_LINK( AutoClickHdl, CheckBox * );
@@ -475,5 +484,4 @@ private:
#endif //PRODUCT
#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sw/source/ui/inc/outline.hxx b/sw/source/ui/inc/outline.hxx
index 52e6e3fb1aa2..f19969660392 100644
--- a/sw/source/ui/inc/outline.hxx
+++ b/sw/source/ui/inc/outline.hxx
@@ -54,7 +54,7 @@ class SwChapterNumRules;
class SwOutlineTabDialog : public SfxTabDialog
{
- static USHORT nNumLevel;
+ static sal_uInt16 nNumLevel;
String aNullStr;
String aCollNames[MAXLEVEL];
@@ -64,14 +64,14 @@ class SwOutlineTabDialog : public SfxTabDialog
SwNumRule* pNumRule;
SwChapterNumRules* pChapterNumRules;
- BOOL bModified : 1;
+ sal_Bool bModified : 1;
protected:
DECL_LINK( CancelHdl, Button * );
DECL_LINK( FormHdl, Button * );
DECL_LINK( MenuSelectHdl, Menu * );
- virtual void PageCreated(USHORT nPageId, SfxTabPage& rPage);
+ virtual void PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage);
virtual short Ok();
public:
@@ -81,18 +81,19 @@ class SwOutlineTabDialog : public SfxTabDialog
~SwOutlineTabDialog();
SwNumRule* GetNumRule() {return pNumRule;}
- USHORT GetLevel(const String &rFmtName) const;
+ sal_uInt16 GetLevel(const String &rFmtName) const;
String* GetCollNames() {return aCollNames;}
- static USHORT GetActNumLevel() {return nNumLevel;}
- static void SetActNumLevel(USHORT nSet) {nNumLevel = nSet;}
+ static sal_uInt16 GetActNumLevel() {return nNumLevel;}
+ static void SetActNumLevel(sal_uInt16 nSet) {nNumLevel = nSet;}
};
class SwOutlineSettingsTabPage : public SfxTabPage
{
- ListBox aLevelLB;
FixedLine aLevelFL;
+ ListBox aLevelLB;
+ FixedLine aNumberFL;
FixedText aCollLbl;
ListBox aCollBox;
FixedText aNumberLbl;
@@ -108,7 +109,6 @@ class SwOutlineSettingsTabPage : public SfxTabPage
Edit aSuffixED;
FixedText aStartLbl;
NumericField aStartEdit;
- FixedLine aNumberFL;
NumberingPreview aPreviewWIN;
String aNoFmtName;
@@ -116,7 +116,7 @@ class SwOutlineSettingsTabPage : public SfxTabPage
SwWrtShell* pSh;
SwNumRule* pNumRule;
String* pCollNames;
- USHORT nActLevel;
+ sal_uInt16 nActLevel;
DECL_LINK( LevelHdl, ListBox * );
DECL_LINK( ToggleComplete, NumericField * );
@@ -144,7 +144,7 @@ public:
virtual void ActivatePage(const SfxItemSet& rSet);
virtual int DeactivatePage(SfxItemSet *pSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
static SfxTabPage* Create( Window* pParent,
const SfxItemSet& rAttrSet);
diff --git a/sw/source/ui/inc/pgfnote.hxx b/sw/source/ui/inc/pgfnote.hxx
index ac46e739f863..a69d7b121aba 100644
--- a/sw/source/ui/inc/pgfnote.hxx
+++ b/sw/source/ui/inc/pgfnote.hxx
@@ -44,22 +44,23 @@ class SwFootNotePage: public SfxTabPage
{
public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
private:
SwFootNotePage(Window *pParent, const SfxItemSet &rSet);
~SwFootNotePage();
+ FixedLine aPosHeader;
RadioButton aMaxHeightPageBtn;
RadioButton aMaxHeightBtn;
MetricField aMaxHeightEdit;
FixedText aDistLbl;
MetricField aDistEdit;
- FixedLine aPosHeader;
+ FixedLine aLineHeader;
FixedText aLinePosLbl;
ListBox aLinePosBox;
FixedText aLineTypeLbl;
@@ -68,7 +69,6 @@ private:
MetricField aLineWidthEdit;
FixedText aLineDistLbl;
MetricField aLineDistEdit;
- FixedLine aLineHeader;
DECL_LINK( HeightPage, Button * );
DECL_LINK( HeightMetric, Button * );
diff --git a/sw/source/ui/inc/pggrid.hxx b/sw/source/ui/inc/pggrid.hxx
index 4b4ccc9bbdce..974b48690465 100644
--- a/sw/source/ui/inc/pggrid.hxx
+++ b/sw/source/ui/inc/pggrid.hxx
@@ -103,9 +103,9 @@ class SwTextGridPage: public SfxTabPage
public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
virtual void ActivatePage( const SfxItemSet& rSet );
diff --git a/sw/source/ui/inc/prcntfld.hxx b/sw/source/ui/inc/prcntfld.hxx
index aafe5510983c..7eb84042ddc0 100644
--- a/sw/source/ui/inc/prcntfld.hxx
+++ b/sw/source/ui/inc/prcntfld.hxx
@@ -40,12 +40,12 @@ class SW_DLLPUBLIC PercentField : public MetricField
sal_Int64 nOldBaseValue;
sal_Int64 nLastPercent;
sal_Int64 nLastValue;
- USHORT nOldDigits;
+ sal_uInt16 nOldDigits;
FieldUnit eOldUnit;
sal_Bool bLockAutoCalculation; //prevent recalcution of percent values when the
//reference value is changed
- SW_DLLPRIVATE sal_Int64 ImpPower10(USHORT n);
+ SW_DLLPRIVATE sal_Int64 ImpPower10(sal_uInt16 n);
using MetricField::SetValue;
using MetricField::GetValue;
@@ -69,7 +69,7 @@ public:
sal_Int64 GetValue(FieldUnit eOutUnit = FUNIT_NONE);
- BOOL IsValueModified();
+ sal_Bool IsValueModified();
//using NumericFormatter::SetMax;
void SetMax(sal_Int64 nNewMax, FieldUnit eInUnit = FUNIT_NONE);
@@ -86,9 +86,9 @@ public:
sal_Int64 Convert(sal_Int64 nValue, FieldUnit eInUnit, FieldUnit eOutUnit);
- void ShowPercent(BOOL bPercent);
+ void ShowPercent(sal_Bool bPercent);
- USHORT GetOldDigits() const {return nOldDigits;}
+ sal_uInt16 GetOldDigits() const {return nOldDigits;}
void LockAutoCalculation(sal_Bool bLock) {bLockAutoCalculation = bLock;}
sal_Bool IsAutoCalculationLocked()const {return bLockAutoCalculation;}
diff --git a/sw/source/ui/inc/pview.hxx b/sw/source/ui/inc/pview.hxx
index 04206297a9d3..dfa0cb23316c 100644
--- a/sw/source/ui/inc/pview.hxx
+++ b/sw/source/ui/inc/pview.hxx
@@ -55,8 +55,8 @@ class SwPagePreviewLayout;
class SwPagePreViewWin : public Window
{
ViewShell* mpViewShell;
- USHORT mnSttPage;
- BYTE mnRow, mnCol;
+ sal_uInt16 mnSttPage;
+ sal_uInt8 mnRow, mnCol;
Size maPxWinSize;
Fraction maScale;
SwPagePreView& mrView;
@@ -66,7 +66,7 @@ class SwPagePreViewWin : public Window
// OD 12.12.2002 #103492#
SwPagePreviewLayout* mpPgPrevwLayout;
- void SetPagePreview( BYTE nRow, BYTE nCol );
+ void SetPagePreview( sal_uInt8 nRow, sal_uInt8 nCol );
using Window::Scroll;
@@ -85,14 +85,14 @@ public:
ViewShell* GetViewShell() const { return mpViewShell; }
- BYTE GetRow() const { return mnRow; }
- void SetRow( BYTE n ) { if( n ) mnRow = n; }
+ sal_uInt8 GetRow() const { return mnRow; }
+ void SetRow( sal_uInt8 n ) { if( n ) mnRow = n; }
- BYTE GetCol() const { return mnCol; }
- void SetCol( BYTE n ) { if( n ) mnCol = n; }
+ sal_uInt8 GetCol() const { return mnCol; }
+ void SetCol( sal_uInt8 n ) { if( n ) mnCol = n; }
- USHORT GetSttPage() const { return mnSttPage; }
- void SetSttPage( USHORT n ) { mnSttPage = n; }
+ sal_uInt16 GetSttPage() const { return mnSttPage; }
+ void SetSttPage( sal_uInt16 n ) { mnSttPage = n; }
/** get selected page number of document preview
@@ -116,9 +116,9 @@ public:
void SetSelectedPage( sal_uInt16 _nSelectedPageNum );
//JP 19.08.98: bei Einspaltigkeit gibt es keine 0. Seite!
- USHORT GetDefSttPage() const { return 1 == mnCol ? 1 : 0; }
+ sal_uInt16 GetDefSttPage() const { return 1 == mnCol ? 1 : 0; }
- void CalcWish( BYTE nNewRow, BYTE nNewCol );
+ void CalcWish( sal_uInt8 nNewRow, sal_uInt8 nNewCol );
const Size& GetWinSize() const { return maPxWinSize; }
void SetWinSize( const Size& rNewSize );
@@ -129,7 +129,7 @@ public:
int MovePage( int eMoveMode );
// erzeuge den String fuer die StatusLeiste
- void GetStatusStr( String& rStr, USHORT nPageCount ) const;
+ void GetStatusStr( String& rStr, sal_uInt16 nPageCount ) const;
void RepaintCoreRect( const SwRect& rRect );
@@ -150,7 +150,7 @@ public:
return maPaintedPreviewDocRect;
}
- void Scroll(long nXMove, long nYMove, USHORT nFlags = 0);
+ void Scroll(long nXMove, long nYMove, sal_uInt16 nFlags = 0);
/** method to enable/disable book preview
@@ -160,7 +160,7 @@ public:
@param _bBookPreview
input parameter - boolean indicating, if book preview mode has to
- switch on <TRUE> or of <FALSE>
+ switch on <sal_True> or of <sal_False>
@return boolean indicating, if book preview mode has changed.
*/
@@ -184,7 +184,7 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell
//and the new cursor position if the user double click in the PagePreView
sNewCrsrPos;
// to support keyboard the number of the page to go to can be set too
- USHORT nNewPage;
+ sal_uInt16 nNewPage;
// Sichtbarer Bereich
String sPageStr;
Size aDocSz;
@@ -199,8 +199,8 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell
// aktiv sind
Window *pScrollFill;
- USHORT mnPageCount;
- BOOL bNormalPrint;
+ sal_uInt16 mnPageCount;
+ sal_Bool bNormalPrint;
// OD 09.01.2003 #106334#
// new members to reset design mode at draw view for form shell on switching
@@ -211,20 +211,19 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell
SW_DLLPRIVATE void Init(const SwViewOption* = 0);
SW_DLLPRIVATE Point AlignToPixel(const Point& rPt) const;
- SW_DLLPRIVATE int _CreateScrollbar( BOOL bHori );
+ SW_DLLPRIVATE int _CreateScrollbar( sal_Bool bHori );
SW_DLLPRIVATE DECL_LINK( ScrollHdl, SwScrollbar * );
SW_DLLPRIVATE DECL_LINK( EndScrollHdl, SwScrollbar * );
SW_DLLPRIVATE DECL_LINK( BtnPage, Button * );
- SW_DLLPRIVATE int ChgPage( int eMvMode, int bUpdateScrollbar = TRUE );
+ SW_DLLPRIVATE int ChgPage( int eMvMode, int bUpdateScrollbar = sal_True );
- SW_DLLPRIVATE virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
- SW_DLLPRIVATE virtual USHORT SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
+ SW_DLLPRIVATE virtual SfxPrinter* GetPrinter( sal_Bool bCreate = sal_False );
+ SW_DLLPRIVATE virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
SW_DLLPRIVATE virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent,
const SfxItemSet &rOptions );
- SW_DLLPRIVATE virtual PrintDialog* CreatePrintDialog( Window *pParent );
- SW_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill, BOOL bInner );
+ SW_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool bInner );
/** help method to execute SfxRequest FN_PAGE_UP and FN_PAGE_DOWN
@@ -247,7 +246,7 @@ protected:
virtual void OuterResizePixel( const Point &rOfs, const Size &rSize );
virtual Size GetOptimalSizePixel() const;
- void SetZoom(SvxZoomType eSet, USHORT nFactor);
+ void SetZoom(SvxZoomType eSet, sal_uInt16 nFactor);
public:
SFX_DECL_VIEWFACTORY(SwPagePreView);
@@ -264,7 +263,7 @@ public:
void DocSzChgd(const Size& rNewSize);
const Size& GetDocSz() const { return aDocSz; }
- virtual void SetVisArea( const Rectangle&, BOOL bUpdateScrollbar = TRUE);
+ virtual void SetVisArea( const Rectangle&, sal_Bool bUpdateScrollbar = sal_True);
inline void AdjustEditWin();
@@ -274,16 +273,16 @@ public:
void ShowVScrollbar(sal_Bool bShow);
- USHORT GetPageCount() const { return mnPageCount; }
+ sal_uInt16 GetPageCount() const { return mnPageCount; }
- BOOL HandleWheelCommands( const CommandEvent& );
+ sal_Bool HandleWheelCommands( const CommandEvent& );
const String& GetPrevSwViewData() const { return sSwViewData; }
void SetNewCrsrPos( const String& rStr ) { sNewCrsrPos = rStr; }
const String& GetNewCrsrPos() const { return sNewCrsrPos; }
- USHORT GetNewPage() const {return nNewPage;}
- void SetNewPage(USHORT nSet) {nNewPage = nSet;}
+ sal_uInt16 GetNewPage() const {return nNewPage;}
+ void SetNewPage(sal_uInt16 nSet) {nNewPage = nSet;}
// Handler
void Execute(SfxRequest&);
diff --git a/sw/source/ui/inc/redlndlg.hxx b/sw/source/ui/inc/redlndlg.hxx
index 8f2686b93cb1..f67aeb5a3291 100644
--- a/sw/source/ui/inc/redlndlg.hxx
+++ b/sw/source/ui/inc/redlndlg.hxx
@@ -56,9 +56,9 @@ struct SwRedlineDataParent
SvLBoxEntry* pTLBParent; // zugehoeriger TreeListBox-Eintrag
String sComment; // Redline-Kommentar
- inline BOOL operator==( const SwRedlineDataParent& rObj ) const
+ inline sal_Bool operator==( const SwRedlineDataParent& rObj ) const
{ return (pData && pData->GetSeqNo() == rObj.pData->GetSeqNo()); }
- inline BOOL operator< ( const SwRedlineDataParent& rObj ) const
+ inline sal_Bool operator< ( const SwRedlineDataParent& rObj ) const
{ return (pData && pData->GetSeqNo() < rObj.pData->GetSeqNo()); }
};
@@ -98,9 +98,9 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg
SvxRedlinTable* pTable; // PB 2006/02/02 #i48648 now SvHeaderTabListBox
Link aOldSelectHdl;
Link aOldDeselectHdl;
- BOOL bOnlyFormatedRedlines;
- BOOL bHasReadonlySel;
- BOOL bRedlnAutoFmt;
+ sal_Bool bOnlyFormatedRedlines;
+ sal_Bool bHasReadonlySel;
+ sal_Bool bRedlnAutoFmt;
// prevent update dialog data during longer operations (cf #102657#)
bool bInhibitActivate;
@@ -115,27 +115,27 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg
SW_DLLPRIVATE DECL_LINK( GotoHdl, void* );
SW_DLLPRIVATE DECL_LINK( CommandHdl, void* );
- SW_DLLPRIVATE USHORT CalcDiff(USHORT nStart, BOOL bChild);
- SW_DLLPRIVATE void InsertChilds(SwRedlineDataParent *pParent, const SwRedline& rRedln, const USHORT nAutoFmt);
- SW_DLLPRIVATE void InsertParents(USHORT nStart, USHORT nEnd = USHRT_MAX);
- SW_DLLPRIVATE void RemoveParents(USHORT nStart, USHORT nEnd);
+ SW_DLLPRIVATE sal_uInt16 CalcDiff(sal_uInt16 nStart, sal_Bool bChild);
+ SW_DLLPRIVATE void InsertChilds(SwRedlineDataParent *pParent, const SwRedline& rRedln, const sal_uInt16 nAutoFmt);
+ SW_DLLPRIVATE void InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd = USHRT_MAX);
+ SW_DLLPRIVATE void RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd);
SW_DLLPRIVATE void InitAuthors();
- SW_DLLPRIVATE String GetRedlineText(const SwRedline& rRedln, DateTime &rDateTime, USHORT nStack = 0);
- SW_DLLPRIVATE const String& GetActionText(const SwRedline& rRedln, USHORT nStack = 0);
- SW_DLLPRIVATE USHORT GetRedlinePos( const SvLBoxEntry& rEntry) const;
+ SW_DLLPRIVATE String GetRedlineText(const SwRedline& rRedln, DateTime &rDateTime, sal_uInt16 nStack = 0);
+ SW_DLLPRIVATE const String& GetActionText(const SwRedline& rRedln, sal_uInt16 nStack = 0);
+ SW_DLLPRIVATE sal_uInt16 GetRedlinePos( const SvLBoxEntry& rEntry) const;
public:
- SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt = FALSE);
+ SwRedlineAcceptDlg(Dialog *pParent, sal_Bool bAutoFmt = sal_False);
virtual ~SwRedlineAcceptDlg();
DECL_LINK( FilterChangedHdl, void *pDummy = 0 );
inline SvxAcceptChgCtr* GetChgCtrl() { return &aTabPagesCTRL; }
- inline BOOL HasRedlineAutoFmt() const { return bRedlnAutoFmt; }
+ inline sal_Bool HasRedlineAutoFmt() const { return bRedlnAutoFmt; }
- void Init(USHORT nStart = 0);
- void CallAcceptReject( BOOL bSelect, BOOL bAccept );
+ void Init(sal_uInt16 nStart = 0);
+ void CallAcceptReject( sal_Bool bSelect, sal_Bool bAccept );
void Initialize(const String &rExtraData);
void FillInfo(String &rExtraData) const;
@@ -164,13 +164,13 @@ class SwRedlineAcceptChild : public SwChildWinWrapper
{
public:
SwRedlineAcceptChild( Window* ,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings*,
SfxChildWinInfo* );
SFX_DECL_CHILDWINDOW( SwRedlineAcceptChild );
- virtual BOOL ReInitDlg(SwDocShell *pDocSh);
+ virtual sal_Bool ReInitDlg(SwDocShell *pDocSh);
};
diff --git a/sw/source/ui/inc/regionsw.hxx b/sw/source/ui/inc/regionsw.hxx
index ea6573a60f4f..416684f3af9f 100644
--- a/sw/source/ui/inc/regionsw.hxx
+++ b/sw/source/ui/inc/regionsw.hxx
@@ -114,14 +114,14 @@ class SwEditRegionDlg : public SfxModalDialog
sfx2::DocumentInserter* m_pDocInserter;
Window* m_pOldDefDlgParent;
- BOOL bDontCheckPasswd :1;
- BOOL bWeb :1;
+ sal_Bool bDontCheckPasswd :1;
+ sal_Bool bWeb :1;
- Image BuildBitmap(BOOL bProtect,BOOL bHidden);
+ Image BuildBitmap(sal_Bool bProtect,sal_Bool bHidden);
void RecurseList( const SwSectionFmt* pFmt, SvLBoxEntry* pEntry);
- USHORT FindArrPos(const SwSectionFmt* pFmt);
+ sal_uInt16 FindArrPos(const SwSectionFmt* pFmt);
DECL_LINK( GetFirstEntryHdl, SvTreeListBox * );
DECL_LINK( DeselectHdl, SvTreeListBox * );
@@ -145,7 +145,7 @@ class SwEditRegionDlg : public SfxModalDialog
DECL_LINK( DlgClosedHdl, sfx2::FileDialogHelper* );
DECL_LINK( SubRegionEventHdl, VclWindowEvent * );
- BOOL CheckPasswd(CheckBox* pBox = 0);
+ sal_Bool CheckPasswd(CheckBox* pBox = 0);
public:
SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh );
@@ -216,7 +216,7 @@ public:
void SetWrtShell(SwWrtShell& rSh);
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
static SfxTabPage* Create( Window* pParent,
@@ -255,13 +255,13 @@ class SwSectionFtnEndTabPage : public SfxTabPage
DECL_LINK( FootEndHdl, CheckBox * );
- void ResetState( BOOL bFtn, const SwFmtFtnEndAtTxtEnd& );
+ void ResetState( sal_Bool bFtn, const SwFmtFtnEndAtTxtEnd& );
public:
SwSectionFtnEndTabPage( Window *pParent, const SfxItemSet &rAttrSet );
virtual ~SwSectionFtnEndTabPage();
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
static SfxTabPage* Create( Window* pParent,
@@ -283,7 +283,7 @@ public:
SwSectionIndentTabPage( Window *pParent, const SfxItemSet &rAttrSet );
virtual ~SwSectionIndentTabPage();
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
static SfxTabPage* Create( Window* pParent,
@@ -298,7 +298,7 @@ class SwInsertSectionTabDialog : public SfxTabDialog
::std::auto_ptr<SwSectionData> m_pSectionData;
protected:
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
virtual short Ok();
public:
SwInsertSectionTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh);
@@ -312,7 +312,7 @@ class SwSectionPropertyTabDialog : public SfxTabDialog
{
SwWrtShell& rWrtSh;
protected:
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
public:
SwSectionPropertyTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh);
virtual ~SwSectionPropertyTabDialog();
diff --git a/sw/source/ui/inc/ribbar.hrc b/sw/source/ui/inc/ribbar.hrc
index 45c494b6f136..c9af820ba35b 100644
--- a/sw/source/ui/inc/ribbar.hrc
+++ b/sw/source/ui/inc/ribbar.hrc
@@ -69,10 +69,7 @@
#define MN_CALC_POPUP (RC_RIBBAR_BEGIN + 22)
#define MN_NUMNAMES_POPUP (RC_RIBBAR_BEGIN + 23)
-#define RID_INSERT_CTRL (RC_RIBBAR_BEGIN + 24)
-#define RID_INSERT_OBJ_CTRL (RC_RIBBAR_BEGIN + 25)
#define RID_INSERT_FIELD_CTRL (RC_RIBBAR_BEGIN + 26)
-#define RID_TBL_OPT_CTRL (RC_RIBBAR_BEGIN + 27)
#define RID_BEZIER_WIN (RC_RIBBAR_BEGIN + 28)
#define RID_SCROLL_NAVI_TBX (RC_RIBBAR_BEGIN + 29)
#define RID_SCROLL_NAVIGATION_WIN (RC_RIBBAR_BEGIN + 30)
diff --git a/sw/source/ui/inc/rowht.hxx b/sw/source/ui/inc/rowht.hxx
index 43e52bea056b..0302fcefe4bb 100644
--- a/sw/source/ui/inc/rowht.hxx
+++ b/sw/source/ui/inc/rowht.hxx
@@ -37,9 +37,9 @@ class SwWrtShell;
class SwTableHeightDlg : public SvxStandardDialog
{
+ FixedLine aHeightFL;
MetricField aHeightEdit;
CheckBox aAutoHeightCB;
- FixedLine aHeightFL;
OKButton aOKBtn;
CancelButton aCancelBtn;
HelpButton aHelpBtn;
diff --git a/sw/source/ui/inc/scroll.hxx b/sw/source/ui/inc/scroll.hxx
index 6d360af5671f..134ce9d284ad 100644
--- a/sw/source/ui/inc/scroll.hxx
+++ b/sw/source/ui/inc/scroll.hxx
@@ -32,11 +32,11 @@
class SwScrollbar: public ScrollBar
{
Size aDocSz;
- BOOL bHori :1; // Horizontal = TRUE, sonst Vertikal
- BOOL bAuto :1; // fuer Scrollingmode
- BOOL bThumbEnabled:1;
- BOOL bVisible :1; // Show/Hide sollen nur noch dieses Flag setzen
- BOOL bSizeSet :1; // wurde die Groesse bereits gesetzt?
+ sal_Bool bHori :1; // Horizontal = sal_True, sonst Vertikal
+ sal_Bool bAuto :1; // fuer Scrollingmode
+ sal_Bool bThumbEnabled:1;
+ sal_Bool bVisible :1; // Show/Hide sollen nur noch dieses Flag setzen
+ sal_Bool bSizeSet :1; // wurde die Groesse bereits gesetzt?
void AutoShow();
@@ -46,22 +46,22 @@ class SwScrollbar: public ScrollBar
public:
- void ExtendedShow( BOOL bVisible = TRUE );
- void Hide() { Show( FALSE ); }
+ void ExtendedShow( sal_Bool bVisible = sal_True );
+ void Hide() { Show( sal_False ); }
void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize );
- BOOL IsVisible(BOOL bReal) const { return bReal ? ScrollBar::IsVisible() : bVisible; }
+ sal_Bool IsVisible(sal_Bool bReal) const { return bReal ? ScrollBar::IsVisible() : bVisible; }
// Aenderung der Dokumentgroesse
void DocSzChgd(const Size &rNewSize);
// Aenderung des sichtbaren Bereiches
void ViewPortChgd(const Rectangle &rRectangle);
// was fuer einer ist es denn ??
- BOOL IsHoriScroll() const { return bHori; }
+ sal_Bool IsHoriScroll() const { return bHori; }
- void SetAuto(BOOL bSet);
- BOOL IsAuto() { return bAuto;}
+ void SetAuto(sal_Bool bSet);
+ sal_Bool IsAuto() { return bAuto;}
- SwScrollbar(Window *pParent, BOOL bHori = TRUE );
+ SwScrollbar(Window *pParent, sal_Bool bHori = sal_True );
~SwScrollbar();
};
diff --git a/sw/source/ui/inc/selglos.hxx b/sw/source/ui/inc/selglos.hxx
index d8c86a972de2..4ce626454d25 100644
--- a/sw/source/ui/inc/selglos.hxx
+++ b/sw/source/ui/inc/selglos.hxx
@@ -49,8 +49,8 @@ public:
SwSelGlossaryDlg(Window * pParent, const String &rShortName);
~SwSelGlossaryDlg();
void InsertGlos(const String &rRegion, const String &rGlosName); // inline
- USHORT GetSelectedIdx() const; // inline
- void SelectEntryPos(USHORT nIdx); // inline
+ sal_uInt16 GetSelectedIdx() const; // inline
+ void SelectEntryPos(sal_uInt16 nIdx); // inline
};
inline void SwSelGlossaryDlg::InsertGlos(const String &rRegion,
@@ -61,9 +61,9 @@ inline void SwSelGlossaryDlg::InsertGlos(const String &rRegion,
aTmp += rGlosName;
aGlosBox.InsertEntry( aTmp );
}
-inline USHORT SwSelGlossaryDlg::GetSelectedIdx() const
+inline sal_uInt16 SwSelGlossaryDlg::GetSelectedIdx() const
{ return aGlosBox.GetSelectEntryPos(); }
-inline void SwSelGlossaryDlg::SelectEntryPos(USHORT nIdx)
+inline void SwSelGlossaryDlg::SelectEntryPos(sal_uInt16 nIdx)
{ aGlosBox.SelectEntryPos(nIdx); }
#endif
diff --git a/sw/source/ui/inc/shdwcrsr.hxx b/sw/source/ui/inc/shdwcrsr.hxx
index 8b1a4e9123de..7a6c85047dc0 100644
--- a/sw/source/ui/inc/shdwcrsr.hxx
+++ b/sw/source/ui/inc/shdwcrsr.hxx
@@ -41,23 +41,23 @@ class SwShadowCursor
Color aCol;
Point aOldPt;
long nOldHeight;
- USHORT nOldMode;
+ sal_uInt16 nOldMode;
- void DrawTri( const Point& rPt, long nHeight, BOOL bLeft );
- void DrawCrsr( const Point& rPt, long nHeight, USHORT nMode );
+ void DrawTri( const Point& rPt, long nHeight, sal_Bool bLeft );
+ void DrawCrsr( const Point& rPt, long nHeight, sal_uInt16 nMode );
public:
SwShadowCursor( Window& rWin, const Color& rCol )
: pWin( &rWin ), aCol( rCol ), nOldHeight(0), nOldMode( USHRT_MAX ) {}
~SwShadowCursor();
- void SetPos( const Point& rPt, long nHeight, USHORT nMode );
+ void SetPos( const Point& rPt, long nHeight, sal_uInt16 nMode );
void Paint();
const Point& GetPoint() const { return aOldPt; }
long GetHeight() const { return nOldHeight; }
- USHORT GetMode() const { return nOldMode; }
+ sal_uInt16 GetMode() const { return nOldMode; }
Rectangle GetRect() const;
};
diff --git a/sw/source/ui/inc/split.hxx b/sw/source/ui/inc/split.hxx
index a49e131cd666..5d9dd5aa2178 100644
--- a/sw/source/ui/inc/split.hxx
+++ b/sw/source/ui/inc/split.hxx
@@ -34,7 +34,7 @@
#include <vcl/field.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/button.hxx>
@@ -42,13 +42,13 @@ class SwWrtShell;
class SwSplitTableDlg : public SvxStandardDialog
{
+ FixedLine aCountFL;
FixedText aCountLbl;
NumericField aCountEdit;
- FixedLine aCountFL;
+ FixedLine aDirFL;
ImageRadioButton aHorzBox;
ImageRadioButton aVertBox;
CheckBox aPropCB;
- FixedLine aDirFL;
OKButton aOKBtn;
CancelButton aCancelBtn;
HelpButton aHelpBtn;
@@ -61,8 +61,8 @@ public:
SwSplitTableDlg(Window *pParent, SwWrtShell& rShell );
DECL_LINK( ClickHdl, Button * );
- BOOL IsHorizontal() const { return aHorzBox.IsChecked(); }
- BOOL IsProportional() const { return aPropCB.IsChecked() && aHorzBox.IsChecked(); }
+ sal_Bool IsHorizontal() const { return aHorzBox.IsChecked(); }
+ sal_Bool IsProportional() const { return aPropCB.IsChecked() && aHorzBox.IsChecked(); }
long GetCount() const { return sal::static_int_cast< long >(aCountEdit.GetValue()); }
};
diff --git a/sw/source/ui/inc/splittbl.hxx b/sw/source/ui/inc/splittbl.hxx
index f570d05fd0f3..7ce7c65e898e 100644
--- a/sw/source/ui/inc/splittbl.hxx
+++ b/sw/source/ui/inc/splittbl.hxx
@@ -46,7 +46,7 @@ class SwSplitTblDlg : public SvxStandardDialog
RadioButton aBorderCopyRB;
SwWrtShell &rShell;
- USHORT m_nSplit;
+ sal_uInt16 m_nSplit;
protected:
virtual void Apply();
@@ -54,7 +54,7 @@ protected:
public:
SwSplitTblDlg( Window *pParent, SwWrtShell &rSh );
- USHORT GetSplitMode() const { return m_nSplit; }
+ sal_uInt16 GetSplitMode() const { return m_nSplit; }
};
#endif
diff --git a/sw/source/ui/inc/srcedtw.hxx b/sw/source/ui/inc/srcedtw.hxx
index 485cd94f1d84..9e9a74f900af 100644
--- a/sw/source/ui/inc/srcedtw.hxx
+++ b/sw/source/ui/inc/srcedtw.hxx
@@ -85,16 +85,16 @@ private:
utl::SourceViewConfig* pSourceViewConfig;
long nCurTextWidth;
- USHORT nStartLine;
+ sal_uInt16 nStartLine;
rtl_TextEncoding eSourceEncoding;
- BOOL bReadonly;
- BOOL bDoSyntaxHighlight;
- BOOL bHighlighting;
+ sal_Bool bReadonly;
+ sal_Bool bDoSyntaxHighlight;
+ sal_Bool bHighlighting;
Timer aSyntaxIdleTimer;
Table aSyntaxLineTable;
- void ImpDoHighlight( const String& rSource, USHORT nLineOff );
+ void ImpDoHighlight( const String& rSource, sal_uInt16 nLineOff );
using OutputDevice::SetFont;
void SetFont();
@@ -113,7 +113,7 @@ protected:
// virtual void LoseFocus();
void CreateTextEngine();
- void DoSyntaxHighlight( USHORT nPara );
+ void DoSyntaxHighlight( sal_uInt16 nPara );
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 );
@@ -126,9 +126,9 @@ public:
void SetScrollBarRanges();
void InitScrollBars();
- ULONG Read( SvStream& rInput)
+ sal_uLong Read( SvStream& rInput)
{return pTextEngine->Read(rInput);}
- ULONG Write( SvStream& rOutput)
+ sal_uLong Write( SvStream& rOutput)
{return pTextEngine->Write(rOutput);}
ExtTextView* GetTextView()
@@ -139,20 +139,20 @@ public:
TextViewOutWin* GetOutWin() {return pOutWin;}
- virtual void Invalidate( USHORT nFlags = 0 );
+ virtual void Invalidate( sal_uInt16 nFlags = 0 );
void ClearModifyFlag()
- { pTextEngine->SetModified(FALSE); }
- BOOL IsModified() const
+ { pTextEngine->SetModified(sal_False); }
+ sal_Bool IsModified() const
{ return pTextEngine->IsModified();}
void CreateScrollbars();
- void SetReadonly(BOOL bSet){bReadonly = bSet;}
- BOOL IsReadonly(){return bReadonly;}
+ void SetReadonly(sal_Bool bSet){bReadonly = bSet;}
+ sal_Bool IsReadonly(){return bReadonly;}
- void DoDelayedSyntaxHighlight( USHORT nPara );
+ void DoDelayedSyntaxHighlight( sal_uInt16 nPara );
- void SetStartLine(USHORT nLine){nStartLine = nLine;}
+ void SetStartLine(sal_uInt16 nLine){nStartLine = nLine;}
virtual void Command( const CommandEvent& rCEvt );
void HandleWheelCommand( const CommandEvent& rCEvt );
diff --git a/sw/source/ui/inc/srcview.hxx b/sw/source/ui/inc/srcview.hxx
index 1e99efb2f895..42fd797c9e74 100644
--- a/sw/source/ui/inc/srcview.hxx
+++ b/sw/source/ui/inc/srcview.hxx
@@ -45,7 +45,7 @@ class SwSrcView: public SfxViewShell
SvxSearchItem* pSearchItem;
- BOOL bSourceSaved :1;
+ sal_Bool bSourceSaved :1;
rtl_TextEncoding eLoadEncoding;
void Init();
@@ -54,10 +54,10 @@ class SwSrcView: public SfxViewShell
protected:
- USHORT StartSearchAndReplace(const SvxSearchItem& rItem,
- BOOL bFromStart,
- BOOL bApi,
- BOOL bRecursive = FALSE);
+ sal_uInt16 StartSearchAndReplace(const SvxSearchItem& rItem,
+ sal_Bool bFromStart,
+ sal_Bool bApi,
+ sal_Bool bRecursive = sal_False);
public:
@@ -76,7 +76,7 @@ public:
void SaveContent(const String& rTmpFile);
void SaveContentTo(SfxMedium& rMed);
- BOOL IsModified() {return aEditWin.IsModified();}
+ sal_Bool IsModified() {return aEditWin.IsModified();}
@@ -88,13 +88,13 @@ public:
void Load(SwDocShell* pDocShell);
- virtual USHORT SetPrinter( SfxPrinter* pNew, USHORT nDiff = SFX_PRINTER_ALL, bool bIsAPI=false );
- virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
+ virtual sal_uInt16 SetPrinter( SfxPrinter* pNew, sal_uInt16 nDiff = SFX_PRINTER_ALL, bool bIsAPI=false );
+ virtual SfxPrinter* GetPrinter( sal_Bool bCreate = sal_False );
sal_Int32 PrintSource( OutputDevice *pOutDev, sal_Int32 nPage, bool bCalcNumPagesOnly );
- void SourceSaved() {bSourceSaved = TRUE;}
- BOOL HasSourceSaved() const {return bSourceSaved;}
+ void SourceSaved() {bSourceSaved = sal_True;}
+ sal_Bool HasSourceSaved() const {return bSourceSaved;}
};
diff --git a/sw/source/ui/inc/srtdlg.hxx b/sw/source/ui/inc/srtdlg.hxx
index 8b689fad973a..3f17aff5d01a 100644
--- a/sw/source/ui/inc/srtdlg.hxx
+++ b/sw/source/ui/inc/srtdlg.hxx
@@ -44,7 +44,7 @@ class SwSortDlg : public SvxStandardDialog
FixedText aTypLbl;
FixedText aDirLbl;
- FixedLine aDirFL;
+ FixedLine aSortFL;
CheckBox aKeyCB1;
NumericField aColEdt1;
@@ -64,7 +64,7 @@ class SwSortDlg : public SvxStandardDialog
RadioButton aSortUp3RB;
RadioButton aSortDn3RB;
- FixedLine aSortFL;
+ FixedLine aDirFL;
RadioButton aColumnRB;
RadioButton aRowRB;
@@ -91,8 +91,8 @@ class SwSortDlg : public SvxStandardDialog
SwWrtShell &rSh;
CollatorRessource* pColRes;
- USHORT nX;
- USHORT nY;
+ sal_uInt16 nX;
+ sal_uInt16 nY;
virtual void Apply();
sal_Unicode GetDelimChar() const;
diff --git a/sw/source/ui/inc/swcont.hxx b/sw/source/ui/inc/swcont.hxx
index be57eddd40ff..0472ed3bc470 100644
--- a/sw/source/ui/inc/swcont.hxx
+++ b/sw/source/ui/inc/swcont.hxx
@@ -70,13 +70,13 @@ class SwContentType;
//mini rtti
class SwTypeNumber
{
- BYTE nTypeId;
+ sal_uInt8 nTypeId;
public:
- SwTypeNumber(BYTE nId) :nTypeId(nId){}
+ SwTypeNumber(sal_uInt8 nId) :nTypeId(nId){}
virtual ~SwTypeNumber();
- virtual BYTE GetTypeId();
+ virtual sal_uInt8 GetTypeId();
};
//----------------------------------------------------------------------------
@@ -85,17 +85,17 @@ class SwContent : public SwTypeNumber
const SwContentType* pParent;
String sContentName;
long nYPosition;
- BOOL bInvisible;
+ sal_Bool bInvisible;
public:
SwContent(const SwContentType* pCnt, const String& rName, long nYPos );
- virtual BOOL IsProtect() const;
+ virtual sal_Bool IsProtect() const;
const SwContentType* GetParent() const {return pParent;}
const String& GetName() const {return sContentName;}
int operator==(const SwContent& /*rCont*/) const
{
//gleich sind sie nie, sonst fallen sie aus dem Array
- return FALSE;
+ return sal_False;
}
int operator<(const SwContent& rCont) const
{
@@ -107,8 +107,8 @@ public:
long GetYPos() const {return nYPosition;}
- BOOL IsInvisible() const {return bInvisible;}
- void SetInvisible(){ bInvisible = TRUE;}
+ sal_Bool IsInvisible() const {return bInvisible;}
+ void SetInvisible(){ bInvisible = sal_True;}
};
#endif
diff --git a/sw/source/ui/inc/swdtflvr.hxx b/sw/source/ui/inc/swdtflvr.hxx
index 9a3274a61f1c..de826236705c 100644
--- a/sw/source/ui/inc/swdtflvr.hxx
+++ b/sw/source/ui/inc/swdtflvr.hxx
@@ -66,7 +66,7 @@ namespace nsTransferBufferType
class SwTransferable : public TransferableHelper
{
friend class SwView_Impl;
- SfxObjectShellRef aDocShellRef;
+ SfxObjectShellLock aDocShellRef;
TransferableDataHelper aOleData;
TransferableObjectDescriptor aObjDesc;
::sfx2::SvBaseLinkRef refDdeLink;
@@ -83,8 +83,8 @@ class SwTransferable : public TransferableHelper
TransferBufferType eBufferType;
- BOOL bOldIdle :1; //D&D Idle flag from the viewsettings
- BOOL bCleanUp :1; //D&D cleanup after Drop (not by internal Drop)
+ sal_Bool bOldIdle :1; //D&D Idle flag from the viewsettings
+ sal_Bool bCleanUp :1; //D&D cleanup after Drop (not by internal Drop)
// helper methods for the copy
com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > FindOLEObj( sal_Int64& nAspect ) const;
@@ -93,50 +93,50 @@ class SwTransferable : public TransferableHelper
// helper methods for the paste
static SwTransferable* GetSwTransferable( const TransferableDataHelper& rData );
- static void SetSelInShell( SwWrtShell& , BOOL , const Point* );
- static BOOL _CheckForURLOrLNKFile( TransferableDataHelper& rData,
+ static void SetSelInShell( SwWrtShell& , sal_Bool , const Point* );
+ static sal_Bool _CheckForURLOrLNKFile( TransferableDataHelper& rData,
String& rFileName, String* pTitle = 0 );
static int _TestAllowedFormat( const TransferableDataHelper& rData,
- ULONG nFormat, USHORT nDestination );
+ sal_uLong nFormat, sal_uInt16 nDestination );
static int _PasteFileContent( TransferableDataHelper&,
- SwWrtShell& rSh, ULONG nFmt, BOOL bMsg );
+ SwWrtShell& rSh, sal_uLong nFmt, sal_Bool bMsg );
static int _PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
- ULONG nFmt, BYTE nActionFlags, BOOL bMsg );
+ sal_uLong nFmt, sal_uInt8 nActionFlags, sal_Bool bMsg );
static int _PasteTargetURL( TransferableDataHelper& rData, SwWrtShell& rSh,
- USHORT nAction, const Point* pPt, BOOL bInsertGRF );
+ sal_uInt16 nAction, const Point* pPt, sal_Bool bInsertGRF );
static int _PasteDDE( TransferableDataHelper& rData, SwWrtShell& rWrtShell,
- BOOL bReReadGrf, BOOL bMsg );
+ sal_Bool bReReadGrf, sal_Bool bMsg );
static int _PasteSdrFormat( TransferableDataHelper& rData,
- SwWrtShell& rSh, USHORT nAction,
- const Point* pPt, BYTE nActionFlags );
+ SwWrtShell& rSh, sal_uInt16 nAction,
+ const Point* pPt, sal_uInt8 nActionFlags );
static int _PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
- ULONG nFmt, USHORT nAction, const Point* pPt,
- BYTE nActionFlags, BOOL bMsg );
+ sal_uLong nFmt, sal_uInt16 nAction, const Point* pPt,
+ sal_uInt8 nActionFlags, sal_Bool bMsg );
static int _PasteImageMap( TransferableDataHelper& rData,
SwWrtShell& rSh );
static int _PasteAsHyperlink( TransferableDataHelper& rData,
- SwWrtShell& rSh, ULONG nFmt );
+ SwWrtShell& rSh, sal_uLong nFmt );
static int _PasteFileName( TransferableDataHelper& rData,
- SwWrtShell& rSh, ULONG nFmt, USHORT nAction,
- const Point* pPt, BYTE nActionFlags, BOOL bMsg );
+ SwWrtShell& rSh, sal_uLong nFmt, sal_uInt16 nAction,
+ const Point* pPt, sal_uInt8 nActionFlags, sal_Bool bMsg );
static int _PasteDBData( TransferableDataHelper& rData, SwWrtShell& rSh,
- ULONG nFmt, BOOL bLink, const Point* pDragPt,
- BOOL bMsg );
+ sal_uLong nFmt, sal_Bool bLink, const Point* pDragPt,
+ sal_Bool bMsg );
static int _PasteFileList( TransferableDataHelper& rData,
- SwWrtShell& rSh, BOOL bLink,
- const Point* pPt, BOOL bMsg );
+ SwWrtShell& rSh, sal_Bool bLink,
+ const Point* pPt, sal_Bool bMsg );
- int PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, BOOL bMove,
- BOOL bIsXSelection );
+ int PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, sal_Bool bMove,
+ sal_Bool bIsXSelection );
int PrivatePaste( SwWrtShell& rShell );
void SetDataForDragAndDrop( const Point& rSttPos );
@@ -162,7 +162,7 @@ public:
SwTransferable( SwWrtShell& );
virtual ~SwTransferable();
- static USHORT GetSotDestination( const SwWrtShell& rSh, const Point* = 0 );
+ static sal_uInt16 GetSotDestination( const SwWrtShell& rSh, const Point* = 0 );
// set properties on the document, like PageMargin, VisArea.
// And set real Size
@@ -170,8 +170,8 @@ public:
// copy - methods and helper methods for the copy
int Cut();
- int Copy( BOOL bIsCut = FALSE );
- int PrepareForCopy( BOOL bIsCut = FALSE );
+ int Copy( sal_Bool bIsCut = sal_False );
+ int PrepareForCopy( sal_Bool bIsCut = sal_False );
int CalculateAndCopy(); // special for Calculator
int CopyGlossary( SwTextBlocks& rGlossary, const String& rStr );
@@ -179,21 +179,21 @@ public:
void RemoveDDELinkFormat( const Window& rWin );
// paste - methods and helper methods for the paste
- static BOOL IsPaste( const SwWrtShell&, const TransferableDataHelper& );
+ static sal_Bool IsPaste( const SwWrtShell&, const TransferableDataHelper& );
static int Paste( SwWrtShell&, TransferableDataHelper& );
static int PasteData( TransferableDataHelper& rData,
- SwWrtShell& rSh, USHORT nAction, ULONG nFormat,
- USHORT nDestination, BOOL bIsPasteFmt,
+ SwWrtShell& rSh, sal_uInt16 nAction, sal_uLong nFormat,
+ sal_uInt16 nDestination, sal_Bool bIsPasteFmt,
sal_Bool bIsDefault,
const Point* pDDPos = 0, sal_Int8 nDropAction = 0,
- BOOL bPasteSelection = FALSE );
+ sal_Bool bPasteSelection = sal_False );
- static BOOL IsPasteSpecial( const SwWrtShell& rWrtShell,
+ static sal_Bool IsPasteSpecial( const SwWrtShell& rWrtShell,
const TransferableDataHelper& );
static int PasteUnformatted( SwWrtShell& rSh, TransferableDataHelper& );
- static int PasteSpecial( SwWrtShell& rSh, TransferableDataHelper&, ULONG& rFormatUsed );
+ static int PasteSpecial( SwWrtShell& rSh, TransferableDataHelper&, sal_uLong& rFormatUsed );
static int PasteFormat( SwWrtShell& rSh, TransferableDataHelper& rData,
- ULONG nFormat );
+ sal_uLong nFormat );
static void FillClipFmtItem( const SwWrtShell& rSh,
const TransferableDataHelper& rData,
@@ -203,7 +203,7 @@ public:
void StartDrag( Window* pWin, const Point& rPos );
SwWrtShell* GetShell() { return pWrtShell; }
- void SetCleanUp( BOOL bFlag ) { bCleanUp = bFlag; }
+ void SetCleanUp( sal_Bool bFlag ) { bCleanUp = bFlag; }
// Interfaces for Selection
/* #96392# Added pCreator to distinguish SwFrameShell from SwWrtShell. */
diff --git a/sw/source/ui/inc/swlbox.hxx b/sw/source/ui/inc/swlbox.hxx
index 6f8122277bd5..7b8a958006b5 100644
--- a/sw/source/ui/inc/swlbox.hxx
+++ b/sw/source/ui/inc/swlbox.hxx
@@ -47,14 +47,14 @@ class SW_DLLPUBLIC SwBoxEntry
{
friend class SwComboBox;
- BOOL bModified : 1;
- BOOL bNew : 1;
+ sal_Bool bModified : 1;
+ sal_Bool bNew : 1;
String aName;
- USHORT nId;
+ sal_uInt16 nId;
public:
- SwBoxEntry(const String& aName, USHORT nId=0);
+ SwBoxEntry(const String& aName, sal_uInt16 nId=0);
SwBoxEntry(const SwBoxEntry& rOrg);
SwBoxEntry();
@@ -64,7 +64,7 @@ public:
/*--------------------------------------------------------------------
Beschreibung: fuer ComboBoxen
--------------------------------------------------------------------*/
-typedef USHORT SwComboBoxStyle;
+typedef sal_uInt16 SwComboBoxStyle;
namespace nsSwComboBoxStyle
{
@@ -72,11 +72,7 @@ namespace nsSwComboBoxStyle
const SwComboBoxStyle CBS_LOWER = 0x02;
const SwComboBoxStyle CBS_ALL = 0x04;
const SwComboBoxStyle CBS_FILENAME = 0x08;
-#ifdef WIN
- const SwComboBoxStyle CBS_SW_FILENAME = CBS_FILENAME | CBS_LOWER;
-#else
const SwComboBoxStyle CBS_SW_FILENAME = CBS_FILENAME;
-#endif
}
class SW_DLLPUBLIC SwComboBox : public ComboBox
@@ -84,7 +80,7 @@ class SW_DLLPUBLIC SwComboBox : public ComboBox
SwEntryLst aEntryLst;
SwEntryLst aDelEntryLst;
SwBoxEntry aDefault;
- USHORT nStyle;
+ sal_uInt16 nStyle;
SW_DLLPRIVATE void InitComboBox();
SW_DLLPRIVATE void InsertSorted(SwBoxEntry* pEntry);
@@ -98,25 +94,25 @@ public:
using ComboBox::GetEntryPos;
SwComboBox(Window* pParent, const ResId& rId,
- USHORT nStyleBits = nsSwComboBoxStyle::CBS_ALL);
+ sal_uInt16 nStyleBits = nsSwComboBoxStyle::CBS_ALL);
~SwComboBox();
virtual void KeyInput( const KeyEvent& rKEvt );
void InsertEntry(const SwBoxEntry&);
- USHORT InsertEntry( const XubString& rStr, USHORT = 0)
+ sal_uInt16 InsertEntry( const XubString& rStr, sal_uInt16 = 0)
{ InsertEntry( SwBoxEntry( rStr ) ); return 0; }
- void RemoveEntry(USHORT nPos);
+ void RemoveEntry(sal_uInt16 nPos);
- USHORT GetEntryPos(const SwBoxEntry& rEntry) const;
- const SwBoxEntry& GetEntry(USHORT) const;
+ sal_uInt16 GetEntryPos(const SwBoxEntry& rEntry) const;
+ const SwBoxEntry& GetEntry(sal_uInt16) const;
- USHORT GetRemovedCount() const;
- const SwBoxEntry& GetRemovedEntry(USHORT nPos) const;
+ sal_uInt16 GetRemovedCount() const;
+ const SwBoxEntry& GetRemovedEntry(sal_uInt16 nPos) const;
- USHORT GetStyle() const { return nStyle; }
- void SetStyle(const USHORT nSt) { nStyle = nSt; }
+ sal_uInt16 GetStyle() const { return nStyle; }
+ void SetStyle(const sal_uInt16 nSt) { nStyle = nSt; }
String GetText() const;
};
diff --git a/sw/source/ui/inc/swmn_tmpl.hrc b/sw/source/ui/inc/swmn_tmpl.hrc
deleted file mode 100644
index 10ef7962f6cb..000000000000
--- a/sw/source/ui/inc/swmn_tmpl.hrc
+++ /dev/null
@@ -1,386 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SWMN_HRC
-#define _SWMN_HRC
-
-#include <svx/dialogs.hrc>
-#include <svx/globlmn.hrc>
-#include "cmdid.h"
-#include "app.hrc"
-#include "globals.hrc"
-#include "helpid.h"
-#include "popup.hrc"
-
-/* --------------------- F O R M A T --------------------------------- */
-
-#define SEPARATOR MenuItem { Separator = TRUE; }
-
-//define for ITEM_FORMAT_NUMBERING
-#define DEFINE_SLOTID_FOR_NUMBER_BULLETS FN_NUMBER_BULLETS
-#define MN_NUMBERING ITEM_FORMAT_NUMBERING
-
-#define MN_TXT\
- MenuItem\
- {\
- ITEM_FORMAT_CHAR_DLG\
- };\
- MenuItem\
- {\
- ITEM_FORMAT_PARA_DLG\
- };\
- MenuItem\
- {\
- Identifier = FN_FORMAT_PAGE_DLG ; \
- HelpID = FN_FORMAT_PAGE_DLG ; \
- Text [ en-US ] = "Pa~ge..." ; \
- };\
- MenuItem\
- {\
- Identifier = FN_FORMAT_TITLEPAGE_DLG ; \
- HelpID = FN_FORMAT_TITLEPAGE_DLG ; \
- Text [ en-US ] = "~Title Page..." ; \
- };
-
-#define MN_TEXT_ATTR\
- MenuItem\
- {\
- ITEM_FORMAT_ATTR_CHAR_FONT\
- };\
- MenuItem\
- {\
- ITEM_FORMAT_ATTR_CHAR_FONTHEIGHT\
- };\
- MenuItem\
- {\
- Identifier = MN_FORMAT_STYLE ; \
- HelpID = MN_FORMAT_STYLE ; \
- Command = ".uno:StyleMenu" ; \
- Text [ en-US ] = "St~yle" ; \
- SubMenu = Menu\
- {\
- ItemList = \
- {\
- MenuItem\
- {\
- ITEM_FORMAT_ATTR_CHAR_WEIGHT\
- };\
- MenuItem\
- {\
- ITEM_FORMAT_ATTR_CHAR_POSTURE\
- };\
- MenuItem\
- {\
- ITEM_FORMAT_ATTR_CHAR_OVERLINE\
- };\
- MenuItem\
- {\
- ITEM_FORMAT_ATTR_CHAR_UNDERLINE\
- };\
- MenuItem\
- {\
- ITEM_FORMAT_ATTR_CHAR_STRIKEOUT\
- };\
- MenuItem\
- {\
- ITEM_FORMAT_ATTR_CHAR_SHADOWED\
- };\
- MenuItem\
- {\
- ITEM_FORMAT_ATTR_CHAR_CONTOUR\
- };\
- SEPARATOR ; \
- MenuItem\
- {\
- Identifier = FN_SET_SUPER_SCRIPT ; \
- HelpID = FN_SET_SUPER_SCRIPT ; \
- Text [ en-US ] = "Superscript" ; \
- };\
- MenuItem\
- {\
- Identifier = FN_SET_SUB_SCRIPT ; \
- HelpID = FN_SET_SUB_SCRIPT ; \
- Text [ en-US ] = "Subscript" ; \
- };\
- };\
- };\
- };\
- MenuItem\
- {\
- Identifier = MN_FORMAT_ALGN ; \
- HelpID = MN_FORMAT_ALGN ; \
- Command = ".uno:AlignTextMenu" ; \
- Text [ en-US ] = "A~lignment" ; \
- SubMenu = Menu\
- {\
- ItemList = \
- {\
- MenuItem\
- {\
- RadioCheck = TRUE ; \
- ITEM_FORMAT_ATTR_PARA_ADJUST_LEFT\
- };\
- MenuItem\
- {\
- RadioCheck = TRUE ; \
- ITEM_FORMAT_ATTR_PARA_ADJUST_RIGHT\
- };\
- MenuItem\
- {\
- RadioCheck = TRUE ; \
- ITEM_FORMAT_ATTR_PARA_ADJUST_CENTER\
- };\
- MenuItem\
- {\
- Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \
- HelpID = SID_ATTR_PARA_ADJUST_BLOCK ; \
- RadioCheck = TRUE ; \
- Text [ en-US ] = "Justified" ; \
- };\
- };\
- };\
- };\
- MenuItem\
- {\
- Identifier = MN_FORMAT_LINESPACE ; \
- HelpID = MN_FORMAT_LINESPACE ; \
- Command = ".uno:LineSpacingMenu" ; \
- Text [ en-US ] = "Line Spacing" ; \
- _MenuItemFlags = MIB_RADIOCHECK ; \
- SubMenu = Menu\
- {\
- ItemList = \
- {\
- MenuItem\
- {\
- RadioCheck = TRUE ; \
- ITEM_FORMAT_PARA_LINESPACE_10\
- };\
- MenuItem\
- {\
- RadioCheck = TRUE ; \
- ITEM_FORMAT_PARA_LINESPACE_15\
- };\
- MenuItem\
- {\
- RadioCheck = TRUE ; \
- ITEM_FORMAT_PARA_LINESPACE_20\
- };\
- };\
- };\
- };
-
-/* --------------------- M E N U --------------------------------- */
-
-/*
-
-
-The application menu bar resource has become obsolete. You can now find the menu bar at the following
-location: <project>/uiconfig/[swriter|sweb|sglobal]/menubar/menubar.xml
-
-
-*/
-
-/* --------------------- D O C U M E N T -------------------------- */
-
-
-#define _MN_EDIT_FIELD \
- MenuItem \
- { \
- Identifier = FN_EDIT_FIELD ; \
- HelpID = FN_EDIT_FIELD ; \
- Text [ en-US ] = "Fields..." ; \
- };
-#define _MN_EDIT_FOOTNOTE \
- MenuItem \
- { \
- Identifier = FN_EDIT_FOOTNOTE ; \
- HelpID = FN_EDIT_FOOTNOTE ; \
- Text [ en-US ] = "Footnote/Endnote~..." ; \
- };
- #define _MN_EDIT_IDX_ENTRY_DLG \
- MenuItem \
- { \
- Identifier = FN_EDIT_IDX_ENTRY_DLG ; \
- HelpID = FN_EDIT_IDX_ENTRY_DLG ; \
- Text [ en-US ] = "Inde~x Entry..." ; \
- };
-
-#define _MN_EDIT_REDLINE \
- MenuItem \
- { \
- Identifier = FN_REDLINE_ACCEPT_DIRECT; \
- HelpID = FN_REDLINE_ACCEPT_DIRECT ; \
- Text [ en-US ] = "Accept Change" ; \
- };\
- MenuItem \
- { \
- Identifier = FN_REDLINE_REJECT_DIRECT ; \
- HelpID = FN_REDLINE_REJECT_DIRECT ; \
- Text [ en-US ] = "Reject Change" ; \
- }; \
- SEPARATOR ;
-#define _MN_EDIT_BIB_ENTRY_DLG \
- MenuItem \
- { \
- Identifier = FN_EDIT_AUTH_ENTRY_DLG ; \
- HelpID = FN_EDIT_AUTH_ENTRY_DLG ; \
- Text [ en-US ] = "~Bibliography Entry..."; \
- }; \
- SEPARATOR ;
-
-#define _MN_EDIT_OPEN_HYPERLINK \
- MenuItem \
- { \
- ITEM_OPEN_HYPERLINK \
- };\
- MenuItem \
- { \
- Identifier = FN_EDIT_HYPERLINK ; \
- HelpID = FN_EDIT_HYPERLINK ; \
- Text [ en-US ] = "Edit Hyperlink..."; \
- }; \
- MenuItem \
- { \
- Identifier = FN_COPY_HYPERLINK_LOCATION; \
- HelpID = FN_COPY_HYPERLINK_LOCATION; \
- Text [ en-US ] = "Copy Hyperlink ~Location"; \
- }; \
- MenuItem \
- { \
- Identifier = FN_REMOVE_HYPERLINK ; \
- HelpID = FN_REMOVE_HYPERLINK ; \
- Text [ en-US ] = "Remo~ve Hyperlink"; \
- };
-
-#define _MN_EDIT_OPEN_SMARTTAGMENU \
- MenuItem \
- { \
- ITEM_OPEN_SMARTTAGMENU \
- };
-
-#define _MN_EDIT__HYPERLINK \
- MenuItem\
- {\
- Identifier = FN_EDIT_HYPERLINK ; \
- HelpID = FN_EDIT_HYPERLINK ; \
- Text [ en-US ] = "~Edit Hyperlink" ; \
- };
-
-#define _DEFAULT_TEXT_EDIT_ELEMENTS \
- _MN_EDIT_FIELD \
- _MN_EDIT_FOOTNOTE \
- _MN_EDIT_IDX_ENTRY_DLG \
- _MN_EDIT_BIB_ENTRY_DLG \
- _MN_EDIT_REDLINE \
- MenuItem \
- { \
- ITEM_POPUP_TEMPLATE_EDIT \
- }; \
- SEPARATOR ; \
- _MN_EDIT_OPEN_HYPERLINK \
- _MN_EDIT_OPEN_SMARTTAGMENU
-
-
-#define MN_RESET\
- MenuItem\
- {\
- Identifier = FN_FORMAT_RESET ; \
- HelpID = FN_FORMAT_RESET ; \
- Text [ en-US ] = "~Clear Direct Formatting" ; \
- };
-
-#define _NUMBERING_RELATED_MENU \
- SEPARATOR ; \
- MenuItem \
- { \
- Identifier = FN_NUMBER_NEWSTART; \
- HelpId = FN_NUMBER_NEWSTART; \
- Text[ en-US ] = "Restart Numbering"; \
- }; \
- MenuItem \
- { \
- Identifier = FN_NUM_CONTINUE; \
- HelpId = FN_NUM_CONTINUE; \
- Text[ en-US ] = "Continue previous numbering"; \
- }; \
- MenuItem \
- { \
- Identifier = FN_NUM_BULLET_UP; \
- HelpId = FN_NUM_BULLET_UP; \
- Text[ en-US ] = "Up One Level"; \
- }; \
- MenuItem \
- { \
- Identifier = FN_NUM_BULLET_DOWN; \
- HelpId = FN_NUM_BULLET_DOWN; \
- Text[ en-US ] = "Down One Level"; \
- };
-
-#define BASE_TEXT_POPUPMENU_BEGIN \
-{ \
- ItemList = \
- { \
- MN_RESET \
- _NUMBERING_RELATED_MENU \
- SEPARATOR ; \
- MN_TEXT_ATTR \
- SEPARATOR ; \
- MN_TXT \
- MN_NUMBERING \
- ITEM_TRANSLITERATE_MENU \
- SEPARATOR ;
-
-// not in Writer/Web
-#define BASE_TEXT_POPUPMENU_NOWEB \
- MenuItem \
- { \
- Identifier = FN_UPDATE_CUR_TOX ; \
- HelpID = FN_UPDATE_CUR_TOX ; \
- Text [ en-US ] = "~Update Index/Table"; \
- }; \
- MenuItem \
- { \
- Identifier = FN_EDIT_CURRENT_TOX; \
- HelpID = FN_EDIT_CURRENT_TOX; \
- Text [ en-US ] = "~Edit Index/Table"; \
- }; \
- MenuItem \
- { \
- Identifier = FN_REMOVE_CUR_TOX; \
- HelpID = FN_REMOVE_CUR_TOX; \
- Text [ en-US ] = "Delete Index/Table"; \
- }; \
- SEPARATOR ;
-
-#define BASE_TEXT_POPUPMENU_END \
- _DEFAULT_TEXT_EDIT_ELEMENTS \
- }; \
-};
-
-#endif
-
diff --git a/sw/source/ui/inc/swmodalredlineacceptdlg.hxx b/sw/source/ui/inc/swmodalredlineacceptdlg.hxx
index 7b4a9b4afd74..2e983566c6f2 100644
--- a/sw/source/ui/inc/swmodalredlineacceptdlg.hxx
+++ b/sw/source/ui/inc/swmodalredlineacceptdlg.hxx
@@ -42,7 +42,7 @@ public:
SwModalRedlineAcceptDlg(Window *pParent);
~SwModalRedlineAcceptDlg();
- void AcceptAll( BOOL bAccept );
+ void AcceptAll( sal_Bool bAccept );
virtual void Activate();
};
diff --git a/sw/source/ui/inc/swrenamexnameddlg.hxx b/sw/source/ui/inc/swrenamexnameddlg.hxx
index 1d51a0ef5e5d..de02fa8b06fc 100644
--- a/sw/source/ui/inc/swrenamexnameddlg.hxx
+++ b/sw/source/ui/inc/swrenamexnameddlg.hxx
@@ -44,9 +44,9 @@
class SwRenameXNamedDlg : public ModalDialog
{
+ FixedLine aNameFL;
FixedText aNewNameFT;
NoSpaceEdit aNewNameED;
- FixedLine aNameFL;
OKButton aOk;
CancelButton aCancel;
HelpButton aHelp;
diff --git a/sw/source/ui/inc/swtablerep.hxx b/sw/source/ui/inc/swtablerep.hxx
index 5867deb610eb..d0b341456cb0 100644
--- a/sw/source/ui/inc/swtablerep.hxx
+++ b/sw/source/ui/inc/swtablerep.hxx
@@ -43,20 +43,20 @@ class SW_DLLPUBLIC SwTableRep
SwTwips nSpace;
SwTwips nLeftSpace;
SwTwips nRightSpace;
- USHORT nAlign;
- USHORT nColCount;
- USHORT nAllCols;
- USHORT nWidthPercent;
- BOOL bComplex : 1;
- BOOL bLineSelected : 1;
- BOOL bWidthChanged : 1;
- BOOL bColsChanged : 1;
+ sal_uInt16 nAlign;
+ sal_uInt16 nColCount;
+ sal_uInt16 nAllCols;
+ sal_uInt16 nWidthPercent;
+ sal_Bool bComplex : 1;
+ sal_Bool bLineSelected : 1;
+ sal_Bool bWidthChanged : 1;
+ sal_Bool bColsChanged : 1;
public:
- SwTableRep( const SwTabCols& rTabCol, BOOL bComplex );
+ SwTableRep( const SwTabCols& rTabCol, sal_Bool bComplex );
~SwTableRep();
- BOOL FillTabCols( SwTabCols& rTabCol ) const;
+ sal_Bool FillTabCols( SwTabCols& rTabCol ) const;
SwTwips GetLeftSpace() const {return nLeftSpace;}
void SetLeftSpace(SwTwips nSet) {nLeftSpace = nSet;}
@@ -67,24 +67,24 @@ public:
SwTwips GetWidth() const {return nTblWidth;}
void SetWidth(SwTwips nSet) {nTblWidth = nSet;}
- USHORT GetWidthPercent() const {return nWidthPercent;}
- void SetWidthPercent(USHORT nSet) {nWidthPercent = nSet;}
+ sal_uInt16 GetWidthPercent() const {return nWidthPercent;}
+ void SetWidthPercent(sal_uInt16 nSet) {nWidthPercent = nSet;}
- USHORT GetAlign() const {return nAlign;}
- void SetAlign(USHORT nSet) {nAlign = nSet;}
+ sal_uInt16 GetAlign() const {return nAlign;}
+ void SetAlign(sal_uInt16 nSet) {nAlign = nSet;}
- BOOL IsComplex() const {return bComplex;}
- USHORT GetColCount() const {return nColCount;}
- USHORT GetAllColCount() const {return nAllCols;}
+ sal_Bool IsComplex() const {return bComplex;}
+ sal_uInt16 GetColCount() const {return nColCount;}
+ sal_uInt16 GetAllColCount() const {return nAllCols;}
- BOOL HasColsChanged() const {return bColsChanged;}
- void SetColsChanged() {bColsChanged = TRUE;}
+ sal_Bool HasColsChanged() const {return bColsChanged;}
+ void SetColsChanged() {bColsChanged = sal_True;}
- BOOL HasWidthChanged() const {return bWidthChanged;}
- void SetWidthChanged() {bWidthChanged = TRUE;}
+ sal_Bool HasWidthChanged() const {return bWidthChanged;}
+ void SetWidthChanged() {bWidthChanged = sal_True;}
- BOOL IsLineSelected() const {return bLineSelected;}
- void SetLineSelected(BOOL bSet) {bLineSelected = bSet;}
+ sal_Bool IsLineSelected() const {return bLineSelected;}
+ void SetLineSelected(sal_Bool bSet) {bLineSelected = bSet;}
SwTwips GetSpace() const { return nSpace;}
void SetSpace(SwTwips nSet) {nSpace = nSet;}
diff --git a/sw/source/ui/inc/swuiccoll.hxx b/sw/source/ui/inc/swuiccoll.hxx
index 20f951af4ed8..b665a068828e 100644
--- a/sw/source/ui/inc/swuiccoll.hxx
+++ b/sw/source/ui/inc/swuiccoll.hxx
@@ -58,7 +58,7 @@ class SwCondCollPage : public SfxTabPage
CollName* pNms;
- BOOL bNewTemplate;
+ sal_Bool bNewTemplate;
SwCondCollPage(Window *pParent, const SfxItemSet &rSet);
@@ -76,12 +76,12 @@ class SwCondCollPage : public SfxTabPage
public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet( SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet( SfxItemSet &rSet);
virtual void Reset (const SfxItemSet &rSet);
- void SetCollection( SwFmt* pFormat, BOOL bNew );
+ void SetCollection( SwFmt* pFormat, sal_Bool bNew );
};
diff --git a/sw/source/ui/inc/swuicnttab.hxx b/sw/source/ui/inc/swuicnttab.hxx
index f0c678fe2afc..63298235243f 100644
--- a/sw/source/ui/inc/swuicnttab.hxx
+++ b/sw/source/ui/inc/swuicnttab.hxx
@@ -86,12 +86,12 @@ class SwMultiTOXTabDialog : public SfxTabDialog
CurTOXType eCurrentTOXType;
String sUserDefinedIndex;
- USHORT nTypeCount;
- USHORT nInitialTOXType;
+ sal_uInt16 nTypeCount;
+ sal_uInt16 nInitialTOXType;
- BOOL bEditTOX;
- BOOL bExampleCreated;
- BOOL bGlobalFlag;
+ sal_Bool bEditTOX;
+ sal_Bool bExampleCreated;
+ sal_Bool bGlobalFlag;
virtual short Ok();
SwTOXDescription* CreateTOXDescFromTOXBase(const SwTOXBase*pCurTOX);
@@ -102,11 +102,11 @@ class SwMultiTOXTabDialog : public SfxTabDialog
public:
SwMultiTOXTabDialog(Window* pParent, const SfxItemSet& rSet,
SwWrtShell &rShell,
- SwTOXBase* pCurTOX, USHORT nToxType = USHRT_MAX,
- BOOL bGlobal = FALSE);
+ SwTOXBase* pCurTOX, sal_uInt16 nToxType = USHRT_MAX,
+ sal_Bool bGlobal = sal_False);
~SwMultiTOXTabDialog();
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
SwForm* GetForm(CurTOXType eType);
@@ -117,15 +117,15 @@ public:
}
void UpdateExample();
- BOOL IsTOXEditMode() const { return bEditTOX;}
+ sal_Bool IsTOXEditMode() const { return bEditTOX;}
SwWrtShell& GetWrtShell() {return rSh;}
SwTOXDescription& GetTOXDescription(CurTOXType eTOXTypes);
void CreateOrUpdateExample(
- TOXTypes nTOXIndex, USHORT nPage = 0, USHORT nCurLevel = USHRT_MAX);
+ TOXTypes nTOXIndex, sal_uInt16 nPage = 0, sal_uInt16 nCurLevel = USHRT_MAX);
- static BOOL IsNoNum(SwWrtShell& rSh, const String& rName);
+ static sal_Bool IsNoNum(SwWrtShell& rSh, const String& rName);
};
class IndexEntryRessource;
@@ -151,6 +151,8 @@ class SwTOXSelectTabPage : public SfxTabPage
CheckBox aFromHeadingsCB;
CheckBox aAddStylesCB;
PushButton aAddStylesPB;
+ Point aAddStylesPosDef;
+ Point aAddStylesPosUser;
//user
CheckBox aFromTablesCB;
CheckBox aFromFramesCB;
@@ -174,6 +176,7 @@ class SwTOXSelectTabPage : public SfxTabPage
//
//index only
+ FixedLine aIdxOptionsFL;
CheckBox aCollectSameCB;
CheckBox aUseFFCB;
CheckBox aUseDashCB;
@@ -182,7 +185,6 @@ class SwTOXSelectTabPage : public SfxTabPage
CheckBox aKeyAsEntryCB;
CheckBox aFromFileCB;
MenuButton aAutoMarkPB;
- FixedLine aIdxOptionsFL; // index only
// object only
SwOLENames aFromNames;
@@ -215,7 +217,7 @@ class SwTOXSelectTabPage : public SfxTabPage
const IndexEntrySupplierWrapper* pIndexEntryWrapper;
- BOOL bFirstCall;
+ sal_Bool bFirstCall;
DECL_LINK(TOXTypeHdl, ListBox* );
DECL_LINK(TOXAreaHdl, ListBox* );
@@ -238,7 +240,7 @@ public:
SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrSet);
~SwTOXSelectTabPage();
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
virtual void ActivatePage( const SfxItemSet& );
@@ -268,8 +270,8 @@ class SwTokenWindow : public Window
ImageButton aRightScrollWin;
TOXControlList aControlList;
SwForm* pForm;
- USHORT nLevel;
- BOOL bValid;
+ sal_uInt16 nLevel;
+ sal_Bool bValid;
String aButtonTexts[TOKEN_END]; // Text of the buttons
String aButtonHelpTexts[TOKEN_END]; // QuickHelpText of the buttons
String sCharStyle;
@@ -297,12 +299,12 @@ public:
SwTokenWindow(SwTOXEntryTabPage* pParent, const ResId& rResId);
~SwTokenWindow();
- void SetForm(SwForm& rForm, USHORT nLevel);
- USHORT GetLastLevel()const {return nLevel;};
+ void SetForm(SwForm& rForm, sal_uInt16 nLevel);
+ sal_uInt16 GetLastLevel()const {return nLevel;};
- BOOL IsValid() const {return bValid;}
+ sal_Bool IsValid() const {return bValid;}
- void SetInvalid() {bValid = FALSE;}
+ void SetInvalid() {bValid = sal_False;}
String GetPattern() const;
@@ -315,14 +317,14 @@ public:
{ return pActiveCtrl;}
void InsertAtSelection(const String& rText, const SwFormToken& aToken);
- void RemoveControl(SwTOXButton* pDel, BOOL bInternalCall = FALSE);
+ void RemoveControl(SwTOXButton* pDel, sal_Bool bInternalCall = sal_False);
- BOOL Contains(FormTokenType) const;
+ sal_Bool Contains(FormTokenType) const;
- BOOL DetermineLinkStart();
+ sal_Bool DetermineLinkStart();
//helper for pattern buttons and edits
- BOOL CreateQuickHelp(Control* pCtrl,
+ sal_Bool CreateQuickHelp(Control* pCtrl,
const SwFormToken& rToken, const HelpEvent& );
virtual void Resize();
@@ -345,6 +347,7 @@ class SwTOXEntryTabPage : public SfxTabPage
FixedText aLevelFT;
SwIdxTreeListBox aLevelLB;
+ FixedLine aEntryFL;
FixedText aTokenFT;
SwTokenWindow aTokenWIN;
PushButton aAllLevelsPB;
@@ -377,14 +380,13 @@ class SwTOXEntryTabPage : public SfxTabPage
FixedText aTabPosFT;
MetricField aTabPosMF; // tab stop position
CheckBox aAutoRightCB;
- FixedLine aEntryFL;
+ FixedLine aFormatFL;
CheckBox aRelToStyleCB; // position relative to the right margin of the para style
FixedText aMainEntryStyleFT;
ListBox aMainEntryStyleLB; // character style of main entries in indexes
CheckBox aAlphaDelimCB;
CheckBox aCommaSeparatedCB;
- FixedLine aFormatFL;
RadioButton aSortDocPosRB;
RadioButton aSortContentRB;
@@ -421,7 +423,7 @@ class SwTOXEntryTabPage : public SfxTabPage
Size aLevelFLSize;
CurTOXType aLastTOXType;
- BOOL bInLevelHdl;
+ sal_Bool bInLevelHdl;
Point aChapterEntryFTPosition; //!< holds position of ChapterEntryFT control,
//to be used in moving the element among different tokens
@@ -456,7 +458,7 @@ public:
SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet);
~SwTOXEntryTabPage();
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
virtual void ActivatePage( const SfxItemSet& );
virtual int DeactivatePage( SfxItemSet* pSet = 0 );
@@ -465,21 +467,21 @@ public:
const SfxItemSet& rAttrSet);
void SetWrtShell(SwWrtShell& rSh);
- String GetLevelHelp(USHORT nLevel) const;
+ String GetLevelHelp(sal_uInt16 nLevel) const;
void PreTokenButtonRemoved(const SwFormToken& rToken);
};
class SwTOXStylesTabPage : public SfxTabPage
{
+ FixedLine aFormatFL;
FixedText aLevelFT2;
ListBox aLevelLB;
+ ImageButton aAssignBT;
FixedText aTemplateFT;
ListBox aParaLayLB;
PushButton aStdBT;
- ImageButton aAssignBT;
PushButton aEditStyleBT;
- FixedLine aFormatFL;
SwForm* m_pCurrentForm;
@@ -503,7 +505,7 @@ public:
SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrSet);
~SwTOXStylesTabPage();
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet& );
virtual void ActivatePage( const SfxItemSet& );
diff --git a/sw/source/ui/inc/swuiidxmrk.hxx b/sw/source/ui/inc/swuiidxmrk.hxx
index 2fb8470d6087..098010ad7134 100644
--- a/sw/source/ui/inc/swuiidxmrk.hxx
+++ b/sw/source/ui/inc/swuiidxmrk.hxx
@@ -42,7 +42,7 @@
#include <vcl/button.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <sfx2/childwin.hxx>
#include "toxe.hxx"
#include <svtools/stdctrl.hxx>
@@ -61,6 +61,7 @@ class SwIndexMarkDlg : public Window
{
friend class SwIndexMarkFloatDlg;
friend class SwIndexMarkModalDlg;
+ FixedLine aIndexFL;
FixedText aTypeFT;
ListBox aTypeDCB;
ImageButton aNewBT;
@@ -87,7 +88,6 @@ class SwIndexMarkDlg : public Window
CheckBox aSearchCaseSensitiveCB;
CheckBox aSearchCaseWordOnlyCB;
- FixedLine aIndexFL;
OKButton aOKBT;
CancelButton aCancelBT;
@@ -106,11 +106,11 @@ class SwIndexMarkDlg : public Window
sal_Bool bNewMark;
sal_Bool bSelected;
- BOOL bPhoneticED0_ChangedByUser;
- BOOL bPhoneticED1_ChangedByUser;
- BOOL bPhoneticED2_ChangedByUser;
+ sal_Bool bPhoneticED0_ChangedByUser;
+ sal_Bool bPhoneticED1_ChangedByUser;
+ sal_Bool bPhoneticED2_ChangedByUser;
LanguageType nLangForPhoneticReading; //Language of current text used for phonetic reading proposal
- BOOL bIsPhoneticReadingEnabled; //this value states wether phopentic reading is enabled in principle dependend of global cjk settings and language of current entry
+ sal_Bool bIsPhoneticReadingEnabled; //this value states wether phopentic reading is enabled in principle dependend of global cjk settings and language of current entry
com::sun::star::uno::Reference< com::sun::star::i18n::XExtendedIndexEntrySupplier >
xExtendedIndexEntrySupplier;
diff --git a/sw/source/ui/inc/swuipardlg.hxx b/sw/source/ui/inc/swuipardlg.hxx
index 753e3c93cae2..62ea87544fd5 100644
--- a/sw/source/ui/inc/swuipardlg.hxx
+++ b/sw/source/ui/inc/swuipardlg.hxx
@@ -32,20 +32,20 @@
class SwParaDlg: public SfxTabDialog
{
SwView& rView;
- USHORT nHtmlMode;
- BYTE nDlgMode;
- BOOL bDrawParaDlg;
+ sal_uInt16 nHtmlMode;
+ sal_uInt8 nDlgMode;
+ sal_Bool bDrawParaDlg;
- void PageCreated(USHORT nID, SfxTabPage& rPage);
+ void PageCreated(sal_uInt16 nID, SfxTabPage& rPage);
public:
SwParaDlg( Window *pParent,
SwView& rVw,
const SfxItemSet&,
- BYTE nDialogMode,
+ sal_uInt8 nDialogMode,
const String *pCollName = 0,
- BOOL bDraw = FALSE,
- UINT16 nDefPage = 0);
+ sal_Bool bDraw = sal_False,
+ sal_uInt16 nDefPage = 0);
~SwParaDlg();
};
diff --git a/sw/source/ui/inc/swwrtshitem.hxx b/sw/source/ui/inc/swwrtshitem.hxx
index 27621fd3e9fd..f8e272702e45 100644
--- a/sw/source/ui/inc/swwrtshitem.hxx
+++ b/sw/source/ui/inc/swwrtshitem.hxx
@@ -39,7 +39,7 @@ class SW_DLLPUBLIC SwWrtShellItem: public SfxPoolItem
public:
TYPEINFO();
SwWrtShellItem();
- SwWrtShellItem( USHORT nWhich , SwWrtShell* pWrtSh);
+ SwWrtShellItem( sal_uInt16 nWhich , SwWrtShell* pWrtSh);
SwWrtShellItem( const SwWrtShellItem& );
diff --git a/sw/source/ui/inc/syncbtn.hxx b/sw/source/ui/inc/syncbtn.hxx
index 7c05e0776b96..c176dc13cb6d 100644
--- a/sw/source/ui/inc/syncbtn.hxx
+++ b/sw/source/ui/inc/syncbtn.hxx
@@ -50,7 +50,7 @@ class SwSyncChildWin : public SfxChildWindow
{
public:
SwSyncChildWin( Window* ,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings*,
SfxChildWinInfo* );
diff --git a/sw/source/ui/inc/tabledlg.hxx b/sw/source/ui/inc/tabledlg.hxx
index ed8f3cd8630a..572637109aa6 100644
--- a/sw/source/ui/inc/tabledlg.hxx
+++ b/sw/source/ui/inc/tabledlg.hxx
@@ -44,9 +44,9 @@ struct TColumn;
class SwTableTabDlg : public SfxTabDialog
{
SwWrtShell* pShell;
- USHORT nHtmlMode;
+ sal_uInt16 nHtmlMode;
- virtual void PageCreated(USHORT nId, SfxTabPage& rPage);
+ virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage);
public:
SwTableTabDlg( Window* pParent, SfxItemPool& Pool,
const SfxItemSet* pItemSet, SwWrtShell* pSh );
diff --git a/sw/source/ui/inc/tablemgr.hxx b/sw/source/ui/inc/tablemgr.hxx
index 135569ab6561..b8035c681327 100644
--- a/sw/source/ui/inc/tablemgr.hxx
+++ b/sw/source/ui/inc/tablemgr.hxx
@@ -53,7 +53,7 @@ class SW_DLLPUBLIC SwTableFUNC
{
SwFrmFmt *pFmt;
SwWrtShell *pSh;
- BOOL bCopy;
+ sal_Bool bCopy;
SwTabCols aCols;
private:
@@ -61,18 +61,18 @@ private:
public:
inline SwTableFUNC(SwFrmFmt &);
- SwTableFUNC(SwWrtShell *pShell, BOOL bCopyFmt = FALSE);
+ SwTableFUNC(SwWrtShell *pShell, sal_Bool bCopyFmt = sal_False);
~SwTableFUNC();
void InitTabCols();
void ColWidthDlg(Window *pParent );
- SwTwips GetColWidth(USHORT nNum) const;
- SwTwips GetMaxColWidth(USHORT nNum) const;
- void SetColWidth(USHORT nNum, SwTwips nWidth );
- USHORT GetColCount() const;
- USHORT GetCurColNum() const;
+ SwTwips GetColWidth(sal_uInt16 nNum) const;
+ SwTwips GetMaxColWidth(sal_uInt16 nNum) const;
+ void SetColWidth(sal_uInt16 nNum, SwTwips nWidth );
+ sal_uInt16 GetColCount() const;
+ sal_uInt16 GetCurColNum() const;
- BOOL IsTableSelected() const { return pFmt != 0; }
+ sal_Bool IsTableSelected() const { return pFmt != 0; }
const SwFrmFmt *GetTableFmt() const { return pFmt; }
@@ -89,7 +89,7 @@ public:
inline SwTableFUNC::SwTableFUNC(SwFrmFmt &rFmt) :
pFmt(&rFmt),
pSh(0),
- bCopy(FALSE)
+ bCopy(sal_False)
{
}
diff --git a/sw/source/ui/inc/tabsh.hxx b/sw/source/ui/inc/tabsh.hxx
index 79d913146094..49c8a06558a7 100644
--- a/sw/source/ui/inc/tabsh.hxx
+++ b/sw/source/ui/inc/tabsh.hxx
@@ -36,8 +36,8 @@ class SwWrtShell;
SW_DLLPUBLIC void ItemSetToTableParam( const SfxItemSet& rSet, SwWrtShell &rSh );
-extern const USHORT aUITableAttrRange[];
-SW_DLLPUBLIC const USHORT* SwuiGetUITableAttrRange();
+extern const sal_uInt16 aUITableAttrRange[];
+SW_DLLPUBLIC const sal_uInt16* SwuiGetUITableAttrRange();
class SwTableShell: public SwBaseShell
{
diff --git a/sw/source/ui/inc/tautofmt.hxx b/sw/source/ui/inc/tautofmt.hxx
index 1b3c0260cb60..5ba02135aa62 100644
--- a/sw/source/ui/inc/tautofmt.hxx
+++ b/sw/source/ui/inc/tautofmt.hxx
@@ -54,12 +54,12 @@ class SwAutoFormatDlg : public SfxModalDialog
{
FixedLine aFlFormat;
ListBox aLbFormat;
+ FixedLine aFlFormats;
CheckBox aBtnNumFormat;
CheckBox aBtnBorder;
CheckBox aBtnFont;
CheckBox aBtnPattern;
CheckBox aBtnAlignment;
- FixedLine aFlFormats;
OKButton aBtnOk;
CancelButton aBtnCancel;
HelpButton aBtnHelp;
@@ -79,14 +79,14 @@ class SwAutoFormatDlg : public SfxModalDialog
//------------------------
SwWrtShell* pShell;
SwTableAutoFmtTbl* pTableTbl;
- BYTE nIndex;
- BYTE nDfltStylePos;
- BOOL bCoreDataChanged : 1;
- BOOL bSetAutoFmt : 1;
+ sal_uInt8 nIndex;
+ sal_uInt8 nDfltStylePos;
+ sal_Bool bCoreDataChanged : 1;
+ sal_Bool bSetAutoFmt : 1;
void Init( const SwTableAutoFmt* pSelFmt );
- void UpdateChecks( const SwTableAutoFmt&, BOOL bEnableBtn );
+ void UpdateChecks( const SwTableAutoFmt&, sal_Bool bEnableBtn );
//------------------------
DECL_LINK( CheckHdl, Button * );
DECL_LINK( OkHdl, Button * );
@@ -97,7 +97,7 @@ class SwAutoFormatDlg : public SfxModalDialog
public:
SwAutoFormatDlg( Window* pParent, SwWrtShell* pShell,
- BOOL bSetAutoFmt = TRUE,
+ sal_Bool bSetAutoFmt = sal_True,
const SwTableAutoFmt* pSelFmt = 0 );
virtual ~SwAutoFormatDlg();
diff --git a/sw/source/ui/inc/tblctrl.hxx b/sw/source/ui/inc/tblctrl.hxx
index cb0c01371745..4616174ac0f3 100644
--- a/sw/source/ui/inc/tblctrl.hxx
+++ b/sw/source/ui/inc/tblctrl.hxx
@@ -42,7 +42,7 @@ class SwTableOptimizeCtrl : public SfxToolBoxControl
public:
SFX_DECL_TOOLBOX_CONTROL();
- SwTableOptimizeCtrl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ SwTableOptimizeCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~SwTableOptimizeCtrl();
virtual SfxPopupWindowType GetPopupWindowType() const;
diff --git a/sw/source/ui/inc/tbxanchr.hxx b/sw/source/ui/inc/tbxanchr.hxx
index c36b31007f4a..c27dbcc88b14 100644
--- a/sw/source/ui/inc/tbxanchr.hxx
+++ b/sw/source/ui/inc/tbxanchr.hxx
@@ -32,17 +32,17 @@
class SwTbxAnchor : public SfxToolBoxControl
{
- USHORT nActAnchorId;
+ sal_uInt16 nActAnchorId;
public:
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
virtual void Click();
virtual SfxPopupWindow* CreatePopupWindow();
SFX_DECL_TOOLBOX_CONTROL();
- SwTbxAnchor( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ SwTbxAnchor( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~SwTbxAnchor();
};
diff --git a/sw/source/ui/inc/textcontrolcombo.hxx b/sw/source/ui/inc/textcontrolcombo.hxx
index 6f95b73acb6a..d730a4d701b6 100644
--- a/sw/source/ui/inc/textcontrolcombo.hxx
+++ b/sw/source/ui/inc/textcontrolcombo.hxx
@@ -51,14 +51,14 @@ public:
Control& _rCtrl, FixedText& _rFTbefore, FixedText& _rFTafter );
virtual ~TextControlCombo();
- void Arrange( FixedText& _rOrg, BOOL bShow = true );
+ void Arrange( FixedText& _rOrg, sal_Bool bShow = true );
// identical to window functionality
- void Show( BOOL bVisible = TRUE, USHORT nFlags = 0 );
- void Hide( USHORT nFlags = 0 ) { Show( FALSE, nFlags ); }
+ void Show( sal_Bool bVisible = sal_True, sal_uInt16 nFlags = 0 );
+ void Hide( sal_uInt16 nFlags = 0 ) { Show( sal_False, nFlags ); }
- void Enable( BOOL bEnable = TRUE, BOOL bChild = TRUE );
- void Disable( BOOL bChild = TRUE ) { Enable( FALSE, bChild ); }
+ void Enable( sal_Bool bEnable = sal_True, sal_Bool bChild = sal_True );
+ void Disable( sal_Bool bChild = sal_True ) { Enable( sal_False, bChild ); }
};
diff --git a/sw/source/ui/inc/textsh.hxx b/sw/source/ui/inc/textsh.hxx
index 5817013c9ca9..9571e6645580 100644
--- a/sw/source/ui/inc/textsh.hxx
+++ b/sw/source/ui/inc/textsh.hxx
@@ -42,7 +42,7 @@ class SwTextShell: public SwBaseShell
void InsertSymbol( SfxRequest& );
void InsertHyperlink(const SvxHyperlinkItem& rHlnkItem);
bool InsertMediaDlg( SfxRequest& );
- void ChangeHeaderOrFooter(const String& rStyleName, BOOL bHeader, BOOL bOn, BOOL bShowWarning);
+ void ChangeHeaderOrFooter(const String& rStyleName, sal_Bool bHeader, sal_Bool bOn, sal_Bool bShowWarning);
public:
SFX_DECL_INTERFACE(SW_TEXTSHELL)
diff --git a/sw/source/ui/inc/titlepage.hxx b/sw/source/ui/inc/titlepage.hxx
index 44230b90f14f..5f102e008201 100644
--- a/sw/source/ui/inc/titlepage.hxx
+++ b/sw/source/ui/inc/titlepage.hxx
@@ -83,7 +83,7 @@ private:
void FillList();
- USHORT GetInsertPosition() const;
+ sal_uInt16 GetInsertPosition() const;
DECL_LINK( OKHdl, Button * );
DECL_LINK( EditHdl, Button * );
diff --git a/sw/source/ui/inc/tmpdlg.hxx b/sw/source/ui/inc/tmpdlg.hxx
index ddb24179758e..cc2a9c18d441 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 25a946a1c98c..f0579d0ec96c 100644
--- a/sw/source/ui/inc/tmplctrl.hxx
+++ b/sw/source/ui/inc/tmplctrl.hxx
@@ -38,13 +38,13 @@ class SwTemplateControl : public SfxStatusBarControl
protected:
virtual void Command( const CommandEvent& rCEvt );
public:
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
virtual void Paint( const UserDrawEvent& rEvt );
SFX_DECL_STATUSBAR_CONTROL();
- SwTemplateControl( USHORT nSlotId, USHORT nId, StatusBar& rStb );
+ SwTemplateControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb );
~SwTemplateControl();
private:
diff --git a/sw/source/ui/inc/toolbox_tmpl.hrc b/sw/source/ui/inc/toolbox.hrc
index 73ab3059d705..73ab3059d705 100644
--- a/sw/source/ui/inc/toolbox_tmpl.hrc
+++ b/sw/source/ui/inc/toolbox.hrc
diff --git a/sw/source/ui/inc/toxmgr.hxx b/sw/source/ui/inc/toxmgr.hxx
index c8c01a0ac777..d80bcf05b577 100644
--- a/sw/source/ui/inc/toxmgr.hxx
+++ b/sw/source/ui/inc/toxmgr.hxx
@@ -50,9 +50,9 @@ class SW_DLLPUBLIC SwTOXDescription
String* pTitle;
String* pTOUName;
SwForm* pForm;
- USHORT nContent;
- USHORT nIndexOptions;
- USHORT nOLEOptions;
+ sal_uInt16 nContent;
+ sal_uInt16 nIndexOptions;
+ sal_uInt16 nOLEOptions;
LanguageType eLanguage;
String sSortAlgorithm;
@@ -61,13 +61,13 @@ class SW_DLLPUBLIC SwTOXDescription
SwTOXSortKey eSortKey1;
SwTOXSortKey eSortKey2;
SwTOXSortKey eSortKey3;
- BYTE nLevel;
- BOOL bFromObjectNames : 1;
- BOOL bFromChapter : 1;
- BOOL bReadonly: 1;
- BOOL bLevelFromChapter : 1;
- BOOL bIsAuthSequence :1;
- BOOL bSortByDocument :1;
+ sal_uInt8 nLevel;
+ sal_Bool bFromObjectNames : 1;
+ sal_Bool bFromChapter : 1;
+ sal_Bool bReadonly: 1;
+ sal_Bool bLevelFromChapter : 1;
+ sal_Bool bIsAuthSequence :1;
+ sal_Bool bSortByDocument :1;
//TODO: TemplateNames
//const String* pTemplateName = 0, ???
@@ -90,12 +90,12 @@ public:
eLanguage((LanguageType)::GetAppLanguage()),
eCaptionDisplay(CAPTION_COMPLETE),
nLevel(MAXLEVEL),
- bFromObjectNames(FALSE),
- bFromChapter(FALSE),
- bReadonly(TRUE),
- bLevelFromChapter(FALSE),
- bIsAuthSequence(FALSE),
- bSortByDocument(TRUE)
+ bFromObjectNames(sal_False),
+ bFromChapter(sal_False),
+ bReadonly(sal_True),
+ bLevelFromChapter(sal_False),
+ bIsAuthSequence(sal_False),
+ bSortByDocument(sal_True)
{}
~SwTOXDescription()
{
@@ -107,9 +107,9 @@ public:
void SetTOXType(TOXTypes eSet) { eTOXType = eSet;}
TOXTypes GetTOXType() const { return eTOXType;}
- const String& GetStyleNames(USHORT nLvl) const
+ const String& GetStyleNames(sal_uInt16 nLvl) const
{return aStyleNames[nLvl];}
- void SetStyleNames(const String& rSet, USHORT nLvl)
+ void SetStyleNames(const String& rSet, sal_uInt16 nLvl)
{aStyleNames[nLvl] = rSet; }
const String& GetAutoMarkURL() const { return sAutoMarkURL;}
@@ -124,20 +124,20 @@ public:
void SetForm(const SwForm& rSet) {delete pForm; pForm = new SwForm(rSet);}
const SwForm* GetForm() const {return pForm;}
- void SetContentOptions(USHORT nSet) { nContent = nSet;}
- USHORT GetContentOptions() const { return nContent;}
+ void SetContentOptions(sal_uInt16 nSet) { nContent = nSet;}
+ sal_uInt16 GetContentOptions() const { return nContent;}
- void SetIndexOptions(USHORT nSet) { nIndexOptions = nSet;}
- USHORT GetIndexOptions() const { return nIndexOptions;}
+ void SetIndexOptions(sal_uInt16 nSet) { nIndexOptions = nSet;}
+ sal_uInt16 GetIndexOptions() const { return nIndexOptions;}
const String& GetMainEntryCharStyle() const {return sMainEntryCharStyle;}
void SetMainEntryCharStyle(const String& rSet) {sMainEntryCharStyle = rSet;}
- void SetLevel(BYTE nSet) {nLevel = nSet;}
- BYTE GetLevel()const {return nLevel; }
+ void SetLevel(sal_uInt8 nSet) {nLevel = nSet;}
+ sal_uInt8 GetLevel()const {return nLevel; }
- void SetCreateFromObjectNames(BOOL bSet) { bFromObjectNames = bSet;}
- BOOL IsCreateFromObjectNames() const {return bFromObjectNames;}
+ void SetCreateFromObjectNames(sal_Bool bSet) { bFromObjectNames = bSet;}
+ sal_Bool IsCreateFromObjectNames() const {return bFromObjectNames;}
const String& GetSequenceName() const {return sSequenceName;}
void SetSequenceName(const String& rSet) {sSequenceName = rSet;}
@@ -145,26 +145,26 @@ public:
SwCaptionDisplay GetCaptionDisplay() const { return eCaptionDisplay;}
void SetCaptionDisplay(SwCaptionDisplay eSet) {eCaptionDisplay = eSet;}
- void SetFromChapter(BOOL bSet) { bFromChapter = bSet;}
- BOOL IsFromChapter() const {return bFromChapter;}
+ void SetFromChapter(sal_Bool bSet) { bFromChapter = bSet;}
+ sal_Bool IsFromChapter() const {return bFromChapter;}
- void SetReadonly(BOOL bSet){bReadonly = bSet;}
- BOOL IsReadonly() const {return bReadonly;}
+ void SetReadonly(sal_Bool bSet){bReadonly = bSet;}
+ sal_Bool IsReadonly() const {return bReadonly;}
- USHORT GetOLEOptions() const {return nOLEOptions;}
- void SetOLEOptions(USHORT nOpt) {nOLEOptions = nOpt;}
+ sal_uInt16 GetOLEOptions() const {return nOLEOptions;}
+ void SetOLEOptions(sal_uInt16 nOpt) {nOLEOptions = nOpt;}
- BOOL IsLevelFromChapter() const {return bLevelFromChapter;}
- void SetLevelFromChapter(BOOL bSet) {bLevelFromChapter = bSet;}
+ sal_Bool IsLevelFromChapter() const {return bLevelFromChapter;}
+ void SetLevelFromChapter(sal_Bool bSet) {bLevelFromChapter = bSet;}
String GetAuthBrackets() const {return sAuthBrackets;}
void SetAuthBrackets(const String& rSet) {sAuthBrackets = rSet;}
- BOOL IsAuthSequence() const {return bIsAuthSequence;}
- void SetAuthSequence(BOOL bSet){bIsAuthSequence = bSet;}
+ sal_Bool IsAuthSequence() const {return bIsAuthSequence;}
+ void SetAuthSequence(sal_Bool bSet){bIsAuthSequence = bSet;}
- BOOL IsSortByDocument()const {return bSortByDocument ;}
- void SetSortByDocument(BOOL bSet) {bSortByDocument = bSet;}
+ sal_Bool IsSortByDocument()const {return bSortByDocument ;}
+ void SetSortByDocument(sal_Bool bSet) {bSortByDocument = bSet;}
void SetSortKeys(SwTOXSortKey eKey1,
SwTOXSortKey eKey2,
@@ -188,7 +188,7 @@ class SwTOXMarkDescription
{
TOXTypes eTOXType;
int nLevel;
- BOOL bMainEntry;
+ sal_Bool bMainEntry;
String* pPrimKey;
String* pSecKey;
@@ -209,7 +209,7 @@ public:
explicit SwTOXMarkDescription(TOXTypes eType) :
eTOXType(eType),
nLevel(0),
- bMainEntry(FALSE),
+ bMainEntry(sal_False),
pPrimKey(0),
pSecKey(0),
pAltStr(0),
@@ -235,8 +235,8 @@ public:
void SetLevel(int nSet) {nLevel = nSet;}
int GetLevel() const {return nLevel;}
- void SetMainEntry(BOOL bSet) {bMainEntry = bSet;}
- BOOL IsMainEntry() const {return bMainEntry;}
+ void SetMainEntry(sal_Bool bSet) {bMainEntry = bSet;}
+ sal_Bool IsMainEntry() const {return bMainEntry;}
void SetPrimKey(const String& rSet)
{delete pPrimKey; pPrimKey = new String(rSet);}
@@ -274,7 +274,7 @@ class SW_DLLPUBLIC SwTOXMgr
SwTOXMark* pCurTOXMark;
SwTOXMarks aCurMarks;
- SW_DLLPRIVATE USHORT GetUserTypeID(const String& rStr);
+ SW_DLLPRIVATE sal_uInt16 GetUserTypeID(const String& rStr);
public:
// single argument ctors shall be explicit.
@@ -289,22 +289,22 @@ public:
void DeleteTOXMark();
- void NextTOXMark(BOOL bSame=FALSE);
- void PrevTOXMark(BOOL bSame=FALSE);
+ void NextTOXMark(sal_Bool bSame=sal_False);
+ void PrevTOXMark(sal_Bool bSame=sal_False);
// Aktuelle TOXmarks holen
- USHORT GetTOXMarks();
- USHORT GetTOXMarkCount();
- SwTOXMark* GetTOXMark(USHORT nId);
+ sal_uInt16 GetTOXMarks();
+ sal_uInt16 GetTOXMarkCount();
+ SwTOXMark* GetTOXMark(sal_uInt16 nId);
SwTOXMark* GetCurTOXMark();
- void SetCurTOXMark(USHORT nId);
+ void SetCurTOXMark(sal_uInt16 nId);
//
// Methoden fuer Verzeichnisse
//
- BOOL UpdateOrInsertTOX(const SwTOXDescription& rDesc, SwTOXBase** ppBase = 0, const SfxItemSet* pSet = 0);
+ sal_Bool UpdateOrInsertTOX(const SwTOXDescription& rDesc, SwTOXBase** ppBase = 0, const SfxItemSet* pSet = 0);
- const SwTOXType* GetTOXType(TOXTypes eTyp, USHORT nId) const;
+ const SwTOXType* GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const;
const SwTOXBase* GetCurTOX();
};
@@ -312,7 +312,7 @@ public:
/*--------------------------------------------------------------------
Beschreibung: Inlines
--------------------------------------------------------------------*/
-inline USHORT SwTOXMgr::GetTOXMarkCount()
+inline sal_uInt16 SwTOXMgr::GetTOXMarkCount()
{ return aCurMarks.Count(); }
inline SwTOXMark* SwTOXMgr::GetCurTOXMark()
diff --git a/sw/source/ui/inc/uiborder.hxx b/sw/source/ui/inc/uiborder.hxx
index 5dd02380cb85..b734427f0124 100644
--- a/sw/source/ui/inc/uiborder.hxx
+++ b/sw/source/ui/inc/uiborder.hxx
@@ -42,7 +42,7 @@ public:
// SW_BORDER_MODE_TABLE
// SW_BORDER_MODE_FRAME
- SwBorderDlg(Window* pParent, SfxItemSet& rSet, USHORT nType);
+ SwBorderDlg(Window* pParent, SfxItemSet& rSet, sal_uInt16 nType);
~SwBorderDlg();
};
diff --git a/sw/source/ui/inc/uiitems.hxx b/sw/source/ui/inc/uiitems.hxx
index dfd891839572..f33a2b01418b 100644
--- a/sw/source/ui/inc/uiitems.hxx
+++ b/sw/source/ui/inc/uiitems.hxx
@@ -45,7 +45,7 @@ class SW_DLLPUBLIC SwPageFtnInfoItem : public SfxPoolItem
public:
- SwPageFtnInfoItem(const USHORT nId, SwPageFtnInfo& rInfo);
+ SwPageFtnInfoItem(const sal_uInt16 nId, SwPageFtnInfo& rInfo);
SwPageFtnInfoItem(const SwPageFtnInfoItem& rItem );
~SwPageFtnInfoItem();
@@ -57,8 +57,8 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
SwPageFtnInfo& GetPageFtnInfo() { return aFtnInfo; }
const SwPageFtnInfo& GetPageFtnInfo() const { return aFtnInfo; }
@@ -70,7 +70,7 @@ class SW_DLLPUBLIC SwPtrItem : public SfxPoolItem
void* pMisc;
public:
- SwPtrItem( const USHORT nId = FN_PARAM_GRF_DIALOG, void* pPtr = 0);
+ SwPtrItem( const sal_uInt16 nId = FN_PARAM_GRF_DIALOG, void* pPtr = 0);
SwPtrItem( const SwPtrItem& rItem );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -85,15 +85,15 @@ class SW_DLLPUBLIC SwUINumRuleItem : public SfxPoolItem
SwNumRule* pRule;
public:
- SwUINumRuleItem( const SwNumRule& rRule, const USHORT = FN_PARAM_ACT_NUMBER);
+ SwUINumRuleItem( const SwNumRule& rRule, const sal_uInt16 = FN_PARAM_ACT_NUMBER);
SwUINumRuleItem( const SwUINumRuleItem& rItem );
virtual ~SwUINumRuleItem();
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual int operator==( const SfxPoolItem& ) const;
- virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
const SwNumRule* GetNumRule() const { return pRule; }
SwNumRule* GetNumRule() { return pRule; }
@@ -102,7 +102,7 @@ public:
class SwBackgroundDestinationItem : public SfxUInt16Item
{
public:
- SwBackgroundDestinationItem(USHORT nWhich, USHORT nValue);
+ SwBackgroundDestinationItem(sal_uInt16 nWhich, sal_uInt16 nValue);
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
};
diff --git a/sw/source/ui/inc/uinums.hxx b/sw/source/ui/inc/uinums.hxx
index 2cb957b7dc0b..b748eafe4a04 100644
--- a/sw/source/ui/inc/uinums.hxx
+++ b/sw/source/ui/inc/uinums.hxx
@@ -50,7 +50,7 @@ class SW_DLLPUBLIC SwNumRulesWithName
{
SwNumFmt aFmt;
String sCharFmtName;
- USHORT nCharPoolId;
+ sal_uInt16 nCharPoolId;
_SwNumFmtsAttrs aItems;
_SwNumFmtGlobal& operator=( const _SwNumFmtGlobal& );
@@ -58,7 +58,7 @@ class SW_DLLPUBLIC SwNumRulesWithName
public:
_SwNumFmtGlobal( const SwNumFmt& rFmt );
_SwNumFmtGlobal( const _SwNumFmtGlobal& );
- _SwNumFmtGlobal( SvStream&, USHORT nVersion );
+ _SwNumFmtGlobal( SvStream&, sal_uInt16 nVersion );
~_SwNumFmtGlobal();
void Store( SvStream& );
@@ -73,7 +73,7 @@ protected:
public:
SwNumRulesWithName(const SwNumRule &, const String &);
SwNumRulesWithName( const SwNumRulesWithName & );
- SwNumRulesWithName(SvStream &, USHORT nVersion);
+ SwNumRulesWithName(SvStream &, sal_uInt16 nVersion);
~SwNumRulesWithName();
const SwNumRulesWithName &operator=(const SwNumRulesWithName &);
@@ -91,11 +91,11 @@ public:
protected:
SwNumRulesWithName *pNumRules[ MAX_NUM_RULES ];
String sFileName;
- USHORT nVersion;
- BOOL bModified;
+ sal_uInt16 nVersion;
+ sal_Bool bModified;
virtual int Load(SvStream&);
- virtual BOOL Store(SvStream&);
+ virtual sal_Bool Store(SvStream&);
void Init();
@@ -103,10 +103,10 @@ public:
SwBaseNumRules(const String& rFileName);
virtual ~SwBaseNumRules();
- inline const SwNumRulesWithName* GetRules(USHORT nIdx) const;
+ inline const SwNumRulesWithName* GetRules(sal_uInt16 nIdx) const;
virtual void ApplyNumRules(
const SwNumRulesWithName &rCopy,
- USHORT nIdx);
+ sal_uInt16 nIdx);
};
@@ -118,11 +118,11 @@ public:
virtual ~SwChapterNumRules();
virtual void ApplyNumRules( const SwNumRulesWithName &rCopy,
- USHORT nIdx);
+ sal_uInt16 nIdx);
};
// INLINE METHODE --------------------------------------------------------
-inline const SwNumRulesWithName *SwBaseNumRules::GetRules(USHORT nIdx) const
+inline const SwNumRulesWithName *SwBaseNumRules::GetRules(sal_uInt16 nIdx) const
{
OSL_ENSURE(nIdx < nMaxRules, "Array der NumRules ueberindiziert.");
return pNumRules[nIdx];
diff --git a/sw/source/ui/inc/uitool.hxx b/sw/source/ui/inc/uitool.hxx
index 5f0e1d93f2cd..374c00780300 100644
--- a/sw/source/ui/inc/uitool.hxx
+++ b/sw/source/ui/inc/uitool.hxx
@@ -28,7 +28,7 @@
#ifndef _UITOOL_HXX
#define _UITOOL_HXX
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include <vcl/field.hxx>
#include <swtypes.hxx>
#include "swdllapi.h"
@@ -63,7 +63,7 @@ SW_DLLPUBLIC void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem& rTabs);
//void EraseDefTabs(SvxTabStopItem& rTabs);
// Abstand zwischen dem 1. und zweitem Element ermitteln
-SW_DLLPUBLIC USHORT GetTabDist(const SvxTabStopItem& rTabs);
+SW_DLLPUBLIC sal_uInt16 GetTabDist(const SvxTabStopItem& rTabs);
// erfrage ob im Set eine Sfx-PageDesc-Kombination vorliegt
// und setze diesen im Set und loesche die Transport Items
@@ -71,27 +71,27 @@ SW_DLLPUBLIC USHORT GetTabDist(const SvxTabStopItem& rTabs);
void SwToSfxPageDescAttr( SfxItemSet& rSet );
void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet );
-SW_DLLPUBLIC FieldUnit GetDfltMetric(BOOL bWeb);
-void SetDfltMetric(FieldUnit eMetric, BOOL bWeb);
+SW_DLLPUBLIC FieldUnit GetDfltMetric(sal_Bool bWeb);
+void SetDfltMetric(FieldUnit eMetric, sal_Bool bWeb);
-SW_DLLPUBLIC BOOL HasCharUnit( BOOL bWeb );
-void SetApplyCharUnit(BOOL bApplyChar, BOOL bWeb);
+SW_DLLPUBLIC sal_Bool HasCharUnit( sal_Bool bWeb );
+void SetApplyCharUnit(sal_Bool bApplyChar, sal_Bool bWeb);
// ListBox mit allen Zeichenvorlagen fuellen - ausser Standard!
-SW_DLLPUBLIC void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted = FALSE, BOOL bWithDefault = FALSE);
+SW_DLLPUBLIC void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, sal_Bool bSorted = sal_False, sal_Bool bWithDefault = sal_False);
//inserts a string sorted into a ListBox,
-SW_DLLPUBLIC USHORT InsertStringSorted(const String& rEntry, ListBox& rToFill, USHORT nOffset);
+SW_DLLPUBLIC sal_uInt16 InsertStringSorted(const String& rEntry, ListBox& rToFill, sal_uInt16 nOffset);
// Tabellenbreite und Ausrichtung ermitteln
-SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, USHORT *pPercent,
+SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent,
SwWrtShell* pSh );
String GetAppLangDateTimeString( const DateTime& );
// search for a command string withing the menu structure and execute it
// at the dispatcher if there is one, if executed return true
-bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, USHORT nId );
+bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, sal_uInt16 nId );
#endif // _UITOOL_HXX
diff --git a/sw/source/ui/inc/uivwimp.hxx b/sw/source/ui/inc/uivwimp.hxx
index e92eb71dcf23..4c349a047c67 100644
--- a/sw/source/ui/inc/uivwimp.hxx
+++ b/sw/source/ui/inc/uivwimp.hxx
@@ -90,7 +90,7 @@ public:
void ViewDestroyed() { pView = 0; }
- void AddRemoveListener( BOOL bAdd );
+ void AddRemoveListener( sal_Bool bAdd );
};
class SwMailMergeConfigItem;
@@ -105,8 +105,7 @@ class SwView_Impl
// temporary document for printing text of selection / multi selection
// in PDF export.
- SfxObjectShellRef xTmpSelDocSh;
- SfxObjectShellRef aEmbeddedObjRef;
+ SfxObjectShellLock xTmpSelDocSh;
SwView* pView;
SwScannerEventListener* pScanEvtLstnr;
@@ -142,9 +141,7 @@ public:
void AddClipboardListener();
- SfxObjectShellRef & GetTmpSelectionDoc() { return xTmpSelDocSh; }
-
- SfxObjectShellRef& GetEmbeddedObjRef() { return *boost::addressof(aEmbeddedObjRef); }
+ SfxObjectShellLock& GetTmpSelectionDoc() { return xTmpSelDocSh; }
void AddTransferable(SwTransferable& rTransferable);
diff --git a/sw/source/ui/inc/unotools.hxx b/sw/source/ui/inc/unotools.hxx
index af9a7a3a73c6..aa710f182a6f 100644
--- a/sw/source/ui/inc/unotools.hxx
+++ b/sw/source/ui/inc/unotools.hxx
@@ -115,7 +115,7 @@ public:
STAR_REFERENCE( frame::XController ) & GetController() {return _xController;}
STAR_REFERENCE( text::XTextCursor ) & GetTextCursor() {return _xCursor;}
- void ClearDocument( BOOL bStartTimer = FALSE );
+ void ClearDocument( sal_Bool bStartTimer = sal_False );
sal_Bool IsInitialized() const {return bIsInitialized;}
sal_Bool IsServiceAvailable() const {return bServiceAvailable;}
diff --git a/sw/source/ui/inc/unotxvw.hxx b/sw/source/ui/inc/unotxvw.hxx
index e0d19471bdf5..0e11b99e946a 100644
--- a/sw/source/ui/inc/unotxvw.hxx
+++ b/sw/source/ui/inc/unotxvw.hxx
@@ -154,7 +154,7 @@ public:
void Invalidate();
// temporary document used for PDF export of selections/multi-selections
- SfxObjectShellRef BuildTmpSelectionDoc( SfxObjectShellRef& );
+ SfxObjectShellLock BuildTmpSelectionDoc();
};
typedef cppu::WeakImplHelper8<
@@ -190,12 +190,12 @@ public:
//XTextCursor - neu
virtual void SAL_CALL collapseToStart( ) throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL collapseToEnd( ) throw(::com::sun::star::uno::RuntimeException);
- virtual BOOL SAL_CALL isCollapsed( ) throw(::com::sun::star::uno::RuntimeException);
- virtual BOOL SAL_CALL goLeft( sal_Int16 nCount, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
- virtual BOOL SAL_CALL goRight( sal_Int16 nCount, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL gotoStart( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL gotoEnd( BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL gotoRange( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, BOOL bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isCollapsed( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL goLeft( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL goRight( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL gotoStart( sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL gotoEnd( sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL gotoRange( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
//XPageCursor
virtual sal_Bool SAL_CALL jumpToFirstPage(void) throw( ::com::sun::star::uno::RuntimeException );
diff --git a/sw/source/ui/inc/usrpref.hxx b/sw/source/ui/inc/usrpref.hxx
index 3d2ec33f14b1..fbf1971fe959 100644
--- a/sw/source/ui/inc/usrpref.hxx
+++ b/sw/source/ui/inc/usrpref.hxx
@@ -33,18 +33,18 @@
#include <unotools/configitem.hxx>
#include <fldupde.hxx>
#include "viewopt.hxx"
-#include <vcl/fldunit.hxx>
+#include <tools/fldunit.hxx>
class SwMasterUsrPref;
class SwContentViewConfig : public utl::ConfigItem
{
SwMasterUsrPref& rParent;
- BOOL bWeb;
+ sal_Bool bWeb;
com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
public:
- SwContentViewConfig(BOOL bWeb, SwMasterUsrPref& rParent);
+ SwContentViewConfig(sal_Bool bWeb, SwMasterUsrPref& rParent);
~SwContentViewConfig();
// utl::ConfigItem
@@ -58,11 +58,11 @@ class SwContentViewConfig : public utl::ConfigItem
class SwLayoutViewConfig : public utl::ConfigItem
{
SwMasterUsrPref& rParent;
- BOOL bWeb;
+ sal_Bool bWeb;
com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
public:
- SwLayoutViewConfig(BOOL bWeb, SwMasterUsrPref& rParent);
+ SwLayoutViewConfig(sal_Bool bWeb, SwMasterUsrPref& rParent);
~SwLayoutViewConfig();
virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
@@ -74,11 +74,11 @@ class SwLayoutViewConfig : public utl::ConfigItem
class SwGridConfig : public utl::ConfigItem
{
SwMasterUsrPref& rParent;
- BOOL bWeb;
+ sal_Bool bWeb;
com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
public:
- SwGridConfig(BOOL bWeb, SwMasterUsrPref& rParent);
+ SwGridConfig(sal_Bool bWeb, SwMasterUsrPref& rParent);
~SwGridConfig();
virtual void Commit();
@@ -136,6 +136,8 @@ class SwMasterUsrPref : public SwViewOption
sal_Int32 nDefTab; //default tab stop distance
sal_Bool bIsSquaredPageMode; //default page mode for text grid
+ sal_Bool bIsAlignMathObjectsToBaseline;
+
SwContentViewConfig aContentConfig;
SwLayoutViewConfig aLayoutConfig;
SwGridConfig aGridConfig;
@@ -144,7 +146,7 @@ class SwMasterUsrPref : public SwViewOption
sal_Bool bApplyCharUnit; // apply_char_unit
public:
- SwMasterUsrPref(BOOL bWeb);
+ SwMasterUsrPref(sal_Bool bWeb);
~SwMasterUsrPref();
void SetUsrPref(const SwViewOption &rCopy);
@@ -176,7 +178,7 @@ public:
}
sal_Int32 GetUpdateLinkMode() const {return nLinkUpdateMode; }
- void SetUpdateFields(BOOL bSet, sal_Bool bNoModify = sal_False)
+ void SetUpdateFields(sal_Bool bSet, sal_Bool bNoModify = sal_False)
{
if(bSet && eFldUpdateFlags == AUTOUPD_OFF)
{
@@ -201,7 +203,7 @@ public:
aContentConfig.SetModified();
}
- void SetUpdateCharts(BOOL bSet, sal_Bool bNoModify = sal_False)
+ void SetUpdateCharts(sal_Bool bSet, sal_Bool bNoModify = sal_False)
{
if(bSet)
{
@@ -248,7 +250,7 @@ public:
{
return bApplyCharUnit;
}
- void SetApplyCharUnit(BOOL bSet, sal_Bool bNoModify = sal_False)
+ void SetApplyCharUnit(sal_Bool bSet, sal_Bool bNoModify = sal_False)
{
bApplyCharUnit = bSet;
if(!bNoModify)
@@ -272,6 +274,13 @@ public:
aLayoutConfig.SetModified();
}
+ sal_Bool IsAlignMathObjectsToBaseline() const { return bIsAlignMathObjectsToBaseline; }
+ void SetAlignMathObjectsToBaseline( sal_Bool bVal, sal_Bool bNoModify = sal_False )
+ {
+ bIsAlignMathObjectsToBaseline = bVal;
+ if(!bNoModify)
+ aLayoutConfig.SetModified();
+ }
};
#endif
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index f454fc578e8b..56285b11d52a 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -34,7 +34,7 @@
#include <svtools/htmlcfg.hxx>
#include <sfx2/viewfac.hxx>
#include <sfx2/viewsh.hxx>
-#include <sfx2/objsh.hxx> // SfxObjectShellRef <-> SV_DECL_REF(SfxObjectShell)
+#include <sfx2/objsh.hxx>
#include <editeng/svxenum.hxx>
#include <svx/zoomitem.hxx>
#include <editeng/editstat.hxx>
@@ -59,7 +59,6 @@ class SvxRuler;
class SvxLRSpaceItem;
class SwDocShell;
class SwScrollbar;
-class PrintDialog;
class SvxVCBrowser;
class SvBorder;
class Ruler;
@@ -85,7 +84,6 @@ class CommandEvent;
class InsCaptionOpt;
class SvGlobalName;
class SvtAccessibilityOptions;
-class SwPrtOptions;
class SwTransferable;
class SwMailMergeConfigItem;
class SwTxtNode; // #i23726#
@@ -150,15 +148,15 @@ struct SwApplyTemplate
} aColl;
int eType;
- USHORT nColor;
+ sal_uInt16 nColor;
SwFormatClipboard* pFormatClipboard;
- BOOL bUndo;
+ sal_Bool bUndo;
SwApplyTemplate() :
eType(0),
nColor(0),
pFormatClipboard(0),
- bUndo(FALSE)
+ bUndo(sal_False)
{
aColl.pTxtColl = 0;
}
@@ -182,16 +180,16 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
static SvxSearchDialog *pSrchDlg;
static SvxSearchItem *pSrchItem;
- static USHORT nInsertCtrlState;
- static USHORT nWebInsertCtrlState;
- static USHORT nInsertObjectCtrlState;
- static USHORT nInsertFieldCtrlState;
- static USHORT nMoveType; // fuer Buttons unter dem Scrollbar (viewmdi)
+ static sal_uInt16 nInsertCtrlState;
+ static sal_uInt16 nWebInsertCtrlState;
+ static sal_uInt16 nInsertObjectCtrlState;
+ static sal_uInt16 nInsertFieldCtrlState;
+ static sal_uInt16 nMoveType; // fuer Buttons unter dem Scrollbar (viewmdi)
static sal_Int32 nActMark; // aktuelle Sprungmarke fuer unbenannte Merker
- static BOOL bExtra;
- static BOOL bFound;
- static BOOL bJustOpened;
+ static sal_Bool bExtra;
+ static sal_Bool bFound;
+ static sal_Bool bJustOpened;
static SearchAttrItemList* pSrchList;
static SearchAttrItemList* pReplList;
@@ -205,7 +203,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
//and the new cursor position if the user double click in the PagePreView
sNewCrsrPos;
// to support keyboard the number of the page to go to can be set too
- USHORT nNewPage;
+ sal_uInt16 nNewPage;
Point aTabColFromDocPos; //Verschieben von Tabellenspalten aus
//aus dem Dokument heraus.
@@ -254,19 +252,19 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
String aCurrShapeEnumCommand[ MASTERENUMCOMMANDS ];
- USHORT nPageCnt;
+ sal_uInt16 nPageCnt;
// Aktueller Drawmode
- USHORT nDrawSfxId;
+ sal_uInt16 nDrawSfxId;
String sDrawCustom; //some drawing types are marked with strings!
- USHORT nFormSfxId;
- USHORT nLastPasteDestination;
+ sal_uInt16 nFormSfxId;
+ sal_uInt16 nLastPasteDestination;
// save the border distance status from SwView::StateTabWin to re-use it in SwView::ExecTabWin()
- USHORT nLeftBorderDistance;
- USHORT nRightBorderDistance;
+ sal_uInt16 nLeftBorderDistance;
+ sal_uInt16 nRightBorderDistance;
- BOOL bCenterCrsr : 1,
+ sal_Bool bCenterCrsr : 1,
bTopCrsr : 1,
bAllwaysShowSel : 1,
bTabColFromDoc : 1,
@@ -292,14 +290,14 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
// Methoden fuers Suchen
// Suchkontext setzen
- SW_DLLPRIVATE BOOL SearchAndWrap(BOOL bApi = FALSE);
- SW_DLLPRIVATE BOOL SearchAll(USHORT* pFound = 0);
- SW_DLLPRIVATE ULONG FUNC_Search( const SwSearchOptions& rOptions );
+ SW_DLLPRIVATE sal_Bool SearchAndWrap(sal_Bool bApi = sal_False);
+ SW_DLLPRIVATE sal_Bool SearchAll(sal_uInt16* pFound = 0);
+ SW_DLLPRIVATE sal_uLong FUNC_Search( const SwSearchOptions& rOptions );
SW_DLLPRIVATE void Replace();
- BOOL IsDocumentBorder();
+ sal_Bool IsDocumentBorder();
- SW_DLLPRIVATE BOOL IsTextTool() const;
+ SW_DLLPRIVATE sal_Bool IsTextTool() const;
// Bedienelemente verwalten anlegen
SW_DLLPRIVATE void CreateBtns();
@@ -316,32 +314,32 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
inline long GetYScroll() const;
SW_DLLPRIVATE Point AlignToPixel(const Point& rPt) const;
SW_DLLPRIVATE void CalcPt( Point* pPt,const Rectangle& rRect,
- USHORT nRangeX = USHRT_MAX,
- USHORT nRangeY = USHRT_MAX);
+ sal_uInt16 nRangeX = USHRT_MAX,
+ sal_uInt16 nRangeY = USHRT_MAX);
- SW_DLLPRIVATE BOOL GetPageScrollUpOffset(SwTwips& rOff) const;
- SW_DLLPRIVATE BOOL GetPageScrollDownOffset(SwTwips& rOff) const;
+ SW_DLLPRIVATE sal_Bool GetPageScrollUpOffset(SwTwips& rOff) const;
+ SW_DLLPRIVATE sal_Bool GetPageScrollDownOffset(SwTwips& rOff) const;
// Scrollbar Movements
SW_DLLPRIVATE long PageUp();
SW_DLLPRIVATE long PageDown();
- SW_DLLPRIVATE long PageUpCrsr(BOOL bSelect);
- SW_DLLPRIVATE long PageDownCrsr(BOOL bSelect);
+ SW_DLLPRIVATE long PageUpCrsr(sal_Bool bSelect);
+ SW_DLLPRIVATE long PageDownCrsr(sal_Bool bSelect);
SW_DLLPRIVATE long PhyPageUp();
SW_DLLPRIVATE long PhyPageDown();
- SW_DLLPRIVATE int _CreateScrollbar( BOOL bHori );
+ SW_DLLPRIVATE int _CreateScrollbar( sal_Bool bHori );
SW_DLLPRIVATE DECL_LINK( ScrollHdl, SwScrollbar * );
SW_DLLPRIVATE DECL_LINK( EndScrollHdl, SwScrollbar * );
+ SW_DLLPRIVATE sal_Bool UpdateScrollbars();
SW_DLLPRIVATE DECL_LINK( WindowChildEventListener, VclSimpleEvent* );
- SW_DLLPRIVATE BOOL UpdateScrollbars();
SW_DLLPRIVATE void CalcVisArea( const Size &rPixelSz );
- SW_DLLPRIVATE void CreatePageButtons(BOOL bShow);
+ SW_DLLPRIVATE void CreatePageButtons(sal_Bool bShow);
// Linguistik-Funktionen
SW_DLLPRIVATE void HyphenateDocument();
- SW_DLLPRIVATE BOOL IsDrawTextHyphenate();
+ SW_DLLPRIVATE sal_Bool IsDrawTextHyphenate();
SW_DLLPRIVATE void HyphenateDrawText();
SW_DLLPRIVATE void StartThesaurus();
@@ -349,18 +347,17 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
SW_DLLPRIVATE void StartTextConversion( LanguageType nSourceLang, LanguageType nTargetLang, const Font *pTargetFont, sal_Int32 nOptions, sal_Bool bIsInteractive );
// used for spell checking and text conversion
- SW_DLLPRIVATE void SpellStart( SvxSpellArea eSpell, BOOL bStartDone,
- BOOL bEndDone, SwConversionArgs *pConvArgs = 0 );
+ SW_DLLPRIVATE void SpellStart( SvxSpellArea eSpell, sal_Bool bStartDone,
+ sal_Bool bEndDone, SwConversionArgs *pConvArgs = 0 );
SW_DLLPRIVATE void SpellEnd( SwConversionArgs *pConvArgs = 0 );
SW_DLLPRIVATE void HyphStart( SvxSpellArea eSpell );
- SW_DLLPRIVATE BOOL CheckSpecialCntnt();
- SW_DLLPRIVATE void SpellKontext(BOOL bOn = TRUE)
+ SW_DLLPRIVATE sal_Bool CheckSpecialCntnt();
+ SW_DLLPRIVATE void SpellKontext(sal_Bool bOn = sal_True)
{ bCenterCrsr = bOn; bAllwaysShowSel = bOn; }
// Methoden fuers Printing
- SW_DLLPRIVATE virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
- SW_DLLPRIVATE virtual PrintDialog* CreatePrintDialog( Window* pParent );
+ SW_DLLPRIVATE virtual SfxPrinter* GetPrinter( sal_Bool bCreate = sal_False );
SfxTabPage* CreatePrintOptionsPage( Window* pParent,
const SfxItemSet& rSet);
// fuer Readonly-Umschaltung
@@ -374,14 +371,14 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
SW_DLLPRIVATE void _SetZoom( const Size &rEditSz,
SvxZoomType eZoomType,
short nFactor = 100,
- BOOL bViewOnly = FALSE);
- SW_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill, BOOL bInner );
+ sal_Bool bViewOnly = sal_False);
+ SW_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool bInner );
SW_DLLPRIVATE void ShowAtResize();
SW_DLLPRIVATE virtual void Move();
- SW_DLLPRIVATE BOOL InsertGraphicDlg( SfxRequest& );
+ SW_DLLPRIVATE sal_Bool InsertGraphicDlg( SfxRequest& );
protected:
@@ -398,8 +395,8 @@ protected:
virtual void SelectShell();
- virtual void Activate(BOOL);
- virtual void Deactivate(BOOL);
+ virtual void Activate(sal_Bool);
+ virtual void Deactivate(sal_Bool);
virtual void InnerResizePixel( const Point &rOfs, const Size &rSize );
virtual void OuterResizePixel( const Point &rOfs, const Size &rSize );
virtual Size GetOptimalSizePixel() const;
@@ -410,7 +407,7 @@ protected:
void SetLastTblFrmFmt(const SwFrmFmt* pSet) {pLastTableFormat = pSet;}
// form letter execution
- void GenerateFormLetter(BOOL bUseCurrentDocument);
+ void GenerateFormLetter(sal_Bool bUseCurrentDocument);
using SfxShell::GetDispatcher;
@@ -425,20 +422,20 @@ public:
void GotFocus() const;
virtual SdrView* GetDrawView() const;
virtual sal_Bool HasUIFeature( sal_uInt32 nFeature );
- virtual void ShowCursor( bool bOn = TRUE );
+ virtual void ShowCursor( bool bOn = sal_True );
virtual ErrCode DoVerb( long nVerb );
- virtual USHORT SetPrinter( SfxPrinter* pNew,
- USHORT nDiff = SFX_PRINTER_ALL, bool bIsAPI=false);
+ virtual sal_uInt16 SetPrinter( SfxPrinter* pNew,
+ sal_uInt16 nDiff = SFX_PRINTER_ALL, bool bIsAPI=false);
ShellModes GetShellMode();
com::sun::star::view::XSelectionSupplier* GetUNOObject();
- String GetSelectionTextParam( BOOL bCompleteWords,
- BOOL bEraseTrail );
- virtual BOOL HasSelection( BOOL bText ) const;
- virtual String GetSelectionText( BOOL bCompleteWords = FALSE );
- virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
+ String GetSelectionTextParam( sal_Bool bCompleteWords,
+ sal_Bool bEraseTrail );
+ virtual sal_Bool HasSelection( sal_Bool bText ) const;
+ virtual String GetSelectionText( sal_Bool bCompleteWords = sal_False );
+ virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False );
virtual void MarginChanged();
// replace word/selection with text from the thesaurus
@@ -456,7 +453,7 @@ public:
inline SwEditWin &GetEditWin() { return *pEditWin; }
inline const SwEditWin &GetEditWin () const { return *pEditWin; }
-#if defined WIN || defined WNT || defined UNX
+#if defined WNT || defined UNX
void ScannerEventHdl( const ::com::sun::star::lang::EventObject& rEventObject );
#endif
@@ -465,58 +462,59 @@ public:
inline const Rectangle& GetVisArea() const { return aVisArea; }
- BOOL IsScroll(const Rectangle& rRect) const;
+ sal_Bool IsScroll(const Rectangle& rRect) const;
void Scroll( const Rectangle& rRect,
- USHORT nRangeX = USHRT_MAX,
- USHORT nRangeY = USHRT_MAX);
+ sal_uInt16 nRangeX = USHRT_MAX,
+ sal_uInt16 nRangeY = USHRT_MAX);
long SetVScrollMax(long lMax);
long SetHScrollMax(long lMax);
DECL_LINK( SpellError, LanguageType * );
- BOOL ExecSpellPopup( const Point& rPt );
- void ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM );
+ sal_Bool ExecSpellPopup( const Point& rPt );
+ void ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM );
+
// SMARTTAGS
- BOOL ExecSmartTagPopup( const Point& rPt );
+ sal_Bool ExecSmartTagPopup( const Point& rPt );
DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*);
- BOOL ExecDrwTxtSpellPopup(const Point& rPt);
+ sal_Bool ExecDrwTxtSpellPopup(const Point& rPt);
void SetTabColFromDocPos( const Point &rPt ) { aTabColFromDocPos = rPt; }
- void SetTabColFromDoc( BOOL b ) { bTabColFromDoc = b; }
- BOOL IsTabColFromDoc() const { return bTabColFromDoc; }
- void SetTabRowFromDoc( BOOL b ) { bTabRowFromDoc = b; }
- BOOL IsTabRowFromDoc() const { return bTabRowFromDoc; }
+ void SetTabColFromDoc( sal_Bool b ) { bTabColFromDoc = b; }
+ sal_Bool IsTabColFromDoc() const { return bTabColFromDoc; }
+ void SetTabRowFromDoc( sal_Bool b ) { bTabRowFromDoc = b; }
+ sal_Bool IsTabRowFromDoc() const { return bTabRowFromDoc; }
// -> #i23726#
void SetNumRuleNodeFromDoc( SwTxtNode * pNumRuleNode )
{ pNumRuleNodeFromDoc = pNumRuleNode; }
- void SetNumIndentFromDoc(BOOL b) { bNumIndentFromDoc = b; }
- BOOL IsNumIndentFromDoc() const { return NULL != pNumRuleNodeFromDoc; }
+ void SetNumIndentFromDoc(sal_Bool b) { bNumIndentFromDoc = b; }
+ sal_Bool IsNumIndentFromDoc() const { return NULL != pNumRuleNodeFromDoc; }
// <- #i23726#
void DocSzChgd( const Size& rNewSize );
const Size& GetDocSz() const { return aDocSz; }
- virtual void SetVisArea( const Rectangle&, BOOL bUpdateScrollbar = TRUE);
- void SetVisArea( const Point&, BOOL bUpdateScrollbar = TRUE);
+ virtual void SetVisArea( const Rectangle&, sal_Bool bUpdateScrollbar = sal_True);
+ void SetVisArea( const Point&, sal_Bool bUpdateScrollbar = sal_True);
void CheckVisArea();
static LAYOUT_NS Dialog* GetSearchDialog();
- static USHORT GetMoveType();
- static void SetMoveType(USHORT nSet);
+ static sal_uInt16 GetMoveType();
+ static void SetMoveType(sal_uInt16 nSet);
DECL_STATIC_LINK( SwView, MoveNavigationHdl, bool* ); // #i75416#
static void SetActMark(sal_Int32 nSet);
- BOOL HandleWheelCommands( const CommandEvent& );
+ sal_Bool HandleWheelCommands( const CommandEvent& );
// Rahmen einfuegen
- void InsFrmMode(USHORT nCols);
+ void InsFrmMode(sal_uInt16 nCols);
- void SetZoom( SvxZoomType eZoomType, short nFactor = 100, BOOL bViewOnly = FALSE);
+ void SetZoom( SvxZoomType eZoomType, short nFactor = 100, sal_Bool bViewOnly = sal_False);
virtual void SetZoomFactor( const Fraction &rX, const Fraction & );
- void SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly = FALSE );
+ void SetViewLayout( sal_uInt16 nColumns, bool bBookMode, sal_Bool bViewOnly = sal_False );
void ShowHScrollbar(sal_Bool bShow);
sal_Bool IsHScrollbarVisible()const;
@@ -555,7 +553,7 @@ public:
void ExecTabWin(SfxRequest&);
void ExecuteStatusLine(SfxRequest&);
DECL_LINK( ExecRulerClick, Ruler * );
- void ExecSearch(SfxRequest&, BOOL bNoMessage = FALSE);
+ void ExecSearch(SfxRequest&, sal_Bool bNoMessage = sal_False);
void ExecViewOptions(SfxRequest &);
void StateViewOptions(SfxItemSet &);
@@ -566,24 +564,24 @@ public:
// Funktionen fuer Drawing
void SetDrawFuncPtr(SwDrawBase* pFuncPtr);
- inline SwDrawBase* GetDrawFuncPtr(/*BOOL bBuf = FALSE*/) const { return pDrawActual; }
+ inline SwDrawBase* GetDrawFuncPtr(/*sal_Bool bBuf = sal_False*/) const { return pDrawActual; }
void GetDrawState(SfxItemSet &rSet);
void ExitDraw();
- inline BOOL IsDrawRotate() { return bDrawRotate; }
+ inline sal_Bool IsDrawRotate() { return bDrawRotate; }
inline void FlipDrawRotate() { bDrawRotate = !bDrawRotate; }
- inline BOOL IsDrawSelMode() { return bDrawSelMode; }
+ inline sal_Bool IsDrawSelMode() { return bDrawSelMode; }
void SetSelDrawSlot();
inline void FlipDrawSelMode() { bDrawSelMode = !bDrawSelMode; }
void NoRotate(); // Rotate-Mode abschalten
- BOOL EnterDrawTextMode(const Point& aDocPos);
+ sal_Bool EnterDrawTextMode(const Point& aDocPos);
void LeaveDrawCreate() { nDrawSfxId = nFormSfxId = USHRT_MAX; sDrawCustom.Erase();}
- BOOL IsDrawMode() { return (nDrawSfxId != USHRT_MAX || nFormSfxId != USHRT_MAX); }
- BOOL IsFormMode() const;
- BOOL IsBezierEditMode();
- BOOL AreOnlyFormsSelected() const;
- BOOL HasDrwObj(SdrObject *pSdrObj) const;
- BOOL HasOnlyObj(SdrObject *pSdrObj, UINT32 eObjInventor) const;
- BOOL BeginTextEdit( SdrObject* pObj, SdrPageView* pPV=NULL,
+ sal_Bool IsDrawMode() { return (nDrawSfxId != USHRT_MAX || nFormSfxId != USHRT_MAX); }
+ sal_Bool IsFormMode() const;
+ sal_Bool IsBezierEditMode();
+ sal_Bool AreOnlyFormsSelected() const;
+ sal_Bool HasDrwObj(SdrObject *pSdrObj) const;
+ sal_Bool HasOnlyObj(SdrObject *pSdrObj, sal_uInt32 eObjInventor) const;
+ sal_Bool BeginTextEdit( SdrObject* pObj, SdrPageView* pPV=NULL,
Window* pWin=NULL, bool bIsNewObj=false, bool bSetSelectionToStart=false );
void StateTabWin(SfxItemSet&);
@@ -596,13 +594,13 @@ public:
// Links bearbeiten
void EditLinkDlg();
- void AutoCaption(const USHORT nType, const SvGlobalName *pOleId = 0);
+ void AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId = 0);
void InsertCaption(const InsCaptionOpt *pOpt);
// Async Aufruf durch Core
- void UpdatePageNums(USHORT nPhyNum, USHORT nVirtNum, const String& rPgStr);
+ void UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr);
- String GetPageStr(USHORT nPhyNum, USHORT nVirtNum, const String& rPgStr);
+ String GetPageStr(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr);
// Shell rausreichen
SfxShell *GetCurShell() { return pShell; }
@@ -614,32 +612,32 @@ public:
//damit in DToren der SubShells ggf. pShell zurueckgesetzt werden kann
void ResetSubShell() { pShell = 0; }
- virtual void WriteUserData(String &, BOOL bBrowse = FALSE );
- virtual void ReadUserData(const String &, BOOL bBrowse = FALSE );
+ virtual void WriteUserData(String &, sal_Bool bBrowse = sal_False );
+ virtual void ReadUserData(const String &, sal_Bool bBrowse = sal_False );
virtual void ReadUserDataSequence ( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse );
virtual void WriteUserDataSequence ( com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse );
- void SetCrsrAtTop( BOOL bFlag, BOOL bCenter = FALSE )
+ void SetCrsrAtTop( sal_Bool bFlag, sal_Bool bCenter = sal_False )
{ bTopCrsr = bFlag, bCenterCrsr = bCenter; }
- BOOL IsCrsrAtTop() const { return bTopCrsr; }
- BOOL IsCrsrAtCenter() const { return bCenterCrsr; }
+ sal_Bool IsCrsrAtTop() const { return bTopCrsr; }
+ sal_Bool IsCrsrAtCenter() const { return bCenterCrsr; }
- BOOL JumpToSwMark( const String& rMark );
+ sal_Bool JumpToSwMark( const String& rMark );
- long InsertDoc( USHORT nSlotId, const String& rFileName,
- const String& rFilterName, INT16 nVersion = 0 );
+ long InsertDoc( sal_uInt16 nSlotId, const String& rFileName,
+ const String& rFilterName, sal_Int16 nVersion = 0 );
void ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem );
- long InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion );
+ long InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVersion );
DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper * );
// status methods for clipboard.
// Status changes now notified from the clipboard.
- BOOL IsPasteAllowed();
- BOOL IsPasteSpecialAllowed();
+ sal_Bool IsPasteAllowed();
+ sal_Bool IsPasteSpecialAllowed();
// Enable mail merge - mail merge field dialog enabled
- void EnableMailMerge(BOOL bEnable = TRUE);
+ void EnableMailMerge(sal_Bool bEnable = sal_True);
//apply Accessiblity options
void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions);
@@ -648,8 +646,8 @@ public:
void NotifyDBChanged();
- SfxObjectShellRef & GetTmpSelectionDoc();
- SfxObjectShellRef & GetOrCreateTmpSelectionDoc();
+ SfxObjectShellLock & GetTmpSelectionDoc();
+ SfxObjectShellLock & GetOrCreateTmpSelectionDoc();
void AddTransferable(SwTransferable& rTransferable);
@@ -665,9 +663,9 @@ public:
//public fuer D&D
int InsertGraphic( const String &rPath, const String &rFilter,
- BOOL bLink = TRUE, GraphicFilter *pFlt = 0,
+ sal_Bool bLink = sal_True, GraphicFilter *pFlt = 0,
Graphic* pPreviewGrf = 0,
- BOOL bRule = FALSE );
+ sal_Bool bRule = sal_False );
void ExecuteScan( SfxRequest& rReq );
@@ -693,7 +691,7 @@ inline const SwDocShell *SwView::GetDocShell() const
SfxTabPage* CreatePrintOptionsPage( Window *pParent,
const SfxItemSet &rOptions,
- BOOL bPreview);
+ sal_Bool bPreview);
#endif
diff --git a/sw/source/ui/inc/viewlayoutctrl.hxx b/sw/source/ui/inc/viewlayoutctrl.hxx
index 8363955a165e..fd02906129a8 100644
--- a/sw/source/ui/inc/viewlayoutctrl.hxx
+++ b/sw/source/ui/inc/viewlayoutctrl.hxx
@@ -43,12 +43,12 @@ public:
SFX_DECL_STATUSBAR_CONTROL();
- SwViewLayoutControl( USHORT nSlotId, USHORT nId, StatusBar& rStb );
+ SwViewLayoutControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb );
~SwViewLayoutControl();
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
virtual void Paint( const UserDrawEvent& rEvt );
- virtual BOOL MouseButtonDown( const MouseEvent & );
+ virtual sal_Bool MouseButtonDown( const MouseEvent & );
};
#endif
diff --git a/sw/source/ui/inc/workctrl.hxx b/sw/source/ui/inc/workctrl.hxx
index cfc02d6fec68..805f7382babc 100644
--- a/sw/source/ui/inc/workctrl.hxx
+++ b/sw/source/ui/inc/workctrl.hxx
@@ -31,7 +31,7 @@
#include <sfx2/tbxctrl.hxx>
#include <vcl/toolbox.hxx>
#include <svtools/stdctrl.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
class PopupMenu;
class SwView;
@@ -69,20 +69,20 @@ class SwView;
class SwTbxInsertCtrl : public SfxToolBoxControl
{
- USHORT nLastSlotId;
+ sal_uInt16 nLastSlotId;
using SfxToolBoxControl::Select;
- virtual void Select( BOOL bMod1 = FALSE );
+ virtual void Select( sal_Bool bMod1 = sal_False );
public:
SFX_DECL_TOOLBOX_CONTROL();
- SwTbxInsertCtrl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ SwTbxInsertCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~SwTbxInsertCtrl();
virtual SfxPopupWindowType GetPopupWindowType() const;
virtual SfxPopupWindow* CreatePopupWindow();
- virtual void StateChanged( USHORT nSID,
+ virtual void StateChanged( sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState );
@@ -103,12 +103,12 @@ class SwTbxAutoTextCtrl : public SfxToolBoxControl
public:
SFX_DECL_TOOLBOX_CONTROL();
- SwTbxAutoTextCtrl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ SwTbxAutoTextCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~SwTbxAutoTextCtrl();
virtual SfxPopupWindowType GetPopupWindowType() const;
virtual SfxPopupWindow* CreatePopupWindow();
- virtual void StateChanged( USHORT nSID,
+ virtual void StateChanged( sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState );
@@ -139,8 +139,8 @@ class SwScrollNaviPopup : public SfxPopupWindow
String sQuickHelp[2 * NID_COUNT];
- USHORT nFwdId;
- USHORT nBackId;
+ sal_uInt16 nFwdId;
+ sal_uInt16 nBackId;
void ApplyImageList();
@@ -151,10 +151,10 @@ protected:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
public:
- SwScrollNaviPopup( USHORT nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
+ SwScrollNaviPopup( sal_uInt16 nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame );
~SwScrollNaviPopup();
- static String GetQuickHelpText(BOOL bNext);
+ static String GetQuickHelpText(sal_Bool bNext);
virtual SfxPopupWindow* Clone() const;
void GrabFocus(){aToolBox.GrabFocus();}
@@ -191,9 +191,9 @@ class SwNaviImageButton : public ImageButton
class SwHlpImageButton : public ImageButton
{
- BOOL bUp;
+ sal_Bool bUp;
public:
- SwHlpImageButton(Window* pParent, const ResId& rResId, BOOL bUpBtn) :
+ SwHlpImageButton(Window* pParent, const ResId& rResId, sal_Bool bUpBtn) :
ImageButton(pParent, rResId), bUp(bUpBtn){}
virtual void RequestHelp( const HelpEvent& rHEvt );
@@ -205,10 +205,10 @@ class SwPreviewZoomControl : public SfxToolBoxControl
public:
SFX_DECL_TOOLBOX_CONTROL();
- SwPreviewZoomControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ SwPreviewZoomControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~SwPreviewZoomControl();
- virtual void StateChanged( USHORT nSID,
+ virtual void StateChanged( sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState );
diff --git a/sw/source/ui/inc/wrap.hxx b/sw/source/ui/inc/wrap.hxx
index ef8172ec7218..94e5e7f9be3f 100644
--- a/sw/source/ui/inc/wrap.hxx
+++ b/sw/source/ui/inc/wrap.hxx
@@ -31,7 +31,7 @@
#include <sfx2/tabdlg.hxx>
#include <sfx2/basedlgs.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/button.hxx>
@@ -48,7 +48,7 @@ class SwWrapDlg : public SfxSingleTabDialog
SwWrtShell* pWrtShell;
public:
- SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode);
+ SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode);
~SwWrapDlg();
inline SwWrtShell* GetWrtShell() { return pWrtShell; }
@@ -92,22 +92,22 @@ class SwWrapTabPage: public SfxTabPage
ImageList aWrapIL;
ImageList aWrapILH;
- USHORT nOldLeftMargin;
- USHORT nOldRightMargin;
- USHORT nOldUpperMargin;
- USHORT nOldLowerMargin;
+ sal_uInt16 nOldLeftMargin;
+ sal_uInt16 nOldRightMargin;
+ sal_uInt16 nOldUpperMargin;
+ sal_uInt16 nOldLowerMargin;
RndStdIds nAnchorId;
- USHORT nHtmlMode;
+ sal_uInt16 nHtmlMode;
Size aFrmSize;
SwWrtShell* pWrtSh;
- BOOL bFormat;
- BOOL bNew;
- BOOL bHtmlMode;
- BOOL bDrawMode;
- BOOL bContourImage;
+ sal_Bool bFormat;
+ sal_Bool bNew;
+ sal_Bool bHtmlMode;
+ sal_Bool bDrawMode;
+ sal_Bool bContourImage;
SwWrapTabPage(Window *pParent, const SfxItemSet &rSet);
~SwWrapTabPage();
@@ -129,12 +129,12 @@ public:
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset(const SfxItemSet &rSet);
- static USHORT* GetRanges();
- inline void SetNewFrame(BOOL bNewFrame) { bNew = bNewFrame; }
- inline void SetFormatUsed(BOOL bFmt, BOOL bDrw) { bFormat = bFmt;
+ static sal_uInt16* GetRanges();
+ inline void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; }
+ inline void SetFormatUsed(sal_Bool bFmt, sal_Bool bDrw) { bFormat = bFmt;
bDrawMode = bDrw; }
inline void SetShell(SwWrtShell* pSh) { pWrtSh = pSh; }
};
diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
index 42be4412fe3a..db1f651b099f 100644
--- a/sw/source/ui/inc/wrtsh.hxx
+++ b/sw/source/ui/inc/wrtsh.hxx
@@ -108,7 +108,7 @@ public:
using SwEditShell::Insert;
- typedef long (SwWrtShell::*SELECTFUNC)(const Point *, BOOL bProp );
+ typedef long (SwWrtShell::*SELECTFUNC)(const Point *, sal_Bool bProp );
SELECTFUNC fnDrag;
SELECTFUNC fnSetCrsr;
@@ -116,160 +116,160 @@ public:
SELECTFUNC fnKillSel;
// Alle Selektionen aufheben
- long ResetSelect( const Point *, BOOL );
+ long ResetSelect( const Point *, sal_Bool );
//setzt den Cursorstack nach dem Bewegen mit PageUp/-Down
//zurueck, falls ein Stack aufgebaut ist
inline void ResetCursorStack();
SelectionType GetSelectionType() const;
- BOOL IsModePushed() const { return 0 != pModeStack; }
+ sal_Bool IsModePushed() const { return 0 != pModeStack; }
void PushMode();
void PopMode();
void SttSelect();
void EndSelect();
- BOOL IsInSelect() const { return bInSelect; }
- void SetInSelect(BOOL bSel = TRUE) { bInSelect = bSel; }
+ sal_Bool IsInSelect() const { return bInSelect; }
+ void SetInSelect(sal_Bool bSel = sal_True) { bInSelect = bSel; }
// Liegt eine Text- oder Rahmenselektion vor?
- BOOL HasSelection() const { return SwCrsrShell::HasSelection() ||
+ sal_Bool HasSelection() const { return SwCrsrShell::HasSelection() ||
IsMultiSelection() || IsSelFrmMode() || IsObjSelected(); }
- BOOL Pop( BOOL bOldCrsr = TRUE );
+ sal_Bool Pop( sal_Bool bOldCrsr = sal_True );
void EnterStdMode();
- BOOL IsStdMode() const { return !bExtMode && !bAddMode && !bBlockMode; }
+ sal_Bool IsStdMode() const { return !bExtMode && !bAddMode && !bBlockMode; }
void EnterExtMode();
void LeaveExtMode();
long ToggleExtMode();
- BOOL IsExtMode() const { return bExtMode; }
+ sal_Bool IsExtMode() const { return bExtMode; }
void EnterAddMode();
void LeaveAddMode();
long ToggleAddMode();
- BOOL IsAddMode() const { return bAddMode; }
+ sal_Bool IsAddMode() const { return bAddMode; }
void EnterBlockMode();
void LeaveBlockMode();
long ToggleBlockMode();
- BOOL IsBlockMode() const { return bBlockMode; }
+ sal_Bool IsBlockMode() const { return bBlockMode; }
- void SetInsMode( BOOL bOn = TRUE );
+ void SetInsMode( sal_Bool bOn = sal_True );
void ToggleInsMode() { SetInsMode( !bIns ); }
- BOOL IsInsMode() const { return bIns; }
- void SetRedlineModeAndCheckInsMode( USHORT eMode );
+ sal_Bool IsInsMode() const { return bIns; }
+ void SetRedlineModeAndCheckInsMode( sal_uInt16 eMode );
void EnterSelFrmMode(const Point *pStartDrag = 0);
void LeaveSelFrmMode();
- BOOL IsSelFrmMode() const { return bLayoutMode; }
+ sal_Bool IsSelFrmMode() const { return bLayoutMode; }
// Selektion von Rahmen aufheben
void UnSelectFrm();
void Invalidate();
// Tabellenzellen selektieren fuer Bearbeiten von Formeln in der Ribbonbar
- inline void SelTblCells( const Link &rLink, BOOL bMark = TRUE );
+ inline void SelTblCells( const Link &rLink, sal_Bool bMark = sal_True );
inline void EndSelTblCells();
//Wortweisen oder zeilenweisen Selektionsmodus verlassen. Wird
//in der Regel in MB-Up gerufen.
- BOOL IsExtSel() const { return bSelWrd || bSelLn; }
+ sal_Bool IsExtSel() const { return bSelWrd || bSelLn; }
// erfrage, ob der akt. fnDrag - Pointer auf BeginDrag gesetzt ist
// Wird fuer MouseMove gebraucht, um die Bugs 55592/55931 zu umgehen.
- inline BOOL Is_FnDragEQBeginDrag() const;
+ inline sal_Bool Is_FnDragEQBeginDrag() const;
//Basisabfragen
- BOOL IsInWrd() { return IsInWord(); }
- BOOL IsSttWrd() { return IsStartWord(); }
- BOOL IsEndWrd();
- BOOL IsSttOfPara() const { return IsSttPara(); }
- BOOL IsEndOfPara() const { return IsEndPara(); }
+ sal_Bool IsInWrd() { return IsInWord(); }
+ sal_Bool IsSttWrd() { return IsStartWord(); }
+ sal_Bool IsEndWrd();
+ sal_Bool IsSttOfPara() const { return IsSttPara(); }
+ sal_Bool IsEndOfPara() const { return IsEndPara(); }
//Word bzw. Satz selektieren.
- BOOL SelNearestWrd();
- BOOL SelWrd (const Point * = 0, BOOL bProp=FALSE );
+ sal_Bool SelNearestWrd();
+ sal_Bool SelWrd (const Point * = 0, sal_Bool bProp=sal_False );
// --> FME 2004-07-30 #i32329# Enhanced selection
- void SelSentence (const Point * = 0, BOOL bProp=FALSE );
- void SelPara (const Point * = 0, BOOL bProp=FALSE );
+ void SelSentence (const Point * = 0, sal_Bool bProp=sal_False );
+ void SelPara (const Point * = 0, sal_Bool bProp=sal_False );
// <--
long SelAll();
//Basiscursortravelling
-typedef BOOL (SwWrtShell:: *FNSimpleMove)();
- BOOL SimpleMove( FNSimpleMove, BOOL bSelect );
-
- BOOL Left ( USHORT nMode, BOOL bSelect,
- USHORT nCount, BOOL bBasicCall, BOOL bVisual = FALSE );
- BOOL Right ( USHORT nMode, BOOL bSelect,
- USHORT nCount, BOOL bBasicCall, BOOL bVisual = FALSE );
- BOOL Up ( BOOL bSelect = FALSE, USHORT nCount = 1,
- BOOL bBasicCall = FALSE );
- BOOL Down ( BOOL bSelect = FALSE, USHORT nCount = 1,
- BOOL bBasicCall = FALSE );
- BOOL NxtWrd ( BOOL bSelect = FALSE ) { return SimpleMove( &SwWrtShell::_NxtWrd, bSelect ); }
- BOOL PrvWrd ( BOOL bSelect = FALSE ) { return SimpleMove( &SwWrtShell::_PrvWrd, bSelect ); }
-
- BOOL LeftMargin ( BOOL bSelect, BOOL bBasicCall );
- BOOL RightMargin( BOOL bSelect, BOOL bBasicCall );
-
- BOOL SttDoc ( BOOL bSelect = FALSE );
- BOOL EndDoc ( BOOL bSelect = FALSE );
-
- BOOL SttNxtPg ( BOOL bSelect = FALSE );
- BOOL SttPrvPg ( BOOL bSelect = FALSE );
- BOOL EndNxtPg ( BOOL bSelect = FALSE );
- BOOL EndPrvPg ( BOOL bSelect = FALSE );
- BOOL SttPg ( BOOL bSelect = FALSE );
- BOOL EndPg ( BOOL bSelect = FALSE );
- BOOL SttPara ( BOOL bSelect = FALSE );
- BOOL EndPara ( BOOL bSelect = FALSE );
- BOOL FwdPara ( BOOL bSelect = FALSE )
+typedef sal_Bool (SwWrtShell:: *FNSimpleMove)();
+ sal_Bool SimpleMove( FNSimpleMove, sal_Bool bSelect );
+
+ sal_Bool Left ( sal_uInt16 nMode, sal_Bool bSelect,
+ sal_uInt16 nCount, sal_Bool bBasicCall, sal_Bool bVisual = sal_False );
+ sal_Bool Right ( sal_uInt16 nMode, sal_Bool bSelect,
+ sal_uInt16 nCount, sal_Bool bBasicCall, sal_Bool bVisual = sal_False );
+ sal_Bool Up ( sal_Bool bSelect = sal_False, sal_uInt16 nCount = 1,
+ sal_Bool bBasicCall = sal_False );
+ sal_Bool Down ( sal_Bool bSelect = sal_False, sal_uInt16 nCount = 1,
+ sal_Bool bBasicCall = sal_False );
+ sal_Bool NxtWrd ( sal_Bool bSelect = sal_False ) { return SimpleMove( &SwWrtShell::_NxtWrd, bSelect ); }
+ sal_Bool PrvWrd ( sal_Bool bSelect = sal_False ) { return SimpleMove( &SwWrtShell::_PrvWrd, bSelect ); }
+
+ sal_Bool LeftMargin ( sal_Bool bSelect, sal_Bool bBasicCall );
+ sal_Bool RightMargin( sal_Bool bSelect, sal_Bool bBasicCall );
+
+ sal_Bool SttDoc ( sal_Bool bSelect = sal_False );
+ sal_Bool EndDoc ( sal_Bool bSelect = sal_False );
+
+ sal_Bool SttNxtPg ( sal_Bool bSelect = sal_False );
+ sal_Bool SttPrvPg ( sal_Bool bSelect = sal_False );
+ sal_Bool EndNxtPg ( sal_Bool bSelect = sal_False );
+ sal_Bool EndPrvPg ( sal_Bool bSelect = sal_False );
+ sal_Bool SttPg ( sal_Bool bSelect = sal_False );
+ sal_Bool EndPg ( sal_Bool bSelect = sal_False );
+ sal_Bool SttPara ( sal_Bool bSelect = sal_False );
+ sal_Bool EndPara ( sal_Bool bSelect = sal_False );
+ sal_Bool FwdPara ( sal_Bool bSelect = sal_False )
{ return SimpleMove( &SwWrtShell::_FwdPara, bSelect ); }
- BOOL BwdPara ( BOOL bSelect = FALSE )
+ sal_Bool BwdPara ( sal_Bool bSelect = sal_False )
{ return SimpleMove( &SwWrtShell::_BwdPara, bSelect ); }
- BOOL FwdSentence( BOOL bSelect = FALSE )
+ sal_Bool FwdSentence( sal_Bool bSelect = sal_False )
{ return SimpleMove( &SwWrtShell::_FwdSentence, bSelect ); }
- BOOL BwdSentence( BOOL bSelect = FALSE )
+ sal_Bool BwdSentence( sal_Bool bSelect = sal_False )
{ return SimpleMove( &SwWrtShell::_BwdSentence, bSelect ); }
// --> FME 2004-07-30 #i20126# Enhanced table selection
- BOOL SelectTableRowCol( const Point& rPt, const Point* pEnd = 0, bool bRowDrag = false );
+ sal_Bool SelectTableRowCol( const Point& rPt, const Point* pEnd = 0, bool bRowDrag = false );
// <--
- BOOL SelectTableRow();
- BOOL SelectTableCol();
- BOOL SelectTableCell();
+ sal_Bool SelectTableRow();
+ sal_Bool SelectTableCol();
+ sal_Bool SelectTableCell();
- BOOL SelectTxtAttr( USHORT nWhich, const SwTxtAttr* pAttr = 0 );
+ sal_Bool SelectTxtAttr( sal_uInt16 nWhich, const SwTxtAttr* pAttr = 0 );
// Spaltenweise Spruenge
- BOOL StartOfColumn ( BOOL bSelect = FALSE );
- BOOL EndOfColumn ( BOOL bSelect = FALSE );
- BOOL StartOfNextColumn ( BOOL bSelect = FALSE );
- BOOL EndOfNextColumn ( BOOL bSelect = FALSE );
- BOOL StartOfPrevColumn ( BOOL bSelect = FALSE );
- BOOL EndOfPrevColumn ( BOOL bSelect = FALSE );
+ sal_Bool StartOfColumn ( sal_Bool bSelect = sal_False );
+ sal_Bool EndOfColumn ( sal_Bool bSelect = sal_False );
+ sal_Bool StartOfNextColumn ( sal_Bool bSelect = sal_False );
+ sal_Bool EndOfNextColumn ( sal_Bool bSelect = sal_False );
+ sal_Bool StartOfPrevColumn ( sal_Bool bSelect = sal_False );
+ sal_Bool EndOfPrevColumn ( sal_Bool bSelect = sal_False );
// setze den Cursor auf die Seite "nPage" an den Anfang
// zusaetzlich zu der gleichnamigen Implementierung in crsrsh.hxx
// werden hier alle bestehenden Selektionen vor dem Setzen des
// Cursors aufgehoben
- BOOL GotoPage( USHORT nPage, BOOL bRecord );
+ sal_Bool GotoPage( sal_uInt16 nPage, sal_Bool bRecord );
//setzen des Cursors; merken der alten Position fuer Zurueckblaettern.
DECL_LINK( ExecFlyMac, void * );
- BOOL PageCrsr(SwTwips lOffset, BOOL bSelect);
+ sal_Bool PageCrsr(SwTwips lOffset, sal_Bool bSelect);
// Felder Update
- void UpdateInputFlds( SwInputFieldList* pLst = 0, BOOL bOnlyInSel = FALSE );
+ void UpdateInputFlds( SwInputFieldList* pLst = 0, sal_Bool bOnlyInSel = sal_False );
- void NoEdit(BOOL bHideCrsr = TRUE);
+ void NoEdit(sal_Bool bHideCrsr = sal_True);
void Edit();
- BOOL IsNoEdit() const { return bNoEdit; }
+ sal_Bool IsNoEdit() const { return bNoEdit; }
- BOOL IsRetainSelection() const { return mbRetainSelection; }
- void SetRetainSelection( BOOL bRet ) { mbRetainSelection = bRet; }
+ sal_Bool IsRetainSelection() const { return mbRetainSelection; }
+ void SetRetainSelection( sal_Bool bRet ) { mbRetainSelection = bRet; }
// change current data base and notify
void ChgDBData(const SwDBData& SwDBData);
@@ -281,7 +281,7 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
long DelLeft();
// loescht auch Rahmen bzw. setzt den Cursor in den Rahmen,
- // wenn bDelFrm == FALSE ist
+ // wenn bDelFrm == sal_False ist
long DelRight();
long DelToEndOfPara();
long DelToStartOfPara();
@@ -300,7 +300,7 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
WORD_SPACE_AFTER = 2,
WORD_NO_SPACE = 3
};
- int IntelligentCut(int nSelectionType, BOOL bCut = TRUE);
+ int IntelligentCut(int nSelectionType, sal_Bool bCut = sal_True);
// Editieren
void Insert(SwField &);
@@ -308,28 +308,28 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
// Graphic
void Insert( const String &rPath, const String &rFilter,
const Graphic &, SwFlyFrmAttrMgr * = 0,
- BOOL bRule = FALSE );
+ sal_Bool bRule = sal_False );
void InsertByWord( const String & );
- void InsertPageBreak(const String *pPageDesc = 0, USHORT nPgNum = 0 );
+ void InsertPageBreak(const String *pPageDesc = 0, sal_uInt16 nPgNum = 0 );
void InsertLineBreak();
void InsertColumnBreak();
- void InsertFootnote(const String &, BOOL bEndNote = FALSE, BOOL bEdit = TRUE );
- void SplitNode( BOOL bAutoFormat = FALSE, BOOL bCheckTableStart = TRUE );
- BOOL CanInsert();
+ void InsertFootnote(const String &, sal_Bool bEndNote = sal_False, sal_Bool bEdit = sal_True );
+ void SplitNode( sal_Bool bAutoFormat = sal_False, sal_Bool bCheckTableStart = sal_True );
+ sal_Bool CanInsert();
// Verzeichnisse
void InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0);
- BOOL UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0);
+ sal_Bool UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0);
// Numerierung und Bullets
/**
Turns on numbering or bullets.
- @param bNum TRUE: turn on numbering
- FALSE: turn on bullets
+ @param bNum sal_True: turn on numbering
+ sal_False: turn on bullets
*/
- void NumOrBulletOn(BOOL bNum); // #i29560#
+ void NumOrBulletOn(sal_Bool bNum); // #i29560#
void NumOrBulletOff(); // #i29560#
void NumOn();
void BulletOn();
@@ -338,12 +338,12 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
void InsertObject( /*SvInPlaceObjectRef *pObj, */ // != 0 fuer Clipboard
const svt::EmbeddedObjectRef&,
SvGlobalName *pName = 0, // != 0 entspr. Object erzeugen.
- BOOL bActivate = TRUE,
- USHORT nSlotId = 0); // SlotId fuer Dialog
+ sal_Bool bActivate = sal_True,
+ sal_uInt16 nSlotId = 0); // SlotId fuer Dialog
- BOOL InsertOleObject( const svt::EmbeddedObjectRef& xObj, SwFlyFrmFmt **pFlyFrmFmt = 0 );
+ sal_Bool InsertOleObject( const svt::EmbeddedObjectRef& xObj, SwFlyFrmFmt **pFlyFrmFmt = 0 );
void LaunchOLEObj( long nVerb = 0 ); // Server starten
- BOOL IsOLEObj() const { return GetCntType() == CNT_OLE;}
+ sal_Bool IsOLEObj() const { return GetCntType() == CNT_OLE;}
virtual void MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& rOffset );
virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
const SwRect *pFlyPrtRect = 0,
@@ -366,32 +366,32 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
void SetPageStyle(const String &rCollName);
- String GetCurPageStyle( const BOOL bCalcFrm = TRUE ) const;
+ String GetCurPageStyle( const sal_Bool bCalcFrm = sal_True ) const;
// Aktuelle Vorlage anhand der geltenden Attribute aendern
void QuickUpdateStyle();
enum DoType { UNDO, REDO, REPEAT };
- void Do( DoType eDoType, USHORT nCnt = 1 );
+ void Do( DoType eDoType, sal_uInt16 nCnt = 1 );
String GetDoString( DoType eDoType ) const;
String GetRepeatString() const;
- USHORT GetDoStrings( DoType eDoType, SfxStringListItem& rStrLstItem ) const;
+ sal_uInt16 GetDoStrings( DoType eDoType, SfxStringListItem& rStrLstItem ) const;
//Suchen oder Ersetzen
- ULONG SearchPattern(const com::sun::star::util::SearchOptions& rSearchOpt,
- BOOL bSearchInNotes,
+ sal_uLong SearchPattern(const com::sun::star::util::SearchOptions& rSearchOpt,
+ sal_Bool bSearchInNotes,
SwDocPositions eStart, SwDocPositions eEnde,
FindRanges eFlags = FND_IN_BODY,
- int bReplace = FALSE );
+ int bReplace = sal_False );
- ULONG SearchTempl (const String &rTempl,
+ sal_uLong SearchTempl (const String &rTempl,
SwDocPositions eStart, SwDocPositions eEnde,
FindRanges eFlags = FND_IN_BODY,
const String* pReplTempl = 0 );
- ULONG SearchAttr (const SfxItemSet& rFindSet,
- BOOL bNoColls,
+ sal_uLong SearchAttr (const SfxItemSet& rFindSet,
+ sal_Bool bNoColls,
SwDocPositions eStart,SwDocPositions eEnde,
FindRanges eFlags = FND_IN_BODY,
const com::sun::star::util::SearchOptions* pSearchOpt = 0,
@@ -401,30 +401,30 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
// Aktion vor Cursorbewegung
// Hebt gfs. Selektionen auf, triggert Timer und GCAttr()
- void MoveCrsr( BOOL bWithSelect = FALSE );
+ void MoveCrsr( sal_Bool bWithSelect = sal_False );
// Eingabefelder updaten
- BOOL StartInputFldDlg(SwField*, BOOL bNextButton, Window* pParentWin = 0, ByteString* pWindowState = 0);
+ sal_Bool StartInputFldDlg(SwField*, sal_Bool bNextButton, Window* pParentWin = 0, ByteString* pWindowState = 0);
// update DropDown fields
- BOOL StartDropDownFldDlg(SwField*, BOOL bNextButton, ByteString* pWindowState = 0);
+ sal_Bool StartDropDownFldDlg(SwField*, sal_Bool bNextButton, ByteString* pWindowState = 0);
//"Handler" fuer Anederungen an der DrawView - fuer Controls.
virtual void DrawSelChanged( );
// springe zum Bookmark und setze die "Selections-Flags" wieder richtig
- BOOL GotoMark( const ::sw::mark::IMark* const pMark );
- BOOL GotoMark( const ::sw::mark::IMark* const pMark, BOOL bSelect, BOOL bStart );
- BOOL GotoMark( const ::rtl::OUString& rName );
- BOOL GoNextBookmark(); // TRUE, wenn's noch eine gab
- BOOL GoPrevBookmark();
+ sal_Bool GotoMark( const ::sw::mark::IMark* const pMark );
+ sal_Bool GotoMark( const ::sw::mark::IMark* const pMark, sal_Bool bSelect, sal_Bool bStart );
+ sal_Bool GotoMark( const ::rtl::OUString& rName );
+ sal_Bool GoNextBookmark(); // sal_True, wenn's noch eine gab
+ sal_Bool GoPrevBookmark();
bool GotoFieldmark(::sw::mark::IFieldmark const * const pMark);
- BOOL GotoField( const SwFmtFld& rFld );
+ sal_Bool GotoField( const SwFmtFld& rFld );
// jump to the next / previous hyperlink - inside text and also
// on graphics
- BOOL SelectNextPrevHyperlink( BOOL bNext = TRUE );
+ sal_Bool SelectNextPrevHyperlink( sal_Bool bNext = sal_True );
// Zugehoerige SwView ermitteln
const SwView& GetView() const { return rView; }
@@ -433,23 +433,23 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
//Weil es sonst keiner macht, gibt es hier eine ExecMacro()
void ExecMacro( const SvxMacro& rMacro, String* pRet = 0, SbxArray* pArgs = 0 );
// rufe ins dunkle Basic/JavaScript
- USHORT CallEvent( USHORT nEvent, const SwCallMouseEvent& rCallEvent,
- BOOL bCheckPtr = FALSE, SbxArray* pArgs = 0,
+ sal_uInt16 CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent,
+ sal_Bool bCheckPtr = sal_False, SbxArray* pArgs = 0,
const Link* pCallBack = 0 );
// ein Klick aus das angegebene Feld. Der Cursor steht auf diesem.
// Fuehre die vor definierten Aktionen aus.
void ClickToField( const SwField& rFld );
- void ClickToINetAttr( const SwFmtINetFmt& rItem, USHORT nFilter = URLLOAD_NOFILTER );
- BOOL ClickToINetGrf( const Point& rDocPt, USHORT nFilter = URLLOAD_NOFILTER );
- inline BOOL IsInClickToEdit() const ;
+ void ClickToINetAttr( const SwFmtINetFmt& rItem, sal_uInt16 nFilter = URLLOAD_NOFILTER );
+ sal_Bool ClickToINetGrf( const Point& rDocPt, sal_uInt16 nFilter = URLLOAD_NOFILTER );
+ inline sal_Bool IsInClickToEdit() const ;
// fall ein URL-Button selektiert ist, dessen URL returnen, ansonsten
// einen LeerString
- BOOL GetURLFromButton( String& rURL, String& rDescr ) const;
+ sal_Bool GetURLFromButton( String& rURL, String& rDescr ) const;
void NavigatorPaste( const NaviContentBookmark& rBkmk,
- const USHORT nAction );
+ const sal_uInt16 nAction );
// die Core erzeugt eine Selektion, das SttSelect muss gerufen werden
virtual void NewCoreSelection();
@@ -469,29 +469,29 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
const SwViewOption *pViewOpt = 0);
virtual ~SwWrtShell();
- BOOL TryRemoveIndent(); // #i23725#
+ sal_Bool TryRemoveIndent(); // #i23725#
String GetSelDescr() const;
SwNavigationMgr& GetNavigationMgr();
void addCurrentPosition();
- BOOL GotoFly( const String& rName, FlyCntType eType = FLYCNTTYPE_ALL,
- BOOL bSelFrame = TRUE );
- BOOL GotoINetAttr( const SwTxtINetFmt& rAttr );
- void GotoOutline( USHORT nIdx );
- BOOL GotoOutline( const String& rName );
- BOOL GotoRegion( const String& rName );
- BOOL GotoRefMark( const String& rRefMark, USHORT nSubType = 0,
- USHORT nSeqNo = 0 );
- BOOL GotoNextTOXBase( const String* pName = 0);
- BOOL GotoTable( const String& rName );
- BOOL GotoFld( const SwFmtFld& rFld );
- const SwRedline* GotoRedline( USHORT nArrPos, BOOL bSelect = FALSE);
+ sal_Bool GotoFly( const String& rName, FlyCntType eType = FLYCNTTYPE_ALL,
+ sal_Bool bSelFrame = sal_True );
+ sal_Bool GotoINetAttr( const SwTxtINetFmt& rAttr );
+ void GotoOutline( sal_uInt16 nIdx );
+ sal_Bool GotoOutline( const String& rName );
+ sal_Bool GotoRegion( const String& rName );
+ sal_Bool GotoRefMark( const String& rRefMark, sal_uInt16 nSubType = 0,
+ sal_uInt16 nSeqNo = 0 );
+ sal_Bool GotoNextTOXBase( const String* pName = 0);
+ sal_Bool GotoTable( const String& rName );
+ sal_Bool GotoFld( const SwFmtFld& rFld );
+ const SwRedline* GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect = sal_False);
private:
SW_DLLPRIVATE void OpenMark();
- SW_DLLPRIVATE void CloseMark( BOOL bOkFlag );
+ SW_DLLPRIVATE void CloseMark( sal_Bool bOkFlag );
SW_DLLPRIVATE String GetWrdDelim();
SW_DLLPRIVATE String GetSDelim();
@@ -500,11 +500,11 @@ private:
struct ModeStack
{
ModeStack *pNext;
- BOOL bAdd,
+ sal_Bool bAdd,
bBlock,
bExt,
bIns;
- ModeStack(ModeStack *pNextMode, BOOL _bIns, BOOL _bExt, BOOL _bAdd, BOOL _bBlock):
+ ModeStack(ModeStack *pNextMode, sal_Bool _bIns, sal_Bool _bExt, sal_Bool _bAdd, sal_Bool _bBlock):
pNext(pNextMode),
bAdd(_bAdd),
bBlock(_bBlock),
@@ -525,11 +525,11 @@ private:
{
Point aDocPos;
CrsrStack *pNext;
- BOOL bValidCurPos : 1;
- BOOL bIsFrmSel : 1;
+ sal_Bool bValidCurPos : 1;
+ sal_Bool bIsFrmSel : 1;
SwTwips lOffset;
- CrsrStack( BOOL bValid, BOOL bFrmSel, const Point &rDocPos,
+ CrsrStack( sal_Bool bValid, sal_Bool bFrmSel, const Point &rDocPos,
SwTwips lOff, CrsrStack *pN )
: aDocPos(rDocPos),
pNext(pN),
@@ -547,39 +547,39 @@ private:
SwNavigationMgr aNavigationMgr;
Point aDest;
- BOOL bDestOnStack;
- BOOL HasCrsrStack() const { return 0 != pCrsrStack; }
- SW_DLLPRIVATE BOOL PushCrsr(SwTwips lOffset, BOOL bSelect);
- SW_DLLPRIVATE BOOL PopCrsr(BOOL bUpdate, BOOL bSelect = FALSE);
+ sal_Bool bDestOnStack;
+ sal_Bool HasCrsrStack() const { return 0 != pCrsrStack; }
+ SW_DLLPRIVATE sal_Bool PushCrsr(SwTwips lOffset, sal_Bool bSelect);
+ SW_DLLPRIVATE sal_Bool PopCrsr(sal_Bool bUpdate, sal_Bool bSelect = sal_False);
// ENDE Cursor bei PageUp / -Down mitnehmen
- SW_DLLPRIVATE BOOL _SttWrd();
- SW_DLLPRIVATE BOOL _EndWrd();
- SW_DLLPRIVATE BOOL _NxtWrd();
- SW_DLLPRIVATE BOOL _PrvWrd();
+ SW_DLLPRIVATE sal_Bool _SttWrd();
+ SW_DLLPRIVATE sal_Bool _EndWrd();
+ SW_DLLPRIVATE sal_Bool _NxtWrd();
+ SW_DLLPRIVATE sal_Bool _PrvWrd();
// --> OD 2008-08-06 #i92468#
- SW_DLLPRIVATE BOOL _NxtWrdForDelete();
- SW_DLLPRIVATE BOOL _PrvWrdForDelete();
+ SW_DLLPRIVATE sal_Bool _NxtWrdForDelete();
+ SW_DLLPRIVATE sal_Bool _PrvWrdForDelete();
// <--
- SW_DLLPRIVATE BOOL _FwdSentence();
- SW_DLLPRIVATE BOOL _BwdSentence();
- BOOL _FwdPara();
- SW_DLLPRIVATE BOOL _BwdPara();
+ SW_DLLPRIVATE sal_Bool _FwdSentence();
+ SW_DLLPRIVATE sal_Bool _BwdSentence();
+ sal_Bool _FwdPara();
+ SW_DLLPRIVATE sal_Bool _BwdPara();
// Selektionen
- BOOL bIns :1;
- BOOL bInSelect :1;
- BOOL bExtMode :1;
- BOOL bAddMode :1;
- BOOL bBlockMode :1;
- BOOL bLayoutMode :1;
- BOOL bNoEdit :1;
- BOOL bCopy :1;
- BOOL bSelWrd :1;
- BOOL bSelLn :1;
- BOOL bIsInClickToEdit:1;
- BOOL bClearMark :1; // Selektion fuer ChartAutoPilot nicht loeschen
- BOOL mbRetainSelection :1; // Do not remove selections
+ sal_Bool bIns :1;
+ sal_Bool bInSelect :1;
+ sal_Bool bExtMode :1;
+ sal_Bool bAddMode :1;
+ sal_Bool bBlockMode :1;
+ sal_Bool bLayoutMode :1;
+ sal_Bool bNoEdit :1;
+ sal_Bool bCopy :1;
+ sal_Bool bSelWrd :1;
+ sal_Bool bSelLn :1;
+ sal_Bool bIsInClickToEdit:1;
+ sal_Bool bClearMark :1; // Selektion fuer ChartAutoPilot nicht loeschen
+ sal_Bool mbRetainSelection :1; // Do not remove selections
Point aStart;
Link aSelTblLink;
@@ -592,37 +592,37 @@ private:
SW_DLLPRIVATE void SttDragDrop(Timer *);
using SwCrsrShell::SetCrsr;
- SW_DLLPRIVATE long SetCrsr(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long SetCrsr(const Point *, sal_Bool bProp=sal_False );
- SW_DLLPRIVATE long SetCrsrKillSel(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long SetCrsrKillSel(const Point *, sal_Bool bProp=sal_False );
- SW_DLLPRIVATE long StdSelect(const Point *, BOOL bProp=FALSE );
- SW_DLLPRIVATE long BeginDrag(const Point *, BOOL bProp=FALSE );
- SW_DLLPRIVATE long Drag(const Point *, BOOL bProp=FALSE );
- SW_DLLPRIVATE long EndDrag(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long StdSelect(const Point *, sal_Bool bProp=sal_False );
+ SW_DLLPRIVATE long BeginDrag(const Point *, sal_Bool bProp=sal_False );
+ SW_DLLPRIVATE long Drag(const Point *, sal_Bool bProp=sal_False );
+ SW_DLLPRIVATE long EndDrag(const Point *, sal_Bool bProp=sal_False );
- SW_DLLPRIVATE long ExtSelWrd(const Point *, BOOL bProp=FALSE );
- SW_DLLPRIVATE long ExtSelLn(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long ExtSelWrd(const Point *, sal_Bool bProp=sal_False );
+ SW_DLLPRIVATE long ExtSelLn(const Point *, sal_Bool bProp=sal_False );
//Verschieben von Text aus Drag and Drop; Point ist
//Destination fuer alle Selektionen.
- SW_DLLPRIVATE long MoveText(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long MoveText(const Point *, sal_Bool bProp=sal_False );
- SW_DLLPRIVATE long BeginFrmDrag(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long BeginFrmDrag(const Point *, sal_Bool bProp=sal_False );
//nach SSize/Move eines Frames Update; Point ist Destination.
- SW_DLLPRIVATE long UpdateLayoutFrm(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long UpdateLayoutFrm(const Point *, sal_Bool bProp=sal_False );
- SW_DLLPRIVATE long SttLeaveSelect(const Point *, BOOL bProp=FALSE );
- SW_DLLPRIVATE long AddLeaveSelect(const Point *, BOOL bProp=FALSE );
- SW_DLLPRIVATE long Ignore(const Point *, BOOL bProp=FALSE );
+ SW_DLLPRIVATE long SttLeaveSelect(const Point *, sal_Bool bProp=sal_False );
+ SW_DLLPRIVATE long AddLeaveSelect(const Point *, sal_Bool bProp=sal_False );
+ SW_DLLPRIVATE long Ignore(const Point *, sal_Bool bProp=sal_False );
- SW_DLLPRIVATE void LeaveExtSel() { bSelWrd = bSelLn = FALSE;}
- SW_DLLPRIVATE BOOL _CanInsert();
+ SW_DLLPRIVATE void LeaveExtSel() { bSelWrd = bSelLn = sal_False;}
+ SW_DLLPRIVATE sal_Bool _CanInsert();
- SW_DLLPRIVATE BOOL GoStart(BOOL KeepArea = FALSE, BOOL * = 0,
- BOOL bSelect = FALSE, BOOL bDontMoveRegion = FALSE);
- SW_DLLPRIVATE BOOL GoEnd(BOOL KeepArea = FALSE, BOOL * = 0);
+ SW_DLLPRIVATE sal_Bool GoStart(sal_Bool KeepArea = sal_False, sal_Bool * = 0,
+ sal_Bool bSelect = sal_False, sal_Bool bDontMoveRegion = sal_False);
+ SW_DLLPRIVATE sal_Bool GoEnd(sal_Bool KeepArea = sal_False, sal_Bool * = 0);
enum BookMarkMove
{
@@ -632,7 +632,7 @@ private:
BOOKMARK_LAST_LAST_ENTRY
};
- SW_DLLPRIVATE BOOL MoveBookMark(BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark=NULL);
+ SW_DLLPRIVATE sal_Bool MoveBookMark(BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark=NULL);
};
inline void SwWrtShell::ResetCursorStack()
@@ -641,27 +641,27 @@ inline void SwWrtShell::ResetCursorStack()
_ResetCursorStack();
}
-inline void SwWrtShell::SelTblCells(const Link &rLink, BOOL bMark )
+inline void SwWrtShell::SelTblCells(const Link &rLink, sal_Bool bMark )
{
- SetSelTblCells( TRUE );
+ SetSelTblCells( sal_True );
bClearMark = bMark;
aSelTblLink = rLink;
}
inline void SwWrtShell::EndSelTblCells()
{
- SetSelTblCells( FALSE );
- bClearMark = TRUE;
+ SetSelTblCells( sal_False );
+ bClearMark = sal_True;
}
-inline BOOL SwWrtShell::IsInClickToEdit() const { return bIsInClickToEdit; }
+inline sal_Bool SwWrtShell::IsInClickToEdit() const { return bIsInClickToEdit; }
-inline BOOL SwWrtShell::Is_FnDragEQBeginDrag() const
+inline sal_Bool SwWrtShell::Is_FnDragEQBeginDrag() const
{
#ifdef GCC
SELECTFUNC fnTmp = &SwWrtShell::BeginDrag;
return fnDrag == fnTmp;
#else
- return sal::static_int_cast< BOOL >(fnDrag == &SwWrtShell::BeginDrag);
+ return sal::static_int_cast< sal_Bool >(fnDrag == &SwWrtShell::BeginDrag);
#endif
}
diff --git a/sw/source/ui/inc/zoomctrl.hxx b/sw/source/ui/inc/zoomctrl.hxx
index cfd0c41784ba..29818393d9a2 100644
--- a/sw/source/ui/inc/zoomctrl.hxx
+++ b/sw/source/ui/inc/zoomctrl.hxx
@@ -36,13 +36,13 @@ private:
String sPreviewZoom;
public:
virtual void Command( const CommandEvent& rCEvt );
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
virtual void Paint( const UserDrawEvent& rEvt );
SFX_DECL_STATUSBAR_CONTROL();
- SwZoomControl( USHORT nSlotId, USHORT nId, StatusBar& rStb );
+ SwZoomControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb );
~SwZoomControl();
};
diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx
index 848b752937cc..286c0a494cc4 100644
--- a/sw/source/ui/index/cntex.cxx
+++ b/sw/source/ui/index/cntex.cxx
@@ -105,14 +105,14 @@ void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo,
void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo,
uno::Reference< XPropertySet > & xProps,
- USHORT nId, const String& rValue)
+ sal_uInt16 nId, const String& rValue)
{
lcl_SetProp( xInfo, xProps, SW_PROP_NAME_STR(nId), rValue);
}
void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo,
uno::Reference< XPropertySet > & xProps,
- USHORT nId, sal_Int16 nValue )
+ sal_uInt16 nId, sal_Int16 nValue )
{
OUString uPropName(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(nId)));
if(xInfo->hasPropertyByName(uPropName))
@@ -126,7 +126,7 @@ void lcl_SetProp( uno::Reference< XPropertySetInfo > & xInfo,
void lcl_SetBOOLProp(
uno::Reference< beans::XPropertySetInfo > & xInfo,
uno::Reference< beans::XPropertySet > & xProps,
- USHORT nId, sal_Bool bValue )
+ sal_uInt16 nId, sal_Bool bValue )
{
OUString uPropName(rtl::OUString::createFromAscii(SW_PROP_NAME_STR(nId)));
if(xInfo->hasPropertyByName(uPropName))
@@ -146,7 +146,7 @@ IMPL_LINK( SwMultiTOXTabDialog, CreateExample_Hdl, void*, EMPTYARG )
SwXTextDocument* pDoc = reinterpret_cast<SwXTextDocument*>(xDocTunnel->getSomething(SwXTextDocument::getUnoTunnelId()));
if( pDoc )
- pDoc->GetDocShell()->_LoadStyles( *rSh.GetView().GetDocShell(), TRUE );
+ pDoc->GetDocShell()->_LoadStyles( *rSh.GetView().GetDocShell(), sal_True );
uno::Reference< lang::XMultiServiceFactory > xFact(
xModel, uno::UNO_QUERY);
@@ -235,7 +235,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
if(xSectPr.is())
{
- BOOL bTemp = i == nTOXIndex;
+ sal_Bool bTemp = i == nTOXIndex;
aVal.setValue(&bTemp, ::getBooleanCppuType());
xSectPr->setPropertyValue(uIsVisible, aVal);
}
@@ -403,7 +403,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
if(TOKEN_TAB_STOP == aToken.eTokenType)
{
pPropValArr[2].Name = C2U("TabStopRightAligned");
- BOOL bTemp = SVX_TAB_ADJUST_END == aToken.eTabAlign;
+ sal_Bool bTemp = SVX_TAB_ADJUST_END == aToken.eTabAlign;
pPropValArr[2].Value.setValue(&bTemp, ::getBooleanCppuType());
pPropValArr[3].Name = C2U("TabStopFillCharacter");
pPropValArr[3].Value <<= OUString(aToken.cTabFillChar);
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index a9697939d96a..5ae40724d85b 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -215,7 +215,7 @@ public:
sal_Bool IsModified()const;
- virtual String GetCellText( long nRow, USHORT nColumn ) const;
+ virtual String GetCellText( long nRow, sal_uInt16 nColumn ) const;
};
class SwAutoMarkDlg_Impl : public ModalDialog
@@ -349,6 +349,8 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(Window* pParent, const SfxItemSet& rSet
aShowExampleCB.SetClickHdl(LINK(this, SwMultiTOXTabDialog, ShowPreviewHdl));
aShowExampleCB.Check( SW_MOD()->GetModuleConfig()->IsShowIndexPreview());
+
+ aExampleContainerWIN.SetAccessibleName(aShowExampleCB.GetText());
SetViewAlign( WINDOWALIGN_LEFT );
// SetViewWindow does not work if the dialog is visible!
@@ -499,7 +501,7 @@ SwTOXDescription* SwMultiTOXTabDialog::CreateTOXDescFromTOXBase(
pDesc->SetIndexOptions(pCurTOX->GetOptions());
pDesc->SetMainEntryCharStyle(pCurTOX->GetMainEntryCharStyle());
if(pDesc->GetTOXType() != TOX_INDEX)
- pDesc->SetLevel((BYTE)pCurTOX->GetLevel());
+ pDesc->SetLevel((sal_uInt8)pCurTOX->GetLevel());
pDesc->SetCreateFromObjectNames(pCurTOX->IsFromObjectNames());
pDesc->SetSequenceName(pCurTOX->GetSequenceName());
pDesc->SetCaptionDisplay(pCurTOX->GetCaptionDisplay());
@@ -530,7 +532,7 @@ IMPL_LINK( SwMultiTOXTabDialog, ShowPreviewHdl, CheckBox *, pBox )
SvtPathOptions aOpt;
// 6.0 (extension .sxw)
- BOOL bExist = aOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE );
+ sal_Bool bExist = aOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE );
#ifndef MAC_WITHOUT_EXT
if( !bExist )
@@ -623,7 +625,7 @@ long SwIndexTreeLB::GetTabPos( SvLBoxEntry* pEntry, SvLBoxTab* pTab)
long nData = (long)pEntry->GetUserData();
if(nData != USHRT_MAX)
{
- long nPos = pHeaderBar->GetItemRect( static_cast< USHORT >(101 + nData) ).TopLeft().X();
+ long nPos = pHeaderBar->GetItemRect( static_cast< sal_uInt16 >(101 + nData) ).TopLeft().X();
nData = nPos;
}
else
@@ -743,6 +745,10 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(Window* pParent,
{
FreeResource();
+ aHeaderTree.SetAccessibleRelationMemberOf(&aStylesFL);
+ aLeftPB.SetAccessibleRelationMemberOf(&aStylesFL);
+ aRightPB.SetAccessibleRelationMemberOf(&aStylesFL);
+
aOk.SetClickHdl(LINK(this, SwAddStylesDlg_Impl, OkHdl));
aLeftPB.SetClickHdl(LINK(this, SwAddStylesDlg_Impl, LeftRightHdl));
aRightPB.SetClickHdl(LINK(this, SwAddStylesDlg_Impl, LeftRightHdl));
@@ -761,7 +767,7 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(Window* pParent,
rHB.Show();
SwIndexTreeLB& rTLB = aHeaderTree.GetTreeListBox();
- rTLB.SetWindowBits(WB_CLIPCHILDREN|WB_SORT);
+ rTLB.SetStyle(rTLB.GetStyle()|WB_CLIPCHILDREN|WB_SORT);
rTLB.GetModel()->SetSortMode(SortAscending);
for(i = 0; i < MAXLEVEL; ++i)
{
@@ -904,6 +910,7 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS
aTOXMarksCB( this, SW_RES(CB_TOXMARKS )),
+ aIdxOptionsFL( this, SW_RES(FL_IDXOPTIONS )),
aCollectSameCB( this, SW_RES(CB_COLLECTSAME )),
aUseFFCB( this, SW_RES(CB_USEFF )),
aUseDashCB( this, SW_RES(CB_USE_DASH )),
@@ -912,7 +919,6 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS
aKeyAsEntryCB( this, SW_RES(CB_KEYASENTRY )),
aFromFileCB( this, SW_RES(CB_FROMFILE )),
aAutoMarkPB( this, SW_RES(MB_AUTOMARK )),
- aIdxOptionsFL( this, SW_RES(FL_IDXOPTIONS )),
aFromNames( SW_RES(RES_SRCTYPES )),
aFromObjCLB( this, SW_RES(CLB_FROMOBJ )),
@@ -936,12 +942,17 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrS
bFirstCall(sal_True)
{
aBracketLB.InsertEntry(String(SW_RES(ST_NO_BRACKET)), 0);
+
+ aAddStylesPB.SetAccessibleRelationMemberOf(&aCreateFromFL);
+ aAddStylesPB.SetAccessibleRelationLabeledBy(&aAddStylesCB);
+ aAddStylesPB.SetAccessibleName(aAddStylesCB.GetText());
+
FreeResource();
pIndexEntryWrapper = new IndexEntrySupplierWrapper();
aLanguageLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN,
- FALSE, FALSE, FALSE );
+ sal_False, sal_False, sal_False );
sAddStyleContent = aAddStylesCB.GetText();
@@ -1149,7 +1160,7 @@ void SwTOXSelectTabPage::ApplyTOXDescription()
aFromObjectNamesRB.Check(rDesc.IsCreateFromObjectNames());
aFromCaptionsRB.Check(!rDesc.IsCreateFromObjectNames());
aCaptionSequenceLB.SelectEntry(rDesc.GetSequenceName());
- aDisplayTypeLB.SelectEntryPos( static_cast< USHORT >(rDesc.GetCaptionDisplay()) );
+ aDisplayTypeLB.SelectEntryPos( static_cast< sal_uInt16 >(rDesc.GetCaptionDisplay()) );
RadioButtonHdl(&aFromCaptionsRB);
}
@@ -1180,11 +1191,11 @@ void SwTOXSelectTabPage::ApplyTOXDescription()
LanguageHdl(0);
for( long nCnt = 0; nCnt < aSortAlgorithmLB.GetEntryCount(); ++nCnt )
{
- const String* pEntryData = (const String*)aSortAlgorithmLB.GetEntryData( (USHORT)nCnt );
+ const String* pEntryData = (const String*)aSortAlgorithmLB.GetEntryData( (sal_uInt16)nCnt );
OSL_ENSURE(pEntryData, "no entry data available");
if( pEntryData && *pEntryData == rDesc.GetSortAlgorithm())
{
- aSortAlgorithmLB.SelectEntryPos( (USHORT)nCnt );
+ aSortAlgorithmLB.SelectEntryPos( (sal_uInt16)nCnt );
break;
}
}
@@ -1261,7 +1272,7 @@ void SwTOXSelectTabPage::FillTOXDescription()
nOLEData |= nData;
}
}
- rDesc.SetOLEOptions((USHORT)nOLEData);
+ rDesc.SetOLEOptions((sal_uInt16)nOLEData);
}
break;
case TOX_AUTHORITIES:
@@ -1286,7 +1297,7 @@ void SwTOXSelectTabPage::FillTOXDescription()
rDesc.SetContentOptions(nContentOptions);
rDesc.SetIndexOptions(nIndexOptions);
- rDesc.SetLevel( static_cast< BYTE >(aLevelNF.GetValue()) );
+ rDesc.SetLevel( static_cast< sal_uInt8 >(aLevelNF.GetValue()) );
rDesc.SetReadonly(aReadOnlyCB.IsChecked());
@@ -1406,6 +1417,18 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox)
aSortAlgorithmFT.Show(bEnableSortLanguage);
aSortAlgorithmLB.Show(bEnableSortLanguage);
+ // initialize button positions
+
+ //#i111993# add styles button has two different positions
+ if( !aAddStylesPosDef.X() )
+ {
+ aAddStylesPosDef = ( aAddStylesPB.GetPosPixel() );
+ // move left!
+ Point aPos(aAddStylesPosDef);
+ aPos.X() -= 2 * aAddStylesPB.GetSizePixel().Width();
+ aAddStylesPosUser = aPos;
+ }
+
if( nType & TO_ILLUSTRATION ) //add by zhaojianwei
aCaptionSequenceLB.SelectEntry( SwStyleNameMapper::GetUIName(
RES_POOLCOLL_LABEL_ABB, aEmptyStr ));
@@ -1415,10 +1438,11 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox)
else if( nType & TO_USER )
{
aAddStylesCB.SetText(sAddStyleUser);
- // move left!
- Point aPos(aAddStylesPB.GetPosPixel());
- aPos.X() -= 2 * aAddStylesPB.GetSizePixel().Width();
- aAddStylesPB.SetPosPixel(aPos);
+ aAddStylesPB.SetPosPixel(aAddStylesPosUser);
+ }
+ else if( nType & TO_CONTENT )
+ {
+ aAddStylesPB.SetPosPixel(aAddStylesPosDef);
}
aCollectSameCB.Show( 0 != (nType & TO_INDEX) );
@@ -1514,16 +1538,16 @@ IMPL_LINK(SwTOXSelectTabPage, LanguageHdl, ListBox*, pBox)
if( 0 != (pUserData = aSortAlgorithmLB.GetEntryData( aSortAlgorithmLB.GetSelectEntryPos())) )
sOldString = *(String*)pUserData;
void* pDel;
- USHORT nEnd = aSortAlgorithmLB.GetEntryCount();
- for( USHORT n = 0; n < nEnd; ++n )
+ sal_uInt16 nEnd = aSortAlgorithmLB.GetEntryCount();
+ for( sal_uInt16 n = 0; n < nEnd; ++n )
if( 0 != ( pDel = aSortAlgorithmLB.GetEntryData( n )) )
delete (String*)pDel;
aSortAlgorithmLB.Clear();
- USHORT nInsPos;
+ sal_uInt16 nInsPos;
String sAlg, sUINm;
- nEnd = static_cast< USHORT >(aSeq.getLength());
- for( USHORT nCnt = 0; nCnt < nEnd; ++nCnt )
+ nEnd = static_cast< sal_uInt16 >(aSeq.getLength());
+ for( sal_uInt16 nCnt = 0; nCnt < nEnd; ++nCnt )
{
sUINm = pIndexRes->GetTranslation( sAlg = aSeq[ nCnt ] );
nInsPos = aSortAlgorithmLB.InsertEntry( sUINm );
@@ -1819,7 +1843,7 @@ void SwIdxTreeListBox::RequestHelp( const HelpEvent& rHEvt )
SvLBoxEntry* pEntry = GetEntry( aPos );
if( pEntry )
{
- USHORT nLevel = static_cast< USHORT >(GetModel()->GetAbsPos(pEntry));
+ sal_uInt16 nLevel = static_cast< sal_uInt16 >(GetModel()->GetAbsPos(pEntry));
String sEntry = pParent->GetLevelHelp(++nLevel);
if('*' == sEntry)
sEntry = GetEntryText(pEntry);
@@ -1853,6 +1877,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet
SfxTabPage(pParent, SW_RES(TP_TOX_ENTRY), rAttrSet),
aLevelFT(this, SW_RES(FT_LEVEL )),
aLevelLB(this, SW_RES(LB_LEVEL )),
+ aEntryFL(this, SW_RES(FL_ENTRY )),
aTokenFT(this, SW_RES(FT_TOKEN )),
aTokenWIN(this, SW_RES(WIN_TOKEN )),
@@ -1886,14 +1911,14 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet
aTabPosFT(this, SW_RES(FT_TABPOS )),
aTabPosMF(this, SW_RES(MF_TABPOS )),
aAutoRightCB(this, SW_RES(CB_AUTORIGHT )),
- aEntryFL(this, SW_RES(FL_ENTRY )),
+ aFormatFL(this, SW_RES(FL_FORMAT )),
+
aRelToStyleCB(this, SW_RES(CB_RELTOSTYLE )),
aMainEntryStyleFT(this, SW_RES(FT_MAIN_ENTRY_STYLE)),
aMainEntryStyleLB(this, SW_RES(LB_MAIN_ENTRY_STYLE)),
aAlphaDelimCB(this, SW_RES(CB_ALPHADELIM )),
aCommaSeparatedCB(this, SW_RES(CB_COMMASEPARATED )),
- aFormatFL(this, SW_RES(FL_FORMAT )),
aSortDocPosRB(this, SW_RES(RB_DOCPOS )),
aSortContentRB(this, SW_RES(RB_SORTCONTENT )),
@@ -1924,10 +1949,20 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet
m_pCurrentForm(0),
bInLevelHdl(sal_False)
{
+ aEditStylePB.SetAccessibleRelationMemberOf(&aEntryFL);
+ aHyperLinkPB.SetAccessibleRelationMemberOf(&aEntryFL);
+ aPageNoPB.SetAccessibleRelationMemberOf(&aEntryFL);
+ aTabPB.SetAccessibleRelationMemberOf(&aEntryFL);
+ aEntryPB.SetAccessibleRelationMemberOf(&aEntryFL);
+ aEntryNoPB.SetAccessibleRelationMemberOf(&aEntryFL);
+ aAllLevelsPB.SetAccessibleRelationMemberOf(&aEntryFL);
+ aTokenWIN.SetAccessibleRelationMemberOf(&aEntryFL);
+ aTokenWIN.SetAccessibleRelationLabeledBy(&aTokenFT);
+
FreeResource();
sLevelStr = aLevelFT.GetText();
- aLevelLB.SetWindowBits( WB_HSCROLL );
+ aLevelLB.SetStyle( aLevelLB.GetStyle() | WB_HSCROLL );
aLevelLB.SetSpaceBetweenEntries(0);
aLevelLB.SetSelectionMode( SINGLE_SELECTION );
aLevelLB.SetHighlightRange(); // select full width
@@ -1968,7 +2003,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet
aCommaSeparatedCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
aRelToStyleCB.SetClickHdl(LINK(this, SwTOXEntryTabPage, ModifyHdl));
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric(aTabPosMF, aMetric);
aSortDocPosRB.Check();
@@ -1998,7 +2033,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet
aEntryOutlineLevelFT.GetPosPixel().X();
//fill the types in
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < AUTH_FIELD_END; i++)
{
String sTmp(SW_RES(STR_AUTH_FIELD_START + i));
@@ -2103,9 +2138,9 @@ void SwTOXEntryTabPage::ActivatePage( const SfxItemSet& /*rSet*/)
m_pCurrentForm = pTOXDlg->GetForm(aCurType);
if( !( aLastTOXType == aCurType ))
{
- BOOL bToxIsAuthorities = TOX_AUTHORITIES == aCurType.eType;
- BOOL bToxIsIndex = TOX_INDEX == aCurType.eType;
- BOOL bToxIsContent = TOX_CONTENT == aCurType.eType;
+ sal_Bool bToxIsAuthorities = TOX_AUTHORITIES == aCurType.eType;
+ sal_Bool bToxIsIndex = TOX_INDEX == aCurType.eType;
+ sal_Bool bToxIsContent = TOX_CONTENT == aCurType.eType;
aLevelLB.Clear();
for(sal_uInt16 i = 1; i < m_pCurrentForm->GetFormMax(); i++)
@@ -2397,7 +2432,7 @@ IMPL_LINK(SwTOXEntryTabPage, InsertTokenHdl, PushButton*, pBtn)
String sText;
FormTokenType eTokenType = TOKEN_ENTRY_NO;
String sCharStyle;
- USHORT nChapterFormat = CF_NUMBER; // i89791
+ sal_uInt16 nChapterFormat = CF_NUMBER; // i89791
if(pBtn == &aEntryNoPB)
{
sText.AssignAscii(SwForm::aFormEntryNum);
@@ -2692,7 +2727,7 @@ IMPL_LINK(SwTOXEntryTabPage, ChapterInfoHdl, ListBox*, pBox)
IMPL_LINK(SwTOXEntryTabPage, ChapterInfoOutlineHdl, NumericField*, pField)
{
- const sal_uInt16 nLevel = static_cast<BYTE>(pField->GetValue());
+ const sal_uInt16 nLevel = static_cast<sal_uInt8>(pField->GetValue());
Control* pCtrl = aTokenWIN.GetActiveControl();
OSL_ENSURE(pCtrl, "no active control?");
@@ -2776,7 +2811,7 @@ IMPL_LINK(SwTOXEntryTabPage, AutoRightHdl, CheckBox*, pBox)
void SwTOXEntryTabPage::SetWrtShell(SwWrtShell& rSh)
{
SwDocShell* pDocSh = rSh.GetView().GetDocShell();
- ::FillCharStyleListBox(aCharStyleLB, pDocSh, TRUE, TRUE);
+ ::FillCharStyleListBox(aCharStyleLB, pDocSh, sal_True, sal_True);
const String sDefault(SW_RES(STR_POOLCOLL_STANDARD));
for(sal_uInt16 i = 0; i < aCharStyleLB.GetEntryCount(); i++)
{
@@ -3142,9 +3177,9 @@ void SwTokenWindow::InsertAtSelection(
aSel.Justify();
String sEditText = ((SwTOXEdit*)pActiveCtrl)->GetText();
- String sLeft = sEditText.Copy( 0, static_cast< USHORT >(aSel.A()) );
- String sRight = sEditText.Copy( static_cast< USHORT >(aSel.B()),
- static_cast< USHORT >(sEditText.Len() - aSel.B()));
+ String sLeft = sEditText.Copy( 0, static_cast< sal_uInt16 >(aSel.A()) );
+ String sRight = sEditText.Copy( static_cast< sal_uInt16 >(aSel.B()),
+ static_cast< sal_uInt16 >(sEditText.Len() - aSel.B()));
((SwTOXEdit*)pActiveCtrl)->SetText(sLeft);
((SwTOXEdit*)pActiveCtrl)->AdjustSize();
@@ -3454,11 +3489,11 @@ sal_Bool SwTokenWindow::Contains(FormTokenType eSearchFor) const
return bRet;
}
-BOOL SwTokenWindow::CreateQuickHelp(Control* pCtrl,
+sal_Bool SwTokenWindow::CreateQuickHelp(Control* pCtrl,
const SwFormToken& rToken,
const HelpEvent& rHEvt)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rHEvt.GetMode() & HELPMODE_QUICK )
{
sal_Bool bBalloon = Help::IsBalloonHelpEnabled();
@@ -3495,7 +3530,7 @@ BOOL SwTokenWindow::CreateQuickHelp(Control* pCtrl,
else
Help::ShowQuickHelp( this, aItemRect, sEntry,
QUICKHELP_LEFT|QUICKHELP_VCENTER );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
@@ -3643,17 +3678,18 @@ void SwTokenWindow::GetFocus()
SwTOXStylesTabPage::SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrSet ) :
SfxTabPage(pParent, SW_RES(TP_TOX_STYLES), rAttrSet),
+ aFormatFL(this, SW_RES(FL_FORMAT )),
aLevelFT2(this, SW_RES(FT_LEVEL )),
aLevelLB(this, SW_RES(LB_LEVEL )),
+ aAssignBT(this, SW_RES(BT_ASSIGN )),
aTemplateFT(this, SW_RES(FT_TEMPLATE)),
aParaLayLB(this, SW_RES(LB_PARALAY )),
aStdBT(this, SW_RES(BT_STD )),
- aAssignBT(this, SW_RES(BT_ASSIGN )),
aEditStyleBT(this, SW_RES(BT_EDIT_STYLE )),
- aFormatFL(this, SW_RES(FL_FORMAT )),
m_pCurrentForm(0)
{
FreeResource();
+
SetExchangeSupport( sal_True );
aEditStyleBT.SetClickHdl (LINK( this, SwTOXStylesTabPage, EditStyleHdl));
@@ -3662,6 +3698,11 @@ SwTOXStylesTabPage::SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrS
aParaLayLB.SetSelectHdl (LINK( this, SwTOXStylesTabPage, EnableSelectHdl));
aLevelLB.SetSelectHdl (LINK( this, SwTOXStylesTabPage, EnableSelectHdl));
aParaLayLB.SetDoubleClickHdl(LINK( this, SwTOXStylesTabPage, DoubleClickHdl));
+
+ aStdBT.SetAccessibleRelationMemberOf(&aFormatFL);
+ aAssignBT.SetAccessibleRelationMemberOf(&aFormatFL);
+ aEditStyleBT.SetAccessibleRelationMemberOf(&aFormatFL);
+
}
SwTOXStylesTabPage::~SwTOXStylesTabPage()
@@ -3932,15 +3973,15 @@ SwEntryBrowseBox::SwEntryBrowseBox(Window* pParent, const ResId& rId,
sal_Bool SwEntryBrowseBox::SeekRow( long nRow )
{
nCurrentRow = nRow;
- return TRUE;
+ return sal_True;
}
-String SwEntryBrowseBox::GetCellText(long nRow, USHORT nColumn) const
+String SwEntryBrowseBox::GetCellText(long nRow, sal_uInt16 nColumn) const
{
const String* pRet = &aEmptyStr;
if(aEntryArr.Count() > nRow)
{
- AutoMarkEntry* pEntry = aEntryArr[ static_cast< USHORT >(nRow) ];
+ AutoMarkEntry* pEntry = aEntryArr[ static_cast< sal_uInt16 >(nRow) ];
switch(nColumn)
{
case ITEM_SEARCH :pRet = &pEntry->sSearch; break;
@@ -3971,7 +4012,7 @@ void SwEntryBrowseBox::PaintCell(OutputDevice& rDev,
sal_Bool SwEntryBrowseBox::SaveModified()
{
SetModified();
- USHORT nRow = static_cast< USHORT >(GetCurRow());
+ sal_uInt16 nRow = static_cast< sal_uInt16 >(GetCurRow());
sal_uInt16 nCol = GetCurColumnId();
String sNew;
@@ -4054,7 +4095,7 @@ void SwEntryBrowseBox::ReadEntries(SvStream& rInStr)
if( !pToInsert )
pToInsert = new AutoMarkEntry;
- USHORT nSttPos = 0;
+ sal_uInt16 nSttPos = 0;
pToInsert->sSearch = sLine.GetToken(0, ';', nSttPos );
pToInsert->sAlternative = sLine.GetToken(0, ';', nSttPos );
pToInsert->sPrimKey = sLine.GetToken(0, ';', nSttPos );
@@ -4164,7 +4205,7 @@ SwAutoMarkDlg_Impl::SwAutoMarkDlg_Impl(Window* pParent, const String& rAutoMarkU
aEntriesBB.RowInserted(0, 1, sal_True);
else
{
- SfxMedium aMed( sAutoMarkURL, STREAM_STD_READ, FALSE );
+ SfxMedium aMed( sAutoMarkURL, STREAM_STD_READ, sal_False );
if( aMed.GetInStream() && !aMed.GetInStream()->GetError() )
aEntriesBB.ReadEntries( *aMed.GetInStream() );
else
@@ -4187,7 +4228,7 @@ IMPL_LINK(SwAutoMarkDlg_Impl, OkHdl, OKButton*, EMPTYARG)
SfxMedium aMed( sAutoMarkURL,
bCreateMode ? STREAM_WRITE
: STREAM_WRITE| STREAM_TRUNC,
- FALSE );
+ sal_False );
SvStream* pStrm = aMed.GetOutStream();
pStrm->SetStreamCharSet( RTL_TEXTENCODING_MS_1253 );
if( !pStrm->GetError() )
diff --git a/sw/source/ui/index/cnttab.hrc b/sw/source/ui/index/cnttab.hrc
index d1eed8cefad1..b6170bf53176 100644
--- a/sw/source/ui/index/cnttab.hrc
+++ b/sw/source/ui/index/cnttab.hrc
@@ -173,6 +173,7 @@
#define STR_TOKEN_HELP_AUTHORITY (STR_BUTTON_HELP_TEXT_START + 9)
#define STR_CHARSTYLE (STR_TOKEN_HELP_AUTHORITY + 1)
+
#define TLB_STYLES 100
#define FL_STYLES 101
#define PB_OK 102
diff --git a/sw/source/ui/index/cnttab.src b/sw/source/ui/index/cnttab.src
index 377c07020268..9559aee6fab5 100644
--- a/sw/source/ui/index/cnttab.src
+++ b/sw/source/ui/index/cnttab.src
@@ -132,6 +132,7 @@ TabPage TP_TOX_SELECT
};
Edit ED_TITLE
{
+ HelpID = "sw:Edit:TP_TOX_SELECT:ED_TITLE";
Pos = MAP_APPFONT ( 45 , 14 ) ;
Size = MAP_APPFONT ( 203 , 12 ) ;
Border = TRUE;
@@ -144,6 +145,7 @@ TabPage TP_TOX_SELECT
};
ListBox LB_TYPE
{
+ HelpID = "sw:ListBox:TP_TOX_SELECT:LB_TYPE";
Pos = MAP_APPFONT ( 45 , 30 ) ;
Size = MAP_APPFONT ( 80 , 80 ) ;
TabStop = TRUE ;
@@ -161,6 +163,7 @@ TabPage TP_TOX_SELECT
};
CheckBox CB_READONLY
{
+ HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_READONLY";
Pos = MAP_APPFONT ( 51 , 46 ) ;
Size = MAP_APPFONT ( 200 , 10 ) ;
Check = TRUE;
@@ -180,6 +183,7 @@ TabPage TP_TOX_SELECT
};
ListBox LB_AREA
{
+ HelpID = "sw:ListBox:TP_TOX_SELECT:LB_AREA";
Pos = MAP_APPFONT ( 45 , 70 ) ;
Size = MAP_APPFONT ( 80 , 12 ) ;
TabStop = TRUE ;
@@ -198,6 +202,7 @@ TabPage TP_TOX_SELECT
};
NumericField NF_LEVEL
{
+ HelpID = "sw:NumericField:TP_TOX_SELECT:NF_LEVEL";
Pos = MAP_APPFONT ( 231 , 72 ) ;
Size = MAP_APPFONT ( 20 , 12 ) ;
Border = TRUE ;
@@ -218,6 +223,7 @@ TabPage TP_TOX_SELECT
};
CheckBox CB_FROMHEADINGS
{
+ HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMHEADINGS";
Pos = MAP_APPFONT ( 12 , 99 ) ;
Size = MAP_APPFONT ( 95 , 10 ) ;
Check = TRUE;
@@ -234,6 +240,7 @@ TabPage TP_TOX_SELECT
*/
CheckBox CB_ADDSTYLES
{
+ HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_ADDSTYLES";
Pos = MAP_APPFONT ( 12 , 115 ) ;
Size = MAP_APPFONT ( 75 , 10 ) ;
Text [ en-US ] = "~Additional Styles";
@@ -244,6 +251,7 @@ TabPage TP_TOX_SELECT
};
PushButton PB_ADDSTYLES
{
+ HelpID = "sw:PushButton:TP_TOX_SELECT:PB_ADDSTYLES";
Pos = MAP_APPFONT ( 115 , 114 ) ;
Size = MAP_APPFONT ( 12 , 12 ) ;
Text = "..." ;
@@ -251,6 +259,7 @@ TabPage TP_TOX_SELECT
};
CheckBox CB_TOXMARKS
{
+ HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_TOXMARKS";
Pos = MAP_APPFONT ( 12 , 131 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Text [ en-US ] = "Inde~x marks";
@@ -258,6 +267,7 @@ TabPage TP_TOX_SELECT
RadioButton RB_FROMCAPTIONS
{
+ HelpID = "sw:RadioButton:TP_TOX_SELECT:RB_FROMCAPTIONS";
Pos = MAP_APPFONT ( 12 , 98 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Text [ en-US ] = "Captions";
@@ -270,6 +280,7 @@ TabPage TP_TOX_SELECT
};
ListBox LB_CAPTIONSEQUENCE
{
+ HelpID = "sw:ListBox:TP_TOX_SELECT:LB_CAPTIONSEQUENCE";
Pos = MAP_APPFONT ( 55 , 112 ) ;
Size = MAP_APPFONT ( 70 , 40 ) ;
DropDown = TRUE;
@@ -283,6 +294,7 @@ TabPage TP_TOX_SELECT
};
ListBox LB_DISPLAYTYPE
{
+ HelpID = "sw:ListBox:TP_TOX_SELECT:LB_DISPLAYTYPE";
Pos = MAP_APPFONT ( 55 , 128 ) ;
Size = MAP_APPFONT ( 70 , 40 ) ;
DropDown = TRUE;
@@ -296,54 +308,63 @@ TabPage TP_TOX_SELECT
};
RadioButton RB_FROMOBJECTNAMES
{
+ HelpID = "sw:RadioButton:TP_TOX_SELECT:RB_FROMOBJECTNAMES";
Pos = MAP_APPFONT ( 156 , 98 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Text [ en-US ] = "Object names";
};
CheckBox CB_COLLECTSAME
{
+ HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_COLLECTSAME";
Pos = MAP_APPFONT ( 12 , 98 ) ;
Size = MAP_APPFONT ( 121 , 10 ) ;
Text [ en-US ] = "Combine identical entries";
};
CheckBox CB_USEFF
{
+ HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_USEFF";
Pos = MAP_APPFONT ( 18 , 111 ) ;
Size = MAP_APPFONT ( 115 , 10 ) ;
Text [ en-US ] = "Combine identical entries with p or ~pp";
};
CheckBox CB_USE_DASH
{
+ HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_USE_DASH";
Pos = MAP_APPFONT ( 18 , 124 ) ;
Size = MAP_APPFONT ( 115 , 10 ) ;
Text [ en-US ] = "Combine with -";
};
CheckBox CB_CASESENSITIVE
{
+ HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_CASESENSITIVE";
Pos = MAP_APPFONT ( 18 , 137 ) ;
Size = MAP_APPFONT ( 115 , 10 ) ;
Text [ en-US ] = "Case sensitive";
};
CheckBox CB_INITIALCAPS
{
+ HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_INITIALCAPS";
Pos = MAP_APPFONT ( 136 , 98 ) ;
Size = MAP_APPFONT ( 115 , 10 ) ;
Text [ en-US ] = "AutoCapitalize entries";
};
CheckBox CB_KEYASENTRY
{
+ HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_KEYASENTRY";
Pos = MAP_APPFONT ( 136, 111 ) ;
Size = MAP_APPFONT ( 115 , 10 ) ;
Text [ en-US ] = "Keys as separate entries";
};
CheckBox CB_FROMFILE
{
+ HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMFILE";
Pos = MAP_APPFONT ( 136 , 124 ) ;
Size = MAP_APPFONT ( 115 , 10 ) ;
Text [ en-US ] = "~Concordance file";
};
MenuButton MB_AUTOMARK
{
+ HelpID = "sw:MenuButton:TP_TOX_SELECT:MB_AUTOMARK";
Pos = MAP_APPFONT ( 136 , 137 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -372,30 +393,35 @@ TabPage TP_TOX_SELECT
};
CheckBox CB_FROMTABLES
{
+ HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMTABLES";
Pos = MAP_APPFONT ( 112 , 99 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
Text [ en-US ] = "Tables";
};
CheckBox CB_FROMFRAMES
{
+ HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMFRAMES";
Pos = MAP_APPFONT ( 182 , 99 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
Text [ en-US ] = "Te~xt frames";
};
CheckBox CB_FROMGRAPHICS
{
+ HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMGRAPHICS";
Pos = MAP_APPFONT ( 112 , 113 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
Text [ en-US ] = "Graphics";
};
CheckBox CB_FROMOLE
{
+ HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_FROMOLE";
Pos = MAP_APPFONT ( 182 , 113 ) ;
Size = MAP_APPFONT ( 68 , 10 ) ;
Text [ en-US ] = "OLE objects";
};
CheckBox CB_LEVELFROMCHAPTER
{
+ HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_LEVELFROMCHAPTER";
Pos = MAP_APPFONT ( 118 , 127 ) ;
Size = MAP_APPFONT ( 103 , 10 ) ;
Text [ en-US ] = "Use level from source chapter";
@@ -443,6 +469,7 @@ TabPage TP_TOX_SELECT
};
CheckBox CB_SEQUENCE
{
+ HelpID = "sw:CheckBox:TP_TOX_SELECT:CB_SEQUENCE";
Pos = MAP_APPFONT ( 12, 70) ;
Size = MAP_APPFONT ( 100, 10 ) ;
Text [ en-US ] = "~Number entries";
@@ -455,6 +482,7 @@ TabPage TP_TOX_SELECT
};
ListBox LB_BRACKET
{
+ HelpID = "sw:ListBox:TP_TOX_SELECT:LB_BRACKET";
Pos = MAP_APPFONT ( 75, 84) ;
Size = MAP_APPFONT ( 40, 50 ) ;
Border = TRUE;
@@ -495,6 +523,7 @@ TabPage TP_TOX_SELECT
};
ListBox LB_LANGUAGE
{
+ HelpID = "sw:ListBox:TP_TOX_SELECT:LB_LANGUAGE";
Pos = MAP_APPFONT ( 47, 164) ;
Size = MAP_APPFONT ( 80, 50 ) ;
Border = TRUE;
@@ -508,6 +537,7 @@ TabPage TP_TOX_SELECT
};
ListBox LB_SORTALG
{
+ HelpID = "sw:ListBox:TP_TOX_SELECT:LB_SORTALG";
Pos = MAP_APPFONT ( 201, 164) ;
Size = MAP_APPFONT ( 50, 50 ) ;
Border = TRUE;
@@ -549,6 +579,7 @@ TabPage TP_TOX_ENTRY
Size = MAP_APPFONT ( 136, 12 ) ;
ImageButton WIN_LEFT_SCROLL
{
+ HelpID = "sw:ImageButton:TP_TOX_ENTRY:WIN_LEFT_SCROLL";
Pos = MAP_APPFONT ( 0, 0 ) ;
Size = MAP_APPFONT ( 10, 12 ) ;
Symbol = IMAGEBUTTON_ARROW_LEFT;
@@ -563,6 +594,7 @@ TabPage TP_TOX_ENTRY
};
ImageButton WIN_RIGHT_SCROLL
{
+ HelpID = "sw:ImageButton:TP_TOX_ENTRY:WIN_RIGHT_SCROLL";
Pos = MAP_APPFONT ( 126, 0 ) ;
Size = MAP_APPFONT ( 10, 12 ) ;
Symbol = IMAGEBUTTON_ARROW_RIGHT;
@@ -649,48 +681,56 @@ TabPage TP_TOX_ENTRY
};
PushButton PB_ALL_LEVELS
{
+ HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_ALL_LEVELS";
Pos = MAP_APPFONT ( 209 , 14 ) ;
Size = MAP_APPFONT ( 40, 14 ) ;
Text [ en-US ] = "~All";
};
PushButton PB_ENTRYNO
{
+ HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_ENTRYNO";
Pos = MAP_APPFONT ( 37 , 32 ) ;
Size = MAP_APPFONT ( 40, 14 ) ;
Text [ en-US ] = "Chapter no.";
};
PushButton PB_ENTRY
{
+ HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_ENTRY";
Pos = MAP_APPFONT ( 80, 32 ) ;
Size = MAP_APPFONT ( 40, 14 ) ;
Text [ en-US ] = "Entry text";
};
PushButton PB_CHAPTERINFO
{
+ HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_CHAPTERINFO";
Pos = MAP_APPFONT ( 123 , 32 ) ;
Size = MAP_APPFONT ( 40, 14) ;
Text [ en-US ] = "~Chapter info";
};
PushButton PB_PAGENO
{
+ HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_PAGENO";
Pos = MAP_APPFONT ( 166 , 32 ) ;
Size = MAP_APPFONT ( 40, 14 ) ;
Text [ en-US ] = "Page no.";
};
PushButton PB_TAB
{
+ HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_TAB";
Pos = MAP_APPFONT ( 209 ,32 ) ;
Size = MAP_APPFONT ( 40, 14 ) ;
Text [ en-US ] = "Tab stop";
};
PushButton PB_HYPERLINK
{
+ HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_HYPERLINK";
Pos = MAP_APPFONT ( 209 , 32 ) ;
Size = MAP_APPFONT ( 40, 14 ) ;
Text [ en-US ] = "H~yperlink";
};
ListBox LB_AUTHFIELD
{
+ HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_AUTHFIELD";
Pos = MAP_APPFONT ( 37 , 33 ) ;
Size = MAP_APPFONT ( 59, 60 ) ;
DropDown = TRUE;
@@ -699,12 +739,14 @@ TabPage TP_TOX_ENTRY
};
PushButton PB_AUTHINSERT
{
+ HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_AUTHINSERT";
Pos = MAP_APPFONT ( 99 , 32 ) ;
Size = MAP_APPFONT ( 39, 14 ) ;
Text [ en-US ] = "~Insert";
};
PushButton PB_AUTHREMOVE
{
+ HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_AUTHREMOVE";
Pos = MAP_APPFONT ( 142 , 32 ) ;
Size = MAP_APPFONT ( 39, 14 ) ;
Text [ en-US ] = "~Remove";
@@ -717,6 +759,7 @@ TabPage TP_TOX_ENTRY
};
ListBox LB_CHARSTYLE
{
+ HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_CHARSTYLE";
Pos = MAP_APPFONT ( 100 , 53 ) ;
Size = MAP_APPFONT ( 93, 60 ) ;
TabStop = TRUE ;
@@ -724,6 +767,7 @@ TabPage TP_TOX_ENTRY
};
PushButton PB_EDITSTYLE
{
+ HelpID = "sw:PushButton:TP_TOX_ENTRY:PB_EDITSTYLE";
Pos = MAP_APPFONT ( 199 , 52 ) ;
Size = MAP_APPFONT ( 50, 14 ) ;
Text [ en-US ] = "~Edit...";
@@ -736,6 +780,7 @@ TabPage TP_TOX_ENTRY
};
ComboBox CB_FILLCHAR
{
+ HelpID = "sw:ComboBox:TP_TOX_ENTRY:CB_FILLCHAR";
Pos = MAP_APPFONT ( 100 , 69 ) ;
Size = MAP_APPFONT ( 40, 40 ) ;
TabStop = TRUE ;
@@ -749,6 +794,7 @@ TabPage TP_TOX_ENTRY
};
ListBox LB_CHAPTERENTRY
{
+ HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_CHAPTERENTRY";
Pos = MAP_APPFONT ( 100 , 69 ) ;
Size = MAP_APPFONT ( 93, 40 ) ;
TabStop = TRUE ;
@@ -769,6 +815,7 @@ TabPage TP_TOX_ENTRY
};
ListBox LB_ENTRY_NO
{
+ HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_ENTRY_NO";
Pos = MAP_APPFONT ( 100 , 69 ) ;
Size = MAP_APPFONT ( 93, 40 ) ;
TabStop = TRUE ;
@@ -788,6 +835,7 @@ TabPage TP_TOX_ENTRY
};
NumericField NF_LEVEL_OL
{
+ HelpID = "sw:NumericField:TP_TOX_ENTRY:NF_LEVEL_OL";
Pos = MAP_APPFONT ( 100 , 85 ) ;
Size = MAP_APPFONT ( 20 , 12 ) ;
Border = TRUE ;
@@ -809,6 +857,7 @@ TabPage TP_TOX_ENTRY
};
MetricField MF_TABPOS
{
+ HelpID = "sw:MetricField:TP_TOX_ENTRY:MF_TABPOS";
Pos = MAP_APPFONT ( 100 , 85 ) ;
Size = MAP_APPFONT ( 40, 12 ) ;
Border = TRUE ;
@@ -827,6 +876,7 @@ TabPage TP_TOX_ENTRY
};
CheckBox CB_AUTORIGHT
{
+ HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_AUTORIGHT";
Pos = MAP_APPFONT ( 143 , 86 ) ;
Size = MAP_APPFONT ( 100, 10 ) ;
Text [ en-US ] = "Align right";
@@ -839,6 +889,7 @@ TabPage TP_TOX_ENTRY
};
CheckBox CB_RELTOSTYLE
{
+ HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_RELTOSTYLE";
Pos = MAP_APPFONT ( 37 , 110 ) ;
Size = MAP_APPFONT ( 200, 10 ) ;
Text [ en-US ] = "Tab position relati~ve to Paragraph Style indent";
@@ -851,6 +902,7 @@ TabPage TP_TOX_ENTRY
};
ListBox LB_MAIN_ENTRY_STYLE
{
+ HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_MAIN_ENTRY_STYLE";
Pos = MAP_APPFONT ( 157 , 110 ) ;
Size = MAP_APPFONT ( 92, 80 ) ;
TabStop = TRUE ;
@@ -860,12 +912,14 @@ TabPage TP_TOX_ENTRY
CheckBox CB_ALPHADELIM
{
+ HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_ALPHADELIM";
Pos = MAP_APPFONT ( 37 , 126 ) ;
Size = MAP_APPFONT ( 105, 10 ) ;
Text [ en-US ] = "Alphabetical delimiter";
};
CheckBox CB_COMMASEPARATED
{
+ HelpID = "sw:CheckBox:TP_TOX_ENTRY:CB_COMMASEPARATED";
Pos = MAP_APPFONT ( 37 , 140 ) ;
Size = MAP_APPFONT ( 105, 10 ) ;
Text [ en-US ] = "Key separated by commas";
@@ -878,12 +932,14 @@ TabPage TP_TOX_ENTRY
};
RadioButton RB_DOCPOS
{
+ HelpID = "sw:RadioButton:TP_TOX_ENTRY:RB_DOCPOS";
Pos = MAP_APPFONT ( 40 , 113) ;
Size = MAP_APPFONT ( 94, 10 ) ;
Text [ en-US ] = "Document ~position ";
};
RadioButton RB_SORTCONTENT
{
+ HelpID = "sw:RadioButton:TP_TOX_ENTRY:RB_SORTCONTENT";
Pos = MAP_APPFONT ( 136 , 113 ) ;
Size = MAP_APPFONT ( 90, 10 ) ;
Text [ en-US ] = "~Content";
@@ -902,6 +958,7 @@ TabPage TP_TOX_ENTRY
};
ListBox LB_FIRSTKEY
{
+ HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_FIRSTKEY";
Pos = MAP_APPFONT ( 60 , 138 ) ;
Size = MAP_APPFONT ( 159, 50 ) ;
Border = TRUE;
@@ -909,6 +966,7 @@ TabPage TP_TOX_ENTRY
};
ImageRadioButton RB_SORTUP1
{
+ HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTUP1";
Pos = MAP_APPFONT ( 222 , 138 ) ;
Size = MAP_APPFONT ( 12, 12 ) ;
RadioButtonImage =
@@ -922,6 +980,7 @@ TabPage TP_TOX_ENTRY
};
ImageRadioButton RB_SORTDOWN1
{
+ HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTDOWN1";
Pos = MAP_APPFONT ( 237 , 138 ) ;
Size = MAP_APPFONT ( 12, 12 ) ;
RadioButtonImage =
@@ -934,6 +993,7 @@ TabPage TP_TOX_ENTRY
};
ImageRadioButton RB_SORTUP2
{
+ HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTUP2";
Pos = MAP_APPFONT ( 222 , 153 ) ;
Size = MAP_APPFONT ( 12, 12 ) ;
RadioButtonImage =
@@ -947,6 +1007,7 @@ TabPage TP_TOX_ENTRY
};
ImageRadioButton RB_SORTDOWN2
{
+ HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTDOWN2";
Pos = MAP_APPFONT ( 237 , 153 ) ;
Size = MAP_APPFONT ( 12, 12 ) ;
RadioButtonImage =
@@ -959,6 +1020,7 @@ TabPage TP_TOX_ENTRY
};
ImageRadioButton RB_SORTUP3
{
+ HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTUP3";
Pos = MAP_APPFONT ( 222 , 168 ) ;
Size = MAP_APPFONT ( 12, 12 ) ;
RadioButtonImage =
@@ -972,6 +1034,7 @@ TabPage TP_TOX_ENTRY
};
ImageRadioButton RB_SORTDOWN3
{
+ HelpID = "sw:ImageRadioButton:TP_TOX_ENTRY:RB_SORTDOWN3";
Pos = MAP_APPFONT ( 237 ,168 ) ;
Size = MAP_APPFONT ( 12, 12 ) ;
RadioButtonImage =
@@ -990,6 +1053,7 @@ TabPage TP_TOX_ENTRY
};
ListBox LB_SECONDKEY
{
+ HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_SECONDKEY";
Pos = MAP_APPFONT ( 60 , 153 ) ;
Size = MAP_APPFONT ( 159, 50 ) ;
Border = TRUE;
@@ -1003,6 +1067,7 @@ TabPage TP_TOX_ENTRY
};
ListBox LB_THIRDKEY
{
+ HelpID = "sw:ListBox:TP_TOX_ENTRY:LB_THIRDKEY";
Pos = MAP_APPFONT ( 60 , 168 ) ;
Size = MAP_APPFONT ( 159, 50 ) ;
Border = TRUE;
@@ -1042,6 +1107,7 @@ TabPage TP_TOX_STYLES
};
ListBox LB_LEVEL
{
+ HelpID = "sw:ListBox:TP_TOX_STYLES:LB_LEVEL";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 25 ) ;
Size = MAP_APPFONT ( 102 , 131 ) ;
@@ -1057,6 +1123,7 @@ TabPage TP_TOX_STYLES
};
ListBox LB_PARALAY
{
+ HelpID = "sw:ListBox:TP_TOX_STYLES:LB_PARALAY";
Border = TRUE ;
Pos = MAP_APPFONT ( 142 , 25 ) ;
Size = MAP_APPFONT ( 101 , 131 ) ;
@@ -1066,6 +1133,7 @@ TabPage TP_TOX_STYLES
};
PushButton BT_STD
{
+ HelpID = "sw:PushButton:TP_TOX_STYLES:BT_STD";
Pos = MAP_APPFONT ( 64 , 162 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -1073,6 +1141,7 @@ TabPage TP_TOX_STYLES
};
ImageButton BT_ASSIGN
{
+ HelpID = "sw:ImageButton:TP_TOX_STYLES:BT_ASSIGN";
Pos = MAP_APPFONT ( 118 , 28 ) ;
Size = MAP_APPFONT ( 20 , 12 ) ;
TabStop = TRUE ;
@@ -1087,6 +1156,7 @@ TabPage TP_TOX_STYLES
};
PushButton BT_EDIT_STYLE
{
+ HelpID = "sw:PushButton:TP_TOX_STYLES:BT_EDIT_STYLE";
Pos = MAP_APPFONT ( 193 , 162 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -1126,6 +1196,7 @@ ModalDialog DLG_ADD_IDX_STYLES
};
ImageButton PB_LEFT
{
+ HelpID = "sw:ImageButton:DLG_ADD_IDX_STYLES:PB_LEFT";
Pos = MAP_APPFONT ( 12 , 182 ) ;
Size = MAP_APPFONT ( 50 , 12 ) ;
TabStop = TRUE ;
@@ -1137,9 +1208,13 @@ ModalDialog DLG_ADD_IDX_STYLES
};
MaskColor = IMAGE_MASK_COLOR ;
};
+ //IAccessibility2 Implementation 2009-----
+ QuickHelpText [ en-US ] = "Left" ;
+ //-----IAccessibility2 Implementation 2009
};
ImageButton PB_RIGHT
{
+ HelpID = "sw:ImageButton:DLG_ADD_IDX_STYLES:PB_RIGHT";
Pos = MAP_APPFONT ( 65 , 182 ) ;
Size = MAP_APPFONT ( 50 , 12 ) ;
TabStop = TRUE ;
@@ -1151,6 +1226,9 @@ ModalDialog DLG_ADD_IDX_STYLES
};
MaskColor = IMAGE_MASK_COLOR ;
};
+ //IAccessibility2 Implementation 2009-----
+ QuickHelpText [ en-US ] = "Right" ;
+ //-----IAccessibility2 Implementation 2009
};
FixedLine FL_STYLES
{
diff --git a/sw/source/ui/index/idxmrk.src b/sw/source/ui/index/idxmrk.src
index ce90dea26928..0fdb84db1980 100644
--- a/sw/source/ui/index/idxmrk.src
+++ b/sw/source/ui/index/idxmrk.src
@@ -275,7 +275,7 @@ ModalDialog DLG_EDIT_IDXMARK
Moveable = TRUE ;
Closeable = TRUE;
Sizeable = FALSE ;
- HelpID = FN_EDIT_IDX_ENTRY_DLG;
+ HelpId = CMD_FN_EDIT_IDX_ENTRY_DLG;
SVLook = TRUE ;
#define IDX_WIN_WIDTH IDX_WIN_WIDTH_NORMAL
Size = MAP_APPFONT ( IDX_WIN_WIDTH , 118 ) ;
@@ -294,7 +294,7 @@ ModalDialog DLG_EDIT_IDXMARK_CJK
Moveable = TRUE ;
Closeable = TRUE;
Sizeable = FALSE ;
- HelpID = FN_EDIT_IDX_ENTRY_DLG;
+ HelpId = CMD_FN_EDIT_IDX_ENTRY_DLG;
SVLook = TRUE ;
#define IDX_WIN_WIDTH IDX_WIN_WIDTH_CJK
Size = MAP_APPFONT ( IDX_WIN_WIDTH , 118 ) ;
@@ -315,7 +315,7 @@ ModelessDialog DLG_INSIDXMARK
Sizeable = FALSE ;
Hide = TRUE ;
// Zoomable = TRUE ;
- HelpID = FN_INSERT_IDX_ENTRY_DLG;
+ HelpId = CMD_FN_INSERT_IDX_ENTRY_DLG;
SVLook = TRUE ;
#define IDX_WIN_WIDTH IDX_WIN_WIDTH_NORMAL
Size = MAP_APPFONT ( IDX_WIN_WIDTH , 138) ;
@@ -336,7 +336,7 @@ ModelessDialog DLG_INSIDXMARK_CJK
Closeable = TRUE;
Sizeable = FALSE ;
// Zoomable = TRUE ;
- HelpID = FN_INSERT_IDX_ENTRY_DLG;
+ HelpId = CMD_FN_INSERT_IDX_ENTRY_DLG;
SVLook = TRUE ;
#define IDX_WIN_WIDTH IDX_WIN_WIDTH_CJK
Size = MAP_APPFONT ( IDX_WIN_WIDTH , 138) ;
@@ -392,6 +392,7 @@ ModalDialog DLG_NEW_USER_IDX
};
Edit ED_NAME
{
+ HelpID = "sw:Edit:DLG_NEW_USER_IDX:ED_NAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 55 , 15 ) ;
Size = MAP_APPFONT ( 78 , 12 ) ;
@@ -522,7 +523,7 @@ ModalDialog DLG_EDIT_AUTHMARK
Moveable = TRUE ;
Closeable = TRUE ;
Sizeable = FALSE ;
- HelpID = FN_EDIT_AUTH_ENTRY_DLG;
+ HelpId = CMD_FN_EDIT_AUTH_ENTRY_DLG;
SVLook = TRUE ;
Size = MAP_APPFONT ( 218 , 118 ) ;
#define RADIO_BUTTON_HEIGHT 0
@@ -535,7 +536,7 @@ ModelessDialog DLG_INSAUTHMARK
Closeable = TRUE ;
Sizeable = FALSE ;
// Zoomable = TRUE ;
- HelpID = FN_INSERT_AUTH_ENTRY_DLG;
+ HelpId = CMD_FN_INSERT_AUTH_ENTRY_DLG;
SVLook = TRUE ;
#define RADIO_BUTTON_HEIGHT 30
Size = MAP_APPFONT ( 218 , 118 + RADIO_BUTTON_HEIGHT) ;
diff --git a/sw/source/ui/index/makefile.mk b/sw/source/ui/index/makefile.mk
deleted file mode 100644
index a42f98122b55..000000000000
--- a/sw/source/ui/index/makefile.mk
+++ /dev/null
@@ -1,67 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=index
-LIBTARGET=NO
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- cnttab.src \
- idxmrk.src \
- multmrk.src
-
-EXCEPTIONSFILES = \
- $(SLO)$/cnttab.obj \
- $(SLO)$/cntex.obj \
- $(SLO)$/idxmrk.obj \
- $(SLO)$/multmrk.obj \
- $(SLO)$/swuiidxmrk.obj \
- $(SLO)$/toxmgr.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-LIB1TARGET= $(SLB)$/$(TARGET).lib
-
-LIB1OBJFILES = \
- $(SLO)$/idxmrk.obj \
- $(SLO)$/toxmgr.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/index/multmrk.cxx b/sw/source/ui/index/multmrk.cxx
index 661c05955e6d..61c87315e8da 100644
--- a/sw/source/ui/index/multmrk.cxx
+++ b/sw/source/ui/index/multmrk.cxx
@@ -60,8 +60,8 @@ SwMultiTOXMarkDlg::SwMultiTOXMarkDlg( Window* pParent, SwTOXMgr& rTOXMgr ) :
{
aTOXLB.SetSelectHdl(LINK(this, SwMultiTOXMarkDlg, SelectHdl));
- USHORT nSize = rMgr.GetTOXMarkCount();
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nSize = rMgr.GetTOXMarkCount();
+ for(sal_uInt16 i=0; i < nSize; ++i)
aTOXLB.InsertEntry(rMgr.GetTOXMark(i)->GetText());
aTOXLB.SelectEntryPos(0);
diff --git a/sw/source/ui/index/multmrk.src b/sw/source/ui/index/multmrk.src
index be7b47d836d4..5ecb1810d811 100644
--- a/sw/source/ui/index/multmrk.src
+++ b/sw/source/ui/index/multmrk.src
@@ -31,7 +31,7 @@
#include "helpid.h"
ModalDialog DLG_MULTMRK
{
- HelpID = FN_EDIT_IDX_ENTRY_DLG ;
+ HelpID = CMD_FN_EDIT_IDX_ENTRY_DLG ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 220 , 95 ) ;
@@ -65,6 +65,7 @@ ModalDialog DLG_MULTMRK
};
ListBox LB_TOX
{
+ HelpID = "sw:ListBox:DLG_MULTMRK:LB_TOX";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 37 ) ;
Size = MAP_APPFONT ( 100 , 49 ) ;
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 81930b247ebe..5c55f4cb9f65 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -72,7 +72,6 @@
#include <ndtxt.hxx>
#include <breakit.hxx>
#include <SwRewriter.hxx>
-#include <undobj.hxx>
#include <unomid.h>
@@ -103,6 +102,7 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent,
const ResId& rResId,
sal_Int32 _nOptionsId, SwWrtShell& rWrtShell ) :
Window(pParent, rResId),
+ aIndexFL(this, SW_RES(FL_INDEX )),
aTypeFT (this, SW_RES(LBL_INDEX )),
aTypeDCB(this, SW_RES(DCB_INDEX )),
aNewBT(this, SW_RES(BT_NEW )),
@@ -129,7 +129,6 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent,
aSearchCaseSensitiveCB(this, SW_RES(CB_CASESENSITIVE )),
aSearchCaseWordOnlyCB(this, SW_RES(CB_WORDONLY )),
- aIndexFL(this, SW_RES(FL_INDEX )),
aOKBT(this, SW_RES(BT_OK )),
aCancelBT(this, SW_RES(BT_CANCEL )),
@@ -146,15 +145,17 @@ SwIndexMarkDlg::SwIndexMarkDlg(Window *pParent,
bNewMark(bNewDlg),
bSelected(sal_False),
- bPhoneticED0_ChangedByUser(FALSE),
- bPhoneticED1_ChangedByUser(FALSE),
- bPhoneticED2_ChangedByUser(FALSE),
+ bPhoneticED0_ChangedByUser(sal_False),
+ bPhoneticED1_ChangedByUser(sal_False),
+ bPhoneticED2_ChangedByUser(sal_False),
nLangForPhoneticReading(2052),
- bIsPhoneticReadingEnabled(FALSE),
+ bIsPhoneticReadingEnabled(sal_False),
xExtendedIndexEntrySupplier(NULL),
pTOXMgr(0),
pSh(&rWrtShell)
{
+ aNewBT.SetAccessibleRelationMemberOf(&aIndexFL);
+
if( SvtCJKOptions().IsCJKFontEnabled() )
{
uno::Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory();
@@ -350,10 +351,10 @@ void SwIndexMarkDlg::UpdateLanguageDependenciesForPhoneticReading()
//no phonetic reading if no global cjk support
if( !xExtendedIndexEntrySupplier.is() )
{
- bIsPhoneticReadingEnabled = FALSE;
+ bIsPhoneticReadingEnabled = sal_False;
return;
}
- bIsPhoneticReadingEnabled = TRUE;
+ bIsPhoneticReadingEnabled = sal_True;
//get the current language
if(!bNewMark) //if dialog is opened to iterate existing marks
@@ -378,8 +379,8 @@ void SwIndexMarkDlg::UpdateLanguageDependenciesForPhoneticReading()
}
else //if dialog is opened to create a new mark
{
- USHORT nScriptType = pSh->GetScriptType();
- USHORT nWhich;
+ sal_uInt16 nScriptType = pSh->GetScriptType();
+ sal_uInt16 nWhich;
switch(nScriptType)
{
case SCRIPTTYPE_ASIAN: nWhich = RES_CHRATR_CJK_LANGUAGE; break;
@@ -483,7 +484,7 @@ void SwIndexMarkDlg::InsertUpdate()
/*--------------------------------------------------------------------
Beschreibung: Marke einfuegen
--------------------------------------------------------------------*/
-static void lcl_SelectSameStrings(SwWrtShell& rSh, BOOL bWordOnly, BOOL bCaseSensitive)
+static void lcl_SelectSameStrings(SwWrtShell& rSh, sal_Bool bWordOnly, sal_Bool bCaseSensitive)
{
rSh.Push();
@@ -498,12 +499,12 @@ static void lcl_SelectSameStrings(SwWrtShell& rSh, BOOL bWordOnly, BOOL bCaseSen
: TransliterationModules_IGNORE_CASE) );
rSh.ClearMark();
- BOOL bCancel;
+ sal_Bool bCancel;
//todo/mba: assuming that notes should not be searched
- BOOL bSearchInNotes = FALSE;
+ sal_Bool bSearchInNotes = sal_False;
rSh.Find( aSearchOpt, bSearchInNotes, DOCPOS_START, DOCPOS_END, bCancel,
- (FindRanges)(FND_IN_SELALL|FND_IN_BODYONLY), FALSE );
+ (FindRanges)(FND_IN_SELALL|FND_IN_BODYONLY), sal_False );
}
@@ -540,9 +541,9 @@ void SwIndexMarkDlg::InsertMark()
}
if (aOrgStr != aEntryED.GetText())
aDesc.SetAltStr(aEntryED.GetText());
- BOOL bApplyAll = aApplyToAllCB.IsChecked();
- BOOL bWordOnly = aSearchCaseWordOnlyCB.IsChecked();
- BOOL bCaseSensitive = aSearchCaseSensitiveCB.IsChecked();
+ sal_Bool bApplyAll = aApplyToAllCB.IsChecked();
+ sal_Bool bWordOnly = aSearchCaseWordOnlyCB.IsChecked();
+ sal_Bool bCaseSensitive = aSearchCaseSensitiveCB.IsChecked();
pSh->StartAllAction();
// hier muessen alle gleichen Strings selektiert werden
@@ -555,7 +556,7 @@ void SwIndexMarkDlg::InsertMark()
SwTOXMgr aMgr(pSh);
aMgr.InsertTOXMark(aDesc);
if(bApplyAll)
- pSh->Pop(FALSE);
+ pSh->Pop(sal_False);
pSh->EndAllAction();
}
@@ -773,11 +774,11 @@ IMPL_LINK( SwIndexMarkDlg, ModifyHdl, ListBox *, pBox )
}
else //aEntryED !!aEntryED is not a ListBox but a Edit
{
- BOOL bHasText = (aEntryED.GetText().Len()>0);
+ sal_Bool bHasText = (aEntryED.GetText().Len()>0);
if(!bHasText)
{
aPhoneticED0.SetText(aEmptyStr);
- bPhoneticED0_ChangedByUser = FALSE;
+ bPhoneticED0_ChangedByUser = sal_False;
}
else if(!bPhoneticED0_ChangedByUser)
aPhoneticED0.SetText(GetDefaultPhoneticReading(aEntryED.GetText()));
@@ -980,15 +981,15 @@ IMPL_LINK( SwIndexMarkDlg, KeyDCBModifyHdl, ComboBox *, pBox )
aKey2DCB.SetText(aEmptyStr);
aPhoneticED1.SetText(aEmptyStr);
aPhoneticED2.SetText(aEmptyStr);
- bPhoneticED1_ChangedByUser = FALSE;
- bPhoneticED2_ChangedByUser = FALSE;
+ bPhoneticED1_ChangedByUser = sal_False;
+ bPhoneticED2_ChangedByUser = sal_False;
}
else
{
if(pBox->IsInDropDown())
{
//reset bPhoneticED1_ChangedByUser if a completly new string is selected
- bPhoneticED1_ChangedByUser = FALSE;
+ bPhoneticED1_ChangedByUser = sal_False;
}
if(!bPhoneticED1_ChangedByUser)
aPhoneticED1.SetText(GetDefaultPhoneticReading(pBox->GetText()));
@@ -1001,14 +1002,14 @@ IMPL_LINK( SwIndexMarkDlg, KeyDCBModifyHdl, ComboBox *, pBox )
if(!(pBox->GetText().Len()>0))
{
aPhoneticED2.SetText(aEmptyStr);
- bPhoneticED2_ChangedByUser = FALSE;
+ bPhoneticED2_ChangedByUser = sal_False;
}
else
{
if(pBox->IsInDropDown())
{
//reset bPhoneticED1_ChangedByUser if a completly new string is selected
- bPhoneticED2_ChangedByUser = FALSE;
+ bPhoneticED2_ChangedByUser = sal_False;
}
if(!bPhoneticED2_ChangedByUser)
aPhoneticED2.SetText(GetDefaultPhoneticReading(pBox->GetText()));
@@ -1041,7 +1042,7 @@ void SwIndexMarkDlg::ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark)
pTOXMgr = new SwTOXMgr(pSh);
if(pCurTOXMark)
{
- for(USHORT i = 0; i < pTOXMgr->GetTOXMarkCount(); i++)
+ for(sal_uInt16 i = 0; i < pTOXMgr->GetTOXMarkCount(); i++)
if(pTOXMgr->GetTOXMark(i) == pCurTOXMark)
{
pTOXMgr->SetCurTOXMark(i);
@@ -1129,7 +1130,7 @@ public:
struct TextInfo
{
sal_uInt16 nToxField;
- sal_uInt16 nHelpId;
+ const char* pHelpId;
};
static const TextInfo aTextInfoArr[] =
@@ -1640,7 +1641,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent,
pTypeListBox->SetPosPixel(bLeft ? aTR1 : aTR2);
pTypeListBox->Show();
pTypeListBox->SetSelectHdl(LINK(this, SwCreateAuthEntryDlg_Impl, EnableHdl));
- pTypeListBox->SetHelpId(aCurInfo.nHelpId);
+ pTypeListBox->SetHelpId(aCurInfo.pHelpId);
}
else if(AUTH_FIELD_IDENTIFIER == aCurInfo.nToxField && !m_bNewEntryMode)
@@ -1668,7 +1669,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent,
pIdentifierBox->SetSizePixel(aTmp);
pIdentifierBox->SetPosPixel(bLeft ? aTR1 : aTR2);
pIdentifierBox->Show();
- pIdentifierBox->SetHelpId(aCurInfo.nHelpId);
+ pIdentifierBox->SetHelpId(aCurInfo.pHelpId);
}
else
{
@@ -1679,7 +1680,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent,
pEdits[nIndex]->SetPosPixel(bLeft ? aTR1 : aTR2);
pEdits[nIndex]->SetText(pFields[aCurInfo.nToxField]);
pEdits[nIndex]->Show();
- pEdits[nIndex]->SetHelpId(aCurInfo.nHelpId);
+ pEdits[nIndex]->SetHelpId(aCurInfo.pHelpId);
if(AUTH_FIELD_IDENTIFIER == aCurInfo.nToxField)
{
pEdits[nIndex]->SetModifyHdl(LINK(this, SwCreateAuthEntryDlg_Impl, ShortNameHdl));
diff --git a/sw/source/ui/index/toxmgr.cxx b/sw/source/ui/index/toxmgr.cxx
index ad6f70beca5c..f3afd0c21d15 100644
--- a/sw/source/ui/index/toxmgr.cxx
+++ b/sw/source/ui/index/toxmgr.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <wrtsh.hxx>
#include <shellres.hxx>
#include <swwait.hxx>
@@ -35,6 +36,7 @@
#include <toxmgr.hxx>
#include <crsskip.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <swundo.hxx>
#include <globals.hrc>
@@ -55,13 +57,13 @@ SwTOXMgr::SwTOXMgr(SwWrtShell* pShell):
--------------------------------------------------------------------*/
-USHORT SwTOXMgr::GetTOXMarks()
+sal_uInt16 SwTOXMgr::GetTOXMarks()
{
return pSh->GetCurTOXMarks(aCurMarks);
}
-SwTOXMark* SwTOXMgr::GetTOXMark(USHORT nId)
+SwTOXMark* SwTOXMgr::GetTOXMark(sal_uInt16 nId)
{
if(aCurMarks.Count() > 0)
return aCurMarks[nId];
@@ -95,7 +97,7 @@ void SwTOXMgr::InsertTOXMark(const SwTOXMarkDescription& rDesc)
OSL_ENSURE(rDesc.GetLevel() > 0 && rDesc.GetLevel() <= MAXLEVEL,
"invalid InsertTOCMark level");
pMark = new SwTOXMark(pSh->GetTOXType(TOX_CONTENT, 0));
- pMark->SetLevel( static_cast< USHORT >(rDesc.GetLevel()) );
+ pMark->SetLevel( static_cast< sal_uInt16 >(rDesc.GetLevel()) );
if(rDesc.GetAltStr())
pMark->SetAlternativeText(*rDesc.GetAltStr());
@@ -129,10 +131,10 @@ void SwTOXMgr::InsertTOXMark(const SwTOXMarkDescription& rDesc)
{
OSL_ENSURE(rDesc.GetLevel() > 0 && rDesc.GetLevel() <= MAXLEVEL,
"invalid InsertTOCMark level");
- USHORT nId = rDesc.GetTOUName() ?
+ sal_uInt16 nId = rDesc.GetTOUName() ?
GetUserTypeID(*rDesc.GetTOUName()) : 0;
pMark = new SwTOXMark(pSh->GetTOXType(TOX_USER, nId));
- pMark->SetLevel( static_cast< USHORT >(rDesc.GetLevel()) );
+ pMark->SetLevel( static_cast< sal_uInt16 >(rDesc.GetLevel()) );
if(rDesc.GetAltStr())
pMark->SetAlternativeText(*rDesc.GetAltStr());
@@ -192,13 +194,13 @@ void SwTOXMgr::UpdateTOXMark(const SwTOXMarkDescription& rDesc)
pCurTOXMark->SetMainEntry(rDesc.IsMainEntry());
}
else
- pCurTOXMark->SetLevel( static_cast< USHORT >(rDesc.GetLevel()) );
+ pCurTOXMark->SetLevel( static_cast< sal_uInt16 >(rDesc.GetLevel()) );
if(rDesc.GetAltStr())
{
// JP 26.08.96: Bug 30344 - entweder der Text aus dem Doc oder
// ein Alternativ-Text, beides gibts nicht!
- BOOL bReplace = pCurTOXMark->IsAlternativeText();
+ sal_Bool bReplace = pCurTOXMark->IsAlternativeText();
if( bReplace )
pCurTOXMark->SetAlternativeText( *rDesc.GetAltStr() );
else
@@ -216,7 +218,7 @@ void SwTOXMgr::UpdateTOXMark(const SwTOXMarkDescription& rDesc)
// Bug 36207 pCurTOXMark zeigt hier in den Wald!
if(!pCurTOXMark)
{
- pSh->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ pSh->Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
pSh->GetCurTOXMarks(aCurMarks);
SetCurTOXMark(0);
}
@@ -228,10 +230,10 @@ void SwTOXMgr::UpdateTOXMark(const SwTOXMarkDescription& rDesc)
--------------------------------------------------------------------*/
-USHORT SwTOXMgr::GetUserTypeID(const String& rStr)
+sal_uInt16 SwTOXMgr::GetUserTypeID(const String& rStr)
{
- USHORT nSize = pSh->GetTOXTypeCount(TOX_USER);
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nSize = pSh->GetTOXTypeCount(TOX_USER);
+ for(sal_uInt16 i=0; i < nSize; ++i)
{
const SwTOXType* pTmp = pSh->GetTOXType(TOX_USER, i);
if(pTmp && pTmp->GetTypeName() == rStr)
@@ -247,7 +249,7 @@ USHORT SwTOXMgr::GetUserTypeID(const String& rStr)
--------------------------------------------------------------------*/
-void SwTOXMgr::NextTOXMark(BOOL bSame)
+void SwTOXMgr::NextTOXMark(sal_Bool bSame)
{
OSL_ENSURE(pCurTOXMark, "no current TOXMark");
if( pCurTOXMark )
@@ -258,7 +260,7 @@ void SwTOXMgr::NextTOXMark(BOOL bSame)
}
-void SwTOXMgr::PrevTOXMark(BOOL bSame)
+void SwTOXMgr::PrevTOXMark(sal_Bool bSame)
{
OSL_ENSURE(pCurTOXMark, "no current TOXMark");
if( pCurTOXMark )
@@ -276,22 +278,22 @@ const SwTOXBase* SwTOXMgr::GetCurTOX()
return pSh->GetCurTOX();
}
-const SwTOXType* SwTOXMgr::GetTOXType(TOXTypes eTyp, USHORT nId) const
+const SwTOXType* SwTOXMgr::GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const
{
return pSh->GetTOXType(eTyp, nId);
}
-void SwTOXMgr::SetCurTOXMark(USHORT nId)
+void SwTOXMgr::SetCurTOXMark(sal_uInt16 nId)
{
pCurTOXMark = (nId < aCurMarks.Count()) ? aCurMarks[nId] : 0;
}
-BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
+sal_Bool SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
SwTOXBase** ppBase,
const SfxItemSet* pSet)
{
- SwWait aWait( *pSh->GetView().GetDocShell(), TRUE );
- BOOL bRet = TRUE;
+ SwWait aWait( *pSh->GetView().GetDocShell(), sal_True );
+ sal_Bool bRet = sal_True;
const SwTOXBase* pCurTOX = ppBase && *ppBase ? *ppBase : GetCurTOX();
SwTOXBase* pTOX = (SwTOXBase*)pCurTOX;
@@ -336,9 +338,9 @@ BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
{
if(!pCurTOX || (ppBase && !(*ppBase)))
{
- USHORT nPos = 0;
- USHORT nSize = pSh->GetTOXTypeCount(eCurTOXType);
- for(USHORT i=0; rDesc.GetTOUName() && i < nSize; ++i)
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nSize = pSh->GetTOXTypeCount(eCurTOXType);
+ for(sal_uInt16 i=0; rDesc.GetTOUName() && i < nSize; ++i)
{ const SwTOXType* pType = pSh->GetTOXType(TOX_USER, i);
if(pType->GetTypeName() == *rDesc.GetTOUName())
{ nPos = i;
@@ -409,14 +411,14 @@ BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
OSL_ENSURE(pNewTOX, "no TOXBase created!" );
if(!pNewTOX)
- return FALSE;
+ return sal_False;
pNewTOX->SetFromChapter(rDesc.IsFromChapter());
pNewTOX->SetSequenceName(rDesc.GetSequenceName());
pNewTOX->SetCaptionDisplay(rDesc.GetCaptionDisplay());
pNewTOX->SetProtected(rDesc.IsReadonly());
- for(USHORT nLevel = 0; nLevel < MAXLEVEL; nLevel++)
+ for(sal_uInt16 nLevel = 0; nLevel < MAXLEVEL; nLevel++)
pNewTOX->SetStyleNames(rDesc.GetStyleNames(nLevel), nLevel);
if(rDesc.GetTitle())
@@ -442,12 +444,14 @@ BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
{
SwDoc * pDoc = pSh->GetDoc();
- if (pDoc->DoesUndo())
+ if (pDoc->GetIDocumentUndoRedo().DoesUndo())
{
if (pNewTOX != NULL)
- pDoc->DelAllUndoObj();
+ {
+ pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
+ }
- pDoc->StartUndo(UNDO_TOXCHANGE, NULL);
+ pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_TOXCHANGE, NULL);
}
if (pNewTOX != NULL) // => pTOX != NULL
@@ -455,12 +459,14 @@ BOOL SwTOXMgr::UpdateOrInsertTOX(const SwTOXDescription& rDesc,
bRet = pSh->UpdateTableOf(*pTOX, pSet);
- if (pDoc->DoesUndo())
+ if (pDoc->GetIDocumentUndoRedo().DoesUndo())
{
- pDoc->EndUndo(UNDO_TOXCHANGE, NULL);
+ pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_TOXCHANGE, NULL);
if (pNewTOX == NULL)
- pDoc->DelAllUndoObj();
+ {
+ pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
+ }
}
}
@@ -472,7 +478,7 @@ void SwTOXDescription::SetSortKeys(SwTOXSortKey eKey1,
SwTOXSortKey eKey3)
{
SwTOXSortKey aArr[3];
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if(AUTH_FIELD_END > eKey1.eField)
aArr[nPos++] = eKey1;
if(AUTH_FIELD_END > eKey2.eField)
@@ -487,7 +493,7 @@ void SwTOXDescription::SetSortKeys(SwTOXSortKey eKey1,
void SwTOXDescription::ApplyTo(SwTOXBase& rTOXBase)
{
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
rTOXBase.SetStyleNames(GetStyleNames(i), i);
rTOXBase.SetTitle(GetTitle() ? *GetTitle() : aEmptyStr);
rTOXBase.SetCreate(GetContentOptions());
diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx
index 0ccd1873b1c7..f81cad15b7c7 100644
--- a/sw/source/ui/lingu/hhcwrp.cxx
+++ b/sw/source/ui/lingu/hhcwrp.cxx
@@ -217,10 +217,10 @@ void SwHHCWrapper::SelectNewUnit_impl( sal_Int32 nUnitStart, sal_Int32 nUnitEnd
pCrsr->DeleteMark();
rWrtShell.Right( CRSR_SKIP_CHARS, /*bExpand*/ sal_False,
- (USHORT) (nUnitOffset + nUnitStart), sal_True );
+ (sal_uInt16) (nUnitOffset + nUnitStart), sal_True );
pCrsr->SetMark();
rWrtShell.Right( CRSR_SKIP_CHARS, /*bExpand*/ sal_True,
- (USHORT) (nUnitEnd - nUnitStart), sal_True );
+ (sal_uInt16) (nUnitEnd - nUnitStart), sal_True );
// end selection now. Otherwise SHIFT+HOME (extending the selection)
// won't work when the dialog is closed without any replacement.
// (see #116346#)
@@ -491,7 +491,7 @@ void SwHHCWrapper::ReplaceUnit(
// of the flag.
rWrtShell.EndSelect();
- rWrtShell.Left( 0, TRUE, aNewOrigText.Len(), TRUE, TRUE );
+ rWrtShell.Left( 0, sal_True, aNewOrigText.Len(), sal_True, sal_True );
}
pRuby->SetPosition( bRubyBelow );
diff --git a/sw/source/ui/lingu/makefile.mk b/sw/source/ui/lingu/makefile.mk
deleted file mode 100644
index 0abd0c319ab1..000000000000
--- a/sw/source/ui/lingu/makefile.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=lingu
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES= \
- $(SLO)$/hhcwrp.obj \
- $(SLO)$/hyp.obj \
- $(SLO)$/olmenu.obj \
- $(SLO)$/sdrhhcwrap.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- olmenu.src
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index e71223de98e2..e01ecfdfb9ec 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -48,7 +48,6 @@
#include "swtypes.hxx"
#include "swundo.hxx"
#include "uitool.hxx"
-#include "undobj.hxx"
#include "unomid.h"
#include "view.hxx"
#include "viewopt.hxx"
@@ -108,7 +107,7 @@
using namespace ::com::sun::star;
using ::rtl::OUString;
-extern void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const SfxItemSet *pArgs, SfxRequest *pReq );
+extern void lcl_CharDialog( SwWrtShell &rWrtSh, sal_Bool bUseDialog, sal_uInt16 nSlot,const SfxItemSet *pArgs, SfxRequest *pReq );
@@ -174,10 +173,10 @@ LanguageType lcl_CheckLanguage(
lang::Locale a3( SvxCreateLocale( aLangList[3] ) );
#endif
- INT32 nCount = SAL_N_ELEMENTS(aLangList);
- for (INT32 i = 0; i < nCount; i++)
+ sal_Int32 nCount = SAL_N_ELEMENTS(aLangList);
+ for (sal_Int32 i = 0; i < nCount; i++)
{
- INT16 nTmpLang = aLangList[i];
+ sal_Int16 nTmpLang = aLangList[i];
if (nTmpLang != LANGUAGE_NONE && nTmpLang != LANGUAGE_DONTKNOW)
{
if (xSpell->hasLanguage( nTmpLang ) &&
@@ -211,7 +210,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 )
@@ -225,7 +224,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] );
@@ -281,7 +280,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;
@@ -293,7 +292,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;
@@ -310,7 +309,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;
@@ -421,9 +420,9 @@ SwSpellPopup::SwSpellPopup(
InsertSeparator(0);
bEnable = sal_True;
- USHORT nAutoCorrItemId = MN_AUTOCORR_START;
- USHORT nItemId = MN_SUGGESTION_START;
- for (USHORT i = 0; i < nStringCount; ++i)
+ sal_uInt16 nAutoCorrItemId = MN_AUTOCORR_START;
+ sal_uInt16 nItemId = MN_SUGGESTION_START;
+ for (sal_uInt16 i = 0; i < nStringCount; ++i)
{
const String aEntry = aSuggestions[ i ];
InsertItem( nItemId, aEntry, 0, i );
@@ -442,7 +441,7 @@ SwSpellPopup::SwSpellPopup(
OUString aIgnoreSelection( String( SW_RES( STR_IGNORE_SELECTION ) ) );
OUString aSpellingAndGrammar = RetrieveLabelFromCommand( C2U(".uno:SpellingAndGrammarDialog") );
SetItemText( MN_SPELLING_DLG, aSpellingAndGrammar );
- USHORT nItemPos = GetItemPos( MN_IGNORE_WORD );
+ sal_uInt16 nItemPos = GetItemPos( MN_IGNORE_WORD );
InsertItem( MN_IGNORE_SELECTION, aIgnoreSelection, 0, nItemPos );
SetHelpId( MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION);
@@ -467,7 +466,7 @@ SwSpellPopup::SwSpellPopup(
pMenu = GetPopupMenu(MN_ADD_TO_DIC);
pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); //! necessary to retrieve the correct dictionary name in 'Execute' below
- bEnable = FALSE; // enable MN_ADD_TO_DIC?
+ bEnable = sal_False; // enable MN_ADD_TO_DIC?
uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() );
if (xDicList.is())
{
@@ -480,10 +479,10 @@ SwSpellPopup::SwSpellPopup(
aDics = xDicList->getDictionaries();
const uno::Reference< linguistic2::XDictionary > *pDic = aDics.getConstArray();
- USHORT nDicCount = static_cast< USHORT >(aDics.getLength());
+ sal_uInt16 nDicCount = static_cast< sal_uInt16 >(aDics.getLength());
- USHORT nItemId = MN_DICTIONARIES_START;
- for( USHORT i = 0; i < nDicCount; i++ )
+ sal_uInt16 nItemId = MN_DICTIONARIES_START;
+ for( sal_uInt16 i = 0; i < nDicCount; i++ )
{
uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY );
if (!xDicTmp.is() || SvxGetIgnoreAllList() == xDicTmp)
@@ -561,7 +560,7 @@ SwSpellPopup::SwSpellPopup(
//////////////////////////////////////////////////////////////////////////////////
- RemoveDisabledEntries( TRUE, TRUE );
+ RemoveDisabledEntries( sal_True, sal_True );
}
@@ -580,7 +579,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++ );
@@ -601,7 +600,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 ];
@@ -618,7 +617,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);
@@ -685,7 +684,7 @@ aInfo16( SW_RES(IMG_INFO_16) )
//////////////////////////////////////////////////////////////////////////////////
- RemoveDisabledEntries( TRUE, TRUE );
+ RemoveDisabledEntries( sal_True, sal_True );
}
@@ -696,7 +695,7 @@ sal_uInt16 SwSpellPopup::Execute( const Rectangle& rWordPos, Window* pWin )
return nRet;
}
-void SwSpellPopup::Execute( USHORT nId )
+void SwSpellPopup::Execute( sal_uInt16 nId )
{
if (nId == USHRT_MAX)
return;
@@ -762,7 +761,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 );
}
@@ -773,7 +772,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 );
@@ -807,7 +806,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())
@@ -861,7 +860,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)
{
@@ -869,7 +868,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)
{
@@ -877,7 +876,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)
{
@@ -885,7 +884,7 @@ void SwSpellPopup::Execute( USHORT nId )
SwLangHelper::SelectCurrentPara( *pSh );
//Open Format/Character Dialog
lcl_CharDialog( *pSh, true, nId, 0, 0 );
- pSh->Pop( FALSE ); // restore cursor
+ pSh->Pop( sal_False ); // restore cursor
}
}
diff --git a/sw/source/ui/makefile.mk b/sw/source/ui/makefile.mk
deleted file mode 100644
index b331a2a00765..000000000000
--- a/sw/source/ui/makefile.mk
+++ /dev/null
@@ -1,101 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=sw
-TARGET=ui
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(GUI)" != "OS2"
-.IF "$(GUI)" != "WNT"
-.IF "$(COM)" != "BLC"
-.IF "$(COM)" != "WTC"
-LIBFLAGS=/NOI /NOE /PAGE:256
-.ENDIF
-.ENDIF
-.ENDIF
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-# andere Label als Verzeichnisnamen fuer VC++/NT
-
-SUBLIBS1= \
- $(SLB)$/app.lib \
- $(SLB)$/cctrl.lib \
- $(SLB)$/chrdlg.lib \
- $(SLB)$/config.lib \
- $(SLB)$/dbui.lib \
- $(SLB)$/dialog.lib \
- $(SLB)$/dochdl.lib \
- $(SLB)$/docvw.lib \
- $(SLB)$/envelp.lib \
- $(SLB)$/fldui.lib \
- $(SLB)$/frmdlg.lib \
- $(SLB)$/globdoc.lib
-
-SUBLIBS2= \
- $(SLB)$/index.lib \
- $(SLB)$/lingu.lib \
- $(SLB)$/misc.lib \
- $(SLB)$/ribbar.lib \
- $(SLB)$/shells.lib \
- $(SLB)$/smartmenu.lib \
- $(SLB)$/table.lib \
- $(SLB)$/unoidl.lib \
- $(SLB)$/utlui.lib \
- $(SLB)$/web.lib \
- $(SLB)$/uiview.lib \
- $(SLB)$/wrtsh.lib
-
-# -----------------------------------------------------------
-
-################################################################
-
-LIB1TARGET=$(SLB)$/ui1.lib
-LIB1FILES= \
- $(SUBLIBS1)
-
-LIB2TARGET=$(SLB)$/ui2.lib
-LIB2FILES= \
- $(SUBLIBS2)
-
-.INCLUDE : target.mk
-
-################################################################
-
-kill:
- @$(RM) $(SLB)$/ui.lst
- @$(RM) $(SLB)$/ui.lib
-
-
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 9cbdd38f7d3a..1d5489da0a01 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -52,17 +52,17 @@ const String BookmarkCombo::aForbiddenChars = String::CreateFromAscii("/\\@:*?\"
IMPL_LINK( SwInsertBookmarkDlg, ModifyHdl, BookmarkCombo *, pBox )
{
- BOOL bSelEntries = pBox->GetSelectEntryCount() != 0;
+ sal_Bool bSelEntries = pBox->GetSelectEntryCount() != 0;
// if a string has been pasted from the clipboard then
// there may be illegal characters in the box
if(!bSelEntries)
{
String sTmp = pBox->GetText();
- USHORT nLen = sTmp.Len();
+ sal_uInt16 nLen = sTmp.Len();
String sMsg;
- for(USHORT i = 0; i < BookmarkCombo::aForbiddenChars.Len(); i++)
+ for(sal_uInt16 i = 0; i < BookmarkCombo::aForbiddenChars.Len(); i++)
{
- USHORT nTmpLen = sTmp.Len();
+ sal_uInt16 nTmpLen = sTmp.Len();
sTmp.EraseAllChars(BookmarkCombo::aForbiddenChars.GetChar(i));
if(sTmp.Len() != nTmpLen)
sMsg += BookmarkCombo::aForbiddenChars.GetChar(i);
@@ -91,11 +91,11 @@ IMPL_LINK( SwInsertBookmarkDlg, DeleteHdl, Button *, EMPTYARG )
{
// Textmarken aus der ComboBox entfernen
- for (USHORT i = aBookmarkBox.GetSelectEntryCount(); i; i-- )
+ for (sal_uInt16 i = aBookmarkBox.GetSelectEntryCount(); i; i-- )
aBookmarkBox.RemoveEntry(aBookmarkBox.GetSelectEntryPos(i - 1));
aBookmarkBox.SetText(aEmptyStr);
- aDeleteBtn.Enable(FALSE); // keine weiteren Eintraege vorhanden
+ aDeleteBtn.Enable(sal_False); // keine weiteren Eintraege vorhanden
aOkBtn.Enable(); // Im OK Handler wird geloescht
return 0;
@@ -110,7 +110,7 @@ void SwInsertBookmarkDlg::Apply()
{
//at first remove deleted bookmarks to prevent multiple bookmarks with the same
//name
- for (USHORT nCount = aBookmarkBox.GetRemovedCount(); nCount > 0; nCount--)
+ for (sal_uInt16 nCount = aBookmarkBox.GetRemovedCount(); nCount > 0; nCount--)
{
String sRemoved = aBookmarkBox.GetRemovedEntry( nCount -1 ).GetName();
IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
@@ -121,7 +121,7 @@ void SwInsertBookmarkDlg::Apply()
}
// Textmarke einfuegen
- USHORT nLen = aBookmarkBox.GetText().Len();
+ sal_uInt16 nLen = aBookmarkBox.GetText().Len();
SwBoxEntry aTmpEntry(aBookmarkBox.GetText(), 0 );
if ( nLen && (aBookmarkBox.GetEntryPos(aTmpEntry) == COMBOBOX_ENTRY_NOTFOUND) )
@@ -145,9 +145,8 @@ void SwInsertBookmarkDlg::Apply()
SwInsertBookmarkDlg::SwInsertBookmarkDlg( Window *pParent, SwWrtShell &rS, SfxRequest& rRequest ) :
SvxStandardDialog(pParent,SW_RES(DLG_INSERT_BOOKMARK)),
-
- aBookmarkBox(this,SW_RES(CB_BOOKMARK)),
aBookmarkFl(this,SW_RES(FL_BOOKMARK)),
+ aBookmarkBox(this,SW_RES(CB_BOOKMARK)),
aOkBtn(this,SW_RES(BT_OK)),
aCancelBtn(this,SW_RES(BT_CANCEL)),
aDeleteBtn(this,SW_RES(BT_DELETE)),
@@ -155,14 +154,14 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg( Window *pParent, SwWrtShell &rS, SfxRe
rReq( rRequest )
{
aBookmarkBox.SetModifyHdl(LINK(this, SwInsertBookmarkDlg, ModifyHdl));
- aBookmarkBox.EnableMultiSelection(TRUE);
- aBookmarkBox.EnableAutocomplete( TRUE, TRUE );
+ aBookmarkBox.EnableMultiSelection(sal_True);
+ aBookmarkBox.EnableAutocomplete( sal_True, sal_True );
aDeleteBtn.SetClickHdl(LINK(this, SwInsertBookmarkDlg, DeleteHdl));
// Combobox mit vorhandenen Bookmarks fuellen
IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
for( IDocumentMarkAccess::const_iterator_t ppBookmark = pMarkAccess->getBookmarksBegin();
ppBookmark != pMarkAccess->getBookmarksEnd();
ppBookmark++)
@@ -183,21 +182,21 @@ BookmarkCombo::BookmarkCombo( Window* pWin, const ResId& rResId ) :
{
}
-USHORT BookmarkCombo::GetFirstSelEntryPos() const
+sal_uInt16 BookmarkCombo::GetFirstSelEntryPos() const
{
return GetSelEntryPos(0);
}
-USHORT BookmarkCombo::GetNextSelEntryPos(USHORT nPos) const
+sal_uInt16 BookmarkCombo::GetNextSelEntryPos(sal_uInt16 nPos) const
{
return GetSelEntryPos(nPos + 1);
}
-USHORT BookmarkCombo::GetSelEntryPos(USHORT nPos) const
+sal_uInt16 BookmarkCombo::GetSelEntryPos(sal_uInt16 nPos) const
{
sal_Unicode cSep = GetMultiSelectionSeparator();
- USHORT nCnt = GetText().GetTokenCount(cSep);
+ sal_uInt16 nCnt = GetText().GetTokenCount(cSep);
for (; nPos < nCnt; nPos++)
{
@@ -211,11 +210,11 @@ USHORT BookmarkCombo::GetSelEntryPos(USHORT nPos) const
return COMBOBOX_ENTRY_NOTFOUND;
}
-USHORT BookmarkCombo::GetSelectEntryCount() const
+sal_uInt16 BookmarkCombo::GetSelectEntryCount() const
{
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
- USHORT nPos = GetFirstSelEntryPos();
+ sal_uInt16 nPos = GetFirstSelEntryPos();
while (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
nPos = GetNextSelEntryPos(nPos);
@@ -228,10 +227,10 @@ USHORT BookmarkCombo::GetSelectEntryCount() const
/*------------------------------------------------------------------------
Beschreibung: Position in der Listbox (der ComboBox)
-----------------------------------------------------------------------*/
-USHORT BookmarkCombo::GetSelectEntryPos( USHORT nSelIndex ) const
+sal_uInt16 BookmarkCombo::GetSelectEntryPos( sal_uInt16 nSelIndex ) const
{
- USHORT nCnt = 0;
- USHORT nPos = GetFirstSelEntryPos();
+ sal_uInt16 nCnt = 0;
+ sal_uInt16 nPos = GetFirstSelEntryPos();
while (nPos != COMBOBOX_ENTRY_NOTFOUND)
{
diff --git a/sw/source/ui/misc/bookmark.src b/sw/source/ui/misc/bookmark.src
index 825bcfbcee25..da27b5553b79 100644
--- a/sw/source/ui/misc/bookmark.src
+++ b/sw/source/ui/misc/bookmark.src
@@ -31,7 +31,7 @@
#include "helpid.h"
ModalDialog DLG_INSERT_BOOKMARK
{
- HelpID = FN_INSERT_BOOKMARK ;
+ HelpID = CMD_FN_INSERT_BOOKMARK ;
OUTPUTSIZE = TRUE ;
Size = MAP_APPFONT ( 179 , 96 ) ;
Text [ en-US ] = "Insert Bookmark" ;
@@ -53,6 +53,7 @@ ModalDialog DLG_INSERT_BOOKMARK
};
ComboBox CB_BOOKMARK
{
+ HelpID = "sw:ComboBox:DLG_INSERT_BOOKMARK:CB_BOOKMARK";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 99 , 76 ) ;
TABSTOP = TRUE ;
@@ -61,6 +62,7 @@ ModalDialog DLG_INSERT_BOOKMARK
};
PushButton BT_DELETE
{
+ HelpID = "sw:PushButton:DLG_INSERT_BOOKMARK:BT_DELETE";
Pos = MAP_APPFONT ( 123 , 40 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete" ;
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx
index 909d1a4380eb..990152ab3def 100644
--- a/sw/source/ui/misc/docfnote.cxx
+++ b/sw/source/ui/misc/docfnote.cxx
@@ -69,7 +69,7 @@ SwFootNoteOptionDlg::SwFootNoteOptionDlg( Window *pParent, SwWrtShell &rS ) :
AddTabPage( TP_ENDNOTEOPTION, SwEndNoteOptionPage::Create, 0 );
}
-void SwFootNoteOptionDlg::PageCreated( USHORT /*nId*/, SfxTabPage &rPage )
+void SwFootNoteOptionDlg::PageCreated( sal_uInt16 /*nId*/, SfxTabPage &rPage )
{
((SwEndNoteOptionPage&)rPage).SetShell( rSh );
}
@@ -95,9 +95,11 @@ IMPL_LINK( SwFootNoteOptionDlg, OkHdl, Button *, pBtn )
//----------------------------------------------------------------------
-SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, BOOL bEN,
+SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, sal_Bool bEN,
const SfxItemSet &rSet ) :
SfxTabPage( pParent, SW_RES(bEN ? TP_ENDNOTEOPTION : TP_FOOTNOTEOPTION), rSet ),
+ aNumFL (this, SW_RES( FL_NUM )),
+
aNumTypeFT (this, SW_RES( FT_NUMTYPE )),
aNumViewBox (this, SW_RES( LB_NUMVIEW ), INSERT_NUM_EXTENDED_TYPES),
aOffsetLbl (this, SW_RES( FT_OFFSET )),
@@ -111,31 +113,30 @@ SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, BOOL bEN,
aPosFT (this, SW_RES( FT_POS )),
aPosPageBox (this, SW_RES( RB_POS_PAGE )),
aPosChapterBox (this, SW_RES( RB_POS_CHAPTER)),
- aNumFL (this, SW_RES( FL_NUM )),
+ aTemplFL (this, SW_RES( FL_TEMPL )),
aParaTemplLbl (this, SW_RES( FT_PARA_TEMPL)),
aParaTemplBox (this, SW_RES( LB_PARA_TEMPL)),
aPageTemplLbl (this, SW_RES( FT_PAGE_TEMPL)),
aPageTemplBox (this, SW_RES( LB_PAGE_TEMPL)),
- aTemplFL (this, SW_RES( FL_TEMPL )),
+ aCharTemplFL( this, SW_RES(FL_CHAR_TEMPL)),
aFtnCharAnchorTemplLbl( this, SW_RES( FT_ANCHR_CHARFMT)),
aFtnCharAnchorTemplBox( this, SW_RES( LB_ANCHR_CHARFMT)),
aFtnCharTextTemplLbl( this, SW_RES( FT_TEXT_CHARFMT)),
aFtnCharTextTemplBox( this, SW_RES( LB_TEXT_CHARFMT)),
- aCharTemplFL( this, SW_RES(FL_CHAR_TEMPL)),
+ aContFL (this, SW_RES( FL_CONT )),
aContLbl (this, SW_RES( FT_CONT )),
aContEdit (this, SW_RES( ED_CONT )),
aContFromLbl (this, SW_RES( FT_CONT_FROM )),
aContFromEdit (this, SW_RES( ED_CONT_FROM )),
- aContFL (this, SW_RES( FL_CONT )),
aNumDoc(aNumCountBox.GetEntry(FTNNUM_DOC)),
aNumPage(aNumCountBox.GetEntry(FTNNUM_PAGE)),
aNumChapter(aNumCountBox.GetEntry(FTNNUM_CHAPTER)),
pSh( 0 ),
- bPosDoc(FALSE),
+ bPosDoc(sal_False),
bEndNote( bEN )
{
FreeResource();
@@ -144,6 +145,8 @@ SwEndNoteOptionPage::SwEndNoteOptionPage( Window *pParent, BOOL bEN,
aPosChapterBox.SetClickHdl(LINK(this, SwEndNoteOptionPage, PosChapterHdl));
aNumCountBox.SetSelectHdl(LINK(this, SwEndNoteOptionPage, NumCountHdl));
+ aPosPageBox.SetAccessibleRelationMemberOf(&aPosFT);
+ aPosChapterBox.SetAccessibleRelationMemberOf(&aPosFT);
}
void SwEndNoteOptionPage::Reset( const SfxItemSet& )
@@ -151,7 +154,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
SwEndNoteInfo *pInf = bEndNote ? new SwEndNoteInfo( pSh->GetEndNoteInfo() )
: new SwFtnInfo( pSh->GetFtnInfo() );
SfxObjectShell * pDocSh = SfxObjectShell::Current();
- USHORT i;
+ sal_uInt16 i;
if(PTR_CAST(SwWebDocShell, pDocSh))
{
@@ -176,7 +179,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
aContFromLbl.Hide();
aContFromEdit.Hide();
aContFL.Hide();
- bPosDoc = TRUE;
+ bPosDoc = sal_True;
}
else
{
@@ -185,15 +188,15 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
if ( rInf.ePos == FTNPOS_PAGE )
{
aPosPageBox.Check();
- aPageTemplLbl.Enable(FALSE);
- aPageTemplBox.Enable(FALSE);
+ aPageTemplLbl.Enable(sal_False);
+ aPageTemplBox.Enable(sal_False);
}
else
{
aPosChapterBox.Check();
aNumCountBox.RemoveEntry(aNumPage);
aNumCountBox.RemoveEntry(aNumChapter);
- bPosDoc = TRUE;
+ bPosDoc = sal_True;
}
// Verweistexte
aContEdit.SetText(rInf.aQuoVadis);
@@ -242,7 +245,7 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
else
{
OSL_ENSURE(!pColl->IsDefault(), "default style for footnotes is wrong");
- const USHORT nPos = aParaTemplBox.GetEntryPos(pColl->GetName());
+ const sal_uInt16 nPos = aParaTemplBox.GetEntryPos(pColl->GetName());
if( LISTBOX_ENTRY_NOTFOUND != nPos )
aParaTemplBox.SelectEntryPos( nPos );
else
@@ -253,10 +256,10 @@ void SwEndNoteOptionPage::Reset( const SfxItemSet& )
}
// Seite
- for( i = RES_POOLPAGE_BEGIN; i <= RES_POOLPAGE_LANDSCAPE; ++i )
+ for( i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i )
aPageTemplBox.InsertEntry(SwStyleNameMapper::GetUIName( i, aEmptyStr ));
- USHORT nCount = pSh->GetPageDescCnt();
+ sal_uInt16 nCount = pSh->GetPageDescCnt();
for(i = 0; i < nCount; ++i)
{
const SwPageDesc &rPageDesc = pSh->GetPageDesc(i);
@@ -274,7 +277,7 @@ SwEndNoteOptionPage::~SwEndNoteOptionPage()
SfxTabPage *SwEndNoteOptionPage::Create( Window *pParent, const SfxItemSet &rSet )
{
- return new SwEndNoteOptionPage( pParent, TRUE, rSet );
+ return new SwEndNoteOptionPage( pParent, sal_True, rSet );
}
/*------------------------------------------------------------------------
@@ -310,7 +313,7 @@ void SwEndNoteOptionPage::SelectNumbering(int eNum)
int SwEndNoteOptionPage::GetNumbering() const
{
- const USHORT nPos = aNumCountBox.GetSelectEntryPos();
+ const sal_uInt16 nPos = aNumCountBox.GetSelectEntryPos();
return (int) bPosDoc? nPos + 1: nPos;
}
@@ -338,25 +341,25 @@ void SwEndNoteOptionPage::SetShell( SwWrtShell &rShell )
IMPL_LINK( SwEndNoteOptionPage, PosPageHdl, Button *, EMPTYARG )
{
const SwFtnNum eNum = (const SwFtnNum)GetNumbering();
- bPosDoc = FALSE;
+ bPosDoc = sal_False;
if(LISTBOX_ENTRY_NOTFOUND == aNumCountBox.GetEntryPos(aNumPage))
{
aNumCountBox.InsertEntry(aNumPage, FTNNUM_PAGE);
aNumCountBox.InsertEntry(aNumChapter, FTNNUM_CHAPTER);
SelectNumbering(eNum);
}
- aPageTemplLbl.Enable(FALSE);
- aPageTemplBox.Enable(FALSE);
+ aPageTemplLbl.Enable(sal_False);
+ aPageTemplBox.Enable(sal_False);
return 0;
}
IMPL_LINK( SwEndNoteOptionPage, NumCountHdl, ListBox*, EMPTYARG )
{
- BOOL bEnable = TRUE;
+ sal_Bool bEnable = sal_True;
if( aNumCountBox.GetEntryCount() - 1 != aNumCountBox.GetSelectEntryPos() )
{
- bEnable = FALSE;
+ bEnable = sal_False;
aOffsetFld.SetValue(1);
}
aOffsetLbl.Enable(bEnable);
@@ -377,7 +380,7 @@ IMPL_LINK_INLINE_START( SwEndNoteOptionPage, PosChapterHdl, Button *, EMPTYARG )
if ( !bPosDoc )
SelectNumbering(FTNNUM_DOC);
- bPosDoc = TRUE;
+ bPosDoc = sal_True;
aNumCountBox.RemoveEntry(aNumPage);
aNumCountBox.RemoveEntry(aNumChapter);
aPageTemplLbl.Enable();
@@ -389,8 +392,8 @@ IMPL_LINK_INLINE_END( SwEndNoteOptionPage, PosChapterHdl, Button *, EMPTYARG )
SwCharFmt* lcl_GetCharFormat( SwWrtShell* pSh, const String& rCharFmtName )
{
SwCharFmt* pFmt = 0;
- USHORT nChCount = pSh->GetCharFmtCount();
- for(USHORT i = 0; i< nChCount; i++)
+ sal_uInt16 nChCount = pSh->GetCharFmtCount();
+ for(sal_uInt16 i = 0; i< nChCount; i++)
{
SwCharFmt& rChFmt = pSh->GetCharFmt(i);
if(rChFmt.GetName() == rCharFmtName )
@@ -411,11 +414,11 @@ SwCharFmt* lcl_GetCharFormat( SwWrtShell* pSh, const String& rCharFmtName )
return pFmt;
}
-BOOL SwEndNoteOptionPage::FillItemSet( SfxItemSet & )
+sal_Bool SwEndNoteOptionPage::FillItemSet( SfxItemSet & )
{
SwEndNoteInfo *pInf = bEndNote ? new SwEndNoteInfo() : new SwFtnInfo();
- pInf->nFtnOffset = static_cast< USHORT >(aOffsetFld.GetValue() -1);
+ pInf->nFtnOffset = static_cast< sal_uInt16 >(aOffsetFld.GetValue() -1);
pInf->aFmt.SetNumberingType(aNumViewBox.GetSelectedNumberingType() );
pInf->SetPrefix(aPrefixED.GetText());
pInf->SetSuffix(aSuffixED.GetText());
@@ -426,7 +429,7 @@ BOOL SwEndNoteOptionPage::FillItemSet( SfxItemSet & )
aFtnCharAnchorTemplBox.GetSelectEntry() ) );
// Absatzvorlage
- USHORT nPos = aParaTemplBox.GetSelectEntryPos();
+ sal_uInt16 nPos = aParaTemplBox.GetSelectEntryPos();
if(LISTBOX_ENTRY_NOTFOUND != nPos)
{
const String aFmtName( aParaTemplBox.GetSelectEntry() );
@@ -437,7 +440,7 @@ BOOL SwEndNoteOptionPage::FillItemSet( SfxItemSet & )
// Seitenvorlage
pInf->ChgPageDesc( pSh->FindPageDescByName(
- aPageTemplBox.GetSelectEntry(), TRUE ) );
+ aPageTemplBox.GetSelectEntry(), sal_True ) );
if ( bEndNote )
{
@@ -455,11 +458,11 @@ BOOL SwEndNoteOptionPage::FillItemSet( SfxItemSet & )
pSh->SetFtnInfo( *pI );
}
delete pInf;
- return TRUE;
+ return sal_True;
}
SwFootNoteOptionPage::SwFootNoteOptionPage( Window *pParent, const SfxItemSet &rSet ) :
- SwEndNoteOptionPage( pParent, FALSE, rSet )
+ SwEndNoteOptionPage( pParent, sal_False, rSet )
{
}
diff --git a/sw/source/ui/misc/docfnote.src b/sw/source/ui/misc/docfnote.src
index ca0dbac14870..171cb5bc0dad 100644
--- a/sw/source/ui/misc/docfnote.src
+++ b/sw/source/ui/misc/docfnote.src
@@ -78,6 +78,7 @@ TabPage TP_FOOTNOTEOPTION
};
ListBox LB_NUMVIEW
{
+ HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_NUMVIEW";
Border = TRUE ;
Pos = MAP_APPFONT ( 65 , 14 ) ;
Size = MAP_APPFONT ( 59 , 72 ) ;
@@ -94,6 +95,7 @@ TabPage TP_FOOTNOTEOPTION
};
NumericField FLD_OFFSET
{
+ HelpID = "sw:NumericField:TP_FOOTNOTEOPTION:FLD_OFFSET";
Pos = MAP_APPFONT ( 189 , 14 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
Spin = TRUE ;
@@ -112,6 +114,7 @@ TabPage TP_FOOTNOTEOPTION
};
ListBox LB_NUMCOUNT
{
+ HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_NUMCOUNT";
Border = TRUE ;
Pos = MAP_APPFONT ( 65 , 29 ) ;
Size = MAP_APPFONT ( 59 , 50 ) ;
@@ -135,6 +138,7 @@ TabPage TP_FOOTNOTEOPTION
};
Edit ED_PREFIX
{
+ HelpID = "sw:Edit:TP_FOOTNOTEOPTION:ED_PREFIX";
Border = TRUE ;
Pos = MAP_APPFONT ( 65 , 44 ) ;
Size = MAP_APPFONT ( 59 , 12 ) ;
@@ -151,6 +155,7 @@ TabPage TP_FOOTNOTEOPTION
};
Edit ED_SUFFIX
{
+ HelpID = "sw:Edit:TP_FOOTNOTEOPTION:ED_SUFFIX";
Border = TRUE ;
Pos = MAP_APPFONT ( 189 , 44 ) ;
Size = MAP_APPFONT ( 59 , 12 ) ;
@@ -166,6 +171,7 @@ TabPage TP_FOOTNOTEOPTION
};
RadioButton RB_POS_PAGE
{
+ HelpID = "sw:RadioButton:TP_FOOTNOTEOPTION:RB_POS_PAGE";
Pos = MAP_APPFONT ( 65 , 62 ) ;
Size = MAP_APPFONT ( 150 , 10 ) ;
Text [ en-US ] = "~End of page" ;
@@ -174,6 +180,7 @@ TabPage TP_FOOTNOTEOPTION
};
RadioButton RB_POS_CHAPTER
{
+ HelpID = "sw:RadioButton:TP_FOOTNOTEOPTION:RB_POS_CHAPTER";
Pos = MAP_APPFONT ( 65 , 75 ) ;
Size = MAP_APPFONT ( 150 , 10 ) ;
Text [ en-US ] = "En~d of document" ;
@@ -193,6 +200,7 @@ TabPage TP_FOOTNOTEOPTION
};
ListBox LB_PARA_TEMPL
{
+ HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_PARA_TEMPL";
Border = TRUE ;
Pos = MAP_APPFONT ( 48 , 100 ) ;
Size = MAP_APPFONT ( 58 , 80 ) ;
@@ -210,6 +218,7 @@ TabPage TP_FOOTNOTEOPTION
};
ListBox LB_PAGE_TEMPL
{
+ HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_PAGE_TEMPL";
Border = TRUE ;
Pos = MAP_APPFONT ( 48 , 116) ;
Size = MAP_APPFONT ( 58 , 80 ) ;
@@ -232,6 +241,7 @@ TabPage TP_FOOTNOTEOPTION
};
ListBox LB_ANCHR_CHARFMT
{
+ HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_ANCHR_CHARFMT";
Border = TRUE ;
Pos = MAP_APPFONT ( 186 , 100 ) ;
Size = MAP_APPFONT ( 65 , 72 ) ;
@@ -248,6 +258,7 @@ TabPage TP_FOOTNOTEOPTION
};
ListBox LB_TEXT_CHARFMT
{
+ HelpID = "sw:ListBox:TP_FOOTNOTEOPTION:LB_TEXT_CHARFMT";
Border = TRUE ;
Pos = MAP_APPFONT ( 186 , 116 ) ;
Size = MAP_APPFONT ( 65 , 72 ) ;
@@ -270,6 +281,7 @@ TabPage TP_FOOTNOTEOPTION
};
Edit ED_CONT
{
+ HelpID = "sw:Edit:TP_FOOTNOTEOPTION:ED_CONT";
Border = TRUE ;
Pos = MAP_APPFONT ( 88, 145 ) ;
Size = MAP_APPFONT ( 160 , 12 ) ;
@@ -286,6 +298,7 @@ TabPage TP_FOOTNOTEOPTION
};
Edit ED_CONT_FROM
{
+ HelpID = "sw:Edit:TP_FOOTNOTEOPTION:ED_CONT_FROM";
Border = TRUE ;
Pos = MAP_APPFONT ( 88 , 161 ) ;
Size = MAP_APPFONT ( 160 , 12 ) ;
@@ -316,6 +329,7 @@ TabPage TP_ENDNOTEOPTION
};
ListBox LB_NUMVIEW
{
+ HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_NUMVIEW";
Border = TRUE ;
Pos = MAP_APPFONT ( 65 , 14 ) ;
Size = MAP_APPFONT ( 59 , 72 ) ;
@@ -343,6 +357,7 @@ TabPage TP_ENDNOTEOPTION
};
NumericField FLD_OFFSET
{
+ HelpID = "sw:NumericField:TP_ENDNOTEOPTION:FLD_OFFSET";
Pos = MAP_APPFONT ( 189 , 14 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
Spin = TRUE ;
@@ -361,6 +376,7 @@ TabPage TP_ENDNOTEOPTION
};
ListBox LB_NUMCOUNT
{
+ HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_NUMCOUNT";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 62 , 72 ) ;
@@ -376,6 +392,7 @@ TabPage TP_ENDNOTEOPTION
};
Edit ED_PREFIX
{
+ HelpID = "sw:Edit:TP_ENDNOTEOPTION:ED_PREFIX";
Pos = MAP_APPFONT ( 65 , 30 ) ;
Size = MAP_APPFONT ( 59 , 12 ) ;
Border = TRUE ;
@@ -392,6 +409,7 @@ TabPage TP_ENDNOTEOPTION
};
Edit ED_SUFFIX
{
+ HelpID = "sw:Edit:TP_ENDNOTEOPTION:ED_SUFFIX";
Pos = MAP_APPFONT ( 189 , 30 ) ;
Size = MAP_APPFONT ( 59 , 12 ) ;
Border = TRUE ;
@@ -407,6 +425,7 @@ TabPage TP_ENDNOTEOPTION
};
RadioButton RB_POS_PAGE
{
+ HelpID = "sw:RadioButton:TP_ENDNOTEOPTION:RB_POS_PAGE";
Pos = MAP_APPFONT ( 12 , 104 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
Text [ en-US ] = "End ~of page" ;
@@ -415,6 +434,7 @@ TabPage TP_ENDNOTEOPTION
};
RadioButton RB_POS_CHAPTER
{
+ HelpID = "sw:RadioButton:TP_ENDNOTEOPTION:RB_POS_CHAPTER";
Pos = MAP_APPFONT ( 12 , 118 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
Text [ en-US ] = "End of ~document" ;
@@ -434,6 +454,7 @@ TabPage TP_ENDNOTEOPTION
};
ListBox LB_PARA_TEMPL
{
+ HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_PARA_TEMPL";
Border = TRUE ;
Pos = MAP_APPFONT ( 51 , 56 ) ;
Size = MAP_APPFONT ( 67 , 72 ) ;
@@ -451,6 +472,7 @@ TabPage TP_ENDNOTEOPTION
};
ListBox LB_PAGE_TEMPL
{
+ HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_PAGE_TEMPL";
Border = TRUE ;
Pos = MAP_APPFONT ( 51 , 72 ) ;
Size = MAP_APPFONT ( 67 , 72 ) ;
@@ -472,6 +494,7 @@ TabPage TP_ENDNOTEOPTION
};
ListBox LB_ANCHR_CHARFMT
{
+ HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_ANCHR_CHARFMT";
Border = TRUE ;
Pos = MAP_APPFONT ( 186 , 56 ) ;
Size = MAP_APPFONT ( 65 , 72 ) ;
@@ -488,6 +511,7 @@ TabPage TP_ENDNOTEOPTION
};
ListBox LB_TEXT_CHARFMT
{
+ HelpID = "sw:ListBox:TP_ENDNOTEOPTION:LB_TEXT_CHARFMT";
Border = TRUE ;
Pos = MAP_APPFONT ( 186 , 72 ) ;
Size = MAP_APPFONT ( 65 , 72 ) ;
@@ -510,6 +534,7 @@ TabPage TP_ENDNOTEOPTION
};
Edit ED_CONT
{
+ HelpID = "sw:Edit:TP_ENDNOTEOPTION:ED_CONT";
Border = TRUE ;
Pos = MAP_APPFONT ( 137 , 101 ) ;
Size = MAP_APPFONT ( 114 , 12 ) ;
@@ -526,6 +551,7 @@ TabPage TP_ENDNOTEOPTION
};
Edit ED_CONT_FROM
{
+ HelpID = "sw:Edit:TP_ENDNOTEOPTION:ED_CONT_FROM";
Border = TRUE ;
Pos = MAP_APPFONT ( 137 , 116 ) ;
Size = MAP_APPFONT ( 114 , 12 ) ;
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index e00695bdf1be..96177f96b5a2 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -66,9 +66,11 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
const SvStrings* pPathArr,
SwGlossaryHdl *pHdl) :
SvxStandardDialog(pParent, SW_RES(DLG_BIB_BASE)),
-
+ aBibFT( this, SW_RES(FT_BIB)),
aNameED( this, SW_RES(ED_NAME)),
+ aPathFT( this, SW_RES(FT_PATH)),
aPathLB( this, SW_RES(LB_PATH)),
+ aSelectFT( this, SW_RES(FT_SELECT)),
aGroupTLB( this, SW_RES(TLB_GROUPS)),
aOkPB( this, SW_RES(BT_OK)),
@@ -77,16 +79,13 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
aNewPB( this, SW_RES(PB_NEW)),
aDelPB( this, SW_RES(PB_DELETE)),
aRenamePB( this, SW_RES(PB_RENAME)),
- aBibFT( this, SW_RES(FT_BIB)),
- aPathFT( this, SW_RES(FT_PATH)),
- aSelectFT( this, SW_RES(FT_SELECT)),
pRemovedArr(0),
pInsertedArr(0),
pRenamedArr(0),
pGlosHdl(pHdl)
{
- USHORT i;
+ sal_uInt16 i;
FreeResource();
@@ -97,7 +96,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
aGroupTLB.SetHelpId(HID_GLOS_GROUP_TREE);
aGroupTLB.SetTabs( &nTabs[0], MAP_APPFONT );
- aGroupTLB.SetWindowBits(WB_HSCROLL|WB_CLIPCHILDREN|WB_SORT);
+ aGroupTLB.SetStyle(aGroupTLB.GetStyle()|WB_HSCROLL|WB_CLIPCHILDREN|WB_SORT);
aGroupTLB.SetSelectHdl(LINK(this, SwGlossaryGroupDlg, SelectHdl));
aGroupTLB.GetModel()->SetSortMode(SortAscending);
aNewPB.SetClickHdl(LINK(this, SwGlossaryGroupDlg, NewHdl));
@@ -111,7 +110,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
INetURLObject aTempURL(sPath);
sPath = aTempURL.GetMainURL(INetURLObject::DECODE_WITH_CHARSET );
aPathLB.InsertEntry(sPath);
- ULONG nCaseReadonly = 0;
+ sal_uLong nCaseReadonly = 0;
utl::TempFile aTempFile(&sPath);
aTempFile.EnableKillingFile();
if(!aTempFile.IsValid())
@@ -121,9 +120,9 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
aPathLB.SetEntryData(i, (void*)nCaseReadonly);
}
aPathLB.SelectEntryPos(0);
- aPathLB.Enable(TRUE);
+ aPathLB.Enable(sal_True);
- const USHORT nCount = pHdl->GetGroupCnt();
+ const sal_uInt16 nCount = pHdl->GetGroupCnt();
for(i = 0; i < nCount; ++i)
{
String sTitle;
@@ -135,7 +134,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(Window * pParent,
pData->sGroupTitle = sTitle;
String sTemp(sTitle);
sTemp += '\t';
- pData->sPath = aPathLB.GetEntry((USHORT)sGroup.GetToken(1, GLOS_DELIM).ToInt32());
+ pData->sPath = aPathLB.GetEntry((sal_uInt16)sGroup.GetToken(1, GLOS_DELIM).ToInt32());
sTemp += pData->sPath;
SvLBoxEntry* pEntry = aGroupTLB.InsertEntry(sTemp);
pEntry->SetUserData(pData);
@@ -174,8 +173,8 @@ void SwGlossaryGroupDlg::Apply()
if(pRemovedArr && pRemovedArr->Count())
{
- USHORT nCount = pRemovedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pRemovedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
const String* pDelEntry = (*pRemovedArr)[i];
const String sDelGroup = pDelEntry->GetToken(0, '\t');
@@ -206,8 +205,8 @@ void SwGlossaryGroupDlg::Apply()
//erst umbenennen, falls es schon eins gab
if(pRenamedArr && pRenamedArr->Count())
{
- USHORT nCount = pRenamedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pRenamedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
String * pEntry = (*pRenamedArr)[i];
xub_StrLen nStrSttPos = 0;
@@ -221,8 +220,8 @@ void SwGlossaryGroupDlg::Apply()
}
if(pInsertedArr && pInsertedArr->Count())
{
- USHORT nCount = pInsertedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pInsertedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
String sNewGroup = *(*pInsertedArr)[i];
String sNewTitle = sNewGroup.GetToken(0, GLOS_DELIM);
@@ -238,15 +237,15 @@ void SwGlossaryGroupDlg::Apply()
IMPL_LINK( SwGlossaryGroupDlg, SelectHdl, SvTabListBox*, EMPTYARG )
{
- aNewPB.Enable(FALSE);
+ aNewPB.Enable(sal_False);
SvLBoxEntry* pFirstEntry = aGroupTLB.FirstSelected();
if(pFirstEntry)
{
GlosBibUserData* pUserData = (GlosBibUserData*)pFirstEntry->GetUserData();
String sEntry(pUserData->sGroupName);
String sName(aNameED.GetText());
- BOOL bExists = FALSE;
- ULONG nPos = aGroupTLB.GetEntryPos(sName, 0);
+ sal_Bool bExists = sal_False;
+ sal_uLong nPos = aGroupTLB.GetEntryPos(sName, 0);
if( 0xffffffff > nPos)
{
SvLBoxEntry* pEntry = aGroupTLB.GetEntry(nPos);
@@ -291,24 +290,24 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton )
SvLBoxEntry* pEntry = aGroupTLB.FirstSelected();
if(!pEntry)
{
- pButton->Enable(FALSE);
+ pButton->Enable(sal_False);
return 0;
}
GlosBibUserData* pUserData = (GlosBibUserData*)pEntry->GetUserData();
String sEntry(pUserData->sGroupName);
// befindet sich der zu loeschende Name schon unter den
// den neuen - dann weg damit
- BOOL bDelete = TRUE;
+ sal_Bool bDelete = sal_True;
if(pInsertedArr && pInsertedArr->Count())
{
- USHORT nCount = pInsertedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pInsertedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
const String* pTemp = (*pInsertedArr)[i];
if(*pTemp == sEntry)
{
pInsertedArr->Remove(i);
- bDelete = FALSE;
+ bDelete = sal_False;
break;
}
@@ -319,15 +318,15 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton )
{
if(pRenamedArr && pRenamedArr->Count())
{
- USHORT nCount = pRenamedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pRenamedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
const String* pTemp = (*pRenamedArr)[i];
String sTemp( pTemp->GetToken(0, RENAME_TOKEN_DELIM ));
if(sTemp == sEntry)
{
pRenamedArr->Remove(i);
- bDelete = FALSE;
+ bDelete = sal_False;
break;
}
}
@@ -345,7 +344,7 @@ IMPL_LINK( SwGlossaryGroupDlg, DeleteHdl, Button*, pButton )
delete pUserData;
aGroupTLB.GetModel()->Remove(pEntry);
if(!aGroupTLB.First())
- pButton->Enable(FALSE);
+ pButton->Enable(sal_False);
//the content must be deleted - otherwise the new handler would be called in Apply()
aNameED.SetText(aEmptyStr);
return 0;
@@ -367,18 +366,18 @@ IMPL_LINK( SwGlossaryGroupDlg, RenameHdl, Button *, EMPTYARG )
// befindet sich der umzubenennende Name unter den
// den neuen - dann austauschen
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if(pInsertedArr && pInsertedArr->Count())
{
- USHORT nCount = pInsertedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pInsertedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
const String* pTemp = (*pInsertedArr)[i];
if(*pTemp == sEntry)
{
pInsertedArr->Remove(i);
pInsertedArr->Insert(new String(sNewName), pInsertedArr->Count());
- bDone = TRUE;
+ bDone = sal_True;
break;
}
}
@@ -413,17 +412,17 @@ IMPL_LINK( SwGlossaryGroupDlg, RenameHdl, Button *, EMPTYARG )
IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG )
{
String sEntry(aNameED.GetText());
- BOOL bEnableNew = TRUE;
- BOOL bEnableDel = FALSE;
- ULONG nCaseReadonly =
- (ULONG)aPathLB.GetEntryData(aPathLB.GetSelectEntryPos());
- BOOL bDirReadonly = 0 != (nCaseReadonly&PATH_READONLY);
+ sal_Bool bEnableNew = sal_True;
+ sal_Bool bEnableDel = sal_False;
+ sal_uLong nCaseReadonly =
+ (sal_uLong)aPathLB.GetEntryData(aPathLB.GetSelectEntryPos());
+ sal_Bool bDirReadonly = 0 != (nCaseReadonly&PATH_READONLY);
if(!sEntry.Len() || bDirReadonly)
- bEnableNew = FALSE;
+ bEnableNew = sal_False;
else if(sEntry.Len())
{
- ULONG nPos = 0xffffffff;
+ sal_uLong nPos = 0xffffffff;
nPos = aGroupTLB.GetEntryPos(sEntry, 0);
@@ -431,12 +430,12 @@ IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG )
if( 0xffffffff == nPos)
{
const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore();
- for(USHORT i = 0; i < aGroupTLB.GetEntryCount(); i++)
+ for(sal_uInt16 i = 0; i < aGroupTLB.GetEntryCount(); i++)
{
String sTemp = aGroupTLB.GetEntryText( i, 0 );
- nCaseReadonly = (ULONG)aPathLB.GetEntryData(
+ nCaseReadonly = (sal_uLong)aPathLB.GetEntryData(
aPathLB.GetEntryPos(aGroupTLB.GetEntryText(i,1)));
- BOOL bCase = 0 != (nCaseReadonly & PATH_CASE_SENSITIVE);
+ sal_Bool bCase = 0 != (nCaseReadonly & PATH_CASE_SENSITIVE);
if( !bCase && rSCmp.isEqual( sTemp, sEntry ))
{
@@ -447,7 +446,7 @@ IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG )
}
if( 0xffffffff > nPos)
{
- bEnableNew = FALSE;
+ bEnableNew = sal_False;
aGroupTLB.Select(aGroupTLB.GetEntry( nPos ));
aGroupTLB.MakeVisible(aGroupTLB.GetEntry( nPos ));
}
@@ -465,23 +464,23 @@ IMPL_LINK( SwGlossaryGroupDlg, ModifyHdl, Edit*, EMPTYARG )
return 0;
}
-BOOL SwGlossaryGroupDlg::IsDeleteAllowed(const String &rGroup)
+sal_Bool SwGlossaryGroupDlg::IsDeleteAllowed(const String &rGroup)
{
- BOOL bDel = (!pGlosHdl->IsReadOnly(&rGroup));
+ sal_Bool bDel = (!pGlosHdl->IsReadOnly(&rGroup));
// OM: befindet sich der Name unter den den neuen Bereichsnamen,
// dann ist er auch loeschbar! Bei noch nicht existenten Bereichsnamen
- // liefert ReadOnly naemlich TRUE.
+ // liefert ReadOnly naemlich sal_True.
if(pInsertedArr && pInsertedArr->Count())
{
- USHORT nCount = pInsertedArr->Count();
- for(USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = pInsertedArr->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
const String* pTemp = (*pInsertedArr)[i];
if(*pTemp == rGroup)
{
- bDel = TRUE;
+ bDel = sal_True;
break;
}
}
diff --git a/sw/source/ui/misc/glosbib.src b/sw/source/ui/misc/glosbib.src
index 522fab08c5dc..25b83bf27d68 100644
--- a/sw/source/ui/misc/glosbib.src
+++ b/sw/source/ui/misc/glosbib.src
@@ -38,6 +38,7 @@ ModalDialog DLG_BIB_BASE
Text [ en-US ] = "Edit Categories" ;
PushButton PB_NEW
{
+ HelpID = "sw:PushButton:DLG_BIB_BASE:PB_NEW";
Disable = TRUE ;
Pos = MAP_APPFONT ( 293 , 66 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -46,6 +47,7 @@ ModalDialog DLG_BIB_BASE
};
PushButton PB_DELETE
{
+ HelpID = "sw:PushButton:DLG_BIB_BASE:PB_DELETE";
Pos = MAP_APPFONT ( 293 , 83 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete" ;
@@ -54,6 +56,7 @@ ModalDialog DLG_BIB_BASE
};
PushButton PB_RENAME
{
+ HelpID = "sw:PushButton:DLG_BIB_BASE:PB_RENAME";
Disable = TRUE ;
Pos = MAP_APPFONT ( 293 , 100 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -87,6 +90,7 @@ ModalDialog DLG_BIB_BASE
};
Edit ED_NAME
{
+ HelpID = "sw:Edit:DLG_BIB_BASE:ED_NAME";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 159 , 12 ) ;
TabStop = TRUE ;
@@ -101,6 +105,7 @@ ModalDialog DLG_BIB_BASE
};
ListBox LB_PATH
{
+ HelpID = "sw:ListBox:DLG_BIB_BASE:LB_PATH";
Pos = MAP_APPFONT ( 174 , 14 ) ;
Size = MAP_APPFONT ( 107 , 50 ) ;
DropDown = TRUE ;
diff --git a/sw/source/ui/misc/glosdoc.cxx b/sw/source/ui/misc/glosdoc.cxx
index a6b8ee390638..357813684d5e 100644
--- a/sw/source/ui/misc/glosdoc.cxx
+++ b/sw/source/ui/misc/glosdoc.cxx
@@ -79,7 +79,7 @@ String lcl_CheckFileName( const String& rNewFilePath,
sRet.EraseLeadingChars();
sRet.EraseTrailingChars();
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
if( sRet.Len() )
{
String sTmpDir(rNewFilePath);
@@ -251,7 +251,7 @@ sal_Bool SwGlossaries::RenameGroupDoc(
sOldFileURL += INET_PATH_TOKEN;
sOldFileURL += rOldGroup.GetToken(0, GLOS_DELIM);
sOldFileURL += SwGlossaries::GetExtension();
- BOOL bExist = FStatHelper::IsDocument( sOldFileURL );
+ sal_Bool bExist = FStatHelper::IsDocument( sOldFileURL );
OSL_ENSURE(bExist, "group doesn't exist!");
if(bExist)
{
@@ -270,8 +270,8 @@ sal_Bool SwGlossaries::RenameGroupDoc(
OSL_ENSURE(!bExist, "group already exists!");
if(!bExist)
{
- BOOL bCopyCompleted = SWUnoHelper::UCB_CopyFile(
- sOldFileURL, sTempNewFilePath, TRUE );
+ sal_Bool bCopyCompleted = SWUnoHelper::UCB_CopyFile(
+ sOldFileURL, sTempNewFilePath, sal_True );
if(bCopyCompleted)
{
bRet = sal_True;
@@ -319,7 +319,7 @@ sal_Bool SwGlossaries::DelGroupDoc(const String &rName)
// Auch, wenn das File nicht existiert, muss es aus der Liste
// der Textbausteinbereiche entfernt werden
// Kein && wegen CFfront
- BOOL bRemoved = SWUnoHelper::UCB_DeleteFile( sFileURL );
+ sal_Bool bRemoved = SWUnoHelper::UCB_DeleteFile( sFileURL );
OSL_ENSURE(bRemoved, "file has not been removed");
RemoveFileFromList( aName );
return bRemoved;
@@ -365,7 +365,7 @@ SwTextBlocks* SwGlossaries::GetGlosDoc( const String &rName, sal_Bool bCreate )
sFileURL += INET_PATH_TOKEN;
sFileURL += aTmp;
- BOOL bExist = FALSE;
+ sal_Bool bExist = sal_False;
if(!bCreate)
bExist = FStatHelper::IsDocument( sFileURL );
@@ -402,7 +402,7 @@ SvStrings* SwGlossaries::GetNameList()
SWUnoHelper::UCB_GetFileListOfFolder( *(*m_pPathArr)[i], aFiles,
&sExt );
- for( USHORT nFiles = 0, nFEnd = aFiles.Count();
+ for( sal_uInt16 nFiles = 0, nFEnd = aFiles.Count();
nFiles < nFEnd; ++nFiles )
{
String* pTitle = aFiles[ nFiles ];
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 420dc870e35e..24e3417747c0 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -84,6 +84,8 @@
#include <swmodule.hxx>
#include <sfx2/filedlghelper.hxx>
+#include "access.hrc"
+
#define LONG_LENGTH 60
#define SHORT_LENGTH 30
@@ -124,11 +126,11 @@ struct GroupUserData
{
String sGroupName;
sal_uInt16 nPathIdx;
- BOOL bReadonly;
+ sal_Bool bReadonly;
GroupUserData()
: nPathIdx(0),
- bReadonly(FALSE) {}
+ bReadonly(sal_False) {}
};
/*------------------------------------------------------------------------
@@ -142,11 +144,11 @@ class SwNewGlosNameDlg : public ModalDialog
NoSpaceEdit aNewShort;
OKButton aOk;
CancelButton aCancel;
- FixedLine aFL;
FixedText aONFT;
Edit aOldName;
FixedText aOSFT;
Edit aOldShort;
+ FixedLine aFL;
protected:
DECL_LINK( Modify, Edit * );
@@ -171,11 +173,12 @@ SwNewGlosNameDlg::SwNewGlosNameDlg(Window* pParent,
aNewShort(this,SW_RES( ED_NS )),
aOk (this, SW_RES( BT_OKNEW)),
aCancel (this, SW_RES( BT_CANCEL)),
- aFL (this, SW_RES( FL_NN )),
aONFT (this, SW_RES( FT_ON )),
aOldName(this, SW_RES( ED_ON )),
aOSFT (this, SW_RES( FT_OS )),
- aOldShort(this,SW_RES( ED_OS ))
+ aOldShort(this,SW_RES( ED_OS )),
+ aFL (this, SW_RES( FL_NN ))
+
{
FreeResource();
aOldName.SetText( rOldName );
@@ -279,10 +282,12 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame,
aInsertBtn.Enable(sal_False);
aNameED.GrabFocus();
aCategoryBox.SetHelpId(HID_MD_GLOS_CATEGORY);
- aCategoryBox.SetWindowBits(WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL|WB_VSCROLL|WB_CLIPCHILDREN|WB_SORT);
+ aCategoryBox.SetStyle(aCategoryBox.GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL|WB_VSCROLL|WB_CLIPCHILDREN|WB_SORT);
aCategoryBox.GetModel()->SetSortMode(SortAscending);
aCategoryBox.SetHighlightRange(); // ueber volle Breite selektieren
aCategoryBox.SetNodeDefaultImages( );
+ aCategoryBox.SetAccessibleName(SW_RES(STR_ACCESS_SW_CATEGORY));
+ aCategoryBox.SetAccessibleRelationLabeledBy(&aInsertTipCB);
Init();
}
@@ -666,9 +671,9 @@ IMPL_LINK( SwGlossaryDlg, BibHdl, Button *, EMPTYARG )
//check if at least one glossary path is write enabled
SvtPathOptions aPathOpt;
String sGlosPath( aPathOpt.GetAutoTextPath() );
- USHORT nPaths = sGlosPath.GetTokenCount(';');
- BOOL bIsWritable = FALSE;
- for(USHORT nPath = 0; nPath < nPaths; nPath++)
+ sal_uInt16 nPaths = sGlosPath.GetTokenCount(';');
+ sal_Bool bIsWritable = sal_False;
+ for(sal_uInt16 nPath = 0; nPath < nPaths; nPath++)
{
String sPath = URIHelper::SmartRel2Abs(
INetURLObject(), sGlosPath.GetToken(nPath, ';'),
@@ -833,7 +838,7 @@ IMPL_LINK_INLINE_START( SwGlossaryDlg, EditHdl, Button *, EMPTYARG )
if(aEditBtn.GetCurItemId() == FN_GL_EDIT )
{
SwTextBlocks *pGroup = ::GetGlossaries()->GetGroupDoc ( GetCurrGrpName () );
- BOOL bRet = pGlossaryHdl->ConvertToNew ( *pGroup );
+ sal_Bool bRet = pGlossaryHdl->ConvertToNew ( *pGroup );
delete pGroup;
if ( bRet )
EndDialog(RET_EDIT);
@@ -1009,7 +1014,7 @@ sal_Bool SwGlTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry)
sal_Bool SwGlTreeListBox::NotifyMoving( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& /*rpNewParent*/,
- ULONG& /*rNewChildPos*/
+ sal_uLong& /*rNewChildPos*/
)
{
pDragEntry = 0;
@@ -1055,7 +1060,7 @@ sal_Bool SwGlTreeListBox::NotifyMoving( SvLBoxEntry* pTarget,
sal_Bool SwGlTreeListBox::NotifyCopying( SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& /*rpNewParent*/,
- ULONG& /*rNewChildPos*/
+ sal_uLong& /*rNewChildPos*/
)
{
pDragEntry = 0;
@@ -1155,7 +1160,7 @@ IMPL_LINK( SwGlossaryDlg, ShowPreviewHdl, CheckBox *, pBox )
}
}
- BOOL bShow = pBox->IsChecked() && !bCreated;
+ sal_Bool bShow = pBox->IsChecked() && !bCreated;
aExampleWIN.Show( bShow );
aExampleDummyWIN.Show(!bShow);
if( ::GetCurrGlosGroup() )
@@ -1166,7 +1171,7 @@ IMPL_LINK( SwGlossaryDlg, ShowPreviewHdl, CheckBox *, pBox )
IMPL_LINK( SwGlossaryDlg, PreviewLoadedHdl, void *, EMPTYARG )
{
- BOOL bShow = aShowExampleCB.IsChecked();
+ sal_Bool bShow = aShowExampleCB.IsChecked();
aExampleWIN.Show( bShow );
aExampleDummyWIN.Show(!bShow);
ResumeShowAutoText();
@@ -1179,7 +1184,7 @@ void SwGlossaryDlg::ShowAutoText(const String& rGroup, const String& rShortName)
{
SetResumeData(rGroup, rShortName);
//try to make an Undo()
- pExampleFrame->ClearDocument( TRUE );
+ pExampleFrame->ClearDocument( sal_True );
}
}
diff --git a/sw/source/ui/misc/glossary.src b/sw/source/ui/misc/glossary.src
index 5274e7554b36..4e2db6dcfe49 100644
--- a/sw/source/ui/misc/glossary.src
+++ b/sw/source/ui/misc/glossary.src
@@ -29,10 +29,12 @@
#include "glossary.hrc"
#include "cmdid.h"
#include "helpid.h"
+#include "access.hrc"
+
// #define DLG_GLOSSARY 256
ModalDialog DLG_GLOSSARY
{
- HelpID = FN_GLOSSARY_DLG ;
+ HelpID = CMD_FN_GLOSSARY_DLG ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 375 , 164 ) ;
@@ -40,6 +42,7 @@ ModalDialog DLG_GLOSSARY
Moveable = TRUE ;
CheckBox CB_INSERT_TIP
{
+ HelpID = "sw:CheckBox:DLG_GLOSSARY:CB_INSERT_TIP";
Pos = MAP_APPFONT ( 12 , 12 ) ;
Size = MAP_APPFONT ( 200 , 12 ) ;
TabStop = TRUE ;
@@ -54,6 +57,7 @@ ModalDialog DLG_GLOSSARY
};
Edit ED_NAME
{
+ HelpID = "sw:Edit:DLG_GLOSSARY:ED_NAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 55 , 29 ) ;
Size = MAP_APPFONT ( 85 , 12 ) ;
@@ -70,6 +74,7 @@ ModalDialog DLG_GLOSSARY
};
Edit ED_SHORTNAME
{
+ HelpID = "sw:Edit:DLG_GLOSSARY:ED_SHORTNAME";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 203 , 29 ) ;
@@ -98,6 +103,7 @@ ModalDialog DLG_GLOSSARY
};
CheckBox CB_FILE_REL
{
+ HelpID = "sw:CheckBox:DLG_GLOSSARY:CB_FILE_REL";
Pos = MAP_APPFONT ( 14 , 145 ) ;
Size = MAP_APPFONT ( 90 , 12 ) ;
TabStop = TRUE ;
@@ -105,6 +111,7 @@ ModalDialog DLG_GLOSSARY
};
CheckBox CB_NET_REL
{
+ HelpID = "sw:CheckBox:DLG_GLOSSARY:CB_NET_REL";
Pos = MAP_APPFONT ( 109 , 145 ) ;
Size = MAP_APPFONT ( 90 , 12 ) ;
Text [ en-US ] = "Inte~rnet" ;
@@ -122,6 +129,7 @@ ModalDialog DLG_GLOSSARY
};
CheckBox CB_SHOW_EXAMPLE
{
+ HelpID = "sw:CheckBox:DLG_GLOSSARY:CB_SHOW_EXAMPLE";
Pos = MAP_APPFONT ( 231 , 145 ) ;
Size = MAP_APPFONT ( 82 , 12 ) ;
Text [ en-US ] = "Sho~w preview";
@@ -148,6 +156,7 @@ ModalDialog DLG_GLOSSARY
};
MenuButton PB_EDIT
{
+ HelpID = "sw:MenuButton:DLG_GLOSSARY:PB_EDIT";
Pos = MAP_APPFONT ( 319 , 60 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "AutoTe~xt" ;
@@ -155,6 +164,7 @@ ModalDialog DLG_GLOSSARY
};
PushButton PB_BIB
{
+ HelpID = "sw:PushButton:DLG_GLOSSARY:PB_BIB";
Pos = MAP_APPFONT ( 319 , 77 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "C~ategories..." ;
@@ -162,6 +172,7 @@ ModalDialog DLG_GLOSSARY
};
PushButton PB_PATH
{
+ HelpID = "sw:PushButton:DLG_GLOSSARY:PB_PATH";
Pos = MAP_APPFONT ( 319 , 94 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -272,6 +283,12 @@ String STR_GLOSSARY
{
Text [ en-US ] = "AutoText :" ;
};
+/*IAccessibility2 Implementation 2009-----*/
+String STR_ACCESS_SW_CATEGORY
+{
+ Text [ en-US ] = "Category" ;
+};
+/*-----IAccessibility2 Implementation 2009*/
ModalDialog DLG_RENAME_GLOS
{
OutputSize = TRUE ;
@@ -301,6 +318,7 @@ ModalDialog DLG_RENAME_GLOS
};
Edit ED_ON
{
+ HelpID = "sw:Edit:DLG_RENAME_GLOS:ED_ON";
ReadOnly = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 44 , 12 ) ;
@@ -315,6 +333,7 @@ ModalDialog DLG_RENAME_GLOS
};
Edit ED_OS
{
+ HelpID = "sw:Edit:DLG_RENAME_GLOS:ED_OS";
ReadOnly = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 200 , 12 ) ;
@@ -329,6 +348,7 @@ ModalDialog DLG_RENAME_GLOS
};
Edit ED_NN
{
+ HelpID = "sw:Edit:DLG_RENAME_GLOS:ED_NN";
TabStop = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 44 , 27 ) ;
@@ -343,6 +363,7 @@ ModalDialog DLG_RENAME_GLOS
};
Edit ED_NS
{
+ HelpID = "sw:Edit:DLG_RENAME_GLOS:ED_NS";
TabStop = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 200 , 27 ) ;
diff --git a/sw/source/ui/misc/glshell.cxx b/sw/source/ui/misc/glshell.cxx
index 7ed5722ebc00..a0d6693e74ae 100644
--- a/sw/source/ui/misc/glshell.cxx
+++ b/sw/source/ui/misc/glshell.cxx
@@ -49,6 +49,7 @@
#include <view.hxx>
#include <glshell.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <glosdoc.hxx>
#include <shellio.hxx>
#include <initui.hxx> // fuer ::GetGlossaries()
@@ -96,7 +97,7 @@ void lcl_Execute( SwDocShell& rSh, SfxRequest& rReq )
void lcl_GetState( SwDocShell& rSh, SfxItemSet& rSet )
{
- if( SFX_ITEM_AVAILABLE >= rSet.GetItemState( SID_SAVEDOC, FALSE ))
+ if( SFX_ITEM_AVAILABLE >= rSet.GetItemState( SID_SAVEDOC, sal_False ))
{
if( !rSh.GetDoc()->IsModified() )
rSet.DisableItem( SID_SAVEDOC );
@@ -105,7 +106,7 @@ void lcl_GetState( SwDocShell& rSh, SfxItemSet& rSet )
}
}
-BOOL lcl_Save( SwWrtShell& rSh, const String& rGroupName,
+sal_Bool lcl_Save( SwWrtShell& rSh, const String& rGroupName,
const String& rShortNm, const String& rLongNm )
{
const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
@@ -118,7 +119,7 @@ BOOL lcl_Save( SwWrtShell& rSh, const String& rGroupName,
pGlosHdl = rSh.GetView().GetGlosHdl();
pGlosHdl->GetMacros( rShortNm, aStart, aEnd, pBlock );
- USHORT nRet = rSh.SaveGlossaryDoc( *pBlock, rLongNm, rShortNm,
+ sal_uInt16 nRet = rSh.SaveGlossaryDoc( *pBlock, rLongNm, rShortNm,
pCfg->IsSaveRelFile(),
pBlock->IsOnlyTextBlock( rShortNm ) );
@@ -158,7 +159,7 @@ void SwGlosDocShell::GetState( SfxItemSet& rSet )
::lcl_GetState( *this, rSet );
}
-BOOL SwGlosDocShell::Save()
+sal_Bool SwGlosDocShell::Save()
{
// In case of an API object which holds this document, it is possible that the WrtShell is already
// dead. For instance, if the doc is modified via this API object, and then, upon office shutdown,
@@ -169,8 +170,8 @@ BOOL SwGlosDocShell::Save()
return ::lcl_Save( *GetWrtShell(), aGroupName, aShortName, aLongName );
else
{
- SetModified( FALSE );
- return FALSE;
+ SetModified( sal_False );
+ return sal_False;
}
}
@@ -194,21 +195,21 @@ void SwWebGlosDocShell::GetState( SfxItemSet& rSet )
::lcl_GetState( *this, rSet );
}
-BOOL SwWebGlosDocShell::Save()
+sal_Bool SwWebGlosDocShell::Save()
{
// same comment as in SwGlosDocShell::Save - see there
if ( GetWrtShell() )
return ::lcl_Save( *GetWrtShell(), aGroupName, aShortName, aLongName );
else
{
- SetModified( FALSE );
- return FALSE;
+ SetModified( sal_False );
+ return sal_False;
}
}
SV_IMPL_REF ( SwDocShell )
-SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rShortName, BOOL bShow )
+SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rShortName, sal_Bool bShow )
{
SwDocShellRef xDocSh;
@@ -217,7 +218,7 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS
{
// erfrage welche View registriert ist. Im WebWriter gibts es keine
// normale View
- USHORT nViewId = 0 != &SwView::Factory() ? 2 : 6;
+ sal_uInt16 nViewId = 0 != &SwView::Factory() ? 2 : 6;
String sLongName = pGroup->GetLongName(pGroup->GetIndex( rShortName ));
if( 6 == nViewId )
@@ -245,8 +246,9 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS
aDocTitle += ' ';
aDocTitle += sLongName;
- BOOL bDoesUndo = xDocSh->GetDoc()->DoesUndo();
- xDocSh->GetDoc()->DoUndo( FALSE );
+ bool const bDoesUndo =
+ xDocSh->GetDoc()->GetIDocumentUndoRedo().DoesUndo();
+ xDocSh->GetDoc()->GetIDocumentUndoRedo().DoUndo( false );
xDocSh->GetWrtShell()->InsertGlossary( *pGroup, rShortName );
if( !xDocSh->GetDoc()->getPrinter( false ) )
@@ -274,7 +276,7 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const String& rGroup, const String& rS
catch( uno::Exception& )
{}
- xDocSh->GetDoc()->DoUndo( bDoesUndo );
+ xDocSh->GetDoc()->GetIDocumentUndoRedo().DoUndo( bDoesUndo );
xDocSh->GetDoc()->ResetModified();
if ( bShow )
pFrame->GetFrame().Appear();
diff --git a/sw/source/ui/misc/impfnote.hxx b/sw/source/ui/misc/impfnote.hxx
index 3ba70387c2c0..ad90331808f0 100644
--- a/sw/source/ui/misc/impfnote.hxx
+++ b/sw/source/ui/misc/impfnote.hxx
@@ -39,6 +39,7 @@ class SwWrtShell;
class SwEndNoteOptionPage : public SfxTabPage
{
+ FixedLine aNumFL;
FixedText aNumTypeFT;
SwNumberingTypeListBox aNumViewBox;
FixedText aOffsetLbl;
@@ -52,32 +53,31 @@ class SwEndNoteOptionPage : public SfxTabPage
FixedText aPosFT;
RadioButton aPosPageBox;
RadioButton aPosChapterBox;
- FixedLine aNumFL;
+ FixedLine aTemplFL;
FixedText aParaTemplLbl;
ListBox aParaTemplBox;
FixedText aPageTemplLbl;
ListBox aPageTemplBox;
- FixedLine aTemplFL;
+ FixedLine aCharTemplFL;
FixedText aFtnCharAnchorTemplLbl;
ListBox aFtnCharAnchorTemplBox;
FixedText aFtnCharTextTemplLbl;
ListBox aFtnCharTextTemplBox;
- FixedLine aCharTemplFL;
+ FixedLine aContFL;
FixedText aContLbl;
Edit aContEdit;
FixedText aContFromLbl;
Edit aContFromEdit;
- FixedLine aContFL;
String aNumDoc;
String aNumPage;
String aNumChapter;
SwWrtShell *pSh;
- BOOL bPosDoc;
- BOOL bEndNote;
+ sal_Bool bPosDoc;
+ sal_Bool bEndNote;
inline void SelectNumbering(int eNum);
int GetNumbering() const;
@@ -88,12 +88,12 @@ class SwEndNoteOptionPage : public SfxTabPage
public:
- SwEndNoteOptionPage( Window *pParent, BOOL bEndNote,
+ SwEndNoteOptionPage( Window *pParent, sal_Bool bEndNote,
const SfxItemSet &rSet );
~SwEndNoteOptionPage();
static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
- virtual BOOL FillItemSet(SfxItemSet &rSet);
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
virtual void Reset( const SfxItemSet& );
void SetShell( SwWrtShell &rShell );
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index c786f8372dab..3fbb9effb9f8 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -53,7 +53,7 @@
#include <svx/dialogs.hrc>
#include <sfx2/viewfrm.hxx>
-static BOOL bFootnote = TRUE;
+static sal_Bool bFootnote = sal_True;
/*------------------------------------------------------------------------
Beschreibung: Einfuegen der Fussnote durch OK
@@ -69,14 +69,14 @@ void SwInsFootNoteDlg::Apply()
if ( bEdit )
{
rSh.StartAction();
- rSh.Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
rSh.StartUndo( UNDO_START );
SwFmtFtn aNote( aEndNoteBtn.IsChecked() );
aNote.SetNumStr( aStr );
if( rSh.SetCurFtn( aNote ) && bExtCharAvailable )
{
- rSh.Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False );
SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
rSh.GetCurAttr( aSet );
SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT );
@@ -85,8 +85,8 @@ void SwInsFootNoteDlg::Apply()
eCharSet, RES_CHRATR_FONT );
aSet.Put( aFont );
rSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
- rSh.ResetSelect(0, FALSE);
- rSh.Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.ResetSelect(0, sal_False);
+ rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
}
rSh.EndUndo( UNDO_END );
rSh.EndAction();
@@ -109,7 +109,7 @@ IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberCharHdl, Button *, EMPTYARG )
IMPL_LINK_INLINE_START( SwInsFootNoteDlg, NumberEditHdl, void *, EMPTYARG )
{
- aNumberCharBtn.Check( TRUE );
+ aNumberCharBtn.Check( sal_True );
aOkBtn.Enable( 0 != aNumberCharEdit.GetText().Len() );
return 0;
@@ -118,21 +118,21 @@ IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberEditHdl, void *, EMPTYARG )
IMPL_LINK_INLINE_START( SwInsFootNoteDlg, NumberAutoBtnHdl, Button *, EMPTYARG )
{
- aOkBtn.Enable( TRUE );
+ aOkBtn.Enable( sal_True );
return 0;
}
IMPL_LINK_INLINE_END( SwInsFootNoteDlg, NumberAutoBtnHdl, Button *, EMPTYARG )
IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG )
{
- aNumberCharBtn.Check( TRUE );
+ aNumberCharBtn.Check( sal_True );
SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
rSh.GetCurAttr( aSet );
const SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT );
SfxAllItemSet aAllSet( rSh.GetAttrPool() );
- aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) );
aAllSet.Put( rFont );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
@@ -140,8 +140,8 @@ IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG )
rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
if (RET_OK == pDlg->Execute())
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, FALSE );
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pItem, SfxStringItem, SID_CHARMAP, sal_False );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False );
if ( pItem )
{
String sExtChars(pItem->GetValue());
@@ -157,7 +157,7 @@ IMPL_LINK( SwInsFootNoteDlg, NumberExtCharHdl, Button *, EMPTYARG )
aNumberCharEdit.SetFont( aFont );
}
- bExtCharAvailable = TRUE;
+ bExtCharAvailable = sal_True;
aOkBtn.Enable(0 != aNumberCharEdit.GetText().Len());
}
}
@@ -171,7 +171,7 @@ IMPL_LINK( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn )
Apply();
// Hier zur naechsten Fuss/Endnote wandern
- rSh.ResetSelect(0, FALSE);
+ rSh.ResetSelect(0, sal_False);
if (pBtn == &aNextBT)
rSh.GotoNextFtnAnchor();
else
@@ -182,22 +182,22 @@ IMPL_LINK( SwInsFootNoteDlg, NextPrevHdl, Button *, pBtn )
return 0;
}
-SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, BOOL bEd) :
+SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, sal_Bool bEd) :
SvxStandardDialog(pParent,SW_RES(DLG_INS_FOOTNOTE)),
rSh(rShell),
- bExtCharAvailable(FALSE),
+ bExtCharAvailable(sal_False),
bEdit(bEd),
+ aNumberFL (this,SW_RES(FL_NUMBER)),
aNumberAutoBtn (this,SW_RES(RB_NUMBER_AUTO)),
aNumberCharBtn (this,SW_RES(RB_NUMBER_CHAR)),
aNumberCharEdit (this,SW_RES(ED_NUMBER_CHAR)),
aNumberExtChar (this,SW_RES(BT_NUMBER_CHAR)),
- aNumberFL (this,SW_RES(FL_NUMBER)),
+ aTypeFL (this,SW_RES(FL_TYPE)),
aFtnBtn (this,SW_RES(RB_TYPE_FTN)),
aEndNoteBtn (this,SW_RES(RB_TYPE_ENDNOTE)),
- aTypeFL (this,SW_RES(FL_TYPE)),
aOkBtn (this,SW_RES(BT_OK)),
aCancelBtn (this,SW_RES(BT_CANCEL)),
@@ -205,6 +205,10 @@ SwInsFootNoteDlg::SwInsFootNoteDlg(Window *pParent, SwWrtShell &rShell, BOOL bEd
aPrevBT (this,SW_RES(BT_PREV)),
aNextBT (this,SW_RES(BT_NEXT))
{
+ aNumberCharEdit.SetAccessibleName(String(SW_RES(STR_CHAR)));
+ aNumberExtChar.SetAccessibleRelationMemberOf(&aNumberFL);
+ aNumberCharEdit.SetAccessibleRelationLabeledBy(&aNumberCharBtn);
+
aNumberAutoBtn.SetClickHdl(LINK(this,SwInsFootNoteDlg,NumberAutoBtnHdl));
aNumberExtChar.SetClickHdl(LINK(this,SwInsFootNoteDlg,NumberExtCharHdl));
aNumberCharBtn.SetClickHdl(LINK(this,SwInsFootNoteDlg,NumberCharHdl));
@@ -232,7 +236,7 @@ SwInsFootNoteDlg::~SwInsFootNoteDlg()
rSh.SetCareWin(0);
if (bEdit)
- rSh.ResetSelect(0, FALSE);
+ rSh.ResetSelect(0, sal_False);
}
void SwInsFootNoteDlg::Init()
@@ -240,7 +244,7 @@ void SwInsFootNoteDlg::Init()
SwFmtFtn aFtnNote;
String sNumStr;
Font aFont;
- bExtCharAvailable = FALSE;
+ bExtCharAvailable = sal_False;
rSh.StartAction();
@@ -250,7 +254,7 @@ void SwInsFootNoteDlg::Init()
{
sNumStr = aFtnNote.GetNumStr();
- rSh.Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False );
SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
rSh.GetCurAttr( aSet );
const SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT );
@@ -260,14 +264,14 @@ void SwInsFootNoteDlg::Init()
eCharSet = rFont.GetCharSet();
aFont.SetName(aFontName);
aFont.SetCharSet(eCharSet);
- bExtCharAvailable = TRUE;
- rSh.Left( CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ bExtCharAvailable = sal_True;
+ rSh.Left( CRSR_SKIP_CHARS, sal_False, 1, sal_False );
}
bFootnote = !aFtnNote.IsEndNote();
}
aNumberCharEdit.SetFont(aFont);
- BOOL bNumChar = sNumStr.Len() != 0;
+ sal_Bool bNumChar = sNumStr.Len() != 0;
aNumberCharEdit.SetText(sNumStr);
aNumberCharBtn.Check(bNumChar);
@@ -280,12 +284,12 @@ void SwInsFootNoteDlg::Init()
else
aEndNoteBtn.Check();
- BOOL bNext = rSh.GotoNextFtnAnchor();
+ sal_Bool bNext = rSh.GotoNextFtnAnchor();
if (bNext)
rSh.GotoPrevFtnAnchor();
- BOOL bPrev = rSh.GotoPrevFtnAnchor();
+ sal_Bool bPrev = rSh.GotoPrevFtnAnchor();
if (bPrev)
rSh.GotoNextFtnAnchor();
@@ -293,7 +297,7 @@ void SwInsFootNoteDlg::Init()
aPrevBT.Enable(bPrev);
aNextBT.Enable(bNext);
- rSh.Right(CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ rSh.Right(CRSR_SKIP_CHARS, sal_True, 1, sal_False );
rSh.EndAction();
}
diff --git a/sw/source/ui/misc/insfnote.hrc b/sw/source/ui/misc/insfnote.hrc
index 8ac15b4f9fc3..d8e534f9255a 100644
--- a/sw/source/ui/misc/insfnote.hrc
+++ b/sw/source/ui/misc/insfnote.hrc
@@ -39,3 +39,7 @@
#define BT_HELP 102
#define BT_PREV 103
#define BT_NEXT 104
+
+//IAccessibility2 Implementation 2009-----
+#define STR_CHAR 105
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/ui/misc/insfnote.src b/sw/source/ui/misc/insfnote.src
index c13c8387d9db..a37f03817374 100644
--- a/sw/source/ui/misc/insfnote.src
+++ b/sw/source/ui/misc/insfnote.src
@@ -31,6 +31,7 @@
// #define DLG_INS_FOOTNOTE 257
ModalDialog DLG_INS_FOOTNOTE
{
+ HelpID = "sw:ModalDialog:DLG_INS_FOOTNOTE";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 160 , 100 ) ;
@@ -38,6 +39,7 @@ ModalDialog DLG_INS_FOOTNOTE
Moveable = TRUE ;
Edit ED_NUMBER_CHAR
{
+ HelpID = "sw:Edit:DLG_INS_FOOTNOTE:ED_NUMBER_CHAR";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 69 , 27 ) ;
@@ -46,6 +48,12 @@ ModalDialog DLG_INS_FOOTNOTE
Group = TRUE ;
Left = TRUE ;
};
+ //IAccessibility2 Implementation 2009-----
+ String STR_CHAR
+ {
+ Text [ en-US ] = "Character" ;
+ };
+ //-----IAccessibility2 Implementation 2009
OKButton BT_OK
{
Pos = MAP_APPFONT ( 104 , 6 ) ;
@@ -70,6 +78,7 @@ ModalDialog DLG_INS_FOOTNOTE
};
ImageButton BT_PREV
{
+ HelpID = "sw:ImageButton:DLG_INS_FOOTNOTE:BT_PREV";
Pos = MAP_APPFONT ( 104 , 82 ) ;
Size = MAP_APPFONT ( 24 , 14 ) ;
TabStop = TRUE ;
@@ -78,6 +87,7 @@ ModalDialog DLG_INS_FOOTNOTE
};
ImageButton BT_NEXT
{
+ HelpID = "sw:ImageButton:DLG_INS_FOOTNOTE:BT_NEXT";
Pos = MAP_APPFONT ( 130 , 82 ) ;
Size = MAP_APPFONT ( 24 , 14 ) ;
TabStop = TRUE ;
@@ -86,6 +96,7 @@ ModalDialog DLG_INS_FOOTNOTE
};
RadioButton RB_NUMBER_AUTO
{
+ HelpID = "sw:RadioButton:DLG_INS_FOOTNOTE:RB_NUMBER_AUTO";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 79 , 10 ) ;
Text [ en-US ] = "~Automatic" ;
@@ -95,6 +106,7 @@ ModalDialog DLG_INS_FOOTNOTE
};
RadioButton RB_NUMBER_CHAR
{
+ HelpID = "sw:RadioButton:DLG_INS_FOOTNOTE:RB_NUMBER_CHAR";
Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 54 , 10 ) ;
Text [ en-US ] = "~Character" ;
@@ -107,12 +119,14 @@ ModalDialog DLG_INS_FOOTNOTE
};
PushButton BT_NUMBER_CHAR
{
+ HelpID = "sw:PushButton:DLG_INS_FOOTNOTE:BT_NUMBER_CHAR";
Pos = MAP_APPFONT ( 69 , 42 ) ;
Size = MAP_APPFONT ( 12 , 12 ) ;
Text = "..." ;
};
RadioButton RB_TYPE_FTN
{
+ HelpID = "sw:RadioButton:DLG_INS_FOOTNOTE:RB_TYPE_FTN";
Pos = MAP_APPFONT ( 12 , 70 ) ;
Size = MAP_APPFONT ( 79 , 10 ) ;
TabStop = TRUE ;
@@ -122,6 +136,7 @@ ModalDialog DLG_INS_FOOTNOTE
};
RadioButton RB_TYPE_ENDNOTE
{
+ HelpID = "sw:RadioButton:DLG_INS_FOOTNOTE:RB_TYPE_ENDNOTE";
Pos = MAP_APPFONT ( 12 , 83 ) ;
Size = MAP_APPFONT ( 79 , 10 ) ;
Text [ en-US ] = "~Endnote" ;
diff --git a/sw/source/ui/misc/insrule.cxx b/sw/source/ui/misc/insrule.cxx
index 1d0dd0d8119b..d861f085c86f 100644
--- a/sw/source/ui/misc/insrule.cxx
+++ b/sw/source/ui/misc/insrule.cxx
@@ -76,7 +76,7 @@ SwInsertGrfRulerDlg::SwInsertGrfRulerDlg( Window* pParent ) :
pExampleVS->InsertItem( 1, 1);
pExampleVS->SetItemText( 1, sSimple);
- for(USHORT i = 1; i <= aGrfNames.Count(); i++)
+ for(sal_uInt16 i = 1; i <= aGrfNames.Count(); i++)
{
pExampleVS->InsertItem( i + 1, i);
pExampleVS->SetItemText( i + 1, *((String*)aGrfNames.GetObject(i-1)));
@@ -94,7 +94,7 @@ SwInsertGrfRulerDlg::~SwInsertGrfRulerDlg()
String SwInsertGrfRulerDlg::GetGraphicName()
{
String sRet;
- USHORT nSel = nSelPos - 2; //align selection position with ValueSet index
+ sal_uInt16 nSel = nSelPos - 2; //align selection position with ValueSet index
if(nSel < aGrfNames.Count())
sRet = URIHelper::SmartRel2Abs(
INetURLObject(), *(String*) aGrfNames.GetObject(nSel),
@@ -123,7 +123,7 @@ void SwRulerValueSet::UserDraw( const UserDrawEvent& rUDEvt )
{
Rectangle aRect = rUDEvt.GetRect();
OutputDevice* pDev = rUDEvt.GetDevice();
- USHORT nItemId = rUDEvt.GetItemId();
+ sal_uInt16 nItemId = rUDEvt.GetItemId();
Point aBLPos = aRect.TopLeft();
// Itemzaehlung beginnt bei 1, und die 1. ist die einfache Linie
@@ -165,7 +165,7 @@ void SwRulerValueSet::UserDraw( const UserDrawEvent& rUDEvt )
}
else
{
- SetGrfNotFound(TRUE);
+ SetGrfNotFound(sal_True);
}
}
else
diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index b38039214331..74f479424079 100644
--- a/sw/source/ui/misc/linenum.cxx
+++ b/sw/source/ui/misc/linenum.cxx
@@ -85,6 +85,7 @@ SwLineNumberingPage::SwLineNumberingPage( Window* pParent,
const SfxItemSet& rSet )
: SfxTabPage(pParent, SW_RES(TP_LINENUMBERING), rSet),
aNumberingOnCB ( this, SW_RES( CB_NUMBERING_ON )),
+ aDisplayFL ( this, SW_RES( FL_DISPLAY )),
aCharStyleFT ( this, SW_RES( FT_CHAR_STYLE )),
aCharStyleLB ( this, SW_RES( LB_CHAR_STYLE )),
aFormatFT ( this, SW_RES( FT_FORMAT )),
@@ -96,19 +97,29 @@ SwLineNumberingPage::SwLineNumberingPage( Window* pParent,
aNumIntervalFT ( this, SW_RES( FT_NUM_INVERVAL )),
aNumIntervalNF ( this, SW_RES( NF_NUM_INVERVAL )),
aNumRowsFT ( this, SW_RES( FT_NUM_ROWS )),
- aDisplayFL ( this, SW_RES( FL_DISPLAY )),
+ aDivisorFL ( this, SW_RES( FL_DIVISOR )),
aDivisorFT ( this, SW_RES( FT_DIVISOR )),
aDivisorED ( this, SW_RES( ED_DIVISOR )),
aDivIntervalFT ( this, SW_RES( FT_DIV_INTERVAL )),
aDivIntervalNF ( this, SW_RES( NF_DIV_INTERVAL )),
aDivRowsFT ( this, SW_RES( FT_DIV_ROWS )),
- aDivisorFL ( this, SW_RES( FL_DIVISOR )),
+ aCountFL ( this, SW_RES( FL_COUNT )),
aCountEmptyLinesCB ( this, SW_RES( CB_COUNT_EMPTYLINES )),
aCountFrameLinesCB ( this, SW_RES( CB_COUNT_FRAMELINES )),
- aRestartEachPageCB ( this, SW_RES( CB_RESTART_PAGE )),
- aCountFL ( this, SW_RES( FL_COUNT ))
+ aRestartEachPageCB ( this, SW_RES( CB_RESTART_PAGE ))
{
+ String sIntervalName = aDivIntervalFT.GetAccessibleName();
+ sIntervalName += String::CreateFromAscii("(");
+ sIntervalName += aDivRowsFT.GetAccessibleName();
+ sIntervalName += String::CreateFromAscii(")");
+ aDivIntervalNF.SetAccessibleName(sIntervalName);
+ sIntervalName = aNumIntervalFT.GetAccessibleName();
+ sIntervalName += String::CreateFromAscii("(");
+ sIntervalName += aNumRowsFT.GetAccessibleName();
+ sIntervalName += String::CreateFromAscii(")");
+ aNumIntervalNF.SetAccessibleName(sIntervalName);
+
FreeResource();
SwLineNumberingDlg *pDlg = (SwLineNumberingDlg *)GetParent();
pSh = pDlg->GetWrtShell();
@@ -131,7 +142,7 @@ void SwLineNumberingPage::Reset( const SfxItemSet& )
IDocumentStylePoolAccess* pIDSPA = pSh->getIDocumentStylePoolAccess();
String sStyleName(rInf.GetCharFmt( *pIDSPA )->GetName());
- const USHORT nPos = aCharStyleLB.GetEntryPos(sStyleName);
+ const sal_uInt16 nPos = aCharStyleLB.GetEntryPos(sStyleName);
if (nPos != LISTBOX_ENTRY_NOTFOUND)
aCharStyleLB.SelectEntryPos(nPos);
@@ -145,15 +156,15 @@ void SwLineNumberingPage::Reset( const SfxItemSet& )
}
// Format
- USHORT nSelFmt = rInf.GetNumType().GetNumberingType();
+ sal_uInt16 nSelFmt = rInf.GetNumType().GetNumberingType();
aFormatLB.SelectNumberingType(nSelFmt);
// Position
- aPosLB.SelectEntryPos((USHORT)rInf.GetPos());
+ aPosLB.SelectEntryPos((sal_uInt16)rInf.GetPos());
// Offset
- USHORT nOffset = rInf.GetPosFromLeft();
+ sal_uInt16 nOffset = rInf.GetPosFromLeft();
if (nOffset == USHRT_MAX)
nOffset = 0;
@@ -186,7 +197,7 @@ void SwLineNumberingPage::Reset( const SfxItemSet& )
--------------------------------------------------------------------*/
IMPL_LINK( SwLineNumberingPage, ModifyHdl, Edit *, EMPTYARG )
{
- BOOL bHasValue = aDivisorED.GetText().Len() != 0;
+ sal_Bool bHasValue = aDivisorED.GetText().Len() != 0;
aDivIntervalFT.Enable(bHasValue);
aDivIntervalNF.Enable(bHasValue);
@@ -200,7 +211,7 @@ IMPL_LINK( SwLineNumberingPage, ModifyHdl, Edit *, EMPTYARG )
--------------------------------------------------------------------*/
IMPL_LINK( SwLineNumberingPage, LineOnOffHdl, CheckBox *, EMPTYARG )
{
- BOOL bEnable = aNumberingOnCB.IsChecked();
+ sal_Bool bEnable = aNumberingOnCB.IsChecked();
aCharStyleFT.Enable(bEnable);
aCharStyleLB.Enable(bEnable);
@@ -228,7 +239,7 @@ IMPL_LINK( SwLineNumberingPage, LineOnOffHdl, CheckBox *, EMPTYARG )
return 0;
}
-BOOL SwLineNumberingPage::FillItemSet( SfxItemSet& )
+sal_Bool SwLineNumberingPage::FillItemSet( SfxItemSet& )
{
SwLineNumberInfo aInf(pSh->GetLineNumberInfo());
@@ -258,16 +269,16 @@ BOOL SwLineNumberingPage::FillItemSet( SfxItemSet& )
aInf.SetPos((LineNumberPosition)aPosLB.GetSelectEntryPos());
// Offset
- aInf.SetPosFromLeft((USHORT)aOffsetMF.Denormalize(aOffsetMF.GetValue(FUNIT_TWIP)));
+ aInf.SetPosFromLeft((sal_uInt16)aOffsetMF.Denormalize(aOffsetMF.GetValue(FUNIT_TWIP)));
// Numerierungsoffset
- aInf.SetCountBy((USHORT)aNumIntervalNF.GetValue());
+ aInf.SetCountBy((sal_uInt16)aNumIntervalNF.GetValue());
// Teiler
aInf.SetDivider(aDivisorED.GetText());
// Teileroffset
- aInf.SetDividerCountBy((USHORT)aDivIntervalNF.GetValue());
+ aInf.SetDividerCountBy((sal_uInt16)aDivIntervalNF.GetValue());
// Zaehlen
aInf.SetCountBlankLines(aCountEmptyLinesCB.IsChecked());
@@ -278,7 +289,7 @@ BOOL SwLineNumberingPage::FillItemSet( SfxItemSet& )
pSh->SetLineNumberInfo(aInf);
- return FALSE;
+ return sal_False;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/linenum.src b/sw/source/ui/misc/linenum.src
index b82828a86362..1b2db408c761 100644
--- a/sw/source/ui/misc/linenum.src
+++ b/sw/source/ui/misc/linenum.src
@@ -47,6 +47,7 @@ TabPage TP_LINENUMBERING
Size = MAP_APPFONT ( 260 , 185 ) ;
CheckBox CB_NUMBERING_ON
{
+ HelpID = "sw:CheckBox:TP_LINENUMBERING:CB_NUMBERING_ON";
Pos = MAP_APPFONT ( 12 , 6 ) ;
Size = MAP_APPFONT ( 242 , 8 ) ;
TabStop = TRUE ;
@@ -60,6 +61,7 @@ TabPage TP_LINENUMBERING
};
ListBox LB_CHAR_STYLE
{
+ HelpID = "sw:ListBox:TP_LINENUMBERING:LB_CHAR_STYLE";
Pos = MAP_APPFONT ( 100 , 30 ) ;
Size = MAP_APPFONT ( 148 , 80 ) ;
TabStop = TRUE ;
@@ -74,6 +76,7 @@ TabPage TP_LINENUMBERING
};
ListBox LB_FORMAT
{
+ HelpID = "sw:ListBox:TP_LINENUMBERING:LB_FORMAT";
Pos = MAP_APPFONT ( 100 , 44 ) ;
Size = MAP_APPFONT ( 148 , 80 ) ;
TabStop = TRUE ;
@@ -87,6 +90,7 @@ TabPage TP_LINENUMBERING
};
ListBox LB_POS
{
+ HelpID = "sw:ListBox:TP_LINENUMBERING:LB_POS";
Pos = MAP_APPFONT ( 100 , 60 ) ;
Size = MAP_APPFONT ( 148 , 60 ) ;
TabStop = TRUE ;
@@ -107,6 +111,7 @@ TabPage TP_LINENUMBERING
};
MetricField MF_OFFSET
{
+ HelpID = "sw:MetricField:TP_LINENUMBERING:MF_OFFSET";
Pos = MAP_APPFONT ( 100 , 76 ) ;
Size = MAP_APPFONT ( 45 , 12 ) ;
Border = TRUE ;
@@ -130,6 +135,7 @@ TabPage TP_LINENUMBERING
};
NumericField NF_NUM_INVERVAL
{
+ HelpID = "sw:NumericField:TP_LINENUMBERING:NF_NUM_INVERVAL";
Pos = MAP_APPFONT ( 100 , 92 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
Border = TRUE ;
@@ -163,6 +169,7 @@ TabPage TP_LINENUMBERING
};
Edit ED_DIVISOR
{
+ HelpID = "sw:Edit:TP_LINENUMBERING:ED_DIVISOR";
Pos = MAP_APPFONT ( 45 , 121 ) ;
Size = MAP_APPFONT ( 76 , 12 ) ;
Left = TRUE ;
@@ -177,6 +184,7 @@ TabPage TP_LINENUMBERING
};
NumericField NF_DIV_INTERVAL
{
+ HelpID = "sw:NumericField:TP_LINENUMBERING:NF_DIV_INTERVAL";
Pos = MAP_APPFONT ( 45 , 137 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
Border = TRUE ;
@@ -205,6 +213,7 @@ TabPage TP_LINENUMBERING
};
CheckBox CB_COUNT_EMPTYLINES
{
+ HelpID = "sw:CheckBox:TP_LINENUMBERING:CB_COUNT_EMPTYLINES";
Pos = MAP_APPFONT ( 139 , 121 ) ;
Size = MAP_APPFONT ( 110 , 10 ) ;
TabStop = TRUE ;
@@ -212,6 +221,7 @@ TabPage TP_LINENUMBERING
};
CheckBox CB_COUNT_FRAMELINES
{
+ HelpID = "sw:CheckBox:TP_LINENUMBERING:CB_COUNT_FRAMELINES";
Pos = MAP_APPFONT ( 139 , 135 ) ;
Size = MAP_APPFONT ( 110 , 10 ) ;
TabStop = TRUE ;
@@ -219,6 +229,7 @@ TabPage TP_LINENUMBERING
};
CheckBox CB_RESTART_PAGE
{
+ HelpID = "sw:CheckBox:TP_LINENUMBERING:CB_RESTART_PAGE";
Pos = MAP_APPFONT ( 139 , 149 );
Size = MAP_APPFONT ( 110 , 10 );
TabStop = TRUE;
diff --git a/sw/source/ui/misc/makefile.mk b/sw/source/ui/misc/makefile.mk
deleted file mode 100644
index 4448c9acfa9f..000000000000
--- a/sw/source/ui/misc/makefile.mk
+++ /dev/null
@@ -1,93 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=misc
-LIBTARGET=no
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES=\
- bookmark.src \
- docfnote.src \
- glossary.src \
- glosbib.src \
- insfnote.src \
- insrule.src \
- linenum.src \
- num.src \
- numberingtypelistbox.src \
- outline.src \
- pgfnote.src \
- pggrid.src \
- redlndlg.src \
- srtdlg.src \
- titlepage.src
-
-EXCEPTIONSFILES = \
- $(SLO)$/bookmark.obj \
- $(SLO)$/docfnote.obj \
- $(SLO)$/glosbib.obj \
- $(SLO)$/glosdoc.obj \
- $(SLO)$/glossary.obj \
- $(SLO)$/glshell.obj \
- $(SLO)$/insfnote.obj \
- $(SLO)$/insrule.obj \
- $(SLO)$/linenum.obj \
- $(SLO)$/num.obj \
- $(SLO)$/numberingtypelistbox.obj \
- $(SLO)$/outline.obj \
- $(SLO)$/pgfnote.obj \
- $(SLO)$/pggrid.obj \
- $(SLO)$/redlndlg.obj \
- $(SLO)$/srtdlg.obj \
- $(SLO)$/swmodalredlineacceptdlg.obj \
- $(SLO)$/titlepage.obj
-
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-LIB1TARGET = $(SLB)$/$(TARGET).lib
-
-LIB1OBJFILES = \
- $(SLO)$/glosdoc.obj \
- $(SLO)$/glshell.obj \
- $(SLO)$/numberingtypelistbox.obj \
- $(SLO)$/redlndlg.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 627439c35126..8088699c5ea7 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -76,14 +76,14 @@
#include <svl/aeitem.hxx>
#include <svl/slstitm.hxx>
-static BOOL bLastRelative = FALSE;
+static sal_Bool bLastRelative = sal_False;
SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
const SfxItemSet& rSet) :
SfxTabPage( pParent, SW_RES( TP_NUM_POSITION ), rSet ),
- aPositionFL( this, SW_RES(FL_POSITION )),
aLevelFL( this, SW_RES(FL_LEVEL )),
aLevelLB( this, SW_RES(LB_LEVEL )),
+ aPositionFL( this, SW_RES(FL_POSITION )),
aDistBorderFT( this, SW_RES(FT_BORDERDIST )),
aDistBorderMF( this, SW_RES(MF_BORDERDIST )),
@@ -112,18 +112,21 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
pSaveNum(0),
pWrtSh(0),
pOutlineDlg(0),
- bPreset( FALSE ),
- bInInintControl(FALSE),
+ bPreset( sal_False ),
+ bInInintControl(sal_False),
bLabelAlignmentPosAndSpaceModeActive( false )
{
FreeResource();
SetExchangeSupport();
aPreviewWIN.SetBackground(Wallpaper(Color(COL_TRANSPARENT)));
+ aStandardPB.SetAccessibleRelationMemberOf(&aPositionFL);
+
+
aRelativeCB.Check();
aAlignLB.SetSelectHdl(LINK(this, SwNumPositionTabPage, EditModifyHdl));
aAlign2LB.SetSelectHdl(LINK(this, SwNumPositionTabPage, EditModifyHdl));
- for ( USHORT i = 0; i < aAlignLB.GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < aAlignLB.GetEntryCount(); ++i )
{
aAlign2LB.InsertEntry( aAlignLB.GetEntry( i ) );
}
@@ -164,7 +167,7 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent,
aStandardPB.SetClickHdl(LINK(this, SwNumPositionTabPage, StandardHdl));
// Ebenen einfuegen
- for(USHORT i = 1; i <= MAXLEVEL; i++)
+ for(sal_uInt16 i = 1; i <= MAXLEVEL; i++)
aLevelLB.InsertEntry(String::CreateFromInt32(i));
String sEntry(String::CreateFromAscii("1 - "));
sEntry += String::CreateFromInt32(MAXLEVEL);
@@ -182,7 +185,7 @@ SwNumPositionTabPage::~SwNumPositionTabPage()
void SwNumPositionTabPage::InitControls()
{
- bInInintControl = TRUE;
+ bInInintControl = sal_True;
const bool bRelative = !bLabelAlignmentPosAndSpaceModeActive &&
aRelativeCB.IsEnabled() && aRelativeCB.IsChecked();
const bool bSingleSelection = aLevelLB.GetSelectEntryCount() == 1 &&
@@ -205,10 +208,10 @@ void SwNumPositionTabPage::InitControls()
bool bSameIndentAt = bLabelAlignmentPosAndSpaceModeActive;
const SwNumFmt* aNumFmtArr[MAXLEVEL];
- USHORT nMask = 1;
- USHORT nLvl = USHRT_MAX;
+ sal_uInt16 nMask = 1;
+ sal_uInt16 nLvl = USHRT_MAX;
long nFirstBorderTextRelative = -1;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
aNumFmtArr[i] = &pActNum->Get(i);
if(nActNumLvl & nMask)
@@ -278,7 +281,7 @@ void SwNumPositionTabPage::InitControls()
aDistBorderMF.SetValue(aDistBorderMF.Normalize(nDistBorderNum),FUNIT_TWIP);
}
else
- bSetDistEmpty = TRUE;
+ bSetDistEmpty = sal_True;
if(bSameDist)
aDistNumMF .SetValue(aDistNumMF.Normalize(aNumFmtArr[nLvl]->GetCharTextDistance()), FUNIT_TWIP);
@@ -291,7 +294,7 @@ void SwNumPositionTabPage::InitControls()
if(bSameAdjust)
{
- USHORT nPos = 1; // zentriert
+ sal_uInt16 nPos = 1; // zentriert
if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT)
nPos = 0;
else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT)
@@ -307,7 +310,7 @@ void SwNumPositionTabPage::InitControls()
if ( bSameLabelFollowedBy )
{
- USHORT nPos = 0; // LISTTAB
+ sal_uInt16 nPos = 0; // LISTTAB
if ( aNumFmtArr[nLvl]->GetLabelFollowedBy() == SvxNumberFormat::SPACE )
{
nPos = 1;
@@ -365,19 +368,19 @@ void SwNumPositionTabPage::InitControls()
aIndentAtMF.SetText(aEmptyStr);
}
- if(TRUE == bSetDistEmpty)
+ if(sal_True == bSetDistEmpty)
aDistBorderMF.SetText(aEmptyStr);
- bInInintControl = FALSE;
+ bInInintControl = sal_False;
}
void SwNumPositionTabPage::ActivatePage(const SfxItemSet& )
{
const SfxPoolItem* pItem;
- UINT16 nTmpNumLvl =
+ sal_uInt16 nTmpNumLvl =
pOutlineDlg ? pOutlineDlg->GetActNumLevel() : 0;
const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet();
- if(pExampleSet && pExampleSet->GetItemState(FN_PARAM_NUM_PRESET, FALSE, &pItem))
+ if(pExampleSet && pExampleSet->GetItemState(FN_PARAM_NUM_PRESET, sal_False, &pItem))
{
bPreset = ((const SfxBoolItem*)pItem)->GetValue();
}
@@ -387,18 +390,18 @@ void SwNumPositionTabPage::ActivatePage(const SfxItemSet& )
{
*pActNum = *pSaveNum;
nActNumLvl = nTmpNumLvl;
- USHORT nMask = 1;
- aLevelLB.SetUpdateMode(FALSE);
+ sal_uInt16 nMask = 1;
+ aLevelLB.SetUpdateMode(sal_False);
aLevelLB.SetNoSelection();
aLevelLB.SelectEntryPos( MAXLEVEL, nActNumLvl == USHRT_MAX);
if(nActNumLvl != USHRT_MAX)
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActNumLvl & nMask)
- aLevelLB.SelectEntryPos( i, TRUE);
+ aLevelLB.SelectEntryPos( i, sal_True);
nMask <<= 1 ;
}
- aLevelLB.SetUpdateMode(TRUE);
+ aLevelLB.SetUpdateMode(sal_True);
InitPosAndSpaceMode();
ShowControlsDependingOnPosAndSpaceMode();
@@ -414,11 +417,11 @@ int SwNumPositionTabPage::DeactivatePage(SfxItemSet *_pSet)
SwOutlineTabDialog::SetActNumLevel(nActNumLvl);
if(_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
-BOOL SwNumPositionTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SwNumPositionTabPage::FillItemSet( SfxItemSet& rSet )
{
if(pOutlineDlg)
*pOutlineDlg->GetNumRule() = *pActNum;
@@ -426,7 +429,7 @@ BOOL SwNumPositionTabPage::FillItemSet( SfxItemSet& rSet )
{
*pSaveNum = *pActNum;
rSet.Put(SwUINumRuleItem( *pSaveNum ));
- rSet.Put(SfxBoolItem(FN_PARAM_NUM_PRESET, FALSE));
+ rSet.Put(SfxBoolItem(FN_PARAM_NUM_PRESET, sal_False));
}
return bModified;
}
@@ -437,27 +440,27 @@ void SwNumPositionTabPage::Reset( const SfxItemSet& rSet )
if(pOutlineDlg)
{
pSaveNum = pOutlineDlg->GetNumRule();
- aLevelLB.EnableMultiSelection(FALSE);
+ aLevelLB.EnableMultiSelection(sal_False);
}
- else if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_ACT_NUMBER, FALSE, &pItem))
+ else if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_ACT_NUMBER, sal_False, &pItem))
pSaveNum = ((SwUINumRuleItem*)pItem)->GetNumRule();
nActNumLvl = SwOutlineTabDialog::GetActNumLevel();
- USHORT nMask = 1;
- aLevelLB.SetUpdateMode(FALSE);
+ sal_uInt16 nMask = 1;
+ aLevelLB.SetUpdateMode(sal_False);
aLevelLB.SetNoSelection();
if(nActNumLvl == USHRT_MAX)
{
- aLevelLB.SelectEntryPos( MAXLEVEL, TRUE);
+ aLevelLB.SelectEntryPos( MAXLEVEL, sal_True);
}
else
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActNumLvl & nMask)
- aLevelLB.SelectEntryPos( i, TRUE);
+ aLevelLB.SelectEntryPos( i, sal_True);
nMask <<= 1;
}
- aLevelLB.SetUpdateMode(TRUE);
+ aLevelLB.SetUpdateMode(sal_True);
if(!pActNum)
pActNum = new SwNumRule(*pSaveNum);
@@ -467,7 +470,7 @@ void SwNumPositionTabPage::Reset( const SfxItemSet& rSet )
InitPosAndSpaceMode();
ShowControlsDependingOnPosAndSpaceMode();
InitControls();
- bModified = FALSE;
+ bModified = sal_False;
}
void SwNumPositionTabPage::InitPosAndSpaceMode()
@@ -480,8 +483,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)
{
@@ -571,14 +574,14 @@ void SwNumPositionTabPage::SetWrtShell(SwWrtShell* pSh)
IMPL_LINK( SwNumPositionTabPage, EditModifyHdl, Edit *, EMPTYARG )
{
- USHORT nMask = 1;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActNumLvl & nMask)
{
SwNumFmt aNumFmt(pActNum->Get(i));
- const USHORT nPos = aAlignLB.IsVisible()
+ const sal_uInt16 nPos = aAlignLB.IsVisible()
? aAlignLB.GetSelectEntryPos()
: aAlign2LB.GetSelectEntryPos();
SvxAdjust eAdjust = SVX_ADJUST_CENTER;
@@ -597,33 +600,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)
{
@@ -646,8 +649,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)
{
@@ -660,7 +663,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
{
@@ -668,7 +671,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
@@ -685,7 +688,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 );
}
@@ -703,16 +706,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)
{
@@ -725,7 +728,7 @@ IMPL_LINK( SwNumPositionTabPage, RelativeHdl, CheckBox *, pBox )
}
else
bSetValue = nValue == rNumFmt.GetAbsLSpace() - pActNum->Get(i - 1).GetAbsLSpace();
- bFirst = FALSE;
+ bFirst = sal_False;
}
nMask <<= 1;
}
@@ -746,7 +749,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;
@@ -759,9 +762,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 )
{
@@ -808,8 +811,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 )
{
@@ -831,8 +834,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 )
{
@@ -855,8 +858,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 )
{
@@ -878,8 +881,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)
{
@@ -914,9 +917,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);
@@ -928,7 +931,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)
@@ -938,7 +941,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 );
@@ -952,7 +955,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;
@@ -989,7 +992,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 );
@@ -997,9 +1000,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();
}
@@ -1009,7 +1012,7 @@ void SwSvxNumBulletTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage)
SwDocShell* pDocShell = rWrtSh.GetView().GetDocShell();
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, pDocShell));
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
- aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< USHORT >(eMetric)) );
+ aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)) );
rPage.PageCreated(aSet);
}
break;
diff --git a/sw/source/ui/misc/num.src b/sw/source/ui/misc/num.src
index 57f14c3df4fb..3f19d847f607 100644
--- a/sw/source/ui/misc/num.src
+++ b/sw/source/ui/misc/num.src
@@ -53,6 +53,7 @@ TabPage TP_NUM_POSITION
};
MultiListBox LB_LEVEL
{
+ HelpID = "sw:MultiListBox:TP_NUM_POSITION:LB_LEVEL";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 26 , 163 ) ;
TabStop = TRUE ;
@@ -75,6 +76,7 @@ TabPage TP_NUM_POSITION
};
MetricField MF_BORDERDIST
{
+ HelpID = "sw:MetricField:TP_NUM_POSITION:MF_BORDERDIST";
Pos = MAP_APPFONT ( 198 , 25 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Border = TRUE ;
@@ -93,6 +95,7 @@ TabPage TP_NUM_POSITION
};
CheckBox CB_RELATIVE
{
+ HelpID = "sw:CheckBox:TP_NUM_POSITION:CB_RELATIVE";
Pos = MAP_APPFONT ( 198 , 41 ) ;
Size = MAP_APPFONT ( 52 , 10 ) ;
Text [ en-US ] = "Relati~ve" ;
@@ -105,6 +108,7 @@ TabPage TP_NUM_POSITION
};
MetricField MF_INDENT
{
+ HelpID = "sw:MetricField:TP_NUM_POSITION:MF_INDENT";
Pos = MAP_APPFONT ( 198 , 57 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Border = TRUE ;
@@ -129,6 +133,7 @@ TabPage TP_NUM_POSITION
};
MetricField MF_NUMDIST
{
+ HelpID = "sw:MetricField:TP_NUM_POSITION:MF_NUMDIST";
Pos = MAP_APPFONT ( 198 , 73 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Left = TRUE ;
@@ -153,6 +158,7 @@ TabPage TP_NUM_POSITION
};
ListBox LB_ALIGN
{
+ HelpID = "sw:ListBox:TP_NUM_POSITION:LB_ALIGN";
Pos = MAP_APPFONT ( 198 , 89 ) ;
Size = MAP_APPFONT ( 40 , 40 ) ;
TabStop = TRUE ;
@@ -172,6 +178,7 @@ TabPage TP_NUM_POSITION
};
ListBox LB_LABEL_FOLLOWED_BY
{
+ HelpID = "sw:ListBox:TP_NUM_POSITION:LB_LABEL_FOLLOWED_BY";
Pos = MAP_APPFONT ( 198 , 25 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
@@ -192,6 +199,7 @@ TabPage TP_NUM_POSITION
};
MetricField MF_LISTTAB
{
+ HelpID = "sw:MetricField:TP_NUM_POSITION:MF_LISTTAB";
Pos = MAP_APPFONT ( 198 , 41 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Border = TRUE ;
@@ -215,6 +223,7 @@ TabPage TP_NUM_POSITION
};
ListBox LB_ALIGN_2
{
+ HelpID = "sw:ListBox:TP_NUM_POSITION:LB_ALIGN_2";
Pos = MAP_APPFONT ( 198 , 57 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
@@ -228,6 +237,7 @@ TabPage TP_NUM_POSITION
};
MetricField MF_ALIGNED_AT
{
+ HelpID = "sw:MetricField:TP_NUM_POSITION:MF_ALIGNED_AT";
Pos = MAP_APPFONT ( 198 , 73 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Left = TRUE ;
@@ -252,6 +262,7 @@ TabPage TP_NUM_POSITION
};
MetricField MF_INDENT_AT
{
+ HelpID = "sw:MetricField:TP_NUM_POSITION:MF_INDENT_AT";
Pos = MAP_APPFONT ( 198 , 89 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Left = TRUE ;
@@ -270,6 +281,7 @@ TabPage TP_NUM_POSITION
};
PushButton PB_STANDARD
{
+ HelpID = "sw:PushButton:TP_NUM_POSITION:PB_STANDARD";
Pos = MAP_APPFONT ( 198 , 165 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "Default" ;
diff --git a/sw/source/ui/misc/numberingtypelistbox.cxx b/sw/source/ui/misc/numberingtypelistbox.cxx
index e47bda007b09..3421f3c58788 100644
--- a/sw/source/ui/misc/numberingtypelistbox.cxx
+++ b/sw/source/ui/misc/numberingtypelistbox.cxx
@@ -48,7 +48,7 @@ struct SwNumberingTypeListBox_Impl
};
SwNumberingTypeListBox::SwNumberingTypeListBox( Window* pWin, const ResId& rResId,
- USHORT nTypeFlags ) :
+ sal_uInt16 nTypeFlags ) :
ListBox(pWin, rResId),
pImpl(new SwNumberingTypeListBox_Impl)
{
@@ -67,7 +67,7 @@ SwNumberingTypeListBox::~SwNumberingTypeListBox()
delete pImpl;
}
-void SwNumberingTypeListBox::Reload(USHORT nTypeFlags)
+void SwNumberingTypeListBox::Reload(sal_uInt16 nTypeFlags)
{
Clear();
uno::Sequence<sal_Int16> aTypes;
@@ -86,7 +86,7 @@ void SwNumberingTypeListBox::Reload(USHORT nTypeFlags)
{
long nValue = rNames.GetValue(i);
sal_Bool bInsert = sal_True;
- USHORT nPos = LISTBOX_APPEND;
+ sal_uInt16 nPos = LISTBOX_APPEND;
switch(nValue)
{
case style::NumberingType::NUMBER_NONE:
@@ -116,7 +116,7 @@ void SwNumberingTypeListBox::Reload(USHORT nTypeFlags)
}
if(bInsert)
{
- USHORT nEntry = InsertEntry(rNames.GetString(i), nPos);
+ sal_uInt16 nEntry = InsertEntry(rNames.GetString(i), nPos);
SetEntryData( nEntry, (void*)nValue );
}
}
@@ -129,11 +129,11 @@ void SwNumberingTypeListBox::Reload(USHORT nTypeFlags)
sal_Int16 nCurrent = pTypes[nType];
if(nCurrent > style::NumberingType::CHARS_LOWER_LETTER_N)
{
- if(LISTBOX_ENTRY_NOTFOUND == GetEntryPos((void*)(ULONG)nCurrent))
+ if(LISTBOX_ENTRY_NOTFOUND == GetEntryPos((void*)(sal_uLong)nCurrent))
{
OUString aIdent = pImpl->xInfo->getNumberingIdentifier( nCurrent );
- USHORT nPos = InsertEntry(aIdent);
- SetEntryData(nPos,(void*)(ULONG)nCurrent);
+ sal_uInt16 nPos = InsertEntry(aIdent);
+ SetEntryData(nPos,(void*)(sal_uLong)nCurrent);
}
}
}
@@ -145,9 +145,9 @@ void SwNumberingTypeListBox::Reload(USHORT nTypeFlags)
sal_Int16 SwNumberingTypeListBox::GetSelectedNumberingType()
{
sal_Int16 nRet = 0;
- USHORT nSelPos = GetSelectEntryPos();
+ sal_uInt16 nSelPos = GetSelectEntryPos();
if(LISTBOX_ENTRY_NOTFOUND != nSelPos)
- nRet = (sal_Int16)(ULONG)GetEntryData(nSelPos);
+ nRet = (sal_Int16)(sal_uLong)GetEntryData(nSelPos);
#if OSL_DEBUG_LEVEL > 1
else
OSL_FAIL("SwNumberingTypeListBox not selected");
@@ -157,7 +157,7 @@ sal_Int16 SwNumberingTypeListBox::GetSelectedNumberingType()
sal_Bool SwNumberingTypeListBox::SelectNumberingType(sal_Int16 nType)
{
- USHORT nPos = GetEntryPos((void*)(ULONG)nType);
+ sal_uInt16 nPos = GetEntryPos((void*)(sal_uLong)nType);
SelectEntryPos( nPos );
return LISTBOX_ENTRY_NOTFOUND != nPos;
}
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index f68e28e6929e..a70fe224ed88 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -70,15 +70,19 @@
#include <IDocumentOutlineNodes.hxx>
#include <app.hrc>
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HPP_
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
+#endif
+
using namespace ::com::sun::star;
DBG_NAME(outlinehdl)
class SwNumNamesDlg: public ModalDialog
{
+ FixedLine aFormFL;
Edit aFormEdit;
ListBox aFormBox;
- FixedLine aFormFL;
OKButton aOKBtn;
CancelButton aCancelBtn;
HelpButton aHelpBtn;
@@ -92,7 +96,7 @@ public:
~SwNumNamesDlg();
void SetUserNames(const String *pList[]);
String GetName() const { return aFormEdit.GetText(); }
- USHORT GetCurEntryPos() const { return aFormBox.GetSelectEntryPos(); }
+ sal_uInt16 GetCurEntryPos() const { return aFormBox.GetSelectEntryPos(); }
};
/*------------------------------------------------------------------------
@@ -113,8 +117,8 @@ IMPL_LINK_INLINE_END( SwNumNamesDlg, SelectHdl, ListBox *, pBox )
------------------------------------------------------------------------*/
void SwNumNamesDlg::SetUserNames(const String *pList[])
{
- USHORT nSelect = 0;
- for(USHORT i = 0; i < SwBaseNumRules::nMaxRules; ++i)
+ sal_uInt16 nSelect = 0;
+ for(sal_uInt16 i = 0; i < SwBaseNumRules::nMaxRules; ++i)
{
if(pList[i])
{
@@ -150,9 +154,9 @@ IMPL_LINK_INLINE_END( SwNumNamesDlg, DoubleClickHdl, ListBox *, EMPTYARG )
SwNumNamesDlg::SwNumNamesDlg(Window *pParent)
: ModalDialog(pParent, SW_RES(DLG_NUM_NAMES)),
+ aFormFL(this, SW_RES(FL_FORM)),
aFormEdit(this, SW_RES(ED_FORM)),
aFormBox(this, SW_RES(LB_FORM)),
- aFormFL(this, SW_RES(FL_FORM)),
aOKBtn(this, SW_RES(BT_OK)),
aCancelBtn(this, SW_RES(BT_CANCEL)),
aHelpBtn(this, SW_RES(BT_HELP))
@@ -166,21 +170,21 @@ SwNumNamesDlg::SwNumNamesDlg(Window *pParent)
SwNumNamesDlg::~SwNumNamesDlg() {}
-USHORT lcl_BitToLevel(USHORT nActLevel)
+sal_uInt16 lcl_BitToLevel(sal_uInt16 nActLevel)
{
- USHORT nTmp = nActLevel;
- USHORT nTmpLevel = 0;
+ sal_uInt16 nTmp = nActLevel;
+ sal_uInt16 nTmpLevel = 0;
while( 0 != (nTmp >>= 1) )
nTmpLevel++;
return nTmpLevel;
}
-USHORT SwOutlineTabDialog::nNumLevel = 1;
+sal_uInt16 SwOutlineTabDialog::nNumLevel = 1;
SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent,
const SfxItemSet* pSwItemSet,
SwWrtShell &rSh) :
//der UserString wird danach richtig gesetzt
- SfxTabDialog(pParent, SW_RES(DLG_TAB_OUTLINE), pSwItemSet, FALSE, &aEmptyStr),
+ SfxTabDialog(pParent, SW_RES(DLG_TAB_OUTLINE), pSwItemSet, sal_False, &aEmptyStr),
aNullStr(C2S("____")),
aFormMenu(SW_RES(MN_FORM)),
rWrtSh(rSh),
@@ -194,6 +198,7 @@ SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent,
pUserButton->SetText(SW_RES(ST_FORM));
pUserButton->SetHelpId(HID_OUTLINE_FORM);
pUserButton->SetClickHdl(LINK(this, SwOutlineTabDialog, FormHdl));
+ pUserButton->SetAccessibleRole( com::sun::star::accessibility::AccessibleRole::BUTTON_MENU );
FreeResource();
pNumRule = new SwNumRule( *rSh.GetOutlineNumRule() );
@@ -203,7 +208,7 @@ SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent,
AddTabPage(TP_OUTLINE_NUM , &SwOutlineSettingsTabPage::Create, 0);
String sHeadline;
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < MAXLEVEL; ++i )
{
@@ -215,7 +220,7 @@ SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent,
}
// Erfragen der Gliederungsebenen der Textvorlagen
- const USHORT nCount = rWrtSh.GetTxtFmtCollCount();
+ const sal_uInt16 nCount = rWrtSh.GetTxtFmtCollCount();
for(i = 0; i < nCount; ++i )
{
SwTxtFmtColl &rTxtColl = rWrtSh.GetTxtFmtColl(i);
@@ -237,7 +242,7 @@ SwOutlineTabDialog::~SwOutlineTabDialog()
delete pNumRule;
}
-void SwOutlineTabDialog::PageCreated(USHORT nPageId, SfxTabPage& rPage)
+void SwOutlineTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage)
{
switch ( nPageId )
{
@@ -262,7 +267,7 @@ IMPL_LINK( SwOutlineTabDialog, CancelHdl, Button *, EMPTYARG )
IMPL_LINK( SwOutlineTabDialog, FormHdl, Button *, pBtn )
{
//PopupMenu auffuellen
- for( USHORT i = 0; i < SwChapterNumRules::nMaxRules; ++i )
+ for( sal_uInt16 i = 0; i < SwChapterNumRules::nMaxRules; ++i )
{
const SwNumRulesWithName *pRules = pChapterNumRules->GetRules(i);
if( pRules )
@@ -275,7 +280,7 @@ IMPL_LINK( SwOutlineTabDialog, FormHdl, Button *, pBtn )
IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu )
{
- BYTE nLevelNo = 0;
+ sal_uInt8 nLevelNo = 0;
switch(pMenu->GetCurItemId())
{
case MN_FORM1: nLevelNo = 1; break;
@@ -292,7 +297,7 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu )
{
SwNumNamesDlg *pDlg = new SwNumNamesDlg(this);
const String *aStrArr[SwChapterNumRules::nMaxRules];
- for(USHORT i = 0; i < SwChapterNumRules::nMaxRules; ++i)
+ for(sal_uInt16 i = 0; i < SwChapterNumRules::nMaxRules; ++i)
{
const SwNumRulesWithName *pRules = pChapterNumRules->GetRules(i);
if(pRules)
@@ -327,16 +332,16 @@ IMPL_LINK( SwOutlineTabDialog, MenuSelectHdl, Menu *, pMenu )
*pNumRule = *rWrtSh.GetOutlineNumRule();
}
- USHORT nPageId = GetCurPageId();
+ sal_uInt16 nPageId = GetCurPageId();
SfxTabPage* pPage = GetTabPage( nPageId );
pPage->Reset(*GetOutputItemSet());
return 0;
}
-USHORT SwOutlineTabDialog::GetLevel(const String &rFmtName) const
+sal_uInt16 SwOutlineTabDialog::GetLevel(const String &rFmtName) const
{
- for(USHORT i = 0; i < MAXLEVEL; ++i)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; ++i)
{
if(aCollNames[i] == rFmtName)
return i;
@@ -360,7 +365,7 @@ short SwOutlineTabDialog::Ok()
const SwNumRule * pOutlineRule = rWrtSh.GetOutlineNumRule();
- USHORT i, nCount = rWrtSh.GetTxtFmtCollCount();
+ sal_uInt16 i, nCount = rWrtSh.GetTxtFmtCollCount();
for( i = 0; i < nCount; ++i )
{
SwTxtFmtColl &rTxtColl = rWrtSh.GetTxtFmtColl(i);
@@ -368,9 +373,9 @@ short SwOutlineTabDialog::Ok()
{
const SfxPoolItem & rItem =
- rTxtColl.GetFmtAttr(RES_PARATR_NUMRULE, FALSE);
+ rTxtColl.GetFmtAttr(RES_PARATR_NUMRULE, sal_False);
- if ((BYTE)GetLevel(rTxtColl.GetName()) == MAXLEVEL) //add by zhaojianwei
+ if ((sal_uInt8)GetLevel(rTxtColl.GetName()) == MAXLEVEL) //add by zhaojianwei
{
if(rTxtColl.IsAssignedToListLevelOfOutlineStyle())
{
@@ -407,7 +412,7 @@ short SwOutlineTabDialog::Ok()
if(aCollNames[i] != sHeadline)//->added by zhaojianwei
{
SwTxtFmtColl* pTxtColl = rWrtSh.GetTxtCollFromPool(
- static_cast< USHORT >(RES_POOLCOLL_HEADLINE1 + i) );
+ static_cast< sal_uInt16 >(RES_POOLCOLL_HEADLINE1 + i) );
pTxtColl->DeleteAssignmentToListLevelOfOutlineStyle();
pTxtColl->ResetFmtAttr(RES_PARATR_NUMRULE);
@@ -437,8 +442,9 @@ short SwOutlineTabDialog::Ok()
SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(Window* pParent, const SfxItemSet& rSet) :
SfxTabPage(pParent, SW_RES(TP_OUTLINE_NUM), rSet),
- aLevelLB( this, SW_RES(LB_LEVEL )),
aLevelFL( this, SW_RES(FL_LEVEL )),
+ aLevelLB( this, SW_RES(LB_LEVEL )),
+ aNumberFL(this, SW_RES(FL_NUMBER)),
aCollLbl(this, SW_RES(FT_COLL)),
aCollBox(this, SW_RES(LB_COLL)),
aNumberLbl(this, SW_RES(FT_NUMBER)),
@@ -454,7 +460,6 @@ SwOutlineSettingsTabPage::SwOutlineSettingsTabPage(Window* pParent, const SfxIte
aSuffixED(this, SW_RES(ED_SUFFIX)),
aStartLbl(this, SW_RES(FT_START)),
aStartEdit(this, SW_RES(ED_START)),
- aNumberFL(this, SW_RES(FL_NUMBER)),
aPreviewWIN( this, SW_RES(WIN_PREVIEW )),
aNoFmtName(SW_RES(ST_NO_COLL)),
@@ -485,17 +490,17 @@ void SwOutlineSettingsTabPage::Update()
aCollBox.Enable(USHRT_MAX != nActLevel);
if(USHRT_MAX == nActLevel)
{
- BOOL bSamePrefix = TRUE;
- BOOL bSameSuffix = TRUE;
- BOOL bSameType = TRUE;
- BOOL bSameComplete = TRUE;
- BOOL bSameStart = TRUE;
- BOOL bSameCharFmt = TRUE;
+ sal_Bool bSamePrefix = sal_True;
+ sal_Bool bSameSuffix = sal_True;
+ sal_Bool bSameType = sal_True;
+ sal_Bool bSameComplete = sal_True;
+ sal_Bool bSameStart = sal_True;
+ sal_Bool bSameCharFmt = sal_True;
const SwNumFmt* aNumFmtArr[MAXLEVEL];
const SwCharFmt* pFirstFmt = 0;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
aNumFmtArr[ i ] = &pNumRule->Get(i);
@@ -541,8 +546,8 @@ void SwOutlineSettingsTabPage::Update()
else
aCharFmtLB.SetNoSelection();
- aAllLevelFT.Enable(TRUE);
- aAllLevelNF.Enable(TRUE);
+ aAllLevelFT.Enable(sal_True);
+ aAllLevelNF.Enable(sal_True);
aAllLevelNF.SetMax(MAXLEVEL);
if(bSameComplete)
{
@@ -555,7 +560,7 @@ void SwOutlineSettingsTabPage::Update()
}
else
{
- USHORT nTmpLevel = lcl_BitToLevel(nActLevel);
+ sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel);
String aColl(pCollNames[nTmpLevel]);
if(aColl.Len())
aCollBox.SelectEntry(aColl);
@@ -574,16 +579,16 @@ void SwOutlineSettingsTabPage::Update()
if(nTmpLevel)
{
- aAllLevelFT.Enable(TRUE);
- aAllLevelNF.Enable(TRUE);
+ aAllLevelFT.Enable(sal_True);
+ aAllLevelNF.Enable(sal_True);
aAllLevelNF.SetMax(nTmpLevel + 1);
aAllLevelNF.SetValue(rFmt.GetIncludeUpperLevels());
}
else
{
aAllLevelNF.SetText(aEmptyStr);
- aAllLevelNF.Enable(FALSE);
- aAllLevelFT.Enable(FALSE);
+ aAllLevelNF.Enable(sal_False);
+ aAllLevelFT.Enable(sal_False);
}
CheckForStartValue_Impl(rFmt.GetNumberingType());
aStartEdit.SetValue( rFmt.GetStart() );
@@ -600,8 +605,8 @@ IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, ListBox *, pBox )
}
else
{
- USHORT nMask = 1;
- for( USHORT i = 0; i < MAXLEVEL; i++ )
+ sal_uInt16 nMask = 1;
+ for( sal_uInt16 i = 0; i < MAXLEVEL; i++ )
{
if(pBox->IsEntryPosSelected( i ))
nActLevel |= nMask;
@@ -614,14 +619,14 @@ IMPL_LINK( SwOutlineSettingsTabPage, LevelHdl, ListBox *, pBox )
IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, NumericField *, pFld )
{
- USHORT nMask = 1;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActLevel & nMask)
{
SwNumFmt aNumFmt(pNumRule->Get(i));
- aNumFmt.SetIncludeUpperLevels( Min( (BYTE)pFld->GetValue(),
- (BYTE)(i + 1)) );
+ aNumFmt.SetIncludeUpperLevels( Min( (sal_uInt8)pFld->GetValue(),
+ (sal_uInt8)(i + 1)) );
pNumRule->Set(i, aNumFmt);
}
nMask <<= 1;
@@ -632,11 +637,11 @@ IMPL_LINK( SwOutlineSettingsTabPage, ToggleComplete, NumericField *, pFld )
IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox )
{
- BYTE i;
+ sal_uInt8 i;
const String aCollName(pBox->GetSelectEntry());
//0xFFFF darf hier nicht sein (disable)
- USHORT nTmpLevel = lcl_BitToLevel(nActLevel);
+ sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel);
String sOldName( pCollNames[nTmpLevel] );
for( i = 0; i < MAXLEVEL; ++i)
@@ -659,7 +664,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox )
if( aSaveCollNames[ i ] == sOldName && i != nTmpLevel &&
!pCollNames[ i ].Len() )
{
- BYTE n;
+ sal_uInt8 n;
for( n = 0; n < MAXLEVEL; ++n )
if( pCollNames[ n ] == sOldName )
break;
@@ -675,16 +680,16 @@ IMPL_LINK( SwOutlineSettingsTabPage, CollSelect, ListBox *, pBox )
IMPL_LINK( SwOutlineSettingsTabPage, CollSelectGetFocus, ListBox *, EMPTYARG )
{
- for( BYTE i = 0; i < MAXLEVEL; ++i)
+ for( sal_uInt8 i = 0; i < MAXLEVEL; ++i)
aSaveCollNames[i] = pCollNames[i];
return 0;
}
IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, SwNumberingTypeListBox *, pBox )
{
- USHORT nMask = 1;
+ sal_uInt16 nMask = 1;
sal_Int16 nNumberType = pBox->GetSelectedNumberingType();
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActLevel & nMask)
{
@@ -701,8 +706,8 @@ IMPL_LINK( SwOutlineSettingsTabPage, NumberSelect, SwNumberingTypeListBox *, pBo
IMPL_LINK( SwOutlineSettingsTabPage, DelimModify, Edit *, EMPTYARG )
{
- USHORT nMask = 1;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActLevel & nMask)
{
@@ -719,13 +724,13 @@ IMPL_LINK( SwOutlineSettingsTabPage, DelimModify, Edit *, EMPTYARG )
IMPL_LINK( SwOutlineSettingsTabPage, StartModified, NumericField *, pFld )
{
- USHORT nMask = 1;
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActLevel & nMask)
{
SwNumFmt aNumFmt(pNumRule->Get(i));
- aNumFmt.SetStart( (USHORT)pFld->GetValue() );
+ aNumFmt.SetStart( (sal_uInt16)pFld->GetValue() );
pNumRule->Set(i, aNumFmt);
}
nMask <<= 1;
@@ -737,13 +742,13 @@ IMPL_LINK( SwOutlineSettingsTabPage, StartModified, NumericField *, pFld )
IMPL_LINK( SwOutlineSettingsTabPage, CharFmtHdl, ListBox *, EMPTYARG )
{
String sEntry = aCharFmtLB.GetSelectEntry();
- USHORT nMask = 1;
- BOOL bFormatNone = sEntry == ViewShell::GetShellRes()->aStrNone;
+ sal_uInt16 nMask = 1;
+ sal_Bool bFormatNone = sEntry == ViewShell::GetShellRes()->aStrNone;
SwCharFmt* pFmt = 0;
if(!bFormatNone)
{
- USHORT nChCount = pSh->GetCharFmtCount();
- for(USHORT i = 0; i < nChCount; i++)
+ sal_uInt16 nChCount = pSh->GetCharFmtCount();
+ for(sal_uInt16 i = 0; i < nChCount; i++)
{
SwCharFmt& rChFmt = pSh->GetCharFmt(i);
if(rChFmt.GetName() == sEntry)
@@ -764,7 +769,7 @@ IMPL_LINK( SwOutlineSettingsTabPage, CharFmtHdl, ListBox *, EMPTYARG )
}
}
- for(USHORT i = 0; i < MAXLEVEL; i++)
+ for(sal_uInt16 i = 0; i < MAXLEVEL; i++)
{
if(nActLevel & nMask)
{
@@ -794,13 +799,13 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell)
aPreviewWIN.SetNumRule(pNumRule);
aPreviewWIN.SetOutlineNames(pCollNames);
// Startwert setzen - nActLevel muss hier 1 sein
- USHORT nTmpLevel = lcl_BitToLevel(nActLevel);
+ sal_uInt16 nTmpLevel = lcl_BitToLevel(nActLevel);
const SwNumFmt& rNumFmt = pNumRule->Get( nTmpLevel );
aStartEdit.SetValue( rNumFmt.GetStart() );
// Poolformate fuer Ueberschriften anlegen
String sStr;
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < MAXLEVEL; ++i )
{
aCollBox.InsertEntry( SwStyleNameMapper::GetUIName(
@@ -812,7 +817,7 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell)
aLevelLB.InsertEntry( sStr );
// Erfragen der Gliederungsebenen der Textvorlagen
- const USHORT nCount = pSh->GetTxtFmtCollCount();
+ const sal_uInt16 nCount = pSh->GetTxtFmtCollCount();
for( i = 0; i < nCount; ++i )
{
SwTxtFmtColl &rTxtColl = pSh->GetTxtFmtColl(i);
@@ -825,11 +830,11 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell)
}
aNumberBox.SelectNumberingType(rNumFmt.GetNumberingType());
- USHORT nOutlinePos = pSh->GetOutlinePos(MAXLEVEL);
- USHORT nTmp = 0;
+ sal_uInt16 nOutlinePos = pSh->GetOutlinePos(MAXLEVEL);
+ sal_uInt16 nTmp = 0;
if(nOutlinePos != USHRT_MAX)
{
- nTmp = static_cast<USHORT>(pSh->getIDocumentOutlineNodesAccess()->getOutlineLevel(nOutlinePos));
+ nTmp = static_cast<sal_uInt16>(pSh->getIDocumentOutlineNodesAccess()->getOutlineLevel(nOutlinePos));
}
aLevelLB.SelectEntryPos(nTmp-1);//nTmp);//#outline level,zhaojianwei
@@ -859,9 +864,9 @@ int SwOutlineSettingsTabPage::DeactivatePage(SfxItemSet*)
return LEAVE_PAGE;
}
-BOOL SwOutlineSettingsTabPage::FillItemSet( SfxItemSet& )
+sal_Bool SwOutlineSettingsTabPage::FillItemSet( SfxItemSet& )
{
- return TRUE;
+ return sal_True;
}
void SwOutlineSettingsTabPage::Reset( const SfxItemSet& rSet )
@@ -877,8 +882,8 @@ SfxTabPage* SwOutlineSettingsTabPage::Create( Window* pParent,
void SwOutlineSettingsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType)
{
- BOOL bIsNull = aStartEdit.GetValue() == 0;
- BOOL bNoZeroAllowed = nNumberingType < SVX_NUM_ARABIC ||
+ sal_Bool bIsNull = aStartEdit.GetValue() == 0;
+ sal_Bool bNoZeroAllowed = nNumberingType < SVX_NUM_ARABIC ||
SVX_NUM_CHARS_UPPER_LETTER_N == nNumberingType ||
SVX_NUM_CHARS_LOWER_LETTER_N == nNumberingType;
aStartEdit.SetMin(bNoZeroAllowed ? 1 : 0);
@@ -886,29 +891,29 @@ void SwOutlineSettingsTabPage::CheckForStartValue_Impl(sal_uInt16 nNumberingType
aStartEdit.GetModifyHdl().Call(&aStartEdit);
}
-USHORT lcl_DrawBullet(VirtualDevice* pVDev,
- const SwNumFmt& rFmt, USHORT nXStart,
- USHORT nYStart, const Size& rSize)
+sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev,
+ const SwNumFmt& rFmt, sal_uInt16 nXStart,
+ sal_uInt16 nYStart, const Size& rSize)
{
Font aTmpFont(pVDev->GetFont());
Font aFont(*rFmt.GetBulletFont());
aFont.SetSize(rSize);
- aFont.SetTransparent(TRUE);
+ aFont.SetTransparent(sal_True);
pVDev->SetFont( aFont );
String aText(rFmt.GetBulletChar());
pVDev->DrawText( Point(nXStart, nYStart), aText );
- USHORT nRet = (USHORT)pVDev->GetTextWidth(aText);
+ sal_uInt16 nRet = (sal_uInt16)pVDev->GetTextWidth(aText);
pVDev->SetFont(aTmpFont);
return nRet;
}
-USHORT lcl_DrawGraphic(VirtualDevice* pVDev, const SwNumFmt &rFmt, USHORT nXStart,
- USHORT nYStart, USHORT nDivision)
+sal_uInt16 lcl_DrawGraphic(VirtualDevice* pVDev, const SwNumFmt &rFmt, sal_uInt16 nXStart,
+ sal_uInt16 nYStart, sal_uInt16 nDivision)
{
const SvxBrushItem* pBrushItem = rFmt.GetBrush();
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if(pBrushItem)
{
const Graphic* pGrf = pBrushItem->GetGraphic();
@@ -916,7 +921,7 @@ USHORT lcl_DrawGraphic(VirtualDevice* pVDev, const SwNumFmt &rFmt, USHORT nXStar
{
Size aGSize( rFmt.GetGraphicSize());
aGSize.Width() /= nDivision;
- nRet = (USHORT)aGSize.Width();
+ nRet = (sal_uInt16)aGSize.Width();
aGSize.Height() /= nDivision;
pGrf->Draw( pVDev, Point(nXStart,nYStart),
pVDev->PixelToLogic( aGSize ) );
@@ -945,10 +950,10 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
if(pActNum)
{
- USHORT nWidthRelation;
+ sal_uInt16 nWidthRelation;
if(nPageWidth)
{
- nWidthRelation = USHORT (nPageWidth / aSize.Width());
+ nWidthRelation = sal_uInt16 (nPageWidth / aSize.Width());
if(bPosition)
nWidthRelation = nWidthRelation * 2 / 3;
else
@@ -958,28 +963,28 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
nWidthRelation = 30; // Kapiteldialog
//Hoehe pro Ebene
- USHORT nXStep = USHORT(aSize.Width() / (3 * MAXLEVEL));
+ sal_uInt16 nXStep = sal_uInt16(aSize.Width() / (3 * MAXLEVEL));
if(MAXLEVEL < 10)
nXStep /= 2;
- USHORT nYStart = 4;
- USHORT nYStep = USHORT((aSize.Height() - 6)/ MAXLEVEL);
+ sal_uInt16 nYStart = 4;
+ sal_uInt16 nYStep = sal_uInt16((aSize.Height() - 6)/ MAXLEVEL);
aStdFont = OutputDevice::GetDefaultFont(
DEFAULTFONT_UI_SANS, (LanguageType)GetAppLanguage(),
DEFAULTFONT_FLAGS_ONLYONE, this );
// #101524# OJ
aStdFont.SetColor( SwViewOption::GetFontColor() );
- USHORT nFontHeight = nYStep * 6 / 10;
+ sal_uInt16 nFontHeight = nYStep * 6 / 10;
if(bPosition)
nFontHeight = nYStep * 15 / 10;
aStdFont.SetSize(Size( 0, nFontHeight ));
- USHORT nPreNum = pActNum->Get(0).GetStart();
+ sal_uInt16 nPreNum = pActNum->Get(0).GetStart();
if(bPosition)
{
- USHORT nLineHeight = nFontHeight * 8 / 7;
- BYTE nStart = 0;
+ sal_uInt16 nLineHeight = nFontHeight * 8 / 7;
+ sal_uInt8 nStart = 0;
while( !(nActLevel & (1<<nStart)) )
{
nStart++;
@@ -988,21 +993,21 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
nStart--;
SwNumberTree::tNumberVector aNumVector;
- BYTE nEnd = Min( (BYTE)(nStart + 3), MAXLEVEL );
- for( BYTE nLevel = nStart; nLevel < nEnd; ++nLevel )
+ sal_uInt8 nEnd = Min( (sal_uInt8)(nStart + 3), MAXLEVEL );
+ for( sal_uInt8 nLevel = nStart; nLevel < nEnd; ++nLevel )
{
const SwNumFmt &rFmt = pActNum->Get(nLevel);
aNumVector.push_back(rFmt.GetStart());
- USHORT nXStart( 0 );
+ sal_uInt16 nXStart( 0 );
short nTextOffset( 0 );
- USHORT nNumberXPos( 0 );
+ sal_uInt16 nNumberXPos( 0 );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
nXStart = rFmt.GetAbsLSpace() / nWidthRelation;
nTextOffset = rFmt.GetCharTextDistance() / nWidthRelation;
nNumberXPos = nXStart;
- USHORT nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation;
+ sal_uInt16 nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation;
if(nFirstLineOffset <= nNumberXPos)
nNumberXPos = nNumberXPos - nFirstLineOffset;
@@ -1020,11 +1025,11 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
}
else
{
- nNumberXPos = static_cast<USHORT>(nTmpNumberXPos);
+ nNumberXPos = static_cast<sal_uInt16>(nTmpNumberXPos);
}
}
- USHORT nBulletWidth = 0;
+ sal_uInt16 nBulletWidth = 0;
if( SVX_NUM_BITMAP == rFmt.GetNumberingType() )
{
nBulletWidth = lcl_DrawGraphic(pVDev, rFmt,
@@ -1044,7 +1049,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
String aText(pActNum->MakeNumString( aNumVector ));
// <--
pVDev->DrawText( Point(nNumberXPos, nYStart), aText );
- nBulletWidth = (USHORT)pVDev->GetTextWidth(aText);
+ nBulletWidth = (sal_uInt16)pVDev->GetTextWidth(aText);
nPreNum++;
}
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT &&
@@ -1053,10 +1058,10 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
pVDev->SetFont(aStdFont);
String aText(' ');
pVDev->DrawText( Point(nNumberXPos, nYStart), aText );
- nBulletWidth = nBulletWidth + (USHORT)pVDev->GetTextWidth(aText);
+ nBulletWidth = nBulletWidth + (sal_uInt16)pVDev->GetTextWidth(aText);
}
- USHORT nTextXPos( 0 );
+ sal_uInt16 nTextXPos( 0 );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
nTextXPos = nXStart;
@@ -1071,7 +1076,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
{
case SvxNumberFormat::LISTTAB:
{
- nTextXPos = static_cast<USHORT>(
+ nTextXPos = static_cast<sal_uInt16>(
rFmt.GetListtabPos() / nWidthRelation );
if ( nTextXPos < nNumberXPos + nBulletWidth )
{
@@ -1087,7 +1092,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
break;
}
- nXStart = static_cast<USHORT>( rFmt.GetIndentAt() / nWidthRelation );
+ nXStart = static_cast<sal_uInt16>( rFmt.GetIndentAt() / nWidthRelation );
}
@@ -1103,13 +1108,13 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
else
{
SwNumberTree::tNumberVector aNumVector;
- USHORT nLineHeight = nFontHeight * 3 / 2;
- for( BYTE nLevel = 0; nLevel < MAXLEVEL;
+ sal_uInt16 nLineHeight = nFontHeight * 3 / 2;
+ for( sal_uInt8 nLevel = 0; nLevel < MAXLEVEL;
++nLevel, nYStart = nYStart + nYStep )
{
const SwNumFmt &rFmt = pActNum->Get(nLevel);
aNumVector.push_back(rFmt.GetStart());
- USHORT nXStart( 0 );
+ sal_uInt16 nXStart( 0 );
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
nXStart = rFmt.GetAbsLSpace() / nWidthRelation;
@@ -1125,12 +1130,12 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
}
else
{
- nXStart = static_cast<USHORT>(nTmpXStart);
+ nXStart = static_cast<sal_uInt16>(nTmpXStart);
}
}
nXStart /= 2;
nXStart += 2;
- USHORT nTextOffset = 2 * nXStep;
+ sal_uInt16 nTextOffset = 2 * nXStep;
if( SVX_NUM_BITMAP == rFmt.GetNumberingType() )
{
lcl_DrawGraphic(pVDev, rFmt, nXStart, nYStart, nWidthRelation);
@@ -1150,7 +1155,7 @@ void NumberingPreview::Paint( const Rectangle& /*rRect*/ )
String aText(pActNum->MakeNumString( aNumVector ));
// <--
pVDev->DrawText( Point(nXStart, nYStart), aText );
- nTextOffset = (USHORT)pVDev->GetTextWidth(aText);
+ nTextOffset = (sal_uInt16)pVDev->GetTextWidth(aText);
nTextOffset = nTextOffset + nXStep;
nPreNum++;
}
diff --git a/sw/source/ui/misc/outline.src b/sw/source/ui/misc/outline.src
index d7dffb4a000b..85ea42df4861 100644
--- a/sw/source/ui/misc/outline.src
+++ b/sw/source/ui/misc/outline.src
@@ -65,6 +65,7 @@ ModalDialog DLG_NUM_NAMES
};
ListBox LB_FORM
{
+ HelpID = "sw:ListBox:DLG_NUM_NAMES:LB_FORM";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 29 ) ;
Size = MAP_APPFONT ( 84 , 42 ) ;
@@ -85,6 +86,7 @@ ModalDialog DLG_NUM_NAMES
};
Edit ED_FORM
{
+ HelpID = "sw:Edit:DLG_NUM_NAMES:ED_FORM";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 84 , 12 ) ;
@@ -211,6 +213,7 @@ TabPage TP_OUTLINE_NUM
Hide = TRUE;
ListBox LB_LEVEL
{
+ HelpID = "sw:ListBox:TP_OUTLINE_NUM:LB_LEVEL";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 23 , 129 ) ;
TabStop = TRUE ;
@@ -233,6 +236,7 @@ TabPage TP_OUTLINE_NUM
};
ListBox LB_COLL
{
+ HelpID = "sw:ListBox:TP_OUTLINE_NUM:LB_COLL";
Border = TRUE ;
Pos = MAP_APPFONT ( 50 , 25 ) ;
Size = MAP_APPFONT ( 120 , 75 ) ;
@@ -251,6 +255,7 @@ TabPage TP_OUTLINE_NUM
};
ListBox LB_NUMBER
{
+ HelpID = "sw:ListBox:TP_OUTLINE_NUM:LB_NUMBER";
Pos = MAP_APPFONT ( 104 , 41 ) ;
Size = MAP_APPFONT ( 66 , 65 ) ;
TabStop = TRUE ;
@@ -266,6 +271,7 @@ TabPage TP_OUTLINE_NUM
};
ListBox LB_CHARFMT
{
+ HelpID = "sw:ListBox:TP_OUTLINE_NUM:LB_CHARFMT";
TabStop = TRUE ;
DropDown = TRUE ;
Pos = MAP_APPFONT ( 104 , 57 ) ;
@@ -279,6 +285,7 @@ TabPage TP_OUTLINE_NUM
};
NumericField NF_ALL_LEVEL
{
+ HelpID = "sw:NumericField:TP_OUTLINE_NUM:NF_ALL_LEVEL";
Border = TRUE ;
Pos = MAP_APPFONT ( 104 , 73 ) ;
Size = MAP_APPFONT ( 66 , 12 ) ;
@@ -308,6 +315,7 @@ TabPage TP_OUTLINE_NUM
};
Edit ED_PREFIX
{
+ HelpID = "sw:Edit:TP_OUTLINE_NUM:ED_PREFIX";
Border = TRUE ;
Pos = MAP_APPFONT ( 104 , 100 ) ;
Size = MAP_APPFONT ( 66 , 12 ) ;
@@ -324,6 +332,7 @@ TabPage TP_OUTLINE_NUM
};
Edit ED_SUFFIX
{
+ HelpID = "sw:Edit:TP_OUTLINE_NUM:ED_SUFFIX";
Border = TRUE ;
Pos = MAP_APPFONT ( 104 , 115 ) ;
Size = MAP_APPFONT ( 66 , 12 ) ;
@@ -340,6 +349,7 @@ TabPage TP_OUTLINE_NUM
};
NumericField ED_START
{
+ HelpID = "sw:NumericField:TP_OUTLINE_NUM:ED_START";
Border = TRUE ;
Pos = MAP_APPFONT ( 104 , 131 ) ;
Size = MAP_APPFONT ( 66 , 12 ) ;
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index ed07c6ecdc5c..d0309d632e4d 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -62,7 +62,7 @@
/*-----------------------------------------------------#---------------
Beschreibung: vordefinierte Linien in Point
--------------------------------------------------------------------*/
-static const USHORT nLines[] = {
+static const sal_uInt16 nLines[] = {
0,
50,
100,
@@ -71,9 +71,9 @@ static const USHORT nLines[] = {
500
};
-static const USHORT nLineCount = SAL_N_ELEMENTS(nLines);
+static const sal_uInt16 nLineCount = SAL_N_ELEMENTS(nLines);
-static USHORT aPageRg[] = {
+static sal_uInt16 aPageRg[] = {
FN_PARAM_FTN_INFO, FN_PARAM_FTN_INFO,
0
};
@@ -82,13 +82,13 @@ static USHORT aPageRg[] = {
Beschreibung: liefert zurueck, ob die Linienbreite nWidth bereits
in der Listbox enthalten ist.
------------------------------------------------------------------------*/
-BOOL lcl_HasLineWidth(USHORT nWidth)
+sal_Bool lcl_HasLineWidth(sal_uInt16 nWidth)
{
- for(USHORT i = 0; i < nLineCount; ++i) {
+ for(sal_uInt16 i = 0; i < nLineCount; ++i) {
if(nLines[i] == nWidth)
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*------------------------------------------------------------------------
@@ -98,7 +98,7 @@ BOOL lcl_HasLineWidth(USHORT nWidth)
------------------------------------------------------------------------*/
IMPL_LINK_INLINE_START( SwFootNotePage, HeightPage, Button *, EMPTYARG )
{
- aMaxHeightEdit.Enable(FALSE);
+ aMaxHeightEdit.Enable(sal_False);
return 0;
}
IMPL_LINK_INLINE_END( SwFootNotePage, HeightPage, Button *, EMPTYARG )
@@ -141,14 +141,14 @@ IMPL_LINK( SwFootNotePage, HeightModify, MetricField *, EMPTYARG )
SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet) :
SfxTabPage(pParent, SW_RES(TP_FOOTNOTE_PAGE), rSet),
-
+ aPosHeader(this, SW_RES(FL_FOOTNOTE_SIZE)),
aMaxHeightPageBtn(this, SW_RES(RB_MAXHEIGHT_PAGE)),
aMaxHeightBtn(this, SW_RES(RB_MAXHEIGHT)),
aMaxHeightEdit(this, SW_RES(ED_MAXHEIGHT)),
aDistLbl(this, SW_RES(FT_DIST)),
aDistEdit(this, SW_RES(ED_DIST)),
- aPosHeader(this, SW_RES(FL_FOOTNOTE_SIZE)),
+ aLineHeader(this, SW_RES(FL_LINE)),
aLinePosLbl(this, SW_RES(FT_LINEPOS)),
aLinePosBox(this, SW_RES(DLB_LINEPOS)),
aLineTypeLbl(this, SW_RES(FT_LINETYPE)),
@@ -156,19 +156,19 @@ SwFootNotePage::SwFootNotePage(Window *pParent, const SfxItemSet &rSet) :
aLineWidthLbl(this, SW_RES(FT_LINEWIDTH)),
aLineWidthEdit(this, SW_RES(ED_LINEWIDTH)),
aLineDistLbl(this, SW_RES(FT_LINEDIST)),
- aLineDistEdit(this, SW_RES(ED_LINEDIST)),
- aLineHeader(this, SW_RES(FL_LINE))
-{
+ aLineDistEdit(this, SW_RES(ED_LINEDIST))
+ {
FreeResource();
SetExchangeSupport();
- FieldUnit aMetric = ::GetDfltMetric(FALSE);
+ FieldUnit aMetric = ::GetDfltMetric(sal_False);
SetMetric( aMaxHeightEdit, aMetric );
SetMetric( aDistEdit, aMetric );
SetMetric( aLineDistEdit, aMetric );
MeasurementSystem eSys = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
long nHeightValue = MEASURE_METRIC != eSys ? 1440 : 1134;
aMaxHeightEdit.SetValue(aMaxHeightEdit.Normalize(nHeightValue),FUNIT_TWIP);;
+ aMaxHeightEdit.SetAccessibleRelationLabeledBy(&aMaxHeightBtn);
}
SwFootNotePage::~SwFootNotePage()
@@ -203,12 +203,12 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet)
if(lHeight)
{
aMaxHeightEdit.SetValue(aMaxHeightEdit.Normalize(lHeight),FUNIT_TWIP);
- aMaxHeightBtn.Check(TRUE);
+ aMaxHeightBtn.Check(sal_True);
}
else
{
- aMaxHeightPageBtn.Check(TRUE);
- aMaxHeightEdit.Enable(FALSE);
+ aMaxHeightPageBtn.Check(sal_True);
+ aMaxHeightEdit.Enable(sal_False);
}
aMaxHeightPageBtn.SetClickHdl(LINK(this,SwFootNotePage,HeightPage));
aMaxHeightBtn.SetClickHdl(LINK(this,SwFootNotePage,HeightMetric));
@@ -218,16 +218,16 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet)
aLineDistEdit.SetLoseFocusHdl( aLk );
// Trennlinie
- for(USHORT i = 0; i < nLineCount; ++i)
+ for(sal_uInt16 i = 0; i < nLineCount; ++i)
aLineTypeBox.InsertEntry(nLines[i]);
- const USHORT nWidth = (USHORT)pFtnInfo->GetLineWidth() * TWIP_TO_LBOX;
+ const sal_uInt16 nWidth = (sal_uInt16)pFtnInfo->GetLineWidth() * TWIP_TO_LBOX;
if ( !lcl_HasLineWidth(nWidth) )
aLineTypeBox.InsertEntry(nWidth);
aLineTypeBox.SelectEntry(nWidth);
// Position
- aLinePosBox.SelectEntryPos( static_cast< USHORT >(pFtnInfo->GetAdj()) );
+ aLinePosBox.SelectEntryPos( static_cast< sal_uInt16 >(pFtnInfo->GetAdj()) );
// Breite
Fraction aTmp( 100, 1 );
@@ -245,7 +245,7 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet)
/*--------------------------------------------------------------------
Beschreibung: Attribute in den Set stopfen bei OK
--------------------------------------------------------------------*/
-BOOL SwFootNotePage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwFootNotePage::FillItemSet(SfxItemSet &rSet)
{
SwPageFtnInfoItem aItem((const SwPageFtnInfoItem&)GetItemSet().Get(FN_PARAM_FTN_INFO));
@@ -266,7 +266,7 @@ BOOL SwFootNotePage::FillItemSet(SfxItemSet &rSet)
aLineDistEdit.Denormalize(aLineDistEdit.GetValue(FUNIT_TWIP))));
// Trennlinie
- const USHORT nPos = aLineTypeBox.GetSelectEntryPos();
+ const sal_uInt16 nPos = aLineTypeBox.GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND != nPos )
rFtnInfo.SetLineWidth(nLines[nPos] / TWIP_TO_LBOX);
@@ -281,7 +281,7 @@ BOOL SwFootNotePage::FillItemSet(SfxItemSet &rSet)
aItem != *pOldItem )
rSet.Put(aItem);
- return TRUE;
+ return sal_True;
}
void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
@@ -290,7 +290,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
lMaxHeight = rSize.GetSize().Height();
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_HEADERSET), FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_HEADERSET), sal_False, &pItem ) )
{
const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rHeaderOn =
@@ -305,7 +305,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
}
if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_FOOTERSET),
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rFooterOn =
@@ -319,7 +319,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
}
}
- if ( rSet.GetItemState( RES_UL_SPACE , FALSE ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( RES_UL_SPACE , sal_False ) == SFX_ITEM_SET )
{
const SvxULSpaceItem &rUL = (const SvxULSpaceItem&)rSet.Get( RES_UL_SPACE );
lMaxHeight -= rUL.GetUpper() + rUL.GetLower();
@@ -337,10 +337,10 @@ int SwFootNotePage::DeactivatePage( SfxItemSet* _pSet)
if(_pSet)
FillItemSet(*_pSet);
- return TRUE;
+ return sal_True;
}
-USHORT* SwFootNotePage::GetRanges()
+sal_uInt16* SwFootNotePage::GetRanges()
{
return aPageRg;
}
diff --git a/sw/source/ui/misc/pgfnote.src b/sw/source/ui/misc/pgfnote.src
index 4ad558da0117..7d74eeb567f3 100644
--- a/sw/source/ui/misc/pgfnote.src
+++ b/sw/source/ui/misc/pgfnote.src
@@ -35,6 +35,7 @@ TabPage TP_FOOTNOTE_PAGE
Hide = TRUE;
RadioButton RB_MAXHEIGHT_PAGE
{
+ HelpID = "sw:RadioButton:TP_FOOTNOTE_PAGE:RB_MAXHEIGHT_PAGE";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 132 , 10 ) ;
Text [ en-US ] = "~Not larger than page area" ;
@@ -43,12 +44,14 @@ TabPage TP_FOOTNOTE_PAGE
};
RadioButton RB_MAXHEIGHT
{
+ HelpID = "sw:RadioButton:TP_FOOTNOTE_PAGE:RB_MAXHEIGHT";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 132 , 10 ) ;
Text [ en-US ] = "Maximum footnote ~height" ;
};
MetricField ED_MAXHEIGHT
{
+ HelpID = "sw:MetricField:TP_FOOTNOTE_PAGE:ED_MAXHEIGHT";
Border = TRUE ;
Pos = MAP_APPFONT ( 148 , 26 ) ;
Size = MAP_APPFONT ( 42 , 12 ) ;
@@ -75,6 +78,7 @@ TabPage TP_FOOTNOTE_PAGE
};
MetricField ED_DIST
{
+ HelpID = "sw:MetricField:TP_FOOTNOTE_PAGE:ED_DIST";
Border = TRUE ;
Pos = MAP_APPFONT ( 148 , 42 ) ;
Size = MAP_APPFONT ( 42 , 12 ) ;
@@ -105,6 +109,7 @@ TabPage TP_FOOTNOTE_PAGE
};
ListBox DLB_LINEPOS
{
+ HelpID = "sw:ListBox:TP_FOOTNOTE_PAGE:DLB_LINEPOS";
Pos = MAP_APPFONT ( 148 , 71 ) ;
Size = MAP_APPFONT ( 57 , 40 ) ;
TabStop = TRUE ;
@@ -128,6 +133,7 @@ TabPage TP_FOOTNOTE_PAGE
};
ListBox DLB_LINETYPE
{
+ HelpID = "sw:ListBox:TP_FOOTNOTE_PAGE:DLB_LINETYPE";
Pos = MAP_APPFONT ( 148 , 87 ) ;
Size = MAP_APPFONT ( 57 , 50 ) ;
TabStop = TRUE ;
@@ -145,6 +151,7 @@ TabPage TP_FOOTNOTE_PAGE
};
MetricField ED_LINEWIDTH
{
+ HelpID = "sw:MetricField:TP_FOOTNOTE_PAGE:ED_LINEWIDTH";
Border = TRUE ;
Pos = MAP_APPFONT ( 148 , 103 ) ;
Size = MAP_APPFONT ( 42 , 12 ) ;
@@ -168,6 +175,7 @@ TabPage TP_FOOTNOTE_PAGE
};
MetricField ED_LINEDIST
{
+ HelpID = "sw:MetricField:TP_FOOTNOTE_PAGE:ED_LINEDIST";
Border = TRUE ;
Pos = MAP_APPFONT ( 148 , 119 ) ;
Size = MAP_APPFONT ( 42 , 12 ) ;
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index 3a20c177f915..443dbea06389 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -151,14 +151,14 @@ SwTextGridPage::SwTextGridPage(Window *pParent, const SfxItemSet &rSet) :
XColorTable* pColorTbl = XColorTable::GetStdColorTable();
aColorLB.InsertAutomaticEntry();
- for( USHORT i = 0; i < pColorTbl->Count(); ++i )
+ for( sal_uInt16 i = 0; i < pColorTbl->Count(); ++i )
{
XColorEntry* pEntry = pColorTbl->GetColor( i );
Color aColor = pEntry->GetColor();
String sName = pEntry->GetName();
aColorLB.InsertEntry( aColor, sName );
}
- aColorLB.SetUpdateMode( TRUE );
+ aColorLB.SetUpdateMode( sal_True );
//Get the default paper mode
SwView *pView = ::GetActiveView();
if( pView )
@@ -198,9 +198,9 @@ SfxTabPage *SwTextGridPage::Create(Window *pParent, const SfxItemSet &rSet)
return new SwTextGridPage(pParent, rSet);
}
-BOOL SwTextGridPage::FillItemSet(SfxItemSet &rSet)
+sal_Bool SwTextGridPage::FillItemSet(SfxItemSet &rSet)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if(aNoGridRB.GetSavedValue() != aNoGridRB.IsChecked()||
aLinesGridRB.GetSavedValue() != aLinesGridRB.IsChecked()||
aLinesPerPageNF.GetSavedValue().ToInt32()
@@ -217,7 +217,7 @@ BOOL SwTextGridPage::FillItemSet(SfxItemSet &rSet)
aColorLB.GetSavedValue() != aColorLB.GetSelectEntryPos())
{
PutGridItem(rSet);
- bRet = TRUE;
+ bRet = sal_True;
}
// draw ticks of ruler
@@ -231,7 +231,7 @@ BOOL SwTextGridPage::FillItemSet(SfxItemSet &rSet)
void SwTextGridPage::Reset(const SfxItemSet &rSet)
{
- if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, TRUE))
+ if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, sal_True))
{
const SwTextGridItem& rGridItem = (const SwTextGridItem&)rSet.Get(RES_TEXTGRID);
RadioButton* pButton = 0;
@@ -320,7 +320,7 @@ void SwTextGridPage::PutGridItem(SfxItemSet& rSet)
void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet)
{
- if( SFX_ITEM_UNKNOWN != rSet.GetItemState( RES_FRAMEDIR, TRUE ))
+ if( SFX_ITEM_UNKNOWN != rSet.GetItemState( RES_FRAMEDIR, sal_True ))
{
const SvxFrameDirectionItem& rDirItem =
(const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR);
@@ -393,9 +393,9 @@ void SwTextGridPage::SetLinesOrCharsRanges(FixedText & rField, const sal_Int32 n
rField.SetText( aFieldStr );
}
-USHORT* SwTextGridPage::GetRanges()
+sal_uInt16* SwTextGridPage::GetRanges()
{
- static USHORT aPageRg[] = {
+ static sal_uInt16 aPageRg[] = {
RES_TEXTGRID, RES_TEXTGRID,
0};
return aPageRg;
diff --git a/sw/source/ui/misc/pggrid.src b/sw/source/ui/misc/pggrid.src
index 747e1325d3da..b226b4ce8bc8 100644
--- a/sw/source/ui/misc/pggrid.src
+++ b/sw/source/ui/misc/pggrid.src
@@ -41,24 +41,28 @@ TabPage TP_TEXTGRID_PAGE
};
RadioButton RB_NOGRID
{
+ HelpID = "sw:RadioButton:TP_TEXTGRID_PAGE:RB_NOGRID";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 158 , 10 ) ;
Text [ en-US ] = "No grid" ;
};
RadioButton RB_LINESGRID
{
+ HelpID = "sw:RadioButton:TP_TEXTGRID_PAGE:RB_LINESGRID";
Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 158 , 10 ) ;
Text [ en-US ] = "Grid (lines only)" ;
};
RadioButton RB_CHARSGRID
{
+ HelpID = "sw:RadioButton:TP_TEXTGRID_PAGE:RB_CHARSGRID";
Pos = MAP_APPFONT ( 12 , 40 ) ;
Size = MAP_APPFONT ( 158 , 10 ) ;
Text [ en-US ] = "Grid (lines and characters)" ;
};
CheckBox CB_SNAPTOCHARS
{
+ HelpID = "sw:CheckBox:TP_TEXTGRID_PAGE:CB_SNAPTOCHARS";
Pos = MAP_APPFONT ( 14 , 53 ) ;
Size = MAP_APPFONT ( 158 , 10 ) ;
Text [ en-US ] = "~Snap to characters" ;
@@ -83,6 +87,7 @@ TabPage TP_TEXTGRID_PAGE
};
NumericField NF_LINESPERPAGE
{
+ HelpID = "sw:NumericField:TP_TEXTGRID_PAGE:NF_LINESPERPAGE";
Pos = MAP_APPFONT ( 74 , 80 ) ;
Size = MAP_APPFONT ( 25 , 12 ) ;
Border = TRUE ;
@@ -111,6 +116,7 @@ TabPage TP_TEXTGRID_PAGE
};
MetricField MF_TEXTSIZE
{
+ HelpID = "sw:MetricField:TP_TEXTGRID_PAGE:MF_TEXTSIZE";
Pos = MAP_APPFONT ( 216 , 80 ) ;
Size = MAP_APPFONT ( 35 , 12 ) ;
Border = TRUE ;
@@ -134,6 +140,7 @@ TabPage TP_TEXTGRID_PAGE
};
NumericField NF_CHARSPERLINE
{
+ HelpID = "sw:NumericField:TP_TEXTGRID_PAGE:NF_CHARSPERLINE";
Pos = MAP_APPFONT ( 74 , 96 ) ;
Size = MAP_APPFONT ( 25 , 12 ) ;
Border = TRUE ;
@@ -157,6 +164,7 @@ TabPage TP_TEXTGRID_PAGE
};
MetricField MF_CHARWIDTH
{
+ HelpID = "sw:MetricField:TP_TEXTGRID_PAGE:MF_CHARWIDTH";
Pos = MAP_APPFONT ( 216 , 96 ) ;
Size = MAP_APPFONT ( 35 , 12 ) ;
Border = TRUE ;
@@ -186,6 +194,7 @@ TabPage TP_TEXTGRID_PAGE
};
MetricField MF_RUBYSIZE
{
+ HelpID = "sw:MetricField:TP_TEXTGRID_PAGE:MF_RUBYSIZE";
Pos = MAP_APPFONT ( 216 , 96 ) ;
Size = MAP_APPFONT ( 35 , 12 ) ;
Border = TRUE ;
@@ -203,6 +212,7 @@ TabPage TP_TEXTGRID_PAGE
};
CheckBox CB_RUBYBELOW
{
+ HelpID = "sw:CheckBox:TP_TEXTGRID_PAGE:CB_RUBYBELOW";
Pos = MAP_APPFONT ( 14 , 112 ) ;
Size = MAP_APPFONT ( 237 , 10 ) ;
Text [ en-US ] = "Ruby text below/left from base text" ;
@@ -215,12 +225,14 @@ TabPage TP_TEXTGRID_PAGE
};
CheckBox CB_DISPLAY
{
+ HelpID = "sw:CheckBox:TP_TEXTGRID_PAGE:CB_DISPLAY";
Pos = MAP_APPFONT ( 12 , 139 ) ;
Size = MAP_APPFONT ( 118 , 10 ) ;
Text [ en-US ] = "Display grid" ;
};
CheckBox CB_PRINT
{
+ HelpID = "sw:CheckBox:TP_TEXTGRID_PAGE:CB_PRINT";
Pos = MAP_APPFONT ( 18 , 154 ) ;
Size = MAP_APPFONT ( 112 , 10 ) ;
Text [ en-US ] = "Print grid" ;
@@ -233,6 +245,7 @@ TabPage TP_TEXTGRID_PAGE
};
ListBox LB_COLOR
{
+ HelpID = "sw:ListBox:TP_TEXTGRID_PAGE:LB_COLOR";
Pos = MAP_APPFONT ( 191 , 137 ) ;
Size = MAP_APPFONT ( 60 , 50 ) ;
TabStop = TRUE;
diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx
index 745c37a83e76..644ba83140c1 100644
--- a/sw/source/ui/misc/redlndlg.cxx
+++ b/sw/source/ui/misc/redlndlg.cxx
@@ -64,7 +64,6 @@
// -> #111827#
#include <comcore.hrc>
#include <swundo.hxx>
-#include <undobj.hxx>
#include <SwRewriter.hxx>
// <- #111827#
@@ -85,11 +84,11 @@ SV_IMPL_OP_PTRARR_SORT(SwRedlineDataParentSortArr, SwRedlineDataParentPtr)
SV_IMPL_PTRARR(SwRedlineDataChildArr, SwRedlineDataChildPtr)
SV_IMPL_PTRARR(SvLBoxEntryArr, SvLBoxEntryPtr)
-static USHORT nSortMode = 0xffff;
-static BOOL bSortDir = TRUE;
+static sal_uInt16 nSortMode = 0xffff;
+static sal_Bool bSortDir = sal_True;
SwRedlineAcceptChild::SwRedlineAcceptChild( Window* _pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo ) :
SwChildWinWrapper( _pParent, nId )
@@ -102,11 +101,11 @@ SwRedlineAcceptChild::SwRedlineAcceptChild( Window* _pParent,
/*--------------------------------------------------------------------
Beschreibung: Nach Dok-Wechsel Dialog neu initialisieren
--------------------------------------------------------------------*/
-BOOL SwRedlineAcceptChild::ReInitDlg(SwDocShell *pDocSh)
+sal_Bool SwRedlineAcceptChild::ReInitDlg(SwDocShell *pDocSh)
{
- BOOL bRet;
+ sal_Bool bRet;
- if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == TRUE) // Sofort aktualisieren, Dok-Wechsel
+ if ((bRet = SwChildWinWrapper::ReInitDlg(pDocSh)) == sal_True) // Sofort aktualisieren, Dok-Wechsel
((SwModelessRedlineAcceptDlg*)GetWindow())->Activate();
return bRet;
@@ -134,13 +133,13 @@ void SwModelessRedlineAcceptDlg::Activate()
if (pChildWin->GetOldDocShell() != pDocSh)
{ // Dok-Wechsel
- SwWait aWait( *pDocSh, FALSE );
+ SwWait aWait( *pDocSh, sal_False );
SwWrtShell* pSh = pView->GetWrtShellPtr();
pChildWin->SetOldDocShell(pDocSh); // Rekursion vermeiden (durch Modified-Hdl)
- BOOL bMod = pSh->IsModified();
- SfxBoolItem aShow(FN_REDLINE_SHOW, TRUE);
+ sal_Bool bMod = pSh->IsModified();
+ SfxBoolItem aShow(FN_REDLINE_SHOW, sal_True);
pSh->GetView().GetViewFrame()->GetDispatcher()->Execute(
FN_REDLINE_SHOW, SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD, &aShow, 0L);
if (!bMod)
@@ -179,7 +178,7 @@ SwModelessRedlineAcceptDlg::~SwModelessRedlineAcceptDlg()
delete pImplDlg;
}
-SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) :
+SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, sal_Bool bAutoFmt) :
pParentDlg (pParent),
aTabPagesCTRL (pParent, SW_RES(CTRL_TABPAGES)),
aPopup (SW_RES(MN_REDLINE_POPUP)),
@@ -189,8 +188,8 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) :
sTableChgd (SW_RES(STR_REDLINE_TABLECHG)),
sFmtCollSet (SW_RES(STR_REDLINE_FMTCOLLSET)),
sAutoFormat (SW_RES(STR_REDLINE_AUTOFMT)),
- bOnlyFormatedRedlines( FALSE ),
- bHasReadonlySel ( FALSE ),
+ bOnlyFormatedRedlines( sal_False ),
+ bHasReadonlySel ( sal_False ),
bRedlnAutoFmt (bAutoFmt),
bInhibitActivate( false )
{
@@ -217,13 +216,13 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(Dialog *pParent, BOOL bAutoFmt) :
{
pActLB->InsertEntry(sFmtCollSet);
pActLB->InsertEntry(sAutoFormat);
- pTPView->ShowUndo(TRUE);
+ pTPView->ShowUndo(sal_True);
pTPView->DisableUndo(); // Noch gibts keine UNDO-Events
}
pActLB->SelectEntryPos(0);
- pTable->SetWindowBits(WB_HASLINES|WB_CLIPCHILDREN|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
+ pTable->SetStyle(pTable->GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
pTable->SetNodeDefaultImages();
pTable->SetSelectionMode(MULTIPLE_SELECTION);
pTable->SetHighlightRange(1);
@@ -269,11 +268,11 @@ SwRedlineAcceptDlg::~SwRedlineAcceptDlg()
{
}
-void SwRedlineAcceptDlg::Init(USHORT nStart)
+void SwRedlineAcceptDlg::Init(sal_uInt16 nStart)
{
- SwWait aWait( *::GetActiveView()->GetDocShell(), FALSE );
- pTable->SetUpdateMode(FALSE);
- aUsedSeqNo.Remove((USHORT)0, aUsedSeqNo.Count());
+ SwWait aWait( *::GetActiveView()->GetDocShell(), sal_False );
+ pTable->SetUpdateMode(sal_False);
+ aUsedSeqNo.Remove((sal_uInt16)0, aUsedSeqNo.Count());
if (nStart)
RemoveParents(nStart, aRedlineParents.Count() - 1);
@@ -288,7 +287,7 @@ void SwRedlineAcceptDlg::Init(USHORT nStart)
InsertParents(nStart);
InitAuthors();
- pTable->SetUpdateMode(TRUE);
+ pTable->SetUpdateMode(sal_True);
// #i69618# this moves the list box to the right position, visually
SvLBoxEntry* pSelEntry = pTable->FirstSelected();
if( pSelEntry )
@@ -307,12 +306,12 @@ void SwRedlineAcceptDlg::InitAuthors()
pFilterPage->ClearAuthors();
String sParent;
- USHORT nCount = pSh->GetRedlineCount();
+ sal_uInt16 nCount = pSh->GetRedlineCount();
- bOnlyFormatedRedlines = TRUE;
- bHasReadonlySel = FALSE;
- BOOL bIsNotFormated = FALSE;
- USHORT i;
+ bOnlyFormatedRedlines = sal_True;
+ bHasReadonlySel = sal_False;
+ sal_Bool bIsNotFormated = sal_False;
+ sal_uInt16 i;
// Autoren ermitteln
for ( i = 0; i < nCount; i++)
@@ -320,13 +319,13 @@ void SwRedlineAcceptDlg::InitAuthors()
const SwRedline& rRedln = pSh->GetRedline(i);
if( bOnlyFormatedRedlines && nsRedlineType_t::REDLINE_FORMAT != rRedln.GetType() )
- bOnlyFormatedRedlines = FALSE;
+ bOnlyFormatedRedlines = sal_False;
String *pAuthor = new String(rRedln.GetAuthorString());
if (!aStrings.Insert(pAuthor))
delete pAuthor;
- for (USHORT nStack = 1; nStack < rRedln.GetStackCount(); nStack++)
+ for (sal_uInt16 nStack = 1; nStack < rRedln.GetStackCount(); nStack++)
{
pAuthor = new String(rRedln.GetAuthorString(nStack));
if (!aStrings.Insert(pAuthor))
@@ -340,13 +339,13 @@ void SwRedlineAcceptDlg::InitAuthors()
if (pFilterPage->SelectAuthor(sOldAuthor) == LISTBOX_ENTRY_NOTFOUND && aStrings.Count())
pFilterPage->SelectAuthor(*aStrings[0]);
- BOOL bEnable = pTable->GetEntryCount() != 0 && !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength();
- BOOL bSel = pTable->FirstSelected() != 0;
+ sal_Bool bEnable = pTable->GetEntryCount() != 0 && !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength();
+ sal_Bool bSel = pTable->FirstSelected() != 0;
SvLBoxEntry* pSelEntry = pTable->FirstSelected();
while (pSelEntry)
{
- USHORT nPos = GetRedlinePos(*pSelEntry);
+ sal_uInt16 nPos = GetRedlinePos(*pSelEntry);
const SwRedline& rRedln = pSh->GetRedline( nPos );
bIsNotFormated |= nsRedlineType_t::REDLINE_FORMAT != rRedln.GetType();
@@ -361,7 +360,7 @@ void SwRedlineAcceptDlg::InitAuthors()
}
String SwRedlineAcceptDlg::GetRedlineText( const SwRedline& rRedln,
- DateTime &rDateTime, USHORT nStack)
+ DateTime &rDateTime, sal_uInt16 nStack)
{
String sEntry(GetActionText(rRedln, nStack));
sEntry += '\t';
@@ -379,7 +378,7 @@ String SwRedlineAcceptDlg::GetRedlineText( const SwRedline& rRedln,
return sEntry;
}
-const String &SwRedlineAcceptDlg::GetActionText(const SwRedline& rRedln, USHORT nStack)
+const String &SwRedlineAcceptDlg::GetActionText(const SwRedline& rRedln, sal_uInt16 nStack)
{
switch( rRedln.GetType(nStack) )
{
@@ -416,20 +415,20 @@ void SwRedlineAcceptDlg::Activate()
return;
SwView *pView = ::GetActiveView();
- SwWait aWait( *pView->GetDocShell(), FALSE );
+ SwWait aWait( *pView->GetDocShell(), sal_False );
- aUsedSeqNo.Remove((USHORT)0, aUsedSeqNo.Count());
+ aUsedSeqNo.Remove((sal_uInt16)0, aUsedSeqNo.Count());
if (!pView) // Kann passieren, wenn man auf eine andere App umschaltet, wenn
return; // vorher eine Listbox im Dialog den Focus hatte (eigentlich THs Bug)
// Hat sich was geaendert?
SwWrtShell* pSh = pView->GetWrtShellPtr();
- USHORT nCount = pSh->GetRedlineCount();
+ sal_uInt16 nCount = pSh->GetRedlineCount();
// Anzahl und Pointer ueberpruefen
SwRedlineDataParent *pParent = 0;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < nCount; i++)
{
@@ -446,7 +445,7 @@ void SwRedlineAcceptDlg::Activate()
if (&rRedln.GetRedlineData() != pParent->pData)
{
// Redline-Parents wurden eingefuegt, geaendert oder geloescht
- if ((i = CalcDiff(i, FALSE)) == USHRT_MAX)
+ if ((i = CalcDiff(i, sal_False)) == USHRT_MAX)
return;
continue;
}
@@ -457,7 +456,7 @@ void SwRedlineAcceptDlg::Activate()
if (!pRedlineData && pBackupData)
{
// Redline-Childs wurden geloescht
- if ((i = CalcDiff(i, TRUE)) == USHRT_MAX)
+ if ((i = CalcDiff(i, sal_True)) == USHRT_MAX)
return;
continue;
}
@@ -468,7 +467,7 @@ void SwRedlineAcceptDlg::Activate()
if (pRedlineData != pBackupData->pChild)
{
// Redline-Childs wurden eingefuegt, geaendert oder geloescht
- if ((i = CalcDiff(i, TRUE)) == USHRT_MAX)
+ if ((i = CalcDiff(i, sal_True)) == USHRT_MAX)
return;
continue;
}
@@ -508,7 +507,7 @@ void SwRedlineAcceptDlg::Activate()
InitAuthors();
}
-USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild)
+sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, sal_Bool bChild)
{
if (!nStart)
{
@@ -516,10 +515,10 @@ USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild)
return USHRT_MAX;
}
- pTable->SetUpdateMode(FALSE);
+ pTable->SetUpdateMode(sal_False);
SwView *pView = ::GetActiveView();
SwWrtShell* pSh = pView->GetWrtShellPtr();
- USHORT nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0;
+ sal_uInt16 nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0;
SwRedlineDataParent *pParent = aRedlineParents[nStart];
const SwRedline& rRedln = pSh->GetRedline(nStart);
@@ -543,26 +542,26 @@ USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild)
// Neue Childs einfuegen
InsertChilds(pParent, rRedln, nAutoFmt);
- pTable->SetUpdateMode(TRUE);
+ pTable->SetUpdateMode(sal_True);
return nStart;
}
// Wurden Eintraege geloescht?
const SwRedlineData *pRedlineData = &rRedln.GetRedlineData();
- USHORT i;
+ sal_uInt16 i;
for ( i = nStart + 1; i < aRedlineParents.Count(); i++)
{
if (aRedlineParents[i]->pData == pRedlineData)
{
// Eintraege von nStart bis i-1 entfernen
RemoveParents(nStart, i - 1);
- pTable->SetUpdateMode(TRUE);
+ pTable->SetUpdateMode(sal_True);
return nStart - 1;
}
}
// Wurden Eintraege eingefuegt?
- USHORT nCount = pSh->GetRedlineCount();
+ sal_uInt16 nCount = pSh->GetRedlineCount();
pRedlineData = aRedlineParents[nStart]->pData;
for (i = nStart + 1; i < nCount; i++)
@@ -571,29 +570,29 @@ USHORT SwRedlineAcceptDlg::CalcDiff(USHORT nStart, BOOL bChild)
{
// Eintraege von nStart bis i-1 einfuegen
InsertParents(nStart, i - 1);
- pTable->SetUpdateMode(TRUE);
+ pTable->SetUpdateMode(sal_True);
return nStart - 1;
}
}
- pTable->SetUpdateMode(TRUE);
+ pTable->SetUpdateMode(sal_True);
Init(nStart); // Alle Eintraege bis zum Ende abgleichen
return USHRT_MAX;
}
-void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedline& rRedln, const USHORT nAutoFmt)
+void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedline& rRedln, const sal_uInt16 nAutoFmt)
{
String sChild;
SwRedlineDataChild *pLastRedlineChild = 0;
const SwRedlineData *pRedlineData = &rRedln.GetRedlineData();
- BOOL bAutoFmt = (rRedln.GetRealType() & nAutoFmt) != 0;
+ sal_Bool bAutoFmt = (rRedln.GetRealType() & nAutoFmt) != 0;
const String *pAction = &GetActionText(rRedln);
- BOOL bValidParent = !sFilterAction.Len() || sFilterAction == *pAction;
+ sal_Bool bValidParent = !sFilterAction.Len() || sFilterAction == *pAction;
bValidParent = bValidParent && pTable->IsValidEntry(&rRedln.GetAuthorString(), &rRedln.GetTimeStamp(), &rRedln.GetComment());
if (nAutoFmt)
{
- USHORT nPos;
+ sal_uInt16 nPos;
if (pParent->pData->GetSeqNo() && !aUsedSeqNo.Insert(pParent, nPos)) // Gibts schon
{
@@ -607,9 +606,9 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl
}
bValidParent = bValidParent && bAutoFmt;
}
- BOOL bValidTree = bValidParent;
+ sal_Bool bValidTree = bValidParent;
- for (USHORT nStack = 1; nStack < rRedln.GetStackCount(); nStack++)
+ for (sal_uInt16 nStack = 1; nStack < rRedln.GetStackCount(); nStack++)
{
pRedlineData = pRedlineData->Next();
@@ -623,7 +622,7 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl
pParent->pNext = pRedlineChild;
pAction = &GetActionText(rRedln, nStack);
- BOOL bValidChild = !sFilterAction.Len() || sFilterAction == *pAction;
+ sal_Bool bValidChild = !sFilterAction.Len() || sFilterAction == *pAction;
bValidChild = bValidChild && pTable->IsValidEntry(&rRedln.GetAuthorString(nStack), &rRedln.GetTimeStamp(nStack), &rRedln.GetComment());
if (nAutoFmt)
bValidChild = bValidChild && bAutoFmt;
@@ -633,7 +632,7 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl
{
RedlinData *pData = new RedlinData;
pData->pData = pRedlineChild;
- pData->bDisabled = TRUE;
+ pData->bDisabled = sal_True;
sChild = GetRedlineText(rRedln, pData->aDateTime, nStack);
SvLBoxEntry* pChild = pTable->InsertEntry(sChild, pData, pParent->pTLBParent);
@@ -660,22 +659,22 @@ void SwRedlineAcceptDlg::InsertChilds(SwRedlineDataParent *pParent, const SwRedl
}
}
-void SwRedlineAcceptDlg::RemoveParents(USHORT nStart, USHORT nEnd)
+void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd)
{
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
- USHORT nCount = pSh->GetRedlineCount();
+ sal_uInt16 nCount = pSh->GetRedlineCount();
SvLBoxEntryArr aLBoxArr;
// Wegen Bug der TLB, die bei Remove den SelectHandler IMMER ruft:
pTable->SetSelectHdl(aOldSelectHdl);
pTable->SetDeselectHdl(aOldDeselectHdl);
- BOOL bChildsRemoved = FALSE;
- pTable->SelectAll(FALSE);
+ sal_Bool bChildsRemoved = sal_False;
+ pTable->SelectAll(sal_False);
// Hinter dem letzten Eintrag Cursor setzen, da sonst Performance-Problem in TLB.
// TLB wuerde sonst bei jedem Remove den Cursor erneut umsetzen (teuer)
- USHORT nPos = Min((USHORT)nCount, (USHORT)aRedlineParents.Count());
+ sal_uInt16 nPos = Min((sal_uInt16)nCount, (sal_uInt16)aRedlineParents.Count());
SvLBoxEntry *pCurEntry = NULL;
while( ( pCurEntry == NULL ) && ( nPos > 0 ) )
{
@@ -688,16 +687,16 @@ void SwRedlineAcceptDlg::RemoveParents(USHORT nStart, USHORT nEnd)
SvLBoxTreeList* pModel = pTable->GetModel();
- for (USHORT i = nStart; i <= nEnd; i++)
+ for (sal_uInt16 i = nStart; i <= nEnd; i++)
{
if (!bChildsRemoved && aRedlineParents[i]->pNext)
{
SwRedlineDataChildPtr pChildPtr = (SwRedlineDataChildPtr)aRedlineParents[i]->pNext;
- USHORT nChildPos = aRedlineChilds.GetPos(pChildPtr);
+ sal_uInt16 nChildPos = aRedlineChilds.GetPos(pChildPtr);
if (nChildPos != USHRT_MAX)
{
- USHORT nChilds = 0;
+ sal_uInt16 nChilds = 0;
while (pChildPtr)
{
@@ -706,43 +705,43 @@ void SwRedlineAcceptDlg::RemoveParents(USHORT nStart, USHORT nEnd)
}
aRedlineChilds.DeleteAndDestroy(nChildPos, nChilds);
- bChildsRemoved = TRUE;
+ bChildsRemoved = sal_True;
}
}
SvLBoxEntry *pEntry = aRedlineParents[i]->pTLBParent;
if (pEntry)
{
long nIdx = aLBoxArr.Count() - 1L;
- ULONG nAbsPos = pModel->GetAbsPos(pEntry);
+ sal_uLong nAbsPos = pModel->GetAbsPos(pEntry);
while (nIdx >= 0 &&
- pModel->GetAbsPos(aLBoxArr[ static_cast< USHORT >(nIdx) ]) > nAbsPos)
+ pModel->GetAbsPos(aLBoxArr[ static_cast< sal_uInt16 >(nIdx) ]) > nAbsPos)
nIdx--;
- aLBoxArr.Insert( pEntry, static_cast< USHORT >(++nIdx) );
+ aLBoxArr.Insert( pEntry, static_cast< sal_uInt16 >(++nIdx) );
}
}
// TLB von hinten abraeumen
long nIdx = (long)aLBoxArr.Count() - 1L;
while (nIdx >= 0)
- pTable->RemoveEntry(aLBoxArr[ static_cast< USHORT >(nIdx--) ]);
+ pTable->RemoveEntry(aLBoxArr[ static_cast< sal_uInt16 >(nIdx--) ]);
pTable->SetSelectHdl(LINK(this, SwRedlineAcceptDlg, SelectHdl));
pTable->SetDeselectHdl(LINK(this, SwRedlineAcceptDlg, DeselectHdl));
// Durch Remove wurde leider wieder dauernd von der TLB selektiert...
- pTable->SelectAll(FALSE);
+ pTable->SelectAll(sal_False);
aRedlineParents.DeleteAndDestroy( nStart, nEnd - nStart + 1);
}
-void SwRedlineAcceptDlg::InsertParents(USHORT nStart, USHORT nEnd)
+void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd)
{
SwView *pView = ::GetActiveView();
SwWrtShell* pSh = pView->GetWrtShellPtr();
- USHORT nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0;
+ sal_uInt16 nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0;
String sParent;
- USHORT nCount = pSh->GetRedlineCount();
- nEnd = Min((USHORT)nEnd, (USHORT)(nCount - 1)); // Handelt auch nEnd=USHRT_MAX (bis zum Ende) ab
+ sal_uInt16 nCount = pSh->GetRedlineCount();
+ nEnd = Min((sal_uInt16)nEnd, (sal_uInt16)(nCount - 1)); // Handelt auch nEnd=USHRT_MAX (bis zum Ende) ab
if (nEnd == USHRT_MAX)
return; // Keine Redlines im Dokument
@@ -759,13 +758,13 @@ void SwRedlineAcceptDlg::InsertParents(USHORT nStart, USHORT nEnd)
pSh->SwCrsrShell::Push();
if( 0 == (pCurrRedline = pSh->SelNextRedline()))
pCurrRedline = pSh->SelPrevRedline();
- pSh->SwCrsrShell::Pop( FALSE );
+ pSh->SwCrsrShell::Pop( sal_False );
}
}
else
pCurrRedline = 0;
- for (USHORT i = nStart; i <= nEnd; i++)
+ for (sal_uInt16 i = nStart; i <= nEnd; i++)
{
const SwRedline& rRedln = pSh->GetRedline(i);
const SwRedlineData *pRedlineData = &rRedln.GetRedlineData();
@@ -780,7 +779,7 @@ void SwRedlineAcceptDlg::InsertParents(USHORT nStart, USHORT nEnd)
pData = new RedlinData;
pData->pData = pRedlineParent;
- pData->bDisabled = FALSE;
+ pData->bDisabled = sal_False;
sParent = GetRedlineText(rRedln, pData->aDateTime);
pParent = pTable->InsertEntry(sParent, pData, 0, i);
@@ -797,11 +796,11 @@ void SwRedlineAcceptDlg::InsertParents(USHORT nStart, USHORT nEnd)
}
}
-void SwRedlineAcceptDlg::CallAcceptReject( BOOL bSelect, BOOL bAccept )
+void SwRedlineAcceptDlg::CallAcceptReject( sal_Bool bSelect, sal_Bool bAccept )
{
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
SvLBoxEntry* pEntry = bSelect ? pTable->FirstSelected() : pTable->First();
- ULONG nPos = LONG_MAX;
+ sal_uLong nPos = LONG_MAX;
typedef std::vector<SvLBoxEntry*> ListBoxEntries_t;
ListBoxEntries_t aRedlines;
@@ -828,11 +827,11 @@ void SwRedlineAcceptDlg::CallAcceptReject( BOOL bSelect, BOOL bAccept )
pEntry = bSelect ? pTable->NextSelected(pEntry) : pTable->Next(pEntry);
}
- BOOL (SwEditShell:: *FnAccRej)( USHORT ) = &SwEditShell::AcceptRedline;
+ sal_Bool (SwEditShell:: *FnAccRej)( sal_uInt16 ) = &SwEditShell::AcceptRedline;
if( !bAccept )
FnAccRej = &SwEditShell::RejectRedline;
- SwWait aWait( *pSh->GetView().GetDocShell(), TRUE );
+ SwWait aWait( *pSh->GetView().GetDocShell(), sal_True );
pSh->StartAction();
// #111827#
@@ -863,14 +862,16 @@ void SwRedlineAcceptDlg::CallAcceptReject( BOOL bSelect, BOOL bAccept )
aIter != aEnd;
++aIter )
{
- USHORT nPosition = GetRedlinePos( **aIter );
+ sal_uInt16 nPosition = GetRedlinePos( **aIter );
if( nPosition != USHRT_MAX )
(pSh->*FnAccRej)( nPosition );
}
// #111827#
if (aRedlines.size() > 1)
- pSh->EndUndo(bAccept? UNDO_ACCEPT_REDLINE : UNDO_REJECT_REDLINE);
+ {
+ pSh->EndUndo();
+ }
pSh->EndAction();
@@ -894,7 +895,7 @@ void SwRedlineAcceptDlg::CallAcceptReject( BOOL bSelect, BOOL bAccept )
pTPView->EnableUndo();
}
-USHORT SwRedlineAcceptDlg::GetRedlinePos( const SvLBoxEntry& rEntry ) const
+sal_uInt16 SwRedlineAcceptDlg::GetRedlinePos( const SvLBoxEntry& rEntry ) const
{
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
return pSh->FindRedlineOfData( *((SwRedlineDataParent*)((RedlinData *)
@@ -903,25 +904,25 @@ USHORT SwRedlineAcceptDlg::GetRedlinePos( const SvLBoxEntry& rEntry ) const
IMPL_LINK( SwRedlineAcceptDlg, AcceptHdl, void*, EMPTYARG)
{
- CallAcceptReject( TRUE, TRUE );
+ CallAcceptReject( sal_True, sal_True );
return 0;
}
IMPL_LINK( SwRedlineAcceptDlg, AcceptAllHdl, void*, EMPTYARG )
{
- CallAcceptReject( FALSE, TRUE );
+ CallAcceptReject( sal_False, sal_True );
return 0;
}
IMPL_LINK( SwRedlineAcceptDlg, RejectHdl, void*, EMPTYARG )
{
- CallAcceptReject( TRUE, FALSE );
+ CallAcceptReject( sal_True, sal_False );
return 0;
}
IMPL_LINK( SwRedlineAcceptDlg, RejectAllHdl, void*, EMPTYARG )
{
- CallAcceptReject( FALSE, FALSE );
+ CallAcceptReject( sal_False, sal_False );
return 0;
}
@@ -972,8 +973,8 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG )
SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
aSelectTimer.Stop();
- BOOL bIsNotFormated = FALSE;
- BOOL bSel = FALSE;
+ sal_Bool bIsNotFormated = sal_False;
+ sal_Bool bSel = sal_False;
//#98883# don't select redlines while the dialog is not focussed
//#107938# But not only ask pTable if it has the focus. To move
@@ -1004,17 +1005,17 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG )
}
}
else
- bSel = TRUE;
+ bSel = sal_True;
// #98864# find the selected redline (ignore, if the redline is already gone)
- USHORT nPos = GetRedlinePos(*pActEntry);
+ sal_uInt16 nPos = GetRedlinePos(*pActEntry);
if( nPos != USHRT_MAX )
{
const SwRedline& rRedln = pSh->GetRedline( nPos );
bIsNotFormated |= nsRedlineType_t::REDLINE_FORMAT != rRedln.GetType();
- if (pSh->GotoRedline(nPos, TRUE))
+ if (pSh->GotoRedline(nPos, sal_True))
{
pSh->SetInSelect();
pSh->EnterAddMode();
@@ -1028,7 +1029,7 @@ IMPL_LINK( SwRedlineAcceptDlg, GotoHdl, void*, EMPTYARG )
pSh->EndAction();
pSh->SetCareWin(NULL);
}
- BOOL bEnable = !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength();
+ sal_Bool bEnable = !pSh->getIDocumentRedlineAccess()->GetRedlinePassword().getLength();
pTPView->EnableAccept( bEnable && bSel /*&& !bReadonlySel*/ );
pTPView->EnableReject( bEnable && bSel && bIsNotFormated /*&& !bReadonlySel*/ );
pTPView->EnableRejectAll( bEnable && !bOnlyFormatedRedlines && !bHasReadonlySel );
@@ -1055,10 +1056,10 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
if (pTable->GetParent(pEntry))
pTopEntry = pTable->GetParent(pEntry);
- USHORT nPos = GetRedlinePos(*pTopEntry);
+ sal_uInt16 nPos = GetRedlinePos(*pTopEntry);
// Bei geschuetzten Bereichen kommentieren disablen
- if ((pRed = pSh->GotoRedline(nPos, TRUE)) != 0)
+ if ((pRed = pSh->GotoRedline(nPos, sal_True)) != 0)
{
if( pSh->IsCrsrPtAtEnd() )
pSh->SwapPam();
@@ -1074,20 +1075,20 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
);
aPopup.EnableItem( MN_SUB_SORT, pTable->First() != 0 );
- USHORT nColumn = pTable->GetSortedCol();
+ sal_uInt16 nColumn = pTable->GetSortedCol();
if (nColumn == 0xffff)
nColumn = 4;
PopupMenu *pSubMenu = aPopup.GetPopupMenu(MN_SUB_SORT);
if (pSubMenu)
{
- for (USHORT i = MN_SORT_ACTION; i < MN_SORT_ACTION + 5; i++)
- pSubMenu->CheckItem(i, FALSE);
+ for (sal_uInt16 i = MN_SORT_ACTION; i < MN_SORT_ACTION + 5; i++)
+ pSubMenu->CheckItem(i, sal_False);
pSubMenu->CheckItem(nColumn + MN_SORT_ACTION);
}
- USHORT nRet = aPopup.Execute(pTable, aCEvt.GetMousePosPixel());
+ sal_uInt16 nRet = aPopup.Execute(pTable, aCEvt.GetMousePosPixel());
switch( nRet )
{
@@ -1099,7 +1100,7 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
if (pTable->GetParent(pEntry))
pEntry = pTable->GetParent(pEntry);
- USHORT nPos = GetRedlinePos(*pEntry);
+ sal_uInt16 nPos = GetRedlinePos(*pEntry);
const SwRedline &rRedline = pSh->GetRedline(nPos);
@@ -1124,12 +1125,12 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
rRedline.GetRedlineData().GetTimeStamp() ),
SID_ATTR_POSTIT_DATE ));
- AbstractSvxPostItDialog* pDlg = pFact->CreateSvxPostItDialog( pParentDlg, aSet, FALSE );
+ AbstractSvxPostItDialog* pDlg = pFact->CreateSvxPostItDialog( pParentDlg, aSet, sal_False );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->HideAuthor();
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
switch( rRedline.GetType() )
{
case nsRedlineType_t::REDLINE_INSERT:
@@ -1177,7 +1178,7 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
case MN_SORT_COMMENT:
case MN_SORT_POSITION:
{
- bSortDir = TRUE;
+ bSortDir = sal_True;
if (nRet - MN_SORT_ACTION == 4 && pTable->GetSortedCol() == 0xffff)
break; // Haben wir schon
@@ -1188,7 +1189,7 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHdl, void*, EMPTYARG )
if (pTable->GetSortedCol() == nSortMode)
bSortDir = !pTable->GetSortDirection();
- SwWait aWait( *::GetActiveView()->GetDocShell(), FALSE );
+ SwWait aWait( *::GetActiveView()->GetDocShell(), sal_False );
pTable->SortByCol(nSortMode, bSortDir);
if (nSortMode == 0xffff)
Init(); // Alles neu fuellen
@@ -1206,16 +1207,16 @@ void SwRedlineAcceptDlg::Initialize(const String& rExtraData)
{
if (rExtraData.Len())
{
- USHORT nPos = rExtraData.Search(C2S("AcceptChgDat:"));
+ sal_uInt16 nPos = rExtraData.Search(C2S("AcceptChgDat:"));
// Versuche, den Alignment-String "ALIGN:(...)" einzulesen; wenn
// er nicht vorhanden ist, liegt eine "altere Version vor
if (nPos != STRING_NOTFOUND)
{
- USHORT n1 = rExtraData.Search('(', nPos);
+ sal_uInt16 n1 = rExtraData.Search('(', nPos);
if (n1 != STRING_NOTFOUND)
{
- USHORT n2 = rExtraData.Search(')', n1);
+ sal_uInt16 n2 = rExtraData.Search(')', n1);
if (n2 != STRING_NOTFOUND)
{
// Alignment-String herausschneiden
@@ -1224,11 +1225,11 @@ void SwRedlineAcceptDlg::Initialize(const String& rExtraData)
if (aStr.Len())
{
- USHORT nCount = static_cast< USHORT >(aStr.ToInt32());
+ sal_uInt16 nCount = static_cast< sal_uInt16 >(aStr.ToInt32());
- for (USHORT i = 0; i < nCount; i++)
+ for (sal_uInt16 i = 0; i < nCount; i++)
{
- USHORT n3 = aStr.Search(';');
+ sal_uInt16 n3 = aStr.Search(';');
aStr.Erase(0, n3 + 1);
pTable->SetTab(i, aStr.ToInt32(), MAP_PIXEL);
}
@@ -1243,11 +1244,11 @@ void SwRedlineAcceptDlg::FillInfo(String &rExtraData) const
{
rExtraData.AppendAscii("AcceptChgDat:(");
- USHORT nCount = pTable->TabCount();
+ sal_uInt16 nCount = pTable->TabCount();
rExtraData += String::CreateFromInt32(nCount);
rExtraData += ';';
- for(USHORT i = 0; i < nCount; i++)
+ for(sal_uInt16 i = 0; i < nCount; i++)
{
rExtraData += String::CreateFromInt32( pTable->GetTab(i) );
rExtraData += ';';
diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx
index cce1afa34754..ad6fc7830e57 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -59,25 +59,25 @@
SV_IMPL_PTRARR( _FndBoxes, _FndBox* )
SV_IMPL_PTRARR( _FndLines, _FndLine* )
-static BOOL bCheck1 = TRUE;
-static BOOL bCheck2 = FALSE;
-static BOOL bCheck3 = FALSE;
+static sal_Bool bCheck1 = sal_True;
+static sal_Bool bCheck2 = sal_False;
+static sal_Bool bCheck3 = sal_False;
-static USHORT nCol1 = 1;
-static USHORT nCol2 = 1;
-static USHORT nCol3 = 1;
+static sal_uInt16 nCol1 = 1;
+static sal_uInt16 nCol2 = 1;
+static sal_uInt16 nCol3 = 1;
-static USHORT nType1 = 0;
-static USHORT nType2 = 0;
-static USHORT nType3 = 0;
+static sal_uInt16 nType1 = 0;
+static sal_uInt16 nType2 = 0;
+static sal_uInt16 nType3 = 0;
-static USHORT nLang = LANGUAGE_NONE;
+static sal_uInt16 nLang = LANGUAGE_NONE;
-static BOOL bAsc1 = TRUE;
-static BOOL bAsc2 = TRUE;
-static BOOL bAsc3 = TRUE;
-static BOOL bCol = FALSE;
-static BOOL bCsSens= FALSE;
+static sal_Bool bAsc1 = sal_True;
+static sal_Bool bAsc2 = sal_True;
+static sal_Bool bAsc3 = sal_True;
+static sal_Bool bCol = sal_False;
+static sal_Bool bCsSens= sal_False;
static sal_Unicode cDeli = '\t';
@@ -88,7 +88,7 @@ using ::rtl::OUString;
void lcl_ClearLstBoxAndDelUserData( ListBox& rLstBox )
{
void* pDel;
- for( USHORT n = 0, nEnd = rLstBox.GetEntryCount(); n < nEnd; ++n )
+ for( sal_uInt16 n = 0, nEnd = rLstBox.GetEntryCount(); n < nEnd; ++n )
if( 0 != ( pDel = rLstBox.GetEntryData( n )) )
delete (String*)pDel;
rLstBox.Clear();
@@ -98,11 +98,11 @@ void lcl_ClearLstBoxAndDelUserData( ListBox& rLstBox )
Beschreibung: Fuer Tabellenselektion sel. Zeilen und Spalten
feststellen
--------------------------------------------------------------------*/
-BOOL lcl_GetSelTbl( SwWrtShell &rSh, USHORT& rX, USHORT& rY )
+sal_Bool lcl_GetSelTbl( SwWrtShell &rSh, sal_uInt16& rX, sal_uInt16& rY )
{
const SwTableNode* pTblNd = rSh.IsCrsrInTbl();
if( !pTblNd )
- return FALSE;
+ return sal_False;
_FndBox aFndBox( 0, 0 );
@@ -116,10 +116,10 @@ BOOL lcl_GetSelTbl( SwWrtShell &rSh, USHORT& rX, USHORT& rY )
}
rX = aFndBox.GetLines().Count();
if( !rX )
- return FALSE;
+ return sal_False;
rY = aFndBox.GetLines()[0]->GetBoxes().Count();
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -128,11 +128,12 @@ BOOL lcl_GetSelTbl( SwWrtShell &rSh, USHORT& rX, USHORT& rY )
SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
SvxStandardDialog(pParent, SW_RES(DLG_SORTING)),
+
aColLbl(this, SW_RES(FT_COL )),
aTypLbl(this, SW_RES(FT_KEYTYP)),
aDirLbl(this, SW_RES(FT_DIR )),
+ aSortFL(this, SW_RES(FL_SORT_2 )),
- aDirFL(this, SW_RES(FL_DIR )),
aKeyCB1(this, SW_RES(CB_KEY1 )),
aColEdt1(this, SW_RES(ED_KEY1 )),
@@ -151,8 +152,8 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
aTypDLB3(this, SW_RES(DLB_KEY3 )),
aSortUp3RB(this, SW_RES(RB_UP3 )),
aSortDn3RB(this, SW_RES(RB_DN3 )),
+ aDirFL(this, SW_RES(FL_DIR )),
- aSortFL(this, SW_RES(FL_SORT_2 )),
aColumnRB(this, SW_RES(RB_COL )),
aRowRB(this, SW_RES(RB_ROW )),
@@ -180,6 +181,19 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
nX( 99 ),
nY( 99 )
{
+ aColEdt1.SetAccessibleName(aColLbl.GetText());
+ aColEdt2.SetAccessibleName(aColLbl.GetText());
+ aColEdt3.SetAccessibleName(aColLbl.GetText());
+ aTypDLB1.SetAccessibleName(aTypLbl.GetText());
+ aTypDLB2.SetAccessibleName(aTypLbl.GetText());
+ aTypDLB3.SetAccessibleName(aTypLbl.GetText());
+ aSortUpRB.SetAccessibleRelationMemberOf( &aKeyCB1 );
+ aSortDnRB.SetAccessibleRelationMemberOf( &aKeyCB1 );
+ aSortUp2RB.SetAccessibleRelationMemberOf( &aKeyCB2 );
+ aSortDn2RB.SetAccessibleRelationMemberOf( &aKeyCB2 );
+ aSortUp3RB.SetAccessibleRelationMemberOf( &aKeyCB3 );
+ aSortDn3RB.SetAccessibleRelationMemberOf( &aKeyCB3 );
+
aDelimEdt.SetMaxTextLen( 1 );
if(rSh.GetSelectionType() &
(nsSelectionType::SEL_TBL|nsSelectionType::SEL_TBL_CELLS) )
@@ -187,14 +201,14 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
aColumnRB.Check(bCol);
aColLbl.SetText(bCol ? aRowTxt : aColTxt);
aRowRB.Check(!bCol);
- aDelimTabRB.Enable(FALSE);
- aDelimFreeRB.Enable(FALSE);
- aDelimEdt.Enable(FALSE);
+ aDelimTabRB.Enable(sal_False);
+ aDelimFreeRB.Enable(sal_False);
+ aDelimEdt.Enable(sal_False);
}
else
{
- aColumnRB.Enable(FALSE);
- aRowRB.Check(TRUE);
+ aColumnRB.Enable(sal_False);
+ aRowRB.Check(sal_True);
aColLbl.SetText(aColTxt);
}
@@ -222,9 +236,9 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
// first initialise the language, then select the
if( LANGUAGE_NONE == nLang || LANGUAGE_DONTKNOW == nLang )
- nLang = (USHORT)GetAppLanguage();
+ nLang = (sal_uInt16)GetAppLanguage();
- aLangLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, TRUE, FALSE);
+ aLangLB.SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, sal_True, sal_False);
aLangLB.SelectLanguage( nLang );
LanguageHdl( 0 );
@@ -243,7 +257,7 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
if(!aDelimTabRB.IsChecked())
{
aDelimEdt.SetText(cDeli);
- aDelimFreeRB.Check(TRUE);
+ aDelimFreeRB.Check(sal_True);
DelimHdl(&aDelimFreeRB);
}
else
@@ -252,11 +266,30 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) :
FreeResource();
if( ::lcl_GetSelTbl( rSh, nX, nY) )
{
- USHORT nMax = aRowRB.IsChecked()? nY : nX;
+ sal_uInt16 nMax = aRowRB.IsChecked()? nY : nX;
aColEdt1.SetMax(nMax);
aColEdt2.SetMax(nMax);
aColEdt3.SetMax(nMax);
}
+
+ aDelimEdt.SetAccessibleRelationLabeledBy(&aDelimFreeRB);
+ aDelimPB.SetAccessibleRelationLabeledBy(&aDelimFreeRB);
+ aDelimPB.SetAccessibleRelationMemberOf(&aDelimFL);
+
+ aColEdt1.SetAccessibleRelationMemberOf(&aKeyCB1);
+ aColEdt1.SetAccessibleRelationLabeledBy(&aColLbl);
+ aTypDLB1.SetAccessibleRelationMemberOf(&aKeyCB1);
+ aTypDLB1.SetAccessibleRelationLabeledBy(&aTypLbl);
+
+ aColEdt2.SetAccessibleRelationMemberOf(&aKeyCB2);
+ aColEdt2.SetAccessibleRelationLabeledBy(&aColLbl);
+ aTypDLB2.SetAccessibleRelationMemberOf(&aKeyCB2);
+ aTypDLB2.SetAccessibleRelationLabeledBy(&aTypLbl);
+
+ aColEdt3.SetAccessibleRelationMemberOf(&aKeyCB3);
+ aColEdt3.SetAccessibleRelationLabeledBy(&aColLbl);
+ aTypDLB3.SetAccessibleRelationMemberOf(&aKeyCB3);
+ aTypDLB3.SetAccessibleRelationLabeledBy(&aTypLbl);
}
SwSortDlg::~SwSortDlg()
@@ -290,9 +323,9 @@ void SwSortDlg::Apply()
bCheck2 = aKeyCB2.IsChecked();
bCheck3 = aKeyCB3.IsChecked();
- nCol1 = (USHORT)aColEdt1.GetValue();
- nCol2 = (USHORT)aColEdt2.GetValue();
- nCol3 = (USHORT)aColEdt3.GetValue();
+ nCol1 = (sal_uInt16)aColEdt1.GetValue();
+ nCol2 = (sal_uInt16)aColEdt2.GetValue();
+ nCol3 = (sal_uInt16)aColEdt3.GetValue();
nType1 = aTypDLB1.GetSelectEntryPos();
nType2 = aTypDLB2.GetSelectEntryPos();
@@ -356,9 +389,9 @@ void SwSortDlg::Apply()
aOptions.bTable = rSh.IsTableMode();
aOptions.bIgnoreCase = !bCsSens;
- BOOL bRet;
+ sal_Bool bRet;
{
- SwWait aWait( *rSh.GetView().GetDocShell(), TRUE );
+ SwWait aWait( *rSh.GetView().GetDocShell(), sal_True );
rSh.StartAllAction();
if( 0 != (bRet = rSh.Sort( aOptions )))
rSh.SetModified();
@@ -371,7 +404,7 @@ void SwSortDlg::Apply()
IMPL_LINK( SwSortDlg, DelimHdl, RadioButton*, pButton )
{
- BOOL bEnable = pButton == &aDelimFreeRB && aDelimFreeRB.IsEnabled();
+ sal_Bool bEnable = pButton == &aDelimFreeRB && aDelimFreeRB.IsEnabled();
aDelimEdt.Enable( bEnable );
aDelimPB.Enable( bEnable );
return 0;
@@ -388,7 +421,7 @@ IMPL_LINK( SwSortDlg, DelimCharHdl, PushButton*, EMPTYARG )
rSh.GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
if( RET_OK == pMap->Execute() )
{
- SFX_ITEMSET_ARG( pMap->GetOutputItemSet(), pItem, SfxInt32Item, SID_ATTR_CHAR, FALSE );
+ SFX_ITEMSET_ARG( pMap->GetOutputItemSet(), pItem, SfxInt32Item, SID_ATTR_CHAR, sal_False );
if ( pItem )
aDelimEdt.SetText( sal_Unicode ( pItem->GetValue() ) );
}
@@ -407,6 +440,9 @@ IMPL_LINK( SwSortDlg, CheckHdl, CheckBox *, pCheck )
aColEdt2.SetMax(nY);
aColEdt3.SetMax(nY);
+ aColEdt1.SetAccessibleName(aColTxt);
+ aColEdt2.SetAccessibleName(aColTxt);
+ aColEdt3.SetAccessibleName(aColTxt);
}
else if( pCheck == ( CheckBox* ) &aColumnRB)
{
@@ -414,11 +450,15 @@ IMPL_LINK( SwSortDlg, CheckHdl, CheckBox *, pCheck )
aColEdt1.SetMax(nX);
aColEdt2.SetMax(nX);
aColEdt3.SetMax(nX);
+
+ aColEdt1.SetAccessibleName(aRowTxt);
+ aColEdt2.SetAccessibleName(aRowTxt);
+ aColEdt3.SetAccessibleName(aRowTxt);
}
else if(!aKeyCB1.IsChecked() &&
!aKeyCB2.IsChecked() &&
!aKeyCB3.IsChecked())
- pCheck->Check(TRUE);
+ pCheck->Check(sal_True);
return 0;
}
@@ -431,11 +471,11 @@ IMPL_LINK( SwSortDlg, LanguageHdl, ListBox*, pLBox )
if( !pColRes )
pColRes = new CollatorRessource();
- const USHORT nLstBoxCnt = 3;
+ const sal_uInt16 nLstBoxCnt = 3;
ListBox* aLstArr[ nLstBoxCnt ] = { &aTypDLB1, &aTypDLB2, &aTypDLB3 };
- USHORT* aTypeArr[ nLstBoxCnt ] = { &nType1, &nType2, &nType3 };
+ sal_uInt16* aTypeArr[ nLstBoxCnt ] = { &nType1, &nType2, &nType3 };
String aOldStrArr[ nLstBoxCnt ];
- USHORT n;
+ sal_uInt16 n;
void* pUserData;
for( n = 0; n < nLstBoxCnt; ++n )
@@ -446,7 +486,7 @@ IMPL_LINK( SwSortDlg, LanguageHdl, ListBox*, pLBox )
::lcl_ClearLstBoxAndDelUserData( *pL );
}
- USHORT nInsPos;
+ sal_uInt16 nInsPos;
String sAlg, sUINm;
for( long nCnt = 0, nEnd = aSeq.getLength(); nCnt <= nEnd; ++nCnt )
{
diff --git a/sw/source/ui/misc/srtdlg.src b/sw/source/ui/misc/srtdlg.src
index fed5f32e87be..90ce866a3b20 100644
--- a/sw/source/ui/misc/srtdlg.src
+++ b/sw/source/ui/misc/srtdlg.src
@@ -32,7 +32,7 @@
ModalDialog DLG_SORTING
{
- HelpID = FN_SORTING_DLG ;
+ HelpID = CMD_FN_SORTING_DLG ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 268 , 193 ) ;
@@ -79,6 +79,7 @@ ModalDialog DLG_SORTING
};
CheckBox CB_KEY1
{
+ HelpID = "sw:CheckBox:DLG_SORTING:CB_KEY1";
Pos = MAP_APPFONT ( 12 , 25 ) ;
Size = MAP_APPFONT ( 49 , 8 ) ;
Text [ en-US ] = "Key ~1" ;
@@ -86,6 +87,7 @@ ModalDialog DLG_SORTING
};
NumericField ED_KEY1
{
+ HelpID = "sw:NumericField:DLG_SORTING:ED_KEY1";
Border = TRUE ;
Pos = MAP_APPFONT ( 66 , 23 ) ;
Size = MAP_APPFONT ( 25 , 12 ) ;
@@ -107,6 +109,7 @@ ModalDialog DLG_SORTING
};
ListBox DLB_KEY1
{
+ HelpID = "sw:ListBox:DLG_SORTING:DLB_KEY1";
Pos = MAP_APPFONT ( 96 , 23 ) ;
Size = MAP_APPFONT ( 55 , 45 ) ;
TabStop = TRUE ;
@@ -116,6 +119,7 @@ ModalDialog DLG_SORTING
};
RadioButton RB_UP
{
+ HelpID = "sw:RadioButton:DLG_SORTING:RB_UP";
Pos = MAP_APPFONT ( 155 , 23 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Text [ en-US ] = "~Ascending" ;
@@ -124,6 +128,7 @@ ModalDialog DLG_SORTING
};
RadioButton RB_DN
{
+ HelpID = "sw:RadioButton:DLG_SORTING:RB_DN";
Pos = MAP_APPFONT ( 155 , 35 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Text [ en-US ] = "~Descending" ;
@@ -131,12 +136,14 @@ ModalDialog DLG_SORTING
};
CheckBox CB_KEY2
{
+ HelpID = "sw:CheckBox:DLG_SORTING:CB_KEY2";
Pos = MAP_APPFONT ( 12 , 52 ) ;
Size = MAP_APPFONT ( 49 , 8 ) ;
Text [ en-US ] = "Key ~2" ;
};
NumericField ED_KEY2
{
+ HelpID = "sw:NumericField:DLG_SORTING:ED_KEY2";
Border = TRUE ;
Pos = MAP_APPFONT ( 66 , 50 ) ;
Size = MAP_APPFONT ( 25 , 12 ) ;
@@ -153,6 +160,7 @@ ModalDialog DLG_SORTING
};
ListBox DLB_KEY2
{
+ HelpID = "sw:ListBox:DLG_SORTING:DLB_KEY2";
Pos = MAP_APPFONT ( 96 , 50 ) ;
Size = MAP_APPFONT ( 55 , 45 ) ;
TabStop = TRUE ;
@@ -162,6 +170,7 @@ ModalDialog DLG_SORTING
};
RadioButton RB_UP2
{
+ HelpID = "sw:RadioButton:DLG_SORTING:RB_UP2";
Pos = MAP_APPFONT ( 155 , 50 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Text [ en-US ] = "Ascending" ;
@@ -170,6 +179,7 @@ ModalDialog DLG_SORTING
};
RadioButton RB_DN2
{
+ HelpID = "sw:RadioButton:DLG_SORTING:RB_DN2";
Pos = MAP_APPFONT ( 155 , 62 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Text [ en-US ] = "Descending" ;
@@ -177,12 +187,14 @@ ModalDialog DLG_SORTING
};
CheckBox CB_KEY3
{
+ HelpID = "sw:CheckBox:DLG_SORTING:CB_KEY3";
Pos = MAP_APPFONT ( 12 , 81 ) ;
Size = MAP_APPFONT ( 49 , 8 ) ;
Text [ en-US ] = "Key ~3" ;
};
NumericField ED_KEY3
{
+ HelpID = "sw:NumericField:DLG_SORTING:ED_KEY3";
Border = TRUE ;
Pos = MAP_APPFONT ( 66 , 79 ) ;
Size = MAP_APPFONT ( 25 , 12 ) ;
@@ -199,6 +211,7 @@ ModalDialog DLG_SORTING
};
ListBox DLB_KEY3
{
+ HelpID = "sw:ListBox:DLG_SORTING:DLB_KEY3";
Pos = MAP_APPFONT ( 96 , 79 ) ;
Size = MAP_APPFONT ( 55 , 45 ) ;
TabStop = TRUE ;
@@ -208,6 +221,7 @@ ModalDialog DLG_SORTING
};
RadioButton RB_UP3
{
+ HelpID = "sw:RadioButton:DLG_SORTING:RB_UP3";
Pos = MAP_APPFONT ( 155 , 79 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Text [ en-US ] = "Ascending" ;
@@ -216,6 +230,7 @@ ModalDialog DLG_SORTING
};
RadioButton RB_DN3
{
+ HelpID = "sw:RadioButton:DLG_SORTING:RB_DN3";
Pos = MAP_APPFONT ( 155 , 91 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Text [ en-US ] = "Descending" ;
@@ -229,6 +244,7 @@ ModalDialog DLG_SORTING
};
RadioButton RB_COL
{
+ HelpID = "sw:RadioButton:DLG_SORTING:RB_COL";
Pos = MAP_APPFONT ( 12 , 120 ) ;
Size = MAP_APPFONT ( 38 , 10 ) ;
Text [ en-US ] = "Col~umns" ;
@@ -236,6 +252,7 @@ ModalDialog DLG_SORTING
};
RadioButton RB_ROW
{
+ HelpID = "sw:RadioButton:DLG_SORTING:RB_ROW";
Pos = MAP_APPFONT ( 12 , 133 ) ;
Size = MAP_APPFONT ( 34 , 10 ) ;
Text [ en-US ] = "~Rows" ;
@@ -250,6 +267,7 @@ ModalDialog DLG_SORTING
};
RadioButton RB_TAB
{
+ HelpID = "sw:RadioButton:DLG_SORTING:RB_TAB";
Pos = MAP_APPFONT ( 113 , 120 ) ;
Size = MAP_APPFONT ( 44 , 9 ) ;
Text [ en-US ] = "~Tabs" ;
@@ -258,6 +276,7 @@ ModalDialog DLG_SORTING
};
RadioButton RB_TABCH
{
+ HelpID = "sw:RadioButton:DLG_SORTING:RB_TABCH";
Pos = MAP_APPFONT ( 113 , 133 ) ;
Size = MAP_APPFONT ( 38 , 10 ) ;
Text [ en-US ] = "~Character" ;
@@ -265,6 +284,7 @@ ModalDialog DLG_SORTING
};
Edit ED_TABCH
{
+ HelpID = "sw:Edit:DLG_SORTING:ED_TABCH";
Border = TRUE ;
Pos = MAP_APPFONT ( 180 , 133 ) ;
Size = MAP_APPFONT ( 12 , 12 ) ;
@@ -287,6 +307,7 @@ ModalDialog DLG_SORTING
};
PushButton PB_DELIM
{
+ HelpID = "sw:PushButton:DLG_SORTING:PB_DELIM";
Pos = MAP_APPFONT ( 195 , 133 ) ;
Size = MAP_APPFONT ( 12 , 12 ) ;
TabStop = TRUE ;
@@ -300,6 +321,7 @@ ModalDialog DLG_SORTING
};
ListBox LB_LANG
{
+ HelpID = "sw:ListBox:DLG_SORTING:LB_LANG";
Pos = MAP_APPFONT ( 12 , 158 ) ;
Size = MAP_APPFONT ( 83 , 61 ) ;
TabStop = TRUE ;
@@ -314,6 +336,7 @@ ModalDialog DLG_SORTING
};
CheckBox CB_CASE
{
+ HelpID = "sw:CheckBox:DLG_SORTING:CB_CASE";
Pos = MAP_APPFONT ( 113 , 159 ) ;
Size = MAP_APPFONT ( 147 , 10 ) ;
TabStop = TRUE ;
diff --git a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
index 3da0d76d1029..0fd7cf7c9f11 100644
--- a/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
+++ b/sw/source/ui/misc/swmodalredlineacceptdlg.cxx
@@ -73,7 +73,7 @@
SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent) :
SfxModalDialog(pParent, SW_RES(DLG_MOD_REDLINE_ACCEPT))
{
- pImplDlg = new SwRedlineAcceptDlg(this, TRUE);
+ pImplDlg = new SwRedlineAcceptDlg(this, sal_True);
pImplDlg->Initialize(GetExtraData());
pImplDlg->Activate(); // Zur Initialisierung der Daten
@@ -83,7 +83,7 @@ SwModalRedlineAcceptDlg::SwModalRedlineAcceptDlg(Window *pParent) :
SwModalRedlineAcceptDlg::~SwModalRedlineAcceptDlg()
{
- AcceptAll(FALSE); // Alles uebriggebliebene ablehnen
+ AcceptAll(sal_False); // Alles uebriggebliebene ablehnen
pImplDlg->FillInfo(GetExtraData());
delete pImplDlg;
@@ -99,21 +99,21 @@ void SwModalRedlineAcceptDlg::Resize()
SfxModalDialog::Resize();
}
-void SwModalRedlineAcceptDlg::AcceptAll( BOOL bAccept )
+void SwModalRedlineAcceptDlg::AcceptAll( sal_Bool bAccept )
{
SvxTPFilter* pFilterTP = pImplDlg->GetChgCtrl()->GetFilterPage();
if (pFilterTP->IsDate() || pFilterTP->IsAuthor() ||
pFilterTP->IsRange() || pFilterTP->IsAction())
{
- pFilterTP->CheckDate(FALSE); // Alle Filter abschalten
- pFilterTP->CheckAuthor(FALSE);
- pFilterTP->CheckRange(FALSE);
- pFilterTP->CheckAction(FALSE);
+ pFilterTP->CheckDate(sal_False); // Alle Filter abschalten
+ pFilterTP->CheckAuthor(sal_False);
+ pFilterTP->CheckRange(sal_False);
+ pFilterTP->CheckAction(sal_False);
pImplDlg->FilterChangedHdl();
}
- pImplDlg->CallAcceptReject( FALSE, bAccept );
+ pImplDlg->CallAcceptReject( sal_False, bAccept );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx
index 46bddfd6591c..f41bc49c9d63 100644
--- a/sw/source/ui/misc/titlepage.cxx
+++ b/sw/source/ui/misc/titlepage.cxx
@@ -55,14 +55,14 @@
namespace
{
- bool lcl_GetPageDesc(SwWrtShell *pSh, USHORT &rPageNo, const SwFmtPageDesc **ppPageFmtDesc)
+ bool lcl_GetPageDesc(SwWrtShell *pSh, sal_uInt16 &rPageNo, const SwFmtPageDesc **ppPageFmtDesc)
{
bool bRet = false;
SfxItemSet aSet( pSh->GetAttrPool(), RES_PAGEDESC, RES_PAGEDESC );
if (pSh->GetCurAttr( aSet ))
{
const SfxPoolItem* pItem(0);
- if (SFX_ITEM_SET == aSet.GetItemState( RES_PAGEDESC, TRUE, &pItem ) && pItem)
+ if (SFX_ITEM_SET == aSet.GetItemState( RES_PAGEDESC, sal_True, &pItem ) && pItem)
{
rPageNo = ((const SwFmtPageDesc *)pItem)->GetNumOffset();
if (ppPageFmtDesc)
@@ -73,26 +73,26 @@ namespace
return bRet;
}
- bool lcl_SkipNPages(SwWrtShell *pSh, USHORT nNoPages)
+ bool lcl_SkipNPages(SwWrtShell *pSh, sal_uInt16 nNoPages)
{
bool bAllOk = true;
- for (USHORT nI = 0; nI < nNoPages && bAllOk; ++nI)
+ for (sal_uInt16 nI = 0; nI < nNoPages && bAllOk; ++nI)
bAllOk = pSh->SttNxtPg();
return bAllOk;
}
- void lcl_ChangePage(SwWrtShell *pSh, USHORT nNewNumber,
+ void lcl_ChangePage(SwWrtShell *pSh, sal_uInt16 nNewNumber,
const SwPageDesc *pNewDesc)
{
- const USHORT nCurIdx = pSh->GetCurPageDesc();
+ const sal_uInt16 nCurIdx = pSh->GetCurPageDesc();
const SwPageDesc &rCurrentDesc = pSh->GetPageDesc( nCurIdx );
const SwFmtPageDesc *pPageFmtDesc(0);
- USHORT nDontCare;
+ sal_uInt16 nDontCare;
lcl_GetPageDesc(pSh, nDontCare, &pPageFmtDesc);
//If we want a new number then set it, otherwise reuse the existing one
- USHORT nPgNo = nNewNumber ?
+ sal_uInt16 nPgNo = nNewNumber ?
nNewNumber : ( pPageFmtDesc ? pPageFmtDesc->GetNumOffset() : 0 );
//If we want a new descriptior then set it, otherwise reuse the existing one
@@ -114,22 +114,22 @@ namespace
void lcl_PushCursor(SwWrtShell *pSh)
{
- pSh->LockView( TRUE );
+ pSh->LockView( sal_True );
pSh->StartAllAction();
pSh->SwCrsrShell::Push();
}
void lcl_PopCursor(SwWrtShell *pSh)
{
- pSh->SwCrsrShell::Pop( FALSE );
+ pSh->SwCrsrShell::Pop( sal_False );
pSh->EndAllAction();
- pSh->LockView( FALSE );
+ pSh->LockView( sal_False );
}
- USHORT lcl_GetCurrentPage(SwWrtShell *pSh)
+ sal_uInt16 lcl_GetCurrentPage(SwWrtShell *pSh)
{
String sDummy;
- USHORT nPhyNum=1, nVirtNum=1;
+ sal_uInt16 nPhyNum=1, nVirtNum=1;
pSh->GetPageNumber(0, true, nPhyNum, nVirtNum, sDummy);
return nPhyNum;
}
@@ -141,7 +141,7 @@ namespace
*/
void SwTitlePageDlg::FillList()
{
- USHORT nTitlePages = aPageCountNF.GetValue();
+ sal_uInt16 nTitlePages = aPageCountNF.GetValue();
aPagePropertiesLB.Clear();
if (mpTitleDesc)
aPagePropertiesLB.InsertEntry(mpTitleDesc->GetName());
@@ -152,9 +152,9 @@ void SwTitlePageDlg::FillList()
aPagePropertiesLB.SelectEntryPos(0);
}
-USHORT SwTitlePageDlg::GetInsertPosition() const
+sal_uInt16 SwTitlePageDlg::GetInsertPosition() const
{
- USHORT nPage = 1;
+ sal_uInt16 nPage = 1;
if (aPageStartNF.IsEnabled())
nPage = aPageStartNF.GetValue();
return nPage;
@@ -200,9 +200,9 @@ SwTitlePageDlg::SwTitlePageDlg( Window *pParent ) :
aRestartNumberingCB.SetClickHdl(LINK(this, SwTitlePageDlg, RestartNumberingHdl));
aSetPageNumberCB.SetClickHdl(LINK(this, SwTitlePageDlg, SetPageNumberHdl));
- USHORT nSetPage = 1;
- USHORT nResetPage = 1;
- USHORT nTitlePages = 1;
+ sal_uInt16 nSetPage = 1;
+ sal_uInt16 nResetPage = 1;
+ sal_uInt16 nTitlePages = 1;
mpSh = ::GetActiveView()->GetWrtShellPtr();
lcl_PushCursor(mpSh);
@@ -222,7 +222,7 @@ SwTitlePageDlg::SwTitlePageDlg( Window *pParent ) :
{
while (mpSh->SttNxtPg())
{
- const USHORT nCurIdx = mpSh->GetCurPageDesc();
+ const sal_uInt16 nCurIdx = mpSh->GetCurPageDesc();
const SwPageDesc &rPageDesc = mpSh->GetPageDesc( nCurIdx );
if (mpIndexDesc != &rPageDesc)
@@ -324,16 +324,16 @@ IMPL_LINK( SwTitlePageDlg, OKHdl, Button *, /*pBtn*/ )
else if (mpPageFmtDesc)
aTitleDesc.SetNumOffset(mpPageFmtDesc->GetNumOffset());
- USHORT nNoPages = aPageCountNF.GetValue();
+ sal_uInt16 nNoPages = aPageCountNF.GetValue();
if (!aUseExistingPagesRB.IsChecked())
{
mpSh->GotoPage(GetInsertPosition(), false);
- for (USHORT nI=0; nI < nNoPages; ++nI)
+ for (sal_uInt16 nI=0; nI < nNoPages; ++nI)
mpSh->InsertPageBreak();
}
mpSh->GotoPage(GetInsertPosition(), false);
- for (USHORT nI=1; nI < nNoPages; ++nI)
+ for (sal_uInt16 nI=1; nI < nNoPages; ++nI)
{
if (mpSh->SttNxtPg())
lcl_ChangePage(mpSh, 0, mpIndexDesc);
@@ -350,7 +350,7 @@ IMPL_LINK( SwTitlePageDlg, OKHdl, Button *, /*pBtn*/ )
if (aRestartNumberingCB.IsChecked() || nNoPages > 1)
{
- USHORT nPgNo = aRestartNumberingCB.IsChecked() ? aRestartNumberingNF.GetValue() : 0;
+ sal_uInt16 nPgNo = aRestartNumberingCB.IsChecked() ? aRestartNumberingNF.GetValue() : 0;
const SwPageDesc *pNewDesc = nNoPages > 1 ? mpNormalDesc : 0;
mpSh->GotoPage(GetInsertPosition() + nNoPages, false);
lcl_ChangePage(mpSh, nPgNo, pNewDesc);
diff --git a/sw/source/ui/ribbar/conarc.cxx b/sw/source/ui/ribbar/conarc.cxx
index cbf8fc28fc8d..3996b7c9bc00 100644
--- a/sw/source/ui/ribbar/conarc.cxx
+++ b/sw/source/ui/ribbar/conarc.cxx
@@ -62,11 +62,11 @@ ConstArc::ConstArc(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView)
-BOOL ConstArc::MouseButtonDown( const MouseEvent& rMEvt )
+sal_Bool ConstArc::MouseButtonDown( const MouseEvent& rMEvt )
{
- BOOL bReturn;
+ sal_Bool bReturn;
- if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == TRUE)
+ if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == sal_True)
{
if (!nAnzButUp)
aStartPnt = m_pWin->PixelToLogic(rMEvt.GetPosPixel());
@@ -82,9 +82,9 @@ BOOL ConstArc::MouseButtonDown( const MouseEvent& rMEvt )
-BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
+sal_Bool ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
if ((m_pSh->IsDrawCreate() || m_pWin->IsDrawAction()) && rMEvt.IsLeft())
{
@@ -92,7 +92,7 @@ BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
if (!nAnzButUp && aPnt == aStartPnt)
{
SwDrawBase::MouseButtonUp(rMEvt);
- bReturn = TRUE;
+ bReturn = sal_True;
}
else
{ nAnzButUp++;
@@ -101,7 +101,7 @@ BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
{
SwDrawBase::MouseButtonUp(rMEvt);
nAnzButUp = 0;
- bReturn = TRUE;
+ bReturn = sal_True;
}
else
m_pSh->EndCreate(SDRCREATE_NEXTPOINT);
@@ -119,7 +119,7 @@ BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
-void ConstArc::Activate(const USHORT nSlotId)
+void ConstArc::Activate(const sal_uInt16 nSlotId)
{
switch (nSlotId)
{
diff --git a/sw/source/ui/ribbar/concustomshape.cxx b/sw/source/ui/ribbar/concustomshape.cxx
index 4bbecde97c43..df887850220b 100644
--- a/sw/source/ui/ribbar/concustomshape.cxx
+++ b/sw/source/ui/ribbar/concustomshape.cxx
@@ -97,9 +97,9 @@ rtl::OUString ConstCustomShape::GetShapeTypeFromRequest( SfxRequest& rReq )
|*
\************************************************************************/
-BOOL ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn = SwDrawBase::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = SwDrawBase::MouseButtonDown(rMEvt);
if ( bReturn )
{
SdrView *pSdrView = m_pSh->GetDrawView();
@@ -129,7 +129,7 @@ BOOL ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL ConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool ConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt)
{
return SwDrawBase::MouseButtonUp(rMEvt);
}
@@ -140,7 +140,7 @@ BOOL ConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt)
|*
\************************************************************************/
-void ConstCustomShape::Activate(const USHORT nSlotId)
+void ConstCustomShape::Activate(const sal_uInt16 nSlotId)
{
m_pWin->SetSdrDrawMode( OBJ_CUSTOMSHAPE );
diff --git a/sw/source/ui/ribbar/conform.cxx b/sw/source/ui/ribbar/conform.cxx
index 71659ba78fdf..9ab0e2efeda2 100644
--- a/sw/source/ui/ribbar/conform.cxx
+++ b/sw/source/ui/ribbar/conform.cxx
@@ -40,7 +40,7 @@
#include "drawbase.hxx"
#include "conform.hxx"
-extern BOOL bNoInterrupt; // in mainwn.cxx
+extern sal_Bool bNoInterrupt; // in mainwn.cxx
/*************************************************************************
|*
@@ -52,7 +52,7 @@ extern BOOL bNoInterrupt; // in mainwn.cxx
ConstFormControl::ConstFormControl(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) :
SwDrawBase(pWrtShell, pEditWin, pSwView)
{
- m_bInsForm = TRUE;
+ m_bInsForm = sal_True;
}
/*************************************************************************
@@ -62,9 +62,9 @@ ConstFormControl::ConstFormControl(SwWrtShell* pWrtShell, SwEditWin* pEditWin, S
\************************************************************************/
-BOOL ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
SdrView *pSdrView = m_pSh->GetDrawView();
@@ -73,13 +73,13 @@ BOOL ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt)
if (rMEvt.IsMod2())
{
- pSdrView->SetCreate1stPointAsCenter(TRUE);
- pSdrView->SetResizeAtCenter(TRUE);
+ pSdrView->SetCreate1stPointAsCenter(sal_True);
+ pSdrView->SetResizeAtCenter(sal_True);
}
else
{
- pSdrView->SetCreate1stPointAsCenter(FALSE);
- pSdrView->SetResizeAtCenter(FALSE);
+ pSdrView->SetCreate1stPointAsCenter(sal_False);
+ pSdrView->SetResizeAtCenter(sal_False);
}
SdrViewEvent aVEvt;
@@ -89,16 +89,16 @@ BOOL ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt)
if (rMEvt.IsLeft() && !m_pWin->IsDrawAction() &&
(eHit == SDRHIT_UNMARKEDOBJECT || eHit == SDRHIT_NONE || m_pSh->IsDrawCreate()))
{
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
m_pWin->CaptureMouse();
m_pWin->SetPointer(Pointer(POINTER_DRAW_RECT));
m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel());
- bReturn = m_pSh->BeginCreate( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, m_aStartPos);
+ bReturn = m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, m_aStartPos);
if (bReturn)
- m_pWin->SetDrawAction(TRUE);
+ m_pWin->SetDrawAction(sal_True);
}
else
bReturn = SwDrawBase::MouseButtonDown(rMEvt);
@@ -113,7 +113,7 @@ BOOL ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt)
\************************************************************************/
-void ConstFormControl::Activate(const USHORT nSlotId)
+void ConstFormControl::Activate(const sal_uInt16 nSlotId)
{
m_pWin->SetSdrDrawMode( static_cast<SdrObjKind>(nSlotId) );
SwDrawBase::Activate(nSlotId);
@@ -135,8 +135,8 @@ void ConstFormControl::CreateDefaultObject()
m_pSh->MakeDrawView();
SdrView *pSdrView = m_pSh->GetDrawView();
- pSdrView->SetDesignMode(TRUE);
- m_pSh->BeginCreate( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, aStartPos);
+ pSdrView->SetDesignMode(sal_True);
+ m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, aStartPos);
m_pSh->MoveCreate(aEndPos);
m_pSh->EndCreate(SDRCREATE_FORCEEND);
}
diff --git a/sw/source/ui/ribbar/conpoly.cxx b/sw/source/ui/ribbar/conpoly.cxx
index 07fa43533570..430e3d7ba6f5 100644
--- a/sw/source/ui/ribbar/conpoly.cxx
+++ b/sw/source/ui/ribbar/conpoly.cxx
@@ -62,11 +62,11 @@ ConstPolygon::ConstPolygon(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* p
-BOOL ConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool ConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn;
+ sal_Bool bReturn;
- if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == TRUE)
+ if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == sal_True)
aLastPos = rMEvt.GetPosPixel();
return (bReturn);
@@ -80,9 +80,9 @@ BOOL ConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
-BOOL ConstPolygon::MouseMove(const MouseEvent& rMEvt)
+sal_Bool ConstPolygon::MouseMove(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
bReturn = SwDrawBase::MouseMove(rMEvt);
@@ -97,9 +97,9 @@ BOOL ConstPolygon::MouseMove(const MouseEvent& rMEvt)
-BOOL ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
if (m_pSh->IsDrawCreate())
{
@@ -110,7 +110,7 @@ BOOL ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
{
m_pSh->BreakCreate();
EnterSelectMode(rMEvt);
- return TRUE;
+ return sal_True;
}
}
else
@@ -137,7 +137,7 @@ BOOL ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
-void ConstPolygon::Activate(const USHORT nSlotId)
+void ConstPolygon::Activate(const sal_uInt16 nSlotId)
{
switch (nSlotId)
{
diff --git a/sw/source/ui/ribbar/conrect.cxx b/sw/source/ui/ribbar/conrect.cxx
index 1905d6dcde60..f8c25ed7ceba 100644
--- a/sw/source/ui/ribbar/conrect.cxx
+++ b/sw/source/ui/ribbar/conrect.cxx
@@ -59,7 +59,7 @@
ConstRectangle::ConstRectangle( SwWrtShell* pWrtShell, SwEditWin* pEditWin,
SwView* pSwView )
: SwDrawBase( pWrtShell, pEditWin, pSwView ),
- bMarquee(FALSE),
+ bMarquee(sal_False),
// #93382#
mbVertical(sal_False)
{
@@ -71,11 +71,11 @@ ConstRectangle::ConstRectangle( SwWrtShell* pWrtShell, SwEditWin* pEditWin,
|*
\************************************************************************/
-BOOL ConstRectangle::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool ConstRectangle::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn;
+ sal_Bool bReturn;
- if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == TRUE
+ if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == sal_True
&& m_pWin->GetSdrDrawMode() == OBJ_CAPTION)
{
m_pView->NoRotate();
@@ -94,11 +94,11 @@ BOOL ConstRectangle::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
{
Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel()));
- BOOL bRet = SwDrawBase::MouseButtonUp(rMEvt);
+ sal_Bool bRet = SwDrawBase::MouseButtonUp(rMEvt);
if( bRet )
{
SdrView *pSdrView = m_pSh->GetDrawView();
@@ -118,13 +118,13 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
SfxItemSet aItemSet( pSdrView->GetModel()->GetItemPool(),
SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST);
- aItemSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
- aItemSet.Put( SdrTextAutoGrowHeightItem( FALSE ) );
+ aItemSet.Put( SdrTextAutoGrowWidthItem( sal_False ) );
+ aItemSet.Put( SdrTextAutoGrowHeightItem( sal_False ) );
aItemSet.Put( SdrTextAniKindItem( SDRTEXTANI_SCROLL ) );
aItemSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) );
aItemSet.Put( SdrTextAniCountItem( 0 ) );
aItemSet.Put( SdrTextAniAmountItem(
- (INT16)m_pWin->PixelToLogic(Size(2,1)).Width()) );
+ (sal_Int16)m_pWin->PixelToLogic(Size(2,1)).Width()) );
pObj->SetMergedItemSetAndBroadcast(aItemSet);
}
@@ -135,10 +135,10 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
SdrTextObj* pText = (SdrTextObj*)pObj;
SfxItemSet aSet(pSdrView->GetModel()->GetItemPool());
- pText->SetVerticalWriting(TRUE);
+ pText->SetVerticalWriting(sal_True);
- aSet.Put(SdrTextAutoGrowWidthItem(TRUE));
- aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_True));
+ aSet.Put(SdrTextAutoGrowHeightItem(sal_False));
aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP));
aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT));
@@ -161,7 +161,7 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
pCaptObj->ForceOutlinerParaObject();
OutlinerParaObject* pOPO = pCaptObj->GetOutlinerParaObject();
if( pOPO && !pOPO->IsVertical() )
- pOPO->SetVertical( TRUE );
+ pOPO->SetVertical( sal_True );
}
}
break;
@@ -177,9 +177,9 @@ BOOL ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
|*
\************************************************************************/
-void ConstRectangle::Activate(const USHORT nSlotId)
+void ConstRectangle::Activate(const sal_uInt16 nSlotId)
{
- bMarquee = bCapVertical = FALSE;
+ bMarquee = bCapVertical = sal_False;
mbVertical = sal_False;
switch (nSlotId)
@@ -197,7 +197,7 @@ void ConstRectangle::Activate(const USHORT nSlotId)
break;
case SID_DRAW_TEXT_MARQUEE:
- bMarquee = TRUE;
+ bMarquee = sal_True;
m_pWin->SetSdrDrawMode(OBJ_TEXT);
break;
@@ -212,7 +212,7 @@ void ConstRectangle::Activate(const USHORT nSlotId)
break;
case SID_DRAW_CAPTION_VERTICAL:
- bCapVertical = TRUE;
+ bCapVertical = sal_True;
// no break
case SID_DRAW_CAPTION:
m_pWin->SetSdrDrawMode(OBJ_CAPTION);
diff --git a/sw/source/ui/ribbar/drawbase.cxx b/sw/source/ui/ribbar/drawbase.cxx
index cb1e9992a81c..52f9f6897644 100644
--- a/sw/source/ui/ribbar/drawbase.cxx
+++ b/sw/source/ui/ribbar/drawbase.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
#include <svx/svdview.hxx>
#include <svx/svdobj.hxx>
@@ -45,14 +46,14 @@
#include "edtwin.hxx"
#include "caption.hxx"
#include "swundo.hxx"
-#include "undobj.hxx"
+#include <SwRewriter.hxx>
#include "comcore.hrc"
using namespace ::com::sun::star;
-extern BOOL bNoInterrupt; // in mainwn.cxx
+extern sal_Bool bNoInterrupt; // in mainwn.cxx
-#define MINMOVE ((USHORT)m_pSh->GetOut()->PixelToLogic(Size(m_pSh->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width())
+#define MINMOVE ((sal_uInt16)m_pSh->GetOut()->PixelToLogic(Size(m_pSh->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width())
/*************************************************************************
@@ -67,8 +68,8 @@ SwDrawBase::SwDrawBase(SwWrtShell* pSwWrtShell, SwEditWin* pWindow, SwView* pSwV
m_pSh(pSwWrtShell),
m_pWin(pWindow),
m_nSlotId(USHRT_MAX),
- m_bCreateObj(TRUE),
- m_bInsForm(FALSE)
+ m_bCreateObj(sal_True),
+ m_bInsForm(sal_False)
{
if ( !m_pSh->HasDrawView() )
m_pSh->MakeDrawView();
@@ -83,7 +84,7 @@ SwDrawBase::SwDrawBase(SwWrtShell* pSwWrtShell, SwEditWin* pWindow, SwView* pSwV
SwDrawBase::~SwDrawBase()
{
if (m_pView->GetWrtShellPtr()) // Im view-Dtor koennte die wrtsh bereits geloescht worden sein...
- m_pSh->GetDrawView()->SetEditMode(TRUE);
+ m_pSh->GetDrawView()->SetEditMode(sal_True);
}
/*************************************************************************
@@ -93,9 +94,9 @@ SwDrawBase::~SwDrawBase()
\************************************************************************/
-BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
SdrView *pSdrView = m_pSh->GetDrawView();
@@ -105,13 +106,13 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
if (rMEvt.IsMod2())
{
- pSdrView->SetCreate1stPointAsCenter(TRUE);
- pSdrView->SetResizeAtCenter(TRUE);
+ pSdrView->SetCreate1stPointAsCenter(sal_True);
+ pSdrView->SetResizeAtCenter(sal_True);
}
else
{
- pSdrView->SetCreate1stPointAsCenter(FALSE);
- pSdrView->SetResizeAtCenter(FALSE);
+ pSdrView->SetCreate1stPointAsCenter(sal_False);
+ pSdrView->SetResizeAtCenter(sal_False);
}
SdrViewEvent aVEvt;
@@ -122,17 +123,17 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
{
if (IsCreateObj() && (eHit == SDRHIT_UNMARKEDOBJECT || eHit == SDRHIT_NONE || m_pSh->IsDrawCreate()))
{
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
m_pWin->CaptureMouse();
m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel());
- bReturn = m_pSh->BeginCreate( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()), m_aStartPos);
+ bReturn = m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), m_aStartPos);
SetDrawPointer();
if ( bReturn )
- m_pWin->SetDrawAction(TRUE);
+ m_pWin->SetDrawAction(sal_True);
}
else if (!pSdrView->IsAction())
{
@@ -141,25 +142,25 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
**********************************************************************/
m_pWin->CaptureMouse();
m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel());
- UINT16 nEditMode = m_pWin->GetBezierMode();
+ sal_uInt16 nEditMode = m_pWin->GetBezierMode();
if (eHit == SDRHIT_HANDLE && aVEvt.pHdl->GetKind() == HDL_BWGT)
{
/******************************************************************
* Handle draggen
******************************************************************/
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
bReturn = pSdrView->BegDragObj(m_aStartPos, (OutputDevice*) NULL, aVEvt.pHdl);
- m_pWin->SetDrawAction(TRUE);
+ m_pWin->SetDrawAction(sal_True);
}
else if (eHit == SDRHIT_MARKEDOBJECT && nEditMode == SID_BEZIER_INSERT)
{
/******************************************************************
* Klebepunkt einfuegen
******************************************************************/
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
bReturn = pSdrView->BegInsObjPoint(m_aStartPos, rMEvt.IsMod1());
- m_pWin->SetDrawAction(TRUE);
+ m_pWin->SetDrawAction(sal_True);
}
else if (eHit == SDRHIT_MARKEDOBJECT && rMEvt.IsMod1())
{
@@ -170,14 +171,14 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
pSdrView->UnmarkAllPoints();
bReturn = pSdrView->BegMarkPoints(m_aStartPos);
- m_pWin->SetDrawAction(TRUE);
+ m_pWin->SetDrawAction(sal_True);
}
else if (eHit == SDRHIT_MARKEDOBJECT && !rMEvt.IsShift() && !rMEvt.IsMod2())
{
/******************************************************************
* Objekt verschieben
******************************************************************/
- return FALSE;
+ return sal_False;
}
else if (eHit == SDRHIT_HANDLE)
{
@@ -208,7 +209,7 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
if (pHdl)
{
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
pSdrView->MarkPoint(*pHdl);
}
}
@@ -223,12 +224,12 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
if (pSdrView->HasMarkablePoints())
pSdrView->UnmarkAllPoints();
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
// Drag im edtwin verwenden
- return FALSE;
+ return sal_False;
}
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
if (m_pSh->IsObjSelected())
{
@@ -236,11 +237,11 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
{
if (!pSdrView->HasMarkablePoints())
{
- BOOL bUnlockView = !m_pSh->IsViewLocked();
- m_pSh->LockView( TRUE ); //lock visible section
+ sal_Bool bUnlockView = !m_pSh->IsViewLocked();
+ m_pSh->LockView( sal_True ); //lock visible section
m_pSh->SelectObj(Point(LONG_MAX, LONG_MAX)); // deselect all
if( bUnlockView )
- m_pSh->LockView( FALSE );
+ m_pSh->LockView( sal_False );
}
else
pSdrView->UnmarkAllPoints();
@@ -250,7 +251,7 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
m_pSh->EnterSelFrmMode(NULL);
if( 0 != (bReturn = m_pSh->BeginMark(m_aStartPos)) )
- m_pWin->SetDrawAction(TRUE);
+ m_pWin->SetDrawAction(sal_True);
SetDrawPointer();
}
@@ -266,11 +267,11 @@ BOOL SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
\************************************************************************/
-BOOL SwDrawBase::MouseMove(const MouseEvent& rMEvt)
+sal_Bool SwDrawBase::MouseMove(const MouseEvent& rMEvt)
{
SdrView *pSdrView = m_pSh->GetDrawView();
Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel()));
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (IsCreateObj() && !m_pWin->IsDrawSelMode() && pSdrView->IsCreateObj())
{
@@ -279,12 +280,12 @@ BOOL SwDrawBase::MouseMove(const MouseEvent& rMEvt)
pSdrView->SetAngleSnapEnabled(rMEvt.IsShift());
m_pSh->MoveCreate(aPnt);
- bRet = TRUE;
+ bRet = sal_True;
}
else if (pSdrView->IsAction() || pSdrView->IsInsObjPoint() || pSdrView->IsMarkPoints())
{
m_pSh->MoveMark(aPnt);
- bRet = TRUE;
+ bRet = sal_True;
}
return (bRet);
@@ -297,11 +298,11 @@ BOOL SwDrawBase::MouseMove(const MouseEvent& rMEvt)
\************************************************************************/
-BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
- BOOL bCheckShell = FALSE;
- BOOL bAutoCap = FALSE;
+ sal_Bool bReturn = sal_False;
+ sal_Bool bCheckShell = sal_False;
+ sal_Bool bAutoCap = sal_False;
Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel()));
@@ -309,7 +310,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
{
const SdrObjKind nDrawMode = m_pWin->GetSdrDrawMode();
//objects with multiple point may end at the start position
- BOOL bMultiPoint = OBJ_PLIN == nDrawMode ||
+ sal_Bool bMultiPoint = OBJ_PLIN == nDrawMode ||
OBJ_PATHLINE == nDrawMode ||
OBJ_FREELINE == nDrawMode;
if(rMEvt.IsRight() || (aPnt == m_aStartPos && !bMultiPoint))
@@ -336,12 +337,12 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
{
SfxRequest aReq(m_pSh->GetView().GetViewFrame(),FN_INSERT_FRAME);
aReq.AppendItem(SfxUInt16Item( FN_INSERT_FRAME,
- static_cast<USHORT>(FLY_AT_PARA) ));
+ static_cast<sal_uInt16>(FLY_AT_PARA) ));
aReq.AppendItem(SfxPointItem( FN_PARAM_1, m_pSh->GetAnchorObjDiff()));
aReq.AppendItem(SvxSizeItem( FN_PARAM_2, m_pSh->GetObjSize()));
aReq.Done();
}
- bAutoCap = TRUE;
+ bAutoCap = sal_True;
if(m_pWin->GetFrmColCount() > 1)
{
SfxItemSet aSet(m_pView->GetPool(),RES_COL,RES_COL);
@@ -357,10 +358,12 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
}
}
if (m_pWin->GetSdrDrawMode() == OBJ_NONE)
- m_pSh->EndUndo(UNDO_INSERT);
+ {
+ m_pSh->EndUndo();
+ }
}
- bReturn = TRUE;
+ bReturn = sal_True;
EnterSelectMode(rMEvt);
}
@@ -378,7 +381,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
{
bReturn = m_pSh->EndMark();
- m_pWin->SetDrawAction(FALSE);
+ m_pWin->SetDrawAction(sal_False);
if (aPnt == m_aStartPos && m_pSh->IsObjSelectable(aPnt))
{
@@ -396,7 +399,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
}
m_pView->NoRotate();
- bCheckShell = TRUE; // ggf BezierShell anwerfen
+ bCheckShell = sal_True; // ggf BezierShell anwerfen
}
else if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction())
{
@@ -411,7 +414,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
}
m_pView->NoRotate();
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -429,9 +432,9 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
else
{
pSdrView->EndAction();
- bReturn = TRUE;
+ bReturn = sal_True;
}
- m_pWin->SetDrawAction(FALSE);
+ m_pWin->SetDrawAction(sal_False);
if (aPnt == m_aStartPos)
{
@@ -456,7 +459,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
}
m_pView->NoRotate();
- bCheckShell = TRUE; // ggf BezierShell anwerfen
+ bCheckShell = sal_True; // ggf BezierShell anwerfen
}
}
@@ -469,7 +472,7 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
m_pSh->LeaveSelFrmMode();
m_pView->NoRotate();
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -491,13 +494,13 @@ BOOL SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
\************************************************************************/
-void SwDrawBase::Activate(const USHORT nSlot)
+void SwDrawBase::Activate(const sal_uInt16 nSlot)
{
SetSlotId(nSlot);
SdrView *pSdrView = m_pSh->GetDrawView();
- pSdrView->SetCurrentObj( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()) );
- pSdrView->SetEditMode(FALSE);
+ pSdrView->SetCurrentObj( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()) );
+ pSdrView->SetEditMode(sal_False);
SetDrawPointer();
m_pSh->NoEdit();
@@ -513,16 +516,16 @@ void SwDrawBase::Activate(const USHORT nSlot)
void SwDrawBase::Deactivate()
{
SdrView *pSdrView = m_pSh->GetDrawView();
- pSdrView->SetOrtho(FALSE);
- pSdrView->SetAngleSnapEnabled(FALSE);
+ pSdrView->SetOrtho(sal_False);
+ pSdrView->SetAngleSnapEnabled(sal_False);
if (m_pWin->IsDrawAction() && m_pSh->IsDrawCreate())
m_pSh->BreakCreate();
- m_pWin->SetDrawAction(FALSE);
+ m_pWin->SetDrawAction(sal_False);
m_pWin->ReleaseMouse();
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
if(m_pWin->GetApplyTemplate())
m_pWin->SetApplyTemplate(SwApplyTemplate());
@@ -533,16 +536,16 @@ void SwDrawBase::Deactivate()
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
-BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt)
+sal_Bool SwDrawBase::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_Bool bReturn = sal_False;
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
switch (nCode)
{
@@ -554,14 +557,14 @@ BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt)
m_pView->LeaveDrawCreate();
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
break;
case KEY_DELETE:
{
m_pSh->DelSelectedObj();
- bReturn = TRUE;
+ bReturn = sal_True;
}
break;
@@ -610,7 +613,7 @@ BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt)
pSdrView->MoveAllMarked(Size(nX, nY));
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
break;
@@ -624,8 +627,8 @@ BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
@@ -633,7 +636,7 @@ BOOL SwDrawBase::KeyInput(const KeyEvent& rKEvt)
void SwDrawBase::BreakCreate()
{
m_pSh->BreakCreate();
- m_pWin->SetDrawAction(FALSE);
+ m_pWin->SetDrawAction(sal_False);
m_pWin->ReleaseMouse();
Deactivate();
@@ -664,7 +667,7 @@ void SwDrawBase::SetDrawPointer()
void SwDrawBase::EnterSelectMode(const MouseEvent& rMEvt)
{
- m_pWin->SetDrawAction(FALSE);
+ m_pWin->SetDrawAction(sal_False);
if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction())
{
@@ -699,7 +702,7 @@ void SwDrawBase::CreateDefaultObject()
aEndPos.X() += 8 * MM50;
aEndPos.Y() += 4 * MM50;
Rectangle aRect(aStartPos, aEndPos);
- m_pSh->CreateDefaultShape( static_cast< UINT16 >(m_pWin->GetSdrDrawMode()), aRect, m_nSlotId);
+ m_pSh->CreateDefaultShape( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), aRect, m_nSlotId);
}
Point SwDrawBase::GetDefaultCenterPos()
diff --git a/sw/source/ui/ribbar/dselect.cxx b/sw/source/ui/ribbar/dselect.cxx
index 1ba41c98777b..b67eaae297b0 100644
--- a/sw/source/ui/ribbar/dselect.cxx
+++ b/sw/source/ui/ribbar/dselect.cxx
@@ -38,7 +38,7 @@
#include "drawbase.hxx"
#include "dselect.hxx"
-extern BOOL bNoInterrupt; // in mainwn.cxx
+extern sal_Bool bNoInterrupt; // in mainwn.cxx
/*************************************************************************
|*
@@ -49,21 +49,21 @@ extern BOOL bNoInterrupt; // in mainwn.cxx
DrawSelection::DrawSelection(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) :
SwDrawBase(pWrtShell, pEditWin, pSwView)
{
- m_bCreateObj = FALSE;
+ m_bCreateObj = sal_False;
}
/*************************************************************************
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
-BOOL DrawSelection::KeyInput(const KeyEvent& rKEvt)
+sal_Bool DrawSelection::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
switch (rKEvt.GetKeyCode().GetCode())
{
@@ -74,7 +74,7 @@ BOOL DrawSelection::KeyInput(const KeyEvent& rKEvt)
m_pSh->BreakMark();
m_pWin->ReleaseMouse();
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
break;
}
@@ -91,10 +91,10 @@ BOOL DrawSelection::KeyInput(const KeyEvent& rKEvt)
|*
\************************************************************************/
-void DrawSelection::Activate(const USHORT nSlotId)
+void DrawSelection::Activate(const sal_uInt16 nSlotId)
{
m_pWin->SetSdrDrawMode(OBJ_NONE);
- m_pWin->SetObjectSelect( TRUE );
+ m_pWin->SetObjectSelect( sal_True );
SwDrawBase::Activate(nSlotId);
m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx
index 697578d67aef..6c988d9b265e 100644..100755
--- a/sw/source/ui/ribbar/inputwin.cxx
+++ b/sw/source/ui/ribbar/inputwin.cxx
@@ -37,6 +37,7 @@
#include <svx/ruler.hxx>
#include <svl/zforlist.hxx>
#include <svl/stritem.hxx>
+#include <unotools/undoopt.hxx>
#include "swtypes.hxx"
#include "cmdid.h"
@@ -75,12 +76,18 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind )
pView(0),
pBindings(pBind),
aAktTableName(aEmptyStr)
+ , m_nActionCount(0)
+ , m_bDoesUndo(true)
+ , m_bResetUndo(false)
+ , m_bCallUndo(false)
{
- bFirst = bDoesUndo = TRUE;
- bActive = bIsTable = bDelSel = bResetUndo = bCallUndo = FALSE;
+ bFirst = sal_True;
+ bActive = bIsTable = bDelSel = sal_False;
FreeResource();
+ aEdit.SetSizePixel( aEdit.CalcMinimumSize() );
+
SfxImageManager* pManager = SfxImageManager::GetImageManager( SW_MOD() );
pManager->RegisterToolBox(this);
@@ -101,16 +108,23 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind )
SetDropdownClickHdl( LINK( this, SwInputWindow, DropdownClickHdl ));
Size aSizeTbx = CalcWindowSizePixel();
+ Size aEditSize = aEdit.GetSizePixel();
+ Rectangle aItemRect( GetItemRect(FN_FORMULA_CALC) );
+ long nMaxHeight = (aEditSize.Height() > aItemRect.GetHeight()) ? aEditSize.Height() : aItemRect.GetHeight();
+ if( nMaxHeight+2 > aSizeTbx.Height() )
+ aSizeTbx.Height() = nMaxHeight+2;
Size aSize = GetSizePixel();
aSize.Height() = aSizeTbx.Height();
SetSizePixel( aSize );
- Size aPosSize = aPos.GetSizePixel();
- Size aEditSize = aEdit.GetSizePixel();
- aPosSize.Height() = aEditSize.Height() = GetItemRect(FN_FORMULA_CALC).GetHeight() - 2;
- Point aPosPos = aPos.GetPosPixel();
- Point aEditPos= aEdit.GetPosPixel();
- aPosPos.Y() = aEditPos.Y() = GetItemRect( FN_FORMULA_CALC ).TopLeft().Y() + 1;
+ // align edit and item vcentered
+ Size aPosSize = aPos.GetSizePixel();
+ aPosSize.Height() = nMaxHeight;
+ aEditSize.Height() = nMaxHeight;
+ Point aPosPos = aPos.GetPosPixel();
+ Point aEditPos = aEdit.GetPosPixel();
+ aPosPos.Y() = (aSize.Height() - nMaxHeight)/2 + 1;
+ aEditPos.Y() = (aSize.Height() - nMaxHeight)/2 + 1;
aPos.SetPosSizePixel( aPosPos, aPosSize );
aEdit.SetPosSizePixel( aEditPos, aEditSize );
@@ -126,24 +140,35 @@ SwInputWindow::~SwInputWindow()
//Lineale aufwecken
if(pView)
{
- pView->GetHLineal().SetActive( TRUE );
- pView->GetVLineal().SetActive( TRUE );
+ pView->GetHLineal().SetActive( sal_True );
+ pView->GetVLineal().SetActive( sal_True );
}
if ( pMgr )
delete pMgr;
if(pWrtShell)
pWrtShell->EndSelTblCells();
- if( bResetUndo )
+ CleanupUglyHackWithUndo();
+}
+
+void SwInputWindow::CleanupUglyHackWithUndo()
+{
+ if (m_bResetUndo)
{
DelBoxCntnt();
- pWrtShell->DoUndo( bDoesUndo );
- if(bCallUndo)
+ pWrtShell->DoUndo(m_bDoesUndo);
+ if (m_bCallUndo)
+ {
pWrtShell->Undo();
- SwEditShell::SetUndoActionCount( nActionCnt );
+ }
+ if (0 == m_nActionCount)
+ {
+ SW_MOD()->GetUndoOptions().SetUndoCount(0);
+ }
}
}
+
//==================================================================
void SwInputWindow::DataChanged( const DataChangedEvent& rDCEvt )
@@ -180,16 +205,16 @@ void SwInputWindow::Resize()
void SwInputWindow::ShowWin()
{
- bIsTable = FALSE;
+ bIsTable = sal_False;
//Lineale anhalten
if(pView)
{
- pView->GetHLineal().SetActive( FALSE );
- pView->GetVLineal().SetActive( FALSE );
+ pView->GetHLineal().SetActive( sal_False );
+ pView->GetVLineal().SetActive( sal_False );
OSL_ENSURE(pWrtShell, "no WrtShell!");
// Cursor in Tabelle
- bIsTable = pWrtShell->IsCrsrInTbl() ? TRUE : FALSE;
+ bIsTable = pWrtShell->IsCrsrInTbl() ? sal_True : sal_False;
if( bFirst )
pWrtShell->SelTblCells( LINK( this, SwInputWindow,
@@ -197,7 +222,7 @@ void SwInputWindow::ShowWin()
if( bIsTable )
{
const String& rPos = pWrtShell->GetBoxNms();
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
short nSrch = -1;
while( (nPos = rPos.Search( ':',nPos + 1 ) ) != STRING_NOTFOUND )
nSrch = (short) nPos;
@@ -222,13 +247,17 @@ void SwInputWindow::ShowWin()
{
if( bIsTable )
{
- bResetUndo = TRUE;
- nActionCnt = SwEditShell::GetUndoActionCount();
- SwEditShell::SetUndoActionCount( nActionCnt + 1 );
+ m_bResetUndo = true;
+ m_nActionCount = SW_MOD()->GetUndoOptions().GetUndoCount();
+ if (0 == m_nActionCount) { // deactivated? turn it on...
+ SW_MOD()->GetUndoOptions().SetUndoCount(1);
+ }
- bDoesUndo = pWrtShell->DoesUndo();
- if( !bDoesUndo )
- pWrtShell->DoUndo( TRUE );
+ m_bDoesUndo = pWrtShell->DoesUndo();
+ if( !m_bDoesUndo )
+ {
+ pWrtShell->DoUndo( sal_True );
+ }
if( !pWrtShell->SwCrsrShell::HasSelection() )
{
@@ -241,9 +270,11 @@ void SwInputWindow::ShowWin()
pWrtShell->StartUndo( UNDO_DELETE );
pWrtShell->Delete();
if( 0 != pWrtShell->EndUndo( UNDO_DELETE ))
- bCallUndo = TRUE;
+ {
+ m_bCallUndo = true;
+ }
}
- pWrtShell->DoUndo( FALSE );
+ pWrtShell->DoUndo(false);
SfxItemSet aSet( pWrtShell->GetAttrPool(), RES_BOXATR_FORMULA, RES_BOXATR_FORMULA );
if( pWrtShell->GetTblBoxFormulaAttrs( aSet ))
@@ -258,7 +289,7 @@ void SwInputWindow::ShowWin()
pWrtShell->EndSelect();
}
- bFirst = FALSE;
+ bFirst = sal_False;
aEdit.SetModifyHdl( LINK( this, SwInputWindow, ModifyHdl ));
@@ -271,8 +302,8 @@ void SwInputWindow::ShowWin()
aEdit.GrabFocus();
// UserInterface fuer die Eingabe abklemmen
- pView->GetEditWin().LockKeyInput(TRUE);
- pView->GetViewFrame()->GetDispatcher()->Lock(TRUE);
+ pView->GetEditWin().LockKeyInput(sal_True);
+ pView->GetViewFrame()->GetDispatcher()->Lock(sal_True);
pWrtShell->Push();
}
ToolBox::Show();
@@ -309,7 +340,7 @@ static const char * const aStrArr[] = {
sCalc_Round
};
- USHORT nId = pMenu->GetCurItemId();
+ sal_uInt16 nId = pMenu->GetCurItemId();
if ( nId <= MN_CALC_ROUND )
{
String aTmp( String::CreateFromAscii(aStrArr[nId - 1]) );
@@ -321,7 +352,7 @@ static const char * const aStrArr[] = {
IMPL_LINK( SwInputWindow, DropdownClickHdl, ToolBox*, EMPTYARG )
{
- USHORT nCurID = GetCurItemId();
+ sal_uInt16 nCurID = GetCurItemId();
EndSelection(); // setzt CurItemId zurueck !
switch ( nCurID )
{
@@ -334,7 +365,7 @@ IMPL_LINK( SwInputWindow, DropdownClickHdl, ToolBox*, EMPTYARG )
}
}
- return TRUE;
+ return sal_True;
}
//==================================================================
@@ -342,7 +373,7 @@ IMPL_LINK( SwInputWindow, DropdownClickHdl, ToolBox*, EMPTYARG )
void SwInputWindow::Click( )
{
- USHORT nCurID = GetCurItemId();
+ sal_uInt16 nCurID = GetCurItemId();
EndSelection(); // setzt CurItemId zurueck !
switch ( nCurID )
{
@@ -363,18 +394,10 @@ void SwInputWindow::Click( )
void SwInputWindow::ApplyFormula()
{
- pView->GetViewFrame()->GetDispatcher()->Lock(FALSE);
- pView->GetEditWin().LockKeyInput(FALSE);
- if( bResetUndo )
- {
- DelBoxCntnt();
- pWrtShell->DoUndo( bDoesUndo );
- SwEditShell::SetUndoActionCount( nActionCnt );
- if( bCallUndo )
- pWrtShell->Undo();
- bResetUndo = FALSE;
- }
- pWrtShell->Pop( FALSE );
+ pView->GetViewFrame()->GetDispatcher()->Lock(sal_False);
+ pView->GetEditWin().LockKeyInput(sal_False);
+ CleanupUglyHackWithUndo();
+ pWrtShell->Pop( sal_False );
// Formel soll immer mit einem "=" beginnen, hier
// also wieder entfernen
@@ -398,18 +421,10 @@ void SwInputWindow::CancelFormula()
{
if(pView)
{
- pView->GetViewFrame()->GetDispatcher()->Lock( FALSE );
- pView->GetEditWin().LockKeyInput(FALSE);
- if( bResetUndo )
- {
- DelBoxCntnt();
- pWrtShell->DoUndo( bDoesUndo );
- SwEditShell::SetUndoActionCount( nActionCnt );
- if( bCallUndo )
- pWrtShell->Undo();
- bResetUndo = FALSE;
- }
- pWrtShell->Pop( FALSE );
+ pView->GetViewFrame()->GetDispatcher()->Lock( sal_False );
+ pView->GetEditWin().LockKeyInput(sal_False);
+ CleanupUglyHackWithUndo();
+ pWrtShell->Pop( sal_False );
if( bDelSel )
pWrtShell->EnterStdMode();
@@ -467,7 +482,7 @@ IMPL_LINK( SwInputWindow, SelTblCellsNotify, SwWrtShell *, pCaller )
}
-void SwInputWindow::SetFormula( const String& rFormula, BOOL bDelFlag )
+void SwInputWindow::SetFormula( const String& rFormula, sal_Bool bDelFlag )
{
String sEdit( '=' );
if( rFormula.Len() )
@@ -485,7 +500,7 @@ void SwInputWindow::SetFormula( const String& rFormula, BOOL bDelFlag )
IMPL_LINK( SwInputWindow, ModifyHdl, InputEdit*, EMPTYARG )
{
- if( bIsTable && bResetUndo )
+ if (bIsTable && m_bResetUndo)
{
pWrtShell->StartAllAction();
DelBoxCntnt();
@@ -507,7 +522,7 @@ void SwInputWindow::DelBoxCntnt()
{
pWrtShell->StartAllAction();
pWrtShell->ClearMark();
- pWrtShell->Pop( FALSE );
+ pWrtShell->Pop( sal_False );
pWrtShell->Push();
pWrtShell->MoveSection( fnSectionCurr, fnSectionStart );
pWrtShell->SetMark();
@@ -548,32 +563,32 @@ void InputEdit::UpdateRange(const String& rBoxes,
String aBoxes = aPrefix;
aBoxes += rBoxes;
Selection aSelection(GetSelection());
- USHORT nSel = (USHORT) aSelection.Len();
+ sal_uInt16 nSel = (sal_uInt16) aSelection.Len();
//OS: mit dem folgenden Ausdruck wird sichergestellt, dass im overwrite-Modus
//die selektierte schliessende Klammer nicht geloescht wird
if( nSel && ( nSel > 1 ||
- GetText().GetChar( (USHORT)aSelection.Min() ) != cClose ) )
+ GetText().GetChar( (sal_uInt16)aSelection.Min() ) != cClose ) )
Cut();
else
aSelection.Max() = aSelection.Min();
String aActText(GetText());
- const USHORT nLen = aActText.Len();
+ const sal_uInt16 nLen = aActText.Len();
if( !nLen )
{
String aStr(cOpen);
aStr += aBoxes;
aStr += cClose;
SetText(aStr);
- USHORT nPos = aStr.Search( cClose );
+ sal_uInt16 nPos = aStr.Search( cClose );
OSL_ENSURE(nPos < aStr.Len(), "delimiter not found");
++nPos;
SetSelection( Selection( nPos, nPos ));
}
else
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
sal_Unicode cCh;
- USHORT nPos, nEndPos = 0, nStartPos = (USHORT) aSelection.Min();
+ sal_uInt16 nPos, nEndPos = 0, nStartPos = (sal_uInt16) aSelection.Min();
if( nStartPos-- )
{
do {
@@ -587,21 +602,21 @@ void InputEdit::UpdateRange(const String& rBoxes,
}
if( bFound )
{
- bFound = FALSE;
+ bFound = sal_False;
nEndPos = nStartPos;
while( nEndPos < nLen )
{
if( cClose == (cCh = aActText.GetChar( nEndPos )))
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
++nEndPos;
}
// nur wenn akt. Pos im Breich oder direkt dahinter liegt
- if( bFound && !( nStartPos < (USHORT)aSelection.Max() &&
- (USHORT)aSelection.Max() <= nEndPos + 1 ))
- bFound = FALSE;
+ if( bFound && !( nStartPos < (sal_uInt16)aSelection.Max() &&
+ (sal_uInt16)aSelection.Max() <= nEndPos + 1 ))
+ bFound = sal_False;
}
if( bFound )
{
@@ -615,7 +630,7 @@ void InputEdit::UpdateRange(const String& rBoxes,
String aTmp( (char)cOpen );
aTmp += aBoxes;
aTmp += (char)cClose;
- nPos = (USHORT)aSelection.Min();
+ nPos = (sal_uInt16)aSelection.Min();
aActText.Insert( aTmp, nPos );
nPos = nPos + aTmp.Len();
}
@@ -631,7 +646,7 @@ void InputEdit::UpdateRange(const String& rBoxes,
//==================================================================
SwInputChild::SwInputChild(Window* _pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* ) :
SfxChildWindow( _pParent, nId )
@@ -646,7 +661,7 @@ SwInputChild::SwInputChild(Window* _pParent,
SwInputChild::~SwInputChild()
{
if(pDispatch)
- pDispatch->Lock(FALSE);
+ pDispatch->Lock(sal_False);
}
diff --git a/sw/source/ui/ribbar/inputwin.src b/sw/source/ui/ribbar/inputwin.src
index ae8d807b7609..bd88014a3554 100644
--- a/sw/source/ui/ribbar/inputwin.src
+++ b/sw/source/ui/ribbar/inputwin.src
@@ -44,20 +44,20 @@ ToolBox RID_TBX_FORMULA
ToolBoxItem
{
Identifier = FN_FORMULA_CALC ;
- HelpID = FN_FORMULA_CALC ;
+ HelpId = HID_TBX_FORMULA_CALC ;
DropDown = TRUE ;
Text [ en-US ] = "Formula" ;
};
ToolBoxItem
{
Identifier = FN_FORMULA_CANCEL ;
- HelpID = FN_FORMULA_CANCEL ;
+ HelpId = HID_TBX_FORMULA_CANCEL ;
Text [ en-US ] = "Cancel" ;
};
ToolBoxItem
{
Identifier = FN_FORMULA_APPLY ;
- HelpID = FN_FORMULA_APPLY ;
+ HelpId = HID_TBX_FORMULA_APPLY ;
Text [ en-US ] = "Apply" ;
};
};
@@ -281,19 +281,19 @@ String STR_TBL_FORMULA
ToolBoxItem\
{\
Identifier = FN_FORMULA_CALC ; \
- HelpID = FN_FORMULA_CALC ; \
+ HelpID = HID_TBX_FORMULA_CALC ; \
Text [ en-US ] = "Formula" ; \
};\
ToolBoxItem\
{\
Identifier = FN_FORMULA_CANCEL ; \
- HelpID = FN_FORMULA_CANCEL ; \
+ HelpId = HID_TBX_FORMULA_CANCEL ; \
Text [ en-US ] = "Cancel" ; \
};\
ToolBoxItem\
{\
Identifier = FN_FORMULA_APPLY ; \
- HelpID = FN_FORMULA_APPLY ; \
+ HelpID = HID_TBX_FORMULA_APPLY ; \
Text [ en-US ] = "Apply" ; \
};
diff --git a/sw/source/ui/ribbar/makefile.mk b/sw/source/ui/ribbar/makefile.mk
deleted file mode 100644
index 13e3600aa892..000000000000
--- a/sw/source/ui/ribbar/makefile.mk
+++ /dev/null
@@ -1,69 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=ribbar
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- tbxanchr.src \
- inputwin.src \
- tblctrl.src \
- workctrl.src
-
-EXCEPTIONSFILES = \
- $(SLO)$/conarc.obj \
- $(SLO)$/concustomshape.obj \
- $(SLO)$/conform.obj \
- $(SLO)$/conpoly.obj \
- $(SLO)$/conrect.obj \
- $(SLO)$/drawbase.obj \
- $(SLO)$/dselect.obj \
- $(SLO)$/inputwin.obj \
- $(SLO)$/tblctrl.obj \
- $(SLO)$/tbxanchr.obj \
- $(SLO)$/workctrl.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-$(SRS)$/ribbar.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc
-
diff --git a/sw/source/ui/ribbar/tblctrl.cxx b/sw/source/ui/ribbar/tblctrl.cxx
index 024886a608ed..fae82b2c568b 100644
--- a/sw/source/ui/ribbar/tblctrl.cxx
+++ b/sw/source/ui/ribbar/tblctrl.cxx
@@ -52,8 +52,8 @@ SFX_IMPL_TOOLBOX_CONTROL( SwTableOptimizeCtrl, SfxUInt16Item );
SwTableOptimizeCtrl::SwTableOptimizeCtrl(
- USHORT nSlotId,
- USHORT nId,
+ sal_uInt16 nSlotId,
+ sal_uInt16 nId,
ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx )
{
diff --git a/sw/source/ui/ribbar/tbxanchr.cxx b/sw/source/ui/ribbar/tbxanchr.cxx
index 324d802fb84d..a32d1f12c593 100644
--- a/sw/source/ui/ribbar/tbxanchr.cxx
+++ b/sw/source/ui/ribbar/tbxanchr.cxx
@@ -55,7 +55,7 @@
SFX_IMPL_TOOLBOX_CONTROL(SwTbxAnchor, SfxUInt16Item);
-SwTbxAnchor::SwTbxAnchor( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) :
+SwTbxAnchor::SwTbxAnchor( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx ),
nActAnchorId(0)
{
@@ -66,7 +66,7 @@ SwTbxAnchor::SwTbxAnchor( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) :
{
}
-void SwTbxAnchor::StateChanged( USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
+void SwTbxAnchor::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
{
GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) );
@@ -124,8 +124,8 @@ void SwTbxAnchor::Click()
aPopMenu.EnableItem( FN_TOOL_ANKER_FRAME, 0 != pWrtShell->IsFlyInFly() );
Rectangle aRect(GetToolBox().GetItemRect(GetId()));
- USHORT nHtmlMode = ::GetHtmlMode((SwDocShell*)SfxObjectShell::Current());
- BOOL bHtmlModeNoAnchor = ( nHtmlMode & HTMLMODE_ON) && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS);
+ sal_uInt16 nHtmlMode = ::GetHtmlMode((SwDocShell*)SfxObjectShell::Current());
+ sal_Bool bHtmlModeNoAnchor = ( nHtmlMode & HTMLMODE_ON) && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS);
if (bHtmlModeNoAnchor || pWrtShell->IsInHeaderFooter())
aPopMenu.RemoveItem(aPopMenu.GetItemPos(FN_TOOL_ANKER_PAGE));
@@ -134,7 +134,7 @@ void SwTbxAnchor::Click()
aPopMenu.CheckItem(nActAnchorId);
- USHORT nSlotId = aPopMenu.Execute(&GetToolBox(), aRect);
+ sal_uInt16 nSlotId = aPopMenu.Execute(&GetToolBox(), aRect);
GetToolBox().EndSelection();
if (nSlotId)
diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx
index de17591653bd..6cf63fe81ce5 100644
--- a/sw/source/ui/ribbar/workctrl.cxx
+++ b/sw/source/ui/ribbar/workctrl.cxx
@@ -73,8 +73,8 @@ SFX_IMPL_TOOLBOX_CONTROL( SwTbxInsertCtrl, SfxImageItem);
SFX_IMPL_TOOLBOX_CONTROL( SwTbxAutoTextCtrl, SfxBoolItem );
SwTbxInsertCtrl::SwTbxInsertCtrl(
- USHORT nSlotId,
- USHORT nId,
+ sal_uInt16 nSlotId,
+ sal_uInt16 nId,
ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx ),
nLastSlotId(FN_INSERT_CTRL == nSlotId ? FN_INSERT_TABLE : SID_INSERT_DIAGRAM)
@@ -99,11 +99,11 @@ void SAL_CALL SwTbxInsertCtrl::update() throw (uno::RuntimeException)
SfxToolBoxControl::update();
}
-void SwTbxInsertCtrl::StateChanged( USHORT /*nSID*/,
+void SwTbxInsertCtrl::StateChanged( sal_uInt16 /*nSID*/,
SfxItemState eState,
const SfxPoolItem* pState )
{
- USHORT nId = GetId();
+ sal_uInt16 nId = GetId();
GetToolBox().EnableItem( nId, (GetItemState(pState) != SFX_ITEM_DISABLED) );
if( eState == SFX_ITEM_AVAILABLE )
@@ -120,7 +120,7 @@ void SwTbxInsertCtrl::StateChanged( USHORT /*nSID*/,
ToolBox& rBox = GetToolBox();
Image aImage = GetImage( m_xFrame, aSlotURL, hasBigImages() );
rBox.SetItemImage(GetId(), aImage);
- rBox.SetItemImageMirrorMode( GetId(), FALSE );
+ rBox.SetItemImageMirrorMode( GetId(), sal_False );
rBox.SetItemImageAngle( GetId(), pItem->GetRotation() );
rBox.SetItemImageMirrorMode( GetId(), pItem->IsMirrored() );
}
@@ -149,7 +149,7 @@ SfxPopupWindowType SwTbxInsertCtrl::GetPopupWindowType() const
}
-void SwTbxInsertCtrl::Select( BOOL /*bMod1*/ )
+void SwTbxInsertCtrl::Select( sal_Bool /*bMod1*/ )
{
if( nLastSlotId )
{
@@ -169,8 +169,8 @@ void SwTbxInsertCtrl::Select( BOOL /*bMod1*/ )
}
SwTbxAutoTextCtrl::SwTbxAutoTextCtrl(
- USHORT nSlotId,
- USHORT nId,
+ sal_uInt16 nSlotId,
+ sal_uInt16 nId,
ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx ),
pPopup(0),
@@ -215,22 +215,22 @@ SfxPopupWindow* SwTbxAutoTextCtrl::CreatePopupWindow()
{
pPopup = new PopupMenu;
SwGlossaryList* pGlossaryList = ::GetGlossaryList();
- USHORT nGroupCount = pGlossaryList->GetGroupCount();
- for(USHORT i = 1; i <= nGroupCount; i++)
+ sal_uInt16 nGroupCount = pGlossaryList->GetGroupCount();
+ for(sal_uInt16 i = 1; i <= nGroupCount; i++)
{
// Gruppenname mit Pfad-Extension besorgen
String sTitle;
- String sGroupName = pGlossaryList->GetGroupName(i - 1, FALSE, &sTitle);
- USHORT nBlockCount = pGlossaryList->GetBlockCount(i -1);
+ String sGroupName = pGlossaryList->GetGroupName(i - 1, sal_False, &sTitle);
+ sal_uInt16 nBlockCount = pGlossaryList->GetBlockCount(i -1);
if(nBlockCount)
{
- USHORT nIndex = 100 * (i);
+ sal_uInt16 nIndex = 100 * (i);
// aber ohne extension einfuegen
pPopup->InsertItem( i, sTitle);//sGroupName.GetToken(0, GLOS_DELIM));
PopupMenu* pSub = new PopupMenu;
pSub->SetSelectHdl(aLnk);
pPopup->SetPopupMenu(i, pSub);
- for(USHORT j = 0; j < nBlockCount; j++)
+ for(sal_uInt16 j = 0; j < nBlockCount; j++)
{
String sEntry;
String sLongName(pGlossaryList->GetBlockName(i - 1, j, sEntry));
@@ -243,14 +243,14 @@ SfxPopupWindow* SwTbxAutoTextCtrl::CreatePopupWindow()
}
}
ToolBox* pToolBox = &GetToolBox();
- USHORT nId = GetId();
- pToolBox->SetItemDown( nId, TRUE );
+ sal_uInt16 nId = GetId();
+ pToolBox->SetItemDown( nId, sal_True );
pPopup->Execute( pToolBox, pToolBox->GetItemRect( nId ),
(pToolBox->GetAlign() == WINDOWALIGN_TOP || pToolBox->GetAlign() == WINDOWALIGN_BOTTOM) ?
POPUPMENU_EXECUTE_DOWN : POPUPMENU_EXECUTE_RIGHT );
- pToolBox->SetItemDown( nId, FALSE );
+ pToolBox->SetItemDown( nId, sal_False );
}
GetToolBox().EndSelection();
DelPopup();
@@ -264,7 +264,7 @@ SfxPopupWindowType SwTbxAutoTextCtrl::GetPopupWindowType() const
return SFX_POPUPWINDOW_ONTIMEOUT;
}
-void SwTbxAutoTextCtrl::StateChanged( USHORT nSID,
+void SwTbxAutoTextCtrl::StateChanged( sal_uInt16 nSID,
SfxItemState eState,
const SfxPoolItem* pState )
{
@@ -277,7 +277,7 @@ void SwTbxAutoTextCtrl::StateChanged( USHORT nSID,
IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu)
{
- USHORT nId = pMenu->GetCurItemId();
+ sal_uInt16 nId = pMenu->GetCurItemId();
if ( GetSlotId() == FN_INSERT_FIELD_CTRL)
{
@@ -313,11 +313,11 @@ IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu)
}
else
{
- USHORT nBlock = nId / 100;
+ sal_uInt16 nBlock = nId / 100;
SwGlossaryList* pGlossaryList = ::GetGlossaryList();
String sShortName;
- String sGroup = pGlossaryList->GetGroupName(nBlock - 1, FALSE);
+ String sGroup = pGlossaryList->GetGroupName(nBlock - 1, sal_False);
String sLongName(pGlossaryList->GetBlockName(nBlock - 1, nId - (100 * nBlock) - 1, sShortName));
SwGlossaryHdl* pGlosHdl = pView->GetGlosHdl();
@@ -326,7 +326,7 @@ IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu)
::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
if ( fnSetActGroup )
(*fnSetActGroup)( sGroup );
- pGlosHdl->SetCurGroup(sGroup, TRUE);
+ pGlosHdl->SetCurGroup(sGroup, sal_True);
pGlosHdl->InsertGlossary(sShortName);
}
return 0;
@@ -338,7 +338,7 @@ void SwTbxAutoTextCtrl::DelPopup()
{
if (GetSlotId() != FN_INSERT_FIELD_CTRL)
{
- for( USHORT i = 0; i < pPopup->GetItemCount(); i ++ )
+ for( sal_uInt16 i = 0; i < pPopup->GetItemCount(); i ++ )
{
PopupMenu* pSubPopup = pPopup->GetPopupMenu(pPopup->GetItemId(i));
delete pSubPopup;
@@ -351,7 +351,7 @@ void SwTbxAutoTextCtrl::DelPopup()
/* Navigations-Popup */
// determine the order of the toolbox items
-static USHORT const aNavigationInsertIds[ NAVI_ENTRIES ] =
+static sal_uInt16 aNavigationInsertIds[ NAVI_ENTRIES ] =
{
// -- first line
NID_TBL,
@@ -376,7 +376,7 @@ static USHORT const aNavigationInsertIds[ NAVI_ENTRIES ] =
NID_TABLE_FORMULA_ERROR,
NID_NEXT
};
-static USHORT const aNavigationHelpIds[ NAVI_ENTRIES ] =
+static const char* aNavigationHelpIds[ NAVI_ENTRIES ] =
{
// -- first line
HID_NID_TBL,
@@ -402,7 +402,7 @@ static USHORT const aNavigationHelpIds[ NAVI_ENTRIES ] =
HID_NID_NEXT
};
-SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFrame )
+SwScrollNaviPopup::SwScrollNaviPopup( sal_uInt16 nId, const Reference< XFrame >& rFrame )
: SfxPopupWindow(nId, rFrame, SW_RES(RID_SCROLL_NAVIGATION_WIN) ),
aToolBox(this, 0),
aSeparator(this, SW_RES(FL_SEP)),
@@ -411,20 +411,20 @@ SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFr
nFwdId(FN_START_OF_NEXT_PAGE),
nBackId(FN_START_OF_PREV_PAGE)
{
- USHORT i;
+ sal_uInt16 i;
aToolBox.SetHelpId(HID_NAVI_VS);
aToolBox.SetLineCount( 2 );
aToolBox.SetOutStyle(TOOLBOX_STYLE_FLAT);
for( i = 0; i < NID_COUNT; i++)
{
- USHORT nNaviId = aNavigationInsertIds[i];
+ sal_uInt16 nNaviId = aNavigationInsertIds[i];
String sText;
ToolBoxItemBits nTbxBits = 0;
if((NID_PREV != nNaviId) && (NID_NEXT != nNaviId))
{
// -2, there's no string for Next/Prev
- USHORT nResStr = ST_TBL - 2 + nNaviId - NID_START;
+ sal_uInt16 nResStr = ST_TBL - 2 + nNaviId - NID_START;
sText = String(SW_RES(nResStr));
nTbxBits = TIB_CHECKABLE;
}
@@ -447,7 +447,7 @@ SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFr
aImgSize.Height() += 5;
Size aSz = aToolBox.CalcWindowSizePixel(2);
aToolBox.SetPosSizePixel( Point(), aSz );
- USHORT nItemId = SwView::GetMoveType();
+ sal_uInt16 nItemId = SwView::GetMoveType();
aInfoField.SetText(aToolBox.GetItemText(nItemId));
aToolBox.CheckItem( nItemId, sal_True );
Size aFTSize(aInfoField.GetSizePixel());
@@ -483,9 +483,9 @@ void SwScrollNaviPopup::DataChanged( const DataChangedEvent& rDCEvt )
void SwScrollNaviPopup::ApplyImageList()
{
ImageList& rImgLst = aIList;
- for(USHORT i = 0; i < NID_COUNT; i++)
+ for(sal_uInt16 i = 0; i < NID_COUNT; i++)
{
- USHORT nNaviId = aNavigationInsertIds[i];
+ sal_uInt16 nNaviId = aNavigationInsertIds[i];
aToolBox.SetItemImage(nNaviId, rImgLst.GetImage(nNaviId));
}
}
@@ -497,7 +497,7 @@ SfxPopupWindow* SwScrollNaviPopup::Clone() const
IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet)
{
- USHORT nSet = pSet->GetCurItemId();
+ sal_uInt16 nSet = pSet->GetCurItemId();
if( nSet != NID_PREV && nSet != NID_NEXT )
{
SwView::SetMoveType(nSet);
@@ -505,9 +505,9 @@ IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet)
aToolBox.SetItemText(NID_PREV, sQuickHelp[nSet - NID_START + NID_COUNT]);
aInfoField.SetText(aToolBox.GetItemText(nSet));
//check the current button only
- for(USHORT i = 0; i < NID_COUNT; i++)
+ for(sal_uInt16 i = 0; i < NID_COUNT; i++)
{
- USHORT nItemId = aToolBox.GetItemId( i );
+ sal_uInt16 nItemId = aToolBox.GetItemId( i );
aToolBox.CheckItem( nItemId, nItemId == nSet );
}
}
@@ -535,15 +535,15 @@ void SwScrollNaviToolBox::MouseButtonUp( const MouseEvent& rMEvt )
void SwScrollNaviToolBox::RequestHelp( const HelpEvent& rHEvt )
{
- SetItemText(NID_NEXT, SwScrollNaviPopup::GetQuickHelpText(TRUE));
- SetItemText(NID_PREV, SwScrollNaviPopup::GetQuickHelpText(FALSE));
+ SetItemText(NID_NEXT, SwScrollNaviPopup::GetQuickHelpText(sal_True));
+ SetItemText(NID_PREV, SwScrollNaviPopup::GetQuickHelpText(sal_False));
ToolBox::RequestHelp( rHEvt );
}
-String SwScrollNaviPopup::GetQuickHelpText(BOOL bNext)
+String SwScrollNaviPopup::GetQuickHelpText(sal_Bool bNext)
{
- USHORT nResId = STR_IMGBTN_START;
+ sal_uInt16 nResId = STR_IMGBTN_START;
nResId += SwView::GetMoveType() - NID_START;
if(!bNext)
nResId += NID_COUNT;
@@ -639,14 +639,14 @@ void SwNaviImageButton::DataChanged( const DataChangedEvent& rDCEvt )
class SwZoomBox_Impl : public ComboBox
{
- USHORT nSlotId;
- BOOL bRelease;
+ sal_uInt16 nSlotId;
+ sal_Bool bRelease;
uno::Reference< frame::XDispatchProvider > m_xDispatchProvider;
public:
SwZoomBox_Impl(
Window* pParent,
- USHORT nSlot,
+ sal_uInt16 nSlot,
const Reference< XDispatchProvider >& rDispatchProvider );
~SwZoomBox_Impl();
@@ -660,17 +660,17 @@ protected:
SwZoomBox_Impl::SwZoomBox_Impl(
Window* pParent,
- USHORT nSlot,
+ sal_uInt16 nSlot,
const Reference< XDispatchProvider >& rDispatchProvider ):
ComboBox( pParent, SW_RES(RID_PVIEW_ZOOM_LB)),
nSlotId(nSlot),
- bRelease(TRUE),
+ bRelease(sal_True),
m_xDispatchProvider( rDispatchProvider )
{
- EnableAutocomplete( FALSE );
- USHORT aZoomValues[] =
+ EnableAutocomplete( sal_False );
+ sal_uInt16 aZoomValues[] =
{ 25, 50, 75, 100, 150, 200 };
- for(USHORT i = 0; i < sizeof(aZoomValues)/sizeof(USHORT); i++)
+ for(sal_uInt16 i = 0; i < sizeof(aZoomValues)/sizeof(sal_uInt16); i++)
{
String sEntry = String::CreateFromInt32(aZoomValues[i]);
sEntry += '%';
@@ -687,7 +687,7 @@ void SwZoomBox_Impl::Select()
{
String sEntry(GetText());
sEntry.EraseAllChars( '%' );
- USHORT nZoom = (USHORT)sEntry.ToInt32();
+ sal_uInt16 nZoom = (sal_uInt16)sEntry.ToInt32();
if(nZoom < MINZOOM)
nZoom = MINZOOM;
if(nZoom > MAXZOOM)
@@ -717,7 +717,7 @@ long SwZoomBox_Impl::Notify( NotifyEvent& rNEvt )
if ( rNEvt.GetType() == EVENT_KEYINPUT )
{
- USHORT nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode();
+ sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode();
switch ( nCode )
{
@@ -725,7 +725,7 @@ long SwZoomBox_Impl::Notify( NotifyEvent& rNEvt )
case KEY_TAB:
{
if ( KEY_TAB == nCode )
- bRelease = FALSE;
+ bRelease = sal_False;
else
nHandled = 1;
Select();
@@ -752,7 +752,7 @@ void SwZoomBox_Impl::ReleaseFocus()
{
if ( !bRelease )
{
- bRelease = TRUE;
+ bRelease = sal_True;
return;
}
SfxViewShell* pCurSh = SfxViewShell::Current();
@@ -769,8 +769,8 @@ void SwZoomBox_Impl::ReleaseFocus()
SFX_IMPL_TOOLBOX_CONTROL( SwPreviewZoomControl, SfxUInt16Item);
SwPreviewZoomControl::SwPreviewZoomControl(
- USHORT nSlotId,
- USHORT nId,
+ sal_uInt16 nSlotId,
+ sal_uInt16 nId,
ToolBox& rTbx) :
SfxToolBoxControl( nSlotId, nId, rTbx )
{
@@ -780,11 +780,11 @@ SwPreviewZoomControl::~SwPreviewZoomControl()
{
}
-void SwPreviewZoomControl::StateChanged( USHORT /*nSID*/,
+void SwPreviewZoomControl::StateChanged( sal_uInt16 /*nSID*/,
SfxItemState eState,
const SfxPoolItem* pState )
{
- USHORT nId = GetId();
+ sal_uInt16 nId = GetId();
GetToolBox().EnableItem( nId, (GetItemState(pState) != SFX_ITEM_DISABLED) );
SwZoomBox_Impl* pBox = (SwZoomBox_Impl*)GetToolBox().GetItemWindow( GetId() );
if(SFX_ITEM_AVAILABLE <= eState)
diff --git a/sw/source/ui/ribbar/workctrl.src b/sw/source/ui/ribbar/workctrl.src
index 651cd4af8980..ce0163974f6d 100644
--- a/sw/source/ui/ribbar/workctrl.src
+++ b/sw/source/ui/ribbar/workctrl.src
@@ -32,136 +32,9 @@
#include <svx/globlmn.hrc>
#endif
#include "workctrl.hrc"
-#include "workctrl.hrc"
#include "helpid.h"
#include "cmdid.h"
-FloatingWindow RID_INSERT_CTRL
-{
- Moveable = TRUE ;
- Closeable = TRUE ;
- Hide = TRUE ;
- SVLook = TRUE ;
- HelpID = HID_INSERT_CTRL ;
- ToolBox TBX_INSERT
- {
- MenuStrings = TRUE ;
- SVLook = TRUE ;
- HelpID = 1 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = FN_INSERT_FRAME_INTERACT_NOCOL ;
- HelpID = FN_INSERT_FRAME_INTERACT_NOCOL ;
- };
- ToolBoxItem
- {
- Identifier = FN_INSERT_FRAME_INTERACT ;
- HelpID = FN_INSERT_FRAME_INTERACT ;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_INSERT_GRAPHIC ;
- HelpID = SID_INSERT_GRAPHIC ;
- };
- ToolBoxItem
- {
- Identifier = FN_INSERT_TABLE ;
- HelpID = FN_INSERT_TABLE ;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_INSERTDOC ;
- HelpID = SID_INSERTDOC ;
- };
- ToolBoxItem
- {
- Identifier = FN_INSERT_FOOTNOTE ;
- HelpID = FN_INSERT_FOOTNOTE ;
- };
- ToolBoxItem
- {
- Identifier = FN_INSERT_ENDNOTE ;
- HelpID = FN_INSERT_ENDNOTE ;
- };
- ToolBoxItem
- {
- Identifier = FN_INSERT_SYMBOL ;
- HelpID = FN_INSERT_SYMBOL ;
- };
- ToolBoxItem
- {
- Identifier = FN_INSERT_REGION ;
- HelpID = FN_INSERT_REGION;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = FN_INSERT_IDX_ENTRY_DLG ;
- HelpID = FN_INSERT_IDX_ENTRY_DLG ;
- };
- ToolBoxItem
- {
- Identifier = FN_INSERT_BOOKMARK ;
- HelpID = FN_INSERT_BOOKMARK ;
- RadioCheck = TRUE ;
- };
- };
- };
- Text [ en-US ] = "Insert" ;
-};
-FloatingWindow RID_INSERT_OBJ_CTRL
-{
- Moveable = TRUE ;
- Closeable = TRUE ;
- Hide = TRUE ;
- SVLook = TRUE ;
- HelpID = HID_INSERT_OBJ_CTRL ;
- ToolBox TBX_OBJ_INSERT
- {
- MenuStrings = TRUE ;
- SVLook = TRUE ;
- HelpID = 1 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_INSERT_DIAGRAM ;
- HelpID = SID_INSERT_DIAGRAM ;
- };
- ToolBoxItem
- {
- Identifier = FN_INSERT_SMA ;
- HelpID = FN_INSERT_SMA ;
- };
- ToolBoxItem
- {
- Identifier = SID_INSERT_FLOATINGFRAME ;
- HelpID = SID_INSERT_FLOATINGFRAME ;
- };
- ToolBoxItem
- {
- Identifier = SID_INSERT_OBJECT ;
- HelpID = SID_INSERT_OBJECT ;
- };
- ToolBoxItem
- {
- Identifier = SID_INSERT_PLUGIN ;
- HelpID = SID_INSERT_PLUGIN ;
- };
-#ifdef SOLAR_JAVA
- ToolBoxItem
- {
- Identifier = SID_INSERT_APPLET ;
- HelpID = SID_INSERT_APPLET ;
- };
-#endif
- };
- };
- Text [ en-US ] = "Insert Object" ;
-};
+
Menu RID_INSERT_FIELD_CTRL
{
ItemList =
@@ -169,43 +42,43 @@ Menu RID_INSERT_FIELD_CTRL
MenuItem
{
Identifier = FN_INSERT_FLD_DATE ;
- HelpID = FN_INSERT_FLD_DATE ;
+ HelpId = CMD_FN_INSERT_FLD_DATE ;
Text [ en-US ] = "Date" ;
};
MenuItem
{
Identifier = FN_INSERT_FLD_TIME ;
- HelpID = FN_INSERT_FLD_TIME ;
+ HelpId = CMD_FN_INSERT_FLD_TIME ;
Text [ en-US ] = "Time" ;
};
MenuItem
{
Identifier = FN_INSERT_FLD_PGNUMBER ;
- HelpID = FN_INSERT_FLD_PGNUMBER ;
+ HelpId = CMD_FN_INSERT_FLD_PGNUMBER ;
Text [ en-US ] = "Page Number" ;
};
MenuItem
{
Identifier = FN_INSERT_FLD_PGCOUNT ;
- HelpID = FN_INSERT_FLD_PGCOUNT ;
+ HelpId = CMD_FN_INSERT_FLD_PGCOUNT ;
Text [ en-US ] = "Page Count" ;
};
MenuItem
{
Identifier = FN_INSERT_FLD_TOPIC ;
- HelpID = FN_INSERT_FLD_TOPIC ;
+ HelpId = CMD_FN_INSERT_FLD_TOPIC ;
Text [ en-US ] = "Subject" ;
};
MenuItem
{
Identifier = FN_INSERT_FLD_TITLE ;
- HelpID = FN_INSERT_FLD_TITLE ;
+ HelpId = CMD_FN_INSERT_FLD_TITLE ;
Text [ en-US ] = "Title" ;
};
MenuItem
{
Identifier = FN_INSERT_FLD_AUTHOR ;
- HelpID = FN_INSERT_FLD_AUTHOR ;
+ HelpId = CMD_FN_INSERT_FLD_AUTHOR ;
Text [ en-US ] = "Author" ;
};
MenuItem
@@ -215,7 +88,7 @@ Menu RID_INSERT_FIELD_CTRL
MenuItem
{
Identifier = FN_INSERT_FIELD ;
- HelpID = FN_INSERT_FIELD ;
+ HelpId = CMD_FN_INSERT_FIELD ;
Text [ en-US ] = "Other..." ;
};
};
diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx
index 61f83828edd7..fa80e015f081 100644
--- a/sw/source/ui/shells/annotsh.cxx
+++ b/sw/source/ui/shells/annotsh.cxx
@@ -160,7 +160,7 @@ SwAnnotationShell::~SwAnnotationShell()
{
}
-SfxUndoManager* SwAnnotationShell::GetUndoManager()
+::svl::IUndoManager* SwAnnotationShell::GetUndoManager()
{
SwPostItMgr* pPostItMgr = rView.GetPostItMgr();
if ( !pPostItMgr ||
@@ -265,9 +265,9 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
Outliner * pOutliner = pOLV->GetOutliner();
if(pOutliner)
{
- ULONG nParaCount = pOutliner->GetParagraphCount();
+ sal_uLong nParaCount = pOutliner->GetParagraphCount();
if (nParaCount > 0)
- pOLV->SelectRange(0L, USHORT(nParaCount) );
+ pOLV->SelectRange(0L, sal_uInt16(nParaCount) );
}
break;
}
@@ -362,7 +362,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
{
const SfxPoolItem* pItem = 0;
if(pNewAttrs)
- pNewAttrs->GetItemState(nSlot, FALSE, &pItem );
+ pNewAttrs->GetItemState(nSlot, sal_False, &pItem );
if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED)
pOLV->InsertText(((const SfxStringItem *)pItem)->GetValue());
break;
@@ -414,7 +414,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
SwDocStat aCurr;
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
{
- SwWait aWait( *rView.GetDocShell(), TRUE );
+ SwWait aWait( *rView.GetDocShell(), sal_True );
rSh.StartAction();
rSh.CountWords( aCurr );
rSh.UpdateDocStat( aDocStat );
@@ -452,7 +452,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg( rView.GetWindow(), rView, aDlgAttr, DLG_CHAR,0, sal_True );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet )
{
rReq.Done( *( pDlg->GetOutputItemSet() ) );
@@ -500,7 +500,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
SfxAbstractTabDialog* pDlg = pFact->CreateSwParaDlg( rView.GetWindow(), rView, aDlgAttr,DLG_STD, DLG_PARA, 0, sal_True );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet)
{
rReq.Done( *( pDlg->GetOutputItemSet() ) );
@@ -526,7 +526,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
sal_Bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT;
const SfxPoolItem* pPoolItem;
- if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, TRUE, &pPoolItem ) )
+ if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, sal_True, &pPoolItem ) )
{
if( !( (SfxBoolItem*)pPoolItem)->GetValue() )
bLeftToRight = !bLeftToRight;
@@ -536,8 +536,8 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
0 );
- USHORT nAdjust = SVX_ADJUST_LEFT;
- if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, TRUE, &pPoolItem ) )
+ sal_uInt16 nAdjust = SVX_ADJUST_LEFT;
+ if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, sal_True, &pPoolItem ) )
nAdjust = ( (SvxAdjustItem*)pPoolItem)->GetEnumValue();
if( bLeftToRight )
@@ -590,7 +590,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
while(nWhich)
{
sal_uInt16 nEEWhich = 0;
- USHORT nSlotId = GetPool().GetSlotId( nWhich );
+ sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich );
switch( nSlotId )
{
case SID_ATTR_CHAR_FONT:
@@ -600,12 +600,12 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
{
if ( pOLV )
{
- USHORT nScriptType = pOLV->GetSelectedScriptType();
+ sal_uInt16 nScriptType = pOLV->GetSelectedScriptType();
SfxItemPool* pSecondPool = aEditAttr.GetPool()->GetSecondaryPool();
if( !pSecondPool )
pSecondPool = aEditAttr.GetPool();
SvxScriptSetItem aSetItem( nSlotId, *pSecondPool );
- aSetItem.GetItemSet().Put( aEditAttr, FALSE );
+ aSetItem.GetItemSet().Put( aEditAttr, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType );
if( pI )
rSet.Put( *pI, nWhich );
@@ -626,7 +626,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
case FN_SET_SUPER_SCRIPT:
case FN_SET_SUB_SCRIPT:
{
- USHORT nEsc = 0;
+ sal_uInt16 nEsc = 0;
const SfxPoolItem *pEscItem = 0;
if (nWhich==FN_SET_SUPER_SCRIPT)
nEsc = SVX_ESCAPEMENT_SUPERSCRIPT;
@@ -726,7 +726,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
rSet.DisableItem( nWhich );
else
{
- BOOL bFlag = FALSE;
+ sal_Bool bFlag = sal_False;
switch( ( ( (SvxFrameDirectionItem&) aEditAttr.Get( EE_PARA_WRITINGDIR ) ) ).GetValue() )
{
case FRMDIR_HORI_LEFT_TOP:
@@ -773,7 +773,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
}
}
-void SwAnnotationShell::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
+void SwAnnotationShell::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
{
rView.ExecSearch(rReq,bNoMessage);
}
@@ -821,7 +821,7 @@ void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq)
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( &rView.GetEditWin() ) );
- ULONG nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() );
+ sal_uLong nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() );
if (nFormat > 0)
{
@@ -836,9 +836,9 @@ void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq)
}
case SID_CLIPBOARD_FORMAT_ITEMS:
{
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
const SfxPoolItem* pItem;
- if ( rReq.GetArgs() && rReq.GetArgs()->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET &&
+ if ( rReq.GetArgs() && rReq.GetArgs()->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET &&
pItem->ISA(SfxUInt32Item) )
{
nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
@@ -915,7 +915,7 @@ void SwAnnotationShell::StateClpbrd(SfxItemSet &rSet)
void SwAnnotationShell::StateStatusLine(SfxItemSet &rSet)
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
@@ -1006,7 +1006,6 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
case FN_REPLY:
case FN_POSTIT:
case FN_DELETE_COMMENT:
- case FN_DELETE_NOTE:
if ( pPostItMgr->HasActiveSidebarWin() )
pPostItMgr->GetActiveSidebarWin()->ExecuteCommand(nSlot);
break;
@@ -1015,7 +1014,7 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
break;
case FN_DELETE_NOTE_AUTHOR:
{
- SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, nSlot, FALSE);
+ SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, nSlot, sal_False);
if ( pItem )
pPostItMgr->Delete( pItem->GetValue() );
break;
@@ -1027,7 +1026,7 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
break;
case FN_HIDE_NOTE_AUTHOR:
{
- SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, nSlot, FALSE);
+ SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, nSlot, sal_False);
if ( pItem )
pPostItMgr->Hide( pItem->GetValue() );
}
@@ -1041,28 +1040,19 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet)
sal_uInt16 nWhich = aIter.FirstWhich();
while(nWhich)
{
- USHORT nSlotId = GetPool().GetSlotId( nWhich );
+ sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich );
switch( nSlotId )
{
case FN_POSTIT:
- case FN_DELETE_NOTE:
case FN_DELETE_NOTE_AUTHOR:
case FN_DELETE_ALL_NOTES:
case FN_HIDE_NOTE:
case FN_HIDE_NOTE_AUTHOR:
case FN_HIDE_ALL_NOTES:
- {
- if ( !pPostItMgr ||
- !pPostItMgr->HasActiveAnnotationWin() )
- {
- rSet.DisableItem(nWhich);
- }
- break;
- }
case FN_DELETE_COMMENT:
{
if ( !pPostItMgr ||
- !pPostItMgr->HasActiveSidebarWin() /*HasActiveRedCommentWin()*/ )
+ !pPostItMgr->HasActiveAnnotationWin() )
{
rSet.DisableItem(nWhich);
}
@@ -1095,7 +1085,7 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet)
if (pPostItMgr->HasActiveSidebarWin())
{
if ( (pPostItMgr->GetActiveSidebarWin()->IsProtected()) &&
- ( (nSlotId==FN_DELETE_NOTE) || (nSlotId==FN_REPLY) ) )
+ ( (nSlotId==FN_DELETE_COMMENT) || (nSlotId==FN_REPLY) ) )
rSet.DisableItem( nWhich );
}
nWhich = aIter.NextWhich();
@@ -1269,7 +1259,7 @@ void SwAnnotationShell::GetLinguState(SfxItemSet &rSet)
{
const SfxPoolItem &rItem = rView.GetWrtShell().GetDoc()->GetDefault(
GetWhichOfScript( RES_CHRATR_LANGUAGE,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage())) );
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage())) );
LanguageType nLang = ((const SvxLanguageItem &)
rItem).GetLanguage();
uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
@@ -1355,17 +1345,17 @@ void SwAnnotationShell::ExecTransliteration(SfxRequest &rReq)
void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
- SfxUndoManager* pUndoManager = GetUndoManager();
+ ::svl::IUndoManager* pUndoManager = GetUndoManager();
SwWrtShell &rSh = rView.GetWrtShell();
long aOldHeight = rView.GetPostItMgr()->HasActiveSidebarWin()
? rView.GetPostItMgr()->GetActiveSidebarWin()->GetPostItTextHeight()
: 0;
- USHORT nId = rReq.GetSlot();
+ sal_uInt16 nId = rReq.GetSlot();
sal_uInt16 nCnt = 1;
const SfxPoolItem* pItem=0;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, FALSE, &pItem ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, sal_False, &pItem ) )
nCnt = ((SfxUInt16Item*)pItem)->GetValue();
switch( nId )
{
@@ -1384,7 +1374,7 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
nCnt = 0;
while( nSteps-- )
- pUndoManager->Undo(0);
+ pUndoManager->Undo();
}
if ( nCnt )
@@ -1408,7 +1398,7 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
nCnt = 0;
while( nSteps-- )
- pUndoManager->Redo(0);
+ pUndoManager->Redo();
}
if ( nCnt )
@@ -1431,8 +1421,8 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
return;
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
- SfxUndoManager* pUndoManager = GetUndoManager();
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ ::svl::IUndoManager* pUndoManager = GetUndoManager();
SfxViewFrame *pSfxViewFrame = rView.GetViewFrame();
SwWrtShell &rSh = rView.GetWrtShell();
@@ -1445,8 +1435,10 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
sal_uInt16 nCount = pUndoManager->GetUndoActionCount();
if ( nCount )
pSfxViewFrame->GetSlotState( nWhich, pSfxViewFrame->GetInterface(), &rSet );
- else if( rSh.GetUndoIds() )
+ else if (rSh.GetLastUndoInfo(0, 0))
+ {
rSet.Put( SfxStringItem( nWhich, rSh.GetDoString(SwWrtShell::UNDO)) );
+ }
else
rSet.DisableItem(nWhich);
break;
@@ -1456,8 +1448,10 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
sal_uInt16 nCount = pUndoManager->GetRedoActionCount();
if ( nCount )
pSfxViewFrame->GetSlotState( nWhich, pSfxViewFrame->GetInterface(), &rSet );
- else if(rSh.GetRedoIds())
+ else if (rSh.GetFirstRedoInfo(0))
+ {
rSet.Put(SfxStringItem( nWhich, rSh.GetDoString(SwWrtShell::REDO)) );
+ }
else
rSet.DisableItem(nWhich);
break;
@@ -1467,34 +1461,36 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
{
if( pUndoManager )
{
- UniString (SfxUndoManager:: *fnGetComment)( USHORT ) const;
+ UniString (::svl::IUndoManager:: *fnGetComment)( size_t, bool const ) const;
sal_uInt16 nCount;
if( SID_GETUNDOSTRINGS == nWhich )
{
nCount = pUndoManager->GetUndoActionCount();
- fnGetComment = &SfxUndoManager::GetUndoActionComment;
+ fnGetComment = &::svl::IUndoManager::GetUndoActionComment;
}
else
{
nCount = pUndoManager->GetRedoActionCount();
- fnGetComment = &SfxUndoManager::GetRedoActionComment;
+ fnGetComment = &::svl::IUndoManager::GetRedoActionComment;
}
String sList;
if( nCount )
{
for( sal_uInt16 n = 0; n < nCount; ++n )
- ( sList += (pUndoManager->*fnGetComment)( n ) )
+ ( sList += (pUndoManager->*fnGetComment)( n, ::svl::IUndoManager::TopLevel ) )
+= '\n';
}
SfxStringListItem aItem( nWhich );
- if( nWhich == SID_GETUNDOSTRINGS && rSh.GetUndoIds() )
+ if ((nWhich == SID_GETUNDOSTRINGS) &&
+ rSh.GetLastUndoInfo(0, 0))
{
rSh.GetDoStrings( SwWrtShell::UNDO, aItem );
}
- else if( nWhich == SID_GETREDOSTRINGS && rSh.GetRedoIds() )
+ else if ((nWhich == SID_GETREDOSTRINGS) &&
+ (rSh.GetFirstRedoInfo(0)))
{
rSh.GetDoStrings( SwWrtShell::UNDO, aItem );
}
@@ -1526,7 +1522,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
void SwAnnotationShell::StateDisableItems( SfxItemSet &rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
rSet.DisableItem( nWhich );
@@ -1545,7 +1541,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if( pArgs )
- pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), sal_False, &pItem);
String sSym;
String sFontName;
@@ -1553,25 +1549,25 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
{
sSym = ((const SfxStringItem*)pItem)->GetValue();
const SfxPoolItem* pFtItem = NULL;
- pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem);
+ pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), sal_False, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
sFontName = pFontItem->GetValue();
}
SfxItemSet aSet(pOLV->GetAttribs());
- USHORT nScript = pOLV->GetSelectedScriptType();
+ sal_uInt16 nScript = pOLV->GetSelectedScriptType();
SvxFontItem aSetDlgFont( RES_CHRATR_FONT );
{
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, *aSet.GetPool() );
- aSetItem.GetItemSet().Put( aSet, FALSE );
+ aSetItem.GetItemSet().Put( aSet, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript );
if( pI )
aSetDlgFont = *(SvxFontItem*)pI;
else
aSetDlgFont = (SvxFontItem&)aSet.Get( GetWhichOfScript(
SID_ATTR_CHAR_FONT,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) ));
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ) ));
if (!sFontName.Len())
sFontName = aSetDlgFont.GetFamilyName();
}
@@ -1582,7 +1578,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAllItemSet aAllSet( GetPool() );
- aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) );
SwViewOption aOpt(*rView.GetWrtShell().GetViewOptions());
String sSymbolFont = aOpt.GetSymbolFont();
@@ -1595,11 +1591,11 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( rView.GetWindow(), aAllSet,
rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
if( nResult == RET_OK )
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE );
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, sal_False );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False );
if ( pFontItem )
{
aFont.SetName( pFontItem->GetFamilyName() );
@@ -1624,7 +1620,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
// nicht flackern
pOLV->HideCursor();
Outliner * pOutliner = pOLV->GetOutliner();
- pOutliner->SetUpdateMode(FALSE);
+ pOutliner->SetUpdateMode(sal_False);
SfxItemSet aOldSet( pOLV->GetAttribs() );
SfxItemSet aFontSet( *aOldSet.GetPool(),
@@ -1643,7 +1639,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
aFont.GetStyleName(), aFont.GetPitch(),
aFont.GetCharSet(),
EE_CHAR_FONTINFO );
- USHORT nScriptBreak = pBreakIt->GetAllScriptsOfText( sSym );
+ sal_uInt16 nScriptBreak = pBreakIt->GetAllScriptsOfText( sSym );
if( SCRIPTTYPE_LATIN & nScriptBreak )
aSetFont.Put( aFontItem, EE_CHAR_FONTINFO );
if( SCRIPTTYPE_ASIAN & nScriptBreak )
@@ -1662,7 +1658,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
pOLV->SetAttribs( aFontSet );
// ab jetzt wieder anzeigen
- pOutliner->SetUpdateMode(TRUE);
+ pOutliner->SetUpdateMode(sal_True);
pOLV->ShowCursor();
rReq.AppendItem( SfxStringItem( GetPool().GetWhich(SID_CHARMAP), sSym ) );
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index ef3105f1c203..860e73385a9d 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <sot/factory.hxx>
#include <hintids.hxx>
#include <svl/urihelper.hxx>
@@ -113,7 +114,6 @@
#include <instable.hxx>
#include <svx/fmshell.hxx> // for FN_XFORMS_DESIGN_MODE
#include <SwRewriter.hxx>
-#include <undobj.hxx>
#include <comcore.hrc>
#include <unomid.h>
@@ -122,19 +122,16 @@ FlyMode SwBaseShell::eFrameMode = FLY_DRAG_END;
//Fuer die Erkennung der Id, die variable von Gallery mit SID_GALLERY_BG_BRUSH
//ankommt.
-static BYTE nParagraphPos;
-static BYTE nGraphicPos;
-static BYTE nOlePos;
-static BYTE nFramePos;
-static BYTE nTablePos;
-static BYTE nTableRowPos;
-static BYTE nTableCellPos;
-static BYTE nPagePos;
-static BYTE nHeaderPos;
-static BYTE nFooterPos;
-
-#define Interior
-#include <svx/svxslots.hxx>
+static sal_uInt8 nParagraphPos;
+static sal_uInt8 nGraphicPos;
+static sal_uInt8 nOlePos;
+static sal_uInt8 nFramePos;
+static sal_uInt8 nTablePos;
+static sal_uInt8 nTableRowPos;
+static sal_uInt8 nTableCellPos;
+static sal_uInt8 nPagePos;
+static sal_uInt8 nHeaderPos;
+static sal_uInt8 nFooterPos;
#define SwBaseShell
#define Shadow
@@ -186,11 +183,11 @@ void lcl_UpdateIMapDlg( SwWrtShell& rSh )
delete pList;
}
-BOOL lcl_UpdateContourDlg( SwWrtShell &rSh, int nSel )
+sal_Bool lcl_UpdateContourDlg( SwWrtShell &rSh, int nSel )
{
Graphic aGraf( rSh.GetIMapGraphic() );
GraphicType nGrfType = aGraf.GetType();
- BOOL bRet = GRAPHIC_NONE != nGrfType && GRAPHIC_DEFAULT != nGrfType;
+ sal_Bool bRet = GRAPHIC_NONE != nGrfType && GRAPHIC_DEFAULT != nGrfType;
if( bRet )
{
String aGrfName;
@@ -222,7 +219,7 @@ void SwBaseShell::ExecDelete(SfxRequest &rReq)
if( rSh.IsNoNum() )
{
rSh.SttCrsrMove();
- BOOL bLeft = rSh.Left( CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ sal_Bool bLeft = rSh.Left( CRSR_SKIP_CHARS, sal_True, 1, sal_False );
if( bLeft )
{
rSh.DelLeft();
@@ -258,7 +255,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
- USHORT nId = rReq.GetSlot();
+ sal_uInt16 nId = rReq.GetSlot();
sal_Bool bIgnore = sal_False;
switch( nId )
{
@@ -274,8 +271,8 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
pTransfer->Cut();
else
{
- const BOOL bLockedView = rSh.IsViewLocked();
- rSh.LockView( TRUE ); //lock visible section
+ const sal_Bool bLockedView = rSh.IsViewLocked();
+ rSh.LockView( sal_True ); //lock visible section
pTransfer->Copy();
rSh.LockView( bLockedView );
}
@@ -309,7 +306,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pFmt;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, FALSE, &pFmt ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, sal_False, &pFmt ) )
{
TransferableDataHelper aDataHelper(
TransferableDataHelper::CreateFromSystemClipboard(
@@ -381,7 +378,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
// temp. Variablen, da die Shell nach dem Paste schon
// zerstoert sein kann
SwView* pView = &rView;
- ULONG nFormatId = 0;
+ sal_uLong nFormatId = 0;
rReq.Ignore();
bIgnore = sal_True;
int nRet = SwTransferable::PasteSpecial( rSh, aDataHelper, nFormatId );
@@ -421,9 +418,9 @@ void SwBaseShell::StateClpbrd(SfxItemSet &rSet)
SwWrtShell &rSh = GetShell();
SfxWhichIter aIter(rSet);
- const BOOL bCopy = rSh.HasSelection();
+ const sal_Bool bCopy = rSh.HasSelection();
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while(nWhich)
{
@@ -476,10 +473,10 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
- USHORT nId = rReq.GetSlot(), nCnt = 1;
+ sal_uInt16 nId = rReq.GetSlot(), nCnt = 1;
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, FALSE, &pItem ))
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, sal_False, &pItem ))
nCnt = ((SfxUInt16Item*)pItem)->GetValue();
// #i106349#: save pointer: undo/redo may delete the shell, i.e., this!
@@ -516,42 +513,48 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
{
SwWrtShell &rSh = GetShell();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while(nWhich)
{
switch(nWhich)
{
case SID_UNDO:
{
- if( rSh.GetUndoIds() )
+ if (rSh.GetLastUndoInfo(0, 0))
+ {
rSet.Put( SfxStringItem(nWhich,
rSh.GetDoString(SwWrtShell::UNDO)));
+ }
else
rSet.DisableItem(nWhich);
break;
}
case SID_REDO:
{
- if(rSh.GetRedoIds())
+ if (rSh.GetFirstRedoInfo(0))
+ {
rSet.Put(SfxStringItem(nWhich,
rSh.GetDoString(SwWrtShell::REDO)));
+ }
else
rSet.DisableItem(nWhich);
break;
}
case SID_REPEAT:
{ // Repeat nur moeglich wenn kein REDO moeglich - UI-Restriktion
- if(rSh.GetRedoIds() == UNDO_EMPTY &&
+ if ((!rSh.GetFirstRedoInfo(0)) &&
!rSh.IsSelFrmMode() &&
- rSh.GetRepeatIds() )
+ (UNDO_EMPTY != rSh.GetRepeatInfo(0)))
+ {
rSet.Put(SfxStringItem(nWhich, rSh.GetRepeatString()));
+ }
else
rSet.DisableItem(nWhich);
break;
}
case SID_GETUNDOSTRINGS:
- if( rSh.GetUndoIds() )
+ if (rSh.GetLastUndoInfo(0, 0))
{
SfxStringListItem aStrLst( nWhich );
rSh.GetDoStrings( SwWrtShell::UNDO, aStrLst );
@@ -562,7 +565,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
break;
case SID_GETREDOSTRINGS:
- if( rSh.GetRedoIds() )
+ if (rSh.GetFirstRedoInfo(0))
{
SfxStringListItem aStrLst( nWhich );
rSh.GetDoStrings( SwWrtShell::REDO, aStrLst );
@@ -584,9 +587,9 @@ void SwBaseShell::Execute(SfxRequest &rReq)
const SfxPoolItem *pItem;
SwWrtShell &rSh = GetShell();
const SfxItemSet* pArgs = rReq.GetArgs();
- BOOL bMore = FALSE;
+ sal_Bool bMore = sal_False;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch(nSlot)
{
case FN_REPAGINATE:
@@ -603,12 +606,12 @@ void SwBaseShell::Execute(SfxRequest &rReq)
SwDocStat aDocStat;
rSh.UpdateDocStat(aDocStat);
rSh.EndAllTblBoxEdit();
- rSh.ViewShell::UpdateFlds(TRUE);
+ rSh.ViewShell::UpdateFlds(sal_True);
if( rSh.IsCrsrInTbl() )
{
if( !rSh.IsTblComplexForChart() )
- SwTableFUNC( &rSh, FALSE).UpdateChart();
+ SwTableFUNC( &rSh, sal_False).UpdateChart();
rSh.ClearTblBoxCntnt();
rSh.SaveTblBoxCntnt();
}
@@ -616,7 +619,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
case FN_UPDATE_CHARTS:
{
- SwWait aWait( *rView.GetDocShell(), TRUE );
+ SwWait aWait( *rView.GetDocShell(), sal_True );
rSh.UpdateAllCharts();
}
break;
@@ -628,7 +631,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
if( rSh.GetLinkManager().GetLinks().Count() )
{
rSh.StartAllAction();
- rSh.GetLinkManager().UpdateAllLinks( FALSE, TRUE, TRUE );
+ rSh.GetLinkManager().UpdateAllLinks( sal_False, sal_True, sal_True );
rSh.EndAllAction();
}
SfxDispatcher &rDis = *rTempView.GetViewFrame()->GetDispatcher();
@@ -640,7 +643,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
case FN_UPDATE_INPUTFIELDS:
- rSh.UpdateInputFlds(NULL, FALSE);
+ rSh.UpdateInputFlds(NULL, sal_False);
break;
case FN_PREV_BOOKMARK:
rReq.SetReturnValue(SfxBoolItem( nSlot, rSh.GoPrevBookmark()));
@@ -671,7 +674,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
rSh.ClearMark();
rSh.EndSelect();
}
- BOOL bRet = rSh.MoveFldType(pFldType, nSlot == FN_GOTO_NEXT_MARK);
+ sal_Bool bRet = rSh.MoveFldType(pFldType, nSlot == FN_GOTO_NEXT_MARK);
SwField* pCurField = bRet ? rSh.GetCurFld() : 0;
if (pCurField)
rSh.ClickToField(*pCurField);
@@ -690,15 +693,15 @@ void SwBaseShell::Execute(SfxRequest &rReq)
}
rSh.EnterStdMode();
nSlot == FN_START_DOC_DIRECT ?
- rSh.SttEndDoc(TRUE) :
- rSh.SttEndDoc(FALSE);
+ rSh.SttEndDoc(sal_True) :
+ rSh.SttEndDoc(sal_False);
}
break;
case FN_GOTO_PREV_OBJ:
case FN_GOTO_NEXT_OBJ:
{
- BOOL bSuccess = rSh.GotoObj(
- nSlot == FN_GOTO_NEXT_OBJ ? TRUE : FALSE);
+ sal_Bool bSuccess = rSh.GotoObj(
+ nSlot == FN_GOTO_NEXT_OBJ ? sal_True : sal_False);
rReq.SetReturnValue(SfxBoolItem(nSlot, bSuccess));
if (bSuccess && !rSh.IsSelFrmMode())
{
@@ -711,14 +714,14 @@ void SwBaseShell::Execute(SfxRequest &rReq)
case SID_GALLERY_FORMATS:
{
const int nSelType = rSh.GetSelectionType();
- if(SFX_ITEM_SET == pArgs->GetItemState( nSlot, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState( nSlot, sal_True, &pItem))
{
GalleryExplorer* pGal = 0;
if ( (!rSh.IsSelFrmMode() || nSelType & nsSelectionType::SEL_GRF) &&
0!= (pGal = SVX_GALLERY())&&
0 != (SGA_FORMAT_GRAPHIC & ((SfxUInt32Item*)pItem)->GetValue()))
{
- SwWait aWait( *rView.GetDocShell(), TRUE );
+ SwWait aWait( *rView.GetDocShell(), sal_True );
String aGrfName, aFltName;
const Graphic aGrf( pGal->GetGraphic() );
@@ -750,19 +753,19 @@ void SwBaseShell::Execute(SfxRequest &rReq)
if (pArgs)
{
// aktuellen PageDescriptor ermitteln und damit den Set fuellen
- const USHORT nCurIdx = rSh.GetCurPageDesc();
+ const sal_uInt16 nCurIdx = rSh.GetCurPageDesc();
SwPageDesc aPageDesc(rSh.GetPageDesc(nCurIdx));
SwFrmFmt &rFmt = aPageDesc.GetMaster();
SwFmtCol aFmtCol = rFmt.GetCol();
- USHORT nCount;
+ sal_uInt16 nCount;
if(SFX_ITEM_SET == pArgs->GetItemState(nSlot))
nCount = ((SfxUInt16Item &)pArgs->Get(nSlot)).GetValue();
else
nCount = ((SfxUInt16Item &)pArgs->Get(SID_ATTR_COLUMNS)).GetValue();
- USHORT nGutterWidth = DEF_GUTTER_WIDTH;
+ sal_uInt16 nGutterWidth = DEF_GUTTER_WIDTH;
aFmtCol.Init(nCount ? nCount : 1, nGutterWidth, USHRT_MAX);
aFmtCol.SetWishWidth(USHRT_MAX);
@@ -773,7 +776,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
rSh.ChgPageDesc(nCurIdx, aPageDesc);
}
else
- GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_PAGE_COLUMN_DLG, FALSE);
+ GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_PAGE_COLUMN_DLG, sal_False);
}
break;
case FN_CONVERT_TABLE_TO_TEXT:
@@ -789,7 +792,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
SwTableAutoFmt* pTAFmt = 0;
SwTableAutoFmtTbl* pAutoFmtTbl = 0;
bool bDeleteFormat = true;
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_1, TRUE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_1, sal_True, &pItem))
{
aInsTblOpts.mnInsMode = 0;
//Delimiter
@@ -797,14 +800,14 @@ void SwBaseShell::Execute(SfxRequest &rReq)
if(sDelim.Len())
cDelim = sDelim.GetChar(0);
//AutoFormat
- if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_2, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_2, sal_True, &pItem))
{
String sAutoFmt = static_cast< const SfxStringItem* >(pItem)->GetValue();
pAutoFmtTbl = new SwTableAutoFmtTbl;
pAutoFmtTbl->Load();
- for( USHORT i = 0, nCount = pAutoFmtTbl->Count(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = pAutoFmtTbl->Count(); i < nCount; i++ )
{
SwTableAutoFmt* pFmt = (*pAutoFmtTbl)[ i ];
if( pFmt->GetName() == sAutoFmt )
@@ -816,19 +819,19 @@ void SwBaseShell::Execute(SfxRequest &rReq)
}
}
//WithHeader
- if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_3, TRUE, &pItem) &&
+ if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_3, sal_True, &pItem) &&
static_cast< const SfxBoolItem* >(pItem)->GetValue())
aInsTblOpts.mnInsMode |= tabopts::HEADLINE;
// RepeatHeaderLines
- if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_4, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_4, sal_True, &pItem))
aInsTblOpts.mnRowsToRepeat =
- (USHORT)static_cast< const SfxInt16Item* >(pItem)->GetValue();
+ (sal_uInt16)static_cast< const SfxInt16Item* >(pItem)->GetValue();
//WithBorder
- if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_5, TRUE, &pItem) &&
+ if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_5, sal_True, &pItem) &&
static_cast< const SfxBoolItem* >(pItem)->GetValue())
aInsTblOpts.mnInsMode |= tabopts::DEFAULT_BORDER;
//DontSplitTable
- if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_6, TRUE, &pItem) &&
+ if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_6, sal_True, &pItem) &&
!static_cast< const SfxBoolItem* >(pItem)->GetValue() )
aInsTblOpts.mnInsMode |= tabopts::SPLIT_LAYOUT;
}
@@ -852,7 +855,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
{
//Shellwechsel!
SwView& rSaveView = rView;
- BOOL bInserted = FALSE;
+ sal_Bool bInserted = sal_False;
//recording:
SfxViewFrame* pViewFrame = GetView().GetViewFrame();
@@ -903,8 +906,8 @@ void SwBaseShell::Execute(SfxRequest &rReq)
// oj #107754#
if ( SID_STYLE_WATERCAN == nSlot )
{
- const BOOL bLockedView = rSh.IsViewLocked();
- rSh.LockView( TRUE ); //lock visible section
+ const sal_Bool bLockedView = rSh.IsViewLocked();
+ rSh.LockView( sal_True ); //lock visible section
GetView().GetDocShell()->ExecStyleSheet(rReq);
@@ -921,7 +924,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
case SID_IMAP:
{
- USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
pVFrame->ToggleChildWindow( nId );
@@ -950,7 +953,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
case SID_CONTOUR_DLG:
{
- USHORT nId = SvxContourDlgChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
pVFrame->ToggleChildWindow( nId );
@@ -980,7 +983,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
SwFmtSurround aSur( (SwFmtSurround&)aSet.Get( RES_SURROUND ) );
if ( !aSur.IsContour() )
{
- aSur.SetContour( TRUE );
+ aSur.SetContour( sal_True );
if ( aSur.GetSurround() == SURROUND_NONE )
aSur.SetSurround( SURROUND_PARALLEL );
aSet.Put( aSur );
@@ -1033,7 +1036,15 @@ void SwBaseShell::Execute(SfxRequest &rReq)
rSh.SetFlyFrmAttr(aSet);
}
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ // if new anchor is 'as char' and it is a Math object and the usual
+ // pre-conditions are met then align the formula to the baseline of the text
+ const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() );
+ const bool bDoMathBaselineAlignment = xObj.is() && SotExchange::IsMath( xObj->getClassID() )
+ && FLY_AS_CHAR == eSet && rSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT );
+ if (bDoMathBaselineAlignment)
+ rSh.AlignFormulaToBaseline( xObj );
+
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
if( nHtmlMode )
{
SfxItemSet aSet(GetPool(), RES_SURROUND, RES_HORI_ORIENT);
@@ -1115,10 +1126,10 @@ void SwBaseShell::Execute(SfxRequest &rReq)
{
if( rSh.GetLinkManager().GetLinks().Count() )
{
- BOOL bUpdateGrf = FALSE, bCallErrHdl = FALSE;
+ sal_Bool bUpdateGrf = sal_False, bCallErrHdl = sal_False;
rSh.EnterStdMode();
rSh.StartAllAction();
- rSh.GetLinkManager().UpdateAllLinks( FALSE, bCallErrHdl, bUpdateGrf );
+ rSh.GetLinkManager().UpdateAllLinks( sal_False, bCallErrHdl, bUpdateGrf );
rSh.EndAllAction();
}
}
@@ -1126,11 +1137,11 @@ void SwBaseShell::Execute(SfxRequest &rReq)
case FN_XFORMS_DESIGN_MODE:
if( pArgs != NULL
- && pArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET
+ && pArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET
&& pItem != NULL
&& pItem->ISA( SfxBoolItem ) )
{
- BOOL bDesignMode =
+ sal_Bool bDesignMode =
static_cast<const SfxBoolItem*>( pItem )->GetValue();
// set form design mode
@@ -1148,12 +1159,12 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
default:
- bMore = TRUE;
+ bMore = sal_True;
}
if(bMore && pArgs)
{
pItem = 0;
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
if(pItem)
switch(nSlot)
{
@@ -1176,7 +1187,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
else if ( rSh.IsFrmSelected() )
{
// Umrandungsattribute ueber Frame-Manager setzen
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
aMgr.SetAttrSet( *pArgs );
aMgr.UpdateFlyFrm();
}
@@ -1208,7 +1219,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
else if ( rSh.IsFrmSelected() )
{
// Umrandungsattribute ueber Frame-Manager setzen
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
aMgr.SetAttrSet(*pArgs);
aMgr.UpdateFlyFrm();
}
@@ -1232,25 +1243,25 @@ void SwBaseShell::Execute(SfxRequest &rReq)
* --------------------------------------------------*/
IMPL_LINK(SwBaseShell, GraphicArrivedHdl, SwCrsrShell* , EMPTYARG )
{
- USHORT nGrfType;
+ sal_uInt16 nGrfType;
SwWrtShell &rSh = GetShell();
if( CNT_GRF == rSh.SwEditShell::GetCntType() &&
GRAPHIC_NONE != ( nGrfType = rSh.GetGraphicType() ) &&
aGrfUpdateSlots.Count() )
{
- BOOL bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT);
+ sal_Bool bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT);
SfxViewFrame* pVFrame = GetView().GetViewFrame();
- USHORT nSlot;
- for( USHORT n = 0; n < aGrfUpdateSlots.Count(); ++n )
+ sal_uInt16 nSlot;
+ for( sal_uInt16 n = 0; n < aGrfUpdateSlots.Count(); ++n )
{
- BOOL bSetState = FALSE;
- BOOL bState = FALSE;
+ sal_Bool bSetState = sal_False;
+ sal_Bool bState = sal_False;
switch( nSlot = aGrfUpdateSlots[ n ] )
{
case SID_IMAP:
case SID_IMAP_EXEC:
{
- USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
SvxIMapDlg *pDlg = pVFrame->HasChildWindow( nId ) ?
(SvxIMapDlg*) ( pVFrame->GetChildWindow( nId )
->GetWindow()) : 0;
@@ -1261,14 +1272,14 @@ IMPL_LINK(SwBaseShell, GraphicArrivedHdl, SwCrsrShell* , EMPTYARG )
lcl_UpdateIMapDlg( rSh );
if( !bProtect && SID_IMAP == nSlot )
- bSetState = TRUE, bState = 0 != pDlg;
+ bSetState = sal_True, bState = 0 != pDlg;
}
break;
case SID_CONTOUR_DLG:
if( !bProtect )
{
- USHORT nId = SvxContourDlgChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
SvxIMapDlg *pDlg = pVFrame->HasChildWindow( nId ) ?
(SvxIMapDlg*) ( pVFrame->GetChildWindow( nId )
->GetWindow()) : 0;
@@ -1276,7 +1287,7 @@ IMPL_LINK(SwBaseShell, GraphicArrivedHdl, SwCrsrShell* , EMPTYARG )
rSh.GetIMapInventor() )
lcl_UpdateContourDlg( rSh, nsSelectionType::SEL_GRF );
- bSetState = TRUE;
+ bSetState = sal_True;
bState = 0 != pDlg;
}
break;
@@ -1287,7 +1298,7 @@ IMPL_LINK(SwBaseShell, GraphicArrivedHdl, SwCrsrShell* , EMPTYARG )
SfxItemSet aSet(GetPool(), RES_SURROUND, RES_SURROUND);
rSh.GetFlyFrmAttr(aSet);
const SwFmtSurround& rWrap = (const SwFmtSurround&)aSet.Get(RES_SURROUND);
- bSetState = TRUE;
+ bSetState = sal_True;
bState = rWrap.IsContour();
}
break;
@@ -1327,7 +1338,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
SwWrtShell &rSh = GetShell();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
pGetStateSet = &rSet;
while ( nWhich )
{
@@ -1341,7 +1352,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case SID_GALLERY_ENABLE_ADDCOPY:
// #108230# allow copy from gallery in Writer AND Writer/Web!
- rSet.Put( SfxBoolItem( SID_GALLERY_ENABLE_ADDCOPY, TRUE ) );
+ rSet.Put( SfxBoolItem( SID_GALLERY_ENABLE_ADDCOPY, sal_True ) );
break;
case FN_EDIT_REGION:
if( !rSh.IsAnySectionInDoc() )
@@ -1355,7 +1366,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_CONVERT_TABLE_TO_TEXT:
{
- USHORT eFrmType = rSh.GetFrmType(0,TRUE);
+ sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True);
if( (eFrmType & FRMTYPE_FOOTNOTE) ||
!rSh.GetTableFmt() )
rSet.DisableItem( nWhich );
@@ -1363,7 +1374,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_CONVERT_TEXT_TO_TABLE:
{
- USHORT eFrmType = rSh.GetFrmType(0,TRUE);
+ sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True);
if( (eFrmType & FRMTYPE_FOOTNOTE) ||
!rSh.IsTextToTableAvailable() )
rSet.DisableItem( nWhich );
@@ -1371,7 +1382,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_CONVERT_TEXT_TABLE:
{
- USHORT eFrmType = rSh.GetFrmType(0,TRUE);
+ sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True);
if( (eFrmType & FRMTYPE_FOOTNOTE) ||
(!rSh.GetTableFmt() && !rSh.IsTextToTableAvailable() ) )
rSet.DisableItem( nWhich );
@@ -1386,11 +1397,11 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
if ( rSh.IsTableMode() )
{
SwFrmFmt *pFmt = rSh.GetTableFmt();
- aSet.Put(pFmt->GetFmtAttr( nWhich, TRUE ));
+ aSet.Put(pFmt->GetFmtAttr( nWhich, sal_True ));
}
else if( rSh.IsFrmSelected() )
{
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
aSet.Put( aMgr.GetAttrSet() );
}
else
@@ -1409,17 +1420,17 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
// --> OD 2006-11-08 #i59688#
// improve efficiency:
// If selected object is protected, item has to disabled.
- const BOOL bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT);
+ const sal_Bool bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT);
if ( bProtect )
{
rSet.DisableItem( nWhich );
}
else
{
- const USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId();
- const BOOL bHas = pVFrame->HasChildWindow( nId );
- const BOOL bFrmSel = rSh.IsFrmSelected();
- const BOOL bIsGraphicSelection =
+ const sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
+ const sal_Bool bHas = pVFrame->HasChildWindow( nId );
+ const sal_Bool bFrmSel = rSh.IsFrmSelected();
+ const sal_Bool bIsGraphicSelection =
rSh.GetSelectionType() == nsSelectionType::SEL_GRF;
// --> OD 2006-11-08 #i59688#
@@ -1428,10 +1439,10 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
//wenn die Grafik ausgeswappt ist, dann muss der
//Status asynchron ermittelt werden
//bis dahin wird der Slot disabled
- if ( bHas && bIsGraphicSelection && rSh.IsGrfSwapOut( TRUE ) )
+ if ( bHas && bIsGraphicSelection && rSh.IsGrfSwapOut( sal_True ) )
{
if( AddGrfUpdateSlot( nWhich ))
- rSh.GetGraphic(FALSE); // start the loading
+ rSh.GetGraphic(sal_False); // start the loading
}
else
{
@@ -1457,17 +1468,17 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case SID_IMAP_EXEC:
{
- BOOL bDisable = FALSE;
+ sal_Bool bDisable = sal_False;
if( !rSh.IsFrmSelected())
- bDisable = TRUE;
- USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId();
+ bDisable = sal_True;
+ sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
if(!bDisable && pVFrame->HasChildWindow( nId ))
{
if(rSh.GetSelectionType() == nsSelectionType::SEL_GRF
- && rSh.IsGrfSwapOut(TRUE))
+ && rSh.IsGrfSwapOut(sal_True))
{
if( AddGrfUpdateSlot( nWhich ))
- rSh.GetGraphic(FALSE); // start the loading
+ rSh.GetGraphic(sal_False); // start the loading
}
else
{
@@ -1486,21 +1497,21 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case SID_CONTOUR_DLG:
{
- BOOL bParentCntProt = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
+ sal_Bool bParentCntProt = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
if( bParentCntProt || 0 != (HTMLMODE_ON & ::GetHtmlMode(
GetView().GetDocShell() )) )
rSet.DisableItem( nWhich );
else
{
- USHORT nId = SvxContourDlgChildWindow::GetChildWindowId();
- BOOL bHas = GetView().GetViewFrame()->HasChildWindow( nId );
+ sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
+ sal_Bool bHas = GetView().GetViewFrame()->HasChildWindow( nId );
int nSel = rSh.GetSelectionType();
- BOOL bOk = 0 != (nSel & (nsSelectionType::SEL_GRF|nsSelectionType::SEL_OLE));
+ sal_Bool bOk = 0 != (nSel & (nsSelectionType::SEL_GRF|nsSelectionType::SEL_OLE));
- BOOL bDisable = FALSE;
+ sal_Bool bDisable = sal_False;
if( !bHas && !bOk )
- bDisable = TRUE;
+ bDisable = sal_True;
// --> OD 2006-11-08 #i59688#
// avoid unnecessary loading of selected graphic.
// The graphic is only needed, if the dialog is open.
@@ -1508,12 +1519,12 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
// asynchron ermittelt werden bis dahin wird der Slot
// disabled
else if ( bHas && (nSel & nsSelectionType::SEL_GRF) &&
- rSh.IsGrfSwapOut(TRUE) )
+ rSh.IsGrfSwapOut(sal_True) )
{
if( AddGrfUpdateSlot( nWhich ))
- rSh.GetGraphic(FALSE); // start the loading
+ rSh.GetGraphic(sal_False); // start the loading
// --> OD 2007-07-04 #i75481#
- bDisable = TRUE;
+ bDisable = sal_True;
// <--
}
else if( bHas && bOk )
@@ -1539,16 +1550,16 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case SID_CONTOUR_EXEC:
{
- BOOL bDisable = FALSE;
+ sal_Bool bDisable = sal_False;
int nSel = rSh.GetSelectionType();
if( !(nSel & (nsSelectionType::SEL_GRF|nsSelectionType::SEL_OLE)) )
- bDisable = TRUE;
- USHORT nId = SvxContourDlgChildWindow::GetChildWindowId();
+ bDisable = sal_True;
+ sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
if( !bDisable && GetView().GetViewFrame()->HasChildWindow( nId ))
{
SvxContourDlg *pDlg = SWCONTOURDLG(GetView());
if( pDlg->GetEditingObject() != rSh.GetIMapInventor() )
- bDisable = TRUE;
+ bDisable = sal_True;
}
rSet.Put(SfxBoolItem(nWhich, bDisable));
}
@@ -1561,8 +1572,8 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
case FN_TOOL_ANKER_AT_CHAR:
case FN_TOOL_ANKER_FRAME:
{
- BOOL bObj = 0 != rSh.IsObjSelected();
- BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
+ sal_Bool bObj = 0 != rSh.IsObjSelected();
+ sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
if( !bParentCntProt && (bObj || rSh.IsFrmSelected()))
{
@@ -1572,7 +1583,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
else
rSh.GetFlyFrmAttr(aSet);
RndStdIds eSet = ((SwFmtAnchor&)aSet.Get(RES_ANCHOR)).GetAnchorId();
- const BOOL bSet =
+ const sal_Bool bSet =
((nWhich == FN_TOOL_ANKER_PAGE) &&
(eSet == FLY_AT_PAGE))
|| ((nWhich == FN_TOOL_ANKER_PARAGRAPH) &&
@@ -1585,7 +1596,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
(eSet == FLY_AS_CHAR));
if(nWhich != FN_TOOL_ANKER)
{
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
if( ( nWhich == FN_TOOL_ANKER_PAGE &&
((HTMLMODE_ON & nHtmlMode) && (0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS)))) ||
( nWhich == FN_TOOL_ANKER_FRAME && !rSh.IsFlyInFly() ) )
@@ -1595,7 +1606,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
}
else
{
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
switch (eSet)
{
@@ -1634,8 +1645,8 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
case FN_FRAME_WRAP_LEFT:
case FN_FRAME_WRAP_RIGHT:
{
- BOOL bObj = 0 != rSh.IsObjSelected();
- BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
+ sal_Bool bObj = 0 != rSh.IsObjSelected();
+ sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
if( !bParentCntProt && (bObj || rSh.IsFrmSelected()))
{
@@ -1654,9 +1665,9 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
const SwFmtSurround& rWrap = (const SwFmtSurround&)aSet.Get(RES_SURROUND);
const SvxOpaqueItem& rOpaque = (const SvxOpaqueItem&)aSet.Get(RES_OPAQUE);
- BOOL bOpaque = rOpaque.GetValue();
+ sal_Bool bOpaque = rOpaque.GetValue();
SwSurround nSurround = rWrap.GetSurround();
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
bool bDisable =
(nAnchorType == - 1) || (nAnchorType == FLY_AS_CHAR);
@@ -1706,10 +1717,10 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
{
int nSel = rSh.GetSelectionType();
if( (nSel & nsSelectionType::SEL_GRF) &&
- rSh.IsGrfSwapOut(TRUE))
+ rSh.IsGrfSwapOut(sal_True))
{
if( AddGrfUpdateSlot( nWhich ))
- rSh.GetGraphic(FALSE); // start the loading
+ rSh.GetGraphic(sal_False); // start the loading
}
else if( rSh.IsFrmSelected() )
{
@@ -1719,7 +1730,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
GRAPHIC_NONE == rSh.GetIMapGraphic().GetType();
}
}
- bSet = bDisable ? FALSE : rWrap.IsContour();
+ bSet = bDisable ? sal_False : rWrap.IsContour();
break;
case FN_WRAP_ANCHOR_ONLY:
@@ -1775,7 +1786,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
void SwBaseShell::StateDisableItems( SfxItemSet &rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
@@ -1789,7 +1800,7 @@ void SwBaseShell::StateDisableItems( SfxItemSet &rSet )
--------------------------------------------------------------------*/
void SwBaseShell::StateStyle( SfxItemSet &rSet )
{
- BOOL bParentCntProt = GetShell().IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
+ sal_Bool bParentCntProt = GetShell().IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
ShellModes eMode = GetView().GetShellMode();
if ( bParentCntProt ||
@@ -1800,7 +1811,7 @@ void SwBaseShell::StateStyle( SfxItemSet &rSet )
SHELL_MODE_BEZIER == eMode )
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
rSet.DisableItem( nWhich );
@@ -1811,10 +1822,10 @@ void SwBaseShell::StateStyle( SfxItemSet &rSet )
GetView().GetDocShell()->StateStyleSheet(rSet, &GetShell());
}
-void SwBaseShell::SetWrapMode( USHORT nSlot )
+void SwBaseShell::SetWrapMode( sal_uInt16 nSlot )
{
SwWrtShell &rSh = GetShell();
- BOOL bObj = 0 != rSh.IsObjSelected();
+ sal_Bool bObj = 0 != rSh.IsObjSelected();
if( bObj || rSh.IsFrmSelected())
{
SfxItemSet aSet(GetPool(), RES_OPAQUE, RES_SURROUND);
@@ -1831,7 +1842,7 @@ void SwBaseShell::SetWrapMode( USHORT nSlot )
case FN_FRAME_NOWRAP:
nSurround = SURROUND_NONE;
if (aWrap.IsContour())
- aWrap.SetContour(FALSE);
+ aWrap.SetContour(sal_False);
break;
case FN_FRAME_WRAP_IDEAL:
nSurround = SURROUND_IDEAL;
@@ -1855,7 +1866,7 @@ void SwBaseShell::SetWrapMode( USHORT nSlot )
break;
case FN_FRAME_WRAPTHRU_TRANSP:
if (aWrap.IsContour())
- aWrap.SetContour(FALSE);
+ aWrap.SetContour(sal_False);
// kein break!!!
case FN_FRAME_WRAPTHRU:
nSurround = SURROUND_THROUGHT;
@@ -1880,7 +1891,7 @@ void SwBaseShell::SetWrapMode( USHORT nSlot )
if (bObj && nOldSurround != nSurround &&
(nOldSurround == SURROUND_NONE || nOldSurround == SURROUND_THROUGHT))
{
- aWrap.SetContour(TRUE);
+ aWrap.SetContour(sal_True);
}
}
@@ -1917,7 +1928,7 @@ void SwBaseShell::SetFrmMode(FlyMode eMode, SwWrtShell *pSh )
}
else if( eMode == FLY_DRAG_END )
{
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
SID_ATTR_POSITION, SID_ATTR_SIZE, 0
};
@@ -1958,10 +1969,10 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq )
{
SwWrtShell &rSh = GetShell();
SvxScriptSetItem* pSSetItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
SfxItemPool& rPool = rSh.GetAttrPool();
- USHORT nWhich = rPool.GetWhich( nSlot );
- USHORT nScripts = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt16 nWhich = rPool.GetWhich( nSlot );
+ sal_uInt16 nScripts = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
SfxItemSet aHeightSet( GetPool(), RES_CHRATR_FONTSIZE, RES_CHRATR_FONTSIZE,
RES_CHRATR_CJK_FONTSIZE, RES_CHRATR_CJK_FONTSIZE,
RES_CHRATR_CTL_FONTSIZE, RES_CHRATR_CTL_FONTSIZE,
@@ -2003,7 +2014,7 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq )
LanguageType nInputLang = GetView().GetEditWin().GetInputLanguage();
if(nInputLang != LANGUAGE_DONTKNOW && nInputLang != LANGUAGE_SYSTEM)
nScripts = SvtLanguageOptions::GetScriptTypeOfLanguage( nInputLang );
- UINT32 nHeight = static_cast< const SvxFontHeightItem& >(pArgs->Get( nWhich )).GetHeight();
+ sal_uInt32 nHeight = static_cast< const SvxFontHeightItem& >(pArgs->Get( nWhich )).GetHeight();
SwStdFontConfig* pStdFont = SW_MOD()->GetStdFontConfig();
SfxItemSet aLangSet( GetPool(), RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
@@ -2040,9 +2051,9 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq )
nCTLSize = (sal_Int32) nHeight;
break;
}
- aHeightSet.Put( SvxFontHeightItem( (UINT32)nWesternSize, 100, RES_CHRATR_FONTSIZE ));
- aHeightSet.Put( SvxFontHeightItem( (UINT32)nCJKSize, 100, RES_CHRATR_CJK_FONTSIZE ));
- aHeightSet.Put( SvxFontHeightItem( (UINT32)nCTLSize, 100, RES_CHRATR_CTL_FONTSIZE ));
+ aHeightSet.Put( SvxFontHeightItem( (sal_uInt32)nWesternSize, 100, RES_CHRATR_FONTSIZE ));
+ aHeightSet.Put( SvxFontHeightItem( (sal_uInt32)nCJKSize, 100, RES_CHRATR_CJK_FONTSIZE ));
+ aHeightSet.Put( SvxFontHeightItem( (sal_uInt32)nCTLSize, 100, RES_CHRATR_CTL_FONTSIZE ));
pArgs = &aHeightSet;
}
}
@@ -2071,7 +2082,7 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq )
delete pSSetItem;
}
else
- GetView().GetViewFrame()->GetDispatcher()->Execute( SID_CHAR_DLG, FALSE);
+ GetView().GetViewFrame()->GetDispatcher()->Execute( SID_CHAR_DLG, sal_False);
rReq.Done();
}
@@ -2084,11 +2095,11 @@ void SwBaseShell::GetTxtCtrlState( SfxItemSet& rSet )
void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet )
{
SwWrtShell &rSh = GetShell();
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
SfxItemSet* pFntCoreSet = 0;
- USHORT nScriptType = SCRIPTTYPE_LATIN;
+ sal_uInt16 nScriptType = SCRIPTTYPE_LATIN;
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
switch( nWhich )
@@ -2121,7 +2132,7 @@ void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet )
}
SfxItemPool& rPool = *rSet.GetPool();
SvxScriptSetItem aSetItem( rPool.GetSlotId( nWhich ), rPool );
- aSetItem.GetItemSet().Put( *pFntCoreSet, FALSE );
+ aSetItem.GetItemSet().Put( *pFntCoreSet, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType );
if( pI )
rSet.Put( *pI, nWhich );
@@ -2140,7 +2151,7 @@ void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet )
aFont.SetCharSet(((const SvxFontItem*)pI)->GetCharSet());
}
- BOOL bVertical = rSh.IsInVerticalText();
+ sal_Bool bVertical = rSh.IsInVerticalText();
aFont.SetOrientation(bVertical ? 2700 : 0);
aFont.SetVertical(bVertical);
GetView().GetEditWin().SetInputContext( InputContext( aFont, INPUTCONTEXT_TEXT |
@@ -2153,7 +2164,7 @@ void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet )
if( bFirst )
{
rSh.GetCurAttr( rSet );
- bFirst = FALSE;
+ bFirst = sal_False;
}
}
nWhich = aIter.NextWhich();
@@ -2165,7 +2176,7 @@ void SwBaseShell::GetBckColState(SfxItemSet &rSet)
{
SwWrtShell &rSh = GetShell();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
int nSelType = rSh.GetSelectionType();
if( nSelType & nsSelectionType::SEL_OLE )
@@ -2176,7 +2187,7 @@ void SwBaseShell::GetBckColState(SfxItemSet &rSet)
if ( nSelType & nsSelectionType::SEL_FRM )
{
- BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
+ sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
if (bParentCntProt)
{
rSet.DisableItem( SID_BACKGROUND_COLOR );
@@ -2227,7 +2238,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
}
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if( !pArgs && nSlot != SID_BACKGROUND_COLOR)
return ;
@@ -2321,8 +2332,8 @@ void SwBaseShell::GetBorderState(SfxItemSet &rSet)
{
SwWrtShell &rSh = GetShell();
// Tabellenzelle(n) selektiert?
- BOOL bPrepare = TRUE;
- BOOL bTableMode = rSh.IsTableMode();
+ sal_Bool bPrepare = sal_True;
+ sal_Bool bTableMode = rSh.IsTableMode();
if ( bTableMode )
{
SfxItemSet aCoreSet( GetPool(),
@@ -2335,9 +2346,9 @@ void SwBaseShell::GetBorderState(SfxItemSet &rSet)
}
else if ( rSh.IsFrmSelected() )
{
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
rSet.Put( aMgr.GetAttrSet() );
- bPrepare = FALSE;
+ bPrepare = sal_False;
}
else
// Umrandungsattribute ganz normal ueber Shell holen
@@ -2353,15 +2364,15 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
Window *pMDI = &GetView().GetViewFrame()->GetWindow();
//Damit aus dem Basic keine Dialoge fuer Hintergrund-Views aufgerufen werden:
- BOOL bBackground = (&GetView() != GetActiveView());
+ sal_Bool bBackground = (&GetView() != GetActiveView());
const SfxPoolItem* pItem = 0;
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pOutSet = 0;
bool bDone = false;
if(pArgs)
- pArgs->GetItemState( GetPool().GetWhich(nSlot), FALSE, &pItem );
+ pArgs->GetItemState( GetPool().GetWhich(nSlot), sal_False, &pItem );
switch ( nSlot )
{
@@ -2378,7 +2389,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
{
if( !bBackground )
{
- const USHORT nCurIdx = rSh.GetCurPageDesc();
+ const sal_uInt16 nCurIdx = rSh.GetCurPageDesc();
const SwPageDesc& rPageDesc = rSh.GetPageDesc( nCurIdx );
//temp. View, weil die Shell nach dem Dialog nicht mehr gueltig sein muss
//z.B. Kopfzeile ausschalten
@@ -2417,7 +2428,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
else if ( rSh.IsFrmSelected() )
{
// Umrandungsattribute ueber Frame-Manager setzen
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
aSet.Put( aMgr.GetAttrSet() );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
@@ -2546,11 +2557,11 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
const SfxItemSet* pArgs = _rRequest.GetArgs();
SwWrtShell& rSh = GetShell();
- if ( !( rSh.GetFrmType( 0, TRUE ) & FRMTYPE_FOOTNOTE ) )
+ if ( !( rSh.GetFrmType( 0, sal_True ) & FRMTYPE_FOOTNOTE ) )
{
SwView &rTempView = GetView(); // Da GetView() nach Shellwechsel nicht mehr geht
- BOOL bHTMLMode = 0 != (::GetHtmlMode(rTempView.GetDocShell())&HTMLMODE_ON);
- BOOL bCallEndUndo = FALSE;
+ sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rTempView.GetDocShell())&HTMLMODE_ON);
+ sal_Bool bCallEndUndo = sal_False;
if( !pArgs && rSh.IsSelection() && !rSh.IsInClickToEdit() &&
!rSh.IsTableMode() )
@@ -2559,9 +2570,9 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
SwInsertTableOptions aInsTblOpts = pModOpt->GetInsTblFlags(bHTMLMode);
rSh.StartUndo(UNDO_INSTABLE);
- bCallEndUndo = TRUE;
+ bCallEndUndo = sal_True;
- BOOL bInserted = rSh.TextToTable( aInsTblOpts, '\t', text::HoriOrientation::FULL );
+ sal_Bool bInserted = rSh.TextToTable( aInsTblOpts, '\t', text::HoriOrientation::FULL );
rSh.EnterStdMode();
if (bInserted)
rTempView.AutoCaption(TABLE_CAP);
@@ -2569,8 +2580,8 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
}
else
{
- USHORT nCols = 0;
- USHORT nRows = 0;
+ sal_uInt16 nCols = 0;
+ sal_uInt16 nRows = 0;
SwInsertTableOptions aInsTblOpts( tabopts::ALL_TBL_INS_ATTR, 1 );
String aTableName, aAutoName;
SwTableAutoFmt* pTAFmt = 0;
@@ -2596,7 +2607,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
{
SwTableAutoFmtTbl aTableTbl;
aTableTbl.Load();
- for ( USHORT n=0; n<aTableTbl.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aTableTbl.Count(); n++ )
{
if ( aTableTbl[n]->GetName() == aAutoName )
{
@@ -2608,7 +2619,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
}
if ( pFlags )
- aInsTblOpts.mnInsMode = (USHORT) pFlags->GetValue();
+ aInsTblOpts.mnInsMode = (sal_uInt16) pFlags->GetValue();
else
{
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
@@ -2643,7 +2654,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
_rRequest.Done();
rSh.StartUndo(UNDO_INSTABLE);
- bCallEndUndo = TRUE;
+ bCallEndUndo = sal_True;
rSh.StartAllAction();
if( rSh.HasSelection() )
@@ -2681,7 +2692,7 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet )
{
SwWrtShell &rSh = GetShell();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
switch ( nWhich )
{
case SID_GALLERY_BG_BRUSH:
@@ -2692,11 +2703,11 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet )
nParagraphPos = nGraphicPos = nOlePos = nFramePos = nTablePos =
nTableRowPos = nTableCellPos = nPagePos =
nHeaderPos = nFooterPos = 0;
- BYTE nPos = 1;
+ sal_uInt8 nPos = 1;
pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_PAGE ), pLst->Count() );
nPagePos = nPos++;
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
- BOOL bHtmlMode = 0 != (nHtmlMode & HTMLMODE_ON);
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_Bool bHtmlMode = 0 != (nHtmlMode & HTMLMODE_ON);
if ( (!bHtmlMode || (nHtmlMode & HTMLMODE_FULL_STYLES)) &&
(nSel & nsSelectionType::SEL_TXT) )
@@ -2736,7 +2747,7 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet )
pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_OLE ), pLst->Count() );
nOlePos = nPos++;
}
- const USHORT nType = rSh.GetFrmType(0,TRUE);
+ const sal_uInt16 nType = rSh.GetFrmType(0,sal_True);
if ( nType & FRMTYPE_HEADER )
{
pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_HEADER ), pLst->Count() );
@@ -2762,7 +2773,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
rSh.StartAction();
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch(nSlot)
{
case SID_GALLERY_BG_BRUSH:
@@ -2771,7 +2782,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq)
if ( nSel & nsSelectionType::SEL_DRW_TXT )
break;
- BYTE nPos = (BYTE)((SfxUInt16Item &)pArgs->Get(SID_GALLERY_BG_POS)).GetValue();
+ sal_uInt8 nPos = (sal_uInt8)((SfxUInt16Item &)pArgs->Get(SID_GALLERY_BG_POS)).GetValue();
++nPos;
SvxBrushItem aBrush( (SvxBrushItem&)pArgs->Get(SID_GALLERY_BG_BRUSH));
@@ -2792,7 +2803,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq)
}
else if ( nPos == nPagePos || nPos == nHeaderPos || nPos == nFooterPos )
{
- USHORT nDesc = rSh.GetCurPageDesc();
+ sal_uInt16 nDesc = rSh.GetCurPageDesc();
SwPageDesc aDesc( rSh.GetPageDesc( nDesc ) );
if ( nPos == nPagePos )
aDesc.GetMaster().SetFmtAttr( aBrush );
@@ -2819,7 +2830,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq)
void SwBaseShell::ExecField( SfxRequest& rReq )
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch( nSlot )
{
case FN_CHANGE_DBFIELD:
diff --git a/sw/source/ui/shells/beziersh.cxx b/sw/source/ui/shells/beziersh.cxx
index 4c6db665f177..2b047d644c19 100644
--- a/sw/source/ui/shells/beziersh.cxx
+++ b/sw/source/ui/shells/beziersh.cxx
@@ -79,12 +79,12 @@ void SwBezierShell::Execute(SfxRequest &rReq)
SwWrtShell *pSh = &GetShell();
SdrView* pSdrView = pSh->GetDrawView();
const SfxItemSet *pArgs = rReq.GetArgs();
- USHORT nSlotId = rReq.GetSlot();
- BOOL bChanged = pSdrView->GetModel()->IsChanged();
- pSdrView->GetModel()->SetChanged(FALSE);
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bChanged = pSdrView->GetModel()->IsChanged();
+ pSdrView->GetModel()->SetChanged(sal_False);
const SfxPoolItem* pItem;
if(pArgs)
- pArgs->GetItemState(nSlotId, FALSE, &pItem);
+ pArgs->GetItemState(nSlotId, sal_False, &pItem);
switch (nSlotId)
{
@@ -93,7 +93,7 @@ void SwBezierShell::Execute(SfxRequest &rReq)
if (pSh->IsObjSelected())
{
if (pSdrView->HasMarkedPoints())
- pSh->GetView().GetViewFrame()->GetDispatcher()->Execute(SID_BEZIER_DELETE, FALSE);
+ pSh->GetView().GetViewFrame()->GetDispatcher()->Execute(SID_BEZIER_DELETE, sal_False);
else
{
pSh->DelSelectedObj();
@@ -130,7 +130,7 @@ void SwBezierShell::Execute(SfxRequest &rReq)
case SID_BEZIER_INSERT:
{
GetView().GetEditWin().SetBezierMode(nSlotId);
- static USHORT const aInva[] =
+ static sal_uInt16 aInva[] =
{
SID_BEZIER_INSERT,
SID_BEZIER_MOVE,
@@ -190,7 +190,7 @@ void SwBezierShell::Execute(SfxRequest &rReq)
{
pSdrView->SetMarkedPointsSmooth(eKind);
- static USHORT const aInva[] =
+ static sal_uInt16 aInva[] =
{
SID_BEZIER_SMOOTH,
SID_BEZIER_EDGE,
@@ -226,7 +226,7 @@ void SwBezierShell::Execute(SfxRequest &rReq)
if (pSdrView->GetModel()->IsChanged())
GetShell().SetModified();
else if (bChanged)
- pSdrView->GetModel()->SetChanged(TRUE);
+ pSdrView->GetModel()->SetChanged(sal_True);
}
void SwBezierShell::GetState(SfxItemSet &rSet)
@@ -234,7 +234,7 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
SdrView* pSdrView = GetShell().GetDrawView();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
@@ -243,7 +243,7 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
case SID_BEZIER_MOVE:
case SID_BEZIER_INSERT:
{
- USHORT nEditMode = GetView().GetEditWin().GetBezierMode();
+ sal_uInt16 nEditMode = GetView().GetEditWin().GetBezierMode();
rSet.Put(SfxBoolItem(nWhich, nEditMode == nWhich));
}
@@ -274,8 +274,8 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
switch (eSegm)
{
case SDRPATHSEGMENT_DONTCARE: rSet.InvalidateItem(SID_BEZIER_CONVERT); break;
- case SDRPATHSEGMENT_LINE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,FALSE)); break; // Button reingedrueckt = Kurve
- case SDRPATHSEGMENT_CURVE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,TRUE)); break;
+ case SDRPATHSEGMENT_LINE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,sal_False)); break; // Button reingedrueckt = Kurve
+ case SDRPATHSEGMENT_CURVE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,sal_True)); break;
default:; //prevent warning
}
}
@@ -289,7 +289,7 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
else
{
SdrPathSmoothKind eSmooth = pSdrView->GetMarkedPointsSmooth();
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
switch (eSmooth)
{
case SDRPATHSMOOTH_DONTCARE :
@@ -319,8 +319,8 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
switch (eClose)
{
case SDROBJCLOSED_DONTCARE: rSet.InvalidateItem(SID_BEZIER_CLOSE); break;
- case SDROBJCLOSED_OPEN : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,FALSE)); break;
- case SDROBJCLOSED_CLOSED : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,TRUE)); break;
+ case SDROBJCLOSED_OPEN : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,sal_False)); break;
+ case SDROBJCLOSED_CLOSED : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,sal_True)); break;
default:; //prevent warning
}
}
diff --git a/sw/source/ui/shells/drawdlg.cxx b/sw/source/ui/shells/drawdlg.cxx
index a956fbaecc62..997da1784e0a 100644
--- a/sw/source/ui/shells/drawdlg.cxx
+++ b/sw/source/ui/shells/drawdlg.cxx
@@ -54,8 +54,8 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
SwWrtShell* pSh = &GetShell();
SdrView* pView = pSh->GetDrawView();
SdrModel* pDoc = pView->GetModel();
- BOOL bChanged = pDoc->IsChanged();
- pDoc->SetChanged(FALSE);
+ sal_Bool bChanged = pDoc->IsChanged();
+ pDoc->SetChanged(sal_False);
SfxItemSet aNewAttr( pDoc->GetItemPool() );
pView->GetAttributes( aNewAttr );
@@ -70,7 +70,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
if ( pFact )
{
SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog( NULL, &aNewAttr, pView );
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
if (nResult == RET_OK)
{
@@ -90,7 +90,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
case SID_ATTRIBUTES_AREA:
{
- BOOL bHasMarked = pView->AreObjectsMarked();
+ sal_Bool bHasMarked = pView->AreObjectsMarked();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet Factory fail!");
@@ -109,10 +109,10 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
if (bHasMarked)
pView->SetAttributes(*pDlg->GetOutputItemSet());
else
- pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), FALSE);
+ pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), sal_False);
pSh->EndAction();
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
SID_ATTR_FILL_STYLE, SID_ATTR_FILL_COLOR, 0
};
@@ -127,7 +127,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
case SID_ATTRIBUTES_LINE:
{
- BOOL bHasMarked = pView->AreObjectsMarked();
+ sal_Bool bHasMarked = pView->AreObjectsMarked();
const SdrObject* pObj = NULL;
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
@@ -146,12 +146,12 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
{
pSh->StartAction();
if(bHasMarked)
- pView->SetAttrToMarked(*pDlg->GetOutputItemSet(), FALSE);
+ pView->SetAttrToMarked(*pDlg->GetOutputItemSet(), sal_False);
else
- pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), FALSE);
+ pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), sal_False);
pSh->EndAction();
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
SID_ATTR_LINE_STYLE, SID_ATTR_LINE_WIDTH,
SID_ATTR_LINE_COLOR, 0
@@ -172,7 +172,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
GetShell().SetModified();
else
if (bChanged)
- pDoc->SetChanged(TRUE);
+ pDoc->SetChanged(sal_True);
}
void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq)
@@ -180,17 +180,17 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq)
SwWrtShell* pSh = &GetShell();
SdrView* pView = pSh->GetDrawView();
const SfxItemSet* pArgs = rReq.GetArgs();
- BOOL bChanged = pView->GetModel()->IsChanged();
- pView->GetModel()->SetChanged(FALSE);
+ sal_Bool bChanged = pView->GetModel()->IsChanged();
+ pView->GetModel()->SetChanged(sal_False);
GetView().NoRotate();
if (pArgs)
{
if(pView->AreObjectsMarked())
- pView->SetAttrToMarked(*rReq.GetArgs(), FALSE);
+ pView->SetAttrToMarked(*rReq.GetArgs(), sal_False);
else
- pView->SetDefaultAttr(*rReq.GetArgs(), FALSE);
+ pView->SetDefaultAttr(*rReq.GetArgs(), sal_False);
}
else
{
@@ -202,13 +202,13 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq)
case SID_ATTR_FILL_GRADIENT:
case SID_ATTR_FILL_HATCH:
case SID_ATTR_FILL_BITMAP:
- pDis->Execute(SID_ATTRIBUTES_AREA, FALSE);
+ pDis->Execute(SID_ATTRIBUTES_AREA, sal_False);
break;
case SID_ATTR_LINE_STYLE:
case SID_ATTR_LINE_DASH:
case SID_ATTR_LINE_WIDTH:
case SID_ATTR_LINE_COLOR:
- pDis->Execute(SID_ATTRIBUTES_LINE, FALSE);
+ pDis->Execute(SID_ATTRIBUTES_LINE, sal_False);
break;
}
}
@@ -216,7 +216,7 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq)
GetShell().SetModified();
else
if (bChanged)
- pView->GetModel()->SetChanged(TRUE);
+ pView->GetModel()->SetChanged(sal_True);
}
void SwDrawShell::GetDrawAttrState(SfxItemSet& rSet)
@@ -225,7 +225,7 @@ void SwDrawShell::GetDrawAttrState(SfxItemSet& rSet)
if (pSdrView->AreObjectsMarked())
{
- BOOL bDisable = Disable( rSet );
+ sal_Bool bDisable = Disable( rSet );
if( !bDisable )
pSdrView->GetAttributes( rSet );
diff --git a/sw/source/ui/shells/drawsh.cxx b/sw/source/ui/shells/drawsh.cxx
index 0e22efaa6a60..483db1b7f08b 100644
--- a/sw/source/ui/shells/drawsh.cxx
+++ b/sw/source/ui/shells/drawsh.cxx
@@ -90,16 +90,16 @@ void SwDrawShell::Execute(SfxRequest &rReq)
SdrView *pSdrView = rSh.GetDrawView();
const SfxItemSet *pArgs = rReq.GetArgs();
SfxBindings &rBnd = GetView().GetViewFrame()->GetBindings();
- USHORT nSlotId = rReq.GetSlot();
- BOOL bChanged = pSdrView->GetModel()->IsChanged();
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bChanged = pSdrView->GetModel()->IsChanged();
- pSdrView->GetModel()->SetChanged(FALSE);
+ pSdrView->GetModel()->SetChanged(sal_False);
const SfxPoolItem* pItem;
if(pArgs)
- pArgs->GetItemState(nSlotId, FALSE, &pItem);
+ pArgs->GetItemState(nSlotId, sal_False, &pItem);
- BOOL bMirror = TRUE;
+ sal_Bool bMirror = sal_True;
switch (nSlotId)
{
@@ -169,7 +169,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
break;
case FN_FLIP_HORZ_GRAFIC:
- bMirror = FALSE;
+ bMirror = sal_False;
/* no break */
case FN_FLIP_VERT_GRAFIC:
rSh.MirrorSelection( bMirror );
@@ -178,7 +178,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
case SID_FONTWORK:
{
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rSh.GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if (pArgs)
{
@@ -235,7 +235,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
SwDocStat aCurr;
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
{
- SwWait aWait( *GetView().GetDocShell(), TRUE );
+ SwWait aWait( *GetView().GetDocShell(), sal_True );
rSh.StartAction();
rSh.CountWords( aCurr );
rSh.UpdateDocStat( aDocStat );
@@ -291,7 +291,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
if (pSdrView->GetModel()->IsChanged())
rSh.SetModified();
else if (bChanged)
- pSdrView->GetModel()->SetChanged(TRUE);
+ pSdrView->GetModel()->SetChanged(sal_True);
}
void SwDrawShell::GetState(SfxItemSet& rSet)
@@ -299,8 +299,8 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
SwWrtShell &rSh = GetShell();
SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
- BOOL bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ sal_Bool bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
if (!bProtected) // Im Parent nachsehen
bProtected |= rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
@@ -326,7 +326,7 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
case SID_OBJECT_ROTATE:
{
- const BOOL bIsRotate = GetView().IsDrawRotate();
+ const sal_Bool bIsRotate = GetView().IsDrawRotate();
if ( (!bIsRotate && !pSdrView->IsRotateAllowed()) || bProtected )
rSet.DisableItem( nWhich );
else
@@ -355,7 +355,7 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
rSet.DisableItem( nWhich );
else
{
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
rSet.Put(SfxBoolItem( nWhich , GetView().GetViewFrame()->HasChildWindow(nId)));
}
}
@@ -383,8 +383,8 @@ void SwDrawShell::ExecFormText(SfxRequest& rReq)
{
SwWrtShell &rSh = GetShell();
SdrView* pDrView = rSh.GetDrawView();
- BOOL bChanged = pDrView->GetModel()->IsChanged();
- pDrView->GetModel()->SetChanged(FALSE);
+ sal_Bool bChanged = pDrView->GetModel()->IsChanged();
+ pDrView->GetModel()->SetChanged(sal_False);
const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
@@ -395,16 +395,16 @@ void SwDrawShell::ExecFormText(SfxRequest& rReq)
if ( pDrView->IsTextEdit() )
{
- pDrView->SdrEndTextEdit( TRUE );
+ pDrView->SdrEndTextEdit( sal_True );
GetView().AttrChangedNotify(&rSh);
}
- if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, TRUE, &pItem) ==
+ if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, sal_True, &pItem) ==
SFX_ITEM_SET &&
((const XFormTextStdFormItem*) pItem)->GetValue() != XFTFORM_NONE )
{
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*)(GetView().GetViewFrame()->
GetChildWindow(nId)->GetWindow());
@@ -422,7 +422,7 @@ void SwDrawShell::ExecFormText(SfxRequest& rReq)
rSh.SetModified();
else
if (bChanged)
- pDrView->GetModel()->SetChanged(TRUE);
+ pDrView->GetModel()->SetChanged(sal_True);
}
/*************************************************************************
@@ -438,7 +438,7 @@ void SwDrawShell::GetFormTextState(SfxItemSet& rSet)
const SdrObject* pObj = NULL;
SvxFontWorkDialog* pDlg = NULL;
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if ( pVFrame->HasChildWindow(nId) )
@@ -451,14 +451,14 @@ void SwDrawShell::GetFormTextState(SfxItemSet& rSet)
!((SdrTextObj*) pObj)->HasText() )
{
#define XATTR_ANZ 12
- static const USHORT nXAttr[ XATTR_ANZ ] =
+ static const sal_uInt16 nXAttr[ XATTR_ANZ ] =
{
XATTR_FORMTXTSTYLE, XATTR_FORMTXTADJUST, XATTR_FORMTXTDISTANCE,
XATTR_FORMTXTSTART, XATTR_FORMTXTMIRROR, XATTR_FORMTXTSTDFORM,
XATTR_FORMTXTHIDEFORM, XATTR_FORMTXTOUTLINE, XATTR_FORMTXTSHADOW,
XATTR_FORMTXTSHDWCOLOR, XATTR_FORMTXTSHDWXVAL, XATTR_FORMTXTSHDWYVAL
};
- for( USHORT i = 0; i < XATTR_ANZ; )
+ for( sal_uInt16 i = 0; i < XATTR_ANZ; )
rSet.DisableItem( nXAttr[ i++ ] );
}
else
diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx
index 325247072dea..e8b452a46625 100644
--- a/sw/source/ui/shells/drwbassh.cxx
+++ b/sw/source/ui/shells/drwbassh.cxx
@@ -89,14 +89,14 @@ TYPEINIT1(SwDrawBaseShell,SwBaseShell)
SwDrawBaseShell::SwDrawBaseShell(SwView &_rView):
SwBaseShell( _rView )
{
- GetShell().NoEdit(TRUE);
+ GetShell().NoEdit(sal_True);
SwEditWin& rWin = GetView().GetEditWin();
rWin.SetBezierMode(SID_BEZIER_MOVE);
if ( !_rView.GetDrawFuncPtr() )
- _rView.GetEditWin().StdDrawMode( OBJ_NONE, TRUE );
+ _rView.GetEditWin().StdDrawMode( OBJ_NONE, sal_True );
SwTransferable::CreateSelection( GetShell() );
}
@@ -113,12 +113,12 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
SwWrtShell *pSh = &GetShell();
SdrView* pSdrView = pSh->GetDrawView();
const SfxItemSet *pArgs = rReq.GetArgs();
- USHORT nSlotId = rReq.GetSlot();
- BOOL bChanged = pSdrView->GetModel()->IsChanged();
- pSdrView->GetModel()->SetChanged(FALSE);
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bChanged = pSdrView->GetModel()->IsChanged();
+ pSdrView->GetModel()->SetChanged(sal_False);
const SfxPoolItem* pItem = 0;
if(pArgs)
- pArgs->GetItemState(nSlotId, FALSE, &pItem);
+ pArgs->GetItemState(nSlotId, sal_False, &pItem);
//Sonderfall Align per Menue
if(pItem && nSlotId == SID_OBJECT_ALIGN)
@@ -128,11 +128,11 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
nSlotId++;
}
- BOOL bAlignPossible = pSh->IsAlignPossible();
+ sal_Bool bAlignPossible = pSh->IsAlignPossible();
- BOOL bTopParam = TRUE, bBottomParam = TRUE;
- BOOL bNotify = FALSE;
- BOOL bDone = FALSE;
+ sal_Bool bTopParam = sal_True, bBottomParam = sal_True;
+ sal_Bool bNotify = sal_False;
+ sal_Bool bDone = sal_False;
SfxBindings& rBind = GetView().GetViewFrame()->GetBindings();
switch (nSlotId)
@@ -162,14 +162,14 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- SfxAbstractDialog* pDlg = pFact->CreateSwWrapDlg( GetView().GetWindow(), aSet, pSh, TRUE, RC_DLG_SWWRAPDLG );
+ SfxAbstractDialog* pDlg = pFact->CreateSwWrapDlg( GetView().GetWindow(), aSet, pSh, sal_True, RC_DLG_SWWRAPDLG );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if (pDlg->Execute() == RET_OK)
{
const SfxPoolItem* pWrapItem;
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
- if(SFX_ITEM_SET == pOutSet->GetItemState(FN_DRAW_WRAP_DLG, FALSE, &pWrapItem))
+ if(SFX_ITEM_SET == pOutSet->GetItemState(FN_DRAW_WRAP_DLG, sal_False, &pWrapItem))
{
short nLayer = ((const SfxInt16Item*)pWrapItem)->GetValue();
if (nLayer == 1)
@@ -198,12 +198,12 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
SfxAbstractTabDialog *pDlg=NULL;
- BOOL bCaption = FALSE;
+ sal_Bool bCaption = sal_False;
// Erlaubte Verankerungen:
short nAnchor = pSh->GetAnchorId();
- USHORT nAllowedAnchors = SVX_OBJ_AT_CNTNT|SVX_OBJ_IN_CNTNT;
- USHORT nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell());
+ sal_uInt16 nAllowedAnchors = SVX_OBJ_AT_CNTNT|SVX_OBJ_IN_CNTNT;
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell());
if( !((HTMLMODE_ON & nHtmlMode) && (0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS))) )
nAllowedAnchors |= SVX_OBJ_PAGE;
@@ -211,7 +211,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
nAllowedAnchors |= SVX_OBJ_AT_FLY;
if (pObj->GetObjIdentifier() == OBJ_CAPTION )
- bCaption = TRUE;
+ bCaption = sal_True;
if (bCaption)
{
@@ -240,19 +240,20 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
}
SfxItemSet aNewAttr(pSdrView->GetGeoAttrFromMarked());
- const USHORT* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
+ const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
SfxItemSet aSet( *aNewAttr.GetPool(), pRange );
FieldUnit eMetric = ::GetDfltMetric(0 != dynamic_cast<SwWebView*>(&GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
- aSet.Put( aNewAttr, FALSE );
+ aSet.Put( aNewAttr, sal_False );
if (bCaption)
pSdrView->GetAttributes( aSet );
aSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, nAnchor));
- BOOL bRTL;
- aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrmVertical(TRUE, bRTL)));
+ sal_Bool bRTL;
+ sal_Bool bVertL2R;
+ aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrmVertical(sal_True, bRTL, bVertL2R)));
aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_RTL_TEXT, bRTL));
SwFrmFmt* pFrmFmt = FindFrmFmt( pObj );
@@ -280,18 +281,18 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
pSh->StartAllAction();
// --> OD 2004-07-14 #i30451#
- pSh->StartUndo();
+ pSh->StartUndo(UNDO_INSFMTATTR);
pSdrView->SetGeoAttrToMarked(*pOutSet);
if (bCaption)
pSdrView->SetAttributes(*pOutSet);
- BOOL bPosCorr =
+ sal_Bool bPosCorr =
SFX_ITEM_SET != pOutSet->GetItemState(
- SID_ATTR_TRANSFORM_POS_X, FALSE ) &&
+ SID_ATTR_TRANSFORM_POS_X, sal_False ) &&
SFX_ITEM_SET != pOutSet->GetItemState(
- SID_ATTR_TRANSFORM_POS_Y, FALSE );
+ SID_ATTR_TRANSFORM_POS_Y, sal_False );
SfxItemSet aFrmAttrSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END - 1);
@@ -299,11 +300,11 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
const SfxPoolItem* pAnchorItem;
if(SFX_ITEM_SET == pOutSet->GetItemState(
- SID_ATTR_TRANSFORM_ANCHOR, FALSE, &pAnchorItem))
+ SID_ATTR_TRANSFORM_ANCHOR, sal_False, &pAnchorItem))
{
if(!bSingleSelection)
pSh->ChgAnchor(((const SfxInt16Item*)pAnchorItem)
- ->GetValue(), FALSE, bPosCorr );
+ ->GetValue(), sal_False, bPosCorr );
else
{
SwFmtAnchor aAnchor(pFrmFmt->GetAnchor());
@@ -315,10 +316,10 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
const SfxPoolItem* pHoriRelation = 0;
const SfxPoolItem* pHoriPosition = 0;
const SfxPoolItem* pHoriMirror = 0;
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_ORIENT, FALSE, &pHoriOrient);
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_RELATION, FALSE, &pHoriRelation);
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_POSITION, FALSE, &pHoriPosition);
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_MIRROR, FALSE, &pHoriMirror);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_ORIENT, sal_False, &pHoriOrient);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_RELATION, sal_False, &pHoriRelation);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_POSITION, sal_False, &pHoriPosition);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_MIRROR, sal_False, &pHoriMirror);
if(pHoriOrient || pHoriRelation || pHoriPosition || pHoriMirror)
{
if(pHoriOrient)
@@ -337,9 +338,9 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
const SfxPoolItem* pVertOrient = 0;
const SfxPoolItem* pVertRelation = 0;
const SfxPoolItem* pVertPosition = 0;
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_ORIENT, FALSE, &pVertOrient);
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_RELATION, FALSE, &pVertRelation);
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_POSITION, FALSE, &pVertPosition);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_ORIENT, sal_False, &pVertOrient);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_RELATION, sal_False, &pVertRelation);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_POSITION, sal_False, &pVertPosition);
if(pVertOrient || pVertRelation || pVertPosition )
{
if(pVertOrient)
@@ -353,14 +354,14 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
aFrmAttrSet.Put( aVOrient );
}
const SfxPoolItem* pFollowItem = 0;
- pOutSet->GetItemState(RES_FOLLOW_TEXT_FLOW, FALSE, &pFollowItem);
+ pOutSet->GetItemState(RES_FOLLOW_TEXT_FLOW, sal_False, &pFollowItem);
if(pFollowItem)
aFrmAttrSet.Put(*pFollowItem);
if(aFrmAttrSet.Count())
pSh->SetDrawingAttr(aFrmAttrSet);
- rBind.InvalidateAll(FALSE);
+ rBind.InvalidateAll(sal_False);
// --> OD 2004-07-14 #i30451#
pSh->EndUndo( UNDO_INSFMTATTR );
@@ -379,7 +380,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
case FN_BACKSPACE:
if (pSh->IsObjSelected() && !pSdrView->IsTextEdit())
{
- bDone = TRUE;
+ bDone = sal_True;
if( GetView().IsDrawRotate() )
{
@@ -408,7 +409,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
pSh->LeaveSelFrmMode();
// #105852# FME
}
- bNotify = TRUE;
+ bNotify = sal_True;
}
break;
@@ -432,7 +433,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if (pSh->IsGroupSelected())
{
pSdrView->EnterMarkedGroup();
- rBind.InvalidateAll(FALSE);
+ rBind.InvalidateAll(sal_False);
}
break;
@@ -458,7 +459,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if( rMarkList.GetMarkCount() == 1 && bAlignPossible )
{ // Objekte nicht aneinander ausrichten
- USHORT nAnchor = pSh->GetAnchorId();
+ sal_uInt16 nAnchor = pSh->GetAnchorId();
if (nAnchor == FLY_AS_CHAR)
{
sal_Int16 nVertOrient = -1;
@@ -521,14 +522,14 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
break;
case FN_FRAME_UP:
- bTopParam = FALSE;
+ bTopParam = sal_False;
/* no break */
case SID_FRAME_TO_TOP:
pSh->SelectionToTop( bTopParam );
break;
case FN_FRAME_DOWN:
- bBottomParam = FALSE;
+ bBottomParam = sal_False;
/* no break */
case SID_FRAME_TO_BOTTOM:
pSh->SelectionToBottom( bBottomParam );
@@ -536,7 +537,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
case FN_NAME_SHAPE:
{
- bDone = TRUE;
+ bDone = sal_True;
if(1L == pSdrView->GetMarkedObjectCount())
{
@@ -568,7 +569,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
// #i68101#
case FN_TITLE_DESCRIPTION_SHAPE:
{
- bDone = TRUE;
+ bDone = sal_True;
if(1L == pSdrView->GetMarkedObjectCount())
{
@@ -610,7 +611,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if (pSdrView->GetModel()->IsChanged())
pSh->SetModified();
else if (bChanged)
- pSdrView->GetModel()->SetChanged(TRUE);
+ pSdrView->GetModel()->SetChanged(sal_True);
// 40220: Nach dem Loeschen von DrawObjekten ueber die API GPF durch Selbstzerstoerung
if(bNotify)
GetView().AttrChangedNotify(pSh); // ggf Shellwechsel...
@@ -657,8 +658,8 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet)
SwWrtShell &rSh = GetShell();
SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
- BOOL bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ sal_Bool bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
if (!bProtected) // Im Parent nachsehen
bProtected |= rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
@@ -744,9 +745,9 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet)
}
}
-BOOL SwDrawBaseShell::Disable(SfxItemSet& rSet, USHORT nWhich)
+sal_Bool SwDrawBaseShell::Disable(SfxItemSet& rSet, sal_uInt16 nWhich)
{
- BOOL bDisable = GetShell().IsSelObjProtected(FLYPROTECT_CONTENT);
+ sal_Bool bDisable = GetShell().IsSelObjProtected(FLYPROTECT_CONTENT);
if (bDisable)
{
@@ -798,8 +799,12 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation
pValidation->bFollowTextFlow,
pValidation->bMirror, NULL, &pValidation->aPercentSize);
- BOOL bRTL;
- BOOL bIsInVertical = pSh->IsFrmVertical(TRUE, bRTL);
+ sal_Bool bIsInVertical( sal_False );
+ {
+ sal_Bool bRTL;
+ sal_Bool bVertL2R;
+ bIsInVertical = pSh->IsFrmVertical(sal_True, bRTL, bVertL2R);
+ }
if(bIsInVertical)
{
Point aPos(aBoundRect.Pos());
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index acfaf900c185..fdfd5208896c 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -162,7 +162,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SvxScriptSetItem aSetItem( nSlot, *pPool2 );
// #i78017 establish the same behaviour as in Writer
- USHORT nScriptTypes = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt16 nScriptTypes = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
if (nSlot == SID_ATTR_CHAR_FONT)
nScriptTypes = pOLV->GetSelectedScriptType();
@@ -277,7 +277,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SwView* pView = &GetView();
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, pView));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
SfxItemSet aDlgAttr(GetPool(), EE_ITEMS_START, EE_ITEMS_END);
// util::Language gibts an der EditEngine nicht! Daher nicht im Set.
@@ -290,7 +290,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg( pView->GetWindow(), *pView, aDlgAttr, DLG_CHAR,0, sal_True );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet )
{
rReq.Done( *( pDlg->GetOutputItemSet() ) );
@@ -349,7 +349,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SwDocStat aCurr;
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
{
- SwWait aWait( *GetView().GetDocShell(), TRUE );
+ SwWait aWait( *GetView().GetDocShell(), sal_True );
rSh.StartAction();
rSh.CountWords( aCurr );
rSh.UpdateDocStat( aDocStat );
@@ -372,7 +372,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
{
SwView* pView = &GetView();
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, pView));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
SfxItemSet aDlgAttr(GetPool(),
EE_ITEMS_START, EE_ITEMS_END,
SID_ATTR_PARA_HYPHENZONE, SID_ATTR_PARA_HYPHENZONE,
@@ -394,7 +394,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SfxAbstractTabDialog* pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(), GetView(), aDlgAttr,DLG_STD, DLG_PARA, 0, sal_True );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet)
{
rReq.Done( *( pDlg->GetOutputItemSet() ) );
@@ -488,7 +488,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
sal_Bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT;
const SfxPoolItem* pPoolItem;
- if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, TRUE, &pPoolItem ) )
+ if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, sal_True, &pPoolItem ) )
{
if( !( (SfxBoolItem*)pPoolItem)->GetValue() )
bLeftToRight = !bLeftToRight;
@@ -498,8 +498,8 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
0 );
- USHORT nAdjust = SVX_ADJUST_LEFT;
- if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, TRUE, &pPoolItem ) )
+ sal_uInt16 nAdjust = SVX_ADJUST_LEFT;
+ if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, sal_True, &pPoolItem ) )
nAdjust = ( (SvxAdjustItem*)pPoolItem)->GetEnumValue();
if( bLeftToRight )
@@ -555,8 +555,8 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet)
while(nWhich)
{
- USHORT nSlotId = GetPool().GetSlotId( nWhich );
- BOOL bFlag = FALSE;
+ sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich );
+ sal_Bool bFlag = sal_False;
switch( nSlotId )
{
case SID_LANGUAGE_STATUS://20412:
@@ -640,7 +640,7 @@ ASK_ESCAPE:
// disable "Thesaurus" if the language is not supported
const SfxPoolItem &rItem = GetShell().GetDoc()->GetDefault(
GetWhichOfScript( RES_CHRATR_LANGUAGE,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage())) );
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage())) );
LanguageType nLang = ((const SvxLanguageItem &) rItem).GetLanguage();
uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
@@ -772,11 +772,11 @@ void SwDrawTextShell::GetDrawTxtCtrlState(SfxItemSet& rSet)
SfxWhichIter aIter(rSet);
sal_uInt16 nWhich = aIter.FirstWhich();
- USHORT nScriptType = pOLV->GetSelectedScriptType();
+ sal_uInt16 nScriptType = pOLV->GetSelectedScriptType();
while(nWhich)
{
sal_uInt16 nEEWhich = 0;
- USHORT nSlotId = GetPool().GetSlotId( nWhich );
+ sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich );
switch( nSlotId )
{
case SID_ATTR_CHAR_FONT:
@@ -788,7 +788,7 @@ void SwDrawTextShell::GetDrawTxtCtrlState(SfxItemSet& rSet)
if( !pEditPool )
pEditPool = aEditAttr.GetPool();
SvxScriptSetItem aSetItem( nSlotId, *pEditPool );
- aSetItem.GetItemSet().Put( aEditAttr, FALSE );
+ aSetItem.GetItemSet().Put( aEditAttr, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType );
if( pI )
rSet.Put( *pI, nWhich );
diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx
index 22d9de6afc3a..6efdd202ed6e 100644
--- a/sw/source/ui/shells/drwtxtsh.cxx
+++ b/sw/source/ui/shells/drwtxtsh.cxx
@@ -111,7 +111,7 @@ void SwDrawTextShell::Init()
if( !pOutliner )
return ;
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
- ULONG nCtrl = pOutliner->GetControlWord();
+ sal_uLong nCtrl = pOutliner->GetControlWord();
nCtrl |= EE_CNTRL_AUTOCORRECT;
SetUndoManager(&pOutliner->GetUndoManager());
@@ -139,7 +139,7 @@ SwDrawTextShell::SwDrawTextShell(SwView &rV) :
Init();
- rSh.NoEdit(TRUE);
+ rSh.NoEdit(sal_True);
SetName(String::CreateFromAscii("ObjectText"));
SetHelpId(SW_DRWTXTSHELL);
}
@@ -161,7 +161,7 @@ SwWrtShell& SwDrawTextShell::GetShell()
void SwDrawTextShell::StateDisableItems( SfxItemSet &rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
@@ -188,7 +188,7 @@ void SwDrawTextShell::SetAttrToMarked(const SfxItemSet& rAttr)
}
}
-BOOL SwDrawTextShell::IsTextEdit()
+sal_Bool SwDrawTextShell::IsTextEdit()
{
return pSdrView->IsTextEdit();
}
@@ -197,7 +197,7 @@ void SwDrawTextShell::ExecFontWork(SfxRequest& rReq)
{
SwWrtShell &rSh = GetShell();
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rSh.GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if ( rReq.GetArgs() )
{
@@ -213,7 +213,7 @@ void SwDrawTextShell::ExecFontWork(SfxRequest& rReq)
void SwDrawTextShell::StateFontWork(SfxItemSet& rSet)
{
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
rSet.Put(SfxBoolItem(SID_FONTWORK, GetView().GetViewFrame()->HasChildWindow(nId)));
}
@@ -246,12 +246,12 @@ void SwDrawTextShell::ExecFormText(SfxRequest& rReq)
rTempView.AttrChangedNotify(&rSh);
}
- if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, TRUE, &pItem) ==
+ if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, sal_True, &pItem) ==
SFX_ITEM_SET &&
((const XFormTextStdFormItem*) pItem)->GetValue() != XFTFORM_NONE )
{
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*)(
pVFrame->GetChildWindow(nId)->GetWindow());
@@ -279,7 +279,7 @@ void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet)
const SdrObject* pObj = NULL;
SvxFontWorkDialog* pDlg = NULL;
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if ( pVFrame->HasChildWindow(nId) )
@@ -292,13 +292,13 @@ void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet)
!((SdrTextObj*) pObj)->HasText() )
{
#define XATTR_ANZ 12
- static const USHORT nXAttr[ XATTR_ANZ ] =
+ static const sal_uInt16 nXAttr[ XATTR_ANZ ] =
{ XATTR_FORMTXTSTYLE, XATTR_FORMTXTADJUST, XATTR_FORMTXTDISTANCE,
XATTR_FORMTXTSTART, XATTR_FORMTXTMIRROR, XATTR_FORMTXTSTDFORM,
XATTR_FORMTXTHIDEFORM, XATTR_FORMTXTOUTLINE, XATTR_FORMTXTSHADOW,
XATTR_FORMTXTSHDWCOLOR, XATTR_FORMTXTSHDWXVAL, XATTR_FORMTXTSHDWYVAL
};
- for( USHORT i = 0; i < XATTR_ANZ; )
+ for( sal_uInt16 i = 0; i < XATTR_ANZ; )
rSet.DisableItem( nXAttr[ i++ ] );
}
else
@@ -446,7 +446,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
const SfxPoolItem* pItem = 0;
if(pNewAttrs)
{
- pNewAttrs->GetItemState(nSlot, FALSE, &pItem );
+ pNewAttrs->GetItemState(nSlot, sal_False, &pItem );
pOLV->InsertText(((const SfxStringItem *)pItem)->GetValue());
}
break;
@@ -457,9 +457,9 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
SdrOutliner * pOutliner = pSdrView->GetTextEditOutliner();
if(pOutliner)
{
- ULONG nParaCount = pOutliner->GetParagraphCount();
+ sal_uLong nParaCount = pOutliner->GetParagraphCount();
if (nParaCount > 0)
- pOLV->SelectRange(0L, USHORT(nParaCount) );
+ pOLV->SelectRange(0L, sal_uInt16(nParaCount) );
}
}
break;
@@ -467,7 +467,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
case FN_FORMAT_RESET: // delete hard text attributes
{
pOLV->RemoveAttribsKeepLanguages( true );
- pOLV->GetEditView().GetEditEngine()->RemoveFields(TRUE);
+ pOLV->GetEditView().GetEditEngine()->RemoveFields(sal_True);
rReq.Done();
}
break;
@@ -494,7 +494,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog(
&(GetView().GetViewFrame()->GetWindow()),
&aNewAttr, pSdrView );
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
if (nResult == RET_OK)
{
@@ -515,7 +515,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
return;
}
- GetView().GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False);
if (IsTextEdit() && pOLV->GetOutliner()->IsModified())
rSh.SetModified();
@@ -528,31 +528,31 @@ void SwDrawTextShell::ExecUndo(SfxRequest &rReq)
{
if( IsTextEdit() )
{
- BOOL bCallBase = TRUE;
+ sal_Bool bCallBase = sal_True;
const SfxItemSet* pArgs = rReq.GetArgs();
if( pArgs )
{
- USHORT nId = rReq.GetSlot(), nCnt = 1;
+ sal_uInt16 nId = rReq.GetSlot(), nCnt = 1;
const SfxPoolItem* pItem;
switch( nId )
{
case SID_UNDO:
case SID_REDO:
- if( SFX_ITEM_SET == pArgs->GetItemState( nId, FALSE, &pItem ) &&
+ if( SFX_ITEM_SET == pArgs->GetItemState( nId, sal_False, &pItem ) &&
1 < (nCnt = ((SfxUInt16Item*)pItem)->GetValue()) )
{
// then we make by ourself.
- SfxUndoManager* pUndoManager = GetUndoManager();
+ ::svl::IUndoManager* pUndoManager = GetUndoManager();
if( pUndoManager )
{
if( SID_UNDO == nId )
while( nCnt-- )
- pUndoManager->Undo(0);
+ pUndoManager->Undo();
else
while( nCnt-- )
- pUndoManager->Redo(0);
+ pUndoManager->Redo();
}
- bCallBase = FALSE;
+ bCallBase = sal_False;
GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False);
}
break;
@@ -576,7 +576,7 @@ void SwDrawTextShell::StateUndo(SfxItemSet &rSet)
SfxViewFrame *pSfxViewFrame = GetView().GetViewFrame();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
switch ( nWhich )
@@ -584,27 +584,27 @@ void SwDrawTextShell::StateUndo(SfxItemSet &rSet)
case SID_GETUNDOSTRINGS:
case SID_GETREDOSTRINGS:
{
- SfxUndoManager* pUndoManager = GetUndoManager();
+ ::svl::IUndoManager* pUndoManager = GetUndoManager();
if( pUndoManager )
{
- UniString (SfxUndoManager:: *fnGetComment)( USHORT ) const;
+ UniString (::svl::IUndoManager:: *fnGetComment)( size_t, bool const ) const;
sal_uInt16 nCount;
if( SID_GETUNDOSTRINGS == nWhich )
{
nCount = pUndoManager->GetUndoActionCount();
- fnGetComment = &SfxUndoManager::GetUndoActionComment;
+ fnGetComment = &::svl::IUndoManager::GetUndoActionComment;
}
else
{
nCount = pUndoManager->GetRedoActionCount();
- fnGetComment = &SfxUndoManager::GetRedoActionComment;
+ fnGetComment = &::svl::IUndoManager::GetRedoActionComment;
}
if( nCount )
{
String sList;
for( sal_uInt16 n = 0; n < nCount; ++n )
- ( sList += (pUndoManager->*fnGetComment)( n ) )
+ ( sList += (pUndoManager->*fnGetComment)( n, ::svl::IUndoManager::TopLevel ) )
+= '\n';
SfxStringListItem aItem( nWhich );
@@ -687,7 +687,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if( pArgs )
- pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), sal_False, &pItem);
String sSym;
String sFontName;
@@ -695,25 +695,25 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
{
sSym = ((const SfxStringItem*)pItem)->GetValue();
const SfxPoolItem* pFtItem = NULL;
- pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem);
+ pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), sal_False, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
sFontName = pFontItem->GetValue();
}
SfxItemSet aSet(pOLV->GetAttribs());
- USHORT nScript = pOLV->GetSelectedScriptType();
+ sal_uInt16 nScript = pOLV->GetSelectedScriptType();
SvxFontItem aSetDlgFont( RES_CHRATR_FONT );
{
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, *aSet.GetPool() );
- aSetItem.GetItemSet().Put( aSet, FALSE );
+ aSetItem.GetItemSet().Put( aSet, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript );
if( pI )
aSetDlgFont = *(SvxFontItem*)pI;
else
aSetDlgFont = (SvxFontItem&)aSet.Get( GetWhichOfScript(
SID_ATTR_CHAR_FONT,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) ));
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ) ));
if (!sFontName.Len())
sFontName = aSetDlgFont.GetFamilyName();
}
@@ -722,7 +722,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
if(!sSym.Len())
{
SfxAllItemSet aAllSet( GetPool() );
- aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) );
SwViewOption aOpt(*rView.GetWrtShell().GetViewOptions());
String sSymbolFont = aOpt.GetSymbolFont();
@@ -735,11 +735,11 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( rView.GetWindow(), aAllSet,
rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
if( nResult == RET_OK )
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE );
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, sal_False );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False );
if ( pFontItem )
{
aFont.SetName( pFontItem->GetFamilyName() );
@@ -764,7 +764,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
// nicht flackern
pOLV->HideCursor();
SdrOutliner * pOutliner = pSdrView->GetTextEditOutliner();
- pOutliner->SetUpdateMode(FALSE);
+ pOutliner->SetUpdateMode(sal_False);
SfxItemSet aOldSet( pOLV->GetAttribs() );
SfxItemSet aFontSet( *aOldSet.GetPool(),
@@ -802,7 +802,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
pOLV->SetAttribs( aFontSet );
// ab jetzt wieder anzeigen
- pOutliner->SetUpdateMode(TRUE);
+ pOutliner->SetUpdateMode(sal_True);
pOLV->ShowCursor();
rReq.AppendItem( SfxStringItem( GetPool().GetWhich(SID_CHARMAP), sSym ) );
@@ -812,7 +812,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
}
}
-SfxUndoManager* SwDrawTextShell::GetUndoManager()
+::svl::IUndoManager* SwDrawTextShell::GetUndoManager()
{
SwWrtShell &rSh = GetShell();
pSdrView = rSh.GetDrawView();
diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx
index 3c1b1a8be3d9..40689c614392 100644
--- a/sw/source/ui/shells/frmsh.cxx
+++ b/sw/source/ui/shells/frmsh.cxx
@@ -54,7 +54,7 @@
#include <vcl/msgbox.hxx>
// <--
-
+#include <doc.hxx>
#include <fmturl.hxx>
#include <fmtclds.hxx>
#include <fmtcnct.hxx>
@@ -80,6 +80,7 @@
#include <helpid.h>
#include <cmdid.h>
+#include <cfgitems.hxx>
#include <globals.hrc>
#include <popup.hrc>
#include <shells.hrc>
@@ -131,10 +132,10 @@ void SwFrameShell::Execute(SfxRequest &rReq)
{
//Erstmal die, die keinen FrmMgr benoetigen.
SwWrtShell &rSh = GetShell();
- BOOL bMore = FALSE;
+ sal_Bool bMore = sal_False;
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
@@ -284,11 +285,11 @@ void SwFrameShell::Execute(SfxRequest &rReq)
break;
case FN_FRAME_UP:
- rSh.SelectionToTop( FALSE );
+ rSh.SelectionToTop( sal_False );
break;
case FN_FRAME_DOWN:
- rSh.SelectionToBottom( FALSE );
+ rSh.SelectionToBottom( sal_False );
break;
case FN_INSERT_FRAME:
if (!pArgs)
@@ -303,15 +304,15 @@ void SwFrameShell::Execute(SfxRequest &rReq)
else
{
// Rahmen existiert bereits, nur Spaltenanzahl wird geaendert
- USHORT nCols = 1;
- if(pArgs->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem) == SFX_ITEM_SET)
+ sal_uInt16 nCols = 1;
+ if(pArgs->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem) == SFX_ITEM_SET)
nCols = ((SfxUInt16Item *)pItem)->GetValue();
SfxItemSet aSet(GetPool(),RES_COL,RES_COL);
rSh.GetFlyFrmAttr( aSet );
SwFmtCol aCol((const SwFmtCol&)aSet.Get(RES_COL));
// GutterWidth wird nicht immer uebergeben, daher erst besorgen (siehe view2: Execute auf diesen Slot)
- USHORT nGutterWidth = aCol.GetGutterWidth();
+ sal_uInt16 nGutterWidth = aCol.GetGutterWidth();
if(!nCols )
nCols++;
aCol.Init(nCols, nGutterWidth, aCol.GetWishWidth());
@@ -335,7 +336,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
case SID_HYPERLINK_SETLINK:
{
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_HYPERLINK_SETLINK, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_HYPERLINK_SETLINK, sal_False, &pItem))
{
const SvxHyperlinkItem& rHLinkItem = *(const SvxHyperlinkItem *)pItem;
const String& rURL = rHLinkItem.GetURL();
@@ -350,7 +351,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
if (sOldName.ToUpperAscii() != sFlyName.ToUpperAscii())
{
String sName(sOldName);
- USHORT i = 1;
+ sal_uInt16 i = 1;
while (rSh.FindFlyByName(sName))
{
sName = sOldName;
@@ -359,7 +360,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
}
rSh.SetFlyName(sName);
}
- aURL.SetURL( rURL, FALSE );
+ aURL.SetURL( rURL, sal_False );
aURL.SetTargetFrameName(rTarget);
aSet.Put( aURL );
@@ -421,7 +422,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
SwDocStat aCurr;
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
{
- SwWait aWait( *GetView().GetDocShell(), TRUE );
+ SwWait aWait( *GetView().GetDocShell(), sal_True );
rSh.StartAction();
rSh.CountWords( aCurr );
rSh.UpdateDocStat( aDocStat );
@@ -436,7 +437,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
delete pDialog;
}
break;
- default: bMore = TRUE;
+ default: bMore = sal_True;
}
if ( !bMore )
@@ -444,9 +445,9 @@ void SwFrameShell::Execute(SfxRequest &rReq)
return;
}
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
- BOOL bUpdateMgr = TRUE;
- BOOL bCopyToFmt = FALSE;
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
+ sal_Bool bUpdateMgr = sal_True;
+ sal_Bool bCopyToFmt = sal_False;
switch ( nSlot )
{
case SID_OBJECT_ALIGN_MIDDLE:
@@ -509,18 +510,18 @@ void SwFrameShell::Execute(SfxRequest &rReq)
if(pArgs)
{
aMgr.SetAttrSet( *pArgs );
- bCopyToFmt = TRUE;
+ bCopyToFmt = sal_True;
}
}
break;
case SID_ATTR_ULSPACE:
case SID_ATTR_LRSPACE:
{
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem))
{
aMgr.SetAttrSet( *pArgs );
if(SID_ATTR_ULSPACE == nSlot && SID_ATTR_ULSPACE == nSlot)
- bCopyToFmt = TRUE;
+ bCopyToFmt = sal_True;
}
}
break;
@@ -530,7 +531,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
if (nSel & nsSelectionType::SEL_GRF)
{
rSh.GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_GRAFIC_DLG);
- bUpdateMgr = FALSE;
+ bUpdateMgr = sal_False;
}
else
{
@@ -547,14 +548,13 @@ void SwFrameShell::Execute(SfxRequest &rReq)
SID_HTML_MODE, SID_HTML_MODE,
FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME,
FN_PARAM_CHAIN_PREVIOUS, FN_PARAM_CHAIN_NEXT,
+ FN_OLE_IS_MATH, FN_OLE_IS_MATH,
+ FN_MATH_BASELINE_ALIGNMENT, FN_MATH_BASELINE_ALIGNMENT,
0);
const SwViewOption* pVOpt = rSh.GetViewOptions();
if(nSel & nsSelectionType::SEL_OLE)
- {
- aSet.Put(SfxBoolItem(FN_KEEP_ASPECT_RATIO,
- pVOpt->IsKeepRatio()));
- }
+ aSet.Put( SfxBoolItem(FN_KEEP_ASPECT_RATIO, pVOpt->IsKeepRatio()) );
aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell())));
aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName()));
if( nSel & nsSelectionType::SEL_OLE )
@@ -583,23 +583,29 @@ void SwFrameShell::Execute(SfxRequest &rReq)
if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != 0xff)
rSize.SetHeight(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Height());
- UINT16 nDefPage = 0;
- if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, FALSE, &pItem) == SFX_ITEM_SET)
+ // disable vertical positioning for Math Objects anchored 'as char' if baseline alignment is activated
+ aSet.Put( SfxBoolItem( FN_MATH_BASELINE_ALIGNMENT,
+ rSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) ) );
+ const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() );
+ aSet.Put( SfxBoolItem( FN_OLE_IS_MATH, xObj.is() && SotExchange::IsMath( xObj->getClassID() ) ) );
+
+ sal_uInt16 nDefPage = 0;
+ if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, sal_False, &pItem) == SFX_ITEM_SET)
nDefPage = ((SfxUInt16Item *)pItem)->GetValue();
aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetTopFrame()));
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric) ));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric) ));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_STD,
GetView().GetViewFrame(),
GetView().GetWindow(),
- aSet, FALSE,
+ aSet, sal_False,
nSel & nsSelectionType::SEL_GRF ? DLG_FRM_GRF :
nSel & nsSelectionType::SEL_OLE ? DLG_FRM_OLE :
DLG_FRM_STD,
- FALSE,
+ sal_False,
nDefPage);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
@@ -610,13 +616,13 @@ void SwFrameShell::Execute(SfxRequest &rReq)
{
rReq.Done(*pOutSet);
if(nSel & nsSelectionType::SEL_OLE &&
- SFX_ITEM_SET == pOutSet->GetItemState(FN_KEEP_ASPECT_RATIO, TRUE, &pItem))
+ SFX_ITEM_SET == pOutSet->GetItemState(FN_KEEP_ASPECT_RATIO, sal_True, &pItem))
{
SwViewOption aUsrPref( *pVOpt );
aUsrPref.SetKeepRatio(((const SfxBoolItem*)pItem)->GetValue());
SW_MOD()->ApplyUsrPref(aUsrPref, &GetView());
}
- if (SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_ALT_NAME, TRUE, &pItem))
+ if (SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_ALT_NAME, sal_True, &pItem))
{
// #i73249#
rSh.SetObjTitle(((const SfxStringItem*)pItem)->GetValue());
@@ -628,7 +634,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
rSh.AutoUpdateFrame(pFmt, *pOutSet);
// alles, dass das Format nicht kann, muss hart
// gesetzt werden
- if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, FALSE, &pItem))
+ if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, sal_False, &pItem))
rSh.SetFlyName(((SfxStringItem*)pItem)->GetValue());
SfxItemSet aShellSet(GetPool(), RES_FRM_SIZE, RES_FRM_SIZE,
RES_SURROUND, RES_SURROUND,
@@ -637,7 +643,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
0);
aShellSet.Put(*pOutSet);
aMgr.SetAttrSet(aShellSet);
- if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, FALSE, &pItem))
+ if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, sal_False, &pItem))
rSh.SetFlyName(((SfxStringItem*)pItem)->GetValue());
}
else
@@ -646,7 +652,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
const SwFrmFmt* pCurrFlyFmt = rSh.GetFlyFrmFmt();
if(SFX_ITEM_SET ==
pOutSet->GetItemState(FN_PARAM_CHAIN_PREVIOUS,
- FALSE, &pItem))
+ sal_False, &pItem))
{
rSh.HideChainMarker();
@@ -680,7 +686,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
rSh.SetChainMarker();
}
if(SFX_ITEM_SET ==
- pOutSet->GetItemState(FN_PARAM_CHAIN_NEXT, FALSE,
+ pOutSet->GetItemState(FN_PARAM_CHAIN_NEXT, sal_False,
&pItem))
{
rSh.HideChainMarker();
@@ -717,7 +723,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
}
}
else
- bUpdateMgr = FALSE;
+ bUpdateMgr = sal_False;
delete pDlg;
}
}
@@ -725,19 +731,19 @@ void SwFrameShell::Execute(SfxRequest &rReq)
case FN_FRAME_MIRROR_ON_EVEN_PAGES:
{
SwFmtHoriOrient aHori(aMgr.GetHoriOrient());
- BOOL bMirror = !aHori.IsPosToggle();
+ sal_Bool bMirror = !aHori.IsPosToggle();
aHori.SetPosToggle(bMirror);
SfxItemSet aSet(GetPool(), RES_HORI_ORIENT, RES_HORI_ORIENT);
aSet.Put(aHori);
aMgr.SetAttrSet(aSet);
- bCopyToFmt = TRUE;
+ bCopyToFmt = sal_True;
rReq.SetReturnValue(SfxBoolItem(nSlot, bMirror));
}
break;
// --> OD 2009-07-14 #i73249#
case FN_TITLE_DESCRIPTION_SHAPE:
{
- bUpdateMgr = FALSE;
+ bUpdateMgr = sal_False;
SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
if ( pSdrView &&
pSdrView->GetMarkedObjectCount() == 1 )
@@ -788,7 +794,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
void SwFrameShell::GetState(SfxItemSet& rSet)
{
SwWrtShell &rSh = GetShell();
- BOOL bHtmlMode = 0 != ::GetHtmlMode(rSh.GetView().GetDocShell());
+ sal_Bool bHtmlMode = 0 != ::GetHtmlMode(rSh.GetView().GetDocShell());
if (rSh.IsFrmSelected())
{
SfxItemSet aSet( rSh.GetAttrPool(),
@@ -799,16 +805,16 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
0 );
rSh.GetFlyFrmAttr( aSet );
- BOOL bProtect = rSh.IsSelObjProtected(FLYPROTECT_POS);
- BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
+ sal_Bool bProtect = rSh.IsSelObjProtected(FLYPROTECT_POS);
+ sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
bProtect |= bParentCntProt;
- const USHORT eFrmType = rSh.GetFrmType(0,TRUE);
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
+ const sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True);
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch ( nWhich )
@@ -830,7 +836,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
case RES_PRINT:
case RES_SURROUND:
{
- rSet.Put(aSet.Get(GetPool().GetWhich(nWhich), TRUE ));
+ rSet.Put(aSet.Get(GetPool().GetWhich(nWhich), sal_True ));
}
break;
case SID_OBJECT_ALIGN_LEFT :
@@ -877,7 +883,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
rSet.DisableItem( nWhich );
else
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if (eFrmType & FRMTYPE_FLY_INCNT)
{
switch (nWhich)
@@ -942,7 +948,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
SfxItemSet aURLSet(GetPool(), RES_URL, RES_URL);
rSh.GetFlyFrmAttr( aURLSet );
- if(SFX_ITEM_SET == aURLSet.GetItemState(RES_URL, TRUE, &pItem))
+ if(SFX_ITEM_SET == aURLSet.GetItemState(RES_URL, sal_True, &pItem))
{
const SwFmtURL* pFmtURL = (const SwFmtURL*)pItem;
aHLinkItem.SetURL(pFmtURL->GetURL());
@@ -972,7 +978,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
}
else
{
- BOOL bChainMode = rSh.GetView().GetEditWin().IsChainMode();
+ sal_Bool bChainMode = rSh.GetView().GetEditWin().IsChainMode();
rSet.Put( SfxBoolItem( FN_FRAME_CHAIN, bChainMode ) );
}
}
@@ -1055,7 +1061,7 @@ SwFrameShell::~SwFrameShell()
void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
{
SwWrtShell &rSh = GetShell();
- BOOL bDefault = FALSE;
+ sal_Bool bDefault = sal_False;
if (!rSh.IsFrmSelected())
return;
@@ -1070,7 +1076,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
const SvxBoxItem& rBoxItem = (const SvxBoxItem&)aFrameSet.Get(RES_BOX);
if (pPoolBoxItem == &rBoxItem)
- bDefault = TRUE;
+ bDefault = sal_True;
SvxBoxItem aBoxItem(rBoxItem);
@@ -1083,7 +1089,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
{
case SID_ATTR_BORDER:
{
- if (pArgs->GetItemState(RES_BOX, TRUE, &pItem) == SFX_ITEM_SET)
+ if (pArgs->GetItemState(RES_BOX, sal_True, &pItem) == SFX_ITEM_SET)
{
SvxBoxItem aNewBox(*((SvxBoxItem *)pItem));
const SvxBorderLine* pBorderLine;
@@ -1127,7 +1133,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
case SID_FRAME_LINESTYLE:
{
- if (pArgs->GetItemState(SID_FRAME_LINESTYLE, FALSE, &pItem) == SFX_ITEM_SET)
+ if (pArgs->GetItemState(SID_FRAME_LINESTYLE, sal_False, &pItem) == SFX_ITEM_SET)
{
const SvxLineItem* pLineItem =
(const SvxLineItem*)pItem;
@@ -1181,7 +1187,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
case SID_FRAME_LINECOLOR:
{
- if (pArgs->GetItemState(SID_FRAME_LINECOLOR, FALSE, &pItem) == SFX_ITEM_SET)
+ if (pArgs->GetItemState(SID_FRAME_LINECOLOR, sal_False, &pItem) == SFX_ITEM_SET)
{
const Color& rNewColor = ((const SvxColorItem*)pItem)->GetValue();
@@ -1244,7 +1250,7 @@ void lcl_FrmGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBo
void SwFrameShell::GetLineStyleState(SfxItemSet &rSet)
{
SwWrtShell &rSh = GetShell();
- BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
+ sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
if (bParentCntProt)
{
diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx
index cff70e7c3c6c..c7504550fc1b 100644
--- a/sw/source/ui/shells/grfsh.cxx
+++ b/sw/source/ui/shells/grfsh.cxx
@@ -95,7 +95,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch(nSlot)
{
case SID_TWAIN_TRANSFER:
@@ -130,7 +130,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
case SID_INSERT_GRAPHIC:
case FN_FORMAT_GRAFIC_DLG:
{
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, rSh.IsFrmSelected() ?
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, rSh.IsFrmSelected() ?
FRMMGR_TYPE_NONE : FRMMGR_TYPE_GRF);
const SwViewOption* pVOpt = rSh.GetViewOptions();
SwViewOption aUsrPref( *pVOpt );
@@ -152,10 +152,10 @@ void SwGrfShell::Execute(SfxRequest &rReq)
FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME,
0);
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
aSet.Put(SfxUInt16Item(SID_HTML_MODE, nHtmlMode));
FieldUnit eMetric = ::GetDfltMetric((0 != (nHtmlMode&HTMLMODE_ON)));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
const SwRect* pRect = &rSh.GetAnyCurRect(RECT_PAGE);
SwFmtFrmSize aFrmSize( ATT_VAR_SIZE, pRect->Width(), pRect->Height());
@@ -242,7 +242,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_GRF,
GetView().GetViewFrame(),
GetView().GetWindow(),
- aSet, FALSE, DLG_FRM_GRF);
+ aSet, sal_False, DLG_FRM_GRF);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( pDlg->Execute() )
{
@@ -253,7 +253,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
rReq.Done(*pSet);
// change the 2 frmsize SizeItems to the correct SwFrmSizeItem
if( SFX_ITEM_SET == pSet->GetItemState(
- SID_ATTR_GRAF_FRMSIZE, FALSE, &pItem ))
+ SID_ATTR_GRAF_FRMSIZE, sal_False, &pItem ))
{
SwFmtFrmSize aSize;
const Size& rSz = ((SvxSizeItem*)pItem)->GetSize();
@@ -261,11 +261,11 @@ void SwGrfShell::Execute(SfxRequest &rReq)
aSize.SetHeight( rSz.Height() );
if( SFX_ITEM_SET == pSet->GetItemState(
- SID_ATTR_GRAF_FRMSIZE_PERCENT, FALSE, &pItem ))
+ SID_ATTR_GRAF_FRMSIZE_PERCENT, sal_False, &pItem ))
{
const Size& rRelativeSize = ((SvxSizeItem*)pItem)->GetSize();
- aSize.SetWidthPercent( static_cast< BYTE >( rRelativeSize.Width() ) );
- aSize.SetHeightPercent( static_cast< BYTE >( rRelativeSize.Height() ) );
+ aSize.SetWidthPercent( static_cast< sal_uInt8 >( rRelativeSize.Width() ) );
+ aSize.SetHeightPercent( static_cast< sal_uInt8 >( rRelativeSize.Height() ) );
}
pSet->Put( aSize );
}
@@ -289,20 +289,20 @@ void SwGrfShell::Execute(SfxRequest &rReq)
}
aMgr.UpdateFlyFrm();
- BOOL bApplyUsrPref = FALSE;
+ sal_Bool bApplyUsrPref = sal_False;
if (SFX_ITEM_SET == pSet->GetItemState(
- FN_KEEP_ASPECT_RATIO, TRUE, &pItem ))
+ FN_KEEP_ASPECT_RATIO, sal_True, &pItem ))
{
aUsrPref.SetKeepRatio(
((const SfxBoolItem*)pItem)->GetValue() );
- bApplyUsrPref = TRUE;
+ bApplyUsrPref = sal_True;
}
if( SFX_ITEM_SET == pSet->GetItemState(
- SID_ATTR_GRAF_KEEP_ZOOM, TRUE, &pItem ))
+ SID_ATTR_GRAF_KEEP_ZOOM, sal_True, &pItem ))
{
aUsrPref.SetGrfKeepZoom(
((const SfxBoolItem*)pItem)->GetValue() );
- bApplyUsrPref = TRUE;
+ bApplyUsrPref = sal_True;
}
if( bApplyUsrPref )
@@ -310,7 +310,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
// and now set all the graphic attributes and other stuff
if( SFX_ITEM_SET == pSet->GetItemState(
- SID_ATTR_GRAF_GRAPHIC, TRUE, &pItem ))
+ SID_ATTR_GRAF_GRAPHIC, sal_True, &pItem ))
{
if( ((SvxBrushItem*)pItem)->GetGraphicLink() )
sGrfNm = *((SvxBrushItem*)pItem)->GetGraphicLink();
@@ -325,7 +325,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
if( sGrfNm.Len() )
{
SwDocShell* pDocSh = GetView().GetDocShell();
- SwWait aWait( *pDocSh, TRUE );
+ SwWait aWait( *pDocSh, sal_True );
SfxMedium* pMedium = pDocSh->GetMedium();
INetURLObject aAbs;
if( pMedium )
@@ -337,7 +337,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
}
}
if ( SFX_ITEM_SET == pSet->GetItemState(
- FN_SET_FRM_ALT_NAME, TRUE, &pItem ))
+ FN_SET_FRM_ALT_NAME, sal_True, &pItem ))
{
// #i73249#
rSh.SetObjTitle( ((const SfxStringItem*)pItem)->GetValue() );
@@ -375,7 +375,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
void SwGrfShell::ExecAttr( SfxRequest &rReq )
{
- USHORT nGrfType;
+ sal_uInt16 nGrfType;
if( CNT_GRF == GetShell().GetCntType() &&
( GRAPHIC_BITMAP == ( nGrfType = GetShell().GetGraphicType()) ||
GRAPHIC_GDIMETAFILE == nGrfType ))
@@ -384,8 +384,8 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq )
RES_GRFATR_END -1 );
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- USHORT nSlot = rReq.GetSlot();
- if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, FALSE, &pItem ))
+ sal_uInt16 nSlot = rReq.GetSlot();
+ if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, sal_False, &pItem ))
pItem = 0;
switch( nSlot )
@@ -396,7 +396,7 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq )
GetShell().GetCurAttr( aGrfSet );
SwMirrorGrf aMirror( (SwMirrorGrf&)aGrfSet.Get(
RES_GRFATR_MIRRORGRF ) );
- USHORT nMirror = aMirror.GetValue();
+ sal_uInt16 nMirror = aMirror.GetValue();
if( FN_FLIP_VERT_GRAFIC == nSlot )
switch( nMirror )
{
@@ -524,23 +524,23 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
SwWrtShell &rSh = GetShell();
SfxItemSet aCoreSet( GetPool(), aNoTxtNodeSetRange );
rSh.GetCurAttr( aCoreSet );
- BOOL bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
- BOOL bIsGrfCntnt = CNT_GRF == GetShell().GetCntType();
+ sal_Bool bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
+ sal_Bool bIsGrfCntnt = CNT_GRF == GetShell().GetCntType();
SetGetStateSet( &rSet );
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
- BOOL bDisable = bParentCntProt;
+ sal_Bool bDisable = bParentCntProt;
switch( nWhich )
{
case SID_INSERT_GRAPHIC:
case FN_FORMAT_GRAFIC_DLG:
case SID_TWAIN_TRANSFER:
if( bParentCntProt || !bIsGrfCntnt )
- bDisable = TRUE;
+ bDisable = sal_True;
break;
case FN_SAVE_GRAPHIC:
if( rSh.GetGraphicType() == GRAPHIC_NONE )
@@ -556,7 +556,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
case SID_COLOR_SETTINGS:
{
if ( bParentCntProt || !bIsGrfCntnt )
- bDisable = TRUE;
+ bDisable = sal_True;
else
{
svx::ToolboxAccess aToolboxAccess( TOOLBOX_NAME );
@@ -616,7 +616,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
case SID_ATTR_GRAF_GAMMA:
if( !bParentCntProt )
- rSet.Put( SfxUInt32Item( nWhich, static_cast< UINT32 >(
+ rSet.Put( SfxUInt32Item( nWhich, static_cast< sal_uInt32 >(
( (SwGammaGrf&)aCoreSet.Get( RES_GRFATR_GAMMA ) ).GetValue() * 100 ) ) );
break;
case SID_ATTR_GRAF_TRANSPARENCE:
@@ -628,7 +628,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
{
if( pGrfObj->IsAnimated() ||
GRAPHIC_GDIMETAFILE == pGrfObj->GetType() )
- bDisable = TRUE;
+ bDisable = sal_True;
else
rSet.Put( SfxUInt16Item( nWhich, ((SwTransparencyGrf&)
aCoreSet.Get(RES_GRFATR_TRANSPARENCY)).GetValue() ));
@@ -661,18 +661,18 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
case SID_GRFFILTER_SOLARIZE:
{
if( bParentCntProt || !bIsGrfCntnt )
- bDisable = TRUE;
+ bDisable = sal_True;
// #i59688# load graphic only if type is unknown
else
{
- const USHORT eGraphicType( rSh.GetGraphicType() );
+ const sal_uInt16 eGraphicType( rSh.GetGraphicType() );
if ( ( eGraphicType == GRAPHIC_NONE ||
eGraphicType == GRAPHIC_DEFAULT ) &&
- rSh.IsGrfSwapOut( TRUE ) )
+ rSh.IsGrfSwapOut( sal_True ) )
{
rSet.DisableItem( nWhich );
if( AddGrfUpdateSlot( nWhich ))
- rSh.GetGraphic(FALSE); // start the loading
+ rSh.GetGraphic(sal_False); // start the loading
}
else
{
@@ -684,7 +684,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
break;
default:
- bDisable = FALSE;
+ bDisable = sal_False;
}
if( bDisable )
diff --git a/sw/source/ui/shells/grfshex.cxx b/sw/source/ui/shells/grfshex.cxx
index e372c652739c..55dd195d84fe 100644
--- a/sw/source/ui/shells/grfshex.cxx
+++ b/sw/source/ui/shells/grfshex.cxx
@@ -65,7 +65,6 @@
// -> #111827#
#include <SwRewriter.hxx>
-#include <undobj.hxx>
#include <comcore.hrc>
// <- #111827#
diff --git a/sw/source/ui/shells/langhelper.cxx b/sw/source/ui/shells/langhelper.cxx
index cb361e686933..50b5bb586e3b 100644..100755
--- a/sw/source/ui/shells/langhelper.cxx
+++ b/sw/source/ui/shells/langhelper.cxx
@@ -71,14 +71,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;
@@ -189,7 +189,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
@@ -209,7 +209,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;
@@ -231,8 +231,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();
}
}
@@ -256,13 +256,13 @@ namespace SwLangHelper
const LanguageType nLang = SvtLanguageTable().GetType( rLangText );
if (nLang != LANGUAGE_DONTKNOW)
{
- USHORT nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLang );
+ sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLang );
EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : NULL;
OSL_ENSURE( !pOLV || pEditEngine, "OutlinerView without EditEngine???" );
//get ScriptType
- USHORT nLangWhichId = 0;
+ sal_uInt16 nLangWhichId = 0;
bool bIsSingleScriptType = true;
switch (nScriptType)
{
@@ -322,11 +322,9 @@ namespace SwLangHelper
rCharFmt.ResetFmtAttr(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 ) );
}
}
}
@@ -340,7 +338,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,
@@ -348,7 +346,7 @@ namespace SwLangHelper
};
// Writewr IDs
- const USHORT aLangWhichId_Writer[3] =
+ const sal_uInt16 aLangWhichId_Writer[3] =
{
RES_CHRATR_LANGUAGE,
RES_CHRATR_CJK_LANGUAGE,
@@ -430,7 +428,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 );
@@ -438,13 +436,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
@@ -472,10 +470,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)
{
@@ -494,7 +492,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,
@@ -520,10 +518,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)
{
@@ -542,7 +540,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 5505ff5e3e4b..322fb5adb31f 100644
--- a/sw/source/ui/shells/listsh.cxx
+++ b/sw/source/ui/shells/listsh.cxx
@@ -84,7 +84,7 @@ void lcl_OutlineUpDownWithSubPoints( SwWrtShell& rSh, bool bMove, bool bUp )
if ( nActPos < USHRT_MAX && rSh.IsOutlineMovable( nActPos ) )
{
rSh.Push();
- rSh.MakeOutlineSel( nActPos, nActPos, TRUE );
+ rSh.MakeOutlineSel( nActPos, nActPos, sal_True );
if ( bMove )
{
@@ -148,7 +148,7 @@ void lcl_OutlineUpDownWithSubPoints( SwWrtShell& rSh, bool bMove, bool bUp )
void SwListShell::Execute(SfxRequest &rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
SwWrtShell& rSh = GetShell();
// #i35572#
@@ -165,8 +165,8 @@ void SwListShell::Execute(SfxRequest &rReq)
rReq.Done();
rSh.NumUpDown( ( nSlot == FN_NUM_BULLET_DOWN )
- ? TRUE
- : FALSE );
+ ? sal_True
+ : sal_False );
pFrame->GetBindings().Invalidate( SID_TABLE_CELL ); // StatusZeile updaten!
}
break;
@@ -185,7 +185,7 @@ void SwListShell::Execute(SfxRequest &rReq)
{
rReq.Ignore();
SfxRequest aReq( GetView().GetViewFrame(), FN_NUM_BULLET_ON );
- aReq.AppendItem( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aReq.AppendItem( SfxBoolItem( FN_PARAM_1, sal_False ) );
aReq.Done();
rSh.DelNumRules();
break;
@@ -195,7 +195,7 @@ void SwListShell::Execute(SfxRequest &rReq)
if ( bOutline )
lcl_OutlineUpDownWithSubPoints( rSh, false, false );
else
- rSh.MoveNumParas(FALSE, FALSE);
+ rSh.MoveNumParas(sal_False, sal_False);
rReq.Done();
break;
@@ -203,7 +203,7 @@ void SwListShell::Execute(SfxRequest &rReq)
if ( bOutline )
lcl_OutlineUpDownWithSubPoints( rSh, true, false );
else
- rSh.MoveNumParas(TRUE, FALSE);
+ rSh.MoveNumParas(sal_True, sal_False);
rReq.Done();
break;
@@ -211,7 +211,7 @@ void SwListShell::Execute(SfxRequest &rReq)
if ( bOutline )
lcl_OutlineUpDownWithSubPoints( rSh, true, true );
else
- rSh.MoveNumParas(TRUE, TRUE);
+ rSh.MoveNumParas(sal_True, sal_True);
rReq.Done();
break;
@@ -219,7 +219,7 @@ void SwListShell::Execute(SfxRequest &rReq)
if ( bOutline )
lcl_OutlineUpDownWithSubPoints( rSh, false, true );
else
- rSh.MoveNumParas(FALSE, TRUE);
+ rSh.MoveNumParas(sal_False, sal_True);
rReq.Done();
break;
@@ -230,8 +230,8 @@ void SwListShell::Execute(SfxRequest &rReq)
case FN_NUM_OR_NONUM:
{
- BOOL bApi = rReq.IsAPI();
- BOOL bDelete = !rSh.IsNoNum(!bApi);
+ sal_Bool bApi = rReq.IsAPI();
+ sal_Bool bDelete = !rSh.IsNoNum(!bApi);
if(pArgs )
bDelete = ((SfxBoolItem &)pArgs->Get(rReq.GetSlot())).GetValue();
rSh.NumOrNoNum( bDelete, !bApi );
@@ -249,15 +249,15 @@ void SwListShell::Execute(SfxRequest &rReq)
void SwListShell::GetState(SfxItemSet &rSet)
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
SwWrtShell& rSh = GetShell();
- BYTE nCurrentNumLevel = rSh.GetNumLevel();
+ sal_uInt8 nCurrentNumLevel = rSh.GetNumLevel();
while ( nWhich )
{
switch( nWhich )
{
case FN_NUM_OR_NONUM:
- rSet.Put(SfxBoolItem(nWhich, GetShell().IsNoNum(FALSE)));
+ rSet.Put(SfxBoolItem(nWhich, GetShell().IsNoNum(sal_False)));
break;
case FN_NUM_BULLET_OUTLINE_UP:
case FN_NUM_BULLET_UP:
diff --git a/sw/source/ui/shells/makefile.mk b/sw/source/ui/shells/makefile.mk
deleted file mode 100644
index 26990e78913d..000000000000
--- a/sw/source/ui/shells/makefile.mk
+++ /dev/null
@@ -1,84 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=shells
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- shells.src
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-EXCEPTIONSFILES = \
- $(SLO)$/annotsh.obj \
- $(SLO)$/basesh.obj \
- $(SLO)$/beziersh.obj \
- $(SLO)$/drawdlg.obj \
- $(SLO)$/drawsh.obj \
- $(SLO)$/drformsh.obj \
- $(SLO)$/drwbassh.obj \
- $(SLO)$/drwtxtex.obj \
- $(SLO)$/drwtxtsh.obj \
- $(SLO)$/frmsh.obj \
- $(SLO)$/grfsh.obj \
- $(SLO)$/grfshex.obj \
- $(SLO)$/langhelper.obj \
- $(SLO)$/listsh.obj \
- $(SLO)$/navsh.obj \
- $(SLO)$/mediash.obj \
- $(SLO)$/olesh.obj \
- $(SLO)$/slotadd.obj \
- $(SLO)$/tabsh.obj \
- $(SLO)$/textdrw.obj \
- $(SLO)$/textfld.obj \
- $(SLO)$/textglos.obj \
- $(SLO)$/textidx.obj \
- $(SLO)$/textsh.obj \
- $(SLO)$/textsh1.obj \
- $(SLO)$/textsh2.obj \
- $(SLO)$/txtattr.obj \
- $(SLO)$/txtcrsr.obj \
- $(SLO)$/txtnum.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-$(SRS)$/shells.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc
-
diff --git a/sw/source/ui/shells/mediash.cxx b/sw/source/ui/shells/mediash.cxx
index ec8242d77f2d..f65827e42f1b 100644
--- a/sw/source/ui/shells/mediash.cxx
+++ b/sw/source/ui/shells/mediash.cxx
@@ -95,10 +95,10 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq)
if( pSdrView )
{
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlotId = rReq.GetSlot();
- BOOL bChanged = pSdrView->GetModel()->IsChanged();
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bChanged = pSdrView->GetModel()->IsChanged();
- pSdrView->GetModel()->SetChanged( FALSE );
+ pSdrView->GetModel()->SetChanged( sal_False );
switch( nSlotId )
{
@@ -123,7 +123,7 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq)
{
const SfxPoolItem* pItem;
- if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, FALSE, &pItem ) ) )
+ if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, sal_False, &pItem ) ) )
pItem = NULL;
if( pItem )
@@ -154,14 +154,14 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq)
if( pSdrView->GetModel()->IsChanged() )
GetShell().SetModified();
else if( bChanged )
- pSdrView->GetModel()->SetChanged(TRUE);
+ pSdrView->GetModel()->SetChanged(sal_True);
}
}
void SwMediaShell::GetMediaState(SfxItemSet &rSet)
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
diff --git a/sw/source/ui/shells/navsh.cxx b/sw/source/ui/shells/navsh.cxx
index dd1935550902..506c7e99f747 100644
--- a/sw/source/ui/shells/navsh.cxx
+++ b/sw/source/ui/shells/navsh.cxx
@@ -33,7 +33,7 @@
#include "cmdid.h"
#include <svx/svdview.hxx>
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include <svl/eitem.hxx>
#include <svl/whiter.hxx>
#include <svx/svdopath.hxx>
@@ -77,13 +77,13 @@ void SwNavigationShell::Execute(SfxRequest &rReq)
SwWrtShell *pSh = &GetShell();
SdrView* pSdrView = pSh->GetDrawView();
const SfxItemSet *pArgs = rReq.GetArgs();
- USHORT nSlotId = rReq.GetSlot();
- BOOL bChanged = pSdrView->GetModel()->IsChanged();
- pSdrView->GetModel()->SetChanged(FALSE);
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bChanged = pSdrView->GetModel()->IsChanged();
+ pSdrView->GetModel()->SetChanged(sal_False);
SwNavigationMgr& aSwNavigationMgr = pSh->GetNavigationMgr();
const SfxPoolItem* pItem;
if(pArgs)
- pArgs->GetItemState(nSlotId, FALSE, &pItem);
+ pArgs->GetItemState(nSlotId, sal_False, &pItem);
switch (nSlotId)
{
case FN_NAVIGATION_BACK:
@@ -99,7 +99,7 @@ void SwNavigationShell::Execute(SfxRequest &rReq)
if (pSdrView->GetModel()->IsChanged())
GetShell().SetModified();
else if (bChanged)
- pSdrView->GetModel()->SetChanged(TRUE);
+ pSdrView->GetModel()->SetChanged(sal_True);
}
/*--------------------------------------------------------------------
@@ -111,7 +111,7 @@ void SwNavigationShell::GetState(SfxItemSet &rSet)
{
SwWrtShell *pSh = &GetShell();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
SwNavigationMgr& aNavigationMgr = pSh->GetNavigationMgr();
while( nWhich )
{
diff --git a/sw/source/ui/shells/shells.src b/sw/source/ui/shells/shells.src
index 58b26c34ad32..23efd4977883 100644
--- a/sw/source/ui/shells/shells.src
+++ b/sw/source/ui/shells/shells.src
@@ -155,880 +155,46 @@ String RID_TEXT_TOOLBOX
Text [ en-US ] = "Text Object Bar" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_TEXT_TOOLBOX
-{
- HelpID = HID_TEXT_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- HideWhenDeactivate = TRUE ;
- LineSpacing = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Hide = TRUE ;
- ItemList =
- {
- MN_TEMPLATE
- MN_FONT
- MN_TEXT1(TRUE)
- MN_TEXT1_BLOCK
- MN_TEXT_LTR_RTL
- MN_TEXT_LINESPACE
- MN_TEXT2
- MN_TEXT_BACKGROUND
- MN_TEXT_DIALOGS(TRUE)
- };
- Scroll = TRUE ;
-};
String RID_TABLE_TOOLBOX
{
Text [ en-US ] = "Table Object Bar" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_TABLE_TOOLBOX
-{
- HelpID = HID_TABLE_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Hide = TRUE ;
- Scroll = TRUE ;
- ItemList =
- {
- MN_TEMPLATE
- MN_FONT
- ToolBoxItem
- {
- Identifier = FN_TABLE_AUTOSUM ;
- HelpID = FN_TABLE_AUTOSUM ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_MODE_FIX ;
- HelpID = FN_TABLE_MODE_FIX ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_MODE_FIX_PROP ;
- HelpID = FN_TABLE_MODE_FIX_PROP ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_MODE_VARIABLE ;
- HelpID = FN_TABLE_MODE_VARIABLE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_MERGE_CELLS ;
- HelpID = FN_TABLE_MERGE_CELLS ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_SPLIT_CELLS ;
- HelpID = FN_TABLE_SPLIT_CELLS ;
- };
- ToolBoxItem
- {
- DropDown = TRUE ;
- Identifier = FN_OPTIMIZE_TABLE ;
- HelpID = FN_OPTIMIZE_TABLE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_INSERT_ROW ;
- HelpID = FN_TABLE_INSERT_ROW ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_INSERT_COL ;
- HelpID = FN_TABLE_INSERT_COL ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_DELETE_ROW ;
- HelpID = FN_TABLE_DELETE_ROW ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_DELETE_COL ;
- HelpID = FN_TABLE_DELETE_COL ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_SELECT_ALL;
- HelpID = FN_TABLE_SELECT_ALL;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_SELECT_COL;
- HelpID = FN_TABLE_SELECT_COL;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_SELECT_ROW;
- HelpID = FN_TABLE_SELECT_ROW;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_VERT_NONE;
- HelpID = FN_TABLE_VERT_NONE;
- RadioCheck = TRUE;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_VERT_CENTER;
- HelpID = FN_TABLE_VERT_CENTER;
- RadioCheck = TRUE;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_VERT_BOTTOM;
- HelpID = FN_TABLE_VERT_BOTTOM;
- RadioCheck = TRUE;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_ATTR_BORDER
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_FRAME_LINESTYLE
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_FRAME_LINECOLOR
- Hide = TRUE;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_BACKGROUND_COLOR
- };
- };
-};
String RID_FRAME_TOOLBOX
{
Text [ en-US ] = "Frame Object Bar" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_FRAME_TOOLBOX
-{
- HelpID = HID_FRAME_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- MenuStrings = TRUE ;
- HideWhenDeactivate = TRUE ;
- Customize = TRUE ;
- Hide = TRUE ;
- ItemList =
- {
- MN_TEMPLATE
- MN_FRAME_WRAP
- MN_FRAME1
- MN_FRAME2
- MN_FRAME3
- MN_LINESTYLE
- MN_BACKGROUND_COLOR
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- MN_ATTRIBUTES_FRAME
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- MN_LAYER
- ToolBoxItem
- {
- Identifier = FN_TOOL_ANKER ;
- HelpID = FN_TOOL_ANKER ;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_FRAME_CHAIN ;
- HelpID = FN_FRAME_CHAIN ;
- };
- ToolBoxItem
- {
- Identifier = FN_FRAME_UNCHAIN ;
- HelpID = FN_FRAME_UNCHAIN ;
- };
- };
- Scroll = TRUE ;
-};
String RID_GRAFIK_TOOLBOX
{
Text [ en-US ] = "Graphics Object Bar" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_GRAFIK_TOOLBOX
-{
- HelpID = HID_GRAFIK_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- MenuStrings = TRUE ;
- Customize = TRUE ;
- Hide = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_GRFFILTER;
- HelpID = SID_GRFFILTER;
- DropDown = TRUE ;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_MODE;
- HelpID = SID_ATTR_GRAF_MODE;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_RED;
- HelpID = SID_ATTR_GRAF_RED;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_GREEN;
- HelpID = SID_ATTR_GRAF_GREEN;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_BLUE;
- HelpID = SID_ATTR_GRAF_BLUE;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_LUMINANCE;
- HelpID = SID_ATTR_GRAF_LUMINANCE;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_CONTRAST;
- HelpID = SID_ATTR_GRAF_CONTRAST;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_GAMMA;
- HelpID = SID_ATTR_GRAF_GAMMA;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_TRANSPARENCE;
- HelpID = SID_ATTR_GRAF_TRANSPARENCE;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = FN_FLIP_VERT_GRAFIC ;
- HelpID = FN_FLIP_VERT_GRAFIC ;
- };
- ToolBoxItem
- {
- Identifier = FN_FLIP_HORZ_GRAFIC ;
- HelpID = FN_FLIP_HORZ_GRAFIC ;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- MN_ATTRIBUTES_GRAFIK
- };
- Scroll = TRUE ;
-};
String RID_OLE_TOOLBOX
{
Text [ en-US ] = "Object" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_OLE_TOOLBOX
-{
- HelpID = HID_OLE_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Hide = TRUE ;
- Scroll = TRUE ;
- ItemList =
- {
- MN_TEMPLATE
- MN_FRAME_WRAP
- MN_CONTOUR
- MN_FRAME1
- MN_FRAME2
- MN_FRAME3
- MN_LINESTYLE
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- MN_ATTRIBUTES_OLE
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- MN_LAYER
- ToolBoxItem
- {
- Identifier = FN_TOOL_ANKER ;
- HelpID = FN_TOOL_ANKER ;
- DropDown = TRUE ;
- };
- };
-};
String RID_DRAW_TOOLBOX
{
Text [ en-US ] = "Draw Object Bar" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_DRAW_TOOLBOX
-{
- HelpID = HID_DRAW_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Hide = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_BEZIER_EDIT ;
- HelpID = SID_BEZIER_EDIT ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTRIBUTES_LINE ;
- HelpID = SID_ATTRIBUTES_LINE ;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_ATTR_LINEEND_STYLE
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_ATTR_LINE_STYLE
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_ATTR_LINE_WIDTH
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_ATTR_LINE_COLOR
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTRIBUTES_AREA ;
- HelpID = SID_ATTRIBUTES_AREA ;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_ATTR_FILL_STYLE
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_OBJECT_ROTATE
- };
- ToolBoxItem
- {
- Identifier = FN_TOOL_ANKER ;
- HelpID = FN_TOOL_ANKER ;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_FRAME_NOWRAP ;
- HelpID = FN_FRAME_NOWRAP ;
- RadioCheck = TRUE ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_FRAME_WRAP ;
- HelpID = FN_FRAME_WRAP ;
- RadioCheck = TRUE ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_FRAME_WRAP_IDEAL ;
- HelpID = FN_FRAME_WRAP_IDEAL ;
- RadioCheck = TRUE ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_FRAME_WRAP_LEFT ;
- HelpID = FN_FRAME_WRAP_LEFT ;
- RadioCheck = TRUE ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_FRAME_WRAP_RIGHT ;
- HelpID = FN_FRAME_WRAP_RIGHT ;
- RadioCheck = TRUE ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_FRAME_WRAPTHRU ;
- HelpID = FN_FRAME_WRAPTHRU ;
- RadioCheck = TRUE ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_FRAME_WRAP_CONTOUR ;
- HelpID = FN_FRAME_WRAP_CONTOUR ;
- Hide = TRUE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_OBJECT_HEAVEN ;
- HelpID = SID_OBJECT_HEAVEN ;
- };
- ToolBoxItem
- {
- Identifier = SID_OBJECT_HELL ;
- HelpID = SID_OBJECT_HELL ;
- };
- MN_LAYER
- MN_GRID( HIDE=TRUE )
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_OBJECT_ALIGN ;
- HelpID = SID_OBJECT_ALIGN ;
- DropDown = TRUE ;
- };
- };
- Scroll = TRUE ;
-};
String RID_BEZIER_TOOLBOX
{
Text [ en-US ] = "Bézier Object Bar" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_BEZIER_TOOLBOX
-{
- HelpID = HID_BEZIER_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Hide = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_BEZIER_EDIT ;
- HelpID = SID_BEZIER_EDIT ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_MOVE ;
- HelpID = SID_BEZIER_MOVE ;
- RadioCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_INSERT ;
- HelpID = SID_BEZIER_INSERT ;
- RadioCheck = TRUE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_DELETE ;
- HelpID = SID_BEZIER_DELETE ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_CUTLINE ;
- HelpID = SID_BEZIER_CUTLINE ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_CONVERT ;
- HelpID = SID_BEZIER_CONVERT ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_EDGE ;
- HelpID = SID_BEZIER_EDGE ;
- RadioCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_SMOOTH ;
- HelpID = SID_BEZIER_SMOOTH ;
- RadioCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_SYMMTR ;
- HelpID = SID_BEZIER_SYMMTR ;
- RadioCheck = TRUE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_CLOSE ;
- HelpID = SID_BEZIER_CLOSE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_ELIMINATE_POINTS ;
- HelpID = SID_BEZIER_ELIMINATE_POINTS ;
- };
- };
- Scroll = TRUE ;
-};
String RID_DRAW_TEXT_TOOLBOX
{
Text [ en-US ] = "Text Object Bar/Graphics" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_DRAW_TEXT_TOOLBOX
-{
- HelpID = HID_DRAW_TEXT_TOOLBOX ;
- Border = TRUE ;
- Customize = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- MenuStrings = TRUE ;
- Hide = TRUE ;
- ItemList =
- {
- MN_FONT
- MN_TEXT1(FALSE)
- MN_TEXT1_BLOCK
- MN_TEXT_LINESPACE
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_ATTR_CHAR_COLOR
- Hide = TRUE;
- };
- MN_TEXT_LTR_RTL
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- };
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- };
-
- MN_TEXT_DIALOGS(FALSE)
- };
- ItemList[ ar ] =
- {
- MN_FONT
- MN_TEXT1_RTL(FALSE)
- MN_TEXT1_BLOCK
- MN_TEXT_LINESPACE
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_ATTR_CHAR_COLOR
- Hide = TRUE;
- };
- MN_TEXT_RTL_LTR
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- };
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- };
-
- MN_TEXT_DIALOGS(FALSE)
- };
- ItemList[ he ] =
- {
- MN_FONT
- MN_TEXT1_RTL(FALSE)
- MN_TEXT1_BLOCK
- MN_TEXT_LINESPACE
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_ATTR_CHAR_COLOR
- Hide = TRUE;
- };
- MN_TEXT_RTL_LTR
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- };
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- };
-
- MN_TEXT_DIALOGS(FALSE)
- };
- Scroll = TRUE ;
-};
String RID_NUM_TOOLBOX
{
Text [ en-US ] = "Numbering Object Bar" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_NUM_TOOLBOX
-{
- HelpID = HID_NUM_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Hide = TRUE ;
- ItemList =
- {
- MN_TEMPLATE
- MN_FONT
- ToolBoxItem
- {
- Identifier = FN_NUM_BULLET_OFF ;
- HelpID = FN_NUM_BULLET_OFF ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUM_BULLET_UP ;
- HelpID = FN_NUM_BULLET_UP ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUM_BULLET_DOWN ;
- HelpID = FN_NUM_BULLET_DOWN ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUM_BULLET_OUTLINE_UP ;
- HelpID = FN_NUM_BULLET_OUTLINE_UP ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUM_BULLET_OUTLINE_DOWN ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUM_BULLET_NONUM ;
- HelpID = FN_NUM_BULLET_NONUM ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUM_BULLET_MOVEUP ;
- HelpID = FN_NUM_BULLET_MOVEUP ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUM_BULLET_MOVEDOWN ;
- HelpID = FN_NUM_BULLET_MOVEDOWN ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUM_BULLET_OUTLINE_MOVEUP ;
- HelpID = FN_NUM_BULLET_OUTLINE_MOVEUP ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUM_BULLET_OUTLINE_MOVEDOWN ;
- HelpID = FN_NUM_BULLET_OUTLINE_MOVEDOWN ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUMBER_NEWSTART ;
- HelpID = FN_NUMBER_NEWSTART ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUMBER_BULLETS ;
- HelpID = FN_NUMBER_BULLETS ;
- };
- };
- Scroll = TRUE ;
-};
String STR_SHELLNAME_TEXT
{
Text [ en-US ] = "Text" ;
diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx
index 4eb8cb9ae9a4..af6a2a996d8a 100644
--- a/sw/source/ui/shells/tabsh.cxx
+++ b/sw/source/ui/shells/tabsh.cxx
@@ -119,7 +119,7 @@ SFX_IMPL_INTERFACE(SwTableShell, SwBaseShell, SW_RES(STR_SHELLNAME_TABLE))
TYPEINIT1(SwTableShell,SwBaseShell)
-const USHORT aUITableAttrRange[] =
+const sal_uInt16 aUITableAttrRange[] =
{
FN_PARAM_TABLE_NAME, FN_PARAM_TABLE_NAME,
FN_PARAM_TABLE_HEADLINE, FN_PARAM_TABLE_HEADLINE,
@@ -146,7 +146,7 @@ const USHORT aUITableAttrRange[] =
0
};
-const USHORT* SwuiGetUITableAttrRange()
+const sal_uInt16* SwuiGetUITableAttrRange()
{
return aUITableAttrRange;
}
@@ -174,7 +174,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
SvxULSpaceItem aULSpace( pFmt->GetULSpace() );
rSet.Put( aULSpace );
- USHORT nBackgroundDestination = rSh.GetViewOptions()->GetTblDest();
+ sal_uInt16 nBackgroundDestination = rSh.GetViewOptions()->GetTblDest();
rSet.Put(SwBackgroundDestinationItem(SID_BACKGRND_DESTINATION, nBackgroundDestination ));
SvxBrushItem aBrush( RES_BACKGROUND );
if(rSh.GetRowBackground(aBrush))
@@ -189,12 +189,12 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
if(rSh.GetBoxDirection( aBoxDirection ))
rSet.Put(aBoxDirection, FN_TABLE_BOX_TEXTDIRECTION);
- BOOL bTableSel = rSh.IsTableMode();
+ sal_Bool bTableSel = rSh.IsTableMode();
if(!bTableSel)
{
rSh.StartAllAction();
rSh.Push();
- rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( FN_TABLE_SELECT_ALL, FALSE );
+ rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( FN_TABLE_SELECT_ALL, sal_False );
}
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
@@ -203,7 +203,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
aBoxInfo.SetTable ((rSh.IsTableMode() && rSh.GetCrsrCnt() > 1) ||
!bTableSel);
// Abstandsfeld immer anzeigen
- aBoxInfo.SetDist ((BOOL) TRUE);
+ aBoxInfo.SetDist ((sal_Bool) sal_True);
// Minimalgroesse in Tabellen und Absaetzen setzen
aBoxInfo.SetMinDist( !bTableSel || rSh.IsTableMode() ||
rSh.GetSelectionType() &
@@ -228,7 +228,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
if(!bTableSel)
{
rSh.ClearMark();
- rSh.Pop(FALSE);
+ rSh.Pop(sal_False);
rSh.EndAllAction();
}
@@ -241,12 +241,12 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
SwTableRep* pRep = new SwTableRep( aTabCols, rSh.IsTblComplex());
pRep->SetSpace(aCols.GetRightMax());
- USHORT nPercent = 0;
+ sal_uInt16 nPercent = 0;
long nWidth = ::GetTableWidth(pFmt, aCols, &nPercent, &rSh );
// Die Tabellenbreite ist fuer relative Angaben nicht korrekt
if(nPercent)
nWidth = pRep->GetSpace() * nPercent / 100;
- USHORT nAlign = pFmt->GetHoriOrient().GetHoriOrient();
+ sal_uInt16 nAlign = pFmt->GetHoriOrient().GetHoriOrient();
pRep->SetAlign(nAlign);
SvxLRSpaceItem aLRSpace( pFmt->GetLRSpace() );
SwTwips nLeft = aLRSpace.GetLeft();
@@ -291,24 +291,24 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
const SfxPoolItem* pItem = 0;
SwViewOption aUsrPref( *rSh.GetViewOptions() );
- USHORT nBackgroundDestination = aUsrPref.GetTblDest();
- if(SFX_ITEM_SET == rSet.GetItemState(SID_BACKGRND_DESTINATION, FALSE, &pItem))
+ sal_uInt16 nBackgroundDestination = aUsrPref.GetTblDest();
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_BACKGRND_DESTINATION, sal_False, &pItem))
{
nBackgroundDestination = ((SfxUInt16Item*)pItem)->GetValue();
- aUsrPref.SetTblDest((BYTE)nBackgroundDestination);
+ aUsrPref.SetTblDest((sal_uInt8)nBackgroundDestination);
SW_MOD()->ApplyUsrPref(aUsrPref, &rSh.GetView());
}
- BOOL bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) ||
+ sal_Bool bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) ||
SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) );
pItem = 0;
- BOOL bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, FALSE, &pItem );
+ sal_Bool bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, sal_False, &pItem );
const SfxPoolItem* pRowItem = 0, *pTableItem = 0;
- bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, FALSE, &pRowItem );
- bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, FALSE, &pTableItem );
+ bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, sal_False, &pRowItem );
+ bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, sal_False, &pTableItem );
const SfxPoolItem* pSplit = 0;
- BOOL bRowSplit = SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, FALSE, &pSplit );
+ sal_Bool bRowSplit = SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, sal_False, &pSplit );
const SfxPoolItem* pBoxDirection = 0;
- BOOL bBoxDirection = SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTDIRECTION, FALSE, &pBoxDirection );
+ sal_Bool bBoxDirection = SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTDIRECTION, sal_False, &pBoxDirection );
if( bBackground || bBorder || bRowSplit || bBoxDirection)
{
/*
@@ -317,7 +317,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
Der Hintergrund wird immer auf den aktuellen Zustand angewendet.
*/
- BOOL bTableSel = rSh.IsTableMode();
+ sal_Bool bTableSel = rSh.IsTableMode();
rSh.StartAllAction();
if(bBackground)
@@ -364,19 +364,19 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
{
rSh.ClearMark();
}
- rSh.Pop(FALSE);
+ rSh.Pop(sal_False);
}
rSh.EndAllAction();
}
SwTabCols aTabCols;
- BOOL bTabCols = FALSE;
- BOOL bSingleLine = FALSE;
+ sal_Bool bTabCols = sal_False;
+ sal_Bool bSingleLine = sal_False;
SwTableRep* pRep = 0;
SwFrmFmt *pFmt = rSh.GetTableFmt();
SfxItemSet aSet( rSh.GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
- if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, sal_False, &pItem ))
{
pRep = (SwTableRep*)((const SwPtrItem*)pItem)->GetValue();
@@ -392,7 +392,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
SwFmtFrmSize aSz( ATT_VAR_SIZE, nWidth );
if(pRep->GetWidthPercent())
{
- aSz.SetWidthPercent( (BYTE)pRep->GetWidthPercent() );
+ aSz.SetWidthPercent( (sal_uInt8)pRep->GetWidthPercent() );
}
aSet.Put(aSz);
}
@@ -413,22 +413,22 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
if(pRep->HasColsChanged())
{
- bTabCols = TRUE;
+ bTabCols = sal_True;
}
}
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, FALSE, &pItem))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, sal_False, &pItem))
rSh.SetRowsToRepeat( ((SfxUInt16Item*)pItem)->GetValue() );
- if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, FALSE, &pItem))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, sal_False, &pItem))
rSh.SetBoxAlign(((SfxUInt16Item*)(pItem))->GetValue());
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, sal_False, &pItem ))
rSh.SetTableName( *pFmt, ((const SfxStringItem*)pItem)->GetValue() );
// kopiere die ausgesuchten Attribute in den ItemSet
- static USHORT const aIds[] =
+ static sal_uInt16 aIds[] =
{
RES_PAGEDESC,
RES_BREAK,
@@ -442,8 +442,8 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
// <-- collapsing borders
0
};
- for( const USHORT* pIds = aIds; *pIds; ++pIds )
- if( SFX_ITEM_SET == rSet.GetItemState( *pIds, FALSE, &pItem))
+ for( const sal_uInt16* pIds = aIds; *pIds; ++pIds )
+ if( SFX_ITEM_SET == rSet.GetItemState( *pIds, sal_False, &pItem))
aSet.Put( *pItem );
if( aSet.Count() )
@@ -476,17 +476,17 @@ static void lcl_TabGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLi
void SwTableShell::Execute(SfxRequest &rReq)
{
- BOOL bUseDialog = TRUE;
+ sal_Bool bUseDialog = sal_True;
const SfxItemSet* pArgs = rReq.GetArgs();
SwWrtShell &rSh = GetShell();
//Erstmal die Slots, die keinen FrmMgr benoetigen.
- BOOL bMore = FALSE;
+ sal_Bool bMore = sal_False;
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
- BOOL bCallDone = FALSE;
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
+ sal_Bool bCallDone = sal_False;
switch ( nSlot )
{
case SID_ATTR_BORDER:
@@ -505,29 +505,29 @@ void SwTableShell::Execute(SfxRequest &rReq)
const SvxBoxItem& rCoreBox = (const SvxBoxItem&)
aCoreSet.Get(RES_BOX);
const SfxPoolItem *pBoxItem = 0;
- if ( pArgs->GetItemState(RES_BOX, TRUE, &pBoxItem) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState(RES_BOX, sal_True, &pBoxItem) == SFX_ITEM_SET )
{
aBox = *(SvxBoxItem*)pBoxItem;
if ( !rReq.IsAPI() )
- aBox.SetDistance( Max(rCoreBox.GetDistance(),USHORT(55)) );
+ aBox.SetDistance( Max(rCoreBox.GetDistance(),sal_uInt16(55)) );
else if ( aBox.GetDistance() < MIN_BORDER_DIST )
- aBox.SetDistance( Max(rCoreBox.GetDistance(),(USHORT)MIN_BORDER_DIST) );
+ aBox.SetDistance( Max(rCoreBox.GetDistance(),(sal_uInt16)MIN_BORDER_DIST) );
}
else
OSL_ENSURE( !this, "where is BoxItem?" );
//since the drawing layer also supports borders the which id might be a different one
SvxBoxInfoItem aInfo( SID_ATTR_BORDER_INNER );
- if (pArgs->GetItemState(SID_ATTR_BORDER_INNER, TRUE, &pBoxItem) == SFX_ITEM_SET)
+ if (pArgs->GetItemState(SID_ATTR_BORDER_INNER, sal_True, &pBoxItem) == SFX_ITEM_SET)
aInfo = *(SvxBoxInfoItem*)pBoxItem;
- else if( pArgs->GetItemState(SDRATTR_TABLE_BORDER_INNER, TRUE, &pBoxItem) == SFX_ITEM_SET )
+ else if( pArgs->GetItemState(SDRATTR_TABLE_BORDER_INNER, sal_True, &pBoxItem) == SFX_ITEM_SET )
{
aInfo = *(SvxBoxInfoItem*)pBoxItem;
aInfo.SetWhich(SID_ATTR_BORDER_INNER);
}
- aInfo.SetTable( TRUE );
- aInfo.SetValid( VALID_DISABLE, FALSE );
+ aInfo.SetTable( sal_True );
+ aInfo.SetValid( VALID_DISABLE, sal_False );
// Die Attribute aller Linien werden gelesen und das staerkste gewinnt
@@ -552,19 +552,19 @@ void SwTableShell::Execute(SfxRequest &rReq)
aBorderLine.SetOutWidth(DEF_LINE_WIDTH_0);
}
- BOOL bLine = FALSE;
+ sal_Bool bLine = sal_False;
if ( (pBorderLine = aBox.GetTop()) != NULL)
- aBox.SetLine(&aBorderLine, BOX_LINE_TOP), bLine |= TRUE;
+ aBox.SetLine(&aBorderLine, BOX_LINE_TOP), bLine |= sal_True;
if ((pBorderLine = aBox.GetBottom()) != NULL)
- aBox.SetLine(&aBorderLine, BOX_LINE_BOTTOM), bLine |= TRUE;
+ aBox.SetLine(&aBorderLine, BOX_LINE_BOTTOM), bLine |= sal_True;
if ((pBorderLine = aBox.GetLeft()) != NULL)
- aBox.SetLine(&aBorderLine, BOX_LINE_LEFT), bLine |= TRUE;
+ aBox.SetLine(&aBorderLine, BOX_LINE_LEFT), bLine |= sal_True;
if ((pBorderLine = aBox.GetRight()) != NULL)
- aBox.SetLine(&aBorderLine, BOX_LINE_RIGHT), bLine |= TRUE;
+ aBox.SetLine(&aBorderLine, BOX_LINE_RIGHT), bLine |= sal_True;
if ((pBorderLine = aInfo.GetHori()) != NULL)
- aInfo.SetLine(&aBorderLine, BOXINFO_LINE_HORI), bLine |= TRUE;
+ aInfo.SetLine(&aBorderLine, BOXINFO_LINE_HORI), bLine |= sal_True;
if ((pBorderLine = aInfo.GetVert()) != NULL)
- aInfo.SetLine(&aBorderLine, BOXINFO_LINE_VERT), bLine |= TRUE;
+ aInfo.SetLine(&aBorderLine, BOXINFO_LINE_VERT), bLine |= sal_True;
aCoreSet.Put( aBox );
aCoreSet.Put( aInfo );
@@ -575,7 +575,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
// the SvxBoxItem
rReq.AppendItem( aBox );
rReq.AppendItem( aInfo );
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
@@ -590,7 +590,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
SfxItemSet aCoreSet( GetPool(), aUITableAttrRange);
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rSh.GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SwTableRep* pTblRep = ::lcl_TableParamToItemSet( aCoreSet, rSh );
SfxAbstractTabDialog * pDlg = NULL;
if ( bUseDialog )
@@ -642,7 +642,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
if(pView)
{
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, pView));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SvNumberFormatter* pFormatter = rSh.GetNumberFormatter();
SfxItemSet aCoreSet( GetPool(),
SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_VALUE,
@@ -690,13 +690,13 @@ void SwTableShell::Execute(SfxRequest &rReq)
const sal_uInt32* pDelArr = ((SvxNumberInfoItem*)
pNumberFormatItem)->GetDelArray();
- for ( USHORT i = 0; i < ((SvxNumberInfoItem*)pNumberFormatItem)->GetDelCount(); i++ )
+ for ( sal_uInt16 i = 0; i < ((SvxNumberInfoItem*)pNumberFormatItem)->GetDelCount(); i++ )
((SvxNumberInfoItem*)pNumberFormatItem)->
GetNumberFormatter()->DeleteEntry( pDelArr[i] );
}
if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState(
- SID_ATTR_NUMBERFORMAT_VALUE, FALSE, &pNumberFormatItem ))
+ SID_ATTR_NUMBERFORMAT_VALUE, sal_False, &pNumberFormatItem ))
{
SfxItemSet aBoxFormatSet( *aCoreSet.GetPool(),
RES_BOXATR_FORMAT, RES_BOXATR_FORMAT );
@@ -712,53 +712,53 @@ void SwTableShell::Execute(SfxRequest &rReq)
break;
case FN_CALC_TABLE:
rSh.UpdateTable();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_OPTIMAL_HEIGHT:
{
const SwFmtFrmSize aSz;
rSh.SetRowHeight( aSz );
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
case FN_TABLE_DELETE_COL:
if ( rSh.DeleteCol() && rSh.HasSelection() )
rSh.EnterStdMode();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_END_TABLE:
rSh.MoveTable( fnTableCurr, fnTableEnd );
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_START_TABLE:
rSh.MoveTable( fnTableCurr, fnTableStart );
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_GOTO_NEXT_CELL:
{
- BOOL bAppendLine = TRUE;
+ sal_Bool bAppendLine = sal_True;
if( pItem )
bAppendLine = ((SfxBoolItem*)pItem)->GetValue();
rReq.SetReturnValue( SfxBoolItem( nSlot,
rSh.GoNextCell( bAppendLine ) ) );
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
case FN_GOTO_PREV_CELL:
rReq.SetReturnValue( SfxBoolItem( nSlot, rSh.GoPrevCell() ) );
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_DELETE_ROW:
if ( rSh.DeleteRow() && rSh.HasSelection() )
rSh.EnterStdMode();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_MERGE_CELLS:
if ( rSh.IsTableMode() )
switch ( rSh.MergeTab() )
{
case TBLMERGE_OK:
- bCallDone = TRUE;
+ bCallDone = sal_True;
//no break;
case TBLMERGE_NOSELECTION: break;
case TBLMERGE_TOOCOMPLEX:
@@ -774,7 +774,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_ADJUST_CELLS:
case FN_TABLE_BALANCE_CELLS:
{
- BOOL bBalance = (FN_TABLE_BALANCE_CELLS == nSlot);
+ sal_Bool bBalance = (FN_TABLE_BALANCE_CELLS == nSlot);
if ( rSh.IsAdjustCellWidthAllowed(bBalance) )
{
{
@@ -783,13 +783,13 @@ void SwTableShell::Execute(SfxRequest &rReq)
}
rSh.AdjustCellWidth(bBalance);
}
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
case FN_TABLE_BALANCE_ROWS:
- if ( rSh.BalanceRowHeight(TRUE) )
- rSh.BalanceRowHeight(FALSE);
- bCallDone = TRUE;
+ if ( rSh.BalanceRowHeight(sal_True) )
+ rSh.BalanceRowHeight(sal_False);
+ bCallDone = sal_True;
break;
case FN_TABLE_SELECT_ALL:
rSh.EnterStdMode();
@@ -797,26 +797,26 @@ void SwTableShell::Execute(SfxRequest &rReq)
rSh.SttSelect();
rSh.MoveTable( fnTableCurr, fnTableEnd );
rSh.EndSelect();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_SELECT_COL:
rSh.EnterStdMode();
rSh.SelectTableCol();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_SELECT_ROW:
rSh.EnterStdMode();
rSh.SelectTableRow();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_SET_READ_ONLY_CELLS:
rSh.ProtectCells();
- rSh.ResetSelect( 0, FALSE );
- bCallDone = TRUE;
+ rSh.ResetSelect( 0, sal_False );
+ bCallDone = sal_True;
break;
case FN_TABLE_UNSET_READ_ONLY_CELLS:
rSh.UnProtectCells();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case SID_AUTOFORMAT:
{
@@ -848,13 +848,13 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_INSERT_COL:
case FN_TABLE_INSERT_ROW:
{
- BOOL bColumn = rReq.GetSlot() == FN_TABLE_INSERT_COL;
- USHORT nCount = 0;
- BOOL bAfter = TRUE;
+ sal_Bool bColumn = rReq.GetSlot() == FN_TABLE_INSERT_COL;
+ sal_uInt16 nCount = 0;
+ sal_Bool bAfter = sal_True;
if (pItem)
{
nCount = ((const SfxInt16Item* )pItem)->GetValue();
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_INSERT_AFTER, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_INSERT_AFTER, sal_True, &pItem))
bAfter = ((const SfxBoolItem* )pItem)->GetValue();
}
else if( !rReq.IsAPI() )
@@ -898,7 +898,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
}
// <--
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
}
@@ -908,15 +908,16 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_INSERT_COL_DLG:
case FN_TABLE_INSERT_ROW_DLG:
{
+ const SfxSlot* pSlot = GetStaticInterface()->GetSlot(nSlot);
if ( FN_TABLE_INSERT_ROW_DLG != nSlot || !rSh.IsInRepeatedHeadline())
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ::std::auto_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( GetView().GetWindow(), nSlot == FN_TABLE_INSERT_COL_DLG, nSlot) : 0);
+ ::std::auto_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( GetView().GetWindow(), nSlot == FN_TABLE_INSERT_COL_DLG, pSlot->GetCommand() ) : 0);
if( pDlg.get() && (pDlg->Execute() == 1) )
{
- USHORT nDispatchSlot = (nSlot == FN_TABLE_INSERT_COL_DLG) ? FN_TABLE_INSERT_COL : FN_TABLE_INSERT_ROW;
- SfxUInt16Item aCountItem( nDispatchSlot, static_cast< UINT16 >(pDlg->getInsertCount()) );
+ sal_uInt16 nDispatchSlot = (nSlot == FN_TABLE_INSERT_COL_DLG) ? FN_TABLE_INSERT_COL : FN_TABLE_INSERT_ROW;
+ SfxUInt16Item aCountItem( nDispatchSlot, static_cast< sal_uInt16 >(pDlg->getInsertCount()) );
SfxBoolItem aAfter( FN_PARAM_INSERT_AFTER, !pDlg->isInsertBefore() );
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if( pVFrame )
@@ -928,8 +929,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_SPLIT_CELLS:
{
long nCount=0;
- BOOL bHorizontal=TRUE;
- BOOL bProportional = FALSE;
+ sal_Bool bHorizontal=sal_True;
+ sal_Bool bProportional = sal_False;
SFX_REQUEST_ARG( rReq, pSplit, SfxInt32Item, FN_TABLE_SPLIT_CELLS, sal_False );
SFX_REQUEST_ARG( rReq, pHor, SfxBoolItem, FN_PARAM_1, sal_False );
SFX_REQUEST_ARG( rReq, pProp, SfxBoolItem, FN_PARAM_2, sal_False );
@@ -963,8 +964,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
if ( nCount>1 )
{
- rSh.SplitTab(!bHorizontal, static_cast< USHORT >( nCount-1 ), bProportional );
- bCallDone = TRUE;
+ rSh.SplitTab(!bHorizontal, static_cast< sal_uInt16 >( nCount-1 ), bProportional );
+ bCallDone = sal_True;
}
else
rReq.Ignore();
@@ -1004,8 +1005,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_MERGE_TABLE:
{
- BOOL bPrev = rSh.CanMergeTable( TRUE );
- BOOL bNext = rSh.CanMergeTable( FALSE );
+ sal_Bool bPrev = rSh.CanMergeTable( sal_True );
+ sal_Bool bNext = rSh.CanMergeTable( sal_False );
if( bPrev && bNext )
{
@@ -1014,7 +1015,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
VclAbstractDialog* pDlg = pFact->CreateSwVclDialog( DLG_MERGE_TABLE, GetView().GetWindow(), bPrev );
OSL_ENSURE(pDlg, "dialogdiet pDlg fail!");
if( RET_OK != pDlg->Execute())
- bPrev = bNext = FALSE;
+ bPrev = bNext = sal_False;
delete pDlg;
}
@@ -1033,21 +1034,21 @@ void SwTableShell::Execute(SfxRequest &rReq)
: TBLVAR_CHGABS ) );
SfxBindings& rBind = GetView().GetViewFrame()->GetBindings();
- static USHORT const aInva[] =
+ static sal_uInt16 aInva[] =
{ FN_TABLE_MODE_FIX,
FN_TABLE_MODE_FIX_PROP,
FN_TABLE_MODE_VARIABLE,
0
};
rBind.Invalidate( aInva );
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
case FN_TABLE_AUTOSUM:
{
SfxViewFrame* pVFrame = GetView().GetViewFrame();
pVFrame->GetDispatcher()->Execute(FN_EDIT_FORMULA, SFX_CALLMODE_SYNCHRON);
- const USHORT nId = SwInputChild::GetChildWindowId();
+ const sal_uInt16 nId = SwInputChild::GetChildWindowId();
SwInputChild* pChildWin = (SwInputChild*)pVFrame->
GetChildWindow( nId );
String sSum;
@@ -1079,7 +1080,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
return;
//break;
default:
- bMore = TRUE;
+ bMore = sal_True;
}
if ( !bMore )
@@ -1089,7 +1090,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
return;
}
else
- bMore = FALSE;
+ bMore = sal_False;
//Jetzt die Slots, die direkt auf dem TableFmt arbeiten.
SwFrmFmt *pFmt = rSh.GetTableFmt();
switch ( nSlot )
@@ -1124,7 +1125,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
// der letzte case-Zweig der noch einen TabellenManager braucht!!
case FN_TABLE_SET_COL_WIDTH:
{
- SwTableFUNC aMgr( &rSh, FALSE);
+ SwTableFUNC aMgr( &rSh, sal_False);
aMgr.ColWidthDlg(GetView().GetWindow());
}
break;
@@ -1132,12 +1133,12 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_VERT_CENTER:
case FN_TABLE_VERT_BOTTOM:
{
- USHORT nAlign = nSlot == FN_TABLE_VERT_NONE ?
+ sal_uInt16 nAlign = nSlot == FN_TABLE_VERT_NONE ?
text::VertOrientation::NONE :
nSlot == FN_TABLE_VERT_CENTER ?
text::VertOrientation::CENTER : text::VertOrientation::BOTTOM;
rSh.SetBoxAlign(nAlign);
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
@@ -1171,7 +1172,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
if(pSplit)
pSplit->SetValue(!pSplit->GetValue());
else
- pSplit = new SwFmtRowSplit(TRUE);
+ pSplit = new SwFmtRowSplit(sal_True);
}
else
{
@@ -1198,7 +1199,7 @@ void SwTableShell::GetState(SfxItemSet &rSet)
// os #124829# crash report: in case of an invalid shell selection return immediately
if(!pFmt)
return;
- USHORT nSlot = aIter.FirstWhich();
+ sal_uInt16 nSlot = aIter.FirstWhich();
while ( nSlot )
{
switch ( nSlot )
@@ -1213,19 +1214,19 @@ void SwTableShell::GetState(SfxItemSet &rSet)
break;
case FN_TABLE_BALANCE_CELLS:
- if ( !rSh.IsAdjustCellWidthAllowed(TRUE) )
+ if ( !rSh.IsAdjustCellWidthAllowed(sal_True) )
rSet.DisableItem(FN_TABLE_BALANCE_CELLS);
break;
case FN_TABLE_BALANCE_ROWS:
- if ( !rSh.BalanceRowHeight(TRUE) )
+ if ( !rSh.BalanceRowHeight(sal_True) )
rSet.DisableItem(FN_TABLE_BALANCE_ROWS);
break;
case FN_OPTIMIZE_TABLE:
if ( !rSh.IsTableMode() &&
!rSh.IsAdjustCellWidthAllowed() &&
- !rSh.IsAdjustCellWidthAllowed(TRUE) &&
- !rSh.BalanceRowHeight(TRUE) )
+ !rSh.IsAdjustCellWidthAllowed(sal_True) &&
+ !rSh.BalanceRowHeight(sal_True) )
rSet.DisableItem(FN_OPTIMIZE_TABLE);
break;
case SID_INSERT_DIAGRAM:
@@ -1271,8 +1272,8 @@ void SwTableShell::GetState(SfxItemSet &rSet)
case FN_TABLE_VERT_CENTER:
case FN_TABLE_VERT_BOTTOM:
{
- USHORT nAlign = rSh.GetBoxAlign();
- BOOL bSet = (nSlot == FN_TABLE_VERT_NONE && nAlign == text::VertOrientation::NONE) ||
+ sal_uInt16 nAlign = rSh.GetBoxAlign();
+ sal_Bool bSet = (nSlot == FN_TABLE_VERT_NONE && nAlign == text::VertOrientation::NONE) ||
(nSlot == FN_TABLE_VERT_CENTER && nAlign == text::VertOrientation::CENTER) ||
(nSlot == FN_TABLE_VERT_BOTTOM && nAlign == text::VertOrientation::BOTTOM);
rSet.Put(SfxBoolItem(nSlot, bSet));
@@ -1284,9 +1285,9 @@ void SwTableShell::GetState(SfxItemSet &rSet)
case FN_TABLE_MODE_VARIABLE :
{
TblChgMode nMode = rSh.GetTblChgMode();
- BOOL bSet = (nSlot == FN_TABLE_MODE_FIX && nMode == TBLFIX_CHGABS) ||
- (nSlot == FN_TABLE_MODE_FIX_PROP && nMode == TBLFIX_CHGPROP) ||
- (nSlot == FN_TABLE_MODE_VARIABLE && nMode == TBLVAR_CHGABS);
+ sal_Bool bSet = (nSlot == FN_TABLE_MODE_FIX && nMode == TBLFIX_CHGABS) ||
+ (nSlot == FN_TABLE_MODE_FIX_PROP && nMode == TBLFIX_CHGPROP) ||
+ (nSlot == FN_TABLE_MODE_VARIABLE && nMode == TBLVAR_CHGABS);
rSet.Put(SfxBoolItem(nSlot, bSet));
}
break;
@@ -1306,8 +1307,8 @@ void SwTableShell::GetState(SfxItemSet &rSet)
break;
case FN_TABLE_MERGE_TABLE:
{
- BOOL bAsk;
- if( !rSh.CanMergeTable( TRUE, &bAsk ))
+ sal_Bool bAsk;
+ if( !rSh.CanMergeTable( sal_True, &bAsk ))
rSet.DisableItem( nSlot );
}
break;
@@ -1403,7 +1404,7 @@ void SwTableShell::ExecTableStyle(SfxRequest& rReq)
const SvxLineItem &rLineItem = (const SvxLineItem&)pArgs->
Get( SID_FRAME_LINESTYLE );
const SvxBorderLine* pBorderLine = rLineItem.GetLine();
- rSh.SetTabLineStyle( 0, TRUE, pBorderLine);
+ rSh.SetTabLineStyle( 0, sal_True, pBorderLine);
}
else
{
@@ -1444,15 +1445,15 @@ void SwTableShell::ExecNumberFormat(SfxRequest& rReq)
//Erstmal die Slots, die keinen FrmMgr benoetigen.
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
// Sprache immer von Cursorposition besorgen
LanguageType eLang = rSh.GetCurLang();
SvNumberFormatter* pFormatter = rSh.GetNumberFormatter();
sal_uInt32 nNumberFormat = NUMBERFORMAT_ENTRY_NOT_FOUND;
- USHORT nFmtType = 0, nOffset = 0;
+ sal_uInt16 nFmtType = 0, nOffset = 0;
switch ( nSlot )
{
diff --git a/sw/source/ui/shells/textdrw.cxx b/sw/source/ui/shells/textdrw.cxx
index 9aba16d9b351..16e47464ad21 100644
--- a/sw/source/ui/shells/textdrw.cxx
+++ b/sw/source/ui/shells/textdrw.cxx
@@ -64,7 +64,7 @@ void SwBaseShell::InsertURLButton(const String& rURL, const String& rTarget, con
SdrView *pSdrView = rSh.GetDrawView();
// OBJ_FM_BUTTON
- pSdrView->SetDesignMode(TRUE);
+ pSdrView->SetDesignMode(sal_True);
pSdrView->SetCurrentObj(OBJ_FM_BUTTON);
pSdrView->SetEditMode(sal_False);
diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx
index ba59cb27656f..6cce094bdb77 100644
--- a/sw/source/ui/shells/textfld.cxx
+++ b/sw/source/ui/shells/textfld.cxx
@@ -83,11 +83,11 @@
using namespace nsSwDocInfoSubType;
-extern BOOL bNoInterrupt; // in mainwn.cxx
+extern sal_Bool bNoInterrupt; // in mainwn.cxx
-String& lcl_AppendRedlineStr( String& rStr, USHORT nRedlId )
+String& lcl_AppendRedlineStr( String& rStr, sal_uInt16 nRedlId )
{
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
switch( nRedlId )
{
case nsRedlineType_t::REDLINE_INSERT: nResId = STR_REDLINE_INSERTED; break;
@@ -107,17 +107,17 @@ void SwTextShell::ExecField(SfxRequest &rReq)
SwWrtShell& rSh = GetShell();
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pArgs = rReq.GetArgs();
if(pArgs)
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
Window *pMDI = &GetView().GetViewFrame()->GetWindow();
- BOOL bMore = FALSE;
- BOOL bIsText = TRUE;
- USHORT nInsertType = 0;
- USHORT nInsertSubType = 0;
- ULONG nInsertFormat = 0;
+ sal_Bool bMore = sal_False;
+ sal_Bool bIsText = sal_True;
+ sal_uInt16 nInsertType = 0;
+ sal_uInt16 nInsertSubType = 0;
+ sal_uLong nInsertFormat = 0;
switch(nSlot)
{
@@ -135,7 +135,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
if(rLink.IsVisible())
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- SfxAbstractLinksDialog* pDlg = pFact->CreateLinksDialog( pMDI, &rSh.GetLinkManager(), FALSE, &rLink );
+ SfxAbstractLinksDialog* pDlg = pFact->CreateLinksDialog( pMDI, &rSh.GetLinkManager(), sal_False, &rLink );
if ( pDlg )
{
pDlg->Execute();
@@ -165,7 +165,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
{
const String& rMacro = ((SwMacroField*)pFld)->GetMacro();
- USHORT nPos = rMacro.Search('.', 0);
+ sal_uInt16 nPos = rMacro.Search('.', 0);
if(nPos != STRING_NOTFOUND)
{
SvxMacro aMacro( rMacro.Copy(nPos + 1), rMacro.Copy(0,nPos), STARBASIC );
@@ -178,14 +178,14 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_GOTO_NEXT_INPUTFLD:
case FN_GOTO_PREV_INPUTFLD:
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwFieldType* pFld = rSh.GetFldType( 0, RES_INPUTFLD );
if( pFld && rSh.MoveFldType( pFld,
FN_GOTO_NEXT_INPUTFLD == nSlot ))
{
rSh.ClearMark();
- rSh.StartInputFldDlg( rSh.GetCurFld(), FALSE );
- bRet = TRUE;
+ rSh.StartInputFldDlg( rSh.GetCurFld(), sal_False );
+ bRet = sal_True;
}
rReq.SetReturnValue( SfxBoolItem( nSlot, bRet ));
@@ -193,7 +193,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
break;
default:
- bMore = TRUE;
+ bMore = sal_True;
}
if(bMore)
{
@@ -203,40 +203,40 @@ void SwTextShell::ExecField(SfxRequest &rReq)
{
case FN_INSERT_DBFIELD:
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if( pItem )
{
- ULONG nFormat = 0;
- USHORT nType = 0;
+ sal_uLong nFormat = 0;
+ sal_uInt16 nType = 0;
String aPar1 = ((SfxStringItem *)pItem)->GetValue();
String aPar2;
sal_Int32 nCommand = 0;
if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nType = ((SfxUInt16Item *)pItem)->GetValue();
aPar1 += DB_DELIM;
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_1, FALSE, &pItem ))
+ FN_PARAM_1, sal_False, &pItem ))
{
aPar1 += ((SfxStringItem *)pItem)->GetValue();
}
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_3, FALSE, &pItem ))
+ FN_PARAM_3, sal_False, &pItem ))
nCommand = ((SfxInt32Item*)pItem)->GetValue();
aPar1 += DB_DELIM;
aPar1 += String::CreateFromInt32(nCommand);
aPar1 += DB_DELIM;
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_2, FALSE, &pItem ))
+ FN_PARAM_2, sal_False, &pItem ))
{
aPar1 += ((SfxStringItem *)pItem)->GetValue();
}
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_FIELD_CONTENT, FALSE, &pItem ))
+ FN_PARAM_FIELD_CONTENT, sal_False, &pItem ))
aPar2 = ((SfxStringItem *)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_FIELD_FORMAT, FALSE, &pItem ))
+ FN_PARAM_FIELD_FORMAT, sal_False, &pItem ))
nFormat = ((SfxUInt32Item *)pItem)->GetValue();
OSL_FAIL("Command is not yet used");
sal_Unicode cSeparator = ' ';
@@ -249,30 +249,30 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_INSERT_FIELD_CTRL:
case FN_INSERT_FIELD:
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if( pItem && nSlot != FN_INSERT_FIELD_CTRL)
{
- ULONG nFormat = 0;
- USHORT nType = 0;
- USHORT nSubType = 0;
+ sal_uLong nFormat = 0;
+ sal_uInt16 nType = 0;
+ sal_uInt16 nSubType = 0;
String aPar1 = ((SfxStringItem *)pItem)->GetValue();
String aPar2;
sal_Unicode cSeparator = ' ';
if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nType = ((SfxUInt16Item *)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_SUBTYPE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nSubType = ((SfxUInt16Item *)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_FIELD_CONTENT, FALSE, &pItem ))
+ FN_PARAM_FIELD_CONTENT, sal_False, &pItem ))
aPar2 = ((SfxStringItem *)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_FIELD_FORMAT, FALSE, &pItem ))
+ FN_PARAM_FIELD_FORMAT, sal_False, &pItem ))
nFormat = ((SfxUInt32Item *)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_3, FALSE, &pItem ))
+ FN_PARAM_3, sal_False, &pItem ))
{
String sTmp = ((SfxStringItem *)pItem)->GetValue();
if(sTmp.Len())
@@ -303,14 +303,14 @@ void SwTextShell::ExecField(SfxRequest &rReq)
pVFrame->ToggleChildWindow(FN_INSERT_FIELD); // Dialog anzeigen
// Flddlg auf neue TabPage umschalten
- USHORT nId = SwFldDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = SwFldDlgWrapper::GetChildWindowId();
SwFldDlgWrapper *pWrp = (SwFldDlgWrapper*)pVFrame->GetChildWindow(nId);
if (pWrp)
pWrp->ShowPage();
rReq.Ignore();
}
break;
- case FN_DELETE_NOTE:
+ case FN_DELETE_COMMENT:
if ( GetView().GetPostItMgr() &&
GetView().GetPostItMgr()->HasActiveSidebarWin() )
{
@@ -323,7 +323,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
break;
case FN_DELETE_NOTE_AUTHOR:
{
- SFX_REQUEST_ARG( rReq, pNoteItem, SfxStringItem, nSlot, FALSE);
+ SFX_REQUEST_ARG( rReq, pNoteItem, SfxStringItem, nSlot, sal_False);
if ( pNoteItem && GetView().GetPostItMgr() )
GetView().GetPostItMgr()->Delete( pNoteItem->GetValue() );
}
@@ -341,7 +341,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
break;
case FN_HIDE_NOTE_AUTHOR:
{
- SFX_REQUEST_ARG( rReq, pNoteItem, SfxStringItem, nSlot, FALSE);
+ SFX_REQUEST_ARG( rReq, pNoteItem, SfxStringItem, nSlot, sal_False);
if ( pNoteItem && GetView().GetPostItMgr() )
GetView().GetPostItMgr()->Hide( pNoteItem->GetValue() );
}
@@ -349,7 +349,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_POSTIT:
{
SwPostItField* pPostIt = (SwPostItField*)aFldMgr.GetCurFld();
- BOOL bNew = !(pPostIt && pPostIt->GetTyp()->Which() == RES_POSTITFLD);
+ sal_Bool bNew = !(pPostIt && pPostIt->GetTyp()->Which() == RES_POSTITFLD);
if (bNew || GetView().GetPostItMgr()->IsAnswer())
{
SvtUserOptions aUserOpt;
@@ -366,9 +366,9 @@ void SwTextShell::ExecField(SfxRequest &rReq)
SwInsertFld_Data aData(TYP_POSTITFLD, 0, sAuthor, aEmptyStr, 0);
aFldMgr.InsertFld(aData);
rSh.Push();
- rSh.SwCrsrShell::Left(1, CRSR_SKIP_CHARS, FALSE);
+ rSh.SwCrsrShell::Left(1, CRSR_SKIP_CHARS, sal_False);
pPostIt = (SwPostItField*)aFldMgr.GetCurFld();
- rSh.Pop(FALSE); // Cursorpos restaurieren
+ rSh.Pop(sal_False); // Cursorpos restaurieren
}
if (pPostIt)
@@ -413,7 +413,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
sComment = pRedline->GetComment();
- BOOL bTravel = FALSE;
+ sal_Bool bTravel = sal_False;
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
@@ -440,8 +440,8 @@ void SwTextShell::ExecField(SfxRequest &rReq)
pActRed = rSh.SelPrevRedline();
}
- BOOL bPrev = pActRed != 0;
- rSh.Pop(FALSE);
+ sal_Bool bPrev = pActRed != 0;
+ rSh.Pop(sal_False);
rSh.EndAction();
rSh.ClearMark();
@@ -450,8 +450,8 @@ void SwTextShell::ExecField(SfxRequest &rReq)
rSh.StartAction();
rSh.Push();
pActRed = rSh.SelNextRedline();
- BOOL bNext = pActRed != 0;
- rSh.Pop(FALSE); // Cursorpos restaurieren
+ sal_Bool bNext = pActRed != 0;
+ rSh.Pop(sal_False); // Cursorpos restaurieren
if( rSh.IsCrsrPtAtEnd() )
rSh.SwapPam();
@@ -462,7 +462,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
SvxAbstractDialogFactory* pFact2 = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact2, "Dialogdiet fail!");
- AbstractSvxPostItDialog* pDlg = pFact2->CreateSvxPostItDialog( pMDI, aSet, bTravel, TRUE );
+ AbstractSvxPostItDialog* pDlg = pFact2->CreateSvxPostItDialog( pMDI, aSet, bTravel, sal_True );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->HideAuthor();
@@ -479,7 +479,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
}
rSh.SetCareWin(pDlg->GetWindow());
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
if ( pDlg->Execute() == RET_OK )
{
@@ -492,7 +492,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
delete pDlg;
rSh.SetCareWin(NULL);
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
rSh.ClearMark();
GetView().AttrChangedNotify(GetShellPtr());
}
@@ -502,8 +502,8 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_JAVAEDIT:
{
String aType, aText;
- BOOL bIsUrl=FALSE;
- BOOL bNew=FALSE, bUpdate=FALSE;
+ sal_Bool bIsUrl=sal_False;
+ sal_Bool bNew=sal_False, bUpdate=sal_False;
SwFldMgr* pMgr = new SwFldMgr;
if ( pItem )
{
@@ -560,21 +560,21 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_INSERT_FLD_DATE :
nInsertType = TYP_DATEFLD;
- bIsText = FALSE;
+ bIsText = sal_False;
goto FIELD_INSERT;
case FN_INSERT_FLD_TIME :
nInsertType = TYP_TIMEFLD;
- bIsText = FALSE;
+ bIsText = sal_False;
goto FIELD_INSERT;
case FN_INSERT_FLD_PGNUMBER:
nInsertType = TYP_PAGENUMBERFLD;
nInsertFormat = SVX_NUM_PAGEDESC; // wie Seitenvorlage
- bIsText = FALSE;
+ bIsText = sal_False;
goto FIELD_INSERT;
case FN_INSERT_FLD_PGCOUNT :
nInsertType = TYP_DOCSTATFLD;
nInsertSubType = 0;
- bIsText = FALSE;
+ bIsText = sal_False;
nInsertFormat = SVX_NUM_PAGEDESC;
goto FIELD_INSERT;
case FN_INSERT_FLD_TOPIC :
@@ -612,14 +612,14 @@ void SwTextShell::StateField( SfxItemSet &rSet )
SwWrtShell& rSh = GetShell();
SfxWhichIter aIter( rSet );
const SwField* pField = 0;
- int bGetField = FALSE;
- USHORT nWhich = aIter.FirstWhich();
+ int bGetField = sal_False;
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
switch (nWhich)
{
- case FN_DELETE_NOTE:
+ case FN_DELETE_COMMENT:
case FN_DELETE_NOTE_AUTHOR:
case FN_DELETE_ALL_NOTES:
case FN_HIDE_NOTE:
@@ -631,7 +631,7 @@ void SwTextShell::StateField( SfxItemSet &rSet )
rSet.InvalidateItem( nWhich );
else if ( !pPostItMgr->HasActiveSidebarWin() )
{
- rSet.InvalidateItem( FN_DELETE_NOTE );
+ rSet.InvalidateItem( FN_DELETE_COMMENT );
rSet.InvalidateItem( FN_HIDE_NOTE );
}
}
@@ -642,10 +642,10 @@ void SwTextShell::StateField( SfxItemSet &rSet )
if( !bGetField )
{
pField = rSh.GetCurFld();
- bGetField = TRUE;
+ bGetField = sal_True;
}
- USHORT nTempWhich = pField ? pField->GetTyp()->Which() : USHRT_MAX;
+ sal_uInt16 nTempWhich = pField ? pField->GetTyp()->Which() : USHRT_MAX;
if( USHRT_MAX == nTempWhich ||
RES_POSTITFLD == nTempWhich ||
RES_SCRIPTFLD == nTempWhich ||
@@ -664,7 +664,7 @@ void SwTextShell::StateField( SfxItemSet &rSet )
if(!bGetField)
{
pField = rSh.GetCurFld();
- bGetField = TRUE;
+ bGetField = sal_True;
}
if(!pField || pField->GetTyp()->Which() != RES_MACROFLD)
rSet.DisableItem(nWhich);
@@ -698,7 +698,7 @@ void SwTextShell::StateField( SfxItemSet &rSet )
break;
case FN_POSTIT :
case FN_JAVAEDIT :
- BOOL bCurField = FALSE;
+ sal_Bool bCurField = sal_False;
pField = rSh.GetCurFld();
if(nWhich == FN_POSTIT)
bCurField = pField && pField->GetTyp()->Which() == RES_POSTITFLD;
@@ -718,7 +718,7 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem)
const String& rName = rHlnkItem.GetName();
const String& rURL = rHlnkItem.GetURL();
const String& rTarget = rHlnkItem.GetTargetFrame();
- USHORT nType = (USHORT)rHlnkItem.GetInsertMode();
+ sal_uInt16 nType = (sal_uInt16)rHlnkItem.GetInsertMode();
nType &= ~HLINK_HTMLMODE;
const SvxMacroTableDtor* pMacroTbl = rHlnkItem.GetMacroTbl();
@@ -731,10 +731,10 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem)
rSh.GetCurAttr( aSet );
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, FALSE, &pItem))
+ if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, sal_False, &pItem))
{
// Links selektieren
- rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT, FALSE);
+ rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT, sal_False);
}
switch (nType)
{
@@ -756,13 +756,13 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem)
aINetFmt.SetMacro(SFX_EVENT_MOUSEOUT_OBJECT, *pMacro);
}
rSh.SttSelect();
- rSh.InsertURL( aINetFmt, rName, TRUE );
+ rSh.InsertURL( aINetFmt, rName, sal_True );
rSh.EndSelect();
}
break;
case HLINK_BUTTON:
- BOOL bSel = rSh.HasSelection();
+ sal_Bool bSel = rSh.HasSelection();
if(bSel)
rSh.DelRight();
InsertURLButton( rURL, rTarget, rName );
@@ -795,18 +795,18 @@ IMPL_LINK( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog *, pBtn )
const SwRedline *pActRed = pSh->SelNextRedline();
pSh->Pop(pActRed != 0);
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
if (pActRed)
{
pSh->StartAction();
pSh->Push();
bEnable = pSh->SelNextRedline() != 0;
- pSh->Pop(FALSE);
+ pSh->Pop(sal_False);
pSh->EndAction();
}
- pDlg->EnableTravel(bEnable, TRUE);
+ pDlg->EnableTravel(bEnable, sal_True);
if( pSh->IsCrsrPtAtEnd() )
pSh->SwapPam();
@@ -847,18 +847,18 @@ IMPL_LINK( SwTextShell, RedlinePrevHdl, AbstractSvxPostItDialog *, pBtn )
const SwRedline *pActRed = pSh->SelPrevRedline();
pSh->Pop(pActRed != 0);
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
if (pActRed)
{
pSh->StartAction();
pSh->Push();
bEnable = pSh->SelPrevRedline() != 0;
- pSh->Pop(FALSE);
+ pSh->Pop(sal_False);
pSh->EndAction();
}
- pDlg->EnableTravel(TRUE, bEnable);
+ pDlg->EnableTravel(sal_True, bEnable);
pRedline = pSh->GetCurrRedline();
sComment = pRedline->GetComment();
diff --git a/sw/source/ui/shells/textglos.cxx b/sw/source/ui/shells/textglos.cxx
index 244e8b7638c0..6bb71bc7ef6a 100644
--- a/sw/source/ui/shells/textglos.cxx
+++ b/sw/source/ui/shells/textglos.cxx
@@ -47,28 +47,28 @@
// STATIC DATA -----------------------------------------------------------
void SwTextShell::ExecGlossary(SfxRequest &rReq)
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
::GetGlossaries()->UpdateGlosPath(!rReq.IsAPI() ||
FN_GLOSSARY_DLG == nSlot );
SwGlossaryHdl* pGlosHdl = GetView().GetGlosHdl();
// SwGlossaryList updaten?
- BOOL bUpdateList = FALSE;
+ sal_Bool bUpdateList = sal_False;
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if(pArgs)
- pArgs->GetItemState(nSlot, FALSE, &pItem );
+ pArgs->GetItemState(nSlot, sal_False, &pItem );
switch( nSlot )
{
case FN_GLOSSARY_DLG:
pGlosHdl->GlossaryDlg();
- bUpdateList = TRUE;
+ bUpdateList = sal_True;
rReq.Ignore();
break;
case FN_EXPAND_GLOSSARY:
{
- BOOL bReturn;
+ sal_Bool bReturn;
bReturn = pGlosHdl->ExpandGlossary();
rReq.SetReturnValue( SfxBoolItem( nSlot, bReturn ) );
rReq.Done();
@@ -79,10 +79,10 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
{
String aGroup = (( const SfxStringItem *)pItem)->GetValue();
String aName;
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem ))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem ))
aName = (( const SfxStringItem *)pItem)->GetValue();
String aShortName;
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_2, FALSE, &pItem ))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_2, sal_False, &pItem ))
aShortName = (( const SfxStringItem *)pItem)->GetValue();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
@@ -90,12 +90,12 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
if ( fnSetActGroup )
(*fnSetActGroup)( aGroup );
- pGlosHdl->SetCurGroup(aGroup, TRUE);
+ pGlosHdl->SetCurGroup(aGroup, sal_True);
//eingestellte Gruppe muss in NewGlossary ggf. erzeugt werden!
- pGlosHdl->NewGlossary( aName, aShortName, TRUE );
+ pGlosHdl->NewGlossary( aName, aShortName, sal_True );
rReq.Done();
}
- bUpdateList = TRUE;
+ bUpdateList = sal_True;
break;
case FN_SET_ACT_GLOSSARY:
if(pItem)
@@ -115,14 +115,14 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
{
String aGroup = (( const SfxStringItem *)pItem)->GetValue();
String aName;
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem ))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem ))
aName = (( const SfxStringItem *)pItem)->GetValue();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
if ( fnSetActGroup )
(*fnSetActGroup)( aGroup );
- pGlosHdl->SetCurGroup(aGroup, TRUE);
+ pGlosHdl->SetCurGroup(aGroup, sal_True);
rReq.SetReturnValue(SfxBoolItem(nSlot, pGlosHdl->InsertGlossary( aName )));
rReq.Done();
}
diff --git a/sw/source/ui/shells/textidx.cxx b/sw/source/ui/shells/textidx.cxx
index 7b9b31cb6f74..c052ff5d6963 100644
--- a/sw/source/ui/shells/textidx.cxx
+++ b/sw/source/ui/shells/textidx.cxx
@@ -57,9 +57,9 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
{
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(nSlot, FALSE, &pItem );
+ pArgs->GetItemState(nSlot, sal_False, &pItem );
SfxViewFrame* pVFrame = GetView().GetViewFrame();
Window *pMDI = &pVFrame->GetWindow();
@@ -92,7 +92,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
case FN_EDIT_IDX_ENTRY_DLG:
{
SwTOXMgr aMgr(GetShellPtr());
- USHORT nRet = RET_OK;
+ sal_uInt16 nRet = RET_OK;
if(aMgr.GetTOXMarkCount() > 1)
{ // Mehrere Marken, welche solls denn sein ?
//
@@ -139,11 +139,11 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
// Hoehe=Breite fuer konsistentere Vorschau (analog zu Bereich bearbeiten)
aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth)));
const SwTOXBase* pCurTOX = 0;
- BOOL bGlobal = FALSE;
+ sal_Bool bGlobal = sal_False;
if(pItem)
{
pCurTOX = (const SwTOXBase* )((SwPtrItem*)pItem)->GetValue();
- bGlobal = TRUE;
+ bGlobal = sal_True;
}
else
pCurTOX = rSh.GetCurTOX();
@@ -169,7 +169,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
const SwTOXBase* pBase = rSh.GetCurTOX();
OSL_ENSURE(pBase, "no TOXBase to remove");
if( pBase )
- rSh.DeleteTOX(*pBase, TRUE);
+ rSh.DeleteTOX(*pBase, sal_True);
}
break;
default:
@@ -187,7 +187,7 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet)
SfxChildWindow* pAuthMark = pVFrame->GetChildWindow(FN_INSERT_AUTH_ENTRY_DLG);
- const BOOL bHtmlMode = 0 != ::GetHtmlMode( GetView().GetDocShell() );
+ const sal_Bool bHtmlMode = 0 != ::GetHtmlMode( GetView().GetDocShell() );
const SwTOXBase* pBase = 0;
if( bHtmlMode || 0 != ( pBase = rSh.GetCurTOX()) )
{
@@ -205,27 +205,27 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet)
if(!pIdxMrk)
rSet.DisableItem( FN_INSERT_IDX_ENTRY_DLG );
else
- rSet.Put(SfxBoolItem(FN_INSERT_IDX_ENTRY_DLG, TRUE));
+ rSet.Put(SfxBoolItem(FN_INSERT_IDX_ENTRY_DLG, sal_True));
if(!pAuthMark)
rSet.DisableItem( FN_INSERT_AUTH_ENTRY_DLG );
else
- rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, TRUE));
+ rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, sal_True));
}
else
{
- BOOL bEnableEdit = TRUE;
- BOOL bInReadonly = rSh.HasReadonlySel();
+ sal_Bool bEnableEdit = sal_True;
+ sal_Bool bInReadonly = rSh.HasReadonlySel();
if( rSh.HasSelection() || bInReadonly)
- bEnableEdit = FALSE;
+ bEnableEdit = sal_False;
else
{
SwTOXMarks aArr;
rSh.GetCurTOXMarks( aArr );
if( !aArr.Count())
- bEnableEdit = FALSE;
+ bEnableEdit = sal_False;
}
if(!bEnableEdit)
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index 5927e2b8f2aa..c3e8248a5578 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -115,7 +115,6 @@
#include <sfx2/msg.hxx>
#include <swslots.hxx>
#include <SwRewriter.hxx>
-#include <undobj.hxx>
#include <comcore.hrc>
using namespace ::com::sun::star;
@@ -151,9 +150,9 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(nSlot, FALSE, &pItem );
+ pArgs->GetItemState(nSlot, sal_False, &pItem );
switch( nSlot )
{
@@ -162,8 +161,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
rSh.InsertByWord(((const SfxStringItem *)pItem)->GetValue());
break;
case FN_INSERT_SOFT_HYPHEN:
- if( CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( TRUE, 0 ) &&
- CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( TRUE, -1 ))
+ if( CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( sal_True, 0 ) &&
+ CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( sal_True, -1 ))
rSh.Insert( String( CHAR_SOFTHYPHEN ) );
break;
@@ -258,14 +257,13 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
}
- rSh.InsertObject( xObj, 0, TRUE, nSlot);
+ rSh.InsertObject( xObj, 0, sal_True, nSlot);
}
}
}
break;
case SID_INSERT_OBJECT:
case SID_INSERT_PLUGIN:
- case SID_INSERT_APPLET:
{
SFX_REQUEST_ARG( rReq, pNameItem, SfxGlobalNameItem, SID_INSERT_OBJECT, sal_False );
SvGlobalName *pName = NULL;
@@ -276,58 +274,23 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
pName = &aName;
}
- SFX_REQUEST_ARG( rReq, pClassItem, SfxStringItem, FN_PARAM_1, sal_False );
SFX_REQUEST_ARG( rReq, pClassLocationItem, SfxStringItem, FN_PARAM_2, sal_False );
SFX_REQUEST_ARG( rReq, pCommandsItem, SfxStringItem, FN_PARAM_3, sal_False );
//TODO/LATER: recording currently not working, need code for Commandlist
svt::EmbeddedObjectRef xObj;
- if((SID_INSERT_APPLET == nSlot || SID_INSERT_PLUGIN)
- && (pClassItem || pClassLocationItem || pCommandsItem))
+ if( nSlot == SID_INSERT_PLUGIN && ( pClassLocationItem || pCommandsItem ) )
{
- String sClass;
String sClassLocation;
- if(pClassItem)
- sClass = pClassItem->GetValue();
if(pClassLocationItem)
sClassLocation = pClassLocationItem->GetValue();
SvCommandList aCommandList;
if(pCommandsItem)
{
- USHORT nTemp;
+ sal_uInt16 nTemp;
aCommandList.AppendCommands( pCommandsItem->GetValue(), &nTemp );
}
- if(SID_INSERT_APPLET == nSlot)
- {
- SwApplet_Impl aApplImpl( rSh.GetAttrPool(),
- RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
- String sBaseURL;
- SfxMedium* pMedium = GetView().GetDocShell()->GetMedium();
- if(pMedium)
- sBaseURL = pMedium->GetURLObject().GetMainURL(INetURLObject::NO_DECODE);
-
- aApplImpl.CreateApplet(sClass, aEmptyStr, FALSE, sClassLocation, sBaseURL );
- aApplImpl.FinishApplet();
- xObj.Assign( aApplImpl.GetApplet(), embed::Aspects::MSOLE_CONTENT );
- if( aCommandList.Count() )
- {
- uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY );
- if ( xSet.is() )
- {
- uno::Sequence < beans::PropertyValue > aSeq;
- aCommandList.FillSequence( aSeq );
- try
- {
- xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCommands")), uno::makeAny( aSeq ) );
- }
- catch ( uno::Exception& )
- {
- }
- }
- }
- }
- else
{
comphelper::EmbeddedObjectContainer aCnt;
::rtl::OUString sName;
@@ -365,7 +328,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
else
{
OSL_ENSURE( !pNameItem || nSlot == SID_INSERT_OBJECT, "Superfluous argument!" );
- rSh.InsertObject( xObj, pName, TRUE, nSlot);
+ rSh.InsertObject( xObj, pName, sal_True, nSlot);
rReq.Done();
}
break;
@@ -433,7 +396,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
else
{
- rSh.InsertObject( xObj, 0, TRUE, nSlot);
+ rSh.InsertObject( xObj, 0, sal_True, nSlot);
rReq.Done();
}
}
@@ -467,7 +430,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
else
bFillWithData = sal_False; // will create chart with only it's default image
- SwTableFUNC( &rSh, FALSE ).InsertChart( xDataProvider, bFillWithData, aRangeString );
+ SwTableFUNC( &rSh, sal_False ).InsertChart( xDataProvider, bFillWithData, aRangeString );
rSh.LaunchOLEObj();
svt::EmbeddedObjectRef& xObj = rSh.GetOLEObject();
@@ -495,7 +458,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
// the suggestion has to be removed before
GetView().GetEditWin().StopQuickHelp();
SvGlobalName aGlobalName( SO3_SM_CLASSID );
- rSh.InsertObject( svt::EmbeddedObjectRef(), &aGlobalName, TRUE, 0 );
+ rSh.InsertObject( svt::EmbeddedObjectRef(), &aGlobalName, sal_True, 0 );
}
break;
@@ -506,14 +469,14 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case FN_INSERT_FRAME_INTERACT_NOCOL:
case FN_INSERT_FRAME_INTERACT:
{
- USHORT nCols = 1;
- BOOL bModifier1 = rReq.GetModifier() == KEY_MOD1;
+ sal_uInt16 nCols = 1;
+ sal_Bool bModifier1 = rReq.GetModifier() == KEY_MOD1;
if(pArgs)
{
if(FN_INSERT_FRAME_INTERACT_NOCOL != nSlot &&
- pArgs->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem) == SFX_ITEM_SET)
+ pArgs->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem) == SFX_ITEM_SET)
nCols = ((SfxUInt16Item *)pItem)->GetValue();
- if(pArgs->GetItemState(SID_MODIFIER, FALSE, &pItem) == SFX_ITEM_SET)
+ if(pArgs->GetItemState(SID_MODIFIER, sal_False, &pItem) == SFX_ITEM_SET)
bModifier1 |= KEY_MOD1 == ((SfxUInt16Item *)pItem)->GetValue();
}
if(bModifier1 )
@@ -527,7 +490,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
Size aSize(16 * MM50, 8 * MM50);
GetShell().LockPaint();
GetShell().StartAllAction();
- SwFlyFrmAttrMgr aMgr( TRUE, GetShellPtr(), FRMMGR_TYPE_TEXT );
+ SwFlyFrmAttrMgr aMgr( sal_True, GetShellPtr(), FRMMGR_TYPE_TEXT );
if(nCols > 1)
{
SwFmtCol aCol;
@@ -547,37 +510,37 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
break;
case FN_INSERT_FRAME:
{
- BOOL bSingleCol = FALSE;
+ sal_Bool bSingleCol = sal_False;
if( 0!= dynamic_cast< SwWebDocShell*>( GetView().GetDocShell()) )
{
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
- USHORT nExport = pHtmlOpt->GetExportMode();
+ sal_uInt16 nExport = pHtmlOpt->GetExportMode();
if( HTML_CFG_MSIE == nExport ||
HTML_CFG_HTML32 == nExport ||
HTML_CFG_MSIE_40 == nExport ||
HTML_CFG_HTML32 == nExport )
{
- bSingleCol = TRUE;
+ bSingleCol = sal_True;
}
}
// Rahmen neu anlegen
- SwFlyFrmAttrMgr aMgr( TRUE, GetShellPtr(), FRMMGR_TYPE_TEXT );
+ SwFlyFrmAttrMgr aMgr( sal_True, GetShellPtr(), FRMMGR_TYPE_TEXT );
if(pArgs)
{
Size aSize(aMgr.GetSize());
aSize.Width() = GetShell().GetAnyCurRect(RECT_PAGE_PRT).Width();
Point aPos = aMgr.GetPos();
RndStdIds eAnchor = FLY_AT_PARA;
- if(pArgs->GetItemState(nSlot, FALSE, &pItem) == SFX_ITEM_SET)
+ if(pArgs->GetItemState(nSlot, sal_False, &pItem) == SFX_ITEM_SET)
eAnchor = (RndStdIds)((SfxUInt16Item *)pItem)->GetValue();
- if(pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem) == SFX_ITEM_SET)
+ if(pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem) == SFX_ITEM_SET)
aPos = ((SfxPointItem *)pItem)->GetValue();
- if(pArgs->GetItemState(FN_PARAM_2, FALSE, &pItem) == SFX_ITEM_SET)
+ if(pArgs->GetItemState(FN_PARAM_2, sal_False, &pItem) == SFX_ITEM_SET)
aSize = ((SvxSizeItem *)pItem)->GetSize();
- if(pArgs->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem) == SFX_ITEM_SET)
+ if(pArgs->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem) == SFX_ITEM_SET)
{
- USHORT nCols = ((SfxUInt16Item *)pItem)->GetValue();
+ sal_uInt16 nCols = ((SfxUInt16Item *)pItem)->GetValue();
if( !bSingleCol && 1 < nCols )
{
SwFmtCol aFmtCol;
@@ -597,7 +560,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
else
{
- static USHORT const aFrmAttrRange[] =
+ static sal_uInt16 aFrmAttrRange[] =
{
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
@@ -626,29 +589,31 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
// Minimalgroesse in Spalten loeschen
SvxBoxInfoItem aBoxInfo((SvxBoxInfoItem &)aSet.Get(SID_ATTR_BORDER_INNER));
const SvxBoxItem& rBox = (const SvxBoxItem&)aSet.Get(RES_BOX);
- aBoxInfo.SetMinDist(FALSE);
+ aBoxInfo.SetMinDist(sal_False);
aBoxInfo.SetDefDist(rBox.GetDistance(BOX_LINE_LEFT));
aSet.Put(aBoxInfo);
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, GetView().GetDocShell()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_STD,
- GetView().GetViewFrame(), &GetView().GetViewFrame()->GetWindow(), aSet, TRUE);
+ GetView().GetViewFrame(), &GetView().GetViewFrame()->GetWindow(), aSet, sal_True);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(pDlg->Execute() && pDlg->GetOutputItemSet())
{
- GetShell().LockPaint();
- GetShell().StartAllAction();
- GetShell().StartUndo(UNDO_INSERT);
+ //local variable necessary at least after call of .AutoCaption() because this could be deleted at this point
+ SwWrtShell& rShell = GetShell();
+ rShell.LockPaint();
+ rShell.StartAllAction();
+ rShell.StartUndo(UNDO_INSERT);
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
aMgr.SetAttrSet(*pOutSet);
// beim ClickToEditFeld erst die Selektion loeschen
- if( GetShell().IsInClickToEdit() )
- GetShell().DelRight();
+ if( rShell.IsInClickToEdit() )
+ rShell.DelRight();
aMgr.InsertFlyFrm();
@@ -657,10 +622,10 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
if ( xRecorder.is() )
{
//FN_INSERT_FRAME
- USHORT nAnchor = (USHORT)aMgr.GetAnchor();
+ sal_uInt16 nAnchor = (sal_uInt16)aMgr.GetAnchor();
rReq.AppendItem(SfxUInt16Item(nSlot, nAnchor));
- rReq.AppendItem(SfxPointItem(FN_PARAM_1, GetShell().GetObjAbsPos()));
- rReq.AppendItem(SvxSizeItem(FN_PARAM_2, GetShell().GetObjSize()));
+ rReq.AppendItem(SfxPointItem(FN_PARAM_1, rShell.GetObjAbsPos()));
+ rReq.AppendItem(SvxSizeItem(FN_PARAM_2, rShell.GetObjSize()));
rReq.Done();
}
@@ -671,10 +636,10 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_FRAME));
- GetShell().EndUndo(UNDO_INSERT, &aRewriter);
+ rShell.EndUndo(UNDO_INSERT, &aRewriter);
}
- GetShell().EndAllAction();
- GetShell().UnlockPaint();
+ rShell.EndAllAction();
+ rShell.UnlockPaint();
}
DELETEZ(pDlg);
@@ -684,8 +649,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case FN_INSERT_HRULER:
{
String sPath;
- BOOL bSimpleLine = FALSE;
- BOOL bRet = FALSE;
+ sal_Bool bSimpleLine = sal_False;
+ sal_Bool bRet = sal_False;
Window* pParent = GetView().GetWindow();
if ( pItem )
{
@@ -720,28 +685,28 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
if(bSimpleLine)
{
if(!(rSh.IsSttOfPara() && rSh.IsEndOfPara())) // kein leerer Absatz?
- rSh.SplitNode( FALSE, FALSE ); // dann Platz schaffen
- rSh.SplitNode( FALSE, FALSE );
- rSh.Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.SplitNode( sal_False, sal_False ); // dann Platz schaffen
+ rSh.SplitNode( sal_False, sal_False );
+ rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
rSh.SetTxtFmtColl( rSh.GetTxtCollFromPool( RES_POOLCOLL_HTML_HR ));
- rSh.Right(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
- bRet = TRUE;
+ rSh.Right(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
+ bRet = sal_True;
}
else if(sPath.Len())
{
- SwFlyFrmAttrMgr aFrmMgr( TRUE, &rSh, FRMMGR_TYPE_GRF );
+ SwFlyFrmAttrMgr aFrmMgr( sal_True, &rSh, FRMMGR_TYPE_GRF );
// am FrmMgr muessen die richtigen Parameter eingestellt werden
aFrmMgr.SetAnchor(FLY_AS_CHAR);
- rSh.SplitNode( FALSE, FALSE );
- rSh.SplitNode( FALSE, FALSE );
- rSh.Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.SplitNode( sal_False, sal_False );
+ rSh.SplitNode( sal_False, sal_False );
+ rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
rSh.SetAttr(SvxAdjustItem(SVX_ADJUST_CENTER,RES_PARATR_ADJUST ));
- if(GRFILTER_OK == GetView().InsertGraphic(sPath, aEmptyStr, TRUE, 0, 0 ))
- bRet = TRUE;
+ if(GRFILTER_OK == GetView().InsertGraphic(sPath, aEmptyStr, sal_True, 0, 0 ))
+ bRet = sal_True;
rSh.EnterStdMode();
- rSh.Right(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.Right(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
}
rSh.EndAllAction();
rSh.EndUndo(UNDO_UI_INSERT_RULER);
@@ -776,18 +741,18 @@ bool lcl_IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect )
void SwTextShell::StateInsert( SfxItemSet &rSet )
{
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
SfxWhichIter aIter( rSet );
SwWrtShell &rSh = GetShell();
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
SvtModuleOptions aMOpt;
SfxObjectCreateMode eCreateMode =
GetView().GetDocShell()->GetCreateMode();
rSh.Push();
- const BOOL bCrsrInHidden = rSh.SelectHiddenRange();
+ const sal_Bool bCrsrInHidden = rSh.SelectHiddenRange();
// --> OD 2009-08-05 #i103839#, #b6855246#
- // Do not call method <SwCrsrShell::Pop(..)> with 1st parameter = <FALSE>
+ // Do not call method <SwCrsrShell::Pop(..)> with 1st parameter = <sal_False>
// in order to avoid that the view jumps to the visible cursor.
rSh.Pop();
// <--
@@ -826,13 +791,8 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
case SID_INSERT_FLOATINGFRAME:
case SID_INSERT_OBJECT:
case SID_INSERT_PLUGIN:
- case SID_INSERT_APPLET:
{
- if(
-#ifndef SOLAR_JAVA
- nWhich == SID_INSERT_APPLET ||
-#endif
- eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden )
+ if( eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden )
{
rSet.DisableItem( nWhich );
}
@@ -841,7 +801,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
else if(SID_INSERT_FLOATINGFRAME == nWhich && nHtmlMode&HTMLMODE_ON)
{
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
- USHORT nExport = pHtmlOpt->GetExportMode();
+ sal_uInt16 nExport = pHtmlOpt->GetExportMode();
if(HTML_CFG_MSIE_40 != nExport && HTML_CFG_WRITER != nExport )
rSet.DisableItem(nWhich);
}
@@ -862,7 +822,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
SvxHyperlinkItem aHLinkItem;
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, FALSE, &pItem))
+ if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, sal_False, &pItem))
{
const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*)pItem;
aHLinkItem.SetURL(pINetFmt->GetValue());
@@ -883,7 +843,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
// Text des Links besorgen
rSh.StartAction();
rSh.CreateCrsr();
- rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT,TRUE);
+ rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT,sal_True);
String sLinkName = rSh.GetSelTxt();
aHLinkItem.SetName(sLinkName);
aHLinkItem.SetInsertMode(HLINK_FIELD);
@@ -928,7 +888,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
if( bDisable )
{
const SwSection* pCurrSection = rSh.GetCurrSection();
- USHORT nFullSectCnt = rSh.GetFullSelectedSectionCount();
+ sal_uInt16 nFullSectCnt = rSh.GetFullSelectedSectionCount();
if( pCurrSection && ( !rSh.HasSelection() || 0 != nFullSectCnt ))
bDisable = false;
else if(
@@ -1054,14 +1014,14 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if( pArgs )
- pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), sal_False, &pItem);
String aChars, aFontName;
if ( pItem )
{
aChars = ((const SfxStringItem*)pItem)->GetValue();
const SfxPoolItem* pFtItem = NULL;
- pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem);
+ pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), sal_False, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
aFontName = pFontItem->GetValue();
@@ -1073,19 +1033,19 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_FONT,
0 );
rSh.GetCurAttr( aSet );
- USHORT nScript = rSh.GetScriptType();
+ sal_uInt16 nScript = rSh.GetScriptType();
SvxFontItem aFont( RES_CHRATR_FONT );
{
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, *aSet.GetPool() );
- aSetItem.GetItemSet().Put( aSet, FALSE );
+ aSetItem.GetItemSet().Put( aSet, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript );
if( pI )
aFont = *(SvxFontItem*)pI;
else
aFont = (SvxFontItem&)aSet.Get( GetWhichOfScript(
RES_CHRATR_FONT,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) ));
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ) ));
if (!aFontName.Len())
aFontName = aFont.GetFamilyName();
}
@@ -1095,7 +1055,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
{
// Eingestellten Font als Default
SfxAllItemSet aAllSet( rSh.GetAttrPool() );
- aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) );
SwViewOption aOpt(*GetShell().GetViewOptions());
String sSymbolFont = aOpt.GetSymbolFont();
@@ -1109,8 +1069,8 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
if( RET_OK == pDlg->Execute() )
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE );
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, sal_False );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False );
if ( pFontItem )
{
aNewFont.SetName( pFontItem->GetFamilyName() );
@@ -1146,14 +1106,14 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
rSh.GetCurAttr( aSet );
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, *aSet.GetPool() );
- aSetItem.GetItemSet().Put( aSet, FALSE );
+ aSetItem.GetItemSet().Put( aSet, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript );
if( pI )
aFont = *(SvxFontItem*)pI;
else
aFont = (SvxFontItem&)aSet.Get( GetWhichOfScript(
RES_CHRATR_FONT,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) ));
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ) ));
}
// Zeichen einfuegen
@@ -1175,22 +1135,22 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
nScript = pBreakIt->GetAllScriptsOfText( aChars );
if( SCRIPTTYPE_LATIN & nScript )
{
- aRestoreSet.Put( aSet.Get( RES_CHRATR_FONT, TRUE ) );
+ aRestoreSet.Put( aSet.Get( RES_CHRATR_FONT, sal_True ) );
aSet.Put( aNewFontItem, RES_CHRATR_FONT);
}
if( SCRIPTTYPE_ASIAN & nScript )
{
- aRestoreSet.Put( aSet.Get( RES_CHRATR_CJK_FONT, TRUE ) );
+ aRestoreSet.Put( aSet.Get( RES_CHRATR_CJK_FONT, sal_True ) );
aSet.Put( aNewFontItem, RES_CHRATR_CJK_FONT );
}
if( SCRIPTTYPE_COMPLEX & nScript )
{
- aRestoreSet.Put( aSet.Get( RES_CHRATR_CTL_FONT, TRUE ) );
+ aRestoreSet.Put( aSet.Get( RES_CHRATR_CTL_FONT, sal_True ) );
aSet.Put( aNewFontItem, RES_CHRATR_CTL_FONT );
}
rSh.SetMark();
- rSh.ExtendSelection( FALSE, aChars.Len() );
+ rSh.ExtendSelection( sal_False, aChars.Len() );
rSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND | nsSetAttrMode::SETATTR_NOFORMATATTR );
if( !rSh.IsCrsrPtAtEnd() )
rSh.SwapPam();
@@ -1210,7 +1170,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
}
rSh.EndAllAction();
- rSh.EndUndo( UNDO_INSERT );
+ rSh.EndUndo();
if ( aChars.Len() )
{
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index 4bb1808b01bf..c987ba495d1f 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -126,15 +126,15 @@
#include <view.hxx>
#include <ndtxt.hxx>
#include <pam.hxx>
-
+#include <sfx2/objface.hxx>
#include <langhelper.hxx>
using namespace ::com::sun::star;
-void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const SfxItemSet *pArgs, SfxRequest *pReq )
+void lcl_CharDialog( SwWrtShell &rWrtSh, sal_Bool bUseDialog, sal_uInt16 nSlot,const SfxItemSet *pArgs, SfxRequest *pReq )
{
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rWrtSh.GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SfxItemSet aCoreSet( rWrtSh.GetView().GetPool(),
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
@@ -144,8 +144,8 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
SID_ATTR_CHAR_WIDTH_FIT_TO_LINE, SID_ATTR_CHAR_WIDTH_FIT_TO_LINE,
0 );
rWrtSh.GetCurAttr( aCoreSet );
- BOOL bSel = rWrtSh.HasSelection();
- BOOL bSelectionPut = FALSE;
+ sal_Bool bSel = rWrtSh.HasSelection();
+ sal_Bool bSelectionPut = sal_False;
if(bSel || rWrtSh.IsInWord())
{
if(!bSel)
@@ -156,10 +156,10 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
rWrtSh.SelWrd();
}
aCoreSet.Put(SfxStringItem(FN_PARAM_SELECTION, rWrtSh.GetSelTxt()));
- bSelectionPut = TRUE;
+ bSelectionPut = sal_True;
if(!bSel)
{
- rWrtSh.Pop(FALSE);
+ rWrtSh.Pop(sal_False);
rWrtSh.EndAction();
}
}
@@ -168,7 +168,7 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
// Das CHRATR_BACKGROUND-Attribut wird fuer den Dialog in
// ein RES_BACKGROUND verwandelt und wieder zurueck ...
const SfxPoolItem *pTmpBrush;
- if( SFX_ITEM_SET == aCoreSet.GetItemState( RES_CHRATR_BACKGROUND, TRUE, &pTmpBrush ) )
+ if( SFX_ITEM_SET == aCoreSet.GetItemState( RES_CHRATR_BACKGROUND, sal_True, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_BACKGROUND );
@@ -199,7 +199,7 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
if ( pSet)
{
SfxItemSet aTmpSet( *pSet );
- if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND, FALSE, &pTmpBrush ) )
+ if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND, sal_False, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND );
@@ -209,11 +209,11 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
aTmpSet.ClearItem( RES_BACKGROUND );
const SfxPoolItem* pSelectionItem;
- BOOL bInsert = FALSE;
+ sal_Bool bInsert = sal_False;
xub_StrLen nInsert = 0;
// aus ungeklaerter Ursache ist das alte Item wieder im Set
- if( !bSelectionPut && SFX_ITEM_SET == aTmpSet.GetItemState(FN_PARAM_SELECTION, FALSE, &pSelectionItem) )
+ if( !bSelectionPut && SFX_ITEM_SET == aTmpSet.GetItemState(FN_PARAM_SELECTION, sal_False, &pSelectionItem) )
{
String sInsert = ((const SfxStringItem*)pSelectionItem)->GetValue();
bInsert = sInsert.Len() != 0;
@@ -223,13 +223,13 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
rWrtSh.StartAction();
rWrtSh.Insert( sInsert );
rWrtSh.SetMark();
- rWrtSh.ExtendSelection(FALSE, sInsert.Len());
+ rWrtSh.ExtendSelection(sal_False, sInsert.Len());
SfxRequest aReq( rWrtSh.GetView().GetViewFrame(), FN_INSERT_STRING );
aReq.AppendItem( SfxStringItem( FN_INSERT_STRING, sInsert ) );
aReq.Done();
SfxRequest aReq1( rWrtSh.GetView().GetViewFrame(), FN_CHAR_LEFT );
aReq1.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nInsert) );
- aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, TRUE) );
+ aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, sal_True) );
aReq1.Done();
}
}
@@ -248,7 +248,7 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
{
SfxRequest aReq1( rWrtSh.GetView().GetViewFrame(), FN_CHAR_RIGHT );
aReq1.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nInsert) );
- aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, FALSE) );
+ aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, sal_False) );
aReq1.Done();
rWrtSh.SwapPam();
rWrtSh.ClearMark();
@@ -266,7 +266,7 @@ short lcl_AskRedlineMode(Window *pWin)
String( SW_RES( STR_REDLINE_TITLE ) ),
String( SW_RES( STR_REDLINE_MSG ) ) );
aQBox.SetImage( QueryBox::GetStandardImage() );
- USHORT nBtnFlags = BUTTONDIALOG_DEFBUTTON |
+ sal_uInt16 nBtnFlags = BUTTONDIALOG_DEFBUTTON |
BUTTONDIALOG_OKBUTTON |
BUTTONDIALOG_FOCUSBUTTON;
@@ -283,13 +283,13 @@ short lcl_AskRedlineMode(Window *pWin)
void SwTextShell::Execute(SfxRequest &rReq)
{
- BOOL bUseDialog = TRUE;
+ sal_Bool bUseDialog = sal_True;
const SfxItemSet *pArgs = rReq.GetArgs();
SwWrtShell& rWrtSh = GetShell();
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
switch( nSlot )
{
case SID_LANGUAGE_STATUS:
@@ -324,7 +324,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
//!! due to the selection changes coming below.
rWrtSh.StartAction();
// prevent view from jumping because of (temporary) selection changes
- rWrtSh.LockView( TRUE );
+ rWrtSh.LockView( sal_True );
// save selection for later restoration
rWrtSh.Push();
@@ -383,9 +383,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
// restore selection...
- rWrtSh.Pop( FALSE );
+ rWrtSh.Pop( sal_False );
- rWrtSh.LockView( FALSE );
+ rWrtSh.LockView( sal_False );
rWrtSh.EndAction();
}
@@ -426,19 +426,19 @@ void SwTextShell::Execute(SfxRequest &rReq)
SFX_REQUEST_ARG( rReq, pNameItem, SfxStringItem, nSlot , sal_False );
if ( pNameItem )
aStr = pNameItem->GetValue();
- BOOL bFont = pFont && pFont->GetValue().Len();
+ sal_Bool bFont = pFont && pFont->GetValue().Len();
rWrtSh.StartUndo( UNDO_UI_INSERT_FOOTNOTE );
rWrtSh.InsertFootnote( aStr, nSlot == FN_INSERT_ENDNOTE, !bFont );
if ( bFont )
{
- rWrtSh.Left( CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ rWrtSh.Left( CRSR_SKIP_CHARS, sal_True, 1, sal_False );
SfxItemSet aSet( rWrtSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
rWrtSh.GetCurAttr( aSet );
SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT );
SvxFontItem aFont( rFont.GetFamily(), pFont->GetValue(),
rFont.GetStyleName(), rFont.GetPitch(), RTL_TEXTENCODING_DONTKNOW, RES_CHRATR_FONT );
rWrtSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
- rWrtSh.ResetSelect(0, FALSE);
+ rWrtSh.ResetSelect(0, sal_False);
rWrtSh.EndSelect();
rWrtSh.GotoFtnTxt();
}
@@ -451,12 +451,12 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg( DLG_INS_FOOTNOTE,
- GetView().GetWindow(), rWrtSh, FALSE );
+ GetView().GetWindow(), rWrtSh, sal_False );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
- pDlg->SetHelpId(nSlot);
+ pDlg->SetHelpId(GetStaticInterface()->GetSlot(nSlot)->GetCommand());
if ( pDlg->Execute() == RET_OK )
{
- USHORT nId = pDlg->IsEndNote() ? FN_INSERT_ENDNOTE : FN_INSERT_FOOTNOTE;
+ sal_uInt16 nId = pDlg->IsEndNote() ? FN_INSERT_ENDNOTE : FN_INSERT_FOOTNOTE;
SfxRequest aReq( GetView().GetViewFrame(), nId );
if ( pDlg->GetStr().Len() )
aReq.AppendItem( SfxStringItem( nId, pDlg->GetStr() ) );
@@ -492,7 +492,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
// remove the languages from that)
SvUShortsSort aAttribs;
- USHORT aResetableSetRange[] = {
+ sal_uInt16 aResetableSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_LANGUAGE - 1,
RES_CHRATR_LANGUAGE + 1, RES_CHRATR_CJK_LANGUAGE - 1,
@@ -504,12 +504,12 @@ void SwTextShell::Execute(SfxRequest &rReq)
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
- USHORT *pUShorts = aResetableSetRange;
+ sal_uInt16 *pUShorts = aResetableSetRange;
while (*pUShorts)
{
- USHORT nL = pUShorts[1] - pUShorts[0] + 1;
- USHORT nE = pUShorts[0];
- for (USHORT i = 0; i < nL; ++i)
+ sal_uInt16 nL = pUShorts[1] - pUShorts[0] + 1;
+ sal_uInt16 nE = pUShorts[0];
+ for (sal_uInt16 i = 0; i < nL; ++i)
aAttribs.Insert( nE++ );
pUShorts += 2;
}
@@ -520,7 +520,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
case FN_INSERT_BREAK_DLG:
{
- USHORT nKind=0, nPageNumber=0;
+ sal_uInt16 nKind=0, nPageNumber=0;
String aTemplateName;
if ( pItem )
{
@@ -605,11 +605,11 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_AUTOFORMAT_REDLINE_APPLY:
{
SvxSwAutoFmtFlags aFlags(SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags());
- // das muss fuer die Nachbearbeitung immer FALSE sein
- aFlags.bAFmtByInput = FALSE;
- aFlags.bWithRedlining = TRUE;
+ // das muss fuer die Nachbearbeitung immer sal_False sein
+ aFlags.bAFmtByInput = sal_False;
+ aFlags.bWithRedlining = sal_True;
rWrtSh.AutoFormat( &aFlags );
- aFlags.bWithRedlining = FALSE;
+ aFlags.bWithRedlining = sal_False;
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if (pVFrame->HasChildWindow(FN_REDLINE_ACCEPT))
@@ -625,7 +625,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
case RET_OK:
{
- pDlg->AcceptAll(TRUE);
+ pDlg->AcceptAll(sal_True);
SfxRequest aReq( pVFrame, FN_AUTOFORMAT_APPLY );
aReq.Done();
rReq.Ignore();
@@ -633,7 +633,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
case RET_CANCEL:
- pDlg->AcceptAll(FALSE);
+ pDlg->AcceptAll(sal_False);
rReq.Ignore();
break;
@@ -649,8 +649,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_AUTOFORMAT_APPLY:
{
SvxSwAutoFmtFlags aFlags(SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags());
- // das muss fuer die Nachbearbeitung immer FALSE sein
- aFlags.bAFmtByInput = FALSE;
+ // das muss fuer die Nachbearbeitung immer sal_False sein
+ aFlags.bAFmtByInput = sal_False;
rWrtSh.AutoFormat( &aFlags );
rReq.Done();
}
@@ -658,7 +658,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_AUTOFORMAT_AUTO:
{
SvxAutoCorrCfg* pACfg = SvxAutoCorrCfg::Get();
- BOOL bSet = pItem ? ((const SfxBoolItem*)pItem)->GetValue() : !pACfg->IsAutoFmtByInput();
+ sal_Bool bSet = pItem ? ((const SfxBoolItem*)pItem)->GetValue() : !pACfg->IsAutoFmtByInput();
if( bSet != pACfg->IsAutoFmtByInput() )
{
pACfg->SetAutoFmtByInput( bSet );
@@ -729,7 +729,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
break;
case FN_EDIT_FORMULA:
{
- const USHORT nId = SwInputChild::GetChildWindowId();
+ const sal_uInt16 nId = SwInputChild::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if(pItem)
{
@@ -737,13 +737,13 @@ void SwTextShell::Execute(SfxRequest &rReq)
if( pVFrame->HasChildWindow( nId ) )
{
pVFrame->ToggleChildWindow( nId );
- pVFrame->GetBindings().InvalidateAll( TRUE );
+ pVFrame->GetBindings().InvalidateAll( sal_True );
}
String sFormula(((const SfxStringItem*)pItem)->GetValue());
SwFldMgr aFldMgr;
rWrtSh.StartAllAction();
- BOOL bDelSel;
+ sal_Bool bDelSel;
if( 0 != (bDelSel = rWrtSh.HasSelection()) )
{
rWrtSh.StartUndo( UNDO_START );
@@ -768,7 +768,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
else
{
SvNumberFormatter* pFormatter = rWrtSh.GetNumberFormatter();
- ULONG nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_STANDARD, LANGUAGE_SYSTEM);
+ sal_uLong nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_STANDARD, LANGUAGE_SYSTEM);
SwInsertFld_Data aData(TYP_FORMELFLD, nsSwGetSetExpType::GSE_FORMULA, aEmptyStr, sFormula, nSysNumFmt);
aFldMgr.InsertFld(aData);
}
@@ -784,7 +784,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
rWrtSh.EndAllTblBoxEdit();
pVFrame->ToggleChildWindow( nId );
if( !pVFrame->HasChildWindow( nId ) )
- pVFrame->GetBindings().InvalidateAll( TRUE );
+ pVFrame->GetBindings().InvalidateAll( sal_True );
rReq.Ignore();
}
}
@@ -800,7 +800,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
break;
case FN_REMOVE_HYPERLINK:
{
- BOOL bSel = rWrtSh.HasSelection();
+ sal_Bool bSel = rWrtSh.HasSelection();
if(!bSel)
{
rWrtSh.StartAction();
@@ -814,7 +814,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
rWrtSh.ResetAttr( &aAttribs );
if(!bSel)
{
- rWrtSh.Pop(FALSE);
+ rWrtSh.Pop(sal_False);
rWrtSh.EndAction();
}
}
@@ -825,9 +825,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_TXTATR_INET :
case FN_INSERT_HYPERLINK:
{
- USHORT nWhich = GetPool().GetWhich( nSlot );
+ sal_uInt16 nWhich = GetPool().GetWhich( nSlot );
if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET )
- bUseDialog = FALSE;
+ bUseDialog = sal_False;
// intentionally no break
}
case SID_CHAR_DLG:
@@ -840,7 +840,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
rWrtSh.Push(); //save current cursor
SwLangHelper::SelectCurrentPara( rWrtSh );
lcl_CharDialog( rWrtSh, bUseDialog, nSlot, pArgs, &rReq );
- rWrtSh.Pop( FALSE ); //restore old cursor
+ rWrtSh.Pop( sal_False ); //restore old cursor
}
break;
case SID_ATTR_LRSPACE :
@@ -856,18 +856,18 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_FORMAT_DROPCAPS :
case FN_DROP_TEXT:
{
- USHORT nWhich = GetPool().GetWhich( nSlot );
+ sal_uInt16 nWhich = GetPool().GetWhich( nSlot );
if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET )
- bUseDialog = FALSE;
+ bUseDialog = sal_False;
// intentionally no break
}
case SID_PARA_DLG:
{
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
- BOOL bApplyCharUnit = ::HasCharUnit(0 != PTR_CAST(SwWebView, &GetView()));
+ sal_Bool bApplyCharUnit = ::HasCharUnit(0 != PTR_CAST(SwWebView, &GetView()));
SW_MOD()->PutItem(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, bApplyCharUnit));
SfxItemSet aCoreSet( GetPool(),
@@ -894,7 +894,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&)
GetPool().GetDefaultItem(RES_PARATR_TABSTOP);
- USHORT nDefDist = ::GetTabDist( rDefTabs );
+ sal_uInt16 nDefDist = ::GetTabDist( rDefTabs );
SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist );
aCoreSet.Put( aDefDistItem );
@@ -915,7 +915,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
//aktuelles Seitenformat
::SwToSfxPageDescAttr( aCoreSet );
- UINT16 nDefPage = 0;
+ sal_uInt16 nDefPage = 0;
if( pItem )
nDefPage = ((SfxUInt16Item *)pItem)->GetValue();
@@ -935,7 +935,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet,DLG_STD, DLG_PARA,NULL, FALSE, nDefPage );
+ pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet,DLG_STD, DLG_PARA,NULL, sal_False, nDefPage );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
}
SfxItemSet* pSet = NULL;
@@ -948,8 +948,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
// Defaults evtl umsetzen
pSet = (SfxItemSet*)pDlg->GetOutputItemSet();
- USHORT nNewDist;
- if( SFX_ITEM_SET == pSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, FALSE, &pItem ) &&
+ sal_uInt16 nNewDist;
+ if( SFX_ITEM_SET == pSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, sal_False, &pItem ) &&
nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) )
{
SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
@@ -958,13 +958,13 @@ void SwTextShell::Execute(SfxRequest &rReq)
pSet->ClearItem( SID_ATTR_TABSTOP_DEFAULTS );
}
- if ( SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_1,FALSE,&pItem) )
+ if ( SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_1,sal_False,&pItem) )
{
pSet->Put(SfxStringItem(FN_DROP_TEXT, ((const SfxStringItem*)pItem)->GetValue()));
pSet->ClearItem(FN_PARAM_1);
}
- if( SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_DROP, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_DROP, sal_False, &pItem ))
{
String sCharStyleName;
if(((const SwFmtDrop*)pItem)->GetCharFmt())
@@ -991,7 +991,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
if( pSet->Count() )
{
rWrtSh.StartAction();
- if ( SFX_ITEM_SET == pSet->GetItemState(FN_DROP_TEXT, FALSE, &pItem) )
+ if ( SFX_ITEM_SET == pSet->GetItemState(FN_DROP_TEXT, sal_False, &pItem) )
{
if ( ((SfxStringItem*)pItem)->GetValue().Len() )
rWrtSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue());
@@ -1007,17 +1007,17 @@ void SwTextShell::Execute(SfxRequest &rReq)
if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART) )
{
- //SetNumRuleStart(TRUE) restarts the numbering at the value
+ //SetNumRuleStart(sal_True) restarts the numbering at the value
//that is defined at the starting point of the numbering level
//otherwise the SetNodeNumStart() value determines the start
//if it's set to something different than USHRT_MAX
- BOOL bStart = ((SfxBoolItem&)pSet->Get(FN_NUMBER_NEWSTART)).GetValue();
+ sal_Bool bStart = ((SfxBoolItem&)pSet->Get(FN_NUMBER_NEWSTART)).GetValue();
// --> OD 2007-06-11 #b6560525#
// Default value for restart value has to be USHRT_MAX
// in order to indicate that the restart value of the list
// style has to be used on restart.
- USHORT nNumStart = USHRT_MAX;
+ sal_uInt16 nNumStart = USHRT_MAX;
// <--
if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
{
@@ -1028,9 +1028,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
else if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
{
- USHORT nNumStart = ((SfxUInt16Item&)pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
+ sal_uInt16 nNumStart = ((SfxUInt16Item&)pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
rWrtSh.SetNodeNumStart(nNumStart);
- rWrtSh.SetNumRuleStart(FALSE);
+ rWrtSh.SetNumRuleStart(sal_False);
}
// --> OD 2006-12-06 #i56253#
if ( bUndoNeeded )
@@ -1064,10 +1064,10 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_SELECT_PARA:
{
if(!rWrtSh.IsSttOfPara())
- rWrtSh.SttPara(FALSE);
+ rWrtSh.SttPara(sal_False);
else
rWrtSh.EnterStdMode();
- rWrtSh.EndPara(TRUE);
+ rWrtSh.EndPara(sal_True);
}
break;
@@ -1139,7 +1139,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwEditWin& rEdtWin = GetView().GetEditWin();
SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
SwApplyTemplate aTempl;
- BOOL bSelection = rWrtSh.HasSelection();
+ sal_Bool bSelection = rWrtSh.HasSelection();
if(bSelection)
{
@@ -1189,8 +1189,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
String sStyleName;
if(pItem)
sStyleName = ((const SfxStringItem*)pItem)->GetValue();
- BOOL bOn = TRUE;
- if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem))
+ sal_Bool bOn = sal_True;
+ if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem))
bOn = ((const SfxBoolItem*)pItem)->GetValue();
ChangeHeaderOrFooter(sStyleName, FN_INSERT_PAGEHEADER == nSlot, bOn, !rReq.IsAPI());
rReq.Done();
@@ -1208,7 +1208,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_SELECTION_MODE_BLOCK :
{
bool bSetBlockMode = !rWrtSh.IsBlockMode();
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem))
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem))
bSetBlockMode = ((const SfxBoolItem*)pItem)->GetValue();
if( ( nSlot == FN_SELECTION_MODE_DEFAULT ) ^ bSetBlockMode )
rWrtSh.EnterBlockMode();
@@ -1226,9 +1226,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
RES_TXTATR_INETFMT,
RES_TXTATR_INETFMT);
rWrtSh.GetCurAttr(aSet);
- if(SFX_ITEM_SET <= aSet.GetItemState( RES_TXTATR_INETFMT, TRUE ))
+ if(SFX_ITEM_SET <= aSet.GetItemState( RES_TXTATR_INETFMT, sal_True ))
{
- const SwFmtINetFmt& rINetFmt = dynamic_cast<const SwFmtINetFmt&>( aSet.Get(RES_TXTATR_INETFMT, TRUE) );
+ const SwFmtINetFmt& rINetFmt = dynamic_cast<const SwFmtINetFmt&>( aSet.Get(RES_TXTATR_INETFMT, sal_True) );
if( nSlot == FN_COPY_HYPERLINK_LOCATION )
{
::uno::Reference< datatransfer::clipboard::XClipboard > xClipboard = GetView().GetEditWin().GetClipboard();
@@ -1283,7 +1283,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwDocStat aCurr;
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
{
- SwWait aWait( *GetView().GetDocShell(), TRUE );
+ SwWait aWait( *GetView().GetDocShell(), sal_True );
rSh.StartAction();
rSh.CountWords( aCurr );
rSh.UpdateDocStat( aDocStat );
@@ -1308,7 +1308,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
{
SwWrtShell &rSh = GetShell();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch ( nWhich )
@@ -1403,15 +1403,15 @@ void SwTextShell::GetState( SfxItemSet &rSet )
case FN_INSERT_FOOTNOTE:
case FN_INSERT_FOOTNOTE_DLG:
{
- const USHORT nNoType = FRMTYPE_FLY_ANY | FRMTYPE_HEADER |
+ const sal_uInt16 nNoType = FRMTYPE_FLY_ANY | FRMTYPE_HEADER |
FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE;
- if ( (rSh.GetFrmType(0,TRUE) & nNoType) )
+ if ( (rSh.GetFrmType(0,sal_True) & nNoType) )
rSet.DisableItem(nWhich);
}
break;
case FN_INSERT_TABLE:
if ( rSh.GetTableFmt() ||
- (rSh.GetFrmType(0,TRUE) & FRMTYPE_FOOTNOTE) )
+ (rSh.GetFrmType(0,sal_True) & FRMTYPE_FOOTNOTE) )
rSet.DisableItem( nWhich );
break;
@@ -1433,17 +1433,17 @@ void SwTextShell::GetState( SfxItemSet &rSet )
break;
case FN_GLOSSARY_DLG:
{
- rSet.Put(SfxBoolItem(nWhich), TRUE);
+ rSet.Put(SfxBoolItem(nWhich), sal_True);
}
break;
case SID_DEC_INDENT:
case SID_INC_INDENT:
{
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES;
if( (nHtmlMode == HTMLMODE_ON) || !rSh.IsMoveLeftMargin(
- SID_INC_INDENT == nWhich, TRUE ))
+ SID_INC_INDENT == nWhich, sal_True ))
rSet.DisableItem( nWhich );
}
break;
@@ -1451,11 +1451,11 @@ void SwTextShell::GetState( SfxItemSet &rSet )
case FN_DEC_INDENT_OFFSET:
case FN_INC_INDENT_OFFSET:
{
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES;
if( (nHtmlMode == HTMLMODE_ON) ||
!rSh.IsMoveLeftMargin( FN_INC_INDENT_OFFSET == nWhich,
- FALSE ))
+ sal_False ))
rSet.DisableItem( nWhich );
}
break;
@@ -1493,8 +1493,8 @@ void SwTextShell::GetState( SfxItemSet &rSet )
rSet.Put( SfxObjectShellItem( nWhich, GetView().GetDocShell() ));
#else
// Seitenvorlagen besorgen
- BOOL bFound = FALSE;
- USHORT n, nCnt = rSh.GetPageDescCnt();
+ sal_Bool bFound = sal_False;
+ sal_uInt16 n, nCnt = rSh.GetPageDescCnt();
for( n = 0; n < nCnt; ++n )
{
const SwPageDesc& rDesc = rSh.GetPageDesc( n );
@@ -1502,7 +1502,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
? !rDesc.GetMaster().GetHeader().IsActive()
: !rDesc.GetMaster().GetFooter().IsActive() )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -1549,7 +1549,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
RES_TXTATR_INETFMT,
RES_TXTATR_INETFMT);
rSh.GetCurAttr(aSet);
- if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, TRUE ) || rSh.HasReadonlySel())
+ if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, sal_True ) || rSh.HasReadonlySel())
{
rSet.DisableItem(nWhich);
}
@@ -1563,7 +1563,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
rSh.GetCurAttr(aSet);
// If a hyperlink is selected, either alone or along with other text...
- if( ((SFX_ITEM_DONTCARE & aSet.GetItemState( RES_TXTATR_INETFMT, TRUE )) == 0) || rSh.HasReadonlySel())
+ if( ((SFX_ITEM_DONTCARE & aSet.GetItemState( RES_TXTATR_INETFMT, sal_True )) == 0) || rSh.HasReadonlySel())
{
rSet.DisableItem(nWhich);
}
@@ -1602,7 +1602,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
RES_TXTATR_INETFMT,
RES_TXTATR_INETFMT);
rSh.GetCurAttr(aSet);
- if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, FALSE ))
+ if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, sal_False ))
rSet.DisableItem(nWhich);
}
break;
@@ -1685,18 +1685,18 @@ void SwTextShell::GetState( SfxItemSet &rSet )
given all styles are changed
---------------------------------------------------------------------------*/
void SwTextShell::ChangeHeaderOrFooter(
- const String& rStyleName, BOOL bHeader, BOOL bOn, BOOL bShowWarning)
+ const String& rStyleName, sal_Bool bHeader, sal_Bool bOn, sal_Bool bShowWarning)
{
SwWrtShell& rSh = GetShell();
rSh.addCurrentPosition();
rSh.StartAllAction();
rSh.StartUndo( UNDO_HEADER_FOOTER ); // #i7983#
- BOOL bExecute = TRUE;
- BOOL bCrsrSet = FALSE;
- for( USHORT nFrom = 0, nTo = rSh.GetPageDescCnt();
+ sal_Bool bExecute = sal_True;
+ sal_Bool bCrsrSet = sal_False;
+ for( sal_uInt16 nFrom = 0, nTo = rSh.GetPageDescCnt();
nFrom < nTo; ++nFrom )
{
- int bChgd = FALSE;
+ int bChgd = sal_False;
SwPageDesc aDesc( rSh.GetPageDesc( nFrom ));
String sTmp(aDesc.GetName());
if( !rStyleName.Len() || rStyleName == sTmp )
@@ -1705,19 +1705,19 @@ void SwTextShell::ChangeHeaderOrFooter(
(bHeader && aDesc.GetMaster().GetHeader().IsActive())) ||
(!bHeader && aDesc.GetMaster().GetFooter().IsActive()))
{
- bShowWarning = FALSE;
+ bShowWarning = sal_False;
//Actions have to be closed while the dialog is showing
rSh.EndAllAction();
Window* pParent = &GetView().GetViewFrame()->GetWindow();
- BOOL bRet = RET_YES == QueryBox( pParent, ResId( RID_SVXQBX_DELETE_HEADFOOT,
+ sal_Bool bRet = RET_YES == QueryBox( pParent, ResId( RID_SVXQBX_DELETE_HEADFOOT,
DIALOG_MGR() ) ).Execute();
bExecute = bRet;
rSh.StartAllAction();
}
if( bExecute )
{
- bChgd = TRUE;
+ bChgd = sal_True;
SwFrmFmt &rMaster = aDesc.GetMaster();
if(bHeader)
rMaster.SetFmtAttr( SwFmtHeader( bOn ));
diff --git a/sw/source/ui/shells/textsh2.cxx b/sw/source/ui/shells/textsh2.cxx
index c54c4a7da7fa..00f0b25c8f7c 100644
--- a/sw/source/ui/shells/textsh2.cxx
+++ b/sw/source/ui/shells/textsh2.cxx
@@ -101,7 +101,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
{
const SfxItemSet *pArgs = rReq.GetArgs();
SwNewDBMgr* pNewDBMgr = GetShell().GetNewDBMgr();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
::rtl::OUString sSourceArg, sCommandArg;
sal_Int32 nCommandTypeArg = 0;
@@ -113,29 +113,29 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
const SfxPoolItem* pSelectionItem = 0;
// first get the selection of rows to be inserted
- pArgs->GetItemState(FN_DB_DATA_SELECTION_ANY, FALSE, &pSelectionItem);
+ pArgs->GetItemState(FN_DB_DATA_SELECTION_ANY, sal_False, &pSelectionItem);
Sequence<Any> aSelection;
if(pSelectionItem)
((SfxUsrAnyItem*)pSelectionItem)->GetValue() >>= aSelection;
// get the data source name
- pArgs->GetItemState(FN_DB_DATA_SOURCE_ANY, FALSE, &pSourceItem);
+ pArgs->GetItemState(FN_DB_DATA_SOURCE_ANY, sal_False, &pSourceItem);
if(pSourceItem)
((const SfxUsrAnyItem*)pSourceItem)->GetValue() >>= sSourceArg;
// get the command
- pArgs->GetItemState(FN_DB_DATA_COMMAND_ANY, FALSE, &pCommandItem);
+ pArgs->GetItemState(FN_DB_DATA_COMMAND_ANY, sal_False, &pCommandItem);
if(pCommandItem)
((const SfxUsrAnyItem*)pCommandItem)->GetValue() >>= sCommandArg;
// get the command type
- pArgs->GetItemState(FN_DB_DATA_COMMAND_TYPE_ANY, FALSE, &pCommandTypeItem);
+ pArgs->GetItemState(FN_DB_DATA_COMMAND_TYPE_ANY, sal_False, &pCommandTypeItem);
if(pCommandTypeItem)
((const SfxUsrAnyItem*)pCommandTypeItem)->GetValue() >>= nCommandTypeArg;
Reference<XConnection> xConnection;
- pArgs->GetItemState(FN_DB_CONNECTION_ANY, FALSE, &pConnectionItem);
+ pArgs->GetItemState(FN_DB_CONNECTION_ANY, sal_False, &pConnectionItem);
if ( pConnectionItem )
((const SfxUsrAnyItem*)pConnectionItem)->GetValue() >>= xConnection;
// may be we even get no connection
@@ -149,7 +149,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
// get the cursor, we use to travel, may be NULL
Reference<XResultSet> xCursor;
- pArgs->GetItemState(FN_DB_DATA_CURSOR_ANY, FALSE, &pCursorItem);
+ pArgs->GetItemState(FN_DB_DATA_CURSOR_ANY, sal_False, &pCursorItem);
if ( pCursorItem )
((const SfxUsrAnyItem*)pCursorItem)->GetValue() >>= xCursor;
@@ -179,7 +179,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
case FN_QRY_MERGE_FIELD:
{
// we don't get any cursor, so we must create our own
- BOOL bDisposeResultSet = FALSE;
+ sal_Bool bDisposeResultSet = sal_False;
if ( !xCursor.is() )
{
xCursor = SwNewDBMgr::createCursor(sSourceArg,sCommandArg,nCommandTypeArg,xConnection);
@@ -206,8 +206,8 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
const SfxPoolItem* pColumnItem = 0;
const SfxPoolItem* pColumnNameItem = 0;
- pArgs->GetItemState(FN_DB_COLUMN_ANY, FALSE, &pColumnItem);
- pArgs->GetItemState(FN_DB_DATA_COLUMN_NAME_ANY, FALSE, &pColumnNameItem);
+ pArgs->GetItemState(FN_DB_COLUMN_ANY, sal_False, &pColumnItem);
+ pArgs->GetItemState(FN_DB_DATA_COLUMN_NAME_ANY, sal_False, &pColumnNameItem);
::rtl::OUString sColumnName;
if(pColumnNameItem)
@@ -221,7 +221,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
sDBName += (String)sColumnName;
SwFldMgr aFldMgr(GetShellPtr());
- SwInsertFld_Data aData(TYP_DBFLD, 0, sDBName, aEmptyStr, 0, FALSE, TRUE);
+ SwInsertFld_Data aData(TYP_DBFLD, 0, sDBName, aEmptyStr, 0, sal_False, sal_True);
if(pConnectionItem)
aData.aDBConnection = ((SfxUsrAnyItem*)pConnectionItem)->GetValue();
if(pColumnItem)
diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx
index 1fcc1056dea0..8732d0dbe84b 100644
--- a/sw/source/ui/shells/txtattr.cxx
+++ b/sw/source/ui/shells/txtattr.cxx
@@ -78,12 +78,12 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
const SfxItemSet *pArgs = rReq.GetArgs();
int eState = STATE_TOGGLE;
- USHORT nWhich = rReq.GetSlot();
+ sal_uInt16 nWhich = rReq.GetSlot();
if(pArgs )
{
const SfxPoolItem* pItem;
- pArgs->GetItemState(nWhich, FALSE, &pItem);
+ pArgs->GetItemState(nWhich, sal_False, &pItem);
eState = ((const SfxBoolItem &) pArgs->
Get( nWhich )).GetValue() ? STATE_ON : STATE_OFF;
}
@@ -115,10 +115,10 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
SfxBindings& rBind = GetView().GetViewFrame()->GetBindings();
if( nWhich == FN_SET_SUB_SCRIPT )
rBind.SetState( SfxBoolItem( FN_SET_SUPER_SCRIPT,
- FALSE ) );
+ sal_False ) );
else
rBind.SetState( SfxBoolItem( FN_SET_SUB_SCRIPT,
- FALSE ) );
+ sal_False ) );
}
break;
@@ -188,10 +188,10 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pArgs = rReq.GetArgs();
- BOOL bArgs = pArgs != 0 && pArgs->Count() > 0;
- int bGrow = FALSE;
+ sal_Bool bArgs = pArgs != 0 && pArgs->Count() > 0;
+ int bGrow = sal_False;
SwWrtShell& rWrtSh = GetShell();
SwTxtFmtColl* pColl = 0;
@@ -203,7 +203,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
pColl = 0;
}
SfxItemPool& rPool = GetPool();
- USHORT nWhich = rPool.GetWhich(nSlot);
+ sal_uInt16 nWhich = rPool.GetWhich(nSlot);
switch ( nSlot )
{
case FN_TXTATR_INET:
@@ -232,7 +232,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
break;
case FN_GROW_FONT_SIZE:
- bGrow = TRUE;
+ bGrow = sal_True;
// kein break !!
case FN_SHRINK_FONT_SIZE:
{
@@ -241,10 +241,10 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
SfxItemSet aAttrSet( rPool, aSetItem.GetItemSet().GetRanges() );
const SfxPoolItem* pI;
- static const USHORT aScrTypes[] = {
+ static const sal_uInt16 aScrTypes[] = {
SCRIPTTYPE_LATIN, SCRIPTTYPE_ASIAN, SCRIPTTYPE_COMPLEX, 0 };
- USHORT nScriptType = rWrtSh.GetScriptType();
- for( const USHORT* pScrpTyp = aScrTypes; *pScrpTyp; ++pScrpTyp )
+ sal_uInt16 nScriptType = rWrtSh.GetScriptType();
+ for( const sal_uInt16* pScrpTyp = aScrTypes; *pScrpTyp; ++pScrpTyp )
if( ( nScriptType & *pScrpTyp ) &&
0 != ( pI = aSetItem.GetItemOfScript( *pScrpTyp )))
{
@@ -288,7 +288,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
void SwTextShell::ExecParaAttr(SfxRequest &rReq)
{
SvxAdjust eAdjst;
- BYTE ePropL;
+ sal_uInt8 ePropL;
const SfxItemSet* pArgs = rReq.GetArgs();
// gleich beide Attribute holen, ist nicht teuerer !!
@@ -297,7 +297,7 @@ void SwTextShell::ExecParaAttr(SfxRequest &rReq)
RES_FRAMEDIR, RES_FRAMEDIR,
0 );
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch (nSlot)
{
case SID_ATTR_PARA_ADJUST:
@@ -323,7 +323,7 @@ void SwTextShell::ExecParaAttr(SfxRequest &rReq)
SET_ADJUST:
{
aSet.Put(SvxAdjustItem(eAdjst,RES_PARATR_ADJUST));
- rReq.AppendItem( SfxBoolItem( GetPool().GetWhich(nSlot), TRUE ) );
+ rReq.AppendItem( SfxBoolItem( GetPool().GetWhich(nSlot), sal_True ) );
}
break;
@@ -358,8 +358,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& )
@@ -368,7 +368,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) ?
@@ -389,7 +389,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())
@@ -403,7 +403,7 @@ SET_LINESPACE:
SwNumRule aSetRule( pCurRule->GetName(),
pCurRule->Get( 0 ).GetPositionAndSpaceMode() );
aSetRule.SetSvxRule( aRule, GetShell().GetDoc());
- aSetRule.SetAutoRule( TRUE );
+ aSetRule.SetAutoRule( sal_True );
// no start or continuation of a list - list style is only changed
GetShell().SetCurNumRule( aSetRule, false );
}
@@ -432,9 +432,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:
@@ -474,7 +474,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());
@@ -526,12 +526,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);
@@ -539,14 +539,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 &&
@@ -606,7 +606,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 );
@@ -629,7 +629,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;
@@ -668,9 +668,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();
@@ -698,10 +698,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;
}
@@ -723,10 +723,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;
}
@@ -747,7 +747,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 eca87db0fea8..2b27752741db 100644
--- a/sw/source/ui/shells/txtcrsr.cxx
+++ b/sw/source/ui/shells/txtcrsr.cxx
@@ -60,22 +60,22 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
GetView().GetEditWin().FlushInBuffer();
const SfxItemSet *pArgs = rReq.GetArgs();
- BOOL bSelect = FALSE;
- USHORT nCount = 1;
+ sal_Bool bSelect = sal_False;
+ sal_uInt16 nCount = 1;
if(pArgs)
{
const SfxPoolItem *pItem;
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_COUNT, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_COUNT, sal_True, &pItem))
nCount = ((const SfxInt16Item *)pItem)->GetValue();
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_SELECTION, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_SELECTION, sal_True, &pItem))
bSelect = ((const SfxBoolItem *)pItem)->GetValue();
}
switch(rReq.GetSlot())
{
- case FN_CHAR_LEFT_SEL: rReq.SetSlot( FN_CHAR_LEFT ); bSelect = TRUE; break;
- case FN_CHAR_RIGHT_SEL: rReq.SetSlot( FN_CHAR_RIGHT ); bSelect = TRUE; break;
- case FN_LINE_UP_SEL: rReq.SetSlot( FN_LINE_UP ); bSelect = TRUE; break;
- case FN_LINE_DOWN_SEL: rReq.SetSlot( FN_LINE_DOWN ); bSelect = TRUE; break;
+ case FN_CHAR_LEFT_SEL: rReq.SetSlot( FN_CHAR_LEFT ); bSelect = sal_True; break;
+ case FN_CHAR_RIGHT_SEL: rReq.SetSlot( FN_CHAR_RIGHT ); bSelect = sal_True; break;
+ case FN_LINE_UP_SEL: rReq.SetSlot( FN_LINE_UP ); bSelect = sal_True; break;
+ case FN_LINE_DOWN_SEL: rReq.SetSlot( FN_LINE_DOWN ); bSelect = sal_True; break;
}
uno::Reference< frame::XDispatchRecorder > xRecorder =
@@ -85,16 +85,16 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq)
rReq.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nCount) );
rReq.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, bSelect) );
}
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
rReq.Done();
// Get EditWin before calling the move functions (shell change may occur!)
SwEditWin& rTmpEditWin = GetView().GetEditWin();
- for( USHORT i = 0; i < nCount; i++ )
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
switch(nSlot)
{
- case FN_CHAR_LEFT: rSh.Left( CRSR_SKIP_CELLS, bSelect, 1, FALSE, TRUE ); break;
- case FN_CHAR_RIGHT: rSh.Right( CRSR_SKIP_CELLS, bSelect, 1, FALSE, TRUE ); break;
+ case FN_CHAR_LEFT: rSh.Left( CRSR_SKIP_CELLS, bSelect, 1, sal_False, sal_True ); break;
+ case FN_CHAR_RIGHT: rSh.Right( CRSR_SKIP_CELLS, bSelect, 1, sal_False, sal_True ); break;
case FN_LINE_UP: rSh.Up ( bSelect, 1 ); break;
case FN_LINE_DOWN: rSh.Down ( bSelect, 1 ); break;
default: OSL_FAIL("wrong Dispatcher"); return;
@@ -111,16 +111,16 @@ void SwTextShell::ExecMove(SfxRequest &rReq)
SwEditWin& rTmpEditWin = GetView().GetEditWin();
rTmpEditWin.FlushInBuffer();
- USHORT nSlot = rReq.GetSlot();
- BOOL bRet = FALSE;
+ sal_uInt16 nSlot = rReq.GetSlot();
+ sal_Bool bRet = sal_False;
switch ( nSlot )
{
case FN_START_OF_LINE_SEL:
- case FN_START_OF_LINE: bRet = rSh.LeftMargin ( FN_START_OF_LINE_SEL == nSlot, FALSE );
+ case FN_START_OF_LINE: bRet = rSh.LeftMargin ( FN_START_OF_LINE_SEL == nSlot, sal_False );
break;
case FN_END_OF_LINE_SEL:
- case FN_END_OF_LINE: bRet = rSh.RightMargin( FN_END_OF_LINE_SEL == nSlot, FALSE );
+ case FN_END_OF_LINE: bRet = rSh.RightMargin( FN_END_OF_LINE_SEL == nSlot, sal_False );
break;
case FN_START_OF_DOCUMENT_SEL:
@@ -151,7 +151,7 @@ void SwTextShell::ExecMovePage(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
GetView().GetEditWin().FlushInBuffer();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch( nSlot )
{
case FN_START_OF_NEXT_PAGE_SEL :
@@ -182,12 +182,12 @@ void SwTextShell::ExecMoveCol(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
switch ( rReq.GetSlot() )
{
- case FN_START_OF_COLUMN: rSh.StartOfColumn ( FALSE ); break;
- case FN_END_OF_COLUMN: rSh.EndOfColumn ( FALSE ); break;
- case FN_START_OF_NEXT_COLUMN: rSh.StartOfNextColumn( FALSE ) ; break;
- case FN_END_OF_NEXT_COLUMN: rSh.EndOfNextColumn ( FALSE ); break;
- case FN_START_OF_PREV_COLUMN: rSh.StartOfPrevColumn( FALSE ); break;
- case FN_END_OF_PREV_COLUMN: rSh.EndOfPrevColumn ( FALSE ); break;
+ case FN_START_OF_COLUMN: rSh.StartOfColumn ( sal_False ); break;
+ case FN_END_OF_COLUMN: rSh.EndOfColumn ( sal_False ); break;
+ case FN_START_OF_NEXT_COLUMN: rSh.StartOfNextColumn( sal_False ) ; break;
+ case FN_END_OF_NEXT_COLUMN: rSh.EndOfNextColumn ( sal_False ); break;
+ case FN_START_OF_PREV_COLUMN: rSh.StartOfPrevColumn( sal_False ); break;
+ case FN_END_OF_PREV_COLUMN: rSh.EndOfPrevColumn ( sal_False ); break;
default: OSL_FAIL("wrong dispatcher"); return;
}
rReq.Done();
@@ -198,7 +198,7 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
GetView().GetEditWin().FlushInBuffer();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case FN_NEXT_WORD_SEL:
@@ -225,10 +225,10 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq)
case FN_PREV_SENT: rSh.BwdSentence( FN_PREV_SENT_SEL == nSlot );
break;
- case FN_NEXT_PARA: rSh.FwdPara ( FALSE );
+ case FN_NEXT_PARA: rSh.FwdPara ( sal_False );
break;
- case FN_PREV_PARA: rSh.BwdPara ( FALSE );
+ case FN_PREV_PARA: rSh.BwdPara ( sal_False );
break;
default: OSL_FAIL("wrong dispatcher"); return;
}
@@ -238,8 +238,8 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq)
void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
- USHORT nSlot = rReq.GetSlot();
- BOOL bSetRetVal = TRUE, bRet = TRUE;
+ sal_uInt16 nSlot = rReq.GetSlot();
+ sal_Bool bSetRetVal = sal_True, bRet = sal_True;
switch ( nSlot )
{
case SID_FM_TOGGLECONTROLFOCUS:
@@ -260,7 +260,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
if ( !pFilter.get() )
break;
- const SdrObject* pNearestControl = rSh.GetBestObject( TRUE, GOTOOBJ_DRAW_CONTROL, FALSE, pFilter.get() );
+ const SdrObject* pNearestControl = rSh.GetBestObject( sal_True, GOTOOBJ_DRAW_CONTROL, sal_False, pFilter.get() );
if ( !pNearestControl )
break;
@@ -273,7 +273,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
}
break;
case FN_CNTNT_TO_NEXT_FRAME:
- bRet = rSh.GotoObj(TRUE, GOTOOBJ_GOTO_ANY);
+ bRet = rSh.GotoObj(sal_True, GOTOOBJ_GOTO_ANY);
if(bRet)
{
rSh.HideCrsr();
@@ -290,27 +290,27 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
break;
case FN_TO_HEADER:
rSh.MoveCrsr();
- if ( FRMTYPE_HEADER & rSh.GetFrmType(0,FALSE) )
+ if ( FRMTYPE_HEADER & rSh.GetFrmType(0,sal_False) )
rSh.SttPg();
else
rSh.GotoHeaderTxt();
- bSetRetVal = FALSE;
+ bSetRetVal = sal_False;
break;
case FN_TO_FOOTER:
rSh.MoveCrsr();
- if ( FRMTYPE_FOOTER & rSh.GetFrmType(0,FALSE) )
+ if ( FRMTYPE_FOOTER & rSh.GetFrmType(0,sal_False) )
rSh.EndPg();
else
rSh.GotoFooterTxt();
- bSetRetVal = FALSE;
+ bSetRetVal = sal_False;
break;
case FN_FOOTNOTE_TO_ANCHOR:
rSh.MoveCrsr();
- if ( FRMTYPE_FOOTNOTE & rSh.GetFrmType(0,FALSE) )
+ if ( FRMTYPE_FOOTNOTE & rSh.GetFrmType(0,sal_False) )
rSh.GotoFtnAnchor();
else
rSh.GotoFtnTxt();
- bSetRetVal = FALSE;
+ bSetRetVal = sal_False;
break;
case FN_TO_FOOTNOTE_AREA :
rSh.GotoFtnTxt();
@@ -329,22 +329,22 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
break;
case FN_NEXT_TOXMARK:
- bRet = rSh.GotoNxtPrvTOXMark( TRUE );
+ bRet = rSh.GotoNxtPrvTOXMark( sal_True );
break;
case FN_PREV_TOXMARK:
- bRet = rSh.GotoNxtPrvTOXMark( FALSE );
+ bRet = rSh.GotoNxtPrvTOXMark( sal_False );
break;
case FN_NEXT_TBLFML:
- bRet = rSh.GotoNxtPrvTblFormula( TRUE, FALSE );
+ bRet = rSh.GotoNxtPrvTblFormula( sal_True, sal_False );
break;
case FN_PREV_TBLFML:
- bRet = rSh.GotoNxtPrvTblFormula( FALSE, FALSE );
+ bRet = rSh.GotoNxtPrvTblFormula( sal_False, sal_False );
break;
case FN_NEXT_TBLFML_ERR:
- bRet = rSh.GotoNxtPrvTblFormula( TRUE, TRUE );
+ bRet = rSh.GotoNxtPrvTblFormula( sal_True, sal_True );
break;
case FN_PREV_TBLFML_ERR:
- bRet = rSh.GotoNxtPrvTblFormula( FALSE, TRUE );
+ bRet = rSh.GotoNxtPrvTblFormula( sal_False, sal_True );
break;
default:
diff --git a/sw/source/ui/shells/txtnum.cxx b/sw/source/ui/shells/txtnum.cxx
index 9a0a87c00578..d321d6f6a019 100644
--- a/sw/source/ui/shells/txtnum.cxx
+++ b/sw/source/ui/shells/txtnum.cxx
@@ -58,7 +58,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
case FN_NUM_NUMBERING_ON:
{
SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False );
- BOOL bMode = !GetShell().HasNumber(); // #i29560#
+ sal_Bool bMode = !GetShell().HasNumber(); // #i29560#
if ( pItem )
bMode = pItem->GetValue();
else
@@ -77,7 +77,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
case FN_NUM_BULLET_ON:
{
SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False );
- BOOL bMode = !GetShell().HasBullet(); // #i29560#
+ sal_Bool bMode = !GetShell().HasBullet(); // #i29560#
if ( pItem )
bMode = pItem->GetValue();
else
@@ -100,14 +100,14 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL,
0 );
SwDocShell* pDocSh = GetView().GetDocShell();
- BOOL bHtml = 0 != PTR_CAST(SwWebDocShell, pDocSh);
+ sal_Bool bHtml = 0 != PTR_CAST(SwWebDocShell, pDocSh);
const SwNumRule* pCurRule = GetShell().GetCurNumRule();
if( pCurRule )
{
SvxNumRule aRule = pCurRule->MakeSvxNumRule();
//convert type of linked bitmaps from SVX_NUM_BITMAP to (SVX_NUM_BITMAP|LINK_TOKEN)
- for(USHORT i = 0; i < aRule.GetLevelCount(); i++)
+ for(sal_uInt16 i = 0; i < aRule.GetLevelCount(); i++)
{
SvxNumberFormat aFmt(aRule.GetLevel(i));
if(SVX_NUM_BITMAP == aFmt.GetNumberingType())
@@ -122,12 +122,12 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
}
}
if(bHtml)
- aRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, FALSE);
+ aRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, sal_False);
aSet.Put(SvxNumBulletItem(aRule));
OSL_ENSURE( GetShell().GetNumLevel() < MAXLEVEL,
"<SwTextShell::ExecEnterNum()> - numbered node without valid list level. Serious defect -> please inform OD." );
- USHORT nLevel = GetShell().GetNumLevel();
+ sal_uInt16 nLevel = GetShell().GetNumLevel();
if( nLevel < MAXLEVEL )
{
nLevel = 1<<nLevel;
@@ -145,7 +145,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
if( bHtml || bRightToLeft )
{
- for( BYTE n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt8 n = 0; n < MAXLEVEL; ++n )
{
SvxNumberFormat aFmt( aSvxRule.GetLevel( n ) );
if ( n && bHtml )
@@ -161,14 +161,14 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
aFmt.SetNumAdjust( SVX_ADJUST_RIGHT );
}
// <--
- aSvxRule.SetLevel( n, aFmt, FALSE );
+ aSvxRule.SetLevel( n, aFmt, sal_False );
}
- aSvxRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, FALSE);
+ aSvxRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, sal_False);
}
aSet.Put(SvxNumBulletItem(aSvxRule));
}
- aSet.Put( SfxBoolItem( SID_PARAM_NUM_PRESET,FALSE ));
+ aSet.Put( SfxBoolItem( SID_PARAM_NUM_PRESET,sal_False ));
// vor dem Dialog wird der HtmlMode an der DocShell versenkt
pDocSh->PutItem(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(pDocSh)));
@@ -178,11 +178,11 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
SfxAbstractTabDialog* pDlg = pFact->CreateSwTabDialog( DLG_SVXTEST_NUM_BULLET,
GetView().GetWindow(), &aSet, GetShell());
OSL_ENSURE(pDlg, "Dialogdiet fail!");
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
const SfxPoolItem* pItem;
if( RET_OK == nRet )
{
- if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState( SID_ATTR_NUMBERING_RULE, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState( SID_ATTR_NUMBERING_RULE, sal_False, &pItem ))
{
rReq.AppendItem(*pItem);
rReq.Done();
@@ -195,7 +195,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
numfunc::GetDefaultPositionAndSpaceMode() );
// <--
aSetRule.SetSvxRule( *pSetRule, GetShell().GetDoc());
- aSetRule.SetAutoRule( TRUE );
+ aSetRule.SetAutoRule( sal_True );
// No start of new list, if an existing list style is edited.
// Otherwise start a new list.
const bool bCreateList = (pCurRule == 0);
@@ -204,7 +204,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
// wenn der Dialog mit OK verlassen wurde, aber nichts ausgewaehlt
// wurde dann muss die Numerierung zumindest eingeschaltet werden,
// wenn sie das noch nicht ist
- else if( !pCurRule && SFX_ITEM_SET == aSet.GetItemState( SID_ATTR_NUMBERING_RULE, FALSE, &pItem ))
+ else if( !pCurRule && SFX_ITEM_SET == aSet.GetItemState( SID_ATTR_NUMBERING_RULE, sal_False, &pItem ))
{
rReq.AppendItem( *pItem );
rReq.Done();
@@ -214,7 +214,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
numfunc::GetDefaultPositionAndSpaceMode() );
// <--
aSetRule.SetSvxRule(*pSetRule, GetShell().GetDoc());
- aSetRule.SetAutoRule( TRUE );
+ aSetRule.SetAutoRule( sal_True );
// start new list
GetShell().SetCurNumRule( aSetRule, true );
}
diff --git a/sw/source/ui/smartmenu/makefile.mk b/sw/source/ui/smartmenu/makefile.mk
deleted file mode 100644
index 1950430cf378..000000000000
--- a/sw/source/ui/smartmenu/makefile.mk
+++ /dev/null
@@ -1,53 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=smartmenu
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES = \
- $(SLO)$/stmenu.obj
-
-SLOFILES = \
- $(SLO)$/stmenu.obj
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- stmenu.src
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/smartmenu/stmenu.cxx b/sw/source/ui/smartmenu/stmenu.cxx
index 42eed42c1413..16e02a3d13ab 100644
--- a/sw/source/ui/smartmenu/stmenu.cxx
+++ b/sw/source/ui/smartmenu/stmenu.cxx
@@ -57,10 +57,10 @@ SwSmartTagPopup::SwSmartTagPopup( SwView* pSwView,
Reference <frame::XController> xController = mpSwView->GetController();
const lang::Locale aLocale( SW_BREAKITER()->GetLocale( (LanguageType)GetAppLanguage() ) );
- USHORT nMenuPos = 0;
- USHORT nSubMenuPos = 0;
- USHORT nMenuId = 1;
- USHORT nSubMenuId = MN_ST_INSERT_START;
+ sal_uInt16 nMenuPos = 0;
+ sal_uInt16 nSubMenuPos = 0;
+ sal_uInt16 nMenuId = 1;
+ sal_uInt16 nSubMenuId = MN_ST_INSERT_START;
const rtl::OUString aRangeText = mxTextRange->getString();
@@ -76,7 +76,7 @@ SwSmartTagPopup::SwSmartTagPopup( SwView* pSwView,
InsertSeparator(0);
- for ( USHORT j = 0; j < aActionComponentsSequence.getLength(); ++j )
+ for ( sal_uInt16 j = 0; j < aActionComponentsSequence.getLength(); ++j )
{
Reference< container::XStringKeyMap > xSmartTagProperties = rStringKeyMaps[j];
@@ -113,7 +113,7 @@ SwSmartTagPopup::SwSmartTagPopup( SwView* pSwView,
pSbMenu->InsertSeparator( nSubMenuPos++ );
// Add subitem for every action reference for the current smart tag type:
- for ( USHORT i = 0; i < rActionComponents.getLength(); ++i )
+ for ( sal_uInt16 i = 0; i < rActionComponents.getLength(); ++i )
{
xAction = rActionComponents[i];
@@ -149,7 +149,7 @@ sal_uInt16 SwSmartTagPopup::Execute( const Rectangle& rWordPos, Window* pWin )
if ( nId == MN_SMARTTAG_OPTIONS )
{
- SfxBoolItem aBool(SID_OPEN_SMARTTAGOPTIONS, TRUE);
+ SfxBoolItem aBool(SID_OPEN_SMARTTAGOPTIONS, sal_True);
mpSwView->GetViewFrame()->GetDispatcher()->Execute( SID_AUTO_CORRECT_DLG, SFX_CALLMODE_ASYNCHRON, &aBool, 0L );
}
diff --git a/sw/source/ui/table/chartins.cxx b/sw/source/ui/table/chartins.cxx
index 9d5a64cccf91..ba251cd045b9 100644
--- a/sw/source/ui/table/chartins.cxx
+++ b/sw/source/ui/table/chartins.cxx
@@ -93,7 +93,7 @@ Point SwGetChartDialogPos( const Window *pParentWin, const Size& rDialogSize, co
Rectangle aDesktop = pParentWin->GetDesktopRectPixel();
Size aSpace = pParentWin->LogicToPixel( Size( 8, 12 ), MAP_APPFONT );
- BOOL bLayoutRTL = ::GetActiveView()->GetWrtShell().IsTableRightToLeft();
+ sal_Bool bLayoutRTL = ::GetActiveView()->GetWrtShell().IsTableRightToLeft();
bool bCenterHor = false;
if ( aDesktop.Bottom() - aObjAbs.Bottom() >= rDialogSize.Height() + aSpace.Height() )
@@ -183,7 +183,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
}
SwFlyFrmFmt *pFlyFrmFmt = 0;
- xChartModel.set( SwTableFUNC( &rWrtShell, FALSE ).InsertChart( xDataProvider, (sal_True == xDataProvider.is()), aRangeString, &pFlyFrmFmt ));
+ xChartModel.set( SwTableFUNC( &rWrtShell, sal_False ).InsertChart( xDataProvider, (sal_True == xDataProvider.is()), aRangeString, &pFlyFrmFmt ));
//open wizard
//@todo get context from writer if that has one
@@ -250,7 +250,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
if( nDialogRet == ui::dialogs::ExecutableDialogResults::CANCEL )
{
rWrtShell.Undo();
- rWrtShell.getIDocumentUndoRedoAccess()->ClearRedo();
+ rWrtShell.GetIDocumentUndoRedo().ClearRedo();
}
else
{
@@ -268,7 +268,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
void AutoEdit::KeyInput( const KeyEvent& rEvt )
{
- USHORT nCode = rEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rEvt.GetKeyCode().GetCode();
if( nCode != KEY_SPACE )
Edit::KeyInput( rEvt );
}
diff --git a/sw/source/ui/table/chartins.src b/sw/source/ui/table/chartins.src
index b284dbf114fe..a65c8801db20 100644
--- a/sw/source/ui/table/chartins.src
+++ b/sw/source/ui/table/chartins.src
@@ -50,12 +50,14 @@ ModelessDialog DLG_INSERT_CHART
};
Edit ED_RANGE
{
+ HelpID = "sw:Edit:DLG_INSERT_CHART:ED_RANGE";
Border = TRUE ;
Pos = MAP_APPFONT ( 56 , 14 ) ;
Size = MAP_APPFONT ( 229 , 12 ) ;
};
CheckBox CB_FIRST_ROW
{
+ HelpID = "sw:CheckBox:DLG_INSERT_CHART:CB_FIRST_ROW";
Pos = MAP_APPFONT ( 12 , 32 ) ;
Size = MAP_APPFONT ( 150 , 10 ) ;
TabStop = TRUE ;
@@ -64,6 +66,7 @@ ModelessDialog DLG_INSERT_CHART
};
CheckBox CB_FIRST_COL
{
+ HelpID = "sw:CheckBox:DLG_INSERT_CHART:CB_FIRST_COL";
Pos = MAP_APPFONT ( 12 , 46 ) ;
Size = MAP_APPFONT ( 150 , 10 ) ;
TabStop = TRUE ;
@@ -96,6 +99,7 @@ ModelessDialog DLG_INSERT_CHART
};
PushButton BT_PREV
{
+ HelpID = "sw:PushButton:DLG_INSERT_CHART:BT_PREV";
Pos = MAP_APPFONT ( 130 , 151 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -104,6 +108,7 @@ ModelessDialog DLG_INSERT_CHART
};
PushButton BT_NEXT
{
+ HelpID = "sw:PushButton:DLG_INSERT_CHART:BT_NEXT";
Pos = MAP_APPFONT ( 185 , 151 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Disable = TRUE ;
@@ -112,6 +117,7 @@ ModelessDialog DLG_INSERT_CHART
};
PushButton BT_FINISH
{
+ HelpID = "sw:PushButton:DLG_INSERT_CHART:BT_FINISH";
Pos = MAP_APPFONT ( 240 , 151 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
diff --git a/sw/source/ui/table/colwd.cxx b/sw/source/ui/table/colwd.cxx
index 3fa7ecbf5afa..e3cb3f1b3536 100644
--- a/sw/source/ui/table/colwd.cxx
+++ b/sw/source/ui/table/colwd.cxx
@@ -52,7 +52,7 @@
IMPL_LINK_INLINE_START( SwTableWidthDlg, LoseFocusHdl, Edit *, EMPTYARG )
{
- USHORT nId = (USHORT)aColEdit.GetValue()-1;
+ sal_uInt16 nId = (sal_uInt16)aColEdit.GetValue()-1;
const SwTwips lWidth = rFnc.GetColWidth(nId);
aWidthEdit.SetValue(aWidthEdit.Normalize(lWidth), FUNIT_TWIP);
aWidthEdit.SetMax(aWidthEdit.Normalize(rFnc.GetMaxColWidth(nId)), FUNIT_TWIP);
@@ -65,12 +65,12 @@ IMPL_LINK_INLINE_END( SwTableWidthDlg, LoseFocusHdl, Edit *, EMPTYARG )
SwTableWidthDlg::SwTableWidthDlg(Window *pParent, SwTableFUNC &rTableFnc ) :
SvxStandardDialog( pParent, SW_RES(DLG_COL_WIDTH) ),
+ aWidthFL(this, SW_RES(FL_WIDTH)),
aColFT(this, SW_RES(FT_COL)),
aColEdit(this, SW_RES(ED_COL)),
aWidthFT(this, SW_RES(FT_WIDTH)),
aWidthEdit(this, SW_RES(ED_WIDTH)),
- aWidthFL(this, SW_RES(FL_WIDTH)),
aOKBtn(this, SW_RES(BT_OK)),
aCancelBtn(this, SW_RES(BT_CANCEL)),
aHelpBtn(this, SW_RES(BT_HELP)),
@@ -78,10 +78,10 @@ SwTableWidthDlg::SwTableWidthDlg(Window *pParent, SwTableFUNC &rTableFnc ) :
{
FreeResource();
- BOOL bIsWeb = rTableFnc.GetShell()
- ? static_cast< BOOL >(0 != PTR_CAST( SwWebDocShell,
+ sal_Bool bIsWeb = rTableFnc.GetShell()
+ ? static_cast< sal_Bool >(0 != PTR_CAST( SwWebDocShell,
rTableFnc.GetShell()->GetView().GetDocShell()) )
- : FALSE;
+ : sal_False;
FieldUnit eFieldUnit = SW_MOD()->GetUsrPref( bIsWeb )->GetMetric();
::SetFieldUnit(aWidthEdit, eFieldUnit );
@@ -103,8 +103,8 @@ void SwTableWidthDlg::Apply()
{
rFnc.InitTabCols();
rFnc.SetColWidth(
- static_cast< USHORT >(aColEdit.GetValue() - 1),
- static_cast< USHORT >(aWidthEdit.Denormalize(aWidthEdit.GetValue(FUNIT_TWIP))));
+ static_cast< sal_uInt16 >(aColEdit.GetValue() - 1),
+ static_cast< sal_uInt16 >(aWidthEdit.Denormalize(aWidthEdit.GetValue(FUNIT_TWIP))));
}
diff --git a/sw/source/ui/table/colwd.src b/sw/source/ui/table/colwd.src
index aa1cf468867f..fb1505c1cabe 100644
--- a/sw/source/ui/table/colwd.src
+++ b/sw/source/ui/table/colwd.src
@@ -32,7 +32,7 @@
// #define DLG_COL_WIDTH 256
ModalDialog DLG_COL_WIDTH
{
- HelpID = FN_TABLE_SET_COL_WIDTH ;
+ HelpID = CMD_FN_TABLE_SET_COL_WIDTH ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 159 , 60 ) ;
@@ -66,6 +66,7 @@ ModalDialog DLG_COL_WIDTH
};
MetricField ED_WIDTH
{
+ HelpID = "sw:MetricField:DLG_COL_WIDTH:ED_WIDTH";
Border = TRUE ;
Pos = MAP_APPFONT ( 51 , 30 ) ;
Size = MAP_APPFONT ( 38 , 12 ) ;
@@ -97,6 +98,7 @@ ModalDialog DLG_COL_WIDTH
};
NumericField ED_COL
{
+ HelpID = "sw:NumericField:DLG_COL_WIDTH:ED_COL";
Border = TRUE ;
Pos = MAP_APPFONT ( 51 , 14 ) ;
Size = MAP_APPFONT ( 38 , 12 ) ;
diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx
index 74a084291d07..f2752fe92781 100644
--- a/sw/source/ui/table/convert.cxx
+++ b/sw/source/ui/table/convert.cxx
@@ -97,13 +97,13 @@ void SwConvertTableDlg::GetValues( sal_Unicode& rDelim,
}
- USHORT nInsMode = 0;
+ sal_uInt16 nInsMode = 0;
if (aBorderCB.IsChecked())
nInsMode |= tabopts::DEFAULT_BORDER;
if (aHeaderCB.IsChecked())
nInsMode |= tabopts::HEADLINE;
if (aRepeatHeaderCB.IsEnabled() && aRepeatHeaderCB.IsChecked())
- rInsTblOpts.mnRowsToRepeat = USHORT( aRepeatHeaderNF.GetValue() );
+ rInsTblOpts.mnRowsToRepeat = sal_uInt16( aRepeatHeaderNF.GetValue() );
else
rInsTblOpts.mnRowsToRepeat = 0;
if (!aDontSplitCB.IsChecked())
@@ -154,6 +154,8 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable )
pTAutoFmt( 0 ),
pShell( &rView.GetWrtShell() )
{
+ aOtherEd.SetAccessibleName(String(SW_RES(STR_SYMBOL)));
+ aOtherEd.SetAccessibleRelationLabeledBy(&aOtherBtn);
FreeResource();
if(nSaveButtonState > -1)
{
@@ -185,12 +187,12 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable )
else
{
//Einfuege-Optionen verstecken
- aHeaderCB .Show(FALSE);
- aRepeatHeaderCB .Show(FALSE);
- aDontSplitCB .Show(FALSE);
- aBorderCB .Show(FALSE);
- aOptionsFL .Show(FALSE);
- aRepeatHeaderCombo.Show(FALSE);
+ aHeaderCB .Show(sal_False);
+ aRepeatHeaderCB .Show(sal_False);
+ aDontSplitCB .Show(sal_False);
+ aBorderCB .Show(sal_False);
+ aOptionsFL .Show(sal_False);
+ aRepeatHeaderCombo.Show(sal_False);
//Groesse anpassen
Size aSize(GetSizePixel());
@@ -208,10 +210,10 @@ SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable )
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
- BOOL bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON);
+ sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON);
SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode);
- USHORT nInsTblFlags = aInsOpts.mnInsMode;
+ sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode;
aHeaderCB.Check( 0 != (nInsTblFlags & tabopts::HEADLINE) );
aRepeatHeaderCB.Check(aInsOpts.mnRowsToRepeat > 0);
@@ -234,7 +236,7 @@ IMPL_LINK( SwConvertTableDlg, AutoFmtHdl, PushButton*, pButton )
SwAbstractDialogFactory* pFact = swui::GetFactory();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pShell, DLG_AUTOFMT_TABLE, FALSE, pTAutoFmt);
+ AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pShell, DLG_AUTOFMT_TABLE, sal_False, pTAutoFmt);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute())
pDlg->FillAutoFmtOfIndex( pTAutoFmt );
@@ -250,7 +252,7 @@ IMPL_LINK( SwConvertTableDlg, BtnHdl, Button*, pButton )
{
if( aKeepColumn.IsEnabled() )
aKeepColumn.SaveValue();
- aKeepColumn.Check( TRUE );
+ aKeepColumn.Check( sal_True );
}
aKeepColumn.Enable( aTabBtn.IsChecked() );
aOtherEd.Enable( aOtherBtn.IsChecked() );
diff --git a/sw/source/ui/table/convert.hrc b/sw/source/ui/table/convert.hrc
index 7f7cbbec768f..b8a29a17c380 100644
--- a/sw/source/ui/table/convert.hrc
+++ b/sw/source/ui/table/convert.hrc
@@ -45,3 +45,6 @@
#define BT_AUTOFORMAT 102
#define BT_HELP 103
#define WIN_REPEAT_HEADER 104
+//IAccessibility2 Implementation 2009-----
+#define STR_SYMBOL 105
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/ui/table/convert.src b/sw/source/ui/table/convert.src
index e2ff4ed1c2e3..911672509611 100644
--- a/sw/source/ui/table/convert.src
+++ b/sw/source/ui/table/convert.src
@@ -31,7 +31,7 @@
#include "helpid.h"
ModalDialog DLG_CONV_TEXT_TABLE
{
- HelpID = FN_CONVERT_TEXT_TABLE ;
+ HelpID = CMD_FN_CONVERT_TEXT_TABLE ;
OUTPUTSIZE = TRUE ;
Size = MAP_APPFONT ( 203 , 169 ) ;
Text [ en-US ] = "Convert Table to Text" ;
@@ -39,6 +39,7 @@ ModalDialog DLG_CONV_TEXT_TABLE
SVLOOK = TRUE ;
RadioButton CB_TAB
{
+ HelpID = "sw:RadioButton:DLG_CONV_TEXT_TABLE:CB_TAB";
Pos = MAP_APPFONT ( 12 , 17 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
Text [ en-US ] = "~Tabs" ;
@@ -48,6 +49,7 @@ ModalDialog DLG_CONV_TEXT_TABLE
};
RadioButton CB_SEMI
{
+ HelpID = "sw:RadioButton:DLG_CONV_TEXT_TABLE:CB_SEMI";
Pos = MAP_APPFONT ( 75 , 17 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
Text [ en-US ] = "~Semicolons" ;
@@ -55,6 +57,7 @@ ModalDialog DLG_CONV_TEXT_TABLE
};
RadioButton CB_PARA
{
+ HelpID = "sw:RadioButton:DLG_CONV_TEXT_TABLE:CB_PARA";
Pos = MAP_APPFONT ( 12 , 33 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
Text [ en-US ] = "~Paragraph" ;
@@ -62,12 +65,14 @@ ModalDialog DLG_CONV_TEXT_TABLE
};
RadioButton RB_OTHER
{
+ HelpID = "sw:RadioButton:DLG_CONV_TEXT_TABLE:RB_OTHER";
Pos = MAP_APPFONT ( 75 , 33 ) ;
Size = MAP_APPFONT ( 45 , 10 ) ;
Text [ en-US ] = "~Other: " ;
};
Edit ED_OTHER
{
+ HelpID = "sw:Edit:DLG_CONV_TEXT_TABLE:ED_OTHER";
Border = TRUE ;
Left = TRUE ;
Pos = MAP_APPFONT ( 123 , 32 ) ;
@@ -77,6 +82,7 @@ ModalDialog DLG_CONV_TEXT_TABLE
};
CheckBox CB_KEEPCOLUMN
{
+ HelpID = "sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_KEEPCOLUMN";
Pos = MAP_APPFONT ( 12 , 49 ) ;
Size = MAP_APPFONT ( 128 , 10 ) ;
Check = TRUE;
@@ -92,6 +98,7 @@ ModalDialog DLG_CONV_TEXT_TABLE
};
CheckBox CB_HEADER
{
+ HelpID = "sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_HEADER";
Pos = MAP_APPFONT ( 12 , 84 ) ;
Size = MAP_APPFONT ( 123 , 10 ) ;
TabStop = TRUE ;
@@ -99,6 +106,7 @@ ModalDialog DLG_CONV_TEXT_TABLE
};
CheckBox CB_REPEAT_HEADER
{
+ HelpID = "sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_REPEAT_HEADER";
Pos = MAP_APPFONT ( 22 , 97 ) ;
Size = MAP_APPFONT ( 113 , 10 ) ;
Text [ en-US ] = "Repeat heading";
@@ -112,6 +120,7 @@ ModalDialog DLG_CONV_TEXT_TABLE
};
NumericField NF_REPEAT_HEADER
{
+ HelpID = "sw:NumericField:DLG_CONV_TEXT_TABLE:NF_REPEAT_HEADER";
Border = TRUE ;
Pos = MAP_APPFONT ( 191 , 112 ) ;
Size = MAP_APPFONT ( 28 , 12 ) ;
@@ -130,6 +139,7 @@ ModalDialog DLG_CONV_TEXT_TABLE
};
CheckBox CB_DONT_SPLIT
{
+ HelpID = "sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_DONT_SPLIT";
Pos = MAP_APPFONT ( 12 , 126 ) ;
Size = MAP_APPFONT ( 123 , 10 ) ;
TabStop = TRUE ;
@@ -137,6 +147,7 @@ ModalDialog DLG_CONV_TEXT_TABLE
};
CheckBox CB_BORDER
{
+ HelpID = "sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_BORDER";
Pos = MAP_APPFONT ( 12 , 139 ) ;
Size = MAP_APPFONT ( 123 , 10 ) ;
TabStop = TRUE ;
@@ -173,12 +184,19 @@ ModalDialog DLG_CONV_TEXT_TABLE
};
PushButton BT_AUTOFORMAT
{
+ HelpID = "sw:PushButton:DLG_CONV_TEXT_TABLE:BT_AUTOFORMAT";
Pos = MAP_APPFONT ( 12 , 152 ) ;
Size = MAP_APPFONT ( 86 , 14 ) ;
TabStop = TRUE ;
Hide = TRUE ;
Text [ en-US ] = "Auto~Format..." ;
};
+ /*IAccessibility2 Implementation 2009-----*/
+ String STR_SYMBOL
+ {
+ Text [ en-US ] = "Symbol" ;
+ };
+ /*-----IAccessibility2 Implementation 2009*/
};
diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx
index fabe7d289130..9f8a711c4533 100644
--- a/sw/source/ui/table/instable.cxx
+++ b/sw/source/ui/table/instable.cxx
@@ -58,21 +58,21 @@ namespace swui
#define ROW_COL_PROD 16384
-void SwInsTableDlg::GetValues( String& rName, USHORT& rRow, USHORT& rCol,
+void SwInsTableDlg::GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol,
SwInsertTableOptions& rInsTblOpts, String& rAutoName,
SwTableAutoFmt *& prTAFmt )
{
- USHORT nInsMode = 0;
+ sal_uInt16 nInsMode = 0;
rName = aNameEdit.GetText();
- rRow = (USHORT)aRowEdit.GetValue();
- rCol = (USHORT)aColEdit.GetValue();
+ rRow = (sal_uInt16)aRowEdit.GetValue();
+ rCol = (sal_uInt16)aColEdit.GetValue();
if (aBorderCB.IsChecked())
nInsMode |= tabopts::DEFAULT_BORDER;
if (aHeaderCB.IsChecked())
nInsMode |= tabopts::HEADLINE;
if (aRepeatHeaderCB.IsEnabled() && aRepeatHeaderCB.IsChecked())
- rInsTblOpts.mnRowsToRepeat = USHORT( aRepeatHeaderNF.GetValue() );
+ rInsTblOpts.mnRowsToRepeat = sal_uInt16( aRepeatHeaderNF.GetValue() );
else
rInsTblOpts.mnRowsToRepeat = 0;
if (!aDontSplitCB.IsChecked())
@@ -131,11 +131,11 @@ SwInsTableDlg::SwInsTableDlg( SwView& rView )
aColEdit.SetMax(ROW_COL_PROD/aRowEdit.GetValue());
aAutoFmtBtn.SetClickHdl(LINK(this, SwInsTableDlg, AutoFmtHdl));
- BOOL bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON);
+ sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON);
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode);
- USHORT nInsTblFlags = aInsOpts.mnInsMode;
+ sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode;
aHeaderCB.Check( 0 != (nInsTblFlags & tabopts::HEADLINE) );
aRepeatHeaderCB.Check(aInsOpts.mnRowsToRepeat > 0);
@@ -220,7 +220,7 @@ IMPL_LINK( SwInsTableDlg, AutoFmtHdl, PushButton*, pButton )
SwAbstractDialogFactory* pFact = swui::GetFactory();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton,pShell, DLG_AUTOFMT_TABLE, FALSE, pTAutoFmt );
+ AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton,pShell, DLG_AUTOFMT_TABLE, sal_False, pTAutoFmt );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute())
pDlg->FillAutoFmtOfIndex( pTAutoFmt );
diff --git a/sw/source/ui/table/instable.src b/sw/source/ui/table/instable.src
index e5f83f2a1ee3..d83ba3402e72 100644
--- a/sw/source/ui/table/instable.src
+++ b/sw/source/ui/table/instable.src
@@ -32,7 +32,7 @@
// #define DLG_INSERT_TABLE 256
ModalDialog DLG_INSERT_TABLE
{
- HelpID = FN_INSERT_TABLE ;
+ HelpID = CMD_FN_INSERT_TABLE ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 280 , 166 ) ;
@@ -40,6 +40,7 @@ ModalDialog DLG_INSERT_TABLE
Moveable = TRUE ;
Edit ED_NAME
{
+ HelpID = "sw:Edit:DLG_INSERT_TABLE:ED_NAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 53 , 6 ) ;
Size = MAP_APPFONT ( 158, 12 ) ;
@@ -60,6 +61,7 @@ ModalDialog DLG_INSERT_TABLE
};
NumericField ED_COL
{
+ HelpID = "sw:NumericField:DLG_INSERT_TABLE:ED_COL";
Border = TRUE ;
Pos = MAP_APPFONT ( 53 , 32 ) ;
Size = MAP_APPFONT ( 28 , 12 ) ;
@@ -82,6 +84,7 @@ ModalDialog DLG_INSERT_TABLE
};
NumericField ED_ROW
{
+ HelpID = "sw:NumericField:DLG_INSERT_TABLE:ED_ROW";
Border = TRUE ;
Pos = MAP_APPFONT ( 53 , 48 ) ;
Size = MAP_APPFONT ( 28 , 12 ) ;
@@ -103,6 +106,7 @@ ModalDialog DLG_INSERT_TABLE
};
CheckBox CB_HEADER
{
+ HelpID = "sw:CheckBox:DLG_INSERT_TABLE:CB_HEADER";
Pos = MAP_APPFONT ( 12 , 74 ) ;
Size = MAP_APPFONT (113 , 10 ) ;
TabStop = TRUE ;
@@ -110,6 +114,7 @@ ModalDialog DLG_INSERT_TABLE
};
CheckBox CB_REPEAT_HEADER
{
+ HelpID = "sw:CheckBox:DLG_INSERT_TABLE:CB_REPEAT_HEADER";
Pos = MAP_APPFONT ( 21 , 88 ) ;
Size = MAP_APPFONT ( 104 , 10 ) ;
TabStop = TRUE ;
@@ -123,6 +128,7 @@ ModalDialog DLG_INSERT_TABLE
};
NumericField NF_REPEAT_HEADER
{
+ HelpID = "sw:NumericField:DLG_INSERT_TABLE:NF_REPEAT_HEADER";
Border = TRUE ;
Pos = MAP_APPFONT ( 130 , 104 ) ;
Size = MAP_APPFONT ( 28 , 12 ) ;
@@ -141,6 +147,7 @@ ModalDialog DLG_INSERT_TABLE
};
CheckBox CB_DONT_SPLIT
{
+ HelpID = "sw:CheckBox:DLG_INSERT_TABLE:CB_DONT_SPLIT";
Pos = MAP_APPFONT ( 12 , 118 ) ;
Size = MAP_APPFONT ( 113 , 10 ) ;
Text [ en-US ] = "Don't split table";
@@ -148,6 +155,7 @@ ModalDialog DLG_INSERT_TABLE
};
CheckBox CB_BORDER
{
+ HelpID = "sw:CheckBox:DLG_INSERT_TABLE:CB_BORDER";
Pos = MAP_APPFONT ( 12 , 132 ) ;
Size = MAP_APPFONT ( 113 , 10 ) ;
TabStop = TRUE ;
@@ -155,6 +163,7 @@ ModalDialog DLG_INSERT_TABLE
};
PushButton BT_AUTOFORMAT
{
+ HelpID = "sw:PushButton:DLG_INSERT_TABLE:BT_AUTOFORMAT";
Pos = MAP_APPFONT ( 12 , 146 ) ;
Size = MAP_APPFONT ( 86 , 14 ) ;
TabStop = TRUE ;
diff --git a/sw/source/ui/table/makefile.mk b/sw/source/ui/table/makefile.mk
deleted file mode 100644
index 7897bf9ad998..000000000000
--- a/sw/source/ui/table/makefile.mk
+++ /dev/null
@@ -1,81 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=table
-LIBTARGET=no
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- colwd.src \
- convert.src \
- chartins.src \
- instable.src \
- mergetbl.src \
- rowht.src \
- splittbl.src \
- table.src \
- tabledlg.src \
- tautofmt.src
-
-EXCEPTIONSFILES= \
- $(SLO)$/chartins.obj \
- $(SLO)$/colwd.obj \
- $(SLO)$/convert.obj \
- $(SLO)$/instable.obj \
- $(SLO)$/mergetbl.obj \
- $(SLO)$/rowht.obj \
- $(SLO)$/splittbl.obj \
- $(SLO)$/swtablerep.obj \
- $(SLO)$/tabledlg.obj \
- $(SLO)$/tablemgr.obj \
- $(SLO)$/tautofmt.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-LIB1TARGET = $(SLB)$/$(TARGET).lib
-
-LIB1OBJFILES = \
- $(SLO)$/chartins.obj \
- $(SLO)$/swtablerep.obj \
- $(SLO)$/tablemgr.obj
-
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/table/mergetbl.cxx b/sw/source/ui/table/mergetbl.cxx
index 5e1e2d6ab39d..dc5c41cec24a 100644
--- a/sw/source/ui/table/mergetbl.cxx
+++ b/sw/source/ui/table/mergetbl.cxx
@@ -40,7 +40,7 @@
#include <table.hrc>
-SwMergeTblDlg::SwMergeTblDlg( Window *pParent, BOOL& rWithPrev )
+SwMergeTblDlg::SwMergeTblDlg( Window *pParent, sal_Bool& rWithPrev )
: SvxStandardDialog(pParent, SW_RES(DLG_MERGE_TABLE)),
aOKPB( this, SW_RES(PB_OK )),
aCancelPB( this, SW_RES(PB_CANCEL )),
diff --git a/sw/source/ui/table/mergetbl.src b/sw/source/ui/table/mergetbl.src
index 81ea30f9b003..f88ec62923f4 100644
--- a/sw/source/ui/table/mergetbl.src
+++ b/sw/source/ui/table/mergetbl.src
@@ -31,7 +31,7 @@
#include "helpid.h"
ModalDialog DLG_MERGE_TABLE
{
- HelpID = FN_TABLE_MERGE_TABLE ;
+ HelpID = CMD_FN_TABLE_MERGE_TABLE ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 207 , 57 ) ;
@@ -63,6 +63,7 @@ ModalDialog DLG_MERGE_TABLE
};
RadioButton RB_MERGE_PREV
{
+ HelpID = "sw:RadioButton:DLG_MERGE_TABLE:RB_MERGE_PREV";
Pos = MAP_APPFONT ( 12 , 15 ) ;
Size = MAP_APPFONT ( 130 , 10 ) ;
Check = TRUE ;
@@ -71,6 +72,7 @@ ModalDialog DLG_MERGE_TABLE
};
RadioButton RB_MERGE_NEXT
{
+ HelpID = "sw:RadioButton:DLG_MERGE_TABLE:RB_MERGE_NEXT";
Pos = MAP_APPFONT ( 12 , 30 ) ;
Size = MAP_APPFONT ( 130 , 10 ) ;
Text [ en-US ] = "Join with ~next table";
diff --git a/sw/source/ui/table/rowht.cxx b/sw/source/ui/table/rowht.cxx
index 7f82e172c7cd..676bc8a038db 100644
--- a/sw/source/ui/table/rowht.cxx
+++ b/sw/source/ui/table/rowht.cxx
@@ -77,10 +77,10 @@ void SwTableHeightDlg::Apply()
SwTableHeightDlg::SwTableHeightDlg( Window *pParent, SwWrtShell &rS ) :
SvxStandardDialog(pParent, SW_RES(DLG_ROW_HEIGHT)),
+ aHeightFL(this, SW_RES(FL_HEIGHT)),
aHeightEdit(this, SW_RES(ED_HEIGHT)),
aAutoHeightCB(this, SW_RES(CB_AUTOHEIGHT)),
- aHeightFL(this, SW_RES(FL_HEIGHT)),
aOKBtn(this, SW_RES(BT_OK)),
aCancelBtn(this, SW_RES(BT_CANCEL)),
aHelpBtn( this, SW_RES( BT_HELP ) ),
diff --git a/sw/source/ui/table/rowht.src b/sw/source/ui/table/rowht.src
index c6452ba81102..c947ed7405d5 100644
--- a/sw/source/ui/table/rowht.src
+++ b/sw/source/ui/table/rowht.src
@@ -31,7 +31,7 @@
#include "helpid.h"
ModalDialog DLG_ROW_HEIGHT
{
- HelpID = FN_TABLE_SET_ROW_HEIGHT ;
+ HelpID = CMD_FN_TABLE_SET_ROW_HEIGHT ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 157 , 60 ) ;
@@ -58,6 +58,7 @@ ModalDialog DLG_ROW_HEIGHT
};
MetricField ED_HEIGHT
{
+ HelpID = "sw:MetricField:DLG_ROW_HEIGHT:ED_HEIGHT";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 16 ) ;
Size = MAP_APPFONT ( 38 , 12 ) ;
@@ -75,6 +76,7 @@ ModalDialog DLG_ROW_HEIGHT
};
CheckBox CB_AUTOHEIGHT
{
+ HelpID = "sw:CheckBox:DLG_ROW_HEIGHT:CB_AUTOHEIGHT";
Pos = MAP_APPFONT ( 12 , 34 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
TabStop = TRUE ;
diff --git a/sw/source/ui/table/splittbl.src b/sw/source/ui/table/splittbl.src
index 879d4528d7de..0ba49f00a271 100644
--- a/sw/source/ui/table/splittbl.src
+++ b/sw/source/ui/table/splittbl.src
@@ -31,7 +31,7 @@
#include "helpid.h"
ModalDialog DLG_SPLIT_TABLE
{
- HelpID = FN_TABLE_SPLIT_TABLE ;
+ HelpID = CMD_FN_TABLE_SPLIT_TABLE ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 207 , 76 ) ;
@@ -63,6 +63,7 @@ ModalDialog DLG_SPLIT_TABLE
};
RadioButton RB_CNTNT
{
+ HelpID = "sw:RadioButton:DLG_SPLIT_TABLE:RB_CNTNT";
Pos = MAP_APPFONT ( 12 , 15 ) ;
Size = MAP_APPFONT ( 130 , 10 ) ;
Check = TRUE ;
@@ -71,18 +72,21 @@ ModalDialog DLG_SPLIT_TABLE
};
RadioButton RB_BOX_PARA
{
+ HelpID = "sw:RadioButton:DLG_SPLIT_TABLE:RB_BOX_PARA";
Pos = MAP_APPFONT ( 12 , 30 ) ;
Size = MAP_APPFONT ( 130 , 10 ) ;
Text [ en-US ] = "C~ustom heading (apply Style)" ;
};
RadioButton RB_BOX_NOPARA
{
+ HelpID = "sw:RadioButton:DLG_SPLIT_TABLE:RB_BOX_NOPARA";
Pos = MAP_APPFONT ( 12 , 45 ) ;
Size = MAP_APPFONT ( 130 , 10 ) ;
Text [ en-US ] = "Cu~stom heading" ;
};
RadioButton RB_BORDER
{
+ HelpID = "sw:RadioButton:DLG_SPLIT_TABLE:RB_BORDER";
Pos = MAP_APPFONT ( 12 , 60 ) ;
Size = MAP_APPFONT ( 130 , 10 ) ;
Text [ en-US ] = "~No heading" ;
diff --git a/sw/source/ui/table/swtablerep.cxx b/sw/source/ui/table/swtablerep.cxx
index dc2b5713c181..a3ca467f4d1a 100644
--- a/sw/source/ui/table/swtablerep.cxx
+++ b/sw/source/ui/table/swtablerep.cxx
@@ -66,7 +66,7 @@
#include "swtablerep.hxx"
-SwTableRep::SwTableRep( const SwTabCols& rTabCol, BOOL bCplx )
+SwTableRep::SwTableRep( const SwTabCols& rTabCol, sal_Bool bCplx )
:
nTblWidth(0),
nSpace(0),
@@ -75,15 +75,15 @@ SwTableRep::SwTableRep( const SwTabCols& rTabCol, BOOL bCplx )
nAlign(0),
nWidthPercent(0),
bComplex(bCplx),
- bLineSelected(FALSE),
- bWidthChanged(FALSE),
- bColsChanged(FALSE)
+ bLineSelected(sal_False),
+ bWidthChanged(sal_False),
+ bColsChanged(sal_False)
{
nAllCols = nColCount = rTabCol.Count();
pTColumns = new TColumn[ nColCount + 1 ];
SwTwips nStart = 0,
nEnd;
- for( USHORT i = 0; i < nAllCols; ++i )
+ for( sal_uInt16 i = 0; i < nAllCols; ++i )
{
nEnd = rTabCol[ i ] - rTabCol.GetLeft();
pTColumns[ i ].nWidth = nEnd - nStart;
@@ -93,7 +93,7 @@ SwTableRep::SwTableRep( const SwTabCols& rTabCol, BOOL bCplx )
nStart = nEnd;
}
pTColumns[ nAllCols ].nWidth = rTabCol.GetRight() - rTabCol.GetLeft() - nStart;
- pTColumns[ nAllCols ].bVisible = TRUE;
+ pTColumns[ nAllCols ].bVisible = sal_True;
nColCount++;
nAllCols++;
}
@@ -103,18 +103,18 @@ SwTableRep::~SwTableRep()
delete[] pTColumns;
}
-BOOL SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
+sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
{
long nOldLeft = rTabCols.GetLeft(),
nOldRight = rTabCols.GetRight();
- BOOL bSingleLine = FALSE;
- USHORT i;
+ sal_Bool bSingleLine = sal_False;
+ sal_uInt16 i;
for ( i = 0; i < rTabCols.Count(); ++i )
if(!pTColumns[i].bVisible)
{
- bSingleLine = TRUE;
+ bSingleLine = sal_True;
break;
}
@@ -136,14 +136,14 @@ BOOL SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
nStart = nEnd;
}
pOldTColumns[nAllCols - 1].nWidth = rTabCols.GetRight() - rTabCols.GetLeft() - nStart;
- pOldTColumns[nAllCols - 1].bVisible = TRUE;
+ pOldTColumns[nAllCols - 1].bVisible = sal_True;
- USHORT nOldPos = 0;
- USHORT nNewPos = 0;
+ sal_uInt16 nOldPos = 0;
+ sal_uInt16 nNewPos = 0;
SwTwips nOld = 0;
SwTwips nNew = 0;
- BOOL bOld = FALSE;
- BOOL bFirst = TRUE;
+ sal_Bool bOld = sal_False;
+ sal_Bool bFirst = sal_True;
i = 0;
while ( i < nAllCols -1 )
@@ -162,10 +162,10 @@ BOOL SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
if(pOldTColumns[nNewPos - 1].bVisible)
break;
}
- bFirst = FALSE;
+ bFirst = sal_False;
// sie muessen sortiert eingefuegt werden
bOld = nOld < nNew;
- nPos = USHORT(bOld ? nOld : nNew);
+ nPos = sal_uInt16(bOld ? nOld : nNew);
rTabCols[i] = nPos + nLeft;
rTabCols.SetHidden( i, bOld );
i++;
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 6bc498939e49..2ae69c47de82 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -51,6 +51,8 @@
#include <fmtrowsplt.hxx>
#include <svx/htmlmode.hxx>
+#include "access.hrc"
+
#include <docsh.hxx>
#include <wrtsh.hxx>
#include <view.hxx>
@@ -110,7 +112,7 @@ SwFormatTablePage::SwFormatTablePage( Window* pParent, const SfxItemSet& rSet )
pTblData(0),
nSaveWidth(0),
nMinTableWidth(MINLAY),
- bModified(FALSE),
+ bModified(sal_False),
bFull(0),
bHtmlMode(sal_False)
{
@@ -118,7 +120,7 @@ SwFormatTablePage::SwFormatTablePage( Window* pParent, const SfxItemSet& rSet )
SetExchangeSupport();
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, sal_False, &pItem))
bHtmlMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON);
sal_Bool bCTL = SW_MOD()->GetCTLOptions().IsCTLFontEnabled();
@@ -174,7 +176,7 @@ void SwFormatTablePage::Init()
IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn )
{
OSL_ENSURE(pTblData, "table data not available?");
- BOOL bIsChecked = pBtn->IsChecked();
+ sal_Bool bIsChecked = pBtn->IsChecked();
sal_Int64 nLeft = aLeftMF.DenormalizePercent(aLeftMF.GetValue(FUNIT_TWIP ));
sal_Int64 nRight = aRightMF.DenormalizePercent(aRightMF.GetValue(FUNIT_TWIP ));
aWidthMF.ShowPercent(bIsChecked);
@@ -198,11 +200,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;
}
@@ -210,45 +212,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);
@@ -265,11 +267,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;
}
@@ -278,11 +280,11 @@ IMPL_LINK( SwFormatTablePage, RightModifyHdl, MetricField *, EMPTYARG )
{
if(aFreeBtn.IsChecked())
{
- BOOL bEnable = aRightMF.GetValue() == 0;
+ sal_Bool bEnable = aRightMF.GetValue() == 0;
aRelWidthCB.Enable(bEnable);
if ( !bEnable )
{
- aRelWidthCB.Check(FALSE);
+ aRelWidthCB.Check(sal_False);
RelWidthClickHdl(&aRelWidthCB);
}
bEnable = aRelWidthCB.IsChecked();
@@ -376,7 +378,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 )
@@ -401,7 +403,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;
}
@@ -412,7 +414,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())
@@ -432,9 +434,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);
}
@@ -443,17 +445,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;
@@ -472,7 +474,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 );
@@ -482,20 +484,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);
@@ -525,45 +527,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;
@@ -582,7 +584,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);
@@ -593,10 +595,10 @@ void SwFormatTablePage::Reset( const SfxItemSet& )
}
//text direction
- if( SFX_ITEM_SET == rSet.GetItemState( RES_FRAMEDIR, TRUE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_FRAMEDIR, sal_True, &pItem ) )
{
sal_uIntPtr nVal = ((SvxFrameDirectionItem*)pItem)->GetValue();
- USHORT nPos = aTextDirectionLB.GetEntryPos( (void*) nVal );
+ sal_uInt16 nPos = aTextDirectionLB.GetEntryPos( (void*) nVal );
aTextDirectionLB.SelectEntryPos( nPos );
aTextDirectionLB.SaveValue();
}
@@ -669,7 +671,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);
@@ -684,7 +686,7 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet )
pTblData->SetWidth(lWidth);
SwTwips nColSum = 0;
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < pTblData->GetColCount(); i++)
{
@@ -748,7 +750,7 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet )
_pSet->Put(SwPtrItem(FN_TABLE_REP, pTblData));
}
}
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
Beschreibung: Seite Spaltenkonfiguration
@@ -761,6 +763,7 @@ SwTableColumnPage::SwTableColumnPage( Window* pParent,
aSpaceFT(this, SW_RES(FT_SPACE)),
aSpaceED(this, SW_RES(ED_SPACE)),
+ aColFL(this, SW_RES(COL_FL_LAYOUT)),
aUpBtn(this, SW_RES(COL_BTN_UP)),
aFT1(this, SW_RES(COL_FT_1)),
aMF1(this, SW_RES(COL_MF_1)),
@@ -775,19 +778,21 @@ SwTableColumnPage::SwTableColumnPage( Window* pParent,
aFT6(this, SW_RES(COL_FT_6)),
aMF6(this, SW_RES(COL_MF_6)),
aDownBtn(this, SW_RES(COL_BTN_DOWN)),
- aColFL(this, SW_RES(COL_FL_LAYOUT)),
nTableWidth(0),
nMinWidth( MINLAY ),
nNoOfCols( 0 ),
nNoOfVisibleCols( 0 ),
- bModified(FALSE),
- bModifyTbl(FALSE),
- bPercentMode(FALSE)
+ bModified(sal_False),
+ bModifyTbl(sal_False),
+ bPercentMode(sal_False)
{
FreeResource();
SetExchangeSupport();
+ aDownBtn.SetAccessibleRelationMemberOf(&aColFL);
+ aUpBtn.SetAccessibleRelationMemberOf(&aColFL);
+
pFieldArr[0] = &aMF1;
pFieldArr[1] = &aMF2;
pFieldArr[2] = &aMF3;
@@ -803,7 +808,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));
};
@@ -827,7 +832,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();
@@ -836,7 +841,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 )
@@ -869,13 +874,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);
@@ -903,7 +908,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;
}
}
@@ -911,15 +916,23 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox )
{
if( aValueTbl[ MET_FIELDS -1 ] < nNoOfVisibleCols -1 )
{
- for(USHORT i=0;i < MET_FIELDS;i++)
+ for(sal_uInt16 i=0;i < MET_FIELDS;i++)
aValueTbl[i] += 1;
}
}
- for( USHORT i = 0; (i < nNoOfVisibleCols ) && ( i < MET_FIELDS); i++ )
+ for( sal_uInt16 i = 0; (i < nNoOfVisibleCols ) && ( i < MET_FIELDS); i++ )
{
String sEntry('~');
- sEntry += String::CreateFromInt32( aValueTbl[i] + 1 );
+ String sIndex = String::CreateFromInt32( aValueTbl[i] + 1 );
+ sEntry += sIndex;
pTextArr[i]->SetText( sEntry );
+//IAccessibility2 Impplementaton 2009-----
+ //added by menghu for SODC_5143,12/12/2006
+ String sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH);
+ sColumnWidth.SearchAndReplace( DEFINE_CONST_UNICODE("%1"), sIndex );
+ pFieldArr[i]->SetAccessibleName( sColumnWidth );
+ //end of SODC_5143
+//-----IAccessibility2 Impplementaton 2009
}
aDownBtn.Enable(aValueTbl[0] > 0);
@@ -931,7 +944,7 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox )
IMPL_LINK_INLINE_START( SwTableColumnPage, UpHdl, PercentField *, pEdit )
{
- bModified = TRUE;
+ bModified = sal_True;
ModifyHdl( pEdit );
return 0;
};
@@ -940,7 +953,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;
};
@@ -951,7 +964,7 @@ IMPL_LINK_INLINE_START( SwTableColumnPage, LoseFocusHdl, PercentField *, pEdit )
{
if(pEdit->IsModified())
{
- bModified = TRUE;
+ bModified = sal_True;
ModifyHdl( pEdit );
}
return 0;
@@ -961,7 +974,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)
@@ -972,9 +985,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())
{
@@ -993,8 +1006,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])
@@ -1007,10 +1020,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++ )
{
@@ -1018,8 +1031,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 )
{
@@ -1120,13 +1133,13 @@ void SwTableColumnPage::UpdateCols( USHORT nAktPos )
void SwTableColumnPage::ActivatePage( const SfxItemSet& )
{
bPercentMode = pTblData->GetWidthPercent() != 0;
- for( USHORT i = 0; (i < MET_FIELDS) && (i < nNoOfVisibleCols); i++ )
+ for( sal_uInt16 i = 0; (i < MET_FIELDS) && (i < nNoOfVisibleCols); i++ )
{
pFieldArr[i]->SetRefValue(pTblData->GetWidth());
pFieldArr[i]->ShowPercent( bPercentMode );
}
- USHORT nTblAlign = pTblData->GetAlign();
+ sal_uInt16 nTblAlign = pTblData->GetAlign();
if((text::HoriOrientation::FULL != nTblAlign && nTableWidth != pTblData->GetWidth()) ||
(text::HoriOrientation::FULL == nTblAlign && nTableWidth != pTblData->GetSpace()))
{
@@ -1135,20 +1148,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);
@@ -1220,13 +1233,13 @@ int SwTableColumnPage::DeactivatePage( SfxItemSet* _pSet )
}
_pSet->Put(SwPtrItem( FN_TABLE_REP, pTblData ));
}
- return TRUE;
+ return sal_True;
}
-SwTwips SwTableColumnPage::GetVisibleWidth(USHORT nPos)
+SwTwips SwTableColumnPage::GetVisibleWidth(sal_uInt16 nPos)
{
- USHORT i=0;
+ sal_uInt16 i=0;
while( nPos )
{
@@ -1243,9 +1256,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)
@@ -1277,8 +1290,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 )
@@ -1298,7 +1310,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();
}
@@ -1335,11 +1347,18 @@ SwTextFlowPage::SwTextFlowPage( Window* pParent,
pShell(0),
- bPageBreak(TRUE),
- bHtmlMode(FALSE)
+ bPageBreak(sal_True),
+ bHtmlMode(sal_False)
{
FreeResource();
+ aPgBrkRB.SetAccessibleRelationMemberOf(&aPgBrkCB);
+ aColBrkRB.SetAccessibleRelationMemberOf(&aPgBrkCB);
+ aPgBrkBeforeRB.SetAccessibleRelationMemberOf(&aPgBrkCB);
+ aPgBrkAfterRB.SetAccessibleRelationMemberOf(&aPgBrkCB);
+ aPageCollLB.SetAccessibleRelationLabeledBy(&aPageCollCB);
+ aPageCollLB.SetAccessibleName(aPageCollCB.GetText());
+
aPgBrkCB.SetClickHdl(LINK(this, SwTextFlowPage, PageBreakHdl_Impl));
aPgBrkBeforeRB.SetClickHdl(
LINK( this, SwTextFlowPage, PageBreakPosHdl_Impl ) );
@@ -1359,7 +1378,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
{
@@ -1383,16 +1402,16 @@ SfxTabPage* SwTextFlowPage::Create( Window* pParent,
return new SwTextFlowPage(pParent, rAttrSet);
}
-BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
//Ueberschrift wiederholen
if(aHeadLineCB.IsChecked() != aHeadLineCB.GetSavedValue() ||
- String::CreateFromInt32( static_cast< INT32 >(aRepeatHeaderNF.GetValue()) ) != aRepeatHeaderNF.GetSavedValue() )
+ String::CreateFromInt32( static_cast< sal_Int32 >(aRepeatHeaderNF.GetValue()) ) != aRepeatHeaderNF.GetSavedValue() )
{
bModified |= 0 != rSet.Put(
- SfxUInt16Item(FN_PARAM_TABLE_HEADLINE, aHeadLineCB.IsChecked()? USHORT(aRepeatHeaderNF.GetValue()) : 0 ));
+ SfxUInt16Item(FN_PARAM_TABLE_HEADLINE, aHeadLineCB.IsChecked()? sal_uInt16(aRepeatHeaderNF.GetValue()) : 0 ));
}
if(aKeepCB.IsChecked() != aKeepCB.GetSavedValue())
bModified |= 0 != rSet.Put( SvxFmtKeepItem( aKeepCB.IsChecked(), RES_KEEP));
@@ -1408,10 +1427,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() )
@@ -1423,18 +1442,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() ||
@@ -1446,7 +1465,7 @@ BOOL SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
if(bIsChecked)
{
- BOOL bBefore = aPgBrkBeforeRB.IsChecked();
+ sal_Bool bBefore = aPgBrkBeforeRB.IsChecked();
if ( aPgBrkRB.IsChecked() )
{
@@ -1478,13 +1497,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;
@@ -1503,12 +1522,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)
{
@@ -1517,17 +1536,17 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
}
String aFmtName;
- for(i = RES_POOLPAGE_BEGIN; i <= RES_POOLPAGE_REGISTER; ++i)
+ for(i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i)
if( LISTBOX_ENTRY_NOTFOUND == aPageCollLB.GetEntryPos(
aFmtName = SwStyleNameMapper::GetUIName( i, aFmtName ) ))
aPageCollLB.InsertEntry( aFmtName );
- if(SFX_ITEM_SET == rSet.GetItemState( RES_KEEP, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( RES_KEEP, sal_False, &pItem ))
{
aKeepCB.Check( ((const SvxFmtKeepItem*)pItem)->GetValue() );
aKeepCB.SaveValue();
}
- if(SFX_ITEM_SET == rSet.GetItemState( RES_LAYOUT_SPLIT, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( RES_LAYOUT_SPLIT, sal_False, &pItem ))
{
aSplitCB.Check( ((const SwFmtLayoutSplit*)pItem)->GetValue() );
}
@@ -1537,7 +1556,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() );
}
@@ -1547,7 +1566,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();
@@ -1568,19 +1587,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();
@@ -1588,36 +1607,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
}
@@ -1632,20 +1651,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 );
@@ -1653,14 +1672,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;
@@ -1690,8 +1709,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);
}
}
@@ -1708,7 +1727,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)
@@ -1720,26 +1739,26 @@ IMPL_LINK( SwTextFlowPage, PageBreakHdl_Impl, CheckBox*, EMPTYARG )
}
else
{
- aPageCollCB.Check( FALSE );
- aPageCollCB.Enable(FALSE);
- aPageCollLB.Enable(FALSE);
- aPageNoFT.Enable(FALSE);
- aPageNoNF.Enable(FALSE);
- aPgBrkRB. Enable(FALSE);
- aColBrkRB. Enable(FALSE);
- aPgBrkBeforeRB. Enable(FALSE);
- aPgBrkAfterRB. Enable(FALSE);
+ aPageCollCB.Check( sal_False );
+ aPageCollCB.Enable(sal_False);
+ aPageCollLB.Enable(sal_False);
+ aPageNoFT.Enable(sal_False);
+ aPageNoNF.Enable(sal_False);
+ aPgBrkRB. Enable(sal_False);
+ aColBrkRB. Enable(sal_False);
+ aPgBrkBeforeRB. Enable(sal_False);
+ aPgBrkAfterRB. Enable(sal_False);
}
return 0;
}
IMPL_LINK( SwTextFlowPage, ApplyCollClickHdl_Impl, CheckBox*, EMPTYARG )
{
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
if ( aPageCollCB.IsChecked() &&
aPageCollLB.GetEntryCount() )
{
- bEnable = TRUE;
+ bEnable = sal_True;
aPageCollLB.SelectEntryPos( 0 );
}
else
@@ -1763,7 +1782,7 @@ IMPL_LINK( SwTextFlowPage, PageBreakPosHdl_Impl, RadioButton*, pBtn )
{
aPageCollCB.Enable();
- BOOL bEnable = aPageCollCB.IsChecked() &&
+ sal_Bool bEnable = aPageCollCB.IsChecked() &&
aPageCollLB.GetEntryCount();
aPageCollLB.Enable(bEnable);
@@ -1775,11 +1794,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;
@@ -1789,11 +1808,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 );
@@ -1808,7 +1827,7 @@ IMPL_LINK( SwTextFlowPage, SplitHdl_Impl, CheckBox*, pBox )
IMPL_LINK( SwTextFlowPage, SplitRowHdl_Impl, TriStateBox*, pBox )
{
- pBox->EnableTriState(FALSE);
+ pBox->EnableTriState(sal_False);
return 0;
}
@@ -1821,7 +1840,7 @@ IMPL_LINK( SwTextFlowPage, HeadLineCBClickHdl, void*, EMPTYARG )
void SwTextFlowPage::DisablePageBreak()
{
- bPageBreak = FALSE;
+ bPageBreak = sal_False;
aPgBrkCB .Disable();
aPgBrkRB .Disable();
aColBrkRB .Disable();
diff --git a/sw/source/ui/table/tabledlg.hrc b/sw/source/ui/table/tabledlg.hrc
index 843bec591d9e..f03aed6afffc 100644
--- a/sw/source/ui/table/tabledlg.hrc
+++ b/sw/source/ui/table/tabledlg.hrc
@@ -108,3 +108,4 @@
#define FT_VERTORIENT 150
#define LB_VERTORIENT 151
+
diff --git a/sw/source/ui/table/tabledlg.src b/sw/source/ui/table/tabledlg.src
index f474bb63984c..1a0fc0ea55ee 100644
--- a/sw/source/ui/table/tabledlg.src
+++ b/sw/source/ui/table/tabledlg.src
@@ -98,6 +98,7 @@ TabPage TP_FORMAT_TABLE
};
Edit ED_NAME
{
+ HelpID = "sw:Edit:TP_FORMAT_TABLE:ED_NAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 75 , 14 ) ;
Size = MAP_APPFONT ( 112 , 12 ) ;
@@ -111,6 +112,7 @@ TabPage TP_FORMAT_TABLE
};
MetricField ED_WIDTH
{
+ HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_WIDTH";
Border = TRUE ;
Pos = MAP_APPFONT ( 75 , 30 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -129,6 +131,7 @@ TabPage TP_FORMAT_TABLE
};
CheckBox CB_REL_WIDTH
{
+ HelpID = "sw:CheckBox:TP_FORMAT_TABLE:CB_REL_WIDTH";
Pos = MAP_APPFONT ( 118 , 32 ) ;
Size = MAP_APPFONT ( 69 , 10 ) ;
TabStop = TRUE ;
@@ -142,6 +145,7 @@ TabPage TP_FORMAT_TABLE
};
RadioButton RB_FULL
{
+ HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_FULL";
Pos = MAP_APPFONT ( 202 , 14 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
TabStop = TRUE ;
@@ -149,6 +153,7 @@ TabPage TP_FORMAT_TABLE
};
RadioButton RB_LEFT
{
+ HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_LEFT";
Pos = MAP_APPFONT ( 202 , 28 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Text [ en-US ] = "~Left" ;
@@ -156,6 +161,7 @@ TabPage TP_FORMAT_TABLE
};
RadioButton RB_FROM_LEFT
{
+ HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_FROM_LEFT";
Pos = MAP_APPFONT ( 202 , 42 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
TabStop = TRUE ;
@@ -163,6 +169,7 @@ TabPage TP_FORMAT_TABLE
};
RadioButton RB_RIGHT
{
+ HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_RIGHT";
Pos = MAP_APPFONT ( 202 , 56 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Text [ en-US ] = "R~ight" ;
@@ -170,6 +177,7 @@ TabPage TP_FORMAT_TABLE
};
RadioButton RB_CENTER
{
+ HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_CENTER";
Pos = MAP_APPFONT ( 202 , 70 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Text [ en-US ] = "~Center" ;
@@ -177,6 +185,7 @@ TabPage TP_FORMAT_TABLE
};
RadioButton RB_FREE
{
+ HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_FREE";
Pos = MAP_APPFONT ( 202 , 84 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
TabStop = TRUE ;
@@ -202,6 +211,7 @@ TabPage TP_FORMAT_TABLE
};
MetricField ED_LEFT_DIST
{
+ HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_LEFT_DIST";
Pos = MAP_APPFONT ( 147 , 59 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Border = TRUE ;
@@ -226,6 +236,7 @@ TabPage TP_FORMAT_TABLE
MetricField ED_RIGHT_DIST
{
+ HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_RIGHT_DIST";
Pos = MAP_APPFONT ( 147 , 75 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Border = TRUE ;
@@ -249,6 +260,7 @@ TabPage TP_FORMAT_TABLE
};
MetricField ED_TOP_DIST
{
+ HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_TOP_DIST";
Pos = MAP_APPFONT ( 147 , 91 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Border = TRUE ;
@@ -272,6 +284,7 @@ TabPage TP_FORMAT_TABLE
};
MetricField ED_BOTTOM_DIST
{
+ HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_BOTTOM_DIST";
Border = TRUE ;
Pos = MAP_APPFONT ( 147 , 107 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -303,6 +316,7 @@ TabPage TP_FORMAT_TABLE
};
ListBox LB_TEXTDIRECTION
{
+ HelpID = "sw:ListBox:TP_FORMAT_TABLE:LB_TEXTDIRECTION";
Border = TRUE ;
Pos = MAP_APPFONT ( 75 , 136 ) ;
Size = MAP_APPFONT ( 176 , 50 ) ;
@@ -329,6 +343,7 @@ TabPage TP_TABLE_COLUMN
Hide = TRUE;
CheckBox CB_MOD_TBL
{
+ HelpID = "sw:CheckBox:TP_TABLE_COLUMN:CB_MOD_TBL";
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 180 , 10 ) ;
TabStop = TRUE ;
@@ -336,6 +351,7 @@ TabPage TP_TABLE_COLUMN
};
CheckBox CB_PROP
{
+ HelpID = "sw:CheckBox:TP_TABLE_COLUMN:CB_PROP";
Pos = MAP_APPFONT ( 6 , 20 ) ;
Size = MAP_APPFONT ( 180 , 10 ) ;
TabStop = TRUE ;
@@ -349,6 +365,7 @@ TabPage TP_TABLE_COLUMN
};
MetricField ED_SPACE
{
+ HelpID = "sw:MetricField:TP_TABLE_COLUMN:ED_SPACE";
ReadOnly = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 95 , 34 ) ;
@@ -365,6 +382,7 @@ TabPage TP_TABLE_COLUMN
};
ImageButton COL_BTN_DOWN
{
+ HelpID = "sw:ImageButton:TP_TABLE_COLUMN:COL_BTN_DOWN";
Disable = TRUE ;
Pos = MAP_APPFONT ( 12 , 65 ) ;
Size = MAP_APPFONT ( 10 , 10 ) ;
@@ -373,6 +391,7 @@ TabPage TP_TABLE_COLUMN
};
ImageButton COL_BTN_UP
{
+ HelpID = "sw:ImageButton:TP_TABLE_COLUMN:COL_BTN_UP";
Disable = TRUE ;
Pos = MAP_APPFONT ( 234 , 65 ) ;
Size = MAP_APPFONT ( 10 , 10 ) ;
@@ -391,6 +410,7 @@ TabPage TP_TABLE_COLUMN
};
MetricField COL_MF_1
{
+ HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_1";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 13 , 81 ) ;
@@ -418,6 +438,7 @@ TabPage TP_TABLE_COLUMN
};
MetricField COL_MF_2
{
+ HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_2";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 52 , 81 ) ;
@@ -445,6 +466,7 @@ TabPage TP_TABLE_COLUMN
};
MetricField COL_MF_3
{
+ HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_3";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 91 , 81 ) ;
@@ -472,6 +494,7 @@ TabPage TP_TABLE_COLUMN
};
MetricField COL_MF_4
{
+ HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_4";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 130 , 81 ) ;
@@ -499,6 +522,7 @@ TabPage TP_TABLE_COLUMN
};
MetricField COL_MF_5
{
+ HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_5";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 169 , 81 ) ;
@@ -526,6 +550,7 @@ TabPage TP_TABLE_COLUMN
};
MetricField COL_MF_6
{
+ HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_6";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 208 , 81 ) ;
@@ -568,6 +593,7 @@ TabPage TP_TABLE_TEXTFLOW
};
CheckBox CB_PAGEBREAK
{
+ HelpID = "sw:CheckBox:TP_TABLE_TEXTFLOW:CB_PAGEBREAK";
// Disable = TRUE;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 90 , 8 ) ;
@@ -577,6 +603,7 @@ TabPage TP_TABLE_TEXTFLOW
};
RadioButton RB_BREAKPAGE
{
+ HelpID = "sw:RadioButton:TP_TABLE_TEXTFLOW:RB_BREAKPAGE";
Pos = MAP_APPFONT ( 105 , 14 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
Text [ en-US ] = "~Page" ;
@@ -585,6 +612,7 @@ TabPage TP_TABLE_TEXTFLOW
};
RadioButton RB_BREAKCOLUMN
{
+ HelpID = "sw:RadioButton:TP_TABLE_TEXTFLOW:RB_BREAKCOLUMN";
// Disable = TRUE;
Pos = MAP_APPFONT ( 178 , 14 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
@@ -592,6 +620,7 @@ TabPage TP_TABLE_TEXTFLOW
};
RadioButton RB_PAGEBREAKBEFORE
{
+ HelpID = "sw:RadioButton:TP_TABLE_TEXTFLOW:RB_PAGEBREAKBEFORE";
// Disable = TRUE;
Pos = MAP_APPFONT ( 105 , 28 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
@@ -601,6 +630,7 @@ TabPage TP_TABLE_TEXTFLOW
};
RadioButton RB_PAGEBREAKAFTER
{
+ HelpID = "sw:RadioButton:TP_TABLE_TEXTFLOW:RB_PAGEBREAKAFTER";
// Disable = TRUE;
Pos = MAP_APPFONT ( 178 , 28 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
@@ -608,6 +638,7 @@ TabPage TP_TABLE_TEXTFLOW
};
CheckBox CB_PAGECOLL
{
+ HelpID = "sw:CheckBox:TP_TABLE_TEXTFLOW:CB_PAGECOLL";
// Disable = TRUE;
Pos = MAP_APPFONT ( 12 , 44 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
@@ -617,6 +648,7 @@ TabPage TP_TABLE_TEXTFLOW
};
ListBox LB_PAGECOLL
{
+ HelpID = "sw:ListBox:TP_TABLE_TEXTFLOW:LB_PAGECOLL";
Pos = MAP_APPFONT ( 105 , 42 ) ;
Size = MAP_APPFONT ( 61 , 50 ) ;
TabStop = TRUE ;
@@ -630,6 +662,7 @@ TabPage TP_TABLE_TEXTFLOW
};
NumericField NF_PAGENUM
{
+ HelpID = "sw:NumericField:TP_TABLE_TEXTFLOW:NF_PAGENUM";
Border = TRUE ;
Pos = MAP_APPFONT ( 222 , 42 ) ;
Size = MAP_APPFONT ( 26 , 12 ) ;
@@ -645,6 +678,7 @@ TabPage TP_TABLE_TEXTFLOW
};
CheckBox CB_SPLIT
{
+ HelpID = "sw:CheckBox:TP_TABLE_TEXTFLOW:CB_SPLIT";
Pos = MAP_APPFONT ( 12 , 58 ) ;
Size = MAP_APPFONT ( 236 , 10 ) ;
TabStop = TRUE ;
@@ -652,6 +686,7 @@ TabPage TP_TABLE_TEXTFLOW
};
TriStateBox CB_SPLIT_ROW
{
+ HelpID = "sw:TriStateBox:TP_TABLE_TEXTFLOW:CB_SPLIT_ROW";
Pos = MAP_APPFONT ( 21 , 71 ) ;
Size = MAP_APPFONT ( 227 , 10 ) ;
TabStop = TRUE ;
@@ -659,6 +694,7 @@ TabPage TP_TABLE_TEXTFLOW
};
CheckBox CB_KEEP
{
+ HelpID = "sw:CheckBox:TP_TABLE_TEXTFLOW:CB_KEEP";
Pos = MAP_APPFONT ( 12 , 85 ) ;
Size = MAP_APPFONT ( 236 , 10 ) ;
Text [ en-US ] = "~Keep with next paragraph" ;
@@ -666,6 +702,7 @@ TabPage TP_TABLE_TEXTFLOW
};
CheckBox CB_HEADLINE
{
+ HelpID = "sw:CheckBox:TP_TABLE_TEXTFLOW:CB_HEADLINE";
Pos = MAP_APPFONT ( 12 , 99 ) ;
Size = MAP_APPFONT ( 236 , 10 ) ;
TabStop = TRUE ;
@@ -679,6 +716,7 @@ TabPage TP_TABLE_TEXTFLOW
};
NumericField NF_REPEAT_HEADER
{
+ HelpID = "sw:NumericField:TP_TABLE_TEXTFLOW:NF_REPEAT_HEADER";
Border = TRUE ;
Pos = MAP_APPFONT ( 131 , 113 ) ;
Size = MAP_APPFONT ( 28 , 12 ) ;
@@ -703,6 +741,7 @@ TabPage TP_TABLE_TEXTFLOW
};
ListBox LB_TEXTDIRECTION
{
+ HelpID = "sw:ListBox:TP_TABLE_TEXTFLOW:LB_TEXTDIRECTION";
Pos = MAP_APPFONT ( 85 , 130 ) ;
Size = MAP_APPFONT ( 163 , 50 ) ;
DropDown = TRUE;
@@ -729,6 +768,7 @@ TabPage TP_TABLE_TEXTFLOW
};
ListBox LB_VERTORIENT
{
+ HelpID = "sw:ListBox:TP_TABLE_TEXTFLOW:LB_VERTORIENT";
Pos = MAP_APPFONT ( 85 , 162 ) ;
Size = MAP_APPFONT ( 61 , 50 ) ;
DropDown = TRUE;
@@ -745,4 +785,3 @@ InfoBox MSG_WRONG_TABLENAME
{
Message [ en-US ] = "The name of the table must not contain spaces." ;
};
-
diff --git a/sw/source/ui/table/tablemgr.cxx b/sw/source/ui/table/tablemgr.cxx
index 4ba208fe3945..9887e91955f0 100644
--- a/sw/source/ui/table/tablemgr.cxx
+++ b/sw/source/ui/table/tablemgr.cxx
@@ -79,7 +79,7 @@ void SwTableFUNC::ColWidthDlg( Window *pParent )
--------------------------------------------------------------------*/
-SwTwips SwTableFUNC::GetColWidth(USHORT nNum) const
+SwTwips SwTableFUNC::GetColWidth(sal_uInt16 nNum) const
{
SwTwips nWidth = 0;
@@ -95,10 +95,10 @@ SwTwips SwTableFUNC::GetColWidth(USHORT nNum) const
else
{
SwTwips nRValid = nNum < GetColCount() ?
- aCols[(USHORT)GetRightSeparator((int)nNum)]:
+ aCols[(sal_uInt16)GetRightSeparator((int)nNum)]:
aCols.GetRight();
SwTwips nLValid = nNum ?
- aCols[(USHORT)GetRightSeparator((int)nNum - 1)]:
+ aCols[(sal_uInt16)GetRightSeparator((int)nNum - 1)]:
aCols.GetLeft();
nWidth = nRValid - nLValid;
}
@@ -111,7 +111,7 @@ SwTwips SwTableFUNC::GetColWidth(USHORT nNum) const
-SwTwips SwTableFUNC::GetMaxColWidth( USHORT nNum ) const
+SwTwips SwTableFUNC::GetMaxColWidth( sal_uInt16 nNum ) const
{
OSL_ENSURE(nNum <= aCols.Count(), "Index out of Area");
@@ -133,34 +133,34 @@ SwTwips SwTableFUNC::GetMaxColWidth( USHORT nNum ) const
-void SwTableFUNC::SetColWidth(USHORT nNum, SwTwips nNewWidth )
+void SwTableFUNC::SetColWidth(sal_uInt16 nNum, SwTwips nNewWidth )
{
// aktuelle Breite setzen
// alle folgenden Verschieben
- BOOL bCurrentOnly = FALSE;
+ sal_Bool bCurrentOnly = sal_False;
if ( aCols.Count() > 0 )
{
if(aCols.Count() != GetColCount())
- bCurrentOnly = TRUE;
+ bCurrentOnly = sal_True;
SwTwips nWidth = GetColWidth(nNum);
int nDiff = (int)(nNewWidth - nWidth);
if( !nNum )
- aCols[ static_cast< USHORT >(GetRightSeparator(0)) ] += nDiff;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(0)) ] += nDiff;
else if( nNum < GetColCount() )
{
if(nDiff < GetColWidth(nNum + 1) - MINLAY)
- aCols[ static_cast< USHORT >(GetRightSeparator(nNum)) ] += nDiff;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(nNum)) ] += nDiff;
else
{
int nDiffLeft = nDiff - (int)GetColWidth(nNum + 1) + (int)MINLAY;
- aCols[ static_cast< USHORT >(GetRightSeparator(nNum)) ] += (nDiff - nDiffLeft);
- aCols[ static_cast< USHORT >(GetRightSeparator(nNum - 1)) ] -= nDiffLeft;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(nNum)) ] += (nDiff - nDiffLeft);
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(nNum - 1)) ] -= nDiffLeft;
}
}
else
- aCols[ static_cast< USHORT >(GetRightSeparator(nNum-1)) ] -= nDiff;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(nNum-1)) ] -= nDiff;
}
else
aCols.SetRight( Min( nNewWidth, aCols.GetRightMax()) );
@@ -182,7 +182,7 @@ void SwTableFUNC::InitTabCols()
-SwTableFUNC::SwTableFUNC(SwWrtShell *pShell, BOOL bCopyFmt)
+SwTableFUNC::SwTableFUNC(SwWrtShell *pShell, sal_Bool bCopyFmt)
: pFmt(pShell->GetTableFmt()),
pSh(pShell),
bCopy(bCopyFmt)
@@ -229,11 +229,11 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
aName = pSh->GetTableFmt()->GetName();
// insert node before table
pSh->MoveTable( fnTableCurr, fnTableStart );
- pSh->Up( FALSE, 1, FALSE );
+ pSh->Up( sal_False, 1, sal_False );
if ( pSh->IsCrsrInTbl() )
{
if ( aName != pSh->GetTableFmt()->GetName() )
- pSh->Down( FALSE, 1, FALSE ); // two adjacent tables
+ pSh->Down( sal_False, 1, sal_False ); // two adjacent tables
}
pSh->SplitNode();
}
@@ -274,7 +274,7 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
if ( !pClient )
{
pClient = new SwOleClient( &pSh->GetView(), &pSh->GetView().GetEditWin(), aEmbObjRef );
- pSh->SetCheckForOLEInCaption( TRUE );
+ pSh->SetCheckForOLEInCaption( sal_True );
}
pSh->CalcAndSetScale( aEmbObjRef );
//#50270# Error brauchen wir nicht handeln, das erledigt das
@@ -340,11 +340,11 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
return xChartModel;
}
-USHORT SwTableFUNC::GetCurColNum() const
+sal_uInt16 SwTableFUNC::GetCurColNum() const
{
- USHORT nPos = pSh->GetCurTabColNum();
- USHORT nCount = 0;
- for(USHORT i = 0; i < nPos; i++ )
+ sal_uInt16 nPos = pSh->GetCurTabColNum();
+ sal_uInt16 nCount = 0;
+ for(sal_uInt16 i = 0; i < nPos; i++ )
if(aCols.IsHidden(i))
nCount ++;
return nPos - nCount;
@@ -353,10 +353,10 @@ USHORT SwTableFUNC::GetCurColNum() const
-USHORT SwTableFUNC::GetColCount() const
+sal_uInt16 SwTableFUNC::GetColCount() const
{
- USHORT nCount = 0;
- for(USHORT i = 0; i < aCols.Count(); i++ )
+ sal_uInt16 nCount = 0;
+ for(sal_uInt16 i = 0; i < aCols.Count(); i++ )
if(aCols.IsHidden(i))
nCount ++;
return aCols.Count() - nCount;
@@ -370,7 +370,7 @@ int SwTableFUNC::GetRightSeparator(int nNum) const
int i = 0;
while( nNum >= 0 )
{
- if( !aCols.IsHidden( static_cast< USHORT >(i)) )
+ if( !aCols.IsHidden( static_cast< sal_uInt16 >(i)) )
nNum--;
i++;
}
diff --git a/sw/source/ui/table/tablepg.hxx b/sw/source/ui/table/tablepg.hxx
index 895cbeb54342..d18f23dcfd74 100644
--- a/sw/source/ui/table/tablepg.hxx
+++ b/sw/source/ui/table/tablepg.hxx
@@ -29,7 +29,7 @@
#define _SWTABLEPG_HXX
#include <sfx2/tabdlg.hxx>
#include <vcl/fixed.hxx>
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/lstbox.hxx>
#include <actctrl.hxx>
#include "prcntfld.hxx"
@@ -42,7 +42,7 @@ class SwTableRep;
struct TColumn
{
SwTwips nWidth;
- BOOL bVisible;
+ sal_Bool bVisible;
};
class SwFormatTablePage : public SfxTabPage
@@ -79,10 +79,10 @@ class SwFormatTablePage : public SfxTabPage
SwTableRep* pTblData;
SwTwips nSaveWidth;
SwTwips nMinTableWidth;
- USHORT nOldAlign;
- BOOL bModified;
- BOOL bFull:1;
- BOOL bHtmlMode : 1;
+ sal_uInt16 nOldAlign;
+ sal_Bool bModified;
+ sal_Bool bFull:1;
+ sal_Bool bHtmlMode : 1;
void Init();
void ModifyHdl( Edit* pEdit );
@@ -99,7 +99,7 @@ public:
SwFormatTablePage( Window* pParent, const SfxItemSet& rSet );
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void ActivatePage( const SfxItemSet& rSet );
virtual int DeactivatePage( SfxItemSet* pSet = 0 );
@@ -116,7 +116,7 @@ class SwTableColumnPage : public SfxTabPage
CheckBox aProportionalCB;
FixedText aSpaceFT;
MetricField aSpaceED;
-
+ FixedLine aColFL;
ImageButton aUpBtn;
FixedText aFT1;
PercentField aMF1;
@@ -131,31 +131,30 @@ class SwTableColumnPage : public SfxTabPage
FixedText aFT6;
PercentField aMF6;
ImageButton aDownBtn;
- FixedLine aColFL;
SwTableRep* pTblData;
PercentField* pFieldArr[MET_FIELDS];
FixedText* pTextArr[MET_FIELDS];
SwTwips nTableWidth;
SwTwips nMinWidth;
- USHORT nNoOfCols;
- USHORT nNoOfVisibleCols;
+ sal_uInt16 nNoOfCols;
+ sal_uInt16 nNoOfVisibleCols;
//Breite merken, wenn auf autom. Ausrichtung gestellt wird
- USHORT aValueTbl[MET_FIELDS];//primaere Zuordnung der MetricFields
- BOOL bModified:1;
- BOOL bModifyTbl:1;
- BOOL bPercentMode:1;
+ sal_uInt16 aValueTbl[MET_FIELDS];//primaere Zuordnung der MetricFields
+ sal_Bool bModified:1;
+ sal_Bool bModifyTbl:1;
+ sal_Bool bPercentMode:1;
- void Init(BOOL bWeb);
+ void Init(sal_Bool bWeb);
DECL_LINK( AutoClickHdl, CheckBox * );
void ModifyHdl( PercentField* pEdit );
DECL_LINK( UpHdl, PercentField * );
DECL_LINK( DownHdl, PercentField * );
DECL_LINK( LoseFocusHdl, PercentField * );
DECL_LINK( ModeHdl, CheckBox * );
- void UpdateCols( USHORT nAktPos );
- SwTwips GetVisibleWidth(USHORT nPos);
- void SetVisibleWidth(USHORT nPos, SwTwips nNewWidth);
+ void UpdateCols( sal_uInt16 nAktPos );
+ SwTwips GetVisibleWidth(sal_uInt16 nPos);
+ void SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth);
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
@@ -165,7 +164,7 @@ public:
~SwTableColumnPage();
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
virtual void ActivatePage( const SfxItemSet& rSet );
virtual int DeactivatePage( SfxItemSet* pSet = 0 );
@@ -205,8 +204,8 @@ class SwTextFlowPage : public SfxTabPage
SwWrtShell* pShell;
- BOOL bPageBreak;
- BOOL bHtmlMode;
+ sal_Bool bPageBreak;
+ sal_Bool bHtmlMode;
DECL_LINK( PageBreakHdl_Impl, CheckBox* );
@@ -223,7 +222,7 @@ class SwTextFlowPage : public SfxTabPage
public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet);
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
void SetShell(SwWrtShell* pSh);
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index 85d22e155beb..4ba64561840b 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -77,7 +77,7 @@ private:
VirtualDevice aVD;
SvtScriptedTextHelper aScriptedText;
svx::frame::Array maArray; /// Implementation to draw the frame borders.
- BOOL bFitWidth;
+ sal_Bool bFitWidth;
bool mbRTL;
Size aPrvSize;
long nLabelColWidth;
@@ -99,19 +99,19 @@ private:
//-------------------------------------------
void Init ();
void DoPaint ( const Rectangle& rRect );
- void CalcCellArray ( BOOL bFitWidth );
+ void CalcCellArray ( sal_Bool bFitWidth );
void CalcLineMap ();
void PaintCells ();
- BYTE GetFormatIndex( size_t nCol, size_t nRow ) const;
+ sal_uInt8 GetFormatIndex( size_t nCol, size_t nRow ) const;
const SvxBoxItem& GetBoxItem( size_t nCol, size_t nRow ) const;
void DrawString( size_t nCol, size_t nRow );
void DrawStrings();
void DrawBackground();
- void MakeFonts ( BYTE nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont );
- String MakeNumberString( String cellString, BOOL bAddDec );
+ void MakeFonts ( sal_uInt8 nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont );
+ String MakeNumberString( String cellString, sal_Bool bAddDec );
};
//========================================================================
@@ -170,18 +170,18 @@ SwStringInputDlg::~SwStringInputDlg()
SwAutoFormatDlg::SwAutoFormatDlg( Window* pParent, SwWrtShell* pWrtShell,
- BOOL bSetAutoFormat, const SwTableAutoFmt* pSelFmt )
+ sal_Bool bSetAutoFormat, const SwTableAutoFmt* pSelFmt )
: SfxModalDialog( pParent, SW_RES( DLG_AUTOFMT_TABLE ) ),
//
aFlFormat ( this, SW_RES( FL_FORMAT ) ),
aLbFormat ( this, SW_RES( LB_FORMAT ) ),
+ aFlFormats ( this, SW_RES( FL_FORMATS ) ),
aBtnNumFormat ( this, SW_RES( BTN_NUMFORMAT ) ),
aBtnBorder ( this, SW_RES( BTN_BORDER ) ),
aBtnFont ( this, SW_RES( BTN_FONT ) ),
aBtnPattern ( this, SW_RES( BTN_PATTERN ) ),
aBtnAlignment ( this, SW_RES( BTN_ALIGNMENT ) ),
- aFlFormats ( this, SW_RES( FL_FORMATS ) ),
aBtnOk ( this, SW_RES( BTN_OK ) ),
aBtnCancel ( this, SW_RES( BTN_CANCEL ) ),
aBtnHelp ( this, SW_RES( BTN_HELP ) ),
@@ -201,7 +201,7 @@ SwAutoFormatDlg::SwAutoFormatDlg( Window* pParent, SwWrtShell* pWrtShell,
pShell ( pWrtShell ),
nIndex ( 0 ),
nDfltStylePos ( 0 ),
- bCoreDataChanged( FALSE ),
+ bCoreDataChanged( sal_False ),
bSetAutoFmt ( bSetAutoFormat )
{
pTableTbl = new SwTableAutoFmtTbl;
@@ -261,7 +261,7 @@ void SwAutoFormatDlg::Init( const SwTableAutoFmt* pSelFmt )
nIndex = 255;
}
- for( BYTE i = 0, nCount = (BYTE)pTableTbl->Count(); i < nCount; i++ )
+ for( sal_uInt8 i = 0, nCount = (sal_uInt8)pTableTbl->Count(); i < nCount; i++ )
{
SwTableAutoFmt* pFmt = (*pTableTbl)[ i ];
aLbFormat.InsertEntry( pFmt->GetName() );
@@ -276,7 +276,7 @@ void SwAutoFormatDlg::Init( const SwTableAutoFmt* pSelFmt )
//------------------------------------------------------------------------
-void SwAutoFormatDlg::UpdateChecks( const SwTableAutoFmt& rFmt, BOOL bEnable )
+void SwAutoFormatDlg::UpdateChecks( const SwTableAutoFmt& rFmt, sal_Bool bEnable )
{
aBtnNumFormat.Enable( bEnable );
aBtnNumFormat.Check( rFmt.IsValueFormat() );
@@ -316,7 +316,7 @@ void SwAutoFormatDlg::FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const
IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn )
{
SwTableAutoFmtPtr pData = (*pTableTbl)[nIndex];
- BOOL bCheck = ((CheckBox*)pBtn)->IsChecked(), bDataChgd = TRUE;
+ sal_Bool bCheck = ((CheckBox*)pBtn)->IsChecked(), bDataChgd = sal_True;
if( pBtn == &aBtnNumFormat )
pData->SetValueFormat( bCheck );
@@ -329,14 +329,14 @@ IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn )
else if ( pBtn == &aBtnAlignment )
pData->SetJustify( bCheck );
else
- bDataChgd = FALSE;
+ bDataChgd = sal_False;
if( bDataChgd )
{
if( !bCoreDataChanged )
{
aBtnCancel.SetText( aStrClose );
- bCoreDataChanged = TRUE;
+ bCoreDataChanged = sal_True;
}
pWndPreview->NotifyChange( *pData );
@@ -349,7 +349,7 @@ IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn )
IMPL_LINK( SwAutoFormatDlg, AddHdl, void *, EMPTYARG )
{
- BOOL bOk = FALSE, bFmtInserted = FALSE;
+ sal_Bool bOk = sal_False, bFmtInserted = sal_False;
while( !bOk )
{
SwStringInputDlg* pDlg = new SwStringInputDlg( this,
@@ -363,7 +363,7 @@ IMPL_LINK( SwAutoFormatDlg, AddHdl, void *, EMPTYARG )
if( aFormatName.Len() > 0 )
{
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < pTableTbl->Count(); ++n )
if( (*pTableTbl)[n]->GetName() == aFormatName )
break;
@@ -384,16 +384,16 @@ IMPL_LINK( SwAutoFormatDlg, AddHdl, void *, EMPTYARG )
pTableTbl->Insert( pNewData, n );
aLbFormat.InsertEntry( aFormatName, nDfltStylePos + n );
aLbFormat.SelectEntryPos( nDfltStylePos + n );
- bFmtInserted = TRUE;
- aBtnAdd.Enable( FALSE );
+ bFmtInserted = sal_True;
+ aBtnAdd.Enable( sal_False );
if ( !bCoreDataChanged )
{
aBtnCancel.SetText( aStrClose );
- bCoreDataChanged = TRUE;
+ bCoreDataChanged = sal_True;
}
SelFmtHdl( 0 );
- bOk = TRUE;
+ bOk = sal_True;
}
}
@@ -406,7 +406,7 @@ IMPL_LINK( SwAutoFormatDlg, AddHdl, void *, EMPTYARG )
}
}
else
- bOk = TRUE;
+ bOk = sal_True;
delete pDlg;
}
return 0;
@@ -434,14 +434,14 @@ IMPL_LINK( SwAutoFormatDlg, RemoveHdl, void *, EMPTYARG )
if( !nIndex )
{
- aBtnRemove.Enable(FALSE);
- aBtnRename.Enable(FALSE);
+ aBtnRemove.Enable(sal_False);
+ aBtnRename.Enable(sal_False);
}
if( !bCoreDataChanged )
{
aBtnCancel.SetText( aStrClose );
- bCoreDataChanged = TRUE;
+ bCoreDataChanged = sal_True;
}
}
delete pBox;
@@ -453,7 +453,7 @@ IMPL_LINK( SwAutoFormatDlg, RemoveHdl, void *, EMPTYARG )
IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
while( !bOk )
{
SwStringInputDlg* pDlg = new SwStringInputDlg( this,
@@ -461,13 +461,13 @@ IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG )
aEmptyStr );
if( pDlg->Execute() == RET_OK )
{
- BOOL bFmtRenamed = FALSE;
+ sal_Bool bFmtRenamed = sal_False;
String aFormatName;
pDlg->GetInputString( aFormatName );
if ( aFormatName.Len() > 0 )
{
- USHORT n;
+ sal_uInt16 n;
for( n = 0; n < pTableTbl->Count(); ++n )
if ((*pTableTbl)[n]->GetName() == aFormatName)
break;
@@ -495,12 +495,12 @@ IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG )
if ( !bCoreDataChanged )
{
aBtnCancel.SetText( aStrClose );
- bCoreDataChanged = TRUE;
+ bCoreDataChanged = sal_True;
}
SelFmtHdl( 0 );
- bOk = TRUE;
- bFmtRenamed = TRUE;
+ bOk = sal_True;
+ bFmtRenamed = sal_True;
}
}
@@ -513,7 +513,7 @@ IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG )
}
}
else
- bOk = TRUE;
+ bOk = sal_True;
delete pDlg;
}
return 0;
@@ -523,30 +523,30 @@ IMPL_LINK( SwAutoFormatDlg, RenameHdl, void *, EMPTYARG )
IMPL_LINK( SwAutoFormatDlg, SelFmtHdl, void *, EMPTYARG )
{
- BOOL bBtnEnable = FALSE;
- BYTE nSelPos = (BYTE) aLbFormat.GetSelectEntryPos(), nOldIdx = nIndex;
+ sal_Bool bBtnEnable = sal_False;
+ sal_uInt8 nSelPos = (sal_uInt8) aLbFormat.GetSelectEntryPos(), nOldIdx = nIndex;
if( nSelPos >= nDfltStylePos )
{
nIndex = nSelPos - nDfltStylePos;
pWndPreview->NotifyChange( *(*pTableTbl)[nIndex] );
bBtnEnable = 0 != nIndex;
- UpdateChecks( *(*pTableTbl)[nIndex], TRUE );
+ UpdateChecks( *(*pTableTbl)[nIndex], sal_True );
}
else
{
nIndex = 255;
SwTableAutoFmt aTmp( ViewShell::GetShellRes()->aStrNone );
- aTmp.SetFont( FALSE );
- aTmp.SetJustify( FALSE );
- aTmp.SetFrame( FALSE );
- aTmp.SetBackground( FALSE );
- aTmp.SetValueFormat( FALSE );
- aTmp.SetWidthHeight( FALSE );
+ aTmp.SetFont( sal_False );
+ aTmp.SetJustify( sal_False );
+ aTmp.SetFrame( sal_False );
+ aTmp.SetBackground( sal_False );
+ aTmp.SetValueFormat( sal_False );
+ aTmp.SetWidthHeight( sal_False );
if( nOldIdx != nIndex )
pWndPreview->NotifyChange( aTmp );
- UpdateChecks( aTmp, FALSE );
+ UpdateChecks( aTmp, sal_False );
}
aBtnRemove.Enable( bBtnEnable );
@@ -561,7 +561,7 @@ IMPL_LINK_INLINE_START( SwAutoFormatDlg, OkHdl, Button *, EMPTYARG )
if( bSetAutoFmt )
pShell->SetTableAutoFmt( *(*pTableTbl)[ nIndex ] );
EndDialog( RET_OK );
- return TRUE;
+ return sal_True;
}
IMPL_LINK_INLINE_END( SwAutoFormatDlg, OkHdl, Button *, EMPTYARG )
@@ -576,7 +576,7 @@ AutoFmtPreview::AutoFmtPreview( Window* pParent, const ResId& rRes, SwWrtShell*
aCurData ( aEmptyStr ),
aVD ( *this ),
aScriptedText ( aVD ),
- bFitWidth ( FALSE ),
+ bFitWidth ( sal_False ),
mbRTL ( false ),
aPrvSize ( GetSizePixel().Width() - 6, GetSizePixel().Height() - 30 ),
nLabelColWidth ( (aPrvSize.Width() - 4) / 4 - 12 ),
@@ -639,7 +639,7 @@ rFont.MethodName( Value ); \
rCJKFont.MethodName( Value ); \
rCTLFont.MethodName( Value );
-void AutoFmtPreview::MakeFonts( BYTE nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont )
+void AutoFmtPreview::MakeFonts( sal_uInt8 nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont )
{
const SwBoxAutoFmt& rBoxFmt = aCurData.GetBoxFmt( nIndex );
@@ -657,14 +657,14 @@ void AutoFmtPreview::MakeFonts( BYTE nIndex, Font& rFont, Font& rCJKFont, Font&
SETONALLFONTS( SetShadow, rBoxFmt.GetShadowed().GetValue() );
SETONALLFONTS( SetColor, rBoxFmt.GetColor().GetValue() );
SETONALLFONTS( SetSize, aFontSize );
- SETONALLFONTS( SetTransparent, TRUE );
+ SETONALLFONTS( SetTransparent, sal_True );
}
//------------------------------------------------------------------------
-BYTE AutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const
+sal_uInt8 AutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const
{
- static const BYTE pnFmtMap[] =
+ static const sal_uInt8 pnFmtMap[] =
{
0, 1, 2, 1, 3,
4, 5, 6, 5, 7,
@@ -687,10 +687,10 @@ void AutoFmtPreview::DrawString( size_t nCol, size_t nRow )
//------------------------
// Ausgabe des Zelltextes:
//------------------------
- ULONG nNum;
+ sal_uLong nNum;
double nVal;
String cellString;
- BYTE nIndex = static_cast< BYTE >( maArray.GetCellIndex( nCol, nRow, mbRTL ) );
+ sal_uInt8 nIndex = static_cast< sal_uInt8 >( maArray.GetCellIndex( nCol, nRow, mbRTL ) );
switch( nIndex )
{
@@ -730,10 +730,10 @@ MAKENUMSTR:
if( aCurData.IsValueFormat() )
{
String sFmt; LanguageType eLng, eSys;
- aCurData.GetBoxFmt( (BYTE)nNum ).GetValueFormat( sFmt, eLng, eSys );
+ aCurData.GetBoxFmt( (sal_uInt8)nNum ).GetValueFormat( sFmt, eLng, eSys );
short nType;
- BOOL bNew;
+ sal_Bool bNew;
xub_StrLen nCheckPos;
sal_uInt32 nKey = pNumFmt->GetIndexPuttingAndConverting( sFmt, eLng,
eSys, nType, bNew, nCheckPos);
@@ -749,10 +749,10 @@ MAKENUMSTR:
if( cellString.Len() )
{
Size aStrSize;
- BYTE nFmtIndex = GetFormatIndex( nCol, nRow );
+ sal_uInt8 nFmtIndex = GetFormatIndex( nCol, nRow );
Rectangle cellRect = maArray.GetCellRect( nCol, nRow );
Point aPos = cellRect.TopLeft();
- USHORT nRightX = 0;
+ sal_uInt16 nRightX = 0;
Size theMaxStrSize( cellRect.GetWidth() - FRAME_OFFSET,
cellRect.GetHeight() - FRAME_OFFSET );
@@ -786,14 +786,14 @@ MAKENUMSTR:
aStrSize = aScriptedText.GetTextSize();
}
- nRightX = (USHORT)( cellRect.GetWidth()
+ nRightX = (sal_uInt16)( cellRect.GetWidth()
- aStrSize.Width()
- FRAME_OFFSET );
//-----------------------------
// vertikal (immer zentrieren):
//-----------------------------
- aPos.Y() += (nRowHeight - (USHORT)aStrSize.Height()) / 2;
+ aPos.Y() += (nRowHeight - (sal_uInt16)aStrSize.Height()) / 2;
//-----------
// horizontal
@@ -802,7 +802,7 @@ MAKENUMSTR:
aPos.X() += nRightX;
else if (aCurData.IsJustify())
{
- USHORT nHorPos = (USHORT)
+ sal_uInt16 nHorPos = (sal_uInt16)
((cellRect.GetWidth()-aStrSize.Width())/2);
const SvxAdjustItem& rAdj = aCurData.GetBoxFmt(nFmtIndex).GetAdjust();
switch ( rAdj.GetAdjust() )
@@ -897,14 +897,14 @@ void AutoFmtPreview::Init()
SetBorderStyle( GetBorderStyle() | WINDOW_BORDER_MONO );
maArray.Initialize( 5, 5 );
maArray.SetUseDiagDoubleClipping( false );
- CalcCellArray( FALSE );
+ CalcCellArray( sal_False );
CalcLineMap();
}
//------------------------------------------------------------------------
-void AutoFmtPreview::CalcCellArray( BOOL _bFitWidth )
+void AutoFmtPreview::CalcCellArray( sal_Bool _bFitWidth )
{
maArray.SetXOffset( 2 );
maArray.SetAllColWidths( _bFitWidth ? nDataColWidth2 : nDataColWidth1 );
@@ -958,7 +958,7 @@ void AutoFmtPreview::CalcLineMap()
void AutoFmtPreview::NotifyChange( const SwTableAutoFmt& rNewData )
{
aCurData = rNewData;
- bFitWidth = aCurData.IsJustify();//TRUE; //???
+ bFitWidth = aCurData.IsJustify();//sal_True; //???
CalcCellArray( bFitWidth );
CalcLineMap();
DoPaint( Rectangle( Point(0,0), GetSizePixel() ) );
@@ -982,7 +982,7 @@ void AutoFmtPreview::DoPaint( const Rectangle& /*rRect*/ )
Font aFont;
aFont = aVD.GetFont();
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
aVD.SetFont ( aFont );
aVD.SetLineColor ();
diff --git a/sw/source/ui/table/tautofmt.src b/sw/source/ui/table/tautofmt.src
index c4084cf65086..1b3d66b79905 100644
--- a/sw/source/ui/table/tautofmt.src
+++ b/sw/source/ui/table/tautofmt.src
@@ -43,6 +43,7 @@ ModalDialog DLG_AUTOFMT_TABLE
};
ListBox LB_FORMAT
{
+ HelpID = "sw:ListBox:DLG_AUTOFMT_TABLE:LB_FORMAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 65 , 100 ) ;
@@ -56,6 +57,7 @@ ModalDialog DLG_AUTOFMT_TABLE
};
CheckBox BTN_NUMFORMAT
{
+ HelpID = "sw:CheckBox:DLG_AUTOFMT_TABLE:BTN_NUMFORMAT";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 131 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
@@ -64,6 +66,7 @@ ModalDialog DLG_AUTOFMT_TABLE
};
CheckBox BTN_BORDER
{
+ HelpID = "sw:CheckBox:DLG_AUTOFMT_TABLE:BTN_BORDER";
Hide = TRUE ;
Pos = MAP_APPFONT ( 12 , 147 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
@@ -72,6 +75,7 @@ ModalDialog DLG_AUTOFMT_TABLE
};
CheckBox BTN_FONT
{
+ HelpID = "sw:CheckBox:DLG_AUTOFMT_TABLE:BTN_FONT";
Hide = TRUE ;
Pos = MAP_APPFONT ( 85 , 131 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
@@ -80,6 +84,7 @@ ModalDialog DLG_AUTOFMT_TABLE
};
CheckBox BTN_PATTERN
{
+ HelpID = "sw:CheckBox:DLG_AUTOFMT_TABLE:BTN_PATTERN";
Hide = TRUE ;
Pos = MAP_APPFONT ( 85 , 147 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
@@ -88,6 +93,7 @@ ModalDialog DLG_AUTOFMT_TABLE
};
CheckBox BTN_ALIGNMENT
{
+ HelpID = "sw:CheckBox:DLG_AUTOFMT_TABLE:BTN_ALIGNMENT";
Hide = TRUE ;
Pos = MAP_APPFONT ( 150 , 131 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
@@ -116,6 +122,7 @@ ModalDialog DLG_AUTOFMT_TABLE
};
MoreButton BTN_MORE
{
+ HelpID = "sw:MoreButton:DLG_AUTOFMT_TABLE:BTN_MORE";
Pos = MAP_APPFONT ( 255 , 101 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~More" ;
@@ -125,6 +132,7 @@ ModalDialog DLG_AUTOFMT_TABLE
};
PushButton BTN_ADD
{
+ HelpID = "sw:PushButton:DLG_AUTOFMT_TABLE:BTN_ADD";
Pos = MAP_APPFONT ( 255 , 64 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Add" ;
@@ -132,6 +140,7 @@ ModalDialog DLG_AUTOFMT_TABLE
};
PushButton BTN_REMOVE
{
+ HelpID = "sw:PushButton:DLG_AUTOFMT_TABLE:BTN_REMOVE";
Pos = MAP_APPFONT ( 255 , 81 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete" ;
@@ -139,6 +148,7 @@ ModalDialog DLG_AUTOFMT_TABLE
};
PushButton BTN_RENAME
{
+ HelpID = "sw:PushButton:DLG_AUTOFMT_TABLE:BTN_RENAME";
Pos = MAP_APPFONT ( 255 , 123 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -217,6 +227,7 @@ ModalDialog DLG_SWDLG_STRINPUT
HelpID = HID_SWDLG_STRINPUT ;
Edit ED_INPUT
{
+ HelpID = "sw:Edit:DLG_SWDLG_STRINPUT:ED_INPUT";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 24 ) ;
Size = MAP_APPFONT ( 104 , 12 ) ;
diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx
index 58a14c3e29e5..0fa7a6a00071 100644
--- a/sw/source/ui/uiview/formatclipboard.cxx
+++ b/sw/source/ui/uiview/formatclipboard.cxx
@@ -184,13 +184,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)
{
@@ -212,7 +212,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();
@@ -220,52 +220,52 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
{
//RES_SHADOW
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_SHADOW), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_SHADOW), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
//RES_BREAK
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_BREAK), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_BREAK), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
//RES_PAGEDESC
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_PAGEDESC), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_PAGEDESC), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
//RES_LAYOUT_SPLIT
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_LAYOUT_SPLIT), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_LAYOUT_SPLIT), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
//RES_KEEP
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_KEEP), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_KEEP), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
//RES_FRAMEDIR
pItem=0;
- rSet.GetItemState(rSet.GetPool()->GetWhich(RES_FRAMEDIR), FALSE, &pItem);
+ rSet.GetItemState(rSet.GetPool()->GetWhich(RES_FRAMEDIR), sal_False, &pItem);
if(pItem)
pFrmFmt->SetFmtAttr( *pItem );
}
- if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTDIRECTION, FALSE, &pItem) )
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTDIRECTION, sal_False, &pItem) )
{
SvxFrameDirectionItem aDirection( FRMDIR_ENVIRONMENT, RES_FRAMEDIR );
aDirection.SetValue(static_cast< const SvxFrameDirectionItem* >(pItem)->GetValue());
rSh.SetBoxDirection(aDirection);
}
- if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, FALSE, &pItem))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, sal_False, &pItem))
rSh.SetBoxAlign(((SfxUInt16Item*)(pItem))->GetValue());
- if( SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, FALSE, &pItem) )
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, sal_False, &pItem) )
rSh.SetRowSplit(*static_cast<const SwFmtRowSplit*>(pItem));
}
}//end anonymous namespace
@@ -335,8 +335,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
{
@@ -386,7 +386,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) );
@@ -417,7 +417,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;
@@ -425,10 +425,10 @@ typedef std::vector< SfxPoolItemSharedPtr > ItemVector;
// collect all PoolItems from the applied styles
void lcl_AppendSetItems( ItemVector& rItemVector, const SfxItemSet& rStyleAttrSet )
{
- const USHORT* pRanges = rStyleAttrSet.GetRanges();
+ const sal_uInt16* pRanges = rStyleAttrSet.GetRanges();
while( *pRanges )
{
- for ( USHORT nWhich = *pRanges; nWhich <= *(pRanges+1); ++nWhich )
+ for ( sal_uInt16 nWhich = *pRanges; nWhich <= *(pRanges+1); ++nWhich )
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rStyleAttrSet.GetItemState( nWhich, sal_False, &pItem ) )
@@ -483,7 +483,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
SwFmtCharFmt aFmt(pStyle->GetCharFmt());
// collect items from character style
lcl_AppendSetItems( aItemVector, aFmt.GetCharFmt()->GetAttrSet());
- USHORT nFlags=0;
+ sal_uInt16 nFlags=0;
rWrtShell.SetAttr( aFmt, nFlags );
}
}
@@ -506,7 +506,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);
}
}
@@ -532,22 +532,22 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
{
if( SFX_ITEM_SET == pTemplateItemSet->GetItemState(FN_NUMBER_NEWSTART) )
{
- BOOL bStart = ((SfxBoolItem&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART)).GetValue();
- USHORT nNumStart = USHRT_MAX;
+ sal_Bool bStart = ((SfxBoolItem&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART)).GetValue();
+ sal_uInt16 nNumStart = USHRT_MAX;
if( SFX_ITEM_SET == pTemplateItemSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
{
nNumStart = ((SfxUInt16Item&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
if(USHRT_MAX != nNumStart)
- bStart = FALSE;
+ bStart = sal_False;
}
rWrtShell.SetNumRuleStart(bStart);
rWrtShell.SetNodeNumStart(nNumStart);
}
else if( SFX_ITEM_SET == pTemplateItemSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
{
- USHORT nNumStart = ((SfxUInt16Item&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
+ sal_uInt16 nNumStart = ((SfxUInt16Item&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
rWrtShell.SetNodeNumStart(nNumStart);
- rWrtShell.SetNumRuleStart(FALSE);
+ rWrtShell.SetNumRuleStart(sal_False);
}
}
}
diff --git a/sw/source/ui/uiview/makefile.mk b/sw/source/ui/uiview/makefile.mk
deleted file mode 100644
index 70a4efa525e9..000000000000
--- a/sw/source/ui/uiview/makefile.mk
+++ /dev/null
@@ -1,77 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=uiview
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- view.src \
- pview.src
-
-EXCEPTIONSFILES= \
- $(SLO)$/formatclipboard.obj \
- $(SLO)$/pview.obj \
- $(SLO)$/scroll.obj \
- $(SLO)$/srcview.obj \
- $(SLO)$/swcli.obj \
- $(SLO)$/uivwimp.obj \
- $(SLO)$/view.obj \
- $(SLO)$/view0.obj \
- $(SLO)$/view1.obj \
- $(SLO)$/view2.obj \
- $(SLO)$/viewcoll.obj \
- $(SLO)$/viewdlg.obj \
- $(SLO)$/viewdlg2.obj \
- $(SLO)$/viewdraw.obj \
- $(SLO)$/viewling.obj \
- $(SLO)$/viewmdi.obj \
- $(SLO)$/viewport.obj \
- $(SLO)$/viewprt.obj \
- $(SLO)$/viewsrch.obj \
- $(SLO)$/viewstat.obj \
- $(SLO)$/viewtab.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-$(SRS)$/uiview.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc
-
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index 96f882aad91d..490b93b03f2a 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -36,7 +36,6 @@
#include <vcl/help.hxx>
#include <vcl/cmdevt.hxx>
#include <vcl/button.hxx>
-#include <svtools/printdlg.hxx>
#include <svl/whiter.hxx>
#include <svl/stritem.hxx>
#include <svl/eitem.hxx>
@@ -69,7 +68,7 @@
#include <view.hxx>
#include <textsh.hxx>
#include <scroll.hxx>
-#include <swprtopt.hxx>
+#include <prtopt.hxx>
#include <docstat.hxx>
#include <usrpref.hxx>
#include <viewfunc.hxx>
@@ -89,8 +88,8 @@
#include <svx/dialogs.hrc>
#include <osl/mutex.hxx>
-using namespace ::com::sun::star;
+using namespace ::com::sun::star;
SFX_IMPL_NAMED_VIEWFACTORY(SwPagePreView, "PrintPreview")
{
SFX_VIEW_REGISTRATION(SwDocShell);
@@ -114,13 +113,13 @@ TYPEINIT1(SwPagePreView,SfxViewShell)
#define MIN_PREVIEW_ZOOM 25
#define MAX_PREVIEW_ZOOM 600
-USHORT lcl_GetNextZoomStep(USHORT nCurrentZoom, BOOL bZoomIn)
+sal_uInt16 lcl_GetNextZoomStep(sal_uInt16 nCurrentZoom, sal_Bool bZoomIn)
{
- static USHORT aZoomArr[] =
+ static sal_uInt16 aZoomArr[] =
{
25, 50, 75, 100, 150, 200, 400, 600
};
- const sal_uInt16 nZoomArrSize = sizeof(aZoomArr)/sizeof(USHORT);
+ const sal_uInt16 nZoomArrSize = sizeof(aZoomArr)/sizeof(sal_uInt16);
if(bZoomIn)
for(int i = nZoomArrSize - 1; i >= 0; --i)
{
@@ -138,7 +137,7 @@ USHORT lcl_GetNextZoomStep(USHORT nCurrentZoom, BOOL bZoomIn)
void lcl_InvalidateZoomSlots(SfxBindings& rBindings)
{
- static USHORT const aInval[] =
+ static sal_uInt16 const aInval[] =
{
SID_ATTR_ZOOM, SID_ZOOM_OUT, SID_ZOOM_IN, SID_ATTR_ZOOMSLIDER, FN_PREVIEW_ZOOM, FN_STAT_ZOOM,
0
@@ -181,15 +180,12 @@ SwPreViewZoomDlg::SwPreViewZoomDlg( SwPagePreViewWin& rParent ) :
aColEdit.SetValue( rParent.GetCol() );
}
-SwPreViewZoomDlg::~SwPreViewZoomDlg()
-{
-}
-
+SwPreViewZoomDlg::~SwPreViewZoomDlg() {}
void SwPreViewZoomDlg::Apply()
{
((SwPagePreViewWin*)GetParent())->CalcWish(
- BYTE(aRowEdit.GetValue()),
- BYTE(aColEdit.GetValue()) );
+ sal_uInt8(aRowEdit.GetValue()),
+ sal_uInt8(aColEdit.GetValue()) );
}
// alles fuers SwPagePreViewWin
@@ -206,7 +202,7 @@ SwPagePreViewWin::SwPagePreViewWin( Window *pParent, SwPagePreView& rPView )
SetLineColor( GetBackground().GetColor());
SetMapMode( MapMode(MAP_TWIP) );
- const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(FALSE);
+ const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(sal_False);
mnRow = pUsrPref->GetPagePrevRow(); // 1 Zeile
mnCol = pUsrPref->GetPagePrevCol(); // 1 Spalte
mnSttPage = USHRT_MAX;
@@ -246,15 +242,15 @@ void SwPagePreViewWin::Paint( const Rectangle& rRect )
}
}
-void SwPagePreViewWin::CalcWish( BYTE nNewRow, BYTE nNewCol )
+void SwPagePreViewWin::CalcWish( sal_uInt8 nNewRow, sal_uInt8 nNewCol )
{
if( !mpViewShell || !mpViewShell->GetLayout() )
return;
- USHORT nOldCol = mnCol;
+ sal_uInt16 nOldCol = mnCol;
mnRow = nNewRow;
mnCol = nNewCol;
- USHORT nPages = mnRow * mnCol,
+ sal_uInt16 nPages = mnRow * mnCol,
nLastSttPg = mrView.GetPageCount()+1 > nPages
? mrView.GetPageCount()+1 - nPages : 0;
if( mnSttPage > nLastSttPg )
@@ -274,7 +270,7 @@ void SwPagePreViewWin::CalcWish( BYTE nNewRow, BYTE nNewCol )
// Sortierung muss eingehalten werden!!
// additional invalidate page status.
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
SID_ATTR_ZOOM, SID_ZOOM_OUT, SID_ZOOM_IN,
FN_PREVIEW_ZOOM,
@@ -297,10 +293,10 @@ void SwPagePreViewWin::CalcWish( BYTE nNewRow, BYTE nNewCol )
int SwPagePreViewWin::MovePage( int eMoveMode )
{
// soviele Seiten hoch
- USHORT nPages = mnRow * mnCol;
- USHORT nNewSttPage = mnSttPage;
- USHORT nPageCount = mrView.GetPageCount();
- USHORT nDefSttPg = GetDefSttPage();
+ sal_uInt16 nPages = mnRow * mnCol;
+ sal_uInt16 nNewSttPage = mnSttPage;
+ sal_uInt16 nPageCount = mrView.GetPageCount();
+ sal_uInt16 nDefSttPg = GetDefSttPage();
bool bPaintPageAtFirstCol = true;
switch( eMoveMode )
@@ -377,13 +373,13 @@ int SwPagePreViewWin::MovePage( int eMoveMode )
maPaintedPreviewDocRect, bPaintPageAtFirstCol );
if( nNewSttPage == mnSttPage &&
eMoveMode != MV_SELPAGE )
- return FALSE;
+ return sal_False;
SetPagePreview(mnRow, mnCol);
mnSttPage = nNewSttPage;
// additional invalidate page status.
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, 0
@@ -392,7 +388,7 @@ int SwPagePreViewWin::MovePage( int eMoveMode )
SfxBindings& rBindings = mrView.GetViewFrame()->GetBindings();
rBindings.Invalidate( aInval );
- return TRUE;
+ return sal_True;
}
void SwPagePreViewWin::SetWinSize( const Size& rNewSize )
@@ -422,7 +418,7 @@ void SwPagePreViewWin::SetWinSize( const Size& rNewSize )
maScale = GetMapMode().GetScaleX();
}
-void SwPagePreViewWin::GetStatusStr( String& rStr, USHORT nPageCnt ) const
+void SwPagePreViewWin::GetStatusStr( String& rStr, sal_uInt16 nPageCnt ) const
{
// show physical and virtual page number of
// selected page, if it's visible.
@@ -449,11 +445,11 @@ void SwPagePreViewWin::GetStatusStr( String& rStr, USHORT nPageCnt ) const
void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt )
{
const KeyCode& rKeyCode = rKEvt.GetKeyCode();
- USHORT nKey = rKeyCode.GetCode();
- BOOL bHandled = FALSE;
+ sal_uInt16 nKey = rKeyCode.GetCode();
+ sal_Bool bHandled = sal_False;
if(!rKeyCode.GetModifier())
{
- USHORT nSlot = 0;
+ sal_uInt16 nSlot = 0;
switch(nKey)
{
case KEY_ADD : nSlot = SID_ZOOM_OUT; break;
@@ -462,7 +458,7 @@ void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt )
}
if(nSlot)
{
- bHandled = TRUE;
+ bHandled = sal_True;
mrView.GetViewFrame()->GetDispatcher()->Execute(
nSlot, SFX_CALLMODE_ASYNCHRON );
}
@@ -473,12 +469,12 @@ void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt )
void SwPagePreViewWin::Command( const CommandEvent& rCEvt )
{
- BOOL bCallBase = TRUE;
+ sal_Bool bCallBase = sal_True;
switch( rCEvt.GetCommand() )
{
case COMMAND_CONTEXTMENU:
mrView.GetViewFrame()->GetDispatcher()->ExecutePopup();
- bCallBase = FALSE;
+ bCallBase = sal_False;
break;
case COMMAND_WHEEL:
@@ -542,7 +538,7 @@ void SwPagePreViewWin::MouseButtonDown( const MouseEvent& rMEvt )
mrView.SetVScrollbarThumbPos( nNewSelectedPage );
}
// invalidate page status.
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
FN_STAT_PAGE, 0
};
@@ -555,9 +551,9 @@ void SwPagePreViewWin::MouseButtonDown( const MouseEvent& rMEvt )
/******************************************************************************
* Beschreibung: Userprefs bzw Viewoptions setzen
******************************************************************************/
-void SwPagePreViewWin::SetPagePreview( BYTE nRow, BYTE nCol )
+void SwPagePreViewWin::SetPagePreview( sal_uInt8 nRow, sal_uInt8 nCol )
{
- SwMasterUsrPref *pOpt = (SwMasterUsrPref *)SW_MOD()->GetUsrPref(FALSE);
+ SwMasterUsrPref *pOpt = (SwMasterUsrPref *)SW_MOD()->GetUsrPref(sal_False);
if (nRow != pOpt->GetPagePrevRow() || nCol != pOpt->GetPagePrevCol())
{
@@ -644,7 +640,7 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp,
const int eMvMode = _bPgUp ?
SwPagePreViewWin::MV_PAGE_UP :
SwPagePreViewWin::MV_PAGE_DOWN;
- if ( ChgPage( eMvMode, TRUE ) )
+ if ( ChgPage( eMvMode, sal_True ) )
aViewWin.Invalidate();
}
else
@@ -688,7 +684,7 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp,
}
ScrollViewSzChg();
// additional invalidate page status.
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, 0
@@ -707,8 +703,8 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp,
void SwPagePreView::Execute( SfxRequest &rReq )
{
int eMvMode;
- BYTE nRow = 1;
- BOOL bRetVal = FALSE;
+ sal_uInt8 nRow = 1;
+ sal_Bool bRetVal = sal_False;
bool bRefresh = true;
switch(rReq.GetSlot())
@@ -723,9 +719,9 @@ void SwPagePreView::Execute( SfxRequest &rReq )
const SfxItemSet *pArgs = rReq.GetArgs();
if( pArgs && pArgs->Count() >= 2 )
{
- BYTE nCols = (BYTE)((SfxUInt16Item &)pArgs->Get(
+ sal_uInt8 nCols = (sal_uInt8)((SfxUInt16Item &)pArgs->Get(
SID_ATTR_TABLE_COLUMN)).GetValue();
- BYTE nRows = (BYTE)((SfxUInt16Item &)pArgs->Get(
+ sal_uInt8 nRows = (sal_uInt8)((SfxUInt16Item &)pArgs->Get(
SID_ATTR_TABLE_ROW)).GetValue();
aViewWin.CalcWish( nRows, nCols );
@@ -740,7 +736,7 @@ void SwPagePreView::Execute( SfxRequest &rReq )
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
bool bBookPreview = GetViewShell()->GetViewOptions()->IsPagePrevBookview();
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_SHOW_BOOKVIEW, FALSE, &pItem ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_SHOW_BOOKVIEW, sal_False, &pItem ) )
{
bBookPreview = static_cast< const SfxBoolItem* >( pItem )->GetValue();
( ( SwViewOption* ) GetViewShell()->GetViewOptions() )->SetPagePrevBookview( bBookPreview );
@@ -751,7 +747,7 @@ void SwPagePreView::Execute( SfxRequest &rReq )
// book preview mode changed. Thus, adjust scrollbars and
// invalidate corresponding states.
ScrollViewSzChg();
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, FN_SHOW_BOOKVIEW, 0
@@ -803,13 +799,13 @@ void SwPagePreView::Execute( SfxRequest &rReq )
if( pArgs )
{
enum SvxZoomType eType = SVX_ZOOM_PERCENT;
- USHORT nZoomFactor = USHRT_MAX;
- if(SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOM, TRUE, &pItem))
+ sal_uInt16 nZoomFactor = USHRT_MAX;
+ if(SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOM, sal_True, &pItem))
{
eType = ((const SvxZoomItem *)pItem)->GetType();
nZoomFactor = ((const SvxZoomItem *)pItem)->GetValue();
}
- else if(SFX_ITEM_SET == pArgs->GetItemState(FN_PREVIEW_ZOOM, TRUE, &pItem))
+ else if(SFX_ITEM_SET == pArgs->GetItemState(FN_PREVIEW_ZOOM, sal_True, &pItem))
nZoomFactor = ((const SfxUInt16Item *)pItem)->GetValue();
if(USHRT_MAX != nZoomFactor)
SetZoom(eType, nZoomFactor);
@@ -822,9 +818,9 @@ void SwPagePreView::Execute( SfxRequest &rReq )
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, TRUE, &pItem ) )
+ if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, sal_True, &pItem ) )
{
- const USHORT nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
+ const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
SetZoom( SVX_ZOOM_PERCENT, nCurrentZoom );
}
}
@@ -871,12 +867,12 @@ void SwPagePreView::Execute( SfxRequest &rReq )
{
aViewWin.SetSelectedPage( nNewSelectedPage );
aViewWin.SetSttPage( nNewStartPage );
- int nRet = ChgPage( SwPagePreViewWin::MV_SELPAGE, TRUE );
+ int nRet = ChgPage( SwPagePreViewWin::MV_SELPAGE, sal_True );
bRefresh = 0 != nRet;
}
GetViewShell()->ShowPreViewSelection( nNewSelectedPage );
// invalidate page status.
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
FN_STAT_PAGE, 0
};
@@ -899,14 +895,14 @@ void SwPagePreView::Execute( SfxRequest &rReq )
case FN_START_OF_LINE:
case FN_START_OF_DOCUMENT:
aViewWin.SetSelectedPage( 1 );
- eMvMode = SwPagePreViewWin::MV_DOC_STT; bRetVal = TRUE; goto MOVEPAGE;
+ eMvMode = SwPagePreViewWin::MV_DOC_STT; bRetVal = sal_True; goto MOVEPAGE;
case FN_END_OF_LINE:
case FN_END_OF_DOCUMENT:
aViewWin.SetSelectedPage( mnPageCount );
- eMvMode = SwPagePreViewWin::MV_DOC_END; bRetVal = TRUE; goto MOVEPAGE;
+ eMvMode = SwPagePreViewWin::MV_DOC_END; bRetVal = sal_True; goto MOVEPAGE;
MOVEPAGE:
{
- int nRet = ChgPage( eMvMode, TRUE );
+ int nRet = ChgPage( eMvMode, sal_True );
// return value fuer Basic
if(bRetVal)
rReq.SetReturnValue(SfxBoolItem(rReq.GetSlot(), nRet == 0));
@@ -922,14 +918,14 @@ MOVEPAGE:
// die Sache mit der Orientation
if(pPPVPD)
{
- SfxPrinter* pPrinter = GetPrinter( TRUE );
+ SfxPrinter* pPrinter = GetPrinter( sal_True );
if((pPrinter->GetOrientation() == ORIENTATION_LANDSCAPE)
!= pPPVPD->GetLandscape())
pPrinter->SetOrientation(pPPVPD->GetLandscape() ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT);
}
- ::SetAppPrintOptions( aViewWin.GetViewShell(), FALSE );
- bNormalPrint = FALSE;
- USHORT nPrtSlot = SID_PRINTDOC;
+ ::SetAppPrintOptions( aViewWin.GetViewShell(), sal_False );
+ bNormalPrint = sal_False;
+ sal_uInt16 nPrtSlot = SID_PRINTDOC;
rReq.SetSlot( nPrtSlot );
SfxViewShell::ExecuteSlot( rReq, SfxViewShell::GetInterface() );
rReq.SetSlot( FN_PRINT_PAGEPREVIEW );
@@ -937,8 +933,8 @@ MOVEPAGE:
}
case SID_PRINTDOCDIRECT:
case SID_PRINTDOC:
- ::SetAppPrintOptions( aViewWin.GetViewShell(), FALSE );
- bNormalPrint = TRUE;
+ ::SetAppPrintOptions( aViewWin.GetViewShell(), sal_False );
+ bNormalPrint = sal_True;
SfxViewShell::ExecuteSlot( rReq, SfxViewShell::GetInterface() );
return;
case FN_CLOSE_PAGEPREVIEW:
@@ -950,7 +946,7 @@ MOVEPAGE:
break;
case FN_INSERT_BREAK:
{
- USHORT nSelPage = aViewWin.SelectedPage();
+ sal_uInt16 nSelPage = aViewWin.SelectedPage();
//if a dummy page is selected (e.g. a non-existing right/left page)
//the direct neighbor is used
if(GetViewShell()->IsDummyPage( nSelPage ) && GetViewShell()->IsDummyPage( --nSelPage ))
@@ -973,12 +969,12 @@ MOVEPAGE:
void SwPagePreView::GetState( SfxItemSet& rSet )
{
SfxWhichIter aIter(rSet);
- BYTE nRow = 1;
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt8 nRow = 1;
+ sal_uInt16 nWhich = aIter.FirstWhich();
OSL_ENSURE(nWhich, "empty set");
SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout();
// zoom has to be disabled if Accessibility support is switched on
- BOOL bZoomEnabled = TRUE; // !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport();
+ sal_Bool bZoomEnabled = sal_True; // !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport();
while(nWhich)
{
@@ -1046,7 +1042,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
if(bZoomEnabled)
{
const SwViewOption* pVOpt = GetViewShell()->GetViewOptions();
- const USHORT nCurrentZoom = pVOpt->GetZoom();
+ const sal_uInt16 nCurrentZoom = pVOpt->GetZoom();
SvxZoomSliderItem aZoomSliderItem( nCurrentZoom, MINZOOM, MAXZOOM );
aZoomSliderItem.AddSnappingPoint( 100 );
rSet.Put( aZoomSliderItem );
@@ -1082,7 +1078,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
break;
case FN_SHOW_BOOKVIEW:
{
- BOOL b = GetViewShell()->GetViewOptions()->IsPagePrevBookview();
+ sal_Bool b = GetViewShell()->GetViewOptions()->IsPagePrevBookview();
rSet.Put(SfxBoolItem(nWhich, b));
}
break;
@@ -1099,10 +1095,10 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
SfxItemSet aSet( *rSet.GetPool(), SID_PRINTDOC, SID_PRINTDOC );
GetSlotState( SID_PRINTDOC, SfxViewShell::GetInterface(), &aSet );
if( SFX_ITEM_DISABLED == aSet.GetItemState( SID_PRINTDOC,
- FALSE, &pItem ))
+ sal_False, &pItem ))
rSet.DisableItem( nWhich );
else if( SFX_ITEM_SET == aSet.GetItemState( SID_PRINTDOC,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
((SfxPoolItem*)pItem)->SetWhich( FN_PRINT_PAGEPREVIEW );
rSet.Put( *pItem );
@@ -1111,7 +1107,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
break;
case SID_PRINTPREVIEW:
- rSet.Put( SfxBoolItem( nWhich, TRUE ) );
+ rSet.Put( SfxBoolItem( nWhich, sal_True ) );
break;
case SID_PRINTDOC:
@@ -1126,7 +1122,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
void SwPagePreView::StateUndo(SfxItemSet& rSet)
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
@@ -1138,58 +1134,57 @@ void SwPagePreView::StateUndo(SfxItemSet& rSet)
void SwPagePreView::Init(const SwViewOption * pPrefs)
{
if ( GetViewShell()->HasDrawView() )
- GetViewShell()->GetDrawView()->SetAnimationEnabled( FALSE );
+ GetViewShell()->GetDrawView()->SetAnimationEnabled( sal_False );
- bNormalPrint = TRUE;
+ bNormalPrint = sal_True;
// Die DocSize erfragen und verarbeiten. Ueber die Handler konnte
// die Shell nicht gefunden werden, weil die Shell innerhalb CTOR-Phase
// nicht in der SFX-Verwaltung bekannt ist.
if( !pPrefs )
- pPrefs = SW_MOD()->GetUsrPref(FALSE);
+ pPrefs = SW_MOD()->GetUsrPref(sal_False);
// die Felder aktualisieren
// ACHTUNG: hochcasten auf die EditShell, um die SS zu nutzen.
// In den Methoden wird auf die akt. Shell abgefragt!
SwEditShell* pESh = (SwEditShell*)GetViewShell();
- BOOL bIsModified = pESh->IsModified();
+ sal_Bool bIsModified = pESh->IsModified();
SwViewOption aOpt( *pPrefs );
- aOpt.SetPagePreview(TRUE);
- aOpt.SetTab( FALSE );
- aOpt.SetBlank( FALSE );
- aOpt.SetHardBlank( FALSE );
- aOpt.SetParagraph( FALSE );
- aOpt.SetLineBreak( FALSE );
- aOpt.SetPageBreak( FALSE );
- aOpt.SetColumnBreak( FALSE );
- aOpt.SetSoftHyph( FALSE );
- aOpt.SetFldName( FALSE );
- aOpt.SetPostIts( FALSE );
- aOpt.SetShowHiddenChar( FALSE );
- aOpt.SetShowHiddenField( FALSE );
- aOpt.SetShowHiddenPara( FALSE );
- aOpt.SetViewHRuler( FALSE );
- aOpt.SetViewVRuler( FALSE );
- aOpt.SetGraphic( TRUE );
- aOpt.SetTable( TRUE );
- aOpt.SetSnap( FALSE );
- aOpt.SetGridVisible( FALSE );
+ aOpt.SetPagePreview(sal_True);
+ aOpt.SetTab( sal_False );
+ aOpt.SetBlank( sal_False );
+ aOpt.SetHardBlank( sal_False );
+ aOpt.SetParagraph( sal_False );
+ aOpt.SetLineBreak( sal_False );
+ aOpt.SetPageBreak( sal_False );
+ aOpt.SetColumnBreak( sal_False );
+ aOpt.SetSoftHyph( sal_False );
+ aOpt.SetFldName( sal_False );
+ aOpt.SetPostIts( sal_False );
+ aOpt.SetShowHiddenChar( sal_False );
+ aOpt.SetShowHiddenField( sal_False );
+ aOpt.SetShowHiddenPara( sal_False );
+ aOpt.SetViewHRuler( sal_False );
+ aOpt.SetViewVRuler( sal_False );
+ aOpt.SetGraphic( sal_True );
+ aOpt.SetTable( sal_True );
+ aOpt.SetSnap( sal_False );
+ aOpt.SetGridVisible( sal_False );
GetViewShell()->ApplyViewOptions( aOpt );
GetViewShell()->ApplyAccessiblityOptions(SW_MOD()->GetAccessibilityOptions());
// adjust view shell option to the same as for print
- SwPrtOptions aPrintOptions( GetViewFrame()->GetObjectShell()->GetTitle(0) );
- aPrintOptions.MakeOptions( false );
+ SwPrintData const aPrintOptions = *SW_MOD()->GetPrtOptions(false);
GetViewShell()->AdjustOptionsForPagePreview( aPrintOptions );
IDocumentSettingAccess* pIDSA = pESh->getIDocumentSettingAccess();
if( pIDSA->get(IDocumentSettingAccess::BROWSE_MODE))
{
pIDSA->set(IDocumentSettingAccess::BROWSE_MODE, false);
- pESh->CheckBrowseView( TRUE );
+ pESh->CheckBrowseView( sal_True );
}
GetViewShell()->CalcLayout();
@@ -1220,8 +1215,8 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
SetName(String::CreateFromAscii("PageView" ));
SetWindow( &aViewWin );
SetHelpId(SW_PAGEPREVIEW);
- _CreateScrollbar( TRUE );
- _CreateScrollbar( FALSE );
+ _CreateScrollbar( sal_True );
+ _CreateScrollbar( sal_False );
SfxObjectShell* pObjShell = pViewFrame->GetObjectShell();
if ( !pOldSh )
@@ -1244,15 +1239,15 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
{
pVS = ((SwView*)pOldSh)->GetWrtShellPtr();
// save the current ViewData of the previous SwView
- pOldSh->WriteUserData( sSwViewData, FALSE );
+ pOldSh->WriteUserData( sSwViewData, sal_False );
}
else
pVS = GetDocShell()->GetWrtShell();
if( pVS )
{
// setze die akt. Seite als die erste
- USHORT nPhysPg, nVirtPg;
- ((SwCrsrShell*)pVS)->GetPageNum( nPhysPg, nVirtPg, TRUE, FALSE );
+ sal_uInt16 nPhysPg, nVirtPg;
+ ((SwCrsrShell*)pVS)->GetPageNum( nPhysPg, nVirtPg, sal_True, sal_False );
if( 1 != aViewWin.GetCol() && 1 == nPhysPg )
--nPhysPg;
aViewWin.SetSttPage( nPhysPg );
@@ -1296,7 +1291,7 @@ SwDocShell* SwPagePreView::GetDocShell()
return PTR_CAST(SwDocShell, GetViewFrame()->GetObjectShell());
}
-int SwPagePreView::_CreateScrollbar( BOOL bHori )
+int SwPagePreView::_CreateScrollbar( sal_Bool bHori )
{
Window *pMDI = &GetViewFrame()->GetWindow();
SwScrollbar** ppScrollbar = bHori ? &pHScrollbar : &pVScrollbar;
@@ -1307,9 +1302,9 @@ int SwPagePreView::_CreateScrollbar( BOOL bHori )
{
pPageUpBtn = new ImageButton(pMDI, SW_RES( BTN_PAGEUP ) );
- pPageUpBtn->SetHelpId(FN_PAGEUP);
+ pPageUpBtn->SetHelpId(GetStaticInterface()->GetSlot(FN_PAGEUP)->GetCommand());
pPageDownBtn = new ImageButton(pMDI, SW_RES( BTN_PAGEDOWN ) );
- pPageDownBtn->SetHelpId(FN_PAGEDOWN);
+ pPageDownBtn->SetHelpId(GetStaticInterface()->GetSlot(FN_PAGEDOWN)->GetCommand());
Link aLk( LINK( this, SwPagePreView, BtnPage ) );
pPageUpBtn->SetClickHdl( aLk );
pPageDownBtn->SetClickHdl( aLk );
@@ -1320,7 +1315,7 @@ int SwPagePreView::_CreateScrollbar( BOOL bHori )
*ppScrollbar = new SwScrollbar( pMDI, bHori );
ScrollDocSzChg();
- (*ppScrollbar)->EnableDrag( TRUE );
+ (*ppScrollbar)->EnableDrag( sal_True );
(*ppScrollbar)->SetEndScrollHdl( LINK( this, SwPagePreView, EndScrollHdl ));
@@ -1362,7 +1357,7 @@ int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar )
{
ScrollViewSzChg();
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT,
FN_PAGEUP, FN_PAGEDOWN, 0
@@ -1375,13 +1370,13 @@ int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar )
}
// ab hier alles aus der SwView uebernommen
-void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ )
+void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool /*bInner*/ )
{
const StyleSettings &rSet = aViewWin.GetSettings().GetStyleSettings();
const long nTmp = rSet.GetScrollBarSize();
- if ( pVScrollbar->IsVisible( FALSE ))
+ if ( pVScrollbar->IsVisible( sal_False ))
rToFill.Right() = nTmp;
- if ( pHScrollbar->IsVisible( FALSE ) )
+ if ( pHScrollbar->IsVisible( sal_False ) )
rToFill.Bottom() = nTmp;
SetBorderPixel( rToFill );
}
@@ -1389,12 +1384,12 @@ void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ )
void SwPagePreView::InnerResizePixel( const Point &rOfst, const Size &rSize )
{
SvBorder aBorder;
- CalcAndSetBorderPixel( aBorder, TRUE );
+ CalcAndSetBorderPixel( aBorder, sal_True );
Rectangle aRect( rOfst, rSize );
aRect += aBorder;
ViewResizePixel( aViewWin, aRect.TopLeft(), aRect.GetSize(),
aViewWin.GetOutputSizePixel(),
- TRUE,
+ sal_True,
*pVScrollbar, *pHScrollbar, pPageUpBtn, pPageDownBtn, 0,
*pScrollFill );
@@ -1405,9 +1400,9 @@ void SwPagePreView::InnerResizePixel( const Point &rOfst, const Size &rSize )
void SwPagePreView::OuterResizePixel( const Point &rOfst, const Size &rSize )
{
SvBorder aBorder;
- CalcAndSetBorderPixel( aBorder, FALSE );
+ CalcAndSetBorderPixel( aBorder, sal_False );
ViewResizePixel( aViewWin, rOfst, rSize, aViewWin.GetOutputSizePixel(),
- FALSE, *pVScrollbar,
+ sal_False, *pVScrollbar,
*pHScrollbar, pPageUpBtn, pPageDownBtn, 0, *pScrollFill );
//EditWin niemals einstellen!
@@ -1425,7 +1420,7 @@ void SwPagePreView::OuterResizePixel( const Point &rOfst, const Size &rSize )
}
}
-void SwPagePreView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
+void SwPagePreView::SetVisArea( const Rectangle &rRect, sal_Bool bUpdateScrollbar )
{
const Point aTopLeft(AlignToPixel(rRect.TopLeft()));
const Point aBottomRight(AlignToPixel(rRect.BottomRight()));
@@ -1484,7 +1479,7 @@ IMPL_LINK( SwPagePreView, ScrollHdl, SwScrollbar *, pScrollbar )
{
// wieviele Seiten scrollen ??
String sStateStr(sPageStr);
- USHORT nThmbPos = (USHORT)pScrollbar->GetThumbPos();
+ sal_uInt16 nThmbPos = (sal_uInt16)pScrollbar->GetThumbPos();
if( 1 == aViewWin.GetCol() || !nThmbPos )
++nThmbPos;
sStateStr += String::CreateFromInt32( nThmbPos );
@@ -1521,7 +1516,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
if ( GetViewShell()->PagePreviewLayout()->DoesPreviewLayoutRowsFitIntoWindow() )
{
// wieviele Seiten scrollen ??
- USHORT nThmbPos = (USHORT)pScrollbar->GetThumbPos();
+ sal_uInt16 nThmbPos = (sal_uInt16)pScrollbar->GetThumbPos();
// adjust to new preview functionality
if( nThmbPos != aViewWin.SelectedPage() )
{
@@ -1542,7 +1537,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
{
aViewWin.SetSttPage( nThmbPos );
aViewWin.SetSelectedPage( nThmbPos );
- ChgPage( SwPagePreViewWin::MV_SCROLL, FALSE );
+ ChgPage( SwPagePreViewWin::MV_SCROLL, sal_False );
// update scrollbars
ScrollViewSzChg();
}
@@ -1582,7 +1577,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
aViewWin.Scroll(nThmbPos - aViewWin.GetPaintedPreviewDocRect().Left(), 0);
}
// additional invalidate page status.
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
FN_STAT_PAGE, 0
@@ -1616,7 +1611,7 @@ void SwPagePreView::DocSzChgd( const Size &rSz )
if( aVisArea.GetWidth() )
{
- ChgPage( SwPagePreViewWin::MV_CALC, TRUE );
+ ChgPage( SwPagePreViewWin::MV_CALC, sal_True );
ScrollDocSzChg();
aViewWin.Invalidate();
@@ -1633,7 +1628,7 @@ void SwPagePreView::ScrollViewSzChg()
{
//vertical scrolling by row
// adjust to new preview functionality
- USHORT nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
+ sal_uInt16 nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
pVScrollbar->SetVisibleSize( nVisPages );
// set selected page as scroll bar position,
// if it is visible.
@@ -1698,12 +1693,12 @@ void SwPagePreView::ScrollDocSzChg()
}
// alles zum Thema Drucken
-SfxPrinter* SwPagePreView::GetPrinter( BOOL bCreate )
+SfxPrinter* SwPagePreView::GetPrinter( sal_Bool bCreate )
{
return aViewWin.GetViewShell()->getIDocumentDeviceAccess()->getPrinter( bCreate );
}
-USHORT SwPagePreView::SetPrinter( SfxPrinter *pNew, USHORT nDiffFlags, bool )
+sal_uInt16 SwPagePreView::SetPrinter( SfxPrinter *pNew, sal_uInt16 nDiffFlags, bool )
{
ViewShell &rSh = *GetViewShell();
SfxPrinter* pOld = rSh.getIDocumentDeviceAccess()->getPrinter( false );
@@ -1718,15 +1713,15 @@ USHORT SwPagePreView::SetPrinter( SfxPrinter *pNew, USHORT nDiffFlags, bool )
rESh.SetModified();
}
if ( ( nDiffFlags & SFX_PRINTER_OPTIONS ) == SFX_PRINTER_OPTIONS )
- ::SetPrinter( rSh.getIDocumentDeviceAccess(), pNew, FALSE );
+ ::SetPrinter( rSh.getIDocumentDeviceAccess(), pNew, sal_False );
- const BOOL bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? TRUE : FALSE;
- const BOOL bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? TRUE : FALSE;
+ const sal_Bool bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? sal_True : sal_False;
+ const sal_Bool bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? sal_True : sal_False;
if ( bChgOri || bChgSize )
{
rESh.StartAllAction();
if ( bChgOri )
- rSh.ChgAllPageOrientation( USHORT(pNew->GetOrientation()) );
+ rSh.ChgAllPageOrientation( sal_uInt16(pNew->GetOrientation()) );
if ( bChgSize )
{
Size aSz( SvxPaperInfo::GetPaperSize( pNew ) );
@@ -1737,14 +1732,14 @@ USHORT SwPagePreView::SetPrinter( SfxPrinter *pNew, USHORT nDiffFlags, bool )
rESh.SetModified();
rESh.EndAllAction();
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
SID_ATTR_LONG_ULSPACE, SID_ATTR_LONG_LRSPACE,
SID_RULER_BORDERS, SID_RULER_PAGE_POS, 0
};
#if OSL_DEBUG_LEVEL > 1
{
- const USHORT* pPtr = aInval + 1;
+ const sal_uInt16* pPtr = aInval + 1;
do {
OSL_ENSURE( *(pPtr - 1) < *pPtr, "wrong sorting!" );
} while( *++pPtr );
@@ -1763,14 +1758,6 @@ SfxTabPage* SwPagePreView::CreatePrintOptionsPage( Window *pParent,
return ::CreatePrintOptionsPage( pParent, rOptions, !bNormalPrint );
}
-PrintDialog* SwPagePreView::CreatePrintDialog( Window *pParent )
-{
- PrintDialog *pDlg = ::CreatePrintDialog( pParent, 1, 0 );
- pDlg->DisableRange( PRINTDIALOG_SELECTION );
- return pDlg;
-}
-
-// no longer needed ??
Size SwPagePreView::GetOptimalSizePixel() const
{
OSL_FAIL( "overloaded virtual method <SwPagePreView::GetOptimalSizePixel()> needed ??" );
@@ -1843,7 +1830,7 @@ void SwPagePreViewWin::AdjustPreviewToNewZoom( const sal_uInt16 _nZoomFactor,
* when less than the desired number of rows fits into
* the view
*/
-void SwPagePreViewWin::Scroll(long nXMove, long nYMove, USHORT /*nFlags*/)
+void SwPagePreViewWin::Scroll(long nXMove, long nYMove, sal_uInt16 /*nFlags*/)
{
maPaintedPreviewDocRect.Move(nXMove, nYMove);
mpPgPrevwLayout->Prepare( 0, maPaintedPreviewDocRect.TopLeft(),
@@ -1852,16 +1839,16 @@ void SwPagePreViewWin::Scroll(long nXMove, long nYMove, USHORT /*nFlags*/)
}
-BOOL SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt )
+sal_Bool SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
const CommandWheelData* pWData = rCEvt.GetWheelData();
if( pWData && COMMAND_WHEEL_ZOOM == pWData->GetMode() )
{
if(!Application::GetSettings().GetMiscSettings().GetEnableATToolSupport())
{
- USHORT nFactor = GetViewShell()->GetViewOptions()->GetZoom();
- const USHORT nOffset = 10;
+ sal_uInt16 nFactor = GetViewShell()->GetViewOptions()->GetZoom();
+ const sal_uInt16 nOffset = 10;
if( 0L > pWData->GetDelta() )
{
nFactor -= nOffset;
@@ -1876,7 +1863,7 @@ BOOL SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt )
}
SetZoom(SVX_ZOOM_PERCENT, nFactor);
}
- bOk = TRUE;
+ bOk = sal_True;
}
else
bOk = aViewWin.HandleScrollCommand( rCEvt, pHScrollbar, pVScrollbar );
@@ -1909,7 +1896,7 @@ void SwPagePreView::ShowVScrollbar(sal_Bool bShow)
InvalidateBorder();
}
-void SwPagePreView::SetZoom(SvxZoomType eType, USHORT nFactor)
+void SwPagePreView::SetZoom(SvxZoomType eType, sal_uInt16 nFactor)
{
ViewShell& rSh = *GetViewShell();
SwViewOption aOpt(*rSh.GetViewOptions());
diff --git a/sw/source/ui/uiview/pview.src b/sw/source/ui/uiview/pview.src
index 1a8833e76b34..8f60e4d3a5be 100644
--- a/sw/source/ui/uiview/pview.src
+++ b/sw/source/ui/uiview/pview.src
@@ -29,7 +29,6 @@
#include "pview.hrc"
#include "helpid.h"
#include "cmdid.h"
-
ModalDialog DLG_PAGEPREVIEW_ZOOM
{
HelpID = HID_PPREV_ZOOM ;
@@ -54,6 +53,7 @@ ModalDialog DLG_PAGEPREVIEW_ZOOM
};
NumericField ED_COL
{
+ HelpID = "sw:NumericField:DLG_PAGEPREVIEW_ZOOM:ED_COL";
Border = TRUE ;
Size = MAP_APPFONT ( 28 , 12 ) ;
Pos = MAP_APPFONT ( 48 , 34 ) ;
@@ -69,6 +69,7 @@ ModalDialog DLG_PAGEPREVIEW_ZOOM
};
NumericField ED_ROW
{
+ HelpID = "sw:NumericField:DLG_PAGEPREVIEW_ZOOM:ED_ROW";
Border = TRUE ;
Pos = MAP_APPFONT ( 48 , 13 ) ;
Size = MAP_APPFONT ( 28 , 12 ) ;
@@ -106,92 +107,4 @@ String RID_PVIEW_TOOLBOX
{
Text [ en-US ] = "Page Preview" ;
};
-ToolBox RID_PVIEW_TOOLBOX
-{
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- Customize = TRUE ;
- HelpID = HID_PVIEW_TOOLBOX ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = FN_PAGEUP ;
- HelpID = FN_PAGEUP ;
- };
- ToolBoxItem
- {
- Identifier = FN_PAGEDOWN ;
- HelpID = FN_PAGEDOWN ;
- };
- ToolBoxItem
- {
- Identifier = FN_START_OF_DOCUMENT ;
- HelpID = FN_START_OF_DOCUMENT ;
- };
- ToolBoxItem
- {
- Identifier = FN_END_OF_DOCUMENT ;
- HelpID = FN_END_OF_DOCUMENT ;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = FN_SHOW_TWO_PAGES ;
- HelpID = FN_SHOW_TWO_PAGES ;
- };
- ToolBoxItem
- {
- Identifier = FN_SHOW_MULTIPLE_PAGES ;
- HelpID = FN_SHOW_MULTIPLE_PAGES ;
- DropDown = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_SHOW_BOOKVIEW ;
- HelpID = FN_SHOW_BOOKVIEW ;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = SID_ZOOM_OUT;
- HelpID = SID_ZOOM_OUT ;
- };
- ToolBoxItem
- {
- Identifier = SID_ZOOM_IN;
- HelpID = SID_ZOOM_IN ;
- };
- ToolBoxItem
- {
- Identifier = FN_PREVIEW_ZOOM;
- HelpID = HID_PREVIEW_ZOOM ;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = SID_WIN_FULLSCREEN ;
- HelpID = SID_WIN_FULLSCREEN ;
- };
- ToolBoxItem
- {
- Identifier = FN_PRINT_PAGEPREVIEW ;
- HelpID = FN_PRINT_PAGEPREVIEW ;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = FN_CLOSE_PAGEPREVIEW;
- HelpID = SID_PRINTPREVIEW;
- };
- };
- Scroll = TRUE ;
-};
diff --git a/sw/source/ui/uiview/scroll.cxx b/sw/source/ui/uiview/scroll.cxx
index e6f985aee897..23cdaad2979a 100644
--- a/sw/source/ui/uiview/scroll.cxx
+++ b/sw/source/ui/uiview/scroll.cxx
@@ -36,18 +36,18 @@
#define SCROLL_LINE_SIZE 250
-SwScrollbar::SwScrollbar( Window *pWin, BOOL bHoriz ) :
+SwScrollbar::SwScrollbar( Window *pWin, sal_Bool bHoriz ) :
ScrollBar( pWin,
WinBits( WB_3DLOOK | WB_HIDE | ( bHoriz ? WB_HSCROLL : WB_VSCROLL) ) ),
bHori( bHoriz ),
- bAuto( FALSE ),
- bThumbEnabled( TRUE ),
- bVisible(FALSE),
- bSizeSet(FALSE)
+ bAuto( sal_False ),
+ bThumbEnabled( sal_True ),
+ bVisible(sal_False),
+ bSizeSet(sal_False)
{
// SSA: --- RTL --- no mirroring for horizontal scrollbars
if( bHoriz )
- EnableRTL( FALSE );
+ EnableRTL( sal_False );
}
@@ -62,7 +62,7 @@ void SwScrollbar::DocSzChgd( const Size &rSize )
{
aDocSz = rSize;
SetRange( Range( 0, bHori ? rSize.Width() : rSize.Height()) );
- const ULONG nVisSize = GetVisibleSize();
+ const sal_uLong nVisSize = GetVisibleSize();
SetLineSize( SCROLL_LINE_SIZE );
SetPageSize( nVisSize * 77 / 100 );
}
@@ -95,7 +95,7 @@ void SwScrollbar::ViewPortChgd( const Rectangle &rRect )
AutoShow();
}
-void SwScrollbar::ExtendedShow( BOOL bSet )
+void SwScrollbar::ExtendedShow( sal_Bool bSet )
{
bVisible = bSet;
if( (!bSet || !bAuto) && IsUpdateMode() && bSizeSet)
@@ -105,13 +105,13 @@ void SwScrollbar::ExtendedShow( BOOL bSet )
void SwScrollbar::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
{
ScrollBar::SetPosSizePixel(rNewPos, rNewSize);
- bSizeSet = TRUE;
+ bSizeSet = sal_True;
if(bVisible)
ExtendedShow();
}
-void SwScrollbar::SetAuto(BOOL bSet)
+void SwScrollbar::SetAuto(sal_Bool bSet)
{
if(bAuto != bSet)
{
@@ -119,7 +119,7 @@ void SwScrollbar::SetAuto(BOOL bSet)
// automatisch versteckt - dann anzeigen
if(!bAuto && bVisible && !ScrollBar::IsVisible())
- ExtendedShow(TRUE);
+ ExtendedShow(sal_True);
else if(bAuto)
AutoShow(); // oder automatisch verstecken
}
@@ -132,14 +132,14 @@ void SwScrollbar::AutoShow()
if( nVis >= nLen - 1)
{
if(ScrollBar::IsVisible())
- ScrollBar::Show(FALSE);
+ ScrollBar::Show(sal_False);
}
else if ( !ScrollBar::IsVisible() &&
(!bHori || nVis) ) //Optimierung fuer Browser.
//Horizontaler Scrollbar per
//default aus.
{
- ScrollBar::Show(TRUE);
+ ScrollBar::Show(sal_True);
}
}
diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx
index 4f20aface021..abaf5aefd615 100644
--- a/sw/source/ui/uiview/srcview.cxx
+++ b/sw/source/ui/uiview/srcview.cxx
@@ -50,6 +50,8 @@
#include <svl/whiter.hxx>
#include <unotools/saveopt.hxx>
#include <svtools/transfer.hxx>
+#include <svtools/svtools.hrc>
+#include <svtools/svtdata.hxx>
#include <svx/svxids.hrc>
#include <svtools/htmlcfg.hxx>
#include <sfx2/app.hxx>
@@ -89,10 +91,6 @@
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <sfx2/filedlghelper.hxx>
#define SwSrcView
-#define SearchSettings
-#define _ExecSearch Execute
-#define _StateSearch GetState
-#include <svx/svxslots.hxx>
#include "swslots.hxx"
#include <unomid.h>
@@ -140,7 +138,7 @@ SFX_IMPL_INTERFACE( SwSrcView, SfxViewShell, SW_RES(0) )
TYPEINIT1(SwSrcView, SfxViewShell)
-void lcl_PrintHeader( OutputDevice &rOutDev, USHORT nPages, USHORT nCurPage, const String& rTitle )
+void lcl_PrintHeader( OutputDevice &rOutDev, sal_uInt16 nPages, sal_uInt16 nCurPage, const String& rTitle )
{
short nLeftMargin = LMARGPRN;
Size aSz = rOutDev.GetOutputSize();
@@ -211,8 +209,8 @@ void lcl_ConvertTabsToSpaces( String& rLine )
{
if ( rLine.Len() )
{
- USHORT nPos = 0;
- USHORT nMax = rLine.Len();
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nMax = rLine.Len();
while ( nPos < nMax )
{
if ( rLine.GetChar(nPos) == '\t' )
@@ -233,7 +231,7 @@ SwSrcView::SwSrcView(SfxViewFrame* pViewFrame, SfxViewShell*) :
SfxViewShell( pViewFrame, SWSRCVIEWFLAGS ),
aEditWin( &pViewFrame->GetWindow(), this ),
pSearchItem(0),
- bSourceSaved(FALSE),
+ bSourceSaved(sal_False),
eLoadEncoding(RTL_TEXTENCODING_DONTKNOW)
{
Init();
@@ -244,7 +242,7 @@ SwSrcView::~SwSrcView()
SwDocShell* pDocShell = GetDocShell();
OSL_ENSURE(PTR_CAST(SwWebDocShell, pDocShell), "Wieso keine WebDocShell?");
const TextSelection& rSel = aEditWin.GetTextView()->GetSelection();
- ((SwWebDocShell*)pDocShell)->SetSourcePara( static_cast< USHORT >( rSel.GetStart().GetPara() ) );
+ ((SwWebDocShell*)pDocShell)->SetSourcePara( static_cast< sal_uInt16 >( rSel.GetStart().GetPara() ) );
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
pDocShell->GetModel(), uno::UNO_QUERY_THROW);
@@ -277,10 +275,10 @@ void SwSrcView::Init()
Load(pDocShell);
else
{
- aEditWin.SetReadonly(TRUE);
+ aEditWin.SetReadonly(sal_True);
}
- StartListening(*pDocShell,TRUE);
+ StartListening(*pDocShell,sal_True);
}
SwDocShell* SwSrcView::GetDocShell()
@@ -291,7 +289,7 @@ SwDocShell* SwSrcView::GetDocShell()
void SwSrcView::SaveContent(const String& rTmpFile)
{
- SfxMedium aMedium( rTmpFile, STREAM_WRITE, TRUE);
+ SfxMedium aMedium( rTmpFile, STREAM_WRITE, sal_True);
SvStream* pOutStream = aMedium.GetOutStream();
pOutStream->SetStreamCharSet( lcl_GetStreamCharSet(eLoadEncoding) );
aEditWin.Write(*pOutStream);
@@ -300,7 +298,7 @@ void SwSrcView::SaveContent(const String& rTmpFile)
void SwSrcView::Execute(SfxRequest& rReq)
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
TextView* pTextView = aEditWin.GetTextView();
switch( nSlot )
{
@@ -339,7 +337,7 @@ void SwSrcView::Execute(SfxRequest& rReq)
{
SfxMedium aMedium( xFP->getFiles().getConstArray()[0],
STREAM_WRITE | STREAM_SHARE_DENYNONE,
- FALSE );
+ sal_False );
SvStream* pOutStream = aMedium.GetOutStream();
pOutStream->SetStreamCharSet(lcl_GetStreamCharSet(eLoadEncoding));
aEditWin.Write( *pOutStream );
@@ -378,11 +376,11 @@ void SwSrcView::Execute(SfxRequest& rReq)
{
const SfxItemSet* pTmpArgs = rReq.GetArgs();
- USHORT nWhich = pTmpArgs->GetWhichByPos( 0 );
+ sal_uInt16 nWhich = pTmpArgs->GetWhichByPos( 0 );
OSL_ENSURE( nWhich, "Wich fuer SearchItem ?" );
const SfxPoolItem& rItem = pTmpArgs->Get( nWhich );
SetSearchItem( (const SvxSearchItem&)rItem);
- StartSearchAndReplace( (const SvxSearchItem&)rItem, FALSE, rReq.IsAPI() );
+ StartSearchAndReplace( (const SvxSearchItem&)rItem, sal_False, rReq.IsAPI() );
if(aEditWin.IsModified())
GetDocShell()->GetDoc()->SetModified();
}
@@ -392,7 +390,7 @@ void SwSrcView::Execute(SfxRequest& rReq)
SvxSearchItem* pSrchItem = GetSearchItem();
if(pSrchItem)
{
- StartSearchAndReplace( *pSrchItem, FALSE, rReq.IsAPI() );
+ StartSearchAndReplace( *pSrchItem, sal_False, rReq.IsAPI() );
if(aEditWin.IsModified())
GetDocShell()->GetDoc()->SetModified();
}
@@ -406,11 +404,11 @@ void SwSrcView::Execute(SfxRequest& rReq)
break;
case SID_UNDO:
pTextView->Undo();
- GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ GetViewFrame()->GetBindings().InvalidateAll(sal_False);
break;
case SID_REDO:
pTextView->Redo();
- GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ GetViewFrame()->GetBindings().InvalidateAll(sal_False);
break;
case SID_REPEAT:
break;
@@ -435,7 +433,7 @@ void SwSrcView::Execute(SfxRequest& rReq)
void SwSrcView::GetState(SfxItemSet& rSet)
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
TextView* pTextView = aEditWin.GetTextView();
while(nWhich)
@@ -469,7 +467,7 @@ void SwSrcView::GetState(SfxItemSet& rSet)
break;
case SID_SEARCH_OPTIONS:
{
- USHORT nOpt = SRC_SEARCHOPTIONS;
+ sal_uInt16 nOpt = SRC_SEARCHOPTIONS;
if(GetDocShell()->IsReadOnly())
nOpt &= ~(SEARCH_OPTIONS_REPLACE|SEARCH_OPTIONS_REPLACE_ALL);
@@ -502,14 +500,14 @@ void SwSrcView::GetState(SfxItemSet& rSet)
case SID_UNDO:
case SID_REDO:
{
- SfxUndoManager& rMgr = pTextView->GetTextEngine()->GetUndoManager();
- USHORT nCount = 0;
+ ::svl::IUndoManager& rMgr = pTextView->GetTextEngine()->GetUndoManager();
+ sal_uInt16 nCount = 0;
if(nWhich == SID_UNDO)
{
nCount = rMgr.GetUndoActionCount();
if(nCount)
{
- String aStr(ResId( STR_UNDO, *SFX_APP()->GetSfxResManager() ));;
+ String aStr(SvtResId( STR_UNDO));;
aStr += rMgr.GetUndoActionComment(--nCount);
rSet.Put(SfxStringItem(nWhich, aStr));
}
@@ -521,7 +519,7 @@ void SwSrcView::GetState(SfxItemSet& rSet)
nCount = rMgr.GetRedoActionCount();
if(nCount)
{
- String aStr(ResId( STR_REDO, *SFX_APP()->GetSfxResManager() ));;
+ String aStr(SvtResId( STR_REDO));;
aStr += rMgr.GetRedoActionComment(--nCount);
rSet.Put(SfxStringItem(nWhich,aStr));
}
@@ -550,7 +548,7 @@ void SwSrcView::GetState(SfxItemSet& rSet)
TransferableDataHelper aDataHelper(
TransferableDataHelper::CreateFromSystemClipboard(
&aEditWin) );
- BOOL bDisable = !aDataHelper.GetXTransferable().is() ||
+ sal_Bool bDisable = !aDataHelper.GetXTransferable().is() ||
0 == aDataHelper.GetFormatCount();
if( bDisable )
rSet.DisableItem(nWhich);
@@ -576,20 +574,20 @@ void SwSrcView::SetSearchItem( const SvxSearchItem& rItem )
pSearchItem = (SvxSearchItem*)rItem.Clone();
}
-USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
- BOOL bFromStart,
- BOOL bApi,
- BOOL bRecursive)
+sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
+ sal_Bool bFromStart,
+ sal_Bool bApi,
+ sal_Bool bRecursive)
{
ExtTextView* pTextView = aEditWin.GetTextView();
TextSelection aSel;
TextPaM aPaM;
- BOOL bForward = !rSearchItem.GetBackward();
- BOOL bAtStart = pTextView->GetSelection() == TextSelection( aPaM, aPaM );
+ sal_Bool bForward = !rSearchItem.GetBackward();
+ sal_Bool bAtStart = pTextView->GetSelection() == TextSelection( aPaM, aPaM );
if( !bForward )
- aPaM = TextPaM( (ULONG)-1, (USHORT)-1 );
+ aPaM = TextPaM( (sal_uLong)-1, (sal_uInt16)-1 );
if( bFromStart )
{
@@ -601,8 +599,8 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
aSearchOpt.Locale = SvxCreateLocale(
static_cast< LanguageType >( GetAppLanguage() ) );
- USHORT nFound;
- BOOL bAll = FALSE;
+ sal_uInt16 nFound;
+ sal_Bool bAll = sal_False;
switch( rSearchItem.GetCommand() )
{
case SVX_SEARCHCMD_FIND:
@@ -610,7 +608,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
nFound = pTextView->Search( aSearchOpt, bForward );
break;
- case SVX_SEARCHCMD_REPLACE_ALL: bAll = TRUE;
+ case SVX_SEARCHCMD_REPLACE_ALL: bAll = sal_True;
case SVX_SEARCHCMD_REPLACE:
nFound = pTextView->Replace( aSearchOpt, bAll, bForward );
break;
@@ -621,7 +619,7 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
if( !nFound )
{
- BOOL bNotFoundMessage = FALSE;
+ sal_Bool bNotFoundMessage = sal_False;
if(!bRecursive)
{
if(!bFromStart)
@@ -630,13 +628,13 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
}
else
{
- bNotFoundMessage = TRUE;
+ bNotFoundMessage = sal_True;
pTextView->SetSelection( aSel );
}
}
else if(bAtStart)
{
- bNotFoundMessage = TRUE;
+ bNotFoundMessage = sal_True;
}
@@ -651,14 +649,14 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
: MSG_SEARCH_START)).Execute())
{
pTextView->SetSelection( TextSelection( aPaM, aPaM ) );
- StartSearchAndReplace( rSearchItem, FALSE, FALSE, TRUE );
+ StartSearchAndReplace( rSearchItem, sal_False, sal_False, sal_True );
}
}
}
return nFound;
}
-USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
+sal_uInt16 SwSrcView::SetPrinter(SfxPrinter* pNew, sal_uInt16 nDiffFlags, bool )
{
SwDocShell* pDocSh = GetDocShell();
if ( (SFX_PRINTER_JOBSETUP | SFX_PRINTER_PRINTER) & nDiffFlags )
@@ -668,10 +666,10 @@ USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
pDocSh->SetModified();
}
if ( nDiffFlags & SFX_PRINTER_OPTIONS )
- ::SetPrinter( pDocSh->getIDocumentDeviceAccess(), pNew, TRUE );
+ ::SetPrinter( pDocSh->getIDocumentDeviceAccess(), pNew, sal_True );
- const BOOL bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? TRUE : FALSE;
- const BOOL bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? TRUE : FALSE;
+ const sal_Bool bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? sal_True : sal_False;
+ const sal_Bool bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? sal_True : sal_False;
if ( bChgOri || bChgSize )
{
pDocSh->SetModified();
@@ -679,7 +677,7 @@ USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
return 0;
}
-SfxPrinter* SwSrcView::GetPrinter( BOOL bCreate )
+SfxPrinter* SwSrcView::GetPrinter( sal_Bool bCreate )
{
return GetDocShell()->GetDoc()->getPrinter( bCreate );
}
@@ -710,32 +708,32 @@ sal_Int32 SwSrcView::PrintSource(
String aTitle( GetViewFrame()->GetWindow().GetText() );
- USHORT nLineHeight = (USHORT) pOutDev->GetTextHeight(); // etwas mehr.
- USHORT nParaSpace = 10;
+ sal_uInt16 nLineHeight = (sal_uInt16) pOutDev->GetTextHeight(); // etwas mehr.
+ sal_uInt16 nParaSpace = 10;
Size aPaperSz = pOutDev->GetOutputSize();
aPaperSz.Width() -= (LMARGPRN + RMARGPRN);
aPaperSz.Height() -= (TMARGPRN + BMARGPRN);
// nLinepPage stimmt nicht, wenn Zeilen umgebrochen werden muessen...
- USHORT nLinespPage = (USHORT) (aPaperSz.Height() / nLineHeight);
- USHORT nCharspLine = (USHORT) (aPaperSz.Width() / pOutDev->GetTextWidth( 'X' ));
- USHORT nParas = static_cast< USHORT >( pTextEngine->GetParagraphCount() );
+ sal_uInt16 nLinespPage = (sal_uInt16) (aPaperSz.Height() / nLineHeight);
+ sal_uInt16 nCharspLine = (sal_uInt16) (aPaperSz.Width() / pOutDev->GetTextWidth( 'X' ));
+ sal_uInt16 nParas = static_cast< sal_uInt16 >( pTextEngine->GetParagraphCount() );
- USHORT nPages = (USHORT) (nParas / nLinespPage + 1 );
- USHORT nCurPage = 1;
+ sal_uInt16 nPages = (sal_uInt16) (nParas / nLinespPage + 1 );
+ sal_uInt16 nCurPage = 1;
// Header drucken...
if (!bCalcNumPagesOnly && nPage == nCurPage)
lcl_PrintHeader( *pOutDev, nPages, nCurPage, aTitle );
const Point aStartPos( LMARGPRN, TMARGPRN );
Point aPos( aStartPos );
- for ( USHORT nPara = 0; nPara < nParas; ++nPara )
+ for ( sal_uInt16 nPara = 0; nPara < nParas; ++nPara )
{
String aLine( pTextEngine->GetText( nPara ) );
lcl_ConvertTabsToSpaces( aLine );
- USHORT nLines = aLine.Len() / nCharspLine + 1;
- for ( USHORT nLine = 0; nLine < nLines; ++nLine )
+ sal_uInt16 nLines = aLine.Len() / nCharspLine + 1;
+ for ( sal_uInt16 nLine = 0; nLine < nLines; ++nLine )
{
String aTmpLine( aLine, nLine * nCharspLine, nCharspLine );
aPos.Y() += nLineHeight;
@@ -772,7 +770,7 @@ void SwSrcView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
// Broadcast kommt nur einmal!
const SwDocShell* pDocSh = GetDocShell();
- const BOOL bReadonly = pDocSh->IsReadOnly();
+ const sal_Bool bReadonly = pDocSh->IsReadOnly();
aEditWin.SetReadonly(bReadonly);
}
SfxViewShell::Notify(rBC, rHint);
@@ -790,8 +788,8 @@ void SwSrcView::Load(SwDocShell* pDocShell)
SfxMedium* pMedium = pDocShell->GetMedium();
const SfxFilter* pFilter = pMedium->GetFilter();
- BOOL bHtml = pFilter && pFilter->GetUserData().EqualsAscii("HTML");
- BOOL bDocModified = pDocShell->IsModified();
+ sal_Bool bHtml = pFilter && pFilter->GetUserData().EqualsAscii("HTML");
+ sal_Bool bDocModified = pDocShell->IsModified();
if(bHtml && !bDocModified && pDocShell->HasName())
{
SvStream* pStream = pMedium->GetInStream();
@@ -815,9 +813,9 @@ void SwSrcView::Load(SwDocShell* pDocShell)
pStream->SetStreamCharSet( eDestEnc );
pStream->Seek(0);
TextEngine* pTextEngine = aEditWin.GetTextEngine();
- pTextEngine->EnableUndo(FALSE);
+ pTextEngine->EnableUndo(sal_False);
aEditWin.Read(*pStream);
- pTextEngine->EnableUndo(TRUE);
+ pTextEngine->EnableUndo(sal_True);
}
else
{
@@ -833,18 +831,18 @@ void SwSrcView::Load(SwDocShell* pDocShell)
SvtSaveOptions aOpt;
{
- SfxMedium aMedium( sFileURL,STREAM_READWRITE, TRUE );
+ SfxMedium aMedium( sFileURL,STREAM_READWRITE, sal_True );
SwWriter aWriter( aMedium, *pDocShell->GetDoc() );
WriterRef xWriter;
::GetHTMLWriter(aEmptyStr, aMedium.GetBaseURL( true ), xWriter);
String sWriteName = pDocShell->HasName() ?
pMedium->GetName() :
(const String&) sFileURL;
- ULONG nRes = aWriter.Write(xWriter, &sWriteName);
+ sal_uLong nRes = aWriter.Write(xWriter, &sWriteName);
if(nRes)
{
ErrorHandler::HandleError(ErrCode(nRes));
- aEditWin.SetReadonly(TRUE);
+ aEditWin.SetReadonly(sal_True);
}
aMedium.Commit();
SvStream* pInStream = aMedium.GetInStream();
@@ -862,9 +860,9 @@ void SwSrcView::Load(SwDocShell* pDocShell)
if(bDocModified)
pDocShell->SetModified();// das Flag wird zwischendurch zurueckgesetzt
// AutoLoad abschalten
- pDocShell->SetAutoLoad(INetURLObject(), 0, FALSE);
+ pDocShell->SetAutoLoad(INetURLObject(), 0, sal_False);
OSL_ENSURE(PTR_CAST(SwWebDocShell, pDocShell), "Wieso keine WebDocShell?");
- USHORT nLine = ((SwWebDocShell*)pDocShell)->GetSourcePara();
+ sal_uInt16 nLine = ((SwWebDocShell*)pDocShell)->GetSourcePara();
aEditWin.SetStartLine(nLine);
aEditWin.GetTextEngine()->ResetUndo();
aEditWin.GetOutWin()->GrabFocus();
diff --git a/sw/source/ui/uiview/swcli.cxx b/sw/source/ui/uiview/swcli.cxx
index c9cbd3d015fc..1724efeedacd 100644
--- a/sw/source/ui/uiview/swcli.cxx
+++ b/sw/source/ui/uiview/swcli.cxx
@@ -28,20 +28,23 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
+#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
#include <wrtsh.hxx>
+#include <doc.hxx>
#include <swtypes.hxx>
#include <view.hxx>
#include <edtwin.hxx>
#include <swcli.hxx>
+#include <cmdid.h>
+#include <cfgitems.hxx>
#include <toolkit/helper/vclunohelper.hxx>
using namespace com::sun::star;
SwOleClient::SwOleClient( SwView *pView, SwEditWin *pWin, const svt::EmbeddedObjectRef& xObj ) :
- SfxInPlaceClient( pView, pWin, xObj.GetViewAspect() ), bInDoVerb( FALSE ),
+ SfxInPlaceClient( pView, pWin, xObj.GetViewAspect() ), bInDoVerb( sal_False ),
bOldCheckForOLEInCaption( pView->GetWrtShell().IsCheckForOLEInCaption() )
{
SetObject( xObj.GetObject() );
@@ -155,11 +158,11 @@ void SwOleClient::ViewChanged()
aVisSize.Height()= Fraction( aVisSize.Height() ) * GetScaleHeight();
SwRect aRect( Point( LONG_MIN, LONG_MIN ), aVisSize );
- rSh.LockView( TRUE ); //Scrollen im EndAction verhindern
+ rSh.LockView( sal_True ); //Scrollen im EndAction verhindern
rSh.StartAllAction();
rSh.RequestObjectResize( aRect, GetObject() );
rSh.EndAllAction();
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
}
void SwOleClient::MakeVisible()
@@ -168,4 +171,16 @@ void SwOleClient::MakeVisible()
rSh.MakeObjVisible( GetObject() );
}
+void SwOleClient::FormatChanged()
+{
+ const uno::Reference < embed::XEmbeddedObject >& xObj( GetObject() );
+ SwView * pView = dynamic_cast< SwView * >( GetViewShell() );
+ if ( pView && xObj.is() && SotExchange::IsMath( xObj->getClassID() ) )
+ {
+ SwWrtShell & rWrtSh = pView->GetWrtShell();
+ if (rWrtSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ))
+ rWrtSh.AlignFormulaToBaseline( xObj );
+ }
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx
index d2600a905ba2..aff53fe8f20a 100644
--- a/sw/source/ui/uiview/uivwimp.cxx
+++ b/sw/source/ui/uiview/uivwimp.cxx
@@ -98,7 +98,7 @@ SwView_Impl::~SwView_Impl()
pScanEvtLstnr->ViewDestroyed();
if( xClipEvtLstnr.is() )
{
- pClipEvtLstnr->AddRemoveListener( FALSE );
+ pClipEvtLstnr->AddRemoveListener( sal_False );
pClipEvtLstnr->ViewDestroyed();
}
delete pConfigItem;
@@ -125,12 +125,12 @@ SwXTextView* SwView_Impl::GetUNOObject_Impl()
void SwView_Impl::ExecuteScan( SfxRequest& rReq )
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch(nSlot)
{
case SID_TWAIN_SELECT:
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
Reference< XScannerManager > xScanMgr = SW_MOD()->GetScannerManager();
if( xScanMgr.is() )
@@ -162,7 +162,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq )
case SID_TWAIN_TRANSFER:
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
Reference< XScannerManager > xScanMgr = SW_MOD()->GetScannerManager();
if( xScanMgr.is() )
@@ -175,7 +175,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq )
{
Reference< XEventListener > xLstner = &rListener;
xScanMgr->startScan( aContexts.getConstArray()[ 0 ], xLstner );
- bDone = TRUE;
+ bDone = sal_True;
}
}
catch(...)
@@ -212,7 +212,7 @@ void SwView_Impl::AddClipboardListener()
if(!xClipEvtLstnr.is())
{
xClipEvtLstnr = pClipEvtLstnr = new SwClipboardChangeListener( *pView );
- pClipEvtLstnr->AddRemoveListener( TRUE );
+ pClipEvtLstnr->AddRemoveListener( sal_True );
}
}
@@ -265,7 +265,7 @@ SwScannerEventListener::~SwScannerEventListener()
void SAL_CALL SwScannerEventListener::disposing( const EventObject& rEventObject) throw(uno::RuntimeException)
{
-#if defined WIN || defined WNT || defined UNX
+#if defined WNT || defined UNX
SolarMutexGuard aGuard;
if( pView )
pView->ScannerEventHdl( rEventObject );
@@ -307,7 +307,7 @@ void SAL_CALL SwClipboardChangeListener::changedContents( const CLIP_NMSPC::Clip
}
}
-void SwClipboardChangeListener::AddRemoveListener( BOOL bAdd )
+void SwClipboardChangeListener::AddRemoveListener( sal_Bool bAdd )
{
pView->AddRemoveClipboardListener( Reference< XClipboardListener >( this ), bAdd );
}
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 6783dfa92206..e892760914d3 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -39,7 +39,6 @@
#include <svl/eitem.hxx>
#include <unotools/undoopt.hxx>
#include <unotools/lingucfg.hxx>
-#include <svtools/printdlg.hxx>
#include <unotools/useroptions.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/request.hxx>
@@ -81,6 +80,7 @@
#include <usrpref.hxx>
#include <srcview.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <drawdoc.hxx>
#include <wdocsh.hxx>
#include <wview.hxx>
@@ -94,7 +94,6 @@
#include <frmui.hrc>
#include <cfgitems.hxx>
#include <prtopt.hxx>
-#include <swprtopt.hxx>
#include <linguistic/lngprops.hxx>
#include <editeng/unolingu.hxx>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
@@ -174,7 +173,7 @@ void SwView::ImpSetVerb( int nSelType )
}
if ( bResetVerbs )
{
- SetVerbs( 0 );
+ SetVerbs( Sequence< embed::VerbDescriptor >() );
bVerbsActive = sal_False;
}
}
@@ -278,7 +277,7 @@ void SwView::SelectShell()
rDispatcher.Flush(); // alle gecachten Shells wirklich loeschen
//Zur alten Selektion merken welche Toolbar sichtbar war
- USHORT nId = static_cast< USHORT >( rDispatcher.GetObjectBarId( SFX_OBJECTBAR_OBJECT ));
+ sal_uInt16 nId = static_cast< sal_uInt16 >( rDispatcher.GetObjectBarId( SFX_OBJECTBAR_OBJECT ));
if ( nId )
pBarCfg->SetTopToolbar( nSelectionType, nId );
@@ -304,7 +303,7 @@ void SwView::SelectShell()
}
}
- BOOL bInitFormShell = sal_False;
+ sal_Bool bInitFormShell = sal_False;
if (!pFormShell)
{
bInitFormShell = sal_True;
@@ -313,7 +312,7 @@ void SwView::SelectShell()
StartListening(*pFormShell);
}
- BOOL bSetExtInpCntxt = sal_False;
+ sal_Bool bSetExtInpCntxt = sal_False;
nSelectionType = nNewSelectionType;
ShellModes eShellMode;
@@ -553,8 +552,8 @@ IMPL_LINK( SwView, TimeoutHdl, Timer *, EMPTYARG )
_CheckReadonlyState();
_CheckReadonlySelection();
- BOOL bOldUndo = pWrtShell->DoesUndo();
- pWrtShell->DoUndo( FALSE );
+ sal_Bool bOldUndo = pWrtShell->DoesUndo();
+ pWrtShell->DoUndo( sal_False );
SelectShell();
pWrtShell->DoUndo( bOldUndo );
bAttrChgNotified = sal_False;
@@ -749,9 +748,9 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
nLastPasteDestination( 0xFFFF ),
nLeftBorderDistance( 0 ),
nRightBorderDistance( 0 ),
- bInMailMerge(FALSE),
- bInDtor(FALSE),
- bOldShellWasPagePreView(FALSE)
+ bInMailMerge(sal_False),
+ bInDtor(sal_False),
+ bOldShellWasPagePreView(sal_False)
{
// According to discussion with MBA and further
// investigations, no old SfxViewShell will be set as parameter <pOldSh>,
@@ -769,8 +768,8 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
bShowAtResize = bDrawSelMode = bDocSzUpdated = sal_True;
- _CreateScrollbar( TRUE );
- _CreateScrollbar( FALSE );
+ _CreateScrollbar( sal_True );
+ _CreateScrollbar( sal_False );
pViewImpl = new SwView_Impl(this);
SetName(C2S("View"));
@@ -779,7 +778,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
aTimer.SetTimeout( 120 );
SwDocShell* pDocSh = PTR_CAST( SwDocShell, _pFrame->GetObjectShell() );
- BOOL bOldModifyFlag = pDocSh->IsEnableSetModified();
+ sal_Bool bOldModifyFlag = pDocSh->IsEnableSetModified();
if(bOldModifyFlag)
pDocSh->EnableSetModified( sal_False );
OSL_ENSURE( pDocSh, "view without DocShell." );
@@ -795,7 +794,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
aUsrPref.SetOnlineSpell( aLinguOpt.bIsSpellAuto );
- sal_Bool bOldShellWasSrcView = FALSE;
+ sal_Bool bOldShellWasSrcView = sal_False;
// determine if there is an existing view for
// document
@@ -818,11 +817,11 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
sSwViewData = ((SwPagePreView*)pExistingSh)->GetPrevSwViewData();
sNewCrsrPos = ((SwPagePreView*)pExistingSh)->GetNewCrsrPos();
nNewPage = ((SwPagePreView*)pExistingSh)->GetNewPage();
- bOldShellWasPagePreView = TRUE;
+ bOldShellWasPagePreView = sal_True;
}
else if( pExistingSh &&
pExistingSh->IsA( TYPE( SwSrcView ) ) )
- bOldShellWasSrcView = TRUE;
+ bOldShellWasSrcView = sal_True;
RTL_LOGFILE_CONTEXT_TRACE( aLog, "before create WrtShell" );
if(PTR_CAST( SwView, pExistingSh))
@@ -908,8 +907,8 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
aUsrPref.SetViewVRuler(sal_False);
}
- StartListening( *pViewFrame, TRUE );
- StartListening( *pDocSh, TRUE );
+ StartListening( *pViewFrame, sal_True );
+ StartListening( *pDocSh, sal_True );
// Set Zoom-factor from HLineal
Fraction aZoomFract( aUsrPref.GetZoom(), 100 );
@@ -946,11 +945,9 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
!pDocSh->GetVisArea(ASPECT_CONTENT).IsEmpty() )
SetVisArea( pDocSh->GetVisArea(ASPECT_CONTENT),sal_False);
- SwEditShell::SetUndoActionCount(
- static_cast< USHORT >( SW_MOD()->GetUndoOptions().GetUndoCount() ) );
- pWrtShell->DoUndo( 0 != SwEditShell::GetUndoActionCount() );
+ pWrtShell->DoUndo( 0 != SW_MOD()->GetUndoOptions().GetUndoCount() );
- const BOOL bBrowse = pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_Bool bBrowse = pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
SetNewWindowAllowed(!bBrowse);
ShowVScrollbar(aUsrPref.IsViewVScrollBar());
@@ -981,7 +978,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
SfxRequest aSfxRequest( FN_UPDATE_TOX, SFX_CALLMODE_SLOT, GetPool() );
Execute( aSfxRequest );
pWrtShell->GetDoc()->SetUpdateTOX( sal_False ); // wieder zurueck setzen
- pWrtShell->SttEndDoc(TRUE);
+ pWrtShell->SttEndDoc(sal_True);
}
// kein ResetModified, wenn es schone eine View auf dieses Doc gibt
@@ -993,7 +990,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
// so setze das Modified NICHT zurueck.
// no reset of modified state, if document
// was already modified.
- if ( !pWrtShell->GetDoc()->IsUndoNoResetModified() &&
+ if (!pWrtShell->GetDoc()->GetIDocumentUndoRedo().IsUndoNoResetModified() &&
( !pFirst || pFirst == pVFrame ) &&
!bIsDocModified )
{
@@ -1034,10 +1031,10 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
pDocSh->EnableSetModified( sal_True );
InvalidateBorder();
- if( !pHScrollbar->IsVisible( TRUE ) )
- ShowHScrollbar( FALSE );
- if( !pVScrollbar->IsVisible( TRUE ) )
- ShowVScrollbar( FALSE );
+ if( !pHScrollbar->IsVisible( sal_True ) )
+ ShowHScrollbar( sal_False );
+ if( !pVScrollbar->IsVisible( sal_True ) )
+ ShowVScrollbar( sal_False );
GetViewFrame()->GetWindow().AddChildEventListener( LINK( this, SwView, WindowChildEventListener ) );
}
@@ -1048,7 +1045,7 @@ SwView::~SwView()
delete mpPostItMgr;
mpPostItMgr = 0;
- bInDtor = TRUE;
+ bInDtor = sal_True;
pEditWin->Hide(); // damit kein Paint Aerger machen kann!
// An der SwDocShell den Pointer auf die View ruecksetzen
SwDocShell* pDocSh = GetDocShell();
@@ -1234,7 +1231,7 @@ void SwView::ReadUserData( const String &rUserData, sal_Bool bBrowse )
Point aCrsrPos2( nXTmp, nYTmp );
bSelectObj = pWrtShell->IsObjSelectable( aCrsrPos2 );
- pWrtShell->SwCrsrShell::SetCrsr( aCrsrPos2, FALSE );
+ pWrtShell->SwCrsrShell::SetCrsr( aCrsrPos2, sal_False );
if( bSelectObj )
{
pWrtShell->SelectObj( aCrsrPos2 );
@@ -1245,7 +1242,7 @@ void SwView::ReadUserData( const String &rUserData, sal_Bool bBrowse )
}
else if(USHRT_MAX != nNewPage)
{
- pWrtShell->GotoPage(nNewPage, TRUE);
+ pWrtShell->GotoPage(nNewPage, sal_True);
nNewPage = USHRT_MAX;
}
@@ -1535,8 +1532,8 @@ void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSe
void SwView::ShowCursor( bool bOn )
{
//don't scroll the cursor into the visible area
- BOOL bUnlockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE ); //lock visible section
+ sal_Bool bUnlockView = !pWrtShell->IsViewLocked();
+ pWrtShell->LockView( sal_True ); //lock visible section
if( !bOn )
pWrtShell->HideCrsr();
@@ -1544,7 +1541,7 @@ void SwView::ShowCursor( bool bOn )
pWrtShell->ShowCrsr();
if( bUnlockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
}
ErrCode SwView::DoVerb( long nVerb )
@@ -1594,7 +1591,7 @@ SwGlossaryHdl* SwView::GetGlosHdl()
void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
- BOOL bCallBase = sal_True;
+ sal_Bool bCallBase = sal_True;
if ( rHint.ISA(SfxSimpleHint) )
{
sal_uInt32 nId = ((SfxSimpleHint&)rHint).GetId();
@@ -1682,7 +1679,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
SfxViewShell::Notify(rBC, rHint);
}
-#if defined WIN || defined WNT || defined UNX
+#if defined WNT || defined UNX
void SwView::ScannerEventHdl( const EventObject& /*rEventObject*/ )
{
@@ -1748,9 +1745,9 @@ sal_uInt16 SwView::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
// status methods for clipboard.
// Status changes now notified from the clipboard.
-BOOL SwView::IsPasteAllowed()
+sal_Bool SwView::IsPasteAllowed()
{
- USHORT nPasteDestination = SwTransferable::GetSotDestination( *pWrtShell );
+ sal_uInt16 nPasteDestination = SwTransferable::GetSotDestination( *pWrtShell );
if( nLastPasteDestination != nPasteDestination )
{
TransferableDataHelper aDataHelper(
@@ -1763,7 +1760,7 @@ BOOL SwView::IsPasteAllowed()
*pWrtShell, aDataHelper );
}
else
- bPasteState = bPasteSpecialState = FALSE;
+ bPasteState = bPasteSpecialState = sal_False;
if( 0xFFFF == nLastPasteDestination ) // the init value
pViewImpl->AddClipboardListener();
@@ -1772,12 +1769,12 @@ BOOL SwView::IsPasteAllowed()
return bPasteState;
}
-BOOL SwView::IsPasteSpecialAllowed()
+sal_Bool SwView::IsPasteSpecialAllowed()
{
if ( pFormShell && pFormShell->IsActiveControl() )
- return FALSE;
+ return sal_False;
- USHORT nPasteDestination = SwTransferable::GetSotDestination( *pWrtShell );
+ sal_uInt16 nPasteDestination = SwTransferable::GetSotDestination( *pWrtShell );
if( nLastPasteDestination != nPasteDestination )
{
TransferableDataHelper aDataHelper(
@@ -1790,7 +1787,7 @@ BOOL SwView::IsPasteSpecialAllowed()
*pWrtShell, aDataHelper );
}
else
- bPasteState = bPasteSpecialState = FALSE;
+ bPasteState = bPasteSpecialState = sal_False;
if( 0xFFFF == nLastPasteDestination ) // the init value
pViewImpl->AddClipboardListener();
@@ -1806,19 +1803,18 @@ void SwView::NotifyDBChanged()
/*--------------------------------------------------------------------
Beschreibung: Drucken
--------------------------------------------------------------------*/
-SfxObjectShellRef & SwView::GetTmpSelectionDoc()
+SfxObjectShellLock & SwView::GetTmpSelectionDoc()
{
return GetViewImpl()->GetTmpSelectionDoc();
}
-SfxObjectShellRef & SwView::GetOrCreateTmpSelectionDoc()
+SfxObjectShellLock & SwView::GetOrCreateTmpSelectionDoc()
{
- SfxObjectShellRef &rxTmpDoc = GetViewImpl()->GetTmpSelectionDoc();
+ SfxObjectShellLock &rxTmpDoc = GetViewImpl()->GetTmpSelectionDoc();
if (!rxTmpDoc.Is())
{
SwXTextView *pImpl = GetViewImpl()->GetUNOObject_Impl();
- rxTmpDoc = pImpl->BuildTmpSelectionDoc(
- GetViewImpl()->GetEmbeddedObjRef() );
+ rxTmpDoc = pImpl->BuildTmpSelectionDoc();
}
return rxTmpDoc;
}
@@ -1828,18 +1824,13 @@ void SwView::AddTransferable(SwTransferable& rTransferable)
GetViewImpl()->AddTransferable(rTransferable);
}
-void SwPrtOptions::MakeOptions( BOOL bWeb )
-{
- *this = *SW_MOD()->GetPrtOptions(bWeb);
-
- nCopyCount = 1;
- bCollate = FALSE;
- bPrintSelection = FALSE;
- bJobStartet = FALSE;
+namespace sw {
- aMulti.SetTotalRange( Range( 0, RANGE_MAX ) );
- aMulti.SelectAll();
- aMulti.Select( 0, FALSE );
+void InitPrintOptionsFromApplication(SwPrintData & o_rData, bool const bWeb)
+{
+ o_rData = *SW_MOD()->GetPrtOptions(bWeb);
}
+} // namespace sw
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/view.hrc b/sw/source/ui/uiview/view.hrc
index d2aa60494801..d2aa60494801 100644..100755
--- a/sw/source/ui/uiview/view.hrc
+++ b/sw/source/ui/uiview/view.hrc
diff --git a/sw/source/ui/uiview/view.src b/sw/source/ui/uiview/view.src
index 9cf4f910f183..11543c0ac8f3 100644
--- a/sw/source/ui/uiview/view.src
+++ b/sw/source/ui/uiview/view.src
@@ -196,160 +196,6 @@ String MN_SRCVIEW_POPUPMENU
Text [ en-US ] = "HTML source" ;
};
-ToolBox RID_TOOLS_TOOLBOX
-{
- HelpID = HID_TOOLS_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Scroll = TRUE ;
- Align = BOXALIGN_LEFT ;
- Hide = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = FN_INSERT_CTRL ;
- HelpID = HID_INSERT_CTRL ;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_INSERT_FIELD_CTRL ;
- HelpID = HID_INSERT_FIELD_CTRL ;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = FN_INSERT_OBJ_CTRL ;
- HelpID = HID_INSERT_OBJ_CTRL ;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_INSERT_DRAW
- };
- ToolBoxItem
- {
- ITEM_FORM_CONFIG
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_GLOSSARY_DLG ;
- HelpID = FN_GLOSSARY_DLG ;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = FN_INSERT_CAPTION;
- HelpID = FN_INSERT_CAPTION ;
- Hide = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = FN_INSERT_IDX_ENTRY_DLG;
- HelpId = FN_INSERT_IDX_ENTRY_DLG;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_INSERT_REF_FIELD;
- HelpID = FN_INSERT_REF_FIELD ;
- Hide = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = FN_SHADOWCURSOR ;
- HelpID = FN_SHADOWCURSOR ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_SPELL_GRAMMAR_DIALOG;
- HelpID = FN_SPELL_GRAMMAR_DIALOG;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_AUTOSPELL_CHECK
- };
- ToolBoxItem
- {
- Identifier = FN_HYPHENATE_OPT_DLG;
- HelpID = FN_HYPHENATE_OPT_DLG;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_THESAURUS;
- HelpID = SID_THESAURUS;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_SEARCH_DLG ;
- HelpID = SID_SEARCH_DLG ;
- };
- ToolBoxItem
- {
- Identifier = SID_VIEW_DATA_SOURCE_BROWSER ;
- HelpID = SID_VIEW_DATA_SOURCE_BROWSER ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_ZOOM;
- HelpID = SID_ATTR_ZOOM ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_VIEW_META_CHARS ;
- HelpID = FN_VIEW_META_CHARS ;
- };
- ToolBoxItem
- {
- Identifier = FN_VIEW_FIELDNAME ;
- HelpID = FN_VIEW_FIELDNAME ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_VIEW_GRAPHIC ;
- HelpID = FN_VIEW_GRAPHIC ;
- };
- ToolBoxItem
- {
- Identifier = SID_BROWSER_MODE ;
- HelpID = SID_BROWSER_MODE ;
- };
- };
-};
Menu MN_SRCVIEW_POPUPMENU
{
ItemList =
diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx
index fe39d8b2099c..ba44f7b3fcab 100644
--- a/sw/source/ui/uiview/view0.cxx
+++ b/sw/source/ui/uiview/view0.cxx
@@ -65,11 +65,6 @@
#define OLEObjects
#define SwView
-#define SearchAttributes
-#define ReplaceAttributes
-#define SearchSettings
-#define _ExecSearch ExecSearch
-#define _StateSearch StateSearch
#define Frames
#define Graphics
#define Tables
@@ -89,7 +84,6 @@
#define WebListInTable
#define TextPage
#include <sfx2/msg.hxx>
-#include <svx/svxslots.hxx>
#include "swslots.hxx"
#include <PostItMgr.hxx>
@@ -184,7 +178,7 @@ void lcl_SetViewMarks(SwViewOption& rVOpt, sal_Bool bOn )
rVOpt.SetHardBlank(bOn);
rVOpt.SetSoftHyph(bOn);
SwViewOption::SetAppearanceFlag(
- VIEWOPT_FIELD_SHADINGS, bOn, TRUE);
+ VIEWOPT_FIELD_SHADINGS, bOn, sal_True);
}
void lcl_SetViewMetaChars( SwViewOption& rVOpt, sal_Bool bOn)
@@ -228,7 +222,7 @@ void SwView::StateViewOptions(SfxItemSet &rSet)
{
case FN_RULER:
{
- if(!pOpt->IsViewHRuler(TRUE) && !pOpt->IsViewVRuler(TRUE))
+ if(!pOpt->IsViewHRuler(sal_True) && !pOpt->IsViewVRuler(sal_True))
{
rSet.DisableItem(nWhich);
nWhich = 0;
@@ -330,7 +324,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
eState = bSet ? STATE_ON : STATE_OFF;
}
- BOOL bFlag = STATE_ON == eState;
+ sal_Bool bFlag = STATE_ON == eState;
uno::Reference< beans::XPropertySet > xLngProp( ::GetLinguPropertySet() );
switch ( nSlot )
@@ -345,13 +339,13 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
case FN_VIEW_FIELDS:
if( STATE_TOGGLE == eState )
bFlag = !SwViewOption::IsFieldShadings() ;
- SwViewOption::SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bFlag, TRUE );
+ SwViewOption::SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bFlag, sal_True );
break;
case FN_VIEW_BOUNDS:
if( STATE_TOGGLE == eState )
bFlag = !SwViewOption::IsDocBoundaries();
- SwViewOption::SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bFlag, TRUE );
+ SwViewOption::SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bFlag, sal_True );
break;
case SID_GRID_VISIBLE:
@@ -431,7 +425,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
case FN_VIEW_TABLEGRID:
if( STATE_TOGGLE == eState )
bFlag = !SwViewOption::IsTableBoundaries();
- SwViewOption::SetAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES, bFlag, TRUE );
+ SwViewOption::SetAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES, bFlag, sal_True );
break;
case FN_VIEW_FIELDNAME:
@@ -520,15 +514,15 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
if ( nSlot == SID_AUTOSPELL_CHECK )
GetPostItMgr()->SetSpellChecking();
- const BOOL bLockedView = rSh.IsViewLocked();
- rSh.LockView( TRUE ); //lock visible section
+ const sal_Bool bLockedView = rSh.IsViewLocked();
+ rSh.LockView( sal_True ); //lock visible section
GetWrtShell().EndAction();
rSh.LockView( bLockedView );
delete pOpt;
Invalidate(rReq.GetSlot());
if(!pArgs)
- rReq.AppendItem(SfxBoolItem(nSlot, (BOOL)bFlag));
+ rReq.AppendItem(SfxBoolItem(nSlot, (sal_Bool)bFlag));
rReq.Done();
}
diff --git a/sw/source/ui/uiview/view1.cxx b/sw/source/ui/uiview/view1.cxx
index 30702d6bdc91..09de8dc9a0c8 100644
--- a/sw/source/ui/uiview/view1.cxx
+++ b/sw/source/ui/uiview/view1.cxx
@@ -53,7 +53,7 @@
extern int bDocSzUpdated;
-void SwView::Activate(BOOL bMDIActivate)
+void SwView::Activate(sal_Bool bMDIActivate)
{
// aktuelle View anmelden an der DocShell
// die View bleibt solange an der DocShell
@@ -75,23 +75,23 @@ void SwView::Activate(BOOL bMDIActivate)
pWrtShell->MakeSelVisible();
bMakeSelectionVisible = sal_False;
}
- pHRuler->SetActive( TRUE );
- pVRuler->SetActive( TRUE );
+ pHRuler->SetActive( sal_True );
+ pVRuler->SetActive( sal_True );
if ( bMDIActivate )
{
- pWrtShell->ShGetFcs(FALSE); // Selektionen sichtbar
+ pWrtShell->ShGetFcs(sal_False); // Selektionen sichtbar
if( sSwViewData.Len() )
{
- ReadUserData( sSwViewData, FALSE );
+ ReadUserData( sSwViewData, sal_False );
sSwViewData.Erase();
}
AttrChangedNotify(pWrtShell);
// Flddlg ggf neu initialisieren (z.B. fuer TYP_SETVAR)
- USHORT nId = SwFldDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = SwFldDlgWrapper::GetChildWindowId();
SfxViewFrame* pVFrame = GetViewFrame();
SwFldDlgWrapper *pWrp = (SwFldDlgWrapper*)pVFrame->GetChildWindow(nId);
if (pWrp)
@@ -123,9 +123,9 @@ void SwView::Activate(BOOL bMDIActivate)
SfxViewShell::Activate(bMDIActivate);
}
-void SwView::Deactivate(BOOL bMDIActivate)
+void SwView::Deactivate(sal_Bool bMDIActivate)
{
- extern BOOL bFlushCharBuffer ;
+ extern sal_Bool bFlushCharBuffer ;
// Befinden sich noch Zeichen im Input Buffer?
if( bFlushCharBuffer )
GetEditWin().FlushInBuffer();
@@ -134,8 +134,8 @@ void SwView::Deactivate(BOOL bMDIActivate)
{
pWrtShell->ShLooseFcs(); // Selektionen unsichtbar
- pHRuler->SetActive( FALSE );
- pVRuler->SetActive( FALSE );
+ pHRuler->SetActive( sal_False );
+ pVRuler->SetActive( sal_False );
}
SfxViewShell::Deactivate(bMDIActivate);
}
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index e55194b0fb14..400d878df6af 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <com/sun/star/util/SearchOptions.hpp>
#include <com/sun/star/util/SearchFlags.hpp>
#include <com/sun/star/i18n/TransliterationModules.hpp>
@@ -44,7 +45,7 @@
#include <docary.hxx>
#include <hintids.hxx>
#include <SwRewriter.hxx>
-#include <undobj.hxx>
+#include <numrule.hxx>
#include <swundo.hxx>
#include <caption.hxx>
#include <svl/PasswordHelper.hxx>
@@ -89,6 +90,7 @@
#include <uivwimp.hxx>
#include <docsh.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <wrtsh.hxx>
#include <viewopt.hxx>
#include <basesh.hxx>
@@ -159,14 +161,14 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::ui::dialogs;
-static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, USHORT nWhichId )
+static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, sal_uInt16 nWhichId )
{
if (nWhichId == RES_CHRATR_LANGUAGE ||
nWhichId == RES_CHRATR_CJK_LANGUAGE ||
nWhichId == RES_CHRATR_CTL_LANGUAGE)
{
rWrtSh.StartAction();
- rWrtSh.LockView( TRUE );
+ rWrtSh.LockView( sal_True );
rWrtSh.Push();
// prepare to apply new language to all text in document
@@ -178,8 +180,8 @@ static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, USHORT nWhichId
aAttribs.Insert( nWhichId );
rWrtSh.ResetAttr( &aAttribs );
- rWrtSh.Pop( FALSE );
- rWrtSh.LockView( FALSE );
+ rWrtSh.Pop( sal_False );
+ rWrtSh.LockView( sal_False );
rWrtSh.EndAction();
}
}
@@ -187,7 +189,7 @@ static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, USHORT nWhichId
/*---------------------------------------------------------------------------
Beschreibung: String fuer die Seitenanzeige in der Statusbar basteln.
----------------------------------------------------------------------------*/
-String SwView::GetPageStr( USHORT nPg, USHORT nLogPg,
+String SwView::GetPageStr( sal_uInt16 nPg, sal_uInt16 nLogPg,
const String& rDisplay )
{
String aStr( aPageStr );
@@ -208,10 +210,10 @@ String SwView::GetPageStr( USHORT nPg, USHORT nLogPg,
}
int SwView::InsertGraphic( const String &rPath, const String &rFilter,
- BOOL bLink, GraphicFilter *pFlt,
- Graphic* pPreviewGrf, BOOL bRule )
+ sal_Bool bLink, GraphicFilter *pFlt,
+ Graphic* pPreviewGrf, sal_Bool bRule )
{
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
Graphic aGrf;
int nRes = GRFILTER_OK;
@@ -226,7 +228,7 @@ int SwView::InsertGraphic( const String &rPath, const String &rFilter,
if( GRFILTER_OK == nRes )
{
- SwFlyFrmAttrMgr aFrmMgr( TRUE, GetWrtShellPtr(), FRMMGR_TYPE_GRF );
+ SwFlyFrmAttrMgr aFrmMgr( sal_True, GetWrtShellPtr(), FRMMGR_TYPE_GRF );
SwWrtShell &rSh = GetWrtShell();
rSh.StartAction();
@@ -252,15 +254,15 @@ int SwView::InsertGraphic( const String &rPath, const String &rFilter,
return nRes;
}
-BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
+sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq )
{
#ifndef ENABLE_PROP_WITHOUTLINK
#define ENABLE_PROP_WITHOUTLINK 0x08
#endif
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
SwDocShell* pDocShell = GetDocShell();
- USHORT nHtmlMode = ::GetHtmlMode(pDocShell);
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(pDocShell);
// im HTML-Mode nur verknuepft einfuegen
FileDialogHelper* pFileDlg = new FileDialogHelper( SFXWB_GRAPHIC | SFXWB_SHOWSTYLES );
pFileDlg->SetTitle(SW_RESSTR(STR_INSERT_GRAPHIC ));
@@ -277,8 +279,8 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
SvStringsSortDtor aFormats;
SwDoc* pDoc = pDocShell->GetDoc();
- const USHORT nArrLen = pDoc->GetFrmFmts()->Count();
- USHORT i;
+ const sal_uInt16 nArrLen = pDoc->GetFrmFmts()->Count();
+ sal_uInt16 i;
for( i = 0; i < nArrLen; i++ )
{
SwFrmFmt* pFmt = (*pDoc->GetFrmFmts())[ i ];
@@ -325,7 +327,7 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
}
SFX_REQUEST_ARG( rReq, pName, SfxStringItem, SID_INSERT_GRAPHIC , sal_False );
- BOOL bShowError = !pName;
+ sal_Bool bShowError = !pName;
if( pName || ERRCODE_NONE == pFileDlg->Execute() )
{
@@ -429,7 +431,7 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
if(!pFmt)
pFmt = pDoc->MakeFrmFmt(sGraphicFormat,
pDocShell->GetDoc()->GetDfltFrmFmt(),
- TRUE, FALSE);
+ sal_True, sal_False);
rSh.SetFrmFmt( pFmt );
}
@@ -470,12 +472,12 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
else
{
// set the specific graphic attrbutes to the graphic
- bReturn = TRUE;
+ bReturn = sal_True;
AutoCaption( GRAPHIC_CAP );
rReq.Done();
}
- rSh.EndUndo(UNDO_INSERT); // wegen moegl. Shellwechsel
+ rSh.EndUndo(); // due to possible change of Shell
}
delete pFileDlg;
@@ -485,10 +487,10 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
void SwView::Execute(SfxRequest &rReq)
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- BOOL bIgnore = FALSE;
+ sal_Bool bIgnore = sal_False;
switch( nSlot )
{
case SID_CREATE_SW_DRAWVIEW:
@@ -532,7 +534,7 @@ void SwView::Execute(SfxRequest &rReq)
case FN_REDLINE_ON:
{
if( pArgs &&
- SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem ))
+ SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem ))
{
IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess();
Sequence <sal_Int8> aPasswd = pIDRA->GetRedlinePassword();
@@ -542,7 +544,7 @@ void SwView::Execute(SfxRequest &rReq)
// xmlsec05: new password dialog
Window* pParent;
const SfxPoolItem* pParentItem;
- if( SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, FALSE, &pParentItem ) )
+ if( SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, sal_False, &pParentItem ) )
pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr();
else
pParent = &GetViewFrame()->GetWindow();
@@ -561,8 +563,8 @@ void SwView::Execute(SfxRequest &rReq)
}
}
- USHORT nOn = ((const SfxBoolItem*)pItem)->GetValue() ? nsRedlineMode_t::REDLINE_ON : 0;
- USHORT nMode = pWrtShell->GetRedlineMode();
+ sal_uInt16 nOn = ((const SfxBoolItem*)pItem)->GetValue() ? nsRedlineMode_t::REDLINE_ON : 0;
+ sal_uInt16 nMode = pWrtShell->GetRedlineMode();
pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
}
}
@@ -571,7 +573,7 @@ void SwView::Execute(SfxRequest &rReq)
{
IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess();
Sequence <sal_Int8> aPasswd = pIDRA->GetRedlinePassword();
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem )
&& ((SfxBoolItem*)pItem)->GetValue() == ( aPasswd.getLength() != 0 ) )
break;
@@ -579,7 +581,7 @@ void SwView::Execute(SfxRequest &rReq)
// message box for wrong password
Window* pParent;
const SfxPoolItem* pParentItem;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, FALSE, &pParentItem ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_XWINDOW, sal_False, &pParentItem ) )
pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr();
else
pParent = &GetViewFrame()->GetWindow();
@@ -589,7 +591,7 @@ void SwView::Execute(SfxRequest &rReq)
aPasswdDlg.ShowExtras(SHOWEXTRAS_CONFIRM);
if (aPasswdDlg.Execute())
{
- USHORT nOn = nsRedlineMode_t::REDLINE_ON;
+ sal_uInt16 nOn = nsRedlineMode_t::REDLINE_ON;
String sNewPasswd( aPasswdDlg.GetPassword() );
Sequence <sal_Int8> aNewPasswd =
pIDRA->GetRedlinePassword();
@@ -603,20 +605,20 @@ void SwView::Execute(SfxRequest &rReq)
pIDRA->SetRedlinePassword(Sequence <sal_Int8> ());
nOn = 0;
}
- USHORT nMode = pIDRA->GetRedlineMode();
+ sal_uInt16 nMode = pIDRA->GetRedlineMode();
pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
rReq.AppendItem( SfxBoolItem( FN_REDLINE_PROTECT, ((nMode&nsRedlineMode_t::REDLINE_ON)==0) ) );
}
else
- bIgnore = TRUE;
+ bIgnore = sal_True;
}
break;
case FN_REDLINE_SHOW:
if( pArgs &&
- SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem))
+ SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem))
{
- USHORT nMode = ( ~(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE)
+ sal_uInt16 nMode = ( ~(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE)
& pWrtShell->GetRedlineMode() ) | nsRedlineMode_t::REDLINE_SHOW_INSERT;
if( ((const SfxBoolItem*)pItem)->GetValue() )
nMode |= nsRedlineMode_t::REDLINE_SHOW_DELETE;
@@ -635,8 +637,8 @@ void SwView::Execute(SfxRequest &rReq)
Point aCrsrPos = pWrtShell->GetCrsrDocPos( sal_True );
if( pWrtShell->GetContentAtPos( aCrsrPos, aCntntAtPos ) )
{
- USHORT nCount = pWrtShell->GetRedlineCount();
- for( USHORT nRedline = 0; nRedline < nCount; ++nRedline )
+ sal_uInt16 nCount = pWrtShell->GetRedlineCount();
+ for( sal_uInt16 nRedline = 0; nRedline < nCount; ++nRedline )
{
const SwRedline& rRedline = pWrtShell->GetRedline( nRedline );
if( *aCntntAtPos.aFnd.pRedl == rRedline )
@@ -655,20 +657,20 @@ void SwView::Execute(SfxRequest &rReq)
case SID_DOCUMENT_MERGE:
{
String sFileName, sFilterName;
- INT16 nVersion = 0;
+ sal_Int16 nVersion = 0;
bool bHasFileName = false;
pViewImpl->SetParam( 0 );
if( pArgs )
{
- if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILE_NAME, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILE_NAME, sal_False, &pItem ))
sFileName = ((const SfxStringItem*)pItem)->GetValue();
bHasFileName = ( sFileName.Len() > 0 );
- if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILTER_NAME, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pArgs->GetItemState( SID_FILTER_NAME, sal_False, &pItem ))
sFilterName = ((const SfxStringItem*)pItem)->GetValue();
- if( SFX_ITEM_SET == pArgs->GetItemState( SID_VERSION, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pArgs->GetItemState( SID_VERSION, sal_False, &pItem ))
{
nVersion = ((const SfxInt16Item *)pItem)->GetValue();
pViewImpl->SetParam( nVersion );
@@ -688,7 +690,7 @@ void SwView::Execute(SfxRequest &rReq)
pVFrame->ShowChildWindow(FN_REDLINE_ACCEPT);
// RedlineDlg neu initialisieren
- USHORT nId = SwRedlineAcceptChild::GetChildWindowId();
+ sal_uInt16 nId = SwRedlineAcceptChild::GetChildWindowId();
SwRedlineAcceptChild *pRed = (SwRedlineAcceptChild*)
pVFrame->GetChildWindow(nId);
if (pRed)
@@ -696,12 +698,12 @@ void SwView::Execute(SfxRequest &rReq)
}
}
else
- bIgnore = TRUE;
+ bIgnore = sal_True;
}
break;
case FN_SYNC_LABELS:
case FN_MAILMERGE_CHILDWINDOW:
- GetViewFrame()->ShowChildWindow(nSlot, TRUE);
+ GetViewFrame()->ShowChildWindow(nSlot, sal_True);
break;
case FN_ESCAPE:
{
@@ -748,7 +750,7 @@ void SwView::Execute(SfxRequest &rReq)
}
else if ( GetEditWin().IsChainMode() )
{
- GetEditWin().SetChainMode( FALSE );
+ GetEditWin().SetChainMode( sal_False );
}
else if( pWrtShell->GetFlyFrmFmt() )
{
@@ -761,9 +763,9 @@ void SwView::Execute(SfxRequest &rReq)
}
else
{
- SfxBoolItem aItem( SID_WIN_FULLSCREEN, FALSE );
+ SfxBoolItem aItem( SID_WIN_FULLSCREEN, sal_False );
GetViewFrame()->GetDispatcher()->Execute( SID_WIN_FULLSCREEN, SFX_CALLMODE_RECORD, &aItem, 0L );
- bIgnore = TRUE;
+ bIgnore = sal_True;
}
}
break;
@@ -783,7 +785,7 @@ void SwView::Execute(SfxRequest &rReq)
{
if(pArgs)
{
- const USHORT nCurIdx = pWrtShell->GetCurPageDesc();
+ const sal_uInt16 nCurIdx = pWrtShell->GetCurPageDesc();
SwPageDesc aPageDesc( pWrtShell->GetPageDesc( nCurIdx ) );
::ItemSetToPageDesc( *pArgs, aPageDesc );
// Den Descriptor der Core veraendern.
@@ -827,12 +829,12 @@ void SwView::Execute(SfxRequest &rReq)
{
pWrtShell->StartAction();
pWrtShell->EnterStdMode();
- BOOL bOldCrsrInReadOnly = pWrtShell->IsReadOnlyAvailable();
- pWrtShell->SetReadOnlyAvailable( TRUE );
+ sal_Bool bOldCrsrInReadOnly = pWrtShell->IsReadOnlyAvailable();
+ pWrtShell->SetReadOnlyAvailable( sal_True );
- for( USHORT i = 0; i < 2; ++i )
+ for( sal_uInt16 i = 0; i < 2; ++i )
{
- USHORT nCount = pWrtShell->GetTOXCount();
+ sal_uInt16 nCount = pWrtShell->GetTOXCount();
if( 1 == nCount )
++i;
@@ -848,13 +850,13 @@ void SwView::Execute(SfxRequest &rReq)
pBase = pWrtShell->GetCurTOX();
}
- BOOL bAutoMarkApplied = FALSE;
+ sal_Bool bAutoMarkApplied = sal_False;
while( pBase )
{
if(TOX_INDEX == pBase->GetType() && !bAutoMarkApplied)
{
pWrtShell->ApplyAutoMark();
- bAutoMarkApplied = TRUE;
+ bAutoMarkApplied = sal_True;
}
// das pBase wird nur fuer die Schnittstelle
// benoetigt. Muss mal umgetstellt werden!!!
@@ -872,9 +874,9 @@ void SwView::Execute(SfxRequest &rReq)
break;
case SID_ATTR_BRUSH:
{
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_BACKGROUND, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_BACKGROUND, sal_False, &pItem))
{
- const USHORT nCurIdx = pWrtShell->GetCurPageDesc();
+ const sal_uInt16 nCurIdx = pWrtShell->GetCurPageDesc();
SwPageDesc aDesc( pWrtShell->GetPageDesc( nCurIdx ));
SwFrmFmt& rMaster = aDesc.GetMaster();
rMaster.SetFmtAttr(*pItem);
@@ -895,14 +897,14 @@ void SwView::Execute(SfxRequest &rReq)
case FN_INSERT_CTRL:
case FN_INSERT_OBJ_CTRL:
{
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem))
{
- USHORT nValue = ((SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nValue = ((SfxUInt16Item*)pItem)->GetValue();
switch ( nSlot )
{
case FN_INSERT_CTRL:
{
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
if(bWeb)
SwView::nWebInsertCtrlState = nValue;
else
@@ -916,7 +918,7 @@ void SwView::Execute(SfxRequest &rReq)
GetViewFrame()->GetBindings().Invalidate( nSlot );
}
break;
-#if defined WIN || defined WNT || defined UNX
+#if defined WNT || defined UNX
case SID_TWAIN_SELECT:
case SID_TWAIN_TRANSFER:
GetViewImpl()->ExecuteScan( rReq );
@@ -925,17 +927,17 @@ void SwView::Execute(SfxRequest &rReq)
case SID_ATTR_DEFTABSTOP:
{
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_DEFTABSTOP, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_DEFTABSTOP, sal_False, &pItem))
{
SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
- USHORT nTab = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nTab = ((const SfxUInt16Item*)pItem)->GetValue();
MakeDefTabs( nTab, aDefTabs );
pWrtShell->SetDefault( aDefTabs );
}
}
break;
case SID_ATTR_LANGUAGE :
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_LANGUAGE, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_ATTR_LANGUAGE, sal_False, &pItem))
{
SvxLanguageItem aLang(((SvxLanguageItem*)pItem)->GetLanguage(), RES_CHRATR_LANGUAGE);
pWrtShell->SetDefault( aLang );
@@ -943,21 +945,21 @@ void SwView::Execute(SfxRequest &rReq)
}
break;
case SID_ATTR_CHAR_CTL_LANGUAGE:
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CTL_LANGUAGE, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CTL_LANGUAGE, sal_False, &pItem))
{
pWrtShell->SetDefault( *pItem );
lcl_SetAllTextToDefaultLanguage( *pWrtShell, RES_CHRATR_CTL_LANGUAGE );
}
break;
case SID_ATTR_CHAR_CJK_LANGUAGE:
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CJK_LANGUAGE, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(RES_CHRATR_CJK_LANGUAGE, sal_False, &pItem))
{
pWrtShell->SetDefault( *pItem );
lcl_SetAllTextToDefaultLanguage( *pWrtShell, RES_CHRATR_CJK_LANGUAGE );
}
break;
case FN_SCROLL_NEXT_PREV:
- if(pArgs && pArgs->GetItemState(FN_SCROLL_NEXT_PREV, FALSE, &pItem))
+ if(pArgs && pArgs->GetItemState(FN_SCROLL_NEXT_PREV, sal_False, &pItem))
{
// call the handlers of PageUp/DownButtons, only
bool* pbNext = new bool ( ((const SfxBoolItem*)pItem)->GetValue() );
@@ -966,7 +968,7 @@ void SwView::Execute(SfxRequest &rReq)
}
break;
case SID_JUMPTOMARK:
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_JUMPTOMARK, FALSE, &pItem))
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_JUMPTOMARK, sal_False, &pItem))
JumpToSwMark( (( const SfxStringItem*)pItem)->GetValue() );
break;
case SID_GALLERY :
@@ -982,15 +984,15 @@ void SwView::Execute(SfxRequest &rReq)
if(pVFrame->HasChildWindow(SID_BROWSER))
{
const SwDBData& rData = GetWrtShell().GetDBDesc();
- SW_MOD()->ShowDBObj(*this, rData, FALSE);
+ SW_MOD()->ShowDBObj(*this, rData, sal_False);
}
}
break;
case FN_INSERT_FIELD_DATA_ONLY :
{
- BOOL bShow = FALSE;
+ sal_Bool bShow = sal_False;
if( pArgs &&
- SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem ))
+ SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem ))
bShow = ((const SfxBoolItem*)pItem)->GetValue();
if((bShow && bInMailMerge) != GetViewFrame()->HasChildWindow(nSlot))
GetViewFrame()->ToggleChildWindow(nSlot);
@@ -1017,7 +1019,7 @@ void SwView::Execute(SfxRequest &rReq)
pValues[0].Value <<= aData.sDataSource;
pValues[1].Value <<= aData.sCommand;
pValues[2].Value <<= aData.nCommandType;
- pNewDBMgr->ExecuteFormLetter(rSh, aProperties, TRUE);
+ pNewDBMgr->ExecuteFormLetter(rSh, aProperties, sal_True);
}
}
bInMailMerge &= bShow;
@@ -1026,8 +1028,8 @@ void SwView::Execute(SfxRequest &rReq)
break;
case FN_QRY_MERGE:
{
- BOOL bUseCurrentDocument = TRUE;
- BOOL bQuery = !pArgs||SFX_ITEM_SET != pArgs->GetItemState(nSlot);
+ sal_Bool bUseCurrentDocument = sal_True;
+ sal_Bool bQuery = !pArgs||SFX_ITEM_SET != pArgs->GetItemState(nSlot);
if(bQuery)
{
SfxViewFrame* pTmpFrame = GetViewFrame();
@@ -1088,7 +1090,7 @@ void SwView::Execute(SfxRequest &rReq)
case SID_ALIGN_ANY_HDEFAULT :
case SID_ALIGN_ANY_VDEFAULT :
{
- USHORT nAlias = 0;
+ sal_uInt16 nAlias = 0;
if( nSelectionType & (nsSelectionType::SEL_DRW_TXT|nsSelectionType::SEL_TXT) )
{
switch( nSlot )
@@ -1161,7 +1163,7 @@ void SwView::Execute(SfxRequest &rReq)
/*--------------------------------------------------------------------
Beschreibung: SeitenNr-Feld invalidieren
--------------------------------------------------------------------*/
-void SwView::UpdatePageNums(USHORT nPhyNum, USHORT nVirtNum, const String& rPgStr)
+void SwView::UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr)
{
String sTemp(GetPageStr( nPhyNum, nVirtNum, rPgStr ));
const SfxStringItem aTmp( FN_STAT_PAGE, sTemp );
@@ -1178,7 +1180,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
SwWrtShell& rShell = GetWrtShell();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
OSL_ENSURE( nWhich, "empty set");
while( nWhich )
@@ -1187,24 +1189,24 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
{
case FN_STAT_PAGE: {
// Anzahl der Seiten, log. SeitenNr. SeitenNr ermitteln
- USHORT nPage, nLogPage;
+ sal_uInt16 nPage, nLogPage;
String sDisplay;
rShell.GetPageNumber( -1, rShell.IsCrsrVisible(), nPage, nLogPage, sDisplay );
rSet.Put( SfxStringItem( FN_STAT_PAGE,
GetPageStr( nPage, nLogPage, sDisplay) ));
- USHORT nCnt = GetWrtShell().GetPageCnt();
+ sal_uInt16 nCnt = GetWrtShell().GetPageCnt();
if (nPageCnt != nCnt) // Basic benachrichtigen
{
nPageCnt = nCnt;
- SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_PAGE_COUNT, SwDocShell::GetEventName(STR_SW_EVENT_PAGE_COUNT), GetViewFrame()->GetObjectShell()), FALSE);
+ SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_PAGE_COUNT, SwDocShell::GetEventName(STR_SW_EVENT_PAGE_COUNT), GetViewFrame()->GetObjectShell()), sal_False);
}
}
break;
case FN_STAT_TEMPLATE:
{
rSet.Put(SfxStringItem( FN_STAT_TEMPLATE,
- rShell.GetCurPageStyle(FALSE)));
+ rShell.GetCurPageStyle(sal_False)));
}
break;
@@ -1235,7 +1237,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
if ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
{
const SwViewOption* pVOpt = rShell.GetViewOptions();
- const USHORT nColumns = pVOpt->GetViewLayoutColumns();
+ const sal_uInt16 nColumns = pVOpt->GetViewLayoutColumns();
const bool bBookMode = pVOpt->IsViewLayoutBookMode();
SvxViewLayoutItem aViewLayout(nColumns, bBookMode);
rSet.Put( aViewLayout );
@@ -1249,13 +1251,13 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
if ( ( GetDocShell()->GetCreateMode() != SFX_CREATE_MODE_EMBEDDED ) || !GetDocShell()->IsInPlaceActive() )
{
const SwViewOption* pVOpt = rShell.GetViewOptions();
- const USHORT nCurrentZoom = pVOpt->GetZoom();
+ const sal_uInt16 nCurrentZoom = pVOpt->GetZoom();
SvxZoomSliderItem aZoomSliderItem( nCurrentZoom, MINZOOM, MAXZOOM );
aZoomSliderItem.AddSnappingPoint( 100 );
if ( !pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
{
- const USHORT nColumns = pVOpt->GetViewLayoutColumns();
+ const sal_uInt16 nColumns = pVOpt->GetViewLayoutColumns();
const bool bAutomaticViewLayout = 0 == nColumns;
const SwPostItMgr* pMgr = GetPostItMgr();
@@ -1374,7 +1376,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
if (pNumRule && !bOutlineNum ) // Cursor in Numerierung
{
- BYTE nNumLevel = rShell.GetNumLevel();
+ sal_uInt8 nNumLevel = rShell.GetNumLevel();
if ( nNumLevel < MAXLEVEL )
{
if(!pNumRule->IsAutoRule())
@@ -1383,7 +1385,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
RES_PARATR_NUMRULE, RES_PARATR_NUMRULE);
rShell.GetCurAttr(aSet);
if(SFX_ITEM_AVAILABLE <=
- aSet.GetItemState(RES_PARATR_NUMRULE, TRUE ))
+ aSet.GetItemState(RES_PARATR_NUMRULE, sal_True))
{
const String& rNumStyle =
((const SfxStringItem &)
@@ -1463,8 +1465,8 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
SwWrtShell &rSh = GetWrtShell();
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem=NULL;
- BOOL bUp = FALSE;
- USHORT nWhich = rReq.GetSlot();
+ sal_Bool bUp = sal_False;
+ sal_uInt16 nWhich = rReq.GetSlot();
switch( nWhich )
{
case FN_STAT_PAGE:
@@ -1477,7 +1479,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
case FN_STAT_BOOKMARK:
if ( pArgs )
{
- if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, TRUE, &pItem))
+ if (SFX_ITEM_SET == pArgs->GetItemState( nWhich, sal_True, &pItem))
{
const IDocumentMarkAccess* pMarkAccess = rSh.getIDocumentMarkAccess();
const sal_Int32 nIdx = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
@@ -1548,19 +1550,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();
@@ -1576,9 +1578,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();
@@ -1586,7 +1588,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
SetViewLayout( nColumns, bBookMode );
}
- bUp = TRUE;
+ bUp = sal_True;
rReq.Done();
InvalidateRulerPos();
@@ -1599,13 +1601,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();
}
}
@@ -1613,7 +1615,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() )
@@ -1640,7 +1642,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;
@@ -1648,7 +1650,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() )
{
@@ -1677,23 +1679,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();
@@ -1703,7 +1705,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
}
else
rSh.ToggleInsMode();
- bUp = TRUE;
+ bUp = sal_True;
break;
}
@@ -1715,11 +1717,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();
@@ -1744,7 +1746,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 )
@@ -1754,21 +1756,21 @@ void SwView::EditLinkDlg()
}
}
-BOOL SwView::JumpToSwMark( const String& rMark )
+sal_Bool SwView::JumpToSwMark( const String& rMark )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rMark.Len() )
{
// wir wollen den Bookmark aber am oberen Rand haben
- BOOL bSaveCC = IsCrsrAtCenter();
- BOOL bSaveCT = IsCrsrAtTop();
- SetCrsrAtTop( TRUE );
+ sal_Bool bSaveCC = IsCrsrAtCenter();
+ sal_Bool bSaveCT = IsCrsrAtTop();
+ SetCrsrAtTop( sal_True );
// Damit in FrameSet auch gescrollt werden kann, muss die
// entsprechende Shell auch das Focus-Flag gesetzt haben!
- BOOL bHasShFocus = pWrtShell->HasShFcs();
+ sal_Bool bHasShFocus = pWrtShell->HasShFcs();
if( !bHasShFocus )
- pWrtShell->ShGetFcs( FALSE );
+ pWrtShell->ShGetFcs( sal_False );
const SwFmtINetFmt* pINet;
String sCmp, sMark( INetURLObject::decode( rMark, INET_HEX_ESCAPE,
@@ -1824,15 +1826,15 @@ BOOL SwView::JumpToSwMark( const String& rMark )
TransliterationModules_IGNORE_CASE );
//todo/mba: assuming that notes shouldn't be searched
- BOOL bSearchInNotes = FALSE;
+ sal_Bool bSearchInNotes = sal_False;
if( pWrtShell->SearchPattern( aSearchOpt, bSearchInNotes, DOCPOS_START, DOCPOS_END ))
{
pWrtShell->EnterStdMode(); // Selektion wieder aufheben
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if( pMarkAccess->getMarksEnd() != (ppMark = pMarkAccess->findMark(sMark)) )
- pWrtShell->GotoMark( ppMark->get(), FALSE, TRUE ), bRet = TRUE;
+ pWrtShell->GotoMark( ppMark->get(), sal_False, sal_True ), bRet = sal_True;
else if( 0 != ( pINet = pWrtShell->FindINetAttr( sMark ) )) {
pWrtShell->addCurrentPosition();
bRet = pWrtShell->GotoINetAttr( *pINet->GetTxtINetFmt() );
@@ -1841,7 +1843,7 @@ BOOL SwView::JumpToSwMark( const String& rMark )
// fuer alle Arten von Flys
if( FLYCNTTYPE_ALL != eFlyType && pWrtShell->GotoFly( sName, eFlyType ))
{
- bRet = TRUE;
+ bRet = sal_True;
if( FLYCNTTYPE_FRM == eFlyType )
{
// TextFrames: Cursor in den Frame setzen
@@ -1856,7 +1858,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() );
@@ -1886,9 +1888,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;
}
@@ -1902,7 +1904,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 )
{
@@ -1913,7 +1915,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 );
@@ -1927,7 +1929,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();
@@ -1938,17 +1940,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
{
@@ -1963,21 +1965,21 @@ long SwView::InsertDoc( USHORT nSlotId, const String& rFileName, const String& r
return InsertMedium( nSlotId, pMed, nVersion );
}
-long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion )
+long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVersion )
{
- BOOL bInsert = FALSE, bCompare = FALSE;
+ sal_Bool bInsert = sal_False, bCompare = sal_False;
long nFound = 0;
SwDocShell* pDocSh = GetDocShell();
switch( nSlotId )
{
case SID_DOCUMENT_MERGE: break;
- case SID_DOCUMENT_COMPARE: bCompare = TRUE; break;
- case SID_INSERTDOC: bInsert = TRUE; break;
+ case SID_DOCUMENT_COMPARE: bCompare = sal_True; break;
+ case SID_INSERTDOC: bInsert = sal_True; break;
default:
OSL_ENSURE( !this, "unknown SlotId!" );
- bInsert = TRUE;
+ bInsert = sal_True;
nSlotId = SID_INSERTDOC;
break;
}
@@ -2017,10 +2019,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
@@ -2031,10 +2033,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 );
}
}
@@ -2044,14 +2044,16 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion )
{
SfxRequest aReq( FN_UPDATE_TOX, SFX_CALLMODE_SLOT, GetPool() );
Execute( aReq );
- pWrtShell->SetUpdateTOX( FALSE ); // wieder zurueck setzen
+ pWrtShell->SetUpdateTOX( sal_False ); // wieder zurueck setzen
}
if( pDoc )
{ // Disable Undo for .sdw or
// if the number of page styles with header/footer has changed
if( !pRead || nUndoCheck != lcl_PageDescWithHeader( *pDoc ) )
- pDoc->DelAllUndoObj();
+ {
+ pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
+ }
}
pWrtShell->EndAllAction();
@@ -2068,18 +2070,19 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion )
else
{
SfxObjectShellRef xDocSh;
+ SfxObjectShellLock xLockRef;
-extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
+extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh, SfxObjectShellLock& xLockRef,
const String& rFileName, const String& rPasswd,
- String& rFilter, INT16 nVersion,
+ String& rFilter, sal_Int16 nVersion,
SwDocShell* pDestSh );
String sFltNm;
- int nRet = lcl_FindDocShell( xDocSh, pMedium->GetName(), aEmptyStr,
+ int nRet = lcl_FindDocShell( xDocSh, xLockRef, pMedium->GetName(), aEmptyStr,
sFltNm, nVersion, pDocSh );
if( nRet )
{
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
pWrtShell->EnterStdMode(); // Selektionen loeschen
@@ -2105,7 +2108,7 @@ extern int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
return nFound;
}
-void SwView::EnableMailMerge(BOOL bEnable )
+void SwView::EnableMailMerge(sal_Bool bEnable )
{
bInMailMerge = bEnable;
SfxBindings& rBind = GetViewFrame()->GetBindings();
@@ -2173,7 +2176,7 @@ class SwMergeSourceWarningBox_Impl : public ModalDialog
void SetMessText( const String& rText ) { aMessageFI.SetText( rText ); }
};
-void SwView::GenerateFormLetter(BOOL bUseCurrentDocument)
+void SwView::GenerateFormLetter(sal_Bool bUseCurrentDocument)
{
if(bUseCurrentDocument)
{
@@ -2190,7 +2193,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
@@ -2200,7 +2203,7 @@ void SwView::GenerateFormLetter(BOOL bUseCurrentDocument)
// no cancel allowed
if ( RET_OK != aWarning.Execute() )
return;
- bCallAddressPilot = TRUE;
+ bCallAddressPilot = sal_True;
}
else
{
@@ -2230,12 +2233,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;
@@ -2293,7 +2296,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
@@ -2331,7 +2334,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 )
@@ -2357,7 +2360,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 c003cfdcbbc7..c619c9b8007b 100644
--- a/sw/source/ui/uiview/viewcoll.cxx
+++ b/sw/source/ui/uiview/viewcoll.cxx
@@ -45,7 +45,7 @@ void SwView::ExecColl(SfxRequest &rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
- USHORT nWhich = rReq.GetSlot();
+ sal_uInt16 nWhich = rReq.GetSlot();
switch( nWhich )
{
case FN_SET_PAGE:
@@ -58,10 +58,10 @@ void SwView::ExecColl(SfxRequest &rReq)
if( pArgs )
{
if (pArgs &&
- SFX_ITEM_SET == pArgs->GetItemState( nWhich , TRUE, &pItem ))
+ SFX_ITEM_SET == pArgs->GetItemState( nWhich , sal_True, &pItem ))
{
if( ((SfxStringItem*)pItem)->GetValue() !=
- GetWrtShell().GetCurPageStyle(FALSE) )
+ GetWrtShell().GetCurPageStyle(sal_False) )
{
SfxStringItem aName(SID_STYLE_APPLY,
((SfxStringItem*)pItem)->GetValue());
diff --git a/sw/source/ui/uiview/viewdlg.cxx b/sw/source/ui/uiview/viewdlg.cxx
index 25548f06739a..73bcb5078cad 100644
--- a/sw/source/ui/uiview/viewdlg.cxx
+++ b/sw/source/ui/uiview/viewdlg.cxx
@@ -53,9 +53,9 @@ void SwView::ExecDlg(SfxRequest &rReq)
const SfxPoolItem* pItem = 0;
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState( GetPool().GetWhich(nSlot), FALSE, &pItem );
+ pArgs->GetItemState( GetPool().GetWhich(nSlot), sal_False, &pItem );
switch ( nSlot )
{
@@ -63,11 +63,11 @@ void SwView::ExecDlg(SfxRequest &rReq)
{
if ( pItem )
{
- USHORT nValue = ((SfxUInt16Item *)pItem)->GetValue();
- USHORT nOldValue = pWrtShell->GetPageOffset();
- USHORT nPage, nLogPage;
+ sal_uInt16 nValue = ((SfxUInt16Item *)pItem)->GetValue();
+ sal_uInt16 nOldValue = pWrtShell->GetPageOffset();
+ sal_uInt16 nPage, nLogPage;
pWrtShell->GetPageNum( nPage, nLogPage,
- pWrtShell->IsCrsrVisible(), FALSE);
+ pWrtShell->IsCrsrVisible(), sal_False);
if(nValue != nOldValue || nValue != nLogPage)
{
diff --git a/sw/source/ui/uiview/viewdlg2.cxx b/sw/source/ui/uiview/viewdlg2.cxx
index e24d5de6a152..14a5d64b03d7 100644
--- a/sw/source/ui/uiview/viewdlg2.cxx
+++ b/sw/source/ui/uiview/viewdlg2.cxx
@@ -31,7 +31,7 @@
#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
-
+#include <sfx2/objface.hxx>
#include <fldmgr.hxx>
#include <expfld.hxx>
#include <modcfg.hxx>
@@ -84,10 +84,10 @@ void SwView::ExecDlgExt(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg( DLG_INS_FOOTNOTE,
- pMDI, *pWrtShell, TRUE );
+ pMDI, *pWrtShell, sal_True );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
- pDlg->SetHelpId(FN_EDIT_FOOTNOTE);
+ pDlg->SetHelpId(GetStaticInterface()->GetSlot(FN_EDIT_FOOTNOTE)->GetCommand());
pDlg->SetText( SW_RESSTR(STR_EDIT_FOOTNOTE) );
pDlg->Execute();
delete pDlg;
@@ -96,15 +96,15 @@ void SwView::ExecDlgExt(SfxRequest &rReq)
}
}
-void SwView::AutoCaption(const USHORT nType, const SvGlobalName *pOleId)
+void SwView::AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId)
{
SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
if (pModOpt->IsInsWithCaption(bWeb))
{
const InsCaptionOpt *pOpt = pModOpt->GetCapOption(bWeb, (SwCapObjType)nType, pOleId);
- if (pOpt && pOpt->UseCaption() == TRUE)
+ if (pOpt && pOpt->UseCaption() == sal_True)
InsertCaption(pOpt);
}
}
@@ -120,7 +120,7 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt)
SwWrtShell &rSh = GetWrtShell();
if(rName.Len())
{
- USHORT nPoolId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
+ sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
if( USHRT_MAX != nPoolId )
rSh.GetTxtCollFromPool(nPoolId);
// Pool-Vorlage existiert nicht: Existiert sie am Dokument?
@@ -159,16 +159,16 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt)
if (pFldType)
{
pFldType->SetDelimiter(pOpt->GetSeparator());
- pFldType->SetOutlineLvl( static_cast< BYTE >(pOpt->GetLevel()) );
+ pFldType->SetOutlineLvl( static_cast< sal_uInt8 >(pOpt->GetLevel()) );
}
}
- USHORT nID = USHRT_MAX;
+ sal_uInt16 nID = USHRT_MAX;
SwFieldType* pType = 0;
- const USHORT nCount = aMgr.GetFldTypeCount();
+ const sal_uInt16 nCount = aMgr.GetFldTypeCount();
if( rName.Len() )
{
- for (USHORT i = 0; i < nCount; ++i)
+ for (sal_uInt16 i = 0; i < nCount; ++i)
{
pType = aMgr.GetFldType(USHRT_MAX, i);
String aTmpName( pType->GetName() );
@@ -193,7 +193,7 @@ void SwView::InsertCaption(const InsCaptionOpt *pOpt)
if(pType)
((SwSetExpFieldType*)pType)->SetSeqFormat(pOpt->GetNumType());
- rSh.UpdateExpFlds( TRUE );
+ rSh.UpdateExpFlds( sal_True );
rSh.EndAllAction();
diff --git a/sw/source/ui/uiview/viewdraw.cxx b/sw/source/ui/uiview/viewdraw.cxx
index 9d1394ab4d61..87309088ffcf 100644
--- a/sw/source/ui/uiview/viewdraw.cxx
+++ b/sw/source/ui/uiview/viewdraw.cxx
@@ -353,7 +353,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
};
GetViewFrame()->GetBindings().Invalidate(aInval);
- BOOL bEndTextEdit = TRUE;
+ sal_Bool bEndTextEdit = sal_True;
if (pFuncPtr)
{
if (GetDrawFuncPtr())
@@ -371,7 +371,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
{
if(SID_OBJECT_SELECT == nDrawSfxId )
{
- pWrtShell->GotoObj(TRUE);
+ pWrtShell->GotoObj(sal_True);
}
else
{
@@ -388,7 +388,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
BeginTextEdit(pObj);
- bEndTextEdit = FALSE;
+ bEndTextEdit = sal_False;
}
}
}
@@ -416,7 +416,7 @@ void SwView::ExitDraw()
{
// the shell may be invalid at close/reload/SwitchToViewShell
SfxDispatcher* pDispatch = GetViewFrame()->GetDispatcher();
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
SfxShell* pTest = 0;
do
{
diff --git a/sw/source/ui/uiview/viewfunc.hxx b/sw/source/ui/uiview/viewfunc.hxx
index b9841b5def51..61ffcd735375 100644
--- a/sw/source/ui/uiview/viewfunc.hxx
+++ b/sw/source/ui/uiview/viewfunc.hxx
@@ -31,7 +31,6 @@
class ImageButton;
class Point;
-class PrintDialog;
class SfxItemSet;
class SfxPrinter;
class SfxTabPage;
@@ -43,17 +42,16 @@ class Window;
class SwWrtShell;
// folgende Funktionen stehen im viewprt.cxx
-PrintDialog* CreatePrintDialog( Window* , USHORT, SwWrtShell* );
-void SetPrinter( IDocumentDeviceAccess*, SfxPrinter*, BOOL bWeb );
+void SetPrinter( IDocumentDeviceAccess*, SfxPrinter*, sal_Bool bWeb );
SfxTabPage* CreatePrintOptionsPage( Window*, const SfxItemSet& );
-void SetAppPrintOptions( ViewShell* pSh, BOOL bWeb );
+void SetAppPrintOptions( ViewShell* pSh, sal_Bool bWeb );
// folgende Funktionen stehen im viewport.cxx
void ViewResizePixel( const Window &rRef,
const Point &rOfst,
const Size &rSize,
const Size &rEditSz,
- const BOOL bInner,
+ const sal_Bool bInner,
SwScrollbar& rVScrollbar,
SwScrollbar& rHScrollbar,
ImageButton* pPageUpBtn,
@@ -62,8 +60,8 @@ void ViewResizePixel( const Window &rRef,
Window& rScrollBarBox,
SvxRuler* pVLineal = 0,
SvxRuler* pHLineal = 0,
- BOOL bWebView = FALSE,
- BOOL bVRulerRight = FALSE );
+ sal_Bool bWebView = sal_False,
+ sal_Bool bVRulerRight = sal_False );
#endif
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index 811cd01f2f1f..ae86b4de27e1 100644
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -539,7 +539,7 @@ void SwView::InsertThesaurusSynonym( const String &rSynonmText, const String &rL
if( !bSelection )
{
if(pWrtShell->IsEndWrd())
- pWrtShell->Left(CRSR_SKIP_CELLS, FALSE, 1, FALSE );
+ pWrtShell->Left(CRSR_SKIP_CELLS, sal_False, 1, sal_False );
pWrtShell->SelWrd();
@@ -747,7 +747,7 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt)
if ( pMenu )
{
OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
- USHORT nId = ((PopupMenu*)pMenu)->Execute(pEditWin, aPixPos);
+ sal_uInt16 nId = ((PopupMenu*)pMenu)->Execute(pEditWin, aPixPos);
OUString aCommand = ((PopupMenu*)pMenu)->GetItemCommand(nId);
if (aCommand.getLength() == 0 )
{
@@ -912,7 +912,7 @@ IMPL_LINK( SwFieldDialog, MyListBoxHandler, ListBox *, pBox )
(*pFieldmark->GetParameters())[ sKey ] = makeAny(selection);
pFieldmark->Invalidate();
SwView& rView = ( ( SwEditWin* )GetParent() )->GetView();
- rView.GetDocShell()->SetModified( TRUE );
+ rView.GetDocShell()->SetModified( sal_True );
}
EndPopupMode();
diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx
index b2b4a87d791d..fbf5c6d3249a 100644
--- a/sw/source/ui/uiview/viewmdi.cxx
+++ b/sw/source/ui/uiview/viewmdi.cxx
@@ -64,7 +64,7 @@
#include <IDocumentSettingAccess.hxx>
#include <PostItMgr.hxx>
-USHORT SwView::nMoveType = NID_PGE;
+sal_uInt16 SwView::nMoveType = NID_PGE;
sal_Int32 SwView::nActMark = 0;
@@ -73,16 +73,16 @@ sal_Int32 SwView::nActMark = 0;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::frame;
-void SwView::SetZoom( SvxZoomType eZoomType, short nFactor, BOOL bViewOnly )
+void SwView::SetZoom( SvxZoomType eZoomType, short nFactor, sal_Bool bViewOnly )
{
_SetZoom( GetEditWin().GetOutputSizePixel(), eZoomType, nFactor, bViewOnly );
}
void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
- short nFactor, BOOL bViewOnly )
+ short nFactor, sal_Bool bViewOnly )
{
- BOOL bUnLockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE );
+ sal_Bool bUnLockView = !pWrtShell->IsViewLocked();
+ pWrtShell->LockView( sal_True );
pWrtShell->LockPaint();
{
@@ -90,7 +90,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
long nFac = nFactor;
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
SwMasterUsrPref *pUsrPref = (SwMasterUsrPref*)SW_MOD()->GetUsrPref(bWeb);
const SwPageDesc &rDesc = pWrtShell->GetPageDesc( pWrtShell->GetCurPageDesc() );
@@ -157,19 +157,19 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
//MasterUsrPrefs updaten UND DANACH die ViewOptions der aktuellen
//View updaten.
if ( !bViewOnly &&
- (USHORT(nFac) != pUsrPref->GetZoom() ||
- BYTE (eZoomType) != pUsrPref->GetZoomType()) )
+ (sal_uInt16(nFac) != pUsrPref->GetZoom() ||
+ sal_uInt8 (eZoomType) != pUsrPref->GetZoomType()) )
{
- pUsrPref->SetZoom ( USHORT(nFac) );
+ pUsrPref->SetZoom ( sal_uInt16(nFac) );
pUsrPref->SetZoomType( eZoomType );
SW_MOD()->ApplyUsrPref( *pUsrPref,
bViewOnly ? this: 0,
bViewOnly ? VIEWOPT_DEST_VIEW_ONLY : 0 );
pUsrPref->SetModified();
}
- if ( pOpt->GetZoom() != (USHORT) nFac )
+ if ( pOpt->GetZoom() != (sal_uInt16) nFac )
{
- aOpt.SetZoom ( USHORT(nFac) );
+ aOpt.SetZoom ( sal_uInt16(nFac) );
aOpt.SetReadonly(pOpt->IsReadonly());
pWrtShell->ApplyViewOptions( aOpt );
}
@@ -198,9 +198,9 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
((SwViewOption*)pWrtShell->GetViewOptions())->SetZoomType( eZoomType );
CalcVisArea( rEditSize ); //fuer das Neuberechnen des sichtbaren Bereiches
}
- else if ( USHORT(nFac) != pOpt->GetZoom() )
+ else if ( sal_uInt16(nFac) != pOpt->GetZoom() )
{
- aOpt.SetZoom ( USHORT(nFac) );
+ aOpt.SetZoom ( sal_uInt16(nFac) );
pWrtShell->ApplyViewOptions( aOpt );
}
@@ -213,13 +213,13 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
}
pWrtShell->UnlockPaint();
if( bUnLockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
}
-void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly )
+void SwView::SetViewLayout( sal_uInt16 nColumns, bool bBookMode, sal_Bool bViewOnly )
{
- const BOOL bUnLockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE );
+ const sal_Bool bUnLockView = !pWrtShell->IsViewLocked();
+ pWrtShell->LockView( sal_True );
pWrtShell->LockPaint();
{
@@ -228,7 +228,7 @@ void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly )
if ( !GetViewFrame()->GetFrame().IsInPlace() && !bViewOnly )
{
- const BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ const sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
SwMasterUsrPref *pUsrPref = (SwMasterUsrPref*)SW_MOD()->GetUsrPref(bWeb);
//MasterUsrPrefs updaten UND DANACH die ViewOptions der aktuellen
@@ -263,7 +263,7 @@ void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly )
pWrtShell->UnlockPaint();
if( bUnLockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
SfxBindings& rBnd = GetViewFrame()->GetBindings();
rBnd.Invalidate( SID_ATTR_VIEWLAYOUT );
@@ -286,15 +286,15 @@ IMPL_LINK( SwView, WindowChildEventListener, VclSimpleEvent*, pEvent )
{
case VCLEVENT_WINDOW_HIDE:
if( pChildWin == pHScrollbar )
- ShowHScrollbar( FALSE );
+ ShowHScrollbar( sal_False );
else if( pChildWin == pVScrollbar )
- ShowVScrollbar( FALSE );
+ ShowVScrollbar( sal_False );
break;
case VCLEVENT_WINDOW_SHOW:
if( pChildWin == pHScrollbar )
- ShowHScrollbar( TRUE );
+ ShowHScrollbar( sal_True );
else if( pChildWin == pVScrollbar )
- ShowVScrollbar( TRUE );
+ ShowVScrollbar( sal_True );
break;
}
}
@@ -302,7 +302,7 @@ IMPL_LINK( SwView, WindowChildEventListener, VclSimpleEvent*, pEvent )
return 0;
}
-int SwView::_CreateScrollbar( BOOL bHori )
+int SwView::_CreateScrollbar( sal_Bool bHori )
{
Window *pMDI = &GetViewFrame()->GetWindow();
SwScrollbar** ppScrollbar = bHori ? &pHScrollbar : &pVScrollbar;
@@ -320,9 +320,9 @@ int SwView::_CreateScrollbar( BOOL bHori )
(*ppScrollbar)->SetScrollHdl( LINK( this, SwView, ScrollHdl ));
(*ppScrollbar)->SetEndScrollHdl( LINK( this, SwView, EndScrollHdl ));
- (*ppScrollbar)->EnableDrag( TRUE );
+ (*ppScrollbar)->EnableDrag( sal_True );
- (*ppScrollbar)->SetAuto( TRUE );
+ (*ppScrollbar)->SetAuto( sal_True );
if(GetWindow())
InvalidateBorder();
@@ -335,12 +335,12 @@ int SwView::_CreateScrollbar( BOOL bHori )
return 1;
}
-void SwView::CreatePageButtons(BOOL bShow)
+void SwView::CreatePageButtons(sal_Bool bShow)
{
Window *pMDI = &GetViewFrame()->GetWindow();
- pPageUpBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEUP ), TRUE );
+ pPageUpBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEUP ), sal_True );
pPageUpBtn->SetHelpId(HID_SCRL_PAGEUP);
- pPageDownBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEDOWN ), FALSE );
+ pPageDownBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEDOWN ), sal_False );
pPageDownBtn->SetHelpId(HID_SCRL_PAGEDOWN);
Reference< XFrame > xFrame = GetViewFrame()->GetFrame().GetFrameInterface();
pNaviBtn = new SwNaviImageButton(pMDI, xFrame );
@@ -395,12 +395,12 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
case NID_GRF:
case NID_OLE:
{
- USHORT eType = GOTOOBJ_FLY_FRM;
+ sal_uInt16 eType = GOTOOBJ_FLY_FRM;
if(nMoveType == NID_GRF)
eType = GOTOOBJ_FLY_GRF;
else if(nMoveType == NID_OLE)
eType = GOTOOBJ_FLY_OLE;
- BOOL bSuccess = bNext ?
+ sal_Bool bSuccess = bNext ?
rSh.GotoNextFly(eType) :
rSh.GotoPrevFly(eType);
if(bSuccess)
@@ -496,7 +496,7 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
case NID_SRCH_REP:
if(pSrchItem)
{
- BOOL bBackward = pSrchItem->GetBackward();
+ sal_Bool bBackward = pSrchItem->GetBackward();
if(rSh.HasSelection() && !bNext == rSh.IsCrsrPtAtEnd())
rSh.SwapPam();
pSrchItem->SetBackward(!bNext);
@@ -514,7 +514,7 @@ IMPL_STATIC_LINK( SwView, MoveNavigationHdl, bool *, pbNext )
break;
case NID_TABLE_FORMULA_ERROR:
- rSh.GotoNxtPrvTblFormula( bNext, TRUE );
+ rSh.GotoNxtPrvTblFormula( bNext, sal_True );
break;
}
pThis->pEditWin->GrabFocus();
@@ -586,7 +586,7 @@ int SwView::KillVLineal()
IMPL_LINK( SwView, ExecRulerClick, Ruler *, pRuler )
{
- USHORT nDefPage = 0;
+ sal_uInt16 nDefPage = 0;
switch( pRuler->GetClickType() )
{
case RULER_TYPE_DONTKNOW:
@@ -608,16 +608,16 @@ IMPL_LINK( SwView, ExecRulerClick, Ruler *, pRuler )
return 0;
}
-USHORT SwView::GetMoveType()
+sal_uInt16 SwView::GetMoveType()
{
return nMoveType;
}
-void SwView::SetMoveType(USHORT nSet)
+void SwView::SetMoveType(sal_uInt16 nSet)
{
- BOOL bLastPage = nMoveType == NID_PGE;
+ sal_Bool bLastPage = nMoveType == NID_PGE;
nMoveType = nSet;
- BOOL bNewPage = nMoveType == NID_PGE;
+ sal_Bool bNewPage = nMoveType == NID_PGE;
if(bNewPage != bLastPage)
{
Color aColor(bNewPage ? COL_BLACK : VIEW_IMAGECOLOR);
@@ -654,7 +654,7 @@ void SwView::ShowHScrollbar(sal_Bool bShow)
sal_Bool SwView::IsHScrollbarVisible()const
{
OSL_ENSURE(pHScrollbar, "Scrollbar invalid");
- return pHScrollbar->IsVisible( FALSE ) || pHScrollbar->IsAuto();
+ return pHScrollbar->IsVisible( sal_False ) || pHScrollbar->IsAuto();
}
void SwView::ShowVScrollbar(sal_Bool bShow)
@@ -669,7 +669,7 @@ void SwView::ShowVScrollbar(sal_Bool bShow)
sal_Bool SwView::IsVScrollbarVisible()const
{
OSL_ENSURE(pVScrollbar, "Scrollbar invalid");
- return pVScrollbar->IsVisible( FALSE );
+ return pVScrollbar->IsVisible( sal_False );
}
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index ecd8ce0c1e2a..edbb2ef5f4dc 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -60,11 +60,11 @@
#define WB_RIGHT_ALIGNED ((WinBits)0x00008000)
#endif
-static BOOL bProtectDocShellVisArea = FALSE;
+static sal_Bool bProtectDocShellVisArea = sal_False;
-static USHORT nPgNum = 0;
+static sal_uInt16 nPgNum = 0;
-BOOL SwView::IsDocumentBorder()
+sal_Bool SwView::IsDocumentBorder()
{
return GetDocShell()->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ||
pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) ||
@@ -83,13 +83,13 @@ inline long GetLeftMargin( SwView &rView )
void lcl_GetPos(SwView* pView,
Point& rPos,
SwScrollbar* pScrollbar,
- BOOL bBorder)
+ sal_Bool bBorder)
{
SwWrtShell &rSh = pView->GetWrtShell();
const Size aDocSz( rSh.GetDocSize() );
const long lBorder = bBorder ? DOCUMENTBORDER : DOCUMENTBORDER * 2;
- BOOL bHori = pScrollbar->IsHoriScroll();
+ sal_Bool bHori = pScrollbar->IsHoriScroll();
const long lPos = pScrollbar->GetThumbPos() + (bBorder ? DOCUMENTBORDER : 0);
long Point:: *pPt = bHori ? &Point::nA : &Point::nB;
@@ -116,7 +116,7 @@ void lcl_GetPos(SwView* pView,
--------------------------------------------------------------------*/
void SwView::InvalidateRulerPos()
{
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
SID_ATTR_PARA_LRSPACE, SID_RULER_BORDERS, SID_RULER_PAGE_POS,
SID_RULER_LR_MIN_MAX, SID_ATTR_LONG_ULSPACE, SID_ATTR_LONG_LRSPACE,
@@ -174,14 +174,14 @@ aDocSz = rSz;
if( !pWrtShell || aVisArea.IsEmpty() ) // keine Shell -> keine Aenderung
{
- bDocSzUpdated = FALSE;
+ bDocSzUpdated = sal_False;
return;
}
//Wenn Text geloescht worden ist, kann es sein, dass die VisArea hinter
//den sichtbaren Bereich verweist
Rectangle aNewVisArea( aVisArea );
- BOOL bModified = false;
+ sal_Bool bModified = false;
SwTwips lGreenOffset = IsDocumentBorder() ? DOCUMENTBORDER : DOCUMENTBORDER * 2;
SwTwips lTmp = aDocSz.Width() + lGreenOffset;
@@ -190,7 +190,7 @@ aDocSz = rSz;
lTmp = aNewVisArea.Right() - lTmp;
aNewVisArea.Right() -= lTmp;
aNewVisArea.Left() -= lTmp;
- bModified = TRUE;
+ bModified = sal_True;
}
lTmp = aDocSz.Height() + lGreenOffset;
@@ -199,11 +199,11 @@ aDocSz = rSz;
lTmp = aNewVisArea.Bottom() - lTmp;
aNewVisArea.Bottom() -= lTmp;
aNewVisArea.Top() -= lTmp;
- bModified = TRUE;
+ bModified = sal_True;
}
if ( bModified )
- SetVisArea( aNewVisArea, FALSE );
+ SetVisArea( aNewVisArea, sal_False );
if ( UpdateScrollbars() && !bInOuterResizePixel && !bInInnerResizePixel &&
!GetViewFrame()->GetFrame().IsInPlace())
@@ -214,7 +214,7 @@ aDocSz = rSz;
/*--------------------------------------------------------------------
Beschreibung: Visarea neu setzen
--------------------------------------------------------------------*/
-void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
+void SwView::SetVisArea( const Rectangle &rRect, sal_Bool bUpdateScrollbar )
{
const Size aOldSz( aVisArea.GetSize() );
@@ -261,7 +261,7 @@ void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
aVisArea = aLR;
- const BOOL bOuterResize = bUpdateScrollbar && UpdateScrollbars();
+ const sal_Bool bOuterResize = bUpdateScrollbar && UpdateScrollbars();
if ( pWrtShell )
{
@@ -269,7 +269,7 @@ void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
if ( aOldSz != pWrtShell->VisArea().SSize() &&
( Abs(aOldSz.Width() - pWrtShell->VisArea().Width()) > 2 ||
Abs(aOldSz.Height() - pWrtShell->VisArea().Height()) > 2 ) )
- pWrtShell->CheckBrowseView( FALSE );
+ pWrtShell->CheckBrowseView( sal_False );
}
if ( !bProtectDocShellVisArea )
@@ -307,7 +307,7 @@ void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
/*--------------------------------------------------------------------
Beschreibung: Pos VisArea setzen
--------------------------------------------------------------------*/
-void SwView::SetVisArea( const Point &rPt, BOOL bUpdateScrollbar )
+void SwView::SetVisArea( const Point &rPt, sal_Bool bUpdateScrollbar )
{
//einmal alignen, damit Brushes korrekt angesetzt werden.
//MA 31. May. 96: Das geht in der BrowseView schief, weil evlt.
@@ -346,7 +346,7 @@ void SwView::CheckVisArea()
Rectangle aNewVisArea( aVisArea );
aNewVisArea.Move( DOCUMENTBORDER - aVisArea.Left(),
DOCUMENTBORDER - aVisArea.Top() );
- SetVisArea( aNewVisArea, TRUE );
+ SetVisArea( aNewVisArea, sal_True );
}
}
}
@@ -358,11 +358,11 @@ void SwView::CheckVisArea()
Bereiches
IN Rectangle &rRect: Rechteck, das sich innerhalb des neuen
sichtbaren Bereiches befinden soll
- USHORT nRange optional exakte Angabe des Bereiches,
+ sal_uInt16 nRange optional exakte Angabe des Bereiches,
um den ggfs. gescrollt werden soll
--------------------------------------------------------------------*/
void SwView::CalcPt( Point *pPt, const Rectangle &rRect,
- USHORT nRangeX, USHORT nRangeY)
+ sal_uInt16 nRangeX, sal_uInt16 nRangeY)
{
const SwTwips lMin = IsDocumentBorder() ? DOCUMENTBORDER : 0;
@@ -408,12 +408,12 @@ void SwView::CalcPt( Point *pPt, const Rectangle &rRect,
/*--------------------------------------------------------------------
Beschreibung: Scrolling
--------------------------------------------------------------------*/
-BOOL SwView::IsScroll( const Rectangle &rRect ) const
+sal_Bool SwView::IsScroll( const Rectangle &rRect ) const
{
return bCenterCrsr || bTopCrsr || !aVisArea.IsInside(rRect);
}
-void SwView::Scroll( const Rectangle &rRect, USHORT nRangeX, USHORT nRangeY )
+void SwView::Scroll( const Rectangle &rRect, sal_uInt16 nRangeX, sal_uInt16 nRangeY )
{
if ( aVisArea.IsEmpty() )
return;
@@ -477,8 +477,8 @@ void SwView::Scroll( const Rectangle &rRect, USHORT nRangeX, USHORT nRangeY )
aSize.Height()= Min( aSize.Height(),aVisSize.Height());
CalcPt( &aPt, Rectangle( rRect.TopLeft(), aSize ),
- static_cast< USHORT >((aVisSize.Width() - aSize.Width()) / 2),
- static_cast< USHORT >((aVisSize.Height()- aSize.Height())/ 2) );
+ static_cast< sal_uInt16 >((aVisSize.Width() - aSize.Width()) / 2),
+ static_cast< sal_uInt16 >((aVisSize.Height()- aSize.Height())/ 2) );
if( bTopCrsr )
{
@@ -539,10 +539,10 @@ void SwView::Scroll( const Rectangle &rRect, USHORT nRangeX, USHORT nRangeY )
Beschreibung: Seitenweises Scrollen
Liefern den Wert, um den bei PageUp / -Down gescrollt werden soll
--------------------------------------------------------------------*/
-BOOL SwView::GetPageScrollUpOffset( SwTwips &rOff ) const
+sal_Bool SwView::GetPageScrollUpOffset( SwTwips &rOff ) const
{
if ( !aVisArea.Top() || !aVisArea.GetHeight() )
- return FALSE;
+ return sal_False;
long nYScrl = GetYScroll() / 2;
rOff = -(aVisArea.GetHeight() - nYScrl);
//nicht vor den Dokumentanfang scrollen
@@ -550,14 +550,14 @@ BOOL SwView::GetPageScrollUpOffset( SwTwips &rOff ) const
rOff = rOff - aVisArea.Top();
else if( GetWrtShell().GetCharRect().Top() < (aVisArea.Top() + nYScrl))
rOff += nYScrl;
- return TRUE;
+ return sal_True;
}
-BOOL SwView::GetPageScrollDownOffset( SwTwips &rOff ) const
+sal_Bool SwView::GetPageScrollDownOffset( SwTwips &rOff ) const
{
if ( !aVisArea.GetHeight() ||
(aVisArea.GetHeight() > aDocSz.Height()) )
- return FALSE;
+ return sal_False;
long nYScrl = GetYScroll() / 2;
rOff = aVisArea.GetHeight() - nYScrl;
//nicht hinter das Dokumentende scrollen
@@ -596,7 +596,7 @@ long SwView::PageDown()
long SwView::PhyPageUp()
{
//aktuell sichtbare Seite erfragen, nicht formatieren
- USHORT nActPage = pWrtShell->GetNextPrevPageNum( FALSE );
+ sal_uInt16 nActPage = pWrtShell->GetNextPrevPageNum( sal_False );
if( USHRT_MAX != nActPage )
{
@@ -616,7 +616,7 @@ long SwView::PhyPageUp()
long SwView::PhyPageDown()
{
//aktuell sichtbare Seite erfragen, nicht formatieren
- USHORT nActPage = pWrtShell->GetNextPrevPageNum( TRUE );
+ sal_uInt16 nActPage = pWrtShell->GetNextPrevPageNum( sal_True );
// falls die letzte Dokumentseite sichtbar ist, nichts tun
if( USHRT_MAX != nActPage )
{
@@ -632,16 +632,16 @@ long SwView::PhyPageDown()
return 1;
}
-long SwView::PageUpCrsr( BOOL bSelect )
+long SwView::PageUpCrsr( sal_Bool bSelect )
{
if ( !bSelect )
{
- const USHORT eType = pWrtShell->GetFrmType(0,TRUE);
+ const sal_uInt16 eType = pWrtShell->GetFrmType(0,sal_True);
if ( eType & FRMTYPE_FOOTNOTE )
{
pWrtShell->MoveCrsr();
pWrtShell->GotoFtnAnchor();
- pWrtShell->Right(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ pWrtShell->Right(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
return 1;
}
}
@@ -653,12 +653,12 @@ long SwView::PageUpCrsr( BOOL bSelect )
PageUp() )
{
pWrtShell->ResetCursorStack();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-long SwView::PageDownCrsr(BOOL bSelect)
+long SwView::PageDownCrsr(sal_Bool bSelect)
{
SwTwips lOff = 0;
if ( GetPageScrollDownOffset( lOff ) &&
@@ -667,9 +667,9 @@ long SwView::PageDownCrsr(BOOL bSelect)
PageDown() )
{
pWrtShell->ResetCursorStack();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*------------------------------------------------------------------------
@@ -681,7 +681,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
return 0;
if ( pScrollbar->GetType() == SCROLL_DRAG )
- pWrtShell->EnableSmooth( FALSE );
+ pWrtShell->EnableSmooth( sal_False );
if(!pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) &&
pScrollbar->GetType() == SCROLL_DRAG)
@@ -694,11 +694,11 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
Point aPos( aVisArea.TopLeft() );
lcl_GetPos(this, aPos, pScrollbar, IsDocumentBorder());
- USHORT nPhNum = 1;
- USHORT nVirtNum = 1;
+ sal_uInt16 nPhNum = 1;
+ sal_uInt16 nVirtNum = 1;
String sDisplay;
- if(pWrtShell->GetPageNumber( aPos.Y(), FALSE, nPhNum, nVirtNum, sDisplay ))
+ if(pWrtShell->GetPageNumber( aPos.Y(), sal_False, nPhNum, nVirtNum, sDisplay ))
{
//QuickHelp:
@@ -737,7 +737,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
EndScrollHdl(pScrollbar);
if ( pScrollbar->GetType() == SCROLL_DRAG )
- pWrtShell->EnableSmooth( TRUE );
+ pWrtShell->EnableSmooth( sal_True );
return 0;
}
@@ -755,12 +755,12 @@ IMPL_LINK( SwView, EndScrollHdl, SwScrollbar *, pScrollbar )
Help::ShowQuickHelp(pScrollbar, Rectangle(), aEmptyStr, 0);
}
Point aPos( aVisArea.TopLeft() );
- BOOL bBorder = IsDocumentBorder();
+ sal_Bool bBorder = IsDocumentBorder();
lcl_GetPos(this, aPos, pScrollbar, bBorder);
if ( bBorder && aPos == aVisArea.TopLeft() )
UpdateScrollbars();
else
- SetVisArea( aPos, FALSE );
+ SetVisArea( aPos, sal_False );
GetViewFrame()->GetBindings().Update(FN_STAT_PAGE);
}
@@ -815,9 +815,9 @@ void SwView::CalcVisArea( const Size &rOutPixel )
/*--------------------------------------------------------------------
Beschreibung: Bedienelemente neu anordnen
--------------------------------------------------------------------*/
-void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ )
+void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool /*bInner*/ )
{
- BOOL bRightVRuler = pWrtShell->GetViewOptions()->IsVRulerRight();
+ sal_Bool bRightVRuler = pWrtShell->GetViewOptions()->IsVRulerRight();
if ( pVRuler->IsVisible() )
{
long nWidth = pVRuler->GetSizePixel().Width();
@@ -833,7 +833,7 @@ void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ )
const StyleSettings &rSet = GetEditWin().GetSettings().GetStyleSettings();
const long nTmp = rSet.GetScrollBarSize();
- if( pVScrollbar->IsVisible(FALSE) )
+ if( pVScrollbar->IsVisible(sal_False) )
{
if(bRightVRuler)
rToFill.Left() = nTmp;
@@ -852,7 +852,7 @@ void ViewResizePixel( const Window &rRef,
const Point &rOfst,
const Size &rSize,
const Size &rEditSz,
- const BOOL /*bInner*/,
+ const sal_Bool /*bInner*/,
SwScrollbar& rVScrollbar,
SwScrollbar& rHScrollbar,
ImageButton* pPageUpBtn,
@@ -861,23 +861,23 @@ void ViewResizePixel( const Window &rRef,
Window& rScrollBarBox,
SvxRuler* pVLineal,
SvxRuler* pHLineal,
- BOOL bWebView,
- BOOL bVRulerRight )
+ sal_Bool bWebView,
+ sal_Bool bVRulerRight )
{
// ViewResizePixel wird auch von der PreView benutzt!!!
- const BOOL bHLineal = pHLineal && pHLineal->IsVisible();
+ const sal_Bool bHLineal = pHLineal && pHLineal->IsVisible();
const long nHLinSzHeight = bHLineal ?
pHLineal->GetSizePixel().Height() : 0;
- const BOOL bVLineal = pVLineal && pVLineal->IsVisible();
+ const sal_Bool bVLineal = pVLineal && pVLineal->IsVisible();
const long nVLinSzWidth = bVLineal ?
pVLineal->GetSizePixel().Width() : 0;
- long nHBSzHeight2= rHScrollbar.IsVisible( FALSE ) || !rHScrollbar.IsAuto() ?
+ long nHBSzHeight2= rHScrollbar.IsVisible( sal_False ) || !rHScrollbar.IsAuto() ?
rRef.GetSettings().GetStyleSettings().GetScrollBarSize() : 0;
long nHBSzHeight =
- rHScrollbar.IsVisible(TRUE) || (rHScrollbar.IsVisible( FALSE ) && !rHScrollbar.IsAuto()) ?
+ rHScrollbar.IsVisible(sal_True) || (rHScrollbar.IsVisible( sal_False ) && !rHScrollbar.IsAuto()) ?
nHBSzHeight2:0;
- long nVBSzWidth = rVScrollbar.IsVisible(TRUE) || (rVScrollbar.IsVisible( FALSE ) && !rVScrollbar.IsAuto()) ?
+ long nVBSzWidth = rVScrollbar.IsVisible(sal_True) || (rVScrollbar.IsVisible( sal_False ) && !rVScrollbar.IsAuto()) ?
rRef.GetSettings().GetStyleSettings().GetScrollBarSize() : 0;
if(pVLineal)
@@ -946,10 +946,10 @@ void ViewResizePixel( const Window &rRef,
// wenn der Platz fuer Scrollbar und Page-Buttons zu klein wird, dann
// werden die Buttons versteckt
- USHORT nCnt = pNaviBtn ? 3 : 2;
+ sal_uInt16 nCnt = pNaviBtn ? 3 : 2;
long nSubSize = (aImgSz.Width() * nCnt );
//
- BOOL bHidePageButtons = aSize.Height() < ((bWebView ? 3 : 2) * nSubSize);
+ sal_Bool bHidePageButtons = aSize.Height() < ((bWebView ? 3 : 2) * nSubSize);
if(!bHidePageButtons)
aSize.Height() -= nSubSize;
else
@@ -971,7 +971,7 @@ void ViewResizePixel( const Window &rRef,
pPageDownBtn->SetPosSizePixel( aPos, aImgSz );
- if( rHScrollbar.IsVisible( FALSE ) )
+ if( rHScrollbar.IsVisible( sal_False ) )
{
aScrollFillPos.X() = aPos.X();
@@ -983,7 +983,7 @@ void ViewResizePixel( const Window &rRef,
void SwView::ShowAtResize()
{
- bShowAtResize = FALSE;
+ bShowAtResize = sal_False;
if ( pWrtShell->GetViewOptions()->IsViewHRuler() )
pHRuler->Show();
}
@@ -1002,15 +1002,15 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
Fraction( aSize.Height(), aObjSizePixel.Height() ) );
}
- bInInnerResizePixel = TRUE;
- const BOOL bHScrollVisible = pHScrollbar->IsVisible(TRUE);
- const BOOL bVScrollVisible = pVScrollbar->IsVisible(TRUE);
- BOOL bRepeat = FALSE;
+ bInInnerResizePixel = sal_True;
+ const sal_Bool bHScrollVisible = pHScrollbar->IsVisible(sal_True);
+ const sal_Bool bVScrollVisible = pVScrollbar->IsVisible(sal_True);
+ sal_Bool bRepeat = sal_False;
do
{
Size aSz( rSize );
SvBorder aBorder;
- CalcAndSetBorderPixel( aBorder, TRUE );
+ CalcAndSetBorderPixel( aBorder, sal_True );
if ( GetViewFrame()->GetFrame().IsInPlace() )
{
Size aViewSize( aSz );
@@ -1028,7 +1028,7 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
}
Size aEditSz( GetEditWin().GetOutputSizePixel() );
- ViewResizePixel( GetEditWin(), rOfst, aSz, aEditSz, TRUE, *pVScrollbar,
+ ViewResizePixel( GetEditWin(), rOfst, aSz, aEditSz, sal_True, *pVScrollbar,
*pHScrollbar, pPageUpBtn, pPageDownBtn,
pNaviBtn,
*pScrollFill, pVRuler, pHRuler,
@@ -1040,9 +1040,9 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
if( pHRuler->IsVisible() || pVRuler->IsVisible() )
{
const Fraction& rFrac = GetEditWin().GetMapMode().GetScaleX();
- USHORT nZoom = 100;
+ sal_uInt16 nZoom = 100;
if (0 != rFrac.GetDenominator())
- nZoom = USHORT(rFrac.GetNumerator() * 100L / rFrac.GetDenominator());
+ nZoom = sal_uInt16(rFrac.GetNumerator() * 100L / rFrac.GetDenominator());
const Fraction aFrac( nZoom, 100 );
pVRuler->SetZoom( aFrac );
@@ -1056,18 +1056,18 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
//EditWin niemals einstellen!
//VisArea einstellen, aber dort nicht das SetVisArea der DocShell rufen!
- bProtectDocShellVisArea = TRUE;
+ bProtectDocShellVisArea = sal_True;
CalcVisArea( aEditSz );
//visibility changes of the automatic horizontal scrollbar
//require to repeat the ViewResizePixel() call - but only once!
if(bRepeat)
- bRepeat = FALSE;
- else if(bHScrollVisible != pHScrollbar->IsVisible(TRUE) ||
- bVScrollVisible != pVScrollbar->IsVisible(TRUE))
- bRepeat = TRUE;
+ bRepeat = sal_False;
+ else if(bHScrollVisible != pHScrollbar->IsVisible(sal_True) ||
+ bVScrollVisible != pVScrollbar->IsVisible(sal_True))
+ bRepeat = sal_True;
}while( bRepeat );
- bProtectDocShellVisArea = FALSE;
- bInInnerResizePixel = FALSE;
+ bProtectDocShellVisArea = sal_False;
+ bInInnerResizePixel = sal_False;
}
void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
@@ -1075,13 +1075,13 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
// #i16909# return, if no size (caused by minimize window).
if ( bInOuterResizePixel || ( !rSize.Width() && !rSize.Height() ) )
return;
- bInOuterResizePixel = TRUE;
+ bInOuterResizePixel = sal_True;
// feststellen, ob Scrollbars angezeigt werden duerfen
- BOOL bBrowse = pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
- BOOL bShowH = FALSE,
- bShowV = FALSE,
- bAuto = FALSE,
+ sal_Bool bBrowse = pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ sal_Bool bShowH = sal_False,
+ bShowV = sal_False,
+ bAuto = sal_False,
bHAuto = bBrowse;
switch( GetScrollingMode() )
{
@@ -1092,51 +1092,51 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
{
bShowH = pVOpt->IsViewHScrollBar();
bShowV = pVOpt->IsViewVScrollBar();
- bAuto = bHAuto = TRUE;
+ bAuto = bHAuto = sal_True;
break;
}
}
/* kein break hier */
case SCROLLING_AUTO:
- bAuto = bHAuto = TRUE;
- bShowH = bShowV = TRUE;
+ bAuto = bHAuto = sal_True;
+ bShowH = bShowV = sal_True;
break;
case SCROLLING_YES:
- bShowH = bShowV = TRUE;
+ bShowH = bShowV = sal_True;
break;
case SCROLLING_NO:
- bShowH = bShowV = bHAuto = FALSE;
+ bShowH = bShowV = bHAuto = sal_False;
break;
}
SwDocShell* pDocSh = GetDocShell();
- BOOL bIsPreview = pDocSh->IsPreview();
+ sal_Bool bIsPreview = pDocSh->IsPreview();
if( bIsPreview )
{
- bShowH = bShowV = bHAuto = bAuto = FALSE;
+ bShowH = bShowV = bHAuto = bAuto = sal_False;
}
- if(pHScrollbar->IsVisible(FALSE) != bShowH && !bHAuto)
+ if(pHScrollbar->IsVisible(sal_False) != bShowH && !bHAuto)
ShowHScrollbar(bShowH);
pHScrollbar->SetAuto( bHAuto );
- if(pVScrollbar->IsVisible(FALSE) != bShowV && !bAuto)
+ if(pVScrollbar->IsVisible(sal_False) != bShowV && !bAuto)
ShowVScrollbar(bShowV);
pVScrollbar->SetAuto(bAuto);
SET_CURR_SHELL( pWrtShell );
- BOOL bRepeat = FALSE;
+ sal_Bool bRepeat = sal_False;
long nCnt = 0;
- BOOL bUnLockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE );
+ sal_Bool bUnLockView = !pWrtShell->IsViewLocked();
+ pWrtShell->LockView( sal_True );
pWrtShell->LockPaint();
do {
++nCnt;
- const BOOL bScroll1 = pVScrollbar->IsVisible(TRUE);
- const BOOL bScroll2 = pHScrollbar->IsVisible(TRUE);
+ const sal_Bool bScroll1 = pVScrollbar->IsVisible(sal_True);
+ const sal_Bool bScroll2 = pHScrollbar->IsVisible(sal_True);
SvBorder aBorder;
- CalcAndSetBorderPixel( aBorder, FALSE );
+ CalcAndSetBorderPixel( aBorder, sal_False );
const Size aEditSz( GetEditWin().GetOutputSizePixel() );
- ViewResizePixel( GetEditWin(), rOfst, rSize, aEditSz, FALSE, *pVScrollbar,
+ ViewResizePixel( GetEditWin(), rOfst, rSize, aEditSz, sal_False, *pVScrollbar,
*pHScrollbar, pPageUpBtn, pPageDownBtn,
pNaviBtn,
*pScrollFill, pVRuler, pHRuler,
@@ -1173,12 +1173,12 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
pDocSh->SfxInPlaceObject::GetVisArea() );*/
if ( pWrtShell->GetViewOptions()->GetZoomType() != SVX_ZOOM_PERCENT &&
!pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) )
- _SetZoom( aEditSz, (SvxZoomType)pWrtShell->GetViewOptions()->GetZoomType(), 100, TRUE );
+ _SetZoom( aEditSz, (SvxZoomType)pWrtShell->GetViewOptions()->GetZoomType(), 100, sal_True );
pWrtShell->EndAction();
- bRepeat = bScroll1 != pVScrollbar->IsVisible(TRUE);
+ bRepeat = bScroll1 != pVScrollbar->IsVisible(sal_True);
if ( !bRepeat )
- bRepeat = bScroll2 != pHScrollbar->IsVisible(TRUE);
+ bRepeat = bScroll2 != pHScrollbar->IsVisible(sal_True);
//Nicht endlosschleifen. Moeglichst dann stoppen wenn die
//(Auto-)Scrollbars sichtbar sind.
@@ -1186,14 +1186,14 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
( nCnt > 10 || ( nCnt > 3 && bHAuto && bAuto ) )
)
{
- bRepeat = FALSE;
+ bRepeat = sal_False;
}
}while ( bRepeat );
- if( pVScrollbar->IsVisible(FALSE) || pVScrollbar->IsAuto())
+ if( pVScrollbar->IsVisible(sal_False) || pVScrollbar->IsAuto())
{
- BOOL bShowButtons = pVScrollbar->IsVisible(TRUE);
+ sal_Bool bShowButtons = pVScrollbar->IsVisible(sal_True);
if(pPageUpBtn && pPageUpBtn->IsVisible() != bShowButtons)
{
pPageUpBtn->Show(bShowButtons);
@@ -1206,9 +1206,9 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
pWrtShell->UnlockPaint();
if( bUnLockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
- bInOuterResizePixel = FALSE;
+ bInOuterResizePixel = sal_False;
if ( mpPostItMgr )
{
@@ -1248,12 +1248,12 @@ Size SwView::GetOptimalSizePixel() const
return GetEditWin().LogicToPixel( aPgSize );
}
-BOOL SwView::UpdateScrollbars()
+sal_Bool SwView::UpdateScrollbars()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( !aVisArea.IsEmpty() )
{
- const BOOL bBorder = IsDocumentBorder();
+ const sal_Bool bBorder = IsDocumentBorder();
Rectangle aTmpRect( aVisArea );
if ( bBorder )
{
@@ -1267,11 +1267,11 @@ BOOL SwView::UpdateScrollbars()
aTmpSz.Width() += lOfst; aTmpSz.Height() += lOfst;
{
- const BOOL bVScrollVisible = pVScrollbar->IsVisible(TRUE);
+ const sal_Bool bVScrollVisible = pVScrollbar->IsVisible(sal_True);
pVScrollbar->DocSzChgd( aTmpSz );
pVScrollbar->ViewPortChgd( aTmpRect );
- BOOL bShowButtons = pVScrollbar->IsVisible(TRUE);
+ sal_Bool bShowButtons = pVScrollbar->IsVisible(sal_True);
if(pPageUpBtn && pPageUpBtn->IsVisible() != bShowButtons)
{
pPageUpBtn->Show(bShowButtons);
@@ -1281,16 +1281,16 @@ BOOL SwView::UpdateScrollbars()
pNaviBtn->Show(bShowButtons);
}
- if ( bVScrollVisible != pVScrollbar->IsVisible(TRUE) )
- bRet = TRUE;
+ if ( bVScrollVisible != pVScrollbar->IsVisible(sal_True) )
+ bRet = sal_True;
}
{
- const BOOL bHScrollVisible = pHScrollbar->IsVisible(TRUE);
+ const sal_Bool bHScrollVisible = pHScrollbar->IsVisible(sal_True);
pHScrollbar->DocSzChgd( aTmpSz );
pHScrollbar->ViewPortChgd( aTmpRect );
- if ( bHScrollVisible != pHScrollbar->IsVisible(TRUE) )
- bRet = TRUE;
- pScrollFill->Show(pHScrollbar->IsVisible(TRUE) && pVScrollbar->IsVisible(TRUE) );
+ if ( bHScrollVisible != pHScrollbar->IsVisible(sal_True) )
+ bRet = sal_True;
+ pScrollFill->Show(pHScrollbar->IsVisible(sal_True) && pVScrollbar->IsVisible(sal_True) );
}
}
return bRet;
@@ -1303,30 +1303,30 @@ void SwView::Move()
SfxViewShell::Move();
}
-BOOL SwView::HandleWheelCommands( const CommandEvent& rCEvt )
+sal_Bool SwView::HandleWheelCommands( const CommandEvent& rCEvt )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
const CommandWheelData* pWData = rCEvt.GetWheelData();
if( pWData && COMMAND_WHEEL_ZOOM == pWData->GetMode() )
{
- USHORT nFact = pWrtShell->GetViewOptions()->GetZoom();
+ sal_uInt16 nFact = pWrtShell->GetViewOptions()->GetZoom();
if( 0L > pWData->GetDelta() )
- nFact = static_cast< USHORT >(Max( 20, nFact - 10 ));
+ nFact = static_cast< sal_uInt16 >(Max( 20, nFact - 10 ));
else
- nFact = static_cast< USHORT >(Min( 600, nFact + 10 ));
+ nFact = static_cast< sal_uInt16 >(Min( 600, nFact + 10 ));
SetZoom( SVX_ZOOM_PERCENT, nFact );
- bOk = TRUE;
+ bOk = sal_True;
}
else
{
- if (pWData && (COMMAND_WHEEL_SCROLL==pWData->GetMode()) && (((ULONG)0xFFFFFFFF) == pWData->GetScrollLines()))
+ if (pWData && (COMMAND_WHEEL_SCROLL==pWData->GetMode()) && (((sal_uLong)0xFFFFFFFF) == pWData->GetScrollLines()))
{
if (pWData->GetDelta()<0)
PhyPageDown();
else
PhyPageUp();
- bOk = TRUE;
+ bOk = sal_True;
}
else
bOk = pEditWin->HandleScrollCommand( rCEvt,
diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx
index a0ee84e135b3..0459611cb39a 100644
--- a/sw/source/ui/uiview/viewprt.cxx
+++ b/sw/source/ui/uiview/viewprt.cxx
@@ -45,7 +45,6 @@
#include <sfx2/app.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/oldprintadaptor.hxx>
-#include <svtools/printdlg.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/prnmon.hxx>
#include <editeng/paperinf.hxx>
@@ -66,7 +65,6 @@
#include <docsh.hxx>
#include <viewopt.hxx>
#include <prtopt.hxx>
-#include <swprtopt.hxx>
#include <fontcfg.hxx>
#include <cfgitems.hxx>
#include <dbmgr.hxx>
@@ -91,14 +89,14 @@ using namespace ::com::sun::star;
/*--------------------------------------------------------------------
Beschreibung: Drucker an Sfx uebergeben
--------------------------------------------------------------------*/
-SfxPrinter* SwView::GetPrinter( BOOL bCreate )
+SfxPrinter* SwView::GetPrinter( sal_Bool bCreate )
{
const IDocumentDeviceAccess* pIDDA = GetWrtShell().getIDocumentDeviceAccess();
SfxPrinter *pOld = pIDDA->getPrinter( false );
SfxPrinter *pPrt = pIDDA->getPrinter( bCreate );
if ( pOld != pPrt )
{
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
::SetAppPrintOptions( &GetWrtShell(), bWeb );
}
return pPrt;
@@ -107,7 +105,7 @@ SfxPrinter* SwView::GetPrinter( BOOL bCreate )
/*--------------------------------------------------------------------
Beschreibung: Druckerwechsel weitermelden
--------------------------------------------------------------------*/
-void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, BOOL bWeb )
+void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, sal_Bool bWeb )
{
SwPrintOptions* pOpt = SW_MOD()->GetPrtOptions(bWeb);
if( !pOpt)
@@ -117,7 +115,7 @@ void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, BOOL bWeb )
const SfxItemSet& rSet = pNew->GetOptions();
const SwAddPrinterItem* pAddPrinterAttr;
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, FALSE,
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, sal_False,
(const SfxPoolItem**)&pAddPrinterAttr ) )
{
if( pIDDA )
@@ -127,7 +125,7 @@ void SetPrinter( IDocumentDeviceAccess* pIDDA, SfxPrinter* pNew, BOOL bWeb )
}
}
-USHORT SwView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
+sal_uInt16 SwView::SetPrinter(SfxPrinter* pNew, sal_uInt16 nDiffFlags, bool )
{
SwWrtShell &rSh = GetWrtShell();
SfxPrinter* pOld = rSh.getIDocumentDeviceAccess()->getPrinter( false );
@@ -140,17 +138,17 @@ USHORT SwView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
if ( nDiffFlags & SFX_PRINTER_PRINTER )
rSh.SetModified();
}
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
if ( nDiffFlags & SFX_PRINTER_OPTIONS )
::SetPrinter( rSh.getIDocumentDeviceAccess(), pNew, bWeb );
- const BOOL bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? TRUE : FALSE;
- const BOOL bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? TRUE : FALSE;
+ const sal_Bool bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? sal_True : sal_False;
+ const sal_Bool bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? sal_True : sal_False;
if ( bChgOri || bChgSize )
{
rSh.StartAllAction();
if ( bChgOri )
- rSh.ChgAllPageOrientation( USHORT(pNew->GetOrientation()) );
+ rSh.ChgAllPageOrientation( sal_uInt16(pNew->GetOrientation()) );
if ( bChgSize )
{
Size aSz( SvxPaperInfo::GetPaperSize( pNew ) );
@@ -169,35 +167,7 @@ USHORT SwView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
SfxTabPage* SwView::CreatePrintOptionsPage(Window* pParent,
const SfxItemSet& rSet)
{
- return ::CreatePrintOptionsPage( pParent, rSet, FALSE );
-}
-
-/*--------------------------------------------------------------------
- Beschreibung: Druckerdialog
- --------------------------------------------------------------------*/
-PrintDialog* CreatePrintDialog( Window* pParent, USHORT nPg, SwWrtShell* pSh )
-{
- PrintDialog *pDlg = new PrintDialog( pParent, false );
-
- if ( !nPg )
- nPg = 1;
- pDlg->EnableRange( PRINTDIALOG_FROMTO );
-
- if (pSh && (pSh->IsSelection() || pSh->IsFrmSelected() || pSh->IsObjSelected()))
- pDlg->EnableRange( PRINTDIALOG_SELECTION );
-
- pDlg->SetRangeText( String::CreateFromInt32(nPg) );
- pDlg->EnableRange( PRINTDIALOG_RANGE );
- pDlg->EnableCollate();
- return pDlg;
-}
-
-PrintDialog* SwView::CreatePrintDialog( Window* pParent )
-{
- // AMA: Hier sollte vielleicht die virtuelle Seitennummer angezeigt werden,
- // aber nur, wenn das Drucken virtuelle Seitennummern und nicht wie
- // bisher (auch beim SWG 2.0) physikalische beachtet werden.
- return ::CreatePrintDialog( pParent, GetWrtShell().GetPhyPageNum(), &GetWrtShell() );
+ return ::CreatePrintOptionsPage( pParent, rSet, sal_False );
}
/*--------------------------------------------------------------------
@@ -205,7 +175,7 @@ PrintDialog* SwView::CreatePrintDialog( Window* pParent )
--------------------------------------------------------------------*/
void SwView::ExecutePrint(SfxRequest& rReq)
{
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebView, this);
::SetAppPrintOptions( &GetWrtShell(), bWeb );
switch (rReq.GetSlot())
{
@@ -216,7 +186,7 @@ void SwView::ExecutePrint(SfxRequest& rReq)
if (sFaxName.Len())
{
SfxStringItem aPrinterName(SID_PRINTER_NAME, sFaxName);
- SfxBoolItem aSilent( SID_SILENT, TRUE );
+ SfxBoolItem aSilent( SID_SILENT, sal_True );
GetViewFrame()->GetDispatcher()->Execute( SID_PRINTDOC,
SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD,
&aPrinterName, &aSilent, 0L );
@@ -225,7 +195,7 @@ void SwView::ExecutePrint(SfxRequest& rReq)
{
InfoBox aInfoBox(&GetEditWin(), SW_RES(MSG_ERR_NO_FAX));
String sMsg = aInfoBox.GetMessText();
- USHORT nResNo = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS;
+ sal_uInt16 nResNo = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS;
sMsg.SearchAndReplace(String::CreateFromAscii("%1"), String(SW_RES(nResNo)));
aInfoBox.SetMessText(sMsg);
aInfoBox.Execute();
@@ -240,12 +210,12 @@ void SwView::ExecutePrint(SfxRequest& rReq)
case SID_PRINTDOCDIRECT:
{
SwWrtShell* pSh = &GetWrtShell();
- SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, FALSE);
- BOOL bSilent = pSilentItem ? pSilentItem->GetValue() : FALSE;
- SFX_REQUEST_ARG(rReq, pPrintFromMergeItem, SfxBoolItem, FN_QRY_MERGE, FALSE);
+ SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, sal_False);
+ sal_Bool bSilent = pSilentItem ? pSilentItem->GetValue() : sal_False;
+ SFX_REQUEST_ARG(rReq, pPrintFromMergeItem, SfxBoolItem, FN_QRY_MERGE, sal_False);
if(pPrintFromMergeItem)
rReq.RemoveItem(FN_QRY_MERGE);
- BOOL bFromMerge = pPrintFromMergeItem ? pPrintFromMergeItem->GetValue() : FALSE;
+ sal_Bool bFromMerge = pPrintFromMergeItem ? pPrintFromMergeItem->GetValue() : sal_False;
SwMiscConfig aMiscConfig;
bool bPrintSelection = false;
if(!bSilent && !bFromMerge &&
@@ -255,7 +225,7 @@ void SwView::ExecutePrint(SfxRequest& rReq)
short nRet = aBox.Execute();
if(RET_YES == nRet)
{
- SfxBoolItem aBool(FN_QRY_MERGE, TRUE);
+ SfxBoolItem aBool(FN_QRY_MERGE, sal_True);
GetViewFrame()->GetDispatcher()->Execute(
FN_QRY_MERGE, SFX_CALLMODE_ASYNCHRON, &aBool, 0L);
rReq.Ignore();
@@ -297,7 +267,7 @@ void SwView::ExecutePrint(SfxRequest& rReq)
SwPagePreview
--------------------------------------------------------------------*/
SfxTabPage* CreatePrintOptionsPage( Window *pParent,
- const SfxItemSet &rOptions, BOOL bPreview )
+ const SfxItemSet &rOptions, sal_Bool bPreview )
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "No Print Dialog");
@@ -321,14 +291,10 @@ SfxTabPage* CreatePrintOptionsPage( Window *pParent,
return pPage;
}
-void SetAppPrintOptions( ViewShell* pSh, BOOL bWeb )
+void SetAppPrintOptions( ViewShell* pSh, sal_Bool bWeb )
{
- SwPrintData aPrtData = *SW_MOD()->GetPrtOptions(bWeb);
const IDocumentDeviceAccess* pIDDA = pSh->getIDocumentDeviceAccess();
- SwPrintData* pShellPrintData = pIDDA->getPrintData();
-
- if(pShellPrintData)
- aPrtData = *pShellPrintData;
+ SwPrintData aPrtData = pIDDA->getPrintData();
if( pIDDA->getPrinter( false ) )
{
diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx
index a432d4a52a87..6be88b8855a1 100644
--- a/sw/source/ui/uiview/viewsrch.cxx
+++ b/sw/source/ui/uiview/viewsrch.cxx
@@ -60,7 +60,6 @@
#include <view.hrc>
#include <SwRewriter.hxx>
-#include <undobj.hxx>
#include <comcore.hrc>
#include "PostItMgr.hxx"
@@ -82,9 +81,9 @@ using namespace ::com::sun::star::i18n;
struct SwSearchOptions
{
SwDocPositions eStart, eEnd;
- BOOL bDontWrap;
+ sal_Bool bDontWrap;
- SwSearchOptions( SwWrtShell* pSh, BOOL bBackward );
+ SwSearchOptions( SwWrtShell* pSh, sal_Bool bBackward );
};
@@ -98,24 +97,24 @@ inline Window* GetParentWindow( SvxSearchDialog* pSrchDlg )
return pWin;
}
-void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
+void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
- const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId();
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
- BOOL bQuiet = FALSE;
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_SEARCH_QUIET, FALSE, &pItem))
+ sal_Bool bQuiet = sal_False;
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_SEARCH_QUIET, sal_False, &pItem))
bQuiet = ((const SfxBoolItem*) pItem)->GetValue();
- BOOL bApi = bQuiet | bNoMessage;
+ sal_Bool bApi = bQuiet | bNoMessage;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if (nSlot == FN_REPEAT_SEARCH && !pSrchItem)
{
if(bApi)
{
- rReq.SetReturnValue(SfxBoolItem(nSlot, FALSE));
+ rReq.SetReturnValue(SfxBoolItem(nSlot, sal_False));
nSlot = 0;
}
}
@@ -132,7 +131,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
break;
case FID_SEARCH_ON:
- bJustOpened = TRUE;
+ bJustOpened = sal_True;
GetViewFrame()->GetBindings().Invalidate(SID_SEARCH_ITEM);
break;
@@ -209,7 +208,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
{
case SVX_SEARCHCMD_FIND:
{
- BOOL bRet = SearchAndWrap(bApi);
+ sal_Bool bRet = SearchAndWrap(bApi);
if( bRet )
Scroll(pWrtShell->GetCharRect().SVRect());
rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
@@ -217,7 +216,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
break;
case SVX_SEARCHCMD_FIND_ALL:
{
- BOOL bRet = SearchAll();
+ sal_Bool bRet = SearchAll();
if( !bRet )
{
if( !bApi )
@@ -225,7 +224,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
Window* pParentWindow = GetParentWindow( pSrchDlg );
InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute();
}
- bFound = FALSE;
+ bFound = sal_False;
}
rReq.SetReturnValue(SfxBoolItem(nSlot, bRet));
}
@@ -238,7 +237,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
//JP 27.04.95: warum ?
// was ist, wenn man das gefundene nur attributieren will??
- USHORT nCmd = SVX_SEARCHCMD_FIND;
+ sal_uInt16 nCmd = SVX_SEARCHCMD_FIND;
if( pSrchItem->GetReplaceString().Len() ||
!pReplList )
{
@@ -246,7 +245,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
// Ersetzungsstring enthalten ist - der ersetzte String
// noch einmal gefunden wird.
- BOOL bBack = pSrchItem->GetBackward();
+ sal_Bool bBack = pSrchItem->GetBackward();
if (bBack)
pWrtShell->Push();
String aReplace( pSrchItem->GetReplaceString() );
@@ -271,9 +270,9 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
// 2) Weiter suchen (ohne zu ersetzen!)
- USHORT nOldCmd = pSrchItem->GetCommand();
+ sal_uInt16 nOldCmd = pSrchItem->GetCommand();
pSrchItem->SetCommand( nCmd );
- BOOL bRet = SearchAndWrap(bApi);
+ sal_Bool bRet = SearchAndWrap(bApi);
if( bRet )
Scroll( pWrtShell->GetCharRect().SVRect());
pSrchItem->SetCommand( nOldCmd );
@@ -290,18 +289,18 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
{
// bestehende Selektionen aufheben,
// wenn nicht in selektierten Bereichen gesucht werden soll
- (pWrtShell->*pWrtShell->fnKillSel)(0, FALSE);
+ (pWrtShell->*pWrtShell->fnKillSel)(0, sal_False);
if( DOCPOS_START == aOpts.eEnd )
pWrtShell->EndDoc();
else
pWrtShell->SttDoc();
}
- bExtra = FALSE;
- ULONG nFound;
+ bExtra = sal_False;
+ sal_uLong nFound;
{ //Scope for SwWait-Object
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
nFound = FUNC_Search( aOpts );
// #i8288# Now that everything has been replaced, restore the original cursor position.
@@ -317,7 +316,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
Window* pParentWindow = GetParentWindow( pSrchDlg );
InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute();
}
- bFound = FALSE;
+ bFound = sal_False;
return;
}
@@ -346,7 +345,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
case FID_SEARCH_SEARCHSET:
case FID_SEARCH_REPLACESET:
{
- static const USHORT aNormalAttr[] =
+ static const sal_uInt16 aNormalAttr[] =
{
/* 0 */ RES_CHRATR_CASEMAP, RES_CHRATR_CASEMAP,
/* 2 */ RES_CHRATR_COLOR, RES_CHRATR_POSTURE,
@@ -364,13 +363,13 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
/*24 */ 0
};
- static const USHORT aCJKAttr[] =
+ static const sal_uInt16 aCJKAttr[] =
{
RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_WEIGHT,
RES_CHRATR_EMPHASIS_MARK, RES_CHRATR_TWO_LINES,
RES_PARATR_SCRIPTSPACE, RES_PARATR_FORBIDDEN_RULES
};
- static const USHORT aCTLAttr[] =
+ static const sal_uInt16 aCTLAttr[] =
{
RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_WEIGHT
};
@@ -390,7 +389,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
14 );
SfxItemSet aSet( pWrtShell->GetAttrPool(), aArr.GetData() );
- USHORT nWhich = SID_SEARCH_SEARCHSET;
+ sal_uInt16 nWhich = SID_SEARCH_SEARCHSET;
if ( FID_SEARCH_REPLACESET == nSlot )
{
@@ -425,7 +424,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
}
-BOOL SwView::SearchAndWrap(BOOL bApi)
+sal_Bool SwView::SearchAndWrap(sal_Bool bApi)
{
SwSearchOptions aOpts( pWrtShell, pSrchItem->GetBackward() );
@@ -437,12 +436,12 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
// falls in selektierten Bereichen gesucht werden soll, duerfen sie
// nicht aufgehoben werden
if (!pSrchItem->GetSelection())
- (pWrtShell->*pWrtShell->fnKillSel)(0, FALSE);
+ (pWrtShell->*pWrtShell->fnKillSel)(0, sal_False);
- SwWait *pWait = new SwWait( *GetDocShell(), TRUE );
+ SwWait *pWait = new SwWait( *GetDocShell(), sal_True );
if( FUNC_Search( aOpts ) )
{
- bFound = TRUE;
+ bFound = sal_True;
if(pWrtShell->IsSelFrmMode())
{
pWrtShell->UnSelectFrm();
@@ -451,30 +450,30 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
pWrtShell->Pop();
pWrtShell->EndAllAction();
delete pWait;
- return TRUE;
+ return sal_True;
}
delete pWait, pWait = 0;
// Suchen in den Sonderbereichen, wenn keine
// Suche in Selektionen vorliegt. Bei Suche in Selektionen
// wird ohnehin in diesen Sonderbereichen gesucht
- BOOL bHasSrchInOther = bExtra;
+ sal_Bool bHasSrchInOther = bExtra;
if (!pSrchItem->GetSelection() && !bExtra )
{
- bExtra = TRUE;
+ bExtra = sal_True;
if( FUNC_Search( aOpts ) )
{
- bFound = TRUE;
+ bFound = sal_True;
pWrtShell->Pop();
pWrtShell->EndAllAction();
- return TRUE;
+ return sal_True;
}
- bExtra = FALSE;
+ bExtra = sal_False;
}
else
bExtra = !bExtra;
- const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId();
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
pSrchDlg = pWrp ? static_cast <SvxSearchDialog*> (pWrp->getDialog ()) : 0;
@@ -487,9 +486,9 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
Window* pParentWindow = GetParentWindow( pSrchDlg );
InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute();
}
- bFound = FALSE;
+ bFound = sal_False;
pWrtShell->Pop();
- return FALSE;
+ return sal_False;
}
pWrtShell->EndAllAction();
// noch mal mit WrapAround versuchen?
@@ -500,15 +499,15 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
: MSG_SEARCH_END )
).Execute() )
{
- bFound = FALSE;
+ bFound = sal_False;
pWrtShell->Pop();
- return FALSE;
+ return sal_False;
}
pWrtShell->StartAllAction();
- pWrtShell->Pop(FALSE);
- pWait = new SwWait( *GetDocShell(), TRUE );
+ pWrtShell->Pop(sal_False);
+ pWait = new SwWait( *GetDocShell(), sal_True );
- BOOL bSrchBkwrd = DOCPOS_START == aOpts.eEnd;
+ sal_Bool bSrchBkwrd = DOCPOS_START == aOpts.eEnd;
aOpts.eEnd = bSrchBkwrd ? DOCPOS_START : DOCPOS_END;
aOpts.eStart = bSrchBkwrd ? DOCPOS_END : DOCPOS_START;
@@ -532,13 +531,13 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
Window* pParentWindow = GetParentWindow( pSrchDlg );
InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute();
}
- return bFound = FALSE;
+ return bFound = sal_False;
}
-BOOL SwView::SearchAll(USHORT* pFound)
+sal_Bool SwView::SearchAll(sal_uInt16* pFound)
{
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
SwSearchOptions aOpts( pWrtShell, pSrchItem->GetBackward() );
@@ -547,15 +546,15 @@ BOOL SwView::SearchAll(USHORT* pFound)
{
// bestehende Selektionen aufheben,
// wenn nicht in selektierten Bereichen gesucht werden soll
- (pWrtShell->*pWrtShell->fnKillSel)(0, FALSE);
+ (pWrtShell->*pWrtShell->fnKillSel)(0, sal_False);
if( DOCPOS_START == aOpts.eEnd )
pWrtShell->EndDoc();
else
pWrtShell->SttDoc();
}
- bExtra = FALSE;
- USHORT nFound = (USHORT)FUNC_Search( aOpts );
+ bExtra = sal_False;
+ sal_uInt16 nFound = (sal_uInt16)FUNC_Search( aOpts );
if(pFound)
*pFound = nFound;
bFound = 0 != nFound;
@@ -567,7 +566,7 @@ BOOL SwView::SearchAll(USHORT* pFound)
void SwView::Replace()
{
- SwWait aWait( *GetDocShell(), TRUE );
+ SwWait aWait( *GetDocShell(), sal_True );
pWrtShell->StartAllAction();
@@ -584,7 +583,7 @@ void SwView::Replace()
pSrchItem->GetReplaceString(),
SwWrtShell::GETSTYLE_CREATESOME ));
- pWrtShell->EndUndo(UNDO_UI_REPLACE_STYLE);
+ pWrtShell->EndUndo();
}
else
{
@@ -610,7 +609,7 @@ void SwView::Replace()
-SwSearchOptions::SwSearchOptions( SwWrtShell* pSh, BOOL bBackward )
+SwSearchOptions::SwSearchOptions( SwWrtShell* pSh, sal_Bool bBackward )
{
eStart = DOCPOS_CURR;
if( bBackward )
@@ -625,9 +624,9 @@ SwSearchOptions::SwSearchOptions( SwWrtShell* pSh, BOOL bBackward )
}
}
-ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions )
+sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions )
{
- BOOL bDoReplace = pSrchItem->GetCommand() == SVX_SEARCHCMD_REPLACE ||
+ sal_Bool bDoReplace = pSrchItem->GetCommand() == SVX_SEARCHCMD_REPLACE ||
pSrchItem->GetCommand() == SVX_SEARCHCMD_REPLACE_ALL;
int eRanges = pSrchItem->GetSelection() ?
@@ -638,7 +637,7 @@ ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions )
pWrtShell->SttSelect();
- static USHORT const aSearchAttrRange[] = {
+ static sal_uInt16 aSearchAttrRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
@@ -672,11 +671,11 @@ ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions )
// build SearchOptions to be used
//
SearchOptions aSearchOpt( pSrchItem->GetSearchOptions() );
- aSearchOpt.Locale = SvxCreateLocale( (USHORT)GetAppLanguage() );
+ aSearchOpt.Locale = SvxCreateLocale( (sal_uInt16)GetAppLanguage() );
if( !bDoReplace )
aSearchOpt.replaceString = aEmptyStr;
- ULONG nFound;
+ sal_uLong nFound;
if( aSrchSet.Count() || ( pReplSet && pReplSet->Count() ))
{
nFound = pWrtShell->SearchAttr(
@@ -713,7 +712,7 @@ ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions )
LAYOUT_NS Dialog* SwView::GetSearchDialog()
{
- const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId();
+ const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId();
SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)SfxViewFrame::Current()->GetChildWindow(nId);
if ( pWrp )
pSrchDlg = pWrp->getDialog ();
@@ -725,7 +724,7 @@ LAYOUT_NS Dialog* SwView::GetSearchDialog()
void SwView::StateSearch(SfxItemSet &rSet)
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while(nWhich)
{
@@ -733,7 +732,7 @@ void SwView::StateSearch(SfxItemSet &rSet)
{
case SID_SEARCH_OPTIONS:
{
- UINT16 nOpt = 0xFFFF;
+ sal_uInt16 nOpt = 0xFFFF;
if( GetDocShell()->IsReadOnly() )
nOpt &= ~( SEARCH_OPTIONS_REPLACE |
SEARCH_OPTIONS_REPLACE_ALL );
@@ -756,13 +755,13 @@ void SwView::StateSearch(SfxItemSet &rSet)
( aTxt = pWrtShell->SwCrsrShell::GetSelTxt() ).Len() )
{
pSrchItem->SetSearchString( aTxt );
- pSrchItem->SetSelection( FALSE );
+ pSrchItem->SetSelection( sal_False );
}
else
- pSrchItem->SetSelection( TRUE );
+ pSrchItem->SetSelection( sal_True );
}
- bJustOpened = FALSE;
+ bJustOpened = sal_False;
rSet.Put( *pSrchItem );
}
break;
diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx
index fddde373a2f6..a7d1dae9ae11 100644
--- a/sw/source/ui/uiview/viewstat.cxx
+++ b/sw/source/ui/uiview/viewstat.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
#include <com/sun/star/linguistic2/XThesaurus.hpp>
#include <com/sun/star/uno/Sequence.hxx>
@@ -152,7 +153,7 @@ void SwView::GetState(SfxItemSet &rSet)
break;
case SID_CLEARHISTORY:
{
- rSet.Put(SfxBoolItem(nWhich, pWrtShell->GetUndoIds() != UNDO_EMPTY));
+ rSet.Put(SfxBoolItem(nWhich, pWrtShell->GetLastUndoInfo(0, 0)));
}
break;
case SID_UNDO:
@@ -179,7 +180,7 @@ void SwView::GetState(SfxItemSet &rSet)
if(pWrtShell->IsInVerticalText())
aImgItem.SetRotation(2700);
if(pWrtShell->IsInRightToLeftText())
- aImgItem.SetMirrored(TRUE);
+ aImgItem.SetMirrored(sal_True);
}
rSet.Put(aImgItem);
}
@@ -197,7 +198,7 @@ void SwView::GetState(SfxItemSet &rSet)
if(pWrtShell->IsInVerticalText())
aImgItem.SetRotation(2700);
if(pWrtShell->IsInRightToLeftText())
- aImgItem.SetMirrored(TRUE);
+ aImgItem.SetMirrored(sal_True);
}
rSet.Put(aImgItem);
}
@@ -217,7 +218,7 @@ void SwView::GetState(SfxItemSet &rSet)
break;
case SID_TWAIN_SELECT:
case SID_TWAIN_TRANSFER:
-#if defined WIN || defined WNT || defined UNX
+#if defined WNT || defined UNX
{
if(!SW_MOD()->GetScannerManager().is())
rSet.DisableItem(nWhich);
@@ -350,7 +351,7 @@ void SwView::GetState(SfxItemSet &rSet)
if(pWrtShell->IsInVerticalText())
aImageItem.SetRotation( 2700 );
if(pWrtShell->IsInRightToLeftText())
- aImageItem.SetMirrored( TRUE );
+ aImageItem.SetMirrored( sal_True );
rSet.Put(aImageItem);
}
break;
@@ -378,7 +379,7 @@ void SwView::GetState(SfxItemSet &rSet)
{
if( !pShell )
SelectShell();
- USHORT nAlias = 0;
+ sal_uInt16 nAlias = 0;
bool bDraw = false;
if( nSelectionType & (nsSelectionType::SEL_DRW_TXT|nsSelectionType::SEL_TXT) )
{
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index 66320221e050..2636015dc9c1 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -79,19 +79,19 @@ using namespace ::com::sun::star;
Beschreibung: Columns eintueten
--------------------------------------------------------------------*/
void lcl_FillSvxColumn(const SwFmtCol& rCol,
- USHORT nTotalWidth,
+ sal_uInt16 nTotalWidth,
SvxColumnItem& rColItem,
long nDistance)
{
const SwColumns& rCols = rCol.GetColumns();
- USHORT nWidth = 0;
+ sal_uInt16 nWidth = 0;
- BOOL bOrtho = rCol.IsOrtho() && rCols.Count();
+ sal_Bool bOrtho = rCol.IsOrtho() && rCols.Count();
long nInnerWidth = 0;
if( bOrtho )
{
nInnerWidth = nTotalWidth;
- for ( USHORT i = 0; i < rCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rCols.Count(); ++i )
{
SwColumn* pCol = rCols[i];
nInnerWidth -= pCol->GetLeft() + pCol->GetRight();
@@ -101,17 +101,17 @@ void lcl_FillSvxColumn(const SwFmtCol& rCol,
else
nInnerWidth /= rCols.Count();
}
- for ( USHORT i = 0; i < rCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rCols.Count(); ++i )
{
SwColumn* pCol = rCols[i];
- const USHORT nStart = USHORT(pCol->GetLeft() + nWidth + nDistance);
+ const sal_uInt16 nStart = sal_uInt16(pCol->GetLeft() + nWidth + nDistance);
if( bOrtho )
- nWidth = static_cast< USHORT >(nWidth + nInnerWidth + pCol->GetLeft() + pCol->GetRight());
+ nWidth = static_cast< sal_uInt16 >(nWidth + nInnerWidth + pCol->GetLeft() + pCol->GetRight());
else
- nWidth = static_cast< USHORT >(nWidth + rCol.CalcColWidth(i, nTotalWidth));
- const USHORT nEnd = USHORT(nWidth - pCol->GetRight() + nDistance);
+ nWidth = static_cast< sal_uInt16 >(nWidth + rCol.CalcColWidth(i, nTotalWidth));
+ const sal_uInt16 nEnd = sal_uInt16(nWidth - pCol->GetRight() + nDistance);
- SvxColumnDescription aColDesc(nStart, nEnd, TRUE);
+ SvxColumnDescription aColDesc(nStart, nEnd, sal_True);
rColItem.Append(aColDesc);
}
}
@@ -120,7 +120,7 @@ void lcl_FillSvxColumn(const SwFmtCol& rCol,
Beschreibung: ColumnItem in ColumnInfo ueberfuehren
--------------------------------------------------------------------*/
void lcl_ConvertToCols(const SvxColumnItem& rColItem,
- USHORT nTotalWidth,
+ sal_uInt16 nTotalWidth,
SwFmtCol& rCols)
{
OSL_ENSURE( rCols.GetNumCols() == rColItem.Count(), "Column count mismatch" );
@@ -129,27 +129,27 @@ void lcl_ConvertToCols(const SvxColumnItem& rColItem,
if(rCols.GetNumCols() != rColItem.Count())
return;
- USHORT nLeft = 0;
+ sal_uInt16 nLeft = 0;
SwTwips nSumAll= 0; // Summiere alle Spalten und Raender auf
SwColumns& rArr = rCols.GetColumns();
// Tabcols der Reihe nach
- for( USHORT i=0; i < rColItem.Count()-1; ++i )
+ for( sal_uInt16 i=0; i < rColItem.Count()-1; ++i )
{
OSL_ENSURE(rColItem[i+1].nStart >= rColItem[i].nEnd,"overlapping columns" );
- USHORT nStart = static_cast< USHORT >(rColItem[i+1].nStart);
- USHORT nEnd = static_cast< USHORT >(rColItem[i].nEnd);
+ sal_uInt16 nStart = static_cast< sal_uInt16 >(rColItem[i+1].nStart);
+ sal_uInt16 nEnd = static_cast< sal_uInt16 >(rColItem[i].nEnd);
if(nStart < nEnd)
nStart = nEnd;
- const USHORT nDiff = nStart - nEnd;
- const USHORT nRight = nDiff / 2;
+ const sal_uInt16 nDiff = nStart - nEnd;
+ const sal_uInt16 nRight = nDiff / 2;
- USHORT nWidth = static_cast< USHORT >(rColItem[i].nEnd - rColItem[i].nStart);
+ sal_uInt16 nWidth = static_cast< sal_uInt16 >(rColItem[i].nEnd - rColItem[i].nStart);
nWidth += nLeft + nRight;
SwColumn* pCol = rArr[i];
- pCol->SetWishWidth( USHORT(long(rCols.GetWishWidth()) * long(nWidth) /
+ pCol->SetWishWidth( sal_uInt16(long(rCols.GetWishWidth()) * long(nWidth) /
long(nTotalWidth) ));
pCol->SetLeft( nLeft );
pCol->SetRight( nRight );
@@ -161,9 +161,9 @@ void lcl_ConvertToCols(const SvxColumnItem& rColItem,
//Die Differenz aus der Gesamtwunschbreite und der Summe der bisher berechneten
// Spalten und Raender sollte die Breite der letzten Spalte ergeben.
- rArr[rColItem.Count()-1]->SetWishWidth( rCols.GetWishWidth() - (USHORT)nSumAll );
+ rArr[rColItem.Count()-1]->SetWishWidth( rCols.GetWishWidth() - (sal_uInt16)nSumAll );
- rCols.SetOrtho(FALSE, 0, 0 );
+ rCols.SetOrtho(sal_False, 0, 0 );
}
/*--------------------------------------------------------------------
@@ -172,7 +172,7 @@ void lcl_ConvertToCols(const SvxColumnItem& rColItem,
void lcl_EraseDefTabs(SvxTabStopItem& rTabStops)
{
// Def Tabs loeschen
- for ( USHORT i = 0; i < rTabStops.Count(); )
+ for ( sal_uInt16 i = 0; i < rTabStops.Count(); )
{
// Hier auch den DefTab auf Null rausschmeissen
if ( SVX_TAB_ADJUST_DEFAULT == rTabStops[i].GetAdjustment() ||
@@ -190,7 +190,7 @@ void lcl_EraseDefTabs(SvxTabStopItem& rTabStops)
--------------------------------------------------------------------*/
void SwView::SwapPageMargin(const SwPageDesc& rDesc, SvxLRSpaceItem& rLRSpace)
{
- USHORT nPhyPage, nVirPage;
+ sal_uInt16 nPhyPage, nVirPage;
GetWrtShell().GetPageNum( nPhyPage, nVirPage );
if ( rDesc.GetUseOn() == nsUseOnPage::PD_MIRROR && (nPhyPage % 2) == 0 )
@@ -224,30 +224,30 @@ void ResizeFrameCols(SwFmtCol& rCol,
{
// wenn die Wunschbreite zu gross wird, dann muessen alle Werte passend skaliert werden
long nScale = (0xffffl << 8)/ nNewWishWidth;
- for(USHORT i = 0; i < rArr.Count(); i++)
+ for(sal_uInt16 i = 0; i < rArr.Count(); i++)
{
SwColumn* pCol = rArr.GetObject(i);
long nVal = pCol->GetWishWidth();
lcl_Scale(nVal, nScale);
- pCol->SetWishWidth((USHORT) nVal);
+ pCol->SetWishWidth((sal_uInt16) nVal);
nVal = pCol->GetLeft();
lcl_Scale(nVal, nScale);
- pCol->SetLeft((USHORT) nVal);
+ pCol->SetLeft((sal_uInt16) nVal);
nVal = pCol->GetRight();
lcl_Scale(nVal, nScale);
- pCol->SetRight((USHORT) nVal);
+ pCol->SetRight((sal_uInt16) nVal);
}
lcl_Scale(nNewWishWidth, nScale);
lcl_Scale(nWishDiff, nScale);
}
- rCol.SetWishWidth( (USHORT) (nNewWishWidth) );
+ rCol.SetWishWidth( (sal_uInt16) (nNewWishWidth) );
if( nLeftDelta >= 2 || nLeftDelta <= -2)
- rArr[0]->SetWishWidth(rArr[0]->GetWishWidth() + (USHORT)nWishDiff);
+ rArr[0]->SetWishWidth(rArr[0]->GetWishWidth() + (sal_uInt16)nWishDiff);
else
- rArr[rArr.Count()-1]->SetWishWidth(rArr[rArr.Count()-1]->GetWishWidth() + (USHORT)nWishDiff);
+ rArr[rArr.Count()-1]->SetWishWidth(rArr[rArr.Count()-1]->GetWishWidth() + (sal_uInt16)nWishDiff);
//reset auto width
- rCol.SetOrtho(FALSE, 0, 0 );
+ rCol.SetOrtho(sal_False, 0, 0 );
}
/*--------------------------------------------------------------------
@@ -257,18 +257,18 @@ void ResizeFrameCols(SwFmtCol& rCol,
void SwView::ExecTabWin( SfxRequest& rReq )
{
SwWrtShell &rSh = GetWrtShell();
- const USHORT nFrmType = rSh.IsObjSelected() ?
+ const sal_uInt16 nFrmType = rSh.IsObjSelected() ?
FRMTYPE_DRAWOBJ :
- rSh.GetFrmType(0,TRUE);
- const BOOL bFrmSelection = rSh.IsFrmSelected();
- const BOOL bBrowse = rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ rSh.GetFrmType(0,sal_True);
+ const sal_Bool bFrmSelection = rSh.IsFrmSelected();
+ const sal_Bool bBrowse = rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
- const USHORT nSlot = rReq.GetSlot();
- const USHORT nDescId = rSh.GetCurPageDesc();
+ const sal_uInt16 nSlot = rReq.GetSlot();
+ const sal_uInt16 nDescId = rSh.GetCurPageDesc();
const SwPageDesc& rDesc = rSh.GetPageDesc( nDescId );
- const BOOL bVerticalWriting = rSh.IsInVerticalText();
+ const sal_Bool bVerticalWriting = rSh.IsInVerticalText();
const SwFmtHeader& rHeaderFmt = rDesc.GetMaster().GetHeader();
SwFrmFmt *pHeaderFmt = (SwFrmFmt*)rHeaderFmt.GetHeaderFmt();
@@ -281,9 +281,9 @@ void SwView::ExecTabWin( SfxRequest& rReq )
const long nPageWidth = bBrowse ? rPageRect.Width() : rFrmSize.GetWidth();
const long nPageHeight = bBrowse ? rPageRect.Height() : rFrmSize.GetHeight();
- BOOL bUnlockView = FALSE;
+ sal_Bool bUnlockView = sal_False;
rSh.StartAllAction();
- BOOL bSect = 0 != (nFrmType & FRMTYPE_COLSECT);
+ sal_Bool bSect = 0 != (nFrmType & FRMTYPE_COLSECT);
switch ( nSlot )
{
@@ -297,8 +297,14 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwFrmFmt* pFmt = ((SwFrmFmt*)rSh.GetFlyFrmFmt());
const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED);
- BOOL bRTL;
- BOOL bVerticalFrame = (bFrmSelection && rSh.IsFrmVertical(TRUE, bRTL))|| (!bFrmSelection && bVerticalWriting);
+ sal_Bool bVerticalFrame(sal_False);
+ {
+ sal_Bool bRTL;
+ sal_Bool bVertL2R;
+ bVerticalFrame = ( bFrmSelection &&
+ rSh.IsFrmVertical(sal_True, bRTL, bVertL2R) ) ||
+ ( !bFrmSelection && bVerticalWriting);
+ }
long nDeltaX = bVerticalFrame ?
rRect.Right() - rPageRect.Right() + aLongLR.GetRight() :
rPageRect.Left() + aLongLR.GetLeft() - rRect.Left();
@@ -330,7 +336,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwRect aRect;
rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nPrtWidth = aRect.Width();
- aSize.SetWidthPercent(BYTE((nPageWidth - aLongLR.GetLeft() - aLongLR.GetRight()) * 100 /nPrtWidth));
+ aSize.SetWidthPercent(sal_uInt8((nPageWidth - aLongLR.GetLeft() - aLongLR.GetRight()) * 100 /nPrtWidth));
}
else
aSize.SetWidth( nPageWidth -
@@ -365,9 +371,9 @@ void SwView::ExecTabWin( SfxRequest& rReq )
aLongLR.SetLeft( nOld > aLongLR.GetLeft() ? 0 : aLongLR.GetLeft() - nOld );
nOld = rDesc.GetMaster().GetLRSpace().GetRight();
- aLongLR.SetRight( nOld > (USHORT)aLongLR.GetRight() ? 0 : aLongLR.GetRight() - nOld );
- aLR.SetLeft((USHORT)aLongLR.GetLeft());
- aLR.SetRight((USHORT)aLongLR.GetRight());
+ aLongLR.SetRight( nOld > (sal_uInt16)aLongLR.GetRight() ? 0 : aLongLR.GetRight() - nOld );
+ aLR.SetLeft((sal_uInt16)aLongLR.GetLeft());
+ aLR.SetRight((sal_uInt16)aLongLR.GetRight());
if ( nFrmType & FRMTYPE_HEADER && pHeaderFmt )
pHeaderFmt->SetFmtAttr( aLR );
@@ -411,8 +417,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
}
else
{ // Seitenraender einstellen
- aLR.SetLeft((USHORT)aLongLR.GetLeft());
- aLR.SetRight((USHORT)aLongLR.GetRight());
+ aLR.SetLeft((sal_uInt16)aLongLR.GetLeft());
+ aLR.SetRight((sal_uInt16)aLongLR.GetRight());
SwapPageMargin( rDesc, aLR );
SwPageDesc aDesc( rDesc );
aDesc.GetMaster().SetFmtAttr( aLR );
@@ -435,8 +441,11 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SfxItemSet aSet( GetPool(), RES_FRM_SIZE, RES_FRM_SIZE,
RES_VERT_ORIENT, RES_HORI_ORIENT, 0 );
//which of the orientation attributes is to be put depends on the frame's environment
- BOOL bRTL;
- if((bFrmSelection && rSh.IsFrmVertical(TRUE, bRTL))|| (!bFrmSelection && bVerticalWriting))
+ sal_Bool bRTL;
+ sal_Bool bVertL2R;
+ if ( ( bFrmSelection &&
+ rSh.IsFrmVertical(sal_True, bRTL, bVertL2R ) ) ||
+ ( !bFrmSelection && bVerticalWriting ) )
{
SwFmtHoriOrient aHoriOrient(pFmt->GetHoriOrient());
aHoriOrient.SetHoriOrient(text::HoriOrientation::NONE);
@@ -456,7 +465,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwRect aRect;
rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nPrtHeight = aRect.Height();
- aSize.SetHeightPercent(BYTE(nHeight * 100 /nPrtHeight));
+ aSize.SetHeightPercent(sal_uInt8(nHeight * 100 /nPrtHeight));
}
else
aSize.SetHeight(nHeight );
@@ -505,15 +514,15 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if ( nFrmType & ( FRMTYPE_HEADER | FRMTYPE_FOOTER ))
{
- const BOOL bHead = nFrmType & FRMTYPE_HEADER ? TRUE : FALSE;
+ const sal_Bool bHead = nFrmType & FRMTYPE_HEADER ? sal_True : sal_False;
SvxULSpaceItem aUL( rDesc.GetMaster().GetULSpace() );
if ( bHead )
- aUL.SetUpper( (USHORT)aLongULSpace.GetUpper() );
+ aUL.SetUpper( (sal_uInt16)aLongULSpace.GetUpper() );
else
- aUL.SetLower( (USHORT)aLongULSpace.GetLower() );
+ aUL.SetLower( (sal_uInt16)aLongULSpace.GetLower() );
aDesc.GetMaster().SetFmtAttr( aUL );
- if( (bHead && pHeaderFmt) || (!bHead && pFooterFmt ))
+ if( (bHead && pHeaderFmt) || (!bHead && pFooterFmt) )
{
SwFmtFrmSize aSz( bHead ? pHeaderFmt->GetFrmSize() :
pFooterFmt->GetFrmSize() );
@@ -529,8 +538,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
else
{
SvxULSpaceItem aUL(RES_UL_SPACE);
- aUL.SetUpper((USHORT)aLongULSpace.GetUpper());
- aUL.SetLower((USHORT)aLongULSpace.GetLower());
+ aUL.SetUpper((sal_uInt16)aLongULSpace.GetUpper());
+ aUL.SetLower((sal_uInt16)aLongULSpace.GetLower());
aDesc.GetMaster().SetFmtAttr(aUL);
}
@@ -541,7 +550,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
case SID_ATTR_TABSTOP_VERTICAL:
case SID_ATTR_TABSTOP:
{
- USHORT nWhich = GetPool().GetWhich(nSlot);
+ sal_uInt16 nWhich = GetPool().GetWhich(nSlot);
SvxTabStopItem aTabStops( (const SvxTabStopItem&)rReq.GetArgs()->
Get( nWhich ));
aTabStops.SetWhich(RES_PARATR_TABSTOP);
@@ -560,7 +569,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
}
// auffuellen mit Default-Tabs
- USHORT nDef = ::GetTabDist( rDefTabs );
+ sal_uInt16 nDef = ::GetTabDist( rDefTabs );
::MakeDefTabs( nDef, aTabStops );
SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl();
@@ -622,7 +631,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
const SvxTabStopItem& rTabStops = (const SvxTabStopItem&)aSet.Get(RES_PARATR_TABSTOP);
// Haben wir einen Tab an Stelle Null
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < rTabStops.Count(); ++i )
if ( rTabStops[i].GetTabPos() == 0 )
@@ -641,7 +650,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
const SvxTabStopItem& rDefTabs =
(const SvxTabStopItem&)rSh.GetDefault(RES_PARATR_TABSTOP);
- USHORT nDef = ::GetTabDist(rDefTabs);
+ sal_uInt16 nDef = ::GetTabDist(rDefTabs);
::MakeDefTabs( nDef, aTabStops );
if( pColl && pColl->IsAutoUpdateFmt())
@@ -662,11 +671,11 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SvxColumnItem aColItem((const SvxColumnItem&)rReq.
GetArgs()->Get(nSlot));
- if( bSetTabColFromDoc || (!bSect && rSh.GetTableFmt()))
+ if( bSetTabColFromDoc || (!bSect && rSh.GetTableFmt()) )
{
OSL_ENSURE(aColItem.Count(), "ColDesc is empty!!");
- const BOOL bSingleLine = ((const SfxBoolItem&)rReq.
+ const sal_Bool bSingleLine = ((const SfxBoolItem&)rReq.
GetArgs()->Get(SID_RULER_ACT_LINE_ONLY)).GetValue();
SwTabCols aTabCols;
@@ -687,14 +696,14 @@ void SwView::ExecTabWin( SfxRequest& rReq )
// Tabcols der Reihe nach
// Die letzte Col wird durch den Rand definiert
//columns in right-to-left tables need to be mirrored
- BOOL bIsTableRTL =
+ sal_Bool bIsTableRTL =
IsTabColFromDoc() ?
rSh.IsMouseTableRightToLeft(aTabColFromDocPos)
: rSh.IsTableRightToLeft();
if(bIsTableRTL)
{
- USHORT nColCount = aColItem.Count() - 1;
- for ( USHORT i = 0; i < nColCount && i < aTabCols.Count(); ++i )
+ sal_uInt16 nColCount = aColItem.Count() - 1;
+ for ( sal_uInt16 i = 0; i < nColCount && i < aTabCols.Count(); ++i )
{
const SvxColumnDescription& rCol = aColItem[nColCount - i];
aTabCols[i] = aTabCols.GetRight() - rCol.nStart;
@@ -703,7 +712,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
}
else
{
- for ( USHORT i = 0; i < aColItem.Count()-1 && i < aTabCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aColItem.Count()-1 && i < aTabCols.Count(); ++i )
{
const SvxColumnDescription& rCol = aColItem[i];
aTabCols[i] = rCol.nEnd + aTabCols.GetLeft();
@@ -715,8 +724,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
{
if( !rSh.IsViewLocked() )
{
- bUnlockView = TRUE;
- rSh.LockView( TRUE );
+ bUnlockView = sal_True;
+ rSh.LockView( sal_True );
}
rSh.SetMouseTabCols( aTabCols, bSingleLine,
aTabColFromDocPos );
@@ -744,10 +753,10 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwFmtCol aCols(
bSect ?
pSectFmt->GetCol() :
- (const SwFmtCol&)aSet.Get( RES_COL, FALSE ));
+ (const SwFmtCol&)aSet.Get( RES_COL, sal_False ));
SwRect aCurRect = rSh.GetAnyCurRect(bSect ? RECT_SECTION_PRT : RECT_FLY_PRT_EMBEDDED);
const long lWidth = bVerticalWriting ? aCurRect.Height() : aCurRect.Width();
- ::lcl_ConvertToCols( aColItem, USHORT(lWidth), aCols );
+ ::lcl_ConvertToCols( aColItem, sal_uInt16(lWidth), aCols );
aSet.Put( aCols );
if(bSect)
rSh.SetSectionAttr( aSet, pSectFmt );
@@ -771,7 +780,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
SwFmtCol aCols( rDesc.GetMaster().GetCol() );
const SwRect aPrtRect = rSh.GetAnyCurRect(RECT_PAGE_PRT);
::lcl_ConvertToCols( aColItem,
- USHORT(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width()),
+ sal_uInt16(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width()),
aCols );
SwPageDesc aDesc( rDesc );
aDesc.GetMaster().SetFmtAttr( aCols );
@@ -810,7 +819,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if(bVerticalWriting)
{
- for ( USHORT i = aColItem.Count() - 1; i; --i )
+ for ( sal_uInt16 i = aColItem.Count() - 1; i; --i )
{
const SvxColumnDescription& rCol = aColItem[i - 1];
long nColumnPos = aTabCols.GetRight() - rCol.nEnd ;
@@ -820,23 +829,23 @@ void SwView::ExecTabWin( SfxRequest& rReq )
}
else
{
- for ( USHORT i = 0; i < aColItem.Count()-1; ++i )
+ for ( sal_uInt16 i = 0; i < aColItem.Count()-1; ++i )
{
const SvxColumnDescription& rCol = aColItem[i];
aTabCols[i] = rCol.nEnd + aTabCols.GetLeft();
aTabCols.SetHidden( i, !rCol.bVisible );
}
}
- BOOL bSingleLine = FALSE;
+ sal_Bool bSingleLine = sal_False;
const SfxPoolItem* pSingleLine;
- if( SFX_ITEM_SET == rReq.GetArgs()->GetItemState(SID_RULER_ACT_LINE_ONLY, FALSE, &pSingleLine))
+ if( SFX_ITEM_SET == rReq.GetArgs()->GetItemState(SID_RULER_ACT_LINE_ONLY, sal_False, &pSingleLine))
bSingleLine = ((const SfxBoolItem*)pSingleLine)->GetValue();
if ( bSetTabRowFromDoc )
{
if( !rSh.IsViewLocked() )
{
- bUnlockView = TRUE;
- rSh.LockView( TRUE );
+ bUnlockView = sal_True;
+ rSh.LockView( sal_True );
}
rSh.SetMouseTabRows( aTabCols, bSingleLine, aTabColFromDocPos );
}
@@ -852,9 +861,9 @@ void SwView::ExecTabWin( SfxRequest& rReq )
rSh.EndAllAction();
if( bUnlockView )
- rSh.LockView( FALSE );
+ rSh.LockView( sal_False );
- bSetTabColFromDoc = bSetTabRowFromDoc = bTabColFromDoc = bTabRowFromDoc = FALSE;
+ bSetTabColFromDoc = bSetTabRowFromDoc = bTabColFromDoc = bTabRowFromDoc = sal_False;
SetNumRuleNodeFromDoc(NULL);
}
@@ -868,13 +877,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SwWrtShell &rSh = GetWrtShell();
const Point* pPt = IsTabColFromDoc() || IsTabRowFromDoc() ? &aTabColFromDocPos : 0;
- const USHORT nFrmType = rSh.IsObjSelected()
+ const sal_uInt16 nFrmType = rSh.IsObjSelected()
? FRMTYPE_DRAWOBJ
- : rSh.GetFrmType( pPt, TRUE );
+ : rSh.GetFrmType( pPt, sal_True );
- const BOOL bFrmSelection = rSh.IsFrmSelected();
+ const sal_Bool bFrmSelection = rSh.IsFrmSelected();
- const BOOL bBrowse = rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
+ const sal_Bool bBrowse = rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
// PageOffset/Begrenzer
const SwRect& rPageRect = rSh.GetAnyCurRect( RECT_PAGE, pPt );
const SwRect& rPagePrtRect = rSh.GetAnyCurRect( RECT_PAGE_PRT, pPt );
@@ -886,7 +895,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
rSh.GetMousePageDesc(aTabColFromDocPos) : rSh.GetCurPageDesc() );
const SvxFrameDirectionItem& rFrameDir = rDesc.GetMaster().GetFrmDir();
- const BOOL bVerticalWriting = rSh.IsInVerticalText();
+ const sal_Bool bVerticalWriting = rSh.IsInVerticalText();
//enable tab stop display on the rulers depending on the writing direction
WinBits nRulerStyle = pHRuler->GetStyle() & ~WB_EXTRAFIELD;
@@ -909,7 +918,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SelectionType nSelType = rSh.GetSelectionType();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
sal_Bool bPutContentProtection = sal_False;
while ( nWhich )
@@ -989,15 +998,15 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
// Dokumentkoordinaten Frame auf Seitenkoordinaten umbrechen
const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt);
- aLongUL.SetUpper((USHORT)(rRect.Top() - rPageRect.Top() ));
- aLongUL.SetLower((USHORT)(rPageRect.Bottom() - rRect.Bottom() ));
+ aLongUL.SetUpper((sal_uInt16)(rRect.Top() - rPageRect.Top() ));
+ aLongUL.SetLower((sal_uInt16)(rPageRect.Bottom() - rRect.Bottom() ));
}
else if ( nFrmType & FRMTYPE_HEADER || nFrmType & FRMTYPE_FOOTER )
{
SwRect aRect( rSh.GetAnyCurRect( RECT_HEADERFOOTER, pPt));
aRect.Pos() -= rSh.GetAnyCurRect( RECT_PAGE, pPt ).Pos();
- aLongUL.SetUpper( (USHORT)aRect.Top() );
- aLongUL.SetLower( (USHORT)(nPageHeight - aRect.Bottom()) );
+ aLongUL.SetUpper( (sal_uInt16)aRect.Top() );
+ aLongUL.SetLower( (sal_uInt16)(nPageHeight - aRect.Bottom()) );
}
else if( nFrmType & FRMTYPE_DRAWOBJ)
{
@@ -1014,8 +1023,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
rSet.Put( aLongUL );
else
{
- SvxULSpaceItem aULTmp((USHORT)aLongUL.GetUpper(),
- (USHORT)aLongUL.GetLower(),
+ SvxULSpaceItem aULTmp((sal_uInt16)aLongUL.GetUpper(),
+ (sal_uInt16)aLongUL.GetLower(),
nWhich);
rSet.Put(aULTmp);
}
@@ -1078,7 +1087,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
short nOffset = static_cast< short >(aLR.GetTxtLeft() +
// #i42922# Mouse move of numbering label
// has to consider the left indent of the paragraph
- pNumRuleNodeFromDoc->GetLeftMarginWithNum( TRUE ) );
+ pNumRuleNodeFromDoc->GetLeftMarginWithNum( sal_True ) );
// <--
short nFLOffset;
@@ -1121,8 +1130,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
aCoreSet.Put( aBoxInfo );
rSh.GetFlyFrmAttr( aCoreSet );
const SvxBoxItem& rBox = (const SvxBoxItem&)aCoreSet.Get(RES_BOX);
- aDistLR.SetLeft((USHORT)rBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight((USHORT)rBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft((sal_uInt16)rBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight((sal_uInt16)rBox.GetDistance(BOX_LINE_RIGHT));
//add the paragraph border distance
SfxItemSet aCoreSet1( GetPool(),
@@ -1130,12 +1139,12 @@ void SwView::StateTabWin(SfxItemSet& rSet)
0 );
rSh.GetCurAttr( aCoreSet1 );
const SvxBoxItem& rParaBox = (const SvxBoxItem&)aCoreSet1.Get(RES_BOX);
- aDistLR.SetLeft(aDistLR.GetLeft() + (USHORT)rParaBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight(aDistLR.GetRight() + (USHORT)rParaBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft(aDistLR.GetLeft() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight(aDistLR.GetRight() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_RIGHT));
}
rSet.Put(aDistLR);
- nLeftBorderDistance = static_cast< USHORT >(aDistLR.GetLeft());
- nRightBorderDistance = static_cast< USHORT >(aDistLR.GetRight());
+ nLeftBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetLeft());
+ nRightBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetRight());
}
else if ( IsTabColFromDoc() ||
( rSh.GetTableFmt() && !bFrmSelection &&
@@ -1145,13 +1154,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
RES_BOX, RES_BOX,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0 );
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
- aBoxInfo.SetTable(FALSE);
- aBoxInfo.SetDist((BOOL) TRUE);
+ aBoxInfo.SetTable(sal_False);
+ aBoxInfo.SetDist((sal_Bool) sal_True);
aCoreSet2.Put(aBoxInfo);
rSh.GetTabBorders( aCoreSet2 );
const SvxBoxItem& rBox = (const SvxBoxItem&)aCoreSet2.Get(RES_BOX);
- aDistLR.SetLeft((USHORT)rBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight((USHORT)rBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft((sal_uInt16)rBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight((sal_uInt16)rBox.GetDistance(BOX_LINE_RIGHT));
//add the border distance of the paragraph
SfxItemSet aCoreSet1( GetPool(),
@@ -1159,19 +1168,19 @@ void SwView::StateTabWin(SfxItemSet& rSet)
0 );
rSh.GetCurAttr( aCoreSet1 );
const SvxBoxItem& rParaBox = (const SvxBoxItem&)aCoreSet1.Get(RES_BOX);
- aDistLR.SetLeft(aDistLR.GetLeft() + (USHORT)rParaBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight(aDistLR.GetRight() + (USHORT)rParaBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft(aDistLR.GetLeft() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight(aDistLR.GetRight() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_RIGHT));
rSet.Put(aDistLR);
- nLeftBorderDistance = static_cast< USHORT >(aDistLR.GetLeft());
- nRightBorderDistance = static_cast< USHORT >(aDistLR.GetRight());
+ nLeftBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetLeft());
+ nRightBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetRight());
}
else if ( !rSh.IsDirectlyInSection() )
{
//get the page/header/footer border distance
const SwFrmFmt& rMaster = rDesc.GetMaster();
const SvxBoxItem& rBox = (const SvxBoxItem&)rMaster.GetAttrSet().Get(RES_BOX);
- aDistLR.SetLeft((USHORT)rBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight((USHORT)rBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft((sal_uInt16)rBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight((sal_uInt16)rBox.GetDistance(BOX_LINE_RIGHT));
const SvxBoxItem* pBox = 0;
if(nFrmType & FRMTYPE_HEADER)
@@ -1191,8 +1200,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
if(pBox)
{
- aDistLR.SetLeft((USHORT)pBox->GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight((USHORT)pBox->GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft((sal_uInt16)pBox->GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight((sal_uInt16)pBox->GetDistance(BOX_LINE_RIGHT));
}
//add the border distance of the paragraph
@@ -1201,11 +1210,11 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0 );
rSh.GetCurAttr( aCoreSetTmp );
const SvxBoxItem& rParaBox = (const SvxBoxItem&)aCoreSetTmp.Get(RES_BOX);
- aDistLR.SetLeft(aDistLR.GetLeft() + (USHORT)rParaBox.GetDistance(BOX_LINE_LEFT ));
- aDistLR.SetRight(aDistLR.GetRight() + (USHORT)rParaBox.GetDistance(BOX_LINE_RIGHT));
+ aDistLR.SetLeft(aDistLR.GetLeft() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_LEFT ));
+ aDistLR.SetRight(aDistLR.GetRight() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_RIGHT));
rSet.Put(aDistLR);
- nLeftBorderDistance = static_cast< USHORT >(aDistLR.GetLeft());
- nRightBorderDistance = static_cast< USHORT >(aDistLR.GetRight());
+ nLeftBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetLeft());
+ nRightBorderDistance = static_cast< sal_uInt16 >(aDistLR.GetRight());
}
}
}
@@ -1219,7 +1228,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
rSet.DisableItem(nWhich);
else
{
- BOOL bFlag = rSh.IsInRightToLeftText();
+ sal_Bool bFlag = rSh.IsInRightToLeftText();
rSet.Put(SfxBoolItem(nWhich, bFlag));
}
}
@@ -1227,13 +1236,18 @@ void SwView::StateTabWin(SfxItemSet& rSet)
case SID_RULER_BORDERS_VERTICAL:
case SID_RULER_BORDERS:
{
- BOOL bFrameRTL;
- BOOL bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL) && bFrmSelection;
- BOOL bHasTable = ( IsTabColFromDoc() ||
+ sal_Bool bFrameHasVerticalColumns(sal_False);
+ {
+ sal_Bool bFrameRTL;
+ sal_Bool bFrameVertL2R;
+ bFrameHasVerticalColumns = rSh.IsFrmVertical(sal_False, bFrameRTL, bFrameVertL2R) &&
+ bFrmSelection;
+ }
+ sal_Bool bHasTable = ( IsTabColFromDoc() ||
( rSh.GetTableFmt() && !bFrmSelection &&
!(nFrmType & FRMTYPE_COLSECT ) ) );
- BOOL bTableVertical = bHasTable && rSh.IsTableVertical();
+ sal_Bool bTableVertical = bHasTable && rSh.IsTableVertical();
if(((SID_RULER_BORDERS_VERTICAL == nWhich) &&
((bHasTable && !bTableVertical) ||
@@ -1246,7 +1260,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
else if ( bHasTable )
{
SwTabCols aTabCols;
- USHORT nNum;
+ sal_uInt16 nNum;
if ( 0 != ( bSetTabColFromDoc = IsTabColFromDoc() ) )
{
rSh.GetMouseTabCols( aTabCols, aTabColFromDocPos );
@@ -1262,47 +1276,47 @@ void SwView::StateTabWin(SfxItemSet& rSet)
OSL_ENSURE(nNum <= aTabCols.Count(), "TabCol not found");
const int nLft = aTabCols.GetLeftMin() + aTabCols.GetLeft();
- const int nRgt = (USHORT)(bTableVertical ? nPageHeight : nPageWidth) -
+ const int nRgt = (sal_uInt16)(bTableVertical ? nPageHeight : nPageWidth) -
(aTabCols.GetLeftMin() +
aTabCols.GetRight());
- const USHORT nL = static_cast< USHORT >(nLft > 0 ? nLft : 0);
- const USHORT nR = static_cast< USHORT >(nRgt > 0 ? nRgt : 0);
+ const sal_uInt16 nL = static_cast< sal_uInt16 >(nLft > 0 ? nLft : 0);
+ const sal_uInt16 nR = static_cast< sal_uInt16 >(nRgt > 0 ? nRgt : 0);
SvxColumnItem aColItem(nNum, nL, nR);
- USHORT nStart = 0,
+ sal_uInt16 nStart = 0,
nEnd;
//columns in right-to-left tables need to be mirrored
- BOOL bIsTableRTL =
+ sal_Bool bIsTableRTL =
IsTabColFromDoc() ?
rSh.IsMouseTableRightToLeft(aTabColFromDocPos)
: rSh.IsTableRightToLeft();
if(bIsTableRTL)
{
- for ( USHORT i = aTabCols.Count(); i ; --i )
+ for ( sal_uInt16 i = aTabCols.Count(); i ; --i )
{
const SwTabColsEntry& rEntry = aTabCols.GetEntry( i - 1 );
- nEnd = (USHORT)aTabCols.GetRight();
- nEnd = nEnd - (USHORT)rEntry.nPos;
+ nEnd = (sal_uInt16)aTabCols.GetRight();
+ nEnd = nEnd - (sal_uInt16)rEntry.nPos;
SvxColumnDescription aColDesc( nStart, nEnd,
- (USHORT(aTabCols.GetRight() - rEntry.nMax)),
- (USHORT(aTabCols.GetRight() - rEntry.nMin)),
+ (sal_uInt16(aTabCols.GetRight() - rEntry.nMax)),
+ (sal_uInt16(aTabCols.GetRight() - rEntry.nMin)),
!aTabCols.IsHidden(i - 1) );
aColItem.Append(aColDesc);
nStart = nEnd;
}
SvxColumnDescription aColDesc(nStart,
- aTabCols.GetRight() - aTabCols.GetLeft(), TRUE);
+ aTabCols.GetRight() - aTabCols.GetLeft(), sal_True);
aColItem.Append(aColDesc);
}
else
{
- for ( USHORT i = 0; i < aTabCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aTabCols.Count(); ++i )
{
const SwTabColsEntry& rEntry = aTabCols.GetEntry( i );
- nEnd = static_cast< USHORT >(rEntry.nPos - aTabCols.GetLeft());
+ nEnd = static_cast< sal_uInt16 >(rEntry.nPos - aTabCols.GetLeft());
SvxColumnDescription aColDesc( nStart, nEnd,
rEntry.nMin - aTabCols.GetLeft(), rEntry.nMax - aTabCols.GetLeft(),
!aTabCols.IsHidden(i) );
@@ -1311,7 +1325,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
SvxColumnDescription aColDesc(nStart, aTabCols.GetRight() - aTabCols.GetLeft(),
0, 0,
- TRUE);
+ sal_True);
aColItem.Append(aColDesc);
}
rSet.Put(aColItem, nWhich);
@@ -1319,7 +1333,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
else if ( bFrmSelection || nFrmType & ( FRMTYPE_COLUMN | FRMTYPE_COLSECT ) )
{
// Aus Rahmen oder Seite ?
- USHORT nNum = 0;
+ sal_uInt16 nNum = 0;
if(bFrmSelection)
{
const SwFrmFmt* pFmt = rSh.GetFlyFrmFmt();
@@ -1334,7 +1348,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
!bFrmSelection &&
nFrmType & FRMTYPE_COLSECT )
{
- const SwSection *pSect = rSh.GetAnySection(FALSE, pPt);
+ const SwSection *pSect = rSh.GetAnySection(sal_False, pPt);
OSL_ENSURE( pSect, "Which section?");
if( pSect )
{
@@ -1348,14 +1362,14 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SwRect aRect = rSh.GetAnyCurRect(RECT_SECTION_PRT, pPt);
const SwRect aTmpRect = rSh.GetAnyCurRect(RECT_SECTION, pPt);
- ::lcl_FillSvxColumn(rCol, USHORT(bVerticalWriting ? aRect.Height() : aRect.Width()), aColItem, 0);
+ ::lcl_FillSvxColumn(rCol, sal_uInt16(bVerticalWriting ? aRect.Height() : aRect.Width()), aColItem, 0);
if(bVerticalWriting)
{
aRect.Pos() += Point(aTmpRect.Left(), aTmpRect.Top());
aRect.Pos().Y() -= rPageRect.Top();
- aColItem.SetLeft ((USHORT)(aRect.Top()));
- aColItem.SetRight((USHORT)(nPageHeight - aRect.Bottom() ));
+ aColItem.SetLeft ((sal_uInt16)(aRect.Top()));
+ aColItem.SetRight((sal_uInt16)(nPageHeight - aRect.Bottom() ));
}
else
{
@@ -1363,8 +1377,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
// PAGES01
// make relative to page position:
- aColItem.SetLeft ((USHORT)( aRect.Left() - rPageRect.Left() ));
- aColItem.SetRight((USHORT)( rPageRect.Right() - aRect.Right()));
+ aColItem.SetLeft ((sal_uInt16)( aRect.Left() - rPageRect.Left() ));
+ aColItem.SetRight((sal_uInt16)( rPageRect.Right() - aRect.Right()));
}
aColItem.SetOrtho(aColItem.CalcOrtho());
@@ -1386,24 +1400,24 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SvxColumnItem aColItem(nNum);
const SwRect &rSizeRect = rSh.GetAnyCurRect(RECT_FLY_PRT_EMBEDDED, pPt);
- BOOL bUseVertical = bFrameHasVerticalColumns || (!bFrmSelection && bVerticalWriting);
+ sal_Bool bUseVertical = bFrameHasVerticalColumns || (!bFrmSelection && bVerticalWriting);
const long lWidth = bUseVertical ? rSizeRect.Height() : rSizeRect.Width();
const SwRect &rRect = rSh.GetAnyCurRect(RECT_FLY_EMBEDDED, pPt);
long nDist2 = ((bUseVertical ? rRect.Height() : rRect.Width()) - lWidth) /2;
- ::lcl_FillSvxColumn(rCol, USHORT(lWidth), aColItem, nDist2);
+ ::lcl_FillSvxColumn(rCol, sal_uInt16(lWidth), aColItem, nDist2);
SfxItemSet aFrameSet(GetPool(), RES_LR_SPACE, RES_LR_SPACE);
rSh.GetFlyFrmAttr( aFrameSet );
if(bUseVertical)
{
- aColItem.SetLeft ((USHORT)(rRect.Top()- rPageRect.Top()));
- aColItem.SetRight((USHORT)(nPageHeight + rPageRect.Top() - rRect.Bottom() ));
+ aColItem.SetLeft ((sal_uInt16)(rRect.Top()- rPageRect.Top()));
+ aColItem.SetRight((sal_uInt16)(nPageHeight + rPageRect.Top() - rRect.Bottom() ));
}
else
{
- aColItem.SetLeft ((USHORT)(rRect.Left() - rPageRect.Left() ));
- aColItem.SetRight((USHORT)(rPageRect.Right() - rRect.Right() ));
+ aColItem.SetLeft ((sal_uInt16)(rRect.Left() - rPageRect.Left() ));
+ aColItem.SetRight((sal_uInt16)(rPageRect.Right() - rRect.Right() ));
}
aColItem.SetOrtho(aColItem.CalcOrtho());
@@ -1427,13 +1441,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
const SvxBoxItem& rBox = (const SvxBoxItem&)rMaster.GetFmtAttr(RES_BOX);
long nDist = rBox.GetDistance();
::lcl_FillSvxColumn(aCol,
- USHORT(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width() ),
+ sal_uInt16(bVerticalWriting ? aPrtRect.Height() : aPrtRect.Width() ),
aColItem, nDist);
if(bBrowse)
{
- aColItem.SetLeft((USHORT)rPagePrtRect.Left());
- aColItem.SetRight(USHORT(nPageWidth - rPagePrtRect.Right()));
+ aColItem.SetLeft((sal_uInt16)rPagePrtRect.Left());
+ aColItem.SetRight(sal_uInt16(nPageWidth - rPagePrtRect.Right()));
}
else
{
@@ -1452,8 +1466,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
case SID_RULER_ROWS :
case SID_RULER_ROWS_VERTICAL:
{
- BOOL bFrameRTL;
- BOOL bFrameHasVerticalColumns = rSh.IsFrmVertical(FALSE, bFrameRTL) && bFrmSelection;
+ sal_Bool bFrameHasVerticalColumns(sal_False);
+ {
+ sal_Bool bFrameRTL;
+ sal_Bool bFrameVertL2R;
+ bFrameHasVerticalColumns = rSh.IsFrmVertical(sal_False, bFrameRTL, bFrameVertL2R) &&
+ bFrmSelection;
+ }
if(((SID_RULER_ROWS == nWhich) &&
((!bVerticalWriting && !bFrmSelection) || (bFrmSelection && !bFrameHasVerticalColumns))) ||
@@ -1466,7 +1485,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
SwTabCols aTabCols;
//no current value necessary
- USHORT nNum = 0;
+ sal_uInt16 nNum = 0;
if ( 0 != ( bSetTabRowFromDoc = IsTabRowFromDoc() ) )
{
rSh.GetMouseTabRows( aTabCols, aTabColFromDocPos );
@@ -1477,24 +1496,24 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
const int nLft = aTabCols.GetLeftMin();
- const int nRgt = (USHORT)(bVerticalWriting ? nPageWidth : nPageHeight) -
+ const int nRgt = (sal_uInt16)(bVerticalWriting ? nPageWidth : nPageHeight) -
(aTabCols.GetLeftMin() +
aTabCols.GetRight());
- const USHORT nL = static_cast< USHORT >(nLft > 0 ? nLft : 0);
- const USHORT nR = static_cast< USHORT >(nRgt > 0 ? nRgt : 0);
+ const sal_uInt16 nL = static_cast< sal_uInt16 >(nLft > 0 ? nLft : 0);
+ const sal_uInt16 nR = static_cast< sal_uInt16 >(nRgt > 0 ? nRgt : 0);
SvxColumnItem aColItem(nNum, nL, nR);
- USHORT nStart = 0,
+ sal_uInt16 nStart = 0,
nEnd;
- for ( USHORT i = 0; i < aTabCols.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aTabCols.Count(); ++i )
{
const SwTabColsEntry& rEntry = aTabCols.GetEntry( i );
if(bVerticalWriting)
{
- nEnd = USHORT(aTabCols.GetRight() - rEntry.nPos);
+ nEnd = sal_uInt16(aTabCols.GetRight() - rEntry.nPos);
SvxColumnDescription aColDesc( nStart, nEnd,
aTabCols.GetRight() - rEntry.nMax, aTabCols.GetRight() - rEntry.nMin,
!aTabCols.IsHidden(i) );
@@ -1502,18 +1521,18 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
else
{
- nEnd = USHORT(rEntry.nPos - aTabCols.GetLeft());
+ nEnd = sal_uInt16(rEntry.nPos - aTabCols.GetLeft());
SvxColumnDescription aColDesc( nStart, nEnd,
- USHORT(rEntry.nMin - aTabCols.GetLeft()), USHORT(rEntry.nMax - aTabCols.GetLeft()),
+ sal_uInt16(rEntry.nMin - aTabCols.GetLeft()), sal_uInt16(rEntry.nMax - aTabCols.GetLeft()),
!aTabCols.IsHidden(i) );
aColItem.Append(aColDesc);
}
nStart = nEnd;
}
if(bVerticalWriting)
- nEnd = static_cast< USHORT >(aTabCols.GetRight());
+ nEnd = static_cast< sal_uInt16 >(aTabCols.GetRight());
else
- nEnd = static_cast< USHORT >(aTabCols.GetLeft());
+ nEnd = static_cast< sal_uInt16 >(aTabCols.GetLeft());
// put a position protection when the last row cannot be moved
// due to a page break inside of a row
if(!aTabCols.IsLastRowAllowedToChange())
@@ -1521,7 +1540,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SvxColumnDescription aColDesc( nStart, nEnd,
aTabCols.GetRight(), aTabCols.GetRight(),
- FALSE );
+ sal_False );
aColItem.Append(aColDesc);
rSet.Put(aColItem, nWhich);
@@ -1547,15 +1566,15 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
if( nFrmType & FRMTYPE_TABLE )
{
- const USHORT nNum = rSh.GetCurTabColNum();
+ const sal_uInt16 nNum = rSh.GetCurTabColNum();
SwTabCols aTabCols;
rSh.GetTabCols( aTabCols );
const int nLft = aTabCols.GetLeftMin() + aTabCols.GetLeft();
- const int nRgt = (USHORT)nPageWidth -(aTabCols.GetLeftMin() + aTabCols.GetRight());
+ const int nRgt = (sal_uInt16)nPageWidth -(aTabCols.GetLeftMin() + aTabCols.GetRight());
- const USHORT nL = static_cast< USHORT >(nLft > 0 ? nLft : 0);
- const USHORT nR = static_cast< USHORT >(nRgt > 0 ? nRgt : 0);
+ const sal_uInt16 nL = static_cast< sal_uInt16 >(nLft > 0 ? nLft : 0);
+ const sal_uInt16 nR = static_cast< sal_uInt16 >(nRgt > 0 ? nRgt : 0);
aRectangle.Left() = nL;
if(nNum > 1)
@@ -1576,8 +1595,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
const SwFmtCol* pCols = pFmt ? &pFmt->GetCol():
&rDesc.GetMaster().GetCol();
const SwColumns& rCols = pCols->GetColumns();
- USHORT nNum = rSh.GetCurOutColNum();
- USHORT nCount = Min(USHORT(nNum + 1), rCols.Count());
+ sal_uInt16 nNum = rSh.GetCurOutColNum();
+ sal_uInt16 nCount = Min(sal_uInt16(nNum + 1), rCols.Count());
const SwRect aRect( rSh.GetAnyCurRect( pFmt
? RECT_FLY_PRT_EMBEDDED
: RECT_PAGE_PRT, pPt ));
@@ -1586,14 +1605,14 @@ void SwView::StateTabWin(SfxItemSet& rSet)
: RECT_PAGE, pPt ));
//die Breite im Rahmen bzw. innerhalbe der Seitenraender
- const USHORT nTotalWidth = (USHORT)aRect.Width();
+ const sal_uInt16 nTotalWidth = (sal_uInt16)aRect.Width();
//die gesamte Rahmenbreite - die Differenz ist der doppelte Abstand zum Rand
- const USHORT nOuterWidth = (USHORT)aAbsRect.Width();
+ const sal_uInt16 nOuterWidth = (sal_uInt16)aAbsRect.Width();
int nWidth = 0,
nStart = 0,
nEnd = 0;
aRectangle.Left() = 0;
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
SwColumn* pCol = rCols[i];
nStart = pCol->GetLeft() + nWidth;
@@ -1635,13 +1654,13 @@ void SwView::StateTabWin(SfxItemSet& rSet)
else if ( ((nFrmType & FRMTYPE_TABLE) || IsTabColFromDoc()) &&
!bFrmSelection )
{
- BOOL bColumn;
+ sal_Bool bColumn;
if ( IsTabColFromDoc() )
bColumn = rSh.GetCurMouseColNum( aTabColFromDocPos ) != 0;
else
bColumn = (nFrmType & (FRMTYPE_COLUMN|FRMTYPE_FLY_ANY|
FRMTYPE_COLSECTOUTTAB)) ?
- TRUE : FALSE;
+ sal_True : sal_False;
if ( !bColumn )
{
if( nFrmType & FRMTYPE_FLY_ANY && IsTabColFromDoc() )
@@ -1667,16 +1686,16 @@ void SwView::StateTabWin(SfxItemSet& rSet)
}
else
{ //hier nur fuer Tabelle in mehrspaltigen Seiten und Rahmen
- BOOL bSectOutTbl = (nFrmType & FRMTYPE_TABLE) ? TRUE : FALSE;
- BOOL bFrame = (nFrmType & FRMTYPE_FLY_ANY) ? TRUE : FALSE;
- BOOL bColSct = (nFrmType & ( bSectOutTbl
+ sal_Bool bSectOutTbl = (nFrmType & FRMTYPE_TABLE) ? sal_True : sal_False;
+ sal_Bool bFrame = (nFrmType & FRMTYPE_FLY_ANY) ? sal_True : sal_False;
+ sal_Bool bColSct = (nFrmType & ( bSectOutTbl
? FRMTYPE_COLSECTOUTTAB
: FRMTYPE_COLSECT )
- ) ? TRUE : FALSE;
+ ) ? sal_True : sal_False;
//Damit man auch mit der Mouse ziehen kann,
//ohne in der Tabelle zu stehen
CurRectType eRecType = RECT_PAGE_PRT;
- USHORT nNum = IsTabColFromDoc() ?
+ sal_uInt16 nNum = IsTabColFromDoc() ?
rSh.GetCurMouseColNum( aTabColFromDocPos ):
rSh.GetCurOutColNum();
const SwFrmFmt* pFmt = NULL;
@@ -1697,7 +1716,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
const SwFmtCol* pCols = pFmt ? &pFmt->GetCol():
&rDesc.GetMaster().GetCol();
const SwColumns& rCols = pCols->GetColumns();
- const USHORT nBorder = pFmt ? pFmt->GetBox().GetDistance() :
+ const sal_uInt16 nBorder = pFmt ? pFmt->GetBox().GetDistance() :
rDesc.GetMaster().GetBox().GetDistance();
/* RECT_FLY_PRT_EMBEDDED returns the relative position to
@@ -1709,7 +1728,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
aRect.Pos() += rSh.GetAnyCurRect( RECT_FLY_EMBEDDED,
pPt ).Pos();
- const USHORT nTotalWidth = (USHORT)aRect.Width();
+ const sal_uInt16 nTotalWidth = (sal_uInt16)aRect.Width();
//nStart und nEnd initialisieren fuer nNum == 0
int nWidth = 0,
nStart = 0,
@@ -1721,7 +1740,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
nNum = rCols.Count();
}
- for( USHORT i = 0; i < nNum; ++i )
+ for( sal_uInt16 i = 0; i < nNum; ++i )
{
SwColumn* pCol = rCols[i];
nStart = pCol->GetLeft() + nWidth;
@@ -1767,7 +1786,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
if(bFrmSelection)
{
- BYTE nProtect = pWrtShell->IsSelObjProtected( FLYPROTECT_SIZE|FLYPROTECT_POS|FLYPROTECT_CONTENT );
+ sal_uInt8 nProtect = pWrtShell->IsSelObjProtected( FLYPROTECT_SIZE|FLYPROTECT_POS|FLYPROTECT_CONTENT );
SvxProtectItem aProt(SID_RULER_PROTECT);
aProt.SetCntntProtect((nProtect & FLYPROTECT_CONTENT) != 0);
@@ -1780,8 +1799,8 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SvxProtectItem aProtect(SID_RULER_PROTECT);
if(bBrowse && !(nFrmType & (FRMTYPE_DRAWOBJ|FRMTYPE_COLUMN)) && !rSh.GetTableFmt())
{
- aProtect.SetSizeProtect(TRUE);
- aProtect.SetPosProtect(TRUE);
+ aProtect.SetSizeProtect(sal_True);
+ aProtect.SetPosProtect(sal_True);
}
rSet.Put(aProtect);
}
@@ -1793,7 +1812,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
if(bPutContentProtection)
{
SvxProtectItem aProtect(SID_RULER_PROTECT);
- aProtect.SetCntntProtect(TRUE);
+ aProtect.SetCntntProtect(sal_True);
rSet.Put(aProtect);
}
}
diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx
index d77b81be2aa3..a9d2f0b9b9c0 100644
--- a/sw/source/ui/uno/SwXDocumentSettings.cxx
+++ b/sw/source/ui/uno/SwXDocumentSettings.cxx
@@ -32,7 +32,6 @@
#include <osl/mutex.hxx>
#include <sfx2/sfxbasecontroller.hxx>
#include <SwXDocumentSettings.hxx>
-#include <SwXPrintPreviewSettings.hxx>
#include <comphelper/MasterPropertySetInfo.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/i18n/XForbiddenCharacters.hpp>
@@ -121,6 +120,7 @@ enum SwDocumentSettingsPropertyHandles
HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST,
// <--
HANDLE_MODIFYPASSWORDINFO,
+ HANDLE_MATH_BASELINE_ALIGNMENT,
HANDLE_INVERT_BORDER_SPACING,
HANDLE_COLLAPSE_EMPTY_CELL_PARA
};
@@ -177,6 +177,7 @@ MasterPropertySetInfo * lcl_createSettingsInfo()
// --> OD 2008-06-05 #i89181#
{ RTL_CONSTASCII_STRINGPARAM("TabAtLeftIndentForParagraphsInList"), HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, CPPUTYPE_BOOLEAN, 0, 0},
{ RTL_CONSTASCII_STRINGPARAM("ModifyPasswordInfo"), HANDLE_MODIFYPASSWORDINFO, CPPUTYPE_PROPERTYVALUE, 0, 0},
+ { RTL_CONSTASCII_STRINGPARAM("MathBaselineAlignment"), HANDLE_MATH_BASELINE_ALIGNMENT, CPPUTYPE_BOOLEAN, 0, 0},
{ RTL_CONSTASCII_STRINGPARAM("InvertBorderSpacing"), HANDLE_INVERT_BORDER_SPACING, CPPUTYPE_BOOLEAN, 0, 0},
{ RTL_CONSTASCII_STRINGPARAM("CollapseEmptyCellPara"), HANDLE_COLLAPSE_EMPTY_CELL_PARA, CPPUTYPE_BOOLEAN, 0, 0},
/*
@@ -220,7 +221,6 @@ SwXDocumentSettings::SwXDocumentSettings ( SwXTextDocument * pModel )
, mpPrinter( NULL )
{
registerSlave ( new SwXPrintSettings ( PRINT_SETTINGS_DOCUMENT, mpModel->GetDocShell()->GetDoc() ) );
- registerSlave ( new SwXPrintPreviewSettings ( mpModel->GetDocShell()->GetDoc() ) );
}
SwXDocumentSettings::~SwXDocumentSettings()
@@ -687,12 +687,18 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
uno::Reference< uno::XInterface >() );
}
break;
- case HANDLE_INVERT_BORDER_SPACING:
- {
+ case HANDLE_MATH_BASELINE_ALIGNMENT:
+ {
+ sal_Bool bTmp = *(sal_Bool*)rValue.getValue();
+ mpDoc->set( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT, bTmp );
+ }
+ break;
+ case HANDLE_INVERT_BORDER_SPACING:
+ {
sal_Bool bTmp = *(sal_Bool*)rValue.getValue();
mpDoc->set(IDocumentSettingAccess::INVERT_BORDER_SPACING, bTmp);
- }
- break;
+ }
+ break;
case HANDLE_COLLAPSE_EMPTY_CELL_PARA:
{
sal_Bool bTmp = *(sal_Bool*)rValue.getValue();
@@ -713,11 +719,7 @@ void SwXDocumentSettings::_postSetValues ()
// #i86352# the printer is also used as container for options by sfx
// when setting a printer it should have decent default options
SfxItemSet aOptions( mpPrinter->GetOptions() );
- SwPrintData aPrtData;
- if( mpDoc->getPrintData() )
- aPrtData = *mpDoc->getPrintData();
- else
- aPrtData = *SW_MOD()->GetPrtOptions(false);
+ SwPrintData aPrtData( mpDoc->getPrintData() );
SwAddPrinterItem aAddPrinterItem (FN_PARAM_ADDPRINTER, aPrtData);
aOptions.Put(aAddPrinterItem);
mpPrinter->SetOptions( aOptions );
@@ -758,14 +760,14 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
case HANDLE_FIELD_AUTO_UPDATE:
{
SwFldUpdateFlags nFlags = mpDoc->getFieldUpdateFlags(true);
- BOOL bFieldUpd = (nFlags == AUTOUPD_FIELD_ONLY || nFlags == AUTOUPD_FIELD_AND_CHARTS );
+ sal_Bool bFieldUpd = (nFlags == AUTOUPD_FIELD_ONLY || nFlags == AUTOUPD_FIELD_AND_CHARTS );
rValue.setValue(&bFieldUpd, ::getBooleanCppuType());
}
break;
case HANDLE_CHART_AUTO_UPDATE:
{
SwFldUpdateFlags nFlags = mpDoc->getFieldUpdateFlags(true);
- BOOL bChartUpd = nFlags == AUTOUPD_FIELD_AND_CHARTS;
+ sal_Bool bChartUpd = nFlags == AUTOUPD_FIELD_AND_CHARTS;
rValue.setValue(&bChartUpd, ::getBooleanCppuType());
}
break;
@@ -1030,6 +1032,12 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
rValue <<= mpDocSh->GetModifyPasswordInfo();
}
break;
+ case HANDLE_MATH_BASELINE_ALIGNMENT:
+ {
+ sal_Bool bTmp = mpDoc->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT );
+ rValue.setValue( &bTmp, ::getBooleanCppuType() );
+ }
+ break;
case HANDLE_INVERT_BORDER_SPACING:
{
sal_Bool bTmp = mpDoc->get(IDocumentSettingAccess::INVERT_BORDER_SPACING);
diff --git a/sw/source/ui/uno/SwXPrintPreviewSettings.cxx b/sw/source/ui/uno/SwXPrintPreviewSettings.cxx
deleted file mode 100644
index 35ef4c578447..000000000000
--- a/sw/source/ui/uno/SwXPrintPreviewSettings.cxx
+++ /dev/null
@@ -1,370 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sw.hxx"
-#include <SwXPrintPreviewSettings.hxx>
-#include <comphelper/ChainablePropertySetInfo.hxx>
-#include <pvprtdat.hxx>
-#include <swtypes.hxx>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <doc.hxx>
-#include <vcl/svapp.hxx>
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::lang;
-using namespace ::comphelper;
-using ::rtl::OUString;
-
-enum SwPrintSettingsPropertyHandles
-{
- HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN,
- HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN,
- HANDLE_PRINTSET_PREVIEW_TOP_MARGIN,
- HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN,
- HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING,
- HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING,
- HANDLE_PRINTSET_PREVIEW_NUM_ROWS,
- HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS,
- HANDLE_PRINTSET_PREVIEW_LANDSCAPE
-};
-
-static ChainablePropertySetInfo * lcl_createPrintPreviewSettingsInfo()
-{
- static PropertyInfo aPrintPreviewSettingsMap_Impl[] =
- {
- { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintLeftMargin" ), HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 },
- { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintRightMargin" ), HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 },
- { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintTopMargin" ), HANDLE_PRINTSET_PREVIEW_TOP_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 },
- { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintBottomMargin" ),HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 },
- { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintHorizontalSpacing" ),HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 },
- { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintVerticalSpacing" ), HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING, CPPUTYPE_INT32, PropertyAttribute::MAYBEVOID, 0 },
- { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintNumRows" ), HANDLE_PRINTSET_PREVIEW_NUM_ROWS, CPPUTYPE_INT8, PropertyAttribute::MAYBEVOID, 0 },
- { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintNumColumns" ), HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS, CPPUTYPE_INT8, PropertyAttribute::MAYBEVOID, 0 },
- { RTL_CONSTASCII_STRINGPARAM ( "PreviewPrintLandscape" ), HANDLE_PRINTSET_PREVIEW_LANDSCAPE, CPPUTYPE_BOOLEAN, PropertyAttribute::MAYBEVOID, 0 },
- { 0, 0, 0, CPPUTYPE_UNKNOWN, 0, 0 }
- };
- return new ChainablePropertySetInfo ( aPrintPreviewSettingsMap_Impl );
-}
-
-SwXPrintPreviewSettings::SwXPrintPreviewSettings( SwDoc *pDoc)
-: ChainablePropertySet ( lcl_createPrintPreviewSettingsInfo (), &Application::GetSolarMutex() )
-, mbPreviewDataChanged( sal_False )
-, mpDoc( pDoc)
-{
-}
-
-SwXPrintPreviewSettings::~SwXPrintPreviewSettings()
- throw()
-{
-}
-
-Any SAL_CALL SwXPrintPreviewSettings::queryInterface( const Type& rType )
- throw(RuntimeException)
-{
- return ::cppu::queryInterface ( rType ,
- // OWeakObject interfaces
- dynamic_cast< XInterface* >( dynamic_cast< OWeakObject* >(this) ) ,
- dynamic_cast< XWeak* >( this ) ,
- // my own interfaces
- dynamic_cast< XServiceInfo* >( this ) ,
- dynamic_cast< XPropertySet* >( this ) ,
- dynamic_cast< XMultiPropertySet* >( this ) );
-}
-
-void SwXPrintPreviewSettings::acquire ()
- throw ()
-{
- OWeakObject::acquire();
-}
-
-void SwXPrintPreviewSettings::release ()
- throw ()
-{
- OWeakObject::release();
-}
-
-void SwXPrintPreviewSettings::_preSetValues ()
- throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
-{
- if ( mpDoc )
- {
- const SwPagePreViewPrtData *pConstPrtData = mpDoc->GetPreViewPrtData();
- mpPreViewData = new SwPagePreViewPrtData;
- if ( pConstPrtData )
- {
- mpPreViewData->SetLeftSpace ( pConstPrtData->GetLeftSpace() );
- mpPreViewData->SetRightSpace ( pConstPrtData->GetRightSpace() );
- mpPreViewData->SetTopSpace ( pConstPrtData->GetTopSpace() );
- mpPreViewData->SetBottomSpace ( pConstPrtData->GetBottomSpace() );
- mpPreViewData->SetHorzSpace ( pConstPrtData->GetHorzSpace() );
- mpPreViewData->SetVertSpace ( pConstPrtData->GetVertSpace() );
- mpPreViewData->SetRow ( pConstPrtData->GetRow() );
- mpPreViewData->SetCol ( pConstPrtData->GetCol() );
- mpPreViewData->SetLandscape ( pConstPrtData->GetLandscape() );
- }
- }
-}
-
-void SwXPrintPreviewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, const uno::Any &rValue )
- throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
-{
- switch( rInfo.mnHandle )
- {
- case HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN:
- {
- sal_Int32 nVal = 0;
- rValue >>= nVal;
- nVal = MM100_TO_TWIP( nVal );
- if ( nVal != static_cast < sal_Int32 > (mpPreViewData->GetLeftSpace() ) )
- {
- mbPreviewDataChanged = sal_True;
- mpPreViewData->SetLeftSpace( nVal );
- }
- }
- break;
- case HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN:
- {
- sal_Int32 nVal = 0;
- rValue >>= nVal;
- nVal = MM100_TO_TWIP( nVal );
- if ( nVal != static_cast < sal_Int32 > (mpPreViewData->GetRightSpace() ) )
- {
- mbPreviewDataChanged = sal_True;
- mpPreViewData->SetRightSpace( nVal );
- }
- }
- break;
- case HANDLE_PRINTSET_PREVIEW_TOP_MARGIN:
- {
- sal_Int32 nVal = 0;
- rValue >>= nVal;
- nVal = MM100_TO_TWIP( nVal );
- if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetTopSpace() ) )
- {
- mbPreviewDataChanged = sal_True;
- mpPreViewData->SetTopSpace( nVal );
- }
- }
- break;
- case HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN:
- {
- sal_Int32 nVal = 0;
- rValue >>= nVal;
- nVal = MM100_TO_TWIP( nVal );
- if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetBottomSpace() ) )
- {
- mbPreviewDataChanged = sal_True;
- mpPreViewData->SetBottomSpace( nVal );
- }
- }
- break;
- case HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING:
- {
- sal_Int32 nVal = 0;
- rValue >>= nVal;
- nVal = MM100_TO_TWIP( nVal );
- if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetHorzSpace() ) )
- {
- mbPreviewDataChanged = sal_True;
- mpPreViewData->SetHorzSpace( nVal );
- }
- }
- break;
- case HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING:
- {
- sal_Int32 nVal = 0;
- rValue >>= nVal;
- nVal = MM100_TO_TWIP( nVal );
- if ( nVal != static_cast < sal_Int32 > ( mpPreViewData->GetVertSpace() ) )
- {
- mbPreviewDataChanged = sal_True;
- mpPreViewData->SetVertSpace( nVal );
- }
- }
- break;
- case HANDLE_PRINTSET_PREVIEW_NUM_ROWS:
- {
- sal_Int8 nVal = 0;
- rValue >>= nVal;
- if ( nVal != mpPreViewData->GetRow() )
- {
- mbPreviewDataChanged = sal_True;
- mpPreViewData->SetRow( nVal );
- }
- }
- break;
- case HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS:
- {
- sal_Int8 nVal = 0;
- rValue >>= nVal;
- if ( nVal != mpPreViewData->GetCol() )
- {
- mbPreviewDataChanged = sal_True;
- mpPreViewData->SetCol( nVal );
- }
- }
- break;
- case HANDLE_PRINTSET_PREVIEW_LANDSCAPE:
- {
- sal_Bool bVal = *(sal_Bool*)rValue.getValue();
- if ( bVal != mpPreViewData->GetLandscape() )
- {
- mbPreviewDataChanged = sal_True;
- mpPreViewData->SetLandscape ( bVal );
- }
- }
- break;
- default:
- throw UnknownPropertyException();
- }
-}
-
-void SwXPrintPreviewSettings::_postSetValues ()
- throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
-{
- if ( mbPreviewDataChanged )
- {
- mpDoc->SetPreViewPrtData ( mpPreViewData );
- mbPreviewDataChanged = sal_False;
- }
- delete mpPreViewData;
- mpPreViewData = NULL;
-}
-
-void SwXPrintPreviewSettings::_preGetValues ()
- throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
-{
- if (mpDoc)
- mpConstPreViewData = mpDoc->GetPreViewPrtData();
-}
-
-void SwXPrintPreviewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, uno::Any & rValue )
- throw(UnknownPropertyException, WrappedTargetException )
-{
- sal_Bool bBool = TRUE;
- sal_Bool bBoolVal;
- switch( rInfo.mnHandle )
- {
- case HANDLE_PRINTSET_PREVIEW_LEFT_MARGIN:
- {
- bBool = FALSE;
- if ( mpConstPreViewData )
- rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetLeftSpace() ) );
- }
- break;
- case HANDLE_PRINTSET_PREVIEW_RIGHT_MARGIN:
- {
- bBool = FALSE;
- if ( mpConstPreViewData )
- rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetRightSpace() ) );
- }
- break;
- case HANDLE_PRINTSET_PREVIEW_TOP_MARGIN:
- {
- bBool = FALSE;
- if ( mpConstPreViewData )
- rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetTopSpace() ) );
- }
- break;
- case HANDLE_PRINTSET_PREVIEW_BOTTOM_MARGIN:
- {
- bBool = FALSE;
- if ( mpConstPreViewData )
- rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetBottomSpace() ) );
- }
- break;
- case HANDLE_PRINTSET_PREVIEW_HORIZONTAL_SPACING:
- {
- bBool = FALSE;
- if ( mpConstPreViewData )
- rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetHorzSpace() ) );
- }
- break;
- case HANDLE_PRINTSET_PREVIEW_VERTICAL_SPACING:
- {
- bBool = FALSE;
- if ( mpConstPreViewData )
- rValue <<= static_cast < sal_Int32 > ( TWIP_TO_MM100_UNSIGNED( mpConstPreViewData->GetVertSpace() ) );
- }
- break;
- case HANDLE_PRINTSET_PREVIEW_NUM_ROWS:
- {
- bBool = FALSE;
- if ( mpConstPreViewData )
- rValue <<= static_cast < sal_Int8 > ( mpConstPreViewData->GetRow() );
- }
- break;
- case HANDLE_PRINTSET_PREVIEW_NUM_COLUMNS:
- {
- bBool = FALSE;
- if ( mpConstPreViewData )
- rValue <<= static_cast < sal_Int8 > ( mpConstPreViewData->GetCol() );
- }
- break;
- case HANDLE_PRINTSET_PREVIEW_LANDSCAPE:
- {
- if (mpConstPreViewData)
- bBoolVal = mpConstPreViewData->GetLandscape();
- else
- bBool = FALSE;
- }
- break;
- default:
- throw UnknownPropertyException();
- }
- if(bBool)
- rValue.setValue(&bBoolVal, ::getBooleanCppuType());
-}
-
-void SwXPrintPreviewSettings::_postGetValues ()
- throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
-{
- mpConstPreViewData = NULL;
-}
-
-OUString SwXPrintPreviewSettings::getImplementationName(void) throw( RuntimeException )
-{
- return OUString( RTL_CONSTASCII_USTRINGPARAM ( "SwXPrintPreviewSettings" ) );
-}
-
-sal_Bool SwXPrintPreviewSettings::supportsService(const OUString& rServiceName) throw( RuntimeException )
-{
- return rServiceName.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "com.sun.star.text.PrintPreviewSettings") );
-}
-
-Sequence< OUString > SwXPrintPreviewSettings::getSupportedServiceNames(void) throw( RuntimeException )
-{
- Sequence< OUString > aRet(1);
- OUString* pArray = aRet.getArray();
- pArray[0] = OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.text.PrintPreviewSettings" ) );
- return aRet;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/SwXPrintPreviewSettings.hxx b/sw/source/ui/uno/SwXPrintPreviewSettings.hxx
deleted file mode 100644
index 867f4fb30f0c..000000000000
--- a/sw/source/ui/uno/SwXPrintPreviewSettings.hxx
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef _SW_XPRINTPREVIEWSETTINGS_HXX_
-#define _SW_XPRINTPREVIEWSETTINGS_HXX_
-
-#ifdef PRECOMPILED
-#include "ui_pch.hxx"
-#endif
-#include <comphelper/ChainablePropertySet.hxx>
-#include <com/sun/star/text/XTextDocument.hpp>
-#include <cppuhelper/weak.hxx>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-
-class SwDoc;
-class SwPagePreViewPrtData;
-
-class SwXPrintPreviewSettings :public comphelper::ChainablePropertySet,
- public cppu::OWeakObject,
- public com::sun::star::lang::XServiceInfo
-{
- friend class SwXDocumentSettings;
-protected:
- sal_Bool mbPreviewDataChanged;
- SwDoc* mpDoc;
- SwPagePreViewPrtData *mpPreViewData;
- const SwPagePreViewPrtData *mpConstPreViewData;
-
- virtual void _preSetValues ()
- throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
- virtual void _setSingleValue( const comphelper::PropertyInfo & rInfo, const ::com::sun::star::uno::Any &rValue )
- throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
- virtual void _postSetValues ()
- throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
-
- virtual void _preGetValues ()
- throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
- virtual void _getSingleValue( const comphelper::PropertyInfo & rInfo, ::com::sun::star::uno::Any & rValue )
- throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException );
- virtual void _postGetValues ()
- throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
- virtual ~SwXPrintPreviewSettings()
- throw();
-public:
- SwXPrintPreviewSettings(SwDoc *pDoc);
-
-
- // XInterface
- virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType )
- throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL acquire( )
- throw ();
- virtual void SAL_CALL release( )
- throw ();
-
- //XServiceInfo
- virtual rtl::OUString SAL_CALL getImplementationName(void)
- throw( ::com::sun::star::uno::RuntimeException );
- virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName)
- throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void)
- throw( ::com::sun::star::uno::RuntimeException );
-};
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/detreg.cxx b/sw/source/ui/uno/detreg.cxx
index 3a0bf4be279a..69cf4888eb74 100644
--- a/sw/source/ui/uno/detreg.cxx
+++ b/sw/source/ui/uno/detreg.cxx
@@ -44,30 +44,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
- void* /*pServiceManager*/,
- void* pRegistryKey )
-{
- Reference< ::registry::XRegistryKey >
- xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ;
-
- OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") );
- OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") );
-
- // Eigentliche Implementierung und ihre Services registrieren
- sal_Int32 i;
- Reference< ::registry::XRegistryKey > xNewKey;
-
- xNewKey = xKey->createKey( aDelimiter + SwFilterDetect::impl_getStaticImplementationName() +
- aUnoServices );
-
- Sequence< OUString > aServices = SwFilterDetect::impl_getStaticSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- return sal_True;
-}
-
SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
const sal_Char* pImplementationName,
void* pServiceManager,
diff --git a/sw/source/ui/uno/makefile.mk b/sw/source/ui/uno/makefile.mk
deleted file mode 100644
index 0023fd52f55c..000000000000
--- a/sw/source/ui/uno/makefile.mk
+++ /dev/null
@@ -1,82 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=unoidl
-ENABLE_EXCEPTIONS=TRUE
-LIBTARGET=no
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(DVO_XFORMS)" != ""
-CDEFS+=-DDVO_XFORMS
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-SLO1FILES = \
- $(SLO)$/unodefaults.obj\
- $(SLO)$/unodispatch.obj\
- $(SLO)$/unotxdoc.obj\
- $(SLO)$/unoatxt.obj \
- $(SLO)$/unomailmerge.obj \
- $(SLO)$/unomod.obj \
- $(SLO)$/unotxvw.obj \
- $(SLO)$/dlelstnr.obj \
- $(SLO)$/unofreg.obj \
- $(SLO)$/SwXDocumentSettings.obj \
- $(SLO)$/SwXPrintPreviewSettings.obj \
- $(SLO)$/SwXFilterOptions.obj\
- $(SLO)$/RefreshListenerContainer.obj \
- $(SLO)$/unomodule.obj \
- $(SLO)$/unodoc.obj
-
-SLO2FILES = \
- $(SLO)$/swdetect.obj \
- $(SLO)$/swdet2.obj \
- $(SLO)$/detreg.obj
-
-SLOFILES = \
- $(SLO1FILES) \
- $(SLO2FILES)
-
-LIB1TARGET = \
- $(SLB)$/$(TARGET).lib
-
-LIB1OBJFILES = \
- $(SLO1FILES)
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/uno/swdet2.cxx b/sw/source/ui/uno/swdet2.cxx
index 6f325faab3df..f38cf9a810e7 100644
--- a/sw/source/ui/uno/swdet2.cxx
+++ b/sw/source/ui/uno/swdet2.cxx
@@ -58,16 +58,16 @@ bool IsDocShellRegistered()
//-------------------------------------------------------------------------
-ULONG SwFilterDetect::DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter )
+sal_uLong SwFilterDetect::DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter )
{
- ULONG nRet = ERRCODE_NONE;
+ sal_uLong nRet = ERRCODE_NONE;
if( *ppFilter )
{
// verify the given filter
String aPrefFlt = (*ppFilter)->GetUserData();
// detection for TextFilter needs an additional checking
- BOOL bDetected = SwIoSystem::IsFileFilter( rMedium, aPrefFlt );
+ sal_Bool bDetected = SwIoSystem::IsFileFilter( rMedium, aPrefFlt );
return bDetected ? nRet : ERRCODE_ABORT;
}
diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx
index 51607e771909..aea3ff13f29c 100644
--- a/sw/source/ui/uno/swdetect.cxx
+++ b/sw/source/ui/uno/swdetect.cxx
@@ -170,7 +170,7 @@ SwFilterDetect::~SwFilterDetect()
SfxApplication* pApp = SFX_APP();
SfxAllItemSet *pSet = new SfxAllItemSet( pApp->GetPool() );
TransformParameters( SID_OPENDOC, lDescriptor, *pSet );
- SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
+ SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, sal_False );
bWasReadOnly = pItem && pItem->GetValue();
@@ -189,8 +189,8 @@ SwFilterDetect::~SwFilterDetect()
else
{
// ctor of SfxMedium uses owner transition of ItemSet
- SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, FALSE, NULL, pSet );
- aMedium.UseInteractionHandler( TRUE );
+ SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, sal_False, NULL, pSet );
+ aMedium.UseInteractionHandler( sal_True );
if ( aMedium.GetErrorCode() == ERRCODE_NONE )
{
// remember input stream and content and put them into the descriptor later
@@ -199,7 +199,7 @@ SwFilterDetect::~SwFilterDetect()
xContent = aMedium.GetContent();
bReadOnly = aMedium.IsReadOnly();
- BOOL bIsStorage = aMedium.IsStorage();
+ sal_Bool bIsStorage = aMedium.IsStorage();
if ( bIsStorage )
{
uno::Reference< embed::XStorage > xStorage = aMedium.GetStorage( sal_False );
@@ -245,7 +245,7 @@ SwFilterDetect::~SwFilterDetect()
aTypeName = pPreFilter->GetTypeName();
}
- aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pPreFilter ? pPreFilter->IsOwnTemplateFormat() : FALSE, &aFilterName );
+ aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pPreFilter ? pPreFilter->IsOwnTemplateFormat() : sal_False, &aFilterName );
}
catch( lang::WrappedTargetException& aWrap )
{
@@ -267,18 +267,17 @@ SwFilterDetect::~SwFilterDetect()
if ( !bRepairPackage )
{
// ask the user whether he wants to try to repair
- RequestPackageReparation* pRequest = new RequestPackageReparation( aDocumentTitle );
- uno::Reference< task::XInteractionRequest > xRequest ( pRequest );
- xInteraction->handle( xRequest );
- bRepairAllowed = pRequest->isApproved();
+ RequestPackageReparation aRequest( aDocumentTitle );
+ xInteraction->handle( aRequest.GetRequest() );
+ bRepairAllowed = aRequest.isApproved();
}
if ( !bRepairAllowed )
{
// repair either not allowed or not successful
- NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocumentTitle );
- uno::Reference< task::XInteractionRequest > xRequest ( pNotifyRequest );
- xInteraction->handle( xRequest );
+ // repair either not allowed or not successful
+ NotifyBrokenPackage aNotifyRequest( aDocumentTitle );
+ xInteraction->handle( aNotifyRequest.GetRequest() );
rtl::Reference< ::comphelper::OIHWrapNoFilterDialog > xHandler = new ::comphelper::OIHWrapNoFilterDialog( xInteraction );
if ( nIndexOfInteractionHandler != -1 )
@@ -319,9 +318,9 @@ SwFilterDetect::~SwFilterDetect()
else
pFilter = SfxFilterMatcher().GetFilter4EA( aTypeName );
- BOOL bTestWriter = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.TextDocument") ||
+ sal_Bool bTestWriter = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.TextDocument") ||
pFilter->GetServiceName().EqualsAscii("com.sun.star.text.WebDocument");
- BOOL bTestGlobal = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.GlobalDocument");
+ sal_Bool bTestGlobal = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.GlobalDocument");
const SfxFilter* pOrigFilter = NULL;
if ( !bTestWriter && !bTestGlobal && pFilter )
@@ -331,10 +330,10 @@ SwFilterDetect::~SwFilterDetect()
// example: HTML filter for Calc
pOrigFilter = pFilter;
pFilter = SfxFilterMatcher().GetFilter4EA( pFilter->GetTypeName() );
- bTestWriter = TRUE;
+ bTestWriter = sal_True;
}
- ULONG nErr = ERRCODE_NONE;
+ sal_uLong nErr = ERRCODE_NONE;
if ( pFilter || bTestWriter )
nErr = DetectFilter( aMedium, &pFilter );
if ( nErr != ERRCODE_NONE )
diff --git a/sw/source/ui/uno/swdetect.hxx b/sw/source/ui/uno/swdetect.hxx
index c58279ad6192..124a443025cf 100644
--- a/sw/source/ui/uno/swdetect.hxx
+++ b/sw/source/ui/uno/swdetect.hxx
@@ -79,8 +79,8 @@ class SfxFilter;
class SwFilterDetect : public ::cppu::WeakImplHelper2< ::com::sun::star::document::XExtendedFilterDetection, ::com::sun::star::lang::XServiceInfo >
{
- static ULONG DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter );
- static ULONG GlobDetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter );
+ static sal_uLong DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter );
+ static sal_uLong GlobDetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter );
public:
SwFilterDetect( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
virtual ~SwFilterDetect();
diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx
index c3dda5a77701..e5943aab71e7 100644
--- a/sw/source/ui/uno/unoatxt.cxx
+++ b/sw/source/ui/uno/unoatxt.cxx
@@ -116,7 +116,7 @@ uno::Any SwXAutoTextContainer::getByIndex(sal_Int32 nIndex)
uno::Any aRet;
sal_uInt16 nCount = pGlossaries->GetGroupCnt();
if ( 0 <= nIndex && nIndex < nCount )
- aRet = getByName(pGlossaries->GetGroupName( static_cast< USHORT >(nIndex) ));
+ aRet = getByName(pGlossaries->GetGroupName( static_cast< sal_uInt16 >(nIndex) ));
else
throw lang::IndexOutOfBoundsException();
return aRet;
@@ -141,8 +141,8 @@ uno::Any SwXAutoTextContainer::getByName(const OUString& GroupName)
uno::Reference< text::XAutoTextGroup > xGroup;
if ( pGlossaries && hasByName( GroupName ) ) // group name already known?
- // TRUE = create group if not already available
- xGroup = pGlossaries->GetAutoTextGroup( GroupName, TRUE );
+ // sal_True = create group if not already available
+ xGroup = pGlossaries->GetAutoTextGroup( GroupName, sal_True );
if ( !xGroup.is() )
throw container::NoSuchElementException();
@@ -839,7 +839,7 @@ void SwXAutoTextEntry::GetBodyText ()
{
SolarMutexGuard aGuard;
- xDocSh = pGlossaries->EditGroupDoc ( sGroupName, sEntryName, FALSE );
+ xDocSh = pGlossaries->EditGroupDoc ( sGroupName, sEntryName, sal_False );
OSL_ENSURE( xDocSh.Is(), "SwXAutoTextEntry::GetBodyText: unexpected: no doc returned by EditGroupDoc!" );
// start listening at the document
@@ -1057,7 +1057,7 @@ OUString SwAutoTextEventDescriptor::getImplementationName()
}
void SwAutoTextEventDescriptor::replaceByName(
- const USHORT nEvent,
+ const sal_uInt16 nEvent,
const SvxMacro& rMacro)
throw(
lang::IllegalArgumentException,
@@ -1079,7 +1079,7 @@ void SwAutoTextEventDescriptor::replaceByName(
if( pBlocks && !pBlocks->GetError())
{
- USHORT nIndex = pBlocks->GetIndex( rAutoTextEntry.GetEntryName() );
+ sal_uInt16 nIndex = pBlocks->GetIndex( rAutoTextEntry.GetEntryName() );
if( nIndex != USHRT_MAX )
{
SvxMacroTableDtor aMacroTable;
@@ -1098,7 +1098,7 @@ void SwAutoTextEventDescriptor::replaceByName(
void SwAutoTextEventDescriptor::getByName(
SvxMacro& rMacro,
- const USHORT nEvent )
+ const sal_uInt16 nEvent )
throw(
container::NoSuchElementException,
lang::WrappedTargetException,
@@ -1122,7 +1122,7 @@ void SwAutoTextEventDescriptor::getByName(
if ( pBlocks && !pBlocks->GetError())
{
- USHORT nIndex = pBlocks->GetIndex( rAutoTextEntry.GetEntryName() );
+ sal_uInt16 nIndex = pBlocks->GetIndex( rAutoTextEntry.GetEntryName() );
if( nIndex != USHRT_MAX )
{
SvxMacroTableDtor aMacroTable;
diff --git a/sw/source/ui/uno/unofreg.cxx b/sw/source/ui/uno/unofreg.cxx
index ef05b03a8c0d..f63f21e12c6f 100644
--- a/sw/source/ui/uno/unofreg.cxx
+++ b/sw/source/ui/uno/unofreg.cxx
@@ -156,99 +156,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-static void lcl_uno_writeInfo(
- registry::XRegistryKey * pRegistryKey,
- const OUString& rImplementationName,
- const uno::Sequence< OUString >& rServices )
-{
- uno::Reference< registry::XRegistryKey > xNewKey(
- pRegistryKey->createKey(
- OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + rImplementationName + OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ) );
-
- for( sal_Int32 i = 0; i < rServices.getLength(); i++ )
- xNewKey->createKey( rServices.getConstArray()[i]);
-}
-
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
- void * /*pServiceManager*/,
- void * pRegistryKey )
-{
- if( pRegistryKey )
- {
- try
- {
- registry::XRegistryKey *pKey =
- reinterpret_cast< registry::XRegistryKey * >( pRegistryKey );
-
-
- // xml filter
- lcl_uno_writeInfo( pKey, SwXMLImport_getImplementationName(),
- SwXMLImport_getSupportedServiceNames() );
- lcl_uno_writeInfo( pKey, SwXMLImportStyles_getImplementationName(),
- SwXMLImportStyles_getSupportedServiceNames() );
- lcl_uno_writeInfo( pKey,SwXMLImportContent_getImplementationName(),
- SwXMLImportContent_getSupportedServiceNames() );
- lcl_uno_writeInfo( pKey, SwXMLImportMeta_getImplementationName(),
- SwXMLImportMeta_getSupportedServiceNames() );
- lcl_uno_writeInfo( pKey, SwXMLImportSettings_getImplementationName(),
- SwXMLImportSettings_getSupportedServiceNames() );
- lcl_uno_writeInfo( pKey, SwXMLExportOOO_getImplementationName(),
- SwXMLExportOOO_getSupportedServiceNames() );
- lcl_uno_writeInfo( pKey, SwXMLExportStylesOOO_getImplementationName(),
- SwXMLExportStylesOOO_getSupportedServiceNames() );
- lcl_uno_writeInfo( pKey,SwXMLExportContentOOO_getImplementationName(),
- SwXMLExportContentOOO_getSupportedServiceNames() );
- lcl_uno_writeInfo( pKey, SwXMLExportMetaOOO_getImplementationName(),
- SwXMLExportMetaOOO_getSupportedServiceNames() );
- lcl_uno_writeInfo( pKey, SwXMLExportSettingsOOO_getImplementationName(),
- SwXMLExportSettingsOOO_getSupportedServiceNames() );
- lcl_uno_writeInfo( pKey, SwXMLExport_getImplementationName(),
- SwXMLExport_getSupportedServiceNames() );
- lcl_uno_writeInfo( pKey, SwXMLExportStyles_getImplementationName(),
- SwXMLExportStyles_getSupportedServiceNames() );
- lcl_uno_writeInfo( pKey,SwXMLExportContent_getImplementationName(),
- SwXMLExportContent_getSupportedServiceNames() );
- lcl_uno_writeInfo( pKey, SwXMLExportMeta_getImplementationName(),
- SwXMLExportMeta_getSupportedServiceNames() );
- lcl_uno_writeInfo( pKey, SwXMLExportSettings_getImplementationName(),
- SwXMLExportSettings_getSupportedServiceNames() );
- //API objects
- lcl_uno_writeInfo( pKey, SwXAutoTextContainer_getImplementationName(),
- SwXAutoTextContainer_getSupportedServiceNames() );
- lcl_uno_writeInfo( pKey, SwXModule_getImplementationName(),
- SwXModule_getSupportedServiceNames() );
- lcl_uno_writeInfo( pKey, SwXMailMerge_getImplementationName(),
- SwXMailMerge_getSupportedServiceNames() );
- //Filter options
- lcl_uno_writeInfo( pKey, SwXFilterOptions::getImplementationName_Static(),
- SwXFilterOptions::getSupportedServiceNames_Static() );
-
- // documents
- lcl_uno_writeInfo( pKey, SwTextDocument_getImplementationName(),
- SwTextDocument_getSupportedServiceNames() );
- lcl_uno_writeInfo( pKey, SwWebDocument_getImplementationName(),
- SwWebDocument_getSupportedServiceNames() );
- lcl_uno_writeInfo( pKey,SwGlobalDocument_getImplementationName(),
- SwGlobalDocument_getSupportedServiceNames() );
-
- // module
- lcl_uno_writeInfo( pKey, SwUnoModule_getImplementationName(),
- SwUnoModule_getSupportedServiceNames() );
- // --> OD 2007-05-24 #i73788#
- lcl_uno_writeInfo( pKey,
- comp_FinalThreadManager::_getImplementationName(),
- comp_FinalThreadManager::_getSupportedServiceNames() );
- // <--
-
- }
- catch (registry::InvalidRegistryException &)
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
- return sal_True;
-}
-
static ::cppu::ImplementationEntry const entries[] = {
{ &comp_FinalThreadManager::_create,
&comp_FinalThreadManager::_getImplementationName,
@@ -455,14 +362,12 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
SwUnoModule_createInstance,
SwUnoModule_getSupportedServiceNames() );
}
- // --> OD 2007-05-24 #i73788#
else if( comp_FinalThreadManager::_getImplementationName().equalsAsciiL(
pImplName, nImplNameLen ) )
{
pRet = ::cppu::component_getFactoryHelper(
pImplName, pServiceManager, pRegistryKey, entries);
}
- // <--
if( xFactory.is())
{
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index 880a77194c7e..bdc995d47a75 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -150,11 +150,11 @@ static CloseResult CloseModelAndDocSh(
////////////////////////////////////////////////////////////
-static BOOL LoadFromURL_impl(
+static sal_Bool LoadFromURL_impl(
Reference< frame::XModel > &rxModel,
SfxObjectShellRef &rxDocSh,
const String &rURL,
- BOOL bClose )
+ sal_Bool bClose )
throw (RuntimeException)
{
// try to open the document readonly and hidden
@@ -172,7 +172,7 @@ static BOOL LoadFromURL_impl(
}
catch( Exception & )
{
- return FALSE;
+ return sal_False;
}
// try to get the DocShell
@@ -185,7 +185,7 @@ static BOOL LoadFromURL_impl(
pTmpDocShell = pTextDoc ? pTextDoc->GetDocShell() : 0;
}
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if (xTmpModel.is() && pTmpDocShell) // everything available?
{
if (bClose)
@@ -193,10 +193,11 @@ static BOOL LoadFromURL_impl(
// set new stuff
rxModel = xTmpModel;
rxDocSh = pTmpDocShell;
- bRes = TRUE;
+ bRes = sal_True;
}
else
{
+ // SfxObjectShellRef is ok here, since the document will be explicitly closed
SfxObjectShellRef xTmpDocSh = pTmpDocShell;
CloseModelAndDocSh( xTmpModel, xTmpDocSh );
}
@@ -369,15 +370,15 @@ namespace
////////////////////////////////////////////////////////////
-static BOOL DeleteTmpFile_Impl(
+static sal_Bool DeleteTmpFile_Impl(
Reference< frame::XModel > &rxModel,
SfxObjectShellRef &rxDocSh,
const String &rTmpFileURL )
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if (rTmpFileURL.Len())
{
- BOOL bDelete = TRUE;
+ sal_Bool bDelete = sal_True;
if ( eVetoed == CloseModelAndDocSh( rxModel, rxDocSh ) )
{
// somebody vetoed the closing, and took the ownership of the document
@@ -385,7 +386,7 @@ static BOOL DeleteTmpFile_Impl(
Reference< XEventListener > xEnsureDelete( new DelayedFileDeletion( rxModel, rTmpFileURL ) );
// note: as soon as #106931# is fixed, the whole DelayedFileDeletion is to be superseeded by
// a better solution
- bDelete = FALSE;
+ bDelete = sal_False;
}
rxModel = 0;
@@ -400,7 +401,7 @@ static BOOL DeleteTmpFile_Impl(
}
}
else
- bRes = TRUE; // file will be deleted delayed
+ bRes = sal_True; // file will be deleted delayed
}
return bRes;
}
@@ -490,7 +491,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
const OUString &rName = pArguments[i].Name;
const Any &rValue = pArguments[i].Value;
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
if (rName.equalsAscii( GetPropName( UNO_NAME_SELECTION ) ))
bOK = rValue >>= aCurSelection;
else if (rName.equalsAscii( GetPropName( UNO_NAME_RESULT_SET ) ))
@@ -509,7 +510,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
{
bOK = rValue >>= aCurDocumentURL;
if (aCurDocumentURL.getLength()
- && !LoadFromURL_impl( xCurModel, xCurDocSh, aCurDocumentURL, FALSE ))
+ && !LoadFromURL_impl( xCurModel, xCurDocSh, aCurDocumentURL, sal_False ))
throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to create document from URL: " ) ) + aCurDocumentURL, static_cast < cppu::OWeakObject * > ( this ) );
}
else if (rName.equalsAscii( GetPropName( UNO_NAME_OUTPUT_URL ) ))
@@ -620,7 +621,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
aCurSelection = aTranslated;
}
- SfxViewFrame* pFrame = SfxViewFrame::GetFirst( xCurDocSh, FALSE);
+ SfxViewFrame* pFrame = SfxViewFrame::GetFirst( xCurDocSh, sal_False);
SwView *pView = PTR_CAST( SwView, pFrame->GetViewShell() );
if (!pView)
throw RuntimeException();
@@ -686,7 +687,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
// aDescriptor[ svx::daColumnObject ] not used
aDescriptor[ svx::daSelection ] <<= aCurSelection;
- USHORT nMergeType;
+ sal_uInt16 nMergeType;
switch (nCurOutputType)
{
case MailMergeType::PRINTER : nMergeType = DBMGR_MERGE_MAILMERGE; break;
@@ -707,11 +708,8 @@ uno::Any SAL_CALL SwXMailMerge::execute(
uno::Reference< mail::XMailService > xInService;
if (MailMergeType::PRINTER == nCurOutputType)
{
- SwPrintData aPrtData = *SW_MOD()->GetPrtOptions( FALSE );
IDocumentDeviceAccess* pIDDA = rSh.getIDocumentDeviceAccess();
- SwPrintData* pShellPrintData = pIDDA->getPrintData();
- if (pShellPrintData)
- aPrtData = *pShellPrintData;
+ SwPrintData aPrtData( pIDDA->getPrintData() );
aPrtData.SetPrintSingleJobs( bCurSinglePrintJobs );
pIDDA->setPrintData( aPrtData );
// #i25686# printing should not be done asynchronously to prevent dangling offices
@@ -818,13 +816,13 @@ uno::Any SAL_CALL SwXMailMerge::execute(
if ( !bStoredAsTemporary )
throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to save temporary file." ) ), static_cast < cppu::OWeakObject * > ( this ) );
- pMgr->SetMergeSilent( TRUE ); // suppress dialogs, message boxes, etc.
+ pMgr->SetMergeSilent( sal_True ); // suppress dialogs, message boxes, etc.
const SwXMailMerge *pOldSrc = pMgr->GetMailMergeEvtSrc();
OSL_ENSURE( !pOldSrc || pOldSrc == this, "Ooops... different event source already set." );
pMgr->SetMailMergeEvtSrc( this ); // launch events for listeners
SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), xCurDocSh));
- BOOL bSucc = pMgr->MergeNew( aMergeDesc );
+ sal_Bool bSucc = pMgr->MergeNew( aMergeDesc );
SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE_END, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE_END), xCurDocSh));
pMgr->SetMailMergeEvtSrc( pOldSrc );
@@ -960,7 +958,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue(
OUString aText;
bOK = rValue >>= aText;
if (aText.getLength()
- && !LoadFromURL_impl( xModel, xDocSh, aText, TRUE ))
+ && !LoadFromURL_impl( xModel, xDocSh, aText, sal_True ))
throw RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Failed to create document from URL: " ) ) + aText, static_cast < cppu::OWeakObject * > ( this ) );
aDocumentURL = aText;
}
@@ -1033,7 +1031,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue(
if (bChanged)
{
PropertyChangeEvent aChgEvt( (XPropertySet *) this, rPropertyName,
- FALSE, pCur->nWID, aOld, rValue );
+ sal_False, pCur->nWID, aOld, rValue );
launchEvent( aChgEvt );
}
}
diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx
index b527cc2920c3..af6a9ebe0013 100644
--- a/sw/source/ui/uno/unomod.cxx
+++ b/sw/source/ui/uno/unomod.cxx
@@ -53,7 +53,7 @@
#include <comphelper/ChainablePropertySetInfo.hxx>
#include <edtwin.hxx>
#include <rtl/ustrbuf.hxx>
-
+#include <tools/urlobj.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
@@ -275,9 +275,9 @@ sal_Bool SwXModule::supportsService(const OUString& rServiceName) throw( Runtime
for(sal_Int32 nService = 0; nService < aNames.getLength(); nService++)
{
if(aNames.getConstArray()[nService] == rServiceName)
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
Sequence< OUString > SwXModule::getSupportedServiceNames(void) throw( RuntimeException )
@@ -316,13 +316,7 @@ void SwXPrintSettings::_preSetValues ()
{
if (!mpDoc)
throw IllegalArgumentException ();
- if ( !mpDoc->getPrintData() )
- {
- mpPrtOpt = new SwPrintData;
- mpDoc->setPrintData ( *mpPrtOpt );
- delete mpPrtOpt;
- }
- mpPrtOpt = mpDoc->getPrintData();
+ mpPrtOpt = const_cast< SwPrintData * >(&mpDoc->getPrintData());
}
break;
}
@@ -479,13 +473,7 @@ void SwXPrintSettings::_preGetValues ()
{
if (!mpDoc)
throw IllegalArgumentException ();
- if ( !mpDoc->getPrintData() )
- {
- mpPrtOpt = new SwPrintData;
- mpDoc->setPrintData ( *mpPrtOpt );
- delete mpPrtOpt;
- }
- mpPrtOpt = mpDoc->getPrintData();
+ mpPrtOpt = const_cast< SwPrintData * >(&mpDoc->getPrintData());
}
break;
}
@@ -651,10 +639,10 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
case HANDLE_VIEWSET_DRAWINGS : mpViewOption->SetDraw(bVal); break;
case HANDLE_VIEWSET_FIELD_COMMANDS : mpViewOption->SetFldName(bVal); break;
case HANDLE_VIEWSET_ANNOTATIONS : mpViewOption->SetPostIts(bVal); break;
- case HANDLE_VIEWSET_INDEX_MARK_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, TRUE); break;
+ case HANDLE_VIEWSET_INDEX_MARK_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, sal_True); break;
case HANDLE_VIEWSET_NONPRINTING_CHARACTERS: mpViewOption->SetViewMetaChars( bVal ); break;
- case HANDLE_VIEWSET_FOOTNOTE_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, TRUE); break;
- case HANDLE_VIEWSET_TEXT_FIELD_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, TRUE); break;
+ case HANDLE_VIEWSET_FOOTNOTE_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, sal_True); break;
+ case HANDLE_VIEWSET_TEXT_FIELD_BACKGROUND : mpViewOption->SetAppearanceFlag(VIEWOPT_FIELD_SHADINGS, bVal, sal_True); break;
case HANDLE_VIEWSET_PARA_BREAKS : mpViewOption->SetParagraph(bVal); break;
case HANDLE_VIEWSET_SOFT_HYPHENS : mpViewOption->SetSoftHyph(bVal); break;
case HANDLE_VIEWSET_SPACES : mpViewOption->SetBlank(bVal); break;
@@ -664,7 +652,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
case HANDLE_VIEWSET_HIDDEN_TEXT : mpViewOption->SetShowHiddenField(bVal); break;
case HANDLE_VIEWSET_HIDDEN_CHARACTERS : mpViewOption->SetShowHiddenChar(bVal); break;
case HANDLE_VIEWSET_HIDDEN_PARAGRAPHS : mpViewOption->SetShowHiddenPara(bVal); break;
- case HANDLE_VIEWSET_TABLE_BOUNDARIES : mpViewOption->SetAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES, bVal, TRUE); break;
+ case HANDLE_VIEWSET_TABLE_BOUNDARIES : mpViewOption->SetAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES, bVal, sal_True); break;
case HANDLE_VIEWSET_TEXT_BOUNDARIES : mpViewOption->SetDocBoundaries(bVal); break;
case HANDLE_VIEWSET_SMOOTH_SCROLLING : mpViewOption->SetSmoothScroll(bVal); break;
case HANDLE_VIEWSET_SOLID_MARK_HANDLES : mpViewOption->SetSolidMarkHdl(bVal); break;
@@ -765,14 +753,12 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
OUString sHelpURL;
if ( ! ( rValue >>= sHelpURL ) )
throw IllegalArgumentException();
- SwEditWin &rEditWin = pView->GetEditWin();
- OUString sPrefix = sHelpURL.copy ( 0, 4 );
- // Make sure we have a valid string...should be in the format HID:12345
- if ( ! sPrefix.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "HID:" ) ) )
+
+ INetURLObject aHID( sHelpURL );
+ if ( aHID.GetProtocol() == INET_PROT_HID )
+ pView->GetEditWin().SetHelpId( rtl::OUStringToOString( aHID.GetURLPath(), RTL_TEXTENCODING_UTF8 ) );
+ else
throw IllegalArgumentException ();
- OUString sNumber = sHelpURL.copy ( 4 );
- sal_uInt32 nHelpId = sNumber.toInt32();
- rEditWin.SetHelpId ( nHelpId );
}
else
throw UnknownPropertyException();
@@ -859,13 +845,13 @@ void SwXViewSettings::_preGetValues ()
void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, uno::Any & rValue )
throw(UnknownPropertyException, WrappedTargetException )
{
- sal_Bool bBool = TRUE;
+ sal_Bool bBool = sal_True;
sal_Bool bBoolVal;
switch( rInfo.mnHandle )
{
case HANDLE_VIEWSET_SHOW_RULER: bBoolVal = mpConstViewOption->IsViewAnyRuler(); break;
- case HANDLE_VIEWSET_HRULER : bBoolVal = mpConstViewOption->IsViewHRuler(TRUE); break;
- case HANDLE_VIEWSET_VRULER : bBoolVal = mpConstViewOption->IsViewVRuler(TRUE);break;
+ case HANDLE_VIEWSET_HRULER : bBoolVal = mpConstViewOption->IsViewHRuler(sal_True); break;
+ case HANDLE_VIEWSET_VRULER : bBoolVal = mpConstViewOption->IsViewVRuler(sal_True);break;
case HANDLE_VIEWSET_VRULER_RIGHT : bBoolVal = mpConstViewOption->IsVRulerRight();break;
case HANDLE_VIEWSET_HSCROLL: bBoolVal = mpConstViewOption->IsViewHScrollBar();break;
case HANDLE_VIEWSET_VSCROLL: bBoolVal = mpConstViewOption->IsViewVScrollBar();break;
@@ -895,28 +881,28 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u
case HANDLE_VIEWSET_IS_RASTER_VISIBLE : bBoolVal = mpConstViewOption->IsGridVisible(); break;
case HANDLE_VIEWSET_IS_SNAP_TO_RASTER : bBoolVal = mpConstViewOption->IsSnap(); break;
case HANDLE_VIEWSET_RASTER_RESOLUTION_X :
- bBool = FALSE;
+ bBool = sal_False;
rValue <<= (sal_Int32) TWIP_TO_MM100(mpConstViewOption->GetSnapSize().Width());
break;
case HANDLE_VIEWSET_RASTER_RESOLUTION_Y :
- bBool = FALSE;
+ bBool = sal_False;
rValue <<= (sal_Int32) TWIP_TO_MM100(mpConstViewOption->GetSnapSize().Height());
break;
case HANDLE_VIEWSET_RASTER_SUBDIVISION_X :
- bBool = FALSE;
+ bBool = sal_False;
rValue <<= (sal_Int32) mpConstViewOption->GetDivisionX();
break;
case HANDLE_VIEWSET_RASTER_SUBDIVISION_Y :
- bBool = FALSE;
+ bBool = sal_False;
rValue <<= (sal_Int32) mpConstViewOption->GetDivisionY();
break;
case HANDLE_VIEWSET_ZOOM :
- bBool = FALSE;
+ bBool = sal_False;
rValue <<= (sal_Int16)mpConstViewOption->GetZoom();
break;
case HANDLE_VIEWSET_ZOOM_TYPE:
{
- bBool = FALSE;
+ bBool = sal_False;
sal_Int16 nRet(0);
switch (mpConstViewOption->GetZoomType())
{
@@ -952,9 +938,9 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u
{
bBool = sal_False;
OUStringBuffer sHelpURL;
- sHelpURL.appendAscii ( "HID:" );
+ sHelpURL.appendAscii ( INET_HID_SCHEME );
SwEditWin &rEditWin = pView->GetEditWin();
- sHelpURL.append ( static_cast < sal_Int32 > ( rEditWin.GetHelpId() ) );
+ sHelpURL.append( rtl::OStringToOUString( rEditWin.GetHelpId(), RTL_TEXTENCODING_UTF8 ) );
rValue <<= sHelpURL.makeStringAndClear();
}
else
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 9c79319ea460..6a81a4119d0b 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -46,7 +46,7 @@
#include <pview.hxx>
#include <viewsh.hxx>
#include <pvprtdat.hxx>
-#include <swprtopt.hxx>
+#include <printdata.hxx>
#include <svl/stritem.hxx>
#include <unotxdoc.hxx>
#include <svl/numuno.hxx>
@@ -81,7 +81,6 @@
#include <globals.hrc>
#include <unomid.h>
#include <unotools/printwarningoptions.hxx>
-
#include <com/sun/star/util/SearchOptions.hpp>
#include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
@@ -106,7 +105,6 @@
#include <swcont.hxx>
#include <unodefaults.hxx>
#include <SwXDocumentSettings.hxx>
-#include <SwXPrintPreviewSettings.hxx>
#include <doc.hxx>
#include <editeng/forbiddencharacterstable.hxx>
#include <svl/zforlist.hxx>
@@ -181,17 +179,16 @@ SwPrintUIOptions * lcl_GetPrintUIOptions(
if (!pDocShell)
return NULL;
- const BOOL bWebDoc = NULL != dynamic_cast< const SwWebDocShell * >(pDocShell);
+ const sal_Bool bWebDoc = NULL != dynamic_cast< const SwWebDocShell * >(pDocShell);
const bool bSwSrcView = NULL != dynamic_cast< const SwSrcView * >(pView);
const SwView * pSwView = dynamic_cast< const SwView * >(pView);
const bool bHasSelection = pSwView ? pSwView->HasSelection( sal_False ) : false; // check for any selection, not just text selection
const bool bHasPostIts = lcl_GetPostIts( pDocShell->GetDoc(), 0 );
// get default values to use in dialog from documents SwPrintData
- const SwPrintData *pPrintData = pDocShell->GetDoc()->getPrintData();
- OSL_ENSURE( pPrintData, "failed to get SwPrintData from document" );
+ const SwPrintData &rPrintData = pDocShell->GetDoc()->getPrintData();
- return new SwPrintUIOptions( bWebDoc, bSwSrcView, bHasSelection, bHasPostIts, *pPrintData );
+ return new SwPrintUIOptions( bWebDoc, bSwSrcView, bHasSelection, bHasPostIts, rPrintData );
}
SwTxtFmtColl *lcl_GetParaStyle(const String& rCollName, SwDoc* pDoc)
@@ -210,7 +207,7 @@ void lcl_DisposeView( SfxViewFrame* pToClose, SwDocShell* pDocShell )
{
// check if the view frame still exists
SfxViewFrame* pFound = SfxViewFrame::GetFirst( pDocShell,
- FALSE );
+ sal_False );
while(pFound)
{
if( pFound == pToClose)
@@ -220,7 +217,7 @@ void lcl_DisposeView( SfxViewFrame* pToClose, SwDocShell* pDocShell )
}
pFound = SfxViewFrame::GetNext( *pFound,
pDocShell,
- FALSE );
+ sal_False );
}
}
@@ -735,7 +732,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor >
0);
pSearch->FillSearchItemSet(aSearch);
pSearch->FillReplaceItemSet(aReplace);
- BOOL bCancel;
+ sal_Bool bCancel;
nResult = (sal_Int32)pUnoCrsr->Find( aSearch, !pSearch->bStyles,
eStart, eEnd, bCancel,
(FindRanges)eRanges,
@@ -747,7 +744,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor >
SwTxtFmtColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc());
SwTxtFmtColl *pReplaceColl = lcl_GetParaStyle(pSearch->sReplaceText, pUnoCrsr->GetDoc());;
- BOOL bCancel;
+ sal_Bool bCancel;
nResult = pUnoCrsr->Find( *pSearchColl,
eStart, eEnd, bCancel,
(FindRanges)eRanges, pReplaceColl );
@@ -756,8 +753,8 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor >
else
{
//todo/mba: assuming that notes should be omitted
- BOOL bSearchInNotes = FALSE;
- BOOL bCancel;
+ sal_Bool bSearchInNotes = sal_False;
+ sal_Bool bCancel;
nResult = pUnoCrsr->Find( aSearchOpt, bSearchInNotes,
eStart, eEnd, bCancel,
(FindRanges)eRanges,
@@ -863,10 +860,10 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor >
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_PARATR_BEGIN, RES_PARATR_END-1,
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
- RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
+ RES_TXTATR_INETFMT, RES_TXTATR_CHARFMT,
0);
pSearch->FillSearchItemSet(aSearch);
- BOOL bCancel;
+ sal_Bool bCancel;
nResult = (sal_Int32)pUnoCrsr->Find( aSearch, !pSearch->bStyles,
eStart, eEnd, bCancel,
(FindRanges)eRanges,
@@ -878,7 +875,7 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor >
SwTxtFmtColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc());
//pSearch->sReplaceText
SwTxtFmtColl *pReplaceColl = 0;
- BOOL bCancel;
+ sal_Bool bCancel;
nResult = (sal_Int32)pUnoCrsr->Find( *pSearchColl,
eStart, eEnd, bCancel,
(FindRanges)eRanges, pReplaceColl );
@@ -886,8 +883,8 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor >
else
{
//todo/mba: assuming that notes should be omitted
- BOOL bSearchInNotes = FALSE;
- BOOL bCancel;
+ sal_Bool bSearchInNotes = sal_False;
+ sal_Bool bCancel;
nResult = (sal_Int32)pUnoCrsr->Find( aSearchOpt, bSearchInNotes,
eStart, eEnd, bCancel,
(FindRanges)eRanges,
@@ -996,7 +993,7 @@ Sequence< beans::PropertyValue > SwXTextDocument::getPagePrintSettings(void)
pArray[6] = beans::PropertyValue(C2U("HoriMargin"), -1, aVal, PropertyState_DIRECT_VALUE);
aVal <<= (sal_Int32)TWIP_TO_MM100_UNSIGNED(aData.GetVertSpace());
pArray[7] = beans::PropertyValue(C2U("VertMargin"), -1, aVal, PropertyState_DIRECT_VALUE);
- BOOL bTemp = aData.GetLandscape();
+ sal_Bool bTemp = aData.GetLandscape();
aVal.setValue(&bTemp, ::getCppuBooleanType());
pArray[8] = beans::PropertyValue(C2U("IsLandscape"), -1, aVal, PropertyState_DIRECT_VALUE);
}
@@ -1024,7 +1021,7 @@ sal_uInt32 lcl_Any_To_ULONG(const Any& rValue, sal_Bool& bException)
return nRet;
}
-String lcl_CreateOutlineString( USHORT nIndex,
+String lcl_CreateOutlineString( sal_uInt16 nIndex,
const SwOutlineNodes& rOutlineNodes, const SwNumRule* pOutlRule)
{
String sEntry;
@@ -1069,13 +1066,13 @@ void SwXTextDocument::setPagePrintSettings(const Sequence< beans::PropertyValue
{
if(!nVal || nVal > 0xff)
throw RuntimeException();
- aData.SetRow((BYTE)nVal);
+ aData.SetRow((sal_uInt8)nVal);
}
else if(COMPARE_EQUAL == sName.CompareToAscii("PageColumns"))
{
if(!nVal || nVal > 0xff)
throw RuntimeException();
- aData.SetCol((BYTE)nVal);
+ aData.SetCol((sal_uInt8)nVal);
}
else if(COMPARE_EQUAL == sName.CompareToAscii("LeftMargin"))
{
@@ -1401,7 +1398,7 @@ void SwXTextDocument::Reactivate(SwDocShell* pNewDocShell)
if(pDocShell && pDocShell != pNewDocShell)
Invalidate();
pDocShell = pNewDocShell;
- bObjectValid = TRUE;
+ bObjectValid = sal_True;
}
void SwXTextDocument::InitNewDoc()
@@ -1668,9 +1665,7 @@ Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServic
}
else if (sCategory == C2U ("text") )
{
- if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.PrintPreviewSettings") ) )
- xRet = Reference < XInterface > ( *new SwXPrintPreviewSettings ( pDocShell->GetDoc() ) );
- else if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.DocumentSettings") ) )
+ if( 0 == rServiceName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.DocumentSettings") ) )
xRet = Reference < XInterface > ( *new SwXDocumentSettings ( this ) );
}
else if (sCategory == C2U ("chart2") )
@@ -1768,9 +1763,9 @@ sal_Bool SwXTextDocument::supportsService(const OUString& rServiceName) throw( R
)
return sal_True;
- BOOL bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell));
- BOOL bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell));
- BOOL bTextDoc = (!bWebDoc && !bGlobalDoc);
+ sal_Bool bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell));
+ sal_Bool bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell));
+ sal_Bool bTextDoc = (!bWebDoc && !bGlobalDoc);
return (
(bWebDoc && rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.WebDocument" ))) ||
@@ -1781,9 +1776,9 @@ sal_Bool SwXTextDocument::supportsService(const OUString& rServiceName) throw( R
Sequence< OUString > SwXTextDocument::getSupportedServiceNames(void) throw( RuntimeException )
{
- BOOL bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell));
- BOOL bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell));
- BOOL bTextDoc = (!bWebDoc && !bGlobalDoc);
+ sal_Bool bWebDoc = (0 != PTR_CAST(SwWebDocShell, pDocShell));
+ sal_Bool bGlobalDoc = (0 != PTR_CAST(SwGlobalDocShell, pDocShell));
+ sal_Bool bTextDoc = (!bWebDoc && !bGlobalDoc);
Sequence< OUString > aRet (3);
OUString* pArray = aRet.getArray();
@@ -2066,7 +2061,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
break;
case WID_DOC_HIDE_TIPS :
{
- BOOL bTemp = SW_MOD()->GetModuleConfig()->IsHideFieldTips();
+ sal_Bool bTemp = SW_MOD()->GetModuleConfig()->IsHideFieldTips();
aAny.setValue(&bTemp, ::getBooleanCppuType());
}
break;
@@ -2093,7 +2088,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
break;
case WID_DOC_TWO_DIGIT_YEAR:
{
- aAny <<= static_cast < sal_Int16 > (pDocShell->GetDoc()->GetNumberFormatter ( TRUE )->GetYear2000());
+ aAny <<= static_cast < sal_Int16 > (pDocShell->GetDoc()->GetNumberFormatter ( sal_True )->GetYear2000());
}
break;
case WID_DOC_AUTOMATIC_CONTROL_FOCUS:
@@ -2247,7 +2242,7 @@ void SwXTextDocument::updateLinks( ) throw(RuntimeException)
if( rLnkMan.GetLinks().Count() )
{
UnoActionContext aAction(pDoc);
- rLnkMan.UpdateAllLinks( FALSE, FALSE, TRUE );
+ rLnkMan.UpdateAllLinks( sal_False, sal_False, sal_True );
}
}
@@ -2425,7 +2420,7 @@ SwDoc * SwXTextDocument::GetRenderDoc(
const TypeId aSwViewTypeId = TYPE(SwView);
if (rpView && rpView->IsA(aSwViewTypeId))
{
- SfxObjectShellRef xDocSh(((SwView*)rpView)->GetOrCreateTmpSelectionDoc());
+ SfxObjectShellLock xDocSh(((SwView*)rpView)->GetOrCreateTmpSelectionDoc());
if (xDocSh.Is())
{
pDoc = ((SwDocShell*)&xDocSh)->GetDoc();
@@ -2446,33 +2441,28 @@ static void lcl_SavePrintUIOptionsToDocumentPrintData(
const SwPrintUIOptions &rPrintUIOptions,
bool bIsPDFEXport )
{
- if (!rDoc.getPrintData())
- {
- SwPrintData *pTmpData = new SwPrintData;
- rDoc.setPrintData ( *pTmpData );
- delete pTmpData; // setPrintData does make its own copy!
- }
-
- SwPrintData *pDocPrintData = rDoc.getPrintData();
-
- pDocPrintData->SetPrintGraphic( rPrintUIOptions.IsPrintGraphics() );
- pDocPrintData->SetPrintTable( rPrintUIOptions.IsPrintTables() );
- pDocPrintData->SetPrintDraw( rPrintUIOptions.IsPrintDrawings() );
- pDocPrintData->SetPrintControl( rPrintUIOptions.IsPrintFormControls() );
- pDocPrintData->SetPrintLeftPage( rPrintUIOptions.IsPrintLeftPages() );
- pDocPrintData->SetPrintRightPage( rPrintUIOptions.IsPrintRightPages() );
- pDocPrintData->SetPrintReverse( rPrintUIOptions.IsPrintReverse() );
- pDocPrintData->SetPaperFromSetup( rPrintUIOptions.IsPaperFromSetup() );
- pDocPrintData->SetPrintEmptyPages( rPrintUIOptions.IsPrintEmptyPages( bIsPDFEXport ) );
- pDocPrintData->SetPrintPostIts( rPrintUIOptions.GetPrintPostItsType() );
- pDocPrintData->SetPrintProspect( rPrintUIOptions.IsPrintProspect() );
- pDocPrintData->SetPrintProspect_RTL( rPrintUIOptions.IsPrintProspectRTL() );
- pDocPrintData->SetPrintPageBackground( rPrintUIOptions.IsPrintPageBackground() );
- pDocPrintData->SetPrintBlackFont( rPrintUIOptions.IsPrintWithBlackTextColor() );
- // pDocPrintData->SetPrintSingleJobs( b ); handled by File/Print dialog itself
- // pDocPrintData->SetFaxName( s ); n/a in File/Print dialog
- pDocPrintData->SetPrintHiddenText( rPrintUIOptions.IsPrintHiddenText() );
- pDocPrintData->SetPrintTextPlaceholder( rPrintUIOptions.IsPrintTextPlaceholders() );
+ SwPrintData aDocPrintData( rDoc.getPrintData() );
+
+ aDocPrintData.SetPrintGraphic( rPrintUIOptions.IsPrintGraphics() );
+ aDocPrintData.SetPrintTable( rPrintUIOptions.IsPrintTables() );
+ aDocPrintData.SetPrintDraw( rPrintUIOptions.IsPrintDrawings() );
+ aDocPrintData.SetPrintControl( rPrintUIOptions.IsPrintFormControls() );
+ aDocPrintData.SetPrintLeftPage( rPrintUIOptions.IsPrintLeftPages() );
+ aDocPrintData.SetPrintRightPage( rPrintUIOptions.IsPrintRightPages() );
+ aDocPrintData.SetPrintReverse( rPrintUIOptions.IsPrintReverse() );
+ aDocPrintData.SetPaperFromSetup( rPrintUIOptions.IsPaperFromSetup() );
+ aDocPrintData.SetPrintEmptyPages( rPrintUIOptions.IsPrintEmptyPages( bIsPDFEXport ) );
+ aDocPrintData.SetPrintPostIts( rPrintUIOptions.GetPrintPostItsType() );
+ aDocPrintData.SetPrintProspect( rPrintUIOptions.IsPrintProspect() );
+ aDocPrintData.SetPrintProspect_RTL( rPrintUIOptions.IsPrintProspectRTL() );
+ aDocPrintData.SetPrintPageBackground( rPrintUIOptions.IsPrintPageBackground() );
+ aDocPrintData.SetPrintBlackFont( rPrintUIOptions.IsPrintWithBlackTextColor() );
+ // aDocPrintData.SetPrintSingleJobs( b ); handled by File/Print dialog itself
+ // arDocPrintData.SetFaxName( s ); n/a in File/Print dialog
+ aDocPrintData.SetPrintHiddenText( rPrintUIOptions.IsPrintHiddenText() );
+ aDocPrintData.SetPrintTextPlaceholder( rPrintUIOptions.IsPrintTextPlaceholders() );
+
+ rDoc.setPrintData( aDocPrintData );
}
sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
@@ -2543,14 +2533,15 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
m_pRenderData->ViewOptionAdjustStart( *pWrtShell, *pWrtShell->GetViewOptions() );
}
- m_pRenderData->SetSwPrtOptions( new SwPrtOptions( bIsPDFExport ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PDF export")) : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Printing") ) ) );
+ m_pRenderData->SetSwPrtOptions( new SwPrintData );
m_pRenderData->MakeSwPrtOptions( m_pRenderData->GetSwPrtOptionsRef(), pRenderDocShell,
m_pPrintUIOptions, m_pRenderData, bIsPDFExport );
if (pView->IsA(aSwViewTypeId))
{
// PDF export should not make use of the SwPrtOptions
- const SwPrtOptions *pPrtOptions = bIsPDFExport? NULL : m_pRenderData->GetSwPrtOptions();
+ const SwPrintData *pPrtOptions = (bIsPDFExport)
+ ? NULL : m_pRenderData->GetSwPrtOptions();
m_pRenderData->ViewOptionAdjust( pPrtOptions );
}
@@ -2568,7 +2559,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
// --> FME 2005-05-23 #122919# Force field update before PDF export:
- pWrtShell->ViewShell::UpdateFlds(TRUE);
+ pWrtShell->ViewShell::UpdateFlds(sal_True);
// <--
if( bStateChanged )
pRenderDocShell->EnableSetModified( sal_True );
@@ -2682,7 +2673,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
// determine the correct page number from the renderer index
// --> OD 2010-10-01 #i114875
// consider brochure print
- const USHORT nPage = bPrintProspect
+ const sal_uInt16 nPage = bPrintProspect
? nRenderer + 1
: m_pRenderData->GetPagesToPrint()[ nRenderer ];
// <--
@@ -2722,6 +2713,9 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
aTmpSize = pPrinter->LogicToLogic( aTmpSize,
pPrinter->GetMapMode(), MapMode( MAP_100TH_MM ));
aPageSize = awt::Size( aTmpSize.Width(), aTmpSize.Height() );
+ #if 0
+ // #i115048# it seems users didn't like getting double the formatted page size
+ // revert to "old" behavior scaling to the current paper size of the printer
if (bPrintProspect)
{
// we just state what output size we would need
@@ -2731,6 +2725,20 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
aPreferredPageSize = awt::Size ( TWIP_TO_MM100( 2 * aTmpSize.Width() ),
TWIP_TO_MM100( aTmpSize.Height() ));
}
+ #else
+ if( bPrintProspect )
+ {
+ // just switch to an appropriate portrait/landscape format
+ // FIXME: brochure printing with landscape pages puts the
+ // pages next to each other, so landscape is currently always
+ // the better choice
+ if( aPageSize.Width < aPageSize.Height )
+ {
+ aPreferredPageSize.Width = aPageSize.Height;
+ aPreferredPageSize.Height = aPageSize.Width;
+ }
+ }
+ #endif
}
}
else
@@ -2906,7 +2914,8 @@ void SAL_CALL SwXTextDocument::render(
}
// <--
- const SwPrtOptions &rSwPrtOptions = *m_pRenderData->GetSwPrtOptions();
+ SwPrintData const& rSwPrtOptions =
+ *m_pRenderData->GetSwPrtOptions();
if (bPrintProspect)
pVwSh->PrintProspect( pOut, rSwPrtOptions, nRenderer );
else // normal printing and PDF export
@@ -2981,8 +2990,12 @@ uno::Reference< util::XCloneable > SwXTextDocument::createClone( ) throw (uno::
SolarMutexGuard aGuard;
if(!IsValid())
throw RuntimeException();
- //create a new document - hidden - copy the storage and return it
- SfxObjectShell* pShell = pDocShell->GetDoc()->CreateCopy(false);
+
+ // create a new document - hidden - copy the storage and return it
+ // SfxObjectShellRef is used here, since the model should control object lifetime after creation
+ // and thus SfxObjectShellLock is not allowed here
+ // the model holds reference to the shell, so the shell will not destructed at the end of method
+ SfxObjectShellRef pShell = pDocShell->GetDoc()->CreateCopy(false);
uno::Reference< frame::XModel > xNewModel = pShell->GetModel();
uno::Reference< embed::XStorage > xNewStorage = ::comphelper::OStorageHelper::GetTemporaryStorage( );
uno::Sequence< beans::PropertyValue > aTempMediaDescriptor;
@@ -3036,50 +3049,50 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages(
//USER STYLES
const SwCharFmts *pFmts = pDoc->GetCharFmts();
- for(USHORT i = 0; i < pFmts->Count(); ++i)
+ for(sal_uInt16 i = 0; i < pFmts->Count(); ++i)
{
const SwAttrSet &rAttrSet = (*pFmts)[i]->GetAttrSet();
LanguageType nLang = LANGUAGE_DONTKNOW;
if (bLatin)
{
- nLang = rAttrSet.GetLanguage( FALSE ).GetLanguage();
+ nLang = rAttrSet.GetLanguage( sal_False ).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
if (bAsian)
{
- nLang = rAttrSet.GetCJKLanguage( FALSE ).GetLanguage();
+ nLang = rAttrSet.GetCJKLanguage( sal_False ).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
if (bComplex)
{
- nLang = rAttrSet.GetCTLLanguage( FALSE ).GetLanguage();
+ nLang = rAttrSet.GetCTLLanguage( sal_False ).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
}
const SwTxtFmtColls *pColls = pDoc->GetTxtFmtColls();
- for (USHORT i = 0; i < pColls->Count(); ++i)
+ for (sal_uInt16 i = 0; i < pColls->Count(); ++i)
{
const SwAttrSet &rAttrSet = (*pColls)[i]->GetAttrSet();
LanguageType nLang = LANGUAGE_DONTKNOW;;
if (bLatin)
{
- nLang = rAttrSet.GetLanguage( FALSE ).GetLanguage();
+ nLang = rAttrSet.GetLanguage( sal_False ).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
if (bAsian)
{
- nLang = rAttrSet.GetCJKLanguage( FALSE ).GetLanguage();
+ nLang = rAttrSet.GetCJKLanguage( sal_False ).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
if (bComplex)
{
- nLang = rAttrSet.GetCTLLanguage( FALSE ).GetLanguage();
+ nLang = rAttrSet.GetCTLLanguage( sal_False ).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
@@ -3104,19 +3117,19 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages(
LanguageType nLang = LANGUAGE_DONTKNOW;
if (bLatin)
{
- nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_LANGUAGE, FALSE )).GetLanguage();
+ nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_LANGUAGE, sal_False )).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
if (bAsian)
{
- nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_CJK_LANGUAGE, FALSE )).GetLanguage();
+ nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_CJK_LANGUAGE, sal_False )).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
if (bComplex)
{
- nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_CTL_LANGUAGE, FALSE )).GetLanguage();
+ nLang = dynamic_cast< const SvxLanguageItem & >(pSet->Get( RES_CHRATR_CTL_LANGUAGE, sal_False )).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
@@ -3133,38 +3146,38 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages(
if(pOutliner)
{
EditEngine& rEditEng = (EditEngine&)pOutliner->GetEditEngine();
- ULONG nParCount = pOutliner->GetParagraphCount();
- for (ULONG nPar=0; nPar<nParCount; nPar++)
+ sal_uLong nParCount = pOutliner->GetParagraphCount();
+ for (sal_uLong nPar=0; nPar<nParCount; nPar++)
{
//every paragraph
SvUShorts aPortions;
- rEditEng.GetPortions( (USHORT)nPar, aPortions );
+ rEditEng.GetPortions( (sal_uInt16)nPar, aPortions );
- for ( USHORT nPos = aPortions.Count(); nPos; )
+ for ( sal_uInt16 nPos = aPortions.Count(); nPos; )
{
//every position
--nPos;
- USHORT nEnd = aPortions.GetObject( nPos );
- USHORT nStart = nPos ? aPortions.GetObject( nPos - 1 ) : 0;
- ESelection aSelection( (USHORT)nPar, nStart, (USHORT)nPar, nEnd );
+ sal_uInt16 nEnd = aPortions.GetObject( nPos );
+ sal_uInt16 nStart = nPos ? aPortions.GetObject( nPos - 1 ) : 0;
+ ESelection aSelection( (sal_uInt16)nPar, nStart, (sal_uInt16)nPar, nEnd );
SfxItemSet aAttr = rEditEng.GetAttribs( aSelection );
LanguageType nLang = LANGUAGE_DONTKNOW;
if (bLatin)
{
- nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE, FALSE )).GetLanguage();
+ nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE, sal_False )).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
if (bAsian)
{
- nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE_CJK, FALSE )).GetLanguage();
+ nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE_CJK, sal_False )).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
if (bComplex)
{
- nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE_CTL, FALSE )).GetLanguage();
+ nLang = dynamic_cast< const SvxLanguageItem & >(aAttr.Get( EE_CHAR_LANGUAGE_CTL, sal_False )).GetLanguage();
if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
aAllLangs.insert( nLang );
}
@@ -3805,8 +3818,8 @@ SwViewOptionAdjust_Impl::~SwViewOptionAdjust_Impl()
m_rShell.ApplyViewOptions( m_aOldViewOptions );
}
-void SwViewOptionAdjust_Impl::AdjustViewOptions(
- const SwPrtOptions *pPrtOptions )
+void
+SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions)
{
// to avoid unnecessary reformatting the view options related to the content
// below should only change if necessary, that is if respective content is present
@@ -3824,15 +3837,15 @@ void SwViewOptionAdjust_Impl::AdjustViewOptions(
// disable anything in the view that should not be printed (or exported to PDF) by default
// (see also dialog "Tools/Options - StarOffice Writer - Formatting Aids"
// in section "Display of ...")
- aRenderViewOptions.SetParagraph( FALSE ); // paragraph end
- aRenderViewOptions.SetSoftHyph( FALSE ); // aka custom hyphens
- aRenderViewOptions.SetBlank( FALSE ); // spaces
- aRenderViewOptions.SetHardBlank( FALSE ); // non-breaking spaces
- aRenderViewOptions.SetTab( FALSE ); // tabs
- aRenderViewOptions.SetLineBreak( FALSE ); // breaks (type 1)
- aRenderViewOptions.SetPageBreak( FALSE ); // breaks (type 2)
- aRenderViewOptions.SetColumnBreak( FALSE ); // breaks (type 3)
- BOOL bVal = pPrtOptions? pPrtOptions->bPrintHiddenText : FALSE;
+ aRenderViewOptions.SetParagraph( sal_False ); // paragraph end
+ aRenderViewOptions.SetSoftHyph( sal_False ); // aka custom hyphens
+ aRenderViewOptions.SetBlank( sal_False ); // spaces
+ aRenderViewOptions.SetHardBlank( sal_False ); // non-breaking spaces
+ aRenderViewOptions.SetTab( sal_False ); // tabs
+ aRenderViewOptions.SetLineBreak( sal_False ); // breaks (type 1)
+ aRenderViewOptions.SetPageBreak( sal_False ); // breaks (type 2)
+ aRenderViewOptions.SetColumnBreak( sal_False ); // breaks (type 3)
+ sal_Bool bVal = pPrtOptions? pPrtOptions->bPrintHiddenText : sal_False;
if (bContainsHiddenChars)
aRenderViewOptions.SetShowHiddenChar( bVal ); // hidden text
if (bContainsHiddenFields)
@@ -3843,16 +3856,16 @@ void SwViewOptionAdjust_Impl::AdjustViewOptions(
if (bContainsPlaceHolders)
{
// should always be printed in PDF export!
- bVal = pPrtOptions ? pPrtOptions->bPrintTextPlaceholder : TRUE;
+ bVal = pPrtOptions ? pPrtOptions->bPrintTextPlaceholder : sal_True;
aRenderViewOptions.SetShowPlaceHolderFields( bVal );
}
if (bContainsFields)
- aRenderViewOptions.SetFldName( FALSE );
+ aRenderViewOptions.SetFldName( sal_False );
// we need to set this flag in order to get to see the visible effect of
// some of the above settings (needed for correct rendering)
- aRenderViewOptions.SetViewMetaChars( TRUE );
+ aRenderViewOptions.SetViewMetaChars( sal_True );
if (m_aOldViewOptions != aRenderViewOptions) // check if reformatting is necessary
{
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index 19bb94210682..3340bc98c971 100644
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -747,11 +747,11 @@ Sequence< Sequence< PropertyValue > > SwXTextView::getRubyList( sal_Bool /*bAuto
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
SwRubyList aList;
- USHORT nCount = pDoc->FillRubyList( *rSh.GetCrsr(), aList, 0 );
+ sal_uInt16 nCount = pDoc->FillRubyList( *rSh.GetCrsr(), aList, 0 );
Sequence< Sequence< PropertyValue > > aRet(nCount);
Sequence< PropertyValue >* pRet = aRet.getArray();
String aString;
- for(USHORT n = 0; n < nCount; n++)
+ for(sal_uInt16 n = 0; n < nCount; n++)
{
const SwRubyListEntryPtr pEntry = aList[n];
@@ -843,20 +843,23 @@ void SAL_CALL SwXTextView::setRubyList(
pEntry->GetRubyAttr().SetPosition(bValue ? 0 : 1);
}
}
- aList.Insert(pEntry, (USHORT)nPos);
+ aList.Insert(pEntry, (sal_uInt16)nPos);
}
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
pDoc->SetRubyList( *rSh.GetCrsr(), aList, 0 );
}
-SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc( SfxObjectShellRef& /*rRef*/ )
+SfxObjectShellLock SwXTextView::BuildTmpSelectionDoc()
{
SwWrtShell& rOldSh = m_pView->GetWrtShell();
SfxPrinter *pPrt = rOldSh.getIDocumentDeviceAccess()->getPrinter( false );
SwDocShell* pDocSh;
- SfxObjectShellRef xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) );
+ SfxObjectShellLock xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) );
xDocSh->DoInitNew( 0 );
- rOldSh.FillPrtDoc(pDocSh->GetDoc(), pPrt);
+ SwDoc *const pTempDoc( pDocSh->GetDoc() );
+ // #i103634#, #i112425#: do not expand numbering and fields on PDF export
+ pTempDoc->SetClipBoard(true);
+ rOldSh.FillPrtDoc(pTempDoc, pPrt);
SfxViewFrame* pDocFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 );
SwView* pDocView = (SwView*) pDocFrame->GetViewShell();
pDocView->AttrChangedNotify( &pDocView->GetWrtShell() );//Damit SelectShell gerufen wird.
@@ -990,7 +993,7 @@ uno::Any SAL_CALL SwXTextView::getPropertyValue(
if (nWID == WID_PAGE_COUNT)
nCount = m_pView->GetDocShell()->GetDoc()->GetPageCount();
else // WID_LINE_COUNT
- nCount = m_pView->GetWrtShell().GetLineCount( FALSE /*of whole document*/ );
+ nCount = m_pView->GetWrtShell().GetLineCount( sal_False /*of whole document*/ );
aRet <<= nCount;
}
break;
@@ -1002,7 +1005,7 @@ uno::Any SAL_CALL SwXTextView::getPropertyValue(
const SwViewOption *pOpt = m_pView->GetWrtShell().GetViewOptions();
if (!pOpt)
throw RuntimeException();
- UINT32 nFlag = VIEWOPT_1_ONLINESPELL;
+ sal_uInt32 nFlag = VIEWOPT_1_ONLINESPELL;
sal_Bool bVal = 0 != (pOpt->GetCoreOptions() & nFlag);
aRet <<= bVal;
}
@@ -1424,7 +1427,7 @@ sal_Bool SwXTextViewCursor::jumpToFirstPage(void) throw( uno::RuntimeException )
rSh.LeaveSelFrmMode();
}
rSh.EnterStdMode();
- bRet = rSh.SttEndDoc(TRUE);
+ bRet = rSh.SttEndDoc(sal_True);
}
else
throw uno::RuntimeException();
@@ -1444,7 +1447,7 @@ sal_Bool SwXTextViewCursor::jumpToLastPage(void) throw( uno::RuntimeException )
rSh.LeaveSelFrmMode();
}
rSh.EnterStdMode();
- bRet = rSh.SttEndDoc(FALSE);
+ bRet = rSh.SttEndDoc(sal_False);
rSh.SttPg();
}
else
@@ -1457,7 +1460,7 @@ sal_Bool SwXTextViewCursor::jumpToPage(sal_Int16 nPage) throw( uno::RuntimeExcep
SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
if(m_pView)
- bRet = m_pView->GetWrtShell().GotoPage(nPage, TRUE);
+ bRet = m_pView->GetWrtShell().GotoPage(nPage, sal_True);
else
throw uno::RuntimeException();
return bRet;
@@ -1515,7 +1518,7 @@ sal_Int16 SwXTextViewCursor::getPage(void) throw( uno::RuntimeException )
{
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
- nRet = (short)pShellCrsr->GetPageNum( TRUE, 0 );
+ nRet = (short)pShellCrsr->GetPageNum( sal_True, 0 );
}
else
throw uno::RuntimeException();
@@ -1984,8 +1987,8 @@ uno::Reference< datatransfer::XTransferable > SAL_CALL SwXTextView::getTransfera
else
{
SwTransferable* pTransfer = new SwTransferable( rSh );
- const BOOL bLockedView = rSh.IsViewLocked();
- rSh.LockView( TRUE ); //lock visible section
+ const sal_Bool bLockedView = rSh.IsViewLocked();
+ rSh.LockView( sal_True ); //lock visible section
pTransfer->PrepareForCopy();
rSh.LockView( bLockedView );
return uno::Reference< datatransfer::XTransferable >( pTransfer );
@@ -2003,7 +2006,7 @@ void SAL_CALL SwXTextView::insertTransferable( const uno::Reference< datatransfe
{
SdrView *pSdrView = rSh.GetDrawView();
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
- pOLV->GetEditView().InsertText( xTrans, GetView()->GetDocShell()->GetMedium()->GetBaseURL(), FALSE );
+ pOLV->GetEditView().InsertText( xTrans, GetView()->GetDocShell()->GetMedium()->GetBaseURL(), sal_False );
}
else
{
diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx
index ee6271c1453c..79b59b8b66ea 100644
--- a/sw/source/ui/utlui/attrdesc.cxx
+++ b/sw/source/ui/utlui/attrdesc.cxx
@@ -87,7 +87,7 @@ static sal_Char const sKomma[] = ", ";
SfxItemIter aIter( *this );
const IntlWrapper rInt( ::comphelper::getProcessServiceFactory(),
GetAppLanguage() );
- while( TRUE )
+ while( sal_True )
{
aIter.GetCurItem()->GetPresentation( ePres, eCoreMetric,
ePresMetric, aStr,
@@ -283,7 +283,7 @@ SfxItemPresentation SwRegisterItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = GetValue() ? STR_REGISTER_ON : STR_REGISTER_OFF;
+ sal_uInt16 nId = GetValue() ? STR_REGISTER_ON : STR_REGISTER_OFF;
rText = SW_RESSTR( nId );
return ePres;
}
@@ -346,7 +346,7 @@ SfxItemPresentation SwParaConnectBorderItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = GetValue() ? STR_CONNECT_BORDER_ON : STR_CONNECT_BORDER_OFF;
+ sal_uInt16 nId = GetValue() ? STR_CONNECT_BORDER_ON : STR_CONNECT_BORDER_OFF;
rText = SW_RESSTR( nId );
return ePres;
}
@@ -397,7 +397,7 @@ SfxItemPresentation SwFmtFrmSize::GetPresentation
{
rText += ',';
rText += ' ';
- const USHORT nId = ATT_FIX_SIZE == eFrmHeightType ?
+ const sal_uInt16 nId = ATT_FIX_SIZE == eFrmHeightType ?
STR_FRM_FIXEDHEIGHT : STR_FRM_MINHEIGHT;
rText += SW_RESSTR( nId );
rText += ' ';
@@ -440,7 +440,7 @@ SfxItemPresentation SwFmtHeader::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- const USHORT nId = GetHeaderFmt() ? STR_HEADER : STR_NO_HEADER;
+ const sal_uInt16 nId = GetHeaderFmt() ? STR_HEADER : STR_NO_HEADER;
rText = SW_RESSTR( nId );
return ePres;
}
@@ -470,7 +470,7 @@ SfxItemPresentation SwFmtFooter::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- const USHORT nId = GetFooterFmt() ? STR_FOOTER : STR_NO_FOOTER;
+ const sal_uInt16 nId = GetFooterFmt() ? STR_FOOTER : STR_NO_FOOTER;
rText = SW_RESSTR( nId );
return ePres;
}
@@ -497,7 +497,7 @@ SfxItemPresentation SwFmtSurround::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( (SwSurround)GetValue() )
{
case SURROUND_NONE:
@@ -557,7 +557,7 @@ SfxItemPresentation SwFmtVertOrient::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( GetVertOrient() )
{
case text::VertOrientation::NONE:
@@ -618,7 +618,7 @@ SfxItemPresentation SwFmtHoriOrient::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( GetHoriOrient() )
{
case text::HoriOrientation::NONE:
@@ -678,7 +678,7 @@ SfxItemPresentation SwFmtAnchor::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( GetAnchorId() )
{
case FLY_AT_PARA:
@@ -751,7 +751,7 @@ SfxItemPresentation SwFmtCol::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nCnt = GetNumCols();
+ sal_uInt16 nCnt = GetNumCols();
if ( nCnt > 1 )
{
rText = String::CreateFromInt32(nCnt);
@@ -759,7 +759,7 @@ SfxItemPresentation SwFmtCol::GetPresentation
rText += SW_RESSTR( STR_COLUMNS );
if ( COLADJ_NONE != GetLineAdj() )
{
- USHORT nWdth = USHORT(GetLineWidth());
+ sal_uInt16 nWdth = sal_uInt16(GetLineWidth());
rText += ' ';
rText += SW_RESSTR( STR_LINE_WIDTH );
rText += ' ';
@@ -1017,7 +1017,7 @@ SfxItemPresentation SwTextGridItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
switch ( GetGridType() )
{
@@ -1069,7 +1069,7 @@ SfxItemPresentation SwMirrorGrf::GetPresentation(
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId;
+ sal_uInt16 nId;
switch( GetValue() )
{
case RES_MIRROR_GRAPH_DONT: nId = STR_NO_MIRROR; break;
@@ -1174,7 +1174,7 @@ SfxItemPresentation SwChannelGrf::GetPresentation(
case SFX_ITEM_PRESENTATION_COMPLETE:
if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
{
- USHORT nId;
+ sal_uInt16 nId;
switch ( Which() )
{
case RES_GRFATR_CHANNELR: nId = STR_CHANNELR; break;
@@ -1234,7 +1234,7 @@ SfxItemPresentation SwInvertGrf::GetPresentation(
case SFX_ITEM_PRESENTATION_COMPLETE:
if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
{
- USHORT nId = 0 != GetValue() ? STR_INVERT : STR_INVERT_NOT;
+ sal_uInt16 nId = 0 != GetValue() ? STR_INVERT : STR_INVERT_NOT;
rText = SW_RESSTR( nId );
}
break;
@@ -1280,7 +1280,7 @@ SfxItemPresentation SwDrawModeGrf::GetPresentation(
case SFX_ITEM_PRESENTATION_COMPLETE:
if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
{
- USHORT nId;
+ sal_uInt16 nId;
switch ( GetValue() )
{
@@ -1313,7 +1313,7 @@ SfxItemPresentation SwFmtFollowTextFlow::GetPresentation( SfxItemPresentation eP
break;
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nId = GetValue() ? STR_FOLLOW_TEXT_FLOW : STR_DONT_FOLLOW_TEXT_FLOW;
+ sal_uInt16 nId = GetValue() ? STR_FOLLOW_TEXT_FLOW : STR_DONT_FOLLOW_TEXT_FLOW;
rText = SW_RESSTR( nId );
}
break;
diff --git a/sw/source/ui/utlui/bookctrl.cxx b/sw/source/ui/utlui/bookctrl.cxx
index 0d46d74c31b2..9836dc827e05 100644
--- a/sw/source/ui/utlui/bookctrl.cxx
+++ b/sw/source/ui/utlui/bookctrl.cxx
@@ -57,10 +57,10 @@ class BookmarkPopup_Impl : public PopupMenu
public:
BookmarkPopup_Impl();
- USHORT GetCurId() const { return nCurId; }
+ sal_uInt16 GetCurId() const { return nCurId; }
private:
- USHORT nCurId;
+ sal_uInt16 nCurId;
virtual void Select();
};
@@ -78,8 +78,8 @@ void BookmarkPopup_Impl::Select()
// class SvxZoomStatusBarControl ------------------------------------------
-SwBookmarkControl::SwBookmarkControl( USHORT _nSlotId,
- USHORT _nId,
+SwBookmarkControl::SwBookmarkControl( sal_uInt16 _nSlotId,
+ sal_uInt16 _nId,
StatusBar& rStb ) :
SfxStatusBarControl( _nSlotId, _nId, rStb )
{
@@ -90,7 +90,7 @@ SwBookmarkControl::~SwBookmarkControl()
}
void SwBookmarkControl::StateChanged(
- USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
+ sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
{
if( eState != SFX_ITEM_AVAILABLE || pState->ISA( SfxVoidItem ) )
GetStatusBar().SetItemText( GetId(), String() );
@@ -118,8 +118,8 @@ void SwBookmarkControl::Command( const CommandEvent& rCEvt )
{
IDocumentMarkAccess* const pMarkAccess = pWrtShell->getIDocumentMarkAccess();
IDocumentMarkAccess::const_iterator_t ppBookmarkStart = pMarkAccess->getBookmarksBegin();
- USHORT nPopupId = 1;
- ::std::map<sal_Int32, USHORT> aBookmarkIdx;
+ sal_uInt16 nPopupId = 1;
+ ::std::map<sal_Int32, sal_uInt16> aBookmarkIdx;
for(IDocumentMarkAccess::const_iterator_t ppBookmark = ppBookmarkStart;
ppBookmark != pMarkAccess->getBookmarksEnd();
ppBookmark++)
@@ -127,12 +127,12 @@ void SwBookmarkControl::Command( const CommandEvent& rCEvt )
if(IDocumentMarkAccess::BOOKMARK == IDocumentMarkAccess::GetType(**ppBookmark))
{
aPop.InsertItem( nPopupId, ppBookmark->get()->GetName() );
- aBookmarkIdx[nPopupId] = static_cast<USHORT>(ppBookmark - ppBookmarkStart);
+ aBookmarkIdx[nPopupId] = static_cast<sal_uInt16>(ppBookmark - ppBookmarkStart);
nPopupId++;
}
}
aPop.Execute( &GetStatusBar(), rCEvt.GetMousePosPixel());
- USHORT nCurrId = aPop.GetCurId();
+ sal_uInt16 nCurrId = aPop.GetCurId();
if( nCurrId != USHRT_MAX)
{
SfxUInt16Item aBookmark( FN_STAT_BOOKMARK, aBookmarkIdx[nCurrId] );
diff --git a/sw/source/ui/utlui/condedit.cxx b/sw/source/ui/utlui/condedit.cxx
index 0a9e81d45141..72994ff0f671 100644
--- a/sw/source/ui/utlui/condedit.cxx
+++ b/sw/source/ui/utlui/condedit.cxx
@@ -43,7 +43,7 @@ using namespace ::com::sun::star::uno;
ConditionEdit::ConditionEdit( Window* pParent, const ResId& rResId )
: Edit( pParent, rResId ),
DropTargetHelper( this ),
- bBrackets( TRUE ), bEnableDrop( TRUE )
+ bBrackets( sal_True ), bEnableDrop( sal_True )
{
}
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index 3065c4e8cbd2..51f45297805d 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -83,7 +83,9 @@
#include <svx/svdpage.hxx>
#include <svx/svdview.hxx>
#include <vcl/scrbar.hxx>
-#include <undobj.hxx>
+#include <SwRewriter.hxx>
+#include <hints.hxx>
+#include <numrule.hxx>
#include <swundo.hxx>
#include <ndtxt.hxx>
#include <PostItMgr.hxx>
@@ -274,7 +276,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
case CONTENT_TYPE_BOOKMARK:
{
IDocumentMarkAccess* const pMarkAccess = pWrtShell->getIDocumentMarkAccess();
- nMemberCount = static_cast<USHORT>(count_if(
+ nMemberCount = static_cast<sal_uInt16>(count_if(
pMarkAccess->getBookmarksBegin(),
pMarkAccess->getBookmarksEnd(),
&lcl_IsUiVisibleBookmark));
@@ -307,7 +309,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow)
{
const String& rSectionName =
pFmt->GetSection()->GetSectionName();
- BYTE nLevel = 0;
+ sal_uInt8 nLevel = 0;
SwSectionFmt* pParentFmt = pFmt->GetParent();
while(pParentFmt)
{
@@ -634,7 +636,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
{
String sSectionName = pFmt->GetSection()->GetSectionName();
- BYTE nLevel = 0;
+ sal_uInt8 nLevel = 0;
SwSectionFmt* pParentFmt = pFmt->GetParent();
while(pParentFmt)
{
@@ -787,7 +789,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
pMember->Insert(pCnt);
nMemberCount++;
if(nOldMemberCount > (int)i &&
- (pOldMember->GetObject((USHORT)i))->IsInvisible() != pCnt->IsInvisible())
+ (pOldMember->GetObject((sal_uInt16)i))->IsInvisible() != pCnt->IsInvisible())
*pbLevelOrVisibiblityChanged = sal_True;
}
}
@@ -865,6 +867,7 @@ SwContentTree::SwContentTree(Window* pParent, const ResId& rResId) :
aUpdTimer.SetTimeout(1000);
Clear();
EnableContextMenuHandling();
+ SetStyle( GetStyle() | WB_QUICK_SEARCH );
}
SwContentTree::~SwContentTree()
@@ -2292,7 +2295,7 @@ DragDropMode SwContentTree::NotifyStartDrag(
Childs verschoben
***************************************************************************/
sal_Bool SwContentTree::NotifyMoving( SvLBoxEntry* pTarget,
- SvLBoxEntry* pEntry, SvLBoxEntry*& , ULONG& )
+ SvLBoxEntry* pEntry, SvLBoxEntry*& , sal_uLong& )
{
if(!bDocChgdInDragging)
{
@@ -2331,7 +2334,7 @@ sal_Bool SwContentTree::NotifyMoving( SvLBoxEntry* pTarget,
Childs verschoben
***************************************************************************/
sal_Bool SwContentTree::NotifyCopying( SvLBoxEntry* pTarget,
- SvLBoxEntry* pEntry, SvLBoxEntry*& , ULONG& )
+ SvLBoxEntry* pEntry, SvLBoxEntry*& , sal_uLong& )
{
if(!bDocChgdInDragging)
{
@@ -2453,7 +2456,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
!pActiveShell->GetView().GetDocShell()->IsReadOnly())
{
EditEntry(pEntry, EDIT_MODE_DELETE);
- bViewHasChanged = TRUE;
+ bViewHasChanged = sal_True;
GetParentWindow()->UpdateListBox();
TimerUpdate(&aUpdTimer);
GrabFocus();
@@ -2466,7 +2469,7 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
{
- BOOL bCallBase = TRUE;
+ sal_Bool bCallBase = sal_True;
if( rHEvt.GetMode() & HELPMODE_QUICK )
{
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
@@ -2565,13 +2568,13 @@ void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
else
Help::ShowQuickHelp( this, aItemRect, sEntry,
QUICKHELP_LEFT|QUICKHELP_VCENTER );
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
}
else
{
Help::ShowQuickHelp( this, Rectangle(), aEmptyStr, 0 );
- bCallBase = FALSE;
+ bCallBase = sal_False;
}
}
}
@@ -2579,7 +2582,7 @@ void SwContentTree::RequestHelp( const HelpEvent& rHEvt )
Window::RequestHelp( rHEvt );
}
-void SwContentTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
+void SwContentTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
{
SvLBoxEntry* pFirst = FirstSelected();
switch( nSelectedPopupEntry )
@@ -2783,7 +2786,7 @@ void SwContentTree::EditEntry(SvLBoxEntry* pEntry, sal_uInt8 nMode)
pActiveShell->StartUndo(UNDO_DELETE, &aRewriter);
pActiveShell->GetView().GetViewFrame()->GetDispatcher()->Execute(FN_TABLE_SELECT_ALL);
pActiveShell->DeleteRow();
- pActiveShell->EndUndo(UNDO_DELETE);
+ pActiveShell->EndUndo();
pActiveShell->EndAction();
}
else if(nMode == EDIT_MODE_RENAME)
@@ -3123,7 +3126,7 @@ sal_Bool NaviContentBookmark::Paste( TransferableDataHelper& rData )
xub_StrLen nPos = 0;
aUrl = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos );
aDescr = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos );
- nDefDrag= (USHORT)sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ).ToInt32();
+ nDefDrag= (sal_uInt16)sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ).ToInt32();
nDocSh = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ).ToInt32();
}
return bRet;
diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx
index 8319f8cf83fc..1855d9f23277 100644
--- a/sw/source/ui/utlui/glbltree.cxx
+++ b/sw/source/ui/utlui/glbltree.cxx
@@ -108,7 +108,7 @@ using ::rtl::OUString;
#define GLBL_TABPOS_SUB 5
const SfxObjectShell* SwGlobalTree::pShowShell = 0;
-static const USHORT aHelpForMenu[] =
+static const char* aHelpForMenu[] =
{
0, //
HID_GLBLTREE_UPDATE, //CTX_UPDATE
@@ -138,24 +138,24 @@ static const USHORT aHelpForMenu[] =
class SwGlobalFrameListener_Impl : public SfxListener
{
- BOOL bValid;
+ sal_Bool bValid;
public:
SwGlobalFrameListener_Impl(SfxViewFrame& rFrame) :
- bValid(TRUE)
+ bValid(sal_True)
{
StartListening(rFrame);
}
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
- BOOL IsValid() const {return bValid;}
+ sal_Bool IsValid() const {return bValid;}
};
void SwGlobalFrameListener_Impl::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
if( rHint.ISA(SfxSimpleHint) &&
(((SfxSimpleHint&) rHint).GetId() == SFX_HINT_DYING))
- bValid = FALSE;
+ bValid = sal_False;
}
SwGlobalTree::SwGlobalTree(Window* pParent, const ResId& rResId) :
@@ -170,9 +170,9 @@ SwGlobalTree::SwGlobalTree(Window* pParent, const ResId& rResId) :
pDocContent ( NULL ),
pDocInserter ( NULL ),
- bIsInternalDrag ( FALSE ),
- bLastEntryEmphasis ( FALSE ),
- bIsImageListInitialized ( FALSE )
+ bIsInternalDrag ( sal_False ),
+ bLastEntryEmphasis ( sal_False ),
+ bIsImageListInitialized ( sal_False )
{
SetDragDropMode(SV_DRAGDROP_APP_COPY |
@@ -182,7 +182,7 @@ SwGlobalTree::SwGlobalTree(Window* pParent, const ResId& rResId) :
aUpdateTimer.SetTimeout(GLOBAL_UPDATE_TIMEOUT);
aUpdateTimer.SetTimeoutHdl(LINK(this, SwGlobalTree, Timeout));
aUpdateTimer.Start();
- for(USHORT i = 0; i < GLOBAL_CONTEXT_COUNT; i++)
+ for(sal_uInt16 i = 0; i < GLOBAL_CONTEXT_COUNT; i++)
{
aContextStrings[i] = SW_RESSTR(i+ ST_GLOBAL_CONTEXT_FIRST);
}
@@ -204,19 +204,19 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
SvLBoxEntry* pLast = (SvLBoxEntry*)LastVisible();
if(pEmphasisEntry)
{
- ImplShowTargetEmphasis( Prev(pEmphasisEntry), FALSE );
+ ImplShowTargetEmphasis( Prev(pEmphasisEntry), sal_False );
pEmphasisEntry = 0;
}
else if(bLastEntryEmphasis && pLast)
{
- ImplShowTargetEmphasis( pLast, FALSE);
+ ImplShowTargetEmphasis( pLast, sal_False);
}
SvLBoxEntry* pDropEntry = bLastEntryEmphasis ? 0 : GetEntry(rEvt.maPosPixel);
if( bIsInternalDrag )
{
SvLBoxEntry* pDummy = 0;
- ULONG nInsertionPos = LIST_APPEND;
+ sal_uLong nInsertionPos = LIST_APPEND;
NotifyMoving( pDropEntry, pDDSource, pDummy, nInsertionPos );
}
else
@@ -234,12 +234,12 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
int nAbsContPos = pDropEntry ?
(int) GetModel()->GetAbsPos(pDropEntry):
- 1;
- USHORT nEntryCount = (USHORT)GetEntryCount();
+ sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount();
// Daten holen
FileList aFileList;
aData.GetFileList( FORMAT_FILE_LIST, aFileList );
- for ( USHORT n = (USHORT)aFileList.Count(); n--; )
+ for ( sal_uInt16 n = (sal_uInt16)aFileList.Count(); n--; )
{
sFileName = aFileList.GetFile(n);
InsertRegion(pCnt, &sFileName);
@@ -255,7 +255,7 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
nEntryCount++;
nAbsContPos++;
- pCnt = pTempContents->GetObject( static_cast< USHORT >(nAbsContPos) );
+ pCnt = pTempContents->GetObject( static_cast< sal_uInt16 >(nAbsContPos) );
}
}
}
@@ -273,7 +273,7 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
}
}
}
- bLastEntryEmphasis = FALSE;
+ bLastEntryEmphasis = sal_False;
return nRet;
}
@@ -289,14 +289,14 @@ sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt )
{
if( pEmphasisEntry )
{
- ImplShowTargetEmphasis( Prev(pEmphasisEntry), FALSE );
+ ImplShowTargetEmphasis( Prev(pEmphasisEntry), sal_False );
pEmphasisEntry = 0;
}
else if(bLastEntryEmphasis && pLast)
{
- ImplShowTargetEmphasis( pLast, FALSE);
+ ImplShowTargetEmphasis( pLast, sal_False);
}
- bLastEntryEmphasis = FALSE;
+ bLastEntryEmphasis = sal_False;
}
else
{
@@ -318,11 +318,11 @@ sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt )
nRet = DND_ACTION_LINK;
if(pEmphasisEntry && pEmphasisEntry != pDropEntry)
- ImplShowTargetEmphasis( Prev(pEmphasisEntry), FALSE );
+ ImplShowTargetEmphasis( Prev(pEmphasisEntry), sal_False );
else if(pLast && bLastEntryEmphasis && pDropEntry)
{
- ImplShowTargetEmphasis( pLast, FALSE);
- bLastEntryEmphasis = FALSE;
+ ImplShowTargetEmphasis( pLast, sal_False);
+ bLastEntryEmphasis = sal_False;
}
if(pDropEntry)
@@ -330,7 +330,7 @@ sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt )
else if(pLast)
{
ImplShowTargetEmphasis( pLast, DND_ACTION_NONE != nRet );
- bLastEntryEmphasis = TRUE;
+ bLastEntryEmphasis = sal_True;
}
pEmphasisEntry = pDropEntry;
}
@@ -343,12 +343,12 @@ PopupMenu* SwGlobalTree::CreateContextMenu()
if(pActiveShell &&
!pActiveShell->GetView().GetDocShell()->IsReadOnly())
{
- USHORT nEnableFlags = GetEnableFlags();
+ sal_uInt16 nEnableFlags = GetEnableFlags();
pPop = new PopupMenu;
PopupMenu* pSubPop1 = new PopupMenu;
PopupMenu* pSubPop2 = new PopupMenu;
- for (USHORT i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++)
+ for (sal_uInt16 i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++)
{
pSubPop2->InsertItem( i, aContextStrings[ST_UPDATE_SEL - ST_GLOBAL_CONTEXT_FIRST - CTX_UPDATE_SEL+ i] );
pSubPop2->SetHelpId(i, aHelpForMenu[i]);
@@ -398,13 +398,13 @@ PopupMenu* SwGlobalTree::CreateContextMenu()
return pPop;
}
-void SwGlobalTree::TbxMenuHdl(USHORT nTbxId, ToolBox* pBox)
+void SwGlobalTree::TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox)
{
- USHORT nEnableFlags = GetEnableFlags();
+ sal_uInt16 nEnableFlags = GetEnableFlags();
if(FN_GLOBAL_OPEN == nTbxId)
{
PopupMenu *pMenu = new PopupMenu;
- for (USHORT i = CTX_INSERT_ANY_INDEX; i <= CTX_INSERT_TEXT; i++)
+ for (sal_uInt16 i = CTX_INSERT_ANY_INDEX; i <= CTX_INSERT_TEXT; i++)
{
pMenu->InsertItem( i, aContextStrings[ST_INDEX - ST_GLOBAL_CONTEXT_FIRST - CTX_INSERT_ANY_INDEX + i] );
pMenu->SetHelpId(i, aHelpForMenu[i] );
@@ -422,7 +422,7 @@ void SwGlobalTree::TbxMenuHdl(USHORT nTbxId, ToolBox* pBox)
else if(FN_GLOBAL_UPDATE == nTbxId)
{
PopupMenu *pMenu = new PopupMenu;
- for (USHORT i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++)
+ for (sal_uInt16 i = CTX_UPDATE_SEL; i <= CTX_UPDATE_ALL; i++)
{
pMenu->InsertItem( i, aContextStrings[ST_UPDATE_SEL - ST_GLOBAL_CONTEXT_FIRST - CTX_UPDATE_SEL+ i] );
pMenu->SetHelpId(i, aHelpForMenu[i] );
@@ -436,14 +436,14 @@ void SwGlobalTree::TbxMenuHdl(USHORT nTbxId, ToolBox* pBox)
}
}
-USHORT SwGlobalTree::GetEnableFlags() const
+sal_uInt16 SwGlobalTree::GetEnableFlags() const
{
SvLBoxEntry* pEntry = FirstSelected();
- USHORT nSelCount = (USHORT)GetSelectionCount();
- USHORT nEntryCount = (USHORT)GetEntryCount();
+ sal_uInt16 nSelCount = (sal_uInt16)GetSelectionCount();
+ sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount();
SvLBoxEntry* pPrevEntry = pEntry ? Prev(pEntry) : 0;
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if(nSelCount == 1 || !nEntryCount)
nRet |= ENABLE_INSERT_IDX|ENABLE_INSERT_FILE;
if(nSelCount == 1)
@@ -468,9 +468,9 @@ USHORT SwGlobalTree::GetEnableFlags() const
void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt )
{
- BOOL bParent = TRUE;
- Update(TRUE);
- Display(TRUE);
+ sal_Bool bParent = sal_True;
+ Update(sal_True);
+ Display(sal_True);
if( rHEvt.GetMode() & HELPMODE_QUICK )
{
Point aPos( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
@@ -479,7 +479,7 @@ void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt )
(const SwGlblDocContent*)pEntry->GetUserData() : 0;
if( pCont && GLBLDOC_SECTION == pCont->GetType())
{
- bParent = FALSE;
+ bParent = sal_False;
SvLBoxTab* pTab;
SvLBoxItem* pItem = GetItem( pEntry, aPos.X(), &pTab );
if(pItem && SV_ITEM_ID_LBOXSTRING == pItem->IsA())
@@ -517,11 +517,11 @@ void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt )
void SwGlobalTree::SelectHdl()
{
- USHORT nSelCount = (USHORT)GetSelectionCount();
+ sal_uInt16 nSelCount = (sal_uInt16)GetSelectionCount();
SvLBoxEntry* pSel = FirstSelected();
- USHORT nAbsPos = pSel ? (USHORT)GetModel()->GetAbsPos(pSel) : 0;
+ sal_uInt16 nAbsPos = pSel ? (sal_uInt16)GetModel()->GetAbsPos(pSel) : 0;
SwNavigationPI* pNavi = GetParentWindow();
- BOOL bReadonly = !pActiveShell ||
+ sal_Bool bReadonly = !pActiveShell ||
pActiveShell->GetView().GetDocShell()->IsReadOnly();
pNavi->aGlobalToolBox.EnableItem(FN_GLOBAL_EDIT, nSelCount == 1 && !bReadonly);
pNavi->aGlobalToolBox.EnableItem(FN_GLOBAL_OPEN, nSelCount <= 1 && !bReadonly);
@@ -529,7 +529,7 @@ void SwGlobalTree::SelectHdl()
pNavi->aGlobalToolBox.EnableItem(FN_ITEM_UP,
nSelCount == 1 && nAbsPos && !bReadonly);
pNavi->aGlobalToolBox.EnableItem(FN_ITEM_DOWN,
- nSelCount == 1 && nAbsPos < ((USHORT)GetEntryCount()) - 1 && !bReadonly);
+ nSelCount == 1 && nAbsPos < ((sal_uInt16)GetEntryCount()) - 1 && !bReadonly);
}
@@ -541,7 +541,7 @@ void SwGlobalTree::DeselectHdl()
DragDropMode SwGlobalTree::NotifyStartDrag( TransferDataContainer& ,
SvLBoxEntry* pEntry )
{
- bIsInternalDrag = TRUE;
+ bIsInternalDrag = sal_True;
pDDSource = pEntry;
return SV_DRAGDROP_CTRL_MOVE;
}
@@ -551,33 +551,33 @@ long SwGlobalTree::GetTabPos( SvLBoxEntry*, SvLBoxTab* pTab)
return pTab->GetPos() - GLBL_TABPOS_SUB;
}
-BOOL SwGlobalTree::NotifyMoving( SvLBoxEntry* pTarget,
+sal_Bool SwGlobalTree::NotifyMoving( SvLBoxEntry* pTarget,
SvLBoxEntry* pSource,
SvLBoxEntry*&,
- ULONG&
+ sal_uLong&
)
{
SvTreeList* _pModel = GetModel();
- USHORT nSource = (USHORT) _pModel->GetAbsPos(pSource);
- USHORT nDest = pTarget ? (USHORT) _pModel->GetAbsPos(pTarget) : pSwGlblDocContents->Count();
+ sal_uInt16 nSource = (sal_uInt16) _pModel->GetAbsPos(pSource);
+ sal_uInt16 nDest = pTarget ? (sal_uInt16) _pModel->GetAbsPos(pTarget) : pSwGlblDocContents->Count();
if( pActiveShell->MoveGlobalDocContent(
*pSwGlblDocContents, nSource, nSource + 1, nDest ) &&
- Update( FALSE ))
+ Update( sal_False ))
Display();
- return FALSE;
+ return sal_False;
}
-BOOL SwGlobalTree::NotifyCopying( SvLBoxEntry* /*pTarget*/,
+sal_Bool SwGlobalTree::NotifyCopying( SvLBoxEntry* /*pTarget*/,
SvLBoxEntry* /*pEntry*/,
SvLBoxEntry*& /*rpNewParent*/,
- ULONG& /*rNewChildPos*/
+ sal_uLong& /*rNewChildPos*/
)
{
- return FALSE;
+ return sal_False;
}
-BOOL SwGlobalTree::NotifyAcceptDrop( SvLBoxEntry* pEntry)
+sal_Bool SwGlobalTree::NotifyAcceptDrop( SvLBoxEntry* pEntry)
{
return pEntry != 0;
}
@@ -591,7 +591,7 @@ void SwGlobalTree::StartDrag( sal_Int8 nAction, const Point& rPt )
void SwGlobalTree::DragFinished( sal_Int8 nAction )
{
SvTreeListBox::DragFinished( nAction );
- bIsInternalDrag = FALSE;
+ bIsInternalDrag = sal_False;
}
/***************************************************************************
@@ -601,7 +601,7 @@ void SwGlobalTree::DragFinished( sal_Int8 nAction )
void SwGlobalTree::MouseButtonDown( const MouseEvent& rMEvt )
{
Point aPos( rMEvt.GetPosPixel());
- SvLBoxEntry* pEntry = GetEntry( aPos, TRUE );
+ SvLBoxEntry* pEntry = GetEntry( aPos, sal_True );
if( !pEntry && rMEvt.IsLeft() && rMEvt.IsMod1() && (rMEvt.GetClicks() % 2) == 0)
Control::MouseButtonDown( rMEvt );
else
@@ -610,7 +610,7 @@ void SwGlobalTree::MouseButtonDown( const MouseEvent& rMEvt )
void SwGlobalTree::GetFocus()
{
- if(Update( FALSE ))
+ if(Update( sal_False ))
Display();
SvTreeListBox::GetFocus();
}
@@ -638,18 +638,18 @@ void SwGlobalTree::Clear()
SvTreeListBox::Clear();
}
-void SwGlobalTree::Display(BOOL bOnlyUpdateUserData)
+void SwGlobalTree::Display(sal_Bool bOnlyUpdateUserData)
{
if(!bIsImageListInitialized)
{
aEntryImages = ImageList(SW_RES(IMG_NAVI_ENTRYBMP));
- bIsImageListInitialized = TRUE;
+ bIsImageListInitialized = sal_True;
}
- USHORT nCount = pSwGlblDocContents->Count();
+ sal_uInt16 nCount = pSwGlblDocContents->Count();
if(bOnlyUpdateUserData && GetEntryCount() == pSwGlblDocContents->Count())
{
SvLBoxEntry* pEntry = First();
- for( USHORT i = 0; i < nCount; i++)
+ for( sal_uInt16 i = 0; i < nCount; i++)
{
SwGlblDocContentPtr pCont = pSwGlblDocContents->GetObject(i);
pEntry->SetUserData(pCont);
@@ -658,21 +658,21 @@ void SwGlobalTree::Display(BOOL bOnlyUpdateUserData)
}
else
{
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
SvLBoxEntry* pOldSelEntry = FirstSelected();
String sEntryName; // Name des Eintrags
- USHORT nSelPos = USHRT_MAX;
+ sal_uInt16 nSelPos = USHRT_MAX;
if(pOldSelEntry)
{
sEntryName = GetEntryText(pOldSelEntry);
- nSelPos = (USHORT)GetModel()->GetAbsPos(pOldSelEntry);
+ nSelPos = (sal_uInt16)GetModel()->GetAbsPos(pOldSelEntry);
}
Clear();
if(!pSwGlblDocContents)
- Update( FALSE );
+ Update( sal_False );
SvLBoxEntry* pSelEntry = 0;
- for( USHORT i = 0; i < nCount; i++)
+ for( sal_uInt16 i = 0; i < nCount; i++)
{
SwGlblDocContentPtr pCont = pSwGlblDocContents->GetObject(i);
String sEntry;
@@ -701,7 +701,7 @@ void SwGlobalTree::Display(BOOL bOnlyUpdateUserData)
break;
}
SvLBoxEntry* pEntry = InsertEntry(sEntry, aImage, aImage,
- 0, FALSE, LIST_APPEND, pCont);
+ 0, sal_False, LIST_APPEND, pCont);
if(sEntry == sEntryName)
{
pSelEntry = pEntry;
@@ -719,7 +719,7 @@ void SwGlobalTree::Display(BOOL bOnlyUpdateUserData)
Select(First());
else
SelectHdl();
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
}
}
@@ -747,7 +747,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* pCont, const String* pF
void SwGlobalTree::EditContent(const SwGlblDocContent* pCont )
{
- USHORT nSlot = 0;
+ sal_uInt16 nSlot = 0;
switch( pCont->GetType() )
{
case GLBLDOC_UNKNOWN:
@@ -774,7 +774,7 @@ void SwGlobalTree::EditContent(const SwGlblDocContent* pCont )
if(nSlot)
{
pActiveShell->GetView().GetViewFrame()->GetDispatcher()->Execute(nSlot);
- if(Update( FALSE ))
+ if(Update( sal_False ))
Display();
}
}
@@ -782,10 +782,10 @@ void SwGlobalTree::EditContent(const SwGlblDocContent* pCont )
IMPL_LINK( SwGlobalTree, PopupHdl, Menu* , pMenu)
{
ExcecuteContextMenuAction( pMenu->GetCurItemId());
- return TRUE;
+ return sal_True;
}
-void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
+void SwGlobalTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
{
SvLBoxEntry* pEntry = FirstSelected();
SwGlblDocContent* pCont = pEntry ? (SwGlblDocContent*)pEntry->GetUserData() : 0;
@@ -796,7 +796,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
if(pCont)
pContCopy = new SwGlblDocContent(pCont->GetDocPos());
SfxDispatcher& rDispatch = *pActiveShell->GetView().GetViewFrame()->GetDispatcher();
- USHORT nSlot = 0;
+ sal_uInt16 nSlot = 0;
bool bDeleteContentCopy = true;
switch( nSelectedPopupEntry )
{
@@ -835,7 +835,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
case CTX_UPDATE_LINK:
case CTX_UPDATE_ALL:
{
- pActiveShell->GetLinkManager().UpdateAllLinks(TRUE);
+ pActiveShell->GetLinkManager().UpdateAllLinks(sal_True);
if(CTX_UPDATE_ALL == nSelectedPopupEntry)
nSlot = FN_UPDATE_TOX;
pCont = 0;
@@ -867,7 +867,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
{
pActiveShell->DeleteGlobalDocContent(
pTempContents ? *pTempContents : *pSwGlblDocContents,
- (USHORT)GetModel()->GetAbsPos(pSelEntry));
+ (sal_uInt16)GetModel()->GetAbsPos(pSelEntry));
pSelEntry = PrevSelected(pSelEntry);
if(pSelEntry)
{
@@ -900,7 +900,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
*pActiveShell,
0,
USHRT_MAX,
- TRUE);
+ sal_True);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(RET_OK == pDlg->Execute())
{
@@ -929,7 +929,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
SfxViewFrame* pGlobFrm = pActiveShell->GetView().GetViewFrame();
SwGlobalFrameListener_Impl aFrmListener(*pGlobFrm);
- ULONG nEntryPos = pEntry ? GetModel()->GetAbsPos(pEntry) : (ULONG)-1;
+ sal_uLong nEntryPos = pEntry ? GetModel()->GetAbsPos(pEntry) : (sal_uLong)-1;
// neues Dok anlegen
SfxStringItem aFactory(SID_NEWDOCDIRECT,
SwDocShell::Factory().GetFilterContainer()->GetName());
@@ -956,9 +956,9 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
{
pGlobFrm->ToTop();
// durch das Update sind die Eintraege invalid
- if(nEntryPos != (ULONG)-1)
+ if(nEntryPos != (sal_uLong)-1)
{
- Update( FALSE );
+ Update( sal_False );
Display();
Select(GetModel()->GetEntryAtAbsPos(nEntryPos));
pEntry = FirstSelected();
@@ -993,7 +993,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
else
{
pActiveShell->SplitNode(); // leeres Dokument
- pActiveShell->Up( FALSE, 1 );
+ pActiveShell->Up( sal_False, 1 );
}
pActiveShell->GetView().GetEditWin().GrabFocus();
}
@@ -1008,7 +1008,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
GotoContent(pCont);
if(nSlot)
rDispatch.Execute(nSlot);
- if(Update( FALSE ))
+ if(Update( sal_False ))
Display();
if ( bDeleteContentCopy )
delete pContCopy;
@@ -1018,7 +1018,7 @@ void SwGlobalTree::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
IMPL_LINK( SwGlobalTree, Timeout, Timer*, EMPTYARG )
{
- if(!HasFocus() && Update( FALSE ))
+ if(!HasFocus() && Update( sal_False ))
Display();
return 0;
}
@@ -1057,7 +1057,7 @@ void SwGlobalTree::HideTree()
SvTreeListBox::Hide();
}
-void SwGlobalTree::ExecCommand(USHORT nCmd)
+void SwGlobalTree::ExecCommand(sal_uInt16 nCmd)
{
SvLBoxEntry* pEntry = FirstSelected();
OSL_ENSURE(pEntry, "gleich knallt's");
@@ -1071,14 +1071,14 @@ void SwGlobalTree::ExecCommand(USHORT nCmd)
{
if(GetSelectionCount() == 1)
{
- BOOL bMove = FALSE;
- USHORT nSource = (USHORT)GetModel()->GetAbsPos(pEntry);
- USHORT nDest = nSource;
+ sal_Bool bMove = sal_False;
+ sal_uInt16 nSource = (sal_uInt16)GetModel()->GetAbsPos(pEntry);
+ sal_uInt16 nDest = nSource;
switch(nCmd)
{
case FN_ITEM_DOWN:
{
- USHORT nEntryCount = (USHORT)GetEntryCount();
+ sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount();
bMove = nEntryCount > nSource + 1;
nDest+= 2;
}
@@ -1093,16 +1093,16 @@ void SwGlobalTree::ExecCommand(USHORT nCmd)
}
if( bMove && pActiveShell->MoveGlobalDocContent(
*pSwGlblDocContents, nSource, nSource + 1, nDest ) &&
- Update( FALSE ))
+ Update( sal_False ))
Display();
}
}
}
-BOOL SwGlobalTree::Update(BOOL bHard)
+sal_Bool SwGlobalTree::Update(sal_Bool bHard)
{
SwView* pActView = GetParentWindow()->GetCreateView();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if(pActView && pActView->GetWrtShellPtr())
{
const SwWrtShell* pOldShell = pActiveShell;
@@ -1115,23 +1115,23 @@ BOOL SwGlobalTree::Update(BOOL bHard)
if(!pSwGlblDocContents)
{
pSwGlblDocContents = new SwGlblDocContents;
- bRet = TRUE;
+ bRet = sal_True;
pActiveShell->GetGlobalDocContent(*pSwGlblDocContents);
}
else
{
- BOOL bCopy = FALSE;
+ sal_Bool bCopy = sal_False;
SwGlblDocContents* pTempContents = new SwGlblDocContents;
pActiveShell->GetGlobalDocContent(*pTempContents);
if(pTempContents->Count() != pSwGlblDocContents->Count() ||
pTempContents->Count() != GetEntryCount())
{
- bRet = TRUE;
- bCopy = TRUE;
+ bRet = sal_True;
+ bCopy = sal_True;
}
else
{
- for(USHORT i = 0; i < pTempContents->Count() && !bCopy; i++)
+ for(sal_uInt16 i = 0; i < pTempContents->Count() && !bCopy; i++)
{
SwGlblDocContent* pLeft = pTempContents->GetObject(i);
SwGlblDocContent* pRight = pSwGlblDocContents->GetObject(i);
@@ -1150,13 +1150,13 @@ BOOL SwGlobalTree::Update(BOOL bHard)
)
)
{
- bCopy = bRet = TRUE;
+ bCopy = bRet = sal_True;
}
}
}
if(bCopy || bHard)
{
- USHORT i;
+ sal_uInt16 i;
pSwGlblDocContents->DeleteAndDestroy(0, pSwGlblDocContents->Count());
for( i = 0; i < pTempContents->Count(); i++)
@@ -1185,14 +1185,14 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont)
{
String sFileName(pCont->GetSection()->GetLinkFileName().GetToken(0,
sfx2::cTokenSeperator));
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
const SfxObjectShell* pCurr = SfxObjectShell::GetFirst();
while( !bFound && pCurr )
{
if(pCurr->GetMedium() &&
String(pCurr->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI)) == sFileName)
{
- bFound = TRUE;
+ bFound = sal_True;
SwGlobalTree::SetShowShell(pCurr);
Application::PostUserEvent( STATIC_LINK(
this, SwGlobalTree, ShowFrameHdl ) );
@@ -1205,7 +1205,7 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont)
{
SfxStringItem aURL(SID_FILE_NAME,
sFileName);
- SfxBoolItem aReadOnly(SID_DOC_READONLY, FALSE);
+ SfxBoolItem aReadOnly(SID_DOC_READONLY, sal_False);
SfxStringItem aTargetFrameName( SID_TARGETNAME, String::CreateFromAscii("_blank") );
SfxStringItem aReferer(SID_REFERER, pActiveShell->GetView().GetDocShell()->GetTitle());
pActiveShell->GetView().GetViewFrame()->GetDispatcher()->
@@ -1240,14 +1240,14 @@ void SwGlobalTree::InitEntry(SvLBoxEntry* pEntry,
const XubString& rStr ,const Image& rImg1,const Image& rImg2,
SvLBoxButtonKind eButtonKind)
{
- USHORT nColToHilite = 1; //0==Bitmap;1=="Spalte1";2=="Spalte2"
+ sal_uInt16 nColToHilite = 1; //0==Bitmap;1=="Spalte1";2=="Spalte2"
SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind );
SvLBoxString* pCol = (SvLBoxString*)pEntry->GetItem( nColToHilite );
SwLBoxString* pStr = new SwLBoxString( pEntry, 0, pCol->GetText() );
pEntry->ReplaceItem( pStr, nColToHilite );
}
-void SwLBoxString::Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags,
+void SwLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags,
SvLBoxEntry* pEntry )
{
SwGlblDocContent* pCont = (SwGlblDocContent*)pEntry->GetUserData();
@@ -1282,24 +1282,24 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
sal_Int32 nFiles = _rFiles.getLength();
if ( nFiles )
{
- BOOL bMove = FALSE;
+ sal_Bool bMove = sal_False;
if ( !_pContent )
{
SvLBoxEntry* pLast = (SvLBoxEntry*)LastVisible();
_pContent = (SwGlblDocContent*)pLast->GetUserData();
- bMove = TRUE;
+ bMove = sal_True;
}
String sFilePassword;
- USHORT nEntryCount = (USHORT)GetEntryCount();
+ sal_uInt16 nEntryCount = (sal_uInt16)GetEntryCount();
const OUString* pFileNames = _rFiles.getConstArray();
SwWrtShell& rSh = GetParentWindow()->GetCreateView()->GetWrtShell();
rSh.StartAction();
// after insertion of the first new content the 'pCont' parameter becomes invalid
// find the index of the 'anchor' content to always use a current anchor content
- USHORT nAnchorContent = pSwGlblDocContents->Count() - 1;
+ sal_uInt16 nAnchorContent = pSwGlblDocContents->Count() - 1;
if ( !bMove )
{
- for( USHORT nContent = 0; nContent < pSwGlblDocContents->Count(); ++nContent )
+ for( sal_uInt16 nContent = 0; nContent < pSwGlblDocContents->Count(); ++nContent )
{
if( *_pContent == *pSwGlblDocContents->GetObject( nContent ) )
{
@@ -1316,7 +1316,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
SwGlblDocContent* pAnchorContent = 0;
OSL_ENSURE(aTempContents.Count() > (nAnchorContent + nFile), "invalid anchor content -> last insertion failed");
if ( aTempContents.Count() > (nAnchorContent + nFile) )
- pAnchorContent = aTempContents.GetObject(nAnchorContent + (USHORT)nFile);
+ pAnchorContent = aTempContents.GetObject(nAnchorContent + (sal_uInt16)nFile);
else
pAnchorContent = aTempContents.GetObject(aTempContents.Count() - 1);
String sFileName(pFileNames[nFile]);
@@ -1325,10 +1325,10 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
String sSectionName(String(aFileUrl.GetLastName(
INetURLObject::DECODE_UNAMBIGUOUS)).GetToken(0,
sfx2::cTokenSeperator));
- USHORT nSectCount = rSh.GetSectionFmtCount();
+ sal_uInt16 nSectCount = rSh.GetSectionFmtCount();
String sTempSectionName(sSectionName);
- USHORT nAddNumber = 0;
- USHORT nCount = 0;
+ sal_uInt16 nAddNumber = 0;
+ sal_uInt16 nCount = 0;
// evtl : und Index anhaengen, wenn der Bereichsname schon vergeben ist
while ( nCount < nSectCount )
{
@@ -1361,12 +1361,12 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
}
if ( bMove )
{
- Update( FALSE );
+ Update( sal_False );
rSh.MoveGlobalDocContent(
- *pSwGlblDocContents, nEntryCount, nEntryCount + (USHORT)nFiles, nEntryCount - (USHORT)nFiles );
+ *pSwGlblDocContents, nEntryCount, nEntryCount + (sal_uInt16)nFiles, nEntryCount - (sal_uInt16)nFiles );
}
rSh.EndAction();
- Update( FALSE );
+ Update( sal_False );
Display();
}
}
diff --git a/sw/source/ui/utlui/gloslst.cxx b/sw/source/ui/utlui/gloslst.cxx
index 030747525cfb..a5f35394b33c 100644
--- a/sw/source/ui/utlui/gloslst.cxx
+++ b/sw/source/ui/utlui/gloslst.cxx
@@ -119,7 +119,7 @@ IMPL_LINK(SwGlossDecideDlg, SelectHdl, ListBox*, EMPTYARG)
SwGlossaryList::SwGlossaryList() :
- bFilled(FALSE)
+ bFilled(sal_False)
{
SvtPathOptions aPathOpt;
sPath = aPathOpt.GetAutoTextPath();
@@ -143,7 +143,7 @@ SwGlossaryList::~SwGlossaryList()
********************************************************************/
-BOOL SwGlossaryList::GetShortName(const String& rLongName,
+sal_Bool SwGlossaryList::GetShortName(const String& rLongName,
String& rShortName, String& rGroupName )
{
if(!bFilled)
@@ -151,13 +151,13 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName,
TripleStrings aTripleStrings;
- USHORT nCount = aGroupArr.Count();
- USHORT nFound = 0;
- for(USHORT i = 0; i < nCount; i++ )
+ sal_uInt16 nCount = aGroupArr.Count();
+ sal_uInt16 nFound = 0;
+ for(sal_uInt16 i = 0; i < nCount; i++ )
{
AutoTextGroup* pGroup = aGroupArr.GetObject(i);
if(!rGroupName.Len() || rGroupName == pGroup->sName)
- for(USHORT j = 0; j < pGroup->nCount; j++)
+ for(sal_uInt16 j = 0; j < pGroup->nCount; j++)
{
String sLong = pGroup->sLongNames.GetToken(j, STRING_DELIM);
if((rLongName == sLong))
@@ -171,14 +171,14 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName,
}
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
nCount = aTripleStrings.Count();
if(1 == nCount )
{
TripleString* pTriple = aTripleStrings[0];
rShortName = pTriple->sShort;
rGroupName = pTriple->sGroup;
- bRet = TRUE;
+ bRet = sal_True;
}
else if(1 < nCount)
{
@@ -189,7 +189,7 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName,
aDlg.SetText(sTitle);
ListBox& rLB = aDlg.GetListBox();
- for(USHORT i = 0; i < nCount; i++ )
+ for(sal_uInt16 i = 0; i < nCount; i++ )
rLB.InsertEntry(aTripleStrings[i]->sGroup.GetToken(0, GLOS_DELIM));
rLB.SelectEntryPos(0);
@@ -199,10 +199,10 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName,
TripleString* pTriple = aTripleStrings[rLB.GetSelectEntryPos()];
rShortName = pTriple->sShort;
rGroupName = pTriple->sGroup;
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
@@ -212,7 +212,7 @@ BOOL SwGlossaryList::GetShortName(const String& rLongName,
********************************************************************/
-USHORT SwGlossaryList::GetGroupCount()
+sal_uInt16 SwGlossaryList::GetGroupCount()
{
if(!bFilled)
Update();
@@ -224,7 +224,7 @@ USHORT SwGlossaryList::GetGroupCount()
********************************************************************/
-String SwGlossaryList::GetGroupName(USHORT nPos, BOOL bNoPath, String* pTitle)
+String SwGlossaryList::GetGroupName(sal_uInt16 nPos, sal_Bool bNoPath, String* pTitle)
{
OSL_ENSURE(aGroupArr.Count() > nPos, "group not available");
String sRet(aEmptyStr);
@@ -246,7 +246,7 @@ String SwGlossaryList::GetGroupName(USHORT nPos, BOOL bNoPath, String* pTitle)
********************************************************************/
-USHORT SwGlossaryList::GetBlockCount(USHORT nGroup)
+sal_uInt16 SwGlossaryList::GetBlockCount(sal_uInt16 nGroup)
{
OSL_ENSURE(aGroupArr.Count() > nGroup, "group not available");
if(nGroup < aGroupArr.Count())
@@ -262,7 +262,7 @@ USHORT SwGlossaryList::GetBlockCount(USHORT nGroup)
********************************************************************/
-String SwGlossaryList::GetBlockName(USHORT nGroup, USHORT nBlock, String& rShortName)
+String SwGlossaryList::GetBlockName(sal_uInt16 nGroup, sal_uInt16 nBlock, String& rShortName)
{
OSL_ENSURE(aGroupArr.Count() > nGroup, "group not available");
if(nGroup < aGroupArr.Count())
@@ -289,7 +289,7 @@ void SwGlossaryList::Update()
if(sTemp != sPath)
{
sPath = sTemp;
- bFilled = FALSE;
+ bFilled = sal_False;
ClearGroups();
}
SwGlossaries* pGlossaries = ::GetGlossaries();
@@ -297,11 +297,11 @@ void SwGlossaryList::Update()
String sExt( SwGlossaries::GetExtension() );
if(!bFilled)
{
- USHORT nGroupCount = pGlossaries->GetGroupCnt();
- for(USHORT i = 0; i < nGroupCount; i++)
+ sal_uInt16 nGroupCount = pGlossaries->GetGroupCnt();
+ for(sal_uInt16 i = 0; i < nGroupCount; i++)
{
String sGrpName = pGlossaries->GetGroupName(i);
- USHORT nPath = (USHORT)sGrpName.GetToken(1, GLOS_DELIM).ToInt32();
+ sal_uInt16 nPath = (sal_uInt16)sGrpName.GetToken(1, GLOS_DELIM).ToInt32();
if(nPath < pPathArr->Count())
{
AutoTextGroup* pGroup = new AutoTextGroup;
@@ -320,11 +320,11 @@ void SwGlossaryList::Update()
aGroupArr.Insert( pGroup, i );
}
}
- bFilled = TRUE;
+ bFilled = sal_True;
}
else
{
- for(USHORT nPath = 0; nPath < pPathArr->Count(); nPath++)
+ for(sal_uInt16 nPath = 0; nPath < pPathArr->Count(); nPath++)
{
SvStringsDtor aFoundGroupNames;
SvStrings aFiles( 16, 16 );
@@ -332,7 +332,7 @@ void SwGlossaryList::Update()
SWUnoHelper::UCB_GetFileListOfFolder( *(*pPathArr)[nPath], aFiles,
&sExt, &aDateTimeArr );
- for( USHORT nFiles = 0, nFEnd = aFiles.Count();
+ for( sal_uInt16 nFiles = 0, nFEnd = aFiles.Count();
nFiles < nFEnd; ++nFiles )
{
String* pTitle = aFiles[ nFiles ];
@@ -365,20 +365,20 @@ void SwGlossaryList::Update()
delete pDT;
}
- USHORT nArrCount = aGroupArr.Count();
- for( USHORT i = nArrCount; i; --i)
+ sal_uInt16 nArrCount = aGroupArr.Count();
+ for( sal_uInt16 i = nArrCount; i; --i)
{
// evtl. geloeschte Gruppen entfernen
AutoTextGroup* pGroup = aGroupArr.GetObject(i - 1);
- USHORT nGroupPath = (USHORT)pGroup->sName.GetToken( 1,
+ sal_uInt16 nGroupPath = (sal_uInt16)pGroup->sName.GetToken( 1,
GLOS_DELIM).ToInt32();
// nur die Gruppen werden geprueft, die fuer den
// aktuellen Teilpfad registriert sind
if(nGroupPath == nPath)
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
String sCompareGroup = pGroup->sName.GetToken(0, GLOS_DELIM);
- for( USHORT j = 0; j < aFoundGroupNames.Count() && !bFound; ++j)
+ for( sal_uInt16 j = 0; j < aFoundGroupNames.Count() && !bFound; ++j)
{
bFound = sCompareGroup == *aFoundGroupNames[j];
}
@@ -412,7 +412,7 @@ void SwGlossaryList::Timeout()
AutoTextGroup* SwGlossaryList::FindGroup(const String& rGroupName)
{
- for(USHORT i = 0; i < aGroupArr.Count(); i++)
+ for(sal_uInt16 i = 0; i < aGroupArr.Count(); i++)
{
AutoTextGroup* pRet = aGroupArr.GetObject(i);
if(pRet->sName == rGroupName)
@@ -434,7 +434,7 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries)
if(pBlock)
pGroup->sTitle = pBlock->GetName();
- for(USHORT j = 0; j < pGroup->nCount; j++)
+ for(sal_uInt16 j = 0; j < pGroup->nCount; j++)
{
pGroup->sLongNames += pBlock->GetLongName(j);
pGroup->sLongNames += STRING_DELIM;
@@ -449,19 +449,19 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries)
passendem Anfang zurueckgeben
********************************************************************/
-BOOL SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* pLongNames )
+sal_Bool SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* pLongNames )
{
if(!bFilled)
Update();
- USHORT nFound = 0;
- USHORT nCount = aGroupArr.Count();
- USHORT nBeginLen = rBegin.Len();
+ sal_uInt16 nFound = 0;
+ sal_uInt16 nCount = aGroupArr.Count();
+ sal_uInt16 nBeginLen = rBegin.Len();
const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore();
- for(USHORT i = 0; i < nCount; i++ )
+ for(sal_uInt16 i = 0; i < nCount; i++ )
{
AutoTextGroup* pGroup = aGroupArr.GetObject(i);
- for(USHORT j = 0; j < pGroup->nCount; j++)
+ for(sal_uInt16 j = 0; j < pGroup->nCount; j++)
{
String sBlock = pGroup->sLongNames.GetToken(j, STRING_DELIM);
if( rSCmp.isEqual( sBlock.Copy(0, nBeginLen), rBegin ) &&
@@ -483,12 +483,12 @@ BOOL SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* pLong
********************************************************************/
void SwGlossaryList::ClearGroups()
{
- USHORT nCount = aGroupArr.Count();
- for( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = aGroupArr.Count();
+ for( sal_uInt16 i = 0; i < nCount; ++i )
delete aGroupArr.GetObject( i );
aGroupArr.Remove( 0, nCount );
- bFilled = FALSE;
+ bFilled = sal_False;
}
diff --git a/sw/source/ui/utlui/gloslst.src b/sw/source/ui/utlui/gloslst.src
index 78f96e85e741..d4140fc64d80 100644
--- a/sw/source/ui/utlui/gloslst.src
+++ b/sw/source/ui/utlui/gloslst.src
@@ -68,6 +68,7 @@ ModalDialog DLG_GLOSSARY_DECIDE_DLG
};
ListBox LB_LIST
{
+ HelpID = "sw:ListBox:DLG_GLOSSARY_DECIDE_DLG:LB_LIST";
Pos = MAP_APPFONT ( 12 , 15 ) ;
Size = MAP_APPFONT ( 81 , 40 ) ;
TabStop = TRUE ;
diff --git a/sw/source/ui/utlui/initui.cxx b/sw/source/ui/utlui/initui.cxx
index 30cc96423d59..8e8a833c66d0 100644
--- a/sw/source/ui/utlui/initui.cxx
+++ b/sw/source/ui/utlui/initui.cxx
@@ -174,7 +174,7 @@ ShellResource::ShellResource()
sPageDescFollowName( SW_RES(STR_PAGEDESC_FOLLOWNAME)),
sPageDescName( SW_RES(STR_PAGEDESC_NAME))
{
- const USHORT nCount = FLD_DOCINFO_END - FLD_DOCINFO_BEGIN;
+ const sal_uInt16 nCount = FLD_DOCINFO_END - FLD_DOCINFO_BEGIN;
KeyCode aCode( KEY_SPACE );
KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 );
@@ -183,7 +183,7 @@ ShellResource::ShellResource()
aModStr.SearchAndReplaceAllAscii( "+", String() );
aHyperlinkClick.SearchAndReplaceAllAscii( "%s", aModStr );
- for(USHORT i = 0; i < nCount; ++i)
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
String* pNew = new SW_RESSTR(FLD_DOCINFO_BEGIN + i);
aDocInfoLst.Insert(pNew, aDocInfoLst.Count());
@@ -198,7 +198,7 @@ ShellResource::~ShellResource()
delete pAutoFmtNameLst, pAutoFmtNameLst = 0;
}
-String ShellResource::GetPageDescName( USHORT nNo, PageNameMode eMode )
+String ShellResource::GetPageDescName( sal_uInt16 nNo, PageNameMode eMode )
{
String sRet;
@@ -228,7 +228,7 @@ SwGlossaries* GetGlossaries()
return (pGlossaries);
}
-BOOL HasGlossaryList()
+sal_Bool HasGlossaryList()
{
return pGlossaryList != 0;
}
@@ -256,7 +256,7 @@ void ShellResource::_GetAutoFmtNameLst() const
ImpAutoFmtNameListLoader::ImpAutoFmtNameListLoader( SvStringsDtor& rLst )
: Resource( ResId(RID_SHELLRES_AUTOFMTSTRS, *pSwResMgr) )
{
- for( USHORT n = 0; n < STR_AUTOFMTREDL_END; ++n )
+ for( sal_uInt16 n = 0; n < STR_AUTOFMTREDL_END; ++n )
{
String* p = new String( ResId( n + 1, *pSwResMgr) );
if(STR_AUTOFMTREDL_TYPO == n)
@@ -283,13 +283,13 @@ const String& SwAuthorityFieldType::GetAuthFieldName(ToxAuthorityField eType)
if(!pAuthFieldNameList)
{
pAuthFieldNameList = new SvStringsDtor(AUTH_FIELD_END, 1);
- for(USHORT i = 0; i < AUTH_FIELD_END; i++)
+ for(sal_uInt16 i = 0; i < AUTH_FIELD_END; i++)
{
String* pTmp = new String(SW_RES(STR_AUTH_FIELD_START + i));
pAuthFieldNameList->Insert(pTmp, pAuthFieldNameList->Count());
}
}
- return *pAuthFieldNameList->GetObject( static_cast< USHORT >(eType) );
+ return *pAuthFieldNameList->GetObject( static_cast< sal_uInt16 >(eType) );
}
const String& SwAuthorityFieldType::GetAuthTypeName(ToxAuthorityType eType)
@@ -297,12 +297,12 @@ const String& SwAuthorityFieldType::GetAuthTypeName(ToxAuthorityType eType)
if(!pAuthFieldTypeList)
{
pAuthFieldTypeList = new SvStringsDtor(AUTH_TYPE_END, 1);
- for(USHORT i = 0; i < AUTH_TYPE_END; i++)
+ for(sal_uInt16 i = 0; i < AUTH_TYPE_END; i++)
pAuthFieldTypeList->Insert(
new String(SW_RES(STR_AUTH_TYPE_START + i)),
pAuthFieldTypeList->Count());
}
- return *pAuthFieldTypeList->GetObject( static_cast< USHORT >(eType) );
+ return *pAuthFieldTypeList->GetObject( static_cast< sal_uInt16 >(eType) );
}
diff --git a/sw/source/ui/utlui/makefile.mk b/sw/source/ui/utlui/makefile.mk
deleted file mode 100644
index 75d83767029a..000000000000
--- a/sw/source/ui/utlui/makefile.mk
+++ /dev/null
@@ -1,79 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=utlui
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- initui.src \
- gloslst.src \
- navipi.src \
- poolfmt.src \
- attrdesc.src \
- unotools.src \
- utlui.src
-
-EXCEPTIONSFILES= \
- $(SLO)$/attrdesc.obj \
- $(SLO)$/bookctrl.obj \
- $(SLO)$/condedit.obj \
- $(SLO)$/content.obj \
- $(SLO)$/glbltree.obj \
- $(SLO)$/gloslst.obj \
- $(SLO)$/initui.obj \
- $(SLO)$/navipi.obj \
- $(SLO)$/numfmtlb.obj \
- $(SLO)$/prcntfld.obj \
- $(SLO)$/shdwcrsr.obj \
- $(SLO)$/swrenamexnameddlg.obj \
- $(SLO)$/textcontrolcombo.obj \
- $(SLO)$/tmplctrl.obj \
- $(SLO)$/uitool.obj \
- $(SLO)$/unotools.obj \
- $(SLO)$/viewlayoutctrl.obj \
- $(SLO)$/zoomctrl.obj
-
-SLOFILES = $(EXCEPTIONSFILES) \
- $(SLO)$/navicfg.obj \
- $(SLO)$/uiitems.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/utlui/navicfg.cxx b/sw/source/ui/utlui/navicfg.cxx
index 3dc9320cb1a4..4f53ee64d5e2 100644
--- a/sw/source/ui/utlui/navicfg.cxx
+++ b/sw/source/ui/utlui/navicfg.cxx
@@ -72,8 +72,8 @@ SwNavigationConfig::SwNavigationConfig() :
nOutlineLevel(MAXLEVEL),
nRegionMode(REGION_MODE_NONE),
nActiveBlock(0),
- bIsSmall(FALSE),
- bIsGlobalActive(TRUE)
+ bIsSmall(sal_False),
+ bIsGlobalActive(sal_True)
{
Sequence<OUString> aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames);
diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx
index 8083052a25d7..20ef695485bc 100644
--- a/sw/source/ui/utlui/navipi.cxx
+++ b/sw/source/ui/utlui/navipi.cxx
@@ -63,6 +63,8 @@
#include <navipi.hrc>
#include <utlui.hrc>
+#include "access.hrc"
+
#include <unomid.h>
#define PAGE_CHANGE_TIMEOUT 1000 //Timeout fuer Seitenwechsel
@@ -92,7 +94,7 @@ SFX_IMPL_CHILDWINDOW_CONTEXT( SwNavigationChild, SID_NAVIGATOR, SwView )
void SwNavigationPI::CleanEntry( String& rEntry )
{
- USHORT i = rEntry.Len();
+ sal_uInt16 i = rEntry.Len();
if( i )
for( sal_Unicode* pStr = rEntry.GetBufferAccess(); i; --i, ++pStr )
if( *pStr == 10 || *pStr == 9 )
@@ -103,8 +105,8 @@ void SwNavigationPI::CleanEntry( String& rEntry )
mit und ohne Childs
------------------------------------------------------------------------*/
-void SwNavigationPI::MoveOutline(USHORT nSource, USHORT nTarget,
- BOOL bWithChilds)
+void SwNavigationPI::MoveOutline(sal_uInt16 nSource, sal_uInt16 nTarget,
+ sal_Bool bWithChilds)
{
SwView *pView = GetCreateView();
SwWrtShell &rSh = pView->GetWrtShell();
@@ -116,9 +118,9 @@ void SwNavigationPI::MoveOutline(USHORT nSource, USHORT nTarget,
short nMove = nTarget-nSource; //( nDir<0 ) ? 1 : 0 ;
rSh.GotoOutline(nSource);
if (bWithChilds)
- rSh.MakeOutlineSel(nSource, nSource, TRUE);
+ rSh.MakeOutlineSel(nSource, nSource, sal_True);
// Die selektierten Children zaehlen bei der Bewegung vorwaerts nicht mit
- USHORT nLastOutlinePos = rSh.GetOutlinePos(MAXLEVEL);
+ sal_uInt16 nLastOutlinePos = rSh.GetOutlinePos(MAXLEVEL);
if(bWithChilds && nMove > 1 &&
nLastOutlinePos < nTarget)
{
@@ -190,7 +192,7 @@ void SwNavigationPI::FillBox()
if(pContentWrtShell)
{
aContentTree.SetHiddenShell( pContentWrtShell );
- aContentTree.Display( FALSE );
+ aContentTree.Display( sal_False );
}
else
{
@@ -205,7 +207,7 @@ void SwNavigationPI::FillBox()
aContentTree.SetActiveShell(pWrtShell);
}
else
- aContentTree.Display( TRUE );
+ aContentTree.Display( sal_True );
pActContView = pView;
}
}
@@ -221,8 +223,8 @@ void SwNavigationPI::UsePage(SwWrtShell *pSh)
}
if (pSh)
{
- const USHORT nPageCnt = pSh->GetPageCnt();
- USHORT nPhyPage, nVirPage;
+ const sal_uInt16 nPageCnt = pSh->GetPageCnt();
+ sal_uInt16 nPhyPage, nVirPage;
pSh->GetPageNum(nPhyPage, nVirPage);
GetPageEdit().SetMax(nPageCnt);
@@ -238,7 +240,7 @@ void SwNavigationPI::UsePage(SwWrtShell *pSh)
IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
{
- const USHORT nCurrItemId = pBox->GetCurItemId();
+ const sal_uInt16 nCurrItemId = pBox->GetCurItemId();
SwView *pView = GetCreateView();
if (!pView)
return 1;
@@ -247,9 +249,9 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
//Standard: Unterebenen werden mitgenommen
// mit Ctrl Unterebenen nicht mitnehmen
- BOOL bOutlineWithChilds = ( KEY_MOD1 != pBox->GetModifier());
+ sal_Bool bOutlineWithChilds = ( KEY_MOD1 != pBox->GetModifier());
int nFuncId = 0;
- BOOL bFocusToDoc = FALSE;
+ sal_Bool bFocusToDoc = sal_False;
switch (nCurrItemId)
{
case FN_UP:
@@ -278,13 +280,13 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
_ZoomIn();
}
}
- return TRUE;
+ return sal_True;
// Funktionen, die eine direkte Aktion ausloesen
case FN_SELECT_FOOTER:
{
rSh.MoveCrsr();
- const USHORT eType = rSh.GetFrmType(0,FALSE);
+ const sal_uInt16 eType = rSh.GetFrmType(0,sal_False);
if (eType & FRMTYPE_FOOTER)
{
if (rSh.EndPg())
@@ -292,13 +294,13 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
}
else if (rSh.GotoFooterTxt())
nFuncId = FN_TO_FOOTER;
- bFocusToDoc = TRUE;
+ bFocusToDoc = sal_True;
}
break;
case FN_SELECT_HEADER:
{
rSh.MoveCrsr();
- const USHORT eType = rSh.GetFrmType(0,FALSE);
+ const sal_uInt16 eType = rSh.GetFrmType(0,sal_False);
if (eType & FRMTYPE_HEADER)
{
if (rSh.SttPg())
@@ -306,13 +308,13 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
}
else if (rSh.GotoHeaderTxt())
nFuncId = FN_TO_HEADER;
- bFocusToDoc = TRUE;
+ bFocusToDoc = sal_True;
}
break;
case FN_SELECT_FOOTNOTE:
{
rSh.MoveCrsr();
- const USHORT eFrmType = rSh.GetFrmType(0,FALSE);
+ const sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_False);
// aus Fussnote zum Anker springen
if (eFrmType & FRMTYPE_FOOTNOTE)
{
@@ -331,7 +333,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
else if (rSh.GotoPrevFtnAnchor())
nFuncId = FN_PREV_FOOTNOTE;
}
- bFocusToDoc = TRUE;
+ bFocusToDoc = sal_True;
}
break;
@@ -358,7 +360,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
break;
case FN_GLOBAL_SAVE_CONTENT:
{
- BOOL bSave = rSh.IsGlblDocSaveLinks();
+ sal_Bool bSave = rSh.IsGlblDocSaveLinks();
rSh.SetGlblDocSaveLinks( !bSave );
pBox->CheckItem(FN_GLOBAL_SAVE_CONTENT, !bSave );
}
@@ -371,7 +373,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
}
if(bFocusToDoc)
pView->GetEditWin().GrabFocus();
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
Beschreibung: ClickHandler der Toolboxen
@@ -380,7 +382,7 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelectHdl, ToolBox *, pBox )
IMPL_LINK( SwNavigationPI, ToolBoxClickHdl, ToolBox *, pBox )
{
- const USHORT nCurrItemId = pBox->GetCurItemId();
+ const sal_uInt16 nCurrItemId = pBox->GetCurItemId();
switch (nCurrItemId)
{
case FN_GLOBAL_UPDATE:
@@ -391,36 +393,41 @@ IMPL_LINK( SwNavigationPI, ToolBoxClickHdl, ToolBox *, pBox )
break;
}
- return TRUE;
+ return sal_True;
}
IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox )
{
- const USHORT nCurrItemId = pBox->GetCurItemId();
+ const sal_uInt16 nCurrItemId = pBox->GetCurItemId();
switch (nCurrItemId)
{
case FN_CREATE_NAVIGATION:
{
- CreateNavigationTool(pBox->GetItemRect(FN_CREATE_NAVIGATION), TRUE);
+ CreateNavigationTool(pBox->GetItemRect(FN_CREATE_NAVIGATION), sal_True);
}
break;
case FN_DROP_REGION:
{
+ static const char* aHIDs[] =
+ {
+ HID_NAVI_DRAG_HYP,
+ HID_NAVI_DRAG_LINK,
+ HID_NAVI_DRAG_COPY,
+ };
PopupMenu *pMenu = new PopupMenu;
- for (USHORT i = 0; i <= REGION_MODE_EMBEDDED; i++)
+ for (sal_uInt16 i = 0; i <= REGION_MODE_EMBEDDED; i++)
{
pMenu->InsertItem( i + 1, aContextArr[i] );
- pMenu->SetHelpId(i + 1, HID_NAVI_DRAG_HYP + i);
-
+ pMenu->SetHelpId(i + 1, aHIDs[i]);
}
pMenu->CheckItem( nRegionMode + 1 );
pMenu->SetSelectHdl(LINK(this, SwNavigationPI, MenuSelectHdl));
- pBox->SetItemDown( nCurrItemId, TRUE );
+ pBox->SetItemDown( nCurrItemId, sal_True );
pMenu->Execute( pBox,
pBox->GetItemRect(FN_DROP_REGION),
POPUPMENU_EXECUTE_DOWN );
- pBox->SetItemDown( nCurrItemId, FALSE );
+ pBox->SetItemDown( nCurrItemId, sal_False );
pBox->EndSelection();
delete pMenu;
pBox->Invalidate();
@@ -429,25 +436,25 @@ IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox )
case FN_OUTLINE_LEVEL:
{
PopupMenu *pMenu = new PopupMenu;
- for (USHORT i = 101; i <= 100 + MAXLEVEL; i++)
+ for (sal_uInt16 i = 101; i <= 100 + MAXLEVEL; i++)
{
pMenu->InsertItem( i, String::CreateFromInt32(i - 100) );
pMenu->SetHelpId( i, HID_NAVI_OUTLINES );
}
pMenu->CheckItem( aContentTree.GetOutlineLevel() + 100 );
pMenu->SetSelectHdl(LINK(this, SwNavigationPI, MenuSelectHdl));
- pBox->SetItemDown( nCurrItemId, TRUE );
+ pBox->SetItemDown( nCurrItemId, sal_True );
pMenu->Execute( pBox,
pBox->GetItemRect(FN_OUTLINE_LEVEL),
POPUPMENU_EXECUTE_DOWN );
- pBox->SetItemDown( nCurrItemId, FALSE );
+ pBox->SetItemDown( nCurrItemId, sal_False );
delete pMenu;
pBox->EndSelection();
pBox->Invalidate();
}
break;
}
- return TRUE;
+ return sal_True;
}
@@ -460,13 +467,13 @@ void SwNavHelpToolBox::MouseButtonDown(const MouseEvent &rEvt)
if(rEvt.GetButtons() == MOUSE_LEFT &&
FN_CREATE_NAVIGATION == GetItemId(rEvt.GetPosPixel()))
{
- ((SwNavigationPI*)GetParent())->CreateNavigationTool(GetItemRect(FN_CREATE_NAVIGATION), FALSE);
+ ((SwNavigationPI*)GetParent())->CreateNavigationTool(GetItemRect(FN_CREATE_NAVIGATION), sal_False);
}
else
SwHelpToolBox::MouseButtonDown(rEvt);
}
-void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, BOOL bSetFocus)
+void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, sal_Bool bSetFocus)
{
Reference< XFrame > xFrame = GetCreateView()->GetViewFrame()->GetFrame().GetFrameInterface();
SwScrollNaviPopup* pPopup = new
@@ -488,7 +495,7 @@ void SwNavigationPI::CreateNavigationTool(const Rectangle& rRect, BOOL bSetFocus
void SwNavHelpToolBox::RequestHelp( const HelpEvent& rHEvt )
{
- USHORT nItemId = GetItemId(ScreenToOutputPixel(rHEvt.GetMousePosPixel()));
+ sal_uInt16 nItemId = GetItemId(ScreenToOutputPixel(rHEvt.GetMousePosPixel()));
if( FN_UP == nItemId || FN_DOWN == nItemId )
{
SetItemText(nItemId, SwScrollNaviPopup::GetQuickHelpText((FN_DOWN == nItemId)));
@@ -509,7 +516,7 @@ IMPL_LINK( SwNavigationPI, EditAction, NumEditAction *, pEdit )
{
if(aPageChgTimer.IsActive())
aPageChgTimer.Stop();
- pCreateView->GetWrtShell().GotoPage((USHORT)pEdit->GetValue(), TRUE);
+ pCreateView->GetWrtShell().GotoPage((sal_uInt16)pEdit->GetValue(), sal_True);
pCreateView->GetEditWin().GrabFocus();
pCreateView->GetViewFrame()->GetBindings().Invalidate(FN_STAT_PAGE);
}
@@ -529,18 +536,18 @@ IMPL_LINK( SwNavigationPI, EditGetFocus, NumEditAction *, pEdit )
return 0;
SwWrtShell &rSh = pView->GetWrtShell();
- const USHORT nPageCnt = rSh.GetPageCnt();
+ const sal_uInt16 nPageCnt = rSh.GetPageCnt();
pEdit->SetMax(nPageCnt);
pEdit->SetLast(nPageCnt);
return 0;
}
-BOOL SwNavigationPI::Close()
+sal_Bool SwNavigationPI::Close()
{
SfxViewFrame* pVFrame = pCreateView->GetViewFrame();
pVFrame->GetBindings().Invalidate(SID_NAVIGATOR);
pVFrame->GetDispatcher()->Execute(SID_NAVIGATOR);
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
@@ -592,7 +599,7 @@ void SwNavigationPI::_ZoomOut()
if (_IsZoomedIn())
{
FloatingWindow* pFloat = pContextWin->GetFloatingWindow();
- bIsZoomedIn = FALSE;
+ bIsZoomedIn = sal_False;
Size aSz(GetOutputSizePixel());
aSz.Height() = nZoomOut;
Size aMinOutSizePixel = ((SfxDockingWindow*)GetParent())->GetMinOutputSizePixel();
@@ -611,8 +618,8 @@ void SwNavigationPI::_ZoomOut()
}
SvLBoxEntry* pFirst = aContentTree.FirstSelected();
if(pFirst)
- aContentTree.Select(pFirst, TRUE); // toolbox enablen
- pConfig->SetSmall( FALSE );
+ aContentTree.Select(pFirst, sal_True); // toolbox enablen
+ pConfig->SetSmall( sal_False );
aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX);
}
}
@@ -626,7 +633,7 @@ void SwNavigationPI::_ZoomIn()
aContentTree.HideTree();
aDocListBox.Hide();
aGlobalTree.HideTree();
- bIsZoomedIn = TRUE;
+ bIsZoomedIn = sal_True;
Size aSz(GetOutputSizePixel());
if( aSz.Height() > nZoomIn )
nZoomOut = ( short ) aSz.Height();
@@ -638,9 +645,9 @@ void SwNavigationPI::_ZoomIn()
pFloat->SetOutputSizePixel(aSz);
SvLBoxEntry* pFirst = aContentTree.FirstSelected();
if(pFirst)
- aContentTree.Select(pFirst, TRUE); // toolbox enablen
- pConfig->SetSmall( TRUE );
- aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, FALSE);
+ aContentTree.Select(pFirst, sal_True); // toolbox enablen
+ pConfig->SetSmall( sal_True );
+ aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, sal_False);
}
}
@@ -723,10 +730,10 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
nAutoMarkIdx(1),
nRegionMode(REGION_MODE_NONE),
- bSmallMode(FALSE),
- bIsZoomedIn(FALSE),
- bPageCtrlsVisible(FALSE),
- bGlobalMode(FALSE)
+ bSmallMode(sal_False),
+ bIsZoomedIn(sal_False),
+ bPageCtrlsVisible(sal_False),
+ bGlobalMode(sal_False)
{
GetCreateView();
InitImageList();
@@ -744,14 +751,14 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
pEdit->SetActionHdl(LINK(this, SwNavigationPI, EditAction));
pEdit->SetGetFocusHdl(LINK(this, SwNavigationPI, EditGetFocus));
pEdit->SetModifyHdl(LINK(this, SwNavigationPI, PageEditModifyHdl));
-
- bPageCtrlsVisible = TRUE;
+ pEdit->SetAccessibleName(pEdit->GetQuickHelpText());
+ bPageCtrlsVisible = sal_True;
//doppelte Separatoren sind nicht erlaubt, also muss
//die passende Groesse anders ermittelt werden
Rectangle aFirstRect = aContentToolBox.GetItemRect(FN_SELECT_FOOTNOTE);
Rectangle aSecondRect = aContentToolBox.GetItemRect(FN_SELECT_HEADER);
- USHORT nWidth = USHORT(aFirstRect.Left() - aSecondRect.Left());
+ sal_uInt16 nWidth = sal_uInt16(aFirstRect.Left() - aSecondRect.Left());
Size aItemWinSize( nWidth , aFirstRect.Bottom() - aFirstRect.Top() );
pEdit->SetSizePixel(aItemWinSize);
@@ -761,7 +768,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
aContentToolBox.SetHelpId(FN_PAGENUMBER, HID_NAVI_TBX16);
aContentToolBox.ShowItem( FN_PAGENUMBER );
- for( USHORT i = 0; i <= REGION_MODE_EMBEDDED; i++ )
+ for( sal_uInt16 i = 0; i <= REGION_MODE_EMBEDDED; i++ )
{
aContextArr[i] = SW_RESSTR(ST_HYPERLINK + i);
aStatusArr[i] = SW_RESSTR(ST_STATUS_FIRST + i);
@@ -802,21 +809,21 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
((SfxDockingWindow*)pParent)->SetOutputSizePixel(aMinSize);
aContentTree.SetPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y );
- aContentTree.SetWindowBits( WB_HASBUTTONS|WB_HASBUTTONSATROOT|
+ aContentTree.SetStyle( aContentTree.GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT|
WB_CLIPCHILDREN|WB_HSCROLL|WB_FORCE_MAKEVISIBLE );
aContentTree.SetSpaceBetweenEntries(3);
aContentTree.SetSelectionMode( SINGLE_SELECTION );
aContentTree.SetDragDropMode( SV_DRAGDROP_CTRL_MOVE |
SV_DRAGDROP_CTRL_COPY |
SV_DRAGDROP_ENABLE_TOP );
- aContentTree.EnableAsyncDrag(TRUE);
+ aContentTree.EnableAsyncDrag(sal_True);
aContentTree.ShowTree();
- aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, TRUE);
+ aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, sal_True);
// TreeListBox fuer Globaldokument
aGlobalTree.SetPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y );
aGlobalTree.SetSelectionMode( MULTIPLE_SELECTION );
- aGlobalTree.SetWindowBits( WB_HASBUTTONS|WB_HASBUTTONSATROOT|
+ aGlobalTree.SetStyle( aGlobalTree.GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT|
WB_CLIPCHILDREN|WB_HSCROLL );
Size aGlblSize(aGlobalToolBox.CalcWindowSizePixel());
aGlobalToolBox.SetSizePixel(aGlblSize);
@@ -832,7 +839,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
aContentToolBox.SetDropdownClickHdl( LINK(this, SwNavigationPI, ToolBoxDropdownClickHdl) );
aGlobalToolBox.SetClickHdl( LINK(this, SwNavigationPI, ToolBoxClickHdl) );
aGlobalToolBox.SetDropdownClickHdl( LINK(this, SwNavigationPI, ToolBoxDropdownClickHdl) );
- aGlobalToolBox.CheckItem(FN_GLOBAL_SWITCH, TRUE);
+ aGlobalToolBox.CheckItem(FN_GLOBAL_SWITCH, sal_True);
Font aFont(GetFont());
aFont.SetWeight(WEIGHT_NORMAL);
@@ -867,6 +874,10 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
UsePage(0);
aPageChgTimer.SetTimeoutHdl(LINK(this, SwNavigationPI, ChangePageHdl));
aPageChgTimer.SetTimeout(PAGE_CHANGE_TIMEOUT);
+
+ aContentTree.SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_CONTENT));
+ aGlobalTree.SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_GLOBAL));
+ aDocListBox.SetAccessibleName(aStatusArr[3]);
}
SwNavigationPI::~SwNavigationPI()
@@ -876,7 +887,7 @@ SwNavigationPI::~SwNavigationPI()
SwView *pView = GetCreateView();
SwWrtShell &rSh = pView->GetWrtShell();
if( !rSh.IsAllProtect() )
- pView->GetDocShell()->SetReadOnlyUI(FALSE);
+ pView->GetDocShell()->SetReadOnlyUI(sal_False);
}
EndListening(*SFX_APP());
@@ -936,7 +947,7 @@ IMPL_LINK( SwNavigationPI, ClosePopupWindow, SfxPopupWindow *, pWindow )
return 1;
}
-void SwNavigationPI::StateChanged( USHORT nSID, SfxItemState /*eState*/,
+void SwNavigationPI::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/,
const SfxPoolItem* /*pState*/ )
{
if(nSID == SID_DOCFULLNAME)
@@ -946,7 +957,7 @@ void SwNavigationPI::StateChanged( USHORT nSID, SfxItemState /*eState*/,
{
SwWrtShell* pWrtShell = pActView->GetWrtShellPtr();
aContentTree.SetActiveShell(pWrtShell);
- BOOL bGlobal = IsGlobalDoc();
+ sal_Bool bGlobal = IsGlobalDoc();
aContentToolBox.EnableItem(FN_GLOBAL_SWITCH, bGlobal);
if( (!bGlobal && IsGlobalMode()) ||
(!IsGlobalMode() && pConfig->IsGlobalActive()) )
@@ -1046,7 +1057,7 @@ void SwNavigationPI::Notify( SfxBroadcaster& rBrdc, const SfxHint& rHint )
aContentTree.SetActiveShell(pWrtShell);
if(aGlobalTree.IsVisible())
{
- if(aGlobalTree.Update( FALSE ))
+ if(aGlobalTree.Update( sal_False ))
aGlobalTree.Display();
else
// wenn kein Update notwendig, dann zumindest painten
@@ -1061,27 +1072,27 @@ void SwNavigationPI::Notify( SfxBroadcaster& rBrdc, const SfxHint& rHint )
IMPL_LINK( SwNavigationPI, MenuSelectHdl, Menu *, pMenu )
{
- USHORT nMenuId = pMenu->GetCurItemId();
+ sal_uInt16 nMenuId = pMenu->GetCurItemId();
if(nMenuId != USHRT_MAX)
{
if(nMenuId < 100)
SetRegionDropMode( --nMenuId);
else
- aContentTree.SetOutlineLevel( static_cast< BYTE >(nMenuId - 100) );
+ aContentTree.SetOutlineLevel( static_cast< sal_uInt8 >(nMenuId - 100) );
}
return 0;
}
void SwNavigationPI::UpdateListBox()
{
- aDocListBox.SetUpdateMode(FALSE);
+ aDocListBox.SetUpdateMode(sal_False);
aDocListBox.Clear();
SwView *pActView = GetCreateView();
- BOOL bDisable = pActView == 0;
+ sal_Bool bDisable = pActView == 0;
SwView *pView = SwModule::GetFirstView();
- USHORT nCount = 0;
- USHORT nAct = 0;
- USHORT nConstPos = 0;
+ sal_uInt16 nCount = 0;
+ sal_uInt16 nAct = 0;
+ sal_uInt16 nConstPos = 0;
const SwView* pConstView = aContentTree.IsConstantView() &&
aContentTree.GetActiveWrtShell() ?
&aContentTree.GetActiveWrtShell()->GetView():
@@ -1123,12 +1134,12 @@ void SwNavigationPI::UpdateListBox()
sEntry += aStatusArr[ST_HIDDEN - ST_STATUS_FIRST];
sEntry += ')';
aDocListBox.InsertEntry(sEntry);
- bDisable = FALSE;
+ bDisable = sal_False;
}
if(aContentTree.IsActiveView())
{
//entweder den Namen des akt. Docs oder "Aktives Dokument"
- USHORT nTmp = pActView ? nAct : --nCount;
+ sal_uInt16 nTmp = pActView ? nAct : --nCount;
aDocListBox.SelectEntryPos( nTmp );
}
else if(aContentTree.IsHiddenView())
@@ -1139,7 +1150,7 @@ void SwNavigationPI::UpdateListBox()
aDocListBox.SelectEntryPos(nConstPos);
aDocListBox.Enable( !bDisable );
- aDocListBox.SetUpdateMode(TRUE);
+ aDocListBox.SetUpdateMode(sal_True);
}
IMPL_LINK(SwNavigationPI, DoneLink, SfxPoolItem *, pItem)
@@ -1168,7 +1179,7 @@ IMPL_LINK(SwNavigationPI, DoneLink, SfxPoolItem *, pItem)
String SwNavigationPI::CreateDropFileName( TransferableDataHelper& rData )
{
String sFileName;
- ULONG nFmt;
+ sal_uLong nFmt;
if( rData.HasFormat( nFmt = FORMAT_FILE_LIST ))
{
FileList aFileList;
@@ -1249,12 +1260,12 @@ sal_Int8 SwNavigationPI::ExecuteDrop( const ExecuteDropEvent& rEvt )
return nRet;
}
-void SwNavigationPI::SetRegionDropMode(USHORT nNewMode)
+void SwNavigationPI::SetRegionDropMode(sal_uInt16 nNewMode)
{
nRegionMode = nNewMode;
pConfig->SetRegionMode( nRegionMode );
- USHORT nDropId = FN_DROP_REGION;
+ sal_uInt16 nDropId = FN_DROP_REGION;
if(nRegionMode == REGION_MODE_LINK)
nDropId = FN_DROP_REGION_LINK;
else if(nRegionMode == REGION_MODE_EMBEDDED)
@@ -1266,13 +1277,13 @@ void SwNavigationPI::SetRegionDropMode(USHORT nNewMode)
}
-BOOL SwNavigationPI::ToggleTree()
+sal_Bool SwNavigationPI::ToggleTree()
{
- BOOL bRet = TRUE;
- BOOL bGlobalDoc = IsGlobalDoc();
+ sal_Bool bRet = sal_True;
+ sal_Bool bGlobalDoc = IsGlobalDoc();
if(!IsGlobalMode() && bGlobalDoc)
{
- SetUpdateMode(FALSE);
+ SetUpdateMode(sal_False);
if(_IsZoomedIn())
_ZoomOut();
aGlobalTree.ShowTree();
@@ -1280,8 +1291,8 @@ BOOL SwNavigationPI::ToggleTree()
aContentTree.HideTree();
aContentToolBox.Hide();
aDocListBox.Hide();
- SetGlobalMode(TRUE);
- SetUpdateMode(TRUE);
+ SetGlobalMode(sal_True);
+ SetUpdateMode(sal_True);
}
else
{
@@ -1293,15 +1304,15 @@ BOOL SwNavigationPI::ToggleTree()
aContentToolBox.Show();
aDocListBox.Show();
}
- bRet = FALSE;
- SetGlobalMode(FALSE);
+ bRet = sal_False;
+ SetGlobalMode(sal_False);
}
return bRet;
}
-BOOL SwNavigationPI::IsGlobalDoc() const
+sal_Bool SwNavigationPI::IsGlobalDoc() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwView *pView = GetCreateView();
if(pView)
{
@@ -1346,7 +1357,7 @@ SwView* SwNavigationPI::GetCreateView() const
}
SwNavigationChild::SwNavigationChild( Window* pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* _pBindings,
SfxChildWinInfo* pInfo )
: SfxChildWindowContext( nId )
@@ -1358,14 +1369,14 @@ SwNavigationChild::SwNavigationChild( Window* pParent,
SwNavigationConfig* pNaviConfig = SW_MOD()->GetNavigationConfig();
- USHORT nRootType = static_cast< USHORT >( pNaviConfig->GetRootType() );
+ sal_uInt16 nRootType = static_cast< sal_uInt16 >( pNaviConfig->GetRootType() );
if( nRootType < CONTENT_TYPE_MAX )
{
pNavi->aContentTree.SetRootType(nRootType);
- pNavi->aContentToolBox.CheckItem(FN_SHOW_ROOT, TRUE);
+ pNavi->aContentToolBox.CheckItem(FN_SHOW_ROOT, sal_True);
}
- pNavi->aContentTree.SetOutlineLevel( static_cast< BYTE >( pNaviConfig->GetOutlineLevel() ) );
- pNavi->SetRegionDropMode( static_cast< USHORT >( pNaviConfig->GetRegionMode() ) );
+ pNavi->aContentTree.SetOutlineLevel( static_cast< sal_uInt8 >( pNaviConfig->GetOutlineLevel() ) );
+ pNavi->SetRegionDropMode( static_cast< sal_uInt16 >( pNaviConfig->GetRegionMode() ) );
if(GetFloatingWindow() && pNaviConfig->IsSmall())
{
@@ -1389,7 +1400,7 @@ void SwNavigationPI::DataChanged( const DataChangedEvent& rDCEvt )
void SwNavigationPI::InitImageList()
{
- USHORT k;
+ sal_uInt16 k;
ImageList& rImgLst = aContentImageList;
for( k = 0; k < aContentToolBox.GetItemCount(); k++)
@@ -1400,7 +1411,7 @@ void SwNavigationPI::InitImageList()
aGlobalToolBox.SetItemImage(aGlobalToolBox.GetItemId(k),
rImgLst.GetImage(aGlobalToolBox.GetItemId(k)));
- USHORT nDropId = FN_DROP_REGION;
+ sal_uInt16 nDropId = FN_DROP_REGION;
if(nRegionMode == REGION_MODE_LINK)
nDropId = FN_DROP_REGION_LINK;
else if(nRegionMode == REGION_MODE_EMBEDDED)
diff --git a/sw/source/ui/utlui/navipi.hrc b/sw/source/ui/utlui/navipi.hrc
index f669387d8161..bba57cf53d6b 100644
--- a/sw/source/ui/utlui/navipi.hrc
+++ b/sw/source/ui/utlui/navipi.hrc
@@ -87,4 +87,3 @@
#define ST_POSTIT_SHOW (ST_GLOBAL_CONTEXT_FIRST +35)
#define ST_POSTIT_HIDE (ST_GLOBAL_CONTEXT_FIRST +36)
#define ST_POSTIT_DELETE (ST_GLOBAL_CONTEXT_FIRST +37)
-
diff --git a/sw/source/ui/utlui/navipi.src b/sw/source/ui/utlui/navipi.src
index cd190f9bb1a7..df11c6aee86a 100644
--- a/sw/source/ui/utlui/navipi.src
+++ b/sw/source/ui/utlui/navipi.src
@@ -29,6 +29,7 @@
#include "utlui.hrc"
#include "navipi.hrc"
#include "helpid.h"
+#include "access.hrc"
Window DLG_NAVIGATION_PI
{
@@ -503,3 +504,15 @@ ImageList IMG_NAVI_ENTRYBMP
MaskColor = IMAGE_MASK_COLOR ;
NAVI_ENTRY_IDS
};
+
+
+//IAccessibility2 Implementation 2009-----
+String STR_ACCESS_TL_GLOBAL
+{
+ Text [ en-US ] = "Global View";
+};
+String STR_ACCESS_TL_CONTENT
+{
+ Text [ en-US ] = "Content View";
+};
+//-----IAccessibility2 Implementation 2009
diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx
index b403de8d0f10..bcaa7e032894 100644
--- a/sw/source/ui/utlui/numfmtlb.cxx
+++ b/sw/source/ui/utlui/numfmtlb.cxx
@@ -72,38 +72,38 @@ using namespace ::com::sun::star::lang;
--------------------------------------------------------------------*/
NumFormatListBox::NumFormatListBox( Window* pWin, const ResId& rResId,
- short nFormatType, ULONG nDefFmt,
- BOOL bUsrFmts ) :
+ short nFormatType, sal_uLong nDefFmt,
+ sal_Bool bUsrFmts ) :
ListBox ( pWin, rResId ),
nCurrFormatType (-1),
nStdEntry (0),
- bOneArea (FALSE),
+ bOneArea (sal_False),
nDefFormat (nDefFmt),
pVw (0),
pOwnFormatter (0),
- bShowLanguageControl(FALSE),
- bUseAutomaticLanguage(TRUE)
+ bShowLanguageControl(sal_False),
+ bUseAutomaticLanguage(sal_True)
{
Init(nFormatType, bUsrFmts);
}
NumFormatListBox::NumFormatListBox( Window* pWin, SwView* pView,
const ResId& rResId, short nFormatType,
- ULONG nDefFmt, BOOL bUsrFmts ) :
+ sal_uLong nDefFmt, sal_Bool bUsrFmts ) :
ListBox ( pWin, rResId ),
nCurrFormatType (-1),
nStdEntry (0),
- bOneArea (FALSE),
+ bOneArea (sal_False),
nDefFormat (nDefFmt),
pVw (pView),
pOwnFormatter (0),
- bShowLanguageControl(FALSE),
- bUseAutomaticLanguage(TRUE)
+ bShowLanguageControl(sal_False),
+ bUseAutomaticLanguage(sal_True)
{
Init(nFormatType, bUsrFmts);
}
-void NumFormatListBox::Init(short nFormatType, BOOL bUsrFmts)
+void NumFormatListBox::Init(short nFormatType, sal_Bool bUsrFmts)
{
SwView *pView = GetView();
@@ -112,7 +112,7 @@ void NumFormatListBox::Init(short nFormatType, BOOL bUsrFmts)
else
eCurLanguage = SvxLocaleToLanguage( SvtSysLocale().GetLocaleData().getLocale() );
- if (bUsrFmts == FALSE)
+ if (bUsrFmts == sal_False)
{
Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
pOwnFormatter = new SvNumberFormatter(xMSF, eCurLanguage);
@@ -224,17 +224,17 @@ void NumFormatListBox::SetFormatType(const short nFormatType)
}
const SvNumberformat* pFmt;
- USHORT nPos, i = 0;
- ULONG nFormat;
+ sal_uInt16 nPos, i = 0;
+ sal_uLong nFormat;
Color* pCol;
double fVal = GetDefValue( nFormatType );
String sValue;
- ULONG nSysNumFmt = pFormatter->GetFormatIndex(
+ sal_uLong nSysNumFmt = pFormatter->GetFormatIndex(
NF_NUMBER_SYSTEM, eCurLanguage );
- ULONG nSysShortDateFmt = pFormatter->GetFormatIndex(
+ sal_uLong nSysShortDateFmt = pFormatter->GetFormatIndex(
NF_DATE_SYSTEM_SHORT, eCurLanguage );
- ULONG nSysLongDateFmt = pFormatter->GetFormatIndex(
+ sal_uLong nSysLongDateFmt = pFormatter->GetFormatIndex(
NF_DATE_SYSTEM_LONG, eCurLanguage );
for( long nIndex = eOffsetStart; nIndex <= eOffsetEnd; ++nIndex )
@@ -280,7 +280,7 @@ void NumFormatListBox::SetFormatType(const short nFormatType)
}
}
-void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
+void NumFormatListBox::SetDefFormat(const sal_uLong nDefFmt)
{
if (nDefFmt == ULONG_MAX)
{
@@ -305,11 +305,11 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
SetFormatType(nType);
- ULONG nFormat = pFormatter->GetFormatForLanguageIfBuiltIn(nDefFmt, eCurLanguage);
+ sal_uLong nFormat = pFormatter->GetFormatForLanguageIfBuiltIn(nDefFmt, eCurLanguage);
- for (USHORT i = 0; i < GetEntryCount(); i++)
+ for (sal_uInt16 i = 0; i < GetEntryCount(); i++)
{
- if (nFormat == (ULONG)GetEntryData(i))
+ if (nFormat == (sal_uLong)GetEntryData(i))
{
SelectEntryPos(i);
nStdEntry = i;
@@ -331,19 +331,19 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
else
pFormatter->GetOutputString(fValue, nDefFmt, sValue, &pCol);
- USHORT nPos = 0;
- while ((ULONG)GetEntryData(nPos) == ULONG_MAX)
+ sal_uInt16 nPos = 0;
+ while ((sal_uLong)GetEntryData(nPos) == ULONG_MAX)
nPos++;
- ULONG nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage);
- ULONG nSysShortDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eCurLanguage);
- ULONG nSysLongDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eCurLanguage);
- BOOL bSysLang = FALSE;
+ sal_uLong nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage);
+ sal_uLong nSysShortDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eCurLanguage);
+ sal_uLong nSysLongDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eCurLanguage);
+ sal_Bool bSysLang = sal_False;
if( eCurLanguage == GetAppLanguage() )
- bSysLang = TRUE;
- ULONG nNumFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysNumFmt, LANGUAGE_SYSTEM );
- ULONG nShortDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysShortDateFmt, LANGUAGE_SYSTEM );
- ULONG nLongDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysLongDateFmt, LANGUAGE_SYSTEM );
+ bSysLang = sal_True;
+ sal_uLong nNumFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysNumFmt, LANGUAGE_SYSTEM );
+ sal_uLong nShortDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysShortDateFmt, LANGUAGE_SYSTEM );
+ sal_uLong nLongDateFormatForLanguage = pFormatter->GetFormatForLanguageIfBuiltIn(nSysLongDateFmt, LANGUAGE_SYSTEM );
if (
nDefFmt == nSysNumFmt ||
@@ -368,16 +368,16 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
nDefFormat = GetFormat();
}
-ULONG NumFormatListBox::GetFormat() const
+sal_uLong NumFormatListBox::GetFormat() const
{
- USHORT nPos = GetSelectEntryPos();
+ sal_uInt16 nPos = GetSelectEntryPos();
- return (ULONG)GetEntryData(nPos);
+ return (sal_uLong)GetEntryData(nPos);
}
IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
{
- USHORT nPos = pBox->GetSelectEntryPos();
+ sal_uInt16 nPos = pBox->GetSelectEntryPos();
String sDefine(SW_RES( STR_DEFINE_NUMBERFORMAT ));
SwView *pView = GetView();
@@ -397,7 +397,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
double fValue = GetDefValue( nCurrFormatType);
- ULONG nFormat = pFormatter->GetStandardFormat( nCurrFormatType, eCurLanguage);
+ sal_uLong nFormat = pFormatter->GetStandardFormat( nCurrFormatType, eCurLanguage);
aCoreSet.Put( SfxUInt32Item( SID_ATTR_NUMBERFORMAT_VALUE, nFormat ));
aCoreSet.Put( SvxNumberInfoItem( pFormatter, fValue,
@@ -426,15 +426,15 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
{
const sal_uInt32* pDelArr = ((SvxNumberInfoItem*)pItem)->GetDelArray();
- for ( USHORT i = 0; i < ((SvxNumberInfoItem*)pItem)->GetDelCount(); i++ )
+ for ( sal_uInt16 i = 0; i < ((SvxNumberInfoItem*)pItem)->GetDelCount(); i++ )
pFormatter->DeleteEntry( pDelArr[i] );
}
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
if( SFX_ITEM_SET == pOutSet->GetItemState(
- SID_ATTR_NUMBERFORMAT_VALUE, FALSE, &pItem ))
+ SID_ATTR_NUMBERFORMAT_VALUE, sal_False, &pItem ))
{
- UINT32 nNumberFormat = ((SfxUInt32Item*)pItem)->GetValue();
+ sal_uInt32 nNumberFormat = ((SfxUInt32Item*)pItem)->GetValue();
// oj #105473# change order of calls
const SvNumberformat* pFmt = pFormatter->GetEntry(nNumberFormat);
if( pFmt )
@@ -443,7 +443,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
SetDefFormat(nNumberFormat);
}
if( bShowLanguageControl && SFX_ITEM_SET == pOutSet->GetItemState(
- SID_ATTR_NUMBERFORMAT_ADD_AUTO, FALSE, &pItem ))
+ SID_ATTR_NUMBERFORMAT_ADD_AUTO, sal_False, &pItem ))
{
bUseAutomaticLanguage = ((const SfxBoolItem*)pItem)->GetValue();
}
diff --git a/sw/source/ui/utlui/poolfmt.src b/sw/source/ui/utlui/poolfmt.src
index de3f74fb857d..a1d0fcbcfe76 100644
--- a/sw/source/ui/utlui/poolfmt.src
+++ b/sw/source/ui/utlui/poolfmt.src
@@ -738,7 +738,28 @@ String STR_POOLCHR_RUBYTEXT
{
Text [ en-US ] = "Rubies";
};
-
+//IAccessibility2 Implementation 2009-----
+String STR_COLUMN_VALUESET_ITEM0
+{
+ Text [ en-US ] = "1 column";
+};
+String STR_COLUMN_VALUESET_ITEM1
+{
+ Text [ en-US ] = "2 columns with equal size";
+};
+String STR_COLUMN_VALUESET_ITEM2
+{
+ Text [ en-US ] = "3 columns with equal size";
+};
+String STR_COLUMN_VALUESET_ITEM3
+{
+ Text [ en-US ] = "2 columns with different size (left > right)";
+};
+String STR_COLUMN_VALUESET_ITEM4
+{
+ Text [ en-US ] = "2 columns with different size (left < right)";
+};
+//-----IAccessibility2 Implementation 2009
String STR_POOLCHR_VERT_NUM
{
Text [ en-US ] = "Vertical Numbering Symbols";
diff --git a/sw/source/ui/utlui/prcntfld.cxx b/sw/source/ui/utlui/prcntfld.cxx
index 0c1ad64e4488..cddb79dcf5dd 100644
--- a/sw/source/ui/utlui/prcntfld.cxx
+++ b/sw/source/ui/utlui/prcntfld.cxx
@@ -58,7 +58,7 @@ void PercentField::SetRefValue(sal_Int64 nValue)
SetPrcntValue(nRealValue, eOldUnit);
}
-void PercentField::ShowPercent(BOOL bPercent)
+void PercentField::ShowPercent(sal_Bool bPercent)
{
if ((bPercent && GetUnit() == FUNIT_CUSTOM) ||
(!bPercent && GetUnit() != FUNIT_CUSTOM))
@@ -238,17 +238,17 @@ sal_Int64 PercentField::DenormalizePercent(sal_Int64 nValue)
return nValue;
}
-BOOL PercentField::IsValueModified()
+sal_Bool PercentField::IsValueModified()
{
if (GetUnit() == FUNIT_CUSTOM)
- return TRUE;
+ return sal_True;
else
return MetricField::IsValueModified();
}
-sal_Int64 PercentField::ImpPower10( USHORT n )
+sal_Int64 PercentField::ImpPower10( sal_uInt16 n )
{
- USHORT i;
+ sal_uInt16 i;
sal_Int64 nValue = 1;
for ( i=0; i < n; i++ )
diff --git a/sw/source/ui/utlui/shdwcrsr.cxx b/sw/source/ui/utlui/shdwcrsr.cxx
index d55216dbb44c..c785cd5edd8a 100644
--- a/sw/source/ui/utlui/shdwcrsr.cxx
+++ b/sw/source/ui/utlui/shdwcrsr.cxx
@@ -45,7 +45,7 @@ SwShadowCursor::~SwShadowCursor()
DrawCrsr( aOldPt, nOldHeight, nOldMode );
}
-void SwShadowCursor::SetPos( const Point& rPt, long nHeight, USHORT nMode )
+void SwShadowCursor::SetPos( const Point& rPt, long nHeight, sal_uInt16 nMode )
{
Point aPt( pWin->LogicToPixel( rPt ));
nHeight = pWin->LogicToPixel( Size( 0, nHeight )).Height();
@@ -61,7 +61,7 @@ void SwShadowCursor::SetPos( const Point& rPt, long nHeight, USHORT nMode )
}
}
-void SwShadowCursor::DrawTri( const Point& rPt, long nHeight, BOOL bLeft )
+void SwShadowCursor::DrawTri( const Point& rPt, long nHeight, sal_Bool bLeft )
{
long nLineDiff = ( nHeight / 2 );
long nLineDiffHalf = nLineDiff / 2;
@@ -80,7 +80,7 @@ void SwShadowCursor::DrawTri( const Point& rPt, long nHeight, BOOL bLeft )
}
}
-void SwShadowCursor::DrawCrsr( const Point& rPt, long nHeight, USHORT nMode )
+void SwShadowCursor::DrawCrsr( const Point& rPt, long nHeight, sal_uInt16 nMode )
{
nHeight = (((nHeight / 4)+1) * 4) + 1;
@@ -97,9 +97,9 @@ void SwShadowCursor::DrawCrsr( const Point& rPt, long nHeight, USHORT nMode )
// 2. das Dreieck
if( text::HoriOrientation::LEFT == nMode || text::HoriOrientation::CENTER == nMode ) // Pfeil nach rechts
- DrawTri( rPt, nHeight, FALSE );
+ DrawTri( rPt, nHeight, sal_False );
if( text::HoriOrientation::RIGHT == nMode || text::HoriOrientation::CENTER == nMode ) // Pfeil nach links
- DrawTri( rPt, nHeight, TRUE );
+ DrawTri( rPt, nHeight, sal_True );
pWin->Pop();
}
diff --git a/sw/source/ui/utlui/swrenamexnameddlg.cxx b/sw/source/ui/utlui/swrenamexnameddlg.cxx
index 446ddf775a61..86c2a00b10f4 100644
--- a/sw/source/ui/utlui/swrenamexnameddlg.cxx
+++ b/sw/source/ui/utlui/swrenamexnameddlg.cxx
@@ -73,9 +73,9 @@ SwRenameXNamedDlg::SwRenameXNamedDlg( Window* pWin,
uno::Reference< container::XNamed > & xN,
uno::Reference< container::XNameAccess > & xNA ) :
ModalDialog(pWin, SW_RES(DLG_RENAME_XNAMED)),
- aNewNameFT(this, SW_RES(FT_NEW_NAME)),
- aNewNameED(this, SW_RES(ED_NEW_NAME)),
aNameFL(this, SW_RES(FL_NAME)),
+ aNewNameFT(this, SW_RES(FT_NEW_NAME)),
+ aNewNameED(this, SW_RES(ED_NEW_NAME)),
aOk(this, SW_RES(PB_OK)),
aCancel(this, SW_RES(PB_CANCEL)),
aHelp(this, SW_RES(PB_HELP)),
diff --git a/sw/source/ui/utlui/textcontrolcombo.cxx b/sw/source/ui/utlui/textcontrolcombo.cxx
index 6a35f13b9325..a613088c3f76 100644
--- a/sw/source/ui/utlui/textcontrolcombo.cxx
+++ b/sw/source/ui/utlui/textcontrolcombo.cxx
@@ -46,7 +46,7 @@ TextControlCombo::~TextControlCombo()
{
}
-void TextControlCombo::Arrange( FixedText& _rFTcomplete, BOOL /*bShow*/ )
+void TextControlCombo::Arrange( FixedText& _rFTcomplete, sal_Bool /*bShow*/ )
{
Point aBasePos( GetPosPixel() );
Size aMetricVals( GetSizePixel() );
@@ -97,14 +97,14 @@ void TextControlCombo::Arrange( FixedText& _rFTcomplete, BOOL /*bShow*/ )
Window::Hide();
}
-void TextControlCombo::Show( BOOL _bVisible, USHORT _nFlags )
+void TextControlCombo::Show( sal_Bool _bVisible, sal_uInt16 _nFlags )
{
mrCtrl.Show( _bVisible, _nFlags );
mrFTbefore.Show( _bVisible, _nFlags );
mrFTafter.Show( _bVisible, _nFlags );
}
-void TextControlCombo::Enable( BOOL _bEnable, BOOL _bChild )
+void TextControlCombo::Enable( sal_Bool _bEnable, sal_Bool _bChild )
{
mrCtrl.Enable( _bEnable, _bChild );
mrFTbefore.Enable( _bEnable, _bChild );
diff --git a/sw/source/ui/utlui/tmplctrl.cxx b/sw/source/ui/utlui/tmplctrl.cxx
index a5d71cedd89a..21028f9f4781 100644
--- a/sw/source/ui/utlui/tmplctrl.cxx
+++ b/sw/source/ui/utlui/tmplctrl.cxx
@@ -54,10 +54,10 @@ class TemplatePopup_Impl : public PopupMenu
public:
TemplatePopup_Impl();
- USHORT GetCurId() const { return nCurId; }
+ sal_uInt16 GetCurId() const { return nCurId; }
private:
- USHORT nCurId;
+ sal_uInt16 nCurId;
virtual void Select();
};
@@ -75,8 +75,8 @@ void TemplatePopup_Impl::Select()
// class SvxZoomStatusBarControl ------------------------------------------
-SwTemplateControl::SwTemplateControl( USHORT _nSlotId,
- USHORT _nId,
+SwTemplateControl::SwTemplateControl( sal_uInt16 _nSlotId,
+ sal_uInt16 _nId,
StatusBar& rStb ) :
SfxStatusBarControl( _nSlotId, _nId, rStb )
{
@@ -87,7 +87,7 @@ SwTemplateControl::~SwTemplateControl()
}
void SwTemplateControl::StateChanged(
- USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
+ sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
{
if( eState != SFX_ITEM_AVAILABLE || pState->ISA( SfxVoidItem ) )
GetStatusBar().SetItemText( GetId(), String() );
@@ -123,7 +123,7 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt )
pPool->SetSearchMask(SFX_STYLE_FAMILY_PAGE, SFXSTYLEBIT_ALL);
if( pPool->Count() > 1 )
{
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
SfxStyleSheetBase* pStyle = pPool->First();
while( pStyle )
{
@@ -133,7 +133,7 @@ void SwTemplateControl::Command( const CommandEvent& rCEvt )
}
aPop.Execute( &GetStatusBar(), rCEvt.GetMousePosPixel());
- USHORT nCurrId = aPop.GetCurId();
+ sal_uInt16 nCurrId = aPop.GetCurId();
if( nCurrId != USHRT_MAX)
{
// sieht etwas umstaendlich aus, anders geht's aber nicht
diff --git a/sw/source/ui/utlui/uiitems.cxx b/sw/source/ui/utlui/uiitems.cxx
index 45a9b4c8f977..8241f85f1624 100644
--- a/sw/source/ui/utlui/uiitems.cxx
+++ b/sw/source/ui/utlui/uiitems.cxx
@@ -46,7 +46,7 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
// Breitenangaben der Fussnotenlinien, mit TabPage abstimmen
-static const USHORT nFtnLines[] = {
+static const sal_uInt16 nFtnLines[] = {
0,
10,
50,
@@ -58,7 +58,7 @@ static const USHORT nFtnLines[] = {
#define FTN_LINE_STYLE_COUNT 5
-SwPageFtnInfoItem::SwPageFtnInfoItem( const USHORT nId, SwPageFtnInfo& rInfo) :
+SwPageFtnInfoItem::SwPageFtnInfoItem( const sal_uInt16 nId, SwPageFtnInfo& rInfo) :
SfxPoolItem( nId ),
aFtnInfo(rInfo)
{
@@ -107,7 +107,7 @@ SfxItemPresentation SwPageFtnInfoItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
- USHORT nHght = (USHORT) GetPageFtnInfo().GetHeight();
+ sal_uInt16 nHght = (sal_uInt16) GetPageFtnInfo().GetHeight();
if ( nHght )
{
rText = SW_RESSTR( STR_MAX_FTN_HEIGHT );
@@ -122,7 +122,7 @@ SfxItemPresentation SwPageFtnInfoItem::GetPresentation
return SFX_ITEM_PRESENTATION_NONE;
}
-bool SwPageFtnInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const
+bool SwPageFtnInfoItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
{
bool bRet = true;
switch(nMemberId & ~CONVERT_TWIPS)
@@ -146,7 +146,7 @@ bool SwPageFtnInfoItem::QueryValue( Any& rVal, BYTE nMemberId ) const
return bRet;
}
-bool SwPageFtnInfoItem::PutValue(const Any& rVal, BYTE nMemberId)
+bool SwPageFtnInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId)
{
sal_Int32 nSet32 = 0;
bool bRet = true;
@@ -209,7 +209,7 @@ bool SwPageFtnInfoItem::PutValue(const Any& rVal, BYTE nMemberId)
return bRet;
}
-SwPtrItem::SwPtrItem( const USHORT nId, void* pPtr ) :
+SwPtrItem::SwPtrItem( const sal_uInt16 nId, void* pPtr ) :
SfxPoolItem( nId ),
pMisc(pPtr)
{
@@ -246,7 +246,7 @@ int SwPtrItem::operator==( const SfxPoolItem& rAttr ) const
/*--------------------------------------------------------------
SwUINumRuleItem fuer die NumTabPages der FormatNumRule/Stylisten
---------------------------------------------------------------*/
-SwUINumRuleItem::SwUINumRuleItem( const SwNumRule& rRul, const USHORT nId )
+SwUINumRuleItem::SwUINumRuleItem( const SwNumRule& rRul, const sal_uInt16 nId )
: SfxPoolItem( nId ), pRule( new SwNumRule( rRul ) )
{
}
@@ -274,13 +274,13 @@ int SwUINumRuleItem::operator==( const SfxPoolItem& rAttr ) const
return *pRule == *((SwUINumRuleItem&)rAttr).pRule;
}
-bool SwUINumRuleItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const
+bool SwUINumRuleItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
uno::Reference< container::XIndexReplace >xRules = new SwXNumberingRules(*pRule);
rVal.setValue(&xRules, ::getCppuType((uno::Reference< container::XIndexReplace>*)0));
return true;
}
-bool SwUINumRuleItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ )
+bool SwUINumRuleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
{
uno::Reference< container::XIndexReplace> xRulesRef;
if(rVal >>= xRulesRef)
@@ -296,7 +296,7 @@ bool SwUINumRuleItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ )
return true;
}
-SwBackgroundDestinationItem::SwBackgroundDestinationItem(USHORT _nWhich, USHORT nValue) :
+SwBackgroundDestinationItem::SwBackgroundDestinationItem(sal_uInt16 _nWhich, sal_uInt16 nValue) :
SfxUInt16Item(_nWhich, nValue)
{
}
diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx
index 1ba78445d994..81a202107b4b 100644
--- a/sw/source/ui/utlui/uitool.cxx
+++ b/sw/source/ui/utlui/uitool.cxx
@@ -119,14 +119,14 @@ void PrepareBoxInfo(SfxItemSet& rSet, const SwWrtShell& rSh)
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
const SfxPoolItem *pBoxInfo;
if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER,
- TRUE, &pBoxInfo))
+ sal_True, &pBoxInfo))
aBoxInfo = *(SvxBoxInfoItem*)pBoxInfo;
// Tabellenvariante, wenn mehrere Tabellenzellen selektiert
rSh.GetCrsr(); //Damit GetCrsrCnt() auch das Richtige liefert
aBoxInfo.SetTable (rSh.IsTableMode() && rSh.GetCrsrCnt() > 1);
// Abstandsfeld immer anzeigen
- aBoxInfo.SetDist ((BOOL) TRUE);
+ aBoxInfo.SetDist ((sal_Bool) sal_True);
// Minimalgroesse in Tabellen und Absaetzen setzen
aBoxInfo.SetMinDist (rSh.IsTableMode() || rSh.GetSelectionType() & (nsSelectionType::SEL_TXT | nsSelectionType::SEL_TBL));
// Default-Abstand immer setzen
@@ -178,7 +178,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
{
const SvxPageItem& rPageItem = (const SvxPageItem&)rSet.Get(SID_ATTR_PAGE);
- USHORT nUse = (USHORT)rPageItem.GetPageUsage();
+ sal_uInt16 nUse = (sal_uInt16)rPageItem.GetPageUsage();
if(nUse & 0x04)
nUse |= 0x03;
if(nUse)
@@ -201,7 +201,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
//
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PAGE_HEADERSET,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rHeaderOn = (const SfxBoolItem&)rHeaderSet.Get(SID_ATTR_PAGE_ON);
@@ -210,7 +210,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
{
// Werte uebernehmen
if(!rMaster.GetHeader().IsActive())
- rMaster.SetFmtAttr(SwFmtHeader(TRUE));
+ rMaster.SetFmtAttr(SwFmtHeader(sal_True));
// Das Headerformat rausholen und anpassen
//
@@ -228,8 +228,8 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
//
if(rMaster.GetHeader().IsActive())
{
- rMaster.SetFmtAttr(SwFmtHeader(BOOL(FALSE)));
- rPageDesc.ChgHeaderShare(FALSE);
+ rMaster.SetFmtAttr(SwFmtHeader(sal_Bool(sal_False)));
+ rPageDesc.ChgHeaderShare(sal_False);
}
}
}
@@ -237,7 +237,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
// Fusszeilen-Attribute auswerten
//
if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PAGE_FOOTERSET,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet();
const SfxBoolItem& rFooterOn = (const SfxBoolItem&)rFooterSet.Get(SID_ATTR_PAGE_ON);
@@ -246,7 +246,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
{
// Werte uebernehmen
if(!rMaster.GetFooter().IsActive())
- rMaster.SetFmtAttr(SwFmtFooter(TRUE));
+ rMaster.SetFmtAttr(SwFmtFooter(sal_True));
// Das Footerformat rausholen und anpassen
//
@@ -264,8 +264,8 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
//
if(rMaster.GetFooter().IsActive())
{
- rMaster.SetFmtAttr(SwFmtFooter(BOOL(FALSE)));
- rPageDesc.ChgFooterShare(FALSE);
+ rMaster.SetFmtAttr(SwFmtFooter(sal_Bool(sal_False)));
+ rPageDesc.ChgFooterShare(sal_False);
}
}
}
@@ -273,7 +273,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
// Fussnoten
//
if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_FTN_INFO,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
rPageDesc.SetFtnInfo( ((SwPageFtnInfoItem*)pItem)->GetPageFtnInfo() );
@@ -284,20 +284,20 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
// Registerhaltigkeit
if(SFX_ITEM_SET == rSet.GetItemState(
- SID_SWREGISTER_MODE, FALSE, &pItem))
+ SID_SWREGISTER_MODE, sal_False, &pItem))
{
- BOOL bSet = ((const SfxBoolItem*)pItem)->GetValue();
+ sal_Bool bSet = ((const SfxBoolItem*)pItem)->GetValue();
if(!bSet)
rPageDesc.SetRegisterFmtColl(0);
else if(SFX_ITEM_SET == rSet.GetItemState(
- SID_SWREGISTER_COLLECTION, FALSE, &pItem))
+ SID_SWREGISTER_COLLECTION, sal_False, &pItem))
{
const String& rColl = ((const SfxStringItem*)pItem)->GetValue();
SwDoc& rDoc = *rMaster.GetDoc();
SwTxtFmtColl* pColl = rDoc.FindTxtFmtCollByName( rColl );
if( !pColl )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName( rColl, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rColl, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if( USHRT_MAX != nId )
pColl = rDoc.GetTxtCollFromPool( nId );
else
@@ -305,7 +305,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
(SwTxtFmtColl*)rDoc.GetDfltTxtFmtColl() );
}
if( pColl )
- pColl->SetFmtAttr( SwRegisterItem ( TRUE ));
+ pColl->SetFmtAttr( SwRegisterItem ( sal_True ));
rPageDesc.SetRegisterFmtColl( pColl );
}
}
@@ -339,14 +339,14 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
const SfxPoolItem *pBoxInfo;
if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER,
- TRUE, &pBoxInfo) )
+ sal_True, &pBoxInfo) )
aBoxInfo = *(SvxBoxInfoItem*)pBoxInfo;
- aBoxInfo.SetTable( FALSE );
+ aBoxInfo.SetTable( sal_False );
// Abstandsfeld immer anzeigen
- aBoxInfo.SetDist( TRUE);
+ aBoxInfo.SetDist( sal_True);
// Minimalgroesse in Tabellen und Absaetzen setzen
- aBoxInfo.SetMinDist( FALSE );
+ aBoxInfo.SetMinDist( sal_False );
// Default-Abstand immer setzen
aBoxInfo.SetDefDist( MIN_BORDER_DIST );
// Einzelne Linien koennen nur in Tabellen DontCare-Status haben
@@ -378,7 +378,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
// dynamische oder feste Hoehe
//
- SfxBoolItem aOn(SID_ATTR_PAGE_ON, TRUE);
+ SfxBoolItem aOn(SID_ATTR_PAGE_ON, sal_True);
aHeaderSet.Put(aOn);
const SwFmtFrmSize &rFrmSize = pHeaderFmt->GetFrmSize();
@@ -424,7 +424,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
// dynamische oder feste Hoehe
//
- SfxBoolItem aOn(SID_ATTR_PAGE_ON, TRUE);
+ SfxBoolItem aOn(SID_ATTR_PAGE_ON, sal_True);
aFooterSet.Put(aOn);
const SwFmtFrmSize &rFrmSize = pFooterFmt->GetFrmSize();
@@ -490,11 +490,11 @@ void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem& rTabs)
--------------------------------------------------------------------*/
-USHORT GetTabDist(const SvxTabStopItem& rTabs)
+sal_uInt16 GetTabDist(const SvxTabStopItem& rTabs)
{
- USHORT nDefDist;
+ sal_uInt16 nDefDist;
if( rTabs.Count() )
- nDefDist = (USHORT)( rTabs[0].GetTabPos() );
+ nDefDist = (sal_uInt16)( rTabs[0].GetTabPos() );
else
nDefDist = 1134; // 2cm
return nDefDist;
@@ -507,14 +507,14 @@ void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet )
const SfxPoolItem* pItem;
SwFmtPageDesc aPgDesc;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
// Seitennummer
- if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_PARA_PAGENUM, FALSE, &pItem))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_PARA_PAGENUM, sal_False, &pItem))
{
aPgDesc.SetNumOffset(((SfxUInt16Item*)pItem)->GetValue());
- bChanged = TRUE;
+ bChanged = sal_True;
}
- if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PARA_MODEL, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PARA_MODEL, sal_False, &pItem ))
{
const String& rDescName = ((SvxPageModelItem*)pItem)->GetValue();
if( rDescName.Len() ) // kein Name -> PageDesc ausschalten!
@@ -522,18 +522,18 @@ void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet )
// nur loeschen, wenn PageDesc eingschaltet wird!
rSet.ClearItem( RES_BREAK );
SwPageDesc* pDesc = ((SwWrtShell&)rShell).FindPageDescByName(
- rDescName, TRUE );
+ rDescName, sal_True );
if( pDesc )
pDesc->Add( &aPgDesc );
}
rSet.ClearItem( SID_ATTR_PARA_MODEL );
- bChanged = TRUE;
+ bChanged = sal_True;
}
else
{
SfxItemSet aCoreSet(rShell.GetView().GetPool(), RES_PAGEDESC, RES_PAGEDESC );
rShell.GetCurAttr( aCoreSet );
- if(SFX_ITEM_SET == aCoreSet.GetItemState( RES_PAGEDESC, TRUE, &pItem ) )
+ if(SFX_ITEM_SET == aCoreSet.GetItemState( RES_PAGEDESC, sal_True, &pItem ) )
{
if( ((SwFmtPageDesc*)pItem)->GetPageDesc() )
{
@@ -553,9 +553,9 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet )
{
const SfxPoolItem* pItem = 0;
String aName;
- USHORT nPageNum = 0;
- BOOL bPut = TRUE;
- switch( rCoreSet.GetItemState( RES_PAGEDESC, TRUE, &pItem ) )
+ sal_uInt16 nPageNum = 0;
+ sal_Bool bPut = sal_True;
+ switch( rCoreSet.GetItemState( RES_PAGEDESC, sal_True, &pItem ) )
{
case SFX_ITEM_SET:
{
@@ -573,13 +573,13 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet )
break;
default:
- bPut = FALSE;
+ bPut = sal_False;
}
SfxUInt16Item aPageNum( SID_ATTR_PARA_PAGENUM, nPageNum );
rCoreSet.Put( aPageNum );
if(bPut)
- rCoreSet.Put( SvxPageModelItem( aName, TRUE, SID_ATTR_PARA_MODEL ) );
+ rCoreSet.Put( SvxPageModelItem( aName, sal_True, SID_ATTR_PARA_MODEL ) );
}
/*--------------------------------------------------------------------
@@ -587,7 +587,7 @@ void SwToSfxPageDescAttr( SfxItemSet& rCoreSet )
--------------------------------------------------------------------*/
-FieldUnit GetDfltMetric(BOOL bWeb)
+FieldUnit GetDfltMetric(sal_Bool bWeb)
{
return SW_MOD()->GetUsrPref(bWeb)->GetMetric();
}
@@ -597,14 +597,14 @@ FieldUnit GetDfltMetric(BOOL bWeb)
--------------------------------------------------------------------*/
-void SetDfltMetric( FieldUnit eMetric, BOOL bWeb )
+void SetDfltMetric( FieldUnit eMetric, sal_Bool bWeb )
{
SW_MOD()->ApplyUserMetric(eMetric, bWeb);
}
-USHORT InsertStringSorted(const String& rEntry, ListBox& rToFill, USHORT nOffset )
+sal_uInt16 InsertStringSorted(const String& rEntry, ListBox& rToFill, sal_uInt16 nOffset )
{
- USHORT i = nOffset;
+ sal_uInt16 i = nOffset;
CollatorWrapper& rCaseColl = ::GetAppCaseCollator();
for( ; i < rToFill.GetEntryCount(); i++ )
@@ -614,9 +614,9 @@ USHORT InsertStringSorted(const String& rEntry, ListBox& rToFill, USHORT nOffset
}
return rToFill.InsertEntry(rEntry, i);
}
-void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BOOL bWithDefault)
+void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, sal_Bool bSorted, sal_Bool bWithDefault)
{
- BOOL bHasOffset = rToFill.GetEntryCount() > 0;
+ sal_Bool bHasOffset = rToFill.GetEntryCount() > 0;
SfxStyleSheetBasePool* pPool = pDocSh->GetStyleSheetPool();
pPool->SetSearchMask(SFX_STYLE_FAMILY_CHAR, SFXSTYLEBIT_ALL);
SwDoc* pDoc = pDocSh->GetDoc();
@@ -627,7 +627,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BO
{
if(bWithDefault || pBase->GetName() != sStandard)
{
- USHORT nPos;
+ sal_uInt16 nPos;
if(bSorted)
nPos = InsertStringSorted(pBase->GetName(), rToFill, bHasOffset );
else
@@ -639,7 +639,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BO
}
// non-pool styles
const SwCharFmts* pFmts = pDoc->GetCharFmts();
- for(USHORT i = 0; i < pFmts->Count(); i++)
+ for(sal_uInt16 i = 0; i < pFmts->Count(); i++)
{
const SwCharFmt* pFmt = (*pFmts)[i];
if(pFmt->IsDefault())
@@ -647,7 +647,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BO
const String& rName = pFmt->GetName();
if(rToFill.GetEntryPos(rName) == LISTBOX_ENTRY_NOTFOUND)
{
- USHORT nPos;
+ sal_uInt16 nPos;
if(bSorted)
nPos = InsertStringSorted(rName, rToFill, bHasOffset );
else
@@ -658,7 +658,7 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, BOOL bSorted, BO
}
};
-SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, USHORT *pPercent,
+SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent,
SwWrtShell* pSh )
{
//Die Breite zu besorgen ist etwas komplizierter.
@@ -705,29 +705,29 @@ String GetAppLangDateTimeString( const DateTime& rDT )
const SvtSysLocale aSysLocale;
const LocaleDataWrapper& rAppLclData = aSysLocale.GetLocaleData();
String sRet( rAppLclData.getDate( rDT ));
- ( sRet += ' ' ) += rAppLclData.getTime( rDT, FALSE, FALSE );
+ ( sRet += ' ' ) += rAppLclData.getTime( rDT, sal_False, sal_False );
return sRet;
}
/*----------------------------------------------------------------------------
* add a new function which can get and set the current "SID_ATTR_APPLYCHARUNIT" value
*---------------------------------------------------------------------------*/
-BOOL HasCharUnit( BOOL bWeb)
+sal_Bool HasCharUnit( sal_Bool bWeb)
{
return SW_MOD()->GetUsrPref(bWeb)->IsApplyCharUnit();
}
-void SetApplyCharUnit(BOOL bApplyChar, BOOL bWeb)
+void SetApplyCharUnit(sal_Bool bApplyChar, sal_Bool bWeb)
{
SW_MOD()->ApplyUserCharUnit(bApplyChar, bWeb);
}
-bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, USHORT nId )
+bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, sal_uInt16 nId )
{
bool bRet = false;
- USHORT nItemCount = rMenu.GetItemCount();
+ sal_uInt16 nItemCount = rMenu.GetItemCount();
String sCommand;
- for( USHORT nItem = 0; nItem < nItemCount; ++nItem)
+ for( sal_uInt16 nItem = 0; nItem < nItemCount; ++nItem)
{
PopupMenu* pPopup = rMenu.GetPopupMenu( rMenu.GetItemId( nItem ) );
if(pPopup)
diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx
index 4c5e282f9baf..cbefd877ee42 100644
--- a/sw/source/ui/utlui/unotools.cxx
+++ b/sw/source/ui/utlui/unotools.cxx
@@ -154,7 +154,7 @@ void SwOneExampleFrame::CreateControl()
uno::Sequence<beans::PropertyValue> aSeq(3);
beans::PropertyValue* pValues = aSeq.getArray();
pValues[0].Name = C2U("ReadOnly");
- BOOL bTrue = sal_True;
+ sal_Bool bTrue = sal_True;
pValues[0].Value.setValue(&bTrue, ::getBooleanCppuType());
pValues[1].Name = C2U("OpenFlags");
pValues[1].Value <<= C2U("-RB");
@@ -343,7 +343,7 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer )
return 0;
}
-void SwOneExampleFrame::ClearDocument( BOOL bStartUpdateTimer )
+void SwOneExampleFrame::ClearDocument( sal_Bool bStartUpdateTimer )
{
uno::Reference< lang::XUnoTunnel> xTunnel( _xCursor, uno::UNO_QUERY);
if( xTunnel.is() )
@@ -368,8 +368,8 @@ void SwOneExampleFrame::ClearDocument( BOOL bStartUpdateTimer )
}
else
{
- _xCursor->gotoStart(FALSE);
- _xCursor->gotoEnd(TRUE);
+ _xCursor->gotoStart(sal_False);
+ _xCursor->gotoEnd(sal_True);
_xCursor->setString(OUString());
}
}
diff --git a/sw/source/ui/utlui/unotools.src b/sw/source/ui/utlui/unotools.src
index ac805c9da947..ac203d035cd6 100644
--- a/sw/source/ui/utlui/unotools.src
+++ b/sw/source/ui/utlui/unotools.src
@@ -44,6 +44,7 @@ ModalDialog DLG_RENAME_XNAMED
};
Edit ED_NEW_NAME
{
+ HelpID = "sw:Edit:DLG_RENAME_XNAMED:ED_NEW_NAME";
Pos = MAP_APPFONT ( 65 , 13 ) ;
Size = MAP_APPFONT ( 87 , 12 ) ;
Border = TRUE;
diff --git a/sw/source/ui/utlui/viewlayoutctrl.cxx b/sw/source/ui/utlui/viewlayoutctrl.cxx
index 3b1b46c03c25..ac8e4a526f80 100644
--- a/sw/source/ui/utlui/viewlayoutctrl.cxx
+++ b/sw/source/ui/utlui/viewlayoutctrl.cxx
@@ -51,7 +51,7 @@ const long nImageHeight = 11;
struct SwViewLayoutControl::SwViewLayoutControl_Impl
{
- USHORT mnState; // 0 = single, 1 = auto, 2 = book, 3 = none
+ sal_uInt16 mnState; // 0 = single, 1 = auto, 2 = book, 3 = none
Image maImageSingleColumn;
Image maImageSingleColumn_Active;
Image maImageAutomatic;
@@ -62,7 +62,7 @@ struct SwViewLayoutControl::SwViewLayoutControl_Impl
// class SwViewLayoutControl ------------------------------------------
-SwViewLayoutControl::SwViewLayoutControl( USHORT _nSlotId, USHORT _nId, StatusBar& rStb ) :
+SwViewLayoutControl::SwViewLayoutControl( sal_uInt16 _nSlotId, sal_uInt16 _nId, StatusBar& rStb ) :
SfxStatusBarControl( _nSlotId, _nId, rStb ),
mpImpl( new SwViewLayoutControl_Impl )
{
@@ -81,14 +81,14 @@ SwViewLayoutControl::~SwViewLayoutControl()
delete mpImpl;
}
-void SwViewLayoutControl::StateChanged( USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
+void SwViewLayoutControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
{
if ( SFX_ITEM_AVAILABLE != eState || pState->ISA( SfxVoidItem ) )
GetStatusBar().SetItemText( GetId(), String() );
else
{
OSL_ENSURE( pState->ISA( SvxViewLayoutItem ), "invalid item type" );
- const USHORT nColumns = static_cast<const SvxViewLayoutItem*>( pState )->GetValue();
+ const sal_uInt16 nColumns = static_cast<const SvxViewLayoutItem*>( pState )->GetValue();
const bool bBookMode = static_cast<const SvxViewLayoutItem*>( pState )->IsBookMode();
// SingleColumn Mode
@@ -135,13 +135,13 @@ void SwViewLayoutControl::Paint( const UserDrawEvent& rUsrEvt )
pDev->DrawImage( aRect.TopLeft(), bBookMode ? mpImpl->maImageBookMode_Active : mpImpl->maImageBookMode );
}
-BOOL SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt )
+sal_Bool SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt )
{
const Rectangle aRect = getControlRect();
const Point aPoint = rEvt.GetPosPixel();
const long nXDiff = aPoint.X() - aRect.Left();
- USHORT nColumns = 1;
+ sal_uInt16 nColumns = 1;
bool bBookMode = false;
const long nXOffset = (aRect.GetWidth() - nImageWidthSum)/2;
@@ -175,7 +175,7 @@ BOOL SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt )
execute( aArgs );
- return TRUE;
+ return sal_True;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/zoomctrl.cxx b/sw/source/ui/utlui/zoomctrl.cxx
index 024f516e889c..80c5bf66eddc 100644
--- a/sw/source/ui/utlui/zoomctrl.cxx
+++ b/sw/source/ui/utlui/zoomctrl.cxx
@@ -41,8 +41,8 @@
SFX_IMPL_STATUSBAR_CONTROL( SwZoomControl, SvxZoomItem );
-SwZoomControl::SwZoomControl( USHORT _nSlotId,
- USHORT _nId,
+SwZoomControl::SwZoomControl( sal_uInt16 _nSlotId,
+ sal_uInt16 _nId,
StatusBar& rStb ) :
SvxZoomStatusBarControl( _nSlotId, _nId, rStb )
{
@@ -52,7 +52,7 @@ SwZoomControl::~SwZoomControl()
{
}
-void SwZoomControl::StateChanged( USHORT nSID, SfxItemState eState,
+void SwZoomControl::StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState )
{
if(SFX_ITEM_AVAILABLE == eState && pState->ISA( SfxStringItem ))
diff --git a/sw/source/ui/vba/makefile.mk b/sw/source/ui/vba/makefile.mk
deleted file mode 100644
index 26975035f1c1..000000000000
--- a/sw/source/ui/vba/makefile.mk
+++ /dev/null
@@ -1,140 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=vbaswobj
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-DLLPRE =
-
-.IF "$(ENABLE_VBA)"!="YES"
-dummy:
- @echo "not building vba..."
-.ENDIF
-
-INCPRE=$(INCCOM)$/$(TARGET)
-CDEFS+=-DVBA_OOBUILD_HACK
-# ------------------------------------------------------------------
-
-SLOFILES= \
- $(SLO)$/vbaglobals.obj \
- $(SLO)$/vbaapplication.obj \
- $(SLO)$/vbadocument.obj \
- $(SLO)$/vbawindow.obj \
- $(SLO)$/vbasystem.obj \
- $(SLO)$/vbarangehelper.obj \
- $(SLO)$/vbarange.obj \
- $(SLO)$/vbabookmark.obj \
- $(SLO)$/vbabookmarks.obj \
- $(SLO)$/vbavariable.obj \
- $(SLO)$/vbavariables.obj \
- $(SLO)$/vbaview.obj \
- $(SLO)$/wordvbahelper.obj \
- $(SLO)$/service.obj \
- $(SLO)$/vbadocumentproperties.obj \
- $(SLO)$/vbapane.obj \
- $(SLO)$/vbapanes.obj \
- $(SLO)$/vbaoptions.obj \
- $(SLO)$/vbaselection.obj \
- $(SLO)$/vbatemplate.obj \
- $(SLO)$/vbaparagraphformat.obj \
- $(SLO)$/vbaautotextentry.obj \
- $(SLO)$/vbaparagraph.obj \
- $(SLO)$/vbafind.obj \
- $(SLO)$/vbareplacement.obj \
- $(SLO)$/vbastyle.obj \
- $(SLO)$/vbastyles.obj \
- $(SLO)$/vbafont.obj \
- $(SLO)$/vbapalette.obj \
- $(SLO)$/vbainformationhelper.obj \
- $(SLO)$/vbatable.obj \
- $(SLO)$/vbatables.obj \
- $(SLO)$/vbafield.obj \
- $(SLO)$/vbaborders.obj \
- $(SLO)$/vbadocuments.obj \
- $(SLO)$/vbaheaderfooter.obj \
- $(SLO)$/vbaheadersfooters.obj \
- $(SLO)$/vbaheaderfooterhelper.obj \
- $(SLO)$/vbaaddin.obj \
- $(SLO)$/vbaaddins.obj \
- $(SLO)$/vbadialogs.obj \
- $(SLO)$/vbadialog.obj \
- $(SLO)$/vbawrapformat.obj \
- $(SLO)$/vbapagesetup.obj \
- $(SLO)$/vbasection.obj \
- $(SLO)$/vbasections.obj \
- $(SLO)$/vbarow.obj \
- $(SLO)$/vbarows.obj \
- $(SLO)$/vbacolumn.obj \
- $(SLO)$/vbacolumns.obj \
- $(SLO)$/vbatablehelper.obj \
- $(SLO)$/vbacell.obj \
- $(SLO)$/vbacells.obj \
- $(SLO)$/vbatabstop.obj \
- $(SLO)$/vbatabstops.obj \
- $(SLO)$/vbatableofcontents.obj \
- $(SLO)$/vbatablesofcontents.obj \
- $(SLO)$/vbalistgallery.obj \
- $(SLO)$/vbalistgalleries.obj \
- $(SLO)$/vbalisthelper.obj \
- $(SLO)$/vbalisttemplate.obj \
- $(SLO)$/vbalisttemplates.obj \
- $(SLO)$/vbalistlevel.obj \
- $(SLO)$/vbalistlevels.obj \
- $(SLO)$/vbalistformat.obj \
- $(SLO)$/vbarevision.obj \
- $(SLO)$/vbarevisions.obj \
- $(SLO)$/vbaframe.obj \
- $(SLO)$/vbaframes.obj \
- $(SLO)$/vbaeventshelper.obj \
-
-# These files to be enabled when field related patches
-# are folded into libreoffice
-.IF "$(ENABLE_FIELDBITS)"=="YES"
-SLOFILES+=$(SLO)$/vbaformfield.obj \
- $(SLO)$/vbaformfields.obj \
- $(SLO)$/vbacheckbox.obj
-.ENDIF
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-ALLTAR : \
- $(MISC)$/$(TARGET).don \
-
-$(SLOFILES) : $(MISC)$/$(TARGET).don
-
-$(MISC)$/$(TARGET).don : $(SOLARBINDIR)$/oovbaapi.rdb
- +$(CPPUMAKER) -O$(INCCOM)$/$(TARGET) -BUCR $(SOLARBINDIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@
- echo $@
-
diff --git a/sw/source/ui/vba/service.cxx b/sw/source/ui/vba/service.cxx
index 2075abf4a1f8..3217c4cf7385 100644
--- a/sw/source/ui/vba/service.cxx
+++ b/sw/source/ui/vba/service.cxx
@@ -65,24 +65,14 @@ extern sdecl::ServiceDecl const serviceDecl;
extern "C"
{
- void SAL_CALL component_getImplementationEnvironment(
+ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
{
OSL_TRACE("In component_getImplementationEnv");
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
- sal_Bool SAL_CALL component_writeInfo(
- lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey )
- {
- OSL_TRACE("In component_writeInfo");
-
- // Component registration
- return component_writeInfoHelper( pServiceManager, pRegistryKey,
- globals::serviceDecl, document::serviceDecl, wrapformat::serviceDecl, vbaeventshelper::serviceDecl );
- }
-
- void * SAL_CALL component_getFactory(
+ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager,
registry::XRegistryKey * pRegistryKey )
{
diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx
index 85913bfba166..963fca41fb7d 100644
--- a/sw/source/ui/vba/vbadocumentproperties.cxx
+++ b/sw/source/ui/vba/vbadocumentproperties.cxx
@@ -150,7 +150,7 @@ public:
SwFEShell* pFEShell = mpDocShell->GetFEShell();
if(pFEShell)
{
- aReturn <<= pFEShell->GetLineCount(FALSE);
+ aReturn <<= pFEShell->GetLineCount(sal_False);
}
}
}
diff --git a/sw/source/ui/vba/vbadocuments.cxx b/sw/source/ui/vba/vbadocuments.cxx
index 51f6e882cb03..3c977f654ccd 100644
--- a/sw/source/ui/vba/vbadocuments.cxx
+++ b/sw/source/ui/vba/vbadocuments.cxx
@@ -121,7 +121,7 @@ SwVbaDocuments::Add( const uno::Any& Template, const uno::Any& /*NewTemplate*/,
{
return Open( sFileName, uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any(), uno::Any());
}
- uno::Reference <text::XTextDocument> xTextDoc( VbaDocumentsBase::Add() , uno::UNO_QUERY_THROW );
+ uno::Reference <text::XTextDocument> xTextDoc( createDocument() , uno::UNO_QUERY_THROW );
if( xTextDoc.is() )
return getDocument( mxContext, xTextDoc, Application() );
@@ -132,7 +132,7 @@ SwVbaDocuments::Add( const uno::Any& Template, const uno::Any& /*NewTemplate*/,
void SAL_CALL
SwVbaDocuments::Close( const uno::Any& /*SaveChanges*/, const uno::Any& /*OriginalFormat*/, const uno::Any& /*RouteDocument*/ ) throw (uno::RuntimeException)
{
- VbaDocumentsBase::Close();
+ closeDocuments();
}
// #TODO# #FIXME# can any of the unused params below be used?
@@ -151,7 +151,7 @@ SwVbaDocuments::Open( const ::rtl::OUString& Filename, const uno::Any& /*Confirm
uno::Sequence< beans::PropertyValue > sProps(0);
- uno::Reference <text::XTextDocument> xSpreadDoc( VbaDocumentsBase::Open( Filename, ReadOnly, sProps ), uno::UNO_QUERY_THROW );
+ uno::Reference <text::XTextDocument> xSpreadDoc( openDocument( Filename, ReadOnly, sProps ), uno::UNO_QUERY_THROW );
uno::Any aRet = getDocument( mxContext, xSpreadDoc, Application() );
uno::Reference< word::XDocument > xDocument( aRet, uno::UNO_QUERY );
if ( xDocument.is() )
@@ -159,25 +159,6 @@ SwVbaDocuments::Open( const ::rtl::OUString& Filename, const uno::Any& /*Confirm
return aRet;
}
- // VbaDocumentsBase / XDocumentsBase (to avoid warning C4266 for hiding function on wntmsci)
-uno::Any SAL_CALL
-SwVbaDocuments::Add() throw (uno::RuntimeException)
-{
- return VbaDocumentsBase::Add();
-}
-
-void SAL_CALL
-SwVbaDocuments::Close( ) throw (uno::RuntimeException)
-{
- VbaDocumentsBase::Close();
-}
-
-uno::Any SAL_CALL
-SwVbaDocuments::Open( const ::rtl::OUString& Filename, const uno::Any& ReadOnly, const uno::Sequence< beans::PropertyValue >& rProps ) throw (uno::RuntimeException)
-{
- return VbaDocumentsBase::Open( Filename, ReadOnly, rProps );
-}
-
rtl::OUString&
SwVbaDocuments::getServiceImplName()
{
diff --git a/sw/source/ui/vba/vbadocuments.hxx b/sw/source/ui/vba/vbadocuments.hxx
index 848406aa13ae..050817e7f95f 100644
--- a/sw/source/ui/vba/vbadocuments.hxx
+++ b/sw/source/ui/vba/vbadocuments.hxx
@@ -57,11 +57,6 @@ public:
virtual css::uno::Any SAL_CALL Add( const css::uno::Any& Template, const css::uno::Any& NewTemplate, const css::uno::Any& DocumentType, const css::uno::Any& Visible ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Open( const ::rtl::OUString& Filename, const css::uno::Any& ConfirmConversions, const css::uno::Any& ReadOnly, const css::uno::Any& AddToRecentFiles, const css::uno::Any& PasswordDocument, const css::uno::Any& PasswordTemplate, const css::uno::Any& Revert, const css::uno::Any& WritePasswordDocument, const css::uno::Any& WritePasswordTemplate, const css::uno::Any& Format, const css::uno::Any& Encoding, const css::uno::Any& Visible, const css::uno::Any& OpenAndRepair, const css::uno::Any& DocumentDirection, const css::uno::Any& NoEncodingDialog, const css::uno::Any& XMLTransform ) throw (css::uno::RuntimeException);
virtual void SAL_CALL Close( const css::uno::Any& SaveChanges, const css::uno::Any& OriginalFormat, const css::uno::Any& RouteDocument ) throw (css::uno::RuntimeException);
-
- // VbaDocumentsBase / XDocumentsBase (to avoid warning C4266 for hiding function on wntmsci)
- virtual css::uno::Any SAL_CALL Add() throw (css::uno::RuntimeException);
- virtual void SAL_CALL Close( ) throw (css::uno::RuntimeException);
- virtual css::uno::Any SAL_CALL Open( const ::rtl::OUString& Filename, const css::uno::Any& ReadOnly, const css::uno::Sequence< css::beans::PropertyValue >& rProps ) throw (css::uno::RuntimeException);
};
#endif /* SW_VBA_DOCUMENTS_HXX */
diff --git a/sw/source/ui/vba/vbaeventshelper.cxx b/sw/source/ui/vba/vbaeventshelper.cxx
index b132aaeaf610..e837785be3ab 100644
--- a/sw/source/ui/vba/vbaeventshelper.cxx
+++ b/sw/source/ui/vba/vbaeventshelper.cxx
@@ -51,11 +51,6 @@ SwVbaEventsHelper::~SwVbaEventsHelper()
{
}
-bool SwVbaEventsHelper::implEventsEnabled() throw (uno::RuntimeException)
-{
- return true;
-}
-
bool SwVbaEventsHelper::implPrepareEvent( EventQueue& rEventQueue,
const EventHandlerInfo& rInfo, const uno::Sequence< uno::Any >& /*rArgs*/ ) throw (uno::RuntimeException)
{
diff --git a/sw/source/ui/vba/vbaeventshelper.hxx b/sw/source/ui/vba/vbaeventshelper.hxx
index 3e28174ec4e3..a5817eef2d37 100644
--- a/sw/source/ui/vba/vbaeventshelper.hxx
+++ b/sw/source/ui/vba/vbaeventshelper.hxx
@@ -42,7 +42,6 @@ public:
virtual ~SwVbaEventsHelper();
protected:
- virtual bool implEventsEnabled() throw (css::uno::RuntimeException);
virtual bool implPrepareEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::uno::RuntimeException);
virtual css::uno::Sequence< css::uno::Any > implBuildArgumentList( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::lang::IllegalArgumentException);
virtual void implPostProcessEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, bool bSuccess, bool bCancel ) throw (css::uno::RuntimeException);
diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx
index 9f7f3da8f9bb..0ff4295a1218 100644
--- a/sw/source/ui/vba/vbafield.cxx
+++ b/sw/source/ui/vba/vbafield.cxx
@@ -250,10 +250,10 @@ xub_StrLen _ReadFieldParams::FindNextStringPiece(const xub_StrLen nStart)
// read parameters "1-3" or 1-3 with both values between 1 and nMax
-bool _ReadFieldParams::GetTokenSttFromTo(USHORT* pFrom, USHORT* pTo, USHORT nMax)
+bool _ReadFieldParams::GetTokenSttFromTo(sal_uInt16* pFrom, sal_uInt16* pTo, sal_uInt16 nMax)
{
- USHORT nStart = 0;
- USHORT nEnd = 0;
+ sal_uInt16 nStart = 0;
+ sal_uInt16 nEnd = 0;
xub_StrLen n = GoToTokenParam();
if( STRING_NOTFOUND != n )
{
@@ -264,8 +264,8 @@ bool _ReadFieldParams::GetTokenSttFromTo(USHORT* pFrom, USHORT* pTo, USHORT nMax
String sStart( sParams.GetToken(0, '-', nIndex) );
if( STRING_NOTFOUND != nIndex )
{
- nStart = static_cast<USHORT>(sStart.ToInt32());
- nEnd = static_cast<USHORT>(sParams.Copy(nIndex).ToInt32());
+ nStart = static_cast<sal_uInt16>(sStart.ToInt32());
+ nEnd = static_cast<sal_uInt16>(sParams.Copy(nIndex).ToInt32());
}
}
if( pFrom ) *pFrom = nStart;
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx
index 383bcd69dec3..3b115ad4c7bd 100644
--- a/sw/source/ui/vba/vbaselection.cxx
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -127,7 +127,7 @@ SwVbaSelection::setText( const rtl::OUString& rText ) throw ( uno::RuntimeExcept
void SAL_CALL
SwVbaSelection::TypeText( const rtl::OUString& rText ) throw ( uno::RuntimeException )
{
- // FIXME: handle the property Options.ReplaceSelection, the default value is TRUE
+ // FIXME: handle the property Options.ReplaceSelection, the default value is sal_True
setText( rText );
}
diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx
index c77f02a56d6d..072c39485a3e 100644
--- a/sw/source/ui/vba/vbatablehelper.cxx
+++ b/sw/source/ui/vba/vbatablehelper.cxx
@@ -181,7 +181,7 @@ SwTableBox* SwVbaTableHelper::GetTabBox( sal_Int32 nCol, sal_Int32 nRow ) throw
return pStart;
}
-void SwVbaTableHelper::InitTabCols( SwTabCols& rCols, const SwTableBox *pStart, BOOL /*bCurRowOnly*/ )
+void SwVbaTableHelper::InitTabCols( SwTabCols& rCols, const SwTableBox *pStart, sal_Bool /*bCurRowOnly*/ )
{
rCols.SetLeftMin ( 0 );
rCols.SetLeft ( 0 );
@@ -205,7 +205,7 @@ sal_Int32 SwVbaTableHelper::GetRightSeparator( SwTabCols& rCols, sal_Int32 nNum)
sal_Int32 i = 0;
while( nNum >= 0 )
{
- if( !rCols.IsHidden( static_cast< USHORT >(i)) )
+ if( !rCols.IsHidden( static_cast< sal_uInt16 >(i)) )
nNum--;
i++;
}
@@ -240,10 +240,10 @@ sal_Int32 SwVbaTableHelper::GetColWidth( SwTabCols& rCols, sal_Int32 nNum ) thro
else
{
SwTwips nRValid = nNum < GetColCount( rCols ) ?
- rCols[(USHORT)GetRightSeparator( rCols, nNum)]:
+ rCols[(sal_uInt16)GetRightSeparator( rCols, nNum)]:
rCols.GetRight();
SwTwips nLValid = nNum ?
- rCols[(USHORT)GetRightSeparator( rCols, nNum - 1)]:
+ rCols[(sal_uInt16)GetRightSeparator( rCols, nNum - 1)]:
rCols.GetLeft();
nWidth = nRValid - nLValid;
}
@@ -271,20 +271,20 @@ void SwVbaTableHelper::SetColWidth( sal_Int32 _width, sal_Int32 nCol, sal_Int32
int nDiff = (int)(nNewWidth - nWidth);
if( !nCol )
- aCols[ static_cast< USHORT >(GetRightSeparator(aCols, 0)) ] += nDiff;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator(aCols, 0)) ] += nDiff;
else if( nCol < GetColCount( aCols ) )
{
if(nDiff < GetColWidth( aCols, nCol + 1) - MINLAY)
- aCols[ static_cast< USHORT >(GetRightSeparator( aCols, nCol)) ] += nDiff;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator( aCols, nCol)) ] += nDiff;
else
{
int nDiffLeft = nDiff - (int)GetColWidth( aCols, nCol + 1) + (int)MINLAY;
- aCols[ static_cast< USHORT >(GetRightSeparator( aCols, nCol)) ] += (nDiff - nDiffLeft);
- aCols[ static_cast< USHORT >(GetRightSeparator( aCols, nCol - 1)) ] -= nDiffLeft;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator( aCols, nCol)) ] += (nDiff - nDiffLeft);
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator( aCols, nCol - 1)) ] -= nDiffLeft;
}
}
else
- aCols[ static_cast< USHORT >(GetRightSeparator( aCols, nCol-1)) ] -= nDiff;
+ aCols[ static_cast< sal_uInt16 >(GetRightSeparator( aCols, nCol-1)) ] -= nDiff;
}
else
aCols.SetRight( Min( (long)nNewWidth, aCols.GetRightMax()) );
diff --git a/sw/source/ui/vba/vbatablehelper.hxx b/sw/source/ui/vba/vbatablehelper.hxx
index b603fd115d68..0dcd630d07b8 100644
--- a/sw/source/ui/vba/vbatablehelper.hxx
+++ b/sw/source/ui/vba/vbatablehelper.hxx
@@ -43,7 +43,7 @@ private:
private:
SwTableBox* GetTabBox( sal_Int32 nCol, sal_Int32 nRow ) throw (css::uno::RuntimeException);
- void InitTabCols( SwTabCols& rCols, const SwTableBox *pStart, sal_Bool bCurRowOnly = FALSE );
+ void InitTabCols( SwTabCols& rCols, const SwTableBox *pStart, sal_Bool bCurRowOnly = sal_False );
sal_Int32 GetRightSeparator( SwTabCols& rCols, sal_Int32 nNum) const;
sal_Int32 GetColCount( SwTabCols& rCols ) const;
sal_Int32 GetColWidth( SwTabCols& rCols, sal_Int32 nNum ) throw (css::uno::RuntimeException);
@@ -58,8 +58,8 @@ public:
sal_Int32 getTableWidth( ) throw (css::uno::RuntimeException);
void setTableWidth( sal_Int32 _width ) throw (css::uno::RuntimeException);
- sal_Int32 GetColWidth( sal_Int32 nCol, sal_Int32 nRow = 0, sal_Bool bCurRowOnly = FALSE ) throw (css::uno::RuntimeException);
- void SetColWidth( sal_Int32 _width, sal_Int32 nCol, sal_Int32 nRow = 0, sal_Bool bCurRowOnly = FALSE ) throw (css::uno::RuntimeException);
+ sal_Int32 GetColWidth( sal_Int32 nCol, sal_Int32 nRow = 0, sal_Bool bCurRowOnly = sal_False ) throw (css::uno::RuntimeException);
+ void SetColWidth( sal_Int32 _width, sal_Int32 nCol, sal_Int32 nRow = 0, sal_Bool bCurRowOnly = sal_False ) throw (css::uno::RuntimeException);
static SwTable* GetSwTable( const css::uno::Reference< css::text::XTextTable >& xTextTable ) throw (css::uno::RuntimeException);
static rtl::OUString getColumnStr( sal_Int32 nCol );
diff --git a/sw/source/ui/web/makefile.mk b/sw/source/ui/web/makefile.mk
deleted file mode 100644
index 3dca3955de89..000000000000
--- a/sw/source/ui/web/makefile.mk
+++ /dev/null
@@ -1,62 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=web
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- web.src
-
-EXCEPTIONSFILES = \
- $(SLO)$/wdocsh.obj \
- $(SLO)$/wformsh.obj \
- $(SLO)$/wfrmsh.obj \
- $(SLO)$/wgrfsh.obj \
- $(SLO)$/wlistsh.obj \
- $(SLO)$/wolesh.obj \
- $(SLO)$/wtabsh.obj \
- $(SLO)$/wtextsh.obj \
- $(SLO)$/wview.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/web/web.src b/sw/source/ui/web/web.src
index 3d24d885dfa8..9907982a6bca 100644
--- a/sw/source/ui/web/web.src
+++ b/sw/source/ui/web/web.src
@@ -25,15 +25,10 @@
*
************************************************************************/
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
#include "globals.hrc"
#include "cmdid.h"
#include "web.hrc"
-#include "swmn.hrc"
-#define ACC_SW_WEB
-#include "toolbox.hrc"
#include "helpid.h"
#include "cfgid.h"
@@ -65,124 +60,6 @@ String RID_WEBTOOLS_TOOLBOX
{
Text [ en-US ] = "Main Toolbar/Web" ;
};
-ToolBox RID_WEBTOOLS_TOOLBOX
-{
- HelpID = HID_WEBTOOLS_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Scroll = TRUE ;
- Hide = TRUE ;
- Align = BOXALIGN_LEFT ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = FN_INSERT_CTRL ;
- HelpID = HID_INSERT_CTRL ;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = FN_INSERT_FIELD_CTRL ;
- HelpID = HID_INSERT_FIELD_CTRL ;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_DRAW_TEXT_MARQUEE ;
- HelpID = SID_DRAW_TEXT_MARQUEE ;
- };
- ToolBoxItem
- {
- Identifier = SID_FM_CONFIG ;
- HelpID = SID_FM_CONFIG;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_GLOSSARY_DLG ;
- HelpID = FN_GLOSSARY_DLG ;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = FN_SPELL_GRAMMAR_DIALOG;
- HelpID = FN_SPELL_GRAMMAR_DIALOG;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_AUTOSPELL_CHECK
- };
- ToolBoxItem
- {
- Identifier = FN_HYPHENATE_OPT_DLG;
- HelpID = FN_HYPHENATE_OPT_DLG;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = SID_THESAURUS;
- HelpID = SID_THESAURUS;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_SEARCH_DLG ;
- HelpID = SID_SEARCH_DLG ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_ZOOM;
- HelpID = SID_ATTR_ZOOM ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_VIEW_META_CHARS ;
- HelpID = FN_VIEW_META_CHARS ;
- };
- ToolBoxItem
- {
- Identifier = FN_VIEW_GRAPHIC ;
- HelpID = FN_VIEW_GRAPHIC ;
- };
- ToolBoxItem
- {
- Identifier = FN_PRINT_LAYOUT ;
- HelpID = FN_PRINT_LAYOUT ;
- };
- ToolBoxItem
- {
- Identifier = SID_SOURCEVIEW ;
- HelpID = HID_SOURCEVIEW ;
- };
- };
-};
/*************************************************************************
Textleiste
*************************************************************************/
@@ -190,156 +67,17 @@ String RID_WEBTEXT_TOOLBOX
{
Text [ en-US ] = "Text Object Bar/Web" ;
};
-ToolBox RID_WEBTEXT_TOOLBOX
-{
- HelpID = HID_WEBTEXT_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Hide = TRUE ;
- HideWhenDeactivate = TRUE ;
- LineSpacing = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- ItemList =
- {
- MN_TEMPLATE
- MN_FONT
- MN_TEXT1(TRUE)
- MN_TEXT_LTR_RTL
- MN_TEXT_LINESPACE
- MN_TEXT2
- MN_TEXT_BACKGROUND
- MN_TEXT_DIALOGS(TRUE)
- };
- Scroll = TRUE ;
-};
String RID_WEBFRAME_TOOLBOX
{
Text [ en-US ] = "Frame Object Bar/Web" ;
};
-ToolBox RID_WEBFRAME_TOOLBOX
-{
- HelpID = HID_WEBFRAME_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Hide = TRUE ;
- LineSpacing = TRUE ;
- MenuStrings = TRUE ;
- HideWhenDeactivate = TRUE ;
- Customize = TRUE ;
- ItemList =
- {
- MN_FRAME_WRAP_WEB
- MN_FRAME1
- MN_FRAME3
- MN_LINESTYLE
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- MN_BACKGROUND_COLOR
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- MN_ATTRIBUTES_FRAME
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- MN_LAYER
- ToolBoxItem
- {
- Identifier = FN_TOOL_ANKER ;
- HelpID = FN_TOOL_ANKER ;
- };
- };
- Scroll = TRUE ;
-};
String RID_WEBGRAPHIC_TOOLBOX
{
Text [ en-US ] = "Graphics Object Bar/Web" ;
};
-ToolBox RID_WEBGRAPHIC_TOOLBOX
-{
- HelpID = HID_WEBGRAPHIC_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- MenuStrings = TRUE ;
- Customize = TRUE ;
- Hide = TRUE ;
- ItemList =
- {
- MN_FRAME_WRAP_WEB
- MN_FRAME1
- MN_FRAME3
- MN_LINESTYLE
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- MN_ATTRIBUTES_GRAFIK
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- MN_LAYER
- ToolBoxItem
- {
- Identifier = FN_TOOL_ANKER ;
- HelpID = FN_TOOL_ANKER ;
- DropDown = TRUE ;
- };
- };
- Scroll = TRUE ;
-};
String RID_WEBOLE_TOOLBOX
{
Text [ en-US ] = "Object/Web" ;
};
-ToolBox RID_WEBOLE_TOOLBOX
-{
- HelpID = HID_OLE_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Hide = TRUE ;
- Scroll = TRUE ;
- ItemList =
- {
- MN_FRAME_WRAP_WEB
- MN_FRAME1
- MN_FRAME3
- MN_LINESTYLE
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- MN_ATTRIBUTES_OLE
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- MN_LAYER
- ToolBoxItem
- {
- Identifier = FN_TOOL_ANKER ;
- HelpID = FN_TOOL_ANKER ;
- DropDown = TRUE ;
- };
- };
-};
-/*************************************************************************
-*************************************************************************/
-Menu MN_WEB_TEXT_POPUPMENU
- BASE_TEXT_POPUPMENU_BEGIN
- BASE_TEXT_POPUPMENU_END
diff --git a/sw/source/ui/web/wtextsh.cxx b/sw/source/ui/web/wtextsh.cxx
index adde4bef5128..12912b55cc3c 100644
--- a/sw/source/ui/web/wtextsh.cxx
+++ b/sw/source/ui/web/wtextsh.cxx
@@ -62,7 +62,7 @@
SFX_IMPL_INTERFACE(SwWebTextShell, SwBaseShell, SW_RES(STR_SHELLNAME_WEBTEXT))
{
- SFX_POPUPMENU_REGISTRATION(SW_RES(MN_WEB_TEXT_POPUPMENU));
+ SFX_POPUPMENU_REGISTRATION(SW_RES(MN_TEXT_POPUPMENU));
SFX_OBJECTBAR_REGISTRATION(SFX_OBJECTBAR_OBJECT, SW_RES(RID_TEXT_TOOLBOX));
SFX_CHILDWINDOW_REGISTRATION(FN_EDIT_FORMULA);
SFX_CHILDWINDOW_REGISTRATION(FN_INSERT_FIELD);
diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx
index 20ce3b3d8b15..6ab11faad338 100644
--- a/sw/source/ui/web/wview.cxx
+++ b/sw/source/ui/web/wview.cxx
@@ -71,11 +71,6 @@
#include <shells.hrc>
#define SwWebView
-#define SearchAttributes
-#define ReplaceAttributes
-#define SearchSettings
-#define _ExecSearch ExecSearch
-#define _StateSearch StateSearch
#define Frames
#define Graphics
#define OLEObjects
@@ -90,7 +85,6 @@
#define ListInText
#define ListInTable
#define Page
-#include <svx/svxslots.hxx>
#include <swslots.hxx>
@@ -99,7 +93,6 @@ SFX_IMPL_NAMED_VIEWFACTORY(SwWebView, "Default")
SFX_VIEW_REGISTRATION(SwWebDocShell);
}
-
SFX_IMPL_INTERFACE( SwWebView, SwView, SW_RES(RID_WEBTOOLS_TOOLBOX) )
{
SFX_CHILDWINDOW_REGISTRATION(SfxTemplateDialogWrapper::GetChildWindowId());
@@ -123,11 +116,11 @@ SwWebView::~SwWebView()
void SwWebView::SelectShell()
{
// Entscheidung, ob UpdateTable gerufen werden muss
- BOOL bUpdateTable = FALSE;
+ sal_Bool bUpdateTable = sal_False;
const SwFrmFmt* pCurTableFmt = GetWrtShell().GetTableFmt();
if(pCurTableFmt && pCurTableFmt != GetLastTblFrmFmt())
{
- bUpdateTable = TRUE; // kann erst spaeter ausgefuehrt werden
+ bUpdateTable = sal_True; // kann erst spaeter ausgefuehrt werden
}
SetLastTblFrmFmt(pCurTableFmt);
//SEL_TBL und SEL_TBL_CELLS koennen verodert sein!
@@ -137,7 +130,7 @@ void SwWebView::SelectShell()
int _nSelectionType = GetSelectionType();
if ( nNewSelectionType == _nSelectionType )
{
- GetViewFrame()->GetBindings().InvalidateAll( FALSE );
+ GetViewFrame()->GetBindings().InvalidateAll( sal_False );
if ( _nSelectionType & nsSelectionType::SEL_OLE ||
_nSelectionType & nsSelectionType::SEL_GRF )
//Fuer Grafiken und OLE kann sich natuerlich das Verb aendern!
@@ -158,8 +151,8 @@ void SwWebView::SelectShell()
pBarCfg->SetTopToolbar( _nSelectionType, nId );
SfxShell *pSfxShell;
- USHORT i;
- for ( i = 0; TRUE; ++i )
+ sal_uInt16 i;
+ for ( i = 0; sal_True; ++i )
{
pSfxShell = rDispatcher.GetShell( i );
if ( !( pSfxShell->ISA( SwBaseShell ) ||
@@ -171,15 +164,15 @@ void SwWebView::SelectShell()
rDispatcher.Pop( *pSfxShell, SFX_SHELL_POP_UNTIL | SFX_SHELL_POP_DELETE);
}
- BOOL bInitFormShell = FALSE;
+ sal_Bool bInitFormShell = sal_False;
if( !GetFormShell() )
{
- bInitFormShell = TRUE;
+ bInitFormShell = sal_True;
SetFormShell( new FmFormShell( this ) );
rDispatcher.Push( *GetFormShell() );
}
- BOOL bSetExtInpCntxt = FALSE;
+ sal_Bool bSetExtInpCntxt = sal_False;
_nSelectionType = nNewSelectionType;
SetSelectionType( _nSelectionType );
ShellModes eShellMode;
@@ -251,7 +244,7 @@ void SwWebView::SelectShell()
}
else
{
- bSetExtInpCntxt = TRUE;
+ bSetExtInpCntxt = sal_True;
eShellMode = SHELL_MODE_TEXT;
if ( _nSelectionType & nsSelectionType::SEL_NUM )
{
@@ -275,7 +268,7 @@ void SwWebView::SelectShell()
if( !GetDocShell()->IsReadOnly() )
{
if( bSetExtInpCntxt && GetWrtShell().HasReadonlySel() )
- bSetExtInpCntxt = FALSE;
+ bSetExtInpCntxt = sal_False;
InputContext aCntxt( GetEditWin().GetInputContext() );
aCntxt.SetOptions( bSetExtInpCntxt
@@ -309,7 +302,7 @@ void SwWebView::SelectShell()
//Guenstiger Zeitpunkt fuer die Kommunikation mit OLE-Objekten?
if ( GetDocShell()->GetDoc()->IsOLEPrtNotifyPending() )
- GetDocShell()->GetDoc()->PrtOLENotify( FALSE );
+ GetDocShell()->GetDoc()->PrtOLENotify( sal_False );
//jetzt das Tabellen-Update
if(bUpdateTable)
diff --git a/sw/source/ui/wrtsh/delete.cxx b/sw/source/ui/wrtsh/delete.cxx
index 6eaa3e9e1658..52ca6af91e93 100644
--- a/sw/source/ui/wrtsh/delete.cxx
+++ b/sw/source/ui/wrtsh/delete.cxx
@@ -47,7 +47,7 @@ inline void SwWrtShell::OpenMark()
SetMark();
}
-inline void SwWrtShell::CloseMark( BOOL bOkFlag )
+inline void SwWrtShell::CloseMark( sal_Bool bOkFlag )
{
if( bOkFlag )
UpdateAttr();
@@ -59,9 +59,9 @@ inline void SwWrtShell::CloseMark( BOOL bOkFlag )
}
// #i23725#
-BOOL SwWrtShell::TryRemoveIndent()
+sal_Bool SwWrtShell::TryRemoveIndent()
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
SfxItemSet aAttrSet(GetAttrPool(), RES_LR_SPACE, RES_LR_SPACE);
GetCurAttr(aAttrSet);
@@ -72,19 +72,19 @@ BOOL SwWrtShell::TryRemoveIndent()
if (aOldFirstLineOfst > 0)
{
aItem.SetTxtFirstLineOfst(0);
- bResult = TRUE;
+ bResult = sal_True;
}
else if (aOldFirstLineOfst < 0)
{
aItem.SetTxtFirstLineOfst(0);
aItem.SetLeft(aItem.GetLeft() + aOldFirstLineOfst);
- bResult = TRUE;
+ bResult = sal_True;
}
else if (aItem.GetLeft() != 0)
{
aItem.SetLeft(0);
- bResult = TRUE;
+ bResult = sal_True;
}
if (bResult)
@@ -114,7 +114,7 @@ long SwWrtShell::DelLine()
SwCrsrShell::RightMargin();
long nRet = Delete();
- Pop(FALSE);
+ Pop(sal_False);
if( nRet )
UpdateAttr();
return nRet;
@@ -198,7 +198,7 @@ long SwWrtShell::DelLeft()
}
// JP 29.06.95: nie eine davor stehende Tabelle loeschen.
- BOOL bSwap = FALSE;
+ sal_Bool bSwap = sal_False;
const SwTableNode * pWasInTblNd = SwCrsrShell::IsCrsrInTbl();
if( SwCrsrShell::IsSttPara())
@@ -234,7 +234,7 @@ long SwWrtShell::DelLeft()
OpenMark();
SwCrsrShell::Right(1,CRSR_SKIP_CHARS);
SwCrsrShell::SwapPam();
- bSwap = TRUE;
+ bSwap = sal_True;
}
else
{
@@ -311,7 +311,7 @@ long SwWrtShell::DelRight()
}
// restore cursor
- SwCrsrShell::Pop( FALSE );
+ SwCrsrShell::Pop( sal_False );
if( bDelFull )
{
@@ -351,14 +351,14 @@ long SwWrtShell::DelRight()
have moved to a different cell */
if (pSNdOld != pSNdNew)
{
- SwCrsrShell::Pop( TRUE );
+ SwCrsrShell::Pop( sal_True );
break;
}
}
}
// restore cursor
- SwCrsrShell::Pop( FALSE );
+ SwCrsrShell::Pop( sal_False );
}
}
@@ -435,11 +435,11 @@ long SwWrtShell::DelToEndOfPara()
SetMark();
if( !MovePara(fnParaCurr,fnParaEnd))
{
- Pop(FALSE);
+ Pop(sal_False);
return 0;
}
long nRet = Delete();
- Pop(FALSE);
+ Pop(sal_False);
if( nRet )
UpdateAttr();
return nRet;
@@ -455,11 +455,11 @@ long SwWrtShell::DelToStartOfPara()
SetMark();
if( !MovePara(fnParaCurr,fnParaStart))
{
- Pop(FALSE);
+ Pop(sal_False);
return 0;
}
long nRet = Delete();
- Pop(FALSE);
+ Pop(sal_False);
if( nRet )
UpdateAttr();
return nRet;
@@ -539,11 +539,11 @@ long SwWrtShell::DelPrvWord()
{
// skip over all-1 spaces
short n = -1;
- while( ' ' == GetChar( FALSE, n ))
+ while( ' ' == GetChar( sal_False, n ))
--n;
if( ++n )
- ExtendSelection( FALSE, -n );
+ ExtendSelection( sal_False, -n );
}
}
else if( IsSttPara())
diff --git a/sw/source/ui/wrtsh/makefile.mk b/sw/source/ui/wrtsh/makefile.mk
deleted file mode 100644
index 84ce030afbbe..000000000000
--- a/sw/source/ui/wrtsh/makefile.mk
+++ /dev/null
@@ -1,62 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=wrtsh
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- wrtsh.src
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-EXCEPTIONSFILES = \
- $(SLO)$/delete.obj \
- $(SLO)$/move.obj \
- $(SLO)$/navmgr.obj \
- $(SLO)$/select.obj \
- $(SLO)$/wrtsh1.obj \
- $(SLO)$/wrtsh2.obj \
- $(SLO)$/wrtsh3.obj \
- $(SLO)$/wrtsh4.obj \
- $(SLO)$/wrtundo.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/ui/wrtsh/move.cxx b/sw/source/ui/wrtsh/move.cxx
index 513da4a2fdcb..0e04be3665d5 100644
--- a/sw/source/ui/wrtsh/move.cxx
+++ b/sw/source/ui/wrtsh/move.cxx
@@ -53,12 +53,12 @@ const long nReadOnlyScrollOfst = 10;
class ShellMoveCrsr
{
SwWrtShell* pSh;
- BOOL bAct;
+ sal_Bool bAct;
public:
- inline ShellMoveCrsr( SwWrtShell* pWrtSh, BOOL bSel )
+ inline ShellMoveCrsr( SwWrtShell* pWrtSh, sal_Bool bSel )
{
- bAct = !pWrtSh->ActionPend() && (pWrtSh->GetFrmType(0,FALSE) & FRMTYPE_FLY_ANY);
- ( pSh = pWrtSh )->MoveCrsr( BOOL(bSel) );
+ bAct = !pWrtSh->ActionPend() && (pWrtSh->GetFrmType(0,sal_False) & FRMTYPE_FLY_ANY);
+ ( pSh = pWrtSh )->MoveCrsr( sal_Bool(bSel) );
pWrtSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_HYPERLINK_GETLINK);
}
inline ~ShellMoveCrsr()
@@ -73,7 +73,7 @@ public:
}
};
-void SwWrtShell::MoveCrsr( BOOL bWithSelect )
+void SwWrtShell::MoveCrsr( sal_Bool bWithSelect )
{
ResetCursorStack();
if ( IsGCAttr() )
@@ -86,35 +86,35 @@ void SwWrtShell::MoveCrsr( BOOL bWithSelect )
else
{
EndSelect();
- (this->*fnKillSel)( 0, FALSE );
+ (this->*fnKillSel)( 0, sal_False );
}
}
-BOOL SwWrtShell::SimpleMove( FNSimpleMove FnSimpleMove, BOOL bSelect )
+sal_Bool SwWrtShell::SimpleMove( FNSimpleMove FnSimpleMove, sal_Bool bSelect )
{
- BOOL nRet;
+ sal_Bool nRet;
if( bSelect )
{
SttCrsrMove();
- MoveCrsr( TRUE );
+ MoveCrsr( sal_True );
nRet = (this->*FnSimpleMove)();
EndCrsrMove();
}
else if( 0 != ( nRet = (this->*FnSimpleMove)() ) )
- MoveCrsr( FALSE );
+ MoveCrsr( sal_False );
return nRet;
}
-BOOL SwWrtShell::Left( USHORT nMode, BOOL bSelect,
- USHORT nCount, BOOL bBasicCall, BOOL bVisual )
+sal_Bool SwWrtShell::Left( sal_uInt16 nMode, sal_Bool bSelect,
+ sal_uInt16 nCount, sal_Bool bBasicCall, sal_Bool bVisual )
{
if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly())
{
Point aTmp( VisArea().Pos() );
aTmp.X() -= VisArea().Width() * nReadOnlyScrollOfst / 100;
rView.SetVisArea( aTmp );
- return TRUE;
+ return sal_True;
}
else
{
@@ -125,8 +125,8 @@ BOOL SwWrtShell::Left( USHORT nMode, BOOL bSelect,
-BOOL SwWrtShell::Right( USHORT nMode, BOOL bSelect,
- USHORT nCount, BOOL bBasicCall, BOOL bVisual )
+sal_Bool SwWrtShell::Right( sal_uInt16 nMode, sal_Bool bSelect,
+ sal_uInt16 nCount, sal_Bool bBasicCall, sal_Bool bVisual )
{
if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly() )
{
@@ -134,7 +134,7 @@ BOOL SwWrtShell::Right( USHORT nMode, BOOL bSelect,
aTmp.X() += VisArea().Width() * nReadOnlyScrollOfst / 100;
aTmp.X() = rView.SetHScrollMax( aTmp.X() );
rView.SetVisArea( aTmp );
- return TRUE;
+ return sal_True;
}
else
{
@@ -145,14 +145,14 @@ BOOL SwWrtShell::Right( USHORT nMode, BOOL bSelect,
-BOOL SwWrtShell::Up( BOOL bSelect, USHORT nCount, BOOL bBasicCall )
+sal_Bool SwWrtShell::Up( sal_Bool bSelect, sal_uInt16 nCount, sal_Bool bBasicCall )
{
if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly())
{
Point aTmp( VisArea().Pos() );
aTmp.Y() -= VisArea().Height() * nReadOnlyScrollOfst / 100;
rView.SetVisArea( aTmp );
- return TRUE;
+ return sal_True;
}
else
{
@@ -163,7 +163,7 @@ BOOL SwWrtShell::Up( BOOL bSelect, USHORT nCount, BOOL bBasicCall )
-BOOL SwWrtShell::Down( BOOL bSelect, USHORT nCount, BOOL bBasicCall )
+sal_Bool SwWrtShell::Down( sal_Bool bSelect, sal_uInt16 nCount, sal_Bool bBasicCall )
{
if ( !bSelect && !bBasicCall && IsCrsrReadonly() && !GetViewOptions()->IsSelectionInReadonly())
{
@@ -171,7 +171,7 @@ BOOL SwWrtShell::Down( BOOL bSelect, USHORT nCount, BOOL bBasicCall )
aTmp.Y() += VisArea().Height() * nReadOnlyScrollOfst / 100;
aTmp.Y() = rView.SetVScrollMax( aTmp.Y() );
rView.SetVisArea( aTmp );
- return TRUE;
+ return sal_True;
}
else
{
@@ -182,14 +182,14 @@ BOOL SwWrtShell::Down( BOOL bSelect, USHORT nCount, BOOL bBasicCall )
-BOOL SwWrtShell::LeftMargin( BOOL bSelect, BOOL bBasicCall )
+sal_Bool SwWrtShell::LeftMargin( sal_Bool bSelect, sal_Bool bBasicCall )
{
if ( !bSelect && !bBasicCall && IsCrsrReadonly() )
{
Point aTmp( VisArea().Pos() );
aTmp.X() = DOCUMENTBORDER;
rView.SetVisArea( aTmp );
- return TRUE;
+ return sal_True;
}
else
{
@@ -200,7 +200,7 @@ BOOL SwWrtShell::LeftMargin( BOOL bSelect, BOOL bBasicCall )
-BOOL SwWrtShell::RightMargin( BOOL bSelect, BOOL bBasicCall )
+sal_Bool SwWrtShell::RightMargin( sal_Bool bSelect, sal_Bool bBasicCall )
{
if ( !bSelect && !bBasicCall && IsCrsrReadonly() )
{
@@ -209,7 +209,7 @@ BOOL SwWrtShell::RightMargin( BOOL bSelect, BOOL bBasicCall )
if( DOCUMENTBORDER > aTmp.X() )
aTmp.X() = DOCUMENTBORDER;
rView.SetVisArea( aTmp );
- return TRUE;
+ return sal_True;
}
else
{
@@ -220,12 +220,12 @@ BOOL SwWrtShell::RightMargin( BOOL bSelect, BOOL bBasicCall )
-BOOL SwWrtShell::GoStart( BOOL bKeepArea, BOOL *pMoveTable,
- BOOL bSelect, BOOL bDontMoveRegion )
+sal_Bool SwWrtShell::GoStart( sal_Bool bKeepArea, sal_Bool *pMoveTable,
+ sal_Bool bSelect, sal_Bool bDontMoveRegion )
{
if ( IsCrsrInTbl() )
{
- const BOOL bBoxSelection = HasBoxSelection();
+ const sal_Bool bBoxSelection = HasBoxSelection();
if( !bBlockMode )
{
if ( !bSelect )
@@ -238,14 +238,14 @@ BOOL SwWrtShell::GoStart( BOOL bKeepArea, BOOL *pMoveTable,
|| bDontMoveRegion))
{
if ( pMoveTable )
- *pMoveTable = FALSE;
- return TRUE;
+ *pMoveTable = sal_False;
+ return sal_True;
}
if( MoveTable( fnTableCurr, fnTableStart ) || bDontMoveRegion )
{
if ( pMoveTable )
- *pMoveTable = TRUE;
- return TRUE;
+ *pMoveTable = sal_True;
+ return sal_True;
}
else if( bBoxSelection && pMoveTable )
{
@@ -254,8 +254,8 @@ BOOL SwWrtShell::GoStart( BOOL bKeepArea, BOOL *pMoveTable,
// SelAll gesetzt). Dann darf die Tabelle nicht
// verlassen werden; sonst ist keine Selektion der
// gesamten Tabelle moeglich!
- *pMoveTable = TRUE;
- return TRUE;
+ *pMoveTable = sal_True;
+ return sal_True;
}
}
@@ -266,29 +266,29 @@ BOOL SwWrtShell::GoStart( BOOL bKeepArea, BOOL *pMoveTable,
else
SttSelect();
}
- const USHORT nFrmType = GetFrmType(0,FALSE);
+ const sal_uInt16 nFrmType = GetFrmType(0,sal_False);
if ( FRMTYPE_FLY_ANY & nFrmType )
{
if( MoveSection( fnSectionCurr, fnSectionStart ) )
- return TRUE;
+ return sal_True;
else if ( FRMTYPE_FLY_FREE & nFrmType || bDontMoveRegion )
- return FALSE;
+ return sal_False;
}
if(( FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE ) & nFrmType )
{
if ( MoveSection( fnSectionCurr, fnSectionStart ) )
- return TRUE;
+ return sal_True;
else if ( bKeepArea )
- return TRUE;
+ return sal_True;
}
// Bereiche ???
return SwCrsrShell::MoveRegion( fnRegionCurrAndSkip, fnRegionStart ) ||
- SwCrsrShell::SttEndDoc(TRUE);
+ SwCrsrShell::SttEndDoc(sal_True);
}
-BOOL SwWrtShell::GoEnd(BOOL bKeepArea, BOOL *pMoveTable)
+sal_Bool SwWrtShell::GoEnd(sal_Bool bKeepArea, sal_Bool *pMoveTable)
{
if ( pMoveTable && *pMoveTable )
return MoveTable( fnTableCurr, fnTableEnd );
@@ -297,49 +297,49 @@ BOOL SwWrtShell::GoEnd(BOOL bKeepArea, BOOL *pMoveTable)
{
if ( MoveSection( fnSectionCurr, fnSectionEnd ) ||
MoveTable( fnTableCurr, fnTableEnd ) )
- return TRUE;
+ return sal_True;
}
else
{
- const USHORT nFrmType = GetFrmType(0,FALSE);
+ const sal_uInt16 nFrmType = GetFrmType(0,sal_False);
if ( FRMTYPE_FLY_ANY & nFrmType )
{
if ( MoveSection( fnSectionCurr, fnSectionEnd ) )
- return TRUE;
+ return sal_True;
else if ( FRMTYPE_FLY_FREE & nFrmType )
- return FALSE;
+ return sal_False;
}
if(( FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE ) & nFrmType )
{
if ( MoveSection( fnSectionCurr, fnSectionEnd) )
- return TRUE;
+ return sal_True;
else if ( bKeepArea )
- return TRUE;
+ return sal_True;
}
}
// Bereiche ???
return SwCrsrShell::MoveRegion( fnRegionCurrAndSkip, fnRegionEnd ) ||
- SwCrsrShell::SttEndDoc(FALSE);
+ SwCrsrShell::SttEndDoc(sal_False);
}
-BOOL SwWrtShell::SttDoc( BOOL bSelect )
+sal_Bool SwWrtShell::SttDoc( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
- return GoStart(FALSE, 0, bSelect );
+ return GoStart(sal_False, 0, bSelect );
}
-BOOL SwWrtShell::EndDoc( BOOL bSelect)
+sal_Bool SwWrtShell::EndDoc( sal_Bool bSelect)
{
ShellMoveCrsr aTmp( this, bSelect );
return GoEnd();
}
-BOOL SwWrtShell::SttNxtPg( BOOL bSelect )
+sal_Bool SwWrtShell::SttNxtPg( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePage( fnPageNext, fnPageStart );
@@ -347,7 +347,7 @@ BOOL SwWrtShell::SttNxtPg( BOOL bSelect )
-BOOL SwWrtShell::SttPrvPg( BOOL bSelect )
+sal_Bool SwWrtShell::SttPrvPg( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePage( fnPagePrev, fnPageStart );
@@ -355,7 +355,7 @@ BOOL SwWrtShell::SttPrvPg( BOOL bSelect )
-BOOL SwWrtShell::EndNxtPg( BOOL bSelect )
+sal_Bool SwWrtShell::EndNxtPg( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePage( fnPageNext, fnPageEnd );
@@ -363,7 +363,7 @@ BOOL SwWrtShell::EndNxtPg( BOOL bSelect )
-BOOL SwWrtShell::EndPrvPg( BOOL bSelect )
+sal_Bool SwWrtShell::EndPrvPg( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePage( fnPagePrev, fnPageEnd );
@@ -371,7 +371,7 @@ BOOL SwWrtShell::EndPrvPg( BOOL bSelect )
-BOOL SwWrtShell::SttPg( BOOL bSelect )
+sal_Bool SwWrtShell::SttPg( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePage( fnPageCurr, fnPageStart );
@@ -379,7 +379,7 @@ BOOL SwWrtShell::SttPg( BOOL bSelect )
-BOOL SwWrtShell::EndPg( BOOL bSelect )
+sal_Bool SwWrtShell::EndPg( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePage( fnPageCurr, fnPageEnd );
@@ -387,7 +387,7 @@ BOOL SwWrtShell::EndPg( BOOL bSelect )
-BOOL SwWrtShell::SttPara( BOOL bSelect )
+sal_Bool SwWrtShell::SttPara( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePara( fnParaCurr, fnParaStart );
@@ -395,7 +395,7 @@ BOOL SwWrtShell::SttPara( BOOL bSelect )
-BOOL SwWrtShell::EndPara( BOOL bSelect )
+sal_Bool SwWrtShell::EndPara( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect );
return MovePara(fnParaCurr,fnParaEnd);
@@ -410,7 +410,7 @@ BOOL SwWrtShell::EndPara( BOOL bSelect )
-BOOL SwWrtShell::StartOfColumn( BOOL bSelect )
+sal_Bool SwWrtShell::StartOfColumn( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect);
return MoveColumn(fnColumnCurr, fnColumnStart);
@@ -418,7 +418,7 @@ BOOL SwWrtShell::StartOfColumn( BOOL bSelect )
-BOOL SwWrtShell::EndOfColumn( BOOL bSelect )
+sal_Bool SwWrtShell::EndOfColumn( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect);
return MoveColumn(fnColumnCurr, fnColumnEnd);
@@ -426,7 +426,7 @@ BOOL SwWrtShell::EndOfColumn( BOOL bSelect )
-BOOL SwWrtShell::StartOfNextColumn( BOOL bSelect )
+sal_Bool SwWrtShell::StartOfNextColumn( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect);
return MoveColumn( fnColumnNext, fnColumnStart);
@@ -434,7 +434,7 @@ BOOL SwWrtShell::StartOfNextColumn( BOOL bSelect )
-BOOL SwWrtShell::EndOfNextColumn( BOOL bSelect )
+sal_Bool SwWrtShell::EndOfNextColumn( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect);
return MoveColumn(fnColumnNext, fnColumnEnd);
@@ -442,7 +442,7 @@ BOOL SwWrtShell::EndOfNextColumn( BOOL bSelect )
-BOOL SwWrtShell::StartOfPrevColumn( BOOL bSelect )
+sal_Bool SwWrtShell::StartOfPrevColumn( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect);
return MoveColumn(fnColumnPrev, fnColumnStart);
@@ -450,7 +450,7 @@ BOOL SwWrtShell::StartOfPrevColumn( BOOL bSelect )
-BOOL SwWrtShell::EndOfPrevColumn( BOOL bSelect )
+sal_Bool SwWrtShell::EndOfPrevColumn( sal_Bool bSelect )
{
ShellMoveCrsr aTmp( this, bSelect);
return MoveColumn(fnColumnPrev, fnColumnEnd);
@@ -458,9 +458,9 @@ BOOL SwWrtShell::EndOfPrevColumn( BOOL bSelect )
-BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect)
+sal_Bool SwWrtShell::PushCrsr(SwTwips lOffset, sal_Bool bSelect)
{
- BOOL bDiff = FALSE;
+ sal_Bool bDiff = sal_False;
SwRect aOldRect( GetCharRect() ), aTmpArea( VisArea() );
//bDestOnStack besagt, ob ich den Cursor nicht an die aktuelle Position
@@ -477,15 +477,15 @@ BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect)
aPt.Y() += lOffset;
aDest = GetCntntPos(aPt,lOffset > 0);
aDest.X() = aPt.X();
- bDestOnStack = TRUE;
+ bDestOnStack = sal_True;
}
//falls wir eine Rahmenselektion hatten, muss diese nach dem
//fnSetCrsr entfernt werden und damit wir da wieder hinkommen
//auf dem Stack gemerkt werden.
- BOOL bIsFrmSel = FALSE;
+ sal_Bool bIsFrmSel = sal_False;
- BOOL bIsObjSel = FALSE;
+ sal_Bool bIsObjSel = sal_False;
//Zielposition liegt jetzt innerhalb des sichtbaren Bereiches -->
//Cursor an die Zielposition setzen; merken, dass keine Ziel-
@@ -516,7 +516,7 @@ BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect)
CallChgLnk();
}
- (this->*fnSetCrsr)( &aDest, TRUE );
+ (this->*fnSetCrsr)( &aDest, sal_True );
bDiff = aOldRect != GetCharRect();
@@ -528,7 +528,7 @@ BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect)
}
// Zuruecksetzen des Dest. SPoint Flags
- bDestOnStack = FALSE;
+ bDestOnStack = sal_False;
}
// Position auf den Stack; bDiff besagt, ob ein Unterschied zwischen
@@ -540,12 +540,12 @@ BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect)
-BOOL SwWrtShell::PopCrsr(BOOL bUpdate, BOOL bSelect)
+sal_Bool SwWrtShell::PopCrsr(sal_Bool bUpdate, sal_Bool bSelect)
{
if( 0 == pCrsrStack)
- return FALSE;
+ return sal_False;
- const BOOL bValidPos = pCrsrStack->bValidCurPos;
+ const sal_Bool bValidPos = pCrsrStack->bValidCurPos;
if( bUpdate && bValidPos )
{
// falls ein Vorgaenger auf dem Stack steht, dessen Flag fuer eine
@@ -573,7 +573,7 @@ BOOL SwWrtShell::PopCrsr(BOOL bUpdate, BOOL bSelect)
else
{
_ResetCursorStack();
- return FALSE;
+ return sal_False;
}
}
CrsrStack *pTmp = pCrsrStack;
@@ -582,7 +582,7 @@ BOOL SwWrtShell::PopCrsr(BOOL bUpdate, BOOL bSelect)
if( 0 == pCrsrStack )
{
ePageMove = MV_NO;
- bDestOnStack = FALSE;
+ bDestOnStack = sal_False;
}
return bValidPos;
}
@@ -604,7 +604,7 @@ void SwWrtShell::_ResetCursorStack()
pCrsrStack = pTmp;
}
ePageMove = MV_NO;
- bDestOnStack = FALSE;
+ bDestOnStack = sal_False;
}
/**************
@@ -619,10 +619,10 @@ void SwWrtShell::_ResetCursorStack()
-BOOL SwWrtShell::PageCrsr(SwTwips lOffset, BOOL bSelect)
+sal_Bool SwWrtShell::PageCrsr(SwTwips lOffset, sal_Bool bSelect)
{
// nichts tun, wenn ein Offset von 0 angegeben wurde
- if(!lOffset) return FALSE;
+ if(!lOffset) return sal_False;
// Diente mal dazu, eine Neuformatierung fuer das Layout
// zu erzwingen.
// Hat so nicht funktioniert, da der Cursor nicht gesetzt
@@ -638,19 +638,19 @@ BOOL SwWrtShell::PageCrsr(SwTwips lOffset, BOOL bSelect)
// ViewShell::StartAction();
PageMove eDir = lOffset > 0? MV_PAGE_DOWN: MV_PAGE_UP;
// Richtungswechsel und Stack vorhanden
- if( eDir != ePageMove && ePageMove != MV_NO && PopCrsr( TRUE, bSelect ))
- return TRUE;
+ if( eDir != ePageMove && ePageMove != MV_NO && PopCrsr( sal_True, bSelect ))
+ return sal_True;
- const BOOL bRet = PushCrsr(lOffset, bSelect);
+ const sal_Bool bRet = PushCrsr(lOffset, bSelect);
ePageMove = eDir;
return bRet;
}
-BOOL SwWrtShell::GotoPage(USHORT nPage, BOOL bRecord)
+sal_Bool SwWrtShell::GotoPage(sal_uInt16 nPage, sal_Bool bRecord)
{
- ShellMoveCrsr aTmp( this, FALSE);
+ ShellMoveCrsr aTmp( this, sal_False);
if( SwCrsrShell::GotoPage(nPage) && bRecord)
{
if(IsSelFrmMode())
@@ -658,14 +658,14 @@ BOOL SwWrtShell::GotoPage(USHORT nPage, BOOL bRecord)
UnSelectFrm();
LeaveSelFrmMode();
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, BOOL bSelect, BOOL bStart )
+sal_Bool SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, sal_Bool bSelect, sal_Bool bStart )
{
ShellMoveCrsr aTmp( this, bSelect );
SwPosition aPos = *GetCrsr()->GetPoint();
@@ -675,7 +675,7 @@ BOOL SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, BOOL bSelect, B
return bRet;
}
-BOOL SwWrtShell::GotoFly( const String& rName, FlyCntType eType, BOOL bSelFrame )
+sal_Bool SwWrtShell::GotoFly( const String& rName, FlyCntType eType, sal_Bool bSelFrame )
{
SwPosition aPos = *GetCrsr()->GetPoint();
bool bRet = SwFEShell::GotoFly(rName, eType, bSelFrame);
@@ -684,7 +684,7 @@ BOOL SwWrtShell::GotoFly( const String& rName, FlyCntType eType, BOOL bSelFrame
return bRet;
}
-BOOL SwWrtShell::GotoINetAttr( const SwTxtINetFmt& rAttr )
+sal_Bool SwWrtShell::GotoINetAttr( const SwTxtINetFmt& rAttr )
{
SwPosition aPos = *GetCrsr()->GetPoint();
bool bRet = SwCrsrShell::GotoINetAttr(rAttr);
@@ -693,13 +693,13 @@ BOOL SwWrtShell::GotoINetAttr( const SwTxtINetFmt& rAttr )
return bRet;
}
-void SwWrtShell::GotoOutline( USHORT nIdx )
+void SwWrtShell::GotoOutline( sal_uInt16 nIdx )
{
addCurrentPosition();
return SwCrsrShell::GotoOutline (nIdx);
}
-BOOL SwWrtShell::GotoOutline( const String& rName )
+sal_Bool SwWrtShell::GotoOutline( const String& rName )
{
SwPosition aPos = *GetCrsr()->GetPoint();
bool bRet = SwCrsrShell::GotoOutline (rName);
@@ -708,7 +708,7 @@ BOOL SwWrtShell::GotoOutline( const String& rName )
return bRet;
}
-BOOL SwWrtShell::GotoRegion( const String& rName )
+sal_Bool SwWrtShell::GotoRegion( const String& rName )
{
SwPosition aPos = *GetCrsr()->GetPoint();
bool bRet = SwCrsrShell::GotoRegion (rName);
@@ -717,8 +717,8 @@ BOOL SwWrtShell::GotoRegion( const String& rName )
return bRet;
}
-BOOL SwWrtShell::GotoRefMark( const String& rRefMark, USHORT nSubType,
- USHORT nSeqNo )
+sal_Bool SwWrtShell::GotoRefMark( const String& rRefMark, sal_uInt16 nSubType,
+ sal_uInt16 nSeqNo )
{
SwPosition aPos = *GetCrsr()->GetPoint();
bool bRet = SwCrsrShell::GotoRefMark(rRefMark, nSubType, nSeqNo);
@@ -727,7 +727,7 @@ BOOL SwWrtShell::GotoRefMark( const String& rRefMark, USHORT nSubType,
return bRet;
}
-BOOL SwWrtShell::GotoNextTOXBase( const String* pName )
+sal_Bool SwWrtShell::GotoNextTOXBase( const String* pName )
{
SwPosition aPos = *GetCrsr()->GetPoint();
bool bRet = SwCrsrShell::GotoNextTOXBase(pName);
@@ -736,7 +736,7 @@ BOOL SwWrtShell::GotoNextTOXBase( const String* pName )
return bRet;
}
-BOOL SwWrtShell::GotoTable( const String& rName )
+sal_Bool SwWrtShell::GotoTable( const String& rName )
{
SwPosition aPos = *GetCrsr()->GetPoint();
bool bRet = SwCrsrShell::GotoTable(rName);
@@ -745,7 +745,7 @@ BOOL SwWrtShell::GotoTable( const String& rName )
return bRet;
}
-BOOL SwWrtShell::GotoFld( const SwFmtFld& rFld ) {
+sal_Bool SwWrtShell::GotoFld( const SwFmtFld& rFld ) {
SwPosition aPos = *GetCrsr()->GetPoint();
bool bRet = SwCrsrShell::GotoFld(rFld);
if (bRet)
@@ -753,7 +753,7 @@ BOOL SwWrtShell::GotoFld( const SwFmtFld& rFld ) {
return bRet;
}
-const SwRedline* SwWrtShell::GotoRedline( USHORT nArrPos, BOOL bSelect ) {
+const SwRedline* SwWrtShell::GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect ) {
SwPosition aPos = *GetCrsr()->GetPoint();
const SwRedline *pRedline = SwCrsrShell::GotoRedline(nArrPos, bSelect);
if (pRedline)
@@ -763,13 +763,13 @@ const SwRedline* SwWrtShell::GotoRedline( USHORT nArrPos, BOOL bSelect ) {
-BOOL SwWrtShell::SelectTxtAttr( USHORT nWhich, const SwTxtAttr* pAttr )
+sal_Bool SwWrtShell::SelectTxtAttr( sal_uInt16 nWhich, const SwTxtAttr* pAttr )
{
- BOOL bRet;
+ sal_Bool bRet;
{
MV_KONTEXT(this);
SttSelect();
- bRet = SwCrsrShell::SelectTxtAttr( nWhich, FALSE, pAttr );
+ bRet = SwCrsrShell::SelectTxtAttr( nWhich, sal_False, pAttr );
}
EndSelect();
return bRet;
diff --git a/sw/source/ui/wrtsh/navmgr.cxx b/sw/source/ui/wrtsh/navmgr.cxx
index a56bf5df0782..2ef5b17d5ef4 100644
--- a/sw/source/ui/wrtsh/navmgr.cxx
+++ b/sw/source/ui/wrtsh/navmgr.cxx
@@ -77,7 +77,7 @@ SwNavigationMgr::SwNavigationMgr(SwWrtShell* pShell)
* It is called when we want to check if the back button should be enabled or not.
* The back button should be enabled only if there are some entries in the navigation history
*/
-BOOL SwNavigationMgr::backEnabled() {
+sal_Bool SwNavigationMgr::backEnabled() {
return (_nCurrent > 0);
}
/*
@@ -87,7 +87,7 @@ BOOL SwNavigationMgr::backEnabled() {
* current position within the navigation history entries in not the last one
* i.e. when the _nCurrent index is not at the end of the _entries vector
*/
-BOOL SwNavigationMgr::forwardEnabled() {
+sal_Bool SwNavigationMgr::forwardEnabled() {
return _nCurrent+1 < _entries.size();
}
diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx
index b45b5ed585c7..e07320f14511 100644
--- a/sw/source/ui/wrtsh/select.cxx
+++ b/sw/source/ui/wrtsh/select.cxx
@@ -63,7 +63,7 @@ using namespace ::com::sun::star::util;
static long nStartDragX = 0, nStartDragY = 0;
-static BOOL bStartDrag = FALSE;
+static sal_Bool bStartDrag = sal_False;
void SwWrtShell::Invalidate()
{
@@ -72,21 +72,21 @@ void SwWrtShell::Invalidate()
GetView().GetViewFrame()->GetBindings().Invalidate( FN_STAT_SELMODE );
}
-BOOL SwWrtShell::SelNearestWrd()
+sal_Bool SwWrtShell::SelNearestWrd()
{
MV_KONTEXT(this);
if( !IsInWrd() && !IsEndWrd() && !IsSttWrd() )
PrvWrd();
if( IsEndWrd() )
- Left(CRSR_SKIP_CELLS, FALSE, 1, FALSE );
+ Left(CRSR_SKIP_CELLS, sal_False, 1, sal_False );
return SelWrd();
}
-BOOL SwWrtShell::SelWrd(const Point *pPt, BOOL )
+sal_Bool SwWrtShell::SelWrd(const Point *pPt, sal_Bool )
{
- BOOL bRet;
+ sal_Bool bRet;
{
MV_KONTEXT(this);
SttSelect();
@@ -95,14 +95,14 @@ BOOL SwWrtShell::SelWrd(const Point *pPt, BOOL )
EndSelect();
if( bRet )
{
- bSelWrd = TRUE;
+ bSelWrd = sal_True;
if(pPt)
aStart = *pPt;
}
return bRet;
}
-void SwWrtShell::SelSentence(const Point *pPt, BOOL )
+void SwWrtShell::SelSentence(const Point *pPt, sal_Bool )
{
{
MV_KONTEXT(this);
@@ -114,11 +114,11 @@ void SwWrtShell::SelSentence(const Point *pPt, BOOL )
EndSelect();
if(pPt)
aStart = *pPt;
- bSelLn = TRUE;
- bSelWrd = FALSE; // SelWord abschalten, sonst geht kein SelLine weiter
+ bSelLn = sal_True;
+ bSelWrd = sal_False; // SelWord abschalten, sonst geht kein SelLine weiter
}
-void SwWrtShell::SelPara(const Point *pPt, BOOL )
+void SwWrtShell::SelPara(const Point *pPt, sal_Bool )
{
{
MV_KONTEXT(this);
@@ -130,20 +130,20 @@ void SwWrtShell::SelPara(const Point *pPt, BOOL )
EndSelect();
if(pPt)
aStart = *pPt;
- bSelLn = FALSE;
- bSelWrd = FALSE; // SelWord abschalten, sonst geht kein SelLine weiter
+ bSelLn = sal_False;
+ bSelWrd = sal_False; // SelWord abschalten, sonst geht kein SelLine weiter
}
long SwWrtShell::SelAll()
{
- const BOOL bLockedView = IsViewLocked();
- LockView( TRUE );
+ const sal_Bool bLockedView = IsViewLocked();
+ LockView( sal_True );
{
if(bBlockMode)
LeaveBlockMode();
MV_KONTEXT(this);
- BOOL bMoveTable = FALSE;
+ sal_Bool bMoveTable = sal_False;
SwPosition *pStartPos = 0;
SwPosition *pEndPos = 0;
SwShellCrsr* pTmpCrsr = 0;
@@ -158,19 +158,19 @@ long SwWrtShell::SelAll()
pEndPos = new SwPosition( *pTmpCrsr->GetMark() );
}
Push();
- BOOL bIsFullSel = !MoveSection( fnSectionCurr, fnSectionStart);
+ sal_Bool bIsFullSel = !MoveSection( fnSectionCurr, fnSectionStart);
SwapPam();
bIsFullSel &= !MoveSection( fnSectionCurr, fnSectionEnd);
- Pop(FALSE);
- GoStart(TRUE, &bMoveTable, FALSE, !bIsFullSel);
+ Pop(sal_False);
+ GoStart(sal_True, &bMoveTable, sal_False, !bIsFullSel);
}
else
{
EnterStdMode();
- SttEndDoc(TRUE);
+ SttEndDoc(sal_True);
}
SttSelect();
- GoEnd(TRUE, &bMoveTable);
+ GoEnd(sal_True, &bMoveTable);
if( pStartPos )
{
pTmpCrsr = getShellCrsr( false );
@@ -184,7 +184,7 @@ long SwWrtShell::SelAll()
if( *pTmpCrsr->GetPoint() < *pEndPos ||
( *pStartPos == *pTmpCrsr->GetMark() &&
*pEndPos == *pTmpCrsr->GetPoint() ) )
- SwCrsrShell::SttEndDoc(FALSE);
+ SwCrsrShell::SttEndDoc(sal_False);
}
delete pStartPos;
delete pEndPos;
@@ -200,18 +200,18 @@ long SwWrtShell::SelAll()
------------------------------------------------------------------------*/
-ULONG SwWrtShell::SearchPattern( const SearchOptions& rSearchOpt, BOOL bSearchInNotes,
+sal_uLong SwWrtShell::SearchPattern( const SearchOptions& rSearchOpt, sal_Bool bSearchInNotes,
SwDocPositions eStt, SwDocPositions eEnd,
FindRanges eFlags, int bReplace )
{
// keine Erweiterung bestehender Selektionen
if(!(eFlags & FND_IN_SEL))
ClearMark();
- BOOL bCancel = FALSE;
- ULONG nRet = Find( rSearchOpt, bSearchInNotes, eStt, eEnd, bCancel, eFlags, bReplace );
+ sal_Bool bCancel = sal_False;
+ sal_uLong nRet = Find( rSearchOpt, bSearchInNotes, eStt, eEnd, bCancel, eFlags, bReplace );
if(bCancel)
{
- Undo(UNDO_EMPTY, 1);
+ Undo(1);
nRet = ULONG_MAX;
}
return nRet;
@@ -222,7 +222,7 @@ ULONG SwWrtShell::SearchPattern( const SearchOptions& rSearchOpt, BOOL bSearchIn
-ULONG SwWrtShell::SearchTempl( const String &rTempl,
+sal_uLong SwWrtShell::SearchTempl( const String &rTempl,
SwDocPositions eStt, SwDocPositions eEnd,
FindRanges eFlags, const String* pReplTempl )
{
@@ -234,12 +234,12 @@ ULONG SwWrtShell::SearchTempl( const String &rTempl,
if( pReplTempl )
pReplaceColl = GetParaStyle(*pReplTempl, SwWrtShell::GETSTYLE_CREATESOME );
- BOOL bCancel = FALSE;
- ULONG nRet = Find(pColl? *pColl: GetDfltTxtFmtColl(),
+ sal_Bool bCancel = sal_False;
+ sal_uLong nRet = Find(pColl? *pColl: GetDfltTxtFmtColl(),
eStt,eEnd, bCancel, eFlags, pReplaceColl);
if(bCancel)
{
- Undo(UNDO_EMPTY, 1);
+ Undo(1);
nRet = ULONG_MAX;
}
return nRet;
@@ -249,7 +249,7 @@ ULONG SwWrtShell::SearchTempl( const String &rTempl,
-ULONG SwWrtShell::SearchAttr( const SfxItemSet& rFindSet, BOOL bNoColls,
+sal_uLong SwWrtShell::SearchAttr( const SfxItemSet& rFindSet, sal_Bool bNoColls,
SwDocPositions eStart, SwDocPositions eEnde,
FindRanges eFlags, const SearchOptions* pSearchOpt,
const SfxItemSet* pReplaceSet )
@@ -259,12 +259,12 @@ ULONG SwWrtShell::SearchAttr( const SfxItemSet& rFindSet, BOOL bNoColls,
ClearMark();
// Suchen
- BOOL bCancel = FALSE;
- ULONG nRet = Find( rFindSet, bNoColls, eStart, eEnde, bCancel, eFlags, pSearchOpt, pReplaceSet);
+ sal_Bool bCancel = sal_False;
+ sal_uLong nRet = Find( rFindSet, bNoColls, eStart, eEnde, bCancel, eFlags, pSearchOpt, pReplaceSet);
if(bCancel)
{
- Undo(UNDO_EMPTY, 1);
+ Undo(1);
nRet = ULONG_MAX;
}
return nRet;
@@ -307,7 +307,7 @@ void SwWrtShell::PopMode()
-long SwWrtShell::SetCrsr(const Point *pPt, BOOL bTextOnly)
+long SwWrtShell::SetCrsr(const Point *pPt, sal_Bool bTextOnly)
{
/*
* eine gfs. bestehende Selektion an der Position des
@@ -321,10 +321,10 @@ long SwWrtShell::SetCrsr(const Point *pPt, BOOL bTextOnly)
}
-long SwWrtShell::SetCrsrKillSel(const Point *pPt, BOOL bTextOnly )
+long SwWrtShell::SetCrsrKillSel(const Point *pPt, sal_Bool bTextOnly )
{
ACT_KONTEXT(this);
- ResetSelect(pPt,FALSE);
+ ResetSelect(pPt,sal_False);
return SwCrsrShell::SetCrsr(*pPt, bTextOnly);
}
@@ -344,7 +344,7 @@ void SwWrtShell::UnSelectFrm()
-long SwWrtShell::ResetSelect(const Point *,BOOL)
+long SwWrtShell::ResetSelect(const Point *,sal_Bool)
{
if(IsSelFrmMode())
{
@@ -361,7 +361,7 @@ long SwWrtShell::ResetSelect(const Point *,BOOL)
*/
{
ACT_KONTEXT(this);
- bSelWrd = bSelLn = FALSE;
+ bSelWrd = bSelLn = sal_False;
KillPams();
ClearMark();
fnKillSel = &SwWrtShell::Ignore;
@@ -383,7 +383,7 @@ long SwWrtShell::ResetSelect(const Point *,BOOL)
/*
* tue nichts
*/
-long SwWrtShell::Ignore(const Point *, BOOL ) {
+long SwWrtShell::Ignore(const Point *, sal_Bool ) {
return 1;
}
@@ -407,7 +407,7 @@ void SwWrtShell::SttSelect()
}
fnKillSel = &SwWrtShell::Ignore;
fnSetCrsr = &SwWrtShell::SetCrsr;
- bInSelect = TRUE;
+ bInSelect = sal_True;
Invalidate();
SwTransferable::CreateSelection( *this );
}
@@ -421,8 +421,8 @@ void SwWrtShell::EndSelect()
{
if(!bInSelect || bExtMode)
return;
- bInSelect = FALSE;
- (this->*fnLeaveSelect)(0,FALSE);
+ bInSelect = sal_False;
+ (this->*fnLeaveSelect)(0,sal_False);
if(!bAddMode) {
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
fnKillSel = &SwWrtShell::ResetSelect;
@@ -432,14 +432,14 @@ void SwWrtShell::EndSelect()
* zu erweitern.
*/
-inline BOOL operator<(const Point &rP1,const Point &rP2)
+inline sal_Bool operator<(const Point &rP1,const Point &rP2)
{
return rP1.Y() < rP2.Y() || (rP1.Y() == rP2.Y() && rP1.X() < rP2.X());
}
-long SwWrtShell::ExtSelWrd(const Point *pPt, BOOL )
+long SwWrtShell::ExtSelWrd(const Point *pPt, sal_Bool )
{
MV_KONTEXT(this);
if( IsTableMode() )
@@ -449,7 +449,7 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, BOOL )
// Then destroy the actual an go to prev, this will be expand
if( !HasMark() && GoPrevCrsr() )
{
- BOOL bHasMark = HasMark(); // thats wrong!
+ sal_Bool bHasMark = HasMark(); // thats wrong!
GoNextCrsr();
if( bHasMark )
{
@@ -459,19 +459,19 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, BOOL )
}
// check the direction of the selection with the new point
- BOOL bRet = FALSE, bMoveCrsr = TRUE, bToTop = FALSE;
+ sal_Bool bRet = sal_False, bMoveCrsr = sal_True, bToTop = sal_False;
SwCrsrShell::SelectWord( &aStart ); // select the startword
SwCrsrShell::Push(); // save the cursor
SwCrsrShell::SetCrsr( *pPt ); // and check the direction
switch( SwCrsrShell::CompareCursor( StackMkCurrPt ))
{
- case -1: bToTop = FALSE; break;
- case 1: bToTop = TRUE; break;
- default: bMoveCrsr = FALSE; break;
+ case -1: bToTop = sal_False; break;
+ case 1: bToTop = sal_True; break;
+ default: bMoveCrsr = sal_False; break;
}
- SwCrsrShell::Pop( FALSE ); // retore the saved cursor
+ SwCrsrShell::Pop( sal_False ); // retore the saved cursor
if( bMoveCrsr )
{
@@ -486,22 +486,22 @@ long SwWrtShell::ExtSelWrd(const Point *pPt, BOOL )
if( bToTop )
SwapPam();
Combine();
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
- SwCrsrShell::Pop( FALSE );
+ SwCrsrShell::Pop( sal_False );
if( bToTop )
SwapPam();
}
}
else
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
-long SwWrtShell::ExtSelLn(const Point *pPt, BOOL )
+long SwWrtShell::ExtSelLn(const Point *pPt, sal_Bool )
{
MV_KONTEXT(this);
SwCrsrShell::SetCrsr(*pPt);
@@ -512,7 +512,7 @@ long SwWrtShell::ExtSelLn(const Point *pPt, BOOL )
// Then destroy the actual an go to prev, this will be expand
if( !HasMark() && GoPrevCrsr() )
{
- BOOL bHasMark = HasMark(); // thats wrong!
+ sal_Bool bHasMark = HasMark(); // thats wrong!
GoNextCrsr();
if( bHasMark )
{
@@ -522,7 +522,7 @@ long SwWrtShell::ExtSelLn(const Point *pPt, BOOL )
}
// ggfs. den Mark der Selektion anpassen
- BOOL bToTop = !IsCrsrPtAtEnd();
+ sal_Bool bToTop = !IsCrsrPtAtEnd();
SwapPam();
// der "Mark" muss am Zeilenende/-anfang stehen
@@ -553,9 +553,9 @@ void SwWrtShell::EnterStdMode()
LeaveAddMode();
if(bBlockMode)
LeaveBlockMode();
- bBlockMode = FALSE;
- bExtMode = FALSE;
- bInSelect = FALSE;
+ bBlockMode = sal_False;
+ bExtMode = sal_False;
+ bInSelect = sal_False;
if(IsSelFrmMode())
{
UnSelectFrm();
@@ -569,7 +569,7 @@ void SwWrtShell::EnterStdMode()
*/
{
ACT_KONTEXT(this);
- bSelWrd = bSelLn = FALSE;
+ bSelWrd = bSelLn = sal_False;
if( !IsRetainSelection() )
KillPams();
ClearMark();
@@ -595,9 +595,9 @@ void SwWrtShell::EnterExtMode()
KillPams();
ClearMark();
}
- bExtMode = TRUE;
- bAddMode = FALSE;
- bBlockMode = FALSE;
+ bExtMode = sal_True;
+ bAddMode = sal_False;
+ bBlockMode = sal_False;
SttSelect();
}
@@ -605,7 +605,7 @@ void SwWrtShell::EnterExtMode()
void SwWrtShell::LeaveExtMode()
{
- bExtMode = FALSE;
+ bExtMode = sal_False;
EndSelect();
}
/*
@@ -615,7 +615,7 @@ void SwWrtShell::LeaveExtMode()
-long SwWrtShell::SttLeaveSelect(const Point *, BOOL )
+long SwWrtShell::SttLeaveSelect(const Point *, sal_Bool )
{
if(SwCrsrShell::HasSelection() && !IsSelTblCells() && bClearMark) {
return 0;
@@ -629,7 +629,7 @@ long SwWrtShell::SttLeaveSelect(const Point *, BOOL )
-long SwWrtShell::AddLeaveSelect(const Point *, BOOL )
+long SwWrtShell::AddLeaveSelect(const Point *, sal_Bool )
{
if(IsTableMode()) LeaveAddMode();
else if(SwCrsrShell::HasSelection())
@@ -650,9 +650,9 @@ void SwWrtShell::EnterAddMode()
fnLeaveSelect = &SwWrtShell::AddLeaveSelect;
fnKillSel = &SwWrtShell::Ignore;
fnSetCrsr = &SwWrtShell::SetCrsr;
- bAddMode = TRUE;
- bBlockMode = FALSE;
- bExtMode = FALSE;
+ bAddMode = sal_True;
+ bBlockMode = sal_False;
+ bExtMode = sal_False;
if(SwCrsrShell::HasSelection())
CreateCrsr();
Invalidate();
@@ -665,7 +665,7 @@ void SwWrtShell::LeaveAddMode()
fnLeaveSelect = &SwWrtShell::SttLeaveSelect;
fnKillSel = &SwWrtShell::ResetSelect;
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
- bAddMode = FALSE;
+ bAddMode = sal_False;
Invalidate();
}
@@ -675,9 +675,9 @@ void SwWrtShell::LeaveAddMode()
void SwWrtShell::EnterBlockMode()
{
- bBlockMode = FALSE;
+ bBlockMode = sal_False;
EnterStdMode();
- bBlockMode = TRUE;
+ bBlockMode = sal_True;
CrsrToBlockCrsr();
Invalidate();
}
@@ -686,7 +686,7 @@ void SwWrtShell::EnterBlockMode()
void SwWrtShell::LeaveBlockMode()
{
- bBlockMode = FALSE;
+ bBlockMode = sal_False;
BlockCrsrToCrsr();
EndSelect();
Invalidate();
@@ -696,7 +696,7 @@ void SwWrtShell::LeaveBlockMode()
-void SwWrtShell::SetInsMode( BOOL bOn )
+void SwWrtShell::SetInsMode( sal_Bool bOn )
{
bIns = bOn;
SwCrsrShell::SetOverwriteCrsr( !bIns );
@@ -707,7 +707,7 @@ void SwWrtShell::SetInsMode( BOOL bOn )
Invalidate();
}
//Overwrite mode is incompatible with red-lining
-void SwWrtShell::SetRedlineModeAndCheckInsMode( USHORT eMode )
+void SwWrtShell::SetRedlineModeAndCheckInsMode( sal_uInt16 eMode )
{
SetRedlineMode( eMode );
if (IsRedlineOn())
@@ -719,16 +719,16 @@ void SwWrtShell::SetRedlineModeAndCheckInsMode( USHORT eMode )
*/
-long SwWrtShell::BeginFrmDrag(const Point *pPt, BOOL)
+long SwWrtShell::BeginFrmDrag(const Point *pPt, sal_Bool)
{
fnDrag = &SwFEShell::Drag;
if(bStartDrag)
{
Point aTmp( nStartDragX, nStartDragY );
- SwFEShell::BeginDrag( &aTmp, FALSE );
+ SwFEShell::BeginDrag( &aTmp, sal_False );
}
else
- SwFEShell::BeginDrag( pPt, FALSE );
+ SwFEShell::BeginDrag( pPt, sal_False );
return 1;
}
@@ -740,9 +740,9 @@ void SwWrtShell::EnterSelFrmMode(const Point *pPos)
{
nStartDragX = pPos->X();
nStartDragY = pPos->Y();
- bStartDrag = TRUE;
+ bStartDrag = sal_True;
}
- bNoEdit = bLayoutMode = TRUE;
+ bNoEdit = bLayoutMode = sal_True;
HideCrsr();
// gleicher Aufruf von BeginDrag an der SwFEShell
@@ -758,8 +758,8 @@ void SwWrtShell::LeaveSelFrmMode()
{
fnDrag = &SwWrtShell::BeginDrag;
fnEndDrag = &SwWrtShell::EndDrag;
- bLayoutMode = FALSE;
- bStartDrag = FALSE;
+ bLayoutMode = sal_False;
+ bStartDrag = sal_False;
Edit();
SwBaseShell::SetFrmMode( FLY_DRAG_END, this );
Invalidate();
@@ -780,7 +780,7 @@ IMPL_LINK( SwWrtShell, ExecFlyMac, void *, pFlyFmt )
{
const SvxMacro &rMac = rFmtMac.GetMacro(SW_EVENT_OBJECT_SELECT);
if( IsFrmSelected() )
- bLayoutMode = TRUE;
+ bLayoutMode = sal_True;
CallChgLnk();
ExecMacro( rMac );
}
@@ -789,10 +789,10 @@ IMPL_LINK( SwWrtShell, ExecFlyMac, void *, pFlyFmt )
-long SwWrtShell::UpdateLayoutFrm(const Point *pPt, BOOL )
+long SwWrtShell::UpdateLayoutFrm(const Point *pPt, sal_Bool )
{
// voerst Dummy
- SwFEShell::EndDrag( pPt, FALSE );
+ SwFEShell::EndDrag( pPt, sal_False );
fnDrag = &SwWrtShell::BeginFrmDrag;
return 1;
}
@@ -831,11 +831,11 @@ long SwWrtShell::ToggleExtMode()
-long SwWrtShell::BeginDrag(const Point * /*pPt*/, BOOL )
+long SwWrtShell::BeginDrag(const Point * /*pPt*/, sal_Bool )
{
if(bSelWrd)
{
- bInSelect = TRUE;
+ bInSelect = sal_True;
if( !IsCrsrPtAtEnd() )
SwapPam();
@@ -844,7 +844,7 @@ long SwWrtShell::BeginDrag(const Point * /*pPt*/, BOOL )
}
else if(bSelLn)
{
- bInSelect = TRUE;
+ bInSelect = sal_True;
fnDrag = &SwWrtShell::ExtSelLn;
fnSetCrsr = &SwWrtShell::Ignore;
}
@@ -859,7 +859,7 @@ long SwWrtShell::BeginDrag(const Point * /*pPt*/, BOOL )
-long SwWrtShell::Drag(const Point *, BOOL )
+long SwWrtShell::Drag(const Point *, sal_Bool )
{
if( IsSelTblCells() )
aSelTblLink.Call(this);
@@ -869,7 +869,7 @@ long SwWrtShell::Drag(const Point *, BOOL )
-long SwWrtShell::EndDrag(const Point * /*pPt*/, BOOL )
+long SwWrtShell::EndDrag(const Point * /*pPt*/, sal_Bool )
{
fnDrag = &SwWrtShell::BeginDrag;
if( IsExtSel() )
@@ -882,7 +882,7 @@ long SwWrtShell::EndDrag(const Point * /*pPt*/, BOOL )
}
// --> FME 2004-07-30 #i32329# Enhanced table selection
-BOOL SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag )
+sal_Bool SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag )
{
MV_KONTEXT(this);
SttSelect();
@@ -890,9 +890,9 @@ BOOL SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bR
{
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
fnKillSel = &SwWrtShell::ResetSelect;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// <--
@@ -900,39 +900,39 @@ BOOL SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bR
Beschreibung: Selektion einer Tabellenzeile / Spalte
------------------------------------------------------------------------*/
-BOOL SwWrtShell::SelectTableRow()
+sal_Bool SwWrtShell::SelectTableRow()
{
if ( SelTblRow() )
{
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
fnKillSel = &SwWrtShell::ResetSelect;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwWrtShell::SelectTableCol()
+sal_Bool SwWrtShell::SelectTableCol()
{
if ( SelTblCol() )
{
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
fnKillSel = &SwWrtShell::ResetSelect;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SwWrtShell::SelectTableCell()
+sal_Bool SwWrtShell::SelectTableCell()
{
if ( SelTblBox() )
{
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
fnKillSel = &SwWrtShell::ResetSelect;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*------------------------------------------------------------------------
Beschreibung: Prueft, ob eine Wortselektion vorliegt.
@@ -943,28 +943,28 @@ BOOL SwWrtShell::SelectTableCell()
-int SwWrtShell::IntelligentCut(int nSelection, BOOL bCut)
+int SwWrtShell::IntelligentCut(int nSelection, sal_Bool bCut)
{
// kein intelligentes Drag and Drop bei Mehrfachselektion
// es existieren mehrere Cursor, da ein zweiter bereits
// an die Zielposition gesetzt wurde
if( IsAddMode() || !(nSelection & nsSelectionType::SEL_TXT) )
- return FALSE;
+ return sal_False;
String sTxt;
CharClass& rCC = GetAppCharClass();
// wenn das erste und das letzte Zeichen kein Wortzeichen ist,
// ist kein Wort selektiert.
- sal_Unicode cPrev = GetChar(FALSE);
- sal_Unicode cNext = GetChar(TRUE, -1);
+ sal_Unicode cPrev = GetChar(sal_False);
+ sal_Unicode cNext = GetChar(sal_True, -1);
if( !cPrev || !cNext ||
!rCC.isLetterNumeric( ( sTxt = cPrev), 0 ) ||
!rCC.isLetterNumeric( ( sTxt = cNext), 0 ) )
return NO_WORD;
- cPrev = GetChar(FALSE, -1);
- cNext = GetChar(TRUE);
+ cPrev = GetChar(sal_False, -1);
+ cNext = GetChar(sal_True);
int cWord = NO_WORD;
// ist ein Wort selektiert?
@@ -988,7 +988,7 @@ int SwWrtShell::IntelligentCut(int nSelection, BOOL bCut)
SetMark();
SwCrsrShell::Left(1,CRSR_SKIP_CHARS);
SwFEShell::Delete();
- Pop( FALSE );
+ Pop( sal_False );
}
}
else if(cWord == WORD_NO_SPACE && cNext == ' ')
@@ -1002,7 +1002,7 @@ int SwWrtShell::IntelligentCut(int nSelection, BOOL bCut)
SetMark();
SwCrsrShell::Right(1,CRSR_SKIP_CHARS);
SwFEShell::Delete();
- Pop( FALSE );
+ Pop( sal_False );
}
}
return cWord;
@@ -1012,24 +1012,24 @@ int SwWrtShell::IntelligentCut(int nSelection, BOOL bCut)
// jump to the next / previous hyperlink - inside text and also
// on graphics
-BOOL SwWrtShell::SelectNextPrevHyperlink( BOOL bNext )
+sal_Bool SwWrtShell::SelectNextPrevHyperlink( sal_Bool bNext )
{
StartAction();
- BOOL bRet = SwCrsrShell::SelectNxtPrvHyperlink( bNext );
+ sal_Bool bRet = SwCrsrShell::SelectNxtPrvHyperlink( bNext );
if( !bRet )
{
// will we have this feature?
EnterStdMode();
if( bNext )
- SttEndDoc(TRUE);
+ SttEndDoc(sal_True);
else
- SttEndDoc(FALSE);
+ SttEndDoc(sal_False);
bRet = SwCrsrShell::SelectNxtPrvHyperlink( bNext );
}
EndAction();
- BOOL bCreateXSelection = FALSE;
- const BOOL bFrmSelected = IsFrmSelected() || IsObjSelected();
+ sal_Bool bCreateXSelection = sal_False;
+ const sal_Bool bFrmSelected = IsFrmSelected() || IsObjSelected();
if( IsSelection() )
{
if ( bFrmSelected )
@@ -1039,18 +1039,18 @@ BOOL SwWrtShell::SelectNextPrevHyperlink( BOOL bNext )
// bei Cursor setzen
fnKillSel = &SwWrtShell::ResetSelect;
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
- bCreateXSelection = TRUE;
+ bCreateXSelection = sal_True;
}
else if( bFrmSelected )
{
EnterSelFrmMode();
- bCreateXSelection = TRUE;
+ bCreateXSelection = sal_True;
}
else if( (CNT_GRF | CNT_OLE ) & GetCntType() )
{
SelectObj( GetCharRect().Pos() );
EnterSelFrmMode();
- bCreateXSelection = TRUE;
+ bCreateXSelection = sal_True;
}
if( bCreateXSelection )
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index 16012c41a80f..efa944a9e70f 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/embed/XVisualObject.hpp>
#include <com/sun/star/embed/EmbedMisc.hpp>
@@ -35,6 +36,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/util/XModifiable.hpp>
#include <math.h>
#include <hintids.hxx>
@@ -57,11 +59,11 @@
#include <vcl/graph.hxx>
#include <sfx2/printer.hxx>
#include <unotools/charclass.hxx>
-
#include <comphelper/storagehelper.hxx>
#include <svx/svxdlg.hxx>
#include <svx/extrusionbar.hxx>
#include <svx/fontworkbar.hxx>
+#include <frmfmt.hxx>
#include <fmtftn.hxx>
#include <fmtpdsc.hxx>
#include <wdocsh.hxx>
@@ -71,6 +73,7 @@
#include <view.hxx>
#include <uitool.hxx>
#include <cmdid.h>
+#include <cfgitems.hxx>
#include <pagedesc.hxx>
#include <frmmgr.hxx>
#include <shellio.hxx>
@@ -98,13 +101,13 @@
// -> #111827#
#include <SwRewriter.hxx>
#include <comcore.hrc>
-#include <undobj.hxx>
// <- #111827#
#include <toolkit/helper/vclunohelper.hxx>
#include <sfx2/viewfrm.hxx>
#include "PostItMgr.hxx"
+#include <sfx2/msgpool.hxx>
using namespace sw::mark;
using namespace com::sun::star;
@@ -119,12 +122,12 @@ using namespace com::sun::star;
pCrsrStack(0), \
rView(rShell),\
aNavigationMgr(this), \
- bDestOnStack(FALSE), \
+ bDestOnStack(sal_False), \
fnLeaveSelect(&SwWrtShell::SttLeaveSelect)
#define BITFLD_INI_LIST \
bClearMark = \
- bIns = TRUE;\
+ bIns = sal_True;\
bAddMode = \
bBlockMode = \
bExtMode = \
@@ -135,7 +138,7 @@ using namespace com::sun::star;
bSelWrd = \
bSelLn = \
bIsInClickToEdit = \
- mbRetainSelection = FALSE;
+ mbRetainSelection = sal_False;
SvxAutoCorrect* lcl_IsAutoCorr()
@@ -148,11 +151,11 @@ SvxAutoCorrect* lcl_IsAutoCorr()
return pACorr;
}
-void SwWrtShell::NoEdit(BOOL bHideCrsr)
+void SwWrtShell::NoEdit(sal_Bool bHideCrsr)
{
if(bHideCrsr)
HideCrsr();
- bNoEdit = TRUE;
+ bNoEdit = sal_True;
}
@@ -162,17 +165,17 @@ void SwWrtShell::Edit()
if (CanInsert())
{
ShowCrsr();
- bNoEdit = FALSE;
+ bNoEdit = sal_False;
}
}
-BOOL SwWrtShell::IsEndWrd()
+sal_Bool SwWrtShell::IsEndWrd()
{
MV_KONTEXT(this);
if(IsEndPara() && !IsSttPara())
- return TRUE;
+ return sal_True;
return IsEndWord();
}
@@ -184,14 +187,14 @@ BOOL SwWrtShell::IsEndWrd()
-BOOL SwWrtShell::_CanInsert()
+sal_Bool SwWrtShell::_CanInsert()
{
if(!CanInsert())
{
Sound::Beep();
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
/*------------------------------------------------------------------------
Beschreibung: String einfuegen
@@ -201,11 +204,11 @@ void SwWrtShell::InsertByWord( const String & rStr)
{
if( rStr.Len() )
{
- BOOL bDelim = GetAppCharClass().isLetterNumeric( rStr, 0 );
+ sal_Bool bDelim = GetAppCharClass().isLetterNumeric( rStr, 0 );
xub_StrLen nPos = 0, nStt = 0;
for( ; nPos < rStr.Len(); nPos++ )
{
- BOOL bTmpDelim = GetAppCharClass().isLetterNumeric( rStr, nPos );
+ sal_Bool bTmpDelim = GetAppCharClass().isLetterNumeric( rStr, nPos );
if( bTmpDelim != bDelim )
{
Insert( rStr.Copy( nStt, nPos - nStt ));
@@ -224,7 +227,7 @@ void SwWrtShell::Insert( const String &rStr )
if( !_CanInsert() )
return;
- BOOL bStarted = FALSE, bHasSel = HasSelection(),
+ sal_Bool bStarted = sal_False, bHasSel = HasSelection(),
bCallIns = bIns /*|| bHasSel*/;
bool bDeleted = false;
@@ -249,7 +252,7 @@ void SwWrtShell::Insert( const String &rStr )
}
StartUndo(UNDO_REPLACE, &aRewriter);
- bStarted = TRUE;
+ bStarted = sal_True;
bDeleted = DelRight() != 0;
}
@@ -260,7 +263,7 @@ void SwWrtShell::Insert( const String &rStr )
if( bStarted )
{
EndAllAction();
- EndUndo(UNDO_REPLACE);
+ EndUndo();
}
}
@@ -271,7 +274,7 @@ void SwWrtShell::Insert( const String &rStr )
void SwWrtShell::Insert( const String &rPath, const String &rFilter,
const Graphic &rGrf, SwFlyFrmAttrMgr *pFrmMgr,
- BOOL bRule )
+ sal_Bool bRule )
{
ResetCursorStack();
if ( !_CanInsert() )
@@ -293,13 +296,13 @@ void SwWrtShell::Insert( const String &rPath, const String &rFilter,
EnterSelFrmMode();
- BOOL bSetGrfSize = TRUE;
- BOOL bOwnMgr = FALSE;
+ sal_Bool bSetGrfSize = sal_True;
+ sal_Bool bOwnMgr = sal_False;
if ( !pFrmMgr )
{
- bOwnMgr = TRUE;
- pFrmMgr = new SwFlyFrmAttrMgr( TRUE, this, FRMMGR_TYPE_GRF );
+ bOwnMgr = sal_True;
+ pFrmMgr = new SwFlyFrmAttrMgr( sal_True, this, FRMMGR_TYPE_GRF );
// VORSICHT
// GetAttrSet nimmt einen Abgleich vor
@@ -317,7 +320,7 @@ void SwWrtShell::Insert( const String &rPath, const String &rFilter,
pFrmMgr->SetSize( aSz );
}
else if ( aSz.Width() != DFLT_WIDTH && aSz.Height() != DFLT_HEIGHT )
- bSetGrfSize = FALSE;
+ bSetGrfSize = sal_False;
pFrmMgr->SetHeightSizeType(ATT_FIX_SIZE);
@@ -359,7 +362,7 @@ void SwWrtShell::Insert( const String &rPath, const String &rFilter,
if ( bOwnMgr )
delete pFrmMgr;
- EndUndo(UNDO_INSERT);
+ EndUndo();
EndAllAction();
}
@@ -371,7 +374,7 @@ void SwWrtShell::Insert( const String &rPath, const String &rFilter,
void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName *pName,
- BOOL bActivate, USHORT nSlotId )
+ sal_Bool bActivate, sal_uInt16 nSlotId )
{
ResetCursorStack();
if( !_CanInsert() )
@@ -382,7 +385,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
// temporary storage
svt::EmbeddedObjectRef xObj;
uno::Reference < embed::XStorage > xStor = comphelper::OStorageHelper::GetTemporaryStorage();
- BOOL bDoVerb = TRUE;
+ sal_Bool bDoVerb = sal_True;
if ( pName )
{
comphelper::EmbeddedObjectContainer aCnt( xStor );
@@ -404,12 +407,15 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
// TODO/LATER: recording! Convert properties to items
case SID_INSERT_PLUGIN:
- case SID_INSERT_APPLET:
case SID_INSERT_FLOATINGFRAME:
{
+ SfxSlotPool* pSlotPool = SW_MOD()->GetSlotPool();
+ const SfxSlot* pSlot = pSlotPool->GetSlot(nSlotId);
+ rtl::OString aCmd(".uno:");
+ aCmd += pSlot->GetUnoName();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractInsertObjectDialog* pDlg =
- pFact->CreateInsertObjectDialog( GetWin(), nSlotId, xStor, &aServerList );
+ pFact->CreateInsertObjectDialog( GetWin(), rtl::OUString( aCmd, aCmd.getLength(), RTL_TEXTENCODING_UTF8 ), xStor, &aServerList );
if ( pDlg )
{
pDlg->Execute();
@@ -440,7 +446,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
if ( !pClient )
{
pClient = new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj );
- SetCheckForOLEInCaption( TRUE );
+ SetCheckForOLEInCaption( sal_True );
}
if ( xObj.GetViewAspect() == embed::Aspects::MSOLE_ICON )
@@ -477,7 +483,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
Vom ClipBoard oder Insert
------------------------------------------------------------------------*/
-BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFmt **pFlyFrmFmt )
+sal_Bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFmt **pFlyFrmFmt )
{
ResetCursorStack();
StartAllAction();
@@ -491,9 +497,9 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm
// break should be insertet. StarMath objects are character bound and
// no break should be inserted.
//3. If an selektion is passed to a StarMath object, this object should
- // not be activated. FALSE should be returned then.
- BOOL bStarMath = TRUE;
- BOOL bActivate = TRUE;
+ // not be activated. sal_False should be returned then.
+ sal_Bool bStarMath = sal_True;
+ sal_Bool bActivate = sal_True;
// set parent to get correct VisArea(in case of object needing parent printer)
uno::Reference < container::XChild > xChild( xRef.GetObject(), uno::UNO_QUERY );
@@ -517,7 +523,7 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm
try
{
xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Formula")), uno::makeAny( ::rtl::OUString( aMathData ) ) );
- bActivate = FALSE;
+ bActivate = sal_False;
}
catch ( uno::Exception& )
{
@@ -529,11 +535,11 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm
}
if ( !bStarMath )
- SwFEShell::SplitNode( FALSE, FALSE );
+ SwFEShell::SplitNode( sal_False, sal_False );
EnterSelFrmMode();
- SwFlyFrmAttrMgr aFrmMgr( TRUE, this, FRMMGR_TYPE_OLE );
+ SwFlyFrmAttrMgr aFrmMgr( sal_True, this, FRMMGR_TYPE_OLE );
aFrmMgr.SetHeightSizeType(ATT_FIX_SIZE);
SwRect aBound;
@@ -553,9 +559,39 @@ BOOL SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyFrmFm
aFrmMgr.SetSize( aSz );
SwFlyFrmFmt *pFmt = SwFEShell::InsertObject( xRef, &aFrmMgr.GetAttrSet() );
+ // --> #i972#
+ if ( bStarMath && pDoc->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) )
+ AlignFormulaToBaseline( xRef.GetObject() );
+ // <--
+
if (pFlyFrmFmt)
*pFlyFrmFmt = pFmt;
+ if ( SotExchange::IsChart( aCLSID ) )
+ {
+ uno::Reference< embed::XEmbeddedObject > xEmbeddedObj( xRef.GetObject(), uno::UNO_QUERY );
+ if ( xEmbeddedObj.is() )
+ {
+ bool bDisableDataTableDialog = false;
+ svt::EmbeddedObjectRef::TryRunningState( xEmbeddedObj );
+ uno::Reference< beans::XPropertySet > xProps( xEmbeddedObj->getComponent(), uno::UNO_QUERY );
+ if ( xProps.is() &&
+ ( xProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ) ) >>= bDisableDataTableDialog ) &&
+ bDisableDataTableDialog )
+ {
+ xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ),
+ uno::makeAny( sal_False ) );
+ xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableComplexChartTypes" ) ),
+ uno::makeAny( sal_False ) );
+ uno::Reference< util::XModifiable > xModifiable( xProps, uno::UNO_QUERY );
+ if ( xModifiable.is() )
+ {
+ xModifiable->setModified( sal_True );
+ }
+ }
+ }
+ }
+
EndAllAction();
GetView().AutoCaption(OLE_CAP, &aCLSID);
@@ -593,12 +629,12 @@ void SwWrtShell::LaunchOLEObj( long nVerb )
if ( !pCli )
pCli = new SwOleClient( &GetView(), &GetView().GetEditWin(), xRef );
- ((SwOleClient*)pCli)->SetInDoVerb( TRUE );
+ ((SwOleClient*)pCli)->SetInDoVerb( sal_True );
CalcAndSetScale( xRef );
pCli->DoVerb( nVerb );
- ((SwOleClient*)pCli)->SetInDoVerb( FALSE );
+ ((SwOleClient*)pCli)->SetInDoVerb( sal_False );
CalcAndSetScale( xRef );
}
}
@@ -677,7 +713,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
bool bResetEnableSetModified(false);
if ( GetDoc()->GetDocShell()->IsEnableSetModified() )
{
- GetDoc()->GetDocShell()->EnableSetModified( FALSE );
+ GetDoc()->GetDocShell()->EnableSetModified( sal_False );
bResetEnableSetModified = true;
}
@@ -690,7 +726,7 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
if ( bResetEnableSetModified )
{
- GetDoc()->GetDocShell()->EnableSetModified( TRUE );
+ GetDoc()->GetDocShell()->EnableSetModified( sal_True );
}
}
// <--
@@ -713,6 +749,8 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
if ( (embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY & nMisc) || bLinkingChart
// TODO/LATER: ResizeOnPrinterChange
//|| SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE & xObj->GetMiscStatus()
+ || nMisc & embed::EmbedMisc::EMBED_NEVERRESIZE // non-resizable objects need to be
+ // set the size back by this method
)
{
pCli = new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj );
@@ -823,6 +861,17 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
if ( bUseObjectSize )
{
+ // --> this moves non-resizable object so that when adding borders the baseline remains the same
+ const SwFlyFrmFmt *pFlyFrmFmt = dynamic_cast< const SwFlyFrmFmt * >( GetFlyFrmFmt() );
+ OSL_ENSURE( pFlyFrmFmt, "Could not find fly frame." );
+ if ( pFlyFrmFmt )
+ {
+ const Point &rPoint = pFlyFrmFmt->GetLastFlyFrmPrtRectPos();
+ SwRect aRect( pFlyPrtRect ? *pFlyPrtRect
+ : GetAnyCurRect( RECT_FLY_PRT_EMBEDDED, 0, xObj.GetObject() ));
+ aArea += rPoint - aRect.Pos(); // adjust area by diff of printing area position in order to keep baseline alignment correct.
+ }
+ // <--
aArea.Width ( _aVisArea.Width() );
aArea.Height( _aVisArea.Height() );
RequestObjectResize( aArea, xObj.GetObject() );
@@ -854,7 +903,7 @@ void SwWrtShell::ConnectObj( svt::EmbeddedObjectRef& xObj, const SwRect &rPrt,
-void SwWrtShell::InsertPageBreak(const String *pPageDesc, USHORT nPgNum )
+void SwWrtShell::InsertPageBreak(const String *pPageDesc, sal_uInt16 nPgNum )
{
ResetCursorStack();
if( _CanInsert() )
@@ -872,7 +921,7 @@ void SwWrtShell::InsertPageBreak(const String *pPageDesc, USHORT nPgNum )
}
const SwPageDesc *pDesc = pPageDesc
- ? FindPageDescByName( *pPageDesc, TRUE ) : 0;
+ ? FindPageDescByName( *pPageDesc, sal_True ) : 0;
if( pDesc )
{
SwFmtPageDesc aDesc( pDesc );
@@ -924,7 +973,7 @@ void SwWrtShell::InsertColumnBreak()
{
if(HasSelection())
DelRight();
- SwFEShell::SplitNode( FALSE, FALSE );
+ SwFEShell::SplitNode( sal_False, sal_False );
}
SetAttr(SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK));
@@ -938,7 +987,7 @@ void SwWrtShell::InsertColumnBreak()
------------------------------------------------------------------------*/
-void SwWrtShell::InsertFootnote(const String &rStr, BOOL bEndNote, BOOL bEdit )
+void SwWrtShell::InsertFootnote(const String &rStr, sal_Bool bEndNote, sal_Bool bEdit )
{
ResetCursorStack();
if( _CanInsert() )
@@ -960,7 +1009,7 @@ void SwWrtShell::InsertFootnote(const String &rStr, BOOL bEndNote, BOOL bEdit )
if( bEdit )
{
// zur Bearbeiung des Fussnotentextes
- Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
GotoFtnTxt();
}
aNavigationMgr.addEntry(aPos);
@@ -973,7 +1022,7 @@ void SwWrtShell::InsertFootnote(const String &rStr, BOOL bEndNote, BOOL bEdit )
------------------------------------------------------------------------*/
-void SwWrtShell::SplitNode( BOOL bAutoFmt, BOOL bCheckTableStart )
+void SwWrtShell::SplitNode( sal_Bool bAutoFmt, sal_Bool bCheckTableStart )
{
ResetCursorStack();
if( _CanInsert() )
@@ -981,7 +1030,7 @@ void SwWrtShell::SplitNode( BOOL bAutoFmt, BOOL bCheckTableStart )
ACT_KONTEXT(this);
rView.GetEditWin().FlushInBuffer();
- BOOL bHasSel = HasSelection();
+ sal_Bool bHasSel = HasSelection();
if( bHasSel )
{
StartUndo( UNDO_INSERT );
@@ -1007,11 +1056,11 @@ void SwWrtShell::SplitNode( BOOL bAutoFmt, BOOL bCheckTableStart )
// -> #i40041#
// Preconditions (as far as OD has figured out):
-// - <SwEditShell::HasNumber()> is FALSE, if <bNum> is TRUE
-// - <SwEditShell::HasBullet()> is FALSE, if <bNum> is FALSE
+// - <SwEditShell::HasNumber()> is sal_False, if <bNum> is sal_True
+// - <SwEditShell::HasBullet()> is sal_False, if <bNum> is sal_False
// Behavior of method is determined by the current situation at the current
// cursor position in the document.
-void SwWrtShell::NumOrBulletOn(BOOL bNum)
+void SwWrtShell::NumOrBulletOn(sal_Bool bNum)
{
// determine numbering rule found at current cursor position in the docment.
const SwNumRule* pCurRule = GetCurNumRule();
@@ -1021,12 +1070,12 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
const SwNumRule * pNumRule = pCurRule;
// - activate outline rule respectively turning on outline rule for
- // current text node. But, only for turning on a numbering (<bNum> == TRUE).
+ // current text node. But, only for turning on a numbering (<bNum> == sal_True).
// - overwrite found numbering rule at current cursor position, if
// no numbering rule can be retrieved from the paragraph style.
bool bContinueFoundNumRule( false );
bool bActivateOutlineRule( false );
- int nActivateOutlineLvl( MAXLEVEL ); // only relevant, if <bActivateOutlineRule> == TRUE
+ int nActivateOutlineLvl( MAXLEVEL ); // only relevant, if <bActivateOutlineRule> == sal_True
SwTxtFmtColl * pColl = GetCurTxtFmtColl();
if ( pColl )
{
@@ -1040,7 +1089,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
if ( pCollRule && pCollRule == GetDoc()->GetOutlineNumRule() )
{
const SwNumRule* pDirectCollRule =
- pDoc->FindNumRulePtr(pColl->GetNumRule( FALSE ).GetValue());
+ pDoc->FindNumRulePtr(pColl->GetNumRule( sal_False ).GetValue());
if ( !pDirectCollRule )
{
pCollRule = 0;
@@ -1071,7 +1120,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
OSL_ENSURE( pColl->IsAssignedToListLevelOfOutlineStyle(),
"<SwWrtShell::NumOrBulletOn(..)> - paragraph style with outline rule, but no outline level" );
if ( pColl->IsAssignedToListLevelOfOutlineStyle() &&
- pCollRule->Get( static_cast<USHORT>(nActivateOutlineLvl) ).GetNumberingType()
+ pCollRule->Get( static_cast<sal_uInt16>(nActivateOutlineLvl) ).GetNumberingType()
== SVX_NUM_NUMBER_NONE )
{
// activate outline numbering
@@ -1087,7 +1136,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
{
// --> OD 2009-08-27 #i101234#
// activate outline numbering, because from the precondition
- // it's known, that <SwEdit::HasNumber()> == FALSE
+ // it's known, that <SwEdit::HasNumber()> == sal_False
bActivateOutlineRule = true;
nActivateOutlineLvl = pColl->GetAssignedOutlineStyleLevel();//<-end,zhaojianwei
}
@@ -1098,11 +1147,11 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
// Check, if corresponding list level of the outline numbering
// has already a numbering format set.
nActivateOutlineLvl = pColl->GetAssignedOutlineStyleLevel();//<-end,zhaojianwei,need further consideration
- if ( pCollRule->Get( static_cast<USHORT>(nActivateOutlineLvl) ).GetNumberingType()
+ if ( pCollRule->Get( static_cast<sal_uInt16>(nActivateOutlineLvl) ).GetNumberingType()
== SVX_NUM_NUMBER_NONE )
{
// activate outline numbering, because from the precondition
- // it's known, that <SwEdit::HasNumber()> == FALSE
+ // it's known, that <SwEdit::HasNumber()> == sal_False
bActivateOutlineRule = true;
}
else
@@ -1120,7 +1169,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
OSL_ENSURE( pColl->IsAssignedToListLevelOfOutlineStyle(),
"<SwWrtShell::NumOrBulletOn(..)> - paragraph style with outline rule, but no outline level" );
if ( pColl->IsAssignedToListLevelOfOutlineStyle() &&
- pCollRule->Get( static_cast<USHORT>(nActivateOutlineLvl) ).GetNumberingType()
+ pCollRule->Get( static_cast<sal_uInt16>(nActivateOutlineLvl) ).GetNumberingType()
== SVX_NUM_NUMBER_NONE )
{
// activate outline numbering
@@ -1184,7 +1233,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
if (nLevel >= MAXLEVEL)
nLevel = MAXLEVEL - 1;
- SwNumFmt aFmt(aNumRule.Get(static_cast<USHORT>(nLevel)));
+ SwNumFmt aFmt(aNumRule.Get(static_cast<sal_uInt16>(nLevel)));
if (bNum)
aFmt.SetNumberingType(SVX_NUM_ARABIC);
@@ -1196,10 +1245,10 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
const Font* pFnt = &numfunc::GetDefBulletFont();
aFmt.SetBulletFont( pFnt );
}
- aFmt.SetBulletChar( numfunc::GetBulletChar(static_cast<BYTE>(nLevel)));
+ aFmt.SetBulletChar( numfunc::GetBulletChar(static_cast<sal_uInt8>(nLevel)));
aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
}
- aNumRule.Set(static_cast<USHORT>(nLevel), aFmt);
+ aNumRule.Set(static_cast<sal_uInt16>(nLevel), aFmt);
}
}
@@ -1240,7 +1289,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
const bool bHtml = 0 != PTR_CAST(SwWebDocShell, pDocSh);
const bool bRightToLeft = IsInRightToLeftText();
- for( BYTE nLvl = 0; nLvl < MAXLEVEL; ++nLvl )
+ for( sal_uInt8 nLvl = 0; nLvl < MAXLEVEL; ++nLvl )
{
SwNumFmt aFmt( aNumRule.Get( nLvl ) );
aFmt.SetCharFmt( pChrFmt );
@@ -1322,7 +1371,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
void SwWrtShell::NumOn()
{
- NumOrBulletOn(TRUE);
+ NumOrBulletOn(sal_True);
}
void SwWrtShell::NumOrBulletOff()
@@ -1357,7 +1406,7 @@ void SwWrtShell::NumOrBulletOff()
// --> OD 2005-10-24 #126346# - Cursor can not be anymore in front of
// a label, because numbering/bullet is switched off.
- SetInFrontOfLabel( FALSE );
+ SetInFrontOfLabel( sal_False );
// <--
}
}
@@ -1369,7 +1418,7 @@ void SwWrtShell::NumOrBulletOff()
void SwWrtShell::BulletOn()
{
- NumOrBulletOn(FALSE);
+ NumOrBulletOn(sal_False);
}
@@ -1474,7 +1523,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 );
}
@@ -1494,7 +1543,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 );
}
@@ -1513,7 +1562,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;
@@ -1538,7 +1587,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 );
}
@@ -1550,7 +1599,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();
}
@@ -1589,19 +1638,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();
@@ -1632,14 +1681,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 );
@@ -1703,14 +1752,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;
@@ -1719,7 +1768,7 @@ BOOL SwWrtShell::Pop( BOOL bOldCrsr )
return bRet;
}
-BOOL SwWrtShell::CanInsert()
+sal_Bool SwWrtShell::CanInsert()
{
return (!(IsSelFrmMode() | IsObjSelected() | (GetView().GetDrawFuncPtr() != NULL) | (GetView().GetPostItMgr()->GetActiveSidebarWin()!= NULL)));
}
diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx
index 2d793f3410e5..d5612caaceb6 100644
--- a/sw/source/ui/wrtsh/wrtsh2.cxx
+++ b/sw/source/ui/wrtsh/wrtsh2.cxx
@@ -52,6 +52,7 @@
#include <reffld.hxx>
#include <swundo.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <viewopt.hxx> // SwViewOptions
#include <frmfmt.hxx> // fuer UpdateTable
#include <swtable.hxx> // fuer UpdateTable
@@ -68,8 +69,7 @@
#include <wrtsh.hrc>
#include "swabstdlg.hxx"
#include "fldui.hrc"
-
-#include <undobj.hxx>
+#include <SwRewriter.hxx>
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
@@ -93,7 +93,7 @@ void SwWrtShell::Insert(SwField &rFld)
}
SwEditShell::Insert2(rFld, bDeleted);
- EndUndo(UNDO_INSERT);
+ EndUndo();
EndAllAction();
}
@@ -103,7 +103,7 @@ void SwWrtShell::Insert(SwField &rFld)
-void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, BOOL bOnlyInSel )
+void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, sal_Bool bOnlyInSel )
{
// ueber die Liste der Eingabefelder gehen und Updaten
SwInputFieldList* pTmp = pLst;
@@ -113,21 +113,21 @@ void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, BOOL bOnlyInSel )
if (bOnlyInSel)
pTmp->RemoveUnselectedFlds();
- const USHORT nCnt = pTmp->Count();
+ const sal_uInt16 nCnt = pTmp->Count();
if(nCnt)
{
pTmp->PushCrsr();
- BOOL bCancel = FALSE;
+ sal_Bool bCancel = sal_False;
ByteString aDlgPos;
- for( USHORT i = 0; i < nCnt && !bCancel; ++i )
+ for( sal_uInt16 i = 0; i < nCnt && !bCancel; ++i )
{
pTmp->GotoFieldPos( i );
SwField* pField = pTmp->GetField( i );
if(pField->GetTyp()->Which() == RES_DROPDOWN)
- bCancel = StartDropDownFldDlg( pField, TRUE, &aDlgPos );
+ bCancel = StartDropDownFldDlg( pField, sal_True, &aDlgPos );
else
- bCancel = StartInputFldDlg( pField, TRUE, 0, &aDlgPos);
+ bCancel = StartInputFldDlg( pField, sal_True, 0, &aDlgPos);
// Sonst Updatefehler bei Multiselektion:
pTmp->GetField( i )->GetTyp()->UpdateFlds();
@@ -146,7 +146,7 @@ void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, BOOL bOnlyInSel )
-BOOL SwWrtShell::StartInputFldDlg( SwField* pFld, BOOL bNextButton,
+sal_Bool SwWrtShell::StartInputFldDlg( SwField* pFld, sal_Bool bNextButton,
Window* pParentWin, ByteString* pWindowState )
{
@@ -157,7 +157,7 @@ BOOL SwWrtShell::StartInputFldDlg( SwField* pFld, BOOL bNextButton,
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(pWindowState && pWindowState->Len())
pDlg->SetWindowState(*pWindowState);
- BOOL bRet = RET_CANCEL == pDlg->Execute();
+ sal_Bool bRet = RET_CANCEL == pDlg->Execute();
if(pWindowState)
*pWindowState = pDlg->GetWindowState();
@@ -166,7 +166,7 @@ BOOL SwWrtShell::StartInputFldDlg( SwField* pFld, BOOL bNextButton,
return bRet;
}
-BOOL SwWrtShell::StartDropDownFldDlg(SwField* pFld, BOOL bNextButton, ByteString* pWindowState)
+sal_Bool SwWrtShell::StartDropDownFldDlg(SwField* pFld, sal_Bool bNextButton, ByteString* pWindowState)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
@@ -175,11 +175,11 @@ BOOL SwWrtShell::StartDropDownFldDlg(SwField* pFld, BOOL bNextButton, ByteString
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(pWindowState && pWindowState->Len())
pDlg->SetWindowState(*pWindowState);
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
if(pWindowState)
*pWindowState = pDlg->GetWindowState();
delete pDlg;
- BOOL bRet = RET_CANCEL == nRet;
+ sal_Bool bRet = RET_CANCEL == nRet;
GetWin()->Update();
if(RET_YES == nRet)
{
@@ -210,9 +210,9 @@ void SwWrtShell::InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
Beschreibung: Verzeichnis Updaten Selektion loeschen
--------------------------------------------------------------------*/
-BOOL SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
+sal_Bool SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
if(_CanInsert())
{
@@ -220,10 +220,11 @@ BOOL SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
if (pSet == NULL)
{
- SwDoc * _pDoc = GetDoc();
-
- if (_pDoc != NULL)
- _pDoc->DelAllUndoObj();
+ SwDoc *const pDoc_ = GetDoc();
+ if (pDoc_)
+ {
+ pDoc_->GetIDocumentUndoRedo().DelAllUndoObj();
+ }
}
}
@@ -236,12 +237,12 @@ BOOL SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
void SwWrtShell::ClickToField( const SwField& rFld )
{
- bIsInClickToEdit = TRUE;
+ bIsInClickToEdit = sal_True;
switch( rFld.GetTyp()->Which() )
{
case RES_JUMPEDITFLD:
{
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
switch( rFld.GetFormat() )
{
case JE_FMT_TABLE:
@@ -257,7 +258,7 @@ void SwWrtShell::ClickToField( const SwField& rFld )
}
- Right( CRSR_SKIP_CHARS, TRUE, 1, FALSE ); // Feld selektieren
+ Right( CRSR_SKIP_CHARS, sal_True, 1, sal_False ); // Feld selektieren
if( nSlotId )
{
@@ -298,29 +299,29 @@ void SwWrtShell::ClickToField( const SwField& rFld )
break;
case RES_INPUTFLD:
- StartInputFldDlg( (SwField*)&rFld, FALSE );
+ StartInputFldDlg( (SwField*)&rFld, sal_False );
break;
case RES_SETEXPFLD:
if( ((SwSetExpField&)rFld).GetInputFlag() )
- StartInputFldDlg( (SwField*)&rFld, FALSE );
+ StartInputFldDlg( (SwField*)&rFld, sal_False );
break;
case RES_DROPDOWN :
- StartDropDownFldDlg( (SwField*)&rFld, FALSE );
+ StartDropDownFldDlg( (SwField*)&rFld, sal_False );
break;
}
- bIsInClickToEdit = FALSE;
+ bIsInClickToEdit = sal_False;
}
-void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, USHORT nFilter )
+void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, sal_uInt16 nFilter )
{
if( !rItem.GetValue().Len() )
return ;
- bIsInClickToEdit = TRUE;
+ bIsInClickToEdit = sal_True;
// erstmal das evt. gesetzte ObjectSelect Macro ausfuehren
const SvxMacro* pMac = rItem.GetMacro( SFX_EVENT_MOUSECLICK_OBJECT );
@@ -328,7 +329,7 @@ void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, USHORT nFilter )
{
SwCallMouseEvent aCallEvent;
aCallEvent.Set( &rItem );
- GetDoc()->CallEvent( SFX_EVENT_MOUSECLICK_OBJECT, aCallEvent, FALSE );
+ GetDoc()->CallEvent( SFX_EVENT_MOUSECLICK_OBJECT, aCallEvent, sal_False );
}
// damit die Vorlagenumsetzung sofort angezeigt wird
@@ -340,27 +341,27 @@ void SwWrtShell::ClickToINetAttr( const SwFmtINetFmt& rItem, USHORT nFilter )
const_cast<SwTxtINetFmt*>(pTxtAttr)->SetVisitedValid( true );
}
- bIsInClickToEdit = FALSE;
+ bIsInClickToEdit = sal_False;
}
-BOOL SwWrtShell::ClickToINetGrf( const Point& rDocPt, USHORT nFilter )
+sal_Bool SwWrtShell::ClickToINetGrf( const Point& rDocPt, sal_uInt16 nFilter )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
String sURL;
String sTargetFrameName;
const SwFrmFmt* pFnd = IsURLGrfAtPos( rDocPt, &sURL, &sTargetFrameName );
if( pFnd && sURL.Len() )
{
- bRet = TRUE;
+ bRet = sal_True;
// erstmal das evt. gesetzte ObjectSelect Macro ausfuehren
const SvxMacro* pMac = &pFnd->GetMacro().GetMacro( SFX_EVENT_MOUSECLICK_OBJECT );
if( pMac )
{
SwCallMouseEvent aCallEvent;
aCallEvent.Set( EVENT_OBJECT_URLITEM, pFnd );
- GetDoc()->CallEvent( SFX_EVENT_MOUSECLICK_OBJECT, aCallEvent, FALSE );
+ GetDoc()->CallEvent( SFX_EVENT_MOUSECLICK_OBJECT, aCallEvent, sal_False );
}
::LoadURL( sURL, this, nFilter, &sTargetFrameName);
@@ -369,7 +370,7 @@ BOOL SwWrtShell::ClickToINetGrf( const Point& rDocPt, USHORT nFilter )
}
-void LoadURL( const String& rURL, ViewShell* pVSh, USHORT nFilter,
+void LoadURL( const String& rURL, ViewShell* pVSh, sal_uInt16 nFilter,
const String *pTargetFrameName )
{
OSL_ENSURE( rURL.Len() && pVSh, "what should be loaded here?" );
@@ -409,9 +410,9 @@ void LoadURL( const String& rURL, ViewShell* pVSh, USHORT nFilter,
SfxStringItem aTargetFrameName( SID_TARGETNAME, sTargetFrame );
SfxStringItem aReferer( SID_REFERER, sReferer );
- SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, FALSE );
+ SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, sal_False );
//#39076# Silent kann lt. SFX entfernt werden.
- SfxBoolItem aBrowse( SID_BROWSE, TRUE );
+ SfxBoolItem aBrowse( SID_BROWSE, sal_True );
if( nFilter & URLLOAD_NEWVIEW )
aTargetFrameName.SetValue( String::CreateFromAscii("_blank") );
@@ -430,7 +431,7 @@ void LoadURL( const String& rURL, ViewShell* pVSh, USHORT nFilter,
}
void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk,
- const USHORT nAction )
+ const sal_uInt16 nAction )
{
if( EXCHG_IN_ACTION_COPY == nAction )
{
@@ -468,9 +469,15 @@ void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk,
// the update of content from linked section at time delete
// the undostack. Then the change of the section dont create
// any undoobject. - BUG 69145
- BOOL bDoesUndo = DoesUndo();
- if( UNDO_INSSECTION != GetUndoIds() )
- DoUndo( FALSE );
+ sal_Bool bDoesUndo = DoesUndo();
+ SwUndoId nLastUndoId(UNDO_EMPTY);
+ if (GetLastUndoInfo(0, & nLastUndoId))
+ {
+ if (UNDO_INSSECTION != nLastUndoId)
+ {
+ DoUndo(false);
+ }
+ }
UpdateSection( GetSectionFmtPos( *pIns->GetFmt() ), aSection );
DoUndo( bDoesUndo );
}
diff --git a/sw/source/ui/wrtsh/wrtsh3.cxx b/sw/source/ui/wrtsh/wrtsh3.cxx
index 31d4518be78e..db5df142c9ce 100644
--- a/sw/source/ui/wrtsh/wrtsh3.cxx
+++ b/sw/source/ui/wrtsh/wrtsh3.cxx
@@ -56,12 +56,12 @@ using ::rtl::OUString;
extern sal_Bool bNoInterrupt; // in mainwn.cxx
-BOOL SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark)
+sal_Bool SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark)
{
addCurrentPosition();
(this->*fnKillSel)( 0, sal_False );
- BOOL bRet = sal_True;
+ sal_Bool bRet = sal_True;
switch(eFuncId)
{
case BOOKMARK_INDEX:bRet = SwCrsrShell::GotoMark( pMark );break;
@@ -83,11 +83,11 @@ BOOL SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* co
return bRet;
}
-BOOL SwWrtShell::GotoField( const SwFmtFld& rFld )
+sal_Bool SwWrtShell::GotoField( const SwFmtFld& rFld )
{
(this->*fnKillSel)( 0, sal_False );
- BOOL bRet = SwCrsrShell::GotoFld( rFld );
+ sal_Bool bRet = SwCrsrShell::GotoFld( rFld );
if( bRet && IsSelFrmMode() )
{
UnSelectFrm();
@@ -141,7 +141,7 @@ void SwWrtShell::DrawSelChanged( )
bNoInterrupt = bOldVal;
}
-BOOL SwWrtShell::GotoMark( const ::rtl::OUString& rName )
+sal_Bool SwWrtShell::GotoMark( const ::rtl::OUString& rName )
{
IDocumentMarkAccess::const_iterator_t ppMark = getIDocumentMarkAccess()->findMark( rName );
if(ppMark == getIDocumentMarkAccess()->getMarksEnd()) return false;
@@ -149,19 +149,19 @@ BOOL SwWrtShell::GotoMark( const ::rtl::OUString& rName )
}
-BOOL SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark )
+sal_Bool SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark )
{
return MoveBookMark( BOOKMARK_INDEX, pMark );
}
-BOOL SwWrtShell::GoNextBookmark()
+sal_Bool SwWrtShell::GoNextBookmark()
{
return MoveBookMark( BOOKMARK_NEXT );
}
-BOOL SwWrtShell::GoPrevBookmark()
+sal_Bool SwWrtShell::GoPrevBookmark()
{
return MoveBookMark( BOOKMARK_PREV );
}
diff --git a/sw/source/ui/wrtsh/wrtsh4.cxx b/sw/source/ui/wrtsh/wrtsh4.cxx
index bd1705929ee7..9f8ba07ce204 100644
--- a/sw/source/ui/wrtsh/wrtsh4.cxx
+++ b/sw/source/ui/wrtsh/wrtsh4.cxx
@@ -47,7 +47,7 @@
*/
-BOOL SwWrtShell::_SttWrd()
+sal_Bool SwWrtShell::_SttWrd()
{
if ( IsSttPara() )
return 1;
@@ -73,7 +73,7 @@ BOOL SwWrtShell::_SttWrd()
-BOOL SwWrtShell::_EndWrd()
+sal_Bool SwWrtShell::_EndWrd()
{
if ( IsEndWrd() )
return 1;
@@ -91,14 +91,14 @@ BOOL SwWrtShell::_EndWrd()
-BOOL SwWrtShell::_NxtWrd()
+sal_Bool SwWrtShell::_NxtWrd()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
while( IsEndPara() ) // wenn schon am Ende, dann naechsten ???
{
if(!SwCrsrShell::Right(1,CRSR_SKIP_CHARS)) // Document - Ende ??
{
- Pop( FALSE );
+ Pop( sal_False );
return bRet;
}
bRet = IsStartWord();
@@ -115,21 +115,21 @@ BOOL SwWrtShell::_NxtWrd()
bRet = IsStartWord();
}
else
- bRet = TRUE;
+ bRet = sal_True;
}
ClearMark();
Combine();
return bRet;
}
-BOOL SwWrtShell::_PrvWrd()
+sal_Bool SwWrtShell::_PrvWrd()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
while( IsSttPara() )
{ // wenn schon am Anfang, dann naechsten ???
if(!SwCrsrShell::Left(1,CRSR_SKIP_CHARS))
{ // Document - Anfang ??
- Pop( FALSE );
+ Pop( sal_False );
return bRet;
}
bRet = IsStartWord();
@@ -146,7 +146,7 @@ BOOL SwWrtShell::_PrvWrd()
bRet = IsStartWord();
}
else
- bRet = TRUE;
+ bRet = sal_True;
}
ClearMark();
Combine();
@@ -155,16 +155,16 @@ BOOL SwWrtShell::_PrvWrd()
// --> OD 2008-08-06 #i92468#
// method code of <SwWrtShell::_NxtWrd()> before fix for issue i72162
-BOOL SwWrtShell::_NxtWrdForDelete()
+sal_Bool SwWrtShell::_NxtWrdForDelete()
{
if ( IsEndPara() )
{
if ( !SwCrsrShell::Right(1,CRSR_SKIP_CHARS) )
{
- Pop( FALSE );
- return FALSE;
+ Pop( sal_False );
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
Push();
ClearMark();
@@ -174,20 +174,20 @@ BOOL SwWrtShell::_NxtWrdForDelete()
}
ClearMark();
Combine();
- return TRUE;
+ return sal_True;
}
// method code of <SwWrtShell::_PrvWrd()> before fix for issue i72162
-BOOL SwWrtShell::_PrvWrdForDelete()
+sal_Bool SwWrtShell::_PrvWrdForDelete()
{
if ( IsSttPara() )
{
if ( !SwCrsrShell::Left(1,CRSR_SKIP_CHARS) )
{
- Pop( FALSE );
- return FALSE;
+ Pop( sal_False );
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
Push();
ClearMark();
@@ -197,18 +197,18 @@ BOOL SwWrtShell::_PrvWrdForDelete()
}
ClearMark();
Combine();
- return TRUE;
+ return sal_True;
}
// <--
-BOOL SwWrtShell::_FwdSentence()
+sal_Bool SwWrtShell::_FwdSentence()
{
Push();
ClearMark();
if(!SwCrsrShell::Right(1,CRSR_SKIP_CHARS))
{
- Pop(FALSE);
+ Pop(sal_False);
return 0;
}
if( !GoNextSentence() && !IsEndPara() )
@@ -221,13 +221,13 @@ BOOL SwWrtShell::_FwdSentence()
-BOOL SwWrtShell::_BwdSentence()
+sal_Bool SwWrtShell::_BwdSentence()
{
Push();
ClearMark();
if(!SwCrsrShell::Left(1,CRSR_SKIP_CHARS))
{
- Pop(FALSE);
+ Pop(sal_False);
return 0;
}
if(IsSttPara())
@@ -244,11 +244,11 @@ BOOL SwWrtShell::_BwdSentence()
}
-BOOL SwWrtShell::_FwdPara()
+sal_Bool SwWrtShell::_FwdPara()
{
Push();
ClearMark();
- BOOL bRet = SwCrsrShell::MovePara(fnParaNext, fnParaStart);
+ sal_Bool bRet = SwCrsrShell::MovePara(fnParaNext, fnParaStart);
ClearMark();
Combine();
@@ -256,12 +256,12 @@ BOOL SwWrtShell::_FwdPara()
}
-BOOL SwWrtShell::_BwdPara()
+sal_Bool SwWrtShell::_BwdPara()
{
Push();
ClearMark();
- BOOL bRet = SwCrsrShell::MovePara(fnParaPrev, fnParaStart);
+ sal_Bool bRet = SwCrsrShell::MovePara(fnParaPrev, fnParaStart);
if ( !bRet && !IsSttOfPara() )
{
SttPara();
diff --git a/sw/source/ui/wrtsh/wrtundo.cxx b/sw/source/ui/wrtsh/wrtundo.cxx
index a7ae5c1b10e9..5ec7103246a7 100644
--- a/sw/source/ui/wrtsh/wrtundo.cxx
+++ b/sw/source/ui/wrtsh/wrtundo.cxx
@@ -37,8 +37,11 @@
#include <svl/slstitm.hxx>
#include <wrtsh.hxx>
#include <swundo.hxx> // fuer Undo-Ids
+#include <IDocumentUndoRedo.hxx>
#include <swdtflvr.hxx>
-
+#include <svtools/svtdata.hxx>
+#include <svtools/svtools.hrc>
+#include <svtools/svtdata.hxx>
#include <wrtsh.hrc>
#include <sfx2/sfx.hrc>
@@ -47,7 +50,7 @@
// ist, muss die fuer die weiteren Aktionen beruecksichtigt werden.
-void SwWrtShell::Do( DoType eDoType, USHORT nCnt )
+void SwWrtShell::Do( DoType eDoType, sal_uInt16 nCnt )
{
// #105332# save current state of DoesUndo()
sal_Bool bSaveDoesUndo = DoesUndo();
@@ -59,7 +62,7 @@ void SwWrtShell::Do( DoType eDoType, USHORT nCnt )
DoUndo(sal_False); // #i21739#
// Modi zuruecksetzen
EnterStdMode();
- SwEditShell::Undo(UNDO_EMPTY, nCnt );
+ SwEditShell::Undo(nCnt);
break;
case REDO:
DoUndo(sal_False); // #i21739#
@@ -76,8 +79,8 @@ void SwWrtShell::Do( DoType eDoType, USHORT nCnt )
// #105332# restore undo state
DoUndo(bSaveDoesUndo);
- BOOL bCreateXSelection = FALSE;
- const BOOL bFrmSelected = IsFrmSelected() || IsObjSelected();
+ sal_Bool bCreateXSelection = sal_False;
+ const sal_Bool bFrmSelected = IsFrmSelected() || IsObjSelected();
if ( IsSelection() )
{
if ( bFrmSelected )
@@ -87,18 +90,18 @@ void SwWrtShell::Do( DoType eDoType, USHORT nCnt )
// bei Cursor setzen
fnKillSel = &SwWrtShell::ResetSelect;
fnSetCrsr = &SwWrtShell::SetCrsrKillSel;
- bCreateXSelection = TRUE;
+ bCreateXSelection = sal_True;
}
else if ( bFrmSelected )
{
EnterSelFrmMode();
- bCreateXSelection = TRUE;
+ bCreateXSelection = sal_True;
}
else if( (CNT_GRF | CNT_OLE ) & GetCntType() )
{
SelectObj( GetCharRect().Pos() );
EnterSelFrmMode();
- bCreateXSelection = TRUE;
+ bCreateXSelection = sal_True;
}
if( bCreateXSelection )
@@ -112,70 +115,67 @@ void SwWrtShell::Do( DoType eDoType, USHORT nCnt )
String SwWrtShell::GetDoString( DoType eDoType ) const
{
- String aStr, aUndoStr;
- USHORT nResStr = STR_UNDO;
+ ::rtl::OUString aUndoStr;
+ sal_uInt16 nResStr = STR_UNDO;
switch( eDoType )
{
case UNDO:
nResStr = STR_UNDO;
- aUndoStr = GetUndoIdsStr();
+ GetLastUndoInfo(& aUndoStr, 0);
break;
case REDO:
nResStr = STR_REDO;
- aUndoStr = GetRedoIdsStr();
+ GetFirstRedoInfo(& aUndoStr);
break;
default:;//prevent warning
}
- aStr.Insert( String(ResId( nResStr, *SFX_APP()->GetSfxResManager())), 0 );
- aStr += aUndoStr;
+ ::rtl::OUStringBuffer buf = ::rtl::OUStringBuffer( String( SvtResId( nResStr ) ) );
+ buf.append(aUndoStr);
- return aStr;
+ return buf.makeStringAndClear();
}
-USHORT SwWrtShell::GetDoStrings( DoType eDoType, SfxStringListItem& rStrs ) const
+sal_uInt16 SwWrtShell::GetDoStrings( DoType eDoType, SfxStringListItem& rStrs ) const
{
- SwUndoIds aIds;
+ SwUndoComments_t comments;
switch( eDoType )
{
case UNDO:
- GetUndoIds( NULL, &aIds );
+ comments = GetIDocumentUndoRedo().GetUndoComments();
break;
case REDO:
- GetRedoIds( NULL, &aIds );
+ comments = GetIDocumentUndoRedo().GetRedoComments();
break;
default:;//prevent warning
}
- String sList;
- for( USHORT n = 0, nEnd = aIds.Count(); n < nEnd; ++n )
+ ::rtl::OUStringBuffer buf;
+ for (size_t i = 0; i < comments.size(); ++i)
{
- const SwUndoIdAndName& rIdNm = *aIds[ n ];
- if( rIdNm.GetUndoStr() )
- sList += *rIdNm.GetUndoStr();
- else
- {
+ OSL_ENSURE(comments[i].getLength(), "no Undo/Redo Text set");
+ buf.append(comments[i]);
+ buf.append(sal_Unicode('\n'));
OSL_ENSURE( !this, "no Undo/Redo Test set" );
- }
- sList += '\n';
}
- rStrs.SetString( sList );
- return aIds.Count();
+ rStrs.SetString(buf.makeStringAndClear());
+ return static_cast<sal_uInt16>(comments.size());
}
String SwWrtShell::GetRepeatString() const
{
- String aStr;
- String aUndoStr = GetRepeatIdsStr();
+ ::rtl::OUString str;
+ GetRepeatInfo(& str);
- if (aUndoStr.Len() > 0)
+ if (str.getLength() == 0)
{
- aStr.Insert( ResId( STR_REPEAT, *SFX_APP()->GetSfxResManager()), 0 );
- aStr += aUndoStr;
+ return str;
}
- return aStr;
+ ::rtl::OUStringBuffer buf( String(SvtResId(STR_REPEAT)) );
+ buf.append(str);
+ return buf.makeStringAndClear();
}
diff --git a/sw/util/hidother.src b/sw/util/hidother.src
index df1cc8d99622..364377611fdc 100644
--- a/sw/util/hidother.src
+++ b/sw/util/hidother.src
@@ -25,7 +25,6 @@
*
************************************************************************/
#include "../inc/helpid.h" // HID_FUNC_XXX
-#include "hidother.hrc"
// Help-IDs fuer Dokument-Fenster
hidspecial HID_EDIT_WIN { HelpID = HID_EDIT_WIN; };
@@ -71,23 +70,6 @@ hidspecial HID_VS_NUM { HelpId = HID_VS_NUM ;};
hidspecial HID_VS_BULLET { HelpId = HID_VS_BULLET ;};
hidspecial HID_VS_NUMBMP { HelpId = HID_VS_NUMBMP ;};
-//Wegen Helferlein jetzt auch die ShellIds hier
-hidspecial SW_TEXTSHELL { HelpId = SW_TEXTSHELL ;};
-hidspecial SW_LISTSHELL { HelpId = SW_LISTSHELL ;};
-hidspecial SW_TABSHELL { HelpId = SW_TABSHELL ;};
-hidspecial SW_FRAMESHELL { HelpId = SW_FRAMESHELL ;};
-hidspecial SW_GRFSHELL { HelpId = SW_GRFSHELL ;};
-hidspecial SW_OLESHELL { HelpId = SW_OLESHELL ;};
-hidspecial SW_DRAWSHELL { HelpId = SW_DRAWSHELL ;};
-hidspecial SW_DRWTXTSHELL { HelpId = SW_DRWTXTSHELL ;};
-hidspecial SW_PAGEPREVIEW { HelpId = SW_PAGEPREVIEW ;};
-hidspecial SW_SRC_VIEWSHELL { HelpId = SW_SRC_VIEWSHELL ;};
-hidspecial SW_BEZIERSHELL { HelpId = SW_BEZIERSHELL ;};
-hidspecial SW_DRAWFORMSHELL { HelpId = SW_DRAWFORMSHELL ;};
-hidspecial SW_WEBTEXTSHELL { HelpId = SW_WEBTEXTSHELL ;};
-hidspecial SW_WEBFRAMESHELL { HelpId = SW_WEBFRAMESHELL ;};
-hidspecial SW_MEDIASHELL { HelpId = SW_MEDIASHELL ;};
-
// Navigator
hidspecial HID_NAVIGATOR_TOOLBOX { HelpId = HID_NAVIGATOR_TOOLBOX;};
hidspecial HID_NAVI_TBX16 { HelpId = HID_NAVI_TBX16;};
diff --git a/sw/util/makefile.mk b/sw/util/makefile.mk
deleted file mode 100644
index 42132f15d778..000000000000
--- a/sw/util/makefile.mk
+++ /dev/null
@@ -1,390 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..
-
-PRJNAME=sw
-TARGET=sw
-GEN_HID=TRUE
-GEN_HID_OTHER=TRUE
-USE_DEFFILE=TRUE
-
-# --- Settings ------------------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Allgemein -----------------------------------------------------------
-
-sw_res_files= \
- $(SRS)$/app.srs \
- $(SRS)$/dialog.srs \
- $(SRS)$/chrdlg.srs \
- $(SRS)$/config.srs \
- $(SRS)$/dbui.srs \
- $(SRS)$/dochdl.srs \
- $(SRS)$/docvw.srs \
- $(SRS)$/envelp.srs \
- $(SRS)$/fldui.srs \
- $(SRS)$/fmtui.srs \
- $(SRS)$/frmdlg.srs \
- $(SRS)$/globdoc.srs \
- $(SRS)$/index.srs \
- $(SRS)$/layout.srs \
- $(SRS)$/lingu.srs \
- $(SRS)$/misc.srs \
- $(SRS)$/ribbar.srs \
- $(SRS)$/shells.srs \
- $(SRS)$/smartmenu.srs \
- $(SRS)$/table.srs \
- $(SRS)$/uiview.srs \
- $(SRS)$/undo.srs \
- $(SRS)$/unocore.srs \
- $(SRS)$/utlui.srs \
- $(SRS)$/web.srs \
- $(SRS)$/wrtsh.srs \
- $(SOLARCOMMONRESDIR)$/sfx.srs
-
-RESLIB1NAME=sw
-RESLIB1IMAGES=$(PRJ)$/imglst $(PRJ)$/res
-RESLIB1SRSFILES= \
- $(sw_res_files)
-
-SWLIBFILES = \
- $(SLB)$/core1.lib \
- $(SLB)$/core2.lib \
- $(SLB)$/core3.lib \
- $(SLB)$/core4.lib \
- $(SLB)$/filter.lib \
- $(SLB)$/ui1.lib \
- $(SLB)$/ui2.lib
-
-SHL1TARGET= $(TARGET)$(DLLPOSTFIX)
-SHL1USE_EXPORTS=name
-SHL1IMPLIB= _$(TARGET)
-SHL1LIBS= $(SLB)$/swall.lib $(SWLIBFILES)
-
-LIB1TARGET =$(SLB)$/swall.lib
-
-LIB1OBJFILES= $(OUT)$/slo$/swmodule.obj \
- $(OUT)$/slo$/swdll.obj
-
-# dynamic libraries
-SHL1STDLIBS+= \
- $(LNGLIB) \
- $(SVXCORELIB) \
- $(EDITENGLIB) \
- $(SVXLIB) \
- $(SFXLIB) \
- $(XMLOFFLIB) \
- $(BASICLIB) \
- $(BASEGFXLIB) \
- $(DRAWINGLAYERLIB) \
- $(SVTOOLLIB) \
- $(TKLIB) \
- $(VCLLIB) \
- $(SVLLIB) \
- $(SOTLIB) \
- $(UNOTOOLSLIB) \
- $(TOOLSLIB) \
- $(I18NISOLANGLIB) \
- $(COMPHELPERLIB) \
- $(UCBHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(SALLIB) \
- $(SALHELPERLIB) \
- $(ICUUCLIB) \
- $(I18NUTILLIB) \
- $(AVMEDIALIB)
-
-.IF "$(DBG_LEVEL)">="2"
-SHL1STDLIBS+= $(LIBXML2LIB)
-.ENDIF
-
-.IF "$(GUI)"=="WNT"
-SHL1STDLIBS+= $(ADVAPI32LIB)
-.ENDIF # WNT
-
-
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-SHL1BASE= 0x1e000000
-DEF1NAME =$(SHL1TARGET)
-DEFLIB1NAME=swall $(SWLIBFILES:b)
-
-SHL2TARGET= swd$(DLLPOSTFIX)
-SHL2IMPLIB= swdimp
-SHL2VERSIONMAP=$(SOLARENV)/src/component.map
-SHL2DEF=$(MISC)$/$(SHL2TARGET).def
-DEF2NAME= $(SHL2TARGET)
-
-SHL2STDLIBS= \
- $(SFX2LIB) \
- $(SVTOOLLIB) \
- $(UNOTOOLSLIB) \
- $(SVLLIB) \
- $(VCLLIB) \
- $(SOTLIB) \
- $(TOOLSLIB) \
- $(UCBHELPERLIB) \
- $(COMPHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(SALLIB)
-
-SHL2OBJS= $(SLO)$/swdetect.obj \
- $(SLO)$/swdet2.obj \
- $(SLO)$/detreg.obj \
- $(SLO)$/iodetect.obj
-
-.IF "$(DBG_LEVEL)">="2"
-SHL2STDLIBS+= \
- $(LIBXML2LIB)
-.ENDIF
-
-SHL2DEPN+= makefile.mk
-
-# add for swui
-SHL3TARGET= swui$(DLLPOSTFIX)
-SHL3IMPLIB= swuiimp
-SHL3VERSIONMAP= swui.map
-SHL3DEF=$(MISC)$/$(SHL3TARGET).def
-SHL3DEPN=$(SHL1TARGETN)
-DEF3NAME= $(SHL3TARGET)
-
-SHL3STDLIBS= \
- $(ISWLIB) \
- $(SVXCORELIB) \
- $(EDITENGLIB) \
- $(SVXLIB) \
- $(SFX2LIB) \
- $(SVTOOLLIB) \
- $(TKLIB) \
- $(VCLLIB) \
- $(SOTLIB) \
- $(SVLLIB) \
- $(UNOTOOLSLIB) \
- $(TOOLSLIB) \
- $(I18NISOLANGLIB) \
- $(COMPHELPERLIB) \
- $(UCBHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(SALLIB) \
- $(SOTLIB)
-.IF "$(DBG_LEVEL)">="2"
-SHL3STDLIBS+= $(LIBXML2LIB)
-.ENDIF
-
-SHL3LIBS= $(SLB)$/swui.lib
-LIB3TARGET = $(SLB)$/swui.lib
-
-LIB3OBJFILES = \
- $(SLO)$/swuiexp.obj \
- $(SLO)$/SwRewriter.obj \
- $(SLO)$/swdlgfact.obj \
- $(SLO)$/addrdlg.obj \
- $(SLO)$/ascfldlg.obj \
- $(SLO)$/break.obj \
- $(SLO)$/bookmark.obj \
- $(SLO)$/changedb.obj \
- $(SLO)$/chardlg.obj \
- $(SLO)$/convert.obj \
- $(SLO)$/cption.obj \
- $(SLO)$/dbinsdlg.obj \
- $(SLO)$/docfnote.obj \
- $(SLO)$/docstdlg.obj \
- $(SLO)$/envlop1.obj \
- $(SLO)$/envfmt.obj \
- $(SLO)$/envprt.obj \
- $(SLO)$/label1.obj \
- $(SLO)$/labfmt.obj \
- $(SLO)$/labelexp.obj \
- $(SLO)$/labprt.obj \
- $(SLO)$/drpcps.obj \
- $(SLO)$/pardlg.obj \
- $(SLO)$/pattern.obj \
- $(SLO)$/pggrid.obj \
- $(SLO)$/pgfnote.obj \
- $(SLO)$/rowht.obj \
- $(SLO)$/selglos.obj \
- $(SLO)$/splittbl.obj \
- $(SLO)$/srtdlg.obj \
- $(SLO)$/tautofmt.obj \
- $(SLO)$/tblnumfm.obj \
- $(SLO)$/uiborder.obj \
- $(SLO)$/wrap.obj \
- $(SLO)$/colwd.obj \
- $(SLO)$/tabledlg.obj \
- $(SLO)$/fldtdlg.obj \
- $(SLO)$/fldedt.obj \
- $(SLO)$/fldpage.obj \
- $(SLO)$/flddb.obj \
- $(SLO)$/flddinf.obj \
- $(SLO)$/flddok.obj \
- $(SLO)$/fldfunc.obj \
- $(SLO)$/fldref.obj \
- $(SLO)$/FldRefTreeListBox.obj \
- $(SLO)$/fldvar.obj \
- $(SLO)$/swrenamexnameddlg.obj \
- $(SLO)$/swmodalredlineacceptdlg.obj \
- $(SLO)$/abstract.obj \
- $(SLO)$/frmdlg.obj \
- $(SLO)$/tmpdlg.obj \
- $(SLO)$/frmpage.obj \
- $(SLO)$/glosbib.obj \
- $(SLO)$/glossary.obj \
- $(SLO)$/inpdlg.obj \
- $(SLO)$/insfnote.obj \
- $(SLO)$/instable.obj \
- $(SLO)$/insrule.obj \
- $(SLO)$/javaedit.obj \
- $(SLO)$/titlepage.obj \
- $(SLO)$/linenum.obj \
- $(SLO)$/mailmrge.obj \
- $(SLO)$/multmrk.obj \
- $(SLO)$/mergetbl.obj \
- $(SLO)$/outline.obj \
- $(SLO)$/num.obj \
- $(SLO)$/column.obj \
- $(SLO)$/cnttab.obj \
- $(SLO)$/cntex.obj \
- $(SLO)$/uiregionsw.obj \
- $(SLO)$/optload.obj \
- $(SLO)$/optcomp.obj \
- $(SLO)$/optpage.obj \
- $(SLO)$/swuiccoll.obj \
- $(SLO)$/numpara.obj \
- $(SLO)$/swdialmgr.obj \
- $(SLO)$/swuiidxmrk.obj \
- $(SLO)$/DropDownFieldDialog.obj \
- $(SLO)$/macassgn.obj \
- $(SLO)$/wordcountdialog.obj \
- $(SLO)$/mailconfigpage.obj \
- $(SLO)$/addresslistdialog.obj \
- $(SLO)$/createaddresslistdialog.obj \
- $(SLO)$/customizeaddresslistdialog.obj \
- $(SLO)$/dbtablepreviewdialog.obj \
- $(SLO)$/mailmergewizard.obj \
- $(SLO)$/mmdocselectpage.obj \
- $(SLO)$/mmlayoutpage.obj \
- $(SLO)$/mmoutputpage.obj \
- $(SLO)$/mmoutputtypepage.obj \
- $(SLO)$/mmaddressblockpage.obj \
- $(SLO)$/mmgreetingspage.obj \
- $(SLO)$/mmmergepage.obj \
- $(SLO)$/mmpreparemergepage.obj \
- $(SLO)$/selectdbtabledialog.obj
-
-.IF "$(GUI)$(COM)" == "WNTMSC"
-.IF "$(ENABLE_PCH)" != "" && ( "$(PRJNAME)"!="sw" || "$(BUILD_SPECIAL)"!="TRUE" )
-#target sw
-SHL1OBJS += $(SLO)$/pchname.obj \
- $(SLO)$/pchname_ex.obj
-#target swd
-SHL2OBJS += $(SLO)$/pchname.obj \
- $(SLO)$/pchname_ex.obj
-#target swui
-SHL3OBJS += $(SLO)$/pchname.obj \
- $(SLO)$/pchname_ex.obj
-.ENDIF # "$(ENABLE_PCH)" != ""
-.ENDIF # "$(GUI)$(COM)" == "WNTMSC"
-
-SHL4TARGET=msword$(DLLPOSTFIX)
-SHL4VERSIONMAP=msword.map
-SHL4LIBS=$(SLB)$/rtf.lib $(SLB)$/ww8.lib
-SHL4DEPN=$(SHL1TARGETN)
-SHL4DEF=$(MISC)$/$(SHL4TARGET).def
-DEF4NAME=$(SHL4TARGET)
-
-SHL4STDLIBS= \
- $(ISWLIB) \
- $(OOXLIB) \
- $(SAXLIB) \
- $(SVXCORELIB) \
- $(EDITENGLIB) \
- $(MSFILTERLIB) \
- $(SFXLIB) \
- $(BASEGFXLIB) \
- $(SVTOOLLIB) \
- $(TKLIB) \
- $(VCLLIB) \
- $(SVLLIB) \
- $(SOTLIB) \
- $(UNOTOOLSLIB) \
- $(TOOLSLIB) \
- $(I18NISOLANGLIB) \
- $(COMPHELPERLIB) \
- $(UCBHELPERLIB) \
- $(CPPULIB) \
- $(CPPUHELPERLIB) \
- $(SALLIB) \
- $(ICUUCLIB) \
- $(BASICLIB) \
- $(MSFILTERLIB) \
- $(I18NUTILLIB)
-
-.IF "$(ENABLE_VBA)" == "YES"
-#target vba
-TARGET_VBA=vbaswobj
-SHL5TARGET=$(TARGET_VBA)$(DLLPOSTFIX).uno
-SHL5IMPLIB= i$(TARGET_VBA)
-
-SHL5VERSIONMAP=$(SOLARENV)/src/component.map
-SHL5DEF=$(MISC)$/$(SHL5TARGET).def
-DEF5NAME=$(SHL5TARGET)
-SHL5STDLIBS= \
- $(ISWLIB) \
- $(CPPUHELPERLIB) \
- $(VCLLIB) \
- $(CPPULIB) \
- $(COMPHELPERLIB) \
- $(SVLIB) \
- $(UNOTOOLSLIB) \
- $(TOOLSLIB) \
- $(SALLIB)\
- $(VBAHELPERLIB) \
- $(BASICLIB) \
- $(SFXLIB) \
- $(SVXLIB) \
- $(SVTOOLLIB) \
- $(SVLLIB) \
- $(VCLLIB) \
- $(TKLIB) \
- $(I18NISOLANGLIB) \
- $(EDITENGLIB) \
- $(SVXCORELIB) \
- $(MSFILTERLIB)
-
-.IF "$(GUI)"=="WNT"
-SHL5STDLIBS+=$(SHELLLIB)
-.ENDIF #WNT
-
-SHL5DEPN=$(SHL1TARGETN)
-SHL5LIBS=$(SLB)$/$(TARGET_VBA).lib
-.ENDIF # .IF "$(ENABLE_VBA)" == "YES"
-
-.INCLUDE : target.mk
diff --git a/sw/util/msword.component b/sw/util/msword.component
new file mode 100644
index 000000000000..84ae7aaf965f
--- /dev/null
+++ b/sw/util/msword.component
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* 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.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.Writer.RtfExport">
+ <service name="com.sun.star.comp.Writer.RtfExport"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.RtfImport">
+ <service name="com.sun.star.comp.Writer.RtfImport"/>
+ </implementation>
+</component>
diff --git a/sw/util/msword.map b/sw/util/msword.map
deleted file mode 100644
index d2a9d9b4f7e1..000000000000
--- a/sw/util/msword.map
+++ /dev/null
@@ -1,14 +0,0 @@
-UDK_3_0_0 {
- global:
- ImportRTF;
- ExportRTF;
- ImportDOC;
- ExportDOC;
- SaveOrDelMSVBAStorage_ww8;
- GetSaveWarningOfMSVBAStorage_ww8;
- component_getImplementationEnvironment;
- component_writeInfo;
- component_getFactory;
- local:
- *;
-};
diff --git a/sw/util/sw.component b/sw/util/sw.component
new file mode 100644
index 000000000000..e76cec637d33
--- /dev/null
+++ b/sw/util/sw.component
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* 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.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="SwXAutoTextContainer">
+ <service name="com.sun.star.text.AutoTextContainer"/>
+ </implementation>
+ <implementation name="SwXMailMerge">
+ <service name="com.sun.star.sdb.DataAccessDescriptor"/>
+ <service name="com.sun.star.text.MailMerge"/>
+ </implementation>
+ <implementation name="SwXModule">
+ <service name="com.sun.star.text.GlobalSettings"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.FilterOptionsDialog">
+ <service name="com.sun.star.ui.dialogs.FilterOptionsDialog"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.GlobalDocument">
+ <service name="com.sun.star.text.GlobalDocument"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.TextDocument">
+ <service name="com.sun.star.text.TextDocument"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.WebDocument">
+ <service name="com.sun.star.text.WebDocument"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.WriterModule">
+ <service name="com.sun.star.text.ModuleDispatcher"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.XMLContentExporter">
+ <service name="com.sun.star.comp.Writer.XMLContentExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.XMLExporter">
+ <service name="com.sun.star.comp.Writer.XMLExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.XMLMetaExporter">
+ <service name="com.sun.star.comp.Writer.XMLMetaExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.XMLOasisContentExporter">
+ <service name="com.sun.star.comp.Writer.XMLOasisContentExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.XMLOasisContentImporter">
+ <service name="com.sun.star.comp.Writer.XMLOasisContentImporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.XMLOasisExporter">
+ <service name="com.sun.star.comp.Writer.XMLOasisExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.XMLOasisImporter">
+ <service name="com.sun.star.comp.Writer.XMLOasisImporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.XMLOasisMetaExporter">
+ <service name="com.sun.star.comp.Writer.XMLOasisMetaExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.XMLOasisMetaImporter">
+ <service name="com.sun.star.comp.Writer.XMLOasisMetaImporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.XMLOasisSettingsExporter">
+ <service name="com.sun.star.comp.Writer.XMLOasisSettingsExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.XMLOasisSettingsImporter">
+ <service name="com.sun.star.comp.Writer.XMLOasisSettingsImporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.XMLOasisStylesExporter">
+ <service name="com.sun.star.comp.Writer.XMLOasisStylesExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.XMLOasisStylesImporter">
+ <service name="com.sun.star.comp.Writer.XMLOasisStylesImporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.XMLSettingsExporter">
+ <service name="com.sun.star.comp.Writer.XMLSettingsExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Writer.XMLStylesExporter">
+ <service name="com.sun.star.comp.Writer.XMLStylesExporter"/>
+ </implementation>
+ <implementation name="com.sun.star.util.comp.FinalThreadManager">
+ <service name="com.sun.star.util.JobManager"/>
+ </implementation>
+</component>
diff --git a/sw/util/sw.flt b/sw/util/sw.flt
deleted file mode 100644
index 83c763492233..000000000000
--- a/sw/util/sw.flt
+++ /dev/null
@@ -1,136 +0,0 @@
-+getImplementation
-START
-CharAttribList
-CharPosArray
-ContentAttribs
-ContentAttribsInfo
-ContentInfo
-ContentNode
-DeletedNodeInfo
-EditAttrib
-EditCharAttrib
-EditDbg
-EditDoc
-EditEngineItemPool
-EditHTMLParser
-EditLine
-EditNodeIdx
-EditPaM
-EditPosition
-EditRTFParser
-EditSel
-EditSpellWrapper
-EditStyleSheet
-EditUndoConnectParas
-EditUndoDelContent
-EditUndoInsertChars
-EditUndoInsertFeature
-EditUndoManager
-EditUndoMoveParagraphs
-EditUndoRemoveChars
-EditUndoRemoveFeature
-EditUndoSetAttribs
-EditUndoSetParaAttribs
-EditUndoSetStyleSheet
-EditUndoSplitPara
-GlobalEditData
-IdleFormattter
-ImpEditEngine
-ImpEditView
-InternalEditStatus
-ParaPortion
-ParagraphList
-RTFPardAttrMapIds
-RTFPlainAttrMapIds
-SelRange
-SortedPositions_SAR
-SvxACorrChars
-SvxColorList
-SvxFontTable
-SvxRTFStyleType
-SvxTabStopArr_SAR
-TextPortionList
-XEditAttrib
-XParaPortionList
-BinTextObject
-DialogsResMgr
-E3dDragMethod
-E3dTriangle
-GetImp
-ImpA
-ImpB
-ImpBrw
-ImpC
-ImpCheck
-ImpColor
-ImpD
-ImpDrag
-ImpEdCtrl
-ImpEdit
-ImpF
-+ImpGetResStr
-ImpGet
-ImpH
-ImpHide
-ImpI
-ImpItem
-ImpJ
-ImpL
-ImpList
-ImpM
-ImpMulti
-ImportInfo
-ImpP
-ImpPaint
-ImpPast
-ImpRecalc
-ImpReset
-ImpRemove
-ImpRef
-ImpReset
-ImpS
-ImpScroll
-ImpSdrGDIMetaFileImport
-ImpSet
-ImpShow
-ImpT
-ImpX
-OLUndoAttr
-OLUndoDepth
-OLUndoExpand
-OLUndoHeight
-OutlinerEditEng
-SdrGraphicLink
-SdrItemBrowser
-SdrOleLink
-SpellCache
-SvFileObject
-WrongList
-WrongRanges
-XIOCompat
-_SdrItemBrowserControl
-_SdrItemBrowserWindow
-+FmXGridControl
-+FmXGridPeer
-FmX
-FmExp
-ODatabaseForm
-WEP
-LIBMAIN
-LibMain
-??_5
-??_7
-??_8
-??_9
-??_C
-??_E
-??_F
-??_G
-??_H
-??_I
-___CT
-_alloc
-_CT
-exception::exception
-_TI2
-___CT
diff --git a/sw/util/swd.component b/sw/util/swd.component
new file mode 100644
index 000000000000..c89c007ec30a
--- /dev/null
+++ b/sw/util/swd.component
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* 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.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.writer.FormatDetector">
+ <service name="com.sun.star.frame.ExtendedTypeDetection"/>
+ <service name="com.sun.star.text.FormatDetector"/>
+ <service name="com.sun.star.text.W4WFormatDetector"/>
+ </implementation>
+</component>
diff --git a/sw/util/swui.map b/sw/util/swui.map
deleted file mode 100644
index ad5e33836c7c..000000000000
--- a/sw/util/swui.map
+++ /dev/null
@@ -1,6 +0,0 @@
-UDK_3_0_0 {
- global:
- CreateDialogFactory;
- local:
- *;
-};
diff --git a/sw/util/vbaswobj.component b/sw/util/vbaswobj.component
new file mode 100644
index 000000000000..e6c6fe4a4149
--- /dev/null
+++ b/sw/util/vbaswobj.component
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* 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.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="SwVbaDocument">
+ <service name="ooo.vba.word.Document"/>
+ </implementation>
+ <implementation name="SwVbaEventsHelper">
+ <service name="com.sun.star.document.vba.VBATextEventProcessor"/>
+ </implementation>
+ <implementation name="SwVbaGlobals">
+ <service name="ooo.vba.word.Globals"/>
+ </implementation>
+ <implementation name="SwVbaWrapFormat">
+ <service name="ooo.vba.word.WrapFormat"/>
+ </implementation>
+</component>